From 330529db51b52a46809c691e7478ffdda32d7f10 Mon Sep 17 00:00:00 2001 From: Devon White Date: Thu, 11 Jun 2026 16:47:44 -0400 Subject: [PATCH 1/8] Demo: SDK Reference product (compact layout, 10-SDK polyglot reference) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Own sdk-reference product (like #337), compact layout — true to each SDK's structure: every container page (module/package, class) holds its direct members inline, including its type definitions (interfaces/enums bundle onto the page; nested classes keep their own page). Repo-local non-shipped code (examples/, internal port-audit tooling) is excluded; shipped CLIs are kept. - 2,023 pages (vs 14,573 nested in #337 — ~86% fewer) - fern-check: 0 broken links - 2 hand-written: fern/docs.yml entry + sdk-reference.yml (nav) Requires pipeline branch Devon-White/lustri fix/sdk-reference-compact-quality. --- fern/docs.yml | 6 + fern/products/sdk-reference/cpp/_meta.json | 10 + .../cpp/c-tool-context/index.mdx | 32 + .../sdk-reference/cpp/httplib/index.mdx | 25 + fern/products/sdk-reference/cpp/index.mdx | 17 + fern/products/sdk-reference/cpp/ix/index.mdx | 25 + .../cpp/signalwire/agent/agent-base/index.mdx | 2791 +++++++++++ .../cpp/signalwire/agent/index.mdx | 159 + .../agent/language-config/index.mdx | 68 + .../signalwire/agent/pronunciation/index.mdx | 60 + .../agent/swaig-query-param/index.mdx | 36 + .../contexts/context-builder/index.mdx | 229 + .../cpp/signalwire/contexts/context/index.mdx | 836 ++++ .../signalwire/contexts/gather-info/index.mdx | 185 + .../contexts/gather-question/index.mdx | 109 + .../cpp/signalwire/contexts/index.mdx | 89 + .../cpp/signalwire/contexts/step/index.mdx | 657 +++ .../cpp/signalwire/core/index.mdx | 33 + .../signalwire/core/logging-config/index.mdx | 58 + .../cpp/signalwire/datamap/index.mdx | 475 ++ .../sdk-reference/cpp/signalwire/index.mdx | 445 ++ .../cpp/signalwire/logger/index.mdx | 264 ++ .../cpp/signalwire/logging/index.mdx | 109 + .../cpp/signalwire/logging/logger/index.mdx | 138 + .../cpp/signalwire/pom/index.mdx | 131 + .../pom/prompt-object-model/index.mdx | 391 ++ .../cpp/signalwire/pom/section/index.mdx | 301 ++ .../prefabs/concierge-agent/index.mdx | 139 + .../prefabs/faq-bot-agent/index.mdx | 139 + .../cpp/signalwire/prefabs/index.mdx | 67 + .../prefabs/info-gatherer-agent/index.mdx | 139 + .../prefabs/receptionist-agent/index.mdx | 139 + .../signalwire/prefabs/survey-agent/index.mdx | 139 + .../cpp/signalwire/relay/action/index.mdx | 640 +++ .../cpp/signalwire/relay/call-event/index.mdx | 72 + .../cpp/signalwire/relay/call/index.mdx | 1761 +++++++ .../relay/component-event/index.mdx | 68 + .../cpp/signalwire/relay/device/index.mdx | 94 + .../cpp/signalwire/relay/dial-event/index.mdx | 90 + .../cpp/signalwire/relay/index.mdx | 692 +++ .../signalwire/relay/message-event/index.mdx | 72 + .../cpp/signalwire/relay/message/index.mdx | 404 ++ .../signalwire/relay/relay-client/index.mdx | 581 +++ .../signalwire/relay/relay-config/index.mdx | 46 + .../signalwire/relay/relay-event/index.mdx | 98 + .../relay/web-socket-client/index.mdx | 352 ++ .../signalwire/rest/crud-resource/index.mdx | 184 + .../cpp/signalwire/rest/http-client/index.mdx | 299 ++ .../cpp/signalwire/rest/index.mdx | 258 ++ .../rest/paginated-iterator/index.mdx | 261 ++ .../rest-client/addresses-namespace/index.mdx | 54 + .../rest-client/calling-namespace/index.mdx | 1413 ++++++ .../rest/rest-client/chat-namespace/index.mdx | 106 + .../rest-client/compat-accounts/index.mdx | 162 + .../rest-client/compat-applications/index.mdx | 84 + .../rest/rest-client/compat-calls/index.mdx | 208 + .../rest-client/compat-conferences/index.mdx | 454 ++ .../rest/rest-client/compat-faxes/index.mdx | 174 + .../rest-client/compat-laml-bins/index.mdx | 84 + .../rest-client/compat-messages/index.mdx | 177 + .../rest-client/compat-namespace/index.mdx | 186 + .../compat-phone-numbers/index.mdx | 284 ++ .../rest/rest-client/compat-queues/index.mdx | 180 + .../rest-client/compat-recordings/index.mdx | 110 + .../rest/rest-client/compat-tokens/index.mdx | 112 + .../compat-transcriptions/index.mdx | 110 + .../datasphere-documents/index.mdx | 173 + .../datasphere-namespace/index.mdx | 82 + .../rest-client/fabric-addresses/index.mdx | 108 + .../rest-client/fabric-call-flows/index.mdx | 166 + .../fabric-conference-rooms/index.mdx | 107 + .../fabric-cxml-applications/index.mdx | 80 + .../fabric-generic-resources/index.mdx | 201 + .../rest-client/fabric-namespace/index.mdx | 96 + .../rest-client/fabric-resource-put/index.mdx | 84 + .../rest-client/fabric-resource/index.mdx | 87 + .../rest-client/fabric-subscribers/index.mdx | 212 + .../rest/rest-client/fabric-tokens/index.mdx | 186 + .../imported-numbers-namespace/index.mdx | 80 + .../cpp/signalwire/rest/rest-client/index.mdx | 750 +++ .../rest-client/logs-conferences/index.mdx | 82 + .../rest/rest-client/logs-fax/index.mdx | 108 + .../rest/rest-client/logs-messages/index.mdx | 108 + .../rest/rest-client/logs-namespace/index.mdx | 60 + .../rest/rest-client/logs-voice/index.mdx | 139 + .../rest-client/lookup-namespace/index.mdx | 80 + .../rest/rest-client/mfa-namespace/index.mdx | 186 + .../number-groups-namespace/index.mdx | 193 + .../call-flow-options/index.mdx | 36 + .../cxml-webhook-options/index.mdx | 36 + .../phone-numbers-namespace/index.mdx | 585 +++ .../relay-topic-options/index.mdx | 34 + .../rest-client/project-namespace/index.mdx | 104 + .../rest/rest-client/project-tokens/index.mdx | 110 + .../rest-client/pub-sub-namespace/index.mdx | 80 + .../rest-client/queues-namespace/index.mdx | 170 + .../recordings-namespace/index.mdx | 54 + .../rest-client/registry-brands/index.mdx | 193 + .../rest-client/registry-campaigns/index.mdx | 200 + .../rest-client/registry-namespace/index.mdx | 60 + .../rest-client/registry-numbers/index.mdx | 56 + .../rest-client/registry-orders/index.mdx | 82 + .../short-codes-namespace/index.mdx | 82 + .../sip-profile-namespace/index.mdx | 102 + .../verified-callers-namespace/index.mdx | 54 + .../video-conference-tokens/index.mdx | 108 + .../rest-client/video-conferences/index.mdx | 172 + .../rest-client/video-namespace/index.mdx | 68 + .../video-room-recordings/index.mdx | 139 + .../rest-client/video-room-sessions/index.mdx | 201 + .../rest-client/video-room-tokens/index.mdx | 82 + .../rest/rest-client/video-rooms/index.mdx | 141 + .../rest/rest-client/video-streams/index.mdx | 110 + .../rest/signal-wire-rest-error/index.mdx | 108 + .../cpp/signalwire/security/index.mdx | 283 ++ .../security/session-manager/index.mdx | 207 + .../webhook-validator-options/index.mdx | 40 + .../signalwire/server/agent-server/index.mdx | 270 ++ .../cpp/signalwire/server/index.mdx | 107 + .../server/tls-server-config/index.mdx | 62 + .../api-ninjas-trivia-skill-r/index.mdx | 174 + .../skills/api-ninjas-trivia-skill/index.mdx | 174 + .../skills/claude-skills-skill-r/index.mdx | 150 + .../skills/claude-skills-skill/index.mdx | 174 + .../skills/custom-skills-skill-r/index.mdx | 150 + .../skills/custom-skills-skill/index.mdx | 150 + .../datasphere-serverless-skill-r/index.mdx | 174 + .../datasphere-serverless-skill/index.mdx | 222 + .../skills/datasphere-skill-r/index.mdx | 174 + .../skills/datasphere-skill/index.mdx | 201 + .../skills/date-time-skill/index.mdx | 174 + .../skills/google-maps-skill-r/index.mdx | 152 + .../skills/google-maps-skill/index.mdx | 176 + .../cpp/signalwire/skills/index.mdx | 413 ++ .../skills/info-gatherer-skill-r/index.mdx | 174 + .../skills/info-gatherer-skill/index.mdx | 222 + .../signalwire/skills/joke-skill-r/index.mdx | 200 + .../signalwire/skills/joke-skill/index.mdx | 200 + .../signalwire/skills/math-skill-r/index.mdx | 152 + .../signalwire/skills/math-skill/index.mdx | 174 + .../skills/mcp-gateway-skill-r/index.mdx | 152 + .../skills/mcp-gateway-skill/index.mdx | 200 + .../native-vector-search-skill-r/index.mdx | 174 + .../native-vector-search-skill/index.mdx | 174 + .../play-background-file-skill-r/index.mdx | 174 + .../play-background-file-skill/index.mdx | 174 + .../signalwire/skills/skill-base/index.mdx | 518 +++ .../skills/skill-http-response/index.mdx | 38 + .../signalwire/skills/skill-manager/index.mdx | 172 + .../skills/skill-prompt-section/index.mdx | 38 + .../skills/skill-registry/index.mdx | 207 + .../skills/spider-skill-r/index.mdx | 174 + .../signalwire/skills/spider-skill/index.mdx | 177 + .../skills/swml-transfer-skill-r/index.mdx | 198 + .../skills/swml-transfer-skill/index.mdx | 222 + .../skills/weather-api-skill-r/index.mdx | 152 + .../skills/weather-api-skill/index.mdx | 152 + .../web-search-core/candidate/index.mdx | 42 + .../skills/web-search-core/index.mdx | 318 ++ .../web-search-core/latency-params/index.mdx | 40 + .../skills/web-search-skill-r/index.mdx | 244 + .../skills/web-search-skill/index.mdx | 252 + .../skills/wikipedia-search-skill-r/index.mdx | 152 + .../skills/wikipedia-search-skill/index.mdx | 155 + .../signalwire/swaig/enum-or-string/index.mdx | 110 + .../swaig/function-result/index.mdx | 1632 +++++++ .../cpp/signalwire/swaig/index.mdx | 721 +++ .../swaig/join-conference-options/index.mdx | 67 + .../swaig/parameter-schema/index.mdx | 492 ++ .../swaig/tool-definition/index.mdx | 70 + .../cpp/signalwire/swml/document/index.mdx | 274 ++ .../cpp/signalwire/swml/index.mdx | 97 + .../cpp/signalwire/swml/schema/index.mdx | 220 + .../cpp/signalwire/swml/section/index.mdx | 126 + .../cpp/signalwire/swml/service/index.mdx | 2134 +++++++++ .../signalwire/swml/verb-definition/index.mdx | 40 + .../cpp/signalwire/swml/verb/index.mdx | 90 + .../cpp/signalwire/utils/index.mdx | 89 + .../signalwire/utils/schema-utils/index.mdx | 332 ++ .../utils/schema-validation-error/index.mdx | 105 + .../signalwire/utils/url-validator/index.mdx | 117 + .../cpp/signalwire/utils/verb-info/index.mdx | 38 + fern/products/sdk-reference/cpp/std/index.mdx | 25 + fern/products/sdk-reference/dotnet/_meta.json | 10 + fern/products/sdk-reference/dotnet/index.mdx | 30 + .../signal-wire.agent/agent-base/index.mdx | 2062 +++++++++ .../signal-wire.agent/agent-options/index.mdx | 64 + .../dotnet/signal-wire.agent/index.mdx | 24 + .../context-builder/index.mdx | 235 + .../signal-wire.contexts/context/index.mdx | 724 +++ .../gather-info/index.mdx | 102 + .../gather-question/index.mdx | 72 + .../dotnet/signal-wire.contexts/index.mdx | 32 + .../reserved-tool-names/index.mdx | 45 + .../signal-wire.contexts/step/index.mdx | 548 +++ .../signal-wire.data-map/data-map/index.mdx | 516 +++ .../dotnet/signal-wire.data-map/index.mdx | 20 + .../dotnet/signal-wire.logging/index.mdx | 44 + .../signal-wire.logging/logger/index.mdx | 188 + .../dotnet/signal-wire.pom/index.mdx | 22 + .../signal-wire.pom/pom-builder/index.mdx | 323 ++ .../prompt-object-model/index.mdx | 330 ++ .../dotnet/signal-wire.pom/section/index.mdx | 244 + .../concierge-agent/index.mdx | 177 + .../faq-bot-agent/index.mdx | 129 + .../dotnet/signal-wire.prefabs/index.mdx | 36 + .../info-gatherer-agent/index.mdx | 143 + .../receptionist-agent/index.mdx | 99 + .../survey-agent/index.mdx | 157 + .../dotnet/signal-wire.relay/action/index.mdx | 367 ++ .../signal-wire.relay/ai-action/index.mdx | 85 + .../call-state-extensions/index.mdx | 120 + .../dotnet/signal-wire.relay/call/index.mdx | 1462 ++++++ .../dotnet/signal-wire.relay/client/index.mdx | 650 +++ .../collect-action/index.mdx | 193 + .../signal-wire.relay/constants/index.mdx | 74 + .../signal-wire.relay/detect-action/index.mdx | 116 + .../dotnet/signal-wire.relay/device/index.mdx | 150 + .../dial-state-extensions/index.mdx | 120 + .../dotnet/signal-wire.relay/event/index.mdx | 126 + .../signal-wire.relay/fax-action/index.mdx | 91 + .../dotnet/signal-wire.relay/index.mdx | 274 ++ .../message-state-extensions/index.mdx | 120 + .../signal-wire.relay/message/index.mdx | 256 ++ .../signal-wire.relay/pay-action/index.mdx | 85 + .../signal-wire.relay/play-action/index.mdx | 139 + .../signal-wire.relay/record-action/index.mdx | 129 + .../signal-wire.relay/stream-action/index.mdx | 85 + .../signal-wire.relay/tap-action/index.mdx | 85 + .../transcribe-action/index.mdx | 85 + .../addresses/index.mdx | 57 + .../call-flows-helper/index.mdx | 135 + .../calling/index.mdx | 1067 +++++ .../compat-accounts/index.mdx | 149 + .../compat-applications/index.mdx | 88 + .../compat-calls/index.mdx | 197 + .../compat-conferences/index.mdx | 396 ++ .../compat-faxes/index.mdx | 166 + .../compat-laml-bins/index.mdx | 88 + .../compat-messages/index.mdx | 166 + .../compat-phone-numbers/index.mdx | 278 ++ .../compat-queues/index.mdx | 168 + .../compat-recordings/index.mdx | 128 + .../compat-tokens/index.mdx | 130 + .../compat-transcriptions/index.mdx | 128 + .../compat/index.mdx | 94 + .../conference-logs/index.mdx | 80 + .../conference-rooms-helper/index.mdx | 83 + .../cxml-applications-helper/index.mdx | 56 + .../datasphere-documents/index.mdx | 156 + .../datasphere-ns/index.mdx | 63 + .../fabric-addresses/index.mdx | 107 + .../fabric-resources/index.mdx | 184 + .../fabric-tokens/index.mdx | 174 + .../fabric/index.mdx | 133 + .../fax-logs/index.mdx | 104 + .../imported-numbers/index.mdx | 59 + .../signal-wire.rest.namespaces/index.mdx | 224 + .../logs/index.mdx | 72 + .../message-logs/index.mdx | 104 + .../signal-wire.rest.namespaces/mfa/index.mdx | 132 + .../number-groups/index.mdx | 191 + .../project-tokens/index.mdx | 124 + .../project/index.mdx | 61 + .../queues/index.mdx | 166 + .../recordings/index.mdx | 57 + .../registry-brands/index.mdx | 180 + .../registry-campaigns/index.mdx | 184 + .../registry-numbers/index.mdx | 80 + .../registry-orders/index.mdx | 80 + .../registry/index.mdx | 72 + .../short-codes/index.mdx | 90 + .../sip-profile/index.mdx | 111 + .../subscribers-helper/index.mdx | 190 + .../video-conference-tokens/index.mdx | 104 + .../video-conferences/index.mdx | 166 + .../video-room-recordings/index.mdx | 154 + .../video-room-sessions/index.mdx | 182 + .../video-room-tokens/index.mdx | 80 + .../video-rooms/index.mdx | 140 + .../video-streams/index.mdx | 130 + .../video/index.mdx | 78 + .../voice-logs/index.mdx | 130 + .../signal-wire.rest/crud-resource/index.mdx | 239 + .../crud-with-addresses/index.mdx | 86 + .../signal-wire.rest/http-client/index.mdx | 315 ++ .../dotnet/signal-wire.rest/index.mdx | 38 + .../paginated-iterator/index.mdx | 131 + .../signal-wire.rest/rest-client/index.mdx | 199 + .../signal-wire-rest-error/index.mdx | 117 + .../dotnet/signal-wire.security/index.mdx | 28 + .../session-manager/index.mdx | 158 + .../webhook-validation-middleware/index.mdx | 193 + .../webhook-validator/index.mdx | 127 + .../signal-wire.server/agent-server/index.mdx | 304 ++ .../dotnet/signal-wire.server/index.mdx | 20 + .../signal-wire.serverless/adapter/index.mdx | 156 + .../dotnet/signal-wire.serverless/index.mdx | 20 + .../api-ninjas-trivia-skill/index.mdx | 94 + .../claude-skills-skill/index.mdx | 179 + .../custom-skills-skill/index.mdx | 94 + .../datasphere-serverless-skill/index.mdx | 138 + .../datasphere-skill/index.mdx | 148 + .../datetime-skill/index.mdx | 114 + .../google-maps-skill/index.mdx | 136 + .../signal-wire.skills.builtin/index.mdx | 88 + .../info-gatherer-skill/index.mdx | 138 + .../joke-skill/index.mdx | 136 + .../math-skill/index.mdx | 114 + .../mcp-gateway-skill/index.mdx | 171 + .../native-vector-search-skill/index.mdx | 127 + .../play-background-file-skill/index.mdx | 94 + .../spider-skill/index.mdx | 127 + .../swml-transfer-skill/index.mdx | 138 + .../weather-api-skill/index.mdx | 92 + .../web-search-skill/index.mdx | 185 + .../wikipedia-search-skill/index.mdx | 122 + .../dotnet/signal-wire.skills/index.mdx | 145 + .../signal-wire.skills/skill-base/index.mdx | 329 ++ .../skill-manager/index.mdx | 180 + .../skill-name-extensions/index.mdx | 61 + .../skill-registry/index.mdx | 189 + .../callback-method-extensions/index.mdx | 62 + .../codec-extensions/index.mdx | 62 + .../conference-beep-extensions/index.mdx | 61 + .../conference-record-extensions/index.mdx | 61 + .../conference-trim-extensions/index.mdx | 61 + .../function-result/index.mdx | 1768 +++++++ .../dotnet/signal-wire.swaig/index.mdx | 476 ++ .../join-conference-options/index.mdx | 127 + .../parameter-schema/index.mdx | 487 ++ .../record-direction-extensions/index.mdx | 61 + .../record-format-extensions/index.mdx | 61 + .../tap-direction-extensions/index.mdx | 61 + .../signal-wire.swml/document/index.mdx | 312 ++ .../dotnet/signal-wire.swml/index.mdx | 44 + .../schema-validation-error/index.mdx | 66 + .../dotnet/signal-wire.swml/schema/index.mdx | 245 + .../service-options/index.mdx | 46 + .../dotnet/signal-wire.swml/service/index.mdx | 895 ++++ .../signal-wire.swml/swml-builder/index.mdx | 309 ++ .../signal-wire.swml/swml-renderer/index.mdx | 123 + .../signal-wire.swml/verb-info/index.mdx | 82 + .../execution-mode/index.mdx | 84 + .../dotnet/signal-wire.utils/index.mdx | 20 + .../signal-wire.utils/url-validator/index.mdx | 97 + fern/products/sdk-reference/go/_meta.json | 10 + .../cmd/swaig-test/main/basic-auth/index.mdx | 35 + .../cmd/swaig-test/main/index.mdx | 249 + .../main/lambda-sim-result/index.mdx | 37 + .../main/simulate-lambda-options/index.mdx | 47 + .../pkg/agent/agent/agent-base/index.mdx | 2701 +++++++++++ .../signalwire-go/pkg/agent/agent/index.mdx | 976 ++++ .../agent/agent/mcp-server-config/index.mdx | 39 + .../pkg/agent/agent/tool-definition/index.mdx | 108 + .../contexts/context-builder/index.mdx | 199 + .../pkg/contexts/contexts/context/index.mdx | 671 +++ .../contexts/contexts/gather-info/index.mdx | 113 + .../contexts/gather-question/index.mdx | 71 + .../pkg/contexts/contexts/index.mdx | 272 ++ .../pkg/contexts/contexts/step/index.mdx | 550 +++ .../datamap/expression-pattern/index.mdx | 35 + .../pkg/datamap/datamap/index.mdx | 713 +++ .../pkg/lambda/lambda/handler/index.mdx | 85 + .../signalwire-go/pkg/lambda/lambda/index.mdx | 132 + .../livewire/livewire/agent-handoff/index.mdx | 35 + .../livewire/livewire/agent-session/index.mdx | 255 ++ .../pkg/livewire/livewire/agent/index.mdx | 247 + .../livewire/livewire/cartesia-tts/index.mdx | 33 + .../livewire/livewire/chat-context/index.mdx | 61 + .../livewire/livewire/chat-message/index.mdx | 35 + .../livewire/livewire/deepgram-stt/index.mdx | 33 + .../livewire/eleven-labs-tts/index.mdx | 33 + .../livewire/livewire/google-stt/index.mdx | 33 + .../pkg/livewire/livewire/index.mdx | 1360 ++++++ .../livewire/livewire/inference-llm/index.mdx | 33 + .../livewire/livewire/inference-stt/index.mdx | 33 + .../livewire/livewire/inference-tts/index.mdx | 33 + .../livewire/livewire/job-context/index.mdx | 83 + .../livewire/livewire/job-process/index.mdx | 33 + .../livewire/livewire/live-server/index.mdx | 75 + .../livewire/livewire/open-aillm/index.mdx | 33 + .../livewire/livewire/open-aitts/index.mdx | 33 + .../pkg/livewire/livewire/room/index.mdx | 33 + .../livewire/livewire/run-context/index.mdx | 41 + .../livewire/livewire/silero-vad/index.mdx | 51 + .../livewire/livewire/stop-response/index.mdx | 29 + .../livewire/livewire/tool-error/index.mdx | 55 + .../pkg/logging/logging/index.mdx | 307 ++ .../pkg/logging/logging/logger/index.mdx | 125 + .../signalwire-go/pkg/pom/pom/index.mdx | 303 ++ .../pkg/pom/pom/prompt-object-model/index.mdx | 271 ++ .../pkg/pom/pom/section/index.mdx | 246 + .../pkg/prefabs/prefabs/amenity/index.mdx | 37 + .../prefabs/prefabs/bedrock-agent/index.mdx | 183 + .../prefabs/prefabs/bedrock-options/index.mdx | 65 + .../prefabs/prefabs/concierge-agent/index.mdx | 33 + .../prefabs/concierge-options/index.mdx | 53 + .../pkg/prefabs/prefabs/department/index.mdx | 47 + .../prefabs/prefabs/faq-bot-agent/index.mdx | 33 + .../prefabs/prefabs/faq-bot-options/index.mdx | 47 + .../pkg/prefabs/prefabs/faq/index.mdx | 37 + .../pkg/prefabs/prefabs/index.mdx | 428 ++ .../prefabs/info-gatherer-agent/index.mdx | 96 + .../prefabs/info-gatherer-options/index.mdx | 39 + .../pkg/prefabs/prefabs/question/index.mdx | 43 + .../prefabs/receptionist-agent/index.mdx | 33 + .../prefabs/receptionist-options/index.mdx | 43 + .../prefabs/prefabs/survey-agent/index.mdx | 33 + .../prefabs/prefabs/survey-options/index.mdx | 47 + .../prefabs/prefabs/survey-question/index.mdx | 57 + .../pkg/relay/relay/action/index.mdx | 165 + .../pkg/relay/relay/ai-action/index.mdx | 55 + .../pkg/relay/relay/ai-event/index.mdx | 39 + .../relay/relay/call-receive-event/index.mdx | 51 + .../relay/relay/call-state-event/index.mdx | 47 + .../pkg/relay/relay/call/index.mdx | 1819 ++++++++ .../relay/relay/calling-error-event/index.mdx | 39 + .../pkg/relay/relay/client/index.mdx | 613 +++ .../pkg/relay/relay/collect-action/index.mdx | 103 + .../pkg/relay/relay/collect-event/index.mdx | 43 + .../pkg/relay/relay/collect-params/index.mdx | 67 + .../relay/relay/conference-event/index.mdx | 43 + .../pkg/relay/relay/connect-event/index.mdx | 37 + .../pkg/relay/relay/denoise-event/index.mdx | 41 + .../pkg/relay/relay/detect-action/index.mdx | 55 + .../pkg/relay/relay/detect-event/index.mdx | 37 + .../pkg/relay/relay/device/index.mdx | 85 + .../pkg/relay/relay/dial-event/index.mdx | 69 + .../pkg/relay/relay/echo-event/index.mdx | 37 + .../pkg/relay/relay/fax-action/index.mdx | 55 + .../pkg/relay/relay/fax-event/index.mdx | 37 + .../pkg/relay/relay/hold-event/index.mdx | 37 + .../signalwire-go/pkg/relay/relay/index.mdx | 4073 +++++++++++++++++ .../relay/message-receive-event/index.mdx | 55 + .../relay/relay/message-state-event/index.mdx | 67 + .../pkg/relay/relay/message/index.mdx | 385 ++ .../pkg/relay/relay/pay-action/index.mdx | 55 + .../pkg/relay/relay/pay-event/index.mdx | 39 + .../pkg/relay/relay/play-action/index.mdx | 125 + .../pkg/relay/relay/play-event/index.mdx | 37 + .../pkg/relay/relay/queue-event/index.mdx | 51 + .../pkg/relay/relay/record-action/index.mdx | 103 + .../pkg/relay/relay/record-event/index.mdx | 49 + .../pkg/relay/relay/refer-event/index.mdx | 43 + .../pkg/relay/relay/relay-error/index.mdx | 83 + .../pkg/relay/relay/relay-event/index.mdx | 225 + .../relay/relay/send-digits-event/index.mdx | 37 + .../relay/standalone-collect-action/index.mdx | 77 + .../pkg/relay/relay/stream-action/index.mdx | 55 + .../pkg/relay/relay/stream-event/index.mdx | 45 + .../pkg/relay/relay/tap-action/index.mdx | 55 + .../pkg/relay/relay/tap-event/index.mdx | 43 + .../relay/relay/transcribe-action/index.mdx | 55 + .../relay/relay/transcribe-event/index.mdx | 55 + .../namespaces/addresses-namespace/index.mdx | 137 + .../index.mdx | 63 + .../namespaces/call-flow-options/index.mdx | 39 + .../namespaces/call-flows-resource/index.mdx | 117 + .../namespaces/calling-namespace/index.mdx | 1065 +++++ .../namespaces/chat-namespace/index.mdx | 59 + .../namespaces/compat-accounts/index.mdx | 139 + .../namespaces/compat-applications/index.mdx | 61 + .../namespaces/compat-calls/index.mdx | 177 + .../namespaces/compat-conferences/index.mdx | 399 ++ .../namespaces/compat-faxes/index.mdx | 145 + .../namespaces/compat-laml-bins/index.mdx | 61 + .../namespaces/compat-messages/index.mdx | 145 + .../namespaces/compat-namespace/index.mdx | 55 + .../namespaces/compat-phone-numbers/index.mdx | 273 ++ .../namespaces/compat-queues/index.mdx | 147 + .../namespaces/compat-recordings/index.mdx | 111 + .../namespaces/compat-tokens/index.mdx | 113 + .../compat-transcriptions/index.mdx | 111 + .../namespaces/conference-logs/index.mdx | 59 + .../conference-rooms-resource/index.mdx | 61 + .../namespaces/crud-resource/index.mdx | 169 + .../namespaces/crud-with-addresses/index.mdx | 61 + .../cxml-applications-resource/index.mdx | 89 + .../namespaces/cxml-webhook-options/index.mdx | 43 + .../namespaces/datasphere-documents/index.mdx | 143 + .../namespaces/datasphere-namespace/index.mdx | 33 + .../namespaces/fabric-addresses/index.mdx | 85 + .../namespaces/fabric-namespace/index.mdx | 69 + .../namespaces/fabric-tokens/index.mdx | 163 + .../namespaces/namespaces/fax-logs/index.mdx | 85 + .../namespaces/generic-resources/index.mdx | 199 + .../imported-numbers-namespace/index.mdx | 59 + .../pkg/rest/namespaces/namespaces/index.mdx | 1467 ++++++ .../namespaces/logs-namespace/index.mdx | 39 + .../namespaces/lookup-namespace/index.mdx | 61 + .../namespaces/message-logs/index.mdx | 85 + .../namespaces/mfa-namespace/index.mdx | 113 + .../number-groups-namespace/index.mdx | 141 + .../phone-numbers-namespace/index.mdx | 277 ++ .../namespaces/project-namespace/index.mdx | 33 + .../namespaces/project-tokens/index.mdx | 113 + .../namespaces/pub-sub-namespace/index.mdx | 59 + .../namespaces/queues-namespace/index.mdx | 115 + .../namespaces/recordings-namespace/index.mdx | 111 + .../namespaces/registry-brands/index.mdx | 167 + .../namespaces/registry-campaigns/index.mdx | 171 + .../namespaces/registry-namespace/index.mdx | 39 + .../namespaces/registry-numbers/index.mdx | 59 + .../namespaces/registry-orders/index.mdx | 59 + .../namespaces/relay-topic-options/index.mdx | 39 + .../namespaces/namespaces/resource/index.mdx | 61 + .../short-codes-namespace/index.mdx | 113 + .../sip-profile-namespace/index.mdx | 81 + .../namespaces/subscribers-resource/index.mdx | 175 + .../verified-callers-namespace/index.mdx | 87 + .../video-conference-tokens/index.mdx | 85 + .../namespaces/video-conferences/index.mdx | 117 + .../namespaces/video-namespace/index.mdx | 45 + .../video-room-recordings/index.mdx | 139 + .../namespaces/video-room-sessions/index.mdx | 169 + .../namespaces/video-room-tokens/index.mdx | 59 + .../namespaces/video-rooms/index.mdx | 89 + .../namespaces/video-streams/index.mdx | 113 + .../namespaces/voice-logs/index.mdx | 113 + .../pkg/rest/rest/crud-resource/index.mdx | 171 + .../pkg/rest/rest/http-client/index.mdx | 213 + .../signalwire-go/pkg/rest/rest/index.mdx | 265 ++ .../rest/rest/paginated-iterator/index.mdx | 77 + .../pkg/rest/rest/rest-client/index.mdx | 174 + .../rest/signal-wire-rest-error/index.mdx | 61 + .../pkg/security/security/index.mdx | 367 ++ .../security/session-manager/index.mdx | 139 + .../security/security/webhook-opts/index.mdx | 43 + .../pkg/server/server/agent-entry/index.mdx | 35 + .../pkg/server/server/agent-server/index.mdx | 342 ++ .../signalwire-go/pkg/server/server/index.mdx | 238 + .../builtin/api-ninjas-trivia-skill/index.mdx | 193 + .../builtin/claude-skills-skill/index.mdx | 211 + .../builtin/custom-skills-skill/index.mdx | 153 + .../data-sphere-serverless-skill/index.mdx | 197 + .../builtin/data-sphere-skill/index.mdx | 193 + .../builtin/builtin/date-time-skill/index.mdx | 113 + .../builtin/google-maps-skill/index.mdx | 153 + .../pkg/skills/builtin/builtin/index.mdx | 590 +++ .../builtin/info-gatherer-skill/index.mdx | 173 + .../builtin/builtin/joke-skill/index.mdx | 133 + .../builtin/builtin/math-skill/index.mdx | 93 + .../builtin/mcp-gateway-skill/index.mdx | 155 + .../native-vector-search-skill/index.mdx | 193 + .../play-background-file-skill/index.mdx | 133 + .../builtin/builtin/spider-skill/index.mdx | 173 + .../builtin/swml-transfer-skill/index.mdx | 173 + .../builtin/weather-api-skill/index.mdx | 153 + .../builtin/web-search-skill/index.mdx | 197 + .../builtin/wikipedia-search-skill/index.mdx | 113 + .../pkg/skills/skills/base-skill/index.mdx | 519 +++ .../signalwire-go/pkg/skills/skills/index.mdx | 591 +++ .../pkg/skills/skills/skill-manager/index.mdx | 160 + .../skills/skills/skill-registry/index.mdx | 77 + .../skills/skills/tool-registration/index.mdx | 45 + .../pkg/swaig/swaig/function-result/index.mdx | 1451 ++++++ .../signalwire-go/pkg/swaig/swaig/index.mdx | 853 ++++ .../swaig/join-conference-options/index.mdx | 99 + .../pkg/swaig/swaig/params/index.mdx | 369 ++ .../pkg/swaig/swaig/pay-options/index.mdx | 107 + .../pkg/swaig/swaig/prop/index.mdx | 29 + .../swaig/swaig/record-call-options/index.mdx | 71 + .../pkg/swml/swml/ai-verb-handler/index.mdx | 132 + .../pkg/swml/swml/document/index.mdx | 277 ++ .../signalwire-go/pkg/swml/swml/index.mdx | 999 ++++ .../pkg/swml/swml/schema-utils/index.mdx | 289 ++ .../swml/schema-validation-error/index.mdx | 57 + .../pkg/swml/swml/schema/index.mdx | 125 + .../pkg/swml/swml/security-config/index.mdx | 52 + .../pkg/swml/swml/service/index.mdx | 2010 ++++++++ .../pkg/swml/swml/tool-definition/index.mdx | 41 + .../pkg/swml/swml/validation-result/index.mdx | 37 + .../pkg/swml/swml/verb-info/index.mdx | 43 + .../signalwire-go/pkg/util/util/index.mdx | 119 + fern/products/sdk-reference/go/index.mdx | 31 + fern/products/sdk-reference/java/_meta.json | 10 + .../agent/agent/agent-base/builder/index.mdx | 466 ++ .../sdk/agent/agent/agent-base/index.mdx | 2993 ++++++++++++ .../com/signalwire/sdk/agent/agent/index.mdx | 27 + .../java/com/signalwire/sdk/cli/cli/index.mdx | 27 + .../sdk/cli/cli/swaig-test/index.mdx | 136 + .../sdk/cli/simulation/simulation/index.mdx | 27 + .../simulation/serverless-simulator/index.mdx | 356 ++ .../contexts/context-builder/index.mdx | 257 ++ .../sdk/contexts/contexts/context/index.mdx | 650 +++ .../contexts/contexts/gather-info/index.mdx | 191 + .../contexts/gather-question/index.mdx | 123 + .../sdk/contexts/contexts/index.mdx | 43 + .../sdk/contexts/contexts/step/index.mdx | 629 +++ .../signalwire/sdk/datamap/datamap/index.mdx | 570 +++ .../signalwire/sdk/logging/logging/index.mdx | 27 + .../sdk/logging/logging/logger/index.mdx | 421 ++ .../java/com/signalwire/sdk/pom/pom/index.mdx | 31 + .../sdk/pom/pom/prompt-object-model/index.mdx | 536 +++ .../signalwire/sdk/pom/pom/section/index.mdx | 532 +++ .../prefabs/prefabs/concierge-agent/index.mdx | 186 + .../prefabs/prefabs/faq-bot-agent/index.mdx | 171 + .../signalwire/sdk/prefabs/prefabs/index.mdx | 43 + .../prefabs/info-gatherer-agent/index.mdx | 197 + .../prefabs/receptionist-agent/index.mdx | 213 + .../prefabs/prefabs/survey-agent/index.mdx | 258 ++ .../relay/relay/action/ai-action/index.mdx | 102 + .../relay/action/collect-action/index.mdx | 92 + .../relay/action/detect-action/index.mdx | 76 + .../sdk/relay/relay/action/index.mdx | 392 ++ .../relay/relay/action/pay-action/index.mdx | 76 + .../relay/relay/action/play-action/index.mdx | 128 + .../action/play-and-collect-action/index.mdx | 101 + .../relay/action/receive-fax-action/index.mdx | 76 + .../relay/action/record-action/index.mdx | 128 + .../relay/action/send-fax-action/index.mdx | 76 + .../relay/action/stream-action/index.mdx | 102 + .../relay/relay/action/tap-action/index.mdx | 102 + .../relay/action/transcribe-action/index.mdx | 102 + .../signalwire/sdk/relay/relay/call/index.mdx | 2561 +++++++++++ .../sdk/relay/relay/constants/index.mdx | 424 ++ .../sdk/relay/relay/device/index.mdx | 358 ++ .../com/signalwire/sdk/relay/relay/index.mdx | 704 +++ .../sdk/relay/relay/message/index.mdx | 699 +++ .../relay/relay-client/builder/index.mdx | 208 + .../sdk/relay/relay/relay-client/index.mdx | 694 +++ .../sdk/relay/relay/relay-error/index.mdx | 73 + .../authorization-state-event/index.mdx | 80 + .../relay-event/call-collect-event/index.mdx | 140 + .../relay-event/call-connect-event/index.mdx | 100 + .../relay-event/call-detect-event/index.mdx | 142 + .../relay-event/call-dial-event/index.mdx | 194 + .../relay-event/call-fax-event/index.mdx | 120 + .../relay-event/call-pay-event/index.mdx | 120 + .../relay-event/call-play-event/index.mdx | 120 + .../relay-event/call-receive-event/index.mdx | 160 + .../relay-event/call-record-event/index.mdx | 180 + .../relay-event/call-refer-event/index.mdx | 100 + .../call-send-digits-event/index.mdx | 100 + .../relay-event/call-state-event/index.mdx | 200 + .../relay-event/call-stream-event/index.mdx | 120 + .../relay-event/call-tap-event/index.mdx | 120 + .../call-transcribe-event/index.mdx | 120 + .../relay-event/conference-event/index.mdx | 100 + .../sdk/relay/relay/relay-event/index.mdx | 305 ++ .../messaging-receive-event/index.mdx | 260 ++ .../messaging-state-event/index.mdx | 280 ++ .../relay/relay-event/queue-event/index.mdx | 100 + .../namespaces/addresses-namespace/index.mdx | 184 + .../namespaces/billing-namespace/index.mdx | 90 + .../namespaces/calling-namespace/index.mdx | 1050 +++++ .../namespaces/campaign-namespace/index.mdx | 130 + .../namespaces/chat-namespace/index.mdx | 110 + .../compat-accounts/index.mdx | 191 + .../compat-applications/index.mdx | 88 + .../compat-namespace/compat-calls/index.mdx | 203 + .../compat-conferences/index.mdx | 495 ++ .../compat-namespace/compat-faxes/index.mdx | 183 + .../compat-laml-bins/index.mdx | 88 + .../compat-messages/index.mdx | 183 + .../compat-phone-numbers/index.mdx | 366 ++ .../compat-namespace/compat-queues/index.mdx | 191 + .../compat-recordings/index.mdx | 160 + .../compat-namespace/compat-tokens/index.mdx | 151 + .../compat-transcriptions/index.mdx | 160 + .../namespaces/compat-namespace/index.mdx | 411 ++ .../namespaces/compliance-namespace/index.mdx | 90 + .../namespaces/conference-namespace/index.mdx | 90 + .../datasphere-documents/index.mdx | 181 + .../namespaces/datasphere-namespace/index.mdx | 109 + .../call-flows-resource/index.mdx | 211 + .../conference-rooms-resource/index.mdx | 133 + .../cxml-applications-resource/index.mdx | 113 + .../fabric-addresses/index.mdx | 136 + .../fabric-subscribers/index.mdx | 298 ++ .../fabric-namespace/fabric-tokens/index.mdx | 172 + .../generic-resources/index.mdx | 237 + .../namespaces/fabric-namespace/index.mdx | 411 ++ .../namespaces/fax-namespace/index.mdx | 70 + .../imported-numbers-namespace/index.mdx | 97 + .../sdk/rest/namespaces/namespaces/index.mdx | 143 + .../logs-namespace/conference-logs/index.mdx | 112 + .../logs-namespace/fax-logs/index.mdx | 136 + .../namespaces/logs-namespace/index.mdx | 154 + .../logs-namespace/message-logs/index.mdx | 136 + .../logs-namespace/voice-logs/index.mdx | 183 + .../namespaces/messaging-namespace/index.mdx | 96 + .../namespaces/mfa-namespace/index.mdx | 147 + .../number-groups-namespace/index.mdx | 333 ++ .../number-lookup-namespace/index.mdx | 76 + .../phone-numbers-namespace/index.mdx | 614 +++ .../namespaces/project-namespace/index.mdx | 178 + .../project-tokens/index.mdx | 149 + .../namespaces/pub-sub-namespace/index.mdx | 98 + .../namespaces/queue-namespace/index.mdx | 340 ++ .../namespaces/recording-namespace/index.mdx | 191 + .../namespaces/registry-namespace/index.mdx | 153 + .../registry-brands/index.mdx | 237 + .../registry-campaigns/index.mdx | 248 + .../registry-numbers/index.mdx | 98 + .../registry-orders/index.mdx | 98 + .../short-codes-namespace/index.mdx | 162 + .../namespaces/sip-namespace/index.mdx | 90 + .../sip-profile-namespace/index.mdx | 117 + .../namespaces/stream-namespace/index.mdx | 70 + .../namespaces/swml-namespace/index.mdx | 70 + .../transcription-namespace/index.mdx | 70 + .../namespaces/video-namespace/index.mdx | 251 + .../video-conference-tokens/index.mdx | 122 + .../video-conferences/index.mdx | 211 + .../video-room-recordings/index.mdx | 208 + .../video-room-sessions/index.mdx | 278 ++ .../video-namespace/video-rooms/index.mdx | 161 + .../video-namespace/video-streams/index.mdx | 148 + .../sdk/rest/rest/crud-resource/index.mdx | 259 ++ .../sdk/rest/rest/http-client/index.mdx | 317 ++ .../com/signalwire/sdk/rest/rest/index.mdx | 210 + .../rest/rest/paginated-iterator/index.mdx | 176 + .../rest/rest/rest-client/builder/index.mdx | 136 + .../sdk/rest/rest/rest-client/index.mdx | 781 ++++ .../sdk/rest/rest/rest-error/index.mdx | 259 ++ .../sdk/runtime/lambda/lambda/index.mdx | 31 + .../lambda/lambda-agent-handler/index.mdx | 150 + .../lambda/lambda/lambda-response/index.mdx | 241 + .../signalwire/sdk/runtime/runtime/index.mdx | 351 ++ .../runtime/lambda-url-resolver/index.mdx | 117 + .../java/com/signalwire/sdk/sdk/index.mdx | 27 + .../signalwire/sdk/sdk/signalwire/index.mdx | 209 + .../sdk/security/security/index.mdx | 35 + .../security/session-manager/index.mdx | 141 + .../index.mdx | 152 + .../security/webhook-filter/index.mdx | 196 + .../security/webhook-validator/index.mdx | 181 + .../sdk/server/server/agent-server/index.mdx | 459 ++ .../signalwire/sdk/server/server/index.mdx | 27 + .../builtin/api-ninja-trivia-skill/index.mdx | 182 + .../builtin/claude-skills-skill/index.mdx | 207 + .../builtin/custom-skills-skill/index.mdx | 162 + .../datasphere-serverless-skill/index.mdx | 226 + .../builtin/datasphere-skill/index.mdx | 204 + .../builtin/builtin/datetime-skill/index.mdx | 182 + .../builtin/google-maps-skill/index.mdx | 182 + .../sdk/skills/builtin/builtin/index.mdx | 67 + .../builtin/info-gatherer-skill/index.mdx | 204 + .../builtin/builtin/joke-skill/index.mdx | 204 + .../builtin/builtin/math-skill/index.mdx | 182 + .../builtin/mcp-gateway-skill/index.mdx | 206 + .../native-vector-search-skill/index.mdx | 185 + .../play-background-file-skill/index.mdx | 182 + .../builtin/builtin/spider-skill/index.mdx | 182 + .../builtin/swml-transfer-skill/index.mdx | 226 + .../builtin/weather-api-skill/index.mdx | 160 + .../builtin/web-search-skill/index.mdx | 254 + .../builtin/wikipedia-search-skill/index.mdx | 160 + .../signalwire/sdk/skills/skills/index.mdx | 574 +++ .../sdk/skills/skills/skill-manager/index.mdx | 173 + .../skills/skills/skill-registry/index.mdx | 288 ++ .../sdk/swaig/swaig/function-result/index.mdx | 2454 ++++++++++ .../com/signalwire/sdk/swaig/swaig/index.mdx | 86 + .../swaig/parameter-schema/builder/index.mdx | 547 +++ .../swaig/swaig/parameter-schema/index.mdx | 113 + .../sdk/swaig/swaig/tool-definition/index.mdx | 282 ++ .../sdk/swml/swml/document/index.mdx | 290 ++ .../com/signalwire/sdk/swml/swml/index.mdx | 696 +++ .../sdk/swml/swml/schema-utils/index.mdx | 357 ++ .../swml/schema-utils/verb-info/index.mdx | 40 + .../swml/schema-validation-error/index.mdx | 108 + .../signalwire/sdk/swml/swml/schema/index.mdx | 159 + .../sdk/swml/swml/service/index.mdx | 2073 +++++++++ .../com/signalwire/sdk/tools/tools/index.mdx | 19 + .../com/signalwire/sdk/utils/utils/index.mdx | 27 + .../sdk/utils/utils/url-validator/index.mdx | 80 + fern/products/sdk-reference/java/index.mdx | 34 + fern/products/sdk-reference/perl/_meta.json | 10 + fern/products/sdk-reference/perl/index.mdx | 15 + .../agent/agent-base/agent-base/index.mdx | 1342 ++++++ .../logging-config/logging-config/index.mdx | 62 + .../prompt-object-model/index.mdx | 248 + .../signal-wire/pom/section/section/index.mdx | 170 + .../prefabs/concierge/concierge/index.mdx | 50 + .../prefabs/faq-bot/faq-bot/index.mdx | 50 + .../info-gatherer/info-gatherer/index.mdx | 50 + .../receptionist/receptionist/index.mdx | 50 + .../prefabs/survey/survey/index.mdx | 50 + .../signal-wire/relay/action/action/index.mdx | 356 ++ .../relay/call-state/call-state/index.mdx | 167 + .../signal-wire/relay/call/call/index.mdx | 931 ++++ .../signal-wire/relay/client/client/index.mdx | 358 ++ .../relay/constants/constants/index.mdx | 76 + .../signal-wire/relay/device/device/index.mdx | 105 + .../relay/dial-state/dial-state/index.mdx | 161 + .../signal-wire/relay/event/event/index.mdx | 86 + .../message-state/message-state/index.mdx | 170 + .../relay/message/message/index.mdx | 212 + .../rest/http-client/http-client/index.mdx | 134 + .../rest/namespaces/base/base/index.mdx | 132 + .../rest/namespaces/calling/calling/index.mdx | 952 ++++ .../rest/namespaces/chat/chat/index.mdx | 50 + .../rest/namespaces/compat/compat/index.mdx | 1272 +++++ .../datasphere/datasphere/index.mdx | 116 + .../rest/namespaces/fabric/fabric/index.mdx | 578 +++ .../rest/namespaces/logs/logs/index.mdx | 192 + .../phone-numbers/phone-numbers/index.mdx | 236 + .../rest/namespaces/project/project/index.mdx | 112 + .../rest/namespaces/pub-sub/pub-sub/index.mdx | 50 + .../namespaces/registry/registry/index.mdx | 302 ++ .../namespaces/resources/resources/index.mdx | 582 +++ .../rest/namespaces/video/video/index.mdx | 490 ++ .../rest/pagination/pagination/index.mdx | 78 + .../phone-call-handler/index.mdx | 66 + .../rest/rest-client/rest-client/index.mdx | 26 + .../session-manager/session-manager/index.mdx | 242 + .../webhook-middleware/index.mdx | 67 + .../webhook-validator/index.mdx | 124 + .../agent-server/agent-server/index.mdx | 162 + .../contexts/context-builder/index.mdx | 27 + .../signal-wire/contexts/index.mdx | 1057 +++++ .../signal-wire/data-map/index.mdx | 319 ++ .../perl/signal-wire/signal-wire/index.mdx | 285 ++ .../signal-wire/signal-wire/logging/index.mdx | 121 + .../signal-wire/logging/log-level/index.mdx | 157 + .../signal-wire/signal-wire/utils/index.mdx | 49 + .../signal-wire/utils/url-validator/index.mdx | 49 + .../api-ninjas-trivia/index.mdx | 78 + .../claude-skills/claude-skills/index.mdx | 94 + .../custom-skills/custom-skills/index.mdx | 78 + .../datasphere-serverless/index.mdx | 110 + .../builtin/datasphere/datasphere/index.mdx | 130 + .../builtin/datetime/datetime/index.mdx | 78 + .../builtin/google-maps/google-maps/index.mdx | 94 + .../info-gatherer/info-gatherer/index.mdx | 94 + .../skills/builtin/joke/joke/index.mdx | 94 + .../skills/builtin/math/math/index.mdx | 78 + .../builtin/mcp-gateway/mcp-gateway/index.mdx | 110 + .../native-vector-search/index.mdx | 94 + .../play-background-file/index.mdx | 78 + .../skills/builtin/spider/spider/index.mdx | 114 + .../swml-transfer/swml-transfer/index.mdx | 94 + .../builtin/weather-api/weather-api/index.mdx | 78 + .../builtin/web-search/web-search/index.mdx | 114 + .../wikipedia-search/index.mdx | 98 + .../skills/skill-base/skill-base/index.mdx | 254 + .../skill-manager/skill-manager/index.mdx | 106 + .../skills/skill-name/skill-name/index.mdx | 151 + .../skill-registry/skill-registry/index.mdx | 146 + .../function-result/function-result/index.mdx | 895 ++++ .../join-conference/join-conference/index.mdx | 279 ++ .../parameter-schema/index.mdx | 288 ++ .../swaig/record-call/record-call/index.mdx | 192 + .../perl/signal-wire/swaig/tap/tap/index.mdx | 190 + .../swml/document/document/index.mdx | 200 + .../signal-wire/swml/schema/schema/index.mdx | 134 + .../swml/service/service/index.mdx | 474 ++ fern/products/sdk-reference/php/_meta.json | 10 + fern/products/sdk-reference/php/index.mdx | 27 + .../contexts/context-builder/index.mdx | 287 ++ .../contexts/contexts/context/index.mdx | 809 ++++ .../contexts/contexts/gather-info/index.mdx | 161 + .../contexts/gather-question/index.mdx | 116 + .../signal-wire/contexts/contexts/index.mdx | 35 + .../contexts/contexts/step/index.mdx | 668 +++ .../signal-wire/data-map/data-map/index.mdx | 600 +++ .../php/signal-wire/logging/logging/index.mdx | 147 + .../logging/logging/logger/index.mdx | 281 ++ .../logging/logging/logging-config/index.mdx | 97 + .../php/signal-wire/pom/pom/index.mdx | 31 + .../pom/pom/prompt-object-model/index.mdx | 331 ++ .../php/signal-wire/pom/pom/section/index.mdx | 261 ++ .../signal-wire/relay/relay/action/index.mdx | 409 ++ .../relay/relay/ai-action/index.mdx | 404 ++ .../signal-wire/relay/relay/call/index.mdx | 1813 ++++++++ .../signal-wire/relay/relay/client/index.mdx | 607 +++ .../relay/relay/collect-action/index.mdx | 472 ++ .../relay/relay/constants/index.mdx | 140 + .../relay/relay/detect-action/index.mdx | 424 ++ .../signal-wire/relay/relay/device/index.mdx | 211 + .../signal-wire/relay/relay/event/index.mdx | 307 ++ .../relay/relay/fax-action/index.mdx | 429 ++ .../php/signal-wire/relay/relay/index.mdx | 787 ++++ .../signal-wire/relay/relay/message/index.mdx | 499 ++ .../relay/relay/pay-action/index.mdx | 404 ++ .../relay/relay/play-action/index.mdx | 460 ++ .../relay/relay/record-action/index.mdx | 508 ++ .../relay/relay/relay-error/index.mdx | 43 + .../relay/relay/stream-action/index.mdx | 404 ++ .../relay/relay/tap-action/index.mdx | 404 ++ .../relay/relay/transcribe-action/index.mdx | 404 ++ .../relay/relay/web-socket/index.mdx | 240 + .../namespaces/namespaces/addresses/index.mdx | 175 + .../namespaces/namespaces/calling/index.mdx | 1303 ++++++ .../namespaces/compat-accounts/index.mdx | 176 + .../namespaces/compat-conferences/index.mdx | 460 ++ .../namespaces/compat-phone-numbers/index.mdx | 376 ++ .../namespaces/compat-recordings/index.mdx | 154 + .../namespaces/compat-tokens/index.mdx | 151 + .../compat-transcriptions/index.mdx | 153 + .../namespaces/namespaces/compat/index.mdx | 357 ++ .../namespaces/conference-logs/index.mdx | 103 + .../namespaces/datasphere/index.mdx | 89 + .../namespaces/fabric-addresses/index.mdx | 127 + .../fabric-generic-resources/index.mdx | 217 + .../namespaces/fabric-tokens/index.mdx | 210 + .../namespaces/namespaces/fabric/index.mdx | 535 +++ .../namespaces/namespaces/fax-logs/index.mdx | 127 + .../namespaces/imported-numbers/index.mdx | 97 + .../rest/namespaces/namespaces/index.mdx | 171 + .../rest/namespaces/namespaces/logs/index.mdx | 153 + .../namespaces/message-logs/index.mdx | 127 + .../rest/namespaces/namespaces/mfa/index.mdx | 149 + .../namespaces/project-tokens/index.mdx | 147 + .../namespaces/namespaces/project/index.mdx | 89 + .../namespaces/recordings/index.mdx | 149 + .../namespaces/registry-brands/index.mdx | 215 + .../namespaces/registry-campaigns/index.mdx | 221 + .../namespaces/registry-numbers/index.mdx | 95 + .../namespaces/registry-orders/index.mdx | 95 + .../namespaces/namespaces/registry/index.mdx | 152 + .../namespaces/short-codes/index.mdx | 153 + .../namespaces/sip-profile/index.mdx | 115 + .../video-conference-tokens/index.mdx | 119 + .../video-room-recordings/index.mdx | 187 + .../namespaces/video-room-sessions/index.mdx | 231 + .../namespaces/video-room-tokens/index.mdx | 97 + .../namespaces/video-streams/index.mdx | 147 + .../namespaces/namespaces/video/index.mdx | 213 + .../namespaces/voice-logs/index.mdx | 161 + .../rest/rest/base-resource/index.mdx | 97 + .../rest/rest/crud-resource/index.mdx | 262 ++ .../rest/rest/crud-with-addresses/index.mdx | 298 ++ .../rest/rest/http-client/index.mdx | 344 ++ .../php/signal-wire/rest/rest/index.mdx | 51 + .../rest/rest/paginated-iterator/index.mdx | 307 ++ .../rest/rest/rest-client/index.mdx | 637 +++ .../rest/signal-wire-rest-error/index.mdx | 123 + .../signal-wire/security/security/index.mdx | 33 + .../security/session-manager/index.mdx | 249 + .../security/webhook-middleware/index.mdx | 130 + .../security/webhook-validator/index.mdx | 154 + .../server/server/agent-server/index.mdx | 477 ++ .../php/signal-wire/server/server/index.mdx | 25 + .../serverless/serverless/adapter/index.mdx | 259 ++ .../serverless/serverless/index.mdx | 247 + .../php/signal-wire/signal-wire/index.mdx | 207 + .../builtin/api-ninjas-trivia/index.mdx | 331 ++ .../builtin/builtin/claude-skills/index.mdx | 365 ++ .../builtin/builtin/custom-skills/index.mdx | 331 ++ .../builtin/datasphere-serverless/index.mdx | 331 ++ .../builtin/builtin/datasphere/index.mdx | 346 ++ .../skills/builtin/builtin/datetime/index.mdx | 331 ++ .../builtin/builtin/google-maps/index.mdx | 331 ++ .../skills/builtin/builtin/index.mdx | 73 + .../builtin/builtin/info-gatherer/index.mdx | 331 ++ .../skills/builtin/builtin/joke/index.mdx | 331 ++ .../skills/builtin/builtin/math/index.mdx | 331 ++ .../builtin/builtin/mcp-gateway/index.mdx | 351 ++ .../builtin/native-vector-search/index.mdx | 347 ++ .../builtin/play-background-file/index.mdx | 331 ++ .../skills/builtin/builtin/spider/index.mdx | 346 ++ .../builtin/builtin/swml-transfer/index.mdx | 331 ++ .../builtin/builtin/weather-api/index.mdx | 331 ++ .../builtin/builtin/web-search/index.mdx | 368 ++ .../builtin/wikipedia-search/index.mdx | 343 ++ .../skills/skills/http-helper/index.mdx | 232 + .../php/signal-wire/skills/skills/index.mdx | 205 + .../skills/skills/skill-base/index.mdx | 337 ++ .../skills/skills/skill-manager/index.mdx | 177 + .../skills/skills/skill-registry/index.mdx | 220 + .../swaig/swaig/function-result/index.mdx | 1674 +++++++ .../php/signal-wire/swaig/swaig/index.mdx | 512 +++ .../swaig/swaig/parameter-schema/index.mdx | 535 +++ .../signal-wire/swml/swml/document/index.mdx | 323 ++ .../php/signal-wire/swml/swml/index.mdx | 29 + .../signal-wire/swml/swml/schema/index.mdx | 165 + .../signal-wire/swml/swml/service/index.mdx | 958 ++++ .../php/signal-wire/utils/utils/index.mdx | 35 + .../utils/utils/schema-utils/index.mdx | 345 ++ .../utils/schema-validation-error/index.mdx | 109 + .../utils/utils/url-validator/index.mdx | 100 + fern/products/sdk-reference/python/_meta.json | 10 + fern/products/sdk-reference/python/index.mdx | 14 + .../agent-server/add-security-headers.mdx | 37 + .../agent-server/agent-server/index.mdx | 403 ++ .../python/signalwire/agent-server/index.mdx | 40 + .../signalwire/cli/build-search/index.mdx | 140 + .../python/signalwire/cli/config/index.mdx | 80 + .../cli/core/agent-loader/index.mdx | 186 + .../custom-argument-parser/index.mdx | 123 + .../cli/core/argparse-helpers/index.mdx | 75 + .../cli/core/dynamic-config/index.mdx | 72 + .../python/signalwire/cli/core/index.mdx | 52 + .../cli/core/service-loader/index.mdx | 218 + .../service-loader/service-capture/index.mdx | 83 + .../signalwire/cli/dokku/colors/index.mdx | 47 + .../dokku/dokku-project-generator/index.mdx | 85 + .../python/signalwire/cli/dokku/index.mdx | 390 ++ .../cli/execution/datamap-exec/index.mdx | 111 + .../python/signalwire/cli/execution/index.mdx | 44 + .../cli/execution/webhook-exec/index.mdx | 83 + .../python/signalwire/cli/index.mdx | 84 + .../cli/init-project/colors/index.mdx | 45 + .../signalwire/cli/init-project/index.mdx | 558 +++ .../init-project/project-generator/index.mdx | 87 + .../python/signalwire/cli/output/index.mdx | 44 + .../cli/output/output-formatter/index.mdx | 92 + .../signalwire/cli/output/swml-dump/index.mdx | 86 + .../cli/simulation/data-generation/index.mdx | 275 ++ .../cli/simulation/data-overrides/index.mdx | 171 + .../signalwire/cli/simulation/index.mdx | 48 + .../cli/simulation/mock-env/index.mdx | 122 + .../mock-env/mock-headers/index.mdx | 171 + .../mock-env/mock-query-params/index.mdx | 171 + .../mock-env/mock-request/index.mdx | 141 + .../simulation/mock-env/mock-url/index.mdx | 75 + .../mock-env/serverless-simulator/index.mdx | 155 + .../cli/swaig-test-wrapper/index.mdx | 50 + .../signalwire/cli/test-swaig/index.mdx | 104 + .../signalwire/cli/types/agent-info/index.mdx | 43 + .../signalwire/cli/types/call-data/index.mdx | 65 + .../cli/types/data-map-config/index.mdx | 43 + .../cli/types/function-info/index.mdx | 45 + .../python/signalwire/cli/types/index.mdx | 60 + .../signalwire/cli/types/post-data/index.mdx | 57 + .../signalwire/cli/types/vars-data/index.mdx | 41 + .../core/agent-base/agent-base/index.mdx | 779 ++++ .../signalwire/core/agent-base/index.mdx | 44 + .../signalwire/core/agent/config/index.mdx | 36 + .../core/agent/deployment/handlers/index.mdx | 32 + .../core/agent/deployment/index.mdx | 40 + .../python/signalwire/core/agent/index.mdx | 68 + .../signalwire/core/agent/prompt/index.mdx | 44 + .../core/agent/prompt/manager/index.mdx | 44 + .../prompt/manager/prompt-manager/index.mdx | 434 ++ .../signalwire/core/agent/routing/index.mdx | 32 + .../signalwire/core/agent/security/index.mdx | 32 + .../signalwire/core/agent/swml/index.mdx | 32 + .../core/agent/tools/decorator/index.mdx | 44 + .../tools/decorator/tool-decorator/index.mdx | 85 + .../signalwire/core/agent/tools/index.mdx | 52 + .../core/agent/tools/registry/index.mdx | 44 + .../tools/registry/tool-registry/index.mdx | 309 ++ .../core/agent/tools/type-inference/index.mdx | 99 + .../core/auth-handler/auth-handler/index.mdx | 220 + .../signalwire/core/auth-handler/index.mdx | 44 + .../config-loader/config-loader/index.mdx | 293 ++ .../signalwire/core/config-loader/index.mdx | 44 + .../core/contexts/context-builder/index.mdx | 240 + .../core/contexts/context/index.mdx | 816 ++++ .../core/contexts/gather-info/index.mdx | 117 + .../core/contexts/gather-question/index.mdx | 102 + .../python/signalwire/core/contexts/index.mdx | 92 + .../signalwire/core/contexts/step/index.mdx | 714 +++ .../core/data-map/data-map/index.mdx | 660 +++ .../python/signalwire/core/data-map/index.mdx | 145 + .../function-result/function-result/index.mdx | 2253 +++++++++ .../signalwire/core/function-result/index.mdx | 44 + .../python/signalwire/core/index.mdx | 116 + .../signalwire/core/logging-config/index.mdx | 154 + .../ai-config-mixin/ai-config-mixin/index.mdx | 963 ++++ .../core/mixins/ai-config-mixin/index.mdx | 40 + .../mixins/auth-mixin/auth-mixin/index.mdx | 93 + .../core/mixins/auth-mixin/index.mdx | 40 + .../python/signalwire/core/mixins/index.mdx | 76 + .../core/mixins/mcp-server-mixin/index.mdx | 44 + .../mcp-server-mixin/index.mdx | 29 + .../core/mixins/prompt-mixin/index.mdx | 40 + .../prompt-mixin/prompt-mixin/index.mdx | 414 ++ .../core/mixins/serverless-mixin/index.mdx | 44 + .../serverless-mixin/index.mdx | 65 + .../core/mixins/skill-mixin/index.mdx | 40 + .../mixins/skill-mixin/skill-mixin/index.mdx | 139 + .../core/mixins/state-mixin/index.mdx | 40 + .../mixins/state-mixin/state-mixin/index.mdx | 65 + .../core/mixins/tool-mixin/index.mdx | 40 + .../mixins/tool-mixin/tool-mixin/index.mdx | 309 ++ .../core/mixins/web-mixin/index.mdx | 44 + .../core/mixins/web-mixin/web-mixin/index.mdx | 405 ++ .../signalwire/core/pom-builder/index.mdx | 40 + .../core/pom-builder/pom-builder/index.mdx | 381 ++ .../signalwire/core/security-config/index.mdx | 46 + .../security-config/security-config/index.mdx | 310 ++ .../python/signalwire/core/security/index.mdx | 52 + .../core/security/session-manager/index.mdx | 40 + .../session-manager/session-manager/index.mdx | 370 ++ .../security/webhook-middleware/index.mdx | 140 + .../core/security/webhook-validator/index.mdx | 154 + .../signalwire/core/skill-base/index.mdx | 40 + .../core/skill-base/skill-base/index.mdx | 436 ++ .../signalwire/core/skill-manager/index.mdx | 40 + .../skill-manager/skill-manager/index.mdx | 203 + .../signalwire/core/swaig-function/index.mdx | 40 + .../swaig-function/swaig-function/index.mdx | 302 ++ .../signalwire/core/swml-builder/index.mdx | 44 + .../core/swml-builder/swml-builder/index.mdx | 414 ++ .../swml-handler/ai-verb-handler/index.mdx | 144 + .../signalwire/core/swml-handler/index.mdx | 48 + .../swml-handler/swml-verb-handler/index.mdx | 119 + .../verb-handler-registry/index.mdx | 134 + .../signalwire/core/swml-renderer/index.mdx | 40 + .../swml-renderer/swml-renderer/index.mdx | 182 + .../signalwire/core/swml-service/index.mdx | 48 + .../core/swml-service/swml-service/index.mdx | 639 +++ .../sdk-reference/python/signalwire/index.mdx | 245 + .../livewire/agent-handoff/index.mdx | 57 + .../livewire/agent-server/index.mdx | 90 + .../livewire/agent-session/index.mdx | 211 + .../signalwire/livewire/agent/index.mdx | 285 ++ .../livewire/chat-context/index.mdx | 71 + .../python/signalwire/livewire/index.mdx | 179 + .../livewire/inference-llm/index.mdx | 55 + .../livewire/inference-stt/index.mdx | 55 + .../livewire/inference-tts/index.mdx | 55 + .../signalwire/livewire/job-context/index.mdx | 96 + .../signalwire/livewire/job-process/index.mdx | 49 + .../livewire/plugins/cartesia-tts/index.mdx | 49 + .../livewire/plugins/deepgram-stt/index.mdx | 49 + .../plugins/eleven-labs-tts/index.mdx | 49 + .../signalwire/livewire/plugins/index.mdx | 56 + .../livewire/plugins/open-aillm/index.mdx | 53 + .../livewire/plugins/silero-vad/index.mdx | 70 + .../python/signalwire/livewire/room/index.mdx | 33 + .../signalwire/livewire/run-context/index.mdx | 63 + .../livewire/stop-response/index.mdx | 33 + .../signalwire/livewire/tool-error/index.mdx | 33 + .../mcp-gateway/gateway-service/index.mdx | 62 + .../gateway-service/mcp-gateway/index.mdx | 105 + .../mcp-gateway/set-security-headers.mdx | 33 + .../python/signalwire/mcp-gateway/index.mdx | 52 + .../mcp-gateway/mcp-manager/index.mdx | 52 + .../mcp-manager/mcp-client/index.mdx | 191 + .../mcp-manager/mcp-manager/index.mdx | 199 + .../mcp-manager/mcp-service/index.mdx | 113 + .../mcp-gateway/session-manager/index.mdx | 48 + .../session-manager/session-manager/index.mdx | 227 + .../session-manager/session/index.mdx | 117 + .../python/signalwire/pom/index.mdx | 46 + .../python/signalwire/pom/pom-tool/index.mdx | 123 + .../python/signalwire/pom/pom/index.mdx | 37 + .../pom/pom/prompt-object-model/index.mdx | 364 ++ .../signalwire/pom/pom/section/index.mdx | 277 ++ .../concierge/concierge-agent/index.mdx | 210 + .../signalwire/prefabs/concierge/index.mdx | 40 + .../prefabs/faq-bot/faq-bot-agent/index.mdx | 168 + .../signalwire/prefabs/faq-bot/index.mdx | 40 + .../python/signalwire/prefabs/index.mdx | 60 + .../prefabs/info-gatherer/index.mdx | 40 + .../info-gatherer-agent/index.mdx | 222 + .../signalwire/prefabs/receptionist/index.mdx | 40 + .../receptionist/receptionist-agent/index.mdx | 122 + .../signalwire/prefabs/survey/index.mdx | 40 + .../prefabs/survey/survey-agent/index.mdx | 225 + .../signalwire/relay/call/action/index.mdx | 103 + .../signalwire/relay/call/ai-action/index.mdx | 77 + .../relay/call/collect-action/index.mdx | 127 + .../relay/call/detect-action/index.mdx | 77 + .../relay/call/fax-action/index.mdx | 79 + .../python/signalwire/relay/call/index.mdx | 2344 ++++++++++ .../relay/call/pay-action/index.mdx | 77 + .../relay/call/play-action/index.mdx | 147 + .../relay/call/record-action/index.mdx | 125 + .../call/standalone-collect-action/index.mdx | 101 + .../relay/call/stream-action/index.mdx | 77 + .../relay/call/tap-action/index.mdx | 77 + .../relay/call/transcribe-action/index.mdx | 77 + .../python/signalwire/relay/client/index.mdx | 65 + .../relay/client/relay-client/index.mdx | 526 +++ .../relay/client/relay-error/index.mdx | 61 + .../signalwire/relay/constants/index.mdx | 183 + .../relay/event/call-receive-event/index.mdx | 139 + .../relay/event/call-state-event/index.mdx | 119 + .../relay/event/calling-error-event/index.mdx | 109 + .../relay/event/collect-event/index.mdx | 119 + .../relay/event/conference-event/index.mdx | 114 + .../relay/event/connect-event/index.mdx | 109 + .../relay/event/denoise-event/index.mdx | 104 + .../relay/event/detect-event/index.mdx | 109 + .../relay/event/dial-event/index.mdx | 114 + .../relay/event/echo-event/index.mdx | 104 + .../relay/event/fax-event/index.mdx | 109 + .../relay/event/hold-event/index.mdx | 104 + .../python/signalwire/relay/event/index.mdx | 160 + .../event/message-receive-event/index.mdx | 149 + .../relay/event/message-state-event/index.mdx | 154 + .../relay/event/pay-event/index.mdx | 109 + .../relay/event/play-event/index.mdx | 109 + .../relay/event/queue-event/index.mdx | 129 + .../relay/event/record-event/index.mdx | 129 + .../relay/event/refer-event/index.mdx | 119 + .../relay/event/relay-event/index.mdx | 103 + .../relay/event/send-digits-event/index.mdx | 109 + .../relay/event/stream-event/index.mdx | 119 + .../relay/event/tap-event/index.mdx | 119 + .../relay/event/transcribe-event/index.mdx | 129 + .../python/signalwire/relay/index.mdx | 59 + .../python/signalwire/relay/message/index.mdx | 196 + .../signalwire/rest/call-handler/index.mdx | 40 + .../call-handler/phone-call-handler/index.mdx | 80 + .../python/signalwire/rest/client/index.mdx | 40 + .../rest/client/rest-client/index.mdx | 133 + .../python/signalwire/rest/index.mdx | 52 + .../addresses/addresses-resource/index.mdx | 133 + .../rest/namespaces/addresses/index.mdx | 40 + .../calling/calling-namespace/index.mdx | 863 ++++ .../rest/namespaces/calling/index.mdx | 40 + .../namespaces/chat/chat-resource/index.mdx | 73 + .../signalwire/rest/namespaces/chat/index.mdx | 40 + .../compat/compat-accounts/index.mdx | 135 + .../compat/compat-applications/index.mdx | 55 + .../namespaces/compat/compat-calls/index.mdx | 147 + .../compat/compat-conferences/index.mdx | 321 ++ .../namespaces/compat/compat-faxes/index.mdx | 121 + .../compat/compat-laml-bins/index.mdx | 55 + .../compat/compat-messages/index.mdx | 121 + .../compat/compat-namespace/index.mdx | 77 + .../compat/compat-phone-numbers/index.mdx | 241 + .../namespaces/compat/compat-queues/index.mdx | 123 + .../compat/compat-recordings/index.mdx | 93 + .../namespaces/compat/compat-tokens/index.mdx | 95 + .../compat/compat-transcriptions/index.mdx | 93 + .../rest/namespaces/compat/index.mdx | 88 + .../datasphere/datasphere-documents/index.mdx | 139 + .../datasphere/datasphere-namespace/index.mdx | 53 + .../rest/namespaces/datasphere/index.mdx | 44 + .../auto-materialized-webhook/index.mdx | 59 + .../fabric/call-flows-resource/index.mdx | 101 + .../conference-rooms-resource/index.mdx | 55 + .../cxml-applications-resource/index.mdx | 53 + .../fabric/cxml-webhooks-resource/index.mdx | 31 + .../fabric/fabric-addresses/index.mdx | 73 + .../fabric/fabric-namespace/index.mdx | 83 + .../fabric/fabric-resource-put/index.mdx | 33 + .../fabric/fabric-resource/index.mdx | 33 + .../namespaces/fabric/fabric-tokens/index.mdx | 153 + .../fabric/generic-resources/index.mdx | 169 + .../rest/namespaces/fabric/index.mdx | 84 + .../fabric/subscribers-resource/index.mdx | 145 + .../fabric/swml-webhooks-resource/index.mdx | 31 + .../imported-numbers-resource/index.mdx | 73 + .../namespaces/imported-numbers/index.mdx | 40 + .../signalwire/rest/namespaces/index.mdx | 120 + .../namespaces/logs/conference-logs/index.mdx | 53 + .../rest/namespaces/logs/fax-logs/index.mdx | 73 + .../signalwire/rest/namespaces/logs/index.mdx | 56 + .../namespaces/logs/logs-namespace/index.mdx | 59 + .../namespaces/logs/message-logs/index.mdx | 73 + .../rest/namespaces/logs/voice-logs/index.mdx | 95 + .../rest/namespaces/lookup/index.mdx | 40 + .../lookup/lookup-resource/index.mdx | 75 + .../signalwire/rest/namespaces/mfa/index.mdx | 40 + .../namespaces/mfa/mfa-resource/index.mdx | 115 + .../rest/namespaces/number-groups/index.mdx | 40 + .../number-groups-resource/index.mdx | 137 + .../rest/namespaces/phone-numbers/index.mdx | 40 + .../phone-numbers-resource/index.mdx | 330 ++ .../rest/namespaces/project/index.mdx | 44 + .../project/project-namespace/index.mdx | 53 + .../project/project-tokens/index.mdx | 115 + .../rest/namespaces/pubsub/index.mdx | 40 + .../pubsub/pub-sub-resource/index.mdx | 73 + .../rest/namespaces/queues/index.mdx | 40 + .../queues/queues-resource/index.mdx | 117 + .../rest/namespaces/recordings/index.mdx | 40 + .../recordings/recordings-resource/index.mdx | 113 + .../rest/namespaces/registry/index.mdx | 56 + .../registry/registry-brands/index.mdx | 137 + .../registry/registry-campaigns/index.mdx | 141 + .../registry/registry-namespace/index.mdx | 59 + .../registry/registry-numbers/index.mdx | 53 + .../registry/registry-orders/index.mdx | 53 + .../rest/namespaces/short-codes/index.mdx | 40 + .../short-codes-resource/index.mdx | 115 + .../rest/namespaces/sip-profile/index.mdx | 40 + .../sip-profile-resource/index.mdx | 89 + .../namespaces/verified-callers/index.mdx | 40 + .../verified-callers-resource/index.mdx | 95 + .../rest/namespaces/video/index.mdx | 68 + .../video/video-conference-tokens/index.mdx | 73 + .../video/video-conferences/index.mdx | 99 + .../video/video-namespace/index.mdx | 65 + .../video/video-room-recordings/index.mdx | 115 + .../video/video-room-sessions/index.mdx | 139 + .../video/video-room-tokens/index.mdx | 53 + .../namespaces/video/video-rooms/index.mdx | 77 + .../namespaces/video/video-streams/index.mdx | 95 + .../document-processor/index.mdx | 151 + .../search/document-processor/index.mdx | 49 + .../search/document-processor/index__2.mdx | 44 + .../index-builder/index-builder/index.mdx | 271 ++ .../signalwire/search/index-builder/index.mdx | 49 + .../search/index-builder/index__2.mdx | 44 + .../python/signalwire/search/index.mdx | 128 + .../signalwire/search/migration/index.mdx | 44 + .../migration/search-index-migrator/index.mdx | 180 + .../python/signalwire/search/models/index.mdx | 66 + .../search/pgvector-backend/index.mdx | 52 + .../pg-vector-backend/index.mdx | 211 + .../pg-vector-search-backend/index.mdx | 230 + .../search/query-processor/index.mdx | 362 ++ .../signalwire/search/search-engine/index.mdx | 49 + .../search/search-engine/index__2.mdx | 46 + .../search-engine/search-engine/index.mdx | 180 + .../search/search-service/index.mdx | 49 + .../search/search-service/index__2.mdx | 50 + .../search-service/search-request/index.mdx | 78 + .../search-service/search-response/index.mdx | 58 + .../search-service/search-result/index.mdx | 59 + .../search-service/search-service/index.mdx | 186 + .../skills/api-ninjas-trivia/index.mdx | 44 + .../skill/api-ninjas-trivia-skill/index.mdx | 227 + .../skills/api-ninjas-trivia/skill/index.mdx | 40 + .../signalwire/skills/claude-skills/index.mdx | 40 + .../skill/claude-skills-skill/index.mdx | 182 + .../skills/claude-skills/skill/index.mdx | 44 + .../skills/datasphere-serverless/index.mdx | 40 + .../data-sphere-serverless-skill/index.mdx | 206 + .../datasphere-serverless/skill/index.mdx | 40 + .../signalwire/skills/datasphere/index.mdx | 44 + .../skill/data-sphere-skill/index.mdx | 228 + .../skills/datasphere/skill/index.mdx | 40 + .../signalwire/skills/datetime/index.mdx | 40 + .../datetime/skill/date-time-skill/index.mdx | 161 + .../skills/datetime/skill/index.mdx | 40 + .../signalwire/skills/google-maps/index.mdx | 35 + .../skill/google-maps-client/index.mdx | 118 + .../skill/google-maps-skill/index.mdx | 158 + .../skills/google-maps/skill/index.mdx | 46 + .../python/signalwire/skills/index.mdx | 112 + .../signalwire/skills/info-gatherer/index.mdx | 40 + .../skills/info-gatherer/skill/index.mdx | 40 + .../skill/info-gatherer-skill/index.mdx | 155 + .../python/signalwire/skills/joke/index.mdx | 40 + .../signalwire/skills/joke/skill/index.mdx | 40 + .../skills/joke/skill/joke-skill/index.mdx | 180 + .../python/signalwire/skills/math/index.mdx | 40 + .../signalwire/skills/math/skill/index.mdx | 40 + .../skills/math/skill/math-skill/index.mdx | 161 + .../signalwire/skills/mcp-gateway/index.mdx | 40 + .../skills/mcp-gateway/skill/index.mdx | 44 + .../skill/mcp-gateway-skill/index.mdx | 183 + .../skills/native-vector-search/index.mdx | 40 + .../native-vector-search/skill/index.mdx | 40 + .../native-vector-search-skill/index.mdx | 234 + .../skills/play-background-file/index.mdx | 44 + .../play-background-file/skill/index.mdx | 40 + .../play-background-file-skill/index.mdx | 207 + .../signalwire/skills/registry/index.mdx | 44 + .../skills/registry/skill-registry/index.mdx | 276 ++ .../python/signalwire/skills/spider/index.mdx | 44 + .../signalwire/skills/spider/skill/index.mdx | 40 + .../spider/skill/spider-skill/index.mdx | 238 + .../signalwire/skills/swml-transfer/index.mdx | 40 + .../skills/swml-transfer/skill/index.mdx | 40 + .../skill/swml-transfer-skill/index.mdx | 184 + .../signalwire/skills/weather-api/index.mdx | 44 + .../skills/weather-api/skill/index.mdx | 40 + .../skill/weather-api-skill/index.mdx | 184 + .../signalwire/skills/web-search/index.mdx | 48 + .../google-search-scraper/index.mdx | 205 + .../web-search/skill-improved/index.mdx | 44 + .../skill-improved/web-search-skill/index.mdx | 204 + .../google-search-scraper/index.mdx | 164 + .../web-search/skill-original/index.mdx | 44 + .../skill-original/web-search-skill/index.mdx | 209 + .../skill/google-search-scraper/index.mdx | 319 ++ .../skills/web-search/skill/index.mdx | 44 + .../skill/web-search-skill/index.mdx | 204 + .../skills/wikipedia-search/index.mdx | 44 + .../skills/wikipedia-search/skill/index.mdx | 40 + .../skill/wikipedia-search-skill/index.mdx | 191 + .../python/signalwire/utils/index.mdx | 82 + .../signalwire/utils/pom-utils/index.mdx | 32 + .../signalwire/utils/schema-utils/index.mdx | 48 + .../utils/schema-utils/schema-utils/index.mdx | 321 ++ .../schema-validation-error/index.mdx | 61 + .../utils/token-generators/index.mdx | 32 + .../signalwire/utils/url-validator/index.mdx | 68 + .../signalwire/utils/validators/index.mdx | 32 + .../python/signalwire/web/index.mdx | 44 + .../signalwire/web/web-service/index.mdx | 44 + .../web/web-service/web-service/index.mdx | 234 + fern/products/sdk-reference/ruby/_meta.json | 10 + fern/products/sdk-reference/ruby/index.mdx | 14 + .../agent-body-limit-middleware/index.mdx | 78 + .../index.mdx | 90 + .../agent-timing-safe-basic-auth/index.mdx | 78 + .../ruby/signal-wire/agent-base/index.mdx | 2590 +++++++++++ .../ruby/signal-wire/agent-server/index.mdx | 487 ++ .../contexts/context-builder/index.mdx | 231 + .../signal-wire/contexts/context/index.mdx | 929 ++++ .../contexts/gather-info/index.mdx | 252 + .../contexts/gather-question/index.mdx | 336 ++ .../ruby/signal-wire/contexts/index.mdx | 84 + .../ruby/signal-wire/contexts/step/index.mdx | 772 ++++ .../ruby/signal-wire/core/index.mdx | 34 + .../signal-wire/core/logging-config/index.mdx | 51 + .../ruby/signal-wire/data-map/index.mdx | 561 +++ .../sdk-reference/ruby/signal-wire/index.mdx | 248 + .../ruby/signal-wire/logging/index.mdx | 144 + .../ruby/signal-wire/logging/logger/index.mdx | 156 + .../ruby/signal-wire/pom/index.mdx | 40 + .../pom/prompt-object-model/index.mdx | 446 ++ .../ruby/signal-wire/pom/section/index.mdx | 499 ++ .../signal-wire/prefabs/concierge/index.mdx | 368 ++ .../signal-wire/prefabs/faq-bot/index.mdx | 238 + .../ruby/signal-wire/prefabs/index.mdx | 52 + .../prefabs/info-gatherer/index.mdx | 306 ++ .../prefabs/receptionist/index.mdx | 256 ++ .../ruby/signal-wire/prefabs/survey/index.mdx | 373 ++ .../relay/action-timeout-error/index.mdx | 34 + .../ruby/signal-wire/relay/action/index.mdx | 292 ++ .../signal-wire/relay/ai-action/index.mdx | 76 + .../relay/call-receive-event/index.mdx | 238 + .../relay/call-state-event/index.mdx | 182 + .../signal-wire/relay/call-state/index.mdx | 107 + .../ruby/signal-wire/relay/call/index.mdx | 1873 ++++++++ .../relay/calling-error-event/index.mdx | 118 + .../ruby/signal-wire/relay/client/index.mdx | 522 +++ .../relay/collect-action/index.mdx | 135 + .../relay/collect-config/index.mdx | 430 ++ .../signal-wire/relay/collect-event/index.mdx | 158 + .../relay/conference-event/index.mdx | 138 + .../signal-wire/relay/connect-event/index.mdx | 118 + .../signal-wire/relay/denoise-event/index.mdx | 98 + .../signal-wire/relay/detect-action/index.mdx | 99 + .../signal-wire/relay/detect-event/index.mdx | 118 + .../ruby/signal-wire/relay/device/index.mdx | 400 ++ .../signal-wire/relay/dial-event/index.mdx | 202 + .../signal-wire/relay/dial-state/index.mdx | 117 + .../signal-wire/relay/echo-event/index.mdx | 98 + .../signal-wire/relay/fax-action/index.mdx | 78 + .../signal-wire/relay/fax-event/index.mdx | 118 + .../signal-wire/relay/hold-event/index.mdx | 98 + .../ruby/signal-wire/relay/index.mdx | 461 ++ .../relay/message-receive-event/index.mdx | 278 ++ .../relay/message-state-event/index.mdx | 322 ++ .../signal-wire/relay/message-state/index.mdx | 116 + .../ruby/signal-wire/relay/message/index.mdx | 677 +++ .../signal-wire/relay/pay-action/index.mdx | 76 + .../signal-wire/relay/pay-event/index.mdx | 118 + .../signal-wire/relay/play-action/index.mdx | 128 + .../signal-wire/relay/play-event/index.mdx | 118 + .../signal-wire/relay/queue-event/index.mdx | 198 + .../signal-wire/relay/record-action/index.mdx | 112 + .../signal-wire/relay/record-event/index.mdx | 198 + .../signal-wire/relay/refer-event/index.mdx | 158 + .../signal-wire/relay/relay-error/index.mdx | 96 + .../signal-wire/relay/relay-event/index.mdx | 344 ++ .../relay/send-digits-event/index.mdx | 118 + .../relay/standalone-collect-action/index.mdx | 112 + .../signal-wire/relay/stream-action/index.mdx | 76 + .../signal-wire/relay/stream-event/index.mdx | 158 + .../signal-wire/relay/tap-action/index.mdx | 76 + .../signal-wire/relay/tap-event/index.mdx | 158 + .../relay/transcribe-action/index.mdx | 76 + .../relay/transcribe-event/index.mdx | 198 + .../signal-wire/rest/base-resource/index.mdx | 60 + .../signal-wire/rest/crud-resource/index.mdx | 172 + .../rest/crud-with-addresses/index.mdx | 60 + .../signal-wire/rest/http-client/index.mdx | 222 + .../ruby/signal-wire/rest/index.mdx | 70 + .../namespaces/addresses-resource/index.mdx | 138 + .../auto-materialized-webhook/index.mdx | 71 + .../namespaces/call-flows-resource/index.mdx | 100 + .../namespaces/calling-namespace/index.mdx | 896 ++++ .../rest/namespaces/chat-resource/index.mdx | 78 + .../rest/namespaces/compat-accounts/index.mdx | 140 + .../namespaces/compat-applications/index.mdx | 56 + .../rest/namespaces/compat-calls/index.mdx | 148 + .../namespaces/compat-conferences/index.mdx | 328 ++ .../rest/namespaces/compat-faxes/index.mdx | 122 + .../namespaces/compat-laml-bins/index.mdx | 56 + .../rest/namespaces/compat-messages/index.mdx | 122 + .../namespaces/compat-namespace/index.mdx | 276 ++ .../namespaces/compat-phone-numbers/index.mdx | 246 + .../rest/namespaces/compat-queues/index.mdx | 124 + .../namespaces/compat-recordings/index.mdx | 94 + .../rest/namespaces/compat-tokens/index.mdx | 96 + .../compat-transcriptions/index.mdx | 94 + .../rest/namespaces/conference-logs/index.mdx | 54 + .../conference-rooms-resource/index.mdx | 56 + .../cxml-applications-resource/index.mdx | 58 + .../cxml-webhooks-resource/index.mdx | 38 + .../namespaces/datasphere-documents/index.mdx | 144 + .../namespaces/datasphere-namespace/index.mdx | 76 + .../namespaces/fabric-addresses/index.mdx | 74 + .../namespaces/fabric-namespace/index.mdx | 346 ++ .../namespaces/fabric-resource-put/index.mdx | 34 + .../rest/namespaces/fabric-resource/index.mdx | 37 + .../rest/namespaces/fabric-tokens/index.mdx | 158 + .../rest/namespaces/fax-logs/index.mdx | 74 + .../namespaces/generic-resources/index.mdx | 172 + .../imported-numbers-resource/index.mdx | 78 + .../signal-wire/rest/namespaces/index.mdx | 280 ++ .../rest/namespaces/logs-namespace/index.mdx | 130 + .../rest/namespaces/lookup-resource/index.mdx | 80 + .../rest/namespaces/message-logs/index.mdx | 74 + .../rest/namespaces/mfa-resource/index.mdx | 120 + .../number-groups-resource/index.mdx | 142 + .../phone-numbers-resource/index.mdx | 295 ++ .../namespaces/project-namespace/index.mdx | 76 + .../rest/namespaces/project-tokens/index.mdx | 120 + .../namespaces/pub-sub-resource/index.mdx | 78 + .../rest/namespaces/queues-resource/index.mdx | 122 + .../namespaces/recordings-resource/index.mdx | 118 + .../rest/namespaces/registry-brands/index.mdx | 138 + .../namespaces/registry-campaigns/index.mdx | 142 + .../namespaces/registry-namespace/index.mdx | 130 + .../namespaces/registry-numbers/index.mdx | 54 + .../rest/namespaces/registry-orders/index.mdx | 54 + .../namespaces/short-codes-resource/index.mdx | 120 + .../namespaces/sip-profile-resource/index.mdx | 94 + .../namespaces/subscribers-resource/index.mdx | 146 + .../swml-webhooks-resource/index.mdx | 38 + .../verified-callers-resource/index.mdx | 100 + .../video-conference-tokens/index.mdx | 74 + .../namespaces/video-conferences/index.mdx | 100 + .../rest/namespaces/video-namespace/index.mdx | 184 + .../video-room-recordings/index.mdx | 116 + .../namespaces/video-room-sessions/index.mdx | 140 + .../namespaces/video-room-tokens/index.mdx | 54 + .../rest/namespaces/video-rooms/index.mdx | 78 + .../rest/namespaces/video-streams/index.mdx | 96 + .../rest/namespaces/voice-logs/index.mdx | 96 + .../rest/paginated-iterator/index.mdx | 283 ++ .../rest/phone-call-handler/index.mdx | 93 + .../signal-wire/rest/rest-client/index.mdx | 507 ++ .../rest/signal-wire-rest-error/index.mdx | 136 + .../ruby/signal-wire/runtime/index.mdx | 148 + .../ruby/signal-wire/security/index.mdx | 48 + .../security/session-manager/index.mdx | 350 ++ .../security/webhook-middleware/index.mdx | 86 + .../security/webhook-validator/index.mdx | 129 + .../ruby/signal-wire/serverless/index.mdx | 36 + .../serverless/lambda-handler/index.mdx | 151 + .../builtin/api-ninjas-trivia-skill/index.mdx | 158 + .../builtin/claude-skills-skill/index.mdx | 182 + .../builtin/custom-skills-skill/index.mdx | 150 + .../datasphere-serverless-skill/index.mdx | 180 + .../skills/builtin/datasphere-skill/index.mdx | 180 + .../skills/builtin/date-time-skill/index.mdx | 137 + .../builtin/google-maps-skill/index.mdx | 144 + .../ruby/signal-wire/skills/builtin/index.mdx | 76 + .../builtin/info-gatherer-skill/index.mdx | 180 + .../skills/builtin/joke-skill/index.mdx | 144 + .../skills/builtin/math-skill/index.mdx | 135 + .../builtin/mcp-gateway-skill/index.mdx | 162 + .../native-vector-search-skill/index.mdx | 166 + .../play-background-file-skill/index.mdx | 148 + .../skills/builtin/spider-skill/index.mdx | 186 + .../builtin/swml-transfer-skill/index.mdx | 180 + .../builtin/weather-api-skill/index.mdx | 112 + .../skills/builtin/web-search-skill/index.mdx | 196 + .../builtin/wikipedia-search-skill/index.mdx | 156 + .../ruby/signal-wire/skills/index.mdx | 54 + .../signal-wire/skills/skill-base/index.mdx | 548 +++ .../skills/skill-manager/index.mdx | 276 ++ .../signal-wire/skills/skill-name/index.mdx | 130 + .../skills/skill-registry/index.mdx | 587 +++ .../ruby/signal-wire/swaig/codec/index.mdx | 44 + .../swaig/function-result/index.mdx | 1760 +++++++ .../ruby/signal-wire/swaig/index.mdx | 60 + .../swaig/parameter-schema/index.mdx | 614 +++ .../swaig/record-direction/index.mdx | 46 + .../signal-wire/swaig/record-format/index.mdx | 42 + .../signal-wire/swaig/tap-direction/index.mdx | 46 + .../ruby/signal-wire/swml/document/index.mdx | 283 ++ .../ruby/signal-wire/swml/index.mdx | 74 + .../ruby/signal-wire/swml/schema/index.mdx | 154 + .../ruby/signal-wire/swml/service/index.mdx | 1005 ++++ .../security-headers-middleware/index.mdx | 90 + .../service/timing-safe-basic-auth/index.mdx | 82 + .../ruby/signal-wire/utils/index.mdx | 66 + .../signal-wire/utils/schema-utils/index.mdx | 352 ++ .../utils/schema-validation-error/index.mdx | 102 + .../signal-wire/utils/url-validator/index.mdx | 131 + fern/products/sdk-reference/rust/_meta.json | 10 + fern/products/sdk-reference/rust/index.mdx | 15 + .../agent/agent-base/agent-base/index.mdx | 2140 +++++++++ .../agent/agent-base/agent-options/index.mdx | 349 ++ .../signalwire/agent/agent-base/index.mdx | 34 + .../rust/signalwire/agent/index.mdx | 27 + .../context-builder/context-builder/index.mdx | 342 ++ .../context-builder/context/index.mdx | 429 ++ .../context-builder/gather-info/index.mdx | 208 + .../context-builder/gather-question/index.mdx | 159 + .../contexts/context-builder/index.mdx | 78 + .../contexts/context-builder/step/index.mdx | 539 +++ .../rust/signalwire/contexts/index.mdx | 27 + .../rust/signalwire/core/index.mdx | 27 + .../signalwire/core/logging-config/index.mdx | 48 + .../rust/signalwire/datamap/datamap/index.mdx | 653 +++ .../rust/signalwire/datamap/index.mdx | 29 + .../sdk-reference/rust/signalwire/index.mdx | 238 + .../rust/signalwire/logging/index.mdx | 349 ++ .../rust/signalwire/logging/logger/index.mdx | 191 + .../logging/parse-level-error/index.mdx | 149 + .../rust/signalwire/pom/index.mdx | 50 + .../rust/signalwire/pom/pom/index.mdx | 44 + .../pom/pom/prompt-object-model/index.mdx | 547 +++ .../rust/signalwire/pom/section/index.mdx | 417 ++ .../prefabs/bedrock/bedrock-agent/index.mdx | 504 ++ .../prefabs/bedrock/bedrock-options/index.mdx | 129 + .../rust/signalwire/prefabs/bedrock/index.mdx | 44 + .../concierge/concierge-agent/index.mdx | 161 + .../signalwire/prefabs/concierge/index.mdx | 30 + .../prefabs/faq-bot/faq-bot-agent/index.mdx | 150 + .../rust/signalwire/prefabs/faq-bot/index.mdx | 30 + .../rust/signalwire/prefabs/index.mdx | 39 + .../prefabs/info-gatherer/index.mdx | 30 + .../info-gatherer-agent/index.mdx | 126 + .../signalwire/prefabs/receptionist/index.mdx | 30 + .../receptionist/receptionist-agent/index.mdx | 142 + .../rust/signalwire/prefabs/survey/index.mdx | 30 + .../prefabs/survey/survey-agent/index.mdx | 140 + .../relay/action/ai-action/index.mdx | 114 + .../relay/action/collect-action/index.mdx | 172 + .../relay/action/detect-action/index.mdx | 134 + .../relay/action/fax-action/index.mdx | 138 + .../rust/signalwire/relay/action/index.mdx | 456 ++ .../relay/action/pay-action/index.mdx | 114 + .../relay/action/play-action/index.mdx | 166 + .../relay/action/record-action/index.mdx | 206 + .../relay/action/stream-action/index.mdx | 114 + .../relay/action/tap-action/index.mdx | 114 + .../relay/action/transcribe-action/index.mdx | 114 + .../rust/signalwire/relay/call/index.mdx | 1436 ++++++ .../rust/signalwire/relay/client/index.mdx | 932 ++++ .../rust/signalwire/relay/constants/index.mdx | 148 + .../rust/signalwire/relay/device/index.mdx | 321 ++ .../rust/signalwire/relay/error/index.mdx | 261 ++ .../rust/signalwire/relay/event/index.mdx | 321 ++ .../rust/signalwire/relay/index.mdx | 65 + .../rust/signalwire/relay/message/index.mdx | 471 ++ .../signalwire/relay/state-enums/index.mdx | 928 ++++ .../rust/signalwire/rest/client/index.mdx | 30 + .../rest/client/rest-client/index.mdx | 726 +++ .../crud-resource/crud-resource/index.mdx | 231 + .../signalwire/rest/crud-resource/index.mdx | 30 + .../rust/signalwire/rest/error/index.mdx | 33 + .../error/signal-wire-rest-error/index.mdx | 190 + .../rest/http-client/http-client/index.mdx | 334 ++ .../signalwire/rest/http-client/index.mdx | 99 + .../rest/http-client/stub-transport/index.mdx | 129 + .../rest/http-client/ureq-transport/index.mdx | 116 + .../rust/signalwire/rest/index.mdx | 41 + .../rest/namespaces/calling/index.mdx | 1082 +++++ .../compat/compat-accounts/index.mdx | 172 + .../compat/compat-applications/index.mdx | 196 + .../namespaces/compat/compat-calls/index.mdx | 221 + .../compat/compat-conferences/index.mdx | 429 ++ .../namespaces/compat/compat-faxes/index.mdx | 274 ++ .../compat/compat-laml-bins/index.mdx | 196 + .../compat/compat-messages/index.mdx | 274 ++ .../compat/compat-phone-numbers/index.mdx | 318 ++ .../namespaces/compat/compat-queues/index.mdx | 276 ++ .../compat/compat-recordings/index.mdx | 146 + .../namespaces/compat/compat-tokens/index.mdx | 148 + .../compat/compat-transcriptions/index.mdx | 146 + .../rest/namespaces/compat/index.mdx | 369 ++ .../datasphere/datasphere-documents/index.mdx | 301 ++ .../datasphere/datasphere-namespace/index.mdx | 76 + .../rest/namespaces/datasphere/index.mdx | 34 + .../fabric/call-flows-resource/index.mdx | 276 ++ .../conference-rooms-resource/index.mdx | 222 + .../cxml-applications-resource/index.mdx | 202 + .../fabric/fabric-addresses/index.mdx | 122 + .../namespaces/fabric/fabric-tokens/index.mdx | 174 + .../fabric/generic-resources/index.mdx | 198 + .../rest/namespaces/fabric/index.mdx | 431 ++ .../fabric/subscribers-resource/index.mdx | 359 ++ .../rust/signalwire/rest/namespaces/index.mdx | 72 + .../namespaces/logs/conference-logs/index.mdx | 98 + .../rest/namespaces/logs/fax-logs/index.mdx | 122 + .../signalwire/rest/namespaces/logs/index.mdx | 170 + .../namespaces/logs/message-logs/index.mdx | 122 + .../rest/namespaces/logs/voice-logs/index.mdx | 148 + .../signalwire/rest/namespaces/mfa/index.mdx | 158 + .../rest/namespaces/number-groups/index.mdx | 30 + .../number-groups/number-groups/index.mdx | 303 ++ .../rest/namespaces/project/index.mdx | 84 + .../project/project-tokens/index.mdx | 151 + .../rest/namespaces/queues/index.mdx | 275 ++ .../rest/namespaces/registry/index.mdx | 169 + .../registry/registry-brands/index.mdx | 198 + .../registry/registry-campaigns/index.mdx | 202 + .../registry/registry-numbers/index.mdx | 98 + .../registry/registry-orders/index.mdx | 98 + .../rest/namespaces/sip-profile/index.mdx | 30 + .../sip-profile/sip-profile/index.mdx | 126 + .../rest/namespaces/video/index.mdx | 237 + .../video/video-conference-tokens/index.mdx | 124 + .../video/video-conferences/index.mdx | 274 ++ .../video/video-room-recordings/index.mdx | 172 + .../video/video-room-sessions/index.mdx | 200 + .../video/video-room-tokens/index.mdx | 98 + .../namespaces/video/video-rooms/index.mdx | 250 + .../namespaces/video/video-streams/index.mdx | 148 + .../rust/signalwire/rest/pagination/index.mdx | 37 + .../pagination/paginated-iterator/index.mdx | 267 ++ .../rust/signalwire/security/index.mdx | 35 + .../security/session-manager/index.mdx | 30 + .../session-manager/session-manager/index.mdx | 221 + .../security/webhook-layer/index.mdx | 56 + .../webhook-layer/webhook-layer/index.mdx | 160 + .../webhook-layer/webhook-validate/index.mdx | 135 + .../signalwire/security/webhook/index.mdx | 356 ++ .../agent-server/agent-server/index.mdx | 507 ++ .../signalwire/server/agent-server/index.mdx | 58 + .../rust/signalwire/server/error/index.mdx | 168 + .../rust/signalwire/server/index.mdx | 31 + .../signalwire/serverless/adapter/index.mdx | 346 ++ .../rust/signalwire/serverless/index.mdx | 29 + .../rust/signalwire/skill-spec/index.mdx | 76 + .../api-ninjas-trivia/index.mdx | 178 + .../builtin/api-ninjas-trivia/index.mdx | 30 + .../claude-skills/claude-skills/index.mdx | 218 + .../skills/builtin/claude-skills/index.mdx | 30 + .../custom-skills/custom-skills/index.mdx | 178 + .../skills/builtin/custom-skills/index.mdx | 30 + .../datasphere-serverless/index.mdx | 218 + .../builtin/datasphere-serverless/index.mdx | 30 + .../skills/builtin/datasphere/index.mdx | 227 + .../skills/builtin/datetime/index.mdx | 178 + .../builtin/google-maps/google-maps/index.mdx | 198 + .../skills/builtin/google-maps/index.mdx | 30 + .../rust/signalwire/skills/builtin/index.mdx | 76 + .../skills/builtin/info-gatherer/index.mdx | 30 + .../info-gatherer/info-gatherer/index.mdx | 218 + .../signalwire/skills/builtin/joke/index.mdx | 198 + .../signalwire/skills/builtin/math/index.mdx | 178 + .../skills/builtin/mcp-gateway/index.mdx | 30 + .../builtin/mcp-gateway/mcp-gateway/index.mdx | 218 + .../builtin/native-vector-search/index.mdx | 30 + .../native-vector-search/index.mdx | 198 + .../builtin/play-background-file/index.mdx | 30 + .../play-background-file/index.mdx | 178 + .../skills/builtin/spider/index.mdx | 198 + .../skills/builtin/swml-transfer/index.mdx | 30 + .../swml-transfer/swml-transfer/index.mdx | 218 + .../skills/builtin/weather-api/index.mdx | 30 + .../builtin/weather-api/weather-api/index.mdx | 158 + .../skills/builtin/web-search/index.mdx | 30 + .../builtin/web-search/web-search/index.mdx | 271 ++ .../skills/builtin/wikipedia-search/index.mdx | 30 + .../wikipedia-search/index.mdx | 183 + .../rust/signalwire/skills/index.mdx | 37 + .../signalwire/skills/skill-base/index.mdx | 455 ++ .../skills/skill-base/skill-params/index.mdx | 330 ++ .../signalwire/skills/skill-manager/index.mdx | 30 + .../skill-manager/skill-manager/index.mdx | 244 + .../signalwire/skills/skill-name/index.mdx | 516 +++ .../parse-skill-name-error/index.mdx | 155 + .../skills/skill-registry/index.mdx | 48 + .../skill-registry/skill-registry/index.mdx | 166 + .../function-result/function-result/index.mdx | 1899 ++++++++ .../swaig/function-result/index.mdx | 330 ++ .../rust/signalwire/swaig/index.mdx | 35 + .../signalwire/swaig/media-enums/index.mdx | 1939 ++++++++ .../parse-media-enum-error/index.mdx | 155 + .../signalwire/swaig/params-builder/index.mdx | 398 ++ .../params-builder/params-builder/index.mdx | 531 +++ .../params-builder/property-builder/index.mdx | 358 ++ .../rust/signalwire/swml/document/index.mdx | 360 ++ .../rust/signalwire/swml/index.mdx | 39 + .../rust/signalwire/swml/schema/index.mdx | 126 + .../swml/schema/verb-info/index.mdx | 84 + .../rust/signalwire/swml/service/index.mdx | 958 ++++ .../swml/service/service-options/index.mdx | 212 + .../swml/service/tool-def/index.mdx | 65 + .../rust/signalwire/utils/index.mdx | 60 + .../signalwire/utils/schema-utils/index.mdx | 38 + .../utils/schema-utils/schema-utils/index.mdx | 323 ++ .../schema-validation-error/index.mdx | 138 + .../schema-utils/verb-definition/index.mdx | 86 + .../signalwire/utils/url-validator/index.mdx | 89 + fern/products/sdk-reference/sdk-reference.yml | 80 + .../sdk-reference/typescript/_meta.json | 10 + .../typescript/add-skill-directory.mdx | 41 + .../typescript/agent-base/index.mdx | 3741 +++++++++++++++ .../typescript/agent-server/index.mdx | 416 ++ .../typescript/auth-handler/index.mdx | 385 ++ .../typescript/cli/agent-loader/index.mdx | 86 + .../typescript/cli/mock-data/index.mdx | 146 + .../typescript/cli/swaig-test/index.mdx | 26 + .../typescript/config-loader/index.mdx | 543 +++ .../context-builder/context/index.mdx | 764 ++++ .../context-builder/gather-info/index.mdx | 147 + .../context-builder/gather-question/index.mdx | 117 + .../typescript/context-builder/index.mdx | 302 ++ .../typescript/context-builder/step/index.mdx | 637 +++ .../typescript/data-map/index.mdx | 801 ++++ .../typescript/function-result/index.mdx | 1788 ++++++++ .../typescript/generate-verb-types/index.mdx | 25 + .../sdk-reference/typescript/index.mdx | 78 + .../typescript/list-skills-with-params.mdx | 34 + .../sdk-reference/typescript/list-skills.mdx | 36 + .../livewire/agent-handoff/index.mdx | 53 + .../livewire/agent-server/index.mdx | 117 + .../livewire/agent-session/index.mdx | 289 ++ .../typescript/livewire/agent/index.mdx | 376 ++ .../livewire/chat-context/index.mdx | 85 + .../typescript/livewire/index.mdx | 394 ++ .../typescript/livewire/inference/index.mdx | 49 + .../livewire/inference/llm/index.mdx | 65 + .../livewire/inference/stt/index.mdx | 65 + .../livewire/inference/tts/index.mdx | 65 + .../typescript/livewire/job-context/index.mdx | 116 + .../typescript/livewire/job-process/index.mdx | 52 + .../livewire/noop-tracker/index.mdx | 124 + .../livewire/plugins/cartesia-tts/index.mdx | 55 + .../livewire/plugins/deepgram-stt/index.mdx | 55 + .../plugins/eleven-labs-tts/index.mdx | 55 + .../typescript/livewire/plugins/index.mdx | 57 + .../livewire/plugins/open-aillm/index.mdx | 64 + .../livewire/plugins/silero-vad/index.mdx | 82 + .../typescript/livewire/room/index.mdx | 52 + .../typescript/livewire/run-context/index.mdx | 97 + .../livewire/server-options/index.mdx | 58 + .../livewire/stop-response/index.mdx | 59 + .../typescript/livewire/tool-error/index.mdx | 59 + .../livewire/worker-options/index.mdx | 58 + .../sdk-reference/typescript/logger/index.mdx | 492 ++ .../typescript/parameter-schema/index.mdx | 721 +++ .../typescript/pom-builder/index.mdx | 508 ++ .../pom-builder/pom-section/index.mdx | 217 + .../pom/prompt-object-model/index.mdx | 372 ++ .../pom/prompt-object-model/section/index.mdx | 274 ++ .../prefabs/concierge-agent/index.mdx | 3756 +++++++++++++++ .../prefabs/faq-bot-agent/index.mdx | 3789 +++++++++++++++ .../typescript/prefabs/index.mdx | 25 + .../prefabs/info-gatherer-agent/index.mdx | 3825 ++++++++++++++++ .../prefabs/receptionist-agent/index.mdx | 3774 +++++++++++++++ .../typescript/prefabs/survey-agent/index.mdx | 3823 ++++++++++++++++ .../typescript/prompt-manager/index.mdx | 349 ++ .../typescript/register-skill.mdx | 40 + .../relay/action/ai-action/index.mdx | 139 + .../relay/action/collect-action/index.mdx | 225 + .../relay/action/detect-action/index.mdx | 165 + .../relay/action/fax-action/index.mdx | 141 + .../typescript/relay/action/index.mdx | 234 + .../relay/action/pay-action/index.mdx | 139 + .../relay/action/play-action/index.mdx | 223 + .../relay/action/record-action/index.mdx | 197 + .../standalone-collect-action/index.mdx | 165 + .../relay/action/stream-action/index.mdx | 139 + .../relay/action/tap-action/index.mdx | 139 + .../relay/action/transcribe-action/index.mdx | 139 + .../typescript/relay/call/index.mdx | 2725 +++++++++++ .../typescript/relay/closed-sets/index.mdx | 246 + .../typescript/relay/constants/index.mdx | 196 + .../typescript/relay/deferred/index.mdx | 131 + .../sdk-reference/typescript/relay/index.mdx | 25 + .../typescript/relay/message/index.mdx | 236 + .../typescript/relay/normalize/index.mdx | 135 + .../typescript/relay/relay-client/index.mdx | 638 +++ .../typescript/relay/relay-error/index.mdx | 71 + .../relay-event/call-receive-event/index.mdx | 159 + .../relay-event/call-state-event/index.mdx | 139 + .../relay-event/calling-error-event/index.mdx | 127 + .../relay/relay-event/collect-event/index.mdx | 137 + .../relay-event/conference-event/index.mdx | 132 + .../relay/relay-event/connect-event/index.mdx | 127 + .../relay/relay-event/denoise-event/index.mdx | 122 + .../relay/relay-event/detect-event/index.mdx | 127 + .../relay/relay-event/dial-event/index.mdx | 134 + .../relay/relay-event/echo-event/index.mdx | 122 + .../relay/relay-event/fax-event/index.mdx | 127 + .../relay/relay-event/from-payload.mdx | 35 + .../relay/relay-event/hold-event/index.mdx | 122 + .../typescript/relay/relay-event/index.mdx | 271 ++ .../message-receive-event/index.mdx | 167 + .../relay-event/message-state-event/index.mdx | 174 + .../relay/relay-event/pay-event/index.mdx | 127 + .../relay/relay-event/play-event/index.mdx | 127 + .../relay/relay-event/queue-event/index.mdx | 147 + .../relay/relay-event/record-event/index.mdx | 147 + .../relay/relay-event/refer-event/index.mdx | 137 + .../relay-event/send-digits-event/index.mdx | 127 + .../relay/relay-event/stream-event/index.mdx | 137 + .../relay/relay-event/tap-event/index.mdx | 137 + .../relay-event/transcribe-event/index.mdx | 147 + .../typescript/relay/types/index.mdx | 476 ++ .../sdk-reference/typescript/rest-client.mdx | 70 + .../rest/base/base-resource/index.mdx | 64 + .../rest/base/crud-resource/index.mdx | 269 ++ .../rest/base/crud-with-addresses/index.mdx | 285 ++ .../typescript/rest/call-handler/index.mdx | 50 + .../typescript/rest/http-client/index.mdx | 280 ++ .../sdk-reference/typescript/rest/index.mdx | 33 + .../addresses/addresses-resource/index.mdx | 187 + .../rest/namespaces/addresses/index.mdx | 34 + .../calling/calling-namespace/index.mdx | 1414 ++++++ .../rest/namespaces/calling/index.mdx | 34 + .../namespaces/chat/chat-resource/index.mdx | 92 + .../typescript/rest/namespaces/chat/index.mdx | 34 + .../compat/compat-accounts/index.mdx | 189 + .../compat/compat-applications/index.mdx | 223 + .../namespaces/compat/compat-calls/index.mdx | 379 ++ .../compat/compat-conferences/index.mdx | 544 +++ .../namespaces/compat/compat-faxes/index.mdx | 331 ++ .../compat/compat-laml-bins/index.mdx | 223 + .../compat/compat-messages/index.mdx | 331 ++ .../compat/compat-namespace/index.mdx | 120 + .../compat/compat-phone-numbers/index.mdx | 361 ++ .../namespaces/compat/compat-queues/index.mdx | 336 ++ .../compat/compat-recordings/index.mdx | 155 + .../namespaces/compat/compat-tokens/index.mdx | 159 + .../compat/compat-transcriptions/index.mdx | 155 + .../rest/namespaces/compat/index.mdx | 82 + .../datasphere/datasphere-documents/index.mdx | 365 ++ .../datasphere/datasphere-namespace/index.mdx | 72 + .../rest/namespaces/datasphere/index.mdx | 38 + .../index.mdx | 267 ++ .../fabric/call-flows-resource/index.mdx | 334 ++ .../conference-rooms-resource/index.mdx | 262 ++ .../cxml-applications-resource/index.mdx | 256 ++ .../fabric/cxml-webhooks-resource/index.mdx | 258 ++ .../fabric/fabric-addresses/index.mdx | 123 + .../fabric/fabric-namespace/index.mdx | 129 + .../fabric/fabric-resource-put/index.mdx | 262 ++ .../fabric/fabric-resource/index.mdx | 262 ++ .../namespaces/fabric/fabric-tokens/index.mdx | 217 + .../fabric/generic-resources/index.mdx | 267 ++ .../rest/namespaces/fabric/index.mdx | 82 + .../fabric/subscribers-resource/index.mdx | 450 ++ .../fabric/swml-webhooks-resource/index.mdx | 258 ++ .../imported-numbers-resource/index.mdx | 91 + .../namespaces/imported-numbers/index.mdx | 34 + .../namespaces/logs/conference-logs/index.mdx | 91 + .../rest/namespaces/logs/fax-logs/index.mdx | 123 + .../typescript/rest/namespaces/logs/index.mdx | 50 + .../namespaces/logs/logs-namespace/index.mdx | 74 + .../namespaces/logs/message-logs/index.mdx | 123 + .../rest/namespaces/logs/voice-logs/index.mdx | 159 + .../rest/namespaces/lookup/index.mdx | 34 + .../lookup/lookup-resource/index.mdx | 101 + .../typescript/rest/namespaces/mfa/index.mdx | 34 + .../namespaces/mfa/mfa-resource/index.mdx | 168 + .../rest/namespaces/number-groups/index.mdx | 34 + .../number-groups-resource/index.mdx | 362 ++ .../rest/namespaces/phone-numbers/index.mdx | 140 + .../phone-numbers-resource/index.mdx | 571 +++ .../rest/namespaces/project/index.mdx | 38 + .../project/project-namespace/index.mdx | 62 + .../project/project-tokens/index.mdx | 157 + .../rest/namespaces/pubsub/index.mdx | 34 + .../pubsub/pub-sub-resource/index.mdx | 92 + .../rest/namespaces/queues/index.mdx | 34 + .../queues/queues-resource/index.mdx | 330 ++ .../rest/namespaces/recordings/index.mdx | 34 + .../recordings/recordings-resource/index.mdx | 155 + .../rest/namespaces/registry/index.mdx | 50 + .../registry/registry-brands/index.mdx | 227 + .../registry/registry-campaigns/index.mdx | 235 + .../registry/registry-namespace/index.mdx | 74 + .../registry/registry-numbers/index.mdx | 91 + .../registry/registry-orders/index.mdx | 91 + .../rest/namespaces/short-codes/index.mdx | 34 + .../short-codes-resource/index.mdx | 159 + .../rest/namespaces/sip-profile/index.mdx | 34 + .../sip-profile-resource/index.mdx | 117 + .../namespaces/verified-callers/index.mdx | 34 + .../verified-callers-resource/index.mdx | 296 ++ .../rest/namespaces/video/index.mdx | 62 + .../video/video-conference-tokens/index.mdx | 123 + .../video/video-conferences/index.mdx | 334 ++ .../video/video-namespace/index.mdx | 92 + .../video/video-room-recordings/index.mdx | 191 + .../video/video-room-sessions/index.mdx | 231 + .../video/video-room-tokens/index.mdx | 91 + .../namespaces/video/video-rooms/index.mdx | 298 ++ .../namespaces/video/video-streams/index.mdx | 159 + .../typescript/rest/pagination/index.mdx | 135 + .../typescript/rest/rest-client/index.mdx | 167 + .../typescript/rest/rest-error/index.mdx | 97 + .../typescript/rest/types/index.mdx | 172 + .../typescript/schema-utils/index.mdx | 362 ++ .../typescript/security-utils/index.mdx | 278 ++ .../typescript/serverless-adapter/index.mdx | 394 ++ .../typescript/session-manager/index.mdx | 512 +++ .../api-ninjas-trivia-skill/index.mdx | 709 +++ .../builtin/api-ninjas-trivia/index.mdx | 62 + .../ask-claude/ask-claude-skill/index.mdx | 716 +++ .../skills/builtin/ask-claude/index.mdx | 62 + .../claude-skills-skill/index.mdx | 731 +++ .../skills/builtin/claude-skills/index.mdx | 62 + .../custom-skills-skill/index.mdx | 746 +++ .../skills/builtin/custom-skills/index.mdx | 62 + .../data-sphere-serverless-skill/index.mdx | 716 +++ .../builtin/datasphere-serverless/index.mdx | 62 + .../datasphere/data-sphere-skill/index.mdx | 721 +++ .../skills/builtin/datasphere/index.mdx | 62 + .../datetime/date-time-skill/index.mdx | 717 +++ .../skills/builtin/datetime/index.mdx | 62 + .../google-maps/google-maps-skill/index.mdx | 715 +++ .../skills/builtin/google-maps/index.mdx | 62 + .../typescript/skills/builtin/index.mdx | 51 + .../skills/builtin/info-gatherer/index.mdx | 62 + .../info-gatherer-skill/index.mdx | 731 +++ .../typescript/skills/builtin/joke/index.mdx | 62 + .../skills/builtin/joke/joke-skill/index.mdx | 716 +++ .../typescript/skills/builtin/math/index.mdx | 62 + .../skills/builtin/math/math-skill/index.mdx | 717 +++ .../skills/builtin/mcp-gateway/index.mdx | 62 + .../mcp-gateway/mcp-gateway-skill/index.mdx | 720 +++ .../builtin/native-vector-search/index.mdx | 92 + .../native-vector-search-skill/index.mdx | 718 +++ .../builtin/play-background-file/index.mdx | 62 + .../play-background-file-skill/index.mdx | 719 +++ .../skills/builtin/spider/index.mdx | 62 + .../builtin/spider/spider-skill/index.mdx | 718 +++ .../skills/builtin/swml-transfer/index.mdx | 62 + .../swml-transfer-skill/index.mdx | 721 +++ .../skills/builtin/weather-api/index.mdx | 62 + .../weather-api/weather-api-skill/index.mdx | 732 +++ .../skills/builtin/web-search/index.mdx | 62 + .../web-search/web-search-skill/index.mdx | 736 +++ .../skills/builtin/wikipedia-search/index.mdx | 62 + .../wikipedia-search-skill/index.mdx | 758 +++ .../sdk-reference/typescript/skills/index.mdx | 25 + .../typescript/skills/skill-base/index.mdx | 930 ++++ .../typescript/skills/skill-manager/index.mdx | 531 +++ .../typescript/skills/skill-name/index.mdx | 93 + .../skills/skill-registry/index.mdx | 652 +++ .../typescript/ssl-config/index.mdx | 257 ++ .../typescript/swaig-function/index.mdx | 328 ++ .../typescript/swml-builder/index.mdx | 1639 +++++++ .../swml-handler/ai-verb-handler/index.mdx | 140 + .../typescript/swml-handler/index.mdx | 85 + .../swml-handler/swml-verb-handler/index.mdx | 150 + .../verb-handler-registry/index.mdx | 157 + .../typescript/swml-service/index.mdx | 1380 ++++++ .../swml-service/security-config/index.mdx | 128 + .../verb-handler-registry/index.mdx | 122 + .../swml-verb-methods.generated/index.mdx | 111 + .../typescript/type-inference/index.mdx | 255 ++ .../sdk-reference/typescript/types/index.mdx | 290 ++ .../typescript/web-service/index.mdx | 330 ++ .../typescript/webhook-middleware/index.mdx | 106 + .../typescript/webhook-validator/index.mdx | 173 + 2035 files changed, 443633 insertions(+) create mode 100644 fern/products/sdk-reference/cpp/_meta.json create mode 100644 fern/products/sdk-reference/cpp/c-tool-context/index.mdx create mode 100644 fern/products/sdk-reference/cpp/httplib/index.mdx create mode 100644 fern/products/sdk-reference/cpp/index.mdx create mode 100644 fern/products/sdk-reference/cpp/ix/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/agent/agent-base/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/agent/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/agent/language-config/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/agent/pronunciation/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/agent/swaig-query-param/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/contexts/context-builder/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/contexts/context/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/contexts/gather-info/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/contexts/gather-question/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/contexts/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/contexts/step/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/core/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/core/logging-config/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/datamap/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/logger/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/logging/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/logging/logger/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/pom/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/pom/prompt-object-model/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/pom/section/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/prefabs/concierge-agent/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/prefabs/faq-bot-agent/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/prefabs/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/prefabs/info-gatherer-agent/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/prefabs/receptionist-agent/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/prefabs/survey-agent/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/relay/action/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/relay/call-event/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/relay/call/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/relay/component-event/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/relay/device/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/relay/dial-event/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/relay/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/relay/message-event/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/relay/message/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/relay/relay-client/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/relay/relay-config/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/relay/relay-event/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/relay/web-socket-client/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/crud-resource/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/http-client/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/paginated-iterator/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/addresses-namespace/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/calling-namespace/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/chat-namespace/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-accounts/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-applications/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-calls/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-conferences/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-faxes/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-laml-bins/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-messages/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-namespace/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-phone-numbers/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-queues/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-recordings/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-tokens/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-transcriptions/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/datasphere-documents/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/datasphere-namespace/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-addresses/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-call-flows/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-conference-rooms/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-cxml-applications/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-generic-resources/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-namespace/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-resource-put/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-resource/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-subscribers/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-tokens/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/imported-numbers-namespace/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/logs-conferences/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/logs-fax/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/logs-messages/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/logs-namespace/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/logs-voice/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/lookup-namespace/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/mfa-namespace/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/number-groups-namespace/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/phone-numbers-namespace/call-flow-options/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/phone-numbers-namespace/cxml-webhook-options/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/phone-numbers-namespace/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/phone-numbers-namespace/relay-topic-options/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/project-namespace/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/project-tokens/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/pub-sub-namespace/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/queues-namespace/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/recordings-namespace/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/registry-brands/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/registry-campaigns/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/registry-namespace/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/registry-numbers/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/registry-orders/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/short-codes-namespace/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/sip-profile-namespace/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/verified-callers-namespace/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/video-conference-tokens/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/video-conferences/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/video-namespace/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/video-room-recordings/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/video-room-sessions/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/video-room-tokens/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/video-rooms/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/video-streams/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/signal-wire-rest-error/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/security/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/security/session-manager/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/security/webhook-validator-options/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/server/agent-server/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/server/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/server/tls-server-config/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/api-ninjas-trivia-skill-r/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/api-ninjas-trivia-skill/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/claude-skills-skill-r/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/claude-skills-skill/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/custom-skills-skill-r/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/custom-skills-skill/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/datasphere-serverless-skill-r/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/datasphere-serverless-skill/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/datasphere-skill-r/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/datasphere-skill/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/date-time-skill/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/google-maps-skill-r/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/google-maps-skill/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/info-gatherer-skill-r/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/info-gatherer-skill/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/joke-skill-r/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/joke-skill/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/math-skill-r/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/math-skill/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/mcp-gateway-skill-r/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/mcp-gateway-skill/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/native-vector-search-skill-r/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/native-vector-search-skill/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/play-background-file-skill-r/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/play-background-file-skill/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/skill-base/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/skill-http-response/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/skill-manager/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/skill-prompt-section/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/skill-registry/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/spider-skill-r/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/spider-skill/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/swml-transfer-skill-r/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/swml-transfer-skill/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/weather-api-skill-r/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/weather-api-skill/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/web-search-core/candidate/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/web-search-core/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/web-search-core/latency-params/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/web-search-skill-r/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/web-search-skill/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/wikipedia-search-skill-r/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/wikipedia-search-skill/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/swaig/enum-or-string/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/swaig/function-result/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/swaig/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/swaig/join-conference-options/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/swaig/parameter-schema/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/swaig/tool-definition/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/swml/document/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/swml/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/swml/schema/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/swml/section/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/swml/service/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/swml/verb-definition/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/swml/verb/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/utils/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/utils/schema-utils/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/utils/schema-validation-error/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/utils/url-validator/index.mdx create mode 100644 fern/products/sdk-reference/cpp/signalwire/utils/verb-info/index.mdx create mode 100644 fern/products/sdk-reference/cpp/std/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/_meta.json create mode 100644 fern/products/sdk-reference/dotnet/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.agent/agent-base/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.agent/agent-options/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.agent/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.contexts/context-builder/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.contexts/context/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.contexts/gather-info/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.contexts/gather-question/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.contexts/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.contexts/reserved-tool-names/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.contexts/step/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.data-map/data-map/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.data-map/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.logging/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.logging/logger/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.pom/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.pom/pom-builder/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.pom/prompt-object-model/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.pom/section/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.prefabs/concierge-agent/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.prefabs/faq-bot-agent/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.prefabs/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.prefabs/info-gatherer-agent/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.prefabs/receptionist-agent/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.prefabs/survey-agent/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.relay/action/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.relay/ai-action/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.relay/call-state-extensions/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.relay/call/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.relay/client/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.relay/collect-action/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.relay/constants/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.relay/detect-action/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.relay/device/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.relay/dial-state-extensions/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.relay/event/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.relay/fax-action/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.relay/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.relay/message-state-extensions/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.relay/message/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.relay/pay-action/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.relay/play-action/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.relay/record-action/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.relay/stream-action/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.relay/tap-action/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.relay/transcribe-action/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/addresses/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/call-flows-helper/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/calling/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-accounts/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-applications/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-calls/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-conferences/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-faxes/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-laml-bins/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-messages/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-phone-numbers/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-queues/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-recordings/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-tokens/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-transcriptions/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/conference-logs/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/conference-rooms-helper/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/cxml-applications-helper/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/datasphere-documents/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/datasphere-ns/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/fabric-addresses/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/fabric-resources/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/fabric-tokens/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/fabric/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/fax-logs/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/imported-numbers/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/logs/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/message-logs/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/mfa/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/number-groups/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/project-tokens/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/project/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/queues/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/recordings/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/registry-brands/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/registry-campaigns/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/registry-numbers/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/registry-orders/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/registry/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/short-codes/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/sip-profile/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/subscribers-helper/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/video-conference-tokens/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/video-conferences/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/video-room-recordings/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/video-room-sessions/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/video-room-tokens/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/video-rooms/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/video-streams/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/video/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/voice-logs/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest/crud-resource/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest/crud-with-addresses/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest/http-client/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest/paginated-iterator/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest/rest-client/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest/signal-wire-rest-error/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.security/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.security/session-manager/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.security/webhook-validation-middleware/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.security/webhook-validator/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.server/agent-server/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.server/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.serverless/adapter/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.serverless/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/api-ninjas-trivia-skill/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/claude-skills-skill/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/custom-skills-skill/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/datasphere-serverless-skill/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/datasphere-skill/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/datetime-skill/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/google-maps-skill/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/info-gatherer-skill/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/joke-skill/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/math-skill/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/mcp-gateway-skill/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/native-vector-search-skill/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/play-background-file-skill/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/spider-skill/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/swml-transfer-skill/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/weather-api-skill/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/web-search-skill/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/wikipedia-search-skill/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.skills/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.skills/skill-base/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.skills/skill-manager/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.skills/skill-name-extensions/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.skills/skill-registry/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.swaig/callback-method-extensions/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.swaig/codec-extensions/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.swaig/conference-beep-extensions/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.swaig/conference-record-extensions/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.swaig/conference-trim-extensions/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.swaig/function-result/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.swaig/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.swaig/join-conference-options/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.swaig/parameter-schema/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.swaig/record-direction-extensions/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.swaig/record-format-extensions/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.swaig/tap-direction-extensions/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.swml/document/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.swml/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.swml/schema-validation-error/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.swml/schema/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.swml/service-options/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.swml/service/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.swml/swml-builder/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.swml/swml-renderer/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.swml/verb-info/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.utils/execution-mode/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.utils/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/signal-wire.utils/url-validator/index.mdx create mode 100644 fern/products/sdk-reference/go/_meta.json create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/cmd/swaig-test/main/basic-auth/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/cmd/swaig-test/main/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/cmd/swaig-test/main/lambda-sim-result/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/cmd/swaig-test/main/simulate-lambda-options/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/agent/agent/agent-base/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/agent/agent/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/agent/agent/mcp-server-config/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/agent/agent/tool-definition/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/contexts/contexts/context-builder/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/contexts/contexts/context/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/contexts/contexts/gather-info/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/contexts/contexts/gather-question/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/contexts/contexts/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/contexts/contexts/step/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/datamap/datamap/expression-pattern/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/datamap/datamap/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/lambda/lambda/handler/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/lambda/lambda/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/agent-handoff/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/agent-session/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/agent/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/cartesia-tts/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/chat-context/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/chat-message/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/deepgram-stt/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/eleven-labs-tts/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/google-stt/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/inference-llm/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/inference-stt/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/inference-tts/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/job-context/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/job-process/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/live-server/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/open-aillm/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/open-aitts/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/room/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/run-context/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/silero-vad/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/stop-response/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/tool-error/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/logging/logging/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/logging/logging/logger/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/pom/pom/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/pom/pom/prompt-object-model/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/pom/pom/section/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/amenity/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/bedrock-agent/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/bedrock-options/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/concierge-agent/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/concierge-options/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/department/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/faq-bot-agent/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/faq-bot-options/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/faq/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/info-gatherer-agent/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/info-gatherer-options/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/question/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/receptionist-agent/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/receptionist-options/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/survey-agent/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/survey-options/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/survey-question/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/action/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/ai-action/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/ai-event/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/call-receive-event/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/call-state-event/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/call/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/calling-error-event/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/client/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/collect-action/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/collect-event/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/collect-params/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/conference-event/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/connect-event/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/denoise-event/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/detect-action/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/detect-event/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/device/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/dial-event/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/echo-event/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/fax-action/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/fax-event/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/hold-event/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/message-receive-event/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/message-state-event/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/message/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/pay-action/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/pay-event/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/play-action/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/play-event/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/queue-event/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/record-action/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/record-event/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/refer-event/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/relay-error/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/relay-event/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/send-digits-event/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/standalone-collect-action/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/stream-action/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/stream-event/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/tap-action/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/tap-event/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/transcribe-action/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/transcribe-event/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/addresses-namespace/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/auto-materialized-webhook-resource/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/call-flow-options/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/call-flows-resource/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/calling-namespace/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/chat-namespace/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-accounts/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-applications/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-calls/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-conferences/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-faxes/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-laml-bins/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-messages/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-namespace/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-phone-numbers/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-queues/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-recordings/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-tokens/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-transcriptions/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/conference-logs/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/conference-rooms-resource/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/crud-resource/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/crud-with-addresses/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/cxml-applications-resource/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/cxml-webhook-options/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/datasphere-documents/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/datasphere-namespace/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/fabric-addresses/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/fabric-namespace/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/fabric-tokens/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/fax-logs/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/generic-resources/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/imported-numbers-namespace/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/logs-namespace/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/lookup-namespace/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/message-logs/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/mfa-namespace/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/number-groups-namespace/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/phone-numbers-namespace/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/project-namespace/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/project-tokens/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/pub-sub-namespace/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/queues-namespace/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/recordings-namespace/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/registry-brands/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/registry-campaigns/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/registry-namespace/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/registry-numbers/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/registry-orders/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/relay-topic-options/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/resource/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/short-codes-namespace/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/sip-profile-namespace/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/subscribers-resource/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/verified-callers-namespace/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-conference-tokens/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-conferences/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-namespace/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-room-recordings/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-room-sessions/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-room-tokens/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-rooms/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-streams/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/voice-logs/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/rest/crud-resource/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/rest/http-client/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/rest/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/rest/paginated-iterator/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/rest/rest-client/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/rest/signal-wire-rest-error/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/security/security/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/security/security/session-manager/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/security/security/webhook-opts/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/server/server/agent-entry/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/server/server/agent-server/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/server/server/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/api-ninjas-trivia-skill/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/claude-skills-skill/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/custom-skills-skill/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/data-sphere-serverless-skill/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/data-sphere-skill/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/date-time-skill/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/google-maps-skill/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/info-gatherer-skill/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/joke-skill/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/math-skill/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/mcp-gateway-skill/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/native-vector-search-skill/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/play-background-file-skill/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/spider-skill/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/swml-transfer-skill/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/weather-api-skill/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/web-search-skill/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/wikipedia-search-skill/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/skills/base-skill/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/skills/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/skills/skill-manager/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/skills/skill-registry/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/skills/tool-registration/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig/function-result/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig/join-conference-options/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig/params/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig/pay-options/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig/prop/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig/record-call-options/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/ai-verb-handler/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/document/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/schema-utils/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/schema-validation-error/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/schema/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/security-config/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/service/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/tool-definition/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/validation-result/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/verb-info/index.mdx create mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/util/util/index.mdx create mode 100644 fern/products/sdk-reference/go/index.mdx create mode 100644 fern/products/sdk-reference/java/_meta.json create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/agent/agent/agent-base/builder/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/agent/agent/agent-base/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/agent/agent/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/cli/cli/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/cli/cli/swaig-test/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/cli/simulation/simulation/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/cli/simulation/simulation/serverless-simulator/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/contexts/contexts/context-builder/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/contexts/contexts/context/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/contexts/contexts/gather-info/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/contexts/contexts/gather-question/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/contexts/contexts/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/contexts/contexts/step/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/datamap/datamap/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/logging/logging/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/logging/logging/logger/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/pom/pom/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/pom/pom/prompt-object-model/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/pom/pom/section/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/prefabs/prefabs/concierge-agent/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/prefabs/prefabs/faq-bot-agent/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/prefabs/prefabs/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/prefabs/prefabs/info-gatherer-agent/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/prefabs/prefabs/receptionist-agent/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/prefabs/prefabs/survey-agent/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/ai-action/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/collect-action/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/detect-action/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/pay-action/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/play-action/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/play-and-collect-action/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/receive-fax-action/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/record-action/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/send-fax-action/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/stream-action/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/tap-action/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/transcribe-action/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/call/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/constants/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/device/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/message/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-client/builder/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-client/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-error/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/authorization-state-event/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-collect-event/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-connect-event/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-detect-event/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-dial-event/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-fax-event/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-pay-event/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-play-event/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-receive-event/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-record-event/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-refer-event/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-send-digits-event/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-state-event/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-stream-event/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-tap-event/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-transcribe-event/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/conference-event/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/messaging-receive-event/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/messaging-state-event/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/queue-event/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/addresses-namespace/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/billing-namespace/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/calling-namespace/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/campaign-namespace/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/chat-namespace/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-accounts/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-applications/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-calls/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-conferences/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-faxes/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-laml-bins/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-messages/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-phone-numbers/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-queues/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-recordings/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-tokens/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-transcriptions/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compliance-namespace/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/conference-namespace/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/datasphere-namespace/datasphere-documents/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/datasphere-namespace/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/call-flows-resource/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/conference-rooms-resource/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/cxml-applications-resource/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/fabric-addresses/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/fabric-subscribers/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/fabric-tokens/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/generic-resources/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fax-namespace/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/imported-numbers-namespace/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/logs-namespace/conference-logs/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/logs-namespace/fax-logs/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/logs-namespace/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/logs-namespace/message-logs/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/logs-namespace/voice-logs/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/messaging-namespace/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/mfa-namespace/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/number-groups-namespace/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/number-lookup-namespace/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/phone-numbers-namespace/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/project-namespace/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/project-namespace/project-tokens/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/pub-sub-namespace/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/queue-namespace/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/recording-namespace/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/registry-namespace/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/registry-namespace/registry-brands/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/registry-namespace/registry-campaigns/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/registry-namespace/registry-numbers/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/registry-namespace/registry-orders/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/short-codes-namespace/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/sip-namespace/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/sip-profile-namespace/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/stream-namespace/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/swml-namespace/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/transcription-namespace/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/video-namespace/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/video-namespace/video-conference-tokens/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/video-namespace/video-conferences/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/video-namespace/video-room-recordings/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/video-namespace/video-room-sessions/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/video-namespace/video-rooms/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/video-namespace/video-streams/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/rest/crud-resource/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/rest/http-client/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/rest/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/rest/paginated-iterator/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/rest/rest-client/builder/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/rest/rest-client/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/rest/rest-error/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/runtime/lambda/lambda/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/runtime/lambda/lambda/lambda-agent-handler/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/runtime/lambda/lambda/lambda-response/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/runtime/runtime/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/runtime/runtime/lambda-url-resolver/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/sdk/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/sdk/signalwire/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/security/security/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/security/security/session-manager/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/security/security/webhook-filter/cached-body-http-servlet-request/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/security/security/webhook-filter/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/security/security/webhook-validator/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/server/server/agent-server/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/server/server/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/api-ninja-trivia-skill/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/claude-skills-skill/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/custom-skills-skill/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/datasphere-serverless-skill/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/datasphere-skill/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/datetime-skill/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/google-maps-skill/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/info-gatherer-skill/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/joke-skill/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/math-skill/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/mcp-gateway-skill/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/native-vector-search-skill/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/play-background-file-skill/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/spider-skill/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/swml-transfer-skill/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/weather-api-skill/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/web-search-skill/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/wikipedia-search-skill/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/skills/skills/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/skills/skills/skill-manager/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/skills/skills/skill-registry/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/swaig/swaig/function-result/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/swaig/swaig/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/swaig/swaig/parameter-schema/builder/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/swaig/swaig/parameter-schema/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/swaig/swaig/tool-definition/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/swml/swml/document/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/swml/swml/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/swml/swml/schema-utils/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/swml/swml/schema-utils/verb-info/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/swml/swml/schema-validation-error/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/swml/swml/schema/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/swml/swml/service/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/tools/tools/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/utils/utils/index.mdx create mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/utils/utils/url-validator/index.mdx create mode 100644 fern/products/sdk-reference/java/index.mdx create mode 100644 fern/products/sdk-reference/perl/_meta.json create mode 100644 fern/products/sdk-reference/perl/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/agent/agent-base/agent-base/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/core/logging-config/logging-config/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/pom/prompt-object-model/prompt-object-model/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/pom/section/section/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/prefabs/concierge/concierge/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/prefabs/faq-bot/faq-bot/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/prefabs/info-gatherer/info-gatherer/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/prefabs/receptionist/receptionist/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/prefabs/survey/survey/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/relay/action/action/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/relay/call-state/call-state/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/relay/call/call/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/relay/client/client/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/relay/constants/constants/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/relay/device/device/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/relay/dial-state/dial-state/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/relay/event/event/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/relay/message-state/message-state/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/relay/message/message/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/rest/http-client/http-client/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/rest/namespaces/base/base/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/rest/namespaces/calling/calling/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/rest/namespaces/chat/chat/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/rest/namespaces/compat/compat/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/rest/namespaces/datasphere/datasphere/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/rest/namespaces/fabric/fabric/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/rest/namespaces/logs/logs/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/rest/namespaces/phone-numbers/phone-numbers/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/rest/namespaces/project/project/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/rest/namespaces/pub-sub/pub-sub/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/rest/namespaces/registry/registry/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/rest/namespaces/resources/resources/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/rest/namespaces/video/video/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/rest/pagination/pagination/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/rest/phone-call-handler/phone-call-handler/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/rest/rest-client/rest-client/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/security/session-manager/session-manager/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/security/webhook-middleware/webhook-middleware/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/security/webhook-validator/webhook-validator/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/server/agent-server/agent-server/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/signal-wire/contexts/context-builder/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/signal-wire/contexts/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/signal-wire/data-map/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/signal-wire/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/signal-wire/logging/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/signal-wire/logging/log-level/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/signal-wire/utils/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/signal-wire/utils/url-validator/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/skills/builtin/api-ninjas-trivia/api-ninjas-trivia/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/skills/builtin/claude-skills/claude-skills/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/skills/builtin/custom-skills/custom-skills/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/skills/builtin/datasphere-serverless/datasphere-serverless/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/skills/builtin/datasphere/datasphere/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/skills/builtin/datetime/datetime/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/skills/builtin/google-maps/google-maps/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/skills/builtin/info-gatherer/info-gatherer/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/skills/builtin/joke/joke/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/skills/builtin/math/math/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/skills/builtin/mcp-gateway/mcp-gateway/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/skills/builtin/native-vector-search/native-vector-search/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/skills/builtin/play-background-file/play-background-file/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/skills/builtin/spider/spider/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/skills/builtin/swml-transfer/swml-transfer/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/skills/builtin/weather-api/weather-api/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/skills/builtin/web-search/web-search/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/skills/builtin/wikipedia-search/wikipedia-search/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/skills/skill-base/skill-base/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/skills/skill-manager/skill-manager/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/skills/skill-name/skill-name/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/skills/skill-registry/skill-registry/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/swaig/function-result/function-result/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/swaig/join-conference/join-conference/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/swaig/parameter-schema/parameter-schema/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/swaig/record-call/record-call/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/swaig/tap/tap/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/swml/document/document/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/swml/schema/schema/index.mdx create mode 100644 fern/products/sdk-reference/perl/signal-wire/swml/service/service/index.mdx create mode 100644 fern/products/sdk-reference/php/_meta.json create mode 100644 fern/products/sdk-reference/php/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/contexts/contexts/context-builder/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/contexts/contexts/context/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/contexts/contexts/gather-info/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/contexts/contexts/gather-question/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/contexts/contexts/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/contexts/contexts/step/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/data-map/data-map/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/logging/logging/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/logging/logging/logger/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/logging/logging/logging-config/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/pom/pom/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/pom/pom/prompt-object-model/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/pom/pom/section/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/relay/relay/action/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/relay/relay/ai-action/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/relay/relay/call/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/relay/relay/client/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/relay/relay/collect-action/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/relay/relay/constants/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/relay/relay/detect-action/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/relay/relay/device/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/relay/relay/event/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/relay/relay/fax-action/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/relay/relay/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/relay/relay/message/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/relay/relay/pay-action/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/relay/relay/play-action/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/relay/relay/record-action/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/relay/relay/relay-error/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/relay/relay/stream-action/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/relay/relay/tap-action/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/relay/relay/transcribe-action/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/relay/relay/web-socket/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/addresses/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/calling/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/compat-accounts/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/compat-conferences/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/compat-phone-numbers/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/compat-recordings/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/compat-tokens/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/compat-transcriptions/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/compat/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/conference-logs/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/datasphere/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/fabric-addresses/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/fabric-generic-resources/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/fabric-tokens/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/fabric/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/fax-logs/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/imported-numbers/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/logs/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/message-logs/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/mfa/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/project-tokens/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/project/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/recordings/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/registry-brands/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/registry-campaigns/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/registry-numbers/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/registry-orders/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/registry/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/short-codes/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/sip-profile/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/video-conference-tokens/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/video-room-recordings/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/video-room-sessions/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/video-room-tokens/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/video-streams/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/video/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/voice-logs/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/rest/rest/base-resource/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/rest/rest/crud-resource/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/rest/rest/crud-with-addresses/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/rest/rest/http-client/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/rest/rest/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/rest/rest/paginated-iterator/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/rest/rest/rest-client/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/rest/rest/signal-wire-rest-error/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/security/security/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/security/security/session-manager/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/security/security/webhook-middleware/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/security/security/webhook-validator/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/server/server/agent-server/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/server/server/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/serverless/serverless/adapter/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/serverless/serverless/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/signal-wire/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/api-ninjas-trivia/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/claude-skills/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/custom-skills/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/datasphere-serverless/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/datasphere/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/datetime/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/google-maps/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/info-gatherer/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/joke/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/math/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/mcp-gateway/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/native-vector-search/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/play-background-file/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/spider/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/swml-transfer/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/weather-api/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/web-search/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/wikipedia-search/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/skills/skills/http-helper/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/skills/skills/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/skills/skills/skill-base/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/skills/skills/skill-manager/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/skills/skills/skill-registry/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/swaig/swaig/function-result/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/swaig/swaig/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/swaig/swaig/parameter-schema/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/swml/swml/document/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/swml/swml/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/swml/swml/schema/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/swml/swml/service/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/utils/utils/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/utils/utils/schema-utils/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/utils/utils/schema-validation-error/index.mdx create mode 100644 fern/products/sdk-reference/php/signal-wire/utils/utils/url-validator/index.mdx create mode 100644 fern/products/sdk-reference/python/_meta.json create mode 100644 fern/products/sdk-reference/python/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/agent-server/agent-server/add-security-headers.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/agent-server/agent-server/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/agent-server/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/cli/build-search/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/cli/config/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/cli/core/agent-loader/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/cli/core/argparse-helpers/custom-argument-parser/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/cli/core/argparse-helpers/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/cli/core/dynamic-config/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/cli/core/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/cli/core/service-loader/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/cli/core/service-loader/service-capture/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/cli/dokku/colors/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/cli/dokku/dokku-project-generator/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/cli/dokku/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/cli/execution/datamap-exec/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/cli/execution/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/cli/execution/webhook-exec/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/cli/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/cli/init-project/colors/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/cli/init-project/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/cli/init-project/project-generator/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/cli/output/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/cli/output/output-formatter/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/cli/output/swml-dump/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/cli/simulation/data-generation/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/cli/simulation/data-overrides/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/cli/simulation/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/cli/simulation/mock-env/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/cli/simulation/mock-env/mock-headers/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/cli/simulation/mock-env/mock-query-params/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/cli/simulation/mock-env/mock-request/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/cli/simulation/mock-env/mock-url/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/cli/simulation/mock-env/serverless-simulator/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/cli/swaig-test-wrapper/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/cli/test-swaig/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/cli/types/agent-info/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/cli/types/call-data/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/cli/types/data-map-config/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/cli/types/function-info/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/cli/types/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/cli/types/post-data/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/cli/types/vars-data/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/agent-base/agent-base/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/agent-base/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/agent/config/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/agent/deployment/handlers/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/agent/deployment/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/agent/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/agent/prompt/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/agent/prompt/manager/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/agent/prompt/manager/prompt-manager/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/agent/routing/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/agent/security/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/agent/swml/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/agent/tools/decorator/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/agent/tools/decorator/tool-decorator/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/agent/tools/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/agent/tools/registry/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/agent/tools/registry/tool-registry/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/agent/tools/type-inference/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/auth-handler/auth-handler/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/auth-handler/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/config-loader/config-loader/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/config-loader/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/contexts/context-builder/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/contexts/context/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/contexts/gather-info/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/contexts/gather-question/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/contexts/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/contexts/step/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/data-map/data-map/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/data-map/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/function-result/function-result/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/function-result/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/logging-config/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/mixins/ai-config-mixin/ai-config-mixin/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/mixins/ai-config-mixin/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/mixins/auth-mixin/auth-mixin/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/mixins/auth-mixin/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/mixins/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/mixins/mcp-server-mixin/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/mixins/mcp-server-mixin/mcp-server-mixin/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/mixins/prompt-mixin/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/mixins/prompt-mixin/prompt-mixin/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/mixins/serverless-mixin/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/mixins/serverless-mixin/serverless-mixin/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/mixins/skill-mixin/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/mixins/skill-mixin/skill-mixin/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/mixins/state-mixin/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/mixins/state-mixin/state-mixin/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/mixins/tool-mixin/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/mixins/tool-mixin/tool-mixin/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/mixins/web-mixin/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/mixins/web-mixin/web-mixin/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/pom-builder/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/pom-builder/pom-builder/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/security-config/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/security-config/security-config/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/security/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/security/session-manager/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/security/session-manager/session-manager/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/security/webhook-middleware/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/security/webhook-validator/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/skill-base/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/skill-base/skill-base/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/skill-manager/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/skill-manager/skill-manager/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/swaig-function/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/swaig-function/swaig-function/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/swml-builder/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/swml-builder/swml-builder/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/swml-handler/ai-verb-handler/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/swml-handler/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/swml-handler/swml-verb-handler/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/swml-handler/verb-handler-registry/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/swml-renderer/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/swml-renderer/swml-renderer/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/swml-service/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/core/swml-service/swml-service/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/livewire/agent-handoff/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/livewire/agent-server/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/livewire/agent-session/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/livewire/agent/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/livewire/chat-context/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/livewire/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/livewire/inference-llm/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/livewire/inference-stt/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/livewire/inference-tts/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/livewire/job-context/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/livewire/job-process/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/livewire/plugins/cartesia-tts/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/livewire/plugins/deepgram-stt/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/livewire/plugins/eleven-labs-tts/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/livewire/plugins/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/livewire/plugins/open-aillm/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/livewire/plugins/silero-vad/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/livewire/room/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/livewire/run-context/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/livewire/stop-response/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/livewire/tool-error/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/mcp-gateway/gateway-service/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/mcp-gateway/gateway-service/mcp-gateway/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/mcp-gateway/gateway-service/mcp-gateway/set-security-headers.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/mcp-gateway/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/mcp-gateway/mcp-manager/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/mcp-gateway/mcp-manager/mcp-client/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/mcp-gateway/mcp-manager/mcp-manager/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/mcp-gateway/mcp-manager/mcp-service/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/mcp-gateway/session-manager/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/mcp-gateway/session-manager/session-manager/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/mcp-gateway/session-manager/session/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/pom/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/pom/pom-tool/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/pom/pom/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/pom/pom/prompt-object-model/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/pom/pom/section/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/prefabs/concierge/concierge-agent/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/prefabs/concierge/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/prefabs/faq-bot/faq-bot-agent/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/prefabs/faq-bot/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/prefabs/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/prefabs/info-gatherer/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/prefabs/info-gatherer/info-gatherer-agent/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/prefabs/receptionist/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/prefabs/receptionist/receptionist-agent/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/prefabs/survey/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/prefabs/survey/survey-agent/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/relay/call/action/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/relay/call/ai-action/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/relay/call/collect-action/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/relay/call/detect-action/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/relay/call/fax-action/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/relay/call/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/relay/call/pay-action/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/relay/call/play-action/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/relay/call/record-action/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/relay/call/standalone-collect-action/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/relay/call/stream-action/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/relay/call/tap-action/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/relay/call/transcribe-action/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/relay/client/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/relay/client/relay-client/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/relay/client/relay-error/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/relay/constants/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/relay/event/call-receive-event/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/relay/event/call-state-event/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/relay/event/calling-error-event/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/relay/event/collect-event/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/relay/event/conference-event/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/relay/event/connect-event/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/relay/event/denoise-event/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/relay/event/detect-event/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/relay/event/dial-event/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/relay/event/echo-event/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/relay/event/fax-event/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/relay/event/hold-event/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/relay/event/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/relay/event/message-receive-event/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/relay/event/message-state-event/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/relay/event/pay-event/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/relay/event/play-event/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/relay/event/queue-event/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/relay/event/record-event/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/relay/event/refer-event/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/relay/event/relay-event/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/relay/event/send-digits-event/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/relay/event/stream-event/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/relay/event/tap-event/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/relay/event/transcribe-event/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/relay/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/relay/message/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/call-handler/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/call-handler/phone-call-handler/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/client/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/client/rest-client/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/addresses/addresses-resource/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/addresses/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/calling/calling-namespace/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/calling/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/chat/chat-resource/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/chat/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-accounts/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-applications/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-calls/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-conferences/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-faxes/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-laml-bins/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-messages/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-namespace/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-phone-numbers/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-queues/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-recordings/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-tokens/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-transcriptions/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/datasphere/datasphere-documents/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/datasphere/datasphere-namespace/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/datasphere/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/auto-materialized-webhook/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/call-flows-resource/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/conference-rooms-resource/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/cxml-applications-resource/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/cxml-webhooks-resource/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/fabric-addresses/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/fabric-namespace/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/fabric-resource-put/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/fabric-resource/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/fabric-tokens/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/generic-resources/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/subscribers-resource/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/swml-webhooks-resource/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/imported-numbers/imported-numbers-resource/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/imported-numbers/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/logs/conference-logs/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/logs/fax-logs/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/logs/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/logs/logs-namespace/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/logs/message-logs/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/logs/voice-logs/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/lookup/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/lookup/lookup-resource/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/mfa/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/mfa/mfa-resource/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/number-groups/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/number-groups/number-groups-resource/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/phone-numbers/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/phone-numbers/phone-numbers-resource/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/project/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/project/project-namespace/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/project/project-tokens/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/pubsub/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/pubsub/pub-sub-resource/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/queues/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/queues/queues-resource/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/recordings/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/recordings/recordings-resource/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/registry/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/registry/registry-brands/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/registry/registry-campaigns/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/registry/registry-namespace/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/registry/registry-numbers/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/registry/registry-orders/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/short-codes/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/short-codes/short-codes-resource/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/sip-profile/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/sip-profile/sip-profile-resource/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/verified-callers/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/verified-callers/verified-callers-resource/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/video/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/video/video-conference-tokens/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/video/video-conferences/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/video/video-namespace/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/video/video-room-recordings/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/video/video-room-sessions/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/video/video-room-tokens/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/video/video-rooms/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/video/video-streams/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/search/document-processor/document-processor/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/search/document-processor/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/search/document-processor/index__2.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/search/index-builder/index-builder/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/search/index-builder/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/search/index-builder/index__2.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/search/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/search/migration/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/search/migration/search-index-migrator/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/search/models/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/search/pgvector-backend/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/search/pgvector-backend/pg-vector-backend/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/search/pgvector-backend/pg-vector-search-backend/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/search/query-processor/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/search/search-engine/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/search/search-engine/index__2.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/search/search-engine/search-engine/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/search/search-service/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/search/search-service/index__2.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/search/search-service/search-request/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/search/search-service/search-response/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/search/search-service/search-result/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/search/search-service/search-service/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/skills/api-ninjas-trivia/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/skills/api-ninjas-trivia/skill/api-ninjas-trivia-skill/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/skills/api-ninjas-trivia/skill/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/skills/claude-skills/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/skills/claude-skills/skill/claude-skills-skill/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/skills/claude-skills/skill/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/skills/datasphere-serverless/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/skills/datasphere-serverless/skill/data-sphere-serverless-skill/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/skills/datasphere-serverless/skill/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/skills/datasphere/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/skills/datasphere/skill/data-sphere-skill/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/skills/datasphere/skill/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/skills/datetime/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/skills/datetime/skill/date-time-skill/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/skills/datetime/skill/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/skills/google-maps/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/skills/google-maps/skill/google-maps-client/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/skills/google-maps/skill/google-maps-skill/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/skills/google-maps/skill/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/skills/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/skills/info-gatherer/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/skills/info-gatherer/skill/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/skills/info-gatherer/skill/info-gatherer-skill/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/skills/joke/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/skills/joke/skill/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/skills/joke/skill/joke-skill/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/skills/math/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/skills/math/skill/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/skills/math/skill/math-skill/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/skills/mcp-gateway/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/skills/mcp-gateway/skill/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/skills/mcp-gateway/skill/mcp-gateway-skill/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/skills/native-vector-search/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/skills/native-vector-search/skill/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/skills/native-vector-search/skill/native-vector-search-skill/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/skills/play-background-file/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/skills/play-background-file/skill/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/skills/play-background-file/skill/play-background-file-skill/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/skills/registry/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/skills/registry/skill-registry/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/skills/spider/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/skills/spider/skill/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/skills/spider/skill/spider-skill/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/skills/swml-transfer/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/skills/swml-transfer/skill/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/skills/swml-transfer/skill/swml-transfer-skill/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/skills/weather-api/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/skills/weather-api/skill/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/skills/weather-api/skill/weather-api-skill/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/skills/web-search/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/skills/web-search/skill-improved/google-search-scraper/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/skills/web-search/skill-improved/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/skills/web-search/skill-improved/web-search-skill/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/skills/web-search/skill-original/google-search-scraper/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/skills/web-search/skill-original/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/skills/web-search/skill-original/web-search-skill/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/skills/web-search/skill/google-search-scraper/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/skills/web-search/skill/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/skills/web-search/skill/web-search-skill/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/skills/wikipedia-search/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/skills/wikipedia-search/skill/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/skills/wikipedia-search/skill/wikipedia-search-skill/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/utils/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/utils/pom-utils/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/utils/schema-utils/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/utils/schema-utils/schema-utils/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/utils/schema-utils/schema-validation-error/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/utils/token-generators/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/utils/url-validator/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/utils/validators/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/web/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/web/web-service/index.mdx create mode 100644 fern/products/sdk-reference/python/signalwire/web/web-service/web-service/index.mdx create mode 100644 fern/products/sdk-reference/ruby/_meta.json create mode 100644 fern/products/sdk-reference/ruby/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/agent-base/agent-body-limit-middleware/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/agent-base/agent-security-headers-middleware/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/agent-base/agent-timing-safe-basic-auth/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/agent-base/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/agent-server/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/contexts/context-builder/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/contexts/context/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/contexts/gather-info/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/contexts/gather-question/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/contexts/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/contexts/step/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/core/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/core/logging-config/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/data-map/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/logging/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/logging/logger/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/pom/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/pom/prompt-object-model/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/pom/section/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/prefabs/concierge/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/prefabs/faq-bot/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/prefabs/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/prefabs/info-gatherer/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/prefabs/receptionist/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/prefabs/survey/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/action-timeout-error/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/action/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/ai-action/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/call-receive-event/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/call-state-event/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/call-state/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/call/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/calling-error-event/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/client/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/collect-action/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/collect-config/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/collect-event/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/conference-event/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/connect-event/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/denoise-event/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/detect-action/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/detect-event/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/device/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/dial-event/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/dial-state/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/echo-event/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/fax-action/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/fax-event/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/hold-event/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/message-receive-event/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/message-state-event/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/message-state/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/message/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/pay-action/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/pay-event/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/play-action/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/play-event/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/queue-event/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/record-action/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/record-event/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/refer-event/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/relay-error/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/relay-event/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/send-digits-event/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/standalone-collect-action/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/stream-action/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/stream-event/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/tap-action/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/tap-event/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/transcribe-action/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/transcribe-event/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/base-resource/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/crud-resource/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/crud-with-addresses/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/http-client/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/addresses-resource/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/auto-materialized-webhook/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/call-flows-resource/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/calling-namespace/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/chat-resource/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-accounts/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-applications/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-calls/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-conferences/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-faxes/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-laml-bins/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-messages/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-namespace/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-phone-numbers/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-queues/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-recordings/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-tokens/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-transcriptions/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/conference-logs/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/conference-rooms-resource/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/cxml-applications-resource/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/cxml-webhooks-resource/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/datasphere-documents/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/datasphere-namespace/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/fabric-addresses/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/fabric-namespace/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/fabric-resource-put/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/fabric-resource/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/fabric-tokens/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/fax-logs/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/generic-resources/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/imported-numbers-resource/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/logs-namespace/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/lookup-resource/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/message-logs/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/mfa-resource/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/number-groups-resource/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/phone-numbers-resource/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/project-namespace/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/project-tokens/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/pub-sub-resource/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/queues-resource/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/recordings-resource/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/registry-brands/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/registry-campaigns/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/registry-namespace/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/registry-numbers/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/registry-orders/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/short-codes-resource/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/sip-profile-resource/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/subscribers-resource/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/swml-webhooks-resource/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/verified-callers-resource/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/video-conference-tokens/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/video-conferences/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/video-namespace/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/video-room-recordings/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/video-room-sessions/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/video-room-tokens/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/video-rooms/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/video-streams/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/voice-logs/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/paginated-iterator/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/phone-call-handler/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/rest-client/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/signal-wire-rest-error/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/runtime/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/security/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/security/session-manager/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/security/webhook-middleware/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/security/webhook-validator/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/serverless/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/serverless/lambda-handler/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/skills/builtin/api-ninjas-trivia-skill/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/skills/builtin/claude-skills-skill/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/skills/builtin/custom-skills-skill/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/skills/builtin/datasphere-serverless-skill/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/skills/builtin/datasphere-skill/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/skills/builtin/date-time-skill/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/skills/builtin/google-maps-skill/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/skills/builtin/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/skills/builtin/info-gatherer-skill/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/skills/builtin/joke-skill/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/skills/builtin/math-skill/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/skills/builtin/mcp-gateway-skill/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/skills/builtin/native-vector-search-skill/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/skills/builtin/play-background-file-skill/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/skills/builtin/spider-skill/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/skills/builtin/swml-transfer-skill/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/skills/builtin/weather-api-skill/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/skills/builtin/web-search-skill/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/skills/builtin/wikipedia-search-skill/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/skills/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/skills/skill-base/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/skills/skill-manager/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/skills/skill-name/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/skills/skill-registry/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/swaig/codec/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/swaig/function-result/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/swaig/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/swaig/parameter-schema/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/swaig/record-direction/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/swaig/record-format/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/swaig/tap-direction/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/swml/document/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/swml/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/swml/schema/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/swml/service/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/swml/service/security-headers-middleware/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/swml/service/timing-safe-basic-auth/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/utils/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/utils/schema-utils/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/utils/schema-validation-error/index.mdx create mode 100644 fern/products/sdk-reference/ruby/signal-wire/utils/url-validator/index.mdx create mode 100644 fern/products/sdk-reference/rust/_meta.json create mode 100644 fern/products/sdk-reference/rust/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/agent/agent-base/agent-base/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/agent/agent-base/agent-options/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/agent/agent-base/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/agent/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/contexts/context-builder/context-builder/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/contexts/context-builder/context/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/contexts/context-builder/gather-info/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/contexts/context-builder/gather-question/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/contexts/context-builder/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/contexts/context-builder/step/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/contexts/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/core/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/core/logging-config/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/datamap/datamap/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/datamap/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/logging/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/logging/logger/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/logging/parse-level-error/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/pom/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/pom/pom/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/pom/pom/prompt-object-model/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/pom/section/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/prefabs/bedrock/bedrock-agent/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/prefabs/bedrock/bedrock-options/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/prefabs/bedrock/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/prefabs/concierge/concierge-agent/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/prefabs/concierge/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/prefabs/faq-bot/faq-bot-agent/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/prefabs/faq-bot/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/prefabs/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/prefabs/info-gatherer/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/prefabs/info-gatherer/info-gatherer-agent/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/prefabs/receptionist/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/prefabs/receptionist/receptionist-agent/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/prefabs/survey/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/prefabs/survey/survey-agent/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/relay/action/ai-action/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/relay/action/collect-action/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/relay/action/detect-action/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/relay/action/fax-action/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/relay/action/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/relay/action/pay-action/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/relay/action/play-action/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/relay/action/record-action/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/relay/action/stream-action/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/relay/action/tap-action/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/relay/action/transcribe-action/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/relay/call/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/relay/client/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/relay/constants/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/relay/device/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/relay/error/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/relay/event/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/relay/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/relay/message/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/relay/state-enums/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/rest/client/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/rest/client/rest-client/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/rest/crud-resource/crud-resource/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/rest/crud-resource/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/rest/error/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/rest/error/signal-wire-rest-error/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/rest/http-client/http-client/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/rest/http-client/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/rest/http-client/stub-transport/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/rest/http-client/ureq-transport/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/rest/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/calling/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-accounts/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-applications/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-calls/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-conferences/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-faxes/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-laml-bins/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-messages/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-phone-numbers/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-queues/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-recordings/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-tokens/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-transcriptions/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/datasphere/datasphere-documents/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/datasphere/datasphere-namespace/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/datasphere/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/fabric/call-flows-resource/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/fabric/conference-rooms-resource/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/fabric/cxml-applications-resource/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/fabric/fabric-addresses/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/fabric/fabric-tokens/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/fabric/generic-resources/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/fabric/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/fabric/subscribers-resource/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/logs/conference-logs/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/logs/fax-logs/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/logs/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/logs/message-logs/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/logs/voice-logs/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/mfa/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/number-groups/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/number-groups/number-groups/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/project/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/project/project-tokens/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/queues/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/registry/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/registry/registry-brands/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/registry/registry-campaigns/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/registry/registry-numbers/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/registry/registry-orders/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/sip-profile/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/sip-profile/sip-profile/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/video/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/video/video-conference-tokens/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/video/video-conferences/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/video/video-room-recordings/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/video/video-room-sessions/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/video/video-room-tokens/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/video/video-rooms/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/video/video-streams/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/rest/pagination/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/rest/pagination/paginated-iterator/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/security/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/security/session-manager/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/security/session-manager/session-manager/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/security/webhook-layer/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/security/webhook-layer/webhook-layer/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/security/webhook-layer/webhook-validate/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/security/webhook/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/server/agent-server/agent-server/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/server/agent-server/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/server/error/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/server/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/serverless/adapter/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/serverless/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/skill-spec/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/skills/builtin/api-ninjas-trivia/api-ninjas-trivia/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/skills/builtin/api-ninjas-trivia/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/skills/builtin/claude-skills/claude-skills/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/skills/builtin/claude-skills/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/skills/builtin/custom-skills/custom-skills/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/skills/builtin/custom-skills/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/skills/builtin/datasphere-serverless/datasphere-serverless/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/skills/builtin/datasphere-serverless/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/skills/builtin/datasphere/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/skills/builtin/datetime/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/skills/builtin/google-maps/google-maps/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/skills/builtin/google-maps/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/skills/builtin/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/skills/builtin/info-gatherer/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/skills/builtin/info-gatherer/info-gatherer/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/skills/builtin/joke/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/skills/builtin/math/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/skills/builtin/mcp-gateway/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/skills/builtin/mcp-gateway/mcp-gateway/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/skills/builtin/native-vector-search/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/skills/builtin/native-vector-search/native-vector-search/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/skills/builtin/play-background-file/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/skills/builtin/play-background-file/play-background-file/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/skills/builtin/spider/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/skills/builtin/swml-transfer/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/skills/builtin/swml-transfer/swml-transfer/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/skills/builtin/weather-api/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/skills/builtin/weather-api/weather-api/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/skills/builtin/web-search/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/skills/builtin/web-search/web-search/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/skills/builtin/wikipedia-search/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/skills/builtin/wikipedia-search/wikipedia-search/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/skills/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/skills/skill-base/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/skills/skill-base/skill-params/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/skills/skill-manager/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/skills/skill-manager/skill-manager/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/skills/skill-name/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/skills/skill-name/parse-skill-name-error/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/skills/skill-registry/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/skills/skill-registry/skill-registry/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/swaig/function-result/function-result/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/swaig/function-result/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/swaig/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/swaig/media-enums/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/swaig/media-enums/parse-media-enum-error/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/swaig/params-builder/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/swaig/params-builder/params-builder/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/swaig/params-builder/property-builder/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/swml/document/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/swml/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/swml/schema/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/swml/schema/verb-info/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/swml/service/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/swml/service/service-options/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/swml/service/tool-def/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/utils/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/utils/schema-utils/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/utils/schema-utils/schema-utils/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/utils/schema-utils/schema-validation-error/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/utils/schema-utils/verb-definition/index.mdx create mode 100644 fern/products/sdk-reference/rust/signalwire/utils/url-validator/index.mdx create mode 100644 fern/products/sdk-reference/sdk-reference.yml create mode 100644 fern/products/sdk-reference/typescript/_meta.json create mode 100644 fern/products/sdk-reference/typescript/add-skill-directory.mdx create mode 100644 fern/products/sdk-reference/typescript/agent-base/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agent-server/index.mdx create mode 100644 fern/products/sdk-reference/typescript/auth-handler/index.mdx create mode 100644 fern/products/sdk-reference/typescript/cli/agent-loader/index.mdx create mode 100644 fern/products/sdk-reference/typescript/cli/mock-data/index.mdx create mode 100644 fern/products/sdk-reference/typescript/cli/swaig-test/index.mdx create mode 100644 fern/products/sdk-reference/typescript/config-loader/index.mdx create mode 100644 fern/products/sdk-reference/typescript/context-builder/context/index.mdx create mode 100644 fern/products/sdk-reference/typescript/context-builder/gather-info/index.mdx create mode 100644 fern/products/sdk-reference/typescript/context-builder/gather-question/index.mdx create mode 100644 fern/products/sdk-reference/typescript/context-builder/index.mdx create mode 100644 fern/products/sdk-reference/typescript/context-builder/step/index.mdx create mode 100644 fern/products/sdk-reference/typescript/data-map/index.mdx create mode 100644 fern/products/sdk-reference/typescript/function-result/index.mdx create mode 100644 fern/products/sdk-reference/typescript/generate-verb-types/index.mdx create mode 100644 fern/products/sdk-reference/typescript/index.mdx create mode 100644 fern/products/sdk-reference/typescript/list-skills-with-params.mdx create mode 100644 fern/products/sdk-reference/typescript/list-skills.mdx create mode 100644 fern/products/sdk-reference/typescript/livewire/agent-handoff/index.mdx create mode 100644 fern/products/sdk-reference/typescript/livewire/agent-server/index.mdx create mode 100644 fern/products/sdk-reference/typescript/livewire/agent-session/index.mdx create mode 100644 fern/products/sdk-reference/typescript/livewire/agent/index.mdx create mode 100644 fern/products/sdk-reference/typescript/livewire/chat-context/index.mdx create mode 100644 fern/products/sdk-reference/typescript/livewire/index.mdx create mode 100644 fern/products/sdk-reference/typescript/livewire/inference/index.mdx create mode 100644 fern/products/sdk-reference/typescript/livewire/inference/llm/index.mdx create mode 100644 fern/products/sdk-reference/typescript/livewire/inference/stt/index.mdx create mode 100644 fern/products/sdk-reference/typescript/livewire/inference/tts/index.mdx create mode 100644 fern/products/sdk-reference/typescript/livewire/job-context/index.mdx create mode 100644 fern/products/sdk-reference/typescript/livewire/job-process/index.mdx create mode 100644 fern/products/sdk-reference/typescript/livewire/noop-tracker/index.mdx create mode 100644 fern/products/sdk-reference/typescript/livewire/plugins/cartesia-tts/index.mdx create mode 100644 fern/products/sdk-reference/typescript/livewire/plugins/deepgram-stt/index.mdx create mode 100644 fern/products/sdk-reference/typescript/livewire/plugins/eleven-labs-tts/index.mdx create mode 100644 fern/products/sdk-reference/typescript/livewire/plugins/index.mdx create mode 100644 fern/products/sdk-reference/typescript/livewire/plugins/open-aillm/index.mdx create mode 100644 fern/products/sdk-reference/typescript/livewire/plugins/silero-vad/index.mdx create mode 100644 fern/products/sdk-reference/typescript/livewire/room/index.mdx create mode 100644 fern/products/sdk-reference/typescript/livewire/run-context/index.mdx create mode 100644 fern/products/sdk-reference/typescript/livewire/server-options/index.mdx create mode 100644 fern/products/sdk-reference/typescript/livewire/stop-response/index.mdx create mode 100644 fern/products/sdk-reference/typescript/livewire/tool-error/index.mdx create mode 100644 fern/products/sdk-reference/typescript/livewire/worker-options/index.mdx create mode 100644 fern/products/sdk-reference/typescript/logger/index.mdx create mode 100644 fern/products/sdk-reference/typescript/parameter-schema/index.mdx create mode 100644 fern/products/sdk-reference/typescript/pom-builder/index.mdx create mode 100644 fern/products/sdk-reference/typescript/pom-builder/pom-section/index.mdx create mode 100644 fern/products/sdk-reference/typescript/pom/prompt-object-model/index.mdx create mode 100644 fern/products/sdk-reference/typescript/pom/prompt-object-model/section/index.mdx create mode 100644 fern/products/sdk-reference/typescript/prefabs/concierge-agent/index.mdx create mode 100644 fern/products/sdk-reference/typescript/prefabs/faq-bot-agent/index.mdx create mode 100644 fern/products/sdk-reference/typescript/prefabs/index.mdx create mode 100644 fern/products/sdk-reference/typescript/prefabs/info-gatherer-agent/index.mdx create mode 100644 fern/products/sdk-reference/typescript/prefabs/receptionist-agent/index.mdx create mode 100644 fern/products/sdk-reference/typescript/prefabs/survey-agent/index.mdx create mode 100644 fern/products/sdk-reference/typescript/prompt-manager/index.mdx create mode 100644 fern/products/sdk-reference/typescript/register-skill.mdx create mode 100644 fern/products/sdk-reference/typescript/relay/action/ai-action/index.mdx create mode 100644 fern/products/sdk-reference/typescript/relay/action/collect-action/index.mdx create mode 100644 fern/products/sdk-reference/typescript/relay/action/detect-action/index.mdx create mode 100644 fern/products/sdk-reference/typescript/relay/action/fax-action/index.mdx create mode 100644 fern/products/sdk-reference/typescript/relay/action/index.mdx create mode 100644 fern/products/sdk-reference/typescript/relay/action/pay-action/index.mdx create mode 100644 fern/products/sdk-reference/typescript/relay/action/play-action/index.mdx create mode 100644 fern/products/sdk-reference/typescript/relay/action/record-action/index.mdx create mode 100644 fern/products/sdk-reference/typescript/relay/action/standalone-collect-action/index.mdx create mode 100644 fern/products/sdk-reference/typescript/relay/action/stream-action/index.mdx create mode 100644 fern/products/sdk-reference/typescript/relay/action/tap-action/index.mdx create mode 100644 fern/products/sdk-reference/typescript/relay/action/transcribe-action/index.mdx create mode 100644 fern/products/sdk-reference/typescript/relay/call/index.mdx create mode 100644 fern/products/sdk-reference/typescript/relay/closed-sets/index.mdx create mode 100644 fern/products/sdk-reference/typescript/relay/constants/index.mdx create mode 100644 fern/products/sdk-reference/typescript/relay/deferred/index.mdx create mode 100644 fern/products/sdk-reference/typescript/relay/index.mdx create mode 100644 fern/products/sdk-reference/typescript/relay/message/index.mdx create mode 100644 fern/products/sdk-reference/typescript/relay/normalize/index.mdx create mode 100644 fern/products/sdk-reference/typescript/relay/relay-client/index.mdx create mode 100644 fern/products/sdk-reference/typescript/relay/relay-error/index.mdx create mode 100644 fern/products/sdk-reference/typescript/relay/relay-event/call-receive-event/index.mdx create mode 100644 fern/products/sdk-reference/typescript/relay/relay-event/call-state-event/index.mdx create mode 100644 fern/products/sdk-reference/typescript/relay/relay-event/calling-error-event/index.mdx create mode 100644 fern/products/sdk-reference/typescript/relay/relay-event/collect-event/index.mdx create mode 100644 fern/products/sdk-reference/typescript/relay/relay-event/conference-event/index.mdx create mode 100644 fern/products/sdk-reference/typescript/relay/relay-event/connect-event/index.mdx create mode 100644 fern/products/sdk-reference/typescript/relay/relay-event/denoise-event/index.mdx create mode 100644 fern/products/sdk-reference/typescript/relay/relay-event/detect-event/index.mdx create mode 100644 fern/products/sdk-reference/typescript/relay/relay-event/dial-event/index.mdx create mode 100644 fern/products/sdk-reference/typescript/relay/relay-event/echo-event/index.mdx create mode 100644 fern/products/sdk-reference/typescript/relay/relay-event/fax-event/index.mdx create mode 100644 fern/products/sdk-reference/typescript/relay/relay-event/from-payload.mdx create mode 100644 fern/products/sdk-reference/typescript/relay/relay-event/hold-event/index.mdx create mode 100644 fern/products/sdk-reference/typescript/relay/relay-event/index.mdx create mode 100644 fern/products/sdk-reference/typescript/relay/relay-event/message-receive-event/index.mdx create mode 100644 fern/products/sdk-reference/typescript/relay/relay-event/message-state-event/index.mdx create mode 100644 fern/products/sdk-reference/typescript/relay/relay-event/pay-event/index.mdx create mode 100644 fern/products/sdk-reference/typescript/relay/relay-event/play-event/index.mdx create mode 100644 fern/products/sdk-reference/typescript/relay/relay-event/queue-event/index.mdx create mode 100644 fern/products/sdk-reference/typescript/relay/relay-event/record-event/index.mdx create mode 100644 fern/products/sdk-reference/typescript/relay/relay-event/refer-event/index.mdx create mode 100644 fern/products/sdk-reference/typescript/relay/relay-event/send-digits-event/index.mdx create mode 100644 fern/products/sdk-reference/typescript/relay/relay-event/stream-event/index.mdx create mode 100644 fern/products/sdk-reference/typescript/relay/relay-event/tap-event/index.mdx create mode 100644 fern/products/sdk-reference/typescript/relay/relay-event/transcribe-event/index.mdx create mode 100644 fern/products/sdk-reference/typescript/relay/types/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest-client.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/base/base-resource/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/base/crud-resource/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/base/crud-with-addresses/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/call-handler/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/http-client/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/addresses/addresses-resource/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/addresses/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/calling/calling-namespace/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/calling/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/chat/chat-resource/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/chat/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-accounts/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-applications/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-calls/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-conferences/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-faxes/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-laml-bins/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-messages/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-namespace/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-phone-numbers/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-queues/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-recordings/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-tokens/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-transcriptions/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/compat/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/datasphere/datasphere-documents/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/datasphere/datasphere-namespace/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/datasphere/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/fabric/auto-materialized-webhook-resource/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/fabric/call-flows-resource/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/fabric/conference-rooms-resource/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/fabric/cxml-applications-resource/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/fabric/cxml-webhooks-resource/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/fabric/fabric-addresses/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/fabric/fabric-namespace/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/fabric/fabric-resource-put/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/fabric/fabric-resource/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/fabric/fabric-tokens/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/fabric/generic-resources/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/fabric/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/fabric/subscribers-resource/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/fabric/swml-webhooks-resource/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/imported-numbers/imported-numbers-resource/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/imported-numbers/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/logs/conference-logs/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/logs/fax-logs/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/logs/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/logs/logs-namespace/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/logs/message-logs/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/logs/voice-logs/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/lookup/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/lookup/lookup-resource/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/mfa/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/mfa/mfa-resource/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/number-groups/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/number-groups/number-groups-resource/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/phone-numbers/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/phone-numbers/phone-numbers-resource/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/project/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/project/project-namespace/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/project/project-tokens/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/pubsub/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/pubsub/pub-sub-resource/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/queues/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/queues/queues-resource/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/recordings/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/recordings/recordings-resource/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/registry/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/registry/registry-brands/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/registry/registry-campaigns/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/registry/registry-namespace/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/registry/registry-numbers/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/registry/registry-orders/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/short-codes/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/short-codes/short-codes-resource/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/sip-profile/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/sip-profile/sip-profile-resource/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/verified-callers/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/verified-callers/verified-callers-resource/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/video/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/video/video-conference-tokens/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/video/video-conferences/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/video/video-namespace/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/video/video-room-recordings/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/video/video-room-sessions/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/video/video-room-tokens/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/video/video-rooms/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/video/video-streams/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/pagination/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/rest-client/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/rest-error/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/types/index.mdx create mode 100644 fern/products/sdk-reference/typescript/schema-utils/index.mdx create mode 100644 fern/products/sdk-reference/typescript/security-utils/index.mdx create mode 100644 fern/products/sdk-reference/typescript/serverless-adapter/index.mdx create mode 100644 fern/products/sdk-reference/typescript/session-manager/index.mdx create mode 100644 fern/products/sdk-reference/typescript/skills/builtin/api-ninjas-trivia/api-ninjas-trivia-skill/index.mdx create mode 100644 fern/products/sdk-reference/typescript/skills/builtin/api-ninjas-trivia/index.mdx create mode 100644 fern/products/sdk-reference/typescript/skills/builtin/ask-claude/ask-claude-skill/index.mdx create mode 100644 fern/products/sdk-reference/typescript/skills/builtin/ask-claude/index.mdx create mode 100644 fern/products/sdk-reference/typescript/skills/builtin/claude-skills/claude-skills-skill/index.mdx create mode 100644 fern/products/sdk-reference/typescript/skills/builtin/claude-skills/index.mdx create mode 100644 fern/products/sdk-reference/typescript/skills/builtin/custom-skills/custom-skills-skill/index.mdx create mode 100644 fern/products/sdk-reference/typescript/skills/builtin/custom-skills/index.mdx create mode 100644 fern/products/sdk-reference/typescript/skills/builtin/datasphere-serverless/data-sphere-serverless-skill/index.mdx create mode 100644 fern/products/sdk-reference/typescript/skills/builtin/datasphere-serverless/index.mdx create mode 100644 fern/products/sdk-reference/typescript/skills/builtin/datasphere/data-sphere-skill/index.mdx create mode 100644 fern/products/sdk-reference/typescript/skills/builtin/datasphere/index.mdx create mode 100644 fern/products/sdk-reference/typescript/skills/builtin/datetime/date-time-skill/index.mdx create mode 100644 fern/products/sdk-reference/typescript/skills/builtin/datetime/index.mdx create mode 100644 fern/products/sdk-reference/typescript/skills/builtin/google-maps/google-maps-skill/index.mdx create mode 100644 fern/products/sdk-reference/typescript/skills/builtin/google-maps/index.mdx create mode 100644 fern/products/sdk-reference/typescript/skills/builtin/index.mdx create mode 100644 fern/products/sdk-reference/typescript/skills/builtin/info-gatherer/index.mdx create mode 100644 fern/products/sdk-reference/typescript/skills/builtin/info-gatherer/info-gatherer-skill/index.mdx create mode 100644 fern/products/sdk-reference/typescript/skills/builtin/joke/index.mdx create mode 100644 fern/products/sdk-reference/typescript/skills/builtin/joke/joke-skill/index.mdx create mode 100644 fern/products/sdk-reference/typescript/skills/builtin/math/index.mdx create mode 100644 fern/products/sdk-reference/typescript/skills/builtin/math/math-skill/index.mdx create mode 100644 fern/products/sdk-reference/typescript/skills/builtin/mcp-gateway/index.mdx create mode 100644 fern/products/sdk-reference/typescript/skills/builtin/mcp-gateway/mcp-gateway-skill/index.mdx create mode 100644 fern/products/sdk-reference/typescript/skills/builtin/native-vector-search/index.mdx create mode 100644 fern/products/sdk-reference/typescript/skills/builtin/native-vector-search/native-vector-search-skill/index.mdx create mode 100644 fern/products/sdk-reference/typescript/skills/builtin/play-background-file/index.mdx create mode 100644 fern/products/sdk-reference/typescript/skills/builtin/play-background-file/play-background-file-skill/index.mdx create mode 100644 fern/products/sdk-reference/typescript/skills/builtin/spider/index.mdx create mode 100644 fern/products/sdk-reference/typescript/skills/builtin/spider/spider-skill/index.mdx create mode 100644 fern/products/sdk-reference/typescript/skills/builtin/swml-transfer/index.mdx create mode 100644 fern/products/sdk-reference/typescript/skills/builtin/swml-transfer/swml-transfer-skill/index.mdx create mode 100644 fern/products/sdk-reference/typescript/skills/builtin/weather-api/index.mdx create mode 100644 fern/products/sdk-reference/typescript/skills/builtin/weather-api/weather-api-skill/index.mdx create mode 100644 fern/products/sdk-reference/typescript/skills/builtin/web-search/index.mdx create mode 100644 fern/products/sdk-reference/typescript/skills/builtin/web-search/web-search-skill/index.mdx create mode 100644 fern/products/sdk-reference/typescript/skills/builtin/wikipedia-search/index.mdx create mode 100644 fern/products/sdk-reference/typescript/skills/builtin/wikipedia-search/wikipedia-search-skill/index.mdx create mode 100644 fern/products/sdk-reference/typescript/skills/index.mdx create mode 100644 fern/products/sdk-reference/typescript/skills/skill-base/index.mdx create mode 100644 fern/products/sdk-reference/typescript/skills/skill-manager/index.mdx create mode 100644 fern/products/sdk-reference/typescript/skills/skill-name/index.mdx create mode 100644 fern/products/sdk-reference/typescript/skills/skill-registry/index.mdx create mode 100644 fern/products/sdk-reference/typescript/ssl-config/index.mdx create mode 100644 fern/products/sdk-reference/typescript/swaig-function/index.mdx create mode 100644 fern/products/sdk-reference/typescript/swml-builder/index.mdx create mode 100644 fern/products/sdk-reference/typescript/swml-handler/ai-verb-handler/index.mdx create mode 100644 fern/products/sdk-reference/typescript/swml-handler/index.mdx create mode 100644 fern/products/sdk-reference/typescript/swml-handler/swml-verb-handler/index.mdx create mode 100644 fern/products/sdk-reference/typescript/swml-handler/verb-handler-registry/index.mdx create mode 100644 fern/products/sdk-reference/typescript/swml-service/index.mdx create mode 100644 fern/products/sdk-reference/typescript/swml-service/security-config/index.mdx create mode 100644 fern/products/sdk-reference/typescript/swml-service/verb-handler-registry/index.mdx create mode 100644 fern/products/sdk-reference/typescript/swml-verb-methods.generated/index.mdx create mode 100644 fern/products/sdk-reference/typescript/type-inference/index.mdx create mode 100644 fern/products/sdk-reference/typescript/types/index.mdx create mode 100644 fern/products/sdk-reference/typescript/web-service/index.mdx create mode 100644 fern/products/sdk-reference/typescript/webhook-middleware/index.mdx create mode 100644 fern/products/sdk-reference/typescript/webhook-validator/index.mdx diff --git a/fern/docs.yml b/fern/docs.yml index f18bcbd0da..6351c58c32 100644 --- a/fern/docs.yml +++ b/fern/docs.yml @@ -80,6 +80,12 @@ products: availability: deprecated slug: v2 + - display-name: SDK Reference + slug: sdk-reference + path: products/sdk-reference/sdk-reference.yml + icon: fa-regular fa-books + subtitle: Auto-generated reference for every SignalWire SDK + # Column 3 (APIs) - display-name: APIs slug: apis diff --git a/fern/products/sdk-reference/cpp/_meta.json b/fern/products/sdk-reference/cpp/_meta.json new file mode 100644 index 0000000000..a14e633858 --- /dev/null +++ b/fern/products/sdk-reference/cpp/_meta.json @@ -0,0 +1,10 @@ +{ + "language": "cpp", + "sdk_name": "cpp-sdk", + "version": null, + "source_repo": "https://github.com/signalwire/signalwire-cpp", + "format": "mdx", + "platform": "fern", + "base_slug": "/reference/cpp", + "item_count": 1825 +} \ No newline at end of file diff --git a/fern/products/sdk-reference/cpp/c-tool-context/index.mdx b/fern/products/sdk-reference/cpp/c-tool-context/index.mdx new file mode 100644 index 0000000000..6fdedff726 --- /dev/null +++ b/fern/products/sdk-reference/cpp/c-tool-context/index.mdx @@ -0,0 +1,32 @@ +--- +slug: "/reference/cpp/c-tool-context" +title: "CToolContext" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "CToolContext" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/c_api/signalwire_c.cpp" + visibility: "public" +--- +# `CToolContext` + +## Signature + +```cpp +struct CToolContext +``` + +## Properties + + + + + +## Source + +[`src/c_api/signalwire_c.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/c_api/signalwire_c.cpp) + +Line 83. diff --git a/fern/products/sdk-reference/cpp/httplib/index.mdx b/fern/products/sdk-reference/cpp/httplib/index.mdx new file mode 100644 index 0000000000..4c296aa8b8 --- /dev/null +++ b/fern/products/sdk-reference/cpp/httplib/index.mdx @@ -0,0 +1,25 @@ +--- +slug: "/reference/cpp/httplib" +title: "httplib" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "module" + language: "cpp" + qualified_name: "httplib" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp" +--- +# `httplib` + +## Signature + +```cpp +namespace httplib +``` + +## Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 27. diff --git a/fern/products/sdk-reference/cpp/index.mdx b/fern/products/sdk-reference/cpp/index.mdx new file mode 100644 index 0000000000..22a0855cc4 --- /dev/null +++ b/fern/products/sdk-reference/cpp/index.mdx @@ -0,0 +1,17 @@ +--- +title: "C++ SDK" +slug: "/reference/cpp" +lustri: + auto_generated: true + language: "cpp" + kind: "sdk" +--- +# C++ SDK Reference + +## Modules + +- [`httplib`](/docs/sdk-reference/reference/cpp/httplib) +- [`ix`](/docs/sdk-reference/reference/cpp/ix) +- [`signalwire`](/docs/sdk-reference/reference/cpp/signalwire) +- [`std`](/docs/sdk-reference/reference/cpp/std) + diff --git a/fern/products/sdk-reference/cpp/ix/index.mdx b/fern/products/sdk-reference/cpp/ix/index.mdx new file mode 100644 index 0000000000..3c39a0c71b --- /dev/null +++ b/fern/products/sdk-reference/cpp/ix/index.mdx @@ -0,0 +1,25 @@ +--- +slug: "/reference/cpp/ix" +title: "ix" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "module" + language: "cpp" + qualified_name: "ix" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/websocket.hpp" +--- +# `ix` + +## Signature + +```cpp +namespace ix +``` + +## Source + +[`include/signalwire/relay/websocket.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/websocket.hpp) + +Line 15. diff --git a/fern/products/sdk-reference/cpp/signalwire/agent/agent-base/index.mdx b/fern/products/sdk-reference/cpp/signalwire/agent/agent-base/index.mdx new file mode 100644 index 0000000000..6e96f25003 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/agent/agent-base/index.mdx @@ -0,0 +1,2791 @@ +--- +slug: "/reference/cpp/signalwire/agent/agent-base" +title: "AgentBase" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::agent::AgentBase" + parent: "signalwire::agent" + module: "signalwire.agent" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp" + visibility: "public" +--- +# `AgentBase` + +## Signature + +```cpp +class signalwire::agent::AgentBase : signalwire::swml::Service +``` + +## Inheritance + +**Extends:** [signalwire::swml::Service](/docs/sdk-reference/reference/cpp/signalwire/swml/service) + +## Methods + +### ~AgentBase + +**Modifiers:** `virtual` + +#### Signature + +```cpp +void ~AgentBase() +``` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 120. + +*** + +### add\_answer\_verb + +#### Signature + +```cpp +AgentBase & add_answer_verb(const std::string & verb_name, const json & params) +``` + +#### Parameters + + + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 380. + +*** + +### add\_context + +#### Signature + +```cpp +contexts::Context & add_context(const std::string & name) +``` + +#### Parameters + + + +#### Returns + +`contexts::Context &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 392. + +*** + +### add\_function\_include + +#### Signature + +```cpp +AgentBase & add_function_include(const json & include) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 370. + +*** + +### add\_hint + +#### Signature + +```cpp +AgentBase & add_hint(const std::string & hint) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 291. + +*** + +### add\_hints + +#### Signature + +```cpp +AgentBase & add_hints(const std::vector< std::string > & hints) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 292. + +*** + +### add\_internal\_filler + +Add internal fillers for a single language (legacy overload; stored under the given language key at the top level). + +#### Signature + + + + ```cpp + AgentBase & add_internal_filler( + const std::string & lang, + const std::vector< std::string > & fillers + ) + ``` + + + + ```cpp + AgentBase & add_internal_filler( + const std::string & function_name, + const std::string & language_code, + const std::vector< std::string > & fillers + ) + ``` + + + +#### Parameters (Overload 1) + + + + + +#### Parameters (Overload 2) + + + + + + + +#### Returns (Overload 1) + +`AgentBase &` + +#### Returns (Overload 2) + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 359. + +*** + +### add\_language + +#### Signature + +```cpp +AgentBase & add_language(const LanguageConfig & lang) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 294. + +*** + +### add\_mcp\_server + +#### Signature + +```cpp +AgentBase & add_mcp_server( + const std::string & url, + const std::map< std::string, std::string > & headers = {}, + bool resources = false, + const std::map< std::string, std::string > & resource_vars = {} +) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 422. + +*** + +### add\_pattern\_hint + +#### Signature + +```cpp +AgentBase & add_pattern_hint(const std::string & pattern) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 293. + +*** + +### add\_post\_ai\_verb + +#### Signature + +```cpp +AgentBase & add_post_ai_verb(const std::string & verb_name, const json & params) +``` + +#### Parameters + + + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 382. + +*** + +### add\_post\_answer\_verb + +#### Signature + +```cpp +AgentBase & add_post_answer_verb( + const std::string & verb_name, + const json & params +) +``` + +#### Parameters + + + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 381. + +*** + +### add\_pre\_answer\_verb + +#### Signature + +```cpp +AgentBase & add_pre_answer_verb( + const std::string & verb_name, + const json & params +) +``` + +#### Parameters + + + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 379. + +*** + +### add\_pronunciation + +#### Signature + +```cpp +AgentBase & add_pronunciation( + const std::string & replace_val, + const std::string & with_val, + bool ignore_case = false +) +``` + +#### Parameters + + + + + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 314. + +*** + +### add\_security\_headers + +**Modifiers:** `static` + +#### Signature + +```cpp +void add_security_headers(httplib::Response & res) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 554. + +*** + +### add\_skill + +#### Signature + + + + ```cpp + AgentBase & add_skill( + const std::string & skill_name, + const json & params = json::object() + ) + ``` + + + + ```cpp + AgentBase & add_skill( + skills::SkillName skill_name, + const json & params = json::object() + ) + ``` + + + +#### Parameters (Overload 1) + + + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`AgentBase &` + +#### Returns (Overload 2) + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 403. + +*** + +### add\_swaig\_query\_param + +#### Signature + +```cpp +AgentBase & add_swaig_query_param( + const std::string & key, + const std::string & value +) +``` + +#### Parameters + + + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 440. + +*** + +### AgentBase + +**Modifiers:** `explicit` + +#### Signature + + + + ```cpp + void AgentBase( + const std::string & name = "agent", + const std::string & route = "/", + const std::string & host = "0.0.0.0", + int port = 3000 + ) + ``` + + + + ```cpp + void AgentBase(const AgentBase & other) + ``` + + + +#### Parameters (Overload 1) + + + + + + + + + +#### Parameters (Overload 2) + + + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 116. + +*** + +### auth\_password + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::string & auth_password() const +``` + +#### Returns + +`const std::string &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 458. + +*** + +### auth\_username + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::string & auth_username() const +``` + +#### Returns + +`const std::string &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 457. + +*** + +### auto\_map\_sip\_usernames + +#### Signature + +```cpp +AgentBase & auto_map_sip_usernames(bool enable = true) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 450. + +*** + +### build\_ai\_verb + +**Modifiers:** `const` + +#### Signature + +```cpp +json build_ai_verb(const std::string & webhook_url) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 527. + +*** + +### build\_mcp\_tool\_list + +**Modifiers:** `const` + +#### Signature + +```cpp +std::vector< json > build_mcp_tool_list() const +``` + +#### Returns + +`std::vector< json >` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 429. + +*** + +### build\_prompt + +**Modifiers:** `const` + +#### Signature + +```cpp +json build_prompt() const +``` + +#### Returns + +`json` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 533. + +*** + +### build\_swaig\_functions + +**Modifiers:** `const` + +#### Signature + +```cpp +json build_swaig_functions(const std::string & webhook_url) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 530. + +*** + +### build\_webhook\_url + +**Modifiers:** `const` + +#### Signature + +```cpp +std::string build_webhook_url(const std::string & base_url) const +``` + +#### Parameters + + + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 521. + +*** + +### clear\_post\_ai\_verbs + +#### Signature + +```cpp +AgentBase & clear_post_ai_verbs() +``` + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 385. + +*** + +### clear\_post\_answer\_verbs + +#### Signature + +```cpp +AgentBase & clear_post_answer_verbs() +``` + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 384. + +*** + +### clear\_pre\_answer\_verbs + +#### Signature + +```cpp +AgentBase & clear_pre_answer_verbs() +``` + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 383. + +*** + +### clear\_swaig\_query\_params + +#### Signature + +```cpp +AgentBase & clear_swaig_query_params() +``` + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 441. + +*** + +### clone + +**Modifiers:** `const` + +#### Signature + +```cpp +std::unique_ptr< AgentBase > clone() const +``` + +#### Returns + +`std::unique_ptr< AgentBase >` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 518. + +*** + +### create\_tool\_token + +Mint a per-call SWAIG-function token via the agent's SessionManager. +Python parity: state\_mixin.StateMixin.\_create\_tool\_token — delegates to SessionManager::create\_token and returns an empty string on any thrown exception (Python catches all exceptions and returns "" on error). + +**Modifiers:** `const` + +#### Signature + +```cpp +std::string create_tool_token( + const std::string & tool_name, + const std::string & call_id +) const +``` + +#### Parameters + + + + + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 274. + +*** + +### define\_contexts + +#### Signature + +```cpp +contexts::ContextBuilder & define_contexts() +``` + +#### Returns + +`contexts::ContextBuilder &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 391. + +*** + +### define\_tool + +Register a SWAIG tool (function) that the AI can invoke during a call. + +How this becomes a tool the model seesA SWAIG function is exactly the same concept as a "tool" in native OpenAI / Anthropic tool calling. On every LLM turn, the SDK renders each registered SWAIG function into the OpenAI tool schema: +\{ "type": "function", "function": \{ "name": "your\_name\_here", "description": "your description text", "parameters": \{ ... your JSON schema ... \} \} \} +That schema is sent to the model as part of the same API call that produces the next assistant message. The model reads: +the function description to decide WHEN to call this tool +each parameter description (inside parameters) to decide HOW to fill in that argument from the user's utterance + +This means descriptions are prompt engineering, not developer comments. A vague description is the #1 cause of "the model has +the right tool but doesn't call it" failures. + +Bad vs good descriptionsBAD : description: "Lookup function" GOOD: description: "Look up a customer's account details by " "account number. Use this BEFORE quoting " "any account-specific info (balance, plan, " "status). Do not use for general product " "questions." +BAD : parameters: \{"id": \{"type": "string", "description": "the id"\}\} GOOD: parameters: \{"account\_number": \{"type": "string", "description": "The customer's 8-digit account " "number, no dashes or spaces. Ask the user if they " "don't provide it."\}\} + +Tool count mattersLLM tool selection accuracy degrades past ~7-8 simultaneously-active tools per call. Use contexts::Step::set\_functions to partition tools across steps so only the relevant subset is active at any moment. + +#### Signature + + + + ```cpp + AgentBase & define_tool(const swaig::ToolDefinition & tool) + ``` + + + + ```cpp + AgentBase & define_tool( + const std::string & name, + const std::string & description, + const json & parameters, + swaig::ToolHandler handler, + bool secure = false + ) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + + + + + + + +#### Returns (Overload 1) + +`AgentBase &` + +#### Returns (Overload 2) + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 258. + +*** + +### detect\_proxy\_url + +**Modifiers:** `const` + +#### Signature + +```cpp +std::string detect_proxy_url( + const std::map< std::string, std::string > & headers +) const +``` + +#### Parameters + + + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 524. + +*** + +### enable\_debug\_events + +#### Signature + +```cpp +AgentBase & enable_debug_events(bool enable = true) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 369. + +*** + +### enable\_debug\_routes + +#### Signature + +```cpp +AgentBase & enable_debug_routes(bool enable = true) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 442. + +*** + +### enable\_mcp\_server + +#### Signature + +```cpp +AgentBase & enable_mcp_server(bool enable = true) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 426. + +*** + +### enable\_sip\_routing + +#### Signature + +```cpp +AgentBase & enable_sip_routing(bool enable = true) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 448. + +*** + +### get\_contexts + +Returns the contexts dictionary as a serialised JSON object, or std::nullopt when no contexts have been defined yet. +Mirrors Python's PromptManager.get\_contexts which returns the contexts dict or None. + +**Modifiers:** `const` + +#### Signature + +```cpp +std::optional< json > get_contexts() const +``` + +#### Returns + +`std::optional< json >` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 196. + +*** + +### get\_language\_params + +Read the per-language params dict for a previously-added language. Returns std::nullopt when the code is unknown or when params were never set on that language — no exception path, mirroring Python's None return. +Python parity: AIConfigMixin.get\_language\_params (029ca6f). + +**Modifiers:** `const` + +#### Signature + +```cpp +std::optional< json > get_language_params(const std::string & code) const +``` + +#### Parameters + + + +#### Returns + +`std::optional< json >` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 313. + +*** + +### get\_post\_prompt + +Returns the post-prompt text whatever set\_post\_prompt stored, or std::nullopt when no post-prompt has been set. +Mirrors Python's PromptManager.get\_post\_prompt / PromptMixin.get\_post\_prompt — used by SWML rendering when a post-prompt is configured. + +**Modifiers:** `const` + +#### Signature + +```cpp +std::optional< std::string > get_post_prompt() const +``` + +#### Returns + +`std::optional< std::string >` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 173. + +*** + +### get\_prompt + +**Modifiers:** `const` + +#### Signature + +```cpp +std::string get_prompt() const +``` + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 154. + +*** + +### get\_raw\_prompt + +Returns the raw prompt text whatever set\_prompt\_text stored, or std::nullopt when no raw prompt has been set. Distinct from get\_prompt which renders the POM array when use\_pom is true. +Mirrors Python's PromptManager.get\_raw\_prompt. + +**Modifiers:** `const` + +#### Signature + +```cpp +std::optional< std::string > get_raw_prompt() const +``` + +#### Returns + +`std::optional< std::string >` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 181. + +*** + +### handle\_mcp\_request + +#### Signature + +```cpp +json handle_mcp_request(const json & body) +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 430. + +*** + +### handle\_post\_prompt\_request + +#### Signature + +```cpp +void handle_post_prompt_request( + const httplib::Request & req, + httplib::Response & res +) +``` + +#### Parameters + + + + + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 548. + +*** + +### handle\_swaig\_request + +#### Signature + +```cpp +void handle_swaig_request(const httplib::Request & req, httplib::Response & res) +``` + +#### Parameters + + + + + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 545. + +*** + +### handle\_swml\_request + +#### Signature + +```cpp +void handle_swml_request(const httplib::Request & req, httplib::Response & res) +``` + +#### Parameters + + + + + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 542. + +*** + +### has\_contexts + +**Modifiers:** `const` + +#### Signature + +```cpp +bool has_contexts() const +``` + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 393. + +*** + +### has\_skill + +**Modifiers:** `const` + +#### Signature + + + + ```cpp + bool has_skill(const std::string & skill_name) const + ``` + + + + ```cpp + bool has_skill(skills::SkillName skill_name) const + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`bool` + +#### Returns (Overload 2) + +`bool` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 405. + +*** + +### init\_auth + +#### Signature + +```cpp +void init_auth() +``` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 536. + +*** + +### is\_mcp\_server\_enabled + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +bool is_mcp_server_enabled() const +``` + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 427. + +*** + +### list\_skills + +**Modifiers:** `const` + +#### Signature + +```cpp +std::vector< std::string > list_skills() const +``` + +#### Returns + +`std::vector< std::string >` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 406. + +*** + +### list\_tools + +**Modifiers:** `const` + +#### Signature + +```cpp +std::vector< std::string > list_tools() const +``` + +#### Returns + +`std::vector< std::string >` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 266. + +*** + +### manual\_set\_proxy\_url + +#### Signature + +```cpp +AgentBase & manual_set_proxy_url(const std::string & url) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 437. + +*** + +### mcp\_servers + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::vector< json > & mcp_servers() const +``` + +#### Returns + +`const std::vector< json > &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 428. + +*** + +### on\_debug\_event + +#### Signature + +```cpp +AgentBase & on_debug_event(DebugEventCallback cb) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 494. + +*** + +### on\_function\_call + +Dispatch a function call to the registered handler. Returns a FunctionResult; if the function isn't registered, returns a FunctionResult with a "Function not found" response. + +**Modifiers:** `virtual` + +#### Signature + +```cpp +swaig::FunctionResult on_function_call( + const std::string & name, + const json & args, + const json & raw_data +) +``` + +#### Parameters + + + + + + + +#### Returns + +`swaig::FunctionResult` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 263. + +*** + +### on\_summary + +#### Signature + +```cpp +AgentBase & on_summary(SummaryCallback cb) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 493. + +*** + +### operator= + +#### Signature + +```cpp +AgentBase & operator=(const AgentBase &) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 124. + +*** + +### pom + +Read-only snapshot of the agent's POM as a PromptObjectModel. +Python parity: agent.pom instance attribute (agent\_base.py line 209). Returns std::nullopt when use\_pom is false (mirroring Python's self.pom = None); otherwise returns a freshly built signalwire::pom::PromptObjectModel whose sections are deep-copied from the agent's internal section/ subsection structures so callers cannot mutate them in-place. + +**Modifiers:** `const` + +#### Signature + +```cpp +std::optional< signalwire::pom::PromptObjectModel > pom() const +``` + +#### Returns + +`std::optional< signalwire::pom::PromptObjectModel >` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 165. + +*** + +### prompt\_add\_section + +#### Signature + +```cpp +AgentBase & prompt_add_section( + const std::string & title, + const std::string & body = "", + const std::vector< std::string > & bullets = {} +) +``` + +#### Parameters + + + + + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 143. + +*** + +### prompt\_add\_subsection + +#### Signature + +```cpp +AgentBase & prompt_add_subsection( + const std::string & parent_title, + const std::string & title, + const std::string & body = "", + const std::vector< std::string > & bullets = {} +) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 146. + +*** + +### prompt\_add\_to\_section + +#### Signature + +```cpp +AgentBase & prompt_add_to_section( + const std::string & title, + const std::string & body = "", + const std::vector< std::string > & bullets = {} +) +``` + +#### Parameters + + + + + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 150. + +*** + +### prompt\_has\_section + +**Modifiers:** `const` + +#### Signature + +```cpp +bool prompt_has_section(const std::string & title) const +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 153. + +*** + +### register\_sip\_username + +#### Signature + +```cpp +AgentBase & register_sip_username(const std::string & username) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 449. + +*** + +### register\_swaig\_function + +#### Signature + +```cpp +AgentBase & register_swaig_function(const json & func_def) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 262. + +*** + +### remove\_skill + +#### Signature + + + + ```cpp + AgentBase & remove_skill(const std::string & skill_name) + ``` + + + + ```cpp + AgentBase & remove_skill(skills::SkillName skill_name) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`AgentBase &` + +#### Returns (Overload 2) + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 404. + +*** + +### render\_swml + +**Modifiers:** `const` + +#### Signature + +```cpp +json render_swml() const +``` + +#### Returns + +`json` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 500. + +*** + +### render\_swml\_for\_request + +**Modifiers:** `const` + +#### Signature + +```cpp +json render_swml_for_request( + const std::map< std::string, std::string > & query_params, + const json & body_params, + const std::map< std::string, std::string > & headers +) const +``` + +#### Parameters + + + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 501. + +*** + +### render\_swml\_internal + +**Modifiers:** `const` + +#### Signature + +```cpp +json render_swml_internal( + const std::map< std::string, std::string > & headers +) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 557. + +*** + +### reset\_contexts + +Remove all contexts, returning the agent to a no-contexts state. Convenience wrapper around define\_contexts().reset(). + +#### Signature + +```cpp +AgentBase & reset_contexts() +``` + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 397. + +*** + +### run + +#### Signature + +```cpp +void run() +``` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 509. + +*** + +### serve + +#### Signature + +```cpp +void serve() +``` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 510. + +*** + +### session\_manager + +**Modifiers:** `inline` + +#### Signature + +```cpp +security::SessionManager & session_manager() +``` + +#### Returns + +`security::SessionManager &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 514. + +*** + +### set\_auth + +#### Signature + +```cpp +AgentBase & set_auth(const std::string & username, const std::string & password) +``` + +#### Parameters + + + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 456. + +*** + +### set\_dynamic\_config\_callback + +#### Signature + +```cpp +AgentBase & set_dynamic_config_callback(DynamicConfigCallback cb) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 436. + +*** + +### set\_function\_includes + +#### Signature + +```cpp +AgentBase & set_function_includes(const std::vector< json > & includes) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 371. + +*** + +### set\_global\_data + +#### Signature + +```cpp +AgentBase & set_global_data(const json & data) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 320. + +*** + +### set\_internal\_fillers + +Set internal fillers for native SWAIG functions. +Internal fillers are short phrases the AI agent speaks (via TTS) while an internal/native function is running, so the caller doesn't hear dead air during transitions or background work. +Supported function names (match the SWAIGInternalFiller schema): hangup, check\_time, wait\_for\_user, wait\_seconds, adjust\_response\_latency, next\_step, change\_context, get\_visual\_input, get\_ideal\_strategy. See supported\_internal\_filler\_names(). +Notably NOT supported: change\_step, gather\_submit, or arbitrary user-defined SWAIG function names. The runtime only honors fillers for the names listed above; everything else is silently ignored at the SWML level. This method warns at registration time if you pass an unknown name so you catch the typo early. +Expected JSON shape: \{"function\_name": \{"language\_code": \["phrase1", ...]\}, ...\} + +#### Signature + +```cpp +AgentBase & set_internal_fillers(const json & fillers) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 355. + +*** + +### set\_language\_params + +Set (or replace) the per-language params dict on an already-added language. Useful when language entries are built via add\_language() first and engine-specific tuning is added later (e.g. from a config loader). Passing an empty object removes the params key (treated as unset). No-op if code isn't found among previously-added languages. +Python parity: AIConfigMixin.set\_language\_params (029ca6f). + +#### Signature + +```cpp +AgentBase & set_language_params(const std::string & code, const json & params) +``` + +#### Parameters + + + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 305. + +*** + +### set\_languages + +#### Signature + +```cpp +AgentBase & set_languages(const std::vector< LanguageConfig > & langs) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 295. + +*** + +### set\_name + +**Modifiers:** `inline` + +#### Signature + +```cpp +AgentBase & set_name(const std::string & n) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 131. + +*** + +### set\_native\_functions + +#### Signature + +```cpp +AgentBase & set_native_functions(const std::vector< std::string > & funcs) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 322. + +*** + +### set\_param + +#### Signature + +```cpp +AgentBase & set_param(const std::string & key, const json & value) +``` + +#### Parameters + + + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 318. + +*** + +### set\_params + +#### Signature + +```cpp +AgentBase & set_params(const json & params) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 319. + +*** + +### set\_post\_prompt + +#### Signature + +```cpp +AgentBase & set_post_prompt(const std::string & text) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 141. + +*** + +### set\_post\_prompt\_llm\_params + +#### Signature + +```cpp +AgentBase & set_post_prompt_llm_params(const json & params) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 373. + +*** + +### set\_post\_prompt\_url + +#### Signature + +```cpp +AgentBase & set_post_prompt_url(const std::string & url) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 142. + +*** + +### set\_post\_prompt\_url\_direct + +#### Signature + +```cpp +AgentBase & set_post_prompt_url_direct(const std::string & url) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 439. + +*** + +### set\_prompt\_llm\_params + +#### Signature + +```cpp +AgentBase & set_prompt_llm_params(const json & params) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 372. + +*** + +### set\_prompt\_pom + +Sets the prompt as a list of POM section JSON objects. Each section supports keys "title", "body", "bullets", "numbered", "numbered\_bullets", and "subsections". Switches the agent to POM mode. +Mirrors Python's PromptManager.set\_prompt\_pom. + +#### Signature + +```cpp +AgentBase & set_prompt_pom(const std::vector< json > & pom) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 189. + +*** + +### set\_prompt\_text + +#### Signature + +```cpp +AgentBase & set_prompt_text(const std::string & text) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 140. + +*** + +### set\_pronunciations + +#### Signature + +```cpp +AgentBase & set_pronunciations(const std::vector< Pronunciation > & pronuns) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 317. + +*** + +### set\_signing\_key + +Set the SignalWire Signing Key (Dashboard → API Credentials). Pass the empty string to clear and revert to env-fallback behavior. + +#### Signature + +```cpp +AgentBase & set_signing_key(const std::string & key) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 476. + +*** + +### set\_use\_pom + +#### Signature + +```cpp +AgentBase & set_use_pom(bool use_pom) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 155. + +*** + +### set\_webhook\_url + +#### Signature + +```cpp +AgentBase & set_webhook_url(const std::string & url) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 438. + +*** + +### setup\_routes + +#### Signature + +```cpp +void setup_routes(httplib::Server & server) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 539. + +*** + +### signing\_key + +Read the resolved signing key (constructor / set\_signing\_key / SIGNALWIRE\_SIGNING\_KEY env), or std::nullopt when unset. The returned value is the secret — never log it. + +**Modifiers:** `const` + +#### Signature + +```cpp +std::optional< std::string > signing_key() const +``` + +#### Returns + +`std::optional< std::string >` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 481. + +*** + +### stop + +#### Signature + +```cpp +void stop() +``` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 511. + +*** + +### supported\_internal\_filler\_names + +The complete set of internal SWAIG function names that accept fillers, matching the SWAIGInternalFiller schema definition. Any name outside this set is silently ignored by the runtime — set\_internal\_fillers and add\_internal\_filler warn if you pass an unknown name. +Notable absences: change\_step, gather\_submit, and arbitrary user-defined SWAIG function names are NOT supported. + +**Modifiers:** `static` + +#### Signature + +```cpp +const std::set< std::string > & supported_internal_filler_names() +``` + +#### Returns + +`const std::set< std::string > &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 331. + +*** + +### trust\_proxy\_for\_signature + +If true, X-Forwarded-Proto / X-Forwarded-Host are honored by the webhook middleware when reconstructing the URL. Default false — proxy headers are spoofable so opt in only when the reverse-proxy is trusted. + +#### Signature + +```cpp +AgentBase & trust_proxy_for_signature(bool trust) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 487. + +*** + +### update\_global\_data + +#### Signature + +```cpp +AgentBase & update_global_data(const json & data) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 321. + +*** + +### validate\_auth + +**Modifiers:** `const` + +#### Signature + +```cpp +bool validate_auth(const httplib::Request & req, httplib::Response & res) const +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 551. + +*** + +### validate\_tool\_token + +Validate a per-call SWAIG-function token. Returns false when the function is not registered, when the SessionManager rejects the token, or on any underlying exception. +Python parity: state\_mixin.StateMixin.validate\_tool\_token — rejects unknown function names up-front and swallows exceptions. + +**Modifiers:** `const` + +#### Signature + +```cpp +bool validate_tool_token( + const std::string & function_name, + const std::string & token, + const std::string & call_id +) const +``` + +#### Parameters + + + + + + + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 283. + +## Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 113. diff --git a/fern/products/sdk-reference/cpp/signalwire/agent/index.mdx b/fern/products/sdk-reference/cpp/signalwire/agent/index.mdx new file mode 100644 index 0000000000..92a9400aff --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/agent/index.mdx @@ -0,0 +1,159 @@ +--- +slug: "/reference/cpp/signalwire/agent" +title: "agent" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "module" + language: "cpp" + qualified_name: "signalwire::agent" + parent: "signalwire" + module: "signalwire" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp" +--- +# `agent` + +## Signature + +```cpp +namespace signalwire::agent +``` + +## Classes + + + + + + Language configuration. + + + + Pronunciation rule. + + + + SWAIG query parameters. + + + +## Functions + +### sorted\_list\_str + +**Modifiers:** `static` + +#### Signature + +```cpp +std::string sorted_list_str(const std::set< std::string > & s) +``` + +#### Parameters + + + +#### Returns + +`std::string` + +#### Source + +[`src/agent/agent_base.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/agent/agent_base.cpp) + +Line 458. + +## Type Aliases + +### DebugEventCallback + +Debug event callback type. + +#### Signature + +```cpp +typedef std::function< void(const json &event)> DebugEventCallback +``` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 101. + +*** + +### DynamicConfigCallback + +Dynamic config callback type. + +#### Signature + +```cpp +typedef std::function< void( const std::map< std::string, std::string > &query_params, const json &body_params, const std::map< std::string, std::string > &headers, class AgentBase &agent_copy)> DynamicConfigCallback +``` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 90. + +*** + +### json + +#### Signature + +```cpp +typedef nlohmann::json json +``` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 34. + +*** + +### PomSection + +Back-compat alias for the original signalwire::agent::PomSection type. The implementation now lives in signalwire::pom::Section — see signalwire/pom/pom.hpp for the full API (render\_markdown, render\_xml, numbered/numberedBullets fields, etc.). New code should use signalwire::pom::Section directly. + +#### Signature + +```cpp +typedef signalwire::pom::Section PomSection +``` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 41. + +*** + +### SummaryCallback + +Summary callback type. + +#### Signature + +```cpp +typedef std::function< void(const json &summary, const json &raw_data)> SummaryCallback +``` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 98. + +## Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 32. diff --git a/fern/products/sdk-reference/cpp/signalwire/agent/language-config/index.mdx b/fern/products/sdk-reference/cpp/signalwire/agent/language-config/index.mdx new file mode 100644 index 0000000000..f5008b44c5 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/agent/language-config/index.mdx @@ -0,0 +1,68 @@ +--- +slug: "/reference/cpp/signalwire/agent/language-config" +title: "LanguageConfig" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::agent::LanguageConfig" + parent: "signalwire::agent" + module: "signalwire.agent" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp" + visibility: "public" +--- +# `LanguageConfig` + +Language configuration. + +## Signature + +```cpp +struct signalwire::agent::LanguageConfig +``` + +## Properties + + + + + + + + + + + Per-language params dict (engine-specific tuning, voice settings, etc.). Emitted as the language object's params key in SWML only when non-empty — matches Python reference commit 029ca6f. Treated as "unset" when null OR when an empty object. + + + + +## Methods + +### to\_json + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json to_json() const +``` + +#### Returns + +`json` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 57. + +## Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 44. diff --git a/fern/products/sdk-reference/cpp/signalwire/agent/pronunciation/index.mdx b/fern/products/sdk-reference/cpp/signalwire/agent/pronunciation/index.mdx new file mode 100644 index 0000000000..3f6bc338c4 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/agent/pronunciation/index.mdx @@ -0,0 +1,60 @@ +--- +slug: "/reference/cpp/signalwire/agent/pronunciation" +title: "Pronunciation" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::agent::Pronunciation" + parent: "signalwire::agent" + module: "signalwire.agent" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp" + visibility: "public" +--- +# `Pronunciation` + +Pronunciation rule. + +## Signature + +```cpp +struct signalwire::agent::Pronunciation +``` + +## Properties + + + + + + + +## Methods + +### to\_json + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json to_json() const +``` + +#### Returns + +`json` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 80. + +## Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 75. diff --git a/fern/products/sdk-reference/cpp/signalwire/agent/swaig-query-param/index.mdx b/fern/products/sdk-reference/cpp/signalwire/agent/swaig-query-param/index.mdx new file mode 100644 index 0000000000..059169e4f7 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/agent/swaig-query-param/index.mdx @@ -0,0 +1,36 @@ +--- +slug: "/reference/cpp/signalwire/agent/swaig-query-param" +title: "SwaigQueryParam" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::agent::SwaigQueryParam" + parent: "signalwire::agent" + module: "signalwire.agent" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp" + visibility: "public" +--- +# `SwaigQueryParam` + +SWAIG query parameters. + +## Signature + +```cpp +struct signalwire::agent::SwaigQueryParam +``` + +## Properties + + + + + +## Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 104. diff --git a/fern/products/sdk-reference/cpp/signalwire/contexts/context-builder/index.mdx b/fern/products/sdk-reference/cpp/signalwire/contexts/context-builder/index.mdx new file mode 100644 index 0000000000..8a6ad4d257 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/contexts/context-builder/index.mdx @@ -0,0 +1,229 @@ +--- +slug: "/reference/cpp/signalwire/contexts/context-builder" +title: "ContextBuilder" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::contexts::ContextBuilder" + parent: "signalwire::contexts" + module: "signalwire.contexts" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp" + visibility: "public" +--- +# `ContextBuilder` + +Builder for multi-step, multi-context AI agent workflows. +A ContextBuilder owns one or more Contexts; each Context owns an ordered list of Steps. Only one context and one step is active at a time. Per chat turn, the runtime injects the current step's instructions as a system message, then asks the LLM for a response. + +Native tools auto-injected by the runtimeWhen a step (or its enclosing context) declares valid\_steps or valid\_contexts, the runtime auto-injects two native tools so the model can navigate the flow: + +next\_step(step: enum) — present when valid\_steps is set +change\_context(context: enum) — present when valid\_contexts is set + +A third native tool — gather\_submit — is injected during gather\_info questioning. These three names are reserved: validate() rejects any agent that defines a SWAIG tool with one of them. See reserved\_native\_tool\_names(). + +Function whitelisting (Step::set\_functions)Each step may declare a functions whitelist. The whitelist is applied in-memory at the start of each LLM turn. CRITICALLY: if a step does NOT declare a functions field, it INHERITS the previous step's active set. See Step::set\_functions for details and examples. + +## Signature + +```cpp +class signalwire::contexts::ContextBuilder +``` + +## Methods + +### add\_context + +Add a new context. + +#### Signature + +```cpp +Context & add_context(const std::string & name) +``` + +#### Parameters + + + +#### Returns + +`Context &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 405. + +*** + +### attach\_tool\_name\_supplier + +Attach a tool-name supplier so validate() can check user-defined SWAIG tool names against reserved\_native\_tool\_names(). AgentBase::define\_contexts() wires this up automatically. + +#### Signature + +```cpp +ContextBuilder & attach_tool_name_supplier( + std::function< std::vector< std::string >()> supplier +) +``` + +#### Parameters + + + +#### Returns + +`ContextBuilder &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 414. + +*** + +### ContextBuilder + +#### Signature + +```cpp +void ContextBuilder() +``` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 399. + +*** + +### get\_context + +Get an existing context. + +#### Signature + +```cpp +Context * get_context(const std::string & name) +``` + +#### Parameters + + + +#### Returns + +`Context *` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 408. + +*** + +### has\_contexts + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +bool has_contexts() const +``` + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 429. + +*** + +### reset + +Remove all contexts, returning the builder to its initial state. + +#### Signature + +```cpp +ContextBuilder & reset() +``` + +#### Returns + +`ContextBuilder &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 402. + +*** + +### to\_json + +Serialize all contexts to JSON. + +**Modifiers:** `const` + +#### Signature + +```cpp +json to_json() const +``` + +#### Returns + +`json` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 427. + +*** + +### validate + +Validate all contexts. Checks: +At least one context is defined +A single context must be named "default" +Every context has at least one step +gather\_info completion\_action targets an existing step +No user-defined SWAIG tool collides with a reserved native name (via the attached tool-name supplier) + +**Modifiers:** `const` + +#### Signature + +```cpp +void validate() const +``` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 424. + +## Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 397. diff --git a/fern/products/sdk-reference/cpp/signalwire/contexts/context/index.mdx b/fern/products/sdk-reference/cpp/signalwire/contexts/context/index.mdx new file mode 100644 index 0000000000..4dbb8be411 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/contexts/context/index.mdx @@ -0,0 +1,836 @@ +--- +slug: "/reference/cpp/signalwire/contexts/context" +title: "Context" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::contexts::Context" + parent: "signalwire::contexts" + module: "signalwire.contexts" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp" + visibility: "public" +--- +# `Context` + +## Signature + +```cpp +class signalwire::contexts::Context +``` + +## Methods + +### add\_bullets + +Add a POM section with bullets to the context prompt. + +#### Signature + +```cpp +Context & add_bullets( + const std::string & title, + const std::vector< std::string > & bullets +) +``` + +#### Parameters + + + + + +#### Returns + +`Context &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 310. + +*** + +### add\_enter\_filler + +Add enter filler for a specific language. + +#### Signature + +```cpp +Context & add_enter_filler( + const std::string & lang, + const std::vector< std::string > & fillers +) +``` + +#### Parameters + + + + + +#### Returns + +`Context &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 325. + +*** + +### add\_exit\_filler + +Add exit filler for a specific language. + +#### Signature + +```cpp +Context & add_exit_filler( + const std::string & lang, + const std::vector< std::string > & fillers +) +``` + +#### Parameters + + + + + +#### Returns + +`Context &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 328. + +*** + +### add\_section + +Add a POM section to the context prompt. + +#### Signature + +```cpp +Context & add_section(const std::string & title, const std::string & body) +``` + +#### Parameters + + + + + +#### Returns + +`Context &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 307. + +*** + +### add\_step + +Add a new step to this context (returns reference for chaining). + +#### Signature + +```cpp +Step & add_step( + const std::string & name, + const std::string & task = "", + const std::vector< std::string > & bullets = {}, + const std::string & criteria = "", + const std::optional< std::variant< std::string, std::vector< std::string > > > & functions = std::nullopt, + const std::vector< std::string > & valid_steps = {} +) +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`Step &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 240. + +*** + +### add\_system\_bullets + +Add a POM section with bullets to the system prompt. + +#### Signature + +```cpp +Context & add_system_bullets( + const std::string & title, + const std::vector< std::string > & bullets +) +``` + +#### Parameters + + + + + +#### Returns + +`Context &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 316. + +*** + +### add\_system\_section + +Add a POM section to the system prompt. + +#### Signature + +```cpp +Context & add_system_section( + const std::string & title, + const std::string & body +) +``` + +#### Parameters + + + + + +#### Returns + +`Context &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 313. + +*** + +### Context + +#### Signature + + + + ```cpp + void Context() + ``` + + + + ```cpp + void Context(const std::string & name) + ``` + + + +#### Parameters (Overload 2) + + + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 236. + +*** + +### get\_step + +Get an existing step by name. + +#### Signature + +```cpp +Step * get_step(const std::string & name) +``` + +#### Parameters + + + +#### Returns + +`Step *` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 248. + +*** + +### has\_steps + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +bool has_steps() const +``` + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 334. + +*** + +### initial\_step + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::optional< std::string > & initial_step() const +``` + +#### Returns + +`const std::optional< std::string > &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 337. + +*** + +### move\_step + +Move a step to a specific position. + +#### Signature + +```cpp +Context & move_step(const std::string & name, int position) +``` + +#### Parameters + + + + + +#### Returns + +`Context &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 254. + +*** + +### name + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::string & name() const +``` + +#### Returns + +`const std::string &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 333. + +*** + +### remove\_step + +Remove a step. + +#### Signature + +```cpp +Context & remove_step(const std::string & name) +``` + +#### Parameters + + + +#### Returns + +`Context &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 251. + +*** + +### set\_consolidate + +Set consolidate. + +#### Signature + +```cpp +Context & set_consolidate(bool c) +``` + +#### Parameters + + + +#### Returns + +`Context &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 275. + +*** + +### set\_enter\_fillers + +Set enter fillers. + +#### Signature + +```cpp +Context & set_enter_fillers(const json & fillers) +``` + +#### Parameters + + + +#### Returns + +`Context &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 319. + +*** + +### set\_exit\_fillers + +Set exit fillers. + +#### Signature + +```cpp +Context & set_exit_fillers(const json & fillers) +``` + +#### Parameters + + + +#### Returns + +`Context &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 322. + +*** + +### set\_full\_reset + +Set full reset. + +#### Signature + +```cpp +Context & set_full_reset(bool fr) +``` + +#### Parameters + + + +#### Returns + +`Context &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 278. + +*** + +### set\_initial\_step + +Set which step the context starts on when entered. +By default, a context starts on its first step (index 0). Use this to skip a preamble step on re-entry via change\_context. + +#### Signature + +```cpp +Context & set_initial_step(const std::string & step_name) +``` + +#### Parameters + + + +#### Returns + +`Context &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 260. + +*** + +### set\_isolated + +Mark this context as isolated — entering it wipes conversation history. +When isolated=true and the context is entered via change\_context, the runtime wipes the conversation array. The model starts fresh with only the new context's system\_prompt + step instructions, with no memory of prior turns. +EXCEPTION — reset overrides the wipe: If the context also has a reset configuration (via set\_consolidate or set\_full\_reset), the wipe is skipped in favor of the reset behavior. Use reset with consolidate=true to summarize prior history into a single message instead of dropping it entirely. +Use cases: switching to a sensitive billing flow that should not see prior small-talk; handing off to a different agent persona; resetting after a long off-topic detour. + +#### Signature + +```cpp +Context & set_isolated(bool isolated) +``` + +#### Parameters + + + +#### Returns + +`Context &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 301. + +*** + +### set\_post\_prompt + +Set post prompt override. + +#### Signature + +```cpp +Context & set_post_prompt(const std::string & pp) +``` + +#### Parameters + + + +#### Returns + +`Context &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 269. + +*** + +### set\_prompt + +Set prompt text directly. + +#### Signature + +```cpp +Context & set_prompt(const std::string & prompt) +``` + +#### Parameters + + + +#### Returns + +`Context &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 304. + +*** + +### set\_system\_prompt + +Set system prompt (for context switching). + +#### Signature + +```cpp +Context & set_system_prompt(const std::string & sp) +``` + +#### Parameters + + + +#### Returns + +`Context &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 272. + +*** + +### set\_user\_prompt + +Set user prompt. + +#### Signature + +```cpp +Context & set_user_prompt(const std::string & up) +``` + +#### Parameters + + + +#### Returns + +`Context &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 281. + +*** + +### set\_valid\_contexts + +Set valid contexts for navigation. + +#### Signature + +```cpp +Context & set_valid_contexts(const std::vector< std::string > & ctxs) +``` + +#### Parameters + + + +#### Returns + +`Context &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 263. + +*** + +### set\_valid\_steps + +Set valid steps for all steps in this context. + +#### Signature + +```cpp +Context & set_valid_steps(const std::vector< std::string > & steps) +``` + +#### Parameters + + + +#### Returns + +`Context &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 266. + +*** + +### step\_order + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::vector< std::string > & step_order() const +``` + +#### Returns + +`const std::vector< std::string > &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 336. + +*** + +### steps + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::map< std::string, Step > & steps() const +``` + +#### Returns + +`const std::map< std::string, Step > &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 335. + +*** + +### to\_json + +Serialize to JSON. + +**Modifiers:** `const` + +#### Signature + +```cpp +json to_json() const +``` + +#### Returns + +`json` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 331. + +*** + +### valid\_contexts + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::optional< std::vector< std::string > > & valid_contexts() const +``` + +#### Returns + +`const std::optional< std::vector< std::string > > &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 338. + +## Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 234. diff --git a/fern/products/sdk-reference/cpp/signalwire/contexts/gather-info/index.mdx b/fern/products/sdk-reference/cpp/signalwire/contexts/gather-info/index.mdx new file mode 100644 index 0000000000..b47e6ae6a4 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/contexts/gather-info/index.mdx @@ -0,0 +1,185 @@ +--- +slug: "/reference/cpp/signalwire/contexts/gather-info" +title: "GatherInfo" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::contexts::GatherInfo" + parent: "signalwire::contexts" + module: "signalwire.contexts" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp" + visibility: "public" +--- +# `GatherInfo` + +## Signature + +```cpp +class signalwire::contexts::GatherInfo +``` + +## Methods + +### add\_question + +#### Signature + +```cpp +GatherInfo & add_question( + const std::string & key, + const std::string & question, + const std::string & type = "string", + bool confirm = false, + const std::string & prompt = "", + const std::vector< std::string > & functions = {} +) +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`GatherInfo &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 65. + +*** + +### completion\_action + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::string & completion_action() const +``` + +#### Returns + +`const std::string &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 74. + +*** + +### GatherInfo + +#### Signature + +```cpp +void GatherInfo( + const std::string & output_key = "", + const std::string & completion_action = "", + const std::string & prompt = "" +) +``` + +#### Parameters + + + + + + + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 61. + +*** + +### has\_questions + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +bool has_questions() const +``` + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 72. + +*** + +### questions + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::vector< GatherQuestion > & questions() const +``` + +#### Returns + +`const std::vector< GatherQuestion > &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 73. + +*** + +### to\_json + +**Modifiers:** `const` + +#### Signature + +```cpp +json to_json() const +``` + +#### Returns + +`json` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 70. + +## Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 59. diff --git a/fern/products/sdk-reference/cpp/signalwire/contexts/gather-question/index.mdx b/fern/products/sdk-reference/cpp/signalwire/contexts/gather-question/index.mdx new file mode 100644 index 0000000000..5abd6d0fec --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/contexts/gather-question/index.mdx @@ -0,0 +1,109 @@ +--- +slug: "/reference/cpp/signalwire/contexts/gather-question" +title: "GatherQuestion" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::contexts::GatherQuestion" + parent: "signalwire::contexts" + module: "signalwire.contexts" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp" + visibility: "public" +--- +# `GatherQuestion` + +## Signature + +```cpp +class signalwire::contexts::GatherQuestion +``` + +## Methods + +### GatherQuestion + +#### Signature + +```cpp +void GatherQuestion( + const std::string & key, + const std::string & question, + const std::string & type = "string", + bool confirm = false, + const std::string & prompt = "", + const std::vector< std::string > & functions = {} +) +``` + +#### Parameters + + + + + + + + + + + + + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 37. + +*** + +### key + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::string & key() const +``` + +#### Returns + +`const std::string &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 44. + +*** + +### to\_json + +**Modifiers:** `const` + +#### Signature + +```cpp +json to_json() const +``` + +#### Returns + +`json` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 42. + +## Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 35. diff --git a/fern/products/sdk-reference/cpp/signalwire/contexts/index.mdx b/fern/products/sdk-reference/cpp/signalwire/contexts/index.mdx new file mode 100644 index 0000000000..6051c712cf --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/contexts/index.mdx @@ -0,0 +1,89 @@ +--- +slug: "/reference/cpp/signalwire/contexts" +title: "contexts" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "module" + language: "cpp" + qualified_name: "signalwire::contexts" + parent: "signalwire" + module: "signalwire" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp" +--- +# `contexts` + +## Signature + +```cpp +namespace signalwire::contexts +``` + +## Constants + + + + + +## Classes + + + + + + Builder for multi-step, multi-context AI agent workflows. A ContextBuilder owns one or more Contexts; each Context owns an ordered list of Steps. Only one context and one step is active at a time. Per chat turn, the runtime injects the current step's instructions as a system message, then asks the LLM for a response. + + + + + + + + + +## Functions + +### reserved\_native\_tool\_names + +Reserved tool names auto-injected by the runtime when contexts/steps are present. User-defined SWAIG tools must not collide with these names: +next\_step / change\_context are injected when valid\_steps or valid\_contexts is set so the model can navigate the flow. +gather\_submit is injected while a step's gather\_info is collecting answers. ContextBuilder::validate() rejects any agent that registers a user tool sharing one of these names. + +#### Signature + +```cpp +const std::set< std::string > & reserved_native_tool_names() +``` + +#### Returns + +`const std::set< std::string > &` + +#### Source + +[`src/contexts/contexts.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/contexts/contexts.cpp) + +Line 10. + +## Type Aliases + +### json + +#### Signature + +```cpp +typedef nlohmann::json json +``` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 16. + +## Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 14. diff --git a/fern/products/sdk-reference/cpp/signalwire/contexts/step/index.mdx b/fern/products/sdk-reference/cpp/signalwire/contexts/step/index.mdx new file mode 100644 index 0000000000..f48ad3a775 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/contexts/step/index.mdx @@ -0,0 +1,657 @@ +--- +slug: "/reference/cpp/signalwire/contexts/step" +title: "Step" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::contexts::Step" + parent: "signalwire::contexts" + module: "signalwire.contexts" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp" + visibility: "public" +--- +# `Step` + +## Signature + +```cpp +class signalwire::contexts::Step +``` + +## Methods + +### add\_bullets + +Add a POM section with bullet points. + +#### Signature + +```cpp +Step & add_bullets( + const std::string & title, + const std::vector< std::string > & bullets +) +``` + +#### Parameters + + + + + +#### Returns + +`Step &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 99. + +*** + +### add\_gather\_question + +Add a gather question (set\_gather\_info must be called first). +IMPORTANT — gather mode locks function access: While the model is asking gather questions, the runtime forcibly deactivates ALL of the step's other functions. The only callable tools during a gather question are: + +gather\_submit (the native answer-submission tool) +Whatever names you pass in this question's functions argument + +next\_step and change\_context are also filtered out — the model cannot navigate away until the gather completes. This is by design: it forces a tight ask → submit → next-question loop. +If a question needs to call out to a tool (e.g. validate an email, geocode a ZIP), list that tool name in this question's functions argument. Functions listed here are active ONLY for this question. + +#### Signature + +```cpp +Step & add_gather_question( + const std::string & key, + const std::string & question, + const std::string & type = "string", + bool confirm = false, + const std::string & prompt = "", + const std::vector< std::string > & functions = {} +) +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`Step &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 186. + +*** + +### add\_section + +Add a POM section to the step. + +#### Signature + +```cpp +Step & add_section(const std::string & title, const std::string & body) +``` + +#### Parameters + + + + + +#### Returns + +`Step &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 96. + +*** + +### clear\_sections + +Clear all sections and text. + +#### Signature + +```cpp +Step & clear_sections() +``` + +#### Returns + +`Step &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 192. + +*** + +### gather\_info + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::optional< GatherInfo > & gather_info() const +``` + +#### Returns + +`const std::optional< GatherInfo > &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 206. + +*** + +### name + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::string & name() const +``` + +#### Returns + +`const std::string &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 203. + +*** + +### set\_end + +Mark this step as terminal for the step flow. +IMPORTANT: end=true does NOT end the conversation or hang up the call. It exits step mode entirely after this step executes — clearing the steps list, current step index, valid\_steps, and valid\_contexts. The agent keeps running, but operates only under the base system prompt and the context-level prompt; no more step instructions are injected and no more next\_step tool is offered. +To actually end the call, call a hangup tool or define a hangup hook. + +#### Signature + +```cpp +Step & set_end(bool end) +``` + +#### Parameters + + + +#### Returns + +`Step &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 153. + +*** + +### set\_functions + +Set which non-internal functions are callable while this step is active. +IMPORTANT — inheritance behavior: If you do NOT call this method, the step inherits whichever function set was active on the previous step (or the previous context's last step). The server-side runtime only resets the active set when a step explicitly declares its functions field. This is the most common source of bugs in multi-step agents: forgetting set\_functions on a later step lets the previous step's tools leak through. Best practice is to call set\_functions explicitly on every step that should differ from the previous one. +Keep the per-step active set small: LLM tool selection accuracy degrades noticeably past ~7-8 simultaneously-active tools per call. Use per-step whitelisting to partition large tool collections. +Internal functions (e.g. gather\_submit, hangup hook) are ALWAYS protected and cannot be deactivated by this whitelist. The native navigation tools next\_step and change\_context are injected automatically when set\_valid\_steps / set\_valid\_contexts is used; they are not affected by this list. + +functions + +One of: +std::vectorstd::string — whitelist of allowed names +empty std::vector — disable all user functions +std::string "none" — synonym for the empty vector + +#### Signature + +```cpp +Step & set_functions( + const std::variant< std::string, std::vector< std::string > > & functions +) +``` + +#### Parameters + + + One of: std::vectorstd::string — whitelist of allowed names empty std::vector — disable all user functions std::string "none" — synonym for the empty vector + + +#### Returns + +`Step &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 133. + +*** + +### set\_gather\_info + +Enable info gathering on this step. + +#### Signature + +```cpp +Step & set_gather_info( + const std::string & output_key = "", + const std::string & completion_action = "", + const std::string & prompt = "" +) +``` + +#### Parameters + + + + + + + +#### Returns + +`Step &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 162. + +*** + +### set\_reset\_consolidate + +#### Signature + +```cpp +Step & set_reset_consolidate(bool c) +``` + +#### Parameters + + + +#### Returns + +`Step &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 197. + +*** + +### set\_reset\_full\_reset + +#### Signature + +```cpp +Step & set_reset_full_reset(bool fr) +``` + +#### Parameters + + + +#### Returns + +`Step &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 198. + +*** + +### set\_reset\_system\_prompt + +Set reset parameters for context switching. + +#### Signature + +```cpp +Step & set_reset_system_prompt(const std::string & sp) +``` + +#### Parameters + + + +#### Returns + +`Step &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 195. + +*** + +### set\_reset\_user\_prompt + +#### Signature + +```cpp +Step & set_reset_user_prompt(const std::string & up) +``` + +#### Parameters + + + +#### Returns + +`Step &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 196. + +*** + +### set\_skip\_to\_next\_step + +Set whether to auto-advance to the next step. + +#### Signature + +```cpp +Step & set_skip_to_next_step(bool skip) +``` + +#### Parameters + + + +#### Returns + +`Step &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 159. + +*** + +### set\_skip\_user\_turn + +Set whether to skip waiting for user input. + +#### Signature + +```cpp +Step & set_skip_user_turn(bool skip) +``` + +#### Parameters + + + +#### Returns + +`Step &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 156. + +*** + +### set\_step\_criteria + +Set step completion criteria. + +#### Signature + +```cpp +Step & set_step_criteria(const std::string & criteria) +``` + +#### Parameters + + + +#### Returns + +`Step &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 102. + +*** + +### set\_text + +Set the step's prompt text directly. + +#### Signature + +```cpp +Step & set_text(const std::string & text) +``` + +#### Parameters + + + +#### Returns + +`Step &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 93. + +*** + +### set\_valid\_contexts + +Set which contexts can be navigated to from this step. + +#### Signature + +```cpp +Step & set_valid_contexts(const std::vector< std::string > & ctxs) +``` + +#### Parameters + + + +#### Returns + +`Step &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 139. + +*** + +### set\_valid\_steps + +Set which steps can be navigated to from this step. + +#### Signature + +```cpp +Step & set_valid_steps(const std::vector< std::string > & steps) +``` + +#### Parameters + + + +#### Returns + +`Step &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 136. + +*** + +### Step + +#### Signature + + + + ```cpp + void Step() + ``` + + + + ```cpp + void Step(const std::string & name) + ``` + + + +#### Parameters (Overload 2) + + + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 89. + +*** + +### to\_json + +Serialize to JSON. + +**Modifiers:** `const` + +#### Signature + +```cpp +json to_json() const +``` + +#### Returns + +`json` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 201. + +*** + +### valid\_contexts + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::optional< std::vector< std::string > > & valid_contexts() const +``` + +#### Returns + +`const std::optional< std::vector< std::string > > &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 205. + +*** + +### valid\_steps + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::optional< std::vector< std::string > > & valid_steps() const +``` + +#### Returns + +`const std::optional< std::vector< std::string > > &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 204. + +## Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 87. diff --git a/fern/products/sdk-reference/cpp/signalwire/core/index.mdx b/fern/products/sdk-reference/cpp/signalwire/core/index.mdx new file mode 100644 index 0000000000..a6ee013e28 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/core/index.mdx @@ -0,0 +1,33 @@ +--- +slug: "/reference/cpp/signalwire/core" +title: "core" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "module" + language: "cpp" + qualified_name: "signalwire::core" + parent: "signalwire" + module: "signalwire" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/core/logging_config.hpp" +--- +# `core` + +## Signature + +```cpp +namespace signalwire::core +``` + +## Modules + + + + + +## Source + +[`include/signalwire/core/logging_config.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/core/logging_config.hpp) + +Line 11. diff --git a/fern/products/sdk-reference/cpp/signalwire/core/logging-config/index.mdx b/fern/products/sdk-reference/cpp/signalwire/core/logging-config/index.mdx new file mode 100644 index 0000000000..a63473225f --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/core/logging-config/index.mdx @@ -0,0 +1,58 @@ +--- +slug: "/reference/cpp/signalwire/core/logging-config" +title: "logging_config" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "module" + language: "cpp" + qualified_name: "signalwire::core::logging_config" + parent: "signalwire::core" + module: "signalwire.core" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/core/logging_config.hpp" +--- +# `logging_config` + +## Signature + +```cpp +namespace signalwire::core::logging_config +``` + +## Functions + +### get\_execution\_mode + +Cross-language SDK contract for serverless / deployment-mode detection. +Mirrors signalwire.core.logging\_config.get\_execution\_mode in the Python reference. Order of precedence (FIRST match wins): + +GATEWAY\_INTERFACE -> "cgi" +AWS\_LAMBDA\_FUNCTION\_NAME or LAMBDA\_TASK\_ROOT -> "lambda" +FUNCTION\_TARGET, K\_SERVICE, or GOOGLE\_CLOUD\_PROJECT -> "google\_cloud\_function" +AZURE\_FUNCTIONS\_ENVIRONMENT, FUNCTIONS\_WORKER\_RUNTIME, or AzureWebJobsStorage -> "azure\_function" +otherwise -> "server" + +The detected mode as a canonical lower-case string. One of "cgi", "lambda", "google\_cloud\_function", "azure\_function", or "server". + +#### Signature + +```cpp +std::string get_execution_mode() +``` + +#### Returns + +`std::string` — The detected mode as a canonical lower-case string. One of "cgi", "lambda", "google\_cloud\_function", "azure\_function", or "server". + +#### Source + +[`src/core/logging_config.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/core/logging_config.cpp) + +Line 24. + +## Source + +[`include/signalwire/core/logging_config.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/core/logging_config.hpp) + +Line 12. diff --git a/fern/products/sdk-reference/cpp/signalwire/datamap/index.mdx b/fern/products/sdk-reference/cpp/signalwire/datamap/index.mdx new file mode 100644 index 0000000000..d92ef8e916 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/datamap/index.mdx @@ -0,0 +1,475 @@ +--- +slug: "/reference/cpp/signalwire/datamap" +title: "datamap" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::datamap" + parent: "signalwire" + module: "signalwire" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/datamap/datamap.hpp" +--- +# `datamap` + +Fluent builder for SWAIG data\_map tools (server-side, no webhook needed). Every setter returns \*this for chaining. + +## Signature + +```cpp +class signalwire::datamap::DataMap +``` + +## Methods + +### body + +Set request body for the last added webhook. + +#### Signature + +```cpp +DataMap & body(const json & data) +``` + +#### Parameters + + + +#### Returns + +`DataMap &` + +#### Source + +[`include/signalwire/datamap/datamap.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/datamap/datamap.hpp) + +Line 81. + +*** + +### DataMap + +**Modifiers:** `explicit` + +#### Signature + +```cpp +void DataMap(const std::string & function_name) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/datamap/datamap.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/datamap/datamap.hpp) + +Line 20. + +*** + +### description + +Alias for purpose(). Sets the LLM-facing tool description. This string is read by the model to decide WHEN to call this tool. See purpose() for bad-vs-good examples. + +#### Signature + +```cpp +DataMap & description(const std::string & desc) +``` + +#### Parameters + + + +#### Returns + +`DataMap &` + +#### Source + +[`include/signalwire/datamap/datamap.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/datamap/datamap.hpp) + +Line 43. + +*** + +### error\_keys + +Set error keys for the most recent webhook or top-level. + +#### Signature + +```cpp +DataMap & error_keys(const std::vector< std::string > & keys) +``` + +#### Parameters + + + +#### Returns + +`DataMap &` + +#### Source + +[`include/signalwire/datamap/datamap.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/datamap/datamap.hpp) + +Line 96. + +*** + +### expression + +Add an expression pattern for pattern-based responses. + +#### Signature + +```cpp +DataMap & expression( + const std::string & test_value, + const std::string & pattern, + const swaig::FunctionResult & output, + const swaig::FunctionResult * nomatch_output = nullptr +) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`DataMap &` + +#### Source + +[`include/signalwire/datamap/datamap.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/datamap/datamap.hpp) + +Line 66. + +*** + +### fallback\_output + +Set a fallback output at the top level. + +#### Signature + +```cpp +DataMap & fallback_output(const swaig::FunctionResult & result) +``` + +#### Parameters + + + +#### Returns + +`DataMap &` + +#### Source + +[`include/signalwire/datamap/datamap.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/datamap/datamap.hpp) + +Line 93. + +*** + +### foreach + +Set foreach configuration for the last webhook. + +#### Signature + +```cpp +DataMap & foreach(const json & foreach_config) +``` + +#### Parameters + + + +#### Returns + +`DataMap &` + +#### Source + +[`include/signalwire/datamap/datamap.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/datamap/datamap.hpp) + +Line 87. + +*** + +### global\_error\_keys + +Set top-level error keys. + +#### Signature + +```cpp +DataMap & global_error_keys(const std::vector< std::string > & keys) +``` + +#### Parameters + + + +#### Returns + +`DataMap &` + +#### Source + +[`include/signalwire/datamap/datamap.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/datamap/datamap.hpp) + +Line 99. + +*** + +### output + +Set output for the most recent webhook. + +#### Signature + +```cpp +DataMap & output(const swaig::FunctionResult & result) +``` + +#### Parameters + + + +#### Returns + +`DataMap &` + +#### Source + +[`include/signalwire/datamap/datamap.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/datamap/datamap.hpp) + +Line 90. + +*** + +### parameter + +Add a parameter to this data-map tool — the desc is LLM-FACING. +Each parameter description is rendered into the OpenAI tool schema under parameters.properties.<name>.description and sent to the model. The model uses it to decide HOW to fill in the argument from user speech. It is prompt engineering, not developer FYI. +Bad vs good: BAD : .parameter("city", "string", "the city") GOOD: .parameter("city", "string", "The name of the city to get weather for, e.g. " "'San Francisco'. Ask the user if they did not " "provide one. Include the state or country if the " "city name is ambiguous.") + +#### Signature + +```cpp +DataMap & parameter( + const std::string & name, + const std::string & param_type, + const std::string & desc, + bool required = false, + const std::vector< std::string > & enum_values = {} +) +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`DataMap &` + +#### Source + +[`include/signalwire/datamap/datamap.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/datamap/datamap.hpp) + +Line 61. + +*** + +### params + +Set request params for the last added webhook (alias for body). + +#### Signature + +```cpp +DataMap & params(const json & data) +``` + +#### Parameters + + + +#### Returns + +`DataMap &` + +#### Source + +[`include/signalwire/datamap/datamap.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/datamap/datamap.hpp) + +Line 84. + +*** + +### purpose + +Set the LLM-facing tool description (the "purpose"). PROMPT ENGINEERING, not developer documentation. +The description string is rendered into the OpenAI tool schema description field on every LLM turn. The model reads it to decide WHEN to call this tool. A vague purpose() is the #1 cause of "the model has the right tool but doesn't call it" failures with data-map tools. +Bad vs good: BAD : .purpose("weather api") GOOD: .purpose("Get the current weather conditions and " "forecast for a specific city. Use this " "whenever the user asks about weather, " "temperature, rain, or similar conditions in " "a named location.") + +#### Signature + +```cpp +DataMap & purpose(const std::string & desc) +``` + +#### Parameters + + + +#### Returns + +`DataMap &` + +#### Source + +[`include/signalwire/datamap/datamap.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/datamap/datamap.hpp) + +Line 38. + +*** + +### to\_swaig\_function + +Convert to a SWAIG function definition JSON \[\[nodiscard]]: the built tool definition is the output of the builder; dropping it discards the whole DataMap. (The fluent DataMap& setters above are intentionally NOT nodiscard.) + +**Modifiers:** `const` + +#### Signature + +```cpp +json to_swaig_function() const +``` + +#### Returns + +`json` + +#### Source + +[`include/signalwire/datamap/datamap.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/datamap/datamap.hpp) + +Line 105. + +*** + +### webhook + +Add a webhook API call. + +#### Signature + +```cpp +DataMap & webhook( + const std::string & method, + const std::string & url, + const json & headers = json::object(), + const std::string & form_param = "", + bool input_args_as_params = false, + const std::vector< std::string > & require_args = {} +) +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`DataMap &` + +#### Source + +[`include/signalwire/datamap/datamap.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/datamap/datamap.hpp) + +Line 71. + +*** + +### webhook\_expressions + +Add expressions that run after the most recent webhook. + +#### Signature + +```cpp +DataMap & webhook_expressions(const std::vector< json > & expressions) +``` + +#### Parameters + + + +#### Returns + +`DataMap &` + +#### Source + +[`include/signalwire/datamap/datamap.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/datamap/datamap.hpp) + +Line 78. + +## Type Aliases + +### json + +#### Signature + +```cpp +typedef nlohmann::json json +``` + +#### Source + +[`include/signalwire/datamap/datamap.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/datamap/datamap.hpp) + +Line 14. + +## Source + +[`include/signalwire/datamap/datamap.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/datamap/datamap.hpp) + +Line 18. diff --git a/fern/products/sdk-reference/cpp/signalwire/index.mdx b/fern/products/sdk-reference/cpp/signalwire/index.mdx new file mode 100644 index 0000000000..dc81d95980 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/index.mdx @@ -0,0 +1,445 @@ +--- +slug: "/reference/cpp/signalwire" +title: "signalwire" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "module" + language: "cpp" + qualified_name: "signalwire" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp" +--- +# `signalwire` + +SignalWire webhook signature validation. +Implements both schemes from porting-sdk/webhooks.md: + +Scheme A (RELAY/SWML/JSON): hex(HMAC-SHA1(key, url + raw\_body)) +Scheme B (Compat/cXML form): base64(HMAC-SHA1(key, url + sortedFormParams)) with optional bodySHA256 query-param fallback for JSON-on-compat-surface. + +All comparisons use CRYPTO\_memcmp (constant-time) so the secret is not leaked over repeated requests. The implementation MUST NOT log keys, signatures, or which branch failed — that's a spec requirement. + +## Signature + +```cpp +namespace signalwire +``` + +## Classes + + + + Fluent builder for SWAIG data\_map tools (server-side, no webhook needed). Every setter returns \*this for chaining. + + + + + +## Modules + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## Functions + +### add\_skill\_directory + +Add a directory to search for skills. +Mirrors Python's signalwire.add\_skill\_directory(path) — delegates to the singleton skills::SkillRegistry instance so third-party skill collections can be registered by path. + +std::invalid\_argument + +when the path doesn't exist or isn't a directory. + +#### Signature + +```cpp +void add_skill_directory(const std::string & path) +``` + +#### Parameters + + + +#### Throws + +- `std::invalid_argument` — when the path doesn't exist or isn't a directory. + +#### Source + +[`src/signalwire.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/signalwire.cpp) + +Line 94. + +*** + +### base64\_decode + +**Modifiers:** `inline` + +#### Signature + +```cpp +std::string base64_decode(const std::string & input) +``` + +#### Parameters + + + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/common.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/common.hpp) + +Line 115. + +*** + +### base64\_encode + +**Modifiers:** `inline` + +#### Signature + +```cpp +std::string base64_encode(const std::string & input) +``` + +#### Parameters + + + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/common.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/common.hpp) + +Line 97. + +*** + +### generate\_random\_password + +**Modifiers:** `inline` + +#### Signature + +```cpp +std::string generate_random_password(int length = 32) +``` + +#### Parameters + + + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/common.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/common.hpp) + +Line 70. + +*** + +### generate\_uuid + +**Modifiers:** `inline` + +#### Signature + +```cpp +std::string generate_uuid() +``` + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/common.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/common.hpp) + +Line 35. + +*** + +### get\_env + +**Modifiers:** `inline` + +#### Signature + +```cpp +std::string get_env( + const std::string & key, + const std::string & default_val = "" +) +``` + +#### Parameters + + + + + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/common.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/common.hpp) + +Line 49. + +*** + +### get\_logger + +**Modifiers:** `inline` + +#### Signature + +```cpp +Logger & get_logger() +``` + +#### Returns + +`Logger &` + +#### Source + +[`include/signalwire/logging.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging.hpp) + +Line 103. + +*** + +### list\_skills\_with\_params + +Get complete schema for all available skills. +Mirrors Python's signalwire.list\_skills\_with\_params(). Returns a map keyed by skill name where each value contains parameter metadata. Useful for GUI configuration tools, API documentation, or programmatic skill discovery. +C++ skills don't carry rich Python-style parameter introspection in v1, so each entry contains the skill name and an empty parameter map; built-in skills that expose parameter\_schema() via SkillBase get richer detail merged in. + +#### Signature + +```cpp +std::map< std::string, std::map< std::string, std::string > > list_skills_with_params() +``` + +#### Returns + +`std::map< std::string, std::map< std::string, std::string > >` + +#### Source + +[`src/signalwire.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/signalwire.cpp) + +Line 99. + +*** + +### register\_skill + +Register a custom skill class with the global skill registry. +Mirrors Python's signalwire.register\_skill(skill\_class). Delegates to skills::SkillRegistry::register\_skill. The skill's name comes from the supplied skills::SkillBase factory (which instantiates a SkillBase to read its skill\_name() accessor). + +#### Signature + +```cpp +void register_skill(skills::SkillFactory factory) +``` + +#### Parameters + + + +#### Source + +[`src/signalwire.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/signalwire.cpp) + +Line 79. + +*** + +### RestClient + +Top-level convenience entry points — mirror Python's signalwire/**init**.py package-level helpers (RestClient, register\_skill, add\_skill\_directory, list\_skills\_with\_params). +The audit projects each free function onto the canonical Python signalwire.<name> path. RestClient preserves PascalCase to match Python's same-cased factory function name. Construct a rest::RestClient from positional or keyword credentials. +Mirrors Python's top-level signalwire.RestClient(\*args, \*\*kwargs) factory — a thin wrapper that lazy-imports signalwire.rest.RestClient and instantiates it. Supports both positional credentials (args = \{project, token, space\}) and keyword credentials (kwargs\["project"] etc.) with environment-variable fallback. + +std::invalid\_argument + +when credentials cannot be derived from either args, kwargs, or the standard environment variables (SIGNALWIRE\_PROJECT\_ID, SIGNALWIRE\_API\_TOKEN, SIGNALWIRE\_SPACE). + +#### Signature + +```cpp +rest::RestClient RestClient( + const std::vector< std::string > & args = {}, + const std::map< std::string, std::string > & kwargs = {} +) +``` + +#### Parameters + + + + + +#### Returns + +`rest::RestClient` + +#### Throws + +- `std::invalid_argument` — when credentials cannot be derived from either args, kwargs, or the standard environment variables (SIGNALWIRE\_PROJECT\_ID, SIGNALWIRE\_API\_TOKEN, SIGNALWIRE\_SPACE). + +#### Source + +[`src/signalwire.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/signalwire.cpp) + +Line 46. + +*** + +### timing\_safe\_compare + +**Modifiers:** `inline` + +#### Signature + +```cpp +bool timing_safe_compare(const std::string & a, const std::string & b) +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/common.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/common.hpp) + +Line 87. + +*** + +### url\_encode + +**Modifiers:** `inline` + +#### Signature + +```cpp +std::string url_encode(const std::string & value) +``` + +#### Parameters + + + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/common.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/common.hpp) + +Line 55. + +## Type Aliases + +### json + +#### Signature + +```cpp +typedef nlohmann::json json +``` + +#### Source + +[`include/signalwire/common.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/common.hpp) + +Line 32. + +## Enums + +### LogLevel + +#### Signature + +```cpp +enum class LogLevel +``` + +#### Variants + + + + + + + + + + + +#### Source + +[`include/signalwire/logging.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging.hpp) + +Line 12. + +## Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 29. diff --git a/fern/products/sdk-reference/cpp/signalwire/logger/index.mdx b/fern/products/sdk-reference/cpp/signalwire/logger/index.mdx new file mode 100644 index 0000000000..96689a1e02 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/logger/index.mdx @@ -0,0 +1,264 @@ +--- +slug: "/reference/cpp/signalwire/logger" +title: "Logger" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::Logger" + parent: "signalwire" + module: "signalwire" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging.hpp" + visibility: "public" +--- +# `Logger` + +## Signature + +```cpp +class signalwire::Logger +``` + +## Methods + +### debug + +**Modifiers:** `inline` + +#### Signature + +```cpp +void debug(std::string_view msg) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/logging.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging.hpp) + +Line 73. + +*** + +### error + +**Modifiers:** `inline` + +#### Signature + +```cpp +void error(std::string_view msg) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/logging.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging.hpp) + +Line 76. + +*** + +### info + +**Modifiers:** `inline` + +#### Signature + +```cpp +void info(std::string_view msg) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/logging.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging.hpp) + +Line 74. + +*** + +### instance + +**Modifiers:** `static` `inline` + +#### Signature + +```cpp +Logger & instance() +``` + +#### Returns + +`Logger &` + +#### Source + +[`include/signalwire/logging.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging.hpp) + +Line 22. + +*** + +### is\_suppressed + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +bool is_suppressed() const +``` + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/logging.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging.hpp) + +Line 46. + +*** + +### level + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +LogLevel level() const +``` + +#### Returns + +`LogLevel` + +#### Source + +[`include/signalwire/logging.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging.hpp) + +Line 32. + +*** + +### log + +**Modifiers:** `inline` + +#### Signature + +```cpp +void log(LogLevel level, std::string_view message) +``` + +#### Parameters + + + + + +#### Source + +[`include/signalwire/logging.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging.hpp) + +Line 53. + +*** + +### set\_level + +**Modifiers:** `inline` + +#### Signature + +```cpp +void set_level(LogLevel level) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/logging.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging.hpp) + +Line 27. + +*** + +### suppress + +**Modifiers:** `inline` + +#### Signature + +```cpp +void suppress() +``` + +#### Source + +[`include/signalwire/logging.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging.hpp) + +Line 36. + +*** + +### unsuppress + +**Modifiers:** `inline` + +#### Signature + +```cpp +void unsuppress() +``` + +#### Source + +[`include/signalwire/logging.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging.hpp) + +Line 41. + +*** + +### warn + +**Modifiers:** `inline` + +#### Signature + +```cpp +void warn(std::string_view msg) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/logging.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging.hpp) + +Line 75. + +## Source + +[`include/signalwire/logging.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging.hpp) + +Line 20. diff --git a/fern/products/sdk-reference/cpp/signalwire/logging/index.mdx b/fern/products/sdk-reference/cpp/signalwire/logging/index.mdx new file mode 100644 index 0000000000..c0b0df026b --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/logging/index.mdx @@ -0,0 +1,109 @@ +--- +slug: "/reference/cpp/signalwire/logging" +title: "logging" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "module" + language: "cpp" + qualified_name: "signalwire::logging" + parent: "signalwire" + module: "signalwire" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging/logger.hpp" +--- +# `logging` + +## Signature + +```cpp +namespace signalwire::logging +``` + +## Classes + + + + + +## Functions + +### get\_log\_level + +**Modifiers:** `inline` + +#### Signature + +```cpp +LogLevel get_log_level() +``` + +#### Returns + +`LogLevel` + +#### Source + +[`include/signalwire/logging/logger.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging/logger.hpp) + +Line 15. + +*** + +### get\_logger + +**Modifiers:** `inline` + +#### Signature + +```cpp +Logger get_logger(const std::string & name) +``` + +#### Parameters + + + +#### Returns + +`Logger` + +#### Source + +[`include/signalwire/logging/logger.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging/logger.hpp) + +Line 56. + +## Enums + +### LogLevel + +#### Signature + +```cpp +enum class LogLevel +``` + +#### Variants + + + + + + + + + + + +#### Source + +[`include/signalwire/logging/logger.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging/logger.hpp) + +Line 13. + +## Source + +[`include/signalwire/logging/logger.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging/logger.hpp) + +Line 11. diff --git a/fern/products/sdk-reference/cpp/signalwire/logging/logger/index.mdx b/fern/products/sdk-reference/cpp/signalwire/logging/logger/index.mdx new file mode 100644 index 0000000000..18c1bb9d80 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/logging/logger/index.mdx @@ -0,0 +1,138 @@ +--- +slug: "/reference/cpp/signalwire/logging/logger" +title: "Logger" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::logging::Logger" + parent: "signalwire::logging" + module: "signalwire.logging" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging/logger.hpp" + visibility: "public" +--- +# `Logger` + +## Signature + +```cpp +class signalwire::logging::Logger +``` + +## Methods + +### debug + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +void debug(std::string_view msg) const +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/logging/logger.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging/logger.hpp) + +Line 35. + +*** + +### error + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +void error(std::string_view msg) const +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/logging/logger.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging/logger.hpp) + +Line 47. + +*** + +### info + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +void info(std::string_view msg) const +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/logging/logger.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging/logger.hpp) + +Line 39. + +*** + +### Logger + +**Modifiers:** `explicit` `inline` + +#### Signature + +```cpp +void Logger(const std::string & name) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/logging/logger.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging/logger.hpp) + +Line 29. + +*** + +### warn + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +void warn(std::string_view msg) const +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/logging/logger.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging/logger.hpp) + +Line 43. + +## Source + +[`include/signalwire/logging/logger.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging/logger.hpp) + +Line 27. diff --git a/fern/products/sdk-reference/cpp/signalwire/pom/index.mdx b/fern/products/sdk-reference/cpp/signalwire/pom/index.mdx new file mode 100644 index 0000000000..434a1b84fe --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/pom/index.mdx @@ -0,0 +1,131 @@ +--- +slug: "/reference/cpp/signalwire/pom" +title: "pom" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "module" + language: "cpp" + qualified_name: "signalwire::pom" + parent: "signalwire" + module: "signalwire" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp" +--- +# `pom` + +## Signature + +```cpp +namespace signalwire::pom +``` + +## Classes + + + + Top-level container of an ordered list of sections. + + + + One section in the Prompt Object Model tree. Mirrors Python's signalwire.pom.pom.Section. Fields are public to match the Python attribute access pattern section.body, section.bullets, section.subsections. + + + +## Functions + +### yaml\_dump + +Emit a json value as YAML. Inverse of yaml\_parse. Pretty output matches the shape PyYAML's yaml.dump(..., default\_flow\_style=False, sort\_keys=False) produces for the POM shape. + +#### Signature + +```cpp +std::string yaml_dump(const json & value) +``` + +#### Parameters + + + +#### Returns + +`std::string` + +#### Source + +[`src/pom/pom.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/pom/pom.cpp) + +Line 1121. + +*** + +### yaml\_dump\_ordered + +#### Signature + +```cpp +std::string yaml_dump_ordered(const nlohmann::ordered_json & value) +``` + +#### Parameters + + + +#### Returns + +`std::string` + +#### Source + +[`src/pom/pom.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/pom/pom.cpp) + +Line 1129. + +*** + +### yaml\_parse + +Parse a YAML document (POM-shaped subset only) into a json value. Supports list-of-dicts at top level; values may be strings, booleans, or lists of either. Throws std::invalid\_argument on malformed input. + +#### Signature + +```cpp +json yaml_parse(const std::string & yaml_text) +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`src/pom/pom.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/pom/pom.cpp) + +Line 1110. + +## Type Aliases + +### json + +#### Signature + +```cpp +typedef nlohmann::json json +``` + +#### Source + +[`include/signalwire/pom/pom.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp) + +Line 39. + +## Source + +[`include/signalwire/pom/pom.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp) + +Line 37. diff --git a/fern/products/sdk-reference/cpp/signalwire/pom/prompt-object-model/index.mdx b/fern/products/sdk-reference/cpp/signalwire/pom/prompt-object-model/index.mdx new file mode 100644 index 0000000000..b2468fce2a --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/pom/prompt-object-model/index.mdx @@ -0,0 +1,391 @@ +--- +slug: "/reference/cpp/signalwire/pom/prompt-object-model" +title: "PromptObjectModel" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::pom::PromptObjectModel" + parent: "signalwire::pom" + module: "signalwire.pom" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp" + visibility: "public" +--- +# `PromptObjectModel` + +Top-level container of an ordered list of sections. + +## Signature + +```cpp +class signalwire::pom::PromptObjectModel +``` + +## Properties + + + + + +## Methods + +### add\_pom\_as\_subsection + +Add every top-level section of pom\_to\_add as a subsection of the section identified by target\_title. Throws std::invalid\_argument when no matching section exists. + +#### Signature + + + + ```cpp + void add_pom_as_subsection( + const std::string & target_title, + const PromptObjectModel & pom_to_add + ) + ``` + + + + ```cpp + void add_pom_as_subsection( + Section & target, + const PromptObjectModel & pom_to_add + ) + ``` + + + +#### Parameters (Overload 1) + + + + + +#### Parameters (Overload 2) + + + + + +#### Source + +[`include/signalwire/pom/pom.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp) + +Line 188. + +*** + +### add\_section + +Append a new top-level section. title may be empty only for the very first section (Python enforces "Only the first section can +have no title"); subsequent calls without a title throw std::invalid\_argument. + +#### Signature + +```cpp +Section & add_section( + const std::string & title = "", + const std::string & body = "", + const std::vector< std::string > & bullets = {}, + std::optional< bool > numbered = std::nullopt, + bool numbered_bullets = false +) +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`Section &` + +#### Source + +[`include/signalwire/pom/pom.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp) + +Line 152. + +*** + +### find\_section + +Recursively search for a section by title. Returns a pointer to the owned section so callers can mutate it; returns nullptr when nothing matches. Pointer is invalidated by any subsequent mutation of the POM that grows sections or subsections (caller's responsibility — same contract as std::vector::data()). + +#### Signature + + + + ```cpp + Section * find_section(const std::string & title) + ``` + + + + ```cpp + const Section * find_section(const std::string & title) const + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`Section *` + +#### Returns (Overload 2) + +`const Section *` + +#### Source + +[`include/signalwire/pom/pom.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp) + +Line 163. + +*** + +### from\_json + +Build a POM from a JSON string. Throws nlohmann::json::parse\_error on malformed JSON, and std::invalid\_argument on shape violations (missing required fields, wrong types, etc.). + +**Modifiers:** `static` + +#### Signature + + + + ```cpp + PromptObjectModel from_json(const std::string & json_text) + ``` + + + + ```cpp + PromptObjectModel from_json(const json & data) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`PromptObjectModel` + +#### Returns (Overload 2) + +`PromptObjectModel` + +#### Source + +[`include/signalwire/pom/pom.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp) + +Line 142. + +*** + +### from\_yaml + +Build a POM from a YAML string (minimal POM-shaped subset only). + +**Modifiers:** `static` + +#### Signature + +```cpp +PromptObjectModel from_yaml(const std::string & yaml_text) +``` + +#### Parameters + + + +#### Returns + +`PromptObjectModel` + +#### Source + +[`include/signalwire/pom/pom.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp) + +Line 146. + +*** + +### PromptObjectModel + +#### Signature + + + + ```cpp + void PromptObjectModel() + ``` + + + + ```cpp + void PromptObjectModel(bool debug_flag) + ``` + + + +#### Parameters (Overload 2) + + + +#### Source + +[`include/signalwire/pom/pom.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp) + +Line 135. + +*** + +### render\_markdown + +Render entire POM as Markdown. + +**Modifiers:** `const` + +#### Signature + +```cpp +std::string render_markdown() const +``` + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/pom/pom.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp) + +Line 179. + +*** + +### render\_xml + +Render entire POM as XML (with <?xml ... ?> prolog and a <prompt> root element). + +**Modifiers:** `const` + +#### Signature + +```cpp +std::string render_xml() const +``` + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/pom/pom.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp) + +Line 183. + +*** + +### to\_dict + +Whole-tree dict view (a json array). Identical content to to\_json, returned as a parsed json value. + +**Modifiers:** `const` + +#### Signature + +```cpp +json to_dict() const +``` + +#### Returns + +`json` + +#### Source + +[`include/signalwire/pom/pom.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp) + +Line 176. + +*** + +### to\_json + +Whole-tree JSON serializer. Returns a pretty-printed (indent=2) JSON array string, matching Python's json.dumps(..., indent=2). + +**Modifiers:** `const` + +#### Signature + +```cpp +std::string to_json() const +``` + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/pom/pom.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp) + +Line 168. + +*** + +### to\_yaml + +Whole-tree YAML serializer. Returns a YAML document representing the JSON-equivalent list-of-dicts structure. + +**Modifiers:** `const` + +#### Signature + +```cpp +std::string to_yaml() const +``` + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/pom/pom.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp) + +Line 172. + +## Source + +[`include/signalwire/pom/pom.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp) + +Line 130. diff --git a/fern/products/sdk-reference/cpp/signalwire/pom/section/index.mdx b/fern/products/sdk-reference/cpp/signalwire/pom/section/index.mdx new file mode 100644 index 0000000000..596cc63b7b --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/pom/section/index.mdx @@ -0,0 +1,301 @@ +--- +slug: "/reference/cpp/signalwire/pom/section" +title: "Section" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::pom::Section" + parent: "signalwire::pom" + module: "signalwire.pom" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp" + visibility: "public" +--- +# `Section` + +One section in the Prompt Object Model tree. +Mirrors Python's signalwire.pom.pom.Section. Fields are public to match the Python attribute access pattern section.body, section.bullets, section.subsections. + +## Signature + +```cpp +class signalwire::pom::Section +``` + +## Properties + + + Optional paragraph of body text. + + + + Optional bullet list. + + + + Whether this section participates in section numbering. Three-state: std::nullopt — not specified (Python None); inherits. true — explicitly numbered. false — explicitly opted out of numbering. Numbering is "all-or-none per sibling group": if any sibling has numbered == true, every sibling gets numbered unless it explicitly opts out with false. + + + + When true, bullets are rendered as a numbered list (1. 2. 3.) in markdown and as <bullet id="1"> in XML, instead of dash bullets. + + + + Nested sections (recursively the same shape). + + + + Section title. Optional only on the very first top-level section (Python enforces "only the first section can have no title"); for subsections a title is always required. + + +## Methods + +### add\_body + +Replace (NOT append) the body text. Mirrors Python's documented "Add OR REPLACE the body text" contract. + +#### Signature + +```cpp +void add_body(const std::string & b) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/pom/pom.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp) + +Line 90. + +*** + +### add\_bullets + +Append bullets to the existing list. + +#### Signature + +```cpp +void add_bullets(const std::vector< std::string > & bs) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/pom/pom.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp) + +Line 93. + +*** + +### add\_subsection + +Add a child subsection. Returns a reference to the newly-created subsection so callers can chain further mutations. Throws std::invalid\_argument if title is empty (Python raises ValueError("Subsections must have a title")). + +#### Signature + +```cpp +Section & add_subsection( + const std::string & title, + const std::string & body = "", + const std::vector< std::string > & bullets = {}, + std::optional< bool > numbered = std::nullopt, + bool numbered_bullets = false +) +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`Section &` + +#### Source + +[`include/signalwire/pom/pom.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp) + +Line 99. + +*** + +### render\_markdown + +Render this section + subtree as Markdown. level is the heading level for this section (default 2 = ## ); section\_number is the parent path that will prefix this section's title (e.g. \{1, 2\} -> "1.2. "); empty means "no numbering". + +**Modifiers:** `const` + +#### Signature + +```cpp +std::string render_markdown( + int level = 2, + const std::vector< int > & section_number = {} +) const +``` + +#### Parameters + + + + + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/pom/pom.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp) + +Line 118. + +*** + +### render\_xml + +Render this section + subtree as XML. indent is the number of 2-space indents to use; section\_number follows the same rule as render\_markdown. + +**Modifiers:** `const` + +#### Signature + +```cpp +std::string render_xml( + int indent = 0, + const std::vector< int > & section_number = {} +) const +``` + +#### Parameters + + + + + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/pom/pom.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp) + +Line 124. + +*** + +### Section + +Build a Section. title is optional; everything else has sensible defaults so empty Sections can be created and populated incrementally via add\_body / add\_bullets / add\_subsection. + +#### Signature + + + + ```cpp + void Section() + ``` + + + + ```cpp + void Section( + std::optional< std::string > t, + std::string b = "", + std::vector< std::string > bs = {}, + std::optional< bool > num = std::nullopt, + bool numbered_bullets = false + ) + ``` + + + +#### Parameters (Overload 2) + + + + + + + + + + + +#### Source + +[`include/signalwire/pom/pom.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp) + +Line 77. + +*** + +### to\_dict + +Python-compatible alias for to\_json — Python exposes to\_dict. Returns the same JSON object. + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json to_dict() const +``` + +#### Returns + +`json` + +#### Source + +[`include/signalwire/pom/pom.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp) + +Line 112. + +*** + +### to\_json + +Convert the section (and its subtree) to a JSON object. Matches the Python key order: title, body, bullets, subsections, numbered, numberedBullets. + +**Modifiers:** `const` + +#### Signature + +```cpp +json to_json() const +``` + +#### Returns + +`json` + +#### Source + +[`include/signalwire/pom/pom.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp) + +Line 108. + +## Source + +[`include/signalwire/pom/pom.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp) + +Line 48. diff --git a/fern/products/sdk-reference/cpp/signalwire/prefabs/concierge-agent/index.mdx b/fern/products/sdk-reference/cpp/signalwire/prefabs/concierge-agent/index.mdx new file mode 100644 index 0000000000..0209e20258 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/prefabs/concierge-agent/index.mdx @@ -0,0 +1,139 @@ +--- +slug: "/reference/cpp/signalwire/prefabs/concierge-agent" +title: "ConciergeAgent" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::prefabs::ConciergeAgent" + parent: "signalwire::prefabs" + module: "signalwire.prefabs" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp" + visibility: "public" +--- +# `ConciergeAgent` + +Venue concierge with amenity info. + +## Signature + +```cpp +class signalwire::prefabs::ConciergeAgent : signalwire::agent::AgentBase +``` + +## Inheritance + +**Extends:** [signalwire::agent::AgentBase](/docs/sdk-reference/reference/cpp/signalwire/agent/agent-base) + +## Methods + +### ConciergeAgent + +**Modifiers:** `explicit` + +#### Signature + +```cpp +void ConciergeAgent( + const std::string & name = "concierge", + const std::string & route = "/", + const std::string & host = "0.0.0.0", + int port = 3000 +) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) + +Line 67. + +*** + +### set\_amenities + +#### Signature + +```cpp +ConciergeAgent & set_amenities(const std::vector< json > & amenities) +``` + +#### Parameters + + + +#### Returns + +`ConciergeAgent &` + +#### Source + +[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) + +Line 73. + +*** + +### set\_hours + +#### Signature + +```cpp +ConciergeAgent & set_hours(const json & hours) +``` + +#### Parameters + + + +#### Returns + +`ConciergeAgent &` + +#### Source + +[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) + +Line 74. + +*** + +### set\_venue\_name + +#### Signature + +```cpp +ConciergeAgent & set_venue_name(const std::string & name) +``` + +#### Parameters + + + +#### Returns + +`ConciergeAgent &` + +#### Source + +[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) + +Line 72. + +## Source + +[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) + +Line 65. diff --git a/fern/products/sdk-reference/cpp/signalwire/prefabs/faq-bot-agent/index.mdx b/fern/products/sdk-reference/cpp/signalwire/prefabs/faq-bot-agent/index.mdx new file mode 100644 index 0000000000..2fdba2e871 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/prefabs/faq-bot-agent/index.mdx @@ -0,0 +1,139 @@ +--- +slug: "/reference/cpp/signalwire/prefabs/faq-bot-agent" +title: "FAQBotAgent" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::prefabs::FAQBotAgent" + parent: "signalwire::prefabs" + module: "signalwire.prefabs" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp" + visibility: "public" +--- +# `FAQBotAgent` + +Keyword-based FAQ matching. + +## Signature + +```cpp +class signalwire::prefabs::FAQBotAgent : signalwire::agent::AgentBase +``` + +## Inheritance + +**Extends:** [signalwire::agent::AgentBase](/docs/sdk-reference/reference/cpp/signalwire/agent/agent-base) + +## Methods + +### FAQBotAgent + +**Modifiers:** `explicit` + +#### Signature + +```cpp +void FAQBotAgent( + const std::string & name = "faq_bot", + const std::string & route = "/", + const std::string & host = "0.0.0.0", + int port = 3000 +) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) + +Line 54. + +*** + +### set\_faqs + +#### Signature + +```cpp +FAQBotAgent & set_faqs(const std::vector< json > & faqs) +``` + +#### Parameters + + + +#### Returns + +`FAQBotAgent &` + +#### Source + +[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) + +Line 59. + +*** + +### set\_no\_match\_message + +#### Signature + +```cpp +FAQBotAgent & set_no_match_message(const std::string & msg) +``` + +#### Parameters + + + +#### Returns + +`FAQBotAgent &` + +#### Source + +[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) + +Line 60. + +*** + +### set\_suggest\_related + +#### Signature + +```cpp +FAQBotAgent & set_suggest_related(bool suggest) +``` + +#### Parameters + + + +#### Returns + +`FAQBotAgent &` + +#### Source + +[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) + +Line 61. + +## Source + +[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) + +Line 52. diff --git a/fern/products/sdk-reference/cpp/signalwire/prefabs/index.mdx b/fern/products/sdk-reference/cpp/signalwire/prefabs/index.mdx new file mode 100644 index 0000000000..3ebfe3b2ea --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/prefabs/index.mdx @@ -0,0 +1,67 @@ +--- +slug: "/reference/cpp/signalwire/prefabs" +title: "prefabs" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "module" + language: "cpp" + qualified_name: "signalwire::prefabs" + parent: "signalwire" + module: "signalwire" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp" +--- +# `prefabs` + +## Signature + +```cpp +namespace signalwire::prefabs +``` + +## Classes + + + + Venue concierge with amenity info. + + + + Keyword-based FAQ matching. + + + + Sequential question collection with key/value answers. + + + + Department routing with call transfer. + + + + Typed surveys with validation. + + + +## Type Aliases + +### json + +#### Signature + +```cpp +typedef nlohmann::json json +``` + +#### Source + +[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) + +Line 10. + +## Source + +[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) + +Line 8. diff --git a/fern/products/sdk-reference/cpp/signalwire/prefabs/info-gatherer-agent/index.mdx b/fern/products/sdk-reference/cpp/signalwire/prefabs/info-gatherer-agent/index.mdx new file mode 100644 index 0000000000..8906e2e6b4 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/prefabs/info-gatherer-agent/index.mdx @@ -0,0 +1,139 @@ +--- +slug: "/reference/cpp/signalwire/prefabs/info-gatherer-agent" +title: "InfoGathererAgent" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::prefabs::InfoGathererAgent" + parent: "signalwire::prefabs" + module: "signalwire.prefabs" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp" + visibility: "public" +--- +# `InfoGathererAgent` + +Sequential question collection with key/value answers. + +## Signature + +```cpp +class signalwire::prefabs::InfoGathererAgent : signalwire::agent::AgentBase +``` + +## Inheritance + +**Extends:** [signalwire::agent::AgentBase](/docs/sdk-reference/reference/cpp/signalwire/agent/agent-base) + +## Methods + +### InfoGathererAgent + +**Modifiers:** `explicit` + +#### Signature + +```cpp +void InfoGathererAgent( + const std::string & name = "info_gatherer", + const std::string & route = "/", + const std::string & host = "0.0.0.0", + int port = 3000 +) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) + +Line 15. + +*** + +### set\_completion\_message + +#### Signature + +```cpp +InfoGathererAgent & set_completion_message(const std::string & msg) +``` + +#### Parameters + + + +#### Returns + +`InfoGathererAgent &` + +#### Source + +[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) + +Line 21. + +*** + +### set\_prefix + +#### Signature + +```cpp +InfoGathererAgent & set_prefix(const std::string & prefix) +``` + +#### Parameters + + + +#### Returns + +`InfoGathererAgent &` + +#### Source + +[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) + +Line 22. + +*** + +### set\_questions + +#### Signature + +```cpp +InfoGathererAgent & set_questions(const std::vector< json > & questions) +``` + +#### Parameters + + + +#### Returns + +`InfoGathererAgent &` + +#### Source + +[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) + +Line 20. + +## Source + +[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) + +Line 13. diff --git a/fern/products/sdk-reference/cpp/signalwire/prefabs/receptionist-agent/index.mdx b/fern/products/sdk-reference/cpp/signalwire/prefabs/receptionist-agent/index.mdx new file mode 100644 index 0000000000..219d5a14f9 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/prefabs/receptionist-agent/index.mdx @@ -0,0 +1,139 @@ +--- +slug: "/reference/cpp/signalwire/prefabs/receptionist-agent" +title: "ReceptionistAgent" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::prefabs::ReceptionistAgent" + parent: "signalwire::prefabs" + module: "signalwire.prefabs" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp" + visibility: "public" +--- +# `ReceptionistAgent` + +Department routing with call transfer. + +## Signature + +```cpp +class signalwire::prefabs::ReceptionistAgent : signalwire::agent::AgentBase +``` + +## Inheritance + +**Extends:** [signalwire::agent::AgentBase](/docs/sdk-reference/reference/cpp/signalwire/agent/agent-base) + +## Methods + +### ReceptionistAgent + +**Modifiers:** `explicit` + +#### Signature + +```cpp +void ReceptionistAgent( + const std::string & name = "receptionist", + const std::string & route = "/", + const std::string & host = "0.0.0.0", + int port = 3000 +) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) + +Line 41. + +*** + +### set\_departments + +#### Signature + +```cpp +ReceptionistAgent & set_departments(const json & departments) +``` + +#### Parameters + + + +#### Returns + +`ReceptionistAgent &` + +#### Source + +[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) + +Line 46. + +*** + +### set\_greeting + +#### Signature + +```cpp +ReceptionistAgent & set_greeting(const std::string & greeting) +``` + +#### Parameters + + + +#### Returns + +`ReceptionistAgent &` + +#### Source + +[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) + +Line 47. + +*** + +### set\_transfer\_message + +#### Signature + +```cpp +ReceptionistAgent & set_transfer_message(const std::string & msg) +``` + +#### Parameters + + + +#### Returns + +`ReceptionistAgent &` + +#### Source + +[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) + +Line 48. + +## Source + +[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) + +Line 39. diff --git a/fern/products/sdk-reference/cpp/signalwire/prefabs/survey-agent/index.mdx b/fern/products/sdk-reference/cpp/signalwire/prefabs/survey-agent/index.mdx new file mode 100644 index 0000000000..35531b059e --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/prefabs/survey-agent/index.mdx @@ -0,0 +1,139 @@ +--- +slug: "/reference/cpp/signalwire/prefabs/survey-agent" +title: "SurveyAgent" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::prefabs::SurveyAgent" + parent: "signalwire::prefabs" + module: "signalwire.prefabs" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp" + visibility: "public" +--- +# `SurveyAgent` + +Typed surveys with validation. + +## Signature + +```cpp +class signalwire::prefabs::SurveyAgent : signalwire::agent::AgentBase +``` + +## Inheritance + +**Extends:** [signalwire::agent::AgentBase](/docs/sdk-reference/reference/cpp/signalwire/agent/agent-base) + +## Methods + +### set\_completion\_message + +#### Signature + +```cpp +SurveyAgent & set_completion_message(const std::string & msg) +``` + +#### Parameters + + + +#### Returns + +`SurveyAgent &` + +#### Source + +[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) + +Line 34. + +*** + +### set\_intro\_message + +#### Signature + +```cpp +SurveyAgent & set_intro_message(const std::string & msg) +``` + +#### Parameters + + + +#### Returns + +`SurveyAgent &` + +#### Source + +[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) + +Line 35. + +*** + +### set\_questions + +#### Signature + +```cpp +SurveyAgent & set_questions(const std::vector< json > & questions) +``` + +#### Parameters + + + +#### Returns + +`SurveyAgent &` + +#### Source + +[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) + +Line 33. + +*** + +### SurveyAgent + +**Modifiers:** `explicit` + +#### Signature + +```cpp +void SurveyAgent( + const std::string & name = "survey", + const std::string & route = "/", + const std::string & host = "0.0.0.0", + int port = 3000 +) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) + +Line 28. + +## Source + +[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) + +Line 26. diff --git a/fern/products/sdk-reference/cpp/signalwire/relay/action/index.mdx b/fern/products/sdk-reference/cpp/signalwire/relay/action/index.mdx new file mode 100644 index 0000000000..c7cf045d7f --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/relay/action/index.mdx @@ -0,0 +1,640 @@ +--- +slug: "/reference/cpp/signalwire/relay/action" +title: "Action" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::relay::Action" + parent: "signalwire::relay" + module: "signalwire.relay" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp" + visibility: "public" +--- +# `Action` + +Represents a controllable in-progress operation (play, record, collect, etc.) Uses shared internal state so the object can be copied/moved freely while maintaining a single underlying condition\_variable for synchronization. + +## Signature + +```cpp +class signalwire::relay::Action +``` + +## Methods + +### Action + +#### Signature + + + + ```cpp + void Action() + ``` + + + + ```cpp + void Action(const std::string & control_id) + ``` + + + + ```cpp + void Action( + const std::string & control_id, + RelayClient * client, + const std::string & call_id, + const std::string & node_id + ) + ``` + + + +#### Parameters (Overload 2) + + + +#### Parameters (Overload 3) + + + + + + + + + +#### Source + +[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) + +Line 27. + +*** + +### call\_id + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::string & call_id() const +``` + +#### Returns + +`const std::string &` + +#### Source + +[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) + +Line 36. + +*** + +### completed + +**Modifiers:** `const` + +#### Signature + +```cpp +bool completed() const +``` + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) + +Line 34. + +*** + +### control\_id + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::string & control_id() const +``` + +#### Returns + +`const std::string &` + +#### Source + +[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) + +Line 32. + +*** + +### event\_type\_filter + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::vector< std::string > & event_type_filter() const +``` + +#### Returns + +`const std::vector< std::string > &` + +#### Source + +[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) + +Line 56. + +*** + +### event\_type\_matches + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +bool event_type_matches(const std::string & event_type) const +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) + +Line 59. + +*** + +### method\_prefix + +Method prefix used for sub-command frames (stop/pause/resume/...). Defaults to "calling.play"; set explicitly when an Action is built for a different verb (record, collect, detect, ...). The Call::execute\_action factory plumbs this through. + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::string & method_prefix() const +``` + +#### Returns + +`const std::string &` + +#### Source + +[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) + +Line 43. + +*** + +### node\_id + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::string & node_id() const +``` + +#### Returns + +`const std::string &` + +#### Source + +[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) + +Line 37. + +*** + +### on\_completed + +Set a callback to fire when the action completes. + +#### Signature + +```cpp +void on_completed(CompletedCallback cb) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) + +Line 112. + +*** + +### pause + +Request the server to pause this action. extra\_params may carry e.g. \{"behavior": "continuous"\} for record-side pause. + +#### Signature + +```cpp +void pause(const json & extra_params = json::object()) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) + +Line 98. + +*** + +### resolve + +Resolve the action immediately (used for call-gone scenarios). + +#### Signature + +```cpp +void resolve( + const std::string & final_state = "finished", + const json & result = json::object() +) +``` + +#### Parameters + + + + + +#### Source + +[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) + +Line 118. + +*** + +### resolve\_on\_detect + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +bool resolve_on_detect() const +``` + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) + +Line 74. + +*** + +### resolve\_on\_result + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +bool resolve_on_result() const +``` + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) + +Line 82. + +*** + +### result + +**Modifiers:** `const` + +#### Signature + +```cpp +const json & result() const +``` + +#### Returns + +`const json &` + +#### Source + +[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) + +Line 35. + +*** + +### resume + +Request the server to resume this action. + +#### Signature + +```cpp +void resume() +``` + +#### Source + +[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) + +Line 101. + +*** + +### set\_event\_type\_filter + +Set the wire-event types the Action should accept state updates from. Empty (the default) means "match any component event whose +control\_id matches this Action". Used by play\_and\_collect to listen on calling.call.collect only — a calling.call.play(finished) must NOT resolve a play\_and\_collect action. + +**Modifiers:** `inline` + +#### Signature + +```cpp +void set_event_type_filter(const std::vector< std::string > & types) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) + +Line 53. + +*** + +### set\_method\_prefix + +**Modifiers:** `inline` + +#### Signature + +```cpp +void set_method_prefix(const std::string & prefix) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) + +Line 44. + +*** + +### set\_resolve\_on\_detect + +Detect actions resolve on the first event carrying a detect payload, not on a state(finished) — see Python's DetectAction. When this flag is set the action's update\_state path resolves only when params.detect is present. + +**Modifiers:** `inline` + +#### Signature + +```cpp +void set_resolve_on_detect(bool flag) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) + +Line 71. + +*** + +### set\_resolve\_on\_result + +Collect actions resolve when an event carries a result payload. A play(finished) earlier in the timeline does NOT resolve a CollectAction — see Python's CollectAction terminal-event logic. + +**Modifiers:** `inline` + +#### Signature + +```cpp +void set_resolve_on_result(bool flag) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) + +Line 79. + +*** + +### start\_input\_timers + +Start the inter-digit / final-digit timers on a collect. The matching Python method is StandaloneCollectAction.start\_input\_timers. + +#### Signature + +```cpp +void start_input_timers() +``` + +#### Source + +[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) + +Line 109. + +*** + +### state + +**Modifiers:** `const` + +#### Signature + +```cpp +const std::string & state() const +``` + +#### Returns + +`const std::string &` + +#### Source + +[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) + +Line 33. + +*** + +### stop + +Request the server to stop this action. Routes to \.stop so an Action returned by record() sends calling.record.stop rather than calling.play.stop. + +#### Signature + +```cpp +void stop() +``` + +#### Source + +[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) + +Line 93. + +*** + +### update\_state + +Update internal state (called by Call/Client when events arrive). + +#### Signature + +```cpp +void update_state( + const std::string & new_state, + const json & result = json::object() +) +``` + +#### Parameters + + + + + +#### Source + +[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) + +Line 115. + +*** + +### volume + +Adjust playback volume (play only). The frame body carries the supplied amount in dB; positive boosts, negative attenuates. + +#### Signature + +```cpp +void volume(double amount) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) + +Line 105. + +*** + +### wait + +Block until the action completes or times out. \[\[nodiscard]]: the bool tells you whether the action actually completed vs. timed out — dropping it (then treating the action as done) is a bug. + +#### Signature + +```cpp +bool wait(int timeout_ms = 0) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) + +Line 88. + +## Type Aliases + +### CompletedCallback + +#### Signature + +```cpp +typedef std::function< void(const Action &)> CompletedCallback +``` + +#### Source + +[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) + +Line 25. + +## Source + +[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) + +Line 23. diff --git a/fern/products/sdk-reference/cpp/signalwire/relay/call-event/index.mdx b/fern/products/sdk-reference/cpp/signalwire/relay/call-event/index.mdx new file mode 100644 index 0000000000..f40affad48 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/relay/call-event/index.mdx @@ -0,0 +1,72 @@ +--- +slug: "/reference/cpp/signalwire/relay/call-event" +title: "CallEvent" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::relay::CallEvent" + parent: "signalwire::relay" + module: "signalwire.relay" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/relay_event.hpp" + visibility: "public" +--- +# `CallEvent` + +Call-specific event parsed from calling.call.state and other call events. + +## Signature + +```cpp +struct signalwire::relay::CallEvent : signalwire::relay::RelayEvent +``` + +## Inheritance + +**Extends:** [signalwire::relay::RelayEvent](/docs/sdk-reference/reference/cpp/signalwire/relay/relay-event) + +## Properties + + + + + + + + + + + +## Methods + +### from\_relay\_event + +**Modifiers:** `static` `inline` + +#### Signature + +```cpp +CallEvent from_relay_event(const RelayEvent & ev) +``` + +#### Parameters + + + +#### Returns + +`CallEvent` + +#### Source + +[`include/signalwire/relay/relay_event.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/relay_event.hpp) + +Line 46. + +## Source + +[`include/signalwire/relay/relay_event.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/relay_event.hpp) + +Line 39. diff --git a/fern/products/sdk-reference/cpp/signalwire/relay/call/index.mdx b/fern/products/sdk-reference/cpp/signalwire/relay/call/index.mdx new file mode 100644 index 0000000000..716178526c --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/relay/call/index.mdx @@ -0,0 +1,1761 @@ +--- +slug: "/reference/cpp/signalwire/relay/call" +title: "Call" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::relay::Call" + parent: "signalwire::relay" + module: "signalwire.relay" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp" + visibility: "public" +--- +# `Call` + +Represents a live call with methods for call control. Uses shared internal state so the object can be copied/returned by value. All command methods send JSON-RPC requests through the RelayClient. + +## Signature + +```cpp +class signalwire::relay::Call +``` + +## Methods + +### ai + +#### Signature + +```cpp +Action ai(const json & params, const std::string & control_id = "") +``` + +#### Parameters + + + + + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 144. + +*** + +### answer + +#### Signature + +```cpp +Action answer() +``` + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 60. + +*** + +### Call + +#### Signature + + + + ```cpp + void Call() + ``` + + + + ```cpp + void Call(const std::string & call_id, const std::string & node_id) + ``` + + + + ```cpp + void Call( + const std::string & call_id, + const std::string & node_id, + RelayClient * client + ) + ``` + + + +#### Parameters (Overload 2) + + + + + +#### Parameters (Overload 3) + + + + + + + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 35. + +*** + +### call\_id + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::string & call_id() const +``` + +#### Returns + +`const std::string &` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 40. + +*** + +### call\_state + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +std::optional< CallState > call_state() const +``` + +#### Returns + +`std::optional< CallState >` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 48. + +*** + +### collect + +#### Signature + +```cpp +Action collect(const json & params, const std::string & control_id = "") +``` + +#### Parameters + + + + + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 116. + +*** + +### connect + +#### Signature + +```cpp +Action connect(const json & devices) +``` + +#### Parameters + + + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 118. + +*** + +### detect + +#### Signature + +```cpp +Action detect(const json & params, const std::string & control_id = "") +``` + +#### Parameters + + + + + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 120. + +*** + +### detect\_answering\_machine + +#### Signature + +```cpp +Action detect_answering_machine( + const json & amd_params = json::object(), + double timeout = -1.0 +) +``` + +#### Parameters + + + + + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 130. + +*** + +### detect\_digit + +#### Signature + +```cpp +Action detect_digit(const std::string & digits = "", double timeout = -1.0) +``` + +#### Parameters + + + + + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 129. + +*** + +### detect\_fax + +#### Signature + +```cpp +Action detect_fax(const std::string & tone = "", double timeout = -1.0) +``` + +#### Parameters + + + + + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 132. + +*** + +### direction + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::string & direction() const +``` + +#### Returns + +`const std::string &` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 51. + +*** + +### disconnect + +#### Signature + +```cpp +Action disconnect() +``` + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 119. + +*** + +### dispatch\_event + +#### Signature + +```cpp +void dispatch_event(const CallEvent & ev) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 190. + +*** + +### execute\_swml + +#### Signature + +```cpp +Action execute_swml(const json & swml) +``` + +#### Parameters + + + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 159. + +*** + +### find\_action + +#### Signature + +```cpp +Action * find_action(const std::string & control_id) +``` + +#### Parameters + + + +#### Returns + +`Action *` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 195. + +*** + +### from + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::string & from() const +``` + +#### Returns + +`const std::string &` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 52. + +*** + +### hangup + +#### Signature + +```cpp +Action hangup(const std::string & reason = "hangup") +``` + +#### Parameters + + + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 61. + +*** + +### hold + +#### Signature + +```cpp +Action hold() +``` + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 154. + +*** + +### is\_answered + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +bool is_answered() const +``` + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 56. + +*** + +### is\_ended + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +bool is_ended() const +``` + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 57. + +*** + +### join\_conference + +#### Signature + +```cpp +Action join_conference( + const std::string & name, + const json & params = json::object() +) +``` + +#### Parameters + + + + + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 157. + +*** + +### join\_room + +#### Signature + +```cpp +Action join_room(const std::string & name) +``` + +#### Parameters + + + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 158. + +*** + +### live\_transcribe + +#### Signature + +```cpp +Action live_transcribe(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 140. + +*** + +### live\_translate + +#### Signature + +```cpp +Action live_translate(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 143. + +*** + +### node\_id + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::string & node_id() const +``` + +#### Returns + +`const std::string &` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 41. + +*** + +### on\_event + +#### Signature + +```cpp +void on_event(CallEventHandler handler) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 162. + +*** + +### pay + +#### Signature + +```cpp +Action pay(const json & params, const std::string & control_id = "") +``` + +#### Parameters + + + + + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 146. + +*** + +### play + +#### Signature + +```cpp +Action play( + const json & media, + double volume = 0.0, + const std::string & control_id = "" +) +``` + +#### Parameters + + + + + + + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 62. + +*** + +### play\_and\_collect + +#### Signature + +```cpp +Action play_and_collect( + const json & play_media, + const json & collect_params, + const std::string & control_id = "" +) +``` + +#### Parameters + + + + + + + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 95. + +*** + +### play\_audio + +#### Signature + +```cpp +Action play_audio(const std::string & url, double volume = 0.0) +``` + +#### Parameters + + + + + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 85. + +*** + +### play\_ringtone + +#### Signature + +```cpp +Action play_ringtone( + const std::string & name, + double duration = -1.0, + double volume = 0.0 +) +``` + +#### Parameters + + + + + + + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 87. + +*** + +### play\_silence + +#### Signature + +```cpp +Action play_silence(double duration) +``` + +#### Parameters + + + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 86. + +*** + +### play\_tts + +#### Signature + + + + ```cpp + Action play_tts( + const std::string & text, + const std::string & language = "", + const std::string & gender = "", + const std::string & voice = "", + double volume = 0.0 + ) + ``` + + + + ```cpp + Action play_tts( + const std::string & text, + const std::string & language, + Gender gender, + const std::string & voice = "", + double volume = 0.0 + ) + ``` + + + +#### Parameters (Overload 1) + + + + + + + + + + + +#### Parameters (Overload 2) + + + + + + + + + + + +#### Returns (Overload 1) + +`Action` + +#### Returns (Overload 2) + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 69. + +*** + +### prompt + +#### Signature + +```cpp +Action prompt( + const json & play_media, + const json & collect_params, + const std::string & control_id = "" +) +``` + +#### Parameters + + + + + + + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 93. + +*** + +### prompt\_audio + +#### Signature + +```cpp +Action prompt_audio( + const std::string & url, + const json & collect, + double volume = 0.0 +) +``` + +#### Parameters + + + + + + + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 114. + +*** + +### prompt\_tts + +#### Signature + + + + ```cpp + Action prompt_tts( + const std::string & text, + const json & collect, + const std::string & language = "", + const std::string & gender = "", + const std::string & voice = "", + double volume = 0.0 + ) + ``` + + + + ```cpp + Action prompt_tts( + const std::string & text, + const json & collect, + const std::string & language, + Gender gender, + const std::string & voice = "", + double volume = 0.0 + ) + ``` + + + +#### Parameters (Overload 1) + + + + + + + + + + + + + +#### Parameters (Overload 2) + + + + + + + + + + + + + +#### Returns (Overload 1) + +`Action` + +#### Returns (Overload 2) + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 100. + +*** + +### receive\_fax + +#### Signature + +```cpp +Action receive_fax(const std::string & control_id = "") +``` + +#### Parameters + + + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 151. + +*** + +### record + +#### Signature + +```cpp +Action record( + const json & params = json::object(), + const std::string & control_id = "" +) +``` + +#### Parameters + + + + + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 90. + +*** + +### record\_call + +#### Signature + +```cpp +Action record_call(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 92. + +*** + +### register\_action + +#### Signature + +```cpp +void register_action(const std::string & control_id, Action * action) +``` + +#### Parameters + + + + + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 193. + +*** + +### resolve\_all\_actions + +#### Signature + +```cpp +void resolve_all_actions(const std::string & final_state = "finished") +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 198. + +*** + +### send\_digits + +#### Signature + +```cpp +Action send_digits(const std::string & digits) +``` + +#### Parameters + + + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 138. + +*** + +### send\_fax + +#### Signature + +```cpp +Action send_fax( + const std::string & document_url, + const std::string & header = "", + const std::string & identity = "", + const std::string & control_id = "" +) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 148. + +*** + +### set\_client + +**Modifiers:** `inline` + +#### Signature + +```cpp +void set_client(RelayClient * c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 188. + +*** + +### set\_direction + +**Modifiers:** `inline` + +#### Signature + +```cpp +void set_direction(const std::string & dir) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 184. + +*** + +### set\_from + +**Modifiers:** `inline` + +#### Signature + +```cpp +void set_from(const std::string & f) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 185. + +*** + +### set\_tag + +**Modifiers:** `inline` + +#### Signature + +```cpp +void set_tag(const std::string & t) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 187. + +*** + +### set\_to + +**Modifiers:** `inline` + +#### Signature + +```cpp +void set_to(const std::string & t) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 186. + +*** + +### sip\_refer + +#### Signature + +```cpp +Action sip_refer(const std::string & to_uri) +``` + +#### Parameters + + + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 156. + +*** + +### state + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::string & state() const +``` + +#### Returns + +`const std::string &` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 42. + +*** + +### stop\_tap + +#### Signature + +```cpp +Action stop_tap(const std::string & control_id) +``` + +#### Parameters + + + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 137. + +*** + +### stream + +#### Signature + +```cpp +Action stream(const json & params, const std::string & control_id = "") +``` + +#### Parameters + + + + + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 152. + +*** + +### tag + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::string & tag() const +``` + +#### Returns + +`const std::string &` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 54. + +*** + +### tap + +#### Signature + +```cpp +Action tap(const json & params, const std::string & control_id = "") +``` + +#### Parameters + + + + + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 135. + +*** + +### tap\_audio + +#### Signature + +```cpp +Action tap_audio(const json & params, const std::string & control_id = "") +``` + +#### Parameters + + + + + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 133. + +*** + +### to + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::string & to() const +``` + +#### Returns + +`const std::string &` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 53. + +*** + +### transcribe + +#### Signature + +```cpp +Action transcribe( + const json & params = json::object(), + const std::string & control_id = "" +) +``` + +#### Parameters + + + + + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 141. + +*** + +### transfer + +#### Signature + +```cpp +Action transfer(const json & params) +``` + +#### Parameters + + + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 139. + +*** + +### unhold + +#### Signature + +```cpp +Action unhold() +``` + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 155. + +*** + +### unregister\_action + +#### Signature + +```cpp +void unregister_action(const std::string & control_id) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 194. + +*** + +### update\_state + +#### Signature + +```cpp +void update_state(const std::string & new_state) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 183. + +*** + +### wait\_for\_answered + +#### Signature + +```cpp +bool wait_for_answered(int timeout_ms = 0) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 178. + +*** + +### wait\_for\_ended + +#### Signature + +```cpp +bool wait_for_ended(int timeout_ms = 0) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 166. + +*** + +### wait\_for\_ending + +#### Signature + +```cpp +bool wait_for_ending(int timeout_ms = 0) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 180. + +*** + +### wait\_for\_ringing + +#### Signature + +```cpp +bool wait_for_ringing(int timeout_ms = 0) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 179. + +## Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 33. diff --git a/fern/products/sdk-reference/cpp/signalwire/relay/component-event/index.mdx b/fern/products/sdk-reference/cpp/signalwire/relay/component-event/index.mdx new file mode 100644 index 0000000000..6ad05324eb --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/relay/component-event/index.mdx @@ -0,0 +1,68 @@ +--- +slug: "/reference/cpp/signalwire/relay/component-event" +title: "ComponentEvent" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::relay::ComponentEvent" + parent: "signalwire::relay" + module: "signalwire.relay" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/relay_event.hpp" + visibility: "public" +--- +# `ComponentEvent` + +Play/Record/Collect component event with control\_id for action routing. + +## Signature + +```cpp +struct signalwire::relay::ComponentEvent : signalwire::relay::RelayEvent +``` + +## Inheritance + +**Extends:** [signalwire::relay::RelayEvent](/docs/sdk-reference/reference/cpp/signalwire/relay/relay-event) + +## Properties + + + + + + + +## Methods + +### from\_relay\_event + +**Modifiers:** `static` `inline` + +#### Signature + +```cpp +ComponentEvent from_relay_event(const RelayEvent & ev) +``` + +#### Parameters + + + +#### Returns + +`ComponentEvent` + +#### Source + +[`include/signalwire/relay/relay_event.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/relay_event.hpp) + +Line 72. + +## Source + +[`include/signalwire/relay/relay_event.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/relay_event.hpp) + +Line 67. diff --git a/fern/products/sdk-reference/cpp/signalwire/relay/device/index.mdx b/fern/products/sdk-reference/cpp/signalwire/relay/device/index.mdx new file mode 100644 index 0000000000..7272459e68 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/relay/device/index.mdx @@ -0,0 +1,94 @@ +--- +slug: "/reference/cpp/signalwire/relay/device" +title: "Device" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::relay::Device" + parent: "signalwire::relay" + module: "signalwire.relay" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/device.hpp" + visibility: "public" +--- +# `Device` + +## Signature + +```cpp +struct signalwire::relay::Device +``` + +## Properties + + + Type-specific parameters (e.g. \{"to\_number","from\_number"\} for "phone"). Free json map — the wire schema is additionalProperties:true. + + + + REQUIRED endpoint-type discriminant. Open set (not schema-enumerated) → kept a std::string. Common values: "phone", "sip", "webrtc". + + +## Methods + +### Device + +#### Signature + + + + ```cpp + void Device() + ``` + + + + ```cpp + void Device(std::string type_, json params_ = json::object()) + ``` + + + +#### Parameters (Overload 2) + + + + + +#### Source + +[`include/signalwire/relay/device.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/device.hpp) + +Line 40. + +*** + +### to\_json + +Serialize to the exact RELAY device wire shape: \{"type":..,"params":..\}. Byte-identical to the hand-written map the raw-json call sites build. + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json to_json() const +``` + +#### Returns + +`json` + +#### Source + +[`include/signalwire/relay/device.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/device.hpp) + +Line 46. + +## Source + +[`include/signalwire/relay/device.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/device.hpp) + +Line 32. diff --git a/fern/products/sdk-reference/cpp/signalwire/relay/dial-event/index.mdx b/fern/products/sdk-reference/cpp/signalwire/relay/dial-event/index.mdx new file mode 100644 index 0000000000..ff81c037be --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/relay/dial-event/index.mdx @@ -0,0 +1,90 @@ +--- +slug: "/reference/cpp/signalwire/relay/dial-event" +title: "DialEvent" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::relay::DialEvent" + parent: "signalwire::relay" + module: "signalwire.relay" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/relay_event.hpp" + visibility: "public" +--- +# `DialEvent` + +Dial-specific event with nested call info and tag-based correlation. + +## Signature + +```cpp +struct signalwire::relay::DialEvent : signalwire::relay::RelayEvent +``` + +## Inheritance + +**Extends:** [signalwire::relay::RelayEvent](/docs/sdk-reference/reference/cpp/signalwire/relay/relay-event) + +## Properties + + + + + + + +## Methods + +### dial\_state\_enum + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +std::optional< DialState > dial_state_enum() const +``` + +#### Returns + +`std::optional< DialState >` + +#### Source + +[`include/signalwire/relay/relay_event.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/relay_event.hpp) + +Line 119. + +*** + +### from\_relay\_event + +**Modifiers:** `static` `inline` + +#### Signature + +```cpp +DialEvent from_relay_event(const RelayEvent & ev) +``` + +#### Parameters + + + +#### Returns + +`DialEvent` + +#### Source + +[`include/signalwire/relay/relay_event.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/relay_event.hpp) + +Line 123. + +## Source + +[`include/signalwire/relay/relay_event.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/relay_event.hpp) + +Line 109. diff --git a/fern/products/sdk-reference/cpp/signalwire/relay/index.mdx b/fern/products/sdk-reference/cpp/signalwire/relay/index.mdx new file mode 100644 index 0000000000..cedf9e74cb --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/relay/index.mdx @@ -0,0 +1,692 @@ +--- +slug: "/reference/cpp/signalwire/relay" +title: "relay" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "module" + language: "cpp" + qualified_name: "signalwire::relay" + parent: "signalwire" + module: "signalwire" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp" +--- +# `relay` + +## Signature + +```cpp +namespace signalwire::relay +``` + +## Constants + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## Classes + + + + Represents a controllable in-progress operation (play, record, collect, etc.) Uses shared internal state so the object can be copied/moved freely while maintaining a single underlying condition\_variable for synchronization. + + + + Represents a live call with methods for call control. Uses shared internal state so the object can be copied/returned by value. All command methods send JSON-RPC requests through the RelayClient. + + + + Call-specific event parsed from calling.call.state and other call events. + + + + Play/Record/Collect component event with control\_id for action routing. + + + + + + Dial-specific event with nested call info and tag-based correlation. + + + + Represents an SMS/MMS message tracked through delivery states. States: "queued", "initiated", "sent", "delivered", "undelivered", "failed" Uses shared internal state so the object can be copied/returned by value — copies of a Message observe the same state updates as the underlying instance the registry tracks. + + + + Messaging event for SMS/MMS state changes and inbound messages. + + + + Real-time call control and messaging client over WebSocket. Implements the full JSON-RPC 2.0 protocol with four correlation mechanisms: JSON-RPC id -> pending map for RPC response matching call\_id -> Call object map for event routing control\_id -> Action per Call for action event routing tag -> pending dials map for dial event matching + + + + Configuration for the RELAY client. + + + + Base class for all RELAY events parsed from signalwire.event JSON-RPC messages. + + + + WebSocket client for the RELAY JSON-RPC transport. Wraps IXWebSocket (cross-platform, OpenSSL-backed TLS) while preserving a minimal synchronous interface: connect() blocks until the handshake completes (or fails/times out), send() pushes a text frame, and the on\_message / on\_close / on\_error callbacks are invoked from IXWebSocket's background event thread. RFC 6455 framing, ping/pong, and TLS are handled by IXWebSocket — this class only adapts its async event model to the synchronous connect() contract relay::RelayClient depends on. TLS certificate verification is ALWAYS on for the connect() (wss://) path. To trust a private/self-signed CA (e.g. the porting-sdk test CA), set the SSL\_CERT\_FILE environment variable to the CA bundle — the same cross-port idiom the other ports honor; it is wired into ix::SocketTLSOptions::caFile. When unset, the system trust store is used (production / public CAs). + + + +## Functions + +### call\_state\_from\_string + +Parse a wire string into a CallState. Returns std::nullopt for any value not in the known set (server may introduce new states) — NEVER throws. + +**Modifiers:** `inline` + +#### Signature + +```cpp +std::optional< CallState > call_state_from_string(const std::string & s) +``` + +#### Parameters + + + +#### Returns + +`std::optional< CallState >` + +#### Source + +[`include/signalwire/relay/states.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/states.hpp) + +Line 83. + +*** + +### call\_state\_value + +**Modifiers:** `inline` + +#### Signature + +```cpp +std::string call_state_value(CallState v) +``` + +#### Parameters + + + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/relay/states.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/states.hpp) + +Line 67. + +*** + +### dial\_state\_from\_string + +**Modifiers:** `inline` + +#### Signature + +```cpp +std::optional< DialState > dial_state_from_string(const std::string & s) +``` + +#### Parameters + + + +#### Returns + +`std::optional< DialState >` + +#### Source + +[`include/signalwire/relay/states.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/states.hpp) + +Line 121. + +*** + +### dial\_state\_value + +**Modifiers:** `inline` + +#### Signature + +```cpp +std::string dial_state_value(DialState v) +``` + +#### Parameters + + + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/relay/states.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/states.hpp) + +Line 110. + +*** + +### is\_terminal + +Terminal == no further transitions. For a call that is ended. + +**Modifiers:** `inline` + +#### Signature + + + + ```cpp + bool is_terminal(CallState v) + ``` + + + + ```cpp + bool is_terminal(DialState v) + ``` + + + + ```cpp + bool is_terminal(MessageState v) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + +#### Parameters (Overload 3) + + + +#### Returns (Overload 1) + +`bool` + +#### Returns (Overload 2) + +`bool` + +#### Returns (Overload 3) + +`bool` + +#### Source + +[`include/signalwire/relay/states.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/states.hpp) + +Line 93. + +*** + +### message\_state\_from\_string + +**Modifiers:** `inline` + +#### Signature + +```cpp +std::optional< MessageState > message_state_from_string(const std::string & s) +``` + +#### Parameters + + + +#### Returns + +`std::optional< MessageState >` + +#### Source + +[`include/signalwire/relay/states.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/states.hpp) + +Line 168. + +*** + +### message\_state\_value + +**Modifiers:** `inline` + +#### Signature + +```cpp +std::string message_state_value(MessageState v) +``` + +#### Parameters + + + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/relay/states.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/states.hpp) + +Line 153. + +*** + +### to\_string + +to\_string ADL overload — same wire string as call\_state\_value. + +**Modifiers:** `inline` + +#### Signature + + + + ```cpp + std::string to_string(CallState v) + ``` + + + + ```cpp + std::string to_string(DialState v) + ``` + + + + ```cpp + std::string to_string(MessageState v) + ``` + + + + ```cpp + std::string to_string(Gender gender) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + +#### Parameters (Overload 3) + + + +#### Parameters (Overload 4) + + + +#### Returns (Overload 1) + +`std::string` + +#### Returns (Overload 2) + +`std::string` + +#### Returns (Overload 3) + +`std::string` + +#### Returns (Overload 4) + +`std::string` + +#### Source + +[`include/signalwire/relay/states.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/states.hpp) + +Line 79. + +*** + +### tts\_gender\_value + +Map a Gender to its canonical wire string (the value emitted under the TTS media params' gender key). This is the single normalization point shared by the typed play\_tts / prompt\_tts overloads, so their behavior is identical to passing the bare string. + +**Modifiers:** `inline` + +#### Signature + +```cpp +std::string tts_gender_value(Gender gender) +``` + +#### Parameters + + + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/relay/tts_gender.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/tts_gender.hpp) + +Line 37. + +## Type Aliases + +### CallEventHandler + +Callback for call events. + +#### Signature + +```cpp +typedef std::function< void(const CallEvent &)> CallEventHandler +``` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 28. + +*** + +### EventHandler + +Generic callback for any inbound signalwire.event. Fired in addition to the typed handlers (on\_call, on\_message, action callbacks). Useful for tracing and for tests/audits that need to assert event delivery. + +#### Signature + +```cpp +typedef std::function< void(const RelayEvent &)> EventHandler +``` + +#### Source + +[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) + +Line 37. + +*** + +### InboundCallHandler + +Callback for inbound calls. + +#### Signature + +```cpp +typedef std::function< void(Call &)> InboundCallHandler +``` + +#### Source + +[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) + +Line 29. + +*** + +### InboundMessageHandler + +Callback for inbound messages. + +#### Signature + +```cpp +typedef std::function< void(const Message &)> InboundMessageHandler +``` + +#### Source + +[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) + +Line 32. + +*** + +### json + +#### Signature + +```cpp +typedef nlohmann::json json +``` + +#### Source + +[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) + +Line 16. + +## Enums + +### CallState + +Call lifecycle state. Mirrors CALL\_STATE\_\* / CALL\_STATES in relay/constants.py. Server-emitted and may grow → call\_state\_from\_string returns an optional on an unknown value. + +#### Signature + +```cpp +enum class CallState +``` + +#### Variants + + + + + + + + + + + +#### Source + +[`include/signalwire/relay/states.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/states.hpp) + +Line 59. + +*** + +### DialState + +Outbound-dial outcome state on the calling.call.dial event's dial\_state field. Grounded in RELAY\_IMPLEMENTATION\_GUIDE.md line 193: dialing (progress), answered (success), failed (all legs failed). DISTINCT from CallState — failed is dial-only; the dial RPC resolves on answered/failed. Server-emitted → dial\_state\_from\_string is optional. + +#### Signature + +```cpp +enum class DialState +``` + +#### Variants + + + + + + + +#### Source + +[`include/signalwire/relay/states.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/states.hpp) + +Line 104. + +*** + +### Gender + +TTS speaker gender as a typed, compile-time-checked closed set. +Call::play\_tts() / Call::prompt\_tts() accept this enum class OR a std::string for their gender argument. The enum gives editor autocompletion and makes a typo fail at the call site — a bare string like "femaie" only fails at runtime, on the TTS engine. The string overload keeps parity with the Python reference (which uses a bare Optional\[str]) and still allows engine-/voice-specific values that aren't one of the two canonical genders. call.play\_tts("hi", "en-US", Gender::Female); // typed, autocompleted +call.play\_tts("hi", "en-US", "female"); // string still works +call.play\_tts("hi", "en-US", "neutral"); // open set: engine value + +Members are the two canonical say\_gender values the calling/fabric OpenAPI documents (female is the default; male is the only other documented value). tts\_gender\_value() maps each member to that wire string, so the enum and string overloads emit the identical TTS frame. + +#### Signature + +```cpp +enum class Gender +``` + +#### Variants + + + + + +#### Source + +[`include/signalwire/relay/tts_gender.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/tts_gender.hpp) + +Line 28. + +*** + +### MessageState + +SMS/MMS delivery state. Mirrors MESSAGE\_STATE\_\* in relay/constants.py. Terminal set == MESSAGE\_TERMINAL\_STATES \{delivered, undelivered, failed\}. NOTE failed here is the MESSAGE failure state — NOT DialState::Failed; the two vocabularies are separate and must not be unified. Server-emitted → message\_state\_from\_string is optional. + +#### Signature + +```cpp +enum class MessageState +``` + +#### Variants + + + + + + + + + + + + + + + +#### Source + +[`include/signalwire/relay/states.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/states.hpp) + +Line 143. + +## Source + +[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) + +Line 14. diff --git a/fern/products/sdk-reference/cpp/signalwire/relay/message-event/index.mdx b/fern/products/sdk-reference/cpp/signalwire/relay/message-event/index.mdx new file mode 100644 index 0000000000..21c33e6ed2 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/relay/message-event/index.mdx @@ -0,0 +1,72 @@ +--- +slug: "/reference/cpp/signalwire/relay/message-event" +title: "MessageEvent" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::relay::MessageEvent" + parent: "signalwire::relay" + module: "signalwire.relay" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/relay_event.hpp" + visibility: "public" +--- +# `MessageEvent` + +Messaging event for SMS/MMS state changes and inbound messages. + +## Signature + +```cpp +struct signalwire::relay::MessageEvent : signalwire::relay::RelayEvent +``` + +## Inheritance + +**Extends:** [signalwire::relay::RelayEvent](/docs/sdk-reference/reference/cpp/signalwire/relay/relay-event) + +## Properties + + + + + + + + + + + +## Methods + +### from\_relay\_event + +**Modifiers:** `static` `inline` + +#### Signature + +```cpp +MessageEvent from_relay_event(const RelayEvent & ev) +``` + +#### Parameters + + + +#### Returns + +`MessageEvent` + +#### Source + +[`include/signalwire/relay/relay_event.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/relay_event.hpp) + +Line 93. + +## Source + +[`include/signalwire/relay/relay_event.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/relay_event.hpp) + +Line 86. diff --git a/fern/products/sdk-reference/cpp/signalwire/relay/message/index.mdx b/fern/products/sdk-reference/cpp/signalwire/relay/message/index.mdx new file mode 100644 index 0000000000..98d2d09eed --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/relay/message/index.mdx @@ -0,0 +1,404 @@ +--- +slug: "/reference/cpp/signalwire/relay/message" +title: "Message" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::relay::Message" + parent: "signalwire::relay" + module: "signalwire.relay" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/message.hpp" + visibility: "public" +--- +# `Message` + +Represents an SMS/MMS message tracked through delivery states. States: "queued", "initiated", "sent", "delivered", "undelivered", "failed" Uses shared internal state so the object can be copied/returned by value — copies of a Message observe the same state updates as the underlying instance the registry tracks. + +## Signature + +```cpp +struct signalwire::relay::Message +``` + +## Properties + + + + + + + + + + + + + + + + + +## Methods + +### ~Message + +#### Signature + +```cpp +void ~Message() +``` + +#### Source + +[`include/signalwire/relay/message.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/message.hpp) + +Line 31. + +*** + +### from\_params + +Parse from a RELAY event params object. + +**Modifiers:** `static` + +#### Signature + +```cpp +Message from_params(const json & params) +``` + +#### Parameters + + + +#### Returns + +`Message` + +#### Source + +[`include/signalwire/relay/message.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/message.hpp) + +Line 34. + +*** + +### is\_delivered + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +bool is_delivered() const +``` + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/relay/message.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/message.hpp) + +Line 61. + +*** + +### is\_failed + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +bool is_failed() const +``` + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/relay/message.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/message.hpp) + +Line 62. + +*** + +### is\_terminal + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +bool is_terminal() const +``` + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/relay/message.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/message.hpp) + +Line 66. + +*** + +### Message + +#### Signature + + + + ```cpp + void Message() + ``` + + + + ```cpp + void Message(const Message &) + ``` + + + +#### Parameters (Overload 2) + + + +#### Source + +[`include/signalwire/relay/message.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/message.hpp) + +Line 28. + +*** + +### message\_state + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +std::optional< MessageState > message_state() const +``` + +#### Returns + +`std::optional< MessageState >` + +#### Source + +[`include/signalwire/relay/message.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/message.hpp) + +Line 54. + +*** + +### on\_completed + +Set callback for when message reaches terminal state. If the message is already terminal the callback fires immediately. + +#### Signature + +```cpp +void on_completed(CompletedCallback cb) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/relay/message.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/message.hpp) + +Line 80. + +*** + +### operator= + +#### Signature + +```cpp +Message & operator=(const Message &) +``` + +#### Parameters + + + +#### Returns + +`Message &` + +#### Source + +[`include/signalwire/relay/message.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/message.hpp) + +Line 30. + +*** + +### reason + +**Modifiers:** `const` + +#### Signature + +```cpp +const std::string & reason() const +``` + +#### Returns + +`const std::string &` + +#### Source + +[`include/signalwire/relay/message.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/message.hpp) + +Line 57. + +*** + +### set\_reason + +#### Signature + +```cpp +void set_reason(const std::string & r) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/relay/message.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/message.hpp) + +Line 59. + +*** + +### set\_state + +#### Signature + +```cpp +void set_state(const std::string & s) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/relay/message.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/message.hpp) + +Line 58. + +*** + +### state + +**Modifiers:** `const` + +#### Signature + +```cpp +const std::string & state() const +``` + +#### Returns + +`const std::string &` + +#### Source + +[`include/signalwire/relay/message.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/message.hpp) + +Line 49. + +*** + +### update\_state + +Update state from a messaging.state event. Notifies waiters / callbacks when the state is terminal. + +#### Signature + +```cpp +void update_state(const std::string & new_state) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/relay/message.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/message.hpp) + +Line 70. + +*** + +### wait + +Block until message reaches a terminal state. Returns true if terminal, false on timeout. \[\[nodiscard]]: the delivered-vs-timed-out result is the reason you called wait() — dropping it is a bug. + +#### Signature + +```cpp +bool wait(int timeout_ms = 0) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/relay/message.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/message.hpp) + +Line 76. + +## Type Aliases + +### CompletedCallback + +#### Signature + +```cpp +typedef std::function< void(const Message &)> CompletedCallback +``` + +#### Source + +[`include/signalwire/relay/message.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/message.hpp) + +Line 26. + +## Source + +[`include/signalwire/relay/message.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/message.hpp) + +Line 25. diff --git a/fern/products/sdk-reference/cpp/signalwire/relay/relay-client/index.mdx b/fern/products/sdk-reference/cpp/signalwire/relay/relay-client/index.mdx new file mode 100644 index 0000000000..077da9a56b --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/relay/relay-client/index.mdx @@ -0,0 +1,581 @@ +--- +slug: "/reference/cpp/signalwire/relay/relay-client" +title: "RelayClient" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::relay::RelayClient" + parent: "signalwire::relay" + module: "signalwire.relay" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp" + visibility: "public" +--- +# `RelayClient` + +Real-time call control and messaging client over WebSocket. Implements the full JSON-RPC 2.0 protocol with four correlation mechanisms: +JSON-RPC id -> pending map for RPC response matching +call\_id -> Call object map for event routing +control\_id -> Action per Call for action event routing +tag -> pending dials map for dial event matching + +## Signature + +```cpp +class signalwire::relay::RelayClient +``` + +## Methods + +### ~RelayClient + +#### Signature + +```cpp +void ~RelayClient() +``` + +#### Source + +[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) + +Line 67. + +*** + +### config + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const RelayConfig & config() const +``` + +#### Returns + +`const RelayConfig &` + +#### Source + +[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) + +Line 132. + +*** + +### connect + +#### Signature + +```cpp +bool connect() +``` + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) + +Line 77. + +*** + +### dial + +Dial outbound. The devices argument is the nested "device-of-leg-of-leg" array used by the Python SDK (\[\[\{type:phone,...\}]]). Returns a Call once the server emits calling.call.dial(answered) for the dial's tag, or an empty Call on timeout / failure. +tag lets callers pin an explicit dial tag for journal-based assertions; if blank, a UUID is generated. dial\_timeout\_ms caps how long dial() blocks waiting for the server's terminal dial event. max\_duration (seconds) is forwarded into the calling.dial frame when non-zero. + +#### Signature + +```cpp +Call dial( + const json & devices, + const std::string & tag = "", + int dial_timeout_ms = 120000, + int max_duration = 0 +) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`Call` + +#### Source + +[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) + +Line 97. + +*** + +### disconnect + +#### Signature + +```cpp +void disconnect() +``` + +#### Source + +[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) + +Line 78. + +*** + +### execute + +#### Signature + +```cpp +json execute(const std::string & method, const json & params) +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) + +Line 136. + +*** + +### find\_call + +#### Signature + +```cpp +Call * find_call(const std::string & call_id) +``` + +#### Parameters + + + +#### Returns + +`Call *` + +#### Source + +[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) + +Line 141. + +*** + +### from\_env + +Construct from environment variables: SIGNALWIRE\_PROJECT\_ID, SIGNALWIRE\_API\_TOKEN, SIGNALWIRE\_SPACE + +**Modifiers:** `static` + +#### Signature + +```cpp +RelayClient from_env() +``` + +#### Returns + +`RelayClient` + +#### Source + +[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) + +Line 74. + +*** + +### is\_connected + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +bool is_connected() const +``` + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) + +Line 80. + +*** + +### on\_call + +#### Signature + +```cpp +void on_call(InboundCallHandler handler) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) + +Line 83. + +*** + +### on\_event + +Register a generic event observer. Called for every dispatched signalwire.event after typed routing (on\_call/on\_message/action callbacks) has run. Multiple registrations are NOT supported — the most-recent registration wins. + +#### Signature + +```cpp +void on_event(EventHandler handler) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) + +Line 106. + +*** + +### on\_message + +#### Signature + +```cpp +void on_message(InboundMessageHandler handler) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) + +Line 114. + +*** + +### operator= + +#### Signature + +```cpp +RelayClient & operator=(const RelayClient &) +``` + +#### Parameters + + + +#### Returns + +`RelayClient &` + +#### Source + +[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) + +Line 70. + +*** + +### register\_call + +#### Signature + +```cpp +void register_call(const std::string & call_id, Call * call) +``` + +#### Parameters + + + + + +#### Source + +[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) + +Line 139. + +*** + +### relay\_protocol + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::string & relay_protocol() const +``` + +#### Returns + +`const std::string &` + +#### Source + +[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) + +Line 133. + +*** + +### RelayClient + +Construct from explicit configuration. + +**Modifiers:** `explicit` + +#### Signature + + + + ```cpp + void RelayClient(const RelayConfig & config = RelayConfig{}) + ``` + + + + ```cpp + void RelayClient( + const std::string & project, + const std::string & token, + const std::string & host = DEFAULT_HOST, + const std::vector< std::string > & contexts = {"default"} + ) + ``` + + + + ```cpp + void RelayClient(const RelayClient &) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + + + + + +#### Parameters (Overload 3) + + + +#### Source + +[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) + +Line 59. + +*** + +### run + +#### Signature + +```cpp +void run() +``` + +#### Source + +[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) + +Line 79. + +*** + +### send\_message + +Send an SMS/MMS message via messaging.send. Returns a Message tracker whose state advances as the server pushes messaging.state events. Use Message::wait() to block until the terminal state (delivered / undelivered / failed). + +#### Signature + +```cpp +Message send_message( + const std::string & from, + const std::string & to, + const std::string & body, + const std::vector< std::string > & media = {}, + const std::vector< std::string > & tags = {}, + const std::string & region = "", + const std::string & context = "" +) +``` + +#### Parameters + + + + + + + + + + + + + + + +#### Returns + +`Message` + +#### Source + +[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) + +Line 120. + +*** + +### send\_raw\_request + +Send a JSON-RPC request to the server. Public so harnesses and tests can drive arbitrary methods (e.g. an explicit signalwire.subscribe ack frame for the audit fixture). + +#### Signature + +```cpp +json send_raw_request(const std::string & method, const json & params) +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) + +Line 111. + +*** + +### subscribe + +#### Signature + +```cpp +void subscribe(const std::vector< std::string > & contexts) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) + +Line 128. + +*** + +### unregister\_call + +#### Signature + +```cpp +void unregister_call(const std::string & call_id) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) + +Line 140. + +*** + +### unsubscribe + +#### Signature + +```cpp +void unsubscribe(const std::vector< std::string > & contexts) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) + +Line 129. + +## Source + +[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) + +Line 56. diff --git a/fern/products/sdk-reference/cpp/signalwire/relay/relay-config/index.mdx b/fern/products/sdk-reference/cpp/signalwire/relay/relay-config/index.mdx new file mode 100644 index 0000000000..e662208502 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/relay/relay-config/index.mdx @@ -0,0 +1,46 @@ +--- +slug: "/reference/cpp/signalwire/relay/relay-config" +title: "RelayConfig" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::relay::RelayConfig" + parent: "signalwire::relay" + module: "signalwire.relay" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp" + visibility: "public" +--- +# `RelayConfig` + +Configuration for the RELAY client. + +## Signature + +```cpp +struct signalwire::relay::RelayConfig +``` + +## Properties + + + + + + + + + + + + + + + +## Source + +[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) + +Line 40. diff --git a/fern/products/sdk-reference/cpp/signalwire/relay/relay-event/index.mdx b/fern/products/sdk-reference/cpp/signalwire/relay/relay-event/index.mdx new file mode 100644 index 0000000000..526d538c6e --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/relay/relay-event/index.mdx @@ -0,0 +1,98 @@ +--- +slug: "/reference/cpp/signalwire/relay/relay-event" +title: "RelayEvent" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::relay::RelayEvent" + parent: "signalwire::relay" + module: "signalwire.relay" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/relay_event.hpp" + visibility: "public" +--- +# `RelayEvent` + +Base class for all RELAY events parsed from signalwire.event JSON-RPC messages. + +## Signature + +```cpp +struct signalwire::relay::RelayEvent +``` + +## Properties + + + + + + + + + +## Methods + +### from\_json + +Parse from a signalwire.event params JSON. The outer params contains event\_type and the inner params with event-specific data. + +**Modifiers:** `static` `inline` + +#### Signature + +```cpp +RelayEvent from_json(const json & j) +``` + +#### Parameters + + + +#### Returns + +`RelayEvent` + +#### Source + +[`include/signalwire/relay/relay_event.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/relay_event.hpp) + +Line 29. + +*** + +### RelayEvent + +#### Signature + + + + ```cpp + void RelayEvent() + ``` + + + + ```cpp + void RelayEvent(const std::string & type) + ``` + + + +#### Parameters (Overload 2) + + + +#### Source + +[`include/signalwire/relay/relay_event.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/relay_event.hpp) + +Line 24. + +## Source + +[`include/signalwire/relay/relay_event.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/relay_event.hpp) + +Line 17. diff --git a/fern/products/sdk-reference/cpp/signalwire/relay/web-socket-client/index.mdx b/fern/products/sdk-reference/cpp/signalwire/relay/web-socket-client/index.mdx new file mode 100644 index 0000000000..23c6e127c6 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/relay/web-socket-client/index.mdx @@ -0,0 +1,352 @@ +--- +slug: "/reference/cpp/signalwire/relay/web-socket-client" +title: "WebSocketClient" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::relay::WebSocketClient" + parent: "signalwire::relay" + module: "signalwire.relay" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/websocket.hpp" + visibility: "public" +--- +# `WebSocketClient` + +WebSocket client for the RELAY JSON-RPC transport. +Wraps IXWebSocket (cross-platform, OpenSSL-backed TLS) while preserving a minimal synchronous interface: connect() blocks until the handshake completes (or fails/times out), send() pushes a text frame, and the on\_message / on\_close / on\_error callbacks are invoked from IXWebSocket's background event thread. RFC 6455 framing, ping/pong, and TLS are handled by IXWebSocket — this class only adapts its async event model to the synchronous connect() contract relay::RelayClient depends on. +TLS certificate verification is ALWAYS on for the connect() (wss://) path. To trust a private/self-signed CA (e.g. the porting-sdk test CA), set the SSL\_CERT\_FILE environment variable to the CA bundle — the same cross-port idiom the other ports honor; it is wired into ix::SocketTLSOptions::caFile. When unset, the system trust store is used (production / public CAs). + +## Signature + +```cpp +class signalwire::relay::WebSocketClient +``` + +## Methods + +### ~WebSocketClient + +#### Signature + +```cpp +void ~WebSocketClient() +``` + +#### Source + +[`include/signalwire/relay/websocket.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/websocket.hpp) + +Line 42. + +*** + +### close + +Close the WebSocket connection gracefully. + +#### Signature + +```cpp +void close(int code = 1000, const std::string & reason = "") +``` + +#### Parameters + + + + + +#### Source + +[`include/signalwire/relay/websocket.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/websocket.hpp) + +Line 58. + +*** + +### connect + +Connect to wss://host:port/ with TLS. Blocks until the WebSocket is open or the attempt fails/times out. Verifies the server certificate against the system store (or SSL\_CERT\_FILE when set). + +#### Signature + +```cpp +bool connect(const std::string & host, int port = 443) +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/relay/websocket.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/websocket.hpp) + +Line 50. + +*** + +### connect\_plain + +Connect to ws://host:port/ without TLS (plain TCP). Used by audit fixtures and local dev servers that don't speak TLS. Production always uses TLS via the connect() overload above. + +#### Signature + +```cpp +bool connect_plain(const std::string & host, int port) +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/relay/websocket.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/websocket.hpp) + +Line 55. + +*** + +### is\_connected + +Check if connected. + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +bool is_connected() const +``` + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/relay/websocket.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/websocket.hpp) + +Line 64. + +*** + +### on\_close + +Set callback for connection close. + +**Modifiers:** `inline` + +#### Signature + +```cpp +void on_close(CloseCallback cb) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/relay/websocket.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/websocket.hpp) + +Line 70. + +*** + +### on\_error + +Set callback for errors. + +**Modifiers:** `inline` + +#### Signature + +```cpp +void on_error(ErrorCallback cb) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/relay/websocket.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/websocket.hpp) + +Line 73. + +*** + +### on\_message + +Set callback for received text messages. + +**Modifiers:** `inline` + +#### Signature + +```cpp +void on_message(MessageCallback cb) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/relay/websocket.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/websocket.hpp) + +Line 67. + +*** + +### operator= + +#### Signature + +```cpp +WebSocketClient & operator=(const WebSocketClient &) +``` + +#### Parameters + + + +#### Returns + +`WebSocketClient &` + +#### Source + +[`include/signalwire/relay/websocket.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/websocket.hpp) + +Line 45. + +*** + +### send + +Send a text frame. + +#### Signature + +```cpp +bool send(const std::string & message) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/relay/websocket.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/websocket.hpp) + +Line 61. + +*** + +### WebSocketClient + +#### Signature + + + + ```cpp + void WebSocketClient() + ``` + + + + ```cpp + void WebSocketClient(const WebSocketClient &) + ``` + + + +#### Parameters (Overload 2) + + + +#### Source + +[`include/signalwire/relay/websocket.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/websocket.hpp) + +Line 41. + +## Type Aliases + +### CloseCallback + +#### Signature + +```cpp +typedef std::function< void(int code, const std::string &reason)> CloseCallback +``` + +#### Source + +[`include/signalwire/relay/websocket.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/websocket.hpp) + +Line 38. + +*** + +### ErrorCallback + +#### Signature + +```cpp +typedef std::function< void(const std::string &error)> ErrorCallback +``` + +#### Source + +[`include/signalwire/relay/websocket.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/websocket.hpp) + +Line 39. + +*** + +### MessageCallback + +#### Signature + +```cpp +typedef std::function< void(const std::string &)> MessageCallback +``` + +#### Source + +[`include/signalwire/relay/websocket.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/websocket.hpp) + +Line 37. + +## Source + +[`include/signalwire/relay/websocket.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/websocket.hpp) + +Line 35. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/crud-resource/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/crud-resource/index.mdx new file mode 100644 index 0000000000..5eee9f861a --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/rest/crud-resource/index.mdx @@ -0,0 +1,184 @@ +--- +slug: "/reference/cpp/signalwire/rest/crud-resource" +title: "CrudResource" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::CrudResource" + parent: "signalwire::rest" + module: "signalwire.rest" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp" + visibility: "public" +--- +# `CrudResource` + +Generic CRUD resource for REST API namespaces. + +## Signature + +```cpp +class signalwire::rest::CrudResource +``` + +## Methods + +### create + +**Modifiers:** `const` + +#### Signature + +```cpp +json create(const json & data) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) + +Line 96. + +*** + +### CrudResource + +#### Signature + +```cpp +void CrudResource(const HttpClient & client, const std::string & base_path) +``` + +#### Parameters + + + + + +#### Source + +[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) + +Line 91. + +*** + +### del + +**Modifiers:** `const` + +#### Signature + +```cpp +json del(const std::string & id) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) + +Line 99. + +*** + +### get + +**Modifiers:** `const` + +#### Signature + +```cpp +json get(const std::string & id) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) + +Line 97. + +*** + +### list + +**Modifiers:** `const` + +#### Signature + +```cpp +json list(const std::map< std::string, std::string > & params = {}) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) + +Line 95. + +*** + +### update + +**Modifiers:** `const` + +#### Signature + +```cpp +json update(const std::string & id, const json & data) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) + +Line 98. + +## Source + +[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) + +Line 89. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/http-client/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/http-client/index.mdx new file mode 100644 index 0000000000..d08500a403 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/rest/http-client/index.mdx @@ -0,0 +1,299 @@ +--- +slug: "/reference/cpp/signalwire/rest/http-client" +title: "HttpClient" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::HttpClient" + parent: "signalwire::rest" + module: "signalwire.rest" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp" + visibility: "public" +--- +# `HttpClient` + +HTTP client with Basic Auth support using cpp-httplib. + +## Signature + +```cpp +class signalwire::rest::HttpClient +``` + +## Methods + +### base\_url + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::string & base_url() const +``` + +#### Returns + +`const std::string &` + +#### Source + +[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) + +Line 74. + +*** + +### del + +DELETE request. + +**Modifiers:** `const` + +#### Signature + +```cpp +json del(const std::string & path) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) + +Line 58. + +*** + +### get + +GET request. + +**Modifiers:** `const` + +#### Signature + +```cpp +json get( + const std::string & path, + const std::map< std::string, std::string > & params = {} +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) + +Line 42. + +*** + +### HttpClient + +#### Signature + +```cpp +void HttpClient( + const std::string & base_url, + const std::string & username, + const std::string & password +) +``` + +#### Parameters + + + + + + + +#### Source + +[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) + +Line 33. + +*** + +### patch + +PATCH request. + +**Modifiers:** `const` + +#### Signature + +```cpp +json patch(const std::string & path, const json & body = json::object()) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) + +Line 54. + +*** + +### post + +POST request. + +**Modifiers:** `const` + +#### Signature + +```cpp +json post(const std::string & path, const json & body = json::object()) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) + +Line 46. + +*** + +### put + +PUT request. + +**Modifiers:** `const` + +#### Signature + +```cpp +json put(const std::string & path, const json & body = json::object()) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) + +Line 50. + +*** + +### set\_ca\_cert\_path + +Trust a private/self-signed CA bundle (PEM) for https:// requests. Sets the underlying SSLClient's CA path and keeps server-certificate verification ON. Production (public CAs) needs no call — the system trust store is used, and SSL\_CERT\_FILE is also honored automatically. C++-only ergonomic hook (Python's requests-based client trusts a custom CA via the SSL\_CERT\_FILE / REQUESTS\_CA\_BUNDLE env vars instead). + +#### Signature + +```cpp +void set_ca_cert_path(const std::string & path) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) + +Line 72. + +*** + +### set\_header + +Set additional default headers. + +#### Signature + +```cpp +void set_header(const std::string & key, const std::string & value) +``` + +#### Parameters + + + + + +#### Source + +[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) + +Line 61. + +*** + +### set\_timeout + +Set request timeout in seconds. + +#### Signature + +```cpp +void set_timeout(int seconds) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) + +Line 64. + +## Source + +[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) + +Line 31. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/index.mdx new file mode 100644 index 0000000000..01e93a6c35 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/rest/index.mdx @@ -0,0 +1,258 @@ +--- +slug: "/reference/cpp/signalwire/rest" +title: "rest" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "module" + language: "cpp" + qualified_name: "signalwire::rest" + parent: "signalwire" + module: "signalwire" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp" +--- +# `rest` + +## Signature + +```cpp +namespace signalwire::rest +``` + +## Classes + + + + Generic CRUD resource for REST API namespaces. + + + + HTTP client with Basic Auth support using cpp-httplib. + + + + Iterates items across paginated API responses. Mirrors signalwire-python's signalwire.rest.\_pagination.PaginatedIterator: fetches the configured path with the configured params, walks the data\_key array, then follows links.next (parsing its query string for the next page's params) until the response carries no links.next. Iteration is lazy the constructor records inputs but performs no HTTP. The first has\_next() / next() call performs the first fetch. Cursor query params are extracted by parsing links.next like Python's urllib.parse.urlparse + parse\_qs. + + + + Top-level SignalWire REST client with all API namespaces. + + + + Error thrown on non-2xx REST API responses. + + + +## Functions + +### make\_headers + +**Modifiers:** `static` + +#### Signature + +```cpp +httplib::Headers make_headers( + const std::string & auth, + const std::map< std::string, std::string > & extra +) +``` + +#### Parameters + + + + + +#### Returns + +`httplib::Headers` + +#### Source + +[`src/rest/http_client.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/rest/http_client.cpp) + +Line 103. + +*** + +### parse\_url + +**Modifiers:** `static` + +#### Signature + +```cpp +std::pair< std::string, std::string > parse_url(const std::string & base_url) +``` + +#### Parameters + + + +#### Returns + +`std::pair< std::string, std::string >` + +#### Source + +[`src/rest/http_client.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/rest/http_client.cpp) + +Line 91. + +*** + +### to\_wire\_string + +Serialize a PhoneCallHandler to its wire string. + +**Modifiers:** `inline` + +#### Signature + +```cpp +std::string to_wire_string(PhoneCallHandler h) +``` + +#### Parameters + + + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/rest/phone_call_handler.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/phone_call_handler.hpp) + +Line 54. + +## Type Aliases + +### json + +#### Signature + +```cpp +typedef nlohmann::json json +``` + +#### Source + +[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) + +Line 16. + +## Enums + +### PhoneCallHandler + +Enumeration of call\_handler values accepted by phone\_numbers.update. +Setting a phone number's call\_handler + the handler-specific companion field routes inbound calls and auto-materializes the matching Fabric resource on the server. The typed set\_\* helpers on PhoneNumbersNamespace wrap the low-level update call with the right combination — prefer those over constructing the wire body by hand. +Named PhoneCallHandler (not CallHandler) to avoid colliding with signalwire::relay::InboundCallHandler — the callback type used by the RELAY client for inbound-call events. + +Enum value\ +Wire value\ +Companion field\ +Auto-materializes + +RelayScript\ +relay\_script\ +call\_relay\_script\_url\ +swml\_webhook + +LamlWebhooks\ +laml\_webhooks\ +call\_request\_url\ +cxml\_webhook + +LamlApplication\ +laml\_application\ +call\_laml\_application\_id\ +cxml\_application + +AiAgent\ +ai\_agent\ +call\_ai\_agent\_id\ +ai\_agent + +CallFlow\ +call\_flow\ +call\_flow\_id\ +call\_flow + +RelayApplication\ +relay\_application\ +call\_relay\_application\ +relay\_application + +RelayTopic\ +relay\_topic\ +call\_relay\_topic\ +(RELAY routing) + +RelayContext\ +relay\_context\ +call\_relay\_context\ +(legacy) + +RelayConnector\ +relay\_connector\ +(connector config)\ +(internal) + +VideoRoom\ +video\_room\ +call\_video\_room\_id\ +(Video API) + +Dialogflow\ +dialogflow\ +call\_dialogflow\_agent\_id\ +(none) + +Note: LamlWebhooks (wire value laml\_webhooks) produces a cXML handler despite the plural name. For SWML, use RelayScript. + +#### Signature + +```cpp +enum class PhoneCallHandler +``` + +#### Variants + + + + + + + + + + + + + + + + + + + + + + + +#### Source + +[`include/signalwire/rest/phone_call_handler.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/phone_call_handler.hpp) + +Line 39. + +## Source + +[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) + +Line 14. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/paginated-iterator/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/paginated-iterator/index.mdx new file mode 100644 index 0000000000..a952ddd836 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/rest/paginated-iterator/index.mdx @@ -0,0 +1,261 @@ +--- +slug: "/reference/cpp/signalwire/rest/paginated-iterator" +title: "PaginatedIterator" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::PaginatedIterator" + parent: "signalwire::rest" + module: "signalwire.rest" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp" + visibility: "public" +--- +# `PaginatedIterator` + +Iterates items across paginated API responses. +Mirrors signalwire-python's signalwire.rest.\_pagination.PaginatedIterator: fetches the configured path with the configured params, walks the data\_key array, then follows links.next (parsing its query string for the next page's params) until the response carries no links.next. +Iteration is lazy the constructor records inputs but performs no HTTP. The first has\_next() / next() call performs the first fetch. Cursor query params are extracted by parsing links.next like Python's urllib.parse.urlparse + parse\_qs. + +## Signature + +```cpp +class signalwire::rest::PaginatedIterator +``` + +## Methods + +### data\_key + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::string & data_key() const +``` + +#### Returns + +`const std::string &` + +#### Source + +[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) + +Line 140. + +*** + +### done + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +bool done() const +``` + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) + +Line 143. + +*** + +### has\_next + +Returns true if another item can be fetched. Performs HTTP if the in-memory buffer is exhausted but more pages remain. \[\[nodiscard]]: this is the loop condition — discarding it loses the "more items?" answer (and the side-effecting page fetch is not why you'd call it). + +#### Signature + +```cpp +bool has_next() +``` + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) + +Line 129. + +*** + +### http + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const HttpClient & http() const +``` + +#### Returns + +`const HttpClient &` + +#### Source + +[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) + +Line 137. + +*** + +### index + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +size_t index() const +``` + +#### Returns + +`size_t` + +#### Source + +[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) + +Line 141. + +*** + +### items + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::vector< json > & items() const +``` + +#### Returns + +`const std::vector< json > &` + +#### Source + +[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) + +Line 142. + +*** + +### next + +Returns the next item; throws std::out\_of\_range when the iterator is exhausted (mirrors Python's StopIteration). \[\[nodiscard]]: dropping the returned item silently consumes it. + +#### Signature + +```cpp +json next() +``` + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) + +Line 134. + +*** + +### PaginatedIterator + +#### Signature + +```cpp +void PaginatedIterator( + const HttpClient & http, + const std::string & path, + const std::map< std::string, std::string > & params = {}, + const std::string & data_key = "data" +) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) + +Line 119. + +*** + +### params + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::map< std::string, std::string > & params() const +``` + +#### Returns + +`const std::map< std::string, std::string > &` + +#### Source + +[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) + +Line 139. + +*** + +### path + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::string & path() const +``` + +#### Returns + +`const std::string &` + +#### Source + +[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) + +Line 138. + +## Source + +[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) + +Line 117. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/addresses-namespace/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/addresses-namespace/index.mdx new file mode 100644 index 0000000000..1c5dfc9703 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/addresses-namespace/index.mdx @@ -0,0 +1,54 @@ +--- +slug: "/reference/cpp/signalwire/rest/rest-client/addresses-namespace" +title: "AddressesNamespace" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::AddressesNamespace" + parent: "signalwire::rest::RestClient" + module: "signalwire.rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `AddressesNamespace` + +## Signature + +```cpp +struct signalwire::rest::RestClient::AddressesNamespace : signalwire::rest::CrudResource +``` + +## Inheritance + +**Extends:** [signalwire::rest::CrudResource](/docs/sdk-reference/reference/cpp/signalwire/rest/crud-resource) + +## Methods + +### AddressesNamespace + +**Modifiers:** `inline` + +#### Signature + +```cpp +void AddressesNamespace(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1146. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1145. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/calling-namespace/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/calling-namespace/index.mdx new file mode 100644 index 0000000000..66814390e4 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/calling-namespace/index.mdx @@ -0,0 +1,1413 @@ +--- +slug: "/reference/cpp/signalwire/rest/rest-client/calling-namespace" +title: "CallingNamespace" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::CallingNamespace" + parent: "signalwire::rest::RestClient" + module: "signalwire.rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `CallingNamespace` + +## Signature + +```cpp +struct signalwire::rest::RestClient::CallingNamespace +``` + +## Properties + + + +## Methods + +### ai\_hold + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json ai_hold( + const std::string & call_id, + const json & params = json::object() +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 394. + +*** + +### ai\_message + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json ai_message(const std::string & call_id, const json & params) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 391. + +*** + +### ai\_stop + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json ai_stop( + const std::string & call_id, + const json & params = json::object() +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 402. + +*** + +### ai\_unhold + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json ai_unhold( + const std::string & call_id, + const json & params = json::object() +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 398. + +*** + +### answer + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json answer(const std::string & id) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 446. + +*** + +### CallingNamespace + +**Modifiers:** `inline` + +#### Signature + +```cpp +void CallingNamespace(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 275. + +*** + +### collect + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json collect(const std::string & call_id, const json & params) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 338. + +*** + +### collect\_start\_input\_timers + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json collect_start_input_timers( + const std::string & call_id, + const json & params +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 344. + +*** + +### collect\_stop + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json collect_stop(const std::string & call_id, const json & params) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 341. + +*** + +### connect + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json connect(const std::string & id, const json & data) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 444. + +*** + +### denoise + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json denoise( + const std::string & call_id, + const json & params = json::object() +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 374. + +*** + +### denoise\_stop + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json denoise_stop(const std::string & call_id, const json & params) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 378. + +*** + +### detect + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json detect(const std::string & call_id, const json & params) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 350. + +*** + +### detect\_stop + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json detect_stop(const std::string & call_id, const json & params) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 353. + +*** + +### dial + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json dial(const json & params) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 294. + +*** + +### disconnect + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json disconnect( + const std::string & call_id, + const json & params = json::object() +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 302. + +*** + +### end + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json end( + const std::string & call_id, + const json & params = json::object() +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 296. + +*** + +### end\_call + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json end_call(const std::string & id) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 443. + +*** + +### execute + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json execute( + const std::string & command, + const json & params, + const std::optional< std::string > & call_id = std::nullopt +) const +``` + +#### Parameters + + + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 285. + +*** + +### get\_call + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json get_call(const std::string & id) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 441. + +*** + +### hangup + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json hangup(const std::string & id) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 447. + +*** + +### hold + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json hold(const std::string & id) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 448. + +*** + +### list\_calls + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list_calls(const std::map< std::string, std::string > & p = {}) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 440. + +*** + +### live\_transcribe + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json live_transcribe(const std::string & call_id, const json & params) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 408. + +*** + +### live\_translate + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json live_translate(const std::string & call_id, const json & params) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 411. + +*** + +### play + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json play(const std::string & call_id, const json & params) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 307. + +*** + +### play\_pause + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json play_pause(const std::string & call_id, const json & params) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 310. + +*** + +### play\_resume + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json play_resume(const std::string & call_id, const json & params) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 313. + +*** + +### play\_stop + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json play_stop(const std::string & call_id, const json & params) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 316. + +*** + +### play\_volume + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json play_volume(const std::string & call_id, const json & params) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 319. + +*** + +### receive\_fax\_stop + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json receive_fax_stop( + const std::string & call_id, + const json & params = json::object() +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 420. + +*** + +### record + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json record(const std::string & call_id, const json & params) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 324. + +*** + +### record\_pause + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json record_pause(const std::string & call_id, const json & params) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 327. + +*** + +### record\_resume + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json record_resume(const std::string & call_id, const json & params) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 330. + +*** + +### record\_stop + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json record_stop(const std::string & call_id, const json & params) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 333. + +*** + +### refer + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json refer(const std::string & call_id, const json & params) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 426. + +*** + +### send\_digits + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json send_digits(const std::string & id, const json & data) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 445. + +*** + +### send\_fax\_stop + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json send_fax_stop( + const std::string & call_id, + const json & params = json::object() +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 416. + +*** + +### stream + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json stream(const std::string & call_id, const json & params) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 366. + +*** + +### stream\_stop + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json stream_stop(const std::string & call_id, const json & params) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 369. + +*** + +### tap + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json tap(const std::string & call_id, const json & params) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 358. + +*** + +### tap\_stop + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json tap_stop(const std::string & call_id, const json & params) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 361. + +*** + +### transcribe + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json transcribe(const std::string & call_id, const json & params) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 383. + +*** + +### transcribe\_stop + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json transcribe_stop(const std::string & call_id, const json & params) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 386. + +*** + +### transfer + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json transfer(const std::string & call_id, const json & params) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 299. + +*** + +### unhold + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json unhold(const std::string & id) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 449. + +*** + +### update + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json update(const json & params) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 295. + +*** + +### update\_call + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json update_call(const std::string & id, const json & data) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 442. + +*** + +### user\_event + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json user_event(const std::string & call_id, const json & params) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 431. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 272. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/chat-namespace/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/chat-namespace/index.mdx new file mode 100644 index 0000000000..b69a2f2cff --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/chat-namespace/index.mdx @@ -0,0 +1,106 @@ +--- +slug: "/reference/cpp/signalwire/rest/rest-client/chat-namespace" +title: "ChatNamespace" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::ChatNamespace" + parent: "signalwire::rest::RestClient" + module: "signalwire.rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `ChatNamespace` + +## Signature + +```cpp +struct signalwire::rest::RestClient::ChatNamespace +``` + +## Properties + + + +## Methods + +### ChatNamespace + +**Modifiers:** `inline` + +#### Signature + +```cpp +void ChatNamespace(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1423. + +*** + +### list\_messages + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list_messages(const std::map< std::string, std::string > & p = {}) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1425. + +*** + +### send\_message + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json send_message(const json & data) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1424. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1421. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-accounts/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-accounts/index.mdx new file mode 100644 index 0000000000..8278edde46 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-accounts/index.mdx @@ -0,0 +1,162 @@ +--- +slug: "/reference/cpp/signalwire/rest/rest-client/compat-accounts" +title: "CompatAccounts" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::CompatAccounts" + parent: "signalwire::rest::RestClient" + module: "signalwire.rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `CompatAccounts` + +## Signature + +```cpp +struct signalwire::rest::RestClient::CompatAccounts +``` + +## Properties + + + + + +## Methods + +### CompatAccounts + +**Modifiers:** `inline` + +#### Signature + +```cpp +void CompatAccounts(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 930. + +*** + +### create + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json create(const json & data) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 934. + +*** + +### get + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json get(const std::string & sid) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 935. + +*** + +### list + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list(const std::map< std::string, std::string > & params = {}) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 931. + +*** + +### update + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json update(const std::string & sid, const json & data) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 939. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 927. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-applications/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-applications/index.mdx new file mode 100644 index 0000000000..5ac0e442e3 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-applications/index.mdx @@ -0,0 +1,84 @@ +--- +slug: "/reference/cpp/signalwire/rest/rest-client/compat-applications" +title: "CompatApplications" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::CompatApplications" + parent: "signalwire::rest::RestClient" + module: "signalwire.rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `CompatApplications` + +## Signature + +```cpp +struct signalwire::rest::RestClient::CompatApplications : signalwire::rest::CrudResource +``` + +## Inheritance + +**Extends:** [signalwire::rest::CrudResource](/docs/sdk-reference/reference/cpp/signalwire/rest/crud-resource) + +## Methods + +### CompatApplications + +**Modifiers:** `inline` + +#### Signature + +```cpp +void CompatApplications(const HttpClient & c, const std::string & base) +``` + +#### Parameters + + + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 945. + +*** + +### update + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json update(const std::string & sid, const json & data) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 947. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 944. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-calls/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-calls/index.mdx new file mode 100644 index 0000000000..a5fe5d8040 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-calls/index.mdx @@ -0,0 +1,208 @@ +--- +slug: "/reference/cpp/signalwire/rest/rest-client/compat-calls" +title: "CompatCalls" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::CompatCalls" + parent: "signalwire::rest::RestClient" + module: "signalwire.rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `CompatCalls` + +## Signature + +```cpp +struct signalwire::rest::RestClient::CompatCalls : signalwire::rest::CrudResource +``` + +## Inheritance + +**Extends:** [signalwire::rest::CrudResource](/docs/sdk-reference/reference/cpp/signalwire/rest/crud-resource) + +## Methods + +### CompatCalls + +**Modifiers:** `inline` + +#### Signature + +```cpp +void CompatCalls(const HttpClient & c, const std::string & base) +``` + +#### Parameters + + + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 803. + +*** + +### start\_recording + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json start_recording(const std::string & call_sid, const json & data) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 812. + +*** + +### start\_stream + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json start_stream(const std::string & call_sid, const json & data) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 822. + +*** + +### stop\_stream + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json stop_stream( + const std::string & call_sid, + const std::string & stream_sid, + const json & data +) const +``` + +#### Parameters + + + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 825. + +*** + +### update + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json update(const std::string & sid, const json & data) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 807. + +*** + +### update\_recording + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json update_recording( + const std::string & call_sid, + const std::string & recording_sid, + const json & data +) const +``` + +#### Parameters + + + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 815. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 802. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-conferences/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-conferences/index.mdx new file mode 100644 index 0000000000..be455df172 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-conferences/index.mdx @@ -0,0 +1,454 @@ +--- +slug: "/reference/cpp/signalwire/rest/rest-client/compat-conferences" +title: "CompatConferences" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::CompatConferences" + parent: "signalwire::rest::RestClient" + module: "signalwire.rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `CompatConferences` + +## Signature + +```cpp +struct signalwire::rest::RestClient::CompatConferences +``` + +## Properties + + + + + +## Methods + +### CompatConferences + +**Modifiers:** `inline` + +#### Signature + +```cpp +void CompatConferences(const HttpClient & c, const std::string & base) +``` + +#### Parameters + + + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 963. + +*** + +### delete\_recording + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json delete_recording( + const std::string & conference_sid, + const std::string & recording_sid +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1009. + +*** + +### get + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json get(const std::string & sid) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 969. + +*** + +### get\_participant + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json get_participant( + const std::string & conference_sid, + const std::string & call_sid +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 981. + +*** + +### get\_recording + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json get_recording( + const std::string & conference_sid, + const std::string & recording_sid +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1000. + +*** + +### list + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list(const std::map< std::string, std::string > & params = {}) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 966. + +*** + +### list\_participants + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list_participants( + const std::string & conference_sid, + const std::map< std::string, std::string > & params = {} +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 977. + +*** + +### list\_recordings + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list_recordings( + const std::string & conference_sid, + const std::map< std::string, std::string > & params = {} +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 996. + +*** + +### remove\_participant + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json remove_participant( + const std::string & conference_sid, + const std::string & call_sid +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 990. + +*** + +### start\_stream + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json start_stream(const std::string & conference_sid, const json & data) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1015. + +*** + +### stop\_stream + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json stop_stream( + const std::string & conference_sid, + const std::string & stream_sid, + const json & data +) const +``` + +#### Parameters + + + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1018. + +*** + +### update + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json update(const std::string & sid, const json & data) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 972. + +*** + +### update\_participant + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json update_participant( + const std::string & conference_sid, + const std::string & call_sid, + const json & data +) const +``` + +#### Parameters + + + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 985. + +*** + +### update\_recording + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json update_recording( + const std::string & conference_sid, + const std::string & recording_sid, + const json & data +) const +``` + +#### Parameters + + + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1004. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 960. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-faxes/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-faxes/index.mdx new file mode 100644 index 0000000000..9d7ce2fea4 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-faxes/index.mdx @@ -0,0 +1,174 @@ +--- +slug: "/reference/cpp/signalwire/rest/rest-client/compat-faxes" +title: "CompatFaxes" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::CompatFaxes" + parent: "signalwire::rest::RestClient" + module: "signalwire.rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `CompatFaxes` + +## Signature + +```cpp +struct signalwire::rest::RestClient::CompatFaxes : signalwire::rest::CrudResource +``` + +## Inheritance + +**Extends:** [signalwire::rest::CrudResource](/docs/sdk-reference/reference/cpp/signalwire/rest/crud-resource) + +## Methods + +### CompatFaxes + +**Modifiers:** `inline` + +#### Signature + +```cpp +void CompatFaxes(const HttpClient & c, const std::string & base) +``` + +#### Parameters + + + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 855. + +*** + +### delete\_media + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json delete_media( + const std::string & fax_sid, + const std::string & media_sid +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 870. + +*** + +### get\_media + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json get_media(const std::string & fax_sid, const std::string & media_sid) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 866. + +*** + +### list\_media + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list_media( + const std::string & fax_sid, + const std::map< std::string, std::string > & params = {} +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 862. + +*** + +### update + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json update(const std::string & sid, const json & data) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 858. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 854. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-laml-bins/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-laml-bins/index.mdx new file mode 100644 index 0000000000..0d60ab8bdb --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-laml-bins/index.mdx @@ -0,0 +1,84 @@ +--- +slug: "/reference/cpp/signalwire/rest/rest-client/compat-laml-bins" +title: "CompatLamlBins" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::CompatLamlBins" + parent: "signalwire::rest::RestClient" + module: "signalwire.rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `CompatLamlBins` + +## Signature + +```cpp +struct signalwire::rest::RestClient::CompatLamlBins : signalwire::rest::CrudResource +``` + +## Inheritance + +**Extends:** [signalwire::rest::CrudResource](/docs/sdk-reference/reference/cpp/signalwire/rest/crud-resource) + +## Methods + +### CompatLamlBins + +**Modifiers:** `inline` + +#### Signature + +```cpp +void CompatLamlBins(const HttpClient & c, const std::string & base) +``` + +#### Parameters + + + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 953. + +*** + +### update + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json update(const std::string & sid, const json & data) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 955. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 952. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-messages/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-messages/index.mdx new file mode 100644 index 0000000000..7dd358281e --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-messages/index.mdx @@ -0,0 +1,177 @@ +--- +slug: "/reference/cpp/signalwire/rest/rest-client/compat-messages" +title: "CompatMessages" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::CompatMessages" + parent: "signalwire::rest::RestClient" + module: "signalwire.rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `CompatMessages` + +## Signature + +```cpp +struct signalwire::rest::RestClient::CompatMessages : signalwire::rest::CrudResource +``` + +## Inheritance + +**Extends:** [signalwire::rest::CrudResource](/docs/sdk-reference/reference/cpp/signalwire/rest/crud-resource) + +## Methods + +### CompatMessages + +**Modifiers:** `inline` + +#### Signature + +```cpp +void CompatMessages(const HttpClient & c, const std::string & base) +``` + +#### Parameters + + + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 833. + +*** + +### delete\_media + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json delete_media( + const std::string & message_sid, + const std::string & media_sid +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 848. + +*** + +### get\_media + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json get_media( + const std::string & message_sid, + const std::string & media_sid +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 844. + +*** + +### list\_media + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list_media( + const std::string & message_sid, + const std::map< std::string, std::string > & params = {} +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 840. + +*** + +### update + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json update(const std::string & sid, const json & data) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 836. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 832. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-namespace/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-namespace/index.mdx new file mode 100644 index 0000000000..dc3998103d --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-namespace/index.mdx @@ -0,0 +1,186 @@ +--- +slug: "/reference/cpp/signalwire/rest/rest-client/compat-namespace" +title: "CompatNamespace" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::CompatNamespace" + parent: "signalwire::rest::RestClient" + module: "signalwire.rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `CompatNamespace` + +## Signature + +```cpp +struct signalwire::rest::RestClient::CompatNamespace +``` + +## Properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## Methods + +### CompatNamespace + +**Modifiers:** `inline` + +#### Signature + +```cpp +void CompatNamespace(const HttpClient & c, const std::string & account_sid) +``` + +#### Parameters + + + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1111. + +*** + +### create\_call + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json create_call(const json & data) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1131. + +*** + +### list\_calls + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list_calls(const std::map< std::string, std::string > & p = {}) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1133. + +*** + +### list\_messages + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list_messages(const std::map< std::string, std::string > & p = {}) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1134. + +*** + +### send\_message + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json send_message(const json & data) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1132. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1093. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-phone-numbers/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-phone-numbers/index.mdx new file mode 100644 index 0000000000..84ef98033d --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-phone-numbers/index.mdx @@ -0,0 +1,284 @@ +--- +slug: "/reference/cpp/signalwire/rest/rest-client/compat-phone-numbers" +title: "CompatPhoneNumbers" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::CompatPhoneNumbers" + parent: "signalwire::rest::RestClient" + module: "signalwire.rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `CompatPhoneNumbers` + +## Signature + +```cpp +struct signalwire::rest::RestClient::CompatPhoneNumbers +``` + +## Properties + + + + + + + + + +## Methods + +### CompatPhoneNumbers + +**Modifiers:** `inline` + +#### Signature + +```cpp +void CompatPhoneNumbers(const HttpClient & c, const std::string & account_base) +``` + +#### Parameters + + + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 882. + +*** + +### get + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json get(const std::string & sid) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 891. + +*** + +### import\_number + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json import_number(const json & data) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 903. + +*** + +### list + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list(const std::map< std::string, std::string > & params = {}) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 888. + +*** + +### list\_available\_countries + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list_available_countries( + const std::map< std::string, std::string > & params = {} +) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 906. + +*** + +### purchase + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json purchase(const json & data) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 900. + +*** + +### search\_local + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json search_local( + const std::string & country, + const std::map< std::string, std::string > & params = {} +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 909. + +*** + +### search\_toll\_free + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json search_toll_free( + const std::string & country, + const std::map< std::string, std::string > & params = {} +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 913. + +*** + +### update + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json update(const std::string & sid, const json & data) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 894. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 876. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-queues/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-queues/index.mdx new file mode 100644 index 0000000000..c284eb15cd --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-queues/index.mdx @@ -0,0 +1,180 @@ +--- +slug: "/reference/cpp/signalwire/rest/rest-client/compat-queues" +title: "CompatQueues" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::CompatQueues" + parent: "signalwire::rest::RestClient" + module: "signalwire.rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `CompatQueues` + +## Signature + +```cpp +struct signalwire::rest::RestClient::CompatQueues : signalwire::rest::CrudResource +``` + +## Inheritance + +**Extends:** [signalwire::rest::CrudResource](/docs/sdk-reference/reference/cpp/signalwire/rest/crud-resource) + +## Methods + +### CompatQueues + +**Modifiers:** `inline` + +#### Signature + +```cpp +void CompatQueues(const HttpClient & c, const std::string & base) +``` + +#### Parameters + + + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1026. + +*** + +### dequeue\_member + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json dequeue_member( + const std::string & queue_sid, + const std::string & call_sid, + const json & data +) const +``` + +#### Parameters + + + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1039. + +*** + +### get\_member + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json get_member( + const std::string & queue_sid, + const std::string & call_sid +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1035. + +*** + +### list\_members + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list_members( + const std::string & queue_sid, + const std::map< std::string, std::string > & params = {} +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1031. + +*** + +### update + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json update(const std::string & sid, const json & data) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1028. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1025. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-recordings/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-recordings/index.mdx new file mode 100644 index 0000000000..ddaa0d22f8 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-recordings/index.mdx @@ -0,0 +1,110 @@ +--- +slug: "/reference/cpp/signalwire/rest/rest-client/compat-recordings" +title: "CompatRecordings" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::CompatRecordings" + parent: "signalwire::rest::RestClient" + module: "signalwire.rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `CompatRecordings` + +## Signature + +```cpp +struct signalwire::rest::RestClient::CompatRecordings +``` + +## Properties + + + + + +## Methods + +### CompatRecordings + +**Modifiers:** `inline` + +#### Signature + +```cpp +void CompatRecordings(const HttpClient & c, const std::string & base) +``` + +#### Parameters + + + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1049. + +*** + +### get + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json get(const std::string & sid) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1054. + +*** + +### list + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list(const std::map< std::string, std::string > & params = {}) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1051. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1046. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-tokens/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-tokens/index.mdx new file mode 100644 index 0000000000..1430f7fe3a --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-tokens/index.mdx @@ -0,0 +1,112 @@ +--- +slug: "/reference/cpp/signalwire/rest/rest-client/compat-tokens" +title: "CompatTokens" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::CompatTokens" + parent: "signalwire::rest::RestClient" + module: "signalwire.rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `CompatTokens` + +## Signature + +```cpp +struct signalwire::rest::RestClient::CompatTokens +``` + +## Properties + + + + + +## Methods + +### CompatTokens + +**Modifiers:** `inline` + +#### Signature + +```cpp +void CompatTokens(const HttpClient & c, const std::string & base) +``` + +#### Parameters + + + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1081. + +*** + +### create + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json create(const json & data) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1083. + +*** + +### update + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json update(const std::string & token_id, const json & data) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1085. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1078. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-transcriptions/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-transcriptions/index.mdx new file mode 100644 index 0000000000..1d21569b9e --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-transcriptions/index.mdx @@ -0,0 +1,110 @@ +--- +slug: "/reference/cpp/signalwire/rest/rest-client/compat-transcriptions" +title: "CompatTranscriptions" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::CompatTranscriptions" + parent: "signalwire::rest::RestClient" + module: "signalwire.rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `CompatTranscriptions` + +## Signature + +```cpp +struct signalwire::rest::RestClient::CompatTranscriptions +``` + +## Properties + + + + + +## Methods + +### CompatTranscriptions + +**Modifiers:** `inline` + +#### Signature + +```cpp +void CompatTranscriptions(const HttpClient & c, const std::string & base) +``` + +#### Parameters + + + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1065. + +*** + +### get + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json get(const std::string & sid) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1070. + +*** + +### list + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list(const std::map< std::string, std::string > & params = {}) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1067. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1062. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/datasphere-documents/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/datasphere-documents/index.mdx new file mode 100644 index 0000000000..2a200bf38e --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/datasphere-documents/index.mdx @@ -0,0 +1,173 @@ +--- +slug: "/reference/cpp/signalwire/rest/rest-client/datasphere-documents" +title: "DatasphereDocuments" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::DatasphereDocuments" + parent: "signalwire::rest::RestClient" + module: "signalwire.rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `DatasphereDocuments` + +## Signature + +```cpp +struct signalwire::rest::RestClient::DatasphereDocuments : signalwire::rest::CrudResource +``` + +## Inheritance + +**Extends:** [signalwire::rest::CrudResource](/docs/sdk-reference/reference/cpp/signalwire/rest/crud-resource) + +## Methods + +### DatasphereDocuments + +**Modifiers:** `inline` + +#### Signature + +```cpp +void DatasphereDocuments(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 612. + +*** + +### delete\_chunk + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json delete_chunk( + const std::string & document_id, + const std::string & chunk_id +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 625. + +*** + +### get\_chunk + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json get_chunk( + const std::string & document_id, + const std::string & chunk_id +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 621. + +*** + +### list\_chunks + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list_chunks( + const std::string & document_id, + const std::map< std::string, std::string > & params = {} +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 617. + +*** + +### search + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json search(const json & data) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 614. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 611. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/datasphere-namespace/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/datasphere-namespace/index.mdx new file mode 100644 index 0000000000..48e0ad6c00 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/datasphere-namespace/index.mdx @@ -0,0 +1,82 @@ +--- +slug: "/reference/cpp/signalwire/rest/rest-client/datasphere-namespace" +title: "DatasphereNamespace" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::DatasphereNamespace" + parent: "signalwire::rest::RestClient" + module: "signalwire.rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `DatasphereNamespace` + +## Signature + +```cpp +struct signalwire::rest::RestClient::DatasphereNamespace +``` + +## Properties + + + + + +## Methods + +### DatasphereNamespace + +**Modifiers:** `inline` + +#### Signature + +```cpp +void DatasphereNamespace(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 635. + +*** + +### search + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json search(const json & data) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 641. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 631. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-addresses/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-addresses/index.mdx new file mode 100644 index 0000000000..94b647b2ee --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-addresses/index.mdx @@ -0,0 +1,108 @@ +--- +slug: "/reference/cpp/signalwire/rest/rest-client/fabric-addresses" +title: "FabricAddresses" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::FabricAddresses" + parent: "signalwire::rest::RestClient" + module: "signalwire.rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `FabricAddresses` + +## Signature + +```cpp +struct signalwire::rest::RestClient::FabricAddresses +``` + +## Properties + + + + + +## Methods + +### FabricAddresses + +**Modifiers:** `inline` + +#### Signature + +```cpp +void FabricAddresses(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 151. + +*** + +### get + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json get(const std::string & address_id) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 155. + +*** + +### list + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list(const std::map< std::string, std::string > & params = {}) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 152. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 148. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-call-flows/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-call-flows/index.mdx new file mode 100644 index 0000000000..6bd58b64ab --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-call-flows/index.mdx @@ -0,0 +1,166 @@ +--- +slug: "/reference/cpp/signalwire/rest/rest-client/fabric-call-flows" +title: "FabricCallFlows" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::FabricCallFlows" + parent: "signalwire::rest::RestClient" + module: "signalwire.rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `FabricCallFlows` + +## Signature + +```cpp +struct signalwire::rest::RestClient::FabricCallFlows : signalwire::rest::RestClient::FabricResourcePUT +``` + +## Inheritance + +**Extends:** [signalwire::rest::RestClient::FabricResourcePUT](/docs/sdk-reference/reference/cpp/signalwire/rest/rest-client/fabric-resource-put) + +## Methods + +### deploy\_version + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json deploy_version(const std::string & flow_id, const json & data) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 92. + +*** + +### FabricCallFlows + +**Modifiers:** `inline` + +#### Signature + +```cpp +void FabricCallFlows(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 76. + +*** + +### list\_addresses + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list_addresses( + const std::string & flow_id, + const std::map< std::string, std::string > & params = {} +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 84. + +*** + +### list\_versions + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list_versions( + const std::string & flow_id, + const std::map< std::string, std::string > & params = {} +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 88. + +*** + +### singular\_base + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +std::string singular_base() const +``` + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 81. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 75. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-conference-rooms/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-conference-rooms/index.mdx new file mode 100644 index 0000000000..39e0740667 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-conference-rooms/index.mdx @@ -0,0 +1,107 @@ +--- +slug: "/reference/cpp/signalwire/rest/rest-client/fabric-conference-rooms" +title: "FabricConferenceRooms" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::FabricConferenceRooms" + parent: "signalwire::rest::RestClient" + module: "signalwire.rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `FabricConferenceRooms` + +## Signature + +```cpp +struct signalwire::rest::RestClient::FabricConferenceRooms : signalwire::rest::RestClient::FabricResourcePUT +``` + +## Inheritance + +**Extends:** [signalwire::rest::RestClient::FabricResourcePUT](/docs/sdk-reference/reference/cpp/signalwire/rest/rest-client/fabric-resource-put) + +## Methods + +### FabricConferenceRooms + +**Modifiers:** `inline` + +#### Signature + +```cpp +void FabricConferenceRooms(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 98. + +*** + +### list\_addresses + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list_addresses( + const std::string & room_id, + const std::map< std::string, std::string > & params = {} +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 105. + +*** + +### singular\_base + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +std::string singular_base() const +``` + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 102. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 97. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-cxml-applications/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-cxml-applications/index.mdx new file mode 100644 index 0000000000..2087e26160 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-cxml-applications/index.mdx @@ -0,0 +1,80 @@ +--- +slug: "/reference/cpp/signalwire/rest/rest-client/fabric-cxml-applications" +title: "FabricCxmlApplications" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::FabricCxmlApplications" + parent: "signalwire::rest::RestClient" + module: "signalwire.rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `FabricCxmlApplications` + +## Signature + +```cpp +struct signalwire::rest::RestClient::FabricCxmlApplications : signalwire::rest::RestClient::FabricResourcePUT +``` + +## Inheritance + +**Extends:** [signalwire::rest::RestClient::FabricResourcePUT](/docs/sdk-reference/reference/cpp/signalwire/rest/rest-client/fabric-resource-put) + +## Methods + +### create + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json create(const json &) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 142. + +*** + +### FabricCxmlApplications + +**Modifiers:** `inline` + +#### Signature + +```cpp +void FabricCxmlApplications(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 139. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 138. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-generic-resources/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-generic-resources/index.mdx new file mode 100644 index 0000000000..5dbc508bfd --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-generic-resources/index.mdx @@ -0,0 +1,201 @@ +--- +slug: "/reference/cpp/signalwire/rest/rest-client/fabric-generic-resources" +title: "FabricGenericResources" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::FabricGenericResources" + parent: "signalwire::rest::RestClient" + module: "signalwire.rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `FabricGenericResources` + +## Signature + +```cpp +struct signalwire::rest::RestClient::FabricGenericResources +``` + +## Properties + + + + + +## Methods + +### assign\_domain\_application + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json assign_domain_application( + const std::string & resource_id, + const json & data +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 177. + +*** + +### assign\_phone\_route + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json assign_phone_route( + const std::string & resource_id, + const json & data +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 182. + +*** + +### FabricGenericResources + +**Modifiers:** `inline` + +#### Signature + +```cpp +void FabricGenericResources(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 163. + +*** + +### get + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json get(const std::string & resource_id) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 167. + +*** + +### list + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list(const std::map< std::string, std::string > & params = {}) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 164. + +*** + +### list\_addresses + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list_addresses( + const std::string & resource_id, + const std::map< std::string, std::string > & params = {} +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 173. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 160. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-namespace/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-namespace/index.mdx new file mode 100644 index 0000000000..8cb2c2320a --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-namespace/index.mdx @@ -0,0 +1,96 @@ +--- +slug: "/reference/cpp/signalwire/rest/rest-client/fabric-namespace" +title: "FabricNamespace" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::FabricNamespace" + parent: "signalwire::rest::RestClient" + module: "signalwire.rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `FabricNamespace` + +## Signature + +```cpp +struct signalwire::rest::RestClient::FabricNamespace +``` + +## Properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## Methods + +### FabricNamespace + +**Modifiers:** `inline` + +#### Signature + +```cpp +void FabricNamespace(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 247. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 209. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-resource-put/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-resource-put/index.mdx new file mode 100644 index 0000000000..3121cd8fdc --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-resource-put/index.mdx @@ -0,0 +1,84 @@ +--- +slug: "/reference/cpp/signalwire/rest/rest-client/fabric-resource-put" +title: "FabricResourcePUT" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::FabricResourcePUT" + parent: "signalwire::rest::RestClient" + module: "signalwire.rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `FabricResourcePUT` + +## Signature + +```cpp +struct signalwire::rest::RestClient::FabricResourcePUT : signalwire::rest::RestClient::FabricResource +``` + +## Inheritance + +**Extends:** [signalwire::rest::RestClient::FabricResource](/docs/sdk-reference/reference/cpp/signalwire/rest/rest-client/fabric-resource) + +## Methods + +### FabricResourcePUT + +**Modifiers:** `inline` + +#### Signature + +```cpp +void FabricResourcePUT(const HttpClient & c, const std::string & base) +``` + +#### Parameters + + + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 67. + +*** + +### update + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json update(const std::string & resource_id, const json & data) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 70. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 66. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-resource/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-resource/index.mdx new file mode 100644 index 0000000000..4e6d721ebb --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-resource/index.mdx @@ -0,0 +1,87 @@ +--- +slug: "/reference/cpp/signalwire/rest/rest-client/fabric-resource" +title: "FabricResource" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::FabricResource" + parent: "signalwire::rest::RestClient" + module: "signalwire.rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `FabricResource` + +## Signature + +```cpp +struct signalwire::rest::RestClient::FabricResource : signalwire::rest::CrudResource +``` + +## Inheritance + +**Extends:** [signalwire::rest::CrudResource](/docs/sdk-reference/reference/cpp/signalwire/rest/crud-resource) + +## Methods + +### FabricResource + +**Modifiers:** `inline` + +#### Signature + +```cpp +void FabricResource(const HttpClient & c, const std::string & base) +``` + +#### Parameters + + + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 57. + +*** + +### list\_addresses + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list_addresses( + const std::string & resource_id, + const std::map< std::string, std::string > & params = {} +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 60. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 56. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-subscribers/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-subscribers/index.mdx new file mode 100644 index 0000000000..331530a1eb --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-subscribers/index.mdx @@ -0,0 +1,212 @@ +--- +slug: "/reference/cpp/signalwire/rest/rest-client/fabric-subscribers" +title: "FabricSubscribers" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::FabricSubscribers" + parent: "signalwire::rest::RestClient" + module: "signalwire.rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `FabricSubscribers` + +## Signature + +```cpp +struct signalwire::rest::RestClient::FabricSubscribers : signalwire::rest::RestClient::FabricResourcePUT +``` + +## Inheritance + +**Extends:** [signalwire::rest::RestClient::FabricResourcePUT](/docs/sdk-reference/reference/cpp/signalwire/rest/rest-client/fabric-resource-put) + +## Methods + +### create\_sip\_endpoint + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json create_sip_endpoint( + const std::string & subscriber_id, + const json & data +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 119. + +*** + +### delete\_sip\_endpoint + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json delete_sip_endpoint( + const std::string & subscriber_id, + const std::string & endpoint_id +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 132. + +*** + +### FabricSubscribers + +**Modifiers:** `inline` + +#### Signature + +```cpp +void FabricSubscribers(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 112. + +*** + +### get\_sip\_endpoint + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json get_sip_endpoint( + const std::string & subscriber_id, + const std::string & endpoint_id +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 122. + +*** + +### list\_sip\_endpoints + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list_sip_endpoints( + const std::string & subscriber_id, + const std::map< std::string, std::string > & params = {} +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 115. + +*** + +### update\_sip\_endpoint + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json update_sip_endpoint( + const std::string & subscriber_id, + const std::string & endpoint_id, + const json & data +) const +``` + +#### Parameters + + + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 127. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 111. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-tokens/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-tokens/index.mdx new file mode 100644 index 0000000000..483928c59c --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-tokens/index.mdx @@ -0,0 +1,186 @@ +--- +slug: "/reference/cpp/signalwire/rest/rest-client/fabric-tokens" +title: "FabricTokens" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::FabricTokens" + parent: "signalwire::rest::RestClient" + module: "signalwire.rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `FabricTokens` + +## Signature + +```cpp +struct signalwire::rest::RestClient::FabricTokens +``` + +## Properties + + + + + +## Methods + +### create\_embed\_token + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json create_embed_token(const json & data) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 204. + +*** + +### create\_guest\_token + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json create_guest_token(const json & data) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 201. + +*** + +### create\_invite\_token + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json create_invite_token(const json & data) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 198. + +*** + +### create\_subscriber\_token + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json create_subscriber_token(const json & data) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 192. + +*** + +### FabricTokens + +**Modifiers:** `inline` + +#### Signature + +```cpp +void FabricTokens(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 190. + +*** + +### refresh\_subscriber\_token + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json refresh_subscriber_token(const json & data) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 195. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 187. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/imported-numbers-namespace/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/imported-numbers-namespace/index.mdx new file mode 100644 index 0000000000..7f28f73069 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/imported-numbers-namespace/index.mdx @@ -0,0 +1,80 @@ +--- +slug: "/reference/cpp/signalwire/rest/rest-client/imported-numbers-namespace" +title: "ImportedNumbersNamespace" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::ImportedNumbersNamespace" + parent: "signalwire::rest::RestClient" + module: "signalwire.rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `ImportedNumbersNamespace` + +## Signature + +```cpp +struct signalwire::rest::RestClient::ImportedNumbersNamespace : signalwire::rest::CrudResource +``` + +## Inheritance + +**Extends:** [signalwire::rest::CrudResource](/docs/sdk-reference/reference/cpp/signalwire/rest/crud-resource) + +## Methods + +### create + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json create(const json & data) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1231. + +*** + +### ImportedNumbersNamespace + +**Modifiers:** `inline` + +#### Signature + +```cpp +void ImportedNumbersNamespace(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1229. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1228. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/index.mdx new file mode 100644 index 0000000000..05b052667c --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/index.mdx @@ -0,0 +1,750 @@ +--- +slug: "/reference/cpp/signalwire/rest/rest-client" +title: "RestClient" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient" + parent: "signalwire::rest" + module: "signalwire.rest" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `RestClient` + +Top-level SignalWire REST client with all API namespaces. + +## Signature + +```cpp +class signalwire::rest::RestClient +``` + +## Classes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## Methods + +### addresses + +**Modifiers:** `inline` + +#### Signature + +```cpp +AddressesNamespace & addresses() +``` + +#### Returns + +`AddressesNamespace &` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1438. + +*** + +### calling + +**Modifiers:** `inline` + +#### Signature + +```cpp +CallingNamespace & calling() +``` + +#### Returns + +`CallingNamespace &` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1433. + +*** + +### chat + +**Modifiers:** `inline` + +#### Signature + +```cpp +ChatNamespace & chat() +``` + +#### Returns + +`ChatNamespace &` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1452. + +*** + +### compat + +**Modifiers:** `inline` + +#### Signature + +```cpp +CompatNamespace & compat() +``` + +#### Returns + +`CompatNamespace &` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1437. + +*** + +### datasphere + +**Modifiers:** `inline` + +#### Signature + +```cpp +DatasphereNamespace & datasphere() +``` + +#### Returns + +`DatasphereNamespace &` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1435. + +*** + +### fabric + +**Modifiers:** `inline` + +#### Signature + +```cpp +FabricNamespace & fabric() +``` + +#### Returns + +`FabricNamespace &` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1432. + +*** + +### from\_env + +Initialize from environment variables. + +**Modifiers:** `static` + +#### Signature + +```cpp +RestClient from_env() +``` + +#### Returns + +`RestClient` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 25. + +*** + +### http\_client + +Get the underlying HTTP client. + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const HttpClient & http_client() const +``` + +#### Returns + +`const HttpClient &` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1455. + +*** + +### imported\_numbers + +**Modifiers:** `inline` + +#### Signature + +```cpp +ImportedNumbersNamespace & imported_numbers() +``` + +#### Returns + +`ImportedNumbersNamespace &` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1446. + +*** + +### logs + +**Modifiers:** `inline` + +#### Signature + +```cpp +LogsNamespace & logs() +``` + +#### Returns + +`LogsNamespace &` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1449. + +*** + +### lookup + +**Modifiers:** `inline` + +#### Signature + +```cpp +LookupNamespace & lookup() +``` + +#### Returns + +`LookupNamespace &` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1444. + +*** + +### mfa + +**Modifiers:** `inline` + +#### Signature + +```cpp +MFANamespace & mfa() +``` + +#### Returns + +`MFANamespace &` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1447. + +*** + +### number\_groups + +**Modifiers:** `inline` + +#### Signature + +```cpp +NumberGroupsNamespace & number_groups() +``` + +#### Returns + +`NumberGroupsNamespace &` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1441. + +*** + +### phone\_numbers + +**Modifiers:** `inline` + +#### Signature + +```cpp +PhoneNumbersNamespace & phone_numbers() +``` + +#### Returns + +`PhoneNumbersNamespace &` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1434. + +*** + +### project + +**Modifiers:** `inline` + +#### Signature + +```cpp +ProjectNamespace & project() +``` + +#### Returns + +`ProjectNamespace &` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1450. + +*** + +### project\_id + +Project ID accessor (read-only). + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::string & project_id() const +``` + +#### Returns + +`const std::string &` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 37. + +*** + +### pubsub + +**Modifiers:** `inline` + +#### Signature + +```cpp +PubSubNamespace & pubsub() +``` + +#### Returns + +`PubSubNamespace &` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1451. + +*** + +### queues + +**Modifiers:** `inline` + +#### Signature + +```cpp +QueuesNamespace & queues() +``` + +#### Returns + +`QueuesNamespace &` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1439. + +*** + +### recordings + +**Modifiers:** `inline` + +#### Signature + +```cpp +RecordingsNamespace & recordings() +``` + +#### Returns + +`RecordingsNamespace &` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1440. + +*** + +### registry + +**Modifiers:** `inline` + +#### Signature + +```cpp +RegistryNamespace & registry() +``` + +#### Returns + +`RegistryNamespace &` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1448. + +*** + +### RestClient + +#### Signature + +```cpp +void RestClient( + const std::string & space, + const std::string & project_id, + const std::string & token +) +``` + +#### Parameters + + + + + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 20. + +*** + +### short\_codes + +**Modifiers:** `inline` + +#### Signature + +```cpp +ShortCodesNamespace & short_codes() +``` + +#### Returns + +`ShortCodesNamespace &` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1445. + +*** + +### sip\_profile + +**Modifiers:** `inline` + +#### Signature + +```cpp +SipProfileNamespace & sip_profile() +``` + +#### Returns + +`SipProfileNamespace &` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1443. + +*** + +### verified\_callers + +**Modifiers:** `inline` + +#### Signature + +```cpp +VerifiedCallersNamespace & verified_callers() +``` + +#### Returns + +`VerifiedCallersNamespace &` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1442. + +*** + +### video + +**Modifiers:** `inline` + +#### Signature + +```cpp +VideoNamespace & video() +``` + +#### Returns + +`VideoNamespace &` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1436. + +*** + +### with\_base\_url + +Construct with an explicit pre-built base URL (http://... or https://...) instead of synthesizing one from the SignalWire space hostname. Used by audit harnesses pointing the client at loopback fixtures. The space-based constructor remains the production path. + +**Modifiers:** `static` + +#### Signature + +```cpp +RestClient with_base_url( + const std::string & base_url, + const std::string & project_id, + const std::string & token +) +``` + +#### Parameters + + + + + + + +#### Returns + +`RestClient` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 32. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 18. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/logs-conferences/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/logs-conferences/index.mdx new file mode 100644 index 0000000000..9807b20b39 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/logs-conferences/index.mdx @@ -0,0 +1,82 @@ +--- +slug: "/reference/cpp/signalwire/rest/rest-client/logs-conferences" +title: "LogsConferences" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::LogsConferences" + parent: "signalwire::rest::RestClient" + module: "signalwire.rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `LogsConferences` + +## Signature + +```cpp +struct signalwire::rest::RestClient::LogsConferences +``` + +## Properties + + + + + +## Methods + +### list + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list(const std::map< std::string, std::string > & params = {}) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1377. + +*** + +### LogsConferences + +**Modifiers:** `inline` + +#### Signature + +```cpp +void LogsConferences(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1376. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1373. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/logs-fax/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/logs-fax/index.mdx new file mode 100644 index 0000000000..77ed172926 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/logs-fax/index.mdx @@ -0,0 +1,108 @@ +--- +slug: "/reference/cpp/signalwire/rest/rest-client/logs-fax" +title: "LogsFax" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::LogsFax" + parent: "signalwire::rest::RestClient" + module: "signalwire.rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `LogsFax` + +## Signature + +```cpp +struct signalwire::rest::RestClient::LogsFax +``` + +## Properties + + + + + +## Methods + +### get + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json get(const std::string & log_id) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1368. + +*** + +### list + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list(const std::map< std::string, std::string > & params = {}) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1365. + +*** + +### LogsFax + +**Modifiers:** `inline` + +#### Signature + +```cpp +void LogsFax(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1364. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1361. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/logs-messages/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/logs-messages/index.mdx new file mode 100644 index 0000000000..8c018e3a92 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/logs-messages/index.mdx @@ -0,0 +1,108 @@ +--- +slug: "/reference/cpp/signalwire/rest/rest-client/logs-messages" +title: "LogsMessages" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::LogsMessages" + parent: "signalwire::rest::RestClient" + module: "signalwire.rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `LogsMessages` + +## Signature + +```cpp +struct signalwire::rest::RestClient::LogsMessages +``` + +## Properties + + + + + +## Methods + +### get + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json get(const std::string & log_id) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1340. + +*** + +### list + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list(const std::map< std::string, std::string > & params = {}) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1337. + +*** + +### LogsMessages + +**Modifiers:** `inline` + +#### Signature + +```cpp +void LogsMessages(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1336. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1333. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/logs-namespace/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/logs-namespace/index.mdx new file mode 100644 index 0000000000..c5f54c84f1 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/logs-namespace/index.mdx @@ -0,0 +1,60 @@ +--- +slug: "/reference/cpp/signalwire/rest/rest-client/logs-namespace" +title: "LogsNamespace" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::LogsNamespace" + parent: "signalwire::rest::RestClient" + module: "signalwire.rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `LogsNamespace` + +## Signature + +```cpp +struct signalwire::rest::RestClient::LogsNamespace +``` + +## Properties + + + + + + + + + +## Methods + +### LogsNamespace + +**Modifiers:** `inline` + +#### Signature + +```cpp +void LogsNamespace(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1387. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1382. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/logs-voice/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/logs-voice/index.mdx new file mode 100644 index 0000000000..4dcb5de5fd --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/logs-voice/index.mdx @@ -0,0 +1,139 @@ +--- +slug: "/reference/cpp/signalwire/rest/rest-client/logs-voice" +title: "LogsVoice" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::LogsVoice" + parent: "signalwire::rest::RestClient" + module: "signalwire.rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `LogsVoice` + +## Signature + +```cpp +struct signalwire::rest::RestClient::LogsVoice +``` + +## Properties + + + + + +## Methods + +### get + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json get(const std::string & log_id) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1352. + +*** + +### list + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list(const std::map< std::string, std::string > & params = {}) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1349. + +*** + +### list\_events + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list_events( + const std::string & log_id, + const std::map< std::string, std::string > & params = {} +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1355. + +*** + +### LogsVoice + +**Modifiers:** `inline` + +#### Signature + +```cpp +void LogsVoice(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1348. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1345. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/lookup-namespace/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/lookup-namespace/index.mdx new file mode 100644 index 0000000000..70c36b2bb1 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/lookup-namespace/index.mdx @@ -0,0 +1,80 @@ +--- +slug: "/reference/cpp/signalwire/rest/rest-client/lookup-namespace" +title: "LookupNamespace" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::LookupNamespace" + parent: "signalwire::rest::RestClient" + module: "signalwire.rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `LookupNamespace` + +## Signature + +```cpp +struct signalwire::rest::RestClient::LookupNamespace +``` + +## Properties + + + +## Methods + +### lookup + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json lookup(const std::string & number) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1212. + +*** + +### LookupNamespace + +**Modifiers:** `inline` + +#### Signature + +```cpp +void LookupNamespace(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1211. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1209. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/mfa-namespace/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/mfa-namespace/index.mdx new file mode 100644 index 0000000000..b9c47cf1a3 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/mfa-namespace/index.mdx @@ -0,0 +1,186 @@ +--- +slug: "/reference/cpp/signalwire/rest/rest-client/mfa-namespace" +title: "MFANamespace" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::MFANamespace" + parent: "signalwire::rest::RestClient" + module: "signalwire.rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `MFANamespace` + +## Signature + +```cpp +struct signalwire::rest::RestClient::MFANamespace +``` + +## Properties + + + +## Methods + +### call + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json call(const json & data) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1241. + +*** + +### MFANamespace + +**Modifiers:** `inline` + +#### Signature + +```cpp +void MFANamespace(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1238. + +*** + +### request\_code + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json request_code(const json & data) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1246. + +*** + +### sms + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json sms(const json & data) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1240. + +*** + +### verify + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json verify(const std::string & request_id, const json & data) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1242. + +*** + +### verify\_code + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json verify_code(const json & data) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1247. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1236. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/number-groups-namespace/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/number-groups-namespace/index.mdx new file mode 100644 index 0000000000..8db0bb1435 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/number-groups-namespace/index.mdx @@ -0,0 +1,193 @@ +--- +slug: "/reference/cpp/signalwire/rest/rest-client/number-groups-namespace" +title: "NumberGroupsNamespace" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::NumberGroupsNamespace" + parent: "signalwire::rest::RestClient" + module: "signalwire.rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `NumberGroupsNamespace` + +## Signature + +```cpp +struct signalwire::rest::RestClient::NumberGroupsNamespace : signalwire::rest::CrudResource +``` + +## Inheritance + +**Extends:** [signalwire::rest::CrudResource](/docs/sdk-reference/reference/cpp/signalwire/rest/crud-resource) + +## Methods + +### add\_membership + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json add_membership(const std::string & group_id, const json & data) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1186. + +*** + +### delete\_membership + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json delete_membership(const std::string & membership_id) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1192. + +*** + +### get\_membership + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json get_membership(const std::string & membership_id) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1189. + +*** + +### list\_memberships + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list_memberships( + const std::string & group_id, + const std::map< std::string, std::string > & params = {} +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1182. + +*** + +### NumberGroupsNamespace + +**Modifiers:** `inline` + +#### Signature + +```cpp +void NumberGroupsNamespace(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1176. + +*** + +### update + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json update(const std::string & id, const json & data) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1178. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1175. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/phone-numbers-namespace/call-flow-options/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/phone-numbers-namespace/call-flow-options/index.mdx new file mode 100644 index 0000000000..16cd4a4fa9 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/phone-numbers-namespace/call-flow-options/index.mdx @@ -0,0 +1,36 @@ +--- +slug: "/reference/cpp/signalwire/rest/rest-client/phone-numbers-namespace/call-flow-options" +title: "CallFlowOptions" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::PhoneNumbersNamespace::CallFlowOptions" + parent: "signalwire::rest::RestClient::PhoneNumbersNamespace" + module: "signalwire.rest.RestClient.PhoneNumbersNamespace" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `CallFlowOptions` + +Options for binding a phone number to a call flow. + +## Signature + +```cpp +struct signalwire::rest::RestClient::PhoneNumbersNamespace::CallFlowOptions +``` + +## Properties + + + Accepts "working\_copy" or "current\_deployed" (server default when omitted). + + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 479. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/phone-numbers-namespace/cxml-webhook-options/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/phone-numbers-namespace/cxml-webhook-options/index.mdx new file mode 100644 index 0000000000..4a76b98960 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/phone-numbers-namespace/cxml-webhook-options/index.mdx @@ -0,0 +1,36 @@ +--- +slug: "/reference/cpp/signalwire/rest/rest-client/phone-numbers-namespace/cxml-webhook-options" +title: "CxmlWebhookOptions" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::PhoneNumbersNamespace::CxmlWebhookOptions" + parent: "signalwire::rest::RestClient::PhoneNumbersNamespace" + module: "signalwire.rest.RestClient.PhoneNumbersNamespace" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `CxmlWebhookOptions` + +Options for binding a phone number to a cXML (Twilio-compat) webhook. + +## Signature + +```cpp +struct signalwire::rest::RestClient::PhoneNumbersNamespace::CxmlWebhookOptions +``` + +## Properties + + + + + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 473. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/phone-numbers-namespace/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/phone-numbers-namespace/index.mdx new file mode 100644 index 0000000000..d248f42a66 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/phone-numbers-namespace/index.mdx @@ -0,0 +1,585 @@ +--- +slug: "/reference/cpp/signalwire/rest/rest-client/phone-numbers-namespace" +title: "PhoneNumbersNamespace" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::PhoneNumbersNamespace" + parent: "signalwire::rest::RestClient" + module: "signalwire.rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `PhoneNumbersNamespace` + +## Signature + +```cpp +struct signalwire::rest::RestClient::PhoneNumbersNamespace : signalwire::rest::CrudResource +``` + +## Inheritance + +**Extends:** [signalwire::rest::CrudResource](/docs/sdk-reference/reference/cpp/signalwire/rest/crud-resource) + +## Classes + + + + Options for binding a phone number to a call flow. + + + + Options for binding a phone number to a cXML (Twilio-compat) webhook. + + + + Options for binding a phone number to a RELAY topic. + + + +## Methods + +### buy + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json buy(const json & data) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 455. + +*** + +### make\_ai\_agent\_body + +**Modifiers:** `static` `inline` + +#### Signature + +```cpp +json make_ai_agent_body(const std::string & agent_id) +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 517. + +*** + +### make\_call\_flow\_body + +**Modifiers:** `static` `inline` + +#### Signature + +```cpp +json make_call_flow_body( + const std::string & flow_id, + const CallFlowOptions & opts = {} +) +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 524. + +*** + +### make\_cxml\_application\_body + +**Modifiers:** `static` `inline` + +#### Signature + +```cpp +json make_cxml_application_body(const std::string & application_id) +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 510. + +*** + +### make\_cxml\_webhook\_body + +**Modifiers:** `static` `inline` + +#### Signature + +```cpp +json make_cxml_webhook_body( + const std::string & url, + const CxmlWebhookOptions & opts = {} +) +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 499. + +*** + +### make\_relay\_application\_body + +**Modifiers:** `static` `inline` + +#### Signature + +```cpp +json make_relay_application_body(const std::string & name) +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 534. + +*** + +### make\_relay\_topic\_body + +**Modifiers:** `static` `inline` + +#### Signature + +```cpp +json make_relay_topic_body( + const std::string & topic, + const RelayTopicOptions & opts = {} +) +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 541. + +*** + +### make\_swml\_webhook\_body + +**Modifiers:** `static` `inline` + +#### Signature + +```cpp +json make_swml_webhook_body(const std::string & url) +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 492. + +*** + +### PhoneNumbersNamespace + +**Modifiers:** `inline` + +#### Signature + +```cpp +void PhoneNumbersNamespace(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 453. + +*** + +### release + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json release(const std::string & id) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 456. + +*** + +### search + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json search(const std::map< std::string, std::string > & p) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 454. + +*** + +### set\_ai\_agent + +Route inbound calls to an AI Agent Fabric resource by ID. + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json set_ai_agent( + const std::string & resource_id, + const std::string & agent_id +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 577. + +*** + +### set\_call\_flow + +Route inbound calls to a Call Flow by ID. opts.version accepts "working\_copy" or "current\_deployed". + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json set_call_flow( + const std::string & resource_id, + const std::string & flow_id, + const CallFlowOptions & opts = {} +) const +``` + +#### Parameters + + + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 584. + +*** + +### set\_cxml\_application + +Route inbound calls to an existing cXML application by ID. + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json set_cxml_application( + const std::string & resource_id, + const std::string & application_id +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 571. + +*** + +### set\_cxml\_webhook + +Route inbound calls to a cXML (Twilio-compat / LAML) webhook. Despite the wire value laml\_webhooks being plural, this creates a single cxml\_webhook Fabric resource. Extra options populate fallback and status-callback fields. + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json set_cxml_webhook( + const std::string & resource_id, + const std::string & url, + const CxmlWebhookOptions & opts = {} +) const +``` + +#### Parameters + + + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 564. + +*** + +### set\_relay\_application + +Route inbound calls to a named RELAY application. + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json set_relay_application( + const std::string & resource_id, + const std::string & name +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 591. + +*** + +### set\_relay\_topic + +Route inbound calls to a RELAY topic (client subscription). + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json set_relay_topic( + const std::string & resource_id, + const std::string & topic, + const RelayTopicOptions & opts = {} +) const +``` + +#### Parameters + + + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 597. + +*** + +### set\_swml\_webhook + +Route inbound calls to an SWML webhook URL. Server auto-creates a swml\_webhook Fabric resource keyed off this URL. + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json set_swml_webhook( + const std::string & resource_id, + const std::string & url +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 556. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 452. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/phone-numbers-namespace/relay-topic-options/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/phone-numbers-namespace/relay-topic-options/index.mdx new file mode 100644 index 0000000000..31476d58f1 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/phone-numbers-namespace/relay-topic-options/index.mdx @@ -0,0 +1,34 @@ +--- +slug: "/reference/cpp/signalwire/rest/rest-client/phone-numbers-namespace/relay-topic-options" +title: "RelayTopicOptions" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::PhoneNumbersNamespace::RelayTopicOptions" + parent: "signalwire::rest::RestClient::PhoneNumbersNamespace" + module: "signalwire.rest.RestClient.PhoneNumbersNamespace" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `RelayTopicOptions` + +Options for binding a phone number to a RELAY topic. + +## Signature + +```cpp +struct signalwire::rest::RestClient::PhoneNumbersNamespace::RelayTopicOptions +``` + +## Properties + + + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 486. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/project-namespace/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/project-namespace/index.mdx new file mode 100644 index 0000000000..44cc912705 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/project-namespace/index.mdx @@ -0,0 +1,104 @@ +--- +slug: "/reference/cpp/signalwire/rest/rest-client/project-namespace" +title: "ProjectNamespace" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::ProjectNamespace" + parent: "signalwire::rest::RestClient" + module: "signalwire.rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `ProjectNamespace` + +## Signature + +```cpp +struct signalwire::rest::RestClient::ProjectNamespace +``` + +## Properties + + + + + +## Methods + +### get\_project + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json get_project() const +``` + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1411. + +*** + +### ProjectNamespace + +**Modifiers:** `inline` + +#### Signature + +```cpp +void ProjectNamespace(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1408. + +*** + +### update\_project + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json update_project(const json & data) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1412. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1405. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/project-tokens/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/project-tokens/index.mdx new file mode 100644 index 0000000000..669b6511cf --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/project-tokens/index.mdx @@ -0,0 +1,110 @@ +--- +slug: "/reference/cpp/signalwire/rest/rest-client/project-tokens" +title: "ProjectTokens" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::ProjectTokens" + parent: "signalwire::rest::RestClient" + module: "signalwire.rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `ProjectTokens` + +## Signature + +```cpp +struct signalwire::rest::RestClient::ProjectTokens +``` + +## Properties + + + + + +## Methods + +### create + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json create(const json & data) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1396. + +*** + +### ProjectTokens + +**Modifiers:** `inline` + +#### Signature + +```cpp +void ProjectTokens(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1395. + +*** + +### update + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json update(const std::string & token_id, const json & data) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1397. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1392. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/pub-sub-namespace/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/pub-sub-namespace/index.mdx new file mode 100644 index 0000000000..ea2176a8bf --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/pub-sub-namespace/index.mdx @@ -0,0 +1,80 @@ +--- +slug: "/reference/cpp/signalwire/rest/rest-client/pub-sub-namespace" +title: "PubSubNamespace" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::PubSubNamespace" + parent: "signalwire::rest::RestClient" + module: "signalwire.rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `PubSubNamespace` + +## Signature + +```cpp +struct signalwire::rest::RestClient::PubSubNamespace +``` + +## Properties + + + +## Methods + +### publish + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json publish(const json & data) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1418. + +*** + +### PubSubNamespace + +**Modifiers:** `inline` + +#### Signature + +```cpp +void PubSubNamespace(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1417. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1415. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/queues-namespace/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/queues-namespace/index.mdx new file mode 100644 index 0000000000..b335b36143 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/queues-namespace/index.mdx @@ -0,0 +1,170 @@ +--- +slug: "/reference/cpp/signalwire/rest/rest-client/queues-namespace" +title: "QueuesNamespace" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::QueuesNamespace" + parent: "signalwire::rest::RestClient" + module: "signalwire.rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `QueuesNamespace` + +## Signature + +```cpp +struct signalwire::rest::RestClient::QueuesNamespace : signalwire::rest::CrudResource +``` + +## Inheritance + +**Extends:** [signalwire::rest::CrudResource](/docs/sdk-reference/reference/cpp/signalwire/rest/crud-resource) + +## Methods + +### get\_member + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json get_member( + const std::string & queue_id, + const std::string & member_id +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1164. + +*** + +### get\_next\_member + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json get_next_member(const std::string & queue_id) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1161. + +*** + +### list\_members + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list_members( + const std::string & queue_id, + const std::map< std::string, std::string > & params = {} +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1157. + +*** + +### QueuesNamespace + +**Modifiers:** `inline` + +#### Signature + +```cpp +void QueuesNamespace(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1152. + +*** + +### update + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json update(const std::string & id, const json & data) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1154. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1151. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/recordings-namespace/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/recordings-namespace/index.mdx new file mode 100644 index 0000000000..988c974b66 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/recordings-namespace/index.mdx @@ -0,0 +1,54 @@ +--- +slug: "/reference/cpp/signalwire/rest/rest-client/recordings-namespace" +title: "RecordingsNamespace" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::RecordingsNamespace" + parent: "signalwire::rest::RestClient" + module: "signalwire.rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `RecordingsNamespace` + +## Signature + +```cpp +struct signalwire::rest::RestClient::RecordingsNamespace : signalwire::rest::CrudResource +``` + +## Inheritance + +**Extends:** [signalwire::rest::CrudResource](/docs/sdk-reference/reference/cpp/signalwire/rest/crud-resource) + +## Methods + +### RecordingsNamespace + +**Modifiers:** `inline` + +#### Signature + +```cpp +void RecordingsNamespace(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1170. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1169. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/registry-brands/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/registry-brands/index.mdx new file mode 100644 index 0000000000..28b92f632e --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/registry-brands/index.mdx @@ -0,0 +1,193 @@ +--- +slug: "/reference/cpp/signalwire/rest/rest-client/registry-brands" +title: "RegistryBrands" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::RegistryBrands" + parent: "signalwire::rest::RestClient" + module: "signalwire.rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `RegistryBrands` + +## Signature + +```cpp +struct signalwire::rest::RestClient::RegistryBrands +``` + +## Properties + + + + + +## Methods + +### create + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json create(const json & data) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1261. + +*** + +### create\_campaign + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json create_campaign(const std::string & brand_id, const json & data) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1269. + +*** + +### get + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json get(const std::string & brand_id) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1262. + +*** + +### list + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list(const std::map< std::string, std::string > & params = {}) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1258. + +*** + +### list\_campaigns + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list_campaigns( + const std::string & brand_id, + const std::map< std::string, std::string > & params = {} +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1265. + +*** + +### RegistryBrands + +**Modifiers:** `inline` + +#### Signature + +```cpp +void RegistryBrands(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1257. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1254. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/registry-campaigns/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/registry-campaigns/index.mdx new file mode 100644 index 0000000000..74d5d425c3 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/registry-campaigns/index.mdx @@ -0,0 +1,200 @@ +--- +slug: "/reference/cpp/signalwire/rest/rest-client/registry-campaigns" +title: "RegistryCampaigns" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::RegistryCampaigns" + parent: "signalwire::rest::RestClient" + module: "signalwire.rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `RegistryCampaigns` + +## Signature + +```cpp +struct signalwire::rest::RestClient::RegistryCampaigns +``` + +## Properties + + + + + +## Methods + +### create\_order + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json create_order(const std::string & campaign_id, const json & data) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1293. + +*** + +### get + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json get(const std::string & campaign_id) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1278. + +*** + +### list\_numbers + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list_numbers( + const std::string & campaign_id, + const std::map< std::string, std::string > & params = {} +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1285. + +*** + +### list\_orders + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list_orders( + const std::string & campaign_id, + const std::map< std::string, std::string > & params = {} +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1289. + +*** + +### RegistryCampaigns + +**Modifiers:** `inline` + +#### Signature + +```cpp +void RegistryCampaigns(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1277. + +*** + +### update + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json update(const std::string & campaign_id, const json & data) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1282. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1274. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/registry-namespace/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/registry-namespace/index.mdx new file mode 100644 index 0000000000..1ef3100cbf --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/registry-namespace/index.mdx @@ -0,0 +1,60 @@ +--- +slug: "/reference/cpp/signalwire/rest/rest-client/registry-namespace" +title: "RegistryNamespace" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::RegistryNamespace" + parent: "signalwire::rest::RestClient" + module: "signalwire.rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `RegistryNamespace` + +## Signature + +```cpp +struct signalwire::rest::RestClient::RegistryNamespace +``` + +## Properties + + + + + + + + + +## Methods + +### RegistryNamespace + +**Modifiers:** `inline` + +#### Signature + +```cpp +void RegistryNamespace(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1321. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1316. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/registry-numbers/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/registry-numbers/index.mdx new file mode 100644 index 0000000000..e37ef1bad0 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/registry-numbers/index.mdx @@ -0,0 +1,56 @@ +--- +slug: "/reference/cpp/signalwire/rest/rest-client/registry-numbers" +title: "RegistryNumbers" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::RegistryNumbers" + parent: "signalwire::rest::RestClient" + module: "signalwire.rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `RegistryNumbers` + +## Signature + +```cpp +struct signalwire::rest::RestClient::RegistryNumbers +``` + +## Properties + + + + + +## Methods + +### RegistryNumbers + +**Modifiers:** `inline` + +#### Signature + +```cpp +void RegistryNumbers(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1310. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1307. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/registry-orders/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/registry-orders/index.mdx new file mode 100644 index 0000000000..87b2a683f0 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/registry-orders/index.mdx @@ -0,0 +1,82 @@ +--- +slug: "/reference/cpp/signalwire/rest/rest-client/registry-orders" +title: "RegistryOrders" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::RegistryOrders" + parent: "signalwire::rest::RestClient" + module: "signalwire.rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `RegistryOrders` + +## Signature + +```cpp +struct signalwire::rest::RestClient::RegistryOrders +``` + +## Properties + + + + + +## Methods + +### get + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json get(const std::string & order_id) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1302. + +*** + +### RegistryOrders + +**Modifiers:** `inline` + +#### Signature + +```cpp +void RegistryOrders(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1301. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1298. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/short-codes-namespace/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/short-codes-namespace/index.mdx new file mode 100644 index 0000000000..b3457e01c5 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/short-codes-namespace/index.mdx @@ -0,0 +1,82 @@ +--- +slug: "/reference/cpp/signalwire/rest/rest-client/short-codes-namespace" +title: "ShortCodesNamespace" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::ShortCodesNamespace" + parent: "signalwire::rest::RestClient" + module: "signalwire.rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `ShortCodesNamespace` + +## Signature + +```cpp +struct signalwire::rest::RestClient::ShortCodesNamespace : signalwire::rest::CrudResource +``` + +## Inheritance + +**Extends:** [signalwire::rest::CrudResource](/docs/sdk-reference/reference/cpp/signalwire/rest/crud-resource) + +## Methods + +### ShortCodesNamespace + +**Modifiers:** `inline` + +#### Signature + +```cpp +void ShortCodesNamespace(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1216. + +*** + +### update + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json update(const std::string & id, const json & data) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1218. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1215. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/sip-profile-namespace/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/sip-profile-namespace/index.mdx new file mode 100644 index 0000000000..a91705dfcd --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/sip-profile-namespace/index.mdx @@ -0,0 +1,102 @@ +--- +slug: "/reference/cpp/signalwire/rest/rest-client/sip-profile-namespace" +title: "SipProfileNamespace" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::SipProfileNamespace" + parent: "signalwire::rest::RestClient" + module: "signalwire.rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `SipProfileNamespace` + +## Signature + +```cpp +struct signalwire::rest::RestClient::SipProfileNamespace : signalwire::rest::CrudResource +``` + +## Inheritance + +**Extends:** [signalwire::rest::CrudResource](/docs/sdk-reference/reference/cpp/signalwire/rest/crud-resource) + +## Methods + +### get + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json get() const +``` + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1205. + +*** + +### SipProfileNamespace + +**Modifiers:** `inline` + +#### Signature + +```cpp +void SipProfileNamespace(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1204. + +*** + +### update + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json update(const json & data) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1206. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1203. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/verified-callers-namespace/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/verified-callers-namespace/index.mdx new file mode 100644 index 0000000000..362339b426 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/verified-callers-namespace/index.mdx @@ -0,0 +1,54 @@ +--- +slug: "/reference/cpp/signalwire/rest/rest-client/verified-callers-namespace" +title: "VerifiedCallersNamespace" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::VerifiedCallersNamespace" + parent: "signalwire::rest::RestClient" + module: "signalwire.rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `VerifiedCallersNamespace` + +## Signature + +```cpp +struct signalwire::rest::RestClient::VerifiedCallersNamespace : signalwire::rest::CrudResource +``` + +## Inheritance + +**Extends:** [signalwire::rest::CrudResource](/docs/sdk-reference/reference/cpp/signalwire/rest/crud-resource) + +## Methods + +### VerifiedCallersNamespace + +**Modifiers:** `inline` + +#### Signature + +```cpp +void VerifiedCallersNamespace(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1198. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1197. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/video-conference-tokens/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/video-conference-tokens/index.mdx new file mode 100644 index 0000000000..a10c1dd1b4 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/video-conference-tokens/index.mdx @@ -0,0 +1,108 @@ +--- +slug: "/reference/cpp/signalwire/rest/rest-client/video-conference-tokens" +title: "VideoConferenceTokens" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::VideoConferenceTokens" + parent: "signalwire::rest::RestClient" + module: "signalwire.rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `VideoConferenceTokens` + +## Signature + +```cpp +struct signalwire::rest::RestClient::VideoConferenceTokens +``` + +## Properties + + + + + +## Methods + +### get + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json get(const std::string & token_id) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 747. + +*** + +### reset + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json reset(const std::string & token_id) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 750. + +*** + +### VideoConferenceTokens + +**Modifiers:** `inline` + +#### Signature + +```cpp +void VideoConferenceTokens(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 746. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 743. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/video-conferences/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/video-conferences/index.mdx new file mode 100644 index 0000000000..4642b180c8 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/video-conferences/index.mdx @@ -0,0 +1,172 @@ +--- +slug: "/reference/cpp/signalwire/rest/rest-client/video-conferences" +title: "VideoConferences" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::VideoConferences" + parent: "signalwire::rest::RestClient" + module: "signalwire.rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `VideoConferences` + +## Signature + +```cpp +struct signalwire::rest::RestClient::VideoConferences : signalwire::rest::CrudResource +``` + +## Inheritance + +**Extends:** [signalwire::rest::CrudResource](/docs/sdk-reference/reference/cpp/signalwire/rest/crud-resource) + +## Methods + +### create\_stream + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json create_stream(const std::string & conf_id, const json & data) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 738. + +*** + +### list\_conference\_tokens + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list_conference_tokens( + const std::string & conf_id, + const std::map< std::string, std::string > & params = {} +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 730. + +*** + +### list\_streams + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list_streams( + const std::string & conf_id, + const std::map< std::string, std::string > & params = {} +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 734. + +*** + +### update + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json update(const std::string & conf_id, const json & data) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 727. + +*** + +### VideoConferences + +**Modifiers:** `inline` + +#### Signature + +```cpp +void VideoConferences(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 724. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 723. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/video-namespace/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/video-namespace/index.mdx new file mode 100644 index 0000000000..3145ecfe6f --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/video-namespace/index.mdx @@ -0,0 +1,68 @@ +--- +slug: "/reference/cpp/signalwire/rest/rest-client/video-namespace" +title: "VideoNamespace" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::VideoNamespace" + parent: "signalwire::rest::RestClient" + module: "signalwire.rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `VideoNamespace` + +## Signature + +```cpp +struct signalwire::rest::RestClient::VideoNamespace +``` + +## Properties + + + + + + + + + + + + + + + + + +## Methods + +### VideoNamespace + +**Modifiers:** `inline` + +#### Signature + +```cpp +void VideoNamespace(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 785. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 771. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/video-room-recordings/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/video-room-recordings/index.mdx new file mode 100644 index 0000000000..d6e03eecac --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/video-room-recordings/index.mdx @@ -0,0 +1,139 @@ +--- +slug: "/reference/cpp/signalwire/rest/rest-client/video-room-recordings" +title: "VideoRoomRecordings" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::VideoRoomRecordings" + parent: "signalwire::rest::RestClient" + module: "signalwire.rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `VideoRoomRecordings` + +## Signature + +```cpp +struct signalwire::rest::RestClient::VideoRoomRecordings +``` + +## Properties + + + + + +## Methods + +### get + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json get(const std::string & recording_id) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 711. + +*** + +### list + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list(const std::map< std::string, std::string > & params = {}) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 708. + +*** + +### list\_events + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list_events( + const std::string & recording_id, + const std::map< std::string, std::string > & params = {} +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 717. + +*** + +### VideoRoomRecordings + +**Modifiers:** `inline` + +#### Signature + +```cpp +void VideoRoomRecordings(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 707. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 704. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/video-room-sessions/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/video-room-sessions/index.mdx new file mode 100644 index 0000000000..beb8c65a02 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/video-room-sessions/index.mdx @@ -0,0 +1,201 @@ +--- +slug: "/reference/cpp/signalwire/rest/rest-client/video-room-sessions" +title: "VideoRoomSessions" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::VideoRoomSessions" + parent: "signalwire::rest::RestClient" + module: "signalwire.rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `VideoRoomSessions` + +## Signature + +```cpp +struct signalwire::rest::RestClient::VideoRoomSessions +``` + +## Properties + + + + + +## Methods + +### get + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json get(const std::string & session_id) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 687. + +*** + +### list + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list(const std::map< std::string, std::string > & params = {}) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 684. + +*** + +### list\_events + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list_events( + const std::string & session_id, + const std::map< std::string, std::string > & params = {} +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 690. + +*** + +### list\_members + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list_members( + const std::string & session_id, + const std::map< std::string, std::string > & params = {} +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 694. + +*** + +### list\_recordings + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list_recordings( + const std::string & session_id, + const std::map< std::string, std::string > & params = {} +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 698. + +*** + +### VideoRoomSessions + +**Modifiers:** `inline` + +#### Signature + +```cpp +void VideoRoomSessions(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 683. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 680. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/video-room-tokens/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/video-room-tokens/index.mdx new file mode 100644 index 0000000000..bbf329c49e --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/video-room-tokens/index.mdx @@ -0,0 +1,82 @@ +--- +slug: "/reference/cpp/signalwire/rest/rest-client/video-room-tokens" +title: "VideoRoomTokens" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::VideoRoomTokens" + parent: "signalwire::rest::RestClient" + module: "signalwire.rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `VideoRoomTokens` + +## Signature + +```cpp +struct signalwire::rest::RestClient::VideoRoomTokens +``` + +## Properties + + + + + +## Methods + +### create + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json create(const json & data) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 677. + +*** + +### VideoRoomTokens + +**Modifiers:** `inline` + +#### Signature + +```cpp +void VideoRoomTokens(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 676. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 673. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/video-rooms/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/video-rooms/index.mdx new file mode 100644 index 0000000000..b7bc6bf5ce --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/video-rooms/index.mdx @@ -0,0 +1,141 @@ +--- +slug: "/reference/cpp/signalwire/rest/rest-client/video-rooms" +title: "VideoRooms" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::VideoRooms" + parent: "signalwire::rest::RestClient" + module: "signalwire.rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `VideoRooms` + +## Signature + +```cpp +struct signalwire::rest::RestClient::VideoRooms : signalwire::rest::CrudResource +``` + +## Inheritance + +**Extends:** [signalwire::rest::CrudResource](/docs/sdk-reference/reference/cpp/signalwire/rest/crud-resource) + +## Methods + +### create\_stream + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json create_stream(const std::string & room_id, const json & data) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 668. + +*** + +### list\_streams + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list_streams( + const std::string & room_id, + const std::map< std::string, std::string > & params = {} +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 664. + +*** + +### update + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json update(const std::string & room_id, const json & data) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 661. + +*** + +### VideoRooms + +**Modifiers:** `inline` + +#### Signature + +```cpp +void VideoRooms(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 659. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 658. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/video-streams/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/video-streams/index.mdx new file mode 100644 index 0000000000..096b9f0330 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/video-streams/index.mdx @@ -0,0 +1,110 @@ +--- +slug: "/reference/cpp/signalwire/rest/rest-client/video-streams" +title: "VideoStreams" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::VideoStreams" + parent: "signalwire::rest::RestClient" + module: "signalwire.rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `VideoStreams` + +## Signature + +```cpp +struct signalwire::rest::RestClient::VideoStreams +``` + +## Properties + + + + + +## Methods + +### get + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json get(const std::string & stream_id) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 759. + +*** + +### update + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json update(const std::string & stream_id, const json & data) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 763. + +*** + +### VideoStreams + +**Modifiers:** `inline` + +#### Signature + +```cpp +void VideoStreams(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 758. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 755. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/signal-wire-rest-error/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/signal-wire-rest-error/index.mdx new file mode 100644 index 0000000000..5530d3da75 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/rest/signal-wire-rest-error/index.mdx @@ -0,0 +1,108 @@ +--- +slug: "/reference/cpp/signalwire/rest/signal-wire-rest-error" +title: "SignalWireRestError" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::SignalWireRestError" + parent: "signalwire::rest" + module: "signalwire.rest" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp" + visibility: "public" +--- +# `SignalWireRestError` + +Error thrown on non-2xx REST API responses. + +## Signature + +```cpp +class signalwire::rest::SignalWireRestError : std::runtime_error +``` + +## Inheritance + +**Extends:** `std::runtime_error` + +## Methods + +### body + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::string & body() const +``` + +#### Returns + +`const std::string &` + +#### Source + +[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) + +Line 24. + +*** + +### SignalWireRestError + +**Modifiers:** `inline` + +#### Signature + +```cpp +void SignalWireRestError( + int status, + const std::string & message, + const std::string & body = "" +) +``` + +#### Parameters + + + + + + + +#### Source + +[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) + +Line 21. + +*** + +### status + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +int status() const +``` + +#### Returns + +`int` + +#### Source + +[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) + +Line 23. + +## Source + +[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) + +Line 19. diff --git a/fern/products/sdk-reference/cpp/signalwire/security/index.mdx b/fern/products/sdk-reference/cpp/signalwire/security/index.mdx new file mode 100644 index 0000000000..1278fe7dab --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/security/index.mdx @@ -0,0 +1,283 @@ +--- +slug: "/reference/cpp/signalwire/security" +title: "security" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "module" + language: "cpp" + qualified_name: "signalwire::security" + parent: "signalwire" + module: "signalwire" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/security/session_manager.hpp" +--- +# `security` + +## Signature + +```cpp +namespace signalwire::security +``` + +## Classes + + + + Manages HMAC-SHA256 based session tokens for secure SWAIG tool calls. Token format: base64(functionName:callID:expiryTimestamp) + "." + hex(hmac\_signature) + + + + Optional knobs for WrapWithSignatureValidation. trust\_proxy controls whether X-Forwarded-Proto / X-Forwarded-Host headers are honored when reconstructing the public URL — opt-in because proxy headers are spoofable. proxy\_url\_base is consulted before the proxy headers and is meant for SWML\_PROXY\_URL\_BASE callers. + + + +## Functions + +### ValidateRequest + +Legacy @signalwire/compatibility-api drop-in entry point. +If params\_or\_raw\_body holds a std::string, delegates to ValidateWebhookSignature (Scheme A then Scheme B with parsed form). +If it holds a FormParams, treats it as pre-parsed form params and runs Scheme B directly (with URL port normalization). + +std::invalid\_argument + +when signing\_key is empty. + +#### Signature + +```cpp +bool ValidateRequest( + std::string_view signing_key, + std::string_view signature, + std::string_view url, + const ParamsOrBody & params_or_raw_body +) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`bool` + +#### Throws + +- `std::invalid_argument` — when signing\_key is empty. + +#### Source + +[`src/security/webhook_validator.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/security/webhook_validator.cpp) + +Line 457. + +*** + +### ValidateWebhookSignature + +Validate a SignalWire webhook signature against both schemes. +Tries Scheme A (hex JSON) first; on miss falls back to Scheme B (base64 form) with URL port normalization, repeated-key handling, and optional ?bodySHA256= body-hash check for JSON bodies on the compat surface. + +signing\_key + +The customer's Signing Key. UTF-8 string. MUST NOT be empty — empty throws std::invalid\_argument, that's a programming error not a validation failure. + +signature + +The X-SignalWire-Signature header value (or the legacy X-Twilio-Signature alias). Empty returns false without throwing. + +url + +Full URL SignalWire POSTed to (scheme, host, optional port, path, query) — must match what the platform saw, see the URL-reconstruction section of porting-sdk/webhooks.md. + +raw\_body + +Raw request body bytes as a UTF-8 string, BEFORE any JSON / form parsing. Re-serialized JSON breaks Scheme A. + +true if either scheme matches; false otherwise. + +std::invalid\_argument + +when signing\_key is empty. + +#### Signature + +```cpp +bool ValidateWebhookSignature( + std::string_view signing_key, + std::string_view signature, + std::string_view url, + std::string_view raw_body +) +``` + +#### Parameters + + + The customer's Signing Key. UTF-8 string. MUST NOT be empty — empty throws std::invalid\_argument, that's a programming error not a validation failure. + + + + The X-SignalWire-Signature header value (or the legacy X-Twilio-Signature alias). Empty returns false without throwing. + + + + Full URL SignalWire POSTed to (scheme, host, optional port, path, query) — must match what the platform saw, see the URL-reconstruction section of porting-sdk/webhooks.md. + + + + Raw request body bytes as a UTF-8 string, BEFORE any JSON / form parsing. Re-serialized JSON breaks Scheme A. + + +#### Returns + +`bool` — true if either scheme matches; false otherwise. + +#### Throws + +- `std::invalid_argument` — when signing\_key is empty. + +#### Source + +[`src/security/webhook_validator.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/security/webhook_validator.cpp) + +Line 406. + +*** + +### WrapWithSignatureValidation + +Wrap a downstream cpp-httplib POST handler with SignalWire webhook signature validation. +Behavior: + +Read req.body (cpp-httplib has already buffered it). +Pull X-SignalWire-Signature (or the X-Twilio-Signature legacy alias) from headers. +Reconstruct the public URL the platform POSTed to (proxy-aware). +Call ValidateWebhookSignature. +On invalid / missing signature: respond 403 Forbidden with no body detail. The downstream handler is NOT called. Per the porting-sdk spec, the validator MUST NOT log which branch failed or the expected signature. +On valid: call downstream(req, res). The handler can read req.body directly — cpp-httplib buffers it for repeat reads. + +signing\_key + +Customer's Signing Key (SignalWire Dashboard → API Credentials). MUST NOT be empty — empty throws std::invalid\_argument at wrap time, that's a programming error not a runtime failure. + +downstream + +Handler to invoke on a valid signature. + +opts + +Optional URL reconstruction knobs. + +A handler suitable for server.Post(path, handler). + +std::invalid\_argument + +if signing\_key is empty. + +#### Signature + +```cpp +HttpHandler WrapWithSignatureValidation( + std::string_view signing_key, + HttpHandler downstream, + WebhookValidatorOptions opts = {} +) +``` + +#### Parameters + + + Customer's Signing Key (SignalWire Dashboard → API Credentials). MUST NOT be empty — empty throws std::invalid\_argument at wrap time, that's a programming error not a runtime failure. + + + + Handler to invoke on a valid signature. + + + + Optional URL reconstruction knobs. + + +#### Returns + +`HttpHandler` — A handler suitable for server.Post(path, handler). + +#### Throws + +- `std::invalid_argument` — if signing\_key is empty. + +#### Source + +[`src/security/webhook_middleware.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/security/webhook_middleware.cpp) + +Line 107. + +## Type Aliases + +### FormParams + +Pre-parsed form parameters for ValidateRequest: ordered list of (key, list-of-values) tuples. Repeated keys are represented as one entry whose values vector holds each occurrence in submission order. +Used as one alternative in ParamsOrBody; the other alternative is the raw body string. + +#### Signature + +```cpp +typedef std::vector< std::pair< std::string, std::vector< std::string > > > FormParams +``` + +#### Source + +[`include/signalwire/security/webhook_validator.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/security/webhook_validator.hpp) + +Line 32. + +*** + +### HttpHandler + +A cpp-httplib handler signature, lifted into a typedef so the adapter stays framework-agnostic at the call site (the only deps needed by this header are a forward declaration of httplib::Request/Response). + +#### Signature + +```cpp +typedef std::function< void(const httplib::Request &, httplib::Response &)> HttpHandler +``` + +#### Source + +[`include/signalwire/security/webhook_middleware.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/security/webhook_middleware.hpp) + +Line 19. + +*** + +### ParamsOrBody + +Drop-in shape for ValidateRequest mirroring @signalwire/compatibility-api's RestClient.validateRequest: either a raw body string (delegates to the combined validator) or a pre-parsed form-params list (runs Scheme B directly). + +#### Signature + +```cpp +typedef std::variant< std::string, FormParams > ParamsOrBody +``` + +#### Source + +[`include/signalwire/security/webhook_validator.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/security/webhook_validator.hpp) + +Line 38. + +## Source + +[`include/signalwire/security/session_manager.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/security/session_manager.hpp) + +Line 10. diff --git a/fern/products/sdk-reference/cpp/signalwire/security/session-manager/index.mdx b/fern/products/sdk-reference/cpp/signalwire/security/session-manager/index.mdx new file mode 100644 index 0000000000..34297167e2 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/security/session-manager/index.mdx @@ -0,0 +1,207 @@ +--- +slug: "/reference/cpp/signalwire/security/session-manager" +title: "SessionManager" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::security::SessionManager" + parent: "signalwire::security" + module: "signalwire.security" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/security/session_manager.hpp" + visibility: "public" +--- +# `SessionManager` + +Manages HMAC-SHA256 based session tokens for secure SWAIG tool calls. +Token format: base64(functionName:callID:expiryTimestamp) + "." + hex(hmac\_signature) + +## Signature + +```cpp +class signalwire::security::SessionManager +``` + +## Methods + +### create\_token + +Create a signed token for a function call + +function\_name + +The SWAIG function name + +call\_id + +The call identifier + +expiry\_seconds + +Seconds until expiry (default 3600) + +The signed token string + +**Modifiers:** `const` + +#### Signature + +```cpp +std::string create_token( + const std::string & function_name, + const std::string & call_id, + int expiry_seconds = 3600 +) const +``` + +#### Parameters + + + The SWAIG function name + + + + The call identifier + + + + Seconds until expiry (default 3600) + + +#### Returns + +`std::string` — The signed token string + +#### Source + +[`include/signalwire/security/session_manager.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/security/session_manager.hpp) + +Line 28. + +*** + +### SessionManager + +Construct with a random 32-byte secret. + +#### Signature + + + + ```cpp + void SessionManager() + ``` + + + + ```cpp + void SessionManager(const std::vector< uint8_t > & secret) + ``` + + + +#### Parameters (Overload 2) + + + +#### Source + +[`include/signalwire/security/session_manager.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/security/session_manager.hpp) + +Line 18. + +*** + +### timing\_safe\_compare + +Timing-safe comparison of two byte sequences. + +**Modifiers:** `static` + +#### Signature + +```cpp +bool timing_safe_compare(const std::string & a, const std::string & b) +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/security/session_manager.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/security/session_manager.hpp) + +Line 47. + +*** + +### validate\_token + +Validate a token + +token + +The token to validate + +function\_name + +Expected function name + +call\_id + +Expected call ID + +true if token is valid and not expired + +All three params are consumed read-only (parsed/compared, never stored), so they take std::string\_view — consistent with the webhook\_validator entry points in this module. \[\[nodiscard]]: the validity result is the reason to call it. + +**Modifiers:** `const` + +#### Signature + +```cpp +bool validate_token( + std::string_view token, + std::string_view function_name, + std::string_view call_id +) const +``` + +#### Parameters + + + The token to validate + + + + Expected function name + + + + Expected call ID + + +#### Returns + +`bool` — true if token is valid and not expired + +#### Source + +[`include/signalwire/security/session_manager.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/security/session_manager.hpp) + +Line 42. + +## Source + +[`include/signalwire/security/session_manager.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/security/session_manager.hpp) + +Line 15. diff --git a/fern/products/sdk-reference/cpp/signalwire/security/webhook-validator-options/index.mdx b/fern/products/sdk-reference/cpp/signalwire/security/webhook-validator-options/index.mdx new file mode 100644 index 0000000000..c26f57be45 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/security/webhook-validator-options/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/cpp/signalwire/security/webhook-validator-options" +title: "WebhookValidatorOptions" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::security::WebhookValidatorOptions" + parent: "signalwire::security" + module: "signalwire.security" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/security/webhook_middleware.hpp" + visibility: "public" +--- +# `WebhookValidatorOptions` + +Optional knobs for WrapWithSignatureValidation. trust\_proxy controls whether X-Forwarded-Proto / X-Forwarded-Host headers are honored when reconstructing the public URL — opt-in because proxy headers are spoofable. proxy\_url\_base is consulted before the proxy headers and is meant for SWML\_PROXY\_URL\_BASE callers. + +## Signature + +```cpp +struct signalwire::security::WebhookValidatorOptions +``` + +## Properties + + + Optional base URL (e.g. https://abcd.ngrok.io) joined with the request path + query when reconstructing the URL. Wins over proxy headers and request.host. + + + + If true, honor X-Forwarded-Proto / X-Forwarded-Host when reconstructing the URL. Default false. + + +## Source + +[`include/signalwire/security/webhook_middleware.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/security/webhook_middleware.hpp) + +Line 26. diff --git a/fern/products/sdk-reference/cpp/signalwire/server/agent-server/index.mdx b/fern/products/sdk-reference/cpp/signalwire/server/agent-server/index.mdx new file mode 100644 index 0000000000..ad793e4d5a --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/server/agent-server/index.mdx @@ -0,0 +1,270 @@ +--- +slug: "/reference/cpp/signalwire/server/agent-server" +title: "AgentServer" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::server::AgentServer" + parent: "signalwire::server" + module: "signalwire.server" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/server/agent_server.hpp" + visibility: "public" +--- +# `AgentServer` + +Multi-agent hosting server. + +## Signature + +```cpp +class signalwire::server::AgentServer +``` + +## Methods + +### ~AgentServer + +#### Signature + +```cpp +void ~AgentServer() +``` + +#### Source + +[`include/signalwire/server/agent_server.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/server/agent_server.hpp) + +Line 25. + +*** + +### AgentServer + +**Modifiers:** `explicit` + +#### Signature + +```cpp +void AgentServer(const std::string & host = "0.0.0.0", int port = 3000) +``` + +#### Parameters + + + + + +#### Source + +[`include/signalwire/server/agent_server.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/server/agent_server.hpp) + +Line 24. + +*** + +### enable\_sip\_routing + +Enable SIP routing. + +#### Signature + +```cpp +AgentServer & enable_sip_routing(bool enable = true) +``` + +#### Parameters + + + +#### Returns + +`AgentServer &` + +#### Source + +[`include/signalwire/server/agent_server.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/server/agent_server.hpp) + +Line 37. + +*** + +### list\_routes + +List registered routes. + +**Modifiers:** `const` + +#### Signature + +```cpp +std::vector< std::string > list_routes() const +``` + +#### Returns + +`std::vector< std::string >` + +#### Source + +[`include/signalwire/server/agent_server.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/server/agent_server.hpp) + +Line 34. + +*** + +### map\_sip\_username + +Map a SIP username to an agent route. + +#### Signature + +```cpp +AgentServer & map_sip_username( + const std::string & username, + const std::string & route +) +``` + +#### Parameters + + + + + +#### Returns + +`AgentServer &` + +#### Source + +[`include/signalwire/server/agent_server.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/server/agent_server.hpp) + +Line 40. + +*** + +### register\_agent + +Register an agent at a specific route. + +#### Signature + +```cpp +AgentServer & register_agent( + std::shared_ptr< agent::AgentBase > agent, + const std::string & route +) +``` + +#### Parameters + + + + + +#### Returns + +`AgentServer &` + +#### Source + +[`include/signalwire/server/agent_server.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/server/agent_server.hpp) + +Line 28. + +*** + +### run + +Start the server (blocking). + +#### Signature + +```cpp +void run() +``` + +#### Source + +[`include/signalwire/server/agent_server.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/server/agent_server.hpp) + +Line 46. + +*** + +### set\_static\_dir + +Enable static file serving from a directory. + +#### Signature + +```cpp +AgentServer & set_static_dir(const std::string & dir) +``` + +#### Parameters + + + +#### Returns + +`AgentServer &` + +#### Source + +[`include/signalwire/server/agent_server.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/server/agent_server.hpp) + +Line 43. + +*** + +### stop + +Stop the server. + +#### Signature + +```cpp +void stop() +``` + +#### Source + +[`include/signalwire/server/agent_server.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/server/agent_server.hpp) + +Line 49. + +*** + +### unregister\_agent + +Unregister an agent by route. + +#### Signature + +```cpp +AgentServer & unregister_agent(const std::string & route) +``` + +#### Parameters + + + +#### Returns + +`AgentServer &` + +#### Source + +[`include/signalwire/server/agent_server.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/server/agent_server.hpp) + +Line 31. + +## Source + +[`include/signalwire/server/agent_server.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/server/agent_server.hpp) + +Line 22. diff --git a/fern/products/sdk-reference/cpp/signalwire/server/index.mdx b/fern/products/sdk-reference/cpp/signalwire/server/index.mdx new file mode 100644 index 0000000000..093499ab74 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/server/index.mdx @@ -0,0 +1,107 @@ +--- +slug: "/reference/cpp/signalwire/server" +title: "server" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "module" + language: "cpp" + qualified_name: "signalwire::server" + parent: "signalwire" + module: "signalwire" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp" +--- +# `server` + +## Signature + +```cpp +namespace signalwire::server +``` + +## Classes + + + + Multi-agent hosting server. + + + + Resolved TLS configuration for an in-process HTTP server. + + + +## Functions + +### make\_http\_server + +Construct the httplib server for the given config. When cfg.usable(), an SSLServer (TLS termination in-process) is returned upcast to Server\*; otherwise a plain Server. Returns nullptr only on allocation failure. When an SSLServer is requested but its cert/key fail to load, the returned server's is\_valid() is false — callers log and refuse to listen, the same failure mode as a bad bind. + +**Modifiers:** `inline` + +#### Signature + +```cpp +std::unique_ptr< httplib::Server > make_http_server(const TlsServerConfig & cfg) +``` + +#### Parameters + + + +#### Returns + +`std::unique_ptr< httplib::Server >` + +#### Source + +[`src/server/tls_server.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/server/tls_server.hpp) + +Line 60. + +*** + +### resolve\_tls\_config\_from\_env + +Resolve TLS config from the SWML\_SSL\_\* environment variables, mirroring signalwire-python's SecurityConfig.load\_from\_env(). Returns enabled=false when SWML\_SSL\_ENABLED is unset/false. + +**Modifiers:** `inline` + +#### Signature + +```cpp +TlsServerConfig resolve_tls_config_from_env() +``` + +#### Returns + +`TlsServerConfig` + +#### Source + +[`src/server/tls_server.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/server/tls_server.hpp) + +Line 44. + +## Type Aliases + +### json + +#### Signature + +```cpp +typedef nlohmann::json json +``` + +#### Source + +[`include/signalwire/server/agent_server.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/server/agent_server.hpp) + +Line 19. + +## Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 29. diff --git a/fern/products/sdk-reference/cpp/signalwire/server/tls-server-config/index.mdx b/fern/products/sdk-reference/cpp/signalwire/server/tls-server-config/index.mdx new file mode 100644 index 0000000000..0b83721637 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/server/tls-server-config/index.mdx @@ -0,0 +1,62 @@ +--- +slug: "/reference/cpp/signalwire/server/tls-server-config" +title: "TlsServerConfig" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::server::TlsServerConfig" + parent: "signalwire::server" + module: "signalwire.server" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/server/tls_server.hpp" + visibility: "public" +--- +# `TlsServerConfig` + +Resolved TLS configuration for an in-process HTTP server. + +## Signature + +```cpp +struct signalwire::server::TlsServerConfig +``` + +## Properties + + + + + + + +## Methods + +### usable + +True only when TLS is enabled AND both cert + key paths are present. + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +bool usable() const +``` + +#### Returns + +`bool` + +#### Source + +[`src/server/tls_server.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/server/tls_server.hpp) + +Line 36. + +## Source + +[`src/server/tls_server.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/server/tls_server.hpp) + +Line 30. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/api-ninjas-trivia-skill-r/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/api-ninjas-trivia-skill-r/index.mdx new file mode 100644 index 0000000000..ce2c63fe12 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/skills/api-ninjas-trivia-skill-r/index.mdx @@ -0,0 +1,174 @@ +--- +slug: "/reference/cpp/signalwire/skills/api-ninjas-trivia-skill-r" +title: "ApiNinjasTriviaSkillR" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::ApiNinjasTriviaSkillR" + parent: "signalwire::skills" + module: "signalwire.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp" + visibility: "public" +--- +# `ApiNinjasTriviaSkillR` + +## Signature + +```cpp +class signalwire::skills::ApiNinjasTriviaSkillR : signalwire::skills::SkillBase +``` + +## Inheritance + +**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base) + +## Methods + +### get\_datamap\_functions + +Get SWAIG DataMap functions (for DataMap-based skills). + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< json > get_datamap_functions() const +``` + +#### Returns + +`std::vector< json >` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 400. + +*** + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 400. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +bool setup(const json & params) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 400. + +*** + +### skill\_description + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_description() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 400. + +*** + +### skill\_name + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_name() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 400. + +*** + +### supports\_multiple\_instances + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +bool supports_multiple_instances() const +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 400. + +## Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 400. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/api-ninjas-trivia-skill/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/api-ninjas-trivia-skill/index.mdx new file mode 100644 index 0000000000..152654eb39 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/skills/api-ninjas-trivia-skill/index.mdx @@ -0,0 +1,174 @@ +--- +slug: "/reference/cpp/signalwire/skills/api-ninjas-trivia-skill" +title: "ApiNinjasTriviaSkill" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::ApiNinjasTriviaSkill" + parent: "signalwire::skills" + module: "signalwire.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/api_ninjas_trivia.cpp" + visibility: "public" +--- +# `ApiNinjasTriviaSkill` + +## Signature + +```cpp +class signalwire::skills::ApiNinjasTriviaSkill : signalwire::skills::SkillBase +``` + +## Inheritance + +**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base) + +## Methods + +### get\_datamap\_functions + +Get SWAIG DataMap functions (for DataMap-based skills). + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< json > get_datamap_functions() const +``` + +#### Returns + +`std::vector< json >` + +#### Source + +[`src/skills/builtin/api_ninjas_trivia.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/api_ninjas_trivia.cpp) + +Line 25. + +*** + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`src/skills/builtin/api_ninjas_trivia.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/api_ninjas_trivia.cpp) + +Line 23. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +bool setup(const json & params) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/api_ninjas_trivia.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/api_ninjas_trivia.cpp) + +Line 16. + +*** + +### skill\_description + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_description() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/api_ninjas_trivia.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/api_ninjas_trivia.cpp) + +Line 13. + +*** + +### skill\_name + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_name() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/api_ninjas_trivia.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/api_ninjas_trivia.cpp) + +Line 12. + +*** + +### supports\_multiple\_instances + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +bool supports_multiple_instances() const +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/api_ninjas_trivia.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/api_ninjas_trivia.cpp) + +Line 14. + +## Source + +[`src/skills/builtin/api_ninjas_trivia.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/api_ninjas_trivia.cpp) + +Line 10. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/claude-skills-skill-r/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/claude-skills-skill-r/index.mdx new file mode 100644 index 0000000000..b9786b8a71 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/skills/claude-skills-skill-r/index.mdx @@ -0,0 +1,150 @@ +--- +slug: "/reference/cpp/signalwire/skills/claude-skills-skill-r" +title: "ClaudeSkillsSkillR" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::ClaudeSkillsSkillR" + parent: "signalwire::skills" + module: "signalwire.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp" + visibility: "public" +--- +# `ClaudeSkillsSkillR` + +## Signature + +```cpp +class signalwire::skills::ClaudeSkillsSkillR : signalwire::skills::SkillBase +``` + +## Inheritance + +**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base) + +## Methods + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 406. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +bool setup(const json & params) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 406. + +*** + +### skill\_description + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_description() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 406. + +*** + +### skill\_name + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_name() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 406. + +*** + +### supports\_multiple\_instances + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +bool supports_multiple_instances() const +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 406. + +## Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 406. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/claude-skills-skill/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/claude-skills-skill/index.mdx new file mode 100644 index 0000000000..2db1d111ac --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/skills/claude-skills-skill/index.mdx @@ -0,0 +1,174 @@ +--- +slug: "/reference/cpp/signalwire/skills/claude-skills-skill" +title: "ClaudeSkillsSkill" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::ClaudeSkillsSkill" + parent: "signalwire::skills" + module: "signalwire.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/claude_skills.cpp" + visibility: "public" +--- +# `ClaudeSkillsSkill` + +## Signature + +```cpp +class signalwire::skills::ClaudeSkillsSkill : signalwire::skills::SkillBase +``` + +## Inheritance + +**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base) + +## Methods + +### get\_hints + +Get speech recognition hints to merge into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< std::string > get_hints() const +``` + +#### Returns + +`std::vector< std::string >` + +#### Source + +[`src/skills/builtin/claude_skills.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/claude_skills.cpp) + +Line 37. + +*** + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`src/skills/builtin/claude_skills.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/claude_skills.cpp) + +Line 22. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +bool setup(const json & params) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/claude_skills.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/claude_skills.cpp) + +Line 15. + +*** + +### skill\_description + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_description() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/claude_skills.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/claude_skills.cpp) + +Line 12. + +*** + +### skill\_name + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_name() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/claude_skills.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/claude_skills.cpp) + +Line 11. + +*** + +### supports\_multiple\_instances + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +bool supports_multiple_instances() const +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/claude_skills.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/claude_skills.cpp) + +Line 13. + +## Source + +[`src/skills/builtin/claude_skills.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/claude_skills.cpp) + +Line 9. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/custom-skills-skill-r/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/custom-skills-skill-r/index.mdx new file mode 100644 index 0000000000..4a3cbe9b10 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/skills/custom-skills-skill-r/index.mdx @@ -0,0 +1,150 @@ +--- +slug: "/reference/cpp/signalwire/skills/custom-skills-skill-r" +title: "CustomSkillsSkillR" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::CustomSkillsSkillR" + parent: "signalwire::skills" + module: "signalwire.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp" + visibility: "public" +--- +# `CustomSkillsSkillR` + +## Signature + +```cpp +class signalwire::skills::CustomSkillsSkillR : signalwire::skills::SkillBase +``` + +## Inheritance + +**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base) + +## Methods + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 410. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +bool setup(const json & params) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 410. + +*** + +### skill\_description + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_description() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 410. + +*** + +### skill\_name + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_name() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 410. + +*** + +### supports\_multiple\_instances + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +bool supports_multiple_instances() const +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 410. + +## Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 410. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/custom-skills-skill/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/custom-skills-skill/index.mdx new file mode 100644 index 0000000000..0d262ab848 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/skills/custom-skills-skill/index.mdx @@ -0,0 +1,150 @@ +--- +slug: "/reference/cpp/signalwire/skills/custom-skills-skill" +title: "CustomSkillsSkill" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::CustomSkillsSkill" + parent: "signalwire::skills" + module: "signalwire.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/custom_skills.cpp" + visibility: "public" +--- +# `CustomSkillsSkill` + +## Signature + +```cpp +class signalwire::skills::CustomSkillsSkill : signalwire::skills::SkillBase +``` + +## Inheritance + +**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base) + +## Methods + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`src/skills/builtin/custom_skills.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/custom_skills.cpp) + +Line 20. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +bool setup(const json & params) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/custom_skills.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/custom_skills.cpp) + +Line 15. + +*** + +### skill\_description + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_description() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/custom_skills.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/custom_skills.cpp) + +Line 12. + +*** + +### skill\_name + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_name() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/custom_skills.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/custom_skills.cpp) + +Line 11. + +*** + +### supports\_multiple\_instances + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +bool supports_multiple_instances() const +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/custom_skills.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/custom_skills.cpp) + +Line 13. + +## Source + +[`src/skills/builtin/custom_skills.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/custom_skills.cpp) + +Line 9. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/datasphere-serverless-skill-r/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/datasphere-serverless-skill-r/index.mdx new file mode 100644 index 0000000000..140f2bd9a2 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/skills/datasphere-serverless-skill-r/index.mdx @@ -0,0 +1,174 @@ +--- +slug: "/reference/cpp/signalwire/skills/datasphere-serverless-skill-r" +title: "DatasphereServerlessSkillR" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::DatasphereServerlessSkillR" + parent: "signalwire::skills" + module: "signalwire.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp" + visibility: "public" +--- +# `DatasphereServerlessSkillR` + +## Signature + +```cpp +class signalwire::skills::DatasphereServerlessSkillR : signalwire::skills::SkillBase +``` + +## Inheritance + +**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base) + +## Methods + +### get\_datamap\_functions + +Get SWAIG DataMap functions (for DataMap-based skills). + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< json > get_datamap_functions() const +``` + +#### Returns + +`std::vector< json >` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 394. + +*** + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 394. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +bool setup(const json & params) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 394. + +*** + +### skill\_description + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_description() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 394. + +*** + +### skill\_name + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_name() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 394. + +*** + +### supports\_multiple\_instances + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +bool supports_multiple_instances() const +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 394. + +## Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 394. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/datasphere-serverless-skill/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/datasphere-serverless-skill/index.mdx new file mode 100644 index 0000000000..5bb1d564a4 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/skills/datasphere-serverless-skill/index.mdx @@ -0,0 +1,222 @@ +--- +slug: "/reference/cpp/signalwire/skills/datasphere-serverless-skill" +title: "DatasphereServerlessSkill" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::DatasphereServerlessSkill" + parent: "signalwire::skills" + module: "signalwire.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datasphere_serverless.cpp" + visibility: "public" +--- +# `DatasphereServerlessSkill` + +## Signature + +```cpp +class signalwire::skills::DatasphereServerlessSkill : signalwire::skills::SkillBase +``` + +## Inheritance + +**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base) + +## Methods + +### get\_datamap\_functions + +Get SWAIG DataMap functions (for DataMap-based skills). + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< json > get_datamap_functions() const +``` + +#### Returns + +`std::vector< json >` + +#### Source + +[`src/skills/builtin/datasphere_serverless.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datasphere_serverless.cpp) + +Line 31. + +*** + +### get\_global\_data + +Get global data to merge into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +json get_global_data() const +``` + +#### Returns + +`json` + +#### Source + +[`src/skills/builtin/datasphere_serverless.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datasphere_serverless.cpp) + +Line 58. + +*** + +### get\_prompt\_sections + +Get prompt sections to inject into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< SkillPromptSection > get_prompt_sections() const +``` + +#### Returns + +`std::vector< SkillPromptSection >` + +#### Source + +[`src/skills/builtin/datasphere_serverless.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datasphere_serverless.cpp) + +Line 52. + +*** + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`src/skills/builtin/datasphere_serverless.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datasphere_serverless.cpp) + +Line 29. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +bool setup(const json & params) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/datasphere_serverless.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datasphere_serverless.cpp) + +Line 19. + +*** + +### skill\_description + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_description() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/datasphere_serverless.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datasphere_serverless.cpp) + +Line 14. + +*** + +### skill\_name + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_name() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/datasphere_serverless.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datasphere_serverless.cpp) + +Line 13. + +*** + +### supports\_multiple\_instances + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +bool supports_multiple_instances() const +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/datasphere_serverless.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datasphere_serverless.cpp) + +Line 17. + +## Source + +[`src/skills/builtin/datasphere_serverless.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datasphere_serverless.cpp) + +Line 11. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/datasphere-skill-r/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/datasphere-skill-r/index.mdx new file mode 100644 index 0000000000..316baf75c5 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/skills/datasphere-skill-r/index.mdx @@ -0,0 +1,174 @@ +--- +slug: "/reference/cpp/signalwire/skills/datasphere-skill-r" +title: "DatasphereSkillR" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::DatasphereSkillR" + parent: "signalwire::skills" + module: "signalwire.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp" + visibility: "public" +--- +# `DatasphereSkillR` + +## Signature + +```cpp +class signalwire::skills::DatasphereSkillR : signalwire::skills::SkillBase +``` + +## Inheritance + +**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base) + +## Methods + +### get\_global\_data + +Get global data to merge into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +json get_global_data() const +``` + +#### Returns + +`json` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 391. + +*** + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 333. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +bool setup(const json & params) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 321. + +*** + +### skill\_description + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_description() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 319. + +*** + +### skill\_name + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_name() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 318. + +*** + +### supports\_multiple\_instances + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +bool supports_multiple_instances() const +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 320. + +## Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 313. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/datasphere-skill/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/datasphere-skill/index.mdx new file mode 100644 index 0000000000..652e364789 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/skills/datasphere-skill/index.mdx @@ -0,0 +1,201 @@ +--- +slug: "/reference/cpp/signalwire/skills/datasphere-skill" +title: "DatasphereSkill" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::DatasphereSkill" + parent: "signalwire::skills" + module: "signalwire.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datasphere.cpp" + visibility: "public" +--- +# `DatasphereSkill` + +SignalWire DataSphere RAG search skill — issues a real POST against the DataSphere /api/datasphere/documents/\{document\_id\}/search endpoint with the user query in the JSON body, parses the results\[] array, and returns a flattened text summary. Matches the Python DatasphereSkill upstream-call shape. +DATASPHERE\_BASE\_URL env var overrides the upstream URL (used by audit\_skills\_dispatch.py); when unset, the real upstream is built from space\_name (https://\{space\}.signalwire.com). + +## Signature + +```cpp +class signalwire::skills::DatasphereSkill : signalwire::skills::SkillBase +``` + +## Inheritance + +**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base) + +## Methods + +### get\_global\_data + +Get global data to merge into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +json get_global_data() const +``` + +#### Returns + +`json` + +#### Source + +[`src/skills/builtin/datasphere.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datasphere.cpp) + +Line 106. + +*** + +### get\_prompt\_sections + +Get prompt sections to inject into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< SkillPromptSection > get_prompt_sections() const +``` + +#### Returns + +`std::vector< SkillPromptSection >` + +#### Source + +[`src/skills/builtin/datasphere.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datasphere.cpp) + +Line 99. + +*** + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`src/skills/builtin/datasphere.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datasphere.cpp) + +Line 42. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +bool setup(const json & params) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/datasphere.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datasphere.cpp) + +Line 30. + +*** + +### skill\_description + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_description() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/datasphere.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datasphere.cpp) + +Line 25. + +*** + +### skill\_name + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_name() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/datasphere.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datasphere.cpp) + +Line 24. + +*** + +### supports\_multiple\_instances + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +bool supports_multiple_instances() const +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/datasphere.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datasphere.cpp) + +Line 28. + +## Source + +[`src/skills/builtin/datasphere.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datasphere.cpp) + +Line 22. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/date-time-skill/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/date-time-skill/index.mdx new file mode 100644 index 0000000000..d48cad68e5 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/skills/date-time-skill/index.mdx @@ -0,0 +1,174 @@ +--- +slug: "/reference/cpp/signalwire/skills/date-time-skill" +title: "DateTimeSkill" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::DateTimeSkill" + parent: "signalwire::skills" + module: "signalwire.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datetime.cpp" + visibility: "public" +--- +# `DateTimeSkill` + +## Signature + +```cpp +class signalwire::skills::DateTimeSkill : signalwire::skills::SkillBase, signalwire::skills::SkillBase +``` + +## Inheritance + +**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base), [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base) + +## Methods + +### get\_prompt\_sections + +Get prompt sections to inject into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< SkillPromptSection > get_prompt_sections() const +``` + +#### Returns + +`std::vector< SkillPromptSection >` + +#### Source + +[`src/skills/builtin/datetime.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datetime.cpp) + +Line 74. + +*** + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`src/skills/builtin/datetime.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datetime.cpp) + +Line 24. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +bool setup(const json & params) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/datetime.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datetime.cpp) + +Line 19. + +*** + +### skill\_description + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_description() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/datetime.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datetime.cpp) + +Line 16. + +*** + +### skill\_name + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_name() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/datetime.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datetime.cpp) + +Line 15. + +*** + +### supports\_multiple\_instances + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +bool supports_multiple_instances() const +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/datetime.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datetime.cpp) + +Line 17. + +## Source + +[`src/skills/builtin/datetime.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datetime.cpp) + +Line 13. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/google-maps-skill-r/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/google-maps-skill-r/index.mdx new file mode 100644 index 0000000000..4daa7a8952 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/skills/google-maps-skill-r/index.mdx @@ -0,0 +1,152 @@ +--- +slug: "/reference/cpp/signalwire/skills/google-maps-skill-r" +title: "GoogleMapsSkillR" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::GoogleMapsSkillR" + parent: "signalwire::skills" + module: "signalwire.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp" + visibility: "public" +--- +# `GoogleMapsSkillR` + +## Signature + +```cpp +class signalwire::skills::GoogleMapsSkillR : signalwire::skills::SkillBase +``` + +## Inheritance + +**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base) + +## Methods + +### get\_hints + +Get speech recognition hints to merge into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< std::string > get_hints() const +``` + +#### Returns + +`std::vector< std::string >` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 243. + +*** + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 243. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +bool setup(const json & params) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 243. + +*** + +### skill\_description + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_description() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 243. + +*** + +### skill\_name + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_name() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 243. + +## Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 243. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/google-maps-skill/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/google-maps-skill/index.mdx new file mode 100644 index 0000000000..b30b2a8871 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/skills/google-maps-skill/index.mdx @@ -0,0 +1,176 @@ +--- +slug: "/reference/cpp/signalwire/skills/google-maps-skill" +title: "GoogleMapsSkill" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::GoogleMapsSkill" + parent: "signalwire::skills" + module: "signalwire.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/google_maps.cpp" + visibility: "public" +--- +# `GoogleMapsSkill` + +## Signature + +```cpp +class signalwire::skills::GoogleMapsSkill : signalwire::skills::SkillBase +``` + +## Inheritance + +**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base) + +## Methods + +### get\_hints + +Get speech recognition hints to merge into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< std::string > get_hints() const +``` + +#### Returns + +`std::vector< std::string >` + +#### Source + +[`src/skills/builtin/google_maps.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/google_maps.cpp) + +Line 53. + +*** + +### get\_prompt\_sections + +Get prompt sections to inject into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< SkillPromptSection > get_prompt_sections() const +``` + +#### Returns + +`std::vector< SkillPromptSection >` + +#### Source + +[`src/skills/builtin/google_maps.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/google_maps.cpp) + +Line 57. + +*** + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`src/skills/builtin/google_maps.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/google_maps.cpp) + +Line 24. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +bool setup(const json & params) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/google_maps.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/google_maps.cpp) + +Line 16. + +*** + +### skill\_description + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_description() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/google_maps.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/google_maps.cpp) + +Line 12. + +*** + +### skill\_name + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_name() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/google_maps.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/google_maps.cpp) + +Line 11. + +## Source + +[`src/skills/builtin/google_maps.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/google_maps.cpp) + +Line 9. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/index.mdx new file mode 100644 index 0000000000..fc1e4c2be2 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/skills/index.mdx @@ -0,0 +1,413 @@ +--- +slug: "/reference/cpp/signalwire/skills" +title: "skills" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "module" + language: "cpp" + qualified_name: "signalwire::skills" + parent: "signalwire" + module: "signalwire" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp" +--- +# `skills` + +## Signature + +```cpp +namespace signalwire::skills +``` + +## Classes + + + + + + + + + + + + + + + + + + + + SignalWire DataSphere RAG search skill — issues a real POST against the DataSphere /api/datasphere/documents/\{document\_id\}/search endpoint with the user query in the JSON body, parses the results\[] array, and returns a flattened text summary. Matches the Python DatasphereSkill upstream-call shape. DATASPHERE\_BASE\_URL env var overrides the upstream URL (used by audit\_skills\_dispatch.py); when unset, the real upstream is built from space\_name (https://\{space\}.signalwire.com). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Abstract base class for all skills. + + + + Result of a skill HTTP request. status is the HTTP status code (0 indicates a transport-level error — connection refused, DNS, etc.). body is the raw response body. error is non-empty when status is 0. + + + + Manages skill lifecycle: creation, setup, registration with agents. + + + + POM section for skill prompts. + + + + Global registry of skill factories. + + + + Spider scrape skill — issues a real GET against the URL the LLM passes in. Strips HTML tags from the response and returns the text payload. Matches Python SpiderSkill's scrape\_url behavior. SPIDER\_BASE\_URL env var overrides the host portion of the URL the caller passes in (used by audit\_skills\_dispatch.py to redirect scrape requests at a loopback fixture). + + + + + + + + + + + + + + Google Custom Search API skill — issues a real GET against Google's customsearch/v1 endpoint, parses the items\[] results, and returns a human-readable summary. Matches Python's WebSearchSkill behavior. Configuration: api\_key (or env GOOGLE\_SEARCH\_API\_KEY / GOOGLE\_API\_KEY) search\_engine\_id (or env GOOGLE\_SEARCH\_ENGINE\_ID / GOOGLE\_CSE\_ID) num\_results (default 3) tool\_name (default "web\_search") WEB\_SEARCH\_BASE\_URL env var overrides the upstream URL (used by audit\_skills\_dispatch.py to point the skill at a fixture) + + + + + + Wikipedia search skill — issues a real GET against the Wikipedia API /w/api.php endpoint with action=query\&list=search, parses the query.search\[] results, and returns titles + snippets. Matches the Python WikipediaSearchSkill upstream call shape. WIKIPEDIA\_BASE\_URL env var overrides the API root (used by audit\_skills\_dispatch.py to point the skill at its loopback fixture). + + + + + +## Modules + + + + + +## Functions + +### ensure\_builtin\_skills\_registered + +Ensure all built-in skills are registered. Called automatically but can be called explicitly to force linkage. + +#### Signature + +```cpp +void ensure_builtin_skills_registered() +``` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 443. + +*** + +### http\_get + +Issue a real HTTP GET. Implementation uses cpp-httplib so it works against any plain-HTTP host (including loopback fixtures used by the audit\_skills\_dispatch.py audit). Skills that need TLS to reach production upstreams set the appropriate base-URL env var (e.g. WEB\_SEARCH\_BASE\_URL) — production deployments point at TLS proxies or a dev-side rewriter; the SDK keeps its transport stack OpenSSL-3 independent until the wider port adopts it. + +#### Signature + +```cpp +SkillHttpResponse http_get( + const std::string & url, + const std::map< std::string, std::string > & headers = {}, + int timeout_seconds = 10 +) +``` + +#### Parameters + + + + + + + +#### Returns + +`SkillHttpResponse` + +#### Source + +[`src/skills/skills_http.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skills_http.cpp) + +Line 55. + +*** + +### http\_get\_ms + +Millisecond-precision variant of http\_get. The connection and read timeouts are both bound to timeout\_ms. Needed by web\_search's per\_page\_timeout, which is a sub-second float in the common case (default 2.0s, but configurable below 1s) — the integer-second http\_get truncates a 0.3s budget to 0 and httplib treats a zero timeout as "no +wait", which would defeat the bound. A non-positive timeout\_ms falls back to a 10s default so a misconfiguration can never produce an unbounded fetch. + +#### Signature + +```cpp +SkillHttpResponse http_get_ms( + const std::string & url, + const std::map< std::string, std::string > & headers, + long timeout_ms +) +``` + +#### Parameters + + + + + + + +#### Returns + +`SkillHttpResponse` + +#### Source + +[`src/skills/skills_http.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skills_http.cpp) + +Line 87. + +*** + +### http\_post + +Issue a real HTTP POST with body as the request body and content\_type for Content-Type. Same semantics as http\_get for status / error / body. + +#### Signature + +```cpp +SkillHttpResponse http_post( + const std::string & url, + const std::string & body, + const std::string & content_type = "application/json", + const std::map< std::string, std::string > & headers = {}, + int timeout_seconds = 10 +) +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`SkillHttpResponse` + +#### Source + +[`src/skills/skills_http.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skills_http.cpp) + +Line 123. + +*** + +### skill\_name\_value + +Map a SkillName to its canonical wire string (the value a built-in skill reports from skill\_name()). This is the single normalization point shared by the typed add\_skill/remove\_skill/has\_skill overloads, so their behavior is identical to passing the bare string. + +**Modifiers:** `inline` + +#### Signature + +```cpp +std::string skill_name_value(SkillName name) +``` + +#### Parameters + + + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/skills/skill_name.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_name.hpp) + +Line 51. + +*** + +### to\_string + +to\_string overload so SkillName interoperates with ADL-based stringification the same way skill\_name\_value() does. + +**Modifiers:** `inline` + +#### Signature + +```cpp +std::string to_string(SkillName name) +``` + +#### Parameters + + + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/skills/skill_name.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_name.hpp) + +Line 77. + +## Type Aliases + +### json + +#### Signature + +```cpp +typedef nlohmann::json json +``` + +#### Source + +[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) + +Line 16. + +*** + +### SkillFactory + +Factory function type for creating skill instances. + +#### Signature + +```cpp +typedef std::function< std::unique_ptr< SkillBase >()> SkillFactory +``` + +#### Source + +[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) + +Line 118. + +## Enums + +### SkillName + +Built-in skill names as a typed, compile-time-checked closed set. +AgentBase::add\_skill() (and remove\_skill() / has\_skill()) accept this enum class OR a std::string. The enum gives editor autocompletion and makes a typo fail at the call site — a bare string like "datetiem" only fails at runtime, on the server. The string overload keeps parity with the Python reference (which uses a bare str) and still allows custom / third-party skills that aren't built in. agent.add\_skill(SkillName::Datetime); // typed, autocompleted +agent.add\_skill("datetime"); // string still works (parity) +agent.add\_skill("my\_custom\_skill"); // open set: custom skills ok + +Members mirror the 18 built-in skills' registered skill\_name() values (the canonical wire strings). skill\_name\_value() maps each member to that wire string, so the enum and string overloads load the identical skill. + +#### Signature + +```cpp +enum class SkillName +``` + +#### Variants + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#### Source + +[`include/signalwire/skills/skill_name.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_name.hpp) + +Line 26. + +## Source + +[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) + +Line 14. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/info-gatherer-skill-r/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/info-gatherer-skill-r/index.mdx new file mode 100644 index 0000000000..a4acad69cb --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/skills/info-gatherer-skill-r/index.mdx @@ -0,0 +1,174 @@ +--- +slug: "/reference/cpp/signalwire/skills/info-gatherer-skill-r" +title: "InfoGathererSkillR" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::InfoGathererSkillR" + parent: "signalwire::skills" + module: "signalwire.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp" + visibility: "public" +--- +# `InfoGathererSkillR` + +## Signature + +```cpp +class signalwire::skills::InfoGathererSkillR : signalwire::skills::SkillBase +``` + +## Inheritance + +**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base) + +## Methods + +### get\_instance\_key + +Get instance key for multi-instance skills. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string get_instance_key() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 404. + +*** + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 404. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +bool setup(const json & params) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 404. + +*** + +### skill\_description + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_description() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 404. + +*** + +### skill\_name + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_name() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 404. + +*** + +### supports\_multiple\_instances + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +bool supports_multiple_instances() const +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 404. + +## Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 404. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/info-gatherer-skill/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/info-gatherer-skill/index.mdx new file mode 100644 index 0000000000..4e447c5676 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/skills/info-gatherer-skill/index.mdx @@ -0,0 +1,222 @@ +--- +slug: "/reference/cpp/signalwire/skills/info-gatherer-skill" +title: "InfoGathererSkill" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::InfoGathererSkill" + parent: "signalwire::skills" + module: "signalwire.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/info_gatherer.cpp" + visibility: "public" +--- +# `InfoGathererSkill` + +## Signature + +```cpp +class signalwire::skills::InfoGathererSkill : signalwire::skills::SkillBase +``` + +## Inheritance + +**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base) + +## Methods + +### get\_global\_data + +Get global data to merge into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +json get_global_data() const +``` + +#### Returns + +`json` + +#### Source + +[`src/skills/builtin/info_gatherer.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/info_gatherer.cpp) + +Line 110. + +*** + +### get\_instance\_key + +Get instance key for multi-instance skills. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string get_instance_key() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/info_gatherer.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/info_gatherer.cpp) + +Line 131. + +*** + +### get\_prompt\_sections + +Get prompt sections to inject into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< SkillPromptSection > get_prompt_sections() const +``` + +#### Returns + +`std::vector< SkillPromptSection >` + +#### Source + +[`src/skills/builtin/info_gatherer.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/info_gatherer.cpp) + +Line 122. + +*** + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`src/skills/builtin/info_gatherer.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/info_gatherer.cpp) + +Line 25. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +bool setup(const json & params) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/info_gatherer.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/info_gatherer.cpp) + +Line 17. + +*** + +### skill\_description + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_description() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/info_gatherer.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/info_gatherer.cpp) + +Line 12. + +*** + +### skill\_name + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_name() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/info_gatherer.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/info_gatherer.cpp) + +Line 11. + +*** + +### supports\_multiple\_instances + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +bool supports_multiple_instances() const +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/info_gatherer.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/info_gatherer.cpp) + +Line 15. + +## Source + +[`src/skills/builtin/info_gatherer.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/info_gatherer.cpp) + +Line 9. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/joke-skill-r/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/joke-skill-r/index.mdx new file mode 100644 index 0000000000..fe0b678076 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/skills/joke-skill-r/index.mdx @@ -0,0 +1,200 @@ +--- +slug: "/reference/cpp/signalwire/skills/joke-skill-r" +title: "JokeSkillR" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::JokeSkillR" + parent: "signalwire::skills" + module: "signalwire.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp" + visibility: "public" +--- +# `JokeSkillR` + +## Signature + +```cpp +class signalwire::skills::JokeSkillR : signalwire::skills::SkillBase +``` + +## Inheritance + +**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base) + +## Methods + +### get\_datamap\_functions + +Get SWAIG DataMap functions (for DataMap-based skills). + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< json > get_datamap_functions() const +``` + +#### Returns + +`std::vector< json >` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 73. + +*** + +### get\_global\_data + +Get global data to merge into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +json get_global_data() const +``` + +#### Returns + +`json` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 75. + +*** + +### get\_prompt\_sections + +Get prompt sections to inject into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< SkillPromptSection > get_prompt_sections() const +``` + +#### Returns + +`std::vector< SkillPromptSection >` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 74. + +*** + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 72. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +bool setup(const json & params) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 71. + +*** + +### skill\_description + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_description() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 70. + +*** + +### skill\_name + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_name() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 69. + +## Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 66. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/joke-skill/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/joke-skill/index.mdx new file mode 100644 index 0000000000..e49bfe374c --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/skills/joke-skill/index.mdx @@ -0,0 +1,200 @@ +--- +slug: "/reference/cpp/signalwire/skills/joke-skill" +title: "JokeSkill" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::JokeSkill" + parent: "signalwire::skills" + module: "signalwire.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/joke.cpp" + visibility: "public" +--- +# `JokeSkill` + +## Signature + +```cpp +class signalwire::skills::JokeSkill : signalwire::skills::SkillBase +``` + +## Inheritance + +**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base) + +## Methods + +### get\_datamap\_functions + +Get SWAIG DataMap functions (for DataMap-based skills). + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< json > get_datamap_functions() const +``` + +#### Returns + +`std::vector< json >` + +#### Source + +[`src/skills/builtin/joke.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/joke.cpp) + +Line 24. + +*** + +### get\_global\_data + +Get global data to merge into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +json get_global_data() const +``` + +#### Returns + +`json` + +#### Source + +[`src/skills/builtin/joke.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/joke.cpp) + +Line 41. + +*** + +### get\_prompt\_sections + +Get prompt sections to inject into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< SkillPromptSection > get_prompt_sections() const +``` + +#### Returns + +`std::vector< SkillPromptSection >` + +#### Source + +[`src/skills/builtin/joke.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/joke.cpp) + +Line 36. + +*** + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`src/skills/builtin/joke.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/joke.cpp) + +Line 22. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +bool setup(const json & params) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/joke.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/joke.cpp) + +Line 15. + +*** + +### skill\_description + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_description() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/joke.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/joke.cpp) + +Line 13. + +*** + +### skill\_name + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_name() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/joke.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/joke.cpp) + +Line 12. + +## Source + +[`src/skills/builtin/joke.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/joke.cpp) + +Line 10. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/math-skill-r/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/math-skill-r/index.mdx new file mode 100644 index 0000000000..3155823be8 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/skills/math-skill-r/index.mdx @@ -0,0 +1,152 @@ +--- +slug: "/reference/cpp/signalwire/skills/math-skill-r" +title: "MathSkillR" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::MathSkillR" + parent: "signalwire::skills" + module: "signalwire.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp" + visibility: "public" +--- +# `MathSkillR` + +## Signature + +```cpp +class signalwire::skills::MathSkillR : signalwire::skills::SkillBase +``` + +## Inheritance + +**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base) + +## Methods + +### get\_prompt\_sections + +Get prompt sections to inject into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< SkillPromptSection > get_prompt_sections() const +``` + +#### Returns + +`std::vector< SkillPromptSection >` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 62. + +*** + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 58. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +bool setup(const json & params) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 57. + +*** + +### skill\_description + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_description() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 56. + +*** + +### skill\_name + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_name() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 55. + +## Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 41. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/math-skill/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/math-skill/index.mdx new file mode 100644 index 0000000000..a74e58b0bd --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/skills/math-skill/index.mdx @@ -0,0 +1,174 @@ +--- +slug: "/reference/cpp/signalwire/skills/math-skill" +title: "MathSkill" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::MathSkill" + parent: "signalwire::skills" + module: "signalwire.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/math.cpp" + visibility: "public" +--- +# `MathSkill` + +## Signature + +```cpp +class signalwire::skills::MathSkill : signalwire::skills::SkillBase +``` + +## Inheritance + +**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base) + +## Methods + +### get\_prompt\_sections + +Get prompt sections to inject into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< SkillPromptSection > get_prompt_sections() const +``` + +#### Returns + +`std::vector< SkillPromptSection >` + +#### Source + +[`src/skills/builtin/math.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/math.cpp) + +Line 139. + +*** + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`src/skills/builtin/math.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/math.cpp) + +Line 108. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +bool setup(const json & params) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/math.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/math.cpp) + +Line 106. + +*** + +### skill\_description + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_description() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/math.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/math.cpp) + +Line 103. + +*** + +### skill\_name + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_name() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/math.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/math.cpp) + +Line 102. + +*** + +### supports\_multiple\_instances + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +bool supports_multiple_instances() const +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/math.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/math.cpp) + +Line 104. + +## Source + +[`src/skills/builtin/math.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/math.cpp) + +Line 100. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/mcp-gateway-skill-r/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/mcp-gateway-skill-r/index.mdx new file mode 100644 index 0000000000..f194bb1765 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/skills/mcp-gateway-skill-r/index.mdx @@ -0,0 +1,152 @@ +--- +slug: "/reference/cpp/signalwire/skills/mcp-gateway-skill-r" +title: "McpGatewaySkillR" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::McpGatewaySkillR" + parent: "signalwire::skills" + module: "signalwire.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp" + visibility: "public" +--- +# `McpGatewaySkillR` + +## Signature + +```cpp +class signalwire::skills::McpGatewaySkillR : signalwire::skills::SkillBase +``` + +## Inheritance + +**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base) + +## Methods + +### get\_hints + +Get speech recognition hints to merge into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< std::string > get_hints() const +``` + +#### Returns + +`std::vector< std::string >` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 408. + +*** + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 408. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +bool setup(const json & params) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 408. + +*** + +### skill\_description + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_description() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 408. + +*** + +### skill\_name + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_name() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 408. + +## Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 408. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/mcp-gateway-skill/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/mcp-gateway-skill/index.mdx new file mode 100644 index 0000000000..b52047d7b0 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/skills/mcp-gateway-skill/index.mdx @@ -0,0 +1,200 @@ +--- +slug: "/reference/cpp/signalwire/skills/mcp-gateway-skill" +title: "McpGatewaySkill" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::McpGatewaySkill" + parent: "signalwire::skills" + module: "signalwire.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/mcp_gateway.cpp" + visibility: "public" +--- +# `McpGatewaySkill` + +## Signature + +```cpp +class signalwire::skills::McpGatewaySkill : signalwire::skills::SkillBase +``` + +## Inheritance + +**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base) + +## Methods + +### get\_global\_data + +Get global data to merge into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +json get_global_data() const +``` + +#### Returns + +`json` + +#### Source + +[`src/skills/builtin/mcp_gateway.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/mcp_gateway.cpp) + +Line 55. + +*** + +### get\_hints + +Get speech recognition hints to merge into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< std::string > get_hints() const +``` + +#### Returns + +`std::vector< std::string >` + +#### Source + +[`src/skills/builtin/mcp_gateway.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/mcp_gateway.cpp) + +Line 45. + +*** + +### get\_prompt\_sections + +Get prompt sections to inject into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< SkillPromptSection > get_prompt_sections() const +``` + +#### Returns + +`std::vector< SkillPromptSection >` + +#### Source + +[`src/skills/builtin/mcp_gateway.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/mcp_gateway.cpp) + +Line 69. + +*** + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`src/skills/builtin/mcp_gateway.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/mcp_gateway.cpp) + +Line 21. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +bool setup(const json & params) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/mcp_gateway.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/mcp_gateway.cpp) + +Line 14. + +*** + +### skill\_description + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_description() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/mcp_gateway.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/mcp_gateway.cpp) + +Line 12. + +*** + +### skill\_name + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_name() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/mcp_gateway.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/mcp_gateway.cpp) + +Line 11. + +## Source + +[`src/skills/builtin/mcp_gateway.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/mcp_gateway.cpp) + +Line 9. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/native-vector-search-skill-r/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/native-vector-search-skill-r/index.mdx new file mode 100644 index 0000000000..20bd7743b7 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/skills/native-vector-search-skill-r/index.mdx @@ -0,0 +1,174 @@ +--- +slug: "/reference/cpp/signalwire/skills/native-vector-search-skill-r" +title: "NativeVectorSearchSkillR" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::NativeVectorSearchSkillR" + parent: "signalwire::skills" + module: "signalwire.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp" + visibility: "public" +--- +# `NativeVectorSearchSkillR` + +## Signature + +```cpp +class signalwire::skills::NativeVectorSearchSkillR : signalwire::skills::SkillBase +``` + +## Inheritance + +**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base) + +## Methods + +### get\_hints + +Get speech recognition hints to merge into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< std::string > get_hints() const +``` + +#### Returns + +`std::vector< std::string >` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 402. + +*** + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 402. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +bool setup(const json & params) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 402. + +*** + +### skill\_description + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_description() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 402. + +*** + +### skill\_name + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_name() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 402. + +*** + +### supports\_multiple\_instances + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +bool supports_multiple_instances() const +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 402. + +## Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 402. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/native-vector-search-skill/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/native-vector-search-skill/index.mdx new file mode 100644 index 0000000000..57493844ad --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/skills/native-vector-search-skill/index.mdx @@ -0,0 +1,174 @@ +--- +slug: "/reference/cpp/signalwire/skills/native-vector-search-skill" +title: "NativeVectorSearchSkill" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::NativeVectorSearchSkill" + parent: "signalwire::skills" + module: "signalwire.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/native_vector_search.cpp" + visibility: "public" +--- +# `NativeVectorSearchSkill` + +## Signature + +```cpp +class signalwire::skills::NativeVectorSearchSkill : signalwire::skills::SkillBase +``` + +## Inheritance + +**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base) + +## Methods + +### get\_hints + +Get speech recognition hints to merge into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< std::string > get_hints() const +``` + +#### Returns + +`std::vector< std::string >` + +#### Source + +[`src/skills/builtin/native_vector_search.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/native_vector_search.cpp) + +Line 44. + +*** + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`src/skills/builtin/native_vector_search.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/native_vector_search.cpp) + +Line 27. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +bool setup(const json & params) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/native_vector_search.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/native_vector_search.cpp) + +Line 17. + +*** + +### skill\_description + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_description() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/native_vector_search.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/native_vector_search.cpp) + +Line 12. + +*** + +### skill\_name + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_name() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/native_vector_search.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/native_vector_search.cpp) + +Line 11. + +*** + +### supports\_multiple\_instances + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +bool supports_multiple_instances() const +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/native_vector_search.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/native_vector_search.cpp) + +Line 15. + +## Source + +[`src/skills/builtin/native_vector_search.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/native_vector_search.cpp) + +Line 9. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/play-background-file-skill-r/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/play-background-file-skill-r/index.mdx new file mode 100644 index 0000000000..888a68ddd0 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/skills/play-background-file-skill-r/index.mdx @@ -0,0 +1,174 @@ +--- +slug: "/reference/cpp/signalwire/skills/play-background-file-skill-r" +title: "PlayBackgroundFileSkillR" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::PlayBackgroundFileSkillR" + parent: "signalwire::skills" + module: "signalwire.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp" + visibility: "public" +--- +# `PlayBackgroundFileSkillR` + +## Signature + +```cpp +class signalwire::skills::PlayBackgroundFileSkillR : signalwire::skills::SkillBase +``` + +## Inheritance + +**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base) + +## Methods + +### get\_datamap\_functions + +Get SWAIG DataMap functions (for DataMap-based skills). + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< json > get_datamap_functions() const +``` + +#### Returns + +`std::vector< json >` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 398. + +*** + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 398. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +bool setup(const json & params) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 398. + +*** + +### skill\_description + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_description() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 398. + +*** + +### skill\_name + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_name() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 398. + +*** + +### supports\_multiple\_instances + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +bool supports_multiple_instances() const +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 398. + +## Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 398. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/play-background-file-skill/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/play-background-file-skill/index.mdx new file mode 100644 index 0000000000..edef76cd8d --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/skills/play-background-file-skill/index.mdx @@ -0,0 +1,174 @@ +--- +slug: "/reference/cpp/signalwire/skills/play-background-file-skill" +title: "PlayBackgroundFileSkill" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::PlayBackgroundFileSkill" + parent: "signalwire::skills" + module: "signalwire.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/play_background_file.cpp" + visibility: "public" +--- +# `PlayBackgroundFileSkill` + +## Signature + +```cpp +class signalwire::skills::PlayBackgroundFileSkill : signalwire::skills::SkillBase +``` + +## Inheritance + +**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base) + +## Methods + +### get\_datamap\_functions + +Get SWAIG DataMap functions (for DataMap-based skills). + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< json > get_datamap_functions() const +``` + +#### Returns + +`std::vector< json >` + +#### Source + +[`src/skills/builtin/play_background_file.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/play_background_file.cpp) + +Line 24. + +*** + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`src/skills/builtin/play_background_file.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/play_background_file.cpp) + +Line 22. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +bool setup(const json & params) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/play_background_file.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/play_background_file.cpp) + +Line 16. + +*** + +### skill\_description + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_description() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/play_background_file.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/play_background_file.cpp) + +Line 13. + +*** + +### skill\_name + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_name() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/play_background_file.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/play_background_file.cpp) + +Line 12. + +*** + +### supports\_multiple\_instances + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +bool supports_multiple_instances() const +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/play_background_file.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/play_background_file.cpp) + +Line 14. + +## Source + +[`src/skills/builtin/play_background_file.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/play_background_file.cpp) + +Line 10. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/skill-base/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/skill-base/index.mdx new file mode 100644 index 0000000000..a6f08181ec --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/skills/skill-base/index.mdx @@ -0,0 +1,518 @@ +--- +slug: "/reference/cpp/signalwire/skills/skill-base" +title: "SkillBase" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::SkillBase" + parent: "signalwire::skills" + module: "signalwire.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp" + visibility: "public" +--- +# `SkillBase` + +Abstract base class for all skills. + +## Signature + +```cpp +class signalwire::skills::SkillBase +``` + +## Methods + +### ~SkillBase + +**Modifiers:** `virtual` + +#### Signature + +```cpp +void ~SkillBase() +``` + +#### Source + +[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) + +Line 28. + +*** + +### cleanup + +Cleanup resources. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +void cleanup() +``` + +#### Source + +[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) + +Line 70. + +*** + +### define\_tool + +Define a tool (convenience for register\_tools implementations). + +**Modifiers:** `inline` + +#### Signature + +```cpp +swaig::ToolDefinition define_tool( + const std::string & name, + const std::string & description, + const json & parameters, + swaig::ToolHandler handler, + bool secure = false +) +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`swaig::ToolDefinition` + +#### Source + +[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) + +Line 77. + +*** + +### get\_datamap\_functions + +Get SWAIG DataMap functions (for DataMap-based skills). + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< json > get_datamap_functions() const +``` + +#### Returns + +`std::vector< json >` + +#### Source + +[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) + +Line 61. + +*** + +### get\_global\_data + +Get global data to merge into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +json get_global_data() const +``` + +#### Returns + +`json` + +#### Source + +[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) + +Line 55. + +*** + +### get\_hints + +Get speech recognition hints to merge into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< std::string > get_hints() const +``` + +#### Returns + +`std::vector< std::string >` + +#### Source + +[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) + +Line 52. + +*** + +### get\_instance\_key + +Get instance key for multi-instance skills. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string get_instance_key() const +``` + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) + +Line 67. + +*** + +### get\_param + +Get a parameter value with a default. + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +template +T get_param( + const json & params, + const std::string & key, + const T & default_val +) const +``` + +#### Type Parameters + + + +#### Parameters + + + + + + + +#### Returns + +`T` + +#### Source + +[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) + +Line 94. + +*** + +### get\_param\_or\_env + +Get a string parameter with env var fallback. + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +std::string get_param_or_env( + const json & params, + const std::string & key, + const std::string & env_var, + const std::string & default_val = "" +) const +``` + +#### Parameters + + + + + + + + + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) + +Line 102. + +*** + +### get\_parameter\_schema + +Get parameter schema for GUI tools. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +json get_parameter_schema() const +``` + +#### Returns + +`json` + +#### Source + +[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) + +Line 64. + +*** + +### get\_prompt\_sections + +Get prompt sections to inject into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< SkillPromptSection > get_prompt_sections() const +``` + +#### Returns + +`std::vector< SkillPromptSection >` + +#### Source + +[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) + +Line 58. + +*** + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `virtual` `pure` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() = 0 +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) + +Line 45. + +*** + +### required\_env\_vars + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< std::string > required_env_vars() const +``` + +#### Returns + +`std::vector< std::string >` + +#### Source + +[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) + +Line 38. + +*** + +### required\_packages + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< std::string > required_packages() const +``` + +#### Returns + +`std::vector< std::string >` + +#### Source + +[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) + +Line 39. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `virtual` `pure` + +#### Signature + +```cpp +bool setup(const json & params) = 0 +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) + +Line 42. + +*** + +### skill\_description + +**Modifiers:** `const` `virtual` `pure` + +#### Signature + +```cpp +std::string skill_description() const = 0 +``` + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) + +Line 35. + +*** + +### skill\_name + +**Modifiers:** `const` `virtual` `pure` + +#### Signature + +```cpp +std::string skill_name() const = 0 +``` + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) + +Line 34. + +*** + +### skill\_version + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_version() const +``` + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) + +Line 36. + +*** + +### supports\_multiple\_instances + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +bool supports_multiple_instances() const +``` + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) + +Line 37. + +## Source + +[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) + +Line 26. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/skill-http-response/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/skill-http-response/index.mdx new file mode 100644 index 0000000000..3392daecc7 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/skills/skill-http-response/index.mdx @@ -0,0 +1,38 @@ +--- +slug: "/reference/cpp/signalwire/skills/skill-http-response" +title: "SkillHttpResponse" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::SkillHttpResponse" + parent: "signalwire::skills" + module: "signalwire.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skills_http.hpp" + visibility: "public" +--- +# `SkillHttpResponse` + +Result of a skill HTTP request. status is the HTTP status code (0 indicates a transport-level error — connection refused, DNS, etc.). body is the raw response body. error is non-empty when status is 0. + +## Signature + +```cpp +struct signalwire::skills::SkillHttpResponse +``` + +## Properties + + + + + + + +## Source + +[`include/signalwire/skills/skills_http.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skills_http.hpp) + +Line 14. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/skill-manager/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/skill-manager/index.mdx new file mode 100644 index 0000000000..4329930584 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/skills/skill-manager/index.mdx @@ -0,0 +1,172 @@ +--- +slug: "/reference/cpp/signalwire/skills/skill-manager" +title: "SkillManager" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::SkillManager" + parent: "signalwire::skills" + module: "signalwire.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_manager.hpp" + visibility: "public" +--- +# `SkillManager` + +Manages skill lifecycle: creation, setup, registration with agents. + +## Signature + +```cpp +class signalwire::skills::SkillManager +``` + +## Methods + +### cleanup\_all + +Cleanup all skills. + +#### Signature + +```cpp +void cleanup_all() +``` + +#### Source + +[`include/signalwire/skills/skill_manager.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_manager.hpp) + +Line 40. + +*** + +### is\_loaded + +Check if a skill is loaded. + +**Modifiers:** `const` + +#### Signature + +```cpp +bool is_loaded(const std::string & skill_name) const +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/skills/skill_manager.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_manager.hpp) + +Line 34. + +*** + +### list\_loaded + +List loaded skills. + +**Modifiers:** `const` + +#### Signature + +```cpp +std::vector< std::string > list_loaded() const +``` + +#### Returns + +`std::vector< std::string >` + +#### Source + +[`include/signalwire/skills/skill_manager.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_manager.hpp) + +Line 37. + +*** + +### load\_skill + +Load a skill by name with params and register it with the agent. + +#### Signature + +```cpp +bool load_skill( + const std::string & skill_name, + const json & params, + agent::AgentBase & agent +) +``` + +#### Parameters + + + + + + + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/skills/skill_manager.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_manager.hpp) + +Line 27. + +*** + +### SkillManager + +#### Signature + +```cpp +void SkillManager() +``` + +#### Source + +[`include/signalwire/skills/skill_manager.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_manager.hpp) + +Line 24. + +*** + +### unload\_skill + +Unload a skill. + +#### Signature + +```cpp +void unload_skill(const std::string & skill_name) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/skills/skill_manager.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_manager.hpp) + +Line 31. + +## Source + +[`include/signalwire/skills/skill_manager.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_manager.hpp) + +Line 22. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/skill-prompt-section/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/skill-prompt-section/index.mdx new file mode 100644 index 0000000000..0f4116a1ef --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/skills/skill-prompt-section/index.mdx @@ -0,0 +1,38 @@ +--- +slug: "/reference/cpp/signalwire/skills/skill-prompt-section" +title: "SkillPromptSection" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::SkillPromptSection" + parent: "signalwire::skills" + module: "signalwire.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp" + visibility: "public" +--- +# `SkillPromptSection` + +POM section for skill prompts. + +## Signature + +```cpp +struct signalwire::skills::SkillPromptSection +``` + +## Properties + + + + + + + +## Source + +[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) + +Line 19. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/skill-registry/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/skill-registry/index.mdx new file mode 100644 index 0000000000..385984f384 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/skills/skill-registry/index.mdx @@ -0,0 +1,207 @@ +--- +slug: "/reference/cpp/signalwire/skills/skill-registry" +title: "SkillRegistry" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::SkillRegistry" + parent: "signalwire::skills" + module: "signalwire.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_registry.hpp" + visibility: "public" +--- +# `SkillRegistry` + +Global registry of skill factories. + +## Signature + +```cpp +class signalwire::skills::SkillRegistry +``` + +## Methods + +### add\_skill\_directory + +Add a directory to search for skills. +Mirrors Python's signalwire.skills.registry.SkillRegistry.add\_skill\_directory: validate that the path exists and is a directory, then append it (de-duplicated) to external\_paths\_. Throws std::invalid\_argument (the C++ analog of Python's ValueError) for invalid input — the path doesn't exist or isn't a directory. + +**Modifiers:** `inline` + +#### Signature + +```cpp +void add_skill_directory(const std::string & path) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/skills/skill_registry.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_registry.hpp) + +Line 65. + +*** + +### create + +Create a skill instance by name. + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +std::unique_ptr< SkillBase > create(const std::string & name) const +``` + +#### Parameters + + + +#### Returns + +`std::unique_ptr< SkillBase >` + +#### Source + +[`include/signalwire/skills/skill_registry.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_registry.hpp) + +Line 32. + +*** + +### external\_paths + +Returns the registered external skill directories. Mirrors Python's SkillRegistry.\_external\_paths (private list, exposed here as a public accessor for parity-test inspection — C++ has no convention for protected attributes that tests can poke). + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +std::vector< std::string > external_paths() const +``` + +#### Returns + +`std::vector< std::string >` + +#### Source + +[`include/signalwire/skills/skill_registry.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_registry.hpp) + +Line 84. + +*** + +### has\_skill + +Check if a skill is registered. + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +bool has_skill(const std::string & name) const +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/skills/skill_registry.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_registry.hpp) + +Line 42. + +*** + +### instance + +**Modifiers:** `static` `inline` + +#### Signature + +```cpp +SkillRegistry & instance() +``` + +#### Returns + +`SkillRegistry &` + +#### Source + +[`include/signalwire/skills/skill_registry.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_registry.hpp) + +Line 20. + +*** + +### list\_skills + +List all registered skill names. + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +std::vector< std::string > list_skills() const +``` + +#### Returns + +`std::vector< std::string >` + +#### Source + +[`include/signalwire/skills/skill_registry.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_registry.hpp) + +Line 48. + +*** + +### register\_skill + +Register a skill factory. + +**Modifiers:** `inline` + +#### Signature + +```cpp +void register_skill(const std::string & name, SkillFactory factory) +``` + +#### Parameters + + + + + +#### Source + +[`include/signalwire/skills/skill_registry.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_registry.hpp) + +Line 26. + +## Source + +[`include/signalwire/skills/skill_registry.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_registry.hpp) + +Line 18. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/spider-skill-r/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/spider-skill-r/index.mdx new file mode 100644 index 0000000000..26720d5156 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/skills/spider-skill-r/index.mdx @@ -0,0 +1,174 @@ +--- +slug: "/reference/cpp/signalwire/skills/spider-skill-r" +title: "SpiderSkillR" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::SpiderSkillR" + parent: "signalwire::skills" + module: "signalwire.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp" + visibility: "public" +--- +# `SpiderSkillR` + +## Signature + +```cpp +class signalwire::skills::SpiderSkillR : signalwire::skills::SkillBase +``` + +## Inheritance + +**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base) + +## Methods + +### get\_hints + +Get speech recognition hints to merge into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< std::string > get_hints() const +``` + +#### Returns + +`std::vector< std::string >` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 301. + +*** + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 271. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +bool setup(const json & params) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 270. + +*** + +### skill\_description + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_description() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 268. + +*** + +### skill\_name + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_name() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 267. + +*** + +### supports\_multiple\_instances + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +bool supports_multiple_instances() const +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 269. + +## Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 249. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/spider-skill/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/spider-skill/index.mdx new file mode 100644 index 0000000000..bd28597a4e --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/skills/spider-skill/index.mdx @@ -0,0 +1,177 @@ +--- +slug: "/reference/cpp/signalwire/skills/spider-skill" +title: "SpiderSkill" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::SpiderSkill" + parent: "signalwire::skills" + module: "signalwire.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/spider.cpp" + visibility: "public" +--- +# `SpiderSkill` + +Spider scrape skill — issues a real GET against the URL the LLM passes in. Strips HTML tags from the response and returns the text payload. Matches Python SpiderSkill's scrape\_url behavior. +SPIDER\_BASE\_URL env var overrides the host portion of the URL the caller passes in (used by audit\_skills\_dispatch.py to redirect scrape requests at a loopback fixture). + +## Signature + +```cpp +class signalwire::skills::SpiderSkill : signalwire::skills::SkillBase +``` + +## Inheritance + +**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base) + +## Methods + +### get\_hints + +Get speech recognition hints to merge into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< std::string > get_hints() const +``` + +#### Returns + +`std::vector< std::string >` + +#### Source + +[`src/skills/builtin/spider.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/spider.cpp) + +Line 153. + +*** + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`src/skills/builtin/spider.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/spider.cpp) + +Line 62. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +bool setup(const json & params) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/spider.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/spider.cpp) + +Line 60. + +*** + +### skill\_description + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_description() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/spider.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/spider.cpp) + +Line 57. + +*** + +### skill\_name + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_name() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/spider.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/spider.cpp) + +Line 56. + +*** + +### supports\_multiple\_instances + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +bool supports_multiple_instances() const +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/spider.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/spider.cpp) + +Line 58. + +## Source + +[`src/skills/builtin/spider.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/spider.cpp) + +Line 54. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/swml-transfer-skill-r/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/swml-transfer-skill-r/index.mdx new file mode 100644 index 0000000000..7b0986fb47 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/skills/swml-transfer-skill-r/index.mdx @@ -0,0 +1,198 @@ +--- +slug: "/reference/cpp/signalwire/skills/swml-transfer-skill-r" +title: "SwmlTransferSkillR" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::SwmlTransferSkillR" + parent: "signalwire::skills" + module: "signalwire.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp" + visibility: "public" +--- +# `SwmlTransferSkillR` + +## Signature + +```cpp +class signalwire::skills::SwmlTransferSkillR : signalwire::skills::SkillBase +``` + +## Inheritance + +**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base) + +## Methods + +### get\_datamap\_functions + +Get SWAIG DataMap functions (for DataMap-based skills). + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< json > get_datamap_functions() const +``` + +#### Returns + +`std::vector< json >` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 396. + +*** + +### get\_hints + +Get speech recognition hints to merge into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< std::string > get_hints() const +``` + +#### Returns + +`std::vector< std::string >` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 396. + +*** + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 396. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +bool setup(const json & params) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 396. + +*** + +### skill\_description + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_description() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 396. + +*** + +### skill\_name + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_name() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 396. + +*** + +### supports\_multiple\_instances + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +bool supports_multiple_instances() const +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 396. + +## Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 396. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/swml-transfer-skill/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/swml-transfer-skill/index.mdx new file mode 100644 index 0000000000..b70190e0d1 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/skills/swml-transfer-skill/index.mdx @@ -0,0 +1,222 @@ +--- +slug: "/reference/cpp/signalwire/skills/swml-transfer-skill" +title: "SwmlTransferSkill" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::SwmlTransferSkill" + parent: "signalwire::skills" + module: "signalwire.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/swml_transfer.cpp" + visibility: "public" +--- +# `SwmlTransferSkill` + +## Signature + +```cpp +class signalwire::skills::SwmlTransferSkill : signalwire::skills::SkillBase +``` + +## Inheritance + +**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base) + +## Methods + +### get\_datamap\_functions + +Get SWAIG DataMap functions (for DataMap-based skills). + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< json > get_datamap_functions() const +``` + +#### Returns + +`std::vector< json >` + +#### Source + +[`src/skills/builtin/swml_transfer.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/swml_transfer.cpp) + +Line 26. + +*** + +### get\_hints + +Get speech recognition hints to merge into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< std::string > get_hints() const +``` + +#### Returns + +`std::vector< std::string >` + +#### Source + +[`src/skills/builtin/swml_transfer.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/swml_transfer.cpp) + +Line 62. + +*** + +### get\_prompt\_sections + +Get prompt sections to inject into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< SkillPromptSection > get_prompt_sections() const +``` + +#### Returns + +`std::vector< SkillPromptSection >` + +#### Source + +[`src/skills/builtin/swml_transfer.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/swml_transfer.cpp) + +Line 81. + +*** + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`src/skills/builtin/swml_transfer.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/swml_transfer.cpp) + +Line 24. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +bool setup(const json & params) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/swml_transfer.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/swml_transfer.cpp) + +Line 18. + +*** + +### skill\_description + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_description() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/swml_transfer.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/swml_transfer.cpp) + +Line 13. + +*** + +### skill\_name + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_name() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/swml_transfer.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/swml_transfer.cpp) + +Line 12. + +*** + +### supports\_multiple\_instances + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +bool supports_multiple_instances() const +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/swml_transfer.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/swml_transfer.cpp) + +Line 16. + +## Source + +[`src/skills/builtin/swml_transfer.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/swml_transfer.cpp) + +Line 10. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/weather-api-skill-r/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/weather-api-skill-r/index.mdx new file mode 100644 index 0000000000..79afb00d5c --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/skills/weather-api-skill-r/index.mdx @@ -0,0 +1,152 @@ +--- +slug: "/reference/cpp/signalwire/skills/weather-api-skill-r" +title: "WeatherApiSkillR" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::WeatherApiSkillR" + parent: "signalwire::skills" + module: "signalwire.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp" + visibility: "public" +--- +# `WeatherApiSkillR` + +## Signature + +```cpp +class signalwire::skills::WeatherApiSkillR : signalwire::skills::SkillBase +``` + +## Inheritance + +**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base) + +## Methods + +### get\_datamap\_functions + +Get SWAIG DataMap functions (for DataMap-based skills). + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< json > get_datamap_functions() const +``` + +#### Returns + +`std::vector< json >` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 86. + +*** + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 85. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +bool setup(const json & params) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 84. + +*** + +### skill\_description + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_description() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 83. + +*** + +### skill\_name + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_name() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 82. + +## Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 79. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/weather-api-skill/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/weather-api-skill/index.mdx new file mode 100644 index 0000000000..81791f3f2f --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/skills/weather-api-skill/index.mdx @@ -0,0 +1,152 @@ +--- +slug: "/reference/cpp/signalwire/skills/weather-api-skill" +title: "WeatherApiSkill" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::WeatherApiSkill" + parent: "signalwire::skills" + module: "signalwire.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/weather_api.cpp" + visibility: "public" +--- +# `WeatherApiSkill` + +## Signature + +```cpp +class signalwire::skills::WeatherApiSkill : signalwire::skills::SkillBase +``` + +## Inheritance + +**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base) + +## Methods + +### get\_datamap\_functions + +Get SWAIG DataMap functions (for DataMap-based skills). + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< json > get_datamap_functions() const +``` + +#### Returns + +`std::vector< json >` + +#### Source + +[`src/skills/builtin/weather_api.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/weather_api.cpp) + +Line 25. + +*** + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`src/skills/builtin/weather_api.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/weather_api.cpp) + +Line 23. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +bool setup(const json & params) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/weather_api.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/weather_api.cpp) + +Line 15. + +*** + +### skill\_description + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_description() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/weather_api.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/weather_api.cpp) + +Line 13. + +*** + +### skill\_name + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_name() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/weather_api.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/weather_api.cpp) + +Line 12. + +## Source + +[`src/skills/builtin/weather_api.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/weather_api.cpp) + +Line 10. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/web-search-core/candidate/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/web-search-core/candidate/index.mdx new file mode 100644 index 0000000000..1a074c82e2 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/skills/web-search-core/candidate/index.mdx @@ -0,0 +1,42 @@ +--- +slug: "/reference/cpp/signalwire/skills/web-search-core/candidate" +title: "Candidate" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::web_search_core::Candidate" + parent: "signalwire::skills::web_search_core" + module: "signalwire.skills.web_search_core" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/web_search_core.hpp" + visibility: "public" +--- +# `Candidate` + +One Google CSE hit: title / link / snippet, plus the page text once a scrape succeeds. + +## Signature + +```cpp +struct signalwire::skills::web_search_core::Candidate +``` + +## Properties + + + + + + + + + + + +## Source + +[`include/signalwire/skills/web_search_core.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/web_search_core.hpp) + +Line 55. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/web-search-core/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/web-search-core/index.mdx new file mode 100644 index 0000000000..9a6b21e712 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/skills/web-search-core/index.mdx @@ -0,0 +1,318 @@ +--- +slug: "/reference/cpp/signalwire/skills/web-search-core" +title: "web_search_core" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "module" + language: "cpp" + qualified_name: "signalwire::skills::web_search_core" + parent: "signalwire::skills" + module: "signalwire.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/web_search_core.hpp" +--- +# `web_search_core` + +## Signature + +```cpp +namespace signalwire::skills::web_search_core +``` + +## Classes + + + + One Google CSE hit: title / link / snippet, plus the page text once a scrape succeeds. + + + + Latency-control configuration read from the skill params. + + + +## Functions + +### format\_scraped\_results + +Format the successfully-scraped results. Returned when at least one page was fetched within budget. Keeps the historical "Web search results for '<q>'" header shape so existing parse-assertions still see it, but enriches each entry with the fetched page content (truncated to per\_result\_limit). + +**Modifiers:** `inline` + +#### Signature + +```cpp +std::string format_scraped_results( + const std::string & query, + const std::vector< Candidate > & scraped, + std::size_t total_candidates, + std::size_t per_result_limit +) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/skills/web_search_core.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/web_search_core.hpp) + +Line 122. + +*** + +### format\_snippet\_results + +Format Google CSE snippets without fetching the underlying pages. Used for the snippets\_only fast path AND as the graceful fallback when scraping is abandoned by the overall\_deadline. Always non-empty when there is at least one candidate. Mirrors Python's \_format\_snippet\_results. + +**Modifiers:** `inline` + +#### Signature + +```cpp +std::string format_snippet_results( + const std::string & query, + const std::vector< Candidate > & cands, + int num_results +) +``` + +#### Parameters + + + + + + + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/skills/web_search_core.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/web_search_core.hpp) + +Line 91. + +*** + +### parse\_cse\_items + +Parse a Google CSE \{ "items": \[ \{title, link, snippet\}, ... ] \} body into candidate hits. Unknown / missing fields default to empty strings. + +**Modifiers:** `inline` + +#### Signature + +```cpp +std::vector< Candidate > parse_cse_items(const json & parsed) +``` + +#### Parameters + + + +#### Returns + +`std::vector< Candidate >` + +#### Source + +[`include/signalwire/skills/web_search_core.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/web_search_core.hpp) + +Line 73. + +*** + +### run + +Run the full latency-controlled web\_search flow given an already-fetched and parsed CSE candidate list. Returns the response body (UNWRAPPED — the caller applies response\_prefix/response\_postfix). had\_items distinguishes "CSE +returned zero items" (return empty\_no\_items\_message) from "CSE returned +items but none scraped" (snippet fallback). +Steps mirror Python's search\_and\_scrape\_best: +snippets\_only -> format CSE snippets directly. +scrape under deadline. +no scraped survivors -> snippet fallback (non-empty). +else -> format scraped results. + +**Modifiers:** `inline` + +#### Signature + +```cpp +std::string run( + const std::string & query, + std::vector< Candidate > candidates, + const LatencyParams & lp, + int num_results, + std::size_t max_content_length, + const std::string & empty_no_items_message +) +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/skills/web_search_core.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/web_search_core.hpp) + +Line 254. + +*** + +### schema\_fragment + +Build the parameter-schema fragment advertising the 6 latency / response params. Merged into each skill's get\_parameter\_schema(). Mirrors Python's get\_parameter\_schema entries (295745b) and the Go reference port. + +**Modifiers:** `inline` + +#### Signature + +```cpp +json schema_fragment() +``` + +#### Returns + +`json` + +#### Source + +[`include/signalwire/skills/web_search_core.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/web_search_core.hpp) + +Line 302. + +*** + +### scrape\_candidates + +Scrape the candidate result links under the overall\_deadline budget, returning only the ones that produced usable page content before time ran out. The overall\_deadline is enforced in BOTH parallel and sequential modes via std::chrono::steady\_clock — that is the contract. +Parallel mode (best-effort): dispatch every scrape via std::async, then future::wait\_until(deadline) each. Whatever has not finished by the deadline is abandoned — its future is moved into a detached reaper so the abandoned fetch (already bounded by per\_page\_timeout) is cleaned up off the hot path and never blocks the response. std::async's own future destructor would otherwise JOIN the task, defeating the deadline; the reaper sidesteps that. +Sequential mode: scrape one link at a time, breaking out the instant the deadline has passed. + +**Modifiers:** `inline` + +#### Signature + +```cpp +std::vector< Candidate > scrape_candidates( + const std::vector< Candidate > & cands, + const LatencyParams & lp, + steady_clock::time_point deadline_at +) +``` + +#### Parameters + + + + + + + +#### Returns + +`std::vector< Candidate >` + +#### Source + +[`include/signalwire/skills/web_search_core.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/web_search_core.hpp) + +Line 186. + +*** + +### scrape\_one + +Fetch one candidate's page under the per\_page\_timeout bound. A 2xx response with a non-empty body is a usable scrape; everything else (transport error, non-2xx, empty body) yields an unscraped candidate. The per\_page\_timeout is converted to milliseconds so a sub-second budget is honored exactly. + +**Modifiers:** `inline` + +#### Signature + +```cpp +Candidate scrape_one(const Candidate & in, double per_page_timeout) +``` + +#### Parameters + + + + + +#### Returns + +`Candidate` + +#### Source + +[`include/signalwire/skills/web_search_core.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/web_search_core.hpp) + +Line 153. + +## Type Aliases + +### json + +#### Signature + +```cpp +typedef nlohmann::json json +``` + +#### Source + +[`include/signalwire/skills/web_search_core.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/web_search_core.hpp) + +Line 50. + +*** + +### steady\_clock + +#### Signature + +```cpp +typedef std::chrono::steady_clock steady_clock +``` + +#### Source + +[`include/signalwire/skills/web_search_core.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/web_search_core.hpp) + +Line 51. + +## Source + +[`include/signalwire/skills/web_search_core.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/web_search_core.hpp) + +Line 48. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/web-search-core/latency-params/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/web-search-core/latency-params/index.mdx new file mode 100644 index 0000000000..30e082fd8c --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/skills/web-search-core/latency-params/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/cpp/signalwire/skills/web-search-core/latency-params" +title: "LatencyParams" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::web_search_core::LatencyParams" + parent: "signalwire::skills::web_search_core" + module: "signalwire.skills.web_search_core" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/web_search_core.hpp" + visibility: "public" +--- +# `LatencyParams` + +Latency-control configuration read from the skill params. + +## Signature + +```cpp +struct signalwire::skills::web_search_core::LatencyParams +``` + +## Properties + + + + + + + + + +## Source + +[`include/signalwire/skills/web_search_core.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/web_search_core.hpp) + +Line 64. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/web-search-skill-r/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/web-search-skill-r/index.mdx new file mode 100644 index 0000000000..3350786160 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/skills/web-search-skill-r/index.mdx @@ -0,0 +1,244 @@ +--- +slug: "/reference/cpp/signalwire/skills/web-search-skill-r" +title: "WebSearchSkillR" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::WebSearchSkillR" + parent: "signalwire::skills" + module: "signalwire.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp" + visibility: "public" +--- +# `WebSearchSkillR` + +## Signature + +```cpp +class signalwire::skills::WebSearchSkillR : signalwire::skills::SkillBase +``` + +## Inheritance + +**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base) + +## Methods + +### get\_global\_data + +Get global data to merge into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +json get_global_data() const +``` + +#### Returns + +`json` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 176. + +*** + +### get\_parameter\_schema + +Get parameter schema for GUI tools. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +json get_parameter_schema() const +``` + +#### Returns + +`json` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 177. + +*** + +### get\_prompt\_sections + +Get prompt sections to inject into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< SkillPromptSection > get_prompt_sections() const +``` + +#### Returns + +`std::vector< SkillPromptSection >` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 175. + +*** + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 131. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +bool setup(const json & params) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 112. + +*** + +### skill\_description + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_description() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 109. + +*** + +### skill\_name + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_name() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 108. + +*** + +### skill\_version + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_version() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 110. + +*** + +### supports\_multiple\_instances + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +bool supports_multiple_instances() const +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 111. + +## Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 96. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/web-search-skill/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/web-search-skill/index.mdx new file mode 100644 index 0000000000..da27b1c065 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/skills/web-search-skill/index.mdx @@ -0,0 +1,252 @@ +--- +slug: "/reference/cpp/signalwire/skills/web-search-skill" +title: "WebSearchSkill" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::WebSearchSkill" + parent: "signalwire::skills" + module: "signalwire.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/web_search.cpp" + visibility: "public" +--- +# `WebSearchSkill` + +Google Custom Search API skill — issues a real GET against Google's customsearch/v1 endpoint, parses the items\[] results, and returns a human-readable summary. Matches Python's WebSearchSkill behavior. +Configuration: +api\_key (or env GOOGLE\_SEARCH\_API\_KEY / GOOGLE\_API\_KEY) +search\_engine\_id (or env GOOGLE\_SEARCH\_ENGINE\_ID / GOOGLE\_CSE\_ID) +num\_results (default 3) +tool\_name (default "web\_search") +WEB\_SEARCH\_BASE\_URL env var overrides the upstream URL (used by audit\_skills\_dispatch.py to point the skill at a fixture) + +## Signature + +```cpp +class signalwire::skills::WebSearchSkill : signalwire::skills::SkillBase +``` + +## Inheritance + +**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base) + +## Methods + +### get\_global\_data + +Get global data to merge into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +json get_global_data() const +``` + +#### Returns + +`json` + +#### Source + +[`src/skills/builtin/web_search.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/web_search.cpp) + +Line 142. + +*** + +### get\_parameter\_schema + +Get parameter schema for GUI tools. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +json get_parameter_schema() const +``` + +#### Returns + +`json` + +#### Source + +[`src/skills/builtin/web_search.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/web_search.cpp) + +Line 150. + +*** + +### get\_prompt\_sections + +Get prompt sections to inject into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< SkillPromptSection > get_prompt_sections() const +``` + +#### Returns + +`std::vector< SkillPromptSection >` + +#### Source + +[`src/skills/builtin/web_search.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/web_search.cpp) + +Line 135. + +*** + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`src/skills/builtin/web_search.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/web_search.cpp) + +Line 59. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +bool setup(const json & params) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/web_search.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/web_search.cpp) + +Line 32. + +*** + +### skill\_description + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_description() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/web_search.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/web_search.cpp) + +Line 28. + +*** + +### skill\_name + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_name() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/web_search.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/web_search.cpp) + +Line 27. + +*** + +### skill\_version + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_version() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/web_search.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/web_search.cpp) + +Line 29. + +*** + +### supports\_multiple\_instances + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +bool supports_multiple_instances() const +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/web_search.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/web_search.cpp) + +Line 30. + +## Source + +[`src/skills/builtin/web_search.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/web_search.cpp) + +Line 25. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/wikipedia-search-skill-r/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/wikipedia-search-skill-r/index.mdx new file mode 100644 index 0000000000..cb7b22b34e --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/skills/wikipedia-search-skill-r/index.mdx @@ -0,0 +1,152 @@ +--- +slug: "/reference/cpp/signalwire/skills/wikipedia-search-skill-r" +title: "WikipediaSearchSkillR" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::WikipediaSearchSkillR" + parent: "signalwire::skills" + module: "signalwire.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp" + visibility: "public" +--- +# `WikipediaSearchSkillR` + +## Signature + +```cpp +class signalwire::skills::WikipediaSearchSkillR : signalwire::skills::SkillBase +``` + +## Inheritance + +**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base) + +## Methods + +### get\_prompt\_sections + +Get prompt sections to inject into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< SkillPromptSection > get_prompt_sections() const +``` + +#### Returns + +`std::vector< SkillPromptSection >` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 238. + +*** + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 198. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +bool setup(const json & params) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 192. + +*** + +### skill\_description + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_description() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 191. + +*** + +### skill\_name + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_name() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 190. + +## Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 186. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/wikipedia-search-skill/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/wikipedia-search-skill/index.mdx new file mode 100644 index 0000000000..6a85b25ddc --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/skills/wikipedia-search-skill/index.mdx @@ -0,0 +1,155 @@ +--- +slug: "/reference/cpp/signalwire/skills/wikipedia-search-skill" +title: "WikipediaSearchSkill" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::WikipediaSearchSkill" + parent: "signalwire::skills" + module: "signalwire.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/wikipedia_search.cpp" + visibility: "public" +--- +# `WikipediaSearchSkill` + +Wikipedia search skill — issues a real GET against the Wikipedia API /w/api.php endpoint with action=query\&list=search, parses the query.search\[] results, and returns titles + snippets. Matches the Python WikipediaSearchSkill upstream call shape. +WIKIPEDIA\_BASE\_URL env var overrides the API root (used by audit\_skills\_dispatch.py to point the skill at its loopback fixture). + +## Signature + +```cpp +class signalwire::skills::WikipediaSearchSkill : signalwire::skills::SkillBase +``` + +## Inheritance + +**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base) + +## Methods + +### get\_prompt\_sections + +Get prompt sections to inject into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< SkillPromptSection > get_prompt_sections() const +``` + +#### Returns + +`std::vector< SkillPromptSection >` + +#### Source + +[`src/skills/builtin/wikipedia_search.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/wikipedia_search.cpp) + +Line 102. + +*** + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`src/skills/builtin/wikipedia_search.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/wikipedia_search.cpp) + +Line 35. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +bool setup(const json & params) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/wikipedia_search.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/wikipedia_search.cpp) + +Line 27. + +*** + +### skill\_description + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_description() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/wikipedia_search.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/wikipedia_search.cpp) + +Line 23. + +*** + +### skill\_name + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_name() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/wikipedia_search.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/wikipedia_search.cpp) + +Line 22. + +## Source + +[`src/skills/builtin/wikipedia_search.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/wikipedia_search.cpp) + +Line 20. diff --git a/fern/products/sdk-reference/cpp/signalwire/swaig/enum-or-string/index.mdx b/fern/products/sdk-reference/cpp/signalwire/swaig/enum-or-string/index.mdx new file mode 100644 index 0000000000..198a4998b5 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/swaig/enum-or-string/index.mdx @@ -0,0 +1,110 @@ +--- +slug: "/reference/cpp/signalwire/swaig/enum-or-string" +title: "EnumOrString" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::swaig::EnumOrString" + parent: "signalwire::swaig" + module: "signalwire.swaig" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp" + visibility: "public" +--- +# `EnumOrString` + +A closed-set field that accepts EITHER the typed enum OR a bare string. +JoinConferenceOptions::beep = ConferenceBeep::OnEnter; and ... = "onEnter"; both compile and resolve to the same wire string; the open-string path keeps parity with Python's bare str (the validation in join\_conference then rejects out-of-set strings exactly as Python does). Templated on the enum type plus its \*\_value() mapper so one definition covers all four sets. + +## Signature + +```cpp +template +struct signalwire::swaig::EnumOrString +``` + +## Type Parameters + + + + + +## Properties + + + +## Methods + +### EnumOrString + +**Modifiers:** `inline` + +#### Signature + + + + ```cpp + void EnumOrString(E e) + ``` + + + + ```cpp + void EnumOrString(const std::string & s) + ``` + + + + ```cpp + void EnumOrString(const char * s) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + +#### Parameters (Overload 3) + + + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 157. + +*** + +### str + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::string & str() const +``` + +#### Returns + +`const std::string &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 160. + +## Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 155. diff --git a/fern/products/sdk-reference/cpp/signalwire/swaig/function-result/index.mdx b/fern/products/sdk-reference/cpp/signalwire/swaig/function-result/index.mdx new file mode 100644 index 0000000000..1503b21a82 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/swaig/function-result/index.mdx @@ -0,0 +1,1632 @@ +--- +slug: "/reference/cpp/signalwire/swaig/function-result" +title: "FunctionResult" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::swaig::FunctionResult" + parent: "signalwire::swaig" + module: "signalwire.swaig" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp" + visibility: "public" +--- +# `FunctionResult` + +Builder for SWAIG function results with 40+ action methods. Every method returns \*this for chaining. + +## Signature + +```cpp +class signalwire::swaig::FunctionResult +``` + +## Methods + +### add\_action + +#### Signature + +```cpp +FunctionResult & add_action(const std::string & name, const json & data) +``` + +#### Parameters + + + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 207. + +*** + +### add\_actions + +#### Signature + +```cpp +FunctionResult & add_actions(const std::vector< json > & actions) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 208. + +*** + +### add\_dynamic\_hints + +#### Signature + +```cpp +FunctionResult & add_dynamic_hints(const json & hints) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 284. + +*** + +### clear\_dynamic\_hints + +#### Signature + +```cpp +FunctionResult & clear_dynamic_hints() +``` + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 285. + +*** + +### connect + +#### Signature + +```cpp +FunctionResult & connect( + const std::string & destination, + bool final = true, + const std::string & from_addr = "" +) +``` + +#### Parameters + + + + + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 214. + +*** + +### create\_payment\_action + +**Modifiers:** `static` + +#### Signature + +```cpp +json create_payment_action( + const std::string & action_type, + const std::string & phrase +) +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 405. + +*** + +### create\_payment\_parameter + +**Modifiers:** `static` + +#### Signature + +```cpp +json create_payment_parameter( + const std::string & name, + const std::string & value +) +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 407. + +*** + +### create\_payment\_prompt + +**Modifiers:** `static` + +#### Signature + +```cpp +json create_payment_prompt( + const std::string & for_situation, + const std::vector< json > & actions, + const std::string & card_type = "", + const std::string & error_type = "" +) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 401. + +*** + +### enable\_extensive\_data + +#### Signature + +```cpp +FunctionResult & enable_extensive_data(bool enabled = true) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 290. + +*** + +### enable\_functions\_on\_timeout + +#### Signature + +```cpp +FunctionResult & enable_functions_on_timeout(bool enabled = true) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 289. + +*** + +### execute\_rpc + +#### Signature + +```cpp +FunctionResult & execute_rpc( + const std::string & method, + const json & params = json::object(), + const std::string & call_id = "", + const std::string & node_id = "" +) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 385. + +*** + +### execute\_swml + +#### Signature + +```cpp +FunctionResult & execute_swml(const json & swml_content, bool transfer = false) +``` + +#### Parameters + + + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 298. + +*** + +### FunctionResult + +**Modifiers:** `explicit` + +#### Signature + +```cpp +void FunctionResult( + const std::string & response = "", + bool post_process = false +) +``` + +#### Parameters + + + + + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 199. + +*** + +### hangup + +#### Signature + +```cpp +FunctionResult & hangup() +``` + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 218. + +*** + +### hold + +#### Signature + +```cpp +FunctionResult & hold(int timeout = 300) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 219. + +*** + +### join\_conference + +Join an ad-hoc audio conference (SWML join\_conference). Full parity with Python core/function\_result.py: 18 optional params past name, 7 validations, and simple (bare-name) vs full-object emission. +Flat positional overload — mirrors the Python signature 1:1 so the cross-language audit lines up on parameter count/types. The closed-set params are bare std::string (Python uses bare str); the options-struct overload below adds the typed enum class affordance. + +#### Signature + + + + ```cpp + FunctionResult & join_conference( + const std::string & name, + bool muted = false, + const std::string & beep = "true", + bool start_on_enter = true, + bool end_on_exit = false, + std::optional< std::string > wait_url = std::nullopt, + int max_participants = 250, + const std::string & record = "do-not-record", + std::optional< std::string > region = std::nullopt, + const std::string & trim = "trim-silence", + std::optional< std::string > coach = std::nullopt, + std::optional< std::string > status_callback_event = std::nullopt, + std::optional< std::string > status_callback = std::nullopt, + const std::string & status_callback_method = "POST", + std::optional< std::string > recording_status_callback = std::nullopt, + const std::string & recording_status_callback_method = "POST", + const std::string & recording_status_callback_event = "completed", + std::optional< json > result = std::nullopt + ) + ``` + + + + ```cpp + FunctionResult & join_conference( + const std::string & name, + const JoinConferenceOptions & opts + ) + ``` + + + +#### Parameters (Overload 1) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`FunctionResult &` + +#### Returns (Overload 2) + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 308. + +*** + +### join\_room + +#### Signature + +```cpp +FunctionResult & join_room(const std::string & name) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 333. + +*** + +### pay + +#### Signature + +```cpp +FunctionResult & pay( + const std::string & payment_connector_url, + const std::string & input_method = "dtmf", + const std::string & status_url = "", + const std::string & payment_method = "credit-card", + int timeout = 5, + int max_attempts = 1, + bool security_code = true, + const std::string & postal_code = "true", + int min_postal_code_length = 0, + const std::string & token_type = "reusable", + const std::string & charge_amount = "", + const std::string & currency = "usd", + const std::string & language = "en-US", + const std::string & voice = "woman", + const std::string & description = "", + const std::string & valid_card_types = "visa mastercard amex", + const std::vector< json > & parameters = {}, + const std::vector< json > & prompts = {}, + const std::string & ai_response = "The payment status is ${pay_result}, do not mention anything else about collecting payment if successful." +) +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 360. + +*** + +### play\_background\_file + +#### Signature + +```cpp +FunctionResult & play_background_file( + const std::string & filename, + bool wait = false +) +``` + +#### Parameters + + + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 247. + +*** + +### record\_call + +Typed overload — format/direction as the RecordFormat / RecordDirection closed-set enums for call-site typo checking. Declared after the std::string overload (equal arity) so the enumerator's dedup keeps the string signature canonical; normalizes the enums to their wire strings via record\_format\_value/record\_direction\_value and delegates to the std::string record\_call, so the emitted SWML is byte-identical. + +#### Signature + + + + ```cpp + FunctionResult & record_call( + const std::string & control_id = "", + bool stereo = false, + const std::string & format = "wav", + const std::string & direction = "both", + const std::string & terminators = "", + bool beep = false, + double input_sensitivity = 44.0, + std::optional< double > initial_timeout = std::nullopt, + std::optional< double > end_silence_timeout = std::nullopt, + std::optional< double > max_length = std::nullopt, + const std::string & status_url = "" + ) + ``` + + + + ```cpp + FunctionResult & record_call( + const std::string & control_id, + bool stereo, + RecordFormat format, + RecordDirection direction, + const std::string & terminators = "", + bool beep = false, + double input_sensitivity = 44.0, + std::optional< double > initial_timeout = std::nullopt, + std::optional< double > end_silence_timeout = std::nullopt, + std::optional< double > max_length = std::nullopt, + const std::string & status_url = "" + ) + ``` + + + +#### Parameters (Overload 1) + + + + + + + + + + + + + + + + + + + + + + + +#### Parameters (Overload 2) + + + + + + + + + + + + + + + + + + + + + + + +#### Returns (Overload 1) + +`FunctionResult &` + +#### Returns (Overload 2) + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 249. + +*** + +### remove\_global\_data + +#### Signature + +```cpp +FunctionResult & remove_global_data(const json & keys) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 230. + +*** + +### remove\_metadata + +#### Signature + +```cpp +FunctionResult & remove_metadata(const json & keys) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 232. + +*** + +### replace\_in\_history + +#### Signature + +```cpp +FunctionResult & replace_in_history(const json & text) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 240. + +*** + +### rpc\_ai\_message + +#### Signature + +```cpp +FunctionResult & rpc_ai_message( + const std::string & call_id, + const std::string & message_text, + const std::string & role = "system" +) +``` + +#### Parameters + + + + + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 391. + +*** + +### rpc\_ai\_unhold + +#### Signature + +```cpp +FunctionResult & rpc_ai_unhold(const std::string & call_id) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 393. + +*** + +### rpc\_dial + +#### Signature + +```cpp +FunctionResult & rpc_dial( + const std::string & to_number, + const std::string & from_number, + const std::string & dest_swml, + const std::string & device_type = "phone" +) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 388. + +*** + +### say + +#### Signature + +```cpp +FunctionResult & say(const std::string & text) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 246. + +*** + +### send\_sms + +#### Signature + +```cpp +FunctionResult & send_sms( + const std::string & to, + const std::string & from, + const std::string & body = "", + const std::vector< std::string > & media = {}, + const std::vector< std::string > & tags = {}, + const std::string & region = "" +) +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 355. + +*** + +### set\_end\_of\_speech\_timeout + +#### Signature + +```cpp +FunctionResult & set_end_of_speech_timeout(int milliseconds) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 286. + +*** + +### set\_metadata + +#### Signature + +```cpp +FunctionResult & set_metadata(const json & data) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 231. + +*** + +### set\_post\_process + +#### Signature + +```cpp +FunctionResult & set_post_process(bool pp) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 206. + +*** + +### set\_response + +#### Signature + +```cpp +FunctionResult & set_response(const std::string & response) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 205. + +*** + +### set\_speech\_event\_timeout + +#### Signature + +```cpp +FunctionResult & set_speech_event_timeout(int milliseconds) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 287. + +*** + +### simulate\_user\_input + +#### Signature + +```cpp +FunctionResult & simulate_user_input(const std::string & text) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 292. + +*** + +### sip\_refer + +#### Signature + +```cpp +FunctionResult & sip_refer(const std::string & to_uri) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 334. + +*** + +### stop + +#### Signature + +```cpp +FunctionResult & stop() +``` + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 223. + +*** + +### stop\_background\_file + +#### Signature + +```cpp +FunctionResult & stop_background_file() +``` + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 248. + +*** + +### stop\_record\_call + +#### Signature + +```cpp +FunctionResult & stop_record_call(const std::string & control_id = "") +``` + +#### Parameters + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 278. + +*** + +### stop\_tap + +#### Signature + +```cpp +FunctionResult & stop_tap(const std::string & control_id = "") +``` + +#### Parameters + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 354. + +*** + +### switch\_context + +#### Signature + +```cpp +FunctionResult & switch_context( + const std::string & system_prompt = "", + const std::string & user_prompt = "", + bool consolidate = false, + bool full_reset = false +) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 236. + +*** + +### swml\_change\_context + +#### Signature + +```cpp +FunctionResult & swml_change_context(const std::string & context_name) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 235. + +*** + +### swml\_change\_step + +#### Signature + +```cpp +FunctionResult & swml_change_step(const std::string & step_name) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 234. + +*** + +### swml\_transfer + +#### Signature + +```cpp +FunctionResult & swml_transfer( + const std::string & dest, + const std::string & ai_response, + bool final = true +) +``` + +#### Parameters + + + + + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 216. + +*** + +### swml\_user\_event + +#### Signature + +```cpp +FunctionResult & swml_user_event(const json & event_data) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 233. + +*** + +### tap + +Typed overload — direction/codec as the TapDirection / Codec closed-set enums for call-site typo checking. Declared after the std::string overload (equal arity) so the enumerator's dedup keeps the string signature canonical; normalizes the enums via tap\_direction\_value/codec\_value and delegates to the std::string tap, so the emitted SWML is byte-identical. NOTE the tap direction set is \{speak,hear,both\} (hear, not record\_call's listen). + +#### Signature + + + + ```cpp + FunctionResult & tap( + const std::string & uri, + const std::string & control_id = "", + const std::string & direction = "both", + const std::string & codec = "PCMU", + int rtp_ptime = 20, + const std::string & status_url = "" + ) + ``` + + + + ```cpp + FunctionResult & tap( + const std::string & uri, + const std::string & control_id, + TapDirection direction, + Codec codec, + int rtp_ptime = 20, + const std::string & status_url = "" + ) + ``` + + + +#### Parameters (Overload 1) + + + + + + + + + + + + + +#### Parameters (Overload 2) + + + + + + + + + + + + + +#### Returns (Overload 1) + +`FunctionResult &` + +#### Returns (Overload 2) + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 335. + +*** + +### to\_json + +**Modifiers:** `const` + +#### Signature + +```cpp +json to_json() const +``` + +#### Returns + +`json` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 418. + +*** + +### to\_string + +**Modifiers:** `const` + +#### Signature + +```cpp +std::string to_string(int indent = -1) const +``` + +#### Parameters + + + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 419. + +*** + +### toggle\_functions + +#### Signature + +```cpp +FunctionResult & toggle_functions(const json & function_toggles) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 288. + +*** + +### update\_global\_data + +#### Signature + +```cpp +FunctionResult & update_global_data(const json & data) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 229. + +*** + +### update\_settings + +#### Signature + +```cpp +FunctionResult & update_settings(const json & settings) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 291. + +*** + +### wait\_for\_user + +#### Signature + +```cpp +FunctionResult & wait_for_user( + std::optional< bool > enabled = std::nullopt, + std::optional< int > timeout = std::nullopt, + bool answer_first = false +) +``` + +#### Parameters + + + + + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 220. + +## Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 197. diff --git a/fern/products/sdk-reference/cpp/signalwire/swaig/index.mdx b/fern/products/sdk-reference/cpp/signalwire/swaig/index.mdx new file mode 100644 index 0000000000..a77a5a88c0 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/swaig/index.mdx @@ -0,0 +1,721 @@ +--- +slug: "/reference/cpp/signalwire/swaig" +title: "swaig" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "module" + language: "cpp" + qualified_name: "signalwire::swaig" + parent: "signalwire" + module: "signalwire" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp" +--- +# `swaig` + +## Signature + +```cpp +namespace signalwire::swaig +``` + +## Classes + + + + A closed-set field that accepts EITHER the typed enum OR a bare string. JoinConferenceOptions::beep = ConferenceBeep::OnEnter; and ... = "onEnter"; both compile and resolve to the same wire string; the open-string path keeps parity with Python's bare str (the validation in join\_conference then rejects out-of-set strings exactly as Python does). Templated on the enum type plus its \*\_value() mapper so one definition covers all four sets. + + + + Builder for SWAIG function results with 40+ action methods. Every method returns \*this for chaining. + + + + Options bag for FunctionResult::join\_conference. Every field is std::optional and unset means "Python default" — so a default-constructed JoinConferenceOptions collapses to the bare conference-name string form, matching the reference's simple case. Closed sets use the enum-or-string wrapper above; open fields are plain std::optional. result is a free-form json (Python's Optional\[Any]). + + + + A typed, fluent builder for a SWAIG tool's parameters JSON-Schema object. Construct, chain property declarations, optionally mark some required, then call to\_json() to get the wire json. The result is byte-identical to the equivalent hand-written json::object(...) blob. + + + + Definition of a SWAIG tool (function). + + + +## Functions + +### callback\_method\_value + +**Modifiers:** `inline` + +#### Signature + +```cpp +std::string callback_method_value(CallbackMethod v) +``` + +#### Parameters + + + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 60. + +*** + +### codec\_value + +**Modifiers:** `inline` + +#### Signature + +```cpp +std::string codec_value(Codec v) +``` + +#### Parameters + + + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 131. + +*** + +### codec\_values + +**Modifiers:** `inline` + +#### Signature + +```cpp +std::vector< std::string > codec_values() +``` + +#### Returns + +`std::vector< std::string >` + +#### Source + +[`include/signalwire/swaig/parameter_schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/parameter_schema.hpp) + +Line 79. + +*** + +### conference\_beep\_value + +**Modifiers:** `inline` + +#### Signature + +```cpp +std::string conference_beep_value(ConferenceBeep v) +``` + +#### Parameters + + + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 37. + +*** + +### conference\_record\_value + +**Modifiers:** `inline` + +#### Signature + +```cpp +std::string conference_record_value(ConferenceRecord v) +``` + +#### Parameters + + + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 46. + +*** + +### conference\_trim\_value + +**Modifiers:** `inline` + +#### Signature + +```cpp +std::string conference_trim_value(ConferenceTrim v) +``` + +#### Parameters + + + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 53. + +*** + +### record\_direction\_value + +**Modifiers:** `inline` + +#### Signature + +```cpp +std::string record_direction_value(RecordDirection v) +``` + +#### Parameters + + + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 115. + +*** + +### record\_direction\_values + +**Modifiers:** `inline` + +#### Signature + +```cpp +std::vector< std::string > record_direction_values() +``` + +#### Returns + +`std::vector< std::string >` + +#### Source + +[`include/signalwire/swaig/parameter_schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/parameter_schema.hpp) + +Line 69. + +*** + +### record\_format\_value + +**Modifiers:** `inline` + +#### Signature + +```cpp +std::string record_format_value(RecordFormat v) +``` + +#### Parameters + + + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 107. + +*** + +### record\_format\_values + +Helper: the closed-set values for the Tier-1 SWAIG enums, as the exact wire strings, ready to hand to enum\_of(...). These reuse the SAME \*\_value() normalization point as the typed FunctionResult overloads, so a schema built with record\_format\_values() lists precisely the strings FunctionResult::record\_call accepts — one source of truth for each set. + +**Modifiers:** `inline` + +#### Signature + +```cpp +std::vector< std::string > record_format_values() +``` + +#### Returns + +`std::vector< std::string >` + +#### Source + +[`include/signalwire/swaig/parameter_schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/parameter_schema.hpp) + +Line 64. + +*** + +### tap\_direction\_value + +**Modifiers:** `inline` + +#### Signature + +```cpp +std::string tap_direction_value(TapDirection v) +``` + +#### Parameters + + + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 123. + +*** + +### tap\_direction\_values + +**Modifiers:** `inline` + +#### Signature + +```cpp +std::vector< std::string > tap_direction_values() +``` + +#### Returns + +`std::vector< std::string >` + +#### Source + +[`include/signalwire/swaig/parameter_schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/parameter_schema.hpp) + +Line 74. + +*** + +### to\_string + +ADL to\_string overloads so these enums stringify the same way the \*\_value() mappers do (the single wire-string normalization point). + +**Modifiers:** `inline` + +#### Signature + + + + ```cpp + std::string to_string(RecordFormat v) + ``` + + + + ```cpp + std::string to_string(RecordDirection v) + ``` + + + + ```cpp + std::string to_string(TapDirection v) + ``` + + + + ```cpp + std::string to_string(Codec v) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + +#### Parameters (Overload 3) + + + +#### Parameters (Overload 4) + + + +#### Returns (Overload 1) + +`std::string` + +#### Returns (Overload 2) + +`std::string` + +#### Returns (Overload 3) + +`std::string` + +#### Returns (Overload 4) + +`std::string` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 141. + +## Type Aliases + +### BeepField + +#### Signature + +```cpp +typedef EnumOrString< ConferenceBeep, &conference_beep_value > BeepField +``` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 163. + +*** + +### json + +#### Signature + +```cpp +typedef nlohmann::json json +``` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 11. + +*** + +### MethodField + +#### Signature + +```cpp +typedef EnumOrString< CallbackMethod, &callback_method_value > MethodField +``` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 166. + +*** + +### RecordField + +#### Signature + +```cpp +typedef EnumOrString< ConferenceRecord, &conference_record_value > RecordField +``` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 164. + +*** + +### ToolHandler + +#### Signature + +```cpp +typedef std::function< FunctionResult(const json &args, const json &raw_data)> ToolHandler +``` + +#### Source + +[`include/signalwire/swaig/tool_definition.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/tool_definition.hpp) + +Line 12. + +*** + +### TrimField + +#### Signature + +```cpp +typedef EnumOrString< ConferenceTrim, &conference_trim_value > TrimField +``` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 165. + +## Enums + +### CallbackMethod + +status\_callback\_method / recording\_status\_callback\_method — HTTP verb. + +#### Signature + +```cpp +enum class CallbackMethod +``` + +#### Variants + + + + + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 32. + +*** + +### Codec + +Media codec for FunctionResult::tap (SWAIG tap only). Mirrors the reference's codec in \{"PCMU","PCMA"\} validation. The wire strings are upper-case. Distinct from the wider RELAY codec set — do not unify. + +#### Signature + +```cpp +enum class Codec +``` + +#### Variants + + + + + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 105. + +*** + +### ConferenceBeep + +beep — when the conference plays an enter/leave tone. + +#### Signature + +```cpp +enum class ConferenceBeep +``` + +#### Variants + + + + + + + + + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 26. + +*** + +### ConferenceRecord + +record — conference recording mode. + +#### Signature + +```cpp +enum class ConferenceRecord +``` + +#### Variants + + + + + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 28. + +*** + +### ConferenceTrim + +trim — leading/trailing silence handling on recordings. + +#### Signature + +```cpp +enum class ConferenceTrim +``` + +#### Variants + + + + + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 30. + +*** + +### RecordDirection + +Audio direction for FunctionResult::record\_call. Mirrors the reference's direction in \{"speak","listen","both"\} validation. NOTE: differs from TapDirection — record\_call uses listen, tap uses hear. + +#### Signature + +```cpp +enum class RecordDirection +``` + +#### Variants + + + + + + + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 95. + +*** + +### RecordFormat + +Recording container format for FunctionResult::record\_call. Mirrors the reference's format in \{"wav","mp3","mp4"\} validation. + +#### Signature + +```cpp +enum class RecordFormat +``` + +#### Variants + + + + + + + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 90. + +*** + +### TapDirection + +Audio direction for FunctionResult::tap. Mirrors the reference's direction in \{"speak","hear","both"\} validation. NOTE: differs from RecordDirection — tap uses hear, record\_call uses listen. + +#### Signature + +```cpp +enum class TapDirection +``` + +#### Variants + + + + + + + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 100. + +## Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 9. diff --git a/fern/products/sdk-reference/cpp/signalwire/swaig/join-conference-options/index.mdx b/fern/products/sdk-reference/cpp/signalwire/swaig/join-conference-options/index.mdx new file mode 100644 index 0000000000..5a746c2981 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/swaig/join-conference-options/index.mdx @@ -0,0 +1,67 @@ +--- +slug: "/reference/cpp/signalwire/swaig/join-conference-options" +title: "JoinConferenceOptions" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::swaig::JoinConferenceOptions" + parent: "signalwire::swaig" + module: "signalwire.swaig" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp" + visibility: "public" +--- +# `JoinConferenceOptions` + +Options bag for FunctionResult::join\_conference. +Every field is std::optional and unset means "Python default" — so a default-constructed JoinConferenceOptions collapses to the bare conference-name string form, matching the reference's simple case. Closed sets use the enum-or-string wrapper above; open fields are plain std::optional. result is a free-form json (Python's Optional\[Any]). + +## Signature + +```cpp +struct signalwire::swaig::JoinConferenceOptions +``` + +## Properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 175. diff --git a/fern/products/sdk-reference/cpp/signalwire/swaig/parameter-schema/index.mdx b/fern/products/sdk-reference/cpp/signalwire/swaig/parameter-schema/index.mdx new file mode 100644 index 0000000000..30f557fece --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/swaig/parameter-schema/index.mdx @@ -0,0 +1,492 @@ +--- +slug: "/reference/cpp/signalwire/swaig/parameter-schema" +title: "ParameterSchema" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::swaig::ParameterSchema" + parent: "signalwire::swaig" + module: "signalwire.swaig" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/parameter_schema.hpp" + visibility: "public" +--- +# `ParameterSchema` + +A typed, fluent builder for a SWAIG tool's parameters JSON-Schema object. +Construct, chain property declarations, optionally mark some required, then call to\_json() to get the wire json. The result is byte-identical to the equivalent hand-written json::object(...) blob. + +## Signature + +```cpp +class signalwire::swaig::ParameterSchema +``` + +## Methods + +### array\_of + +Add a "type":"array" property whose items are the given scalar JSON kind (e.g. array\_of("tags", "string", "...") → \{"type":"array", "items":\{"type":"string"\}\}). + +**Modifiers:** `inline` + +#### Signature + + + + ```cpp + ParameterSchema & array_of( + const std::string & name, + const std::string & item_type, + const std::string & description = "" + ) + ``` + + + + ```cpp + ParameterSchema & array_of( + const std::string & name, + const ParameterSchema & item_schema, + const std::string & description = "" + ) + ``` + + + +#### Parameters (Overload 1) + + + + + + + +#### Parameters (Overload 2) + + + + + + + +#### Returns (Overload 1) + +`ParameterSchema &` + +#### Returns (Overload 2) + +`ParameterSchema &` + +#### Source + +[`include/signalwire/swaig/parameter_schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/parameter_schema.hpp) + +Line 147. + +*** + +### boolean + +Add a "type":"boolean" property. + +**Modifiers:** `inline` + +#### Signature + +```cpp +ParameterSchema & boolean( + const std::string & name, + const std::string & description = "" +) +``` + +#### Parameters + + + + + +#### Returns + +`ParameterSchema &` + +#### Source + +[`include/signalwire/swaig/parameter_schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/parameter_schema.hpp) + +Line 116. + +*** + +### empty + +True if no properties have been declared yet. + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +bool empty() const +``` + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/swaig/parameter_schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/parameter_schema.hpp) + +Line 246. + +*** + +### enum\_of + +Add a "type":"string" property constrained to a closed set of values ("enum":\[...]). Pass the values explicitly, or feed one of the Tier-1 helpers (record\_format\_values(), codec\_values(), …) so the schema's accepted set matches the typed FunctionResult overloads exactly — INTEGRATING the RecordFormat/RecordDirection/TapDirection/ Codec enums via their \*\_value() wire strings. + +**Modifiers:** `inline` + +#### Signature + +```cpp +ParameterSchema & enum_of( + const std::string & name, + const std::vector< std::string > & values, + const std::string & description = "" +) +``` + +#### Parameters + + + + + + + +#### Returns + +`ParameterSchema &` + +#### Source + +[`include/signalwire/swaig/parameter_schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/parameter_schema.hpp) + +Line 129. + +*** + +### integer + +Add a "type":"integer" property. + +**Modifiers:** `inline` + +#### Signature + +```cpp +ParameterSchema & integer( + const std::string & name, + const std::string & description = "" +) +``` + +#### Parameters + + + + + +#### Returns + +`ParameterSchema &` + +#### Source + +[`include/signalwire/swaig/parameter_schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/parameter_schema.hpp) + +Line 110. + +*** + +### number + +Add a "type":"number" property (JSON number — floating point). + +**Modifiers:** `inline` + +#### Signature + +```cpp +ParameterSchema & number( + const std::string & name, + const std::string & description = "" +) +``` + +#### Parameters + + + + + +#### Returns + +`ParameterSchema &` + +#### Source + +[`include/signalwire/swaig/parameter_schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/parameter_schema.hpp) + +Line 104. + +*** + +### object\_of + +Add a nested "type":"object" property, whose properties/required come from another ParameterSchema. The nested schema is rendered via to\_json() and merged with this property's description, producing the same \{"type":"object","properties":\{...\},"required":\[...]\} a hand-written nested blob would. + +**Modifiers:** `inline` + +#### Signature + +```cpp +ParameterSchema & object_of( + const std::string & name, + const ParameterSchema & nested, + const std::string & description = "" +) +``` + +#### Parameters + + + + + + + +#### Returns + +`ParameterSchema &` + +#### Source + +[`include/signalwire/swaig/parameter_schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/parameter_schema.hpp) + +Line 179. + +*** + +### operator json + +Implicit conversion so a ParameterSchema can be passed straight to define\_tool(name, desc, schema, handler) (which takes const json&) without an explicit .to\_json(). Keeps the typed builder a drop-in for the raw-json parameter. + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +void operator json() const +``` + +#### Source + +[`include/signalwire/swaig/parameter_schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/parameter_schema.hpp) + +Line 241. + +*** + +### ParameterSchema + +#### Signature + +```cpp +void ParameterSchema() +``` + +#### Source + +[`include/signalwire/swaig/parameter_schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/parameter_schema.hpp) + +Line 91. + +*** + +### property + +Add a property from a raw, pre-built JSON-Schema fragment, for shapes the typed kinds above don't cover (custom format, minimum, oneOf, …). Keeps the builder a strict superset of the hand-written path: you can always drop down to raw json for one property without abandoning the builder for the rest. + +**Modifiers:** `inline` + +#### Signature + +```cpp +ParameterSchema & property(const std::string & name, const json & schema) +``` + +#### Parameters + + + + + +#### Returns + +`ParameterSchema &` + +#### Source + +[`include/signalwire/swaig/parameter_schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/parameter_schema.hpp) + +Line 195. + +*** + +### require + +Append a single name to the required list (additive variant). + +**Modifiers:** `inline` + +#### Signature + +```cpp +ParameterSchema & require(const std::string & name) +``` + +#### Parameters + + + +#### Returns + +`ParameterSchema &` + +#### Source + +[`include/signalwire/swaig/parameter_schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/parameter_schema.hpp) + +Line 211. + +*** + +### required + +Mark one or more declared properties as required. Replaces any previously-set required list (call once with the full set, mirroring the single "required":\[...] array in the hand-written form). + +**Modifiers:** `inline` + +#### Signature + +```cpp +ParameterSchema & required(const std::vector< std::string > & names) +``` + +#### Parameters + + + +#### Returns + +`ParameterSchema &` + +#### Source + +[`include/signalwire/swaig/parameter_schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/parameter_schema.hpp) + +Line 205. + +*** + +### size + +Number of declared properties. + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +std::size_t size() const +``` + +#### Returns + +`std::size_t` + +#### Source + +[`include/signalwire/swaig/parameter_schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/parameter_schema.hpp) + +Line 249. + +*** + +### string + +Add a "type":"string" property. + +**Modifiers:** `inline` + +#### Signature + +```cpp +ParameterSchema & string( + const std::string & name, + const std::string & description = "" +) +``` + +#### Parameters + + + + + +#### Returns + +`ParameterSchema &` + +#### Source + +[`include/signalwire/swaig/parameter_schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/parameter_schema.hpp) + +Line 98. + +*** + +### to\_json + +Render to the wire json: a JSON-Schema object with properties and (when any were marked) required. BYTE-IDENTICAL to the equivalent hand-written json::object(\{\{"type","object"\},\{"properties",\{...\}\}, \{"required",\[...]\}\}). +\[\[nodiscard]]: the rendered schema is the builder's whole output; discarding it discards the build. + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json to_json() const +``` + +#### Returns + +`json` + +#### Source + +[`include/signalwire/swaig/parameter_schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/parameter_schema.hpp) + +Line 225. + +## Source + +[`include/signalwire/swaig/parameter_schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/parameter_schema.hpp) + +Line 89. diff --git a/fern/products/sdk-reference/cpp/signalwire/swaig/tool-definition/index.mdx b/fern/products/sdk-reference/cpp/signalwire/swaig/tool-definition/index.mdx new file mode 100644 index 0000000000..f3def33e41 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/swaig/tool-definition/index.mdx @@ -0,0 +1,70 @@ +--- +slug: "/reference/cpp/signalwire/swaig/tool-definition" +title: "ToolDefinition" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::swaig::ToolDefinition" + parent: "signalwire::swaig" + module: "signalwire.swaig" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/tool_definition.hpp" + visibility: "public" +--- +# `ToolDefinition` + +Definition of a SWAIG tool (function). + +## Signature + +```cpp +struct signalwire::swaig::ToolDefinition +``` + +## Properties + + + + + + + + + + + +## Methods + +### to\_swaig\_json + +Render to the SWAIG function JSON format (for inclusion in SWML) \[\[nodiscard]]: the rendered JSON is the output; discarding it is a bug. + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json to_swaig_json(const std::string & web_hook_url = "") const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/swaig/tool_definition.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/tool_definition.hpp) + +Line 24. + +## Source + +[`include/signalwire/swaig/tool_definition.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/tool_definition.hpp) + +Line 15. diff --git a/fern/products/sdk-reference/cpp/signalwire/swml/document/index.mdx b/fern/products/sdk-reference/cpp/signalwire/swml/document/index.mdx new file mode 100644 index 0000000000..5b820ba4f7 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/swml/document/index.mdx @@ -0,0 +1,274 @@ +--- +slug: "/reference/cpp/signalwire/swml/document" +title: "Document" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::swml::Document" + parent: "signalwire::swml" + module: "signalwire.swml" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/document.hpp" + visibility: "public" +--- +# `Document` + +A complete SWML document with version and sections. + +## Signature + +```cpp +class signalwire::swml::Document +``` + +## Methods + +### add\_verb + +Add a verb to the main section. + +**Modifiers:** `inline` + +#### Signature + +```cpp +Document & add_verb(const std::string & verb_name, const json & params) +``` + +#### Parameters + + + + + +#### Returns + +`Document &` + +#### Source + +[`include/signalwire/swml/document.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/document.hpp) + +Line 81. + +*** + +### add\_verb\_to\_section + +Add a verb to a specific section. + +**Modifiers:** `inline` + +#### Signature + +```cpp +Document & add_verb_to_section( + const std::string & section_name, + const std::string & verb_name, + const json & params +) +``` + +#### Parameters + + + + + + + +#### Returns + +`Document &` + +#### Source + +[`include/signalwire/swml/document.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/document.hpp) + +Line 87. + +*** + +### Document + +**Modifiers:** `inline` + +#### Signature + +```cpp +void Document() +``` + +#### Source + +[`include/signalwire/swml/document.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/document.hpp) + +Line 55. + +*** + +### has\_section + +Check if a section exists. + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +bool has_section(const std::string & name) const +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/swml/document.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/document.hpp) + +Line 95. + +*** + +### main + +Get the main section. + +**Modifiers:** `inline` + +#### Signature + +```cpp +Section & main() +``` + +#### Returns + +`Section &` + +#### Source + +[`include/signalwire/swml/document.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/document.hpp) + +Line 76. + +*** + +### section + +Get or create a section by name. + +**Modifiers:** `inline` + +#### Signature + +```cpp +Section & section(const std::string & name) +``` + +#### Parameters + + + +#### Returns + +`Section &` + +#### Source + +[`include/signalwire/swml/document.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/document.hpp) + +Line 66. + +*** + +### set\_version + +Set the document version. + +**Modifiers:** `inline` + +#### Signature + +```cpp +Document & set_version(const std::string & version) +``` + +#### Parameters + + + +#### Returns + +`Document &` + +#### Source + +[`include/signalwire/swml/document.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/document.hpp) + +Line 60. + +*** + +### to\_json + +Render to JSON. + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json to_json() const +``` + +#### Returns + +`json` + +#### Source + +[`include/signalwire/swml/document.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/document.hpp) + +Line 100. + +*** + +### to\_string + +Render to JSON string. + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +std::string to_string(int indent = -1) const +``` + +#### Parameters + + + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/swml/document.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/document.hpp) + +Line 124. + +## Source + +[`include/signalwire/swml/document.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/document.hpp) + +Line 53. diff --git a/fern/products/sdk-reference/cpp/signalwire/swml/index.mdx b/fern/products/sdk-reference/cpp/signalwire/swml/index.mdx new file mode 100644 index 0000000000..30f406ac5c --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/swml/index.mdx @@ -0,0 +1,97 @@ +--- +slug: "/reference/cpp/signalwire/swml" +title: "swml" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "module" + language: "cpp" + qualified_name: "signalwire::swml" + parent: "signalwire" + module: "signalwire" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/document.hpp" +--- +# `swml` + +## Signature + +```cpp +namespace signalwire::swml +``` + +## Constants + + + +## Classes + + + + A complete SWML document with version and sections. + + + + Schema loader that extracts verb definitions from schema.json. + + + + A named section containing an ordered list of verbs. + + + + Base SWML service providing HTTP server, auth, and verb methods. Also hosts SWAIG functions: any Service (sidecar, non-agent verb host) can register tools and serve them on /swaig without subclassing AgentBase. + + + + Represents a single SWML verb instance, e.g. \{"answer": \{"max\_duration": 3600\}\}. + + + + Represents a verb definition extracted from the SWML schema. + + + +## Functions + +### get\_embedded\_schema + +Get the embedded schema JSON string. + +#### Signature + +```cpp +const std::string & get_embedded_schema() +``` + +#### Returns + +`const std::string &` + +#### Source + +[`src/swml/schema.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/swml/schema.cpp) + +Line 52. + +## Type Aliases + +### json + +#### Signature + +```cpp +typedef nlohmann::json json +``` + +#### Source + +[`include/signalwire/swml/document.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/document.hpp) + +Line 12. + +## Source + +[`include/signalwire/swml/document.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/document.hpp) + +Line 10. diff --git a/fern/products/sdk-reference/cpp/signalwire/swml/schema/index.mdx b/fern/products/sdk-reference/cpp/signalwire/swml/schema/index.mdx new file mode 100644 index 0000000000..f1db43aee7 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/swml/schema/index.mdx @@ -0,0 +1,220 @@ +--- +slug: "/reference/cpp/signalwire/swml/schema" +title: "Schema" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::swml::Schema" + parent: "signalwire::swml" + module: "signalwire.swml" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/schema.hpp" + visibility: "public" +--- +# `Schema` + +Schema loader that extracts verb definitions from schema.json. + +## Signature + +```cpp +class signalwire::swml::Schema +``` + +## Methods + +### find\_verb + +Get a specific verb definition by verb name. + +**Modifiers:** `const` + +#### Signature + +```cpp +const VerbDefinition * find_verb(const std::string & verb_name) const +``` + +#### Parameters + + + +#### Returns + +`const VerbDefinition *` + +#### Source + +[`include/signalwire/swml/schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/schema.hpp) + +Line 41. + +*** + +### load\_embedded + +Load the embedded schema. + +#### Signature + +```cpp +bool load_embedded() +``` + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/swml/schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/schema.hpp) + +Line 35. + +*** + +### load\_from\_file + +Load schema from a file path. + +#### Signature + +```cpp +bool load_from_file(const std::string & path) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/swml/schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/schema.hpp) + +Line 32. + +*** + +### load\_from\_string + +Load schema from a JSON string. + +#### Signature + +```cpp +bool load_from_string(const std::string & schema_json) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/swml/schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/schema.hpp) + +Line 29. + +*** + +### raw + +Get the raw schema JSON. + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const json & raw() const +``` + +#### Returns + +`const json &` + +#### Source + +[`include/signalwire/swml/schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/schema.hpp) + +Line 47. + +*** + +### Schema + +#### Signature + +```cpp +void Schema() +``` + +#### Source + +[`include/signalwire/swml/schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/schema.hpp) + +Line 24. + +*** + +### verb\_definitions + +Get all verb definitions. + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::vector< VerbDefinition > & verb_definitions() const +``` + +#### Returns + +`const std::vector< VerbDefinition > &` + +#### Source + +[`include/signalwire/swml/schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/schema.hpp) + +Line 38. + +*** + +### verb\_names + +Get all verb names. + +**Modifiers:** `const` + +#### Signature + +```cpp +std::vector< std::string > verb_names() const +``` + +#### Returns + +`std::vector< std::string >` + +#### Source + +[`include/signalwire/swml/schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/schema.hpp) + +Line 44. + +## Source + +[`include/signalwire/swml/schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/schema.hpp) + +Line 22. diff --git a/fern/products/sdk-reference/cpp/signalwire/swml/section/index.mdx b/fern/products/sdk-reference/cpp/signalwire/swml/section/index.mdx new file mode 100644 index 0000000000..df52e4dbe0 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/swml/section/index.mdx @@ -0,0 +1,126 @@ +--- +slug: "/reference/cpp/signalwire/swml/section" +title: "Section" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::swml::Section" + parent: "signalwire::swml" + module: "signalwire.swml" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/document.hpp" + visibility: "public" +--- +# `Section` + +A named section containing an ordered list of verbs. + +## Signature + +```cpp +struct signalwire::swml::Section +``` + +## Properties + + + + + +## Methods + +### add\_verb + +**Modifiers:** `inline` + +#### Signature + + + + ```cpp + void add_verb(const Verb & verb) + ``` + + + + ```cpp + void add_verb(const std::string & verb_name, const json & params) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Source + +[`include/signalwire/swml/document.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/document.hpp) + +Line 35. + +*** + +### Section + +#### Signature + + + + ```cpp + void Section() + ``` + + + + ```cpp + void Section(std::string n) + ``` + + + +#### Parameters (Overload 2) + + + +#### Source + +[`include/signalwire/swml/document.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/document.hpp) + +Line 32. + +*** + +### to\_json + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json to_json() const +``` + +#### Returns + +`json` + +#### Source + +[`include/signalwire/swml/document.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/document.hpp) + +Line 43. + +## Source + +[`include/signalwire/swml/document.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/document.hpp) + +Line 28. diff --git a/fern/products/sdk-reference/cpp/signalwire/swml/service/index.mdx b/fern/products/sdk-reference/cpp/signalwire/swml/service/index.mdx new file mode 100644 index 0000000000..58ba7e9a67 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/swml/service/index.mdx @@ -0,0 +1,2134 @@ +--- +slug: "/reference/cpp/signalwire/swml/service" +title: "Service" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::swml::Service" + parent: "signalwire::swml" + module: "signalwire.swml" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp" + visibility: "public" +--- +# `Service` + +Base SWML service providing HTTP server, auth, and verb methods. Also hosts SWAIG functions: any Service (sidecar, non-agent verb host) can register tools and serve them on /swaig without subclassing AgentBase. + +## Signature + +```cpp +class signalwire::swml::Service +``` + +## Methods + +### ~Service + +**Modifiers:** `virtual` + +#### Signature + +```cpp +void ~Service() +``` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 36. + +*** + +### add\_security\_headers + +Add security headers to response. + +**Modifiers:** `static` + +#### Signature + +```cpp +void add_security_headers(httplib::Response & res) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 275. + +*** + +### add\_verb + +#### Signature + +```cpp +Service & add_verb( + const std::string & section, + const std::string & verb_name, + const json & params +) +``` + +#### Parameters + + + + + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 131. + +*** + +### ai + +#### Signature + +```cpp +Service & ai(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 89. + +*** + +### amazon\_bedrock + +#### Signature + +```cpp +Service & amazon_bedrock(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 90. + +*** + +### answer + +#### Signature + +```cpp +Service & answer(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 88. + +*** + +### auth\_password + +Get the password for basic auth. + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::string & auth_password() const +``` + +#### Returns + +`const std::string &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 63. + +*** + +### auth\_username + +Get the username for basic auth. + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::string & auth_username() const +``` + +#### Returns + +`const std::string &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 60. + +*** + +### build\_tool\_registry\_json + +Build the introspect payload for the registered tools as a JSON string shaped like \{"tools":\[\]\}. Iterates tool\_order\_ first, falling back to map order for entries registered only via register\_swaig\_function. Stable across SDKs so the swaig-test --example CLI can parse output uniformly. Used by the SWAIG\_LIST\_TOOLS env-var path; pulled out as a separate helper so tests can assert content without invoking exit(). + +**Modifiers:** `const` + +#### Signature + +```cpp +std::string build_tool_registry_json() const +``` + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 204. + +*** + +### cond + +#### Signature + +```cpp +Service & cond(const json & params = json::array()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 91. + +*** + +### connect + +#### Signature + +```cpp +Service & connect(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 92. + +*** + +### define\_tool + +Define a SWAIG function the AI can call. + +#### Signature + + + + ```cpp + Service & define_tool( + const std::string & name, + const std::string & description, + const json & parameters, + swaig::ToolHandler handler, + bool secure = false + ) + ``` + + + + ```cpp + Service & define_tool(const swaig::ToolDefinition & tool) + ``` + + + +#### Parameters (Overload 1) + + + + + + + + + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`Service &` + +#### Returns (Overload 2) + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 156. + +*** + +### denoise + +#### Signature + +```cpp +Service & denoise(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 93. + +*** + +### detect\_machine + +#### Signature + +```cpp +Service & detect_machine(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 94. + +*** + +### document + +Get the underlying SWML document. + +**Modifiers:** `inline` + +#### Signature + + + + ```cpp + Document & document() + ``` + + + + ```cpp + const Document & document() const + ``` + + + +#### Returns (Overload 1) + +`Document &` + +#### Returns (Overload 2) + +`const Document &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 138. + +*** + +### enter\_queue + +#### Signature + +```cpp +Service & enter_queue(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 95. + +*** + +### execute + +#### Signature + +```cpp +Service & execute(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 96. + +*** + +### extract\_introspect\_payload + +Pure-string extractor: slice the JSON payload between **SWAIG\_TOOLS\_BEGIN** and **SWAIG\_TOOLS\_END** sentinels in a captured stdout. Returns empty string if either marker is missing or the order is wrong. Static so the swaig-test CLI / tests can reuse it. + +**Modifiers:** `static` + +#### Signature + +```cpp +std::string extract_introspect_payload(const std::string & stdout_capture) +``` + +#### Parameters + + + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 209. + +*** + +### generate\_random\_hex + +Generate a random hex string of given byte length. + +**Modifiers:** `static` + +#### Signature + +```cpp +std::string generate_random_hex(size_t bytes) +``` + +#### Parameters + + + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 228. + +*** + +### get\_all\_functions + +Snapshot of all registered SWAIG functions keyed by name. Returned by value so subsequent registrations don't mutate the snapshot. Python parity: ToolRegistry.get\_all\_functions. + +**Modifiers:** `const` + +#### Signature + +```cpp +std::map< std::string, swaig::ToolDefinition > get_all_functions() const +``` + +#### Returns + +`std::map< std::string, swaig::ToolDefinition >` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 190. + +*** + +### get\_basic\_auth\_credentials + +Get (user, password) — Python-canonical name. Python parity: AuthMixin.get\_basic\_auth\_credentials. + +**Modifiers:** `const` + +#### Signature + +```cpp +std::pair< std::string, std::string > get_basic_auth_credentials() const +``` + +#### Returns + +`std::pair< std::string, std::string >` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 76. + +*** + +### get\_basic\_auth\_credentials\_with\_source + +Get (user, password, source) where source is one of "provided", "environment", or "generated". Python parity: AuthMixin.get\_basic\_auth\_credentials(include\_source=True). + +**Modifiers:** `const` + +#### Signature + +```cpp +std::tuple< std::string, std::string, std::string > get_basic_auth_credentials_with_source() const +``` + +#### Returns + +`std::tuple< std::string, std::string, std::string >` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 82. + +*** + +### get\_function + +Get a registered SWAIG function definition by name. Returns nullptr when no such function is registered. Python parity: ToolRegistry.get\_function. + +**Modifiers:** `const` + +#### Signature + +```cpp +const swaig::ToolDefinition * get_function(const std::string & name) const +``` + +#### Parameters + + + +#### Returns + +`const swaig::ToolDefinition *` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 185. + +*** + +### goto\_section + +#### Signature + +```cpp +Service & goto_section(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 97. + +*** + +### handle\_swaig\_endpoint + +Handle GET/POST /swaig (lifted from AgentBase). + +#### Signature + +```cpp +void handle_swaig_endpoint( + const httplib::Request & req, + httplib::Response & res +) +``` + +#### Parameters + + + + + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 281. + +*** + +### hangup + +#### Signature + +```cpp +Service & hangup(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 98. + +*** + +### has\_function + +Whether a SWAIG function with the given name is registered. Python parity: ToolRegistry.has\_function. + +**Modifiers:** `const` + +#### Signature + +```cpp +bool has_function(const std::string & name) const +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 180. + +*** + +### has\_tool + +**Modifiers:** `const` + +#### Signature + +```cpp +bool has_tool(const std::string & name) const +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 171. + +*** + +### join\_conference + +#### Signature + +```cpp +Service & join_conference(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 99. + +*** + +### join\_room + +#### Signature + +```cpp +Service & join_room(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 100. + +*** + +### label + +#### Signature + +```cpp +Service & label(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 101. + +*** + +### list\_tool\_names + +**Modifiers:** `const` + +#### Signature + +```cpp +std::vector< std::string > list_tool_names() const +``` + +#### Returns + +`std::vector< std::string >` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 172. + +*** + +### live\_transcribe + +#### Signature + +```cpp +Service & live_transcribe(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 102. + +*** + +### live\_translate + +#### Signature + +```cpp +Service & live_translate(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 103. + +*** + +### name + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::string & name() const +``` + +#### Returns + +`const std::string &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 44. + +*** + +### on\_function\_call + +Dispatch a function call to the registered handler. Returns a FunctionResult; if the function isn't registered, returns a FunctionResult with a "Function not found" response. + +**Modifiers:** `virtual` + +#### Signature + +```cpp +swaig::FunctionResult on_function_call( + const std::string & name, + const json & args, + const json & raw_data +) +``` + +#### Parameters + + + + + + + +#### Returns + +`swaig::FunctionResult` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 167. + +*** + +### on\_render\_swml + +Override to customize SWML rendering. + +**Modifiers:** `const` `virtual` + +#### Signature + +```cpp +json on_render_swml() const +``` + +#### Returns + +`json` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 255. + +*** + +### on\_request + +Customization hook called when SWML is requested. Default delegates to on\_swml\_request and returns its result. Subclasses typically override on\_swml\_request rather than this method. +Returns std::nullopt to use the default SWML rendering, or a non-null JSON with modifications to merge into the rendered document. +Python parity: WebMixin.on\_request(request\_data, callback\_path). The Python third request argument is FastAPI-specific and intentionally not mirrored on the cross-language API. + +**Modifiers:** `virtual` + +#### Signature + +```cpp +std::optional< json > on_request( + const std::optional< json > & request_data = std::nullopt, + const std::optional< std::string > & callback_path = std::nullopt +) +``` + +#### Parameters + + + + + +#### Returns + +`std::optional< json >` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 241. + +*** + +### on\_swml\_request + +Customization point for subclasses to modify SWML based on request data. Default returns std::nullopt (no modification). +Python parity: WebMixin.on\_swml\_request(request\_data, callback\_path). + +**Modifiers:** `virtual` + +#### Signature + +```cpp +std::optional< json > on_swml_request( + const std::optional< json > & request_data = std::nullopt, + const std::optional< std::string > & callback_path = std::nullopt +) +``` + +#### Parameters + + + + + +#### Returns + +`std::optional< json >` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 249. + +*** + +### pay + +#### Signature + +```cpp +Service & pay(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 104. + +*** + +### play + +#### Signature + +```cpp +Service & play(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 105. + +*** + +### port + +Get the effective port. + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +int port() const +``` + +#### Returns + +`int` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 222. + +*** + +### prompt + +#### Signature + +```cpp +Service & prompt(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 106. + +*** + +### receive\_fax + +#### Signature + +```cpp +Service & receive_fax(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 107. + +*** + +### record + +#### Signature + +```cpp +Service & record(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 108. + +*** + +### record\_call + +#### Signature + +```cpp +Service & record_call(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 109. + +*** + +### register\_additional\_routes + +Extension point: register additional HTTP routes. AgentBase uses this to add /post\_prompt, /mcp, etc. + +**Modifiers:** `virtual` + +#### Signature + +```cpp +void register_additional_routes(httplib::Server & server) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 272. + +*** + +### register\_swaig\_function + +Register a raw SWAIG function definition (e.g. DataMap tools). + +#### Signature + +```cpp +Service & register_swaig_function(const json & func_def) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 162. + +*** + +### remove\_function + +Remove a registered SWAIG function. Returns true when the function was found and removed; false when it wasn't registered. Python parity: ToolRegistry.remove\_function. + +#### Signature + +```cpp +bool remove_function(const std::string & name) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 195. + +*** + +### render\_main\_swml + +Extension point: render the SWML document for the main path or for GET /swaig. Default returns the currently-built Document. AgentBase overrides to emit prompt + AI verb at request time. + +**Modifiers:** `const` `virtual` + +#### Signature + +```cpp +json render_main_swml(const httplib::Request & req) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 260. + +*** + +### render\_swml + +Render the SWML document to JSON. + +**Modifiers:** `const` + +#### Signature + +```cpp +json render_swml() const +``` + +#### Returns + +`json` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 149. + +*** + +### request + +#### Signature + +```cpp +Service & request(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 110. + +*** + +### return\_section + +#### Signature + +```cpp +Service & return_section(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 111. + +*** + +### route + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::string & route() const +``` + +#### Returns + +`const std::string &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 48. + +*** + +### schema\_utils + +SchemaUtils helper bound to this Service. Mirrors Python's self.schema\_utils instance attribute on SWMLService. Built lazily on first access; the underlying schema is cached so the helper is cheap to build. + +#### Signature + + + + ```cpp + signalwire::utils::SchemaUtils & schema_utils() + ``` + + + + ```cpp + const signalwire::utils::SchemaUtils & schema_utils() const + ``` + + + +#### Returns (Overload 1) + +`signalwire::utils::SchemaUtils &` + +#### Returns (Overload 2) + +`const signalwire::utils::SchemaUtils &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 145. + +*** + +### send\_digits + +#### Signature + +```cpp +Service & send_digits(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 112. + +*** + +### send\_fax + +#### Signature + +```cpp +Service & send_fax(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 113. + +*** + +### send\_sms + +#### Signature + +```cpp +Service & send_sms(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 114. + +*** + +### serve + +Start the HTTP server (blocking). + +#### Signature + +```cpp +void serve() +``` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 216. + +*** + +### Service + +#### Signature + +```cpp +void Service() +``` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 35. + +*** + +### set + +#### Signature + +```cpp +Service & set(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 115. + +*** + +### set\_auth + +Set basic auth credentials (auto-generated if not set). + +#### Signature + +```cpp +Service & set_auth(const std::string & username, const std::string & password) +``` + +#### Parameters + + + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 57. + +*** + +### set\_host + +Set the host to bind to. + +#### Signature + +```cpp +Service & set_host(const std::string & host) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 51. + +*** + +### set\_name + +Set the service name (default: "service"). + +#### Signature + +```cpp +Service & set_name(const std::string & name) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 43. + +*** + +### set\_port + +Set the port to listen on. + +#### Signature + +```cpp +Service & set_port(int port) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 54. + +*** + +### set\_route + +Set the route path for this service (default: "/"). + +#### Signature + +```cpp +Service & set_route(const std::string & route) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 47. + +*** + +### setup\_routes + +#### Signature + +```cpp +void setup_routes(httplib::Server & server) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 304. + +*** + +### sip\_refer + +#### Signature + +```cpp +Service & sip_refer(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 117. + +*** + +### sleep + +#### Signature + +```cpp +Service & sleep(int milliseconds) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 116. + +*** + +### stop + +Stop the HTTP server. + +#### Signature + +```cpp +void stop() +``` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 219. + +*** + +### stop\_denoise + +#### Signature + +```cpp +Service & stop_denoise(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 118. + +*** + +### stop\_record\_call + +#### Signature + +```cpp +Service & stop_record_call(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 119. + +*** + +### stop\_tap + +#### Signature + +```cpp +Service & stop_tap(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 120. + +*** + +### swaig\_pre\_dispatch + +Extension point: invoked between argument parsing and function dispatch on POST /swaig. Returns a target Service\* (defaults to this) and an optional short-circuit JSON. If short\_circuit is non-null, it's returned as the SWAIG response without calling on\_function\_call. AgentBase overrides for token validation. + +**Modifiers:** `virtual` + +#### Signature + +```cpp +std::pair< Service *, std::optional< json > > swaig_pre_dispatch( + const json & request_data, + const std::string & func_name +) +``` + +#### Parameters + + + + + +#### Returns + +`std::pair< Service *, std::optional< json > >` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 268. + +*** + +### switch\_section + +#### Signature + +```cpp +Service & switch_section(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 121. + +*** + +### tap + +#### Signature + +```cpp +Service & tap(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 122. + +*** + +### timing\_safe\_compare + +Timing-safe string comparison using CRYPTO\_memcmp. + +**Modifiers:** `static` + +#### Signature + +```cpp +bool timing_safe_compare(const std::string & a, const std::string & b) +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 225. + +*** + +### transfer + +#### Signature + +```cpp +Service & transfer(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 123. + +*** + +### unset + +#### Signature + +```cpp +Service & unset(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 124. + +*** + +### user\_event + +#### Signature + +```cpp +Service & user_event(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 125. + +*** + +### validate\_auth + +Validate basic auth from a request; returns true if valid. + +**Modifiers:** `const` + +#### Signature + +```cpp +bool validate_auth(const httplib::Request & req, httplib::Response & res) const +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 278. + +*** + +### validate\_basic\_auth + +Validate provided basic-auth credentials against the configured ones using a constant-time comparison. Python parity: AuthMixin.validate\_basic\_auth(username, password). + +**Modifiers:** `const` + +#### Signature + +```cpp +bool validate_basic_auth( + const std::string & username, + const std::string & password +) const +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 72. + +## Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 33. diff --git a/fern/products/sdk-reference/cpp/signalwire/swml/verb-definition/index.mdx b/fern/products/sdk-reference/cpp/signalwire/swml/verb-definition/index.mdx new file mode 100644 index 0000000000..830236649e --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/swml/verb-definition/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/cpp/signalwire/swml/verb-definition" +title: "VerbDefinition" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::swml::VerbDefinition" + parent: "signalwire::swml" + module: "signalwire.swml" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/schema.hpp" + visibility: "public" +--- +# `VerbDefinition` + +Represents a verb definition extracted from the SWML schema. + +## Signature + +```cpp +struct signalwire::swml::VerbDefinition +``` + +## Properties + + + + + + + + + +## Source + +[`include/signalwire/swml/schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/schema.hpp) + +Line 14. diff --git a/fern/products/sdk-reference/cpp/signalwire/swml/verb/index.mdx b/fern/products/sdk-reference/cpp/signalwire/swml/verb/index.mdx new file mode 100644 index 0000000000..6cd34b84af --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/swml/verb/index.mdx @@ -0,0 +1,90 @@ +--- +slug: "/reference/cpp/signalwire/swml/verb" +title: "Verb" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::swml::Verb" + parent: "signalwire::swml" + module: "signalwire.swml" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/document.hpp" + visibility: "public" +--- +# `Verb` + +Represents a single SWML verb instance, e.g. \{"answer": \{"max\_duration": 3600\}\}. + +## Signature + +```cpp +struct signalwire::swml::Verb +``` + +## Properties + + + + + +## Methods + +### to\_json + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json to_json() const +``` + +#### Returns + +`json` + +#### Source + +[`include/signalwire/swml/document.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/document.hpp) + +Line 22. + +*** + +### Verb + +#### Signature + + + + ```cpp + void Verb() + ``` + + + + ```cpp + void Verb(std::string n, json p) + ``` + + + +#### Parameters (Overload 2) + + + + + +#### Source + +[`include/signalwire/swml/document.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/document.hpp) + +Line 19. + +## Source + +[`include/signalwire/swml/document.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/document.hpp) + +Line 15. diff --git a/fern/products/sdk-reference/cpp/signalwire/utils/index.mdx b/fern/products/sdk-reference/cpp/signalwire/utils/index.mdx new file mode 100644 index 0000000000..606001665c --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/utils/index.mdx @@ -0,0 +1,89 @@ +--- +slug: "/reference/cpp/signalwire/utils" +title: "utils" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "module" + language: "cpp" + qualified_name: "signalwire::utils" + parent: "signalwire" + module: "signalwire" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/schema_utils.hpp" +--- +# `utils` + +## Signature + +```cpp +namespace signalwire::utils +``` + +## Classes + + + + SchemaUtils — C++ port of signalwire.utils.schema\_utils.SchemaUtils. + + + + SchemaValidationError — C++ port of signalwire.utils.schema\_utils.SchemaValidationError. + + + + Verb metadata extracted from the schema. + + + +## Modules + + + + + +## Functions + +### is\_serverless\_mode + +Cross-language SDK contract: signalwire.utils.is\_serverless\_mode returns true whenever the SDK is running inside any short-lived / event-driven invocation environment (anything other than "server"). +Mirrors signalwire.utils.is\_serverless\_mode in the Python reference. +true unless the detected mode is "server". + +#### Signature + +```cpp +bool is_serverless_mode() +``` + +#### Returns + +`bool` — true unless the detected mode is "server". + +#### Source + +[`src/utils/serverless.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/utils/serverless.cpp) + +Line 13. + +## Type Aliases + +### json + +#### Signature + +```cpp +typedef nlohmann::json json +``` + +#### Source + +[`include/signalwire/utils/schema_utils.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/schema_utils.hpp) + +Line 30. + +## Source + +[`include/signalwire/utils/schema_utils.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/schema_utils.hpp) + +Line 28. diff --git a/fern/products/sdk-reference/cpp/signalwire/utils/schema-utils/index.mdx b/fern/products/sdk-reference/cpp/signalwire/utils/schema-utils/index.mdx new file mode 100644 index 0000000000..d9aeb8d4fa --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/utils/schema-utils/index.mdx @@ -0,0 +1,332 @@ +--- +slug: "/reference/cpp/signalwire/utils/schema-utils" +title: "SchemaUtils" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::utils::SchemaUtils" + parent: "signalwire::utils" + module: "signalwire.utils" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/schema_utils.hpp" + visibility: "public" +--- +# `SchemaUtils` + +SchemaUtils — C++ port of signalwire.utils.schema\_utils.SchemaUtils. + +## Signature + +```cpp +class signalwire::utils::SchemaUtils +``` + +## Methods + +### full\_validation\_available + +Whether full JSON Schema validation is wired up. Mirrors Python's full\_validation\_available property. + +**Modifiers:** `const` + +#### Signature + +```cpp +bool full_validation_available() const +``` + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/utils/schema_utils.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/schema_utils.hpp) + +Line 69. + +*** + +### generate\_method\_body + +Generate a Python-style method body string for a verb. Mirrors Python's generate\_method\_body(verb\_name). + +**Modifiers:** `const` + +#### Signature + +```cpp +std::string generate_method_body(const std::string & verb_name) const +``` + +#### Parameters + + + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/utils/schema_utils.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/schema_utils.hpp) + +Line 109. + +*** + +### generate\_method\_signature + +Generate a Python-style method signature string for a verb. Mirrors Python's generate\_method\_signature(verb\_name). + +**Modifiers:** `const` + +#### Signature + +```cpp +std::string generate_method_signature(const std::string & verb_name) const +``` + +#### Parameters + + + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/utils/schema_utils.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/schema_utils.hpp) + +Line 105. + +*** + +### get\_all\_verb\_names + +Sorted list of all known verb names. Mirrors Python's get\_all\_verb\_names(). + +**Modifiers:** `const` + +#### Signature + +```cpp +std::vector< std::string > get_all_verb_names() const +``` + +#### Returns + +`std::vector< std::string >` + +#### Source + +[`include/signalwire/utils/schema_utils.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/schema_utils.hpp) + +Line 76. + +*** + +### get\_verb\_parameters + +Parameter-definition block used by code-gen tooling. Mirrors Python's get\_verb\_parameters(verb\_name). + +**Modifiers:** `const` + +#### Signature + +```cpp +json get_verb_parameters(const std::string & verb_name) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/utils/schema_utils.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/schema_utils.hpp) + +Line 88. + +*** + +### get\_verb\_properties + +The properties\[verb\_name] block for a verb, or empty when unknown. Mirrors Python's get\_verb\_properties(verb\_name). + +**Modifiers:** `const` + +#### Signature + +```cpp +json get_verb_properties(const std::string & verb_name) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/utils/schema_utils.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/schema_utils.hpp) + +Line 80. + +*** + +### get\_verb\_required\_properties + +The required list for a verb, or empty when unknown / not specified. Mirrors Python's get\_verb\_required\_properties(verb\_name). + +**Modifiers:** `const` + +#### Signature + +```cpp +std::vector< std::string > get_verb_required_properties( + const std::string & verb_name +) const +``` + +#### Parameters + + + +#### Returns + +`std::vector< std::string >` + +#### Source + +[`include/signalwire/utils/schema_utils.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/schema_utils.hpp) + +Line 84. + +*** + +### load\_schema + +Read and parse the JSON Schema. Mirrors Python's load\_schema(). + +#### Signature + +```cpp +json load_schema() +``` + +#### Returns + +`json` + +#### Source + +[`include/signalwire/utils/schema_utils.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/schema_utils.hpp) + +Line 72. + +*** + +### SchemaUtils + +Construct a SchemaUtils. Mirrors Python's SchemaUtils(schema\_path=None, schema\_validation=True). Pass schema\_path = "" to use the embedded schema. + +#### Signature + +```cpp +void SchemaUtils( + const std::string & schema_path = "", + bool schema_validation = true +) +``` + +#### Parameters + + + + + +#### Source + +[`include/signalwire/utils/schema_utils.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/schema_utils.hpp) + +Line 65. + +*** + +### validate\_document + +Validate a complete SWML document. Mirrors Python's validate\_document(document). Returns (false, \["Schema validator not initialized"]) when no full validator is wired in. + +**Modifiers:** `const` + +#### Signature + +```cpp +std::pair< bool, std::vector< std::string > > validate_document( + const json & document +) const +``` + +#### Parameters + + + +#### Returns + +`std::pair< bool, std::vector< std::string > >` + +#### Source + +[`include/signalwire/utils/schema_utils.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/schema_utils.hpp) + +Line 101. + +*** + +### validate\_verb + +Validate a verb config against the schema. Mirrors Python's validate\_verb(verb\_name, verb\_config). Returns (valid, errors) — Python's Tuple\[bool, List\[str]]. + +**Modifiers:** `const` + +#### Signature + +```cpp +std::pair< bool, std::vector< std::string > > validate_verb( + const std::string & verb_name, + const json & verb_config +) const +``` + +#### Parameters + + + + + +#### Returns + +`std::pair< bool, std::vector< std::string > >` + +#### Source + +[`include/signalwire/utils/schema_utils.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/schema_utils.hpp) + +Line 94. + +## Source + +[`include/signalwire/utils/schema_utils.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/schema_utils.hpp) + +Line 60. diff --git a/fern/products/sdk-reference/cpp/signalwire/utils/schema-validation-error/index.mdx b/fern/products/sdk-reference/cpp/signalwire/utils/schema-validation-error/index.mdx new file mode 100644 index 0000000000..76084dfee4 --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/utils/schema-validation-error/index.mdx @@ -0,0 +1,105 @@ +--- +slug: "/reference/cpp/signalwire/utils/schema-validation-error" +title: "SchemaValidationError" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::utils::SchemaValidationError" + parent: "signalwire::utils" + module: "signalwire.utils" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/schema_utils.hpp" + visibility: "public" +--- +# `SchemaValidationError` + +SchemaValidationError — C++ port of signalwire.utils.schema\_utils.SchemaValidationError. + +## Signature + +```cpp +class signalwire::utils::SchemaValidationError : std::runtime_error +``` + +## Inheritance + +**Extends:** `std::runtime_error` + +## Methods + +### errors + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::vector< std::string > & errors() const +``` + +#### Returns + +`const std::vector< std::string > &` + +#### Source + +[`include/signalwire/utils/schema_utils.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/schema_utils.hpp) + +Line 42. + +*** + +### SchemaValidationError + +**Modifiers:** `inline` + +#### Signature + +```cpp +void SchemaValidationError( + std::string verb_name, + std::vector< std::string > errors +) +``` + +#### Parameters + + + + + +#### Source + +[`include/signalwire/utils/schema_utils.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/schema_utils.hpp) + +Line 36. + +*** + +### verb\_name + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::string & verb_name() const +``` + +#### Returns + +`const std::string &` + +#### Source + +[`include/signalwire/utils/schema_utils.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/schema_utils.hpp) + +Line 41. + +## Source + +[`include/signalwire/utils/schema_utils.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/schema_utils.hpp) + +Line 34. diff --git a/fern/products/sdk-reference/cpp/signalwire/utils/url-validator/index.mdx b/fern/products/sdk-reference/cpp/signalwire/utils/url-validator/index.mdx new file mode 100644 index 0000000000..d4554c285e --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/utils/url-validator/index.mdx @@ -0,0 +1,117 @@ +--- +slug: "/reference/cpp/signalwire/utils/url-validator" +title: "url_validator" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "module" + language: "cpp" + qualified_name: "signalwire::utils::url_validator" + parent: "signalwire::utils" + module: "signalwire.utils" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/url_validator.hpp" +--- +# `url_validator` + +## Signature + +```cpp +namespace signalwire::utils::url_validator +``` + +## Constants + + + Cross-port SSRF block list. Order matches the Python reference for ease of cross-language review. + + +## Functions + +### \_set\_resolver + +Install a custom resolver (for tests). Pass nullptr to clear. + +#### Signature + +```cpp +void _set_resolver(ResolverFn resolver) +``` + +#### Parameters + + + +#### Source + +[`src/utils/url_validator.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/utils/url_validator.cpp) + +Line 185. + +*** + +### validate\_url + +Validate that a URL is safe to fetch. +Mirrors Python's signalwire.utils.url\_validator.validate\_url(url, allow\_private=False) -> bool. + +url + +URL to validate. + +allow\_private + +When true, bypass the IP-blocklist check. + +True iff the URL is safe to fetch. + +#### Signature + +```cpp +bool validate_url(const std::string & url, bool allow_private = false) +``` + +#### Parameters + + + URL to validate. + + + + When true, bypass the IP-blocklist check. + + +#### Returns + +`bool` — True iff the URL is safe to fetch. + +#### Source + +[`src/utils/url_validator.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/utils/url_validator.cpp) + +Line 189. + +## Type Aliases + +### ResolverFn + +Pluggable resolver. Tests inject a callable to keep the suite hermetic; production resolves via getaddrinfo. Returns nullopt on resolution failure. +The signature: function(hostname) -> optional\> of IP-string addresses. + +#### Signature + +```cpp +typedef std::function< std::optional< std::vector< std::string > >(const std::string &)> ResolverFn +``` + +#### Source + +[`include/signalwire/utils/url_validator.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/url_validator.hpp) + +Line 32. + +## Source + +[`include/signalwire/utils/url_validator.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/url_validator.hpp) + +Line 16. diff --git a/fern/products/sdk-reference/cpp/signalwire/utils/verb-info/index.mdx b/fern/products/sdk-reference/cpp/signalwire/utils/verb-info/index.mdx new file mode 100644 index 0000000000..e285cfb12e --- /dev/null +++ b/fern/products/sdk-reference/cpp/signalwire/utils/verb-info/index.mdx @@ -0,0 +1,38 @@ +--- +slug: "/reference/cpp/signalwire/utils/verb-info" +title: "VerbInfo" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::utils::VerbInfo" + parent: "signalwire::utils" + module: "signalwire.utils" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/schema_utils.hpp" + visibility: "public" +--- +# `VerbInfo` + +Verb metadata extracted from the schema. + +## Signature + +```cpp +struct signalwire::utils::VerbInfo +``` + +## Properties + + + + + + + +## Source + +[`include/signalwire/utils/schema_utils.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/schema_utils.hpp) + +Line 52. diff --git a/fern/products/sdk-reference/cpp/std/index.mdx b/fern/products/sdk-reference/cpp/std/index.mdx new file mode 100644 index 0000000000..34b84a663c --- /dev/null +++ b/fern/products/sdk-reference/cpp/std/index.mdx @@ -0,0 +1,25 @@ +--- +slug: "/reference/cpp/std" +title: "std" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "module" + language: "cpp" + qualified_name: "std" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/[generated]" +--- +# `std` + +## Signature + +```cpp +namespace std +``` + +## Source + +[`[generated]`](https://github.com/signalwire/signalwire-cpp/blob/main/[generated]) + +Line 1. diff --git a/fern/products/sdk-reference/dotnet/_meta.json b/fern/products/sdk-reference/dotnet/_meta.json new file mode 100644 index 0000000000..08ed3512f9 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/_meta.json @@ -0,0 +1,10 @@ +{ + "language": "dotnet", + "sdk_name": "dotnet-sdk", + "version": null, + "source_repo": "https://github.com/signalwire/signalwire-dotnet", + "format": "mdx", + "platform": "fern", + "base_slug": "/reference/dotnet", + "item_count": 1445 +} \ No newline at end of file diff --git a/fern/products/sdk-reference/dotnet/index.mdx b/fern/products/sdk-reference/dotnet/index.mdx new file mode 100644 index 0000000000..67841e84c8 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/index.mdx @@ -0,0 +1,30 @@ +--- +title: ".NET SDK" +slug: "/reference/dotnet" +lustri: + auto_generated: true + language: "dotnet" + kind: "sdk" +--- +# .NET SDK Reference + +## Modules + +- [`SignalWire.Agent`](/docs/sdk-reference/reference/dotnet/signal-wire.agent) +- [`SignalWire.Contexts`](/docs/sdk-reference/reference/dotnet/signal-wire.contexts) +- [`SignalWire.DataMap`](/docs/sdk-reference/reference/dotnet/signal-wire.data-map) +- [`SignalWire.Logging`](/docs/sdk-reference/reference/dotnet/signal-wire.logging) +- [`SignalWire.POM`](/docs/sdk-reference/reference/dotnet/signal-wire.pom) +- [`SignalWire.Prefabs`](/docs/sdk-reference/reference/dotnet/signal-wire.prefabs) +- [`SignalWire.Relay`](/docs/sdk-reference/reference/dotnet/signal-wire.relay) +- [`SignalWire.REST`](/docs/sdk-reference/reference/dotnet/signal-wire.rest) +- [`SignalWire.REST.Namespaces`](/docs/sdk-reference/reference/dotnet/signal-wire.rest.namespaces) +- [`SignalWire.Security`](/docs/sdk-reference/reference/dotnet/signal-wire.security) +- [`SignalWire.Server`](/docs/sdk-reference/reference/dotnet/signal-wire.server) +- [`SignalWire.Serverless`](/docs/sdk-reference/reference/dotnet/signal-wire.serverless) +- [`SignalWire.Skills`](/docs/sdk-reference/reference/dotnet/signal-wire.skills) +- [`SignalWire.Skills.Builtin`](/docs/sdk-reference/reference/dotnet/signal-wire.skills.builtin) +- [`SignalWire.SWAIG`](/docs/sdk-reference/reference/dotnet/signal-wire.swaig) +- [`SignalWire.SWML`](/docs/sdk-reference/reference/dotnet/signal-wire.swml) +- [`SignalWire.Utils`](/docs/sdk-reference/reference/dotnet/signal-wire.utils) + diff --git a/fern/products/sdk-reference/dotnet/signal-wire.agent/agent-base/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.agent/agent-base/index.mdx new file mode 100644 index 0000000000..6951e8c6fd --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.agent/agent-base/index.mdx @@ -0,0 +1,2062 @@ +--- +slug: "/reference/dotnet/signal-wire.agent/agent-base" +title: "AgentBase" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Agent.AgentBase" + parent: "SignalWire.Agent" + module: "SignalWire.Agent" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs" + visibility: "public" +--- +# `AgentBase` + +AI agent built on <xref href="SignalWire.SWML.Service" data-throw-if-not-resolved="false"></xref>. Provides prompt management, SWAIG tool dispatch, +context switching, skill stubs, and a 5-phase SWML rendering pipeline. +All configuration methods return <code>this</code> for fluent chaining. + +## Signature + +```dotnet +public class AgentBase : Service +``` + +## Inheritance + +**Extends:** [SignalWire.SWML.Service](/docs/sdk-reference/reference/dotnet/signal-wire.swml/service) + +## Properties + + + + + True iff signature validation is enabled — i.e. either the <code>SigningKey</code> option or <code>SIGNALWIRE\_SIGNING\_KEY</code> env var was set at construction time. (Python parity: <code>bool(agent.signing\_key)</code>.) + + + + The prompt as a <xref href="SignalWire.POM.PromptObjectModel" data-throw-if-not-resolved="false"></xref> instance (Python parity: `agent.pom`). Returns null when <code>UsePom</code> is false. Materialised on each access from the internal list-of-dicts so mutations stay round-trip-safe. To inspect raw section dicts, use <xref href="SignalWire.Agent.AgentBase.GetPromptSections" data-throw-if-not-resolved="false"></xref>. + + + + The configured Signing Key, or null when validation is disabled. Read-only — the resolution order (constructor arg → <code>SIGNALWIRE\_SIGNING\_KEY</code> env) is fixed at construction time. (Python parity: <code>agent.signing\_key</code>.) + + + + Skill manager (Python parity: `agent.skill_manager`). + + + + The complete set of internal SWAIG function names that accept fillers, matching the SWAIGInternalFiller schema definition. Any name outside this set is silently ignored by the runtime — <xref href="SignalWire.Agent.AgentBase.SetInternalFillers(System.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Collections.Generic.List%7bSystem.String%7d%7d%7d)" data-throw-if-not-resolved="false"></xref> and <xref href="SignalWire.Agent.AgentBase.AddInternalFiller(System.String%2cSystem.String%2cSystem.Collections.Generic.List%7bSystem.String%7d)" data-throw-if-not-resolved="false"></xref> warn if you pass an unknown name. Notable absences: <code>change\_step</code>, <code>gather\_submit</code>, or arbitrary user-defined SWAIG function names are NOT supported. + + +## Methods + +### AddAnswerVerb + +Alias for <xref href="SignalWire.Agent.AgentBase.AddPostAnswerVerb(System.String%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d)" data-throw-if-not-resolved="false"></xref>. + +#### Signature + + + + ```dotnet + public AgentBase AddAnswerVerb(string verb, Dictionary config) + ``` + + + + ```dotnet + public AgentBase AddAnswerVerb(Dictionary config) + ``` + + + +#### Parameters (Overload 1) + + + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`SignalWire.Agent.AgentBase` + +#### Returns (Overload 2) + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 812. + +*** + +### AddFunctionInclude(Dictionary\) + +#### Signature + +```dotnet +public AgentBase AddFunctionInclude(Dictionary include) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 771. + +*** + +### AddHint(string) + +#### Signature + +```dotnet +public AgentBase AddHint(string hint) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 480. + +*** + +### AddHints(List\) + +#### Signature + +```dotnet +public AgentBase AddHints(List hints) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 486. + +*** + +### AddInternalFiller + +Add internal fillers for a single internal function and language. + +<p>See +<xref href="SignalWire.Agent.AgentBase.SetInternalFillers(System.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Collections.Generic.List%7bSystem.String%7d%7d%7d)" data-throw-if-not-resolved="false"></xref> +for the complete list of supported function names and what fillers +do. Names outside the supported set log a warning.</p> + +#### Signature + + + + ```dotnet + public AgentBase AddInternalFiller(string filler) + ``` + + + + ```dotnet + public AgentBase AddInternalFiller(string functionName, string languageCode, List fillers) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + + + +#### Returns (Overload 1) + +`SignalWire.Agent.AgentBase` + +#### Returns (Overload 2) + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 730. + +*** + +### AddLanguage + +Add a language configuration with optional per-language engine-specific +params (e.g. voice stability/similarity for ElevenLabs, model knobs). +The <code>params</code> key is only emitted into SWML when non-empty, so +existing language entries stay byte-identical when no params are passed. +Mirrors signalwire-python's <code>AIConfigMixin.add\_language(params=...)</code>. + +#### Signature + + + + ```dotnet + public AgentBase AddLanguage(string name, string code, string voice) + ``` + + + + ```dotnet + public AgentBase AddLanguage(string name, string code, string voice, Dictionary? languageParams) + ``` + + + +#### Parameters (Overload 1) + + + + + + + +#### Parameters (Overload 2) + + + Language name (e.g. "English"). + + + + Language code (e.g. "en-US"). + + + + TTS voice name or combined "engine.voice:model". + + + + Optional engine-specific params dict. <code>null</code> or empty omits the SWML <code>params</code> key. + + +#### Returns (Overload 1) + +`SignalWire.Agent.AgentBase` + +#### Returns (Overload 2) + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 498. + +*** + +### AddPatternHint(string) + +#### Signature + +```dotnet +public AgentBase AddPatternHint(string pattern) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 492. + +*** + +### AddPostAiVerb(string, Dictionary\) + +#### Signature + +```dotnet +public AgentBase AddPostAiVerb(string verb, Dictionary config) +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 825. + +*** + +### AddPostAnswerVerb(string, Dictionary\) + +#### Signature + +```dotnet +public AgentBase AddPostAnswerVerb(string verb, Dictionary config) +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 805. + +*** + +### AddPreAnswerVerb(string, Dictionary\) + +#### Signature + +```dotnet +public AgentBase AddPreAnswerVerb(string verb, Dictionary config) +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 799. + +*** + +### AddPronunciation(string, string, string) + +#### Signature + +```dotnet +public AgentBase AddPronunciation(string replace, string with, string ignore = "") +``` + +#### Parameters + + + + + + + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 594. + +*** + +### AddSkill + +Load and activate a skill by name. Resolves through <xref href="SignalWire.Skills.SkillRegistry" data-throw-if-not-resolved="false"></xref>, +validates env vars, calls Setup/RegisterTools, and merges hints/globalData/prompts. + +#### Signature + + + + ```dotnet + public AgentBase AddSkill(string name, Dictionary? parameters = null) + ``` + + + + ```dotnet + public AgentBase AddSkill(SkillName name, Dictionary? parameters = null) + ``` + + + +#### Parameters (Overload 1) + + + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`SignalWire.Agent.AgentBase` + +#### Returns (Overload 2) + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 927. + +*** + +### AddSwaigQueryParams(Dictionary\) + +#### Signature + +```dotnet +public AgentBase AddSwaigQueryParams(Dictionary parameters) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 1027. + +*** + +### AgentBase(AgentOptions) + +#### Signature + +```dotnet +public AgentBase(AgentOptions options) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 145. + +*** + +### AutoMapSipUsernames() + +Enable auto-mapping of SIP usernames to this agent's +route (Python parity: `agent.auto_map_sip_usernames()`). +Chainable. + +#### Signature + +```dotnet +public AgentBase AutoMapSipUsernames() +``` + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 914. + +*** + +### BuildAiVerb(Dictionary\?) + +Build the AI verb configuration block. + +#### Signature + +```dotnet +public Dictionary BuildAiVerb(Dictionary? headers = null) +``` + +#### Parameters + + + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 1165. + +*** + +### ClearPostAiVerbs() + +#### Signature + +```dotnet +public AgentBase ClearPostAiVerbs() +``` + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 843. + +*** + +### ClearPostAnswerVerbs() + +#### Signature + +```dotnet +public AgentBase ClearPostAnswerVerbs() +``` + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 837. + +*** + +### ClearPreAnswerVerbs() + +#### Signature + +```dotnet +public AgentBase ClearPreAnswerVerbs() +``` + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 831. + +*** + +### ClearSwaigQueryParams() + +#### Signature + +```dotnet +public AgentBase ClearSwaigQueryParams() +``` + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 1036. + +*** + +### CloneForRequest() + +Create a deep copy of this agent for per-request customisation. +Collections are deeply copied; callbacks are preserved by reference. + +#### Signature + +```dotnet +public AgentBase CloneForRequest() +``` + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 1448. + +*** + +### Contexts() + +Alias for <xref href="SignalWire.Agent.AgentBase.DefineContexts" data-throw-if-not-resolved="false"></xref>. + +#### Signature + +```dotnet +public ContextBuilder Contexts() +``` + +#### Returns + +`SignalWire.Contexts.ContextBuilder` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 871. + +*** + +### CreateToolToken(string, string) + +Create a per-call SWAIG-function token. Returns empty +string on failure. (Python parity: `StateMixin._create_tool_token`.) + +#### Signature + +```dotnet +public string CreateToolToken(string toolName, string callId) +``` + +#### Parameters + + + + + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 441. + +*** + +### DefineContexts() + +Return the ContextBuilder, creating it lazily on first access. +The builder is wired to report registered SWAIG tool names back +so its <xref href="SignalWire.Contexts.ContextBuilder.Validate" data-throw-if-not-resolved="false"></xref> can check for +collisions with reserved native tool names (<code>next\_step</code>, <code>change\_context</code>, <code>gather\_submit</code>). + +#### Signature + +```dotnet +public ContextBuilder DefineContexts() +``` + +#### Returns + +`SignalWire.Contexts.ContextBuilder` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 860. + +*** + +### EnableDebugEvents(string) + +#### Signature + +```dotnet +public AgentBase EnableDebugEvents(string level = "all") +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 765. + +*** + +### EnableSipRouting(bool, string) + +Enable SIP routing on this agent. `autoMap` opts into Python's +auto-mapping behaviour (sip\_username = agent name); `path` lets +the caller pin a specific SIP route prefix. + +#### Signature + +```dotnet +public AgentBase EnableSipRouting(bool autoMap = false, string path = "") +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 1065. + +*** + +### GetContexts() + +Return the contexts configuration if defined, else null. +(Python parity: `PromptManager.get_contexts`.) + +#### Signature + +```dotnet +public Dictionary? GetContexts() +``` + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 392. + +*** + +### GetLanguageParams(string) + +Read the per-language <code>params</code> dict for a previously-added +language. Returns <code>null</code> when the params were never set or +when the code is unknown — no exception path, matching Python. + +#### Signature + +```dotnet +public Dictionary? GetLanguageParams(string code) +``` + +#### Parameters + + + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 571. + +*** + +### GetName() + +Return the agent name (Python parity: `agent.get_name()`). + +#### Signature + +```dotnet +public string GetName() +``` + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 905. + +*** + +### GetPostPrompt() + +Return the post-prompt text if set, else null. +(Python parity: `PromptManager.get_post_prompt`.) + +#### Signature + +```dotnet +public string? GetPostPrompt() +``` + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 388. + +*** + +### GetPrompt() + +Return the prompt payload: POM array if enabled and populated, otherwise raw text. + +#### Signature + +```dotnet +public object GetPrompt() +``` + +#### Returns + +`object` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 373. + +*** + +### GetPromptSections() + +The raw POM section dicts. Mirrors how the dotnet +agent has historically stored its prompt-object data and how +SWML rendering consumes it. Read-only snapshot. + +#### Signature + +```dotnet +public IReadOnlyList> GetPromptSections() +``` + +#### Returns + +`IReadOnlyList>` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 437. + +*** + +### GetRawPrompt() + +Return the raw prompt text if set, else null. +(Python parity: `PromptManager.get_raw_prompt`.) + +#### Signature + +```dotnet +public string? GetRawPrompt() +``` + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 384. + +*** + +### GetSkillManager() + +Return the skill manager, creating it lazily on first access. + +#### Signature + +```dotnet +public SkillManager GetSkillManager() +``` + +#### Returns + +`SignalWire.Skills.SkillManager` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 895. + +*** + +### HandlePostPrompt(Dictionary\?, Dictionary\) + +Handle the post-prompt callback. + +**Modifiers:** `override` + +#### Signature + +```dotnet +protected override (int, Dictionary, string) HandlePostPrompt(Dictionary? requestData, Dictionary headers) +``` + +#### Parameters + + + + + +#### Returns + +`System.ValueTuple,string>` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 1403. + +*** + +### HandleRequest(string, string, Dictionary\, string?) + +Override the base dispatch to enforce webhook signature validation on +POST requests targeting the signed routes (<code>/</code>, <code>/swaig</code>, <code>/post\_prompt</code>) when <xref href="SignalWire.Agent.AgentBase.SigningKey" data-throw-if-not-resolved="false"></xref> is configured. + +<p>Validation is gated behind Basic Auth: callers must already +satisfy the SWMLService basic-auth check (it always runs first in +<xref href="SignalWire.SWML.Service.HandleRequest(System.String%2cSystem.String%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.String%7d%2cSystem.String)" data-throw-if-not-resolved="false"></xref>) before we even look at +signatures, matching Python where <code>signing_key</code> is layered on +top of <code>basic_auth</code>.</p> + +<p>On invalid signature: returns 403 directly without dispatching +to the agent's POST handler. On valid signature (or non-POST, or +non-signed route): delegates to <xref href="SignalWire.SWML.Service.HandleRequest(System.String%2cSystem.String%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.String%7d%2cSystem.String)" data-throw-if-not-resolved="false"></xref>. +</p> + +<p>(Python parity: <code>web_mixin._register_routes</code> wraps the +signed POST routes in a FastAPI <code>Depends(sig_dep)</code> dependency +when <code>signing_key</code> is set; this is the .NET equivalent.)</p> + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override (int Status, Dictionary Headers, string Body) HandleRequest(string method, string path, Dictionary headers, string? body) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`System.ValueTuple,string>` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 1294. + +*** + +### HandleSwmlRequest(string, Dictionary\?, Dictionary\) + +Handle the SWML document request. If a dynamic-config callback is registered, +clone the agent, pass the clone to the callback, and render from the clone. + +**Modifiers:** `override` + +#### Signature + +```dotnet +protected override (int, Dictionary, string) HandleSwmlRequest(string method, Dictionary? requestData, Dictionary headers) +``` + +#### Parameters + + + + + + + +#### Returns + +`System.ValueTuple,string>` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 1369. + +*** + +### HasSkill + +Check if a skill is loaded by instance key. + +#### Signature + + + + ```dotnet + public bool HasSkill(string name) + ``` + + + + ```dotnet + public bool HasSkill(SkillName name) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`bool` + +#### Returns (Overload 2) + +`bool` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 983. + +*** + +### ListSkills() + +List all loaded skill instance keys. + +#### Signature + +```dotnet +public List ListSkills() +``` + +#### Returns + +`List` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 973. + +*** + +### ManualSetProxyUrl(string) + +Manually override the proxy URL used for SWAIG webhook construction. + +#### Signature + +```dotnet +public AgentBase ManualSetProxyUrl(string url) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 1021. + +*** + +### OnDebugEvent(Action\?, Dictionary\>) + +#### Signature + +```dotnet +public AgentBase OnDebugEvent(Action?, Dictionary> callback) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 1049. + +*** + +### OnSummary(Action\?, Dictionary\>) + +#### Signature + +```dotnet +public AgentBase OnSummary(Action?, Dictionary> callback) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 1042. + +*** + +### PromptAddSection(string, string, List\?, bool, bool, List\>?) + +Add a top-level POM section with an optional body, bullets, +numbering, and subsections. (Python parity: `prompt_add_section`.) + +#### Signature + +```dotnet +public AgentBase PromptAddSection(string title, string body = "", List? bullets = null, bool numbered = false, bool numberedBullets = false, List>? subsections = null) +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 263. + +*** + +### PromptAddSubsection(string, string, string, List\?) + +Add a subsection nested under an existing parent section. +(Python parity: `prompt_add_subsection(parent_title, title, body, bullets)`.) + +#### Signature + +```dotnet +public AgentBase PromptAddSubsection(string parentTitle, string title, string body = "", List? bullets = null) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 293. + +*** + +### PromptAddToSection(string, string?, string?, List\?) + +Append body text, a single bullet, and/or bullets list to an +existing section. (Python parity: +`prompt_add_to_section(title, body, bullet, bullets)`.) + +#### Signature + +```dotnet +public AgentBase PromptAddToSection(string title, string? body = null, string? bullet = null, List? bullets = null) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 327. + +*** + +### PromptHasSection(string) + +Check whether a POM section with the given title exists. + +#### Signature + +```dotnet +public bool PromptHasSection(string title) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 365. + +*** + +### RegisterSipUsername + +Register a SIP username under this agent's own route — Python +equivalent of `register_sip_username(self, sip_username)`. + +#### Signature + + + + ```dotnet + public AgentBase RegisterSipUsername(string username, string route = "") + ``` + + + + ```dotnet + public AgentBase RegisterSipUsername(string username) + ``` + + + +#### Parameters (Overload 1) + + + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`SignalWire.Agent.AgentBase` + +#### Returns (Overload 2) + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 1073. + +*** + +### RemoveSkill + +Remove a loaded skill by its instance key. + +#### Signature + + + + ```dotnet + public AgentBase RemoveSkill(string name) + ``` + + + + ```dotnet + public AgentBase RemoveSkill(SkillName name) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`SignalWire.Agent.AgentBase` + +#### Returns (Overload 2) + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 959. + +*** + +### RenderSwml() + +Build the complete SWML document. + +<p>Phases: 1) Pre-answer verbs 2) Answer 3) Record call +4) Post-answer verbs 5) AI verb 6) Post-AI verbs</p> + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override Dictionary RenderSwml() +``` + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 1097. + +*** + +### RenderSwmlWithContext(Dictionary\?, Dictionary\) + +Render with request body and headers context. + +#### Signature + +```dotnet +public Dictionary RenderSwmlWithContext(Dictionary? requestBody, Dictionary headers) +``` + +#### Parameters + + + + + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 1103. + +*** + +### ResetContexts() + +Remove all contexts, returning the agent to a no-contexts state. +This is a convenience wrapper around <code>DefineContexts().Reset()</code>. +Use it in a dynamic config callback when you need to rebuild +contexts from scratch for a specific request. + +#### Signature + +```dotnet +public AgentBase ResetContexts() +``` + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 882. + +*** + +### SetDynamicConfigCallback(Action\?, Dictionary\?, Dictionary\, AgentBase>) + +#### Signature + +```dotnet +public AgentBase SetDynamicConfigCallback(Action?, Dictionary?, Dictionary, AgentBase> callback) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 1001. + +*** + +### SetFunctionIncludes(List\>) + +#### Signature + +```dotnet +public AgentBase SetFunctionIncludes(List> includes) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 777. + +*** + +### SetGlobalData(Dictionary\) + +#### Signature + +```dotnet +public AgentBase SetGlobalData(Dictionary data) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 627. + +*** + +### SetInternalFillers + +Set internal fillers for native SWAIG functions. + +<p>Internal fillers are short phrases the AI agent speaks (via +TTS) while an internal/native function is running, so the caller +doesn't hear dead air during transitions or background work.</p> + +<p>Supported function names (match the SWAIGInternalFiller +schema): <code>hangup</code>, <code>check_time</code>, <code>wait_for_user</code>, +<code>wait_seconds</code>, <code>adjust_response_latency</code>, +<code>next_step</code>, <code>change_context</code>, <code>get_visual_input</code>, +<code>get_ideal_strategy</code>. See +<xref href="SignalWire.Agent.AgentBase.SupportedInternalFillerNames" data-throw-if-not-resolved="false"></xref>.</p> + +<p>Notably NOT supported: <code>change_step</code>, +<code>gather_submit</code>, or arbitrary user-defined SWAIG function +names. The runtime only honors fillers for the names listed above; +everything else is silently ignored at the SWML level. This method +warns at registration time if you pass an unknown name so you +catch the typo early.</p> + +#### Signature + + + + ```dotnet + public AgentBase SetInternalFillers(List fillers) + ``` + + + + ```dotnet + public AgentBase SetInternalFillers(Dictionary>> fillers) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`SignalWire.Agent.AgentBase` + +#### Returns (Overload 2) + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 672. + +*** + +### SetLanguageParams(string, Dictionary\) + +Set (or replace) the per-language <code>params</code> dict on an +already-added language. Useful when language entries are built +up via <xref href="SignalWire.Agent.AgentBase.AddLanguage(System.String%2cSystem.String%2cSystem.String)" data-throw-if-not-resolved="false"></xref> first and +engine-specific tuning is added later (e.g., from a config loader). +Empty dict removes the key. No-op if <code class="paramref">code</code> isn't +found — matches Python's silent-skip behavior. + +#### Signature + +```dotnet +public AgentBase SetLanguageParams(string code, Dictionary languageParams) +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 546. + +*** + +### SetLanguages(List\>) + +#### Signature + +```dotnet +public AgentBase SetLanguages(List> languages) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 588. + +*** + +### SetNativeFunctions(List\) + +#### Signature + +```dotnet +public AgentBase SetNativeFunctions(List functions) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 642. + +*** + +### SetParam(string, object) + +#### Signature + +```dotnet +public AgentBase SetParam(string key, object value) +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 615. + +*** + +### SetParams(Dictionary\) + +#### Signature + +```dotnet +public AgentBase SetParams(Dictionary parameters) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 621. + +*** + +### SetPostPrompt(string) + +#### Signature + +```dotnet +public AgentBase SetPostPrompt(string text) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 255. + +*** + +### SetPostPromptLlmParams(Dictionary\) + +#### Signature + +```dotnet +public AgentBase SetPostPromptLlmParams(Dictionary parameters) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 789. + +*** + +### SetPostPromptUrl(string) + +#### Signature + +```dotnet +public AgentBase SetPostPromptUrl(string url) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 1014. + +*** + +### SetPromptLlmParams(Dictionary\) + +#### Signature + +```dotnet +public AgentBase SetPromptLlmParams(Dictionary parameters) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 783. + +*** + +### SetPromptPom(List\>) + +Set the prompt as a list-of-section dicts (POM form). +Throws when `UsePom` is false. (Python parity: +`PromptManager.set_prompt_pom`.) + +#### Signature + +```dotnet +public AgentBase SetPromptPom(List> pom) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 398. + +*** + +### SetPromptText(string) + +#### Signature + +```dotnet +public AgentBase SetPromptText(string text) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 249. + +*** + +### SetPronunciations(List\>) + +#### Signature + +```dotnet +public AgentBase SetPronunciations(List> pronunciations) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 609. + +*** + +### SetWebHookUrl(string) + +#### Signature + +```dotnet +public AgentBase SetWebHookUrl(string url) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 1008. + +*** + +### UpdateGlobalData(Dictionary\) + +#### Signature + +```dotnet +public AgentBase UpdateGlobalData(Dictionary data) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 633. + +*** + +### ValidateToolToken(string, string, string) + +Validate a per-call SWAIG-function token. Rejects +when the function is not registered, when the SessionManager +rejects the token, or on any error. (Python parity: +`StateMixin.validate_tool_token`.) + +#### Signature + +```dotnet +public bool ValidateToolToken(string functionName, string token, string callId) +``` + +#### Parameters + + + + + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 457. + +## Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 51. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.agent/agent-options/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.agent/agent-options/index.mdx new file mode 100644 index 0000000000..c69df5ffbf --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.agent/agent-options/index.mdx @@ -0,0 +1,64 @@ +--- +slug: "/reference/dotnet/signal-wire.agent/agent-options" +title: "AgentOptions" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Agent.AgentOptions" + parent: "SignalWire.Agent" + module: "SignalWire.Agent" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs" + visibility: "public" +--- +# `AgentOptions` + +Configuration options for an AI agent, extending the base SWML service options. + +**Modifiers:** `sealed` + +## Signature + +```dotnet +public sealed class AgentOptions +``` + +## Properties + + + + + + + + + + + + + + + + + + + + + + + Optional SignalWire Signing Key (from Dashboard → API Credentials). When set, webhook signature validation is enforced on POST /, /swaig, /post\_prompt — unsigned or invalidly-signed requests get a 403. Falls back to the <code>SIGNALWIRE\_SIGNING\_KEY</code> env var if not passed. See <code>porting-sdk/webhooks.md</code> for the contract. (Python parity: <code>AgentBase.**init**(signing\_key=...)</code>.) + + + + If true, honor <code>X-Forwarded-Proto</code> / <code>X-Forwarded-Host</code> headers when reconstructing the URL for signature validation. Default false because proxy headers are spoofable; opt in only when you control the proxy chain. (Python parity: <code>AgentBase.**init**(trust\_proxy\_for\_signature=...)</code>.) + + + + +## Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 12. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.agent/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.agent/index.mdx new file mode 100644 index 0000000000..3616fc5587 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.agent/index.mdx @@ -0,0 +1,24 @@ +--- +slug: "/reference/dotnet/signal-wire.agent" +title: "SignalWire.Agent" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "module" + language: "dotnet" + qualified_name: "SignalWire.Agent" +--- +# `SignalWire.Agent` + +## Classes + + + + AI agent built on <xref href="SignalWire.SWML.Service" data-throw-if-not-resolved="false"></xref>. Provides prompt management, SWAIG tool dispatch, context switching, skill stubs, and a 5-phase SWML rendering pipeline. All configuration methods return <code>this</code> for fluent chaining. + + + + Configuration options for an AI agent, extending the base SWML service options. + + diff --git a/fern/products/sdk-reference/dotnet/signal-wire.contexts/context-builder/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.contexts/context-builder/index.mdx new file mode 100644 index 0000000000..4c687daca9 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.contexts/context-builder/index.mdx @@ -0,0 +1,235 @@ +--- +slug: "/reference/dotnet/signal-wire.contexts/context-builder" +title: "ContextBuilder" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Contexts.ContextBuilder" + parent: "SignalWire.Contexts" + module: "SignalWire.Contexts" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs" + visibility: "public" +--- +# `ContextBuilder` + +Builder for multi-step, multi-context AI agent workflows. + +<p>A ContextBuilder owns one or more <xref href="SignalWire.Contexts.Context" data-throw-if-not-resolved="false"></xref>s; each +context owns an ordered list of <xref href="SignalWire.Contexts.Step" data-throw-if-not-resolved="false"></xref>s. Only one context +and one step is active at a time. Per chat turn, the runtime injects +the current step's instructions as a system message, then asks the LLM +for a response.</p> + +<p><b>Native tools auto-injected by the runtime:</b> When a step +(or its enclosing context) declares valid_steps or valid_contexts, the +runtime auto-injects two native tools so the model can navigate the +flow: <code>next_step</code> and <code>change_context</code>. A third native tool, +<code>gather_submit</code>, is injected during gather_info questioning. +These three names are reserved: <xref href="SignalWire.Contexts.ContextBuilder.Validate" data-throw-if-not-resolved="false"></xref> rejects any +agent that defines a SWAIG tool with one of them. See +<xref href="SignalWire.Contexts.ReservedToolNames.Reserved" data-throw-if-not-resolved="false"></xref>.</p> + +<p><b>Function whitelisting (<xref href="SignalWire.Contexts.Step.SetFunctions(System.Object)" data-throw-if-not-resolved="false"></xref>):</b> +Each step may declare a functions whitelist. The whitelist is applied +in-memory at the start of each LLM turn. CRITICALLY: if a step does +NOT declare a functions field, it INHERITS the previous step's active +set. See <xref href="SignalWire.Contexts.Step.SetFunctions(System.Object)" data-throw-if-not-resolved="false"></xref> for details and examples.</p> + +## Signature + +```dotnet +public class ContextBuilder +``` + +## Methods + +### AddContext(string) + +#### Signature + +```dotnet +public Context AddContext(string name) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Contexts.Context` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 622. + +*** + +### AttachToolNameSupplier(Func\>) + +Attach a supplier that returns registered SWAIG tool names so <xref href="SignalWire.Contexts.ContextBuilder.Validate" data-throw-if-not-resolved="false"></xref> can check them against <xref href="SignalWire.Contexts.ReservedToolNames.Reserved" data-throw-if-not-resolved="false"></xref>. Called internally by <code>AgentBase.DefineContexts()</code>. + +#### Signature + +```dotnet +public ContextBuilder AttachToolNameSupplier(Func> supplier) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Contexts.ContextBuilder` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 604. + +*** + +### CreateSimpleContext(string) + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static ContextBuilder CreateSimpleContext(string name) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Contexts.ContextBuilder` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 807. + +*** + +### GetContext(string) + +#### Signature + +```dotnet +public Context? GetContext(string name) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Contexts.Context` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 635. + +*** + +### HasContexts() + +#### Signature + +```dotnet +public bool HasContexts() +``` + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 636. + +*** + +### Reset() + +Remove all contexts, returning the builder to its initial state. +Use this in a dynamic config callback when you need to rebuild +contexts from scratch for a specific request. + +#### Signature + +```dotnet +public ContextBuilder Reset() +``` + +#### Returns + +`SignalWire.Contexts.ContextBuilder` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 615. + +*** + +### ToDict() + +#### Signature + +```dotnet +public Dictionary ToDict() +``` + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 793. + +*** + +### Validate() + +#### Signature + +```dotnet +public List Validate() +``` + +#### Returns + +`List` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 638. + +## Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 591. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.contexts/context/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.contexts/context/index.mdx new file mode 100644 index 0000000000..a40b77ad18 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.contexts/context/index.mdx @@ -0,0 +1,724 @@ +--- +slug: "/reference/dotnet/signal-wire.contexts/context" +title: "Context" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Contexts.Context" + parent: "SignalWire.Contexts" + module: "SignalWire.Contexts" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs" + visibility: "public" +--- +# `Context` + +## Signature + +```dotnet +public class Context +``` + +## Properties + + + +## Methods + +### AddBullets(string, List\) + +#### Signature + +```dotnet +public Context AddBullets(string title, List bullets) +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire.Contexts.Context` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 413. + +*** + +### AddEnterFiller(string, params string\[]) + +#### Signature + +```dotnet +public Context AddEnterFiller(string lang, params string[] fillers) +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire.Contexts.Context` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 495. + +*** + +### AddExitFiller(string, params string\[]) + +#### Signature + +```dotnet +public Context AddExitFiller(string lang, params string[] fillers) +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire.Contexts.Context` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 503. + +*** + +### AddSection(string, string) + +#### Signature + +```dotnet +public Context AddSection(string title, string body) +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire.Contexts.Context` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 405. + +*** + +### AddStep(string, Dictionary\?) + +#### Signature + +```dotnet +public Step AddStep(string name, Dictionary? opts = null) +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire.Contexts.Step` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 350. + +*** + +### AddSystemBullets(string, List\) + +#### Signature + +```dotnet +public Context AddSystemBullets(string title, List bullets) +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire.Contexts.Context` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 439. + +*** + +### AddSystemSection(string, string) + +#### Signature + +```dotnet +public Context AddSystemSection(string title, string body) +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire.Contexts.Context` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 431. + +*** + +### Context(string) + +#### Signature + +```dotnet +public Context(string name) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 345. + +*** + +### GetInitialStep() + +#### Signature + +```dotnet +public string? GetInitialStep() +``` + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 459. + +*** + +### GetStep(string) + +#### Signature + +```dotnet +public Step? GetStep(string name) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Contexts.Step` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 372. + +*** + +### GetStepOrder() + +#### Signature + +```dotnet +public List GetStepOrder() +``` + +#### Returns + +`List` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 393. + +*** + +### GetSteps() + +#### Signature + +```dotnet +public Dictionary GetSteps() +``` + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 392. + +*** + +### GetValidContexts() + +#### Signature + +```dotnet +public List? GetValidContexts() +``` + +#### Returns + +`List` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 511. + +*** + +### MoveStep(string, int) + +#### Signature + +```dotnet +public Context MoveStep(string name, int position) +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire.Contexts.Context` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 383. + +*** + +### RemoveStep(string) + +#### Signature + +```dotnet +public Context RemoveStep(string name) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Contexts.Context` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 374. + +*** + +### SetConsolidate(bool) + +#### Signature + +```dotnet +public Context SetConsolidate(bool consolidate) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Contexts.Context` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 464. + +*** + +### SetEnterFillers(Dictionary\>) + +#### Signature + +```dotnet +public Context SetEnterFillers(Dictionary> fillers) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Contexts.Context` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 492. + +*** + +### SetExitFillers(Dictionary\>) + +#### Signature + +```dotnet +public Context SetExitFillers(Dictionary> fillers) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Contexts.Context` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 493. + +*** + +### SetFullReset(bool) + +#### Signature + +```dotnet +public Context SetFullReset(bool fullReset) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Contexts.Context` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 465. + +*** + +### SetInitialStep(string) + +Set which step the context starts on when entered. + +<p>By default, a context starts on its first step (index 0). Use +this to skip a preamble step on re-entry via +<code>change_context</code>.</p> + +#### Signature + +```dotnet +public Context SetInitialStep(string stepName) +``` + +#### Parameters + + + Name of the step to start on (must exist in this context). + + +#### Returns + +`SignalWire.Contexts.Context` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 457. + +*** + +### SetIsolated(bool) + +Mark this context as isolated — entering it wipes conversation +history. + +<p>When <code class="paramref">isolated</code> = true and the context is +entered via change_context, the runtime wipes the conversation +array. The model starts fresh with only the new context's +system_prompt + step instructions, with no memory of prior +turns.</p> + +<p><b>EXCEPTION — reset overrides the wipe:</b> If the context +also has a reset configuration (via <xref href="SignalWire.Contexts.Context.SetConsolidate(System.Boolean)" data-throw-if-not-resolved="false"></xref> +or <xref href="SignalWire.Contexts.Context.SetFullReset(System.Boolean)" data-throw-if-not-resolved="false"></xref>), the wipe is skipped in favor of +the reset behavior. Use reset with consolidate=true to summarize +prior history into a single message instead of dropping it +entirely.</p> + +<p>Use cases: switching to a sensitive billing flow that +should not see prior small-talk; handing off to a different agent +persona; resetting after a long off-topic detour.</p> + +#### Signature + +```dotnet +public Context SetIsolated(bool isolated) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Contexts.Context` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 488. + +*** + +### SetPostPrompt(string) + +#### Signature + +```dotnet +public Context SetPostPrompt(string postPrompt) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Contexts.Context` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 463. + +*** + +### SetPrompt(string) + +#### Signature + +```dotnet +public Context SetPrompt(string prompt) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Contexts.Context` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 397. + +*** + +### SetSystemPrompt(string) + +#### Signature + +```dotnet +public Context SetSystemPrompt(string systemPrompt) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Contexts.Context` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 423. + +*** + +### SetUserPrompt(string) + +#### Signature + +```dotnet +public Context SetUserPrompt(string userPrompt) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Contexts.Context` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 466. + +*** + +### SetValidContexts(List\) + +#### Signature + +```dotnet +public Context SetValidContexts(List contexts) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Contexts.Context` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 461. + +*** + +### SetValidSteps(List\) + +#### Signature + +```dotnet +public Context SetValidSteps(List steps) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Contexts.Context` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 462. + +*** + +### ToDict() + +#### Signature + +```dotnet +public Dictionary ToDict() +``` + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 535. + +## Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 324. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.contexts/gather-info/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.contexts/gather-info/index.mdx new file mode 100644 index 0000000000..6cd395b169 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.contexts/gather-info/index.mdx @@ -0,0 +1,102 @@ +--- +slug: "/reference/dotnet/signal-wire.contexts/gather-info" +title: "GatherInfo" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Contexts.GatherInfo" + parent: "SignalWire.Contexts" + module: "SignalWire.Contexts" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs" + visibility: "public" +--- +# `GatherInfo` + +## Signature + +```dotnet +public class GatherInfo +``` + +## Properties + + + + + +## Methods + +### AddQuestion(Dictionary\) + +#### Signature + +```dotnet +public GatherInfo AddQuestion(Dictionary opts) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Contexts.GatherInfo` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 81. + +*** + +### GatherInfo(string?, string?, string?) + +#### Signature + +```dotnet +public GatherInfo(string? outputKey = null, string? completionAction = null, string? prompt = null) +``` + +#### Parameters + + + + + + + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 74. + +*** + +### ToDict() + +#### Signature + +```dotnet +public Dictionary ToDict() +``` + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 90. + +## Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 67. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.contexts/gather-question/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.contexts/gather-question/index.mdx new file mode 100644 index 0000000000..e01e2f2828 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.contexts/gather-question/index.mdx @@ -0,0 +1,72 @@ +--- +slug: "/reference/dotnet/signal-wire.contexts/gather-question" +title: "GatherQuestion" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Contexts.GatherQuestion" + parent: "SignalWire.Contexts" + module: "SignalWire.Contexts" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs" + visibility: "public" +--- +# `GatherQuestion` + +## Signature + +```dotnet +public class GatherQuestion +``` + +## Properties + + + +## Methods + +### GatherQuestion(Dictionary\) + +#### Signature + +```dotnet +public GatherQuestion(Dictionary opts) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 38. + +*** + +### ToDict() + +#### Signature + +```dotnet +public Dictionary ToDict() +``` + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 50. + +## Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 29. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.contexts/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.contexts/index.mdx new file mode 100644 index 0000000000..9357b39a35 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.contexts/index.mdx @@ -0,0 +1,32 @@ +--- +slug: "/reference/dotnet/signal-wire.contexts" +title: "SignalWire.Contexts" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "module" + language: "dotnet" + qualified_name: "SignalWire.Contexts" +--- +# `SignalWire.Contexts` + +## Classes + + + + + + Builder for multi-step, multi-context AI agent workflows. <p>A ContextBuilder owns one or more <xref href="SignalWire.Contexts.Context" data-throw-if-not-resolved="false"></xref>s; each context owns an ordered list of <xref href="SignalWire.Contexts.Step" data-throw-if-not-resolved="false"></xref>s. Only one context and one step is active at a time. Per chat turn, the runtime injects the current step's instructions as a system message, then asks the LLM for a response.</p> <p><b>Native tools auto-injected by the runtime:</b> When a step (or its enclosing context) declares valid\_steps or valid\_contexts, the runtime auto-injects two native tools so the model can navigate the flow: <code>next\_step</code> and <code>change\_context</code>. A third native tool, <code>gather\_submit</code>, is injected during gather\_info questioning. These three names are reserved: <xref href="SignalWire.Contexts.ContextBuilder.Validate" data-throw-if-not-resolved="false"></xref> rejects any agent that defines a SWAIG tool with one of them. See <xref href="SignalWire.Contexts.ReservedToolNames.Reserved" data-throw-if-not-resolved="false"></xref>.</p> <p><b>Function whitelisting (<xref href="SignalWire.Contexts.Step.SetFunctions(System.Object)" data-throw-if-not-resolved="false"></xref>):</b> Each step may declare a functions whitelist. The whitelist is applied in-memory at the start of each LLM turn. CRITICALLY: if a step does NOT declare a functions field, it INHERITS the previous step's active set. See <xref href="SignalWire.Contexts.Step.SetFunctions(System.Object)" data-throw-if-not-resolved="false"></xref> for details and examples.</p> + + + + + + + + Reserved tool names auto-injected by the runtime when contexts/steps are present. User-defined SWAIG tools must not collide with these names. <ul><li><code>next\_step</code> / <code>change\_context</code> are injected when valid\_steps or valid\_contexts is set so the model can navigate the flow.</li><li><code>gather\_submit</code> is injected while a step's gather\_info is collecting answers.</li></ul> <xref href="SignalWire.Contexts.ContextBuilder.Validate" data-throw-if-not-resolved="false"></xref> rejects any agent that registers a user tool sharing one of these names — the runtime would never call the user tool because the native one wins. + + + + diff --git a/fern/products/sdk-reference/dotnet/signal-wire.contexts/reserved-tool-names/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.contexts/reserved-tool-names/index.mdx new file mode 100644 index 0000000000..bf94e86685 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.contexts/reserved-tool-names/index.mdx @@ -0,0 +1,45 @@ +--- +slug: "/reference/dotnet/signal-wire.contexts/reserved-tool-names" +title: "ReservedToolNames" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Contexts.ReservedToolNames" + parent: "SignalWire.Contexts" + module: "SignalWire.Contexts" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs" + visibility: "public" +--- +# `ReservedToolNames` + +Reserved tool names auto-injected by the runtime when contexts/steps are +present. User-defined SWAIG tools must not collide with these names. + +<ul><li><code>next_step</code> / <code>change_context</code> are injected when +valid_steps or valid_contexts is set so the model can navigate the flow.</li><li><code>gather_submit</code> is injected while a step's gather_info is +collecting answers.</li></ul> + +<xref href="SignalWire.Contexts.ContextBuilder.Validate" data-throw-if-not-resolved="false"></xref> rejects any agent that registers a +user tool sharing one of these names — the runtime would never call the +user tool because the native one wins. + +**Modifiers:** `static` + +## Signature + +```dotnet +public static class ReservedToolNames +``` + +## Properties + + + +## Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 17. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.contexts/step/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.contexts/step/index.mdx new file mode 100644 index 0000000000..da0e58aebf --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.contexts/step/index.mdx @@ -0,0 +1,548 @@ +--- +slug: "/reference/dotnet/signal-wire.contexts/step" +title: "Step" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Contexts.Step" + parent: "SignalWire.Contexts" + module: "SignalWire.Contexts" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs" + visibility: "public" +--- +# `Step` + +## Signature + +```dotnet +public class Step +``` + +## Properties + + + + + + + + + +## Methods + +### AddBullets(string, List\) + +#### Signature + +```dotnet +public Step AddBullets(string title, List bullets) +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire.Contexts.Step` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 143. + +*** + +### AddGatherQuestion(Dictionary\) + +Add a question to this step's gather\_info. Initializes gather\_info +if not yet set. + +<p><b>IMPORTANT — gather mode locks function access:</b> While +the model is asking gather questions, the runtime forcibly +deactivates ALL of the step's other functions. The only callable +tools during a gather question are:</p> + +<ul><li><code>gather_submit</code> (the native answer-submission tool)</li><li>Whatever names you pass in this question's <code>"functions"</code> +option</li></ul> + +<p><code>next_step</code> and <code>change_context</code> are also filtered +out — the model cannot navigate away until the gather completes. +This is by design: it forces a tight ask → submit → next-question +loop.</p> + +<p>If a question needs to call out to a tool (e.g. validate an +email, geocode a ZIP), list that tool name in this question's +<code>"functions"</code> option. Functions listed here are active ONLY +for this question.</p> + +#### Signature + +```dotnet +public Step AddGatherQuestion(Dictionary opts) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Contexts.Step` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 255. + +*** + +### AddSection(string, string) + +#### Signature + +```dotnet +public Step AddSection(string title, string body) +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire.Contexts.Step` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 135. + +*** + +### ClearSections() + +#### Signature + +```dotnet +public Step ClearSections() +``` + +#### Returns + +`SignalWire.Contexts.Step` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 151. + +*** + +### SetEnd(bool) + +Mark this step as terminal for the step flow. + +<p><b>IMPORTANT:</b> <code class="paramref">end</code> = true does NOT end +the conversation or hang up the call. It exits step mode entirely +after this step executes — clearing the steps list, current step +index, valid_steps, and valid_contexts. The agent keeps running, +but operates only under the base system prompt and the +context-level prompt; no more step instructions are injected and +no more <code>next_step</code> tool is offered.</p> + +<p>To actually end the call, call a hangup tool or define a +hangup hook.</p> + +#### Signature + +```dotnet +public Step SetEnd(bool end) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Contexts.Step` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 216. + +*** + +### SetFunctions(object) + +Set which non-internal functions are callable while this step is +active. + +<p><b>IMPORTANT — inheritance behavior:</b> If you do NOT call +this method, the step inherits whichever function set was active on +the previous step (or the previous context's last step). The +server-side runtime only resets the active set when a step +explicitly declares its <code>functions</code> field. This is the most +common source of bugs in multi-step agents: forgetting +<xref href="SignalWire.Contexts.Step.SetFunctions(System.Object)" data-throw-if-not-resolved="false"></xref> on a later step lets the previous step's +tools leak through. Best practice is to call +<xref href="SignalWire.Contexts.Step.SetFunctions(System.Object)" data-throw-if-not-resolved="false"></xref> explicitly on every step that should +differ from the previous one.</p> + +<p>Keep the per-step active set small: LLM tool selection +accuracy degrades noticeably past ~7-8 simultaneously-active tools +per call. Use per-step whitelisting to partition large tool +collections.</p> + +<p>Internal functions (e.g. <code>gather_submit</code>, hangup hook) +are ALWAYS protected and cannot be deactivated by this whitelist. +The native navigation tools <code>next_step</code> and +<code>change_context</code> are injected automatically when +<xref href="SignalWire.Contexts.Step.SetValidSteps(System.Collections.Generic.List%7bSystem.String%7d)" data-throw-if-not-resolved="false"></xref> / <xref href="SignalWire.Contexts.Step.SetValidContexts(System.Collections.Generic.List%7bSystem.String%7d)" data-throw-if-not-resolved="false"></xref> is +used; they are not affected by this list.</p> + +#### Signature + +```dotnet +public Step SetFunctions(object functions) +``` + +#### Parameters + + + One of: \
    \
  • \List\\ — whitelist of function names allowed in this step.\
  • \
  • An empty list — explicit disable-all (no user functions callable).\
  • \
  • The string \"none"\ — synonym for the empty list.\
  • \
+
+ +#### Returns + +`SignalWire.Contexts.Step` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 197. + +*** + +### SetGatherInfo(Dictionary\) + +#### Signature + +```dotnet +public Step SetGatherInfo(Dictionary opts) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Contexts.Step` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 221. + +*** + +### SetResetConsolidate(bool) + +#### Signature + +```dotnet +public Step SetResetConsolidate(bool consolidate) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Contexts.Step` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 264. + +*** + +### SetResetFullReset(bool) + +#### Signature + +```dotnet +public Step SetResetFullReset(bool fullReset) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Contexts.Step` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 265. + +*** + +### SetResetSystemPrompt(string) + +#### Signature + +```dotnet +public Step SetResetSystemPrompt(string systemPrompt) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Contexts.Step` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 262. + +*** + +### SetResetUserPrompt(string) + +#### Signature + +```dotnet +public Step SetResetUserPrompt(string userPrompt) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Contexts.Step` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 263. + +*** + +### SetSkipToNextStep(bool) + +#### Signature + +```dotnet +public Step SetSkipToNextStep(bool skip) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Contexts.Step` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 219. + +*** + +### SetSkipUserTurn(bool) + +#### Signature + +```dotnet +public Step SetSkipUserTurn(bool skip) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Contexts.Step` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 218. + +*** + +### SetStepCriteria(string) + +#### Signature + +```dotnet +public Step SetStepCriteria(string criteria) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Contexts.Step` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 158. + +*** + +### SetText(string) + +#### Signature + +```dotnet +public Step SetText(string text) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Contexts.Step` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 127. + +*** + +### SetValidContexts(List\) + +#### Signature + +```dotnet +public Step SetValidContexts(List contexts) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Contexts.Step` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 200. + +*** + +### SetValidSteps(List\) + +#### Signature + +```dotnet +public Step SetValidSteps(List steps) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Contexts.Step` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 199. + +*** + +### Step(string) + +#### Signature + +```dotnet +public Step(string name) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 123. + +*** + +### ToDict() + +#### Signature + +```dotnet +public Dictionary ToDict() +``` + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 295. + +## Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 105. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.data-map/data-map/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.data-map/data-map/index.mdx new file mode 100644 index 0000000000..733528e18c --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.data-map/data-map/index.mdx @@ -0,0 +1,516 @@ +--- +slug: "/reference/dotnet/signal-wire.data-map/data-map" +title: "DataMap" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.DataMap.DataMap" + parent: "SignalWire.DataMap" + module: "SignalWire.DataMap" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs" + visibility: "public" +--- +# `DataMap` + +Builds a SWAIG data-map function definition with parameters, expressions, webhooks, +and output configuration. All builder methods return <code>this</code> for fluent chaining. + +## Signature + +```dotnet +public class DataMap +``` + +## Methods + +### Body(Dictionary\) + +#### Signature + +```dotnet +public DataMap Body(Dictionary data) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.DataMap.DataMap` + +#### Source + +[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) + +Line 172. + +*** + +### CreateExpressionTool(string, string, List\>, List\>) + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static Dictionary CreateExpressionTool(string name, string purpose, List> parameters, List> expressions) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) + +Line 263. + +*** + +### CreateSimpleApiTool(string, string, List\>, string, string, object, Dictionary\?) + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static Dictionary CreateSimpleApiTool(string name, string purpose, List> parameters, string method, string url, object output, Dictionary? headers = null) +``` + +#### Parameters + + + + + + + + + + + + + + + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) + +Line 244. + +*** + +### DataMap(string) + +#### Signature + +```dotnet +public DataMap(string functionName) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) + +Line 22. + +*** + +### Description(string) + +Alias for <xref href="SignalWire.DataMap.DataMap.Purpose(System.String)" data-throw-if-not-resolved="false"></xref>. Sets the LLM-facing tool +description. This string is read by the model to decide WHEN +to call this tool. See <xref href="SignalWire.DataMap.DataMap.Purpose(System.String)" data-throw-if-not-resolved="false"></xref> for bad-vs-good +examples. + +#### Signature + +```dotnet +public DataMap Description(string desc) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.DataMap.DataMap` + +#### Source + +[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) + +Line 59. + +*** + +### ErrorKeys(List\) + +#### Signature + +```dotnet +public DataMap ErrorKeys(List keys) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.DataMap.DataMap` + +#### Source + +[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) + +Line 203. + +*** + +### Expression(string, string, object, object?) + +#### Signature + +```dotnet +public DataMap Expression(string testValue, string pattern, object output, object? nomatchOutput = null) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`SignalWire.DataMap.DataMap` + +#### Source + +[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) + +Line 109. + +*** + +### FallbackOutput(object) + +#### Signature + +```dotnet +public DataMap FallbackOutput(object result) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.DataMap.DataMap` + +#### Source + +[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) + +Line 196. + +*** + +### ForEach(Dictionary\) + +#### Signature + +```dotnet +public DataMap ForEach(Dictionary config) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.DataMap.DataMap` + +#### Source + +[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) + +Line 184. + +*** + +### GlobalErrorKeys(List\) + +#### Signature + +```dotnet +public DataMap GlobalErrorKeys(List keys) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.DataMap.DataMap` + +#### Source + +[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) + +Line 209. + +*** + +### Output(object) + +#### Signature + +```dotnet +public DataMap Output(object result) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.DataMap.DataMap` + +#### Source + +[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) + +Line 190. + +*** + +### Parameter(string, string, string, bool, List\?) + +Add a parameter to this data-map tool — the <code class="paramref">description</code> +is LLM-FACING. + +<p>Each parameter description is rendered into the OpenAI +tool schema under <code>parameters.properties.<name>.description</code> +and sent to the model. The model uses it to decide HOW to fill +in the argument from user speech. It is prompt engineering, not +developer FYI.</p> + +<p><b>Bad vs good:</b></p> +<pre><code class="lang-csharp">BAD : .Parameter("city", "string", "the city") +GOOD: .Parameter("city", "string", + "The name of the city to get weather for, e.g. " + + "'San Francisco'. Ask the user if they did not " + + "provide one. Include the state or country if the " + + "city name is ambiguous.")</code></pre> + +#### Signature + +```dotnet +public DataMap Parameter(string name, string type, string description, bool required = false, List? enumValues = null) +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`SignalWire.DataMap.DataMap` + +#### Source + +[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) + +Line 81. + +*** + +### Params(Dictionary\) + +#### Signature + +```dotnet +public DataMap Params(Dictionary data) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.DataMap.DataMap` + +#### Source + +[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) + +Line 178. + +*** + +### Purpose(string) + +Set the LLM-facing tool description (the "purpose"). PROMPT +ENGINEERING, not developer documentation. + +<p>The description string is rendered into the OpenAI tool +schema <code>description</code> field on every LLM turn. The model +reads it to decide WHEN to call this tool. A vague +<xref href="SignalWire.DataMap.DataMap.Purpose(System.String)" data-throw-if-not-resolved="false"></xref> is the #1 cause of "the model has the +right tool but doesn't call it" failures with data-map tools.</p> + +<p><b>Bad vs good:</b></p> +<pre><code class="lang-csharp">BAD : .Purpose("weather api") +GOOD: .Purpose("Get the current weather conditions and " + + "forecast for a specific city. Use this " + + "whenever the user asks about weather, " + + "temperature, rain, or similar conditions in a " + + "named location.")</code></pre> + +#### Signature + +```dotnet +public DataMap Purpose(string desc) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.DataMap.DataMap` + +#### Source + +[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) + +Line 47. + +*** + +### ToSwaigFunction() + +#### Signature + +```dotnet +public Dictionary ToSwaigFunction() +``` + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) + +Line 215. + +*** + +### Webhook(string, string, Dictionary\?, string, bool, List\?) + +#### Signature + +```dotnet +public DataMap Webhook(string method, string url, Dictionary? headers = null, string formParam = "", bool inputArgsAsParams = false, List? requireArgs = null) +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`SignalWire.DataMap.DataMap` + +#### Source + +[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) + +Line 131. + +*** + +### WebhookExpressions(List\>) + +#### Signature + +```dotnet +public DataMap WebhookExpressions(List> expressions) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.DataMap.DataMap` + +#### Source + +[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) + +Line 166. + +## Source + +[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) + +Line 8. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.data-map/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.data-map/index.mdx new file mode 100644 index 0000000000..4dc4668351 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.data-map/index.mdx @@ -0,0 +1,20 @@ +--- +slug: "/reference/dotnet/signal-wire.data-map" +title: "SignalWire.DataMap" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "module" + language: "dotnet" + qualified_name: "SignalWire.DataMap" +--- +# `SignalWire.DataMap` + +## Classes + + + + Builds a SWAIG data-map function definition with parameters, expressions, webhooks, and output configuration. All builder methods return <code>this</code> for fluent chaining. + + diff --git a/fern/products/sdk-reference/dotnet/signal-wire.logging/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.logging/index.mdx new file mode 100644 index 0000000000..290a7cfcc1 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.logging/index.mdx @@ -0,0 +1,44 @@ +--- +slug: "/reference/dotnet/signal-wire.logging" +title: "SignalWire.Logging" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "module" + language: "dotnet" + qualified_name: "SignalWire.Logging" +--- +# `SignalWire.Logging` + +## Classes + + + + + +## Enums + +### LogLevel + +#### Signature + +```dotnet +public enum LogLevel +``` + +#### Properties + + + + + + + + + +#### Source + +[`src/SignalWire/Logging/Logger.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Logging/Logger.cs) + +Line 2. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.logging/logger/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.logging/logger/index.mdx new file mode 100644 index 0000000000..6d4ac40f2c --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.logging/logger/index.mdx @@ -0,0 +1,188 @@ +--- +slug: "/reference/dotnet/signal-wire.logging/logger" +title: "Logger" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Logging.Logger" + parent: "SignalWire.Logging" + module: "SignalWire.Logging" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Logging/Logger.cs" + visibility: "public" +--- +# `Logger` + +**Modifiers:** `sealed` + +## Signature + +```dotnet +public sealed class Logger +``` + +## Properties + + + + + + + +## Methods + +### Debug(string) + +#### Signature + +```dotnet +public void Debug(string message) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Logging/Logger.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Logging/Logger.cs) + +Line 51. + +*** + +### Error(string) + +#### Signature + +```dotnet +public void Error(string message) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Logging/Logger.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Logging/Logger.cs) + +Line 54. + +*** + +### GetLogger(string) + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static Logger GetLogger(string name = "signalwire") +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Logging.Logger` + +#### Source + +[`src/SignalWire/Logging/Logger.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Logging/Logger.cs) + +Line 30. + +*** + +### Info(string) + +#### Signature + +```dotnet +public void Info(string message) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Logging/Logger.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Logging/Logger.cs) + +Line 52. + +*** + +### Reset() + +Reset all logger instances (for testing). + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static void Reset() +``` + +#### Source + +[`src/SignalWire/Logging/Logger.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Logging/Logger.cs) + +Line 44. + +*** + +### ShouldLog(LogLevel) + +#### Signature + +```dotnet +public bool ShouldLog(LogLevel level) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Logging/Logger.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Logging/Logger.cs) + +Line 49. + +*** + +### Warn(string) + +#### Signature + +```dotnet +public void Warn(string message) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Logging/Logger.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Logging/Logger.cs) + +Line 53. + +## Source + +[`src/SignalWire/Logging/Logger.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Logging/Logger.cs) + +Line 10. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.pom/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.pom/index.mdx new file mode 100644 index 0000000000..69f18dc06c --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.pom/index.mdx @@ -0,0 +1,22 @@ +--- +slug: "/reference/dotnet/signal-wire.pom" +title: "SignalWire.POM" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "module" + language: "dotnet" + qualified_name: "SignalWire.POM" +--- +# `SignalWire.POM` + +## Classes + + + + + + + + diff --git a/fern/products/sdk-reference/dotnet/signal-wire.pom/pom-builder/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.pom/pom-builder/index.mdx new file mode 100644 index 0000000000..40c49b4fe1 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.pom/pom-builder/index.mdx @@ -0,0 +1,323 @@ +--- +slug: "/reference/dotnet/signal-wire.pom/pom-builder" +title: "PomBuilder" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.POM.PomBuilder" + parent: "SignalWire.POM" + module: "SignalWire.POM" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PomBuilder.cs" + visibility: "public" +--- +# `PomBuilder` + +## Signature + +```dotnet +public class PomBuilder +``` + +## Properties + + + +## Methods + +### AddSection(string, string, List\?, bool, bool, List\>?) + +Add a new section. (Python parity: +`PomBuilder.add_section`.) + +#### Signature + +```dotnet +public PomBuilder AddSection(string title, string body = "", List? bullets = null, bool numbered = false, bool numberedBullets = false, List>? subsections = null) +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`SignalWire.POM.PomBuilder` + +#### Source + +[`src/SignalWire/POM/PomBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PomBuilder.cs) + +Line 25. + +*** + +### AddSubsection(string, string, string, List\?) + +Add a subsection under an existing section +(auto-vivifies parent if missing). (Python parity: +`PomBuilder.add_subsection`.) + +#### Signature + +```dotnet +public PomBuilder AddSubsection(string parentTitle, string title, string body = "", List? bullets = null) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`SignalWire.POM.PomBuilder` + +#### Source + +[`src/SignalWire/POM/PomBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PomBuilder.cs) + +Line 83. + +*** + +### AddToSection(string, string?, string?, List\?) + +Add content to an existing section (auto-vivifies if +missing). (Python parity: `PomBuilder.add_to_section`.) + +#### Signature + +```dotnet +public PomBuilder AddToSection(string title, string? body = null, string? bullet = null, List? bullets = null) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`SignalWire.POM.PomBuilder` + +#### Source + +[`src/SignalWire/POM/PomBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PomBuilder.cs) + +Line 52. + +*** + +### FromSections(List\>) + +Build a PomBuilder from a list of section dicts. +(Python parity: `PomBuilder.from_sections` classmethod.) + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static PomBuilder FromSections(List> sections) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.POM.PomBuilder` + +#### Source + +[`src/SignalWire/POM/PomBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PomBuilder.cs) + +Line 120. + +*** + +### GetSection(string) + +Get a section by title, or null if absent. +(Python parity: `PomBuilder.get_section`.) + +#### Signature + +```dotnet +public Section? GetSection(string title) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.POM.Section` + +#### Source + +[`src/SignalWire/POM/PomBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PomBuilder.cs) + +Line 103. + +*** + +### HasSection(string) + +Check if a section with the given title exists. +(Python parity: `PomBuilder.has_section`.) + +#### Signature + +```dotnet +public bool HasSection(string title) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/POM/PomBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PomBuilder.cs) + +Line 99. + +*** + +### PomBuilder() + +#### Signature + +```dotnet +public PomBuilder() +``` + +#### Source + +[`src/SignalWire/POM/PomBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PomBuilder.cs) + +Line 17. + +*** + +### RenderMarkdown() + +Render the POM as markdown. + +#### Signature + +```dotnet +public string RenderMarkdown() +``` + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/POM/PomBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PomBuilder.cs) + +Line 107. + +*** + +### RenderXml() + +Render the POM as XML. + +#### Signature + +```dotnet +public string RenderXml() +``` + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/POM/PomBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PomBuilder.cs) + +Line 110. + +*** + +### ToDict() + +Serialize the POM to a list of section dicts. + +#### Signature + +```dotnet +public List> ToDict() +``` + +#### Returns + +`List>` + +#### Source + +[`src/SignalWire/POM/PomBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PomBuilder.cs) + +Line 113. + +*** + +### ToJson() + +Serialize the POM to a JSON string. + +#### Signature + +```dotnet +public string ToJson() +``` + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/POM/PomBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PomBuilder.cs) + +Line 116. + +## Source + +[`src/SignalWire/POM/PomBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PomBuilder.cs) + +Line 12. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.pom/prompt-object-model/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.pom/prompt-object-model/index.mdx new file mode 100644 index 0000000000..b95018a6bb --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.pom/prompt-object-model/index.mdx @@ -0,0 +1,330 @@ +--- +slug: "/reference/dotnet/signal-wire.pom/prompt-object-model" +title: "PromptObjectModel" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.POM.PromptObjectModel" + parent: "SignalWire.POM" + module: "SignalWire.POM" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PromptObjectModel.cs" + visibility: "public" +--- +# `PromptObjectModel` + +## Signature + +```dotnet +public class PromptObjectModel +``` + +## Properties + + + + + +## Methods + +### AddPomAsSubsection + +Add a PromptObjectModel as a subsection of an existing +section in this model, identified by title. +(Python parity: `PromptObjectModel.add_pom_as_subsection`.) + +#### Signature + + + + ```dotnet + public void AddPomAsSubsection(string targetTitle, PromptObjectModel pomToAdd) + ``` + + + + ```dotnet + public void AddPomAsSubsection(Section target, PromptObjectModel pomToAdd) + ``` + + + +#### Parameters (Overload 1) + + + + + +#### Parameters (Overload 2) + + + + + +#### Source + +[`src/SignalWire/POM/PromptObjectModel.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PromptObjectModel.cs) + +Line 514. + +*** + +### AddSection(string?, string, List\?, bool?, bool) + +Add a top-level section to the model, returning the new +Section. Only the first added section may have a null title. +(Python parity: `PromptObjectModel.add_section`.) + +#### Signature + +```dotnet +public Section AddSection(string? title = null, string body = "", List? bullets = null, bool? numbered = null, bool numberedBullets = false) +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`SignalWire.POM.Section` + +#### Source + +[`src/SignalWire/POM/PromptObjectModel.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PromptObjectModel.cs) + +Line 266. + +*** + +### FindSection(string) + +Recursively find a section by title. Returns null if not +found. (Python parity: `PromptObjectModel.find_section`.) + +#### Signature + +```dotnet +public Section? FindSection(string title) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.POM.Section` + +#### Source + +[`src/SignalWire/POM/PromptObjectModel.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PromptObjectModel.cs) + +Line 283. + +*** + +### FromJson(string) + +Construct a PromptObjectModel from JSON. +(Python parity: `PromptObjectModel.from_json`.) + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static PromptObjectModel FromJson(string json) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.POM.PromptObjectModel` + +#### Source + +[`src/SignalWire/POM/PromptObjectModel.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PromptObjectModel.cs) + +Line 439. + +*** + +### FromYaml(string) + +Construct a PromptObjectModel from YAML string. +(Python parity: `PromptObjectModel.from_yaml`.) + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static PromptObjectModel FromYaml(string yaml) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.POM.PromptObjectModel` + +#### Source + +[`src/SignalWire/POM/PromptObjectModel.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PromptObjectModel.cs) + +Line 406. + +*** + +### PromptObjectModel(bool) + +#### Signature + +```dotnet +public PromptObjectModel(bool debug = false) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/POM/PromptObjectModel.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PromptObjectModel.cs) + +Line 257. + +*** + +### RenderMarkdown() + +Render the model as markdown. Mirrors Python's +`PromptObjectModel.render_markdown` exactly. + +#### Signature + +```dotnet +public string RenderMarkdown() +``` + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/POM/PromptObjectModel.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PromptObjectModel.cs) + +Line 306. + +*** + +### RenderXml() + +#### Signature + +```dotnet +public string RenderXml() +``` + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/POM/PromptObjectModel.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PromptObjectModel.cs) + +Line 337. + +*** + +### ToDict() + +Serialize to a list of dicts (matches Python's to\_dict +which returns a List rather than a Dict). + +#### Signature + +```dotnet +public List> ToDict() +``` + +#### Returns + +`List>` + +#### Source + +[`src/SignalWire/POM/PromptObjectModel.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PromptObjectModel.cs) + +Line 372. + +*** + +### ToJson() + +Serialize to JSON string with 2-space indent and Python +dict-style formatting. Empty model emits `"[]"`. + +#### Signature + +```dotnet +public string ToJson() +``` + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/POM/PromptObjectModel.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PromptObjectModel.cs) + +Line 377. + +*** + +### ToYaml() + +Serialize to YAML string. Matches PyYAML's +`yaml.dump(data, default_flow_style=False, sort_keys=False)` +exactly. Empty model emits `"[]\n"`. + +#### Signature + +```dotnet +public string ToYaml() +``` + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/POM/PromptObjectModel.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PromptObjectModel.cs) + +Line 393. + +## Source + +[`src/SignalWire/POM/PromptObjectModel.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PromptObjectModel.cs) + +Line 250. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.pom/section/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.pom/section/index.mdx new file mode 100644 index 0000000000..261b81ebb3 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.pom/section/index.mdx @@ -0,0 +1,244 @@ +--- +slug: "/reference/dotnet/signal-wire.pom/section" +title: "Section" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.POM.Section" + parent: "SignalWire.POM" + module: "SignalWire.POM" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PromptObjectModel.cs" + visibility: "public" +--- +# `Section` + +## Signature + +```dotnet +public class Section +``` + +## Properties + + + + + + + Three-state numbering: null = inherit, true = force on, false = force off. (Python parity: `numbered` is `Optional[bool]`.) Sibling propagation: if any sibling at the same level has Numbered==true, all siblings get numbered unless they have Numbered==false. + + + + + + + + Section title. Null for the (allowed) first untitled top-level section. (Python parity: `Section.title` is `Optional[str]`.) + + +## Methods + +### AddBody(string) + +Set or replace this section's body text. +(Python parity: `Section.add_body`.) + +#### Signature + +```dotnet +public Section AddBody(string body) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.POM.Section` + +#### Source + +[`src/SignalWire/POM/PromptObjectModel.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PromptObjectModel.cs) + +Line 66. + +*** + +### AddBullets(List\) + +Append bullets to this section. +(Python parity: `Section.add_bullets`.) + +#### Signature + +```dotnet +public Section AddBullets(List bullets) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.POM.Section` + +#### Source + +[`src/SignalWire/POM/PromptObjectModel.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PromptObjectModel.cs) + +Line 74. + +*** + +### AddSubsection(string?, string, List\?, bool?, bool) + +Add a subsection under this section, returning the new +Section. (Python parity: `Section.add_subsection`.) + +#### Signature + +```dotnet +public Section AddSubsection(string? title = null, string body = "", List? bullets = null, bool? numbered = null, bool numberedBullets = false) +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`SignalWire.POM.Section` + +#### Source + +[`src/SignalWire/POM/PromptObjectModel.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PromptObjectModel.cs) + +Line 82. + +*** + +### RenderMarkdown(int, List\?) + +Render this section as a markdown fragment, indented at +the given header level (default 2). Mirrors Python's +`Section.render_markdown` exactly. + +#### Signature + +```dotnet +public string RenderMarkdown(int level = 2, List? sectionNumber = null) +``` + +#### Parameters + + + + + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/POM/PromptObjectModel.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PromptObjectModel.cs) + +Line 99. + +*** + +### RenderXml(int, List\?) + +#### Signature + +```dotnet +public string RenderXml(int indent = 0, List? sectionNumber = null) +``` + +#### Parameters + + + + + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/POM/PromptObjectModel.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PromptObjectModel.cs) + +Line 164. + +*** + +### Section(string?, string, List\?, bool?, bool) + +#### Signature + +```dotnet +public Section(string? title = null, string body = "", List? bullets = null, bool? numbered = null, bool numberedBullets = false) +``` + +#### Parameters + + + + + + + + + + + +#### Source + +[`src/SignalWire/POM/PromptObjectModel.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PromptObjectModel.cs) + +Line 49. + +*** + +### ToDict() + +Serialize to a Dictionary suitable for JSON. Emits +keys in this exact order: title, body, bullets, subsections, +numbered, numberedBullets — and only when non-empty / non-null / +non-default. Mirrors Python's `Section.to_dict`. + +#### Signature + +```dotnet +public Dictionary ToDict() +``` + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/POM/PromptObjectModel.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PromptObjectModel.cs) + +Line 229. + +## Source + +[`src/SignalWire/POM/PromptObjectModel.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PromptObjectModel.cs) + +Line 27. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.prefabs/concierge-agent/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.prefabs/concierge-agent/index.mdx new file mode 100644 index 0000000000..86db611588 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.prefabs/concierge-agent/index.mdx @@ -0,0 +1,177 @@ +--- +slug: "/reference/dotnet/signal-wire.prefabs/concierge-agent" +title: "ConciergeAgent" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Prefabs.ConciergeAgent" + parent: "SignalWire.Prefabs" + module: "SignalWire.Prefabs" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/ConciergeAgent.cs" + visibility: "public" +--- +# `ConciergeAgent` + +Prefab concierge agent for venue/hotel style interactions. +Registers <code>check\_availability</code> and <code>get\_directions</code> tools. + +## Signature + +```dotnet +public class ConciergeAgent : AgentBase +``` + +## Inheritance + +**Extends:** [SignalWire.SWML.Service](/docs/sdk-reference/reference/dotnet/signal-wire.swml/service) + +## Methods + +### CheckAvailability(Dictionary\, Dictionary\) + +SWAIG tool handler for the `check_availability` tool. +(Python parity: `ConciergeAgent.check_availability(args, raw_data)`.) + +#### Signature + +```dotnet +public FunctionResult CheckAvailability(Dictionary args, Dictionary rawData) +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/Prefabs/ConciergeAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/ConciergeAgent.cs) + +Line 91. + +*** + +### ConciergeAgent(string, Dictionary\, Dictionary\?) + +#### Signature + +```dotnet +public ConciergeAgent(string name, Dictionary venueInfo, Dictionary? options = null) +``` + +#### Parameters + + + + + + + +#### Source + +[`src/SignalWire/Prefabs/ConciergeAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/ConciergeAgent.cs) + +Line 15. + +*** + +### GetAmenities() + +#### Signature + +```dotnet +public Dictionary> GetAmenities() +``` + +#### Returns + +`Dictionary>` + +#### Source + +[`src/SignalWire/Prefabs/ConciergeAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/ConciergeAgent.cs) + +Line 121. + +*** + +### GetDirections(Dictionary\, Dictionary\) + +SWAIG tool handler for the `get_directions` tool. +(Python parity: `ConciergeAgent.get_directions(args, raw_data)`.) + +#### Signature + +```dotnet +public FunctionResult GetDirections(Dictionary args, Dictionary rawData) +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/Prefabs/ConciergeAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/ConciergeAgent.cs) + +Line 102. + +*** + +### GetServices() + +#### Signature + +```dotnet +public List GetServices() +``` + +#### Returns + +`List` + +#### Source + +[`src/SignalWire/Prefabs/ConciergeAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/ConciergeAgent.cs) + +Line 120. + +*** + +### GetVenueName() + +#### Signature + +```dotnet +public string GetVenueName() +``` + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/Prefabs/ConciergeAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/ConciergeAgent.cs) + +Line 119. + +## Source + +[`src/SignalWire/Prefabs/ConciergeAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/ConciergeAgent.cs) + +Line 9. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.prefabs/faq-bot-agent/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.prefabs/faq-bot-agent/index.mdx new file mode 100644 index 0000000000..0bcadee407 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.prefabs/faq-bot-agent/index.mdx @@ -0,0 +1,129 @@ +--- +slug: "/reference/dotnet/signal-wire.prefabs/faq-bot-agent" +title: "FAQBotAgent" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Prefabs.FAQBotAgent" + parent: "SignalWire.Prefabs" + module: "SignalWire.Prefabs" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/FAQBotAgent.cs" + visibility: "public" +--- +# `FAQBotAgent` + +Prefab FAQ bot agent with keyword-scored search. +Registers a <code>search\_faqs</code> tool. + +## Signature + +```dotnet +public class FAQBotAgent : AgentBase +``` + +## Inheritance + +**Extends:** [SignalWire.SWML.Service](/docs/sdk-reference/reference/dotnet/signal-wire.swml/service) + +## Methods + +### FAQBotAgent(string, List\>, Dictionary\?) + +#### Signature + +```dotnet +public FAQBotAgent(string name, List> faqs, Dictionary? options = null) +``` + +#### Parameters + + + + + + + +#### Source + +[`src/SignalWire/Prefabs/FAQBotAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/FAQBotAgent.cs) + +Line 14. + +*** + +### GetFaqs() + +#### Signature + +```dotnet +public List> GetFaqs() +``` + +#### Returns + +`List>` + +#### Source + +[`src/SignalWire/Prefabs/FAQBotAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/FAQBotAgent.cs) + +Line 98. + +*** + +### GetSuggestRelated() + +#### Signature + +```dotnet +public bool GetSuggestRelated() +``` + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Prefabs/FAQBotAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/FAQBotAgent.cs) + +Line 99. + +*** + +### SearchFaqs(Dictionary\, Dictionary\) + +SWAIG tool handler that searches the configured FAQ +knowledge base for the best keyword-scored answer. +(Python parity: `FAQBotAgent.search_faqs(args, raw_data)`.) + +#### Signature + +```dotnet +public FunctionResult SearchFaqs(Dictionary args, Dictionary rawData) +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/Prefabs/FAQBotAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/FAQBotAgent.cs) + +Line 63. + +## Source + +[`src/SignalWire/Prefabs/FAQBotAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/FAQBotAgent.cs) + +Line 9. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.prefabs/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.prefabs/index.mdx new file mode 100644 index 0000000000..88eb4b9190 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.prefabs/index.mdx @@ -0,0 +1,36 @@ +--- +slug: "/reference/dotnet/signal-wire.prefabs" +title: "SignalWire.Prefabs" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "module" + language: "dotnet" + qualified_name: "SignalWire.Prefabs" +--- +# `SignalWire.Prefabs` + +## Classes + + + + Prefab concierge agent for venue/hotel style interactions. Registers <code>check\_availability</code> and <code>get\_directions</code> tools. + + + + Prefab FAQ bot agent with keyword-scored search. Registers a <code>search\_faqs</code> tool. + + + + Prefab agent that gathers information by asking a series of questions. Registers <code>start\_questions</code> and <code>submit\_answer</code> tools. + + + + Prefab agent that greets callers and transfers them to departments. Registers <code>collect\_caller\_info</code> and <code>transfer\_call</code> tools. + + + + Prefab agent that conducts surveys with typed question validation. Registers <code>validate\_response</code> and <code>log\_response</code> tools. + + diff --git a/fern/products/sdk-reference/dotnet/signal-wire.prefabs/info-gatherer-agent/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.prefabs/info-gatherer-agent/index.mdx new file mode 100644 index 0000000000..7d75fa89d0 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.prefabs/info-gatherer-agent/index.mdx @@ -0,0 +1,143 @@ +--- +slug: "/reference/dotnet/signal-wire.prefabs/info-gatherer-agent" +title: "InfoGathererAgent" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Prefabs.InfoGathererAgent" + parent: "SignalWire.Prefabs" + module: "SignalWire.Prefabs" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/InfoGathererAgent.cs" + visibility: "public" +--- +# `InfoGathererAgent` + +Prefab agent that gathers information by asking a series of questions. +Registers <code>start\_questions</code> and <code>submit\_answer</code> tools. + +## Signature + +```dotnet +public class InfoGathererAgent : AgentBase +``` + +## Inheritance + +**Extends:** [SignalWire.SWML.Service](/docs/sdk-reference/reference/dotnet/signal-wire.swml/service) + +## Methods + +### GetQuestions() + +#### Signature + +```dotnet +public List> GetQuestions() +``` + +#### Returns + +`List>` + +#### Source + +[`src/SignalWire/Prefabs/InfoGathererAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/InfoGathererAgent.cs) + +Line 77. + +*** + +### InfoGathererAgent(string, List\>, AgentOptions?) + +#### Signature + +```dotnet +public InfoGathererAgent(string name, List> questions, AgentOptions? options = null) +``` + +#### Parameters + + + Agent name (defaults to "info\_gatherer"). + + + + List of question dicts with key\_name, question\_text, and optional confirm. + + + + Additional <xref href="SignalWire.Agent.AgentOptions" data-throw-if-not-resolved="false"></xref> overrides. + + +#### Source + +[`src/SignalWire/Prefabs/InfoGathererAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/InfoGathererAgent.cs) + +Line 16. + +*** + +### StartQuestions(Dictionary\, Dictionary\) + +SWAIG tool handler for the `start_questions` tool. +(Python parity: `InfoGathererAgent.start_questions`.) + +#### Signature + +```dotnet +public FunctionResult StartQuestions(Dictionary args, Dictionary rawData) +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/Prefabs/InfoGathererAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/InfoGathererAgent.cs) + +Line 60. + +*** + +### SubmitAnswer(Dictionary\, Dictionary\) + +SWAIG tool handler for the `submit_answer` tool. +(Python parity: `InfoGathererAgent.submit_answer`.) + +#### Signature + +```dotnet +public FunctionResult SubmitAnswer(Dictionary args, Dictionary rawData) +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/Prefabs/InfoGathererAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/InfoGathererAgent.cs) + +Line 71. + +## Source + +[`src/SignalWire/Prefabs/InfoGathererAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/InfoGathererAgent.cs) + +Line 9. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.prefabs/receptionist-agent/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.prefabs/receptionist-agent/index.mdx new file mode 100644 index 0000000000..1820868dcd --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.prefabs/receptionist-agent/index.mdx @@ -0,0 +1,99 @@ +--- +slug: "/reference/dotnet/signal-wire.prefabs/receptionist-agent" +title: "ReceptionistAgent" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Prefabs.ReceptionistAgent" + parent: "SignalWire.Prefabs" + module: "SignalWire.Prefabs" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/ReceptionistAgent.cs" + visibility: "public" +--- +# `ReceptionistAgent` + +Prefab agent that greets callers and transfers them to departments. +Registers <code>collect\_caller\_info</code> and <code>transfer\_call</code> tools. + +## Signature + +```dotnet +public class ReceptionistAgent : AgentBase +``` + +## Inheritance + +**Extends:** [SignalWire.SWML.Service](/docs/sdk-reference/reference/dotnet/signal-wire.swml/service) + +## Methods + +### GetDepartments() + +#### Signature + +```dotnet +public List> GetDepartments() +``` + +#### Returns + +`List>` + +#### Source + +[`src/SignalWire/Prefabs/ReceptionistAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/ReceptionistAgent.cs) + +Line 94. + +*** + +### GetGreeting() + +#### Signature + +```dotnet +public string GetGreeting() +``` + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/Prefabs/ReceptionistAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/ReceptionistAgent.cs) + +Line 95. + +*** + +### ReceptionistAgent(string, List\>, Dictionary\?) + +#### Signature + +```dotnet +public ReceptionistAgent(string name, List> departments, Dictionary? options = null) +``` + +#### Parameters + + + + + + + +#### Source + +[`src/SignalWire/Prefabs/ReceptionistAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/ReceptionistAgent.cs) + +Line 14. + +## Source + +[`src/SignalWire/Prefabs/ReceptionistAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/ReceptionistAgent.cs) + +Line 9. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.prefabs/survey-agent/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.prefabs/survey-agent/index.mdx new file mode 100644 index 0000000000..4ccaca0bf8 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.prefabs/survey-agent/index.mdx @@ -0,0 +1,157 @@ +--- +slug: "/reference/dotnet/signal-wire.prefabs/survey-agent" +title: "SurveyAgent" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Prefabs.SurveyAgent" + parent: "SignalWire.Prefabs" + module: "SignalWire.Prefabs" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/SurveyAgent.cs" + visibility: "public" +--- +# `SurveyAgent` + +Prefab agent that conducts surveys with typed question validation. +Registers <code>validate\_response</code> and <code>log\_response</code> tools. + +## Signature + +```dotnet +public class SurveyAgent : AgentBase +``` + +## Inheritance + +**Extends:** [SignalWire.SWML.Service](/docs/sdk-reference/reference/dotnet/signal-wire.swml/service) + +## Methods + +### GetSurveyName() + +#### Signature + +```dotnet +public string GetSurveyName() +``` + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/Prefabs/SurveyAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/SurveyAgent.cs) + +Line 141. + +*** + +### GetSurveyQuestions() + +#### Signature + +```dotnet +public List> GetSurveyQuestions() +``` + +#### Returns + +`List>` + +#### Source + +[`src/SignalWire/Prefabs/SurveyAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/SurveyAgent.cs) + +Line 140. + +*** + +### LogResponse(Dictionary\, Dictionary\) + +SWAIG tool handler for the `log_response` tool. +(Python parity: `SurveyAgent.log_response`.) + +#### Signature + +```dotnet +public FunctionResult LogResponse(Dictionary args, Dictionary rawData) +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/Prefabs/SurveyAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/SurveyAgent.cs) + +Line 133. + +*** + +### SurveyAgent(string, List\>, Dictionary\?) + +#### Signature + +```dotnet +public SurveyAgent(string name, List> questions, Dictionary? options = null) +``` + +#### Parameters + + + + + + + +#### Source + +[`src/SignalWire/Prefabs/SurveyAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/SurveyAgent.cs) + +Line 16. + +*** + +### ValidateResponse(Dictionary\, Dictionary\) + +SWAIG tool handler for the `validate_response` tool. +(Python parity: `SurveyAgent.validate_response`.) + +#### Signature + +```dotnet +public FunctionResult ValidateResponse(Dictionary args, Dictionary rawData) +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/Prefabs/SurveyAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/SurveyAgent.cs) + +Line 81. + +## Source + +[`src/SignalWire/Prefabs/SurveyAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/SurveyAgent.cs) + +Line 9. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.relay/action/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.relay/action/index.mdx new file mode 100644 index 0000000000..f96a32db9c --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.relay/action/index.mdx @@ -0,0 +1,367 @@ +--- +slug: "/reference/dotnet/signal-wire.relay/action" +title: "Action" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Relay.Action" + parent: "SignalWire.Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs" + visibility: "public" +--- +# `Action` + +Base class for all RELAY call actions (play, record, collect, etc.). + +An Action is the client-side handle returned when you start an +asynchronous operation on a call. It accumulates events, tracks +state, and resolves once the operation reaches a terminal state. + +Uses <xref href="System.Threading.Tasks.TaskCompletionSource" data-throw-if-not-resolved="false"></xref> for native async/await support. + +## Signature + +```dotnet +public class Action +``` + +## Properties + + + + + + + + + + + + + + + + + + + + + +## Methods + +### AcceptsTerminalEvent(string) + +Subclasses may filter which event types can resolve this action via +the standard terminal-state path. Default: any event type registered +in <xref href="SignalWire.Relay.Constants.ActionTerminalStates" data-throw-if-not-resolved="false"></xref> may resolve. + +Override returns false to block resolution for a specific event type +(e.g. CollectAction blocks <code>calling.call.play</code> so the play +phase of <code>play\_and\_collect</code> doesn't resolve the collect side). + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual bool AcceptsTerminalEvent(string eventType) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 126. + +*** + +### Action(string, string, string, object) + +#### Signature + +```dotnet +public Action(string controlId, string callId, string nodeId, object client) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 30. + +*** + +### ExecuteSubcommand(string, Dictionary\?) + +Send a sub-command RPC through the client. +The payload always includes control\_id, call\_id, and node\_id. + +#### Signature + +```dotnet +public void ExecuteSubcommand(string method, Dictionary? extraParams = null) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 171. + +*** + +### GetCallId() + +#### Signature + +```dotnet +public string GetCallId() +``` + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 66. + +*** + +### GetControlId() + +#### Signature + +```dotnet +public string GetControlId() +``` + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 65. + +*** + +### GetNodeId() + +#### Signature + +```dotnet +public string GetNodeId() +``` + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 67. + +*** + +### GetStopMethod() + +Return the RELAY RPC method that stops this action. +Subclasses MUST override to return the correct method name. + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual string GetStopMethod() +``` + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 165. + +*** + +### HandleEvent(Event) + +Append an incoming event and update local state / payload. + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual void HandleEvent(Event evt) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 102. + +*** + +### OnCompleted + +Register a callback to fire when the action completes. +If the action is already done the callback fires immediately. + +#### Signature + + + + ```dotnet + public Action OnCompleted(Func callback) + ``` + + + + ```dotnet + public Action OnCompleted(Action callback) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`SignalWire.Relay.Action` + +#### Returns (Overload 2) + +`SignalWire.Relay.Action` + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 77. + +*** + +### Resolve(object?) + +Mark this action as completed. The optional result is stored and the +onCompleted callback fires exactly once. + +#### Signature + +```dotnet +public void Resolve(object? result = null) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 136. + +*** + +### Stop() + +Stop the running action by sending its stop sub-command. + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual void Stop() +``` + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 152. + +*** + +### WaitAsync(int) + +Await until the action completes or the timeout elapses. +Returns the resolved result, or null on timeout. + +#### Signature + +```dotnet +public Task WaitAsync(int timeoutSeconds = 30) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task` + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 46. + +## Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 13. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.relay/ai-action/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.relay/ai-action/index.mdx new file mode 100644 index 0000000000..949fd413e6 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.relay/ai-action/index.mdx @@ -0,0 +1,85 @@ +--- +slug: "/reference/dotnet/signal-wire.relay/ai-action" +title: "AIAction" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Relay.AIAction" + parent: "SignalWire.Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs" + visibility: "public" +--- +# `AIAction` + +Handle for calling.ai operations. + +## Signature + +```dotnet +public class AIAction : Action +``` + +## Inheritance + +**Extends:** [SignalWire.Relay.Action](/docs/sdk-reference/reference/dotnet/signal-wire.relay/action) + +## Methods + +### AIAction(string, string, string, object) + +#### Signature + +```dotnet +public AIAction(string controlId, string callId, string nodeId, object client) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 402. + +*** + +### GetStopMethod() + +Return the RELAY RPC method that stops this action. +Subclasses MUST override to return the correct method name. + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override string GetStopMethod() +``` + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 405. + +## Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 400. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.relay/call-state-extensions/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.relay/call-state-extensions/index.mdx new file mode 100644 index 0000000000..7fcdae2100 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.relay/call-state-extensions/index.mdx @@ -0,0 +1,120 @@ +--- +slug: "/reference/dotnet/signal-wire.relay/call-state-extensions" +title: "CallStateExtensions" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Relay.CallStateExtensions" + parent: "SignalWire.Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/CallState.cs" + visibility: "public" +--- +# `CallStateExtensions` + +Wire-string mapping, parsing, and terminal-state predicate for <xref href="SignalWire.Relay.CallState" data-throw-if-not-resolved="false"></xref>. + +**Modifiers:** `static` + +## Signature + +```dotnet +public static class CallStateExtensions +``` + +## Methods + +### IsTerminal(CallState) + +True when this state is terminal (the call has fully ended). Mirrors <xref href="SignalWire.Relay.Constants.CallTerminalStates" data-throw-if-not-resolved="false"></xref> — terminal = <code>ended</code>. + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static bool IsTerminal(this CallState state) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Relay/CallState.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/CallState.cs) + +Line 78. + +*** + +### ToWireName(CallState) + +The canonical wire string for this call state (e.g. "answered"). + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static string ToWireName(this CallState state) +``` + +#### Parameters + + + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/Relay/CallState.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/CallState.cs) + +Line 69. + +*** + +### TryParse(string?, out CallState) + +Parse a wire string into a <xref href="SignalWire.Relay.CallState" data-throw-if-not-resolved="false"></xref>. Returns <code>false</code> (and <code>default</code>) for an unrecognised value — the +server may introduce new states, so callers fall back to the raw +string on <xref href="SignalWire.Relay.Call.State" data-throw-if-not-resolved="false"></xref> rather than crashing. + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static bool TryParse(string? wire, out CallState state) +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Relay/CallState.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/CallState.cs) + +Line 87. + +## Source + +[`src/SignalWire/Relay/CallState.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/CallState.cs) + +Line 54. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.relay/call/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.relay/call/index.mdx new file mode 100644 index 0000000000..e1c5887314 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.relay/call/index.mdx @@ -0,0 +1,1462 @@ +--- +slug: "/reference/dotnet/signal-wire.relay/call" +title: "Call" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Relay.Call" + parent: "SignalWire.Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs" + visibility: "public" +--- +# `Call` + +Represents a RELAY voice call. + +Holds call-level state, dispatches server events to registered listeners +and to in-flight Action objects, and exposes every calling.\* RPC method +as a first-class C# method. + +## Signature + +```dotnet +public class Call +``` + +## Properties + + + controlId => Action + + + + + + The current call lifecycle state as the typed <xref href="SignalWire.Relay.CallState" data-throw-if-not-resolved="false"></xref> enum, parsed from <xref href="SignalWire.Relay.Call.State" data-throw-if-not-resolved="false"></xref>. Returns <code>null</code> when <xref href="SignalWire.Relay.Call.State" data-throw-if-not-resolved="false"></xref> is an unrecognised (e.g. newly-introduced server) value — read <xref href="SignalWire.Relay.Call.State" data-throw-if-not-resolved="false"></xref> for the raw string in that case. This is a typed convenience alongside the parity-bearing string <xref href="SignalWire.Relay.Call.State" data-throw-if-not-resolved="false"></xref>; it always agrees with it for known states. + + + + + + + + + + + + + + + + + + User-registered event callbacks (catch-all). + + + + + + + + + + Per-event-type listeners registered via <xref href="SignalWire.Relay.Call.On(System.String%2cSystem.Action%7bSignalWire.Relay.Event%7d)" data-throw-if-not-resolved="false"></xref>. + + +## Methods + +### AI(Dictionary\?) + +#### Signature + +```dotnet +public AIAction AI(Dictionary? extra = null) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Relay.AIAction` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 329. + +*** + +### AiHoldAsync() + +#### Signature + +```dotnet +public Task> AiHoldAsync() +``` + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 271. + +*** + +### AiMessageAsync(Dictionary\?) + +#### Signature + +```dotnet +public Task> AiMessageAsync(Dictionary? extra = null) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 268. + +*** + +### AiUnholdAsync() + +#### Signature + +```dotnet +public Task> AiUnholdAsync() +``` + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 274. + +*** + +### AmazonBedrockAsync(Dictionary\?) + +#### Signature + +```dotnet +public Task> AmazonBedrockAsync(Dictionary? extra = null) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 265. + +*** + +### AnswerAsync() + +#### Signature + +```dotnet +public Task> AnswerAsync() +``` + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 208. + +*** + +### BindDigitAsync(Dictionary\?) + +#### Signature + +```dotnet +public Task> BindDigitAsync(Dictionary? extra = null) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 247. + +*** + +### Call(Dictionary\, Client) + +#### Signature + +```dotnet +public Call(Dictionary params_, Client client) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 57. + +*** + +### ClearDigitBindingsAsync() + +#### Signature + +```dotnet +public Task> ClearDigitBindingsAsync() +``` + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 250. + +*** + +### Collect(Dictionary\?) + +#### Signature + +```dotnet +public CollectAction Collect(Dictionary? extra = null) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Relay.CollectAction` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 302. + +*** + +### ConnectAsync(Dictionary\?) + +#### Signature + +```dotnet +public Task> ConnectAsync(Dictionary? extra = null) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 217. + +*** + +### DenoiseAsync() + +#### Signature + +```dotnet +public Task> DenoiseAsync() +``` + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 229. + +*** + +### DenoiseStopAsync() + +#### Signature + +```dotnet +public Task> DenoiseStopAsync() +``` + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 232. + +*** + +### Detect(Dictionary\?) + +#### Signature + +```dotnet +public DetectAction Detect(Dictionary? extra = null) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Relay.DetectAction` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 308. + +*** + +### DetectAnsweringMachine(double?, double?, double?, int?, bool?, bool?, double?, Action\?) + +Detect human vs answering machine (AMD). Typed convenience over <xref href="SignalWire.Relay.Call.Detect(System.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d)" data-throw-if-not-resolved="false"></xref>. + +#### Signature + +```dotnet +public DetectAction DetectAnsweringMachine(double? initialTimeout = null, double? endSilenceTimeout = null, double? machineVoiceThreshold = null, int? machineWordsThreshold = null, bool? detectInterruptions = null, bool? detectMessageEnd = null, double? timeout = null, Action? onCompleted = null) +``` + +#### Parameters + + + + + + + + + + + + + + + + + +#### Returns + +`SignalWire.Relay.DetectAction` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 454. + +*** + +### DetectDigit(string?, double?, Action\?) + +Detect DTMF digits. Typed convenience over <xref href="SignalWire.Relay.Call.Detect(System.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d)" data-throw-if-not-resolved="false"></xref>. + +#### Signature + +```dotnet +public DetectAction DetectDigit(string? digits = null, double? timeout = null, Action? onCompleted = null) +``` + +#### Parameters + + + + + + + +#### Returns + +`SignalWire.Relay.DetectAction` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 434. + +*** + +### DetectFax(string?, double?, Action\?) + +Detect a fax tone (CED/CNG). Typed convenience over <xref href="SignalWire.Relay.Call.Detect(System.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d)" data-throw-if-not-resolved="false"></xref>. + +#### Signature + +```dotnet +public DetectAction DetectFax(string? tone = null, double? timeout = null, Action? onCompleted = null) +``` + +#### Parameters + + + + + + + +#### Returns + +`SignalWire.Relay.DetectAction` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 484. + +*** + +### DisconnectAsync() + +#### Signature + +```dotnet +public Task> DisconnectAsync() +``` + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 220. + +*** + +### DispatchEvent(Event) + +Central event router invoked by the Client whenever a server event +targets this call. + +#### Signature + +```dotnet +public void DispatchEvent(Event evt) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 84. + +*** + +### EchoAsync() + +#### Signature + +```dotnet +public Task> EchoAsync() +``` + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 244. + +*** + +### HangupAsync(string) + +#### Signature + +```dotnet +public Task> HangupAsync(string reason = "hangup") +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 211. + +*** + +### HoldAsync() + +#### Signature + +```dotnet +public Task> HoldAsync() +``` + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 223. + +*** + +### JoinConferenceAsync(Dictionary\?) + +#### Signature + +```dotnet +public Task> JoinConferenceAsync(Dictionary? extra = null) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 238. + +*** + +### JoinRoomAsync(Dictionary\?) + +#### Signature + +```dotnet +public Task> JoinRoomAsync(Dictionary? extra = null) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 259. + +*** + +### LeaveConferenceAsync() + +#### Signature + +```dotnet +public Task> LeaveConferenceAsync() +``` + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 241. + +*** + +### LeaveRoomAsync() + +#### Signature + +```dotnet +public Task> LeaveRoomAsync() +``` + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 262. + +*** + +### LiveTranscribeAsync(Dictionary\?) + +#### Signature + +```dotnet +public Task> LiveTranscribeAsync(Dictionary? extra = null) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 253. + +*** + +### LiveTranslateAsync(Dictionary\?) + +#### Signature + +```dotnet +public Task> LiveTranslateAsync(Dictionary? extra = null) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 256. + +*** + +### On + +Register a generic event listener on this call. + +#### Signature + + + + ```dotnet + public Call On(Action callback) + ``` + + + + ```dotnet + public Call On(string eventType, Action callback) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`SignalWire.Relay.Call` + +#### Returns (Overload 2) + +`SignalWire.Relay.Call` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 173. + +*** + +### PassAsync() + +#### Signature + +```dotnet +public Task> PassAsync() +``` + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 214. + +*** + +### Pay(Dictionary\?) + +#### Signature + +```dotnet +public PayAction Pay(Dictionary? extra = null) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Relay.PayAction` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 323. + +*** + +### Play(Dictionary\?) + +#### Signature + +```dotnet +public PlayAction Play(Dictionary? extra = null) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Relay.PlayAction` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 296. + +*** + +### PlayAndCollect(Dictionary\?) + +#### Signature + +```dotnet +public CollectAction PlayAndCollect(Dictionary? extra = null) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Relay.CollectAction` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 305. + +*** + +### PlayAudio(string, double?, Action\?) + +Play an audio file from a URL. Typed convenience over <xref href="SignalWire.Relay.Call.Play(System.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d)" data-throw-if-not-resolved="false"></xref>. + +#### Signature + +```dotnet +public PlayAction PlayAudio(string url, double? volume = null, Action? onCompleted = null) +``` + +#### Parameters + + + + + + + +#### Returns + +`SignalWire.Relay.PlayAction` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 366. + +*** + +### PlayRingtone(string, double?, double?, Action\?) + +Play a named ringtone by country code. Typed convenience over <xref href="SignalWire.Relay.Call.Play(System.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d)" data-throw-if-not-resolved="false"></xref>. + +#### Signature + +```dotnet +public PlayAction PlayRingtone(string name, double? duration = null, double? volume = null, Action? onCompleted = null) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`SignalWire.Relay.PlayAction` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 406. + +*** + +### PlaySilence(double, Action\?) + +Play silence for <code class="paramref">duration</code> seconds. Typed convenience over <xref href="SignalWire.Relay.Call.Play(System.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d)" data-throw-if-not-resolved="false"></xref>. + +#### Signature + +```dotnet +public PlayAction PlaySilence(double duration, Action? onCompleted = null) +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire.Relay.PlayAction` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 387. + +*** + +### PlayTts(string, string?, string?, string?, double?, Action\?) + +Play text-to-speech. Typed convenience over <xref href="SignalWire.Relay.Call.Play(System.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d)" data-throw-if-not-resolved="false"></xref>. + +#### Signature + +```dotnet +public PlayAction PlayTts(string text, string? language = null, string? gender = null, string? voice = null, double? volume = null, Action? onCompleted = null) +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`SignalWire.Relay.PlayAction` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 342. + +*** + +### PromptAudio(string, Dictionary\, double?, Action\?) + +Play an audio file then collect input. Typed media over <xref href="SignalWire.Relay.Call.PlayAndCollect(System.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d)" data-throw-if-not-resolved="false"></xref>. + +#### Signature + +```dotnet +public CollectAction PromptAudio(string url, Dictionary collect, double? volume = null, Action? onCompleted = null) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`SignalWire.Relay.CollectAction` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 537. + +*** + +### PromptTts(string, Dictionary\, string?, string?, string?, double?, Action\?) + +Play TTS then collect input. Typed media over <xref href="SignalWire.Relay.Call.PlayAndCollect(System.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d)" data-throw-if-not-resolved="false"></xref>. + +#### Signature + +```dotnet +public CollectAction PromptTts(string text, Dictionary collect, string? language = null, string? gender = null, string? voice = null, double? volume = null, Action? onCompleted = null) +``` + +#### Parameters + + + + + + + + + + + + + + + +#### Returns + +`SignalWire.Relay.CollectAction` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 511. + +*** + +### QueueEnterAsync(Dictionary\?) + +#### Signature + +```dotnet +public Task> QueueEnterAsync(Dictionary? extra = null) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 280. + +*** + +### QueueLeaveAsync() + +#### Signature + +```dotnet +public Task> QueueLeaveAsync() +``` + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 283. + +*** + +### ReceiveFax(Dictionary\?) + +#### Signature + +```dotnet +public FaxAction ReceiveFax(Dictionary? extra = null) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Relay.FaxAction` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 314. + +*** + +### Record(Dictionary\?) + +#### Signature + +```dotnet +public RecordAction Record(Dictionary? extra = null) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Relay.RecordAction` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 299. + +*** + +### ReferAsync(Dictionary\?) + +#### Signature + +```dotnet +public Task> ReferAsync(Dictionary? extra = null) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 286. + +*** + +### ResolveAllActions() + +Mark every outstanding action as completed. +Called when the call enters a terminal state (ended). + +#### Signature + +```dotnet +public void ResolveAllActions() +``` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 195. + +*** + +### SendDigitsAsync(Dictionary\?) + +#### Signature + +```dotnet +public Task> SendDigitsAsync(Dictionary? extra = null) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 289. + +*** + +### SendFax(Dictionary\?) + +#### Signature + +```dotnet +public FaxAction SendFax(Dictionary? extra = null) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Relay.FaxAction` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 311. + +*** + +### Stream(Dictionary\?) + +#### Signature + +```dotnet +public StreamAction Stream(Dictionary? extra = null) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Relay.StreamAction` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 320. + +*** + +### Tap(Dictionary\?) + +#### Signature + +```dotnet +public TapAction Tap(Dictionary? extra = null) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Relay.TapAction` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 317. + +*** + +### Transcribe(Dictionary\?) + +#### Signature + +```dotnet +public TranscribeAction Transcribe(Dictionary? extra = null) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Relay.TranscribeAction` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 326. + +*** + +### TransferAsync(Dictionary\?) + +#### Signature + +```dotnet +public Task> TransferAsync(Dictionary? extra = null) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 235. + +*** + +### UnholdAsync() + +#### Signature + +```dotnet +public Task> UnholdAsync() +``` + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 226. + +*** + +### UserEventAsync(Dictionary\?) + +#### Signature + +```dotnet +public Task> UserEventAsync(Dictionary? extra = null) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 277. + +*** + +### WaitForAnsweredAsync(double?) + +Wait until the call is answered (immediate if already answered or past it). + +#### Signature + +```dotnet +public Task WaitForAnsweredAsync(double? timeout = null) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 645. + +*** + +### WaitForEndingAsync(double?) + +Wait until the call is ending (immediate if already ending or past it). + +#### Signature + +```dotnet +public Task WaitForEndingAsync(double? timeout = null) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 653. + +*** + +### WaitForRingingAsync(double?) + +Wait until the call is ringing (immediate if already ringing or past it). + +#### Signature + +```dotnet +public Task WaitForRingingAsync(double? timeout = null) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 649. + +## Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 11. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.relay/client/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.relay/client/index.mdx new file mode 100644 index 0000000000..45057af2c1 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.relay/client/index.mdx @@ -0,0 +1,650 @@ +--- +slug: "/reference/dotnet/signal-wire.relay/client" +title: "Client" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Relay.Client" + parent: "SignalWire.Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs" + visibility: "public" +--- +# `Client` + +RELAY Client -- manages the WebSocket connection to SignalWire, sends +JSON-RPC 2.0 requests, and dispatches inbound events to the correct +Call or Message objects. + +Uses async/await with <xref href="System.Threading.Tasks.TaskCompletionSource" data-throw-if-not-resolved="false"></xref> for the +native C# async pattern instead of polling loops. + +## Signature + +```dotnet +public class Client : IAsyncDisposable +``` + +## Inheritance + +**Implements:** `System.IAsyncDisposable` + +## Properties + + + + + + + callId => Call. + + + + + + + + + + Messages received from the transport layer. Test code can enqueue here. + + + + messageId => Message. + + + + + + + + Inbound message handler. Mirrors Python's <code>@client.on\_message</code>: fires with a fully-formed <xref href="SignalWire.Relay.Message" data-throw-if-not-resolved="false"></xref> for every <code>messaging.receive</code> event. + + + + JSON-RPC id => pending request TCS. + + + + tag => pending dial TCS. + + + + + + + + + + + + +## Methods + +### AuthenticateAsync(CancellationToken) + +Send the signalwire.connect RPC to authenticate. + +#### Signature + +```dotnet +public Task AuthenticateAsync(CancellationToken cancellationToken = default) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task` + +#### Source + +[`src/SignalWire/Relay/Client.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs) + +Line 173. + +*** + +### BuildWebSocketUri() + +Build the full WebSocket URL: <xref href="SignalWire.Relay.Client.Scheme" data-throw-if-not-resolved="false"></xref>://<xref href="SignalWire.Relay.Client.Host" data-throw-if-not-resolved="false"></xref>/api/relay/ws. + +#### Signature + +```dotnet +public Uri BuildWebSocketUri() +``` + +#### Returns + +`System.Uri` + +#### Source + +[`src/SignalWire/Relay/Client.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs) + +Line 121. + +*** + +### Client(Dictionary\?) + +#### Signature + +```dotnet +public Client(Dictionary? options = null) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Relay/Client.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs) + +Line 90. + +*** + +### ConnectAsync(CancellationToken) + +Establish the WebSocket connection and authenticate. Opens a real +WSS connection to the configured host, runs the JSON-RPC <code>signalwire.connect</code> handshake, and starts the reader loop +that pumps inbound frames into <xref href="SignalWire.Relay.Client.HandleMessage(System.String)" data-throw-if-not-resolved="false"></xref>. + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual Task ConnectAsync(CancellationToken cancellationToken = default) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task` + +#### Source + +[`src/SignalWire/Relay/Client.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs) + +Line 137. + +*** + +### DialAsync(Dictionary\, CancellationToken) + +Originate an outbound call, awaiting until the dial resolves. +Honours <code>params\_\["tag"]</code> when provided; otherwise a UUID is +generated. Honours <code>params\_\["dial\_timeout"]</code> (seconds) for the +resolve-or-throw deadline. + +#### Signature + +```dotnet +public Task DialAsync(Dictionary params_, CancellationToken cancellationToken = default) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task` + +#### Source + +[`src/SignalWire/Relay/Client.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs) + +Line 769. + +*** + +### Disconnect() + +Gracefully close the connection. + +#### Signature + +```dotnet +public void Disconnect() +``` + +#### Source + +[`src/SignalWire/Relay/Client.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs) + +Line 229. + +*** + +### DisposeAsync() + +Asynchronously release the connection and all owned IDisposables — +the WebSocket (<code>\_ws</code>), the lifetime token source (<code>\_cts</code>), +and the send lock (<code>\_sendLock</code>). This is the .NET analogue of +Python's <code>**aexit**</code>: <code>await using var client = ...;</code> closes +the socket and frees the handles deterministically instead of leaking +them until finalization. Idempotent. + +<p>Closes gracefully when the socket is still open (best-effort +close handshake), cancels the reader loop, waits briefly for it to +unwind, then disposes every owned resource.</p> + +#### Signature + +```dotnet +public ValueTask DisposeAsync() +``` + +#### Returns + +`System.Threading.Tasks.ValueTask` + +#### Source + +[`src/SignalWire/Relay/Client.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs) + +Line 276. + +*** + +### ExecuteAsync(string, Dictionary\?, CancellationToken) + +Send a JSON-RPC request and await the matching response. +Returns the "result" portion of the response. + +#### Signature + +```dotnet +public Task> ExecuteAsync(string method, Dictionary? params_ = null, CancellationToken cancellationToken = default) +``` + +#### Parameters + + + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/Relay/Client.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs) + +Line 475. + +*** + +### GetCall(string) + +#### Signature + +```dotnet +public Call? GetCall(string callId) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Relay.Call` + +#### Source + +[`src/SignalWire/Relay/Client.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs) + +Line 910. + +*** + +### HandleEvent(Dictionary\) + +Route a signalwire.event payload to the appropriate handler. + +#### Signature + +```dotnet +public void HandleEvent(Dictionary outerParams) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Relay/Client.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs) + +Line 644. + +*** + +### HandleMessage(string) + +Parse a raw JSON string from the server and route it. + +#### Signature + +```dotnet +public void HandleMessage(string raw) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Relay/Client.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs) + +Line 582. + +*** + +### OnCall(Func\) + +Register a handler for inbound calls. + +#### Signature + +```dotnet +public Client OnCall(Func callback) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Relay.Client` + +#### Source + +[`src/SignalWire/Relay/Client.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs) + +Line 895. + +*** + +### OnMessage(Func\) + +Register a handler for inbound messages. + +#### Signature + +```dotnet +public Client OnMessage(Func callback) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Relay.Client` + +#### Source + +[`src/SignalWire/Relay/Client.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs) + +Line 902. + +*** + +### ReadLoopAsync(CancellationToken) + +Reader loop that pulls UTF-8 text frames off the socket and routes +each completed message into <xref href="SignalWire.Relay.Client.HandleMessage(System.String)" data-throw-if-not-resolved="false"></xref>. Handles +fragmented frames by accumulating them until <xref href="System.Net.WebSockets.ValueWebSocketReceiveResult.EndOfMessage" data-throw-if-not-resolved="false"></xref>. + +#### Signature + +```dotnet +public Task ReadLoopAsync(CancellationToken cancellation) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task` + +#### Source + +[`src/SignalWire/Relay/Client.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs) + +Line 401. + +*** + +### ReadOnce() + +Read one queued message synchronously (test helper for harness use). + +#### Signature + +```dotnet +public void ReadOnce() +``` + +#### Source + +[`src/SignalWire/Relay/Client.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs) + +Line 459. + +*** + +### ReceiveAsync(IEnumerable\, CancellationToken) + +Subscribe to one or more inbound contexts. + +#### Signature + +```dotnet +public Task ReceiveAsync(IEnumerable contexts, CancellationToken cancellationToken = default) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task` + +#### Source + +[`src/SignalWire/Relay/Client.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs) + +Line 859. + +*** + +### ReconnectAsync(CancellationToken) + +Reconnect with exponential back-off (1s to 30s cap). + +#### Signature + +```dotnet +public Task ReconnectAsync(CancellationToken cancellationToken = default) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task` + +#### Source + +[`src/SignalWire/Relay/Client.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs) + +Line 333. + +*** + +### RunAsync(CancellationToken) + +Main event loop -- drains the inbound queue and processes messages +until disconnect. Used by the test path that pushes JSON strings +into <xref href="SignalWire.Relay.Client.InboundQueue" data-throw-if-not-resolved="false"></xref>; production reads come from the +WebSocket reader started in <xref href="SignalWire.Relay.Client.ConnectAsync(System.Threading.CancellationToken)" data-throw-if-not-resolved="false"></xref>. + +#### Signature + +```dotnet +public Task RunAsync(CancellationToken cancellationToken = default) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task` + +#### Source + +[`src/SignalWire/Relay/Client.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs) + +Line 358. + +*** + +### Send(Dictionary\) + +Encode and send a JSON message. Real production path writes to the +WebSocket; tests override this to capture payloads in memory. + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual void Send(Dictionary msg) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Relay/Client.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs) + +Line 528. + +*** + +### SendAck(string) + +Send an acknowledgement (empty result) for a server-initiated request. + +#### Signature + +```dotnet +public void SendAck(string id) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Relay/Client.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs) + +Line 567. + +*** + +### SendMessageAsync(Dictionary\, CancellationToken) + +Send an outbound message. + +#### Signature + +```dotnet +public Task SendMessageAsync(Dictionary params_, CancellationToken cancellationToken = default) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task` + +#### Source + +[`src/SignalWire/Relay/Client.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs) + +Line 828. + +*** + +### UnreceiveAsync(IEnumerable\, CancellationToken) + +Unsubscribe from one or more contexts. + +#### Signature + +```dotnet +public Task UnreceiveAsync(IEnumerable contexts, CancellationToken cancellationToken = default) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task` + +#### Source + +[`src/SignalWire/Relay/Client.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs) + +Line 880. + +## Source + +[`src/SignalWire/Relay/Client.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs) + +Line 16. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.relay/collect-action/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.relay/collect-action/index.mdx new file mode 100644 index 0000000000..ad7de483ef --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.relay/collect-action/index.mdx @@ -0,0 +1,193 @@ +--- +slug: "/reference/dotnet/signal-wire.relay/collect-action" +title: "CollectAction" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Relay.CollectAction" + parent: "SignalWire.Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs" + visibility: "public" +--- +# `CollectAction` + +Handle for calling.collect (and play\_and\_collect) operations. + +Note: play\_and\_collect emits intermediate calling.call.play events +that must be silently ignored so they do not pollute the collect +action's state. + +## Signature + +```dotnet +public class CollectAction : Action +``` + +## Inheritance + +**Extends:** [SignalWire.Relay.Action](/docs/sdk-reference/reference/dotnet/signal-wire.relay/action) + +## Properties + + + Return the structured collect result from the payload. + + +## Methods + +### AcceptsTerminalEvent(string) + +Block <code>calling.call.play</code> events from triggering the standard +terminal-state resolution path: only <code>calling.call.collect</code> +may resolve a CollectAction. + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override bool AcceptsTerminalEvent(string eventType) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 315. + +*** + +### CollectAction(string, string, string, object, bool) + +#### Signature + +```dotnet +public CollectAction(string controlId, string callId, string nodeId, object client, bool isPlayAndCollect = false) +``` + +#### Parameters + + + + + + + + + + + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 272. + +*** + +### GetStopMethod() + +Return the RELAY RPC method that stops this action. +Subclasses MUST override to return the correct method name. + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override string GetStopMethod() +``` + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 279. + +*** + +### HandleEvent(Event) + +Override: silently ignore intermediate play events that arrive +during a play\_and\_collect operation. + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override void HandleEvent(Event evt) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 304. + +*** + +### StartInputTimers() + +Notify the server to start input timers now rather than waiting +for the initial-timeout to expire naturally. + +#### Signature + +```dotnet +public void StartInputTimers() +``` + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 286. + +*** + +### Volume(double) + +play\_and\_collect-only: change playback volume mid-prompt. + +#### Signature + +```dotnet +public void Volume(double db) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 292. + +## Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 268. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.relay/constants/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.relay/constants/index.mdx new file mode 100644 index 0000000000..4aa5f3d935 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.relay/constants/index.mdx @@ -0,0 +1,74 @@ +--- +slug: "/reference/dotnet/signal-wire.relay/constants" +title: "Constants" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Relay.Constants" + parent: "SignalWire.Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Constants.cs" + visibility: "public" +--- +# `Constants` + +Protocol constants for the RELAY WebSocket interface. +Defines protocol version, call/dial/message states, terminal states, +and per-event-type action terminal states. + +**Modifiers:** `static` + +## Signature + +```dotnet +public static class Constants +``` + +## Properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## Source + +[`src/SignalWire/Relay/Constants.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Constants.cs) + +Line 9. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.relay/detect-action/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.relay/detect-action/index.mdx new file mode 100644 index 0000000000..d3430bb6df --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.relay/detect-action/index.mdx @@ -0,0 +1,116 @@ +--- +slug: "/reference/dotnet/signal-wire.relay/detect-action" +title: "DetectAction" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Relay.DetectAction" + parent: "SignalWire.Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs" + visibility: "public" +--- +# `DetectAction` + +Handle for calling.detect operations. + +## Signature + +```dotnet +public class DetectAction : Action +``` + +## Inheritance + +**Extends:** [SignalWire.Relay.Action](/docs/sdk-reference/reference/dotnet/signal-wire.relay/action) + +## Properties + + + +## Methods + +### DetectAction(string, string, string, object) + +#### Signature + +```dotnet +public DetectAction(string controlId, string callId, string nodeId, object client) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 322. + +*** + +### GetStopMethod() + +Return the RELAY RPC method that stops this action. +Subclasses MUST override to return the correct method name. + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override string GetStopMethod() +``` + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 325. + +*** + +### HandleEvent(Event) + +Per RELAY\_IMPLEMENTATION\_GUIDE.md "detect gotcha": detect events +continuously stream a <code>detect</code> object — resolve on the FIRST +meaningful detect payload (or on terminal state if it arrives first +with no detect data). + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override void HandleEvent(Event evt) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 337. + +## Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 320. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.relay/device/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.relay/device/index.mdx new file mode 100644 index 0000000000..d3915f46a5 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.relay/device/index.mdx @@ -0,0 +1,150 @@ +--- +slug: "/reference/dotnet/signal-wire.relay/device" +title: "Device" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Relay.Device" + parent: "SignalWire.Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Device.cs" + visibility: "public" +--- +# `Device` + +A typed RELAY device object — the <code>\{type, params\}</code> shape that recurs +across <code>connect</code> / <code>refer</code> / <code>dial</code> / <code>tap</code> and the +ringback list. + +**Remarks:** <p> +Grounded in the RELAY wire schema <code>relay-protocol/calling.connect.params.json</code>, where each device is an +object with a required <code>type</code> (string) and a free-form <code>params</code> +payload. This class types the <em>shape</em> only: <xref href="SignalWire.Relay.Device.Type" data-throw-if-not-resolved="false"></xref> stays +a <code>string</code> because the discriminant set (<code>phone</code>, <code>sip</code>, <code>webrtc</code>, …) is <strong>not</strong> enumerated in any schema, so an +enum would risk rejecting a valid value. + +</p> +<p> +The reference and the rest of this port pass devices as raw +<code>Dictionary<string, object?></code> (e.g. <xref href="SignalWire.Relay.Call.Device" data-throw-if-not-resolved="false"></xref>); +this is an additive typed convenience. <xref href="SignalWire.Relay.Device.ToDict" data-throw-if-not-resolved="false"></xref> yields the +identical wire dictionary, so a <xref href="SignalWire.Relay.Device" data-throw-if-not-resolved="false"></xref> can be used anywhere a +hand-built device dict is accepted with no change in emitted bytes. +</p> +<example> +<pre><code class="lang-csharp">var d = new Device("phone", new Dictionary<string, object?> +{ + ["to_number"] = "+15551112222", + ["from_number"] = "+15553334444", +}); +// d.ToDict() is byte-identical to the hand-written +// { ["type"] = "phone", ["params"] = { ... } }</code></pre> +</example> + +**Modifiers:** `sealed` + +## Signature + +```dotnet +public sealed class Device +``` + +## Properties + + + The device-type-specific parameters (e.g. <code>to\_number</code> / <code>from\_number</code> for a phone device). Free-form by the wire schema. + + + + The device discriminant (e.g. <code>"phone"</code>, <code>"sip"</code>). Kept a string: the valid set is not schema-enumerated. + + +## Methods + +### Device(string, Dictionary\?) + +Build a device from its discriminant and (optional) params payload. + +#### Signature + +```dotnet +public Device(string type, Dictionary? params_ = null) +``` + +#### Parameters + + + The device type discriminant (required). + + + + The device params; an empty map when omitted. + + +#### Source + +[`src/SignalWire/Relay/Device.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Device.cs) + +Line 55. + +*** + +### FromDict(Dictionary\?) + +Build a <xref href="SignalWire.Relay.Device" data-throw-if-not-resolved="false"></xref> from a raw <code>\{type, params\}</code> dictionary +(e.g. <xref href="SignalWire.Relay.Call.Device" data-throw-if-not-resolved="false"></xref> or a wire frame). Returns <code>null</code> +when the dict has no <code>type</code> string — the discriminant is required. + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static Device? FromDict(Dictionary? dict) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Relay.Device` + +#### Source + +[`src/SignalWire/Relay/Device.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Device.cs) + +Line 76. + +*** + +### ToDict() + +Project to the raw <code>\{type, params\}</code> wire dictionary — byte-identical +to the hand-written device dict the RELAY methods already accept. + +#### Signature + +```dotnet +public Dictionary ToDict() +``` + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/Relay/Device.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Device.cs) + +Line 65. + +## Source + +[`src/SignalWire/Relay/Device.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Device.cs) + +Line 36. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.relay/dial-state-extensions/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.relay/dial-state-extensions/index.mdx new file mode 100644 index 0000000000..d3845375c0 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.relay/dial-state-extensions/index.mdx @@ -0,0 +1,120 @@ +--- +slug: "/reference/dotnet/signal-wire.relay/dial-state-extensions" +title: "DialStateExtensions" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Relay.DialStateExtensions" + parent: "SignalWire.Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/DialState.cs" + visibility: "public" +--- +# `DialStateExtensions` + +Wire-string mapping, parsing, and terminal-outcome predicate for <xref href="SignalWire.Relay.DialState" data-throw-if-not-resolved="false"></xref>. + +**Modifiers:** `static` + +## Signature + +```dotnet +public static class DialStateExtensions +``` + +## Methods + +### IsTerminal(DialState) + +True when this dial outcome is terminal (the dial has resolved): <xref href="SignalWire.Relay.DialState.Answered" data-throw-if-not-resolved="false"></xref> or <xref href="SignalWire.Relay.DialState.Failed" data-throw-if-not-resolved="false"></xref>. <xref href="SignalWire.Relay.DialState.Dialing" data-throw-if-not-resolved="false"></xref> is still in progress. + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static bool IsTerminal(this DialState state) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Relay/DialState.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/DialState.cs) + +Line 65. + +*** + +### ToWireName(DialState) + +The canonical wire string for this dial state (e.g. "answered"). + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static string ToWireName(this DialState state) +``` + +#### Parameters + + + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/Relay/DialState.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/DialState.cs) + +Line 55. + +*** + +### TryParse(string?, out DialState) + +Parse a wire string into a <xref href="SignalWire.Relay.DialState" data-throw-if-not-resolved="false"></xref>. Returns <code>false</code> (and <code>default</code>) for an unrecognised value so callers +can fall back to the raw string rather than crashing on a new +server-emitted state. + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static bool TryParse(string? wire, out DialState state) +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Relay/DialState.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/DialState.cs) + +Line 74. + +## Source + +[`src/SignalWire/Relay/DialState.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/DialState.cs) + +Line 42. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.relay/event/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.relay/event/index.mdx new file mode 100644 index 0000000000..a29edb8d31 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.relay/event/index.mdx @@ -0,0 +1,126 @@ +--- +slug: "/reference/dotnet/signal-wire.relay/event" +title: "Event" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Relay.Event" + parent: "SignalWire.Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Event.cs" + visibility: "public" +--- +# `Event` + +Represents a single RELAY event received from the server. +Carries the event type, a timestamp, and the params dictionary +from which call\_id, node\_id, control\_id, tag, and state are extracted. + +**Modifiers:** `sealed` + +## Signature + +```dotnet +public sealed class Event +``` + +## Properties + + + + + + + + + + + + + + + + + +## Methods + +### Event(string, Dictionary\, double) + +#### Signature + +```dotnet +public Event(string eventType, Dictionary params_, double timestamp = 0) +``` + +#### Parameters + + + + + + + +#### Source + +[`src/SignalWire/Relay/Event.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Event.cs) + +Line 13. + +*** + +### Parse(string, Dictionary\) + +Factory: parse an event from its type and params. + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static Event Parse(string eventType, Dictionary params_) +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire.Relay.Event` + +#### Source + +[`src/SignalWire/Relay/Event.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Event.cs) + +Line 42. + +*** + +### ToDict() + +#### Signature + +```dotnet +public Dictionary ToDict() +``` + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/Relay/Event.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Event.cs) + +Line 34. + +## Source + +[`src/SignalWire/Relay/Event.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Event.cs) + +Line 7. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.relay/fax-action/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.relay/fax-action/index.mdx new file mode 100644 index 0000000000..12d9678622 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.relay/fax-action/index.mdx @@ -0,0 +1,91 @@ +--- +slug: "/reference/dotnet/signal-wire.relay/fax-action" +title: "FaxAction" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Relay.FaxAction" + parent: "SignalWire.Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs" + visibility: "public" +--- +# `FaxAction` + +Handle for calling.fax operations (send or receive). + +## Signature + +```dotnet +public class FaxAction : Action +``` + +## Inheritance + +**Extends:** [SignalWire.Relay.Action](/docs/sdk-reference/reference/dotnet/signal-wire.relay/action) + +## Properties + + + +## Methods + +### FaxAction(string, string, string, object, string) + +#### Signature + +```dotnet +public FaxAction(string controlId, string callId, string nodeId, object client, string faxType = "send") +``` + +#### Parameters + + + + + + + + + + + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 353. + +*** + +### GetStopMethod() + +Return the RELAY RPC method that stops this action. +Subclasses MUST override to return the correct method name. + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override string GetStopMethod() +``` + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 359. + +## Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 349. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.relay/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.relay/index.mdx new file mode 100644 index 0000000000..49dce24279 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.relay/index.mdx @@ -0,0 +1,274 @@ +--- +slug: "/reference/dotnet/signal-wire.relay" +title: "SignalWire.Relay" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "module" + language: "dotnet" + qualified_name: "SignalWire.Relay" +--- +# `SignalWire.Relay` + +## Classes + + + + Base class for all RELAY call actions (play, record, collect, etc.). An Action is the client-side handle returned when you start an asynchronous operation on a call. It accumulates events, tracks state, and resolves once the operation reaches a terminal state. Uses <xref href="System.Threading.Tasks.TaskCompletionSource" data-throw-if-not-resolved="false"></xref> for native async/await support. + + + + Handle for calling.ai operations. + + + + Represents a RELAY voice call. Holds call-level state, dispatches server events to registered listeners and to in-flight Action objects, and exposes every calling.\* RPC method as a first-class C# method. + + + + Wire-string mapping, parsing, and terminal-state predicate for <xref href="SignalWire.Relay.CallState" data-throw-if-not-resolved="false"></xref>. + + + + RELAY Client -- manages the WebSocket connection to SignalWire, sends JSON-RPC 2.0 requests, and dispatches inbound events to the correct Call or Message objects. Uses async/await with <xref href="System.Threading.Tasks.TaskCompletionSource" data-throw-if-not-resolved="false"></xref> for the native C# async pattern instead of polling loops. + + + + Handle for calling.collect (and play\_and\_collect) operations. Note: play\_and\_collect emits intermediate calling.call.play events that must be silently ignored so they do not pollute the collect action's state. + + + + Protocol constants for the RELAY WebSocket interface. Defines protocol version, call/dial/message states, terminal states, and per-event-type action terminal states. + + + + Handle for calling.detect operations. + + + + A typed RELAY device object — the <code>\{type, params\}</code> shape that recurs across <code>connect</code> / <code>refer</code> / <code>dial</code> / <code>tap</code> and the ringback list. + + + + Wire-string mapping, parsing, and terminal-outcome predicate for <xref href="SignalWire.Relay.DialState" data-throw-if-not-resolved="false"></xref>. + + + + Represents a single RELAY event received from the server. Carries the event type, a timestamp, and the params dictionary from which call\_id, node\_id, control\_id, tag, and state are extracted. + + + + Handle for calling.fax operations (send or receive). + + + + Represents a RELAY messaging message (SMS / MMS). A Message is created when you send or receive a message through the RELAY messaging namespace. It accumulates state-change events and resolves once the message reaches a terminal state (delivered, undelivered, or failed). Uses <xref href="System.Threading.Tasks.TaskCompletionSource" data-throw-if-not-resolved="false"></xref> for native async/await support. + + + + Wire-string mapping, parsing, and terminal-state predicate for <xref href="SignalWire.Relay.MessageState" data-throw-if-not-resolved="false"></xref>. + + + + Handle for calling.pay operations. + + + + Handle for calling.play operations. + + + + Handle for calling.record operations. + + + + Handle for calling.stream operations. + + + + Handle for calling.tap operations. + + + + Handle for calling.transcribe operations. + + + +## Enums + +### CallState + +Lifecycle state of a RELAY <xref href="SignalWire.Relay.Call" data-throw-if-not-resolved="false"></xref>, as a typed, compile-time +closed set. + +**Remarks:** <p> +The RELAY <code>calling.call.state</code> event carries one of a known set of +call-state strings (<code>created</code>, <code>ringing</code>, <code>answered</code>, <code>ending</code>, <code>ended</code>) — grounded in the Python reference's <code>signalwire/relay/constants.py</code> (<code>CALL\_STATES</code>) and mirrored by <xref href="SignalWire.Relay.Constants.CallStateCreated" data-throw-if-not-resolved="false"></xref> .. <xref href="SignalWire.Relay.Constants.CallStateEnded" data-throw-if-not-resolved="false"></xref>. +The reference exposes the state as a bare <code>str</code>; this enum is a typed +alias over those strings so callers get autocompletion and a compile error +on a typo, while <xref href="SignalWire.Relay.Call.State" data-throw-if-not-resolved="false"></xref> stays a string for parity and +forward-compatibility. + +</p> +<p> +This is the <em>call</em> vocabulary and is deliberately +<strong>distinct</strong> from <xref href="SignalWire.Relay.DialState" data-throw-if-not-resolved="false"></xref> (the dial-outcome +vocabulary) and <xref href="SignalWire.Relay.MessageState" data-throw-if-not-resolved="false"></xref> (the messaging-delivery +vocabulary). The three are never conflated — they index different wire +fields (<code>call_state</code> vs <code>dial_state</code> vs <code>message_state</code>). +</p> +<p> +Because the server emits these values and the set can grow, parse via +<xref href="SignalWire.Relay.CallStateExtensions.TryParse(System.String%2cSignalWire.Relay.CallState%40)" data-throw-if-not-resolved="false"></xref>, which +returns <code>false</code> for an unknown value rather than throwing — the string +arm on <xref href="SignalWire.Relay.Call.State" data-throw-if-not-resolved="false"></xref> preserves any future server value. +</p> + +#### Signature + +```dotnet +public enum CallState +``` + +#### Properties + + + answered + + + + created + + + + ended (terminal) + + + + ending + + + + ringing + + +#### Source + +[`src/SignalWire/Relay/CallState.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/CallState.cs) + +Line 32. + +*** + +### DialState + +Outcome state of a RELAY dial attempt (<code>calling.call.dial</code>), as a +typed, compile-time closed set. + +**Remarks:** <p> +The RELAY <code>calling.call.dial</code> event carries a <code>dial\_state</code> of <code>dialing</code>, <code>answered</code>, or <code>failed</code> (see <xref href="SignalWire.Relay.Client.HandleDialEvent(SignalWire.Relay.Event%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d)" data-throw-if-not-resolved="false"></xref> and <xref href="SignalWire.Relay.Constants.DialStateDialing" data-throw-if-not-resolved="false"></xref> .. <xref href="SignalWire.Relay.Constants.DialStateFailed" data-throw-if-not-resolved="false"></xref>). It is the dial-<em>outcome</em> +vocabulary and is deliberately <strong>distinct</strong> from <xref href="SignalWire.Relay.CallState" data-throw-if-not-resolved="false"></xref> (the per-call lifecycle) — a dial that resolves <code>answered</code> transitions the winning <xref href="SignalWire.Relay.Call" data-throw-if-not-resolved="false"></xref> to <xref href="SignalWire.Relay.CallState.Answered" data-throw-if-not-resolved="false"></xref>, but the two fields are separate on the +wire. + +</p> +<p> +Both <code>answered</code> and <code>failed</code> are terminal dial outcomes (the dial +is resolved); <code>dialing</code> is in-progress. Parse via +<xref href="SignalWire.Relay.DialStateExtensions.TryParse(System.String%2cSignalWire.Relay.DialState%40)" data-throw-if-not-resolved="false"></xref>, which +tolerates an unknown server value. +</p> + +#### Signature + +```dotnet +public enum DialState +``` + +#### Properties + + + answered (terminal — dial succeeded) + + + + dialing (in progress) + + + + failed (terminal — dial failed) + + +#### Source + +[`src/SignalWire/Relay/DialState.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/DialState.cs) + +Line 26. + +*** + +### MessageState + +Delivery state of a RELAY <xref href="SignalWire.Relay.Message" data-throw-if-not-resolved="false"></xref> (SMS / MMS), as a typed, +compile-time closed set. + +**Remarks:** <p> +The RELAY <code>messaging.state</code> event carries a <code>message\_state</code> of <code>queued</code>, <code>initiated</code>, <code>sent</code>, <code>delivered</code>, <code>undelivered</code>, or <code>failed</code> — grounded in the Python reference's <code>signalwire/relay/constants.py</code> (<code>MESSAGE\_STATE\_\*</code>) and the wire +schema <code>relay-protocol/messaging.state.event.json</code>; <code>received</code> is +the additional inbound state (<xref href="SignalWire.Relay.Constants.MessageStateReceived" data-throw-if-not-resolved="false"></xref>). +The reference exposes the state as a bare <code>str</code>; this enum is a typed +alias so callers get autocompletion and a compile-time check, while <xref href="SignalWire.Relay.Message.State" data-throw-if-not-resolved="false"></xref> stays a string for parity and forward-compat. + +</p> +<p> +This is the <em>messaging</em> vocabulary and is deliberately +<strong>distinct</strong> from <xref href="SignalWire.Relay.CallState" data-throw-if-not-resolved="false"></xref> and +<xref href="SignalWire.Relay.DialState" data-throw-if-not-resolved="false"></xref> (the voice vocabularies) — it indexes the +<code>message_state</code> wire field, never <code>call_state</code>/<code>dial_state</code>. +</p> +<p> +Parse via <xref href="SignalWire.Relay.MessageStateExtensions.TryParse(System.String%2cSignalWire.Relay.MessageState%40)" data-throw-if-not-resolved="false"></xref>, +which tolerates an unknown server value. +</p> + +#### Signature + +```dotnet +public enum MessageState +``` + +#### Properties + + + delivered (terminal) + + + + failed (terminal) + + + + initiated + + + + queued + + + + received (inbound) + + + + sent + + + + undelivered (terminal) + + +#### Source + +[`src/SignalWire/Relay/MessageState.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/MessageState.cs) + +Line 29. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.relay/message-state-extensions/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.relay/message-state-extensions/index.mdx new file mode 100644 index 0000000000..89269f1f37 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.relay/message-state-extensions/index.mdx @@ -0,0 +1,120 @@ +--- +slug: "/reference/dotnet/signal-wire.relay/message-state-extensions" +title: "MessageStateExtensions" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Relay.MessageStateExtensions" + parent: "SignalWire.Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/MessageState.cs" + visibility: "public" +--- +# `MessageStateExtensions` + +Wire-string mapping, parsing, and terminal-state predicate for <xref href="SignalWire.Relay.MessageState" data-throw-if-not-resolved="false"></xref>. + +**Modifiers:** `static` + +## Signature + +```dotnet +public static class MessageStateExtensions +``` + +## Methods + +### IsTerminal(MessageState) + +True when this state is terminal (delivery resolved). Mirrors <xref href="SignalWire.Relay.Constants.MessageTerminalStates" data-throw-if-not-resolved="false"></xref> — terminal = <code>delivered</code> / <code>undelivered</code> / <code>failed</code>. + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static bool IsTerminal(this MessageState state) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Relay/MessageState.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/MessageState.cs) + +Line 84. + +*** + +### ToWireName(MessageState) + +The canonical wire string for this message state (e.g. "delivered"). + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static string ToWireName(this MessageState state) +``` + +#### Parameters + + + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/Relay/MessageState.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/MessageState.cs) + +Line 74. + +*** + +### TryParse(string?, out MessageState) + +Parse a wire string into a <xref href="SignalWire.Relay.MessageState" data-throw-if-not-resolved="false"></xref>. Returns <code>false</code> (and <code>default</code>) for an unrecognised value so callers +can fall back to the raw string rather than crashing on a new +server-emitted state. + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static bool TryParse(string? wire, out MessageState state) +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Relay/MessageState.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/MessageState.cs) + +Line 93. + +## Source + +[`src/SignalWire/Relay/MessageState.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/MessageState.cs) + +Line 57. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.relay/message/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.relay/message/index.mdx new file mode 100644 index 0000000000..081c73545e --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.relay/message/index.mdx @@ -0,0 +1,256 @@ +--- +slug: "/reference/dotnet/signal-wire.relay/message" +title: "Message" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Relay.Message" + parent: "SignalWire.Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Message.cs" + visibility: "public" +--- +# `Message` + +Represents a RELAY messaging message (SMS / MMS). + +A Message is created when you send or receive a message through the +RELAY messaging namespace. It accumulates state-change events and +resolves once the message reaches a terminal state (delivered, +undelivered, or failed). + +Uses <xref href="System.Threading.Tasks.TaskCompletionSource" data-throw-if-not-resolved="false"></xref> for native async/await support. + +**Modifiers:** `sealed` + +## Signature + +```dotnet +public sealed class Message +``` + +## Properties + + + + + + + + + + + + + + + + + + + The current delivery state as the typed <xref href="SignalWire.Relay.MessageState" data-throw-if-not-resolved="false"></xref> enum, parsed from <xref href="SignalWire.Relay.Message.State" data-throw-if-not-resolved="false"></xref>. Returns <code>null</code> when <xref href="SignalWire.Relay.Message.State" data-throw-if-not-resolved="false"></xref> is unset or an unrecognised (e.g. newly-introduced server) value — read <xref href="SignalWire.Relay.Message.State" data-throw-if-not-resolved="false"></xref> for the raw string in that case. Typed convenience alongside the parity-bearing string <xref href="SignalWire.Relay.Message.State" data-throw-if-not-resolved="false"></xref>; agrees with it for known states. + + + + + + + + + + + + +## Methods + +### DispatchEvent(Event) + +Process an inbound event for this message. +Updates state/reason, fires registered event listeners, and +auto-resolves when a terminal state is reached. + +#### Signature + +```dotnet +public void DispatchEvent(Event evt) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Relay/Message.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Message.cs) + +Line 73. + +*** + +### Message(Dictionary\?) + +Build a Message from a params dictionary (as returned by the server). + +#### Signature + +```dotnet +public Message(Dictionary? params_ = null) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Relay/Message.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Message.cs) + +Line 47. + +*** + +### On + +Register a listener that fires on every state-change event. + +#### Signature + + + + ```dotnet + public Message On(Func callback) + ``` + + + + ```dotnet + public Message On(Action callback) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`SignalWire.Relay.Message` + +#### Returns (Overload 2) + +`SignalWire.Relay.Message` + +#### Source + +[`src/SignalWire/Relay/Message.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Message.cs) + +Line 132. + +*** + +### OnCompleted + +Register a callback to fire when the message reaches a terminal state. +If the message is already complete the callback fires immediately. + +#### Signature + + + + ```dotnet + public Message OnCompleted(Func callback) + ``` + + + + ```dotnet + public Message OnCompleted(Action callback) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`SignalWire.Relay.Message` + +#### Returns (Overload 2) + +`SignalWire.Relay.Message` + +#### Source + +[`src/SignalWire/Relay/Message.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Message.cs) + +Line 148. + +*** + +### Resolve(string?) + +Mark this message as completed. The optional result is stored and +the onCompleted callback fires exactly once. + +#### Signature + +```dotnet +public void Resolve(string? result = null) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Relay/Message.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Message.cs) + +Line 180. + +*** + +### WaitAsync(int) + +Await until the message completes or the timeout elapses. +Returns the resolved result, or null on timeout. + +#### Signature + +```dotnet +public Task WaitAsync(int timeoutSeconds = 30) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task` + +#### Source + +[`src/SignalWire/Relay/Message.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Message.cs) + +Line 113. + +## Source + +[`src/SignalWire/Relay/Message.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Message.cs) + +Line 12. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.relay/pay-action/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.relay/pay-action/index.mdx new file mode 100644 index 0000000000..c9d630c1d3 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.relay/pay-action/index.mdx @@ -0,0 +1,85 @@ +--- +slug: "/reference/dotnet/signal-wire.relay/pay-action" +title: "PayAction" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Relay.PayAction" + parent: "SignalWire.Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs" + visibility: "public" +--- +# `PayAction` + +Handle for calling.pay operations. + +## Signature + +```dotnet +public class PayAction : Action +``` + +## Inheritance + +**Extends:** [SignalWire.Relay.Action](/docs/sdk-reference/reference/dotnet/signal-wire.relay/action) + +## Methods + +### GetStopMethod() + +Return the RELAY RPC method that stops this action. +Subclasses MUST override to return the correct method name. + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override string GetStopMethod() +``` + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 387. + +*** + +### PayAction(string, string, string, object) + +#### Signature + +```dotnet +public PayAction(string controlId, string callId, string nodeId, object client) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 384. + +## Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 382. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.relay/play-action/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.relay/play-action/index.mdx new file mode 100644 index 0000000000..1ba04c8eb5 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.relay/play-action/index.mdx @@ -0,0 +1,139 @@ +--- +slug: "/reference/dotnet/signal-wire.relay/play-action" +title: "PlayAction" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Relay.PlayAction" + parent: "SignalWire.Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs" + visibility: "public" +--- +# `PlayAction` + +Handle for calling.play operations. + +## Signature + +```dotnet +public class PlayAction : Action +``` + +## Inheritance + +**Extends:** [SignalWire.Relay.Action](/docs/sdk-reference/reference/dotnet/signal-wire.relay/action) + +## Methods + +### GetStopMethod() + +Return the RELAY RPC method that stops this action. +Subclasses MUST override to return the correct method name. + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override string GetStopMethod() +``` + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 221. + +*** + +### Pause() + +#### Signature + +```dotnet +public void Pause() +``` + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 223. + +*** + +### PlayAction(string, string, string, object) + +#### Signature + +```dotnet +public PlayAction(string controlId, string callId, string nodeId, object client) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 218. + +*** + +### Resume() + +#### Signature + +```dotnet +public void Resume() +``` + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 225. + +*** + +### Volume(double) + +Adjust playback volume in dB. + +#### Signature + +```dotnet +public void Volume(double db) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 228. + +## Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 216. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.relay/record-action/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.relay/record-action/index.mdx new file mode 100644 index 0000000000..2977e8a94f --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.relay/record-action/index.mdx @@ -0,0 +1,129 @@ +--- +slug: "/reference/dotnet/signal-wire.relay/record-action" +title: "RecordAction" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Relay.RecordAction" + parent: "SignalWire.Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs" + visibility: "public" +--- +# `RecordAction` + +Handle for calling.record operations. + +## Signature + +```dotnet +public class RecordAction : Action +``` + +## Inheritance + +**Extends:** [SignalWire.Relay.Action](/docs/sdk-reference/reference/dotnet/signal-wire.relay/action) + +## Properties + + + + + + + +## Methods + +### GetStopMethod() + +Return the RELAY RPC method that stops this action. +Subclasses MUST override to return the correct method name. + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override string GetStopMethod() +``` + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 238. + +*** + +### Pause(string?) + +#### Signature + +```dotnet +public void Pause(string? behavior = null) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 240. + +*** + +### RecordAction(string, string, string, object) + +#### Signature + +```dotnet +public RecordAction(string controlId, string callId, string nodeId, object client) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 235. + +*** + +### Resume() + +#### Signature + +```dotnet +public void Resume() +``` + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 248. + +## Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 233. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.relay/stream-action/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.relay/stream-action/index.mdx new file mode 100644 index 0000000000..818f692129 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.relay/stream-action/index.mdx @@ -0,0 +1,85 @@ +--- +slug: "/reference/dotnet/signal-wire.relay/stream-action" +title: "StreamAction" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Relay.StreamAction" + parent: "SignalWire.Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs" + visibility: "public" +--- +# `StreamAction` + +Handle for calling.stream operations. + +## Signature + +```dotnet +public class StreamAction : Action +``` + +## Inheritance + +**Extends:** [SignalWire.Relay.Action](/docs/sdk-reference/reference/dotnet/signal-wire.relay/action) + +## Methods + +### GetStopMethod() + +Return the RELAY RPC method that stops this action. +Subclasses MUST override to return the correct method name. + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override string GetStopMethod() +``` + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 378. + +*** + +### StreamAction(string, string, string, object) + +#### Signature + +```dotnet +public StreamAction(string controlId, string callId, string nodeId, object client) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 375. + +## Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 373. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.relay/tap-action/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.relay/tap-action/index.mdx new file mode 100644 index 0000000000..953c3453af --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.relay/tap-action/index.mdx @@ -0,0 +1,85 @@ +--- +slug: "/reference/dotnet/signal-wire.relay/tap-action" +title: "TapAction" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Relay.TapAction" + parent: "SignalWire.Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs" + visibility: "public" +--- +# `TapAction` + +Handle for calling.tap operations. + +## Signature + +```dotnet +public class TapAction : Action +``` + +## Inheritance + +**Extends:** [SignalWire.Relay.Action](/docs/sdk-reference/reference/dotnet/signal-wire.relay/action) + +## Methods + +### GetStopMethod() + +Return the RELAY RPC method that stops this action. +Subclasses MUST override to return the correct method name. + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override string GetStopMethod() +``` + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 369. + +*** + +### TapAction(string, string, string, object) + +#### Signature + +```dotnet +public TapAction(string controlId, string callId, string nodeId, object client) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 366. + +## Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 364. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.relay/transcribe-action/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.relay/transcribe-action/index.mdx new file mode 100644 index 0000000000..6ece9a4ab2 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.relay/transcribe-action/index.mdx @@ -0,0 +1,85 @@ +--- +slug: "/reference/dotnet/signal-wire.relay/transcribe-action" +title: "TranscribeAction" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Relay.TranscribeAction" + parent: "SignalWire.Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs" + visibility: "public" +--- +# `TranscribeAction` + +Handle for calling.transcribe operations. + +## Signature + +```dotnet +public class TranscribeAction : Action +``` + +## Inheritance + +**Extends:** [SignalWire.Relay.Action](/docs/sdk-reference/reference/dotnet/signal-wire.relay/action) + +## Methods + +### GetStopMethod() + +Return the RELAY RPC method that stops this action. +Subclasses MUST override to return the correct method name. + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override string GetStopMethod() +``` + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 396. + +*** + +### TranscribeAction(string, string, string, object) + +#### Signature + +```dotnet +public TranscribeAction(string controlId, string callId, string nodeId, object client) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 393. + +## Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 391. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/addresses/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/addresses/index.mdx new file mode 100644 index 0000000000..f9e5df6d20 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/addresses/index.mdx @@ -0,0 +1,57 @@ +--- +slug: "/reference/dotnet/signal-wire.rest.namespaces/addresses" +title: "Addresses" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.Addresses" + parent: "SignalWire.REST.Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs" + visibility: "public" +--- +# `Addresses` + +Addresses namespace (Relay top-level addresses, no update). + +Mirrors Python `signalwire.rest.namespaces.addresses.AddressesResource`. +Inherits CrudResource for the standard list/create/get/delete surface. + +## Signature + +```dotnet +public class Addresses : CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/signal-wire.rest/crud-resource) + +## Methods + +### Addresses(HttpClient) + +#### Signature + +```dotnet +public Addresses(HttpClient client) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 190. + +## Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 188. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/call-flows-helper/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/call-flows-helper/index.mdx new file mode 100644 index 0000000000..0870a0ff56 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/call-flows-helper/index.mdx @@ -0,0 +1,135 @@ +--- +slug: "/reference/dotnet/signal-wire.rest.namespaces/call-flows-helper" +title: "CallFlowsHelper" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.CallFlowsHelper" + parent: "SignalWire.REST.Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs" + visibility: "public" +--- +# `CallFlowsHelper` + +CallFlows helper providing the singular-path variants +(`/api/fabric/resources/call_flow/{id}/{addresses,versions}`). + +## Signature + +```dotnet +public class CallFlowsHelper +``` + +## Properties + + + +## Methods + +### CallFlowsHelper(HttpClient, string) + +#### Signature + +```dotnet +public CallFlowsHelper(HttpClient client, string basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) + +Line 153. + +*** + +### DeployVersionAsync(string, Dictionary\) + +#### Signature + +```dotnet +public Task> DeployVersionAsync(string resourceId, Dictionary kwargs) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) + +Line 169. + +*** + +### ListAddressesAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> ListAddressesAsync(string resourceId, Dictionary? queryParams = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) + +Line 163. + +*** + +### ListVersionsAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> ListVersionsAsync(string resourceId, Dictionary? queryParams = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) + +Line 166. + +## Source + +[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) + +Line 147. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/calling/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/calling/index.mdx new file mode 100644 index 0000000000..bec7e14482 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/calling/index.mdx @@ -0,0 +1,1067 @@ +--- +slug: "/reference/dotnet/signal-wire.rest.namespaces/calling" +title: "Calling" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.Calling" + parent: "SignalWire.REST.Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs" + visibility: "public" +--- +# `Calling` + +Calling API namespace. + +Provides 37 call-control command methods that each POST to +/api/calling/calls with a JSON body containing the command name, +an optional call ID, and parameters. + +## Signature + +```dotnet +public class Calling +``` + +## Properties + + + + + +## Methods + +### AiHoldAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> AiHoldAsync(string callId, Dictionary? parms = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 176. + +*** + +### AiMessageAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> AiMessageAsync(string callId, Dictionary? parms = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 173. + +*** + +### AiStopAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> AiStopAsync(string callId, Dictionary? parms = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 182. + +*** + +### AiUnholdAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> AiUnholdAsync(string callId, Dictionary? parms = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 179. + +*** + +### Calling(HttpClient, string) + +#### Signature + +```dotnet +public Calling(HttpClient client, string projectId) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 16. + +*** + +### CollectAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> CollectAsync(string callId, Dictionary? parms = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 110. + +*** + +### CollectStartInputTimersAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> CollectStartInputTimersAsync(string callId, Dictionary? parms = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 116. + +*** + +### CollectStopAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> CollectStopAsync(string callId, Dictionary? parms = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 113. + +*** + +### DenoiseAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> DenoiseAsync(string callId, Dictionary? parms = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 153. + +*** + +### DenoiseStopAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> DenoiseStopAsync(string callId, Dictionary? parms = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 156. + +*** + +### DetectAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> DetectAsync(string callId, Dictionary? parms = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 123. + +*** + +### DetectStopAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> DetectStopAsync(string callId, Dictionary? parms = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 126. + +*** + +### DialAsync(Dictionary\?) + +#### Signature + +```dotnet +public Task> DialAsync(Dictionary? parms = null) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 51. + +*** + +### DisconnectAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> DisconnectAsync(string callId, Dictionary? parms = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 68. + +*** + +### EndAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> EndAsync(string callId, Dictionary? parms = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 62. + +*** + +### GetBasePath() + +#### Signature + +```dotnet +public string GetBasePath() +``` + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 24. + +*** + +### LiveTranscribeAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> LiveTranscribeAsync(string callId, Dictionary? parms = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 189. + +*** + +### LiveTranslateAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> LiveTranslateAsync(string callId, Dictionary? parms = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 192. + +*** + +### PlayAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> PlayAsync(string callId, Dictionary? parms = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 75. + +*** + +### PlayPauseAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> PlayPauseAsync(string callId, Dictionary? parms = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 78. + +*** + +### PlayResumeAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> PlayResumeAsync(string callId, Dictionary? parms = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 81. + +*** + +### PlayStopAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> PlayStopAsync(string callId, Dictionary? parms = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 84. + +*** + +### PlayVolumeAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> PlayVolumeAsync(string callId, Dictionary? parms = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 87. + +*** + +### ReceiveFaxStopAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> ReceiveFaxStopAsync(string callId, Dictionary? parms = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 202. + +*** + +### RecordAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> RecordAsync(string callId, Dictionary? parms = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 94. + +*** + +### RecordPauseAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> RecordPauseAsync(string callId, Dictionary? parms = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 97. + +*** + +### RecordResumeAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> RecordResumeAsync(string callId, Dictionary? parms = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 100. + +*** + +### RecordStopAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> RecordStopAsync(string callId, Dictionary? parms = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 103. + +*** + +### ReferAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> ReferAsync(string callId, Dictionary? parms = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 209. + +*** + +### SendFaxStopAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> SendFaxStopAsync(string callId, Dictionary? parms = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 199. + +*** + +### StreamAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> StreamAsync(string callId, Dictionary? parms = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 143. + +*** + +### StreamStopAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> StreamStopAsync(string callId, Dictionary? parms = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 146. + +*** + +### TapAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> TapAsync(string callId, Dictionary? parms = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 133. + +*** + +### TapStopAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> TapStopAsync(string callId, Dictionary? parms = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 136. + +*** + +### TranscribeAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> TranscribeAsync(string callId, Dictionary? parms = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 163. + +*** + +### TranscribeStopAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> TranscribeStopAsync(string callId, Dictionary? parms = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 166. + +*** + +### TransferAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> TransferAsync(string callId, Dictionary? parms = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 65. + +*** + +### UpdateAsync(Dictionary\?) + +Python-parity alias for <xref href="SignalWire.REST.Namespaces.Calling.UpdateCallAsync(System.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d)" data-throw-if-not-resolved="false"></xref>. +Mirrors `CallingNamespace.update`. + +#### Signature + +```dotnet +public Task> UpdateAsync(Dictionary? parms = null) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 59. + +*** + +### UpdateCallAsync(Dictionary\?) + +#### Signature + +```dotnet +public Task> UpdateCallAsync(Dictionary? parms = null) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 54. + +*** + +### UserEventAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> UserEventAsync(string callId, Dictionary? parms = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 216. + +## Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 9. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-accounts/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-accounts/index.mdx new file mode 100644 index 0000000000..676ee12455 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-accounts/index.mdx @@ -0,0 +1,149 @@ +--- +slug: "/reference/dotnet/signal-wire.rest.namespaces/compat-accounts" +title: "CompatAccounts" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.CompatAccounts" + parent: "SignalWire.REST.Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs" + visibility: "public" +--- +# `CompatAccounts` + +Compat account/subproject management. Lives at the top-level +/api/laml/2010-04-01/Accounts collection (no AccountSid prefix). + +## Signature + +```dotnet +public class CompatAccounts +``` + +## Methods + +### CompatAccounts(HttpClient) + +#### Signature + +```dotnet +public CompatAccounts(HttpClient client) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 69. + +*** + +### CreateAsync(Dictionary\) + +#### Signature + +```dotnet +public Task> CreateAsync(Dictionary kwargs) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 74. + +*** + +### GetAsync(string) + +#### Signature + +```dotnet +public Task> GetAsync(string sid) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 77. + +*** + +### ListAsync(Dictionary\?) + +#### Signature + +```dotnet +public Task> ListAsync(Dictionary? queryParams = null) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 71. + +*** + +### UpdateAsync(string, Dictionary\) + +#### Signature + +```dotnet +public Task> UpdateAsync(string sid, Dictionary kwargs) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 80. + +## Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 65. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-applications/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-applications/index.mdx new file mode 100644 index 0000000000..4ed534d8e5 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-applications/index.mdx @@ -0,0 +1,88 @@ +--- +slug: "/reference/dotnet/signal-wire.rest.namespaces/compat-applications" +title: "CompatApplications" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.CompatApplications" + parent: "SignalWire.REST.Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs" + visibility: "public" +--- +# `CompatApplications` + +Compat applications (Twilio LaML voice/SMS apps). + +## Signature + +```dotnet +public class CompatApplications : CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/signal-wire.rest/crud-resource) + +## Methods + +### CompatApplications(HttpClient, string) + +#### Signature + +```dotnet +public CompatApplications(HttpClient client, string basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 255. + +*** + +### UpdateAsync(string, Dictionary\, CancellationToken) + +Update a resource by ID (PUT basePath/\{id\}). + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override Task> UpdateAsync(string sid, Dictionary kwargs, CancellationToken cancellationToken = default) +``` + +#### Parameters + + + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 257. + +## Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 253. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-calls/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-calls/index.mdx new file mode 100644 index 0000000000..ff76965da7 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-calls/index.mdx @@ -0,0 +1,197 @@ +--- +slug: "/reference/dotnet/signal-wire.rest.namespaces/compat-calls" +title: "CompatCalls" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.CompatCalls" + parent: "SignalWire.REST.Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs" + visibility: "public" +--- +# `CompatCalls` + +Compat calls with recording + stream sub-resources. +Inherits standard CRUD; adds Twilio-style compat extensions. + +## Signature + +```dotnet +public class CompatCalls : CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/signal-wire.rest/crud-resource) + +## Methods + +### CompatCalls(HttpClient, string) + +#### Signature + +```dotnet +public CompatCalls(HttpClient client, string basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 88. + +*** + +### StartRecordingAsync(string, Dictionary\) + +#### Signature + +```dotnet +public Task> StartRecordingAsync(string callSid, Dictionary kwargs) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 95. + +*** + +### StartStreamAsync(string, Dictionary\) + +#### Signature + +```dotnet +public Task> StartStreamAsync(string callSid, Dictionary kwargs) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 101. + +*** + +### StopStreamAsync(string, string, Dictionary\) + +#### Signature + +```dotnet +public Task> StopStreamAsync(string callSid, string streamSid, Dictionary kwargs) +``` + +#### Parameters + + + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 104. + +*** + +### UpdateAsync(string, Dictionary\, CancellationToken) + +UPDATE uses POST (Twilio compat) — overrides the generic CrudResource PUT. + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override Task> UpdateAsync(string sid, Dictionary kwargs, CancellationToken cancellationToken = default) +``` + +#### Parameters + + + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 91. + +*** + +### UpdateRecordingAsync(string, string, Dictionary\) + +#### Signature + +```dotnet +public Task> UpdateRecordingAsync(string callSid, string recordingSid, Dictionary kwargs) +``` + +#### Parameters + + + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 98. + +## Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 86. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-conferences/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-conferences/index.mdx new file mode 100644 index 0000000000..446a6cb33a --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-conferences/index.mdx @@ -0,0 +1,396 @@ +--- +slug: "/reference/dotnet/signal-wire.rest.namespaces/compat-conferences" +title: "CompatConferences" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.CompatConferences" + parent: "SignalWire.REST.Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs" + visibility: "public" +--- +# `CompatConferences` + +Compat conferences with participant, recording, and stream sub-resources. + +## Signature + +```dotnet +public class CompatConferences +``` + +## Properties + + + +## Methods + +### CompatConferences(HttpClient, string) + +#### Signature + +```dotnet +public CompatConferences(HttpClient client, string basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 152. + +*** + +### DeleteRecordingAsync(string, string) + +#### Signature + +```dotnet +public Task> DeleteRecordingAsync(string conferenceSid, string recordingSid) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 193. + +*** + +### GetAsync(string) + +#### Signature + +```dotnet +public Task> GetAsync(string sid) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 166. + +*** + +### GetParticipantAsync(string, string) + +#### Signature + +```dotnet +public Task> GetParticipantAsync(string conferenceSid, string callSid) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 175. + +*** + +### GetRecordingAsync(string, string) + +#### Signature + +```dotnet +public Task> GetRecordingAsync(string conferenceSid, string recordingSid) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 187. + +*** + +### ListAsync(Dictionary\?) + +#### Signature + +```dotnet +public Task> ListAsync(Dictionary? queryParams = null) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 163. + +*** + +### ListParticipantsAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> ListParticipantsAsync(string conferenceSid, Dictionary? queryParams = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 172. + +*** + +### ListRecordingsAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> ListRecordingsAsync(string conferenceSid, Dictionary? queryParams = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 184. + +*** + +### RemoveParticipantAsync(string, string) + +#### Signature + +```dotnet +public Task> RemoveParticipantAsync(string conferenceSid, string callSid) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 181. + +*** + +### StartStreamAsync(string, Dictionary\) + +#### Signature + +```dotnet +public Task> StartStreamAsync(string conferenceSid, Dictionary kwargs) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 196. + +*** + +### StopStreamAsync(string, string, Dictionary\) + +#### Signature + +```dotnet +public Task> StopStreamAsync(string conferenceSid, string streamSid, Dictionary kwargs) +``` + +#### Parameters + + + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 199. + +*** + +### UpdateAsync(string, Dictionary\) + +#### Signature + +```dotnet +public Task> UpdateAsync(string sid, Dictionary kwargs) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 169. + +*** + +### UpdateParticipantAsync(string, string, Dictionary\) + +#### Signature + +```dotnet +public Task> UpdateParticipantAsync(string conferenceSid, string callSid, Dictionary kwargs) +``` + +#### Parameters + + + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 178. + +*** + +### UpdateRecordingAsync(string, string, Dictionary\) + +#### Signature + +```dotnet +public Task> UpdateRecordingAsync(string conferenceSid, string recordingSid, Dictionary kwargs) +``` + +#### Parameters + + + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 190. + +## Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 147. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-faxes/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-faxes/index.mdx new file mode 100644 index 0000000000..392aa6c67c --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-faxes/index.mdx @@ -0,0 +1,166 @@ +--- +slug: "/reference/dotnet/signal-wire.rest.namespaces/compat-faxes" +title: "CompatFaxes" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.CompatFaxes" + parent: "SignalWire.REST.Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs" + visibility: "public" +--- +# `CompatFaxes` + +Compat faxes with media sub-resources. + +## Signature + +```dotnet +public class CompatFaxes : CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/signal-wire.rest/crud-resource) + +## Methods + +### CompatFaxes(HttpClient, string) + +#### Signature + +```dotnet +public CompatFaxes(HttpClient client, string basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 130. + +*** + +### DeleteMediaAsync(string, string) + +#### Signature + +```dotnet +public Task> DeleteMediaAsync(string faxSid, string mediaSid) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 142. + +*** + +### GetMediaAsync(string, string) + +#### Signature + +```dotnet +public Task> GetMediaAsync(string faxSid, string mediaSid) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 139. + +*** + +### ListMediaAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> ListMediaAsync(string faxSid, Dictionary? queryParams = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 136. + +*** + +### UpdateAsync(string, Dictionary\, CancellationToken) + +Update a resource by ID (PUT basePath/\{id\}). + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override Task> UpdateAsync(string sid, Dictionary kwargs, CancellationToken cancellationToken = default) +``` + +#### Parameters + + + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 132. + +## Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 128. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-laml-bins/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-laml-bins/index.mdx new file mode 100644 index 0000000000..386502ac22 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-laml-bins/index.mdx @@ -0,0 +1,88 @@ +--- +slug: "/reference/dotnet/signal-wire.rest.namespaces/compat-laml-bins" +title: "CompatLamlBins" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.CompatLamlBins" + parent: "SignalWire.REST.Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs" + visibility: "public" +--- +# `CompatLamlBins` + +Compat cXML / LaML script bins. + +## Signature + +```dotnet +public class CompatLamlBins : CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/signal-wire.rest/crud-resource) + +## Methods + +### CompatLamlBins(HttpClient, string) + +#### Signature + +```dotnet +public CompatLamlBins(HttpClient client, string basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 265. + +*** + +### UpdateAsync(string, Dictionary\, CancellationToken) + +Update a resource by ID (PUT basePath/\{id\}). + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override Task> UpdateAsync(string sid, Dictionary kwargs, CancellationToken cancellationToken = default) +``` + +#### Parameters + + + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 267. + +## Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 263. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-messages/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-messages/index.mdx new file mode 100644 index 0000000000..0bfc50962d --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-messages/index.mdx @@ -0,0 +1,166 @@ +--- +slug: "/reference/dotnet/signal-wire.rest.namespaces/compat-messages" +title: "CompatMessages" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.CompatMessages" + parent: "SignalWire.REST.Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs" + visibility: "public" +--- +# `CompatMessages` + +Compat messages with media sub-resources. + +## Signature + +```dotnet +public class CompatMessages : CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/signal-wire.rest/crud-resource) + +## Methods + +### CompatMessages(HttpClient, string) + +#### Signature + +```dotnet +public CompatMessages(HttpClient client, string basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 111. + +*** + +### DeleteMediaAsync(string, string) + +#### Signature + +```dotnet +public Task> DeleteMediaAsync(string messageSid, string mediaSid) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 123. + +*** + +### GetMediaAsync(string, string) + +#### Signature + +```dotnet +public Task> GetMediaAsync(string messageSid, string mediaSid) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 120. + +*** + +### ListMediaAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> ListMediaAsync(string messageSid, Dictionary? queryParams = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 117. + +*** + +### UpdateAsync(string, Dictionary\, CancellationToken) + +Update a resource by ID (PUT basePath/\{id\}). + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override Task> UpdateAsync(string sid, Dictionary kwargs, CancellationToken cancellationToken = default) +``` + +#### Parameters + + + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 113. + +## Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 109. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-phone-numbers/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-phone-numbers/index.mdx new file mode 100644 index 0000000000..505ce20b67 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-phone-numbers/index.mdx @@ -0,0 +1,278 @@ +--- +slug: "/reference/dotnet/signal-wire.rest.namespaces/compat-phone-numbers" +title: "CompatPhoneNumbers" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.CompatPhoneNumbers" + parent: "SignalWire.REST.Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs" + visibility: "public" +--- +# `CompatPhoneNumbers` + +Compat phone-number management with purchase, import, and search. + +## Signature + +```dotnet +public class CompatPhoneNumbers +``` + +## Properties + + + +## Methods + +### CompatPhoneNumbers(HttpClient, string) + +#### Signature + +```dotnet +public CompatPhoneNumbers(HttpClient client, string basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 211. + +*** + +### DeleteAsync(string) + +#### Signature + +```dotnet +public Task> DeleteAsync(string sid) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 236. + +*** + +### GetAsync(string) + +#### Signature + +```dotnet +public Task> GetAsync(string sid) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 230. + +*** + +### ImportNumberAsync(Dictionary\) + +#### Signature + +```dotnet +public Task> ImportNumberAsync(Dictionary kwargs) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 239. + +*** + +### ListAsync(Dictionary\?) + +#### Signature + +```dotnet +public Task> ListAsync(Dictionary? queryParams = null) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 224. + +*** + +### ListAvailableCountriesAsync(Dictionary\?) + +#### Signature + +```dotnet +public Task> ListAvailableCountriesAsync(Dictionary? queryParams = null) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 242. + +*** + +### PurchaseAsync(Dictionary\) + +#### Signature + +```dotnet +public Task> PurchaseAsync(Dictionary kwargs) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 227. + +*** + +### SearchLocalAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> SearchLocalAsync(string country, Dictionary? queryParams = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 245. + +*** + +### SearchTollFreeAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> SearchTollFreeAsync(string country, Dictionary? queryParams = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 248. + +*** + +### UpdateAsync(string, Dictionary\) + +#### Signature + +```dotnet +public Task> UpdateAsync(string sid, Dictionary kwargs) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 233. + +## Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 204. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-queues/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-queues/index.mdx new file mode 100644 index 0000000000..d3db9bc1b4 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-queues/index.mdx @@ -0,0 +1,168 @@ +--- +slug: "/reference/dotnet/signal-wire.rest.namespaces/compat-queues" +title: "CompatQueues" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.CompatQueues" + parent: "SignalWire.REST.Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs" + visibility: "public" +--- +# `CompatQueues` + +Compat queues with member management. + +## Signature + +```dotnet +public class CompatQueues : CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/signal-wire.rest/crud-resource) + +## Methods + +### CompatQueues(HttpClient, string) + +#### Signature + +```dotnet +public CompatQueues(HttpClient client, string basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 275. + +*** + +### DequeueMemberAsync(string, string, Dictionary\) + +#### Signature + +```dotnet +public Task> DequeueMemberAsync(string queueSid, string callSid, Dictionary kwargs) +``` + +#### Parameters + + + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 287. + +*** + +### GetMemberAsync(string, string) + +#### Signature + +```dotnet +public Task> GetMemberAsync(string queueSid, string callSid) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 284. + +*** + +### ListMembersAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> ListMembersAsync(string queueSid, Dictionary? queryParams = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 281. + +*** + +### UpdateAsync(string, Dictionary\, CancellationToken) + +Update a resource by ID (PUT basePath/\{id\}). + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override Task> UpdateAsync(string sid, Dictionary kwargs, CancellationToken cancellationToken = default) +``` + +#### Parameters + + + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 277. + +## Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 273. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-recordings/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-recordings/index.mdx new file mode 100644 index 0000000000..a814ed649b --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-recordings/index.mdx @@ -0,0 +1,128 @@ +--- +slug: "/reference/dotnet/signal-wire.rest.namespaces/compat-recordings" +title: "CompatRecordings" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.CompatRecordings" + parent: "SignalWire.REST.Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs" + visibility: "public" +--- +# `CompatRecordings` + +Compat recordings (read-only top-level resource). + +## Signature + +```dotnet +public class CompatRecordings +``` + +## Properties + + + +## Methods + +### CompatRecordings(HttpClient, string) + +#### Signature + +```dotnet +public CompatRecordings(HttpClient client, string basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 297. + +*** + +### DeleteAsync(string) + +#### Signature + +```dotnet +public Task> DeleteAsync(string sid) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 313. + +*** + +### GetAsync(string) + +#### Signature + +```dotnet +public Task> GetAsync(string sid) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 310. + +*** + +### ListAsync(Dictionary\?) + +#### Signature + +```dotnet +public Task> ListAsync(Dictionary? queryParams = null) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 307. + +## Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 292. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-tokens/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-tokens/index.mdx new file mode 100644 index 0000000000..313b384d77 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-tokens/index.mdx @@ -0,0 +1,130 @@ +--- +slug: "/reference/dotnet/signal-wire.rest.namespaces/compat-tokens" +title: "CompatTokens" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.CompatTokens" + parent: "SignalWire.REST.Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs" + visibility: "public" +--- +# `CompatTokens` + +Compat API tokens — UPDATE uses PATCH (BaseResource style). + +## Signature + +```dotnet +public class CompatTokens +``` + +## Properties + + + +## Methods + +### CompatTokens(HttpClient, string) + +#### Signature + +```dotnet +public CompatTokens(HttpClient client, string basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 349. + +*** + +### CreateAsync(Dictionary\) + +#### Signature + +```dotnet +public Task> CreateAsync(Dictionary kwargs) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 359. + +*** + +### DeleteAsync(string) + +#### Signature + +```dotnet +public Task> DeleteAsync(string tokenId) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 365. + +*** + +### UpdateAsync(string, Dictionary\) + +#### Signature + +```dotnet +public Task> UpdateAsync(string tokenId, Dictionary kwargs) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 362. + +## Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 344. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-transcriptions/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-transcriptions/index.mdx new file mode 100644 index 0000000000..04669609fb --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-transcriptions/index.mdx @@ -0,0 +1,128 @@ +--- +slug: "/reference/dotnet/signal-wire.rest.namespaces/compat-transcriptions" +title: "CompatTranscriptions" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.CompatTranscriptions" + parent: "SignalWire.REST.Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs" + visibility: "public" +--- +# `CompatTranscriptions` + +Compat transcriptions (read-only top-level resource). + +## Signature + +```dotnet +public class CompatTranscriptions +``` + +## Properties + + + +## Methods + +### CompatTranscriptions(HttpClient, string) + +#### Signature + +```dotnet +public CompatTranscriptions(HttpClient client, string basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 323. + +*** + +### DeleteAsync(string) + +#### Signature + +```dotnet +public Task> DeleteAsync(string sid) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 339. + +*** + +### GetAsync(string) + +#### Signature + +```dotnet +public Task> GetAsync(string sid) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 336. + +*** + +### ListAsync(Dictionary\?) + +#### Signature + +```dotnet +public Task> ListAsync(Dictionary? queryParams = null) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 333. + +## Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 318. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat/index.mdx new file mode 100644 index 0000000000..acd15acb30 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat/index.mdx @@ -0,0 +1,94 @@ +--- +slug: "/reference/dotnet/signal-wire.rest.namespaces/compat" +title: "Compat" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.Compat" + parent: "SignalWire.REST.Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs" + visibility: "public" +--- +# `Compat` + +Twilio-compatible (LaML) API namespace with AccountSid scoping. + +Mirrors Python `signalwire.rest.namespaces.compat.CompatNamespace`: +the entry-point exposes 12 sub-resources (accounts, calls, messages, +faxes, conferences, phone\_numbers, applications, laml\_bins, queues, +recordings, transcriptions, tokens) under a shared per-account prefix. + +<p>Inherits from <xref href="SignalWire.REST.CrudResource" data-throw-if-not-resolved="false"></xref> so the historical +``client.Compat.List()`` / ``Create`` / ``Get`` / ``Update`` / ``Delete`` +surface continues to work; the per-account collection accessors are +added on top.</p> + +## Signature + +```dotnet +public class Compat : CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/signal-wire.rest/crud-resource) + +## Properties + + + + + + + + + + + + + + + + + + + + + + + + + + + +## Methods + +### Compat(HttpClient, string) + +#### Signature + +```dotnet +public Compat(HttpClient client, string accountSid) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 40. + +## Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 22. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/conference-logs/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/conference-logs/index.mdx new file mode 100644 index 0000000000..fa9cfdfcb6 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/conference-logs/index.mdx @@ -0,0 +1,80 @@ +--- +slug: "/reference/dotnet/signal-wire.rest.namespaces/conference-logs" +title: "ConferenceLogs" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.ConferenceLogs" + parent: "SignalWire.REST.Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Logs.cs" + visibility: "public" +--- +# `ConferenceLogs` + +Conference log queries (list-only). + +## Signature + +```dotnet +public class ConferenceLogs +``` + +## Properties + + + +## Methods + +### ConferenceLogs(HttpClient, string) + +#### Signature + +```dotnet +public ConferenceLogs(HttpClient client, string basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/REST/Namespaces/Logs.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Logs.cs) + +Line 114. + +*** + +### ListAsync(Dictionary\?) + +#### Signature + +```dotnet +public Task> ListAsync(Dictionary? queryParams = null) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Logs.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Logs.cs) + +Line 122. + +## Source + +[`src/SignalWire/REST/Namespaces/Logs.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Logs.cs) + +Line 109. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/conference-rooms-helper/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/conference-rooms-helper/index.mdx new file mode 100644 index 0000000000..2f8c07e3c7 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/conference-rooms-helper/index.mdx @@ -0,0 +1,83 @@ +--- +slug: "/reference/dotnet/signal-wire.rest.namespaces/conference-rooms-helper" +title: "ConferenceRoomsHelper" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.ConferenceRoomsHelper" + parent: "SignalWire.REST.Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs" + visibility: "public" +--- +# `ConferenceRoomsHelper` + +ConferenceRooms helper providing the singular-path variant +(`/api/fabric/resources/conference_room/{id}/addresses`). + +## Signature + +```dotnet +public class ConferenceRoomsHelper +``` + +## Properties + + + +## Methods + +### ConferenceRoomsHelper(HttpClient, string) + +#### Signature + +```dotnet +public ConferenceRoomsHelper(HttpClient client, string basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) + +Line 183. + +*** + +### ListAddressesAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> ListAddressesAsync(string resourceId, Dictionary? queryParams = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) + +Line 192. + +## Source + +[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) + +Line 177. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/cxml-applications-helper/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/cxml-applications-helper/index.mdx new file mode 100644 index 0000000000..374c304101 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/cxml-applications-helper/index.mdx @@ -0,0 +1,56 @@ +--- +slug: "/reference/dotnet/signal-wire.rest.namespaces/cxml-applications-helper" +title: "CxmlApplicationsHelper" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.CxmlApplicationsHelper" + parent: "SignalWire.REST.Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs" + visibility: "public" +--- +# `CxmlApplicationsHelper` + +cXML applications helper. The API has no CREATE endpoint for cXML +applications (POST is rejected); calling Create here throws +NotImplementedException to mirror Python's deliberate behaviour. + +## Signature + +```dotnet +public class CxmlApplicationsHelper +``` + +## Methods + +### CreateAsync(Dictionary\?) + +#### Signature + +```dotnet +public Task> CreateAsync(Dictionary? kwargs = null) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) + +Line 203. + +## Source + +[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) + +Line 201. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/datasphere-documents/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/datasphere-documents/index.mdx new file mode 100644 index 0000000000..9e143973be --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/datasphere-documents/index.mdx @@ -0,0 +1,156 @@ +--- +slug: "/reference/dotnet/signal-wire.rest.namespaces/datasphere-documents" +title: "DatasphereDocuments" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.DatasphereDocuments" + parent: "SignalWire.REST.Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs" + visibility: "public" +--- +# `DatasphereDocuments` + +Datasphere documents (CRUD + search + chunk methods). + +## Signature + +```dotnet +public class DatasphereDocuments : CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/signal-wire.rest/crud-resource) + +## Methods + +### DatasphereDocuments(HttpClient) + +#### Signature + +```dotnet +public DatasphereDocuments(HttpClient client) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 166. + +*** + +### DeleteChunkAsync(string, string) + +#### Signature + +```dotnet +public Task> DeleteChunkAsync(string documentId, string chunkId) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 178. + +*** + +### GetChunkAsync(string, string) + +#### Signature + +```dotnet +public Task> GetChunkAsync(string documentId, string chunkId) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 175. + +*** + +### ListChunksAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> ListChunksAsync(string documentId, Dictionary? queryParams = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 172. + +*** + +### SearchAsync(Dictionary\) + +#### Signature + +```dotnet +public Task> SearchAsync(Dictionary kwargs) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 169. + +## Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 164. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/datasphere-ns/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/datasphere-ns/index.mdx new file mode 100644 index 0000000000..bd4bfc8679 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/datasphere-ns/index.mdx @@ -0,0 +1,63 @@ +--- +slug: "/reference/dotnet/signal-wire.rest.namespaces/datasphere-ns" +title: "DatasphereNs" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.DatasphereNs" + parent: "SignalWire.REST.Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs" + visibility: "public" +--- +# `DatasphereNs` + +Datasphere namespace — documents with chunks/search. + +Mirrors Python `signalwire.rest.namespaces.datasphere.DatasphereNamespace`. +Extends CrudResource — the legacy `client.Datasphere.List` etc went +to /api/datasphere/documents directly; we preserve that surface and +add `Documents` accessor for chunk/search per Python parity. + +## Signature + +```dotnet +public class DatasphereNs : CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/signal-wire.rest/crud-resource) + +## Properties + + + +## Methods + +### DatasphereNs(HttpClient) + +#### Signature + +```dotnet +public DatasphereNs(HttpClient client) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 158. + +## Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 154. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/fabric-addresses/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/fabric-addresses/index.mdx new file mode 100644 index 0000000000..16d9a18824 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/fabric-addresses/index.mdx @@ -0,0 +1,107 @@ +--- +slug: "/reference/dotnet/signal-wire.rest.namespaces/fabric-addresses" +title: "FabricAddresses" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.FabricAddresses" + parent: "SignalWire.REST.Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs" + visibility: "public" +--- +# `FabricAddresses` + +Read-only top-level Fabric addresses resource (lives at +/api/fabric/addresses, NOT under /api/fabric/resources). + +Mirrors Python `signalwire.rest.namespaces.fabric.FabricAddresses`. + +## Signature + +```dotnet +public class FabricAddresses +``` + +## Properties + + + +## Methods + +### FabricAddresses(HttpClient, string) + +#### Signature + +```dotnet +public FabricAddresses(HttpClient client, string basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) + +Line 20. + +*** + +### GetAsync(string) + +#### Signature + +```dotnet +public Task> GetAsync(string addressId) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) + +Line 33. + +*** + +### ListAsync(Dictionary\?) + +#### Signature + +```dotnet +public Task> ListAsync(Dictionary? queryParams = null) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) + +Line 30. + +## Source + +[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) + +Line 15. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/fabric-resources/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/fabric-resources/index.mdx new file mode 100644 index 0000000000..2f5814c9dd --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/fabric-resources/index.mdx @@ -0,0 +1,184 @@ +--- +slug: "/reference/dotnet/signal-wire.rest.namespaces/fabric-resources" +title: "FabricResources" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.FabricResources" + parent: "SignalWire.REST.Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs" + visibility: "public" +--- +# `FabricResources` + +Generic resource operations across all Fabric resource types. + +Lives at /api/fabric/resources (the base) and dispatches to per-type +sub-paths. Mirrors Python's +`signalwire.rest.namespaces.fabric.GenericResources`. + +## Signature + +```dotnet +public class FabricResources +``` + +## Properties + + + +## Methods + +### AssignDomainApplicationAsync(string, Dictionary\) + +#### Signature + +```dotnet +public Task> AssignDomainApplicationAsync(string resourceId, Dictionary kwargs) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) + +Line 72. + +*** + +### DeleteAsync(string) + +#### Signature + +```dotnet +public Task> DeleteAsync(string resourceId) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) + +Line 66. + +*** + +### FabricResources(HttpClient, string) + +#### Signature + +```dotnet +public FabricResources(HttpClient client, string basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) + +Line 49. + +*** + +### GetAsync(string) + +#### Signature + +```dotnet +public Task> GetAsync(string resourceId) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) + +Line 63. + +*** + +### ListAddressesAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> ListAddressesAsync(string resourceId, Dictionary? queryParams = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) + +Line 69. + +*** + +### ListAsync(Dictionary\?) + +#### Signature + +```dotnet +public Task> ListAsync(Dictionary? queryParams = null) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) + +Line 60. + +## Source + +[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) + +Line 44. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/fabric-tokens/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/fabric-tokens/index.mdx new file mode 100644 index 0000000000..60999cf325 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/fabric-tokens/index.mdx @@ -0,0 +1,174 @@ +--- +slug: "/reference/dotnet/signal-wire.rest.namespaces/fabric-tokens" +title: "FabricTokens" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.FabricTokens" + parent: "SignalWire.REST.Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs" + visibility: "public" +--- +# `FabricTokens` + +Fabric tokens — subscriber/guest/invite/embed token creation. + +All endpoints sit under /api/fabric (NOT /api/fabric/resources or +/api/fabric/tokens). Mirrors Python's +`signalwire.rest.namespaces.fabric.FabricTokens`. + +## Signature + +```dotnet +public class FabricTokens +``` + +## Methods + +### CreateEmbedTokenAsync(Dictionary\) + +#### Signature + +```dotnet +public Task> CreateEmbedTokenAsync(Dictionary kwargs) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) + +Line 102. + +*** + +### CreateGuestTokenAsync(Dictionary\) + +#### Signature + +```dotnet +public Task> CreateGuestTokenAsync(Dictionary kwargs) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) + +Line 99. + +*** + +### CreateInviteTokenAsync(Dictionary\) + +#### Signature + +```dotnet +public Task> CreateInviteTokenAsync(Dictionary kwargs) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) + +Line 96. + +*** + +### CreateSubscriberTokenAsync(Dictionary\) + +#### Signature + +```dotnet +public Task> CreateSubscriberTokenAsync(Dictionary kwargs) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) + +Line 90. + +*** + +### FabricTokens(HttpClient) + +#### Signature + +```dotnet +public FabricTokens(HttpClient client) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) + +Line 88. + +*** + +### RefreshSubscriberTokenAsync(Dictionary\) + +#### Signature + +```dotnet +public Task> RefreshSubscriberTokenAsync(Dictionary kwargs) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) + +Line 93. + +## Source + +[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) + +Line 83. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/fabric/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/fabric/index.mdx new file mode 100644 index 0000000000..59047630ab --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/fabric/index.mdx @@ -0,0 +1,133 @@ +--- +slug: "/reference/dotnet/signal-wire.rest.namespaces/fabric" +title: "Fabric" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.Fabric" + parent: "SignalWire.REST.Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Fabric.cs" + visibility: "public" +--- +# `Fabric` + +Fabric API namespace. + +Groups all Fabric sub-resources (subscribers, SIP endpoints, call flows, +SWML scripts, conference rooms, AI agents, etc.) under a single object. +Each sub-resource is lazily initialised as a <xref href="SignalWire.REST.CrudResource" data-throw-if-not-resolved="false"></xref> +pointing at the correct API path under /api/fabric/resources. + +## Signature + +```dotnet +public class Fabric +``` + +## Properties + + + + + Top-level Fabric addresses (read-only — list/get) that lives at /api/fabric/addresses (NOT under /api/fabric/resources). + + + + + + + + CallFlows singular-path operations (list\_addresses, list\_versions, deploy\_version). + + + + + + + + + + ConferenceRooms singular-path operations (list\_addresses). + + + + + + + + cXML applications helper that exposes the deliberate NotImplementedException on Create (matching Python's `CxmlApplicationsResource.create`). + + + + + + + + + + + + + + + + + + + + Generic resources operations (list/get/delete/list\_addresses/ assign\_domain\_application) at /api/fabric/resources. + + + + + + + + + + + + Subscriber-scoped SIP-endpoint operations (get/update/delete) under /api/fabric/resources/subscribers. + + + + + + + + Fabric tokens resource — note this lives at the top-level `/api/fabric/tokens` path, NOT under `/api/fabric/resources`. + + + + Subscriber/guest/invite/embed token endpoints under /api/fabric. Distinct from the per-account `Tokens` accessor which hits /api/fabric/tokens. + + +## Methods + +### Fabric(HttpClient) + +#### Signature + +```dotnet +public Fabric(HttpClient client) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/REST/Namespaces/Fabric.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Fabric.cs) + +Line 50. + +## Source + +[`src/SignalWire/REST/Namespaces/Fabric.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Fabric.cs) + +Line 10. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/fax-logs/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/fax-logs/index.mdx new file mode 100644 index 0000000000..06c8c254bc --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/fax-logs/index.mdx @@ -0,0 +1,104 @@ +--- +slug: "/reference/dotnet/signal-wire.rest.namespaces/fax-logs" +title: "FaxLogs" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.FaxLogs" + parent: "SignalWire.REST.Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Logs.cs" + visibility: "public" +--- +# `FaxLogs` + +Fax log queries. + +## Signature + +```dotnet +public class FaxLogs +``` + +## Properties + + + +## Methods + +### FaxLogs(HttpClient, string) + +#### Signature + +```dotnet +public FaxLogs(HttpClient client, string basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/REST/Namespaces/Logs.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Logs.cs) + +Line 91. + +*** + +### GetAsync(string) + +#### Signature + +```dotnet +public Task> GetAsync(string logId) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Logs.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Logs.cs) + +Line 104. + +*** + +### ListAsync(Dictionary\?) + +#### Signature + +```dotnet +public Task> ListAsync(Dictionary? queryParams = null) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Logs.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Logs.cs) + +Line 101. + +## Source + +[`src/SignalWire/REST/Namespaces/Logs.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Logs.cs) + +Line 86. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/imported-numbers/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/imported-numbers/index.mdx new file mode 100644 index 0000000000..3c66f55923 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/imported-numbers/index.mdx @@ -0,0 +1,59 @@ +--- +slug: "/reference/dotnet/signal-wire.rest.namespaces/imported-numbers" +title: "ImportedNumbers" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.ImportedNumbers" + parent: "SignalWire.REST.Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs" + visibility: "public" +--- +# `ImportedNumbers` + +Imported phone numbers (create only). + +Mirrors Python `signalwire.rest.namespaces.imported_numbers.ImportedNumbersResource`. +Extends CrudResource so the legacy `client.ImportedNumbers.BasePath` +surface keeps working; `CreateAsync` is the only method Python +exposes. + +## Signature + +```dotnet +public class ImportedNumbers : CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/signal-wire.rest/crud-resource) + +## Methods + +### ImportedNumbers(HttpClient) + +#### Signature + +```dotnet +public ImportedNumbers(HttpClient client) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 110. + +## Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 108. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/index.mdx new file mode 100644 index 0000000000..c594670a42 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/index.mdx @@ -0,0 +1,224 @@ +--- +slug: "/reference/dotnet/signal-wire.rest.namespaces" +title: "SignalWire.REST.Namespaces" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "module" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces" +--- +# `SignalWire.REST.Namespaces` + +## Classes + + + + Addresses namespace (Relay top-level addresses, no update). Mirrors Python `signalwire.rest.namespaces.addresses.AddressesResource`. Inherits CrudResource for the standard list/create/get/delete surface. + + + + CallFlows helper providing the singular-path variants (`/api/fabric/resources/call_flow/{id}/{addresses,versions}`). + + + + Calling API namespace. Provides 37 call-control command methods that each POST to /api/calling/calls with a JSON body containing the command name, an optional call ID, and parameters. + + + + Twilio-compatible (LaML) API namespace with AccountSid scoping. Mirrors Python `signalwire.rest.namespaces.compat.CompatNamespace`: the entry-point exposes 12 sub-resources (accounts, calls, messages, faxes, conferences, phone\_numbers, applications, laml\_bins, queues, recordings, transcriptions, tokens) under a shared per-account prefix. <p>Inherits from <xref href="SignalWire.REST.CrudResource" data-throw-if-not-resolved="false"></xref> so the historical `client.Compat.List()` / `Create` / `Get` / `Update` / `Delete` surface continues to work; the per-account collection accessors are added on top.</p> + + + + Compat account/subproject management. Lives at the top-level /api/laml/2010-04-01/Accounts collection (no AccountSid prefix). + + + + Compat applications (Twilio LaML voice/SMS apps). + + + + Compat calls with recording + stream sub-resources. Inherits standard CRUD; adds Twilio-style compat extensions. + + + + Compat conferences with participant, recording, and stream sub-resources. + + + + Compat faxes with media sub-resources. + + + + Compat cXML / LaML script bins. + + + + Compat messages with media sub-resources. + + + + Compat phone-number management with purchase, import, and search. + + + + Compat queues with member management. + + + + Compat recordings (read-only top-level resource). + + + + Compat API tokens — UPDATE uses PATCH (BaseResource style). + + + + Compat transcriptions (read-only top-level resource). + + + + Conference log queries (list-only). + + + + ConferenceRooms helper providing the singular-path variant (`/api/fabric/resources/conference_room/{id}/addresses`). + + + + cXML applications helper. The API has no CREATE endpoint for cXML applications (POST is rejected); calling Create here throws NotImplementedException to mirror Python's deliberate behaviour. + + + + Datasphere documents (CRUD + search + chunk methods). + + + + Datasphere namespace — documents with chunks/search. Mirrors Python `signalwire.rest.namespaces.datasphere.DatasphereNamespace`. Extends CrudResource — the legacy `client.Datasphere.List` etc went to /api/datasphere/documents directly; we preserve that surface and add `Documents` accessor for chunk/search per Python parity. + + + + Fabric API namespace. Groups all Fabric sub-resources (subscribers, SIP endpoints, call flows, SWML scripts, conference rooms, AI agents, etc.) under a single object. Each sub-resource is lazily initialised as a <xref href="SignalWire.REST.CrudResource" data-throw-if-not-resolved="false"></xref> pointing at the correct API path under /api/fabric/resources. + + + + Read-only top-level Fabric addresses resource (lives at /api/fabric/addresses, NOT under /api/fabric/resources). Mirrors Python `signalwire.rest.namespaces.fabric.FabricAddresses`. + + + + Generic resource operations across all Fabric resource types. Lives at /api/fabric/resources (the base) and dispatches to per-type sub-paths. Mirrors Python's `signalwire.rest.namespaces.fabric.GenericResources`. + + + + Fabric tokens — subscriber/guest/invite/embed token creation. All endpoints sit under /api/fabric (NOT /api/fabric/resources or /api/fabric/tokens). Mirrors Python's `signalwire.rest.namespaces.fabric.FabricTokens`. + + + + Fax log queries. + + + + Imported phone numbers (create only). Mirrors Python `signalwire.rest.namespaces.imported_numbers.ImportedNumbersResource`. Extends CrudResource so the legacy `client.ImportedNumbers.BasePath` surface keeps working; `CreateAsync` is the only method Python exposes. + + + + Logs API namespace — message, voice, fax, and conference logs (read-only). Mirrors Python `signalwire.rest.namespaces.logs.LogsNamespace`. Each kind of log lives at a different sub-API path. <p>Inherits from <xref href="SignalWire.REST.CrudResource" data-throw-if-not-resolved="false"></xref> so the legacy `client.Logs.BasePath` accessor still resolves; the new Messages/Voice/Fax/Conferences accessors point at the actual per-API log endpoints.</p> + + + + Message log queries. + + + + Multi-Factor Authentication namespace (sms / call / verify dispatch). Mirrors Python `signalwire.rest.namespaces.mfa.MfaResource`. Extends CrudResource so the legacy `client.Mfa.BasePath` / `client.Mfa.Create` surface keeps working. + + + + Number Groups (CRUD + membership operations; update via PUT). Mirrors Python `signalwire.rest.namespaces.number_groups.NumberGroupsResource`. Note delete\_membership / get\_membership target the top-level `/api/relay/rest/number_group_memberships/{id}` path, NOT the nested per-group sub-collection. + + + + Project namespace — exposes ProjectTokens (PATCH update). Mirrors Python `signalwire.rest.namespaces.project.ProjectNamespace`. Extends CrudResource for the legacy `client.Project.BasePath` test. + + + + Project API tokens — PATCH for update. + + + + Queues namespace (Relay queues with member operations). Mirrors Python `signalwire.rest.namespaces.queues.QueuesResource`. Note: per-port adapter mismatches with the legacy CrudResource at /api/fabric/resources/queues — this lives at /api/relay/rest/queues. + + + + Recordings namespace (Relay top-level recordings, list/get/delete). Mirrors Python `signalwire.rest.namespaces.recordings.RecordingsResource`. Inherits CrudResource for the standard list/get/delete surface. + + + + 10DLC Campaign Registry namespace — brands, campaigns, orders, numbers. Mirrors Python `signalwire.rest.namespaces.registry.RegistryNamespace` (everything under /api/relay/rest/registry/beta). <p>Inherits from <xref href="SignalWire.REST.CrudResource" data-throw-if-not-resolved="false"></xref> so the legacy `client.Registry.BasePath` accessor still resolves; the new Brands/Campaigns/Orders/Numbers accessors target the per-resource endpoints under /api/relay/rest/registry/beta.</p> + + + + 10DLC brand management. + + + + 10DLC campaign management — update via PUT. + + + + 10DLC number assignment management. + + + + 10DLC assignment order management (read-only). + + + + Short codes (list/get/update — no create/delete; update via PUT). Mirrors Python `signalwire.rest.namespaces.short_codes.ShortCodesResource`. Extends CrudResource — overrides UpdateAsync to use PUT (matching Python's \_update\_method = "PUT" on this resource). + + + + Project SIP profile (singleton resource — get/update only, update via PUT). Mirrors Python `signalwire.rest.namespaces.sip_profile.SipProfileResource`. Extends CrudResource for the legacy `client.SipProfile.BasePath` test — the Python-parity singleton path is /api/relay/rest/sip\_profile; the legacy .NET path was /api/relay/rest/sip\_profiles. The legacy accessor target is preserved while `GetAsync()/UpdateAsync(kwargs)` hit the singleton path. + + + + Subscribers helper exposing per-subscriber SIP-endpoint operations. Mirrors Python's `SubscribersResource` SIP endpoint methods. + + + + Video API namespace. Mirrors Python `signalwire.rest.namespaces.video.VideoNamespace` — rooms, room sessions, room recordings, conferences, conference tokens, streams. <p>The legacy `client.Video.List() / Create / Get / Delete` surface (which targeted `/api/video/rooms`) is preserved by inheriting from <xref href="SignalWire.REST.CrudResource" data-throw-if-not-resolved="false"></xref>.</p> + + + + Video conferences (CRUD with PUT update + tokens/streams subresources). + + + + Video conference tokens: get + reset. + + + + Video room recordings: list, get, delete, list\_events. + + + + Video rooms (CRUD + streams sub-resource). + + + + Video room sessions: list, get, list\_events/\_members/\_recordings. + + + + Video room tokens (create-only). + + + + Video streams: get, update (PUT), delete. + + + + Voice log queries with events sub-collection. + + diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/logs/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/logs/index.mdx new file mode 100644 index 0000000000..278728a2d8 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/logs/index.mdx @@ -0,0 +1,72 @@ +--- +slug: "/reference/dotnet/signal-wire.rest.namespaces/logs" +title: "Logs" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.Logs" + parent: "SignalWire.REST.Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Logs.cs" + visibility: "public" +--- +# `Logs` + +Logs API namespace — message, voice, fax, and conference logs (read-only). + +Mirrors Python `signalwire.rest.namespaces.logs.LogsNamespace`. +Each kind of log lives at a different sub-API path. + +<p>Inherits from <xref href="SignalWire.REST.CrudResource" data-throw-if-not-resolved="false"></xref> so the legacy +``client.Logs.BasePath`` accessor still resolves; the new +Messages/Voice/Fax/Conferences accessors point at the actual per-API +log endpoints.</p> + +## Signature + +```dotnet +public class Logs : CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/signal-wire.rest/crud-resource) + +## Properties + + + + + + + + + +## Methods + +### Logs(HttpClient) + +#### Signature + +```dotnet +public Logs(HttpClient client) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/REST/Namespaces/Logs.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Logs.cs) + +Line 27. + +## Source + +[`src/SignalWire/REST/Namespaces/Logs.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Logs.cs) + +Line 20. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/message-logs/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/message-logs/index.mdx new file mode 100644 index 0000000000..3b4aa08557 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/message-logs/index.mdx @@ -0,0 +1,104 @@ +--- +slug: "/reference/dotnet/signal-wire.rest.namespaces/message-logs" +title: "MessageLogs" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.MessageLogs" + parent: "SignalWire.REST.Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Logs.cs" + visibility: "public" +--- +# `MessageLogs` + +Message log queries. + +## Signature + +```dotnet +public class MessageLogs +``` + +## Properties + + + +## Methods + +### GetAsync(string) + +#### Signature + +```dotnet +public Task> GetAsync(string logId) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Logs.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Logs.cs) + +Line 54. + +*** + +### ListAsync(Dictionary\?) + +#### Signature + +```dotnet +public Task> ListAsync(Dictionary? queryParams = null) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Logs.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Logs.cs) + +Line 51. + +*** + +### MessageLogs(HttpClient, string) + +#### Signature + +```dotnet +public MessageLogs(HttpClient client, string basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/REST/Namespaces/Logs.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Logs.cs) + +Line 41. + +## Source + +[`src/SignalWire/REST/Namespaces/Logs.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Logs.cs) + +Line 36. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/mfa/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/mfa/index.mdx new file mode 100644 index 0000000000..d79e7ed9ed --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/mfa/index.mdx @@ -0,0 +1,132 @@ +--- +slug: "/reference/dotnet/signal-wire.rest.namespaces/mfa" +title: "Mfa" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.Mfa" + parent: "SignalWire.REST.Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs" + visibility: "public" +--- +# `Mfa` + +Multi-Factor Authentication namespace (sms / call / verify dispatch). + +Mirrors Python `signalwire.rest.namespaces.mfa.MfaResource`. +Extends CrudResource so the legacy `client.Mfa.BasePath` / +`client.Mfa.Create` surface keeps working. + +## Signature + +```dotnet +public class Mfa : CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/signal-wire.rest/crud-resource) + +## Methods + +### CallAsync(Dictionary\) + +#### Signature + +```dotnet +public Task> CallAsync(Dictionary kwargs) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 23. + +*** + +### Mfa(HttpClient) + +#### Signature + +```dotnet +public Mfa(HttpClient client) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 18. + +*** + +### SmsAsync(Dictionary\) + +#### Signature + +```dotnet +public Task> SmsAsync(Dictionary kwargs) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 20. + +*** + +### VerifyAsync(string, Dictionary\) + +#### Signature + +```dotnet +public Task> VerifyAsync(string requestId, Dictionary kwargs) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 26. + +## Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 16. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/number-groups/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/number-groups/index.mdx new file mode 100644 index 0000000000..01b28da672 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/number-groups/index.mdx @@ -0,0 +1,191 @@ +--- +slug: "/reference/dotnet/signal-wire.rest.namespaces/number-groups" +title: "NumberGroups" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.NumberGroups" + parent: "SignalWire.REST.Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs" + visibility: "public" +--- +# `NumberGroups` + +Number Groups (CRUD + membership operations; update via PUT). + +Mirrors Python `signalwire.rest.namespaces.number_groups.NumberGroupsResource`. +Note delete\_membership / get\_membership target the top-level +`/api/relay/rest/number_group_memberships/{id}` path, NOT the +nested per-group sub-collection. + +## Signature + +```dotnet +public class NumberGroups : CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/signal-wire.rest/crud-resource) + +## Methods + +### AddMembershipAsync(string, Dictionary\) + +#### Signature + +```dotnet +public Task> AddMembershipAsync(string groupId, Dictionary kwargs) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 90. + +*** + +### DeleteMembershipAsync(string) + +#### Signature + +```dotnet +public Task> DeleteMembershipAsync(string membershipId) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 96. + +*** + +### GetMembershipAsync(string) + +#### Signature + +```dotnet +public Task> GetMembershipAsync(string membershipId) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 93. + +*** + +### ListMembershipsAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> ListMembershipsAsync(string groupId, Dictionary? queryParams = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 87. + +*** + +### NumberGroups(HttpClient) + +#### Signature + +```dotnet +public NumberGroups(HttpClient client) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 80. + +*** + +### UpdateAsync(string, Dictionary\, CancellationToken) + +Update a resource by ID (PUT basePath/\{id\}). + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override Task> UpdateAsync(string id, Dictionary kwargs, CancellationToken cancellationToken = default) +``` + +#### Parameters + + + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 83. + +## Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 78. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/project-tokens/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/project-tokens/index.mdx new file mode 100644 index 0000000000..ab12a3fdc6 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/project-tokens/index.mdx @@ -0,0 +1,124 @@ +--- +slug: "/reference/dotnet/signal-wire.rest.namespaces/project-tokens" +title: "ProjectTokens" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.ProjectTokens" + parent: "SignalWire.REST.Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs" + visibility: "public" +--- +# `ProjectTokens` + +Project API tokens — PATCH for update. + +## Signature + +```dotnet +public class ProjectTokens +``` + +## Methods + +### CreateAsync(Dictionary\) + +#### Signature + +```dotnet +public Task> CreateAsync(Dictionary kwargs) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 136. + +*** + +### DeleteAsync(string) + +#### Signature + +```dotnet +public Task> DeleteAsync(string tokenId) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 142. + +*** + +### ProjectTokens(HttpClient) + +#### Signature + +```dotnet +public ProjectTokens(HttpClient client) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 134. + +*** + +### UpdateAsync(string, Dictionary\) + +#### Signature + +```dotnet +public Task> UpdateAsync(string tokenId, Dictionary kwargs) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 139. + +## Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 130. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/project/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/project/index.mdx new file mode 100644 index 0000000000..7e27a7634e --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/project/index.mdx @@ -0,0 +1,61 @@ +--- +slug: "/reference/dotnet/signal-wire.rest.namespaces/project" +title: "Project" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.Project" + parent: "SignalWire.REST.Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs" + visibility: "public" +--- +# `Project` + +Project namespace — exposes ProjectTokens (PATCH update). + +Mirrors Python `signalwire.rest.namespaces.project.ProjectNamespace`. +Extends CrudResource for the legacy `client.Project.BasePath` test. + +## Signature + +```dotnet +public class Project : CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/signal-wire.rest/crud-resource) + +## Properties + + + +## Methods + +### Project(HttpClient) + +#### Signature + +```dotnet +public Project(HttpClient client) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 124. + +## Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 120. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/queues/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/queues/index.mdx new file mode 100644 index 0000000000..5473a96636 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/queues/index.mdx @@ -0,0 +1,166 @@ +--- +slug: "/reference/dotnet/signal-wire.rest.namespaces/queues" +title: "Queues" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.Queues" + parent: "SignalWire.REST.Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs" + visibility: "public" +--- +# `Queues` + +Queues namespace (Relay queues with member operations). + +Mirrors Python `signalwire.rest.namespaces.queues.QueuesResource`. +Note: per-port adapter mismatches with the legacy CrudResource at +/api/fabric/resources/queues — this lives at /api/relay/rest/queues. + +## Signature + +```dotnet +public class Queues : CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/signal-wire.rest/crud-resource) + +## Methods + +### GetMemberAsync(string, string) + +#### Signature + +```dotnet +public Task> GetMemberAsync(string queueId, string memberId) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 228. + +*** + +### GetNextMemberAsync(string) + +#### Signature + +```dotnet +public Task> GetNextMemberAsync(string queueId) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 225. + +*** + +### ListMembersAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> ListMembersAsync(string queueId, Dictionary? queryParams = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 222. + +*** + +### Queues(HttpClient) + +#### Signature + +```dotnet +public Queues(HttpClient client) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 215. + +*** + +### UpdateAsync(string, Dictionary\, CancellationToken) + +Update a resource by ID (PUT basePath/\{id\}). + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override Task> UpdateAsync(string id, Dictionary kwargs, CancellationToken cancellationToken = default) +``` + +#### Parameters + + + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 218. + +## Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 213. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/recordings/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/recordings/index.mdx new file mode 100644 index 0000000000..afbf3ed292 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/recordings/index.mdx @@ -0,0 +1,57 @@ +--- +slug: "/reference/dotnet/signal-wire.rest.namespaces/recordings" +title: "Recordings" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.Recordings" + parent: "SignalWire.REST.Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs" + visibility: "public" +--- +# `Recordings` + +Recordings namespace (Relay top-level recordings, list/get/delete). + +Mirrors Python `signalwire.rest.namespaces.recordings.RecordingsResource`. +Inherits CrudResource for the standard list/get/delete surface. + +## Signature + +```dotnet +public class Recordings : CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/signal-wire.rest/crud-resource) + +## Methods + +### Recordings(HttpClient) + +#### Signature + +```dotnet +public Recordings(HttpClient client) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 202. + +## Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 200. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/registry-brands/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/registry-brands/index.mdx new file mode 100644 index 0000000000..d3d7d5a5b9 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/registry-brands/index.mdx @@ -0,0 +1,180 @@ +--- +slug: "/reference/dotnet/signal-wire.rest.namespaces/registry-brands" +title: "RegistryBrands" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.RegistryBrands" + parent: "SignalWire.REST.Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs" + visibility: "public" +--- +# `RegistryBrands` + +10DLC brand management. + +## Signature + +```dotnet +public class RegistryBrands +``` + +## Properties + + + +## Methods + +### CreateAsync(Dictionary\) + +#### Signature + +```dotnet +public Task> CreateAsync(Dictionary kwargs) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Registry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs) + +Line 57. + +*** + +### CreateCampaignAsync(string, Dictionary\) + +#### Signature + +```dotnet +public Task> CreateCampaignAsync(string brandId, Dictionary kwargs) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Registry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs) + +Line 66. + +*** + +### GetAsync(string) + +#### Signature + +```dotnet +public Task> GetAsync(string brandId) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Registry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs) + +Line 60. + +*** + +### ListAsync(Dictionary\?) + +#### Signature + +```dotnet +public Task> ListAsync(Dictionary? queryParams = null) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Registry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs) + +Line 54. + +*** + +### ListCampaignsAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> ListCampaignsAsync(string brandId, Dictionary? queryParams = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Registry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs) + +Line 63. + +*** + +### RegistryBrands(HttpClient, string) + +#### Signature + +```dotnet +public RegistryBrands(HttpClient client, string basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/REST/Namespaces/Registry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs) + +Line 43. + +## Source + +[`src/SignalWire/REST/Namespaces/Registry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs) + +Line 38. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/registry-campaigns/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/registry-campaigns/index.mdx new file mode 100644 index 0000000000..c25dbc5b5e --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/registry-campaigns/index.mdx @@ -0,0 +1,184 @@ +--- +slug: "/reference/dotnet/signal-wire.rest.namespaces/registry-campaigns" +title: "RegistryCampaigns" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.RegistryCampaigns" + parent: "SignalWire.REST.Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs" + visibility: "public" +--- +# `RegistryCampaigns` + +10DLC campaign management — update via PUT. + +## Signature + +```dotnet +public class RegistryCampaigns +``` + +## Properties + + + +## Methods + +### CreateOrderAsync(string, Dictionary\) + +#### Signature + +```dotnet +public Task> CreateOrderAsync(string campaignId, Dictionary kwargs) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Registry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs) + +Line 99. + +*** + +### GetAsync(string) + +#### Signature + +```dotnet +public Task> GetAsync(string campaignId) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Registry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs) + +Line 87. + +*** + +### ListNumbersAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> ListNumbersAsync(string campaignId, Dictionary? queryParams = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Registry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs) + +Line 93. + +*** + +### ListOrdersAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> ListOrdersAsync(string campaignId, Dictionary? queryParams = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Registry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs) + +Line 96. + +*** + +### RegistryCampaigns(HttpClient, string) + +#### Signature + +```dotnet +public RegistryCampaigns(HttpClient client, string basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/REST/Namespaces/Registry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs) + +Line 76. + +*** + +### UpdateAsync(string, Dictionary\) + +#### Signature + +```dotnet +public Task> UpdateAsync(string campaignId, Dictionary kwargs) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Registry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs) + +Line 90. + +## Source + +[`src/SignalWire/REST/Namespaces/Registry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs) + +Line 71. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/registry-numbers/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/registry-numbers/index.mdx new file mode 100644 index 0000000000..e15910d7c4 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/registry-numbers/index.mdx @@ -0,0 +1,80 @@ +--- +slug: "/reference/dotnet/signal-wire.rest.namespaces/registry-numbers" +title: "RegistryNumbers" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.RegistryNumbers" + parent: "SignalWire.REST.Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs" + visibility: "public" +--- +# `RegistryNumbers` + +10DLC number assignment management. + +## Signature + +```dotnet +public class RegistryNumbers +``` + +## Properties + + + +## Methods + +### DeleteAsync(string) + +#### Signature + +```dotnet +public Task> DeleteAsync(string numberId) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Registry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs) + +Line 139. + +*** + +### RegistryNumbers(HttpClient, string) + +#### Signature + +```dotnet +public RegistryNumbers(HttpClient client, string basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/REST/Namespaces/Registry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs) + +Line 129. + +## Source + +[`src/SignalWire/REST/Namespaces/Registry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs) + +Line 124. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/registry-orders/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/registry-orders/index.mdx new file mode 100644 index 0000000000..9619246d30 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/registry-orders/index.mdx @@ -0,0 +1,80 @@ +--- +slug: "/reference/dotnet/signal-wire.rest.namespaces/registry-orders" +title: "RegistryOrders" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.RegistryOrders" + parent: "SignalWire.REST.Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs" + visibility: "public" +--- +# `RegistryOrders` + +10DLC assignment order management (read-only). + +## Signature + +```dotnet +public class RegistryOrders +``` + +## Properties + + + +## Methods + +### GetAsync(string) + +#### Signature + +```dotnet +public Task> GetAsync(string orderId) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Registry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs) + +Line 119. + +*** + +### RegistryOrders(HttpClient, string) + +#### Signature + +```dotnet +public RegistryOrders(HttpClient client, string basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/REST/Namespaces/Registry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs) + +Line 109. + +## Source + +[`src/SignalWire/REST/Namespaces/Registry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs) + +Line 104. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/registry/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/registry/index.mdx new file mode 100644 index 0000000000..59e0708fc8 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/registry/index.mdx @@ -0,0 +1,72 @@ +--- +slug: "/reference/dotnet/signal-wire.rest.namespaces/registry" +title: "Registry" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.Registry" + parent: "SignalWire.REST.Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs" + visibility: "public" +--- +# `Registry` + +10DLC Campaign Registry namespace — brands, campaigns, orders, numbers. + +Mirrors Python `signalwire.rest.namespaces.registry.RegistryNamespace` +(everything under /api/relay/rest/registry/beta). + +<p>Inherits from <xref href="SignalWire.REST.CrudResource" data-throw-if-not-resolved="false"></xref> so the legacy +``client.Registry.BasePath`` accessor still resolves; the new +Brands/Campaigns/Orders/Numbers accessors target the per-resource +endpoints under /api/relay/rest/registry/beta.</p> + +## Signature + +```dotnet +public class Registry : CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/signal-wire.rest/crud-resource) + +## Properties + + + + + + + + + +## Methods + +### Registry(HttpClient) + +#### Signature + +```dotnet +public Registry(HttpClient client) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/REST/Namespaces/Registry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs) + +Line 29. + +## Source + +[`src/SignalWire/REST/Namespaces/Registry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs) + +Line 20. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/short-codes/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/short-codes/index.mdx new file mode 100644 index 0000000000..fda2fafb09 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/short-codes/index.mdx @@ -0,0 +1,90 @@ +--- +slug: "/reference/dotnet/signal-wire.rest.namespaces/short-codes" +title: "ShortCodes" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.ShortCodes" + parent: "SignalWire.REST.Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs" + visibility: "public" +--- +# `ShortCodes` + +Short codes (list/get/update — no create/delete; update via PUT). + +Mirrors Python `signalwire.rest.namespaces.short_codes.ShortCodesResource`. +Extends CrudResource — overrides UpdateAsync to use PUT (matching +Python's \_update\_method = "PUT" on this resource). + +## Signature + +```dotnet +public class ShortCodes : CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/signal-wire.rest/crud-resource) + +## Methods + +### ShortCodes(HttpClient) + +#### Signature + +```dotnet +public ShortCodes(HttpClient client) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 63. + +*** + +### UpdateAsync(string, Dictionary\, CancellationToken) + +Update a resource by ID (PUT basePath/\{id\}). + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override Task> UpdateAsync(string id, Dictionary kwargs, CancellationToken cancellationToken = default) +``` + +#### Parameters + + + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 65. + +## Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 61. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/sip-profile/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/sip-profile/index.mdx new file mode 100644 index 0000000000..b79d9de973 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/sip-profile/index.mdx @@ -0,0 +1,111 @@ +--- +slug: "/reference/dotnet/signal-wire.rest.namespaces/sip-profile" +title: "SipProfile" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.SipProfile" + parent: "SignalWire.REST.Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs" + visibility: "public" +--- +# `SipProfile` + +Project SIP profile (singleton resource — get/update only, update via PUT). + +Mirrors Python `signalwire.rest.namespaces.sip_profile.SipProfileResource`. +Extends CrudResource for the legacy `client.SipProfile.BasePath` test +— the Python-parity singleton path is /api/relay/rest/sip\_profile; +the legacy .NET path was /api/relay/rest/sip\_profiles. The legacy +accessor target is preserved while `GetAsync()/UpdateAsync(kwargs)` +hit the singleton path. + +## Signature + +```dotnet +public class SipProfile : CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/signal-wire.rest/crud-resource) + +## Properties + + + Singleton resource path (Python parity). + + +## Methods + +### GetAsync() + +#### Signature + +```dotnet +public Task> GetAsync() +``` + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 47. + +*** + +### SipProfile(HttpClient) + +#### Signature + +```dotnet +public SipProfile(HttpClient client) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 45. + +*** + +### UpdateAsync(Dictionary\) + +#### Signature + +```dotnet +public Task> UpdateAsync(Dictionary kwargs) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 50. + +## Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 40. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/subscribers-helper/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/subscribers-helper/index.mdx new file mode 100644 index 0000000000..9fd4444c16 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/subscribers-helper/index.mdx @@ -0,0 +1,190 @@ +--- +slug: "/reference/dotnet/signal-wire.rest.namespaces/subscribers-helper" +title: "SubscribersHelper" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.SubscribersHelper" + parent: "SignalWire.REST.Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs" + visibility: "public" +--- +# `SubscribersHelper` + +Subscribers helper exposing per-subscriber SIP-endpoint operations. + +Mirrors Python's `SubscribersResource` SIP endpoint methods. + +## Signature + +```dotnet +public class SubscribersHelper +``` + +## Properties + + + +## Methods + +### CreateSipEndpointAsync(string, Dictionary\) + +#### Signature + +```dotnet +public Task> CreateSipEndpointAsync(string subscriberId, Dictionary kwargs) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) + +Line 130. + +*** + +### DeleteSipEndpointAsync(string, string) + +#### Signature + +```dotnet +public Task> DeleteSipEndpointAsync(string subscriberId, string endpointId) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) + +Line 139. + +*** + +### GetSipEndpointAsync(string, string) + +#### Signature + +```dotnet +public Task> GetSipEndpointAsync(string subscriberId, string endpointId) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) + +Line 133. + +*** + +### ListSipEndpointsAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> ListSipEndpointsAsync(string subscriberId, Dictionary? queryParams = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) + +Line 127. + +*** + +### SubscribersHelper(HttpClient, string) + +#### Signature + +```dotnet +public SubscribersHelper(HttpClient client, string basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) + +Line 116. + +*** + +### UpdateSipEndpointAsync(string, string, Dictionary\) + +#### Signature + +```dotnet +public Task> UpdateSipEndpointAsync(string subscriberId, string endpointId, Dictionary kwargs) +``` + +#### Parameters + + + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) + +Line 136. + +## Source + +[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) + +Line 111. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/video-conference-tokens/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/video-conference-tokens/index.mdx new file mode 100644 index 0000000000..9b0eaf7d4f --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/video-conference-tokens/index.mdx @@ -0,0 +1,104 @@ +--- +slug: "/reference/dotnet/signal-wire.rest.namespaces/video-conference-tokens" +title: "VideoConferenceTokens" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.VideoConferenceTokens" + parent: "SignalWire.REST.Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs" + visibility: "public" +--- +# `VideoConferenceTokens` + +Video conference tokens: get + reset. + +## Signature + +```dotnet +public class VideoConferenceTokens +``` + +## Properties + + + +## Methods + +### GetAsync(string) + +#### Signature + +```dotnet +public Task> GetAsync(string tokenId) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 177. + +*** + +### ResetAsync(string) + +#### Signature + +```dotnet +public Task> ResetAsync(string tokenId) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 180. + +*** + +### VideoConferenceTokens(HttpClient, string) + +#### Signature + +```dotnet +public VideoConferenceTokens(HttpClient client, string basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 166. + +## Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 161. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/video-conferences/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/video-conferences/index.mdx new file mode 100644 index 0000000000..b9b09fa7dd --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/video-conferences/index.mdx @@ -0,0 +1,166 @@ +--- +slug: "/reference/dotnet/signal-wire.rest.namespaces/video-conferences" +title: "VideoConferences" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.VideoConferences" + parent: "SignalWire.REST.Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs" + visibility: "public" +--- +# `VideoConferences` + +Video conferences (CRUD with PUT update + tokens/streams subresources). + +## Signature + +```dotnet +public class VideoConferences : CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/signal-wire.rest/crud-resource) + +## Methods + +### CreateStreamAsync(string, Dictionary\) + +#### Signature + +```dotnet +public Task> CreateStreamAsync(string conferenceId, Dictionary kwargs) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 156. + +*** + +### ListConferenceTokensAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> ListConferenceTokensAsync(string conferenceId, Dictionary? queryParams = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 150. + +*** + +### ListStreamsAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> ListStreamsAsync(string conferenceId, Dictionary? queryParams = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 153. + +*** + +### UpdateAsync(string, Dictionary\, CancellationToken) + +Update a resource by ID (PUT basePath/\{id\}). + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override Task> UpdateAsync(string id, Dictionary kwargs, CancellationToken cancellationToken = default) +``` + +#### Parameters + + + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 146. + +*** + +### VideoConferences(HttpClient, string) + +#### Signature + +```dotnet +public VideoConferences(HttpClient client, string basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 144. + +## Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 142. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/video-room-recordings/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/video-room-recordings/index.mdx new file mode 100644 index 0000000000..e5ac24f8a1 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/video-room-recordings/index.mdx @@ -0,0 +1,154 @@ +--- +slug: "/reference/dotnet/signal-wire.rest.namespaces/video-room-recordings" +title: "VideoRoomRecordings" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.VideoRoomRecordings" + parent: "SignalWire.REST.Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs" + visibility: "public" +--- +# `VideoRoomRecordings` + +Video room recordings: list, get, delete, list\_events. + +## Signature + +```dotnet +public class VideoRoomRecordings +``` + +## Properties + + + +## Methods + +### DeleteAsync(string) + +#### Signature + +```dotnet +public Task> DeleteAsync(string recordingId) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 134. + +*** + +### GetAsync(string) + +#### Signature + +```dotnet +public Task> GetAsync(string recordingId) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 131. + +*** + +### ListAsync(Dictionary\?) + +#### Signature + +```dotnet +public Task> ListAsync(Dictionary? queryParams = null) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 128. + +*** + +### ListEventsAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> ListEventsAsync(string recordingId, Dictionary? queryParams = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 137. + +*** + +### VideoRoomRecordings(HttpClient, string) + +#### Signature + +```dotnet +public VideoRoomRecordings(HttpClient client, string basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 117. + +## Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 112. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/video-room-sessions/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/video-room-sessions/index.mdx new file mode 100644 index 0000000000..cf04517a2e --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/video-room-sessions/index.mdx @@ -0,0 +1,182 @@ +--- +slug: "/reference/dotnet/signal-wire.rest.namespaces/video-room-sessions" +title: "VideoRoomSessions" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.VideoRoomSessions" + parent: "SignalWire.REST.Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs" + visibility: "public" +--- +# `VideoRoomSessions` + +Video room sessions: list, get, list\_events/\_members/\_recordings. + +## Signature + +```dotnet +public class VideoRoomSessions +``` + +## Properties + + + +## Methods + +### GetAsync(string) + +#### Signature + +```dotnet +public Task> GetAsync(string sessionId) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 98. + +*** + +### ListAsync(Dictionary\?) + +#### Signature + +```dotnet +public Task> ListAsync(Dictionary? queryParams = null) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 95. + +*** + +### ListEventsAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> ListEventsAsync(string sessionId, Dictionary? queryParams = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 101. + +*** + +### ListMembersAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> ListMembersAsync(string sessionId, Dictionary? queryParams = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 104. + +*** + +### ListRecordingsAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> ListRecordingsAsync(string sessionId, Dictionary? queryParams = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 107. + +*** + +### VideoRoomSessions(HttpClient, string) + +#### Signature + +```dotnet +public VideoRoomSessions(HttpClient client, string basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 84. + +## Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 79. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/video-room-tokens/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/video-room-tokens/index.mdx new file mode 100644 index 0000000000..f09a75fc78 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/video-room-tokens/index.mdx @@ -0,0 +1,80 @@ +--- +slug: "/reference/dotnet/signal-wire.rest.namespaces/video-room-tokens" +title: "VideoRoomTokens" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.VideoRoomTokens" + parent: "SignalWire.REST.Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs" + visibility: "public" +--- +# `VideoRoomTokens` + +Video room tokens (create-only). + +## Signature + +```dotnet +public class VideoRoomTokens +``` + +## Properties + + + +## Methods + +### CreateAsync(Dictionary\) + +#### Signature + +```dotnet +public Task> CreateAsync(Dictionary kwargs) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 74. + +*** + +### VideoRoomTokens(HttpClient, string) + +#### Signature + +```dotnet +public VideoRoomTokens(HttpClient client, string basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 66. + +## Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 61. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/video-rooms/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/video-rooms/index.mdx new file mode 100644 index 0000000000..bf3ee02bba --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/video-rooms/index.mdx @@ -0,0 +1,140 @@ +--- +slug: "/reference/dotnet/signal-wire.rest.namespaces/video-rooms" +title: "VideoRooms" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.VideoRooms" + parent: "SignalWire.REST.Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs" + visibility: "public" +--- +# `VideoRooms` + +Video rooms (CRUD + streams sub-resource). + +## Signature + +```dotnet +public class VideoRooms : CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/signal-wire.rest/crud-resource) + +## Methods + +### CreateStreamAsync(string, Dictionary\) + +#### Signature + +```dotnet +public Task> CreateStreamAsync(string roomId, Dictionary kwargs) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 56. + +*** + +### ListStreamsAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> ListStreamsAsync(string roomId, Dictionary? queryParams = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 53. + +*** + +### UpdateAsync(string, Dictionary\, CancellationToken) + +Update via PUT (matching Python's \_update\_method = "PUT"). + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override Task> UpdateAsync(string id, Dictionary kwargs, CancellationToken cancellationToken = default) +``` + +#### Parameters + + + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 49. + +*** + +### VideoRooms(HttpClient, string) + +#### Signature + +```dotnet +public VideoRooms(HttpClient client, string basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 46. + +## Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 44. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/video-streams/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/video-streams/index.mdx new file mode 100644 index 0000000000..b31adf13aa --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/video-streams/index.mdx @@ -0,0 +1,130 @@ +--- +slug: "/reference/dotnet/signal-wire.rest.namespaces/video-streams" +title: "VideoStreams" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.VideoStreams" + parent: "SignalWire.REST.Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs" + visibility: "public" +--- +# `VideoStreams` + +Video streams: get, update (PUT), delete. + +## Signature + +```dotnet +public class VideoStreams +``` + +## Properties + + + +## Methods + +### DeleteAsync(string) + +#### Signature + +```dotnet +public Task> DeleteAsync(string streamId) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 206. + +*** + +### GetAsync(string) + +#### Signature + +```dotnet +public Task> GetAsync(string streamId) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 200. + +*** + +### UpdateAsync(string, Dictionary\) + +#### Signature + +```dotnet +public Task> UpdateAsync(string streamId, Dictionary kwargs) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 203. + +*** + +### VideoStreams(HttpClient, string) + +#### Signature + +```dotnet +public VideoStreams(HttpClient client, string basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 190. + +## Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 185. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/video/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/video/index.mdx new file mode 100644 index 0000000000..0cc7ae60e7 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/video/index.mdx @@ -0,0 +1,78 @@ +--- +slug: "/reference/dotnet/signal-wire.rest.namespaces/video" +title: "Video" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.Video" + parent: "SignalWire.REST.Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs" + visibility: "public" +--- +# `Video` + +Video API namespace. + +Mirrors Python `signalwire.rest.namespaces.video.VideoNamespace` — +rooms, room sessions, room recordings, conferences, conference tokens, +streams. + +<p>The legacy ``client.Video.List() / Create / Get / Delete`` surface +(which targeted ``/api/video/rooms``) is preserved by inheriting from +<xref href="SignalWire.REST.CrudResource" data-throw-if-not-resolved="false"></xref>.</p> + +## Signature + +```dotnet +public class Video : CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/signal-wire.rest/crud-resource) + +## Properties + + + + + + + + + + + + + + + +## Methods + +### Video(HttpClient) + +#### Signature + +```dotnet +public Video(HttpClient client) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 32. + +## Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 20. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/voice-logs/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/voice-logs/index.mdx new file mode 100644 index 0000000000..6d92359dff --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/voice-logs/index.mdx @@ -0,0 +1,130 @@ +--- +slug: "/reference/dotnet/signal-wire.rest.namespaces/voice-logs" +title: "VoiceLogs" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.VoiceLogs" + parent: "SignalWire.REST.Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Logs.cs" + visibility: "public" +--- +# `VoiceLogs` + +Voice log queries with events sub-collection. + +## Signature + +```dotnet +public class VoiceLogs +``` + +## Properties + + + +## Methods + +### GetAsync(string) + +#### Signature + +```dotnet +public Task> GetAsync(string logId) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Logs.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Logs.cs) + +Line 78. + +*** + +### ListAsync(Dictionary\?) + +#### Signature + +```dotnet +public Task> ListAsync(Dictionary? queryParams = null) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Logs.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Logs.cs) + +Line 75. + +*** + +### ListEventsAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> ListEventsAsync(string logId, Dictionary? queryParams = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Logs.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Logs.cs) + +Line 81. + +*** + +### VoiceLogs(HttpClient, string) + +#### Signature + +```dotnet +public VoiceLogs(HttpClient client, string basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/REST/Namespaces/Logs.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Logs.cs) + +Line 64. + +## Source + +[`src/SignalWire/REST/Namespaces/Logs.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Logs.cs) + +Line 59. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest/crud-resource/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest/crud-resource/index.mdx new file mode 100644 index 0000000000..1fcd8d3e42 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.rest/crud-resource/index.mdx @@ -0,0 +1,239 @@ +--- +slug: "/reference/dotnet/signal-wire.rest/crud-resource" +title: "CrudResource" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.CrudResource" + parent: "SignalWire.REST" + module: "SignalWire.REST" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/CrudResource.cs" + visibility: "public" +--- +# `CrudResource` + +Generic CRUD wrapper around an <xref href="SignalWire.REST.HttpClient" data-throw-if-not-resolved="false"></xref> and a base API path. + +Provides List / Create / Get / Update / Delete for any REST resource that +follows the standard SignalWire collection+item URL pattern. + +## Signature + +```dotnet +public class CrudResource +``` + +## Properties + + + + + +## Methods + +### CreateAsync(Dictionary\, CancellationToken) + +Create a new resource (POST basePath). + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual Task> CreateAsync(Dictionary data, CancellationToken cancellationToken = default) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/CrudResource.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/CrudResource.cs) + +Line 35. + +*** + +### CrudResource(HttpClient, string) + +#### Signature + +```dotnet +public CrudResource(HttpClient client, string basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/REST/CrudResource.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/CrudResource.cs) + +Line 13. + +*** + +### DeleteAsync(string, CancellationToken) + +Delete a resource by ID (DELETE basePath/\{id\}). + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual Task> DeleteAsync(string id, CancellationToken cancellationToken = default) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/CrudResource.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/CrudResource.cs) + +Line 58. + +*** + +### GetAsync(string, CancellationToken) + +Retrieve a single resource by ID (GET basePath/\{id\}). + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual Task> GetAsync(string id, CancellationToken cancellationToken = default) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/CrudResource.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/CrudResource.cs) + +Line 43. + +*** + +### ListAsync(Dictionary\?, CancellationToken) + +List resources (GET basePath). + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual Task> ListAsync(Dictionary? queryParams = null, CancellationToken cancellationToken = default) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/CrudResource.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/CrudResource.cs) + +Line 27. + +*** + +### Path(params string\[]) + +Build a full path by appending segments to the base path. + +#### Signature + +```dotnet +protected string Path(params string[] parts) +``` + +#### Parameters + + + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/REST/CrudResource.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/CrudResource.cs) + +Line 20. + +*** + +### UpdateAsync(string, Dictionary\, CancellationToken) + +Update a resource by ID (PUT basePath/\{id\}). + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual Task> UpdateAsync(string id, Dictionary data, CancellationToken cancellationToken = default) +``` + +#### Parameters + + + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/CrudResource.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/CrudResource.cs) + +Line 50. + +## Source + +[`src/SignalWire/REST/CrudResource.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/CrudResource.cs) + +Line 8. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest/crud-with-addresses/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest/crud-with-addresses/index.mdx new file mode 100644 index 0000000000..d2755b311c --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.rest/crud-with-addresses/index.mdx @@ -0,0 +1,86 @@ +--- +slug: "/reference/dotnet/signal-wire.rest/crud-with-addresses" +title: "CrudWithAddresses" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.CrudWithAddresses" + parent: "SignalWire.REST" + module: "SignalWire.REST" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/CrudWithAddresses.cs" + visibility: "public" +--- +# `CrudWithAddresses` + +## Signature + +```dotnet +public class CrudWithAddresses : CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/signal-wire.rest/crud-resource) + +## Methods + +### CrudWithAddresses(HttpClient, string) + +#### Signature + +```dotnet +public CrudWithAddresses(HttpClient client, string basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/REST/CrudWithAddresses.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/CrudWithAddresses.cs) + +Line 13. + +*** + +### ListAddressesAsync(string, Dictionary\?) + +List the addresses sub-collection for a given resource. +(Python parity: +`CrudWithAddresses.list_addresses(resource_id, **params)`.) + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual Task> ListAddressesAsync(string resourceId, Dictionary? queryParams = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/CrudWithAddresses.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/CrudWithAddresses.cs) + +Line 19. + +## Source + +[`src/SignalWire/REST/CrudWithAddresses.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/CrudWithAddresses.cs) + +Line 11. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest/http-client/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest/http-client/index.mdx new file mode 100644 index 0000000000..5cfcfbf28f --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.rest/http-client/index.mdx @@ -0,0 +1,315 @@ +--- +slug: "/reference/dotnet/signal-wire.rest/http-client" +title: "HttpClient" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.HttpClient" + parent: "SignalWire.REST" + module: "SignalWire.REST" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/HttpClient.cs" + visibility: "public" +--- +# `HttpClient` + +Low-level HTTP client for SignalWire REST APIs. + +Uses <xref href="System.Net.Http.HttpClient" data-throw-if-not-resolved="false"></xref> with Basic Auth, +and returns parsed JSON responses as dictionaries. + +## Signature + +```dotnet +public class HttpClient : IDisposable +``` + +## Inheritance + +**Implements:** `System.IDisposable` + +## Properties + + + + + + + + + +## Methods + +### DeleteAsync(string, CancellationToken) + +DELETE. + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual Task> DeleteAsync(string path, CancellationToken cancellationToken = default) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/HttpClient.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/HttpClient.cs) + +Line 91. + +*** + +### Dispose + +Release the underlying <xref href="System.Net.Http.HttpClient" data-throw-if-not-resolved="false"></xref> — but +ONLY when this object created it (<code>\_ownsHttp</code>). A caller-injected +HttpClient is left untouched: its lifetime belongs to whoever passed it +in. Idempotent. + +#### Signature + + + + ```dotnet + public void Dispose() + ``` + + + + ```dotnet + protected virtual void Dispose(bool disposing) + ``` + + + +#### Parameters (Overload 2) + + + +#### Source + +[`src/SignalWire/REST/HttpClient.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/HttpClient.cs) + +Line 280. + +*** + +### GetAsync(string, Dictionary\?, CancellationToken) + +GET with optional query-string parameters. + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual Task> GetAsync(string path, Dictionary? queryParams = null, CancellationToken cancellationToken = default) +``` + +#### Parameters + + + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/HttpClient.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/HttpClient.cs) + +Line 55. + +*** + +### HttpClient + +#### Signature + + + + ```dotnet + public HttpClient(string projectId, string token, string baseUrl) + ``` + + + + ```dotnet + public HttpClient(string projectId, string token, string baseUrl, HttpClient? httpClient) + ``` + + + +#### Parameters (Overload 1) + + + + + + + +#### Parameters (Overload 2) + + + + + + + + + +#### Source + +[`src/SignalWire/REST/HttpClient.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/HttpClient.cs) + +Line 23. + +*** + +### ListAllAsync(string, Dictionary\?, CancellationToken) + +Return pages by following "next" links automatically. +Expects \{ "data": \[...], "links": \{ "next": "..." \} \}. + +#### Signature + +```dotnet +public IAsyncEnumerable>> ListAllAsync(string path, Dictionary? queryParams = null, CancellationToken cancellationToken = default) +``` + +#### Parameters + + + + + + + +#### Returns + +`IAsyncEnumerable>>` + +#### Source + +[`src/SignalWire/REST/HttpClient.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/HttpClient.cs) + +Line 106. + +*** + +### PatchAsync(string, Dictionary\?, CancellationToken) + +PATCH with JSON body. + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual Task> PatchAsync(string path, Dictionary? data = null, CancellationToken cancellationToken = default) +``` + +#### Parameters + + + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/HttpClient.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/HttpClient.cs) + +Line 82. + +*** + +### PostAsync(string, Dictionary\?, CancellationToken) + +POST with JSON body. + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual Task> PostAsync(string path, Dictionary? data = null, CancellationToken cancellationToken = default) +``` + +#### Parameters + + + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/HttpClient.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/HttpClient.cs) + +Line 64. + +*** + +### PutAsync(string, Dictionary\?, CancellationToken) + +PUT with JSON body. + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual Task> PutAsync(string path, Dictionary? data = null, CancellationToken cancellationToken = default) +``` + +#### Parameters + + + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/HttpClient.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/HttpClient.cs) + +Line 73. + +## Source + +[`src/SignalWire/REST/HttpClient.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/HttpClient.cs) + +Line 12. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest/index.mdx new file mode 100644 index 0000000000..7077094d91 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.rest/index.mdx @@ -0,0 +1,38 @@ +--- +slug: "/reference/dotnet/signal-wire.rest" +title: "SignalWire.REST" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "module" + language: "dotnet" + qualified_name: "SignalWire.REST" +--- +# `SignalWire.REST` + +## Classes + + + + Generic CRUD wrapper around an <xref href="SignalWire.REST.HttpClient" data-throw-if-not-resolved="false"></xref> and a base API path. Provides List / Create / Get / Update / Delete for any REST resource that follows the standard SignalWire collection+item URL pattern. + + + + + + Low-level HTTP client for SignalWire REST APIs. Uses <xref href="System.Net.Http.HttpClient" data-throw-if-not-resolved="false"></xref> with Basic Auth, and returns parsed JSON responses as dictionaries. + + + + Walks paged HTTP responses by following `links.next` cursors. Mirrors Python `signalwire.rest._pagination.PaginatedIterator` — constructor records inputs without fetching; iteration triggers the first fetch and continues until a page is returned without a `links.next` cursor. + + + + Top-level SignalWire REST client. Provides lazy access to every API namespace (fabric, calling, phone\_numbers, datasphere, video, compat, etc.). Credentials can be supplied explicitly or pulled from environment variables. + + + + Exception thrown when a SignalWire REST API call returns a non-2xx status or encounters a transport-level error. + + diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest/paginated-iterator/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest/paginated-iterator/index.mdx new file mode 100644 index 0000000000..d718d3fba0 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.rest/paginated-iterator/index.mdx @@ -0,0 +1,131 @@ +--- +slug: "/reference/dotnet/signal-wire.rest/paginated-iterator" +title: "PaginatedIterator" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.PaginatedIterator" + parent: "SignalWire.REST" + module: "SignalWire.REST" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/PaginatedIterator.cs" + visibility: "public" +--- +# `PaginatedIterator` + +Walks paged HTTP responses by following `links.next` cursors. + +Mirrors Python `signalwire.rest._pagination.PaginatedIterator` — +constructor records inputs without fetching; iteration triggers +the first fetch and continues until a page is returned without a +`links.next` cursor. + +## Signature + +```dotnet +public class PaginatedIterator : IAsyncEnumerable> +``` + +## Inheritance + +**Implements:** `IAsyncEnumerable>` + +## Properties + + + + + + + + + + + + + + + +## Methods + +### GetAsyncEnumerator(CancellationToken) + +Async-enumerable adapter so callers can write +`await foreach (var item in iterator)`. + +#### Signature + +```dotnet +public IAsyncEnumerator> GetAsyncEnumerator(CancellationToken cancellationToken = default) +``` + +#### Parameters + + + +#### Returns + +`IAsyncEnumerator>` + +#### Source + +[`src/SignalWire/REST/PaginatedIterator.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/PaginatedIterator.cs) + +Line 131. + +*** + +### NextAsync() + +Returns the next item, or throws InvalidOperationException +when exhausted (mirroring Python's StopIteration). + +#### Signature + +```dotnet +public Task> NextAsync() +``` + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/PaginatedIterator.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/PaginatedIterator.cs) + +Line 55. + +*** + +### PaginatedIterator(HttpClient, string, Dictionary\?, string) + +#### Signature + +```dotnet +public PaginatedIterator(HttpClient http, string path, Dictionary? @params = null, string dataKey = "data") +``` + +#### Parameters + + + + + + + + + +#### Source + +[`src/SignalWire/REST/PaginatedIterator.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/PaginatedIterator.cs) + +Line 33. + +## Source + +[`src/SignalWire/REST/PaginatedIterator.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/PaginatedIterator.cs) + +Line 17. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest/rest-client/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest/rest-client/index.mdx new file mode 100644 index 0000000000..06369389c9 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.rest/rest-client/index.mdx @@ -0,0 +1,199 @@ +--- +slug: "/reference/dotnet/signal-wire.rest/rest-client" +title: "RestClient" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.RestClient" + parent: "SignalWire.REST" + module: "SignalWire.REST" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/RestClient.cs" + visibility: "public" +--- +# `RestClient` + +Top-level SignalWire REST client. + +Provides lazy access to every API namespace (fabric, calling, +phone\_numbers, datasphere, video, compat, etc.). Credentials can be +supplied explicitly or pulled from environment variables. + +## Signature + +```dotnet +public class RestClient : IDisposable +``` + +## Inheritance + +**Implements:** `System.IDisposable` + +## Properties + + + Addresses. + + + + + + Calling API (37 call-control commands). + + + + Chat tokens. + + + + Compatibility (Twilio-compatible LaML) API. + + + + Datasphere documents. + + + + Fabric API (sub-resources: subscribers, sip\_endpoints, call\_flows, ...). + + + + + + Imported phone numbers (create only). + + + + Logs (messages, voice, fax, conferences). + + + + Phone number lookup. + + + + Multi-factor authentication (sms/call/verify dispatch). + + + + Number groups (with membership operations). + + + + Phone numbers. + + + + Project management. + + + + + + PubSub tokens. + + + + Queues (Relay queues at /api/relay/rest/queues with member ops). + + + + Recordings (Relay recordings at /api/relay/rest/recordings). + + + + Registry (10DLC brands, campaigns, orders, numbers). + + + + Short codes (PUT for update). + + + + SIP profile (singleton at /api/relay/rest/sip\_profile; legacy plural-path /api/relay/rest/sip\_profiles preserved for existing tests via BasePath). + + + + + + + + Verified callers. + + + + Video rooms (Python-parity entry-point with sub-namespaces). + + +## Methods + +### Dispose + +Dispose the owned REST <xref href="SignalWire.REST.HttpClient" data-throw-if-not-resolved="false"></xref> (which, in turn, only +disposes its inner <xref href="System.Net.Http.HttpClient" data-throw-if-not-resolved="false"></xref> because it +created it). <code>RestClient</code> always constructs its own transport, so +it always owns it. Idempotent. + +#### Signature + + + + ```dotnet + public void Dispose() + ``` + + + + ```dotnet + protected virtual void Dispose(bool disposing) + ``` + + + +#### Parameters (Overload 2) + + + +#### Source + +[`src/SignalWire/REST/RestClient.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/RestClient.cs) + +Line 176. + +*** + +### RestClient(string, string, string) + +#### Signature + +```dotnet +public RestClient(string projectId = "", string token = "", string space = "") +``` + +#### Parameters + + + Project ID (falls back to SIGNALWIRE\_PROJECT\_ID env var). + + + + API token (falls back to SIGNALWIRE\_API\_TOKEN env var). + + + + Space host (falls back to SIGNALWIRE\_SPACE env var). + + +#### Source + +[`src/SignalWire/REST/RestClient.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/RestClient.cs) + +Line 48. + +## Source + +[`src/SignalWire/REST/RestClient.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/RestClient.cs) + +Line 11. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest/signal-wire-rest-error/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest/signal-wire-rest-error/index.mdx new file mode 100644 index 0000000000..fe48a9628e --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.rest/signal-wire-rest-error/index.mdx @@ -0,0 +1,117 @@ +--- +slug: "/reference/dotnet/signal-wire.rest/signal-wire-rest-error" +title: "SignalWireRestError" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.SignalWireRestError" + parent: "SignalWire.REST" + module: "SignalWire.REST" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/SignalWireRestError.cs" + visibility: "public" +--- +# `SignalWireRestError` + +Exception thrown when a SignalWire REST API call returns a non-2xx status +or encounters a transport-level error. + +**Modifiers:** `sealed` + +## Signature + +```dotnet +public sealed class SignalWireRestError : Exception, ISerializable +``` + +## Inheritance + +**Extends:** `System.Exception` + +**Implements:** `System.Runtime.Serialization.ISerializable` + +## Properties + + + Raw response body from the server. + + + + HTTP status code from the response (0 for transport errors). + + +## Methods + +### SignalWireRestError + +#### Signature + + + + ```dotnet + public SignalWireRestError(string message, int statusCode, string responseBody) + ``` + + + + ```dotnet + public SignalWireRestError(string message, int statusCode, string responseBody, Exception innerException) + ``` + + + +#### Parameters (Overload 1) + + + + + + + +#### Parameters (Overload 2) + + + + + + + + + +#### Source + +[`src/SignalWire/REST/SignalWireRestError.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/SignalWireRestError.cs) + +Line 14. + +*** + +### ToString() + +Creates and returns a string representation of the current exception. + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override string ToString() +``` + +#### Returns + +`string` — A string representation of the current exception. + +#### Source + +[`src/SignalWire/REST/SignalWireRestError.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/SignalWireRestError.cs) + +Line 28. + +## Source + +[`src/SignalWire/REST/SignalWireRestError.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/SignalWireRestError.cs) + +Line 6. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.security/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.security/index.mdx new file mode 100644 index 0000000000..1ec82412f2 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.security/index.mdx @@ -0,0 +1,28 @@ +--- +slug: "/reference/dotnet/signal-wire.security" +title: "SignalWire.Security" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "module" + language: "dotnet" + qualified_name: "SignalWire.Security" +--- +# `SignalWire.Security` + +## Classes + + + + Generates and validates HMAC-SHA256 signed session tokens for SWAIG function calls. Each instance holds an independent 32-byte random secret. + + + + HTTP middleware that validates the <code>X-SignalWire-Signature</code> header on incoming requests using <xref href="SignalWire.Security.WebhookValidator" data-throw-if-not-resolved="false"></xref>. Designed for the .NET port's HttpListener-based dispatch surface; adapts the same contract Python's FastAPI dependency provides. <p>Use <xref href="SignalWire.Security.WebhookValidationMiddleware.Validate(System.String%2cSystem.String%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.String%7d%2cSystem.String%2cSystem.String%2cSystem.Int32)" data-throw-if-not-resolved="false"></xref> to short-circuit invalid requests with 403 before they reach an agent's POST handler. Returns null on success so the caller continues to dispatch.</p> <p>This is intentionally a non-async type: the underlying validator is pure CPU work and the dispatch surface uses synchronous strings.</p> + + + + Validates SignalWire webhook signatures for both Scheme A (RELAY/JSON, hex HMAC-SHA1 over <code>url + rawBody</code>) and Scheme B (Compat/cXML form, base64 HMAC-SHA1 over <code>url + sortedFormParams</code>) per <code>porting-sdk/webhooks.md</code>. The contract is byte-identical across all SignalWire SDK ports — see the cross-port test vectors in the spec. + + diff --git a/fern/products/sdk-reference/dotnet/signal-wire.security/session-manager/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.security/session-manager/index.mdx new file mode 100644 index 0000000000..8f3a9e3b2a --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.security/session-manager/index.mdx @@ -0,0 +1,158 @@ +--- +slug: "/reference/dotnet/signal-wire.security/session-manager" +title: "SessionManager" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Security.SessionManager" + parent: "SignalWire.Security" + module: "SignalWire.Security" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Security/SessionManager.cs" + visibility: "public" +--- +# `SessionManager` + +Generates and validates HMAC-SHA256 signed session tokens for SWAIG function calls. +Each instance holds an independent 32-byte random secret. + +**Modifiers:** `sealed` + +## Signature + +```dotnet +public sealed class SessionManager +``` + +## Properties + + + Default token lifetime in seconds. + + + + Get the configured token expiry duration in seconds. + + +## Methods + +### CreateSession(string?) + +Create or confirm a session, returning the call ID. + +#### Signature + +```dotnet +public string CreateSession(string? callId = null) +``` + +#### Parameters + + + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/Security/SessionManager.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Security/SessionManager.cs) + +Line 30. + +*** + +### CreateToken(string, string) + +Generate an HMAC-SHA256 signed token bound to a function name and call ID. + +#### Signature + +```dotnet +public string CreateToken(string functionName, string callId) +``` + +#### Parameters + + + The function name to bind into the token. + + + + The call ID to bind into the token. + + +#### Returns + +`string` — A base64url-encoded token string. + +#### Source + +[`src/SignalWire/Security/SessionManager.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Security/SessionManager.cs) + +Line 41. + +*** + +### SessionManager(int) + +#### Signature + +```dotnet +public SessionManager(int tokenExpirySecs = 3600) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Security/SessionManager.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Security/SessionManager.cs) + +Line 17. + +*** + +### ValidateToken(string, string, string) + +Validate a token against the expected function name and call ID. +All comparisons use timing-safe equality checks to prevent side-channel attacks. + +#### Signature + +```dotnet +public bool ValidateToken(string functionName, string callId, string token) +``` + +#### Parameters + + + The expected function name. + + + + The expected call ID. + + + + The base64url-encoded token to validate. + + +#### Returns + +`bool` — <code>true</code> if the token is valid and not expired. + +#### Source + +[`src/SignalWire/Security/SessionManager.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Security/SessionManager.cs) + +Line 61. + +## Source + +[`src/SignalWire/Security/SessionManager.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Security/SessionManager.cs) + +Line 9. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.security/webhook-validation-middleware/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.security/webhook-validation-middleware/index.mdx new file mode 100644 index 0000000000..be5b060325 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.security/webhook-validation-middleware/index.mdx @@ -0,0 +1,193 @@ +--- +slug: "/reference/dotnet/signal-wire.security/webhook-validation-middleware" +title: "WebhookValidationMiddleware" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Security.WebhookValidationMiddleware" + parent: "SignalWire.Security" + module: "SignalWire.Security" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Security/WebhookValidationMiddleware.cs" + visibility: "public" +--- +# `WebhookValidationMiddleware` + +HTTP middleware that validates the <code>X-SignalWire-Signature</code> header +on incoming requests using <xref href="SignalWire.Security.WebhookValidator" data-throw-if-not-resolved="false"></xref>. Designed for +the .NET port's HttpListener-based dispatch surface; adapts the same +contract Python's FastAPI dependency provides. + +<p>Use <xref href="SignalWire.Security.WebhookValidationMiddleware.Validate(System.String%2cSystem.String%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.String%7d%2cSystem.String%2cSystem.String%2cSystem.Int32)" data-throw-if-not-resolved="false"></xref> to short-circuit invalid requests with +403 before they reach an agent's POST handler. Returns null on success +so the caller continues to dispatch.</p> + +<p>This is intentionally a non-async type: the underlying validator +is pure CPU work and the dispatch surface uses synchronous strings.</p> + +**Modifiers:** `sealed` + +## Signature + +```dotnet +public sealed class WebhookValidationMiddleware +``` + +## Properties + + + The canonical SignalWire signature header name. + + + + Legacy alias for cXML/Twilio-compat callers. + + +## Methods + +### ExtractSignatureHeader(Dictionary\) + +Pull <code>X-SignalWire-Signature</code> from request headers, or the <code>X-Twilio-Signature</code> alias for cXML/Compat callers. Header +lookups are case-insensitive (proxies / browsers vary). + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static string? ExtractSignatureHeader(Dictionary headers) +``` + +#### Parameters + + + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/Security/WebhookValidationMiddleware.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Security/WebhookValidationMiddleware.cs) + +Line 134. + +*** + +### ReconstructUrl(Dictionary\, string, string?, int) + +Reconstruct the public URL SignalWire POSTed to. Resolution order: + +<ol><li><code>SWML_PROXY_URL_BASE</code> env var (joined with path + query).</li><li><code>X-Forwarded-Proto</code> / <code>X-Forwarded-Host</code> headers + when <code>trustProxy=true</code>.</li><li><code>http://hostFallback:portFallback{path}</code> as a last-resort + local construction.</li></ol> + +#### Signature + +```dotnet +public string ReconstructUrl(Dictionary headers, string path, string? hostFallback = null, int portFallback = 0) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/Security/WebhookValidationMiddleware.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Security/WebhookValidationMiddleware.cs) + +Line 154. + +*** + +### Validate(string, string, Dictionary\, string?, string?, int) + +Validate the incoming request and return a 403 short-circuit +response if the signature is missing / invalid. Returns null when +the request passed validation — caller proceeds to the real handler. + +**Remarks:** The raw body is the caller's <code class="paramref">body</code> string verbatim; +the caller is expected to capture the body once (before any JSON / +form parser consumes the stream) and pass it here. The +HttpListenerContext dispatcher in <code>SignalWire.SWML.Service.Run</code> already does this, so AgentBase +and standalone HttpListener integrations can wire it in directly. + +#### Signature + +```dotnet +public (int Status, Dictionary Headers, string Body)? Validate(string method, string path, Dictionary headers, string? body, string? hostFallback = null, int portFallback = 0) +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`System.Nullable,string>>` + +#### Source + +[`src/SignalWire/Security/WebhookValidationMiddleware.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Security/WebhookValidationMiddleware.cs) + +Line 96. + +*** + +### WebhookValidationMiddleware(string, bool) + +Construct a middleware bound to a single signing key. + +#### Signature + +```dotnet +public WebhookValidationMiddleware(string signingKey, bool trustProxy = false) +``` + +#### Parameters + + + The customer's Signing Key from the SignalWire Dashboard. Required, non-empty. Treated as a secret — never logged or echoed. + + + + When true, honor <code>X-Forwarded-Proto</code> / <code>X-Forwarded-Host</code> when reconstructing the URL. Default false because proxy headers are spoofable; opt in only when you control the proxy chain. + + +#### Throws + +- `System.ArgumentException` — Thrown when <code class="paramref">signingKey</code> is null or empty. + +#### Source + +[`src/SignalWire/Security/WebhookValidationMiddleware.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Security/WebhookValidationMiddleware.cs) + +Line 73. + +## Source + +[`src/SignalWire/Security/WebhookValidationMiddleware.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Security/WebhookValidationMiddleware.cs) + +Line 47. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.security/webhook-validator/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.security/webhook-validator/index.mdx new file mode 100644 index 0000000000..6723f01696 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.security/webhook-validator/index.mdx @@ -0,0 +1,127 @@ +--- +slug: "/reference/dotnet/signal-wire.security/webhook-validator" +title: "WebhookValidator" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Security.WebhookValidator" + parent: "SignalWire.Security" + module: "SignalWire.Security" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Security/WebhookValidator.cs" + visibility: "public" +--- +# `WebhookValidator` + +Validates SignalWire webhook signatures for both Scheme A (RELAY/JSON, +hex HMAC-SHA1 over <code>url + rawBody</code>) and Scheme B (Compat/cXML form, +base64 HMAC-SHA1 over <code>url + sortedFormParams</code>) per <code>porting-sdk/webhooks.md</code>. The contract is byte-identical across all +SignalWire SDK ports — see the cross-port test vectors in the spec. + +**Modifiers:** `static` + +## Signature + +```dotnet +public static class WebhookValidator +``` + +## Methods + +### ValidateRequest(string, string?, string, object?) + +Legacy <code>@signalwire/compatibility-api</code> drop-in entry point. + +<p>If <code class="paramref">paramsOrRawBody</code> is a <xref href="System.String" data-throw-if-not-resolved="false"></xref>, +delegates to <xref href="SignalWire.Security.WebhookValidator.ValidateWebhookSignature(System.String%2cSystem.String%2cSystem.String%2cSystem.String)" data-throw-if-not-resolved="false"></xref> (Scheme A then +Scheme B with parsed form).</p> + +<p>If it's an <xref href="System.Collections.IDictionary" data-throw-if-not-resolved="false"></xref> or list of key/value pairs, +treats it as pre-parsed form params and runs Scheme B directly (with +URL port normalization).</p> + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static bool ValidateRequest(string signingKey, string? signature, string url, object? paramsOrRawBody) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`bool` + +#### Throws + +- `System.ArgumentException` — Thrown when <code class="paramref">signingKey</code> is null or empty, or when <code class="paramref">paramsOrRawBody</code> is neither a string nor a dictionary/list of params. + +#### Source + +[`src/SignalWire/Security/WebhookValidator.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Security/WebhookValidator.cs) + +Line 147. + +*** + +### ValidateWebhookSignature(string, string?, string, string?) + +Validate a SignalWire webhook signature against both schemes. + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static bool ValidateWebhookSignature(string signingKey, string? signature, string url, string? rawBody) +``` + +#### Parameters + + + Customer's Signing Key from the Dashboard. UTF-8 string, secret. Empty or null raises <xref href="System.ArgumentException" data-throw-if-not-resolved="false"></xref> — that's a programming error, not a validation failure. + + + + The <code>X-SignalWire-Signature</code> header value (or <code>X-Twilio-Signature</code> for cXML compat). Missing / empty returns <code>false</code> without throwing. + + + + The full URL SignalWire POSTed to (scheme, host, optional port, path, query). Must match what the platform saw — see the <code>URL reconstruction</code> section of <code>porting-sdk/webhooks.md</code>. + + + + The raw request body bytes as a UTF-8 string, BEFORE any JSON / form parsing. Re-serialization breaks the Scheme A digest. + + +#### Returns + +`bool` — <code>true</code> if the signature matches either Scheme A (hex JSON) or Scheme B (base64 form, with port-normalization variants and optional bodySHA256 fallback). <code>false</code> otherwise. + +#### Throws + +- `System.ArgumentException` — Thrown when <code class="paramref">signingKey</code> is null or empty. + +#### Source + +[`src/SignalWire/Security/WebhookValidator.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Security/WebhookValidator.cs) + +Line 69. + +## Source + +[`src/SignalWire/Security/WebhookValidator.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Security/WebhookValidator.cs) + +Line 34. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.server/agent-server/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.server/agent-server/index.mdx new file mode 100644 index 0000000000..18a28d6575 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.server/agent-server/index.mdx @@ -0,0 +1,304 @@ +--- +slug: "/reference/dotnet/signal-wire.server/agent-server" +title: "AgentServer" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Server.AgentServer" + parent: "SignalWire.Server" + module: "SignalWire.Server" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/obj/Release/net8.0/System.Text.RegularExpressions.Generator/System.Text.RegularExpressions.Generator.RegexGenerator/RegexGenerator.g.cs" + visibility: "public" +--- +# `AgentServer` + +Multi-agent HTTP server. Registers agents at routes, dispatches requests by +longest prefix match, serves static files with path-traversal protection, +handles health/ready/root-index, and supports SIP routing. + +## Signature + +```dotnet +public class AgentServer +``` + +## Properties + + + + + + + The agent\_server logger. (Python parity: `AgentServer.logger` instance attribute.) + + + + +## Methods + +### AgentServer(string, int?, string) + +#### Signature + +```dotnet +public AgentServer(string host = "0.0.0.0", int? port = null, string logLevel = "info") +``` + +#### Parameters + + + + + + + +#### Source + +[`src/SignalWire/Server/AgentServer.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Server/AgentServer.cs) + +Line 46. + +*** + +### GetAgent(string) + +#### Signature + +```dotnet +public AgentBase? GetAgent(string route) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Server/AgentServer.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Server/AgentServer.cs) + +Line 88. + +*** + +### GetAgents() + +Return all registered routes (sorted). + +#### Signature + +```dotnet +public List GetAgents() +``` + +#### Returns + +`List` + +#### Source + +[`src/SignalWire/Server/AgentServer.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Server/AgentServer.cs) + +Line 81. + +*** + +### GetSipUsernameMapping() + +#### Signature + +```dotnet +public Dictionary GetSipUsernameMapping() +``` + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/Server/AgentServer.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Server/AgentServer.cs) + +Line 120. + +*** + +### HandleRequest(string, string, Dictionary\?, string?) + +Handle an HTTP request. Returns (status, headers, body). + +#### Signature + +```dotnet +public (int Status, Dictionary Headers, string Body) HandleRequest(string method, string path, Dictionary? headers = null, string? body = null) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`System.ValueTuple,string>` + +#### Source + +[`src/SignalWire/Server/AgentServer.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Server/AgentServer.cs) + +Line 146. + +*** + +### Register(AgentBase, string?) + +Register an agent at a route. Throws if the route is already taken. + +#### Signature + +```dotnet +public AgentServer Register(AgentBase agent, string? route = null) +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire.Server.AgentServer` + +#### Source + +[`src/SignalWire/Server/AgentServer.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Server/AgentServer.cs) + +Line 62. + +*** + +### RegisterSipUsername(string, string) + +#### Signature + +```dotnet +public AgentServer RegisterSipUsername(string username, string route) +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire.Server.AgentServer` + +#### Source + +[`src/SignalWire/Server/AgentServer.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Server/AgentServer.cs) + +Line 112. + +*** + +### ServeStatic(string, string) + +Serve static files from <code class="paramref">directory</code> under <code class="paramref">urlPrefix</code>. +Throws if the directory does not exist. + +#### Signature + +```dotnet +public AgentServer ServeStatic(string directory, string urlPrefix) +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire.Server.AgentServer` + +#### Source + +[`src/SignalWire/Server/AgentServer.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Server/AgentServer.cs) + +Line 130. + +*** + +### SetupSipRouting(string, bool) + +Enable SIP routing on this server. `route` lets the caller pin +a non-default SIP route prefix; `autoMap` opts agents into +auto-mapped sip\_username = agent name. Matches Python's +`setup_sip_routing(self, route='/sip', auto_map=True)`. + +#### Signature + +```dotnet +public AgentServer SetupSipRouting(string route = "/sip", bool autoMap = true) +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire.Server.AgentServer` + +#### Source + +[`src/SignalWire/Server/AgentServer.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Server/AgentServer.cs) + +Line 104. + +*** + +### Unregister(string) + +#### Signature + +```dotnet +public AgentServer Unregister(string route) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Server.AgentServer` + +#### Source + +[`src/SignalWire/Server/AgentServer.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Server/AgentServer.cs) + +Line 73. + +## Source + +[`src/SignalWire/obj/Release/net8.0/System.Text.RegularExpressions.Generator/System.Text.RegularExpressions.Generator.RegexGenerator/RegexGenerator.g.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/obj/Release/net8.0/System.Text.RegularExpressions.Generator/System.Text.RegularExpressions.Generator.RegexGenerator/RegexGenerator.g.cs) + +Line 8. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.server/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.server/index.mdx new file mode 100644 index 0000000000..4a25b14c0e --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.server/index.mdx @@ -0,0 +1,20 @@ +--- +slug: "/reference/dotnet/signal-wire.server" +title: "SignalWire.Server" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "module" + language: "dotnet" + qualified_name: "SignalWire.Server" +--- +# `SignalWire.Server` + +## Classes + + + + Multi-agent HTTP server. Registers agents at routes, dispatches requests by longest prefix match, serves static files with path-traversal protection, handles health/ready/root-index, and supports SIP routing. + + diff --git a/fern/products/sdk-reference/dotnet/signal-wire.serverless/adapter/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.serverless/adapter/index.mdx new file mode 100644 index 0000000000..ffce3b477f --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.serverless/adapter/index.mdx @@ -0,0 +1,156 @@ +--- +slug: "/reference/dotnet/signal-wire.serverless/adapter" +title: "Adapter" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Serverless.Adapter" + parent: "SignalWire.Serverless" + module: "SignalWire.Serverless" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Serverless/Adapter.cs" + visibility: "public" +--- +# `Adapter` + +Auto-detect and handle serverless environments (Lambda, Azure, GCF, CGI) +or fall back to the built-in ASP.NET server. + +**Modifiers:** `static` + +## Signature + +```dotnet +public static class Adapter +``` + +## Methods + +### Detect() + +Detect the current runtime environment. + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static string Detect() +``` + +#### Returns + +`string` — One of "lambda", "gcf", "azure", "cgi", or "server". + +#### Source + +[`src/SignalWire/Serverless/Adapter.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Serverless/Adapter.cs) + +Line 21. + +*** + +### HandleAzure(Service, Dictionary\) + +Handle an Azure Functions invocation. + +Extracts method, path, headers, and body from the Azure request +dictionary, calls agent.HandleRequest(), and returns an Azure-compatible +response dictionary. + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static Dictionary HandleAzure(Service agent, Dictionary request) +``` + +#### Parameters + + + + + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/Serverless/Adapter.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Serverless/Adapter.cs) + +Line 104. + +*** + +### HandleLambda(Service, Dictionary\) + +Handle an AWS Lambda (API Gateway) invocation. + +Extracts method, path, headers, and body from the API Gateway event +format, calls agent.HandleRequest(), and returns an API Gateway +compatible response. + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static Dictionary HandleLambda(Service agent, Dictionary lambdaEvent) +``` + +#### Parameters + + + An object with a HandleRequest method (AgentBase or Service). + + + + The API Gateway event payload as a dictionary. + + +#### Returns + +`Dictionary` — API Gateway response: statusCode, headers, body. + +#### Source + +[`src/SignalWire/Serverless/Adapter.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Serverless/Adapter.cs) + +Line 53. + +*** + +### Serve(dynamic) + +Auto-detect the runtime environment and serve the agent. + +For serverless environments, reads from stdin and dispatches +to the appropriate handler. For "server", calls agent.Run(). + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static void Serve(dynamic agent) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Serverless/Adapter.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Serverless/Adapter.cs) + +Line 160. + +## Source + +[`src/SignalWire/Serverless/Adapter.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Serverless/Adapter.cs) + +Line 9. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.serverless/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.serverless/index.mdx new file mode 100644 index 0000000000..6b8dea36b0 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.serverless/index.mdx @@ -0,0 +1,20 @@ +--- +slug: "/reference/dotnet/signal-wire.serverless" +title: "SignalWire.Serverless" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "module" + language: "dotnet" + qualified_name: "SignalWire.Serverless" +--- +# `SignalWire.Serverless` + +## Classes + + + + Auto-detect and handle serverless environments (Lambda, Azure, GCF, CGI) or fall back to the built-in ASP.NET server. + + diff --git a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/api-ninjas-trivia-skill/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/api-ninjas-trivia-skill/index.mdx new file mode 100644 index 0000000000..91eddfc544 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/api-ninjas-trivia-skill/index.mdx @@ -0,0 +1,94 @@ +--- +slug: "/reference/dotnet/signal-wire.skills.builtin/api-ninjas-trivia-skill" +title: "ApiNinjasTriviaSkill" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Skills.Builtin.ApiNinjasTriviaSkill" + parent: "SignalWire.Skills.Builtin" + module: "SignalWire.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/ApiNinjasTriviaSkill.cs" + visibility: "public" +--- +# `ApiNinjasTriviaSkill` + +Get trivia questions from API Ninjas (DataMap). + +**Modifiers:** `sealed` + +## Signature + +```dotnet +public sealed class ApiNinjasTriviaSkill : SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire.Skills.SkillBase](/docs/sdk-reference/reference/dotnet/signal-wire.skills/skill-base) + +## Properties + + + + + + + +## Methods + +### RegisterTools(AgentBase) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override void RegisterTools(AgentBase agent) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Skills/Builtin/ApiNinjasTriviaSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/ApiNinjasTriviaSkill.cs) + +Line 24. + +*** + +### Setup(AgentBase, Dictionary\) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override bool Setup(AgentBase agent, Dictionary parameters) +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Skills/Builtin/ApiNinjasTriviaSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/ApiNinjasTriviaSkill.cs) + +Line 19. + +## Source + +[`src/SignalWire/Skills/Builtin/ApiNinjasTriviaSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/ApiNinjasTriviaSkill.cs) + +Line 6. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/claude-skills-skill/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/claude-skills-skill/index.mdx new file mode 100644 index 0000000000..08dffb664e --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/claude-skills-skill/index.mdx @@ -0,0 +1,179 @@ +--- +slug: "/reference/dotnet/signal-wire.skills.builtin/claude-skills-skill" +title: "ClaudeSkillsSkill" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Skills.Builtin.ClaudeSkillsSkill" + parent: "SignalWire.Skills.Builtin" + module: "SignalWire.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/ClaudeSkillsSkill.cs" + visibility: "public" +--- +# `ClaudeSkillsSkill` + +Load Claude SKILL.md files as agent tools. + +Mirrors signalwire-python's <code>signalwire.skills.claude\_skills.skill</code>. +At setup time, the skill walks <code>skills\_path</code> for child directories +containing <code>SKILL.md</code>; each such file is parsed for YAML +frontmatter (the bit between two <code>---</code> lines) plus a markdown +body. Each loaded skill becomes one SWAIG tool whose handler returns +the body with three substitutions: + +<ul><li><code>$ARGUMENTS</code> / <code>$ARGUMENTS[N]</code> / <code>$N</code> — the + <code>arguments</code> string passed to the tool, optionally split into + positional pieces by whitespace.</li><li><code>${CLAUDE_SKILL_DIR}</code> — absolute path to the skill's + directory.</li><li><code>${CLAUDE_SESSION_ID}</code> — call id from raw_data.</li></ul> + +The full Python implementation also runs a frontmatter-driven invocation +gate (skip-tool / skip-prompt), tolerates supporting reference sections, +and offers an opt-in shell-injection preprocessor (<code>!`cmd`</code>). The +.NET port ships the discovery/parse/handler core; the optional shell +preprocessor is left out by design (set <code>allow\_shell\_injection</code> +to a no-op — the surface is preserved for future expansion). + +**Modifiers:** `sealed` + +## Signature + +```dotnet +public sealed class ClaudeSkillsSkill : SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire.Skills.SkillBase](/docs/sdk-reference/reference/dotnet/signal-wire.skills/skill-base) + +## Properties + + + + + + + +## Methods + +### GetHints() + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override List GetHints() +``` + +#### Returns + +`List` + +#### Source + +[`src/SignalWire/Skills/Builtin/ClaudeSkillsSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/ClaudeSkillsSkill.cs) + +Line 318. + +*** + +### GetInstanceKey() + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override string GetInstanceKey() +``` + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/Skills/Builtin/ClaudeSkillsSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/ClaudeSkillsSkill.cs) + +Line 355. + +*** + +### GetPromptSections() + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override List> GetPromptSections() +``` + +#### Returns + +`List>` + +#### Source + +[`src/SignalWire/Skills/Builtin/ClaudeSkillsSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/ClaudeSkillsSkill.cs) + +Line 332. + +*** + +### RegisterTools(AgentBase) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override void RegisterTools(AgentBase agent) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Skills/Builtin/ClaudeSkillsSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/ClaudeSkillsSkill.cs) + +Line 82. + +*** + +### Setup(AgentBase, Dictionary\) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override bool Setup(AgentBase agent, Dictionary parameters) +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Skills/Builtin/ClaudeSkillsSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/ClaudeSkillsSkill.cs) + +Line 51. + +## Source + +[`src/SignalWire/Skills/Builtin/ClaudeSkillsSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/ClaudeSkillsSkill.cs) + +Line 33. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/custom-skills-skill/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/custom-skills-skill/index.mdx new file mode 100644 index 0000000000..c4776c43dd --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/custom-skills-skill/index.mdx @@ -0,0 +1,94 @@ +--- +slug: "/reference/dotnet/signal-wire.skills.builtin/custom-skills-skill" +title: "CustomSkillsSkill" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Skills.Builtin.CustomSkillsSkill" + parent: "SignalWire.Skills.Builtin" + module: "SignalWire.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/CustomSkillsSkill.cs" + visibility: "public" +--- +# `CustomSkillsSkill` + +Register user-defined custom tools. + +**Modifiers:** `sealed` + +## Signature + +```dotnet +public sealed class CustomSkillsSkill : SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire.Skills.SkillBase](/docs/sdk-reference/reference/dotnet/signal-wire.skills/skill-base) + +## Properties + + + + + + + +## Methods + +### RegisterTools(AgentBase) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override void RegisterTools(AgentBase agent) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Skills/Builtin/CustomSkillsSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/CustomSkillsSkill.cs) + +Line 14. + +*** + +### Setup(AgentBase, Dictionary\) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override bool Setup(AgentBase agent, Dictionary parameters) +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Skills/Builtin/CustomSkillsSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/CustomSkillsSkill.cs) + +Line 12. + +## Source + +[`src/SignalWire/Skills/Builtin/CustomSkillsSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/CustomSkillsSkill.cs) + +Line 6. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/datasphere-serverless-skill/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/datasphere-serverless-skill/index.mdx new file mode 100644 index 0000000000..109f1b3f56 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/datasphere-serverless-skill/index.mdx @@ -0,0 +1,138 @@ +--- +slug: "/reference/dotnet/signal-wire.skills.builtin/datasphere-serverless-skill" +title: "DatasphereServerlessSkill" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Skills.Builtin.DatasphereServerlessSkill" + parent: "SignalWire.Skills.Builtin" + module: "SignalWire.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/DatasphereServerlessSkill.cs" + visibility: "public" +--- +# `DatasphereServerlessSkill` + +Search knowledge using SignalWire DataSphere with serverless DataMap execution. + +**Modifiers:** `sealed` + +## Signature + +```dotnet +public sealed class DatasphereServerlessSkill : SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire.Skills.SkillBase](/docs/sdk-reference/reference/dotnet/signal-wire.skills/skill-base) + +## Properties + + + + + + + +## Methods + +### GetGlobalData() + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override Dictionary GetGlobalData() +``` + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/Skills/Builtin/DatasphereServerlessSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/DatasphereServerlessSkill.cs) + +Line 105. + +*** + +### GetPromptSections() + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override List> GetPromptSections() +``` + +#### Returns + +`List>` + +#### Source + +[`src/SignalWire/Skills/Builtin/DatasphereServerlessSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/DatasphereServerlessSkill.cs) + +Line 112. + +*** + +### RegisterTools(AgentBase) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override void RegisterTools(AgentBase agent) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Skills/Builtin/DatasphereServerlessSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/DatasphereServerlessSkill.cs) + +Line 24. + +*** + +### Setup(AgentBase, Dictionary\) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override bool Setup(AgentBase agent, Dictionary parameters) +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Skills/Builtin/DatasphereServerlessSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/DatasphereServerlessSkill.cs) + +Line 13. + +## Source + +[`src/SignalWire/Skills/Builtin/DatasphereServerlessSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/DatasphereServerlessSkill.cs) + +Line 7. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/datasphere-skill/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/datasphere-skill/index.mdx new file mode 100644 index 0000000000..10e1247205 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/datasphere-skill/index.mdx @@ -0,0 +1,148 @@ +--- +slug: "/reference/dotnet/signal-wire.skills.builtin/datasphere-skill" +title: "DatasphereSkill" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Skills.Builtin.DatasphereSkill" + parent: "SignalWire.Skills.Builtin" + module: "SignalWire.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/DatasphereSkill.cs" + visibility: "public" +--- +# `DatasphereSkill` + +SignalWire DataSphere knowledge-base search skill. + +Mirrors signalwire-python's <code>signalwire.skills.datasphere.skill</code>. +POSTs a JSON body to <code>https://\.signalwire.com +/api/datasphere/documents/search</code> with HTTP Basic auth +(project\_id : token). Real DataSphere returns matches under <code>chunks</code>; the porting-sdk audit fixture uses <code>results</code>; +accept either so the skill round-trips against the live API and the +offline audit alike (matching the precedent already in Java/PHP/Perl/ +Rust). + +Upstream URL override: <code>DATASPHERE\_BASE\_URL</code>. Path <code>/api/datasphere/documents/search</code> is preserved. + +**Modifiers:** `sealed` + +## Signature + +```dotnet +public sealed class DatasphereSkill : SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire.Skills.SkillBase](/docs/sdk-reference/reference/dotnet/signal-wire.skills/skill-base) + +## Properties + + + + + + + +## Methods + +### GetGlobalData() + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override Dictionary GetGlobalData() +``` + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/Skills/Builtin/DatasphereSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/DatasphereSkill.cs) + +Line 174. + +*** + +### GetPromptSections() + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override List> GetPromptSections() +``` + +#### Returns + +`List>` + +#### Source + +[`src/SignalWire/Skills/Builtin/DatasphereSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/DatasphereSkill.cs) + +Line 181. + +*** + +### RegisterTools(AgentBase) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override void RegisterTools(AgentBase agent) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Skills/Builtin/DatasphereSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/DatasphereSkill.cs) + +Line 41. + +*** + +### Setup(AgentBase, Dictionary\) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override bool Setup(AgentBase agent, Dictionary parameters) +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Skills/Builtin/DatasphereSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/DatasphereSkill.cs) + +Line 30. + +## Source + +[`src/SignalWire/Skills/Builtin/DatasphereSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/DatasphereSkill.cs) + +Line 22. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/datetime-skill/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/datetime-skill/index.mdx new file mode 100644 index 0000000000..d9e73733a0 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/datetime-skill/index.mdx @@ -0,0 +1,114 @@ +--- +slug: "/reference/dotnet/signal-wire.skills.builtin/datetime-skill" +title: "DatetimeSkill" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Skills.Builtin.DatetimeSkill" + parent: "SignalWire.Skills.Builtin" + module: "SignalWire.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/DatetimeSkill.cs" + visibility: "public" +--- +# `DatetimeSkill` + +Get current date, time, and timezone information. + +**Modifiers:** `sealed` + +## Signature + +```dotnet +public sealed class DatetimeSkill : SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire.Skills.SkillBase](/docs/sdk-reference/reference/dotnet/signal-wire.skills/skill-base) + +## Properties + + + + + +## Methods + +### GetPromptSections() + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override List> GetPromptSections() +``` + +#### Returns + +`List>` + +#### Source + +[`src/SignalWire/Skills/Builtin/DatetimeSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/DatetimeSkill.cs) + +Line 76. + +*** + +### RegisterTools(AgentBase) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override void RegisterTools(AgentBase agent) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Skills/Builtin/DatetimeSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/DatetimeSkill.cs) + +Line 13. + +*** + +### Setup(AgentBase, Dictionary\) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override bool Setup(AgentBase agent, Dictionary parameters) +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Skills/Builtin/DatetimeSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/DatetimeSkill.cs) + +Line 11. + +## Source + +[`src/SignalWire/Skills/Builtin/DatetimeSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/DatetimeSkill.cs) + +Line 6. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/google-maps-skill/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/google-maps-skill/index.mdx new file mode 100644 index 0000000000..46e2d9b61c --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/google-maps-skill/index.mdx @@ -0,0 +1,136 @@ +--- +slug: "/reference/dotnet/signal-wire.skills.builtin/google-maps-skill" +title: "GoogleMapsSkill" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Skills.Builtin.GoogleMapsSkill" + parent: "SignalWire.Skills.Builtin" + module: "SignalWire.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/GoogleMapsSkill.cs" + visibility: "public" +--- +# `GoogleMapsSkill` + +Validate addresses and compute driving routes using Google Maps (DataMap). + +**Modifiers:** `sealed` + +## Signature + +```dotnet +public sealed class GoogleMapsSkill : SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire.Skills.SkillBase](/docs/sdk-reference/reference/dotnet/signal-wire.skills/skill-base) + +## Properties + + + + + +## Methods + +### GetHints() + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override List GetHints() +``` + +#### Returns + +`List` + +#### Source + +[`src/SignalWire/Skills/Builtin/GoogleMapsSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/GoogleMapsSkill.cs) + +Line 115. + +*** + +### GetPromptSections() + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override List> GetPromptSections() +``` + +#### Returns + +`List>` + +#### Source + +[`src/SignalWire/Skills/Builtin/GoogleMapsSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/GoogleMapsSkill.cs) + +Line 118. + +*** + +### RegisterTools(AgentBase) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override void RegisterTools(AgentBase agent) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Skills/Builtin/GoogleMapsSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/GoogleMapsSkill.cs) + +Line 16. + +*** + +### Setup(AgentBase, Dictionary\) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override bool Setup(AgentBase agent, Dictionary parameters) +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Skills/Builtin/GoogleMapsSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/GoogleMapsSkill.cs) + +Line 11. + +## Source + +[`src/SignalWire/Skills/Builtin/GoogleMapsSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/GoogleMapsSkill.cs) + +Line 6. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/index.mdx new file mode 100644 index 0000000000..411adef344 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/index.mdx @@ -0,0 +1,88 @@ +--- +slug: "/reference/dotnet/signal-wire.skills.builtin" +title: "SignalWire.Skills.Builtin" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "module" + language: "dotnet" + qualified_name: "SignalWire.Skills.Builtin" +--- +# `SignalWire.Skills.Builtin` + +## Classes + + + + Get trivia questions from API Ninjas (DataMap). + + + + Load Claude SKILL.md files as agent tools. Mirrors signalwire-python's <code>signalwire.skills.claude\_skills.skill</code>. At setup time, the skill walks <code>skills\_path</code> for child directories containing <code>SKILL.md</code>; each such file is parsed for YAML frontmatter (the bit between two <code>---</code> lines) plus a markdown body. Each loaded skill becomes one SWAIG tool whose handler returns the body with three substitutions: <ul><li><code>$ARGUMENTS</code> / <code>$ARGUMENTS\[N]</code> / <code>$N</code> — the <code>arguments</code> string passed to the tool, optionally split into positional pieces by whitespace.</li><li><code>$\{CLAUDE\_SKILL\_DIR\}</code> — absolute path to the skill's directory.</li><li><code>$\{CLAUDE\_SESSION\_ID\}</code> — call id from raw\_data.</li></ul> The full Python implementation also runs a frontmatter-driven invocation gate (skip-tool / skip-prompt), tolerates supporting reference sections, and offers an opt-in shell-injection preprocessor (<code>!`cmd`</code>). The .NET port ships the discovery/parse/handler core; the optional shell preprocessor is left out by design (set <code>allow\_shell\_injection</code> to a no-op — the surface is preserved for future expansion). + + + + Register user-defined custom tools. + + + + Search knowledge using SignalWire DataSphere with serverless DataMap execution. + + + + SignalWire DataSphere knowledge-base search skill. Mirrors signalwire-python's <code>signalwire.skills.datasphere.skill</code>. POSTs a JSON body to <code>https://\.signalwire.com /api/datasphere/documents/search</code> with HTTP Basic auth (project\_id : token). Real DataSphere returns matches under <code>chunks</code>; the porting-sdk audit fixture uses <code>results</code>; accept either so the skill round-trips against the live API and the offline audit alike (matching the precedent already in Java/PHP/Perl/ Rust). Upstream URL override: <code>DATASPHERE\_BASE\_URL</code>. Path <code>/api/datasphere/documents/search</code> is preserved. + + + + Get current date, time, and timezone information. + + + + Validate addresses and compute driving routes using Google Maps (DataMap). + + + + Gather answers to a configurable list of questions. + + + + Tell jokes using the API Ninjas joke API (DataMap). + + + + Perform basic mathematical calculations. + + + + Bridge MCP (Model Context Protocol) servers with SWAIG functions. Mirrors signalwire-python's <code>signalwire.skills.mcp\_gateway.skill</code>. Each configured service gets one or more SWAIG tools whose handler POSTs to the gateway with the tool name, arguments, and per-call session id (derived from <code>raw\_data.global\_data.mcp\_call\_id</code> if present, else <code>raw\_data.call\_id</code>). Auth: <code>auth\_token</code> (Bearer) or <code>auth\_user</code>/<code>auth\_password</code> (Basic). The skill prefers Bearer when both are configured. Endpoint shape: <code>POST \/services/\/call</code> per the Python implementation. Audit fixtures point <code>gateway\_url</code> at a loopback URL via the per-skill convention. + + + + Vector / keyword similarity search. Mirrors signalwire-python's <code>signalwire.skills.native\_vector\_search.skill</code> in <strong>remote mode only</strong>. Local-mode SQLite/pgvector indexing relies on Python-only deps (sentence-transformers, FAISS, pgvector) and is not portable to the .NET BCL — recorded in <code>PORT\_OMISSIONS.md</code>. The remote mode POSTs the query to the configured search server, which returns a real-shape response the audit verifies on the wire. The handler reads <code>remote\_url</code> from skill params; the audit fixture sets it to a loopback URL so the SDK exercises the real transport against canned bytes. + + + + Control background file playback (DataMap). + + + + Web scraping / crawling skill. Mirrors signalwire-python's <code>signalwire.skills.spider.skill</code>. The Python implementation uses lxml + BeautifulSoup for selector-based extraction; the .NET port ships a faithful HTTP fetch + regex-based HTML stripping (script/style removal, tag removal, whitespace collapse, smart truncation). That covers the canonical <code>fast\_text</code> / <code>clean\_text</code> path the audit exercises; selector-driven structured extraction can be layered on later. Upstream URL override: <code>SPIDER\_BASE\_URL</code>. The skill rewrites the fetch host while preserving the requested URL's path + query so the audit fixture sees the documented page on the wire. + + + + Transfer calls between agents based on pattern matching (DataMap). + + + + Get current weather information from WeatherAPI.com (DataMap). + + + + Web search skill backed by Google Custom Search. Mirrors signalwire-python's <code>signalwire.skills.web\_search.skill</code> (the <code>WebSearchSkill.search\_and\_scrape\_best</code> path). The CSE call is issued faithfully, then each result URL is scraped and a header line + per-result title/url/snippet (plus scraped content) is formatted. Latency control (Python skill.py commits 51101da + 295745b) bounds the whole tool call so a single slow site can never blow past the SignalWire kernel's ~55s webhook timeout: <code>per\_page\_timeout</code> (2.0s) caps each page scrape (a per-request linked <xref href="System.Threading.CancellationTokenSource" data-throw-if-not-resolved="false"></xref> with <code>CancelAfter</code>). <code>overall\_deadline</code> (10.0s) is the wall-clock budget for the whole call; once it fires, in-flight scrapes are abandoned and we return what we have (a <xref href="System.Threading.CancellationTokenSource" data-throw-if-not-resolved="false"></xref> with <code>CancelAfter(overall\_deadline)</code>). THIS IS THE CONTRACT. <code>parallel\_scrape</code> (true) dispatches each scrape as a Task and awaits <xref href="System.Threading.Tasks.Task.WhenAll(System.Threading.Tasks.Task%5b%5d)" data-throw-if-not-resolved="false"></xref>, harvesting whatever completed when the deadline cancels (best-effort). <code>snippets\_only</code> (false) skips scraping entirely and formats the CSE snippets directly. Sub-second response. When the deadline fires OR no scraped page meets the quality threshold, the handler falls back to formatting the CSE snippets into a NON-empty response rather than the empty no-results message, so the kernel never sees a webhook timeout. Upstream URL override: <code>WEB\_SEARCH\_BASE\_URL</code> (used by audit\_skills\_dispatch.py to point at a local fixture). When set, the URL is rewritten to the override host while the path <code>/customsearch/v1</code> is preserved. + + + + Wikipedia search skill backed by the public Wikipedia REST API. Mirrors signalwire-python's <code>signalwire.skills.wikipedia\_search.skill</code>. The Python skill makes two API calls per query — first <code>action=query\&list=search</code> to find article titles, then <code>action=query\&prop=extracts</code> to fetch each article's intro extract. Returns the article(s) as <code>**Title**\n\nExtract</code> joined by separators. Upstream URL override: <code>WIKIPEDIA\_BASE\_URL</code>. Path <code>/w/api.php</code> is preserved when the env var is set so the audit fixture sees the documented Wikipedia API path on the wire. + + diff --git a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/info-gatherer-skill/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/info-gatherer-skill/index.mdx new file mode 100644 index 0000000000..7cf5ae19ae --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/info-gatherer-skill/index.mdx @@ -0,0 +1,138 @@ +--- +slug: "/reference/dotnet/signal-wire.skills.builtin/info-gatherer-skill" +title: "InfoGathererSkill" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Skills.Builtin.InfoGathererSkill" + parent: "SignalWire.Skills.Builtin" + module: "SignalWire.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/InfoGathererSkill.cs" + visibility: "public" +--- +# `InfoGathererSkill` + +Gather answers to a configurable list of questions. + +**Modifiers:** `sealed` + +## Signature + +```dotnet +public sealed class InfoGathererSkill : SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire.Skills.SkillBase](/docs/sdk-reference/reference/dotnet/signal-wire.skills/skill-base) + +## Properties + + + + + + + +## Methods + +### GetGlobalData() + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override Dictionary GetGlobalData() +``` + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/Skills/Builtin/InfoGathererSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/InfoGathererSkill.cs) + +Line 101. + +*** + +### GetPromptSections() + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override List> GetPromptSections() +``` + +#### Returns + +`List>` + +#### Source + +[`src/SignalWire/Skills/Builtin/InfoGathererSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/InfoGathererSkill.cs) + +Line 117. + +*** + +### RegisterTools(AgentBase) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override void RegisterTools(AgentBase agent) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Skills/Builtin/InfoGathererSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/InfoGathererSkill.cs) + +Line 17. + +*** + +### Setup(AgentBase, Dictionary\) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override bool Setup(AgentBase agent, Dictionary parameters) +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Skills/Builtin/InfoGathererSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/InfoGathererSkill.cs) + +Line 12. + +## Source + +[`src/SignalWire/Skills/Builtin/InfoGathererSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/InfoGathererSkill.cs) + +Line 6. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/joke-skill/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/joke-skill/index.mdx new file mode 100644 index 0000000000..300b840d36 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/joke-skill/index.mdx @@ -0,0 +1,136 @@ +--- +slug: "/reference/dotnet/signal-wire.skills.builtin/joke-skill" +title: "JokeSkill" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Skills.Builtin.JokeSkill" + parent: "SignalWire.Skills.Builtin" + module: "SignalWire.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/JokeSkill.cs" + visibility: "public" +--- +# `JokeSkill` + +Tell jokes using the API Ninjas joke API (DataMap). + +**Modifiers:** `sealed` + +## Signature + +```dotnet +public sealed class JokeSkill : SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire.Skills.SkillBase](/docs/sdk-reference/reference/dotnet/signal-wire.skills/skill-base) + +## Properties + + + + + +## Methods + +### GetGlobalData() + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override Dictionary GetGlobalData() +``` + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/Skills/Builtin/JokeSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/JokeSkill.cs) + +Line 66. + +*** + +### GetPromptSections() + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override List> GetPromptSections() +``` + +#### Returns + +`List>` + +#### Source + +[`src/SignalWire/Skills/Builtin/JokeSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/JokeSkill.cs) + +Line 69. + +*** + +### RegisterTools(AgentBase) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override void RegisterTools(AgentBase agent) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Skills/Builtin/JokeSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/JokeSkill.cs) + +Line 16. + +*** + +### Setup(AgentBase, Dictionary\) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override bool Setup(AgentBase agent, Dictionary parameters) +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Skills/Builtin/JokeSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/JokeSkill.cs) + +Line 11. + +## Source + +[`src/SignalWire/Skills/Builtin/JokeSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/JokeSkill.cs) + +Line 6. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/math-skill/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/math-skill/index.mdx new file mode 100644 index 0000000000..43a8849ec2 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/math-skill/index.mdx @@ -0,0 +1,114 @@ +--- +slug: "/reference/dotnet/signal-wire.skills.builtin/math-skill" +title: "MathSkill" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Skills.Builtin.MathSkill" + parent: "SignalWire.Skills.Builtin" + module: "SignalWire.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/obj/Release/net8.0/System.Text.RegularExpressions.Generator/System.Text.RegularExpressions.Generator.RegexGenerator/RegexGenerator.g.cs" + visibility: "public" +--- +# `MathSkill` + +Perform basic mathematical calculations. + +**Modifiers:** `sealed` + +## Signature + +```dotnet +public sealed class MathSkill : SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire.Skills.SkillBase](/docs/sdk-reference/reference/dotnet/signal-wire.skills/skill-base) + +## Properties + + + + + +## Methods + +### GetPromptSections() + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override List> GetPromptSections() +``` + +#### Returns + +`List>` + +#### Source + +[`src/SignalWire/Skills/Builtin/MathSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/MathSkill.cs) + +Line 86. + +*** + +### RegisterTools(AgentBase) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override void RegisterTools(AgentBase agent) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Skills/Builtin/MathSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/MathSkill.cs) + +Line 17. + +*** + +### Setup(AgentBase, Dictionary\) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override bool Setup(AgentBase agent, Dictionary parameters) +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Skills/Builtin/MathSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/MathSkill.cs) + +Line 15. + +## Source + +[`src/SignalWire/obj/Release/net8.0/System.Text.RegularExpressions.Generator/System.Text.RegularExpressions.Generator.RegexGenerator/RegexGenerator.g.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/obj/Release/net8.0/System.Text.RegularExpressions.Generator/System.Text.RegularExpressions.Generator.RegexGenerator/RegexGenerator.g.cs) + +Line 31. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/mcp-gateway-skill/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/mcp-gateway-skill/index.mdx new file mode 100644 index 0000000000..053368c371 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/mcp-gateway-skill/index.mdx @@ -0,0 +1,171 @@ +--- +slug: "/reference/dotnet/signal-wire.skills.builtin/mcp-gateway-skill" +title: "McpGatewaySkill" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Skills.Builtin.McpGatewaySkill" + parent: "SignalWire.Skills.Builtin" + module: "SignalWire.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/McpGatewaySkill.cs" + visibility: "public" +--- +# `McpGatewaySkill` + +Bridge MCP (Model Context Protocol) servers with SWAIG functions. + +Mirrors signalwire-python's <code>signalwire.skills.mcp\_gateway.skill</code>. +Each configured service gets one or more SWAIG tools whose handler +POSTs to the gateway with the tool name, arguments, and per-call +session id (derived from <code>raw\_data.global\_data.mcp\_call\_id</code> if +present, else <code>raw\_data.call\_id</code>). + +Auth: <code>auth\_token</code> (Bearer) or <code>auth\_user</code>/<code>auth\_password</code> +(Basic). The skill prefers Bearer when both are configured. + +Endpoint shape: <code>POST \/services/\/call</code> +per the Python implementation. Audit fixtures point <code>gateway\_url</code> +at a loopback URL via the per-skill convention. + +**Modifiers:** `sealed` + +## Signature + +```dotnet +public sealed class McpGatewaySkill : SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire.Skills.SkillBase](/docs/sdk-reference/reference/dotnet/signal-wire.skills/skill-base) + +## Properties + + + + + +## Methods + +### GetGlobalData() + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override Dictionary GetGlobalData() +``` + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/Skills/Builtin/McpGatewaySkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/McpGatewaySkill.cs) + +Line 249. + +*** + +### GetHints() + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override List GetHints() +``` + +#### Returns + +`List` + +#### Source + +[`src/SignalWire/Skills/Builtin/McpGatewaySkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/McpGatewaySkill.cs) + +Line 234. + +*** + +### GetPromptSections() + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override List> GetPromptSections() +``` + +#### Returns + +`List>` + +#### Source + +[`src/SignalWire/Skills/Builtin/McpGatewaySkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/McpGatewaySkill.cs) + +Line 268. + +*** + +### RegisterTools(AgentBase) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override void RegisterTools(AgentBase agent) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Skills/Builtin/McpGatewaySkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/McpGatewaySkill.cs) + +Line 32. + +*** + +### Setup(AgentBase, Dictionary\) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override bool Setup(AgentBase agent, Dictionary parameters) +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Skills/Builtin/McpGatewaySkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/McpGatewaySkill.cs) + +Line 27. + +## Source + +[`src/SignalWire/Skills/Builtin/McpGatewaySkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/McpGatewaySkill.cs) + +Line 22. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/native-vector-search-skill/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/native-vector-search-skill/index.mdx new file mode 100644 index 0000000000..ac42e87243 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/native-vector-search-skill/index.mdx @@ -0,0 +1,127 @@ +--- +slug: "/reference/dotnet/signal-wire.skills.builtin/native-vector-search-skill" +title: "NativeVectorSearchSkill" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Skills.Builtin.NativeVectorSearchSkill" + parent: "SignalWire.Skills.Builtin" + module: "SignalWire.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/NativeVectorSearchSkill.cs" + visibility: "public" +--- +# `NativeVectorSearchSkill` + +Vector / keyword similarity search. + +Mirrors signalwire-python's <code>signalwire.skills.native\_vector\_search.skill</code> +in <strong>remote mode only</strong>. Local-mode SQLite/pgvector +indexing relies on Python-only deps (sentence-transformers, FAISS, +pgvector) and is not portable to the .NET BCL — recorded in <code>PORT\_OMISSIONS.md</code>. The remote mode POSTs the query to the +configured search server, which returns a real-shape response the +audit verifies on the wire. + +The handler reads <code>remote\_url</code> from skill params; the audit +fixture sets it to a loopback URL so the SDK exercises the real +transport against canned bytes. + +**Modifiers:** `sealed` + +## Signature + +```dotnet +public sealed class NativeVectorSearchSkill : SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire.Skills.SkillBase](/docs/sdk-reference/reference/dotnet/signal-wire.skills/skill-base) + +## Properties + + + + + + + +## Methods + +### GetHints() + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override List GetHints() +``` + +#### Returns + +`List` + +#### Source + +[`src/SignalWire/Skills/Builtin/NativeVectorSearchSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/NativeVectorSearchSkill.cs) + +Line 194. + +*** + +### RegisterTools(AgentBase) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override void RegisterTools(AgentBase agent) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Skills/Builtin/NativeVectorSearchSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/NativeVectorSearchSkill.cs) + +Line 30. + +*** + +### Setup(AgentBase, Dictionary\) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override bool Setup(AgentBase agent, Dictionary parameters) +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Skills/Builtin/NativeVectorSearchSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/NativeVectorSearchSkill.cs) + +Line 28. + +## Source + +[`src/SignalWire/Skills/Builtin/NativeVectorSearchSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/NativeVectorSearchSkill.cs) + +Line 22. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/play-background-file-skill/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/play-background-file-skill/index.mdx new file mode 100644 index 0000000000..395b61e413 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/play-background-file-skill/index.mdx @@ -0,0 +1,94 @@ +--- +slug: "/reference/dotnet/signal-wire.skills.builtin/play-background-file-skill" +title: "PlayBackgroundFileSkill" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Skills.Builtin.PlayBackgroundFileSkill" + parent: "SignalWire.Skills.Builtin" + module: "SignalWire.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/PlayBackgroundFileSkill.cs" + visibility: "public" +--- +# `PlayBackgroundFileSkill` + +Control background file playback (DataMap). + +**Modifiers:** `sealed` + +## Signature + +```dotnet +public sealed class PlayBackgroundFileSkill : SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire.Skills.SkillBase](/docs/sdk-reference/reference/dotnet/signal-wire.skills/skill-base) + +## Properties + + + + + + + +## Methods + +### RegisterTools(AgentBase) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override void RegisterTools(AgentBase agent) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Skills/Builtin/PlayBackgroundFileSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/PlayBackgroundFileSkill.cs) + +Line 17. + +*** + +### Setup(AgentBase, Dictionary\) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override bool Setup(AgentBase agent, Dictionary parameters) +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Skills/Builtin/PlayBackgroundFileSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/PlayBackgroundFileSkill.cs) + +Line 12. + +## Source + +[`src/SignalWire/Skills/Builtin/PlayBackgroundFileSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/PlayBackgroundFileSkill.cs) + +Line 6. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/spider-skill/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/spider-skill/index.mdx new file mode 100644 index 0000000000..6d056bec13 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/spider-skill/index.mdx @@ -0,0 +1,127 @@ +--- +slug: "/reference/dotnet/signal-wire.skills.builtin/spider-skill" +title: "SpiderSkill" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Skills.Builtin.SpiderSkill" + parent: "SignalWire.Skills.Builtin" + module: "SignalWire.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/SpiderSkill.cs" + visibility: "public" +--- +# `SpiderSkill` + +Web scraping / crawling skill. + +Mirrors signalwire-python's <code>signalwire.skills.spider.skill</code>. The +Python implementation uses lxml + BeautifulSoup for selector-based +extraction; the .NET port ships a faithful HTTP fetch + regex-based +HTML stripping (script/style removal, tag removal, whitespace +collapse, smart truncation). That covers the canonical <code>fast\_text</code> / <code>clean\_text</code> path the audit exercises; +selector-driven structured extraction can be layered on later. + +Upstream URL override: <code>SPIDER\_BASE\_URL</code>. The skill rewrites the +fetch host while preserving the requested URL's path + query so the +audit fixture sees the documented page on the wire. + +**Modifiers:** `sealed` + +## Signature + +```dotnet +public sealed class SpiderSkill : SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire.Skills.SkillBase](/docs/sdk-reference/reference/dotnet/signal-wire.skills/skill-base) + +## Properties + + + + + + + +## Methods + +### GetHints() + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override List GetHints() +``` + +#### Returns + +`List` + +#### Source + +[`src/SignalWire/Skills/Builtin/SpiderSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/SpiderSkill.cs) + +Line 245. + +*** + +### RegisterTools(AgentBase) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override void RegisterTools(AgentBase agent) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Skills/Builtin/SpiderSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/SpiderSkill.cs) + +Line 38. + +*** + +### Setup(AgentBase, Dictionary\) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override bool Setup(AgentBase agent, Dictionary parameters) +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Skills/Builtin/SpiderSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/SpiderSkill.cs) + +Line 36. + +## Source + +[`src/SignalWire/Skills/Builtin/SpiderSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/SpiderSkill.cs) + +Line 22. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/swml-transfer-skill/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/swml-transfer-skill/index.mdx new file mode 100644 index 0000000000..304737d288 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/swml-transfer-skill/index.mdx @@ -0,0 +1,138 @@ +--- +slug: "/reference/dotnet/signal-wire.skills.builtin/swml-transfer-skill" +title: "SwmlTransferSkill" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Skills.Builtin.SwmlTransferSkill" + parent: "SignalWire.Skills.Builtin" + module: "SignalWire.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/SwmlTransferSkill.cs" + visibility: "public" +--- +# `SwmlTransferSkill` + +Transfer calls between agents based on pattern matching (DataMap). + +**Modifiers:** `sealed` + +## Signature + +```dotnet +public sealed class SwmlTransferSkill : SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire.Skills.SkillBase](/docs/sdk-reference/reference/dotnet/signal-wire.skills/skill-base) + +## Properties + + + + + + + +## Methods + +### GetHints() + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override List GetHints() +``` + +#### Returns + +`List` + +#### Source + +[`src/SignalWire/Skills/Builtin/SwmlTransferSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/SwmlTransferSkill.cs) + +Line 108. + +*** + +### GetPromptSections() + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override List> GetPromptSections() +``` + +#### Returns + +`List>` + +#### Source + +[`src/SignalWire/Skills/Builtin/SwmlTransferSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/SwmlTransferSkill.cs) + +Line 126. + +*** + +### RegisterTools(AgentBase) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override void RegisterTools(AgentBase agent) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Skills/Builtin/SwmlTransferSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/SwmlTransferSkill.cs) + +Line 18. + +*** + +### Setup(AgentBase, Dictionary\) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override bool Setup(AgentBase agent, Dictionary parameters) +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Skills/Builtin/SwmlTransferSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/SwmlTransferSkill.cs) + +Line 13. + +## Source + +[`src/SignalWire/Skills/Builtin/SwmlTransferSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/SwmlTransferSkill.cs) + +Line 7. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/weather-api-skill/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/weather-api-skill/index.mdx new file mode 100644 index 0000000000..cca55af8b8 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/weather-api-skill/index.mdx @@ -0,0 +1,92 @@ +--- +slug: "/reference/dotnet/signal-wire.skills.builtin/weather-api-skill" +title: "WeatherApiSkill" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Skills.Builtin.WeatherApiSkill" + parent: "SignalWire.Skills.Builtin" + module: "SignalWire.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/WeatherApiSkill.cs" + visibility: "public" +--- +# `WeatherApiSkill` + +Get current weather information from WeatherAPI.com (DataMap). + +**Modifiers:** `sealed` + +## Signature + +```dotnet +public sealed class WeatherApiSkill : SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire.Skills.SkillBase](/docs/sdk-reference/reference/dotnet/signal-wire.skills/skill-base) + +## Properties + + + + + +## Methods + +### RegisterTools(AgentBase) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override void RegisterTools(AgentBase agent) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Skills/Builtin/WeatherApiSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/WeatherApiSkill.cs) + +Line 16. + +*** + +### Setup(AgentBase, Dictionary\) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override bool Setup(AgentBase agent, Dictionary parameters) +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Skills/Builtin/WeatherApiSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/WeatherApiSkill.cs) + +Line 11. + +## Source + +[`src/SignalWire/Skills/Builtin/WeatherApiSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/WeatherApiSkill.cs) + +Line 6. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/web-search-skill/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/web-search-skill/index.mdx new file mode 100644 index 0000000000..dc4be5f85f --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/web-search-skill/index.mdx @@ -0,0 +1,185 @@ +--- +slug: "/reference/dotnet/signal-wire.skills.builtin/web-search-skill" +title: "WebSearchSkill" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Skills.Builtin.WebSearchSkill" + parent: "SignalWire.Skills.Builtin" + module: "SignalWire.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/WebSearchSkill.cs" + visibility: "public" +--- +# `WebSearchSkill` + +Web search skill backed by Google Custom Search. + +Mirrors signalwire-python's <code>signalwire.skills.web\_search.skill</code> +(the <code>WebSearchSkill.search\_and\_scrape\_best</code> path). The CSE call is +issued faithfully, then each result URL is scraped and a header line + +per-result title/url/snippet (plus scraped content) is formatted. + +Latency control (Python skill.py commits 51101da + 295745b) bounds the +whole tool call so a single slow site can never blow past the SignalWire +kernel's ~55s webhook timeout: <code>per\_page\_timeout</code> (2.0s) caps each page scrape (a per-request +linked <xref href="System.Threading.CancellationTokenSource" data-throw-if-not-resolved="false"></xref> with <code>CancelAfter</code>). <code>overall\_deadline</code> (10.0s) is the wall-clock budget for the whole +call; once it fires, in-flight scrapes are abandoned and we return +what we have (a <xref href="System.Threading.CancellationTokenSource" data-throw-if-not-resolved="false"></xref> +with <code>CancelAfter(overall\_deadline)</code>). THIS IS THE CONTRACT. <code>parallel\_scrape</code> (true) dispatches each scrape as a Task and awaits <xref href="System.Threading.Tasks.Task.WhenAll(System.Threading.Tasks.Task%5b%5d)" data-throw-if-not-resolved="false"></xref>, +harvesting whatever completed when the deadline cancels (best-effort). <code>snippets\_only</code> (false) skips scraping entirely and formats the CSE +snippets directly. Sub-second response. +When the deadline fires OR no scraped page meets the quality threshold, the +handler falls back to formatting the CSE snippets into a NON-empty response +rather than the empty no-results message, so the kernel never sees a +webhook timeout. + +Upstream URL override: <code>WEB\_SEARCH\_BASE\_URL</code> (used by +audit\_skills\_dispatch.py to point at a local fixture). When set, the +URL is rewritten to the override host while the path <code>/customsearch/v1</code> is preserved. + +**Modifiers:** `sealed` + +## Signature + +```dotnet +public sealed class WebSearchSkill : SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire.Skills.SkillBase](/docs/sdk-reference/reference/dotnet/signal-wire.skills/skill-base) + +## Properties + + + + + + + + + +## Methods + +### GetGlobalData() + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override Dictionary GetGlobalData() +``` + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/Skills/Builtin/WebSearchSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/WebSearchSkill.cs) + +Line 546. + +*** + +### GetParameterSchema() + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override Dictionary GetParameterSchema() +``` + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/Skills/Builtin/WebSearchSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/WebSearchSkill.cs) + +Line 493. + +*** + +### GetPromptSections() + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override List> GetPromptSections() +``` + +#### Returns + +`List>` + +#### Source + +[`src/SignalWire/Skills/Builtin/WebSearchSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/WebSearchSkill.cs) + +Line 553. + +*** + +### RegisterTools(AgentBase) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override void RegisterTools(AgentBase agent) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Skills/Builtin/WebSearchSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/WebSearchSkill.cs) + +Line 65. + +*** + +### Setup(AgentBase, Dictionary\) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override bool Setup(AgentBase agent, Dictionary parameters) +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Skills/Builtin/WebSearchSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/WebSearchSkill.cs) + +Line 59. + +## Source + +[`src/SignalWire/Skills/Builtin/WebSearchSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/WebSearchSkill.cs) + +Line 41. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/wikipedia-search-skill/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/wikipedia-search-skill/index.mdx new file mode 100644 index 0000000000..309bc981af --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/wikipedia-search-skill/index.mdx @@ -0,0 +1,122 @@ +--- +slug: "/reference/dotnet/signal-wire.skills.builtin/wikipedia-search-skill" +title: "WikipediaSearchSkill" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Skills.Builtin.WikipediaSearchSkill" + parent: "SignalWire.Skills.Builtin" + module: "SignalWire.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/WikipediaSearchSkill.cs" + visibility: "public" +--- +# `WikipediaSearchSkill` + +Wikipedia search skill backed by the public Wikipedia REST API. + +Mirrors signalwire-python's <code>signalwire.skills.wikipedia\_search.skill</code>. +The Python skill makes two API calls per query — first <code>action=query\&list=search</code> to find article titles, then <code>action=query\&prop=extracts</code> to fetch each article's intro +extract. Returns the article(s) as <code>**Title**\n\nExtract</code> joined +by separators. + +Upstream URL override: <code>WIKIPEDIA\_BASE\_URL</code>. Path <code>/w/api.php</code> is preserved when the env var is set so the audit +fixture sees the documented Wikipedia API path on the wire. + +**Modifiers:** `sealed` + +## Signature + +```dotnet +public sealed class WikipediaSearchSkill : SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire.Skills.SkillBase](/docs/sdk-reference/reference/dotnet/signal-wire.skills/skill-base) + +## Properties + + + + + +## Methods + +### GetPromptSections() + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override List> GetPromptSections() +``` + +#### Returns + +`List>` + +#### Source + +[`src/SignalWire/Skills/Builtin/WikipediaSearchSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/WikipediaSearchSkill.cs) + +Line 161. + +*** + +### RegisterTools(AgentBase) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override void RegisterTools(AgentBase agent) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Skills/Builtin/WikipediaSearchSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/WikipediaSearchSkill.cs) + +Line 31. + +*** + +### Setup(AgentBase, Dictionary\) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override bool Setup(AgentBase agent, Dictionary parameters) +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Skills/Builtin/WikipediaSearchSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/WikipediaSearchSkill.cs) + +Line 29. + +## Source + +[`src/SignalWire/Skills/Builtin/WikipediaSearchSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/WikipediaSearchSkill.cs) + +Line 21. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.skills/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.skills/index.mdx new file mode 100644 index 0000000000..52a2c1f4ce --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.skills/index.mdx @@ -0,0 +1,145 @@ +--- +slug: "/reference/dotnet/signal-wire.skills" +title: "SignalWire.Skills" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "module" + language: "dotnet" + qualified_name: "SignalWire.Skills" +--- +# `SignalWire.Skills` + +## Classes + + + + Abstract base class for all skills. Provides lifecycle hooks, tool registration, hint/globalData/prompt merging, and a <xref href="SignalWire.Skills.SkillBase.DefineTool(System.String%2cSystem.String%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%2cSystem.Func%7bSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%2cSignalWire.SWAIG.FunctionResult%7d)" data-throw-if-not-resolved="false"></xref> helper that delegates to the owning agent. + + + + Loads, unloads, and queries skills on behalf of an <xref href="SignalWire.Agent.AgentBase" data-throw-if-not-resolved="false"></xref>. Validates env vars, calls Setup/RegisterTools, and merges hints/globalData/prompts. + + + + Maps <xref href="SignalWire.Skills.SkillName" data-throw-if-not-resolved="false"></xref> members to the canonical snake\_case wire names that <xref href="SignalWire.Skills.SkillRegistry" data-throw-if-not-resolved="false"></xref> registers. + + + + Thread-safe singleton that maps snake\_case skill names to factory delegates. All 18 built-in skills are registered lazily on first access. + + + +## Enums + +### SkillName + +Built-in skill names as a typed, compile-time-checked closed set. + +**Remarks:** <p> <xref href="SignalWire.Agent.AgentBase.AddSkill(SignalWire.Skills.SkillName%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d)" data-throw-if-not-resolved="false"></xref> +(and the matching <code>RemoveSkill</code> / <code>HasSkill</code> overloads) accept this +enum OR a string. The enum gives editor autocompletion and makes a typo fail +at the call site — a bare string like <code>"datetiem"</code> only fails at runtime, +on the server. Strings keep parity with the Python reference (which uses a +bare <code>str</code>) and still allow custom / third-party skills that aren't +built in. + +</p> +<p> +Each member maps to its canonical snake_case wire name via +<xref href="SignalWire.Skills.SkillNameExtensions.ToWireName(SignalWire.Skills.SkillName)" data-throw-if-not-resolved="false"></xref>; the enum is purely a +typed alias over those strings, so wire behavior is identical to passing the +string directly. +</p> +<example> +<pre><code class="lang-csharp">agent.AddSkill(SkillName.Datetime); // typed, autocompleted +agent.AddSkill("datetime"); // string still works (parity) +agent.AddSkill("my_custom_skill"); // open set: custom skills ok</code></pre> +</example> + +#### Signature + +```dotnet +public enum SkillName +``` + +#### Properties + + + api\_ninjas\_trivia + + + + claude\_skills + + + + custom\_skills + + + + datasphere + + + + datasphere\_serverless + + + + datetime + + + + google\_maps + + + + info\_gatherer + + + + joke + + + + math + + + + mcp\_gateway + + + + native\_vector\_search + + + + play\_background\_file + + + + spider + + + + swml\_transfer + + + + weather\_api + + + + web\_search + + + + wikipedia\_search + + +#### Source + +[`src/SignalWire/Skills/SkillName.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillName.cs) + +Line 29. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.skills/skill-base/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.skills/skill-base/index.mdx new file mode 100644 index 0000000000..f721ff8f16 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.skills/skill-base/index.mdx @@ -0,0 +1,329 @@ +--- +slug: "/reference/dotnet/signal-wire.skills/skill-base" +title: "SkillBase" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Skills.SkillBase" + parent: "SignalWire.Skills" + module: "SignalWire.Skills" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillBase.cs" + visibility: "public" +--- +# `SkillBase` + +Abstract base class for all skills. Provides lifecycle hooks, tool registration, +hint/globalData/prompt merging, and a <xref href="SignalWire.Skills.SkillBase.DefineTool(System.String%2cSystem.String%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%2cSystem.Func%7bSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%2cSignalWire.SWAIG.FunctionResult%7d)" data-throw-if-not-resolved="false"></xref> helper that +delegates to the owning agent. + +**Modifiers:** `abstract` + +## Signature + +```dotnet +public abstract class SkillBase +``` + +## Properties + + + + + + + + + + + + + Check whether prompt sections should be skipped. + + + + + + +## Methods + +### Cleanup() + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual void Cleanup() +``` + +#### Source + +[`src/SignalWire/Skills/SkillBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillBase.cs) + +Line 84. + +*** + +### DefineTool(string, string, Dictionary\, Func\, Dictionary\, FunctionResult>) + +Convenience wrapper that merges swaig\_fields and delegates to +AgentBase.DefineTool. + +#### Signature + +```dotnet +protected void DefineTool(string name, string description, Dictionary parameters, Func, Dictionary, FunctionResult> handler) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`src/SignalWire/Skills/SkillBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillBase.cs) + +Line 127. + +*** + +### GetGlobalData() + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual Dictionary GetGlobalData() +``` + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/Skills/SkillBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillBase.cs) + +Line 45. + +*** + +### GetHints() + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual List GetHints() +``` + +#### Returns + +`List` + +#### Source + +[`src/SignalWire/Skills/SkillBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillBase.cs) + +Line 43. + +*** + +### GetInstanceKey() + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual string GetInstanceKey() +``` + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/Skills/SkillBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillBase.cs) + +Line 33. + +*** + +### GetParameterSchema() + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual Dictionary GetParameterSchema() +``` + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/Skills/SkillBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillBase.cs) + +Line 56. + +*** + +### GetPromptSections() + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual List> GetPromptSections() +``` + +#### Returns + +`List>` + +#### Source + +[`src/SignalWire/Skills/SkillBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillBase.cs) + +Line 47. + +*** + +### GetToolName(string) + +Return the tool name override from params, or <code class="paramref">defaultName</code>. + +#### Signature + +```dotnet +protected string GetToolName(string defaultName) +``` + +#### Parameters + + + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/Skills/SkillBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillBase.cs) + +Line 147. + +*** + +### RegisterTools(AgentBase) + +**Modifiers:** `abstract` + +#### Signature + +```dotnet +public abstract void RegisterTools(AgentBase agent) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Skills/SkillBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillBase.cs) + +Line 23. + +*** + +### Setup(AgentBase, Dictionary\) + +**Modifiers:** `abstract` + +#### Signature + +```dotnet +public abstract bool Setup(AgentBase agent, Dictionary parameters) +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Skills/SkillBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillBase.cs) + +Line 22. + +*** + +### ValidateEnvVars() + +#### Signature + +```dotnet +public List ValidateEnvVars() +``` + +#### Returns + +`List` + +#### Source + +[`src/SignalWire/Skills/SkillBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillBase.cs) + +Line 106. + +*** + +### Wire(AgentBase, Dictionary\) + +#### Signature + +```dotnet +public void Wire(AgentBase agent, Dictionary parameters) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/Skills/SkillBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillBase.cs) + +Line 164. + +## Source + +[`src/SignalWire/Skills/SkillBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillBase.cs) + +Line 10. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.skills/skill-manager/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.skills/skill-manager/index.mdx new file mode 100644 index 0000000000..66925e6cdd --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.skills/skill-manager/index.mdx @@ -0,0 +1,180 @@ +--- +slug: "/reference/dotnet/signal-wire.skills/skill-manager" +title: "SkillManager" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Skills.SkillManager" + parent: "SignalWire.Skills" + module: "SignalWire.Skills" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillManager.cs" + visibility: "public" +--- +# `SkillManager` + +Loads, unloads, and queries skills on behalf of an <xref href="SignalWire.Agent.AgentBase" data-throw-if-not-resolved="false"></xref>. +Validates env vars, calls Setup/RegisterTools, and merges hints/globalData/prompts. + +**Modifiers:** `sealed` + +## Signature + +```dotnet +public sealed class SkillManager +``` + +## Properties + + + The skill\_manager logger (Python parity: `SkillManager.logger` instance attribute). + + +## Methods + +### GetSkill(string) + +#### Signature + +```dotnet +public SkillBase? GetSkill(string key) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Skills.SkillBase` + +#### Source + +[`src/SignalWire/Skills/SkillManager.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillManager.cs) + +Line 127. + +*** + +### HasSkill(string) + +#### Signature + +```dotnet +public bool HasSkill(string key) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Skills/SkillManager.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillManager.cs) + +Line 125. + +*** + +### ListSkills() + +#### Signature + +```dotnet +public List ListSkills() +``` + +#### Returns + +`List` + +#### Source + +[`src/SignalWire/Skills/SkillManager.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillManager.cs) + +Line 118. + +*** + +### LoadSkill(string, Dictionary\?) + +Load a skill by name (resolved via registry) or by explicit type. +Returns (success, errorMessage). + +#### Signature + +```dotnet +public (bool Success, string Error) LoadSkill(string skillName, Dictionary? parameters = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.ValueTuple` + +#### Source + +[`src/SignalWire/Skills/SkillManager.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillManager.cs) + +Line 31. + +*** + +### SkillManager(AgentBase) + +#### Signature + +```dotnet +public SkillManager(AgentBase agent) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Skills/SkillManager.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillManager.cs) + +Line 16. + +*** + +### UnloadSkill(string) + +#### Signature + +```dotnet +public bool UnloadSkill(string key) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Skills/SkillManager.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillManager.cs) + +Line 105. + +## Source + +[`src/SignalWire/Skills/SkillManager.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillManager.cs) + +Line 9. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.skills/skill-name-extensions/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.skills/skill-name-extensions/index.mdx new file mode 100644 index 0000000000..4ecf8dbbbc --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.skills/skill-name-extensions/index.mdx @@ -0,0 +1,61 @@ +--- +slug: "/reference/dotnet/signal-wire.skills/skill-name-extensions" +title: "SkillNameExtensions" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Skills.SkillNameExtensions" + parent: "SignalWire.Skills" + module: "SignalWire.Skills" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillName.cs" + visibility: "public" +--- +# `SkillNameExtensions` + +Maps <xref href="SignalWire.Skills.SkillName" data-throw-if-not-resolved="false"></xref> members to the canonical snake\_case wire names +that <xref href="SignalWire.Skills.SkillRegistry" data-throw-if-not-resolved="false"></xref> registers. + +**Modifiers:** `static` + +## Signature + +```dotnet +public static class SkillNameExtensions +``` + +## Methods + +### ToWireName(SkillName) + +The canonical snake\_case skill name (the string a skill's <code>Name</code> property returns and that <xref href="SignalWire.Skills.SkillRegistry" data-throw-if-not-resolved="false"></xref> keys on). + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static string ToWireName(this SkillName name) +``` + +#### Parameters + + + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/Skills/SkillName.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillName.cs) + +Line 118. + +## Source + +[`src/SignalWire/Skills/SkillName.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillName.cs) + +Line 90. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.skills/skill-registry/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.skills/skill-registry/index.mdx new file mode 100644 index 0000000000..e308f90fef --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.skills/skill-registry/index.mdx @@ -0,0 +1,189 @@ +--- +slug: "/reference/dotnet/signal-wire.skills/skill-registry" +title: "SkillRegistry" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Skills.SkillRegistry" + parent: "SignalWire.Skills" + module: "SignalWire.Skills" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillRegistry.cs" + visibility: "public" +--- +# `SkillRegistry` + +Thread-safe singleton that maps snake\_case skill names to factory delegates. +All 18 built-in skills are registered lazily on first access. + +**Modifiers:** `sealed` + +## Signature + +```dotnet +public sealed class SkillRegistry +``` + +## Properties + + + External skill-source paths added via <xref href="SignalWire.Skills.SkillRegistry.AddSkillDirectory(System.String)" data-throw-if-not-resolved="false"></xref>. + + + + + + The skill\_registry logger. (Python parity: `SkillRegistry.logger` instance attribute.) + + +## Methods + +### AddSkillDirectory(string) + +Add a directory to the external skill-source path list. +.NET ports loading skills from disk SHOULD consult this list. +Throws when the path does not exist or is not a directory. +(Python parity: `SkillRegistry.add_skill_directory(path)`.) + +#### Signature + +```dotnet +public void AddSkillDirectory(string path) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Skills/SkillRegistry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillRegistry.cs) + +Line 119. + +*** + +### DiscoverSkills() + +Discover and return all available skills. +Skills resolve on-demand, so there is nothing to eagerly register; +this returns the discoverable inventory (mirrors <xref href="SignalWire.Skills.SkillRegistry.ListSkills" data-throw-if-not-resolved="false"></xref>). +(Python parity: `SkillRegistry.discover_skills` now returns +`list_skills()` — it was a no-op until the reference stub was fixed.) + +#### Signature + +```dotnet +public List DiscoverSkills() +``` + +#### Returns + +`List` + +#### Source + +[`src/SignalWire/Skills/SkillRegistry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillRegistry.cs) + +Line 100. + +*** + +### GetFactory(string) + +Get the factory for a skill name. Checks custom registrations first, +then falls back to built-in factories. + +#### Signature + +```dotnet +public Func? GetFactory(string name) +``` + +#### Parameters + + + +#### Returns + +`System.Func` + +#### Source + +[`src/SignalWire/Skills/SkillRegistry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillRegistry.cs) + +Line 138. + +*** + +### ListSkills() + +Return all known skill names (builtins + custom), sorted. + +#### Signature + +```dotnet +public List ListSkills() +``` + +#### Returns + +`List` + +#### Source + +[`src/SignalWire/Skills/SkillRegistry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillRegistry.cs) + +Line 161. + +*** + +### RegisterSkill(string, Func\) + +Register a custom skill factory. + +#### Signature + +```dotnet +public void RegisterSkill(string name, Func factory) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/Skills/SkillRegistry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillRegistry.cs) + +Line 87. + +*** + +### Reset() + +Reset the singleton (for testing). + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static void Reset() +``` + +#### Source + +[`src/SignalWire/Skills/SkillRegistry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillRegistry.cs) + +Line 78. + +## Source + +[`src/SignalWire/Skills/SkillRegistry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillRegistry.cs) + +Line 9. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.swaig/callback-method-extensions/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.swaig/callback-method-extensions/index.mdx new file mode 100644 index 0000000000..c01293aad5 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.swaig/callback-method-extensions/index.mdx @@ -0,0 +1,62 @@ +--- +slug: "/reference/dotnet/signal-wire.swaig/callback-method-extensions" +title: "CallbackMethodExtensions" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.SWAIG.CallbackMethodExtensions" + parent: "SignalWire.SWAIG" + module: "SignalWire.SWAIG" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/CallbackMethod.cs" + visibility: "public" +--- +# `CallbackMethodExtensions` + +Maps <xref href="SignalWire.SWAIG.CallbackMethod" data-throw-if-not-resolved="false"></xref> members to the canonical wire values +(uppercase HTTP verbs) that the SWML <code>join\_conference</code> action expects on +its <code>status\_callback\_method</code> / <code>recording\_status\_callback\_method</code> keys. + +**Modifiers:** `static` + +## Signature + +```dotnet +public static class CallbackMethodExtensions +``` + +## Methods + +### ToWireName(CallbackMethod) + +The canonical HTTP-verb string for the callback-method keys. + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static string ToWireName(this CallbackMethod method) +``` + +#### Parameters + + + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/SWAIG/CallbackMethod.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/CallbackMethod.cs) + +Line 44. + +## Source + +[`src/SignalWire/SWAIG/CallbackMethod.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/CallbackMethod.cs) + +Line 35. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.swaig/codec-extensions/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.swaig/codec-extensions/index.mdx new file mode 100644 index 0000000000..8203aa86a5 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.swaig/codec-extensions/index.mdx @@ -0,0 +1,62 @@ +--- +slug: "/reference/dotnet/signal-wire.swaig/codec-extensions" +title: "CodecExtensions" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.SWAIG.CodecExtensions" + parent: "SignalWire.SWAIG" + module: "SignalWire.SWAIG" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/Codec.cs" + visibility: "public" +--- +# `CodecExtensions` + +Maps <xref href="SignalWire.SWAIG.Codec" data-throw-if-not-resolved="false"></xref> members to the canonical wire values that the SWML <code>tap</code> action expects. + +**Modifiers:** `static` + +## Signature + +```dotnet +public static class CodecExtensions +``` + +## Methods + +### ToWireName(Codec) + +The canonical codec string (the value placed on the <code>tap.codec</code> key +in the emitted SWML). The strings are upper-case and matched exactly, +mirroring the Python reference's literal <code>\["PCMU", "PCMA"]</code> check. + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static string ToWireName(this Codec codec) +``` + +#### Parameters + + + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/SWAIG/Codec.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/Codec.cs) + +Line 63. + +## Source + +[`src/SignalWire/SWAIG/Codec.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/Codec.cs) + +Line 50. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.swaig/conference-beep-extensions/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.swaig/conference-beep-extensions/index.mdx new file mode 100644 index 0000000000..4cb67c2ded --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.swaig/conference-beep-extensions/index.mdx @@ -0,0 +1,61 @@ +--- +slug: "/reference/dotnet/signal-wire.swaig/conference-beep-extensions" +title: "ConferenceBeepExtensions" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.SWAIG.ConferenceBeepExtensions" + parent: "SignalWire.SWAIG" + module: "SignalWire.SWAIG" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ConferenceBeep.cs" + visibility: "public" +--- +# `ConferenceBeepExtensions` + +Maps <xref href="SignalWire.SWAIG.ConferenceBeep" data-throw-if-not-resolved="false"></xref> members to the canonical wire values that +the SWML <code>join\_conference</code> action expects on its <code>beep</code> key. + +**Modifiers:** `static` + +## Signature + +```dotnet +public static class ConferenceBeepExtensions +``` + +## Methods + +### ToWireName(ConferenceBeep) + +The canonical beep string placed on the <code>join\_conference.beep</code> key. + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static string ToWireName(this ConferenceBeep beep) +``` + +#### Parameters + + + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/SWAIG/ConferenceBeep.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ConferenceBeep.cs) + +Line 53. + +## Source + +[`src/SignalWire/SWAIG/ConferenceBeep.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ConferenceBeep.cs) + +Line 42. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.swaig/conference-record-extensions/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.swaig/conference-record-extensions/index.mdx new file mode 100644 index 0000000000..108dd9f0cf --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.swaig/conference-record-extensions/index.mdx @@ -0,0 +1,61 @@ +--- +slug: "/reference/dotnet/signal-wire.swaig/conference-record-extensions" +title: "ConferenceRecordExtensions" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.SWAIG.ConferenceRecordExtensions" + parent: "SignalWire.SWAIG" + module: "SignalWire.SWAIG" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ConferenceRecord.cs" + visibility: "public" +--- +# `ConferenceRecordExtensions` + +Maps <xref href="SignalWire.SWAIG.ConferenceRecord" data-throw-if-not-resolved="false"></xref> members to the canonical wire values that +the SWML <code>join\_conference</code> action expects on its <code>record</code> key. + +**Modifiers:** `static` + +## Signature + +```dotnet +public static class ConferenceRecordExtensions +``` + +## Methods + +### ToWireName(ConferenceRecord) + +The canonical record string placed on the <code>join\_conference.record</code> key. + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static string ToWireName(this ConferenceRecord record) +``` + +#### Parameters + + + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/SWAIG/ConferenceRecord.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ConferenceRecord.cs) + +Line 45. + +## Source + +[`src/SignalWire/SWAIG/ConferenceRecord.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ConferenceRecord.cs) + +Line 36. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.swaig/conference-trim-extensions/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.swaig/conference-trim-extensions/index.mdx new file mode 100644 index 0000000000..cb2c307e0d --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.swaig/conference-trim-extensions/index.mdx @@ -0,0 +1,61 @@ +--- +slug: "/reference/dotnet/signal-wire.swaig/conference-trim-extensions" +title: "ConferenceTrimExtensions" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.SWAIG.ConferenceTrimExtensions" + parent: "SignalWire.SWAIG" + module: "SignalWire.SWAIG" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ConferenceTrim.cs" + visibility: "public" +--- +# `ConferenceTrimExtensions` + +Maps <xref href="SignalWire.SWAIG.ConferenceTrim" data-throw-if-not-resolved="false"></xref> members to the canonical wire values that +the SWML <code>join\_conference</code> action expects on its <code>trim</code> key. + +**Modifiers:** `static` + +## Signature + +```dotnet +public static class ConferenceTrimExtensions +``` + +## Methods + +### ToWireName(ConferenceTrim) + +The canonical trim string placed on the <code>join\_conference.trim</code> key. + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static string ToWireName(this ConferenceTrim trim) +``` + +#### Parameters + + + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/SWAIG/ConferenceTrim.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ConferenceTrim.cs) + +Line 42. + +## Source + +[`src/SignalWire/SWAIG/ConferenceTrim.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ConferenceTrim.cs) + +Line 33. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.swaig/function-result/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.swaig/function-result/index.mdx new file mode 100644 index 0000000000..45b7a1267e --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.swaig/function-result/index.mdx @@ -0,0 +1,1768 @@ +--- +slug: "/reference/dotnet/signal-wire.swaig/function-result" +title: "FunctionResult" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.SWAIG.FunctionResult" + parent: "SignalWire.SWAIG" + module: "SignalWire.SWAIG" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs" + visibility: "public" +--- +# `FunctionResult` + +Builds a SWAIG function result with an optional response, actions, and post-processing flag. +All action methods return <code>this</code> for fluent chaining. + +## Signature + +```dotnet +public class FunctionResult +``` + +## Methods + +### AddAction + +Append an action with the given name and arbitrary data +payload. Matches Python's `add_action(name, data)`. + +#### Signature + + + + ```dotnet + public FunctionResult AddAction(string name, object data) + ``` + + + + ```dotnet + public FunctionResult AddAction(Dictionary action) + ``` + + + +#### Parameters (Overload 1) + + + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`SignalWire.SWAIG.FunctionResult` + +#### Returns (Overload 2) + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 38. + +*** + +### AddActions(IEnumerable\>) + +#### Signature + +```dotnet +public FunctionResult AddActions(IEnumerable> actions) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 52. + +*** + +### AddDynamicHints(List\) + +#### Signature + +```dotnet +public FunctionResult AddDynamicHints(List hints) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 615. + +*** + +### ClearDynamicHints() + +#### Signature + +```dotnet +public FunctionResult ClearDynamicHints() +``` + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 621. + +*** + +### Connect(string, bool, string?) + +#### Signature + +```dotnet +public FunctionResult Connect(string destination, bool final = true, string? fromAddr = null) +``` + +#### Parameters + + + + + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 108. + +*** + +### CreatePaymentAction(string, string) + +Create a payment action for use in payment prompts. + +**Remarks:** Parity with the Python reference <code>create\_payment\_action(action\_type, phrase)</code>: +returns <code>\{"type": actionType, "phrase": phrase\}</code>. <code class="paramref">actionType</code> +is <code>"Say"</code> (text-to-speech) or <code>"Play"</code> (audio file URL). + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static Dictionary CreatePaymentAction(string actionType, string phrase) +``` + +#### Parameters + + + + + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 1376. + +*** + +### CreatePaymentParameter(string, string) + +Create a payment parameter (name/value pair) for use with <xref href="SignalWire.SWAIG.FunctionResult.Pay(System.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.Int32%2cSystem.Int32%2cSystem.Boolean%2cSystem.Object%2cSystem.Int32%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.Collections.Generic.List%7bSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.String%7d%7d%2cSystem.Collections.Generic.List%7bSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%7d%2cSystem.String)" data-throw-if-not-resolved="false"></xref>. + +**Remarks:** Parity with the Python reference <code>create\_payment\_parameter(name, value)</code>: +returns <code>\{"name": name, "value": value\}</code>. + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static Dictionary CreatePaymentParameter(string name, string value) +``` + +#### Parameters + + + + + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 1392. + +*** + +### CreatePaymentPrompt(string, List\>, string?, string?) + +Create a payment-prompt structure for use with <xref href="SignalWire.SWAIG.FunctionResult.Pay(System.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.Int32%2cSystem.Int32%2cSystem.Boolean%2cSystem.Object%2cSystem.Int32%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.Collections.Generic.List%7bSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.String%7d%7d%2cSystem.Collections.Generic.List%7bSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%7d%2cSystem.String)" data-throw-if-not-resolved="false"></xref>. + +**Remarks:** Parity with the Python reference <code>create\_payment\_prompt(for\_situation, actions, card\_type=None, error\_type=None)</code>: +returns <code>\{"for": forSituation, "actions": actions, "card\_type"?, "error\_type"?\}</code>. +The situation string is keyed <code>for</code> (a C# keyword, hence the parameter +is <code class="paramref">forSituation</code>); <code>card\_type</code>/<code>error\_type</code> are +included only when supplied. + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static Dictionary CreatePaymentPrompt(string forSituation, List> actions, string? cardType = null, string? errorType = null) +``` + +#### Parameters + + + + + Actions with <code>type</code>/<code>phrase</code> keys (see <xref href="SignalWire.SWAIG.FunctionResult.CreatePaymentAction(System.String%2cSystem.String)" data-throw-if-not-resolved="false"></xref>). + + + + + + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 1350. + +*** + +### EnableExtensiveData(bool) + +#### Signature + +```dotnet +public FunctionResult EnableExtensiveData(bool enabled = true) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 667. + +*** + +### EnableFunctionsOnTimeout(bool) + +#### Signature + +```dotnet +public FunctionResult EnableFunctionsOnTimeout(bool enabled = true) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 660. + +*** + +### ExecuteRpc(string, Dictionary\?, string?, string?) + +Execute an RPC method on a call using SWML. + +**Remarks:** Parity with the Python reference <code>execute\_rpc(method, params=None, call\_id=None, node\_id=None)</code>: the +rpc params dict is keyed <code>\{method, call\_id?, node\_id?, params?\}</code> — <code>call\_id</code>/<code>node\_id</code> are TOP-LEVEL siblings of <code>method</code>/<code>params</code>, +NOT nested inside <code>params</code> — and the <code>\{execute\_rpc: …\}</code> verb is +wrapped in a full SWML document under the <code>SWML</code> action key. There is +no <code>jsonrpc</code> envelope, and method strings are bare (e.g. <code>"dial"</code>, +not <code>"calling.dial"</code>). <code>params</code> is omitted when empty. + +#### Signature + +```dotnet +public FunctionResult ExecuteRpc(string method, Dictionary? @params = null, string? callId = null, string? nodeId = null) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 1241. + +*** + +### ExecuteSwml(object, bool) + +Execute SWML content with optional transfer behavior. + +**Remarks:** Mirrors the Python reference <code>execute\_swml(swml\_content, transfer=False)</code>: +the content (a dict, or a JSON string parsed to a dict) is emitted verbatim +under the <code>SWML</code> action key. When <code class="paramref">transfer</code> is true, +a <code>"transfer": "true"</code> entry is added INSIDE that SWML dict (Python does <code>action\["transfer"] = "true"</code> on the SWML payload itself — there is no +separate <code>transfer\_swml</code> action name). A JSON string that fails to parse +is wrapped as <code>\{ "raw\_swml": \ \}</code>, matching the reference. + +#### Signature + +```dotnet +public FunctionResult ExecuteSwml(object swmlContent, bool transfer = false) +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Throws + +- `System.ArgumentException` — If <code class="paramref">swmlContent</code> is neither a string nor a dictionary (parity with Python's <code>TypeError</code>). + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 701. + +*** + +### FunctionResult(string?, bool) + +#### Signature + +```dotnet +public FunctionResult(string? response = null, bool postProcess = false) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 14. + +*** + +### Hangup() + +#### Signature + +```dotnet +public FunctionResult Hangup() +``` + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 172. + +*** + +### Hold(int) + +#### Signature + +```dotnet +public FunctionResult Hold(int timeout = 300) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 180. + +*** + +### JoinConference + +Join an ad-hoc audio conference (RELAY + CXML calls) using SWML. +Full parity with the Python reference <code>signalwire/core/function\_result.py::join\_conference</code>: the conference <code class="paramref">name</code> plus 18 optional parameters, each validated to the +same closed sets / bounds as Python, and emitted under its snake\_case wire +key only when it differs from its default. When every parameter is at its +default the action value is the bare conference-name string (simple form); +otherwise it is a <code>\{ "name": ..., ... \}</code> object (full form). + +**Remarks:** This flat, all-string overload is the parity-bearing signature against the +Python reference (which takes bare <code>str</code> arguments for the closed sets). +For an idiomatic, compile-time-checked alternative see <xref href="SignalWire.SWAIG.FunctionResult.JoinConference(System.String%2cSignalWire.SWAIG.JoinConferenceOptions)" data-throw-if-not-resolved="false"></xref>, which accepts +the typed <xref href="SignalWire.SWAIG.ConferenceBeep" data-throw-if-not-resolved="false"></xref> / <xref href="SignalWire.SWAIG.ConferenceRecord" data-throw-if-not-resolved="false"></xref> / <xref href="SignalWire.SWAIG.ConferenceTrim" data-throw-if-not-resolved="false"></xref> / <xref href="SignalWire.SWAIG.CallbackMethod" data-throw-if-not-resolved="false"></xref> enums and +delegates straight here so the emitted SWML is identical. + +#### Signature + + + + ```dotnet + public FunctionResult JoinConference(string name, bool muted = false, string beep = "true", bool startOnEnter = true, bool endOnExit = false, string? waitUrl = null, int maxParticipants = 250, string record = "do-not-record", string? region = null, string trim = "trim-silence", string? coach = null, string? statusCallbackEvent = null, string? statusCallback = null, string statusCallbackMethod = "POST", string? recordingStatusCallback = null, string recordingStatusCallbackMethod = "POST", string recordingStatusCallbackEvent = "completed", object? result = null) + ``` + + + + ```dotnet + public FunctionResult JoinConference(string name, JoinConferenceOptions? options) + ``` + + + +#### Parameters (Overload 1) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`SignalWire.SWAIG.FunctionResult` + +#### Returns (Overload 2) + +`SignalWire.SWAIG.FunctionResult` + +#### Throws + +- `System.ArgumentException` — If <code class="paramref">beep</code>, <code class="paramref">record</code>, <code class="paramref">trim</code>, <code class="paramref">statusCallbackMethod</code>, or <code class="paramref">recordingStatusCallbackMethod</code> is outside its closed set, if <code class="paramref">maxParticipants</code> is not in 1..=250, or if <code class="paramref">name</code> is empty/whitespace. + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 786. + +*** + +### JoinRoom(string) + +Join a RELAY room using SWML. + +**Remarks:** Parity with the Python reference <code>join\_room(name)</code>: the <code>join\_room</code> verb (params <code>\{name\}</code>) is wrapped in a SWML document +and emitted under the <code>SWML</code> action key. + +#### Signature + +```dotnet +public FunctionResult JoinRoom(string name) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 931. + +*** + +### Pay(string, string, string?, string, int, int, bool, object?, int, string, string?, string, string, string, string?, string, List\>?, List\>?, string?) + +Process a payment using the SWML <code>pay</code> verb. + +**Remarks:** Full parity with the Python reference <code>pay(payment\_connector\_url, input\_method="dtmf", status\_url=None, +payment\_method="credit-card", timeout=5, max\_attempts=1, security\_code=True, +postal\_code=True, min\_postal\_code\_length=0, token\_type="reusable", +charge\_amount=None, currency="usd", language="en-US", voice="woman", +description=None, valid\_card\_types="visa mastercard amex", parameters=None, +prompts=None, ai\_response=…)</code>. The SWML document is a two-verb main +section — a leading <code>\{set: \{ai\_response: …\}\}</code> followed by <code>\{pay: …\}</code> — routed through <xref href="SignalWire.SWAIG.FunctionResult.ExecuteSwml(System.Object%2cSystem.Boolean)" data-throw-if-not-resolved="false"></xref> under the <code>SWML</code> action key (NOT a bare top-level <code>pay</code>). + +<p> +Wire-shape details matching Python: the collection-method key is +<code>input</code> (NOT <code>input_method</code>); numeric and boolean fields are +emitted as STRINGS (<code>"5"</code>/<code>"true"</code>); <code class="paramref">postalCode</code> +is a lowercased bool-string when boolean, or verbatim when a string. The +optional fields (status_url/charge_amount/description/parameters/prompts) +are emitted only when supplied. +</p> + +#### Signature + +```dotnet +public FunctionResult Pay(string paymentConnectorUrl, string inputMethod = "dtmf", string? statusUrl = null, string paymentMethod = "credit-card", int timeout = 5, int maxAttempts = 1, bool securityCode = true, object? postalCode = null, int minPostalCodeLength = 0, string tokenType = "reusable", string? chargeAmount = null, string currency = "usd", string language = "en-US", string voice = "woman", string? description = null, string validCardTypes = "visa mastercard amex", List>? parameters = null, List>? prompts = null, string? aiResponse = "The payment status is ${pay_result}, do not mention anything else about collecting payment if successful.") +``` + +#### Parameters + + + + + + + + + + + + + + + + + Prompt-for-postal flag (<code>bool</code>) or an actual postcode (<code>string</code>); pass a <xref href="System.Boolean" data-throw-if-not-resolved="false"></xref> or a <xref href="System.String" data-throw-if-not-resolved="false"></xref>. + + + + + + + + + + + + + + + + + + + + Name/value pairs forwarded to the payment connector. + + + + Custom prompt configurations (see <xref href="SignalWire.SWAIG.FunctionResult.CreatePaymentPrompt(System.String%2cSystem.Collections.Generic.List%7bSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.String%7d%7d%2cSystem.String%2cSystem.String)" data-throw-if-not-resolved="false"></xref>). + + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 1154. + +*** + +### PlayBackgroundFile(string, bool) + +Play an audio or video file in the background. + +**Remarks:** Parity with the Python reference <code>play\_background\_file(filename, wait=False)</code>: +the action key is "playback\_bg". When <code class="paramref">wait</code> is false the +value is the bare filename string; when true it is a <code>\{file: filename, wait: true\}</code> object. + +#### Signature + +```dotnet +public FunctionResult PlayBackgroundFile(string filename, bool wait = false) +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 427. + +*** + +### RecordCall + +Start background call recording using SWML — canonical, full-arity +overload with the two closed-set arguments (<code class="paramref">format</code> / <code class="paramref">direction</code>) as the typed <xref href="SignalWire.SWAIG.RecordFormat" data-throw-if-not-resolved="false"></xref> / <xref href="SignalWire.SWAIG.RecordDirection" data-throw-if-not-resolved="false"></xref> enums. + +**Remarks:** Full parity with the Python reference <code>record\_call(control\_id, stereo, format, direction, terminators, beep, +input\_sensitivity, initial\_timeout, end\_silence\_timeout, max\_length, +status\_url)</code>, in the same parameter order. The Python reference +validates the bare-string <code>format</code>/<code>direction</code> against the closed +sets \{wav,mp3,mp4\} / \{speak,listen,both\}; this overload surfaces those +knowable sets as enums so a bad value is a compile error rather than a +runtime <code>ValueError</code> (a same-arity bare-string overload preserves the +Python <code>str</code> path — see <xref href="SignalWire.SWAIG.FunctionResult.RecordCall(System.String%2cSystem.Boolean%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.Boolean%2cSystem.Double%2cSystem.Nullable%7bSystem.Double%7d%2cSystem.Nullable%7bSystem.Double%7d%2cSystem.Nullable%7bSystem.Double%7d%2cSystem.String)" data-throw-if-not-resolved="false"></xref>). +The <code>record\_call</code> verb is wrapped in a SWML document +(<code>\{version, sections: \{main: \[\{record\_call: ...\}]\}\}</code>) and emitted under +the <code>SWML</code> action key — there is no bare top-level <code>record\_call</code> +action and no invented <code>initiator</code> key. <code>stereo</code>, <code>format</code>, <code>direction</code>, <code>beep</code>, and <code>input\_sensitivity</code> are ALWAYS +emitted (Python emits them unconditionally); the remaining parameters are +emitted only when set. + +#### Signature + + + + ```dotnet + public FunctionResult RecordCall(string controlId = "", bool stereo = false, RecordFormat format = RecordFormat.Wav, RecordDirection direction = RecordDirection.Both, string? terminators = null, bool beep = false, double inputSensitivity = 44, double? initialTimeout = null, double? endSilenceTimeout = null, double? maxLength = null, string? statusUrl = null) + ``` + + + + ```dotnet + public FunctionResult RecordCall(string controlId = "", bool stereo = false, string format = "wav", string direction = "both", string? terminators = null, bool beep = false, double inputSensitivity = 44, double? initialTimeout = null, double? endSilenceTimeout = null, double? maxLength = null, string? statusUrl = null) + ``` + + + +#### Parameters (Overload 1) + + + + + + + + + + + + + + + + + + + + + + + +#### Parameters (Overload 2) + + + + + + + + + + + + + + + + + + + + + + + +#### Returns (Overload 1) + +`SignalWire.SWAIG.FunctionResult` + +#### Returns (Overload 2) + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 478. + +*** + +### RemoveGlobalData + +Single-key overload of <xref href="SignalWire.SWAIG.FunctionResult.RemoveGlobalData(System.Collections.Generic.List%7bSystem.String%7d)" data-throw-if-not-resolved="false"></xref>. + +**Remarks:** Python's <code>remove\_global\_data(keys: Union\[str, List\[str]])</code> accepts a +bare string AND a list; the bare-string call emits the action value as the +bare string (<code>\{"unset\_global\_data": "plan"\}</code>), NOT a one-element list. +This overload surfaces that arm so the emission is byte-identical to the +reference for a single key. + +#### Signature + + + + ```dotnet + public FunctionResult RemoveGlobalData(List keys) + ``` + + + + ```dotnet + public FunctionResult RemoveGlobalData(string key) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`SignalWire.SWAIG.FunctionResult` + +#### Returns (Overload 2) + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 231. + +*** + +### RemoveMetadata + +Single-key overload of <xref href="SignalWire.SWAIG.FunctionResult.RemoveMetadata(System.Collections.Generic.List%7bSystem.String%7d)" data-throw-if-not-resolved="false"></xref>. + +**Remarks:** Python's <code>remove\_metadata(keys: Union\[str, List\[str]])</code> accepts a bare +string AND a list; the bare-string call emits the action value as the bare +string (<code>\{"unset\_meta\_data": "token"\}</code>), NOT a one-element list. This +overload surfaces that arm so the emission is byte-identical to the +reference for a single key. + +#### Signature + + + + ```dotnet + public FunctionResult RemoveMetadata(List keys) + ``` + + + + ```dotnet + public FunctionResult RemoveMetadata(string key) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`SignalWire.SWAIG.FunctionResult` + +#### Returns (Overload 2) + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 262. + +*** + +### ReplaceInHistory(object?) + +Replace conversation history. Accepts `true` (default) for the +summary placeholder or a string for custom replacement text. +Matches Python's `replace_in_history(text: Union[bool, str] = True)`. + +#### Signature + +```dotnet +public FunctionResult ReplaceInHistory(object? text = null) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 398. + +*** + +### RpcAiMessage(string, string, string) + +Inject a message into an AI agent on another call using <xref href="SignalWire.SWAIG.FunctionResult.ExecuteRpc(System.String%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%2cSystem.String%2cSystem.String)" data-throw-if-not-resolved="false"></xref>. + +**Remarks:** Parity with the Python reference <code>rpc\_ai\_message(call\_id, message\_text, role="system")</code>: emits <code>method="ai\_message"</code>, <code>call\_id</code> as a top-level sibling, and <code>params=\{role, message\_text\}</code>. <code class="paramref">role</code> remains +caller-overridable (defaults to <code>"system"</code>), not hard-coded. + +#### Signature + +```dotnet +public FunctionResult RpcAiMessage(string callId, string messageText, string role = "system") +``` + +#### Parameters + + + + + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 1298. + +*** + +### RpcAiUnhold(string) + +Unhold another call using <xref href="SignalWire.SWAIG.FunctionResult.ExecuteRpc(System.String%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%2cSystem.String%2cSystem.String)" data-throw-if-not-resolved="false"></xref>. + +**Remarks:** Parity with the Python reference <code>rpc\_ai\_unhold(call\_id)</code>: emits <code>method="ai\_unhold"</code>, <code>call\_id</code> as a top-level sibling, and <code>params=\{\}</code> (empty → omitted by <xref href="SignalWire.SWAIG.FunctionResult.ExecuteRpc(System.String%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%2cSystem.String%2cSystem.String)" data-throw-if-not-resolved="false"></xref>). + +#### Signature + +```dotnet +public FunctionResult RpcAiUnhold(string callId) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 1315. + +*** + +### RpcDial(string, string, string, string) + +Dial out to a number with a destination SWML URL using <xref href="SignalWire.SWAIG.FunctionResult.ExecuteRpc(System.String%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%2cSystem.String%2cSystem.String)" data-throw-if-not-resolved="false"></xref>. + +**Remarks:** Parity with the Python reference <code>rpc\_dial(to\_number, from\_number, dest\_swml, device\_type="phone")</code>: +emits <code>method="dial"</code> with <code>params=\{devices: \{type: device\_type, params: \{to\_number, from\_number\}\}, dest\_swml\}</code>. <code class="paramref">deviceType</code> remains caller-overridable (defaults to <code>"phone"</code>), not hard-coded. + +#### Signature + +```dotnet +public FunctionResult RpcDial(string toNumber, string fromNumber, string destSwml, string deviceType = "phone") +``` + +#### Parameters + + + + + + + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 1267. + +*** + +### Say(string) + +#### Signature + +```dotnet +public FunctionResult Say(string text) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 412. + +*** + +### SendSms(string, string, string?, List\?, List\?, string?) + +Send a text message to a PSTN phone number using SWML. + +**Remarks:** Full parity with the Python reference <code>send\_sms(to\_number, from\_number, body=None, media=None, tags=None, region=None)</code>. +Either <code class="paramref">body</code> or <code class="paramref">media</code> (or both) must be +provided. The <code>send\_sms</code> verb is wrapped in a SWML document and emitted +under the <code>SWML</code> action key. <code>to\_number</code>/<code>from\_number</code> are +always present; <code>body</code>, <code>media</code>, <code>tags</code>, <code>region</code> are +added only when set. + +#### Signature + +```dotnet +public FunctionResult SendSms(string toNumber, string fromNumber, string? body = null, List? media = null, List? tags = null, string? region = null) +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Throws + +- `System.ArgumentException` — If neither <code class="paramref">body</code> nor <code class="paramref">media</code> is provided (parity with Python's <code>ValueError("Either body or media must be provided")</code>). + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 1099. + +*** + +### SetEndOfSpeechTimeout(int) + +#### Signature + +```dotnet +public FunctionResult SetEndOfSpeechTimeout(int ms) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 632. + +*** + +### SetMetadata(Dictionary\) + +#### Signature + +```dotnet +public FunctionResult SetMetadata(Dictionary data) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 256. + +*** + +### SetPostProcess(bool) + +#### Signature + +```dotnet +public FunctionResult SetPostProcess(bool value) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 30. + +*** + +### SetResponse(string) + +#### Signature + +```dotnet +public FunctionResult SetResponse(string text) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 24. + +*** + +### SetSpeechEventTimeout(int) + +#### Signature + +```dotnet +public FunctionResult SetSpeechEventTimeout(int ms) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 638. + +*** + +### SimulateUserInput(string) + +Queue simulated user input. + +**Remarks:** Parity with the Python reference <code>simulate\_user\_input(text)</code>: the +action key is <code>user\_input</code> (NOT <code>simulate\_user\_input</code>), with the +bare text string as its value. + +#### Signature + +```dotnet +public FunctionResult SimulateUserInput(string text) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 1328. + +*** + +### SipRefer(string) + +Send a SIP REFER to a SIP call using SWML. + +**Remarks:** Parity with the Python reference <code>sip\_refer(to\_uri)</code>: the <code>sip\_refer</code> verb (params <code>\{to\_uri\}</code>) is wrapped in a SWML document +and emitted under the <code>SWML</code> action key. + +#### Signature + +```dotnet +public FunctionResult SipRefer(string toUri) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 942. + +*** + +### Stop() + +#### Signature + +```dotnet +public FunctionResult Stop() +``` + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 215. + +*** + +### StopBackgroundFile() + +#### Signature + +```dotnet +public FunctionResult StopBackgroundFile() +``` + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 447. + +*** + +### StopRecordCall(string?) + +Stop an active background call recording using SWML. + +**Remarks:** Parity with the Python reference <code>stop\_record\_call(control\_id=None)</code>: +the <code>stop\_record\_call</code> verb (params <code>\{\}</code>, plus <code>control\_id</code> +when set) is wrapped in a SWML document and emitted under the <code>SWML</code> +action key. + +#### Signature + +```dotnet +public FunctionResult StopRecordCall(string? controlId = null) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 604. + +*** + +### StopTap(string?) + +Stop an active tap stream using SWML. + +**Remarks:** Parity with the Python reference <code>stop\_tap(control\_id=None)</code>: the <code>stop\_tap</code> verb (params <code>\{\}</code>, plus <code>control\_id</code> when set) is +wrapped in a SWML document and emitted under the <code>SWML</code> action key. + +#### Signature + +```dotnet +public FunctionResult StopTap(string? controlId = null) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 1076. + +*** + +### SwitchContext(string?, string?, bool, bool) + +Change the agent's context/prompt during a conversation. + +**Remarks:** Parity with the Python reference <code>switch\_context(system\_prompt=None, user\_prompt=None, consolidate=False, full\_reset=False)</code>: +when ONLY <code class="paramref">systemPrompt</code> is set (and the other three are +at their defaults) the <code>context\_switch</code> value is the bare +system-prompt string (simple form); any other combination emits the object +form with each supplied field under its snake\_case key. There is no <code>isolated</code> parameter (the Python reference does not define one). + +#### Signature + +```dotnet +public FunctionResult SwitchContext(string? systemPrompt = null, string? userPrompt = null, bool consolidate = false, bool fullReset = false) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 353. + +*** + +### SwmlChangeContext(string) + +Force the conversation into a different context. + +**Remarks:** Parity with the Python reference <code>swml\_change\_context(context\_name)</code>: +add\_action("change\_context", context\_name) — the action key is +"change\_context" and its value is the bare context-name string. + +#### Signature + +```dotnet +public FunctionResult SwmlChangeContext(string contextName) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 335. + +*** + +### SwmlChangeStep(string) + +Force the conversation into a specific step in the current context. + +**Remarks:** Parity with the Python reference <code>swml\_change\_step(step\_name)</code>: +add\_action("change\_step", step\_name) — the action key is "change\_step" and +its value is the bare step-name string (not a context\_switch dict). + +#### Signature + +```dotnet +public FunctionResult SwmlChangeStep(string stepName) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 321. + +*** + +### SwmlTransfer(string, string, bool) + +Add a SWML transfer action with an AI response set up for when the transfer +completes and control returns to the agent. + +**Remarks:** Parity with the Python reference <code>swml\_transfer(dest, ai\_response, final=True)</code>: +emits a two-verb SWML document — <code>\{set: \{ai\_response: ...\}\}</code> then <code>\{transfer: \{dest: ...\}\}</code> — under the <code>SWML</code> action key, plus a +top-level <code>"transfer": str(final).lower()</code> sibling marking the call +(non-)final. <code class="paramref">final</code> defaults to <code>true</code> (permanent +transfer), same as <xref href="SignalWire.SWAIG.FunctionResult.Connect(System.String%2cSystem.Boolean%2cSystem.String)" data-throw-if-not-resolved="false"></xref>. + +#### Signature + +```dotnet +public FunctionResult SwmlTransfer(string dest, string aiResponse, bool final = true) +``` + +#### Parameters + + + + + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 149. + +*** + +### SwmlUserEvent(Dictionary\) + +Send a user event through SWML to update the client UI. + +**Remarks:** Parity with the Python reference <code>swml\_user\_event(event\_data)</code>: emits a +SWML document <code>\{sections: \{main: \[\{user\_event: \{event: \\}\}]\}, version: "1.0.0"\}</code> +under the <code>SWML</code> action key (NOT a bare top-level <code>user\_event</code>). + +#### Signature + +```dotnet +public FunctionResult SwmlUserEvent(Dictionary eventData) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 294. + +*** + +### Tap + +Start a background call tap using SWML — canonical, full-arity overload +with the two closed-set arguments (<code class="paramref">direction</code> / <code class="paramref">codec</code>) as the typed <xref href="SignalWire.SWAIG.TapDirection" data-throw-if-not-resolved="false"></xref> / <xref href="SignalWire.SWAIG.Codec" data-throw-if-not-resolved="false"></xref> enums. + +**Remarks:** Full parity with the Python reference <code>tap(uri, control\_id, direction, codec, rtp\_ptime, status\_url)</code>, in the +same parameter order. The Python reference validates the bare-string <code>direction</code>/<code>codec</code> against the closed sets \{speak,hear,both\} / +\{PCMU,PCMA\}; this overload surfaces those knowable sets as enums so a bad +value is a compile error rather than a runtime <code>ValueError</code> (a +same-arity bare-string overload preserves the Python <code>str</code> path — see <xref href="SignalWire.SWAIG.FunctionResult.Tap(System.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.Int32%2cSystem.String)" data-throw-if-not-resolved="false"></xref>). The <code>tap</code> verb is wrapped in a SWML document and emitted under the <code>SWML</code> action key. Only <code>uri</code> is always present; <code>control\_id</code>, <code>direction</code>, <code>codec</code>, <code>rtp\_ptime</code>, and <code>status\_url</code> are +emitted only when they differ from their defaults (mirrors Python's per-key +guards). + +#### Signature + + + + ```dotnet + public FunctionResult Tap(string uri, string controlId = "", TapDirection direction = TapDirection.Both, Codec codec = Codec.Pcmu, int rtpPtime = 20, string? statusUrl = null) + ``` + + + + ```dotnet + public FunctionResult Tap(string uri, string controlId = "", string direction = "both", string codec = "PCMU", int rtpPtime = 20, string? statusUrl = null) + ``` + + + +#### Parameters (Overload 1) + + + + + + + + + + + + + +#### Parameters (Overload 2) + + + + + + + + + + + + + +#### Returns (Overload 1) + +`SignalWire.SWAIG.FunctionResult` + +#### Returns (Overload 2) + +`SignalWire.SWAIG.FunctionResult` + +#### Throws + +- `System.ArgumentException` — If <code class="paramref">rtpPtime</code> is not a positive integer (parity with Python's <code>ValueError</code>); <code class="paramref">direction</code>/<code class="paramref">codec</code> are closed-set enums and so cannot be invalid. + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 971. + +*** + +### ToDict() + +Serialize to the JSON structure expected by SWAIG. + +**Remarks:** Byte-parity with the Python reference <code>to\_dict()</code>: + +<ul><li><code>response</code> is included ONLY when non-empty (an empty string is omitted).</li><li><code>action</code> is included only when there is at least one action.</li><li><code>post_process</code> is included only when it is <code>true</code> AND there are +actions to execute (it is meaningless without actions).</li><li>When neither <code>response</code> nor <code>action</code> would be present, a default +<code>response</code> of <code>"Action completed."</code> is emitted so the result is never empty.</li></ul> + +#### Signature + +```dotnet +public Dictionary ToDict() +``` + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 75. + +*** + +### ToggleFunctions(List\>) + +Enable/disable specific SWAIG functions. + +**Remarks:** Parity with the Python reference <code>toggle\_functions(function\_toggles)</code>: +takes a list of toggle records (each a <code>\{function, active\}</code> dict) and +passes it through verbatim under the <code>toggle\_functions</code> action key — no +reshaping. (The previous <code>Dictionary\</code> shape both +changed the signature AND lost caller-controlled key ordering / extra keys.) + +#### Signature + +```dotnet +public FunctionResult ToggleFunctions(List> functionToggles) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 654. + +*** + +### UpdateGlobalData(Dictionary\) + +#### Signature + +```dotnet +public FunctionResult UpdateGlobalData(Dictionary data) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 225. + +*** + +### UpdateSettings(Dictionary\) + +#### Signature + +```dotnet +public FunctionResult UpdateSettings(Dictionary settings) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 673. + +*** + +### WaitForUser(bool?, int?, bool) + +#### Signature + +```dotnet +public FunctionResult WaitForUser(bool? enabled = null, int? timeout = null, bool answerFirst = false) +``` + +#### Parameters + + + + + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 189. + +## Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 8. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.swaig/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.swaig/index.mdx new file mode 100644 index 0000000000..60f71969a4 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.swaig/index.mdx @@ -0,0 +1,476 @@ +--- +slug: "/reference/dotnet/signal-wire.swaig" +title: "SignalWire.SWAIG" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "module" + language: "dotnet" + qualified_name: "SignalWire.SWAIG" +--- +# `SignalWire.SWAIG` + +## Classes + + + + Maps <xref href="SignalWire.SWAIG.CallbackMethod" data-throw-if-not-resolved="false"></xref> members to the canonical wire values (uppercase HTTP verbs) that the SWML <code>join\_conference</code> action expects on its <code>status\_callback\_method</code> / <code>recording\_status\_callback\_method</code> keys. + + + + Maps <xref href="SignalWire.SWAIG.Codec" data-throw-if-not-resolved="false"></xref> members to the canonical wire values that the SWML <code>tap</code> action expects. + + + + Maps <xref href="SignalWire.SWAIG.ConferenceBeep" data-throw-if-not-resolved="false"></xref> members to the canonical wire values that the SWML <code>join\_conference</code> action expects on its <code>beep</code> key. + + + + Maps <xref href="SignalWire.SWAIG.ConferenceRecord" data-throw-if-not-resolved="false"></xref> members to the canonical wire values that the SWML <code>join\_conference</code> action expects on its <code>record</code> key. + + + + Maps <xref href="SignalWire.SWAIG.ConferenceTrim" data-throw-if-not-resolved="false"></xref> members to the canonical wire values that the SWML <code>join\_conference</code> action expects on its <code>trim</code> key. + + + + Builds a SWAIG function result with an optional response, actions, and post-processing flag. All action methods return <code>this</code> for fluent chaining. + + + + Typed options bag for the convenience overload <xref href="SignalWire.SWAIG.FunctionResult.JoinConference(System.String%2cSignalWire.SWAIG.JoinConferenceOptions)" data-throw-if-not-resolved="false"></xref>. + + + + Fluent, type-safe builder for a SWAIG tool's <code>parameters</code> — the JSON-Schema <code>properties</code> map passed as the third argument to <xref href="SignalWire.SWML.Service.DefineTool(System.String%2cSystem.String%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%2cSystem.Func%7bSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%2cSignalWire.SWAIG.FunctionResult%7d%2cSystem.Boolean)" data-throw-if-not-resolved="false"></xref> / SignalWire.Agent.AgentBase.DefineTool. + + + + Maps <xref href="SignalWire.SWAIG.RecordDirection" data-throw-if-not-resolved="false"></xref> members to the canonical wire values that the SWML <code>record\_call</code> action expects. + + + + Maps <xref href="SignalWire.SWAIG.RecordFormat" data-throw-if-not-resolved="false"></xref> members to the canonical wire values that the SWML <code>record\_call</code> action expects. + + + + Maps <xref href="SignalWire.SWAIG.TapDirection" data-throw-if-not-resolved="false"></xref> members to the canonical wire values that the SWML <code>tap</code> action expects. + + + +## Enums + +### CallbackMethod + +HTTP method for the <code>status\_callback</code> / <code>recording\_status\_callback</code> +URLs on <xref href="SignalWire.SWAIG.FunctionResult.JoinConference(System.String%2cSignalWire.SWAIG.JoinConferenceOptions)" data-throw-if-not-resolved="false"></xref>, +as a typed, compile-time-checked closed set. + +**Remarks:** <p> +The Python reference validates these arguments explicitly +(<code>join\_conference(... status\_callback\_method ... recording\_status\_callback\_method ...)</code> +raises <code>ValueError</code> unless the value is <code>"GET"</code> or <code>"POST"</code>), +so it is a genuine closed set rather than a free-form string. + +</p> +<p> +Each member maps to its canonical wire value via +<xref href="SignalWire.SWAIG.CallbackMethodExtensions.ToWireName(SignalWire.SWAIG.CallbackMethod)" data-throw-if-not-resolved="false"></xref>; the enum is +purely a typed alias over those strings, so the emitted SWML is identical to +passing the string directly. +</p> + +#### Signature + +```dotnet +public enum CallbackMethod +``` + +#### Properties + + + GET + + + + POST + + +#### Source + +[`src/SignalWire/SWAIG/CallbackMethod.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/CallbackMethod.cs) + +Line 21. + +*** + +### Codec + +Media codec for <xref href="SignalWire.SWAIG.FunctionResult.Tap(System.String%2cSystem.String%2cSignalWire.SWAIG.TapDirection%2cSignalWire.SWAIG.Codec%2cSystem.Int32%2cSystem.String)" data-throw-if-not-resolved="false"></xref>, as a typed, +compile-time-checked closed set. + +**Remarks:** <p> +The Python reference validates this argument explicitly +(<code>tap(... codec ...)</code> raises <code>ValueError</code> unless the value is <code>"PCMU"</code> or <code>"PCMA"</code>), so it is a genuine closed set rather than a +free-form string. The wire strings are upper-case (<code>"PCMU"</code> / <code>"PCMA"</code>). + +</p> +<p> +This is the two-value SWAIG <code>tap</code> codec set and is deliberately +<strong>distinct</strong> from the larger RELAY <code>connect</code>/<code>stream</code> +codec superset (<code>{PCMU, PCMA, OPUS, G729, G722, VP8, H264}</code>, optionally +comma-joined): only <code>PCMU</code>/<code>PCMA</code> are valid here, so this type must +not be reused for those RELAY params (which stay strings). +FunctionResult.Tap(string, TapDirection, Codec, string, int, string?) +accepts this enum OR a string: the enum gives editor autocompletion and turns +a typo into a compile error, while the string overload preserves parity with +the Python reference (which takes a bare <code>str</code>). +</p> +<p> +Each member maps to its canonical wire value via +<xref href="SignalWire.SWAIG.CodecExtensions.ToWireName(SignalWire.SWAIG.Codec)" data-throw-if-not-resolved="false"></xref>; the enum is purely a typed +alias over those strings, so the emitted SWML is identical to passing the +string directly. +</p> +<example> +<pre><code class="lang-csharp">result.Tap("rtp://1.2.3.4:5000", TapDirection.Both, Codec.Pcma); // typed, autocompleted +result.Tap("rtp://1.2.3.4:5000", codec: "PCMA"); // string still works (parity)</code></pre> +</example> + +#### Signature + +```dotnet +public enum Codec +``` + +#### Properties + + + PCMA (G.711 A-law) + + + + PCMU (G.711 µ-law, the reference default) + + +#### Source + +[`src/SignalWire/SWAIG/Codec.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/Codec.cs) + +Line 37. + +*** + +### ConferenceBeep + +Beep behaviour for <xref href="SignalWire.SWAIG.FunctionResult.JoinConference(System.String%2cSignalWire.SWAIG.JoinConferenceOptions)" data-throw-if-not-resolved="false"></xref>, +as a typed, compile-time-checked closed set. + +**Remarks:** <p> +The Python reference validates this argument explicitly +(<code>join\_conference(... beep ...)</code> raises <code>ValueError</code> unless the +value is <code>"true"</code>, <code>"false"</code>, <code>"onEnter"</code>, or <code>"onExit"</code>), +so it is a genuine closed set rather than a free-form string. The typed <code>JoinConference(string, JoinConferenceOptions?)</code> overload accepts this +enum; the flat string overload preserves parity with the Python reference +(which takes a bare <code>str</code> validated to the same closed set). + +</p> +<p> +Each member maps to its canonical wire value via +<xref href="SignalWire.SWAIG.ConferenceBeepExtensions.ToWireName(SignalWire.SWAIG.ConferenceBeep)" data-throw-if-not-resolved="false"></xref>; the enum is +purely a typed alias over those strings, so the emitted SWML is identical to +passing the string directly. +</p> + +#### Signature + +```dotnet +public enum ConferenceBeep +``` + +#### Properties + + + false + + + + onEnter + + + + onExit + + + + true + + +#### Source + +[`src/SignalWire/SWAIG/ConferenceBeep.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ConferenceBeep.cs) + +Line 23. + +*** + +### ConferenceRecord + +Recording mode for <xref href="SignalWire.SWAIG.FunctionResult.JoinConference(System.String%2cSignalWire.SWAIG.JoinConferenceOptions)" data-throw-if-not-resolved="false"></xref>, +as a typed, compile-time-checked closed set. + +**Remarks:** <p> +The Python reference validates this argument explicitly +(<code>join\_conference(... record ...)</code> raises <code>ValueError</code> unless the +value is <code>"do-not-record"</code> or <code>"record-from-start"</code>), so it is a +genuine closed set rather than a free-form string. It is distinct from the <xref href="SignalWire.SWAIG.RecordFormat" data-throw-if-not-resolved="false"></xref>/<xref href="SignalWire.SWAIG.RecordDirection" data-throw-if-not-resolved="false"></xref> closed sets that +describe <code>record\_call</code> output; this one toggles whether the conference +itself records. + +</p> +<p> +Each member maps to its canonical wire value via +<xref href="SignalWire.SWAIG.ConferenceRecordExtensions.ToWireName(SignalWire.SWAIG.ConferenceRecord)" data-throw-if-not-resolved="false"></xref>; the +enum is purely a typed alias over those strings, so the emitted SWML is +identical to passing the string directly. +</p> + +#### Signature + +```dotnet +public enum ConferenceRecord +``` + +#### Properties + + + do-not-record + + + + record-from-start + + +#### Source + +[`src/SignalWire/SWAIG/ConferenceRecord.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ConferenceRecord.cs) + +Line 23. + +*** + +### ConferenceTrim + +Silence-trim mode for <xref href="SignalWire.SWAIG.FunctionResult.JoinConference(System.String%2cSignalWire.SWAIG.JoinConferenceOptions)" data-throw-if-not-resolved="false"></xref>, +as a typed, compile-time-checked closed set. + +**Remarks:** <p> +The Python reference validates this argument explicitly +(<code>join\_conference(... trim ...)</code> raises <code>ValueError</code> unless the +value is <code>"trim-silence"</code> or <code>"do-not-trim"</code>), so it is a genuine +closed set rather than a free-form string. + +</p> +<p> +Each member maps to its canonical wire value via +<xref href="SignalWire.SWAIG.ConferenceTrimExtensions.ToWireName(SignalWire.SWAIG.ConferenceTrim)" data-throw-if-not-resolved="false"></xref>; the enum is +purely a typed alias over those strings, so the emitted SWML is identical to +passing the string directly. +</p> + +#### Signature + +```dotnet +public enum ConferenceTrim +``` + +#### Properties + + + do-not-trim + + + + trim-silence + + +#### Source + +[`src/SignalWire/SWAIG/ConferenceTrim.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ConferenceTrim.cs) + +Line 20. + +*** + +### RecordDirection + +Audio direction for <xref href="SignalWire.SWAIG.FunctionResult.RecordCall(System.String%2cSystem.Boolean%2cSignalWire.SWAIG.RecordFormat%2cSignalWire.SWAIG.RecordDirection%2cSystem.String%2cSystem.Boolean%2cSystem.Double%2cSystem.Nullable%7bSystem.Double%7d%2cSystem.Nullable%7bSystem.Double%7d%2cSystem.Nullable%7bSystem.Double%7d%2cSystem.String)" data-throw-if-not-resolved="false"></xref>, as a typed, +compile-time-checked closed set. + +**Remarks:** <p> +The Python reference validates this argument explicitly +(<code>record\_call(... direction ...)</code> raises <code>ValueError</code> unless the +value is <code>"speak"</code>, <code>"listen"</code>, or <code>"both"</code>), so it is a +genuine closed set rather than a free-form string. It is the user-facing <em>recording</em> direction — which side(s) of the call to capture — and is +distinct from the read-only inbound/outbound <code>direction</code> field carried +on a RELAY <code>Call</code> event (that one stays a plain string, as it is server +state, not a caller choice). +FunctionResult.RecordCall(RecordFormat, RecordDirection, string, bool) +accepts this enum OR a string: the enum gives editor autocompletion and turns +a typo into a compile error, while the string overload preserves parity with +the Python reference (which takes a bare <code>str</code>). + +</p> +<p> +Each member maps to its canonical wire value via +<xref href="SignalWire.SWAIG.RecordDirectionExtensions.ToWireName(SignalWire.SWAIG.RecordDirection)" data-throw-if-not-resolved="false"></xref>; the enum +is purely a typed alias over those strings, so the emitted SWML is identical +to passing the string directly. +</p> +<example> +<pre><code class="lang-csharp">result.RecordCall(direction: RecordDirection.Listen); // typed, autocompleted +result.RecordCall("rec-1", false, "wav", "listen"); // string still works (parity)</code></pre> +</example> + +#### Signature + +```dotnet +public enum RecordDirection +``` + +#### Properties + + + both + + + + listen + + + + speak + + +#### Source + +[`src/SignalWire/SWAIG/RecordDirection.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/RecordDirection.cs) + +Line 34. + +*** + +### RecordFormat + +Recording container format for <xref href="SignalWire.SWAIG.FunctionResult.RecordCall(System.String%2cSystem.Boolean%2cSignalWire.SWAIG.RecordFormat%2cSignalWire.SWAIG.RecordDirection%2cSystem.String%2cSystem.Boolean%2cSystem.Double%2cSystem.Nullable%7bSystem.Double%7d%2cSystem.Nullable%7bSystem.Double%7d%2cSystem.Nullable%7bSystem.Double%7d%2cSystem.String)" data-throw-if-not-resolved="false"></xref>, as a +typed, compile-time-checked closed set. + +**Remarks:** <p> +The Python reference validates this argument explicitly +(<code>record\_call(... format ...)</code> raises <code>ValueError</code> unless the value +is <code>"wav"</code>, <code>"mp3"</code>, or <code>"mp4"</code>), so it is a genuine closed set rather than a +free-form string. FunctionResult.RecordCall(RecordFormat, RecordDirection, string, bool) +accepts this enum OR a string: the enum gives editor autocompletion and turns +a typo into a compile error, while the string overload preserves parity with +the Python reference (which takes a bare <code>str</code>). + +</p> +<p> +Each member maps to its canonical wire value via +<xref href="SignalWire.SWAIG.RecordFormatExtensions.ToWireName(SignalWire.SWAIG.RecordFormat)" data-throw-if-not-resolved="false"></xref>; the enum is +purely a typed alias over those strings, so the emitted SWML is identical to +passing the string directly. +</p> +<example> +<pre><code class="lang-csharp">result.RecordCall(format: RecordFormat.Mp3); // typed, autocompleted +result.RecordCall("rec-1", false, "mp3"); // string still works (parity)</code></pre> +</example> + +#### Signature + +```dotnet +public enum RecordFormat +``` + +#### Properties + + + mp3 + + + + mp4 + + + + wav + + +#### Source + +[`src/SignalWire/SWAIG/RecordFormat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/RecordFormat.cs) + +Line 29. + +*** + +### TapDirection + +Audio direction for <xref href="SignalWire.SWAIG.FunctionResult.Tap(System.String%2cSystem.String%2cSignalWire.SWAIG.TapDirection%2cSignalWire.SWAIG.Codec%2cSystem.Int32%2cSystem.String)" data-throw-if-not-resolved="false"></xref>, as a typed, +compile-time-checked closed set. + +**Remarks:** <p> +The Python reference validates this argument explicitly +(<code>tap(... direction ...)</code> raises <code>ValueError</code> unless the value is <code>"speak"</code>, <code>"hear"</code>, or <code>"both"</code>), so it is a genuine closed +set rather than a free-form string. + +</p> +<p> +This is the <em>tap</em> direction and is deliberately <strong>distinct</strong> +from <xref href="SignalWire.SWAIG.RecordDirection" data-throw-if-not-resolved="false"></xref>: <code>tap</code> uses <code>"hear"</code> where +<code>record_call</code> uses <code>"listen"</code>. The Python reference validates the two +against separate lists, so they are modelled as two separate enums rather than +a single shared one — sharing one would silently accept the wrong vocabulary on +one of the two verbs. +FunctionResult.Tap(string, TapDirection, Codec, string, int, string?) +accepts this enum OR a string: the enum gives editor autocompletion and turns +a typo into a compile error, while the string overload preserves parity with +the Python reference (which takes a bare <code>str</code>). +</p> +<p> +Each member maps to its canonical wire value via +<xref href="SignalWire.SWAIG.TapDirectionExtensions.ToWireName(SignalWire.SWAIG.TapDirection)" data-throw-if-not-resolved="false"></xref>; the enum is +purely a typed alias over those strings, so the emitted SWML is identical to +passing the string directly. +</p> +<example> +<pre><code class="lang-csharp">result.Tap("rtp://1.2.3.4:5000", TapDirection.Hear, Codec.Pcmu); // typed, autocompleted +result.Tap("rtp://1.2.3.4:5000", direction: "hear", codec: "PCMU"); // string still works (parity)</code></pre> +</example> + +#### Signature + +```dotnet +public enum TapDirection +``` + +#### Properties + + + both + + + + hear + + + + speak + + +#### Source + +[`src/SignalWire/SWAIG/TapDirection.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/TapDirection.cs) + +Line 38. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.swaig/join-conference-options/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.swaig/join-conference-options/index.mdx new file mode 100644 index 0000000000..60f5960523 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.swaig/join-conference-options/index.mdx @@ -0,0 +1,127 @@ +--- +slug: "/reference/dotnet/signal-wire.swaig/join-conference-options" +title: "JoinConferenceOptions" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.SWAIG.JoinConferenceOptions" + parent: "SignalWire.SWAIG" + module: "SignalWire.SWAIG" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/JoinConferenceOptions.cs" + visibility: "public" +--- +# `JoinConferenceOptions` + +Typed options bag for the convenience overload <xref href="SignalWire.SWAIG.FunctionResult.JoinConference(System.String%2cSignalWire.SWAIG.JoinConferenceOptions)" data-throw-if-not-resolved="false"></xref>. + +**Remarks:** <p> +Mirrors the 18 optional parameters of the Python reference <code>join\_conference(name, muted=False, beep="true", ...)</code> one-for-one, with +the four closed-set arguments (<code>beep</code>, <code>record</code>, <code>trim</code>, the two +callback methods) surfaced as the typed enums <xref href="SignalWire.SWAIG.ConferenceBeep" data-throw-if-not-resolved="false"></xref>, <xref href="SignalWire.SWAIG.ConferenceRecord" data-throw-if-not-resolved="false"></xref>, <xref href="SignalWire.SWAIG.ConferenceTrim" data-throw-if-not-resolved="false"></xref>, and <xref href="SignalWire.SWAIG.CallbackMethod" data-throw-if-not-resolved="false"></xref> for +editor autocompletion and compile-time checking. + +</p> +<p> +This record is a .NET-idiomatic convenience (a single options object instead +of 18 positional arguments). The flat, all-string +<xref href="SignalWire.SWAIG.FunctionResult.JoinConference(System.String%2cSystem.Boolean%2cSystem.String%2cSystem.Boolean%2cSystem.Boolean%2cSystem.String%2cSystem.Int32%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.Object)" data-throw-if-not-resolved="false"></xref> +overload remains the parity-bearing signature against the Python reference; +the convenience overload delegates straight to it via each enum's +<code>ToWireName()</code>, so the emitted <code>join_conference</code> action is identical. +</p> +<p> +Every default matches the Python reference exactly, so an unset options object +collapses to the simple-form bare conference-name string just like the flat +overload with no arguments. +</p> + +**Modifiers:** `sealed` + +## Signature + +```dotnet +public sealed record JoinConferenceOptions : IEquatable +``` + +## Inheritance + +**Implements:** `System.IEquatable` + +## Properties + + + Beep behaviour. Python default: <code>"true"</code>. + + + + SWML Call ID / CXML CallSid for coaching. Python default: <code>None</code>. + + + + Whether the conference ends when this participant exits. Python default: <code>False</code>. + + + + Maximum participants (1..=250). Python default: <code>250</code>. + + + + Whether to join muted. Python default: <code>False</code>. + + + + Recording mode. Python default: <code>"do-not-record"</code>. + + + + URL for recording status callbacks. Python default: <code>None</code>. + + + + Recording events to report. Python default: <code>"completed"</code>. + + + + HTTP method for recording status callbacks. Python default: <code>"POST"</code>. + + + + Conference region. Python default: <code>None</code>. + + + + Switch payload (object \{\} or array \[]). Python default: <code>None</code>. + + + + Whether the conference starts when this participant enters. Python default: <code>True</code>. + + + + URL for status callbacks. Python default: <code>None</code>. + + + + Events to report. Python default: <code>None</code>. + + + + HTTP method for status callbacks. Python default: <code>"POST"</code>. + + + + Silence-trim mode. Python default: <code>"trim-silence"</code>. + + + + SWML URL for hold music. Python default: <code>None</code>. + + +## Source + +[`src/SignalWire/SWAIG/JoinConferenceOptions.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/JoinConferenceOptions.cs) + +Line 30. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.swaig/parameter-schema/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.swaig/parameter-schema/index.mdx new file mode 100644 index 0000000000..b2915d9e8b --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.swaig/parameter-schema/index.mdx @@ -0,0 +1,487 @@ +--- +slug: "/reference/dotnet/signal-wire.swaig/parameter-schema" +title: "ParameterSchema" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.SWAIG.ParameterSchema" + parent: "SignalWire.SWAIG" + module: "SignalWire.SWAIG" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ParameterSchema.cs" + visibility: "public" +--- +# `ParameterSchema` + +Fluent, type-safe builder for a SWAIG tool's <code>parameters</code> — the +JSON-Schema <code>properties</code> map passed as the third argument to <xref href="SignalWire.SWML.Service.DefineTool(System.String%2cSystem.String%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%2cSystem.Func%7bSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%2cSignalWire.SWAIG.FunctionResult%7d%2cSystem.Boolean)" data-throw-if-not-resolved="false"></xref> / +SignalWire.Agent.AgentBase.DefineTool. + +**Remarks:** <p> +Defining a SWAIG tool's parameters in the Python reference (and, until +now, in this port) means hand-writing an untyped <code>Dictionary\</code> of nested dictionaries — a raw +JSON-Schema blob: + +</p> +<pre><code class="lang-csharp">new Dictionary<string, object> +{ + ["service"] = new Dictionary<string, object> + { + ["type"] = "string", + ["description"] = "The service", + ["required"] = true, + }, +};</code></pre> +<p> +<xref href="SignalWire.SWAIG.ParameterSchema" data-throw-if-not-resolved="false"></xref> produces the <strong>byte-identical</strong> +<code>properties</code> map type-safely: +</p> +<pre><code class="lang-csharp">ParameterSchema.Create() + .String("service", "The service") + .String("date", "YYYY-MM-DD") + .Enum("fmt", typeof(RecordFormat), "format") // → enum: ["wav","mp3","mp4"] + .Required("service", "date") + .Build();</code></pre> +<p> +This is a <strong>typed convenience over the same wire output, not a new +format</strong>. <xref href="SignalWire.SWAIG.ParameterSchema.Build" data-throw-if-not-resolved="false"></xref> returns exactly the dictionary you +would have hand-written, so it drops straight into the existing untyped +<code>DefineTool</code> path — which keeps working unchanged. There is no Python +reference counterpart (Python builds the dict by hand); this is a .NET-only +additive ergonomics layer. +</p> +<p> +<strong>Required.</strong> <xref href="SignalWire.SWAIG.ParameterSchema.Required(System.String%5b%5d)" data-throw-if-not-resolved="false"></xref> marks properties +with the inline <code>["required"] = true</code> flag this port's hand-written +tool params already use (e.g. <code>MathSkill</code>, <code>SpiderSkill</code>, +<code>InfoGathererSkill</code>). For callers that prefer the top-level JSON-Schema +<code>required: [...]</code> array instead (the shape <code>DataMap</code> and the Python +<code>SWAIGFunction</code> emit), <xref href="SignalWire.SWAIG.ParameterSchema.RequiredNames" data-throw-if-not-resolved="false"></xref> exposes the same +names as an ordered <code>List<string></code>. +</p> +<p> +<strong>Closed sets.</strong> Enum(string, Type, string?) +integrates the Tier-1 typed enums (<xref href="SignalWire.SWAIG.RecordFormat" data-throw-if-not-resolved="false"></xref>, +<xref href="SignalWire.SWAIG.RecordDirection" data-throw-if-not-resolved="false"></xref>, <xref href="SignalWire.SWAIG.TapDirection" data-throw-if-not-resolved="false"></xref>, +<xref href="SignalWire.SWAIG.Codec" data-throw-if-not-resolved="false"></xref>, …) by reflecting over the enum's members and emitting +each member's canonical wire string (its <code>ToWireName</code>) into the schema +<code>enum: [...]</code> list — so the closed set is defined once, in the enum, +rather than re-typed as a string list at every call site. An explicit +Enum(string, IEnumerable<string>, string?) overload remains +for genuinely-open or ad-hoc value sets. +</p> + +**Modifiers:** `sealed` + +## Signature + +```dotnet +public sealed class ParameterSchema +``` + +## Properties + + + The required-property names in declaration order — the source for a top-level JSON-Schema <code>required: \[...]</code> array (the shape <code>DataMap</code> and Python's <code>SWAIGFunction</code> emit). The inline <code>\["required"] = true</code> flags are already set by <xref href="SignalWire.SWAIG.ParameterSchema.Required(System.String%5b%5d)" data-throw-if-not-resolved="false"></xref>; this is for callers that additionally want the array form. + + +## Methods + +### Array + +Add an <code>array</code> property whose elements are a scalar kind +(<code>"string"</code>, <code>"number"</code>, <code>"integer"</code>, <code>"boolean"</code>). +Emits <code>\{"type":"array","items":\{"type":itemType\}\}</code>. + +#### Signature + + + + ```dotnet + public ParameterSchema Array(string name, string itemType, string? description = null, bool required = false, IEnumerable? itemEnumValues = null) + ``` + + + + ```dotnet + public ParameterSchema Array(string name, ParameterSchema itemSchema, string? description = null, bool required = false) + ``` + + + +#### Parameters (Overload 1) + + + + + + + + + + + +#### Parameters (Overload 2) + + + + + + + + + +#### Returns (Overload 1) + +`SignalWire.SWAIG.ParameterSchema` + +#### Returns (Overload 2) + +`SignalWire.SWAIG.ParameterSchema` + +#### Source + +[`src/SignalWire/SWAIG/ParameterSchema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ParameterSchema.cs) + +Line 164. + +*** + +### Boolean(string, string?, bool, object?) + +Add a <code>boolean</code> property. + +#### Signature + +```dotnet +public ParameterSchema Boolean(string name, string? description = null, bool required = false, object? defaultValue = null) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`SignalWire.SWAIG.ParameterSchema` + +#### Source + +[`src/SignalWire/SWAIG/ParameterSchema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ParameterSchema.cs) + +Line 117. + +*** + +### Build() + +Build the JSON-Schema <code>properties</code> map — the exact <code>Dictionary\</code> to pass as the <code>parameters</code> +argument to <code>DefineTool</code>. A fresh dictionary is returned on each +call (mutating it does not affect the builder), with properties in +declaration order. + +#### Signature + +```dotnet +public Dictionary Build() +``` + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/SWAIG/ParameterSchema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ParameterSchema.cs) + +Line 251. + +*** + +### Create() + +Start a new, empty parameter-schema builder. + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static ParameterSchema Create() +``` + +#### Returns + +`SignalWire.SWAIG.ParameterSchema` + +#### Source + +[`src/SignalWire/SWAIG/ParameterSchema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ParameterSchema.cs) + +Line 80. + +*** + +### Enum + +Add a <code>string</code> property constrained to a closed set, sourced from a +Tier-1 typed enum. Each enum member is rendered via its <code>ToWireName</code> extension into the schema <code>enum: \[...]</code> list, so +the wire vocabulary is defined once in the enum. + +#### Signature + + + + ```dotnet + public ParameterSchema Enum(string name, Type enumType, string? description = null, bool required = false, object? defaultValue = null) + ``` + + + + ```dotnet + public ParameterSchema Enum(string name, IEnumerable values, string? description = null, bool required = false, object? defaultValue = null) + ``` + + + +#### Parameters (Overload 1) + + + Property (argument) name. + + + + A SignalWire closed-set enum (e.g. <xref href="SignalWire.SWAIG.RecordFormat" data-throw-if-not-resolved="false"></xref>) whose members carry a <code>ToWireName</code> extension in a sibling <code>\Extensions</code> class. + + + + LLM-facing description of the argument. + + + + Mark required inline (<code>\["required"] = true</code>). + + + + Optional JSON-Schema <code>default</code>. + + +#### Parameters (Overload 2) + + + + + + + + + + + +#### Returns (Overload 1) + +`SignalWire.SWAIG.ParameterSchema` + +#### Returns (Overload 2) + +`SignalWire.SWAIG.ParameterSchema` + +#### Source + +[`src/SignalWire/SWAIG/ParameterSchema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ParameterSchema.cs) + +Line 137. + +*** + +### Integer(string, string?, bool, object?, string?) + +Add an <code>integer</code> property. + +#### Signature + +```dotnet +public ParameterSchema Integer(string name, string? description = null, bool required = false, object? defaultValue = null, string? format = null) +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`SignalWire.SWAIG.ParameterSchema` + +#### Source + +[`src/SignalWire/SWAIG/ParameterSchema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ParameterSchema.cs) + +Line 108. + +*** + +### Number(string, string?, bool, object?, string?) + +Add a <code>number</code> (floating-point) property. + +#### Signature + +```dotnet +public ParameterSchema Number(string name, string? description = null, bool required = false, object? defaultValue = null, string? format = null) +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`SignalWire.SWAIG.ParameterSchema` + +#### Source + +[`src/SignalWire/SWAIG/ParameterSchema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ParameterSchema.cs) + +Line 99. + +*** + +### Object(string, ParameterSchema, string?, bool) + +Add a nested <code>object</code> property described by a child <xref href="SignalWire.SWAIG.ParameterSchema" data-throw-if-not-resolved="false"></xref>. Emits <code>\{"type":"object","properties":\{…\}\}</code>. + +#### Signature + +```dotnet +public ParameterSchema Object(string name, ParameterSchema schema, string? description = null, bool required = false) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`SignalWire.SWAIG.ParameterSchema` + +#### Source + +[`src/SignalWire/SWAIG/ParameterSchema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ParameterSchema.cs) + +Line 204. + +*** + +### Required(params string\[]) + +Mark one or more already-declared properties required by setting the +inline <code>\["required"] = true</code> flag on each (this port's hand-written +convention). Also records the names for <xref href="SignalWire.SWAIG.ParameterSchema.RequiredNames" data-throw-if-not-resolved="false"></xref>. + +#### Signature + +```dotnet +public ParameterSchema Required(params string[] names) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.SWAIG.ParameterSchema` + +#### Throws + +- `System.ArgumentException` — If a named property was not declared. + +#### Source + +[`src/SignalWire/SWAIG/ParameterSchema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ParameterSchema.cs) + +Line 218. + +*** + +### String(string, string?, bool, object?, string?, IEnumerable\?) + +Add a <code>string</code> property. + +#### Signature + +```dotnet +public ParameterSchema String(string name, string? description = null, bool required = false, object? defaultValue = null, string? format = null, IEnumerable? enumValues = null) +``` + +#### Parameters + + + Property (argument) name. + + + + LLM-facing description of the argument. + + + + Mark required inline (<code>\["required"] = true</code>). + + + + Optional JSON-Schema <code>default</code>. + + + + Optional JSON-Schema <code>format</code> hint (e.g. <code>"date"</code>). + + + + Optional closed set of allowed string values. + + +#### Returns + +`SignalWire.SWAIG.ParameterSchema` + +#### Source + +[`src/SignalWire/SWAIG/ParameterSchema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ParameterSchema.cs) + +Line 89. + +## Source + +[`src/SignalWire/SWAIG/ParameterSchema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ParameterSchema.cs) + +Line 69. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.swaig/record-direction-extensions/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.swaig/record-direction-extensions/index.mdx new file mode 100644 index 0000000000..eaeb164fa2 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.swaig/record-direction-extensions/index.mdx @@ -0,0 +1,61 @@ +--- +slug: "/reference/dotnet/signal-wire.swaig/record-direction-extensions" +title: "RecordDirectionExtensions" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.SWAIG.RecordDirectionExtensions" + parent: "SignalWire.SWAIG" + module: "SignalWire.SWAIG" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/RecordDirection.cs" + visibility: "public" +--- +# `RecordDirectionExtensions` + +Maps <xref href="SignalWire.SWAIG.RecordDirection" data-throw-if-not-resolved="false"></xref> members to the canonical wire values that +the SWML <code>record\_call</code> action expects. + +**Modifiers:** `static` + +## Signature + +```dotnet +public static class RecordDirectionExtensions +``` + +## Methods + +### ToWireName(RecordDirection) + +The canonical recording-direction string (the value placed on the <code>record\_call.direction</code> key in the emitted SWML). + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static string ToWireName(this RecordDirection direction) +``` + +#### Parameters + + + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/SWAIG/RecordDirection.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/RecordDirection.cs) + +Line 63. + +## Source + +[`src/SignalWire/SWAIG/RecordDirection.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/RecordDirection.cs) + +Line 50. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.swaig/record-format-extensions/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.swaig/record-format-extensions/index.mdx new file mode 100644 index 0000000000..4b4cdd422c --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.swaig/record-format-extensions/index.mdx @@ -0,0 +1,61 @@ +--- +slug: "/reference/dotnet/signal-wire.swaig/record-format-extensions" +title: "RecordFormatExtensions" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.SWAIG.RecordFormatExtensions" + parent: "SignalWire.SWAIG" + module: "SignalWire.SWAIG" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/RecordFormat.cs" + visibility: "public" +--- +# `RecordFormatExtensions` + +Maps <xref href="SignalWire.SWAIG.RecordFormat" data-throw-if-not-resolved="false"></xref> members to the canonical wire values that the +SWML <code>record\_call</code> action expects. + +**Modifiers:** `static` + +## Signature + +```dotnet +public static class RecordFormatExtensions +``` + +## Methods + +### ToWireName(RecordFormat) + +The canonical recording-format string (the value placed on the <code>record\_call.format</code> key in the emitted SWML). + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static string ToWireName(this RecordFormat format) +``` + +#### Parameters + + + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/SWAIG/RecordFormat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/RecordFormat.cs) + +Line 58. + +## Source + +[`src/SignalWire/SWAIG/RecordFormat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/RecordFormat.cs) + +Line 45. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.swaig/tap-direction-extensions/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.swaig/tap-direction-extensions/index.mdx new file mode 100644 index 0000000000..38ca07d1c7 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.swaig/tap-direction-extensions/index.mdx @@ -0,0 +1,61 @@ +--- +slug: "/reference/dotnet/signal-wire.swaig/tap-direction-extensions" +title: "TapDirectionExtensions" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.SWAIG.TapDirectionExtensions" + parent: "SignalWire.SWAIG" + module: "SignalWire.SWAIG" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/TapDirection.cs" + visibility: "public" +--- +# `TapDirectionExtensions` + +Maps <xref href="SignalWire.SWAIG.TapDirection" data-throw-if-not-resolved="false"></xref> members to the canonical wire values that the +SWML <code>tap</code> action expects. + +**Modifiers:** `static` + +## Signature + +```dotnet +public static class TapDirectionExtensions +``` + +## Methods + +### ToWireName(TapDirection) + +The canonical tap-direction string (the value placed on the <code>tap.direction</code> key in the emitted SWML). + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static string ToWireName(this TapDirection direction) +``` + +#### Parameters + + + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/SWAIG/TapDirection.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/TapDirection.cs) + +Line 67. + +## Source + +[`src/SignalWire/SWAIG/TapDirection.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/TapDirection.cs) + +Line 54. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.swml/document/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.swml/document/index.mdx new file mode 100644 index 0000000000..cf72fd080c --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.swml/document/index.mdx @@ -0,0 +1,312 @@ +--- +slug: "/reference/dotnet/signal-wire.swml/document" +title: "Document" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.SWML.Document" + parent: "SignalWire.SWML" + module: "SignalWire.SWML" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Document.cs" + visibility: "public" +--- +# `Document` + +Represents a SWML document containing versioned sections of verb instructions. +Each section holds an ordered list of verb dictionaries that define call-flow logic. + +## Signature + +```dotnet +public class Document +``` + +## Properties + + + SWML document version. + + +## Methods + +### AddRawVerb(string, Dictionary\) + +Append a pre-formatted verb hash to a section. + +#### Signature + +```dotnet +public void AddRawVerb(string section, Dictionary verbHash) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/SWML/Document.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Document.cs) + +Line 80. + +*** + +### AddSection(string) + +Add a new named section. Returns true if created, false if it already existed. + +#### Signature + +```dotnet +public bool AddSection(string name) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/SWML/Document.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Document.cs) + +Line 37. + +*** + +### AddVerb(string, object?) + +Append a verb to the main section. + +#### Signature + +```dotnet +public void AddVerb(string verbName, object? config) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/SWML/Document.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Document.cs) + +Line 64. + +*** + +### AddVerbToSection(string, string, object?) + +Append a verb to a named section. + +#### Signature + +```dotnet +public void AddVerbToSection(string section, string verbName, object? config) +``` + +#### Parameters + + + + + + + +#### Source + +[`src/SignalWire/SWML/Document.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Document.cs) + +Line 70. + +*** + +### ClearSection(string) + +Clear all verbs in a section (keeps the section itself). + +#### Signature + +```dotnet +public void ClearSection(string section) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/SWML/Document.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Document.cs) + +Line 90. + +*** + +### Document() + +#### Signature + +```dotnet +public Document() +``` + +#### Source + +[`src/SignalWire/SWML/Document.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Document.cs) + +Line 29. + +*** + +### GetVerbs(string) + +Get a copy of the verbs for a section. +Returns an empty list if the section does not exist. + +#### Signature + +```dotnet +public List> GetVerbs(string section = "main") +``` + +#### Parameters + + + +#### Returns + +`List>` + +#### Source + +[`src/SignalWire/SWML/Document.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Document.cs) + +Line 54. + +*** + +### HasSection(string) + +Check whether a named section exists. + +#### Signature + +```dotnet +public bool HasSection(string name) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/SWML/Document.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Document.cs) + +Line 48. + +*** + +### Render() + +Compact JSON string. + +#### Signature + +```dotnet +public string Render() +``` + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/SWML/Document.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Document.cs) + +Line 120. + +*** + +### RenderPretty() + +Pretty-printed JSON string. + +#### Signature + +```dotnet +public string RenderPretty() +``` + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/SWML/Document.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Document.cs) + +Line 123. + +*** + +### Reset() + +Reset document to initial state with an empty main section. + +#### Signature + +```dotnet +public void Reset() +``` + +#### Source + +[`src/SignalWire/SWML/Document.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Document.cs) + +Line 99. + +*** + +### ToDict() + +Return document as a dictionary suitable for serialization. + +#### Signature + +```dotnet +public Dictionary ToDict() +``` + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/SWML/Document.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Document.cs) + +Line 110. + +## Source + +[`src/SignalWire/SWML/Document.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Document.cs) + +Line 9. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.swml/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.swml/index.mdx new file mode 100644 index 0000000000..88234ef380 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.swml/index.mdx @@ -0,0 +1,44 @@ +--- +slug: "/reference/dotnet/signal-wire.swml" +title: "SignalWire.SWML" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "module" + language: "dotnet" + qualified_name: "SignalWire.SWML" +--- +# `SignalWire.SWML` + +## Classes + + + + Represents a SWML document containing versioned sections of verb instructions. Each section holds an ordered list of verb dictionaries that define call-flow logic. + + + + Thread-safe singleton that loads the SWML JSON schema from an embedded resource and exposes verb definitions parsed from $defs.SWMLMethod.anyOf. + + + + Validation error raised by SchemaUtils.ValidateVerb when a verb config violates its schema. (Python parity: `signalwire.utils.schema_utils.SchemaValidationError`.) + + + + A SWML service that manages a Document, provides schema-driven verb methods, handles HTTP requests with Basic authentication, and supports routing callbacks. + + + + Configuration options for a SWML service. + + + + + + + + Metadata about a single SWML verb parsed from the schema. + + diff --git a/fern/products/sdk-reference/dotnet/signal-wire.swml/schema-validation-error/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.swml/schema-validation-error/index.mdx new file mode 100644 index 0000000000..eac2f94cb0 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.swml/schema-validation-error/index.mdx @@ -0,0 +1,66 @@ +--- +slug: "/reference/dotnet/signal-wire.swml/schema-validation-error" +title: "SchemaValidationError" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.SWML.SchemaValidationError" + parent: "SignalWire.SWML" + module: "SignalWire.SWML" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Schema.cs" + visibility: "public" +--- +# `SchemaValidationError` + +Validation error raised by SchemaUtils.ValidateVerb when a +verb config violates its schema. (Python parity: +`signalwire.utils.schema_utils.SchemaValidationError`.) + +## Signature + +```dotnet +public class SchemaValidationError : Exception, ISerializable +``` + +## Inheritance + +**Extends:** `System.Exception` + +**Implements:** `System.Runtime.Serialization.ISerializable` + +## Properties + + + + + +## Methods + +### SchemaValidationError(string, List\) + +#### Signature + +```dotnet +public SchemaValidationError(string verbName, List errors) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/SWML/Schema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Schema.cs) + +Line 21. + +## Source + +[`src/SignalWire/SWML/Schema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Schema.cs) + +Line 16. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.swml/schema/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.swml/schema/index.mdx new file mode 100644 index 0000000000..574642f4ba --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.swml/schema/index.mdx @@ -0,0 +1,245 @@ +--- +slug: "/reference/dotnet/signal-wire.swml/schema" +title: "Schema" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.SWML.Schema" + parent: "SignalWire.SWML" + module: "SignalWire.SWML" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Schema.cs" + visibility: "public" +--- +# `Schema` + +Thread-safe singleton that loads the SWML JSON schema from an embedded resource +and exposes verb definitions parsed from $defs.SWMLMethod.anyOf. + +**Modifiers:** `sealed` + +## Signature + +```dotnet +public sealed class Schema +``` + +## Properties + + + Thread-safe singleton accessor. + + + + Number of verbs defined in the schema. + + +## Methods + +### GetAllVerbNames() + +Alias of <xref href="SignalWire.SWML.Schema.GetVerbNames" data-throw-if-not-resolved="false"></xref>. (Python parity: +`SchemaUtils.get_all_verb_names`.) + +#### Signature + +```dotnet +public List GetAllVerbNames() +``` + +#### Returns + +`List` + +#### Source + +[`src/SignalWire/SWML/Schema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Schema.cs) + +Line 90. + +*** + +### GetVerb(string) + +Get verb metadata, or null if not found. + +#### Signature + +```dotnet +public VerbInfo? GetVerb(string name) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.SWML.VerbInfo` + +#### Source + +[`src/SignalWire/SWML/Schema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Schema.cs) + +Line 80. + +*** + +### GetVerbNames() + +Get a sorted list of all verb names. + +#### Signature + +```dotnet +public List GetVerbNames() +``` + +#### Returns + +`List` + +#### Source + +[`src/SignalWire/SWML/Schema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Schema.cs) + +Line 72. + +*** + +### GetVerbParameters(string) + +Get the parameter (property) definitions for a verb. +Returns an empty dict when the verb is unknown or has no +`properties`. (Python parity: +`SchemaUtils.get_verb_parameters(verb_name)`.) + +#### Signature + +```dotnet +public Dictionary GetVerbParameters(string verbName) +``` + +#### Parameters + + + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/SWML/Schema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Schema.cs) + +Line 114. + +*** + +### IsValidVerb(string) + +Check whether a verb name is valid. + +#### Signature + +```dotnet +public bool IsValidVerb(string name) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/SWML/Schema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Schema.cs) + +Line 69. + +*** + +### LoadSchemaPublic() + +Public load-schema accessor. Returns the embedded SWML +schema as a Dictionary\. Empty dict +when the schema can't be loaded. (Python parity: +`SchemaUtils.load_schema`.) + +#### Signature + +```dotnet +public Dictionary LoadSchemaPublic() +``` + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/SWML/Schema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Schema.cs) + +Line 96. + +*** + +### Reset() + +Reset the singleton (for testing). + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static void Reset() +``` + +#### Source + +[`src/SignalWire/SWML/Schema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Schema.cs) + +Line 60. + +*** + +### ValidateDocument(Dictionary\) + +Validate a SWML document against the loaded schema. +Returns `(true, [])` on success or `(false, [errors...])` on +failure. Lightweight verb-presence check — full JSON-Schema +validation is out of scope for the bundled SDK. +(Python parity: +`SchemaUtils.validate_document(document) -> (bool, list)`.) + +#### Signature + +```dotnet +public (bool Valid, List Errors) ValidateDocument(Dictionary document) +``` + +#### Parameters + + + +#### Returns + +`System.ValueTuple>` + +#### Source + +[`src/SignalWire/SWML/Schema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Schema.cs) + +Line 137. + +## Source + +[`src/SignalWire/SWML/Schema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Schema.cs) + +Line 33. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.swml/service-options/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.swml/service-options/index.mdx new file mode 100644 index 0000000000..141f0d2471 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.swml/service-options/index.mdx @@ -0,0 +1,46 @@ +--- +slug: "/reference/dotnet/signal-wire.swml/service-options" +title: "ServiceOptions" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.SWML.ServiceOptions" + parent: "SignalWire.SWML" + module: "SignalWire.SWML" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs" + visibility: "public" +--- +# `ServiceOptions` + +Configuration options for a SWML service. + +**Modifiers:** `sealed` + +## Signature + +```dotnet +public sealed class ServiceOptions +``` + +## Properties + + + + + + + + + + + + + +## Source + +[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) + +Line 18. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.swml/service/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.swml/service/index.mdx new file mode 100644 index 0000000000..54db5f969a --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.swml/service/index.mdx @@ -0,0 +1,895 @@ +--- +slug: "/reference/dotnet/signal-wire.swml/service" +title: "Service" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.SWML.Service" + parent: "SignalWire.SWML" + module: "SignalWire.SWML" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs" + visibility: "public" +--- +# `Service` + +A SWML service that manages a Document, provides schema-driven verb methods, +handles HTTP requests with Basic authentication, and supports routing callbacks. + +## Signature + +```dotnet +public class Service +``` + +## Properties + + + + + + + + + + + + + + + + + Public read-only view of the SWAIG tool registry — the same data served by /swaig get\_signature, but reachable in-process for introspection (e.g. swaig-test --list-tools against an assembly loaded via reflection). The internal "\_handler" callable is stripped because it isn't meaningful outside this process. This is an SDK accessor, not a new endpoint. Order matches registration order (mirrors ListToolNames). + + +## Methods + +### DefineTool(string, string, Dictionary\, Func\, Dictionary\, FunctionResult>, bool) + +Define a SWAIG function the AI can call. Tool descriptions and +parameter descriptions are LLM-facing prompt engineering — see +PORTING\_GUIDE for guidance on writing them. + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual Service DefineTool(string name, string description, Dictionary parameters, Func, Dictionary, FunctionResult> handler, bool secure = false) +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`SignalWire.SWML.Service` + +#### Source + +[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) + +Line 388. + +*** + +### DefineTools(List\>) + +Register multiple tool definitions at once. + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual Service DefineTools(List> toolDefs) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.SWML.Service` + +#### Source + +[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) + +Line 457. + +*** + +### ExtractSipUsername(Dictionary\?) + +Extract SIP username from a request body. +Validates format: only \[a-zA-Z0-9.\_-], max 64 chars. + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static string? ExtractSipUsername(Dictionary? body) +``` + +#### Parameters + + + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) + +Line 661. + +*** + +### GetAllFunctions() + +Get a snapshot of all registered SWAIG functions +(Python parity: `tool_registry.get_all_functions()` — returns +a copy so subsequent registrations don't mutate the snapshot). + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual Dictionary> GetAllFunctions() +``` + +#### Returns + +`Dictionary>` + +#### Source + +[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) + +Line 442. + +*** + +### GetBasicAuthCredentials() + +Get the Basic Auth credentials as a tuple. + +#### Signature + +```dotnet +public (string User, string Password) GetBasicAuthCredentials() +``` + +#### Returns + +`System.ValueTuple` + +#### Source + +[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) + +Line 173. + +*** + +### GetBasicAuthCredentialsWithSource() + +Get the Basic Auth credentials plus the SOURCE of the +credentials (Python parity: +`get_basic_auth_credentials(include_source=True)`). +Source is one of "provided", "environment", or "generated". + +#### Signature + +```dotnet +public (string User, string Password, string Source) GetBasicAuthCredentialsWithSource() +``` + +#### Returns + +`System.ValueTuple` + +#### Source + +[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) + +Line 182. + +*** + +### GetFullUrl(bool) + +Build the full URL for this service. + +#### Signature + +```dotnet +public string GetFullUrl(bool includeAuth = false) +``` + +#### Parameters + + + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) + +Line 218. + +*** + +### GetFunction(string) + +Get a registered SWAIG function by name, or null +(Python parity: `tool_registry.get_function(name)`). + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual Dictionary? GetFunction(string name) +``` + +#### Parameters + + + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) + +Line 436. + +*** + +### GetProxyUrlBase(Dictionary\?) + +Detect or construct the proxy URL base from request headers. +Priority: SWML\_PROXY\_URL\_BASE env > X-Forwarded-Proto+Host > X-Original-URL > fallback. + +#### Signature + +```dotnet +public string GetProxyUrlBase(Dictionary? headers = null) +``` + +#### Parameters + + + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) + +Line 729. + +*** + +### HandlePostPrompt(Dictionary\?, Dictionary\) + +Handle post-prompt callback. Override in AgentBase. + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +protected virtual (int, Dictionary, string) HandlePostPrompt(Dictionary? requestData, Dictionary headers) +``` + +#### Parameters + + + + + +#### Returns + +`System.ValueTuple,string>` + +#### Source + +[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) + +Line 646. + +*** + +### HandleRequest(string, string, Dictionary\, string?) + +Handle an HTTP request. Returns a tuple of (status, headers, body). + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual (int Status, Dictionary Headers, string Body) HandleRequest(string method, string path, Dictionary headers, string? body) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`System.ValueTuple,string>` + +#### Source + +[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) + +Line 281. + +*** + +### HandleSwaigRequest(string, Dictionary\?, Dictionary\) + +Handle SWAIG function dispatch. + +GET: returns the rendered SWML document (parallel to root /). +POST: parses \{function, argument, call\_id\}, validates, runs the +SwaigPreDispatch hook, calls OnFunctionCall on the chosen target. + +Lifted from AgentBase so non-agent SWMLServices (e.g. ai\_sidecar +host) can serve /swaig without subclassing AgentBase. + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +protected virtual (int, Dictionary, string) HandleSwaigRequest(string method, Dictionary? requestData, Dictionary headers) +``` + +#### Parameters + + + + + + + +#### Returns + +`System.ValueTuple,string>` + +#### Source + +[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) + +Line 551. + +*** + +### HandleSwmlRequest(string, Dictionary\?, Dictionary\) + +Handle SWML document request. + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +protected virtual (int, Dictionary, string) HandleSwmlRequest(string method, Dictionary? requestData, Dictionary headers) +``` + +#### Parameters + + + + + + + +#### Returns + +`System.ValueTuple,string>` + +#### Source + +[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) + +Line 370. + +*** + +### HasFunction(string) + +Check if a SWAIG function is registered +(Python parity: `tool_registry.has_function(name)`). + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual bool HasFunction(string name) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) + +Line 432. + +*** + +### ListToolNames() + +List registered tool names in registration order. + +#### Signature + +```dotnet +public IEnumerable ListToolNames() +``` + +#### Returns + +`IEnumerable` + +#### Source + +[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) + +Line 488. + +*** + +### OnFunctionCall(string, Dictionary\, Dictionary\) + +Dispatch a function call to the registered handler. + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual FunctionResult? OnFunctionCall(string name, Dictionary args, Dictionary rawData) +``` + +#### Parameters + + + + + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) + +Line 467. + +*** + +### OnRequest(Dictionary\?, string?) + +Customization hook called when SWML is requested. +Default delegates to <xref href="SignalWire.SWML.Service.OnSwmlRequest(System.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%2cSystem.String)" data-throw-if-not-resolved="false"></xref>; subclasses +typically override <xref href="SignalWire.SWML.Service.OnSwmlRequest(System.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%2cSystem.String)" data-throw-if-not-resolved="false"></xref> instead of this +method. Return null to use the default SWML rendering, or a +dictionary of modifications to merge in. +(Python parity: `WebMixin.on_request`.) + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual Dictionary? OnRequest(Dictionary? requestData = null, string? callbackPath = null) +``` + +#### Parameters + + + + + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) + +Line 256. + +*** + +### OnSwmlRequest(Dictionary\?, string?) + +Customization hook for subclasses to modify SWML based +on request data. Return null to use default rendering, or a +dictionary of modifications. (Python parity: +`WebMixin.on_swml_request`.) + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual Dictionary? OnSwmlRequest(Dictionary? requestData = null, string? callbackPath = null) +``` + +#### Parameters + + + + + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) + +Line 267. + +*** + +### RegisterRoutingCallback(string, Func\?, Dictionary\, object>) + +Register a callback for a sub-path under the service route. + +#### Signature + +```dotnet +public void RegisterRoutingCallback(string path, Func?, Dictionary, object> callback) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) + +Line 231. + +*** + +### RegisterSwaigFunction(Dictionary\) + +Register a raw SWAIG function definition (e.g. DataMap tools). + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual Service RegisterSwaigFunction(Dictionary funcDef) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.SWML.Service` + +#### Source + +[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) + +Line 415. + +*** + +### RemoveFunction(string) + +Remove a registered SWAIG function. Returns true if +removed, false if not found (Python parity: +`tool_registry.remove_function(name)`). + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual bool RemoveFunction(string name) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) + +Line 448. + +*** + +### RenderSwml() + +Render the SWML document for a request. Override in subclasses to customise. + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual Dictionary RenderSwml() +``` + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) + +Line 245. + +*** + +### Run() + +Start a blocking HTTP(S) server bound to <xref href="SignalWire.SWML.Service.Host" data-throw-if-not-resolved="false"></xref>:<xref href="SignalWire.SWML.Service.Port" data-throw-if-not-resolved="false"></xref>. +Each incoming request is dispatched through <xref href="SignalWire.SWML.Service.HandleRequest(System.String%2cSystem.String%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.String%7d%2cSystem.String)" data-throw-if-not-resolved="false"></xref>; +the response status / headers / body are written back to the client. + +Mirrors Python's SWMLService.run() — examples and the porting-sdk +audit harness call this directly. + +Transport selection mirrors Python's <code>SecurityConfig</code> / +uvicorn <code>ssl\_certfile</code>/<code>ssl\_keyfile</code> path: + +<ul><li>Plain HTTP uses System.Net.HttpListener (BCL, no extra deps).</li><li>HTTPS (when <code>SWML_SSL_ENABLED</code> is truthy and + <code>SWML_SSL_CERT_PATH</code>/<code>SWML_SSL_KEY_PATH</code> point at a valid + PEM cert+key) uses Kestrel, because HttpListener cannot terminate TLS + on Linux (cert binding requires http.sys / netsh, Windows-only).</li></ul> + +Server stops on Ctrl-C or when the process is killed. + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual void Run() +``` + +#### Source + +[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) + +Line 882. + +*** + +### Service(ServiceOptions) + +#### Signature + +```dotnet +public Service(ServiceOptions options) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) + +Line 66. + +*** + +### Sleep(int, string) + +Add a sleep verb with a duration in milliseconds to the specified section. + +#### Signature + +```dotnet +public Service Sleep(int milliseconds, string section = "main") +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire.SWML.Service` + +#### Source + +[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) + +Line 156. + +*** + +### SwaigPreDispatch(Dictionary\, Dictionary\, string) + +Extension point: invoked between argument parsing and function +dispatch. Returns (target, shortCircuit). When shortCircuit is +non-null, it's returned directly without calling OnFunctionCall. +AgentBase may override to add session-token validation or ephemeral +dynamic-config copies. + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +protected virtual (Service Target, Dictionary? ShortCircuit) SwaigPreDispatch(Dictionary requestData, Dictionary headers, string functionName) +``` + +#### Parameters + + + + + + + +#### Returns + +`System.ValueTuple>` + +#### Source + +[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) + +Line 533. + +*** + +### ValidateBasicAuth(string, string) + +Validate provided basic-auth credentials against the +configured ones (constant-time comparison) +(Python parity: `validate_basic_auth(username, password)`). + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual bool ValidateBasicAuth(string username, string password) +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) + +Line 206. + +*** + +### Verb + +Add a verb to the specified section. Validates the verb name against the schema. +Returns this service for fluent chaining. + +#### Signature + + + + ```dotnet + public Service Verb(string verbName, string section, object? config) + ``` + + + + ```dotnet + public Service Verb(string verbName, object? config) + ``` + + + +#### Parameters (Overload 1) + + + + + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`SignalWire.SWML.Service` + +#### Returns (Overload 2) + +`SignalWire.SWML.Service` + +#### Source + +[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) + +Line 132. + +## Source + +[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) + +Line 32. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.swml/swml-builder/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.swml/swml-builder/index.mdx new file mode 100644 index 0000000000..f8154c727a --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.swml/swml-builder/index.mdx @@ -0,0 +1,309 @@ +--- +slug: "/reference/dotnet/signal-wire.swml/swml-builder" +title: "SWMLBuilder" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.SWML.SWMLBuilder" + parent: "SignalWire.SWML" + module: "SignalWire.SWML" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/SWMLBuilder.cs" + visibility: "public" +--- +# `SWMLBuilder` + +## Signature + +```dotnet +public class SWMLBuilder +``` + +## Properties + + + +## Methods + +### AddSection(string) + +Add a section to the underlying document. +(Python parity: `SWMLBuilder.add_section`.) + +#### Signature + +```dotnet +public SWMLBuilder AddSection(string sectionName) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.SWML.SWMLBuilder` + +#### Source + +[`src/SignalWire/SWML/SWMLBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/SWMLBuilder.cs) + +Line 107. + +*** + +### Ai(string?, List\>?, string?, string?, Dictionary\?, Dictionary\?) + +Add an `ai` verb. (Python parity: +`SWMLBuilder.ai(prompt_text, prompt_pom, post_prompt, post_prompt_url, swaig, ...)`.) + +#### Signature + +```dotnet +public SWMLBuilder Ai(string? promptText = null, List>? promptPom = null, string? postPrompt = null, string? postPromptUrl = null, Dictionary? swaig = null, Dictionary? extraParams = null) +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`SignalWire.SWML.SWMLBuilder` + +#### Source + +[`src/SignalWire/SWML/SWMLBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/SWMLBuilder.cs) + +Line 45. + +*** + +### Answer(int?, string?) + +Add an `answer` verb. (Python parity: +`SWMLBuilder.answer(max_duration, codecs)`.) + +#### Signature + +```dotnet +public SWMLBuilder Answer(int? maxDuration = null, string? codecs = null) +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire.SWML.SWMLBuilder` + +#### Source + +[`src/SignalWire/SWML/SWMLBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/SWMLBuilder.cs) + +Line 24. + +*** + +### Build() + +Build the SWML document as a dict. +(Python parity: `SWMLBuilder.build`.) + +#### Signature + +```dotnet +public Dictionary Build() +``` + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/SWML/SWMLBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/SWMLBuilder.cs) + +Line 115. + +*** + +### Hangup(string?) + +Add a `hangup` verb. (Python parity: +`SWMLBuilder.hangup(reason)`.) + +#### Signature + +```dotnet +public SWMLBuilder Hangup(string? reason = null) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.SWML.SWMLBuilder` + +#### Source + +[`src/SignalWire/SWML/SWMLBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/SWMLBuilder.cs) + +Line 35. + +*** + +### Play(string?, List\?, double?, string?, string?, string?) + +Add a `play` verb. (Python parity: +`SWMLBuilder.play(url, urls, volume, say_text, say_voice, say_language)`.) + +#### Signature + +```dotnet +public SWMLBuilder Play(string? url = null, List? urls = null, double? volume = null, string? sayText = null, string? sayVoice = null, string? sayLanguage = null) +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`SignalWire.SWML.SWMLBuilder` + +#### Source + +[`src/SignalWire/SWML/SWMLBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/SWMLBuilder.cs) + +Line 75. + +*** + +### Render() + +Render the SWML document as a JSON string. +(Python parity: `SWMLBuilder.render`.) + +#### Signature + +```dotnet +public string Render() +``` + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/SWML/SWMLBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/SWMLBuilder.cs) + +Line 119. + +*** + +### Reset() + +Reset the underlying document. +(Python parity: `SWMLBuilder.reset`.) + +#### Signature + +```dotnet +public SWMLBuilder Reset() +``` + +#### Returns + +`SignalWire.SWML.SWMLBuilder` + +#### Source + +[`src/SignalWire/SWML/SWMLBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/SWMLBuilder.cs) + +Line 123. + +*** + +### Say(string, string?, string?) + +Add a `say` verb (synthesized speech). +(Python parity: `SWMLBuilder.say(text, voice, language)`.) + +#### Signature + +```dotnet +public SWMLBuilder Say(string text, string? voice = null, string? language = null) +``` + +#### Parameters + + + + + + + +#### Returns + +`SignalWire.SWML.SWMLBuilder` + +#### Source + +[`src/SignalWire/SWML/SWMLBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/SWMLBuilder.cs) + +Line 96. + +*** + +### SWMLBuilder(Service) + +#### Signature + +```dotnet +public SWMLBuilder(Service service) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/SWML/SWMLBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/SWMLBuilder.cs) + +Line 17. + +## Source + +[`src/SignalWire/SWML/SWMLBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/SWMLBuilder.cs) + +Line 13. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.swml/swml-renderer/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.swml/swml-renderer/index.mdx new file mode 100644 index 0000000000..3331441875 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.swml/swml-renderer/index.mdx @@ -0,0 +1,123 @@ +--- +slug: "/reference/dotnet/signal-wire.swml/swml-renderer" +title: "SwmlRenderer" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.SWML.SwmlRenderer" + parent: "SignalWire.SWML" + module: "SignalWire.SWML" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/SwmlRenderer.cs" + visibility: "public" +--- +# `SwmlRenderer` + +**Modifiers:** `static` + +## Signature + +```dotnet +public static class SwmlRenderer +``` + +## Methods + +### RenderFunctionResponseSwml(string, Service, List\>?, string) + +Generate a SWML document for a SWAIG function response — +plays the response text and queues any follow-up actions. +(Python parity: `SwmlRenderer.render_function_response_swml`.) + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static string RenderFunctionResponseSwml(string responseText, Service service, List>? actions = null, string format = "json") +``` + +#### Parameters + + + + + + + + + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/SWML/SwmlRenderer.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/SwmlRenderer.cs) + +Line 100. + +*** + +### RenderSwml(object, Service, string?, string?, List\>?, string?, string?, bool, Dictionary\?, bool, bool, string, bool, string, string?) + +Generate a complete SWML document with AI configuration. +(Python parity: `SwmlRenderer.render_swml`.) + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static string RenderSwml(object prompt, Service service, string? postPrompt = null, string? postPromptUrl = null, List>? swaigFunctions = null, string? startupHookUrl = null, string? hangupHookUrl = null, bool promptIsPom = false, Dictionary? @params = null, bool addAnswer = false, bool recordCall = false, string recordFormat = "mp4", bool recordStereo = true, string format = "json", string? defaultWebhookUrl = null) +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/SWML/SwmlRenderer.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/SwmlRenderer.cs) + +Line 21. + +## Source + +[`src/SignalWire/SWML/SwmlRenderer.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/SwmlRenderer.cs) + +Line 17. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.swml/verb-info/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.swml/verb-info/index.mdx new file mode 100644 index 0000000000..4b0a0ec81d --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.swml/verb-info/index.mdx @@ -0,0 +1,82 @@ +--- +slug: "/reference/dotnet/signal-wire.swml/verb-info" +title: "VerbInfo" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.SWML.VerbInfo" + parent: "SignalWire.SWML" + module: "SignalWire.SWML" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Schema.cs" + visibility: "public" +--- +# `VerbInfo` + +Metadata about a single SWML verb parsed from the schema. + +**Modifiers:** `sealed` + +## Signature + +```dotnet +public sealed record VerbInfo : IEquatable +``` + +## Inheritance + +**Implements:** `System.IEquatable` + +## Properties + + + The full JSON schema definition for this verb. + + + + The actual verb name used in SWML documents (e.g. "answer"). + + + + The definition key in the JSON schema (e.g. "Answer"). + + +## Methods + +### VerbInfo(string, string, JsonElement) + +Metadata about a single SWML verb parsed from the schema. + +#### Signature + +```dotnet +public VerbInfo(string Name, string SchemaName, JsonElement Definition) +``` + +#### Parameters + + + The actual verb name used in SWML documents (e.g. "answer"). + + + + The definition key in the JSON schema (e.g. "Answer"). + + + + The full JSON schema definition for this verb. + + +#### Source + +[`src/SignalWire/SWML/Schema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Schema.cs) + +Line 11. + +## Source + +[`src/SignalWire/SWML/Schema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Schema.cs) + +Line 11. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.utils/execution-mode/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.utils/execution-mode/index.mdx new file mode 100644 index 0000000000..57d46d3195 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.utils/execution-mode/index.mdx @@ -0,0 +1,84 @@ +--- +slug: "/reference/dotnet/signal-wire.utils/execution-mode" +title: "ExecutionMode" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Utils.ExecutionMode" + parent: "SignalWire.Utils" + module: "SignalWire.Utils" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Utils/ExecutionMode.cs" + visibility: "public" +--- +# `ExecutionMode` + +**Modifiers:** `static` + +## Signature + +```dotnet +public static class ExecutionMode +``` + +## Methods + +### GetExecutionMode() + +Returns the execution-mode string — +`"server"` (default), `"cgi"`, `"lambda"`, +`"google_cloud_function"`, `"azure_function"`. +(Python parity: +`signalwire.core.logging_config.get_execution_mode`.) + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static string GetExecutionMode() +``` + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/Utils/ExecutionMode.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Utils/ExecutionMode.cs) + +Line 19. + +*** + +### IsServerlessMode() + +True when running in any serverless environment +(anything other than `"server"`). (Python parity: +`signalwire.utils.is_serverless_mode`.) + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static bool IsServerlessMode() +``` + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Utils/ExecutionMode.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Utils/ExecutionMode.cs) + +Line 44. + +## Source + +[`src/SignalWire/Utils/ExecutionMode.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Utils/ExecutionMode.cs) + +Line 12. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.utils/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.utils/index.mdx new file mode 100644 index 0000000000..1709863302 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.utils/index.mdx @@ -0,0 +1,20 @@ +--- +slug: "/reference/dotnet/signal-wire.utils" +title: "SignalWire.Utils" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "module" + language: "dotnet" + qualified_name: "SignalWire.Utils" +--- +# `SignalWire.Utils` + +## Classes + + + + + + diff --git a/fern/products/sdk-reference/dotnet/signal-wire.utils/url-validator/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.utils/url-validator/index.mdx new file mode 100644 index 0000000000..aa8b6604d2 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/signal-wire.utils/url-validator/index.mdx @@ -0,0 +1,97 @@ +--- +slug: "/reference/dotnet/signal-wire.utils/url-validator" +title: "UrlValidator" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Utils.UrlValidator" + parent: "SignalWire.Utils" + module: "SignalWire.Utils" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Utils/UrlValidator.cs" + visibility: "public" +--- +# `UrlValidator` + +**Modifiers:** `static` + +## Signature + +```dotnet +public static class UrlValidator +``` + +## Methods + +### ValidateUrl(string, bool) + +Validate that a URL is safe to fetch (not pointing to +private/internal resources). Returns true when safe, false when +rejected. (Python parity: +`signalwire.utils.url_validator.validate_url(url, allow_private)`.) + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static bool ValidateUrl(string url, bool allowPrivate = false) +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Utils/UrlValidator.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Utils/UrlValidator.cs) + +Line 20. + +*** + +### ValidateUrlWithResolvedAddresses(string, IPAddress\[], bool) + +Test-friendly overload that accepts already-resolved IPs +instead of doing a live DNS lookup. Cross-language audit / unit +tests use this to exercise the blocked-range logic deterministically. + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static bool ValidateUrlWithResolvedAddresses(string url, IPAddress[] resolvedAddresses, bool allowPrivate = false) +``` + +#### Parameters + + + + + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Utils/UrlValidator.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Utils/UrlValidator.cs) + +Line 79. + +## Source + +[`src/SignalWire/Utils/UrlValidator.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Utils/UrlValidator.cs) + +Line 14. diff --git a/fern/products/sdk-reference/go/_meta.json b/fern/products/sdk-reference/go/_meta.json new file mode 100644 index 0000000000..dbb3942676 --- /dev/null +++ b/fern/products/sdk-reference/go/_meta.json @@ -0,0 +1,10 @@ +{ + "language": "go", + "sdk_name": "go-sdk", + "version": null, + "source_repo": "https://github.com/signalwire/signalwire-go", + "format": "mdx", + "platform": "fern", + "base_slug": "/reference/go", + "item_count": 2268 +} \ No newline at end of file diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/cmd/swaig-test/main/basic-auth/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/cmd/swaig-test/main/basic-auth/index.mdx new file mode 100644 index 0000000000..79dcdadce2 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/cmd/swaig-test/main/basic-auth/index.mdx @@ -0,0 +1,35 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/cmd/swaig-test/main/basic-auth" +title: "BasicAuth" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/cmd/swaig-test.BasicAuth" + parent: "github.com/signalwire/signalwire-go/cmd/swaig-test" + module: "github.com.signalwire.signalwire-go.cmd.swaig-test" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/cmd/swaig-test/simulate.go" +--- +# `BasicAuth` + +BasicAuth bundles a username/password pair for convenience. + +## Signature + +```go +type BasicAuth struct +``` + +## Properties + + + + + +## Source + +[`cmd/swaig-test/simulate.go`](https://github.com/signalwire/signalwire-go/blob/main/cmd/swaig-test/simulate.go) + +Line 507. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/cmd/swaig-test/main/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/cmd/swaig-test/main/index.mdx new file mode 100644 index 0000000000..0da69d0a24 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/cmd/swaig-test/main/index.mdx @@ -0,0 +1,249 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/cmd/swaig-test/main" +title: "main" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "module" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/cmd/swaig-test" + module: "github.com.signalwire.signalwire-go.cmd.swaig-test" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/cmd/swaig-test/main.go" +--- +# `main` + +Command swaig-test is a CLI tool for testing SWAIG agents by exercising their HTTP endpoints. Unlike the Python SDK's swaig-test which loads agent files dynamically, this tool operates against a running agent server. + +Usage: + +``` +swaig-test --url http://user:pass@localhost:3000/ --dump-swml +swaig-test --url http://user:pass@localhost:3000/ --list-tools +swaig-test --url http://user:pass@localhost:3000/ --exec get_weather --param location=London +``` + +Binary-introspection mode (no HTTP): + +``` +swaig-test --example swmlservice_swaig_standalone --list-tools +``` + +In `--example` mode the CLI runs `go run ./examples/` with SWAIG\_LIST\_TOOLS=1 set in the subprocess environment. The SDK's Service.Serve() honors that env var by printing the registered tool registry between **SWAIG\_TOOLS\_BEGIN** / **SWAIG\_TOOLS\_END** sentinels and exiting 0 BEFORE binding any port. The CLI captures stdout, slices between the sentinels, parses the JSON, and pretty-prints — no HTTP, no /swaig endpoint, no rendered-SWML walk required. + +Simulator support for `--simulate-serverless` mode. + +In the Python SDK, `swaig-test` can load an agent from a source file and dispatch invocations through the chosen serverless adapter in-process. Go has no equivalent dynamic-loader for compiled binaries, so the simulator is split in two: + +1. A library API (this file) that sets/clears the mode-detection env vars, dispatches a synthetic Lambda Function URL event through pkg/lambda, and restores the outer environment on exit. Tests and in-process callers (e.g. users who embed `swaig-test` in their own test suites) drive the simulator through this API. +2. A flag on the `swaig-test` CLI (see main.go) that validates the requested platform against what the port actually implements and surfaces a clear error for unsupported platforms (Phase 9 of the porting guide). The flag also works with --url: it sets the mode-detection env vars for the duration of the invocation so the server-side URL generation goes through the platform branch. + +The simulator mirrors the behaviour of Python's `signalwire/cli/simulation/mock_env.py`: + +- Platform preset env vars are applied (AWS\_LAMBDA\_FUNCTION\_NAME etc). +- Conflicting env vars — most importantly SWML\_PROXY\_URL\_BASE — are cleared so platform-specific URL generation is actually exercised. +- The original env is restored on exit, whether the simulated call succeeded, errored, or panicked. Leaking env across simulations would corrupt later tests in the same process. + +## Signature + +```go +package main +``` + +## Examples + + + + ```go + swaig-test --url http://user:pass@localhost:3000/ --dump-swml + swaig-test --url http://user:pass@localhost:3000/ --list-tools + swaig-test --url http://user:pass@localhost:3000/ --exec get_weather --param location=London + ``` + + + + ```go + swaig-test --example swmlservice_swaig_standalone --list-tools + ``` + + + + ```go + swaig-test --url http://user:pass@localhost:3000/ --dump-swml + swaig-test --url http://user:pass@localhost:3000/ --list-tools + swaig-test --url http://user:pass@localhost:3000/ --exec get_weather --param location=London + ``` + + + + ```go + swaig-test --example swmlservice_swaig_standalone --list-tools + ``` + + + +## Classes + + + + BasicAuth bundles a username/password pair for convenience. + + + + LambdaSimResult is the decoded result of one synthetic Lambda invocation. Status is the HTTP status returned by the handler, Body is the response body (already base64-decoded if the adapter marked it so), and Headers mirrors the Lambda response envelope's flattened single-value map. + + + + SimulateLambdaOptions tunes an in-process Lambda simulation. + + + +## Functions + +### SimulateDumpSWMLViaLambda + +SimulateDumpSWMLViaLambda activates the Lambda environment, calls the factory to construct the agent (so any env-captured state reflects the simulated Lambda environment), issues a POST to the agent's route through the Lambda adapter, and returns the response body (the SWML document JSON). It's the library-side equivalent of `swaig-test --simulate-serverless lambda --dump-swml`, usable from in-process tests. + +The factory-based API is load-bearing: constructing the agent BEFORE activation would let SWML\_PROXY\_URL\_BASE from the outer shell leak into the agent's own proxyURLBase field, and the rendered webhook URLs would point at the outer proxy instead of the simulated Lambda function. Use SimulateDumpSWMLViaLambdaHandler only when you've already verified the handler doesn't capture env state — it skips the activation-ordering guarantee. + +basicAuth, if non-empty in both fields, adds a basic-auth header to the synthetic event so authed agents don't 401. + +#### Signature + +```go +func SimulateDumpSWMLViaLambda( + factory HandlerFactory, + agentRoute string, + opts SimulateLambdaOptions, + basicAuth BasicAuth +) ([]byte, error) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`([]byte, error)` + +#### Source + +[`cmd/swaig-test/simulate.go`](https://github.com/signalwire/signalwire-go/blob/main/cmd/swaig-test/simulate.go) + +Line 396. + +*** + +### SimulateExecToolViaLambda + +SimulateExecToolViaLambda activates the Lambda environment, calls the factory to construct the agent (so any env-captured state reflects the simulated Lambda environment), and dispatches a SWAIG tool invocation through the Lambda adapter at `/swaig`. Returns the raw response body. + +#### Signature + +```go +func SimulateExecToolViaLambda( + factory HandlerFactory, + agentRoute string, + toolName string, + args map[string]any, + opts SimulateLambdaOptions, + basicAuth BasicAuth +) ([]byte, error) +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`([]byte, error)` + +#### Source + +[`cmd/swaig-test/simulate.go`](https://github.com/signalwire/signalwire-go/blob/main/cmd/swaig-test/simulate.go) + +Line 445. + +*** + +### SimulateLambdaInvocation + +SimulateLambdaInvocation runs a single synthetic Lambda Function URL event against the given handler with the Lambda environment active. It does NOT touch env vars itself — call activateLambdaEnv first and defer restore() so the env change has the right scope. + +The split exists so one activation can host multiple invocations (dump-SWML then exec-tool, say) without paying the env save/restore cost per call. + +#### Signature + +```go +func SimulateLambdaInvocation( + handler http.Handler, + method string, + path string, + headers map[string]string, + body io.Reader +) (LambdaSimResult, error) +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`(LambdaSimResult, error)` + +#### Source + +[`cmd/swaig-test/simulate.go`](https://github.com/signalwire/signalwire-go/blob/main/cmd/swaig-test/simulate.go) + +Line 287. + +## Type Aliases + +### HandlerFactory + +HandlerFactory is a zero-arg function that constructs the http.Handler under test. The factory is called AFTER the simulator has activated the platform env vars, so any env-var-driven state the agent captures at construction (notably SWML\_PROXY\_URL\_BASE, which pkg/swml.Service reads in its constructor) reflects the simulated environment rather than the outer shell. + +This mirrors the Python SDK's mock\_env.py flow: env vars are set first, then the agent module is imported/loaded, then invocations run against that freshly-loaded agent. + +#### Signature + +```go +type HandlerFactory alias +``` + +#### Source + +[`cmd/swaig-test/simulate.go`](https://github.com/signalwire/signalwire-go/blob/main/cmd/swaig-test/simulate.go) + +Line 376. + +## Source + +[`cmd/swaig-test/main.go`](https://github.com/signalwire/signalwire-go/blob/main/cmd/swaig-test/main.go) diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/cmd/swaig-test/main/lambda-sim-result/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/cmd/swaig-test/main/lambda-sim-result/index.mdx new file mode 100644 index 0000000000..4888623575 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/cmd/swaig-test/main/lambda-sim-result/index.mdx @@ -0,0 +1,37 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/cmd/swaig-test/main/lambda-sim-result" +title: "LambdaSimResult" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/cmd/swaig-test.LambdaSimResult" + parent: "github.com/signalwire/signalwire-go/cmd/swaig-test" + module: "github.com.signalwire.signalwire-go.cmd.swaig-test" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/cmd/swaig-test/simulate.go" +--- +# `LambdaSimResult` + +LambdaSimResult is the decoded result of one synthetic Lambda invocation. Status is the HTTP status returned by the handler, Body is the response body (already base64-decoded if the adapter marked it so), and Headers mirrors the Lambda response envelope's flattened single-value map. + +## Signature + +```go +type LambdaSimResult struct +``` + +## Properties + + + + + + + +## Source + +[`cmd/swaig-test/simulate.go`](https://github.com/signalwire/signalwire-go/blob/main/cmd/swaig-test/simulate.go) + +Line 273. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/cmd/swaig-test/main/simulate-lambda-options/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/cmd/swaig-test/main/simulate-lambda-options/index.mdx new file mode 100644 index 0000000000..ae00b36575 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/cmd/swaig-test/main/simulate-lambda-options/index.mdx @@ -0,0 +1,47 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/cmd/swaig-test/main/simulate-lambda-options" +title: "SimulateLambdaOptions" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/cmd/swaig-test.SimulateLambdaOptions" + parent: "github.com/signalwire/signalwire-go/cmd/swaig-test" + module: "github.com.signalwire.signalwire-go.cmd.swaig-test" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/cmd/swaig-test/simulate.go" +--- +# `SimulateLambdaOptions` + +SimulateLambdaOptions tunes an in-process Lambda simulation. + +## Signature + +```go +type SimulateLambdaOptions struct +``` + +## Properties + + + FunctionName overrides AWS\_LAMBDA\_FUNCTION\_NAME. Empty means use the preset default ("test-agent-function"). + + + + FunctionURLOverride, if non-empty, is assigned to AWS\_LAMBDA\_FUNCTION\_URL during the simulation. The default (empty) lets GetFullURL fall back to constructing the URL from AWS\_LAMBDA\_FUNCTION\_NAME + AWS\_REGION, which is the more interesting code path to exercise in tests. + + + + Logger receives warnings about env state — notably if SWML\_PROXY\_URL\_BASE is still set after the clear attempt. A nil Logger sends warnings to os.Stderr. + + + + Region overrides AWS\_REGION. Empty means use the preset default ("us-east-1"). + + +## Source + +[`cmd/swaig-test/simulate.go`](https://github.com/signalwire/signalwire-go/blob/main/cmd/swaig-test/simulate.go) + +Line 195. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/agent/agent/agent-base/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/agent/agent/agent-base/index.mdx new file mode 100644 index 0000000000..8a487ec130 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/agent/agent/agent-base/index.mdx @@ -0,0 +1,2701 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/agent/agent/agent-base" +title: "AgentBase" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/agent.AgentBase" + parent: "github.com/signalwire/signalwire-go/pkg/agent" + module: "github.com.signalwire.signalwire-go.pkg.agent" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go" +--- +# `AgentBase` + +AgentBase is the central agent struct. It embeds \*swml.Service so that Service's fields and methods (Name, Route, Host, Port, basic auth, the HTTP server, the tool registry, etc.) are promoted onto AgentBase. The agent-specific state below is layered on top. + +## Signature + +```go +type AgentBase struct +``` + +## Properties + + + Agent identity — matches Python: self.agent\_id = agent\_id or str(uuid.uuid4()) Exported so callers can read the assigned ID without a getter. + + + + + + +## Methods + +### AddAnswerVerb + +AddAnswerVerb configures the answer verb. Merged with defaults at render time. + +#### Signature + +```go +func (*AgentBase) AddAnswerVerb(config map[string]any) *AgentBase +``` + +#### Parameters + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1537. + +*** + +### AddFunctionInclude + +AddFunctionInclude adds a remote SWAIG function include. + +#### Signature + +```go +func (*AgentBase) AddFunctionInclude(url string, functions []string, metaData map[string]any) *AgentBase +``` + +#### Parameters + + + + + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1472. + +*** + +### AddHint + +AddHint adds a single speech-recognition hint. + +#### Signature + +```go +func (*AgentBase) AddHint(hint string) *AgentBase +``` + +#### Parameters + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1086. + +*** + +### AddHints + +AddHints adds multiple speech-recognition hints. + +#### Signature + +```go +func (*AgentBase) AddHints(hints []string) *AgentBase +``` + +#### Parameters + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1094. + +*** + +### AddInternalFiller + +AddInternalFiller adds fillers for a specific function and language. + +See SetInternalFillers for the complete list of supported funcName values (SupportedInternalFillerNames) and what fillers do. Names outside the supported set log a warning and are stored but will not play at runtime. + +#### Signature + +```go +func (*AgentBase) AddInternalFiller(funcName string, langCode string, fillers []string) *AgentBase +``` + +#### Parameters + + + + + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1444. + +*** + +### AddLanguage + +AddLanguage adds a language configuration as a raw map. + +#### Signature + +```go +func (*AgentBase) AddLanguage(config map[string]any) *AgentBase +``` + +#### Parameters + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1133. + +*** + +### AddLanguageTyped + +AddLanguageTyped adds a language configuration using typed named parameters, matching the Python SDK's add\_language method signature exactly. + +Python equivalent: ai\_config\_mixin.AIConfigMixin.add\_language Python signature: add\_language(name, code, voice, speech\_fillers=None, + +``` +function_fillers=None, engine=None, model=None, params=None) +``` + +Parameters: + +- name: display name (e.g. "English") +- code: BCP-47 language code (e.g. "en-US") +- voice: TTS voice name; may use "engine.voice:model" combined format +- speechFillers: filler phrases for natural speech pauses +- functionFillers: filler phrases played during SWAIG function calls +- engine: explicit TTS engine name (e.g. "elevenlabs") +- model: explicit TTS model name (e.g. "eleven\_turbo\_v2\_5") +- params: optional per-language params dict (engine-specific tuning, voice settings, etc.). Variadic — passing a single non-empty map\[string]any emits the SWML language object's "params" key. Empty or omitted → key not emitted. + +#### Signature + +```go +func (*AgentBase) AddLanguageTyped( + name string, + code string, + voice string, + speechFillers []string, + functionFillers []string, + engine string, + model string, + params ...map[string]any +) *AgentBase +``` + +#### Parameters + + + + + + + + + + + + + + + + + +#### Returns + +`*AgentBase` + +#### Examples + + + + ```go + function_fillers=None, engine=None, model=None, params=None) + ``` + + + + ```go + function_fillers=None, engine=None, model=None, params=None) + ``` + + + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1160. + +*** + +### AddMcpServer + +AddMcpServer adds an external MCP server for tool discovery and invocation. Tools are discovered via the MCP protocol at session start and registered as SWAIG functions. Returns self for method chaining. + +#### Signature + +```go +func (*AgentBase) AddMcpServer(cfg MCPServerConfig) *AgentBase +``` + +#### Parameters + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1867. + +*** + +### AddPatternHint + +AddPatternHint adds a pattern-based speech-recognition hint with regex replacement semantics. + +Python equivalent: ai\_config\_mixin.AIConfigMixin.add\_pattern\_hint Python signature: add\_pattern\_hint(hint, pattern, replace, ignore\_case=False) + +The Python implementation appends to self.\_hints (not a separate patternHints list) as a dict with keys "hint", "pattern", "replace", "ignore\_case". The Go implementation stores in patternHints and merges into the rendered "hints" array at render time. + +Parameters: + +- hint: the hint text the model receives +- pattern: regex pattern for the spoken word/phrase +- replace: replacement string for the matched pattern +- ignoreCase: when true, matching is case-insensitive + +#### Signature + +```go +func (*AgentBase) AddPatternHint(hint string, pattern string, replace string, ignoreCase ...bool) *AgentBase +``` + +#### Parameters + + + + + + + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1117. + +*** + +### AddPostAiVerb + +AddPostAiVerb adds a SWML verb to execute after the AI verb. + +#### Signature + +```go +func (*AgentBase) AddPostAiVerb(verbName string, config map[string]any) *AgentBase +``` + +#### Parameters + + + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1555. + +*** + +### AddPostAnswerVerb + +AddPostAnswerVerb adds a SWML verb to execute after the answer. + +#### Signature + +```go +func (*AgentBase) AddPostAnswerVerb(verbName string, config map[string]any) *AgentBase +``` + +#### Parameters + + + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1547. + +*** + +### AddPreAnswerVerb + +AddPreAnswerVerb adds a SWML verb to execute before the answer. + +#### Signature + +```go +func (*AgentBase) AddPreAnswerVerb(verbName string, config map[string]any) *AgentBase +``` + +#### Parameters + + + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1529. + +*** + +### AddPronunciation + +AddPronunciation adds a pronunciation override rule. + +Python equivalent: ai\_config\_mixin.AIConfigMixin.add\_pronunciation Python signature: add\_pronunciation(replace, with\_text, ignore\_case=False) + +Parameters: + +- replace: the word or expression to match +- withText: the phonetic spelling to substitute +- ignoreCase: when true, matching ignores case (Python: ignore\_case) + +#### Signature + +```go +func (*AgentBase) AddPronunciation(replace string, withText string, ignoreCase ...bool) *AgentBase +``` + +#### Parameters + + + + + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1289. + +*** + +### AddSkill + +AddSkill loads a skill by name with optional params and registers its tools. + +skillName is a skills.SkillName (a defined string type). The built-in skills.Skill\* constants give autocomplete + call-site typo checking; because Go auto-converts untyped string-constant literals, a bare "datetime" literal or skills.SkillName("custom") for a third-party skill compiles identically — parity with the Python reference's str parameter. + +#### Signature + +```go +func (*AgentBase) AddSkill(skillName skills.SkillName, params map[string]any) *AgentBase +``` + +#### Parameters + + + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 2244. + +*** + +### AddSwaigQueryParams + +AddSwaigQueryParams adds query parameters that will be appended to SWAIG webhook URLs. + +#### Signature + +```go +func (*AgentBase) AddSwaigQueryParams(params map[string]string) *AgentBase +``` + +#### Parameters + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1671. + +*** + +### AsRouter + +AsRouter returns an http.Handler for embedding in a custom server. + +#### Signature + +```go +func (*AgentBase) AsRouter() http.Handler +``` + +#### Returns + +`http.Handler` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 2729. + +*** + +### AutoMapSipUsernames + +AutoMapSipUsernames automatically registers common SIP usernames derived from this agent's name and route. + +Python equivalent: AgentBase.auto\_map\_sip\_usernames (agent\_base.py line 674) + +Derives usernames by: + +1. Stripping non-alphanumeric/underscore chars from the agent name (lowercased) +2. Stripping non-alphanumeric/underscore chars from the route (lowercased) +3. If the cleaned name is longer than 3 chars, also registers a vowel-stripped variant + +#### Signature + +```go +func (*AgentBase) AutoMapSipUsernames() *AgentBase +``` + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 2195. + +*** + +### ClearPostAiVerbs + +ClearPostAiVerbs removes all post-AI verbs. + +#### Signature + +```go +func (*AgentBase) ClearPostAiVerbs() *AgentBase +``` + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1579. + +*** + +### ClearPostAnswerVerbs + +ClearPostAnswerVerbs removes all post-answer verbs. + +#### Signature + +```go +func (*AgentBase) ClearPostAnswerVerbs() *AgentBase +``` + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1571. + +*** + +### ClearPreAnswerVerbs + +ClearPreAnswerVerbs removes all pre-answer verbs. + +#### Signature + +```go +func (*AgentBase) ClearPreAnswerVerbs() *AgentBase +``` + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1563. + +*** + +### ClearSwaigQueryParams + +ClearSwaigQueryParams removes all SWAIG query parameters. + +#### Signature + +```go +func (*AgentBase) ClearSwaigQueryParams() *AgentBase +``` + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1681. + +*** + +### Contexts + +Contexts is an alias for DefineContexts. + +#### Signature + +```go +func (*AgentBase) Contexts() *contexts.ContextBuilder +``` + +#### Returns + +`*contexts.ContextBuilder` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1615. + +*** + +### CreateToolToken + +CreateToolToken mints a per-call SWAIG-function token via the agent's SessionManager. Returns an empty string when minting fails (Python parity: state\_mixin.StateMixin.\_create\_tool\_token, which catches all exceptions and returns "" on error). + +#### Signature + +```go +func (*AgentBase) CreateToolToken(toolName string, callID string) (token string) +``` + +#### Parameters + + + + + +#### Returns + +`string` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1843. + +*** + +### DefineContexts + +DefineContexts returns the context builder, creating it if needed. The builder is attached to this agent so Validate() can check user-defined tool names against reserved native tool names (next\_step, change\_context, gather\_submit). + +#### Signature + +```go +func (*AgentBase) DefineContexts() *contexts.ContextBuilder +``` + +#### Returns + +`*contexts.ContextBuilder` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1594. + +*** + +### DefineTool + +DefineTool registers a tool (SWAIG function) with the agent. + +A SWAIG function is exactly the same concept as a "tool" in native OpenAI / Anthropic tool calling. On every LLM turn, the SDK renders each registered SWAIG function into the OpenAI tool schema: + +``` +{ + "type": "function", + "function": { + "name": "your_name_here", + "description": "your description text", + "parameters": { /* your JSON schema */ } + } +} +``` + +That schema is sent to the model as part of the same API call that produces the next assistant message. The model reads: + +- the function Description to decide WHEN to call this tool +- each parameter "description" (inside Parameters) to decide HOW to fill in that argument from the user's utterance + +This means descriptions are prompt engineering, not developer comments. A vague Description is the #1 cause of "the model has the right tool but doesn't call it" failures. + +BAD: + +``` +Description: "Lookup function" +Parameters: {"id": {"type": "string", "description": "the id"}} +``` + +GOOD: + +``` +Description: "Look up a customer's account details by account number. "+ + "Use this BEFORE quoting any account-specific info (balance, "+ + "plan, status). Do not use for general product questions.", +Parameters: map[string]any{ + "account_number": map[string]any{ + "type": "string", + "description": "The customer's 8-digit account number, no "+ + "dashes or spaces. Ask the user if they don't provide it.", + }, +}, +``` + +LLM tool selection accuracy degrades past ~7-8 simultaneously-active tools per call. Use Step.SetFunctions() to partition tools across steps so only the relevant subset is active at any moment. + +#### Signature + +```go +func (*AgentBase) DefineTool(def ToolDefinition) *AgentBase +``` + +#### Parameters + + + +#### Returns + +`*AgentBase` + +#### Examples + + + + ```go + { + "type": "function", + "function": { + "name": "your_name_here", + "description": "your description text", + "parameters": { /* your JSON schema */ } + } + } + ``` + + + + ```go + Description: "Lookup function" + Parameters: {"id": {"type": "string", "description": "the id"}} + ``` + + + + ```go + Description: "Look up a customer's account details by account number. "+ + "Use this BEFORE quoting any account-specific info (balance, "+ + "plan, status). Do not use for general product questions.", + Parameters: map[string]any{ + "account_number": map[string]any{ + "type": "string", + "description": "The customer's 8-digit account number, no "+ + "dashes or spaces. Ask the user if they don't provide it.", + }, + }, + ``` + + + + ```go + { + "type": "function", + "function": { + "name": "your_name_here", + "description": "your description text", + "parameters": { /* your JSON schema */ } + } + } + ``` + + + + ```go + Description: "Lookup function" + Parameters: {"id": {"type": "string", "description": "the id"}} + ``` + + + + ```go + Description: "Look up a customer's account details by account number. "+ + "Use this BEFORE quoting any account-specific info (balance, "+ + "plan, status). Do not use for general product questions.", + Parameters: map[string]any{ + "account_number": map[string]any{ + "type": "string", + "description": "The customer's 8-digit account number, no "+ + "dashes or spaces. Ask the user if they don't provide it.", + }, + }, + ``` + + + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 964. + +*** + +### DefineTools + +DefineTools returns all registered tool definitions in insertion order. + +#### Signature + +```go +func (*AgentBase) DefineTools() []*ToolDefinition +``` + +#### Returns + +`[]*ToolDefinition` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1050. + +*** + +### EnableDebugEvents + +EnableDebugEvents sets the debug events level (0 = off). + +#### Signature + +```go +func (*AgentBase) EnableDebugEvents(level int) *AgentBase +``` + +#### Parameters + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1464. + +*** + +### EnableDebugRoutes + +EnableDebugRoutes is a placeholder for adding debug HTTP routes. + +#### Signature + +```go +func (*AgentBase) EnableDebugRoutes() *AgentBase +``` + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1689. + +*** + +### EnableMcpServer + +EnableMcpServer exposes this agent's tools as an MCP server endpoint at /mcp. The endpoint speaks JSON-RPC 2.0 (MCP protocol) and supports initialize, tools/list, tools/call, and ping. Returns self for method chaining. + +#### Signature + +```go +func (*AgentBase) EnableMcpServer() *AgentBase +``` + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1888. + +*** + +### EnableSipRouting + +EnableSipRouting enables SIP-based routing for this agent. + +Python equivalent: AgentBase.enable\_sip\_routing(auto\_map=True, path="/sip") + +This registers a routing callback at the given path that checks incoming SIP usernames against the agent's registered username set. When autoMap is true, AutoMapSipUsernames is called to derive common usernames from the agent name and route. + +The Python implementation (agent\_base.py line 612) creates a sip\_routing\_callback that extracts the SIP username from the body, checks it against \_sip\_usernames, and returns None in both the matched and unmatched case — letting the normal routing continue. It then calls register\_routing\_callback to register the callback, and optionally calls auto\_map\_sip\_usernames. + +#### Signature + +```go +func (*AgentBase) EnableSipRouting(autoMap bool, path string) *AgentBase +``` + +#### Parameters + + + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 2084. + +*** + +### GetAllFunctions + +GetAllFunctions returns a snapshot of all registered SWAIG functions keyed by name. The returned map is a copy — subsequent registrations do not mutate it. (Python parity: “ToolRegistry.get\_all\_functions“.) + +#### Signature + +```go +func (*AgentBase) GetAllFunctions() map[string]*ToolDefinition +``` + +#### Returns + +`map[string]*ToolDefinition` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1020. + +*** + +### GetBasicAuthCredentials + +GetBasicAuthCredentials returns the (username, password) configured for this agent's HTTP basic auth. + +Python equivalent: auth\_mixin.AuthMixin.get\_basic\_auth\_credentials (auth\_mixin.py line 42) Python behavior: returns (username, password) tuple from self.\_basic\_auth + +#### Signature + +```go +func (*AgentBase) GetBasicAuthCredentials() (string, string) +``` + +#### Returns + +`(string, string)` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1796. + +*** + +### GetBasicAuthCredentialsWithSource + +GetBasicAuthCredentialsWithSource returns the basic-auth credentials plus a string indicating their SOURCE — one of "provided", "environment", or "generated". Mirrors Python's “auth\_mixin.AuthMixin.get\_basic\_auth\_credentials(include\_source=True)“ (auth\_mixin.py line 42-73). + +#### Signature + +```go +func (*AgentBase) GetBasicAuthCredentialsWithSource() (user string, pass string, source string) +``` + +#### Returns + +`(string, string, string)` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1805. + +*** + +### GetContexts + +GetContexts returns the contexts as a serialised map (the same shape SWML expects), or nil when no contexts have been defined yet. This mirrors Python's “PromptManager.get\_contexts“ which returns the contexts dict or “None“. + +Python equivalent: prompt\_manager.PromptManager.get\_contexts + +#### Signature + +```go +func (*AgentBase) GetContexts() map[string]any +``` + +#### Returns + +`map[string]any` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 893. + +*** + +### GetFullURL + +GetFullURL returns the full URL for this agent's endpoint, optionally embedding basic-auth credentials. + +Python equivalent: AgentBase.get\_full\_url(include\_auth=False) (agent\_base.py:325) + +The Python implementation handles serverless URL construction (CGI / Lambda / Cloud Functions / Azure) inline. In the Go SDK, serverless URL construction lives in pkg/lambda; this method delegates server-mode URL building to the embedded swml.Service and matches Python's server-mode behavior. + +#### Signature + +```go +func (*AgentBase) GetFullURL(includeAuth bool) string +``` + +#### Parameters + + + +#### Returns + +`string` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 574. + +*** + +### GetFunction + +GetFunction returns the registered tool definition for the given name, or nil when no such function is registered. (Python parity: “ToolRegistry.get\_function“.) + +#### Signature + +```go +func (*AgentBase) GetFunction(name string) *ToolDefinition +``` + +#### Parameters + + + +#### Returns + +`*ToolDefinition` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1008. + +*** + +### GetLanguageParams + +GetLanguageParams reads the per-language params dict for a previously-added language. + +Python equivalent: ai\_config\_mixin.AIConfigMixin.get\_language\_params Python signature: get\_language\_params(code) -> Optional\[Dict\[str, Any]] + +Returns the params map if set, or nil otherwise (including when the code is unknown). Callers can distinguish "no params set" from "empty params set" by the fact that empty maps are never stored (SetLanguageParams with an empty dict removes the key). + +#### Signature + +```go +func (*AgentBase) GetLanguageParams(code string) map[string]any +``` + +#### Parameters + + + +#### Returns + +`map[string]any` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1258. + +*** + +### GetName + +GetName returns the agent's name. + +#### Signature + +```go +func (*AgentBase) GetName() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 559. + +*** + +### GetPostPrompt + +GetPostPrompt returns the current post-prompt text. Returns an empty string if no post-prompt has been set. + +Python equivalent: prompt\_mixin.PromptMixin.get\_post\_prompt (prompt\_mixin.py line 374) + +#### Signature + +```go +func (*AgentBase) GetPostPrompt() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 870. + +*** + +### GetPrompt + +GetPrompt returns the current prompt. If POM mode is active, it returns \[]map\[string]any; otherwise it returns the raw string. + +#### Signature + +```go +func (*AgentBase) GetPrompt() any +``` + +#### Returns + +`any` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 776. + +*** + +### GetRawPrompt + +GetRawPrompt returns the raw prompt text whatever “SetPromptText“ stored, regardless of POM mode. Returns an empty string when no raw prompt has been set. + +Python equivalent: prompt\_manager.PromptManager.get\_raw\_prompt + +#### Signature + +```go +func (*AgentBase) GetRawPrompt() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 881. + +*** + +### GetRoute + +GetRoute returns the agent's configured route path. + +#### Signature + +```go +func (*AgentBase) GetRoute() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 552. + +*** + +### HasFunction + +HasFunction reports whether a SWAIG function with the given name is registered. (Python parity: “ToolRegistry.has\_function“.) + +#### Signature + +```go +func (*AgentBase) HasFunction(name string) bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 998. + +*** + +### HasSkill + +HasSkill returns whether a skill is loaded. Accepts a skills.SkillName constant or any string literal (Go auto-converts), mirroring AddSkill. + +#### Signature + +```go +func (*AgentBase) HasSkill(skillName skills.SkillName) bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 2320. + +*** + +### ListSkills + +ListSkills returns the names of loaded skills. + +#### Signature + +```go +func (*AgentBase) ListSkills() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 2314. + +*** + +### ListToolNames + +ListToolNames returns the names of every registered SWAIG tool in insertion order. Implements contexts.ToolLister. + +#### Signature + +```go +func (*AgentBase) ListToolNames() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1606. + +*** + +### ManualSetProxyUrl + +ManualSetProxyUrl overrides the proxy URL base used for webhook URL generation. + +#### Signature + +```go +func (*AgentBase) ManualSetProxyUrl(url string) *AgentBase +``` + +#### Parameters + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1646. + +*** + +### OnDebugEvent + +OnDebugEvent registers a callback for debug events. + +#### Signature + +```go +func (*AgentBase) OnDebugEvent(cb DebugEventHandler) *AgentBase +``` + +#### Parameters + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 2337. + +*** + +### OnFunctionCall + +OnFunctionCall dispatches a SWAIG function call to the registered handler. + +#### Signature + +```go +func (*AgentBase) OnFunctionCall(name string, args map[string]any, rawData map[string]any) (any, error) +``` + +#### Parameters + + + + + + + +#### Returns + +`(any, error)` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1063. + +*** + +### OnRequest + +OnRequest is called on every SWML request before rendering. Subclasses can override this method to inspect or transform the request data. It delegates to OnSwmlRequest. + +Python equivalent: web\_mixin.WebMixin.on\_request (web\_mixin.py line 1266) Python signature: on\_request(request\_data, callback\_path) -> Optional\[dict] + +Returns nil to proceed with default rendering, or a non-nil map containing SWML document overrides. + +#### Signature + +```go +func (*AgentBase) OnRequest(requestData map[string]any, callbackPath string) map[string]any +``` + +#### Parameters + + + + + +#### Returns + +`map[string]any` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1703. + +*** + +### OnSummary + +OnSummary registers a callback for post-prompt summaries. + +#### Signature + +```go +func (*AgentBase) OnSummary(cb SummaryCallback) *AgentBase +``` + +#### Parameters + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 2329. + +*** + +### OnSwmlRequest + +OnSwmlRequest is the primary customization point for the user to modify the SWML document based on request data. If a hook has been registered via SetOnSwmlRequestHook the hook is invoked; otherwise this returns nil (no modification). + +Python equivalent: web\_mixin.WebMixin.on\_swml\_request (web\_mixin.py line 1287) Python signature: on\_swml\_request(request\_data, callback\_path, request) -> Optional\[dict] + +Go has no method overriding via embedded structs alone — the hook field is the idiomatic Go equivalent of Python's overridable on\_swml\_request. The third \*http.Request argument is preserved on the Go-native signature (the cross-language audit projects only the first two args). Returning a non-nil map applies modifications to the rendered SWML; returning nil uses the default rendering unchanged. + +#### Signature + +```go +func (*AgentBase) OnSwmlRequest(requestData map[string]any, callbackPath string, r *http.Request) map[string]any +``` + +#### Parameters + + + + + + + +#### Returns + +`map[string]any` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1721. + +*** + +### Pom + +Pom returns a typed PromptObjectModel built from the agent's current POM sections. Returns nil when use\_pom is false (Python parity: “self.pom“ is “None“ when “use\_pom=False“). The returned value is a deep copy / fresh build — mutations don't affect the agent's internal state. + +Python equivalent: “agent.pom“ instance attribute (agent\_base.py line 209), which is a “PromptObjectModel“ instance. + +#### Signature + +```go +func (*AgentBase) Pom() *pom.PromptObjectModel +``` + +#### Returns + +`*pom.PromptObjectModel` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 795. + +*** + +### PromptAddSection + +PromptAddSection appends a new section to the POM prompt. + +Python equivalent: prompt\_mixin.PromptMixin.prompt\_add\_section Added params to match Python signature: numbered, numberedBullets, subsections. - numbered: if true the section itself is rendered with a numeric marker - numberedBullets: if true the bullet list is rendered with numbers - subsections: optional list of child section maps (each with "title", "body", "bullets") + +#### Signature + +```go +func (*AgentBase) PromptAddSection( + title string, + body string, + bullets []string, + opts ...PromptSectionOption +) *AgentBase +``` + +#### Parameters + + + + + + + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 615. + +*** + +### PromptAddSubsection + +PromptAddSubsection adds a subsection under an existing parent section. + +#### Signature + +```go +func (*AgentBase) PromptAddSubsection( + parentTitle string, + title string, + body string, + bullets []string +) *AgentBase +``` + +#### Parameters + + + + + + + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 739. + +*** + +### PromptAddToSection + +PromptAddToSection finds an existing POM section by title and appends text and/or bullets. If the section does not exist, it is a no-op. + +Python equivalent: prompt\_mixin.PromptMixin.prompt\_add\_to\_section Added params to match Python signature: bullet (single bullet string) and bullets (\[]string list). When body is non-empty it is appended to the section body. When bullet is non-empty it is added to the bullets list. When bullets is non-nil its elements are appended to the bullets list. + +#### Signature + +```go +func (*AgentBase) PromptAddToSection(title string, body string, opts ...PromptAddToSectionOption) *AgentBase +``` + +#### Parameters + + + + + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 681. + +*** + +### PromptHasSection + +PromptHasSection returns true if a POM section with the given title exists. + +#### Signature + +```go +func (*AgentBase) PromptHasSection(title string) bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 763. + +*** + +### RegisterRoutingCallback + +RegisterRoutingCallback registers a callback function that is invoked for incoming requests at the given path to determine routing. + +Python equivalent: web\_mixin.WebMixin.register\_routing\_callback Python signature: register\_routing\_callback(callback\_fn, path="/sip") + +The callback receives the HTTP request and the parsed body. It should return a non-nil map to override the response, or nil to let normal processing continue. This method delegates to swml.Service.RegisterRoutingCallback. + +For Python-aligned redirect semantics (callback returns a route string and the framework issues an HTTP 307 redirect), use RegisterSipRoutingCallback. + +#### Signature + +```go +func (*AgentBase) RegisterRoutingCallback( + callbackFn func(r *http.Request, body map[string]any) map[string]any, + path string +) +``` + +#### Parameters + + + + + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 2132. + +*** + +### RegisterSipRoutingCallback + +RegisterSipRoutingCallback registers a callback whose string return value triggers an HTTP 307 Temporary Redirect to that route. An empty return value (or a GET / non-POST request) lets normal SWML processing continue. + +Python equivalent: web\_mixin.WebMixin.register\_routing\_callback Python signature: register\_routing\_callback(callback\_fn, path="/sip") + +The Python callback returns Optional\[str]; on a non-None return the framework responds with HTTP 307 + Location: route (web\_mixin.py:628-635). This method preserves that behavior, in contrast to RegisterRoutingCallback which returns a response document override (a richer Go-only mechanism). + +Use this form when porting Python code that relies on redirect-based SIP or route-dispatch patterns. + +#### Signature + +```go +func (*AgentBase) RegisterSipRoutingCallback( + callbackFn func(r *http.Request, body map[string]any) string, + path string +) +``` + +#### Parameters + + + + + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 2153. + +*** + +### RegisterSipUsername + +RegisterSipUsername registers a SIP username that this agent handles. + +#### Signature + +```go +func (*AgentBase) RegisterSipUsername(username string) *AgentBase +``` + +#### Parameters + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 2226. + +*** + +### RegisterSwaigFunction + +RegisterSwaigFunction registers a raw SWAIG function definition (e.g. for DataMap tools that don't have a Go handler). + +#### Signature + +```go +func (*AgentBase) RegisterSwaigFunction(funcDef map[string]any) *AgentBase +``` + +#### Parameters + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 976. + +*** + +### RemoveFunction + +RemoveFunction removes a registered SWAIG function. Returns true when the function was found and removed; false when it wasn't registered. (Python parity: “ToolRegistry.remove\_function“.) + +#### Signature + +```go +func (*AgentBase) RemoveFunction(name string) bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1033. + +*** + +### RemoveSkill + +RemoveSkill unloads a skill by name. Accepts a skills.SkillName constant or any string literal (Go auto-converts), mirroring AddSkill. + +#### Signature + +```go +func (*AgentBase) RemoveSkill(skillName skills.SkillName) *AgentBase +``` + +#### Parameters + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 2308. + +*** + +### RenderSWML + +RenderSWML builds the complete SWML document for a request. + +#### Signature + +```go +func (*AgentBase) RenderSWML(requestData map[string]any, request *http.Request) map[string]any +``` + +#### Parameters + + + + + +#### Returns + +`map[string]any` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 2488. + +*** + +### ResetContexts + +ResetContexts removes all contexts, returning the agent to a no-contexts state. This is a convenience wrapper around DefineContexts().Reset(). Use it in a dynamic config callback when you need to rebuild contexts from scratch for a specific request. + +#### Signature + +```go +func (*AgentBase) ResetContexts() *AgentBase +``` + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1623. + +*** + +### Run + +Run starts the HTTP server for the agent. This is a blocking call. + +Run delegates to RunContext with context.Background(); use RunContext to drive a graceful shutdown from a context (cancellation or deadline). + +#### Signature + +```go +func (*AgentBase) Run() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 2666. + +*** + +### RunContext + +RunContext is the context-aware form of Run. It blocks serving HTTP exactly like Run, but when ctx is cancelled (or its deadline passes) it triggers the same graceful HTTP shutdown that SetupGracefulShutdown performs on a signal — draining in-flight requests — then returns nil. It composes with SetupGracefulShutdown: whichever of (ctx, SIGTERM/SIGINT) fires first wins. + +This is a Go-port addition (the Python reference's run()/serve loop has no caller-supplied cancellation token); documented in PORT\_ADDITIONS.md. + +#### Signature + +```go +func (*AgentBase) RunContext(ctx context.Context) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 2678. + +*** + +### Serve + +Serve is an alias for Run. + +#### Signature + +```go +func (*AgentBase) Serve() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 2724. + +*** + +### SetDynamicConfigCallback + +SetDynamicConfigCallback sets a callback invoked on each request to allow per-request agent customisation. + +#### Signature + +```go +func (*AgentBase) SetDynamicConfigCallback(cb DynamicConfigCallback) *AgentBase +``` + +#### Parameters + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1638. + +*** + +### SetFunctionIncludes + +SetFunctionIncludes replaces all function includes. + +#### Signature + +```go +func (*AgentBase) SetFunctionIncludes(includes []map[string]any) *AgentBase +``` + +#### Parameters + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1487. + +*** + +### SetGlobalData + +SetGlobalData replaces all global data. + +#### Signature + +```go +func (*AgentBase) SetGlobalData(data map[string]any) *AgentBase +``` + +#### Parameters + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1328. + +*** + +### SetInternalFillers + +SetInternalFillers replaces all internal fillers. + +Internal fillers are short phrases the AI agent speaks (via TTS) while an internal/native function is running, so the caller doesn't hear dead air during transitions or background work. + +Supported function names (match the SWAIGInternalFiller schema): + +``` +hangup — when the agent is hanging up +check_time — when checking the time +wait_for_user — when waiting for user input +wait_seconds — during deliberate pauses +adjust_response_latency — when adjusting response timing +next_step — transitioning between steps in prompt.contexts +change_context — switching between contexts in prompt.contexts +get_visual_input — processing visual input (enable_vision) +get_ideal_strategy — thinking (enable_thinking) +``` + +Notably NOT supported: change\_step, gather\_submit, or arbitrary user-defined SWAIG function names. The runtime only honors fillers for the names listed above; everything else is silently ignored at the SWML level. This method warns at registration time if you pass an unknown name so you catch the typo early. + +#### Signature + +```go +func (*AgentBase) SetInternalFillers(fillers map[string]map[string][]string) *AgentBase +``` + +#### Parameters + + + +#### Returns + +`*AgentBase` + +#### Examples + + + + ```go + hangup — when the agent is hanging up + check_time — when checking the time + wait_for_user — when waiting for user input + wait_seconds — during deliberate pauses + adjust_response_latency — when adjusting response timing + next_step — transitioning between steps in prompt.contexts + change_context — switching between contexts in prompt.contexts + get_visual_input — processing visual input (enable_vision) + get_ideal_strategy — thinking (enable_thinking) + ``` + + + + ```go + hangup — when the agent is hanging up + check_time — when checking the time + wait_for_user — when waiting for user input + wait_seconds — during deliberate pauses + adjust_response_latency — when adjusting response timing + next_step — transitioning between steps in prompt.contexts + change_context — switching between contexts in prompt.contexts + get_visual_input — processing visual input (enable_vision) + get_ideal_strategy — thinking (enable_thinking) + ``` + + + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1411. + +*** + +### SetLanguageParams + +SetLanguageParams sets (or replaces) the per-language params dict on an already-added language. Useful when language entries are built up via AddLanguage/AddLanguageTyped first and engine-specific tuning is added later (e.g., from a config loader). + +Python equivalent: ai\_config\_mixin.AIConfigMixin.set\_language\_params Python signature: set\_language\_params(code, params) + +Parameters: + +- code: language code as previously passed to AddLanguage (e.g. "en-US") +- params: engine-specific params dict to attach. Empty/nil removes the key. + +Returns the AgentBase for chaining. No-op if the code isn't found. + +#### Signature + +```go +func (*AgentBase) SetLanguageParams(code string, params map[string]any) *AgentBase +``` + +#### Parameters + + + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1232. + +*** + +### SetLanguages + +SetLanguages replaces all language configurations. + +#### Signature + +```go +func (*AgentBase) SetLanguages(languages []map[string]any) *AgentBase +``` + +#### Parameters + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1273. + +*** + +### SetNativeFunctions + +SetNativeFunctions sets the list of native function names. + +#### Signature + +```go +func (*AgentBase) SetNativeFunctions(names []string) *AgentBase +``` + +#### Parameters + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1346. + +*** + +### SetOnSwmlRequestHook + +SetOnSwmlRequestHook registers a function that customizes the SWML response on a per-request basis. The hook receives the parsed body, the callback path (for routing-callback dispatch), and the raw \*http.Request for header / query inspection. Returning a non-nil map applies modifications to the rendered SWML; returning nil falls through to the default rendering. + +Python parity: this is the Go-idiomatic way of "overriding" on\_swml\_request — Go has no method inheritance. + +#### Signature + +```go +func (*AgentBase) SetOnSwmlRequestHook(hook OnSwmlRequestHook) *AgentBase +``` + +#### Parameters + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1740. + +*** + +### SetParam + +SetParam sets a single AI parameter (e.g. temperature, top\_p). + +#### Signature + +```go +func (*AgentBase) SetParam(key string, value any) *AgentBase +``` + +#### Parameters + + + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1312. + +*** + +### SetParams + +SetParams replaces all AI parameters. + +#### Signature + +```go +func (*AgentBase) SetParams(params map[string]any) *AgentBase +``` + +#### Parameters + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1320. + +*** + +### SetPostPrompt + +SetPostPrompt sets the post-prompt text used for conversation summary. + +#### Signature + +```go +func (*AgentBase) SetPostPrompt(text string) *AgentBase +``` + +#### Parameters + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 592. + +*** + +### SetPostPromptLlmParams + +SetPostPromptLlmParams sets LLM parameters for the post-prompt. + +#### Signature + +```go +func (*AgentBase) SetPostPromptLlmParams(params map[string]any) *AgentBase +``` + +#### Parameters + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1503. + +*** + +### SetPostPromptUrl + +SetPostPromptUrl sets the URL for post-prompt summary delivery. + +#### Signature + +```go +func (*AgentBase) SetPostPromptUrl(url string) *AgentBase +``` + +#### Parameters + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1662. + +*** + +### SetPromptLlmParams + +SetPromptLlmParams sets LLM parameters for the main prompt. + +#### Signature + +```go +func (*AgentBase) SetPromptLlmParams(params map[string]any) *AgentBase +``` + +#### Parameters + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1495. + +*** + +### SetPromptPom + +SetPromptPom sets the POM sections directly and enables POM mode. + +#### Signature + +```go +func (*AgentBase) SetPromptPom(pom []map[string]any) *AgentBase +``` + +#### Parameters + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 600. + +*** + +### SetPromptText + +SetPromptText sets the agent prompt to raw text, disabling POM mode. + +#### Signature + +```go +func (*AgentBase) SetPromptText(text string) *AgentBase +``` + +#### Parameters + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 583. + +*** + +### SetPromptTransformer + +SetPromptTransformer installs a hook that is called with the assembled prompt map before it is placed into the AI verb config. The function may return a new map or mutate and return the same map. Set to nil to remove a previously installed transformer. + +This is used by specialised agents (e.g. BedrockAgent) that need to add or filter prompt-level keys without reimplementing all of RenderSWML. + +#### Signature + +```go +func (*AgentBase) SetPromptTransformer(fn func(map[string]any) map[string]any) *AgentBase +``` + +#### Parameters + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1517. + +*** + +### SetPronunciations + +SetPronunciations replaces all pronunciation overrides. + +#### Signature + +```go +func (*AgentBase) SetPronunciations(p []map[string]any) *AgentBase +``` + +#### Parameters + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1304. + +*** + +### SetupGracefulShutdown + +SetupGracefulShutdown registers OS signal handlers for SIGTERM and SIGINT that initiate a graceful HTTP server shutdown. This is useful for Kubernetes deployments where the pod receives SIGTERM before termination. + +Python equivalent: web\_mixin.WebMixin.setup\_graceful\_shutdown (web\_mixin.py line 1405) Python behavior: registers signal.SIGTERM and signal.SIGINT handlers that call sys.exit(0) after optional cleanup. + +The Go implementation uses signal.NotifyContext so that the active HTTP server (if started via Run/Serve) can shut down cleanly. Call this before Run(). + +#### Signature + +```go +func (*AgentBase) SetupGracefulShutdown() +``` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1758. + +*** + +### SetWebHookUrl + +SetWebHookUrl explicitly sets the webhook URL used in SWAIG function defs. + +#### Signature + +```go +func (*AgentBase) SetWebHookUrl(url string) *AgentBase +``` + +#### Parameters + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1654. + +*** + +### UpdateGlobalData + +UpdateGlobalData merges data into existing global data. + +#### Signature + +```go +func (*AgentBase) UpdateGlobalData(data map[string]any) *AgentBase +``` + +#### Parameters + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1336. + +*** + +### ValidateBasicAuth + +ValidateBasicAuth validates the provided username and password against the agent's configured basic auth credentials using a constant-time comparison. + +Python equivalent: auth\_mixin.AuthMixin.validate\_basic\_auth (auth\_mixin.py line 24) Python behavior: hmac.compare\_digest(username, exp\_user) and compare\_digest(password, exp\_pass) + +#### Signature + +```go +func (*AgentBase) ValidateBasicAuth(username string, password string) bool +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1784. + +*** + +### ValidateToolToken + +ValidateToolToken verifies that a SWAIG tool security token is authentic, unexpired, and matches the given function name and call ID. Returns false when the function is not registered, the SessionManager rejects the token, or the validation panics for any reason. + +Python parity: state\_mixin.StateMixin.validate\_tool\_token. Python rejects unknown function names up-front and swallows exceptions, returning false. + +#### Signature + +```go +func (*AgentBase) ValidateToolToken(functionName string, token string, callID string) (ok bool) +``` + +#### Parameters + + + + + + + +#### Returns + +`bool` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1827. + +## Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 326. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/agent/agent/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/agent/agent/index.mdx new file mode 100644 index 0000000000..a3033676cc --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/agent/agent/index.mdx @@ -0,0 +1,976 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/agent/agent" +title: "agent" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "module" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/agent" + module: "github.com.signalwire.signalwire-go.pkg.agent" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go" +--- +# `agent` + +Package agent provides the core AgentBase type that wires together SWML rendering, tool dispatch, prompt management, AI configuration, and HTTP serving into a single self-contained AI agent. + +## Signature + +```go +package agent +``` + +## Constants + + + SupportedInternalFillerNames is the complete set of internal SWAIG function names that accept fillers, matching the SWAIGInternalFiller schema definition. Any name outside this set is silently ignored by the runtime — SetInternalFillers / AddInternalFiller warn if you pass an unknown name. Notable absences: change\_step, gather\_submit, and arbitrary user-defined SWAIG function names are NOT supported. + + +## Classes + + + + AgentBase is the central agent struct. It embeds \*swml.Service so that Service's fields and methods (Name, Route, Host, Port, basic auth, the HTTP server, the tool registry, etc.) are promoted onto AgentBase. The agent-specific state below is layered on top. + + + + MCPServerConfig holds configuration for an external MCP server connection. + + + + ToolDefinition describes a single SWAIG tool including its JSON Schema parameters and a Go handler function. + + + +## Functions + +### NewAgentBase + +NewAgentBase creates a new AgentBase with default values and applies the provided functional options. + +#### Signature + +```go +func NewAgentBase(opts ...AgentOption) *AgentBase +``` + +#### Parameters + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 449. + +*** + +### WithAgentID + +WithAgentID sets a fixed agent ID. If not provided, a UUID is generated automatically in NewAgentBase. + +Python equivalent: agent\_id parameter in AgentBase.**init** Python behavior: self.agent\_id = agent\_id or str(uuid.uuid4()) + +#### Signature + +```go +func WithAgentID(id string) AgentOption +``` + +#### Parameters + + + +#### Returns + +`AgentOption` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 221. + +*** + +### WithAIVerbName + +WithAIVerbName overrides the SWML verb name used for the AI section. The default is "ai". Set to "amazon\_bedrock" for BedrockAgent. + +#### Signature + +```go +func WithAIVerbName(name string) AgentOption +``` + +#### Parameters + + + +#### Returns + +`AgentOption` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 194. + +*** + +### WithAutoAnswer + +WithAutoAnswer controls whether the answer verb is emitted automatically. + +#### Signature + +```go +func WithAutoAnswer(autoAnswer bool) AgentOption +``` + +#### Parameters + + + +#### Returns + +`AgentOption` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 164. + +*** + +### WithBasicAuth + +WithBasicAuth sets explicit basic-auth credentials. + +#### Signature + +```go +func WithBasicAuth(user string, password string) AgentOption +``` + +#### Parameters + + + + + +#### Returns + +`AgentOption` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 156. + +*** + +### WithBullet + +WithBullet adds a single bullet point to an existing section. Python equivalent: bullet= param in prompt\_add\_to\_section + +#### Signature + +```go +func WithBullet(b string) PromptAddToSectionOption +``` + +#### Parameters + + + +#### Returns + +`PromptAddToSectionOption` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 728. + +*** + +### WithBullets + +WithBullets adds multiple bullet points to an existing section. Python equivalent: bullets= param in prompt\_add\_to\_section + +#### Signature + +```go +func WithBullets(bs []string) PromptAddToSectionOption +``` + +#### Parameters + + + +#### Returns + +`PromptAddToSectionOption` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 734. + +*** + +### WithCheckForInputOverride + +WithCheckForInputOverride enables the /check\_for\_input endpoint, which allows external systems to inject input into an active AI session. + +Python equivalent: check\_for\_input\_override parameter in AgentBase.**init** + +#### Signature + +```go +func WithCheckForInputOverride(enable bool) AgentOption +``` + +#### Parameters + + + +#### Returns + +`AgentOption` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 266. + +*** + +### WithConfigFile + +WithConfigFile sets the path to an optional YAML/JSON service configuration file. When provided, the file is loaded at startup and its values are merged with (but do not override) explicit constructor parameters. + +Python equivalent: config\_file parameter in AgentBase.**init** + +#### Signature + +```go +func WithConfigFile(path string) AgentOption +``` + +#### Parameters + + + +#### Returns + +`AgentOption` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 275. + +*** + +### WithDefaultWebhookURL + +WithDefaultWebhookURL sets the default webhook URL for all SWAIG functions. When set, this URL is used as the fallback for all tools that do not specify their own WebhookURL. + +Python equivalent: default\_webhook\_url parameter in AgentBase.**init** + +#### Signature + +```go +func WithDefaultWebhookURL(url string) AgentOption +``` + +#### Parameters + + + +#### Returns + +`AgentOption` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 212. + +*** + +### WithEnablePostPromptOverride + +WithEnablePostPromptOverride allows subclasses to override the post-prompt URL with a custom handler. When enabled, the agent registers a /post\_prompt\_override endpoint and routes summary callbacks through it. + +Python equivalent: enable\_post\_prompt\_override parameter in AgentBase.**init** + +#### Signature + +```go +func WithEnablePostPromptOverride(enable bool) AgentOption +``` + +#### Parameters + + + +#### Returns + +`AgentOption` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 258. + +*** + +### WithHost + +WithHost sets the HTTP listen address. + +#### Signature + +```go +func WithHost(host string) AgentOption +``` + +#### Parameters + + + +#### Returns + +`AgentOption` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 146. + +*** + +### WithName + +WithName sets the agent (and service) name. + +#### Signature + +```go +func WithName(name string) AgentOption +``` + +#### Parameters + + + +#### Returns + +`AgentOption` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 136. + +*** + +### WithNativeFunctions + +WithNativeFunctions sets the initial list of native (built-in) SWAIG function names to include in the SWAIG object on every rendered document. + +Python equivalent: native\_functions parameter in AgentBase.**init** + +#### Signature + +```go +func WithNativeFunctions(names []string) AgentOption +``` + +#### Parameters + + + +#### Returns + +`AgentOption` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 229. + +*** + +### WithNumbered + +WithNumbered marks the section as numbered. Python equivalent: numbered=True in prompt\_add\_section + +#### Signature + +```go +func WithNumbered(v bool) PromptSectionOption +``` + +#### Parameters + + + +#### Returns + +`PromptSectionOption` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 657. + +*** + +### WithNumberedBullets + +WithNumberedBullets marks the bullets list as numbered. Python equivalent: numbered\_bullets=True in prompt\_add\_section + +#### Signature + +```go +func WithNumberedBullets(v bool) PromptSectionOption +``` + +#### Parameters + + + +#### Returns + +`PromptSectionOption` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 663. + +*** + +### WithPort + +WithPort sets the HTTP listen port. + +#### Signature + +```go +func WithPort(port int) AgentOption +``` + +#### Parameters + + + +#### Returns + +`AgentOption` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 151. + +*** + +### WithRecordCall + +WithRecordCall enables or disables automatic call recording. + +#### Signature + +```go +func WithRecordCall(record bool) AgentOption +``` + +#### Parameters + + + +#### Returns + +`AgentOption` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 169. + +*** + +### WithRecordFormat + +WithRecordFormat sets the recording format (e.g. "mp4", "wav"). The parameter is the defined string type swaig.RecordFormat: the Format\* constants give autocomplete + a compile-time typo check, while Go's untyped-constant auto-conversion keeps a bare "wav" literal compiling. It is stored as a plain string so the emitted SWML is unchanged. + +#### Signature + +```go +func WithRecordFormat(format swaig.RecordFormat) AgentOption +``` + +#### Parameters + + + +#### Returns + +`AgentOption` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 178. + +*** + +### WithRecordStereo + +WithRecordStereo enables or disables stereo recording. + +#### Signature + +```go +func WithRecordStereo(stereo bool) AgentOption +``` + +#### Parameters + + + +#### Returns + +`AgentOption` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 183. + +*** + +### WithRoute + +WithRoute sets the HTTP route path the agent listens on. + +#### Signature + +```go +func WithRoute(route string) AgentOption +``` + +#### Parameters + + + +#### Returns + +`AgentOption` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 141. + +*** + +### WithSchemaPath + +WithSchemaPath sets the path to an optional SWML schema file used for validation. If empty, no schema validation is performed. + +Python equivalent: schema\_path parameter in AgentBase.**init** + +#### Signature + +```go +func WithSchemaPath(path string) AgentOption +``` + +#### Parameters + + + +#### Returns + +`AgentOption` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 241. + +*** + +### WithSchemaValidation + +WithSchemaValidation controls whether the rendered SWML document is validated against the SWML schema before serving. Defaults to true. Can also be disabled via the SWML\_SKIP\_SCHEMA\_VALIDATION=1 environment variable. + +Python equivalent: schema\_validation parameter in AgentBase.**init** + +#### Signature + +```go +func WithSchemaValidation(validate bool) AgentOption +``` + +#### Parameters + + + +#### Returns + +`AgentOption` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 285. + +*** + +### WithSigningKey + +WithSigningKey sets the SignalWire Signing Key used to validate inbound webhook signatures. When non-empty, signed routes (POST /, /swaig, /post\_prompt, and any registered routing callbacks) are wrapped with security.WebhookMiddleware — unsigned or mis-signed requests are rejected with HTTP 403 before reaching the handler. + +When this option is unset, AgentBase falls back to the SIGNALWIRE\_SIGNING\_KEY environment variable. When neither is set, the agent accepts unsigned requests and emits a one-time WARN log on startup, per porting-sdk/webhooks.md §"AgentBase integration". + +Python equivalent: AgentBase(signing\_key="...") parameter. + +#### Signature + +```go +func WithSigningKey(key string) AgentOption +``` + +#### Parameters + + + +#### Returns + +`AgentOption` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 301. + +*** + +### WithSigningKeyTrustProxy + +WithSigningKeyTrustProxy enables X-Forwarded-Proto / X-Forwarded-Host honoring during URL reconstruction. Set true when AgentBase runs behind a reverse proxy / ngrok / load balancer that terminates TLS upstream; without it the validator sees the internal scheme/host and the signature will mismatch. + +No Python parity flag — Python's web\_mixin reads X-Forwarded-\* headers unconditionally; in Go we make it explicit because forging these headers is a real attack on naive deployments. + +#### Signature + +```go +func WithSigningKeyTrustProxy(trust bool) AgentOption +``` + +#### Parameters + + + +#### Returns + +`AgentOption` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 314. + +*** + +### WithSubsections + +WithSubsections attaches child sections to the parent section. Python equivalent: subsections=\[...] in prompt\_add\_section + +#### Signature + +```go +func WithSubsections(subs []map[string]any) PromptSectionOption +``` + +#### Parameters + + + +#### Returns + +`PromptSectionOption` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 669. + +*** + +### WithSuppressLogs + +WithSuppressLogs disables verbose structured logging from the agent. When true, info-level agent lifecycle logs are suppressed. + +Python equivalent: suppress\_logs parameter in AgentBase.**init** + +#### Signature + +```go +func WithSuppressLogs(suppress bool) AgentOption +``` + +#### Parameters + + + +#### Returns + +`AgentOption` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 249. + +*** + +### WithTokenExpiry + +WithTokenExpiry sets the token expiry time in seconds for secure tools. + +#### Signature + +```go +func WithTokenExpiry(secs int) AgentOption +``` + +#### Parameters + + + +#### Returns + +`AgentOption` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 188. + +*** + +### WithUsePom + +WithUsePom controls whether Prompt Object Model (POM) mode is active. When true (default), structured prompt sections are used; when false, raw text from SetPromptText is used. + +Python equivalent: use\_pom parameter in AgentBase.**init** + +#### Signature + +```go +func WithUsePom(usePom bool) AgentOption +``` + +#### Parameters + + + +#### Returns + +`AgentOption` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 203. + +## Type Aliases + +### AgentOption + +AgentOption configures an AgentBase during construction. + +#### Signature + +```go +type AgentOption alias +``` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 133. + +*** + +### DebugEventHandler + +DebugEventHandler is called for debug events if enabled. + +#### Signature + +```go +type DebugEventHandler alias +``` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 46. + +*** + +### DynamicConfigCallback + +DynamicConfigCallback is invoked on each request to mutate an ephemeral agent copy before rendering. Headers and body params give the callback full context about the inbound request. + +#### Signature + +```go +type DynamicConfigCallback alias +``` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 40. + +*** + +### OnSwmlRequestHook + +OnSwmlRequestHook is the function-field hook that user code can set to override the default SWML-request customization behavior. Returning a non-nil map applies modifications to the rendered SWML; returning nil uses the default rendering unchanged. + +Python parity: web\_mixin.WebMixin.on\_swml\_request — Go has no method inheritance, so we expose the override as a settable function field. + +#### Signature + +```go +type OnSwmlRequestHook alias +``` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 55. + +*** + +### PromptAddToSectionOption + +PromptAddToSectionOption is a functional option for PromptAddToSection. + +#### Signature + +```go +type PromptAddToSectionOption alias +``` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 724. + +*** + +### PromptSectionOption + +PromptSectionOption is a functional option for PromptAddSection. + +#### Signature + +```go +type PromptSectionOption alias +``` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 653. + +*** + +### SummaryCallback + +SummaryCallback is called when a post-prompt summary arrives. + +#### Signature + +```go +type SummaryCallback alias +``` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 43. + +*** + +### ToolHandler + +ToolHandler is the signature for SWAIG function handlers. + +#### Signature + +```go +type ToolHandler alias +``` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 35. + +## Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/agent/agent/mcp-server-config/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/agent/agent/mcp-server-config/index.mdx new file mode 100644 index 0000000000..24b433fd40 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/agent/agent/mcp-server-config/index.mdx @@ -0,0 +1,39 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/agent/agent/mcp-server-config" +title: "MCPServerConfig" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/agent.MCPServerConfig" + parent: "github.com/signalwire/signalwire-go/pkg/agent" + module: "github.com.signalwire.signalwire-go.pkg.agent" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go" +--- +# `MCPServerConfig` + +MCPServerConfig holds configuration for an external MCP server connection. + +## Signature + +```go +type MCPServerConfig struct +``` + +## Properties + + + + + + + + + +## Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1857. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/agent/agent/tool-definition/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/agent/agent/tool-definition/index.mdx new file mode 100644 index 0000000000..2c57085da3 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/agent/agent/tool-definition/index.mdx @@ -0,0 +1,108 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/agent/agent/tool-definition" +title: "ToolDefinition" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/agent.ToolDefinition" + parent: "github.com/signalwire/signalwire-go/pkg/agent" + module: "github.com.signalwire.signalwire-go.pkg.agent" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go" +--- +# `ToolDefinition` + +ToolDefinition describes a single SWAIG tool including its JSON Schema parameters and a Go handler function. + +Python equivalent: signalwire.core.mixins.tool\_mixin.ToolMixin.define\_tool Added fields to match Python: WebhookURL (webhook\_url param), Required (required param for required argument names), IsTypedHandler (is\_typed\_handler). + +## Signature + +```go +type ToolDefinition struct +``` + +## Properties + + + + + + + + + whether handler uses typed structs (Python: is\_typed\_handler) + + + + + + + + JSON Schema for arguments (properties map) + + + + Required parameter names included in the JSON Schema envelope + + + + + + extra per-function SWAIG fields + + + + URL to audio file to play while the function executes + + + + Number of times to loop WaitFile (0 = no loop) + + + + Per-tool webhook URL; overrides the agent-level webhook when non-empty + + +## Methods + +### ValidateArgs + +ValidateArgs validates the provided args map against the tool's parameter schema. + +It constructs a JSON Schema envelope from Parameters and Required (matching the shape emitted by buildSwaigFunctions) and validates args against that schema using encoding/json round-trip comparison. When Parameters is nil or empty the function returns (true, nil) immediately, mirroring the Python SDK's behaviour of skipping validation when no schema is declared. + +Go's standard library does not include a JSON Schema validator, so this implementation performs a best-effort structural check: + +- Every key listed in Required must be present in args. +- No third-party dependency is introduced; the check is intentionally lightweight. + +A full JSON Schema validator (e.g. github.com/xeipuuv/gojsonschema) can be swapped in by replacing the body of this method. + +#### Signature + +```go +func (*ToolDefinition) ValidateArgs(args map[string]any) (bool, []string) +``` + +#### Parameters + + + +#### Returns + +`(bool, []string)` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 98. + +## Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 67. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/contexts/contexts/context-builder/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/contexts/contexts/context-builder/index.mdx new file mode 100644 index 0000000000..430aa2da9b --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/contexts/contexts/context-builder/index.mdx @@ -0,0 +1,199 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/contexts/contexts/context-builder" +title: "ContextBuilder" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/contexts.ContextBuilder" + parent: "github.com/signalwire/signalwire-go/pkg/contexts" + module: "github.com.signalwire.signalwire-go.pkg.contexts" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go" +--- +# `ContextBuilder` + +ContextBuilder is the top-level builder for multi-step, multi-context AI agent workflows. + +A ContextBuilder owns one or more Contexts; each Context owns an ordered list of Steps. Only one context and one step is active at a time. Per chat turn, the runtime injects the current step's instructions as a system message, then asks the LLM for a response. + +When a step (or its enclosing context) declares valid\_steps or valid\_contexts, the runtime auto-injects two native tools so the model can navigate the flow: + +- next\_step(step: enum) — present when valid\_steps is set +- change\_context(context: enum) — present when valid\_contexts is set + +Their enum schemas are rewritten on every turn to match whatever valid\_steps / valid\_contexts apply to the current step. You do NOT need to define these tools yourself; they appear automatically. + +A third native tool — gather\_submit — is injected during gather\_info questioning (see Step.SetGatherInfo / Step.AddGatherQuestion). + +These three names — next\_step, change\_context, gather\_submit — are reserved. ContextBuilder.Validate() rejects any agent that defines a SWAIG tool with one of these names. See ReservedNativeToolNames. + +Each step may declare a functions whitelist. The whitelist is applied in-memory at the start of each LLM turn. CRITICALLY: if a step does NOT declare a functions field, it INHERITS the previous step's active set. See Step.SetFunctions for details and examples. + +## Signature + +```go +type ContextBuilder struct +``` + +## Methods + +### AddContext + +AddContext creates a new context with the given name and returns it. + +#### Signature + +```go +func (*ContextBuilder) AddContext(name string) *Context +``` + +#### Parameters + + + +#### Returns + +`*Context` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 831. + +*** + +### AttachAgent + +AttachAgent wires an agent into the builder so Validate() can check user-defined tool names against ReservedNativeToolNames. AgentBase calls this internally when you invoke DefineContexts(). + +#### Signature + +```go +func (*ContextBuilder) AttachAgent(a ToolLister) *ContextBuilder +``` + +#### Parameters + + + +#### Returns + +`*ContextBuilder` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 809. + +*** + +### GetContext + +GetContext returns the context with the given name, or nil if not found. + +#### Signature + +```go +func (*ContextBuilder) GetContext(name string) *Context +``` + +#### Parameters + + + +#### Returns + +`*Context` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 839. + +*** + +### Reset + +Reset removes all contexts, returning the builder to its initial state. Use this in a dynamic config callback when you need to rebuild contexts from scratch for a specific request. + +#### Signature + +```go +func (*ContextBuilder) Reset() *ContextBuilder +``` + +#### Returns + +`*ContextBuilder` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 824. + +*** + +### ToMap + +ToMap serialises all contexts to the SWML map format. It calls Validate first and returns an error if validation fails. + +#### Signature + +```go +func (*ContextBuilder) ToMap() (map[string]any, error) +``` + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 1057. + +*** + +### Validate + +Validate checks the builder configuration for common errors: + +- At least one context must be defined. +- A single context must be named "default". +- Every context must contain at least one step. +- Every step must have a name. +- valid\_steps entries (except "next") must name existing steps in the same context. +- valid\_contexts entries (context-level) must name existing contexts. +- valid\_contexts entries (step-level) must name existing contexts. +- gather\_info questions must be non-empty and have unique keys. +- gather\_info completion\_action (if set) targets an existing step. +- No user-defined SWAIG tool collides with a reserved native name. + +#### Signature + +```go +func (*ContextBuilder) Validate() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 854. + +## Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 800. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/contexts/contexts/context/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/contexts/contexts/context/index.mdx new file mode 100644 index 0000000000..d9d3a2f8d1 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/contexts/contexts/context/index.mdx @@ -0,0 +1,671 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/contexts/contexts/context" +title: "Context" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/contexts.Context" + parent: "github.com/signalwire/signalwire-go/pkg/contexts" + module: "github.com.signalwire.signalwire-go.pkg.contexts" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go" +--- +# `Context` + +Context represents a single context containing ordered steps. All setter methods return \*Context for chaining. + +## Signature + +```go +type Context struct +``` + +## Methods + +### AddBullets + +AddBullets adds a POM section with bullet points to the context prompt. + +#### Signature + +```go +func (*Context) AddBullets(title string, bullets []string) *Context +``` + +#### Parameters + + + + + +#### Returns + +`*Context` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 622. + +*** + +### AddEnterFiller + +AddEnterFiller adds enter fillers for a specific language code. + +#### Signature + +```go +func (*Context) AddEnterFiller(langCode string, fillers []string) *Context +``` + +#### Parameters + + + + + +#### Returns + +`*Context` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 652. + +*** + +### AddExitFiller + +AddExitFiller adds exit fillers for a specific language code. + +#### Signature + +```go +func (*Context) AddExitFiller(langCode string, fillers []string) *Context +``` + +#### Parameters + + + + + +#### Returns + +`*Context` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 661. + +*** + +### AddSection + +AddSection adds a POM section to the context prompt. + +#### Signature + +```go +func (*Context) AddSection(title string, body string) *Context +``` + +#### Parameters + + + + + +#### Returns + +`*Context` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 616. + +*** + +### AddStep + +AddStep creates a new step, appends it to the ordered list, stores it in the lookup map, and returns the Step for further configuration. + +#### Signature + +```go +func (*Context) AddStep(name string) *Step +``` + +#### Parameters + + + +#### Returns + +`*Step` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 478. + +*** + +### AddSystemBullets + +AddSystemBullets adds a POM section with bullet points to the system prompt. + +#### Signature + +```go +func (*Context) AddSystemBullets(title string, bullets []string) *Context +``` + +#### Parameters + + + + + +#### Returns + +`*Context` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 634. + +*** + +### AddSystemSection + +AddSystemSection adds a POM section to the system prompt. + +#### Signature + +```go +func (*Context) AddSystemSection(title string, body string) *Context +``` + +#### Parameters + + + + + +#### Returns + +`*Context` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 628. + +*** + +### GetStep + +GetStep returns the step with the given name, or nil if not found. + +#### Signature + +```go +func (*Context) GetStep(name string) *Step +``` + +#### Parameters + + + +#### Returns + +`*Step` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 486. + +*** + +### MoveStep + +MoveStep moves an existing step to the given position (0-based index). Returns the receiver for method chaining. + +#### Signature + +```go +func (*Context) MoveStep(name string, position int) *Context +``` + +#### Parameters + + + + + +#### Returns + +`*Context` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 507. + +*** + +### Name + +Name returns the context's name. + +#### Signature + +```go +func (*Context) Name() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 474. + +*** + +### RemoveStep + +RemoveStep removes a step by name. Returns the receiver for method chaining. + +#### Signature + +```go +func (*Context) RemoveStep(name string) *Context +``` + +#### Parameters + + + +#### Returns + +`*Context` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 491. + +*** + +### SetConsolidate + +SetConsolidate sets whether to consolidate conversation history on entry. + +#### Signature + +```go +func (*Context) SetConsolidate(consolidate bool) *Context +``` + +#### Parameters + + + +#### Returns + +`*Context` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 573. + +*** + +### SetEnterFillers + +SetEnterFillers sets all enter fillers at once. + +#### Signature + +```go +func (*Context) SetEnterFillers(fillers map[string][]string) *Context +``` + +#### Parameters + + + +#### Returns + +`*Context` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 640. + +*** + +### SetExitFillers + +SetExitFillers sets all exit fillers at once. + +#### Signature + +```go +func (*Context) SetExitFillers(fillers map[string][]string) *Context +``` + +#### Parameters + + + +#### Returns + +`*Context` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 646. + +*** + +### SetFullReset + +SetFullReset sets whether to do a full reset when entering this context. + +#### Signature + +```go +func (*Context) SetFullReset(fullReset bool) *Context +``` + +#### Parameters + + + +#### Returns + +`*Context` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 579. + +*** + +### SetInitialStep + +SetInitialStep sets which step the context starts on when entered. + +By default, a context starts on its first step (index 0). Use this to skip a preamble step on re-entry via change\_context. + +#### Signature + +```go +func (*Context) SetInitialStep(stepName string) *Context +``` + +#### Parameters + + + +#### Returns + +`*Context` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 537. + +*** + +### SetIsolated + +SetIsolated marks this context as isolated — entering it wipes conversation history. + +When isolated=true and the context is entered via change\_context, the runtime wipes the conversation array. The model starts fresh with only the new context's system\_prompt + step instructions, with no memory of prior turns. + +EXCEPTION — reset overrides the wipe: If the context also has a reset configuration (via SetConsolidate or SetFullReset), the wipe is skipped in favor of the reset behavior. Use reset with consolidate=true to summarize prior history into a single message instead of dropping it entirely. + +Use cases: + +- Switching to a sensitive billing flow that should not see prior small-talk +- Handing off to a different agent persona +- Resetting after a long off-topic detour + +#### Signature + +```go +func (*Context) SetIsolated(isolated bool) *Context +``` + +#### Parameters + + + +#### Returns + +`*Context` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 610. + +*** + +### SetPostPrompt + +SetPostPrompt sets the post-prompt override for this context. + +#### Signature + +```go +func (*Context) SetPostPrompt(prompt string) *Context +``` + +#### Parameters + + + +#### Returns + +`*Context` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 555. + +*** + +### SetPrompt + +SetPrompt sets the context's prompt text directly. + +#### Signature + +```go +func (*Context) SetPrompt(prompt string) *Context +``` + +#### Parameters + + + +#### Returns + +`*Context` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 567. + +*** + +### SetSystemPrompt + +SetSystemPrompt sets the system prompt for context switching. + +#### Signature + +```go +func (*Context) SetSystemPrompt(prompt string) *Context +``` + +#### Parameters + + + +#### Returns + +`*Context` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 561. + +*** + +### SetUserPrompt + +SetUserPrompt sets the user prompt to inject when entering this context. + +#### Signature + +```go +func (*Context) SetUserPrompt(prompt string) *Context +``` + +#### Parameters + + + +#### Returns + +`*Context` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 585. + +*** + +### SetValidContexts + +SetValidContexts sets which contexts can be navigated to from this context. + +#### Signature + +```go +func (*Context) SetValidContexts(ctxs []string) *Context +``` + +#### Parameters + + + +#### Returns + +`*Context` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 543. + +*** + +### SetValidSteps + +SetValidSteps sets which steps can be navigated to from any step in this context. + +#### Signature + +```go +func (*Context) SetValidSteps(steps []string) *Context +``` + +#### Parameters + + + +#### Returns + +`*Context` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 549. + +*** + +### ToMap + +ToMap serialises the context to the SWML map format. + +#### Signature + +```go +func (*Context) ToMap() map[string]any +``` + +#### Returns + +`map[string]any` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 693. + +## Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 445. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/contexts/contexts/gather-info/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/contexts/contexts/gather-info/index.mdx new file mode 100644 index 0000000000..0e81dcafa2 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/contexts/contexts/gather-info/index.mdx @@ -0,0 +1,113 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/contexts/contexts/gather-info" +title: "GatherInfo" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/contexts.GatherInfo" + parent: "github.com/signalwire/signalwire-go/pkg/contexts" + module: "github.com.signalwire.signalwire-go.pkg.contexts" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go" +--- +# `GatherInfo` + +GatherInfo configures information gathering for a step. + +## Signature + +```go +type GatherInfo struct +``` + +## Properties + + + + + + + + + +## Methods + +### AddQuestion + +AddQuestion appends a question and returns the GatherInfo for chaining. + +#### Signature + +```go +func (*GatherInfo) AddQuestion(key string, question string, opts ...GatherQuestionOption) *GatherInfo +``` + +#### Parameters + + + + + + + +#### Returns + +`*GatherInfo` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 112. + +*** + +### ToMap + +ToMap serialises to the SWML map format. Callers that construct GatherInfo directly should call Validate() first to ensure the result is valid SWML. Step.ToMap() enforces this automatically by only calling ToMap() when len(Questions) > 0. + +#### Signature + +```go +func (*GatherInfo) ToMap() map[string]any +``` + +#### Returns + +`map[string]any` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 140. + +*** + +### Validate + +Validate returns an error if the GatherInfo is not ready for serialisation. Specifically, it rejects a GatherInfo with no questions, which would produce invalid SWML. This matches the Python SDK's ValueError raised by to\_dict() when \_questions is empty. + +#### Signature + +```go +func (*GatherInfo) Validate() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 129. + +## Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 104. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/contexts/contexts/gather-question/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/contexts/contexts/gather-question/index.mdx new file mode 100644 index 0000000000..0fad3d2fc2 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/contexts/contexts/gather-question/index.mdx @@ -0,0 +1,71 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/contexts/contexts/gather-question" +title: "GatherQuestion" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/contexts.GatherQuestion" + parent: "github.com/signalwire/signalwire-go/pkg/contexts" + module: "github.com.signalwire.signalwire-go.pkg.contexts" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go" +--- +# `GatherQuestion` + +GatherQuestion represents a single question in a gather\_info configuration. + +## Signature + +```go +type GatherQuestion struct +``` + +## Properties + + + + + optional + + + + + + optional + + + + + + default "string" + + +## Methods + +### ToMap + +ToMap serialises the question to the SWML map format. + +#### Signature + +```go +func (*GatherQuestion) ToMap() map[string]any +``` + +#### Returns + +`map[string]any` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 79. + +## Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 69. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/contexts/contexts/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/contexts/contexts/index.mdx new file mode 100644 index 0000000000..2211639cd7 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/contexts/contexts/index.mdx @@ -0,0 +1,272 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/contexts/contexts" +title: "contexts" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "module" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/contexts" + module: "github.com.signalwire.signalwire-go.pkg.contexts" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go" +--- +# `contexts` + +Package contexts provides the Contexts & Steps workflow system for SignalWire AI agents. + +Instead of a single flat prompt, agents can define structured Contexts (conversation flows) containing ordered Steps (sequential stages). Each step carries its own prompt, completion criteria, function restrictions, and navigation rules. The builder serialises the whole tree into the map\[string]any format expected by the SWML AI verb. + +## Signature + +```go +package contexts +``` + +## Constants + + + Limits guard against unreasonable configurations. + + + + Limits guard against unreasonable configurations. + + + + ReservedNativeToolNames is the set of tool names the runtime auto-injects when contexts/steps are present. User-defined SWAIG tools must not collide with these names. ContextBuilder.Validate() rejects any agent that registers a user tool sharing one of these names — the runtime would never call the user tool because the native one wins. + + +## Classes + + + + Context represents a single context containing ordered steps. All setter methods return \*Context for chaining. + + + + ContextBuilder is the top-level builder for multi-step, multi-context AI agent workflows. + + + + GatherInfo configures information gathering for a step. + + + + GatherQuestion represents a single question in a gather\_info configuration. + + + + Step represents a single step within a context. All setter methods return \*Step so they can be chained. + + + +## Functions + +### CreateSimpleContext + +CreateSimpleContext creates a standalone Context. If name is empty it defaults to "default". + +#### Signature + +```go +func CreateSimpleContext(name string) *Context +``` + +#### Parameters + + + +#### Returns + +`*Context` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 1074. + +*** + +### NewContextBuilder + +NewContextBuilder creates a new empty ContextBuilder. + +#### Signature + +```go +func NewContextBuilder() *ContextBuilder +``` + +#### Returns + +`*ContextBuilder` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 815. + +*** + +### WithConfirm + +WithConfirm sets whether the model must confirm the answer with the user. + +#### Signature + +```go +func WithConfirm(c bool) GatherQuestionOption +``` + +#### Parameters + + + +#### Returns + +`GatherQuestionOption` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 54. + +*** + +### WithFunctions + +WithFunctions sets additional function names visible for this question. + +#### Signature + +```go +func WithFunctions(f []string) GatherQuestionOption +``` + +#### Parameters + + + +#### Returns + +`GatherQuestionOption` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 64. + +*** + +### WithPrompt + +WithPrompt sets extra instruction text appended for this question. + +#### Signature + +```go +func WithPrompt(p string) GatherQuestionOption +``` + +#### Parameters + + + +#### Returns + +`GatherQuestionOption` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 59. + +*** + +### WithType + +WithType sets the JSON-schema type for the answer (default "string"). + +#### Signature + +```go +func WithType(t string) GatherQuestionOption +``` + +#### Parameters + + + +#### Returns + +`GatherQuestionOption` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 49. + +## Type Aliases + +### GatherQuestionOption + +GatherQuestionOption is a functional option applied to a GatherQuestion. + +#### Signature + +```go +type GatherQuestionOption alias +``` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 46. + +## Interfaces + +### ToolLister + +ToolLister is implemented by an agent so ContextBuilder.Validate() can check registered SWAIG tool names against ReservedNativeToolNames. AgentBase implements this by returning the insertion-ordered list of registered tool names. + +#### Signature + +```go +type ToolLister interface { ListToolNames } +``` + +#### Methods + +##### ListToolNames + +ListToolNames returns the names of every registered SWAIG tool. + +###### Signature + +```go +ListToolNames() []string +``` + +###### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 763. + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 761. + +## Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/contexts/contexts/step/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/contexts/contexts/step/index.mdx new file mode 100644 index 0000000000..b9ccb21895 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/contexts/contexts/step/index.mdx @@ -0,0 +1,550 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/contexts/contexts/step" +title: "Step" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/contexts.Step" + parent: "github.com/signalwire/signalwire-go/pkg/contexts" + module: "github.com.signalwire.signalwire-go.pkg.contexts" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go" +--- +# `Step` + +Step represents a single step within a context. All setter methods return \*Step so they can be chained. + +## Signature + +```go +type Step struct +``` + +## Methods + +### AddBullets + +AddBullets adds a POM section with bullet points. + +#### Signature + +```go +func (*Step) AddBullets(title string, bullets []string) *Step +``` + +#### Parameters + + + + + +#### Returns + +`*Step` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 200. + +*** + +### AddGatherQuestion + +AddGatherQuestion adds a question to this step's gather\_info. SetGatherInfo should be called first (this method silently initialises the struct if not, to keep callers from having to worry about ordering). Returns the Step for chaining. + +IMPORTANT — gather mode locks function access: While the model is asking gather questions, the runtime forcibly deactivates ALL of the step's other functions. The only callable tools during a gather question are: + +- gather\_submit (the native answer-submission tool) +- Whatever names you list with WithFunctions in this question's opts + +next\_step and change\_context are also filtered out — the model cannot navigate away until the gather completes. This is by design: it forces a tight ask → submit → next-question loop. + +If a question needs to call out to a tool (e.g. validate an email, geocode a ZIP), pass that tool name via WithFunctions on this question. Functions listed here are active ONLY for this question. + +#### Signature + +```go +func (*Step) AddGatherQuestion(key string, question string, opts ...GatherQuestionOption) *Step +``` + +#### Parameters + + + + + + + +#### Returns + +`*Step` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 319. + +*** + +### AddSection + +AddSection adds a POM section to the step. + +#### Signature + +```go +func (*Step) AddSection(title string, body string) *Step +``` + +#### Parameters + + + + + +#### Returns + +`*Step` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 194. + +*** + +### ClearSections + +ClearSections removes all POM sections and direct text from this step. + +#### Signature + +```go +func (*Step) ClearSections() *Step +``` + +#### Returns + +`*Step` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 329. + +*** + +### Name + +Name returns the step's name. + +#### Signature + +```go +func (*Step) Name() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 185. + +*** + +### SetEnd + +SetEnd marks this step as terminal for the step flow. + +IMPORTANT: end=true does NOT end the conversation or hang up the call. It exits step mode entirely after this step executes — clearing the steps list, current step index, valid\_steps, and valid\_contexts. The agent keeps running, but operates only under the base system prompt and the context-level prompt; no more step instructions are injected and no more next\_step tool is offered. + +To actually end the call, call a hangup tool or define a hangup\_hook. + +#### Signature + +```go +func (*Step) SetEnd(end bool) *Step +``` + +#### Parameters + + + +#### Returns + +`*Step` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 266. + +*** + +### SetFunctions + +SetFunctions sets which non-internal functions are callable while this step is active. + +IMPORTANT — inheritance behavior: If you do NOT call this method, the step inherits whichever function set was active on the previous step (or the previous context's last step). The server-side runtime only resets the active set when a step explicitly declares its `functions` field. This is the most common source of bugs in multi-step agents: forgetting SetFunctions on a later step lets the previous step's tools leak through. Best practice is to call SetFunctions explicitly on every step that should differ from the previous one. + +Keep the per-step active set small: LLM tool selection accuracy degrades noticeably past ~7-8 simultaneously-active tools per call. Use per-step whitelisting to partition large tool collections. + +Accepts: + +- \[]string\{"a", "b"\} — whitelist of function names allowed in this step +- \[]string\{\} — explicit disable-all +- "none" — synonym for the empty slice + +Internal functions (e.g. gather\_submit, hangup\_hook) are ALWAYS protected and cannot be deactivated by this whitelist. The native navigation tools next\_step and change\_context are injected automatically when SetValidSteps / SetValidContexts is used; they are not affected by this list and do not need to appear in it. + +#### Signature + +```go +func (*Step) SetFunctions(functions any) *Step +``` + +#### Parameters + + + +#### Returns + +`*Step` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 239. + +*** + +### SetGatherInfo + +SetGatherInfo enables info gathering for this step and returns the Step for fluent chaining. This matches the Python SDK's set\_gather\_info, which returns self so that step-level setters (SetFunctions, SetValidSteps, etc.) can be chained after configuring gather info. + +To add questions to the gather info, use AddGatherQuestion on the same \*Step receiver. + +#### Signature + +```go +func (*Step) SetGatherInfo(outputKey string, completionAction string, prompt string) *Step +``` + +#### Parameters + + + + + + + +#### Returns + +`*Step` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 290. + +*** + +### SetResetConsolidate + +SetResetConsolidate sets whether to consolidate conversation on context switch. + +#### Signature + +```go +func (*Step) SetResetConsolidate(consolidate bool) *Step +``` + +#### Parameters + + + +#### Returns + +`*Step` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 348. + +*** + +### SetResetFullReset + +SetResetFullReset sets whether to do a full reset on context switch. + +#### Signature + +```go +func (*Step) SetResetFullReset(fullReset bool) *Step +``` + +#### Parameters + + + +#### Returns + +`*Step` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 354. + +*** + +### SetResetSystemPrompt + +SetResetSystemPrompt sets the system prompt for context switching. + +#### Signature + +```go +func (*Step) SetResetSystemPrompt(prompt string) *Step +``` + +#### Parameters + + + +#### Returns + +`*Step` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 336. + +*** + +### SetResetUserPrompt + +SetResetUserPrompt sets the user prompt for context switching. + +#### Signature + +```go +func (*Step) SetResetUserPrompt(prompt string) *Step +``` + +#### Parameters + + + +#### Returns + +`*Step` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 342. + +*** + +### SetSkipToNextStep + +SetSkipToNextStep sets whether to automatically advance to the next step. + +#### Signature + +```go +func (*Step) SetSkipToNextStep(skip bool) *Step +``` + +#### Parameters + + + +#### Returns + +`*Step` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 278. + +*** + +### SetSkipUserTurn + +SetSkipUserTurn sets whether to skip waiting for user input after this step. + +#### Signature + +```go +func (*Step) SetSkipUserTurn(skip bool) *Step +``` + +#### Parameters + + + +#### Returns + +`*Step` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 272. + +*** + +### SetStepCriteria + +SetStepCriteria sets the criteria for determining when this step is complete. + +#### Signature + +```go +func (*Step) SetStepCriteria(criteria string) *Step +``` + +#### Parameters + + + +#### Returns + +`*Step` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 206. + +*** + +### SetText + +SetText sets the step's prompt text directly. + +#### Signature + +```go +func (*Step) SetText(text string) *Step +``` + +#### Parameters + + + +#### Returns + +`*Step` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 188. + +*** + +### SetValidContexts + +SetValidContexts sets which contexts can be navigated to from this step. + +#### Signature + +```go +func (*Step) SetValidContexts(contexts []string) *Step +``` + +#### Parameters + + + +#### Returns + +`*Step` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 251. + +*** + +### SetValidSteps + +SetValidSteps sets which steps can be navigated to from this step. + +#### Signature + +```go +func (*Step) SetValidSteps(steps []string) *Step +``` + +#### Parameters + + + +#### Returns + +`*Step` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 245. + +*** + +### ToMap + +ToMap serialises the step to the SWML map format. + +#### Signature + +```go +func (*Step) ToMap() map[string]any +``` + +#### Returns + +`map[string]any` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 386. + +## Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 166. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/datamap/datamap/expression-pattern/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/datamap/datamap/expression-pattern/index.mdx new file mode 100644 index 0000000000..14ac874bb2 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/datamap/datamap/expression-pattern/index.mdx @@ -0,0 +1,35 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/datamap/datamap/expression-pattern" +title: "ExpressionPattern" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/datamap.ExpressionPattern" + parent: "github.com/signalwire/signalwire-go/pkg/datamap" + module: "github.com.signalwire.signalwire-go.pkg.datamap" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/datamap/datamap.go" +--- +# `ExpressionPattern` + +ExpressionPattern pairs a regex pattern string with a FunctionResult to execute when test\_value matches the pattern. Go equivalent of Python's Tuple\[str, FunctionResult] entry in create\_expression\_tool patterns. + +## Signature + +```go +type ExpressionPattern struct +``` + +## Properties + + + + + +## Source + +[`pkg/datamap/datamap.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/datamap/datamap.go) + +Line 431. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/datamap/datamap/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/datamap/datamap/index.mdx new file mode 100644 index 0000000000..02335d38e0 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/datamap/datamap/index.mdx @@ -0,0 +1,713 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/datamap/datamap" +title: "datamap" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/datamap" + module: "github.com.signalwire.signalwire-go.pkg.datamap" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/datamap/datamap.go" +--- +# `datamap` + +DataMap is a fluent builder for SWAIG data\_map function definitions. Data map tools execute on SignalWire servers without needing a webhook endpoint. + +## Signature + +```go +type DataMap struct +``` + +## Examples + + + + ```go + dm := datamap.New("get_weather"). + Purpose("Get current weather information"). + Parameter("location", "string", "City name", true, nil). + Webhook("GET", "https://api.weather.com/v1/current?q=${location}", nil, "", false, nil). + Output(swaig.NewFunctionResult("Weather: ${response.current.condition.text}")) + ``` + + + + ```go + dm := datamap.New("get_weather"). + Purpose("Get current weather information"). + Parameter("location", "string", "City name", true, nil). + Webhook("GET", "https://api.weather.com/v1/current?q=${location}", nil, "", false, nil). + Output(swaig.NewFunctionResult("Weather: ${response.current.condition.text}")) + ``` + + + +## Classes + + + + ExpressionPattern pairs a regex pattern string with a FunctionResult to execute when test\_value matches the pattern. Go equivalent of Python's Tuple\[str, FunctionResult] entry in create\_expression\_tool patterns. + + + +## Methods + +### Body + +Body sets the request body for the current webhook (for POST/PUT requests). + +#### Signature + +```go +func (*DataMap) Body(data map[string]any) *DataMap +``` + +#### Parameters + + + +#### Returns + +`*DataMap` + +#### Source + +[`pkg/datamap/datamap.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/datamap/datamap.go) + +Line 259. + +*** + +### Description + +Description sets the LLM-facing tool description. + +This string is read by the model to decide WHEN to call this tool. See Purpose for bad-vs-good examples. Alias for Purpose. + +#### Signature + +```go +func (*DataMap) Description(description string) *DataMap +``` + +#### Parameters + + + +#### Returns + +`*DataMap` + +#### Source + +[`pkg/datamap/datamap.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/datamap/datamap.go) + +Line 114. + +*** + +### ErrorKeys + +ErrorKeys sets error indicator keys for the current webhook. + +#### Signature + +```go +func (*DataMap) ErrorKeys(keys []string) *DataMap +``` + +#### Parameters + + + +#### Returns + +`*DataMap` + +#### Source + +[`pkg/datamap/datamap.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/datamap/datamap.go) + +Line 289. + +*** + +### Expression + +Expression adds a pattern-matching expression for expression-based responses. testValue is the template string to test (e.g., "$\{args.command\}"). pattern is the regex pattern to match against. output is the FunctionResult returned when the pattern matches. nomatchOutput is an optional FunctionResult returned when the pattern does not match (can be nil). + +#### Signature + +```go +func (*DataMap) Expression( + testValue string, + pattern string, + output *swaig.FunctionResult, + nomatchOutput *swaig.FunctionResult +) *DataMap +``` + +#### Parameters + + + + + + + + + +#### Returns + +`*DataMap` + +#### Source + +[`pkg/datamap/datamap.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/datamap/datamap.go) + +Line 152. + +*** + +### ExpressionRegexp + +ExpressionRegexp adds a pattern-matching expression using a compiled \*regexp.Regexp. This mirrors Python's expression() which accepts either a plain string or a compiled re.Pattern object — when a compiled pattern is passed, Python extracts pattern.pattern (the raw string). Here, pattern.String() serves the same role. + +testValue is the template string to test (e.g., "$\{args.command\}"). pattern is a compiled regexp whose string representation is used as the match pattern. output is the FunctionResult returned when the pattern matches. nomatchOutput is an optional FunctionResult returned when the pattern does not match (can be nil). + +#### Signature + +```go +func (*DataMap) ExpressionRegexp( + testValue string, + pattern *regexp.Regexp, + output *swaig.FunctionResult, + nomatchOutput *swaig.FunctionResult +) *DataMap +``` + +#### Parameters + + + + + + + + + +#### Returns + +`*DataMap` + +#### Source + +[`pkg/datamap/datamap.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/datamap/datamap.go) + +Line 171. + +*** + +### FallbackOutput + +FallbackOutput sets the fallback output result used when all webhooks fail. + +#### Signature + +```go +func (*DataMap) FallbackOutput(result *swaig.FunctionResult) *DataMap +``` + +#### Parameters + + + +#### Returns + +`*DataMap` + +#### Source + +[`pkg/datamap/datamap.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/datamap/datamap.go) + +Line 283. + +*** + +### Foreach + +Foreach configures array processing for the current webhook response. + +#### Signature + +```go +func (*DataMap) Foreach(config map[string]any) *DataMap +``` + +#### Parameters + + + +#### Returns + +`*DataMap` + +#### Source + +[`pkg/datamap/datamap.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/datamap/datamap.go) + +Line 271. + +*** + +### FunctionName + +FunctionName returns the function name this DataMap was built for. Useful for logging, deduplication checks, and introspection by callers that hold a \*DataMap reference but need to identify which tool it represents. + +#### Signature + +```go +func (*DataMap) FunctionName() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/datamap/datamap.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/datamap/datamap.go) + +Line 83. + +*** + +### GlobalErrorKeys + +GlobalErrorKeys sets top-level error keys that apply to all webhooks. + +#### Signature + +```go +func (*DataMap) GlobalErrorKeys(keys []string) *DataMap +``` + +#### Parameters + + + +#### Returns + +`*DataMap` + +#### Source + +[`pkg/datamap/datamap.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/datamap/datamap.go) + +Line 295. + +*** + +### Output + +Output sets the output result for the current webhook. + +#### Signature + +```go +func (*DataMap) Output(result *swaig.FunctionResult) *DataMap +``` + +#### Parameters + + + +#### Returns + +`*DataMap` + +#### Source + +[`pkg/datamap/datamap.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/datamap/datamap.go) + +Line 277. + +*** + +### Parameter + +Parameter adds a parameter definition — the `desc` is LLM-FACING. + +Each parameter description is rendered into the OpenAI tool schema under parameters.properties.\.description and sent to the model. The model uses it to decide HOW to fill in the argument from user speech. It is prompt engineering, not developer FYI. + +Bad vs good: + +``` +BAD: dm.Parameter("city", "string", "the city", true, nil) +GOOD: dm.Parameter("city", "string", + "The name of the city to get weather for, e.g. 'San Francisco'. "+ + "Ask the user if they did not provide one. Include the state "+ + "or country if the city name is ambiguous.", + true, nil) +``` + +The enum parameter can be nil if no enumeration constraint is needed. + +#### Signature + +```go +func (*DataMap) Parameter( + name string, + paramType string, + desc string, + required bool, + enum []string +) *DataMap +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`*DataMap` + +#### Examples + + + + ```go + BAD: dm.Parameter("city", "string", "the city", true, nil) + GOOD: dm.Parameter("city", "string", + "The name of the city to get weather for, e.g. 'San Francisco'. "+ + "Ask the user if they did not provide one. Include the state "+ + "or country if the city name is ambiguous.", + true, nil) + ``` + + + + ```go + BAD: dm.Parameter("city", "string", "the city", true, nil) + GOOD: dm.Parameter("city", "string", + "The name of the city to get weather for, e.g. 'San Francisco'. "+ + "Ask the user if they did not provide one. Include the state "+ + "or country if the city name is ambiguous.", + true, nil) + ``` + + + +#### Source + +[`pkg/datamap/datamap.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/datamap/datamap.go) + +Line 136. + +*** + +### Params + +Params sets the request params for the current webhook. + +#### Signature + +```go +func (*DataMap) Params(data map[string]any) *DataMap +``` + +#### Parameters + + + +#### Returns + +`*DataMap` + +#### Source + +[`pkg/datamap/datamap.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/datamap/datamap.go) + +Line 265. + +*** + +### Purpose + +Purpose sets the LLM-facing tool description — this is an alias for Description. + +The description string is rendered into the OpenAI tool schema "description" field on every LLM turn. The model reads it to decide WHEN to call this tool. It is PROMPT ENGINEERING, not developer documentation. + +A vague Purpose is the #1 cause of "the model has the right tool but doesn't call it" failures with data-map tools. + +Bad vs good: + +``` +BAD: dm.Purpose("weather api") +GOOD: dm.Purpose("Get the current weather conditions and forecast " + + "for a specific city. Use this whenever the user asks about " + + "weather, temperature, rain, or similar conditions in a " + + "named location.") +``` + +#### Signature + +```go +func (*DataMap) Purpose(description string) *DataMap +``` + +#### Parameters + + + +#### Returns + +`*DataMap` + +#### Examples + + + + ```go + BAD: dm.Purpose("weather api") + GOOD: dm.Purpose("Get the current weather conditions and forecast " + + "for a specific city. Use this whenever the user asks about " + + "weather, temperature, rain, or similar conditions in a " + + "named location.") + ``` + + + + ```go + BAD: dm.Purpose("weather api") + GOOD: dm.Purpose("Get the current weather conditions and forecast " + + "for a specific city. Use this whenever the user asks about " + + "weather, temperature, rain, or similar conditions in a " + + "named location.") + ``` + + + +#### Source + +[`pkg/datamap/datamap.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/datamap/datamap.go) + +Line 105. + +*** + +### ToSwaigFunction + +ToSwaigFunction converts the DataMap to a complete SWAIG function definition map. The returned map contains "function", "description", "parameters", and "data\_map" keys, matching the canonical SWML/SWAIG schema consumed by the SignalWire AI platform. + +#### Signature + +```go +func (*DataMap) ToSwaigFunction() map[string]any +``` + +#### Returns + +`map[string]any` + +#### Source + +[`pkg/datamap/datamap.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/datamap/datamap.go) + +Line 303. + +*** + +### Webhook + +Webhook adds a webhook API call configuration. If a previous webhook was configured, it is finalized first. method is the HTTP method (GET, POST, etc.). url is the API endpoint URL (can include $\{variable\} substitutions). headers are optional HTTP headers (can be nil). formParam sends JSON body as a single form parameter with this name (empty string to skip). inputArgsAsParams merges function arguments into params. requireArgs lists arguments that must be present to execute (can be nil). + +#### Signature + +```go +func (*DataMap) Webhook( + method string, + url string, + headers map[string]string, + formParam string, + inputArgsAsParams bool, + requireArgs []string +) *DataMap +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`*DataMap` + +#### Source + +[`pkg/datamap/datamap.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/datamap/datamap.go) + +Line 237. + +*** + +### WebhookExpressions + +WebhookExpressions sets expressions to evaluate after the current webhook completes. + +#### Signature + +```go +func (*DataMap) WebhookExpressions(expressions []map[string]any) *DataMap +``` + +#### Parameters + + + +#### Returns + +`*DataMap` + +#### Source + +[`pkg/datamap/datamap.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/datamap/datamap.go) + +Line 253. + +## Functions + +### CreateExpressionTool + +CreateExpressionTool creates a DataMap configured for expression-based pattern matching. name is the function name. patterns maps test values to an ExpressionPattern where Pattern is the regex string and Result is the \*swaig.FunctionResult to return on match. parameters maps parameter names to their definitions (each with "type", "description", "required" keys). + +#### Signature + +```go +func CreateExpressionTool( + name string, + patterns map[string]ExpressionPattern, + parameters map[string]map[string]any +) *DataMap +``` + +#### Parameters + + + + + + + +#### Returns + +`*DataMap` + +#### Source + +[`pkg/datamap/datamap.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/datamap/datamap.go) + +Line 441. + +*** + +### CreateSimpleApiTool + +CreateSimpleApiTool creates a DataMap configured for a simple API call. name is the function name. url is the API endpoint URL. responseTemplate is the template for formatting the response. parameters maps parameter names to their definitions (each with "type", "description", "required" keys). method is the HTTP method (e.g., "GET", "POST"). headers are optional HTTP headers (can be nil). body is an optional request body for POST/PUT (can be nil). errorKeys are optional error indicator keys (can be nil). + +#### Signature + +```go +func CreateSimpleApiTool( + name string, + url string, + responseTemplate string, + parameters map[string]map[string]any, + method string, + headers map[string]string, + body map[string]any, + errorKeys []string +) *DataMap +``` + +#### Parameters + + + + + + + + + + + + + + + + + +#### Returns + +`*DataMap` + +#### Source + +[`pkg/datamap/datamap.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/datamap/datamap.go) + +Line 391. + +*** + +### New + +New creates a new DataMap builder for a function with the given name. + +#### Signature + +```go +func New(functionName string) *DataMap +``` + +#### Parameters + + + +#### Returns + +`*DataMap` + +#### Source + +[`pkg/datamap/datamap.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/datamap/datamap.go) + +Line 74. + +## Source + +[`pkg/datamap/datamap.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/datamap/datamap.go) + +Line 52. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/lambda/lambda/handler/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/lambda/lambda/handler/index.mdx new file mode 100644 index 0000000000..d4bdecc438 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/lambda/lambda/handler/index.mdx @@ -0,0 +1,85 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/lambda/lambda/handler" +title: "Handler" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/lambda.Handler" + parent: "github.com/signalwire/signalwire-go/pkg/lambda" + module: "github.com.signalwire.signalwire-go.pkg.lambda" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/lambda/lambda.go" +--- +# `Handler` + +Handler wraps an http.Handler so it can service AWS Lambda invocations. Construct one with NewHandler. + +## Signature + +```go +type Handler struct +``` + +## Methods + +### HandleAPIGatewayV2 + +HandleAPIGatewayV2 processes an API Gateway HTTP API v2 invocation. The payload shape is virtually identical to Function URLs, but the response type differs, so we provide a dedicated entry point. + +#### Signature + +```go +func (*Handler) HandleAPIGatewayV2(ctx context.Context, req events.APIGatewayV2HTTPRequest) (events.APIGatewayV2HTTPResponse, error) +``` + +#### Parameters + + + + + +#### Returns + +`(events.APIGatewayV2HTTPResponse, error)` + +#### Source + +[`pkg/lambda/lambda.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/lambda/lambda.go) + +Line 107. + +*** + +### HandleFunctionURL + +HandleFunctionURL processes a Lambda Function URL invocation. It is intended to be passed to github.com/aws/aws-lambda-go/lambda.Start. + +#### Signature + +```go +func (*Handler) HandleFunctionURL(ctx context.Context, req events.LambdaFunctionURLRequest) (events.LambdaFunctionURLResponse, error) +``` + +#### Parameters + + + + + +#### Returns + +`(events.LambdaFunctionURLResponse, error)` + +#### Source + +[`pkg/lambda/lambda.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/lambda/lambda.go) + +Line 84. + +## Source + +[`pkg/lambda/lambda.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/lambda/lambda.go) + +Line 65. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/lambda/lambda/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/lambda/lambda/index.mdx new file mode 100644 index 0000000000..41386a3b99 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/lambda/lambda/index.mdx @@ -0,0 +1,132 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/lambda/lambda" +title: "lambda" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "module" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/lambda" + module: "github.com.signalwire.signalwire-go.pkg.lambda" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/lambda/lambda.go" +--- +# `lambda` + +Package lambda adapts a net/http handler produced by the SignalWire Agents SDK (typically agent.AsRouter()) so it can run inside AWS Lambda. + +The adapter translates a Lambda invocation event into a synthetic \*http.Request, runs the underlying handler against an in-memory response recorder, and marshals the recorder's result back into the Lambda response type that matches the invoking event. + +Two event shapes are supported, because they are the two ways an AI agent is realistically exposed over HTTP on Lambda: + +- Lambda Function URLs (events.LambdaFunctionURLRequest / LambdaFunctionURLResponse). This is the simplest deployment and the one we recommend; no API Gateway is required. +- API Gateway HTTP API v2 (events.APIGatewayV2HTTPRequest / APIGatewayV2HTTPResponse). Identical payload shape in practice, but consumers with an API Gateway layer want the exact response type rather than an assignable alias. + +The classic REST API (v1) payload is intentionally not supported as a first-class path to keep this package small. Users who need v1 can wrap it via github.com/awslabs/aws-lambda-go-api-proxy. + +``` +package main + +import ( + "github.com/aws/aws-lambda-go/lambda" + swlambda "github.com/signalwire/signalwire-go/pkg/lambda" + "github.com/signalwire/signalwire-go/pkg/agent" +) + +var a = agent.NewAgentBase(agent.WithName("MyAgent"), agent.WithRoute("/my-agent")) +var handler = swlambda.NewHandler(a.AsRouter()) + +func main() { + lambda.Start(handler.HandleFunctionURL) +} +``` + +Because agent.AsRouter() installs routes relative to the agent's Route (e.g. /my-agent, /my-agent/swaig), the Lambda event's RawPath must line up with that Route. Lambda Function URLs preserve the full request path unchanged, so no rewriting is needed in the common case. + +## Signature + +```go +package lambda +``` + +## Examples + + + + ```go + package main + + import ( + "github.com/aws/aws-lambda-go/lambda" + swlambda "github.com/signalwire/signalwire-go/pkg/lambda" + "github.com/signalwire/signalwire-go/pkg/agent" + ) + + var a = agent.NewAgentBase(agent.WithName("MyAgent"), agent.WithRoute("/my-agent")) + var handler = swlambda.NewHandler(a.AsRouter()) + + func main() { + lambda.Start(handler.HandleFunctionURL) + } + ``` + + + + ```go + package main + + import ( + "github.com/aws/aws-lambda-go/lambda" + swlambda "github.com/signalwire/signalwire-go/pkg/lambda" + "github.com/signalwire/signalwire-go/pkg/agent" + ) + + var a = agent.NewAgentBase(agent.WithName("MyAgent"), agent.WithRoute("/my-agent")) + var handler = swlambda.NewHandler(a.AsRouter()) + + func main() { + lambda.Start(handler.HandleFunctionURL) + } + ``` + + + +## Classes + + + + Handler wraps an http.Handler so it can service AWS Lambda invocations. Construct one with NewHandler. + + + +## Functions + +### NewHandler + +NewHandler returns a Handler that dispatches Lambda events to the given http.Handler. The handler is usually agent.AsRouter() but any http.Handler works. + +Panics if h is nil to fail loudly at cold-start rather than silently returning 500 on every invocation. + +#### Signature + +```go +func NewHandler(h http.Handler) *Handler +``` + +#### Parameters + + + +#### Returns + +`*Handler` + +#### Source + +[`pkg/lambda/lambda.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/lambda/lambda.go) + +Line 75. + +## Source + +[`pkg/lambda/lambda.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/lambda/lambda.go) diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/agent-handoff/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/agent-handoff/index.mdx new file mode 100644 index 0000000000..fdc46f5863 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/agent-handoff/index.mdx @@ -0,0 +1,35 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/agent-handoff" +title: "AgentHandoff" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/livewire.AgentHandoff" + parent: "github.com/signalwire/signalwire-go/pkg/livewire" + module: "github.com.signalwire.signalwire-go.pkg.livewire" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go" +--- +# `AgentHandoff` + +AgentHandoff signals a handoff to another agent in multi-agent scenarios. Mirrors Python AgentHandoff(agent, \*, returns=None) (line 153). + +## Signature + +```go +type AgentHandoff struct +``` + +## Properties + + + + + +## Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 873. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/agent-session/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/agent-session/index.mdx new file mode 100644 index 0000000000..ec0d4e24e2 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/agent-session/index.mdx @@ -0,0 +1,255 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/agent-session" +title: "AgentSession" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/livewire.AgentSession" + parent: "github.com/signalwire/signalwire-go/pkg/livewire" + module: "github.com.signalwire.signalwire-go.pkg.livewire" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go" +--- +# `AgentSession` + +AgentSession mirrors a LiveKit AgentSession — it binds an Agent to the SignalWire platform and manages the call lifecycle. + +## Signature + +```go +type AgentSession struct +``` + +## Methods + +### GenerateReply + +GenerateReply triggers the agent to speak. On SignalWire this is handled by the prompt; reply instructions are appended to the prompt. + +#### Signature + +```go +func (*AgentSession) GenerateReply(opts ...ReplyOption) +``` + +#### Parameters + + + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 674. + +*** + +### GetSwAgent + +GetSwAgent returns the underlying SignalWire AgentBase (for testing/advanced use). + +#### Signature + +```go +func (*AgentSession) GetSwAgent() *agent.AgentBase +``` + +#### Returns + +`*agent.AgentBase` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 701. + +*** + +### History + +History returns the conversation turn history (read-only). Mirrors Python AgentSession.history property (line 497). + +#### Signature + +```go +func (*AgentSession) History() []map[string]string +``` + +#### Returns + +`[]map[string]string` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 532. + +*** + +### Interrupt + +Interrupt interrupts current speech — noop on SignalWire (barge-in is automatic). + +#### Signature + +```go +func (*AgentSession) Interrupt() +``` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 686. + +*** + +### Say + +Say queues text to be spoken by the agent. + +#### Signature + +```go +func (*AgentSession) Say(text string) +``` + +#### Parameters + + + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 655. + +*** + +### SetUserdata + +SetUserdata sets the session-level userdata. Mirrors Python AgentSession.userdata property setter (line 493). + +#### Signature + +```go +func (*AgentSession) SetUserdata(val any) +``` + +#### Parameters + + + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 526. + +*** + +### Start + +Start binds the session to an agent and prepares the underlying SignalWire AgentBase for serving. + +Mirrors Python AgentSession.start(agent, \*, room=None, record=False) (line 504). The room and record parameters are accepted via StartOption functional options (WithRoom and WithRecord) following Go idioms. + +#### Signature + +```go +func (*AgentSession) Start(ctx *JobContext, ag *Agent, opts ...StartOption) error +``` + +#### Parameters + + + + + + + +#### Returns + +`error` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 571. + +*** + +### UpdateAgent + +UpdateAgent swaps in a new Agent mid-session. Mirrors Python AgentSession.update\_agent (line 528) which sets self.\_agent = agent and agent.session = self. + +#### Signature + +```go +func (*AgentSession) UpdateAgent(ag *Agent) +``` + +#### Parameters + + + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 539. + +*** + +### UpdateInstructions + +UpdateInstructions changes the agent's prompt mid-session. + +#### Signature + +```go +func (*AgentSession) UpdateInstructions(instructions string) +``` + +#### Parameters + + + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 691. + +*** + +### Userdata + +Userdata returns the session-level userdata. Mirrors Python AgentSession.userdata property getter (line 489). + +#### Signature + +```go +func (*AgentSession) Userdata() any +``` + +#### Returns + +`any` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 520. + +## Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 330. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/agent/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/agent/index.mdx new file mode 100644 index 0000000000..3ca29ab611 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/agent/index.mdx @@ -0,0 +1,247 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/agent" +title: "Agent" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/livewire.Agent" + parent: "github.com/signalwire/signalwire-go/pkg/livewire" + module: "github.com.signalwire.signalwire-go.pkg.livewire" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go" +--- +# `Agent` + +Agent mirrors a LiveKit Agent — it holds instructions and tool definitions. + +## Signature + +```go +type Agent struct +``` + +## Methods + +### FunctionTool + +FunctionTool registers a named tool on the agent. The handler must be + +``` +func(args map[string]any, rawData map[string]any) *swaig.FunctionResult +``` + +or a LiveKit-style handler that will be wrapped: + +``` +func(ctx *RunContext, location string) string +``` + +In the LiveKit-style case the function's string parameters are inferred and the return string is wrapped into a FunctionResult automatically. + +#### Signature + +```go +func (*Agent) FunctionTool(name string, handler any, opts ...ToolOption) *Agent +``` + +#### Parameters + + + + + + + +#### Returns + +`*Agent` + +#### Examples + + + + ```go + func(args map[string]any, rawData map[string]any) *swaig.FunctionResult + ``` + + + + ```go + func(ctx *RunContext, location string) string + ``` + + + + ```go + func(args map[string]any, rawData map[string]any) *swaig.FunctionResult + ``` + + + + ```go + func(ctx *RunContext, location string) string + ``` + + + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 196. + +*** + +### Instructions + +Instructions returns the agent's current instructions string. Mirrors Python Agent.instructions (public read/write attribute, line 290). + +#### Signature + +```go +func (*Agent) Instructions() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 242. + +*** + +### OnEnter + +OnEnter registers a callback to be invoked when the agent enters a session. Mirrors Python Agent.on\_enter lifecycle hook (line 346). Returns the Agent for method chaining. + +#### Signature + +```go +func (*Agent) OnEnter(fn func()) *Agent +``` + +#### Parameters + + + +#### Returns + +`*Agent` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 256. + +*** + +### OnExit + +OnExit registers a callback to be invoked when the agent exits a session. Mirrors Python Agent.on\_exit lifecycle hook (line 350). Returns the Agent for method chaining. + +#### Signature + +```go +func (*Agent) OnExit(fn func()) *Agent +``` + +#### Parameters + + + +#### Returns + +`*Agent` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 264. + +*** + +### OnUserTurnCompleted + +OnUserTurnCompleted registers a callback invoked when the user finishes speaking. The two arguments mirror Python's turn\_ctx and new\_message parameters (line 354), typed as any to avoid a LiveKit dependency. Returns the Agent for method chaining. + +#### Signature + +```go +func (*Agent) OnUserTurnCompleted(fn func(turnCtx any, newMessage any)) *Agent +``` + +#### Parameters + + + +#### Returns + +`*Agent` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 273. + +*** + +### Session + +Session returns the AgentSession currently bound to this agent, or nil if the agent has not been started. Mirrors Python Agent.session property (lines 334–340). + +#### Signature + +```go +func (*Agent) Session() *AgentSession +``` + +#### Returns + +`*AgentSession` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 249. + +*** + +### UpdateTools + +UpdateTools replaces the agent's tool list. Mirrors Python Agent.update\_tools (livewire/**init**.py:394) which accepts List\[Any] and stores self.\_tools = list(tools). In Go, the parameter is \[]any to keep the unexported toolDef out of the public signature (the original typed \[]toolDef made the method uncallable from external packages). Elements that aren't recognized tools are silently skipped, matching Python's permissive storage semantics. Returns the Agent for method chaining. + +#### Signature + +```go +func (*Agent) UpdateTools(tools []any) *Agent +``` + +#### Parameters + + + +#### Returns + +`*Agent` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 286. + +## Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 124. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/cartesia-tts/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/cartesia-tts/index.mdx new file mode 100644 index 0000000000..b9bd3ded57 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/cartesia-tts/index.mdx @@ -0,0 +1,33 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/cartesia-tts" +title: "CartesiaTTS" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/livewire.CartesiaTTS" + parent: "github.com/signalwire/signalwire-go/pkg/livewire" + module: "github.com.signalwire.signalwire-go.pkg.livewire" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go" +--- +# `CartesiaTTS` + +CartesiaTTS is a stub for the Cartesia TTS provider. + +## Signature + +```go +type CartesiaTTS struct +``` + +## Properties + + + +## Source + +[`pkg/livewire/plugins.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go) + +Line 79. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/chat-context/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/chat-context/index.mdx new file mode 100644 index 0000000000..d7bf0d8488 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/chat-context/index.mdx @@ -0,0 +1,61 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/chat-context" +title: "ChatContext" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/livewire.ChatContext" + parent: "github.com/signalwire/signalwire-go/pkg/livewire" + module: "github.com.signalwire.signalwire-go.pkg.livewire" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go" +--- +# `ChatContext` + +ChatContext buffers a conversation as an ordered list of role/content messages. It mirrors the Python livewire.ChatContext stub which is API-compatible with the livekit-agents ChatContext shape. + +## Signature + +```go +type ChatContext struct +``` + +## Properties + + + +## Methods + +### Append + +Append adds a role/content message to the context and returns the receiver for method chaining. If role is empty it defaults to "user"; if content is empty it defaults to "" (empty string), matching the Python defaults role="user", text="". + +#### Signature + +```go +func (*ChatContext) Append(role string, content string) *ChatContext +``` + +#### Parameters + + + + + +#### Returns + +`*ChatContext` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 929. + +## Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 918. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/chat-message/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/chat-message/index.mdx new file mode 100644 index 0000000000..e3026b845c --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/chat-message/index.mdx @@ -0,0 +1,35 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/chat-message" +title: "ChatMessage" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/livewire.ChatMessage" + parent: "github.com/signalwire/signalwire-go/pkg/livewire" + module: "github.com.signalwire.signalwire-go.pkg.livewire" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go" +--- +# `ChatMessage` + +ChatMessage holds a single role/content pair in a conversation history. The JSON tags match the dict keys produced by the Python ChatContext.append() implementation: \{"role": ..., "content": ...\}. + +## Signature + +```go +type ChatMessage struct +``` + +## Properties + + + + + +## Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 910. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/deepgram-stt/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/deepgram-stt/index.mdx new file mode 100644 index 0000000000..a51fc45766 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/deepgram-stt/index.mdx @@ -0,0 +1,33 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/deepgram-stt" +title: "DeepgramSTT" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/livewire.DeepgramSTT" + parent: "github.com/signalwire/signalwire-go/pkg/livewire" + module: "github.com.signalwire.signalwire-go.pkg.livewire" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go" +--- +# `DeepgramSTT` + +DeepgramSTT is a stub for the Deepgram STT provider. On SignalWire, speech recognition is handled by the control plane. + +## Signature + +```go +type DeepgramSTT struct +``` + +## Properties + + + +## Source + +[`pkg/livewire/plugins.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go) + +Line 9. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/eleven-labs-tts/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/eleven-labs-tts/index.mdx new file mode 100644 index 0000000000..5078916650 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/eleven-labs-tts/index.mdx @@ -0,0 +1,33 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/eleven-labs-tts" +title: "ElevenLabsTTS" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/livewire.ElevenLabsTTS" + parent: "github.com/signalwire/signalwire-go/pkg/livewire" + module: "github.com.signalwire.signalwire-go.pkg.livewire" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go" +--- +# `ElevenLabsTTS` + +ElevenLabsTTS is a stub for the ElevenLabs TTS provider. + +## Signature + +```go +type ElevenLabsTTS struct +``` + +## Properties + + + +## Source + +[`pkg/livewire/plugins.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go) + +Line 65. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/google-stt/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/google-stt/index.mdx new file mode 100644 index 0000000000..da5ab856fa --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/google-stt/index.mdx @@ -0,0 +1,33 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/google-stt" +title: "GoogleSTT" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/livewire.GoogleSTT" + parent: "github.com/signalwire/signalwire-go/pkg/livewire" + module: "github.com.signalwire.signalwire-go.pkg.livewire" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go" +--- +# `GoogleSTT` + +GoogleSTT is a stub for the Google STT provider. + +## Signature + +```go +type GoogleSTT struct +``` + +## Properties + + + +## Source + +[`pkg/livewire/plugins.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go) + +Line 24. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/index.mdx new file mode 100644 index 0000000000..ee954dc6f6 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/index.mdx @@ -0,0 +1,1360 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire" +title: "livewire" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "module" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/livewire" + module: "github.com.signalwire.signalwire-go.pkg.livewire" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go" +--- +# `livewire` + +Package livewire provides a LiveKit-compatible API surface that runs on SignalWire's platform. Developers can use familiar LiveKit struct and function names — just change the import path to get SignalWire's infrastructure handling STT, TTS, VAD, LLM, and call control. + +## Signature + +```go +package livewire +``` + +## Classes + + + + Agent mirrors a LiveKit Agent — it holds instructions and tool definitions. + + + + AgentHandoff signals a handoff to another agent in multi-agent scenarios. Mirrors Python AgentHandoff(agent, \*, returns=None) (line 153). + + + + AgentSession mirrors a LiveKit AgentSession — it binds an Agent to the SignalWire platform and manages the call lifecycle. + + + + CartesiaTTS is a stub for the Cartesia TTS provider. + + + + ChatContext buffers a conversation as an ordered list of role/content messages. It mirrors the Python livewire.ChatContext stub which is API-compatible with the livekit-agents ChatContext shape. + + + + ChatMessage holds a single role/content pair in a conversation history. The JSON tags match the dict keys produced by the Python ChatContext.append() implementation: \{"role": ..., "content": ...\}. + + + + DeepgramSTT is a stub for the Deepgram STT provider. On SignalWire, speech recognition is handled by the control plane. + + + + ElevenLabsTTS is a stub for the ElevenLabs TTS provider. + + + + GoogleSTT is a stub for the Google STT provider. + + + + InferenceLLM is a stub for the SignalWire-hosted inference LLM. On SignalWire, the LLM pipeline is handled by the control plane; the Model field is forwarded to SignalWire AI parameters. Mirrors Python InferenceLLM(model="") (livewire/**init**.py:751). + + + + InferenceSTT is a stub for the SignalWire-hosted inference STT provider. On SignalWire, speech recognition is handled by the control plane. Mirrors Python InferenceSTT(model="") (livewire/**init**.py:736). + + + + InferenceTTS is a no-op stub providing LiveKit import compatibility. SignalWire's control plane handles text-to-speech; this type exists so code written for livekit/agents inference.TTS can be dropped in unchanged. + + + + JobContext mirrors a LiveKit JobContext — provides room and connection info. + + + + JobProcess mirrors a LiveKit JobProcess — used for prewarm/setup. + + + + LiveServer mirrors a LiveKit AgentServer — it registers entrypoints and starts the agent. + + + + OpenAILLM is a stub for the OpenAI LLM provider. + + + + OpenAITTS is a stub for the OpenAI TTS provider. + + + + Room is a stub — SignalWire doesn't use the LiveKit room abstraction. + + + + RunContext mirrors a LiveKit RunContext — available inside tool handlers. + + + + SileroVAD is a stub for the Silero VAD provider. + + + + StopResponse signals that a tool should not trigger another LLM reply. + + + + ToolError signals a tool execution error. Return a \*ToolError from a tool handler to tell the framework the tool failed; the error message is forwarded to the LLM as a tool-failure notification rather than triggering a normal LLM reply. Parallel to StopResponse in this file. + + + +## Functions + +### NewAgent + +NewAgent creates a new Agent with the given instructions and options. + +#### Signature + +```go +func NewAgent(instructions string, opts ...AgentOption) *Agent +``` + +#### Parameters + + + + + +#### Returns + +`*Agent` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 163. + +*** + +### NewAgentServer + +NewAgentServer creates a new LiveServer. + +#### Signature + +```go +func NewAgentServer() *LiveServer +``` + +#### Returns + +`*LiveServer` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 754. + +*** + +### NewAgentSession + +NewAgentSession creates a new AgentSession with the given options. Mirrors Python AgentSession.**init** which initializes \_history to \[] (line 480) and \_userdata to \{\} when not provided (line 460). + +#### Signature + +```go +func NewAgentSession(opts ...SessionOption) *AgentSession +``` + +#### Parameters + + + +#### Returns + +`*AgentSession` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 495. + +*** + +### NewCartesiaTTS + +NewCartesiaTTS creates a CartesiaTTS stub. + +#### Signature + +```go +func NewCartesiaTTS(opts ...func(*CartesiaTTS)) *CartesiaTTS +``` + +#### Parameters + + + +#### Returns + +`*CartesiaTTS` + +#### Source + +[`pkg/livewire/plugins.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go) + +Line 84. + +*** + +### NewChatContext + +NewChatContext returns an empty ChatContext ready for use. + +#### Signature + +```go +func NewChatContext() *ChatContext +``` + +#### Returns + +`*ChatContext` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 923. + +*** + +### NewDeepgramSTT + +NewDeepgramSTT creates a DeepgramSTT stub. + +#### Signature + +```go +func NewDeepgramSTT(opts ...func(*DeepgramSTT)) *DeepgramSTT +``` + +#### Parameters + + + +#### Returns + +`*DeepgramSTT` + +#### Source + +[`pkg/livewire/plugins.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go) + +Line 14. + +*** + +### NewElevenLabsTTS + +NewElevenLabsTTS creates an ElevenLabsTTS stub. + +#### Signature + +```go +func NewElevenLabsTTS(opts ...func(*ElevenLabsTTS)) *ElevenLabsTTS +``` + +#### Parameters + + + +#### Returns + +`*ElevenLabsTTS` + +#### Source + +[`pkg/livewire/plugins.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go) + +Line 70. + +*** + +### NewGoogleSTT + +NewGoogleSTT creates a GoogleSTT stub. + +#### Signature + +```go +func NewGoogleSTT(opts ...func(*GoogleSTT)) *GoogleSTT +``` + +#### Parameters + + + +#### Returns + +`*GoogleSTT` + +#### Source + +[`pkg/livewire/plugins.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go) + +Line 29. + +*** + +### NewInferenceLLM + +NewInferenceLLM creates an InferenceLLM stub with the given options. + +#### Signature + +```go +func NewInferenceLLM(opts ...func(*InferenceLLM)) *InferenceLLM +``` + +#### Parameters + + + +#### Returns + +`*InferenceLLM` + +#### Source + +[`pkg/livewire/plugins.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go) + +Line 134. + +*** + +### NewInferenceSTT + +NewInferenceSTT creates an InferenceSTT stub with the given options. + +#### Signature + +```go +func NewInferenceSTT(opts ...func(*InferenceSTT)) *InferenceSTT +``` + +#### Parameters + + + +#### Returns + +`*InferenceSTT` + +#### Source + +[`pkg/livewire/plugins.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go) + +Line 46. + +*** + +### NewInferenceTTS + +NewInferenceTTS creates an InferenceTTS stub with the given model hint. The model value is stored for compatibility but is otherwise unused. + +#### Signature + +```go +func NewInferenceTTS(model string) *InferenceTTS +``` + +#### Parameters + + + +#### Returns + +`*InferenceTTS` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 950. + +*** + +### NewOpenAILLM + +NewOpenAILLM creates an OpenAILLM stub. + +#### Signature + +```go +func NewOpenAILLM(opts ...func(*OpenAILLM)) *OpenAILLM +``` + +#### Parameters + + + +#### Returns + +`*OpenAILLM` + +#### Source + +[`pkg/livewire/plugins.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go) + +Line 116. + +*** + +### NewOpenAITTS + +NewOpenAITTS creates an OpenAITTS stub. + +#### Signature + +```go +func NewOpenAITTS(opts ...func(*OpenAITTS)) *OpenAITTS +``` + +#### Parameters + + + +#### Returns + +`*OpenAITTS` + +#### Source + +[`pkg/livewire/plugins.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go) + +Line 98. + +*** + +### NewSileroVAD + +NewSileroVAD creates a SileroVAD stub. Mirrors Python SileroVAD(\*\*kwargs) — accepts functional options for LiveKit portability, matching the in-file convention for all other stubs. + +#### Signature + +```go +func NewSileroVAD(opts ...func(*SileroVAD)) *SileroVAD +``` + +#### Parameters + + + +#### Returns + +`*SileroVAD` + +#### Source + +[`pkg/livewire/plugins.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go) + +Line 157. + +*** + +### NewToolError + +NewToolError constructs a ToolError with the given message. + +#### Signature + +```go +func NewToolError(message string) *ToolError +``` + +#### Parameters + + + +#### Returns + +`*ToolError` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 901. + +*** + +### RunApp + +RunApp starts the LiveWire agent — prints the banner, a random tip, invokes the setup function (if any), calls the entrypoint, and starts the underlying SignalWire agent server. + +#### Signature + +```go +func RunApp(server *LiveServer) +``` + +#### Parameters + + + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 834. + +*** + +### WithAgentName + +WithAgentName sets the agent name for the RTC session. + +#### Signature + +```go +func WithAgentName(name string) RTCOption +``` + +#### Parameters + + + +#### Returns + +`RTCOption` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 770. + +*** + +### WithAllowInterruptions + +WithAllowInterruptions maps to barge configuration on SignalWire. + +#### Signature + +```go +func WithAllowInterruptions(allow bool) SessionOption +``` + +#### Parameters + + + +#### Returns + +`SessionOption` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 418. + +*** + +### WithDescription + +WithDescription sets the tool description. + +#### Signature + +```go +func WithDescription(desc string) ToolOption +``` + +#### Parameters + + + +#### Returns + +`ToolOption` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 177. + +*** + +### WithInferenceLLMModel + +WithInferenceLLMModel returns a functional option that sets the model string. + +#### Signature + +```go +func WithInferenceLLMModel(model string) func(*InferenceLLM) +``` + +#### Parameters + + + +#### Returns + +`func(*InferenceLLM)` + +#### Source + +[`pkg/livewire/plugins.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go) + +Line 143. + +*** + +### WithInferenceSTTModel + +WithInferenceSTTModel returns a functional option that sets the model string. + +#### Signature + +```go +func WithInferenceSTTModel(model string) func(*InferenceSTT) +``` + +#### Parameters + + + +#### Returns + +`func(*InferenceSTT)` + +#### Source + +[`pkg/livewire/plugins.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go) + +Line 56. + +*** + +### WithLLM + +WithLLM sets the LLM model — this maps to SignalWire AI params. + +#### Signature + +```go +func WithLLM(model string) SessionOption +``` + +#### Parameters + + + +#### Returns + +`SessionOption` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 395. + +*** + +### WithMaxEndpointingDelay + +WithMaxEndpointingDelay maps to AI params on SignalWire. + +#### Signature + +```go +func WithMaxEndpointingDelay(d float64) SessionOption +``` + +#### Parameters + + + +#### Returns + +`SessionOption` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 432. + +*** + +### WithMaxToolSteps + +WithMaxToolSteps sets the maximum tool call chain depth — noop on SignalWire. + +#### Signature + +```go +func WithMaxToolSteps(n int) SessionOption +``` + +#### Parameters + + + +#### Returns + +`SessionOption` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 439. + +*** + +### WithMCPServers + +WithMCPServers is a LiveKit-compatible noop — MCP servers are not yet supported in LiveWire. Tools should be registered via FunctionTool. Mirrors Python Agent(mcp\_servers=...) which emits a one-time noop warning. + +#### Signature + +```go +func WithMCPServers(servers ...any) AgentOption +``` + +#### Parameters + + + +#### Returns + +`AgentOption` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 156. + +*** + +### WithMinEndpointingDelay + +WithMinEndpointingDelay maps to end\_of\_speech\_timeout on SignalWire. + +#### Signature + +```go +func WithMinEndpointingDelay(d float64) SessionOption +``` + +#### Parameters + + + +#### Returns + +`SessionOption` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 425. + +*** + +### WithMinInterruptionDuration + +WithMinInterruptionDuration sets the minimum interruption duration — noop on SignalWire where barge-in timing is handled automatically. Mirrors Python AgentSession(min\_interruption\_duration=0.5) (line 419). + +#### Signature + +```go +func WithMinInterruptionDuration(d float64) SessionOption +``` + +#### Parameters + + + +#### Returns + +`SessionOption` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 476. + +*** + +### WithOnRequest + +WithOnRequest accepts a request callback — noop on SignalWire. Mirrors Python AgentServer.rtc\_session(on\_request=...) which silently ignores the parameter for LiveKit portability. + +#### Signature + +```go +func WithOnRequest(fn func()) RTCOption +``` + +#### Parameters + + + +#### Returns + +`RTCOption` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 785. + +*** + +### WithOnSessionEnd + +WithOnSessionEnd accepts a session-end callback — noop on SignalWire. Mirrors Python AgentServer.rtc\_session(on\_session\_end=...) which silently ignores the parameter for LiveKit portability. + +#### Signature + +```go +func WithOnSessionEnd(fn func()) RTCOption +``` + +#### Parameters + + + +#### Returns + +`RTCOption` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 794. + +*** + +### WithParameters + +WithParameters sets explicit JSON-Schema parameters for a tool. + +#### Signature + +```go +func WithParameters(params map[string]any) ToolOption +``` + +#### Parameters + + + +#### Returns + +`ToolOption` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 182. + +*** + +### WithPreemptiveGeneration + +WithPreemptiveGeneration enables or disables preemptive generation — noop on SignalWire. Mirrors Python AgentSession(preemptive\_generation=False) (line 423). + +#### Signature + +```go +func WithPreemptiveGeneration(enabled bool) SessionOption +``` + +#### Parameters + + + +#### Returns + +`SessionOption` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 485. + +*** + +### WithRecord + +WithRecord enables call recording for the session. Mirrors Python AgentSession.start(record=False) keyword-only param (line 504). + +#### Signature + +```go +func WithRecord(record bool) StartOption +``` + +#### Parameters + + + +#### Returns + +`StartOption` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 561. + +*** + +### WithReplyInstructions + +WithReplyInstructions sets the instructions for the generated reply. + +#### Signature + +```go +func WithReplyInstructions(inst string) ReplyOption +``` + +#### Parameters + + + +#### Returns + +`ReplyOption` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 668. + +*** + +### WithRoom + +WithRoom sets the room for the session start. Mirrors Python AgentSession.start(room=...) keyword-only param (line 504). + +#### Signature + +```go +func WithRoom(room *Room) StartOption +``` + +#### Parameters + + + +#### Returns + +`StartOption` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 555. + +*** + +### WithServerType + +WithServerType sets the server type ("room" or "publisher") — noop on SignalWire. + +#### Signature + +```go +func WithServerType(t string) RTCOption +``` + +#### Parameters + + + +#### Returns + +`RTCOption` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 775. + +*** + +### WithSessionMCPServers + +WithSessionMCPServers stores the MCP servers value on the session — noop on SignalWire. Mirrors Python AgentSession(mcp\_servers=...) which emits a one-time noop warning (lines 450–456). + +#### Signature + +```go +func WithSessionMCPServers(servers any) SessionOption +``` + +#### Parameters + + + +#### Returns + +`SessionOption` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 459. + +*** + +### WithSessionTools + +WithSessionTools appends session-level tools to the AgentSession. These are merged with the bound Agent's tools in Start(). Mirrors Python AgentSession(tools=...) which stores list(tools or \[]) on self.\_tools (line 459) and merges them in \_build\_sw\_agent() (line 591). + +#### Signature + +```go +func WithSessionTools(tools ...any) SessionOption +``` + +#### Parameters + + + +#### Returns + +`SessionOption` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 450. + +*** + +### WithSessionUserdata + +WithSessionUserdata attaches arbitrary user data to the session. Mirrors Python AgentSession(userdata=...) which stores the value as self.\_userdata (line 460). + +#### Signature + +```go +func WithSessionUserdata(data any) SessionOption +``` + +#### Parameters + + + +#### Returns + +`SessionOption` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 469. + +*** + +### WithSTT + +WithSTT sets the STT provider — noop on SignalWire (handled by the control plane). + +#### Signature + +```go +func WithSTT(provider string) SessionOption +``` + +#### Parameters + + + +#### Returns + +`SessionOption` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 379. + +*** + +### WithTools + +WithTools is a LiveKit-compatible noop — use FunctionTool to register tools. + +#### Signature + +```go +func WithTools(tools ...any) AgentOption +``` + +#### Parameters + + + +#### Returns + +`AgentOption` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 142. + +*** + +### WithTTS + +WithTTS sets the TTS provider — noop on SignalWire (voice can be configured via languages). + +#### Signature + +```go +func WithTTS(provider string) SessionOption +``` + +#### Parameters + + + +#### Returns + +`SessionOption` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 387. + +*** + +### WithTurnDetection + +WithTurnDetection sets the turn detection mode — noop on SignalWire. + +#### Signature + +```go +func WithTurnDetection(mode string) SessionOption +``` + +#### Parameters + + + +#### Returns + +`SessionOption` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 410. + +*** + +### WithUserdata + +WithUserdata attaches arbitrary user data to the agent. + +#### Signature + +```go +func WithUserdata(data any) AgentOption +``` + +#### Parameters + + + +#### Returns + +`AgentOption` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 149. + +*** + +### WithVAD + +WithVAD sets the VAD provider — noop on SignalWire (handled by the control plane). + +#### Signature + +```go +func WithVAD(vad any) SessionOption +``` + +#### Parameters + + + +#### Returns + +`SessionOption` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 402. + +## Type Aliases + +### AgentOption + +AgentOption configures an Agent during construction. + +#### Signature + +```go +type AgentOption alias +``` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 139. + +*** + +### ReplyOption + +ReplyOption configures a GenerateReply call. + +#### Signature + +```go +type ReplyOption alias +``` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 665. + +*** + +### RTCOption + +RTCOption configures an RTC session. + +#### Signature + +```go +type RTCOption alias +``` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 767. + +*** + +### SessionOption + +SessionOption configures an AgentSession. + +#### Signature + +```go +type SessionOption alias +``` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 376. + +*** + +### StartOption + +StartOption configures a Start() call. + +#### Signature + +```go +type StartOption alias +``` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 551. + +*** + +### ToolOption + +ToolOption configures a tool definition. + +#### Signature + +```go +type ToolOption alias +``` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 174. + +## Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/inference-llm/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/inference-llm/index.mdx new file mode 100644 index 0000000000..9966dd50ce --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/inference-llm/index.mdx @@ -0,0 +1,33 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/inference-llm" +title: "InferenceLLM" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/livewire.InferenceLLM" + parent: "github.com/signalwire/signalwire-go/pkg/livewire" + module: "github.com.signalwire.signalwire-go.pkg.livewire" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go" +--- +# `InferenceLLM` + +InferenceLLM is a stub for the SignalWire-hosted inference LLM. On SignalWire, the LLM pipeline is handled by the control plane; the Model field is forwarded to SignalWire AI parameters. Mirrors Python InferenceLLM(model="") (livewire/**init**.py:751). + +## Signature + +```go +type InferenceLLM struct +``` + +## Properties + + + +## Source + +[`pkg/livewire/plugins.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go) + +Line 129. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/inference-stt/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/inference-stt/index.mdx new file mode 100644 index 0000000000..9cefe09a54 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/inference-stt/index.mdx @@ -0,0 +1,33 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/inference-stt" +title: "InferenceSTT" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/livewire.InferenceSTT" + parent: "github.com/signalwire/signalwire-go/pkg/livewire" + module: "github.com.signalwire.signalwire-go.pkg.livewire" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go" +--- +# `InferenceSTT` + +InferenceSTT is a stub for the SignalWire-hosted inference STT provider. On SignalWire, speech recognition is handled by the control plane. Mirrors Python InferenceSTT(model="") (livewire/**init**.py:736). + +## Signature + +```go +type InferenceSTT struct +``` + +## Properties + + + +## Source + +[`pkg/livewire/plugins.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go) + +Line 41. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/inference-tts/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/inference-tts/index.mdx new file mode 100644 index 0000000000..08b4a7a3cc --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/inference-tts/index.mdx @@ -0,0 +1,33 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/inference-tts" +title: "InferenceTTS" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/livewire.InferenceTTS" + parent: "github.com/signalwire/signalwire-go/pkg/livewire" + module: "github.com.signalwire.signalwire-go.pkg.livewire" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go" +--- +# `InferenceTTS` + +InferenceTTS is a no-op stub providing LiveKit import compatibility. SignalWire's control plane handles text-to-speech; this type exists so code written for livekit/agents inference.TTS can be dropped in unchanged. + +## Signature + +```go +type InferenceTTS struct +``` + +## Properties + + + +## Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 944. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/job-context/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/job-context/index.mdx new file mode 100644 index 0000000000..35577295cb --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/job-context/index.mdx @@ -0,0 +1,83 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/job-context" +title: "JobContext" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/livewire.JobContext" + parent: "github.com/signalwire/signalwire-go/pkg/livewire" + module: "github.com.signalwire.signalwire-go.pkg.livewire" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go" +--- +# `JobContext` + +JobContext mirrors a LiveKit JobContext — provides room and connection info. + +## Signature + +```go +type JobContext struct +``` + +## Properties + + + + + +## Methods + +### Connect + +Connect is a LiveKit compatibility noop — SignalWire agents connect automatically when the platform invokes the SWML endpoint. + +#### Signature + +```go +func (*JobContext) Connect() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 718. + +*** + +### WaitForParticipant + +WaitForParticipant is a LiveKit compatibility noop — SignalWire handles participant management automatically. Mirrors Python JobContext.wait\_for\_participant(\*, identity=None) (line 670). + +#### Signature + +```go +func (*JobContext) WaitForParticipant(identity string) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 726. + +## Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 710. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/job-process/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/job-process/index.mdx new file mode 100644 index 0000000000..a668bb8e9b --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/job-process/index.mdx @@ -0,0 +1,33 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/job-process" +title: "JobProcess" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/livewire.JobProcess" + parent: "github.com/signalwire/signalwire-go/pkg/livewire" + module: "github.com.signalwire.signalwire-go.pkg.livewire" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go" +--- +# `JobProcess` + +JobProcess mirrors a LiveKit JobProcess — used for prewarm/setup. + +## Signature + +```go +type JobProcess struct +``` + +## Properties + + + +## Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 823. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/live-server/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/live-server/index.mdx new file mode 100644 index 0000000000..4db311e867 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/live-server/index.mdx @@ -0,0 +1,75 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/live-server" +title: "LiveServer" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/livewire.LiveServer" + parent: "github.com/signalwire/signalwire-go/pkg/livewire" + module: "github.com.signalwire.signalwire-go.pkg.livewire" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go" +--- +# `LiveServer` + +LiveServer mirrors a LiveKit AgentServer — it registers entrypoints and starts the agent. + +## Signature + +```go +type LiveServer struct +``` + +## Methods + +### RTCSession + +RTCSession registers the session entrypoint function. + +#### Signature + +```go +func (*LiveServer) RTCSession(fn func(*JobContext), opts ...RTCOption) +``` + +#### Parameters + + + + + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 807. + +*** + +### SetSetupFunc + +SetSetupFunc sets the prewarm/setup function — noop on SignalWire. + +#### Signature + +```go +func (*LiveServer) SetSetupFunc(fn func(*JobProcess)) +``` + +#### Parameters + + + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 801. + +## Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 746. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/open-aillm/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/open-aillm/index.mdx new file mode 100644 index 0000000000..9f51f257eb --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/open-aillm/index.mdx @@ -0,0 +1,33 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/open-aillm" +title: "OpenAILLM" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/livewire.OpenAILLM" + parent: "github.com/signalwire/signalwire-go/pkg/livewire" + module: "github.com.signalwire.signalwire-go.pkg.livewire" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go" +--- +# `OpenAILLM` + +OpenAILLM is a stub for the OpenAI LLM provider. + +## Signature + +```go +type OpenAILLM struct +``` + +## Properties + + + +## Source + +[`pkg/livewire/plugins.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go) + +Line 111. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/open-aitts/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/open-aitts/index.mdx new file mode 100644 index 0000000000..4223c9113d --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/open-aitts/index.mdx @@ -0,0 +1,33 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/open-aitts" +title: "OpenAITTS" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/livewire.OpenAITTS" + parent: "github.com/signalwire/signalwire-go/pkg/livewire" + module: "github.com.signalwire.signalwire-go.pkg.livewire" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go" +--- +# `OpenAITTS` + +OpenAITTS is a stub for the OpenAI TTS provider. + +## Signature + +```go +type OpenAITTS struct +``` + +## Properties + + + +## Source + +[`pkg/livewire/plugins.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go) + +Line 93. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/room/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/room/index.mdx new file mode 100644 index 0000000000..0693a0deae --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/room/index.mdx @@ -0,0 +1,33 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/room" +title: "Room" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/livewire.Room" + parent: "github.com/signalwire/signalwire-go/pkg/livewire" + module: "github.com.signalwire.signalwire-go.pkg.livewire" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go" +--- +# `Room` + +Room is a stub — SignalWire doesn't use the LiveKit room abstraction. + +## Signature + +```go +type Room struct +``` + +## Properties + + + +## Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 736. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/run-context/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/run-context/index.mdx new file mode 100644 index 0000000000..b9541cdcc1 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/run-context/index.mdx @@ -0,0 +1,41 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/run-context" +title: "RunContext" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/livewire.RunContext" + parent: "github.com/signalwire/signalwire-go/pkg/livewire" + module: "github.com.signalwire.signalwire-go.pkg.livewire" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go" +--- +# `RunContext` + +RunContext mirrors a LiveKit RunContext — available inside tool handlers. + +## Signature + +```go +type RunContext struct +``` + +## Properties + + + + + + + + + + + +## Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 316. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/silero-vad/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/silero-vad/index.mdx new file mode 100644 index 0000000000..16c022a349 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/silero-vad/index.mdx @@ -0,0 +1,51 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/silero-vad" +title: "SileroVAD" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/livewire.SileroVAD" + parent: "github.com/signalwire/signalwire-go/pkg/livewire" + module: "github.com.signalwire.signalwire-go.pkg.livewire" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go" +--- +# `SileroVAD` + +SileroVAD is a stub for the Silero VAD provider. + +## Signature + +```go +type SileroVAD struct +``` + +## Methods + +### Load + +Load is a noop — Silero VAD model loading is not needed on SignalWire. + +#### Signature + +```go +func (*SileroVAD) Load() *SileroVAD +``` + +#### Returns + +`*SileroVAD` + +#### Source + +[`pkg/livewire/plugins.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go) + +Line 166. + +## Source + +[`pkg/livewire/plugins.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go) + +Line 152. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/stop-response/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/stop-response/index.mdx new file mode 100644 index 0000000000..12e3b2915d --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/stop-response/index.mdx @@ -0,0 +1,29 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/stop-response" +title: "StopResponse" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/livewire.StopResponse" + parent: "github.com/signalwire/signalwire-go/pkg/livewire" + module: "github.com.signalwire.signalwire-go.pkg.livewire" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go" +--- +# `StopResponse` + +StopResponse signals that a tool should not trigger another LLM reply. + +## Signature + +```go +type StopResponse struct +``` + +## Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 883. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/tool-error/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/tool-error/index.mdx new file mode 100644 index 0000000000..024b794f10 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/tool-error/index.mdx @@ -0,0 +1,55 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/tool-error" +title: "ToolError" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/livewire.ToolError" + parent: "github.com/signalwire/signalwire-go/pkg/livewire" + module: "github.com.signalwire.signalwire-go.pkg.livewire" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go" +--- +# `ToolError` + +ToolError signals a tool execution error. Return a \*ToolError from a tool handler to tell the framework the tool failed; the error message is forwarded to the LLM as a tool-failure notification rather than triggering a normal LLM reply. Parallel to StopResponse in this file. + +## Signature + +```go +type ToolError struct +``` + +## Properties + + + +## Methods + +### Error + +Error implements the built-in error interface. + +#### Signature + +```go +func (*ToolError) Error() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 898. + +## Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 893. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/logging/logging/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/logging/logging/index.mdx new file mode 100644 index 0000000000..8353315374 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/logging/logging/index.mdx @@ -0,0 +1,307 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/logging/logging" +title: "logging" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "module" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/logging" + module: "github.com.signalwire.signalwire-go.pkg.logging" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/logging/log_level.go" +--- +# `logging` + +Package logging provides structured logging for the SignalWire AI Agents SDK. + +It supports log levels (debug, info, warn, error), named loggers per component, and can be suppressed globally for CLI tools or testing. + +## Signature + +```go +package logging +``` + +## Constants + + + + + + + + + Canonical log-level names. These are exactly the strings ParseLevel maps to a Level; the values must stay in lockstep with the switch in ParseLevel. The set mirrors the Python reference's documented SIGNALWIRE\_LOG\_LEVEL vocabulary (debug, info, warning, error) plus the Go-side aliases ParseLevel also honors (warn, off). + + + + Canonical log-level names. These are exactly the strings ParseLevel maps to a Level; the values must stay in lockstep with the switch in ParseLevel. The set mirrors the Python reference's documented SIGNALWIRE\_LOG\_LEVEL vocabulary (debug, info, warning, error) plus the Go-side aliases ParseLevel also honors (warn, off). + + + + Canonical log-level names. These are exactly the strings ParseLevel maps to a Level; the values must stay in lockstep with the switch in ParseLevel. The set mirrors the Python reference's documented SIGNALWIRE\_LOG\_LEVEL vocabulary (debug, info, warning, error) plus the Go-side aliases ParseLevel also honors (warn, off). + + + + Canonical log-level names. These are exactly the strings ParseLevel maps to a Level; the values must stay in lockstep with the switch in ParseLevel. The set mirrors the Python reference's documented SIGNALWIRE\_LOG\_LEVEL vocabulary (debug, info, warning, error) plus the Go-side aliases ParseLevel also honors (warn, off). + + + + Canonical log-level names. These are exactly the strings ParseLevel maps to a Level; the values must stay in lockstep with the switch in ParseLevel. The set mirrors the Python reference's documented SIGNALWIRE\_LOG\_LEVEL vocabulary (debug, info, warning, error) plus the Go-side aliases ParseLevel also honors (warn, off). + + + + Canonical log-level names. These are exactly the strings ParseLevel maps to a Level; the values must stay in lockstep with the switch in ParseLevel. The set mirrors the Python reference's documented SIGNALWIRE\_LOG\_LEVEL vocabulary (debug, info, warning, error) plus the Go-side aliases ParseLevel also honors (warn, off). + + + + + + +## Classes + + + + Logger is a named logger that respects global log level settings. + + + +## Functions + +### GetGlobalLevel + +GetGlobalLevel returns the current global log level. + +#### Signature + +```go +func GetGlobalLevel() Level +``` + +#### Returns + +`Level` + +#### Source + +[`pkg/logging/logger.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/logging/logger.go) + +Line 96. + +*** + +### IsSuppressed + +IsSuppressed returns whether logging is currently suppressed. + +#### Signature + +```go +func IsSuppressed() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/logging/logger.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/logging/logger.go) + +Line 117. + +*** + +### New + +New creates a new Logger with the given component name. + +#### Signature + +```go +func New(name string) *Logger +``` + +#### Parameters + + + +#### Returns + +`*Logger` + +#### Source + +[`pkg/logging/logger.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/logging/logger.go) + +Line 130. + +*** + +### ParseLevel + +ParseLevel converts a string level name to a Level. Returns LevelInfo if the string is not recognized. + +#### Signature + +```go +func ParseLevel(s string) Level +``` + +#### Parameters + + + +#### Returns + +`Level` + +#### Source + +[`pkg/logging/logger.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/logging/logger.go) + +Line 36. + +*** + +### ResetLoggingConfiguration + +ResetLoggingConfiguration re-reads SIGNALWIRE\_LOG\_LEVEL and SIGNALWIRE\_LOG\_MODE from the environment and resets globalLevel and suppressed to the env-derived defaults. It is the Go equivalent of Python's reset\_logging\_configuration() and is intended for test teardown and env-var-driven reconfiguration at runtime. + +#### Signature + +```go +func ResetLoggingConfiguration() +``` + +#### Source + +[`pkg/logging/logger.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/logging/logger.go) + +Line 82. + +*** + +### SetGlobalLevel + +SetGlobalLevel sets the minimum log level for all loggers. + +#### Signature + +```go +func SetGlobalLevel(level Level) +``` + +#### Parameters + + + +#### Source + +[`pkg/logging/logger.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/logging/logger.go) + +Line 89. + +*** + +### Suppress + +Suppress disables all log output. + +#### Signature + +```go +func Suppress() +``` + +#### Source + +[`pkg/logging/logger.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/logging/logger.go) + +Line 103. + +*** + +### Unsuppress + +Unsuppress re-enables log output. + +#### Signature + +```go +func Unsuppress() +``` + +#### Source + +[`pkg/logging/logger.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/logging/logger.go) + +Line 110. + +## Enums + +### Level + +Level represents a log severity level. + +#### Signature + +```go +type Level alias +``` + +#### Source + +[`pkg/logging/logger.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/logging/logger.go) + +Line 16. + +*** + +### LogLevel + +LogLevel is the closed set of log-level _names_ accepted at the string boundary (e.g. server.WithLogLevel, the SIGNALWIRE\_LOG\_LEVEL env var) as a defined string type with typed constants. It is distinct from Level: Level is the internal integer severity used by the loggers, whereas LogLevel is the user-facing textual name that ParseLevel resolves into a Level. + +Adding the typed constants gives Go callers editor autocompletion plus call-site typo checking — a bare string like "debgu" only diverges at runtime (ParseLevel silently falls back to LevelInfo), whereas a mistyped constant fails to compile. Because Go auto-converts untyped string-constant literals to a defined string type, every call site keeps working both ways: + +``` +server.WithLogLevel(logging.LevelNameDebug) // typed const — autocompleted +server.WithLogLevel("debug") // bare string literal still compiles +``` + +LogLevel is a string subtype, so its value is byte-identical to the bare string the reference uses — ParseLevel("debug") and ParseLevel(LevelNameDebug) resolve to the same Level, preserving parity with the Python reference whose log\_level is a plain str (signalwire/core/logging\_config.py). + +#### Signature + +```go +type LogLevel alias +``` + +#### Examples + + + + ```go + server.WithLogLevel(logging.LevelNameDebug) // typed const — autocompleted + server.WithLogLevel("debug") // bare string literal still compiles + ``` + + + + ```go + server.WithLogLevel(logging.LevelNameDebug) // typed const — autocompleted + server.WithLogLevel("debug") // bare string literal still compiles + ``` + + + +#### Source + +[`pkg/logging/log_level.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/logging/log_level.go) + +Line 22. + +## Source + +[`pkg/logging/log_level.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/logging/log_level.go) diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/logging/logging/logger/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/logging/logging/logger/index.mdx new file mode 100644 index 0000000000..306b0e4c32 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/logging/logging/logger/index.mdx @@ -0,0 +1,125 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/logging/logging/logger" +title: "Logger" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/logging.Logger" + parent: "github.com/signalwire/signalwire-go/pkg/logging" + module: "github.com.signalwire.signalwire-go.pkg.logging" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/logging/logger.go" +--- +# `Logger` + +Logger is a named logger that respects global log level settings. + +## Signature + +```go +type Logger struct +``` + +## Methods + +### Debug + +Debug logs a message at debug level. + +#### Signature + +```go +func (*Logger) Debug(format string, args ...any) +``` + +#### Parameters + + + + + +#### Source + +[`pkg/logging/logger.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/logging/logger.go) + +Line 153. + +*** + +### Error + +Error logs a message at error level. + +#### Signature + +```go +func (*Logger) Error(format string, args ...any) +``` + +#### Parameters + + + + + +#### Source + +[`pkg/logging/logger.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/logging/logger.go) + +Line 168. + +*** + +### Info + +Info logs a message at info level. + +#### Signature + +```go +func (*Logger) Info(format string, args ...any) +``` + +#### Parameters + + + + + +#### Source + +[`pkg/logging/logger.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/logging/logger.go) + +Line 158. + +*** + +### Warn + +Warn logs a message at warn level. + +#### Signature + +```go +func (*Logger) Warn(format string, args ...any) +``` + +#### Parameters + + + + + +#### Source + +[`pkg/logging/logger.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/logging/logger.go) + +Line 163. + +## Source + +[`pkg/logging/logger.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/logging/logger.go) + +Line 124. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/pom/pom/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/pom/pom/index.mdx new file mode 100644 index 0000000000..8ed042d7b5 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/pom/pom/index.mdx @@ -0,0 +1,303 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/pom/pom" +title: "pom" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "module" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/pom" + module: "github.com.signalwire.signalwire-go.pkg.pom" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go" +--- +# `pom` + +Package pom provides a typed Prompt Object Model — a structured tree of sections that can be rendered to Markdown, XML, JSON, or YAML. The rendered output matches the Python reference at signalwire/signalwire/pom/pom.py byte-for-byte for the canonical scenarios covered by the cross-port parity tests in tests/unit/pom/test\_pom\_render\_parity.py. + +Two types make up the API: + +- Section: one node in the tree (title, body, bullets, subsections, numbered, numberedBullets). +- PromptObjectModel: the root container that holds the top-level sections and provides JSON / YAML round-trip helpers plus the Markdown / XML renderers. + +Both types are exported so callers can build a POM imperatively (NewPromptObjectModel + AddSection + AddSubsection) or by parsing a JSON/YAML document (FromJSON / FromYAML). The rendered output is the canonical wire format; user-facing helpers like AgentBase.Pom() return a \*PromptObjectModel value to keep mutations off the agent's internal state. + +## Signature + +```go +package pom +``` + +## Classes + + + + PromptObjectModel is the root container — a list of top-level Sections plus serialization / rendering helpers. Use NewPromptObjectModel() to construct one, or FromJSON / FromYAML to parse one. + + + + Section is one node in the POM tree. + + + +## Functions + +### FromJSON + +FromJSON parses a JSON string (an array of section maps) and returns a populated \*PromptObjectModel. Subsections are validated to require a title; any section without body/bullets/subsections is rejected. + +Python equivalent: PromptObjectModel.from\_json + +#### Signature + +```go +func FromJSON(jsonStr string) (*PromptObjectModel, error) +``` + +#### Parameters + + + +#### Returns + +`(*PromptObjectModel, error)` + +#### Source + +[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) + +Line 577. + +*** + +### FromList + +FromList builds a POM from a pre-parsed \[]map\[string]any (callers can use this when they already have the dict form, e.g. from a database row or another config source). + +Python equivalent: PromptObjectModel.\_from\_dict (the internal helper shared by from\_json / from\_yaml). + +#### Signature + +```go +func FromList(data []map[string]any) (*PromptObjectModel, error) +``` + +#### Parameters + + + +#### Returns + +`(*PromptObjectModel, error)` + +#### Source + +[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) + +Line 603. + +*** + +### FromYAML + +FromYAML parses a YAML string (an array of section maps) and returns a populated \*PromptObjectModel. + +Python equivalent: PromptObjectModel.from\_yaml + +#### Signature + +```go +func FromYAML(yamlStr string) (*PromptObjectModel, error) +``` + +#### Parameters + + + +#### Returns + +`(*PromptObjectModel, error)` + +#### Source + +[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) + +Line 589. + +*** + +### NewPromptObjectModel + +NewPromptObjectModel returns an empty POM ready for AddSection calls. + +Python equivalent: PromptObjectModel.**init** + +#### Signature + +```go +func NewPromptObjectModel() *PromptObjectModel +``` + +#### Returns + +`*PromptObjectModel` + +#### Source + +[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) + +Line 341. + +*** + +### NewSection + +NewSection returns a new Section with the supplied title (which may be empty to indicate untitled). Body, bullets, and subsections start empty; populate them via AddBody / AddBullets / AddSubsection. + +Python equivalent: Section.**init** + +#### Signature + +```go +func NewSection(title string) *Section +``` + +#### Parameters + + + +#### Returns + +`*Section` + +#### Source + +[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) + +Line 69. + +*** + +### WithBody + +WithBody sets the section body. + +#### Signature + +```go +func WithBody(body string) SectionOption +``` + +#### Parameters + + + +#### Returns + +`SectionOption` + +#### Source + +[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) + +Line 112. + +*** + +### WithBullets + +WithBullets sets the section bullets (replaces, not appends). + +#### Signature + +```go +func WithBullets(bullets []string) SectionOption +``` + +#### Parameters + + + +#### Returns + +`SectionOption` + +#### Source + +[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) + +Line 115. + +*** + +### WithNumbered + +WithNumbered marks the section as numbered (or explicitly un-numbered). + +#### Signature + +```go +func WithNumbered(v bool) SectionOption +``` + +#### Parameters + + + +#### Returns + +`SectionOption` + +#### Source + +[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) + +Line 120. + +*** + +### WithNumberedBullets + +WithNumberedBullets switches bullet rendering to numbered form. + +#### Signature + +```go +func WithNumberedBullets(v bool) SectionOption +``` + +#### Parameters + + + +#### Returns + +`SectionOption` + +#### Source + +[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) + +Line 123. + +## Type Aliases + +### SectionOption + +SectionOption configures a Section at construction (used by AddSubsection and PromptObjectModel.AddSection). + +#### Signature + +```go +type SectionOption alias +``` + +#### Source + +[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) + +Line 109. + +## Source + +[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/pom/pom/prompt-object-model/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/pom/pom/prompt-object-model/index.mdx new file mode 100644 index 0000000000..743f5651b0 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/pom/pom/prompt-object-model/index.mdx @@ -0,0 +1,271 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/pom/pom/prompt-object-model" +title: "PromptObjectModel" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/pom.PromptObjectModel" + parent: "github.com/signalwire/signalwire-go/pkg/pom" + module: "github.com.signalwire.signalwire-go.pkg.pom" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go" +--- +# `PromptObjectModel` + +PromptObjectModel is the root container — a list of top-level Sections plus serialization / rendering helpers. Use NewPromptObjectModel() to construct one, or FromJSON / FromYAML to parse one. + +Python equivalent: signalwire.pom.pom.PromptObjectModel + +## Signature + +```go +type PromptObjectModel struct +``` + +## Properties + + + Debug, when true, prints rendering decisions to stderr (matches the Python flag). Off by default. + + + + Sections is the ordered list of top-level sections. Only the first section may have a nil Title. + + +## Methods + +### AddPomAsSubsection + +AddPomAsSubsection attaches every top-level section of pomToAdd underneath the section identified by target — either the title of an existing section in this POM, or a \*Section pointer. + +Python equivalent: PromptObjectModel.add\_pom\_as\_subsection + +#### Signature + +```go +func (*PromptObjectModel) AddPomAsSubsection(target any, pomToAdd *PromptObjectModel) error +``` + +#### Parameters + + + + + +#### Returns + +`error` + +#### Source + +[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) + +Line 828. + +*** + +### AddSection + +AddSection appends a top-level section. title may be empty only for the first section (Python contract: "Only the first section can have no title"). The returned \*Section can be configured further (for example, by calling AddSubsection on it). + +Python equivalent: PromptObjectModel.add\_section + +#### Signature + +```go +func (*PromptObjectModel) AddSection(title string, opts ...SectionOption) (*Section, error) +``` + +#### Parameters + + + + + +#### Returns + +`(*Section, error)` + +#### Source + +[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) + +Line 351. + +*** + +### Clone + +Clone returns a deep copy of the POM. Useful when an agent wants to hand callers a snapshot without exposing internal mutable state. + +#### Signature + +```go +func (*PromptObjectModel) Clone() *PromptObjectModel +``` + +#### Returns + +`*PromptObjectModel` + +#### Source + +[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) + +Line 849. + +*** + +### FindSection + +FindSection performs a recursive depth-first search for a section whose Title matches. Returns nil if no match is found. + +Python equivalent: PromptObjectModel.find\_section + +#### Signature + +```go +func (*PromptObjectModel) FindSection(title string) *Section +``` + +#### Parameters + + + +#### Returns + +`*Section` + +#### Source + +[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) + +Line 372. + +*** + +### RenderMarkdown + +RenderMarkdown renders the entire POM as a Markdown document. + +Python equivalent: PromptObjectModel.render\_markdown + +#### Signature + +```go +func (*PromptObjectModel) RenderMarkdown() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) + +Line 770. + +*** + +### RenderXML + +RenderXML renders the entire POM as an XML document with the canonical “<?xml ...?>\ ... </prompt>“ envelope. + +Python equivalent: PromptObjectModel.render\_xml + +#### Signature + +```go +func (*PromptObjectModel) RenderXML() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) + +Line 797. + +*** + +### ToJSON + +ToJSON serializes the POM to a JSON string. Matches Python's json.dumps(..., indent=2) byte-for-byte for the canonical fixtures. + +Python equivalent: PromptObjectModel.to\_json + +#### Signature + +```go +func (*PromptObjectModel) ToJSON() (string, error) +``` + +#### Returns + +`(string, error)` + +#### Source + +[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) + +Line 404. + +*** + +### ToList + +ToList returns the POM as \[]map\[string]any (one entry per top-level section), matching Python's to\_dict. + +Python equivalent: PromptObjectModel.to\_dict + +#### Signature + +```go +func (*PromptObjectModel) ToList() []map[string]any +``` + +#### Returns + +`[]map[string]any` + +#### Source + +[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) + +Line 392. + +*** + +### ToYAML + +ToYAML serializes the POM to a YAML string in the same shape as Python's yaml.dump(..., default\_flow\_style=False, sort\_keys=False). PyYAML uses block-sequence-with-indent-0 by default (the leading "-" of each list item aligns with the parent's mapping key, not after it); gopkg.in/yaml.v3 cannot be configured to do the same, so this renderer writes the YAML structure manually for byte-for-byte parity. + +Python equivalent: PromptObjectModel.to\_yaml + +#### Signature + +```go +func (*PromptObjectModel) ToYAML() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) + +Line 500. + +## Source + +[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) + +Line 329. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/pom/pom/section/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/pom/pom/section/index.mdx new file mode 100644 index 0000000000..810e4d8b9a --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/pom/pom/section/index.mdx @@ -0,0 +1,246 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/pom/pom/section" +title: "Section" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/pom.Section" + parent: "github.com/signalwire/signalwire-go/pkg/pom" + module: "github.com.signalwire.signalwire-go.pkg.pom" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go" +--- +# `Section` + +Section is one node in the POM tree. + +Python equivalent: signalwire.pom.pom.Section. The exported field names match the JSON / YAML schema: + +``` +{"title": "...", "body": "...", "bullets": [...], + "subsections": [...], "numbered": true, "numberedBullets": true} +``` + +Title is a \*string (not string) to faithfully model Python's "title may be None" semantics for the optional first top-level section. All other fields use zero values to mean "absent". + +## Signature + +```go +type Section struct +``` + +## Examples + + + + ```go + {"title": "...", "body": "...", "bullets": [...], + "subsections": [...], "numbered": true, "numberedBullets": true} + ``` + + + + ```go + {"title": "...", "body": "...", "bullets": [...], + "subsections": [...], "numbered": true, "numberedBullets": true} + ``` + + + +## Properties + + + Body is a paragraph of free text (rendered before any bullets). + + + + Bullets is the list of bullet points. Empty means no bullet list. + + + + Numbered, when non-nil, opts the section into (or out of) numeric section numbering. nil means "default" (inherit sibling behavior). + + + + NumberedBullets renders bullets as "1." "2." instead of "-". + + + + Subsections is the list of nested child sections. + + + + Title is the section heading. nil means untitled (only legal for the first top-level section in a PromptObjectModel). + + +## Methods + +### AddBody + +AddBody sets (or replaces) the section body text. + +Python equivalent: Section.add\_body — the docstring says "Add OR REPLACE the body text"; this is a setter, not an appender. + +#### Signature + +```go +func (*Section) AddBody(body string) +``` + +#### Parameters + + + +#### Source + +[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) + +Line 78. + +*** + +### AddBullets + +AddBullets appends bullet points to the section. + +Python equivalent: Section.add\_bullets — the Python contract is to extend (not replace) the existing bullet list. + +#### Signature + +```go +func (*Section) AddBullets(bullets []string) +``` + +#### Parameters + + + +#### Source + +[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) + +Line 86. + +*** + +### AddSubsection + +AddSubsection creates and appends a subsection under this section. title must be non-empty (subsections always require a title). Returns the new \*Section so callers can keep building. + +Python equivalent: Section.add\_subsection + +#### Signature + +```go +func (*Section) AddSubsection(title string, opts ...SectionOption) (*Section, error) +``` + +#### Parameters + + + + + +#### Returns + +`(*Section, error)` + +#### Source + +[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) + +Line 95. + +*** + +### RenderMarkdown + +RenderMarkdown returns this section (and its subsections) as a Markdown string. level controls the starting heading level (default 2 == "##"); sectionNumber is the optional dotted prefix the section inherits when its parent is numbered. + +Python equivalent: Section.render\_markdown + +#### Signature + +```go +func (*Section) RenderMarkdown(level int, sectionNumber []int) string +``` + +#### Parameters + + + + + +#### Returns + +`string` + +#### Source + +[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) + +Line 196. + +*** + +### RenderXML + +RenderXML returns this section (and its subsections) as a chunk of XML. indent is the starting indent level (each level == 2 spaces). + +Python equivalent: Section.render\_xml + +#### Signature + +```go +func (*Section) RenderXML(indent int, sectionNumber []int) string +``` + +#### Parameters + + + + + +#### Returns + +`string` + +#### Source + +[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) + +Line 261. + +*** + +### ToMap + +ToMap returns the section as a map\[string]any with keys in canonical order (title, body, bullets, subsections, numbered, numberedBullets). Empty-or-zero fields are omitted to match Python's to\_dict behavior. + +The returned value is intended for JSON / YAML serialization; callers that need a plain Go map (and don't care about key order) can type-assert each value. + +Python equivalent: Section.to\_dict + +#### Signature + +```go +func (*Section) ToMap() map[string]any +``` + +#### Returns + +`map[string]any` + +#### Source + +[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) + +Line 136. + +## Source + +[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) + +Line 47. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/amenity/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/amenity/index.mdx new file mode 100644 index 0000000000..5f47f1b4db --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/amenity/index.mdx @@ -0,0 +1,37 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/amenity" +title: "Amenity" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/prefabs.Amenity" + parent: "github.com/signalwire/signalwire-go/pkg/prefabs" + module: "github.com.signalwire.signalwire-go.pkg.prefabs" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/concierge.go" +--- +# `Amenity` + +Amenity describes a venue amenity with its hours, location, and extra details. + +## Signature + +```go +type Amenity struct +``` + +## Properties + + + + + + + +## Source + +[`pkg/prefabs/concierge.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/concierge.go) + +Line 16. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/bedrock-agent/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/bedrock-agent/index.mdx new file mode 100644 index 0000000000..0fdf69411f --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/bedrock-agent/index.mdx @@ -0,0 +1,183 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/bedrock-agent" +title: "BedrockAgent" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/prefabs.BedrockAgent" + parent: "github.com/signalwire/signalwire-go/pkg/prefabs" + module: "github.com.signalwire.signalwire-go.pkg.prefabs" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/bedrock.go" +--- +# `BedrockAgent` + +BedrockAgent wraps AgentBase and configures it to emit the "amazon\_bedrock" SWML verb instead of the standard "ai" verb. + +The voice\_id, temperature, and top\_p values are injected into the rendered prompt config (matching Python's \_add\_voice\_to\_prompt). Keys that are text-model-specific (barge\_confidence, presence\_penalty, frequency\_penalty) are removed from the prompt config because they do not apply to Bedrock's voice-to-voice model. + +## Signature + +```go +type BedrockAgent struct +``` + +## Properties + + + +## Methods + +### SetInferenceParams + +SetInferenceParams updates one or more Bedrock inference parameters. Pass zero-value pointers to leave a parameter unchanged. + +Python equivalent: BedrockAgent.set\_inference\_params + +#### Signature + +```go +func (*BedrockAgent) SetInferenceParams(temperature float64, topP float64, maxTokens int) +``` + +#### Parameters + + + + + + + +#### Source + +[`pkg/prefabs/bedrock.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/bedrock.go) + +Line 183. + +*** + +### SetLLMModel + +SetLLMModel logs a warning and does nothing. Bedrock uses a fixed voice-to-voice model, so overriding the model name is not meaningful. + +Python equivalent: BedrockAgent.set\_llm\_model + +#### Signature + +```go +func (*BedrockAgent) SetLLMModel(model string) +``` + +#### Parameters + + + +#### Source + +[`pkg/prefabs/bedrock.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/bedrock.go) + +Line 201. + +*** + +### SetLLMTemperature + +SetLLMTemperature is a convenience wrapper that delegates to SetInferenceParams. + +Python equivalent: BedrockAgent.set\_llm\_temperature + +#### Signature + +```go +func (*BedrockAgent) SetLLMTemperature(temperature float64) +``` + +#### Parameters + + + +#### Source + +[`pkg/prefabs/bedrock.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/bedrock.go) + +Line 209. + +*** + +### SetPostPromptLLMParams + +SetPostPromptLLMParams logs a warning and ignores the parameters. Bedrock's post-prompt summarisation uses OpenAI configured at the platform level (in the C code), so SDK-level overrides have no effect. The keys of params are listed in the warning so the caller can see what was ignored. + +Python equivalent: BedrockAgent.set\_post\_prompt\_llm\_params + +#### Signature + +```go +func (*BedrockAgent) SetPostPromptLLMParams(params map[string]any) +``` + +#### Parameters + + + +#### Source + +[`pkg/prefabs/bedrock.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/bedrock.go) + +Line 220. + +*** + +### SetPromptLLMParams + +SetPromptLLMParams logs a warning directing the caller to SetInferenceParams instead. The keys of params are listed in the warning so the caller can see what was ignored. + +Python equivalent: BedrockAgent.set\_prompt\_llm\_params + +#### Signature + +```go +func (*BedrockAgent) SetPromptLLMParams(params map[string]any) +``` + +#### Parameters + + + +#### Source + +[`pkg/prefabs/bedrock.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/bedrock.go) + +Line 237. + +*** + +### SetVoice + +SetVoice sets the Bedrock voice ID. + +Python equivalent: BedrockAgent.set\_voice + +#### Signature + +```go +func (*BedrockAgent) SetVoice(voiceID string) +``` + +#### Parameters + + + +#### Source + +[`pkg/prefabs/bedrock.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/bedrock.go) + +Line 174. + +## Source + +[`pkg/prefabs/bedrock.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/bedrock.go) + +Line 58. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/bedrock-options/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/bedrock-options/index.mdx new file mode 100644 index 0000000000..7143e1cc76 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/bedrock-options/index.mdx @@ -0,0 +1,65 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/bedrock-options" +title: "BedrockOptions" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/prefabs.BedrockOptions" + parent: "github.com/signalwire/signalwire-go/pkg/prefabs" + module: "github.com.signalwire.signalwire-go.pkg.prefabs" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/bedrock.go" +--- +# `BedrockOptions` + +BedrockOptions configures a new BedrockAgent. + +BedrockAgent is the Go equivalent of the Python BedrockAgent class. It extends the standard agent infrastructure but renders the SWML document with the "amazon\_bedrock" verb instead of the default "ai" verb. All standard AgentBase capabilities (prompt, SWAIG tools, skills, post-prompt, dynamic config, etc.) work unchanged. + +## Signature + +```go +type BedrockOptions struct +``` + +## Properties + + + AgentOptions are functional options forwarded to NewAgentBase. Use them to set host, port, auth credentials, etc. + + + + MaxTokens is the maximum number of tokens to generate. Defaults to 1024. + + + + Name is the agent name. Defaults to "bedrock\_agent". + + + + Route is the HTTP route for the agent. Defaults to "/bedrock". + + + + SystemPrompt is an optional initial system prompt. It can be overridden later via SetPromptText. + + + + Temperature is the generation temperature (0–1). Defaults to 0.7. + + + + TopP is the nucleus-sampling parameter (0–1). Defaults to 0.9. + + + + VoiceID is the Bedrock voice identifier. Defaults to "matthew". + + +## Source + +[`pkg/prefabs/bedrock.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/bedrock.go) + +Line 21. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/concierge-agent/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/concierge-agent/index.mdx new file mode 100644 index 0000000000..c3b53df376 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/concierge-agent/index.mdx @@ -0,0 +1,33 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/concierge-agent" +title: "ConciergeAgent" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/prefabs.ConciergeAgent" + parent: "github.com/signalwire/signalwire-go/pkg/prefabs" + module: "github.com.signalwire.signalwire-go.pkg.prefabs" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/concierge.go" +--- +# `ConciergeAgent` + +ConciergeAgent acts as a virtual concierge for a venue, answering questions about amenities, services, hours, and directions. + +## Signature + +```go +type ConciergeAgent struct +``` + +## Properties + + + +## Source + +[`pkg/prefabs/concierge.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/concierge.go) + +Line 36. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/concierge-options/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/concierge-options/index.mdx new file mode 100644 index 0000000000..89c562d5d1 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/concierge-options/index.mdx @@ -0,0 +1,53 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/concierge-options" +title: "ConciergeOptions" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/prefabs.ConciergeOptions" + parent: "github.com/signalwire/signalwire-go/pkg/prefabs" + module: "github.com.signalwire.signalwire-go.pkg.prefabs" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/concierge.go" +--- +# `ConciergeOptions` + +ConciergeOptions configures a new ConciergeAgent. + +## Signature + +```go +type ConciergeOptions struct +``` + +## Properties + + + + + general hours of operation + + + + + + + + + + optional additional instructions appended to the default list + + + + + + optional static greeting spoken at the start of the call + + +## Source + +[`pkg/prefabs/concierge.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/concierge.go) + +Line 23. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/department/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/department/index.mdx new file mode 100644 index 0000000000..e4a2ada625 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/department/index.mdx @@ -0,0 +1,47 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/department" +title: "Department" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/prefabs.Department" + parent: "github.com/signalwire/signalwire-go/pkg/prefabs" + module: "github.com.signalwire.signalwire-go.pkg.prefabs" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/receptionist.go" +--- +# `Department` + +Department describes a destination the receptionist can transfer to. + +## Signature + +```go +type Department struct +``` + +## Properties + + + what the department handles + + + + e.g. "sales" + + + + phone number or SWML transfer destination + + + + true if Number is a SWML destination (uses SwmlTransfer) + + +## Source + +[`pkg/prefabs/receptionist.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/receptionist.go) + +Line 15. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/faq-bot-agent/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/faq-bot-agent/index.mdx new file mode 100644 index 0000000000..42fa220578 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/faq-bot-agent/index.mdx @@ -0,0 +1,33 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/faq-bot-agent" +title: "FAQBotAgent" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/prefabs.FAQBotAgent" + parent: "github.com/signalwire/signalwire-go/pkg/prefabs" + module: "github.com.signalwire.signalwire-go.pkg.prefabs" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/faq_bot.go" +--- +# `FAQBotAgent` + +FAQBotAgent answers frequently asked questions by matching user queries against a provided FAQ database. + +## Signature + +```go +type FAQBotAgent struct +``` + +## Properties + + + +## Source + +[`pkg/prefabs/faq_bot.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/faq_bot.go) + +Line 38. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/faq-bot-options/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/faq-bot-options/index.mdx new file mode 100644 index 0000000000..b0f2b648f4 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/faq-bot-options/index.mdx @@ -0,0 +1,47 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/faq-bot-options" +title: "FAQBotOptions" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/prefabs.FAQBotOptions" + parent: "github.com/signalwire/signalwire-go/pkg/prefabs" + module: "github.com.signalwire.signalwire-go.pkg.prefabs" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/faq_bot.go" +--- +# `FAQBotOptions` + +FAQBotOptions configures a new FAQBotAgent. + +## Signature + +```go +type FAQBotOptions struct +``` + +## Properties + + + AgentOptions holds additional functional options forwarded to NewAgentBase, matching the \*\*kwargs pass-through in the Python SDK. + + + + + + + + + + + + SuggestRelated controls whether the agent suggests related questions. Defaults to true when nil, matching the Python SDK default. + + +## Source + +[`pkg/prefabs/faq_bot.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/faq_bot.go) + +Line 23. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/faq/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/faq/index.mdx new file mode 100644 index 0000000000..df9351c5c4 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/faq/index.mdx @@ -0,0 +1,37 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/faq" +title: "FAQ" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/prefabs.FAQ" + parent: "github.com/signalwire/signalwire-go/pkg/prefabs" + module: "github.com.signalwire.signalwire-go.pkg.prefabs" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/faq_bot.go" +--- +# `FAQ` + +FAQ represents a single frequently asked question and its answer. + +## Signature + +```go +type FAQ struct +``` + +## Properties + + + + + + + +## Source + +[`pkg/prefabs/faq_bot.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/faq_bot.go) + +Line 16. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/index.mdx new file mode 100644 index 0000000000..6aa529acb6 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/index.mdx @@ -0,0 +1,428 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs" +title: "prefabs" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "module" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/prefabs" + module: "github.com.signalwire.signalwire-go.pkg.prefabs" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/bedrock.go" +--- +# `prefabs` + +Package prefabs provides pre-built agent patterns that extend AgentBase with common conversational workflows such as information gathering, surveys, reception/routing, FAQ answering, and virtual concierge services. + +## Signature + +```go +package prefabs +``` + +## Classes + + + + Amenity describes a venue amenity with its hours, location, and extra details. + + + + BedrockAgent wraps AgentBase and configures it to emit the "amazon\_bedrock" SWML verb instead of the standard "ai" verb. + + + + BedrockOptions configures a new BedrockAgent. + + + + ConciergeAgent acts as a virtual concierge for a venue, answering questions about amenities, services, hours, and directions. + + + + ConciergeOptions configures a new ConciergeAgent. + + + + Department describes a destination the receptionist can transfer to. + + + + FAQ represents a single frequently asked question and its answer. + + + + FAQBotAgent answers frequently asked questions by matching user queries against a provided FAQ database. + + + + FAQBotOptions configures a new FAQBotAgent. + + + + InfoGathererAgent collects answers to a series of questions sequentially. Supports both static (questions provided at construction) and dynamic (questions determined per-request via SetQuestionCallback) modes. + + + + InfoGathererOptions configures a new InfoGathererAgent. Set Questions to nil to enable dynamic callback mode via SetQuestionCallback. + + + + Question describes a single question in an InfoGatherer sequence. + + + + ReceptionistAgent greets callers and routes them to the appropriate department. + + + + ReceptionistOptions configures a new ReceptionistAgent. + + + + SurveyAgent conducts structured surveys with typed questions. + + + + SurveyOptions configures a new SurveyAgent. + + + + SurveyQuestion describes a single question in a survey. + + + +## Functions + +### NewBedrockAgent + +NewBedrockAgent creates a BedrockAgent with Bedrock-specific SWML rendering. + +Python equivalent: BedrockAgent.**init** + +#### Signature + +```go +func NewBedrockAgent(opts BedrockOptions) *BedrockAgent +``` + +#### Parameters + + + +#### Returns + +`*BedrockAgent` + +#### Source + +[`pkg/prefabs/bedrock.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/bedrock.go) + +Line 75. + +*** + +### NewConciergeAgent + +NewConciergeAgent creates an agent that provides concierge services for a venue. + +#### Signature + +```go +func NewConciergeAgent(opts ConciergeOptions) *ConciergeAgent +``` + +#### Parameters + + + +#### Returns + +`*ConciergeAgent` + +#### Source + +[`pkg/prefabs/concierge.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/concierge.go) + +Line 49. + +*** + +### NewFAQBotAgent + +NewFAQBotAgent creates an agent that answers frequently asked questions. + +#### Signature + +```go +func NewFAQBotAgent(opts FAQBotOptions) *FAQBotAgent +``` + +#### Parameters + + + +#### Returns + +`*FAQBotAgent` + +#### Source + +[`pkg/prefabs/faq_bot.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/faq_bot.go) + +Line 49. + +*** + +### NewInfoGathererAgent + +NewInfoGathererAgent creates an agent that asks a series of questions and stores the answers in global data. Pass nil Questions to enable dynamic mode; call SetQuestionCallback on the returned agent to supply per-request questions. + +#### Signature + +```go +func NewInfoGathererAgent(opts InfoGathererOptions) *InfoGathererAgent +``` + +#### Parameters + + + +#### Returns + +`*InfoGathererAgent` + +#### Source + +[`pkg/prefabs/info_gatherer.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/info_gatherer.go) + +Line 49. + +*** + +### NewReceptionistAgent + +NewReceptionistAgent creates an agent that greets callers and transfers them to the appropriate department. + +#### Signature + +```go +func NewReceptionistAgent(opts ReceptionistOptions) *ReceptionistAgent +``` + +#### Parameters + + + +#### Returns + +`*ReceptionistAgent` + +#### Source + +[`pkg/prefabs/receptionist.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/receptionist.go) + +Line 43. + +*** + +### NewSurveyAgent + +NewSurveyAgent creates an agent that conducts a structured survey. + +#### Signature + +```go +func NewSurveyAgent(opts SurveyOptions) *SurveyAgent +``` + +#### Parameters + + + +#### Returns + +`*SurveyAgent` + +#### Source + +[`pkg/prefabs/survey.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/survey.go) + +Line 104. + +*** + +### NewSurveyQuestion + +NewSurveyQuestion constructs a SurveyQuestion with Required:true, matching Python SurveyAgent.\_validate\_questions which defaults required=True when unspecified. Callers opt out with WithOptional(). + +#### Signature + +```go +func NewSurveyQuestion(text string, opts ...SurveyQuestionOption) SurveyQuestion +``` + +#### Parameters + + + + + +#### Returns + +`SurveyQuestion` + +#### Source + +[`pkg/prefabs/survey.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/survey.go) + +Line 65. + +*** + +### WithOptional + +WithOptional marks a question as not required. Matches Python's required=False escape hatch on SurveyAgent questions. + +#### Signature + +```go +func WithOptional() SurveyQuestionOption +``` + +#### Returns + +`SurveyQuestionOption` + +#### Source + +[`pkg/prefabs/survey.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/survey.go) + +Line 58. + +*** + +### WithQuestionChoices + +WithQuestionChoices sets the choice list for multiple\_choice questions. + +#### Signature + +```go +func WithQuestionChoices(choices ...string) SurveyQuestionOption +``` + +#### Parameters + + + +#### Returns + +`SurveyQuestionOption` + +#### Source + +[`pkg/prefabs/survey.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/survey.go) + +Line 52. + +*** + +### WithQuestionID + +WithQuestionID sets the question ID. + +#### Signature + +```go +func WithQuestionID(id string) SurveyQuestionOption +``` + +#### Parameters + + + +#### Returns + +`SurveyQuestionOption` + +#### Source + +[`pkg/prefabs/survey.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/survey.go) + +Line 36. + +*** + +### WithQuestionScale + +WithQuestionScale sets the scale for rating questions (answers run 1..n). + +#### Signature + +```go +func WithQuestionScale(n int) SurveyQuestionOption +``` + +#### Parameters + + + +#### Returns + +`SurveyQuestionOption` + +#### Source + +[`pkg/prefabs/survey.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/survey.go) + +Line 47. + +*** + +### WithQuestionType + +WithQuestionType sets the question type ("rating", "multiple\_choice", "yes\_no", "open\_ended"). + +#### Signature + +```go +func WithQuestionType(t string) SurveyQuestionOption +``` + +#### Parameters + + + +#### Returns + +`SurveyQuestionOption` + +#### Source + +[`pkg/prefabs/survey.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/survey.go) + +Line 42. + +## Type Aliases + +### SurveyQuestionOption + +SurveyQuestionOption configures a question during construction. + +#### Signature + +```go +type SurveyQuestionOption alias +``` + +#### Source + +[`pkg/prefabs/survey.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/survey.go) + +Line 33. + +## Source + +[`pkg/prefabs/bedrock.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/bedrock.go) diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/info-gatherer-agent/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/info-gatherer-agent/index.mdx new file mode 100644 index 0000000000..67d51b7cb1 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/info-gatherer-agent/index.mdx @@ -0,0 +1,96 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/info-gatherer-agent" +title: "InfoGathererAgent" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/prefabs.InfoGathererAgent" + parent: "github.com/signalwire/signalwire-go/pkg/prefabs" + module: "github.com.signalwire.signalwire-go.pkg.prefabs" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/info_gatherer.go" +--- +# `InfoGathererAgent` + +InfoGathererAgent collects answers to a series of questions sequentially. Supports both static (questions provided at construction) and dynamic (questions determined per-request via SetQuestionCallback) modes. + +## Signature + +```go +type InfoGathererAgent struct +``` + +## Properties + + + +## Methods + +### SetQuestionCallback + +SetQuestionCallback registers a per-request callback that returns the list of questions to ask. Calling this method enables dynamic mode: on each SWML request the callback is invoked with the request's query parameters, body parameters, and headers; the returned \[]Question becomes the session's question list. This mirrors Python's InfoGathererAgent.set\_question\_callback. + +If Questions was set to nil in InfoGathererOptions (dynamic mode), a fallback question set is used when no callback is registered. + +Example: + +``` +ig.SetQuestionCallback(func(query, body map[string]any, headers map[string]string) []Question { + if body["department"] == "support" { + return []Question{{KeyName: "issue", QuestionText: "What is the issue?"}} + } + return []Question{{KeyName: "name", QuestionText: "What is your name?"}} +}) +``` + +#### Signature + +```go +func (*InfoGathererAgent) SetQuestionCallback( + cb func(queryParams map[string]string, bodyParams map[string]any, headers map[string]string) []Question +) +``` + +#### Parameters + + + +#### Examples + + + + ```go + ig.SetQuestionCallback(func(query, body map[string]any, headers map[string]string) []Question { + if body["department"] == "support" { + return []Question{{KeyName: "issue", QuestionText: "What is the issue?"}} + } + return []Question{{KeyName: "name", QuestionText: "What is your name?"}} + }) + ``` + + + + ```go + ig.SetQuestionCallback(func(query, body map[string]any, headers map[string]string) []Question { + if body["department"] == "support" { + return []Question{{KeyName: "issue", QuestionText: "What is the issue?"}} + } + return []Question{{KeyName: "name", QuestionText: "What is your name?"}} + }) + ``` + + + +#### Source + +[`pkg/prefabs/info_gatherer.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/info_gatherer.go) + +Line 135. + +## Source + +[`pkg/prefabs/info_gatherer.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/info_gatherer.go) + +Line 36. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/info-gatherer-options/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/info-gatherer-options/index.mdx new file mode 100644 index 0000000000..e6fc3999b2 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/info-gatherer-options/index.mdx @@ -0,0 +1,39 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/info-gatherer-options" +title: "InfoGathererOptions" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/prefabs.InfoGathererOptions" + parent: "github.com/signalwire/signalwire-go/pkg/prefabs" + module: "github.com.signalwire.signalwire-go.pkg.prefabs" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/info_gatherer.go" +--- +# `InfoGathererOptions` + +InfoGathererOptions configures a new InfoGathererAgent. Set Questions to nil to enable dynamic callback mode via SetQuestionCallback. + +## Signature + +```go +type InfoGathererOptions struct +``` + +## Properties + + + + + nil enables dynamic callback mode; non-nil is static mode + + + + +## Source + +[`pkg/prefabs/info_gatherer.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/info_gatherer.go) + +Line 27. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/question/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/question/index.mdx new file mode 100644 index 0000000000..795dab5e05 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/question/index.mdx @@ -0,0 +1,43 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/question" +title: "Question" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/prefabs.Question" + parent: "github.com/signalwire/signalwire-go/pkg/prefabs" + module: "github.com.signalwire.signalwire-go.pkg.prefabs" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/info_gatherer.go" +--- +# `Question` + +Question describes a single question in an InfoGatherer sequence. + +## Signature + +```go +type Question struct +``` + +## Properties + + + if true the agent will confirm before accepting + + + + identifier used to store the answer + + + + the question to ask the user + + +## Source + +[`pkg/prefabs/info_gatherer.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/info_gatherer.go) + +Line 19. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/receptionist-agent/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/receptionist-agent/index.mdx new file mode 100644 index 0000000000..c81ff12ade --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/receptionist-agent/index.mdx @@ -0,0 +1,33 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/receptionist-agent" +title: "ReceptionistAgent" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/prefabs.ReceptionistAgent" + parent: "github.com/signalwire/signalwire-go/pkg/prefabs" + module: "github.com.signalwire.signalwire-go.pkg.prefabs" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/receptionist.go" +--- +# `ReceptionistAgent` + +ReceptionistAgent greets callers and routes them to the appropriate department. + +## Signature + +```go +type ReceptionistAgent struct +``` + +## Properties + + + +## Source + +[`pkg/prefabs/receptionist.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/receptionist.go) + +Line 32. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/receptionist-options/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/receptionist-options/index.mdx new file mode 100644 index 0000000000..0bb3bfbde4 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/receptionist-options/index.mdx @@ -0,0 +1,43 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/receptionist-options" +title: "ReceptionistOptions" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/prefabs.ReceptionistOptions" + parent: "github.com/signalwire/signalwire-go/pkg/prefabs" + module: "github.com.signalwire.signalwire-go.pkg.prefabs" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/receptionist.go" +--- +# `ReceptionistOptions` + +ReceptionistOptions configures a new ReceptionistAgent. + +## Signature + +```go +type ReceptionistOptions struct +``` + +## Properties + + + + + + + + + + + Voice ID for TTS (default: "rime.spore") + + +## Source + +[`pkg/prefabs/receptionist.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/receptionist.go) + +Line 23. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/survey-agent/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/survey-agent/index.mdx new file mode 100644 index 0000000000..3bc3655ec5 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/survey-agent/index.mdx @@ -0,0 +1,33 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/survey-agent" +title: "SurveyAgent" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/prefabs.SurveyAgent" + parent: "github.com/signalwire/signalwire-go/pkg/prefabs" + module: "github.com.signalwire.signalwire-go.pkg.prefabs" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/survey.go" +--- +# `SurveyAgent` + +SurveyAgent conducts structured surveys with typed questions. + +## Signature + +```go +type SurveyAgent struct +``` + +## Properties + + + +## Source + +[`pkg/prefabs/survey.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/survey.go) + +Line 89. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/survey-options/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/survey-options/index.mdx new file mode 100644 index 0000000000..9a65bdb979 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/survey-options/index.mdx @@ -0,0 +1,47 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/survey-options" +title: "SurveyOptions" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/prefabs.SurveyOptions" + parent: "github.com/signalwire/signalwire-go/pkg/prefabs" + module: "github.com.signalwire.signalwire-go.pkg.prefabs" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/survey.go" +--- +# `SurveyOptions` + +SurveyOptions configures a new SurveyAgent. + +## Signature + +```go +type SurveyOptions struct +``` + +## Properties + + + + + + + + + + + + + + + + + +## Source + +[`pkg/prefabs/survey.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/survey.go) + +Line 77. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/survey-question/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/survey-question/index.mdx new file mode 100644 index 0000000000..d1ac512c20 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/survey-question/index.mdx @@ -0,0 +1,57 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/survey-question" +title: "SurveyQuestion" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/prefabs.SurveyQuestion" + parent: "github.com/signalwire/signalwire-go/pkg/prefabs" + module: "github.com.signalwire.signalwire-go.pkg.prefabs" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/survey.go" +--- +# `SurveyQuestion` + +SurveyQuestion describes a single question in a survey. + +Prefer NewSurveyQuestion for construction — it defaults Required:true to match Python SurveyAgent behavior (signalwire/prefabs/survey.py \_validate\_questions sets required=True when unspecified). Struct literals are still supported, but the Go zero value for Required is false, which diverges from Python. + +## Signature + +```go +type SurveyQuestion struct +``` + +## Properties + + + options for multiple\_choice questions + + + + unique question identifier + + + + whether a non-empty answer is required — Python default true + + + + 1..Scale for rating questions (default 5) + + + + the question to ask + + + + "rating", "multiple\_choice", "yes\_no", "open\_ended" + + +## Source + +[`pkg/prefabs/survey.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/survey.go) + +Line 23. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/action/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/action/index.mdx new file mode 100644 index 0000000000..7a65371460 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/action/index.mdx @@ -0,0 +1,165 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/action" +title: "Action" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.Action" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "github.com.signalwire.signalwire-go.pkg.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go" +--- +# `Action` + +Action represents a long-running operation on a call, such as playing audio, recording, or collecting input. Callers can Wait for completion, check status, or register a completion callback. + +## Signature + +```go +type Action struct +``` + +## Methods + +### Completed + +Completed returns whether the action finished. + +#### Signature + +```go +func (*Action) Completed() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 93. + +*** + +### ControlID + +ControlID returns the control identifier for this action. + +#### Signature + +```go +func (*Action) ControlID() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 62. + +*** + +### IsDone + +IsDone returns true if the action has completed. + +#### Signature + +```go +func (*Action) IsDone() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 79. + +*** + +### OnCompleted + +OnCompleted registers a callback invoked when the action completes. + +#### Signature + +```go +func (*Action) OnCompleted(fn func(*RelayEvent)) +``` + +#### Parameters + + + +#### Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 98. + +*** + +### Result + +Result returns the final event that resolved this action, or nil if pending. + +#### Signature + +```go +func (*Action) Result() *RelayEvent +``` + +#### Returns + +`*RelayEvent` + +#### Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 86. + +*** + +### Wait + +Wait blocks until the action completes or the context is cancelled. + +#### Signature + +```go +func (*Action) Wait(ctx context.Context) (*RelayEvent, error) +``` + +#### Parameters + + + +#### Returns + +`(*RelayEvent, error)` + +#### Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 67. + +## Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 12. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/ai-action/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/ai-action/index.mdx new file mode 100644 index 0000000000..9baa060c7f --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/ai-action/index.mdx @@ -0,0 +1,55 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/ai-action" +title: "AIAction" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.AIAction" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "github.com.signalwire.signalwire-go.pkg.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go" +--- +# `AIAction` + +AIAction represents a long-running AI operation on a call. + +## Signature + +```go +type AIAction struct +``` + +## Properties + + + +## Methods + +### Stop + +Stop sends calling.ai.stop to halt the active AI session. + +#### Signature + +```go +func (*AIAction) Stop() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 533. + +## Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 521. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/ai-event/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/ai-event/index.mdx new file mode 100644 index 0000000000..62bd5a3e1f --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/ai-event/index.mdx @@ -0,0 +1,39 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/ai-event" +title: "AIEvent" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.AIEvent" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "github.com.signalwire.signalwire-go.pkg.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" +--- +# `AIEvent` + +AIEvent represents a calling.call.ai event. + +## Signature + +```go +type AIEvent struct +``` + +## Properties + + + + + + + + + +## Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 817. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/call-receive-event/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/call-receive-event/index.mdx new file mode 100644 index 0000000000..bfc7b9fd94 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/call-receive-event/index.mdx @@ -0,0 +1,51 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/call-receive-event" +title: "CallReceiveEvent" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.CallReceiveEvent" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "github.com.signalwire.signalwire-go.pkg.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" +--- +# `CallReceiveEvent` + +CallReceiveEvent represents a calling.call.receive event for inbound calls. + +## Signature + +```go +type CallReceiveEvent struct +``` + +## Properties + + + + + + + + + + + + + + + + + + + + + +## Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 226. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/call-state-event/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/call-state-event/index.mdx new file mode 100644 index 0000000000..c8f25d0355 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/call-state-event/index.mdx @@ -0,0 +1,47 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/call-state-event" +title: "CallStateEvent" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.CallStateEvent" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "github.com.signalwire.signalwire-go.pkg.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" +--- +# `CallStateEvent` + +CallStateEvent represents a calling.call.state event. + +## Signature + +```go +type CallStateEvent struct +``` + +## Properties + + + + + + + + + + + + + + + + + +## Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 199. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/call/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/call/index.mdx new file mode 100644 index 0000000000..0d651780c8 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/call/index.mdx @@ -0,0 +1,1819 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/call" +title: "Call" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.Call" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "github.com.signalwire.signalwire-go.pkg.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go" +--- +# `Call` + +Call represents an active voice call managed through the RELAY client. It exposes methods for every calling operation supported by SignalWire, grouped into logical categories: lifecycle, audio, recording, bridging, DTMF, detection, fax, tap, streaming, conferencing, AI, hold/denoise, room/queue, pay, and transcription. + +## Signature + +```go +type Call struct +``` + +## Methods + +### AI + +AI starts an AI session on the call. Use WithAIControlID for an explicit control\_id (matches Python's ai(control\_id=...)). + +#### Signature + +```go +func (*Call) AI(opts ...AIOption) *AIAction +``` + +#### Parameters + + + +#### Returns + +`*AIAction` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 1178. + +*** + +### AIHold + +AIHold places the AI-controlled call on hold. controlID, timeout and prompt are all optional — pass "" to omit any of them, matching Python's ai\_hold(\*, timeout: Optional\[str] = None, prompt: Optional\[str] = None) which has no control\_id parameter and only writes keys conditionally. + +#### Signature + +```go +func (*Call) AIHold(controlID string, timeout string, prompt string) error +``` + +#### Parameters + + + + + + + +#### Returns + +`error` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 1249. + +*** + +### AIMessage + +AIMessage sends a text message within an active AI session. All parameters are optional, matching Python's ai\_message(\*, message\_text=None, role=None, reset=None, global\_data=None). Pass "" for controlID/text/role and nil for reset/globalData to omit them from the wire payload (Python omits the key entirely when the argument is None). + +#### Signature + +```go +func (*Call) AIMessage( + controlID string, + text string, + role string, + reset map[string]any, + globalData map[string]any +) error +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`error` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 1221. + +*** + +### AIUnhold + +AIUnhold removes the call from AI hold. controlID and prompt are both optional — pass "" to omit either, matching Python's ai\_unhold(\*, prompt: Optional\[str] = None) which has no control\_id parameter and only writes keys conditionally. + +#### Signature + +```go +func (*Call) AIUnhold(controlID string, prompt string) error +``` + +#### Parameters + + + + + +#### Returns + +`error` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 1271. + +*** + +### AmazonBedrock + +AmazonBedrock starts an AI session using Amazon Bedrock. + +#### Signature + +```go +func (*Call) AmazonBedrock(opts ...AIOption) *AIAction +``` + +#### Parameters + + + +#### Returns + +`*AIAction` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 1211. + +*** + +### Answer + +Answer answers an inbound call. + +#### Signature + +```go +func (*Call) Answer() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 320. + +*** + +### BindDigit + +BindDigit binds a DTMF digit sequence to trigger a RELAY method. bindParams, realm, and maxTriggers are optional (nil/zero-value omits them), matching Python's bind\_digit(digits, bind\_method, \*, bind\_params, realm, max\_triggers). + +#### Signature + +```go +func (*Call) BindDigit( + digits string, + method string, + bindParams map[string]any, + realm string, + maxTriggers int +) error +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`error` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 1400. + +*** + +### CallID + +CallID returns the unique call identifier assigned by the server. + +#### Signature + +```go +func (*Call) CallID() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 55. + +*** + +### CallState + +CallState returns the current call state as a typed CallState ALONGSIDE the bare-string State() accessor (kept for parity with the Python reference). The typed kind gives callers IsTerminal()/IsKnown() predicates and compile-time distinctness from DialState/MessageState; its underlying string equals State() exactly. Additive port idiom — see states.go and PORT\_ADDITIONS.md. + +#### Signature + +```go +func (*Call) CallState() CallState +``` + +#### Returns + +`CallState` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 76. + +*** + +### ClearDigitBindings + +ClearDigitBindings clears all DTMF digit bindings, optionally filtered by realm. Pass an empty string to clear all realms (matches Python's clear\_digit\_bindings(\*, realm)). + +#### Signature + +```go +func (*Call) ClearDigitBindings(realm string) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 1423. + +*** + +### Collect + +Collect starts collecting user input without playing media. The params argument exposes named fields that mirror Python's collect() parameters at relay/call.py:565. Pass a nil CollectParams to send an empty collect body. + +Wire shape (matches Python): + +``` +{"node_id":..., "call_id":..., "control_id":..., "digits":..., "speech":..., ...} +``` + +#### Signature + +```go +func (*Call) Collect(params *CollectParams) *StandaloneCollectAction +``` + +#### Parameters + + + +#### Returns + +`*StandaloneCollectAction` + +#### Examples + + + + ```go + {"node_id":..., "call_id":..., "control_id":..., "digits":..., "speech":..., ...} + ``` + + + + ```go + {"node_id":..., "call_id":..., "control_id":..., "digits":..., "speech":..., ...} + ``` + + + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 558. + +*** + +### Connect + +Connect bridges this call to one or more devices. + +#### Signature + +```go +func (*Call) Connect(devices [][]map[string]any, opts ...ConnectOption) error +``` + +#### Parameters + + + + + +#### Returns + +`error` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 906. + +*** + +### Context + +Context returns the RELAY context this call was received on. + +#### Signature + +```go +func (*Call) Context() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 90. + +*** + +### Denoise + +Denoise starts noise reduction on the call. + +#### Signature + +```go +func (*Call) Denoise() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 1309. + +*** + +### DenoiseStop + +DenoiseStop stops noise reduction on the call. + +#### Signature + +```go +func (*Call) DenoiseStop() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 1318. + +*** + +### Detect + +Detect starts a detection operation (e.g., answering machine detection). timeout is optional; pass nil to omit it from the request (matches Python's optional float timeout parameter). + +controlID is optional — pass "" to auto-generate. Matches Python's detect(\*, control\_id=None) at relay/call.py:654. + +#### Signature + +```go +func (*Call) Detect(detect map[string]any, timeout *float64, controlID ...string) *DetectAction +``` + +#### Parameters + + + + + + + +#### Returns + +`*DetectAction` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 954. + +*** + +### DetectAnsweringMachine + +DetectAnsweringMachine detects human vs answering machine (AMD). Typed convenience over Detect, mirroring Python's call.detect\_answering\_machine(\*, initial\_timeout, end\_silence\_timeout, machine\_voice\_threshold, machine\_words\_threshold, detect\_interruptions, detect\_message\_end, timeout). Only the options the caller supplies are emitted under params, matching Python's only-provided-keys behavior. + +Wire shape: detect \{"type":"machine","params":\{...only-provided...\}\} with an optional top-level timeout. + +#### Signature + +```go +func (*Call) DetectAnsweringMachine(opts ...AMDOption) *DetectAction +``` + +#### Parameters + + + +#### Returns + +`*DetectAction` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 732. + +*** + +### DetectDigit + +DetectDigit detects DTMF digits. Typed convenience over Detect, mirroring Python's call.detect\_digit(\*, digits, timeout). + +Wire shape: detect \{"type":"digit","params":\{digits?\}\} with an optional top-level timeout. + +#### Signature + +```go +func (*Call) DetectDigit(opts ...DetectDigitOption) *DetectAction +``` + +#### Parameters + + + +#### Returns + +`*DetectAction` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 706. + +*** + +### DetectFax + +DetectFax detects a fax tone (CED/CNG). Typed convenience over Detect, mirroring Python's call.detect\_fax(\*, tone, timeout). + +Wire shape: detect \{"type":"fax","params":\{tone?\}\} with an optional top-level timeout. + +#### Signature + +```go +func (*Call) DetectFax(opts ...DetectFaxOption) *DetectAction +``` + +#### Parameters + + + +#### Returns + +`*DetectAction` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 759. + +*** + +### Device + +Device returns the device map describing the endpoint of this call. + +#### Signature + +```go +func (*Call) Device() map[string]any +``` + +#### Returns + +`map[string]any` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 104. + +*** + +### Direction + +Direction returns the call direction ("inbound" or "outbound"). + +#### Signature + +```go +func (*Call) Direction() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 97. + +*** + +### Disconnect + +Disconnect tears down a previously established bridge. + +#### Signature + +```go +func (*Call) Disconnect() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 920. + +*** + +### Echo + +Echo starts echo mode on the call (echo audio back to the caller). Both timeout and statusURL are optional (nil omits them), matching Python's echo(\*, timeout: float|None, status\_url). + +#### Signature + +```go +func (*Call) Echo(timeout *float64, statusURL string) error +``` + +#### Parameters + + + + + +#### Returns + +`error` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 1461. + +*** + +### Hangup + +Hangup ends the call with the given reason. + +#### Signature + +```go +func (*Call) Hangup(reason string) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 329. + +*** + +### Hold + +Hold places the call on hold. + +#### Signature + +```go +func (*Call) Hold() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 1291. + +*** + +### JoinConference + +JoinConference joins the call to a named conference. + +#### Signature + +```go +func (*Call) JoinConference(name string, opts ...ConferenceOption) error +``` + +#### Parameters + + + + + +#### Returns + +`error` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 1149. + +*** + +### JoinRoom + +JoinRoom joins the call to a named room. statusURL is optional (empty string omits it), matching Python's join\_room(name, \*, status\_url). + +#### Signature + +```go +func (*Call) JoinRoom(name string, statusURL string) error +``` + +#### Parameters + + + + + +#### Returns + +`error` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 1332. + +*** + +### LeaveConference + +LeaveConference removes the call from a conference. + +#### Signature + +```go +func (*Call) LeaveConference(confID string) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 1163. + +*** + +### LeaveRoom + +LeaveRoom removes the call from the current room. + +#### Signature + +```go +func (*Call) LeaveRoom() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 1346. + +*** + +### LiveTranscribe + +LiveTranscribe starts or stops live transcription on the call. The action map describes the transcription operation (e.g. \{"type": "start"\}). Matches Python's live\_transcribe(action, \*\*kwargs). + +#### Signature + +```go +func (*Call) LiveTranscribe(action map[string]any) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 389. + +*** + +### LiveTranslate + +LiveTranslate starts or stops live translation on the call. The action map describes the translation operation. statusURL is optional (empty string omits it), matching Python's live\_translate(action, \*, status\_url). + +#### Signature + +```go +func (*Call) LiveTranslate(action map[string]any, statusURL string) error +``` + +#### Parameters + + + + + +#### Returns + +`error` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 401. + +*** + +### NodeID + +NodeID returns the node handling this call. + +#### Signature + +```go +func (*Call) NodeID() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 58. + +*** + +### On + +On registers a handler for a specific event type on this call. + +#### Signature + +```go +func (*Call) On(eventType string, handler func(*RelayEvent)) +``` + +#### Parameters + + + + + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 122. + +*** + +### Pass + +Pass passes the call to the next context handler without answering. + +#### Signature + +```go +func (*Call) Pass() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 342. + +*** + +### Pay + +Pay starts a payment collection session on the call. Use PayOption functional options to supply any of the 20+ optional parameters that Python's pay() exposes (input\_method, status\_url, payment\_method, timeout, max\_attempts, security\_code, postal\_code, min\_postal\_code\_length, token\_type, charge\_amount, currency, language, voice, description, valid\_card\_types, parameters, prompts). + +Use WithPayControlID for an explicit control\_id (matches Python's pay(control\_id=...)). + +#### Signature + +```go +func (*Call) Pay(connectorURL string, opts ...PayOption) *PayAction +``` + +#### Parameters + + + + + +#### Returns + +`*PayAction` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 1489. + +*** + +### Play + +Play starts playing media on the call and returns a PlayAction. + +Use WithPlayControlID to supply an explicit control\_id (mirrors Python's play(control\_id=...)). When omitted the SDK auto-generates a UUID — same as Python's `cid = control_id or str(uuid.uuid4())` at relay/call.py:506. + +#### Signature + +```go +func (*Call) Play(media []map[string]any, opts ...PlayOption) *PlayAction +``` + +#### Parameters + + + + + +#### Returns + +`*PlayAction` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 424. + +*** + +### PlayAndCollect + +PlayAndCollect plays media while collecting input (DTMF or speech). + +Honors WithPlayControlID for an explicit control\_id (mirrors Python's play\_and\_collect(control\_id=...)). Note the gotcha at RELAY\_IMPLEMENTATION\_GUIDE.md: this action listens on the calling.call.collect terminal event, NOT calling.call.play(finished). + +#### Signature + +```go +func (*Call) PlayAndCollect( + media []map[string]any, + collect map[string]any, + opts ...PlayOption +) *CollectAction +``` + +#### Parameters + + + + + + + +#### Returns + +`*CollectAction` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 478. + +*** + +### PlayAudio + +PlayAudio plays an audio file from a URL. Typed convenience over Play, mirroring Python's call.play\_audio(url, \*, volume). + +Wire shape: play \[\{"type":"audio","params":\{"url":...\}\}] with an optional top-level volume. + +#### Signature + +```go +func (*Call) PlayAudio(url string, opts ...AudioOption) *PlayAction +``` + +#### Parameters + + + + + +#### Returns + +`*PlayAction` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 657. + +*** + +### PlayRingtone + +PlayRingtone plays a named ringtone by country code. Typed convenience over Play, mirroring Python's call.play\_ringtone(name, \*, duration, volume). + +Wire shape: play \[\{"type":"ringtone","params":\{"name":..., duration?\}\}] with an optional top-level volume. + +#### Signature + +```go +func (*Call) PlayRingtone(name string, opts ...RingtoneOption) *PlayAction +``` + +#### Parameters + + + + + +#### Returns + +`*PlayAction` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 684. + +*** + +### PlaySilence + +PlaySilence plays silence for duration seconds. Typed convenience over Play, mirroring Python's call.play\_silence(duration). + +Wire shape: play \[\{"type":"silence","params":\{"duration":...\}\}]. + +#### Signature + +```go +func (*Call) PlaySilence(duration float64) *PlayAction +``` + +#### Parameters + + + +#### Returns + +`*PlayAction` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 674. + +*** + +### PlayTTS + +PlayTTS plays text-to-speech. Typed convenience over Play, mirroring Python's call.play\_tts(text, \*, language, gender, voice, volume). + +Wire shape: play \[\{"type":"tts","params":\{"text":..., language?, gender?, voice?\}\}] with an optional top-level volume. + +#### Signature + +```go +func (*Call) PlayTTS(text string, opts ...TTSOption) *PlayAction +``` + +#### Parameters + + + + + +#### Returns + +`*PlayAction` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 629. + +*** + +### ProjectID + +ProjectID returns the project ID associated with this call. + +#### Signature + +```go +func (*Call) ProjectID() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 83. + +*** + +### PromptAudio + +PromptAudio plays an audio file then collects input. Typed media over PlayAndCollect, mirroring Python's call.prompt\_audio(url, collect, \*, volume). + +Wire shape: play\_and\_collect \[\{"type":"audio","params":\{"url":...\}\}] with the given collect object and an optional top-level volume. + +#### Signature + +```go +func (*Call) PromptAudio(url string, collect map[string]any, opts ...AudioOption) *CollectAction +``` + +#### Parameters + + + + + + + +#### Returns + +`*CollectAction` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 812. + +*** + +### PromptTTS + +PromptTTS plays TTS then collects input. Typed media over PlayAndCollect, mirroring Python's call.prompt\_tts(text, collect, \*, language, gender, voice, volume). + +Wire shape: play\_and\_collect \[\{"type":"tts","params":\{"text":..., language?, gender?, voice?\}\}] with the given collect object and an optional top-level volume. + +#### Signature + +```go +func (*Call) PromptTTS(text string, collect map[string]any, opts ...TTSOption) *CollectAction +``` + +#### Parameters + + + + + + + +#### Returns + +`*CollectAction` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 783. + +*** + +### QueueEnter + +QueueEnter places the call in a named queue. statusURL is optional (empty string omits it), matching Python's queue\_enter(queue\_name, \*, control\_id, status\_url) at signalwire/relay/call.py:1268. A per-request control\_id is generated so the server can correlate this action with subsequent events. + +#### Signature + +```go +func (*Call) QueueEnter(name string, statusURL string) error +``` + +#### Parameters + + + + + +#### Returns + +`error` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 1358. + +*** + +### QueueLeave + +QueueLeave removes the call from the named queue. queueID and statusURL are optional (empty string omits each), matching Python's queue\_leave(queue\_name, \*, control\_id, queue\_id, status\_url) at signalwire/relay/call.py:1287. A per-request control\_id is generated. + +#### Signature + +```go +func (*Call) QueueLeave(name string, queueID string, statusURL string) error +``` + +#### Parameters + + + + + + + +#### Returns + +`error` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 1376. + +*** + +### ReceiveFax + +ReceiveFax starts receiving a fax on the call. Use WithFaxControlID to supply an explicit control\_id. + +#### Signature + +```go +func (*Call) ReceiveFax(opts ...FaxOption) *FaxAction +``` + +#### Parameters + + + +#### Returns + +`*FaxAction` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 1032. + +*** + +### Record + +Record starts recording the call and returns a RecordAction. + +Use WithRecordAudio to supply the audio config map (Python's record(audio=...)) and WithRecordControlID to fix the control\_id. Other RecordOption helpers set top-level fields directly (e.g. WithRecordBeep, WithRecordFormat); these are folded into the "record": \{"audio": \{...\}\} object on transmit so the wire shape matches Python: \{"record": \{"audio": \{...\}\}\}. + +#### Signature + +```go +func (*Call) Record(opts ...RecordOption) *RecordAction +``` + +#### Parameters + + + +#### Returns + +`*RecordAction` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 837. + +*** + +### Refer + +Refer transfers a SIP call to an external SIP endpoint via a REFER request. statusURL is optional (empty string omits it), matching Python's refer(device, \*, status\_url). + +#### Signature + +```go +func (*Call) Refer(device map[string]any, statusURL string) error +``` + +#### Parameters + + + + + +#### Returns + +`error` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 369. + +*** + +### SegmentID + +SegmentID returns the segment identifier for this call leg. + +#### Signature + +```go +func (*Call) SegmentID() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 111. + +*** + +### SendDigits + +SendDigits sends DTMF digits on the call. + +#### Signature + +```go +func (*Call) SendDigits(digits string) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 933. + +*** + +### SendFax + +SendFax sends a fax document on the call. Use WithFaxHeaderInfo for the fax header string and WithFaxControlID for an explicit control\_id. + +#### Signature + +```go +func (*Call) SendFax(document string, identity string, opts ...FaxOption) *FaxAction +``` + +#### Parameters + + + + + + + +#### Returns + +`*FaxAction` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 994. + +*** + +### State + +State returns the current call state. + +#### Signature + +```go +func (*Call) State() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 64. + +*** + +### Stream + +Stream starts streaming call audio to a WebSocket URL. Use WithStreamControlID for an explicit control\_id (matches Python's stream(control\_id=...)). + +#### Signature + +```go +func (*Call) Stream(url string, opts ...StreamOption) *StreamAction +``` + +#### Parameters + + + + + +#### Returns + +`*StreamAction` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 1111. + +*** + +### String + +String returns a human-readable representation of the call. + +#### Signature + +```go +func (*Call) String() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 1568. + +*** + +### Tag + +Tag returns the client-generated correlation tag. + +#### Signature + +```go +func (*Call) Tag() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 61. + +*** + +### Tap + +Tap starts tapping the call audio to an external destination. The optional controlID argument supplies an explicit control\_id (matches Python's tap(control\_id=...)). Pass "" or omit to auto-generate. + +#### Signature + +```go +func (*Call) Tap(tap map[string]any, device map[string]any, controlID ...string) *TapAction +``` + +#### Parameters + + + + + + + +#### Returns + +`*TapAction` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 1071. + +*** + +### Transcribe + +Transcribe starts real-time transcription on the call. The optional controlID argument supplies an explicit control\_id (matches Python's transcribe(control\_id=...)). + +#### Signature + +```go +func (*Call) Transcribe(statusURL string, controlID ...string) *TranscribeAction +``` + +#### Parameters + + + + + +#### Returns + +`*TranscribeAction` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 1529. + +*** + +### Transfer + +Transfer transfers call control to another RELAY app or SWML script. The dest parameter is the destination context/URL string, sent as the "dest" key to the server (matches Python's transfer(dest: str) behavior). + +#### Signature + +```go +func (*Call) Transfer(dest string) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 353. + +*** + +### Unhold + +Unhold takes the call off hold. + +#### Signature + +```go +func (*Call) Unhold() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 1300. + +*** + +### UserEvent + +UserEvent sends a user-defined event on the call. eventName is the custom event identifier; pass "" to omit it. Optional `extra` maps are merged into the top-level wire params (mirroring Python's \*\*kwargs in user\_event(\*, event: Optional\[str] = None, \*\*kwargs)). + +Wire shape (matches Python): \{"event": \, ...extra\}. + +#### Signature + +```go +func (*Call) UserEvent(eventName string, extra ...map[string]any) error +``` + +#### Parameters + + + + + +#### Returns + +`error` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 1441. + +*** + +### WaitFor + +WaitFor blocks until an event matching the given type and predicate is received, or the context expires. + +#### Signature + +```go +func (*Call) WaitFor(ctx context.Context, eventType string, predicate func(*RelayEvent) bool) (*RelayEvent, error) +``` + +#### Parameters + + + + + + + +#### Returns + +`(*RelayEvent, error)` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 130. + +*** + +### WaitForAnswered + +WaitForAnswered blocks until the call is answered (returns immediately if already answered or past it). Typed wait over WaitFor, mirroring Python's call.wait\_for\_answered(timeout). + +#### Signature + +```go +func (*Call) WaitForAnswered(ctx context.Context) (*RelayEvent, error) +``` + +#### Parameters + + + +#### Returns + +`(*RelayEvent, error)` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 197. + +*** + +### WaitForEnded + +WaitForEnded blocks until the call reaches the "ended" state, or the context expires. This mirrors Python's wait\_for\_ended() which awaits the \_ended asyncio.Future. + +#### Signature + +```go +func (*Call) WaitForEnded(ctx context.Context) (*RelayEvent, error) +``` + +#### Parameters + + + +#### Returns + +`(*RelayEvent, error)` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 151. + +*** + +### WaitForEnding + +WaitForEnding blocks until the call is ending (returns immediately if already ending or past it). Typed wait over WaitFor, mirroring Python's call.wait\_for\_ending(timeout). + +#### Signature + +```go +func (*Call) WaitForEnding(ctx context.Context) (*RelayEvent, error) +``` + +#### Parameters + + + +#### Returns + +`(*RelayEvent, error)` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 211. + +*** + +### WaitForRinging + +WaitForRinging blocks until the call is ringing (returns immediately if already ringing or past it). Typed wait over WaitFor, mirroring Python's call.wait\_for\_ringing(timeout). + +#### Signature + +```go +func (*Call) WaitForRinging(ctx context.Context) (*RelayEvent, error) +``` + +#### Parameters + + + +#### Returns + +`(*RelayEvent, error)` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 204. + +## Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 16. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/calling-error-event/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/calling-error-event/index.mdx new file mode 100644 index 0000000000..cee627893b --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/calling-error-event/index.mdx @@ -0,0 +1,39 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/calling-error-event" +title: "CallingErrorEvent" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.CallingErrorEvent" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "github.com.signalwire.signalwire-go.pkg.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" +--- +# `CallingErrorEvent` + +CallingErrorEvent represents a calling.call.error event. + +## Signature + +```go +type CallingErrorEvent struct +``` + +## Properties + + + + + + + + + +## Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 684. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/client/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/client/index.mdx new file mode 100644 index 0000000000..afa4c72535 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/client/index.mdx @@ -0,0 +1,613 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/client" +title: "Client" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.Client" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "github.com.signalwire.signalwire-go.pkg.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go" +--- +# `Client` + +Client is the main RELAY WebSocket client that manages a persistent connection to SignalWire, handles Blade/JSON-RPC 2.0 authentication, event dispatch, and exposes high-level Dial/SendMessage methods. + +## Signature + +```go +type Client struct +``` + +## Methods + +### Authenticate + +Authenticate runs the signalwire.connect handshake and stores the server-issued protocol string. Mirrors Python's RelayClient.connect() auth phase. Use Connect first to establish the WebSocket; this call reads the auth response synchronously (the read loop has not yet started so no other reader is contending for the socket). + +#### Signature + +```go +func (*Client) Authenticate() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) + +Line 317. + +*** + +### AuthorizationState + +AuthorizationState returns the most recent encrypted authorization state blob received via signalwire.authorization.state events. Mirrors Python's RelayClient.\_authorization\_state used during reconnection (relay/client.py:174). Empty until the server pushes such an event. + +#### Signature + +```go +func (*Client) AuthorizationState() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) + +Line 170. + +*** + +### Connect + +Connect establishes the WebSocket connection to SignalWire. This is the public equivalent of the internal connect() method, mirroring Python's async connect() which is also used in the async-with context manager. In most cases callers should use Run() which calls Connect internally and then drives the read loop. + +#### Signature + +```go +func (*Client) Connect() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) + +Line 181. + +*** + +### Contexts + +Contexts returns a copy of the configured RELAY contexts. Mirrors Python's public client.contexts attribute. The returned slice is a copy — mutating it does not affect the client. + +#### Signature + +```go +func (*Client) Contexts() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) + +Line 159. + +*** + +### Dial + +Dial initiates an outbound call to the given device list. The devices parameter is a list of serial/parallel device groups (same structure as the Blade calling.dial devices field). + +Mirrors Python's RelayClient.dial(devices, \*, tag=None, max\_duration=None, dial\_timeout=None). The calling.dial RPC response only contains \{"code": "200", "message": "Dialing"\} — no call\_id. The real call\_id and node\_id arrive via subsequent calling.call.dial events keyed by tag. This method waits for that event so the returned Call always has valid identifiers. + +To pass a caller-supplied tag, use WithDialTag. Without it the SDK generates a UUID, matching Python's tag = tag or str(uuid.uuid4()). + +Dial delegates to DialContext with context.Background(); use DialContext to abort the dial via a caller-controlled context (cancellation or deadline). + +#### Signature + +```go +func (*Client) Dial(devices [][]map[string]any, opts ...DialOption) (*Call, error) +``` + +#### Parameters + + + + + +#### Returns + +`(*Call, error)` + +#### Source + +[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) + +Line 380. + +*** + +### DialContext + +DialContext is the context-aware form of Dial: in addition to the dial-timeout and the client's own lifecycle, it aborts when ctx is cancelled or its deadline passes, returning ctx.Err() (wrapping context.Canceled / context.DeadlineExceeded). This is a Go-port addition — the Python reference's dial() has no caller-cancellation channel (documented in PORT\_ADDITIONS.md). + +Error sentinels (errors.Is-able): a per-dial timeout wraps ErrDialTimeout, a server "failed" dial\_state wraps ErrDialFailed, and an RPC-send failure against a torn-down socket surfaces ErrNotConnected from the transport. + +#### Signature + +```go +func (*Client) DialContext(ctx context.Context, devices [][]map[string]any, opts ...DialOption) (*Call, error) +``` + +#### Parameters + + + + + + + +#### Returns + +`(*Call, error)` + +#### Source + +[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) + +Line 394. + +*** + +### Execute + +Execute sends a JSON-RPC request over the WebSocket and waits for the response. Mirrors Python's async execute(method, params) which is the public arbitrary-RPC surface used by callers that need low-level access. + +#### Signature + +```go +func (*Client) Execute(method string, params map[string]any) (json.RawMessage, error) +``` + +#### Parameters + + + + + +#### Returns + +`(json.RawMessage, error)` + +#### Source + +[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) + +Line 188. + +*** + +### JWTToken + +JWTToken returns the configured JWT. Mirrors Python's public client.jwt\_token attribute, allowing callers to read back the value supplied via WithJWT(...). + +#### Signature + +```go +func (*Client) JWTToken() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) + +Line 141. + +*** + +### Notify + +Notify sends a JSON-RPC notification (no `id`, no response expected) with the given method and params. Used for fire-and-forget frames such as the client-side `signalwire.event` ACK pattern that some integration fixtures expect. Returns any write error from the underlying socket. + +#### Signature + +```go +func (*Client) Notify(method string, params map[string]any) error +``` + +#### Parameters + + + + + +#### Returns + +`error` + +#### Source + +[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) + +Line 197. + +*** + +### OnCall + +OnCall registers a handler invoked for each inbound call. + +#### Signature + +```go +func (*Client) OnCall(handler func(*Call)) +``` + +#### Parameters + + + +#### Source + +[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) + +Line 86. + +*** + +### OnEvent + +OnEvent registers a handler invoked for every inbound `signalwire.event` frame, AFTER type-specific routing (call, messaging) has run. The handler receives the raw event\_type string and params map. This is the lowest-level event hook — most callers should use OnCall or OnMessage instead. Mirrors Python RelayClient's public event-tap surface used by integration tests. + +#### Signature + +```go +func (*Client) OnEvent(handler func(eventType string, params map[string]any)) +``` + +#### Parameters + + + +#### Source + +[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) + +Line 105. + +*** + +### OnMessage + +OnMessage registers a handler invoked for each inbound message. + +#### Signature + +```go +func (*Client) OnMessage(handler func(*Message)) +``` + +#### Parameters + + + +#### Source + +[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) + +Line 93. + +*** + +### ProjectID + +ProjectID returns the configured project ID. Mirrors Python's public client.project attribute, allowing callers to read back the value supplied via WithProject(...) or the SIGNALWIRE\_PROJECT\_ID env var. + +#### Signature + +```go +func (*Client) ProjectID() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) + +Line 123. + +*** + +### Receive + +Receive subscribes to additional contexts for inbound events after the client is already connected. Sends signalwire.receive on the assigned protocol. Mirrors Python's async receive(contexts). + +#### Signature + +```go +func (*Client) Receive(contexts ...string) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) + +Line 209. + +*** + +### RelayProtocol + +RelayProtocol returns the server-assigned protocol string received during authentication. Mirrors Python's relay\_protocol property. The value is empty until after a successful Connect/Run. + +#### Signature + +```go +func (*Client) RelayProtocol() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) + +Line 114. + +*** + +### Run + +Run connects to SignalWire, authenticates, subscribes to configured contexts, and starts the read loop. It blocks until Stop is called or the context is cancelled. + +Important: the read loop must be running before subscribeContexts() is called. subscribeContexts() executes a JSON-RPC request whose response is delivered through the read loop's pending-id channel machinery. If the read loop isn't running, the JSON-RPC reply has no reader and the request times out (30s). Hence we start readLoop in a goroutine BEFORE the subscribe call, then block on a done channel here. + +#### Signature + +```go +func (*Client) Run() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) + +Line 243. + +*** + +### RunContext + +RunContext is the context-aware form of Run. It behaves identically to Run (connect, authenticate, subscribe, drive the read loop, block) but also stops cleanly when ctx is cancelled or its deadline passes — equivalent to another goroutine calling Stop(). On a ctx-driven shutdown it returns ctx.Err() (wrapping context.Canceled / context.DeadlineExceeded); on a caller Stop() it returns nil, matching Run. + +This is a Go-port addition (the Python reference's run()/serve loop has no caller-supplied cancellation token); documented in PORT\_ADDITIONS.md. + +#### Signature + +```go +func (*Client) RunContext(ctx context.Context) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) + +Line 256. + +*** + +### SendMessage + +SendMessage sends an SMS/MMS message and returns a Message that can be used to track delivery. + +The context option (WithMessageContext) sets the routing context for the message; it defaults to the relay protocol when omitted, matching Python SDK behaviour. The on\_completed option (WithMessageOnCompleted) registers a callback fired when the message reaches a terminal state. + +#### Signature + +```go +func (*Client) SendMessage(to string, from string, body string, opts ...MessageOption) (*Message, error) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`(*Message, error)` + +#### Source + +[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) + +Line 471. + +*** + +### Space + +Space returns the configured SignalWire space hostname. Mirrors Python's public client.host attribute (Python uses the term "host"; Go uses "space" because that's the more accurate noun — see WithSpace). + +#### Signature + +```go +func (*Client) Space() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) + +Line 150. + +*** + +### StartReadLoop + +StartReadLoop spawns the read goroutine and marks the client running. Mirrors the goroutine-spawn portion of Run() — call it after Authenticate() and before any Execute() call so JSON-RPC responses have a reader. Pair with Stop() to terminate. + +#### Signature + +```go +func (*Client) StartReadLoop() +``` + +#### Source + +[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) + +Line 325. + +*** + +### Stop + +Stop gracefully shuts down the client connection. + +Equivalent to Python's RelayClient.disconnect() (relay/client.py:286). Python users porting code can search for "disconnect" and find this method by its rename. + +#### Signature + +```go +func (*Client) Stop() +``` + +#### Source + +[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) + +Line 342. + +*** + +### SubscribeContexts + +SubscribeContexts subscribes to whatever contexts were configured via WithContexts. No-op when the contexts slice is empty. Used by the mock-relay test helper which drives connect/auth/read-loop manually. + +#### Signature + +```go +func (*Client) SubscribeContexts() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) + +Line 333. + +*** + +### Token + +Token returns the configured API token. Mirrors Python's public client.token attribute, allowing callers to read back the value supplied via WithToken(...) or the SIGNALWIRE\_API\_TOKEN env var. + +#### Signature + +```go +func (*Client) Token() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) + +Line 132. + +*** + +### Unreceive + +Unreceive unsubscribes from contexts for inbound events. Sends signalwire.unreceive on the assigned protocol. Mirrors Python's async unreceive(contexts). + +#### Signature + +```go +func (*Client) Unreceive(contexts ...string) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) + +Line 222. + +## Source + +[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) + +Line 24. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/collect-action/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/collect-action/index.mdx new file mode 100644 index 0000000000..c8279557ec --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/collect-action/index.mdx @@ -0,0 +1,103 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/collect-action" +title: "CollectAction" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.CollectAction" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "github.com.signalwire.signalwire-go.pkg.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go" +--- +# `CollectAction` + +CollectAction represents a play-and-collect operation. + +## Signature + +```go +type CollectAction struct +``` + +## Properties + + + +## Methods + +### StartInputTimers + +StartInputTimers starts the initial\_timeout timer on an active collect, equivalent to Python's CollectAction.start\_input\_timers(). + +#### Signature + +```go +func (*CollectAction) StartInputTimers() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 332. + +*** + +### Stop + +Stop sends calling.play\_and\_collect.stop to halt the play-and-collect operation. + +#### Signature + +```go +func (*CollectAction) Stop() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 303. + +*** + +### Volume + +Volume adjusts the playback volume by the given dB offset during a play-and-collect operation. + +#### Signature + +```go +func (*CollectAction) Volume(db float64) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 317. + +## Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 288. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/collect-event/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/collect-event/index.mdx new file mode 100644 index 0000000000..1177a48549 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/collect-event/index.mdx @@ -0,0 +1,43 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/collect-event" +title: "CollectEvent" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.CollectEvent" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "github.com.signalwire.signalwire-go.pkg.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" +--- +# `CollectEvent` + +CollectEvent represents a calling.call.collect event. + +## Signature + +```go +type CollectEvent struct +``` + +## Properties + + + + + Final is a \*bool matching Python's Optional\[bool] = None semantics. + + + + + + + + +## Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 333. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/collect-params/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/collect-params/index.mdx new file mode 100644 index 0000000000..f984676256 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/collect-params/index.mdx @@ -0,0 +1,67 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/collect-params" +title: "CollectParams" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.CollectParams" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "github.com.signalwire.signalwire-go.pkg.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go" +--- +# `CollectParams` + +CollectParams holds named parameters for the Collect method, matching Python's collect() named arguments. The fields are placed at the top level of the on-wire calling.collect frame (NOT nested under a "collect" object) — mirroring Python's params\["digits"] = digits at relay/call.py:583. + +## Signature + +```go +type CollectParams struct +``` + +## Properties + + + Continuous enables continuous collection after a result is received. + + + + ControlID overrides the auto-generated control identifier. + + + + Digits configures DTMF digit collection. + + + + InitialTimeout is the number of seconds to wait for first input. + + + + OnCompleted is fired when the collect action reaches a terminal state. + + + + PartialResults enables streaming partial results as input is gathered. + + + + SendStartOfInput signals when the user begins speaking/pressing. + + + + Speech configures speech recognition collection. + + + + StartInputTimers controls whether input timers start immediately. + + +## Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 529. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/conference-event/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/conference-event/index.mdx new file mode 100644 index 0000000000..0d48d9aed0 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/conference-event/index.mdx @@ -0,0 +1,43 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/conference-event" +title: "ConferenceEvent" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.ConferenceEvent" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "github.com.signalwire.signalwire-go.pkg.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" +--- +# `ConferenceEvent` + +ConferenceEvent represents a calling.call.conference event. + +## Signature + +```go +type ConferenceEvent struct +``` + +## Properties + + + + + + + + + + + Status reads wire key "status" matching Python's status field. (Replaces the previous State field which incorrectly read "state".) + + +## Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 661. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/connect-event/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/connect-event/index.mdx new file mode 100644 index 0000000000..8a4e2a8172 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/connect-event/index.mdx @@ -0,0 +1,37 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/connect-event" +title: "ConnectEvent" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.ConnectEvent" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "github.com.signalwire.signalwire-go.pkg.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" +--- +# `ConnectEvent` + +ConnectEvent represents a calling.call.connect event. + +## Signature + +```go +type ConnectEvent struct +``` + +## Properties + + + + + + + +## Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 355. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/denoise-event/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/denoise-event/index.mdx new file mode 100644 index 0000000000..b40e5fb4af --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/denoise-event/index.mdx @@ -0,0 +1,41 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/denoise-event" +title: "DenoiseEvent" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.DenoiseEvent" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "github.com.signalwire.signalwire-go.pkg.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" +--- +# `DenoiseEvent` + +DenoiseEvent represents a calling.call.denoise event. + +## Signature + +```go +type DenoiseEvent struct +``` + +## Properties + + + + + Denoised matches Python's denoised bool field. + + + + + + +## Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 527. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/detect-action/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/detect-action/index.mdx new file mode 100644 index 0000000000..a90f798a08 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/detect-action/index.mdx @@ -0,0 +1,55 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/detect-action" +title: "DetectAction" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.DetectAction" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "github.com.signalwire.signalwire-go.pkg.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go" +--- +# `DetectAction` + +DetectAction represents a long-running detect operation (e.g. machine detection). + +## Signature + +```go +type DetectAction struct +``` + +## Properties + + + +## Methods + +### Stop + +Stop sends calling.detect.stop to halt the active detect operation. + +#### Signature + +```go +func (*DetectAction) Stop() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 275. + +## Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 258. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/detect-event/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/detect-event/index.mdx new file mode 100644 index 0000000000..307a03065e --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/detect-event/index.mdx @@ -0,0 +1,37 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/detect-event" +title: "DetectEvent" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.DetectEvent" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "github.com.signalwire.signalwire-go.pkg.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" +--- +# `DetectEvent` + +DetectEvent represents a calling.call.detect event. + +## Signature + +```go +type DetectEvent struct +``` + +## Properties + + + + + + + +## Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 372. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/device/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/device/index.mdx new file mode 100644 index 0000000000..9ad26dbd7e --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/device/index.mdx @@ -0,0 +1,85 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/device" +title: "Device" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.Device" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "github.com.signalwire.signalwire-go.pkg.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/device.go" +--- +# `Device` + +Device is a typed view of the \{type, params\} object that RELAY passes across connect / refer / dial / tap. It types the SHAPE only — the discriminant `type` stays a string because the set of device types is NOT schema-enumerated (the wire schema declares `type` as a free string; grounding: porting-sdk/relay-protocol/calling.\{connect,dial,refer,tap\}. params.json, where each device is \{required:\["type"], properties:\{type: \{type:string\}, params:\{\}\}\}). + +Device is purely ADDITIVE: the raw-map path is unchanged — Call.Connect, Client.Dial/DialContext, Call.Refer and the tap helpers all still take map\[string]any / \[]\[]map\[string]any. ToMap() (and json.Marshal via MarshalJSON) yield the IDENTICAL wire shape — \{"type": \, "params": \\} — so a Device can be dropped in anywhere a hand-written device map is used, byte-for-byte. Params is left `any` to carry whatever the specific device type expects (e.g. phone: \{to\_number, from\_number\}; sip: \{to, from, headers\}); when nil it serialises as an empty object to match the canonical hand-written `"params": map[string]any{}`. + +## Signature + +```go +type Device struct +``` + +## Properties + + + Params is the device-type-specific parameter object. Typically a map\[string]any; left `any` so callers pass the shape the type needs. + + + + Type is the device discriminant (e.g. "phone", "sip"). Kept a string — the value set is open / not schema-enumerated. + + +## Methods + +### MarshalJSON + +MarshalJSON makes a Device serialise identically to its ToMap() form, so a Device used directly inside a params payload produces the same bytes as the equivalent raw map. + +#### Signature + +```go +func (Device) MarshalJSON() ([]byte, error) +``` + +#### Returns + +`([]byte, error)` + +#### Source + +[`pkg/relay/device.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/device.go) + +Line 59. + +*** + +### ToMap + +ToMap renders the Device as the raw wire map \{"type":…, "params":…\}, byte-identical to the hand-written map\[string]any callers pass to Connect/Dial/Refer/tap. A nil Params becomes an empty object. + +#### Signature + +```go +func (Device) ToMap() map[string]any +``` + +#### Returns + +`map[string]any` + +#### Source + +[`pkg/relay/device.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/device.go) + +Line 49. + +## Source + +[`pkg/relay/device.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/device.go) + +Line 22. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/dial-event/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/dial-event/index.mdx new file mode 100644 index 0000000000..f7188e9f04 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/dial-event/index.mdx @@ -0,0 +1,69 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/dial-event" +title: "DialEvent" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.DialEvent" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "github.com.signalwire.signalwire-go.pkg.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" +--- +# `DialEvent` + +DialEvent represents a calling.call.dial event. + +## Signature + +```go +type DialEvent struct +``` + +## Properties + + + Call is the nested call dict, matching Python's call field. + + + + + + DialState reads wire key "dial\_state" matching Python's dial\_state field. (Replaces the previous State field which incorrectly read "state".) + + + + + + + + +## Methods + +### DialStateTyped + +DialStateTyped returns the dial outcome as a typed DialState ALONGSIDE the bare-string DialState field (kept for parity with the Python reference). The typed kind gives callers IsTerminal()/IsKnown() predicates and compile-time distinctness from CallState/MessageState; its underlying string equals the DialState field exactly. Additive port idiom — see states.go and PORT\_ADDITIONS.md. + +#### Signature + +```go +func (*DialEvent) DialStateTyped() DialState +``` + +#### Returns + +`DialState` + +#### Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 499. + +## Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 468. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/echo-event/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/echo-event/index.mdx new file mode 100644 index 0000000000..ea6baa31a4 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/echo-event/index.mdx @@ -0,0 +1,37 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/echo-event" +title: "EchoEvent" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.EchoEvent" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "github.com.signalwire.signalwire-go.pkg.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" +--- +# `EchoEvent` + +EchoEvent represents a calling.call.echo event. + +## Signature + +```go +type EchoEvent struct +``` + +## Properties + + + + + + + +## Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 596. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/fax-action/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/fax-action/index.mdx new file mode 100644 index 0000000000..dca6033f0c --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/fax-action/index.mdx @@ -0,0 +1,55 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/fax-action" +title: "FaxAction" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.FaxAction" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "github.com.signalwire.signalwire-go.pkg.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go" +--- +# `FaxAction` + +FaxAction represents a long-running fax send/receive operation. methodPrefix distinguishes "send\_fax" from "receive\_fax" and is used to build the operation-specific stop command (e.g. "calling.send\_fax.stop"). + +## Signature + +```go +type FaxAction struct +``` + +## Properties + + + +## Methods + +### Stop + +Stop sends "calling.\{methodPrefix\}.stop" (e.g. "calling.send\_fax.stop" or "calling.receive\_fax.stop") to halt the active fax operation. + +#### Signature + +```go +func (*FaxAction) Stop() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 407. + +## Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 388. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/fax-event/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/fax-event/index.mdx new file mode 100644 index 0000000000..1d25426ff1 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/fax-event/index.mdx @@ -0,0 +1,37 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/fax-event" +title: "FaxEvent" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.FaxEvent" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "github.com.signalwire.signalwire-go.pkg.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" +--- +# `FaxEvent` + +FaxEvent represents a calling.call.fax event. + +## Signature + +```go +type FaxEvent struct +``` + +## Properties + + + + + + + +## Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 389. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/hold-event/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/hold-event/index.mdx new file mode 100644 index 0000000000..391ebc0622 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/hold-event/index.mdx @@ -0,0 +1,37 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/hold-event" +title: "HoldEvent" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.HoldEvent" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "github.com.signalwire.signalwire-go.pkg.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" +--- +# `HoldEvent` + +HoldEvent represents a calling.call.hold event. + +## Signature + +```go +type HoldEvent struct +``` + +## Properties + + + + + + + +## Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 644. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/index.mdx new file mode 100644 index 0000000000..bbf1f9bbf9 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/index.mdx @@ -0,0 +1,4073 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay" +title: "relay" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "module" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay" + module: "github.com.signalwire.signalwire-go.pkg.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go" +--- +# `relay` + +Package relay implements real-time WebSocket call control over the SignalWire Blade protocol (JSON-RPC 2.0). It provides a RELAY client that manages WebSocket connections, authentication, and event routing for calling, messaging, and other real-time communication primitives. + +## Signature + +```go +package relay +``` + +## Constants + + + AgentString is the SDK identifier the connect frame announces to the RELAY server. Mirrors Python's AGENT\_STRING at relay/constants.py:5, translated to identify this language's port. Sent as `params.agent` on signalwire.connect. + + + + Call lifecycle states. These equal the bare-string CallState\* consts in constants.go (created \< ringing \< answered \< ending \< ended) — the typed kind is an alternative spelling, not a replacement. + + + + Call lifecycle states. These equal the bare-string CallState\* consts in constants.go (created \< ringing \< answered \< ending \< ended) — the typed kind is an alternative spelling, not a replacement. + + + + Call lifecycle states. These equal the bare-string CallState\* consts in constants.go (created \< ringing \< answered \< ending \< ended) — the typed kind is an alternative spelling, not a replacement. + + + + Call lifecycle states. These equal the bare-string CallState\* consts in constants.go (created \< ringing \< answered \< ending \< ended) — the typed kind is an alternative spelling, not a replacement. + + + + Call lifecycle states. These equal the bare-string CallState\* consts in constants.go (created \< ringing \< answered \< ending \< ended) — the typed kind is an alternative spelling, not a replacement. + + + + Call states represent the lifecycle of a call. + + + + Call states represent the lifecycle of a call. + + + + Call states represent the lifecycle of a call. + + + + Call states represent the lifecycle of a call. + + + + Call states represent the lifecycle of a call. + + + + Dial outcome states. "dialing" is a non-terminal progress state; "answered" and "failed" are the two terminal outcomes that resolve/reject the dial. + + + + Dial outcome states. "dialing" is a non-terminal progress state; "answered" and "failed" are the two terminal outcomes that resolve/reject the dial. + + + + Dial outcome states. "dialing" is a non-terminal progress state; "answered" and "failed" are the two terminal outcomes that resolve/reject the dial. + + + + Call directions. + + + + Call directions. + + + + Call end reasons indicate why a call ended. + + + + Call end reasons indicate why a call ended. + + + + Call end reasons indicate why a call ended. + + + + Call end reasons indicate why a call ended. + + + + Call end reasons indicate why a call ended. + + + + Call end reasons indicate why a call ended. + + + + Call end reasons indicate why a call ended. + + + + Call end reasons indicate why a call ended. + + + + Call end reasons indicate why a call ended. + + + + Package-level sentinel errors for the conditions the relay client returns. These are Go-idiomatic, errors.Is-able markers (a Go-port addition — the Python reference uses RelayError + bare exceptions and has no equivalent sentinel set). Every code path that produces one of these conditions wraps the sentinel with %w, so callers can branch with errors.Is rather than scraping error strings: if \_, err := c.Dial(devices); errors.Is(err, relay.ErrDialTimeout) \{ // retry / give up on the dial specifically \} They are documented in PORT\_ADDITIONS.md. + + + + Package-level sentinel errors for the conditions the relay client returns. These are Go-idiomatic, errors.Is-able markers (a Go-port addition — the Python reference uses RelayError + bare exceptions and has no equivalent sentinel set). Every code path that produces one of these conditions wraps the sentinel with %w, so callers can branch with errors.Is rather than scraping error strings: if \_, err := c.Dial(devices); errors.Is(err, relay.ErrDialTimeout) \{ // retry / give up on the dial specifically \} They are documented in PORT\_ADDITIONS.md. + + + + Package-level sentinel errors for the conditions the relay client returns. These are Go-idiomatic, errors.Is-able markers (a Go-port addition — the Python reference uses RelayError + bare exceptions and has no equivalent sentinel set). Every code path that produces one of these conditions wraps the sentinel with %w, so callers can branch with errors.Is rather than scraping error strings: if \_, err := c.Dial(devices); errors.Is(err, relay.ErrDialTimeout) \{ // retry / give up on the dial specifically \} They are documented in PORT\_ADDITIONS.md. + + + + Package-level sentinel errors for the conditions the relay client returns. These are Go-idiomatic, errors.Is-able markers (a Go-port addition — the Python reference uses RelayError + bare exceptions and has no equivalent sentinel set). Every code path that produces one of these conditions wraps the sentinel with %w, so callers can branch with errors.Is rather than scraping error strings: if \_, err := c.Dial(devices); errors.Is(err, relay.ErrDialTimeout) \{ // retry / give up on the dial specifically \} They are documented in PORT\_ADDITIONS.md. + + + + Authorization-state event used to refresh reconnect material. Mirrors Python's EVENT\_AUTHORIZATION\_STATE = "signalwire.authorization.state" (relay/constants.py:16). + + + + Event types for calling events. + + + + Event types for calling events. + + + + Event types for calling events. + + + + Event types for calling events. + + + + Event types for calling events. + + + + Event types for calling events. + + + + Event types for calling events. + + + + Event types for calling events. + + + + Event types for calling events. + + + + Event types for calling events. + + + + Event types for calling events. + + + + Event types for calling events. + + + + Event types for calling events. + + + + Event types for calling events. + + + + Event types for calling events. + + + + Event types for calling events. + + + + Event types for calling events. + + + + Event types for calling events. + + + + Event types for calling events. + + + + Event types for calling events. + + + + Event types for calling events. + + + + Event types for calling events. + + + + Event types for messaging events. + + + + Event types for messaging events. + + + + TTS voice genders. These are the canonical gender strings the RELAY wire accepts in the tts params; the values are the exact tokens emitted on the wire. + + + + TTS voice genders. These are the canonical gender strings the RELAY wire accepts in the tts params; the values are the exact tokens emitted on the wire. + + + + Message states represent the lifecycle of an SMS/MMS message. + + + + Message states represent the lifecycle of an SMS/MMS message. + + + + Message states represent the lifecycle of an SMS/MMS message. + + + + Message states represent the lifecycle of an SMS/MMS message. + + + + Message states represent the lifecycle of an SMS/MMS message. + + + + Message states represent the lifecycle of an SMS/MMS message. + + + + Message states represent the lifecycle of an SMS/MMS message. + + + + Blade/SignalWire internal method constants. + + + + Blade/SignalWire internal method constants. + + + + Blade/SignalWire internal method constants. + + + + Blade/SignalWire internal method constants. + + + + Blade/SignalWire internal method constants. + + + + Message delivery states. These equal the bare-string MessageState\* consts in constants.go. + + + + Message delivery states. These equal the bare-string MessageState\* consts in constants.go. + + + + Message delivery states. These equal the bare-string MessageState\* consts in constants.go. + + + + Message delivery states. These equal the bare-string MessageState\* consts in constants.go. + + + + Message delivery states. These equal the bare-string MessageState\* consts in constants.go. + + + + Message delivery states. These equal the bare-string MessageState\* consts in constants.go. + + + + Message delivery states. These equal the bare-string MessageState\* consts in constants.go. + + + + Protocol version for the SignalWire Blade protocol. + + + + Protocol version for the SignalWire Blade protocol. + + + + Protocol version for the SignalWire Blade protocol. + + +## Classes + + + + Action represents a long-running operation on a call, such as playing audio, recording, or collecting input. Callers can Wait for completion, check status, or register a completion callback. + + + + AIAction represents a long-running AI operation on a call. + + + + AIEvent represents a calling.call.ai event. + + + + Call represents an active voice call managed through the RELAY client. It exposes methods for every calling operation supported by SignalWire, grouped into logical categories: lifecycle, audio, recording, bridging, DTMF, detection, fax, tap, streaming, conferencing, AI, hold/denoise, room/queue, pay, and transcription. + + + + CallingErrorEvent represents a calling.call.error event. + + + + CallReceiveEvent represents a calling.call.receive event for inbound calls. + + + + CallStateEvent represents a calling.call.state event. + + + + Client is the main RELAY WebSocket client that manages a persistent connection to SignalWire, handles Blade/JSON-RPC 2.0 authentication, event dispatch, and exposes high-level Dial/SendMessage methods. + + + + CollectAction represents a play-and-collect operation. + + + + CollectEvent represents a calling.call.collect event. + + + + CollectParams holds named parameters for the Collect method, matching Python's collect() named arguments. The fields are placed at the top level of the on-wire calling.collect frame (NOT nested under a "collect" object) — mirroring Python's params\["digits"] = digits at relay/call.py:583. + + + + ConferenceEvent represents a calling.call.conference event. + + + + ConnectEvent represents a calling.call.connect event. + + + + DenoiseEvent represents a calling.call.denoise event. + + + + DetectAction represents a long-running detect operation (e.g. machine detection). + + + + DetectEvent represents a calling.call.detect event. + + + + Device is a typed view of the \{type, params\} object that RELAY passes across connect / refer / dial / tap. It types the SHAPE only — the discriminant `type` stays a string because the set of device types is NOT schema-enumerated (the wire schema declares `type` as a free string; grounding: porting-sdk/relay-protocol/calling.\{connect,dial,refer,tap\}. params.json, where each device is \{required:\["type"], properties:\{type: \{type:string\}, params:\{\}\}\}). + + + + DialEvent represents a calling.call.dial event. + + + + EchoEvent represents a calling.call.echo event. + + + + FaxAction represents a long-running fax send/receive operation. methodPrefix distinguishes "send\_fax" from "receive\_fax" and is used to build the operation-specific stop command (e.g. "calling.send\_fax.stop"). + + + + FaxEvent represents a calling.call.fax event. + + + + HoldEvent represents a calling.call.hold event. + + + + Message represents an SMS/MMS message tracked through its lifecycle. + + + + MessageReceiveEvent represents a messaging.receive event. + + + + MessageStateEvent represents a messaging.state event. + + + + PayAction represents a long-running pay operation. + + + + PayEvent represents a calling.call.pay event. + + + + PlayAction represents a long-running play operation with media controls. + + + + PlayEvent represents a calling.call.play event. + + + + QueueEvent represents a calling.call.queue event. + + + + RecordAction represents a long-running record operation. + + + + RecordEvent represents a calling.call.record event. + + + + ReferEvent represents a calling.call.refer event. + + + + RelayError is a typed error returned by the RELAY protocol client. It carries the numeric code and message from the server so callers can programmatically inspect failures via errors.As. + + + + RelayEvent is the base event type for all events received from the SignalWire RELAY service. It carries an event type string and a generic parameter map that can be queried via helper methods. + + + + SendDigitsEvent represents a calling.call.send\_digits event. + + + + StandaloneCollectAction represents a standalone collect (without play). + + + + StreamAction represents a long-running media stream operation. + + + + StreamEvent represents a calling.call.stream event. + + + + TapAction represents a long-running tap operation. + + + + TapEvent represents a calling.call.tap event. + + + + TranscribeAction represents a long-running transcription operation. + + + + TranscribeEvent represents a calling.call.transcribe event. + + + +## Functions + +### DeviceGroups + +DeviceGroups converts serial groups of parallel typed Devices into the \[]\[]map\[string]any shape Connect/Dial expect: the outer slice is tried serially, the inner slice in parallel — the same semantics as the raw \[]\[]map\[string]any field. Byte-identical to building the nested maps by hand. + +#### Signature + +```go +func DeviceGroups(groups ...[]Device) [][]map[string]any +``` + +#### Parameters + + + +#### Returns + +`[][]map[string]any` + +#### Source + +[`pkg/relay/device.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/device.go) + +Line 79. + +*** + +### DeviceList + +DeviceList converts a flat list of typed Devices into ONE parallel device leg in the \[]\[]map\[string]any shape that Connect/Dial expect — i.e. all the given devices are tried in parallel (a single serial group). Equivalent to the hand-written \[]\[]map\[string]any\{\{dev1, dev2, …\}\}. + +#### Signature + +```go +func DeviceList(devices ...Device) [][]map[string]any +``` + +#### Parameters + + + +#### Returns + +`[][]map[string]any` + +#### Source + +[`pkg/relay/device.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/device.go) + +Line 67. + +*** + +### NewAIEvent + +NewAIEvent constructs an AIEvent from raw params. + +#### Signature + +```go +func NewAIEvent(params map[string]any) *AIEvent +``` + +#### Parameters + + + +#### Returns + +`*AIEvent` + +#### Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 825. + +*** + +### NewCallingErrorEvent + +NewCallingErrorEvent constructs a CallingErrorEvent from raw params. + +#### Signature + +```go +func NewCallingErrorEvent(params map[string]any) *CallingErrorEvent +``` + +#### Parameters + + + +#### Returns + +`*CallingErrorEvent` + +#### Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 692. + +*** + +### NewCallReceiveEvent + +NewCallReceiveEvent constructs a CallReceiveEvent from raw params. + +#### Signature + +```go +func NewCallReceiveEvent(params map[string]any) *CallReceiveEvent +``` + +#### Parameters + + + +#### Returns + +`*CallReceiveEvent` + +#### Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 240. + +*** + +### NewCallStateEvent + +NewCallStateEvent constructs a CallStateEvent from raw params. + +#### Signature + +```go +func NewCallStateEvent(params map[string]any) *CallStateEvent +``` + +#### Parameters + + + +#### Returns + +`*CallStateEvent` + +#### Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 211. + +*** + +### NewCollectEvent + +NewCollectEvent constructs a CollectEvent from raw params. + +#### Signature + +```go +func NewCollectEvent(params map[string]any) *CollectEvent +``` + +#### Parameters + + + +#### Returns + +`*CollectEvent` + +#### Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 343. + +*** + +### NewConferenceEvent + +NewConferenceEvent constructs a ConferenceEvent from raw params. + +#### Signature + +```go +func NewConferenceEvent(params map[string]any) *ConferenceEvent +``` + +#### Parameters + + + +#### Returns + +`*ConferenceEvent` + +#### Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 672. + +*** + +### NewConnectEvent + +NewConnectEvent constructs a ConnectEvent from raw params. + +#### Signature + +```go +func NewConnectEvent(params map[string]any) *ConnectEvent +``` + +#### Parameters + + + +#### Returns + +`*ConnectEvent` + +#### Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 362. + +*** + +### NewDenoiseEvent + +NewDenoiseEvent constructs a DenoiseEvent from raw params. + +#### Signature + +```go +func NewDenoiseEvent(params map[string]any) *DenoiseEvent +``` + +#### Parameters + + + +#### Returns + +`*DenoiseEvent` + +#### Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 536. + +*** + +### NewDetectEvent + +NewDetectEvent constructs a DetectEvent from raw params. + +#### Signature + +```go +func NewDetectEvent(params map[string]any) *DetectEvent +``` + +#### Parameters + + + +#### Returns + +`*DetectEvent` + +#### Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 379. + +*** + +### NewDevice + +NewDevice constructs a Device from a type discriminant and its params. + +#### Signature + +```go +func NewDevice(deviceType string, params any) Device +``` + +#### Parameters + + + + + +#### Returns + +`Device` + +#### Source + +[`pkg/relay/device.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/device.go) + +Line 32. + +*** + +### NewDialEvent + +NewDialEvent constructs a DialEvent from raw params. + +#### Signature + +```go +func NewDialEvent(params map[string]any) *DialEvent +``` + +#### Parameters + + + +#### Returns + +`*DialEvent` + +#### Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 481. + +*** + +### NewEchoEvent + +NewEchoEvent constructs an EchoEvent from raw params. + +#### Signature + +```go +func NewEchoEvent(params map[string]any) *EchoEvent +``` + +#### Parameters + + + +#### Returns + +`*EchoEvent` + +#### Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 603. + +*** + +### NewFaxEvent + +NewFaxEvent constructs a FaxEvent from raw params. + +#### Signature + +```go +func NewFaxEvent(params map[string]any) *FaxEvent +``` + +#### Parameters + + + +#### Returns + +`*FaxEvent` + +#### Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 396. + +*** + +### NewHoldEvent + +NewHoldEvent constructs a HoldEvent from raw params. + +#### Signature + +```go +func NewHoldEvent(params map[string]any) *HoldEvent +``` + +#### Parameters + + + +#### Returns + +`*HoldEvent` + +#### Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 651. + +*** + +### NewMessageReceiveEvent + +NewMessageReceiveEvent constructs a MessageReceiveEvent from raw params. + +#### Signature + +```go +func NewMessageReceiveEvent(params map[string]any) *MessageReceiveEvent +``` + +#### Parameters + + + +#### Returns + +`*MessageReceiveEvent` + +#### Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 719. + +*** + +### NewMessageStateEvent + +NewMessageStateEvent constructs a MessageStateEvent from raw params. + +#### Signature + +```go +func NewMessageStateEvent(params map[string]any) *MessageStateEvent +``` + +#### Parameters + + + +#### Returns + +`*MessageStateEvent` + +#### Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 779. + +*** + +### NewPayEvent + +NewPayEvent constructs a PayEvent from raw params. + +#### Signature + +```go +func NewPayEvent(params map[string]any) *PayEvent +``` + +#### Parameters + + + +#### Returns + +`*PayEvent` + +#### Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 555. + +*** + +### NewPlayEvent + +NewPlayEvent constructs a PlayEvent from raw params. + +#### Signature + +```go +func NewPlayEvent(params map[string]any) *PlayEvent +``` + +#### Parameters + + + +#### Returns + +`*PlayEvent` + +#### Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 274. + +*** + +### NewQueueEvent + +NewQueueEvent constructs a QueueEvent from raw params. + +#### Signature + +```go +func NewQueueEvent(params map[string]any) *QueueEvent +``` + +#### Parameters + + + +#### Returns + +`*QueueEvent` + +#### Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 582. + +*** + +### NewRecordEvent + +NewRecordEvent constructs a RecordEvent from raw params. URL, Duration, and Size are extracted from the nested "record" dict first, falling back to top-level params — matching Python's from\_payload behavior. + +#### Signature + +```go +func NewRecordEvent(params map[string]any) *RecordEvent +``` + +#### Parameters + + + +#### Returns + +`*RecordEvent` + +#### Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 299. + +*** + +### NewReferEvent + +NewReferEvent constructs a ReferEvent from raw params. + +#### Signature + +```go +func NewReferEvent(params map[string]any) *ReferEvent +``` + +#### Parameters + + + +#### Returns + +`*ReferEvent` + +#### Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 514. + +*** + +### NewRelayClient + +NewRelayClient creates a new RELAY Client with the given options. + +After explicit options are applied, any remaining unset auth/space fields fall back to SIGNALWIRE\_PROJECT\_ID, SIGNALWIRE\_API\_TOKEN, SIGNALWIRE\_JWT\_TOKEN, SIGNALWIRE\_SPACE, and RELAY\_MAX\_ACTIVE\_CALLS environment variables — matching Python RelayClient.**init**'s automatic env-var fallback (relay/client.py:115-119). Explicit options always win. + +#### Signature + +```go +func NewRelayClient(opts ...ClientOption) *Client +``` + +#### Parameters + + + +#### Returns + +`*Client` + +#### Source + +[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) + +Line 65. + +*** + +### NewRelayError + +NewRelayError constructs a RelayError with the given code and message. + +#### Signature + +```go +func NewRelayError(code int, message string) *RelayError +``` + +#### Parameters + + + + + +#### Returns + +`*RelayError` + +#### Source + +[`pkg/relay/error.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/error.go) + +Line 70. + +*** + +### NewRelayEvent + +NewRelayEvent creates a new RelayEvent from the given type and params. + +#### Signature + +```go +func NewRelayEvent(eventType string, params map[string]any) *RelayEvent +``` + +#### Parameters + + + + + +#### Returns + +`*RelayEvent` + +#### Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 23. + +*** + +### NewSendDigitsEvent + +NewSendDigitsEvent constructs a SendDigitsEvent from raw params. + +#### Signature + +```go +func NewSendDigitsEvent(params map[string]any) *SendDigitsEvent +``` + +#### Parameters + + + +#### Returns + +`*SendDigitsEvent` + +#### Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 458. + +*** + +### NewStreamEvent + +NewStreamEvent constructs a StreamEvent from raw params. + +#### Signature + +```go +func NewStreamEvent(params map[string]any) *StreamEvent +``` + +#### Parameters + + + +#### Returns + +`*StreamEvent` + +#### Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 439. + +*** + +### NewTapEvent + +NewTapEvent constructs a TapEvent from raw params. + +#### Signature + +```go +func NewTapEvent(params map[string]any) *TapEvent +``` + +#### Parameters + + + +#### Returns + +`*TapEvent` + +#### Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 416. + +*** + +### NewTranscribeEvent + +NewTranscribeEvent constructs a TranscribeEvent from raw params. + +#### Signature + +```go +func NewTranscribeEvent(params map[string]any) *TranscribeEvent +``` + +#### Parameters + + + +#### Returns + +`*TranscribeEvent` + +#### Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 629. + +*** + +### ParseEvent + +ParseEvent parses a raw signalwire event payload dict into a typed event object. It reads "event\_type" from the top-level payload and "params" as the inner parameter map, then dispatches to the appropriate typed constructor. If the event\_type is not recognised, a plain \*RelayEvent is returned. Callers can type-assert or type-switch on the result to access the concrete event fields. + +This mirrors Python's relay.event.parse\_event(payload). + +#### Signature + +```go +func ParseEvent(payload map[string]any) any +``` + +#### Parameters + + + +#### Returns + +`any` + +#### Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 843. + +*** + +### WithAIControlID + +WithAIControlID supplies an explicit control\_id for the AI action, matching Python's ai(control\_id=...). + +#### Signature + +```go +func WithAIControlID(id string) AIOption +``` + +#### Parameters + + + +#### Returns + +`AIOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 448. + +*** + +### WithAIEngine + +WithAIEngine sets the AI engine to use. + +#### Signature + +```go +func WithAIEngine(engine string) AIOption +``` + +#### Parameters + + + +#### Returns + +`AIOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 453. + +*** + +### WithAIParams + +WithAIParams sets arbitrary AI parameters. + +#### Signature + +```go +func WithAIParams(params map[string]any) AIOption +``` + +#### Parameters + + + +#### Returns + +`AIOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 474. + +*** + +### WithAIPostPrompt + +WithAIPostPrompt sets the AI post-prompt configuration. + +#### Signature + +```go +func WithAIPostPrompt(pp map[string]any) AIOption +``` + +#### Parameters + + + +#### Returns + +`AIOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 467. + +*** + +### WithAIPrompt + +WithAIPrompt sets the AI prompt text. + +#### Signature + +```go +func WithAIPrompt(prompt map[string]any) AIOption +``` + +#### Parameters + + + +#### Returns + +`AIOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 460. + +*** + +### WithAMDDetectInterruptions + +WithAMDDetectInterruptions sets detect\_interruptions (Python detect\_answering\_machine). + +#### Signature + +```go +func WithAMDDetectInterruptions(enabled bool) AMDOption +``` + +#### Parameters + + + +#### Returns + +`AMDOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 165. + +*** + +### WithAMDDetectMessageEnd + +WithAMDDetectMessageEnd sets detect\_message\_end (Python detect\_answering\_machine). + +#### Signature + +```go +func WithAMDDetectMessageEnd(enabled bool) AMDOption +``` + +#### Parameters + + + +#### Returns + +`AMDOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 170. + +*** + +### WithAMDEndSilenceTimeout + +WithAMDEndSilenceTimeout sets end\_silence\_timeout (Python detect\_answering\_machine). + +#### Signature + +```go +func WithAMDEndSilenceTimeout(seconds float64) AMDOption +``` + +#### Parameters + + + +#### Returns + +`AMDOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 150. + +*** + +### WithAMDInitialTimeout + +WithAMDInitialTimeout sets initial\_timeout (Python detect\_answering\_machine). + +#### Signature + +```go +func WithAMDInitialTimeout(seconds float64) AMDOption +``` + +#### Parameters + + + +#### Returns + +`AMDOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 145. + +*** + +### WithAMDMachineVoiceThreshold + +WithAMDMachineVoiceThreshold sets machine\_voice\_threshold (Python detect\_answering\_machine). + +#### Signature + +```go +func WithAMDMachineVoiceThreshold(threshold float64) AMDOption +``` + +#### Parameters + + + +#### Returns + +`AMDOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 155. + +*** + +### WithAMDMachineWordsThreshold + +WithAMDMachineWordsThreshold sets machine\_words\_threshold (Python detect\_answering\_machine). + +#### Signature + +```go +func WithAMDMachineWordsThreshold(threshold int) AMDOption +``` + +#### Parameters + + + +#### Returns + +`AMDOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 160. + +*** + +### WithAMDTimeout + +WithAMDTimeout sets the overall detect timeout in seconds (Python detect\_answering\_machine timeout). + +#### Signature + +```go +func WithAMDTimeout(seconds float64) AMDOption +``` + +#### Parameters + + + +#### Returns + +`AMDOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 175. + +*** + +### WithAudioVolume + +WithAudioVolume sets the playback volume in dB (Python play\_audio/prompt\_audio volume). + +#### Signature + +```go +func WithAudioVolume(db float64) AudioOption +``` + +#### Parameters + + + +#### Returns + +`AudioOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 104. + +*** + +### WithConferenceBeep + +WithConferenceBeep enables beep on join/leave. + +#### Signature + +```go +func WithConferenceBeep(beep string) ConferenceOption +``` + +#### Parameters + + + +#### Returns + +`ConferenceOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 311. + +*** + +### WithConferenceDeaf + +WithConferenceDeaf joins deaf (cannot hear others). + +#### Signature + +```go +func WithConferenceDeaf(deaf bool) ConferenceOption +``` + +#### Parameters + + + +#### Returns + +`ConferenceOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 325. + +*** + +### WithConferenceMuted + +WithConferenceMuted joins muted. + +#### Signature + +```go +func WithConferenceMuted(muted bool) ConferenceOption +``` + +#### Parameters + + + +#### Returns + +`ConferenceOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 318. + +*** + +### WithConnectRingback + +WithConnectRingback sets ringback media for the connect operation. + +#### Signature + +```go +func WithConnectRingback(media []map[string]any) ConnectOption +``` + +#### Parameters + + + +#### Returns + +`ConnectOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 278. + +*** + +### WithContexts + +WithContexts sets the contexts to subscribe to for inbound events. + +#### Signature + +```go +func WithContexts(contexts ...string) ClientOption +``` + +#### Parameters + + + +#### Returns + +`ClientOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 518. + +*** + +### WithDialClientTimeout + +WithDialClientTimeout bounds how long Dial() will wait for the calling.call.dial event before raising a timeout error. Mirrors Python's dial(dial\_timeout=\). Default is 120s when omitted. + +The duration is consumed by the Go Dial() loop; it never goes on the wire — that's why it's stored under an underscore-prefixed key removed before transmit. + +#### Signature + +```go +func WithDialClientTimeout(d time.Duration) DialOption +``` + +#### Parameters + + + +#### Returns + +`DialOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 566. + +*** + +### WithDialFromNumber + +WithDialFromNumber sets the caller ID for the outbound call. + +#### Signature + +```go +func WithDialFromNumber(from string) DialOption +``` + +#### Parameters + + + +#### Returns + +`DialOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 535. + +*** + +### WithDialMaxDuration + +WithDialMaxDuration sets the maximum call duration in minutes. Mirrors Python's dial(max\_duration=...) parameter. + +#### Signature + +```go +func WithDialMaxDuration(minutes int) DialOption +``` + +#### Parameters + + + +#### Returns + +`DialOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 574. + +*** + +### WithDialTag + +WithDialTag sets an explicit caller-supplied dial tag. When omitted the SDK generates a UUID, mirroring Python's `tag = tag or str(uuid.uuid4())` at relay/client.py:368. + +#### Signature + +```go +func WithDialTag(tag string) DialOption +``` + +#### Parameters + + + +#### Returns + +`DialOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 553. + +*** + +### WithDialTimeout + +WithDialTimeout sets the legacy per-leg dial timeout in seconds. (Was the only Go option; retained for back-compat. To bound the overall Dial() call use WithDialClientTimeout.) + +#### Signature + +```go +func WithDialTimeout(t int) DialOption +``` + +#### Parameters + + + +#### Returns + +`DialOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 544. + +*** + +### WithDigitDigits + +WithDigitDigits restricts detection to the given DTMF digit set, nested inside the detect params (Python detect\_digit digits). + +#### Signature + +```go +func WithDigitDigits(digits string) DetectDigitOption +``` + +#### Parameters + + + +#### Returns + +`DetectDigitOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 128. + +*** + +### WithDigitTimeout + +WithDigitTimeout sets the detect timeout in seconds (Python detect\_digit timeout). + +#### Signature + +```go +func WithDigitTimeout(seconds float64) DetectDigitOption +``` + +#### Parameters + + + +#### Returns + +`DetectDigitOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 133. + +*** + +### WithEnvDefaults + +WithEnvDefaults is now a no-op pass-through retained for backwards compatibility — env defaults are loaded automatically at the end of NewRelayClient (mirroring Python RelayClient.**init**). New code can rely on the auto-load behavior and omit this option entirely. + +#### Signature + +```go +func WithEnvDefaults() ClientOption +``` + +#### Returns + +`ClientOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 663. + +*** + +### WithFaxControlID + +WithFaxControlID supplies an explicit control\_id for the fax action, matching Python's send\_fax(control\_id=...) / receive\_fax(control\_id=...). + +#### Signature + +```go +func WithFaxControlID(id string) FaxOption +``` + +#### Parameters + + + +#### Returns + +`FaxOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 345. + +*** + +### WithFaxDetectTimeout + +WithFaxDetectTimeout sets the detect timeout in seconds (Python detect\_fax timeout). + +#### Signature + +```go +func WithFaxDetectTimeout(seconds float64) DetectFaxOption +``` + +#### Parameters + + + +#### Returns + +`DetectFaxOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 189. + +*** + +### WithFaxHeaderInfo + +WithFaxHeaderInfo sets the fax header info string (matches Python's header\_info param). + +#### Signature + +```go +func WithFaxHeaderInfo(headerInfo string) FaxOption +``` + +#### Parameters + + + +#### Returns + +`FaxOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 335. + +*** + +### WithFaxTone + +WithFaxTone restricts fax detection to a specific tone (CED/CNG), nested inside the detect params (Python detect\_fax tone). + +#### Signature + +```go +func WithFaxTone(tone string) DetectFaxOption +``` + +#### Parameters + + + +#### Returns + +`DetectFaxOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 184. + +*** + +### WithJWT + +WithJWT sets a pre-existing JWT for authentication. + +#### Signature + +```go +func WithJWT(jwt string) ClientOption +``` + +#### Parameters + + + +#### Returns + +`ClientOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 504. + +*** + +### WithMaxActiveCalls + +WithMaxActiveCalls limits the number of concurrent active calls. + +#### Signature + +```go +func WithMaxActiveCalls(n int) ClientOption +``` + +#### Parameters + + + +#### Returns + +`ClientOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 525. + +*** + +### WithMessageContext + +WithMessageContext sets the routing context for the message. Mirrors Python's send\_message(context=...) parameter — defaults to the relay protocol when omitted. + +#### Signature + +```go +func WithMessageContext(ctx string) MessageOption +``` + +#### Parameters + + + +#### Returns + +`MessageOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 607. + +*** + +### WithMessageMedia + +WithMessageMedia adds media URLs to the message (MMS). + +#### Signature + +```go +func WithMessageMedia(urls []string) MessageOption +``` + +#### Parameters + + + +#### Returns + +`MessageOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 584. + +*** + +### WithMessageOnCompleted + +WithMessageOnCompleted registers a callback invoked when the message reaches a terminal state (delivered, undelivered, or failed). The callback receives both the message and the terminal RelayEvent, mirroring Python's \_on\_completed callback contract (relay/message.py:115-117) which receives the event directly. Mirrors Python's send\_message(on\_completed=...) parameter. + +#### Signature + +```go +func WithMessageOnCompleted(cb func(*Message, *RelayEvent)) MessageOption +``` + +#### Parameters + + + +#### Returns + +`MessageOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 618. + +*** + +### WithMessageRegion + +WithMessageRegion sets the region for message delivery. + +#### Signature + +```go +func WithMessageRegion(region string) MessageOption +``` + +#### Parameters + + + +#### Returns + +`MessageOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 591. + +*** + +### WithMessageTags + +WithMessageTags sets tags on the message for tracking. + +#### Signature + +```go +func WithMessageTags(tags []string) MessageOption +``` + +#### Parameters + + + +#### Returns + +`MessageOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 598. + +*** + +### WithPayChargeAmount + +WithPayChargeAmount sets the charge amount. + +#### Signature + +```go +func WithPayChargeAmount(amount string) PayOption +``` + +#### Parameters + + + +#### Returns + +`PayOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 404. + +*** + +### WithPayControlID + +WithPayControlID supplies an explicit control\_id for the pay action, matching Python's pay(control\_id=...). + +#### Signature + +```go +func WithPayControlID(id string) PayOption +``` + +#### Parameters + + + +#### Returns + +`PayOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 354. + +*** + +### WithPayCurrency + +WithPayCurrency sets the payment currency. + +#### Signature + +```go +func WithPayCurrency(currency string) PayOption +``` + +#### Parameters + + + +#### Returns + +`PayOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 409. + +*** + +### WithPayDescription + +WithPayDescription sets a description for the payment. + +#### Signature + +```go +func WithPayDescription(desc string) PayOption +``` + +#### Parameters + + + +#### Returns + +`PayOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 424. + +*** + +### WithPayInputMethod + +WithPayInputMethod sets the payment input method. + +#### Signature + +```go +func WithPayInputMethod(method string) PayOption +``` + +#### Parameters + + + +#### Returns + +`PayOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 359. + +*** + +### WithPayLanguage + +WithPayLanguage sets the language for payment prompts. + +#### Signature + +```go +func WithPayLanguage(language string) PayOption +``` + +#### Parameters + + + +#### Returns + +`PayOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 414. + +*** + +### WithPayMaxAttempts + +WithPayMaxAttempts sets the maximum number of payment attempts. + +#### Signature + +```go +func WithPayMaxAttempts(max string) PayOption +``` + +#### Parameters + + + +#### Returns + +`PayOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 379. + +*** + +### WithPayMinPostalCodeLength + +WithPayMinPostalCodeLength sets the minimum postal code length. + +#### Signature + +```go +func WithPayMinPostalCodeLength(length string) PayOption +``` + +#### Parameters + + + +#### Returns + +`PayOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 394. + +*** + +### WithPayParameters + +WithPayParameters sets additional payment parameters. + +#### Signature + +```go +func WithPayParameters(parameters []map[string]any) PayOption +``` + +#### Parameters + + + +#### Returns + +`PayOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 434. + +*** + +### WithPayPaymentMethod + +WithPayPaymentMethod sets the payment method (e.g. "credit-card"). + +#### Signature + +```go +func WithPayPaymentMethod(method string) PayOption +``` + +#### Parameters + + + +#### Returns + +`PayOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 369. + +*** + +### WithPayPostalCode + +WithPayPostalCode sets whether to collect postal code. + +#### Signature + +```go +func WithPayPostalCode(code string) PayOption +``` + +#### Parameters + + + +#### Returns + +`PayOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 389. + +*** + +### WithPayPrompts + +WithPayPrompts sets custom payment prompts. + +#### Signature + +```go +func WithPayPrompts(prompts []map[string]any) PayOption +``` + +#### Parameters + + + +#### Returns + +`PayOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 439. + +*** + +### WithPaySecurityCode + +WithPaySecurityCode sets whether to collect security code. + +#### Signature + +```go +func WithPaySecurityCode(code string) PayOption +``` + +#### Parameters + + + +#### Returns + +`PayOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 384. + +*** + +### WithPayStatusURL + +WithPayStatusURL sets the payment status callback URL. + +#### Signature + +```go +func WithPayStatusURL(url string) PayOption +``` + +#### Parameters + + + +#### Returns + +`PayOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 364. + +*** + +### WithPayTimeout + +WithPayTimeout sets the timeout string for the payment session. + +#### Signature + +```go +func WithPayTimeout(timeout string) PayOption +``` + +#### Parameters + + + +#### Returns + +`PayOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 374. + +*** + +### WithPayTokenType + +WithPayTokenType sets the payment token type. + +#### Signature + +```go +func WithPayTokenType(tokenType string) PayOption +``` + +#### Parameters + + + +#### Returns + +`PayOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 399. + +*** + +### WithPayValidCardTypes + +WithPayValidCardTypes sets the valid card types string. + +#### Signature + +```go +func WithPayValidCardTypes(types string) PayOption +``` + +#### Parameters + + + +#### Returns + +`PayOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 429. + +*** + +### WithPayVoice + +WithPayVoice sets the voice for payment prompts. + +#### Signature + +```go +func WithPayVoice(voice string) PayOption +``` + +#### Parameters + + + +#### Returns + +`PayOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 419. + +*** + +### WithPlayControlID + +WithPlayControlID sets an explicit control\_id for the play action. Mirrors Python's play(control\_id=...). When omitted the SDK auto-generates a UUID. The same key is honored by play\_and\_collect. + +#### Signature + +```go +func WithPlayControlID(id string) PlayOption +``` + +#### Parameters + + + +#### Returns + +`PlayOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 27. + +*** + +### WithPlayDirection + +WithPlayDirection sets the play direction (e.g. "self" / "peer" / "both"). + +#### Signature + +```go +func WithPlayDirection(dir string) PlayOption +``` + +#### Parameters + + + +#### Returns + +`PlayOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 34. + +*** + +### WithPlayLoop + +WithPlayLoop sets the number of loop iterations for playback. + +#### Signature + +```go +func WithPlayLoop(n int) PlayOption +``` + +#### Parameters + + + +#### Returns + +`PlayOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 41. + +*** + +### WithPlayOnCompleted + +WithPlayOnCompleted registers a callback fired when the play action reaches a terminal state. Mirrors Python's play(on\_completed=...). + +#### Signature + +```go +func WithPlayOnCompleted(cb func(*RelayEvent)) PlayOption +``` + +#### Parameters + + + +#### Returns + +`PlayOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 49. + +*** + +### WithPlayVolume + +WithPlayVolume sets the volume for playback in dB. + +#### Signature + +```go +func WithPlayVolume(db float64) PlayOption +``` + +#### Parameters + + + +#### Returns + +`PlayOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 18. + +*** + +### WithProject + +WithProject sets the project ID for authentication. + +#### Signature + +```go +func WithProject(id string) ClientOption +``` + +#### Parameters + + + +#### Returns + +`ClientOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 490. + +*** + +### WithRecordAudio + +WithRecordAudio sets the audio config map for the record action's "record": \{"audio": ...\} payload. Mirrors Python's record(audio=...). + +#### Signature + +```go +func WithRecordAudio(audio map[string]any) RecordOption +``` + +#### Parameters + + + +#### Returns + +`RecordOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 259. + +*** + +### WithRecordBeep + +WithRecordBeep enables a beep before recording. + +#### Signature + +```go +func WithRecordBeep(beep bool) RecordOption +``` + +#### Parameters + + + +#### Returns + +`RecordOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 197. + +*** + +### WithRecordControlID + +WithRecordControlID sets an explicit control\_id for the record action. Mirrors Python's record(control\_id=...). + +#### Signature + +```go +func WithRecordControlID(id string) RecordOption +``` + +#### Parameters + + + +#### Returns + +`RecordOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 251. + +*** + +### WithRecordDirection + +WithRecordDirection sets the recording direction ("listen", "speak", "both"). + +#### Signature + +```go +func WithRecordDirection(dir string) RecordOption +``` + +#### Parameters + + + +#### Returns + +`RecordOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 222. + +*** + +### WithRecordEndSilenceTimeout + +WithRecordEndSilenceTimeout sets the end-of-speech silence timeout in seconds. + +#### Signature + +```go +func WithRecordEndSilenceTimeout(t float64) RecordOption +``` + +#### Parameters + + + +#### Returns + +`RecordOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 243. + +*** + +### WithRecordFormat + +WithRecordFormat sets the recording format (e.g. "wav", "mp3"). The parameter is the defined string type swaig.RecordFormat: the Format\* constants give autocomplete + a compile-time typo check, while Go's untyped-constant auto-conversion keeps a bare "wav" literal compiling. The value is stored as a plain string so the wire shape is unchanged. + +#### Signature + +```go +func WithRecordFormat(format swaig.RecordFormat) RecordOption +``` + +#### Parameters + + + +#### Returns + +`RecordOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 208. + +*** + +### WithRecordInitialTimeout + +WithRecordInitialTimeout sets the initial timeout in seconds. + +#### Signature + +```go +func WithRecordInitialTimeout(t float64) RecordOption +``` + +#### Parameters + + + +#### Returns + +`RecordOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 236. + +*** + +### WithRecordOnCompleted + +WithRecordOnCompleted registers a callback fired when the record action reaches a terminal state. Mirrors Python's record(on\_completed=...). + +#### Signature + +```go +func WithRecordOnCompleted(cb func(*RelayEvent)) RecordOption +``` + +#### Parameters + + + +#### Returns + +`RecordOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 268. + +*** + +### WithRecordStereo + +WithRecordStereo enables stereo recording. + +#### Signature + +```go +func WithRecordStereo(stereo bool) RecordOption +``` + +#### Parameters + + + +#### Returns + +`RecordOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 215. + +*** + +### WithRecordTerminators + +WithRecordTerminators sets DTMF terminators to stop recording. + +#### Signature + +```go +func WithRecordTerminators(terminators string) RecordOption +``` + +#### Parameters + + + +#### Returns + +`RecordOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 229. + +*** + +### WithRingtoneDuration + +WithRingtoneDuration sets how long the ringtone plays, in seconds (Python play\_ringtone duration). It is nested inside the ringtone media params, matching Python's “\{"type":"ringtone","params":\{"duration":...\}\}“. + +#### Signature + +```go +func WithRingtoneDuration(seconds float64) RingtoneOption +``` + +#### Parameters + + + +#### Returns + +`RingtoneOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 114. + +*** + +### WithRingtoneVolume + +WithRingtoneVolume sets the playback volume in dB (Python play\_ringtone volume). + +#### Signature + +```go +func WithRingtoneVolume(db float64) RingtoneOption +``` + +#### Parameters + + + +#### Returns + +`RingtoneOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 119. + +*** + +### WithSpace + +WithSpace sets the SignalWire space (e.g. "example.signalwire.com"). + +#### Signature + +```go +func WithSpace(space string) ClientOption +``` + +#### Parameters + + + +#### Returns + +`ClientOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 511. + +*** + +### WithStreamCodec + +WithStreamCodec sets the stream audio codec. + +#### Signature + +```go +func WithStreamCodec(codec string) StreamOption +``` + +#### Parameters + + + +#### Returns + +`StreamOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 301. + +*** + +### WithStreamControlID + +WithStreamControlID supplies an explicit control\_id for the stream action, matching Python's stream(control\_id=...). + +#### Signature + +```go +func WithStreamControlID(id string) StreamOption +``` + +#### Parameters + + + +#### Returns + +`StreamOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 289. + +*** + +### WithStreamDirection + +WithStreamDirection sets the stream direction. + +#### Signature + +```go +func WithStreamDirection(dir string) StreamOption +``` + +#### Parameters + + + +#### Returns + +`StreamOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 294. + +*** + +### WithToken + +WithToken sets the API token for authentication. + +#### Signature + +```go +func WithToken(token string) ClientOption +``` + +#### Parameters + + + +#### Returns + +`ClientOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 497. + +*** + +### WithTTSGender + +WithTTSGender sets the TTS voice gender (Python play\_tts/prompt\_tts gender). The parameter is the defined string type TTSGender: the GenderMale / GenderFemale constants give autocomplete + a compile-time typo check, while Go's untyped-constant auto-conversion keeps a bare "female" literal compiling. The value is stored as a plain string so the wire shape is identical to the reference's str gender. + +#### Signature + +```go +func WithTTSGender(gender TTSGender) TTSOption +``` + +#### Parameters + + + +#### Returns + +`TTSOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 86. + +*** + +### WithTTSLanguage + +WithTTSLanguage sets the TTS language (Python play\_tts/prompt\_tts language). + +#### Signature + +```go +func WithTTSLanguage(language string) TTSOption +``` + +#### Parameters + + + +#### Returns + +`TTSOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 76. + +*** + +### WithTTSVoice + +WithTTSVoice sets the TTS voice (Python play\_tts/prompt\_tts voice). + +#### Signature + +```go +func WithTTSVoice(voice string) TTSOption +``` + +#### Parameters + + + +#### Returns + +`TTSOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 91. + +*** + +### WithTTSVolume + +WithTTSVolume sets the playback volume in dB (Python play\_tts/prompt\_tts volume). + +#### Signature + +```go +func WithTTSVolume(db float64) TTSOption +``` + +#### Parameters + + + +#### Returns + +`TTSOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 96. + +## Type Aliases + +### AIOption + +AIOption configures an AI operation on a call. + +#### Signature + +```go +type AIOption alias +``` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 444. + +*** + +### AMDOption + +AMDOption configures a DetectAnsweringMachine call. Each option maps to one Python detect\_answering\_machine keyword argument and is nested inside the “\{"type":"machine","params":\{...\}\}“ detect media entry — only the options the caller supplies are emitted (matching Python's only-provided-keys behavior). + +#### Signature + +```go +type AMDOption alias +``` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 142. + +*** + +### AudioOption + +AudioOption configures a PlayAudio or PromptAudio call. + +#### Signature + +```go +type AudioOption alias +``` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 101. + +*** + +### ClientOption + +ClientOption configures the RELAY Client. + +#### Signature + +```go +type ClientOption alias +``` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 487. + +*** + +### ConferenceOption + +ConferenceOption configures a JoinConference call. + +#### Signature + +```go +type ConferenceOption alias +``` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 308. + +*** + +### ConnectOption + +ConnectOption configures a Connect call. + +#### Signature + +```go +type ConnectOption alias +``` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 275. + +*** + +### DetectDigitOption + +DetectDigitOption configures a DetectDigit call. + +#### Signature + +```go +type DetectDigitOption alias +``` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 124. + +*** + +### DetectFaxOption + +DetectFaxOption configures a DetectFax call. + +#### Signature + +```go +type DetectFaxOption alias +``` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 180. + +*** + +### DialOption + +DialOption configures a Dial (outbound call) operation. + +#### Signature + +```go +type DialOption alias +``` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 532. + +*** + +### FaxOption + +FaxOption configures a SendFax call. + +#### Signature + +```go +type FaxOption alias +``` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 332. + +*** + +### MessageOption + +MessageOption configures a SendMessage operation. + +#### Signature + +```go +type MessageOption alias +``` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 581. + +*** + +### PayOption + +PayOption configures a Pay call. + +#### Signature + +```go +type PayOption alias +``` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 350. + +*** + +### PlayOption + +PlayOption configures a Play call. + +#### Signature + +```go +type PlayOption alias +``` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 15. + +*** + +### RecordOption + +RecordOption configures a Record call. + +#### Signature + +```go +type RecordOption alias +``` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 194. + +*** + +### RingtoneOption + +RingtoneOption configures a PlayRingtone call. + +#### Signature + +```go +type RingtoneOption alias +``` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 109. + +*** + +### StreamOption + +StreamOption configures a Stream call. + +#### Signature + +```go +type StreamOption alias +``` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 285. + +*** + +### TTSOption + +TTSOption configures a PlayTTS or PromptTTS call. It sets the language / gender / voice fields nested inside the “\{"type":"tts","params":\{...\}\}“ media entry and the top-level volume on the play frame. + +#### Signature + +```go +type TTSOption alias +``` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 73. + +## Enums + +### CallState + +CallState is the lifecycle state of a Call as a typed defined-string kind. The underlying string is the exact wire token (e.g. "answered"), so a CallState is interchangeable with the bare string the reference uses. + +Server-emitted and growable: prefer IsKnown()/IsTerminal() over an exhaustive switch so an unrecognized future state does not break callers. + +#### Signature + +```go +type CallState alias +``` + +#### Methods + +##### IsKnown + +IsKnown reports whether s is one of the documented call lifecycle states. A false result means the server emitted a state this SDK build doesn't name yet — the value is still carried, just not recognized. + +###### Signature + +```go +func (CallState) IsKnown() bool +``` + +###### Returns + +`bool` + +###### Source + +[`pkg/relay/states.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/states.go) + +Line 58. + +*** + +##### IsTerminal + +IsTerminal reports whether s is a terminal call state (no further transitions expected). For a call the single terminal state is "ended", matching Python's CALL\_STATE\_ENDED gate in relay/call.py (the \_ended future resolves only on "ended"). + +###### Signature + +```go +func (CallState) IsTerminal() bool +``` + +###### Returns + +`bool` + +###### Source + +[`pkg/relay/states.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/states.go) + +Line 70. + +*** + +##### String + +String returns the wire token (identical to the underlying string). + +###### Signature + +```go +func (CallState) String() string +``` + +###### Returns + +`string` + +###### Source + +[`pkg/relay/states.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/states.go) + +Line 53. + +#### Source + +[`pkg/relay/states.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/states.go) + +Line 39. + +*** + +### DialState + +DialState is the outcome state of a calling.dial operation as a typed defined-string kind, read from the wire "dial\_state" field. It is a SEPARATE vocabulary from CallState (and from the connect/bridge states): a dial progresses dialing -> answered (winner found) or dialing -> failed (no device answered). Grounded in Python relay/client.py:950. + +Distinct Go type from CallState/MessageState so the three can never be mixed. + +#### Signature + +```go +type DialState alias +``` + +#### Methods + +##### IsKnown + +IsKnown reports whether s is one of the documented dial outcome states. + +###### Signature + +```go +func (DialState) IsKnown() bool +``` + +###### Returns + +`bool` + +###### Source + +[`pkg/relay/states.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/states.go) + +Line 99. + +*** + +##### IsTerminal + +IsTerminal reports whether s is a terminal dial outcome — "answered" (a winning call was found) or "failed" (no device answered). "dialing" is progress and is NOT terminal. Mirrors Python's \_handle\_dial\_event, which resolves the dial future on "answered", rejects it on "failed", and treats "dialing" as a progress event that doesn't settle the future (relay/client.py:976-1006). + +###### Signature + +```go +func (DialState) IsTerminal() bool +``` + +###### Returns + +`bool` + +###### Source + +[`pkg/relay/states.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/states.go) + +Line 113. + +*** + +##### String + +String returns the wire token (identical to the underlying string). + +###### Signature + +```go +func (DialState) String() string +``` + +###### Returns + +`string` + +###### Source + +[`pkg/relay/states.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/states.go) + +Line 96. + +#### Source + +[`pkg/relay/states.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/states.go) + +Line 85. + +*** + +### MessageState + +MessageState is the delivery lifecycle state of a Message as a typed defined-string kind. The underlying string is the exact wire token (the "message\_state" field), so it is interchangeable with the bare string the reference uses. + +Server-emitted and growable: prefer IsKnown()/IsTerminal(). A SEPARATE vocabulary from CallState/DialState — distinct Go type. + +#### Signature + +```go +type MessageState alias +``` + +#### Methods + +##### IsKnown + +IsKnown reports whether s is one of the documented message delivery states. + +###### Signature + +```go +func (MessageState) IsKnown() bool +``` + +###### Returns + +`bool` + +###### Source + +[`pkg/relay/states.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/states.go) + +Line 146. + +*** + +##### IsTerminal + +IsTerminal reports whether s is a terminal OUTBOUND delivery state — one of delivered, undelivered, failed — matching Python's MESSAGE\_TERMINAL\_STATES (relay/constants.py). These are the states on which an outbound send settles. + +Note: the inbound terminal state "received" is intentionally NOT counted here, to mirror Python exactly (received is excluded from MESSAGE\_TERMINAL\_STATES — the inbound flow doesn't await). The internal helper isTerminalMessageState (message.go) additionally treats "received" as terminal so a Wait() on an inbound message returns immediately; that is a separate, behavior-only concern and is deliberately not folded into this grounded predicate. + +###### Signature + +```go +func (MessageState) IsTerminal() bool +``` + +###### Returns + +`bool` + +###### Source + +[`pkg/relay/states.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/states.go) + +Line 166. + +*** + +##### String + +String returns the wire token (identical to the underlying string). + +###### Signature + +```go +func (MessageState) String() string +``` + +###### Returns + +`string` + +###### Source + +[`pkg/relay/states.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/states.go) + +Line 143. + +#### Source + +[`pkg/relay/states.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/states.go) + +Line 128. + +*** + +### TTSGender + +TTSGender is the closed set of text-to-speech voice genders as a defined string type with typed constants. WithTTSGender (the play\_tts / prompt\_tts gender option) takes it, giving Go callers editor autocompletion plus call-site typo checking — a bare string like "femail" only fails downstream, whereas a mistyped constant fails to compile. + +Because Go auto-converts untyped string-constant literals to a defined string type, every call site keeps working both ways: + +``` +relay.WithTTSGender(relay.GenderFemale) // typed const — autocompleted +relay.WithTTSGender("female") // bare string literal still compiles +``` + +TTSGender is a string subtype, so the value written into the \{"type":"tts","params":\{"gender":...\}\} media entry is byte-identical to the bare string the reference uses — parity with Python's play\_tts/prompt\_tts gender keyword (a plain str). + +#### Signature + +```go +type TTSGender alias +``` + +#### Examples + + + + ```go + relay.WithTTSGender(relay.GenderFemale) // typed const — autocompleted + relay.WithTTSGender("female") // bare string literal still compiles + ``` + + + + ```go + relay.WithTTSGender(relay.GenderFemale) // typed const — autocompleted + relay.WithTTSGender("female") // bare string literal still compiles + ``` + + + +#### Source + +[`pkg/relay/tts_gender.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/tts_gender.go) + +Line 19. + +## Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/message-receive-event/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/message-receive-event/index.mdx new file mode 100644 index 0000000000..fb5ba3820f --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/message-receive-event/index.mdx @@ -0,0 +1,55 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/message-receive-event" +title: "MessageReceiveEvent" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.MessageReceiveEvent" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "github.com.signalwire.signalwire-go.pkg.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" +--- +# `MessageReceiveEvent` + +MessageReceiveEvent represents a messaging.receive event. + +## Signature + +```go +type MessageReceiveEvent struct +``` + +## Properties + + + + + + + + + + + + + + + MessageState matches Python's message\_state field. + + + + + + + + + + +## Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 703. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/message-state-event/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/message-state-event/index.mdx new file mode 100644 index 0000000000..dcbf30e19a --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/message-state-event/index.mdx @@ -0,0 +1,67 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/message-state-event" +title: "MessageStateEvent" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.MessageStateEvent" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "github.com.signalwire.signalwire-go.pkg.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" +--- +# `MessageStateEvent` + +MessageStateEvent represents a messaging.state event. + +## Signature + +```go +type MessageStateEvent struct +``` + +## Properties + + + Body matches Python's body field. + + + + Context matches Python's context field. + + + + + + + + Media matches Python's media: list\[str] field. + + + + + + MessageState reads wire key "message\_state" matching Python's message\_state field. (Replaces the previous State field which incorrectly read "state".) + + + + + + + + Segments matches Python's segments: int field. + + + + Tags matches Python's tags: list\[str] field. + + + + +## Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 756. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/message/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/message/index.mdx new file mode 100644 index 0000000000..6723d462b0 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/message/index.mdx @@ -0,0 +1,385 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/message" +title: "Message" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.Message" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "github.com.signalwire.signalwire-go.pkg.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/message.go" +--- +# `Message` + +Message represents an SMS/MMS message tracked through its lifecycle. + +## Signature + +```go +type Message struct +``` + +## Methods + +### Body + +Body returns the text body of the message. + +#### Signature + +```go +func (*Message) Body() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/relay/message.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/message.go) + +Line 60. + +*** + +### Context + +Context returns the RELAY context on which this message was received. + +#### Signature + +```go +func (*Message) Context() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/relay/message.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/message.go) + +Line 48. + +*** + +### Direction + +Direction returns "inbound" or "outbound". + +#### Signature + +```go +func (*Message) Direction() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/relay/message.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/message.go) + +Line 51. + +*** + +### FromNumber + +FromNumber returns the sender number. + +#### Signature + +```go +func (*Message) FromNumber() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/relay/message.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/message.go) + +Line 54. + +*** + +### IsDone + +IsDone returns true if the message has reached a terminal state. + +#### Signature + +```go +func (*Message) IsDone() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/relay/message.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/message.go) + +Line 123. + +*** + +### Media + +Media returns the list of media URLs attached to the message. + +#### Signature + +```go +func (*Message) Media() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/relay/message.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/message.go) + +Line 63. + +*** + +### MessageID + +MessageID returns the unique message identifier. + +#### Signature + +```go +func (*Message) MessageID() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/relay/message.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/message.go) + +Line 45. + +*** + +### MessageState + +MessageState returns the current message state as a typed MessageState ALONGSIDE the bare-string State() accessor (kept for parity with the Python reference). The typed kind gives callers IsTerminal()/IsKnown() predicates and compile-time distinctness from CallState/DialState; its underlying string equals State() exactly. Additive port idiom — see states.go and PORT\_ADDITIONS.md. + +#### Signature + +```go +func (*Message) MessageState() MessageState +``` + +#### Returns + +`MessageState` + +#### Source + +[`pkg/relay/message.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/message.go) + +Line 81. + +*** + +### On + +On registers an event handler called when message state changes. + +#### Signature + +```go +func (*Message) On(handler func(*RelayEvent)) +``` + +#### Parameters + + + +#### Source + +[`pkg/relay/message.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/message.go) + +Line 130. + +*** + +### Reason + +Reason returns the failure reason if the message failed. + +#### Signature + +```go +func (*Message) Reason() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/relay/message.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/message.go) + +Line 88. + +*** + +### Result + +Result returns the terminal RelayEvent if the message has reached a terminal state, or nil if not yet done. This is the non-blocking equivalent of Python's Message.result property. + +#### Signature + +```go +func (*Message) Result() *RelayEvent +``` + +#### Returns + +`*RelayEvent` + +#### Source + +[`pkg/relay/message.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/message.go) + +Line 100. + +*** + +### Segments + +Segments returns the number of SMS segments. + +#### Signature + +```go +func (*Message) Segments() int +``` + +#### Returns + +`int` + +#### Source + +[`pkg/relay/message.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/message.go) + +Line 66. + +*** + +### State + +State returns the current message state. + +#### Signature + +```go +func (*Message) State() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/relay/message.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/message.go) + +Line 69. + +*** + +### Tags + +Tags returns the tags associated with the message. + +#### Signature + +```go +func (*Message) Tags() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/relay/message.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/message.go) + +Line 95. + +*** + +### ToNumber + +ToNumber returns the recipient number. + +#### Signature + +```go +func (*Message) ToNumber() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/relay/message.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/message.go) + +Line 57. + +*** + +### Wait + +Wait blocks until the message reaches a terminal state or the context is cancelled. Returns the final event or the context error. + +#### Signature + +```go +func (*Message) Wait(ctx context.Context) (*RelayEvent, error) +``` + +#### Parameters + + + +#### Returns + +`(*RelayEvent, error)` + +#### Source + +[`pkg/relay/message.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/message.go) + +Line 111. + +## Source + +[`pkg/relay/message.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/message.go) + +Line 9. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/pay-action/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/pay-action/index.mdx new file mode 100644 index 0000000000..19e18e48de --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/pay-action/index.mdx @@ -0,0 +1,55 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/pay-action" +title: "PayAction" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.PayAction" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "github.com.signalwire.signalwire-go.pkg.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go" +--- +# `PayAction` + +PayAction represents a long-running pay operation. + +## Signature + +```go +type PayAction struct +``` + +## Properties + + + +## Methods + +### Stop + +Stop sends calling.pay.stop to halt the active pay operation. + +#### Signature + +```go +func (*PayAction) Stop() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 482. + +## Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 470. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/pay-event/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/pay-event/index.mdx new file mode 100644 index 0000000000..f67388b323 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/pay-event/index.mdx @@ -0,0 +1,39 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/pay-event" +title: "PayEvent" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.PayEvent" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "github.com.signalwire.signalwire-go.pkg.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" +--- +# `PayEvent` + +PayEvent represents a calling.call.pay event. + +## Signature + +```go +type PayEvent struct +``` + +## Properties + + + + + + + + + +## Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 547. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/play-action/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/play-action/index.mdx new file mode 100644 index 0000000000..f27cb9c34e --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/play-action/index.mdx @@ -0,0 +1,125 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/play-action" +title: "PlayAction" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.PlayAction" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "github.com.signalwire.signalwire-go.pkg.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go" +--- +# `PlayAction` + +PlayAction represents a long-running play operation with media controls. + +## Signature + +```go +type PlayAction struct +``` + +## Properties + + + +## Methods + +### Pause + +Pause pauses the currently playing media. + +#### Signature + +```go +func (*PlayAction) Pause() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 158. + +*** + +### Resume + +Resume resumes paused media playback. + +#### Signature + +```go +func (*PlayAction) Resume() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 171. + +*** + +### Stop + +Stop sends calling.play.stop to halt the active play operation. + +#### Signature + +```go +func (*PlayAction) Stop() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 145. + +*** + +### Volume + +Volume adjusts playback volume by the given dB offset. + +#### Signature + +```go +func (*PlayAction) Volume(db float64) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 184. + +## Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 129. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/play-event/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/play-event/index.mdx new file mode 100644 index 0000000000..7914b5a631 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/play-event/index.mdx @@ -0,0 +1,37 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/play-event" +title: "PlayEvent" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.PlayEvent" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "github.com.signalwire.signalwire-go.pkg.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" +--- +# `PlayEvent` + +PlayEvent represents a calling.call.play event. + +## Signature + +```go +type PlayEvent struct +``` + +## Properties + + + + + + + +## Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 267. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/queue-event/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/queue-event/index.mdx new file mode 100644 index 0000000000..c1023cb2d3 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/queue-event/index.mdx @@ -0,0 +1,51 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/queue-event" +title: "QueueEvent" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.QueueEvent" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "github.com.signalwire.signalwire-go.pkg.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" +--- +# `QueueEvent` + +QueueEvent represents a calling.call.queue event. + +## Signature + +```go +type QueueEvent struct +``` + +## Properties + + + + + + + QueueID reads wire key "id" matching Python's queue\_id = p.get("id", ""). + + + + QueueName reads wire key "name" matching Python's queue\_name = p.get("name", ""). (Previously read "queue\_name" which was wrong.) + + + + + + + + Status reads wire key "status" matching Python's status field. (Replaces the previous State field which incorrectly read "state".) + + +## Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 566. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/record-action/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/record-action/index.mdx new file mode 100644 index 0000000000..d1210a52c4 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/record-action/index.mdx @@ -0,0 +1,103 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/record-action" +title: "RecordAction" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.RecordAction" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "github.com.signalwire.signalwire-go.pkg.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go" +--- +# `RecordAction` + +RecordAction represents a long-running record operation. + +## Signature + +```go +type RecordAction struct +``` + +## Properties + + + +## Methods + +### Pause + +Pause pauses the active recording. An optional behavior string may be provided (e.g. "silence" or "skip") to control how the gap is handled. Pass no argument — or "" — to omit behavior, matching Python's pause(behavior: Optional\[str] = None) signature. + +#### Signature + +```go +func (*RecordAction) Pause(behavior ...string) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 228. + +*** + +### Resume + +Resume resumes a paused recording. + +#### Signature + +```go +func (*RecordAction) Resume() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 245. + +*** + +### Stop + +Stop sends calling.record.stop to halt the active recording. + +#### Signature + +```go +func (*RecordAction) Stop() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 212. + +## Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 198. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/record-event/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/record-event/index.mdx new file mode 100644 index 0000000000..765a2f0e31 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/record-event/index.mdx @@ -0,0 +1,49 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/record-event" +title: "RecordEvent" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.RecordEvent" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "github.com.signalwire.signalwire-go.pkg.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" +--- +# `RecordEvent` + +RecordEvent represents a calling.call.record event. + +## Signature + +```go +type RecordEvent struct +``` + +## Properties + + + + + Duration is float64 (matching Python's float) to preserve subsecond precision. + + + + Record is the raw nested record dict from the wire payload, matching Python's record field. + + + + + + + + + + +## Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 284. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/refer-event/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/refer-event/index.mdx new file mode 100644 index 0000000000..1e7c603102 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/refer-event/index.mdx @@ -0,0 +1,43 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/refer-event" +title: "ReferEvent" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.ReferEvent" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "github.com.signalwire.signalwire-go.pkg.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" +--- +# `ReferEvent` + +ReferEvent represents a calling.call.refer event. + +## Signature + +```go +type ReferEvent struct +``` + +## Properties + + + + + + + + + + + + + +## Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 504. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/relay-error/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/relay-error/index.mdx new file mode 100644 index 0000000000..2bd0d3cc93 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/relay-error/index.mdx @@ -0,0 +1,83 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/relay-error" +title: "RelayError" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.RelayError" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "github.com.signalwire.signalwire-go.pkg.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/error.go" +--- +# `RelayError` + +RelayError is a typed error returned by the RELAY protocol client. It carries the numeric code and message from the server so callers can programmatically inspect failures via errors.As. + +The error format matches Python's RelayError.**str**: "RELAY error \{code\}: \{message\}". + +A RelayError may also carry a wrapped sentinel (one of the Err\* values above) so the same value satisfies BOTH errors.As(\&RelayError) and errors.Is(err, ErrDialTimeout): the typed error preserves the server code/message, and the sentinel gives callers a stable, string-free branch. + +## Signature + +```go +type RelayError struct +``` + +## Properties + + + + + +## Methods + +### Error + +Error implements the built-in error interface. Format matches Python's RelayError.**str**: "RELAY error \{code\}: \{message\}". + +#### Signature + +```go +func (*RelayError) Error() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/relay/error.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/error.go) + +Line 59. + +*** + +### Unwrap + +Unwrap exposes the optional wrapped sentinel so errors.Is can match it. Returns nil for a plain server-issued RelayError (no sentinel attached). + +#### Signature + +```go +func (*RelayError) Unwrap() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/relay/error.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/error.go) + +Line 65. + +## Source + +[`pkg/relay/error.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/error.go) + +Line 51. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/relay-event/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/relay-event/index.mdx new file mode 100644 index 0000000000..558e2232fd --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/relay-event/index.mdx @@ -0,0 +1,225 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/relay-event" +title: "RelayEvent" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.RelayEvent" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "github.com.signalwire.signalwire-go.pkg.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" +--- +# `RelayEvent` + +RelayEvent is the base event type for all events received from the SignalWire RELAY service. It carries an event type string and a generic parameter map that can be queried via helper methods. + +## Signature + +```go +type RelayEvent struct +``` + +## Properties + + + CallID is the call identifier, populated from the "call\_id" wire key. Python base class always carries this field. + + + + + + + + Timestamp is the event timestamp (float for subsecond precision), populated from the "timestamp" wire key. + + +## Methods + +### GetBool + +GetBool returns the boolean value for a key in params, or false if missing/wrong type. + +#### Signature + +```go +func (*RelayEvent) GetBool(key string) bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 107. + +*** + +### GetBoolPtr + +GetBoolPtr returns a \*bool for a key in params, or nil if the key is absent. This matches Python's Optional\[bool] = None semantics. + +#### Signature + +```go +func (*RelayEvent) GetBoolPtr(key string) *bool +``` + +#### Parameters + + + +#### Returns + +`*bool` + +#### Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 131. + +*** + +### GetFloat64 + +GetFloat64 returns the float64 value for a key in params, or 0.0 if missing/wrong type. This preserves subsecond precision for duration and timestamp fields. + +#### Signature + +```go +func (*RelayEvent) GetFloat64(key string) float64 +``` + +#### Parameters + + + +#### Returns + +`float64` + +#### Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 81. + +*** + +### GetInt + +GetInt returns the integer value for a key in params, or 0 if missing/wrong type. + +#### Signature + +```go +func (*RelayEvent) GetInt(key string) int +``` + +#### Parameters + + + +#### Returns + +`int` + +#### Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 56. + +*** + +### GetMap + +GetMap returns the nested map for a key in params, or nil if missing/wrong type. + +#### Signature + +```go +func (*RelayEvent) GetMap(key string) map[string]any +``` + +#### Parameters + + + +#### Returns + +`map[string]any` + +#### Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 156. + +*** + +### GetString + +GetString returns the string value for a key in params, or "" if missing/wrong type. + +#### Signature + +```go +func (*RelayEvent) GetString(key string) string +``` + +#### Parameters + + + +#### Returns + +`string` + +#### Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 37. + +*** + +### GetStringSlice + +GetStringSlice returns a \[]string for a key in params whose wire value is \[]any. Returns nil if absent or wrong type. Matches Python list\[str] field behavior. + +#### Signature + +```go +func (*RelayEvent) GetStringSlice(key string) []string +``` + +#### Parameters + + + +#### Returns + +`[]string` + +#### Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 173. + +## Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 11. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/send-digits-event/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/send-digits-event/index.mdx new file mode 100644 index 0000000000..0ffa22968d --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/send-digits-event/index.mdx @@ -0,0 +1,37 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/send-digits-event" +title: "SendDigitsEvent" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.SendDigitsEvent" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "github.com.signalwire.signalwire-go.pkg.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" +--- +# `SendDigitsEvent` + +SendDigitsEvent represents a calling.call.send\_digits event. + +## Signature + +```go +type SendDigitsEvent struct +``` + +## Properties + + + + + + + +## Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 451. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/standalone-collect-action/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/standalone-collect-action/index.mdx new file mode 100644 index 0000000000..3e7b43ec0c --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/standalone-collect-action/index.mdx @@ -0,0 +1,77 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/standalone-collect-action" +title: "StandaloneCollectAction" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.StandaloneCollectAction" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "github.com.signalwire.signalwire-go.pkg.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go" +--- +# `StandaloneCollectAction` + +StandaloneCollectAction represents a standalone collect (without play). + +## Signature + +```go +type StandaloneCollectAction struct +``` + +## Properties + + + +## Methods + +### StartInputTimers + +StartInputTimers starts the initial\_timeout timer on an active standalone collect, equivalent to Python's StandaloneCollectAction.start\_input\_timers(). + +#### Signature + +```go +func (*StandaloneCollectAction) StartInputTimers() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 373. + +*** + +### Stop + +Stop sends calling.collect.stop to halt the standalone collect operation. + +#### Signature + +```go +func (*StandaloneCollectAction) Stop() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 359. + +## Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 345. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/stream-action/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/stream-action/index.mdx new file mode 100644 index 0000000000..7fbb7dd37d --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/stream-action/index.mdx @@ -0,0 +1,55 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/stream-action" +title: "StreamAction" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.StreamAction" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "github.com.signalwire.signalwire-go.pkg.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go" +--- +# `StreamAction` + +StreamAction represents a long-running media stream operation. + +## Signature + +```go +type StreamAction struct +``` + +## Properties + + + +## Methods + +### Stop + +Stop sends calling.stream.stop to halt the active stream operation. + +#### Signature + +```go +func (*StreamAction) Stop() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 457. + +## Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 445. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/stream-event/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/stream-event/index.mdx new file mode 100644 index 0000000000..7558164377 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/stream-event/index.mdx @@ -0,0 +1,45 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/stream-event" +title: "StreamEvent" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.StreamEvent" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "github.com.signalwire.signalwire-go.pkg.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" +--- +# `StreamEvent` + +StreamEvent represents a calling.call.stream event. + +## Signature + +```go +type StreamEvent struct +``` + +## Properties + + + + + Name is the stream name, matching Python's name field. + + + + + + + + URL is the stream URL, matching Python's url field. + + +## Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 428. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/tap-action/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/tap-action/index.mdx new file mode 100644 index 0000000000..a5d2297d2d --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/tap-action/index.mdx @@ -0,0 +1,55 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/tap-action" +title: "TapAction" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.TapAction" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "github.com.signalwire.signalwire-go.pkg.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go" +--- +# `TapAction` + +TapAction represents a long-running tap operation. + +## Signature + +```go +type TapAction struct +``` + +## Properties + + + +## Methods + +### Stop + +Stop sends calling.tap.stop to halt the active tap operation. + +#### Signature + +```go +func (*TapAction) Stop() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 432. + +## Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 420. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/tap-event/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/tap-event/index.mdx new file mode 100644 index 0000000000..6c1aa2d299 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/tap-event/index.mdx @@ -0,0 +1,43 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/tap-event" +title: "TapEvent" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.TapEvent" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "github.com.signalwire.signalwire-go.pkg.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" +--- +# `TapEvent` + +TapEvent represents a calling.call.tap event. + +## Signature + +```go +type TapEvent struct +``` + +## Properties + + + + + Device is the tap device dict, matching Python's device field. + + + + + + + + +## Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 406. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/transcribe-action/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/transcribe-action/index.mdx new file mode 100644 index 0000000000..5622a38435 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/transcribe-action/index.mdx @@ -0,0 +1,55 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/transcribe-action" +title: "TranscribeAction" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.TranscribeAction" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "github.com.signalwire.signalwire-go.pkg.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go" +--- +# `TranscribeAction` + +TranscribeAction represents a long-running transcription operation. + +## Signature + +```go +type TranscribeAction struct +``` + +## Properties + + + +## Methods + +### Stop + +Stop sends calling.transcribe.stop to halt the active transcription. + +#### Signature + +```go +func (*TranscribeAction) Stop() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 508. + +## Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 495. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/transcribe-event/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/transcribe-event/index.mdx new file mode 100644 index 0000000000..8c98f94fb4 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/transcribe-event/index.mdx @@ -0,0 +1,55 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/transcribe-event" +title: "TranscribeEvent" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.TranscribeEvent" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "github.com.signalwire.signalwire-go.pkg.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" +--- +# `TranscribeEvent` + +TranscribeEvent represents a calling.call.transcribe event. + +## Signature + +```go +type TranscribeEvent struct +``` + +## Properties + + + + + Duration is float64 for subsecond precision, matching Python's duration: float field. + + + + RecordingID is the recording identifier, matching Python's recording\_id field. + + + + + + Size is the recording size in bytes, matching Python's size field. + + + + + + + + URL is the transcription recording URL, matching Python's url field. + + +## Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 613. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/addresses-namespace/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/addresses-namespace/index.mdx new file mode 100644 index 0000000000..e8211f711b --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/addresses-namespace/index.mdx @@ -0,0 +1,137 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/addresses-namespace" +title: "AddressesNamespace" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.AddressesNamespace" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/addresses.go" +--- +# `AddressesNamespace` + +AddressesNamespace provides address management (no update endpoint). + +## Signature + +```go +type AddressesNamespace struct +``` + +## Properties + + + +## Methods + +### Create + +Create creates a new address. + +#### Signature + +```go +func (*AddressesNamespace) Create(data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/addresses.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/addresses.go) + +Line 28. + +*** + +### Delete + +Delete removes an address by ID. + +#### Signature + +```go +func (*AddressesNamespace) Delete(id string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/addresses.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/addresses.go) + +Line 38. + +*** + +### Get + +Get retrieves an address by ID. + +#### Signature + +```go +func (*AddressesNamespace) Get(id string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/addresses.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/addresses.go) + +Line 33. + +*** + +### List + +List lists all addresses. + +#### Signature + +```go +func (*AddressesNamespace) List(params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/addresses.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/addresses.go) + +Line 23. + +## Source + +[`pkg/rest/namespaces/addresses.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/addresses.go) + +Line 11. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/auto-materialized-webhook-resource/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/auto-materialized-webhook-resource/index.mdx new file mode 100644 index 0000000000..4d40c0cbbe --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/auto-materialized-webhook-resource/index.mdx @@ -0,0 +1,63 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/auto-materialized-webhook-resource" +title: "AutoMaterializedWebhookResource" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.AutoMaterializedWebhookResource" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go" +--- +# `AutoMaterializedWebhookResource` + +AutoMaterializedWebhookResource is a Fabric webhook resource that is normally auto-created by the phone\_numbers.Set\*Webhook helpers. Exposed for backwards compatibility: list/get/update/delete work as usual, but Create now emits a deprecation warning because creating a webhook resource directly produces an orphan that isn't bound to any phone number. + +## Signature + +```go +type AutoMaterializedWebhookResource struct +``` + +## Properties + + + +## Methods + +### Create + + + **Deprecated.** Creating a webhook Fabric resource directly produces an orphan not bound to any phone number. Use phone\_numbers.SetSwmlWebhook or phone\_numbers.SetCxmlWebhook instead; setting call\_handler on the phone number causes the server to auto-materialize the webhook resource. See porting-sdk's phone-binding.md. + + +Create sends a POST to create a new webhook resource. + +#### Signature + +```go +func (*AutoMaterializedWebhookResource) Create(data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 199. + +## Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 182. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/call-flow-options/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/call-flow-options/index.mdx new file mode 100644 index 0000000000..695a8a0812 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/call-flow-options/index.mdx @@ -0,0 +1,39 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/call-flow-options" +title: "CallFlowOptions" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.CallFlowOptions" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/phone_numbers.go" +--- +# `CallFlowOptions` + +CallFlowOptions holds optional fields for SetCallFlow. + +## Signature + +```go +type CallFlowOptions struct +``` + +## Properties + + + Extra passes through additional wire-level fields. + + + + Version accepts "working\_copy" or "current\_deployed" (server default when omitted). + + +## Source + +[`pkg/rest/namespaces/phone_numbers.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/phone_numbers.go) + +Line 125. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/call-flows-resource/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/call-flows-resource/index.mdx new file mode 100644 index 0000000000..fc46405b61 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/call-flows-resource/index.mdx @@ -0,0 +1,117 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/call-flows-resource" +title: "CallFlowsResource" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.CallFlowsResource" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go" +--- +# `CallFlowsResource` + +CallFlowsResource extends CrudResource with version management and a singular sub-resource path convention. + +## Signature + +```go +type CallFlowsResource struct +``` + +## Properties + + + +## Methods + +### DeployVersion + +DeployVersion deploys a new version of a call flow. + +#### Signature + +```go +func (*CallFlowsResource) DeployVersion(id string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 94. + +*** + +### ListAddresses + +ListAddresses lists addresses for a call flow (uses singular "call\_flow" path). + +#### Signature + +```go +func (*CallFlowsResource) ListAddresses(id string, params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 82. + +*** + +### ListVersions + +ListVersions lists versions of a call flow. + +#### Signature + +```go +func (*CallFlowsResource) ListVersions(id string, params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 88. + +## Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 77. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/calling-namespace/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/calling-namespace/index.mdx new file mode 100644 index 0000000000..821d53d4eb --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/calling-namespace/index.mdx @@ -0,0 +1,1065 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/calling-namespace" +title: "CallingNamespace" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.CallingNamespace" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go" +--- +# `CallingNamespace` + +CallingNamespace provides REST-based call control. All commands are dispatched as POST /api/calling/calls with a "command" field. + +## Signature + +```go +type CallingNamespace struct +``` + +## Properties + + + +## Methods + +### AIHold + +AIHold puts the AI on hold. + +#### Signature + +```go +func (*CallingNamespace) AIHold(callID string, params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 196. + +*** + +### AIMessage + +AIMessage sends a message to the AI agent on a call. + +#### Signature + +```go +func (*CallingNamespace) AIMessage(callID string, params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 191. + +*** + +### AIStop + +AIStop stops the AI session. + +#### Signature + +```go +func (*CallingNamespace) AIStop(callID string, params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 206. + +*** + +### AIUnhold + +AIUnhold takes the AI off hold. + +#### Signature + +```go +func (*CallingNamespace) AIUnhold(callID string, params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 201. + +*** + +### Collect + +Collect starts input collection on a call. + +#### Signature + +```go +func (*CallingNamespace) Collect(callID string, params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 114. + +*** + +### CollectStartInputTimers + +CollectStartInputTimers starts input timers for collection. + +#### Signature + +```go +func (*CallingNamespace) CollectStartInputTimers(callID string, params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 124. + +*** + +### CollectStop + +CollectStop stops input collection. + +#### Signature + +```go +func (*CallingNamespace) CollectStop(callID string, params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 119. + +*** + +### Denoise + +Denoise enables denoising on a call. + +#### Signature + +```go +func (*CallingNamespace) Denoise(callID string, params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 167. + +*** + +### DenoiseStop + +DenoiseStop disables denoising. + +#### Signature + +```go +func (*CallingNamespace) DenoiseStop(callID string, params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 172. + +*** + +### Detect + +Detect starts detection (e.g., answering machine) on a call. + +#### Signature + +```go +func (*CallingNamespace) Detect(callID string, params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 131. + +*** + +### DetectStop + +DetectStop stops detection. + +#### Signature + +```go +func (*CallingNamespace) DetectStop(callID string, params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 136. + +*** + +### Dial + +Dial initiates a new call. + +#### Signature + +```go +func (*CallingNamespace) Dial(params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 38. + +*** + +### Disconnect + +Disconnect disconnects a call. + +#### Signature + +```go +func (*CallingNamespace) Disconnect(callID string, params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 58. + +*** + +### End + +End terminates a call. + +#### Signature + +```go +func (*CallingNamespace) End(callID string, params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 48. + +*** + +### LiveTranscribe + +LiveTranscribe starts live transcription. + +#### Signature + +```go +func (*CallingNamespace) LiveTranscribe(callID string, params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 213. + +*** + +### LiveTranslate + +LiveTranslate starts live translation. + +#### Signature + +```go +func (*CallingNamespace) LiveTranslate(callID string, params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 218. + +*** + +### Play + +Play starts playback on a call. + +#### Signature + +```go +func (*CallingNamespace) Play(callID string, params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 65. + +*** + +### PlayPause + +PlayPause pauses playback. + +#### Signature + +```go +func (*CallingNamespace) PlayPause(callID string, params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 70. + +*** + +### PlayResume + +PlayResume resumes playback. + +#### Signature + +```go +func (*CallingNamespace) PlayResume(callID string, params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 75. + +*** + +### PlayStop + +PlayStop stops playback. + +#### Signature + +```go +func (*CallingNamespace) PlayStop(callID string, params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 80. + +*** + +### PlayVolume + +PlayVolume adjusts playback volume. + +#### Signature + +```go +func (*CallingNamespace) PlayVolume(callID string, params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 85. + +*** + +### ReceiveFaxStop + +ReceiveFaxStop stops receiving a fax. + +#### Signature + +```go +func (*CallingNamespace) ReceiveFaxStop(callID string, params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 230. + +*** + +### Record + +Record starts recording on a call. + +#### Signature + +```go +func (*CallingNamespace) Record(callID string, params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 92. + +*** + +### RecordPause + +RecordPause pauses recording. + +#### Signature + +```go +func (*CallingNamespace) RecordPause(callID string, params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 97. + +*** + +### RecordResume + +RecordResume resumes recording. + +#### Signature + +```go +func (*CallingNamespace) RecordResume(callID string, params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 102. + +*** + +### RecordStop + +RecordStop stops recording. + +#### Signature + +```go +func (*CallingNamespace) RecordStop(callID string, params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 107. + +*** + +### Refer + +Refer sends a SIP REFER on a call. + +#### Signature + +```go +func (*CallingNamespace) Refer(callID string, params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 237. + +*** + +### SendFaxStop + +SendFaxStop stops sending a fax. + +#### Signature + +```go +func (*CallingNamespace) SendFaxStop(callID string, params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 225. + +*** + +### Stream + +Stream starts streaming on a call. + +#### Signature + +```go +func (*CallingNamespace) Stream(callID string, params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 155. + +*** + +### StreamStop + +StreamStop stops streaming. + +#### Signature + +```go +func (*CallingNamespace) StreamStop(callID string, params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 160. + +*** + +### Tap + +Tap starts tapping a call. + +#### Signature + +```go +func (*CallingNamespace) Tap(callID string, params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 143. + +*** + +### TapStop + +TapStop stops tapping. + +#### Signature + +```go +func (*CallingNamespace) TapStop(callID string, params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 148. + +*** + +### Transcribe + +Transcribe starts transcription on a call. + +#### Signature + +```go +func (*CallingNamespace) Transcribe(callID string, params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 179. + +*** + +### TranscribeStop + +TranscribeStop stops transcription. + +#### Signature + +```go +func (*CallingNamespace) TranscribeStop(callID string, params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 184. + +*** + +### Transfer + +Transfer transfers a call. + +#### Signature + +```go +func (*CallingNamespace) Transfer(callID string, params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 53. + +*** + +### Update + +Update updates call parameters. + +#### Signature + +```go +func (*CallingNamespace) Update(params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 43. + +*** + +### UserEvent + +UserEvent sends a custom user event on a call. + +#### Signature + +```go +func (*CallingNamespace) UserEvent(callID string, params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 244. + +## Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 12. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/chat-namespace/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/chat-namespace/index.mdx new file mode 100644 index 0000000000..d7dea9c85b --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/chat-namespace/index.mdx @@ -0,0 +1,59 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/chat-namespace" +title: "ChatNamespace" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.ChatNamespace" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/chat.go" +--- +# `ChatNamespace` + +ChatNamespace provides Chat token generation. + +## Signature + +```go +type ChatNamespace struct +``` + +## Properties + + + +## Methods + +### CreateToken + +CreateToken creates a Chat token. + +#### Signature + +```go +func (*ChatNamespace) CreateToken(data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/chat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/chat.go) + +Line 23. + +## Source + +[`pkg/rest/namespaces/chat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/chat.go) + +Line 11. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-accounts/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-accounts/index.mdx new file mode 100644 index 0000000000..e641194235 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-accounts/index.mdx @@ -0,0 +1,139 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-accounts" +title: "CompatAccounts" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.CompatAccounts" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go" +--- +# `CompatAccounts` + +CompatAccounts provides compat account/subproject management. + +## Signature + +```go +type CompatAccounts struct +``` + +## Properties + + + +## Methods + +### Create + +Create creates a new compat account. + +#### Signature + +```go +func (*CompatAccounts) Create(data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 25. + +*** + +### Get + +Get retrieves a compat account by SID. + +#### Signature + +```go +func (*CompatAccounts) Get(sid string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 30. + +*** + +### List + +List lists all compat accounts. + +#### Signature + +```go +func (*CompatAccounts) List(params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 20. + +*** + +### Update + +Update updates a compat account by SID. + +#### Signature + +```go +func (*CompatAccounts) Update(sid string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 35. + +## Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 15. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-applications/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-applications/index.mdx new file mode 100644 index 0000000000..9928821c91 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-applications/index.mdx @@ -0,0 +1,61 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-applications" +title: "CompatApplications" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.CompatApplications" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go" +--- +# `CompatApplications` + +CompatApplications provides compat application management. + +## Signature + +```go +type CompatApplications struct +``` + +## Properties + + + +## Methods + +### Update + +Update updates an application (uses POST per Twilio compat). + +#### Signature + +```go +func (*CompatApplications) Update(sid string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 266. + +## Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 261. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-calls/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-calls/index.mdx new file mode 100644 index 0000000000..05bd9abb12 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-calls/index.mdx @@ -0,0 +1,177 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-calls" +title: "CompatCalls" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.CompatCalls" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go" +--- +# `CompatCalls` + +CompatCalls provides compat call management with recording and stream sub-resources. + +## Signature + +```go +type CompatCalls struct +``` + +## Properties + + + +## Methods + +### StartRecording + +StartRecording starts recording on a call. + +#### Signature + +```go +func (*CompatCalls) StartRecording(callSID string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 52. + +*** + +### StartStream + +StartStream starts a stream on a call. + +#### Signature + +```go +func (*CompatCalls) StartStream(callSID string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 62. + +*** + +### StopStream + +StopStream stops a stream on a call. + +#### Signature + +```go +func (*CompatCalls) StopStream(callSID string, streamSID string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 67. + +*** + +### Update + +Update updates a call (uses POST per Twilio compat). + +#### Signature + +```go +func (*CompatCalls) Update(sid string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 47. + +*** + +### UpdateRecording + +UpdateRecording updates a recording on a call. + +#### Signature + +```go +func (*CompatCalls) UpdateRecording(callSID string, recordingSID string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 57. + +## Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 42. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-conferences/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-conferences/index.mdx new file mode 100644 index 0000000000..fca1490055 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-conferences/index.mdx @@ -0,0 +1,399 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-conferences" +title: "CompatConferences" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.CompatConferences" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go" +--- +# `CompatConferences` + +CompatConferences provides compat conference management with participants, recordings, and streams. + +## Signature + +```go +type CompatConferences struct +``` + +## Properties + + + +## Methods + +### DeleteRecording + +DeleteRecording deletes a recording from a conference. + +#### Signature + +```go +func (*CompatConferences) DeleteRecording(conferenceSID string, recordingSID string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 188. + +*** + +### Get + +Get retrieves a conference by SID. + +#### Signature + +```go +func (*CompatConferences) Get(sid string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 139. + +*** + +### GetParticipant + +GetParticipant retrieves a participant from a conference. + +#### Signature + +```go +func (*CompatConferences) GetParticipant(conferenceSID string, callSID string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 156. + +*** + +### GetRecording + +GetRecording retrieves a recording from a conference. + +#### Signature + +```go +func (*CompatConferences) GetRecording(conferenceSID string, recordingSID string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 178. + +*** + +### List + +List lists all conferences. + +#### Signature + +```go +func (*CompatConferences) List(params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 134. + +*** + +### ListParticipants + +ListParticipants lists participants in a conference. + +#### Signature + +```go +func (*CompatConferences) ListParticipants(conferenceSID string, params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 151. + +*** + +### ListRecordings + +ListRecordings lists recordings for a conference. + +#### Signature + +```go +func (*CompatConferences) ListRecordings(conferenceSID string, params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 173. + +*** + +### RemoveParticipant + +RemoveParticipant removes a participant from a conference. + +#### Signature + +```go +func (*CompatConferences) RemoveParticipant(conferenceSID string, callSID string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 166. + +*** + +### StartStream + +StartStream starts a stream on a conference. + +#### Signature + +```go +func (*CompatConferences) StartStream(conferenceSID string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 195. + +*** + +### StopStream + +StopStream stops a stream on a conference. + +#### Signature + +```go +func (*CompatConferences) StopStream(conferenceSID string, streamSID string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 200. + +*** + +### Update + +Update updates a conference. + +#### Signature + +```go +func (*CompatConferences) Update(sid string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 144. + +*** + +### UpdateParticipant + +UpdateParticipant updates a participant in a conference. + +#### Signature + +```go +func (*CompatConferences) UpdateParticipant(conferenceSID string, callSID string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 161. + +*** + +### UpdateRecording + +UpdateRecording updates a recording in a conference. + +#### Signature + +```go +func (*CompatConferences) UpdateRecording(conferenceSID string, recordingSID string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 183. + +## Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 129. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-faxes/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-faxes/index.mdx new file mode 100644 index 0000000000..3a38b99ee6 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-faxes/index.mdx @@ -0,0 +1,145 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-faxes" +title: "CompatFaxes" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.CompatFaxes" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go" +--- +# `CompatFaxes` + +CompatFaxes provides compat fax management with media sub-resources. + +## Signature + +```go +type CompatFaxes struct +``` + +## Properties + + + +## Methods + +### DeleteMedia + +DeleteMedia deletes a media item from a fax. + +#### Signature + +```go +func (*CompatFaxes) DeleteMedia(faxSID string, mediaSID string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 121. + +*** + +### GetMedia + +GetMedia retrieves a specific media item from a fax. + +#### Signature + +```go +func (*CompatFaxes) GetMedia(faxSID string, mediaSID string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 116. + +*** + +### ListMedia + +ListMedia lists media for a fax. + +#### Signature + +```go +func (*CompatFaxes) ListMedia(faxSID string, params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 111. + +*** + +### Update + +Update updates a fax (uses POST per Twilio compat). + +#### Signature + +```go +func (*CompatFaxes) Update(sid string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 106. + +## Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 101. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-laml-bins/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-laml-bins/index.mdx new file mode 100644 index 0000000000..22188efeda --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-laml-bins/index.mdx @@ -0,0 +1,61 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-laml-bins" +title: "CompatLamlBins" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.CompatLamlBins" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go" +--- +# `CompatLamlBins` + +CompatLamlBins provides compat cXML/LaML script management. + +## Signature + +```go +type CompatLamlBins struct +``` + +## Properties + + + +## Methods + +### Update + +Update updates a LaML bin (uses POST per Twilio compat). + +#### Signature + +```go +func (*CompatLamlBins) Update(sid string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 278. + +## Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 273. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-messages/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-messages/index.mdx new file mode 100644 index 0000000000..3dcfd51ab1 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-messages/index.mdx @@ -0,0 +1,145 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-messages" +title: "CompatMessages" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.CompatMessages" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go" +--- +# `CompatMessages` + +CompatMessages provides compat message management with media sub-resources. + +## Signature + +```go +type CompatMessages struct +``` + +## Properties + + + +## Methods + +### DeleteMedia + +DeleteMedia deletes a media item from a message. + +#### Signature + +```go +func (*CompatMessages) DeleteMedia(messageSID string, mediaSID string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 94. + +*** + +### GetMedia + +GetMedia retrieves a specific media item from a message. + +#### Signature + +```go +func (*CompatMessages) GetMedia(messageSID string, mediaSID string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 89. + +*** + +### ListMedia + +ListMedia lists media for a message. + +#### Signature + +```go +func (*CompatMessages) ListMedia(messageSID string, params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 84. + +*** + +### Update + +Update updates a message (uses POST per Twilio compat). + +#### Signature + +```go +func (*CompatMessages) Update(sid string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 79. + +## Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 74. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-namespace/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-namespace/index.mdx new file mode 100644 index 0000000000..a4f26168a2 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-namespace/index.mdx @@ -0,0 +1,55 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-namespace" +title: "CompatNamespace" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.CompatNamespace" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go" +--- +# `CompatNamespace` + +CompatNamespace provides the Twilio-compatible LAML API with AccountSid scoping. + +## Signature + +```go +type CompatNamespace struct +``` + +## Properties + + + + + + + + + + + + + + + + + + + + + + + + + +## Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 378. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-phone-numbers/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-phone-numbers/index.mdx new file mode 100644 index 0000000000..0f8fa38c5a --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-phone-numbers/index.mdx @@ -0,0 +1,273 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-phone-numbers" +title: "CompatPhoneNumbers" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.CompatPhoneNumbers" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go" +--- +# `CompatPhoneNumbers` + +CompatPhoneNumbers provides compat phone number management. + +## Signature + +```go +type CompatPhoneNumbers struct +``` + +## Properties + + + +## Methods + +### Delete + +Delete releases an incoming phone number. + +#### Signature + +```go +func (*CompatPhoneNumbers) Delete(sid string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 233. + +*** + +### Get + +Get retrieves an incoming phone number by SID. + +#### Signature + +```go +func (*CompatPhoneNumbers) Get(sid string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 223. + +*** + +### ImportNumber + +ImportNumber imports an externally-hosted phone number. + +#### Signature + +```go +func (*CompatPhoneNumbers) ImportNumber(data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 238. + +*** + +### List + +List lists all incoming phone numbers. + +#### Signature + +```go +func (*CompatPhoneNumbers) List(params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 213. + +*** + +### ListAvailableCountries + +ListAvailableCountries lists countries with available numbers. + +#### Signature + +```go +func (*CompatPhoneNumbers) ListAvailableCountries(params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 244. + +*** + +### Purchase + +Purchase purchases a phone number. + +#### Signature + +```go +func (*CompatPhoneNumbers) Purchase(data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 218. + +*** + +### SearchLocal + +SearchLocal searches for available local numbers in a country. + +#### Signature + +```go +func (*CompatPhoneNumbers) SearchLocal(country string, params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 249. + +*** + +### SearchTollFree + +SearchTollFree searches for available toll-free numbers in a country. + +#### Signature + +```go +func (*CompatPhoneNumbers) SearchTollFree(country string, params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 254. + +*** + +### Update + +Update updates an incoming phone number. + +#### Signature + +```go +func (*CompatPhoneNumbers) Update(sid string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 228. + +## Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 207. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-queues/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-queues/index.mdx new file mode 100644 index 0000000000..e76ce89d04 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-queues/index.mdx @@ -0,0 +1,147 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-queues" +title: "CompatQueues" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.CompatQueues" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go" +--- +# `CompatQueues` + +CompatQueues provides compat queue management with members. + +## Signature + +```go +type CompatQueues struct +``` + +## Properties + + + +## Methods + +### DequeueMember + +DequeueMember dequeues a member from a queue. + +#### Signature + +```go +func (*CompatQueues) DequeueMember(queueSID string, callSID string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 305. + +*** + +### GetMember + +GetMember retrieves a member from a queue. + +#### Signature + +```go +func (*CompatQueues) GetMember(queueSID string, callSID string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 300. + +*** + +### ListMembers + +ListMembers lists members of a queue. + +#### Signature + +```go +func (*CompatQueues) ListMembers(queueSID string, params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 295. + +*** + +### Update + +Update updates a queue (uses POST per Twilio compat). + +#### Signature + +```go +func (*CompatQueues) Update(sid string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 290. + +## Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 285. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-recordings/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-recordings/index.mdx new file mode 100644 index 0000000000..b465304f81 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-recordings/index.mdx @@ -0,0 +1,111 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-recordings" +title: "CompatRecordings" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.CompatRecordings" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go" +--- +# `CompatRecordings` + +CompatRecordings provides compat recording management. + +## Signature + +```go +type CompatRecordings struct +``` + +## Properties + + + +## Methods + +### Delete + +Delete removes a recording. + +#### Signature + +```go +func (*CompatRecordings) Delete(sid string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 327. + +*** + +### Get + +Get retrieves a recording by SID. + +#### Signature + +```go +func (*CompatRecordings) Get(sid string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 322. + +*** + +### List + +List lists all recordings. + +#### Signature + +```go +func (*CompatRecordings) List(params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 317. + +## Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 312. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-tokens/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-tokens/index.mdx new file mode 100644 index 0000000000..7b09603970 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-tokens/index.mdx @@ -0,0 +1,113 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-tokens" +title: "CompatTokens" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.CompatTokens" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go" +--- +# `CompatTokens` + +CompatTokens provides compat API token management. + +## Signature + +```go +type CompatTokens struct +``` + +## Properties + + + +## Methods + +### Create + +Create creates a new API token. + +#### Signature + +```go +func (*CompatTokens) Create(data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 361. + +*** + +### Delete + +Delete removes an API token. + +#### Signature + +```go +func (*CompatTokens) Delete(tokenID string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 371. + +*** + +### Update + +Update modifies an API token. + +#### Signature + +```go +func (*CompatTokens) Update(tokenID string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 366. + +## Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 356. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-transcriptions/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-transcriptions/index.mdx new file mode 100644 index 0000000000..9f6c4f841f --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-transcriptions/index.mdx @@ -0,0 +1,111 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-transcriptions" +title: "CompatTranscriptions" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.CompatTranscriptions" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go" +--- +# `CompatTranscriptions` + +CompatTranscriptions provides compat transcription management. + +## Signature + +```go +type CompatTranscriptions struct +``` + +## Properties + + + +## Methods + +### Delete + +Delete removes a transcription. + +#### Signature + +```go +func (*CompatTranscriptions) Delete(sid string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 349. + +*** + +### Get + +Get retrieves a transcription by SID. + +#### Signature + +```go +func (*CompatTranscriptions) Get(sid string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 344. + +*** + +### List + +List lists all transcriptions. + +#### Signature + +```go +func (*CompatTranscriptions) List(params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 339. + +## Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 334. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/conference-logs/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/conference-logs/index.mdx new file mode 100644 index 0000000000..bd6a7ae604 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/conference-logs/index.mdx @@ -0,0 +1,59 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/conference-logs" +title: "ConferenceLogs" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.ConferenceLogs" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/logs.go" +--- +# `ConferenceLogs` + +ConferenceLogs provides conference log queries. + +## Signature + +```go +type ConferenceLogs struct +``` + +## Properties + + + +## Methods + +### List + +List lists conference logs. + +#### Signature + +```go +func (*ConferenceLogs) List(params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/logs.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/logs.go) + +Line 74. + +## Source + +[`pkg/rest/namespaces/logs.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/logs.go) + +Line 69. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/conference-rooms-resource/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/conference-rooms-resource/index.mdx new file mode 100644 index 0000000000..9bf008e1bd --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/conference-rooms-resource/index.mdx @@ -0,0 +1,61 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/conference-rooms-resource" +title: "ConferenceRoomsResource" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.ConferenceRoomsResource" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go" +--- +# `ConferenceRoomsResource` + +ConferenceRoomsResource uses singular "conference\_room" for sub-resource paths. + +## Signature + +```go +type ConferenceRoomsResource struct +``` + +## Properties + + + +## Methods + +### ListAddresses + +ListAddresses lists addresses for a conference room. + +#### Signature + +```go +func (*ConferenceRoomsResource) ListAddresses(id string, params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 107. + +## Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 102. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/crud-resource/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/crud-resource/index.mdx new file mode 100644 index 0000000000..fc2af43e99 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/crud-resource/index.mdx @@ -0,0 +1,169 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/crud-resource" +title: "CrudResource" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.CrudResource" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/common.go" +--- +# `CrudResource` + +CrudResource provides standard List, Create, Get, Update, Delete operations against a REST collection endpoint within a namespace. + +## Signature + +```go +type CrudResource struct +``` + +## Properties + + + + + "PATCH" (default) or "PUT" + + +## Methods + +### Create + +Create sends a POST request to create a new resource. + +#### Signature + +```go +func (*CrudResource) Create(data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/common.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/common.go) + +Line 68. + +*** + +### Delete + +Delete removes a resource by ID. It returns the parsed response body (or an empty map for 204 No Content) and any error. + +#### Signature + +```go +func (*CrudResource) Delete(id string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/common.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/common.go) + +Line 88. + +*** + +### Get + +Get retrieves a single resource by ID. + +#### Signature + +```go +func (*CrudResource) Get(id string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/common.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/common.go) + +Line 73. + +*** + +### List + +List retrieves all items from the collection. + +#### Signature + +```go +func (*CrudResource) List(params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/common.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/common.go) + +Line 63. + +*** + +### Update + +Update modifies an existing resource by ID. + +#### Signature + +```go +func (*CrudResource) Update(id string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/common.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/common.go) + +Line 78. + +## Source + +[`pkg/rest/namespaces/common.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/common.go) + +Line 41. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/crud-with-addresses/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/crud-with-addresses/index.mdx new file mode 100644 index 0000000000..d7a8953bee --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/crud-with-addresses/index.mdx @@ -0,0 +1,61 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/crud-with-addresses" +title: "CrudWithAddresses" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.CrudWithAddresses" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/common.go" +--- +# `CrudWithAddresses` + +CrudWithAddresses extends CrudResource with the nested addresses endpoint. Matches Python's CrudWithAddresses at \_base.py:109-113. Only resources that explicitly support the addresses sub-resource should embed this type; plain CrudResource does not expose ListAddresses. + +## Signature + +```go +type CrudWithAddresses struct +``` + +## Properties + + + +## Methods + +### ListAddresses + +ListAddresses lists addresses associated with the resource identified by id. + +#### Signature + +```go +func (*CrudWithAddresses) ListAddresses(id string, params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/common.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/common.go) + +Line 113. + +## Source + +[`pkg/rest/namespaces/common.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/common.go) + +Line 96. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/cxml-applications-resource/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/cxml-applications-resource/index.mdx new file mode 100644 index 0000000000..3403563420 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/cxml-applications-resource/index.mdx @@ -0,0 +1,89 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/cxml-applications-resource" +title: "CxmlApplicationsResource" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.CxmlApplicationsResource" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go" +--- +# `CxmlApplicationsResource` + +CxmlApplicationsResource exposes the fabric cXML applications sub-resource. Create is explicitly disallowed — cXML applications cannot be created via this API. This mirrors Python's CxmlApplicationsResource.create raising NotImplementedError (fabric.py:90). + +## Signature + +```go +type CxmlApplicationsResource struct +``` + +## Properties + + + +## Methods + +### Create + +Create always returns an error — cXML applications cannot be created via this API. The params argument is accepted for API parity with other CRUD resources but is reported in the error so the caller can see what payload was rejected. To create a new cXML application use a different API surface or the SignalWire dashboard. + +Mirrors Python's CxmlApplicationsResource.create raising NotImplementedError (signalwire/rest/namespaces/fabric.py:90). + +#### Signature + +```go +func (*CxmlApplicationsResource) Create(params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 162. + +*** + +### ListAddresses + +ListAddresses lists addresses for a cXML application. + +#### Signature + +```go +func (*CxmlApplicationsResource) ListAddresses(id string, params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 170. + +## Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 150. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/cxml-webhook-options/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/cxml-webhook-options/index.mdx new file mode 100644 index 0000000000..342323f0d4 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/cxml-webhook-options/index.mdx @@ -0,0 +1,43 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/cxml-webhook-options" +title: "CxmlWebhookOptions" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.CxmlWebhookOptions" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/phone_numbers.go" +--- +# `CxmlWebhookOptions` + +CxmlWebhookOptions holds optional fields for SetCxmlWebhook. + +## Signature + +```go +type CxmlWebhookOptions struct +``` + +## Properties + + + Extra passes through additional wire-level fields. + + + + FallbackURL is used when the primary URL fails. + + + + StatusCallbackURL receives call status updates. + + +## Source + +[`pkg/rest/namespaces/phone_numbers.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/phone_numbers.go) + +Line 71. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/datasphere-documents/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/datasphere-documents/index.mdx new file mode 100644 index 0000000000..3aacd9d433 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/datasphere-documents/index.mdx @@ -0,0 +1,143 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/datasphere-documents" +title: "DatasphereDocuments" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.DatasphereDocuments" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/datasphere.go" +--- +# `DatasphereDocuments` + +DatasphereDocuments provides document management with search and chunk operations for the Datasphere API. + +## Signature + +```go +type DatasphereDocuments struct +``` + +## Properties + + + +## Methods + +### DeleteChunk + +DeleteChunk deletes a specific chunk from a document. + +#### Signature + +```go +func (*DatasphereDocuments) DeleteChunk(documentID string, chunkID string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/datasphere.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/datasphere.go) + +Line 32. + +*** + +### GetChunk + +GetChunk retrieves a specific chunk from a document. + +#### Signature + +```go +func (*DatasphereDocuments) GetChunk(documentID string, chunkID string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/datasphere.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/datasphere.go) + +Line 27. + +*** + +### ListChunks + +ListChunks lists chunks for a specific document. + +#### Signature + +```go +func (*DatasphereDocuments) ListChunks(documentID string, params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/datasphere.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/datasphere.go) + +Line 22. + +*** + +### Search + +Search performs a semantic search across documents. + +#### Signature + +```go +func (*DatasphereDocuments) Search(data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/datasphere.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/datasphere.go) + +Line 17. + +## Source + +[`pkg/rest/namespaces/datasphere.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/datasphere.go) + +Line 12. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/datasphere-namespace/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/datasphere-namespace/index.mdx new file mode 100644 index 0000000000..1b12b5fc55 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/datasphere-namespace/index.mdx @@ -0,0 +1,33 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/datasphere-namespace" +title: "DatasphereNamespace" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.DatasphereNamespace" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/datasphere.go" +--- +# `DatasphereNamespace` + +DatasphereNamespace groups Datasphere API resources. + +## Signature + +```go +type DatasphereNamespace struct +``` + +## Properties + + + +## Source + +[`pkg/rest/namespaces/datasphere.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/datasphere.go) + +Line 37. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/fabric-addresses/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/fabric-addresses/index.mdx new file mode 100644 index 0000000000..0a131ddbc4 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/fabric-addresses/index.mdx @@ -0,0 +1,85 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/fabric-addresses" +title: "FabricAddresses" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.FabricAddresses" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go" +--- +# `FabricAddresses` + +FabricAddresses provides read-only access to fabric addresses. + +## Signature + +```go +type FabricAddresses struct +``` + +## Properties + + + +## Methods + +### Get + +Get retrieves a fabric address by ID. + +#### Signature + +```go +func (*FabricAddresses) Get(id string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 275. + +*** + +### List + +List lists all fabric addresses. + +#### Signature + +```go +func (*FabricAddresses) List(params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 270. + +## Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 265. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/fabric-namespace/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/fabric-namespace/index.mdx new file mode 100644 index 0000000000..40a4c3f74f --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/fabric-namespace/index.mdx @@ -0,0 +1,69 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/fabric-namespace" +title: "FabricNamespace" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.FabricNamespace" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go" +--- +# `FabricNamespace` + +FabricNamespace groups all Fabric API resource types. + +## Signature + +```go +type FabricNamespace struct +``` + +## Properties + + + + + + + + + + + + + + + + + + + + + Special resources + + + + + + + + + + PUT-update resources + + + + PATCH-update resources SWMLWebhooks and CXMLWebhooks are auto-materialized: prefer PhoneNumbers.SetSwmlWebhook / SetCxmlWebhook for creation. Direct .Create still works for backcompat but emits a deprecation warning. + + + + +## Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 333. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/fabric-tokens/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/fabric-tokens/index.mdx new file mode 100644 index 0000000000..3e32227ef3 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/fabric-tokens/index.mdx @@ -0,0 +1,163 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/fabric-tokens" +title: "FabricTokens" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.FabricTokens" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go" +--- +# `FabricTokens` + +FabricTokens provides subscriber, guest, invite, and embed token creation. + +## Signature + +```go +type FabricTokens struct +``` + +## Properties + + + +## Methods + +### CreateEmbedToken + +CreateEmbedToken creates an embed token. + +#### Signature + +```go +func (*FabricTokens) CreateEmbedToken(data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 307. + +*** + +### CreateGuestToken + +CreateGuestToken creates a guest token. + +#### Signature + +```go +func (*FabricTokens) CreateGuestToken(data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 302. + +*** + +### CreateInviteToken + +CreateInviteToken creates an invite token. + +#### Signature + +```go +func (*FabricTokens) CreateInviteToken(data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 297. + +*** + +### CreateSubscriberToken + +CreateSubscriberToken creates a subscriber token. + +#### Signature + +```go +func (*FabricTokens) CreateSubscriberToken(data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 287. + +*** + +### RefreshSubscriberToken + +RefreshSubscriberToken refreshes a subscriber token. + +#### Signature + +```go +func (*FabricTokens) RefreshSubscriberToken(data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 292. + +## Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 282. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/fax-logs/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/fax-logs/index.mdx new file mode 100644 index 0000000000..6beb083353 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/fax-logs/index.mdx @@ -0,0 +1,85 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/fax-logs" +title: "FaxLogs" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.FaxLogs" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/logs.go" +--- +# `FaxLogs` + +FaxLogs provides fax log queries. + +## Signature + +```go +type FaxLogs struct +``` + +## Properties + + + +## Methods + +### Get + +Get retrieves a specific fax log entry. + +#### Signature + +```go +func (*FaxLogs) Get(logID string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/logs.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/logs.go) + +Line 62. + +*** + +### List + +List lists fax logs. + +#### Signature + +```go +func (*FaxLogs) List(params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/logs.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/logs.go) + +Line 57. + +## Source + +[`pkg/rest/namespaces/logs.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/logs.go) + +Line 52. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/generic-resources/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/generic-resources/index.mdx new file mode 100644 index 0000000000..10301cbca7 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/generic-resources/index.mdx @@ -0,0 +1,199 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/generic-resources" +title: "GenericResources" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.GenericResources" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go" +--- +# `GenericResources` + +GenericResources provides operations across all fabric resource types. + +## Signature + +```go +type GenericResources struct +``` + +## Properties + + + +## Methods + +### AssignDomainApplication + +AssignDomainApplication assigns a domain application to a resource. + +#### Signature + +```go +func (*GenericResources) AssignDomainApplication(id string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 258. + +*** + +### AssignPhoneRoute + + + **Deprecated.** This endpoint (POST /api/fabric/resources/\{id\}/phone\_routes) accepts only a narrow set of legacy resource types as the attach target. It does NOT work for swml\_webhook / cxml\_webhook / ai\_agent bindings — those are configured on the phone number and the Fabric resource is auto-materialized. Use phone\_numbers.SetSwmlWebhook, SetCxmlWebhook, SetAiAgent, etc. instead. See porting-sdk's phone-binding.md. + + +AssignPhoneRoute assigns a phone route to a resource. + +#### Signature + +```go +func (*GenericResources) AssignPhoneRoute(id string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 245. + +*** + +### Delete + +Delete removes a generic resource by ID. + +#### Signature + +```go +func (*GenericResources) Delete(id string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 228. + +*** + +### Get + +Get retrieves a generic resource by ID. + +#### Signature + +```go +func (*GenericResources) Get(id string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 223. + +*** + +### List + +List lists all generic resources. + +#### Signature + +```go +func (*GenericResources) List(params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 218. + +*** + +### ListAddresses + +ListAddresses lists addresses for a generic resource. + +#### Signature + +```go +func (*GenericResources) ListAddresses(id string, params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 233. + +## Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 213. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/imported-numbers-namespace/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/imported-numbers-namespace/index.mdx new file mode 100644 index 0000000000..807cc4d341 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/imported-numbers-namespace/index.mdx @@ -0,0 +1,59 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/imported-numbers-namespace" +title: "ImportedNumbersNamespace" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.ImportedNumbersNamespace" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/imported_numbers.go" +--- +# `ImportedNumbersNamespace` + +ImportedNumbersNamespace provides imported phone number management. + +## Signature + +```go +type ImportedNumbersNamespace struct +``` + +## Properties + + + +## Methods + +### Create + +Create imports an externally-hosted phone number. + +#### Signature + +```go +func (*ImportedNumbersNamespace) Create(data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/imported_numbers.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/imported_numbers.go) + +Line 23. + +## Source + +[`pkg/rest/namespaces/imported_numbers.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/imported_numbers.go) + +Line 11. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/index.mdx new file mode 100644 index 0000000000..1f12cd1442 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/index.mdx @@ -0,0 +1,1467 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces" +title: "namespaces" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "module" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/addresses.go" +--- +# `namespaces` + +Package namespaces contains the individual API namespace implementations for the SignalWire REST client. + +## Signature + +```go +package namespaces +``` + +## Constants + + + PhoneCallHandler wire values accepted by phone\_numbers.Update. + + + + PhoneCallHandler wire values accepted by phone\_numbers.Update. + + + + PhoneCallHandler wire values accepted by phone\_numbers.Update. + + + + PhoneCallHandler wire values accepted by phone\_numbers.Update. + + + + PhoneCallHandler wire values accepted by phone\_numbers.Update. + + + + PhoneCallHandler wire values accepted by phone\_numbers.Update. + + + + PhoneCallHandler wire values accepted by phone\_numbers.Update. + + + + PhoneCallHandler wire values accepted by phone\_numbers.Update. + + + + PhoneCallHandler wire values accepted by phone\_numbers.Update. + + + + PhoneCallHandler wire values accepted by phone\_numbers.Update. + + + + PhoneCallHandler wire values accepted by phone\_numbers.Update. + + +## Classes + + + + AddressesNamespace provides address management (no update endpoint). + + + + AutoMaterializedWebhookResource is a Fabric webhook resource that is normally auto-created by the phone\_numbers.Set\*Webhook helpers. Exposed for backwards compatibility: list/get/update/delete work as usual, but Create now emits a deprecation warning because creating a webhook resource directly produces an orphan that isn't bound to any phone number. + + + + CallFlowOptions holds optional fields for SetCallFlow. + + + + CallFlowsResource extends CrudResource with version management and a singular sub-resource path convention. + + + + CallingNamespace provides REST-based call control. All commands are dispatched as POST /api/calling/calls with a "command" field. + + + + ChatNamespace provides Chat token generation. + + + + CompatAccounts provides compat account/subproject management. + + + + CompatApplications provides compat application management. + + + + CompatCalls provides compat call management with recording and stream sub-resources. + + + + CompatConferences provides compat conference management with participants, recordings, and streams. + + + + CompatFaxes provides compat fax management with media sub-resources. + + + + CompatLamlBins provides compat cXML/LaML script management. + + + + CompatMessages provides compat message management with media sub-resources. + + + + CompatNamespace provides the Twilio-compatible LAML API with AccountSid scoping. + + + + CompatPhoneNumbers provides compat phone number management. + + + + CompatQueues provides compat queue management with members. + + + + CompatRecordings provides compat recording management. + + + + CompatTokens provides compat API token management. + + + + CompatTranscriptions provides compat transcription management. + + + + ConferenceLogs provides conference log queries. + + + + ConferenceRoomsResource uses singular "conference\_room" for sub-resource paths. + + + + CrudResource provides standard List, Create, Get, Update, Delete operations against a REST collection endpoint within a namespace. + + + + CrudWithAddresses extends CrudResource with the nested addresses endpoint. Matches Python's CrudWithAddresses at \_base.py:109-113. Only resources that explicitly support the addresses sub-resource should embed this type; plain CrudResource does not expose ListAddresses. + + + + CxmlApplicationsResource exposes the fabric cXML applications sub-resource. Create is explicitly disallowed — cXML applications cannot be created via this API. This mirrors Python's CxmlApplicationsResource.create raising NotImplementedError (fabric.py:90). + + + + CxmlWebhookOptions holds optional fields for SetCxmlWebhook. + + + + DatasphereDocuments provides document management with search and chunk operations for the Datasphere API. + + + + DatasphereNamespace groups Datasphere API resources. + + + + FabricAddresses provides read-only access to fabric addresses. + + + + FabricNamespace groups all Fabric API resource types. + + + + FabricTokens provides subscriber, guest, invite, and embed token creation. + + + + FaxLogs provides fax log queries. + + + + GenericResources provides operations across all fabric resource types. + + + + ImportedNumbersNamespace provides imported phone number management. + + + + LogsNamespace groups all log query resources. + + + + LookupNamespace provides phone number lookup (carrier, CNAM). + + + + MessageLogs provides message log queries. + + + + MFANamespace provides multi-factor authentication via SMS or phone call. + + + + NumberGroupsNamespace provides number group management with membership operations. + + + + PhoneNumbersNamespace provides phone number management with search and typed helpers for binding an inbound call to a handler (SWML webhook, cXML webhook, AI agent, call flow, RELAY application/topic). + + + + ProjectNamespace groups project management resources. + + + + ProjectTokens provides project API token management. + + + + PubSubNamespace provides PubSub token generation. + + + + QueuesNamespace provides queue management with member operations. + + + + RecordingsNamespace provides recording management (read-only + delete). + + + + RegistryBrands provides 10DLC brand management. + + + + RegistryCampaigns provides 10DLC campaign management. + + + + RegistryNamespace groups all 10DLC Campaign Registry resources. + + + + RegistryNumbers provides 10DLC number assignment management. + + + + RegistryOrders provides 10DLC assignment order management. + + + + RelayTopicOptions holds optional fields for SetRelayTopic. + + + + Resource is a helper for building sub-paths from a base path. + + + + ShortCodesNamespace provides short code management (read + update only). + + + + SipProfileNamespace provides project SIP profile management (singleton resource). + + + + SubscribersResource extends CrudResource with SIP endpoint management. + + + + VerifiedCallersNamespace provides verified caller ID management with verification flow. + + + + VideoConferences provides video conference management with tokens and streams. + + + + VideoConferenceTokens provides video conference token management. + + + + VideoNamespace groups all Video API resources. + + + + VideoRoomRecordings provides video room recording management. + + + + VideoRooms provides video room management with stream sub-resources. + + + + VideoRoomSessions provides video room session management. + + + + VideoRoomTokens provides video room token generation. + + + + VideoStreams provides video stream management. + + + + VoiceLogs provides voice log queries. + + + +## Functions + +### AllPhoneCallHandlers + +AllPhoneCallHandlers returns every PhoneCallHandler value. Useful for enum-contract tests and for callers that need to validate or enumerate the set. + +#### Signature + +```go +func AllPhoneCallHandlers() []PhoneCallHandler +``` + +#### Returns + +`[]PhoneCallHandler` + +#### Source + +[`pkg/rest/namespaces/call_handler.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/call_handler.go) + +Line 58. + +*** + +### NewAddressesNamespace + +NewAddressesNamespace creates a new AddressesNamespace. + +#### Signature + +```go +func NewAddressesNamespace(client HTTPClient) *AddressesNamespace +``` + +#### Parameters + + + +#### Returns + +`*AddressesNamespace` + +#### Source + +[`pkg/rest/namespaces/addresses.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/addresses.go) + +Line 16. + +*** + +### NewCallingNamespace + +NewCallingNamespace creates a new CallingNamespace. + +#### Signature + +```go +func NewCallingNamespace(client HTTPClient) *CallingNamespace +``` + +#### Parameters + + + +#### Returns + +`*CallingNamespace` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 17. + +*** + +### NewChatNamespace + +NewChatNamespace creates a new ChatNamespace. + +#### Signature + +```go +func NewChatNamespace(client HTTPClient) *ChatNamespace +``` + +#### Parameters + + + +#### Returns + +`*ChatNamespace` + +#### Source + +[`pkg/rest/namespaces/chat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/chat.go) + +Line 16. + +*** + +### NewCompatNamespace + +NewCompatNamespace creates a new CompatNamespace with all sub-resources scoped to the given account SID. + +#### Signature + +```go +func NewCompatNamespace(client HTTPClient, accountSID string) *CompatNamespace +``` + +#### Parameters + + + + + +#### Returns + +`*CompatNamespace` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 395. + +*** + +### NewCrudResource + +NewCrudResource creates a CrudResource with PATCH as the update method. + +#### Signature + +```go +func NewCrudResource(client HTTPClient, path string) *CrudResource +``` + +#### Parameters + + + + + +#### Returns + +`*CrudResource` + +#### Source + +[`pkg/rest/namespaces/common.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/common.go) + +Line 47. + +*** + +### NewCrudResourcePUT + +NewCrudResourcePUT creates a CrudResource that uses PUT for updates. + +#### Signature + +```go +func NewCrudResourcePUT(client HTTPClient, path string) *CrudResource +``` + +#### Parameters + + + + + +#### Returns + +`*CrudResource` + +#### Source + +[`pkg/rest/namespaces/common.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/common.go) + +Line 55. + +*** + +### NewCrudWithAddresses + +NewCrudWithAddresses constructs a CrudWithAddresses backed by a PATCH-default CrudResource. Use NewCrudWithAddressesPUT for resources that update via PUT. + +#### Signature + +```go +func NewCrudWithAddresses(client HTTPClient, path string) *CrudWithAddresses +``` + +#### Parameters + + + + + +#### Returns + +`*CrudWithAddresses` + +#### Source + +[`pkg/rest/namespaces/common.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/common.go) + +Line 102. + +*** + +### NewCrudWithAddressesPUT + +NewCrudWithAddressesPUT constructs a CrudWithAddresses backed by a PUT-update CrudResource. + +#### Signature + +```go +func NewCrudWithAddressesPUT(client HTTPClient, path string) *CrudWithAddresses +``` + +#### Parameters + + + + + +#### Returns + +`*CrudWithAddresses` + +#### Source + +[`pkg/rest/namespaces/common.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/common.go) + +Line 108. + +*** + +### NewDatasphereNamespace + +NewDatasphereNamespace creates a new DatasphereNamespace. + +#### Signature + +```go +func NewDatasphereNamespace(client HTTPClient) *DatasphereNamespace +``` + +#### Parameters + + + +#### Returns + +`*DatasphereNamespace` + +#### Source + +[`pkg/rest/namespaces/datasphere.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/datasphere.go) + +Line 42. + +*** + +### NewFabricNamespace + +NewFabricNamespace creates a new FabricNamespace with all sub-resources initialized. + +#### Signature + +```go +func NewFabricNamespace(client HTTPClient) *FabricNamespace +``` + +#### Parameters + + + +#### Returns + +`*FabricNamespace` + +#### Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 362. + +*** + +### NewImportedNumbersNamespace + +NewImportedNumbersNamespace creates a new ImportedNumbersNamespace. + +#### Signature + +```go +func NewImportedNumbersNamespace(client HTTPClient) *ImportedNumbersNamespace +``` + +#### Parameters + + + +#### Returns + +`*ImportedNumbersNamespace` + +#### Source + +[`pkg/rest/namespaces/imported_numbers.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/imported_numbers.go) + +Line 16. + +*** + +### NewLogsNamespace + +NewLogsNamespace creates a new LogsNamespace with all sub-resources initialized. + +#### Signature + +```go +func NewLogsNamespace(client HTTPClient) *LogsNamespace +``` + +#### Parameters + + + +#### Returns + +`*LogsNamespace` + +#### Source + +[`pkg/rest/namespaces/logs.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/logs.go) + +Line 89. + +*** + +### NewLookupNamespace + +NewLookupNamespace creates a new LookupNamespace. + +#### Signature + +```go +func NewLookupNamespace(client HTTPClient) *LookupNamespace +``` + +#### Parameters + + + +#### Returns + +`*LookupNamespace` + +#### Source + +[`pkg/rest/namespaces/lookup.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/lookup.go) + +Line 16. + +*** + +### NewMFANamespace + +NewMFANamespace creates a new MFANamespace. + +#### Signature + +```go +func NewMFANamespace(client HTTPClient) *MFANamespace +``` + +#### Parameters + + + +#### Returns + +`*MFANamespace` + +#### Source + +[`pkg/rest/namespaces/mfa.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/mfa.go) + +Line 16. + +*** + +### NewNumberGroupsNamespace + +NewNumberGroupsNamespace creates a new NumberGroupsNamespace. + +#### Signature + +```go +func NewNumberGroupsNamespace(client HTTPClient) *NumberGroupsNamespace +``` + +#### Parameters + + + +#### Returns + +`*NumberGroupsNamespace` + +#### Source + +[`pkg/rest/namespaces/number_groups.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/number_groups.go) + +Line 16. + +*** + +### NewPhoneNumbersNamespace + +NewPhoneNumbersNamespace creates a new PhoneNumbersNamespace. + +#### Signature + +```go +func NewPhoneNumbersNamespace(client HTTPClient) *PhoneNumbersNamespace +``` + +#### Parameters + + + +#### Returns + +`*PhoneNumbersNamespace` + +#### Source + +[`pkg/rest/namespaces/phone_numbers.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/phone_numbers.go) + +Line 26. + +*** + +### NewProjectNamespace + +NewProjectNamespace creates a new ProjectNamespace. + +#### Signature + +```go +func NewProjectNamespace(client HTTPClient) *ProjectNamespace +``` + +#### Parameters + + + +#### Returns + +`*ProjectNamespace` + +#### Source + +[`pkg/rest/namespaces/project.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/project.go) + +Line 36. + +*** + +### NewPubSubNamespace + +NewPubSubNamespace creates a new PubSubNamespace. + +#### Signature + +```go +func NewPubSubNamespace(client HTTPClient) *PubSubNamespace +``` + +#### Parameters + + + +#### Returns + +`*PubSubNamespace` + +#### Source + +[`pkg/rest/namespaces/pubsub.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/pubsub.go) + +Line 16. + +*** + +### NewQueuesNamespace + +NewQueuesNamespace creates a new QueuesNamespace. + +#### Signature + +```go +func NewQueuesNamespace(client HTTPClient) *QueuesNamespace +``` + +#### Parameters + + + +#### Returns + +`*QueuesNamespace` + +#### Source + +[`pkg/rest/namespaces/queues.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/queues.go) + +Line 16. + +*** + +### NewRecordingsNamespace + +NewRecordingsNamespace creates a new RecordingsNamespace. + +#### Signature + +```go +func NewRecordingsNamespace(client HTTPClient) *RecordingsNamespace +``` + +#### Parameters + + + +#### Returns + +`*RecordingsNamespace` + +#### Source + +[`pkg/rest/namespaces/recordings.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/recordings.go) + +Line 18. + +*** + +### NewRegistryNamespace + +NewRegistryNamespace creates a new RegistryNamespace with all sub-resources. + +#### Signature + +```go +func NewRegistryNamespace(client HTTPClient) *RegistryNamespace +``` + +#### Parameters + + + +#### Returns + +`*RegistryNamespace` + +#### Source + +[`pkg/rest/namespaces/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/registry.go) + +Line 109. + +*** + +### NewShortCodesNamespace + +NewShortCodesNamespace creates a new ShortCodesNamespace. + +#### Signature + +```go +func NewShortCodesNamespace(client HTTPClient) *ShortCodesNamespace +``` + +#### Parameters + + + +#### Returns + +`*ShortCodesNamespace` + +#### Source + +[`pkg/rest/namespaces/short_codes.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/short_codes.go) + +Line 18. + +*** + +### NewSipProfileNamespace + +NewSipProfileNamespace creates a new SipProfileNamespace. + +#### Signature + +```go +func NewSipProfileNamespace(client HTTPClient) *SipProfileNamespace +``` + +#### Parameters + + + +#### Returns + +`*SipProfileNamespace` + +#### Source + +[`pkg/rest/namespaces/sip_profile.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/sip_profile.go) + +Line 16. + +*** + +### NewVerifiedCallersNamespace + +NewVerifiedCallersNamespace creates a new VerifiedCallersNamespace. + +#### Signature + +```go +func NewVerifiedCallersNamespace(client HTTPClient) *VerifiedCallersNamespace +``` + +#### Parameters + + + +#### Returns + +`*VerifiedCallersNamespace` + +#### Source + +[`pkg/rest/namespaces/verified_callers.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/verified_callers.go) + +Line 17. + +*** + +### NewVideoNamespace + +NewVideoNamespace creates a new VideoNamespace with all sub-resources initialized. + +#### Signature + +```go +func NewVideoNamespace(client HTTPClient) *VideoNamespace +``` + +#### Parameters + + + +#### Returns + +`*VideoNamespace` + +#### Source + +[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) + +Line 175. + +*** + +### ResetDeprecationWarnOnce + +ResetDeprecationWarnOnce clears the "once" tracking set so deprecation warnings fire again. Test-only helper. + +#### Signature + +```go +func ResetDeprecationWarnOnce() +``` + +#### Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 67. + +*** + +### SetDeprecationLogger + +SetDeprecationLogger replaces the package-level deprecation logger. The previous logger is returned so tests can restore it. Passing nil is a no-op. + +#### Signature + +```go +func SetDeprecationLogger(l *logging.Logger) *logging.Logger +``` + +#### Parameters + + + +#### Returns + +`*logging.Logger` + +#### Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 54. + +## Type Aliases + +### AddressesResource + +AddressesResource is an alias for AddressesNamespace, matching the Python class name for cross-SDK parity. Prefer AddressesNamespace in new Go code. + +#### Signature + +```go +type AddressesResource alias +``` + +#### Source + +[`pkg/rest/namespaces/addresses.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/addresses.go) + +Line 44. + +*** + +### CxmlWebhooksResource + +CxmlWebhooksResource is the Python class name for the auto-materialized CXML webhook resource. Go aliases AutoMaterializedWebhookResource here. + +#### Signature + +```go +type CxmlWebhooksResource alias +``` + +#### Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 328. + +*** + +### FabricResource + +FabricResource is the Python class name for a CrudResource that exposes the addresses sub-resource. Go aliases CrudWithAddresses here for the same reason as FabricResourcePUT. + +#### Signature + +```go +type FabricResource alias +``` + +#### Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 320. + +*** + +### FabricResourcePUT + +FabricResourcePUT is the Python class name for a CrudResource that uses PUT for updates. Go aliases CrudResource here so the cross-language audit sees the same type name on both sides without requiring a distinct struct. + +#### Signature + +```go +type FabricResourcePUT alias +``` + +#### Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 315. + +*** + +### LookupResource + +LookupResource is an alias for LookupNamespace, matching the Python class name for cross-SDK parity. Prefer LookupNamespace in new Go code. + +#### Signature + +```go +type LookupResource alias +``` + +#### Source + +[`pkg/rest/namespaces/lookup.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/lookup.go) + +Line 31. + +*** + +### NumberGroupsResource + +NumberGroupsResource is an alias for NumberGroupsNamespace, matching the Python class name for cross-SDK parity. + +#### Signature + +```go +type NumberGroupsResource alias +``` + +#### Source + +[`pkg/rest/namespaces/number_groups.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/number_groups.go) + +Line 44. + +*** + +### PhoneNumbersResource + +PhoneNumbersResource is an alias for PhoneNumbersNamespace, matching the Python class name for cross-SDK parity. Prefer PhoneNumbersNamespace in new Go code. + +#### Signature + +```go +type PhoneNumbersResource alias +``` + +#### Source + +[`pkg/rest/namespaces/phone_numbers.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/phone_numbers.go) + +Line 201. + +*** + +### PubSubResource + +PubSubResource is an alias for PubSubNamespace, matching the Python class name for cross-SDK parity. Prefer PubSubNamespace in new Go code. + +#### Signature + +```go +type PubSubResource alias +``` + +#### Source + +[`pkg/rest/namespaces/pubsub.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/pubsub.go) + +Line 29. + +*** + +### QueuesResource + +QueuesResource is an alias for QueuesNamespace, matching the Python class name for cross-SDK parity. Prefer QueuesNamespace in new Go code. + +#### Signature + +```go +type QueuesResource alias +``` + +#### Source + +[`pkg/rest/namespaces/queues.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/queues.go) + +Line 39. + +*** + +### RecordingsResource + +RecordingsResource is an alias for RecordingsNamespace, matching the Python class name for cross-SDK parity. Prefer RecordingsNamespace in new Go code. + +#### Signature + +```go +type RecordingsResource alias +``` + +#### Source + +[`pkg/rest/namespaces/recordings.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/recordings.go) + +Line 54. + +*** + +### ShortCodesResource + +ShortCodesResource is an alias for ShortCodesNamespace, matching the Python class name for cross-SDK parity. Prefer ShortCodesNamespace in new Go code. + +#### Signature + +```go +type ShortCodesResource alias +``` + +#### Source + +[`pkg/rest/namespaces/short_codes.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/short_codes.go) + +Line 45. + +*** + +### SipProfileResource + +SipProfileResource is an alias for SipProfileNamespace, matching the Python class name for cross-SDK parity. Prefer SipProfileNamespace in new Go code. + +#### Signature + +```go +type SipProfileResource alias +``` + +#### Source + +[`pkg/rest/namespaces/sip_profile.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/sip_profile.go) + +Line 34. + +*** + +### SwmlWebhooksResource + +SwmlWebhooksResource is the Python class name for the auto-materialized SWML webhook resource. Go aliases AutoMaterializedWebhookResource here. + +#### Signature + +```go +type SwmlWebhooksResource alias +``` + +#### Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 324. + +## Interfaces + +### HTTPClient + +HTTPClient is the interface that namespace implementations use to make HTTP requests. It is satisfied by the httpAdapter in the parent rest package, which prevents an import cycle. + +#### Signature + +```go +type HTTPClient interface { Get; Post; Put; Patch; Delete } +``` + +#### Methods + +##### Delete + +###### Signature + +```go +Delete(path string) (map[string]any, error) +``` + +###### Source + +[`pkg/rest/namespaces/common.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/common.go) + +Line 22. + +*** + +##### Get + +###### Signature + +```go +Get(path string, params map[string]string) (map[string]any, error) +``` + +###### Source + +[`pkg/rest/namespaces/common.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/common.go) + +Line 18. + +*** + +##### Patch + +###### Signature + +```go +Patch(path string, body map[string]any) (map[string]any, error) +``` + +###### Source + +[`pkg/rest/namespaces/common.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/common.go) + +Line 21. + +*** + +##### Post + +###### Signature + +```go +Post(path string, body map[string]any, params map[string]string) (map[string]any, error) +``` + +###### Source + +[`pkg/rest/namespaces/common.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/common.go) + +Line 19. + +*** + +##### Put + +###### Signature + +```go +Put(path string, body map[string]any) (map[string]any, error) +``` + +###### Source + +[`pkg/rest/namespaces/common.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/common.go) + +Line 20. + +#### Source + +[`pkg/rest/namespaces/common.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/common.go) + +Line 17. + +## Enums + +### PhoneCallHandler + +PhoneCallHandler is the value of the “call\_handler“ field accepted by phone\_numbers.Update. + +Named PhoneCallHandler (not CallHandler) to avoid colliding with the RELAY client's inbound-call-handler callback type already present in the SDK (pkg/relay OnCallHandler). + +Setting a phone number's call\_handler + the handler-specific companion field routes inbound calls and, for most values, auto-materializes the matching Fabric resource on the server. See the high-level helpers on PhoneNumbersNamespace (SetSwmlWebhook, SetCxmlWebhook, SetCxmlApplication, SetAiAgent, SetCallFlow, SetRelayApplication, SetRelayTopic). + +``` +Enum member Companion field (required) Auto-creates resource +RelayScript call_relay_script_url swml_webhook +LamlWebhooks call_request_url cxml_webhook +LamlApplication call_laml_application_id cxml_application +AiAgent call_ai_agent_id ai_agent +CallFlow call_flow_id call_flow +RelayApplication call_relay_application relay_application +RelayTopic call_relay_topic (routes via RELAY) +RelayContext call_relay_context (legacy, prefer topic) +RelayConnector (connector config) (internal) +VideoRoom call_video_room_id (routes to Video API) +Dialogflow call_dialogflow_agent_id (none) +``` + +Note: LamlWebhooks (wire value "laml\_webhooks") produces a cXML handler, not a generic webhook. For SWML, use RelayScript. + +#### Signature + +```go +type PhoneCallHandler alias +``` + +#### Examples + + + + ```go + Enum member Companion field (required) Auto-creates resource + RelayScript call_relay_script_url swml_webhook + LamlWebhooks call_request_url cxml_webhook + LamlApplication call_laml_application_id cxml_application + AiAgent call_ai_agent_id ai_agent + CallFlow call_flow_id call_flow + RelayApplication call_relay_application relay_application + RelayTopic call_relay_topic (routes via RELAY) + RelayContext call_relay_context (legacy, prefer topic) + RelayConnector (connector config) (internal) + VideoRoom call_video_room_id (routes to Video API) + Dialogflow call_dialogflow_agent_id (none) + ``` + + + + ```go + Enum member Companion field (required) Auto-creates resource + RelayScript call_relay_script_url swml_webhook + LamlWebhooks call_request_url cxml_webhook + LamlApplication call_laml_application_id cxml_application + AiAgent call_ai_agent_id ai_agent + CallFlow call_flow_id call_flow + RelayApplication call_relay_application relay_application + RelayTopic call_relay_topic (routes via RELAY) + RelayContext call_relay_context (legacy, prefer topic) + RelayConnector (connector config) (internal) + VideoRoom call_video_room_id (routes to Video API) + Dialogflow call_dialogflow_agent_id (none) + ``` + + + +#### Source + +[`pkg/rest/namespaces/call_handler.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/call_handler.go) + +Line 38. + +## Source + +[`pkg/rest/namespaces/addresses.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/addresses.go) diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/logs-namespace/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/logs-namespace/index.mdx new file mode 100644 index 0000000000..03e106327e --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/logs-namespace/index.mdx @@ -0,0 +1,39 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/logs-namespace" +title: "LogsNamespace" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.LogsNamespace" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/logs.go" +--- +# `LogsNamespace` + +LogsNamespace groups all log query resources. + +## Signature + +```go +type LogsNamespace struct +``` + +## Properties + + + + + + + + + +## Source + +[`pkg/rest/namespaces/logs.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/logs.go) + +Line 81. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/lookup-namespace/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/lookup-namespace/index.mdx new file mode 100644 index 0000000000..a21066de8b --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/lookup-namespace/index.mdx @@ -0,0 +1,61 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/lookup-namespace" +title: "LookupNamespace" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.LookupNamespace" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/lookup.go" +--- +# `LookupNamespace` + +LookupNamespace provides phone number lookup (carrier, CNAM). + +## Signature + +```go +type LookupNamespace struct +``` + +## Properties + + + +## Methods + +### PhoneNumber + +PhoneNumber looks up information about a phone number. The e164 parameter should be the number in E.164 format. Optional params can include "include" for additional data (e.g., "carrier"). + +#### Signature + +```go +func (*LookupNamespace) PhoneNumber(e164 string, params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/lookup.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/lookup.go) + +Line 25. + +## Source + +[`pkg/rest/namespaces/lookup.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/lookup.go) + +Line 11. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/message-logs/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/message-logs/index.mdx new file mode 100644 index 0000000000..64bbd2a5fe --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/message-logs/index.mdx @@ -0,0 +1,85 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/message-logs" +title: "MessageLogs" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.MessageLogs" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/logs.go" +--- +# `MessageLogs` + +MessageLogs provides message log queries. + +## Signature + +```go +type MessageLogs struct +``` + +## Properties + + + +## Methods + +### Get + +Get retrieves a specific message log entry. + +#### Signature + +```go +func (*MessageLogs) Get(logID string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/logs.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/logs.go) + +Line 23. + +*** + +### List + +List lists message logs. + +#### Signature + +```go +func (*MessageLogs) List(params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/logs.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/logs.go) + +Line 18. + +## Source + +[`pkg/rest/namespaces/logs.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/logs.go) + +Line 13. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/mfa-namespace/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/mfa-namespace/index.mdx new file mode 100644 index 0000000000..a6120acd60 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/mfa-namespace/index.mdx @@ -0,0 +1,113 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/mfa-namespace" +title: "MFANamespace" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.MFANamespace" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/mfa.go" +--- +# `MFANamespace` + +MFANamespace provides multi-factor authentication via SMS or phone call. + +## Signature + +```go +type MFANamespace struct +``` + +## Properties + + + +## Methods + +### Call + +Call initiates MFA verification via phone call. + +#### Signature + +```go +func (*MFANamespace) Call(data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/mfa.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/mfa.go) + +Line 28. + +*** + +### SMS + +SMS initiates MFA verification via SMS. + +#### Signature + +```go +func (*MFANamespace) SMS(data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/mfa.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/mfa.go) + +Line 23. + +*** + +### Verify + +Verify verifies an MFA token for a given request ID. + +#### Signature + +```go +func (*MFANamespace) Verify(requestID string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/mfa.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/mfa.go) + +Line 33. + +## Source + +[`pkg/rest/namespaces/mfa.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/mfa.go) + +Line 11. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/number-groups-namespace/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/number-groups-namespace/index.mdx new file mode 100644 index 0000000000..e18641f846 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/number-groups-namespace/index.mdx @@ -0,0 +1,141 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/number-groups-namespace" +title: "NumberGroupsNamespace" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.NumberGroupsNamespace" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/number_groups.go" +--- +# `NumberGroupsNamespace` + +NumberGroupsNamespace provides number group management with membership operations. + +## Signature + +```go +type NumberGroupsNamespace struct +``` + +## Properties + + + +## Methods + +### AddMembership + +AddMembership adds a number to a group. + +#### Signature + +```go +func (*NumberGroupsNamespace) AddMembership(groupID string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/number_groups.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/number_groups.go) + +Line 28. + +*** + +### DeleteMembership + +DeleteMembership removes a membership by ID. + +#### Signature + +```go +func (*NumberGroupsNamespace) DeleteMembership(membershipID string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/number_groups.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/number_groups.go) + +Line 38. + +*** + +### GetMembership + +GetMembership retrieves a specific membership by ID. + +#### Signature + +```go +func (*NumberGroupsNamespace) GetMembership(membershipID string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/number_groups.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/number_groups.go) + +Line 33. + +*** + +### ListMemberships + +ListMemberships lists number group memberships for a group. + +#### Signature + +```go +func (*NumberGroupsNamespace) ListMemberships(groupID string, params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/number_groups.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/number_groups.go) + +Line 23. + +## Source + +[`pkg/rest/namespaces/number_groups.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/number_groups.go) + +Line 11. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/phone-numbers-namespace/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/phone-numbers-namespace/index.mdx new file mode 100644 index 0000000000..39d16d516a --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/phone-numbers-namespace/index.mdx @@ -0,0 +1,277 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/phone-numbers-namespace" +title: "PhoneNumbersNamespace" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.PhoneNumbersNamespace" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/phone_numbers.go" +--- +# `PhoneNumbersNamespace` + +PhoneNumbersNamespace provides phone number management with search and typed helpers for binding an inbound call to a handler (SWML webhook, cXML webhook, AI agent, call flow, RELAY application/topic). + +Binding model: set “call\_handler“ + the handler-specific companion field on the phone number; the server auto-materializes the matching Fabric resource. The helpers below (Set\*) are one-line wrappers around Update with the right call\_handler + field combination baked in. See PhoneCallHandler for the enum. + +## Signature + +```go +type PhoneNumbersNamespace struct +``` + +## Properties + + + +## Methods + +### Search + +Search searches for available phone numbers with optional filter parameters such as area\_code, contains, starts\_with, etc. + +params may contain values of any type (string, int, bool, etc.); they are converted to strings internally before the HTTP request is made, matching Python's \*\*params behaviour which accepts numeric and boolean query values. + +#### Signature + +```go +func (*PhoneNumbersNamespace) Search(params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/phone_numbers.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/phone_numbers.go) + +Line 38. + +*** + +### SetAiAgent + +SetAiAgent routes inbound calls to an AI Agent Fabric resource by ID. + +#### Signature + +```go +func (*PhoneNumbersNamespace) SetAiAgent(sid string, agentID string, extra ...map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/phone_numbers.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/phone_numbers.go) + +Line 115. + +*** + +### SetCallFlow + +SetCallFlow routes inbound calls to a Call Flow by ID. Pass nil opts for the minimal form; pass opts.Version to pin a specific version. + +#### Signature + +```go +func (*PhoneNumbersNamespace) SetCallFlow(sid string, flowID string, opts *CallFlowOptions) (map[string]any, error) +``` + +#### Parameters + + + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/phone_numbers.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/phone_numbers.go) + +Line 135. + +*** + +### SetCxmlApplication + +SetCxmlApplication routes inbound calls to an existing cXML application by ID. + +#### Signature + +```go +func (*PhoneNumbersNamespace) SetCxmlApplication(sid string, applicationID string, extra ...map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/phone_numbers.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/phone_numbers.go) + +Line 105. + +*** + +### SetCxmlWebhook + +SetCxmlWebhook routes inbound calls to a cXML (Twilio-compat / LAML) webhook. + +Despite the wire value "laml\_webhooks" being plural, this creates a single cxml\_webhook Fabric resource. Pass opts to set FallbackURL and StatusCallbackURL; pass nil for the minimal form. + +#### Signature + +```go +func (*PhoneNumbersNamespace) SetCxmlWebhook(sid string, url string, opts *CxmlWebhookOptions) (map[string]any, error) +``` + +#### Parameters + + + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/phone_numbers.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/phone_numbers.go) + +Line 85. + +*** + +### SetRelayApplication + +SetRelayApplication routes inbound calls to a named RELAY application. + +#### Signature + +```go +func (*PhoneNumbersNamespace) SetRelayApplication(sid string, name string, extra ...map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/phone_numbers.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/phone_numbers.go) + +Line 152. + +*** + +### SetRelayTopic + +SetRelayTopic routes inbound calls to a RELAY topic (client subscription). Pass nil opts for the minimal form. + +#### Signature + +```go +func (*PhoneNumbersNamespace) SetRelayTopic(sid string, topic string, opts *RelayTopicOptions) (map[string]any, error) +``` + +#### Parameters + + + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/phone_numbers.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/phone_numbers.go) + +Line 171. + +*** + +### SetSwmlWebhook + +SetSwmlWebhook routes inbound calls to an SWML webhook URL. + +Your backend returns an SWML document per call. The server auto-creates a swml\_webhook Fabric resource keyed off this URL. + +#### Signature + +```go +func (*PhoneNumbersNamespace) SetSwmlWebhook(sid string, url string, extra ...map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/phone_numbers.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/phone_numbers.go) + +Line 61. + +## Source + +[`pkg/rest/namespaces/phone_numbers.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/phone_numbers.go) + +Line 21. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/project-namespace/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/project-namespace/index.mdx new file mode 100644 index 0000000000..1cf76491b5 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/project-namespace/index.mdx @@ -0,0 +1,33 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/project-namespace" +title: "ProjectNamespace" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.ProjectNamespace" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/project.go" +--- +# `ProjectNamespace` + +ProjectNamespace groups project management resources. + +## Signature + +```go +type ProjectNamespace struct +``` + +## Properties + + + +## Source + +[`pkg/rest/namespaces/project.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/project.go) + +Line 31. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/project-tokens/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/project-tokens/index.mdx new file mode 100644 index 0000000000..aa2b3550f0 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/project-tokens/index.mdx @@ -0,0 +1,113 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/project-tokens" +title: "ProjectTokens" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.ProjectTokens" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/project.go" +--- +# `ProjectTokens` + +ProjectTokens provides project API token management. + +## Signature + +```go +type ProjectTokens struct +``` + +## Properties + + + +## Methods + +### Create + +Create creates a new project API token. + +#### Signature + +```go +func (*ProjectTokens) Create(data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/project.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/project.go) + +Line 16. + +*** + +### Delete + +Delete removes a project API token. + +#### Signature + +```go +func (*ProjectTokens) Delete(tokenID string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/project.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/project.go) + +Line 26. + +*** + +### Update + +Update modifies a project API token. + +#### Signature + +```go +func (*ProjectTokens) Update(tokenID string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/project.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/project.go) + +Line 21. + +## Source + +[`pkg/rest/namespaces/project.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/project.go) + +Line 11. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/pub-sub-namespace/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/pub-sub-namespace/index.mdx new file mode 100644 index 0000000000..be7d660f73 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/pub-sub-namespace/index.mdx @@ -0,0 +1,59 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/pub-sub-namespace" +title: "PubSubNamespace" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.PubSubNamespace" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/pubsub.go" +--- +# `PubSubNamespace` + +PubSubNamespace provides PubSub token generation. + +## Signature + +```go +type PubSubNamespace struct +``` + +## Properties + + + +## Methods + +### CreateToken + +CreateToken creates a PubSub token. + +#### Signature + +```go +func (*PubSubNamespace) CreateToken(data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/pubsub.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/pubsub.go) + +Line 23. + +## Source + +[`pkg/rest/namespaces/pubsub.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/pubsub.go) + +Line 11. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/queues-namespace/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/queues-namespace/index.mdx new file mode 100644 index 0000000000..ec9f6dae65 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/queues-namespace/index.mdx @@ -0,0 +1,115 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/queues-namespace" +title: "QueuesNamespace" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.QueuesNamespace" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/queues.go" +--- +# `QueuesNamespace` + +QueuesNamespace provides queue management with member operations. + +## Signature + +```go +type QueuesNamespace struct +``` + +## Properties + + + +## Methods + +### GetMember + +GetMember retrieves a specific member from a queue. + +#### Signature + +```go +func (*QueuesNamespace) GetMember(queueID string, memberID string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/queues.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/queues.go) + +Line 33. + +*** + +### GetNextMember + +GetNextMember retrieves the next member in the queue. + +#### Signature + +```go +func (*QueuesNamespace) GetNextMember(queueID string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/queues.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/queues.go) + +Line 28. + +*** + +### ListMembers + +ListMembers lists members of a queue. + +#### Signature + +```go +func (*QueuesNamespace) ListMembers(queueID string, params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/queues.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/queues.go) + +Line 23. + +## Source + +[`pkg/rest/namespaces/queues.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/queues.go) + +Line 11. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/recordings-namespace/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/recordings-namespace/index.mdx new file mode 100644 index 0000000000..e44192dea2 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/recordings-namespace/index.mdx @@ -0,0 +1,111 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/recordings-namespace" +title: "RecordingsNamespace" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.RecordingsNamespace" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/recordings.go" +--- +# `RecordingsNamespace` + +RecordingsNamespace provides recording management (read-only + delete). + +## Signature + +```go +type RecordingsNamespace struct +``` + +## Properties + + + +## Methods + +### Delete + +Delete removes a recording by ID. + +#### Signature + +```go +func (*RecordingsNamespace) Delete(id string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/recordings.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/recordings.go) + +Line 48. + +*** + +### Get + +Get retrieves a recording by ID. + +#### Signature + +```go +func (*RecordingsNamespace) Get(id string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/recordings.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/recordings.go) + +Line 43. + +*** + +### List + +List lists all recordings. params may contain values of any type (matching Python's \*\*data); non-string values are stringified via fmt.Sprintf before being sent as query parameters. + +#### Signature + +```go +func (*RecordingsNamespace) List(params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/recordings.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/recordings.go) + +Line 27. + +## Source + +[`pkg/rest/namespaces/recordings.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/recordings.go) + +Line 13. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/registry-brands/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/registry-brands/index.mdx new file mode 100644 index 0000000000..4c6c2b4ba9 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/registry-brands/index.mdx @@ -0,0 +1,167 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/registry-brands" +title: "RegistryBrands" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.RegistryBrands" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/registry.go" +--- +# `RegistryBrands` + +RegistryBrands provides 10DLC brand management. + +## Signature + +```go +type RegistryBrands struct +``` + +## Properties + + + +## Methods + +### Create + +Create creates a new brand. + +#### Signature + +```go +func (*RegistryBrands) Create(data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/registry.go) + +Line 23. + +*** + +### CreateCampaign + +CreateCampaign creates a campaign under a brand. + +#### Signature + +```go +func (*RegistryBrands) CreateCampaign(brandID string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/registry.go) + +Line 38. + +*** + +### Get + +Get retrieves a brand by ID. + +#### Signature + +```go +func (*RegistryBrands) Get(brandID string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/registry.go) + +Line 28. + +*** + +### List + +List lists all brands. + +#### Signature + +```go +func (*RegistryBrands) List(params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/registry.go) + +Line 18. + +*** + +### ListCampaigns + +ListCampaigns lists campaigns for a brand. + +#### Signature + +```go +func (*RegistryBrands) ListCampaigns(brandID string, params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/registry.go) + +Line 33. + +## Source + +[`pkg/rest/namespaces/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/registry.go) + +Line 13. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/registry-campaigns/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/registry-campaigns/index.mdx new file mode 100644 index 0000000000..996ad9492c --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/registry-campaigns/index.mdx @@ -0,0 +1,171 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/registry-campaigns" +title: "RegistryCampaigns" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.RegistryCampaigns" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/registry.go" +--- +# `RegistryCampaigns` + +RegistryCampaigns provides 10DLC campaign management. + +## Signature + +```go +type RegistryCampaigns struct +``` + +## Properties + + + +## Methods + +### CreateOrder + +CreateOrder creates a number assignment order for a campaign. + +#### Signature + +```go +func (*RegistryCampaigns) CreateOrder(campaignID string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/registry.go) + +Line 70. + +*** + +### Get + +Get retrieves a campaign by ID. + +#### Signature + +```go +func (*RegistryCampaigns) Get(campaignID string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/registry.go) + +Line 50. + +*** + +### ListNumbers + +ListNumbers lists numbers assigned to a campaign. + +#### Signature + +```go +func (*RegistryCampaigns) ListNumbers(campaignID string, params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/registry.go) + +Line 60. + +*** + +### ListOrders + +ListOrders lists orders for a campaign. + +#### Signature + +```go +func (*RegistryCampaigns) ListOrders(campaignID string, params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/registry.go) + +Line 65. + +*** + +### Update + +Update modifies a campaign by ID. + +#### Signature + +```go +func (*RegistryCampaigns) Update(campaignID string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/registry.go) + +Line 55. + +## Source + +[`pkg/rest/namespaces/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/registry.go) + +Line 45. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/registry-namespace/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/registry-namespace/index.mdx new file mode 100644 index 0000000000..069a7fc1aa --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/registry-namespace/index.mdx @@ -0,0 +1,39 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/registry-namespace" +title: "RegistryNamespace" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.RegistryNamespace" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/registry.go" +--- +# `RegistryNamespace` + +RegistryNamespace groups all 10DLC Campaign Registry resources. + +## Signature + +```go +type RegistryNamespace struct +``` + +## Properties + + + + + + + + + +## Source + +[`pkg/rest/namespaces/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/registry.go) + +Line 101. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/registry-numbers/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/registry-numbers/index.mdx new file mode 100644 index 0000000000..30bef62714 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/registry-numbers/index.mdx @@ -0,0 +1,59 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/registry-numbers" +title: "RegistryNumbers" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.RegistryNumbers" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/registry.go" +--- +# `RegistryNumbers` + +RegistryNumbers provides 10DLC number assignment management. + +## Signature + +```go +type RegistryNumbers struct +``` + +## Properties + + + +## Methods + +### Delete + +Delete removes a number assignment. + +#### Signature + +```go +func (*RegistryNumbers) Delete(numberID string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/registry.go) + +Line 94. + +## Source + +[`pkg/rest/namespaces/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/registry.go) + +Line 89. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/registry-orders/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/registry-orders/index.mdx new file mode 100644 index 0000000000..2b5a27b613 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/registry-orders/index.mdx @@ -0,0 +1,59 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/registry-orders" +title: "RegistryOrders" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.RegistryOrders" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/registry.go" +--- +# `RegistryOrders` + +RegistryOrders provides 10DLC assignment order management. + +## Signature + +```go +type RegistryOrders struct +``` + +## Properties + + + +## Methods + +### Get + +Get retrieves an order by ID. + +#### Signature + +```go +func (*RegistryOrders) Get(orderID string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/registry.go) + +Line 82. + +## Source + +[`pkg/rest/namespaces/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/registry.go) + +Line 77. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/relay-topic-options/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/relay-topic-options/index.mdx new file mode 100644 index 0000000000..f7060e401e --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/relay-topic-options/index.mdx @@ -0,0 +1,39 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/relay-topic-options" +title: "RelayTopicOptions" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.RelayTopicOptions" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/phone_numbers.go" +--- +# `RelayTopicOptions` + +RelayTopicOptions holds optional fields for SetRelayTopic. + +## Signature + +```go +type RelayTopicOptions struct +``` + +## Properties + + + Extra passes through additional wire-level fields. + + + + StatusCallbackURL receives topic status updates. + + +## Source + +[`pkg/rest/namespaces/phone_numbers.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/phone_numbers.go) + +Line 162. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/resource/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/resource/index.mdx new file mode 100644 index 0000000000..1e78e6acb9 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/resource/index.mdx @@ -0,0 +1,61 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/resource" +title: "Resource" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.Resource" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/common.go" +--- +# `Resource` + +Resource is a helper for building sub-paths from a base path. + +## Signature + +```go +type Resource struct +``` + +## Properties + + + + + +## Methods + +### Path + +Path joins additional segments onto the base path. + +#### Signature + +```go +func (*Resource) Path(parts ...string) string +``` + +#### Parameters + + + +#### Returns + +`string` + +#### Source + +[`pkg/rest/namespaces/common.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/common.go) + +Line 32. + +## Source + +[`pkg/rest/namespaces/common.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/common.go) + +Line 26. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/short-codes-namespace/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/short-codes-namespace/index.mdx new file mode 100644 index 0000000000..28db367891 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/short-codes-namespace/index.mdx @@ -0,0 +1,113 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/short-codes-namespace" +title: "ShortCodesNamespace" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.ShortCodesNamespace" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/short_codes.go" +--- +# `ShortCodesNamespace` + +ShortCodesNamespace provides short code management (read + update only). + +## Signature + +```go +type ShortCodesNamespace struct +``` + +## Properties + + + +## Methods + +### Get + +Get retrieves a short code by ID. + +#### Signature + +```go +func (*ShortCodesNamespace) Get(id string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/short_codes.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/short_codes.go) + +Line 34. + +*** + +### List + +List lists all short codes. + +#### Signature + +```go +func (*ShortCodesNamespace) List(params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/short_codes.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/short_codes.go) + +Line 25. + +*** + +### Update + +Update modifies a short code by ID. + +#### Signature + +```go +func (*ShortCodesNamespace) Update(id string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/short_codes.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/short_codes.go) + +Line 39. + +## Source + +[`pkg/rest/namespaces/short_codes.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/short_codes.go) + +Line 13. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/sip-profile-namespace/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/sip-profile-namespace/index.mdx new file mode 100644 index 0000000000..336e9d211e --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/sip-profile-namespace/index.mdx @@ -0,0 +1,81 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/sip-profile-namespace" +title: "SipProfileNamespace" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.SipProfileNamespace" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/sip_profile.go" +--- +# `SipProfileNamespace` + +SipProfileNamespace provides project SIP profile management (singleton resource). + +## Signature + +```go +type SipProfileNamespace struct +``` + +## Properties + + + +## Methods + +### Get + +Get retrieves the project SIP profile. + +#### Signature + +```go +func (*SipProfileNamespace) Get() (map[string]any, error) +``` + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/sip_profile.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/sip_profile.go) + +Line 23. + +*** + +### Update + +Update modifies the project SIP profile. + +#### Signature + +```go +func (*SipProfileNamespace) Update(data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/sip_profile.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/sip_profile.go) + +Line 28. + +## Source + +[`pkg/rest/namespaces/sip_profile.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/sip_profile.go) + +Line 11. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/subscribers-resource/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/subscribers-resource/index.mdx new file mode 100644 index 0000000000..34dd7da927 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/subscribers-resource/index.mdx @@ -0,0 +1,175 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/subscribers-resource" +title: "SubscribersResource" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.SubscribersResource" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go" +--- +# `SubscribersResource` + +SubscribersResource extends CrudResource with SIP endpoint management. + +## Signature + +```go +type SubscribersResource struct +``` + +## Properties + + + +## Methods + +### CreateSIPEndpoint + +CreateSIPEndpoint creates a SIP endpoint for a subscriber. + +#### Signature + +```go +func (*SubscribersResource) CreateSIPEndpoint(subscriberID string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 125. + +*** + +### DeleteSIPEndpoint + +DeleteSIPEndpoint deletes a SIP endpoint from a subscriber. + +#### Signature + +```go +func (*SubscribersResource) DeleteSIPEndpoint(subscriberID string, endpointID string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 140. + +*** + +### GetSIPEndpoint + +GetSIPEndpoint retrieves a SIP endpoint for a subscriber. + +#### Signature + +```go +func (*SubscribersResource) GetSIPEndpoint(subscriberID string, endpointID string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 130. + +*** + +### ListSIPEndpoints + +ListSIPEndpoints lists SIP endpoints for a subscriber. + +#### Signature + +```go +func (*SubscribersResource) ListSIPEndpoints(subscriberID string, params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 120. + +*** + +### UpdateSIPEndpoint + +UpdateSIPEndpoint updates a SIP endpoint for a subscriber. + +#### Signature + +```go +func (*SubscribersResource) UpdateSIPEndpoint(subscriberID string, endpointID string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 135. + +## Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 115. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/verified-callers-namespace/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/verified-callers-namespace/index.mdx new file mode 100644 index 0000000000..23cba7b23e --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/verified-callers-namespace/index.mdx @@ -0,0 +1,87 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/verified-callers-namespace" +title: "VerifiedCallersNamespace" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.VerifiedCallersNamespace" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/verified_callers.go" +--- +# `VerifiedCallersNamespace` + +VerifiedCallersNamespace provides verified caller ID management with verification flow. + +## Signature + +```go +type VerifiedCallersNamespace struct +``` + +## Properties + + + +## Methods + +### RedialVerification + +RedialVerification redials the verification call for a caller ID. + +#### Signature + +```go +func (*VerifiedCallersNamespace) RedialVerification(callerID string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/verified_callers.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/verified_callers.go) + +Line 24. + +*** + +### SubmitVerification + +SubmitVerification submits a verification code for a caller ID. + +#### Signature + +```go +func (*VerifiedCallersNamespace) SubmitVerification(callerID string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/verified_callers.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/verified_callers.go) + +Line 29. + +## Source + +[`pkg/rest/namespaces/verified_callers.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/verified_callers.go) + +Line 12. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-conference-tokens/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-conference-tokens/index.mdx new file mode 100644 index 0000000000..46005dd09a --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-conference-tokens/index.mdx @@ -0,0 +1,85 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-conference-tokens" +title: "VideoConferenceTokens" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.VideoConferenceTokens" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go" +--- +# `VideoConferenceTokens` + +VideoConferenceTokens provides video conference token management. + +## Signature + +```go +type VideoConferenceTokens struct +``` + +## Properties + + + +## Methods + +### Get + +Get retrieves a conference token. + +#### Signature + +```go +func (*VideoConferenceTokens) Get(tokenID string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) + +Line 129. + +*** + +### Reset + +Reset resets a conference token. + +#### Signature + +```go +func (*VideoConferenceTokens) Reset(tokenID string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) + +Line 134. + +## Source + +[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) + +Line 124. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-conferences/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-conferences/index.mdx new file mode 100644 index 0000000000..f97bd8411f --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-conferences/index.mdx @@ -0,0 +1,117 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-conferences" +title: "VideoConferences" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.VideoConferences" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go" +--- +# `VideoConferences` + +VideoConferences provides video conference management with tokens and streams. + +## Signature + +```go +type VideoConferences struct +``` + +## Properties + + + +## Methods + +### CreateStream + +CreateStream creates a stream for a conference. + +#### Signature + +```go +func (*VideoConferences) CreateStream(conferenceID string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) + +Line 117. + +*** + +### ListConferenceTokens + +ListConferenceTokens lists tokens for a conference. + +#### Signature + +```go +func (*VideoConferences) ListConferenceTokens(conferenceID string, params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) + +Line 107. + +*** + +### ListStreams + +ListStreams lists streams for a conference. + +#### Signature + +```go +func (*VideoConferences) ListStreams(conferenceID string, params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) + +Line 112. + +## Source + +[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) + +Line 102. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-namespace/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-namespace/index.mdx new file mode 100644 index 0000000000..3bc01cf743 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-namespace/index.mdx @@ -0,0 +1,45 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-namespace" +title: "VideoNamespace" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.VideoNamespace" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go" +--- +# `VideoNamespace` + +VideoNamespace groups all Video API resources. + +## Signature + +```go +type VideoNamespace struct +``` + +## Properties + + + + + + + + + + + + + + + +## Source + +[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) + +Line 164. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-room-recordings/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-room-recordings/index.mdx new file mode 100644 index 0000000000..c694eb0772 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-room-recordings/index.mdx @@ -0,0 +1,139 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-room-recordings" +title: "VideoRoomRecordings" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.VideoRoomRecordings" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go" +--- +# `VideoRoomRecordings` + +VideoRoomRecordings provides video room recording management. + +## Signature + +```go +type VideoRoomRecordings struct +``` + +## Properties + + + +## Methods + +### Delete + +Delete removes a room recording. It returns the parsed response body (or an empty map for 204 No Content) and any error. + +#### Signature + +```go +func (*VideoRoomRecordings) Delete(recordingID string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) + +Line 90. + +*** + +### Get + +Get retrieves a specific room recording. + +#### Signature + +```go +func (*VideoRoomRecordings) Get(recordingID string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) + +Line 84. + +*** + +### List + +List lists all room recordings. + +#### Signature + +```go +func (*VideoRoomRecordings) List(params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) + +Line 79. + +*** + +### ListEvents + +ListEvents lists events for a room recording. + +#### Signature + +```go +func (*VideoRoomRecordings) ListEvents(recordingID string, params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) + +Line 95. + +## Source + +[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) + +Line 74. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-room-sessions/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-room-sessions/index.mdx new file mode 100644 index 0000000000..070e1aea55 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-room-sessions/index.mdx @@ -0,0 +1,169 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-room-sessions" +title: "VideoRoomSessions" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.VideoRoomSessions" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go" +--- +# `VideoRoomSessions` + +VideoRoomSessions provides video room session management. + +## Signature + +```go +type VideoRoomSessions struct +``` + +## Properties + + + +## Methods + +### Get + +Get retrieves a specific room session. + +#### Signature + +```go +func (*VideoRoomSessions) Get(sessionID string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) + +Line 52. + +*** + +### List + +List lists all room sessions. + +#### Signature + +```go +func (*VideoRoomSessions) List(params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) + +Line 47. + +*** + +### ListEvents + +ListEvents lists events for a room session. + +#### Signature + +```go +func (*VideoRoomSessions) ListEvents(sessionID string, params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) + +Line 57. + +*** + +### ListMembers + +ListMembers lists members in a room session. + +#### Signature + +```go +func (*VideoRoomSessions) ListMembers(sessionID string, params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) + +Line 62. + +*** + +### ListRecordings + +ListRecordings lists recordings for a room session. + +#### Signature + +```go +func (*VideoRoomSessions) ListRecordings(sessionID string, params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) + +Line 67. + +## Source + +[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) + +Line 42. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-room-tokens/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-room-tokens/index.mdx new file mode 100644 index 0000000000..b360994edd --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-room-tokens/index.mdx @@ -0,0 +1,59 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-room-tokens" +title: "VideoRoomTokens" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.VideoRoomTokens" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go" +--- +# `VideoRoomTokens` + +VideoRoomTokens provides video room token generation. + +## Signature + +```go +type VideoRoomTokens struct +``` + +## Properties + + + +## Methods + +### Create + +Create creates a video room token. + +#### Signature + +```go +func (*VideoRoomTokens) Create(data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) + +Line 35. + +## Source + +[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) + +Line 30. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-rooms/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-rooms/index.mdx new file mode 100644 index 0000000000..ec4a0bbd38 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-rooms/index.mdx @@ -0,0 +1,89 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-rooms" +title: "VideoRooms" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.VideoRooms" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go" +--- +# `VideoRooms` + +VideoRooms provides video room management with stream sub-resources. + +## Signature + +```go +type VideoRooms struct +``` + +## Properties + + + +## Methods + +### CreateStream + +CreateStream creates a stream for a video room. + +#### Signature + +```go +func (*VideoRooms) CreateStream(roomID string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) + +Line 23. + +*** + +### ListStreams + +ListStreams lists streams for a video room. + +#### Signature + +```go +func (*VideoRooms) ListStreams(roomID string, params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) + +Line 18. + +## Source + +[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) + +Line 13. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-streams/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-streams/index.mdx new file mode 100644 index 0000000000..9591545a81 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-streams/index.mdx @@ -0,0 +1,113 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-streams" +title: "VideoStreams" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.VideoStreams" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go" +--- +# `VideoStreams` + +VideoStreams provides video stream management. + +## Signature + +```go +type VideoStreams struct +``` + +## Properties + + + +## Methods + +### Delete + +Delete removes a video stream. It returns the parsed response body (or an empty map for 204 No Content) and any error. + +#### Signature + +```go +func (*VideoStreams) Delete(streamID string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) + +Line 157. + +*** + +### Get + +Get retrieves a video stream. + +#### Signature + +```go +func (*VideoStreams) Get(streamID string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) + +Line 146. + +*** + +### Update + +Update modifies a video stream. + +#### Signature + +```go +func (*VideoStreams) Update(streamID string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) + +Line 151. + +## Source + +[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) + +Line 141. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/voice-logs/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/voice-logs/index.mdx new file mode 100644 index 0000000000..11afa15584 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/voice-logs/index.mdx @@ -0,0 +1,113 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/voice-logs" +title: "VoiceLogs" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.VoiceLogs" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/logs.go" +--- +# `VoiceLogs` + +VoiceLogs provides voice log queries. + +## Signature + +```go +type VoiceLogs struct +``` + +## Properties + + + +## Methods + +### Get + +Get retrieves a specific voice log entry. + +#### Signature + +```go +func (*VoiceLogs) Get(logID string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/logs.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/logs.go) + +Line 40. + +*** + +### List + +List lists voice logs. + +#### Signature + +```go +func (*VoiceLogs) List(params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/logs.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/logs.go) + +Line 35. + +*** + +### ListEvents + +ListEvents lists events for a voice log entry. + +#### Signature + +```go +func (*VoiceLogs) ListEvents(logID string, params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/logs.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/logs.go) + +Line 45. + +## Source + +[`pkg/rest/namespaces/logs.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/logs.go) + +Line 30. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/rest/crud-resource/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/rest/crud-resource/index.mdx new file mode 100644 index 0000000000..4f0cd71e66 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/rest/crud-resource/index.mdx @@ -0,0 +1,171 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/rest/crud-resource" +title: "CrudResource" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest.CrudResource" + parent: "github.com/signalwire/signalwire-go/pkg/rest" + module: "github.com.signalwire.signalwire-go.pkg.rest" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go" +--- +# `CrudResource` + +CrudResource provides standard List, Create, Get, Update, Delete operations against a REST collection endpoint. Update defaults to PATCH; set UpdateMethod to "PUT" to override. + +## Signature + +```go +type CrudResource struct +``` + +## Properties + + + + + + + "PATCH" (default) or "PUT" + + +## Methods + +### Create + +Create sends a POST request to create a new resource. + +#### Signature + +```go +func (*CrudResource) Create(data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) + +Line 276. + +*** + +### Delete + +Delete removes a resource by ID. It returns the parsed response body (or an empty map for 204 No Content) and any error. + +#### Signature + +```go +func (*CrudResource) Delete(id string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) + +Line 297. + +*** + +### Get + +Get retrieves a single resource by ID. + +#### Signature + +```go +func (*CrudResource) Get(id string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) + +Line 281. + +*** + +### List + +List retrieves all items from the collection. Optional query parameters can be provided. The raw JSON response map is returned. + +#### Signature + +```go +func (*CrudResource) List(params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) + +Line 271. + +*** + +### Update + +Update modifies an existing resource by ID using the configured update method (PATCH or PUT). + +#### Signature + +```go +func (*CrudResource) Update(id string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) + +Line 287. + +## Source + +[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) + +Line 239. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/rest/http-client/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/rest/http-client/index.mdx new file mode 100644 index 0000000000..4ae2d2a46a --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/rest/http-client/index.mdx @@ -0,0 +1,213 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/rest/http-client" +title: "HttpClient" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest.HttpClient" + parent: "github.com/signalwire/signalwire-go/pkg/rest" + module: "github.com.signalwire.signalwire-go.pkg.rest" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go" +--- +# `HttpClient` + +HttpClient is a thin wrapper around net/http that provides Basic Auth, JSON encoding/decoding, and standard headers for SignalWire API calls. + +## Signature + +```go +type HttpClient struct +``` + +## Methods + +### BaseURL + +BaseURL returns the base URL used by this client. + +#### Signature + +```go +func (*HttpClient) BaseURL() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) + +Line 124. + +*** + +### Delete + +Delete performs an HTTP DELETE request. It returns the parsed response body (or an empty map for 204 No Content) and any error. + +#### Signature + +```go +func (*HttpClient) Delete(path string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) + +Line 160. + +*** + +### Get + +Get performs an HTTP GET request. params are added as query-string parameters. + +#### Signature + +```go +func (*HttpClient) Get(path string, params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) + +Line 138. + +*** + +### Patch + +Patch performs an HTTP PATCH request with a JSON body. + +#### Signature + +```go +func (*HttpClient) Patch(path string, body map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) + +Line 154. + +*** + +### Post + +Post performs an HTTP POST request with a JSON body. Optional params are appended to the URL as query-string parameters. + +#### Signature + +```go +func (*HttpClient) Post(path string, body map[string]any, params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) + +Line 144. + +*** + +### Put + +Put performs an HTTP PUT request with a JSON body. + +#### Signature + +```go +func (*HttpClient) Put(path string, body map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) + +Line 149. + +*** + +### SetBaseURL + +SetBaseURL overrides the base URL used by this client. Useful for pointing the client at a non-default endpoint (audit fixtures, mock servers, etc.) without re-running the constructor with a synthetic space name. + +#### Signature + +```go +func (*HttpClient) SetBaseURL(url string) +``` + +#### Parameters + + + +#### Source + +[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) + +Line 132. + +## Source + +[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) + +Line 62. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/rest/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/rest/index.mdx new file mode 100644 index 0000000000..407e732543 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/rest/index.mdx @@ -0,0 +1,265 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/rest" +title: "rest" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "module" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest" + module: "github.com.signalwire.signalwire-go.pkg.rest" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go" +--- +# `rest` + +Package rest provides a REST client for the SignalWire platform APIs. + +It includes an HTTP transport layer, generic CRUD resource abstractions, paginated iteration, and namespaced sub-clients for each API domain. + +## Signature + +```go +package rest +``` + +## Classes + + + + CrudResource provides standard List, Create, Get, Update, Delete operations against a REST collection endpoint. Update defaults to PATCH; set UpdateMethod to "PUT" to override. + + + + HttpClient is a thin wrapper around net/http that provides Basic Auth, JSON encoding/decoding, and standard headers for SignalWire API calls. + + + + PaginatedIterator walks through paginated API responses one page at a time. Each call to Next returns the items from the current page, a boolean indicating whether more pages exist, and any error encountered. + + + + RestClient is the top-level REST client for the SignalWire platform. It provides namespaced access to all SignalWire API domains. + + + + SignalWireRestError is returned when the SignalWire REST API responds with a non-2xx status code. + + + +## Functions + +### NewCrudResource + +NewCrudResource creates a CrudResource for the given path. The default update method is PATCH. + +#### Signature + +```go +func NewCrudResource(client *HttpClient, path string) *CrudResource +``` + +#### Parameters + + + + + +#### Returns + +`*CrudResource` + +#### Source + +[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) + +Line 247. + +*** + +### NewCrudResourcePUT + +NewCrudResourcePUT creates a CrudResource that uses PUT for updates. + +#### Signature + +```go +func NewCrudResourcePUT(client *HttpClient, path string) *CrudResource +``` + +#### Parameters + + + + + +#### Returns + +`*CrudResource` + +#### Source + +[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) + +Line 256. + +*** + +### NewHttpClient + +NewHttpClient creates a new HttpClient configured for the given SignalWire space. The baseURL is normally constructed as "https://\", but the SIGNALWIRE\_REST\_BASE\_URL environment variable overrides it when set — pointing the client at a loopback fixture for the porting-sdk audit\_rest\_transport.py harness, or at any non-default endpoint. + +#### Signature + +```go +func NewHttpClient(projectID string, token string, space string) *HttpClient +``` + +#### Parameters + + + + + + + +#### Returns + +`*HttpClient` + +#### Source + +[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) + +Line 75. + +*** + +### NewPaginatedIterator + +NewPaginatedIterator creates a new iterator for the given endpoint. dataKey is the JSON key that holds the array of items (typically "data"). + +#### Signature + +```go +func NewPaginatedIterator( + client *HttpClient, + path string, + params map[string]string, + dataKey string +) *PaginatedIterator +``` + +#### Parameters + + + + + + + + + +#### Returns + +`*PaginatedIterator` + +#### Source + +[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) + +Line 316. + +*** + +### NewRestClient + +NewRestClient creates a new RestClient. If project, token, or space are empty strings the corresponding environment variables are used: + +``` +SIGNALWIRE_PROJECT_ID +SIGNALWIRE_API_TOKEN +SIGNALWIRE_SPACE +``` + +An error is returned when any of the three values is still empty after the environment lookup. + +#### Signature + +```go +func NewRestClient(project string, token string, space string) (*RestClient, error) +``` + +#### Parameters + + + + + + + +#### Returns + +`(*RestClient, error)` + +#### Examples + + + + ```go + SIGNALWIRE_PROJECT_ID + SIGNALWIRE_API_TOKEN + SIGNALWIRE_SPACE + ``` + + + + ```go + SIGNALWIRE_PROJECT_ID + SIGNALWIRE_API_TOKEN + SIGNALWIRE_SPACE + ``` + + + +#### Source + +[`pkg/rest/rest_client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/rest_client.go) + +Line 99. + +*** + +### NewSignalWireRestError + +NewSignalWireRestError constructs a SignalWireRestError, substituting "GET" as the method when method is empty — matches Python's default. + +#### Signature + +```go +func NewSignalWireRestError(statusCode int, body string, url string, method string) *SignalWireRestError +``` + +#### Parameters + + + + + + + + + +#### Returns + +`*SignalWireRestError` + +#### Source + +[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) + +Line 51. + +## Source + +[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/rest/paginated-iterator/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/rest/paginated-iterator/index.mdx new file mode 100644 index 0000000000..122260b5c4 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/rest/paginated-iterator/index.mdx @@ -0,0 +1,77 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/rest/paginated-iterator" +title: "PaginatedIterator" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest.PaginatedIterator" + parent: "github.com/signalwire/signalwire-go/pkg/rest" + module: "github.com.signalwire.signalwire-go.pkg.rest" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go" +--- +# `PaginatedIterator` + +PaginatedIterator walks through paginated API responses one page at a time. Each call to Next returns the items from the current page, a boolean indicating whether more pages exist, and any error encountered. + +## Signature + +```go +type PaginatedIterator struct +``` + +## Methods + +### ForEach + +ForEach calls fn for every item across all pages. It fetches pages lazily via Next and invokes fn once per item in the order they are returned. Iteration stops early if fn returns a non-nil error (that error is returned to the caller) or when Next signals there are no more pages. + +#### Signature + +```go +func (*PaginatedIterator) ForEach(fn func(map[string]any) error) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) + +Line 387. + +*** + +### Next + +Next fetches the next page of results. It returns the items from the page, a boolean hasMore that is true when additional pages remain, and any error. When there are no more pages, it returns nil, false, nil. + +#### Signature + +```go +func (*PaginatedIterator) Next() ([]map[string]any, bool, error) +``` + +#### Returns + +`([]map[string]any, bool, error)` + +#### Source + +[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) + +Line 334. + +## Source + +[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) + +Line 306. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/rest/rest-client/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/rest/rest-client/index.mdx new file mode 100644 index 0000000000..c7b9bd5a76 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/rest/rest-client/index.mdx @@ -0,0 +1,174 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/rest/rest-client" +title: "RestClient" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest.RestClient" + parent: "github.com/signalwire/signalwire-go/pkg/rest" + module: "github.com.signalwire.signalwire-go.pkg.rest" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/rest_client.go" +--- +# `RestClient` + +RestClient is the top-level REST client for the SignalWire platform. It provides namespaced access to all SignalWire API domains. + +Usage: + +``` +client, err := rest.NewRestClient("project-id", "api-token", "your-space.signalwire.com") +// or use environment variables SIGNALWIRE_PROJECT_ID, SIGNALWIRE_API_TOKEN, SIGNALWIRE_SPACE +client, err := rest.NewRestClient("", "", "") + +agents, err := client.Fabric.AIAgents.List(nil) +client.Calling.Play("call-id", map[string]any{"play": [...]}) +``` + +## Signature + +```go +type RestClient struct +``` + +## Examples + + + + ```go + client, err := rest.NewRestClient("project-id", "api-token", "your-space.signalwire.com") + // or use environment variables SIGNALWIRE_PROJECT_ID, SIGNALWIRE_API_TOKEN, SIGNALWIRE_SPACE + client, err := rest.NewRestClient("", "", "") + + agents, err := client.Fabric.AIAgents.List(nil) + client.Calling.Play("call-id", map[string]any{"play": [...]}) + ``` + + + + ```go + client, err := rest.NewRestClient("project-id", "api-token", "your-space.signalwire.com") + // or use environment variables SIGNALWIRE_PROJECT_ID, SIGNALWIRE_API_TOKEN, SIGNALWIRE_SPACE + client, err := rest.NewRestClient("", "", "") + + agents, err := client.Fabric.AIAgents.List(nil) + client.Calling.Play("call-id", map[string]any{"play": [...]}) + ``` + + + +## Properties + + + + + Calling API (REST-based call control) + + + + + + Compatibility (Twilio-compatible) LAML API + + + + Datasphere API + + + + Fabric API + + + + + + Logs + + + + + + + + + + Relay REST resources + + + + Project management + + + + PubSub & Chat + + + + + + + + 10DLC Campaign Registry + + + + + + + + + + Video API + + +## Methods + +### HttpClient + +HttpClient exposes the underlying HTTP transport. It is the public form of Python's “signalwire\_client.\_http“ and is the entry point used by helpers like PaginatedIterator that need raw GET access without going through a namespace resource. + +#### Signature + +```go +func (*RestClient) HttpClient() *HttpClient +``` + +#### Returns + +`*HttpClient` + +#### Source + +[`pkg/rest/rest_client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/rest_client.go) + +Line 86. + +*** + +### SetBaseURL + +SetBaseURL overrides the base URL used by the underlying HttpClient. Useful for pointing the client at a non-default endpoint such as the audit\_rest\_transport.py harness fixture, a recorded-cassette mock server, or a regional endpoint without re-running the constructor. + +#### Signature + +```go +func (*RestClient) SetBaseURL(url string) +``` + +#### Parameters + + + +#### Source + +[`pkg/rest/rest_client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/rest_client.go) + +Line 78. + +## Source + +[`pkg/rest/rest_client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/rest_client.go) + +Line 28. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/rest/signal-wire-rest-error/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/rest/signal-wire-rest-error/index.mdx new file mode 100644 index 0000000000..d0558addcd --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/rest/signal-wire-rest-error/index.mdx @@ -0,0 +1,61 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/rest/signal-wire-rest-error" +title: "SignalWireRestError" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest.SignalWireRestError" + parent: "github.com/signalwire/signalwire-go/pkg/rest" + module: "github.com.signalwire.signalwire-go.pkg.rest" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go" +--- +# `SignalWireRestError` + +SignalWireRestError is returned when the SignalWire REST API responds with a non-2xx status code. + +## Signature + +```go +type SignalWireRestError struct +``` + +## Properties + + + + + + + + + +## Methods + +### Error + +Error implements the error interface. + +#### Signature + +```go +func (*SignalWireRestError) Error() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) + +Line 45. + +## Source + +[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) + +Line 37. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/security/security/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/security/security/index.mdx new file mode 100644 index 0000000000..aa52713ea8 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/security/security/index.mdx @@ -0,0 +1,367 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/security/security" +title: "security" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "module" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/security" + module: "github.com.signalwire.signalwire-go.pkg.security" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/security/session_manager.go" +--- +# `security` + +Package security provides session management and token-based authentication for SWAIG function calls, preventing unauthorized tool execution. + +## Signature + +```go +package security +``` + +## Constants + + + ErrMissingSigningKey is returned by ValidateWebhookSignatureE / ValidateRequestE when an empty signing key is supplied. Per the spec, a missing signing key is a programming error rather than a validation failure, so the bool-returning entry points panic; the \*E variants return this sentinel for callers that prefer error returns. + + + + RawBodyContextKey is the context key under which WebhookMiddleware stashes the raw request body. Downstream handlers should retrieve via RawBodyFromContext rather than reaching for this key directly. + + +## Classes + + + + SessionManager creates and validates HMAC-SHA256 tokens for SWAIG function calls. The secret can be supplied at construction time (for cross-process validation) or auto-generated (default, single-process use). + + + + WebhookOpts configures WebhookMiddleware. + + + +## Functions + +### NewSessionManager + +NewSessionManager creates a new SessionManager. If tokenExpirySecs is \<= 0, a default of 900 seconds (15 minutes) is used, matching the Python SDK default. Provide functional options (e.g. WithSecret) to customise behaviour. + +#### Signature + +```go +func NewSessionManager(tokenExpirySecs int, opts ...Option) *SessionManager +``` + +#### Parameters + + + + + +#### Returns + +`*SessionManager` + +#### Source + +[`pkg/security/session_manager.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/security/session_manager.go) + +Line 55. + +*** + +### RawBodyFromContext + +RawBodyFromContext returns the raw request body bytes that the webhook middleware captured before signature validation. Returns nil and false when called from a handler that wasn't wrapped by WebhookMiddleware (or when the request had no body). + +#### Signature + +```go +func RawBodyFromContext(ctx context.Context) ([]byte, bool) +``` + +#### Parameters + + + +#### Returns + +`([]byte, bool)` + +#### Source + +[`pkg/security/webhook_middleware.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/security/webhook_middleware.go) + +Line 42. + +*** + +### ValidateRequest + +ValidateRequest is the legacy @signalwire/compatibility-api drop-in entry point. The fourth argument is dynamically dispatched: + +- string: delegate to ValidateWebhookSignature (Scheme A then Scheme B with parsed form); +- map\[string]\[]string / url.Values / map\[string]string: pre-parsed form params, run Scheme B directly with URL port normalization; +- nil: pre-parsed empty params, run Scheme B with empty concat string; +- anything else: panic with a clear message (programmer error). + +#### Signature + +```go +func ValidateRequest( + signingKey string, + signature string, + urlStr string, + paramsOrRawBody any +) bool +``` + +#### Parameters + + + + + + + + + +#### Returns + +`bool` + +#### Source + +[`pkg/security/webhook.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/security/webhook.go) + +Line 243. + +*** + +### ValidateRequestE + +ValidateRequestE is the error-returning variant of ValidateRequest. Returns ErrMissingSigningKey when signingKey is empty, or a typed error when paramsOrRawBody is neither a string, nil, nor a recognized map shape. + +#### Signature + +```go +func ValidateRequestE( + signingKey string, + signature string, + urlStr string, + paramsOrRawBody any +) (bool, error) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`(bool, error)` + +#### Source + +[`pkg/security/webhook.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/security/webhook.go) + +Line 299. + +*** + +### ValidateWebhookSignature + +ValidateWebhookSignature validates a SignalWire webhook signature against both schemes. Returns true if the signature matches Scheme A (hex JSON) or Scheme B (base64 form, with port-normalization variants and optional bodySHA256 fallback); false otherwise. + +signingKey: customer's Signing Key. Empty string panics — that's a programming error, not a validation failure (use ValidateWebhookSignatureE for the error-returning variant). + +signature: X-SignalWire-Signature (or X-Twilio-Signature) header value. Empty returns false without panicking. + +url: full URL SignalWire POSTed to (scheme, host, optional port, path, query). Must match what the platform saw — see the URL reconstruction section of porting-sdk/webhooks.md. + +rawBody: raw request body bytes as a UTF-8 string, BEFORE any JSON / form parsing. + +All comparisons use crypto/subtle.ConstantTimeCompare. The function does not log which scheme was tried, what the expected signature was, or any other branch information. + +#### Signature + +```go +func ValidateWebhookSignature( + signingKey string, + signature string, + url string, + rawBody string +) bool +``` + +#### Parameters + + + + + + + + + +#### Returns + +`bool` + +#### Source + +[`pkg/security/webhook.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/security/webhook.go) + +Line 226. + +*** + +### ValidateWebhookSignatureE + +ValidateWebhookSignatureE is the error-returning variant of ValidateWebhookSignature. Returns ErrMissingSigningKey when signingKey is empty; otherwise (matched, nil). + +#### Signature + +```go +func ValidateWebhookSignatureE( + signingKey string, + signature string, + urlStr string, + rawBody string +) (bool, error) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`(bool, error)` + +#### Source + +[`pkg/security/webhook.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/security/webhook.go) + +Line 258. + +*** + +### WebhookMiddleware + +WebhookMiddleware returns an http.Handler middleware that validates the X-SignalWire-Signature (or X-Twilio-Signature) header against signingKey before invoking the wrapped handler. + +Pass nil for opts to use defaults (no proxy trust, no size cap, env-var override consulted). + +The middleware never logs the signing key, the expected signature, or which validation branch matched — per porting-sdk/webhooks.md §"Required SDK Behaviors / Error modes". + +#### Signature + +```go +func WebhookMiddleware(signingKey string, opts *WebhookOpts) func(http.Handler) http.Handler +``` + +#### Parameters + + + + + +#### Returns + +`func(http.Handler) http.Handler` + +#### Source + +[`pkg/security/webhook_middleware.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/security/webhook_middleware.go) + +Line 82. + +*** + +### WithDebugMode + +WithDebugMode enables the DebugToken method. Off by default to prevent accidental token introspection in production. + +#### Signature + +```go +func WithDebugMode(enabled bool) Option +``` + +#### Parameters + + + +#### Returns + +`Option` + +#### Source + +[`pkg/security/session_manager.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/security/session_manager.go) + +Line 46. + +*** + +### WithSecret + +WithSecret injects a fixed secret key into the SessionManager. Use this when you need multiple processes or instances to validate each other's tokens. Pass nil to keep the default behaviour (auto-generate a random 32-byte secret). + +#### Signature + +```go +func WithSecret(key []byte) Option +``` + +#### Parameters + + + +#### Returns + +`Option` + +#### Source + +[`pkg/security/session_manager.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/security/session_manager.go) + +Line 36. + +## Type Aliases + +### Option + +Option is a functional option for NewSessionManager. + +#### Signature + +```go +type Option alias +``` + +#### Source + +[`pkg/security/session_manager.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/security/session_manager.go) + +Line 31. + +## Source + +[`pkg/security/session_manager.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/security/session_manager.go) diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/security/security/session-manager/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/security/security/session-manager/index.mdx new file mode 100644 index 0000000000..c14dd3b507 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/security/security/session-manager/index.mdx @@ -0,0 +1,139 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/security/security/session-manager" +title: "SessionManager" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/security.SessionManager" + parent: "github.com/signalwire/signalwire-go/pkg/security" + module: "github.com.signalwire.signalwire-go.pkg.security" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/security/session_manager.go" +--- +# `SessionManager` + +SessionManager creates and validates HMAC-SHA256 tokens for SWAIG function calls. The secret can be supplied at construction time (for cross-process validation) or auto-generated (default, single-process use). + +## Signature + +```go +type SessionManager struct +``` + +## Methods + +### CreateSession + +CreateSession returns callID unchanged if it is non-empty; otherwise it generates a cryptographically random URL-safe string (matches Python secrets.token\_urlsafe(16) — 16 bytes of entropy, base64url-encoded without padding). + +#### Signature + +```go +func (*SessionManager) CreateSession(callID string) string +``` + +#### Parameters + + + +#### Returns + +`string` + +#### Source + +[`pkg/security/session_manager.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/security/session_manager.go) + +Line 84. + +*** + +### CreateToken + +CreateToken generates an HMAC-SHA256 signed token for the given function name and call ID. The token embeds an expiry timestamp and is returned as a base64url-encoded string. + +#### Signature + +```go +func (*SessionManager) CreateToken(functionName string, callID string) string +``` + +#### Parameters + + + + + +#### Returns + +`string` + +#### Source + +[`pkg/security/session_manager.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/security/session_manager.go) + +Line 99. + +*** + +### DebugToken + +DebugToken decodes a token and returns a map of its components and status without performing signature validation. This is intended for development and debugging only. It requires debug mode to be enabled via WithDebugMode; if not, it returns map\["error": "debug mode not enabled"]. + +#### Signature + +```go +func (*SessionManager) DebugToken(token string) map[string]any +``` + +#### Parameters + + + +#### Returns + +`map[string]any` + +#### Source + +[`pkg/security/session_manager.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/security/session_manager.go) + +Line 194. + +*** + +### ValidateToken + +ValidateToken verifies that a token is authentic, unexpired, and matches the expected function name and call ID. All comparisons are performed in constant time where possible to prevent timing attacks. Returns true only if every check passes. + +#### Signature + +```go +func (*SessionManager) ValidateToken(functionName string, token string, callID string) bool +``` + +#### Parameters + + + + + + + +#### Returns + +`bool` + +#### Source + +[`pkg/security/session_manager.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/security/session_manager.go) + +Line 115. + +## Source + +[`pkg/security/session_manager.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/security/session_manager.go) + +Line 23. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/security/security/webhook-opts/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/security/security/webhook-opts/index.mdx new file mode 100644 index 0000000000..bd9b9d86df --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/security/security/webhook-opts/index.mdx @@ -0,0 +1,43 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/security/security/webhook-opts" +title: "WebhookOpts" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/security.WebhookOpts" + parent: "github.com/signalwire/signalwire-go/pkg/security" + module: "github.com.signalwire.signalwire-go.pkg.security" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/security/webhook_middleware.go" +--- +# `WebhookOpts` + +WebhookOpts configures WebhookMiddleware. + +## Signature + +```go +type WebhookOpts struct +``` + +## Properties + + + MaxBodyBytes caps the body size the middleware will buffer before signature validation. Zero (default) imposes no cap beyond Go's own MaxBytesReader behavior. A small positive value protects against memory exhaustion from oversized POSTs targeted at the gate. + + + + ProxyURLBase, when non-empty, overrides URL reconstruction entirely: the validator sees ProxyURLBase + r.URL.RequestURI(). This matches the SWML\_PROXY\_URL\_BASE env-var override documented in the spec. When empty, the env var is consulted at construction time. + + + + TrustProxy makes the middleware honor X-Forwarded-Proto and X-Forwarded-Host when reconstructing the URL passed to the validator. Leave false (default) when the SDK terminates TLS itself; flip true when running behind a reverse proxy / ngrok / load balancer. + + +## Source + +[`pkg/security/webhook_middleware.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/security/webhook_middleware.go) + +Line 52. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/server/server/agent-entry/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/server/server/agent-entry/index.mdx new file mode 100644 index 0000000000..1843ce3f91 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/server/server/agent-entry/index.mdx @@ -0,0 +1,35 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/server/server/agent-entry" +title: "AgentEntry" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/server.AgentEntry" + parent: "github.com/signalwire/signalwire-go/pkg/server" + module: "github.com.signalwire.signalwire-go.pkg.server" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go" +--- +# `AgentEntry` + +AgentEntry pairs a route with its agent for listing purposes. + +## Signature + +```go +type AgentEntry struct +``` + +## Properties + + + + + +## Source + +[`pkg/server/server.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go) + +Line 187. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/server/server/agent-server/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/server/server/agent-server/index.mdx new file mode 100644 index 0000000000..59f638f040 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/server/server/agent-server/index.mdx @@ -0,0 +1,342 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/server/server/agent-server" +title: "AgentServer" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/server.AgentServer" + parent: "github.com/signalwire/signalwire-go/pkg/server" + module: "github.com.signalwire.signalwire-go.pkg.server" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go" +--- +# `AgentServer` + +AgentServer hosts multiple agents on a single HTTP server with route-based dispatch. Each registered agent is mounted at its own route prefix and exposed via the agent's AsRouter() handler. + +## Signature + +```go +type AgentServer struct +``` + +## Methods + +### GetAgent + +GetAgent returns the agent registered at the given route, or nil if none. + +#### Signature + +```go +func (*AgentServer) GetAgent(route string) *agent.AgentBase +``` + +#### Parameters + + + +#### Returns + +`*agent.AgentBase` + +#### Source + +[`pkg/server/server.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go) + +Line 207. + +*** + +### GetAgents + +GetAgents returns all registered agents in insertion order. + +#### Signature + +```go +func (*AgentServer) GetAgents() []AgentEntry +``` + +#### Returns + +`[]AgentEntry` + +#### Source + +[`pkg/server/server.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go) + +Line 193. + +*** + +### Register + +Register adds an agent to the server at the given route. If route is empty the agent's configured route (via WithRoute) is used instead. The route is normalised to always start with "/". + +#### Signature + +```go +func (*AgentServer) Register(a *agent.AgentBase, route string) +``` + +#### Parameters + + + + + +#### Source + +[`pkg/server/server.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go) + +Line 139. + +*** + +### RegisterGlobalRoutingCallback + +RegisterGlobalRoutingCallback registers a routing callback across all currently-registered agents at the given path. The callback fires on every incoming request to that path and can return an SWML document override (or nil to fall through to the agent's default response). + +This is the Go equivalent of Python's AgentServer.register\_global\_routing\_callback(callback\_fn, path). + +#### Signature + +```go +func (*AgentServer) RegisterGlobalRoutingCallback(path string, cb swml.RoutingCallback) +``` + +#### Parameters + + + + + +#### Source + +[`pkg/server/server.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go) + +Line 276. + +*** + +### RegisterGlobalSipRoutingCallback + +RegisterGlobalSipRoutingCallback registers a SIP redirect-routing callback across all currently-registered agents at the given path. The callback returns a route string; on a non-empty return the framework responds with HTTP 307 Temporary Redirect (matching Python register\_routing\_callback semantics — see AgentBase.RegisterSipRoutingCallback for details). + +Use this form when porting Python AgentServer code that registers a redirect-style global routing callback. For a global response-document override (the richer Go-only mechanism), use RegisterGlobalRoutingCallback. + +#### Signature + +```go +func (*AgentServer) RegisterGlobalSipRoutingCallback( + path string, + cb func(r *http.Request, body map[string]any) string +) +``` + +#### Parameters + + + + + +#### Source + +[`pkg/server/server.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go) + +Line 305. + +*** + +### RegisterSipUsername + +RegisterSipUsername maps a SIP username to an agent route so that inbound SIP calls for that username are routed to the correct agent. + +#### Signature + +```go +func (*AgentServer) RegisterSipUsername(username string, route string) +``` + +#### Parameters + + + + + +#### Source + +[`pkg/server/server.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go) + +Line 246. + +*** + +### Run + +Run starts the HTTP server. This is a blocking call. Optional RunOption values can override host and port at start time. + +Serverless dispatch: unlike Python's AgentServer.run() which auto-detects CGI and Lambda environments, Run() is HTTP-server-only. For AWS Lambda deployments use the pkg/lambda package instead. CGI mode has no Go equivalent; deploy as a standard HTTP service behind a reverse proxy. + +Run delegates to RunContext with context.Background(); use RunContext to drive shutdown from a context, or call Shutdown from another goroutine. + +#### Signature + +```go +func (*AgentServer) Run(opts ...RunOption) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/server/server.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go) + +Line 338. + +*** + +### RunContext + +RunContext is the context-aware form of Run. It blocks serving HTTP exactly like Run, but when ctx is cancelled (or its deadline passes) it performs a graceful Shutdown — stopping new connections and draining in-flight requests — then returns nil. A concurrent Shutdown call has the same effect. Any other listen error is returned as-is. + +This is a Go-port addition (the Python reference's AgentServer.run() has no caller-supplied cancellation token); documented in PORT\_ADDITIONS.md. + +#### Signature + +```go +func (*AgentServer) RunContext(ctx context.Context, opts ...RunOption) error +``` + +#### Parameters + + + + + +#### Returns + +`error` + +#### Source + +[`pkg/server/server.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go) + +Line 350. + +*** + +### ServeStaticFiles + +ServeStaticFiles registers a directory to be served at the given route. + +#### Signature + +```go +func (*AgentServer) ServeStaticFiles(directory string, route string) +``` + +#### Parameters + + + + + +#### Source + +[`pkg/server/server.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go) + +Line 258. + +*** + +### SetupSipRouting + +SetupSipRouting enables a central SIP routing endpoint. When autoMap is true, all currently registered agents are automatically mapped using their route as the SIP username. + +#### Signature + +```go +func (*AgentServer) SetupSipRouting(route string, autoMap bool) +``` + +#### Parameters + + + + + +#### Source + +[`pkg/server/server.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go) + +Line 220. + +*** + +### Shutdown + +Shutdown gracefully stops the running HTTP server: it stops accepting new connections and waits for in-flight requests to complete, bounded by ctx's deadline (a passed deadline returns ctx.Err() and closes idle connections, per net/http.Server.Shutdown). It returns ErrServerNotRunning (wrapped) when no server is currently serving. + +After Shutdown returns, the in-flight Run/RunContext call unblocks and returns nil. This is a Go-port addition (no Python-reference equivalent); documented in PORT\_ADDITIONS.md. + +#### Signature + +```go +func (*AgentServer) Shutdown(ctx context.Context) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/server/server.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go) + +Line 426. + +*** + +### Unregister + +Unregister removes the agent at the given route. Returns true if an agent was found and removed. + +#### Signature + +```go +func (*AgentServer) Unregister(route string) bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`pkg/server/server.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go) + +Line 164. + +## Source + +[`pkg/server/server.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go) + +Line 33. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/server/server/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/server/server/index.mdx new file mode 100644 index 0000000000..24efb634cd --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/server/server/index.mdx @@ -0,0 +1,238 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/server/server" +title: "server" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "module" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/server" + module: "github.com.signalwire.signalwire-go.pkg.server" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go" +--- +# `server` + +Package server provides AgentServer for hosting multiple AI agents on a single HTTP server with route-based dispatch. + +## Signature + +```go +package server +``` + +## Constants + + + ErrServerNotRunning is returned (wrapped) by Shutdown when no HTTP server is currently active — i.e. Shutdown was called before Run, or after the server already stopped. It is errors.Is-able. This is a Go-port addition (the Python reference's AgentServer has no graceful-shutdown surface); documented in PORT\_ADDITIONS.md. + + +## Classes + + + + AgentEntry pairs a route with its agent for listing purposes. + + + + AgentServer hosts multiple agents on a single HTTP server with route-based dispatch. Each registered agent is mounted at its own route prefix and exposed via the agent's AsRouter() handler. + + + +## Functions + +### NewAgentServer + +NewAgentServer creates a new AgentServer with the given options. Default host is "0.0.0.0" and default port is 3000. + +#### Signature + +```go +func NewAgentServer(opts ...ServerOption) *AgentServer +``` + +#### Parameters + + + +#### Returns + +`*AgentServer` + +#### Source + +[`pkg/server/server.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go) + +Line 113. + +*** + +### WithLogLevel + +WithLogLevel sets the global log level for the server. Accepted values (case-insensitive): "debug", "info", "warn", "warning", "error", "off" — see the logging.LevelName\* typed constants. Mirrors Python AgentServer(log\_level=...) behavior: the level is applied globally via logging.SetGlobalLevel so all loggers in the process are affected. The default level is "info". + +The parameter is the defined string type logging.LogLevel: the typed constants give autocomplete + a compile-time typo check, while Go's untyped-constant auto-conversion keeps a bare "debug" literal compiling — parity with the Python reference's plain str log\_level. + +#### Signature + +```go +func WithLogLevel(level logging.LogLevel) ServerOption +``` + +#### Parameters + + + +#### Returns + +`ServerOption` + +#### Source + +[`pkg/server/server.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go) + +Line 84. + +*** + +### WithRunHost + +WithRunHost overrides the listen address when calling Run. + +#### Signature + +```go +func WithRunHost(host string) RunOption +``` + +#### Parameters + + + +#### Returns + +`RunOption` + +#### Source + +[`pkg/server/server.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go) + +Line 98. + +*** + +### WithRunPort + +WithRunPort overrides the listen port when calling Run. + +#### Signature + +```go +func WithRunPort(port int) RunOption +``` + +#### Parameters + + + +#### Returns + +`RunOption` + +#### Source + +[`pkg/server/server.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go) + +Line 103. + +*** + +### WithServerHost + +WithServerHost sets the listen address for the server. + +#### Signature + +```go +func WithServerHost(host string) ServerOption +``` + +#### Parameters + + + +#### Returns + +`ServerOption` + +#### Source + +[`pkg/server/server.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go) + +Line 64. + +*** + +### WithServerPort + +WithServerPort sets the listen port for the server. + +#### Signature + +```go +func WithServerPort(port int) ServerOption +``` + +#### Parameters + + + +#### Returns + +`ServerOption` + +#### Source + +[`pkg/server/server.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go) + +Line 69. + +## Type Aliases + +### RunOption + +RunOption overrides server settings at run time. + +#### Signature + +```go +type RunOption alias +``` + +#### Source + +[`pkg/server/server.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go) + +Line 95. + +*** + +### ServerOption + +ServerOption configures an AgentServer during construction. + +#### Signature + +```go +type ServerOption alias +``` + +#### Source + +[`pkg/server/server.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go) + +Line 61. + +## Source + +[`pkg/server/server.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go) diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/api-ninjas-trivia-skill/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/api-ninjas-trivia-skill/index.mdx new file mode 100644 index 0000000000..3732d0706d --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/api-ninjas-trivia-skill/index.mdx @@ -0,0 +1,193 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/api-ninjas-trivia-skill" +title: "APINinjasTriviaSkill" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/skills/builtin.APINinjasTriviaSkill" + parent: "github.com/signalwire/signalwire-go/pkg/skills/builtin" + module: "github.com.signalwire.signalwire-go.pkg.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/api_ninjas_trivia.go" +--- +# `APINinjasTriviaSkill` + +APINinjasTriviaSkill gets trivia questions from API Ninjas. + +## Signature + +```go +type APINinjasTriviaSkill struct +``` + +## Properties + + + +## Methods + +### GetHints + +#### Signature + +```go +func (*APINinjasTriviaSkill) GetHints() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/skills/builtin/api_ninjas_trivia.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/api_ninjas_trivia.go) + +Line 225. + +*** + +### GetInstanceKey + +#### Signature + +```go +func (*APINinjasTriviaSkill) GetInstanceKey() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/skills/builtin/api_ninjas_trivia.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/api_ninjas_trivia.go) + +Line 64. + +*** + +### GetParameterSchema + +#### Signature + +```go +func (*APINinjasTriviaSkill) GetParameterSchema() map[string]map[string]any +``` + +#### Returns + +`map[string]map[string]any` + +#### Source + +[`pkg/skills/builtin/api_ninjas_trivia.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/api_ninjas_trivia.go) + +Line 242. + +*** + +### GetPromptSections + +#### Signature + +```go +func (*APINinjasTriviaSkill) GetPromptSections() []map[string]any +``` + +#### Returns + +`[]map[string]any` + +#### Source + +[`pkg/skills/builtin/api_ninjas_trivia.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/api_ninjas_trivia.go) + +Line 229. + +*** + +### RegisterTools + +#### Signature + +```go +func (*APINinjasTriviaSkill) RegisterTools() []skills.ToolRegistration +``` + +#### Returns + +`[]skills.ToolRegistration` + +#### Source + +[`pkg/skills/builtin/api_ninjas_trivia.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/api_ninjas_trivia.go) + +Line 116. + +*** + +### RequiredEnvVars + +#### Signature + +```go +func (*APINinjasTriviaSkill) RequiredEnvVars() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/skills/builtin/api_ninjas_trivia.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/api_ninjas_trivia.go) + +Line 53. + +*** + +### Setup + +#### Signature + +```go +func (*APINinjasTriviaSkill) Setup() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/skills/builtin/api_ninjas_trivia.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/api_ninjas_trivia.go) + +Line 69. + +*** + +### SupportsMultipleInstances + +#### Signature + +```go +func (*APINinjasTriviaSkill) SupportsMultipleInstances() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/skills/builtin/api_ninjas_trivia.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/api_ninjas_trivia.go) + +Line 62. + +## Source + +[`pkg/skills/builtin/api_ninjas_trivia.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/api_ninjas_trivia.go) + +Line 34. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/claude-skills-skill/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/claude-skills-skill/index.mdx new file mode 100644 index 0000000000..abee977efc --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/claude-skills-skill/index.mdx @@ -0,0 +1,211 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/claude-skills-skill" +title: "ClaudeSkillsSkill" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/skills/builtin.ClaudeSkillsSkill" + parent: "github.com/signalwire/signalwire-go/pkg/skills/builtin" + module: "github.com.signalwire.signalwire-go.pkg.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/claude_skills.go" +--- +# `ClaudeSkillsSkill` + +ClaudeSkillsSkill loads Claude-style SKILL.md files as SignalWire agent tools. + +Each directory under skills\_path that contains a SKILL.md becomes a SWAIG tool. The SKILL.md frontmatter provides the tool name and description; the body becomes the tool's response content when invoked. + +## Signature + +```go +type ClaudeSkillsSkill struct +``` + +## Properties + + + +## Methods + +### GetHints + +GetHints returns speech recognition hints derived from loaded skill names. + +#### Signature + +```go +func (*ClaudeSkillsSkill) GetHints() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/skills/builtin/claude_skills.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/claude_skills.go) + +Line 728. + +*** + +### GetInstanceKey + +GetInstanceKey returns a unique key based on skills\_path for multi-instance support. + +#### Signature + +```go +func (*ClaudeSkillsSkill) GetInstanceKey() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/skills/builtin/claude_skills.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/claude_skills.go) + +Line 797. + +*** + +### GetParameterSchema + +GetParameterSchema returns the full parameter schema for the SKILL.md loader. + +#### Signature + +```go +func (*ClaudeSkillsSkill) GetParameterSchema() map[string]map[string]any +``` + +#### Returns + +`map[string]map[string]any` + +#### Source + +[`pkg/skills/builtin/claude_skills.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/claude_skills.go) + +Line 804. + +*** + +### GetPromptSections + +GetPromptSections returns one prompt section per loaded skill (excluding skipped ones). + +#### Signature + +```go +func (*ClaudeSkillsSkill) GetPromptSections() []map[string]any +``` + +#### Returns + +`[]map[string]any` + +#### Source + +[`pkg/skills/builtin/claude_skills.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/claude_skills.go) + +Line 744. + +*** + +### RegisterTools + +RegisterTools returns one ToolRegistration per discovered SKILL.md that is not flagged to skip. + +#### Signature + +```go +func (*ClaudeSkillsSkill) RegisterTools() []skills.ToolRegistration +``` + +#### Returns + +`[]skills.ToolRegistration` + +#### Source + +[`pkg/skills/builtin/claude_skills.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/claude_skills.go) + +Line 612. + +*** + +### RequiredEnvVars + +RequiredEnvVars returns nil — no env vars required (skills\_path is a param). + +#### Signature + +```go +func (*ClaudeSkillsSkill) RequiredEnvVars() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/skills/builtin/claude_skills.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/claude_skills.go) + +Line 118. + +*** + +### Setup + +Setup validates configuration and discovers SKILL.md files. + +#### Signature + +```go +func (*ClaudeSkillsSkill) Setup() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/skills/builtin/claude_skills.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/claude_skills.go) + +Line 121. + +*** + +### SupportsMultipleInstances + +SupportsMultipleInstances returns true — different skills\_path values create distinct instances. + +#### Signature + +```go +func (*ClaudeSkillsSkill) SupportsMultipleInstances() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/skills/builtin/claude_skills.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/claude_skills.go) + +Line 115. + +## Source + +[`pkg/skills/builtin/claude_skills.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/claude_skills.go) + +Line 82. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/custom-skills-skill/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/custom-skills-skill/index.mdx new file mode 100644 index 0000000000..8a06f85243 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/custom-skills-skill/index.mdx @@ -0,0 +1,153 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/custom-skills-skill" +title: "CustomSkillsSkill" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/skills/builtin.CustomSkillsSkill" + parent: "github.com/signalwire/signalwire-go/pkg/skills/builtin" + module: "github.com.signalwire.signalwire-go.pkg.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/custom_skills.go" +--- +# `CustomSkillsSkill` + +CustomSkillsSkill is a meta-skill that registers user-defined tools. + +## Signature + +```go +type CustomSkillsSkill struct +``` + +## Properties + + + +## Methods + +### GetInstanceKey + +#### Signature + +```go +func (*CustomSkillsSkill) GetInstanceKey() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/skills/builtin/custom_skills.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/custom_skills.go) + +Line 28. + +*** + +### GetParameterSchema + +#### Signature + +```go +func (*CustomSkillsSkill) GetParameterSchema() map[string]map[string]any +``` + +#### Returns + +`map[string]map[string]any` + +#### Source + +[`pkg/skills/builtin/custom_skills.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/custom_skills.go) + +Line 134. + +*** + +### GetPromptSections + +#### Signature + +```go +func (*CustomSkillsSkill) GetPromptSections() []map[string]any +``` + +#### Returns + +`[]map[string]any` + +#### Source + +[`pkg/skills/builtin/custom_skills.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/custom_skills.go) + +Line 110. + +*** + +### RegisterTools + +#### Signature + +```go +func (*CustomSkillsSkill) RegisterTools() []skills.ToolRegistration +``` + +#### Returns + +`[]skills.ToolRegistration` + +#### Source + +[`pkg/skills/builtin/custom_skills.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/custom_skills.go) + +Line 60. + +*** + +### Setup + +#### Signature + +```go +func (*CustomSkillsSkill) Setup() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/skills/builtin/custom_skills.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/custom_skills.go) + +Line 33. + +*** + +### SupportsMultipleInstances + +#### Signature + +```go +func (*CustomSkillsSkill) SupportsMultipleInstances() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/skills/builtin/custom_skills.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/custom_skills.go) + +Line 26. + +## Source + +[`pkg/skills/builtin/custom_skills.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/custom_skills.go) + +Line 9. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/data-sphere-serverless-skill/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/data-sphere-serverless-skill/index.mdx new file mode 100644 index 0000000000..4f10d0ba63 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/data-sphere-serverless-skill/index.mdx @@ -0,0 +1,197 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/data-sphere-serverless-skill" +title: "DataSphereServerlessSkill" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/skills/builtin.DataSphereServerlessSkill" + parent: "github.com/signalwire/signalwire-go/pkg/skills/builtin" + module: "github.com.signalwire.signalwire-go.pkg.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datasphere_serverless.go" +--- +# `DataSphereServerlessSkill` + +DataSphereServerlessSkill provides DataSphere search using DataMap (serverless execution). + +## Signature + +```go +type DataSphereServerlessSkill struct +``` + +## Properties + + + +## Methods + +### GetGlobalData + +GetGlobalData returns global data for agent context. + +#### Signature + +```go +func (*DataSphereServerlessSkill) GetGlobalData() map[string]any +``` + +#### Returns + +`map[string]any` + +#### Source + +[`pkg/skills/builtin/datasphere_serverless.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datasphere_serverless.go) + +Line 176. + +*** + +### GetInstanceKey + +#### Signature + +```go +func (*DataSphereServerlessSkill) GetInstanceKey() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/skills/builtin/datasphere_serverless.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datasphere_serverless.go) + +Line 58. + +*** + +### GetParameterSchema + +#### Signature + +```go +func (*DataSphereServerlessSkill) GetParameterSchema() map[string]map[string]any +``` + +#### Returns + +`map[string]map[string]any` + +#### Source + +[`pkg/skills/builtin/datasphere_serverless.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datasphere_serverless.go) + +Line 200. + +*** + +### GetPromptSections + +#### Signature + +```go +func (*DataSphereServerlessSkill) GetPromptSections() []map[string]any +``` + +#### Returns + +`[]map[string]any` + +#### Source + +[`pkg/skills/builtin/datasphere_serverless.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datasphere_serverless.go) + +Line 184. + +*** + +### RegisterTools + +RegisterTools returns DataMap-style tool registration for serverless execution. The actual tool is registered as a DataMap function that runs on SignalWire servers. + +#### Signature + +```go +func (*DataSphereServerlessSkill) RegisterTools() []skills.ToolRegistration +``` + +#### Returns + +`[]skills.ToolRegistration` + +#### Source + +[`pkg/skills/builtin/datasphere_serverless.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datasphere_serverless.go) + +Line 100. + +*** + +### RequiredEnvVars + +#### Signature + +```go +func (*DataSphereServerlessSkill) RequiredEnvVars() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/skills/builtin/datasphere_serverless.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datasphere_serverless.go) + +Line 44. + +*** + +### Setup + +#### Signature + +```go +func (*DataSphereServerlessSkill) Setup() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/skills/builtin/datasphere_serverless.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datasphere_serverless.go) + +Line 63. + +*** + +### SupportsMultipleInstances + +#### Signature + +```go +func (*DataSphereServerlessSkill) SupportsMultipleInstances() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/skills/builtin/datasphere_serverless.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datasphere_serverless.go) + +Line 56. + +## Source + +[`pkg/skills/builtin/datasphere_serverless.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datasphere_serverless.go) + +Line 14. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/data-sphere-skill/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/data-sphere-skill/index.mdx new file mode 100644 index 0000000000..794724e681 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/data-sphere-skill/index.mdx @@ -0,0 +1,193 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/data-sphere-skill" +title: "DataSphereSkill" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/skills/builtin.DataSphereSkill" + parent: "github.com/signalwire/signalwire-go/pkg/skills/builtin" + module: "github.com.signalwire.signalwire-go.pkg.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datasphere.go" +--- +# `DataSphereSkill` + +DataSphereSkill searches knowledge using SignalWire DataSphere RAG stack. + +## Signature + +```go +type DataSphereSkill struct +``` + +## Properties + + + +## Methods + +### GetGlobalData + +#### Signature + +```go +func (*DataSphereSkill) GetGlobalData() map[string]any +``` + +#### Returns + +`map[string]any` + +#### Source + +[`pkg/skills/builtin/datasphere.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datasphere.go) + +Line 221. + +*** + +### GetInstanceKey + +#### Signature + +```go +func (*DataSphereSkill) GetInstanceKey() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/skills/builtin/datasphere.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datasphere.go) + +Line 60. + +*** + +### GetParameterSchema + +#### Signature + +```go +func (*DataSphereSkill) GetParameterSchema() map[string]map[string]any +``` + +#### Returns + +`map[string]map[string]any` + +#### Source + +[`pkg/skills/builtin/datasphere.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datasphere.go) + +Line 244. + +*** + +### GetPromptSections + +#### Signature + +```go +func (*DataSphereSkill) GetPromptSections() []map[string]any +``` + +#### Returns + +`[]map[string]any` + +#### Source + +[`pkg/skills/builtin/datasphere.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datasphere.go) + +Line 229. + +*** + +### RegisterTools + +#### Signature + +```go +func (*DataSphereSkill) RegisterTools() []skills.ToolRegistration +``` + +#### Returns + +`[]skills.ToolRegistration` + +#### Source + +[`pkg/skills/builtin/datasphere.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datasphere.go) + +Line 124. + +*** + +### RequiredEnvVars + +#### Signature + +```go +func (*DataSphereSkill) RequiredEnvVars() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/skills/builtin/datasphere.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datasphere.go) + +Line 46. + +*** + +### Setup + +#### Signature + +```go +func (*DataSphereSkill) Setup() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/skills/builtin/datasphere.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datasphere.go) + +Line 65. + +*** + +### SupportsMultipleInstances + +#### Signature + +```go +func (*DataSphereSkill) SupportsMultipleInstances() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/skills/builtin/datasphere.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datasphere.go) + +Line 58. + +## Source + +[`pkg/skills/builtin/datasphere.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datasphere.go) + +Line 16. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/date-time-skill/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/date-time-skill/index.mdx new file mode 100644 index 0000000000..dcd01c68aa --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/date-time-skill/index.mdx @@ -0,0 +1,113 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/date-time-skill" +title: "DateTimeSkill" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/skills/builtin.DateTimeSkill" + parent: "github.com/signalwire/signalwire-go/pkg/skills/builtin" + module: "github.com.signalwire.signalwire-go.pkg.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datetime.go" +--- +# `DateTimeSkill` + +DateTimeSkill provides current date and time information. + +## Signature + +```go +type DateTimeSkill struct +``` + +## Properties + + + +## Methods + +### GetHints + +#### Signature + +```go +func (*DateTimeSkill) GetHints() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/skills/builtin/datetime.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datetime.go) + +Line 128. + +*** + +### GetPromptSections + +#### Signature + +```go +func (*DateTimeSkill) GetPromptSections() []map[string]any +``` + +#### Returns + +`[]map[string]any` + +#### Source + +[`pkg/skills/builtin/datetime.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datetime.go) + +Line 132. + +*** + +### RegisterTools + +#### Signature + +```go +func (*DateTimeSkill) RegisterTools() []skills.ToolRegistration +``` + +#### Returns + +`[]skills.ToolRegistration` + +#### Source + +[`pkg/skills/builtin/datetime.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datetime.go) + +Line 35. + +*** + +### Setup + +#### Signature + +```go +func (*DateTimeSkill) Setup() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/skills/builtin/datetime.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datetime.go) + +Line 30. + +## Source + +[`pkg/skills/builtin/datetime.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datetime.go) + +Line 12. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/google-maps-skill/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/google-maps-skill/index.mdx new file mode 100644 index 0000000000..ac266f2bc9 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/google-maps-skill/index.mdx @@ -0,0 +1,153 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/google-maps-skill" +title: "GoogleMapsSkill" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/skills/builtin.GoogleMapsSkill" + parent: "github.com/signalwire/signalwire-go/pkg/skills/builtin" + module: "github.com.signalwire.signalwire-go.pkg.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/google_maps.go" +--- +# `GoogleMapsSkill` + +GoogleMapsSkill validates addresses and computes routes using Google Maps. + +## Signature + +```go +type GoogleMapsSkill struct +``` + +## Properties + + + +## Methods + +### GetHints + +#### Signature + +```go +func (*GoogleMapsSkill) GetHints() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/skills/builtin/google_maps.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/google_maps.go) + +Line 293. + +*** + +### GetParameterSchema + +#### Signature + +```go +func (*GoogleMapsSkill) GetParameterSchema() map[string]map[string]any +``` + +#### Returns + +`map[string]map[string]any` + +#### Source + +[`pkg/skills/builtin/google_maps.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/google_maps.go) + +Line 312. + +*** + +### GetPromptSections + +#### Signature + +```go +func (*GoogleMapsSkill) GetPromptSections() []map[string]any +``` + +#### Returns + +`[]map[string]any` + +#### Source + +[`pkg/skills/builtin/google_maps.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/google_maps.go) + +Line 297. + +*** + +### RegisterTools + +#### Signature + +```go +func (*GoogleMapsSkill) RegisterTools() []skills.ToolRegistration +``` + +#### Returns + +`[]skills.ToolRegistration` + +#### Source + +[`pkg/skills/builtin/google_maps.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/google_maps.go) + +Line 53. + +*** + +### RequiredEnvVars + +#### Signature + +```go +func (*GoogleMapsSkill) RequiredEnvVars() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/skills/builtin/google_maps.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/google_maps.go) + +Line 37. + +*** + +### Setup + +#### Signature + +```go +func (*GoogleMapsSkill) Setup() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/skills/builtin/google_maps.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/google_maps.go) + +Line 46. + +## Source + +[`pkg/skills/builtin/google_maps.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/google_maps.go) + +Line 18. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/index.mdx new file mode 100644 index 0000000000..29c28256ab --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/index.mdx @@ -0,0 +1,590 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin" +title: "builtin" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "module" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/skills/builtin" + module: "github.com.signalwire.signalwire-go.pkg.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/api_ninjas_trivia.go" +--- +# `builtin` + +## Signature + +```go +package builtin +``` + +## Constants + + + \_digitStartRE checks if a string starts with a digit. + + + + \_hyphenSpaceRE matches hyphens and spaces for sanitization. + + + + \_sanitizeRE matches characters invalid in SWAIG tool names. + + + + \_shellInjectionRE matches !`command` patterns in skill bodies. + + + + \_unsupportedFields maps SKILL.md frontmatter field names to warning message templates. + + +## Classes + + + + APINinjasTriviaSkill gets trivia questions from API Ninjas. + + + + ClaudeSkillsSkill loads Claude-style SKILL.md files as SignalWire agent tools. + + + + CustomSkillsSkill is a meta-skill that registers user-defined tools. + + + + DataSphereServerlessSkill provides DataSphere search using DataMap (serverless execution). + + + + DataSphereSkill searches knowledge using SignalWire DataSphere RAG stack. + + + + DateTimeSkill provides current date and time information. + + + + GoogleMapsSkill validates addresses and computes routes using Google Maps. + + + + InfoGathererSkill guides an AI agent through a series of questions, collecting and storing answers in global\_data. + + + + JokeSkill tells random jokes from a built-in list. + + + + MathSkill provides basic mathematical calculation capabilities. + + + + MCPGatewaySkill connects to MCP gateway servers and registers their tools. + + + + NativeVectorSearchSkill searches knowledge using a remote search server. + + + + PlayBackgroundFileSkill plays audio files in the background. + + + + SpiderSkill fetches and extracts text content from URLs. + + + + SWMLTransferSkill transfers calls between agents using DataMap pattern matching. + + + + WeatherAPISkill gets current weather from WeatherAPI.com. + + + + WebSearchSkill searches the web using Google Custom Search API. + + + + WikipediaSearchSkill searches Wikipedia for information. + + + +## Functions + +### NewAPINinjasTrivia + +NewAPINinjasTrivia creates a new APINinjasTriviaSkill. + +#### Signature + +```go +func NewAPINinjasTrivia(params map[string]any) skills.SkillBase +``` + +#### Parameters + + + +#### Returns + +`skills.SkillBase` + +#### Source + +[`pkg/skills/builtin/api_ninjas_trivia.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/api_ninjas_trivia.go) + +Line 42. + +*** + +### NewClaudeSkills + +NewClaudeSkills creates a new ClaudeSkillsSkill. + +#### Signature + +```go +func NewClaudeSkills(params map[string]any) skills.SkillBase +``` + +#### Parameters + + + +#### Returns + +`skills.SkillBase` + +#### Source + +[`pkg/skills/builtin/claude_skills.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/claude_skills.go) + +Line 103. + +*** + +### NewCustomSkills + +NewCustomSkills creates a new CustomSkillsSkill. + +#### Signature + +```go +func NewCustomSkills(params map[string]any) skills.SkillBase +``` + +#### Parameters + + + +#### Returns + +`skills.SkillBase` + +#### Source + +[`pkg/skills/builtin/custom_skills.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/custom_skills.go) + +Line 15. + +*** + +### NewDataSphere + +NewDataSphere creates a new DataSphereSkill. + +#### Signature + +```go +func NewDataSphere(params map[string]any) skills.SkillBase +``` + +#### Parameters + + + +#### Returns + +`skills.SkillBase` + +#### Source + +[`pkg/skills/builtin/datasphere.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datasphere.go) + +Line 34. + +*** + +### NewDataSphereServerless + +NewDataSphereServerless creates a new DataSphereServerlessSkill. + +#### Signature + +```go +func NewDataSphereServerless(params map[string]any) skills.SkillBase +``` + +#### Parameters + + + +#### Returns + +`skills.SkillBase` + +#### Source + +[`pkg/skills/builtin/datasphere_serverless.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datasphere_serverless.go) + +Line 33. + +*** + +### NewDateTime + +NewDateTime creates a new DateTimeSkill. + +#### Signature + +```go +func NewDateTime(params map[string]any) skills.SkillBase +``` + +#### Parameters + + + +#### Returns + +`skills.SkillBase` + +#### Source + +[`pkg/skills/builtin/datetime.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datetime.go) + +Line 18. + +*** + +### NewGoogleMaps + +NewGoogleMaps creates a new GoogleMapsSkill. + +#### Signature + +```go +func NewGoogleMaps(params map[string]any) skills.SkillBase +``` + +#### Parameters + + + +#### Returns + +`skills.SkillBase` + +#### Source + +[`pkg/skills/builtin/google_maps.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/google_maps.go) + +Line 26. + +*** + +### NewInfoGatherer + +NewInfoGatherer creates a new InfoGathererSkill. + +#### Signature + +```go +func NewInfoGatherer(params map[string]any) skills.SkillBase +``` + +#### Parameters + + + +#### Returns + +`skills.SkillBase` + +#### Source + +[`pkg/skills/builtin/info_gatherer.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/info_gatherer.go) + +Line 22. + +*** + +### NewJoke + +NewJoke creates a new JokeSkill. + +#### Signature + +```go +func NewJoke(params map[string]any) skills.SkillBase +``` + +#### Parameters + + + +#### Returns + +`skills.SkillBase` + +#### Source + +[`pkg/skills/builtin/joke.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/joke.go) + +Line 36. + +*** + +### NewMath + +NewMath creates a new MathSkill. + +#### Signature + +```go +func NewMath(params map[string]any) skills.SkillBase +``` + +#### Parameters + + + +#### Returns + +`skills.SkillBase` + +#### Source + +[`pkg/skills/builtin/math.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/math.go) + +Line 21. + +*** + +### NewMCPGateway + +NewMCPGateway creates a new MCPGatewaySkill. + +#### Signature + +```go +func NewMCPGateway(params map[string]any) skills.SkillBase +``` + +#### Parameters + + + +#### Returns + +`skills.SkillBase` + +#### Source + +[`pkg/skills/builtin/mcp_gateway.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/mcp_gateway.go) + +Line 34. + +*** + +### NewNativeVectorSearch + +NewNativeVectorSearch creates a new NativeVectorSearchSkill. + +#### Signature + +```go +func NewNativeVectorSearch(params map[string]any) skills.SkillBase +``` + +#### Parameters + + + +#### Returns + +`skills.SkillBase` + +#### Source + +[`pkg/skills/builtin/native_vector_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/native_vector_search.go) + +Line 38. + +*** + +### NewPlayBackgroundFile + +NewPlayBackgroundFile creates a new PlayBackgroundFileSkill. + +#### Signature + +```go +func NewPlayBackgroundFile(params map[string]any) skills.SkillBase +``` + +#### Parameters + + + +#### Returns + +`skills.SkillBase` + +#### Source + +[`pkg/skills/builtin/play_background_file.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/play_background_file.go) + +Line 22. + +*** + +### NewSpider + +NewSpider creates a new SpiderSkill. + +#### Signature + +```go +func NewSpider(params map[string]any) skills.SkillBase +``` + +#### Parameters + + + +#### Returns + +`skills.SkillBase` + +#### Source + +[`pkg/skills/builtin/spider.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/spider.go) + +Line 72. + +*** + +### NewSWMLTransfer + +NewSWMLTransfer creates a new SWMLTransferSkill. + +#### Signature + +```go +func NewSWMLTransfer(params map[string]any) skills.SkillBase +``` + +#### Parameters + + + +#### Returns + +`skills.SkillBase` + +#### Source + +[`pkg/skills/builtin/swml_transfer.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/swml_transfer.go) + +Line 25. + +*** + +### NewWeatherAPI + +NewWeatherAPI creates a new WeatherAPISkill. + +#### Signature + +```go +func NewWeatherAPI(params map[string]any) skills.SkillBase +``` + +#### Parameters + + + +#### Returns + +`skills.SkillBase` + +#### Source + +[`pkg/skills/builtin/weather_api.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/weather_api.go) + +Line 25. + +*** + +### NewWebSearch + +NewWebSearch creates a new WebSearchSkill. + +#### Signature + +```go +func NewWebSearch(params map[string]any) skills.SkillBase +``` + +#### Parameters + + + +#### Returns + +`skills.SkillBase` + +#### Source + +[`pkg/skills/builtin/web_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/web_search.go) + +Line 60. + +*** + +### NewWikipediaSearch + +NewWikipediaSearch creates a new WikipediaSearchSkill. + +#### Signature + +```go +func NewWikipediaSearch(params map[string]any) skills.SkillBase +``` + +#### Parameters + + + +#### Returns + +`skills.SkillBase` + +#### Source + +[`pkg/skills/builtin/wikipedia_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/wikipedia_search.go) + +Line 24. + +## Source + +[`pkg/skills/builtin/api_ninjas_trivia.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/api_ninjas_trivia.go) diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/info-gatherer-skill/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/info-gatherer-skill/index.mdx new file mode 100644 index 0000000000..fa2c598246 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/info-gatherer-skill/index.mdx @@ -0,0 +1,173 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/info-gatherer-skill" +title: "InfoGathererSkill" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/skills/builtin.InfoGathererSkill" + parent: "github.com/signalwire/signalwire-go/pkg/skills/builtin" + module: "github.com.signalwire.signalwire-go.pkg.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/info_gatherer.go" +--- +# `InfoGathererSkill` + +InfoGathererSkill guides an AI agent through a series of questions, collecting and storing answers in global\_data. + +## Signature + +```go +type InfoGathererSkill struct +``` + +## Properties + + + +## Methods + +### GetGlobalData + +#### Signature + +```go +func (*InfoGathererSkill) GetGlobalData() map[string]any +``` + +#### Returns + +`map[string]any` + +#### Source + +[`pkg/skills/builtin/info_gatherer.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/info_gatherer.go) + +Line 249. + +*** + +### GetInstanceKey + +#### Signature + +```go +func (*InfoGathererSkill) GetInstanceKey() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/skills/builtin/info_gatherer.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/info_gatherer.go) + +Line 35. + +*** + +### GetParameterSchema + +#### Signature + +```go +func (*InfoGathererSkill) GetParameterSchema() map[string]map[string]any +``` + +#### Returns + +`map[string]map[string]any` + +#### Source + +[`pkg/skills/builtin/info_gatherer.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/info_gatherer.go) + +Line 282. + +*** + +### GetPromptSections + +#### Signature + +```go +func (*InfoGathererSkill) GetPromptSections() []map[string]any +``` + +#### Returns + +`[]map[string]any` + +#### Source + +[`pkg/skills/builtin/info_gatherer.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/info_gatherer.go) + +Line 259. + +*** + +### RegisterTools + +#### Signature + +```go +func (*InfoGathererSkill) RegisterTools() []skills.ToolRegistration +``` + +#### Returns + +`[]skills.ToolRegistration` + +#### Source + +[`pkg/skills/builtin/info_gatherer.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/info_gatherer.go) + +Line 84. + +*** + +### Setup + +#### Signature + +```go +func (*InfoGathererSkill) Setup() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/skills/builtin/info_gatherer.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/info_gatherer.go) + +Line 42. + +*** + +### SupportsMultipleInstances + +#### Signature + +```go +func (*InfoGathererSkill) SupportsMultipleInstances() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/skills/builtin/info_gatherer.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/info_gatherer.go) + +Line 33. + +## Source + +[`pkg/skills/builtin/info_gatherer.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/info_gatherer.go) + +Line 12. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/joke-skill/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/joke-skill/index.mdx new file mode 100644 index 0000000000..9c1a1c33cb --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/joke-skill/index.mdx @@ -0,0 +1,133 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/joke-skill" +title: "JokeSkill" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/skills/builtin.JokeSkill" + parent: "github.com/signalwire/signalwire-go/pkg/skills/builtin" + module: "github.com.signalwire.signalwire-go.pkg.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/joke.go" +--- +# `JokeSkill` + +JokeSkill tells random jokes from a built-in list. + +## Signature + +```go +type JokeSkill struct +``` + +## Properties + + + +## Methods + +### GetGlobalData + +#### Signature + +```go +func (*JokeSkill) GetGlobalData() map[string]any +``` + +#### Returns + +`map[string]any` + +#### Source + +[`pkg/skills/builtin/joke.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/joke.go) + +Line 79. + +*** + +### GetHints + +#### Signature + +```go +func (*JokeSkill) GetHints() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/skills/builtin/joke.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/joke.go) + +Line 85. + +*** + +### GetPromptSections + +#### Signature + +```go +func (*JokeSkill) GetPromptSections() []map[string]any +``` + +#### Returns + +`[]map[string]any` + +#### Source + +[`pkg/skills/builtin/joke.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/joke.go) + +Line 89. + +*** + +### RegisterTools + +#### Signature + +```go +func (*JokeSkill) RegisterTools() []skills.ToolRegistration +``` + +#### Returns + +`[]skills.ToolRegistration` + +#### Source + +[`pkg/skills/builtin/joke.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/joke.go) + +Line 53. + +*** + +### Setup + +#### Signature + +```go +func (*JokeSkill) Setup() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/skills/builtin/joke.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/joke.go) + +Line 47. + +## Source + +[`pkg/skills/builtin/joke.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/joke.go) + +Line 29. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/math-skill/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/math-skill/index.mdx new file mode 100644 index 0000000000..dfcff0881b --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/math-skill/index.mdx @@ -0,0 +1,93 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/math-skill" +title: "MathSkill" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/skills/builtin.MathSkill" + parent: "github.com/signalwire/signalwire-go/pkg/skills/builtin" + module: "github.com.signalwire.signalwire-go.pkg.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/math.go" +--- +# `MathSkill` + +MathSkill provides basic mathematical calculation capabilities. + +## Signature + +```go +type MathSkill struct +``` + +## Properties + + + +## Methods + +### GetPromptSections + +#### Signature + +```go +func (*MathSkill) GetPromptSections() []map[string]any +``` + +#### Returns + +`[]map[string]any` + +#### Source + +[`pkg/skills/builtin/math.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/math.go) + +Line 143. + +*** + +### RegisterTools + +#### Signature + +```go +func (*MathSkill) RegisterTools() []skills.ToolRegistration +``` + +#### Returns + +`[]skills.ToolRegistration` + +#### Source + +[`pkg/skills/builtin/math.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/math.go) + +Line 34. + +*** + +### Setup + +#### Signature + +```go +func (*MathSkill) Setup() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/skills/builtin/math.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/math.go) + +Line 32. + +## Source + +[`pkg/skills/builtin/math.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/math.go) + +Line 16. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/mcp-gateway-skill/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/mcp-gateway-skill/index.mdx new file mode 100644 index 0000000000..800378e4f3 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/mcp-gateway-skill/index.mdx @@ -0,0 +1,155 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/mcp-gateway-skill" +title: "MCPGatewaySkill" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/skills/builtin.MCPGatewaySkill" + parent: "github.com/signalwire/signalwire-go/pkg/skills/builtin" + module: "github.com.signalwire.signalwire-go.pkg.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/mcp_gateway.go" +--- +# `MCPGatewaySkill` + +MCPGatewaySkill connects to MCP gateway servers and registers their tools. + +## Signature + +```go +type MCPGatewaySkill struct +``` + +## Properties + + + +## Methods + +### GetGlobalData + +GetGlobalData returns MCP gateway state for DataMap variable expansion. Mirrors Python get\_global\_data: mcp\_gateway\_url, mcp\_session\_id, mcp\_services. + +#### Signature + +```go +func (*MCPGatewaySkill) GetGlobalData() map[string]any +``` + +#### Returns + +`map[string]any` + +#### Source + +[`pkg/skills/builtin/mcp_gateway.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/mcp_gateway.go) + +Line 353. + +*** + +### GetHints + +#### Signature + +```go +func (*MCPGatewaySkill) GetHints() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/skills/builtin/mcp_gateway.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/mcp_gateway.go) + +Line 367. + +*** + +### GetParameterSchema + +#### Signature + +```go +func (*MCPGatewaySkill) GetParameterSchema() map[string]map[string]any +``` + +#### Returns + +`map[string]map[string]any` + +#### Source + +[`pkg/skills/builtin/mcp_gateway.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/mcp_gateway.go) + +Line 398. + +*** + +### GetPromptSections + +#### Signature + +```go +func (*MCPGatewaySkill) GetPromptSections() []map[string]any +``` + +#### Returns + +`[]map[string]any` + +#### Source + +[`pkg/skills/builtin/mcp_gateway.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/mcp_gateway.go) + +Line 377. + +*** + +### RegisterTools + +#### Signature + +```go +func (*MCPGatewaySkill) RegisterTools() []skills.ToolRegistration +``` + +#### Returns + +`[]skills.ToolRegistration` + +#### Source + +[`pkg/skills/builtin/mcp_gateway.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/mcp_gateway.go) + +Line 110. + +*** + +### Setup + +#### Signature + +```go +func (*MCPGatewaySkill) Setup() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/skills/builtin/mcp_gateway.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/mcp_gateway.go) + +Line 45. + +## Source + +[`pkg/skills/builtin/mcp_gateway.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/mcp_gateway.go) + +Line 17. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/native-vector-search-skill/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/native-vector-search-skill/index.mdx new file mode 100644 index 0000000000..a29c8766ac --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/native-vector-search-skill/index.mdx @@ -0,0 +1,193 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/native-vector-search-skill" +title: "NativeVectorSearchSkill" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/skills/builtin.NativeVectorSearchSkill" + parent: "github.com/signalwire/signalwire-go/pkg/skills/builtin" + module: "github.com.signalwire.signalwire-go.pkg.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/native_vector_search.go" +--- +# `NativeVectorSearchSkill` + +NativeVectorSearchSkill searches knowledge using a remote search server. + +## Signature + +```go +type NativeVectorSearchSkill struct +``` + +## Properties + + + +## Methods + +### GetGlobalData + +#### Signature + +```go +func (*NativeVectorSearchSkill) GetGlobalData() map[string]any +``` + +#### Returns + +`map[string]any` + +#### Source + +[`pkg/skills/builtin/native_vector_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/native_vector_search.go) + +Line 380. + +*** + +### GetHints + +#### Signature + +```go +func (*NativeVectorSearchSkill) GetHints() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/skills/builtin/native_vector_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/native_vector_search.go) + +Line 350. + +*** + +### GetInstanceKey + +#### Signature + +```go +func (*NativeVectorSearchSkill) GetInstanceKey() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/skills/builtin/native_vector_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/native_vector_search.go) + +Line 52. + +*** + +### GetParameterSchema + +#### Signature + +```go +func (*NativeVectorSearchSkill) GetParameterSchema() map[string]map[string]any +``` + +#### Returns + +`map[string]map[string]any` + +#### Source + +[`pkg/skills/builtin/native_vector_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/native_vector_search.go) + +Line 386. + +*** + +### GetPromptSections + +#### Signature + +```go +func (*NativeVectorSearchSkill) GetPromptSections() []map[string]any +``` + +#### Returns + +`[]map[string]any` + +#### Source + +[`pkg/skills/builtin/native_vector_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/native_vector_search.go) + +Line 362. + +*** + +### RegisterTools + +#### Signature + +```go +func (*NativeVectorSearchSkill) RegisterTools() []skills.ToolRegistration +``` + +#### Returns + +`[]skills.ToolRegistration` + +#### Source + +[`pkg/skills/builtin/native_vector_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/native_vector_search.go) + +Line 200. + +*** + +### Setup + +#### Signature + +```go +func (*NativeVectorSearchSkill) Setup() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/skills/builtin/native_vector_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/native_vector_search.go) + +Line 116. + +*** + +### SupportsMultipleInstances + +#### Signature + +```go +func (*NativeVectorSearchSkill) SupportsMultipleInstances() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/skills/builtin/native_vector_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/native_vector_search.go) + +Line 50. + +## Source + +[`pkg/skills/builtin/native_vector_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/native_vector_search.go) + +Line 20. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/play-background-file-skill/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/play-background-file-skill/index.mdx new file mode 100644 index 0000000000..9be45d0cd4 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/play-background-file-skill/index.mdx @@ -0,0 +1,133 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/play-background-file-skill" +title: "PlayBackgroundFileSkill" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/skills/builtin.PlayBackgroundFileSkill" + parent: "github.com/signalwire/signalwire-go/pkg/skills/builtin" + module: "github.com.signalwire.signalwire-go.pkg.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/play_background_file.go" +--- +# `PlayBackgroundFileSkill` + +PlayBackgroundFileSkill plays audio files in the background. + +## Signature + +```go +type PlayBackgroundFileSkill struct +``` + +## Properties + + + +## Methods + +### GetInstanceKey + +#### Signature + +```go +func (*PlayBackgroundFileSkill) GetInstanceKey() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/skills/builtin/play_background_file.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/play_background_file.go) + +Line 35. + +*** + +### GetParameterSchema + +#### Signature + +```go +func (*PlayBackgroundFileSkill) GetParameterSchema() map[string]map[string]any +``` + +#### Returns + +`map[string]map[string]any` + +#### Source + +[`pkg/skills/builtin/play_background_file.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/play_background_file.go) + +Line 158. + +*** + +### RegisterTools + +#### Signature + +```go +func (*PlayBackgroundFileSkill) RegisterTools() []skills.ToolRegistration +``` + +#### Returns + +`[]skills.ToolRegistration` + +#### Source + +[`pkg/skills/builtin/play_background_file.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/play_background_file.go) + +Line 84. + +*** + +### Setup + +#### Signature + +```go +func (*PlayBackgroundFileSkill) Setup() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/skills/builtin/play_background_file.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/play_background_file.go) + +Line 40. + +*** + +### SupportsMultipleInstances + +#### Signature + +```go +func (*PlayBackgroundFileSkill) SupportsMultipleInstances() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/skills/builtin/play_background_file.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/play_background_file.go) + +Line 33. + +## Source + +[`pkg/skills/builtin/play_background_file.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/play_background_file.go) + +Line 15. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/spider-skill/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/spider-skill/index.mdx new file mode 100644 index 0000000000..9d0f07266f --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/spider-skill/index.mdx @@ -0,0 +1,173 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/spider-skill" +title: "SpiderSkill" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/skills/builtin.SpiderSkill" + parent: "github.com/signalwire/signalwire-go/pkg/skills/builtin" + module: "github.com.signalwire.signalwire-go.pkg.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/spider.go" +--- +# `SpiderSkill` + +SpiderSkill fetches and extracts text content from URLs. + +## Signature + +```go +type SpiderSkill struct +``` + +## Properties + + + +## Methods + +### Cleanup + +Cleanup releases resources when the skill is unloaded. + +#### Signature + +```go +func (*SpiderSkill) Cleanup() +``` + +#### Source + +[`pkg/skills/builtin/spider.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/spider.go) + +Line 720. + +*** + +### GetHints + +#### Signature + +```go +func (*SpiderSkill) GetHints() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/skills/builtin/spider.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/spider.go) + +Line 715. + +*** + +### GetInstanceKey + +#### Signature + +```go +func (*SpiderSkill) GetInstanceKey() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/skills/builtin/spider.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/spider.go) + +Line 85. + +*** + +### GetParameterSchema + +GetParameterSchema returns the full parameter schema extending the base schema. + +#### Signature + +```go +func (*SpiderSkill) GetParameterSchema() map[string]map[string]any +``` + +#### Returns + +`map[string]map[string]any` + +#### Source + +[`pkg/skills/builtin/spider.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/spider.go) + +Line 149. + +*** + +### RegisterTools + +#### Signature + +```go +func (*SpiderSkill) RegisterTools() []skills.ToolRegistration +``` + +#### Returns + +`[]skills.ToolRegistration` + +#### Source + +[`pkg/skills/builtin/spider.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/spider.go) + +Line 253. + +*** + +### Setup + +#### Signature + +```go +func (*SpiderSkill) Setup() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/skills/builtin/spider.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/spider.go) + +Line 90. + +*** + +### SupportsMultipleInstances + +#### Signature + +```go +func (*SpiderSkill) SupportsMultipleInstances() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/skills/builtin/spider.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/spider.go) + +Line 83. + +## Source + +[`pkg/skills/builtin/spider.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/spider.go) + +Line 47. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/swml-transfer-skill/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/swml-transfer-skill/index.mdx new file mode 100644 index 0000000000..6039025e5c --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/swml-transfer-skill/index.mdx @@ -0,0 +1,173 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/swml-transfer-skill" +title: "SWMLTransferSkill" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/skills/builtin.SWMLTransferSkill" + parent: "github.com/signalwire/signalwire-go/pkg/skills/builtin" + module: "github.com.signalwire.signalwire-go.pkg.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/swml_transfer.go" +--- +# `SWMLTransferSkill` + +SWMLTransferSkill transfers calls between agents using DataMap pattern matching. + +## Signature + +```go +type SWMLTransferSkill struct +``` + +## Properties + + + +## Methods + +### GetHints + +#### Signature + +```go +func (*SWMLTransferSkill) GetHints() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/skills/builtin/swml_transfer.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/swml_transfer.go) + +Line 221. + +*** + +### GetInstanceKey + +#### Signature + +```go +func (*SWMLTransferSkill) GetInstanceKey() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/skills/builtin/swml_transfer.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/swml_transfer.go) + +Line 38. + +*** + +### GetParameterSchema + +#### Signature + +```go +func (*SWMLTransferSkill) GetParameterSchema() map[string]map[string]any +``` + +#### Returns + +`map[string]map[string]any` + +#### Source + +[`pkg/skills/builtin/swml_transfer.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/swml_transfer.go) + +Line 305. + +*** + +### GetPromptSections + +#### Signature + +```go +func (*SWMLTransferSkill) GetPromptSections() []map[string]any +``` + +#### Returns + +`[]map[string]any` + +#### Source + +[`pkg/skills/builtin/swml_transfer.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/swml_transfer.go) + +Line 247. + +*** + +### RegisterTools + +#### Signature + +```go +func (*SWMLTransferSkill) RegisterTools() []skills.ToolRegistration +``` + +#### Returns + +`[]skills.ToolRegistration` + +#### Source + +[`pkg/skills/builtin/swml_transfer.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/swml_transfer.go) + +Line 75. + +*** + +### Setup + +#### Signature + +```go +func (*SWMLTransferSkill) Setup() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/skills/builtin/swml_transfer.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/swml_transfer.go) + +Line 43. + +*** + +### SupportsMultipleInstances + +#### Signature + +```go +func (*SWMLTransferSkill) SupportsMultipleInstances() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/skills/builtin/swml_transfer.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/swml_transfer.go) + +Line 36. + +## Source + +[`pkg/skills/builtin/swml_transfer.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/swml_transfer.go) + +Line 12. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/weather-api-skill/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/weather-api-skill/index.mdx new file mode 100644 index 0000000000..46e5c32578 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/weather-api-skill/index.mdx @@ -0,0 +1,153 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/weather-api-skill" +title: "WeatherAPISkill" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/skills/builtin.WeatherAPISkill" + parent: "github.com/signalwire/signalwire-go/pkg/skills/builtin" + module: "github.com.signalwire.signalwire-go.pkg.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/weather_api.go" +--- +# `WeatherAPISkill` + +WeatherAPISkill gets current weather from WeatherAPI.com. + +## Signature + +```go +type WeatherAPISkill struct +``` + +## Properties + + + +## Methods + +### GetHints + +#### Signature + +```go +func (*WeatherAPISkill) GetHints() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/skills/builtin/weather_api.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/weather_api.go) + +Line 217. + +*** + +### GetParameterSchema + +#### Signature + +```go +func (*WeatherAPISkill) GetParameterSchema() map[string]map[string]any +``` + +#### Returns + +`map[string]map[string]any` + +#### Source + +[`pkg/skills/builtin/weather_api.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/weather_api.go) + +Line 234. + +*** + +### GetPromptSections + +#### Signature + +```go +func (*WeatherAPISkill) GetPromptSections() []map[string]any +``` + +#### Returns + +`[]map[string]any` + +#### Source + +[`pkg/skills/builtin/weather_api.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/weather_api.go) + +Line 221. + +*** + +### RegisterTools + +#### Signature + +```go +func (*WeatherAPISkill) RegisterTools() []skills.ToolRegistration +``` + +#### Returns + +`[]skills.ToolRegistration` + +#### Source + +[`pkg/skills/builtin/weather_api.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/weather_api.go) + +Line 61. + +*** + +### RequiredEnvVars + +#### Signature + +```go +func (*WeatherAPISkill) RequiredEnvVars() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/skills/builtin/weather_api.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/weather_api.go) + +Line 36. + +*** + +### Setup + +#### Signature + +```go +func (*WeatherAPISkill) Setup() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/skills/builtin/weather_api.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/weather_api.go) + +Line 46. + +## Source + +[`pkg/skills/builtin/weather_api.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/weather_api.go) + +Line 17. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/web-search-skill/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/web-search-skill/index.mdx new file mode 100644 index 0000000000..b1318d4aaf --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/web-search-skill/index.mdx @@ -0,0 +1,197 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/web-search-skill" +title: "WebSearchSkill" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/skills/builtin.WebSearchSkill" + parent: "github.com/signalwire/signalwire-go/pkg/skills/builtin" + module: "github.com.signalwire.signalwire-go.pkg.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/web_search.go" +--- +# `WebSearchSkill` + +WebSearchSkill searches the web using Google Custom Search API. + +## Signature + +```go +type WebSearchSkill struct +``` + +## Properties + + + +## Methods + +### GetGlobalData + +GetGlobalData returns global context data signalling that quality-filtered web search is available. Mirrors Python's get\_global\_data return value. + +#### Signature + +```go +func (*WebSearchSkill) GetGlobalData() map[string]any +``` + +#### Returns + +`map[string]any` + +#### Source + +[`pkg/skills/builtin/web_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/web_search.go) + +Line 898. + +*** + +### GetInstanceKey + +GetInstanceKey returns a unique key incorporating both searchEngineID and toolName, matching Python's f"\{SKILL\_NAME\}_\{search\_engine\_id\}_\{tool\_name\}" pattern. + +#### Signature + +```go +func (*WebSearchSkill) GetInstanceKey() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/skills/builtin/web_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/web_search.go) + +Line 86. + +*** + +### GetParameterSchema + +#### Signature + +```go +func (*WebSearchSkill) GetParameterSchema() map[string]map[string]any +``` + +#### Returns + +`map[string]map[string]any` + +#### Source + +[`pkg/skills/builtin/web_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/web_search.go) + +Line 921. + +*** + +### GetPromptSections + +#### Signature + +```go +func (*WebSearchSkill) GetPromptSections() []map[string]any +``` + +#### Returns + +`[]map[string]any` + +#### Source + +[`pkg/skills/builtin/web_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/web_search.go) + +Line 906. + +*** + +### RegisterTools + +#### Signature + +```go +func (*WebSearchSkill) RegisterTools() []skills.ToolRegistration +``` + +#### Returns + +`[]skills.ToolRegistration` + +#### Source + +[`pkg/skills/builtin/web_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/web_search.go) + +Line 118. + +*** + +### RequiredEnvVars + +#### Signature + +```go +func (*WebSearchSkill) RequiredEnvVars() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/skills/builtin/web_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/web_search.go) + +Line 71. + +*** + +### Setup + +#### Signature + +```go +func (*WebSearchSkill) Setup() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/skills/builtin/web_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/web_search.go) + +Line 90. + +*** + +### SupportsMultipleInstances + +#### Signature + +```go +func (*WebSearchSkill) SupportsMultipleInstances() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/skills/builtin/web_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/web_search.go) + +Line 82. + +## Source + +[`pkg/skills/builtin/web_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/web_search.go) + +Line 24. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/wikipedia-search-skill/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/wikipedia-search-skill/index.mdx new file mode 100644 index 0000000000..6b695fc908 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/wikipedia-search-skill/index.mdx @@ -0,0 +1,113 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/wikipedia-search-skill" +title: "WikipediaSearchSkill" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/skills/builtin.WikipediaSearchSkill" + parent: "github.com/signalwire/signalwire-go/pkg/skills/builtin" + module: "github.com.signalwire.signalwire-go.pkg.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/wikipedia_search.go" +--- +# `WikipediaSearchSkill` + +WikipediaSearchSkill searches Wikipedia for information. + +## Signature + +```go +type WikipediaSearchSkill struct +``` + +## Properties + + + +## Methods + +### GetParameterSchema + +#### Signature + +```go +func (*WikipediaSearchSkill) GetParameterSchema() map[string]map[string]any +``` + +#### Returns + +`map[string]map[string]any` + +#### Source + +[`pkg/skills/builtin/wikipedia_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/wikipedia_search.go) + +Line 46. + +*** + +### GetPromptSections + +#### Signature + +```go +func (*WikipediaSearchSkill) GetPromptSections() []map[string]any +``` + +#### Returns + +`[]map[string]any` + +#### Source + +[`pkg/skills/builtin/wikipedia_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/wikipedia_search.go) + +Line 182. + +*** + +### RegisterTools + +#### Signature + +```go +func (*WikipediaSearchSkill) RegisterTools() []skills.ToolRegistration +``` + +#### Returns + +`[]skills.ToolRegistration` + +#### Source + +[`pkg/skills/builtin/wikipedia_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/wikipedia_search.go) + +Line 65. + +*** + +### Setup + +#### Signature + +```go +func (*WikipediaSearchSkill) Setup() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/skills/builtin/wikipedia_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/wikipedia_search.go) + +Line 35. + +## Source + +[`pkg/skills/builtin/wikipedia_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/wikipedia_search.go) + +Line 17. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/skills/base-skill/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/skills/base-skill/index.mdx new file mode 100644 index 0000000000..faaf0bc825 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/skills/base-skill/index.mdx @@ -0,0 +1,519 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/skills/skills/base-skill" +title: "BaseSkill" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/skills.BaseSkill" + parent: "github.com/signalwire/signalwire-go/pkg/skills" + module: "github.com.signalwire.signalwire-go.pkg.skills" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go" +--- +# `BaseSkill` + +BaseSkill provides default implementations for the SkillBase interface. Concrete skills should embed this struct and override methods as needed. + +## Signature + +```go +type BaseSkill struct +``` + +## Properties + + + Logger is a named logger for this skill instance. It is initialized automatically when Name() is first called via NewBaseSkill, or can be set explicitly. Mirrors Python SkillBase.logger. + + + + + + + + + + +## Methods + +### Cleanup + +Cleanup is a no-op by default. + +#### Signature + +```go +func (*BaseSkill) Cleanup() +``` + +#### Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 111. + +*** + +### Description + +Description returns the skill description. + +#### Signature + +```go +func (*BaseSkill) Description() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 70. + +*** + +### GetGlobalData + +GetGlobalData returns nil (no global data by default). + +#### Signature + +```go +func (*BaseSkill) GetGlobalData() map[string]any +``` + +#### Returns + +`map[string]any` + +#### Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 90. + +*** + +### GetHints + +GetHints returns nil (no hints by default). + +#### Signature + +```go +func (*BaseSkill) GetHints() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 87. + +*** + +### GetInstanceKey + +GetInstanceKey returns a unique key for tracking this skill instance. When SupportsMultipleInstances() returns true, the key is composed of the skill name and the "tool\_name" parameter (defaulting to the skill name), matching Python's get\_instance\_key() behavior for multi-instance skills. When SupportsMultipleInstances() returns false, returns the skill name. + +#### Signature + +```go +func (*BaseSkill) GetInstanceKey() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 118. + +*** + +### GetParam + +GetParam retrieves a parameter value from the skill's Params map. Returns the value and true if found, or nil and false otherwise. + +#### Signature + +```go +func (*BaseSkill) GetParam(key string) (any, bool) +``` + +#### Parameters + + + +#### Returns + +`(any, bool)` + +#### Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 195. + +*** + +### GetParamBool + +GetParamBool retrieves a boolean parameter, returning the default if not found. + +#### Signature + +```go +func (*BaseSkill) GetParamBool(key string, defaultVal bool) bool +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 262. + +*** + +### GetParameterSchema + +GetParameterSchema returns the common parameters available to all skills. The "tool\_name" parameter is only included when SupportsMultipleInstances() returns true, matching Python's conditional inclusion in get\_parameter\_schema(). + +#### Signature + +```go +func (*BaseSkill) GetParameterSchema() map[string]map[string]any +``` + +#### Returns + +`map[string]map[string]any` + +#### Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 129. + +*** + +### GetParamFloat + +GetParamFloat retrieves a float parameter, returning the default if not found. + +#### Signature + +```go +func (*BaseSkill) GetParamFloat(key string, defaultVal float64) float64 +``` + +#### Parameters + + + + + +#### Returns + +`float64` + +#### Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 241. + +*** + +### GetParamInt + +GetParamInt retrieves an integer parameter, returning the default if not found. + +#### Signature + +```go +func (*BaseSkill) GetParamInt(key string, defaultVal int) int +``` + +#### Parameters + + + + + +#### Returns + +`int` + +#### Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 220. + +*** + +### GetParamString + +GetParamString retrieves a string parameter, returning the default if not found. + +#### Signature + +```go +func (*BaseSkill) GetParamString(key string, defaultVal string) string +``` + +#### Parameters + + + + + +#### Returns + +`string` + +#### Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 204. + +*** + +### GetPromptSections + +GetPromptSections returns nil (no prompt sections by default). When skip\_prompt is set to true in Params, returns nil even for concrete overrides — concrete overrides that inject prompt sections MUST call ShouldSkipPrompt() and return nil (or an empty slice) when it is true. + +#### Signature + +```go +func (*BaseSkill) GetPromptSections() []map[string]any +``` + +#### Returns + +`[]map[string]any` + +#### Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 103. + +*** + +### GetSkillData + +GetSkillData reads this skill instance's namespaced state from rawData. rawData is the raw\_data map passed to SWAIG function handlers, expected to contain a "global\_data" key. Returns an empty map when not found. Mirrors Python's get\_skill\_data(raw\_data). + +#### Signature + +```go +func (*BaseSkill) GetSkillData(rawData map[string]any) map[string]any +``` + +#### Parameters + + + +#### Returns + +`map[string]any` + +#### Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 172. + +*** + +### GetSkillNamespace + +GetSkillNamespace returns the namespaced key used to store this skill instance's state in agent global\_data. Uses the "prefix" parameter if set, otherwise falls back to the instance key. Mirrors Python's \_get\_skill\_namespace(). + +Example: a skill named "datasphere" with no prefix returns "skill:datasphere". With prefix "kb" it returns "skill:kb". + +#### Signature + +```go +func (*BaseSkill) GetSkillNamespace() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 161. + +*** + +### Name + +Name returns the skill name. + +#### Signature + +```go +func (*BaseSkill) Name() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 67. + +*** + +### RequiredEnvVars + +RequiredEnvVars returns nil (no required env vars by default). + +#### Signature + +```go +func (*BaseSkill) RequiredEnvVars() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 81. + +*** + +### ShouldSkipPrompt + +ShouldSkipPrompt returns true if the "skip\_prompt" parameter is set to true. Concrete skill overrides of GetPromptSections should call this helper before returning prompt content, mirroring Python's get\_prompt\_sections() guard. + +#### Signature + +```go +func (*BaseSkill) ShouldSkipPrompt() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 95. + +*** + +### SupportsMultipleInstances + +SupportsMultipleInstances returns false by default. + +#### Signature + +```go +func (*BaseSkill) SupportsMultipleInstances() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 84. + +*** + +### UpdateSkillData + +UpdateSkillData writes this skill instance's namespaced state into result's global\_data via result.UpdateGlobalData(). Returns result for method chaining. Mirrors Python's update\_skill\_data(result, data). + +#### Signature + +```go +func (*BaseSkill) UpdateSkillData(result *swaig.FunctionResult, data map[string]any) *swaig.FunctionResult +``` + +#### Parameters + + + + + +#### Returns + +`*swaig.FunctionResult` + +#### Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 187. + +*** + +### Version + +Version returns the skill version, defaulting to "1.0.0". + +#### Signature + +```go +func (*BaseSkill) Version() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 73. + +## Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 55. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/skills/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/skills/index.mdx new file mode 100644 index 0000000000..f06c170902 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/skills/index.mdx @@ -0,0 +1,591 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/skills/skills" +title: "skills" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "module" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/skills" + module: "github.com.signalwire.signalwire-go.pkg.skills" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/manager.go" +--- +# `skills` + +Package skills provides the skills system for SignalWire AI agents. Skills are modular capabilities that can be loaded into agents to provide tools, prompt sections, speech hints, and global data. + +## Signature + +```go +package skills +``` + +## Constants + + + Built-in skill names. These are the canonical keys the builtin packages register via RegisterSkill(); the constant values must stay in lockstep with those registrations (see pkg/skills/builtin/\*.go). + + + + Built-in skill names. These are the canonical keys the builtin packages register via RegisterSkill(); the constant values must stay in lockstep with those registrations (see pkg/skills/builtin/\*.go). + + + + Built-in skill names. These are the canonical keys the builtin packages register via RegisterSkill(); the constant values must stay in lockstep with those registrations (see pkg/skills/builtin/\*.go). + + + + Built-in skill names. These are the canonical keys the builtin packages register via RegisterSkill(); the constant values must stay in lockstep with those registrations (see pkg/skills/builtin/\*.go). + + + + Built-in skill names. These are the canonical keys the builtin packages register via RegisterSkill(); the constant values must stay in lockstep with those registrations (see pkg/skills/builtin/\*.go). + + + + Built-in skill names. These are the canonical keys the builtin packages register via RegisterSkill(); the constant values must stay in lockstep with those registrations (see pkg/skills/builtin/\*.go). + + + + Built-in skill names. These are the canonical keys the builtin packages register via RegisterSkill(); the constant values must stay in lockstep with those registrations (see pkg/skills/builtin/\*.go). + + + + Built-in skill names. These are the canonical keys the builtin packages register via RegisterSkill(); the constant values must stay in lockstep with those registrations (see pkg/skills/builtin/\*.go). + + + + Built-in skill names. These are the canonical keys the builtin packages register via RegisterSkill(); the constant values must stay in lockstep with those registrations (see pkg/skills/builtin/\*.go). + + + + Built-in skill names. These are the canonical keys the builtin packages register via RegisterSkill(); the constant values must stay in lockstep with those registrations (see pkg/skills/builtin/\*.go). + + + + Built-in skill names. These are the canonical keys the builtin packages register via RegisterSkill(); the constant values must stay in lockstep with those registrations (see pkg/skills/builtin/\*.go). + + + + Built-in skill names. These are the canonical keys the builtin packages register via RegisterSkill(); the constant values must stay in lockstep with those registrations (see pkg/skills/builtin/\*.go). + + + + Built-in skill names. These are the canonical keys the builtin packages register via RegisterSkill(); the constant values must stay in lockstep with those registrations (see pkg/skills/builtin/\*.go). + + + + Built-in skill names. These are the canonical keys the builtin packages register via RegisterSkill(); the constant values must stay in lockstep with those registrations (see pkg/skills/builtin/\*.go). + + + + Built-in skill names. These are the canonical keys the builtin packages register via RegisterSkill(); the constant values must stay in lockstep with those registrations (see pkg/skills/builtin/\*.go). + + + + Built-in skill names. These are the canonical keys the builtin packages register via RegisterSkill(); the constant values must stay in lockstep with those registrations (see pkg/skills/builtin/\*.go). + + + + Built-in skill names. These are the canonical keys the builtin packages register via RegisterSkill(); the constant values must stay in lockstep with those registrations (see pkg/skills/builtin/\*.go). + + + + Built-in skill names. These are the canonical keys the builtin packages register via RegisterSkill(); the constant values must stay in lockstep with those registrations (see pkg/skills/builtin/\*.go). + + +## Classes + + + + BaseSkill provides default implementations for the SkillBase interface. Concrete skills should embed this struct and override methods as needed. + + + + SkillManager manages the lifecycle of loaded skill instances. + + + + SkillRegistry is the per-instance Python-parity surface mirroring `signalwire.skills.registry.SkillRegistry`. Each instance owns its own list of external skill directories, validated and de-duplicated on insert. The package-level `RegisterSkill` / `GetSkillFactory` / `ListSkills` functions remain the canonical Go API for static compile-time skill registration; `SkillRegistry` exists so the `add_skill_directory` parity case has a real owning object the audit and downstream callers can hold. + + + + ToolRegistration describes a tool that a skill wants to register with the agent. + + + +## Functions + +### AddSkillDirectory + +AddSkillDirectory is a package-level shim that delegates to the shared `globalRegistry.AddSkillDirectory`. It mirrors Python's `signalwire.add_skill_directory` (which delegates to the module singleton `signalwire.skills.registry.skill_registry`). + +The path is validated (must exist and be a directory) and added (de-duplicated) to the global registry's external-paths list. Note that Go compiles to a static binary; dynamic on-disk skill loading is not implemented here, but the path-tracking surface is — so tools that introspect "what external directories has this agent registered?" get the same answer they'd get on the Python side. + +#### Signature + +```go +func AddSkillDirectory(path string) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/skills/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/registry.go) + +Line 135. + +*** + +### GetSkillFactory + +GetSkillFactory returns the factory function for a registered skill name. Returns nil if the skill is not registered. + +#### Signature + +```go +func GetSkillFactory(name string) func(params map[string]any) SkillBase +``` + +#### Parameters + + + +#### Returns + +`func(params map[string]any) SkillBase` + +#### Source + +[`pkg/skills/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/registry.go) + +Line 91. + +*** + +### ListSkills + +ListSkills returns sorted names of all registered skills. + +#### Signature + +```go +func ListSkills() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/skills/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/registry.go) + +Line 98. + +*** + +### ListSkillsWithParams + +ListSkillsWithParams returns the complete parameter schema for all registered skills. It instantiates each skill with nil params to obtain its GetParameterSchema output. This mirrors Python's skill\_registry.get\_all\_skills\_schema(). The returned map has skill names as keys and their parameter schemas as values. + +#### Signature + +```go +func ListSkillsWithParams() map[string]map[string]map[string]any +``` + +#### Returns + +`map[string]map[string]map[string]any` + +#### Source + +[`pkg/skills/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/registry.go) + +Line 113. + +*** + +### NewSkillManager + +NewSkillManager creates a new SkillManager. + +#### Signature + +```go +func NewSkillManager() *SkillManager +``` + +#### Returns + +`*SkillManager` + +#### Source + +[`pkg/skills/manager.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/manager.go) + +Line 16. + +*** + +### NewSkillRegistry + +NewSkillRegistry constructs a new SkillRegistry. The Python reference uses a singleton-per-module (`skill_registry`); Go callers can either construct their own via NewSkillRegistry() or use the global `globalRegistry` accessed through the package-level helpers. + +#### Signature + +```go +func NewSkillRegistry() *SkillRegistry +``` + +#### Returns + +`*SkillRegistry` + +#### Source + +[`pkg/skills/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/registry.go) + +Line 34. + +*** + +### RegisterSkill + +RegisterSkill registers a skill factory function by name. This is typically called from init() functions in builtin skill packages. + +#### Signature + +```go +func RegisterSkill(name string, factory func(params map[string]any) SkillBase) +``` + +#### Parameters + + + + + +#### Source + +[`pkg/skills/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/registry.go) + +Line 83. + +## Interfaces + +### SkillBase + +SkillBase defines the interface that all skills must implement. + +#### Signature + +```go +type SkillBase interface { Name; Description; Version; RequiredEnvVars; SupportsMultipleInstances; Setup; RegisterTools; GetHints; GetGlobalData; GetPromptSections; Cleanup; GetInstanceKey; GetParameterSchema } +``` + +#### Methods + +##### Cleanup + +Cleanup releases resources when the skill is unloaded. + +###### Signature + +```go +Cleanup() +``` + +###### Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 35. + +*** + +##### Description + +Description returns a human-readable description of the skill. + +###### Signature + +```go +Description() string +``` + +###### Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 16. + +*** + +##### GetGlobalData + +GetGlobalData returns data to add to the agent's global context. + +###### Signature + +```go +GetGlobalData() map[string]any +``` + +###### Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 31. + +*** + +##### GetHints + +GetHints returns speech recognition hints for this skill. + +###### Signature + +```go +GetHints() []string +``` + +###### Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 29. + +*** + +##### GetInstanceKey + +GetInstanceKey returns a unique key for tracking this skill instance. + +###### Signature + +```go +GetInstanceKey() string +``` + +###### Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 37. + +*** + +##### GetParameterSchema + +GetParameterSchema returns metadata about all parameters the skill accepts. + +###### Signature + +```go +GetParameterSchema() map[string]map[string]any +``` + +###### Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 39. + +*** + +##### GetPromptSections + +GetPromptSections returns prompt sections to inject into the agent. + +###### Signature + +```go +GetPromptSections() []map[string]any +``` + +###### Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 33. + +*** + +##### Name + +Name returns the unique skill identifier. + +###### Signature + +```go +Name() string +``` + +###### Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 14. + +*** + +##### RegisterTools + +RegisterTools returns tool registrations for this skill. + +###### Signature + +```go +RegisterTools() []ToolRegistration +``` + +###### Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 27. + +*** + +##### RequiredEnvVars + +RequiredEnvVars returns environment variable names that must be set. + +###### Signature + +```go +RequiredEnvVars() []string +``` + +###### Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 20. + +*** + +##### Setup + +Setup validates configuration and initializes the skill. + +Returns true if setup was successful. + +###### Signature + +```go +Setup() bool +``` + +###### Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 25. + +*** + +##### SupportsMultipleInstances + +SupportsMultipleInstances returns whether multiple instances are allowed. + +###### Signature + +```go +SupportsMultipleInstances() bool +``` + +###### Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 22. + +*** + +##### Version + +Version returns the semantic version of the skill. + +###### Signature + +```go +Version() string +``` + +###### Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 18. + +#### Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 12. + +## Enums + +### SkillName + +SkillName is the closed set of built-in skill names as a defined string type with typed constants. It mirrors the PHP `SkillName` backed enum and gives Go callers editor autocompletion plus call-site typo checking: a bare string like "datetiem" only fails at runtime (on the server), whereas a mistyped constant fails to compile. + +AgentBase.AddSkill / RemoveSkill / HasSkill take SkillName. Because Go auto-converts untyped string-constant literals to a defined string type, every call site keeps working three ways: + +``` +agent.AddSkill(skills.SkillDatetime, nil) // typed const — autocompleted +agent.AddSkill("datetime", nil) // bare string literal still compiles +agent.AddSkill(skills.SkillName("custom"), // open set: custom / 3rd-party skills + map[string]any{...}) +``` + +SkillName is a string subtype, so its wire/JSON value is identical to the reference's bare `str` parameter — parity with the Python reference (which uses `str`) and with custom skills that aren't built in. + +#### Signature + +```go +type SkillName alias +``` + +#### Examples + + + + ```go + agent.AddSkill(skills.SkillDatetime, nil) // typed const — autocompleted + agent.AddSkill("datetime", nil) // bare string literal still compiles + agent.AddSkill(skills.SkillName("custom"), // open set: custom / 3rd-party skills + map[string]any{...}) + ``` + + + + ```go + agent.AddSkill(skills.SkillDatetime, nil) // typed const — autocompleted + agent.AddSkill("datetime", nil) // bare string literal still compiles + agent.AddSkill(skills.SkillName("custom"), // open set: custom / 3rd-party skills + map[string]any{...}) + ``` + + + +#### Source + +[`pkg/skills/skill_name.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_name.go) + +Line 21. + +## Source + +[`pkg/skills/manager.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/manager.go) diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/skills/skill-manager/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/skills/skill-manager/index.mdx new file mode 100644 index 0000000000..dd283bc98b --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/skills/skill-manager/index.mdx @@ -0,0 +1,160 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/skills/skills/skill-manager" +title: "SkillManager" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/skills.SkillManager" + parent: "github.com/signalwire/signalwire-go/pkg/skills" + module: "github.com.signalwire.signalwire-go.pkg.skills" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/manager.go" +--- +# `SkillManager` + +SkillManager manages the lifecycle of loaded skill instances. + +## Signature + +```go +type SkillManager struct +``` + +## Methods + +### GetSkill + +GetSkill returns the skill with the given instance key, or nil if not found. + +#### Signature + +```go +func (*SkillManager) GetSkill(key string) SkillBase +``` + +#### Parameters + + + +#### Returns + +`SkillBase` + +#### Source + +[`pkg/skills/manager.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/manager.go) + +Line 98. + +*** + +### HasSkill + +HasSkill returns true if a skill with the given instance key is loaded. + +#### Signature + +```go +func (*SkillManager) HasSkill(key string) bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`pkg/skills/manager.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/manager.go) + +Line 90. + +*** + +### ListLoadedSkills + +ListLoadedSkills returns the instance keys of all loaded skills. + +#### Signature + +```go +func (*SkillManager) ListLoadedSkills() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/skills/manager.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/manager.go) + +Line 78. + +*** + +### LoadSkill + +LoadSkill validates environment variables, calls Setup, and registers the skill. Returns (success bool, errorMessage string). + +When a skill with the same instance key is already loaded, the behavior depends on SupportsMultipleInstances(): + +- false (default): returns (false, error) — duplicate is an error. +- true: returns (true, "") — duplicate instance is silently accepted, matching Python's SkillManager.load\_skill() warning-and-continue behavior. + +#### Signature + +```go +func (*SkillManager) LoadSkill(skill SkillBase) (bool, string) +``` + +#### Parameters + + + +#### Returns + +`(bool, string)` + +#### Source + +[`pkg/skills/manager.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/manager.go) + +Line 30. + +*** + +### UnloadSkill + +UnloadSkill removes a skill by its instance key. Returns true if found and removed. + +#### Signature + +```go +func (*SkillManager) UnloadSkill(key string) bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`pkg/skills/manager.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/manager.go) + +Line 63. + +## Source + +[`pkg/skills/manager.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/manager.go) + +Line 10. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/skills/skill-registry/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/skills/skill-registry/index.mdx new file mode 100644 index 0000000000..d2014e7349 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/skills/skill-registry/index.mdx @@ -0,0 +1,77 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/skills/skills/skill-registry" +title: "SkillRegistry" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/skills.SkillRegistry" + parent: "github.com/signalwire/signalwire-go/pkg/skills" + module: "github.com.signalwire.signalwire-go.pkg.skills" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/registry.go" +--- +# `SkillRegistry` + +SkillRegistry is the per-instance Python-parity surface mirroring `signalwire.skills.registry.SkillRegistry`. Each instance owns its own list of external skill directories, validated and de-duplicated on insert. The package-level `RegisterSkill` / `GetSkillFactory` / `ListSkills` functions remain the canonical Go API for static compile-time skill registration; `SkillRegistry` exists so the `add_skill_directory` parity case has a real owning object the audit and downstream callers can hold. + +## Signature + +```go +type SkillRegistry struct +``` + +## Methods + +### AddSkillDirectory + +AddSkillDirectory adds a directory to search for skills. Mirrors Python's `SkillRegistry.add_skill_directory`: validates that the path exists and is a directory, then appends it (de-duplicated) to the registry's external paths list. Returns an error (the Go analog of Python's `ValueError`) for non-existent paths or non-directories. + +#### Signature + +```go +func (*SkillRegistry) AddSkillDirectory(path string) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/skills/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/registry.go) + +Line 49. + +*** + +### ExternalPaths + +ExternalPaths returns a copy of the registered external skill directories. Parity surface for Python's `_external_paths`. + +#### Signature + +```go +func (*SkillRegistry) ExternalPaths() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/skills/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/registry.go) + +Line 73. + +## Source + +[`pkg/skills/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/registry.go) + +Line 25. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/skills/tool-registration/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/skills/tool-registration/index.mdx new file mode 100644 index 0000000000..c945235c57 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/skills/tool-registration/index.mdx @@ -0,0 +1,45 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/skills/skills/tool-registration" +title: "ToolRegistration" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/skills.ToolRegistration" + parent: "github.com/signalwire/signalwire-go/pkg/skills" + module: "github.com.signalwire.signalwire-go.pkg.skills" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go" +--- +# `ToolRegistration` + +ToolRegistration describes a tool that a skill wants to register with the agent. + +## Signature + +```go +type ToolRegistration struct +``` + +## Properties + + + + + + + + + + + + + + + +## Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 43. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig/function-result/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig/function-result/index.mdx new file mode 100644 index 0000000000..6e5fef2b7c --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig/function-result/index.mdx @@ -0,0 +1,1451 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig/function-result" +title: "FunctionResult" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/swaig.FunctionResult" + parent: "github.com/signalwire/signalwire-go/pkg/swaig" + module: "github.com.signalwire.signalwire-go.pkg.swaig" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go" +--- +# `FunctionResult` + +FunctionResult represents the response from a SWAIG tool handler. It contains a text response, optional actions, and post-processing control. All mutating methods return \*FunctionResult for method chaining. + +## Signature + +```go +type FunctionResult struct +``` + +## Methods + +### Actions + +Actions returns the list of actions added to this result. + +#### Signature + +```go +func (*FunctionResult) Actions() []map[string]any +``` + +#### Returns + +`[]map[string]any` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 40. + +*** + +### AddAction + +AddAction appends a single named action to the result. + +#### Signature + +```go +func (*FunctionResult) AddAction(name string, data any) *FunctionResult +``` + +#### Parameters + + + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 64. + +*** + +### AddActions + +AddActions appends multiple actions to the result. + +#### Signature + +```go +func (*FunctionResult) AddActions(actions []map[string]any) *FunctionResult +``` + +#### Parameters + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 70. + +*** + +### AddDynamicHints + +AddDynamicHints adds dynamic speech recognition hints during a call. + +#### Signature + +```go +func (*FunctionResult) AddDynamicHints(hints []any) *FunctionResult +``` + +#### Parameters + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 429. + +*** + +### ClearDynamicHints + +ClearDynamicHints removes all dynamic speech recognition hints. + +#### Signature + +```go +func (*FunctionResult) ClearDynamicHints() *FunctionResult +``` + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 434. + +*** + +### Connect + +Connect adds a connect action to transfer/connect the call to another destination. If final is true, the call permanently transfers (exits the agent). If final is false, the call returns to the agent when the far end hangs up. The from parameter sets the caller ID; pass empty string to use the call's default. + +#### Signature + +```go +func (*FunctionResult) Connect(destination string, final bool, from string) *FunctionResult +``` + +#### Parameters + + + + + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 104. + +*** + +### EnableExtensiveData + +EnableExtensiveData sends full data to LLM for this turn only. + +#### Signature + +```go +func (*FunctionResult) EnableExtensiveData(enabled bool) *FunctionResult +``` + +#### Parameters + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 461. + +*** + +### EnableFunctionsOnTimeout + +EnableFunctionsOnTimeout enables or disables function calls on speaker timeout. + +#### Signature + +```go +func (*FunctionResult) EnableFunctionsOnTimeout(enabled bool) *FunctionResult +``` + +#### Parameters + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 456. + +*** + +### ExecuteRpc + +ExecuteRpc executes an RPC method on a call. Pass empty strings for callID and nodeID to omit them from the payload. + +#### Signature + +```go +func (*FunctionResult) ExecuteRpc(method string, params map[string]any, callID string, nodeID string) *FunctionResult +``` + +#### Parameters + + + + + + + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 943. + +*** + +### ExecuteSwml + +ExecuteSwml executes SWML content. If transfer is true, the call exits the agent after execution. swmlContent can be a map\[string]any or a string (raw SWML JSON). + +#### Signature + +```go +func (*FunctionResult) ExecuteSwml(swmlContent any, transfer bool) *FunctionResult +``` + +#### Parameters + + + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 474. + +*** + +### Hangup + +Hangup terminates the call. + +#### Signature + +```go +func (*FunctionResult) Hangup() *FunctionResult +``` + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 146. + +*** + +### Hold + +Hold puts the call on hold with the given timeout in seconds. Timeout is clamped to the range \[0, 900]. + +#### Signature + +```go +func (*FunctionResult) Hold(timeout int) *FunctionResult +``` + +#### Parameters + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 152. + +*** + +### JoinConference + +JoinConference joins an ad-hoc audio conference. Pass nil for opts to use default behavior (muted=false, beep="true", no holdAudio). + +#### Signature + +```go +func (*FunctionResult) JoinConference(name string, opts *JoinConferenceOptions) *FunctionResult +``` + +#### Parameters + + + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 547. + +*** + +### JoinRoom + +JoinRoom joins a RELAY room for multi-party communication. + +#### Signature + +```go +func (*FunctionResult) JoinRoom(name string) *FunctionResult +``` + +#### Parameters + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 653. + +*** + +### Pay + +Pay processes a payment using SWML pay action. connectorURL is the only required parameter. opts may be nil to use Python SDK defaults for all optional parameters. + +#### Signature + +```go +func (*FunctionResult) Pay(connectorURL string, opts *PayOptions) *FunctionResult +``` + +#### Parameters + + + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 817. + +*** + +### PlayBackgroundFile + +PlayBackgroundFile plays an audio or video file in the background. If wait is true, attention-getting behavior is suppressed during playback. + +#### Signature + +```go +func (*FunctionResult) PlayBackgroundFile(filename string, wait bool) *FunctionResult +``` + +#### Parameters + + + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 301. + +*** + +### PostProcess + +PostProcess returns whether post-processing is enabled. + +#### Signature + +```go +func (*FunctionResult) PostProcess() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 45. + +*** + +### RecordCall + +RecordCall starts background call recording using SWML. controlID, stereo, format, and direction are the primary parameters. Use opts to specify additional optional parameters (pass nil to use defaults). + +format is the defined string type RecordFormat: the Format\* constants give autocomplete + a compile-time typo check, while Go's untyped-constant auto-conversion keeps a bare "wav" literal compiling — parity with the Python reference's str format. It is written to the wire as a plain string. + +direction is the defined string type RecordDirection (\{speak, listen, both\} — the RecordDirection\* constants); like format it autocompletes + typo-checks at compile time while a bare "both" literal still compiles, and is written to the wire as a plain string. Note this set differs from TapDirection (\{speak, hear, both\}) — record\_call uses "listen", tap uses "hear". + +#### Signature + +```go +func (*FunctionResult) RecordCall( + controlID string, + stereo bool, + format RecordFormat, + direction RecordDirection, + opts *RecordCallOptions +) *FunctionResult +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 356. + +*** + +### RemoveGlobalData + +RemoveGlobalData removes global agent data variables by key slice. + +#### Signature + +```go +func (*FunctionResult) RemoveGlobalData(keys []string) *FunctionResult +``` + +#### Parameters + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 191. + +*** + +### RemoveGlobalDataKey + +RemoveGlobalDataKey removes a single global agent data variable by key. This matches the Python SDK's Union\[str, List\[str]] behavior for a bare string argument, which emits the key as a string (not a one-element array) in the action payload. + +#### Signature + +```go +func (*FunctionResult) RemoveGlobalDataKey(key string) *FunctionResult +``` + +#### Parameters + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 198. + +*** + +### RemoveMetadata + +RemoveMetadata removes metadata keys from the current function's scope. + +#### Signature + +```go +func (*FunctionResult) RemoveMetadata(keys []string) *FunctionResult +``` + +#### Parameters + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 208. + +*** + +### RemoveMetadataKey + +RemoveMetadataKey removes a single metadata key from the current function's scope. This matches the Python SDK's Union\[str, List\[str]] behavior for a bare string argument, which emits the key as a string (not a one-element array) in the action payload. + +#### Signature + +```go +func (*FunctionResult) RemoveMetadataKey(key string) *FunctionResult +``` + +#### Parameters + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 215. + +*** + +### ReplaceInHistory + +ReplaceInHistory replaces the tool call and result pair in conversation history. If text is a string, the tool call is replaced with an assistant message containing that text. If text is a bool and true, the pair is removed from history entirely. + +#### Signature + +```go +func (*FunctionResult) ReplaceInHistory(text any) *FunctionResult +``` + +#### Parameters + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 280. + +*** + +### Response + +Response returns the natural language response text. + +#### Signature + +```go +func (*FunctionResult) Response() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 35. + +*** + +### RpcAiMessage + +RpcAiMessage injects a message into an AI agent on another call. role defaults to "system" when empty, matching the Python SDK default. This matches the Python SDK's rpc\_ai\_message() which calls execute\_rpc(method="ai\_message", ...). + +#### Signature + +```go +func (*FunctionResult) RpcAiMessage(callID string, messageText string, role string) *FunctionResult +``` + +#### Parameters + + + + + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 995. + +*** + +### RpcAiUnhold + +RpcAiUnhold unholds another call. This matches the Python SDK's rpc\_ai\_unhold() which calls execute\_rpc(method="ai\_unhold", ...). + +#### Signature + +```go +func (*FunctionResult) RpcAiUnhold(callID string) *FunctionResult +``` + +#### Parameters + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 1007. + +*** + +### RpcDial + +RpcDial dials out to a number with a destination SWML URL using execute\_rpc. deviceType defaults to "phone" when empty. This matches the Python SDK's rpc\_dial() which calls execute\_rpc(method="dial", ...). + +#### Signature + +```go +func (*FunctionResult) RpcDial(toNumber string, fromNumber string, destSwml string, deviceType string) *FunctionResult +``` + +#### Parameters + + + + + + + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 974. + +*** + +### Say + +Say makes the agent speak specific text. + +#### Signature + +```go +func (*FunctionResult) Say(text string) *FunctionResult +``` + +#### Parameters + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 295. + +*** + +### SendSms + +SendSms sends a text message to a PSTN phone number. Pass empty string for body if only sending media, nil for optional slices, and empty string for region to omit it. + +#### Signature + +```go +func (*FunctionResult) SendSms( + toNumber string, + fromNumber string, + body string, + media []string, + tags []string, + region string +) *FunctionResult +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 739. + +*** + +### SetEndOfSpeechTimeout + +SetEndOfSpeechTimeout adjusts the end-of-speech timeout in milliseconds. + +#### Signature + +```go +func (*FunctionResult) SetEndOfSpeechTimeout(ms int) *FunctionResult +``` + +#### Parameters + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 440. + +*** + +### SetMetadata + +SetMetadata sets metadata scoped to the current function's meta\_data\_token. + +#### Signature + +```go +func (*FunctionResult) SetMetadata(data map[string]any) *FunctionResult +``` + +#### Parameters + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 203. + +*** + +### SetPostProcess + +SetPostProcess controls whether the AI takes another turn before executing actions. + +#### Signature + +```go +func (*FunctionResult) SetPostProcess(postProcess bool) *FunctionResult +``` + +#### Parameters + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 58. + +*** + +### SetResponse + +SetResponse sets the natural language response text. + +#### Signature + +```go +func (*FunctionResult) SetResponse(response string) *FunctionResult +``` + +#### Parameters + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 52. + +*** + +### SetSpeechEventTimeout + +SetSpeechEventTimeout adjusts the speech event timeout in milliseconds. + +#### Signature + +```go +func (*FunctionResult) SetSpeechEventTimeout(ms int) *FunctionResult +``` + +#### Parameters + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 445. + +*** + +### SimulateUserInput + +SimulateUserInput queues simulated user input text. Emits action key "user\_input" matching the Python SDK's add\_action("user\_input", text). + +#### Signature + +```go +func (*FunctionResult) SimulateUserInput(text string) *FunctionResult +``` + +#### Parameters + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 1013. + +*** + +### SipRefer + +SipRefer sends a SIP REFER for call transfer in SIP environments. + +#### Signature + +```go +func (*FunctionResult) SipRefer(toURI string) *FunctionResult +``` + +#### Parameters + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 666. + +*** + +### Stop + +Stop stops the agent execution. + +#### Signature + +```go +func (*FunctionResult) Stop() *FunctionResult +``` + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 179. + +*** + +### StopBackgroundFile + +StopBackgroundFile stops the currently playing background file. + +#### Signature + +```go +func (*FunctionResult) StopBackgroundFile() *FunctionResult +``` + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 309. + +*** + +### StopRecordCall + +StopRecordCall stops an active background call recording. + +#### Signature + +```go +func (*FunctionResult) StopRecordCall(controlID string) *FunctionResult +``` + +#### Parameters + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 409. + +*** + +### StopTap + +StopTap stops an active tap stream. + +#### Signature + +```go +func (*FunctionResult) StopTap(controlID string) *FunctionResult +``` + +#### Parameters + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 719. + +*** + +### String + +String returns a human-readable representation including the response and action count. + +#### Signature + +```go +func (*FunctionResult) String() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 1053. + +*** + +### SwitchContext + +SwitchContext changes the agent context/prompt during conversation. Only non-empty/true fields are included in the action. + +#### Signature + +```go +func (*FunctionResult) SwitchContext( + systemPrompt string, + userPrompt string, + consolidate bool, + fullReset bool, + isolated bool +) *FunctionResult +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 252. + +*** + +### SwmlChangeContext + +SwmlChangeContext transitions to a different conversation context. Emits action key "change\_context" with the context name as a plain string value, matching the Python SDK's add\_action("change\_context", context\_name). + +#### Signature + +```go +func (*FunctionResult) SwmlChangeContext(contextName string) *FunctionResult +``` + +#### Parameters + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 246. + +*** + +### SwmlChangeStep + +SwmlChangeStep transitions to a different conversation step. Emits action key "change\_step" with the step name as a plain string value, matching the Python SDK's add\_action("change\_step", step\_name). + +#### Signature + +```go +func (*FunctionResult) SwmlChangeStep(stepName string) *FunctionResult +``` + +#### Parameters + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 239. + +*** + +### SwmlTransfer + +SwmlTransfer adds a SWML transfer action with an AI response for when control returns. + +#### Signature + +```go +func (*FunctionResult) SwmlTransfer(dest string, aiResponse string, final bool) *FunctionResult +``` + +#### Parameters + + + + + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 127. + +*** + +### SwmlUserEvent + +SwmlUserEvent sends a user event through SWML for real-time UI updates. + +#### Signature + +```go +func (*FunctionResult) SwmlUserEvent(eventData map[string]any) *FunctionResult +``` + +#### Parameters + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 220. + +*** + +### Tap + +Tap starts background call tapping, streaming media to the given URI. rtpPtime sets the packetization time in milliseconds for RTP streams (0 = use default of 20ms). Pass empty string for statusURL to omit it. + +direction is the defined string type TapDirection (\{speak, hear, both\} — the TapDirection\* constants) and codec is the defined string type Codec (\{PCMU, PCMA\} — the Codec\* constants); both autocomplete + typo-check at compile time while bare "both"/"PCMU" literals still compile, and are written to the wire as plain strings. Note TapDirection (\{speak, hear, both\}) differs from RecordDirection (\{speak, listen, both\}), and this 2-value tap Codec is distinct from the larger RELAY connect/stream codec superset (left a bare string). + +#### Signature + +```go +func (*FunctionResult) Tap( + uri string, + controlID string, + direction TapDirection, + codec Codec, + rtpPtime int, + statusURL string +) *FunctionResult +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 689. + +*** + +### ToggleFunctions + +ToggleFunctions enables or disables specific SWAIG functions. Each toggle should have "function" and "active" keys. + +#### Signature + +```go +func (*FunctionResult) ToggleFunctions(toggles []map[string]any) *FunctionResult +``` + +#### Parameters + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 451. + +*** + +### ToMap + +ToMap serializes the FunctionResult to a map suitable for JSON encoding. The "action" key is only included if there are actions. The "post\_process" key is only included if true. + +#### Signature + +```go +func (*FunctionResult) ToMap() map[string]any +``` + +#### Returns + +`map[string]any` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 78. + +*** + +### UpdateGlobalData + +UpdateGlobalData sets or updates global agent data variables. + +#### Signature + +```go +func (*FunctionResult) UpdateGlobalData(data map[string]any) *FunctionResult +``` + +#### Parameters + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 186. + +*** + +### UpdateSettings + +UpdateSettings updates agent runtime settings such as temperature, top\_p, etc. + +#### Signature + +```go +func (*FunctionResult) UpdateSettings(settings map[string]any) *FunctionResult +``` + +#### Parameters + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 466. + +*** + +### WaitForUser + +WaitForUser controls how the agent waits for user input. Pass nil for enabled/timeout to omit those fields. If answerFirst is true, the value is set to "answer\_first" regardless of other parameters. + +#### Signature + +```go +func (*FunctionResult) WaitForUser(enabled *bool, timeout *int, answerFirst bool) *FunctionResult +``` + +#### Parameters + + + + + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 165. + +## Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 18. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig/index.mdx new file mode 100644 index 0000000000..900177267e --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig/index.mdx @@ -0,0 +1,853 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig" +title: "swaig" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "module" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/swaig" + module: "github.com.signalwire.signalwire-go.pkg.swaig" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/codec.go" +--- +# `swaig` + +Package swaig provides SWAIG (SignalWire AI Gateway) function result handling for building AI agent tool responses with actions and call control. + +## Signature + +```go +package swaig +``` + +## Constants + + + Audio codecs for Tap. These are exactly the strings the SWML tap verb accepts for codec; the values are emitted verbatim into the tap params (matching the Python reference's valid\_codecs = \["PCMU", "PCMA"], default "PCMU"). + + + + Audio codecs for Tap. These are exactly the strings the SWML tap verb accepts for codec; the values are emitted verbatim into the tap params (matching the Python reference's valid\_codecs = \["PCMU", "PCMA"], default "PCMU"). + + + + Recording container formats. These are the canonical format tokens the SWML record verb accepts; the values are the exact strings emitted in the record params (matching the Python reference's record\_call format examples: mp3, wav, mp4). + + + + Recording container formats. These are the canonical format tokens the SWML record verb accepts; the values are the exact strings emitted in the record params (matching the Python reference's record\_call format examples: mp3, wav, mp4). + + + + Recording container formats. These are the canonical format tokens the SWML record verb accepts; the values are the exact strings emitted in the record params (matching the Python reference's record\_call format examples: mp3, wav, mp4). + + + + Audio directions for RecordCall. These are exactly the strings the SWML record\_call verb accepts for direction; the values are emitted verbatim into the record\_call params (matching the Python reference's valid\_directions = \["speak", "listen", "both"]). + + + + Audio directions for RecordCall. These are exactly the strings the SWML record\_call verb accepts for direction; the values are emitted verbatim into the record\_call params (matching the Python reference's valid\_directions = \["speak", "listen", "both"]). + + + + Audio directions for RecordCall. These are exactly the strings the SWML record\_call verb accepts for direction; the values are emitted verbatim into the record\_call params (matching the Python reference's valid\_directions = \["speak", "listen", "both"]). + + + + Audio directions for Tap. These are exactly the strings the SWML tap verb accepts for direction; the values are emitted verbatim into the tap params (matching the Python reference's valid\_directions = \["speak", "hear", "both"]). + + + + Audio directions for Tap. These are exactly the strings the SWML tap verb accepts for direction; the values are emitted verbatim into the tap params (matching the Python reference's valid\_directions = \["speak", "hear", "both"]). + + + + Audio directions for Tap. These are exactly the strings the SWML tap verb accepts for direction; the values are emitted verbatim into the tap params (matching the Python reference's valid\_directions = \["speak", "hear", "both"]). + + +## Classes + + + + FunctionResult represents the response from a SWAIG tool handler. It contains a text response, optional actions, and post-processing control. All mutating methods return \*FunctionResult for method chaining. + + + + JoinConferenceOptions holds optional parameters for JoinConference beyond the required name. + + + + Params accumulates SWAIG tool-parameter properties and the top-level required list, then renders them into the exact map\[string]any / \[]string pair that agent.ToolDefinition.Parameters and .Required expect. + + + + PayOptions holds all optional parameters for the Pay method. + + + + Prop is a single JSON-Schema property under construction. It is produced by the kind constructors (PropString, PropArray, PropObject, …) for use as the item schema of Array, and is otherwise an internal detail of Params. Build it via the Prop\* constructors; the zero value is not usable. + + + + RecordCallOptions holds optional parameters for RecordCall beyond the required fields. + + + +## Functions + +### CodecValues + +CodecValues returns the Codec closed set as wire strings (PCMU, PCMA), suitable for Params.Enum / PropEnum / WithEnum. + +#### Signature + +```go +func CodecValues() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) + +Line 319. + +*** + +### CreatePaymentAction + +CreatePaymentAction creates a single payment action entry. + +#### Signature + +```go +func CreatePaymentAction(actionType string, phrase string) map[string]string +``` + +#### Parameters + + + + + +#### Returns + +`map[string]string` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 1037. + +*** + +### CreatePaymentParameter + +CreatePaymentParameter creates a payment parameter entry. + +#### Signature + +```go +func CreatePaymentParameter(name string, value string) map[string]string +``` + +#### Parameters + + + + + +#### Returns + +`map[string]string` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 1045. + +*** + +### CreatePaymentPrompt + +CreatePaymentPrompt creates a payment prompt configuration. cardType and errorType are optional; pass empty strings to omit them. This matches the Python SDK's create\_payment\_prompt() static method signature. + +#### Signature + +```go +func CreatePaymentPrompt( + forSituation string, + actions []map[string]string, + cardType string, + errorType string +) map[string]any +``` + +#### Parameters + + + + + + + + + +#### Returns + +`map[string]any` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 1022. + +*** + +### Default + +Default sets the property's JSON-Schema "default" keyword to v (emitted verbatim — pass the wire value). + +#### Signature + +```go +func Default(v any) PropOption +``` + +#### Parameters + + + +#### Returns + +`PropOption` + +#### Source + +[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) + +Line 103. + +*** + +### Format + +Format sets the property's JSON-Schema "format" keyword (e.g. "date", "date-time", "email"). + +#### Signature + +```go +func Format(format string) PropOption +``` + +#### Parameters + + + +#### Returns + +`PropOption` + +#### Source + +[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) + +Line 109. + +*** + +### NewFunctionResult + +NewFunctionResult creates a new FunctionResult with the given response text. + +#### Signature + +```go +func NewFunctionResult(response string) *FunctionResult +``` + +#### Parameters + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 25. + +*** + +### NewParams + +NewParams returns an empty parameter builder ready to accept property declarations. + +#### Signature + +```go +func NewParams() *Params +``` + +#### Returns + +`*Params` + +#### Source + +[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) + +Line 73. + +*** + +### PropArray + +PropArray returns an array-typed property whose elements match items. + +#### Signature + +```go +func PropArray(items *Prop, description string, opts ...PropOption) *Prop +``` + +#### Parameters + + + + + + + +#### Returns + +`*Prop` + +#### Source + +[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) + +Line 164. + +*** + +### PropBoolean + +PropBoolean returns a boolean-typed property. + +#### Signature + +```go +func PropBoolean(description string, opts ...PropOption) *Prop +``` + +#### Parameters + + + + + +#### Returns + +`*Prop` + +#### Source + +[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) + +Line 148. + +*** + +### PropEnum + +PropEnum returns a string-typed property constrained to the given closed set (JSON-Schema "enum"). values is typically one of RecordFormatValues(), RecordDirectionValues(), TapDirectionValues(), CodecValues(), or any caller list. + +#### Signature + +```go +func PropEnum(values []string, description string, opts ...PropOption) *Prop +``` + +#### Parameters + + + + + + + +#### Returns + +`*Prop` + +#### Source + +[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) + +Line 156. + +*** + +### PropInteger + +PropInteger returns an integer-typed property. + +#### Signature + +```go +func PropInteger(description string, opts ...PropOption) *Prop +``` + +#### Parameters + + + + + +#### Returns + +`*Prop` + +#### Source + +[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) + +Line 143. + +*** + +### PropNumber + +PropNumber returns a number-typed (floating-point) property. + +#### Signature + +```go +func PropNumber(description string, opts ...PropOption) *Prop +``` + +#### Parameters + + + + + +#### Returns + +`*Prop` + +#### Source + +[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) + +Line 138. + +*** + +### PropObject + +PropObject returns an object-typed property whose nested properties (and nested required list) come from nested. + +#### Signature + +```go +func PropObject(nested *Params, description string, opts ...PropOption) *Prop +``` + +#### Parameters + + + + + + + +#### Returns + +`*Prop` + +#### Source + +[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) + +Line 175. + +*** + +### PropString + +PropString returns a string-typed property with the given description. + +#### Signature + +```go +func PropString(description string, opts ...PropOption) *Prop +``` + +#### Parameters + + + + + +#### Returns + +`*Prop` + +#### Source + +[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) + +Line 133. + +*** + +### RecordDirectionValues + +RecordDirectionValues returns the RecordDirection closed set as wire strings (speak, listen, both), suitable for Params.Enum / PropEnum / WithEnum. + +#### Signature + +```go +func RecordDirectionValues() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) + +Line 307. + +*** + +### RecordFormatValues + +RecordFormatValues returns the RecordFormat closed set as wire strings (mp3, wav, mp4), suitable for Params.Enum / PropEnum / WithEnum. The values are derived from the typed constants, so adding a constant updates the list. + +#### Signature + +```go +func RecordFormatValues() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) + +Line 301. + +*** + +### Required + +Required marks the enclosing property as required. On a top-level Params property it adds the name to the schema's top-level required array; inside an Object it adds to that object's required array. This is the per-property alternative to Params.Required(names...). + +#### Signature + +```go +func Required() PropOption +``` + +#### Returns + +`PropOption` + +#### Source + +[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) + +Line 124. + +*** + +### TapDirectionValues + +TapDirectionValues returns the TapDirection closed set as wire strings (speak, hear, both), suitable for Params.Enum / PropEnum / WithEnum. + +#### Signature + +```go +func TapDirectionValues() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) + +Line 313. + +*** + +### WithEnum + +WithEnum constrains the property to the given closed set, setting the JSON-Schema "enum" keyword. Use it to attach an enum to a String/Integer/… property; the Enum kind constructor is the shorthand for a string enum. + +#### Signature + +```go +func WithEnum(values ...string) PropOption +``` + +#### Parameters + + + +#### Returns + +`PropOption` + +#### Source + +[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) + +Line 116. + +## Type Aliases + +### PropOption + +PropOption mutates a property's JSON-Schema object. Options are applied left to right after the kind and description are set, so a later option overrides an earlier one writing the same key. + +#### Signature + +```go +type PropOption alias +``` + +#### Source + +[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) + +Line 99. + +*** + +### ToolHandler + +ToolHandler is the function signature for SWAIG tool handlers. args contains the parsed function arguments, rawData contains the full request payload including global\_data, call\_id, etc. + +#### Signature + +```go +type ToolHandler alias +``` + +#### Source + +[`pkg/swaig/handler.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/handler.go) + +Line 6. + +## Enums + +### Codec + +Codec is the closed set of audio codecs accepted by FunctionResult.Tap's codec argument (the SWAIG tap media stream), as a defined string type with typed constants. It gives Go callers editor autocompletion plus call-site typo checking — a bare string like "PCUM" only fails downstream (the server rejects it), whereas a mistyped constant fails to compile. + +Because Go auto-converts untyped string-constant literals to a defined string type, every call site keeps working both ways: + +``` +fr.Tap("rtp://h:1", "id", swaig.TapDirectionBoth, swaig.CodecPCMA, 0, "") // typed const +fr.Tap("rtp://h:1", "id", "both", "PCMA", 0, "") // bare string still compiles +``` + +Codec is a string subtype, so the value written into the SWML tap params is byte-identical to the bare string the reference uses — parity with Python's tap(codec=...) keyword (a plain str). The enumerator emits the codec param as union\, so signature drift stays 0 against the reference's str (the string member absorbs). + +IMPORTANT: this 2-value SWAIG-tap set (\{PCMU, PCMA\}, validated at function\_result.py:1217) is DISTINCT from the larger RELAY connect/stream device codec superset (\{PCMU, PCMA, OPUS, G729, G722, VP8, H264, ...\}, comma-joinable). The relay codec is genuinely open/multi-value and is deliberately left a bare string (see PORT\_ADDITIONS / the journal §3) — this type must never be reused there. + +#### Signature + +```go +type Codec alias +``` + +#### Examples + + + + ```go + fr.Tap("rtp://h:1", "id", swaig.TapDirectionBoth, swaig.CodecPCMA, 0, "") // typed const + fr.Tap("rtp://h:1", "id", "both", "PCMA", 0, "") // bare string still compiles + ``` + + + + ```go + fr.Tap("rtp://h:1", "id", swaig.TapDirectionBoth, swaig.CodecPCMA, 0, "") // typed const + fr.Tap("rtp://h:1", "id", "both", "PCMA", 0, "") // bare string still compiles + ``` + + + +#### Source + +[`pkg/swaig/codec.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/codec.go) + +Line 27. + +*** + +### RecordDirection + +RecordDirection is the closed set of audio directions accepted by FunctionResult.RecordCall's direction argument, as a defined string type with typed constants. It gives Go callers editor autocompletion plus call-site typo checking — a bare string like "lisetn" only fails downstream (the server rejects it), whereas a mistyped constant fails to compile. + +Because Go auto-converts untyped string-constant literals to a defined string type, every call site keeps working both ways: + +``` +fr.RecordCall("id", true, swaig.FormatWAV, swaig.RecordDirectionListen, nil) // typed const +fr.RecordCall("id", true, swaig.FormatWAV, "listen", nil) // bare string still compiles +``` + +RecordDirection is a string subtype, so the value written into the SWML record\_call params is byte-identical to the bare string the reference uses — parity with Python's record\_call(direction=...) keyword (a plain str). The enumerator emits the direction param as union\, so signature drift stays 0 against the reference's str (the string member absorbs). + +IMPORTANT: this set (\{speak, listen, both\}) is DISTINCT from TapDirection (\{speak, hear, both\}) — record\_call uses "listen" where tap uses "hear". The Python reference validates the two with two different lists (function\_result.py:917 vs :1212), so they are modelled as two separate types and must never be unified. (And both differ again from the RELAY play/record/ tap direction vocabulary — three distinct vocabularies in all.) + +#### Signature + +```go +type RecordDirection alias +``` + +#### Examples + + + + ```go + fr.RecordCall("id", true, swaig.FormatWAV, swaig.RecordDirectionListen, nil) // typed const + fr.RecordCall("id", true, swaig.FormatWAV, "listen", nil) // bare string still compiles + ``` + + + + ```go + fr.RecordCall("id", true, swaig.FormatWAV, swaig.RecordDirectionListen, nil) // typed const + fr.RecordCall("id", true, swaig.FormatWAV, "listen", nil) // bare string still compiles + ``` + + + +#### Source + +[`pkg/swaig/record_direction.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/record_direction.go) + +Line 28. + +*** + +### RecordFormat + +RecordFormat is the closed set of call-recording container formats as a defined string type with typed constants. FunctionResult.RecordCall takes it for the format argument, giving Go callers editor autocompletion plus call-site typo checking — a bare string like "wvv" only fails downstream, whereas a mistyped constant fails to compile. + +Because Go auto-converts untyped string-constant literals to a defined string type, every call site keeps working both ways: + +``` +fr.RecordCall("id", true, swaig.FormatWAV, "both", nil) // typed const +fr.RecordCall("id", true, "wav", "both", nil) // bare string still compiles +``` + +RecordFormat is a string subtype, so the value written into the SWML record params is byte-identical to the bare string the reference uses — parity with Python's record\_call(format=...) keyword (a plain str). The enumerator emits it as union\, so signature drift stays 0 against the reference's str (the string member absorbs). + +#### Signature + +```go +type RecordFormat alias +``` + +#### Examples + + + + ```go + fr.RecordCall("id", true, swaig.FormatWAV, "both", nil) // typed const + fr.RecordCall("id", true, "wav", "both", nil) // bare string still compiles + ``` + + + + ```go + fr.RecordCall("id", true, swaig.FormatWAV, "both", nil) // typed const + fr.RecordCall("id", true, "wav", "both", nil) // bare string still compiles + ``` + + + +#### Source + +[`pkg/swaig/record_format.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/record_format.go) + +Line 20. + +*** + +### TapDirection + +TapDirection is the closed set of audio directions accepted by FunctionResult.Tap's direction argument, as a defined string type with typed constants. It gives Go callers editor autocompletion plus call-site typo checking — a bare string like "haer" only fails downstream (the server rejects it), whereas a mistyped constant fails to compile. + +Because Go auto-converts untyped string-constant literals to a defined string type, every call site keeps working both ways: + +``` +fr.Tap("rtp://h:1", "id", swaig.TapDirectionHear, swaig.CodecPCMU, 0, "") // typed const +fr.Tap("rtp://h:1", "id", "hear", "PCMU", 0, "") // bare string still compiles +``` + +TapDirection is a string subtype, so the value written into the SWML tap params is byte-identical to the bare string the reference uses — parity with Python's tap(direction=...) keyword (a plain str). The enumerator emits the direction param as union\, so signature drift stays 0 against the reference's str (the string member absorbs). + +IMPORTANT: this set (\{speak, hear, both\}) is DISTINCT from RecordDirection (\{speak, listen, both\}) — tap uses "hear" where record\_call uses "listen". The Python reference validates the two with two different lists (function\_result.py:1212 vs :917), so they are modelled as two separate types and must never be unified. (And both differ again from the RELAY play/record/ tap direction vocabulary — three distinct vocabularies in all.) + +#### Signature + +```go +type TapDirection alias +``` + +#### Examples + + + + ```go + fr.Tap("rtp://h:1", "id", swaig.TapDirectionHear, swaig.CodecPCMU, 0, "") // typed const + fr.Tap("rtp://h:1", "id", "hear", "PCMU", 0, "") // bare string still compiles + ``` + + + + ```go + fr.Tap("rtp://h:1", "id", swaig.TapDirectionHear, swaig.CodecPCMU, 0, "") // typed const + fr.Tap("rtp://h:1", "id", "hear", "PCMU", 0, "") // bare string still compiles + ``` + + + +#### Source + +[`pkg/swaig/tap_direction.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/tap_direction.go) + +Line 27. + +## Source + +[`pkg/swaig/codec.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/codec.go) diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig/join-conference-options/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig/join-conference-options/index.mdx new file mode 100644 index 0000000000..8fbe8c3242 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig/join-conference-options/index.mdx @@ -0,0 +1,99 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig/join-conference-options" +title: "JoinConferenceOptions" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/swaig.JoinConferenceOptions" + parent: "github.com/signalwire/signalwire-go/pkg/swaig" + module: "github.com.signalwire.signalwire-go.pkg.swaig" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go" +--- +# `JoinConferenceOptions` + +JoinConferenceOptions holds optional parameters for JoinConference beyond the required name. + +## Signature + +```go +type JoinConferenceOptions struct +``` + +## Properties + + + Beep controls beep behavior: "true" (default), "false", "onEnter", "onExit". + + + + Coach sets the SWML Call ID or CXML CallSid for coaching. + + + + EndOnExit controls whether the conference ends when this participant exits (default false). + + + + MaxParticipants sets the maximum number of participants (\<= 250). 0 uses server default. + + + + Muted joins the conference muted when true. + + + + Record sets the recording mode: "do-not-record" (default) or "record-from-start". + + + + RecordingStatusCallback is the URL for recording status callbacks. + + + + RecordingStatusCallbackEvent sets recording events to report. + + + + RecordingStatusCallbackMethod sets the HTTP method for recording callbacks ("GET" or "POST"). + + + + Region sets the conference region. + + + + Result sets switch-on-return-value behavior (object or array). + + + + StartOnEnter controls whether the conference starts when this participant enters (default true in Python). + + + + StatusCallback is the URL for status callbacks. + + + + StatusCallbackEvent specifies events to report (space-separated). + + + + StatusCallbackMethod sets the HTTP method for status callbacks ("GET" or "POST"). + + + + Trim controls silence trimming: "trim-silence" (default) or "do-not-trim". + + + + WaitURL is the SWML URL for hold music (replaces the old holdAudio parameter). + + +## Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 508. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig/params/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig/params/index.mdx new file mode 100644 index 0000000000..0d8340d621 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig/params/index.mdx @@ -0,0 +1,369 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig/params" +title: "Params" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/swaig.Params" + parent: "github.com/signalwire/signalwire-go/pkg/swaig" + module: "github.com.signalwire.signalwire-go.pkg.swaig" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go" +--- +# `Params` + +Params accumulates SWAIG tool-parameter properties and the top-level required list, then renders them into the exact map\[string]any / \[]string pair that agent.ToolDefinition.Parameters and .Required expect. + +The zero value is not usable; construct with NewParams. Methods return the receiver so calls chain fluently. Params is not safe for concurrent mutation (build it on one goroutine, then read it). + +## Signature + +```go +type Params struct +``` + +## Methods + +### Array + +Array adds an array-typed property named name whose elements match items. + +#### Signature + +```go +func (*Params) Array(name string, items *Prop, description string, opts ...PropOption) *Params +``` + +#### Parameters + + + + + + + + + +#### Returns + +`*Params` + +#### Source + +[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) + +Line 220. + +*** + +### Boolean + +Boolean adds a boolean-typed property named name. + +#### Signature + +```go +func (*Params) Boolean(name string, description string, opts ...PropOption) *Params +``` + +#### Parameters + + + + + + + +#### Returns + +`*Params` + +#### Source + +[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) + +Line 207. + +*** + +### Build + +Build renders both halves at once: the properties map (for ToolDefinition.Parameters) and the required list (for ToolDefinition.Required). It is sugar for (b.Properties(), b.RequiredNames()): + +``` +params, required := swaig.NewParams(). + String("service", "The service").Required("service").Build() +td := agent.ToolDefinition{Name: "x", Parameters: params, Required: required} +``` + +#### Signature + +```go +func (*Params) Build() (map[string]any, []string) +``` + +#### Returns + +`(map[string]any, []string)` + +#### Examples + + + + ```go + params, required := swaig.NewParams(). + String("service", "The service").Required("service").Build() + td := agent.ToolDefinition{Name: "x", Parameters: params, Required: required} + ``` + + + + ```go + params, required := swaig.NewParams(). + String("service", "The service").Required("service").Build() + td := agent.ToolDefinition{Name: "x", Parameters: params, Required: required} + ``` + + + +#### Source + +[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) + +Line 290. + +*** + +### Enum + +Enum adds a string-typed property named name constrained to the closed set values (JSON-Schema "enum"). Pass RecordFormatValues() / RecordDirectionValues() / TapDirectionValues() / CodecValues() to wire one of the Tier-1 typed enums, or any caller list. + +#### Signature + +```go +func (*Params) Enum(name string, values []string, description string, opts ...PropOption) *Params +``` + +#### Parameters + + + + + + + + + +#### Returns + +`*Params` + +#### Source + +[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) + +Line 215. + +*** + +### Integer + +Integer adds an integer-typed property named name. + +#### Signature + +```go +func (*Params) Integer(name string, description string, opts ...PropOption) *Params +``` + +#### Parameters + + + + + + + +#### Returns + +`*Params` + +#### Source + +[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) + +Line 202. + +*** + +### Number + +Number adds a number-typed (floating-point) property named name. + +#### Signature + +```go +func (*Params) Number(name string, description string, opts ...PropOption) *Params +``` + +#### Parameters + + + + + + + +#### Returns + +`*Params` + +#### Source + +[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) + +Line 197. + +*** + +### Object + +Object adds an object-typed property named name whose nested properties come from nested. + +#### Signature + +```go +func (*Params) Object(name string, nested *Params, description string, opts ...PropOption) *Params +``` + +#### Parameters + + + + + + + + + +#### Returns + +`*Params` + +#### Source + +[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) + +Line 226. + +*** + +### Properties + +Properties renders the accumulated properties as a JSON-Schema _properties_ map, assignable directly to agent.ToolDefinition.Parameters. The result is a fresh map on each call (callers may mutate it freely); it is byte-identical to the equivalent hand-written map\[string]any literal. + +A builder with no properties returns an empty (non-nil) map, so the caller can pass it straight through; assign nil explicitly if you want the "no schema" path (ToolDefinition omits the parameters block when Parameters is nil/empty). + +#### Signature + +```go +func (*Params) Properties() map[string]any +``` + +#### Returns + +`map[string]any` + +#### Source + +[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) + +Line 252. + +*** + +### Required + +Required marks one or more already-declared (or yet-to-be-declared) property names as required at the top level. Duplicate names are ignored; first-seen order is preserved. Returns the receiver for chaining. + +#### Signature + +```go +func (*Params) Required(names ...string) *Params +``` + +#### Parameters + + + +#### Returns + +`*Params` + +#### Source + +[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) + +Line 233. + +*** + +### RequiredNames + +RequiredNames returns the top-level required property names in first-seen order, assignable directly to agent.ToolDefinition.Required. It returns nil when nothing is required (matching a hand-written `Required: nil`); a fresh slice is returned on each call. + +(The fluent setter is Required(names ...string) \*Params; this getter is named RequiredNames so the two don't collide on the method set.) + +#### Signature + +```go +func (*Params) RequiredNames() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) + +Line 279. + +*** + +### String + +String adds a string-typed property named name. + +#### Signature + +```go +func (*Params) String(name string, description string, opts ...PropOption) *Params +``` + +#### Parameters + + + + + + + +#### Returns + +`*Params` + +#### Source + +[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) + +Line 192. + +## Source + +[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) + +Line 57. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig/pay-options/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig/pay-options/index.mdx new file mode 100644 index 0000000000..54dd8d944b --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig/pay-options/index.mdx @@ -0,0 +1,107 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig/pay-options" +title: "PayOptions" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/swaig.PayOptions" + parent: "github.com/signalwire/signalwire-go/pkg/swaig" + module: "github.com.signalwire.signalwire-go.pkg.swaig" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go" +--- +# `PayOptions` + +PayOptions holds all optional parameters for the Pay method. + +## Signature + +```go +type PayOptions struct +``` + +## Properties + + + AIResponse is the message set via the "set" verb that always precedes the pay verb; empty string uses the Python default status message. The set verb is always emitted (Python has no suppression path), matching pay()'s SWML. + + + + ChargeAmount is the amount to charge as a decimal string (e.g. "9.99"). + + + + Currency is the currency code. Defaults to "usd". + + + + Description is a custom payment description. + + + + InputMethod is the method to collect payment details ("dtmf" or "voice"). Defaults to "dtmf". + + + + Language is the language for prompts. Defaults to "en-US". + + + + MaxAttempts is the number of retry attempts. Defaults to 1. + + + + MinPostalCodeLength sets the minimum number of postal code digits. Defaults to 0. + + + + Parameters is an array of name/value pairs for the payment connector. + + + + PaymentMethod is the payment method type. Defaults to "credit-card". + + + + PostalCode controls whether to prompt for postal code, or supplies the actual code. String value is used as-is; bool true/false becomes "true"/"false". + + + + Prompts is an array of custom prompt configurations. + + + + SecurityCode controls whether to prompt for security code. Defaults to true. Use SecurityCodeSet to override; zero value (false) is treated as "not set". + + + + SecurityCodeSet must be true to explicitly set SecurityCode=false. + + + + StatusURL is the URL for payment status change notifications. + + + + Timeout is the seconds to wait for the next digit. Defaults to 5. + + + + TokenType is the payment token type: "one-time" or "reusable". Defaults to "reusable". + + + + ValidCardTypes is a space-separated list of card types. Defaults to "visa mastercard amex". + + + + Voice is the TTS voice to use. Defaults to "woman". + + +## Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 769. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig/prop/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig/prop/index.mdx new file mode 100644 index 0000000000..ecbeba7638 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig/prop/index.mdx @@ -0,0 +1,29 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig/prop" +title: "Prop" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/swaig.Prop" + parent: "github.com/signalwire/signalwire-go/pkg/swaig" + module: "github.com.signalwire.signalwire-go.pkg.swaig" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go" +--- +# `Prop` + +Prop is a single JSON-Schema property under construction. It is produced by the kind constructors (PropString, PropArray, PropObject, …) for use as the item schema of Array, and is otherwise an internal detail of Params. Build it via the Prop\* constructors; the zero value is not usable. + +## Signature + +```go +type Prop struct +``` + +## Source + +[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) + +Line 84. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig/record-call-options/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig/record-call-options/index.mdx new file mode 100644 index 0000000000..f95eaa0c12 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig/record-call-options/index.mdx @@ -0,0 +1,71 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig/record-call-options" +title: "RecordCallOptions" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/swaig.RecordCallOptions" + parent: "github.com/signalwire/signalwire-go/pkg/swaig" + module: "github.com.signalwire.signalwire-go.pkg.swaig" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go" +--- +# `RecordCallOptions` + +RecordCallOptions holds optional parameters for RecordCall beyond the required fields. + +## Signature + +```go +type RecordCallOptions struct +``` + +## Properties + + + Beep plays a beep before recording starts when true. Always emitted (Python emits beep unconditionally; default false). + + + + EndSilenceTimeout is seconds of silence before ending (voicemail-style). Negative value is omitted. + + + + EndSilenceTimeoutSet must be true for EndSilenceTimeout of 0.0 to be included. + + + + InitialTimeout is the time in seconds to wait for speech to start (voicemail-style). Negative value is omitted. + + + + InitialTimeoutSet must be true for InitialTimeout of 0.0 to be included. + + + + InputSensitivity sets the input sensitivity for recording. Always emitted (Python emits input\_sensitivity unconditionally; default 44.0). The Go zero value (0.0) is mapped to the Python default 44.0 — pass a non-zero value to override. + + + + MaxLength is the maximum recording length in seconds. Negative value is omitted. + + + + MaxLengthSet must be true for MaxLength of 0.0 to be included. + + + + StatusURL is the URL to send recording status events to. + + + + Terminators specifies digits that stop recording when pressed. + + +## Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 314. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/ai-verb-handler/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/ai-verb-handler/index.mdx new file mode 100644 index 0000000000..9f3e597b34 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/ai-verb-handler/index.mdx @@ -0,0 +1,132 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/ai-verb-handler" +title: "AIVerbHandler" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/swml.AIVerbHandler" + parent: "github.com/signalwire/signalwire-go/pkg/swml" + module: "github.com.signalwire.signalwire-go.pkg.swml" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/ai_verb_handler.go" +--- +# `AIVerbHandler` + +AIVerbHandler is a concrete VerbHandler for the SWML "ai" verb. + +It implements the VerbHandler interface and provides validation and configuration-building logic for the AI verb. This is the Go equivalent of the Python AIVerbHandler class in core/swml\_handler.py. + +The AI verb is complex and requires specialized handling, particularly for managing prompts, SWAIG functions, and AI configurations. + +## Signature + +```go +type AIVerbHandler struct +``` + +## Methods + +### BuildConfig + +BuildConfig assembles an AI verb configuration map from the provided params. + +Recognised keys in params (ported from Python AIVerbHandler.build\_config): + +- "prompt\_text" (string) — text prompt; mutually exclusive with "prompt\_pom" +- "prompt\_pom" (\[]any or similar) — POM structure; mutually exclusive with "prompt\_text" +- "contexts" (map\[string]any) — optional contexts / steps configuration +- "post\_prompt" (string) — optional post-prompt text; wrapped in \{"text": value\} +- "post\_prompt\_url" (string) — optional post-prompt URL +- "swaig" (map\[string]any) — optional SWAIG configuration; emitted as "SWAIG" + +Additional keys in params are handled as follows (matching Python \*\*kwargs logic): + +- "languages", "hints", "pronounce", "global\_data" — emitted as top-level keys. +- All other extra keys are collected under a nested "params" map. + +Returns (configMap, nil) on success, or (nil, error) if the parameters are contradictory (e.g. both prompt\_text and prompt\_pom supplied, or neither). + +#### Signature + +```go +func (*AIVerbHandler) BuildConfig(params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/swml/ai_verb_handler.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/ai_verb_handler.go) + +Line 112. + +*** + +### GetVerbName + +GetVerbName returns "ai", the name of the SWML verb this handler handles. + +#### Signature + +```go +func (*AIVerbHandler) GetVerbName() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/swml/ai_verb_handler.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/ai_verb_handler.go) + +Line 32. + +*** + +### ValidateConfig + +ValidateConfig validates the configuration map for the AI verb. + +Validation rules (ported from Python AIVerbHandler.validate\_config): + +- "prompt" key must be present and must be a map\[string]any. +- "prompt" must contain exactly one of "text" or "pom" (mutually exclusive). +- If "prompt.contexts" is present it must be a map\[string]any. +- If "SWAIG" is present it must be a map\[string]any. + +Returns (true, nil) when the config is valid; (false, errors) when it is not. + +#### Signature + +```go +func (*AIVerbHandler) ValidateConfig(config map[string]any) (bool, []string) +``` + +#### Parameters + + + +#### Returns + +`(bool, []string)` + +#### Source + +[`pkg/swml/ai_verb_handler.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/ai_verb_handler.go) + +Line 45. + +## Source + +[`pkg/swml/ai_verb_handler.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/ai_verb_handler.go) + +Line 20. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/document/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/document/index.mdx new file mode 100644 index 0000000000..399023e03c --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/document/index.mdx @@ -0,0 +1,277 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/document" +title: "Document" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/swml.Document" + parent: "github.com/signalwire/signalwire-go/pkg/swml" + module: "github.com.signalwire.signalwire-go.pkg.swml" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/document.go" +--- +# `Document` + +Document represents a complete SWML document with version and sections. + +## Signature + +```go +type Document struct +``` + +## Properties + + + + + +## Methods + +### AddSection + +AddSection creates a new named section in the document. Returns false if the section already exists. + +#### Signature + +```go +func (*Document) AddSection(name string) bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`pkg/swml/document.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/document.go) + +Line 46. + +*** + +### AddVerb + +AddVerb appends a verb to the "main" section. Returns an error if the verb name is empty. + +#### Signature + +```go +func (*Document) AddVerb(verbName string, config any) error +``` + +#### Parameters + + + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/document.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/document.go) + +Line 66. + +*** + +### AddVerbToSection + +AddVerbToSection appends a verb to a named section. Creates the section if it doesn't exist. + +#### Signature + +```go +func (*Document) AddVerbToSection(section string, verbName string, config any) error +``` + +#### Parameters + + + + + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/document.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/document.go) + +Line 72. + +*** + +### GetVerbs + +GetVerbs returns the verbs in a named section. Returns nil if the section doesn't exist. + +#### Signature + +```go +func (*Document) GetVerbs(section string) []Verb +``` + +#### Parameters + + + +#### Returns + +`[]Verb` + +#### Source + +[`pkg/swml/document.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/document.go) + +Line 88. + +*** + +### HasSection + +HasSection returns whether a section exists in the document. + +#### Signature + +```go +func (*Document) HasSection(name string) bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`pkg/swml/document.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/document.go) + +Line 57. + +*** + +### MarshalJSON + +MarshalJSON implements the json.Marshaler interface. + +#### Signature + +```go +func (*Document) MarshalJSON() ([]byte, error) +``` + +#### Returns + +`([]byte, error)` + +#### Source + +[`pkg/swml/document.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/document.go) + +Line 139. + +*** + +### Render + +Render serializes the document to a JSON string. + +#### Signature + +```go +func (*Document) Render() (string, error) +``` + +#### Returns + +`(string, error)` + +#### Source + +[`pkg/swml/document.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/document.go) + +Line 121. + +*** + +### RenderPretty + +RenderPretty serializes the document to an indented JSON string. + +#### Signature + +```go +func (*Document) RenderPretty() (string, error) +``` + +#### Returns + +`(string, error)` + +#### Source + +[`pkg/swml/document.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/document.go) + +Line 130. + +*** + +### Reset + +Reset clears all sections and recreates the default "main" section. + +#### Signature + +```go +func (*Document) Reset() +``` + +#### Source + +[`pkg/swml/document.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/document.go) + +Line 36. + +*** + +### ToMap + +ToMap returns the document as a nested map suitable for JSON serialization. + +#### Signature + +```go +func (*Document) ToMap() map[string]any +``` + +#### Returns + +`map[string]any` + +#### Source + +[`pkg/swml/document.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/document.go) + +Line 101. + +## Source + +[`pkg/swml/document.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/document.go) + +Line 15. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/index.mdx new file mode 100644 index 0000000000..3c0378bdbb --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/index.mdx @@ -0,0 +1,999 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml" +title: "swml" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "module" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/swml" + module: "github.com.signalwire.signalwire-go.pkg.swml" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/ai_verb_handler.go" +--- +# `swml` + +Package swml provides the SWML (SignalWire Markup Language) document model, builder, and rendering for the SignalWire AI platform. + +SWML documents define call flows, AI agent behavior, and telephony operations. The SignalWire platform fetches SWML from agents and executes it. + +Package swml — URL validation utility to prevent SSRF attacks. Ported from signalwire/utils/url\_validator.py. + +## Signature + +```go +package swml +``` + +## Constants + + + + + + + + + + + +## Classes + + + + AIVerbHandler is a concrete VerbHandler for the SWML "ai" verb. + + + + Document represents a complete SWML document with version and sections. + + + + Schema holds the parsed SWML schema and provides verb metadata. + + + + SchemaUtils is the Go port of signalwire.utils.schema\_utils.SchemaUtils. + + + + SchemaValidationError is the canonical error type raised when SWML schema validation fails. Mirrors Python's SchemaValidationError. + + + + SecurityConfig bundles configuration for all supported authentication methods: HTTP Basic Auth, Bearer token, and API key. Pass it to WithSecurityConfig to configure multiple auth methods in one call. + + + + Service is the base SWML service that manages documents, HTTP endpoints, and auth. It provides auto-vivified verb methods driven by the SWML schema. + + + + ToolDefinition is a SWAIG tool registered on the Service. + + + + ValidationResult mirrors Python's “Tuple\[bool, List\[str]]“ return shape used by ValidateVerb / ValidateDocument. + + + + VerbInfo holds metadata about a SWML verb extracted from the schema. + + + +## Functions + +### ExtractSIPUsername + +ExtractSIPUsername extracts a SIP username from a request body. + +#### Signature + +```go +func ExtractSIPUsername(body map[string]any) string +``` + +#### Parameters + + + +#### Returns + +`string` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 1049. + +*** + +### GetExecutionMode + +GetExecutionMode inspects the process environment and returns the detected runtime mode. The detection order matches the Python and TypeScript SDKs so that the same env vars resolve to the same mode across languages. + +Detection order: + +1. CGI (GATEWAY\_INTERFACE) +2. AWS Lambda (AWS\_LAMBDA\_FUNCTION\_NAME or LAMBDA\_TASK\_ROOT) +3. GCF (FUNCTION\_TARGET, K\_SERVICE, or GOOGLE\_CLOUD\_PROJECT) +4. Azure (AZURE\_FUNCTIONS\_ENVIRONMENT, FUNCTIONS\_WORKER\_RUNTIME, or AzureWebJobsStorage) +5. Server (default fallback) + +#### Signature + +```go +func GetExecutionMode() ExecutionMode +``` + +#### Returns + +`ExecutionMode` + +#### Source + +[`pkg/swml/execution_mode.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/execution_mode.go) + +Line 40. + +*** + +### GetSchema + +GetSchema returns the global singleton Schema loaded from the embedded schema.json. + +#### Signature + +```go +func GetSchema() (*Schema, error) +``` + +#### Returns + +`(*Schema, error)` + +#### Source + +[`pkg/swml/schema.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema.go) + +Line 42. + +*** + +### IsServerlessMode + +IsServerlessMode reports whether the process is running in any serverless environment (i.e. NOT in plain long-running server mode). + +Mirrors Python's is\_serverless\_mode(): + +``` +def is_serverless_mode() -> bool: + return get_execution_mode() != 'server' +``` + +#### Signature + +```go +func IsServerlessMode() bool +``` + +#### Returns + +`bool` + +#### Examples + + + + ```go + def is_serverless_mode() -> bool: + return get_execution_mode() != 'server' + ``` + + + + ```go + def is_serverless_mode() -> bool: + return get_execution_mode() != 'server' + ``` + + + +#### Source + +[`pkg/swml/execution_mode.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/execution_mode.go) + +Line 67. + +*** + +### LoadSchemaFromFile + +LoadSchemaFromFile loads a SWML schema from the given file path instead of the embedded schema.json. Mirrors Python's schema\_path constructor param. + +#### Signature + +```go +func LoadSchemaFromFile(path string) (*Schema, error) +``` + +#### Parameters + + + +#### Returns + +`(*Schema, error)` + +#### Source + +[`pkg/swml/schema.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema.go) + +Line 163. + +*** + +### NewAIVerbHandler + +NewAIVerbHandler returns a new AIVerbHandler ready for registration. + +Example: + +``` +svc.RegisterVerbHandler(swml.NewAIVerbHandler()) +``` + +#### Signature + +```go +func NewAIVerbHandler() *AIVerbHandler +``` + +#### Returns + +`*AIVerbHandler` + +#### Examples + + + + ```go + svc.RegisterVerbHandler(swml.NewAIVerbHandler()) + ``` + + + + ```go + svc.RegisterVerbHandler(swml.NewAIVerbHandler()) + ``` + + + +#### Source + +[`pkg/swml/ai_verb_handler.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/ai_verb_handler.go) + +Line 27. + +*** + +### NewDocument + +NewDocument creates a new empty SWML document with default version. + +#### Signature + +```go +func NewDocument() *Document +``` + +#### Returns + +`*Document` + +#### Source + +[`pkg/swml/document.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/document.go) + +Line 26. + +*** + +### NewSchemaUtils + +NewSchemaUtils constructs a SchemaUtils. Mirrors Python's “SchemaUtils(schema\_path, schema\_validation=True)“. + +Pass schemaPath="" to use the embedded schema.json bundled with the SDK. schemaValidation=false disables validation; the env var SWML\_SKIP\_SCHEMA\_VALIDATION=1/true/yes also disables it. + +#### Signature + +```go +func NewSchemaUtils(schemaPath string, schemaValidation bool) *SchemaUtils +``` + +#### Parameters + + + + + +#### Returns + +`*SchemaUtils` + +#### Source + +[`pkg/swml/schema_utils.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema_utils.go) + +Line 88. + +*** + +### NewSchemaValidationError + +NewSchemaValidationError constructs a SchemaValidationError. Mirrors Python's SchemaValidationError.**init**(verb\_name, errors). + +#### Signature + +```go +func NewSchemaValidationError(verbName string, errors []string) *SchemaValidationError +``` + +#### Parameters + + + + + +#### Returns + +`*SchemaValidationError` + +#### Source + +[`pkg/swml/schema_utils.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema_utils.go) + +Line 36. + +*** + +### NewService + +NewService creates a new SWML service with the given options. + +#### Signature + +```go +func NewService(opts ...ServiceOption) *Service +``` + +#### Parameters + + + +#### Returns + +`*Service` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 285. + +*** + +### ValidateURL + +ValidateURL reports whether rawURL is safe to fetch (i.e. does not point to a private or internal resource). It returns an error describing why the URL was rejected, or nil if the URL is acceptable. + +Behavior mirrors Python's validate\_url(url, allow\_private=False): + +- Only http and https schemes are accepted. +- A non-empty hostname is required. +- When allowPrivate is false AND the SWML\_ALLOW\_PRIVATE\_URLS env var is not set to "1", "true", or "yes" (case-insensitive), every IP address that the hostname resolves to is checked against the nine blocked CIDR ranges above. If any resolved IP falls in a blocked range the URL is rejected. + +Go idiom: returns (bool, error) instead of a bare bool so callers can log or propagate the rejection reason. Returning (false, nil) never happens — err is always non-nil when the bool is false. + +#### Signature + +```go +func ValidateURL(rawURL string, allowPrivate bool) (bool, error) +``` + +#### Parameters + + + + + +#### Returns + +`(bool, error)` + +#### Source + +[`pkg/swml/url_validator.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/url_validator.go) + +Line 73. + +*** + +### WithAPIKey + +WithAPIKey configures API key authentication. When set, the withSecurity middleware accepts requests where the header named by header equals key. header is the HTTP header name (e.g. "X-API-Key"); pass an empty string to use the default "X-API-Key". Mirrors Python's SecurityConfig.api\_key / api\_key\_header fields and the AuthHandler verify\_api\_key / flask\_decorator behaviour. + +#### Signature + +```go +func WithAPIKey(key string, header string) ServiceOption +``` + +#### Parameters + + + + + +#### Returns + +`ServiceOption` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 184. + +*** + +### WithBasicAuth + +WithBasicAuth sets explicit basic auth credentials. + +#### Signature + +```go +func WithBasicAuth(user string, password string) ServiceOption +``` + +#### Parameters + + + + + +#### Returns + +`ServiceOption` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 161. + +*** + +### WithBearerToken + +WithBearerToken configures Bearer token authentication. When set, the withSecurity middleware accepts requests carrying an "Authorization: Bearer \" header that matches token in addition to (or instead of) Basic Auth. Mirrors Python's SecurityConfig.bearer\_token field and the AuthHandler verify\_bearer\_token / flask\_decorator behaviour. + +#### Signature + +```go +func WithBearerToken(token string) ServiceOption +``` + +#### Parameters + + + +#### Returns + +`ServiceOption` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 174. + +*** + +### WithConfigFile + +WithConfigFile loads a YAML configuration file and applies its `security` section to the Service. Mirrors Python's SecurityConfig(config\_file=...) loader (signalwire/core/security\_config.py \_load\_config\_file). The expected schema is: + +``` +security: + ssl_cert_path: /path/to/cert.pem + ssl_key_path: /path/to/key.pem + domain: example.com + auth: + basic: + user: alice + password: secret + bearer_token: + api_key: + api_key_header: X-API-Key +``` + +Settings from the file are applied AFTER the explicit WithBasicAuth / WithBearerToken / WithAPIKey / WithTLS / WithDomain options, so config-file values take precedence (matching Python's documented load order). If the file cannot be read or parsed, NewService logs a warning and keeps running with the previously-set values; this matches Python's "best-effort" load behaviour and avoids crashing services whose config is missing. + +#### Signature + +```go +func WithConfigFile(path string) ServiceOption +``` + +#### Parameters + + + +#### Returns + +`ServiceOption` + +#### Examples + + + + ```go + security: + ssl_cert_path: /path/to/cert.pem + ssl_key_path: /path/to/key.pem + domain: example.com + auth: + basic: + user: alice + password: secret + bearer_token: + api_key: + api_key_header: X-API-Key + ``` + + + + ```go + security: + ssl_cert_path: /path/to/cert.pem + ssl_key_path: /path/to/key.pem + domain: example.com + auth: + basic: + user: alice + password: secret + bearer_token: + api_key: + api_key_header: X-API-Key + ``` + + + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 267. + +*** + +### WithDomain + +WithDomain sets the domain name used in URL generation when TLS is enabled. Mirrors Python's SecurityConfig.domain / SWML\_DOMAIN env var. + +#### Signature + +```go +func WithDomain(domain string) ServiceOption +``` + +#### Parameters + + + +#### Returns + +`ServiceOption` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 232. + +*** + +### WithHost + +WithHost sets the HTTP server bind host. + +#### Signature + +```go +func WithHost(host string) ServiceOption +``` + +#### Parameters + + + +#### Returns + +`ServiceOption` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 151. + +*** + +### WithName + +WithName sets the service name. + +#### Signature + +```go +func WithName(name string) ServiceOption +``` + +#### Parameters + + + +#### Returns + +`ServiceOption` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 141. + +*** + +### WithPort + +WithPort sets the HTTP server port. + +#### Signature + +```go +func WithPort(port int) ServiceOption +``` + +#### Parameters + + + +#### Returns + +`ServiceOption` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 156. + +*** + +### WithRoute + +WithRoute sets the HTTP route path. + +#### Signature + +```go +func WithRoute(route string) ServiceOption +``` + +#### Parameters + + + +#### Returns + +`ServiceOption` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 146. + +*** + +### WithSchemaPath + +WithSchemaPath overrides the schema file path used for verb validation. By default the embedded schema.json is used. Pass a custom path when testing or when deploying a modified schema alongside your binary. Mirrors Python's schema\_path constructor parameter. + +#### Signature + +```go +func WithSchemaPath(path string) ServiceOption +``` + +#### Parameters + + + +#### Returns + +`ServiceOption` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 240. + +*** + +### WithSchemaValidation + +WithSchemaValidation enables or disables SWML schema validation. Defaults to true (validation on). Set to false, or export SWML\_SKIP\_SCHEMA\_VALIDATION=1, to bypass schema checks. Mirrors Python's schema\_validation constructor parameter. + +#### Signature + +```go +func WithSchemaValidation(enabled bool) ServiceOption +``` + +#### Parameters + + + +#### Returns + +`ServiceOption` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 280. + +*** + +### WithSecurityConfig + +WithSecurityConfig applies a SecurityConfig bundle, setting Basic Auth, Bearer token, and API key configuration in one call. This is the Go equivalent of Python's AuthHandler(security\_config=...) pattern: it maps each SecurityConfig field to the corresponding WithXxx option. + +#### Signature + +```go +func WithSecurityConfig(cfg SecurityConfig) ServiceOption +``` + +#### Parameters + + + +#### Returns + +`ServiceOption` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 198. + +*** + +### WithTLS + +WithTLS configures TLS for the service. When set, Serve() calls ListenAndServeTLS instead of ListenAndServe. Mirrors Python's ssl\_cert / ssl\_key serve() parameters and ssl\_enabled property. + +#### Signature + +```go +func WithTLS(certFile string, keyFile string) ServiceOption +``` + +#### Parameters + + + + + +#### Returns + +`ServiceOption` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 223. + +## Type Aliases + +### RoutingCallback + +RoutingCallback is a function called on incoming requests to customize responses. It receives the request and request body, and returns an optional SWML JSON override. If it returns nil, the default document is used. + +#### Signature + +```go +type RoutingCallback alias +``` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 37. + +*** + +### ServiceOption + +ServiceOption is a functional option for configuring a Service. + +#### Signature + +```go +type ServiceOption alias +``` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 138. + +*** + +### ToolHandler + +ToolHandler is the function signature for a registered SWAIG tool. Returns a result that will be JSON-encoded as the SWAIG response. + +#### Signature + +```go +type ToolHandler alias +``` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 23. + +*** + +### Verb + +Verb represents a single SWML verb (instruction) as a key-value pair. Example: \{"play": \{"url": "https://example.com/audio.mp3"\}\} + +#### Signature + +```go +type Verb alias +``` + +#### Source + +[`pkg/swml/document.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/document.go) + +Line 23. + +## Interfaces + +### VerbHandler + +VerbHandler defines the contract for specialized SWML verb handlers. + +Implementations provide verb-specific validation and configuration-building logic for complex SWML verbs that cannot be handled generically. This is the Go equivalent of the Python SWMLVerbHandler abstract base class. + +#### Signature + +```go +type VerbHandler interface { GetVerbName; ValidateConfig; BuildConfig } +``` + +#### Methods + +##### BuildConfig + +BuildConfig builds a configuration map for this verb from the provided + +parameters. + +params contains keyword arguments specific to this verb, mirroring the +\*\*kwargs pattern from Python. It returns the constructed configuration +map, or an error if the provided parameters are insufficient or +contradictory. + +###### Signature + +```go +BuildConfig(params map[string]any) (map[string]any, error) +``` + +###### Source + +[`pkg/swml/verb_handler.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/verb_handler.go) + +Line 38. + +*** + +##### GetVerbName + +GetVerbName returns the name of the SWML verb this handler handles. + +The returned name must match the verb name used in SWML documents +(e.g., "ai", "play", "record"). + +###### Signature + +```go +GetVerbName() string +``` + +###### Source + +[`pkg/swml/verb_handler.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/verb_handler.go) + +Line 20. + +*** + +##### ValidateConfig + +ValidateConfig validates the configuration map for this verb. + +config is the configuration dictionary for this verb. It returns +(isValid, errorMessages): isValid is true when the config passes all +validation checks, and errorMessages contains human-readable descriptions +of any validation failures. When isValid is true, errorMessages will be +empty. + +###### Signature + +```go +ValidateConfig(config map[string]any) (bool, []string) +``` + +###### Source + +[`pkg/swml/verb_handler.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/verb_handler.go) + +Line 29. + +#### Source + +[`pkg/swml/verb_handler.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/verb_handler.go) + +Line 15. + +## Enums + +### ExecutionMode + +ExecutionMode identifies the runtime environment the service is executing in. The value is used to adjust URL construction, request parsing, and auth handling for platforms that do not provide a traditional TCP listener. + +#### Signature + +```go +type ExecutionMode alias +``` + +#### Source + +[`pkg/swml/execution_mode.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/execution_mode.go) + +Line 8. + +## Source + +[`pkg/swml/ai_verb_handler.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/ai_verb_handler.go) diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/schema-utils/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/schema-utils/index.mdx new file mode 100644 index 0000000000..f53884abfe --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/schema-utils/index.mdx @@ -0,0 +1,289 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/schema-utils" +title: "SchemaUtils" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/swml.SchemaUtils" + parent: "github.com/signalwire/signalwire-go/pkg/swml" + module: "github.com.signalwire.signalwire-go.pkg.swml" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema_utils.go" +--- +# `SchemaUtils` + +SchemaUtils is the Go port of signalwire.utils.schema\_utils.SchemaUtils. + +Construction rules: + +- schemaPath empty + SWML\_SKIP\_SCHEMA\_VALIDATION unset → load embedded. +- schemaPath set → load from file. +- schemaValidation=false OR SWML\_SKIP\_SCHEMA\_VALIDATION=1 → no full validator (lightweight required-property check still runs). + +## Signature + +```go +type SchemaUtils struct +``` + +## Methods + +### FullValidationAvailable + +FullValidationAvailable reports whether the full JSON Schema validator is wired up. Mirrors Python's full\_validation\_available. + +#### Signature + +```go +func (*SchemaUtils) FullValidationAvailable() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/swml/schema_utils.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema_utils.go) + +Line 199. + +*** + +### GenerateMethodBody + +GenerateMethodBody renders a Python-style method body for a verb. Mirrors Python's “generate\_method\_body(verb\_name)“. + +#### Signature + +```go +func (*SchemaUtils) GenerateMethodBody(verbName string) string +``` + +#### Parameters + + + +#### Returns + +`string` + +#### Source + +[`pkg/swml/schema_utils.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema_utils.go) + +Line 358. + +*** + +### GenerateMethodSignature + +GenerateMethodSignature renders a Python-style method signature for a verb — used by code-gen tooling. Mirrors Python's “generate\_method\_signature(verb\_name)“. + +#### Signature + +```go +func (*SchemaUtils) GenerateMethodSignature(verbName string) string +``` + +#### Parameters + + + +#### Returns + +`string` + +#### Source + +[`pkg/swml/schema_utils.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema_utils.go) + +Line 317. + +*** + +### GetAllVerbNames + +GetAllVerbNames returns the sorted list of all known verb names. Mirrors Python's “get\_all\_verb\_names()“. + +#### Signature + +```go +func (*SchemaUtils) GetAllVerbNames() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/swml/schema_utils.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema_utils.go) + +Line 205. + +*** + +### GetVerbParameters + +GetVerbParameters returns the parameter-definition block used for codegen — verb\_props\["properties"]. Mirrors Python's “get\_verb\_parameters(verb\_name)“. + +#### Signature + +```go +func (*SchemaUtils) GetVerbParameters(verbName string) map[string]any +``` + +#### Parameters + + + +#### Returns + +`map[string]any` + +#### Source + +[`pkg/swml/schema_utils.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema_utils.go) + +Line 253. + +*** + +### GetVerbProperties + +GetVerbProperties returns the inner “properties\[verb\_name]“ block for a verb, or an empty map when the verb is unknown. Mirrors Python's “get\_verb\_properties(verb\_name)“. + +#### Signature + +```go +func (*SchemaUtils) GetVerbProperties(verbName string) map[string]any +``` + +#### Parameters + + + +#### Returns + +`map[string]any` + +#### Source + +[`pkg/swml/schema_utils.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema_utils.go) + +Line 217. + +*** + +### GetVerbRequiredProperties + +GetVerbRequiredProperties returns the “required“ list for a verb. Mirrors Python's “get\_verb\_required\_properties(verb\_name)“. + +#### Signature + +```go +func (*SchemaUtils) GetVerbRequiredProperties(verbName string) []string +``` + +#### Parameters + + + +#### Returns + +`[]string` + +#### Source + +[`pkg/swml/schema_utils.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema_utils.go) + +Line 235. + +*** + +### LoadSchema + +LoadSchema reads and parses the JSON Schema. Mirrors Python's “load\_schema()“. + +#### Signature + +```go +func (*SchemaUtils) LoadSchema() map[string]any +``` + +#### Returns + +`map[string]any` + +#### Source + +[`pkg/swml/schema_utils.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema_utils.go) + +Line 113. + +*** + +### ValidateDocument + +ValidateDocument validates a complete SWML document against the schema. Mirrors Python's “validate\_document(document)“. + +When the full validator is unavailable Python returns “(False, \["Schema validator not initialized"])“; the Go port matches that contract bit-for-bit. + +#### Signature + +```go +func (*SchemaUtils) ValidateDocument(document map[string]any) ValidationResult +``` + +#### Parameters + + + +#### Returns + +`ValidationResult` + +#### Source + +[`pkg/swml/schema_utils.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema_utils.go) + +Line 306. + +*** + +### ValidateVerb + +ValidateVerb validates a verb config against the schema. Mirrors Python's “validate\_verb(verb\_name, verb\_config)“. + +When validation is disabled returns Valid=true. When the verb name is unknown returns Valid=false with a single "Unknown verb" error. Otherwise runs the full validator if available, falling back to the lightweight required-property check. + +#### Signature + +```go +func (*SchemaUtils) ValidateVerb(verbName string, verbConfig map[string]any) ValidationResult +``` + +#### Parameters + + + + + +#### Returns + +`ValidationResult` + +#### Source + +[`pkg/swml/schema_utils.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema_utils.go) + +Line 269. + +## Source + +[`pkg/swml/schema_utils.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema_utils.go) + +Line 65. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/schema-validation-error/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/schema-validation-error/index.mdx new file mode 100644 index 0000000000..bb934605a4 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/schema-validation-error/index.mdx @@ -0,0 +1,57 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/schema-validation-error" +title: "SchemaValidationError" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/swml.SchemaValidationError" + parent: "github.com/signalwire/signalwire-go/pkg/swml" + module: "github.com.signalwire.signalwire-go.pkg.swml" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema_utils.go" +--- +# `SchemaValidationError` + +SchemaValidationError is the canonical error type raised when SWML schema validation fails. Mirrors Python's SchemaValidationError. + +## Signature + +```go +type SchemaValidationError struct +``` + +## Properties + + + + + +## Methods + +### Error + +Error renders the validation failure as a single string. + +#### Signature + +```go +func (*SchemaValidationError) Error() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/swml/schema_utils.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema_utils.go) + +Line 41. + +## Source + +[`pkg/swml/schema_utils.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema_utils.go) + +Line 29. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/schema/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/schema/index.mdx new file mode 100644 index 0000000000..e57b02963e --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/schema/index.mdx @@ -0,0 +1,125 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/schema" +title: "Schema" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/swml.Schema" + parent: "github.com/signalwire/signalwire-go/pkg/swml" + module: "github.com.signalwire.signalwire-go.pkg.swml" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema.go" +--- +# `Schema` + +Schema holds the parsed SWML schema and provides verb metadata. + +## Signature + +```go +type Schema struct +``` + +## Methods + +### GetAllVerbNames + +GetAllVerbNames returns all known verb names (the actual SWML names, not schema names). + +#### Signature + +```go +func (*Schema) GetAllVerbNames() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/swml/schema.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema.go) + +Line 136. + +*** + +### GetVerb + +GetVerb returns metadata for a verb by its actual name (e.g., "sip\_refer"). + +#### Signature + +```go +func (*Schema) GetVerb(name string) (*VerbInfo, bool) +``` + +#### Parameters + + + +#### Returns + +`(*VerbInfo, bool)` + +#### Source + +[`pkg/swml/schema.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema.go) + +Line 128. + +*** + +### IsValidVerb + +IsValidVerb returns whether a name is a recognized SWML verb. + +#### Signature + +```go +func (*Schema) IsValidVerb(name string) bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`pkg/swml/schema.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema.go) + +Line 147. + +*** + +### VerbCount + +VerbCount returns the number of verbs in the schema. + +#### Signature + +```go +func (*Schema) VerbCount() int +``` + +#### Returns + +`int` + +#### Source + +[`pkg/swml/schema.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema.go) + +Line 155. + +## Source + +[`pkg/swml/schema.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema.go) + +Line 29. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/security-config/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/security-config/index.mdx new file mode 100644 index 0000000000..57dd7f446c --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/security-config/index.mdx @@ -0,0 +1,52 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/security-config" +title: "SecurityConfig" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/swml.SecurityConfig" + parent: "github.com/signalwire/signalwire-go/pkg/swml" + module: "github.com.signalwire.signalwire-go.pkg.swml" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go" +--- +# `SecurityConfig` + +SecurityConfig bundles configuration for all supported authentication methods: HTTP Basic Auth, Bearer token, and API key. Pass it to WithSecurityConfig to configure multiple auth methods in one call. + +Fields default to the zero value (disabled). Set only the fields you need. + +- BasicAuthUser / BasicAuthPassword — HTTP Basic Auth credentials. +- BearerToken — Expected value of the "Authorization: Bearer \" header. +- APIKey — Expected API key value. +- APIKeyHeader — Header name to read the API key from (default "X-API-Key"). + +Mirrors Python's SecurityConfig dataclass. + +## Signature + +```go +type SecurityConfig struct +``` + +## Properties + + + + + defaults to "X-API-Key" when APIKey is set + + + + + + + + +## Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 53. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/service/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/service/index.mdx new file mode 100644 index 0000000000..ff77044009 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/service/index.mdx @@ -0,0 +1,2010 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/service" +title: "Service" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/swml.Service" + parent: "github.com/signalwire/signalwire-go/pkg/swml" + module: "github.com.signalwire.signalwire-go.pkg.swml" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go" +--- +# `Service` + +Service is the base SWML service that manages documents, HTTP endpoints, and auth. It provides auto-vivified verb methods driven by the SWML schema. + +## Signature + +```go +type Service struct +``` + +## Properties + + + Domain for TLS certificates and URL generation (SWML\_DOMAIN env var) + + + + + + + + + + + + +## Methods + +### AddSection + +AddSection adds a new named section to the SWML document. Returns false if the section already exists. Delegates to Document.AddSection. Mirrors Python's add\_section method which was only on the Document in Go but is on SWMLService in Python. + +#### Signature + +```go +func (*Service) AddSection(name string) bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 565. + +*** + +### AI + +AI adds the ai verb. AgentBase overrides this with its own AI rendering. promptText and promptPOM are mutually exclusive; providing both is an error. promptText sets a plain-text prompt; promptPOM sets a structured POM prompt. postPrompt and postPromptURL configure post-prompt behavior (optional). swaig supplies SWAIG configuration (optional). extra is a map of additional AI parameters merged into the verb config (optional). Mirrors Python SWMLBuilder.ai(prompt\_text, prompt\_pom, post\_prompt, post\_prompt\_url, swaig, \*\*kwargs). + +#### Signature + +```go +func (*Service) AI( + promptText *string, + promptPOM []map[string]any, + postPrompt *string, + postPromptURL *string, + swaig map[string]any, + extra map[string]any +) error +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 762. + +*** + +### AmazonBedrock + +AmazonBedrock adds the amazon\_bedrock verb. + +#### Signature + +```go +func (*Service) AmazonBedrock(config map[string]any) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 792. + +*** + +### Answer + +Answer adds the answer verb to the document. maxDuration sets the maximum call duration in seconds (optional). codecs sets a comma-separated list of allowed codecs (optional). Mirrors Python SWMLBuilder.answer(max\_duration, codecs). + +#### Signature + +```go +func (*Service) Answer(maxDuration *int, codecs *string) error +``` + +#### Parameters + + + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 637. + +*** + +### AsRouter + +AsRouter returns an http.Handler that serves this service's endpoints. Use this to embed the service in a custom HTTP mux or router. Mirrors Python's as\_router() -> APIRouter method on SWMLService. + +#### Signature + +```go +func (*Service) AsRouter() http.Handler +``` + +#### Returns + +`http.Handler` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 572. + +*** + +### BuildSwaigListToolsPayload + +BuildSwaigListToolsPayload returns the JSON payload that --example mode expects between the sentinel markers: \{"tools": \[\]\}. Each element echoes whatever the in-memory ToolDefinition stores (name, description, parameters); we deliberately do not normalize so the CLI can be permissive about field names. + +Exposed for tests so the env-var-driven exit branch in Serve() can be asserted without forking a process. + +#### Signature + +```go +func (*Service) BuildSwaigListToolsPayload() ([]byte, error) +``` + +#### Returns + +`([]byte, error)` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 1117. + +*** + +### Cond + +Cond adds the cond verb (conditional logic). + +#### Signature + +```go +func (*Service) Cond(config map[string]any) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 797. + +*** + +### Connect + +Connect adds the connect verb. + +#### Signature + +```go +func (*Service) Connect(config map[string]any) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 726. + +*** + +### DefineTool + +DefineTool registers a SWAIG function the AI can call. Tool descriptions and parameter descriptions are LLM-facing prompt engineering — see PORTING\_GUIDE for guidance. + +#### Signature + +```go +func (*Service) DefineTool(td *ToolDefinition) *Service +``` + +#### Parameters + + + +#### Returns + +`*Service` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 1261. + +*** + +### Denoise + +Denoise adds the denoise verb. + +#### Signature + +```go +func (*Service) Denoise(config map[string]any) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 852. + +*** + +### DetectMachine + +DetectMachine adds the detect\_machine verb. + +#### Signature + +```go +func (*Service) DetectMachine(config map[string]any) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 892. + +*** + +### EnterQueue + +EnterQueue adds the enter\_queue verb. + +#### Signature + +```go +func (*Service) EnterQueue(config map[string]any) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 877. + +*** + +### Execute + +Execute adds the execute verb (run another SWML section). + +#### Signature + +```go +func (*Service) Execute(config map[string]any) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 807. + +*** + +### ExecuteVerb + +ExecuteVerb adds any SWML verb to the document, validated against the schema and any registered VerbHandler. This is the core method that all verb convenience methods delegate to. For most verbs, config should be a map\[string]any of verb parameters. For "sleep", config should be an integer (milliseconds). + +#### Signature + +```go +func (*Service) ExecuteVerb(verbName string, config any) error +``` + +#### Parameters + + + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 592. + +*** + +### ExecuteVerbToSection + +ExecuteVerbToSection adds a SWML verb to a named section. + +#### Signature + +```go +func (*Service) ExecuteVerbToSection(section string, verbName string, config any) error +``` + +#### Parameters + + + + + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 611. + +*** + +### FullValidationEnabled + +FullValidationEnabled reports whether schema validation is active. Returns true when a schema was successfully loaded and schemaValidation is on. Mirrors Python's full\_validation\_enabled property. + +#### Signature + +```go +func (*Service) FullValidationEnabled() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 555. + +*** + +### GetAuthInfo + +GetAuthInfo returns a map describing every configured authentication method. The map mirrors the Python AuthHandler.get\_auth\_info() return value: + +- "basic" → \{"enabled": true, "username": "\"\} +- "bearer" → \{"enabled": true, "hint": "Use Authorization: Bearer \"\} +- "api\_key" → \{"enabled": true, "header": "\", "hint": "Use \: \"\} + +Only methods that are actively configured appear in the map. Basic auth is always present because the service always has a username/password (either explicit or auto-generated). Mirrors Python AuthHandler.get\_auth\_info() -> Dict\[str, Any]. + +#### Signature + +```go +func (*Service) GetAuthInfo() map[string]any +``` + +#### Returns + +`map[string]any` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 513. + +*** + +### GetBasicAuthCredentials + +GetBasicAuthCredentials returns the (username, password) for basic auth. + +#### Signature + +```go +func (*Service) GetBasicAuthCredentials() (string, string) +``` + +#### Returns + +`(string, string)` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 428. + +*** + +### GetBasicAuthCredentialsWithSource + +GetBasicAuthCredentialsWithSource returns (username, password, source) where source is one of "environment", "explicit", or "auto-generated". Mirrors Python's get\_basic\_auth\_credentials(include\_source=True) three-tuple return. + +#### Signature + +```go +func (*Service) GetBasicAuthCredentialsWithSource() (string, string, string) +``` + +#### Returns + +`(string, string, string)` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 435. + +*** + +### GetDocument + +GetDocument returns the current SWML document. + +#### Signature + +```go +func (*Service) GetDocument() *Document +``` + +#### Returns + +`*Document` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 407. + +*** + +### GetFullURL + +GetFullURL returns the full URL for this service including auth. + +Base URL resolution order: + +1. SWML\_PROXY\_URL\_BASE (explicit proxy override — always wins) +2. Platform-specific base derived from GetExecutionMode() when running inside a serverless runtime (currently AWS Lambda) +3. Local http://host:port base (default server mode) + +In every branch the agent's Route is appended to the base. Callers that need to serve SWAIG / post\_prompt endpoints then append further path segments onto the result. This invariant is load-bearing: a Lambda-hosted agent at route "/my-agent" must emit SWAIG URLs like "https://xxx.lambda-url.us-east-1.on.aws/my-agent/swaig" — NOT "https://xxx.lambda-url.us-east-1.on.aws/swaig". See buildWebhookURL in pkg/agent/agent.go for the defensive HasSuffix re-check that enforces the same property downstream. + +#### Signature + +```go +func (*Service) GetFullURL(includeAuth bool) string +``` + +#### Parameters + + + +#### Returns + +`string` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 929. + +*** + +### GetVerbHandler + +GetVerbHandler returns the registered handler for verbName, or nil if no handler has been registered for that verb. This is the Go equivalent of Python's VerbHandlerRegistry.get\_handler. + +#### Signature + +```go +func (*Service) GetVerbHandler(verbName string) VerbHandler +``` + +#### Parameters + + + +#### Returns + +`VerbHandler` + +#### Source + +[`pkg/swml/verb_handler.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/verb_handler.go) + +Line 57. + +*** + +### Goto + +Goto adds the goto verb. + +#### Signature + +```go +func (*Service) Goto(config map[string]any) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 817. + +*** + +### Hangup + +Hangup adds the hangup verb. reason is an optional reason string for the hangup. Mirrors Python SWMLBuilder.hangup(reason). + +#### Signature + +```go +func (*Service) Hangup(reason *string) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 651. + +*** + +### HasTool + +HasTool reports whether a tool with the given name has been registered. + +#### Signature + +```go +func (*Service) HasTool(name string) bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 1315. + +*** + +### HasVerbHandler + +HasVerbHandler reports whether a custom handler is registered for verbName. This is the Go equivalent of Python's VerbHandlerRegistry.has\_handler. + +#### Signature + +```go +func (*Service) HasVerbHandler(verbName string) bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`pkg/swml/verb_handler.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/verb_handler.go) + +Line 65. + +*** + +### JoinConference + +JoinConference adds the join\_conference verb. + +#### Signature + +```go +func (*Service) JoinConference(config map[string]any) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 867. + +*** + +### JoinRoom + +JoinRoom adds the join\_room verb. + +#### Signature + +```go +func (*Service) JoinRoom(config map[string]any) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 862. + +*** + +### Label + +Label adds the label verb. + +#### Signature + +```go +func (*Service) Label(config map[string]any) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 822. + +*** + +### ListToolNames + +ListToolNames returns the registered tool names in insertion order. + +#### Signature + +```go +func (*Service) ListToolNames() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 1323. + +*** + +### LiveTranscribe + +LiveTranscribe adds the live\_transcribe verb. + +#### Signature + +```go +func (*Service) LiveTranscribe(config map[string]any) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 897. + +*** + +### LiveTranslate + +LiveTranslate adds the live\_translate verb. + +#### Signature + +```go +func (*Service) LiveTranslate(config map[string]any) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 902. + +*** + +### ManualSetProxyUrl + +ManualSetProxyUrl overrides the proxy URL base used for URL generation. Call this at runtime to set or update the proxy URL (e.g. an ngrok URL). Mirrors Python's manual\_set\_proxy\_url(proxy\_url: str) on SWMLService. + +#### Signature + +```go +func (*Service) ManualSetProxyUrl(url string) +``` + +#### Parameters + + + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 579. + +*** + +### OnFunctionCall + +OnFunctionCall dispatches a function call to the registered handler. Default implementation: looks up the tool in the registry and invokes its handler. Subclasses (AgentBase) may override at the type level by providing their own method (Go method dispatch is static — to override in a way that is callable through Service, use the SwaigPreDispatch extension hook to substitute a target). + +#### Signature + +```go +func (*Service) OnFunctionCall(name string, args map[string]any, rawData map[string]any) any +``` + +#### Parameters + + + + + + + +#### Returns + +`any` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 1304. + +*** + +### OnRequest + +OnRequest generates the SWML response for an incoming request. It checks routing callbacks first, then returns the default document. + +The return value is a pointer to allow subclasses (AgentBase) to signal "no override" by returning nil — matching Python's Optional\[dict] return type for on\_request. Callers should treat a nil return as "use the default document unchanged". + +#### Signature + +```go +func (*Service) OnRequest(requestData map[string]any, callbackPath string) map[string]any +``` + +#### Parameters + + + + + +#### Returns + +`map[string]any` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 1021. + +*** + +### Pay + +Pay adds the pay verb. + +#### Signature + +```go +func (*Service) Pay(config map[string]any) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 887. + +*** + +### Play + +Play adds the play verb. Exactly one of url or urls must be provided; providing both is an error. volume sets the playback volume (-40 to 40, optional). sayVoice, sayLanguage, sayGender configure text-to-speech (optional). autoAnswer controls whether to auto-answer the call (optional). Mirrors Python SWMLBuilder.play(url, urls, volume, say\_voice, say\_language, say\_gender, auto\_answer). + +#### Signature + +```go +func (*Service) Play( + url *string, + urls []string, + volume *float64, + sayVoice *string, + sayLanguage *string, + sayGender *string, + autoAnswer *bool +) error +``` + +#### Parameters + + + + + + + + + + + + + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 665. + +*** + +### Prompt + +Prompt adds the prompt verb. + +#### Signature + +```go +func (*Service) Prompt(config map[string]any) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 872. + +*** + +### ReceiveFax + +ReceiveFax adds the receive\_fax verb. + +#### Signature + +```go +func (*Service) ReceiveFax(config map[string]any) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 746. + +*** + +### Record + +Record adds the record verb. + +#### Signature + +```go +func (*Service) Record(config map[string]any) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 706. + +*** + +### RecordCall + +RecordCall adds the record\_call verb. + +#### Signature + +```go +func (*Service) RecordCall(config map[string]any) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 711. + +*** + +### RegisterAdditionalRoutes + +RegisterAdditionalRoutes is an extension hook for subclasses (e.g. AgentBase) to mount additional routes (/post\_prompt, /mcp). Default no-op. Composing types call this from their own buildMux equivalent. + +#### Signature + +```go +func (*Service) RegisterAdditionalRoutes(mux *http.ServeMux) +``` + +#### Parameters + + + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 1252. + +*** + +### RegisterRoutingCallback + +RegisterRoutingCallback registers a callback for a specific path. + +#### Signature + +```go +func (*Service) RegisterRoutingCallback(path string, cb RoutingCallback) +``` + +#### Parameters + + + + + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 986. + +*** + +### RegisterSwaigFunction + +RegisterSwaigFunction registers a raw SWAIG function definition (e.g. DataMap tools that have no local handler). The map must contain a "function" key giving the tool name. + +#### Signature + +```go +func (*Service) RegisterSwaigFunction(funcDef map[string]any) *Service +``` + +#### Parameters + + + +#### Returns + +`*Service` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 1277. + +*** + +### RegisterVerbHandler + +RegisterVerbHandler registers a custom handler for a SWML verb, keyed by the name returned by h.GetVerbName(). A subsequent call with the same verb name replaces the previous handler. This is the Go equivalent of Python's VerbHandlerRegistry.register\_handler. + +#### Signature + +```go +func (*Service) RegisterVerbHandler(h VerbHandler) +``` + +#### Parameters + + + +#### Source + +[`pkg/swml/verb_handler.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/verb_handler.go) + +Line 45. + +*** + +### Render + +Render returns the SWML document as a JSON string. + +#### Signature + +```go +func (*Service) Render() (string, error) +``` + +#### Returns + +`(string, error)` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 1039. + +*** + +### RenderMainSwml + +RenderMainSwml is an extension hook invoked for the main route and for GET /swaig. Default returns the currently-built document. AgentBase overrides to render with prompts + dynamic config. + +#### Signature + +```go +func (*Service) RenderMainSwml(r *http.Request) map[string]any +``` + +#### Parameters + + + +#### Returns + +`map[string]any` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 1343. + +*** + +### RenderPretty + +RenderPretty returns the SWML document as an indented JSON string. + +#### Signature + +```go +func (*Service) RenderPretty() (string, error) +``` + +#### Returns + +`(string, error)` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 1044. + +*** + +### Request + +Request adds the request verb (HTTP request). + +#### Signature + +```go +func (*Service) Request(config map[string]any) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 882. + +*** + +### ResetDocument + +ResetDocument resets the SWML document to empty. + +#### Signature + +```go +func (*Service) ResetDocument() +``` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 414. + +*** + +### Return + +Return adds the return verb. + +#### Signature + +```go +func (*Service) Return(config map[string]any) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 812. + +*** + +### RoutingCallbackPaths + +RoutingCallbackPaths returns the paths that have routing callbacks registered. Callers use this to register corresponding HTTP endpoints (mirrors Python web\_mixin.py line 428 which iterates self.\_routing\_callbacks to register callback endpoints on the router). Paths are returned in sorted order for deterministic HTTP registration. + +#### Signature + +```go +func (*Service) RoutingCallbackPaths() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 997. + +*** + +### Say + +Say adds a play verb with a "say:" prefix for text-to-speech. voice, language, and gender configure the TTS voice (optional). volume sets the playback volume (-40 to 40, optional). Mirrors Python SWMLBuilder.say(text, voice, language, gender, volume). + +#### Signature + +```go +func (*Service) Say( + text string, + voice *string, + language *string, + gender *string, + volume *float64 +) error +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 700. + +*** + +### SchemaUtils + +SchemaUtils returns the SchemaUtils helper bound to this Service. Mirrors Python's “self.schema\_utils“ instance attribute exposed publicly on signalwire.core.swml\_service.SWMLService. + +#### Signature + +```go +func (*Service) SchemaUtils() *SchemaUtils +``` + +#### Returns + +`*SchemaUtils` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 423. + +*** + +### SendDigits + +SendDigits adds the send\_digits verb. + +#### Signature + +```go +func (*Service) SendDigits(config map[string]any) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 731. + +*** + +### SendFax + +SendFax adds the send\_fax verb. + +#### Signature + +```go +func (*Service) SendFax(config map[string]any) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 741. + +*** + +### SendSMS + +SendSMS adds the send\_sms verb. + +#### Signature + +```go +func (*Service) SendSMS(config map[string]any) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 736. + +*** + +### Serve + +Serve starts the HTTP server. This is a blocking call. + +When TLS is configured via WithTLS (or SWML\_SSL\_CERT\_PATH / SWML\_SSL\_KEY\_PATH env vars), ListenAndServeTLS is called automatically. Mirrors Python's serve() ssl\_cert / ssl\_key / ssl\_enabled parameter support. + +If SWAIG\_LIST\_TOOLS is set in the environment, Serve() does NOT bind a port; instead it prints the registered tool registry sandwiched by **SWAIG\_TOOLS\_BEGIN** / **SWAIG\_TOOLS\_END** sentinels to stdout and exits 0. This is how `swaig-test --example NAME` introspects a SWMLService-only binary without HTTP-walking rendered SWML. + +#### Signature + +```go +func (*Service) Serve() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 1170. + +*** + +### Set + +Set adds the set verb (set variables). + +#### Signature + +```go +func (*Service) Set(config map[string]any) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 827. + +*** + +### SIPRefer + +SIPRefer adds the sip\_refer verb. + +#### Signature + +```go +func (*Service) SIPRefer(config map[string]any) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 751. + +*** + +### Sleep + +Sleep adds the sleep verb. Duration is in milliseconds. + +#### Signature + +```go +func (*Service) Sleep(duration int) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 721. + +*** + +### Stop + +Stop gracefully stops the HTTP server. + +#### Signature + +```go +func (*Service) Stop() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 1207. + +*** + +### StopDenoise + +StopDenoise adds the stop\_denoise verb. + +#### Signature + +```go +func (*Service) StopDenoise(config map[string]any) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 857. + +*** + +### StopRecordCall + +StopRecordCall adds the stop\_record\_call verb. + +#### Signature + +```go +func (*Service) StopRecordCall(config map[string]any) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 716. + +*** + +### StopTap + +StopTap adds the stop\_tap verb. + +#### Signature + +```go +func (*Service) StopTap(config map[string]any) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 847. + +*** + +### SwaigPreDispatch + +SwaigPreDispatch is an extension hook invoked between argument parsing and function dispatch on POST /swaig. It returns a target Service to dispatch on (defaults to s) and an optional short-circuit response. Subclasses (AgentBase) override to add session-token validation or ephemeral dynamic-config copies. + +#### Signature + +```go +func (*Service) SwaigPreDispatch(requestData map[string]any, funcName string) (target *Service, shortCircuit map[string]any) +``` + +#### Parameters + + + + + +#### Returns + +`(*Service, map[string]any)` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 1336. + +*** + +### Switch + +Switch adds the switch verb. + +#### Signature + +```go +func (*Service) Switch(config map[string]any) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 802. + +*** + +### Tap + +Tap adds the tap verb (media tapping). + +#### Signature + +```go +func (*Service) Tap(config map[string]any) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 842. + +*** + +### TLSEnabled + +TLSEnabled reports whether TLS is configured for this service. Mirrors Python's ssl\_enabled property on SWMLService. + +#### Signature + +```go +func (*Service) TLSEnabled() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 548. + +*** + +### Transfer + +Transfer adds the transfer verb. + +#### Signature + +```go +func (*Service) Transfer(config map[string]any) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 837. + +*** + +### Unset + +Unset adds the unset verb. + +#### Signature + +```go +func (*Service) Unset(config map[string]any) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 832. + +*** + +### UserEvent + +UserEvent adds the user\_event verb. + +#### Signature + +```go +func (*Service) UserEvent(config map[string]any) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 907. + +*** + +### VerifyAPIKey + +VerifyAPIKey performs a timing-safe comparison of the supplied key value against the service's configured API key. Returns false when no API key is configured (i.e. WithAPIKey was not called). + +Callers typically read the key from the header returned by APIKeyHeader(). Mirrors Python AuthHandler.verify\_api\_key(api\_key: str) -> bool. + +#### Signature + +```go +func (*Service) VerifyAPIKey(key string) bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 493. + +*** + +### VerifyBasicAuth + +VerifyBasicAuth performs a timing-safe comparison of the supplied credentials against the service's configured basic auth username and password. Returns true when both username and password match. + +This exposes the same check that withSecurity applies inside the HTTP middleware, making auth testable in isolation without an HTTP round-trip. Mirrors Python AuthHandler.verify\_basic\_auth(credentials) -> bool using secrets.compare\_digest (equivalent: crypto/subtle.ConstantTimeCompare). + +#### Signature + +```go +func (*Service) VerifyBasicAuth(username string, password string) bool +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 462. + +*** + +### VerifyBearerToken + +VerifyBearerToken performs a timing-safe comparison of the supplied token against the service's configured bearer token. Returns false when no bearer token is configured (i.e. WithBearerToken was not called). + +Callers typically extract the token from the "Authorization: Bearer \" header before calling this method. Mirrors Python AuthHandler.verify\_bearer\_token(credentials) -> bool. + +#### Signature + +```go +func (*Service) VerifyBearerToken(token string) bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 478. + +## Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 63. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/tool-definition/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/tool-definition/index.mdx new file mode 100644 index 0000000000..6dbbbc0413 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/tool-definition/index.mdx @@ -0,0 +1,41 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/tool-definition" +title: "ToolDefinition" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/swml.ToolDefinition" + parent: "github.com/signalwire/signalwire-go/pkg/swml" + module: "github.com.signalwire.signalwire-go.pkg.swml" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go" +--- +# `ToolDefinition` + +ToolDefinition is a SWAIG tool registered on the Service. + +## Signature + +```go +type ToolDefinition struct +``` + +## Properties + + + + + + + + + + + +## Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 26. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/validation-result/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/validation-result/index.mdx new file mode 100644 index 0000000000..07c0d1a937 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/validation-result/index.mdx @@ -0,0 +1,37 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/validation-result" +title: "ValidationResult" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/swml.ValidationResult" + parent: "github.com/signalwire/signalwire-go/pkg/swml" + module: "github.com.signalwire.signalwire-go.pkg.swml" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema_utils.go" +--- +# `ValidationResult` + +ValidationResult mirrors Python's “Tuple\[bool, List\[str]]“ return shape used by ValidateVerb / ValidateDocument. + +The cross-language type alias table maps this struct to the canonical “tuple\>“ so audits accept it as Python-shaped. + +## Signature + +```go +type ValidationResult struct +``` + +## Properties + + + + + +## Source + +[`pkg/swml/schema_utils.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema_utils.go) + +Line 53. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/verb-info/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/verb-info/index.mdx new file mode 100644 index 0000000000..99b039be93 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/verb-info/index.mdx @@ -0,0 +1,43 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/verb-info" +title: "VerbInfo" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/swml.VerbInfo" + parent: "github.com/signalwire/signalwire-go/pkg/swml" + module: "github.com.signalwire.signalwire-go.pkg.swml" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema.go" +--- +# `VerbInfo` + +VerbInfo holds metadata about a SWML verb extracted from the schema. + +## Signature + +```go +type VerbInfo struct +``` + +## Properties + + + Definition is the raw schema definition for this verb + + + + Name is the actual SWML verb name (e.g., "sip\_refer", "ai", "play") + + + + SchemaName is the PascalCase name from the schema definition (e.g., "SIPRefer", "AI", "Play") + + +## Source + +[`pkg/swml/schema.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema.go) + +Line 19. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/util/util/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/util/util/index.mdx new file mode 100644 index 0000000000..0495755434 --- /dev/null +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/util/util/index.mdx @@ -0,0 +1,119 @@ +--- +slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/util/util" +title: "util" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "module" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/util" + module: "github.com.signalwire.signalwire-go.pkg.util" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/util/execution_mode.go" +--- +# `util` + +Package util provides cross-cutting helpers used across the Go SDK. + +validate\_url is the SSRF-prevention guard applied to user-supplied URLs before they are fetched. It must mirror the Python reference at signalwire.utils.url\_validator.validate\_url: + +- require http or https scheme +- require a hostname +- allow\_private bypass (param OR SWML\_ALLOW\_PRIVATE\_URLS env var) +- resolve hostname; reject any IP that lands in a blocked network + +The blocked-network list is identical across all SDK ports. + +## Signature + +```go +package util +``` + +## Functions + +### GetExecutionMode + +GetExecutionMode reports the SDK's deployment environment based on well-known environment variables. Returned values are: "cgi", "lambda", "google\_cloud\_function", "azure\_function", "server". + +#### Signature + +```go +func GetExecutionMode() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/util/execution_mode.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/util/execution_mode.go) + +Line 26. + +*** + +### IsServerlessMode + +IsServerlessMode reports whether the SDK is running in any serverless invocation environment (i.e. not "server"). + +#### Signature + +```go +func IsServerlessMode() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/util/execution_mode.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/util/execution_mode.go) + +Line 48. + +*** + +### ValidateURL + +ValidateURL reports whether the supplied URL is safe to fetch. + +Mirrors Python's validate\_url(url, allow\_private=False) -> bool. Returns false (without raising) for any of: + +- parse failure +- scheme not http/https +- missing hostname +- DNS resolution failure +- any resolved IP in a blocked network + +When allowPrivate is true, or the SWML\_ALLOW\_PRIVATE\_URLS env var is set to "1", "true" or "yes" (case-insensitive), the IP-blocklist check is skipped. Scheme + hostname checks still apply. + +This function is projected onto the Python free function name validate\_url via internal/surface/tables.go. + +#### Signature + +```go +func ValidateURL(url_ string, allowPrivate bool) bool +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`pkg/util/url_validator.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/util/url_validator.go) + +Line 73. + +## Source + +[`pkg/util/execution_mode.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/util/execution_mode.go) diff --git a/fern/products/sdk-reference/go/index.mdx b/fern/products/sdk-reference/go/index.mdx new file mode 100644 index 0000000000..f3221ad465 --- /dev/null +++ b/fern/products/sdk-reference/go/index.mdx @@ -0,0 +1,31 @@ +--- +title: "Go SDK" +slug: "/reference/go" +lustri: + auto_generated: true + language: "go" + kind: "sdk" +--- +# Go SDK Reference + +## Modules + +- [`agent`](/docs/sdk-reference/reference/go/github.com/signalwire/signalwire-go/pkg/agent/agent) +- [`builtin`](/docs/sdk-reference/reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin) +- [`contexts`](/docs/sdk-reference/reference/go/github.com/signalwire/signalwire-go/pkg/contexts/contexts) +- [`lambda`](/docs/sdk-reference/reference/go/github.com/signalwire/signalwire-go/pkg/lambda/lambda) +- [`livewire`](/docs/sdk-reference/reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire) +- [`logging`](/docs/sdk-reference/reference/go/github.com/signalwire/signalwire-go/pkg/logging/logging) +- [`main`](/docs/sdk-reference/reference/go/github.com/signalwire/signalwire-go/cmd/swaig-test/main) +- [`namespaces`](/docs/sdk-reference/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces) +- [`pom`](/docs/sdk-reference/reference/go/github.com/signalwire/signalwire-go/pkg/pom/pom) +- [`prefabs`](/docs/sdk-reference/reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs) +- [`relay`](/docs/sdk-reference/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay) +- [`rest`](/docs/sdk-reference/reference/go/github.com/signalwire/signalwire-go/pkg/rest/rest) +- [`security`](/docs/sdk-reference/reference/go/github.com/signalwire/signalwire-go/pkg/security/security) +- [`server`](/docs/sdk-reference/reference/go/github.com/signalwire/signalwire-go/pkg/server/server) +- [`skills`](/docs/sdk-reference/reference/go/github.com/signalwire/signalwire-go/pkg/skills/skills) +- [`swaig`](/docs/sdk-reference/reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig) +- [`swml`](/docs/sdk-reference/reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml) +- [`util`](/docs/sdk-reference/reference/go/github.com/signalwire/signalwire-go/pkg/util/util) + diff --git a/fern/products/sdk-reference/java/_meta.json b/fern/products/sdk-reference/java/_meta.json new file mode 100644 index 0000000000..680209bf83 --- /dev/null +++ b/fern/products/sdk-reference/java/_meta.json @@ -0,0 +1,10 @@ +{ + "language": "java", + "sdk_name": "java-sdk", + "version": null, + "source_repo": "https://github.com/signalwire/signalwire-java", + "format": "mdx", + "platform": "fern", + "base_slug": "/reference/java", + "item_count": 1906 +} \ No newline at end of file diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/agent/agent/agent-base/builder/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/agent/agent/agent-base/builder/index.mdx new file mode 100644 index 0000000000..b38f9490fc --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/agent/agent/agent-base/builder/index.mdx @@ -0,0 +1,466 @@ +--- +slug: "/reference/java/com/signalwire/sdk/agent/agent/agent-base/builder" +title: "Builder" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.agent.AgentBase.Builder" + parent: "com.signalwire.sdk.agent.AgentBase" + module: "com.signalwire.sdk.agent" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java" + visibility: "public" +--- +# `Builder` + +**Modifiers:** `static` + +## Signature + +```java +public static class Builder +``` + +## Methods + +### \ + +#### Signature + +```java +public () +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +*** + +### authPassword + +#### Signature + +```java +public Builder authPassword(String password) +``` + +#### Parameters + + + +#### Returns + +`Builder` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 202. + +*** + +### authUser + +#### Signature + +```java +public Builder authUser(String user) +``` + +#### Parameters + + + +#### Returns + +`Builder` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 201. + +*** + +### autoAnswer + +#### Signature + +```java +public Builder autoAnswer(boolean autoAnswer) +``` + +#### Parameters + + + +#### Returns + +`Builder` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 189. + +*** + +### build + +#### Signature + +```java +public AgentBase build() +``` + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 265. + +*** + +### envProvider + +Supply an alternative `EnvProvider` for the build-time env +var reads (`SWML_BASIC_AUTH_USER`, `SWML_BASIC_AUTH_PASSWORD`, +`SWML_PROXY_URL_BASE`). + +<p>Primarily for the --simulate-serverless +harness, which needs to mask the real process env with simulated +values without mutating `System#getenv()` (which Java does +not support). + +Pass `null` to fall back to the real process +env (the default). + +#### Signature + +```java +public Builder envProvider(EnvProvider env) +``` + +#### Parameters + + + environment source. + + +#### Returns + +`Builder` — this builder. + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 260. + +*** + +### host + +#### Signature + +```java +public Builder host(String host) +``` + +#### Parameters + + + +#### Returns + +`Builder` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 187. + +*** + +### maxDuration + +#### Signature + +```java +public Builder maxDuration(int maxDuration) +``` + +#### Parameters + + + +#### Returns + +`Builder` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 190. + +*** + +### name + +#### Signature + +```java +public Builder name(String name) +``` + +#### Parameters + + + +#### Returns + +`Builder` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 181. + +*** + +### port + +#### Signature + +```java +public Builder port(int port) +``` + +#### Parameters + + + +#### Returns + +`Builder` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 188. + +*** + +### recordCall + +#### Signature + +```java +public Builder recordCall(boolean recordCall) +``` + +#### Parameters + + + +#### Returns + +`Builder` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 191. + +*** + +### recordFormat + +Typed overload of `#recordFormat(String)`. + +Accepts a +`RecordFormat` so a misspelled container format fails at compile +time instead of being rejected by the server. Delegates to the string +path via `RecordFormat#getValue()`, so wire behavior is identical. + +#### Signature + + + + ```java + public Builder recordFormat(String format) + ``` + + + + ```java + public Builder recordFormat(RecordFormat format) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`Builder` + +#### Returns (Overload 2) + +`Builder` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 192. + +*** + +### recordStereo + +#### Signature + +```java +public Builder recordStereo(boolean stereo) +``` + +#### Parameters + + + +#### Returns + +`Builder` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 200. + +*** + +### route + +#### Signature + +```java +public Builder route(String route) +``` + +#### Parameters + + + +#### Returns + +`Builder` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 182. + +*** + +### signingKey + +Configure the customer's SignalWire Signing Key from the Dashboard +(API Credentials → Signing Key). + +When set, the agent enforces +webhook signature validation on POST `/`, `/swaig`, +and `/post_prompt` — unsigned or invalidly-signed requests +are rejected with HTTP 403. + +<p>Resolution order at `#build()` time: +<ol> + <li>Explicit `signingKey(...)` on the builder.</li> + <li>`SIGNALWIRE_SIGNING_KEY` environment variable.</li> + <li>Unset → validation disabled, with a startup warning.</li> +</ol> + +#### Signature + +```java +public Builder signingKey(String key) +``` + +#### Parameters + + + the Signing Key. Pass `null` to fall through to env-var resolution. + + +#### Returns + +`Builder` — this builder. + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 226. + +*** + +### trustProxyForSignature + +When set to `true`, the webhook URL reconstruction honors +`X-Forwarded-Proto` / `X-Forwarded-Host` headers +during signature validation. + +Default `false` — proxy +headers are spoofable, so opt in only when you control the +proxy chain. + +#### Signature + +```java +public Builder trustProxyForSignature(boolean trust) +``` + +#### Parameters + + + whether to trust proxy headers. + + +#### Returns + +`Builder` — this builder. + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 241. + +## Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 164. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/agent/agent/agent-base/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/agent/agent/agent-base/index.mdx new file mode 100644 index 0000000000..84e82ec267 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/agent/agent/agent-base/index.mdx @@ -0,0 +1,2993 @@ +--- +slug: "/reference/java/com/signalwire/sdk/agent/agent/agent-base" +title: "AgentBase" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.agent.AgentBase" + parent: "com.signalwire.sdk.agent" + module: "com.signalwire.sdk.agent" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java" + visibility: "public" +--- +# `AgentBase` + +Base class for all SignalWire AI agents. +Composes prompt management, tool registration, AI config, HTTP serving, +skills integration, and SWML rendering. + +Use the builder pattern: + +<pre> +var agent = AgentBase.builder() + .name("my-agent") + .route("/") + .port(3000) + .build(); +</pre> + +## Signature + +```java +public class AgentBase extends Service +``` + +## Inheritance + +**Extends:** [Service](/docs/sdk-reference/reference/java/com/signalwire/sdk/swml/swml/service) + +## Constants + + + The complete set of internal SWAIG function names that accept fillers, matching the SWAIGInternalFiller schema definition. \

Any name outside this set is silently ignored by the runtime — \`#setInternalFillersMap(java.util.Map)\` and String, java.util.List) warn if you pass an unknown name. \

Notable absences: \`change\_step\`, \`gather\_submit\`, or arbitrary user-defined SWAIG function names are NOT supported. + + +## Classes + + + + + +## Methods + +### addAnswerVerb + +#### Signature + +```java +public AgentBase addAnswerVerb(String verbName, Object verbData) +``` + +#### Parameters + + + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 976. + +*** + +### addFunctionInclude + +#### Signature + +```java +public AgentBase addFunctionInclude(String url, Map functions) +``` + +#### Parameters + + + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 939. + +*** + +### addHint + +#### Signature + +```java +public AgentBase addHint(String hint) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 671. + +*** + +### addHints + +#### Signature + +```java +public AgentBase addHints(List newHints) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 676. + +*** + +### addInternalFiller + +Add internal fillers for a single internal function and language. + +<p>See `#setInternalFillersMap(java.util.Map)` for the complete +list of supported function names and an explanation of what fillers +do. + +Names outside the supported set log a warning and are stored, but +the runtime will not play them. + +#### Signature + + + + ```java + public AgentBase addInternalFiller(String text, String file) + ``` + + + + ```java + public AgentBase addInternalFiller( + String functionName, + String languageCode, + List fillers + ) + ``` + + + +#### Parameters (Overload 1) + + + + + +#### Parameters (Overload 2) + + + one of `#SUPPORTED_INTERNAL_FILLER_NAMES`. + + + + BCP-47 language code (e.g. `"en-US"`). + + + + phrases to speak while the function runs. + + +#### Returns (Overload 1) + +`AgentBase` + +#### Returns (Overload 2) + +`AgentBase` — this agent for chaining. + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 897. + +*** + +### addLanguage + +Add a language configuration with an optional per-language `params` +dict (engine-specific tuning, voice settings, etc.). + +The `params` +key is only emitted into SWML when non-empty so existing language +entries stay byte-identical when no params are passed. +Mirrors Python's add\_language(params=...) addition. + +#### Signature + + + + ```java + public AgentBase addLanguage(String name, String code, String voice) + ``` + + + + ```java + public AgentBase addLanguage( + String name, + String code, + String voice, + String speechModel, + String fillerWord, + String engine + ) + ``` + + + + ```java + public AgentBase addLanguage( + String name, + String code, + String voice, + String speechModel, + String fillerWord, + String engine, + Map params + ) + ``` + + + +#### Parameters (Overload 1) + + + + + + + +#### Parameters (Overload 2) + + + + + + + + + + + + + +#### Parameters (Overload 3) + + + + + + + + + + + + + + + +#### Returns (Overload 1) + +`AgentBase` + +#### Returns (Overload 2) + +`AgentBase` + +#### Returns (Overload 3) + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 686. + +*** + +### addMcpServer + +Add an external MCP server for tool discovery and invocation. +Tools are discovered via MCP protocol at session start and added to SWAIG. + +#### Signature + + + + ```java + public AgentBase addMcpServer( + String url, + Map headers, + boolean resources, + Map resourceVars + ) + ``` + + + + ```java + public AgentBase addMcpServer(String url) + ``` + + + + ```java + public AgentBase addMcpServer(String url, Map headers) + ``` + + + +#### Parameters (Overload 1) + + + MCP server HTTP endpoint URL + + + + Optional HTTP headers (e.g. Authorization) + + + + Whether to fetch resources into global\_data + + + + Variables for URI template substitution + + +#### Parameters (Overload 2) + + + +#### Parameters (Overload 3) + + + + + +#### Returns (Overload 1) + +`AgentBase` — this for chaining + +#### Returns (Overload 2) + +`AgentBase` + +#### Returns (Overload 3) + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1131. + +*** + +### addPatternHint + +#### Signature + +```java +public AgentBase addPatternHint(String pattern) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 681. + +*** + +### addPostAiVerb + +#### Signature + +```java +public AgentBase addPostAiVerb(String verbName, Object verbData) +``` + +#### Parameters + + + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 990. + +*** + +### addPostAnswerVerb + +#### Signature + +```java +public AgentBase addPostAnswerVerb(String verbName, Object verbData) +``` + +#### Parameters + + + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 983. + +*** + +### addPreAnswerVerb + +#### Signature + +```java +public AgentBase addPreAnswerVerb(String verbName, Object verbData) +``` + +#### Parameters + + + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 969. + +*** + +### addPronunciation + +#### Signature + +```java +public AgentBase addPronunciation( + String replace, + String with, + boolean ignoreCase +) +``` + +#### Parameters + + + + + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 760. + +*** + +### addSkill + +Typed overload of Map). + +Accepts a built-in +`SkillName` so a misspelled skill fails at compile time instead of +silently no-op-ing on the server. Delegates to the string path via +`SkillName#getValue()`, so wire behavior is identical. + +#### Signature + + + + ```java + public AgentBase addSkill(String skillName, Map params) + ``` + + + + ```java + public AgentBase addSkill(SkillName skillName, Map params) + ``` + + + +#### Parameters (Overload 1) + + + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`AgentBase` + +#### Returns (Overload 2) + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1040. + +*** + +### addSwaigQueryParams + +#### Signature + +```java +public AgentBase addSwaigQueryParams(Map params) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1102. + +*** + +### builder + +**Modifiers:** `static` + +#### Signature + +```java +public static Builder builder() +``` + +#### Returns + +`Builder` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 160. + +*** + +### buildMcpToolList + +Build MCP tool list from registered tools. + +#### Signature + +```java +public List> buildMcpToolList() +``` + +#### Returns + +`List>` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1190. + +*** + +### clearPostAiVerbs + +#### Signature + +```java +public AgentBase clearPostAiVerbs() +``` + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 999. + +*** + +### clearPostAnswerVerbs + +#### Signature + +```java +public AgentBase clearPostAnswerVerbs() +``` + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 998. + +*** + +### clearPreAnswerVerbs + +#### Signature + +```java +public AgentBase clearPreAnswerVerbs() +``` + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 997. + +*** + +### clearSwaigQueryParams + +#### Signature + +```java +public AgentBase clearSwaigQueryParams() +``` + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1107. + +*** + +### clone + +Create a deep copy of this agent for per-request customization. + +#### Signature + +```java +public AgentBase clone() +``` + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1737. + +*** + +### contexts + +#### Signature + +```java +public ContextBuilder contexts() +``` + +#### Returns + +`ContextBuilder` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1017. + +*** + +### createToolToken + +Mint a per-call SWAIG-function token via the agent's SessionManager. + +<p>Python parity: `state_mixin.StateMixin._create_tool_token`. +Returns an empty string when the underlying SessionManager throws +(Python catches all exceptions and returns "" on error). + +#### Signature + +```java +public String createToolToken(String toolName, String callId) +``` + +#### Parameters + + + + + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 640. + +*** + +### defineContexts + +Define or return the ContextBuilder for this agent. + +The builder is +wired to report registered SWAIG tool names back so that its +`validate()` can check for collisions with reserved native tool +names (`next_step`, `change_context`, `gather_submit`). + +#### Signature + +```java +public ContextBuilder defineContexts() +``` + +#### Returns + +`ContextBuilder` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1011. + +*** + +### defineTool + +Register a SWAIG tool (function) that the AI can invoke during a call. + +<h3>How this becomes a tool the model sees</h3> + +<p>A SWAIG function is <b>exactly the same concept</b> as a "tool" in +native OpenAI / Anthropic tool calling. + +On every LLM turn, the SDK +renders each registered SWAIG function into the OpenAI tool schema: + +<pre>"type": "function", + "function": { + "name": "your_name_here", + "description": "your description text", + "parameters": { ... your JSON schema ... + } +} +}</pre> + +<p>That schema is sent to the model as part of the same API call that +produces the next assistant message. The model reads: +<ul> + <li>the function `description` to decide WHEN to call this tool</li> + <li>each parameter `description` (inside parameters) to decide + HOW to fill in that argument from the user's utterance</li> +</ul> + +<p>This means <b>descriptions are prompt engineering</b>, not developer +comments. A vague description is the #1 cause of "the model has the +right tool but doesn't call it" failures. + +<h3>Bad vs good descriptions</h3> +<pre>: description: "Lookup function" +GOOD: description: "Look up a customer's account details by account " + + "number. Use this BEFORE quoting any account-" + + "specific info (balance, plan, status). Do not " + + "use for general product questions." + +BAD : parameters : Map.of("id", Map.of("type", "string", +"description", "the id")) +GOOD: parameters : Map.of("account\_number", Map.of("type", "string", +"description", "The customer's 8-digit account " +\+ "number, no dashes or spaces. Ask the user if " +\+ "they don't provide it."))</pre> + +<h3>Tool count matters</h3> + +<p>LLM tool selection accuracy degrades past ~7-8 simultaneously-active +tools per call. Use `com.signalwire.sdk.contexts.Step#setFunctions(Object)` +to partition tools across steps so only the relevant subset is active +at any moment. + +**Decorators:** `@Override` + +#### Signature + + + + ```java + public AgentBase defineTool( + String name, + String description, + Map parameters, + ToolHandler handler + ) + ``` + + + + ```java + public AgentBase defineTool(ToolDefinition toolDef) + ``` + + + +#### Parameters (Overload 1) + + + the function name (snake\_case verb recommended). + + + + LLM-facing description of when to call this tool. + + + + JSON-schema properties map with LLM-facing descriptions for each parameter. + + + + the Java handler invoked when the model calls this tool. + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`AgentBase` + +#### Returns (Overload 2) + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 575. + +*** + +### defineTools + +**Decorators:** `@Override` + +#### Signature + +```java +public AgentBase defineTools(List toolDefs) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 594. + +*** + +### detectServerlessBaseUrl + +Resolve a base URL from environment variables alone (proxy or +serverless platform). + +Returns `null` if no suitable env +vars are set. + +<p>This is used by both the HTTP server path (when no proxy is +manually set) and by non-HTTP transports such as the Lambda +adapter, so they agree on the origin to use for webhook URLs. + +<p>The returned origin is a bare scheme + host(:port) with NO +route appended — callers must layer their route on top via +`#buildWebhookUrl(String)` and the post-prompt URL builder. +This matters: it is how we guarantee that the agent's route +always appears in webhook URLs regardless of which source +produced the base. + +#### Signature + + + + ```java + public String detectServerlessBaseUrl() + ``` + + + + ```java + public String detectServerlessBaseUrl(EnvProvider env) + ``` + + + +#### Parameters (Overload 2) + + + environment variable source. + + +#### Returns (Overload 1) + +`String` — base URL, or `null`. + +#### Returns (Overload 2) + +`String` — base URL, or `null`. + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1855. + +*** + +### enableDebugEvents + +#### Signature + +```java +public AgentBase enableDebugEvents() +``` + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 934. + +*** + +### enableDebugRoutes + +#### Signature + +```java +public AgentBase enableDebugRoutes() +``` + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1112. + +*** + +### enableMcpServer + +Expose this agent's tools as an MCP server endpoint at /mcp. +Adds a JSON-RPC 2.0 endpoint that MCP clients can connect to. + +#### Signature + +```java +public AgentBase enableMcpServer() +``` + +#### Returns + +`AgentBase` — this for chaining + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1168. + +*** + +### enableSipRouting + +#### Signature + +```java +public AgentBase enableSipRouting() +``` + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1293. + +*** + +### extractSipUsername + +Extract the username portion from a SIP URI. + +<p> +Handles formats: +<ul> + <li>`sip:user@host` -> `user`</li> + <li>`sip:user@host:port` -> `user`</li> + <li>`user@host` -> `user`</li> + <li>`+15551234567` -> `+15551234567` (returned as-is)</li> +</ul> + +**Modifiers:** `static` + +#### Signature + +```java +public static String extractSipUsername(String sipUri) +``` + +#### Parameters + + + The SIP URI or phone number + + +#### Returns + +`String` — The extracted username, or the original string if no @ is found + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1324. + +*** + +### getAuthPassword + +#### Signature + +```java +public String getAuthPassword() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1374. + +*** + +### getAuthUser + +#### Signature + +```java +public String getAuthUser() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1373. + +*** + +### getContexts + +Returns the contexts dictionary as serialised SWML, or null when no +contexts have been defined yet. + +Mirrors Python's PromptManager.get\_contexts which returns the contexts +dict or None. + +#### Signature + +```java +public Map getContexts() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 498. + +*** + +### getDynamicConfigCallback + +#### Signature + +```java +public DynamicConfigCallback getDynamicConfigCallback() +``` + +#### Returns + +`DynamicConfigCallback` — the dynamic config callback, or `null` if none set. Exposed primarily so alternative transports (e.g. the Lambda adapter) can invoke it outside the HTTP server path. + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1504. + +*** + +### getGlobalData + +#### Signature + +```java +public Map getGlobalData() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 796. + +*** + +### getHost + +#### Signature + +```java +public String getHost() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1371. + +*** + +### getLanguageParams + +Read the per-language `params` dict for a previously-added language. +Returns null when the code is unknown or params were never set. +Mirrors Python's get\_language\_params. + +**Decorators:** `@SuppressWarnings` + +#### Signature + +```java +public Map getLanguageParams(String code) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 743. + +*** + +### getMcpServers + +Get configured MCP servers (read-only). + +#### Signature + +```java +public List> getMcpServers() +``` + +#### Returns + +`List>` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1183. + +*** + +### getName + +#### Signature + +```java +public String getName() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1369. + +*** + +### getNormalisedRoute + +Return the agent's route normalised to an empty string for the +root route or `"/"` otherwise. + +Exposed so non-HTTP +transports can construct paths correctly. + +#### Signature + +```java +public String getNormalisedRoute() +``` + +#### Returns + +`String` — normalised route prefix. + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1522. + +*** + +### getOnSummaryCallback + +#### Signature + +```java +public BiConsumer,Map> getOnSummaryCallback() +``` + +#### Returns + +`BiConsumer,Map>` — the post-prompt summary callback, or `null`. + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1511. + +*** + +### getPom + +Read-only snapshot of the agent's POM as a typed +`PromptObjectModel`. + +Wraps the internal map-based section list so +callers get the rich Section / render API without mutating internal +state. + +<p>Python parity: `agent.pom` instance attribute +(agent_base.py line 209). Returns `null` when `usePom` is +false (mirroring Python's = None). + +#### Signature + +```java +public PromptObjectModel getPom() +``` + +#### Returns + +`PromptObjectModel` — typed POM wrapper, or `null` when POM mode is off. + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 484. + +*** + +### getPort + +#### Signature + +```java +public int getPort() +``` + +#### Returns + +`int` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1372. + +*** + +### getPostPrompt + +Returns the post-prompt text that was set via setPostPrompt, or null +when none has been set. + +Mirrors Python's PromptManager.get\_post\_prompt / +PromptMixin.get\_post\_prompt — used by SWML rendering when a post-prompt +is configured. + +#### Signature + +```java +public String getPostPrompt() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 438. + +*** + +### getPrompt + +#### Signature + +```java +public Object getPrompt() +``` + +#### Returns + +`Object` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 421. + +*** + +### getRawPrompt + +Returns the raw prompt text whatever setPromptText stored, or null when +no raw prompt has been set. + +Distinct from getPrompt() which may return +a POM map when usePom is true. + +Mirrors Python's PromptManager.get\_raw\_prompt. + +#### Signature + +```java +public String getRawPrompt() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 449. + +*** + +### getRoute + +#### Signature + +```java +public String getRoute() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1370. + +*** + +### getSigningKey + +#### Signature + +```java +public String getSigningKey() +``` + +#### Returns + +`String` — the configured Signing Key for SignalWire webhook signature validation (resolved from the builder or `SIGNALWIRE_SIGNING_KEY` env), or `null` when validation is disabled. + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1382. + +*** + +### getSipUsernames + +#### Signature + +```java +public Set getSipUsernames() +``` + +#### Returns + +`Set` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1308. + +*** + +### getSkillManager + +#### Signature + +```java +public SkillManager getSkillManager() +``` + +#### Returns + +`SkillManager` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1525. + +*** + +### getTools + +#### Signature + +```java +public Map getTools() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 625. + +*** + +### handleMcpRequest + +Handle an MCP JSON-RPC 2.0 request. + +Returns the response map. + +#### Signature + +```java +public Map handleMcpRequest(Map body) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1211. + +*** + +### hasSkill + +Typed overload of `#hasSkill(String)` (see Map)). + +#### Signature + + + + ```java + public boolean hasSkill(String skillName) + ``` + + + + ```java + public boolean hasSkill(SkillName skillName) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`boolean` + +#### Returns (Overload 2) + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1069. + +*** + +### hasTool + +#### Signature + +```java +public boolean hasTool(String name) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 629. + +*** + +### isMcpServerEnabled + +Check if MCP server endpoint is enabled. + +#### Signature + +```java +public boolean isMcpServerEnabled() +``` + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1176. + +*** + +### isSipRoutingEnabled + +#### Signature + +```java +public boolean isSipRoutingEnabled() +``` + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1307. + +*** + +### isTrustProxyForSignature + +#### Signature + +```java +public boolean isTrustProxyForSignature() +``` + +#### Returns + +`boolean` — whether webhook URL reconstruction trusts `X-Forwarded-Proto` / `X-Forwarded-Host` headers during signature validation. + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1389. + +*** + +### listSkills + +#### Signature + +```java +public List listSkills() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1065. + +*** + +### manualSetProxyUrl + +#### Signature + +```java +public AgentBase manualSetProxyUrl(String url) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1097. + +*** + +### onDebugEvent + +#### Signature + +```java +public AgentBase onDebugEvent(Consumer> callback) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1360. + +*** + +### onFunctionCall + +#### Signature + +```java +public FunctionResult onFunctionCall( + String name, + Map args, + Map rawData +) +``` + +#### Parameters + + + + + + + +#### Returns + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 600. + +*** + +### onSummary + +#### Signature + +```java +public AgentBase onSummary( + BiConsumer,Map> callback +) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1355. + +*** + +### promptAddSection + +#### Signature + + + + ```java + public AgentBase promptAddSection( + String title, + String body, + List bullets + ) + ``` + + + + ```java + public AgentBase promptAddSection(String title, String body) + ``` + + + +#### Parameters (Overload 1) + + + + + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`AgentBase` + +#### Returns (Overload 2) + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 368. + +*** + +### promptAddSubsection + +#### Signature + +```java +public AgentBase promptAddSubsection( + String parentTitle, + String title, + String body +) +``` + +#### Parameters + + + + + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 384. + +*** + +### promptAddToSection + +#### Signature + +```java +public AgentBase promptAddToSection(String title, List bullets) +``` + +#### Parameters + + + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 400. + +*** + +### promptHasSection + +#### Signature + +```java +public boolean promptHasSection(String title) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 412. + +*** + +### registerAdditionalRoutes + +**Decorators:** `@Override` + +#### Signature + +```java +protected void registerAdditionalRoutes( + com.sun.net.httpserver.HttpServer server +) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1962. + +*** + +### registerSipUsername + +#### Signature + +```java +public AgentBase registerSipUsername(String username) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1298. + +*** + +### registerSwaigFunction + +**Decorators:** `@Override` + +#### Signature + +```java +public AgentBase registerSwaigFunction(Map swaigFunc) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 588. + +*** + +### removeSkill + +Typed overload of `#removeSkill(String)` (see Map)). + +#### Signature + + + + ```java + public AgentBase removeSkill(String skillName) + ``` + + + + ```java + public AgentBase removeSkill(SkillName skillName) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`AgentBase` + +#### Returns (Overload 2) + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1055. + +*** + +### renderMainSwml + +**Decorators:** `@Override` + +#### Signature + +```java +protected Map renderMainSwml(HttpExchange exchange) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1930. + +*** + +### renderSwml + +Render the complete SWML document. +5 phases: pre-answer, answer, post-answer, AI, post-AI + +#### Signature + +```java +public Map renderSwml(String baseUrl) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1535. + +*** + +### renderSwmlJson + +Render SWML as a JSON string. + +#### Signature + +```java +public String renderSwmlJson(String baseUrl) +``` + +#### Parameters + + + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1726. + +*** + +### resetContexts + +Remove all contexts, returning the agent to a no-contexts state. +This is a convenience wrapper around `defineContexts().reset()`. +Use it in a dynamic config callback when you need to rebuild +contexts from scratch for a specific request. + +#### Signature + +```java +public AgentBase resetContexts() +``` + +#### Returns + +`AgentBase` — this agent for chaining. + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1029. + +*** + +### run + +Start the agent server. + +Equivalent to `#serve()` (inherited). + +#### Signature + +```java +public void run() +``` + +#### Throws + +- `IOException` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 2088. + +*** + +### setDynamicConfigCallback + +#### Signature + +```java +public AgentBase setDynamicConfigCallback(DynamicConfigCallback callback) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1082. + +*** + +### setFunctionIncludes + +#### Signature + +```java +public AgentBase setFunctionIncludes(List> includes) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 947. + +*** + +### setGlobalData + +#### Signature + +```java +public AgentBase setGlobalData(Map data) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 785. + +*** + +### setInternalFillers + +#### Signature + +```java +public AgentBase setInternalFillers(List> fillers) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 836. + +*** + +### setInternalFillersMap + +Set internal fillers for native SWAIG functions. + +<p>Internal fillers are short phrases the AI agent speaks (via TTS) +while an internal/native function is running, so the caller doesn't +hear dead air during transitions or background work. + +<p>Supported function names (match the SWAIGInternalFiller schema): +`hangup`, `check_time`, `wait_for_user`, +`wait_seconds`, `adjust_response_latency`, +`next_step`, `change_context`, `get_visual_input`, +`get_ideal_strategy`. + +See +`#SUPPORTED_INTERNAL_FILLER_NAMES`. + +<p>Notably NOT supported: `change_step`, `gather_submit`, or +arbitrary user-defined SWAIG function names. The runtime only honors +fillers for the names listed above; everything else is silently +ignored at the SWML level. This method warns at registration time if +you pass an unknown name so you catch the typo early. + +#### Signature + +```java +public AgentBase setInternalFillersMap( + Map>> fillers +) +``` + +#### Parameters + + + map of → language\_code → phrases. + + +#### Returns + +`AgentBase` — this agent for chaining. + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 865. + +*** + +### setLanguageParams + +Set (or replace) the per-language `params` dict on an already-added +language. + +Empty/null params removes the key. Unknown code is a no-op. +Returns self for chaining. Mirrors Python's set\_language\_params. + +#### Signature + +```java +public AgentBase setLanguageParams(String code, Map params) +``` + +#### Parameters + + + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 724. + +*** + +### setLanguages + +#### Signature + +```java +public AgentBase setLanguages(List> langs) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 754. + +*** + +### setNativeFunctions + +#### Signature + +```java +public AgentBase setNativeFunctions(List funcs) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 800. + +*** + +### setParam + +#### Signature + +```java +public AgentBase setParam(String key, Object value) +``` + +#### Parameters + + + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 775. + +*** + +### setParams + +#### Signature + +```java +public AgentBase setParams(Map newParams) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 780. + +*** + +### setPostPrompt + +#### Signature + +```java +public AgentBase setPostPrompt(String text) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 363. + +*** + +### setPostPromptLlmParams + +#### Signature + +```java +public AgentBase setPostPromptLlmParams(Map llmParams) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 959. + +*** + +### setPostPromptUrl + +#### Signature + +```java +public AgentBase setPostPromptUrl(String url) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1092. + +*** + +### setPromptLlmParams + +#### Signature + +```java +public AgentBase setPromptLlmParams(Map llmParams) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 953. + +*** + +### setPromptPom + +Sets the prompt as a list of POM section maps. + +Each section map +supports keys "title", "body", "bullets", "numbered", +"numbered\_bullets", and "subsections". Switches the agent to POM mode. + +Mirrors Python's PromptManager.set\_prompt\_pom — accepts a list of +section dicts and stores them in pomSections. + +#### Signature + +```java +public AgentBase setPromptPom(List> pom) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 461. + +*** + +### setPromptText + +#### Signature + +```java +public AgentBase setPromptText(String text) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 357. + +*** + +### setPronunciations + +#### Signature + +```java +public AgentBase setPronunciations(List> prons) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 769. + +*** + +### setWebHookUrl + +#### Signature + +```java +public AgentBase setWebHookUrl(String url) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1087. + +*** + +### updateGlobalData + +#### Signature + +```java +public AgentBase updateGlobalData(Map data) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 791. + +*** + +### validateSignedWebhook + +Override the `Service` hook to enforce SignalWire webhook +signature validation when a `#signingKey` is configured. + +Returns +`true` (no-op) when `signingKey` is unset; per +porting-sdk/webhooks.md, the AgentBase MUST NOT silently reject +unsigned requests when no key is configured (a prominent startup +warning is the documented behavior instead — emitted in +`Builder#build()`). + +<p>The signature header is read from `X-SignalWire-Signature` +(or its `X-Twilio-Signature` legacy alias). The URL is +reconstructed from proxy headers / `SWML_PROXY_URL_BASE` / +the request itself, and the validator is called with the raw body +bytes the caller already captured. + +**Decorators:** `@Override` + +#### Signature + +```java +protected boolean validateSignedWebhook( + com.sun.net.httpserver.HttpExchange exchange, + String rawBody +) +``` + +#### Parameters + + + the inbound HttpExchange. + + + + the raw UTF-8 body string that was already read from the exchange. + + +#### Returns + +`boolean` — `true` when validation passes (or no key is configured). + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1426. + +*** + +### validateToolToken + +Validate a per-call SWAIG-function token. + +Returns false when the +function is not registered, when the SessionManager rejects the +token, or on any underlying exception. + +<p>Python parity: `state_mixin.StateMixin.validate_tool_token` +— rejects unknown functions up-front and swallows exceptions. + +#### Signature + +```java +public boolean validateToolToken( + String functionName, + String token, + String callId +) +``` + +#### Parameters + + + + + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 656. + +*** + +### validateWebhook + +Public delegate around `#validateSignedWebhook` so external +front-doors (e.g. + +`com.signalwire.sdk.server.AgentServer`, a +Lambda adapter, etc.) can run the same logic the in-process HTTP +server does. Mirrors the no-op-when-unset behavior described in +porting-sdk/webhooks.md. + +#### Signature + +```java +public boolean validateWebhook( + com.sun.net.httpserver.HttpExchange exchange, + String rawBody +) +``` + +#### Parameters + + + the inbound HttpExchange. + + + + raw UTF-8 body string. + + +#### Returns + +`boolean` — `true` when validation passes (or no key is configured). + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1402. + +## Interfaces + +### DynamicConfigCallback + +#### Signature + +```java +public interface DynamicConfigCallback +``` + +#### Methods + +##### configure + +###### Signature + +```java +void configure( + Map queryParams, + Map bodyParams, + Map> headers, + AgentBase agent +) +``` + +###### Parameters + + + + + + + + + +###### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 2100. + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 2098. + +## Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 55. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/agent/agent/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/agent/agent/index.mdx new file mode 100644 index 0000000000..de1506fecb --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/agent/agent/index.mdx @@ -0,0 +1,27 @@ +--- +slug: "/reference/java/com/signalwire/sdk/agent/agent" +title: "agent" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "com.signalwire.sdk.agent" + module: "com.signalwire.sdk.agent" +--- +# `agent` + +## Signature + +```java +package com.signalwire.sdk.agent +``` + +## Classes + + + + Base class for all SignalWire AI agents. Composes prompt management, tool registration, AI config, HTTP serving, skills integration, and SWML rendering. Use the builder pattern: <pre> var agent = AgentBase.builder() .name("my-agent") .route("/") .port(3000) .build(); </pre> + + diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/cli/cli/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/cli/cli/index.mdx new file mode 100644 index 0000000000..9f81988635 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/cli/cli/index.mdx @@ -0,0 +1,27 @@ +--- +slug: "/reference/java/com/signalwire/sdk/cli/cli" +title: "cli" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "com.signalwire.sdk.cli" + module: "com.signalwire.sdk.cli" +--- +# `cli` + +## Signature + +```java +package com.signalwire.sdk.cli +``` + +## Classes + + + + CLI tool for testing SWAIG functions against an agent. <p> Uses only JDK classes (java.net.http.HttpClient) -- no external dependencies. <p> Two modes: <ul> <li><b>URL mode</b> — hit a running agent HTTP server.</li> <li><b>Simulation mode</b> — \ loads the agent class directly and routes invocation through the matching serverless adapter (e.g. + + diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/cli/cli/swaig-test/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/cli/cli/swaig-test/index.mdx new file mode 100644 index 0000000000..af912278d2 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/cli/cli/swaig-test/index.mdx @@ -0,0 +1,136 @@ +--- +slug: "/reference/java/com/signalwire/sdk/cli/cli/swaig-test" +title: "SwaigTest" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.cli.SwaigTest" + parent: "com.signalwire.sdk.cli" + module: "com.signalwire.sdk.cli" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/SwaigTest.java" + visibility: "public" +--- +# `SwaigTest` + +CLI tool for testing SWAIG functions against an agent. + +<p> +Uses only JDK classes (java.net.http.HttpClient) -- no external dependencies. +<p> +Two modes: +<ul> + <li><b>URL mode</b> — hit a running agent HTTP server.</li> + <li><b>Simulation mode</b> — <platform> loads the + agent class directly and routes invocation through the matching + serverless adapter (e.g. + +`LambdaAgentHandler`) instead of +the HTTP server. Uses an injected `EnvProvider` to mask the +real process env with simulated values, since Java cannot mutate +`System#getenv()`.</li> + +</ul> +<p> +Usage: +<pre> + swaig-test --url http://user:pass@localhost:3000 --list-tools + swaig-test --url http://user:pass@localhost:3000 --dump-swml + swaig-test --url http://user:pass@localhost:3000 --exec tool_name --param key=value + swaig-test <agent-class> --simulate-serverless lambda --dump-swml + swaig-test <agent-class> --simulate-serverless lambda --exec tool_name --param k=v + swaig-test <agent-class> --simulate-serverless lambda +</pre> + +## Signature + +```java +public class SwaigTest +``` + +## Methods + +### \ + +#### Signature + +```java +public () +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/cli/SwaigTest.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/SwaigTest.java) + +*** + +### main + +**Modifiers:** `static` + +#### Signature + +```java +public static void main(String[] args) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/cli/SwaigTest.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/SwaigTest.java) + +Line 75. + +*** + +### run + +Run the CLI and return the exit code. + +Extracted so tests can drive +`main` without calling `System#exit(int)`. + +**Modifiers:** `static` + +#### Signature + + + + ```java + public static int run(String[] args) + ``` + + + + ```java + private void run() + ``` + + + +#### Parameters (Overload 1) + + + command-line arguments. + + +#### Returns (Overload 1) + +`int` — 0 on success, non-zero on error. + +#### Source + +[`src/main/java/com/signalwire/sdk/cli/SwaigTest.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/SwaigTest.java) + +Line 87. + +## Source + +[`src/main/java/com/signalwire/sdk/cli/SwaigTest.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/SwaigTest.java) + +Line 44. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/cli/simulation/simulation/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/cli/simulation/simulation/index.mdx new file mode 100644 index 0000000000..bdced5012e --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/cli/simulation/simulation/index.mdx @@ -0,0 +1,27 @@ +--- +slug: "/reference/java/com/signalwire/sdk/cli/simulation/simulation" +title: "simulation" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "com.signalwire.sdk.cli.simulation" + module: "com.signalwire.sdk.cli.simulation" +--- +# `simulation` + +## Signature + +```java +package com.signalwire.sdk.cli.simulation +``` + +## Classes + + + + Build a layered `EnvProvider` that overlays simulated serverless environment values on top of the real process environment. <p>Java cannot mutate `System#getenv()` at runtime (the map it returns is an immutable snapshot of the OS env). + + diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/cli/simulation/simulation/serverless-simulator/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/cli/simulation/simulation/serverless-simulator/index.mdx new file mode 100644 index 0000000000..9a188e8e27 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/cli/simulation/simulation/serverless-simulator/index.mdx @@ -0,0 +1,356 @@ +--- +slug: "/reference/java/com/signalwire/sdk/cli/simulation/simulation/serverless-simulator" +title: "ServerlessSimulator" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.cli.simulation.ServerlessSimulator" + parent: "com.signalwire.sdk.cli.simulation" + module: "com.signalwire.sdk.cli.simulation" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java" + visibility: "public" +--- +# `ServerlessSimulator` + +Build a layered `EnvProvider` that overlays simulated serverless +environment values on top of the real process environment. + +<p>Java cannot mutate `System#getenv()` at runtime (the map it +returns is an immutable snapshot of the OS env). + +To implement the +\--simulate-serverless flag in the same spirit as +Python's `mock_env.py`, we therefore cannot "set env vars then +clean up" — we instead compose an injectable `EnvProvider` and +thread it through every code path in the SDK that reads env vars. + +<p>Accepts only the platforms the port actually implements. Ports that +add CGI / GCF / Azure support later should extend +`#presetFor(Platform)`. + +<p>Mirrors the clear-and-warn semantics of Python's +`_clear_conflicting_env`: `SWML_PROXY_URL_BASE` is masked +in the simulated view so that platform-specific URL generation is +actually exercised. If the caller's real OS env has +`SWML_PROXY_URL_BASE` set, the simulator does <b>not</b> mutate +the real env — it simply returns `null` for that key through the +layered `EnvProvider`. Callers that want to surface the mismatch +to the user can check `#proxyUrlBaseMaskedFromRealEnv()`. + +**Modifiers:** `final` + +## Signature + +```java +public final class ServerlessSimulator +``` + +## Methods + +### \ + +Build a simulator for the given platform using the real process +environment as the fallback layer. + +#### Signature + + + + ```java + public (Platform platform) + ``` + + + + ```java + public ( + Platform platform, + EnvProvider realEnv, + Map overrides + ) + ``` + + + +#### Parameters (Overload 1) + + + platform to simulate. + + +#### Parameters (Overload 2) + + + platform to simulate. + + + + fallback env provider (usually `EnvProvider#SYSTEM`). + + + + user-supplied overrides on top of the platform preset. + + +#### Source + +[`src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java) + +Line 100. + +*** + +### buildEnvProvider + +Build the layered `EnvProvider`. + +Precedence is: + +<ol> + <li>masked keys — always return `null`.</li> + <li>simulated values — overlaid on the real env.</li> + <li>Real env — everything else passes through.</li> +</ol> + +#### Signature + +```java +public EnvProvider buildEnvProvider() +``` + +#### Returns + +`EnvProvider` — layered env provider. + +#### Source + +[`src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java) + +Line 199. + +*** + +### getMaskedKeys + +#### Signature + +```java +public Set getMaskedKeys() +``` + +#### Returns + +`Set` — an immutable view of the keys that are masked (returned as `null`) regardless of what the real env has for them. + +#### Source + +[`src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java) + +Line 174. + +*** + +### getPlatform + +#### Signature + +```java +public Platform getPlatform() +``` + +#### Returns + +`Platform` — the simulated platform. + +#### Source + +[`src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java) + +Line 158. + +*** + +### getSimulatedEnv + +#### Signature + +```java +public Map getSimulatedEnv() +``` + +#### Returns + +`Map` — the map of simulated values layered on top of the real env. The returned map is a defensive copy. + +#### Source + +[`src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java) + +Line 166. + +*** + +### parsePlatform + +Parse the CLI-string form of a platform. + +Accepts only values this +port supports; unknown strings throw `IllegalArgumentException` +so the CLI can surface a clear error instead of silently falling +back. + +**Modifiers:** `static` + +#### Signature + +```java +public static Platform parsePlatform(String s) +``` + +#### Parameters + + + user-supplied platform string. + + +#### Returns + +`Platform` — the matching `Platform`. + +#### Throws + +- `IllegalArgumentException` — for unsupported platforms. + +#### Source + +[`src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java) + +Line 80. + +*** + +### presetFor + +Default env-var preset for a platform, mirroring Python's +`ServerlessSimulator.PLATFORM_PRESETS`. + +**Modifiers:** `static` + +#### Signature + +```java +public static Map presetFor(Platform platform) +``` + +#### Parameters + + + platform. + + +#### Returns + +`Map` — the preset map (never null). + +#### Source + +[`src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java) + +Line 142. + +*** + +### proxyUrlBaseMaskedFromRealEnv + +#### Signature + +```java +public boolean proxyUrlBaseMaskedFromRealEnv() +``` + +#### Returns + +`boolean` — `true` if the real process env has `SWML_PROXY_URL_BASE` set — i.e. the simulated view is hiding a real value the user might not have intended. The CLI uses this to print a warning that mirrors Python's behaviour. + +#### Source + +[`src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java) + +Line 184. + +## Enums + +### Platform + +Platforms the Java port supports simulating today. + +#### Signature + +```java +public enum Platform +``` + +#### Variants + + + AWS Lambda. + + +#### Methods + +##### valueOf + +**Modifiers:** `static` + +###### Signature + +```java +public static Platform valueOf(String name) +``` + +###### Parameters + + + +###### Returns + +`Platform` + +###### Source + +[`src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java) + +*** + +##### values + +**Modifiers:** `static` + +###### Signature + +```java +public static Platform[] values() +``` + +###### Returns + +`Platform[]` + +###### Source + +[`src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java) + +#### Source + +[`src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java) + +Line 39. + +## Source + +[`src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java) + +Line 36. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/contexts/contexts/context-builder/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/contexts/contexts/context-builder/index.mdx new file mode 100644 index 0000000000..438e583d88 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/contexts/contexts/context-builder/index.mdx @@ -0,0 +1,257 @@ +--- +slug: "/reference/java/com/signalwire/sdk/contexts/contexts/context-builder" +title: "ContextBuilder" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.contexts.ContextBuilder" + parent: "com.signalwire.sdk.contexts" + module: "com.signalwire.sdk.contexts" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/ContextBuilder.java" + visibility: "public" +--- +# `ContextBuilder` + +Builder for multi-step, multi-context AI agent workflows. + +<p>A ContextBuilder owns one or more `Context`s; each context owns an +ordered list of `Step`s. + +Only one context and one step is active at a +time. Per chat turn, the runtime injects the current step's instructions as +a system message, then asks the LLM for a response. + +<h2>Native tools auto-injected by the runtime</h2> + +<p>When a step (or its enclosing context) declares valid_steps or +valid_contexts, the runtime auto-injects two native tools so the model can +navigate the flow: +<ul> + <li>enum) — present when valid_steps is set</li> + <li>enum) — present when valid_contexts is set</li> +</ul> + +<p>A third native tool — `gather_submit` — is injected during +gather_info questioning. These three names are <b>reserved</b>: +`#validate()` rejects any agent that defines a SWAIG tool with one of +these names. See `#RESERVED_NATIVE_TOOL_NAMES`. + +<h2>Function whitelisting (Step.setFunctions)</h2> + +<p>Each step may declare a functions whitelist. The whitelist is applied +in-memory at the start of each LLM turn. CRITICALLY: if a step does NOT +declare a functions field, it INHERITS the previous step's active set. +See `Step#setFunctions(Object)` for details and examples. + +## Signature + +```java +public class ContextBuilder +``` + +## Constants + + + Reserved tool names auto-injected by the runtime when contexts/steps are in use. User-defined SWAIG tools must not collide with these names. \

    \
  • \`next\_step\` / \`change\_context\` are injected when valid\_steps or valid\_contexts is set so the model can navigate the flow.\
  • \
  • \`gather\_submit\` is injected while a step's gather\_info is collecting answers.\
  • \
+
+ +## Methods + +### \ + +#### Signature + +```java +public () +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/ContextBuilder.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/ContextBuilder.java) + +Line 70. + +*** + +### addContext + +Add a new context. + +#### Signature + +```java +public Context addContext(String name) +``` + +#### Parameters + + + +#### Returns + +`Context` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/ContextBuilder.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/ContextBuilder.java) + +Line 105. + +*** + +### attachToolNameSupplier + +Attach a supplier that returns registered SWAIG tool names so +`#validate()` can check for collisions with +`#RESERVED_NATIVE_TOOL_NAMES`. + +Called internally by +`AgentBase.defineContexts()`. + +#### Signature + +```java +public ContextBuilder attachToolNameSupplier( + java.util.function.Supplier> supplier +) +``` + +#### Parameters + + + returns the current set of registered tool names. + + +#### Returns + +`ContextBuilder` — this builder for chaining. + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/ContextBuilder.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/ContextBuilder.java) + +Line 84. + +*** + +### getContext + +Get an existing context by name. + +#### Signature + +```java +public Context getContext(String name) +``` + +#### Parameters + + + +#### Returns + +`Context` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/ContextBuilder.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/ContextBuilder.java) + +Line 121. + +*** + +### isEmpty + +#### Signature + +```java +public boolean isEmpty() +``` + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/ContextBuilder.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/ContextBuilder.java) + +Line 125. + +*** + +### reset + +Remove all contexts, returning the builder to its initial state. +Use this in a dynamic config callback when you need to rebuild +contexts from scratch for a specific request. + +#### Signature + +```java +public ContextBuilder reset() +``` + +#### Returns + +`ContextBuilder` — this builder for chaining. + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/ContextBuilder.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/ContextBuilder.java) + +Line 96. + +*** + +### toMap + +Convert all contexts to a Map for SWML generation. +Validates before converting. + +#### Signature + +```java +public Map toMap() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/ContextBuilder.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/ContextBuilder.java) + +Line 310. + +*** + +### validate + +Validate the contexts configuration. + +#### Signature + +```java +public void validate() +``` + +#### Throws + +- `IllegalStateException` — if validation fails + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/ContextBuilder.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/ContextBuilder.java) + +Line 134. + +## Source + +[`src/main/java/com/signalwire/sdk/contexts/ContextBuilder.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/ContextBuilder.java) + +Line 41. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/contexts/contexts/context/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/contexts/contexts/context/index.mdx new file mode 100644 index 0000000000..929f0b465f --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/contexts/contexts/context/index.mdx @@ -0,0 +1,650 @@ +--- +slug: "/reference/java/com/signalwire/sdk/contexts/contexts/context" +title: "Context" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.contexts.Context" + parent: "com.signalwire.sdk.contexts" + module: "com.signalwire.sdk.contexts" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java" + visibility: "public" +--- +# `Context` + +Represents a single context containing multiple steps. + +<p> +All setter methods return `this` for fluent chaining. + +## Signature + +```java +public class Context +``` + +## Methods + +### \ + +#### Signature + +```java +public (String name) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) + +Line 43. + +*** + +### addBullets + +#### Signature + +```java +public Context addBullets(String title, List bullets) +``` + +#### Parameters + + + + + +#### Returns + +`Context` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) + +Line 205. + +*** + +### addEnterFiller + +#### Signature + +```java +public Context addEnterFiller(String languageCode, List fillers) +``` + +#### Parameters + + + + + +#### Returns + +`Context` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) + +Line 230. + +*** + +### addExitFiller + +#### Signature + +```java +public Context addExitFiller(String languageCode, List fillers) +``` + +#### Parameters + + + + + +#### Returns + +`Context` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) + +Line 238. + +*** + +### addSection + +#### Signature + +```java +public Context addSection(String title, String body) +``` + +#### Parameters + + + + + +#### Returns + +`Context` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) + +Line 194. + +*** + +### addStep + +Add a new step to this context. + +#### Signature + + + + ```java + public Step addStep(String stepName) + ``` + + + + ```java + public Step addStep( + String stepName, + String task, + List bullets, + String criteria, + Object functions, + List validSteps + ) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + + + + + + + + + +#### Returns (Overload 1) + +`Step` + +#### Returns (Overload 2) + +`Step` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) + +Line 57. + +*** + +### getName + +#### Signature + +```java +public String getName() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) + +Line 50. + +*** + +### getStep + +#### Signature + +```java +public Step getStep(String stepName) +``` + +#### Parameters + + + +#### Returns + +`Step` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) + +Line 84. + +*** + +### moveStep + +#### Signature + +```java +public Context moveStep(String stepName, int position) +``` + +#### Parameters + + + + + +#### Returns + +`Context` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) + +Line 96. + +*** + +### removeStep + +#### Signature + +```java +public Context removeStep(String stepName) +``` + +#### Parameters + + + +#### Returns + +`Context` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) + +Line 88. + +*** + +### setConsolidate + +#### Signature + +```java +public Context setConsolidate(boolean consolidate) +``` + +#### Parameters + + + +#### Returns + +`Context` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) + +Line 144. + +*** + +### setEnterFillers + +#### Signature + +```java +public Context setEnterFillers(Map> fillers) +``` + +#### Parameters + + + +#### Returns + +`Context` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) + +Line 216. + +*** + +### setExitFillers + +#### Signature + +```java +public Context setExitFillers(Map> fillers) +``` + +#### Parameters + + + +#### Returns + +`Context` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) + +Line 223. + +*** + +### setFullReset + +#### Signature + +```java +public Context setFullReset(boolean fullReset) +``` + +#### Parameters + + + +#### Returns + +`Context` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) + +Line 149. + +*** + +### setInitialStep + +Set which step the context starts on when entered. + +<p>By default, a context starts on its first step (index 0). + +Use this +to skip a preamble step on re-entry via `change_context`. + +#### Signature + +```java +public Context setInitialStep(String stepName) +``` + +#### Parameters + + + name of the step to start on (must exist in this context). + + +#### Returns + +`Context` — this context for chaining. + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) + +Line 114. + +*** + +### setIsolated + +Mark this context as isolated — entering it wipes conversation history. + +<p>When `isolated=true` and the context is entered via +change_context, the runtime wipes the conversation array. + +The model +starts fresh with only the new context's system\_prompt + step +instructions, with no memory of prior turns. + +<p><b>EXCEPTION — reset overrides the wipe:</b> If the context also has +a reset configuration (via `#setConsolidate(boolean)` or +`#setFullReset(boolean)`), the wipe is skipped in favor of the +reset behavior. Use reset with consolidate=true to summarize prior +history into a single message instead of dropping it entirely. + +<p>Use cases: switching to a sensitive billing flow that should not see +prior small-talk; handing off to a different agent persona; resetting +after a long off-topic detour. + +#### Signature + +```java +public Context setIsolated(boolean isolated) +``` + +#### Parameters + + + true to wipe conversation history on context entry (subject to the reset exception above). + + +#### Returns + +`Context` — this context for chaining. + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) + +Line 181. + +*** + +### setPostPrompt + +#### Signature + +```java +public Context setPostPrompt(String postPrompt) +``` + +#### Parameters + + + +#### Returns + +`Context` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) + +Line 134. + +*** + +### setPrompt + +#### Signature + +```java +public Context setPrompt(String prompt) +``` + +#### Parameters + + + +#### Returns + +`Context` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) + +Line 186. + +*** + +### setSystemPrompt + +#### Signature + +```java +public Context setSystemPrompt(String systemPrompt) +``` + +#### Parameters + + + +#### Returns + +`Context` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) + +Line 139. + +*** + +### setUserPrompt + +#### Signature + +```java +public Context setUserPrompt(String userPrompt) +``` + +#### Parameters + + + +#### Returns + +`Context` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) + +Line 154. + +*** + +### setValidContexts + +#### Signature + +```java +public Context setValidContexts(List contexts) +``` + +#### Parameters + + + +#### Returns + +`Context` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) + +Line 124. + +*** + +### setValidSteps + +#### Signature + +```java +public Context setValidSteps(List steps) +``` + +#### Parameters + + + +#### Returns + +`Context` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) + +Line 129. + +*** + +### toMap + +#### Signature + +```java +public Map toMap() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) + +Line 259. + +## Source + +[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) + +Line 16. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/contexts/contexts/gather-info/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/contexts/contexts/gather-info/index.mdx new file mode 100644 index 0000000000..dc2ee5fe84 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/contexts/contexts/gather-info/index.mdx @@ -0,0 +1,191 @@ +--- +slug: "/reference/java/com/signalwire/sdk/contexts/contexts/gather-info" +title: "GatherInfo" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.contexts.GatherInfo" + parent: "com.signalwire.sdk.contexts" + module: "com.signalwire.sdk.contexts" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/GatherInfo.java" + visibility: "public" +--- +# `GatherInfo` + +Configuration for gathering information in a step via the C-side gather\_info system. + +<p> +This produces zero tool_call/tool_result entries in LLM-visible history, +instead using dynamic step instruction re-injection to present one question at a time. + +## Signature + +```java +public class GatherInfo +``` + +## Methods + +### \ + +#### Signature + + + + ```java + public (String outputKey, String completionAction, String prompt) + ``` + + + + ```java + public () + ``` + + + +#### Parameters (Overload 1) + + + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/GatherInfo.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/GatherInfo.java) + +Line 24. + +*** + +### addQuestion + +Add a question to gather. + +#### Signature + + + + ```java + public GatherInfo addQuestion( + String key, + String question, + String type, + boolean confirm, + String prompt, + List functions + ) + ``` + + + + ```java + public GatherInfo addQuestion(String key, String question) + ``` + + + +#### Parameters (Overload 1) + + + + + + + + + + + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`GatherInfo` + +#### Returns (Overload 2) + +`GatherInfo` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/GatherInfo.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/GatherInfo.java) + +Line 38. + +*** + +### getCompletionAction + +#### Signature + +```java +public String getCompletionAction() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/GatherInfo.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/GatherInfo.java) + +Line 52. + +*** + +### getQuestions + +#### Signature + +```java +public List getQuestions() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/GatherInfo.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/GatherInfo.java) + +Line 48. + +*** + +### toMap + +#### Signature + +```java +public Map toMap() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/GatherInfo.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/GatherInfo.java) + +Line 56. + +## Source + +[`src/main/java/com/signalwire/sdk/contexts/GatherInfo.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/GatherInfo.java) + +Line 17. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/contexts/contexts/gather-question/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/contexts/contexts/gather-question/index.mdx new file mode 100644 index 0000000000..172336ba51 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/contexts/contexts/gather-question/index.mdx @@ -0,0 +1,123 @@ +--- +slug: "/reference/java/com/signalwire/sdk/contexts/contexts/gather-question" +title: "GatherQuestion" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.contexts.GatherQuestion" + parent: "com.signalwire.sdk.contexts" + module: "com.signalwire.sdk.contexts" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/GatherQuestion.java" + visibility: "public" +--- +# `GatherQuestion` + +Represents a single question in a gather\_info configuration. + +## Signature + +```java +public class GatherQuestion +``` + +## Methods + +### \ + +#### Signature + + + + ```java + public ( + String key, + String question, + String type, + boolean confirm, + String prompt, + List functions + ) + ``` + + + + ```java + public (String key, String question) + ``` + + + +#### Parameters (Overload 1) + + + + + + + + + + + + + +#### Parameters (Overload 2) + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/GatherQuestion.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/GatherQuestion.java) + +Line 23. + +*** + +### getKey + +#### Signature + +```java +public String getKey() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/GatherQuestion.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/GatherQuestion.java) + +Line 37. + +*** + +### toMap + +#### Signature + +```java +public Map toMap() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/GatherQuestion.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/GatherQuestion.java) + +Line 41. + +## Source + +[`src/main/java/com/signalwire/sdk/contexts/GatherQuestion.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/GatherQuestion.java) + +Line 14. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/contexts/contexts/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/contexts/contexts/index.mdx new file mode 100644 index 0000000000..d6e9e9983f --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/contexts/contexts/index.mdx @@ -0,0 +1,43 @@ +--- +slug: "/reference/java/com/signalwire/sdk/contexts/contexts" +title: "contexts" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "com.signalwire.sdk.contexts" + module: "com.signalwire.sdk.contexts" +--- +# `contexts` + +## Signature + +```java +package com.signalwire.sdk.contexts +``` + +## Classes + + + + Represents a single context containing multiple steps. <p> All setter methods return `this` for fluent chaining. + + + + Builder for multi-step, multi-context AI agent workflows. <p>A ContextBuilder owns one or more `Context`s; each context owns an ordered list of `Step`s. + + + + Configuration for gathering information in a step via the C-side gather\_info system. <p> This produces zero tool\_call/tool\_result entries in LLM-visible history, instead using dynamic step instruction re-injection to present one question at a time. + + + + Represents a single question in a gather\_info configuration. + + + + Represents a single step within a context. <p> Steps can use either raw text or POM-style sections for their prompt content. All setter methods return `this` for fluent chaining. + + diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/contexts/contexts/step/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/contexts/contexts/step/index.mdx new file mode 100644 index 0000000000..2760df1afb --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/contexts/contexts/step/index.mdx @@ -0,0 +1,629 @@ +--- +slug: "/reference/java/com/signalwire/sdk/contexts/contexts/step" +title: "Step" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.contexts.Step" + parent: "com.signalwire.sdk.contexts" + module: "com.signalwire.sdk.contexts" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Step.java" + visibility: "public" +--- +# `Step` + +Represents a single step within a context. + +<p> +Steps can use either raw text or POM-style sections for their prompt content. +All setter methods return `this` for fluent chaining. + +## Signature + +```java +public class Step +``` + +## Methods + +### \ + +#### Signature + +```java +public (String name) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Step.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Step.java) + +Line 39. + +*** + +### addBullets + +Add a POM section with bullet points. + +#### Signature + +```java +public Step addBullets(String title, List bullets) +``` + +#### Parameters + + + + + +#### Returns + +`Step` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Step.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Step.java) + +Line 78. + +*** + +### addGatherQuestion + +Add a question to this step's gather\_info configuration. +String, String) must be called first. + +<p><b>IMPORTANT — gather mode locks function access:</b> While the model +is asking gather questions, the runtime forcibly deactivates ALL of the +step's other functions. + +The only callable tools during a gather +question are: + +<ul> + <li>`gather_submit` (the native answer-submission tool)</li> + <li>Whatever names you pass in this question's `functions` + argument</li> +</ul> + +<p>`next_step` and `change_context` are also filtered out — +the model cannot navigate away until the gather completes. This is by +design: it forces a tight ask → submit → next-question loop. + +<p>If a question needs to call out to a tool (e.g. validate an email, +geocode a ZIP), list that tool name in this question's `functions` +argument. Functions listed here are active ONLY for this question. + +#### Signature + + + + ```java + public Step addGatherQuestion( + String key, + String question, + String type, + boolean confirm, + String prompt, + List functions + ) + ``` + + + + ```java + public Step addGatherQuestion(String key, String question) + ``` + + + +#### Parameters (Overload 1) + + + + + + + + + + + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`Step` + +#### Returns (Overload 2) + +`Step` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Step.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Step.java) + +Line 206. + +*** + +### addSection + +Add a POM section to the step. + +#### Signature + +```java +public Step addSection(String title, String body) +``` + +#### Parameters + + + + + +#### Returns + +`Step` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Step.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Step.java) + +Line 63. + +*** + +### clearSections + +#### Signature + +```java +public Step clearSections() +``` + +#### Returns + +`Step` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Step.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Step.java) + +Line 219. + +*** + +### getName + +#### Signature + +```java +public String getName() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Step.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Step.java) + +Line 44. + +*** + +### setEnd + +Mark this step as terminal for the step flow. + +<p><b>IMPORTANT:</b> `end=true` does NOT end the conversation or +hang up the call. + +It exits step mode entirely after this step executes +— clearing the steps list, current step index, valid\_steps, and +valid\_contexts. The agent keeps running, but operates only under the +base system prompt and the context-level prompt; no more step +instructions are injected and no more `next_step` tool is offered. + +<p>To actually end the call, call a hangup tool or define a +hangup hook. + +#### Signature + +```java +public Step setEnd(boolean end) +``` + +#### Parameters + + + true to exit step mode after this step. + + +#### Returns + +`Step` — this step for chaining. + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Step.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Step.java) + +Line 161. + +*** + +### setFunctions + +Set which non-internal functions are callable while this step is active. + +<p><b>IMPORTANT — inheritance behavior:</b> If you do NOT call this method, +the step inherits whichever function set was active on the previous step +(or the previous context's last step). + +The server-side runtime only +resets the active set when a step explicitly declares its `functions` +field. This is the most common source of bugs in multi-step agents: +forgetting `setFunctions()` on a later step lets the previous step's +tools leak through. Best practice is to call `setFunctions()` +explicitly on every step that should differ from the previous one. + +<p>Keep the per-step active set small: LLM tool selection accuracy +degrades noticeably past ~7-8 simultaneously-active tools per call. +Use per-step whitelisting to partition large tool collections. + +<p>Accepts: +<ul> + <li>`List<String>` — whitelist of function names allowed in this + step. Functions not in the list become inactive.</li> + <li>`List.of()` (empty list) — explicit disable-all.</li> + <li>The string `"none"` — synonym for an empty list.</li> +</ul> + +<p>Internal functions (e.g. `gather_submit`, hangup hook) are +ALWAYS protected and cannot be deactivated by this whitelist. The native +navigation tools `next_step` and `change_context` are +injected automatically when `setValidSteps`/`setValidContexts` +is used; they are not affected by this list and do not need to appear in +it. + +#### Signature + +```java +public Step setFunctions(Object functions) +``` + +#### Parameters + + + a `List` whitelist, an empty list, or the string `"none"`. + + +#### Returns + +`Step` — this step for chaining. + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Step.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Step.java) + +Line 130. + +*** + +### setGatherInfo + +Enable info gathering for this step. + +#### Signature + +```java +public Step setGatherInfo( + String outputKey, + String completionAction, + String prompt +) +``` + +#### Parameters + + + + + + + +#### Returns + +`Step` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Step.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Step.java) + +Line 179. + +*** + +### setResetConsolidate + +#### Signature + +```java +public Step setResetConsolidate(boolean consolidate) +``` + +#### Parameters + + + +#### Returns + +`Step` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Step.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Step.java) + +Line 235. + +*** + +### setResetFullReset + +#### Signature + +```java +public Step setResetFullReset(boolean fullReset) +``` + +#### Parameters + + + +#### Returns + +`Step` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Step.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Step.java) + +Line 240. + +*** + +### setResetSystemPrompt + +#### Signature + +```java +public Step setResetSystemPrompt(String systemPrompt) +``` + +#### Parameters + + + +#### Returns + +`Step` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Step.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Step.java) + +Line 225. + +*** + +### setResetUserPrompt + +#### Signature + +```java +public Step setResetUserPrompt(String userPrompt) +``` + +#### Parameters + + + +#### Returns + +`Step` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Step.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Step.java) + +Line 230. + +*** + +### setSkipToNextStep + +#### Signature + +```java +public Step setSkipToNextStep(boolean skip) +``` + +#### Parameters + + + +#### Returns + +`Step` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Step.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Step.java) + +Line 171. + +*** + +### setSkipUserTurn + +#### Signature + +```java +public Step setSkipUserTurn(boolean skip) +``` + +#### Parameters + + + +#### Returns + +`Step` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Step.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Step.java) + +Line 166. + +*** + +### setStepCriteria + +#### Signature + +```java +public Step setStepCriteria(String criteria) +``` + +#### Parameters + + + +#### Returns + +`Step` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Step.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Step.java) + +Line 90. + +*** + +### setText + +Set the step's prompt text directly. + +#### Signature + +```java +public Step setText(String text) +``` + +#### Parameters + + + +#### Returns + +`Step` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Step.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Step.java) + +Line 51. + +*** + +### setValidContexts + +#### Signature + +```java +public Step setValidContexts(List contexts) +``` + +#### Parameters + + + +#### Returns + +`Step` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Step.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Step.java) + +Line 140. + +*** + +### setValidSteps + +#### Signature + +```java +public Step setValidSteps(List steps) +``` + +#### Parameters + + + +#### Returns + +`Step` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Step.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Step.java) + +Line 135. + +*** + +### toMap + +#### Signature + +```java +public Map toMap() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Step.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Step.java) + +Line 289. + +## Source + +[`src/main/java/com/signalwire/sdk/contexts/Step.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Step.java) + +Line 17. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/datamap/datamap/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/datamap/datamap/index.mdx new file mode 100644 index 0000000000..17d9c2287e --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/datamap/datamap/index.mdx @@ -0,0 +1,570 @@ +--- +slug: "/reference/java/com/signalwire/sdk/datamap/datamap" +title: "datamap" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.datamap" + module: "com.signalwire.sdk.datamap" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/datamap/DataMap.java" +--- +# `datamap` + +Fluent builder for creating SWAIG data\_map configurations. + +<p> +DataMap tools execute on SignalWire servers without requiring webhook endpoints. +Supports variable expansion: `${args.param`}, `${response.field`}, +`${global_data.key`}, `${foreach.item`}. +<p> +All methods return `this` for fluent chaining. + +## Signature + +```java +public class DataMap +``` + +## Methods + +### \ + +#### Signature + +```java +public (String functionName) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/datamap/DataMap.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/datamap/DataMap.java) + +Line 33. + +*** + +### body + +Set request body for the last added webhook (POST/PUT requests). + +#### Signature + +```java +public DataMap body(Map data) +``` + +#### Parameters + + + +#### Returns + +`DataMap` + +#### Source + +[`src/main/java/com/signalwire/sdk/datamap/DataMap.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/datamap/DataMap.java) + +Line 166. + +*** + +### description + +Alias for `#purpose(String)`; sets the LLM-facing tool +description. + +This string is read by the model to decide WHEN to +call this tool. See `#purpose(String)` for bad-vs-good +examples. + +#### Signature + +```java +public DataMap description(String description) +``` + +#### Parameters + + + +#### Returns + +`DataMap` + +#### Source + +[`src/main/java/com/signalwire/sdk/datamap/DataMap.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/datamap/DataMap.java) + +Line 79. + +*** + +### errorKeys + +Set error keys for the most recent webhook (if webhooks exist) or top-level. + +#### Signature + +```java +public DataMap errorKeys(List keys) +``` + +#### Parameters + + + +#### Returns + +`DataMap` + +#### Source + +[`src/main/java/com/signalwire/sdk/datamap/DataMap.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/datamap/DataMap.java) + +Line 218. + +*** + +### expression + +Add an expression pattern for pattern-based responses. + +#### Signature + + + + ```java + public DataMap expression( + String testValue, + String pattern, + FunctionResult output, + FunctionResult nomatchOutput + ) + ``` + + + + ```java + public DataMap expression( + String testValue, + String pattern, + FunctionResult output + ) + ``` + + + +#### Parameters (Overload 1) + + + + + + + + + +#### Parameters (Overload 2) + + + + + + + +#### Returns (Overload 1) + +`DataMap` + +#### Returns (Overload 2) + +`DataMap` + +#### Source + +[`src/main/java/com/signalwire/sdk/datamap/DataMap.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/datamap/DataMap.java) + +Line 128. + +*** + +### fallbackOutput + +Set a fallback output result at the top level (used when all webhooks fail). + +#### Signature + +```java +public DataMap fallbackOutput(FunctionResult result) +``` + +#### Parameters + + + +#### Returns + +`DataMap` + +#### Source + +[`src/main/java/com/signalwire/sdk/datamap/DataMap.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/datamap/DataMap.java) + +Line 210. + +*** + +### foreach + +Process an array from the webhook response using foreach mechanism. + +#### Signature + +```java +public DataMap foreach(Map foreachConfig) +``` + +#### Parameters + + + +#### Returns + +`DataMap` + +#### Source + +[`src/main/java/com/signalwire/sdk/datamap/DataMap.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/datamap/DataMap.java) + +Line 188. + +*** + +### getName + +#### Signature + +```java +public String getName() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/datamap/DataMap.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/datamap/DataMap.java) + +Line 43. + +*** + +### globalErrorKeys + +Set top-level error keys (applies to all webhooks). + +#### Signature + +```java +public DataMap globalErrorKeys(List keys) +``` + +#### Parameters + + + +#### Returns + +`DataMap` + +#### Source + +[`src/main/java/com/signalwire/sdk/datamap/DataMap.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/datamap/DataMap.java) + +Line 230. + +*** + +### output + +Set the output result for the most recent webhook. + +#### Signature + +```java +public DataMap output(FunctionResult result) +``` + +#### Parameters + + + +#### Returns + +`DataMap` + +#### Source + +[`src/main/java/com/signalwire/sdk/datamap/DataMap.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/datamap/DataMap.java) + +Line 199. + +*** + +### parameter + +Add a parameter to this data-map tool — the `description` is +LLM-FACING. + +<p>Each parameter description is rendered into the OpenAI tool schema +under `parameters.properties.<name>.description` and sent to +the model. + +The model uses it to decide HOW to fill in the argument +from user speech. It is prompt engineering, not developer FYI. + +<h3>Bad vs good</h3> +<pre>: .parameter("city", "string", "the city", true, null) +GOOD: .parameter("city", "string", + "The name of the city to get weather for, e.g. " + + "\"San Francisco\". Ask the user if they did not " + + "provide one. Include the state or country if the " + + "city name is ambiguous.", true, null)</pre> + +#### Signature + + + + ```java + public DataMap parameter( + String name, + String paramType, + String description, + boolean required, + List enumValues + ) + ``` + + + + ```java + public DataMap parameter( + String name, + String paramType, + String description, + boolean required + ) + ``` + + + + ```java + public DataMap parameter(String name, String paramType, String description) + ``` + + + +#### Parameters (Overload 1) + + + + + + + + + + + +#### Parameters (Overload 2) + + + + + + + + + +#### Parameters (Overload 3) + + + + + + + +#### Returns (Overload 1) + +`DataMap` + +#### Returns (Overload 2) + +`DataMap` + +#### Returns (Overload 3) + +`DataMap` + +#### Source + +[`src/main/java/com/signalwire/sdk/datamap/DataMap.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/datamap/DataMap.java) + +Line 102. + +*** + +### params + +Set request params for the last added webhook. + +#### Signature + +```java +public DataMap params(Map data) +``` + +#### Parameters + + + +#### Returns + +`DataMap` + +#### Source + +[`src/main/java/com/signalwire/sdk/datamap/DataMap.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/datamap/DataMap.java) + +Line 177. + +*** + +### purpose + +Set the LLM-facing tool description — this is PROMPT ENGINEERING, +not developer documentation. + +<p>The description string is rendered into the OpenAI tool schema +`description` field on every LLM turn. + +The model reads it to +decide WHEN to call this tool. A vague `purpose()` is the #1 +cause of "the model has the right tool but doesn't call it" failures +with data-map tools. + +<h3>Bad vs good</h3> +<pre>: .purpose("weather api") +GOOD: .purpose("Get the current weather conditions and forecast " + + "for a specific city. Use this whenever the user " + + "asks about weather, temperature, rain, or similar " + + "conditions in a named location.")</pre> + +#### Signature + +```java +public DataMap purpose(String description) +``` + +#### Parameters + + + prompt-engineering description of when to call this tool. + + +#### Returns + +`DataMap` + +#### Source + +[`src/main/java/com/signalwire/sdk/datamap/DataMap.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/datamap/DataMap.java) + +Line 68. + +*** + +### toSwaigFunction + +Convert this DataMap to a SWAIG function definition. + +#### Signature + +```java +public Map toSwaigFunction() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/datamap/DataMap.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/datamap/DataMap.java) + +Line 238. + +*** + +### webhook + +Add a webhook API call. + +#### Signature + + + + ```java + public DataMap webhook(String method, String url, Map headers) + ``` + + + + ```java + public DataMap webhook(String method, String url) + ``` + + + +#### Parameters (Overload 1) + + + + + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`DataMap` + +#### Returns (Overload 2) + +`DataMap` + +#### Source + +[`src/main/java/com/signalwire/sdk/datamap/DataMap.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/datamap/DataMap.java) + +Line 148. + +## Source + +[`src/main/java/com/signalwire/sdk/datamap/DataMap.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/datamap/DataMap.java) + +Line 22. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/logging/logging/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/logging/logging/index.mdx new file mode 100644 index 0000000000..f96161e364 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/logging/logging/index.mdx @@ -0,0 +1,27 @@ +--- +slug: "/reference/java/com/signalwire/sdk/logging/logging" +title: "logging" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "com.signalwire.sdk.logging" + module: "com.signalwire.sdk.logging" +--- +# `logging` + +## Signature + +```java +package com.signalwire.sdk.logging +``` + +## Classes + + + + Simple logging system with level control via environment variables. <p> Levels: DEBUG, INFO, WARN, ERROR, OFF <p> Environment variables: <ul> <li>SIGNALWIRE\_LOG\_LEVEL - set log level (debug/info/warn/error/off)</li> <li>SIGNALWIRE\_LOG\_MODE - set to "off" to suppress all output</li> </ul> + + diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/logging/logging/logger/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/logging/logging/logger/index.mdx new file mode 100644 index 0000000000..b55cd4ba58 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/logging/logging/logger/index.mdx @@ -0,0 +1,421 @@ +--- +slug: "/reference/java/com/signalwire/sdk/logging/logging/logger" +title: "Logger" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.logging.Logger" + parent: "com.signalwire.sdk.logging" + module: "com.signalwire.sdk.logging" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java" + visibility: "public" +--- +# `Logger` + +Simple logging system with level control via environment variables. + +<p> +Levels: DEBUG, INFO, WARN, ERROR, OFF +<p> +Environment variables: +<ul> + <li>SIGNALWIRE_LOG_LEVEL - set log level (debug/info/warn/error/off)</li> + <li>SIGNALWIRE_LOG_MODE - set to "off" to suppress all output</li> +</ul> + +**Modifiers:** `final` + +## Signature + +```java +public final class Logger +``` + +## Methods + +### \ + +#### Signature + +```java +public (String name) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/logging/Logger.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java) + +Line 63. + +*** + +### debug + +#### Signature + + + + ```java + public void debug(String message) + ``` + + + + ```java + public void debug(String format, Object args) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/logging/Logger.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java) + +Line 87. + +*** + +### error + +#### Signature + + + + ```java + public void error(String message) + ``` + + + + ```java + public void error(String format, Object args) + ``` + + + + ```java + public void error(String message, Throwable t) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Parameters (Overload 3) + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/logging/Logger.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java) + +Line 111. + +*** + +### getGlobalLevel + +**Modifiers:** `static` + +#### Signature + +```java +public static Level getGlobalLevel() +``` + +#### Returns + +`Level` + +#### Source + +[`src/main/java/com/signalwire/sdk/logging/Logger.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java) + +Line 79. + +*** + +### getLogger + +**Modifiers:** `static` + +#### Signature + + + + ```java + public static Logger getLogger(String name) + ``` + + + + ```java + public static Logger getLogger(Class clazz) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`Logger` + +#### Returns (Overload 2) + +`Logger` + +#### Source + +[`src/main/java/com/signalwire/sdk/logging/Logger.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java) + +Line 67. + +*** + +### info + +#### Signature + + + + ```java + public void info(String message) + ``` + + + + ```java + public void info(String format, Object args) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/logging/Logger.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java) + +Line 95. + +*** + +### isEnabled + +#### Signature + +```java +public boolean isEnabled(Level level) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/logging/Logger.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java) + +Line 83. + +*** + +### setGlobalLevel + +**Modifiers:** `static` + +#### Signature + +```java +public static void setGlobalLevel(Level level) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/logging/Logger.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java) + +Line 75. + +*** + +### warn + +#### Signature + + + + ```java + public void warn(String message) + ``` + + + + ```java + public void warn(String format, Object args) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/logging/Logger.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java) + +Line 103. + +## Enums + +### Level + +#### Signature + +```java +public enum Level +``` + +#### Variants + + + + + + + + + + + +#### Methods + +##### getValue + +###### Signature + +```java +public int getValue() +``` + +###### Returns + +`int` + +###### Source + +[`src/main/java/com/signalwire/sdk/logging/Logger.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java) + +Line 31. + +*** + +##### valueOf + +**Modifiers:** `static` + +###### Signature + +```java +public static Level valueOf(String name) +``` + +###### Parameters + + + +###### Returns + +`Level` + +###### Source + +[`src/main/java/com/signalwire/sdk/logging/Logger.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java) + +*** + +##### values + +**Modifiers:** `static` + +###### Signature + +```java +public static Level[] values() +``` + +###### Returns + +`Level[]` + +###### Source + +[`src/main/java/com/signalwire/sdk/logging/Logger.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java) + +#### Source + +[`src/main/java/com/signalwire/sdk/logging/Logger.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java) + +Line 22. + +## Source + +[`src/main/java/com/signalwire/sdk/logging/Logger.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java) + +Line 20. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/pom/pom/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/pom/pom/index.mdx new file mode 100644 index 0000000000..7b5590af37 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/pom/pom/index.mdx @@ -0,0 +1,31 @@ +--- +slug: "/reference/java/com/signalwire/sdk/pom/pom" +title: "pom" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "com.signalwire.sdk.pom" + module: "com.signalwire.sdk.pom" +--- +# `pom` + +## Signature + +```java +package com.signalwire.sdk.pom +``` + +## Classes + + + + A structured data format for composing, organising, and rendering prompt instructions for large language models. + + + + Represents a section in the Prompt Object Model. <p>Each section contains a title, optional body text, optional bullet points, and can have any number of nested subsections. + + diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/pom/pom/prompt-object-model/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/pom/pom/prompt-object-model/index.mdx new file mode 100644 index 0000000000..ca55e024d6 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/pom/pom/prompt-object-model/index.mdx @@ -0,0 +1,536 @@ +--- +slug: "/reference/java/com/signalwire/sdk/pom/pom/prompt-object-model" +title: "PromptObjectModel" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.pom.PromptObjectModel" + parent: "com.signalwire.sdk.pom" + module: "com.signalwire.sdk.pom" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java" + visibility: "public" +--- +# `PromptObjectModel` + +A structured data format for composing, organising, and rendering prompt +instructions for large language models. + +Java port of the Python reference +`signalwire.pom.pom.PromptObjectModel` (signalwire-python: +`pom/pom.py`). + +<p>The Prompt Object Model provides a tree-based representation of a prompt +document composed of nested `Section`s. Each section can include a +title, body text, bullet points, and arbitrarily nested subsections. + +<p>Idiom mapping: +<ul> + <li>Python `to_dict()` ↔ Java `#toMap()` (returns + `List<Map<String,Object>>`)</li> + <li>Python `from_json(str|dict)` ↔ Java `#fromJson(String)` + and `#fromJsonMap(List)`</li> + <li>Python `from_yaml(str|dict)` ↔ Java `#fromYaml(String)` + and `#fromYamlMap(List)`</li> +</ul> + +## Signature + +```java +public class PromptObjectModel +``` + +## Methods + +### \ + +Empty model (Python parity: `PromptObjectModel()` with debug=False). + +#### Signature + + + + ```java + public () + ``` + + + + ```java + public (boolean debug) + ``` + + + + ```java + public (List> data) + ``` + + + +#### Parameters (Overload 2) + + + +#### Parameters (Overload 3) + + + list of section maps (each entry is one top-level section) + + +#### Source + +[`src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java) + +Line 47. + +*** + +### addPomAsSubsection + +Add another POM's top-level sections as subsections of an existing +section. + +Mirrors Python pom) where +`target` is either a title (String) or a `Section`. + +#### Signature + +```java +public void addPomAsSubsection(Object target, PromptObjectModel pomToAdd) +``` + +#### Parameters + + + + + +#### Throws + +- `IllegalArgumentException` — when `target` is not a String or `Section`, or when the title is not found + +#### Source + +[`src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java) + +Line 200. + +*** + +### addSection + +Add a top-level section. + +Mirrors Python `add_section(...)`. + +#### Signature + + + + ```java + public Section addSection( + String title, + String body, + List bullets, + Boolean numbered, + boolean numberedBullets + ) + ``` + + + + ```java + public Section addSection(String title) + ``` + + + + ```java + public Section addSection(String title, String body) + ``` + + + + ```java + public Section addSection(String title, String body, List bullets) + ``` + + + +#### Parameters (Overload 1) + + + + + + + + + + + +#### Parameters (Overload 2) + + + +#### Parameters (Overload 3) + + + + + +#### Parameters (Overload 4) + + + + + + + +#### Returns (Overload 1) + +`Section` — the newly created `Section` + +#### Returns (Overload 2) + +`Section` + +#### Returns (Overload 3) + +`Section` + +#### Returns (Overload 4) + +`Section` + +#### Throws + +- `IllegalArgumentException` — if a null-title section is added after the first section + +#### Source + +[`src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java) + +Line 144. + +*** + +### findSection + +Recursively search for a section with the given title. + +Mirrors Python +`find_section(title)`. + +#### Signature + +```java +public Optional
findSection(String title) +``` + +#### Parameters + + + +#### Returns + +`Optional
` + +#### Source + +[`src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java) + +Line 175. + +*** + +### fromJson + +Parse a JSON string into a model. + +Mirrors Python +`PromptObjectModel.from_json(str)`. + +**Modifiers:** `static` + +#### Signature + +```java +public static PromptObjectModel fromJson(String json) +``` + +#### Parameters + + + +#### Returns + +`PromptObjectModel` + +#### Source + +[`src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java) + +Line 87. + +*** + +### fromJsonMap + +Build a model from an already-parsed list-of-maps. + +Mirrors Python's +dict-input branch of `from_json`. + +**Modifiers:** `static` + +#### Signature + +```java +public static PromptObjectModel fromJsonMap(List> data) +``` + +#### Parameters + + + +#### Returns + +`PromptObjectModel` + +#### Source + +[`src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java) + +Line 99. + +*** + +### fromYaml + +Parse a YAML string into a model. + +Mirrors Python `from_yaml(str)`. + +**Modifiers:** `static` + +#### Signature + +```java +public static PromptObjectModel fromYaml(String yaml) +``` + +#### Parameters + + + +#### Returns + +`PromptObjectModel` + +#### Source + +[`src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java) + +Line 108. + +*** + +### fromYamlMap + +Build a model from an already-parsed list-of-maps (YAML form). +Mirrors Python's dict-input branch of `from_yaml`. + +**Modifiers:** `static` + +#### Signature + +```java +public static PromptObjectModel fromYamlMap(List> data) +``` + +#### Parameters + + + +#### Returns + +`PromptObjectModel` + +#### Source + +[`src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java) + +Line 129. + +*** + +### getSections + +#### Signature + +```java +public List
getSections() +``` + +#### Returns + +`List
` + +#### Source + +[`src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java) + +Line 71. + +*** + +### isDebug + +#### Signature + +```java +public boolean isDebug() +``` + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java) + +Line 75. + +*** + +### renderMarkdown + +Render the entire model as Markdown. + +Mirrors Python `render_markdown()`. + +#### Signature + +```java +public String renderMarkdown() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java) + +Line 256. + +*** + +### renderXml + +Render the entire model as XML. + +Mirrors Python `render_xml()`. + +#### Signature + +```java +public String renderXml() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java) + +Line 285. + +*** + +### toJson + +Convert to a JSON string with 2-space indent. + +Mirrors Python `to_json`. + +#### Signature + +```java +public String toJson() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java) + +Line 235. + +*** + +### toMap + +Convert the entire model to a list of maps. + +Mirrors Python +`to_dict()` (named `toMap` here because the Java return +type is `List>`). + +#### Signature + +```java +public List> toMap() +``` + +#### Returns + +`List>` + +#### Source + +[`src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java) + +Line 226. + +*** + +### toYaml + +Convert to a YAML string. + +Output matches Python's +default\_flow\_style=False, sort\_keys=False). + +#### Signature + +```java +public String toYaml() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java) + +Line 243. + +## Source + +[`src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java) + +Line 37. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/pom/pom/section/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/pom/pom/section/index.mdx new file mode 100644 index 0000000000..1377365fc8 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/pom/pom/section/index.mdx @@ -0,0 +1,532 @@ +--- +slug: "/reference/java/com/signalwire/sdk/pom/pom/section" +title: "Section" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.pom.Section" + parent: "com.signalwire.sdk.pom" + module: "com.signalwire.sdk.pom" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/Section.java" + visibility: "public" +--- +# `Section` + +Represents a section in the Prompt Object Model. + +<p>Each section contains a title, optional body text, optional bullet points, +and can have any number of nested subsections. + +Mirrors the Python reference +`signalwire.pom.pom.Section` (see signalwire-python: pom/pom.py). + +<p>Idiom mapping: +<ul> + <li>Python `to_dict()` ↔ Java `#toMap()` (returns + `Map<String,Object>`)</li> + <li>Python section_number) ↔ Java + java.util.List)</li> + <li>Python section_number) ↔ Java + java.util.List)</li> +</ul> + +<p>Output format is byte-identical to Python's renderer so cross-port POMs +can round-trip through markdown/XML/JSON. + +## Signature + +```java +public class Section +``` + +## Methods + +### \ + +Construct a section. + +All parameters except `title` default to +empty/null. Mirrors Python's keyword-only constructor. + +#### Signature + + + + ```java + public ( + String title, + String body, + List bullets, + Boolean numbered, + boolean numberedBullets + ) + ``` + + + + ```java + public (String title) + ``` + + + + ```java + public (String title, String body) + ``` + + + + ```java + public (String title, String body, List bullets) + ``` + + + +#### Parameters (Overload 1) + + + section title (may be `null` for an unnamed root) + + + + body text (must not be `null`) + + + + bullet points (may be `null` → empty list) + + + + tri-state numbering flag (may be `null`) + + + + when `true`, bullets render as a numbered list + + +#### Parameters (Overload 2) + + + +#### Parameters (Overload 3) + + + + + +#### Parameters (Overload 4) + + + + + + + +#### Throws + +- `NullPointerException` — if `body` is `null` + +#### Source + +[`src/main/java/com/signalwire/sdk/pom/Section.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/Section.java) + +Line 50. + +*** + +### addBody + +Add or replace the body text for this section. + +Mirrors Python +`Section.add_body`. + +#### Signature + +```java +public void addBody(String body) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/pom/Section.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/Section.java) + +Line 103. + +*** + +### addBullets + +Append bullet points to this section. + +Mirrors Python +`Section.add_bullets` (which extends, not replaces). + +#### Signature + +```java +public void addBullets(List bullets) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/pom/Section.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/Section.java) + +Line 111. + +*** + +### addSubsection + +Add a subsection to this section. + +Mirrors Python +`Section.add_subsection`. Subsections must have a title. + +#### Signature + + + + ```java + public Section addSubsection( + String title, + String body, + List bullets, + Boolean numbered, + boolean numberedBullets + ) + ``` + + + + ```java + public Section addSubsection(String title) + ``` + + + + ```java + public Section addSubsection(String title, String body) + ``` + + + + ```java + public Section addSubsection(String title, String body, List bullets) + ``` + + + +#### Parameters (Overload 1) + + + + + + + + + + + +#### Parameters (Overload 2) + + + +#### Parameters (Overload 3) + + + + + +#### Parameters (Overload 4) + + + + + + + +#### Returns (Overload 1) + +`Section` — the newly created sub-`Section` + +#### Returns (Overload 2) + +`Section` + +#### Returns (Overload 3) + +`Section` + +#### Returns (Overload 4) + +`Section` + +#### Throws + +- `IllegalArgumentException` — if `title` is `null` + +#### Source + +[`src/main/java/com/signalwire/sdk/pom/Section.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/Section.java) + +Line 123. + +*** + +### getBody + +#### Signature + +```java +public String getBody() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/pom/Section.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/Section.java) + +Line 79. + +*** + +### getBullets + +#### Signature + +```java +public List getBullets() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/pom/Section.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/Section.java) + +Line 83. + +*** + +### getNumbered + +#### Signature + +```java +public Boolean getNumbered() +``` + +#### Returns + +`Boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/pom/Section.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/Section.java) + +Line 91. + +*** + +### getSubsections + +#### Signature + +```java +public List
getSubsections() +``` + +#### Returns + +`List
` + +#### Source + +[`src/main/java/com/signalwire/sdk/pom/Section.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/Section.java) + +Line 87. + +*** + +### getTitle + +#### Signature + +```java +public String getTitle() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/pom/Section.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/Section.java) + +Line 75. + +*** + +### isNumberedBullets + +#### Signature + +```java +public boolean isNumberedBullets() +``` + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/pom/Section.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/Section.java) + +Line 95. + +*** + +### renderMarkdown + +Render this section and its subsections as Markdown. + +Mirrors Python +`Section.render_markdown`. + +#### Signature + + + + ```java + public String renderMarkdown(int level, List sectionNumber) + ``` + + + + ```java + public String renderMarkdown() + ``` + + + +#### Parameters (Overload 1) + + + heading level (default 2 → "##") + + + + current numbering breadcrumb (may be `null`) + + +#### Returns (Overload 1) + +`String` + +#### Returns (Overload 2) + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/pom/Section.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/Section.java) + +Line 188. + +*** + +### renderXml + +Render this section and its subsections as XML. + +Mirrors Python +`Section.render_xml`. + +#### Signature + + + + ```java + public String renderXml(int indent, List sectionNumber) + ``` + + + + ```java + public String renderXml() + ``` + + + +#### Parameters (Overload 1) + + + + + +#### Returns (Overload 1) + +`String` + +#### Returns (Overload 2) + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/pom/Section.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/Section.java) + +Line 259. + +*** + +### toMap + +Convert this section to an ordered `Map` for JSON / YAML +serialisation. + +Mirrors Python `Section.to_dict`: keys appear in +the same order (title, body, bullets, subsections, numbered, +numberedBullets) and empty/false values are omitted. + +#### Signature + +```java +public Map toMap() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/pom/Section.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/Section.java) + +Line 154. + +## Source + +[`src/main/java/com/signalwire/sdk/pom/Section.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/Section.java) + +Line 29. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/prefabs/prefabs/concierge-agent/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/prefabs/prefabs/concierge-agent/index.mdx new file mode 100644 index 0000000000..28aaa7901d --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/prefabs/prefabs/concierge-agent/index.mdx @@ -0,0 +1,186 @@ +--- +slug: "/reference/java/com/signalwire/sdk/prefabs/prefabs/concierge-agent" +title: "ConciergeAgent" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.prefabs.ConciergeAgent" + parent: "com.signalwire.sdk.prefabs" + module: "com.signalwire.sdk.prefabs" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/ConciergeAgent.java" + visibility: "public" +--- +# `ConciergeAgent` + +Pre-built agent for venue concierge with amenity info and availability checking. + +## Signature + +```java +public class ConciergeAgent +``` + +## Methods + +### \ + +#### Signature + + + + ```java + public ( + String name, + String venueName, + List> amenities + ) + ``` + + + + ```java + public ( + String name, + String venueName, + List> amenities, + String route, + int port + ) + ``` + + + +#### Parameters (Overload 1) + + + + + + + +#### Parameters (Overload 2) + + + + + + + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/prefabs/ConciergeAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/ConciergeAgent.java) + +Line 16. + +*** + +### amenity + +**Modifiers:** `static` + +#### Signature + +```java +public static Map amenity( + String name, + String description, + String hours, + String location, + String price +) +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/prefabs/ConciergeAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/ConciergeAgent.java) + +Line 120. + +*** + +### getAgent + +#### Signature + +```java +public AgentBase getAgent() +``` + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/prefabs/ConciergeAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/ConciergeAgent.java) + +Line 116. + +*** + +### run + +#### Signature + +```java +public void run() +``` + +#### Throws + +- `Exception` + +#### Source + +[`src/main/java/com/signalwire/sdk/prefabs/ConciergeAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/ConciergeAgent.java) + +Line 118. + +*** + +### serve + +#### Signature + +```java +public void serve() +``` + +#### Throws + +- `Exception` + +#### Source + +[`src/main/java/com/signalwire/sdk/prefabs/ConciergeAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/ConciergeAgent.java) + +Line 117. + +## Source + +[`src/main/java/com/signalwire/sdk/prefabs/ConciergeAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/ConciergeAgent.java) + +Line 12. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/prefabs/prefabs/faq-bot-agent/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/prefabs/prefabs/faq-bot-agent/index.mdx new file mode 100644 index 0000000000..478bc0597b --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/prefabs/prefabs/faq-bot-agent/index.mdx @@ -0,0 +1,171 @@ +--- +slug: "/reference/java/com/signalwire/sdk/prefabs/prefabs/faq-bot-agent" +title: "FAQBotAgent" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.prefabs.FAQBotAgent" + parent: "com.signalwire.sdk.prefabs" + module: "com.signalwire.sdk.prefabs" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/FAQBotAgent.java" + visibility: "public" +--- +# `FAQBotAgent` + +Pre-built agent for keyword-based FAQ matching with optional related suggestions. + +## Signature + +```java +public class FAQBotAgent +``` + +## Methods + +### \ + +#### Signature + + + + ```java + public (String name, List> faqs) + ``` + + + + ```java + public ( + String name, + List> faqs, + String route, + int port + ) + ``` + + + +#### Parameters (Overload 1) + + + + + +#### Parameters (Overload 2) + + + + + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/prefabs/FAQBotAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/FAQBotAgent.java) + +Line 16. + +*** + +### faq + +**Modifiers:** `static` + +#### Signature + +```java +public static Map faq( + String question, + String answer, + List keywords +) +``` + +#### Parameters + + + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/prefabs/FAQBotAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/FAQBotAgent.java) + +Line 115. + +*** + +### getAgent + +#### Signature + +```java +public AgentBase getAgent() +``` + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/prefabs/FAQBotAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/FAQBotAgent.java) + +Line 111. + +*** + +### run + +#### Signature + +```java +public void run() +``` + +#### Throws + +- `Exception` + +#### Source + +[`src/main/java/com/signalwire/sdk/prefabs/FAQBotAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/FAQBotAgent.java) + +Line 113. + +*** + +### serve + +#### Signature + +```java +public void serve() +``` + +#### Throws + +- `Exception` + +#### Source + +[`src/main/java/com/signalwire/sdk/prefabs/FAQBotAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/FAQBotAgent.java) + +Line 112. + +## Source + +[`src/main/java/com/signalwire/sdk/prefabs/FAQBotAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/FAQBotAgent.java) + +Line 12. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/prefabs/prefabs/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/prefabs/prefabs/index.mdx new file mode 100644 index 0000000000..79d3aaca24 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/prefabs/prefabs/index.mdx @@ -0,0 +1,43 @@ +--- +slug: "/reference/java/com/signalwire/sdk/prefabs/prefabs" +title: "prefabs" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "com.signalwire.sdk.prefabs" + module: "com.signalwire.sdk.prefabs" +--- +# `prefabs` + +## Signature + +```java +package com.signalwire.sdk.prefabs +``` + +## Classes + + + + Pre-built agent for venue concierge with amenity info and availability checking. + + + + Pre-built agent for keyword-based FAQ matching with optional related suggestions. + + + + Pre-built agent for sequential question collection with key/value answers. Wraps the info\_gatherer skill with agent-level configuration. + + + + Pre-built agent for department routing with call transfer. Routes callers to appropriate departments via phone numbers or SWML URLs. + + + + Pre-built agent for conducting typed surveys. Supports rating, multiple\_choice, yes\_no, and open\_ended question types. + + diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/prefabs/prefabs/info-gatherer-agent/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/prefabs/prefabs/info-gatherer-agent/index.mdx new file mode 100644 index 0000000000..0c9cb0fc94 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/prefabs/prefabs/info-gatherer-agent/index.mdx @@ -0,0 +1,197 @@ +--- +slug: "/reference/java/com/signalwire/sdk/prefabs/prefabs/info-gatherer-agent" +title: "InfoGathererAgent" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.prefabs.InfoGathererAgent" + parent: "com.signalwire.sdk.prefabs" + module: "com.signalwire.sdk.prefabs" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/InfoGathererAgent.java" + visibility: "public" +--- +# `InfoGathererAgent` + +Pre-built agent for sequential question collection with key/value answers. +Wraps the info\_gatherer skill with agent-level configuration. + +## Signature + +```java +public class InfoGathererAgent +``` + +## Methods + +### \ + +#### Signature + + + + ```java + public (String name, List> questions) + ``` + + + + ```java + public ( + String name, + List> questions, + String route, + int port + ) + ``` + + + +#### Parameters (Overload 1) + + + + + +#### Parameters (Overload 2) + + + + + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/prefabs/InfoGathererAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/InfoGathererAgent.java) + +Line 15. + +*** + +### getAgent + +#### Signature + +```java +public AgentBase getAgent() +``` + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/prefabs/InfoGathererAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/InfoGathererAgent.java) + +Line 42. + +*** + +### question + +Convenience builder for questions. + +**Modifiers:** `static` + +#### Signature + + + + ```java + public static Map question(String keyName, String questionText) + ``` + + + + ```java + public static Map question( + String keyName, + String questionText, + boolean confirm, + String promptAdd + ) + ``` + + + +#### Parameters (Overload 1) + + + + + +#### Parameters (Overload 2) + + + + + + + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/prefabs/InfoGathererAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/InfoGathererAgent.java) + +Line 57. + +*** + +### run + +#### Signature + +```java +public void run() +``` + +#### Throws + +- `Exception` + +#### Source + +[`src/main/java/com/signalwire/sdk/prefabs/InfoGathererAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/InfoGathererAgent.java) + +Line 50. + +*** + +### serve + +#### Signature + +```java +public void serve() +``` + +#### Throws + +- `Exception` + +#### Source + +[`src/main/java/com/signalwire/sdk/prefabs/InfoGathererAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/InfoGathererAgent.java) + +Line 46. + +## Source + +[`src/main/java/com/signalwire/sdk/prefabs/InfoGathererAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/InfoGathererAgent.java) + +Line 11. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/prefabs/prefabs/receptionist-agent/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/prefabs/prefabs/receptionist-agent/index.mdx new file mode 100644 index 0000000000..c5fdf9e8ee --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/prefabs/prefabs/receptionist-agent/index.mdx @@ -0,0 +1,213 @@ +--- +slug: "/reference/java/com/signalwire/sdk/prefabs/prefabs/receptionist-agent" +title: "ReceptionistAgent" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.prefabs.ReceptionistAgent" + parent: "com.signalwire.sdk.prefabs" + module: "com.signalwire.sdk.prefabs" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/ReceptionistAgent.java" + visibility: "public" +--- +# `ReceptionistAgent` + +Pre-built agent for department routing with call transfer. +Routes callers to appropriate departments via phone numbers or SWML URLs. + +## Signature + +```java +public class ReceptionistAgent +``` + +## Methods + +### \ + +#### Signature + + + + ```java + public ( + String name, + String greeting, + Map> departments + ) + ``` + + + + ```java + public ( + String name, + String greeting, + Map> departments, + String route, + int port + ) + ``` + + + +#### Parameters (Overload 1) + + + + + + + +#### Parameters (Overload 2) + + + + + + + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/prefabs/ReceptionistAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/ReceptionistAgent.java) + +Line 15. + +*** + +### getAgent + +#### Signature + +```java +public AgentBase getAgent() +``` + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/prefabs/ReceptionistAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/ReceptionistAgent.java) + +Line 59. + +*** + +### phoneDepartment + +Create a phone-based department config. + +**Modifiers:** `static` + +#### Signature + +```java +public static Map phoneDepartment( + String description, + String phoneNumber +) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/prefabs/ReceptionistAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/ReceptionistAgent.java) + +Line 66. + +*** + +### run + +#### Signature + +```java +public void run() +``` + +#### Throws + +- `Exception` + +#### Source + +[`src/main/java/com/signalwire/sdk/prefabs/ReceptionistAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/ReceptionistAgent.java) + +Line 61. + +*** + +### serve + +#### Signature + +```java +public void serve() +``` + +#### Throws + +- `Exception` + +#### Source + +[`src/main/java/com/signalwire/sdk/prefabs/ReceptionistAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/ReceptionistAgent.java) + +Line 60. + +*** + +### swmlDepartment + +Create a SWML-based department config. + +**Modifiers:** `static` + +#### Signature + +```java +public static Map swmlDepartment( + String description, + String swmlUrl +) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/prefabs/ReceptionistAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/ReceptionistAgent.java) + +Line 77. + +## Source + +[`src/main/java/com/signalwire/sdk/prefabs/ReceptionistAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/ReceptionistAgent.java) + +Line 11. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/prefabs/prefabs/survey-agent/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/prefabs/prefabs/survey-agent/index.mdx new file mode 100644 index 0000000000..2daedca0c6 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/prefabs/prefabs/survey-agent/index.mdx @@ -0,0 +1,258 @@ +--- +slug: "/reference/java/com/signalwire/sdk/prefabs/prefabs/survey-agent" +title: "SurveyAgent" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.prefabs.SurveyAgent" + parent: "com.signalwire.sdk.prefabs" + module: "com.signalwire.sdk.prefabs" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/SurveyAgent.java" + visibility: "public" +--- +# `SurveyAgent` + +Pre-built agent for conducting typed surveys. +Supports rating, multiple\_choice, yes\_no, and open\_ended question types. + +## Signature + +```java +public class SurveyAgent +``` + +## Methods + +### \ + +#### Signature + + + + ```java + public (String name, List> questions) + ``` + + + + ```java + public ( + String name, + List> questions, + String completionMessage, + String route, + int port + ) + ``` + + + +#### Parameters (Overload 1) + + + + + +#### Parameters (Overload 2) + + + + + + + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/prefabs/SurveyAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/SurveyAgent.java) + +Line 19. + +*** + +### getAgent + +#### Signature + +```java +public AgentBase getAgent() +``` + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/prefabs/SurveyAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/SurveyAgent.java) + +Line 167. + +*** + +### multipleChoiceQuestion + +**Modifiers:** `static` + +#### Signature + +```java +public static Map multipleChoiceQuestion( + String question, + List options +) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/prefabs/SurveyAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/SurveyAgent.java) + +Line 175. + +*** + +### openEndedQuestion + +**Modifiers:** `static` + +#### Signature + +```java +public static Map openEndedQuestion(String question) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/prefabs/SurveyAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/SurveyAgent.java) + +Line 183. + +*** + +### ratingQuestion + +**Modifiers:** `static` + +#### Signature + +```java +public static Map ratingQuestion( + String question, + int min, + int max +) +``` + +#### Parameters + + + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/prefabs/SurveyAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/SurveyAgent.java) + +Line 171. + +*** + +### run + +#### Signature + +```java +public void run() +``` + +#### Throws + +- `Exception` + +#### Source + +[`src/main/java/com/signalwire/sdk/prefabs/SurveyAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/SurveyAgent.java) + +Line 169. + +*** + +### serve + +#### Signature + +```java +public void serve() +``` + +#### Throws + +- `Exception` + +#### Source + +[`src/main/java/com/signalwire/sdk/prefabs/SurveyAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/SurveyAgent.java) + +Line 168. + +*** + +### yesNoQuestion + +**Modifiers:** `static` + +#### Signature + +```java +public static Map yesNoQuestion(String question) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/prefabs/SurveyAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/SurveyAgent.java) + +Line 179. + +## Source + +[`src/main/java/com/signalwire/sdk/prefabs/SurveyAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/SurveyAgent.java) + +Line 13. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/ai-action/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/ai-action/index.mdx new file mode 100644 index 0000000000..21a6437b9f --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/ai-action/index.mdx @@ -0,0 +1,102 @@ +--- +slug: "/reference/java/com/signalwire/sdk/relay/relay/action/ai-action" +title: "AiAction" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.Action.AiAction" + parent: "com.signalwire.sdk.relay.Action" + module: "com.signalwire.sdk.relay" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java" + visibility: "public" +--- +# `AiAction` + +AI action with stop sub-command. + +**Modifiers:** `static` + +## Signature + +```java +public static class AiAction extends Action +``` + +## Inheritance + +**Extends:** [Action](/docs/sdk-reference/reference/java/com/signalwire/sdk/relay/relay/action) + +## Methods + +### \ + +#### Signature + +```java +public (String controlId, Call call) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 428. + +*** + +### isTerminal + +**Decorators:** `@Override` + +#### Signature + +```java +protected boolean isTerminal(String actionState) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 432. + +*** + +### stop + +**Decorators:** `@Override` + +#### Signature + +```java +public void stop() +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 438. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 427. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/collect-action/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/collect-action/index.mdx new file mode 100644 index 0000000000..63e6b2f50b --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/collect-action/index.mdx @@ -0,0 +1,92 @@ +--- +slug: "/reference/java/com/signalwire/sdk/relay/relay/action/collect-action" +title: "CollectAction" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.Action.CollectAction" + parent: "com.signalwire.sdk.relay.Action" + module: "com.signalwire.sdk.relay" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java" + visibility: "public" +--- +# `CollectAction` + +Collect action with stop and start\_input\_timers sub-commands. + +**Modifiers:** `static` + +## Signature + +```java +public static class CollectAction extends Action +``` + +## Inheritance + +**Extends:** [Action](/docs/sdk-reference/reference/java/com/signalwire/sdk/relay/relay/action) + +## Methods + +### \ + +#### Signature + +```java +public (String controlId, Call call) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 248. + +*** + +### startInputTimers + +#### Signature + +```java +public void startInputTimers() +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 261. + +*** + +### stop + +**Decorators:** `@Override` + +#### Signature + +```java +public void stop() +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 252. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 247. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/detect-action/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/detect-action/index.mdx new file mode 100644 index 0000000000..f80f1912ad --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/detect-action/index.mdx @@ -0,0 +1,76 @@ +--- +slug: "/reference/java/com/signalwire/sdk/relay/relay/action/detect-action" +title: "DetectAction" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.Action.DetectAction" + parent: "com.signalwire.sdk.relay.Action" + module: "com.signalwire.sdk.relay" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java" + visibility: "public" +--- +# `DetectAction` + +Detect action with stop sub-command. + +**Modifiers:** `static` + +## Signature + +```java +public static class DetectAction extends Action +``` + +## Inheritance + +**Extends:** [Action](/docs/sdk-reference/reference/java/com/signalwire/sdk/relay/relay/action) + +## Methods + +### \ + +#### Signature + +```java +public (String controlId, Call call) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 230. + +*** + +### stop + +**Decorators:** `@Override` + +#### Signature + +```java +public void stop() +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 234. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 229. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/index.mdx new file mode 100644 index 0000000000..2310fa2fac --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/index.mdx @@ -0,0 +1,392 @@ +--- +slug: "/reference/java/com/signalwire/sdk/relay/relay/action" +title: "Action" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.Action" + parent: "com.signalwire.sdk.relay" + module: "com.signalwire.sdk.relay" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java" + visibility: "public" +--- +# `Action` + +Base class for long-running call actions tracked by `control_id`. + +<p> +Actions support three completion patterns: +<ol> + <li><b>Wait inline</b>: `action.waitForCompletion()` blocks until terminal</li> + <li><b>Fire and forget</b>: don't wait, check `isDone()` later</li> + <li><b>Callback</b>: pass an `onCompleted` callback that fires on terminal state</li> +</ol> +<p> +Subclasses add action-specific sub-commands (pause, resume, volume, etc.). + +## Signature + +```java +public class Action +``` + +## Classes + + + + AI action with stop sub-command. + + + + Collect action with stop and start\_input\_timers sub-commands. + + + + Detect action with stop sub-command. + + + + Pay action with stop sub-command. + + + + Play action with pause, resume, volume, and stop sub-commands. + + + + Play-and-collect action. <p> Shares one `control_id` across both play and collect phases. Events arrive as BOTH `calling.call.play` and `calling.call.collect`. This action only resolves on collect events, NOT play events. + + + + Receive fax action with stop sub-command. + + + + Record action with pause, resume, and stop sub-commands. + + + + Send fax action with stop sub-command. + + + + Stream action with stop sub-command. + + + + Tap action with stop sub-command. + + + + Transcribe action with stop sub-command. + + + +## Methods + +### \ + +#### Signature + +```java +public (String controlId, Call call) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 40. + +*** + +### getCall + +#### Signature + +```java +public Call getCall() +``` + +#### Returns + +`Call` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 51. + +*** + +### getControlId + +#### Signature + +```java +public String getControlId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 47. + +*** + +### getResult + +#### Signature + +```java +public RelayEvent getResult() +``` + +#### Returns + +`RelayEvent` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 59. + +*** + +### getState + +#### Signature + +```java +public String getState() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 55. + +*** + +### isDone + +#### Signature + +```java +public boolean isDone() +``` + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 63. + +*** + +### isTerminal + +Check if a state is terminal for this action type. +Subclasses may override for custom terminal states. + +#### Signature + +```java +protected boolean isTerminal(String actionState) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 132. + +*** + +### resolve + +Resolve the action immediately (e.g., on call-gone 404/410). + +#### Signature + +```java +public void resolve(RelayEvent event) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 119. + +*** + +### setOnCompleted + +#### Signature + +```java +public void setOnCompleted(Consumer onCompleted) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 67. + +*** + +### stop + +Stop the action. + +#### Signature + +```java +public void stop() +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 101. + +*** + +### toString + +**Decorators:** `@Override` + +#### Signature + +```java +public String toString() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 146. + +*** + +### updateState + +Update state from an incoming event. + +Resolves the completion future +when a terminal state is reached. + +#### Signature + +```java +public void updateState(String newState, RelayEvent event) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 109. + +*** + +### waitForCompletion + +Block until the action reaches a terminal state. + +#### Signature + + + + ```java + public RelayEvent waitForCompletion() + ``` + + + + ```java + public RelayEvent waitForCompletion(long timeoutMs) + ``` + + + +#### Parameters (Overload 2) + + + timeout in milliseconds + + +#### Returns (Overload 1) + +`RelayEvent` — the terminal event + +#### Returns (Overload 2) + +`RelayEvent` — the terminal event, or null on timeout + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 76. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 28. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/pay-action/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/pay-action/index.mdx new file mode 100644 index 0000000000..2df7cc2316 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/pay-action/index.mdx @@ -0,0 +1,76 @@ +--- +slug: "/reference/java/com/signalwire/sdk/relay/relay/action/pay-action" +title: "PayAction" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.Action.PayAction" + parent: "com.signalwire.sdk.relay.Action" + module: "com.signalwire.sdk.relay" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java" + visibility: "public" +--- +# `PayAction` + +Pay action with stop sub-command. + +**Modifiers:** `static` + +## Signature + +```java +public static class PayAction extends Action +``` + +## Inheritance + +**Extends:** [Action](/docs/sdk-reference/reference/java/com/signalwire/sdk/relay/relay/action) + +## Methods + +### \ + +#### Signature + +```java +public (String controlId, Call call) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 305. + +*** + +### stop + +**Decorators:** `@Override` + +#### Signature + +```java +public void stop() +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 309. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 304. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/play-action/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/play-action/index.mdx new file mode 100644 index 0000000000..c994aaed04 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/play-action/index.mdx @@ -0,0 +1,128 @@ +--- +slug: "/reference/java/com/signalwire/sdk/relay/relay/action/play-action" +title: "PlayAction" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.Action.PlayAction" + parent: "com.signalwire.sdk.relay.Action" + module: "com.signalwire.sdk.relay" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java" + visibility: "public" +--- +# `PlayAction` + +Play action with pause, resume, volume, and stop sub-commands. + +**Modifiers:** `static` + +## Signature + +```java +public static class PlayAction extends Action +``` + +## Inheritance + +**Extends:** [Action](/docs/sdk-reference/reference/java/com/signalwire/sdk/relay/relay/action) + +## Methods + +### \ + +#### Signature + +```java +public (String controlId, Call call) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 158. + +*** + +### pause + +#### Signature + +```java +public void pause() +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 167. + +*** + +### resume + +#### Signature + +```java +public void resume() +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 171. + +*** + +### stop + +**Decorators:** `@Override` + +#### Signature + +```java +public void stop() +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 162. + +*** + +### volume + +#### Signature + +```java +public void volume(double volumeDb) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 175. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 157. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/play-and-collect-action/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/play-and-collect-action/index.mdx new file mode 100644 index 0000000000..0799fead45 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/play-and-collect-action/index.mdx @@ -0,0 +1,101 @@ +--- +slug: "/reference/java/com/signalwire/sdk/relay/relay/action/play-and-collect-action" +title: "PlayAndCollectAction" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.Action.PlayAndCollectAction" + parent: "com.signalwire.sdk.relay.Action" + module: "com.signalwire.sdk.relay" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java" + visibility: "public" +--- +# `PlayAndCollectAction` + +Play-and-collect action. + +<p> +Shares one `control_id` across both play and collect phases. +Events arrive as BOTH `calling.call.play` and `calling.call.collect`. +This action only resolves on collect events, NOT play events. + +**Modifiers:** `static` + +## Signature + +```java +public static class PlayAndCollectAction extends Action +``` + +## Inheritance + +**Extends:** [Action](/docs/sdk-reference/reference/java/com/signalwire/sdk/relay/relay/action) + +## Methods + +### \ + +#### Signature + +```java +public (String controlId, Call call) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 278. + +*** + +### stop + +**Decorators:** `@Override` + +#### Signature + +```java +public void stop() +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 282. + +*** + +### volume + +#### Signature + +```java +public void volume(double volumeDb) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 291. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 277. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/receive-fax-action/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/receive-fax-action/index.mdx new file mode 100644 index 0000000000..b08a65624c --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/receive-fax-action/index.mdx @@ -0,0 +1,76 @@ +--- +slug: "/reference/java/com/signalwire/sdk/relay/relay/action/receive-fax-action" +title: "ReceiveFaxAction" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.Action.ReceiveFaxAction" + parent: "com.signalwire.sdk.relay.Action" + module: "com.signalwire.sdk.relay" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java" + visibility: "public" +--- +# `ReceiveFaxAction` + +Receive fax action with stop sub-command. + +**Modifiers:** `static` + +## Signature + +```java +public static class ReceiveFaxAction extends Action +``` + +## Inheritance + +**Extends:** [Action](/docs/sdk-reference/reference/java/com/signalwire/sdk/relay/relay/action) + +## Methods + +### \ + +#### Signature + +```java +public (String controlId, Call call) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 341. + +*** + +### stop + +**Decorators:** `@Override` + +#### Signature + +```java +public void stop() +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 345. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 340. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/record-action/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/record-action/index.mdx new file mode 100644 index 0000000000..8c4d9a462b --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/record-action/index.mdx @@ -0,0 +1,128 @@ +--- +slug: "/reference/java/com/signalwire/sdk/relay/relay/action/record-action" +title: "RecordAction" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.Action.RecordAction" + parent: "com.signalwire.sdk.relay.Action" + module: "com.signalwire.sdk.relay" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java" + visibility: "public" +--- +# `RecordAction` + +Record action with pause, resume, and stop sub-commands. + +**Modifiers:** `static` + +## Signature + +```java +public static class RecordAction extends Action +``` + +## Inheritance + +**Extends:** [Action](/docs/sdk-reference/reference/java/com/signalwire/sdk/relay/relay/action) + +## Methods + +### \ + +#### Signature + +```java +public (String controlId, Call call) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 194. + +*** + +### pause + +#### Signature + +```java +public void pause() +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 203. + +*** + +### pauseWithBehavior + +#### Signature + +```java +public void pauseWithBehavior(String behavior) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 207. + +*** + +### resume + +#### Signature + +```java +public void resume() +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 213. + +*** + +### stop + +**Decorators:** `@Override` + +#### Signature + +```java +public void stop() +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 198. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 193. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/send-fax-action/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/send-fax-action/index.mdx new file mode 100644 index 0000000000..f4f5061e36 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/send-fax-action/index.mdx @@ -0,0 +1,76 @@ +--- +slug: "/reference/java/com/signalwire/sdk/relay/relay/action/send-fax-action" +title: "SendFaxAction" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.Action.SendFaxAction" + parent: "com.signalwire.sdk.relay.Action" + module: "com.signalwire.sdk.relay" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java" + visibility: "public" +--- +# `SendFaxAction` + +Send fax action with stop sub-command. + +**Modifiers:** `static` + +## Signature + +```java +public static class SendFaxAction extends Action +``` + +## Inheritance + +**Extends:** [Action](/docs/sdk-reference/reference/java/com/signalwire/sdk/relay/relay/action) + +## Methods + +### \ + +#### Signature + +```java +public (String controlId, Call call) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 323. + +*** + +### stop + +**Decorators:** `@Override` + +#### Signature + +```java +public void stop() +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 327. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 322. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/stream-action/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/stream-action/index.mdx new file mode 100644 index 0000000000..c78a6be15c --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/stream-action/index.mdx @@ -0,0 +1,102 @@ +--- +slug: "/reference/java/com/signalwire/sdk/relay/relay/action/stream-action" +title: "StreamAction" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.Action.StreamAction" + parent: "com.signalwire.sdk.relay.Action" + module: "com.signalwire.sdk.relay" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java" + visibility: "public" +--- +# `StreamAction` + +Stream action with stop sub-command. + +**Modifiers:** `static` + +## Signature + +```java +public static class StreamAction extends Action +``` + +## Inheritance + +**Extends:** [Action](/docs/sdk-reference/reference/java/com/signalwire/sdk/relay/relay/action) + +## Methods + +### \ + +#### Signature + +```java +public (String controlId, Call call) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 382. + +*** + +### isTerminal + +**Decorators:** `@Override` + +#### Signature + +```java +protected boolean isTerminal(String actionState) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 386. + +*** + +### stop + +**Decorators:** `@Override` + +#### Signature + +```java +public void stop() +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 391. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 381. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/tap-action/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/tap-action/index.mdx new file mode 100644 index 0000000000..ff1ed045ab --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/tap-action/index.mdx @@ -0,0 +1,102 @@ +--- +slug: "/reference/java/com/signalwire/sdk/relay/relay/action/tap-action" +title: "TapAction" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.Action.TapAction" + parent: "com.signalwire.sdk.relay.Action" + module: "com.signalwire.sdk.relay" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java" + visibility: "public" +--- +# `TapAction` + +Tap action with stop sub-command. + +**Modifiers:** `static` + +## Signature + +```java +public static class TapAction extends Action +``` + +## Inheritance + +**Extends:** [Action](/docs/sdk-reference/reference/java/com/signalwire/sdk/relay/relay/action) + +## Methods + +### \ + +#### Signature + +```java +public (String controlId, Call call) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 359. + +*** + +### isTerminal + +**Decorators:** `@Override` + +#### Signature + +```java +protected boolean isTerminal(String actionState) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 363. + +*** + +### stop + +**Decorators:** `@Override` + +#### Signature + +```java +public void stop() +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 368. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 358. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/transcribe-action/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/transcribe-action/index.mdx new file mode 100644 index 0000000000..b1b38a6c16 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/transcribe-action/index.mdx @@ -0,0 +1,102 @@ +--- +slug: "/reference/java/com/signalwire/sdk/relay/relay/action/transcribe-action" +title: "TranscribeAction" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.Action.TranscribeAction" + parent: "com.signalwire.sdk.relay.Action" + module: "com.signalwire.sdk.relay" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java" + visibility: "public" +--- +# `TranscribeAction` + +Transcribe action with stop sub-command. + +**Modifiers:** `static` + +## Signature + +```java +public static class TranscribeAction extends Action +``` + +## Inheritance + +**Extends:** [Action](/docs/sdk-reference/reference/java/com/signalwire/sdk/relay/relay/action) + +## Methods + +### \ + +#### Signature + +```java +public (String controlId, Call call) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 405. + +*** + +### isTerminal + +**Decorators:** `@Override` + +#### Signature + +```java +protected boolean isTerminal(String actionState) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 409. + +*** + +### stop + +**Decorators:** `@Override` + +#### Signature + +```java +public void stop() +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 414. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 404. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/call/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/call/index.mdx new file mode 100644 index 0000000000..20abedbb10 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/call/index.mdx @@ -0,0 +1,2561 @@ +--- +slug: "/reference/java/com/signalwire/sdk/relay/relay/call" +title: "Call" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.Call" + parent: "com.signalwire.sdk.relay" + module: "com.signalwire.sdk.relay" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java" + visibility: "public" +--- +# `Call` + +Represents a RELAY call with 30+ methods organized by category. + +<p> +Methods are grouped into: +<ul> + <li><b>Simple fire-and-response</b>: answer, hangup, pass, hold, etc.</li> + <li><b>Action-based</b>: play, record, detect, collect, etc. + +(return `Action`)</li> + + <li><b>Connection</b>: connect, disconnect, transfer</li> + <li><b>Conference</b>: joinConference, leaveConference</li> + <li><b>AI</b>: ai, aiMessage, aiHold, aiUnhold, amazonBedrock</li> +</ul> + +Event routing: the `RelayClient` routes events to calls by `call_id`. +Each call maintains an `actions` map keyed by `control_id` for action events. + +## Signature + +```java +public class Call +``` + +## Methods + +### \ + +#### Signature + +```java +public (String callId, String nodeId) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 52. + +*** + +### ai + +Start an AI agent on the call. + +#### Signature + + + + ```java + public Action.AiAction ai(Map aiConfig) + ``` + + + + ```java + public Action.AiAction ai(Map prompt, String controlId) + ``` + + + +#### Parameters (Overload 1) + + + AI configuration + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`Action.AiAction` — an AiAction + +#### Returns (Overload 2) + +`Action.AiAction` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 1183. + +*** + +### aiHold + +Put AI on hold. + +#### Signature + +```java +public Map aiHold(Map options) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 1236. + +*** + +### aiMessage + +Send a message to an active AI session. + +#### Signature + +```java +public Map aiMessage(Map messageConfig) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 1225. + +*** + +### aiUnhold + +Resume AI from hold. + +#### Signature + +```java +public Map aiUnhold(Map options) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 1247. + +*** + +### amazonBedrock + +Start Amazon Bedrock AI on the call. + +#### Signature + +```java +public Map amazonBedrock(Map config) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 1214. + +*** + +### answer + +Answer the call. + +#### Signature + +```java +public Map answer() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 226. + +*** + +### bindDigit + +Bind a digit sequence to a method. + +#### Signature + +```java +public Map bindDigit( + String digits, + String bindMethod, + Map options +) +``` + +#### Parameters + + + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 305. + +*** + +### clearDigitBindings + +Clear digit bindings. + +#### Signature + + + + ```java + public Map clearDigitBindings() + ``` + + + + ```java + public Map clearDigitBindings(String realm) + ``` + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 318. + +*** + +### collect + +Collect digits or speech input. + +#### Signature + +```java +public Action.CollectAction collect( + Map collectConfig, + Map options +) +``` + +#### Parameters + + + collect configuration + + + + optional parameters + + +#### Returns + +`Action.CollectAction` — a CollectAction + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 607. + +*** + +### collectDigits + +Collect digits with an explicit control\_id (test helper). + +#### Signature + + + + ```java + public Action.CollectAction collectDigits( + Map digitsConfig, + String controlId + ) + ``` + + + + ```java + public Action.CollectAction collectDigits( + Map digitsConfig, + boolean startInputTimers, + String controlId + ) + ``` + + + +#### Parameters (Overload 1) + + + + + +#### Parameters (Overload 2) + + + + + + + +#### Returns (Overload 1) + +`Action.CollectAction` + +#### Returns (Overload 2) + +`Action.CollectAction` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 629. + +*** + +### connect + +Connect another device to this call. + +#### Signature + +```java +public Map connect( + List>> devices, + Map options +) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 393. + +*** + +### denoise + +Enable denoise on the call. + +#### Signature + +```java +public Map denoise() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 271. + +*** + +### denoiseStop + +Disable denoise on the call. + +#### Signature + +```java +public Map denoiseStop() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 278. + +*** + +### detect + +Detect answering machine, fax, or digits. + +#### Signature + +```java +public Action.DetectAction detect( + Map detectConfig, + Map options +) +``` + +#### Parameters + + + detect configuration + + + + optional parameters (timeout, etc.) + + +#### Returns + +`Action.DetectAction` — a DetectAction + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 573. + +*** + +### detectAnsweringMachine + +Detect human vs answering machine (AMD). + +Typed convenience over +`#detect`. + +<p> +Builds params:{...only-provided...}}. Recognised +option keys (all folded into the machine params): `initial_timeout`, +`end_silence_timeout`, `machine_voice_threshold`, +`machine_words_threshold`, `detect_interruptions`, +`detect_message_end`; plus `timeout` (passed to detect). + +#### Signature + + + + ```java + public Action.DetectAction detectAnsweringMachine(Map options) + ``` + + + + ```java + public Action.DetectAction detectAnsweringMachine() + ``` + + + +#### Parameters (Overload 1) + + + optional AMD tuning + timeout + + +#### Returns (Overload 1) + +`Action.DetectAction` — a DetectAction + +#### Returns (Overload 2) + +`Action.DetectAction` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 824. + +*** + +### detectDigit + +Detect DTMF digits. + +Typed convenience over `#detect`. + +<p> +Builds params:{digits?}}. Recognised option keys: +`digits` (folded into the detect params) and `timeout` +(passed to detect). + +#### Signature + + + + ```java + public Action.DetectAction detectDigit(Map options) + ``` + + + + ```java + public Action.DetectAction detectDigit() + ``` + + + +#### Parameters (Overload 1) + + + optional digits/timeout + + +#### Returns (Overload 1) + +`Action.DetectAction` — a DetectAction + +#### Returns (Overload 2) + +`Action.DetectAction` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 798. + +*** + +### detectFax + +Detect a fax tone (CED/CNG). + +Typed convenience over `#detect`. + +<p> +Builds params:{tone?}}. Recognised option keys: +`tone` (folded into the detect params) and `timeout` +(passed to detect). + +#### Signature + + + + ```java + public Action.DetectAction detectFax(Map options) + ``` + + + + ```java + public Action.DetectAction detectFax() + ``` + + + +#### Parameters (Overload 1) + + + optional tone/timeout + + +#### Returns (Overload 1) + +`Action.DetectAction` — a DetectAction + +#### Returns (Overload 2) + +`Action.DetectAction` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 852. + +*** + +### detectWith + +Detect with an explicit control\_id (test helper). + +Wraps in <config>. + +#### Signature + +```java +public Action.DetectAction detectWith( + Map detectConfig, + String controlId +) +``` + +#### Parameters + + + + + +#### Returns + +`Action.DetectAction` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 596. + +*** + +### disconnect + +Disconnect all connected calls. + +#### Signature + +```java +public Map disconnect() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 405. + +*** + +### dispatchEvent + +Dispatch an event to this call. + +Routes action events by control\_id. + +#### Signature + +```java +public void dispatchEvent(RelayEvent event) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 123. + +*** + +### echo + +Start echo on the call. + +#### Signature + +```java +public Map echo(Map options) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 285. + +*** + +### getAction + +Get an action by control\_id. + +#### Signature + +```java +public Action getAction(String controlId) +``` + +#### Parameters + + + +#### Returns + +`Action` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 217. + +*** + +### getCallId + +#### Signature + +```java +public String getCallId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 60. + +*** + +### getCallState + +The current call state as a typed `CallState`, <em>alongside</em> +the raw string `#getState()` (which stays canonical for parity and +forward-compat). + +Returns `Optional.empty()` when the live wire state +is not one of the five known `CallState` values — the set mirrors +server-emitted values that can grow, so an unrecognised state is tolerated +here rather than crashing the caller. The present value always agrees with +`getState()`: `getCallState().get().getValue().equals(getState())`. + +#### Signature + +```java +public Optional getCallState() +``` + +#### Returns + +`Optional` — the typed state, or empty if the raw state is unknown/unset. + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 75. + +*** + +### getDevice + +#### Signature + +```java +public Map getDevice() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 62. + +*** + +### getDirection + +Call direction (inbound/outbound) once known; empty until set. + +#### Signature + +```java +public Optional getDirection() +``` + +#### Returns + +`Optional` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 95. + +*** + +### getEndReason + +End reason once the call has ended; empty while the call is live. + +#### Signature + +```java +public Optional getEndReason() +``` + +#### Returns + +`Optional` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 93. + +*** + +### getNodeId + +Node id once the call is bound to a RELAY node; empty until then. + +#### Signature + +```java +public Optional getNodeId() +``` + +#### Returns + +`Optional` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 91. + +*** + +### getState + +#### Signature + +```java +public String getState() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 61. + +*** + +### getTag + +Dial-correlation tag for outbound calls; empty for inbound. + +#### Signature + +```java +public Optional getTag() +``` + +#### Returns + +`Optional` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 97. + +*** + +### hangup + +Hang up the call. + +#### Signature + + + + ```java + public Map hangup() + ``` + + + + ```java + public Map hangup(String reason) + ``` + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 234. + +*** + +### hold + +Put the call on hold. + +#### Signature + +```java +public Map hold() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 257. + +*** + +### isEnded + +#### Signature + +```java +public boolean isEnded() +``` + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 107. + +*** + +### joinConference + +Join a conference. + +#### Signature + +```java +public Map joinConference( + String name, + Map options +) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 414. + +*** + +### joinRoom + +Join a room. + +#### Signature + +```java +public Map joinRoom(String name, Map options) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 437. + +*** + +### leaveConference + +Leave a conference. + +#### Signature + +```java +public Map leaveConference(String conferenceId) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 426. + +*** + +### leaveRoom + +Leave a room. + +#### Signature + +```java +public Map leaveRoom() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 449. + +*** + +### liveTranscribe + +Start live transcription. + +#### Signature + +```java +public Map liveTranscribe(Map action) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 347. + +*** + +### liveTranslate + +Start live translation. + +#### Signature + +```java +public Map liveTranslate( + Map action, + Map options +) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 356. + +*** + +### on + +Register an event listener on this call. + +#### Signature + +```java +public void on(Consumer listener) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 116. + +*** + +### pass + +Pass on an inbound call offer. + +#### Signature + +```java +public Map pass() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 250. + +*** + +### pay + +Process payment via DTMF. + +#### Signature + + + + ```java + public Action.PayAction pay( + String paymentConnectorUrl, + Map options + ) + ``` + + + + ```java + public Action.PayAction pay(String paymentConnectorUrl, String controlId) + ``` + + + +#### Parameters (Overload 1) + + + connector URL + + + + optional parameters + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`Action.PayAction` — a PayAction + +#### Returns (Overload 2) + +`Action.PayAction` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 987. + +*** + +### play + +Play media on the call. + +#### Signature + + + + ```java + public Action.PlayAction play( + List> media, + Map options + ) + ``` + + + + ```java + public Action.PlayAction play(List> media) + ``` + + + + ```java + public Action.PlayAction play(List> media, String controlId) + ``` + + + +#### Parameters (Overload 1) + + + list of media objects + + + + optional parameters (volume, direction, loop, etc.) + + +#### Parameters (Overload 2) + + + +#### Parameters (Overload 3) + + + + + +#### Returns (Overload 1) + +`Action.PlayAction` — a PlayAction that can be waited on, paused, resumed, stopped + +#### Returns (Overload 2) + +`Action.PlayAction` + +#### Returns (Overload 3) + +`Action.PlayAction` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 492. + +*** + +### playAndCollect + +Play media and collect input. + +#### Signature + + + + ```java + public Action.PlayAndCollectAction playAndCollect( + List> media, + Map collectConfig, + Map options + ) + ``` + + + + ```java + public Action.PlayAndCollectAction playAndCollect( + List> media, + Map collectConfig, + String controlId + ) + ``` + + + +#### Parameters (Overload 1) + + + list of media objects + + + + collect configuration + + + + optional parameters + + +#### Parameters (Overload 2) + + + + + + + +#### Returns (Overload 1) + +`Action.PlayAndCollectAction` — a PlayAndCollectAction + +#### Returns (Overload 2) + +`Action.PlayAndCollectAction` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 653. + +*** + +### playAudio + +Play an audio file from a URL. + +Typed convenience over `#play`. + +<p> +Builds params:{url}]}. Recognised option key: +`volume` (passed to play). + +#### Signature + + + + ```java + public Action.PlayAction playAudio(String url, Map options) + ``` + + + + ```java + public Action.PlayAction playAudio(String url) + ``` + + + +#### Parameters (Overload 1) + + + the audio file URL + + + + optional volume + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`Action.PlayAction` — a PlayAction + +#### Returns (Overload 2) + +`Action.PlayAction` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 729. + +*** + +### playRingtone + +Play a named ringtone by country code. + +Typed convenience over +`#play`. + +<p> +Builds params:{name, duration?}]}. Recognised +option keys: `duration` (folded into the ringtone params) and +`volume` (passed to play). + +#### Signature + + + + ```java + public Action.PlayAction playRingtone(String name, Map options) + ``` + + + + ```java + public Action.PlayAction playRingtone(String name) + ``` + + + +#### Parameters (Overload 1) + + + the ringtone country-code name + + + + optional duration/volume + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`Action.PlayAction` — a PlayAction + +#### Returns (Overload 2) + +`Action.PlayAction` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 767. + +*** + +### playSilence + +Play silence for `duration` seconds. + +Typed convenience over +`#play`. + +<p> +Builds params:{duration}]}. + +#### Signature + +```java +public Action.PlayAction playSilence(double duration) +``` + +#### Parameters + + + silence duration in seconds + + +#### Returns + +`Action.PlayAction` — a PlayAction + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 750. + +*** + +### playTts + +Play text-to-speech. + +Typed convenience over `#play`. + +<p> +Builds params:{text, language?, gender?, voice?}]}. +Recognised option keys: `language`, `gender`, `voice` +(folded into the tts params) and `volume` (passed to play). + +#### Signature + + + + ```java + public Action.PlayAction playTts(String text, Map options) + ``` + + + + ```java + public Action.PlayAction playTts(String text) + ``` + + + +#### Parameters (Overload 1) + + + the text to speak + + + + optional language/gender/voice/volume + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`Action.PlayAction` — a PlayAction + +#### Returns (Overload 2) + +`Action.PlayAction` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 703. + +*** + +### promptAudio + +Play an audio file then collect input. + +Typed media over +`#playAndCollect`. + +<p> +Builds params:{url}]} as the play media. +Recognised option key: `volume` (passed to playAndCollect). + +#### Signature + + + + ```java + public Action.PlayAndCollectAction promptAudio( + String url, + Map collectConfig, + Map options + ) + ``` + + + + ```java + public Action.PlayAndCollectAction promptAudio( + String url, + Map collectConfig + ) + ``` + + + +#### Parameters (Overload 1) + + + the audio file URL + + + + the collect configuration + + + + optional volume + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`Action.PlayAndCollectAction` — a PlayAndCollectAction + +#### Returns (Overload 2) + +`Action.PlayAndCollectAction` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 913. + +*** + +### promptTts + +Play TTS then collect input. + +Typed media over `#playAndCollect`. + +<p> +Builds params:{text, language?, gender?, voice?}]} +as the play media. Recognised option keys: `language`, +`gender`, `voice` (folded into the tts params) and +`volume` (passed to playAndCollect). + +#### Signature + + + + ```java + public Action.PlayAndCollectAction promptTts( + String text, + Map collectConfig, + Map options + ) + ``` + + + + ```java + public Action.PlayAndCollectAction promptTts( + String text, + Map collectConfig + ) + ``` + + + +#### Parameters (Overload 1) + + + the text to speak + + + + the collect configuration + + + + optional language/gender/voice/volume + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`Action.PlayAndCollectAction` — a PlayAndCollectAction + +#### Returns (Overload 2) + +`Action.PlayAndCollectAction` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 884. + +*** + +### queueEnter + +Enter a queue. + +#### Signature + +```java +public Map queueEnter( + String queueName, + Map options +) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 458. + +*** + +### queueLeave + +Leave a queue. + +#### Signature + +```java +public Map queueLeave( + String queueName, + Map options +) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 472. + +*** + +### receiveFax + +Receive a fax. + +#### Signature + + + + ```java + public Action.ReceiveFaxAction receiveFax(Map options) + ``` + + + + ```java + public Action.ReceiveFaxAction receiveFax(String controlId) + ``` + + + +#### Parameters (Overload 1) + + + optional parameters + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`Action.ReceiveFaxAction` — a ReceiveFaxAction + +#### Returns (Overload 2) + +`Action.ReceiveFaxAction` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 1051. + +*** + +### record + +Record the call. + +#### Signature + +```java +public Action.RecordAction record( + Map recordConfig, + Map options +) +``` + +#### Parameters + + + record configuration object + + + + optional parameters + + +#### Returns + +`Action.RecordAction` — a RecordAction + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 536. + +*** + +### recordAudio + +Record with an explicit control\_id (test helper). + +The `audioConfig` +is wrapped as \{audio: <config>\} on the wire to match the +Python control\_id=...) pattern. + +#### Signature + +```java +public Action.RecordAction recordAudio( + Map audioConfig, + String controlId +) +``` + +#### Parameters + + + + + +#### Returns + +`Action.RecordAction` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 560. + +*** + +### refer + +SIP REFER transfer. + +#### Signature + +```java +public Map refer( + Map deviceSpec, + Map options +) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 368. + +*** + +### registerAction + +Register an action by control\_id. + +#### Signature + +```java +public void registerAction(Action action) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 210. + +*** + +### resolveAllActions + +Resolve all pending actions (e.g., on call ended or call-gone). + +#### Signature + +```java +public void resolveAllActions(RelayEvent event) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 198. + +*** + +### sendDigits + +Send DTMF digits. + +#### Signature + +```java +public Map sendDigits(String digits) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 380. + +*** + +### sendFax + +Send a fax. + +#### Signature + + + + ```java + public Action.SendFaxAction sendFax( + String documentUrl, + Map options + ) + ``` + + + + ```java + public Action.SendFaxAction sendFax( + String documentUrl, + String identity, + String controlId + ) + ``` + + + +#### Parameters (Overload 1) + + + URL to PDF document + + + + optional parameters + + +#### Parameters (Overload 2) + + + + + + + +#### Returns (Overload 1) + +`Action.SendFaxAction` — a SendFaxAction + +#### Returns (Overload 2) + +`Action.SendFaxAction` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 1018. + +*** + +### setClient + +#### Signature + +```java +public void setClient(RelayClient client) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 105. + +*** + +### setDevice + +#### Signature + +```java +public void setDevice(Map device) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 104. + +*** + +### setDirection + +#### Signature + +```java +public void setDirection(String direction) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 102. + +*** + +### setEndReason + +#### Signature + +```java +public void setEndReason(String endReason) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 101. + +*** + +### setNodeId + +#### Signature + +```java +public void setNodeId(String nodeId) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 99. + +*** + +### setState + +#### Signature + +```java +public void setState(String state) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 100. + +*** + +### setTag + +#### Signature + +```java +public void setTag(String tag) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 103. + +*** + +### stream + +Start streaming audio from the call. + +#### Signature + + + + ```java + public Action.StreamAction stream(String url, Map options) + ``` + + + + ```java + public Action.StreamAction stream(String url, String controlId) + ``` + + + + ```java + public Action.StreamAction stream(String url, String codec, String controlId) + ``` + + + +#### Parameters (Overload 1) + + + WebSocket URL + + + + optional parameters (name, codec, track, etc.) + + +#### Parameters (Overload 2) + + + + + +#### Parameters (Overload 3) + + + + + + + +#### Returns (Overload 1) + +`Action.StreamAction` — a StreamAction + +#### Returns (Overload 2) + +`Action.StreamAction` + +#### Returns (Overload 3) + +`Action.StreamAction` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 1114. + +*** + +### tap + +Tap audio from the call. + +#### Signature + + + + ```java + public Action.TapAction tap( + Map tapConfig, + Map tapDevice, + Map options + ) + ``` + + + + ```java + public Action.TapAction tap( + Map tapConfig, + Map tapDevice, + String controlId + ) + ``` + + + +#### Parameters (Overload 1) + + + tap configuration + + + + tap device (rtp or ws) + + + + optional parameters + + +#### Parameters (Overload 2) + + + + + + + +#### Returns (Overload 1) + +`Action.TapAction` — a TapAction + +#### Returns (Overload 2) + +`Action.TapAction` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 1082. + +*** + +### toString + +**Decorators:** `@Override` + +#### Signature + +```java +public String toString() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 1306. + +*** + +### transcribe + +Start transcription on the call. + +#### Signature + + + + ```java + public Action.TranscribeAction transcribe(Map options) + ``` + + + + ```java + public Action.TranscribeAction transcribe(String controlId) + ``` + + + +#### Parameters (Overload 1) + + + optional parameters + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`Action.TranscribeAction` — a TranscribeAction + +#### Returns (Overload 2) + +`Action.TranscribeAction` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 1154. + +*** + +### transfer + +Transfer the call. + +#### Signature + +```java +public Map transfer(String dest) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 296. + +*** + +### unhold + +Take the call off hold. + +#### Signature + +```java +public Map unhold() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 264. + +*** + +### userEvent + +Send a user event. + +#### Signature + +```java +public Map userEvent(String event) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 336. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 31. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/constants/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/constants/index.mdx new file mode 100644 index 0000000000..a19044e090 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/constants/index.mdx @@ -0,0 +1,424 @@ +--- +slug: "/reference/java/com/signalwire/sdk/relay/relay/constants" +title: "Constants" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.Constants" + parent: "com.signalwire.sdk.relay" + module: "com.signalwire.sdk.relay" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Constants.java" + visibility: "public" +--- +# `Constants` + +Constants for the SignalWire RELAY protocol. + +<p> +Includes call states, end reasons, message states, event types, +and action terminal states used throughout the RELAY client. + +**Modifiers:** `final` + +## Signature + +```java +public final class Constants +``` + +## Constants + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## Methods + +### isCallGoneCode + +Check if an HTTP code indicates a "call gone" condition. + +**Modifiers:** `static` + +#### Signature + +```java +public static boolean isCallGoneCode(String code) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Constants.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Constants.java) + +Line 221. + +*** + +### isTerminalActionState + +Check if an action state is terminal (applies to play, record, etc.). + +**Modifiers:** `static` + +#### Signature + +```java +public static boolean isTerminalActionState(String state) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Constants.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Constants.java) + +Line 202. + +*** + +### isTerminalCallState + +Check if a call state is terminal. + +**Modifiers:** `static` + +#### Signature + +```java +public static boolean isTerminalCallState(String state) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Constants.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Constants.java) + +Line 195. + +*** + +### isTerminalMessageState + +Check if a message state is terminal. + +**Modifiers:** `static` + +#### Signature + +```java +public static boolean isTerminalMessageState(String state) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Constants.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Constants.java) + +Line 212. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/Constants.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Constants.java) + +Line 15. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/device/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/device/index.mdx new file mode 100644 index 0000000000..ef2505d462 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/device/index.mdx @@ -0,0 +1,358 @@ +--- +slug: "/reference/java/com/signalwire/sdk/relay/relay/device" +title: "Device" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.Device" + parent: "com.signalwire.sdk.relay" + module: "com.signalwire.sdk.relay" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Device.java" + visibility: "public" +--- +# `Device` + +A typed view of the RELAY params\} device object that recurs as +a raw Object> across `Call#connect`, `Call#refer`, +`RelayClient#dial` and `Call#tap`. + +<p>The wire shape is fixed (extracted from switchblade's +`PublicCallConnectParams` / `PublicCallDialParams` / +`PublicCallReferParams` / `PublicCallTapParams`, mirrored in +`porting-sdk/relay-protocol/calling.*.params.json`): every device is an +object with a required string `type` discriminant and a `params` +sub-object whose shape depends on the type (a `phone` carries +`to_number`/`from_number`, a `sip` carries `to`/ +`headers`, etc.). + +This class types the <em>shape</em> — the +params\} envelope — so callers stop hand-rolling the two-key +map and get an explicit constructor + accessors. + +<p><strong>`type` stays a `String`.</strong> The discriminant is +NOT schema-enumerated: the wire schema constrains it only to +{"type": "string"}, and the platform accepts device types the +SDK may not know about. Typing it as an enum would reject valid values, so it +is deliberately left open (the convention names `phone`/`sip`/ +`webrtc` — see `Constants#DEVICE_TYPE_PHONE` etc. — but those are +conveniences, not a closed set). `params` is left an arbitrary +Object> for the same reason: it is type-dependent and not +a single fixed schema. + +<p><strong>Additive — the raw-map path stays.</strong> Every method that +takes a device still accepts a raw Object>; this class is +a convenience on top. `#toMap()` produces a map that is +<em>byte-for-byte identical</em> to the hand-written +…, "params": …} (insertion order `type` then +`params`, matching every existing call site), so routing a device +through `Device` serialises exactly as the raw map does. + +<pre>typed: +Device phone = Device.of("phone", Map.of( + "to_number", "+15551112222", "from_number", "+15553334444")); +call.connect(List.of(List.of(phone.toMap())), null); + +// raw map still works (parity): +call.connect(List.of(List.of(Map.of( + "type", "phone", + "params", Map.of("to_number", "+15551112222", + "from_number", "+15553334444")))), null);</pre> + +<p>Python uses a bare `dict` for this object, so there is no reference +equivalent — this is a documented Java addition. + +**Modifiers:** `final` + +## Signature + +```java +public final class Device +``` + +## Methods + +### \ + +Construct a device from its `type` discriminant and `params` +sub-object. + +#### Signature + +```java +public (String type, Map params) +``` + +#### Parameters + + + the device type discriminant (e.g. `"phone"`, `"sip"`, `"webrtc"`); must not be `null`. + + + + the type-dependent params; `null` is treated as an empty map. + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Device.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Device.java) + +Line 76. + +*** + +### equals + +**Decorators:** `@Override` + +#### Signature + +```java +public boolean equals(Object o) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Device.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Device.java) + +Line 163. + +*** + +### getParams + +The type-dependent params sub-object (an unmodifiable view). + +#### Signature + +```java +public Map getParams() +``` + +#### Returns + +`Map` — the params map; never `null` (empty if none were supplied). + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Device.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Device.java) + +Line 141. + +*** + +### getType + +The device type discriminant (`"phone"`/`"sip"`/…). + +#### Signature + +```java +public String getType() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Device.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Device.java) + +Line 132. + +*** + +### hashCode + +**Decorators:** `@Override` + +#### Signature + +```java +public int hashCode() +``` + +#### Returns + +`int` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Device.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Device.java) + +Line 175. + +*** + +### of + +Factory mirroring the constructor, for fluent call sites +(…)). + +**Modifiers:** `static` + +#### Signature + +```java +public static Device of(String type, Map params) +``` + +#### Parameters + + + the device type discriminant. + + + + the type-dependent params (may be `null`). + + +#### Returns + +`Device` — a new `Device`. + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Device.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Device.java) + +Line 95. + +*** + +### phone + +Convenience factory for the most common case — a `phone` device. +Builds params:\{to\_number, from\_number\}\}. + +**Modifiers:** `static` + +#### Signature + +```java +public static Device phone(String toNumber, String fromNumber) +``` + +#### Parameters + + + the destination E.164 number. + + + + the caller-ID E.164 number. + + +#### Returns + +`Device` — a new `phone` `Device`. + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Device.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Device.java) + +Line 107. + +*** + +### sip + +Convenience factory for a `sip` device. + +Builds +params:\{to, from?\}\} (only non-null values). + +**Modifiers:** `static` + +#### Signature + +```java +public static Device sip(String to, String from) +``` + +#### Parameters + + + the SIP destination URI. + + + + the SIP from URI, or `null` to omit. + + +#### Returns + +`Device` — a new `sip` `Device`. + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Device.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Device.java) + +Line 122. + +*** + +### toMap + +Serialise to the wire shape: a two-key map …, "params": …\} +with `type` inserted first, identical to the hand-written map every +existing call site builds. + +The returned map is fresh and mutable (callers +routinely nest it inside a `devices` list), and `params` is a +defensive copy so later mutation of the returned map cannot corrupt this +`Device`. + +#### Signature + +```java +public Map toMap() +``` + +#### Returns + +`Map` — a new params\} map ready to pass to `connect`/`refer`/`dial`/`tap`. + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Device.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Device.java) + +Line 156. + +*** + +### toString + +**Decorators:** `@Override` + +#### Signature + +```java +public String toString() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Device.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Device.java) + +Line 180. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/Device.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Device.java) + +Line 62. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/index.mdx new file mode 100644 index 0000000000..48f540ec91 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/index.mdx @@ -0,0 +1,704 @@ +--- +slug: "/reference/java/com/signalwire/sdk/relay/relay" +title: "relay" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "com.signalwire.sdk.relay" + module: "com.signalwire.sdk.relay" +--- +# `relay` + +## Signature + +```java +package com.signalwire.sdk.relay +``` + +## Classes + + + + Base class for long-running call actions tracked by `control_id`. <p> Actions support three completion patterns: <ol> <li><b>Wait inline</b>: `action.waitForCompletion()` blocks until terminal</li> <li><b>Fire and forget</b>: don't wait, check `isDone()` later</li> <li><b>Callback</b>: pass an `onCompleted` callback that fires on terminal state</li> </ol> <p> Subclasses add action-specific sub-commands (pause, resume, volume, etc.). + + + + Represents a RELAY call with 30+ methods organized by category. <p> Methods are grouped into: <ul> <li><b>Simple fire-and-response</b>: answer, hangup, pass, hold, etc.</li> <li><b>Action-based</b>: play, record, detect, collect, etc. + + + + Constants for the SignalWire RELAY protocol. <p> Includes call states, end reasons, message states, event types, and action terminal states used throughout the RELAY client. + + + + A typed view of the RELAY params\} device object that recurs as a raw Object> across `Call#connect`, `Call#refer`, `RelayClient#dial` and `Call#tap`. <p>The wire shape is fixed (extracted from switchblade's `PublicCallConnectParams` / `PublicCallDialParams` / `PublicCallReferParams` / `PublicCallTapParams`, mirrored in `porting-sdk/relay-protocol/calling.*.params.json`): every device is an object with a required string `type` discriminant and a `params` sub-object whose shape depends on the type (a `phone` carries `to_number`/`from_number`, a `sip` carries `to`/ `headers`, etc.). + + + + Represents an SMS/MMS message with state tracking. <p> Messages are simpler than calls: they have a `message_id`, progress through states (queued, initiated, sent, delivered), and support completion waiting. <p> State progression: <ul> <li>Success: queued -> initiated -> sent -> delivered</li> <li>Failure: queued -> initiated -> failed/undelivered</li> </ul> Terminal states: delivered, undelivered, failed + + + + RELAY WebSocket connection manager. <p> Manages WebSocket connections to the SignalWire RELAY service using JSON-RPC 2.0. Implements the four correlation mechanisms: <ol> <li>JSON-RPC id -> CompletableFuture for RPC response matching</li> <li>call\_id -> Call for event routing</li> <li>control\_id -> Action per Call for action event routing</li> <li>tag -> CompletableFuture\ for dial correlation</li> </ol> <p> Also handles: <ul> <li>Event ACK for every `signalwire.event`</li> <li>Ping/pong for `signalwire.ping`</li> <li>Exponential backoff reconnection</li> <li>Authorization state for fast reconnection</li> <li>Server-initiated disconnect with restart flag</li> <li>Dynamic context subscription via receive/unreceive</li> <li>Message tracking by message\_id</li> </ul> <pre>client = RelayClient.builder() .project("project-id") .token("api-token") .space("example.signalwire.com") .contexts(List.of("default")) .build(); client.onCall(call -> \{ call.answer(); var action = call.play(List.of(Map.of("type", "tts", "params", Map.of("text", "Hello!")))); action.waitForCompletion(); call.hangup();); client.run(); \}</pre> + + + + Runtime exception for RELAY-level failures (dial timeout, dial failed, connect rejected, etc.). + + + + Base class for all RELAY events. <p> Events arrive as `signalwire.event` messages with nested params: <pre> \{ "params": \{ "event\_type": "calling.call.play", "timestamp": 123457.1234, "params": \{ "call\_id": "...", "control\_id": "...", "state": "finished" \} \} \} </pre> Subclasses provide typed access to specific event payloads. + + + +## Enums + +### CallState + +The lifecycle state of a RELAY `Call`, as a typed, compile-time-checked +closed set. + +<p>The RELAY server pushes the current call state as a bare string on every +`calling.call.state` event (`created` → `ringing` → +`answered` → `ending` → `ended`). + +This enum mirrors the +five values the Python reference declares in +`signalwire/relay/constants.py` as `CALL_STATE_*` +(`Constants#CALL_STATE_CREATED` … `Constants#CALL_STATE_ENDED`). + +<p>It is exposed <em>alongside</em> the existing string getter, never instead +of it: `Call#getState()` keeps returning the raw wire string (parity +with Python, forward-compatible with any value the server later adds), while +`Call#getCallState()` returns `Optional<CallState>` for callers +who want a typed, switch-exhaustive handle and a `#isTerminal()` +predicate. + +<pre>raw = call.getState(); // "answered" (always present, parity) +Optional<CallState> typed = call.getCallState(); +if (typed.map(CallState::isTerminal).orElse(false)) { + // call has reached ENDED +}</pre> + +<p><strong>Server-emitted, growable.</strong> These values mirror what the +server sends and the set can grow in a future protocol revision. So +`#fromWire(String)` returns `null` (and `Call#getCallState()` +`Optional.empty()`) for an unrecognised value rather than throwing — +an unknown state must never crash event dispatch. This is the Java analog of +Rust's `#[non_exhaustive]` + a fallible `from_str`. + +<p><strong>This is a DISTINCT vocabulary from `DialState` and +`MessageState`.</strong> A `Call`'s lifecycle state +(`created/ringing/answered/ending/ended`) is not the dial <em>outcome</em> +(`dialing/answered/failed`) and not a message delivery state +(`queued/…/delivered`). The three are modelled as three separate enums +and are never conflated — mirroring the three separate `*_STATE_*` +blocks in the Python reference's `constants.py`. + +#### Signature + +```java +public enum CallState +``` + +#### Variants + + + The call has been answered and media is flowing. + + + + The call object has been created but no leg is ringing yet. + + + + Terminal: the call has ended. + + + + The call is in the process of tearing down. + + + + The call is ringing (alerting). + + +#### Methods + +##### fromWire + +Parse a wire string into a `CallState`, or return `null` if +it is not one of the five recognised states. + +Because the set mirrors +server-emitted values that may grow, an unknown string is tolerated +(returns `null`) rather than rejected with an exception — the Java +analog of a fallible `from_str` over a `#[non_exhaustive]` +enum. + +**Modifiers:** `static` + +###### Signature + +```java +public static CallState fromWire(String wire) +``` + +###### Parameters + + + the candidate wire string (case-sensitive), may be `null`. + + +###### Returns + +`CallState` — the matching constant, or `null` if none matches. + +###### Source + +[`src/main/java/com/signalwire/sdk/relay/CallState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/CallState.java) + +Line 106. + +*** + +##### getValue + +The canonical wire string for this state (`"created"` / +`"ringing"` / `"answered"` / `"ending"` / +`"ended"`) — exactly the value the server sends on +`calling.call.state`. + +Equivalent to PHP's backed-enum +`->value`. + +###### Signature + +```java +public String getValue() +``` + +###### Returns + +`String` — the lower-case state name as it appears on the wire. + +###### Source + +[`src/main/java/com/signalwire/sdk/relay/CallState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/CallState.java) + +Line 78. + +*** + +##### isTerminal + +Whether this is a <em>terminal</em> state — i.e. + +the call has reached +the end of its lifecycle and will not transition further. Only +`#ENDED` is terminal (matching `Call#isEnded()` and the +reference's `CALL_STATE_ENDED` terminal check); `#ENDING` is <em>not</em> terminal because an `ended` event still follows. + +###### Signature + +```java +public boolean isTerminal() +``` + +###### Returns + +`boolean` — `true` iff this state is `#ENDED`. + +###### Source + +[`src/main/java/com/signalwire/sdk/relay/CallState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/CallState.java) + +Line 91. + +*** + +##### valueOf + +**Modifiers:** `static` + +###### Signature + +```java +public static CallState valueOf(String name) +``` + +###### Parameters + + + +###### Returns + +`CallState` + +###### Source + +[`src/main/java/com/signalwire/sdk/relay/CallState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/CallState.java) + +*** + +##### values + +**Modifiers:** `static` + +###### Signature + +```java +public static CallState[] values() +``` + +###### Returns + +`CallState[]` + +###### Source + +[`src/main/java/com/signalwire/sdk/relay/CallState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/CallState.java) + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/CallState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/CallState.java) + +Line 50. + +*** + +### DialState + +The outcome state of an outbound `calling.dial`, as a typed, +compile-time-checked closed set. + +<p>A dial progresses `dialing` → `answered` (a leg won) or +`dialing` → `failed` (every leg gave up). + +The RELAY server reports +it as the bare `dial_state` field on each `calling.call.dial` +event. This enum mirrors the three values the Java port declares in +`Constants` as `DIAL_STATE_*` +(`Constants#DIAL_STATE_DIALING` / `Constants#DIAL_STATE_ANSWERED` +/ `Constants#DIAL_STATE_FAILED`), which back the dial-completion logic +in `RelayClient.handleDialEvent`. + +<p>It is exposed <em>alongside</em> the existing string getter, never instead +of it: `RelayEvent.CallDialEvent#getDialState()` keeps returning the raw +wire string (parity with Python, forward-compatible), while +`RelayEvent.CallDialEvent#getDialStateEnum()` returns +`Optional<DialState>` for callers who want a typed handle and an +`#isTerminal()` predicate. + +<p><strong>Terminal semantics.</strong> Unlike `CallState` (where only +`ended` is terminal), <em>both</em> `#ANSWERED` and `#FAILED` +are terminal dial outcomes — each resolves the pending dial (one completes the +`CompletableFuture<Call>`, the other fails it). Only `#DIALING` is +non-terminal. So "terminal" here means "the dial has a final outcome", +matching the `answered`/`failed` branches that resolve the dial in +`RelayClient`. + +<pre>// "answered" (always present, parity) +event.getDialStateEnum() + .filter(DialState::isTerminal) // ANSWERED or FAILED + .ifPresent(s -> ...);</pre> + +<p><strong>Server-emitted, growable</strong> — `#fromWire(String)` +returns `null` for an unrecognised value rather than throwing (the Java +analog of Rust's `#[non_exhaustive]` + fallible `from_str`); an +unknown dial state must never crash event dispatch. + +<p><strong>This is a DISTINCT vocabulary from `CallState` and +`MessageState`.</strong> A dial outcome (`dialing/answered/failed`) +is not a call lifecycle state and not a message delivery state. Note in +particular `answered` appears in <em>both</em> `DialState` and +`CallState` but means different things (the dial won vs. the call leg is +up) — the two enums are never shared. + +#### Signature + +```java +public enum DialState +``` + +#### Variants + + + Terminal: a leg answered and the dial resolved to a `Call`. + + + + The dial is in progress; legs are ringing. Non-terminal. + + + + Terminal: every leg failed and the dial did not connect. + + +#### Methods + +##### fromWire + +Parse a wire string into a `DialState`, or return `null` if +it is not one of the three recognised dial states. + +Because the set +mirrors server-emitted values that may grow, an unknown string is +tolerated (returns `null`) rather than rejected with an exception. + +**Modifiers:** `static` + +###### Signature + +```java +public static DialState fromWire(String wire) +``` + +###### Parameters + + + the candidate wire string (case-sensitive), may be `null`. + + +###### Returns + +`DialState` — the matching constant, or `null` if none matches. + +###### Source + +[`src/main/java/com/signalwire/sdk/relay/DialState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/DialState.java) + +Line 104. + +*** + +##### getValue + +The canonical wire string for this dial outcome (`"dialing"` / +`"answered"` / `"failed"`) — exactly the `dial_state` +value the server sends on `calling.call.dial`. + +Equivalent to PHP's +backed-enum `->value`. + +###### Signature + +```java +public String getValue() +``` + +###### Returns + +`String` — the lower-case dial-state name as it appears on the wire. + +###### Source + +[`src/main/java/com/signalwire/sdk/relay/DialState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/DialState.java) + +Line 79. + +*** + +##### isTerminal + +Whether this is a <em>terminal</em> dial outcome — i.e. + +the dial has a +final result and will not transition further. Both `#ANSWERED` and +`#FAILED` are terminal (each resolves the pending dial); only +`#DIALING` is non-terminal. + +###### Signature + +```java +public boolean isTerminal() +``` + +###### Returns + +`boolean` — `true` iff this state is `#ANSWERED` or `#FAILED`. + +###### Source + +[`src/main/java/com/signalwire/sdk/relay/DialState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/DialState.java) + +Line 91. + +*** + +##### valueOf + +**Modifiers:** `static` + +###### Signature + +```java +public static DialState valueOf(String name) +``` + +###### Parameters + + + +###### Returns + +`DialState` + +###### Source + +[`src/main/java/com/signalwire/sdk/relay/DialState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/DialState.java) + +*** + +##### values + +**Modifiers:** `static` + +###### Signature + +```java +public static DialState[] values() +``` + +###### Returns + +`DialState[]` + +###### Source + +[`src/main/java/com/signalwire/sdk/relay/DialState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/DialState.java) + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/DialState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/DialState.java) + +Line 56. + +*** + +### MessageState + +The delivery state of a RELAY `Message`, as a typed, +compile-time-checked closed set. + +<p>An outbound message progresses `queued` → `initiated` → +`sent` → `delivered` (success) or → `undelivered` / +`failed` (failure); an inbound message arrives as `received`. + +The +RELAY server reports the state as the bare `message_state` field on +`messaging.state` (outbound) and `messaging.receive` (inbound) +events. This enum mirrors the seven values the Python reference declares in +`signalwire/relay/constants.py` as `MESSAGE_STATE_*` +(`Constants#MESSAGE_STATE_QUEUED` … `Constants#MESSAGE_STATE_RECEIVED`). +The `messaging.state` wire schema enumerates the six outbound values; +`received` is the inbound-only seventh. + +<p>It is exposed <em>alongside</em> the existing string getter, never instead +of it: `Message#getState()` keeps returning the raw wire string (parity +with Python, forward-compatible), while `Message#getMessageState()` +returns `Optional<MessageState>` for callers who want a typed handle and +an `#isTerminal()` predicate. + +<pre>raw = msg.getState(); // "delivered" (always present, parity) +msg.getMessageState() + .filter(MessageState::isTerminal) // DELIVERED / UNDELIVERED / FAILED + .ifPresent(s -> ...);</pre> + +<p><strong>Terminal semantics.</strong> The terminal set is +`#DELIVERED`, `#UNDELIVERED`, `#FAILED` — exactly the +reference's `MESSAGE_TERMINAL_STATES` and the set +`Constants#isTerminalMessageState(String)` checks (the state at which +`Message` resolves its completion future). `received` is NOT +terminal: it is an inbound arrival, not the end of an outbound delivery +lifecycle. + +<p><strong>Server-emitted, growable</strong> — `#fromWire(String)` +returns `null` for an unrecognised value rather than throwing (the Java +analog of Rust's `#[non_exhaustive]` + fallible `from_str`); an +unknown message state must never crash event dispatch. + +<p><strong>This is a DISTINCT vocabulary from `CallState` and +`DialState`.</strong> A message delivery state is neither a call +lifecycle state nor a dial outcome; the three enums are never conflated. + +#### Signature + +```java +public enum MessageState +``` + +#### Variants + + + Terminal: the message was delivered. + + + + Terminal: the send failed. + + + + Sending has been initiated. + + + + The message is queued for sending. + + + + An inbound message was received (inbound-only; not a terminal delivery state). + + + + The message has left for the carrier. + + + + Terminal: the carrier reported non-delivery. + + +#### Methods + +##### fromWire + +Parse a wire string into a `MessageState`, or return `null` +if it is not one of the seven recognised states. + +Because the set mirrors +server-emitted values that may grow, an unknown string is tolerated +(returns `null`) rather than rejected with an exception. + +**Modifiers:** `static` + +###### Signature + +```java +public static MessageState fromWire(String wire) +``` + +###### Parameters + + + the candidate wire string (case-sensitive), may be `null`. + + +###### Returns + +`MessageState` — the matching constant, or `null` if none matches. + +###### Source + +[`src/main/java/com/signalwire/sdk/relay/MessageState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/MessageState.java) + +Line 114. + +*** + +##### getValue + +The canonical wire string for this state (`"queued"` / +`"initiated"` / `"sent"` / `"delivered"` / +`"undelivered"` / `"failed"` / `"received"`) — exactly +the `message_state` value the server sends. + +Equivalent to PHP's +backed-enum `->value`. + +###### Signature + +```java +public String getValue() +``` + +###### Returns + +`String` — the lower-case state name as it appears on the wire. + +###### Source + +[`src/main/java/com/signalwire/sdk/relay/MessageState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/MessageState.java) + +Line 86. + +*** + +##### isTerminal + +Whether this is a <em>terminal</em> delivery state — i.e. + +the outbound +message has a final delivery outcome and will not transition further. The +terminal set is `#DELIVERED`, `#UNDELIVERED`, `#FAILED` +(matching the reference's `MESSAGE_TERMINAL_STATES` and +`Constants#isTerminalMessageState(String)`). `#RECEIVED` is +NOT terminal (it is an inbound arrival, not an outbound completion). + +###### Signature + +```java +public boolean isTerminal() +``` + +###### Returns + +`boolean` — `true` iff this state is `#DELIVERED`, `#UNDELIVERED`, or `#FAILED`. + +###### Source + +[`src/main/java/com/signalwire/sdk/relay/MessageState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/MessageState.java) + +Line 101. + +*** + +##### valueOf + +**Modifiers:** `static` + +###### Signature + +```java +public static MessageState valueOf(String name) +``` + +###### Parameters + + + +###### Returns + +`MessageState` + +###### Source + +[`src/main/java/com/signalwire/sdk/relay/MessageState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/MessageState.java) + +*** + +##### values + +**Modifiers:** `static` + +###### Signature + +```java +public static MessageState[] values() +``` + +###### Returns + +`MessageState[]` + +###### Source + +[`src/main/java/com/signalwire/sdk/relay/MessageState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/MessageState.java) + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/MessageState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/MessageState.java) + +Line 54. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/message/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/message/index.mdx new file mode 100644 index 0000000000..15b6b436fc --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/message/index.mdx @@ -0,0 +1,699 @@ +--- +slug: "/reference/java/com/signalwire/sdk/relay/relay/message" +title: "Message" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.Message" + parent: "com.signalwire.sdk.relay" + module: "com.signalwire.sdk.relay" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java" + visibility: "public" +--- +# `Message` + +Represents an SMS/MMS message with state tracking. + +<p> +Messages are simpler than calls: they have a `message_id`, progress through +states (queued, initiated, sent, delivered), and support completion waiting. +<p> +State progression: +<ul> + <li>Success: queued -> initiated -> sent -> delivered</li> + <li>Failure: queued -> initiated -> failed/undelivered</li> +</ul> +Terminal states: delivered, undelivered, failed + +## Signature + +```java +public class Message +``` + +## Methods + +### \ + +#### Signature + +```java +public (String messageId) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) + +Line 51. + +*** + +### fromReceiveEvent + +Create a Message from an inbound receive event. + +**Modifiers:** `static` + +#### Signature + +```java +public static Message fromReceiveEvent(RelayEvent.MessagingReceiveEvent event) +``` + +#### Parameters + + + +#### Returns + +`Message` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) + +Line 209. + +*** + +### getBody + +Message body; empty for media-only messages or before set. + +#### Signature + +```java +public Optional getBody() +``` + +#### Returns + +`Optional` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) + +Line 106. + +*** + +### getContext + +Messaging context (the RELAY protocol/context the message rode on). + +#### Signature + +```java +public Optional getContext() +``` + +#### Returns + +`Optional` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) + +Line 98. + +*** + +### getDirection + +Direction (inbound/outbound) once known; empty until set. + +#### Signature + +```java +public Optional getDirection() +``` + +#### Returns + +`Optional` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) + +Line 100. + +*** + +### getFromNumber + +Sender E.164 number; empty until set. + +#### Signature + +```java +public Optional getFromNumber() +``` + +#### Returns + +`Optional` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) + +Line 102. + +*** + +### getMedia + +#### Signature + +```java +public List getMedia() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) + +Line 62. + +*** + +### getMessageId + +#### Signature + +```java +public String getMessageId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) + +Line 61. + +*** + +### getMessageState + +The current message state as a typed `MessageState`, <em>alongside</em> the raw string `#getState()` (which stays +canonical for parity and forward-compat). + +Returns `Optional.empty()` +when the live wire state is not one of the seven known +`MessageState` values — the set mirrors server-emitted values that +can grow, so an unrecognised state is tolerated here rather than crashing +the caller. The present value always agrees with `getState()`: +`getMessageState().get().getValue().equals(getState())`. + +#### Signature + +```java +public Optional getMessageState() +``` + +#### Returns + +`Optional` — the typed state, or empty if the raw state is unknown/unset. + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) + +Line 80. + +*** + +### getReason + +Failure reason; present only on a failed/undelivered terminal state. + +#### Signature + +```java +public Optional getReason() +``` + +#### Returns + +`Optional` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) + +Line 108. + +*** + +### getResult + +Terminal completion event; empty until the message reaches a terminal state. + +#### Signature + +```java +public Optional getResult() +``` + +#### Returns + +`Optional` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) + +Line 110. + +*** + +### getSegments + +#### Signature + +```java +public int getSegments() +``` + +#### Returns + +`int` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) + +Line 63. + +*** + +### getState + +#### Signature + +```java +public String getState() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) + +Line 64. + +*** + +### getTags + +#### Signature + +```java +public List getTags() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) + +Line 65. + +*** + +### getToNumber + +Recipient E.164 number; empty until set. + +#### Signature + +```java +public Optional getToNumber() +``` + +#### Returns + +`Optional` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) + +Line 104. + +*** + +### isDone + +#### Signature + +```java +public boolean isDone() +``` + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) + +Line 66. + +*** + +### on + +Register a state change listener. + +#### Signature + +```java +public void on(Consumer listener) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) + +Line 131. + +*** + +### setBody + +#### Signature + +```java +public void setBody(String body) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) + +Line 118. + +*** + +### setContext + +#### Signature + +```java +public void setContext(String context) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) + +Line 114. + +*** + +### setDirection + +#### Signature + +```java +public void setDirection(String direction) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) + +Line 115. + +*** + +### setFromNumber + +#### Signature + +```java +public void setFromNumber(String fromNumber) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) + +Line 116. + +*** + +### setMedia + +#### Signature + +```java +public void setMedia(List media) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) + +Line 119. + +*** + +### setOnCompleted + +#### Signature + +```java +public void setOnCompleted(Consumer onCompleted) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) + +Line 124. + +*** + +### setSegments + +#### Signature + +```java +public void setSegments(int segments) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) + +Line 120. + +*** + +### setState + +#### Signature + +```java +public void setState(String state) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) + +Line 122. + +*** + +### setTags + +#### Signature + +```java +public void setTags(List tags) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) + +Line 121. + +*** + +### setToNumber + +#### Signature + +```java +public void setToNumber(String toNumber) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) + +Line 117. + +*** + +### toString + +**Decorators:** `@Override` + +#### Signature + +```java +public String toString() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) + +Line 223. + +*** + +### updateFromEvent + +Update state from an incoming event. + +#### Signature + +```java +public void updateFromEvent(RelayEvent event) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) + +Line 138. + +*** + +### waitForCompletion + +Block until the message reaches a terminal state. + +#### Signature + + + + ```java + public RelayEvent waitForCompletion() + ``` + + + + ```java + public RelayEvent waitForCompletion(long timeoutMs) + ``` + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`RelayEvent` + +#### Returns (Overload 2) + +`RelayEvent` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) + +Line 165. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) + +Line 29. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-client/builder/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-client/builder/index.mdx new file mode 100644 index 0000000000..ff4f832505 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-client/builder/index.mdx @@ -0,0 +1,208 @@ +--- +slug: "/reference/java/com/signalwire/sdk/relay/relay/relay-client/builder" +title: "Builder" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.RelayClient.Builder" + parent: "com.signalwire.sdk.relay.RelayClient" + module: "com.signalwire.sdk.relay" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java" + visibility: "public" +--- +# `Builder` + +**Modifiers:** `static` + +## Signature + +```java +public static class Builder +``` + +## Methods + +### \ + +#### Signature + +```java +public () +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) + +*** + +### build + +#### Signature + +```java +public RelayClient build() +``` + +#### Returns + +`RelayClient` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) + +Line 145. + +*** + +### contexts + +#### Signature + +```java +public Builder contexts(List contexts) +``` + +#### Parameters + + + +#### Returns + +`Builder` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) + +Line 143. + +*** + +### host + +#### Signature + +```java +public Builder host(String host) +``` + +#### Parameters + + + +#### Returns + +`Builder` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) + +Line 142. + +*** + +### jwtToken + +#### Signature + +```java +public Builder jwtToken(String jwtToken) +``` + +#### Parameters + + + +#### Returns + +`Builder` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) + +Line 140. + +*** + +### project + +#### Signature + +```java +public Builder project(String project) +``` + +#### Parameters + + + +#### Returns + +`Builder` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) + +Line 138. + +*** + +### space + +#### Signature + +```java +public Builder space(String space) +``` + +#### Parameters + + + +#### Returns + +`Builder` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) + +Line 141. + +*** + +### token + +#### Signature + +```java +public Builder token(String token) +``` + +#### Parameters + + + +#### Returns + +`Builder` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) + +Line 139. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) + +Line 131. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-client/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-client/index.mdx new file mode 100644 index 0000000000..211cca0a06 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-client/index.mdx @@ -0,0 +1,694 @@ +--- +slug: "/reference/java/com/signalwire/sdk/relay/relay/relay-client" +title: "RelayClient" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.RelayClient" + parent: "com.signalwire.sdk.relay" + module: "com.signalwire.sdk.relay" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java" + visibility: "public" +--- +# `RelayClient` + +RELAY WebSocket connection manager. + +<p> +Manages WebSocket connections to the SignalWire RELAY service using JSON-RPC 2.0. +Implements the four correlation mechanisms: +<ol> + <li>JSON-RPC id -> CompletableFuture for RPC response matching</li> + <li>call_id -> Call for event routing</li> + <li>control_id -> Action per Call for action event routing</li> + <li>tag -> CompletableFuture<Call> for dial correlation</li> +</ol> +<p> +Also handles: +<ul> + <li>Event ACK for every `signalwire.event`</li> + <li>Ping/pong for `signalwire.ping`</li> + <li>Exponential backoff reconnection</li> + <li>Authorization state for fast reconnection</li> + <li>Server-initiated disconnect with restart flag</li> + <li>Dynamic context subscription via receive/unreceive</li> + <li>Message tracking by message_id</li> +</ul> + +<pre>client = RelayClient.builder() + .project("project-id") + .token("api-token") + .space("example.signalwire.com") + .contexts(List.of("default")) + .build(); + +client.onCall(call -> { + call.answer(); + var action = call.play(List.of(Map.of("type", "tts", + "params", Map.of("text", "Hello!")))); + action.waitForCompletion(); + call.hangup();); + +client.run(); +}</pre> + +## Signature + +```java +public class RelayClient implements AutoCloseable +``` + +## Inheritance + +**Implements:** `AutoCloseable` + +## Classes + + + + + +## Methods + +### builder + +**Modifiers:** `static` + +#### Signature + +```java +public static Builder builder() +``` + +#### Returns + +`Builder` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) + +Line 127. + +*** + +### close + +`AutoCloseable` entry point so the client can be used in a +try-with-resources block: + +<pre>{@code +try (var client = RelayClient.builder()...build()) { + client.connect(); + // ... + +`AutoCloseable` entry point so the client can be used in a +try-with-resources block: + +<pre>(var client = RelayClient.builder()...build()) { + client.connect(); + // ... use the client ... // close() runs here: WebSocket shut down, worker pool released +}</pre> + +Releases the same resources as `#disconnect()` — closes the +RELAY WebSocket, releases the `#run()` latch, and shuts the +worker `java.util.concurrent.ExecutorService` down — so the +client is the rough Java parallel of Python's +with RelayClient(...) context manager. Idempotent: a +second call is a harmless no-op. + +**Decorators:** `@Override` + +#### Signature + +```java +public void close() +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) + +Line 282. + +*** + +### connect + +Open the WebSocket connection and complete the signalwire.connect +handshake without blocking the caller. + +<p>Mirrors the Python `RelayClient.connect()` coroutine. + +Tests use +this directly; production code typically uses `#run()` instead. + +#### Signature + + + + ```java + public void connect(long timeoutMs) + ``` + + + + ```java + public void connect() + ``` + + + +#### Parameters (Overload 1) + + + how long to wait for the handshake to complete + + +#### Throws + +- `RuntimeException` — if connect fails or times out + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) + +Line 234. + +*** + +### dial + +Dial an outbound call. + +#### Signature + + + + ```java + public Call dial( + List>> devices, + Map options, + long timeout + ) + ``` + + + + ```java + public Call dial(List>> devices) + ``` + + + +#### Parameters (Overload 1) + + + nested array: outer = sequential, inner = parallel + + + + optional parameters (region, max\_price\_per\_minute) + + + + timeout in milliseconds + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`Call` — the answered Call + +#### Returns (Overload 2) + +`Call` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) + +Line 313. + +*** + +### disconnect + +Disconnect the client. + +#### Signature + +```java +public void disconnect() +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) + +Line 255. + +*** + +### execute + +Execute an RPC method and wait for the response. + +#### Signature + +```java +public Map execute(String method, Map params) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) + +Line 429. + +*** + +### getAuthorizationState + +Returns the authorization state blob the server pushed via the +`signalwire.authorization.state` event, or null. + +#### Signature + +```java +public String getAuthorizationState() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) + +Line 176. + +*** + +### getContexts + +#### Signature + +```java +public List getContexts() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) + +Line 161. + +*** + +### getProject + +#### Signature + +```java +public String getProject() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) + +Line 159. + +*** + +### getRelayProtocol + +Returns the protocol identifier issued by the server during the +signalwire.connect handshake. + +Empty string before connect completes. + +#### Signature + +```java +public String getRelayProtocol() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) + +Line 168. + +*** + +### getSpace + +#### Signature + +```java +public String getSpace() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) + +Line 160. + +*** + +### isConnected + +#### Signature + +```java +public boolean isConnected() +``` + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) + +Line 162. + +*** + +### onCall + +Register a handler for inbound calls. + +#### Signature + +```java +public void onCall(Consumer handler) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) + +Line 191. + +*** + +### onEvent + +Register a handler for all raw events. + +#### Signature + +```java +public void onEvent(Consumer handler) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) + +Line 205. + +*** + +### onMessage + +Register a handler for inbound messages. + +#### Signature + +```java +public void onMessage(Consumer handler) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) + +Line 198. + +*** + +### receive + +Subscribe to additional contexts dynamically. + +#### Signature + +```java +public Map receive(List newContexts) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) + +Line 290. + +*** + +### run + +Connect and run the client. + +Blocks until `#disconnect()` is called. + +#### Signature + +```java +public void run() +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) + +Line 212. + +*** + +### sendMessage + +Send an outbound SMS/MMS. + +#### Signature + + + + ```java + public Message sendMessage( + String context, + String fromNumber, + String toNumber, + String body, + List mediaUrls + ) + ``` + + + + ```java + public Message sendMessage( + String context, + String fromNumber, + String toNumber, + String body, + List mediaUrls, + List tags + ) + ``` + + + +#### Parameters (Overload 1) + + + message context + + + + sender E.164 number + + + + recipient E.164 number + + + + message body (required if no media) + + + + media URLs (required if no body) + + +#### Parameters (Overload 2) + + + + + + + + + + + + + +#### Returns (Overload 1) + +`Message` — the Message object with message\_id for tracking + +#### Returns (Overload 2) + +`Message` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) + +Line 369. + +*** + +### sendRaw + +Send a raw JSON-RPC frame on the underlying socket. + +Production code +uses Map), which adds project\_id/protocol +automatically. This helper exists for the porting-sdk RELAY-handshake +audit harness, which has to emit a `method:"signalwire.event"` +frame from inside the on-event callback so the fixture's dispatch +counter fires (see SUBAGENT\_PLAYBOOK lesson on event-ACK semantics). + +#### Signature + +```java +public void sendRaw(Map frame) +``` + +#### Parameters + + + a Gson-serializable map representing the frame + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) + +Line 871. + +*** + +### setRelayProtocol + +Test-only setter for the protocol — used by reconnect-with-protocol +tests that simulate "I already have a session token from last time". + +#### Signature + +```java +public void setRelayProtocol(String protocol) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) + +Line 184. + +*** + +### unreceive + +Unsubscribe from contexts. + +#### Signature + +```java +public Map unreceive(List removeContexts) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) + +Line 299. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) + +Line 62. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-error/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-error/index.mdx new file mode 100644 index 0000000000..5148f78f3a --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-error/index.mdx @@ -0,0 +1,73 @@ +--- +slug: "/reference/java/com/signalwire/sdk/relay/relay/relay-error" +title: "RelayError" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.RelayError" + parent: "com.signalwire.sdk.relay" + module: "com.signalwire.sdk.relay" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayError.java" + visibility: "public" +--- +# `RelayError` + +Runtime exception for RELAY-level failures (dial timeout, dial failed, +connect rejected, etc.). + +Mirrors the Python `RelayError` class. + +## Signature + +```java +public class RelayError extends RuntimeException +``` + +## Inheritance + +**Extends:** `RuntimeException` + +## Methods + +### \ + +#### Signature + + + + ```java + public (String message) + ``` + + + + ```java + public (String message, Throwable cause) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayError.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayError.java) + +Line 15. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/RelayError.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayError.java) + +Line 13. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/authorization-state-event/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/authorization-state-event/index.mdx new file mode 100644 index 0000000000..6d1b05de45 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/authorization-state-event/index.mdx @@ -0,0 +1,80 @@ +--- +slug: "/reference/java/com/signalwire/sdk/relay/relay/relay-event/authorization-state-event" +title: "AuthorizationStateEvent" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.RelayEvent.AuthorizationStateEvent" + parent: "com.signalwire.sdk.relay.RelayEvent" + module: "com.signalwire.sdk.relay" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" + visibility: "public" +--- +# `AuthorizationStateEvent` + +Authorization state event (`signalwire.authorization.state`). + +**Modifiers:** `static` + +## Signature + +```java +public static class AuthorizationStateEvent extends RelayEvent +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/com/signalwire/sdk/relay/relay/relay-event) + +## Methods + +### \ + +#### Signature + +```java +public (String eventType, double timestamp, Map params) +``` + +#### Parameters + + + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 450. + +*** + +### getAuthorizationState + +#### Signature + +```java +public String getAuthorizationState() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 454. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 449. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-collect-event/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-collect-event/index.mdx new file mode 100644 index 0000000000..209b570ea9 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-collect-event/index.mdx @@ -0,0 +1,140 @@ +--- +slug: "/reference/java/com/signalwire/sdk/relay/relay/relay-event/call-collect-event" +title: "CallCollectEvent" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallCollectEvent" + parent: "com.signalwire.sdk.relay.RelayEvent" + module: "com.signalwire.sdk.relay" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" + visibility: "public" +--- +# `CallCollectEvent` + +Collect event (`calling.call.collect`). + +**Modifiers:** `static` + +## Signature + +```java +public static class CallCollectEvent extends RelayEvent +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/com/signalwire/sdk/relay/relay/relay-event) + +## Methods + +### \ + +#### Signature + +```java +public (String eventType, double timestamp, Map params) +``` + +#### Parameters + + + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 311. + +*** + +### getCallId + +#### Signature + +```java +public String getCallId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 315. + +*** + +### getControlId + +#### Signature + +```java +public String getControlId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 316. + +*** + +### getResult + +#### Signature + +```java +public Map getResult() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 318. + +*** + +### getResultType + +#### Signature + +```java +public String getResultType() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 317. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 310. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-connect-event/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-connect-event/index.mdx new file mode 100644 index 0000000000..807a514452 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-connect-event/index.mdx @@ -0,0 +1,100 @@ +--- +slug: "/reference/java/com/signalwire/sdk/relay/relay/relay-event/call-connect-event" +title: "CallConnectEvent" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallConnectEvent" + parent: "com.signalwire.sdk.relay.RelayEvent" + module: "com.signalwire.sdk.relay" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" + visibility: "public" +--- +# `CallConnectEvent` + +Connect event (`calling.call.connect`). + +**Modifiers:** `static` + +## Signature + +```java +public static class CallConnectEvent extends RelayEvent +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/com/signalwire/sdk/relay/relay/relay-event) + +## Methods + +### \ + +#### Signature + +```java +public (String eventType, double timestamp, Map params) +``` + +#### Parameters + + + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 377. + +*** + +### getCallId + +#### Signature + +```java +public String getCallId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 381. + +*** + +### getConnectState + +#### Signature + +```java +public String getConnectState() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 382. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 376. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-detect-event/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-detect-event/index.mdx new file mode 100644 index 0000000000..6cb778d200 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-detect-event/index.mdx @@ -0,0 +1,142 @@ +--- +slug: "/reference/java/com/signalwire/sdk/relay/relay/relay-event/call-detect-event" +title: "CallDetectEvent" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallDetectEvent" + parent: "com.signalwire.sdk.relay.RelayEvent" + module: "com.signalwire.sdk.relay" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" + visibility: "public" +--- +# `CallDetectEvent` + +Detect event (`calling.call.detect`). + +**Modifiers:** `static` + +## Signature + +```java +public static class CallDetectEvent extends RelayEvent +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/com/signalwire/sdk/relay/relay/relay-event) + +## Methods + +### \ + +#### Signature + +```java +public (String eventType, double timestamp, Map params) +``` + +#### Parameters + + + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 290. + +*** + +### getCallId + +#### Signature + +```java +public String getCallId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 294. + +*** + +### getControlId + +#### Signature + +```java +public String getControlId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 295. + +*** + +### getDetect + +Results are in detect.params.event, not a simple state field. + +#### Signature + +```java +public Map getDetect() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 298. + +*** + +### getDetectEvent + +#### Signature + +```java +public String getDetectEvent() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 300. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 289. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-dial-event/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-dial-event/index.mdx new file mode 100644 index 0000000000..eb0da54afd --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-dial-event/index.mdx @@ -0,0 +1,194 @@ +--- +slug: "/reference/java/com/signalwire/sdk/relay/relay/relay-event/call-dial-event" +title: "CallDialEvent" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallDialEvent" + parent: "com.signalwire.sdk.relay.RelayEvent" + module: "com.signalwire.sdk.relay" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" + visibility: "public" +--- +# `CallDialEvent` + +Dial completion event (`calling.call.dial`). + +<p> +Note: No top-level `call_id`. + +The call info is nested at `params.call`. + +**Modifiers:** `static` + +## Signature + +```java +public static class CallDialEvent extends RelayEvent +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/com/signalwire/sdk/relay/relay/relay-event) + +## Methods + +### \ + +#### Signature + +```java +public (String eventType, double timestamp, Map params) +``` + +#### Parameters + + + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 206. + +*** + +### getCallId + +#### Signature + +```java +public String getCallId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 232. + +*** + +### getCallInfo + +#### Signature + +```java +public Map getCallInfo() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 228. + +*** + +### getDialState + +#### Signature + +```java +public String getDialState() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 212. + +*** + +### getDialStateEnum + +The dial outcome as a typed `DialState`, <em>alongside</em> the +raw string `#getDialState()` (which stays canonical for parity +and forward-compat). + +Returns `Optional.empty()` when the wire +`dial_state` is not one of the three known `DialState` +values — the set mirrors server-emitted values that can grow, so an +unrecognised state is tolerated here rather than crashing dispatch. + +#### Signature + +```java +public Optional getDialStateEnum() +``` + +#### Returns + +`Optional` — the typed dial state, or empty if unknown/unset. + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 224. + +*** + +### getNodeId + +#### Signature + +```java +public String getNodeId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 211. + +*** + +### getTag + +#### Signature + +```java +public String getTag() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 210. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 205. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-fax-event/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-fax-event/index.mdx new file mode 100644 index 0000000000..55e2a8c275 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-fax-event/index.mdx @@ -0,0 +1,120 @@ +--- +slug: "/reference/java/com/signalwire/sdk/relay/relay/relay-event/call-fax-event" +title: "CallFaxEvent" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallFaxEvent" + parent: "com.signalwire.sdk.relay.RelayEvent" + module: "com.signalwire.sdk.relay" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" + visibility: "public" +--- +# `CallFaxEvent` + +Fax event (`calling.call.fax`). + +**Modifiers:** `static` + +## Signature + +```java +public static class CallFaxEvent extends RelayEvent +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/com/signalwire/sdk/relay/relay/relay-event) + +## Methods + +### \ + +#### Signature + +```java +public (String eventType, double timestamp, Map params) +``` + +#### Parameters + + + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 325. + +*** + +### getCallId + +#### Signature + +```java +public String getCallId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 329. + +*** + +### getControlId + +#### Signature + +```java +public String getControlId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 330. + +*** + +### getState + +#### Signature + +```java +public String getState() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 331. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 324. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-pay-event/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-pay-event/index.mdx new file mode 100644 index 0000000000..78d81f1f99 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-pay-event/index.mdx @@ -0,0 +1,120 @@ +--- +slug: "/reference/java/com/signalwire/sdk/relay/relay/relay-event/call-pay-event" +title: "CallPayEvent" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallPayEvent" + parent: "com.signalwire.sdk.relay.RelayEvent" + module: "com.signalwire.sdk.relay" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" + visibility: "public" +--- +# `CallPayEvent` + +Pay event (`calling.call.pay`). + +**Modifiers:** `static` + +## Signature + +```java +public static class CallPayEvent extends RelayEvent +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/com/signalwire/sdk/relay/relay/relay-event) + +## Methods + +### \ + +#### Signature + +```java +public (String eventType, double timestamp, Map params) +``` + +#### Parameters + + + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 413. + +*** + +### getCallId + +#### Signature + +```java +public String getCallId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 417. + +*** + +### getControlId + +#### Signature + +```java +public String getControlId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 418. + +*** + +### getState + +#### Signature + +```java +public String getState() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 419. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 412. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-play-event/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-play-event/index.mdx new file mode 100644 index 0000000000..506090ec8c --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-play-event/index.mdx @@ -0,0 +1,120 @@ +--- +slug: "/reference/java/com/signalwire/sdk/relay/relay/relay-event/call-play-event" +title: "CallPlayEvent" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallPlayEvent" + parent: "com.signalwire.sdk.relay.RelayEvent" + module: "com.signalwire.sdk.relay" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" + visibility: "public" +--- +# `CallPlayEvent` + +Play event (`calling.call.play`). + +**Modifiers:** `static` + +## Signature + +```java +public static class CallPlayEvent extends RelayEvent +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/com/signalwire/sdk/relay/relay/relay-event) + +## Methods + +### \ + +#### Signature + +```java +public (String eventType, double timestamp, Map params) +``` + +#### Parameters + + + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 241. + +*** + +### getCallId + +#### Signature + +```java +public String getCallId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 245. + +*** + +### getControlId + +#### Signature + +```java +public String getControlId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 246. + +*** + +### getState + +#### Signature + +```java +public String getState() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 247. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 240. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-receive-event/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-receive-event/index.mdx new file mode 100644 index 0000000000..691e0f0c90 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-receive-event/index.mdx @@ -0,0 +1,160 @@ +--- +slug: "/reference/java/com/signalwire/sdk/relay/relay/relay-event/call-receive-event" +title: "CallReceiveEvent" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallReceiveEvent" + parent: "com.signalwire.sdk.relay.RelayEvent" + module: "com.signalwire.sdk.relay" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" + visibility: "public" +--- +# `CallReceiveEvent` + +Inbound call event (`calling.call.receive`). + +**Modifiers:** `static` + +## Signature + +```java +public static class CallReceiveEvent extends RelayEvent +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/com/signalwire/sdk/relay/relay/relay-event) + +## Methods + +### \ + +#### Signature + +```java +public (String eventType, double timestamp, Map params) +``` + +#### Parameters + + + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 189. + +*** + +### getCallId + +#### Signature + +```java +public String getCallId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 193. + +*** + +### getCallState + +#### Signature + +```java +public String getCallState() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 195. + +*** + +### getContext + +#### Signature + +```java +public String getContext() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 196. + +*** + +### getDevice + +#### Signature + +```java +public Map getDevice() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 197. + +*** + +### getNodeId + +#### Signature + +```java +public String getNodeId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 194. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 188. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-record-event/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-record-event/index.mdx new file mode 100644 index 0000000000..ecf7d9e1aa --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-record-event/index.mdx @@ -0,0 +1,180 @@ +--- +slug: "/reference/java/com/signalwire/sdk/relay/relay/relay-event/call-record-event" +title: "CallRecordEvent" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallRecordEvent" + parent: "com.signalwire.sdk.relay.RelayEvent" + module: "com.signalwire.sdk.relay" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" + visibility: "public" +--- +# `CallRecordEvent` + +Record event (`calling.call.record`). + +**Modifiers:** `static` + +## Signature + +```java +public static class CallRecordEvent extends RelayEvent +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/com/signalwire/sdk/relay/relay/relay-event) + +## Methods + +### \ + +#### Signature + +```java +public (String eventType, double timestamp, Map params) +``` + +#### Parameters + + + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 254. + +*** + +### getCallId + +#### Signature + +```java +public String getCallId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 258. + +*** + +### getControlId + +#### Signature + +```java +public String getControlId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 259. + +*** + +### getDuration + +#### Signature + +```java +public double getDuration() +``` + +#### Returns + +`double` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 270. + +*** + +### getSize + +#### Signature + +```java +public long getSize() +``` + +#### Returns + +`long` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 277. + +*** + +### getState + +#### Signature + +```java +public String getState() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 260. + +*** + +### getUrl + +#### Signature + +```java +public String getUrl() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 262. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 253. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-refer-event/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-refer-event/index.mdx new file mode 100644 index 0000000000..e70addfb15 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-refer-event/index.mdx @@ -0,0 +1,100 @@ +--- +slug: "/reference/java/com/signalwire/sdk/relay/relay/relay-event/call-refer-event" +title: "CallReferEvent" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallReferEvent" + parent: "com.signalwire.sdk.relay.RelayEvent" + module: "com.signalwire.sdk.relay" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" + visibility: "public" +--- +# `CallReferEvent` + +Refer event (`calling.call.refer`). + +**Modifiers:** `static` + +## Signature + +```java +public static class CallReferEvent extends RelayEvent +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/com/signalwire/sdk/relay/relay/relay-event) + +## Methods + +### \ + +#### Signature + +```java +public (String eventType, double timestamp, Map params) +``` + +#### Parameters + + + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 389. + +*** + +### getCallId + +#### Signature + +```java +public String getCallId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 393. + +*** + +### getReferState + +#### Signature + +```java +public String getReferState() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 394. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 388. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-send-digits-event/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-send-digits-event/index.mdx new file mode 100644 index 0000000000..d26ff1c8f1 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-send-digits-event/index.mdx @@ -0,0 +1,100 @@ +--- +slug: "/reference/java/com/signalwire/sdk/relay/relay/relay-event/call-send-digits-event" +title: "CallSendDigitsEvent" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallSendDigitsEvent" + parent: "com.signalwire.sdk.relay.RelayEvent" + module: "com.signalwire.sdk.relay" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" + visibility: "public" +--- +# `CallSendDigitsEvent` + +Send digits event (`calling.call.send_digits`). + +**Modifiers:** `static` + +## Signature + +```java +public static class CallSendDigitsEvent extends RelayEvent +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/com/signalwire/sdk/relay/relay/relay-event) + +## Methods + +### \ + +#### Signature + +```java +public (String eventType, double timestamp, Map params) +``` + +#### Parameters + + + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 401. + +*** + +### getCallId + +#### Signature + +```java +public String getCallId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 405. + +*** + +### getState + +#### Signature + +```java +public String getState() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 406. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 400. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-state-event/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-state-event/index.mdx new file mode 100644 index 0000000000..d128e3cec4 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-state-event/index.mdx @@ -0,0 +1,200 @@ +--- +slug: "/reference/java/com/signalwire/sdk/relay/relay/relay-event/call-state-event" +title: "CallStateEvent" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallStateEvent" + parent: "com.signalwire.sdk.relay.RelayEvent" + module: "com.signalwire.sdk.relay" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" + visibility: "public" +--- +# `CallStateEvent` + +Call state change event (`calling.call.state`). + +**Modifiers:** `static` + +## Signature + +```java +public static class CallStateEvent extends RelayEvent +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/com/signalwire/sdk/relay/relay/relay-event) + +## Methods + +### \ + +#### Signature + +```java +public (String eventType, double timestamp, Map params) +``` + +#### Parameters + + + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 172. + +*** + +### getCallId + +#### Signature + +```java +public String getCallId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 176. + +*** + +### getCallState + +#### Signature + +```java +public String getCallState() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 178. + +*** + +### getDevice + +#### Signature + +```java +public Map getDevice() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 182. + +*** + +### getDirection + +#### Signature + +```java +public String getDirection() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 181. + +*** + +### getEndReason + +#### Signature + +```java +public String getEndReason() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 179. + +*** + +### getNodeId + +#### Signature + +```java +public String getNodeId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 177. + +*** + +### getTag + +#### Signature + +```java +public String getTag() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 180. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 171. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-stream-event/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-stream-event/index.mdx new file mode 100644 index 0000000000..b629104bad --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-stream-event/index.mdx @@ -0,0 +1,120 @@ +--- +slug: "/reference/java/com/signalwire/sdk/relay/relay/relay-event/call-stream-event" +title: "CallStreamEvent" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallStreamEvent" + parent: "com.signalwire.sdk.relay.RelayEvent" + module: "com.signalwire.sdk.relay" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" + visibility: "public" +--- +# `CallStreamEvent` + +Stream event (`calling.call.stream`). + +**Modifiers:** `static` + +## Signature + +```java +public static class CallStreamEvent extends RelayEvent +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/com/signalwire/sdk/relay/relay/relay-event) + +## Methods + +### \ + +#### Signature + +```java +public (String eventType, double timestamp, Map params) +``` + +#### Parameters + + + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 351. + +*** + +### getCallId + +#### Signature + +```java +public String getCallId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 355. + +*** + +### getControlId + +#### Signature + +```java +public String getControlId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 356. + +*** + +### getState + +#### Signature + +```java +public String getState() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 357. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 350. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-tap-event/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-tap-event/index.mdx new file mode 100644 index 0000000000..b97b7b3c15 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-tap-event/index.mdx @@ -0,0 +1,120 @@ +--- +slug: "/reference/java/com/signalwire/sdk/relay/relay/relay-event/call-tap-event" +title: "CallTapEvent" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallTapEvent" + parent: "com.signalwire.sdk.relay.RelayEvent" + module: "com.signalwire.sdk.relay" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" + visibility: "public" +--- +# `CallTapEvent` + +Tap event (`calling.call.tap`). + +**Modifiers:** `static` + +## Signature + +```java +public static class CallTapEvent extends RelayEvent +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/com/signalwire/sdk/relay/relay/relay-event) + +## Methods + +### \ + +#### Signature + +```java +public (String eventType, double timestamp, Map params) +``` + +#### Parameters + + + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 338. + +*** + +### getCallId + +#### Signature + +```java +public String getCallId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 342. + +*** + +### getControlId + +#### Signature + +```java +public String getControlId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 343. + +*** + +### getState + +#### Signature + +```java +public String getState() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 344. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 337. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-transcribe-event/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-transcribe-event/index.mdx new file mode 100644 index 0000000000..a561fa122a --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-transcribe-event/index.mdx @@ -0,0 +1,120 @@ +--- +slug: "/reference/java/com/signalwire/sdk/relay/relay/relay-event/call-transcribe-event" +title: "CallTranscribeEvent" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallTranscribeEvent" + parent: "com.signalwire.sdk.relay.RelayEvent" + module: "com.signalwire.sdk.relay" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" + visibility: "public" +--- +# `CallTranscribeEvent` + +Transcribe event (`calling.call.transcribe`). + +**Modifiers:** `static` + +## Signature + +```java +public static class CallTranscribeEvent extends RelayEvent +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/com/signalwire/sdk/relay/relay/relay-event) + +## Methods + +### \ + +#### Signature + +```java +public (String eventType, double timestamp, Map params) +``` + +#### Parameters + + + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 364. + +*** + +### getCallId + +#### Signature + +```java +public String getCallId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 368. + +*** + +### getControlId + +#### Signature + +```java +public String getControlId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 369. + +*** + +### getState + +#### Signature + +```java +public String getState() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 370. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 363. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/conference-event/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/conference-event/index.mdx new file mode 100644 index 0000000000..98fdb306fd --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/conference-event/index.mdx @@ -0,0 +1,100 @@ +--- +slug: "/reference/java/com/signalwire/sdk/relay/relay/relay-event/conference-event" +title: "ConferenceEvent" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.RelayEvent.ConferenceEvent" + parent: "com.signalwire.sdk.relay.RelayEvent" + module: "com.signalwire.sdk.relay" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" + visibility: "public" +--- +# `ConferenceEvent` + +Conference event (`calling.conference`). + +**Modifiers:** `static` + +## Signature + +```java +public static class ConferenceEvent extends RelayEvent +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/com/signalwire/sdk/relay/relay/relay-event) + +## Methods + +### \ + +#### Signature + +```java +public (String eventType, double timestamp, Map params) +``` + +#### Parameters + + + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 426. + +*** + +### getCallId + +#### Signature + +```java +public String getCallId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 431. + +*** + +### getConferenceId + +#### Signature + +```java +public String getConferenceId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 430. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 425. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/index.mdx new file mode 100644 index 0000000000..9ffbc10dfd --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/index.mdx @@ -0,0 +1,305 @@ +--- +slug: "/reference/java/com/signalwire/sdk/relay/relay/relay-event" +title: "RelayEvent" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.RelayEvent" + parent: "com.signalwire.sdk.relay" + module: "com.signalwire.sdk.relay" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" + visibility: "public" +--- +# `RelayEvent` + +Base class for all RELAY events. + +<p> +Events arrive as `signalwire.event` messages with nested params: +<pre> +{ + "params": { + "event_type": "calling.call.play", + "timestamp": 123457.1234, + "params": { "call_id": "...", "control_id": "...", "state": "finished" } + } +} +</pre> +Subclasses provide typed access to specific event payloads. + +## Signature + +```java +public class RelayEvent +``` + +## Classes + + + + Authorization state event (`signalwire.authorization.state`). + + + + Collect event (`calling.call.collect`). + + + + Connect event (`calling.call.connect`). + + + + Detect event (`calling.call.detect`). + + + + Dial completion event (`calling.call.dial`). <p> Note: No top-level `call_id`. + + + + Fax event (`calling.call.fax`). + + + + Pay event (`calling.call.pay`). + + + + Play event (`calling.call.play`). + + + + Inbound call event (`calling.call.receive`). + + + + Record event (`calling.call.record`). + + + + Refer event (`calling.call.refer`). + + + + Send digits event (`calling.call.send_digits`). + + + + Call state change event (`calling.call.state`). + + + + Stream event (`calling.call.stream`). + + + + Tap event (`calling.call.tap`). + + + + Transcribe event (`calling.call.transcribe`). + + + + Conference event (`calling.conference`). + + + + Inbound messaging event (`messaging.receive`). + + + + Outbound messaging state event (`messaging.state`). + + + + Queue event (`calling.queue`). + + + +## Methods + +### \ + +#### Signature + +```java +public (String eventType, double timestamp, Map params) +``` + +#### Parameters + + + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 34. + +*** + +### fromRawParams + +Create the appropriate event subclass from raw JSON-RPC event params. + +**Modifiers:** `static` + +#### Signature + +```java +public static RelayEvent fromRawParams(Map outerParams) +``` + +#### Parameters + + + +#### Returns + +`RelayEvent` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 65. + +*** + +### getEventType + +#### Signature + +```java +public String getEventType() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 40. + +*** + +### getParams + +#### Signature + +```java +public Map getParams() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 48. + +*** + +### getStringParam + +#### Signature + + + + ```java + public String getStringParam(String key) + ``` + + + + ```java + public String getStringParam(String key, String defaultValue) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`String` + +#### Returns (Overload 2) + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 52. + +*** + +### getTimestamp + +#### Signature + +```java +public double getTimestamp() +``` + +#### Returns + +`double` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 44. + +*** + +### toString + +**Decorators:** `@Override` + +#### Signature + +```java +public String toString() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 116. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 28. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/messaging-receive-event/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/messaging-receive-event/index.mdx new file mode 100644 index 0000000000..ea56cf4ae7 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/messaging-receive-event/index.mdx @@ -0,0 +1,260 @@ +--- +slug: "/reference/java/com/signalwire/sdk/relay/relay/relay-event/messaging-receive-event" +title: "MessagingReceiveEvent" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.RelayEvent.MessagingReceiveEvent" + parent: "com.signalwire.sdk.relay.RelayEvent" + module: "com.signalwire.sdk.relay" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" + visibility: "public" +--- +# `MessagingReceiveEvent` + +Inbound messaging event (`messaging.receive`). + +**Modifiers:** `static` + +## Signature + +```java +public static class MessagingReceiveEvent extends RelayEvent +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/com/signalwire/sdk/relay/relay/relay-event) + +## Methods + +### \ + +#### Signature + +```java +public (String eventType, double timestamp, Map params) +``` + +#### Parameters + + + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 463. + +*** + +### getBody + +#### Signature + +```java +public String getBody() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 472. + +*** + +### getContext + +#### Signature + +```java +public String getContext() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 468. + +*** + +### getDirection + +#### Signature + +```java +public String getDirection() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 469. + +*** + +### getFromNumber + +#### Signature + +```java +public String getFromNumber() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 470. + +*** + +### getMedia + +#### Signature + +```java +public List getMedia() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 473. + +*** + +### getMessageId + +#### Signature + +```java +public String getMessageId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 467. + +*** + +### getMessageState + +#### Signature + +```java +public String getMessageState() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 475. + +*** + +### getSegments + +#### Signature + +```java +public int getSegments() +``` + +#### Returns + +`int` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 474. + +*** + +### getTags + +#### Signature + +```java +public List getTags() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 476. + +*** + +### getToNumber + +#### Signature + +```java +public String getToNumber() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 471. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 462. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/messaging-state-event/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/messaging-state-event/index.mdx new file mode 100644 index 0000000000..7f0d81be77 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/messaging-state-event/index.mdx @@ -0,0 +1,280 @@ +--- +slug: "/reference/java/com/signalwire/sdk/relay/relay/relay-event/messaging-state-event" +title: "MessagingStateEvent" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.RelayEvent.MessagingStateEvent" + parent: "com.signalwire.sdk.relay.RelayEvent" + module: "com.signalwire.sdk.relay" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" + visibility: "public" +--- +# `MessagingStateEvent` + +Outbound messaging state event (`messaging.state`). + +**Modifiers:** `static` + +## Signature + +```java +public static class MessagingStateEvent extends RelayEvent +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/com/signalwire/sdk/relay/relay/relay-event) + +## Methods + +### \ + +#### Signature + +```java +public (String eventType, double timestamp, Map params) +``` + +#### Parameters + + + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 483. + +*** + +### getBody + +#### Signature + +```java +public String getBody() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 492. + +*** + +### getContext + +#### Signature + +```java +public String getContext() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 488. + +*** + +### getDirection + +#### Signature + +```java +public String getDirection() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 489. + +*** + +### getFromNumber + +#### Signature + +```java +public String getFromNumber() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 490. + +*** + +### getMedia + +#### Signature + +```java +public List getMedia() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 493. + +*** + +### getMessageId + +#### Signature + +```java +public String getMessageId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 487. + +*** + +### getMessageState + +#### Signature + +```java +public String getMessageState() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 495. + +*** + +### getReason + +#### Signature + +```java +public String getReason() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 496. + +*** + +### getSegments + +#### Signature + +```java +public int getSegments() +``` + +#### Returns + +`int` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 494. + +*** + +### getTags + +#### Signature + +```java +public List getTags() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 497. + +*** + +### getToNumber + +#### Signature + +```java +public String getToNumber() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 491. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 482. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/queue-event/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/queue-event/index.mdx new file mode 100644 index 0000000000..30b33a6412 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/queue-event/index.mdx @@ -0,0 +1,100 @@ +--- +slug: "/reference/java/com/signalwire/sdk/relay/relay/relay-event/queue-event" +title: "QueueEvent" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.RelayEvent.QueueEvent" + parent: "com.signalwire.sdk.relay.RelayEvent" + module: "com.signalwire.sdk.relay" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" + visibility: "public" +--- +# `QueueEvent` + +Queue event (`calling.queue`). + +**Modifiers:** `static` + +## Signature + +```java +public static class QueueEvent extends RelayEvent +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/com/signalwire/sdk/relay/relay/relay-event) + +## Methods + +### \ + +#### Signature + +```java +public (String eventType, double timestamp, Map params) +``` + +#### Parameters + + + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 438. + +*** + +### getCallId + +#### Signature + +```java +public String getCallId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 442. + +*** + +### getQueueId + +#### Signature + +```java +public String getQueueId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 443. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 437. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/addresses-namespace/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/addresses-namespace/index.mdx new file mode 100644 index 0000000000..6ca316d7b3 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/addresses-namespace/index.mdx @@ -0,0 +1,184 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/addresses-namespace" +title: "AddressesNamespace" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.AddressesNamespace" + parent: "com.signalwire.sdk.rest.namespaces" + module: "com.signalwire.sdk.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/AddressesNamespace.java" + visibility: "public" +--- +# `AddressesNamespace` + +Address management namespace. + +<p>Mirrors `signalwire.rest.namespaces.addresses.AddressesResource`: +list / create / get / delete (no update endpoint exists for addresses). +Paths sit under `/api/relay/rest/addresses`. + +## Signature + +```java +public class AddressesNamespace +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/AddressesNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/AddressesNamespace.java) + +Line 25. + +*** + +### create + +#### Signature + +```java +public Map create(Map body) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/AddressesNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/AddressesNamespace.java) + +Line 39. + +*** + +### delete + +#### Signature + +```java +public Map delete(String addressId) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/AddressesNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/AddressesNamespace.java) + +Line 47. + +*** + +### get + +#### Signature + +```java +public Map get(String addressId) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/AddressesNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/AddressesNamespace.java) + +Line 43. + +*** + +### getBasePath + +#### Signature + +```java +public String getBasePath() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/AddressesNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/AddressesNamespace.java) + +Line 29. + +*** + +### list + +#### Signature + + + + ```java + public Map list() + ``` + + + + ```java + public Map list(Map queryParams) + ``` + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/AddressesNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/AddressesNamespace.java) + +Line 31. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/AddressesNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/AddressesNamespace.java) + +Line 20. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/billing-namespace/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/billing-namespace/index.mdx new file mode 100644 index 0000000000..e3c358a4e3 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/billing-namespace/index.mdx @@ -0,0 +1,90 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/billing-namespace" +title: "BillingNamespace" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.BillingNamespace" + parent: "com.signalwire.sdk.rest.namespaces" + module: "com.signalwire.sdk.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/BillingNamespace.java" + visibility: "public" +--- +# `BillingNamespace` + +REST namespace for billing resources. + +## Signature + +```java +public class BillingNamespace +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/BillingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/BillingNamespace.java) + +Line 20. + +*** + +### invoices + +#### Signature + +```java +public CrudResource invoices() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/BillingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/BillingNamespace.java) + +Line 25. + +*** + +### usage + +#### Signature + +```java +public CrudResource usage() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/BillingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/BillingNamespace.java) + +Line 26. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/BillingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/BillingNamespace.java) + +Line 15. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/calling-namespace/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/calling-namespace/index.mdx new file mode 100644 index 0000000000..e3ee3d908a --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/calling-namespace/index.mdx @@ -0,0 +1,1050 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/calling-namespace" +title: "CallingNamespace" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.CallingNamespace" + parent: "com.signalwire.sdk.rest.namespaces" + module: "com.signalwire.sdk.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java" + visibility: "public" +--- +# `CallingNamespace` + +REST-based call control. + +All commands are dispatched as +/api/calling/calls with a `"command"` field that names +the operation, optionally an `"id"` field that names the target call, +and a `"params"` object containing keyword arguments. The mock +server (and the real Calling API) matches commands against the registered +routes via the `command` field. + +## Signature + +```java +public class CallingNamespace +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 30. + +*** + +### aiHold + +#### Signature + +```java +public Map aiHold(String callId, Map params) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 184. + +*** + +### aiMessage + +#### Signature + +```java +public Map aiMessage(String callId, Map params) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 180. + +*** + +### aiStop + +#### Signature + +```java +public Map aiStop(String callId, Map params) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 192. + +*** + +### aiUnhold + +#### Signature + +```java +public Map aiUnhold(String callId, Map params) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 188. + +*** + +### calls + +#### Signature + +```java +public CrudResource calls() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 35. + +*** + +### collect + +#### Signature + +```java +public Map collect(String callId, Map params) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 116. + +*** + +### collectStartInputTimers + +#### Signature + +```java +public Map collectStartInputTimers( + String callId, + Map params +) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 124. + +*** + +### collectStop + +#### Signature + +```java +public Map collectStop(String callId, Map params) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 120. + +*** + +### denoise + +#### Signature + +```java +public Map denoise(String callId, Map params) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 160. + +*** + +### denoiseStop + +#### Signature + +```java +public Map denoiseStop(String callId, Map params) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 164. + +*** + +### detect + +#### Signature + +```java +public Map detect(String callId, Map params) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 130. + +*** + +### detectStop + +#### Signature + +```java +public Map detectStop(String callId, Map params) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 134. + +*** + +### dial + +#### Signature + +```java +public Map dial(Map params) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 54. + +*** + +### disconnect + +#### Signature + +```java +public Map disconnect(String callId, Map params) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 70. + +*** + +### end + +#### Signature + +```java +public Map end(String callId, Map params) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 62. + +*** + +### liveTranscribe + +#### Signature + +```java +public Map liveTranscribe( + String callId, + Map params +) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 198. + +*** + +### liveTranslate + +#### Signature + +```java +public Map liveTranslate( + String callId, + Map params +) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 202. + +*** + +### play + +#### Signature + +```java +public Map play(String callId, Map params) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 76. + +*** + +### playPause + +#### Signature + +```java +public Map playPause(String callId, Map params) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 80. + +*** + +### playResume + +#### Signature + +```java +public Map playResume(String callId, Map params) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 84. + +*** + +### playStop + +#### Signature + +```java +public Map playStop(String callId, Map params) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 88. + +*** + +### playVolume + +#### Signature + +```java +public Map playVolume(String callId, Map params) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 92. + +*** + +### receiveFaxStop + +#### Signature + +```java +public Map receiveFaxStop( + String callId, + Map params +) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 212. + +*** + +### record + +#### Signature + +```java +public Map record(String callId, Map params) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 98. + +*** + +### recordPause + +#### Signature + +```java +public Map recordPause(String callId, Map params) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 102. + +*** + +### recordResume + +#### Signature + +```java +public Map recordResume(String callId, Map params) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 106. + +*** + +### recordStop + +#### Signature + +```java +public Map recordStop(String callId, Map params) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 110. + +*** + +### refer + +#### Signature + +```java +public Map refer(String callId, Map params) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 218. + +*** + +### sendFaxStop + +#### Signature + +```java +public Map sendFaxStop(String callId, Map params) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 208. + +*** + +### stream + +#### Signature + +```java +public Map stream(String callId, Map params) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 150. + +*** + +### streamStop + +#### Signature + +```java +public Map streamStop(String callId, Map params) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 154. + +*** + +### tap + +#### Signature + +```java +public Map tap(String callId, Map params) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 140. + +*** + +### tapStop + +#### Signature + +```java +public Map tapStop(String callId, Map params) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 144. + +*** + +### transcribe + +#### Signature + +```java +public Map transcribe(String callId, Map params) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 170. + +*** + +### transcribeStop + +#### Signature + +```java +public Map transcribeStop( + String callId, + Map params +) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 174. + +*** + +### transfer + +#### Signature + +```java +public Map transfer(String callId, Map params) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 66. + +*** + +### update + +#### Signature + +```java +public Map update(Map params) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 58. + +*** + +### userEvent + +#### Signature + +```java +public Map userEvent(String callId, Map params) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 224. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 24. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/campaign-namespace/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/campaign-namespace/index.mdx new file mode 100644 index 0000000000..2799479639 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/campaign-namespace/index.mdx @@ -0,0 +1,130 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/campaign-namespace" +title: "CampaignNamespace" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.CampaignNamespace" + parent: "com.signalwire.sdk.rest.namespaces" + module: "com.signalwire.sdk.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CampaignNamespace.java" + visibility: "public" +--- +# `CampaignNamespace` + +REST namespace for 10DLC campaign registration resources. + +## Signature + +```java +public class CampaignNamespace +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CampaignNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CampaignNamespace.java) + +Line 22. + +*** + +### assignments + +#### Signature + +```java +public CrudResource assignments() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CampaignNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CampaignNamespace.java) + +Line 32. + +*** + +### brands + +#### Signature + +```java +public CrudResource brands() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CampaignNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CampaignNamespace.java) + +Line 29. + +*** + +### campaigns + +#### Signature + +```java +public CrudResource campaigns() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CampaignNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CampaignNamespace.java) + +Line 30. + +*** + +### orders + +#### Signature + +```java +public CrudResource orders() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CampaignNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CampaignNamespace.java) + +Line 31. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CampaignNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CampaignNamespace.java) + +Line 15. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/chat-namespace/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/chat-namespace/index.mdx new file mode 100644 index 0000000000..e2e2a43083 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/chat-namespace/index.mdx @@ -0,0 +1,110 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/chat-namespace" +title: "ChatNamespace" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.ChatNamespace" + parent: "com.signalwire.sdk.rest.namespaces" + module: "com.signalwire.sdk.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ChatNamespace.java" + visibility: "public" +--- +# `ChatNamespace` + +REST namespace for chat resources. + +## Signature + +```java +public class ChatNamespace +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ChatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ChatNamespace.java) + +Line 21. + +*** + +### channels + +#### Signature + +```java +public CrudResource channels() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ChatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ChatNamespace.java) + +Line 27. + +*** + +### members + +#### Signature + +```java +public CrudResource members() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ChatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ChatNamespace.java) + +Line 29. + +*** + +### messages + +#### Signature + +```java +public CrudResource messages() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ChatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ChatNamespace.java) + +Line 28. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ChatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ChatNamespace.java) + +Line 15. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-accounts/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-accounts/index.mdx new file mode 100644 index 0000000000..6d6be5be5a --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-accounts/index.mdx @@ -0,0 +1,191 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-accounts" +title: "CompatAccounts" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.CompatNamespace.CompatAccounts" + parent: "com.signalwire.sdk.rest.namespaces.CompatNamespace" + module: "com.signalwire.sdk.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java" + visibility: "public" +--- +# `CompatAccounts` + +Compat account / sub-project management. + +<p>Mirrors `signalwire.rest.namespaces.compat.CompatAccounts`: +accounts.create lives at the top-level `/Accounts` collection +(no AccountSid prefix); accounts.get/update operate on +`/Accounts/{sid`}. + +update is a Twilio-compat POST (not PATCH/PUT). + +**Modifiers:** `static` + +## Signature + +```java +public static class CompatAccounts +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 333. + +*** + +### create + +#### Signature + +```java +public Map create(Map body) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 347. + +*** + +### get + +#### Signature + +```java +public Map get(String sid) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 351. + +*** + +### getBasePath + +#### Signature + +```java +public String getBasePath() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 337. + +*** + +### list + +#### Signature + + + + ```java + public Map list() + ``` + + + + ```java + public Map list(Map queryParams) + ``` + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 339. + +*** + +### update + +#### Signature + +```java +public Map update(String sid, Map body) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 355. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 328. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-applications/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-applications/index.mdx new file mode 100644 index 0000000000..8ee83581ec --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-applications/index.mdx @@ -0,0 +1,88 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-applications" +title: "CompatApplications" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.CompatNamespace.CompatApplications" + parent: "com.signalwire.sdk.rest.namespaces.CompatNamespace" + module: "com.signalwire.sdk.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java" + visibility: "public" +--- +# `CompatApplications` + +Compat application management. + +Twilio-compat update is POST. + +**Modifiers:** `static` + +## Signature + +```java +public static class CompatApplications extends CrudResource +``` + +## Inheritance + +**Extends:** [CrudResource](/docs/sdk-reference/reference/java/com/signalwire/sdk/rest/rest/crud-resource) + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient, String basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 464. + +*** + +### update + +**Decorators:** `@Override` + +#### Signature + +```java +public Map update(String sid, Map body) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 468. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 462. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-calls/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-calls/index.mdx new file mode 100644 index 0000000000..71457cf3ae --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-calls/index.mdx @@ -0,0 +1,203 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-calls" +title: "CompatCalls" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.CompatNamespace.CompatCalls" + parent: "com.signalwire.sdk.rest.namespaces.CompatNamespace" + module: "com.signalwire.sdk.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java" + visibility: "public" +--- +# `CompatCalls` + +Compat call management with recording and stream sub-resources. + +**Modifiers:** `static` + +## Signature + +```java +public static class CompatCalls extends CrudResource +``` + +## Inheritance + +**Extends:** [CrudResource](/docs/sdk-reference/reference/java/com/signalwire/sdk/rest/rest/crud-resource) + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient, String basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 93. + +*** + +### startRecording + +#### Signature + +```java +public Map startRecording( + String callSid, + Map body +) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 101. + +*** + +### startStream + +#### Signature + +```java +public Map startStream(String callSid, Map body) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 111. + +*** + +### stopStream + +#### Signature + +```java +public Map stopStream( + String callSid, + String streamSid, + Map body +) +``` + +#### Parameters + + + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 115. + +*** + +### update + +#### Signature + +```java +public Map update(String sid, Map body) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 97. + +*** + +### updateRecording + +#### Signature + +```java +public Map updateRecording( + String callSid, + String recordingSid, + Map body +) +``` + +#### Parameters + + + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 105. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 91. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-conferences/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-conferences/index.mdx new file mode 100644 index 0000000000..cbc5d884da --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-conferences/index.mdx @@ -0,0 +1,495 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-conferences" +title: "CompatConferences" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.CompatNamespace.CompatConferences" + parent: "com.signalwire.sdk.rest.namespaces.CompatNamespace" + module: "com.signalwire.sdk.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java" + visibility: "public" +--- +# `CompatConferences` + +Compat conference management with participants, recordings, and +stream sub-resources. + +**Modifiers:** `static` + +## Signature + +```java +public static class CompatConferences +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient, String basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 369. + +*** + +### deleteRecording + +#### Signature + +```java +public Map deleteRecording( + String conferenceSid, + String recordingSid +) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 441. + +*** + +### get + +#### Signature + +```java +public Map get(String sid) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 384. + +*** + +### getBasePath + +#### Signature + +```java +public String getBasePath() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 374. + +*** + +### getParticipant + +#### Signature + +```java +public Map getParticipant(String conferenceSid, String callSid) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 403. + +*** + +### getRecording + +#### Signature + +```java +public Map getRecording( + String conferenceSid, + String recordingSid +) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 430. + +*** + +### list + +#### Signature + + + + ```java + public Map list() + ``` + + + + ```java + public Map list(Map queryParams) + ``` + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 376. + +*** + +### listParticipants + +#### Signature + + + + ```java + public Map listParticipants(String conferenceSid) + ``` + + + + ```java + public Map listParticipants( + String conferenceSid, + Map queryParams + ) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 394. + +*** + +### listRecordings + +#### Signature + + + + ```java + public Map listRecordings(String conferenceSid) + ``` + + + + ```java + public Map listRecordings( + String conferenceSid, + Map queryParams + ) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 421. + +*** + +### removeParticipant + +#### Signature + +```java +public Map removeParticipant( + String conferenceSid, + String callSid +) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 414. + +*** + +### startStream + +#### Signature + +```java +public Map startStream( + String conferenceSid, + Map body +) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 448. + +*** + +### stopStream + +#### Signature + +```java +public Map stopStream( + String conferenceSid, + String streamSid, + Map body +) +``` + +#### Parameters + + + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 452. + +*** + +### update + +#### Signature + +```java +public Map update(String sid, Map body) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 388. + +*** + +### updateParticipant + +#### Signature + +```java +public Map updateParticipant( + String conferenceSid, + String callSid, + Map body +) +``` + +#### Parameters + + + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 408. + +*** + +### updateRecording + +#### Signature + +```java +public Map updateRecording( + String conferenceSid, + String recordingSid, + Map body +) +``` + +#### Parameters + + + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 435. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 364. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-faxes/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-faxes/index.mdx new file mode 100644 index 0000000000..1fcde1f0bc --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-faxes/index.mdx @@ -0,0 +1,183 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-faxes" +title: "CompatFaxes" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.CompatNamespace.CompatFaxes" + parent: "com.signalwire.sdk.rest.namespaces.CompatNamespace" + module: "com.signalwire.sdk.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java" + visibility: "public" +--- +# `CompatFaxes` + +Compat fax management with media sub-resources. + +**Modifiers:** `static` + +## Signature + +```java +public static class CompatFaxes extends CrudResource +``` + +## Inheritance + +**Extends:** [CrudResource](/docs/sdk-reference/reference/java/com/signalwire/sdk/rest/rest/crud-resource) + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient, String basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 157. + +*** + +### deleteMedia + +#### Signature + +```java +public Map deleteMedia(String faxSid, String mediaSid) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 177. + +*** + +### getMedia + +#### Signature + +```java +public Map getMedia(String faxSid, String mediaSid) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 173. + +*** + +### listMedia + +#### Signature + + + + ```java + public Map listMedia(String faxSid) + ``` + + + + ```java + public Map listMedia( + String faxSid, + Map queryParams + ) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 165. + +*** + +### update + +#### Signature + +```java +public Map update(String sid, Map body) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 161. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 155. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-laml-bins/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-laml-bins/index.mdx new file mode 100644 index 0000000000..a345802329 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-laml-bins/index.mdx @@ -0,0 +1,88 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-laml-bins" +title: "CompatLamlBins" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.CompatNamespace.CompatLamlBins" + parent: "com.signalwire.sdk.rest.namespaces.CompatNamespace" + module: "com.signalwire.sdk.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java" + visibility: "public" +--- +# `CompatLamlBins` + +Compat cXML/LaML script bin management. + +Twilio-compat update is POST. + +**Modifiers:** `static` + +## Signature + +```java +public static class CompatLamlBins extends CrudResource +``` + +## Inheritance + +**Extends:** [CrudResource](/docs/sdk-reference/reference/java/com/signalwire/sdk/rest/rest/crud-resource) + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient, String basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 479. + +*** + +### update + +**Decorators:** `@Override` + +#### Signature + +```java +public Map update(String sid, Map body) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 483. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 477. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-messages/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-messages/index.mdx new file mode 100644 index 0000000000..b5d68acc1b --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-messages/index.mdx @@ -0,0 +1,183 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-messages" +title: "CompatMessages" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.CompatNamespace.CompatMessages" + parent: "com.signalwire.sdk.rest.namespaces.CompatNamespace" + module: "com.signalwire.sdk.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java" + visibility: "public" +--- +# `CompatMessages` + +Compat message management with media sub-resources. + +**Modifiers:** `static` + +## Signature + +```java +public static class CompatMessages extends CrudResource +``` + +## Inheritance + +**Extends:** [CrudResource](/docs/sdk-reference/reference/java/com/signalwire/sdk/rest/rest/crud-resource) + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient, String basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 127. + +*** + +### deleteMedia + +#### Signature + +```java +public Map deleteMedia(String messageSid, String mediaSid) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 147. + +*** + +### getMedia + +#### Signature + +```java +public Map getMedia(String messageSid, String mediaSid) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 143. + +*** + +### listMedia + +#### Signature + + + + ```java + public Map listMedia(String messageSid) + ``` + + + + ```java + public Map listMedia( + String messageSid, + Map queryParams + ) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 135. + +*** + +### update + +#### Signature + +```java +public Map update(String sid, Map body) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 131. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 125. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-phone-numbers/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-phone-numbers/index.mdx new file mode 100644 index 0000000000..fa0a6c3523 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-phone-numbers/index.mdx @@ -0,0 +1,366 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-phone-numbers" +title: "CompatPhoneNumbers" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.CompatNamespace.CompatPhoneNumbers" + parent: "com.signalwire.sdk.rest.namespaces.CompatNamespace" + module: "com.signalwire.sdk.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java" + visibility: "public" +--- +# `CompatPhoneNumbers` + +Compat IncomingPhoneNumbers + AvailablePhoneNumbers management. + +**Modifiers:** `static` + +## Signature + +```java +public static class CompatPhoneNumbers +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient, String basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 192. + +*** + +### delete + +#### Signature + +```java +public Map delete(String sid) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 219. + +*** + +### get + +#### Signature + +```java +public Map get(String sid) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 211. + +*** + +### getBasePath + +#### Signature + +```java +public String getBasePath() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 201. + +*** + +### importNumber + +#### Signature + +```java +public Map importNumber(Map body) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 227. + +*** + +### list + +#### Signature + + + + ```java + public Map list() + ``` + + + + ```java + public Map list(Map queryParams) + ``` + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 203. + +*** + +### listAvailableCountries + +#### Signature + + + + ```java + public Map listAvailableCountries() + ``` + + + + ```java + public Map listAvailableCountries(Map queryParams) + ``` + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 231. + +*** + +### purchase + +#### Signature + +```java +public Map purchase(Map body) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 223. + +*** + +### searchLocal + +#### Signature + + + + ```java + public Map searchLocal(String country) + ``` + + + + ```java + public Map searchLocal( + String country, + Map queryParams + ) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 239. + +*** + +### searchTollFree + +#### Signature + + + + ```java + public Map searchTollFree(String country) + ``` + + + + ```java + public Map searchTollFree( + String country, + Map queryParams + ) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 247. + +*** + +### update + +#### Signature + +```java +public Map update(String sid, Map body) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 215. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 185. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-queues/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-queues/index.mdx new file mode 100644 index 0000000000..477e05c297 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-queues/index.mdx @@ -0,0 +1,191 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-queues" +title: "CompatQueues" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.CompatNamespace.CompatQueues" + parent: "com.signalwire.sdk.rest.namespaces.CompatNamespace" + module: "com.signalwire.sdk.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java" + visibility: "public" +--- +# `CompatQueues` + +Compat queue management with member operations. + +**Modifiers:** `static` + +## Signature + +```java +public static class CompatQueues extends CrudResource +``` + +## Inheritance + +**Extends:** [CrudResource](/docs/sdk-reference/reference/java/com/signalwire/sdk/rest/rest/crud-resource) + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient, String basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 494. + +*** + +### dequeueMember + +#### Signature + +```java +public Map dequeueMember( + String queueSid, + String callSid, + Map body +) +``` + +#### Parameters + + + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 515. + +*** + +### getMember + +#### Signature + +```java +public Map getMember(String queueSid, String callSid) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 511. + +*** + +### listMembers + +#### Signature + + + + ```java + public Map listMembers(String queueSid) + ``` + + + + ```java + public Map listMembers( + String queueSid, + Map queryParams + ) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 503. + +*** + +### update + +**Decorators:** `@Override` + +#### Signature + +```java +public Map update(String sid, Map body) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 498. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 492. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-recordings/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-recordings/index.mdx new file mode 100644 index 0000000000..08890efffe --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-recordings/index.mdx @@ -0,0 +1,160 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-recordings" +title: "CompatRecordings" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.CompatNamespace.CompatRecordings" + parent: "com.signalwire.sdk.rest.namespaces.CompatNamespace" + module: "com.signalwire.sdk.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java" + visibility: "public" +--- +# `CompatRecordings` + +Compat recording management. + +**Modifiers:** `static` + +## Signature + +```java +public static class CompatRecordings +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient, String basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 264. + +*** + +### delete + +#### Signature + +```java +public Map delete(String sid) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 283. + +*** + +### get + +#### Signature + +```java +public Map get(String sid) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 279. + +*** + +### getBasePath + +#### Signature + +```java +public String getBasePath() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 269. + +*** + +### list + +#### Signature + + + + ```java + public Map list() + ``` + + + + ```java + public Map list(Map queryParams) + ``` + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 271. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 259. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-tokens/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-tokens/index.mdx new file mode 100644 index 0000000000..92d06add3b --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-tokens/index.mdx @@ -0,0 +1,151 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-tokens" +title: "CompatTokens" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.CompatNamespace.CompatTokens" + parent: "com.signalwire.sdk.rest.namespaces.CompatNamespace" + module: "com.signalwire.sdk.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java" + visibility: "public" +--- +# `CompatTokens` + +Compat API token management. + +Note: update is PATCH (BaseResource style), +not POST. + +**Modifiers:** `static` + +## Signature + +```java +public static class CompatTokens +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient, String basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 531. + +*** + +### create + +#### Signature + +```java +public Map create(Map body) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 538. + +*** + +### delete + +#### Signature + +```java +public Map delete(String tokenId) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 546. + +*** + +### getBasePath + +#### Signature + +```java +public String getBasePath() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 536. + +*** + +### update + +#### Signature + +```java +public Map update(String tokenId, Map body) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 542. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 526. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-transcriptions/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-transcriptions/index.mdx new file mode 100644 index 0000000000..922e535070 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-transcriptions/index.mdx @@ -0,0 +1,160 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-transcriptions" +title: "CompatTranscriptions" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.CompatNamespace.CompatTranscriptions" + parent: "com.signalwire.sdk.rest.namespaces.CompatNamespace" + module: "com.signalwire.sdk.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java" + visibility: "public" +--- +# `CompatTranscriptions` + +Compat transcription management. + +**Modifiers:** `static` + +## Signature + +```java +public static class CompatTranscriptions +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient, String basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 296. + +*** + +### delete + +#### Signature + +```java +public Map delete(String sid) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 315. + +*** + +### get + +#### Signature + +```java +public Map get(String sid) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 311. + +*** + +### getBasePath + +#### Signature + +```java +public String getBasePath() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 301. + +*** + +### list + +#### Signature + + + + ```java + public Map list() + ``` + + + + ```java + public Map list(Map queryParams) + ``` + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 303. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 291. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/index.mdx new file mode 100644 index 0000000000..58a8ada5dd --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/index.mdx @@ -0,0 +1,411 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace" +title: "CompatNamespace" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.CompatNamespace" + parent: "com.signalwire.sdk.rest.namespaces" + module: "com.signalwire.sdk.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java" + visibility: "public" +--- +# `CompatNamespace` + +REST namespace for compatibility (CXML/Twilio-compatible) resources. + +<p>The Twilio-compatible LAML API is mounted under +`/api/laml/2010-04-01/Accounts/{AccountSid`}. + +The trailing +`/api` prefix is added by `HttpClient`, so namespace base +paths here begin with `/laml/2010-04-01/Accounts/...`. + +## Signature + +```java +public class CompatNamespace +``` + +## Classes + + + + Compat account / sub-project management. <p>Mirrors `signalwire.rest.namespaces.compat.CompatAccounts`: accounts.create lives at the top-level `/Accounts` collection (no AccountSid prefix); accounts.get/update operate on `/Accounts/{sid`\}. + + + + Compat application management. + + + + Compat call management with recording and stream sub-resources. + + + + Compat conference management with participants, recordings, and stream sub-resources. + + + + Compat fax management with media sub-resources. + + + + Compat cXML/LaML script bin management. + + + + Compat message management with media sub-resources. + + + + Compat IncomingPhoneNumbers + AvailablePhoneNumbers management. + + + + Compat queue management with member operations. + + + + Compat recording management. + + + + Compat API token management. + + + + Compat transcription management. + + + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient, String accountSid) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 44. + +*** + +### accounts + +#### Signature + +```java +public CompatAccounts accounts() +``` + +#### Returns + +`CompatAccounts` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 74. + +*** + +### applications + +#### Signature + +```java +public CompatApplications applications() +``` + +#### Returns + +`CompatApplications` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 77. + +*** + +### calls + +#### Signature + +```java +public CompatCalls calls() +``` + +#### Returns + +`CompatCalls` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 68. + +*** + +### conferences + +#### Signature + +```java +public CompatConferences conferences() +``` + +#### Returns + +`CompatConferences` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 76. + +*** + +### faxes + +#### Signature + +```java +public CompatFaxes faxes() +``` + +#### Returns + +`CompatFaxes` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 70. + +*** + +### lamlBins + +#### Signature + +```java +public CompatLamlBins lamlBins() +``` + +#### Returns + +`CompatLamlBins` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 78. + +*** + +### messages + +#### Signature + +```java +public CompatMessages messages() +``` + +#### Returns + +`CompatMessages` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 69. + +*** + +### phoneNumbers + +#### Signature + +```java +public CompatPhoneNumbers phoneNumbers() +``` + +#### Returns + +`CompatPhoneNumbers` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 71. + +*** + +### queues + +#### Signature + +```java +public CompatQueues queues() +``` + +#### Returns + +`CompatQueues` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 75. + +*** + +### recordings + +#### Signature + +```java +public CompatRecordings recordings() +``` + +#### Returns + +`CompatRecordings` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 72. + +*** + +### sipCredentialLists + +#### Signature + +```java +public CrudResource sipCredentialLists() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 81. + +*** + +### sipDomains + +#### Signature + +```java +public CrudResource sipDomains() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 80. + +*** + +### sipIpAccessControlLists + +#### Signature + +```java +public CrudResource sipIpAccessControlLists() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 82. + +*** + +### tokens + +#### Signature + +```java +public CompatTokens tokens() +``` + +#### Returns + +`CompatTokens` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 79. + +*** + +### transcriptions + +#### Signature + +```java +public CompatTranscriptions transcriptions() +``` + +#### Returns + +`CompatTranscriptions` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 73. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 22. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compliance-namespace/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compliance-namespace/index.mdx new file mode 100644 index 0000000000..d73a8f8c39 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compliance-namespace/index.mdx @@ -0,0 +1,90 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compliance-namespace" +title: "ComplianceNamespace" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.ComplianceNamespace" + parent: "com.signalwire.sdk.rest.namespaces" + module: "com.signalwire.sdk.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ComplianceNamespace.java" + visibility: "public" +--- +# `ComplianceNamespace` + +REST namespace for compliance resources (CNAM, SHAKEN/STIR). + +## Signature + +```java +public class ComplianceNamespace +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ComplianceNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ComplianceNamespace.java) + +Line 20. + +*** + +### cnamRegistrations + +#### Signature + +```java +public CrudResource cnamRegistrations() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ComplianceNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ComplianceNamespace.java) + +Line 25. + +*** + +### shakenStir + +#### Signature + +```java +public CrudResource shakenStir() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ComplianceNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ComplianceNamespace.java) + +Line 26. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ComplianceNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ComplianceNamespace.java) + +Line 15. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/conference-namespace/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/conference-namespace/index.mdx new file mode 100644 index 0000000000..205fcb172e --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/conference-namespace/index.mdx @@ -0,0 +1,90 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/conference-namespace" +title: "ConferenceNamespace" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.ConferenceNamespace" + parent: "com.signalwire.sdk.rest.namespaces" + module: "com.signalwire.sdk.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ConferenceNamespace.java" + visibility: "public" +--- +# `ConferenceNamespace` + +REST namespace for conference resources. + +## Signature + +```java +public class ConferenceNamespace +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ConferenceNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ConferenceNamespace.java) + +Line 20. + +*** + +### conferences + +#### Signature + +```java +public CrudResource conferences() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ConferenceNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ConferenceNamespace.java) + +Line 25. + +*** + +### participants + +#### Signature + +```java +public CrudResource participants() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ConferenceNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ConferenceNamespace.java) + +Line 26. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ConferenceNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ConferenceNamespace.java) + +Line 15. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/datasphere-namespace/datasphere-documents/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/datasphere-namespace/datasphere-documents/index.mdx new file mode 100644 index 0000000000..f213d94b52 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/datasphere-namespace/datasphere-documents/index.mdx @@ -0,0 +1,181 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/datasphere-namespace/datasphere-documents" +title: "DatasphereDocuments" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.DatasphereNamespace.DatasphereDocuments" + parent: "com.signalwire.sdk.rest.namespaces.DatasphereNamespace" + module: "com.signalwire.sdk.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/DatasphereNamespace.java" + visibility: "public" +--- +# `DatasphereDocuments` + +Document management with search and chunk operations. + +**Modifiers:** `static` + +## Signature + +```java +public static class DatasphereDocuments extends CrudResource +``` + +## Inheritance + +**Extends:** [CrudResource](/docs/sdk-reference/reference/java/com/signalwire/sdk/rest/rest/crud-resource) + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient, String basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/DatasphereNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/DatasphereNamespace.java) + +Line 50. + +*** + +### deleteChunk + +#### Signature + +```java +public Map deleteChunk(String documentId, String chunkId) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/DatasphereNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/DatasphereNamespace.java) + +Line 70. + +*** + +### getChunk + +#### Signature + +```java +public Map getChunk(String documentId, String chunkId) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/DatasphereNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/DatasphereNamespace.java) + +Line 66. + +*** + +### listChunks + +#### Signature + + + + ```java + public Map listChunks(String documentId) + ``` + + + + ```java + public Map listChunks( + String documentId, + Map queryParams + ) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/DatasphereNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/DatasphereNamespace.java) + +Line 58. + +*** + +### search + +#### Signature + +```java +public Map search(Map body) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/DatasphereNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/DatasphereNamespace.java) + +Line 54. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/DatasphereNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/DatasphereNamespace.java) + +Line 48. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/datasphere-namespace/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/datasphere-namespace/index.mdx new file mode 100644 index 0000000000..8fb71785b7 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/datasphere-namespace/index.mdx @@ -0,0 +1,109 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/datasphere-namespace" +title: "DatasphereNamespace" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.DatasphereNamespace" + parent: "com.signalwire.sdk.rest.namespaces" + module: "com.signalwire.sdk.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/DatasphereNamespace.java" + visibility: "public" +--- +# `DatasphereNamespace` + +REST namespace for DataSphere (knowledge base) resources. + +<p>Mirrors `signalwire.rest.namespaces.datasphere.DatasphereNamespace`: +documents are CRUD-shaped, plus `search` (POST) and chunk-level +operations. + +## Signature + +```java +public class DatasphereNamespace +``` + +## Classes + + + + Document management with search and chunk operations. + + + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/DatasphereNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/DatasphereNamespace.java) + +Line 26. + +*** + +### documents + +#### Signature + +```java +public DatasphereDocuments documents() +``` + +#### Returns + +`DatasphereDocuments` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/DatasphereNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/DatasphereNamespace.java) + +Line 31. + +*** + +### search + +Legacy convenience for knowledge-base search; the canonical entry point +is `DatasphereDocuments#search(Map)`. + +#### Signature + +```java +public Map search(Map body) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/DatasphereNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/DatasphereNamespace.java) + +Line 37. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/DatasphereNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/DatasphereNamespace.java) + +Line 21. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/call-flows-resource/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/call-flows-resource/index.mdx new file mode 100644 index 0000000000..dc1838537a --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/call-flows-resource/index.mdx @@ -0,0 +1,211 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/call-flows-resource" +title: "CallFlowsResource" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.FabricNamespace.CallFlowsResource" + parent: "com.signalwire.sdk.rest.namespaces.FabricNamespace" + module: "com.signalwire.sdk.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java" + visibility: "public" +--- +# `CallFlowsResource` + +Call flows resource — uses PUT for update and rewrites the path +segment to singular `call_flow` for sub-collection paths +(per the API spec). + +**Modifiers:** `static` + +## Signature + +```java +public static class CallFlowsResource extends CrudResource +``` + +## Inheritance + +**Extends:** [CrudResource](/docs/sdk-reference/reference/java/com/signalwire/sdk/rest/rest/crud-resource) + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient, String basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 177. + +*** + +### deployVersion + +#### Signature + +```java +public Map deployVersion( + String resourceId, + Map body +) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 208. + +*** + +### listAddresses + +#### Signature + + + + ```java + public Map listAddresses(String resourceId) + ``` + + + + ```java + public Map listAddresses( + String resourceId, + Map queryParams + ) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 190. + +*** + +### listVersions + +#### Signature + + + + ```java + public Map listVersions(String resourceId) + ``` + + + + ```java + public Map listVersions( + String resourceId, + Map queryParams + ) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 199. + +*** + +### update + +**Decorators:** `@Override` + +#### Signature + +```java +public Map update(String resourceId, Map body) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 181. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 175. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/conference-rooms-resource/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/conference-rooms-resource/index.mdx new file mode 100644 index 0000000000..ea748916f7 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/conference-rooms-resource/index.mdx @@ -0,0 +1,133 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/conference-rooms-resource" +title: "ConferenceRoomsResource" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.FabricNamespace.ConferenceRoomsResource" + parent: "com.signalwire.sdk.rest.namespaces.FabricNamespace" + module: "com.signalwire.sdk.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java" + visibility: "public" +--- +# `ConferenceRoomsResource` + +Conference rooms — singular `conference_room` for sub-collections. + +**Modifiers:** `static` + +## Signature + +```java +public static class ConferenceRoomsResource extends CrudResource +``` + +## Inheritance + +**Extends:** [CrudResource](/docs/sdk-reference/reference/java/com/signalwire/sdk/rest/rest/crud-resource) + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient, String basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 218. + +*** + +### listAddresses + +#### Signature + + + + ```java + public Map listAddresses(String resourceId) + ``` + + + + ```java + public Map listAddresses( + String resourceId, + Map queryParams + ) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 231. + +*** + +### update + +**Decorators:** `@Override` + +#### Signature + +```java +public Map update(String resourceId, Map body) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 222. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 216. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/cxml-applications-resource/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/cxml-applications-resource/index.mdx new file mode 100644 index 0000000000..1bd8952328 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/cxml-applications-resource/index.mdx @@ -0,0 +1,113 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/cxml-applications-resource" +title: "CxmlApplicationsResource" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.FabricNamespace.CxmlApplicationsResource" + parent: "com.signalwire.sdk.rest.namespaces.FabricNamespace" + module: "com.signalwire.sdk.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java" + visibility: "public" +--- +# `CxmlApplicationsResource` + +cXML applications — read/update/delete only (no create endpoint exists). +Calling `create` raises `UnsupportedOperationException`. + +**Modifiers:** `static` + +## Signature + +```java +public static class CxmlApplicationsResource extends CrudResource +``` + +## Inheritance + +**Extends:** [CrudResource](/docs/sdk-reference/reference/java/com/signalwire/sdk/rest/rest/crud-resource) + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient, String basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 247. + +*** + +### create + +**Decorators:** `@Override` + +#### Signature + +```java +public Map create(Map body) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 251. + +*** + +### update + +**Decorators:** `@Override` + +#### Signature + +```java +public Map update(String resourceId, Map body) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 257. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 245. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/fabric-addresses/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/fabric-addresses/index.mdx new file mode 100644 index 0000000000..6dc0866c18 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/fabric-addresses/index.mdx @@ -0,0 +1,136 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/fabric-addresses" +title: "FabricAddresses" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.FabricNamespace.FabricAddresses" + parent: "com.signalwire.sdk.rest.namespaces.FabricNamespace" + module: "com.signalwire.sdk.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java" + visibility: "public" +--- +# `FabricAddresses` + +Read-only fabric addresses collection (top-level). + +**Modifiers:** `static` + +## Signature + +```java +public static class FabricAddresses +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient, String basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 96. + +*** + +### get + +#### Signature + +```java +public Map get(String addressId) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 111. + +*** + +### getBasePath + +#### Signature + +```java +public String getBasePath() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 101. + +*** + +### list + +#### Signature + + + + ```java + public Map list() + ``` + + + + ```java + public Map list(Map queryParams) + ``` + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 103. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 91. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/fabric-subscribers/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/fabric-subscribers/index.mdx new file mode 100644 index 0000000000..3fc6827e3d --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/fabric-subscribers/index.mdx @@ -0,0 +1,298 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/fabric-subscribers" +title: "FabricSubscribers" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.FabricNamespace.FabricSubscribers" + parent: "com.signalwire.sdk.rest.namespaces.FabricNamespace" + module: "com.signalwire.sdk.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java" + visibility: "public" +--- +# `FabricSubscribers` + +Subscribers resource with SIP-endpoint sub-resource. + +Update uses PUT. + +**Modifiers:** `static` + +## Signature + +```java +public static class FabricSubscribers extends CrudResource +``` + +## Inheritance + +**Extends:** [CrudResource](/docs/sdk-reference/reference/java/com/signalwire/sdk/rest/rest/crud-resource) + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient, String basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 121. + +*** + +### createSipEndpoint + +#### Signature + +```java +public Map createSipEndpoint( + String subscriberId, + Map body +) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 139. + +*** + +### deleteSipEndpoint + +#### Signature + +```java +public Map deleteSipEndpoint( + String subscriberId, + String endpointId +) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 155. + +*** + +### getSipEndpoint + +#### Signature + +```java +public Map getSipEndpoint(String subscriberId, String endpointId) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 144. + +*** + +### listAddresses + +#### Signature + + + + ```java + public Map listAddresses(String subscriberId) + ``` + + + + ```java + public Map listAddresses( + String subscriberId, + Map queryParams + ) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 160. + +*** + +### listSipEndpoints + +#### Signature + + + + ```java + public Map listSipEndpoints(String subscriberId) + ``` + + + + ```java + public Map listSipEndpoints( + String subscriberId, + Map queryParams + ) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 130. + +*** + +### update + +**Decorators:** `@Override` + +#### Signature + +```java +public Map update(String resourceId, Map body) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 125. + +*** + +### updateSipEndpoint + +#### Signature + +```java +public Map updateSipEndpoint( + String subscriberId, + String endpointId, + Map body +) +``` + +#### Parameters + + + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 149. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 119. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/fabric-tokens/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/fabric-tokens/index.mdx new file mode 100644 index 0000000000..9334f09ced --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/fabric-tokens/index.mdx @@ -0,0 +1,172 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/fabric-tokens" +title: "FabricTokens" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.FabricNamespace.FabricTokens" + parent: "com.signalwire.sdk.rest.namespaces.FabricNamespace" + module: "com.signalwire.sdk.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java" + visibility: "public" +--- +# `FabricTokens` + +Subscriber, guest, invite, and embed token endpoints (all POST). + +**Modifiers:** `static` + +## Signature + +```java +public static class FabricTokens +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 316. + +*** + +### createEmbedToken + +#### Signature + +```java +public Map createEmbedToken(Map body) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 336. + +*** + +### createGuestToken + +#### Signature + +```java +public Map createGuestToken(Map body) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 332. + +*** + +### createInviteToken + +#### Signature + +```java +public Map createInviteToken(Map body) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 328. + +*** + +### createSubscriberToken + +#### Signature + +```java +public Map createSubscriberToken(Map body) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 320. + +*** + +### refreshSubscriberToken + +#### Signature + +```java +public Map refreshSubscriberToken(Map body) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 324. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 312. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/generic-resources/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/generic-resources/index.mdx new file mode 100644 index 0000000000..bb8ef51460 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/generic-resources/index.mdx @@ -0,0 +1,237 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/generic-resources" +title: "GenericResources" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.FabricNamespace.GenericResources" + parent: "com.signalwire.sdk.rest.namespaces.FabricNamespace" + module: "com.signalwire.sdk.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java" + visibility: "public" +--- +# `GenericResources` + +Generic operations against `/api/fabric/resources`: list, get, +delete, plus address listing and domain-application assignment. + +**Modifiers:** `static` + +## Signature + +```java +public static class GenericResources +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient, String basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 272. + +*** + +### assignDomainApplication + +#### Signature + +```java +public Map assignDomainApplication( + String resourceId, + Map body +) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 303. + +*** + +### delete + +#### Signature + +```java +public Map delete(String resourceId) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 291. + +*** + +### get + +#### Signature + +```java +public Map get(String resourceId) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 287. + +*** + +### getBasePath + +#### Signature + +```java +public String getBasePath() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 277. + +*** + +### list + +#### Signature + + + + ```java + public Map list() + ``` + + + + ```java + public Map list(Map queryParams) + ``` + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 279. + +*** + +### listAddresses + +#### Signature + + + + ```java + public Map listAddresses(String resourceId) + ``` + + + + ```java + public Map listAddresses( + String resourceId, + Map queryParams + ) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 295. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 267. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/index.mdx new file mode 100644 index 0000000000..63ba63f71f --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/index.mdx @@ -0,0 +1,411 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace" +title: "FabricNamespace" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.FabricNamespace" + parent: "com.signalwire.sdk.rest.namespaces" + module: "com.signalwire.sdk.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java" + visibility: "public" +--- +# `FabricNamespace` + +REST namespace for SignalWire Fabric resources. + +<p>Mirrors `signalwire.rest.namespaces.fabric.FabricNamespace`: the +sub-resources expose typed access to addresses, generic resources, +subscribers (with sip-endpoint sub-resource ops), call-flow / conference-room +address sub-paths, cxml-applications (read-only), and tokens. + +The +`resources` entry-point handles cross-resource list/get/delete plus +domain-application assignment. + +## Signature + +```java +public class FabricNamespace +``` + +## Classes + + + + Call flows resource — uses PUT for update and rewrites the path segment to singular `call_flow` for sub-collection paths (per the API spec). + + + + Conference rooms — singular `conference_room` for sub-collections. + + + + cXML applications — read/update/delete only (no create endpoint exists). Calling `create` raises `UnsupportedOperationException`. + + + + Read-only fabric addresses collection (top-level). + + + + Subscribers resource with SIP-endpoint sub-resource. + + + + Subscriber, guest, invite, and embed token endpoints (all POST). + + + + Generic operations against `/api/fabric/resources`: list, get, delete, plus address listing and domain-application assignment. + + + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 43. + +*** + +### addresses + +#### Signature + +```java +public FabricAddresses addresses() +``` + +#### Returns + +`FabricAddresses` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 68. + +*** + +### aiAgents + +#### Signature + +```java +public CrudResource aiAgents() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 70. + +*** + +### callFlows + +#### Signature + +```java +public CallFlowsResource callFlows() +``` + +#### Returns + +`CallFlowsResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 71. + +*** + +### conferenceRooms + +#### Signature + +```java +public ConferenceRoomsResource conferenceRooms() +``` + +#### Returns + +`ConferenceRoomsResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 72. + +*** + +### cxmlApplications + +#### Signature + +```java +public CxmlApplicationsResource cxmlApplications() +``` + +#### Returns + +`CxmlApplicationsResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 73. + +*** + +### cxmlScripts + +#### Signature + +```java +public CrudResource cxmlScripts() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 74. + +*** + +### cxmlWebhooks + +#### Signature + +```java +public CrudResource cxmlWebhooks() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 75. + +*** + +### freeswitchConnectors + +#### Signature + +```java +public CrudResource freeswitchConnectors() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 76. + +*** + +### relayApplications + +#### Signature + +```java +public CrudResource relayApplications() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 77. + +*** + +### resources + +#### Signature + +```java +public GenericResources resources() +``` + +#### Returns + +`GenericResources` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 69. + +*** + +### sipEndpoints + +#### Signature + +```java +public CrudResource sipEndpoints() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 78. + +*** + +### sipGateways + +#### Signature + +```java +public CrudResource sipGateways() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 79. + +*** + +### subscribers + +#### Signature + +```java +public FabricSubscribers subscribers() +``` + +#### Returns + +`FabricSubscribers` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 67. + +*** + +### swmlScripts + +#### Signature + +```java +public CrudResource swmlScripts() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 80. + +*** + +### swmlWebhooks + +#### Signature + +```java +public CrudResource swmlWebhooks() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 81. + +*** + +### tokens + +#### Signature + +```java +public FabricTokens tokens() +``` + +#### Returns + +`FabricTokens` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 82. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 24. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fax-namespace/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fax-namespace/index.mdx new file mode 100644 index 0000000000..8cf0a40443 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fax-namespace/index.mdx @@ -0,0 +1,70 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fax-namespace" +title: "FaxNamespace" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.FaxNamespace" + parent: "com.signalwire.sdk.rest.namespaces" + module: "com.signalwire.sdk.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FaxNamespace.java" + visibility: "public" +--- +# `FaxNamespace` + +REST namespace for fax resources. + +## Signature + +```java +public class FaxNamespace +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FaxNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FaxNamespace.java) + +Line 19. + +*** + +### faxes + +#### Signature + +```java +public CrudResource faxes() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FaxNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FaxNamespace.java) + +Line 23. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FaxNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FaxNamespace.java) + +Line 15. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/imported-numbers-namespace/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/imported-numbers-namespace/index.mdx new file mode 100644 index 0000000000..82a9048335 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/imported-numbers-namespace/index.mdx @@ -0,0 +1,97 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/imported-numbers-namespace" +title: "ImportedNumbersNamespace" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.ImportedNumbersNamespace" + parent: "com.signalwire.sdk.rest.namespaces" + module: "com.signalwire.sdk.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ImportedNumbersNamespace.java" + visibility: "public" +--- +# `ImportedNumbersNamespace` + +Imported Phone Numbers namespace — create-only. + +<p>Mirrors +`signalwire.rest.namespaces.imported_numbers.ImportedNumbersResource`. + +## Signature + +```java +public class ImportedNumbersNamespace +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ImportedNumbersNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ImportedNumbersNamespace.java) + +Line 24. + +*** + +### create + +#### Signature + +```java +public Map create(Map body) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ImportedNumbersNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ImportedNumbersNamespace.java) + +Line 30. + +*** + +### getBasePath + +#### Signature + +```java +public String getBasePath() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ImportedNumbersNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ImportedNumbersNamespace.java) + +Line 28. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ImportedNumbersNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ImportedNumbersNamespace.java) + +Line 19. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/index.mdx new file mode 100644 index 0000000000..db1e1a52bd --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/index.mdx @@ -0,0 +1,143 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces" +title: "namespaces" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces" + module: "com.signalwire.sdk.rest.namespaces" +--- +# `namespaces` + +## Signature + +```java +package com.signalwire.sdk.rest.namespaces +``` + +## Classes + + + + Address management namespace. <p>Mirrors `signalwire.rest.namespaces.addresses.AddressesResource`: list / create / get / delete (no update endpoint exists for addresses). Paths sit under `/api/relay/rest/addresses`. + + + + REST namespace for billing resources. + + + + REST-based call control. + + + + REST namespace for 10DLC campaign registration resources. + + + + REST namespace for chat resources. + + + + REST namespace for compatibility (CXML/Twilio-compatible) resources. <p>The Twilio-compatible LAML API is mounted under `/api/laml/2010-04-01/Accounts/{AccountSid`\}. + + + + REST namespace for compliance resources (CNAM, SHAKEN/STIR). + + + + REST namespace for conference resources. + + + + REST namespace for DataSphere (knowledge base) resources. <p>Mirrors `signalwire.rest.namespaces.datasphere.DatasphereNamespace`: documents are CRUD-shaped, plus `search` (POST) and chunk-level operations. + + + + REST namespace for SignalWire Fabric resources. <p>Mirrors `signalwire.rest.namespaces.fabric.FabricNamespace`: the sub-resources expose typed access to addresses, generic resources, subscribers (with sip-endpoint sub-resource ops), call-flow / conference-room address sub-paths, cxml-applications (read-only), and tokens. + + + + REST namespace for fax resources. + + + + Imported Phone Numbers namespace — create-only. <p>Mirrors `signalwire.rest.namespaces.imported_numbers.ImportedNumbersResource`. + + + + Logs namespace — message, voice, fax, and conference logs (read-only). <p>Mirrors `signalwire.rest.namespaces.logs.LogsNamespace`: each sub-resource fans out to a distinct sub-API root (message → /messaging/logs, voice → /voice/logs, fax → /fax/logs, conference → /logs/conferences). + + + + REST namespace for messaging (SMS/MMS) resources. + + + + MFA (Multi-Factor Authentication) namespace. <p>Mirrors `signalwire.rest.namespaces.mfa.MfaResource`: sms / call / verify endpoints. + + + + Number Groups namespace — full CRUD on number groups + membership ops. <p>Mirrors `signalwire.rest.namespaces.number_groups.NumberGroupsResource`: the group CRUD uses PUT for update; membership get/delete operate against a separate top-level `/api/relay/rest/number_group_memberships` collection (not a sub-collection of the group). + + + + REST namespace for number lookup (CNAM/carrier lookup) resources. + + + + REST namespace for phone number management. <p> Supports the standard CRUD surface plus typed helpers for binding an inbound call to a handler (SWML webhook, cXML webhook, AI agent, call flow, RELAY application/topic). + + + + REST namespace for project management resources. <p>Mirrors `signalwire.rest.namespaces.project.ProjectNamespace`: exposes `ProjectTokens` for API token CRUD (PATCH for update, DELETE for revoke). + + + + REST namespace for Pub/Sub resources. + + + + Queues namespace — full CRUD with member operations. <p>Mirrors `signalwire.rest.namespaces.queues.QueuesResource`: queue CRUD uses PUT for update; members are addressable both per-id and via the special `/next` endpoint. + + + + Recordings namespace — list / get / delete (no create/update). <p>Mirrors `signalwire.rest.namespaces.recordings.RecordingsResource`. Path: `/api/relay/rest/recordings`. + + + + 10DLC Campaign Registry namespace — brands, campaigns, orders, numbers. <p>Mirrors `signalwire.rest.namespaces.registry.RegistryNamespace`. All endpoints sit under `/api/relay/rest/registry/beta`. + + + + Short Codes namespace — list / get / update (PUT). + + + + REST namespace for SIP resources. + + + + SIP Profile namespace — get / update (PUT) the project's singleton SIP profile. <p>Mirrors `signalwire.rest.namespaces.sip_profile.SipProfileResource`. + + + + REST namespace for audio stream resources. + + + + REST namespace for SWML script resources. + + + + REST namespace for transcription resources. + + + + REST namespace for the Video API: rooms, room sessions/recordings, conferences, conference tokens, and individual streams. <p>Mirrors `signalwire.rest.namespaces.video.VideoNamespace`. + + diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/logs-namespace/conference-logs/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/logs-namespace/conference-logs/index.mdx new file mode 100644 index 0000000000..e53f5988bb --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/logs-namespace/conference-logs/index.mdx @@ -0,0 +1,112 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/logs-namespace/conference-logs" +title: "ConferenceLogs" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.LogsNamespace.ConferenceLogs" + parent: "com.signalwire.sdk.rest.namespaces.LogsNamespace" + module: "com.signalwire.sdk.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java" + visibility: "public" +--- +# `ConferenceLogs` + +Conference logs — list-only. + +**Modifiers:** `static` + +## Signature + +```java +public static class ConferenceLogs +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient, String basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) + +Line 135. + +*** + +### getBasePath + +#### Signature + +```java +public String getBasePath() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) + +Line 140. + +*** + +### list + +#### Signature + + + + ```java + public Map list() + ``` + + + + ```java + public Map list(Map queryParams) + ``` + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) + +Line 142. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) + +Line 130. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/logs-namespace/fax-logs/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/logs-namespace/fax-logs/index.mdx new file mode 100644 index 0000000000..ded1935335 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/logs-namespace/fax-logs/index.mdx @@ -0,0 +1,136 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/logs-namespace/fax-logs" +title: "FaxLogs" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.LogsNamespace.FaxLogs" + parent: "com.signalwire.sdk.rest.namespaces.LogsNamespace" + module: "com.signalwire.sdk.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java" + visibility: "public" +--- +# `FaxLogs` + +Fax logs — list + per-id get. + +**Modifiers:** `static` + +## Signature + +```java +public static class FaxLogs +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient, String basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) + +Line 109. + +*** + +### get + +#### Signature + +```java +public Map get(String logId) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) + +Line 124. + +*** + +### getBasePath + +#### Signature + +```java +public String getBasePath() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) + +Line 114. + +*** + +### list + +#### Signature + + + + ```java + public Map list() + ``` + + + + ```java + public Map list(Map queryParams) + ``` + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) + +Line 116. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) + +Line 104. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/logs-namespace/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/logs-namespace/index.mdx new file mode 100644 index 0000000000..55adc0e9c0 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/logs-namespace/index.mdx @@ -0,0 +1,154 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/logs-namespace" +title: "LogsNamespace" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.LogsNamespace" + parent: "com.signalwire.sdk.rest.namespaces" + module: "com.signalwire.sdk.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java" + visibility: "public" +--- +# `LogsNamespace` + +Logs namespace — message, voice, fax, and conference logs (read-only). + +<p>Mirrors `signalwire.rest.namespaces.logs.LogsNamespace`: each +sub-resource fans out to a distinct sub-API root (message → /messaging/logs, +voice → /voice/logs, fax → /fax/logs, conference → /logs/conferences). + +## Signature + +```java +public class LogsNamespace +``` + +## Classes + + + + Conference logs — list-only. + + + + Fax logs — list + per-id get. + + + + Read-only logs supporting list + per-id get. + + + + Voice logs add a per-id events sub-collection. + + + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) + +Line 27. + +*** + +### conferences + +#### Signature + +```java +public ConferenceLogs conferences() +``` + +#### Returns + +`ConferenceLogs` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) + +Line 37. + +*** + +### fax + +#### Signature + +```java +public FaxLogs fax() +``` + +#### Returns + +`FaxLogs` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) + +Line 36. + +*** + +### messages + +#### Signature + +```java +public MessageLogs messages() +``` + +#### Returns + +`MessageLogs` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) + +Line 34. + +*** + +### voice + +#### Signature + +```java +public VoiceLogs voice() +``` + +#### Returns + +`VoiceLogs` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) + +Line 35. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) + +Line 20. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/logs-namespace/message-logs/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/logs-namespace/message-logs/index.mdx new file mode 100644 index 0000000000..1245eb6d7d --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/logs-namespace/message-logs/index.mdx @@ -0,0 +1,136 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/logs-namespace/message-logs" +title: "MessageLogs" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.LogsNamespace.MessageLogs" + parent: "com.signalwire.sdk.rest.namespaces.LogsNamespace" + module: "com.signalwire.sdk.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java" + visibility: "public" +--- +# `MessageLogs` + +Read-only logs supporting list + per-id get. + +**Modifiers:** `static` + +## Signature + +```java +public static class MessageLogs +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient, String basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) + +Line 49. + +*** + +### get + +#### Signature + +```java +public Map get(String logId) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) + +Line 64. + +*** + +### getBasePath + +#### Signature + +```java +public String getBasePath() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) + +Line 54. + +*** + +### list + +#### Signature + + + + ```java + public Map list() + ``` + + + + ```java + public Map list(Map queryParams) + ``` + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) + +Line 56. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) + +Line 44. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/logs-namespace/voice-logs/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/logs-namespace/voice-logs/index.mdx new file mode 100644 index 0000000000..cf3ea34c23 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/logs-namespace/voice-logs/index.mdx @@ -0,0 +1,183 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/logs-namespace/voice-logs" +title: "VoiceLogs" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.LogsNamespace.VoiceLogs" + parent: "com.signalwire.sdk.rest.namespaces.LogsNamespace" + module: "com.signalwire.sdk.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java" + visibility: "public" +--- +# `VoiceLogs` + +Voice logs add a per-id events sub-collection. + +**Modifiers:** `static` + +## Signature + +```java +public static class VoiceLogs +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient, String basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) + +Line 75. + +*** + +### get + +#### Signature + +```java +public Map get(String logId) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) + +Line 90. + +*** + +### getBasePath + +#### Signature + +```java +public String getBasePath() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) + +Line 80. + +*** + +### list + +#### Signature + + + + ```java + public Map list() + ``` + + + + ```java + public Map list(Map queryParams) + ``` + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) + +Line 82. + +*** + +### listEvents + +#### Signature + + + + ```java + public Map listEvents(String logId) + ``` + + + + ```java + public Map listEvents( + String logId, + Map queryParams + ) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) + +Line 94. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) + +Line 70. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/messaging-namespace/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/messaging-namespace/index.mdx new file mode 100644 index 0000000000..eb3affc3c1 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/messaging-namespace/index.mdx @@ -0,0 +1,96 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/messaging-namespace" +title: "MessagingNamespace" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.MessagingNamespace" + parent: "com.signalwire.sdk.rest.namespaces" + module: "com.signalwire.sdk.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/MessagingNamespace.java" + visibility: "public" +--- +# `MessagingNamespace` + +REST namespace for messaging (SMS/MMS) resources. + +## Signature + +```java +public class MessagingNamespace +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/MessagingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/MessagingNamespace.java) + +Line 22. + +*** + +### messages + +#### Signature + +```java +public CrudResource messages() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/MessagingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/MessagingNamespace.java) + +Line 27. + +*** + +### send + +Send a message via REST. + +#### Signature + +```java +public Map send(Map body) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/MessagingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/MessagingNamespace.java) + +Line 30. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/MessagingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/MessagingNamespace.java) + +Line 17. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/mfa-namespace/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/mfa-namespace/index.mdx new file mode 100644 index 0000000000..e0ed459a6f --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/mfa-namespace/index.mdx @@ -0,0 +1,147 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/mfa-namespace" +title: "MfaNamespace" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.MfaNamespace" + parent: "com.signalwire.sdk.rest.namespaces" + module: "com.signalwire.sdk.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/MfaNamespace.java" + visibility: "public" +--- +# `MfaNamespace` + +MFA (Multi-Factor Authentication) namespace. + +<p>Mirrors `signalwire.rest.namespaces.mfa.MfaResource`: +sms / call / verify endpoints. + +## Signature + +```java +public class MfaNamespace +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/MfaNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/MfaNamespace.java) + +Line 24. + +*** + +### call + +#### Signature + +```java +public Map call(Map body) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/MfaNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/MfaNamespace.java) + +Line 34. + +*** + +### getBasePath + +#### Signature + +```java +public String getBasePath() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/MfaNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/MfaNamespace.java) + +Line 28. + +*** + +### sms + +#### Signature + +```java +public Map sms(Map body) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/MfaNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/MfaNamespace.java) + +Line 30. + +*** + +### verify + +#### Signature + +```java +public Map verify(String requestId, Map body) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/MfaNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/MfaNamespace.java) + +Line 38. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/MfaNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/MfaNamespace.java) + +Line 19. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/number-groups-namespace/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/number-groups-namespace/index.mdx new file mode 100644 index 0000000000..c2de6e5de4 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/number-groups-namespace/index.mdx @@ -0,0 +1,333 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/number-groups-namespace" +title: "NumberGroupsNamespace" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.NumberGroupsNamespace" + parent: "com.signalwire.sdk.rest.namespaces" + module: "com.signalwire.sdk.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java" + visibility: "public" +--- +# `NumberGroupsNamespace` + +Number Groups namespace — full CRUD on number groups + membership ops. + +<p>Mirrors +`signalwire.rest.namespaces.number_groups.NumberGroupsResource`: the +group CRUD uses PUT for update; membership get/delete operate against a +separate top-level `/api/relay/rest/number_group_memberships` +collection (not a sub-collection of the group). + +## Signature + +```java +public class NumberGroupsNamespace +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java) + +Line 28. + +*** + +### addMembership + +#### Signature + +```java +public Map addMembership(String groupId, Map body) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java) + +Line 70. + +*** + +### create + +#### Signature + +```java +public Map create(Map body) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java) + +Line 44. + +*** + +### delete + +#### Signature + +```java +public Map delete(String groupId) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java) + +Line 56. + +*** + +### deleteMembership + +#### Signature + +```java +public Map deleteMembership(String membershipId) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java) + +Line 78. + +*** + +### get + +#### Signature + +```java +public Map get(String groupId) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java) + +Line 48. + +*** + +### getBasePath + +#### Signature + +```java +public String getBasePath() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java) + +Line 32. + +*** + +### getMembership + +#### Signature + +```java +public Map getMembership(String membershipId) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java) + +Line 74. + +*** + +### list + +#### Signature + + + + ```java + public Map list() + ``` + + + + ```java + public Map list(Map queryParams) + ``` + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java) + +Line 36. + +*** + +### listMemberships + +#### Signature + + + + ```java + public Map listMemberships(String groupId) + ``` + + + + ```java + public Map listMemberships( + String groupId, + Map queryParams + ) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java) + +Line 62. + +*** + +### update + +#### Signature + +```java +public Map update(String groupId, Map body) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java) + +Line 52. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java) + +Line 22. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/number-lookup-namespace/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/number-lookup-namespace/index.mdx new file mode 100644 index 0000000000..71714c9bee --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/number-lookup-namespace/index.mdx @@ -0,0 +1,76 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/number-lookup-namespace" +title: "NumberLookupNamespace" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.NumberLookupNamespace" + parent: "com.signalwire.sdk.rest.namespaces" + module: "com.signalwire.sdk.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/NumberLookupNamespace.java" + visibility: "public" +--- +# `NumberLookupNamespace` + +REST namespace for number lookup (CNAM/carrier lookup) resources. + +## Signature + +```java +public class NumberLookupNamespace +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/NumberLookupNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/NumberLookupNamespace.java) + +Line 20. + +*** + +### lookup + +Look up a phone number. + +#### Signature + +```java +public Map lookup(String phoneNumber) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/NumberLookupNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/NumberLookupNamespace.java) + +Line 25. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/NumberLookupNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/NumberLookupNamespace.java) + +Line 16. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/phone-numbers-namespace/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/phone-numbers-namespace/index.mdx new file mode 100644 index 0000000000..3574547b36 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/phone-numbers-namespace/index.mdx @@ -0,0 +1,614 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/phone-numbers-namespace" +title: "PhoneNumbersNamespace" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.PhoneNumbersNamespace" + parent: "com.signalwire.sdk.rest.namespaces" + module: "com.signalwire.sdk.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java" + visibility: "public" +--- +# `PhoneNumbersNamespace` + +REST namespace for phone number management. + +<p> +Supports the standard CRUD surface plus typed helpers for binding an +inbound call to a handler (SWML webhook, cXML webhook, AI agent, call +flow, RELAY application/topic). + +The binding model is: set +`call_handler` + the handler-specific companion field on the phone +number; the server auto-materializes the matching Fabric resource. +See `PhoneCallHandler` for the enum and `rest/docs/phone-binding.md` +for the full model. + +## Signature + +```java +public class PhoneNumbersNamespace +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java) + +Line 32. + +*** + +### create + +Purchase a phone number. + +#### Signature + +```java +public Map create(Map body) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java) + +Line 47. + +*** + +### delete + +Release a phone number. + +#### Signature + +```java +public Map delete(String id) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java) + +Line 53. + +*** + +### get + +Get a single phone number. + +#### Signature + +```java +public Map get(String id) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java) + +Line 44. + +*** + +### getResource + +Get the underlying CRUD resource. + +#### Signature + +```java +public CrudResource getResource() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java) + +Line 61. + +*** + +### list + +List all phone numbers. + +#### Signature + + + + ```java + public Map list() + ``` + + + + ```java + public Map list(Map queryParams) + ``` + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java) + +Line 38. + +*** + +### search + +Search available phone numbers. + +#### Signature + +```java +public Map search(Map queryParams) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java) + +Line 56. + +*** + +### setAiAgent + +Route inbound calls to an AI Agent Fabric resource by ID. + +#### Signature + +```java +public Map setAiAgent(String id, String agentId) +``` + +#### Parameters + + + phone number SID + + + + AI agent resource ID + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java) + +Line 156. + +*** + +### setCallFlow + +Route inbound calls to a Call Flow by ID (server default version). + +#### Signature + + + + ```java + public Map setCallFlow(String id, String flowId) + ``` + + + + ```java + public Map setCallFlow(String id, String flowId, String version) + ``` + + + +#### Parameters (Overload 1) + + + phone number SID + + + + call-flow resource ID + + +#### Parameters (Overload 2) + + + phone number SID + + + + call-flow resource ID + + + + `"working_copy"`, `"current_deployed"`, or `null` for the server default + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java) + +Line 169. + +*** + +### setCxmlApplication + +Route inbound calls to an existing cXML application by ID. + +#### Signature + +```java +public Map setCxmlApplication(String id, String applicationId) +``` + +#### Parameters + + + phone number SID + + + + cXML application ID + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java) + +Line 143. + +*** + +### setCxmlWebhook + +Route inbound calls to a cXML (Twilio-compat / LAML) webhook. + +<p> +Despite the wire value `laml_webhooks` being plural, this +creates a single `cxml_webhook` Fabric resource. + +#### Signature + + + + ```java + public Map setCxmlWebhook(String id, String url) + ``` + + + + ```java + public Map setCxmlWebhook( + String id, + String url, + String fallbackUrl + ) + ``` + + + + ```java + public Map setCxmlWebhook( + String id, + String url, + String fallbackUrl, + String statusCallbackUrl + ) + ``` + + + +#### Parameters (Overload 1) + + + phone number SID + + + + primary cXML endpoint + + +#### Parameters (Overload 2) + + + phone number SID + + + + primary cXML endpoint + + + + URL the server falls back to when the primary fails + + +#### Parameters (Overload 3) + + + phone number SID + + + + primary cXML endpoint + + + + fallback URL (may be `null`) + + + + call-status callback (may be `null`) + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Returns (Overload 3) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java) + +Line 100. + +*** + +### setRelayApplication + +Route inbound calls to a named RELAY application. + +#### Signature + +```java +public Map setRelayApplication(String id, String name) +``` + +#### Parameters + + + phone number SID + + + + RELAY application name + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java) + +Line 197. + +*** + +### setRelayTopic + +Route inbound calls to a RELAY topic (client subscription). + +#### Signature + + + + ```java + public Map setRelayTopic(String id, String topic) + ``` + + + + ```java + public Map setRelayTopic( + String id, + String topic, + String statusCallbackUrl + ) + ``` + + + +#### Parameters (Overload 1) + + + phone number SID + + + + RELAY topic name + + +#### Parameters (Overload 2) + + + phone number SID + + + + RELAY topic name + + + + call-status callback URL (may be `null`) + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java) + +Line 210. + +*** + +### setSwmlWebhook + +Route inbound calls on this phone number to an SWML webhook URL. + +<p> +Your backend returns an SWML document per call. + +The server +auto-creates a `swml_webhook` Fabric resource keyed off this URL. + +#### Signature + +```java +public Map setSwmlWebhook(String id, String url) +``` + +#### Parameters + + + phone number SID + + + + SWML endpoint the server should fetch per call + + +#### Returns + +`Map` — the updated phone number representation + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java) + +Line 84. + +*** + +### update + +Update a phone number. + +#### Signature + +```java +public Map update(String id, Map body) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java) + +Line 50. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java) + +Line 27. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/project-namespace/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/project-namespace/index.mdx new file mode 100644 index 0000000000..0c8b90cc39 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/project-namespace/index.mdx @@ -0,0 +1,178 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/project-namespace" +title: "ProjectNamespace" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.ProjectNamespace" + parent: "com.signalwire.sdk.rest.namespaces" + module: "com.signalwire.sdk.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java" + visibility: "public" +--- +# `ProjectNamespace` + +REST namespace for project management resources. + +<p>Mirrors `signalwire.rest.namespaces.project.ProjectNamespace`: +exposes `ProjectTokens` for API token CRUD (PATCH for update, +DELETE for revoke). + +## Signature + +```java +public class ProjectNamespace +``` + +## Classes + + + + Project API token management. + + + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java) + +Line 25. + +*** + +### createToken + +Create a project token (legacy single-method form). + +#### Signature + +```java +public Map createToken(Map body) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java) + +Line 50. + +*** + +### get + +Get project info. + +#### Signature + +```java +public Map get() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java) + +Line 35. + +*** + +### listTokens + +List project tokens (legacy single-method form). + +#### Signature + +```java +public Map listTokens() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java) + +Line 45. + +*** + +### tokens + +#### Signature + +```java +public ProjectTokens tokens() +``` + +#### Returns + +`ProjectTokens` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java) + +Line 30. + +*** + +### update + +Update project settings. + +#### Signature + +```java +public Map update(Map body) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java) + +Line 40. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java) + +Line 20. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/project-namespace/project-tokens/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/project-namespace/project-tokens/index.mdx new file mode 100644 index 0000000000..a47d25bc56 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/project-namespace/project-tokens/index.mdx @@ -0,0 +1,149 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/project-namespace/project-tokens" +title: "ProjectTokens" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.ProjectNamespace.ProjectTokens" + parent: "com.signalwire.sdk.rest.namespaces.ProjectNamespace" + module: "com.signalwire.sdk.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java" + visibility: "public" +--- +# `ProjectTokens` + +Project API token management. + +Update is PATCH (matches Python's +-> http.patch); delete revokes the token. + +**Modifiers:** `static` + +## Signature + +```java +public static class ProjectTokens +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java) + +Line 67. + +*** + +### create + +#### Signature + +```java +public Map create(Map body) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java) + +Line 73. + +*** + +### delete + +#### Signature + +```java +public Map delete(String tokenId) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java) + +Line 81. + +*** + +### getBasePath + +#### Signature + +```java +public String getBasePath() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java) + +Line 71. + +*** + +### update + +#### Signature + +```java +public Map update(String tokenId, Map body) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java) + +Line 77. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java) + +Line 62. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/pub-sub-namespace/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/pub-sub-namespace/index.mdx new file mode 100644 index 0000000000..44cc56e7f0 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/pub-sub-namespace/index.mdx @@ -0,0 +1,98 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/pub-sub-namespace" +title: "PubSubNamespace" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.PubSubNamespace" + parent: "com.signalwire.sdk.rest.namespaces" + module: "com.signalwire.sdk.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/PubSubNamespace.java" + visibility: "public" +--- +# `PubSubNamespace` + +REST namespace for Pub/Sub resources. + +## Signature + +```java +public class PubSubNamespace +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/PubSubNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/PubSubNamespace.java) + +Line 22. + +*** + +### channels + +#### Signature + +```java +public CrudResource channels() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/PubSubNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/PubSubNamespace.java) + +Line 27. + +*** + +### publish + +Publish a message to a channel. + +#### Signature + +```java +public Map publish(String channel, Map body) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/PubSubNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/PubSubNamespace.java) + +Line 30. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/PubSubNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/PubSubNamespace.java) + +Line 17. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/queue-namespace/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/queue-namespace/index.mdx new file mode 100644 index 0000000000..a8c984b9d7 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/queue-namespace/index.mdx @@ -0,0 +1,340 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/queue-namespace" +title: "QueueNamespace" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.QueueNamespace" + parent: "com.signalwire.sdk.rest.namespaces" + module: "com.signalwire.sdk.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java" + visibility: "public" +--- +# `QueueNamespace` + +Queues namespace — full CRUD with member operations. + +<p>Mirrors `signalwire.rest.namespaces.queues.QueuesResource`: queue +CRUD uses PUT for update; members are addressable both per-id and via the +special `/next` endpoint. + +## Signature + +```java +public class QueueNamespace +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java) + +Line 25. + +*** + +### create + +#### Signature + +```java +public Map create(Map body) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java) + +Line 41. + +*** + +### delete + +#### Signature + +```java +public Map delete(String queueId) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java) + +Line 53. + +*** + +### get + +#### Signature + +```java +public Map get(String queueId) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java) + +Line 45. + +*** + +### getBasePath + +#### Signature + +```java +public String getBasePath() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java) + +Line 29. + +*** + +### getMember + +#### Signature + +```java +public Map getMember(String queueId, String memberId) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java) + +Line 71. + +*** + +### getNextMember + +#### Signature + +```java +public Map getNextMember(String queueId) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java) + +Line 67. + +*** + +### list + +#### Signature + + + + ```java + public Map list() + ``` + + + + ```java + public Map list(Map queryParams) + ``` + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java) + +Line 33. + +*** + +### listMembers + +#### Signature + + + + ```java + public Map listMembers(String queueId) + ``` + + + + ```java + public Map listMembers( + String queueId, + Map queryParams + ) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java) + +Line 59. + +*** + +### queues + + + **Deprecated.** direct calls on this namespace (`#list()`, `#get(String)` etc.) match Python parity. Prefer those. + + +Returns the legacy `com.signalwire.sdk.rest.CrudResource`-shaped +accessor so older callers like `client.queues().queues()` keep +compiling. + +The returned resource targets the same path as this +namespace (`/relay/rest/queues`). + +**Decorators:** `@Deprecated` + +#### Signature + +```java +public com.signalwire.sdk.rest.CrudResource queues() +``` + +#### Returns + +`com.signalwire.sdk.rest.CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java) + +Line 84. + +*** + +### update + +#### Signature + +```java +public Map update(String queueId, Map body) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java) + +Line 49. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java) + +Line 20. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/recording-namespace/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/recording-namespace/index.mdx new file mode 100644 index 0000000000..048fc5ee78 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/recording-namespace/index.mdx @@ -0,0 +1,191 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/recording-namespace" +title: "RecordingNamespace" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.RecordingNamespace" + parent: "com.signalwire.sdk.rest.namespaces" + module: "com.signalwire.sdk.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RecordingNamespace.java" + visibility: "public" +--- +# `RecordingNamespace` + +Recordings namespace — list / get / delete (no create/update). + +<p>Mirrors `signalwire.rest.namespaces.recordings.RecordingsResource`. +Path: `/api/relay/rest/recordings`. + +## Signature + +```java +public class RecordingNamespace +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RecordingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RecordingNamespace.java) + +Line 24. + +*** + +### delete + +#### Signature + +```java +public Map delete(String recordingId) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RecordingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RecordingNamespace.java) + +Line 42. + +*** + +### get + +#### Signature + +```java +public Map get(String recordingId) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RecordingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RecordingNamespace.java) + +Line 38. + +*** + +### getBasePath + +#### Signature + +```java +public String getBasePath() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RecordingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RecordingNamespace.java) + +Line 28. + +*** + +### list + +#### Signature + + + + ```java + public Map list() + ``` + + + + ```java + public Map list(Map queryParams) + ``` + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RecordingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RecordingNamespace.java) + +Line 30. + +*** + +### recordings + + + **Deprecated.** prefer the direct namespace methods which match Python. + + +Legacy CRUD-shaped accessor for backwards compat with the previous +Java surface (`client.recordings().recordings()`). + +Targets the +same path as this namespace. + +**Decorators:** `@Deprecated` + +#### Signature + +```java +public com.signalwire.sdk.rest.CrudResource recordings() +``` + +#### Returns + +`com.signalwire.sdk.rest.CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RecordingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RecordingNamespace.java) + +Line 53. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RecordingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RecordingNamespace.java) + +Line 19. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/registry-namespace/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/registry-namespace/index.mdx new file mode 100644 index 0000000000..42d76b2152 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/registry-namespace/index.mdx @@ -0,0 +1,153 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/registry-namespace" +title: "RegistryNamespace" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.RegistryNamespace" + parent: "com.signalwire.sdk.rest.namespaces" + module: "com.signalwire.sdk.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java" + visibility: "public" +--- +# `RegistryNamespace` + +10DLC Campaign Registry namespace — brands, campaigns, orders, numbers. + +<p>Mirrors `signalwire.rest.namespaces.registry.RegistryNamespace`. +All endpoints sit under `/api/relay/rest/registry/beta`. + +## Signature + +```java +public class RegistryNamespace +``` + +## Classes + + + + 10DLC brand management — list / create / get plus brand-scoped campaign sub-resources. + + + + 10DLC campaign management — get / update (PUT) plus number / order sub-resources. + + + + 10DLC number-assignment management — release a number. + + + + 10DLC assignment-order management — read-only get. + + + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) + +Line 28. + +*** + +### brands + +#### Signature + +```java +public RegistryBrands brands() +``` + +#### Returns + +`RegistryBrands` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) + +Line 35. + +*** + +### campaigns + +#### Signature + +```java +public RegistryCampaigns campaigns() +``` + +#### Returns + +`RegistryCampaigns` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) + +Line 36. + +*** + +### numbers + +#### Signature + +```java +public RegistryNumbers numbers() +``` + +#### Returns + +`RegistryNumbers` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) + +Line 38. + +*** + +### orders + +#### Signature + +```java +public RegistryOrders orders() +``` + +#### Returns + +`RegistryOrders` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) + +Line 37. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) + +Line 19. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/registry-namespace/registry-brands/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/registry-namespace/registry-brands/index.mdx new file mode 100644 index 0000000000..fb430aea29 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/registry-namespace/registry-brands/index.mdx @@ -0,0 +1,237 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/registry-namespace/registry-brands" +title: "RegistryBrands" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.RegistryNamespace.RegistryBrands" + parent: "com.signalwire.sdk.rest.namespaces.RegistryNamespace" + module: "com.signalwire.sdk.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java" + visibility: "public" +--- +# `RegistryBrands` + +10DLC brand management — list / create / get plus brand-scoped +campaign sub-resources. + +**Modifiers:** `static` + +## Signature + +```java +public static class RegistryBrands +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient, String basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) + +Line 53. + +*** + +### create + +#### Signature + +```java +public Map create(Map body) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) + +Line 68. + +*** + +### createCampaign + +#### Signature + +```java +public Map createCampaign( + String brandId, + Map body +) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) + +Line 84. + +*** + +### get + +#### Signature + +```java +public Map get(String brandId) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) + +Line 72. + +*** + +### getBasePath + +#### Signature + +```java +public String getBasePath() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) + +Line 58. + +*** + +### list + +#### Signature + + + + ```java + public Map list() + ``` + + + + ```java + public Map list(Map queryParams) + ``` + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) + +Line 60. + +*** + +### listCampaigns + +#### Signature + + + + ```java + public Map listCampaigns(String brandId) + ``` + + + + ```java + public Map listCampaigns( + String brandId, + Map queryParams + ) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) + +Line 76. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) + +Line 48. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/registry-namespace/registry-campaigns/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/registry-namespace/registry-campaigns/index.mdx new file mode 100644 index 0000000000..a4850a2c43 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/registry-namespace/registry-campaigns/index.mdx @@ -0,0 +1,248 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/registry-namespace/registry-campaigns" +title: "RegistryCampaigns" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.RegistryNamespace.RegistryCampaigns" + parent: "com.signalwire.sdk.rest.namespaces.RegistryNamespace" + module: "com.signalwire.sdk.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java" + visibility: "public" +--- +# `RegistryCampaigns` + +10DLC campaign management — get / update (PUT) plus number / order +sub-resources. + +**Modifiers:** `static` + +## Signature + +```java +public static class RegistryCampaigns +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient, String basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) + +Line 98. + +*** + +### createOrder + +#### Signature + +```java +public Map createOrder( + String campaignId, + Map body +) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) + +Line 129. + +*** + +### get + +#### Signature + +```java +public Map get(String campaignId) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) + +Line 105. + +*** + +### getBasePath + +#### Signature + +```java +public String getBasePath() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) + +Line 103. + +*** + +### listNumbers + +#### Signature + + + + ```java + public Map listNumbers(String campaignId) + ``` + + + + ```java + public Map listNumbers( + String campaignId, + Map queryParams + ) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) + +Line 113. + +*** + +### listOrders + +#### Signature + + + + ```java + public Map listOrders(String campaignId) + ``` + + + + ```java + public Map listOrders( + String campaignId, + Map queryParams + ) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) + +Line 121. + +*** + +### update + +#### Signature + +```java +public Map update(String campaignId, Map body) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) + +Line 109. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) + +Line 93. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/registry-namespace/registry-numbers/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/registry-namespace/registry-numbers/index.mdx new file mode 100644 index 0000000000..ae1a398fd5 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/registry-namespace/registry-numbers/index.mdx @@ -0,0 +1,98 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/registry-namespace/registry-numbers" +title: "RegistryNumbers" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.RegistryNamespace.RegistryNumbers" + parent: "com.signalwire.sdk.rest.namespaces.RegistryNamespace" + module: "com.signalwire.sdk.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java" + visibility: "public" +--- +# `RegistryNumbers` + +10DLC number-assignment management — release a number. + +**Modifiers:** `static` + +## Signature + +```java +public static class RegistryNumbers +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient, String basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) + +Line 162. + +*** + +### delete + +#### Signature + +```java +public Map delete(String numberId) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) + +Line 169. + +*** + +### getBasePath + +#### Signature + +```java +public String getBasePath() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) + +Line 167. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) + +Line 157. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/registry-namespace/registry-orders/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/registry-namespace/registry-orders/index.mdx new file mode 100644 index 0000000000..5ac265d9fd --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/registry-namespace/registry-orders/index.mdx @@ -0,0 +1,98 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/registry-namespace/registry-orders" +title: "RegistryOrders" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.RegistryNamespace.RegistryOrders" + parent: "com.signalwire.sdk.rest.namespaces.RegistryNamespace" + module: "com.signalwire.sdk.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java" + visibility: "public" +--- +# `RegistryOrders` + +10DLC assignment-order management — read-only get. + +**Modifiers:** `static` + +## Signature + +```java +public static class RegistryOrders +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient, String basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) + +Line 142. + +*** + +### get + +#### Signature + +```java +public Map get(String orderId) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) + +Line 149. + +*** + +### getBasePath + +#### Signature + +```java +public String getBasePath() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) + +Line 147. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) + +Line 137. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/short-codes-namespace/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/short-codes-namespace/index.mdx new file mode 100644 index 0000000000..82e585f712 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/short-codes-namespace/index.mdx @@ -0,0 +1,162 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/short-codes-namespace" +title: "ShortCodesNamespace" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.ShortCodesNamespace" + parent: "com.signalwire.sdk.rest.namespaces" + module: "com.signalwire.sdk.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ShortCodesNamespace.java" + visibility: "public" +--- +# `ShortCodesNamespace` + +Short Codes namespace — list / get / update (PUT). + +No create/delete. + +<p>Mirrors `signalwire.rest.namespaces.short_codes.ShortCodesResource`. + +## Signature + +```java +public class ShortCodesNamespace +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ShortCodesNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ShortCodesNamespace.java) + +Line 23. + +*** + +### get + +#### Signature + +```java +public Map get(String shortCodeId) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ShortCodesNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ShortCodesNamespace.java) + +Line 37. + +*** + +### getBasePath + +#### Signature + +```java +public String getBasePath() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ShortCodesNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ShortCodesNamespace.java) + +Line 27. + +*** + +### list + +#### Signature + + + + ```java + public Map list() + ``` + + + + ```java + public Map list(Map queryParams) + ``` + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ShortCodesNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ShortCodesNamespace.java) + +Line 29. + +*** + +### update + +#### Signature + +```java +public Map update(String shortCodeId, Map body) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ShortCodesNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ShortCodesNamespace.java) + +Line 41. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ShortCodesNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ShortCodesNamespace.java) + +Line 18. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/sip-namespace/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/sip-namespace/index.mdx new file mode 100644 index 0000000000..0f3a246f85 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/sip-namespace/index.mdx @@ -0,0 +1,90 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/sip-namespace" +title: "SipNamespace" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.SipNamespace" + parent: "com.signalwire.sdk.rest.namespaces" + module: "com.signalwire.sdk.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/SipNamespace.java" + visibility: "public" +--- +# `SipNamespace` + +REST namespace for SIP resources. + +## Signature + +```java +public class SipNamespace +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/SipNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/SipNamespace.java) + +Line 20. + +*** + +### endpoints + +#### Signature + +```java +public CrudResource endpoints() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/SipNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/SipNamespace.java) + +Line 25. + +*** + +### profiles + +#### Signature + +```java +public CrudResource profiles() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/SipNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/SipNamespace.java) + +Line 26. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/SipNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/SipNamespace.java) + +Line 15. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/sip-profile-namespace/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/sip-profile-namespace/index.mdx new file mode 100644 index 0000000000..a57251557b --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/sip-profile-namespace/index.mdx @@ -0,0 +1,117 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/sip-profile-namespace" +title: "SipProfileNamespace" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.SipProfileNamespace" + parent: "com.signalwire.sdk.rest.namespaces" + module: "com.signalwire.sdk.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/SipProfileNamespace.java" + visibility: "public" +--- +# `SipProfileNamespace` + +SIP Profile namespace — get / update (PUT) the project's singleton SIP +profile. + +<p>Mirrors `signalwire.rest.namespaces.sip_profile.SipProfileResource`. + +## Signature + +```java +public class SipProfileNamespace +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/SipProfileNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/SipProfileNamespace.java) + +Line 24. + +*** + +### get + +#### Signature + +```java +public Map get() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/SipProfileNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/SipProfileNamespace.java) + +Line 30. + +*** + +### getBasePath + +#### Signature + +```java +public String getBasePath() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/SipProfileNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/SipProfileNamespace.java) + +Line 28. + +*** + +### update + +#### Signature + +```java +public Map update(Map body) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/SipProfileNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/SipProfileNamespace.java) + +Line 34. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/SipProfileNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/SipProfileNamespace.java) + +Line 19. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/stream-namespace/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/stream-namespace/index.mdx new file mode 100644 index 0000000000..ef60d486b7 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/stream-namespace/index.mdx @@ -0,0 +1,70 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/stream-namespace" +title: "StreamNamespace" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.StreamNamespace" + parent: "com.signalwire.sdk.rest.namespaces" + module: "com.signalwire.sdk.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/StreamNamespace.java" + visibility: "public" +--- +# `StreamNamespace` + +REST namespace for audio stream resources. + +## Signature + +```java +public class StreamNamespace +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/StreamNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/StreamNamespace.java) + +Line 19. + +*** + +### streams + +#### Signature + +```java +public CrudResource streams() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/StreamNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/StreamNamespace.java) + +Line 23. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/StreamNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/StreamNamespace.java) + +Line 15. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/swml-namespace/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/swml-namespace/index.mdx new file mode 100644 index 0000000000..b8fb183a76 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/swml-namespace/index.mdx @@ -0,0 +1,70 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/swml-namespace" +title: "SwmlNamespace" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.SwmlNamespace" + parent: "com.signalwire.sdk.rest.namespaces" + module: "com.signalwire.sdk.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/SwmlNamespace.java" + visibility: "public" +--- +# `SwmlNamespace` + +REST namespace for SWML script resources. + +## Signature + +```java +public class SwmlNamespace +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/SwmlNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/SwmlNamespace.java) + +Line 19. + +*** + +### scripts + +#### Signature + +```java +public CrudResource scripts() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/SwmlNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/SwmlNamespace.java) + +Line 23. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/SwmlNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/SwmlNamespace.java) + +Line 15. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/transcription-namespace/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/transcription-namespace/index.mdx new file mode 100644 index 0000000000..517f38fd38 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/transcription-namespace/index.mdx @@ -0,0 +1,70 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/transcription-namespace" +title: "TranscriptionNamespace" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.TranscriptionNamespace" + parent: "com.signalwire.sdk.rest.namespaces" + module: "com.signalwire.sdk.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/TranscriptionNamespace.java" + visibility: "public" +--- +# `TranscriptionNamespace` + +REST namespace for transcription resources. + +## Signature + +```java +public class TranscriptionNamespace +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/TranscriptionNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/TranscriptionNamespace.java) + +Line 19. + +*** + +### transcriptions + +#### Signature + +```java +public CrudResource transcriptions() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/TranscriptionNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/TranscriptionNamespace.java) + +Line 23. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/TranscriptionNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/TranscriptionNamespace.java) + +Line 15. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/video-namespace/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/video-namespace/index.mdx new file mode 100644 index 0000000000..b243fb6a64 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/video-namespace/index.mdx @@ -0,0 +1,251 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/video-namespace" +title: "VideoNamespace" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.VideoNamespace" + parent: "com.signalwire.sdk.rest.namespaces" + module: "com.signalwire.sdk.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java" + visibility: "public" +--- +# `VideoNamespace` + +REST namespace for the Video API: rooms, room sessions/recordings, +conferences, conference tokens, and individual streams. + +<p>Mirrors `signalwire.rest.namespaces.video.VideoNamespace`. + +The +stream sub-resources hang off rooms and conferences; the top-level +`streams` resource exists for CRUD on individual streams keyed by +stream id. + +## Signature + +```java +public class VideoNamespace +``` + +## Classes + + + + Video conferences with token + stream sub-collections. + + + + Video conference tokens (top-level): get + reset. + + + + Top-level video room recordings collection: list, get, delete, plus a per-recording events sub-collection. + + + + Video room management with stream sub-resources. + + + + Video room sessions: list, get, plus events / members / recordings sub-collections. + + + + Top-level streams resource (per stream id): get / update (PUT) / delete. + + + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 33. + +*** + +### conferences + +#### Signature + +```java +public VideoConferences conferences() +``` + +#### Returns + +`VideoConferences` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 48. + +*** + +### conferenceTokens + +#### Signature + +```java +public VideoConferenceTokens conferenceTokens() +``` + +#### Returns + +`VideoConferenceTokens` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 49. + +*** + +### recordings + +Legacy alias for `#roomRecordings()`; previous releases of the +Java port exposed video.recordings(). + +Kept for backwards compatibility. + +#### Signature + +```java +public VideoRoomRecordings recordings() +``` + +#### Returns + +`VideoRoomRecordings` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 56. + +*** + +### roomRecordings + +#### Signature + +```java +public VideoRoomRecordings roomRecordings() +``` + +#### Returns + +`VideoRoomRecordings` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 47. + +*** + +### rooms + +#### Signature + +```java +public VideoRooms rooms() +``` + +#### Returns + +`VideoRooms` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 44. + +*** + +### roomSessions + +#### Signature + +```java +public VideoRoomSessions roomSessions() +``` + +#### Returns + +`VideoRoomSessions` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 46. + +*** + +### roomTokens + +#### Signature + +```java +public CrudResource roomTokens() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 45. + +*** + +### streams + +#### Signature + +```java +public VideoStreams streams() +``` + +#### Returns + +`VideoStreams` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 50. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 23. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/video-namespace/video-conference-tokens/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/video-namespace/video-conference-tokens/index.mdx new file mode 100644 index 0000000000..9bec37810d --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/video-namespace/video-conference-tokens/index.mdx @@ -0,0 +1,122 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/video-namespace/video-conference-tokens" +title: "VideoConferenceTokens" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.VideoNamespace.VideoConferenceTokens" + parent: "com.signalwire.sdk.rest.namespaces.VideoNamespace" + module: "com.signalwire.sdk.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java" + visibility: "public" +--- +# `VideoConferenceTokens` + +Video conference tokens (top-level): get + reset. + +**Modifiers:** `static` + +## Signature + +```java +public static class VideoConferenceTokens +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient, String basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 231. + +*** + +### get + +#### Signature + +```java +public Map get(String tokenId) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 238. + +*** + +### getBasePath + +#### Signature + +```java +public String getBasePath() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 236. + +*** + +### reset + +#### Signature + +```java +public Map reset(String tokenId) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 242. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 226. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/video-namespace/video-conferences/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/video-namespace/video-conferences/index.mdx new file mode 100644 index 0000000000..276f20cf21 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/video-namespace/video-conferences/index.mdx @@ -0,0 +1,211 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/video-namespace/video-conferences" +title: "VideoConferences" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.VideoNamespace.VideoConferences" + parent: "com.signalwire.sdk.rest.namespaces.VideoNamespace" + module: "com.signalwire.sdk.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java" + visibility: "public" +--- +# `VideoConferences` + +Video conferences with token + stream sub-collections. + +Update uses PUT. + +**Modifiers:** `static` + +## Signature + +```java +public static class VideoConferences extends CrudResource +``` + +## Inheritance + +**Extends:** [CrudResource](/docs/sdk-reference/reference/java/com/signalwire/sdk/rest/rest/crud-resource) + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient, String basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 188. + +*** + +### createStream + +#### Signature + +```java +public Map createStream( + String conferenceId, + Map body +) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 218. + +*** + +### listConferenceTokens + +#### Signature + + + + ```java + public Map listConferenceTokens(String conferenceId) + ``` + + + + ```java + public Map listConferenceTokens( + String conferenceId, + Map queryParams + ) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 197. + +*** + +### listStreams + +#### Signature + + + + ```java + public Map listStreams(String conferenceId) + ``` + + + + ```java + public Map listStreams( + String conferenceId, + Map queryParams + ) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 208. + +*** + +### update + +**Decorators:** `@Override` + +#### Signature + +```java +public Map update(String conferenceId, Map body) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 192. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 186. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/video-namespace/video-room-recordings/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/video-namespace/video-room-recordings/index.mdx new file mode 100644 index 0000000000..15c6c8e37e --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/video-namespace/video-room-recordings/index.mdx @@ -0,0 +1,208 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/video-namespace/video-room-recordings" +title: "VideoRoomRecordings" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.VideoNamespace.VideoRoomRecordings" + parent: "com.signalwire.sdk.rest.namespaces.VideoNamespace" + module: "com.signalwire.sdk.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java" + visibility: "public" +--- +# `VideoRoomRecordings` + +Top-level video room recordings collection: list, get, delete, plus +a per-recording events sub-collection. + +**Modifiers:** `static` + +## Signature + +```java +public static class VideoRoomRecordings +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient, String basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 151. + +*** + +### delete + +#### Signature + +```java +public Map delete(String recordingId) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 170. + +*** + +### get + +#### Signature + +```java +public Map get(String recordingId) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 166. + +*** + +### getBasePath + +#### Signature + +```java +public String getBasePath() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 156. + +*** + +### list + +#### Signature + + + + ```java + public Map list() + ``` + + + + ```java + public Map list(Map queryParams) + ``` + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 158. + +*** + +### listEvents + +#### Signature + + + + ```java + public Map listEvents(String recordingId) + ``` + + + + ```java + public Map listEvents( + String recordingId, + Map queryParams + ) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 174. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 146. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/video-namespace/video-room-sessions/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/video-namespace/video-room-sessions/index.mdx new file mode 100644 index 0000000000..a3d33df3c1 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/video-namespace/video-room-sessions/index.mdx @@ -0,0 +1,278 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/video-namespace/video-room-sessions" +title: "VideoRoomSessions" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.VideoNamespace.VideoRoomSessions" + parent: "com.signalwire.sdk.rest.namespaces.VideoNamespace" + module: "com.signalwire.sdk.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java" + visibility: "public" +--- +# `VideoRoomSessions` + +Video room sessions: list, get, plus events / members / recordings +sub-collections. + +**Modifiers:** `static` + +## Signature + +```java +public static class VideoRoomSessions +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient, String basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 98. + +*** + +### get + +#### Signature + +```java +public Map get(String sessionId) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 113. + +*** + +### getBasePath + +#### Signature + +```java +public String getBasePath() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 103. + +*** + +### list + +#### Signature + + + + ```java + public Map list() + ``` + + + + ```java + public Map list(Map queryParams) + ``` + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 105. + +*** + +### listEvents + +#### Signature + + + + ```java + public Map listEvents(String sessionId) + ``` + + + + ```java + public Map listEvents( + String sessionId, + Map queryParams + ) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 117. + +*** + +### listMembers + +#### Signature + + + + ```java + public Map listMembers(String sessionId) + ``` + + + + ```java + public Map listMembers( + String sessionId, + Map queryParams + ) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 125. + +*** + +### listRecordings + +#### Signature + + + + ```java + public Map listRecordings(String sessionId) + ``` + + + + ```java + public Map listRecordings( + String sessionId, + Map queryParams + ) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 133. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 93. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/video-namespace/video-rooms/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/video-namespace/video-rooms/index.mdx new file mode 100644 index 0000000000..d11d85a0bd --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/video-namespace/video-rooms/index.mdx @@ -0,0 +1,161 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/video-namespace/video-rooms" +title: "VideoRooms" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.VideoNamespace.VideoRooms" + parent: "com.signalwire.sdk.rest.namespaces.VideoNamespace" + module: "com.signalwire.sdk.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java" + visibility: "public" +--- +# `VideoRooms` + +Video room management with stream sub-resources. + +Update uses PUT. + +**Modifiers:** `static` + +## Signature + +```java +public static class VideoRooms extends CrudResource +``` + +## Inheritance + +**Extends:** [CrudResource](/docs/sdk-reference/reference/java/com/signalwire/sdk/rest/rest/crud-resource) + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient, String basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 67. + +*** + +### createStream + +#### Signature + +```java +public Map createStream(String roomId, Map body) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 84. + +*** + +### listStreams + +#### Signature + + + + ```java + public Map listStreams(String roomId) + ``` + + + + ```java + public Map listStreams( + String roomId, + Map queryParams + ) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 76. + +*** + +### update + +**Decorators:** `@Override` + +#### Signature + +```java +public Map update(String roomId, Map body) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 71. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 65. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/video-namespace/video-streams/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/video-namespace/video-streams/index.mdx new file mode 100644 index 0000000000..7b04b0e2b6 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/video-namespace/video-streams/index.mdx @@ -0,0 +1,148 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/video-namespace/video-streams" +title: "VideoStreams" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.VideoNamespace.VideoStreams" + parent: "com.signalwire.sdk.rest.namespaces.VideoNamespace" + module: "com.signalwire.sdk.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java" + visibility: "public" +--- +# `VideoStreams` + +Top-level streams resource (per stream id): get / update (PUT) / delete. + +**Modifiers:** `static` + +## Signature + +```java +public static class VideoStreams +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient, String basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 255. + +*** + +### delete + +#### Signature + +```java +public Map delete(String streamId) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 270. + +*** + +### get + +#### Signature + +```java +public Map get(String streamId) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 262. + +*** + +### getBasePath + +#### Signature + +```java +public String getBasePath() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 260. + +*** + +### update + +#### Signature + +```java +public Map update(String streamId, Map body) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 266. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 250. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/rest/crud-resource/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/rest/crud-resource/index.mdx new file mode 100644 index 0000000000..9df7e9093f --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/rest/crud-resource/index.mdx @@ -0,0 +1,259 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/rest/crud-resource" +title: "CrudResource" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.CrudResource" + parent: "com.signalwire.sdk.rest" + module: "com.signalwire.sdk.rest" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/CrudResource.java" + visibility: "public" +--- +# `CrudResource` + +Generic CRUD resource for REST API namespaces. + +<p> +Provides standard list, get, create, update, and delete operations +against a base path. + +Used by namespace classes to avoid repetitive +HTTP boilerplate. + +<pre>numbers = new CrudResource(httpClient, "/phone_numbers"); +var all = numbers.list(); +var one = numbers.get("pn-abc-123");</pre> + +## Signature + +```java +public class CrudResource +``` + +## Methods + +### \ + +Create a CRUD resource. + +#### Signature + +```java +public (HttpClient httpClient, String basePath) +``` + +#### Parameters + + + the HTTP client + + + + base path for this resource (e.g., "/phone\_numbers") + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/CrudResource.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/CrudResource.java) + +Line 35. + +*** + +### create + +Create a new resource. + +#### Signature + +```java +public Map create(Map body) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/CrudResource.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/CrudResource.java) + +Line 64. + +*** + +### delete + +Delete a resource by ID. + +#### Signature + +```java +public Map delete(String id) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/CrudResource.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/CrudResource.java) + +Line 78. + +*** + +### get + +Get a single resource by ID. + +#### Signature + +```java +public Map get(String id) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/CrudResource.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/CrudResource.java) + +Line 57. + +*** + +### getBasePath + +Get the base path for this resource. + +#### Signature + +```java +public String getBasePath() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/CrudResource.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/CrudResource.java) + +Line 85. + +*** + +### getHttpClient + +Get the underlying HTTP client. + +#### Signature + +```java +public HttpClient getHttpClient() +``` + +#### Returns + +`HttpClient` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/CrudResource.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/CrudResource.java) + +Line 92. + +*** + +### list + +List all resources. + +#### Signature + + + + ```java + public Map list() + ``` + + + + ```java + public Map list(Map queryParams) + ``` + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/CrudResource.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/CrudResource.java) + +Line 43. + +*** + +### update + +Update an existing resource by ID. + +#### Signature + +```java +public Map update(String id, Map body) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/CrudResource.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/CrudResource.java) + +Line 71. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/CrudResource.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/CrudResource.java) + +Line 24. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/rest/http-client/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/rest/http-client/index.mdx new file mode 100644 index 0000000000..30d7bbef1d --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/rest/http-client/index.mdx @@ -0,0 +1,317 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/rest/http-client" +title: "HttpClient" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.HttpClient" + parent: "com.signalwire.sdk.rest" + module: "com.signalwire.sdk.rest" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/HttpClient.java" + visibility: "public" +--- +# `HttpClient` + +HTTP client for the SignalWire REST API. + +<p> +Uses `java.net.http.HttpClient` (JDK 11+ built-in) with Basic Auth +and JSON content types. + +Provides low-level GET, POST, PUT, DELETE methods +used by `CrudResource` and namespace classes. + +## Signature + +```java +public class HttpClient +``` + +## Methods + +### \ + +Create an HTTP client. + +#### Signature + + + + ```java + public (String space, String project, String token) + ``` + + + + ```java + private (String baseUrl, String project, String token, Void marker) + ``` + + + +#### Parameters (Overload 1) + + + SignalWire space (e.g., "example.signalwire.com") + + + + project ID used as Basic Auth username + + + + API token used as Basic Auth password + + +#### Parameters (Overload 2) + + + + + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/HttpClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/HttpClient.java) + +Line 46. + +*** + +### delete + +DELETE request. + +#### Signature + +```java +public Map delete(String path) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/HttpClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/HttpClient.java) + +Line 146. + +*** + +### get + +GET request, returns parsed JSON as a Map. + +#### Signature + + + + ```java + public Map get(String path) + ``` + + + + ```java + public Map get(String path, Map queryParams) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/HttpClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/HttpClient.java) + +Line 88. + +*** + +### getBaseUrl + +Get the base URL. + +#### Signature + +```java +public String getBaseUrl() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/HttpClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/HttpClient.java) + +Line 157. + +*** + +### patch + +PATCH request with JSON body. + +java.net.http.HttpRequest doesn't have a +dedicated builder for PATCH, so use ...). + +#### Signature + +```java +public Map patch(String path, Map body) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/HttpClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/HttpClient.java) + +Line 133. + +*** + +### post + +POST request with JSON body. + +#### Signature + +```java +public Map post(String path, Map body) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/HttpClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/HttpClient.java) + +Line 106. + +*** + +### put + +PUT request with JSON body. + +#### Signature + +```java +public Map put(String path, Map body) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/HttpClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/HttpClient.java) + +Line 119. + +*** + +### withBaseUrl + +Create an HTTP client with an explicit base URL (e.g., plain HTTP for +local integration tests, or to point a `RestClient` at an audit +fixture). + +Production callers use the project, token) +constructor instead. + +**Modifiers:** `static` + +#### Signature + +```java +public static HttpClient withBaseUrl( + String baseUrl, + String project, + String token +) +``` + +#### Parameters + + + fully qualified base URL ending in `/api` + + + + project ID used as Basic Auth username + + + + API token used as Basic Auth password + + +#### Returns + +`HttpClient` — a configured HTTP client + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/HttpClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/HttpClient.java) + +Line 68. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/HttpClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/HttpClient.java) + +Line 29. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/rest/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/rest/index.mdx new file mode 100644 index 0000000000..c8f0ddf0a8 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/rest/index.mdx @@ -0,0 +1,210 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/rest" +title: "rest" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "com.signalwire.sdk.rest" + module: "com.signalwire.sdk.rest" +--- +# `rest` + +## Signature + +```java +package com.signalwire.sdk.rest +``` + +## Classes + + + + Generic CRUD resource for REST API namespaces. <p> Provides standard list, get, create, update, and delete operations against a base path. + + + + HTTP client for the SignalWire REST API. <p> Uses `java.net.http.HttpClient` (JDK 11+ built-in) with Basic Auth and JSON content types. + + + + Iterator that walks paged REST responses by following the `links.next` cursor. <p>Mirrors `signalwire.rest._pagination.PaginatedIterator`: the constructor records the `http` client, path, query params, and the data-list key without performing an HTTP fetch. + + + + SignalWire REST API client with all 21 namespaces. <p> Uses `java.net.http.HttpClient` with Basic Auth. + + + + Exception for SignalWire REST API errors. <p> Contains the HTTP status code and error message from the server. + + + +## Enums + +### PhoneCallHandler + +Values accepted for `call_handler` on +java.util.Map) phoneNumbers().update. + +<p> +Named `PhoneCallHandler` (not `CallHandler`) to avoid colliding +with the RELAY client's inbound-call-handler callback type. +<p> +Setting a phone number's `call_handler` + the handler-specific +companion field routes inbound calls and auto-materializes the matching +Fabric resource on the server. + +See the typed helpers on +`com.signalwire.sdk.rest.namespaces.PhoneNumbersNamespace` +(`setSwmlWebhook`, `setCxmlWebhook`, ...). + +<p>Binding table: +<pre> +Enum member Companion field (required) Auto-creates resource +----------------- -------------------------------- --------------------- +RELAY_SCRIPT call_relay_script_url swml_webhook +LAML_WEBHOOKS call_request_url cxml_webhook +LAML_APPLICATION call_laml_application_id cxml_application +AI_AGENT call_ai_agent_id ai_agent +CALL_FLOW call_flow_id call_flow +RELAY_APPLICATION call_relay_application relay_application +RELAY_TOPIC call_relay_topic (routes via RELAY) +RELAY_CONTEXT call_relay_context (legacy, prefer topic) +RELAY_CONNECTOR (connector config) (internal) +VIDEO_ROOM call_video_room_id (routes to Video API) +DIALOGFLOW call_dialogflow_agent_id (none) +</pre> + +<p>Note: `#LAML_WEBHOOKS` (wire value `laml_webhooks`) produces +a <b>cXML</b> handler, not a generic webhook. For SWML, use +`#RELAY_SCRIPT`. + +#### Signature + +```java +public enum PhoneCallHandler +``` + +#### Variants + + + + + + + + + + + + + + + + + + + + + + + +#### Methods + +##### toString + +Returns the wire value so this enum serializes transparently into +request bodies without an explicit `.wireValue()` indirection. + +**Decorators:** `@Override` + +###### Signature + +```java +public String toString() +``` + +###### Returns + +`String` + +###### Source + +[`src/main/java/com/signalwire/sdk/rest/PhoneCallHandler.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/PhoneCallHandler.java) + +Line 74. + +*** + +##### valueOf + +**Modifiers:** `static` + +###### Signature + +```java +public static PhoneCallHandler valueOf(String name) +``` + +###### Parameters + + + +###### Returns + +`PhoneCallHandler` + +###### Source + +[`src/main/java/com/signalwire/sdk/rest/PhoneCallHandler.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/PhoneCallHandler.java) + +*** + +##### values + +**Modifiers:** `static` + +###### Signature + +```java +public static PhoneCallHandler[] values() +``` + +###### Returns + +`PhoneCallHandler[]` + +###### Source + +[`src/main/java/com/signalwire/sdk/rest/PhoneCallHandler.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/PhoneCallHandler.java) + +*** + +##### wireValue + +The wire value sent on the `call_handler` field. + +###### Signature + +```java +public String wireValue() +``` + +###### Returns + +`String` + +###### Source + +[`src/main/java/com/signalwire/sdk/rest/PhoneCallHandler.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/PhoneCallHandler.java) + +Line 66. + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/PhoneCallHandler.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/PhoneCallHandler.java) + +Line 43. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/rest/paginated-iterator/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/rest/paginated-iterator/index.mdx new file mode 100644 index 0000000000..4401014da7 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/rest/paginated-iterator/index.mdx @@ -0,0 +1,176 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/rest/paginated-iterator" +title: "PaginatedIterator" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.PaginatedIterator" + parent: "com.signalwire.sdk.rest" + module: "com.signalwire.sdk.rest" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/PaginatedIterator.java" + visibility: "public" +--- +# `PaginatedIterator` + +Iterator that walks paged REST responses by following the +`links.next` cursor. + +<p>Mirrors `signalwire.rest._pagination.PaginatedIterator`: the +constructor records the `http` client, path, query params, and the +data-list key without performing an HTTP fetch. + +Each call to +`#next()` returns the next item from the buffered page; when the +buffer is exhausted the iterator follows `links.next`, parses the +URL query into the next request's params, and fetches the next page. + +<p>Iteration terminates when the buffer is empty and a fetched response +either lacks a `links.next` cursor or returns an empty data list. + +**Modifiers:** `final` + +## Signature + +```java +public final class PaginatedIterator implements Iterator>, Iterable> +``` + +## Inheritance + +**Implements:** `Iterator>`, `Iterable>` + +## Methods + +### \ + +#### Signature + + + + ```java + public (HttpClient http, String path) + ``` + + + + ```java + public (HttpClient http, String path, Map params) + ``` + + + + ```java + public ( + HttpClient http, + String path, + Map params, + String dataKey + ) + ``` + + + +#### Parameters (Overload 1) + + + + + +#### Parameters (Overload 2) + + + + + + + +#### Parameters (Overload 3) + + + + + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/PaginatedIterator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/PaginatedIterator.java) + +Line 46. + +*** + +### hasNext + +**Decorators:** `@Override` + +#### Signature + +```java +public boolean hasNext() +``` + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/PaginatedIterator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/PaginatedIterator.java) + +Line 67. + +*** + +### iterator + +**Decorators:** `@Override` + +#### Signature + +```java +public PaginatedIterator iterator() +``` + +#### Returns + +`PaginatedIterator` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/PaginatedIterator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/PaginatedIterator.java) + +Line 62. + +*** + +### next + +**Decorators:** `@Override` + +#### Signature + +```java +public Map next() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/PaginatedIterator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/PaginatedIterator.java) + +Line 78. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/PaginatedIterator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/PaginatedIterator.java) + +Line 34. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/rest/rest-client/builder/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/rest/rest-client/builder/index.mdx new file mode 100644 index 0000000000..6d2d6929a2 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/rest/rest-client/builder/index.mdx @@ -0,0 +1,136 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/rest/rest-client/builder" +title: "Builder" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.RestClient.Builder" + parent: "com.signalwire.sdk.rest.RestClient" + module: "com.signalwire.sdk.rest" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java" + visibility: "public" +--- +# `Builder` + +**Modifiers:** `static` + +## Signature + +```java +public static class Builder +``` + +## Methods + +### \ + +#### Signature + +```java +public () +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +*** + +### build + +#### Signature + +```java +public RestClient build() +``` + +#### Returns + +`RestClient` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 126. + +*** + +### project + +#### Signature + +```java +public Builder project(String project) +``` + +#### Parameters + + + +#### Returns + +`Builder` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 116. + +*** + +### space + +#### Signature + +```java +public Builder space(String space) +``` + +#### Parameters + + + +#### Returns + +`Builder` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 118. + +*** + +### token + +#### Signature + +```java +public Builder token(String token) +``` + +#### Parameters + + + +#### Returns + +`Builder` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 117. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 110. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/rest/rest-client/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/rest/rest-client/index.mdx new file mode 100644 index 0000000000..eea0171af0 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/rest/rest-client/index.mdx @@ -0,0 +1,781 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/rest/rest-client" +title: "RestClient" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.RestClient" + parent: "com.signalwire.sdk.rest" + module: "com.signalwire.sdk.rest" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java" + visibility: "public" +--- +# `RestClient` + +SignalWire REST API client with all 21 namespaces. + +<p> +Uses `java.net.http.HttpClient` with Basic Auth. + +Each namespace +provides typed access to a group of API resources. + +<pre>client = RestClient.builder() + .project("project-id") + .token("api-token") + .space("example.signalwire.com") + .build(); + +var numbers = client.phoneNumbers().list(); +var docs = client.datasphere().documents().list();</pre> + +## Signature + +```java +public class RestClient +``` + +## Classes + + + + + +## Methods + +### addresses + +#### Signature + +```java +public AddressesNamespace addresses() +``` + +#### Returns + +`AddressesNamespace` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 254. + +*** + +### billing + +#### Signature + +```java +public BillingNamespace billing() +``` + +#### Returns + +`BillingNamespace` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 212. + +*** + +### builder + +**Modifiers:** `static` + +#### Signature + +```java +public static Builder builder() +``` + +#### Returns + +`Builder` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 106. + +*** + +### calling + +#### Signature + +```java +public CallingNamespace calling() +``` + +#### Returns + +`CallingNamespace` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 147. + +*** + +### campaign + +#### Signature + +```java +public CampaignNamespace campaign() +``` + +#### Returns + +`CampaignNamespace` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 202. + +*** + +### chat + +#### Signature + +```java +public ChatNamespace chat() +``` + +#### Returns + +`ChatNamespace` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 187. + +*** + +### compat + +#### Signature + +```java +public CompatNamespace compat() +``` + +#### Returns + +`CompatNamespace` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 167. + +*** + +### compliance + +#### Signature + +```java +public ComplianceNamespace compliance() +``` + +#### Returns + +`ComplianceNamespace` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 207. + +*** + +### conferences + +#### Signature + +```java +public ConferenceNamespace conferences() +``` + +#### Returns + +`ConferenceNamespace` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 232. + +*** + +### datasphere + +#### Signature + +```java +public DatasphereNamespace datasphere() +``` + +#### Returns + +`DatasphereNamespace` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 157. + +*** + +### fabric + +#### Signature + +```java +public FabricNamespace fabric() +``` + +#### Returns + +`FabricNamespace` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 142. + +*** + +### fax + +#### Signature + +```java +public FaxNamespace fax() +``` + +#### Returns + +`FaxNamespace` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 182. + +*** + +### getHttpClient + +#### Signature + +```java +public HttpClient getHttpClient() +``` + +#### Returns + +`HttpClient` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 138. + +*** + +### getProject + +#### Signature + +```java +public String getProject() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 136. + +*** + +### getSpace + +#### Signature + +```java +public String getSpace() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 137. + +*** + +### importedNumbers + +#### Signature + +```java +public ImportedNumbersNamespace importedNumbers() +``` + +#### Returns + +`ImportedNumbersNamespace` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 264. + +*** + +### logs + +#### Signature + +```java +public LogsNamespace logs() +``` + +#### Returns + +`LogsNamespace` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 289. + +*** + +### messaging + +#### Signature + +```java +public MessagingNamespace messaging() +``` + +#### Returns + +`MessagingNamespace` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 172. + +*** + +### mfa + +#### Signature + +```java +public MfaNamespace mfa() +``` + +#### Returns + +`MfaNamespace` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 269. + +*** + +### numberGroups + +#### Signature + +```java +public NumberGroupsNamespace numberGroups() +``` + +#### Returns + +`NumberGroupsNamespace` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 279. + +*** + +### numberLookup + +#### Signature + +```java +public NumberLookupNamespace numberLookup() +``` + +#### Returns + +`NumberLookupNamespace` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 227. + +*** + +### phoneNumbers + +#### Signature + +```java +public PhoneNumbersNamespace phoneNumbers() +``` + +#### Returns + +`PhoneNumbersNamespace` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 152. + +*** + +### project + +#### Signature + +```java +public ProjectNamespace project() +``` + +#### Returns + +`ProjectNamespace` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 217. + +*** + +### pubSub + +#### Signature + +```java +public PubSubNamespace pubSub() +``` + +#### Returns + +`PubSubNamespace` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 192. + +*** + +### queues + +#### Signature + +```java +public QueueNamespace queues() +``` + +#### Returns + +`QueueNamespace` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 237. + +*** + +### recordings + +#### Signature + +```java +public RecordingNamespace recordings() +``` + +#### Returns + +`RecordingNamespace` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 242. + +*** + +### registry + +#### Signature + +```java +public RegistryNamespace registry() +``` + +#### Returns + +`RegistryNamespace` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 284. + +*** + +### shortCodes + +#### Signature + +```java +public ShortCodesNamespace shortCodes() +``` + +#### Returns + +`ShortCodesNamespace` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 259. + +*** + +### sip + +#### Signature + +```java +public SipNamespace sip() +``` + +#### Returns + +`SipNamespace` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 177. + +*** + +### sipProfile + +#### Signature + +```java +public SipProfileNamespace sipProfile() +``` + +#### Returns + +`SipProfileNamespace` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 274. + +*** + +### streams + +#### Signature + +```java +public StreamNamespace streams() +``` + +#### Returns + +`StreamNamespace` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 222. + +*** + +### swml + +#### Signature + +```java +public SwmlNamespace swml() +``` + +#### Returns + +`SwmlNamespace` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 197. + +*** + +### transcriptions + +#### Signature + +```java +public TranscriptionNamespace transcriptions() +``` + +#### Returns + +`TranscriptionNamespace` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 247. + +*** + +### video + +#### Signature + +```java +public VideoNamespace video() +``` + +#### Returns + +`VideoNamespace` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 162. + +*** + +### withBaseUrl + +Build a `RestClient` pointed at an explicit base URL — typically +a loopback fixture used by the porting-sdk's REST-transport audit. + +The +returned client signs requests with the given `project`/`token` +pair via Basic Auth and routes every namespace's HTTP through the +fixture instead of the live SignalWire space. + +**Modifiers:** `static` + +#### Signature + +```java +public static RestClient withBaseUrl( + String baseUrl, + String project, + String token +) +``` + +#### Parameters + + + fully qualified base URL (e.g. `"http://127.0.0.1:NNNN/api"`); `"/api"` is appended if not already present + + + + project ID used as the Basic Auth username + + + + API token used as the Basic Auth password + + +#### Returns + +`RestClient` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 89. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 30. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/rest/rest-error/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/rest/rest-error/index.mdx new file mode 100644 index 0000000000..4e41c77f7d --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/rest/rest-error/index.mdx @@ -0,0 +1,259 @@ +--- +slug: "/reference/java/com/signalwire/sdk/rest/rest/rest-error" +title: "RestError" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.RestError" + parent: "com.signalwire.sdk.rest" + module: "com.signalwire.sdk.rest" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestError.java" + visibility: "public" +--- +# `RestError` + +Exception for SignalWire REST API errors. + +<p> +Contains the HTTP status code and error message from the server. + +## Signature + +```java +public class RestError extends RuntimeException +``` + +## Inheritance + +**Extends:** `RuntimeException` + +## Methods + +### \ + +#### Signature + + + + ```java + public (int statusCode, String method, String path, String responseBody) + ``` + + + + ```java + public ( + int statusCode, + String method, + String path, + String responseBody, + Throwable cause + ) + ``` + + + +#### Parameters (Overload 1) + + + + + + + + + +#### Parameters (Overload 2) + + + + + + + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestError.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestError.java) + +Line 21. + +*** + +### getMethod + +#### Signature + +```java +public String getMethod() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestError.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestError.java) + +Line 41. + +*** + +### getPath + +#### Signature + +```java +public String getPath() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestError.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestError.java) + +Line 45. + +*** + +### getResponseBody + +#### Signature + +```java +public String getResponseBody() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestError.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestError.java) + +Line 49. + +*** + +### getStatusCode + +#### Signature + +```java +public int getStatusCode() +``` + +#### Returns + +`int` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestError.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestError.java) + +Line 37. + +*** + +### isClientError + +Whether the error is a client error (4xx). + +#### Signature + +```java +public boolean isClientError() +``` + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestError.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestError.java) + +Line 56. + +*** + +### isNotFound + +Whether the resource was not found (404). + +#### Signature + +```java +public boolean isNotFound() +``` + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestError.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestError.java) + +Line 70. + +*** + +### isServerError + +Whether the error is a server error (5xx). + +#### Signature + +```java +public boolean isServerError() +``` + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestError.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestError.java) + +Line 63. + +*** + +### isUnauthorized + +Whether access was denied (401 or 403). + +#### Signature + +```java +public boolean isUnauthorized() +``` + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestError.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestError.java) + +Line 77. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/RestError.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestError.java) + +Line 14. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/runtime/lambda/lambda/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/runtime/lambda/lambda/index.mdx new file mode 100644 index 0000000000..617bf068e7 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/runtime/lambda/lambda/index.mdx @@ -0,0 +1,31 @@ +--- +slug: "/reference/java/com/signalwire/sdk/runtime/lambda/lambda" +title: "lambda" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "com.signalwire.sdk.runtime.lambda" + module: "com.signalwire.sdk.runtime.lambda" +--- +# `lambda` + +## Signature + +```java +package com.signalwire.sdk.runtime.lambda +``` + +## Classes + + + + AWS Lambda adapter for a SignalWire `AgentBase`. <p>Translates API Gateway (REST v1 or HTTP v2) / Lambda Function URL events into the same dispatch logic the in-process HTTP server uses, without depending on the `aws-lambda-java-events` typed models at runtime (the handler accepts plain Object> so the SDK stays dependency-light). <p><b>Usage</b> — in your Lambda handler class: <pre>class MyHandler implements RequestHandler\, Map\> \{ private final LambdaAgentHandler delegate; public MyHandler() \{ AgentBase agent = AgentBase.builder() .name("my-agent") .route("/") .build(); agent.setPromptText("You are helpful."); this.delegate = new LambdaAgentHandler(agent); public Map\ handleRequest(Map\ event, Context ctx) \{ return delegate.handle(event).toMap(); \} \} \}</pre> <p>The adapter dispatches based on the request path and the agent's configured route: <ul> <li>/<route> → returns rendered SWML</li> <li>/<route>/swaig → executes the named SWAIG tool</li> <li>/<route>/post\_prompt → invokes the summary callback</li> <li>/<route>/mcp → JSON-RPC 2.0 (if MCP enabled)</li> <li>/health, `/ready` → health probes</li> </ul> <p>All webhook URLs generated inside the SWML document are built from the Lambda's Function URL (via `LambdaUrlResolver`) or the `SWML_PROXY_URL_BASE` override, with the agent's route always layered on top. + + + + Response shape returned by `LambdaAgentHandler` and compatible with AWS API Gateway (REST v1 and HTTP v2) and Lambda Function URL response envelopes. <p>The fields map 1:1 to `APIGatewayProxyResponseEvent`: `statusCode`, `headers`, `body`, `isBase64Encoded`. + + diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/runtime/lambda/lambda/lambda-agent-handler/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/runtime/lambda/lambda/lambda-agent-handler/index.mdx new file mode 100644 index 0000000000..ab2412de47 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/runtime/lambda/lambda/lambda-agent-handler/index.mdx @@ -0,0 +1,150 @@ +--- +slug: "/reference/java/com/signalwire/sdk/runtime/lambda/lambda/lambda-agent-handler" +title: "LambdaAgentHandler" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.runtime.lambda.LambdaAgentHandler" + parent: "com.signalwire.sdk.runtime.lambda" + module: "com.signalwire.sdk.runtime.lambda" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/lambda/LambdaAgentHandler.java" + visibility: "public" +--- +# `LambdaAgentHandler` + +AWS Lambda adapter for a SignalWire `AgentBase`. + +<p>Translates API Gateway (REST v1 or HTTP v2) / Lambda Function URL +events into the same dispatch logic the in-process HTTP server uses, +without depending on the `aws-lambda-java-events` typed models +at runtime (the handler accepts plain Object> so +the SDK stays dependency-light). + +<p><b>Usage</b> — in your Lambda handler class: +<pre>class MyHandler implements RequestHandler<Map<String, Object>, Map<String, Object>> { + private final LambdaAgentHandler delegate; + +``` +public MyHandler() { + AgentBase agent = AgentBase.builder() + .name("my-agent") + .route("/") + .build(); + agent.setPromptText("You are helpful."); + this.delegate = new LambdaAgentHandler(agent); + +public Map handleRequest(Map event, Context ctx) { + return delegate.handle(event).toMap(); +} +``` + +\} +\}</pre> + +<p>The adapter dispatches based on the request path and the agent's +configured route: +<ul> + <li>/<route> → returns rendered SWML</li> + <li>/<route>/swaig → executes the named SWAIG tool</li> + <li>/<route>/post_prompt → invokes the summary callback</li> + <li>/<route>/mcp → JSON-RPC 2.0 (if MCP enabled)</li> + <li>/health, `/ready` → health probes</li> +</ul> + +<p>All webhook URLs generated inside the SWML document are built from +the Lambda's Function URL (via `LambdaUrlResolver`) or the +`SWML_PROXY_URL_BASE` override, with the agent's route always +layered on top. + +This is the same invariant the HTTP server path +enforces. + +**Modifiers:** `final` + +## Signature + +```java +public final class LambdaAgentHandler +``` + +## Methods + +### \ + +Create a handler for the given agent using the real process +environment. + +#### Signature + + + + ```java + public (AgentBase agent) + ``` + + + + ```java + public (AgentBase agent, EnvProvider env) + ``` + + + +#### Parameters (Overload 1) + + + the configured agent. + + +#### Parameters (Overload 2) + + + the configured agent. + + + + environment variable source. + + +#### Source + +[`src/main/java/com/signalwire/sdk/runtime/lambda/LambdaAgentHandler.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/lambda/LambdaAgentHandler.java) + +Line 80. + +*** + +### handle + +Handle a single invocation. + +#### Signature + +```java +public LambdaResponse handle(Map event) +``` + +#### Parameters + + + the raw Lambda event (API Gateway v1, v2, or Function URL payload). Null events are treated as a root GET. + + +#### Returns + +`LambdaResponse` — response envelope ready to convert to `APIGatewayProxyResponseEvent` or equivalent. + +#### Source + +[`src/main/java/com/signalwire/sdk/runtime/lambda/LambdaAgentHandler.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/lambda/LambdaAgentHandler.java) + +Line 106. + +## Source + +[`src/main/java/com/signalwire/sdk/runtime/lambda/LambdaAgentHandler.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/lambda/LambdaAgentHandler.java) + +Line 65. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/runtime/lambda/lambda/lambda-response/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/runtime/lambda/lambda/lambda-response/index.mdx new file mode 100644 index 0000000000..e067a039a9 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/runtime/lambda/lambda/lambda-response/index.mdx @@ -0,0 +1,241 @@ +--- +slug: "/reference/java/com/signalwire/sdk/runtime/lambda/lambda/lambda-response" +title: "LambdaResponse" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.runtime.lambda.LambdaResponse" + parent: "com.signalwire.sdk.runtime.lambda" + module: "com.signalwire.sdk.runtime.lambda" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/lambda/LambdaResponse.java" + visibility: "public" +--- +# `LambdaResponse` + +Response shape returned by `LambdaAgentHandler` and compatible +with AWS API Gateway (REST v1 and HTTP v2) and Lambda Function URL +response envelopes. + +<p>The fields map 1:1 to `APIGatewayProxyResponseEvent`: +`statusCode`, `headers`, `body`, +`isBase64Encoded`. + +Returned as a plain `Map` so the SDK +does not require a runtime dependency on `aws-lambda-java-events`. +Users who want the typed variant can trivially copy the fields over. + +**Modifiers:** `final` + +## Signature + +```java +public final class LambdaResponse +``` + +## Methods + +### \ + +Create a Lambda response with the given fields. + +#### Signature + +```java +public ( + int statusCode, + Map headers, + String body, + boolean isBase64Encoded +) +``` + +#### Parameters + + + HTTP status code. + + + + response headers (must not be null — pass an empty map for no headers). + + + + raw response body as a string. + + + + whether the body is base64-encoded binary. + + +#### Source + +[`src/main/java/com/signalwire/sdk/runtime/lambda/LambdaResponse.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/lambda/LambdaResponse.java) + +Line 33. + +*** + +### getBody + +#### Signature + +```java +public String getBody() +``` + +#### Returns + +`String` — response body. + +#### Source + +[`src/main/java/com/signalwire/sdk/runtime/lambda/LambdaResponse.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/lambda/LambdaResponse.java) + +Line 48. + +*** + +### getHeaders + +#### Signature + +```java +public Map getHeaders() +``` + +#### Returns + +`Map` — response headers. + +#### Source + +[`src/main/java/com/signalwire/sdk/runtime/lambda/LambdaResponse.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/lambda/LambdaResponse.java) + +Line 45. + +*** + +### getStatusCode + +#### Signature + +```java +public int getStatusCode() +``` + +#### Returns + +`int` — HTTP status code. + +#### Source + +[`src/main/java/com/signalwire/sdk/runtime/lambda/LambdaResponse.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/lambda/LambdaResponse.java) + +Line 42. + +*** + +### isBase64Encoded + +#### Signature + +```java +public boolean isBase64Encoded() +``` + +#### Returns + +`boolean` — whether the body is base64-encoded. + +#### Source + +[`src/main/java/com/signalwire/sdk/runtime/lambda/LambdaResponse.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/lambda/LambdaResponse.java) + +Line 51. + +*** + +### json + +Convenience builder for a 200 JSON response. + +**Modifiers:** `static` + +#### Signature + + + + ```java + public static LambdaResponse json(String body) + ``` + + + + ```java + public static LambdaResponse json(int statusCode, String body) + ``` + + + +#### Parameters (Overload 1) + + + raw JSON string. + + +#### Parameters (Overload 2) + + + HTTP status. + + + + raw JSON string. + + +#### Returns (Overload 1) + +`LambdaResponse` — LambdaResponse. + +#### Returns (Overload 2) + +`LambdaResponse` — LambdaResponse. + +#### Source + +[`src/main/java/com/signalwire/sdk/runtime/lambda/LambdaResponse.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/lambda/LambdaResponse.java) + +Line 75. + +*** + +### toMap + +Serialise this response into the AWS Lambda Function URL / +API Gateway payload format (v1 and v2 are structurally identical +for response shape). + +#### Signature + +```java +public Map toMap() +``` + +#### Returns + +`Map` — a Map suitable for returning from a Lambda handler. + +#### Source + +[`src/main/java/com/signalwire/sdk/runtime/lambda/LambdaResponse.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/lambda/LambdaResponse.java) + +Line 60. + +## Source + +[`src/main/java/com/signalwire/sdk/runtime/lambda/LambdaResponse.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/lambda/LambdaResponse.java) + +Line 17. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/runtime/runtime/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/runtime/runtime/index.mdx new file mode 100644 index 0000000000..bff0ec36ac --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/runtime/runtime/index.mdx @@ -0,0 +1,351 @@ +--- +slug: "/reference/java/com/signalwire/sdk/runtime/runtime" +title: "runtime" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "com.signalwire.sdk.runtime" + module: "com.signalwire.sdk.runtime" +--- +# `runtime` + +## Signature + +```java +package com.signalwire.sdk.runtime +``` + +## Classes + + + + Resolve the base URL of a SignalWire agent running as an AWS Lambda function, from standard Lambda environment variables. <p>Precedence — highest first: <ol> <li>`AWS_LAMBDA_FUNCTION_URL` — the Function URL explicitly assigned to this Lambda (the only variant that is guaranteed correct; synthetic fallbacks below assume the Function URL service was used and the function name matches the public subdomain, which is typically true but not guaranteed).</li> <li>Synthesised `https://{AWS_LAMBDA_FUNCTION_NAME`.lambda-url.\{AWS\_REGION\}.on.aws\} — built when the Function URL env var is not present but the standard Lambda identity variables are.</li> </ol> <p>This class returns a bare origin (scheme + host). + + + +## Interfaces + +### EnvProvider + +Simple read-only view of process environment variables. + +<p>Extracted as an interface so tests can inject a deterministic map +instead of relying on actual OS environment variables (which Java +cannot mutate at runtime without native hackery). + +<p>The default implementation delegates to `System#getenv(String)`. + +#### Signature + +```java +public interface EnvProvider +``` + +#### Constants + + + Default provider backed by `System#getenv(String)`. + + +#### Methods + +##### get + +Return the value of the given environment variable, or `null` if +it is not set. + +###### Signature + +```java +String get(String name) +``` + +###### Parameters + + + the environment variable name. + + +###### Returns + +`String` — the value, or `null`. + +###### Source + +[`src/main/java/com/signalwire/sdk/runtime/EnvProvider.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/EnvProvider.java) + +Line 22. + +*** + +##### isSet + +Return true iff the env var is set and non-empty. + +**Modifiers:** `default` + +###### Signature + +```java +default boolean isSet(String name) +``` + +###### Parameters + + + the environment variable name. + + +###### Returns + +`boolean` — true if the value is set and non-empty. + +###### Source + +[`src/main/java/com/signalwire/sdk/runtime/EnvProvider.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/EnvProvider.java) + +Line 33. + +#### Source + +[`src/main/java/com/signalwire/sdk/runtime/EnvProvider.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/EnvProvider.java) + +Line 12. + +## Enums + +### ExecutionMode + +Runtime deployment environments the SDK knows about. + +<p>Detected from well-known environment variables set by the hosting +platform. + +Mirrors `get_execution_mode()` in the Python SDK and +`detectPlatform()` in the TypeScript SDK. + +<p>Use `#detect()` to read the actual process environment, or +`#detect(EnvProvider)` to pass a test double. + +#### Signature + +```java +public enum ExecutionMode +``` + +#### Variants + + + Azure Functions. + + + + Legacy CGI script behind a web server. + + + + Google Cloud Functions (1st or 2nd gen / Cloud Run). + + + + AWS Lambda function (container or zip deployment). + + + + Normal long-running HTTP server process (the default). + + +#### Methods + +##### detect + +Detect the execution mode from the real process environment. + +**Modifiers:** `static` + +###### Signature + + + + ```java + public static ExecutionMode detect() + ``` + + + + ```java + public static ExecutionMode detect(EnvProvider env) + ``` + + + +###### Parameters (Overload 2) + + + environment variable source (injectable for tests). + + +###### Returns (Overload 1) + +`ExecutionMode` — the detected mode, or `#SERVER` as fallback. + +###### Returns (Overload 2) + +`ExecutionMode` — the detected mode. + +###### Source + +[`src/main/java/com/signalwire/sdk/runtime/ExecutionMode.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/ExecutionMode.java) + +Line 35. + +*** + +##### getExecutionMode + +Cross-language SDK contract: return the execution mode as the +canonical lower-case-with-underscores string used by every port. +Mirrors `signalwire.core.logging_config.get_execution_mode` +in Python: one of `"cgi"`, `"lambda"`, +`"google_cloud_function"`, `"azure_function"`, or +`"server"`. + +**Modifiers:** `static` + +###### Signature + + + + ```java + public static String getExecutionMode() + ``` + + + + ```java + public static String getExecutionMode(EnvProvider env) + ``` + + + +###### Parameters (Overload 2) + + + environment variable source (injectable for tests). + + +###### Returns (Overload 1) + +`String` — canonical mode string detected from the process environment + +###### Returns (Overload 2) + +`String` — canonical mode string. + +###### Source + +[`src/main/java/com/signalwire/sdk/runtime/ExecutionMode.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/ExecutionMode.java) + +Line 81. + +*** + +##### isServerlessMode + +Cross-language SDK contract: true when the process is running +inside any serverless / short-lived environment (i.e. + +anything +other than `"server"`). Mirrors +`signalwire.utils.is_serverless_mode` in Python. + +**Modifiers:** `static` + +###### Signature + + + + ```java + public static boolean isServerlessMode() + ``` + + + + ```java + public static boolean isServerlessMode(EnvProvider env) + ``` + + + +###### Parameters (Overload 2) + + + environment variable source (injectable for tests). + + +###### Returns (Overload 1) + +`boolean` — `true` unless the detected mode is `"server"`. + +###### Returns (Overload 2) + +`boolean` — true unless the detected mode is `"server"`. + +###### Source + +[`src/main/java/com/signalwire/sdk/runtime/ExecutionMode.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/ExecutionMode.java) + +Line 112. + +*** + +##### valueOf + +**Modifiers:** `static` + +###### Signature + +```java +public static ExecutionMode valueOf(String name) +``` + +###### Parameters + + + +###### Returns + +`ExecutionMode` + +###### Source + +[`src/main/java/com/signalwire/sdk/runtime/ExecutionMode.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/ExecutionMode.java) + +*** + +##### values + +**Modifiers:** `static` + +###### Signature + +```java +public static ExecutionMode[] values() +``` + +###### Returns + +`ExecutionMode[]` + +###### Source + +[`src/main/java/com/signalwire/sdk/runtime/ExecutionMode.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/ExecutionMode.java) + +#### Source + +[`src/main/java/com/signalwire/sdk/runtime/ExecutionMode.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/ExecutionMode.java) + +Line 13. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/runtime/runtime/lambda-url-resolver/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/runtime/runtime/lambda-url-resolver/index.mdx new file mode 100644 index 0000000000..5208a2a751 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/runtime/runtime/lambda-url-resolver/index.mdx @@ -0,0 +1,117 @@ +--- +slug: "/reference/java/com/signalwire/sdk/runtime/runtime/lambda-url-resolver" +title: "LambdaUrlResolver" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.runtime.LambdaUrlResolver" + parent: "com.signalwire.sdk.runtime" + module: "com.signalwire.sdk.runtime" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/LambdaUrlResolver.java" + visibility: "public" +--- +# `LambdaUrlResolver` + +Resolve the base URL of a SignalWire agent running as an AWS Lambda +function, from standard Lambda environment variables. + +<p>Precedence — highest first: +<ol> + <li>`AWS_LAMBDA_FUNCTION_URL` — the Function URL explicitly + assigned to this Lambda (the only variant that is guaranteed + correct; synthetic fallbacks below assume the Function URL + service was used and the function name matches the public + subdomain, which is typically true but not guaranteed).</li> + <li>Synthesised `https://{AWS_LAMBDA_FUNCTION_NAME`.lambda-url.{AWS_REGION}.on.aws} + — built when the Function URL env var is not present but the + standard Lambda identity variables are.</li> +</ol> + +<p>This class returns a bare origin (scheme + host). + +It intentionally +does NOT append any route — callers (e.g. `AgentBase.buildWebhookUrl`) +are responsible for appending the agent's route + endpoint path. This +keeps the route-preservation invariant intact regardless of which +source produced the base URL. + +<p>Mirrors the Lambda branch of `get_full_url()` in the Python SDK. + +**Modifiers:** `final` + +## Signature + +```java +public final class LambdaUrlResolver +``` + +## Methods + +### \ + +Create a resolver backed by the real process environment. + +#### Signature + + + + ```java + public () + ``` + + + + ```java + public (EnvProvider env) + ``` + + + +#### Parameters (Overload 2) + + + environment variable source. + + +#### Source + +[`src/main/java/com/signalwire/sdk/runtime/LambdaUrlResolver.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/LambdaUrlResolver.java) + +Line 34. + +*** + +### resolveBaseUrl + +Return the base URL for the Lambda, without any trailing slash. + +<p>Returns `null` if none of the expected env vars are set +(which typically means we're not actually running on Lambda). + +The +caller should then fall back to its normal base-URL detection. + +#### Signature + +```java +public String resolveBaseUrl() +``` + +#### Returns + +`String` — bare origin (e.g. `https://xyz.lambda-url.us-east-1.on.aws`), or `null`. + +#### Source + +[`src/main/java/com/signalwire/sdk/runtime/LambdaUrlResolver.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/LambdaUrlResolver.java) + +Line 58. + +## Source + +[`src/main/java/com/signalwire/sdk/runtime/LambdaUrlResolver.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/LambdaUrlResolver.java) + +Line 27. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/sdk/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/sdk/index.mdx new file mode 100644 index 0000000000..145fd9357a --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/sdk/index.mdx @@ -0,0 +1,27 @@ +--- +slug: "/reference/java/com/signalwire/sdk/sdk" +title: "sdk" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "com.signalwire.sdk" + module: "com.signalwire.sdk" +--- +# `sdk` + +## Signature + +```java +package com.signalwire.sdk +``` + +## Classes + + + + Top-level convenience entry points — mirror Python's `signalwire/__init__.py` package-level helpers (`RestClient`, `register_skill`, `add_skill_directory`, `list_skills_with_params`). <p>This is a static-only utility class; it cannot be instantiated. + + diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/sdk/signalwire/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/sdk/signalwire/index.mdx new file mode 100644 index 0000000000..68001809b7 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/sdk/signalwire/index.mdx @@ -0,0 +1,209 @@ +--- +slug: "/reference/java/com/signalwire/sdk/sdk/signalwire" +title: "Signalwire" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.Signalwire" + parent: "com.signalwire.sdk" + module: "com.signalwire.sdk" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/Signalwire.java" + visibility: "public" +--- +# `Signalwire` + +Top-level convenience entry points — mirror Python's +`signalwire/__init__.py` package-level helpers +(`RestClient`, `register_skill`, +`add_skill_directory`, `list_skills_with_params`). + +<p>This is a static-only utility class; it cannot be instantiated. + +The +helpers delegate to the underlying classes (RestClient, SkillRegistry) +so they're a strict thin layer. + +<p>The audit projects each method onto the canonical Python +`signalwire.<name>` free-function path via a per-port +`FREE_FUNCTION_PROJECTIONS` entry in +`scripts/enumerate_signatures.py`. + +**Modifiers:** `final` + +## Signature + +```java +public final class Signalwire +``` + +## Methods + +### addSkillDirectory + +Add a directory to search for skills. + +<p>Mirrors Python's `signalwire.add_skill_directory(path)` — +delegates to the singleton `SkillRegistry` instance so +third-party skill collections can be registered by path. +Subsequent calls accumulate (de-duplicated) into a shared +external paths list. + +**Modifiers:** `static` + +#### Signature + +```java +public static void addSkillDirectory(String path) +``` + +#### Parameters + + + absolute or relative path to a directory containing skill subdirectories + + +#### Throws + +- `IllegalArgumentException` — when the path doesn't exist or isn't a directory + +#### Source + +[`src/main/java/com/signalwire/sdk/Signalwire.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/Signalwire.java) + +Line 177. + +*** + +### listSkillsWithParams + +Get complete schema for all available skills. + +<p>Mirrors Python's `signalwire.list_skills_with_params()`. +Returns a map keyed by skill name where each value contains +parameter metadata. + +Useful for GUI configuration tools, API +documentation, or programmatic skill discovery. + +<p>Java skills don't carry rich Python-style parameter +introspection in v1, so each entry contains the skill name and an +empty parameter map; built-in skills that expose +`parameterSchema()` get richer detail. + +**Modifiers:** `static` + +#### Signature + +```java +public static Map> listSkillsWithParams() +``` + +#### Returns + +`Map>` — map of skill name to schema metadata + +#### Source + +[`src/main/java/com/signalwire/sdk/Signalwire.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/Signalwire.java) + +Line 196. + +*** + +### registerSkill + +Register a custom skill class with the global `SkillRegistry`. + +<p>Mirrors Python's `signalwire.register_skill(skill_class)`. +Java skills are constructed via a no-arg constructor (the +registry stores `Supplier<SkillBase>` factories), so we +adapt the supplied class reference into a factory using +reflection. + +Throws `IllegalArgumentException` when the +class can't be instantiated reflectively or when its skill name +cannot be derived. + +**Modifiers:** `static` + +#### Signature + +```java +public static void registerSkill(Class skillClass) +``` + +#### Parameters + + + a `SkillBase` subclass + + +#### Source + +[`src/main/java/com/signalwire/sdk/Signalwire.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/Signalwire.java) + +Line 129. + +*** + +### RestClient + +Construct a `RestClient` from positional or keyword +credentials. + +<p>Mirrors Python's top-level **kwargs) factory. + +Supports two call shapes: + +<ul> + <li>token, space) — three positional + strings, mapping straight onto the Java builder.</li> + <li>kwargs) — variadic-shaped form + matching Python's signature exactly. `args` is an + array of three strings (project/token/space) or empty; + `kwargs` carries the same fields by name.</li> +</ul> + +<p>The audit projects this method onto Python's +**kwargs) via +`FREE_FUNCTION_PROJECTIONS`. + +**Modifiers:** `static` + +#### Signature + +```java +public static RestClient RestClient( + List args, + Map kwargs +) +``` + +#### Parameters + + + positional credentials — empty or token, space] + + + + keyword credentials — recognised keys are `project` / `project_id`, `token`, and `space` / `host` + + +#### Returns + +`RestClient` — a fully wired `RestClient` instance + +#### Source + +[`src/main/java/com/signalwire/sdk/Signalwire.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/Signalwire.java) + +Line 87. + +## Source + +[`src/main/java/com/signalwire/sdk/Signalwire.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/Signalwire.java) + +Line 34. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/security/security/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/security/security/index.mdx new file mode 100644 index 0000000000..dbbbbbf4b1 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/security/security/index.mdx @@ -0,0 +1,35 @@ +--- +slug: "/reference/java/com/signalwire/sdk/security/security" +title: "security" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "com.signalwire.sdk.security" + module: "com.signalwire.sdk.security" +--- +# `security` + +## Signature + +```java +package com.signalwire.sdk.security +``` + +## Classes + + + + Session manager for HMAC-SHA256 signed tool tokens. Stub for the security module being built by another agent. + + + + Servlet filter that enforces SignalWire webhook signature validation on incoming requests. <p>Wraps the request in a body-caching wrapper before reading the body so that downstream handlers (including framework parsers) can re-read the same raw bytes. + + + + Webhook signature validation for SignalWire-signed HTTP requests. <p>Implements both schemes from `porting-sdk/webhooks.md`: <ul> <li><b>Scheme A</b> (RELAY/SWML/JSON): url + rawBody)).</li> <li><b>Scheme B</b> (Compat/cXML form): url + sortedFormParams)) with optional `bodySHA256` query-param fallback for JSON-on-compat-surface.</li> </ul> <p>All signature comparisons use byte\[]) (constant-time) so the secret cannot be leaked through timing differences. <p>Public API: <ul> <li>String, String, String) — combined entry point.</li> <li>String, String, Object) — legacy `@signalwire/compatibility-api` drop-in alias.</li> </ul> <p>This is a stateless utility — every method is static and the class is not intended to be instantiated. + + diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/security/security/session-manager/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/security/security/session-manager/index.mdx new file mode 100644 index 0000000000..054d8583e4 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/security/security/session-manager/index.mdx @@ -0,0 +1,141 @@ +--- +slug: "/reference/java/com/signalwire/sdk/security/security/session-manager" +title: "SessionManager" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.security.SessionManager" + parent: "com.signalwire.sdk.security" + module: "com.signalwire.sdk.security" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/security/SessionManager.java" + visibility: "public" +--- +# `SessionManager` + +Session manager for HMAC-SHA256 signed tool tokens. +Stub for the security module being built by another agent. + +## Signature + +```java +public class SessionManager +``` + +## Methods + +### \ + +#### Signature + + + + ```java + public () + ``` + + + + ```java + public (int defaultExpiry) + ``` + + + +#### Parameters (Overload 2) + + + +#### Source + +[`src/main/java/com/signalwire/sdk/security/SessionManager.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/security/SessionManager.java) + +Line 19. + +*** + +### createToken + +Create a signed token for a function + callID. + +#### Signature + + + + ```java + public String createToken(String functionName, String callId) + ``` + + + + ```java + public String createToken(String functionName, String callId, int expirySeconds) + ``` + + + +#### Parameters (Overload 1) + + + + + +#### Parameters (Overload 2) + + + + + + + +#### Returns (Overload 1) + +`String` + +#### Returns (Overload 2) + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/security/SessionManager.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/security/SessionManager.java) + +Line 32. + +*** + +### validateToken + +Validate a signed token. + +#### Signature + +```java +public boolean validateToken(String token, String functionName, String callId) +``` + +#### Parameters + + + + + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/security/SessionManager.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/security/SessionManager.java) + +Line 48. + +## Source + +[`src/main/java/com/signalwire/sdk/security/SessionManager.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/security/SessionManager.java) + +Line 14. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/security/security/webhook-filter/cached-body-http-servlet-request/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/security/security/webhook-filter/cached-body-http-servlet-request/index.mdx new file mode 100644 index 0000000000..1893005f03 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/security/security/webhook-filter/cached-body-http-servlet-request/index.mdx @@ -0,0 +1,152 @@ +--- +slug: "/reference/java/com/signalwire/sdk/security/security/webhook-filter/cached-body-http-servlet-request" +title: "CachedBodyHttpServletRequest" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.security.WebhookFilter.CachedBodyHttpServletRequest" + parent: "com.signalwire.sdk.security.WebhookFilter" + module: "com.signalwire.sdk.security" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/security/WebhookFilter.java" + visibility: "public" +--- +# `CachedBodyHttpServletRequest` + +`HttpServletRequestWrapper` that buffers the request body so it +can be read multiple times (once by the filter for signature +validation, once by the downstream handler for parsing). + +**Modifiers:** `static` `final` + +## Signature + +```java +public static final class CachedBodyHttpServletRequest extends HttpServletRequestWrapper +``` + +## Inheritance + +**Extends:** `HttpServletRequestWrapper` + +## Methods + +### \ + +#### Signature + +```java +public (HttpServletRequest request) +``` + +#### Parameters + + + +#### Throws + +- `IOException` + +#### Source + +[`src/main/java/com/signalwire/sdk/security/WebhookFilter.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/security/WebhookFilter.java) + +Line 199. + +*** + +### getCachedBody + +Snapshot of the cached body bytes. + +Defensive copy. + +#### Signature + +```java +public byte[] getCachedBody() +``` + +#### Returns + +`byte[]` + +#### Source + +[`src/main/java/com/signalwire/sdk/security/WebhookFilter.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/security/WebhookFilter.java) + +Line 208. + +*** + +### getCachedBodyAsString + +Cached body decoded as UTF-8 (or the request's declared charset). + +#### Signature + +```java +public String getCachedBodyAsString() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/security/WebhookFilter.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/security/WebhookFilter.java) + +Line 213. + +*** + +### getInputStream + +**Decorators:** `@Override` + +#### Signature + +```java +public ServletInputStream getInputStream() +``` + +#### Returns + +`ServletInputStream` + +#### Source + +[`src/main/java/com/signalwire/sdk/security/WebhookFilter.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/security/WebhookFilter.java) + +Line 221. + +*** + +### getReader + +**Decorators:** `@Override` + +#### Signature + +```java +public BufferedReader getReader() +``` + +#### Returns + +`BufferedReader` + +#### Source + +[`src/main/java/com/signalwire/sdk/security/WebhookFilter.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/security/WebhookFilter.java) + +Line 256. + +## Source + +[`src/main/java/com/signalwire/sdk/security/WebhookFilter.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/security/WebhookFilter.java) + +Line 195. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/security/security/webhook-filter/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/security/security/webhook-filter/index.mdx new file mode 100644 index 0000000000..879ed5a18c --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/security/security/webhook-filter/index.mdx @@ -0,0 +1,196 @@ +--- +slug: "/reference/java/com/signalwire/sdk/security/security/webhook-filter" +title: "WebhookFilter" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.security.WebhookFilter" + parent: "com.signalwire.sdk.security" + module: "com.signalwire.sdk.security" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/security/WebhookFilter.java" + visibility: "public" +--- +# `WebhookFilter` + +Servlet filter that enforces SignalWire webhook signature validation on +incoming requests. + +<p>Wraps the request in a body-caching wrapper before reading the body so +that downstream handlers (including framework parsers) can re-read the same +raw bytes. + +This is the canonical Java framework adapter described in the +"Framework adapter" section of `porting-sdk/webhooks.md`. + +<p>Behavior: + +<ol> + <li>Read the raw request body once and cache it.</li> + <li>Extract `X-SignalWire-Signature` (or `X-Twilio-Signature`) + from the request headers.</li> + <li>Reconstruct the public URL — uses `X-Forwarded-Proto` / + `X-Forwarded-Host` when `trustProxy` is set, otherwise + falls back to `HttpServletRequest#getRequestURL()` + + `HttpServletRequest#getQueryString()`.</li> + <li>Call String, String, String).</li> + <li>On invalid: respond Forbidden and do <b>not</b> call + `chain.doFilter`.</li> + <li>On valid: forward via `chain.doFilter` with the body-caching + request wrapper so downstream handlers can re-read the body.</li> +</ol> + +<p>The filter intentionally does <b>not</b> log the signing key, the +incoming signature, or which scheme branch tripped — disclosing those +weakens the constant-time defense and gives attackers data to differentiate +scheme branches with. + +<p>Note: this class targets the `javax.servlet` API (Servlet 4.x / +Tomcat 9 / Jetty 9). Apps on Servlet 5.x / Jakarta EE 9+ should bridge via +a → jakarta shim or copy this class into their codebase +with the import package swapped. + +## Signature + +```java +public class WebhookFilter implements Filter +``` + +## Inheritance + +**Implements:** `Filter` + +## Classes + + + + `HttpServletRequestWrapper` that buffers the request body so it can be read multiple times (once by the filter for signature validation, once by the downstream handler for parsing). + + + +## Methods + +### \ + +Construct a filter with proxy trust disabled. + +#### Signature + + + + ```java + public (String signingKey) + ``` + + + + ```java + public (String signingKey, boolean trustProxy) + ``` + + + +#### Parameters (Overload 1) + + + customer's Signing Key. Must be non-empty; an empty value is a programming error and the constructor throws `IllegalArgumentException`. + + +#### Parameters (Overload 2) + + + customer's Signing Key. Required. + + + + when `true`, honor `X-Forwarded-Proto` / `X-Forwarded-Host` for URL reconstruction. `false` by default since proxy headers are spoofable; only enable when you control the proxy chain. + + +#### Source + +[`src/main/java/com/signalwire/sdk/security/WebhookFilter.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/security/WebhookFilter.java) + +Line 75. + +*** + +### destroy + +**Decorators:** `@Override` + +#### Signature + +```java +public void destroy() +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/security/WebhookFilter.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/security/WebhookFilter.java) + +Line 102. + +*** + +### doFilter + +**Decorators:** `@Override` + +#### Signature + +```java +public void doFilter( + ServletRequest request, + ServletResponse response, + FilterChain chain +) +``` + +#### Parameters + + + + + + + +#### Throws + +- `IOException` +- `ServletException` + +#### Source + +[`src/main/java/com/signalwire/sdk/security/WebhookFilter.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/security/WebhookFilter.java) + +Line 107. + +*** + +### init + +**Decorators:** `@Override` + +#### Signature + +```java +public void init(FilterConfig filterConfig) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/security/WebhookFilter.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/security/WebhookFilter.java) + +Line 97. + +## Source + +[`src/main/java/com/signalwire/sdk/security/WebhookFilter.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/security/WebhookFilter.java) + +Line 63. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/security/security/webhook-validator/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/security/security/webhook-validator/index.mdx new file mode 100644 index 0000000000..14a56a71c9 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/security/security/webhook-validator/index.mdx @@ -0,0 +1,181 @@ +--- +slug: "/reference/java/com/signalwire/sdk/security/security/webhook-validator" +title: "WebhookValidator" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.security.WebhookValidator" + parent: "com.signalwire.sdk.security" + module: "com.signalwire.sdk.security" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/security/WebhookValidator.java" + visibility: "public" +--- +# `WebhookValidator` + +Webhook signature validation for SignalWire-signed HTTP requests. + +<p>Implements both schemes from `porting-sdk/webhooks.md`: + +<ul> + <li><b>Scheme A</b> (RELAY/SWML/JSON): url + rawBody)).</li> + <li><b>Scheme B</b> (Compat/cXML form): url + sortedFormParams)) + with optional `bodySHA256` query-param fallback for JSON-on-compat-surface.</li> +</ul> + +<p>All signature comparisons use byte[]) +(constant-time) so the secret cannot be leaked through timing differences. + +<p>Public API: +<ul> + <li>String, String, String) — combined entry point.</li> + <li>String, String, Object) — legacy + `@signalwire/compatibility-api` drop-in alias.</li> +</ul> + +<p>This is a stateless utility — every method is static and the class is +not intended to be instantiated. + +**Modifiers:** `final` + +## Signature + +```java +public final class WebhookValidator +``` + +## Constants + + + Header name that carries the signature on every signed SignalWire request. + + + + Legacy alias accepted by the cXML/Compatibility surface. + + +## Methods + +### validateRequest + +Legacy `@signalwire/compatibility-api` drop-in entry point. + +<p>Dispatches on the runtime type of `paramsOrRawBody`: +<ul> + <li>`String` → delegates to + String, String, String).</li> + <li>`Map` or any `Iterable` of `Map.Entry` (or + 2-element arrays / lists) → treats the value as pre-parsed form + params and runs Scheme B directly with URL port normalization.</li> + <li>`null` → treated as an empty params map (Scheme B).</li> + <li>Anything else → `IllegalArgumentException`.</li> +</ul> + +**Modifiers:** `static` + +#### Signature + +```java +public static boolean validateRequest( + String signingKey, + String signature, + String url, + Object paramsOrRawBody +) +``` + +#### Parameters + + + customer's Signing Key. Non-empty. + + + + header value. `null` / empty returns `false`. + + + + full URL SignalWire POSTed to. + + + + `String` raw body OR pre-parsed form params. + + +#### Returns + +`boolean` — `true` on match, `false` otherwise. + +#### Throws + +- `IllegalArgumentException` — when `signingKey` is empty or `paramsOrRawBody` is of an unsupported type. + +#### Source + +[`src/main/java/com/signalwire/sdk/security/WebhookValidator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/security/WebhookValidator.java) + +Line 171. + +*** + +### validateWebhookSignature + +Validate a SignalWire webhook signature against both schemes. + +<p>Tries Scheme A (hex HMAC-SHA1 over + rawBody) first; on +miss, tries Scheme B (base64 HMAC-SHA1 over + sortedFormParams) +with both port-normalization variants of the URL and an optional +`bodySHA256` fallback for JSON-on-compat-surface. + +**Modifiers:** `static` + +#### Signature + +```java +public static boolean validateWebhookSignature( + String signingKey, + String signature, + String url, + String rawBody +) +``` + +#### Parameters + + + customer's Signing Key from the Dashboard. Must be non-null and non-empty; otherwise an `IllegalArgumentException` is thrown — that's a programming error, not a validation failure. + + + + the `X-SignalWire-Signature` header value (or the `X-Twilio-Signature` alias). `null` or empty returns `false` without throwing. + + + + the full URL SignalWire POSTed to (scheme, host, optional port, path, query). Must match what the platform saw — see the URL reconstruction section of `porting-sdk/webhooks.md`. + + + + the raw UTF-8 request body bytes as a string, <b>before</b> any JSON / form parsing. May be empty but must not be `null` — pass `""` when the body was empty. + + +#### Returns + +`boolean` — `true` when the signature matches either scheme, otherwise `false`. + +#### Throws + +- `IllegalArgumentException` — when `signingKey` is `null` or empty, or when `rawBody` is `null`. + +#### Source + +[`src/main/java/com/signalwire/sdk/security/WebhookValidator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/security/WebhookValidator.java) + +Line 94. + +## Source + +[`src/main/java/com/signalwire/sdk/security/WebhookValidator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/security/WebhookValidator.java) + +Line 50. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/server/server/agent-server/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/server/server/agent-server/index.mdx new file mode 100644 index 0000000000..b212c8c1ca --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/server/server/agent-server/index.mdx @@ -0,0 +1,459 @@ +--- +slug: "/reference/java/com/signalwire/sdk/server/server/agent-server" +title: "AgentServer" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.server.AgentServer" + parent: "com.signalwire.sdk.server" + module: "com.signalwire.sdk.server" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java" + visibility: "public" +--- +# `AgentServer` + +Multi-agent hosting server. +Registers multiple agents on different routes and dispatches requests accordingly. + +## Signature + +```java +public class AgentServer implements AutoCloseable +``` + +## Inheritance + +**Implements:** `AutoCloseable` + +## Methods + +### \ + +#### Signature + + + + ```java + public () + ``` + + + + ```java + public (int port) + ``` + + + + ```java + public (String host, int port) + ``` + + + +#### Parameters (Overload 2) + + + +#### Parameters (Overload 3) + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) + +Line 61. + +*** + +### close + +`AutoCloseable` entry point so the multi-agent server can be +run inside a try-with-resources block: + +<pre>{@code +try (var server = new AgentServer(host, port)) { + server.register(agent); + server.run(); + // ... + +`AutoCloseable` entry point so the multi-agent server can be +run inside a try-with-resources block: + +<pre>(var server = new AgentServer(host, port)) { + server.register(agent); + server.run(); + // ... serve ... // close() runs here: the HTTP listener is shut down +}</pre> + +Delegates to `#stop()`, releasing the bound HTTP(S) listener and +its socket. Idempotent: harmless if the server was never started or is +already stopped. + +**Decorators:** `@Override` + +#### Signature + +```java +public void close() +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) + +Line 730. + +*** + +### enableTls + +Serve over HTTPS using an explicit PEM certificate chain and PKCS#8 +private key. + +This is the explicit-cert option that parallels Python's +ssl\_key=...); it takes +precedence over the `SWML_SSL_*` environment variables. + +<p>`certPath` must be a PEM file containing the leaf (and any +intermediate) certificates; `keyPath` must be the matching +unencrypted PKCS#8 private key in PEM form. When both resolve at +`#run()` time the server binds a +`com.sun.net.httpserver.HttpsServer`. + +#### Signature + +```java +public AgentServer enableTls(String certPath, String keyPath) +``` + +#### Parameters + + + filesystem path to the PEM certificate file + + + + filesystem path to the PEM PKCS#8 private-key file + + +#### Returns + +`AgentServer` + +#### Source + +[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) + +Line 180. + +*** + +### getAgent + +Get agent for a route. + +#### Signature + +```java +public AgentBase getAgent(String route) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) + +Line 129. + +*** + +### getRoutes + +List all registered routes. + +#### Signature + +```java +public Set getRoutes() +``` + +#### Returns + +`Set` + +#### Source + +[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) + +Line 136. + +*** + +### getSipRoute + +Get route for a SIP username. + +#### Signature + +```java +public String getSipRoute(String username) +``` + +#### Parameters + + + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) + +Line 304. + +*** + +### isTlsEnabled + +Reports whether the server will serve HTTPS, resolving the explicit +cert/key option and then the `SWML_SSL_*` environment variables +the same way `#run()` does. + +A configured cert/key must both point +at existing files for TLS to be considered enabled. + +#### Signature + +```java +public boolean isTlsEnabled() +``` + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) + +Line 192. + +*** + +### register + +Register an agent at a specific route. + +#### Signature + + + + ```java + public AgentServer register(AgentBase agent, String route) + ``` + + + + ```java + public AgentServer register(AgentBase agent) + ``` + + + +#### Parameters (Overload 1) + + + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`AgentServer` + +#### Returns (Overload 2) + +`AgentServer` + +#### Source + +[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) + +Line 90. + +*** + +### registerSipRoute + +Register a SIP username to route to a specific agent. + +#### Signature + +```java +public AgentServer registerSipRoute(String username, String route) +``` + +#### Parameters + + + + + +#### Returns + +`AgentServer` + +#### Source + +[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) + +Line 296. + +*** + +### run + +Start the multi-agent server. + +#### Signature + +```java +public void run() +``` + +#### Throws + +- `IOException` + +#### Source + +[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) + +Line 315. + +*** + +### serveStaticFiles + +Serve static files from a directory at a specific route. + +#### Signature + +```java +public AgentServer serveStaticFiles(String directory, String route) +``` + +#### Parameters + + + Filesystem path to the directory containing static files + + + + URL route prefix (e.g., "/static" or "/assets") + + +#### Returns + +`AgentServer` + +#### Source + +[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) + +Line 155. + +*** + +### setStaticFilesDir + +Set directory for serving static files at /static route. + +#### Signature + +```java +public AgentServer setStaticFilesDir(String dir) +``` + +#### Parameters + + + +#### Returns + +`AgentServer` + +#### Source + +[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) + +Line 143. + +*** + +### stop + +Stop the server. + +#### Signature + +```java +public void stop() +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) + +Line 707. + +*** + +### unregister + +Unregister an agent from a route. + +#### Signature + +```java +public AgentServer unregister(String route) +``` + +#### Parameters + + + +#### Returns + +`AgentServer` + +#### Source + +[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) + +Line 115. + +## Source + +[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) + +Line 39. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/server/server/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/server/server/index.mdx new file mode 100644 index 0000000000..10331be7a2 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/server/server/index.mdx @@ -0,0 +1,27 @@ +--- +slug: "/reference/java/com/signalwire/sdk/server/server" +title: "server" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "com.signalwire.sdk.server" + module: "com.signalwire.sdk.server" +--- +# `server` + +## Signature + +```java +package com.signalwire.sdk.server +``` + +## Classes + + + + Multi-agent hosting server. Registers multiple agents on different routes and dispatches requests accordingly. + + diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/api-ninja-trivia-skill/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/api-ninja-trivia-skill/index.mdx new file mode 100644 index 0000000000..4690cb51a6 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/api-ninja-trivia-skill/index.mdx @@ -0,0 +1,182 @@ +--- +slug: "/reference/java/com/signalwire/sdk/skills/builtin/builtin/api-ninja-trivia-skill" +title: "ApiNinjaTriviaSkill" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.skills.builtin.ApiNinjaTriviaSkill" + parent: "com.signalwire.sdk.skills.builtin" + module: "com.signalwire.sdk.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/ApiNinjaTriviaSkill.java" + visibility: "public" +--- +# `ApiNinjaTriviaSkill` + +## Signature + +```java +public class ApiNinjaTriviaSkill implements SkillBase +``` + +## Inheritance + +**Implements:** [SkillBase](/docs/sdk-reference/reference/java/com/signalwire/sdk/skills/skills#skill-base) + +## Methods + +### \ + +#### Signature + +```java +public () +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/ApiNinjaTriviaSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/ApiNinjaTriviaSkill.java) + +*** + +### getDescription + +**Decorators:** `@Override` + +#### Signature + +```java +public String getDescription() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/ApiNinjaTriviaSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/ApiNinjaTriviaSkill.java) + +Line 23. + +*** + +### getName + +**Decorators:** `@Override` + +#### Signature + +```java +public String getName() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/ApiNinjaTriviaSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/ApiNinjaTriviaSkill.java) + +Line 22. + +*** + +### getSwaigFunctions + +**Decorators:** `@Override` + +#### Signature + +```java +public List> getSwaigFunctions() +``` + +#### Returns + +`List>` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/ApiNinjaTriviaSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/ApiNinjaTriviaSkill.java) + +Line 42. + +*** + +### registerTools + +**Decorators:** `@Override` + +#### Signature + +```java +public List registerTools() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/ApiNinjaTriviaSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/ApiNinjaTriviaSkill.java) + +Line 37. + +*** + +### setup + +**Decorators:** `@Override` `@SuppressWarnings` + +#### Signature + +```java +public boolean setup(Map params) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/ApiNinjaTriviaSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/ApiNinjaTriviaSkill.java) + +Line 26. + +*** + +### supportsMultipleInstances + +**Decorators:** `@Override` + +#### Signature + +```java +public boolean supportsMultipleInstances() +``` + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/ApiNinjaTriviaSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/ApiNinjaTriviaSkill.java) + +Line 24. + +## Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/ApiNinjaTriviaSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/ApiNinjaTriviaSkill.java) + +Line 10. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/claude-skills-skill/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/claude-skills-skill/index.mdx new file mode 100644 index 0000000000..a24a3c09a7 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/claude-skills-skill/index.mdx @@ -0,0 +1,207 @@ +--- +slug: "/reference/java/com/signalwire/sdk/skills/builtin/builtin/claude-skills-skill" +title: "ClaudeSkillsSkill" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.skills.builtin.ClaudeSkillsSkill" + parent: "com.signalwire.sdk.skills.builtin" + module: "com.signalwire.sdk.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/ClaudeSkillsSkill.java" + visibility: "public" +--- +# `ClaudeSkillsSkill` + +Load SKILL.md files as agent tools. +Reads .md files from a directory, extracts YAML frontmatter, and creates tools. + +## Signature + +```java +public class ClaudeSkillsSkill implements SkillBase +``` + +## Inheritance + +**Implements:** [SkillBase](/docs/sdk-reference/reference/java/com/signalwire/sdk/skills/skills#skill-base) + +## Methods + +### \ + +#### Signature + +```java +public () +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/ClaudeSkillsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/ClaudeSkillsSkill.java) + +*** + +### getDescription + +**Decorators:** `@Override` + +#### Signature + +```java +public String getDescription() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/ClaudeSkillsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/ClaudeSkillsSkill.java) + +Line 29. + +*** + +### getHints + +**Decorators:** `@Override` + +#### Signature + +```java +public List getHints() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/ClaudeSkillsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/ClaudeSkillsSkill.java) + +Line 109. + +*** + +### getName + +**Decorators:** `@Override` + +#### Signature + +```java +public String getName() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/ClaudeSkillsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/ClaudeSkillsSkill.java) + +Line 28. + +*** + +### getPromptSections + +**Decorators:** `@Override` + +#### Signature + +```java +public List> getPromptSections() +``` + +#### Returns + +`List>` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/ClaudeSkillsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/ClaudeSkillsSkill.java) + +Line 114. + +*** + +### registerTools + +**Decorators:** `@Override` + +#### Signature + +```java +public List registerTools() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/ClaudeSkillsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/ClaudeSkillsSkill.java) + +Line 104. + +*** + +### setup + +**Decorators:** `@Override` `@SuppressWarnings` + +#### Signature + +```java +public boolean setup(Map params) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/ClaudeSkillsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/ClaudeSkillsSkill.java) + +Line 32. + +*** + +### supportsMultipleInstances + +**Decorators:** `@Override` + +#### Signature + +```java +public boolean supportsMultipleInstances() +``` + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/ClaudeSkillsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/ClaudeSkillsSkill.java) + +Line 30. + +## Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/ClaudeSkillsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/ClaudeSkillsSkill.java) + +Line 18. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/custom-skills-skill/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/custom-skills-skill/index.mdx new file mode 100644 index 0000000000..b2727d00f4 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/custom-skills-skill/index.mdx @@ -0,0 +1,162 @@ +--- +slug: "/reference/java/com/signalwire/sdk/skills/builtin/builtin/custom-skills-skill" +title: "CustomSkillsSkill" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.skills.builtin.CustomSkillsSkill" + parent: "com.signalwire.sdk.skills.builtin" + module: "com.signalwire.sdk.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/CustomSkillsSkill.java" + visibility: "public" +--- +# `CustomSkillsSkill` + +Register user-defined custom tools from configuration. + +## Signature + +```java +public class CustomSkillsSkill implements SkillBase +``` + +## Inheritance + +**Implements:** [SkillBase](/docs/sdk-reference/reference/java/com/signalwire/sdk/skills/skills#skill-base) + +## Methods + +### \ + +#### Signature + +```java +public () +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/CustomSkillsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/CustomSkillsSkill.java) + +*** + +### getDescription + +**Decorators:** `@Override` + +#### Signature + +```java +public String getDescription() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/CustomSkillsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/CustomSkillsSkill.java) + +Line 17. + +*** + +### getName + +**Decorators:** `@Override` + +#### Signature + +```java +public String getName() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/CustomSkillsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/CustomSkillsSkill.java) + +Line 16. + +*** + +### registerTools + +**Decorators:** `@Override` + +#### Signature + +```java +public List registerTools() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/CustomSkillsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/CustomSkillsSkill.java) + +Line 44. + +*** + +### setup + +**Decorators:** `@Override` `@SuppressWarnings` + +#### Signature + +```java +public boolean setup(Map params) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/CustomSkillsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/CustomSkillsSkill.java) + +Line 20. + +*** + +### supportsMultipleInstances + +**Decorators:** `@Override` + +#### Signature + +```java +public boolean supportsMultipleInstances() +``` + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/CustomSkillsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/CustomSkillsSkill.java) + +Line 18. + +## Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/CustomSkillsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/CustomSkillsSkill.java) + +Line 12. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/datasphere-serverless-skill/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/datasphere-serverless-skill/index.mdx new file mode 100644 index 0000000000..bea5da143d --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/datasphere-serverless-skill/index.mdx @@ -0,0 +1,226 @@ +--- +slug: "/reference/java/com/signalwire/sdk/skills/builtin/builtin/datasphere-serverless-skill" +title: "DatasphereServerlessSkill" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.skills.builtin.DatasphereServerlessSkill" + parent: "com.signalwire.sdk.skills.builtin" + module: "com.signalwire.sdk.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatasphereServerlessSkill.java" + visibility: "public" +--- +# `DatasphereServerlessSkill` + +## Signature + +```java +public class DatasphereServerlessSkill implements SkillBase +``` + +## Inheritance + +**Implements:** [SkillBase](/docs/sdk-reference/reference/java/com/signalwire/sdk/skills/skills#skill-base) + +## Methods + +### \ + +#### Signature + +```java +public () +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/DatasphereServerlessSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatasphereServerlessSkill.java) + +*** + +### getDescription + +**Decorators:** `@Override` + +#### Signature + +```java +public String getDescription() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/DatasphereServerlessSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatasphereServerlessSkill.java) + +Line 22. + +*** + +### getGlobalData + +**Decorators:** `@Override` + +#### Signature + +```java +public Map getGlobalData() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/DatasphereServerlessSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatasphereServerlessSkill.java) + +Line 78. + +*** + +### getName + +**Decorators:** `@Override` + +#### Signature + +```java +public String getName() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/DatasphereServerlessSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatasphereServerlessSkill.java) + +Line 21. + +*** + +### getPromptSections + +**Decorators:** `@Override` + +#### Signature + +```java +public List> getPromptSections() +``` + +#### Returns + +`List>` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/DatasphereServerlessSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatasphereServerlessSkill.java) + +Line 66. + +*** + +### getSwaigFunctions + +**Decorators:** `@Override` + +#### Signature + +```java +public List> getSwaigFunctions() +``` + +#### Returns + +`List>` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/DatasphereServerlessSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatasphereServerlessSkill.java) + +Line 42. + +*** + +### registerTools + +**Decorators:** `@Override` + +#### Signature + +```java +public List registerTools() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/DatasphereServerlessSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatasphereServerlessSkill.java) + +Line 37. + +*** + +### setup + +**Decorators:** `@Override` + +#### Signature + +```java +public boolean setup(Map params) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/DatasphereServerlessSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatasphereServerlessSkill.java) + +Line 25. + +*** + +### supportsMultipleInstances + +**Decorators:** `@Override` + +#### Signature + +```java +public boolean supportsMultipleInstances() +``` + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/DatasphereServerlessSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatasphereServerlessSkill.java) + +Line 23. + +## Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/DatasphereServerlessSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatasphereServerlessSkill.java) + +Line 11. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/datasphere-skill/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/datasphere-skill/index.mdx new file mode 100644 index 0000000000..4717c123e5 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/datasphere-skill/index.mdx @@ -0,0 +1,204 @@ +--- +slug: "/reference/java/com/signalwire/sdk/skills/builtin/builtin/datasphere-skill" +title: "DatasphereSkill" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.skills.builtin.DatasphereSkill" + parent: "com.signalwire.sdk.skills.builtin" + module: "com.signalwire.sdk.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatasphereSkill.java" + visibility: "public" +--- +# `DatasphereSkill` + +## Signature + +```java +public class DatasphereSkill implements SkillBase +``` + +## Inheritance + +**Implements:** [SkillBase](/docs/sdk-reference/reference/java/com/signalwire/sdk/skills/skills#skill-base) + +## Methods + +### \ + +#### Signature + +```java +public () +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/DatasphereSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatasphereSkill.java) + +*** + +### getDescription + +**Decorators:** `@Override` + +#### Signature + +```java +public String getDescription() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/DatasphereSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatasphereSkill.java) + +Line 31. + +*** + +### getGlobalData + +**Decorators:** `@Override` + +#### Signature + +```java +public Map getGlobalData() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/DatasphereSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatasphereSkill.java) + +Line 144. + +*** + +### getName + +**Decorators:** `@Override` + +#### Signature + +```java +public String getName() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/DatasphereSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatasphereSkill.java) + +Line 30. + +*** + +### getPromptSections + +**Decorators:** `@Override` + +#### Signature + +```java +public List> getPromptSections() +``` + +#### Returns + +`List>` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/DatasphereSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatasphereSkill.java) + +Line 131. + +*** + +### registerTools + +**Decorators:** `@Override` `@SuppressWarnings` + +#### Signature + +```java +public List registerTools() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/DatasphereSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatasphereSkill.java) + +Line 48. + +*** + +### setup + +**Decorators:** `@Override` + +#### Signature + +```java +public boolean setup(Map params) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/DatasphereSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatasphereSkill.java) + +Line 34. + +*** + +### supportsMultipleInstances + +**Decorators:** `@Override` + +#### Signature + +```java +public boolean supportsMultipleInstances() +``` + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/DatasphereSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatasphereSkill.java) + +Line 32. + +## Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/DatasphereSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatasphereSkill.java) + +Line 17. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/datetime-skill/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/datetime-skill/index.mdx new file mode 100644 index 0000000000..e7914fb395 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/datetime-skill/index.mdx @@ -0,0 +1,182 @@ +--- +slug: "/reference/java/com/signalwire/sdk/skills/builtin/builtin/datetime-skill" +title: "DatetimeSkill" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.skills.builtin.DatetimeSkill" + parent: "com.signalwire.sdk.skills.builtin" + module: "com.signalwire.sdk.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatetimeSkill.java" + visibility: "public" +--- +# `DatetimeSkill` + +## Signature + +```java +public class DatetimeSkill implements SkillBase +``` + +## Inheritance + +**Implements:** [SkillBase](/docs/sdk-reference/reference/java/com/signalwire/sdk/skills/skills#skill-base) + +## Methods + +### \ + +#### Signature + +```java +public () +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/DatetimeSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatetimeSkill.java) + +*** + +### getDescription + +**Decorators:** `@Override` + +#### Signature + +```java +public String getDescription() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/DatetimeSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatetimeSkill.java) + +Line 15. + +*** + +### getName + +**Decorators:** `@Override` + +#### Signature + +```java +public String getName() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/DatetimeSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatetimeSkill.java) + +Line 14. + +*** + +### getPromptSections + +**Decorators:** `@Override` + +#### Signature + +```java +public List> getPromptSections() +``` + +#### Returns + +`List>` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/DatetimeSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatetimeSkill.java) + +Line 66. + +*** + +### registerTools + +**Decorators:** `@Override` + +#### Signature + +```java +public List registerTools() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/DatetimeSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatetimeSkill.java) + +Line 23. + +*** + +### setup + +**Decorators:** `@Override` + +#### Signature + +```java +public boolean setup(Map params) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/DatetimeSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatetimeSkill.java) + +Line 18. + +*** + +### supportsMultipleInstances + +**Decorators:** `@Override` + +#### Signature + +```java +public boolean supportsMultipleInstances() +``` + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/DatetimeSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatetimeSkill.java) + +Line 16. + +## Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/DatetimeSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatetimeSkill.java) + +Line 12. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/google-maps-skill/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/google-maps-skill/index.mdx new file mode 100644 index 0000000000..87e8967239 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/google-maps-skill/index.mdx @@ -0,0 +1,182 @@ +--- +slug: "/reference/java/com/signalwire/sdk/skills/builtin/builtin/google-maps-skill" +title: "GoogleMapsSkill" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.skills.builtin.GoogleMapsSkill" + parent: "com.signalwire.sdk.skills.builtin" + module: "com.signalwire.sdk.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/GoogleMapsSkill.java" + visibility: "public" +--- +# `GoogleMapsSkill` + +## Signature + +```java +public class GoogleMapsSkill implements SkillBase +``` + +## Inheritance + +**Implements:** [SkillBase](/docs/sdk-reference/reference/java/com/signalwire/sdk/skills/skills#skill-base) + +## Methods + +### \ + +#### Signature + +```java +public () +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/GoogleMapsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/GoogleMapsSkill.java) + +*** + +### getDescription + +**Decorators:** `@Override` + +#### Signature + +```java +public String getDescription() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/GoogleMapsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/GoogleMapsSkill.java) + +Line 27. + +*** + +### getHints + +**Decorators:** `@Override` + +#### Signature + +```java +public List getHints() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/GoogleMapsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/GoogleMapsSkill.java) + +Line 123. + +*** + +### getName + +**Decorators:** `@Override` + +#### Signature + +```java +public String getName() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/GoogleMapsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/GoogleMapsSkill.java) + +Line 26. + +*** + +### getPromptSections + +**Decorators:** `@Override` + +#### Signature + +```java +public List> getPromptSections() +``` + +#### Returns + +`List>` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/GoogleMapsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/GoogleMapsSkill.java) + +Line 128. + +*** + +### registerTools + +**Decorators:** `@Override` `@SuppressWarnings` + +#### Signature + +```java +public List registerTools() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/GoogleMapsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/GoogleMapsSkill.java) + +Line 37. + +*** + +### setup + +**Decorators:** `@Override` + +#### Signature + +```java +public boolean setup(Map params) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/GoogleMapsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/GoogleMapsSkill.java) + +Line 29. + +## Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/GoogleMapsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/GoogleMapsSkill.java) + +Line 18. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/index.mdx new file mode 100644 index 0000000000..a111a0526f --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/index.mdx @@ -0,0 +1,67 @@ +--- +slug: "/reference/java/com/signalwire/sdk/skills/builtin/builtin" +title: "builtin" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "com.signalwire.sdk.skills.builtin" + module: "com.signalwire.sdk.skills.builtin" +--- +# `builtin` + +## Signature + +```java +package com.signalwire.sdk.skills.builtin +``` + +## Classes + + + + + + Load SKILL.md files as agent tools. Reads .md files from a directory, extracts YAML frontmatter, and creates tools. + + + + Register user-defined custom tools from configuration. + + + + + + + + + + + + + + + + + + Bridge MCP (Model Context Protocol) servers with SWAIG functions. + + + + Native vector search skill - supports remote mode only (network API). Local .swsearch file support is skipped per porting guide. + + + + + + + + + + + + + + diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/info-gatherer-skill/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/info-gatherer-skill/index.mdx new file mode 100644 index 0000000000..a6b8000aa3 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/info-gatherer-skill/index.mdx @@ -0,0 +1,204 @@ +--- +slug: "/reference/java/com/signalwire/sdk/skills/builtin/builtin/info-gatherer-skill" +title: "InfoGathererSkill" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.skills.builtin.InfoGathererSkill" + parent: "com.signalwire.sdk.skills.builtin" + module: "com.signalwire.sdk.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/InfoGathererSkill.java" + visibility: "public" +--- +# `InfoGathererSkill` + +## Signature + +```java +public class InfoGathererSkill implements SkillBase +``` + +## Inheritance + +**Implements:** [SkillBase](/docs/sdk-reference/reference/java/com/signalwire/sdk/skills/skills#skill-base) + +## Methods + +### \ + +#### Signature + +```java +public () +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/InfoGathererSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/InfoGathererSkill.java) + +*** + +### getDescription + +**Decorators:** `@Override` + +#### Signature + +```java +public String getDescription() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/InfoGathererSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/InfoGathererSkill.java) + +Line 17. + +*** + +### getGlobalData + +**Decorators:** `@Override` + +#### Signature + +```java +public Map getGlobalData() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/InfoGathererSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/InfoGathererSkill.java) + +Line 130. + +*** + +### getName + +**Decorators:** `@Override` + +#### Signature + +```java +public String getName() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/InfoGathererSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/InfoGathererSkill.java) + +Line 16. + +*** + +### getPromptSections + +**Decorators:** `@Override` + +#### Signature + +```java +public List> getPromptSections() +``` + +#### Returns + +`List>` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/InfoGathererSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/InfoGathererSkill.java) + +Line 116. + +*** + +### registerTools + +**Decorators:** `@Override` + +#### Signature + +```java +public List registerTools() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/InfoGathererSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/InfoGathererSkill.java) + +Line 34. + +*** + +### setup + +**Decorators:** `@Override` `@SuppressWarnings` + +#### Signature + +```java +public boolean setup(Map params) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/InfoGathererSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/InfoGathererSkill.java) + +Line 20. + +*** + +### supportsMultipleInstances + +**Decorators:** `@Override` + +#### Signature + +```java +public boolean supportsMultipleInstances() +``` + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/InfoGathererSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/InfoGathererSkill.java) + +Line 18. + +## Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/InfoGathererSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/InfoGathererSkill.java) + +Line 9. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/joke-skill/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/joke-skill/index.mdx new file mode 100644 index 0000000000..6a17d68eec --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/joke-skill/index.mdx @@ -0,0 +1,204 @@ +--- +slug: "/reference/java/com/signalwire/sdk/skills/builtin/builtin/joke-skill" +title: "JokeSkill" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.skills.builtin.JokeSkill" + parent: "com.signalwire.sdk.skills.builtin" + module: "com.signalwire.sdk.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/JokeSkill.java" + visibility: "public" +--- +# `JokeSkill` + +## Signature + +```java +public class JokeSkill implements SkillBase +``` + +## Inheritance + +**Implements:** [SkillBase](/docs/sdk-reference/reference/java/com/signalwire/sdk/skills/skills#skill-base) + +## Methods + +### \ + +#### Signature + +```java +public () +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/JokeSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/JokeSkill.java) + +*** + +### getDescription + +**Decorators:** `@Override` + +#### Signature + +```java +public String getDescription() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/JokeSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/JokeSkill.java) + +Line 16. + +*** + +### getGlobalData + +**Decorators:** `@Override` + +#### Signature + +```java +public Map getGlobalData() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/JokeSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/JokeSkill.java) + +Line 59. + +*** + +### getName + +**Decorators:** `@Override` + +#### Signature + +```java +public String getName() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/JokeSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/JokeSkill.java) + +Line 15. + +*** + +### getPromptSections + +**Decorators:** `@Override` + +#### Signature + +```java +public List> getPromptSections() +``` + +#### Returns + +`List>` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/JokeSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/JokeSkill.java) + +Line 47. + +*** + +### getSwaigFunctions + +**Decorators:** `@Override` + +#### Signature + +```java +public List> getSwaigFunctions() +``` + +#### Returns + +`List>` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/JokeSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/JokeSkill.java) + +Line 33. + +*** + +### registerTools + +**Decorators:** `@Override` + +#### Signature + +```java +public List registerTools() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/JokeSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/JokeSkill.java) + +Line 27. + +*** + +### setup + +**Decorators:** `@Override` + +#### Signature + +```java +public boolean setup(Map params) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/JokeSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/JokeSkill.java) + +Line 18. + +## Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/JokeSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/JokeSkill.java) + +Line 10. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/math-skill/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/math-skill/index.mdx new file mode 100644 index 0000000000..3d51b53987 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/math-skill/index.mdx @@ -0,0 +1,182 @@ +--- +slug: "/reference/java/com/signalwire/sdk/skills/builtin/builtin/math-skill" +title: "MathSkill" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.skills.builtin.MathSkill" + parent: "com.signalwire.sdk.skills.builtin" + module: "com.signalwire.sdk.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/MathSkill.java" + visibility: "public" +--- +# `MathSkill` + +## Signature + +```java +public class MathSkill implements SkillBase +``` + +## Inheritance + +**Implements:** [SkillBase](/docs/sdk-reference/reference/java/com/signalwire/sdk/skills/skills#skill-base) + +## Methods + +### \ + +#### Signature + +```java +public () +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/MathSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/MathSkill.java) + +*** + +### getDescription + +**Decorators:** `@Override` + +#### Signature + +```java +public String getDescription() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/MathSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/MathSkill.java) + +Line 12. + +*** + +### getName + +**Decorators:** `@Override` + +#### Signature + +```java +public String getName() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/MathSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/MathSkill.java) + +Line 11. + +*** + +### getPromptSections + +**Decorators:** `@Override` + +#### Signature + +```java +public List> getPromptSections() +``` + +#### Returns + +`List>` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/MathSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/MathSkill.java) + +Line 138. + +*** + +### registerTools + +**Decorators:** `@Override` + +#### Signature + +```java +public List registerTools() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/MathSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/MathSkill.java) + +Line 20. + +*** + +### setup + +**Decorators:** `@Override` + +#### Signature + +```java +public boolean setup(Map params) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/MathSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/MathSkill.java) + +Line 15. + +*** + +### supportsMultipleInstances + +**Decorators:** `@Override` + +#### Signature + +```java +public boolean supportsMultipleInstances() +``` + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/MathSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/MathSkill.java) + +Line 13. + +## Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/MathSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/MathSkill.java) + +Line 9. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/mcp-gateway-skill/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/mcp-gateway-skill/index.mdx new file mode 100644 index 0000000000..84632016dc --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/mcp-gateway-skill/index.mdx @@ -0,0 +1,206 @@ +--- +slug: "/reference/java/com/signalwire/sdk/skills/builtin/builtin/mcp-gateway-skill" +title: "McpGatewaySkill" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.skills.builtin.McpGatewaySkill" + parent: "com.signalwire.sdk.skills.builtin" + module: "com.signalwire.sdk.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/McpGatewaySkill.java" + visibility: "public" +--- +# `McpGatewaySkill` + +Bridge MCP (Model Context Protocol) servers with SWAIG functions. + +## Signature + +```java +public class McpGatewaySkill implements SkillBase +``` + +## Inheritance + +**Implements:** [SkillBase](/docs/sdk-reference/reference/java/com/signalwire/sdk/skills/skills#skill-base) + +## Methods + +### \ + +#### Signature + +```java +public () +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/McpGatewaySkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/McpGatewaySkill.java) + +*** + +### getDescription + +**Decorators:** `@Override` + +#### Signature + +```java +public String getDescription() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/McpGatewaySkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/McpGatewaySkill.java) + +Line 36. + +*** + +### getGlobalData + +**Decorators:** `@Override` + +#### Signature + +```java +public Map getGlobalData() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/McpGatewaySkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/McpGatewaySkill.java) + +Line 142. + +*** + +### getHints + +**Decorators:** `@Override` + +#### Signature + +```java +public List getHints() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/McpGatewaySkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/McpGatewaySkill.java) + +Line 127. + +*** + +### getName + +**Decorators:** `@Override` + +#### Signature + +```java +public String getName() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/McpGatewaySkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/McpGatewaySkill.java) + +Line 35. + +*** + +### getPromptSections + +**Decorators:** `@Override` + +#### Signature + +```java +public List> getPromptSections() +``` + +#### Returns + +`List>` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/McpGatewaySkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/McpGatewaySkill.java) + +Line 134. + +*** + +### registerTools + +**Decorators:** `@Override` + +#### Signature + +```java +public List registerTools() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/McpGatewaySkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/McpGatewaySkill.java) + +Line 122. + +*** + +### setup + +**Decorators:** `@Override` `@SuppressWarnings` + +#### Signature + +```java +public boolean setup(Map params) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/McpGatewaySkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/McpGatewaySkill.java) + +Line 38. + +## Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/McpGatewaySkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/McpGatewaySkill.java) + +Line 21. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/native-vector-search-skill/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/native-vector-search-skill/index.mdx new file mode 100644 index 0000000000..09f5897e37 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/native-vector-search-skill/index.mdx @@ -0,0 +1,185 @@ +--- +slug: "/reference/java/com/signalwire/sdk/skills/builtin/builtin/native-vector-search-skill" +title: "NativeVectorSearchSkill" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.skills.builtin.NativeVectorSearchSkill" + parent: "com.signalwire.sdk.skills.builtin" + module: "com.signalwire.sdk.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/NativeVectorSearchSkill.java" + visibility: "public" +--- +# `NativeVectorSearchSkill` + +Native vector search skill - supports remote mode only (network API). +Local .swsearch file support is skipped per porting guide. + +## Signature + +```java +public class NativeVectorSearchSkill implements SkillBase +``` + +## Inheritance + +**Implements:** [SkillBase](/docs/sdk-reference/reference/java/com/signalwire/sdk/skills/skills#skill-base) + +## Methods + +### \ + +#### Signature + +```java +public () +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/NativeVectorSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/NativeVectorSearchSkill.java) + +*** + +### getDescription + +**Decorators:** `@Override` + +#### Signature + +```java +public String getDescription() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/NativeVectorSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/NativeVectorSearchSkill.java) + +Line 32. + +*** + +### getHints + +**Decorators:** `@Override` + +#### Signature + +```java +public List getHints() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/NativeVectorSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/NativeVectorSearchSkill.java) + +Line 102. + +*** + +### getName + +**Decorators:** `@Override` + +#### Signature + +```java +public String getName() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/NativeVectorSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/NativeVectorSearchSkill.java) + +Line 31. + +*** + +### registerTools + +**Decorators:** `@Override` `@SuppressWarnings` + +#### Signature + +```java +public List registerTools() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/NativeVectorSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/NativeVectorSearchSkill.java) + +Line 47. + +*** + +### setup + +**Decorators:** `@Override` `@SuppressWarnings` + +#### Signature + +```java +public boolean setup(Map params) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/NativeVectorSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/NativeVectorSearchSkill.java) + +Line 35. + +*** + +### supportsMultipleInstances + +**Decorators:** `@Override` + +#### Signature + +```java +public boolean supportsMultipleInstances() +``` + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/NativeVectorSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/NativeVectorSearchSkill.java) + +Line 33. + +## Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/NativeVectorSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/NativeVectorSearchSkill.java) + +Line 20. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/play-background-file-skill/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/play-background-file-skill/index.mdx new file mode 100644 index 0000000000..c1d82d11b8 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/play-background-file-skill/index.mdx @@ -0,0 +1,182 @@ +--- +slug: "/reference/java/com/signalwire/sdk/skills/builtin/builtin/play-background-file-skill" +title: "PlayBackgroundFileSkill" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.skills.builtin.PlayBackgroundFileSkill" + parent: "com.signalwire.sdk.skills.builtin" + module: "com.signalwire.sdk.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/PlayBackgroundFileSkill.java" + visibility: "public" +--- +# `PlayBackgroundFileSkill` + +## Signature + +```java +public class PlayBackgroundFileSkill implements SkillBase +``` + +## Inheritance + +**Implements:** [SkillBase](/docs/sdk-reference/reference/java/com/signalwire/sdk/skills/skills#skill-base) + +## Methods + +### \ + +#### Signature + +```java +public () +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/PlayBackgroundFileSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/PlayBackgroundFileSkill.java) + +*** + +### getDescription + +**Decorators:** `@Override` + +#### Signature + +```java +public String getDescription() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/PlayBackgroundFileSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/PlayBackgroundFileSkill.java) + +Line 16. + +*** + +### getName + +**Decorators:** `@Override` + +#### Signature + +```java +public String getName() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/PlayBackgroundFileSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/PlayBackgroundFileSkill.java) + +Line 15. + +*** + +### getSwaigFunctions + +**Decorators:** `@Override` + +#### Signature + +```java +public List> getSwaigFunctions() +``` + +#### Returns + +`List>` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/PlayBackgroundFileSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/PlayBackgroundFileSkill.java) + +Line 34. + +*** + +### registerTools + +**Decorators:** `@Override` + +#### Signature + +```java +public List registerTools() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/PlayBackgroundFileSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/PlayBackgroundFileSkill.java) + +Line 29. + +*** + +### setup + +**Decorators:** `@Override` `@SuppressWarnings` + +#### Signature + +```java +public boolean setup(Map params) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/PlayBackgroundFileSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/PlayBackgroundFileSkill.java) + +Line 19. + +*** + +### supportsMultipleInstances + +**Decorators:** `@Override` + +#### Signature + +```java +public boolean supportsMultipleInstances() +``` + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/PlayBackgroundFileSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/PlayBackgroundFileSkill.java) + +Line 17. + +## Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/PlayBackgroundFileSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/PlayBackgroundFileSkill.java) + +Line 10. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/spider-skill/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/spider-skill/index.mdx new file mode 100644 index 0000000000..4b32810e30 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/spider-skill/index.mdx @@ -0,0 +1,182 @@ +--- +slug: "/reference/java/com/signalwire/sdk/skills/builtin/builtin/spider-skill" +title: "SpiderSkill" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.skills.builtin.SpiderSkill" + parent: "com.signalwire.sdk.skills.builtin" + module: "com.signalwire.sdk.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/SpiderSkill.java" + visibility: "public" +--- +# `SpiderSkill` + +## Signature + +```java +public class SpiderSkill implements SkillBase +``` + +## Inheritance + +**Implements:** [SkillBase](/docs/sdk-reference/reference/java/com/signalwire/sdk/skills/skills#skill-base) + +## Methods + +### \ + +#### Signature + +```java +public () +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/SpiderSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/SpiderSkill.java) + +*** + +### getDescription + +**Decorators:** `@Override` + +#### Signature + +```java +public String getDescription() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/SpiderSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/SpiderSkill.java) + +Line 24. + +*** + +### getHints + +**Decorators:** `@Override` + +#### Signature + +```java +public List getHints() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/SpiderSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/SpiderSkill.java) + +Line 120. + +*** + +### getName + +**Decorators:** `@Override` + +#### Signature + +```java +public String getName() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/SpiderSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/SpiderSkill.java) + +Line 23. + +*** + +### registerTools + +**Decorators:** `@Override` + +#### Signature + +```java +public List registerTools() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/SpiderSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/SpiderSkill.java) + +Line 35. + +*** + +### setup + +**Decorators:** `@Override` + +#### Signature + +```java +public boolean setup(Map params) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/SpiderSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/SpiderSkill.java) + +Line 27. + +*** + +### supportsMultipleInstances + +**Decorators:** `@Override` + +#### Signature + +```java +public boolean supportsMultipleInstances() +``` + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/SpiderSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/SpiderSkill.java) + +Line 25. + +## Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/SpiderSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/SpiderSkill.java) + +Line 15. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/swml-transfer-skill/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/swml-transfer-skill/index.mdx new file mode 100644 index 0000000000..157a50b4ae --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/swml-transfer-skill/index.mdx @@ -0,0 +1,226 @@ +--- +slug: "/reference/java/com/signalwire/sdk/skills/builtin/builtin/swml-transfer-skill" +title: "SwmlTransferSkill" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.skills.builtin.SwmlTransferSkill" + parent: "com.signalwire.sdk.skills.builtin" + module: "com.signalwire.sdk.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/SwmlTransferSkill.java" + visibility: "public" +--- +# `SwmlTransferSkill` + +## Signature + +```java +public class SwmlTransferSkill implements SkillBase +``` + +## Inheritance + +**Implements:** [SkillBase](/docs/sdk-reference/reference/java/com/signalwire/sdk/skills/skills#skill-base) + +## Methods + +### \ + +#### Signature + +```java +public () +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/SwmlTransferSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/SwmlTransferSkill.java) + +*** + +### getDescription + +**Decorators:** `@Override` + +#### Signature + +```java +public String getDescription() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/SwmlTransferSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/SwmlTransferSkill.java) + +Line 20. + +*** + +### getHints + +**Decorators:** `@Override` + +#### Signature + +```java +public List getHints() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/SwmlTransferSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/SwmlTransferSkill.java) + +Line 82. + +*** + +### getName + +**Decorators:** `@Override` + +#### Signature + +```java +public String getName() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/SwmlTransferSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/SwmlTransferSkill.java) + +Line 19. + +*** + +### getPromptSections + +**Decorators:** `@Override` + +#### Signature + +```java +public List> getPromptSections() +``` + +#### Returns + +`List>` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/SwmlTransferSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/SwmlTransferSkill.java) + +Line 91. + +*** + +### getSwaigFunctions + +**Decorators:** `@Override` + +#### Signature + +```java +public List> getSwaigFunctions() +``` + +#### Returns + +`List>` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/SwmlTransferSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/SwmlTransferSkill.java) + +Line 42. + +*** + +### registerTools + +**Decorators:** `@Override` + +#### Signature + +```java +public List registerTools() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/SwmlTransferSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/SwmlTransferSkill.java) + +Line 37. + +*** + +### setup + +**Decorators:** `@Override` `@SuppressWarnings` + +#### Signature + +```java +public boolean setup(Map params) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/SwmlTransferSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/SwmlTransferSkill.java) + +Line 23. + +*** + +### supportsMultipleInstances + +**Decorators:** `@Override` + +#### Signature + +```java +public boolean supportsMultipleInstances() +``` + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/SwmlTransferSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/SwmlTransferSkill.java) + +Line 21. + +## Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/SwmlTransferSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/SwmlTransferSkill.java) + +Line 10. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/weather-api-skill/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/weather-api-skill/index.mdx new file mode 100644 index 0000000000..f1353e3115 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/weather-api-skill/index.mdx @@ -0,0 +1,160 @@ +--- +slug: "/reference/java/com/signalwire/sdk/skills/builtin/builtin/weather-api-skill" +title: "WeatherApiSkill" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.skills.builtin.WeatherApiSkill" + parent: "com.signalwire.sdk.skills.builtin" + module: "com.signalwire.sdk.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WeatherApiSkill.java" + visibility: "public" +--- +# `WeatherApiSkill` + +## Signature + +```java +public class WeatherApiSkill implements SkillBase +``` + +## Inheritance + +**Implements:** [SkillBase](/docs/sdk-reference/reference/java/com/signalwire/sdk/skills/skills#skill-base) + +## Methods + +### \ + +#### Signature + +```java +public () +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/WeatherApiSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WeatherApiSkill.java) + +*** + +### getDescription + +**Decorators:** `@Override` + +#### Signature + +```java +public String getDescription() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/WeatherApiSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WeatherApiSkill.java) + +Line 17. + +*** + +### getName + +**Decorators:** `@Override` + +#### Signature + +```java +public String getName() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/WeatherApiSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WeatherApiSkill.java) + +Line 16. + +*** + +### getSwaigFunctions + +**Decorators:** `@Override` + +#### Signature + +```java +public List> getSwaigFunctions() +``` + +#### Returns + +`List>` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/WeatherApiSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WeatherApiSkill.java) + +Line 36. + +*** + +### registerTools + +**Decorators:** `@Override` + +#### Signature + +```java +public List registerTools() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/WeatherApiSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WeatherApiSkill.java) + +Line 31. + +*** + +### setup + +**Decorators:** `@Override` + +#### Signature + +```java +public boolean setup(Map params) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/WeatherApiSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WeatherApiSkill.java) + +Line 19. + +## Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/WeatherApiSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WeatherApiSkill.java) + +Line 10. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/web-search-skill/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/web-search-skill/index.mdx new file mode 100644 index 0000000000..02787ccf9a --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/web-search-skill/index.mdx @@ -0,0 +1,254 @@ +--- +slug: "/reference/java/com/signalwire/sdk/skills/builtin/builtin/web-search-skill" +title: "WebSearchSkill" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.skills.builtin.WebSearchSkill" + parent: "com.signalwire.sdk.skills.builtin" + module: "com.signalwire.sdk.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WebSearchSkill.java" + visibility: "public" +--- +# `WebSearchSkill` + +## Signature + +```java +public class WebSearchSkill implements SkillBase +``` + +## Inheritance + +**Implements:** [SkillBase](/docs/sdk-reference/reference/java/com/signalwire/sdk/skills/skills#skill-base) + +## Methods + +### \ + +#### Signature + +```java +public () +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/WebSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WebSearchSkill.java) + +*** + +### getDescription + +**Decorators:** `@Override` + +#### Signature + +```java +public String getDescription() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/WebSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WebSearchSkill.java) + +Line 58. + +*** + +### getGlobalData + +**Decorators:** `@Override` + +#### Signature + +```java +public Map getGlobalData() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/WebSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WebSearchSkill.java) + +Line 465. + +*** + +### getName + +**Decorators:** `@Override` + +#### Signature + +```java +public String getName() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/WebSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WebSearchSkill.java) + +Line 57. + +*** + +### getParameterSchema + +Advertise every configurable param so GUI tooling can discover it. +Mirrors Python's get\_parameter\_schema (commit 295745b), including the +six latency / response params. + +Each setup() read must appear here. + +**Decorators:** `@Override` + +#### Signature + +```java +public Map getParameterSchema() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/WebSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WebSearchSkill.java) + +Line 479. + +*** + +### getPromptSections + +**Decorators:** `@Override` + +#### Signature + +```java +public List> getPromptSections() +``` + +#### Returns + +`List>` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/WebSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WebSearchSkill.java) + +Line 452. + +*** + +### getVersion + +**Decorators:** `@Override` + +#### Signature + +```java +public String getVersion() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/WebSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WebSearchSkill.java) + +Line 59. + +*** + +### registerTools + +**Decorators:** `@Override` + +#### Signature + +```java +public List registerTools() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/WebSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WebSearchSkill.java) + +Line 104. + +*** + +### setup + +**Decorators:** `@Override` + +#### Signature + +```java +public boolean setup(Map params) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/WebSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WebSearchSkill.java) + +Line 62. + +*** + +### supportsMultipleInstances + +**Decorators:** `@Override` + +#### Signature + +```java +public boolean supportsMultipleInstances() +``` + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/WebSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WebSearchSkill.java) + +Line 60. + +## Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/WebSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WebSearchSkill.java) + +Line 23. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/wikipedia-search-skill/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/wikipedia-search-skill/index.mdx new file mode 100644 index 0000000000..8e58c13f53 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/wikipedia-search-skill/index.mdx @@ -0,0 +1,160 @@ +--- +slug: "/reference/java/com/signalwire/sdk/skills/builtin/builtin/wikipedia-search-skill" +title: "WikipediaSearchSkill" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.skills.builtin.WikipediaSearchSkill" + parent: "com.signalwire.sdk.skills.builtin" + module: "com.signalwire.sdk.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WikipediaSearchSkill.java" + visibility: "public" +--- +# `WikipediaSearchSkill` + +## Signature + +```java +public class WikipediaSearchSkill implements SkillBase +``` + +## Inheritance + +**Implements:** [SkillBase](/docs/sdk-reference/reference/java/com/signalwire/sdk/skills/skills#skill-base) + +## Methods + +### \ + +#### Signature + +```java +public () +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/WikipediaSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WikipediaSearchSkill.java) + +*** + +### getDescription + +**Decorators:** `@Override` + +#### Signature + +```java +public String getDescription() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/WikipediaSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WikipediaSearchSkill.java) + +Line 26. + +*** + +### getName + +**Decorators:** `@Override` + +#### Signature + +```java +public String getName() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/WikipediaSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WikipediaSearchSkill.java) + +Line 25. + +*** + +### getPromptSections + +**Decorators:** `@Override` + +#### Signature + +```java +public List> getPromptSections() +``` + +#### Returns + +`List>` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/WikipediaSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WikipediaSearchSkill.java) + +Line 106. + +*** + +### registerTools + +**Decorators:** `@Override` `@SuppressWarnings` + +#### Signature + +```java +public List registerTools() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/WikipediaSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WikipediaSearchSkill.java) + +Line 40. + +*** + +### setup + +**Decorators:** `@Override` + +#### Signature + +```java +public boolean setup(Map params) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/WikipediaSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WikipediaSearchSkill.java) + +Line 28. + +## Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/WikipediaSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WikipediaSearchSkill.java) + +Line 18. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/skills/skills/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/skills/skills/index.mdx new file mode 100644 index 0000000000..9b17c7a8fc --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/skills/skills/index.mdx @@ -0,0 +1,574 @@ +--- +slug: "/reference/java/com/signalwire/sdk/skills/skills" +title: "skills" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "com.signalwire.sdk.skills" + module: "com.signalwire.sdk.skills" +--- +# `skills` + +## Signature + +```java +package com.signalwire.sdk.skills +``` + +## Classes + + + + Manages skill lifecycle: instantiation, validation, registration with the agent. + + + + Static registry of all available skills. Skills are registered by name and can be instantiated on demand. <p>The class also exposes a small per-instance surface for Python-parity: an instance constructor and `#addSkillDirectory(String)` mirror Python's `SkillRegistry().add_skill_directory(path)`. + + + +## Interfaces + +### SkillBase + +Interface for all skills. + +Skills are modular capabilities that can be +added to agents to provide tools, prompts, hints, and global data. + +#### Signature + +```java +public interface SkillBase +``` + +#### Methods + +##### cleanup + +Cleanup resources. + +**Modifiers:** `default` + +###### Signature + +```java +default void cleanup() +``` + +###### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillBase.java) + +Line 68. + +*** + +##### getDescription + +Human-readable description. + +###### Signature + +```java +String getDescription() +``` + +###### Returns + +`String` + +###### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillBase.java) + +Line 17. + +*** + +##### getExtraFields + +Get extra fields to merge into all tool definitions (e.g., fillers). + +**Modifiers:** `default` + +###### Signature + +```java +default Map getExtraFields() +``` + +###### Returns + +`Map` + +###### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillBase.java) + +Line 83. + +*** + +##### getGlobalData + +Get global data to merge into the agent. + +**Modifiers:** `default` + +###### Signature + +```java +default Map getGlobalData() +``` + +###### Returns + +`Map` + +###### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillBase.java) + +Line 52. + +*** + +##### getHints + +Get speech recognition hints for this skill. + +**Modifiers:** `default` + +###### Signature + +```java +default List getHints() +``` + +###### Returns + +`List` + +###### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillBase.java) + +Line 47. + +*** + +##### getInstanceKey + +Get unique instance key (for multi-instance skills). + +**Modifiers:** `default` + +###### Signature + +```java +default String getInstanceKey() +``` + +###### Returns + +`String` + +###### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillBase.java) + +Line 78. + +*** + +##### getName + +Unique skill name. + +###### Signature + +```java +String getName() +``` + +###### Returns + +`String` + +###### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillBase.java) + +Line 14. + +*** + +##### getParameterSchema + +Get parameter schema for GUI tools. + +**Modifiers:** `default` + +###### Signature + +```java +default Map getParameterSchema() +``` + +###### Returns + +`Map` + +###### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillBase.java) + +Line 73. + +*** + +##### getPromptSections + +Get prompt sections to inject into the agent. +Each section is a map with: title, body, bullets (optional) + +**Modifiers:** `default` + +###### Signature + +```java +default List> getPromptSections() +``` + +###### Returns + +`List>` + +###### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillBase.java) + +Line 58. + +*** + +##### getRequiredEnvVars + +Required environment variables. + +**Modifiers:** `default` + +###### Signature + +```java +default List getRequiredEnvVars() +``` + +###### Returns + +`List` + +###### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillBase.java) + +Line 26. + +*** + +##### getRequiredPackages + +Required packages (informational). + +**Modifiers:** `default` + +###### Signature + +```java +default List getRequiredPackages() +``` + +###### Returns + +`List` + +###### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillBase.java) + +Line 29. + +*** + +##### getSwaigFunctions + +Get SWAIG functions (for DataMap-based skills that bypass handlers). + +**Modifiers:** `default` + +###### Signature + +```java +default List> getSwaigFunctions() +``` + +###### Returns + +`List>` + +###### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillBase.java) + +Line 63. + +*** + +##### getVersion + +Semantic version string. + +**Modifiers:** `default` + +###### Signature + +```java +default String getVersion() +``` + +###### Returns + +`String` + +###### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillBase.java) + +Line 20. + +*** + +##### registerTools + +Register tools with the agent. + +###### Signature + +```java +List registerTools() +``` + +###### Returns + +`List` — List of tool definitions to register + +###### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillBase.java) + +Line 42. + +*** + +##### setup + +Initialize the skill with parameters. + +###### Signature + +```java +boolean setup(Map params) +``` + +###### Parameters + + + Configuration parameters + + +###### Returns + +`boolean` — true if setup succeeded + +###### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillBase.java) + +Line 36. + +*** + +##### supportsMultipleInstances + +Whether multiple instances can be loaded with different configs. + +**Modifiers:** `default` + +###### Signature + +```java +default boolean supportsMultipleInstances() +``` + +###### Returns + +`boolean` + +###### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillBase.java) + +Line 23. + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillBase.java) + +Line 11. + +## Enums + +### SkillName + +Built-in skill names as a typed, compile-time-checked closed set. + +<p>java.util.Map) +(and the matching `removeSkill` / `hasSkill` overloads) accept +this enum <em>or</em> a plain `String`. + +The enum gives editor +autocompletion and makes a typo fail at compile time (a bare string like +`"datetiem"` only fails at runtime, on the server). Strings keep +parity with the Python reference (which uses bare `str`) and still +allow custom / third-party skills that aren't built in: + +<pre>// typed, autocompleted +agent.addSkill("datetime"); // string still works (parity) +agent.addSkill("my_custom_skill"); // open set: custom skills ok</pre> + +<p>Each constant's value is the canonical wire string +(the key the skill registers under in `SkillRegistry`), so routing a +call through the enum is byte-for-byte identical to passing that string. + +#### Signature + +```java +public enum SkillName +``` + +#### Variants + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#### Methods + +##### getValue + +The canonical wire string for this skill — the name it registers under +in `SkillRegistry`. + +Equivalent to PHP's backed-enum `->value`. + +###### Signature + +```java +public String getValue() +``` + +###### Returns + +`String` — the lower-case-with-underscores skill name. + +###### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillName.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillName.java) + +Line 57. + +*** + +##### valueOf + +**Modifiers:** `static` + +###### Signature + +```java +public static SkillName valueOf(String name) +``` + +###### Parameters + + + +###### Returns + +`SkillName` + +###### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillName.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillName.java) + +*** + +##### values + +**Modifiers:** `static` + +###### Signature + +```java +public static SkillName[] values() +``` + +###### Returns + +`SkillName[]` + +###### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillName.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillName.java) + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillName.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillName.java) + +Line 24. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/skills/skills/skill-manager/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/skills/skills/skill-manager/index.mdx new file mode 100644 index 0000000000..838de7af9c --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/skills/skills/skill-manager/index.mdx @@ -0,0 +1,173 @@ +--- +slug: "/reference/java/com/signalwire/sdk/skills/skills/skill-manager" +title: "SkillManager" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.skills.SkillManager" + parent: "com.signalwire.sdk.skills" + module: "com.signalwire.sdk.skills" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillManager.java" + visibility: "public" +--- +# `SkillManager` + +Manages skill lifecycle: instantiation, validation, registration with the agent. + +## Signature + +```java +public class SkillManager +``` + +## Methods + +### \ + +#### Signature + +```java +public (AgentBase agent) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillManager.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillManager.java) + +Line 19. + +*** + +### addSkill + +Add a skill to the agent. +1\. + +Get skill factory from registry +2\. Create instance +3\. Check for duplicates +4\. Validate env vars +5\. Call setup() +6\. Register tools +7\. Merge hints +8\. Merge global data +9\. Add prompt sections + +#### Signature + +```java +public void addSkill(String skillName, Map params) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillManager.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillManager.java) + +Line 35. + +*** + +### cleanup + +Cleanup all skills. + +#### Signature + +```java +public void cleanup() +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillManager.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillManager.java) + +Line 159. + +*** + +### hasSkill + +Check if a skill is active. + +#### Signature + +```java +public boolean hasSkill(String skillName) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillManager.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillManager.java) + +Line 152. + +*** + +### listSkills + +List active skill instance keys. + +#### Signature + +```java +public List listSkills() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillManager.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillManager.java) + +Line 145. + +*** + +### removeSkill + +Remove a skill from the agent. + +#### Signature + +```java +public void removeSkill(String skillName) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillManager.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillManager.java) + +Line 134. + +## Source + +[`src/main/java/com/signalwire/sdk/skills/SkillManager.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillManager.java) + +Line 12. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/skills/skills/skill-registry/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/skills/skills/skill-registry/index.mdx new file mode 100644 index 0000000000..bdacd92b59 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/skills/skills/skill-registry/index.mdx @@ -0,0 +1,288 @@ +--- +slug: "/reference/java/com/signalwire/sdk/skills/skills/skill-registry" +title: "SkillRegistry" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.skills.SkillRegistry" + parent: "com.signalwire.sdk.skills" + module: "com.signalwire.sdk.skills" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillRegistry.java" + visibility: "public" +--- +# `SkillRegistry` + +Static registry of all available skills. +Skills are registered by name and can be instantiated on demand. + +<p>The class also exposes a small per-instance surface for +Python-parity: an instance constructor and `#addSkillDirectory(String)` +mirror Python's `SkillRegistry().add_skill_directory(path)`. + +The +static registry is kept for the existing Java idiom; instance state is +limited to the external skill directories list. + +**Modifiers:** `final` + +## Signature + +```java +public final class SkillRegistry +``` + +## Methods + +### \ + +Public no-arg constructor so callers can manage their own +external-paths list. + +The static registry is unaffected. + +#### Signature + +```java +public () +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillRegistry.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillRegistry.java) + +Line 53. + +*** + +### addSkillDirectory + +Add a directory to search for skills. + +<p>Mirrors Python's +`signalwire.skills.registry.SkillRegistry.add_skill_directory`: +validate that the path exists and is a directory, then append it +(de-duplicated) to `externalPaths`. + +Throws +`IllegalArgumentException` (the Java analog of Python's +`ValueError`) for non-existent paths or non-directories. + +**Modifiers:** `synchronized` + +#### Signature + +```java +public synchronized void addSkillDirectory(String path) +``` + +#### Parameters + + + absolute or relative path to a directory containing skill subdirectories + + +#### Throws + +- `IllegalArgumentException` — when the path doesn't exist or isn't a directory. + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillRegistry.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillRegistry.java) + +Line 110. + +*** + +### get + +Get a new instance of a skill by name. + +**Modifiers:** `static` + +#### Signature + +```java +public static SkillBase get(String name) +``` + +#### Parameters + + + +#### Returns + +`SkillBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillRegistry.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillRegistry.java) + +Line 66. + +*** + +### getAllSkillsSchema + +Get complete schema for all registered skills. + +<p>Mirrors Python's instance-method +`SkillRegistry.get_all_skills_schema()` — returns a map +keyed by skill name where each value contains parameter metadata. +Java skills don't carry rich Python-style parameter introspection +in v1, so the value defaults to a minimal shape with the skill +name; built-in skills that expose `getSkillDescription` / +`getSkillVersion` get those merged in. + +#### Signature + +```java +public Map> getAllSkillsSchema() +``` + +#### Returns + +`Map>` — ordered map of skill name to schema metadata + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillRegistry.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillRegistry.java) + +Line 146. + +*** + +### getExternalPaths + +Returns an immutable copy of the registered external skill +directories. + +Parity surface for Python's `_external_paths`. + +**Modifiers:** `synchronized` + +#### Signature + +```java +public synchronized List getExternalPaths() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillRegistry.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillRegistry.java) + +Line 129. + +*** + +### has + +Check if a skill is registered. + +**Modifiers:** `static` + +#### Signature + +```java +public static boolean has(String name) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillRegistry.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillRegistry.java) + +Line 77. + +*** + +### list + +List all registered skill names. + +**Modifiers:** `static` + +#### Signature + +```java +public static Set list() +``` + +#### Returns + +`Set` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillRegistry.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillRegistry.java) + +Line 84. + +*** + +### register + +Register a skill factory. + +**Modifiers:** `static` + +#### Signature + +```java +public static void register(String name, Supplier factory) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillRegistry.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillRegistry.java) + +Line 58. + +*** + +### unregister + +Unregister a skill (for testing). + +**Modifiers:** `static` + +#### Signature + +```java +public static void unregister(String name) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillRegistry.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillRegistry.java) + +Line 91. + +## Source + +[`src/main/java/com/signalwire/sdk/skills/SkillRegistry.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillRegistry.java) + +Line 21. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/swaig/swaig/function-result/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/swaig/swaig/function-result/index.mdx new file mode 100644 index 0000000000..4b63b2fa59 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/swaig/swaig/function-result/index.mdx @@ -0,0 +1,2454 @@ +--- +slug: "/reference/java/com/signalwire/sdk/swaig/swaig/function-result" +title: "FunctionResult" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.swaig.FunctionResult" + parent: "com.signalwire.sdk.swaig" + module: "com.signalwire.sdk.swaig" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java" + visibility: "public" +--- +# `FunctionResult` + +SwaigFunctionResult - the response builder returned by tool handlers. + +<p> +Every method returns `this` for fluent chaining. + +Contains 40+ action methods +covering call control, state management, media, speech/AI config, and advanced features. + +<p> +Serialization rules: +<ul> + <li>response - always included (string)</li> + <li>action - only included if at least one action exists (array of objects)</li> + <li>post_process - only included if true and actions exist (boolean)</li> +</ul> + +## Signature + +```java +public class FunctionResult +``` + +## Constants + + + Default `ai_response` for `#pay`. Set as a `set` verb ahead of the `pay` verb so the AI relays the payment outcome via the `${pay_result`\} variable. Caller-overridable through the full-arity `pay(...)` overload. + + +## Methods + +### \ + +#### Signature + + + + ```java + public () + ``` + + + + ```java + public (String response) + ``` + + + + ```java + public (String response, boolean postProcess) + ``` + + + +#### Parameters (Overload 2) + + + +#### Parameters (Overload 3) + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 38. + +*** + +### addAction + +Add a single action to the response. + +#### Signature + +```java +public FunctionResult addAction(String name, Object data) +``` + +#### Parameters + + + + + +#### Returns + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 67. + +*** + +### addActions + +Add multiple actions. + +#### Signature + +```java +public FunctionResult addActions(List> actionList) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 77. + +*** + +### addDynamicHints + +#### Signature + +```java +public FunctionResult addDynamicHints(List hints) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 439. + +*** + +### clearDynamicHints + +#### Signature + +```java +public FunctionResult clearDynamicHints() +``` + +#### Returns + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 443. + +*** + +### connect + +Connect/transfer the call to another destination via SWML connect verb. + +#### Signature + + + + ```java + public FunctionResult connect(String destination, boolean isFinal, String from) + ``` + + + + ```java + public FunctionResult connect(String destination, boolean isFinal) + ``` + + + +#### Parameters (Overload 1) + + + + + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`FunctionResult` + +#### Returns (Overload 2) + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 87. + +*** + +### createPaymentAction + +**Modifiers:** `static` + +#### Signature + +```java +public static Map createPaymentAction( + String actionType, + String phrase +) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 1074. + +*** + +### createPaymentParameter + +**Modifiers:** `static` + +#### Signature + +```java +public static Map createPaymentParameter( + String name, + String value +) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 1078. + +*** + +### createPaymentPrompt + +**Modifiers:** `static` + +#### Signature + +```java +public static Map createPaymentPrompt( + String forSituation, + List> payActions, + String cardType, + String errorType +) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 1063. + +*** + +### enableExtensiveData + +#### Signature + +```java +public FunctionResult enableExtensiveData(boolean enabled) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 466. + +*** + +### enableFunctionsOnTimeout + +#### Signature + +```java +public FunctionResult enableFunctionsOnTimeout(boolean enabled) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 462. + +*** + +### executeRpc + +Execute an RPC method via SWML. + +#### Signature + + + + ```java + public FunctionResult executeRpc( + String method, + Map params, + String callId, + String nodeId + ) + ``` + + + + ```java + public FunctionResult executeRpc(String method, Map params) + ``` + + + +#### Parameters (Overload 1) + + + + + + + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`FunctionResult` + +#### Returns (Overload 2) + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 972. + +*** + +### executeSwml + +Execute SWML content with optional transfer behavior. + +#### Signature + + + + ```java + public FunctionResult executeSwml(Object swmlContent, boolean transfer) + ``` + + + + ```java + public FunctionResult executeSwml(Object swmlContent) + ``` + + + +#### Parameters (Overload 1) + + + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`FunctionResult` + +#### Returns (Overload 2) + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 482. + +*** + +### getActions + +#### Signature + +```java +public List> getActions() +``` + +#### Returns + +`List>` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 1117. + +*** + +### getResponse + +#### Signature + +```java +public String getResponse() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 1113. + +*** + +### hangup + +Hangup the call. + +#### Signature + +```java +public FunctionResult hangup() +``` + +#### Returns + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 128. + +*** + +### hold + +Put the call on hold (timeout clamped 0-900). + +#### Signature + +```java +public FunctionResult hold(int timeout) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 135. + +*** + +### isPostProcess + +#### Signature + +```java +public boolean isPostProcess() +``` + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 1121. + +*** + +### joinConference + +Join an ad-hoc audio conference with RELAY and CXML calls using SWML. + +<p> +Functional parity with the Python reference +`signalwire.core.function_result.FunctionResult.join_conference`. +Every optional parameter the reference exposes is a positional argument +here, with the same default and the same validation. + +Hold music is +`waitUrl` (snake\_case wire key `wait_url`) — there is no +separate "hold audio" parameter; the reference uses `wait_url`. + +#### Signature + + + + ```java + public FunctionResult joinConference( + String name, + boolean muted, + String beep, + boolean startOnEnter, + boolean endOnExit, + String waitUrl, + int maxParticipants, + String record, + String region, + String trim, + String coach, + String statusCallbackEvent, + String statusCallback, + String statusCallbackMethod, + String recordingStatusCallback, + String recordingStatusCallbackMethod, + String recordingStatusCallbackEvent, + Object result + ) + ``` + + + + ```java + public FunctionResult joinConference(String name) + ``` + + + +#### Parameters (Overload 1) + + + conference name (required, must be non-blank) + + + + join muted (default `false`) + + + + "true", "false", "onEnter", "onExit" (default "true") + + + + conference starts when this participant enters (default `true`) + + + + conference ends when this participant exits (default `false`) + + + + SWML URL for hold music (`null` for default) + + + + maximum participants, 1..250 (default 250) + + + + "do-not-record" or "record-from-start" (default "do-not-record") + + + + conference region (`null` for default) + + + + "trim-silence" or "do-not-trim" (default "trim-silence") + + + + SWML Call ID / CXML CallSid for coaching (`null` for none) + + + + space-separated status events (`null` for none) + + + + URL for status callbacks (`null` for none) + + + + "GET" or "POST" (default "POST") + + + + URL for recording status callbacks (`null` for none) + + + + "GET" or "POST" (default "POST") + + + + recording events (default "completed") + + + + switch-on-return value/cond (`null` for none) + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`FunctionResult` — this, for chaining + +#### Returns (Overload 2) + +`FunctionResult` + +#### Throws + +- `IllegalArgumentException` — if any validated value is invalid + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 541. + +*** + +### joinRoom + +Join a RELAY room. + +#### Signature + +```java +public FunctionResult joinRoom(String name) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 661. + +*** + +### pay + +Process payment via SWML pay action — full parity with the Python +reference `signalwire.core.function_result.FunctionResult.pay`. + +<p> +Every optional parameter the reference exposes is a positional argument +here, in the same order, with the same default and the same emitted +wire key. + +The reference ALWAYS emits `payment_connector_url`, +`input`, `payment_method`, `timeout`, `max_attempts`, +`security_code`, `min_postal_code_length`, `token_type`, +`currency`, `language`, `voice`, `valid_card_types` +and `postal_code`; `status_url`, `charge_amount`, +`description`, `parameters` and `prompts` are emitted +only when supplied. Numeric values are stringified to match Python's +`str(...)`. A `set` verb carrying `ai_response` is +emitted before the `pay` verb. + +#### Signature + + + + ```java + public FunctionResult pay( + String connectorUrl, + String inputMethod, + String statusUrl, + String paymentMethod, + int timeout, + int maxAttempts, + boolean securityCode, + Object postalCode, + int minPostalCodeLength, + String tokenType, + String chargeAmount, + String currency, + String language, + String voice, + String description, + String validCardTypes, + List> parameters, + List> prompts, + String aiResponse + ) + ``` + + + + ```java + public FunctionResult pay( + String connectorUrl, + String inputMethod, + String statusUrl, + int timeout, + int maxAttempts + ) + ``` + + + +#### Parameters (Overload 1) + + + payment connector URL (required) + + + + "dtmf" (the SWML schema is `const:"dtmf"`; default "dtmf") + + + + URL for status-change notifications (`null` to omit) + + + + payment method (default "credit-card") + + + + seconds to wait for next digit (default 5) + + + + retry attempts (default 1) + + + + prompt for the security code (default `true`) + + + + prompt for postal code (`Boolean`) or the literal postcode (`String`); default `Boolean.TRUE` + + + + minimum postal-code digits (default 0) + + + + "one-time" or "reusable" (default "reusable") + + + + amount to charge, decimal string (`null` to omit) + + + + currency code (default "usd") + + + + prompt language (default "en-US") + + + + TTS voice (default "woman") + + + + custom payment description (`null` to omit) + + + + space-separated card types (default "visa mastercard amex") + + + + name/value pairs for the connector (`null` to omit) + + + + custom prompt configurations (`null` to omit) + + + + `ai_response` text for the leading `set` verb (default `#DEFAULT_PAY_AI_RESPONSE`) + + +#### Parameters (Overload 2) + + + + + + + + + + + +#### Returns (Overload 1) + +`FunctionResult` — this, for chaining + +#### Returns (Overload 2) + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 906. + +*** + +### playBackgroundFile + +Play audio file in background. + +#### Signature + + + + ```java + public FunctionResult playBackgroundFile(String filename, boolean wait) + ``` + + + + ```java + public FunctionResult playBackgroundFile(String filename) + ``` + + + +#### Parameters (Overload 1) + + + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`FunctionResult` + +#### Returns (Overload 2) + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 261. + +*** + +### recordCall + +Start background call recording via SWML — full parity with the Python +reference `signalwire.core.function_result.FunctionResult.record_call`. + +<p> +Validates `format` ∈ {wav, mp3, mp4} and `direction` ∈ +{speak, listen, both} with byte-exact Python `ValueError` messages. +The reference ALWAYS emits `stereo`, `format`, `direction`, +`beep` and `input_sensitivity`; `control_id`, +`terminators`, `initial_timeout`, `end_silence_timeout`, +`max_length` and `status_url` are emitted only when supplied. + +#### Signature + + + + ```java + public FunctionResult recordCall( + String controlId, + boolean stereo, + String format, + String direction, + String terminators, + boolean beep, + double inputSensitivity, + Double initialTimeout, + Double endSilenceTimeout, + Double maxLength, + String statusUrl + ) + ``` + + + + ```java + public FunctionResult recordCall( + String controlId, + boolean stereo, + RecordFormat format, + RecordDirection direction, + String terminators, + boolean beep, + double inputSensitivity, + Double initialTimeout, + Double endSilenceTimeout, + Double maxLength, + String statusUrl + ) + ``` + + + + ```java + public FunctionResult recordCall( + String controlId, + boolean stereo, + String format, + String direction + ) + ``` + + + + ```java + public FunctionResult recordCall( + String controlId, + boolean stereo, + RecordFormat format, + String direction + ) + ``` + + + + ```java + public FunctionResult recordCall( + String controlId, + boolean stereo, + String format, + RecordDirection direction + ) + ``` + + + + ```java + public FunctionResult recordCall( + String controlId, + boolean stereo, + RecordFormat format, + RecordDirection direction + ) + ``` + + + + ```java + public FunctionResult recordCall() + ``` + + + +#### Parameters (Overload 1) + + + recording identifier (pairs with stopRecordCall; `null` to omit) + + + + record in stereo (default `false`) + + + + "wav", "mp3" or "mp4" (default "wav") + + + + "speak", "listen" or "both" (default "both") + + + + digits that stop recording (`null` to omit) + + + + play a beep before recording (default `false`; ALWAYS emitted) + + + + input sensitivity (default 44.0; ALWAYS emitted) + + + + seconds to wait for speech start (`null` to omit) + + + + seconds of trailing silence before ending (`null` to omit) + + + + maximum recording length in seconds (`null` to omit) + + + + URL for recording status events (`null` to omit) + + +#### Parameters (Overload 2) + + + + + + + + + + + + + + + + + + + + + + + +#### Parameters (Overload 3) + + + + + + + + + +#### Parameters (Overload 4) + + + + + + + + + +#### Parameters (Overload 5) + + + + + + + + + +#### Parameters (Overload 6) + + + + + + + + + +#### Returns (Overload 1) + +`FunctionResult` — this, for chaining + +#### Returns (Overload 2) + +`FunctionResult` + +#### Returns (Overload 3) + +`FunctionResult` + +#### Returns (Overload 4) + +`FunctionResult` + +#### Returns (Overload 5) + +`FunctionResult` + +#### Returns (Overload 6) + +`FunctionResult` + +#### Returns (Overload 7) + +`FunctionResult` + +#### Throws + +- `IllegalArgumentException` — if format or direction is invalid + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 304. + +*** + +### removeGlobalData + +#### Signature + +```java +public FunctionResult removeGlobalData(Object keys) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 173. + +*** + +### removeMetadata + +#### Signature + +```java +public FunctionResult removeMetadata(Object keys) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 181. + +*** + +### replaceInHistory + +Replace tool\_call+result pair in conversation history. + +#### Signature + + + + ```java + public FunctionResult replaceInHistory(String text) + ``` + + + + ```java + public FunctionResult replaceInHistory(boolean summary) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`FunctionResult` + +#### Returns (Overload 2) + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 244. + +*** + +### rpcAiMessage + +Inject a message into an AI agent on another call — full parity with the +Python reference `FunctionResult.rpc_ai_message`. + +`role` +flows through to `params.role` (Python defaults "system") instead +of being hard-coded. + +#### Signature + + + + ```java + public FunctionResult rpcAiMessage( + String callId, + String messageText, + String role + ) + ``` + + + + ```java + public FunctionResult rpcAiMessage(String callId, String messageText) + ``` + + + +#### Parameters (Overload 1) + + + target call ID (required) + + + + message text to inject (required) + + + + message role (default "system") + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`FunctionResult` — this, for chaining + +#### Returns (Overload 2) + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 1032. + +*** + +### rpcAiUnhold + +Unhold another call. + +#### Signature + +```java +public FunctionResult rpcAiUnhold(String callId) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 1050. + +*** + +### rpcDial + +Dial out to a number with a destination SWML URL — full parity with the +Python reference `FunctionResult.rpc_dial`. + +`deviceType` +flows through to `params.devices.type` (Python defaults "phone") +instead of being hard-coded. + +#### Signature + + + + ```java + public FunctionResult rpcDial( + String toNumber, + String fromNumber, + String destSwml, + String deviceType + ) + ``` + + + + ```java + public FunctionResult rpcDial( + String toNumber, + String fromNumber, + String destSwml + ) + ``` + + + +#### Parameters (Overload 1) + + + E.164 number to dial (required) + + + + E.164 caller ID (required) + + + + URL to the SWML handling the outbound leg (required) + + + + device type for the dial (default "phone") + + +#### Parameters (Overload 2) + + + + + + + +#### Returns (Overload 1) + +`FunctionResult` — this, for chaining + +#### Returns (Overload 2) + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 1001. + +*** + +### say + +#### Signature + +```java +public FunctionResult say(String text) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 254. + +*** + +### sendSms + +Send SMS via SWML — full parity with the Python reference +`signalwire.core.function_result.FunctionResult.send_sms`. +Either `body` or `media` must be supplied. + +`to_number` +and `from_number` are always emitted; `body`, `media`, +`tags` and `region` are emitted only when supplied. + +#### Signature + + + + ```java + public FunctionResult sendSms( + String toNumber, + String fromNumber, + String body, + List media, + List tags, + String region + ) + ``` + + + + ```java + public FunctionResult sendSms( + String toNumber, + String fromNumber, + String body, + List media, + List tags + ) + ``` + + + +#### Parameters (Overload 1) + + + E.164 destination (required) + + + + E.164 origin (required) + + + + message body (`null` if media supplied) + + + + media URLs (`null` if body supplied) + + + + tags for UI search (`null` to omit) + + + + region to originate the message from (`null` to omit) + + +#### Parameters (Overload 2) + + + + + + + + + + + +#### Returns (Overload 1) + +`FunctionResult` — this, for chaining + +#### Returns (Overload 2) + +`FunctionResult` + +#### Throws + +- `IllegalArgumentException` — if neither body nor media is provided + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 832. + +*** + +### setEndOfSpeechTimeout + +#### Signature + +```java +public FunctionResult setEndOfSpeechTimeout(int milliseconds) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 447. + +*** + +### setMetadata + +#### Signature + +```java +public FunctionResult setMetadata(Map data) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 177. + +*** + +### setPostProcess + +#### Signature + +```java +public FunctionResult setPostProcess(boolean postProcess) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 59. + +*** + +### setResponse + +#### Signature + +```java +public FunctionResult setResponse(String response) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 54. + +*** + +### setSpeechEventTimeout + +#### Signature + +```java +public FunctionResult setSpeechEventTimeout(int milliseconds) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 451. + +*** + +### simulateUserInput + +Queue simulated user input. + +#### Signature + +```java +public FunctionResult simulateUserInput(String text) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 1057. + +*** + +### sipRefer + +Send SIP REFER. + +#### Signature + +```java +public FunctionResult sipRefer(String toUri) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 671. + +*** + +### stop + +Stop the agent execution. + +#### Signature + +```java +public FunctionResult stop() +``` + +#### Returns + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 163. + +*** + +### stopBackgroundFile + +#### Signature + +```java +public FunctionResult stopBackgroundFile() +``` + +#### Returns + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 275. + +*** + +### stopRecordCall + +Stop an active background call recording. + +#### Signature + + + + ```java + public FunctionResult stopRecordCall(String controlId) + ``` + + + + ```java + public FunctionResult stopRecordCall() + ``` + + + +#### Parameters (Overload 1) + + + +#### Returns (Overload 1) + +`FunctionResult` + +#### Returns (Overload 2) + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 422. + +*** + +### stopTap + +Stop a tap stream. + +#### Signature + + + + ```java + public FunctionResult stopTap(String controlId) + ``` + + + + ```java + public FunctionResult stopTap() + ``` + + + +#### Parameters (Overload 1) + + + +#### Returns (Overload 1) + +`FunctionResult` + +#### Returns (Overload 2) + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 801. + +*** + +### switchContext + +Switch context with optional reset parameters. + +#### Signature + + + + ```java + public FunctionResult switchContext( + String systemPrompt, + String userPrompt, + boolean consolidate, + boolean fullReset + ) + ``` + + + + ```java + public FunctionResult switchContext(String systemPrompt) + ``` + + + +#### Parameters (Overload 1) + + + + + + + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`FunctionResult` + +#### Returns (Overload 2) + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 214. + +*** + +### swmlChangeContext + +Change the conversation context. + +#### Signature + +```java +public FunctionResult swmlChangeContext(String contextName) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 207. + +*** + +### swmlChangeStep + +Change the conversation step. + +#### Signature + +```java +public FunctionResult swmlChangeStep(String stepName) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 200. + +*** + +### swmlTransfer + +SWML transfer with AI response setup. + +#### Signature + +```java +public FunctionResult swmlTransfer( + String dest, + String aiResponse, + boolean isFinal +) +``` + +#### Parameters + + + + + + + +#### Returns + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 111. + +*** + +### swmlUserEvent + +Send a user event through SWML. + +#### Signature + +```java +public FunctionResult swmlUserEvent(Map eventData) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 188. + +*** + +### tap + +Start a background call tap via SWML — full parity with the Python +reference `signalwire.core.function_result.FunctionResult.tap`. + +<p> +Validates `direction` ∈ {speak, hear, both}, `codec` ∈ +{PCMU, PCMA}, and > 0 with byte-exact Python +`ValueError` messages (rendered through +`IllegalArgumentException`). + +Only `uri` is always emitted; +each other key is emitted only when it differs from its reference +default (!= "both", != "PCMU", +!= 20), plus `control_id` and `status_url` +when supplied. + +#### Signature + + + + ```java + public FunctionResult tap( + String uri, + String controlId, + String direction, + String codec, + int rtpPtime, + String statusUrl + ) + ``` + + + + ```java + public FunctionResult tap( + String uri, + String controlId, + TapDirection direction, + Codec codec, + int rtpPtime, + String statusUrl + ) + ``` + + + + ```java + public FunctionResult tap( + String uri, + String controlId, + String direction, + String codec + ) + ``` + + + + ```java + public FunctionResult tap( + String uri, + String controlId, + TapDirection direction, + String codec + ) + ``` + + + + ```java + public FunctionResult tap( + String uri, + String controlId, + String direction, + Codec codec + ) + ``` + + + + ```java + public FunctionResult tap( + String uri, + String controlId, + TapDirection direction, + Codec codec + ) + ``` + + + +#### Parameters (Overload 1) + + + tap media-stream destination (required; rtp://, ws://, wss://) + + + + tap identifier (`null` for an auto-generated one) + + + + "speak", "hear" or "both" (default "both") + + + + "PCMU" or "PCMA" (default "PCMU") + + + + RTP packetization time in ms, > 0 (default 20) + + + + URL for status-change requests (`null` to omit) + + +#### Parameters (Overload 2) + + + + + + + + + + + + + +#### Parameters (Overload 3) + + + + + + + + + +#### Parameters (Overload 4) + + + + + + + + + +#### Parameters (Overload 5) + + + + + + + + + +#### Parameters (Overload 6) + + + + + + + + + +#### Returns (Overload 1) + +`FunctionResult` — this, for chaining + +#### Returns (Overload 2) + +`FunctionResult` + +#### Returns (Overload 3) + +`FunctionResult` + +#### Returns (Overload 4) + +`FunctionResult` + +#### Returns (Overload 5) + +`FunctionResult` + +#### Returns (Overload 6) + +`FunctionResult` + +#### Throws + +- `IllegalArgumentException` — if direction, codec or rtp\_ptime is invalid + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 700. + +*** + +### toggleFunctions + +Toggle specific SWAIG functions on/off. + +#### Signature + +```java +public FunctionResult toggleFunctions(List> toggles) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 458. + +*** + +### toJson + +Render as JSON string. + +#### Signature + +```java +public String toJson() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 1107. + +*** + +### toMap + +Convert to the Map structure expected by SWAIG. + +#### Signature + +```java +public Map toMap() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 1087. + +*** + +### updateGlobalData + +#### Signature + +```java +public FunctionResult updateGlobalData(Map data) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 169. + +*** + +### updateSettings + +Update agent runtime settings (temperature, top\_p, etc.). + +#### Signature + +```java +public FunctionResult updateSettings(Map settings) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 473. + +*** + +### waitForUser + +Control how agent waits for user input. + +#### Signature + + + + ```java + public FunctionResult waitForUser( + Boolean enabled, + Integer timeout, + boolean answerFirst + ) + ``` + + + + ```java + public FunctionResult waitForUser() + ``` + + + +#### Parameters (Overload 1) + + + + + + + +#### Returns (Overload 1) + +`FunctionResult` + +#### Returns (Overload 2) + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 142. + +## Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 30. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/swaig/swaig/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/swaig/swaig/index.mdx new file mode 100644 index 0000000000..5e377d8ff6 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/swaig/swaig/index.mdx @@ -0,0 +1,86 @@ +--- +slug: "/reference/java/com/signalwire/sdk/swaig/swaig" +title: "swaig" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "com.signalwire.sdk.swaig" + module: "com.signalwire.sdk.swaig" +--- +# `swaig` + +## Signature + +```java +package com.signalwire.sdk.swaig +``` + +## Classes + + + + SwaigFunctionResult - the response builder returned by tool handlers. <p> Every method returns `this` for fluent chaining. + + + + Typed, fluent builder for the JSON-Schema `parameters` blob that a `ToolDefinition` (and `com.signalwire.sdk.agent.AgentBase#defineTool`) takes. <p>Today the `parameters` argument is a hand-written, untyped `Map` of nested maps — the JSON Schema spelled out by hand: <pre>Object> params = new LinkedHashMap\<>(); params.put("type", "object"); params.put("properties", Map.of( "service", Map.of("type", "string", "description", "The service"), "date", Map.of("type", "string", "description", "YYYY-MM-DD"))); params.put("required", List.of("service", "date"));</pre> <p>That is easy to typo (a wrong `"type"` value, a misspelled key, a required name that doesn't match a property) and only fails at runtime on the server. + + + + Defines a SWAIG tool with its name, description, parameters, and handler. + + + +## Interfaces + +### ToolHandler + +Functional interface for SWAIG tool handlers. +Called when the platform invokes a tool during a conversation. + +#### Signature + +```java +public interface ToolHandler +``` + +#### Methods + +##### handle + +Handle a SWAIG tool invocation. + +###### Signature + +```java +FunctionResult handle(Map args, Map rawData) +``` + +###### Parameters + + + Parsed arguments from the tool call + + + + Full raw request payload for accessing call info, global data, etc. + + +###### Returns + +`FunctionResult` — A FunctionResult with the response text and optional actions + +###### Source + +[`src/main/java/com/signalwire/sdk/swaig/ToolHandler.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ToolHandler.java) + +Line 19. + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/ToolHandler.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ToolHandler.java) + +Line 10. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/swaig/swaig/parameter-schema/builder/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/swaig/swaig/parameter-schema/builder/index.mdx new file mode 100644 index 0000000000..4dfdf2da53 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/swaig/swaig/parameter-schema/builder/index.mdx @@ -0,0 +1,547 @@ +--- +slug: "/reference/java/com/signalwire/sdk/swaig/swaig/parameter-schema/builder" +title: "Builder" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.swaig.ParameterSchema.Builder" + parent: "com.signalwire.sdk.swaig.ParameterSchema" + module: "com.signalwire.sdk.swaig" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java" + visibility: "public" +--- +# `Builder` + +Fluent builder accumulating properties and required names, then emitting +the JSON-Schema `parameters` Map via `#build()`. + +**Modifiers:** `static` `final` + +## Signature + +```java +public static final class Builder +``` + +## Methods + +### array + +Add an `array` property whose items are a scalar JSON-Schema +kind (`"string"`, `"number"`, `"integer"`, +`"boolean"`). + +Produces "items":\{"type":itemType\}\}. + +#### Signature + +```java +public Builder array(String name, String itemType, String description) +``` + +#### Parameters + + + property name. + + + + the scalar item kind. + + + + LLM-facing description. + + +#### Returns + +`Builder` — this builder. + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java) + +Line 234. + +*** + +### arrayOfObjects + +Add an `array` property whose items are a nested object schema +built with another `ParameterSchema`. + +Produces +schema>\}\}. + +#### Signature + +```java +public Builder arrayOfObjects( + String name, + Map itemSchema, + String description +) +``` + +#### Parameters + + + property name. + + + + the built schema for each array element (from `Builder#build()`). + + + + LLM-facing description. + + +#### Returns + +`Builder` — this builder. + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java) + +Line 254. + +*** + +### bool + +Add a `boolean` property. + +#### Signature + +```java +public Builder bool(String name, String description) +``` + +#### Parameters + + + property name. + + + + LLM-facing description. + + +#### Returns + +`Builder` — this builder. + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java) + +Line 158. + +*** + +### build + +Build the JSON-Schema `parameters` Map. + +The result is a +`LinkedHashMap` ordered → properties → required +(with `required` omitted when empty) — byte-for-byte identical +to the hand-written nested-map form. Each call returns a fresh, +independent Map; the builder may be reused. + +#### Signature + +```java +public Map build() +``` + +#### Returns + +`Map` — the parameters Map, ready to pass to `ToolDefinition` / `defineTool`. + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java) + +Line 360. + +*** + +### defaultValue + +Set a JSON-Schema `default` on the most-recently-added +property. + +The value is emitted verbatim into the property map. + +#### Signature + +```java +public Builder defaultValue(Object value) +``` + +#### Parameters + + + the default value. + + +#### Returns + +`Builder` — this builder. + +#### Throws + +- `IllegalStateException` — if no property has been added yet. + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java) + +Line 309. + +*** + +### enumOf + +Add a closed-set `string` property whose allowed values come +from a Tier-1 `WireEnum` array — typically `RecordFormat.values()` / `Codec.values()` etc. + +Each constant +contributes its `WireEnum#getValue()` wire string, producing a +JSON-Schema `enum:[...]` of those exact strings (so it is +byte-identical to hand-writing the same string list). + +#### Signature + + + + ```java + public Builder enumOf(String name, WireEnum[] values, String description) + ``` + + + + ```java + public Builder enumOf( + String name, + Collection values, + String description + ) + ``` + + + + ```java + public Builder enumOf(String name, String description, String values) + ``` + + + +#### Parameters (Overload 1) + + + property name. + + + + the enum constants (e.g. `RecordFormat.values()`). + + + + LLM-facing description. + + +#### Parameters (Overload 2) + + + property name. + + + + the allowed values. + + + + LLM-facing description. + + +#### Parameters (Overload 3) + + + property name. + + + + LLM-facing description. + + + + the allowed values. + + +#### Returns (Overload 1) + +`Builder` — this builder. + +#### Returns (Overload 2) + +`Builder` — this builder. + +#### Returns (Overload 3) + +`Builder` — this builder. + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java) + +Line 179. + +*** + +### format + +Set a JSON-Schema `format` on the most-recently-added property. + +#### Signature + +```java +public Builder format(String format) +``` + +#### Parameters + + + the `format` value. + + +#### Returns + +`Builder` — this builder. + +#### Throws + +- `IllegalStateException` — if no property has been added yet. + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java) + +Line 321. + +*** + +### integer + +Add an `integer` property. + +#### Signature + +```java +public Builder integer(String name, String description) +``` + +#### Parameters + + + property name. + + + + LLM-facing description. + + +#### Returns + +`Builder` — this builder. + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java) + +Line 147. + +*** + +### number + +Add a `number` (floating-point) property. + +#### Signature + +```java +public Builder number(String name, String description) +``` + +#### Parameters + + + property name. + + + + LLM-facing description. + + +#### Returns + +`Builder` — this builder. + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java) + +Line 136. + +*** + +### object + +Add a nested `object` property whose schema is built with +another `ParameterSchema`. + +The nested schema's `type`, +`properties` (and `required`, if any) are merged in +alongside this property's `description`, producing +`{"type":"object","description":…,"properties":{…`\}\}. + +**Decorators:** `@SuppressWarnings` + +#### Signature + +```java +public Builder object( + String name, + Map objectSchema, + String description +) +``` + +#### Parameters + + + property name. + + + + the built nested schema (from `Builder#build()`). + + + + LLM-facing description. + + +#### Returns + +`Builder` — this builder. + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java) + +Line 277. + +*** + +### required + +Mark one or more properties as required. + +Names are kept in +declaration order and de-duplicated; calling this multiple times +accumulates. If no name is ever marked required, the built schema +omits the `required` key entirely. + +#### Signature + +```java +public Builder required(String names) +``` + +#### Parameters + + + property names to require. + + +#### Returns + +`Builder` — this builder. + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java) + +Line 339. + +*** + +### string + +Add a `string` property. + +#### Signature + + + + ```java + public Builder string(String name, String description) + ``` + + + + ```java + public Builder string(String name, String description, String format) + ``` + + + +#### Parameters (Overload 1) + + + property name (the JSON object key). + + + + LLM-facing description of the argument. + + +#### Parameters (Overload 2) + + + property name. + + + + LLM-facing description. + + + + the JSON-Schema `format` value. + + +#### Returns (Overload 1) + +`Builder` — this builder. + +#### Returns (Overload 2) + +`Builder` — this builder. + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java) + +Line 107. + +## Source + +[`src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java) + +Line 86. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/swaig/swaig/parameter-schema/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/swaig/swaig/parameter-schema/index.mdx new file mode 100644 index 0000000000..f6515fbb8d --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/swaig/swaig/parameter-schema/index.mdx @@ -0,0 +1,113 @@ +--- +slug: "/reference/java/com/signalwire/sdk/swaig/swaig/parameter-schema" +title: "ParameterSchema" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.swaig.ParameterSchema" + parent: "com.signalwire.sdk.swaig" + module: "com.signalwire.sdk.swaig" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java" + visibility: "public" +--- +# `ParameterSchema` + +Typed, fluent builder for the JSON-Schema `parameters` blob that a +`ToolDefinition` (and `com.signalwire.sdk.agent.AgentBase#defineTool`) takes. + +<p>Today the `parameters` argument is a hand-written, untyped +`Map<String,Object>` of nested maps — the JSON Schema spelled out by +hand: + +<pre>Object> params = new LinkedHashMap<>(); +params.put("type", "object"); +params.put("properties", Map.of( + "service", Map.of("type", "string", "description", "The service"), + "date", Map.of("type", "string", "description", "YYYY-MM-DD"))); +params.put("required", List.of("service", "date"));</pre> + +<p>That is easy to typo (a wrong `"type"` value, a misspelled key, a +required name that doesn't match a property) and only fails at runtime on the +server. + +This builder constructs the <strong>exact same wire shape</strong> +type-safely: + +<pre>Object> params = ParameterSchema.builder() + .string("service", "The service") + .string("date", "YYYY-MM-DD") + .enumOf("fmt", RecordFormat.values(), "format") // Tier-1 enum → enum:[mp3,wav,mp4] + .required("service", "date") + .build(); + +agent.defineTool(new ToolDefinition("book", "Book a service", params, handler));</pre> + +<p><strong>This is a typed convenience over the SAME output, not a new +format.</strong> `#build()` returns a plain `Map<String,Object>` +that is byte-for-byte identical to the hand-written form above and is used +exactly the same way as the `parameters` argument — the untyped Map +path keeps working unchanged. The builder is purely additive. + +<p>Supported property kinds: `string`, `number`, `integer`, +`boolean`, `enum` (a closed set — either the Tier-1 +`WireEnum` enums via WireEnum[], String), +each contributing its `WireEnum#getValue()`, or a bare string set), +`array` (of a kind), and `object` (a nested schema built with +another `ParameterSchema`). Every property carries a `description` +and may also set `default`, `format`, or `enum`. + +<p>Insertion order is preserved: `properties` keeps the order the +properties were declared, each property map orders its keys +→ description → enum → default → format → items → properties, +and `required` keeps declaration order (de-duplicated). The +`required` key is omitted entirely when no property is marked required, +matching the hand-written convention of not emitting an empty list. + +**Modifiers:** `final` + +## Signature + +```java +public final class ParameterSchema +``` + +## Classes + + + + Fluent builder accumulating properties and required names, then emitting the JSON-Schema `parameters` Map via `#build()`. + + + +## Methods + +### builder + +Start a new schema builder. + +**Modifiers:** `static` + +#### Signature + +```java +public static Builder builder() +``` + +#### Returns + +`Builder` — a fresh `Builder`. + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java) + +Line 78. + +## Source + +[`src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java) + +Line 67. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/swaig/swaig/tool-definition/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/swaig/swaig/tool-definition/index.mdx new file mode 100644 index 0000000000..2f547665ad --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/swaig/swaig/tool-definition/index.mdx @@ -0,0 +1,282 @@ +--- +slug: "/reference/java/com/signalwire/sdk/swaig/swaig/tool-definition" +title: "ToolDefinition" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.swaig.ToolDefinition" + parent: "com.signalwire.sdk.swaig" + module: "com.signalwire.sdk.swaig" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java" + visibility: "public" +--- +# `ToolDefinition` + +Defines a SWAIG tool with its name, description, parameters, and handler. + +## Signature + +```java +public class ToolDefinition +``` + +## Methods + +### \ + +#### Signature + +```java +public ( + String name, + String description, + Map parameters, + ToolHandler handler +) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java) + +Line 16. + +*** + +### getDescription + +#### Signature + +```java +public String getDescription() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java) + +Line 24. + +*** + +### getExtraFields + +#### Signature + +```java +public Map getExtraFields() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java) + +Line 39. + +*** + +### getHandler + +#### Signature + +```java +public ToolHandler getHandler() +``` + +#### Returns + +`ToolHandler` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java) + +Line 26. + +*** + +### getName + +#### Signature + +```java +public String getName() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java) + +Line 23. + +*** + +### getParameters + +#### Signature + +```java +public Map getParameters() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java) + +Line 25. + +*** + +### hasHandler + +Check if this tool has a handler (as opposed to DataMap tools which don't). + +#### Signature + +```java +public boolean hasHandler() +``` + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java) + +Line 68. + +*** + +### isSecure + +#### Signature + +```java +public boolean isSecure() +``` + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java) + +Line 27. + +*** + +### setExtraFields + +#### Signature + +```java +public ToolDefinition setExtraFields(Map extraFields) +``` + +#### Parameters + + + +#### Returns + +`ToolDefinition` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java) + +Line 34. + +*** + +### setSecure + +#### Signature + +```java +public ToolDefinition setSecure(boolean secure) +``` + +#### Parameters + + + +#### Returns + +`ToolDefinition` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java) + +Line 29. + +*** + +### toSwaigFunction + +Serialize to SWAIG function format for SWML. + +#### Signature + +```java +public Map toSwaigFunction( + String webhookUrl, + String metaDataToken +) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java) + +Line 46. + +## Source + +[`src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java) + +Line 8. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/swml/swml/document/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/swml/swml/document/index.mdx new file mode 100644 index 0000000000..725a6faa74 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/swml/swml/document/index.mdx @@ -0,0 +1,290 @@ +--- +slug: "/reference/java/com/signalwire/sdk/swml/swml/document" +title: "Document" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.swml.Document" + parent: "com.signalwire.sdk.swml" + module: "com.signalwire.sdk.swml" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Document.java" + visibility: "public" +--- +# `Document` + +SWML Document model. + +<p> +A document has a version, sections (each a list of verbs), and a top-level +verbs list that maps to the "main" section. + +## Signature + +```java +public class Document +``` + +## Methods + +### \ + +#### Signature + +```java +public () +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Document.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Document.java) + +Line 27. + +*** + +### addSection + +Add a named section. + +If the section already exists, returns the existing list. + +#### Signature + +```java +public List> addSection(String name) +``` + +#### Parameters + + + +#### Returns + +`List>` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Document.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Document.java) + +Line 45. + +*** + +### addVerb + +Add a verb to the main section. + +#### Signature + +```java +public void addVerb(String verbName, Object verbData) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Document.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Document.java) + +Line 59. + +*** + +### addVerbToSection + +Add a verb to a named section. + +#### Signature + +```java +public void addVerbToSection( + String sectionName, + String verbName, + Object verbData +) +``` + +#### Parameters + + + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Document.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Document.java) + +Line 68. + +*** + +### getSectionVerbs + +Get verbs for a named section. + +#### Signature + +```java +public List> getSectionVerbs(String name) +``` + +#### Parameters + + + +#### Returns + +`List>` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Document.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Document.java) + +Line 85. + +*** + +### getVerbs + +Get the main verbs list. + +#### Signature + +```java +public List> getVerbs() +``` + +#### Returns + +`List>` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Document.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Document.java) + +Line 78. + +*** + +### hasSection + +Check whether a section exists. + +#### Signature + +```java +public boolean hasSection(String name) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Document.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Document.java) + +Line 52. + +*** + +### render + +Render as compact JSON. + +#### Signature + +```java +public String render() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Document.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Document.java) + +Line 102. + +*** + +### renderPretty + +Render as pretty-printed JSON. + +#### Signature + +```java +public String renderPretty() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Document.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Document.java) + +Line 109. + +*** + +### reset + +Reset document to empty state. + +#### Signature + +```java +public void reset() +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Document.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Document.java) + +Line 36. + +*** + +### toMap + +Convert to a Map suitable for JSON serialization. + +#### Signature + +```java +public Map toMap() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Document.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Document.java) + +Line 92. + +## Source + +[`src/main/java/com/signalwire/sdk/swml/Document.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Document.java) + +Line 20. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/swml/swml/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/swml/swml/index.mdx new file mode 100644 index 0000000000..a18f7cec0b --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/swml/swml/index.mdx @@ -0,0 +1,696 @@ +--- +slug: "/reference/java/com/signalwire/sdk/swml/swml" +title: "swml" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "com.signalwire.sdk.swml" + module: "com.signalwire.sdk.swml" +--- +# `swml` + +## Signature + +```java +package com.signalwire.sdk.swml +``` + +## Classes + + + + SWML Document model. <p> A document has a version, sections (each a list of verbs), and a top-level verbs list that maps to the "main" section. + + + + Singleton that loads schema.json from resources and extracts the 38 SWML verb definitions. <p> The extraction algorithm: <ol> <li>Parse schema.json</li> <li>For each entry in $defs.SWMLMethod.anyOf, get the $ref</li> <li>Look up the definition in $defs</li> <li>The actual verb name is the first key in properties</li> </ol> + + + + SchemaUtils — Java port of `signalwire.utils.schema_utils.SchemaUtils`. <p>Loads the SWML JSON Schema, extracts verb metadata, and validates either a single verb config or a complete SWML document.</p> <p>Construction rules mirror Python:</p> <ul> <li>Pass `schemaPath=null` to use the embedded `schema.json`.</li> <li>`schemaValidation=false` disables validation (returns valid=true for every `validateVerb` call).</li> <li>The env var `SWML_SKIP_SCHEMA_VALIDATION=1/true/yes` also disables validation regardless of the constructor argument.</li> </ul> <p>The Java port currently ships only the lightweight validator (verb existence + required-property check). + + + + SchemaValidationError — Java port of `signalwire.utils.schema_utils.SchemaValidationError`. <p>Raised when SWML schema validation of a verb config fails.</p> + + + + Base SWML service with an embedded HTTP server, basic auth, security headers, and explicit methods for all 38 schema-driven verbs. <p> Uses JDK built-in com.sun.net.httpserver.HttpServer with virtual threads. + + + +## Interfaces + +### WireEnum + +Marker for the typed, compile-time-checked closed-set enums whose constants +carry a canonical <em>wire string</em> (`RecordFormat`, `RecordDirection`, +`TapDirection`, `Codec`). + +<p>Every such enum already exposes `#getValue()` returning the exact +string the SignalWire platform expects on the wire (e.g. + +`"mp3"`, +`"listen"`, `"PCMU"`). This interface simply names that shared +shape so a single API can accept any of them generically — most importantly +WireEnum\[], String), +which turns `RecordFormat.values()` into a JSON-schema `enum:[...]` +of wire strings without per-enum overloads. + +<p>Because Java arrays are covariant, `RecordFormat.values()` (typed +`RecordFormat[]`) is directly usable wherever a `WireEnum[]` is +expected. The interface adds <strong>no</strong> new method to the enums — +`getValue()` already existed — so it is purely a unifying type, and +routing a value through it is byte-for-byte identical to passing its +`getValue()` string. + +<p>This is the SWAIG/SWML "has a canonical wire value" set only. It is +deliberately NOT implemented by RELAY device codecs or other open-ended +string fields — see the per-enum Javadoc for the 3-vocabulary trap. + +#### Signature + +```java +public interface WireEnum +``` + +#### Methods + +##### getValue + +The canonical wire string for this constant — the exact value the +SignalWire platform expects (e.g. + +`"mp3"` / `"listen"` / +`"PCMU"`). Equivalent to PHP's backed-enum `->value`. + +###### Signature + +```java +String getValue() +``` + +###### Returns + +`String` — the wire string as it appears on the wire. + +###### Source + +[`src/main/java/com/signalwire/sdk/swml/WireEnum.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/WireEnum.java) + +Line 36. + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/WireEnum.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/WireEnum.java) + +Line 27. + +## Enums + +### Codec + +Media codec for the SWML `tap` verb, as a typed, compile-time-checked +closed set. + +<p>The Python reference `FunctionResult.tap` validates `codec` +against "PCMA"] and raises `ValueError` on anything +else. + +The methods that take a tap codec +(String, String, Codec)) +accept this enum <em>or</em> a plain `String`. The enum gives editor +autocompletion and makes a typo fail at compile time (a bare string like +`"PCMX"` only fails at runtime, on the server). Strings keep parity +with the Python reference (which uses a bare `str`): + +<pre>"t1", "both", Codec.PCMA); // typed, autocompleted +result.tap("wss://x", "t1", "both", "PCMA"); // string still works (parity)</pre> + +<p><strong>This is the SWAIG `tap` codec set only — do NOT reuse it for +RELAY `stream`/`connect`.</strong> RELAY device codecs are a much +larger superset (e.g. `PCMU,PCMA,OPUS,G729,G722,VP8,H264`, comma-joined); +the 2-value SWAIG tap codec set is deliberately distinct and never shared. + +<p>The wire strings are upper-case (`"PCMU"` / `"PCMA"`), matching +the reference's literal list exactly. Each constant's value +is the canonical wire string, so routing a tap through the enum is +byte-for-byte identical to passing that string. + +#### Signature + +```java +public enum Codec +``` + +#### Variants + + + + + +#### Methods + +##### fromWire + +Parse a wire string into a `Codec`, or return `null` if it is +not a recognised codec. + +Matching is exact (case-sensitive), mirroring the +reference's literal \["PCMU", "PCMA"] check (so `"pcmu"` +returns `null`). The Java analog of Rust's `from_str`. + +**Modifiers:** `static` + +###### Signature + +```java +public static Codec fromWire(String wire) +``` + +###### Parameters + + + the candidate wire string (case-sensitive). + + +###### Returns + +`Codec` — the matching constant, or `null` if none matches. + +###### Source + +[`src/main/java/com/signalwire/sdk/swml/Codec.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Codec.java) + +Line 61. + +*** + +##### getValue + +The canonical (upper-case) wire string for this codec (`"PCMU"` / +`"PCMA"`). + +Equivalent to PHP's backed-enum `->value`. + +###### Signature + +```java +public String getValue() +``` + +###### Returns + +`String` — the upper-case codec name as it appears on the wire. + +###### Source + +[`src/main/java/com/signalwire/sdk/swml/Codec.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Codec.java) + +Line 48. + +*** + +##### valueOf + +**Modifiers:** `static` + +###### Signature + +```java +public static Codec valueOf(String name) +``` + +###### Parameters + + + +###### Returns + +`Codec` + +###### Source + +[`src/main/java/com/signalwire/sdk/swml/Codec.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Codec.java) + +*** + +##### values + +**Modifiers:** `static` + +###### Signature + +```java +public static Codec[] values() +``` + +###### Returns + +`Codec[]` + +###### Source + +[`src/main/java/com/signalwire/sdk/swml/Codec.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Codec.java) + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Codec.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Codec.java) + +Line 31. + +*** + +### RecordDirection + +Audio direction for the SWML `record_call` verb, as a typed, +compile-time-checked closed set. + +<p>The Python reference `FunctionResult.record_call` validates +`direction` against "listen", "both"] and raises +`ValueError` on anything else. + +The methods that take a record +direction +(boolean, String, RecordDirection)) +accept this enum <em>or</em> a plain `String`. The enum gives editor +autocompletion and makes a typo fail at compile time (a bare string like +`"listenn"` only fails at runtime, on the server). Strings keep parity +with the Python reference (which uses a bare `str`): + +<pre>true, "mp3", RecordDirection.LISTEN); // typed, autocompleted +result.recordCall("rec1", true, "mp3", "listen"); // string still works (parity)</pre> + +<p><strong>This is a DIFFERENT set from `TapDirection`.</strong> +`record_call` uses `listen` where `tap` uses `hear`, +mirroring the reference's two separate validation lists — the two sets are +modelled as two distinct enums and are never shared (see the 3-vocabulary +trap: SWML `record_call` `{speak,listen,both`} vs SWML +`tap` `{speak,hear,both`} vs RELAY `{listen,speak,both`}). + +<p>Each constant's value is the canonical wire string, so +routing a recording through the enum is byte-for-byte identical to passing +that string. + +#### Signature + +```java +public enum RecordDirection +``` + +#### Variants + + + + + + + +#### Methods + +##### fromWire + +Parse a wire string into a `RecordDirection`, or return +`null` if it is not a recognised direction (the same strings the +Python reference would reject with `ValueError`). + +Note `"hear"` +is valid for `TapDirection` but NOT for `record_call`, so it +returns `null` here. The Java analog of Rust's `from_str`. + +**Modifiers:** `static` + +###### Signature + +```java +public static RecordDirection fromWire(String wire) +``` + +###### Parameters + + + the candidate wire string (case-sensitive). + + +###### Returns + +`RecordDirection` — the matching constant, or `null` if none matches. + +###### Source + +[`src/main/java/com/signalwire/sdk/swml/RecordDirection.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/RecordDirection.java) + +Line 66. + +*** + +##### getValue + +The canonical wire string for this direction (`"speak"` / +`"listen"` / `"both"`). + +Equivalent to PHP's backed-enum +`->value`. + +###### Signature + +```java +public String getValue() +``` + +###### Returns + +`String` — the lower-case direction name as it appears on the wire. + +###### Source + +[`src/main/java/com/signalwire/sdk/swml/RecordDirection.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/RecordDirection.java) + +Line 52. + +*** + +##### valueOf + +**Modifiers:** `static` + +###### Signature + +```java +public static RecordDirection valueOf(String name) +``` + +###### Parameters + + + +###### Returns + +`RecordDirection` + +###### Source + +[`src/main/java/com/signalwire/sdk/swml/RecordDirection.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/RecordDirection.java) + +*** + +##### values + +**Modifiers:** `static` + +###### Signature + +```java +public static RecordDirection[] values() +``` + +###### Returns + +`RecordDirection[]` + +###### Source + +[`src/main/java/com/signalwire/sdk/swml/RecordDirection.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/RecordDirection.java) + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/RecordDirection.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/RecordDirection.java) + +Line 33. + +*** + +### RecordFormat + +Audio container format for call recording, as a typed, compile-time-checked +closed set. + +<p>The SWML `record_call` verb (and the SignalWire calling REST API) +accept a fixed set of recording formats — `mp3`, `wav`, and +`mp4`. + +The methods that take a format +(boolean, RecordFormat, String) +and the `recordFormat(RecordFormat)` builder setter) accept this enum <em>or</em> a plain `String`. The enum gives editor autocompletion and +makes a typo fail at compile time (a bare string like `"mp33"` only +fails at runtime, on the server). Strings keep parity with the Python +reference (which uses a bare `str`): + +<pre>true, RecordFormat.MP3, "both"); // typed, autocompleted +result.recordCall(null, true, "mp3", "both"); // string still works (parity) +AgentBase.builder().recordFormat(RecordFormat.WAV); // typed builder +AgentBase.builder().recordFormat("wav"); // string still works (parity)</pre> + +<p>Each constant's value is the canonical wire string, so +routing a recording through the enum is byte-for-byte identical to passing +that string. + +#### Signature + +```java +public enum RecordFormat +``` + +#### Variants + + + + + + + +#### Methods + +##### getValue + +The canonical wire string for this format (`"mp3"` / `"wav"` / +`"mp4"`). + +Equivalent to PHP's backed-enum `->value`. + +###### Signature + +```java +public String getValue() +``` + +###### Returns + +`String` — the lower-case format name as it appears on the wire. + +###### Source + +[`src/main/java/com/signalwire/sdk/swml/RecordFormat.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/RecordFormat.java) + +Line 46. + +*** + +##### valueOf + +**Modifiers:** `static` + +###### Signature + +```java +public static RecordFormat valueOf(String name) +``` + +###### Parameters + + + +###### Returns + +`RecordFormat` + +###### Source + +[`src/main/java/com/signalwire/sdk/swml/RecordFormat.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/RecordFormat.java) + +*** + +##### values + +**Modifiers:** `static` + +###### Signature + +```java +public static RecordFormat[] values() +``` + +###### Returns + +`RecordFormat[]` + +###### Source + +[`src/main/java/com/signalwire/sdk/swml/RecordFormat.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/RecordFormat.java) + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/RecordFormat.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/RecordFormat.java) + +Line 28. + +*** + +### TapDirection + +Audio direction for the SWML `tap` verb, as a typed, +compile-time-checked closed set. + +<p>The Python reference `FunctionResult.tap` validates `direction` +against "hear", "both"] and raises `ValueError` on +anything else. + +The methods that take a tap direction +(String, TapDirection, String)) +accept this enum <em>or</em> a plain `String`. The enum gives editor +autocompletion and makes a typo fail at compile time (a bare string like +`"haer"` only fails at runtime, on the server). Strings keep parity +with the Python reference (which uses a bare `str`): + +<pre>"t1", TapDirection.HEAR, "PCMU"); // typed, autocompleted +result.tap("wss://x", "t1", "hear", "PCMU"); // string still works (parity)</pre> + +<p><strong>This is a DIFFERENT set from `RecordDirection`.</strong> +`tap` uses `hear` where `record_call` uses `listen`, +mirroring the reference's two separate validation lists — the two sets are +modelled as two distinct enums and are never shared (see the 3-vocabulary +trap: SWML `record_call` `{speak,listen,both`} vs SWML +`tap` `{speak,hear,both`} vs RELAY `{listen,speak,both`}). + +<p>Each constant's value is the canonical wire string, so +routing a tap through the enum is byte-for-byte identical to passing that +string. + +#### Signature + +```java +public enum TapDirection +``` + +#### Variants + + + + + + + +#### Methods + +##### fromWire + +Parse a wire string into a `TapDirection`, or return `null` +if it is not a recognised direction (the same strings the Python +reference would reject with `ValueError`). + +Note `"listen"` is +valid for `RecordDirection` but NOT for `tap`, so it returns +`null` here. The Java analog of Rust's `from_str`. + +**Modifiers:** `static` + +###### Signature + +```java +public static TapDirection fromWire(String wire) +``` + +###### Parameters + + + the candidate wire string (case-sensitive). + + +###### Returns + +`TapDirection` — the matching constant, or `null` if none matches. + +###### Source + +[`src/main/java/com/signalwire/sdk/swml/TapDirection.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/TapDirection.java) + +Line 65. + +*** + +##### getValue + +The canonical wire string for this direction (`"speak"` / +`"hear"` / `"both"`). + +Equivalent to PHP's backed-enum +`->value`. + +###### Signature + +```java +public String getValue() +``` + +###### Returns + +`String` — the lower-case direction name as it appears on the wire. + +###### Source + +[`src/main/java/com/signalwire/sdk/swml/TapDirection.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/TapDirection.java) + +Line 51. + +*** + +##### valueOf + +**Modifiers:** `static` + +###### Signature + +```java +public static TapDirection valueOf(String name) +``` + +###### Parameters + + + +###### Returns + +`TapDirection` + +###### Source + +[`src/main/java/com/signalwire/sdk/swml/TapDirection.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/TapDirection.java) + +*** + +##### values + +**Modifiers:** `static` + +###### Signature + +```java +public static TapDirection[] values() +``` + +###### Returns + +`TapDirection[]` + +###### Source + +[`src/main/java/com/signalwire/sdk/swml/TapDirection.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/TapDirection.java) + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/TapDirection.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/TapDirection.java) + +Line 32. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/swml/swml/schema-utils/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/swml/swml/schema-utils/index.mdx new file mode 100644 index 0000000000..4433fa33cd --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/swml/swml/schema-utils/index.mdx @@ -0,0 +1,357 @@ +--- +slug: "/reference/java/com/signalwire/sdk/swml/swml/schema-utils" +title: "SchemaUtils" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.swml.SchemaUtils" + parent: "com.signalwire.sdk.swml" + module: "com.signalwire.sdk.swml" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/SchemaUtils.java" + visibility: "public" +--- +# `SchemaUtils` + +SchemaUtils — Java port of `signalwire.utils.schema_utils.SchemaUtils`. + +<p>Loads the SWML JSON Schema, extracts verb metadata, and validates either a +single verb config or a complete SWML document.</p> + +<p>Construction rules mirror Python:</p> +<ul> + <li>Pass `schemaPath=null` to use the embedded `schema.json`.</li> + <li>`schemaValidation=false` disables validation (returns valid=true + for every `validateVerb` call).</li> + <li>The env var `SWML_SKIP_SCHEMA_VALIDATION=1/true/yes` also disables + validation regardless of the constructor argument.</li> +</ul> + +<p>The Java port currently ships only the lightweight validator (verb existence ++ required-property check). + +Full JSON Schema validation can be wired in by +extending `#initFullValidator()`. The lightweight contract matches +Python's `_validate_verb_lightweight()` exactly.</p> + +## Signature + +```java +public class SchemaUtils +``` + +## Classes + + + + A verb extracted from the schema. + + + +## Methods + +### \ + +Construct a SchemaUtils. +Mirrors Python's schema\_validation=True). + +#### Signature + +```java +public (String schemaPath, boolean schemaValidation) +``` + +#### Parameters + + + optional path to a schema.json file; pass null to use the embedded resource bundled with the SDK jar. + + + + enables/disables schema validation. Honors `SWML_SKIP_SCHEMA_VALIDATION=1` env override. + + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/SchemaUtils.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/SchemaUtils.java) + +Line 83. + +*** + +### generateMethodBody + +Generate a Python-style method body string for a verb. +Mirrors Python's `generate_method_body(verb_name)`. + +#### Signature + +```java +public String generateMethodBody(String verbName) +``` + +#### Parameters + + + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/SchemaUtils.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/SchemaUtils.java) + +Line 329. + +*** + +### generateMethodSignature + +Generate a Python-style method signature string for a verb. +Mirrors Python's `generate_method_signature(verb_name)`. + +#### Signature + +```java +public String generateMethodSignature(String verbName) +``` + +#### Parameters + + + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/SchemaUtils.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/SchemaUtils.java) + +Line 292. + +*** + +### getAllVerbNames + +Sorted list of all known verb names. +Mirrors Python's `get_all_verb_names()`. + +#### Signature + +```java +public List getAllVerbNames() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/SchemaUtils.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/SchemaUtils.java) + +Line 178. + +*** + +### getVerbParameters + +Parameter-definition block used by code-gen tooling. +Mirrors Python's `get_verb_parameters(verb_name)`. + +#### Signature + +```java +public Map getVerbParameters(String verbName) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/SchemaUtils.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/SchemaUtils.java) + +Line 226. + +*** + +### getVerbProperties + +The `properties[verb_name]` block for a verb, or an empty map when +the verb is unknown. +Mirrors Python's `get_verb_properties(verb_name)`. + +#### Signature + +```java +public Map getVerbProperties(String verbName) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/SchemaUtils.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/SchemaUtils.java) + +Line 187. + +*** + +### getVerbRequiredProperties + +The `required` list for a verb, or an empty list when the verb is +unknown or has no required properties. +Mirrors Python's `get_verb_required_properties(verb_name)`. + +#### Signature + +```java +public List getVerbRequiredProperties(String verbName) +``` + +#### Parameters + + + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/SchemaUtils.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/SchemaUtils.java) + +Line 202. + +*** + +### isFullValidationAvailable + +Whether full JSON Schema validation is wired up. +Mirrors Python's `full_validation_available` property. + +#### Signature + +```java +public boolean isFullValidationAvailable() +``` + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/SchemaUtils.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/SchemaUtils.java) + +Line 170. + +*** + +### loadSchema + +Read and parse the JSON Schema. +Mirrors Python's `load_schema()`. + +#### Signature + +```java +public JsonObject loadSchema() +``` + +#### Returns + +`JsonObject` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/SchemaUtils.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/SchemaUtils.java) + +Line 105. + +*** + +### validateDocument + +Validate a complete SWML document. +Mirrors Python's `validate_document(document)`. + +Returns +\["Schema validator not initialized"]) when no full +validator is wired in — same contract as Python. + +#### Signature + +```java +public Map.Entry> validateDocument( + Map document +) +``` + +#### Parameters + + + +#### Returns + +`Map.Entry>` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/SchemaUtils.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/SchemaUtils.java) + +Line 279. + +*** + +### validateVerb + +Validate a verb config against the schema. +Mirrors Python's verb\_config). + +#### Signature + +```java +public Map.Entry> validateVerb( + String verbName, + Map verbConfig +) +``` + +#### Parameters + + + + + +#### Returns + +`Map.Entry>` — (`valid`, `errors`) entry; mirrors Python's List\[str]] return. + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/SchemaUtils.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/SchemaUtils.java) + +Line 244. + +## Source + +[`src/main/java/com/signalwire/sdk/swml/SchemaUtils.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/SchemaUtils.java) + +Line 51. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/swml/swml/schema-utils/verb-info/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/swml/swml/schema-utils/verb-info/index.mdx new file mode 100644 index 0000000000..5e0e141740 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/swml/swml/schema-utils/verb-info/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/java/com/signalwire/sdk/swml/swml/schema-utils/verb-info" +title: "VerbInfo" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.swml.SchemaUtils.VerbInfo" + parent: "com.signalwire.sdk.swml.SchemaUtils" + module: "com.signalwire.sdk.swml" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/SchemaUtils.java" + visibility: "public" +--- +# `VerbInfo` + +A verb extracted from the schema. + +**Modifiers:** `static` `final` + +## Signature + +```java +public static final class VerbInfo +``` + +## Properties + + + + + + + +## Source + +[`src/main/java/com/signalwire/sdk/swml/SchemaUtils.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/SchemaUtils.java) + +Line 62. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/swml/swml/schema-validation-error/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/swml/swml/schema-validation-error/index.mdx new file mode 100644 index 0000000000..974ba9a2d6 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/swml/swml/schema-validation-error/index.mdx @@ -0,0 +1,108 @@ +--- +slug: "/reference/java/com/signalwire/sdk/swml/swml/schema-validation-error" +title: "SchemaValidationError" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.swml.SchemaValidationError" + parent: "com.signalwire.sdk.swml" + module: "com.signalwire.sdk.swml" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/SchemaValidationError.java" + visibility: "public" +--- +# `SchemaValidationError` + +SchemaValidationError — Java port of +`signalwire.utils.schema_utils.SchemaValidationError`. + +<p>Raised when SWML schema validation of a verb config fails.</p> + +## Signature + +```java +public class SchemaValidationError extends RuntimeException +``` + +## Inheritance + +**Extends:** `RuntimeException` + +## Methods + +### \ + +Construct a SchemaValidationError. + +Mirrors Python's +errors) signature. + +#### Signature + +```java +public (String verbName, List errors) +``` + +#### Parameters + + + the verb whose validation failed + + + + the list of human-readable error messages + + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/SchemaValidationError.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/SchemaValidationError.java) + +Line 32. + +*** + +### getErrors + +#### Signature + +```java +public List getErrors() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/SchemaValidationError.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/SchemaValidationError.java) + +Line 44. + +*** + +### getVerbName + +#### Signature + +```java +public String getVerbName() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/SchemaValidationError.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/SchemaValidationError.java) + +Line 40. + +## Source + +[`src/main/java/com/signalwire/sdk/swml/SchemaValidationError.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/SchemaValidationError.java) + +Line 18. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/swml/swml/schema/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/swml/swml/schema/index.mdx new file mode 100644 index 0000000000..ba8ff6955d --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/swml/swml/schema/index.mdx @@ -0,0 +1,159 @@ +--- +slug: "/reference/java/com/signalwire/sdk/swml/swml/schema" +title: "Schema" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.swml.Schema" + parent: "com.signalwire.sdk.swml" + module: "com.signalwire.sdk.swml" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Schema.java" + visibility: "public" +--- +# `Schema` + +Singleton that loads schema.json from resources and extracts the 38 SWML verb definitions. + +<p> +The extraction algorithm: +<ol> + <li>Parse schema.json</li> + <li>For each entry in $defs.SWMLMethod.anyOf, get the $ref</li> + <li>Look up the definition in $defs</li> + <li>The actual verb name is the first key in properties</li> +</ol> + +**Modifiers:** `final` + +## Signature + +```java +public final class Schema +``` + +## Methods + +### getInstance + +**Modifiers:** `static` + +#### Signature + +```java +public static Schema getInstance() +``` + +#### Returns + +`Schema` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Schema.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Schema.java) + +Line 44. + +*** + +### getVerb + +Get the full definition for a verb. + +#### Signature + +```java +public JsonObject getVerb(String name) +``` + +#### Parameters + + + +#### Returns + +`JsonObject` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Schema.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Schema.java) + +Line 125. + +*** + +### getVerbNames + +Get all verb names. + +#### Signature + +```java +public Set getVerbNames() +``` + +#### Returns + +`Set` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Schema.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Schema.java) + +Line 118. + +*** + +### isValidVerb + +Check if a verb name is valid. + +#### Signature + +```java +public boolean isValidVerb(String name) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Schema.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Schema.java) + +Line 111. + +*** + +### verbCount + +Get the number of loaded verb definitions. + +#### Signature + +```java +public int verbCount() +``` + +#### Returns + +`int` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Schema.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Schema.java) + +Line 132. + +## Source + +[`src/main/java/com/signalwire/sdk/swml/Schema.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Schema.java) + +Line 30. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/swml/swml/service/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/swml/swml/service/index.mdx new file mode 100644 index 0000000000..fa20e6213b --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/swml/swml/service/index.mdx @@ -0,0 +1,2073 @@ +--- +slug: "/reference/java/com/signalwire/sdk/swml/swml/service" +title: "Service" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.swml.Service" + parent: "com.signalwire.sdk.swml" + module: "com.signalwire.sdk.swml" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java" + visibility: "public" +--- +# `Service` + +Base SWML service with an embedded HTTP server, basic auth, security headers, +and explicit methods for all 38 schema-driven verbs. + +<p> +Uses JDK built-in com.sun.net.httpserver.HttpServer with virtual threads. + +## Signature + +```java +public class Service implements AutoCloseable +``` + +## Inheritance + +**Implements:** `AutoCloseable` + +## Properties + + + + + + + + + + + + + + + + + + + + + + + +## Constants + + + HttpExchange attribute key under which the raw POST body is stashed by `#serve()` when reading it up-front for signature validation. Subclasses (notably `com.signalwire.sdk.agent.AgentBase`) check this attribute in `renderMainSwml` so they can re-use the cached body without re-reading the (already-consumed) request stream. + + +## Methods + +### \ + +#### Signature + + + + ```java + public (String name) + ``` + + + + ```java + public (String name, String route) + ``` + + + + ```java + public ( + String name, + String route, + String host, + int port, + String authUser, + String authPassword + ) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Parameters (Overload 3) + + + + + + + + + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 74. + +*** + +### addSecurityHeaders + +Add security headers to every authenticated response. + +#### Signature + +```java +protected void addSecurityHeaders(HttpExchange exchange) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 411. + +*** + +### ai + +#### Signature + +```java +public Service ai(Map params) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 445. + +*** + +### amazonBedrock + +#### Signature + +```java +public Service amazonBedrock(Map params) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 450. + +*** + +### answer + +#### Signature + +```java +public Service answer(Map params) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 440. + +*** + +### close + +`AutoCloseable` entry point so a service — and every subclass, +including `AgentBase` — can be served inside a try-with-resources +block: + +<pre>{@code +try (var agent = MyAgent.builder()...build()) { + agent.run(); + // ... + +`AutoCloseable` entry point so a service — and every subclass, +including `AgentBase` — can be served inside a try-with-resources +block: + +<pre>(var agent = MyAgent.builder()...build()) { + agent.run(); + // ... serve ... // close() runs here: the HTTP listener is shut down +}</pre> + +Delegates to `#stop()`, releasing the bound HTTP(S) listener and +its socket — the rough Java parallel of using a Python SWMLService / +AgentBase under a context manager. Idempotent: harmless if the service +was never served or is already stopped. + +**Decorators:** `@Override` + +#### Signature + +```java +public void close() +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 911. + +*** + +### cond + +#### Signature + +```java +public Service cond(List> conditions) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 455. + +*** + +### connect + +#### Signature + +```java +public Service connect(Map params) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 460. + +*** + +### defineTool + +Define a SWAIG function the AI can call. + +Tool descriptions and +parameter descriptions are LLM-facing prompt engineering — see +PORTING\_GUIDE for guidance on writing them. + +#### Signature + + + + ```java + public Service defineTool( + String name, + String description, + java.util.Map parameters, + com.signalwire.sdk.swaig.ToolHandler handler + ) + ``` + + + + ```java + public Service defineTool(com.signalwire.sdk.swaig.ToolDefinition toolDef) + ``` + + + +#### Parameters (Overload 1) + + + + + + + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`Service` + +#### Returns (Overload 2) + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 219. + +*** + +### defineTools + +Register multiple tool definitions at once. + +#### Signature + +```java +public Service defineTools( + java.util.List toolDefs +) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 239. + +*** + +### denoise + +#### Signature + +```java +public Service denoise(Map params) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 465. + +*** + +### detectMachine + +#### Signature + +```java +public Service detectMachine(Map params) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 470. + +*** + +### enterQueue + +#### Signature + +```java +public Service enterQueue(Map params) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 475. + +*** + +### execute + +#### Signature + +```java +public Service execute(Map params) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 480. + +*** + +### generatePassword + +**Modifiers:** `static` + +#### Signature + +```java +protected static String generatePassword() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 116. + +*** + +### getAllFunctions + +Snapshot of all registered SWAIG functions keyed by name. +(Python parity: `ToolRegistry.get_all_functions`.) + +#### Signature + +```java +public java.util.Map getAllFunctions() +``` + +#### Returns + +`java.util.Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 277. + +*** + +### getAuthPassword + +#### Signature + +```java +public String getAuthPassword() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 129. + +*** + +### getAuthUser + +#### Signature + +```java +public String getAuthUser() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 125. + +*** + +### getBasicAuthCredentials + +Get the configured (user, password) pair as a String\[2] tuple. +(Python parity: `AuthMixin.get_basic_auth_credentials`.) + +#### Signature + +```java +public String[] getBasicAuthCredentials() +``` + +#### Returns + +`String[]` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 148. + +*** + +### getBasicAuthCredentialsWithSource + +Get (user, password, source) where source is "provided", +"environment", or "generated". + +(Python parity: +`AuthMixin.get_basic_auth_credentials(include_source=True)`.) + +#### Signature + +```java +public String[] getBasicAuthCredentialsWithSource() +``` + +#### Returns + +`String[]` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 155. + +*** + +### getDocument + +#### Signature + +```java +public Document getDocument() +``` + +#### Returns + +`Document` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 420. + +*** + +### getFunction + +Get a registered SWAIG function by name, or null when absent. +(Python parity: `ToolRegistry.get_function`.) + +#### Signature + +```java +public com.signalwire.sdk.swaig.ToolDefinition getFunction(String name) +``` + +#### Parameters + + + +#### Returns + +`com.signalwire.sdk.swaig.ToolDefinition` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 271. + +*** + +### getRegisteredSwaigFunctions + +Read-only view of the raw SWAIG function entries registered via +`#registerSwaigFunction(java.util.Map)`. + +These are typically +DataMap or schema-only tools that don't have a Java `com.signalwire.sdk.swaig.ToolHandler`. +Each entry is a defensive copy of the original map; the outer list +is unmodifiable. + +#### Signature + +```java +public java.util.List> getRegisteredSwaigFunctions() +``` + +#### Returns + +`java.util.List>` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 306. + +*** + +### getRegisteredTools + +Public, read-only view of the registered SWAIG tool registry. +Returned in insertion order; the map and its definitions are +unmodifiable. + +Used by introspection callers (CLI `--list-tools` +file-loader path, tests, audit tooling) that need name + description + +parameters without going through `/swaig` HTTP. + +#### Signature + +```java +public java.util.Map getRegisteredTools() +``` + +#### Returns + +`java.util.Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 295. + +*** + +### getSchemaUtils + +SchemaUtils helper bound to this Service. + +Mirrors Python's +`self.schema_utils` public instance attribute on +`SWMLService`. Built lazily on first access. + +#### Signature + +```java +public SchemaUtils getSchemaUtils() +``` + +#### Returns + +`SchemaUtils` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 429. + +*** + +### gotoLabel + +#### Signature + +```java +public Service gotoLabel(Map params) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 485. + +*** + +### hangup + +#### Signature + + + + ```java + public Service hangup(Map params) + ``` + + + + ```java + public Service hangup() + ``` + + + +#### Parameters (Overload 1) + + + +#### Returns (Overload 1) + +`Service` + +#### Returns (Overload 2) + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 490. + +*** + +### hasFunction + +Whether a SWAIG function with the given name is registered. +(Python parity: `ToolRegistry.has_function`.) + +#### Signature + +```java +public boolean hasFunction(String name) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 265. + +*** + +### joinConference + +#### Signature + +```java +public Service joinConference(Map params) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 500. + +*** + +### joinRoom + +#### Signature + +```java +public Service joinRoom(Map params) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 505. + +*** + +### label + +#### Signature + +```java +public Service label(Map params) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 510. + +*** + +### listToolNames + +List registered SWAIG tool names in insertion order. + +#### Signature + +```java +public java.util.List listToolNames() +``` + +#### Returns + +`java.util.List` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 259. + +*** + +### liveTranscribe + +#### Signature + +```java +public Service liveTranscribe(Map params) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 515. + +*** + +### liveTranslate + +#### Signature + +```java +public Service liveTranslate(Map params) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 520. + +*** + +### onFunctionCall + +Dispatch a function call to the registered handler. + +#### Signature + +```java +public com.signalwire.sdk.swaig.FunctionResult onFunctionCall( + String funcName, + java.util.Map args, + java.util.Map rawData +) +``` + +#### Parameters + + + + + + + +#### Returns + +`com.signalwire.sdk.swaig.FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 247. + +*** + +### onRequest + +Customization hook called when SWML is requested. + +Default +delegates to String) and +returns its result. Subclasses typically override +`onSwmlRequest` rather than this method. + +<p>Returning `null` uses the default rendered SWML; +returning a non-null map merges the entries as modifications. + +<p>Python parity: callback_path). The Python third `request` parameter is +FastAPI-specific and intentionally not mirrored. + +#### Signature + +```java +public java.util.Map onRequest( + java.util.Map requestData, + String callbackPath +) +``` + +#### Parameters + + + parsed request body, or `null` + + + + optional callback sub-path, or `null` + + +#### Returns + +`java.util.Map` — modifications map, or `null` for default rendering + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 360. + +*** + +### onSwmlRequest + +Customization point for subclasses to modify SWML based on +request data. + +The default implementation returns `null` +(no modification). Subclasses override to inspect the body or +callback path and return a map of SWML overrides. + +<p>Python parity: callback_path). The Python third `request` parameter is +FastAPI-specific and intentionally not mirrored. + +#### Signature + +```java +public java.util.Map onSwmlRequest( + java.util.Map requestData, + String callbackPath +) +``` + +#### Parameters + + + parsed request body, or `null` + + + + optional callback sub-path, or `null` + + +#### Returns + +`java.util.Map` — modifications map, or `null` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 380. + +*** + +### pay + +#### Signature + +```java +public Service pay(Map params) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 525. + +*** + +### play + +#### Signature + +```java +public Service play(Map params) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 530. + +*** + +### prompt + +#### Signature + +```java +public Service prompt(Map params) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 535. + +*** + +### readBody + +Read request body with size limit. + +#### Signature + +```java +protected String readBody(HttpExchange exchange) +``` + +#### Parameters + + + +#### Returns + +`String` + +#### Throws + +- `IOException` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 643. + +*** + +### receiveFax + +#### Signature + +```java +public Service receiveFax(Map params) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 540. + +*** + +### record + +#### Signature + +```java +public Service record(Map params) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 545. + +*** + +### recordCall + +#### Signature + +```java +public Service recordCall(Map params) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 550. + +*** + +### registerAdditionalRoutes + +Extension point: register additional HTTP routes after Service +mounts /health, /ready, /swaig and the main route. + +AgentBase uses +this to add /post\_prompt and /mcp. + +#### Signature + +```java +protected void registerAdditionalRoutes(HttpServer server) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 340. + +*** + +### registerSwaigFunction + +Register a raw SWAIG function definition (e.g. + +DataMap tools). + +#### Signature + +```java +public Service registerSwaigFunction(java.util.Map swaigFunc) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 233. + +*** + +### removeFunction + +Remove a registered SWAIG function. + +Returns true when removed, +false when the function was not registered. +(Python parity: `ToolRegistry.remove_function`.) + +#### Signature + +```java +public boolean removeFunction(String name) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 284. + +*** + +### renderMainSwml + +Extension point: render the SWML document for the main path or for +GET /swaig. + +Default returns the currently-built Document. AgentBase +overrides to emit prompt + AI verb at request time. + +#### Signature + +```java +protected java.util.Map renderMainSwml(HttpExchange exchange) +``` + +#### Parameters + + + +#### Returns + +`java.util.Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 331. + +*** + +### request + +#### Signature + +```java +public Service request(Map params) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 555. + +*** + +### resolvePort + +**Modifiers:** `static` + +#### Signature + +```java +protected static int resolvePort() +``` + +#### Returns + +`int` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 105. + +*** + +### returnVerb + +#### Signature + +```java +public Service returnVerb(Map params) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 560. + +*** + +### sendDigits + +#### Signature + +```java +public Service sendDigits(Map params) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 570. + +*** + +### sendFax + +#### Signature + +```java +public Service sendFax(Map params) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 575. + +*** + +### sendJson + +Send a JSON response. + +#### Signature + +```java +protected void sendJson(HttpExchange exchange, int status, Object body) +``` + +#### Parameters + + + + + + + +#### Throws + +- `IOException` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 661. + +*** + +### sendPayloadTooLarge + +Send a 413 Payload Too Large response. + +#### Signature + +```java +protected void sendPayloadTooLarge(HttpExchange exchange) +``` + +#### Parameters + + + +#### Throws + +- `IOException` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 683. + +*** + +### sendSms + +#### Signature + +```java +public Service sendSms(Map params) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 580. + +*** + +### sendUnauthorized + +Send a 401 Unauthorized response. + +#### Signature + +```java +protected void sendUnauthorized(HttpExchange exchange) +``` + +#### Parameters + + + +#### Throws + +- `IOException` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 674. + +*** + +### serve + +Start the HTTP server with health, ready, /swaig, and main SWML endpoint. +Subclasses (AgentBase) add additional routes via +`#registerAdditionalRoutes(HttpServer)` and customize SWML +rendering via `#renderMainSwml(HttpExchange)`. + +#### Signature + +```java +public void serve() +``` + +#### Throws + +- `IOException` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 694. + +*** + +### set + +#### Signature + +```java +public Service set(Map params) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 585. + +*** + +### sipRefer + +#### Signature + +```java +public Service sipRefer(Map params) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 565. + +*** + +### sleep + +Sleep takes an integer (milliseconds), not a map. + +#### Signature + +```java +public Service sleep(int milliseconds) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 593. + +*** + +### stop + +Stop the HTTP server. + +#### Signature + +```java +public void stop() +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 887. + +*** + +### stopDenoise + +#### Signature + +```java +public Service stopDenoise(Map params) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 598. + +*** + +### stopRecordCall + +#### Signature + +```java +public Service stopRecordCall(Map params) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 603. + +*** + +### stopTap + +#### Signature + +```java +public Service stopTap(Map params) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 608. + +*** + +### swaigPreDispatch + +Extension point: invoked between argument parsing and function +dispatch. + +Returns a 2-element array: \[target Service, shortCircuit Map]. +If shortCircuit is non-null, it's returned as the SWAIG response +without calling onFunctionCall. AgentBase may override to add +session-token validation or ephemeral dynamic-config copies. + +#### Signature + +```java +protected Object[] swaigPreDispatch( + java.util.Map requestData, + String funcName +) +``` + +#### Parameters + + + + + +#### Returns + +`Object[]` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 321. + +*** + +### switchVerb + +#### Signature + +```java +public Service switchVerb(Map params) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 613. + +*** + +### tap + +#### Signature + +```java +public Service tap(Map params) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 618. + +*** + +### transfer + +#### Signature + +```java +public Service transfer(Map params) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 623. + +*** + +### unset + +#### Signature + +```java +public Service unset(Map params) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 628. + +*** + +### userEvent + +#### Signature + +```java +public Service userEvent(Map params) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 633. + +*** + +### validateAuth + +Timing-safe basic auth validation using MessageDigest.isEqual. + +#### Signature + +```java +protected boolean validateAuth(HttpExchange exchange) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 176. + +*** + +### validateBasicAuth + +Validate provided basic-auth credentials against the configured ones +using a constant-time comparison. + +(Python parity: +`AuthMixin.validate_basic_auth(username, password)`.) + +#### Signature + +```java +public boolean validateBasicAuth(String username, String password) +``` + +#### Parameters + + + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 136. + +*** + +### validateSignedWebhook + +Extension hook invoked between raw-body capture and JSON parsing on +signed POST routes (`/`, `/swaig`, `/post_prompt`). +Subclasses (AgentBase) override to enforce SignalWire webhook signature +validation when a signing key is configured. + +Default returns +`true` (no validation). + +<p>Returning `false` signals "signature invalid"; the caller +sends Forbidden and stops dispatch. Per +porting-sdk/webhooks.md the response body must NOT disclose which +branch failed. + +#### Signature + +```java +protected boolean validateSignedWebhook(HttpExchange exchange, String rawBody) +``` + +#### Parameters + + + the HTTP exchange. + + + + the raw UTF-8 body string already read from the exchange. Pass through to `com.signalwire.sdk.security.WebhookValidator`. + + +#### Returns + +`boolean` — `true` when validation passes (or is disabled); `false` to short-circuit with a 403. + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 404. + +## Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 31. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/tools/tools/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/tools/tools/index.mdx new file mode 100644 index 0000000000..a08ba8f071 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/tools/tools/index.mdx @@ -0,0 +1,19 @@ +--- +slug: "/reference/java/com/signalwire/sdk/tools/tools" +title: "tools" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "com.signalwire.sdk.tools" + module: "com.signalwire.sdk.tools" +--- +# `tools` + +## Signature + +```java +package com.signalwire.sdk.tools +``` diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/utils/utils/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/utils/utils/index.mdx new file mode 100644 index 0000000000..7713de94e8 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/utils/utils/index.mdx @@ -0,0 +1,27 @@ +--- +slug: "/reference/java/com/signalwire/sdk/utils/utils" +title: "utils" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "com.signalwire.sdk.utils" + module: "com.signalwire.sdk.utils" +--- +# `utils` + +## Signature + +```java +package com.signalwire.sdk.utils +``` + +## Classes + + + + SSRF-prevention guard for user-supplied URLs. <p> Mirrors Python's <code>signalwire.utils.url\_validator.validate\_url</code>: rejects non-http(s) schemes, missing hostnames, and any URL whose hostname resolves to a private / loopback / link-local / cloud-metadata IP. + + diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/utils/utils/url-validator/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/utils/utils/url-validator/index.mdx new file mode 100644 index 0000000000..7f41b12319 --- /dev/null +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/utils/utils/url-validator/index.mdx @@ -0,0 +1,80 @@ +--- +slug: "/reference/java/com/signalwire/sdk/utils/utils/url-validator" +title: "UrlValidator" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.utils.UrlValidator" + parent: "com.signalwire.sdk.utils" + module: "com.signalwire.sdk.utils" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/utils/UrlValidator.java" + visibility: "public" +--- +# `UrlValidator` + +SSRF-prevention guard for user-supplied URLs. + +<p> +Mirrors Python's <code>signalwire.utils.url_validator.validate_url</code>: +rejects non-http(s) schemes, missing hostnames, and any URL whose +hostname resolves to a private / loopback / link-local / cloud-metadata +IP. + +The `allowPrivate` parameter (or the +`SWML_ALLOW_PRIVATE_URLS` env var with value "1", "true" or "yes", +case-insensitive) bypasses the IP-blocklist check. + +<p> +Projected onto the Python free function name `validate_url` via +scripts/enumerate_signatures.py. + +**Modifiers:** `final` + +## Signature + +```java +public final class UrlValidator +``` + +## Methods + +### validateUrl + +Validate that a URL is safe to fetch. + +**Modifiers:** `static` + +#### Signature + +```java +public static boolean validateUrl(String url, boolean allowPrivate) +``` + +#### Parameters + + + URL string to validate. + + + + when true, bypass the IP-blocklist check. + + +#### Returns + +`boolean` — true when the URL is safe to fetch, false otherwise. + +#### Source + +[`src/main/java/com/signalwire/sdk/utils/UrlValidator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/utils/UrlValidator.java) + +Line 73. + +## Source + +[`src/main/java/com/signalwire/sdk/utils/UrlValidator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/utils/UrlValidator.java) + +Line 30. diff --git a/fern/products/sdk-reference/java/index.mdx b/fern/products/sdk-reference/java/index.mdx new file mode 100644 index 0000000000..77869bfa4c --- /dev/null +++ b/fern/products/sdk-reference/java/index.mdx @@ -0,0 +1,34 @@ +--- +title: "Java SDK" +slug: "/reference/java" +lustri: + auto_generated: true + language: "java" + kind: "sdk" +--- +# Java SDK Reference + +## Modules + +- [`agent`](/docs/sdk-reference/reference/java/com/signalwire/sdk/agent/agent) +- [`builtin`](/docs/sdk-reference/reference/java/com/signalwire/sdk/skills/builtin/builtin) +- [`cli`](/docs/sdk-reference/reference/java/com/signalwire/sdk/cli/cli) +- [`contexts`](/docs/sdk-reference/reference/java/com/signalwire/sdk/contexts/contexts) +- [`lambda`](/docs/sdk-reference/reference/java/com/signalwire/sdk/runtime/lambda/lambda) +- [`logging`](/docs/sdk-reference/reference/java/com/signalwire/sdk/logging/logging) +- [`namespaces`](/docs/sdk-reference/reference/java/com/signalwire/sdk/rest/namespaces/namespaces) +- [`pom`](/docs/sdk-reference/reference/java/com/signalwire/sdk/pom/pom) +- [`prefabs`](/docs/sdk-reference/reference/java/com/signalwire/sdk/prefabs/prefabs) +- [`relay`](/docs/sdk-reference/reference/java/com/signalwire/sdk/relay/relay) +- [`rest`](/docs/sdk-reference/reference/java/com/signalwire/sdk/rest/rest) +- [`runtime`](/docs/sdk-reference/reference/java/com/signalwire/sdk/runtime/runtime) +- [`sdk`](/docs/sdk-reference/reference/java/com/signalwire/sdk/sdk) +- [`security`](/docs/sdk-reference/reference/java/com/signalwire/sdk/security/security) +- [`server`](/docs/sdk-reference/reference/java/com/signalwire/sdk/server/server) +- [`simulation`](/docs/sdk-reference/reference/java/com/signalwire/sdk/cli/simulation/simulation) +- [`skills`](/docs/sdk-reference/reference/java/com/signalwire/sdk/skills/skills) +- [`swaig`](/docs/sdk-reference/reference/java/com/signalwire/sdk/swaig/swaig) +- [`swml`](/docs/sdk-reference/reference/java/com/signalwire/sdk/swml/swml) +- [`tools`](/docs/sdk-reference/reference/java/com/signalwire/sdk/tools/tools) +- [`utils`](/docs/sdk-reference/reference/java/com/signalwire/sdk/utils/utils) + diff --git a/fern/products/sdk-reference/perl/_meta.json b/fern/products/sdk-reference/perl/_meta.json new file mode 100644 index 0000000000..2e78d0fb81 --- /dev/null +++ b/fern/products/sdk-reference/perl/_meta.json @@ -0,0 +1,10 @@ +{ + "language": "perl", + "sdk_name": "perl-sdk", + "version": "2.0.2", + "source_repo": "https://github.com/signalwire/signalwire-perl", + "format": "mdx", + "platform": "fern", + "base_slug": "/reference/perl", + "item_count": 898 +} \ No newline at end of file diff --git a/fern/products/sdk-reference/perl/index.mdx b/fern/products/sdk-reference/perl/index.mdx new file mode 100644 index 0000000000..7d8f507618 --- /dev/null +++ b/fern/products/sdk-reference/perl/index.mdx @@ -0,0 +1,15 @@ +--- +title: "Perl SDK" +slug: "/reference/perl" +lustri: + auto_generated: true + language: "perl" + kind: "sdk" +--- +# Perl SDK Reference +Version: **2.0.2** + +## Modules + +- [`Constants`](/docs/sdk-reference/reference/perl/signal-wire/relay/constants/constants) + diff --git a/fern/products/sdk-reference/perl/signal-wire/agent/agent-base/agent-base/index.mdx b/fern/products/sdk-reference/perl/signal-wire/agent/agent-base/agent-base/index.mdx new file mode 100644 index 0000000000..cf7901ef8b --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/agent/agent-base/agent-base/index.mdx @@ -0,0 +1,1342 @@ +--- +slug: "/reference/perl/signal-wire/agent/agent-base/agent-base" +title: "AgentBase" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Agent::AgentBase" + module: "SignalWire.Agent.AgentBase" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm" +--- +# `AgentBase` + +## Signature + +```perl +package SignalWire::Agent::AgentBase +``` + +## Inheritance + +**Extends:** [SignalWire::SWML::Service](/docs/sdk-reference/reference/perl/signal-wire/swml/service/service) + +## Methods + +### add\_function\_include + +#### Signature + +```perl +sub add_function_include($include) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 659. + +*** + +### add\_hint + +#### Signature + +```perl +sub add_hint($hint) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 415. + +*** + +### add\_hints + +#### Signature + +```perl +sub add_hints($hints) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 421. + +*** + +### add\_internal\_filler + +#### Signature + +```perl +sub add_internal_filler(@args) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 616. + +*** + +### add\_language + +#### Signature + +```perl +sub add_language(@lang) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 447. + +*** + +### add\_mcp\_server + +#### Signature + +```perl +sub add_mcp_server($url, %opts) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 899. + +*** + +### add\_pattern\_hint + +#### Signature + +```perl +sub add_pattern_hint($pattern) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 441. + +*** + +### add\_post\_ai\_verb + +#### Signature + +```perl +sub add_post_ai_verb($verb_name, $verb_config) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 697. + +*** + +### add\_post\_answer\_verb + +#### Signature + +```perl +sub add_post_answer_verb($verb_name, $verb_config) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 691. + +*** + +### add\_pre\_answer\_verb + +#### Signature + +```perl +sub add_pre_answer_verb($verb_name, $verb_config) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 685. + +*** + +### add\_pronunciation + +#### Signature + +```perl +sub add_pronunciation(@pron) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 500. + +*** + +### add\_skill + +#### Signature + +```perl +sub add_skill($skill_name, $params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 807. + +*** + +### add\_swaig\_query\_params + +#### Signature + +```perl +sub add_swaig_query_params(@params) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 854. + +*** + +### BUILD + +#### Signature + +```perl +sub BUILD() +``` + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 161. + +*** + +### clear\_post\_ai\_verbs + +#### Signature + +```perl +sub clear_post_ai_verbs() +``` + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 715. + +*** + +### clear\_post\_answer\_verbs + +#### Signature + +```perl +sub clear_post_answer_verbs() +``` + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 709. + +*** + +### clear\_pre\_answer\_verbs + +#### Signature + +```perl +sub clear_pre_answer_verbs() +``` + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 703. + +*** + +### clear\_swaig\_query\_params + +#### Signature + +```perl +sub clear_swaig_query_params() +``` + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 860. + +*** + +### contexts + +#### Signature + +```perl +sub contexts() +``` + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 800. + +*** + +### create\_tool\_token + +#### Signature + +```perl +sub create_tool_token($tool_name, $call_id) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 378. + +*** + +### define\_contexts + +#### Signature + +```perl +sub define_contexts($contexts) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 735. + +*** + +### enable\_debug\_events + +#### Signature + +```perl +sub enable_debug_events($level) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 652. + +*** + +### enable\_mcp\_server + +#### Signature + +```perl +sub enable_mcp_server() +``` + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 909. + +*** + +### extract\_sip\_username + +#### Signature + +```perl +sub extract_sip_username($class_or_self, $body) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 1725. + +*** + +### get\_contexts + +#### Signature + +```perl +sub get_contexts() +``` + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 311. + +*** + +### get\_full\_url + +#### Signature + +```perl +sub get_full_url(%opts) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 1096. + +*** + +### get\_language\_params + +#### Signature + +```perl +sub get_language_params($code) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 491. + +*** + +### get\_post\_prompt + +#### Signature + +```perl +sub get_post_prompt() +``` + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 276. + +*** + +### get\_prompt + +#### Signature + +```perl +sub get_prompt() +``` + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 240. + +*** + +### get\_raw\_prompt + +#### Signature + +```perl +sub get_raw_prompt() +``` + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 286. + +*** + +### has\_skill + +#### Signature + +```perl +sub has_skill($skill_name) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 823. + +*** + +### list\_skills + +#### Signature + +```perl +sub list_skills() +``` + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 818. + +*** + +### list\_tool\_names + +#### Signature + +```perl +sub list_tool_names() +``` + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 795. + +*** + +### manual\_set\_proxy\_url + +#### Signature + +```perl +sub manual_set_proxy_url($url) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 848. + +*** + +### on\_debug\_event + +#### Signature + +```perl +sub on_debug_event($cb) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 891. + +*** + +### on\_summary + +#### Signature + +```perl +sub on_summary($summary, $raw_data) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 866. + +*** + +### pom + +#### Signature + +```perl +sub pom() +``` + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 257. + +*** + +### prompt\_add\_section + +#### Signature + +```perl +sub prompt_add_section($title, $body, %opts) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 190. + +*** + +### prompt\_add\_subsection + +#### Signature + +```perl +sub prompt_add_subsection($parent_title, $title, $body, %opts) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 201. + +*** + +### prompt\_add\_to\_section + +#### Signature + +```perl +sub prompt_add_to_section($title, %opts) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 215. + +*** + +### prompt\_has\_section + +#### Signature + +```perl +sub prompt_has_section($title) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 232. + +*** + +### psgi\_app + +#### Signature + +```perl +sub psgi_app() +``` + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 1271. + +*** + +### remove\_skill + +#### Signature + +```perl +sub remove_skill($skill_name) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 813. + +*** + +### render\_swml + +#### Signature + +```perl +sub render_swml($request_env) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 1111. + +*** + +### reset\_contexts + +#### Signature + +```perl +sub reset_contexts() +``` + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 782. + +*** + +### run + +#### Signature + +```perl +sub run(%opts) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 1620. + +*** + +### serve + +#### Signature + +```perl +sub serve(%opts) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 1625. + +*** + +### set\_answer\_config + +#### Signature + +```perl +sub set_answer_config($config) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 721. + +*** + +### set\_dynamic\_config\_callback + +#### Signature + +```perl +sub set_dynamic_config_callback($cb) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 830. + +*** + +### set\_function\_includes + +#### Signature + +```perl +sub set_function_includes($includes) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 665. + +*** + +### set\_global\_data + +#### Signature + +```perl +sub set_global_data($data) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 524. + +*** + +### set\_internal\_fillers + +#### Signature + +```perl +sub set_internal_fillers($fillers) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 584. + +*** + +### set\_language\_params + +#### Signature + +```perl +sub set_language_params($code, $params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 474. + +*** + +### set\_languages + +#### Signature + +```perl +sub set_languages($langs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 464. + +*** + +### set\_native\_functions + +#### Signature + +```perl +sub set_native_functions($funcs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 536. + +*** + +### set\_param + +#### Signature + +```perl +sub set_param($key, $value) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 512. + +*** + +### set\_params + +#### Signature + +```perl +sub set_params($p) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 518. + +*** + +### set\_post\_prompt + +#### Signature + +```perl +sub set_post_prompt($text) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 184. + +*** + +### set\_post\_prompt\_llm\_params + +#### Signature + +```perl +sub set_post_prompt_llm_params(@p) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 677. + +*** + +### set\_post\_prompt\_url + +#### Signature + +```perl +sub set_post_prompt_url($url) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 842. + +*** + +### set\_prompt\_llm\_params + +#### Signature + +```perl +sub set_prompt_llm_params(@p) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 671. + +*** + +### set\_prompt\_pom + +#### Signature + +```perl +sub set_prompt_pom($pom) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 298. + +*** + +### set\_prompt\_text + +#### Signature + +```perl +sub set_prompt_text($text) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 178. + +*** + +### set\_pronunciations + +#### Signature + +```perl +sub set_pronunciations($prons) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 506. + +*** + +### set\_web\_hook\_url + +#### Signature + +```perl +sub set_web_hook_url($url) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 836. + +*** + +### update\_global\_data + +#### Signature + +```perl +sub update_global_data($data) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 530. + +*** + +### validate\_tool\_token + +#### Signature + +```perl +sub validate_tool_token($function_name, $token, $call_id) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 396. + +## Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/core/logging-config/logging-config/index.mdx b/fern/products/sdk-reference/perl/signal-wire/core/logging-config/logging-config/index.mdx new file mode 100644 index 0000000000..92f2751a3a --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/core/logging-config/logging-config/index.mdx @@ -0,0 +1,62 @@ +--- +slug: "/reference/perl/signal-wire/core/logging-config/logging-config" +title: "LoggingConfig" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Core::LoggingConfig" + module: "SignalWire.Core.LoggingConfig" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Core/LoggingConfig.pm" +--- +# `LoggingConfig` + +## Signature + +```perl +package SignalWire::Core::LoggingConfig +``` + +## Methods + +### get\_execution\_mode + +#### Signature + +```perl +sub get_execution_mode() +``` + +#### Source + +[`lib/SignalWire/Core/LoggingConfig.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Core/LoggingConfig.pm) + +Line 33. + +*** + +### get\_logger + +#### Signature + +```perl +sub get_logger($name) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Core/LoggingConfig.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Core/LoggingConfig.pm) + +Line 14. + +## Source + +[`lib/SignalWire/Core/LoggingConfig.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Core/LoggingConfig.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/pom/prompt-object-model/prompt-object-model/index.mdx b/fern/products/sdk-reference/perl/signal-wire/pom/prompt-object-model/prompt-object-model/index.mdx new file mode 100644 index 0000000000..188d31fc85 --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/pom/prompt-object-model/prompt-object-model/index.mdx @@ -0,0 +1,248 @@ +--- +slug: "/reference/perl/signal-wire/pom/prompt-object-model/prompt-object-model" +title: "PromptObjectModel" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::POM::PromptObjectModel" + module: "SignalWire.POM.PromptObjectModel" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/PromptObjectModel.pm" +--- +# `PromptObjectModel` + +SignalWire::POM::PromptObjectModel is a Perl port of `signalwire.pom.pom.PromptObjectModel` from the Python SignalWire SDK. It owns an ordered list of SignalWire::POM::Section objects and provides JSON / YAML serialisation, Markdown / XML rendering, recursive title-based search, and POM-merging via `add_pom_as_subsection`. + +The serialised form is byte-for-byte identical to the Python reference; prompts authored in either language can be loaded by the other. + +**Synopsis** + +```perl +use SignalWire::POM::PromptObjectModel; +``` + +```perl +my $pom = SignalWire::POM::PromptObjectModel->new; +my $sec = $pom->add_section( + title => 'Greeting', + body => 'You are a helpful assistant.', +); +$sec->add_subsection( + title => 'Tone', + body => 'Speak warmly.', +); +``` + +```perl +print $pom->render_markdown; +print $pom->render_xml; +``` + +```perl +my $json = $pom->to_json; +my $back = SignalWire::POM::PromptObjectModel->from_json($json); +``` + +## Signature + +```perl +package SignalWire::POM::PromptObjectModel +``` + +## See Also + +- \[SignalWire::POM::Section]\(xref://SignalWire::POM::Section) + +## Methods + +### add\_pom\_as\_subsection + +#### Signature + +```perl +sub add_pom_as_subsection($target, $pom_to_add) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/POM/PromptObjectModel.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/PromptObjectModel.pm) + +Line 322. + +*** + +### add\_section + +#### Signature + +```perl +sub add_section(%opts) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/POM/PromptObjectModel.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/PromptObjectModel.pm) + +Line 169. + +*** + +### find\_section + +#### Signature + +```perl +sub find_section($title) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/POM/PromptObjectModel.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/PromptObjectModel.pm) + +Line 198. + +*** + +### from\_json + +#### Signature + +```perl +sub from_json($class_or_self, $json_data) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/POM/PromptObjectModel.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/PromptObjectModel.pm) + +Line 48. + +*** + +### from\_yaml + +#### Signature + +```perl +sub from_yaml($class_or_self, $yaml_data) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/POM/PromptObjectModel.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/PromptObjectModel.pm) + +Line 67. + +*** + +### render\_markdown + +#### Signature + +```perl +sub render_markdown() +``` + +#### Source + +[`lib/SignalWire/POM/PromptObjectModel.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/PromptObjectModel.pm) + +Line 254. + +*** + +### render\_xml + +#### Signature + +```perl +sub render_xml() +``` + +#### Source + +[`lib/SignalWire/POM/PromptObjectModel.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/PromptObjectModel.pm) + +Line 285. + +*** + +### to\_hash + +#### Signature + +```perl +sub to_hash() +``` + +#### Source + +[`lib/SignalWire/POM/PromptObjectModel.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/PromptObjectModel.pm) + +Line 246. + +*** + +### to\_json + +#### Signature + +```perl +sub to_json() +``` + +#### Source + +[`lib/SignalWire/POM/PromptObjectModel.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/PromptObjectModel.pm) + +Line 217. + +*** + +### to\_yaml + +#### Signature + +```perl +sub to_yaml() +``` + +#### Source + +[`lib/SignalWire/POM/PromptObjectModel.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/PromptObjectModel.pm) + +Line 232. + +## Source + +[`lib/SignalWire/POM/PromptObjectModel.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/PromptObjectModel.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/pom/section/section/index.mdx b/fern/products/sdk-reference/perl/signal-wire/pom/section/section/index.mdx new file mode 100644 index 0000000000..6f01e590c6 --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/pom/section/section/index.mdx @@ -0,0 +1,170 @@ +--- +slug: "/reference/perl/signal-wire/pom/section/section" +title: "Section" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::POM::Section" + module: "SignalWire.POM.Section" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/Section.pm" +--- +# `Section` + +SignalWire::POM::Section is a Perl port of `signalwire.pom.pom.Section` from the Python SignalWire SDK. Both implementations render byte-for-byte identical Markdown/XML/JSON output so prompts authored in either language can be consumed interchangeably. + +**Synopsis** + +```perl +use SignalWire::POM::Section; +``` + +```perl +my $section = SignalWire::POM::Section->new( + title => 'Greeting', + body => 'You are a helpful assistant.', + bullets => ['Be polite', 'Be concise'], +); +``` + +```perl +my $sub = $section->add_subsection( + title => 'Tone', + body => 'Speak warmly.', +); +``` + +```perl +print $section->render_markdown; +print $section->render_xml; +``` + +## Signature + +```perl +package SignalWire::POM::Section +``` + +## See Also + +- SignalWire::POM::PromptObjectModel — the top-level container that holds a list of Sections. + +## Methods + +### add\_body + +#### Signature + +```perl +sub add_body() +``` + +#### Source + +[`lib/SignalWire/POM/Section.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/Section.pm) + +Line 89. + +*** + +### add\_bullets + +#### Signature + +```perl +sub add_bullets() +``` + +#### Source + +[`lib/SignalWire/POM/Section.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/Section.pm) + +Line 96. + +*** + +### add\_subsection + +#### Signature + +```perl +sub add_subsection() +``` + +#### Source + +[`lib/SignalWire/POM/Section.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/Section.pm) + +Line 106. + +*** + +### BUILD + +#### Signature + +```perl +sub BUILD() +``` + +#### Source + +[`lib/SignalWire/POM/Section.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/Section.pm) + +Line 73. + +*** + +### render\_markdown + +#### Signature + +```perl +sub render_markdown() +``` + +#### Source + +[`lib/SignalWire/POM/Section.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/Section.pm) + +Line 153. + +*** + +### render\_xml + +#### Signature + +```perl +sub render_xml() +``` + +#### Source + +[`lib/SignalWire/POM/Section.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/Section.pm) + +Line 221. + +*** + +### to\_hash + +#### Signature + +```perl +sub to_hash() +``` + +#### Source + +[`lib/SignalWire/POM/Section.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/Section.pm) + +Line 124. + +## Source + +[`lib/SignalWire/POM/Section.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/Section.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/prefabs/concierge/concierge/index.mdx b/fern/products/sdk-reference/perl/signal-wire/prefabs/concierge/concierge/index.mdx new file mode 100644 index 0000000000..2872d74dcd --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/prefabs/concierge/concierge/index.mdx @@ -0,0 +1,50 @@ +--- +slug: "/reference/perl/signal-wire/prefabs/concierge/concierge" +title: "Concierge" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Prefabs::Concierge" + module: "SignalWire.Prefabs.Concierge" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/Concierge.pm" +--- +# `Concierge` + +## Signature + +```perl +package SignalWire::Prefabs::Concierge +``` + +## Inheritance + +**Extends:** [SignalWire::Agent::AgentBase](/docs/sdk-reference/reference/perl/signal-wire/agent/agent-base/agent-base) + +## Methods + +### BUILD + +#### Signature + +```perl +sub BUILD($args) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Prefabs/Concierge.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/Concierge.pm) + +Line 18. + +## Source + +[`lib/SignalWire/Prefabs/Concierge.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/Concierge.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/prefabs/faq-bot/faq-bot/index.mdx b/fern/products/sdk-reference/perl/signal-wire/prefabs/faq-bot/faq-bot/index.mdx new file mode 100644 index 0000000000..2566d91808 --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/prefabs/faq-bot/faq-bot/index.mdx @@ -0,0 +1,50 @@ +--- +slug: "/reference/perl/signal-wire/prefabs/faq-bot/faq-bot" +title: "FAQBot" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Prefabs::FAQBot" + module: "SignalWire.Prefabs.FAQBot" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/FAQBot.pm" +--- +# `FAQBot` + +## Signature + +```perl +package SignalWire::Prefabs::FAQBot +``` + +## Inheritance + +**Extends:** [SignalWire::Agent::AgentBase](/docs/sdk-reference/reference/perl/signal-wire/agent/agent-base/agent-base) + +## Methods + +### BUILD + +#### Signature + +```perl +sub BUILD($args) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Prefabs/FAQBot.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/FAQBot.pm) + +Line 15. + +## Source + +[`lib/SignalWire/Prefabs/FAQBot.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/FAQBot.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/prefabs/info-gatherer/info-gatherer/index.mdx b/fern/products/sdk-reference/perl/signal-wire/prefabs/info-gatherer/info-gatherer/index.mdx new file mode 100644 index 0000000000..1e330d9a28 --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/prefabs/info-gatherer/info-gatherer/index.mdx @@ -0,0 +1,50 @@ +--- +slug: "/reference/perl/signal-wire/prefabs/info-gatherer/info-gatherer" +title: "InfoGatherer" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Prefabs::InfoGatherer" + module: "SignalWire.Prefabs.InfoGatherer" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/InfoGatherer.pm" +--- +# `InfoGatherer` + +## Signature + +```perl +package SignalWire::Prefabs::InfoGatherer +``` + +## Inheritance + +**Extends:** [SignalWire::Agent::AgentBase](/docs/sdk-reference/reference/perl/signal-wire/agent/agent-base/agent-base) + +## Methods + +### BUILD + +#### Signature + +```perl +sub BUILD($args) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Prefabs/InfoGatherer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/InfoGatherer.pm) + +Line 13. + +## Source + +[`lib/SignalWire/Prefabs/InfoGatherer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/InfoGatherer.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/prefabs/receptionist/receptionist/index.mdx b/fern/products/sdk-reference/perl/signal-wire/prefabs/receptionist/receptionist/index.mdx new file mode 100644 index 0000000000..c3077d7dd2 --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/prefabs/receptionist/receptionist/index.mdx @@ -0,0 +1,50 @@ +--- +slug: "/reference/perl/signal-wire/prefabs/receptionist/receptionist" +title: "Receptionist" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Prefabs::Receptionist" + module: "SignalWire.Prefabs.Receptionist" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/Receptionist.pm" +--- +# `Receptionist` + +## Signature + +```perl +package SignalWire::Prefabs::Receptionist +``` + +## Inheritance + +**Extends:** [SignalWire::Agent::AgentBase](/docs/sdk-reference/reference/perl/signal-wire/agent/agent-base/agent-base) + +## Methods + +### BUILD + +#### Signature + +```perl +sub BUILD($args) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Prefabs/Receptionist.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/Receptionist.pm) + +Line 15. + +## Source + +[`lib/SignalWire/Prefabs/Receptionist.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/Receptionist.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/prefabs/survey/survey/index.mdx b/fern/products/sdk-reference/perl/signal-wire/prefabs/survey/survey/index.mdx new file mode 100644 index 0000000000..8105cf8b82 --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/prefabs/survey/survey/index.mdx @@ -0,0 +1,50 @@ +--- +slug: "/reference/perl/signal-wire/prefabs/survey/survey" +title: "Survey" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Prefabs::Survey" + module: "SignalWire.Prefabs.Survey" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/Survey.pm" +--- +# `Survey` + +## Signature + +```perl +package SignalWire::Prefabs::Survey +``` + +## Inheritance + +**Extends:** [SignalWire::Agent::AgentBase](/docs/sdk-reference/reference/perl/signal-wire/agent/agent-base/agent-base) + +## Methods + +### BUILD + +#### Signature + +```perl +sub BUILD($args) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Prefabs/Survey.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/Survey.pm) + +Line 18. + +## Source + +[`lib/SignalWire/Prefabs/Survey.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/Survey.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/relay/action/action/index.mdx b/fern/products/sdk-reference/perl/signal-wire/relay/action/action/index.mdx new file mode 100644 index 0000000000..947fe06499 --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/relay/action/action/index.mdx @@ -0,0 +1,356 @@ +--- +slug: "/reference/perl/signal-wire/relay/action/action" +title: "Action" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Relay::Action" + module: "SignalWire.Relay.Action" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm" +--- +# `Action` + +SignalWire::Relay::Action is the base class for every long-running RELAY operation (play, record, detect, collect, fax, tap, stream, pay, transcribe, AI). It tracks the `control_id` correlation key, accumulates events, exposes the latest `payload`, and resolves when the operation reaches a terminal state — mirroring the Python reference's action objects. + +Construction fails fast: `control_id` must be a non-empty string, `events` must be an arrayref, and `payload` must be a hashref (Moo `isa` constraints). These objects are normally created by SignalWire::Relay::Call, not by user code. + +**BASE METHODS** + +- `on_completed($cb)` — register a completion callback (fires immediately if already done); no-arg form returns the registered callback. + +- `is_done` — true once resolved. + +- `wait(timeout => $secs)` — block (polling) until resolved or the timeout elapses (default 30s), then return the result. + +- `stop` — send the subclass's stop verb unless already done. + +**LICENSE** + +Copyright (c) 2025 SignalWire. Licensed under the MIT License. + +**SUBCLASSES** + +Each subclass overrides the stop verb and adds result accessors: + +- **::Play** — `pause`, `resume`, `volume($vol)`. + +- **::Record** — `pause(behavior => ...)`, `resume`, and the `url` / `duration` / `size` result accessors. + +- **::Detect** — `detect_result`; resolves on the first `params.detect` payload. + +- **::Collect** / **::StandaloneCollect** — `start_input_timers`, `collect_result`; filters stray `calling.call.play` events. + +- **::Fax** — `fax_result`; stop verb depends on `_fax_type`. + +- **::Tap**, **::Stream**, **::Transcribe**, **::AI** — stop-verb-only specialisations. + +- **::Pay** — `pay_result`. + +**Synopsis** + +```perl +# Actions are returned by SignalWire::Relay::Call methods, not +# constructed directly: +my $action = $call->play_async( url => $url ); # ::Action::Play +``` + +```perl +$action->on_completed(sub ($a) { print "done: ", $a->state, "\n"; }); +my $result = $action->wait( timeout => 30 ); # block until done +$action->stop unless $action->is_done; +``` + +## Signature + +```perl +package SignalWire::Relay::Action +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::Action](/docs/sdk-reference/reference/perl/signal-wire/relay/action/action), `SignalWire::Relay::Action::Collect` + +## See Also + +- SignalWire::Relay::Call, SignalWire::Relay::Client, SignalWire::Relay::Event. + +## Methods + +### collect\_result + +#### Signature + +```perl +sub collect_result() +``` + +#### Source + +[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) + +Line 208. + +*** + +### detect\_result + +#### Signature + +```perl +sub detect_result() +``` + +#### Source + +[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) + +Line 176. + +*** + +### duration + +#### Signature + +```perl +sub duration() +``` + +#### Source + +[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) + +Line 165. + +*** + +### fax\_result + +#### Signature + +```perl +sub fax_result() +``` + +#### Source + +[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) + +Line 264. + +*** + +### is\_done + +#### Signature + +```perl +sub is_done() +``` + +#### Source + +[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) + +Line 57. + +*** + +### on\_completed + +#### Signature + +```perl +sub on_completed() +``` + +#### Source + +[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) + +Line 43. + +*** + +### pause + +#### Signature + +```perl +sub pause() +``` + +#### Source + +[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) + +Line 120. + +*** + +### pause + +#### Signature + +```perl +sub pause() +``` + +#### Source + +[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) + +Line 147. + +*** + +### pay\_result + +#### Signature + +```perl +sub pay_result() +``` + +#### Source + +[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) + +Line 287. + +*** + +### resume + +#### Signature + +```perl +sub resume() +``` + +#### Source + +[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) + +Line 124. + +*** + +### resume + +#### Signature + +```perl +sub resume() +``` + +#### Source + +[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) + +Line 159. + +*** + +### size + +#### Signature + +```perl +sub size() +``` + +#### Source + +[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) + +Line 166. + +*** + +### start\_input\_timers + +#### Signature + +```perl +sub start_input_timers() +``` + +#### Source + +[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) + +Line 204. + +*** + +### stop + +#### Signature + +```perl +sub stop() +``` + +#### Source + +[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) + +Line 104. + +*** + +### url + +#### Signature + +```perl +sub url() +``` + +#### Source + +[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) + +Line 164. + +*** + +### volume + +#### Signature + +```perl +sub volume() +``` + +#### Source + +[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) + +Line 128. + +*** + +### wait + +#### Signature + +```perl +sub wait() +``` + +#### Source + +[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) + +Line 62. + +## Source + +[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/relay/call-state/call-state/index.mdx b/fern/products/sdk-reference/perl/signal-wire/relay/call-state/call-state/index.mdx new file mode 100644 index 0000000000..51bf30e6c3 --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/relay/call-state/call-state/index.mdx @@ -0,0 +1,167 @@ +--- +slug: "/reference/perl/signal-wire/relay/call-state/call-state" +title: "CallState" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Relay::CallState" + module: "SignalWire.Relay.CallState" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/CallState.pm" +--- +# `CallState` + +The RELAY call-lifecycle states, surfaced as typed, named constants. A call moves through `created` → `ringing` → `answered` → `ending` → `ended`. Each constant's value is the exact wire string the server sends in the `calling.call.state` event's `call_state` field. + +The constants **are** the canonical wire strings, so nothing about `SignalWire::Relay::Call->state` changes: it still reads and writes a plain string. That keeps parity with the Python reference (bare `str`) and leaves forward-compatible server states working — an unknown string is simply not in this set. + +Grounded in the Python reference's `relay/constants.py` (`CALL_STATE_*` / `CALL_STATES`) and the port's SignalWire::Relay::Constants (`CALL_STATES` / `CALL_TERMINAL_STATES`), which are the single source the lists below are derived from. + +**CONSTANTS** + +Exported on request via Exporter; `:all` pulls every state. + +```perl +CREATED => 'created' +RINGING => 'ringing' +ANSWERED => 'answered' +ENDING => 'ending' +ENDED => 'ended' +``` + +**IS STATE** + +my $bool = SignalWire::Relay::CallState->is\_state($value); + +True if `$value` is a known call state. Returns false (never dies) on `undef` or an unknown/forward-compatible value. + +**IS TERMINAL** + +my $bool = SignalWire::Relay::CallState->is\_terminal($value); + +True if `$value` is a terminal call state (the only terminal `CallState` is `ended`). Returns false on `undef`, a non-terminal state, or an unknown value — it never dies, since these mirror server-emitted values that can grow. + +**LICENSE** + +Copyright (c) 2025 SignalWire. Licensed under the MIT License. + +**STATES** + +my $aref = SignalWire::Relay::CallState->states; + +Arrayref of the call lifecycle states, in lifecycle order. + +**THREE DISTINCT STATE VOCABULARIES** + +CallState, DialState, and MessageState are **distinct** sets with **distinct** terminal members and must never be conflated. `answered` is a **non-terminal** `CallState` but a **terminal** `DialState`; `failed` is not a `CallState` at all. Each module owns its own terminal set. + +**Synopsis** + +```perl +use SignalWire::Relay::CallState qw(CREATED RINGING ANSWERED ENDING ENDED); +``` + +```perl +# Named constants and bare wire strings are interchangeable: +$call->state eq ANSWERED; # constant +$call->state eq 'answered'; # string (Python parity) +``` + +```perl +# Membership / terminality (false on unknown — never dies): +SignalWire::Relay::CallState->is_state('ringing'); # 1 +SignalWire::Relay::CallState->is_terminal('ended'); # 1 +SignalWire::Relay::CallState->is_terminal('answered'); # 0 +SignalWire::Relay::CallState->is_terminal('made_up'); # 0 +@{ SignalWire::Relay::CallState->states }; # created..ended +``` + +## Signature + +```perl +package SignalWire::Relay::CallState +``` + +## See Also + +- SignalWire::Relay::Call, SignalWire::Relay::Constants, SignalWire::Relay::DialState, SignalWire::Relay::MessageState. + +## Constants + + + + + + + + + + + +## Methods + +### is\_state + +#### Signature + +```perl +sub is_state($class, $value) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Relay/CallState.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/CallState.pm) + +Line 84. + +*** + +### is\_terminal + +#### Signature + +```perl +sub is_terminal($class, $value) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Relay/CallState.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/CallState.pm) + +Line 93. + +*** + +### states + +#### Signature + +```perl +sub states() +``` + +#### Source + +[`lib/SignalWire/Relay/CallState.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/CallState.pm) + +Line 78. + +## Source + +[`lib/SignalWire/Relay/CallState.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/CallState.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/relay/call/call/index.mdx b/fern/products/sdk-reference/perl/signal-wire/relay/call/call/index.mdx new file mode 100644 index 0000000000..8d3087193f --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/relay/call/call/index.mdx @@ -0,0 +1,931 @@ +--- +slug: "/reference/perl/signal-wire/relay/call/call" +title: "Call" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Relay::Call" + module: "SignalWire.Relay.Call" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm" +--- +# `Call` + +SignalWire::Relay::Call is the Perl port of the Python reference's call object. It models one RELAY call: it carries call state, demultiplexes incoming events (updating state, routing to the right SignalWire::Relay::Action by `control_id`, and firing listeners), and exposes the full set of call-control verbs. + +Construction fails fast: `call_id` is required and must be a non-empty string; `device` / `peer` must be hashrefs (Moo `isa` constraints). These objects are created by SignalWire::Relay::Client. + +**ACTION-BASED VERBS** + +`play`, `record`, `detect`, `collect`, `play_and_collect`, `send_fax`, `receive_fax`, `tap`, `stream`, `pay`, `transcribe`, `ai` — each returns a SignalWire::Relay::Action subclass that tracks a `control_id` and resolves when the operation completes. + +**EVENTS** + +- `on($cb)` — register a listener invoked as `$cb->($call, $event)` for every dispatched event. The callback must be a coderef. + +- `dispatch_event($event)` — apply an incoming event (normally called by the client). + +**FIRE-AND-RESPONSE VERBS** + +`answer`, `hangup`, `pass`, `connect`, `disconnect`, `hold`, `unhold`, `denoise`, `denoise_stop`, `transfer`, `join_conference`, `leave_conference`, `echo`, `bind_digit`, `clear_digit_bindings`, `live_transcribe`, `live_translate`, `join_room`, `leave_room`, `amazon_bedrock`, `ai_message`, `ai_hold`, `ai_unhold`, `user_event`, `queue_enter`, `queue_leave`, `refer`, `send_digits`. Each forwards its keyword arguments to the matching RELAY method. + +**LICENSE** + +Copyright (c) 2025 SignalWire. Licensed under the MIT License. + +**TYPED CONVENIENCE WRAPPERS** + +`play_tts`, `play_audio`, `play_silence`, `play_ringtone` build the RELAY media object and delegate to `play`. `detect_digit`, `detect_answering_machine`, `detect_fax` build the detect object and delegate to `detect`. `prompt_tts` / `prompt_audio` play a prompt and collect input via `play_and_collect`. + +**TYPED STATE** + +`state` remains the canonical bare-string accessor (Python parity). These add the SignalWire::Relay::CallState-backed view: + +- `current_state` — the call's lifecycle state as the CallState-typed view. Returns the same wire string as `state` (the CallState constants **are** the wire strings); pair it with `SignalWire::Relay::CallState->is_state` / `->is_terminal` for membership and terminality. + +- `is_terminal` — true once the call has reached a terminal lifecycle state (`ended`). Delegates to SignalWire::Relay::CallState so the terminal definition lives in one place; returns false (never dies) on an unknown/forward-compatible state. + +**Synopsis** + +```perl +# Calls are produced by SignalWire::Relay::Client, not constructed +# directly: +$call->answer; +$call->play_tts( text => 'Hello', voice => 'en-US-Neural2-A' ); +``` + +```perl +my $rec = $call->record( record => { ... } ); # returns an Action +$rec->on_completed(sub ($a) { ... }); +``` + +```perl +$call->on(sub ($c, $event) { ... }); # raw event listener +$call->hangup; +``` + +## Signature + +```perl +package SignalWire::Relay::Call +``` + +## See Also + +- SignalWire::Relay::Client, SignalWire::Relay::Action, SignalWire::Relay::Event, SignalWire::Relay::Constants, SignalWire::Relay::CallState, SignalWire::Relay::Device. + +## Methods + +### ai + +#### Signature + +```perl +sub ai() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 491. + +*** + +### ai\_hold + +#### Signature + +```perl +sub ai_hold() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 283. + +*** + +### ai\_message + +#### Signature + +```perl +sub ai_message() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 279. + +*** + +### ai\_unhold + +#### Signature + +```perl +sub ai_unhold() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 287. + +*** + +### amazon\_bedrock + +#### Signature + +```perl +sub amazon_bedrock() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 275. + +*** + +### answer + +#### Signature + +```perl +sub answer() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 196. + +*** + +### bind\_digit + +#### Signature + +```perl +sub bind_digit() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 248. + +*** + +### clear\_digit\_bindings + +#### Signature + +```perl +sub clear_digit_bindings() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 252. + +*** + +### collect + +#### Signature + +```perl +sub collect() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 408. + +*** + +### connect + +#### Signature + +```perl +sub connect() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 208. + +*** + +### current\_state + +#### Signature + +```perl +sub current_state() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 174. + +*** + +### denoise + +#### Signature + +```perl +sub denoise() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 224. + +*** + +### denoise\_stop + +#### Signature + +```perl +sub denoise_stop() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 228. + +*** + +### detect + +#### Signature + +```perl +sub detect() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 363. + +*** + +### detect\_answering\_machine + +#### Signature + +```perl +sub detect_answering_machine() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 383. + +*** + +### detect\_digit + +#### Signature + +```perl +sub detect_digit() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 374. + +*** + +### detect\_fax + +#### Signature + +```perl +sub detect_fax() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 399. + +*** + +### disconnect + +#### Signature + +```perl +sub disconnect() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 212. + +*** + +### dispatch\_event + +#### Signature + +```perl +sub dispatch_event() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 98. + +*** + +### echo + +#### Signature + +```perl +sub echo() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 244. + +*** + +### hangup + +#### Signature + +```perl +sub hangup() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 200. + +*** + +### hold + +#### Signature + +```perl +sub hold() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 216. + +*** + +### is\_terminal + +#### Signature + +```perl +sub is_terminal() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 182. + +*** + +### join\_conference + +#### Signature + +```perl +sub join_conference() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 236. + +*** + +### join\_room + +#### Signature + +```perl +sub join_room() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 264. + +*** + +### leave\_conference + +#### Signature + +```perl +sub leave_conference() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 240. + +*** + +### leave\_room + +#### Signature + +```perl +sub leave_room() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 268. + +*** + +### live\_transcribe + +#### Signature + +```perl +sub live_transcribe() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 256. + +*** + +### live\_translate + +#### Signature + +```perl +sub live_translate() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 260. + +*** + +### on + +#### Signature + +```perl +sub on() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 156. + +*** + +### pass + +#### Signature + +```perl +sub pass() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 204. + +*** + +### pay + +#### Signature + +```perl +sub pay() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 483. + +*** + +### play + +#### Signature + +```perl +sub play() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 313. + +*** + +### play\_and\_collect + +#### Signature + +```perl +sub play_and_collect() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 412. + +*** + +### play\_audio + +#### Signature + +```perl +sub play_audio() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 337. + +*** + +### play\_ringtone + +#### Signature + +```perl +sub play_ringtone() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 350. + +*** + +### play\_silence + +#### Signature + +```perl +sub play_silence() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 344. + +*** + +### play\_tts + +#### Signature + +```perl +sub play_tts() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 326. + +*** + +### prompt\_audio + +#### Signature + +```perl +sub prompt_audio() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 436. + +*** + +### prompt\_tts + +#### Signature + +```perl +sub prompt_tts() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 422. + +*** + +### queue\_enter + +#### Signature + +```perl +sub queue_enter() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 295. + +*** + +### queue\_leave + +#### Signature + +```perl +sub queue_leave() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 299. + +*** + +### receive\_fax + +#### Signature + +```perl +sub receive_fax() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 451. + +*** + +### record + +#### Signature + +```perl +sub record() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 359. + +*** + +### refer + +#### Signature + +```perl +sub refer() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 303. + +*** + +### send\_digits + +#### Signature + +```perl +sub send_digits() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 307. + +*** + +### send\_fax + +#### Signature + +```perl +sub send_fax() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 446. + +*** + +### stream + +#### Signature + +```perl +sub stream() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 479. + +*** + +### tap + +#### Signature + +```perl +sub tap() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 475. + +*** + +### transcribe + +#### Signature + +```perl +sub transcribe() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 487. + +*** + +### transfer + +#### Signature + +```perl +sub transfer() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 232. + +*** + +### unhold + +#### Signature + +```perl +sub unhold() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 220. + +*** + +### user\_event + +#### Signature + +```perl +sub user_event() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 291. + +## Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/relay/client/client/index.mdx b/fern/products/sdk-reference/perl/signal-wire/relay/client/client/index.mdx new file mode 100644 index 0000000000..e4c0a58849 --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/relay/client/client/index.mdx @@ -0,0 +1,358 @@ +--- +slug: "/reference/perl/signal-wire/relay/client/client" +title: "Client" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Relay::Client" + module: "SignalWire.Relay.Client" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm" +--- +# `Client` + +SignalWire::Relay::Client is the Perl port of the Python reference's `RelayClient`. It owns the RELAY WebSocket transport, performs the `signalwire.connect` handshake, runs a synchronous JSON-RPC request/ response loop, demultiplexes server-initiated events into typed SignalWire::Relay::Event objects, and routes them to the right SignalWire::Relay::Call / SignalWire::Relay::Message. + +Construction fails fast: `host` is required and must be a non-empty string; `contexts` must be an arrayref (Moo `isa` constraints). + +**CONNECTION** + +`connect` (open WS + authenticate), `disconnect`, `connect_ws`, `authenticate`, `reconnect`, `disconnect_ws`, and `run` (the blocking read loop). + +**HANDLER REGISTRATION** + +- `on_call($cb)` — `$cb->($call)` for each inbound call. + +- `on_message($cb)` — `$cb->($event)` for each inbound message. + +- `on_event($cb)` — `$cb->($event)` for every event. + +Each callback must be a coderef; each returns `$self` for chaining. + +**LICENSE** + +Copyright (c) 2025 SignalWire. Licensed under the MIT License. + +**RPC AND OPERATIONS** + +- `execute($method, $params)` — issue a JSON-RPC call and block for the result. + +- `dial(%opts)` — place an outbound call; returns the answered SignalWire::Relay::Call. + +- `send_message(%opts)` — send an SMS/MMS; returns a SignalWire::Relay::Message handle. + +- `receive($contexts)` / `unreceive($contexts)` — subscribe / unsubscribe to inbound contexts. Accepts an arrayref (canonical) or a bare list. + +**Synopsis** + +```perl +use SignalWire::Relay::Client; +``` + +```perl +my $client = SignalWire::Relay::Client->new( + host => 'relay.example.com', + project => $project, + token => $token, +); +``` + +```perl +$client->on_call(sub ($call) { $call->answer; }); +$client->connect; # opens WS + authenticates +$client->receive(['office']); # subscribe to inbound contexts +``` + +```perl +my $call = $client->dial( devices => [...] ); # outbound +my $msg = $client->send_message( to_number => $to, + from_number => $from, + body => 'hi' ); +``` + +```perl +$client->run; # block in the event loop +$client->disconnect; +``` + +## Signature + +```perl +package SignalWire::Relay::Client +``` + +## See Also + +- SignalWire::Relay::Call, SignalWire::Relay::Message, SignalWire::Relay::Event, SignalWire::Relay::Constants, and the RELAY protocol guide in porting-sdk/RELAY\_IMPLEMENTATION\_GUIDE.md. + +## Methods + +### authenticate + +#### Signature + +```perl +sub authenticate() +``` + +#### Source + +[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) + +Line 228. + +*** + +### connect + +#### Signature + +```perl +sub connect() +``` + +#### Source + +[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) + +Line 128. + +*** + +### connect\_ws + +#### Signature + +```perl +sub connect_ws() +``` + +#### Source + +[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) + +Line 142. + +*** + +### dial + +#### Signature + +```perl +sub dial() +``` + +#### Source + +[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) + +Line 411. + +*** + +### disconnect + +#### Signature + +```perl +sub disconnect() +``` + +#### Source + +[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) + +Line 138. + +*** + +### disconnect\_ws + +#### Signature + +```perl +sub disconnect_ws() +``` + +#### Source + +[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) + +Line 763. + +*** + +### execute + +#### Signature + +```perl +sub execute() +``` + +#### Source + +[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) + +Line 279. + +*** + +### on\_call + +#### Signature + +```perl +sub on_call() +``` + +#### Source + +[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) + +Line 105. + +*** + +### on\_event + +#### Signature + +```perl +sub on_event() +``` + +#### Source + +[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) + +Line 117. + +*** + +### on\_message + +#### Signature + +```perl +sub on_message() +``` + +#### Source + +[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) + +Line 111. + +*** + +### receive + +#### Signature + +```perl +sub receive($contexts) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) + +Line 372. + +*** + +### reconnect + +#### Signature + +```perl +sub reconnect() +``` + +#### Source + +[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) + +Line 731. + +*** + +### relay\_protocol + +#### Signature + +```perl +sub relay_protocol() +``` + +#### Source + +[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) + +Line 66. + +*** + +### run + +#### Signature + +```perl +sub run() +``` + +#### Source + +[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) + +Line 774. + +*** + +### send\_message + +#### Signature + +```perl +sub send_message() +``` + +#### Source + +[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) + +Line 325. + +*** + +### unreceive + +#### Signature + +```perl +sub unreceive($contexts) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) + +Line 393. + +## Source + +[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/relay/constants/constants/index.mdx b/fern/products/sdk-reference/perl/signal-wire/relay/constants/constants/index.mdx new file mode 100644 index 0000000000..7505ceee74 --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/relay/constants/constants/index.mdx @@ -0,0 +1,76 @@ +--- +slug: "/reference/perl/signal-wire/relay/constants/constants" +title: "Constants" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "SignalWire::Relay::Constants" + module: "SignalWire.Relay.Constants" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Constants.pm" +--- +# `Constants` + +## Signature + +```perl +package SignalWire::Relay::Constants +``` + +## Constants + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## Source + +[`lib/SignalWire/Relay/Constants.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Constants.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/relay/device/device/index.mdx b/fern/products/sdk-reference/perl/signal-wire/relay/device/device/index.mdx new file mode 100644 index 0000000000..6dca2a7e61 --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/relay/device/device/index.mdx @@ -0,0 +1,105 @@ +--- +slug: "/reference/perl/signal-wire/relay/device/device" +title: "Device" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Relay::Device" + module: "SignalWire.Relay.Device" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Device.pm" +--- +# `Device` + +A RELAY **device** object — the `{ type, params }` pair that names one leg of a dial / connect / refer / tap target. It recurs as a raw hashref across the relay calling layer (`$client->dial(devices => [...])`, `$call->connect` / `$call->refer`, and the `device` field on SignalWire::Relay::Call / the `CallState` / `CallReceive` events). + +This class types the **shape** of that hashref so callers can build one with a constructor and named accessors instead of hand-assembling a nested map. "to\_hash" yields the byte-identical wire hashref the raw form produced, so a `Device` is a drop-in replacement wherever a device hashref is accepted — the existing relay verbs are unchanged (additive, parity-preserving). + +Grounded in `relay-protocol/calling.connect.params.json` and `calling.dial.params.json`, where each device is `{ "type": , "params": }` with `type` required. + +**LICENSE** + +Copyright (c) 2025 SignalWire. Licensed under the MIT License. + +**THE SHAPE IS TYPED; THE DISCRIMINANT IS NOT** + +`type` is kept a plain **string**: the device-type set (`phone`, `sip`, ...) is **not** enumerated in the wire schema (it is an open `{ "type": "string" }`), so turning it into a closed enum would reject valid and forward-compatible values. Per the idiom rule, this class types the **knowable shape** and leaves the **unbounded discriminant** a string. `params` is a per-type arbitrary object, also left untyped. + +Construction fails fast (Moo `isa`): `type` is required and must be a non-empty string; `params` must be a hashref when supplied. + +**TO HASH** + +my $wire = $device->to\_hash; + +Return the canonical RELAY device wire hashref `{ type, params }` — exactly the raw shape the relay verbs already accept. `params` is snapshotted at construction and copied again here, so each emitted hash is independent: mutating one `to_hash` never affects the Device or a later emission, and a mutation of the caller's original hashref after construction does not leak in. + +**TYPE** + +The device type discriminant (e.g. `phone`, `sip`). Required, read-only, a non-empty string. + +**Synopsis** + +```perl +use SignalWire::Relay::Device; +``` + +```perl +my $device = SignalWire::Relay::Device->new( + type => 'phone', + params => { + to_number => '+15551234567', + from_number => '+15557654321', + timeout => 30, + }, +); +``` + +```perl +$device->type; # 'phone' +$device->params; # { to_number => ..., from_number => ..., timeout => 30 } +``` + +```perl +# to_hash yields the exact wire hashref the relay verbs accept: +my $wire = $device->to_hash; +# { type => 'phone', params => { to_number => ..., ... } } +``` + +```perl +# Drop-in for the hand-written hashref in a devices matrix: +$call->connect( devices => [[ $device->to_hash ]] ); +``` + +## Signature + +```perl +package SignalWire::Relay::Device +``` + +## See Also + +- SignalWire::Relay::Call, SignalWire::Relay::Client, SignalWire::Relay::Event. + +## Methods + +### to\_hash + +#### Signature + +```perl +sub to_hash() +``` + +#### Source + +[`lib/SignalWire/Relay/Device.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Device.pm) + +Line 78. + +## Source + +[`lib/SignalWire/Relay/Device.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Device.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/relay/dial-state/dial-state/index.mdx b/fern/products/sdk-reference/perl/signal-wire/relay/dial-state/dial-state/index.mdx new file mode 100644 index 0000000000..61391c367c --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/relay/dial-state/dial-state/index.mdx @@ -0,0 +1,161 @@ +--- +slug: "/reference/perl/signal-wire/relay/dial-state/dial-state" +title: "DialState" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Relay::DialState" + module: "SignalWire.Relay.DialState" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/DialState.pm" +--- +# `DialState` + +The RELAY dial-outcome states, surfaced as typed, named constants. An outbound dial reports progress via the `calling.call.dial` event's `dial_state` field: `dialing` while in progress, then a terminal outcome of `answered` (a leg picked up — the dial succeeded) or `failed` (no leg answered). Each constant's value is the exact wire string the server sends. + +The constants **are** the canonical wire strings, so the dial flow is unchanged: it still compares plain strings (see SignalWire::Relay::Client's dial dispatch, which resolves a pending dial on `answered` and rejects on `failed`). That keeps parity with the Python reference and leaves forward-compatible server states working. + +Grounded in the port's SignalWire::Relay::Constants (`DIAL_STATES` / `DIAL_TERMINAL_STATES`), which are the single source the lists below are derived from. + +**CONSTANTS** + +Exported on request via Exporter; `:all` pulls every state. + +```perl +DIALING => 'dialing' +ANSWERED => 'answered' +FAILED => 'failed' +``` + +**IS STATE** + +my $bool = SignalWire::Relay::DialState->is\_state($value); + +True if `$value` is a known dial state. Returns false (never dies) on `undef` or an unknown/forward-compatible value. + +**IS TERMINAL** + +my $bool = SignalWire::Relay::DialState->is\_terminal($value); + +True if `$value` is a terminal dial state (`answered` or `failed`). Returns false on `undef`, the in-progress `dialing` state, or an unknown value — it never dies, since these mirror server-emitted values that can grow. + +**LICENSE** + +Copyright (c) 2025 SignalWire. Licensed under the MIT License. + +**STATES** + +my $aref = SignalWire::Relay::DialState->states; + +Arrayref of the dial-outcome states, in order. + +**THREE DISTINCT STATE VOCABULARIES** + +CallState, `DialState`, and MessageState are **distinct** sets and must never be conflated. `answered` is a **terminal** `DialState` but a **non-terminal** `CallState` — the same string with opposite terminality, because they are different vocabularies. `failed` is not a `CallState` at all. + +**Synopsis** + +```perl +use SignalWire::Relay::DialState qw(DIALING ANSWERED FAILED); +``` + +```perl +# Named constants and bare wire strings are interchangeable: +$event->dial_state eq ANSWERED; # constant +$event->dial_state eq 'answered'; # string (Python parity) +``` + +```perl +# Membership / terminality (false on unknown — never dies): +SignalWire::Relay::DialState->is_state('dialing'); # 1 +SignalWire::Relay::DialState->is_terminal('answered'); # 1 +SignalWire::Relay::DialState->is_terminal('failed'); # 1 +SignalWire::Relay::DialState->is_terminal('dialing'); # 0 +@{ SignalWire::Relay::DialState->states }; # dialing, answered, failed +``` + +## Signature + +```perl +package SignalWire::Relay::DialState +``` + +## See Also + +- SignalWire::Relay::Client, SignalWire::Relay::Constants, SignalWire::Relay::CallState, SignalWire::Relay::MessageState. + +## Constants + + + + + + + +## Methods + +### is\_state + +#### Signature + +```perl +sub is_state($class, $value) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Relay/DialState.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/DialState.pm) + +Line 85. + +*** + +### is\_terminal + +#### Signature + +```perl +sub is_terminal($class, $value) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Relay/DialState.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/DialState.pm) + +Line 95. + +*** + +### states + +#### Signature + +```perl +sub states() +``` + +#### Source + +[`lib/SignalWire/Relay/DialState.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/DialState.pm) + +Line 79. + +## Source + +[`lib/SignalWire/Relay/DialState.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/DialState.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/relay/event/event/index.mdx b/fern/products/sdk-reference/perl/signal-wire/relay/event/event/index.mdx new file mode 100644 index 0000000000..f8533454d0 --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/relay/event/event/index.mdx @@ -0,0 +1,86 @@ +--- +slug: "/reference/perl/signal-wire/relay/event/event" +title: "Event" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Relay::Event" + module: "SignalWire.Relay.Event" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Event.pm" +--- +# `Event` + +SignalWire::Relay::Event is the base class for every RELAY event the client receives. Each concrete event type is a small read-only Moo subclass that exposes the fields relevant to it (for example `::CallState` carries `call_state` / `end_reason` / `peer`, while `::MessageReceive` carries `from_number` / `body` / `media`). All subclasses inherit `event_type`, `timestamp`, and the raw `params` hashref from the base class. + +The event objects are read-only data carriers built from the server payload; they deliberately carry no `isa` constraints so a forward- compatible server shape is never rejected — unknown fields are simply ignored by Moo. + +**EVENT TYPES** + +The recognised `event_type` strings and their subclasses include the `calling.call.*` family (state, receive, dial, connect, disconnect, play, record, collect, detect, fax, tap, stream, transcribe, pay, send\_digits, refer, ai), `calling.conference`, `messaging.receive` / `messaging.state`, and the `signalwire.*` session events (`authorization.state`, `disconnect`). + +**LICENSE** + +Copyright (c) 2025 SignalWire. Licensed under the MIT License. + +**PARSE EVENT** + +my $event = SignalWire::Relay::Event->parse\_event($event\_type, $params); + +Class-method factory. Looks `$event_type` up in the internal event-class map and returns an instance of the matching subclass, populated from `$params` (which defaults to an empty hashref). Unknown event types fall back to a base SignalWire::Relay::Event carrying the raw type and params. Normally called by SignalWire::Relay::Client as it demultiplexes the WebSocket stream. + +**Synopsis** + +```perl +use SignalWire::Relay::Event; +``` + +```perl +my $event = SignalWire::Relay::Event->parse_event( + 'calling.call.state', + { call_id => $id, call_state => 'answered' }, +); +``` + +```perl +$event->event_type; # 'calling.call.state' +$event->call_state; # 'answered' (on the ::CallState subclass) +``` + +## Signature + +```perl +package SignalWire::Relay::Event +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::Event](/docs/sdk-reference/reference/perl/signal-wire/relay/event/event) + +## See Also + +- SignalWire::Relay::Client, SignalWire::Relay::Call, SignalWire::Relay::Message. + +## Methods + +### parse\_event + +#### Signature + +```perl +sub parse_event() +``` + +#### Source + +[`lib/SignalWire/Relay/Event.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Event.pm) + +Line 259. + +## Source + +[`lib/SignalWire/Relay/Event.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Event.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/relay/message-state/message-state/index.mdx b/fern/products/sdk-reference/perl/signal-wire/relay/message-state/message-state/index.mdx new file mode 100644 index 0000000000..0563168d55 --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/relay/message-state/message-state/index.mdx @@ -0,0 +1,170 @@ +--- +slug: "/reference/perl/signal-wire/relay/message-state/message-state" +title: "MessageState" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Relay::MessageState" + module: "SignalWire.Relay.MessageState" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/MessageState.pm" +--- +# `MessageState` + +The RELAY message-delivery states, surfaced as typed, named constants. An outbound SMS moves through `queued` → `initiated` → `sent` and then to a terminal outcome of `delivered`, `undelivered`, or `failed`; `received` is the state of an inbound message. Each constant's value is the exact wire string the server sends in the `messaging.state` event's `message_state` field. + +The constants **are** the canonical wire strings, so nothing about `SignalWire::Relay::Message->state` changes: it still reads and writes a plain string. That keeps parity with the Python reference (bare `str`) and leaves forward-compatible server states working. + +Grounded in the Python reference's `relay/constants.py` (`MESSAGE_STATE_*` / `MESSAGE_TERMINAL_STATES`) and the port's SignalWire::Relay::Constants (`MESSAGE_STATES` / `MESSAGE_TERMINAL_STATES`), which are the single source the lists below are derived from. + +**CONSTANTS** + +Exported on request via Exporter; `:all` pulls every state. + +```perl +QUEUED => 'queued' UNDELIVERED => 'undelivered' +INITIATED => 'initiated' FAILED => 'failed' +SENT => 'sent' RECEIVED => 'received' +DELIVERED => 'delivered' +``` + +**IS STATE** + +my $bool = SignalWire::Relay::MessageState->is\_state($value); + +True if `$value` is a known message state. Returns false (never dies) on `undef` or an unknown/forward-compatible value. + +**IS TERMINAL** + +my $bool = SignalWire::Relay::MessageState->is\_terminal($value); + +True if `$value` is a terminal delivery state (`delivered`, `undelivered`, or `failed`). Returns false on `undef`, an in-flight state, `received`, or an unknown value — it never dies, since these mirror server-emitted values that can grow. + +**LICENSE** + +Copyright (c) 2025 SignalWire. Licensed under the MIT License. + +**STATES** + +my $aref = SignalWire::Relay::MessageState->states; + +Arrayref of the message-delivery states, in order. + +**THREE DISTINCT STATE VOCABULARIES** + +CallState, DialState, and `MessageState` are **distinct** sets and must never be conflated. `failed` is terminal in both `DialState` and `MessageState`, but the sets are otherwise disjoint (`MessageState` has no `dialing`/`answered`; `DialState` has no `delivered`). + +**Synopsis** + +```perl +use SignalWire::Relay::MessageState qw(QUEUED SENT DELIVERED FAILED); +``` + +```perl +# Named constants and bare wire strings are interchangeable: +$msg->state eq DELIVERED; # constant +$msg->state eq 'delivered'; # string (Python parity) +``` + +```perl +# Membership / terminality (false on unknown — never dies): +SignalWire::Relay::MessageState->is_state('sent'); # 1 +SignalWire::Relay::MessageState->is_terminal('delivered'); # 1 +SignalWire::Relay::MessageState->is_terminal('failed'); # 1 +SignalWire::Relay::MessageState->is_terminal('sent'); # 0 +@{ SignalWire::Relay::MessageState->states }; # queued..received +``` + +## Signature + +```perl +package SignalWire::Relay::MessageState +``` + +## See Also + +- SignalWire::Relay::Message, SignalWire::Relay::Constants, SignalWire::Relay::CallState, SignalWire::Relay::DialState. + +## Constants + + + + + + + + + + + + + + + +## Methods + +### is\_state + +#### Signature + +```perl +sub is_state($class, $value) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Relay/MessageState.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/MessageState.pm) + +Line 88. + +*** + +### is\_terminal + +#### Signature + +```perl +sub is_terminal($class, $value) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Relay/MessageState.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/MessageState.pm) + +Line 98. + +*** + +### states + +#### Signature + +```perl +sub states() +``` + +#### Source + +[`lib/SignalWire/Relay/MessageState.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/MessageState.pm) + +Line 82. + +## Source + +[`lib/SignalWire/Relay/MessageState.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/MessageState.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/relay/message/message/index.mdx b/fern/products/sdk-reference/perl/signal-wire/relay/message/message/index.mdx new file mode 100644 index 0000000000..7e918acf10 --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/relay/message/message/index.mdx @@ -0,0 +1,212 @@ +--- +slug: "/reference/perl/signal-wire/relay/message/message" +title: "Message" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Relay::Message" + module: "SignalWire.Relay.Message" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Message.pm" +--- +# `Message` + +SignalWire::Relay::Message tracks the lifecycle of a single RELAY message. It mirrors the Python reference's message handle: a message is created with a `message_id`, accumulates state from `messaging.state` events via "dispatch\_event", and resolves when it reaches a terminal state (see "MESSAGE\_TERMINAL\_STATES" in SignalWire::Relay::Constants). + +Construction fails fast on bad input: `message_id` must be a non-empty string, `media` / `tags` must be arrayrefs, and `segments` must be a number (Moo `isa` constraints). + +**CURRENT STATE** + +my $state = $msg->current\_state; + +The message's delivery state as the SignalWire::Relay::MessageState-typed view. Returns the same wire string as `state` (the MessageState constants **are** the wire strings); pair it with `SignalWire::Relay::MessageState->is_state` / `->is_terminal`. + +**DISPATCH EVENT** + +$msg->dispatch\_event($event); + +Apply a `messaging.state` event: update `state`/`reason`, fire event listeners, and resolve the message if the new state is terminal. Normally called by SignalWire::Relay::Client, not user code. + +**IS DONE** + +my $bool = $msg->is\_done; + +True once the message has reached a terminal state (the resolved `completed` flag set by "dispatch\_event"). + +**IS TERMINAL** + +my $bool = $msg->is\_terminal; + +True when the message's current `state` string is a terminal delivery state (`delivered`, `undelivered`, or `failed`). Delegates to SignalWire::Relay::MessageState; returns false (never dies) on an unknown/forward-compatible state. Distinct from "is\_done", which reports the resolved `completed` flag rather than classifying the `state` string. + +**LICENSE** + +Copyright (c) 2025 SignalWire. Licensed under the MIT License. + +**ON** + +$msg->on($cb); # returns $self + +Register a per-event listener invoked as `$cb->($msg, $event)` for every dispatched event. The callback must be a coderef. + +**ON COMPLETED** + +$msg->on\_completed($cb); # register; returns $self +my $cb = $msg->on\_completed; # no-arg: get the registered callback + +Register a callback invoked once with `$msg` when the message completes. If the message is already complete, the callback fires immediately. The callback must be a coderef. + +**WAIT** + +my $result = $msg->wait( timeout => 30 ); + +Block (polling) until the message completes or `timeout` seconds elapse (default 30), then return the terminal event. + +**Synopsis** + +```perl +use SignalWire::Relay::Message; +``` + +```perl +my $msg = SignalWire::Relay::Message->new( message_id => $id ); +``` + +```perl +$msg->on_completed(sub ($m) { print "final state: ", $m->state, "\n"; }); +$msg->on(sub ($m, $event) { ... }); # per-event listener +``` + +```perl +my $final = $msg->wait( timeout => 30 ); # blocks until terminal +``` + +## Signature + +```perl +package SignalWire::Relay::Message +``` + +## See Also + +- SignalWire::Relay::Client, SignalWire::Relay::Event, SignalWire::Relay::Constants, SignalWire::Relay::MessageState. + +## Methods + +### current\_state + +#### Signature + +```perl +sub current_state() +``` + +#### Source + +[`lib/SignalWire/Relay/Message.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Message.pm) + +Line 67. + +*** + +### dispatch\_event + +#### Signature + +```perl +sub dispatch_event() +``` + +#### Source + +[`lib/SignalWire/Relay/Message.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Message.pm) + +Line 115. + +*** + +### is\_done + +#### Signature + +```perl +sub is_done() +``` + +#### Source + +[`lib/SignalWire/Relay/Message.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Message.pm) + +Line 53. + +*** + +### is\_terminal + +#### Signature + +```perl +sub is_terminal() +``` + +#### Source + +[`lib/SignalWire/Relay/Message.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Message.pm) + +Line 79. + +*** + +### on + +#### Signature + +```perl +sub on() +``` + +#### Source + +[`lib/SignalWire/Relay/Message.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Message.pm) + +Line 98. + +*** + +### on\_completed + +#### Signature + +```perl +sub on_completed() +``` + +#### Source + +[`lib/SignalWire/Relay/Message.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Message.pm) + +Line 84. + +*** + +### wait + +#### Signature + +```perl +sub wait() +``` + +#### Source + +[`lib/SignalWire/Relay/Message.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Message.pm) + +Line 105. + +## Source + +[`lib/SignalWire/Relay/Message.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Message.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/rest/http-client/http-client/index.mdx b/fern/products/sdk-reference/perl/signal-wire/rest/http-client/http-client/index.mdx new file mode 100644 index 0000000000..78a9104ba5 --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/rest/http-client/http-client/index.mdx @@ -0,0 +1,134 @@ +--- +slug: "/reference/perl/signal-wire/rest/http-client/http-client" +title: "HttpClient" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::REST::HttpClient" + module: "SignalWire.REST.HttpClient" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/HttpClient.pm" +--- +# `HttpClient` + +## Signature + +```perl +package SignalWire::REST::HttpClient +``` + +## Methods + +### delete\_request + +#### Signature + +```perl +sub delete_request($path) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/HttpClient.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/HttpClient.pm) + +Line 127. + +*** + +### get + +#### Signature + +```perl +sub get($path, %opts) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/HttpClient.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/HttpClient.pm) + +Line 107. + +*** + +### patch + +#### Signature + +```perl +sub patch($path, %opts) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/HttpClient.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/HttpClient.pm) + +Line 122. + +*** + +### post + +#### Signature + +```perl +sub post($path, %opts) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/HttpClient.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/HttpClient.pm) + +Line 112. + +*** + +### put + +#### Signature + +```perl +sub put($path, %opts) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/HttpClient.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/HttpClient.pm) + +Line 117. + +## Source + +[`lib/SignalWire/REST/HttpClient.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/HttpClient.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/base/base/index.mdx b/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/base/base/index.mdx new file mode 100644 index 0000000000..4dbf5d43c9 --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/base/base/index.mdx @@ -0,0 +1,132 @@ +--- +slug: "/reference/perl/signal-wire/rest/namespaces/base/base" +title: "Base" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::REST::Namespaces::Base" + module: "SignalWire.REST.Namespaces.Base" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Base.pm" +--- +# `Base` + +## Signature + +```perl +package SignalWire::REST::Namespaces::Base +``` + +## Inheritance + +**Extends:** [SignalWire::REST::Namespaces::Base](/docs/sdk-reference/reference/perl/signal-wire/rest/namespaces/base/base) + +## Methods + +### create + +#### Signature + +```perl +sub create(%kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Base.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Base.pm) + +Line 29. + +*** + +### delete\_resource + +#### Signature + +```perl +sub delete_resource($resource_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Base.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Base.pm) + +Line 45. + +*** + +### get + +#### Signature + +```perl +sub get($resource_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Base.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Base.pm) + +Line 34. + +*** + +### list + +#### Signature + +```perl +sub list(@params) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Base.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Base.pm) + +Line 23. + +*** + +### update + +#### Signature + +```perl +sub update($resource_id, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Base.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Base.pm) + +Line 39. + +## Source + +[`lib/SignalWire/REST/Namespaces/Base.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Base.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/calling/calling/index.mdx b/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/calling/calling/index.mdx new file mode 100644 index 0000000000..359396007a --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/calling/calling/index.mdx @@ -0,0 +1,952 @@ +--- +slug: "/reference/perl/signal-wire/rest/namespaces/calling/calling" +title: "Calling" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::REST::Namespaces::Calling" + module: "SignalWire.REST.Namespaces.Calling" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm" +--- +# `Calling` + +## Signature + +```perl +package SignalWire::REST::Namespaces::Calling +``` + +## Inheritance + +**Extends:** [SignalWire::REST::Namespaces::Base](/docs/sdk-reference/reference/perl/signal-wire/rest/namespaces/base/base) + +## Methods + +### ai\_hold + +#### Signature + +```perl +sub ai_hold($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 71. + +*** + +### ai\_message + +#### Signature + +```perl +sub ai_message($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 70. + +*** + +### ai\_stop + +#### Signature + +```perl +sub ai_stop($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 73. + +*** + +### ai\_unhold + +#### Signature + +```perl +sub ai_unhold($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 72. + +*** + +### BUILD + +#### Signature + +```perl +sub BUILD() +``` + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 9. + +*** + +### collect + +#### Signature + +```perl +sub collect($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 45. + +*** + +### collect\_start\_input\_timers + +#### Signature + +```perl +sub collect_start_input_timers($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 47. + +*** + +### collect\_stop + +#### Signature + +```perl +sub collect_stop($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 46. + +*** + +### denoise + +#### Signature + +```perl +sub denoise($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 62. + +*** + +### denoise\_stop + +#### Signature + +```perl +sub denoise_stop($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 63. + +*** + +### detect + +#### Signature + +```perl +sub detect($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 50. + +*** + +### detect\_stop + +#### Signature + +```perl +sub detect_stop($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 51. + +*** + +### dial + +#### Signature + +```perl +sub dial($s, @p) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 22. + +*** + +### disconnect + +#### Signature + +```perl +sub disconnect($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 29. + +*** + +### end + +#### Signature + +```perl +sub end($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 27. + +*** + +### live\_transcribe + +#### Signature + +```perl +sub live_transcribe($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 76. + +*** + +### live\_translate + +#### Signature + +```perl +sub live_translate($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 77. + +*** + +### play + +#### Signature + +```perl +sub play($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 32. + +*** + +### play\_pause + +#### Signature + +```perl +sub play_pause($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 33. + +*** + +### play\_resume + +#### Signature + +```perl +sub play_resume($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 34. + +*** + +### play\_stop + +#### Signature + +```perl +sub play_stop($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 35. + +*** + +### play\_volume + +#### Signature + +```perl +sub play_volume($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 36. + +*** + +### receive\_fax\_stop + +#### Signature + +```perl +sub receive_fax_stop($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 81. + +*** + +### record + +#### Signature + +```perl +sub record($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 39. + +*** + +### record\_pause + +#### Signature + +```perl +sub record_pause($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 40. + +*** + +### record\_resume + +#### Signature + +```perl +sub record_resume($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 41. + +*** + +### record\_stop + +#### Signature + +```perl +sub record_stop($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 42. + +*** + +### refer + +#### Signature + +```perl +sub refer($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 84. + +*** + +### send\_fax\_stop + +#### Signature + +```perl +sub send_fax_stop($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 80. + +*** + +### stream + +#### Signature + +```perl +sub stream($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 58. + +*** + +### stream\_stop + +#### Signature + +```perl +sub stream_stop($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 59. + +*** + +### tap + +#### Signature + +```perl +sub tap($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 54. + +*** + +### tap\_stop + +#### Signature + +```perl +sub tap_stop($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 55. + +*** + +### transcribe + +#### Signature + +```perl +sub transcribe($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 66. + +*** + +### transcribe\_stop + +#### Signature + +```perl +sub transcribe_stop($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 67. + +*** + +### transfer + +#### Signature + +```perl +sub transfer($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 28. + +*** + +### update + +#### Signature + +```perl +sub update($s, @p) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 25. + +*** + +### update\_call + +#### Signature + +```perl +sub update_call($s, @p) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 26. + +*** + +### user\_event + +#### Signature + +```perl +sub user_event($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 87. + +## Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/chat/chat/index.mdx b/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/chat/chat/index.mdx new file mode 100644 index 0000000000..87787665e1 --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/chat/chat/index.mdx @@ -0,0 +1,50 @@ +--- +slug: "/reference/perl/signal-wire/rest/namespaces/chat/chat" +title: "Chat" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::REST::Namespaces::Chat" + module: "SignalWire.REST.Namespaces.Chat" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Chat.pm" +--- +# `Chat` + +## Signature + +```perl +package SignalWire::REST::Namespaces::Chat +``` + +## Inheritance + +**Extends:** [SignalWire::REST::Namespaces::Base](/docs/sdk-reference/reference/perl/signal-wire/rest/namespaces/base/base) + +## Methods + +### create\_token + +#### Signature + +```perl +sub create_token(%kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Chat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Chat.pm) + +Line 7. + +## Source + +[`lib/SignalWire/REST/Namespaces/Chat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Chat.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/compat/compat/index.mdx b/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/compat/compat/index.mdx new file mode 100644 index 0000000000..7f69fcc1b8 --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/compat/compat/index.mdx @@ -0,0 +1,1272 @@ +--- +slug: "/reference/perl/signal-wire/rest/namespaces/compat/compat" +title: "Compat" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::REST::Namespaces::Compat" + module: "SignalWire.REST.Namespaces.Compat" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm" +--- +# `Compat` + +## Signature + +```perl +package SignalWire::REST::Namespaces::Compat +``` + +## Inheritance + +**Extends:** [SignalWire::REST::Namespaces::Base](/docs/sdk-reference/reference/perl/signal-wire/rest/namespaces/base/base), `SignalWire::REST::Namespaces::CrudResource` + +## Methods + +### create + +#### Signature + +```perl +sub create(%kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 17. + +*** + +### create + +#### Signature + +```perl +sub create(%kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 361. + +*** + +### delete + +#### Signature + +```perl +sub delete($sid) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 227. + +*** + +### delete + +#### Signature + +```perl +sub delete($sid) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 324. + +*** + +### delete + +#### Signature + +```perl +sub delete($sid) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 351. + +*** + +### delete + +#### Signature + +```perl +sub delete($token_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 377. + +*** + +### delete\_media + +#### Signature + +```perl +sub delete_media($message_sid, $media_sid) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 83. + +*** + +### delete\_media + +#### Signature + +```perl +sub delete_media($fax_sid, $media_sid) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 109. + +*** + +### delete\_number + +#### Signature + +```perl +sub delete_number($sid) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 221. + +*** + +### delete\_recording + +#### Signature + +```perl +sub delete_recording($conference_sid, $recording_sid) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 172. + +*** + +### delete\_recording + +#### Signature + +```perl +sub delete_recording($sid) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 318. + +*** + +### delete\_token + +#### Signature + +```perl +sub delete_token($token_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 371. + +*** + +### delete\_transcription + +#### Signature + +```perl +sub delete_transcription($sid) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 345. + +*** + +### dequeue\_member + +#### Signature + +```perl +sub dequeue_member($queue_sid, $call_sid, %kwargs) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 297. + +*** + +### get + +#### Signature + +```perl +sub get($sid) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 22. + +*** + +### get + +#### Signature + +```perl +sub get($sid) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 125. + +*** + +### get + +#### Signature + +```perl +sub get($sid) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 211. + +*** + +### get + +#### Signature + +```perl +sub get($sid) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 313. + +*** + +### get + +#### Signature + +```perl +sub get($sid) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 340. + +*** + +### get\_media + +#### Signature + +```perl +sub get_media($message_sid, $media_sid) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 78. + +*** + +### get\_media + +#### Signature + +```perl +sub get_media($fax_sid, $media_sid) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 104. + +*** + +### get\_member + +#### Signature + +```perl +sub get_member($queue_sid, $call_sid) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 292. + +*** + +### get\_participant + +#### Signature + +```perl +sub get_participant($conference_sid, $call_sid) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 141. + +*** + +### get\_recording + +#### Signature + +```perl +sub get_recording($conference_sid, $recording_sid) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 162. + +*** + +### import\_number + +#### Signature + +```perl +sub import_number(%kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 232. + +*** + +### list + +#### Signature + +```perl +sub list(@params) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 11. + +*** + +### list + +#### Signature + +```perl +sub list(@params) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 119. + +*** + +### list + +#### Signature + +```perl +sub list(@params) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 200. + +*** + +### list + +#### Signature + +```perl +sub list(@params) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 307. + +*** + +### list + +#### Signature + +```perl +sub list(@params) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 334. + +*** + +### list\_available\_countries + +#### Signature + +```perl +sub list_available_countries(@params) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 238. + +*** + +### list\_media + +#### Signature + +```perl +sub list_media($message_sid, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 72. + +*** + +### list\_media + +#### Signature + +```perl +sub list_media($fax_sid, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 98. + +*** + +### list\_members + +#### Signature + +```perl +sub list_members($queue_sid, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 286. + +*** + +### list\_participants + +#### Signature + +```perl +sub list_participants($conference_sid, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 135. + +*** + +### list\_recordings + +#### Signature + +```perl +sub list_recordings($conference_sid, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 156. + +*** + +### purchase + +#### Signature + +```perl +sub purchase(%kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 206. + +*** + +### remove\_participant + +#### Signature + +```perl +sub remove_participant($conference_sid, $call_sid) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 151. + +*** + +### search\_local + +#### Signature + +```perl +sub search_local($country, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 244. + +*** + +### search\_toll\_free + +#### Signature + +```perl +sub search_toll_free($country, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 250. + +*** + +### start\_recording + +#### Signature + +```perl +sub start_recording($call_sid, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 42. + +*** + +### start\_stream + +#### Signature + +```perl +sub start_stream($call_sid, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 52. + +*** + +### start\_stream + +#### Signature + +```perl +sub start_stream($conference_sid, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 177. + +*** + +### stop\_stream + +#### Signature + +```perl +sub stop_stream($call_sid, $stream_sid, %kwargs) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 57. + +*** + +### stop\_stream + +#### Signature + +```perl +sub stop_stream($conference_sid, $stream_sid, %kwargs) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 182. + +*** + +### update + +#### Signature + +```perl +sub update($sid, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 27. + +*** + +### update + +#### Signature + +```perl +sub update($sid, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 37. + +*** + +### update + +#### Signature + +```perl +sub update($sid, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 67. + +*** + +### update + +#### Signature + +```perl +sub update($sid, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 93. + +*** + +### update + +#### Signature + +```perl +sub update($sid, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 130. + +*** + +### update + +#### Signature + +```perl +sub update($sid, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 216. + +*** + +### update + +#### Signature + +```perl +sub update($sid, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 261. + +*** + +### update + +#### Signature + +```perl +sub update($sid, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 271. + +*** + +### update + +#### Signature + +```perl +sub update($sid, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 281. + +*** + +### update + +#### Signature + +```perl +sub update($token_id, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 366. + +*** + +### update\_participant + +#### Signature + +```perl +sub update_participant($conference_sid, $call_sid, %kwargs) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 146. + +*** + +### update\_recording + +#### Signature + +```perl +sub update_recording($call_sid, $recording_sid, %kwargs) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 47. + +*** + +### update\_recording + +#### Signature + +```perl +sub update_recording($conference_sid, $recording_sid, %kwargs) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 167. + +## Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/datasphere/datasphere/index.mdx b/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/datasphere/datasphere/index.mdx new file mode 100644 index 0000000000..24251d37e2 --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/datasphere/datasphere/index.mdx @@ -0,0 +1,116 @@ +--- +slug: "/reference/perl/signal-wire/rest/namespaces/datasphere/datasphere" +title: "Datasphere" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::REST::Namespaces::Datasphere" + module: "SignalWire.REST.Namespaces.Datasphere" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Datasphere.pm" +--- +# `Datasphere` + +## Signature + +```perl +package SignalWire::REST::Namespaces::Datasphere +``` + +## Inheritance + +**Extends:** `SignalWire::REST::Namespaces::CrudResource` + +## Methods + +### delete\_chunk + +#### Signature + +```perl +sub delete_chunk($document_id, $chunk_id) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Datasphere.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Datasphere.pm) + +Line 27. + +*** + +### get\_chunk + +#### Signature + +```perl +sub get_chunk($document_id, $chunk_id) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Datasphere.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Datasphere.pm) + +Line 22. + +*** + +### list\_chunks + +#### Signature + +```perl +sub list_chunks($document_id, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Datasphere.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Datasphere.pm) + +Line 16. + +*** + +### search + +#### Signature + +```perl +sub search(%kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Datasphere.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Datasphere.pm) + +Line 11. + +## Source + +[`lib/SignalWire/REST/Namespaces/Datasphere.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Datasphere.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/fabric/fabric/index.mdx b/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/fabric/fabric/index.mdx new file mode 100644 index 0000000000..e9e9656fca --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/fabric/fabric/index.mdx @@ -0,0 +1,578 @@ +--- +slug: "/reference/perl/signal-wire/rest/namespaces/fabric/fabric" +title: "Fabric" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::REST::Namespaces::Fabric" + module: "SignalWire.REST.Namespaces.Fabric" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm" +--- +# `Fabric` + +## Signature + +```perl +package SignalWire::REST::Namespaces::Fabric +``` + +## Inheritance + +**Extends:** `SignalWire::REST::Namespaces::CrudResource`, `SignalWire::REST::Namespaces::Fabric::Resource`, `SignalWire::REST::Namespaces::Fabric::AutoMaterializedWebhook`, `SignalWire::REST::Namespaces::Fabric::ResourcePUT`, [SignalWire::REST::Namespaces::Base](/docs/sdk-reference/reference/perl/signal-wire/rest/namespaces/base/base) + +## Methods + +### assign\_domain\_application + +#### Signature + +```perl +sub assign_domain_application($resource_id, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 189. + +*** + +### assign\_phone\_route + +#### Signature + +```perl +sub assign_phone_route($resource_id, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 177. + +*** + +### create + +#### Signature + +```perl +sub create(%kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 32. + +*** + +### create + +#### Signature + +```perl +sub create(%kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 139. + +*** + +### create\_embed\_token + +#### Signature + +```perl +sub create_embed_token(%kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 235. + +*** + +### create\_guest\_token + +#### Signature + +```perl +sub create_guest_token(%kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 230. + +*** + +### create\_invite\_token + +#### Signature + +```perl +sub create_invite_token(%kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 225. + +*** + +### create\_sip\_endpoint + +#### Signature + +```perl +sub create_sip_endpoint($subscriber_id, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 114. + +*** + +### create\_subscriber\_token + +#### Signature + +```perl +sub create_subscriber_token(%kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 215. + +*** + +### delete + +#### Signature + +```perl +sub delete($resource_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 166. + +*** + +### delete\_resource + +#### Signature + +```perl +sub delete_resource($resource_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 160. + +*** + +### delete\_sip\_endpoint + +#### Signature + +```perl +sub delete_sip_endpoint($subscriber_id, $endpoint_id) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 129. + +*** + +### deploy\_version + +#### Signature + +```perl +sub deploy_version($resource_id, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 85. + +*** + +### get + +#### Signature + +```perl +sub get($resource_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 155. + +*** + +### get + +#### Signature + +```perl +sub get($address_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 205. + +*** + +### get\_sip\_endpoint + +#### Signature + +```perl +sub get_sip_endpoint($subscriber_id, $endpoint_id) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 119. + +*** + +### list + +#### Signature + +```perl +sub list(@params) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 149. + +*** + +### list + +#### Signature + +```perl +sub list(@params) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 199. + +*** + +### list\_addresses + +#### Signature + +```perl +sub list_addresses($resource_id, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 12. + +*** + +### list\_addresses + +#### Signature + +```perl +sub list_addresses($resource_id, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 71. + +*** + +### list\_addresses + +#### Signature + +```perl +sub list_addresses($resource_id, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 96. + +*** + +### list\_addresses + +#### Signature + +```perl +sub list_addresses($resource_id, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 171. + +*** + +### list\_sip\_endpoints + +#### Signature + +```perl +sub list_sip_endpoints($subscriber_id, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 108. + +*** + +### list\_versions + +#### Signature + +```perl +sub list_versions($resource_id, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 78. + +*** + +### refresh\_subscriber\_token + +#### Signature + +```perl +sub refresh_subscriber_token(%kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 220. + +*** + +### update\_sip\_endpoint + +#### Signature + +```perl +sub update_sip_endpoint($subscriber_id, $endpoint_id, %kwargs) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 124. + +## Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/logs/logs/index.mdx b/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/logs/logs/index.mdx new file mode 100644 index 0000000000..3870e0cde7 --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/logs/logs/index.mdx @@ -0,0 +1,192 @@ +--- +slug: "/reference/perl/signal-wire/rest/namespaces/logs/logs" +title: "Logs" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::REST::Namespaces::Logs" + module: "SignalWire.REST.Namespaces.Logs" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Logs.pm" +--- +# `Logs` + +## Signature + +```perl +package SignalWire::REST::Namespaces::Logs +``` + +## Inheritance + +**Extends:** [SignalWire::REST::Namespaces::Base](/docs/sdk-reference/reference/perl/signal-wire/rest/namespaces/base/base) + +## Methods + +### get + +#### Signature + +```perl +sub get($log_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Logs.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Logs.pm) + +Line 17. + +*** + +### get + +#### Signature + +```perl +sub get($log_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Logs.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Logs.pm) + +Line 33. + +*** + +### get + +#### Signature + +```perl +sub get($log_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Logs.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Logs.pm) + +Line 55. + +*** + +### list + +#### Signature + +```perl +sub list(@params) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Logs.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Logs.pm) + +Line 11. + +*** + +### list + +#### Signature + +```perl +sub list(@params) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Logs.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Logs.pm) + +Line 27. + +*** + +### list + +#### Signature + +```perl +sub list(@params) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Logs.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Logs.pm) + +Line 49. + +*** + +### list + +#### Signature + +```perl +sub list(@params) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Logs.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Logs.pm) + +Line 65. + +*** + +### list\_events + +#### Signature + +```perl +sub list_events($log_id, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Logs.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Logs.pm) + +Line 38. + +## Source + +[`lib/SignalWire/REST/Namespaces/Logs.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Logs.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/phone-numbers/phone-numbers/index.mdx b/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/phone-numbers/phone-numbers/index.mdx new file mode 100644 index 0000000000..d32827a5e5 --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/phone-numbers/phone-numbers/index.mdx @@ -0,0 +1,236 @@ +--- +slug: "/reference/perl/signal-wire/rest/namespaces/phone-numbers/phone-numbers" +title: "PhoneNumbers" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::REST::Namespaces::PhoneNumbers" + module: "SignalWire.REST.Namespaces.PhoneNumbers" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/PhoneNumbers.pm" +--- +# `PhoneNumbers` + +Supports the standard CRUD surface plus typed helpers for binding an inbound call to a handler (SWML webhook, cXML webhook, AI agent, call flow, RELAY application/topic). The binding model is: set `call_handler` plus the handler-specific companion field on the phone number; the server auto-materializes the matching Fabric resource. See SignalWire::REST::PhoneCallHandler for the enum. + +**HELPERS** + +- set\_swml\_webhook($sid, url => $url) + + Route inbound calls to an SWML webhook URL. Your backend returns an SWML document per call. The server auto-creates a `swml_webhook` Fabric resource keyed off this URL. + +- set\_cxml\_webhook($sid, url => $url, fallback\_url => $f?, status\_callback\_url => $s?) + + Route inbound calls to a cXML (Twilio-compat / LAML) webhook. Despite the wire value `laml_webhooks` being plural, this creates a single `cxml_webhook` Fabric resource. + +- set\_cxml\_application($sid, application\_id => $id) + + Route inbound calls to an existing cXML application by ID. + +- set\_ai\_agent($sid, agent\_id => $id) + + Route inbound calls to an AI Agent Fabric resource by ID. + +- set\_call\_flow($sid, flow\_id => $id, version => $v?) + + Route inbound calls to a Call Flow by ID. `version` accepts `working_copy` or `current_deployed` (server default when omitted). + +- set\_relay\_application($sid, name => $name) + + Route inbound calls to a named RELAY application. + +- set\_relay\_topic($sid, topic => $topic, status\_callback\_url => $s?) + + Route inbound calls to a RELAY topic (client subscription). + +## Signature + +```perl +package SignalWire::REST::Namespaces::PhoneNumbers +``` + +## Inheritance + +**Extends:** `SignalWire::REST::Namespaces::CrudResource` + +## Methods + +### search + +#### Signature + +```perl +sub search(@params) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/PhoneNumbers.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/PhoneNumbers.pm) + +Line 11. + +*** + +### set\_ai\_agent + +#### Signature + +```perl +sub set_ai_agent($resource_id, @args) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/PhoneNumbers.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/PhoneNumbers.pm) + +Line 65. + +*** + +### set\_call\_flow + +#### Signature + +```perl +sub set_call_flow($resource_id, @args) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/PhoneNumbers.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/PhoneNumbers.pm) + +Line 77. + +*** + +### set\_cxml\_application + +#### Signature + +```perl +sub set_cxml_application($resource_id, @args) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/PhoneNumbers.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/PhoneNumbers.pm) + +Line 53. + +*** + +### set\_cxml\_webhook + +#### Signature + +```perl +sub set_cxml_webhook($resource_id, @args) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/PhoneNumbers.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/PhoneNumbers.pm) + +Line 36. + +*** + +### set\_relay\_application + +#### Signature + +```perl +sub set_relay_application($resource_id, @args) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/PhoneNumbers.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/PhoneNumbers.pm) + +Line 92. + +*** + +### set\_relay\_topic + +#### Signature + +```perl +sub set_relay_topic($resource_id, @args) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/PhoneNumbers.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/PhoneNumbers.pm) + +Line 104. + +*** + +### set\_swml\_webhook + +#### Signature + +```perl +sub set_swml_webhook($resource_id, @args) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/PhoneNumbers.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/PhoneNumbers.pm) + +Line 24. + +## Source + +[`lib/SignalWire/REST/Namespaces/PhoneNumbers.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/PhoneNumbers.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/project/project/index.mdx b/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/project/project/index.mdx new file mode 100644 index 0000000000..fa71c80606 --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/project/project/index.mdx @@ -0,0 +1,112 @@ +--- +slug: "/reference/perl/signal-wire/rest/namespaces/project/project" +title: "Project" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::REST::Namespaces::Project" + module: "SignalWire.REST.Namespaces.Project" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Project.pm" +--- +# `Project` + +## Signature + +```perl +package SignalWire::REST::Namespaces::Project +``` + +## Inheritance + +**Extends:** [SignalWire::REST::Namespaces::Base](/docs/sdk-reference/reference/perl/signal-wire/rest/namespaces/base/base) + +## Methods + +### create + +#### Signature + +```perl +sub create(%kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Project.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Project.pm) + +Line 11. + +*** + +### delete + +#### Signature + +```perl +sub delete($token_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Project.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Project.pm) + +Line 27. + +*** + +### delete\_token + +#### Signature + +```perl +sub delete_token($token_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Project.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Project.pm) + +Line 21. + +*** + +### update + +#### Signature + +```perl +sub update($token_id, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Project.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Project.pm) + +Line 16. + +## Source + +[`lib/SignalWire/REST/Namespaces/Project.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Project.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/pub-sub/pub-sub/index.mdx b/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/pub-sub/pub-sub/index.mdx new file mode 100644 index 0000000000..7ee811fdb0 --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/pub-sub/pub-sub/index.mdx @@ -0,0 +1,50 @@ +--- +slug: "/reference/perl/signal-wire/rest/namespaces/pub-sub/pub-sub" +title: "PubSub" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::REST::Namespaces::PubSub" + module: "SignalWire.REST.Namespaces.PubSub" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/PubSub.pm" +--- +# `PubSub` + +## Signature + +```perl +package SignalWire::REST::Namespaces::PubSub +``` + +## Inheritance + +**Extends:** [SignalWire::REST::Namespaces::Base](/docs/sdk-reference/reference/perl/signal-wire/rest/namespaces/base/base) + +## Methods + +### create\_token + +#### Signature + +```perl +sub create_token(%kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/PubSub.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/PubSub.pm) + +Line 7. + +## Source + +[`lib/SignalWire/REST/Namespaces/PubSub.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/PubSub.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/registry/registry/index.mdx b/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/registry/registry/index.mdx new file mode 100644 index 0000000000..cbd2a2db86 --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/registry/registry/index.mdx @@ -0,0 +1,302 @@ +--- +slug: "/reference/perl/signal-wire/rest/namespaces/registry/registry" +title: "Registry" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::REST::Namespaces::Registry" + module: "SignalWire.REST.Namespaces.Registry" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm" +--- +# `Registry` + +## Signature + +```perl +package SignalWire::REST::Namespaces::Registry +``` + +## Inheritance + +**Extends:** [SignalWire::REST::Namespaces::Base](/docs/sdk-reference/reference/perl/signal-wire/rest/namespaces/base/base) + +## Methods + +### create + +#### Signature + +```perl +sub create(%kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Registry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm) + +Line 17. + +*** + +### create\_campaign + +#### Signature + +```perl +sub create_campaign($brand_id, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Registry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm) + +Line 33. + +*** + +### create\_order + +#### Signature + +```perl +sub create_order($campaign_id, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Registry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm) + +Line 65. + +*** + +### delete + +#### Signature + +```perl +sub delete($number_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Registry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm) + +Line 91. + +*** + +### delete\_number + +#### Signature + +```perl +sub delete_number($number_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Registry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm) + +Line 85. + +*** + +### get + +#### Signature + +```perl +sub get($brand_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Registry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm) + +Line 22. + +*** + +### get + +#### Signature + +```perl +sub get($campaign_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Registry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm) + +Line 43. + +*** + +### get + +#### Signature + +```perl +sub get($order_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Registry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm) + +Line 75. + +*** + +### list + +#### Signature + +```perl +sub list(@params) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Registry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm) + +Line 11. + +*** + +### list\_campaigns + +#### Signature + +```perl +sub list_campaigns($brand_id, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Registry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm) + +Line 27. + +*** + +### list\_numbers + +#### Signature + +```perl +sub list_numbers($campaign_id, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Registry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm) + +Line 53. + +*** + +### list\_orders + +#### Signature + +```perl +sub list_orders($campaign_id, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Registry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm) + +Line 59. + +*** + +### update + +#### Signature + +```perl +sub update($campaign_id, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Registry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm) + +Line 48. + +## Source + +[`lib/SignalWire/REST/Namespaces/Registry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/resources/resources/index.mdx b/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/resources/resources/index.mdx new file mode 100644 index 0000000000..89b7faabc6 --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/resources/resources/index.mdx @@ -0,0 +1,582 @@ +--- +slug: "/reference/perl/signal-wire/rest/namespaces/resources/resources" +title: "Resources" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::REST::Namespaces::Resources" + module: "SignalWire.REST.Namespaces.Resources" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm" +--- +# `Resources` + +## Signature + +```perl +package SignalWire::REST::Namespaces::Resources +``` + +## Inheritance + +**Extends:** [SignalWire::REST::Namespaces::Base](/docs/sdk-reference/reference/perl/signal-wire/rest/namespaces/base/base), `SignalWire::REST::Namespaces::CrudResource` + +## Methods + +### add\_membership + +#### Signature + +```perl +sub add_membership($group_id, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 93. + +*** + +### call + +#### Signature + +```perl +sub call(%kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 191. + +*** + +### create + +#### Signature + +```perl +sub create(%kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 17. + +*** + +### create + +#### Signature + +```perl +sub create(%kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 176. + +*** + +### delete + +#### Signature + +```perl +sub delete($address_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 27. + +*** + +### delete + +#### Signature + +```perl +sub delete($recording_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 76. + +*** + +### delete\_membership + +#### Signature + +```perl +sub delete_membership($membership_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 103. + +*** + +### delete\_recording + +#### Signature + +```perl +sub delete_recording($recording_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 70. + +*** + +### get + +#### Signature + +```perl +sub get($address_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 22. + +*** + +### get + +#### Signature + +```perl +sub get($recording_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 65. + +*** + +### get + +#### Signature + +```perl +sub get() +``` + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 129. + +*** + +### get + +#### Signature + +```perl +sub get($short_code_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 161. + +*** + +### get\_member + +#### Signature + +```perl +sub get_member($queue_id, $member_id) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 49. + +*** + +### get\_membership + +#### Signature + +```perl +sub get_membership($membership_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 98. + +*** + +### get\_next\_member + +#### Signature + +```perl +sub get_next_member($queue_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 44. + +*** + +### list + +#### Signature + +```perl +sub list(@params) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 11. + +*** + +### list + +#### Signature + +```perl +sub list(@params) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 59. + +*** + +### list + +#### Signature + +```perl +sub list(@params) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 155. + +*** + +### list\_members + +#### Signature + +```perl +sub list_members($queue_id, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 38. + +*** + +### list\_memberships + +#### Signature + +```perl +sub list_memberships($group_id, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 87. + +*** + +### phone\_number + +#### Signature + +```perl +sub phone_number($e164, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 144. + +*** + +### redial\_verification + +#### Signature + +```perl +sub redial_verification($caller_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 114. + +*** + +### sms + +#### Signature + +```perl +sub sms(%kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 186. + +*** + +### submit\_verification + +#### Signature + +```perl +sub submit_verification($caller_id, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 119. + +*** + +### update + +#### Signature + +```perl +sub update(%kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 134. + +*** + +### update + +#### Signature + +```perl +sub update($short_code_id, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 166. + +*** + +### verify + +#### Signature + +```perl +sub verify($request_id, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 196. + +## Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/video/video/index.mdx b/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/video/video/index.mdx new file mode 100644 index 0000000000..bd62263119 --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/video/video/index.mdx @@ -0,0 +1,490 @@ +--- +slug: "/reference/perl/signal-wire/rest/namespaces/video/video" +title: "Video" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::REST::Namespaces::Video" + module: "SignalWire.REST.Namespaces.Video" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm" +--- +# `Video` + +## Signature + +```perl +package SignalWire::REST::Namespaces::Video +``` + +## Inheritance + +**Extends:** `SignalWire::REST::Namespaces::CrudResource`, [SignalWire::REST::Namespaces::Base](/docs/sdk-reference/reference/perl/signal-wire/rest/namespaces/base/base) + +## Methods + +### create + +#### Signature + +```perl +sub create(%kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) + +Line 28. + +*** + +### create\_stream + +#### Signature + +```perl +sub create_stream($room_id, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) + +Line 18. + +*** + +### create\_stream + +#### Signature + +```perl +sub create_stream($conference_id, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) + +Line 118. + +*** + +### delete + +#### Signature + +```perl +sub delete($recording_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) + +Line 89. + +*** + +### delete + +#### Signature + +```perl +sub delete($stream_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) + +Line 159. + +*** + +### delete\_recording + +#### Signature + +```perl +sub delete_recording($recording_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) + +Line 83. + +*** + +### delete\_stream + +#### Signature + +```perl +sub delete_stream($stream_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) + +Line 153. + +*** + +### get + +#### Signature + +```perl +sub get($session_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) + +Line 44. + +*** + +### get + +#### Signature + +```perl +sub get($recording_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) + +Line 78. + +*** + +### get + +#### Signature + +```perl +sub get($token_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) + +Line 128. + +*** + +### get + +#### Signature + +```perl +sub get($stream_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) + +Line 143. + +*** + +### list + +#### Signature + +```perl +sub list(@params) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) + +Line 38. + +*** + +### list + +#### Signature + +```perl +sub list(@params) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) + +Line 72. + +*** + +### list\_conference\_tokens + +#### Signature + +```perl +sub list_conference_tokens($conference_id, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) + +Line 106. + +*** + +### list\_events + +#### Signature + +```perl +sub list_events($session_id, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) + +Line 49. + +*** + +### list\_events + +#### Signature + +```perl +sub list_events($recording_id, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) + +Line 94. + +*** + +### list\_members + +#### Signature + +```perl +sub list_members($session_id, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) + +Line 55. + +*** + +### list\_recordings + +#### Signature + +```perl +sub list_recordings($session_id, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) + +Line 61. + +*** + +### list\_streams + +#### Signature + +```perl +sub list_streams($room_id, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) + +Line 12. + +*** + +### list\_streams + +#### Signature + +```perl +sub list_streams($conference_id, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) + +Line 112. + +*** + +### reset + +#### Signature + +```perl +sub reset($token_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) + +Line 133. + +*** + +### update + +#### Signature + +```perl +sub update($stream_id, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) + +Line 148. + +## Source + +[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/rest/pagination/pagination/index.mdx b/fern/products/sdk-reference/perl/signal-wire/rest/pagination/pagination/index.mdx new file mode 100644 index 0000000000..21e251713c --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/rest/pagination/pagination/index.mdx @@ -0,0 +1,78 @@ +--- +slug: "/reference/perl/signal-wire/rest/pagination/pagination" +title: "Pagination" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::REST::Pagination" + module: "SignalWire.REST.Pagination" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Pagination.pm" +--- +# `Pagination` + +Mirrors the Python `signalwire.rest._pagination.PaginatedIterator`. Walks the `links.next` cursor until no further page is advertised. Each fetch is performed via the SDK's SignalWire::REST::HttpClient so authentication and base-URL handling is shared with the rest of the SDK. + +**Synopsis** + +```perl +use SignalWire::REST::Pagination; +``` + +```perl +my $it = SignalWire::REST::Pagination::PaginatedIterator->new( + http => $client->_http, + path => '/api/fabric/addresses', + params => { page_size => 25 }, + data_key => 'data', +); +while (defined(my $item = $it->next)) { + ... +} +``` + +## Signature + +```perl +package SignalWire::REST::Pagination +``` + +## Methods + +### all + +#### Signature + +```perl +sub all() +``` + +#### Source + +[`lib/SignalWire/REST/Pagination.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Pagination.pm) + +Line 85. + +*** + +### BUILD + +#### Signature + +```perl +sub BUILD() +``` + +#### Source + +[`lib/SignalWire/REST/Pagination.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Pagination.pm) + +Line 39. + +## Source + +[`lib/SignalWire/REST/Pagination.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Pagination.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/rest/phone-call-handler/phone-call-handler/index.mdx b/fern/products/sdk-reference/perl/signal-wire/rest/phone-call-handler/phone-call-handler/index.mdx new file mode 100644 index 0000000000..b4b38e8698 --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/rest/phone-call-handler/phone-call-handler/index.mdx @@ -0,0 +1,66 @@ +--- +slug: "/reference/perl/signal-wire/rest/phone-call-handler/phone-call-handler" +title: "PhoneCallHandler" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::REST::PhoneCallHandler" + module: "SignalWire.REST.PhoneCallHandler" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/PhoneCallHandler.pm" +--- +# `PhoneCallHandler` + +## Signature + +```perl +package SignalWire::REST::PhoneCallHandler +``` + +## Constants + + + + + + + + + + + + + + + + + + + + + + + +## Methods + +### values + +#### Signature + +```perl +sub values() +``` + +#### Source + +[`lib/SignalWire/REST/PhoneCallHandler.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/PhoneCallHandler.pm) + +Line 69. + +## Source + +[`lib/SignalWire/REST/PhoneCallHandler.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/PhoneCallHandler.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/rest/rest-client/rest-client/index.mdx b/fern/products/sdk-reference/perl/signal-wire/rest/rest-client/rest-client/index.mdx new file mode 100644 index 0000000000..30d1d5757b --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/rest/rest-client/rest-client/index.mdx @@ -0,0 +1,26 @@ +--- +slug: "/reference/perl/signal-wire/rest/rest-client/rest-client" +title: "RestClient" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::REST::RestClient" + module: "SignalWire.REST.RestClient" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/RestClient.pm" +--- +# `RestClient` + +## Signature + +```perl +package SignalWire::REST::RestClient +``` + +## Source + +[`lib/SignalWire/REST/RestClient.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/RestClient.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/security/session-manager/session-manager/index.mdx b/fern/products/sdk-reference/perl/signal-wire/security/session-manager/session-manager/index.mdx new file mode 100644 index 0000000000..29bcb1c8ca --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/security/session-manager/session-manager/index.mdx @@ -0,0 +1,242 @@ +--- +slug: "/reference/perl/signal-wire/security/session-manager/session-manager" +title: "SessionManager" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Security::SessionManager" + module: "SignalWire.Security.SessionManager" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/SessionManager.pm" +--- +# `SessionManager` + +## Signature + +```perl +package SignalWire::Security::SessionManager +``` + +## Methods + +### activate\_session + +#### Signature + +```perl +sub activate_session($call_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Security/SessionManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/SessionManager.pm) + +Line 127. + +*** + +### create\_session + +#### Signature + +```perl +sub create_session($call_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Security/SessionManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/SessionManager.pm) + +Line 50. + +*** + +### create\_tool\_token + +#### Signature + +```perl +sub create_tool_token($function_name, $call_id) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Security/SessionManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/SessionManager.pm) + +Line 69. + +*** + +### debug\_token + +#### Signature + +```perl +sub debug_token($token) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Security/SessionManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/SessionManager.pm) + +Line 147. + +*** + +### end\_session + +#### Signature + +```perl +sub end_session($call_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Security/SessionManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/SessionManager.pm) + +Line 132. + +*** + +### generate\_token + +#### Signature + +```perl +sub generate_token($function_name, $call_id) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Security/SessionManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/SessionManager.pm) + +Line 56. + +*** + +### get\_session\_metadata + +#### Signature + +```perl +sub get_session_metadata($call_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Security/SessionManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/SessionManager.pm) + +Line 137. + +*** + +### set\_session\_metadata + +#### Signature + +```perl +sub set_session_metadata($call_id, $key, $value) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/Security/SessionManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/SessionManager.pm) + +Line 142. + +*** + +### validate\_token + +#### Signature + +```perl +sub validate_token($call_id, $function_name, $token) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/Security/SessionManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/SessionManager.pm) + +Line 83. + +*** + +### validate\_tool\_token + +#### Signature + +```perl +sub validate_tool_token($function_name, $token, $call_id) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/Security/SessionManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/SessionManager.pm) + +Line 119. + +## Source + +[`lib/SignalWire/Security/SessionManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/SessionManager.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/security/webhook-middleware/webhook-middleware/index.mdx b/fern/products/sdk-reference/perl/signal-wire/security/webhook-middleware/webhook-middleware/index.mdx new file mode 100644 index 0000000000..2888e3648d --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/security/webhook-middleware/webhook-middleware/index.mdx @@ -0,0 +1,67 @@ +--- +slug: "/reference/perl/signal-wire/security/webhook-middleware/webhook-middleware" +title: "WebhookMiddleware" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Security::WebhookMiddleware" + module: "SignalWire.Security.WebhookMiddleware" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/WebhookMiddleware.pm" +--- +# `WebhookMiddleware` + +Wraps a PSGI app so that incoming POST requests must carry a valid `X-SignalWire-Signature` header (or the legacy `X-Twilio-Signature`) matching the configured signing key. Invalid or missing signatures produce a 403 without ever invoking the wrapped app. + +The raw body is captured before validation and stashed on the env as `signalwire.raw_body`; `psgi.input` is rewound (or replaced with a buffer) so downstream handlers can re-read. + +**Synopsis** + +```perl +use SignalWire::Security::WebhookMiddleware; +``` + +```perl +my $wrapped = SignalWire::Security::WebhookMiddleware->wrap( + app => $psgi_app, + signing_key => $ENV{SIGNALWIRE_SIGNING_KEY}, + paths => [ '/', '/swaig', '/post_prompt' ], + trust_proxy => 1, +); +``` + +## Signature + +```perl +package SignalWire::Security::WebhookMiddleware +``` + +## Methods + +### wrap + +#### Signature + +```perl +sub wrap($class, %opts) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Security/WebhookMiddleware.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/WebhookMiddleware.pm) + +Line 63. + +## Source + +[`lib/SignalWire/Security/WebhookMiddleware.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/WebhookMiddleware.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/security/webhook-validator/webhook-validator/index.mdx b/fern/products/sdk-reference/perl/signal-wire/security/webhook-validator/webhook-validator/index.mdx new file mode 100644 index 0000000000..6ab1c7c7b5 --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/security/webhook-validator/webhook-validator/index.mdx @@ -0,0 +1,124 @@ +--- +slug: "/reference/perl/signal-wire/security/webhook-validator/webhook-validator" +title: "WebhookValidator" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Security::WebhookValidator" + module: "SignalWire.Security.WebhookValidator" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/WebhookValidator.pm" +--- +# `WebhookValidator` + +Implements both signature schemes from porting-sdk/webhooks.md: + +- Scheme A (RELAY / SWML / JSON) + + `lower_hex(HMAC-SHA1(key, url + raw_body))` + +- Scheme B (Compat / cXML form) + + `base64(HMAC-SHA1(key, url + sorted_concat_form_params))`, with URL port normalization (try both with / without `:443` / `:80`) and an optional `bodySHA256` query-param fallback for JSON-on-compat. + +The combined entry point tries Scheme A first, then Scheme B in all URL / param-shape variants. All signature comparisons use a constant-time compare so the secret is not leaked across repeated requests. + +**ERROR MODES** + +- Valid signature -> returns `1` + +- Invalid signature -> returns `0` + +- Missing `$signature` -> returns `0` (never throws) + +- Missing `$signing_key` -> croaks (programming error) + +- Reference passed as `$raw_body` -> croaks + +**Synopsis** + +```perl +use SignalWire::Security::WebhookValidator qw( + validate_webhook_signature validate_request +); +``` + +```perl +# JSON / RELAY / SWML callbacks +if (validate_webhook_signature($signing_key, $sig_header, $url, $raw_body)) { + # request is genuine +} +``` + +```perl +# Legacy compat-api drop-in +if (validate_request($signing_key, $sig_header, $url, \%params)) { + # cXML / form-encoded request is genuine +} +``` + +## Signature + +```perl +package SignalWire::Security::WebhookValidator +``` + +## Methods + +### validate\_request + +#### Signature + +```perl +sub validate_request($signing_key, $signature, $url, $params_or_raw_body) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`lib/SignalWire/Security/WebhookValidator.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/WebhookValidator.pm) + +Line 309. + +*** + +### validate\_webhook\_signature + +#### Signature + +```perl +sub validate_webhook_signature($signing_key, $signature, $url, $raw_body) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`lib/SignalWire/Security/WebhookValidator.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/WebhookValidator.pm) + +Line 260. + +## Source + +[`lib/SignalWire/Security/WebhookValidator.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/WebhookValidator.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/server/agent-server/agent-server/index.mdx b/fern/products/sdk-reference/perl/signal-wire/server/agent-server/agent-server/index.mdx new file mode 100644 index 0000000000..61831e7978 --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/server/agent-server/agent-server/index.mdx @@ -0,0 +1,162 @@ +--- +slug: "/reference/perl/signal-wire/server/agent-server/agent-server" +title: "AgentServer" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Server::AgentServer" + module: "SignalWire.Server.AgentServer" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Server/AgentServer.pm" +--- +# `AgentServer` + +## Signature + +```perl +package SignalWire::Server::AgentServer +``` + +## Methods + +### get\_agent + +#### Signature + +```perl +sub get_agent($route) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Server/AgentServer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Server/AgentServer.pm) + +Line 53. + +*** + +### list\_agents + +#### Signature + +```perl +sub list_agents() +``` + +#### Source + +[`lib/SignalWire/Server/AgentServer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Server/AgentServer.pm) + +Line 48. + +*** + +### psgi\_app + +#### Signature + +```perl +sub psgi_app() +``` + +#### Source + +[`lib/SignalWire/Server/AgentServer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Server/AgentServer.pm) + +Line 73. + +*** + +### register + +#### Signature + +```perl +sub register($agent, $route) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Server/AgentServer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Server/AgentServer.pm) + +Line 24. + +*** + +### run + +#### Signature + +```perl +sub run(%opts) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Server/AgentServer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Server/AgentServer.pm) + +Line 218. + +*** + +### serve\_static\_files + +#### Signature + +```perl +sub serve_static_files($directory, $route) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Server/AgentServer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Server/AgentServer.pm) + +Line 58. + +*** + +### unregister + +#### Signature + +```perl +sub unregister($route) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Server/AgentServer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Server/AgentServer.pm) + +Line 40. + +## Source + +[`lib/SignalWire/Server/AgentServer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Server/AgentServer.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/signal-wire/contexts/context-builder/index.mdx b/fern/products/sdk-reference/perl/signal-wire/signal-wire/contexts/context-builder/index.mdx new file mode 100644 index 0000000000..d9917151b4 --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/signal-wire/contexts/context-builder/index.mdx @@ -0,0 +1,27 @@ +--- +slug: "/reference/perl/signal-wire/signal-wire/contexts/context-builder" +title: "ContextBuilder" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "SignalWire::Contexts::ContextBuilder" + parent: "SignalWire::Contexts" + module: "SignalWire.Contexts.ContextBuilder" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Contexts/ContextBuilder.pm" +--- +# `ContextBuilder` + +## Signature + +```perl +package SignalWire::Contexts::ContextBuilder +``` + +## Source + +[`lib/SignalWire/Contexts/ContextBuilder.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Contexts/ContextBuilder.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/signal-wire/contexts/index.mdx b/fern/products/sdk-reference/perl/signal-wire/signal-wire/contexts/index.mdx new file mode 100644 index 0000000000..2e41581910 --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/signal-wire/contexts/index.mdx @@ -0,0 +1,1057 @@ +--- +slug: "/reference/perl/signal-wire/signal-wire/contexts" +title: "Contexts" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Contexts" + parent: "SignalWire" + module: "SignalWire.Contexts" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Contexts.pm" +--- +# `Contexts` + +## Signature + +```perl +package SignalWire::Contexts +``` + +## Modules + + + + + +## Methods + +### add\_bullets + +#### Signature + +```perl +sub add_bullets($title, $bullets) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Contexts.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Contexts.pm) + +Line 123. + +*** + +### add\_bullets + +#### Signature + +```perl +sub add_bullets($title, $bullets) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Contexts.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Contexts.pm) + +Line 517. + +*** + +### add\_context + +#### Signature + +```perl +sub add_context($name) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Contexts.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Contexts.pm) + +Line 681. + +*** + +### add\_enter\_filler + +#### Signature + +```perl +sub add_enter_filler($lang, $fillers) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Contexts.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Contexts.pm) + +Line 537. + +*** + +### add\_exit\_filler + +#### Signature + +```perl +sub add_exit_filler($lang, $fillers) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Contexts.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Contexts.pm) + +Line 546. + +*** + +### add\_gather\_question + +#### Signature + +```perl +sub add_gather_question(%opts) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Contexts.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Contexts.pm) + +Line 245. + +*** + +### add\_question + +#### Signature + +```perl +sub add_question(%opts) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Contexts.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Contexts.pm) + +Line 59. + +*** + +### add\_section + +#### Signature + +```perl +sub add_section($title, $body) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Contexts.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Contexts.pm) + +Line 115. + +*** + +### add\_section + +#### Signature + +```perl +sub add_section($title, $body) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Contexts.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Contexts.pm) + +Line 509. + +*** + +### add\_step + +#### Signature + +```perl +sub add_step($name, %opts) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Contexts.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Contexts.pm) + +Line 360. + +*** + +### add\_system\_bullets + +#### Signature + +```perl +sub add_system_bullets($title, $bullets) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Contexts.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Contexts.pm) + +Line 493. + +*** + +### add\_system\_section + +#### Signature + +```perl +sub add_system_section($title, $body) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Contexts.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Contexts.pm) + +Line 485. + +*** + +### attach\_agent + +#### Signature + +```perl +sub attach_agent($agent) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Contexts.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Contexts.pm) + +Line 667. + +*** + +### clear\_sections + +#### Signature + +```perl +sub clear_sections() +``` + +#### Source + +[`lib/SignalWire/Contexts.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Contexts.pm) + +Line 253. + +*** + +### create\_simple\_context + +#### Signature + +```perl +sub create_simple_context($name) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Contexts.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Contexts.pm) + +Line 859. + +*** + +### get\_context + +#### Signature + +```perl +sub get_context($name) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Contexts.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Contexts.pm) + +Line 693. + +*** + +### get\_step + +#### Signature + +```perl +sub get_step($name) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Contexts.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Contexts.pm) + +Line 380. + +*** + +### has\_contexts + +#### Signature + +```perl +sub has_contexts() +``` + +#### Source + +[`lib/SignalWire/Contexts.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Contexts.pm) + +Line 698. + +*** + +### move\_step + +#### Signature + +```perl +sub move_step($name, $position) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Contexts.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Contexts.pm) + +Line 394. + +*** + +### remove\_step + +#### Signature + +```perl +sub remove_step($name) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Contexts.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Contexts.pm) + +Line 385. + +*** + +### reset + +#### Signature + +```perl +sub reset() +``` + +#### Source + +[`lib/SignalWire/Contexts.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Contexts.pm) + +Line 674. + +*** + +### set\_consolidate + +#### Signature + +```perl +sub set_consolidate($c) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Contexts.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Contexts.pm) + +Line 442. + +*** + +### set\_end + +#### Signature + +```perl +sub set_end($end) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Contexts.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Contexts.pm) + +Line 197. + +*** + +### set\_enter\_fillers + +#### Signature + +```perl +sub set_enter_fillers($fillers) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Contexts.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Contexts.pm) + +Line 525. + +*** + +### set\_exit\_fillers + +#### Signature + +```perl +sub set_exit_fillers($fillers) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Contexts.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Contexts.pm) + +Line 531. + +*** + +### set\_full\_reset + +#### Signature + +```perl +sub set_full_reset($fr) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Contexts.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Contexts.pm) + +Line 448. + +*** + +### set\_functions + +#### Signature + +```perl +sub set_functions($functions) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Contexts.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Contexts.pm) + +Line 167. + +*** + +### set\_gather\_info + +#### Signature + +```perl +sub set_gather_info(%opts) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Contexts.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Contexts.pm) + +Line 215. + +*** + +### set\_initial\_step + +#### Signature + +```perl +sub set_initial_step($step_name) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Contexts.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Contexts.pm) + +Line 410. + +*** + +### set\_isolated + +#### Signature + +```perl +sub set_isolated($iso) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Contexts.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Contexts.pm) + +Line 479. + +*** + +### set\_post\_prompt + +#### Signature + +```perl +sub set_post_prompt($pp) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Contexts.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Contexts.pm) + +Line 428. + +*** + +### set\_prompt + +#### Signature + +```perl +sub set_prompt($prompt) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Contexts.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Contexts.pm) + +Line 501. + +*** + +### set\_reset\_consolidate + +#### Signature + +```perl +sub set_reset_consolidate($c) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Contexts.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Contexts.pm) + +Line 272. + +*** + +### set\_reset\_full\_reset + +#### Signature + +```perl +sub set_reset_full_reset($fr) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Contexts.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Contexts.pm) + +Line 278. + +*** + +### set\_reset\_system\_prompt + +#### Signature + +```perl +sub set_reset_system_prompt($sp) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Contexts.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Contexts.pm) + +Line 260. + +*** + +### set\_reset\_user\_prompt + +#### Signature + +```perl +sub set_reset_user_prompt($up) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Contexts.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Contexts.pm) + +Line 266. + +*** + +### set\_skip\_to\_next\_step + +#### Signature + +```perl +sub set_skip_to_next_step($skip) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Contexts.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Contexts.pm) + +Line 209. + +*** + +### set\_skip\_user\_turn + +#### Signature + +```perl +sub set_skip_user_turn($skip) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Contexts.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Contexts.pm) + +Line 203. + +*** + +### set\_step\_criteria + +#### Signature + +```perl +sub set_step_criteria($criteria) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Contexts.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Contexts.pm) + +Line 131. + +*** + +### set\_system\_prompt + +#### Signature + +```perl +sub set_system_prompt($sp) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Contexts.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Contexts.pm) + +Line 434. + +*** + +### set\_text + +#### Signature + +```perl +sub set_text($text) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Contexts.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Contexts.pm) + +Line 107. + +*** + +### set\_user\_prompt + +#### Signature + +```perl +sub set_user_prompt($up) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Contexts.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Contexts.pm) + +Line 454. + +*** + +### set\_valid\_contexts + +#### Signature + +```perl +sub set_valid_contexts($contexts) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Contexts.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Contexts.pm) + +Line 179. + +*** + +### set\_valid\_contexts + +#### Signature + +```perl +sub set_valid_contexts($contexts) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Contexts.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Contexts.pm) + +Line 416. + +*** + +### set\_valid\_steps + +#### Signature + +```perl +sub set_valid_steps($steps) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Contexts.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Contexts.pm) + +Line 173. + +*** + +### set\_valid\_steps + +#### Signature + +```perl +sub set_valid_steps($steps) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Contexts.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Contexts.pm) + +Line 422. + +*** + +### to\_hash + +#### Signature + +```perl +sub to_hash() +``` + +#### Source + +[`lib/SignalWire/Contexts.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Contexts.pm) + +Line 38. + +*** + +### to\_hash + +#### Signature + +```perl +sub to_hash() +``` + +#### Source + +[`lib/SignalWire/Contexts.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Contexts.pm) + +Line 73. + +*** + +### to\_hash + +#### Signature + +```perl +sub to_hash() +``` + +#### Source + +[`lib/SignalWire/Contexts.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Contexts.pm) + +Line 307. + +*** + +### to\_hash + +#### Signature + +```perl +sub to_hash() +``` + +#### Source + +[`lib/SignalWire/Contexts.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Contexts.pm) + +Line 587. + +*** + +### to\_hash + +#### Signature + +```perl +sub to_hash() +``` + +#### Source + +[`lib/SignalWire/Contexts.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Contexts.pm) + +Line 840. + +*** + +### validate + +#### Signature + +```perl +sub validate() +``` + +#### Source + +[`lib/SignalWire/Contexts.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Contexts.pm) + +Line 703. + +## Source + +[`lib/SignalWire/Contexts.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Contexts.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/signal-wire/data-map/index.mdx b/fern/products/sdk-reference/perl/signal-wire/signal-wire/data-map/index.mdx new file mode 100644 index 0000000000..df48a455b9 --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/signal-wire/data-map/index.mdx @@ -0,0 +1,319 @@ +--- +slug: "/reference/perl/signal-wire/signal-wire/data-map" +title: "DataMap" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::DataMap" + parent: "SignalWire" + module: "SignalWire.DataMap" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/DataMap.pm" +--- +# `DataMap` + +## Signature + +```perl +package SignalWire::DataMap +``` + +## Methods + +### body + +#### Signature + +```perl +sub body($data) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/DataMap.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/DataMap.pm) + +Line 180. + +*** + +### description + +#### Signature + +```perl +sub description($desc) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/DataMap.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/DataMap.pm) + +Line 85. + +*** + +### error\_keys + +#### Signature + +```perl +sub error_keys($keys) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/DataMap.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/DataMap.pm) + +Line 225. + +*** + +### expression + +#### Signature + +```perl +sub expression($test_value, $pattern, $output, %opts) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`lib/SignalWire/DataMap.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/DataMap.pm) + +Line 129. + +*** + +### fallback\_output + +#### Signature + +```perl +sub fallback_output($result) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/DataMap.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/DataMap.pm) + +Line 219. + +*** + +### foreach + +#### Signature + +```perl +sub foreach($config) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/DataMap.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/DataMap.pm) + +Line 196. + +*** + +### global\_error\_keys + +#### Signature + +```perl +sub global_error_keys($keys) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/DataMap.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/DataMap.pm) + +Line 235. + +*** + +### output + +#### Signature + +```perl +sub output($result) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/DataMap.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/DataMap.pm) + +Line 211. + +*** + +### parameter + +#### Signature + +```perl +sub parameter($name, $type, $description, %opts) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`lib/SignalWire/DataMap.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/DataMap.pm) + +Line 108. + +*** + +### params + +#### Signature + +```perl +sub params($data) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/DataMap.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/DataMap.pm) + +Line 188. + +*** + +### purpose + +#### Signature + +```perl +sub purpose($desc) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/DataMap.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/DataMap.pm) + +Line 74. + +*** + +### to\_swaig\_function + +#### Signature + +```perl +sub to_swaig_function() +``` + +#### Source + +[`lib/SignalWire/DataMap.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/DataMap.pm) + +Line 241. + +*** + +### webhook + +#### Signature + +```perl +sub webhook($method, $url, %opts) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/DataMap.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/DataMap.pm) + +Line 152. + +*** + +### webhook\_expressions + +#### Signature + +```perl +sub webhook_expressions($expressions) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/DataMap.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/DataMap.pm) + +Line 172. + +## Source + +[`lib/SignalWire/DataMap.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/DataMap.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/signal-wire/index.mdx b/fern/products/sdk-reference/perl/signal-wire/signal-wire/index.mdx new file mode 100644 index 0000000000..e16993af56 --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/signal-wire/index.mdx @@ -0,0 +1,285 @@ +--- +slug: "/reference/perl/signal-wire/signal-wire" +title: "SignalWire" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire" + module: "SignalWire" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire.pm" +--- +# `SignalWire` + +SignalWire is the Perl port of the SignalWire AI Agents SDK. It provides a framework for building, deploying, and managing AI agents as self-contained web applications that expose HTTP endpoints to interact with the SignalWire platform. + +**CORE MODULES** + +- SignalWire::Agent::AgentBase - Base class for all AI agents + +- SignalWire::SWML::Service - SWML document management + +- SignalWire::SWAIG::FunctionResult - Tool response builder with actions + +- SignalWire::DataMap - Declarative server-side API tools + +- SignalWire::Contexts - Workflow context management + +- SignalWire::Server::AgentServer - Multi-agent HTTP server + +- SignalWire::Relay::Client - WebSocket-based call control + +- SignalWire::REST::RestClient - REST API client + +**DATAMAP TOOLS** + +Declarative API calls evaluated server-side, no webhook required: + +```perl +use SignalWire::DataMap; +``` + +```perl +my $tool = SignalWire::DataMap->new('get_weather') + ->description('Get weather for a location') + ->parameter('city', 'string', 'City name', required => 1) + ->webhook('GET', 'https://api.weather.com/v1?q=${args.city}') + ->output(SignalWire::SWAIG::FunctionResult->new( + 'Weather: ${response.temp}°F' + )); +``` + +```perl +$agent->register_swaig_function($tool->to_swaig_function); +``` + +**ENVIRONMENT VARIABLES** + +- `SWML_BASIC_AUTH_USER` / `SWML_BASIC_AUTH_PASSWORD` - Override auto-generated basic auth credentials + +- `SIGNALWIRE_PROJECT_ID` - Project ID for Relay and REST clients + +- `SIGNALWIRE_API_TOKEN` - API token for Relay and REST clients + +- `SIGNALWIRE_SPACE` - SignalWire space hostname + +**KEY FEATURES** + +- **Prompt Object Model** - Structured, section-based prompt management + +- **Local Tools** - Define tool handlers that execute in your agent process + +- **DataMap Tools** - Server-side API integration without webhooks + +- **Skills System** - Modular, reusable capabilities (datetime, math, web search, etc.) + +- **Contexts** - Branching workflow management for multi-step conversations + +- **Prefabs** - Ready-made agent types (InfoGatherer, Survey, Receptionist, etc.) + +- **Multi-Agent Server** - Host multiple agents in a single process + +- **RELAY Client** - Real-time WebSocket call control + +- **REST Client** - Synchronous HTTP API for SignalWire resources + +**LICENSE** + +This is free software licensed under the MIT License. + +**LOCAL TOOLS** + +Handler subroutines that execute within your agent process: + +```perl +$agent->define_tool( + name => 'lookup_order', + description => 'Look up an order by ID', + parameters => { + type => 'object', + properties => { + order_id => { type => 'string', description => 'Order ID' }, + }, + required => ['order_id'], + }, + handler => sub { + my ($args, $raw) = @_; + my $order = get_order($args->{order_id}); + return SignalWire::SWAIG::FunctionResult->new( + "Order status: $order->{status}" + ); + }, +); +``` + +**SKILLS** + +Pre-built capabilities added with a single call: + +```perl +$agent->add_skill('datetime'); +$agent->add_skill('math'); +$agent->add_skill('web_search', { + api_key => $ENV{GOOGLE_SEARCH_API_KEY}, + search_engine_id => $ENV{GOOGLE_SEARCH_ENGINE_ID}, +}); +``` + +**SOURCE** + +[https://github.com/signalwire/signalwire-agents-perl](https://github.com/signalwire/signalwire-agents-perl) + +**Synopsis** + +```perl +use SignalWire::Agent::AgentBase; +``` + +```perl +my $agent = SignalWire::Agent::AgentBase->new( + name => 'my_agent', + route => '/agent', + host => '0.0.0.0', + port => 3000, +); +``` + +```perl +# Build structured prompts +$agent->prompt_add_section('Role', 'You are a helpful assistant.'); +$agent->prompt_add_section('Rules', + body => ['Be concise', 'Be friendly'], + bullet => '*', +); +``` + +```perl +# Define tools with local handlers +$agent->define_tool( + name => 'get_time', + description => 'Get the current time', + parameters => { type => 'object', properties => {} }, + handler => sub { + my ($args, $raw) = @_; + require SignalWire::SWAIG::FunctionResult; + return SignalWire::SWAIG::FunctionResult->new( + "The time is " . localtime + ); + }, +); +``` + +```perl +# Add built-in skills +$agent->add_skill('datetime'); +$agent->add_skill('math'); +``` + +```perl +# Start the HTTP server +$agent->run(); +``` + +## Signature + +```perl +package SignalWire +``` + +## Classes + + + + + + + + + + + +## Methods + +### add\_skill\_directory + +#### Signature + +```perl +sub add_skill_directory($path) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire.pm) + +Line 97. + +*** + +### list\_skills\_with\_params + +#### Signature + +```perl +sub list_skills_with_params() +``` + +#### Source + +[`lib/SignalWire.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire.pm) + +Line 108. + +*** + +### register\_skill + +#### Signature + +```perl +sub register_skill($skill_class) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire.pm) + +Line 75. + +*** + +### RestClient + +#### Signature + +```perl +sub RestClient(@args, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire.pm) + +Line 49. + +## Source + +[`lib/SignalWire.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/signal-wire/logging/index.mdx b/fern/products/sdk-reference/perl/signal-wire/signal-wire/logging/index.mdx new file mode 100644 index 0000000000..33ad63137e --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/signal-wire/logging/index.mdx @@ -0,0 +1,121 @@ +--- +slug: "/reference/perl/signal-wire/signal-wire/logging" +title: "Logging" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Logging" + parent: "SignalWire" + module: "SignalWire.Logging" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Logging.pm" +--- +# `Logging` + +## Signature + +```perl +package SignalWire::Logging +``` + +## Classes + + + + The four log levels, surfaced as typed, named constants whose values are the exact level strings SignalWire::Logging recognises in its private `%LEVELS` table and emits from `debug`/`info`/`warn`/`error`. + + + +## Methods + +### debug + +#### Signature + +```perl +sub debug() +``` + +#### Source + +[`lib/SignalWire/Logging.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Logging.pm) + +Line 53. + +*** + +### error + +#### Signature + +```perl +sub error() +``` + +#### Source + +[`lib/SignalWire/Logging.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Logging.pm) + +Line 56. + +*** + +### get\_logger + +#### Signature + +```perl +sub get_logger($class, $name) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Logging.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Logging.pm) + +Line 67. + +*** + +### info + +#### Signature + +```perl +sub info() +``` + +#### Source + +[`lib/SignalWire/Logging.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Logging.pm) + +Line 54. + +*** + +### warn + +#### Signature + +```perl +sub warn() +``` + +#### Source + +[`lib/SignalWire/Logging.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Logging.pm) + +Line 55. + +## Source + +[`lib/SignalWire/Logging.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Logging.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/signal-wire/logging/log-level/index.mdx b/fern/products/sdk-reference/perl/signal-wire/signal-wire/logging/log-level/index.mdx new file mode 100644 index 0000000000..60794d7b56 --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/signal-wire/logging/log-level/index.mdx @@ -0,0 +1,157 @@ +--- +slug: "/reference/perl/signal-wire/signal-wire/logging/log-level" +title: "LogLevel" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Logging::LogLevel" + parent: "SignalWire::Logging" + module: "SignalWire.Logging.LogLevel" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Logging/LogLevel.pm" +--- +# `LogLevel` + +The four log levels, surfaced as typed, named constants whose values are the exact level strings SignalWire::Logging recognises in its private `%LEVELS` table and emits from `debug`/`info`/`warn`/`error`. + +The constants **are** the canonical level strings, so nothing about SignalWire::Logging changes: the `level` attribute, the `SIGNALWIRE_LOG_LEVEL` env var, and the level methods all still take / emit plain strings. That keeps parity with the Python reference (stdlib `logging` level names) and leaves any custom threshold string working exactly as before. + +This buys a single source of truth for the four levels (otherwise they live only inside the `%LEVELS` table), plus editor autocomplete and the membership/severity helpers below. + +**ALL** + +my $aref = SignalWire::Logging::LogLevel->all; + +Arrayref of the four level strings in ascending severity (not alphabetical — severity is the natural reading order for log levels). + +**CONSTANTS** + +Exported on request via Exporter; `:all` pulls every constant. + +```perl +DEBUG => 'debug' WARN => 'warn' +INFO => 'info' ERROR => 'error' +``` + +**IS VALID** + +my $bool = SignalWire::Logging::LogLevel->is\_valid($level); + +True if `$level` is one of the four known levels, false otherwise. Accepts the bareword constant too. + +**LICENSE** + +Copyright (c) 2025 SignalWire. Licensed under the MIT License. + +**SEVERITY** + +my $n = SignalWire::Logging::LogLevel->severity($level); + +The ascending-severity integer for `$level` (`debug`=0 .. `error`=3), or `undef` for an unknown level. These are the same threshold numbers SignalWire::Logging uses internally to decide whether a message clears the configured threshold. + +**Synopsis** + +```perl +use SignalWire::Logging::LogLevel qw(DEBUG); +``` + +```perl +my $log = SignalWire::Logging->new( level => DEBUG ); # imported constant +SignalWire::Logging->new( level => 'debug' ); # string (parity) +$ENV{SIGNALWIRE_LOG_LEVEL} = SignalWire::Logging::LogLevel::WARN(); +``` + +```perl +# Membership / ordering helpers: +SignalWire::Logging::LogLevel->is_valid('warn'); # 1 +SignalWire::Logging::LogLevel->severity('error'); # 3 +@{ SignalWire::Logging::LogLevel->all }; # debug,info,warn,error +``` + +## Signature + +```perl +package SignalWire::Logging::LogLevel +``` + +## See Also + +- SignalWire::Logging, SignalWire::Skills::SkillName. + +## Constants + + + + + + + + + +## Methods + +### all + +#### Signature + +```perl +sub all() +``` + +#### Source + +[`lib/SignalWire/Logging/LogLevel.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Logging/LogLevel.pm) + +Line 70. + +*** + +### is\_valid + +#### Signature + +```perl +sub is_valid($class, $level) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Logging/LogLevel.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Logging/LogLevel.pm) + +Line 77. + +*** + +### severity + +#### Signature + +```perl +sub severity($class, $level) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Logging/LogLevel.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Logging/LogLevel.pm) + +Line 86. + +## Source + +[`lib/SignalWire/Logging/LogLevel.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Logging/LogLevel.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/signal-wire/utils/index.mdx b/fern/products/sdk-reference/perl/signal-wire/signal-wire/utils/index.mdx new file mode 100644 index 0000000000..487d6025a4 --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/signal-wire/utils/index.mdx @@ -0,0 +1,49 @@ +--- +slug: "/reference/perl/signal-wire/signal-wire/utils" +title: "Utils" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Utils" + parent: "SignalWire" + module: "SignalWire.Utils" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Utils.pm" +--- +# `Utils` + +## Signature + +```perl +package SignalWire::Utils +``` + +## Classes + + + + + +## Methods + +### is\_serverless\_mode + +#### Signature + +```perl +sub is_serverless_mode() +``` + +#### Source + +[`lib/SignalWire/Utils.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Utils.pm) + +Line 14. + +## Source + +[`lib/SignalWire/Utils.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Utils.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/signal-wire/utils/url-validator/index.mdx b/fern/products/sdk-reference/perl/signal-wire/signal-wire/utils/url-validator/index.mdx new file mode 100644 index 0000000000..45832b88fb --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/signal-wire/utils/url-validator/index.mdx @@ -0,0 +1,49 @@ +--- +slug: "/reference/perl/signal-wire/signal-wire/utils/url-validator" +title: "UrlValidator" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Utils::UrlValidator" + parent: "SignalWire::Utils" + module: "SignalWire.Utils.UrlValidator" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Utils/UrlValidator.pm" +--- +# `UrlValidator` + +## Signature + +```perl +package SignalWire::Utils::UrlValidator +``` + +## Methods + +### validate\_url + +#### Signature + +```perl +sub validate_url($url, $allow_private) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Utils/UrlValidator.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Utils/UrlValidator.pm) + +Line 47. + +## Source + +[`lib/SignalWire/Utils/UrlValidator.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Utils/UrlValidator.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/skills/builtin/api-ninjas-trivia/api-ninjas-trivia/index.mdx b/fern/products/sdk-reference/perl/signal-wire/skills/builtin/api-ninjas-trivia/api-ninjas-trivia/index.mdx new file mode 100644 index 0000000000..f136668b54 --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/skills/builtin/api-ninjas-trivia/api-ninjas-trivia/index.mdx @@ -0,0 +1,78 @@ +--- +slug: "/reference/perl/signal-wire/skills/builtin/api-ninjas-trivia/api-ninjas-trivia" +title: "ApiNinjasTrivia" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Skills::Builtin::ApiNinjasTrivia" + module: "SignalWire.Skills.Builtin.ApiNinjasTrivia" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/ApiNinjasTrivia.pm" +--- +# `ApiNinjasTrivia` + +## Signature + +```perl +package SignalWire::Skills::Builtin::ApiNinjasTrivia +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/signal-wire/skills/skill-base/skill-base) + +## Methods + +### get\_parameter\_schema + +#### Signature + +```perl +sub get_parameter_schema() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/ApiNinjasTrivia.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/ApiNinjasTrivia.pm) + +Line 95. + +*** + +### register\_tools + +#### Signature + +```perl +sub register_tools() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/ApiNinjasTrivia.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/ApiNinjasTrivia.pm) + +Line 48. + +*** + +### setup + +#### Signature + +```perl +sub setup() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/ApiNinjasTrivia.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/ApiNinjasTrivia.pm) + +Line 46. + +## Source + +[`lib/SignalWire/Skills/Builtin/ApiNinjasTrivia.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/ApiNinjasTrivia.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/skills/builtin/claude-skills/claude-skills/index.mdx b/fern/products/sdk-reference/perl/signal-wire/skills/builtin/claude-skills/claude-skills/index.mdx new file mode 100644 index 0000000000..dee46a9be6 --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/skills/builtin/claude-skills/claude-skills/index.mdx @@ -0,0 +1,94 @@ +--- +slug: "/reference/perl/signal-wire/skills/builtin/claude-skills/claude-skills" +title: "ClaudeSkills" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Skills::Builtin::ClaudeSkills" + module: "SignalWire.Skills.Builtin.ClaudeSkills" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/ClaudeSkills.pm" +--- +# `ClaudeSkills` + +## Signature + +```perl +package SignalWire::Skills::Builtin::ClaudeSkills +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/signal-wire/skills/skill-base/skill-base) + +## Methods + +### get\_hints + +#### Signature + +```perl +sub get_hints() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/ClaudeSkills.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/ClaudeSkills.pm) + +Line 41. + +*** + +### get\_parameter\_schema + +#### Signature + +```perl +sub get_parameter_schema() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/ClaudeSkills.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/ClaudeSkills.pm) + +Line 46. + +*** + +### register\_tools + +#### Signature + +```perl +sub register_tools() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/ClaudeSkills.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/ClaudeSkills.pm) + +Line 16. + +*** + +### setup + +#### Signature + +```perl +sub setup() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/ClaudeSkills.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/ClaudeSkills.pm) + +Line 14. + +## Source + +[`lib/SignalWire/Skills/Builtin/ClaudeSkills.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/ClaudeSkills.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/skills/builtin/custom-skills/custom-skills/index.mdx b/fern/products/sdk-reference/perl/signal-wire/skills/builtin/custom-skills/custom-skills/index.mdx new file mode 100644 index 0000000000..20bf99054e --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/skills/builtin/custom-skills/custom-skills/index.mdx @@ -0,0 +1,78 @@ +--- +slug: "/reference/perl/signal-wire/skills/builtin/custom-skills/custom-skills" +title: "CustomSkills" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Skills::Builtin::CustomSkills" + module: "SignalWire.Skills.Builtin.CustomSkills" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/CustomSkills.pm" +--- +# `CustomSkills` + +## Signature + +```perl +package SignalWire::Skills::Builtin::CustomSkills +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/signal-wire/skills/skill-base/skill-base) + +## Methods + +### get\_parameter\_schema + +#### Signature + +```perl +sub get_parameter_schema() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/CustomSkills.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/CustomSkills.pm) + +Line 30. + +*** + +### register\_tools + +#### Signature + +```perl +sub register_tools() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/CustomSkills.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/CustomSkills.pm) + +Line 16. + +*** + +### setup + +#### Signature + +```perl +sub setup() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/CustomSkills.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/CustomSkills.pm) + +Line 14. + +## Source + +[`lib/SignalWire/Skills/Builtin/CustomSkills.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/CustomSkills.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/skills/builtin/datasphere-serverless/datasphere-serverless/index.mdx b/fern/products/sdk-reference/perl/signal-wire/skills/builtin/datasphere-serverless/datasphere-serverless/index.mdx new file mode 100644 index 0000000000..0c4ed2905d --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/skills/builtin/datasphere-serverless/datasphere-serverless/index.mdx @@ -0,0 +1,110 @@ +--- +slug: "/reference/perl/signal-wire/skills/builtin/datasphere-serverless/datasphere-serverless" +title: "DatasphereServerless" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Skills::Builtin::DatasphereServerless" + module: "SignalWire.Skills.Builtin.DatasphereServerless" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/DatasphereServerless.pm" +--- +# `DatasphereServerless` + +## Signature + +```perl +package SignalWire::Skills::Builtin::DatasphereServerless +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/signal-wire/skills/skill-base/skill-base) + +## Methods + +### get\_global\_data + +#### Signature + +```perl +sub get_global_data() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/DatasphereServerless.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/DatasphereServerless.pm) + +Line 47. + +*** + +### get\_hints + +#### Signature + +```perl +sub get_hints() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/DatasphereServerless.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/DatasphereServerless.pm) + +Line 45. + +*** + +### get\_parameter\_schema + +#### Signature + +```perl +sub get_parameter_schema() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/DatasphereServerless.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/DatasphereServerless.pm) + +Line 67. + +*** + +### register\_tools + +#### Signature + +```perl +sub register_tools() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/DatasphereServerless.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/DatasphereServerless.pm) + +Line 17. + +*** + +### setup + +#### Signature + +```perl +sub setup() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/DatasphereServerless.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/DatasphereServerless.pm) + +Line 15. + +## Source + +[`lib/SignalWire/Skills/Builtin/DatasphereServerless.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/DatasphereServerless.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/skills/builtin/datasphere/datasphere/index.mdx b/fern/products/sdk-reference/perl/signal-wire/skills/builtin/datasphere/datasphere/index.mdx new file mode 100644 index 0000000000..103279e9f3 --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/skills/builtin/datasphere/datasphere/index.mdx @@ -0,0 +1,130 @@ +--- +slug: "/reference/perl/signal-wire/skills/builtin/datasphere/datasphere" +title: "Datasphere" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Skills::Builtin::Datasphere" + module: "SignalWire.Skills.Builtin.Datasphere" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Datasphere.pm" +--- +# `Datasphere` + +## Signature + +```perl +package SignalWire::Skills::Builtin::Datasphere +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/signal-wire/skills/skill-base/skill-base) + +## Methods + +### get\_global\_data + +#### Signature + +```perl +sub get_global_data() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/Datasphere.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Datasphere.pm) + +Line 183. + +*** + +### get\_hints + +#### Signature + +```perl +sub get_hints() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/Datasphere.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Datasphere.pm) + +Line 181. + +*** + +### get\_parameter\_schema + +#### Signature + +```perl +sub get_parameter_schema() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/Datasphere.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Datasphere.pm) + +Line 203. + +*** + +### register\_tools + +#### Signature + +```perl +sub register_tools() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/Datasphere.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Datasphere.pm) + +Line 63. + +*** + +### search\_knowledge + +#### Signature + +```perl +sub search_knowledge($query) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Skills/Builtin/Datasphere.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Datasphere.pm) + +Line 107. + +*** + +### setup + +#### Signature + +```perl +sub setup() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/Datasphere.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Datasphere.pm) + +Line 54. + +## Source + +[`lib/SignalWire/Skills/Builtin/Datasphere.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Datasphere.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/skills/builtin/datetime/datetime/index.mdx b/fern/products/sdk-reference/perl/signal-wire/skills/builtin/datetime/datetime/index.mdx new file mode 100644 index 0000000000..2ddfcf4159 --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/skills/builtin/datetime/datetime/index.mdx @@ -0,0 +1,78 @@ +--- +slug: "/reference/perl/signal-wire/skills/builtin/datetime/datetime" +title: "Datetime" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Skills::Builtin::Datetime" + module: "SignalWire.Skills.Builtin.Datetime" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Datetime.pm" +--- +# `Datetime` + +## Signature + +```perl +package SignalWire::Skills::Builtin::Datetime +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/signal-wire/skills/skill-base/skill-base) + +## Methods + +### get\_parameter\_schema + +#### Signature + +```perl +sub get_parameter_schema() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/Datetime.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Datetime.pm) + +Line 78. + +*** + +### register\_tools + +#### Signature + +```perl +sub register_tools() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/Datetime.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Datetime.pm) + +Line 17. + +*** + +### setup + +#### Signature + +```perl +sub setup() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/Datetime.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Datetime.pm) + +Line 15. + +## Source + +[`lib/SignalWire/Skills/Builtin/Datetime.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Datetime.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/skills/builtin/google-maps/google-maps/index.mdx b/fern/products/sdk-reference/perl/signal-wire/skills/builtin/google-maps/google-maps/index.mdx new file mode 100644 index 0000000000..4aa3a916e3 --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/skills/builtin/google-maps/google-maps/index.mdx @@ -0,0 +1,94 @@ +--- +slug: "/reference/perl/signal-wire/skills/builtin/google-maps/google-maps" +title: "GoogleMaps" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Skills::Builtin::GoogleMaps" + module: "SignalWire.Skills.Builtin.GoogleMaps" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/GoogleMaps.pm" +--- +# `GoogleMaps` + +## Signature + +```perl +package SignalWire::Skills::Builtin::GoogleMaps +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/signal-wire/skills/skill-base/skill-base) + +## Methods + +### get\_hints + +#### Signature + +```perl +sub get_hints() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/GoogleMaps.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/GoogleMaps.pm) + +Line 65. + +*** + +### get\_parameter\_schema + +#### Signature + +```perl +sub get_parameter_schema() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/GoogleMaps.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/GoogleMaps.pm) + +Line 80. + +*** + +### register\_tools + +#### Signature + +```perl +sub register_tools() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/GoogleMaps.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/GoogleMaps.pm) + +Line 16. + +*** + +### setup + +#### Signature + +```perl +sub setup() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/GoogleMaps.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/GoogleMaps.pm) + +Line 14. + +## Source + +[`lib/SignalWire/Skills/Builtin/GoogleMaps.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/GoogleMaps.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/skills/builtin/info-gatherer/info-gatherer/index.mdx b/fern/products/sdk-reference/perl/signal-wire/skills/builtin/info-gatherer/info-gatherer/index.mdx new file mode 100644 index 0000000000..b52d0799b1 --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/skills/builtin/info-gatherer/info-gatherer/index.mdx @@ -0,0 +1,94 @@ +--- +slug: "/reference/perl/signal-wire/skills/builtin/info-gatherer/info-gatherer" +title: "InfoGatherer" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Skills::Builtin::InfoGatherer" + module: "SignalWire.Skills.Builtin.InfoGatherer" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/InfoGatherer.pm" +--- +# `InfoGatherer` + +## Signature + +```perl +package SignalWire::Skills::Builtin::InfoGatherer +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/signal-wire/skills/skill-base/skill-base) + +## Methods + +### get\_global\_data + +#### Signature + +```perl +sub get_global_data() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/InfoGatherer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/InfoGatherer.pm) + +Line 60. + +*** + +### get\_parameter\_schema + +#### Signature + +```perl +sub get_parameter_schema() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/InfoGatherer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/InfoGatherer.pm) + +Line 86. + +*** + +### register\_tools + +#### Signature + +```perl +sub register_tools() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/InfoGatherer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/InfoGatherer.pm) + +Line 17. + +*** + +### setup + +#### Signature + +```perl +sub setup() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/InfoGatherer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/InfoGatherer.pm) + +Line 15. + +## Source + +[`lib/SignalWire/Skills/Builtin/InfoGatherer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/InfoGatherer.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/skills/builtin/joke/joke/index.mdx b/fern/products/sdk-reference/perl/signal-wire/skills/builtin/joke/joke/index.mdx new file mode 100644 index 0000000000..fc5a6c99a9 --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/skills/builtin/joke/joke/index.mdx @@ -0,0 +1,94 @@ +--- +slug: "/reference/perl/signal-wire/skills/builtin/joke/joke" +title: "Joke" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Skills::Builtin::Joke" + module: "SignalWire.Skills.Builtin.Joke" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Joke.pm" +--- +# `Joke` + +## Signature + +```perl +package SignalWire::Skills::Builtin::Joke +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/signal-wire/skills/skill-base/skill-base) + +## Methods + +### get\_global\_data + +#### Signature + +```perl +sub get_global_data() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/Joke.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Joke.pm) + +Line 49. + +*** + +### get\_parameter\_schema + +#### Signature + +```perl +sub get_parameter_schema() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/Joke.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Joke.pm) + +Line 64. + +*** + +### register\_tools + +#### Signature + +```perl +sub register_tools() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/Joke.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Joke.pm) + +Line 17. + +*** + +### setup + +#### Signature + +```perl +sub setup() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/Joke.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Joke.pm) + +Line 15. + +## Source + +[`lib/SignalWire/Skills/Builtin/Joke.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Joke.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/skills/builtin/math/math/index.mdx b/fern/products/sdk-reference/perl/signal-wire/skills/builtin/math/math/index.mdx new file mode 100644 index 0000000000..abf99037bc --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/skills/builtin/math/math/index.mdx @@ -0,0 +1,78 @@ +--- +slug: "/reference/perl/signal-wire/skills/builtin/math/math" +title: "Math" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Skills::Builtin::Math" + module: "SignalWire.Skills.Builtin.Math" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Math.pm" +--- +# `Math` + +## Signature + +```perl +package SignalWire::Skills::Builtin::Math +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/signal-wire/skills/skill-base/skill-base) + +## Methods + +### get\_parameter\_schema + +#### Signature + +```perl +sub get_parameter_schema() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/Math.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Math.pm) + +Line 62. + +*** + +### register\_tools + +#### Signature + +```perl +sub register_tools() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/Math.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Math.pm) + +Line 16. + +*** + +### setup + +#### Signature + +```perl +sub setup() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/Math.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Math.pm) + +Line 14. + +## Source + +[`lib/SignalWire/Skills/Builtin/Math.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Math.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/skills/builtin/mcp-gateway/mcp-gateway/index.mdx b/fern/products/sdk-reference/perl/signal-wire/skills/builtin/mcp-gateway/mcp-gateway/index.mdx new file mode 100644 index 0000000000..98bb44b9c4 --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/skills/builtin/mcp-gateway/mcp-gateway/index.mdx @@ -0,0 +1,110 @@ +--- +slug: "/reference/perl/signal-wire/skills/builtin/mcp-gateway/mcp-gateway" +title: "McpGateway" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Skills::Builtin::McpGateway" + module: "SignalWire.Skills.Builtin.McpGateway" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/McpGateway.pm" +--- +# `McpGateway` + +## Signature + +```perl +package SignalWire::Skills::Builtin::McpGateway +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/signal-wire/skills/skill-base/skill-base) + +## Methods + +### get\_global\_data + +#### Signature + +```perl +sub get_global_data() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/McpGateway.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/McpGateway.pm) + +Line 54. + +*** + +### get\_hints + +#### Signature + +```perl +sub get_hints() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/McpGateway.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/McpGateway.pm) + +Line 45. + +*** + +### get\_parameter\_schema + +#### Signature + +```perl +sub get_parameter_schema() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/McpGateway.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/McpGateway.pm) + +Line 71. + +*** + +### register\_tools + +#### Signature + +```perl +sub register_tools() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/McpGateway.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/McpGateway.pm) + +Line 16. + +*** + +### setup + +#### Signature + +```perl +sub setup() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/McpGateway.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/McpGateway.pm) + +Line 14. + +## Source + +[`lib/SignalWire/Skills/Builtin/McpGateway.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/McpGateway.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/skills/builtin/native-vector-search/native-vector-search/index.mdx b/fern/products/sdk-reference/perl/signal-wire/skills/builtin/native-vector-search/native-vector-search/index.mdx new file mode 100644 index 0000000000..5aaba8a129 --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/skills/builtin/native-vector-search/native-vector-search/index.mdx @@ -0,0 +1,94 @@ +--- +slug: "/reference/perl/signal-wire/skills/builtin/native-vector-search/native-vector-search" +title: "NativeVectorSearch" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Skills::Builtin::NativeVectorSearch" + module: "SignalWire.Skills.Builtin.NativeVectorSearch" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/NativeVectorSearch.pm" +--- +# `NativeVectorSearch` + +## Signature + +```perl +package SignalWire::Skills::Builtin::NativeVectorSearch +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/signal-wire/skills/skill-base/skill-base) + +## Methods + +### get\_hints + +#### Signature + +```perl +sub get_hints() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/NativeVectorSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/NativeVectorSearch.pm) + +Line 42. + +*** + +### get\_parameter\_schema + +#### Signature + +```perl +sub get_parameter_schema() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/NativeVectorSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/NativeVectorSearch.pm) + +Line 57. + +*** + +### register\_tools + +#### Signature + +```perl +sub register_tools() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/NativeVectorSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/NativeVectorSearch.pm) + +Line 16. + +*** + +### setup + +#### Signature + +```perl +sub setup() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/NativeVectorSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/NativeVectorSearch.pm) + +Line 14. + +## Source + +[`lib/SignalWire/Skills/Builtin/NativeVectorSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/NativeVectorSearch.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/skills/builtin/play-background-file/play-background-file/index.mdx b/fern/products/sdk-reference/perl/signal-wire/skills/builtin/play-background-file/play-background-file/index.mdx new file mode 100644 index 0000000000..50e0801179 --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/skills/builtin/play-background-file/play-background-file/index.mdx @@ -0,0 +1,78 @@ +--- +slug: "/reference/perl/signal-wire/skills/builtin/play-background-file/play-background-file" +title: "PlayBackgroundFile" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Skills::Builtin::PlayBackgroundFile" + module: "SignalWire.Skills.Builtin.PlayBackgroundFile" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/PlayBackgroundFile.pm" +--- +# `PlayBackgroundFile` + +## Signature + +```perl +package SignalWire::Skills::Builtin::PlayBackgroundFile +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/signal-wire/skills/skill-base/skill-base) + +## Methods + +### get\_parameter\_schema + +#### Signature + +```perl +sub get_parameter_schema() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/PlayBackgroundFile.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/PlayBackgroundFile.pm) + +Line 57. + +*** + +### register\_tools + +#### Signature + +```perl +sub register_tools() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/PlayBackgroundFile.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/PlayBackgroundFile.pm) + +Line 16. + +*** + +### setup + +#### Signature + +```perl +sub setup() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/PlayBackgroundFile.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/PlayBackgroundFile.pm) + +Line 14. + +## Source + +[`lib/SignalWire/Skills/Builtin/PlayBackgroundFile.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/PlayBackgroundFile.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/skills/builtin/spider/spider/index.mdx b/fern/products/sdk-reference/perl/signal-wire/skills/builtin/spider/spider/index.mdx new file mode 100644 index 0000000000..9bf9b8250b --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/skills/builtin/spider/spider/index.mdx @@ -0,0 +1,114 @@ +--- +slug: "/reference/perl/signal-wire/skills/builtin/spider/spider" +title: "Spider" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Skills::Builtin::Spider" + module: "SignalWire.Skills.Builtin.Spider" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Spider.pm" +--- +# `Spider` + +## Signature + +```perl +package SignalWire::Skills::Builtin::Spider +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/signal-wire/skills/skill-base/skill-base) + +## Methods + +### get\_hints + +#### Signature + +```perl +sub get_hints() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/Spider.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Spider.pm) + +Line 180. + +*** + +### get\_parameter\_schema + +#### Signature + +```perl +sub get_parameter_schema() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/Spider.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Spider.pm) + +Line 184. + +*** + +### register\_tools + +#### Signature + +```perl +sub register_tools() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/Spider.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Spider.pm) + +Line 50. + +*** + +### scrape\_url + +#### Signature + +```perl +sub scrape_url($url) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Skills/Builtin/Spider.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Spider.pm) + +Line 119. + +*** + +### setup + +#### Signature + +```perl +sub setup() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/Spider.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Spider.pm) + +Line 48. + +## Source + +[`lib/SignalWire/Skills/Builtin/Spider.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Spider.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/skills/builtin/swml-transfer/swml-transfer/index.mdx b/fern/products/sdk-reference/perl/signal-wire/skills/builtin/swml-transfer/swml-transfer/index.mdx new file mode 100644 index 0000000000..0b52178304 --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/skills/builtin/swml-transfer/swml-transfer/index.mdx @@ -0,0 +1,94 @@ +--- +slug: "/reference/perl/signal-wire/skills/builtin/swml-transfer/swml-transfer" +title: "SwmlTransfer" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Skills::Builtin::SwmlTransfer" + module: "SignalWire.Skills.Builtin.SwmlTransfer" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/SwmlTransfer.pm" +--- +# `SwmlTransfer` + +## Signature + +```perl +package SignalWire::Skills::Builtin::SwmlTransfer +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/signal-wire/skills/skill-base/skill-base) + +## Methods + +### get\_hints + +#### Signature + +```perl +sub get_hints() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/SwmlTransfer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/SwmlTransfer.pm) + +Line 57. + +*** + +### get\_parameter\_schema + +#### Signature + +```perl +sub get_parameter_schema() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/SwmlTransfer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/SwmlTransfer.pm) + +Line 82. + +*** + +### register\_tools + +#### Signature + +```perl +sub register_tools() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/SwmlTransfer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/SwmlTransfer.pm) + +Line 16. + +*** + +### setup + +#### Signature + +```perl +sub setup() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/SwmlTransfer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/SwmlTransfer.pm) + +Line 14. + +## Source + +[`lib/SignalWire/Skills/Builtin/SwmlTransfer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/SwmlTransfer.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/skills/builtin/weather-api/weather-api/index.mdx b/fern/products/sdk-reference/perl/signal-wire/skills/builtin/weather-api/weather-api/index.mdx new file mode 100644 index 0000000000..042f9f4863 --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/skills/builtin/weather-api/weather-api/index.mdx @@ -0,0 +1,78 @@ +--- +slug: "/reference/perl/signal-wire/skills/builtin/weather-api/weather-api" +title: "WeatherApi" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Skills::Builtin::WeatherApi" + module: "SignalWire.Skills.Builtin.WeatherApi" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WeatherApi.pm" +--- +# `WeatherApi` + +## Signature + +```perl +package SignalWire::Skills::Builtin::WeatherApi +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/signal-wire/skills/skill-base/skill-base) + +## Methods + +### get\_parameter\_schema + +#### Signature + +```perl +sub get_parameter_schema() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/WeatherApi.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WeatherApi.pm) + +Line 67. + +*** + +### register\_tools + +#### Signature + +```perl +sub register_tools() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/WeatherApi.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WeatherApi.pm) + +Line 16. + +*** + +### setup + +#### Signature + +```perl +sub setup() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/WeatherApi.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WeatherApi.pm) + +Line 14. + +## Source + +[`lib/SignalWire/Skills/Builtin/WeatherApi.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WeatherApi.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/skills/builtin/web-search/web-search/index.mdx b/fern/products/sdk-reference/perl/signal-wire/skills/builtin/web-search/web-search/index.mdx new file mode 100644 index 0000000000..f151952c17 --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/skills/builtin/web-search/web-search/index.mdx @@ -0,0 +1,114 @@ +--- +slug: "/reference/perl/signal-wire/skills/builtin/web-search/web-search" +title: "WebSearch" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Skills::Builtin::WebSearch" + module: "SignalWire.Skills.Builtin.WebSearch" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WebSearch.pm" +--- +# `WebSearch` + +## Signature + +```perl +package SignalWire::Skills::Builtin::WebSearch +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/signal-wire/skills/skill-base/skill-base) + +## Methods + +### get\_global\_data + +#### Signature + +```perl +sub get_global_data() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/WebSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WebSearch.pm) + +Line 307. + +*** + +### get\_parameter\_schema + +#### Signature + +```perl +sub get_parameter_schema() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/WebSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WebSearch.pm) + +Line 326. + +*** + +### register\_tools + +#### Signature + +```perl +sub register_tools() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/WebSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WebSearch.pm) + +Line 138. + +*** + +### search\_web + +#### Signature + +```perl +sub search_web($query) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Skills/Builtin/WebSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WebSearch.pm) + +Line 167. + +*** + +### setup + +#### Signature + +```perl +sub setup() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/WebSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WebSearch.pm) + +Line 86. + +## Source + +[`lib/SignalWire/Skills/Builtin/WebSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WebSearch.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/skills/builtin/wikipedia-search/wikipedia-search/index.mdx b/fern/products/sdk-reference/perl/signal-wire/skills/builtin/wikipedia-search/wikipedia-search/index.mdx new file mode 100644 index 0000000000..1df9496e1a --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/skills/builtin/wikipedia-search/wikipedia-search/index.mdx @@ -0,0 +1,98 @@ +--- +slug: "/reference/perl/signal-wire/skills/builtin/wikipedia-search/wikipedia-search" +title: "WikipediaSearch" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Skills::Builtin::WikipediaSearch" + module: "SignalWire.Skills.Builtin.WikipediaSearch" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WikipediaSearch.pm" +--- +# `WikipediaSearch` + +## Signature + +```perl +package SignalWire::Skills::Builtin::WikipediaSearch +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/signal-wire/skills/skill-base/skill-base) + +## Methods + +### get\_parameter\_schema + +#### Signature + +```perl +sub get_parameter_schema() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/WikipediaSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WikipediaSearch.pm) + +Line 189. + +*** + +### register\_tools + +#### Signature + +```perl +sub register_tools() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/WikipediaSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WikipediaSearch.pm) + +Line 77. + +*** + +### search\_wiki + +#### Signature + +```perl +sub search_wiki($query) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Skills/Builtin/WikipediaSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WikipediaSearch.pm) + +Line 112. + +*** + +### setup + +#### Signature + +```perl +sub setup() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/WikipediaSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WikipediaSearch.pm) + +Line 64. + +## Source + +[`lib/SignalWire/Skills/Builtin/WikipediaSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WikipediaSearch.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/skills/skill-base/skill-base/index.mdx b/fern/products/sdk-reference/perl/signal-wire/skills/skill-base/skill-base/index.mdx new file mode 100644 index 0000000000..108b1aa798 --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/skills/skill-base/skill-base/index.mdx @@ -0,0 +1,254 @@ +--- +slug: "/reference/perl/signal-wire/skills/skill-base/skill-base" +title: "SkillBase" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Skills::SkillBase" + module: "SignalWire.Skills.SkillBase" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillBase.pm" +--- +# `SkillBase` + +SignalWire::Skills::SkillBase is the Perl port of the Python reference's `SkillBase`. Every built-in or custom skill extends it. A skill declares metadata (`skill_name`, `skill_description`, `skill_version`), optional package / environment requirements, and overrides the abstract `setup` and `register_tools` hooks to wire its SWAIG tools onto the owning agent. + +Construction fails fast (Moo `isa` constraints): `skill_name` / `skill_description` must be non-empty strings, `agent` must be a blessed object, `required_packages` / `required_env_vars` must be arrayrefs, and `params` / `swaig_fields` must be hashrefs. + +**ATTRIBUTES** + +`skill_name`, `skill_description`, `skill_version`, `supports_multiple_instances`, `required_packages`, `required_env_vars`, `agent`, `params`, `swaig_fields`. + +**LICENSE** + +Copyright (c) 2025 SignalWire. Licensed under the MIT License. + +**METHODS** + +- `setup` / `register_tools` — abstract; a subclass **must** override both (the defaults `croak`). + +- `define_tool(%opts)` — register a SWAIG tool on the agent, merging the skill's `swaig_fields` into the definition. + +- `get_hints` / `get_global_data` / `get_prompt_sections` — default no-op contributions a subclass may override; `get_prompt_sections` honours the `skip_prompt` param. + +- `cleanup` — teardown hook (no-op by default). + +- `validate_env_vars` — true iff every `required_env_vars` entry is set in `%ENV`. + +- `get_parameter_schema` — the JSON-schema-ish description of the config params the skill accepts. + +- `get_instance_key` — the registry key for this skill instance (`skill_name`, optionally suffixed by `tool_name`). + +**Synopsis** + +```perl +package SignalWire::Skills::Builtin::MySkill; +use Moo; +extends 'SignalWire::Skills::SkillBase'; +``` + +```perl +has '+skill_name' => ( default => sub { 'my_skill' } ); +has '+skill_description' => ( default => sub { 'Does a thing' } ); +``` + +```perl +sub setup ($self) { ...; return 1; } +sub register_tools ($self) { + $self->define_tool( name => 'do_thing', ... ); +} +``` + +## Signature + +```perl +package SignalWire::Skills::SkillBase +``` + +## See Also + +- SignalWire::Skills::SkillRegistry, SignalWire::Skills::SkillManager, SignalWire::Skills::SkillName. + +## Methods + +### BUILD + +#### Signature + +```perl +sub BUILD() +``` + +#### Source + +[`lib/SignalWire/Skills/SkillBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillBase.pm) + +Line 45. + +*** + +### cleanup + +#### Signature + +```perl +sub cleanup() +``` + +#### Source + +[`lib/SignalWire/Skills/SkillBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillBase.pm) + +Line 87. + +*** + +### define\_tool + +#### Signature + +```perl +sub define_tool() +``` + +#### Source + +[`lib/SignalWire/Skills/SkillBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillBase.pm) + +Line 64. + +*** + +### get\_global\_data + +#### Signature + +```perl +sub get_global_data() +``` + +#### Source + +[`lib/SignalWire/Skills/SkillBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillBase.pm) + +Line 74. + +*** + +### get\_hints + +#### Signature + +```perl +sub get_hints() +``` + +#### Source + +[`lib/SignalWire/Skills/SkillBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillBase.pm) + +Line 70. + +*** + +### get\_instance\_key + +#### Signature + +```perl +sub get_instance_key() +``` + +#### Source + +[`lib/SignalWire/Skills/SkillBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillBase.pm) + +Line 106. + +*** + +### get\_parameter\_schema + +#### Signature + +```perl +sub get_parameter_schema() +``` + +#### Source + +[`lib/SignalWire/Skills/SkillBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillBase.pm) + +Line 98. + +*** + +### get\_prompt\_sections + +#### Signature + +```perl +sub get_prompt_sections() +``` + +#### Source + +[`lib/SignalWire/Skills/SkillBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillBase.pm) + +Line 78. + +*** + +### register\_tools + +#### Signature + +```perl +sub register_tools() +``` + +#### Source + +[`lib/SignalWire/Skills/SkillBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillBase.pm) + +Line 58. + +*** + +### setup + +#### Signature + +```perl +sub setup() +``` + +#### Source + +[`lib/SignalWire/Skills/SkillBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillBase.pm) + +Line 54. + +*** + +### validate\_env\_vars + +#### Signature + +```perl +sub validate_env_vars() +``` + +#### Source + +[`lib/SignalWire/Skills/SkillBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillBase.pm) + +Line 91. + +## Source + +[`lib/SignalWire/Skills/SkillBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillBase.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/skills/skill-manager/skill-manager/index.mdx b/fern/products/sdk-reference/perl/signal-wire/skills/skill-manager/skill-manager/index.mdx new file mode 100644 index 0000000000..a226292054 --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/skills/skill-manager/skill-manager/index.mdx @@ -0,0 +1,106 @@ +--- +slug: "/reference/perl/signal-wire/skills/skill-manager/skill-manager" +title: "SkillManager" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Skills::SkillManager" + module: "SignalWire.Skills.SkillManager" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillManager.pm" +--- +# `SkillManager` + +## Signature + +```perl +package SignalWire::Skills::SkillManager +``` + +## Methods + +### has\_skill + +#### Signature + +```perl +sub has_skill($key) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Skills/SkillManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillManager.pm) + +Line 108. + +*** + +### list\_skills + +#### Signature + +```perl +sub list_skills() +``` + +#### Source + +[`lib/SignalWire/Skills/SkillManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillManager.pm) + +Line 103. + +*** + +### load\_skill + +#### Signature + +```perl +sub load_skill($skill_name, $skill_class, $params) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/Skills/SkillManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillManager.pm) + +Line 13. + +*** + +### unload\_skill + +#### Signature + +```perl +sub unload_skill($key) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Skills/SkillManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillManager.pm) + +Line 93. + +## Source + +[`lib/SignalWire/Skills/SkillManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillManager.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/skills/skill-name/skill-name/index.mdx b/fern/products/sdk-reference/perl/signal-wire/skills/skill-name/skill-name/index.mdx new file mode 100644 index 0000000000..d457ccd1e5 --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/skills/skill-name/skill-name/index.mdx @@ -0,0 +1,151 @@ +--- +slug: "/reference/perl/signal-wire/skills/skill-name/skill-name" +title: "SkillName" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Skills::SkillName" + module: "SignalWire.Skills.SkillName" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillName.pm" +--- +# `SkillName` + +The 18 built-in skill names, surfaced as typed, named constants. Each constant's value is the skill's registered wire name — the exact string passed to `SkillRegistry->register_skill` in the matching `SignalWire::Skills::Builtin::*` module. + +The constants **are** the canonical wire strings, so nothing about `AgentBase->add_skill` / `remove_skill` / `has_skill` changes: they still take a string. That keeps parity with the Python reference (a bare `str`) and leaves custom / third-party skill names working automatically — an unknown string is simply not in this set. + +This buys a single source of truth for the built-in names (otherwise they live only inside `SkillRegistry::_load_all_builtins` and the test suite), plus editor autocomplete and the membership/iteration helpers below. + +**ALL** + +my $aref = SignalWire::Skills::SkillName->all; + +Arrayref of the 18 built-in skill wire names, sorted so the order matches `SkillRegistry->list_skills`. + +**CONSTANTS** + +Exported on request via Exporter; `:all` pulls every name. The full set: `API_NINJAS_TRIVIA`, `CLAUDE_SKILLS`, `CUSTOM_SKILLS`, `DATASPHERE`, `DATASPHERE_SERVERLESS`, `DATETIME`, `GOOGLE_MAPS`, `INFO_GATHERER`, `JOKE`, `MATH`, `MCP_GATEWAY`, `NATIVE_VECTOR_SEARCH`, `PLAY_BACKGROUND_FILE`, `SPIDER`, `SWML_TRANSFER`, `WEATHER_API`, `WEB_SEARCH`, `WIKIPEDIA_SEARCH`. + +**IS BUILTIN** + +my $bool = SignalWire::Skills::SkillName->is\_builtin($name); + +True if `$name` is one of the built-in skills, false for custom / unknown names. Accepts the bareword constant too. + +**LICENSE** + +Copyright (c) 2025 SignalWire. Licensed under the MIT License. + +**Synopsis** + +```perl +use SignalWire::Skills::SkillName qw(DATETIME); +``` + +```perl +$agent->add_skill( DATETIME ); # imported constant +$agent->add_skill( 'datetime' ); # string (Python parity) +$agent->add_skill( 'my_custom_skill' ); # open set: custom skill +``` + +```perl +# Membership / iteration helpers: +SignalWire::Skills::SkillName->is_builtin('datetime'); # 1 +SignalWire::Skills::SkillName->is_builtin('my_custom'); # 0 +@{ SignalWire::Skills::SkillName->all }; # 18 names +``` + +## Signature + +```perl +package SignalWire::Skills::SkillName +``` + +## See Also + +- SignalWire::Skills::SkillRegistry, SignalWire::Skills::SkillManager, SignalWire::Skills::SkillBase. + +## Constants + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## Methods + +### all + +#### Signature + +```perl +sub all() +``` + +#### Source + +[`lib/SignalWire/Skills/SkillName.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillName.pm) + +Line 101. + +*** + +### is\_builtin + +#### Signature + +```perl +sub is_builtin($class, $name) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Skills/SkillName.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillName.pm) + +Line 108. + +## Source + +[`lib/SignalWire/Skills/SkillName.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillName.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/skills/skill-registry/skill-registry/index.mdx b/fern/products/sdk-reference/perl/signal-wire/skills/skill-registry/skill-registry/index.mdx new file mode 100644 index 0000000000..8f333776ff --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/skills/skill-registry/skill-registry/index.mdx @@ -0,0 +1,146 @@ +--- +slug: "/reference/perl/signal-wire/skills/skill-registry/skill-registry" +title: "SkillRegistry" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Skills::SkillRegistry" + module: "SignalWire.Skills.SkillRegistry" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillRegistry.pm" +--- +# `SkillRegistry` + +## Signature + +```perl +package SignalWire::Skills::SkillRegistry +``` + +## Methods + +### add\_skill\_directory + +#### Signature + +```perl +sub add_skill_directory($class, $path) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Skills/SkillRegistry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillRegistry.pm) + +Line 118. + +*** + +### clear\_registry + +#### Signature + +```perl +sub clear_registry() +``` + +#### Source + +[`lib/SignalWire/Skills/SkillRegistry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillRegistry.pm) + +Line 106. + +*** + +### get\_all\_skills\_schema + +#### Signature + +```perl +sub get_all_skills_schema() +``` + +#### Source + +[`lib/SignalWire/Skills/SkillRegistry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillRegistry.pm) + +Line 54. + +*** + +### get\_factory + +#### Signature + +```perl +sub get_factory($class, $skill_name) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Skills/SkillRegistry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillRegistry.pm) + +Line 19. + +*** + +### list\_skills + +#### Signature + +```perl +sub list_skills($class) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Skills/SkillRegistry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillRegistry.pm) + +Line 39. + +*** + +### register\_skill + +#### Signature + +```perl +sub register_skill($class, $skill_name, $skill_class) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/Skills/SkillRegistry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillRegistry.pm) + +Line 14. + +## Source + +[`lib/SignalWire/Skills/SkillRegistry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillRegistry.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/swaig/function-result/function-result/index.mdx b/fern/products/sdk-reference/perl/signal-wire/swaig/function-result/function-result/index.mdx new file mode 100644 index 0000000000..9976530ab1 --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/swaig/function-result/function-result/index.mdx @@ -0,0 +1,895 @@ +--- +slug: "/reference/perl/signal-wire/swaig/function-result/function-result" +title: "FunctionResult" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::SWAIG::FunctionResult" + module: "SignalWire.SWAIG.FunctionResult" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm" +--- +# `FunctionResult` + +SignalWire::SWAIG::FunctionResult is the Perl port of `signalwire.core.function_result.FunctionResult`. A SWAIG function handler returns one of these to tell the agent what to say and which call-control actions to perform. The action list is serialised to the wire shape the SignalWire AI engine expects. + +Most mutators return `$self` so calls chain fluently. The constructor accepts either `new(response => $text)`, the positional shorthand `new($text)`, or `new($text, post_process => 1)`. + +The class-method payment helpers (`create_payment_prompt`, `create_payment_action`, `create_payment_parameter`) may be invoked as class or instance methods — they build plain hashrefs and hold no state. + +**ADVANCED / RPC** + +`execute_swml`, `execute_rpc`, `rpc_dial`, `rpc_ai_message`, `rpc_ai_unhold`. + +**CALL CONTROL** + +`connect`, `swml_transfer`, `hangup`, `hold`, `wait_for_user`, `stop`, `join_conference`, `join_room`, `sip_refer`, `send_sms`, `pay`. + +**CORE** + +`set_response`, `set_post_process`, `add_action`, `add_actions`. + +**LICENSE** + +Copyright (c) 2025 SignalWire. Licensed under the MIT License. + +**MEDIA** + +`say`, `play_background_file`, `stop_background_file`, `record_call`, `stop_record_call`, `tap`, `stop_tap`. + +**METHODS** + +The surface mirrors the Python reference; see that documentation for the authoritative per-argument contract. Grouped by area: + +**SERIALIZATION** + +`to_hash` (the Python `to_dict` equivalent) and `to_json`. + +**SPEECH AND AI** + +`add_dynamic_hints`, `clear_dynamic_hints`, `set_end_of_speech_timeout`, `set_speech_event_timeout`, `toggle_functions`, `enable_functions_on_timeout`, `enable_extensive_data`, `update_settings`, `simulate_user_input`. + +**STATE AND DATA** + +`update_global_data`, `remove_global_data`, `set_metadata`, `remove_metadata`, `swml_user_event`, `swml_change_step`, `swml_change_context`, `switch_context`, `replace_in_history`. + +**Synopsis** + +```perl +use SignalWire::SWAIG::FunctionResult; +``` + +```perl +# Plain spoken response: +my $result = SignalWire::SWAIG::FunctionResult->new('Order placed.'); +``` + +```perl +# Response plus call-control actions (chainable, fluent style): +my $result = SignalWire::SWAIG::FunctionResult->new + ->set_response('Connecting you now.') + ->connect('+15551234567', final => 1); +``` + +```perl +my $payload = $result->to_hash; # ready for JSON emission +my $json = $result->to_json; +``` + +## Signature + +```perl +package SignalWire::SWAIG::FunctionResult +``` + +## See Also + +- SignalWire::SWAIG::RecordCall, SignalWire::SWAIG::Tap, and SignalWire::SWAIG::JoinConference for the typed closed sets accepted by `record_call`, `tap`, and `join_conference`. + +## Methods + +### add\_action + +#### Signature + +```perl +sub add_action() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 74. + +*** + +### add\_actions + +#### Signature + +```perl +sub add_actions() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 79. + +*** + +### add\_dynamic\_hints + +#### Signature + +```perl +sub add_dynamic_hints() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 301. + +*** + +### clear\_dynamic\_hints + +#### Signature + +```perl +sub clear_dynamic_hints() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 305. + +*** + +### connect + +#### Signature + +```perl +sub connect() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 86. + +*** + +### create\_payment\_action + +#### Signature + +```perl +sub create_payment_action() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 719. + +*** + +### create\_payment\_parameter + +#### Signature + +```perl +sub create_payment_parameter() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 723. + +*** + +### create\_payment\_prompt + +#### Signature + +```perl +sub create_payment_prompt() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 703. + +*** + +### enable\_extensive\_data + +#### Signature + +```perl +sub enable_extensive_data() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 327. + +*** + +### enable\_functions\_on\_timeout + +#### Signature + +```perl +sub enable_functions_on_timeout() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 322. + +*** + +### execute\_rpc + +#### Signature + +```perl +sub execute_rpc() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 628. + +*** + +### execute\_swml + +#### Signature + +```perl +sub execute_swml() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 338. + +*** + +### hangup + +#### Signature + +```perl +sub hangup() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 127. + +*** + +### hold + +#### Signature + +```perl +sub hold() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 131. + +*** + +### join\_conference + +#### Signature + +```perl +sub join_conference() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 374. + +*** + +### join\_room + +#### Signature + +```perl +sub join_room() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 486. + +*** + +### pay + +#### Signature + +```perl +sub pay() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 573. + +*** + +### play\_background\_file + +#### Signature + +```perl +sub play_background_file() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 227. + +*** + +### record\_call + +#### Signature + +```perl +sub record_call() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 239. + +*** + +### remove\_global\_data + +#### Signature + +```perl +sub remove_global_data() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 166. + +*** + +### remove\_metadata + +#### Signature + +```perl +sub remove_metadata() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 174. + +*** + +### replace\_in\_history + +#### Signature + +```perl +sub replace_in_history() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 216. + +*** + +### rpc\_ai\_message + +#### Signature + +```perl +sub rpc_ai_message() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 672. + +*** + +### rpc\_ai\_unhold + +#### Signature + +```perl +sub rpc_ai_unhold() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 687. + +*** + +### rpc\_dial + +#### Signature + +```perl +sub rpc_dial() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 651. + +*** + +### say + +#### Signature + +```perl +sub say() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 223. + +*** + +### send\_sms + +#### Signature + +```perl +sub send_sms() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 544. + +*** + +### set\_end\_of\_speech\_timeout + +#### Signature + +```perl +sub set_end_of_speech_timeout() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 310. + +*** + +### set\_metadata + +#### Signature + +```perl +sub set_metadata() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 170. + +*** + +### set\_post\_process + +#### Signature + +```perl +sub set_post_process() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 69. + +*** + +### set\_response + +#### Signature + +```perl +sub set_response() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 64. + +*** + +### set\_speech\_event\_timeout + +#### Signature + +```perl +sub set_speech_event_timeout() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 314. + +*** + +### simulate\_user\_input + +#### Signature + +```perl +sub simulate_user_input() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 697. + +*** + +### sip\_refer + +#### Signature + +```perl +sub sip_refer() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 494. + +*** + +### stop + +#### Signature + +```perl +sub stop() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 156. + +*** + +### stop\_background\_file + +#### Signature + +```perl +sub stop_background_file() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 235. + +*** + +### stop\_record\_call + +#### Signature + +```perl +sub stop_record_call() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 287. + +*** + +### stop\_tap + +#### Signature + +```perl +sub stop_tap() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 532. + +*** + +### switch\_context + +#### Signature + +```perl +sub switch_context() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 198. + +*** + +### swml\_change\_context + +#### Signature + +```perl +sub swml_change_context() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 194. + +*** + +### swml\_change\_step + +#### Signature + +```perl +sub swml_change_step() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 190. + +*** + +### swml\_transfer + +#### Signature + +```perl +sub swml_transfer() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 107. + +*** + +### swml\_user\_event + +#### Signature + +```perl +sub swml_user_event() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 178. + +*** + +### tap + +#### Signature + +```perl +sub tap() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 502. + +*** + +### to\_hash + +#### Signature + +```perl +sub to_hash() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 729. + +*** + +### to\_json + +#### Signature + +```perl +sub to_json() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 747. + +*** + +### toggle\_functions + +#### Signature + +```perl +sub toggle_functions() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 318. + +*** + +### update\_global\_data + +#### Signature + +```perl +sub update_global_data() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 162. + +*** + +### update\_settings + +#### Signature + +```perl +sub update_settings() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 332. + +*** + +### wait\_for\_user + +#### Signature + +```perl +sub wait_for_user() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 138. + +## Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/swaig/join-conference/join-conference/index.mdx b/fern/products/sdk-reference/perl/signal-wire/swaig/join-conference/join-conference/index.mdx new file mode 100644 index 0000000000..eb9c53ea35 --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/swaig/join-conference/join-conference/index.mdx @@ -0,0 +1,279 @@ +--- +slug: "/reference/perl/signal-wire/swaig/join-conference/join-conference" +title: "JoinConference" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::SWAIG::JoinConference" + module: "SignalWire.SWAIG.JoinConference" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/JoinConference.pm" +--- +# `JoinConference` + +The four closed-set string parameters of SignalWire::SWAIG::FunctionResult's `join_conference` verb, surfaced as typed, named constants: + +- **BEEP** — beep behaviour: `true`, `false`, `onEnter`, or `onExit`. + +- **RECORD** — recording mode: `do-not-record` or `record-from-start`. + +- **TRIM** — silence trimming: `trim-silence` or `do-not-trim`. + +- **METHOD** — HTTP method for the status / recording-status callbacks: `GET` or `POST` (shared by `status_callback_method` and `recording_status_callback_method`). + +`join_conference` validates each inline and dies on anything outside the set, reproducing the Python reference's exact `ValueError` messages (e.g. `beep must be one of ['true', 'false', 'onEnter', 'onExit']`). This module hoists those literal sets into a single source of truth so the accepted values are discoverable and autocompletable. The constants **are** the canonical wire strings, so `join_conference`'s signature is unchanged, preserving Python parity. + +The constant **names** use shouting identifiers (`ON_ENTER`); the **values** are the camelCase wire strings the SWML verb expects (`onEnter`). + +**BEEPS / RECORDS / TRIMS / METHODS** + +my $aref = SignalWire::SWAIG::JoinConference->beeps; +my $aref = SignalWire::SWAIG::JoinConference->records; +my $aref = SignalWire::SWAIG::JoinConference->trims; +my $aref = SignalWire::SWAIG::JoinConference->methods; + +Arrayrefs of the accepted strings for each set, in the order `join_conference` lists them in its validation messages. + +**CONSTANTS** + +Exported on request via Exporter. Tags: `:beep`, `:record`, `:trim`, `:methods`, and `:all`. + +```perl +BEEP_TRUE => 'true' DO_NOT_RECORD => 'do-not-record' +BEEP_FALSE => 'false' RECORD_FROM_START => 'record-from-start' +ON_ENTER => 'onEnter' TRIM_SILENCE => 'trim-silence' +ON_EXIT => 'onExit' DO_NOT_TRIM => 'do-not-trim' +GET => 'GET' POST => 'POST' +``` + +**IS BEEP / IS RECORD / IS TRIM / IS METHOD** + +my $bool = SignalWire::SWAIG::JoinConference->is\_beep($value); +my $bool = SignalWire::SWAIG::JoinConference->is\_record($value); +my $bool = SignalWire::SWAIG::JoinConference->is\_trim($value); +my $bool = SignalWire::SWAIG::JoinConference->is\_method($value); + +True if `$value` is an accepted member of the corresponding set. Each accepts the bareword constant too (it is just the string). + +**LICENSE** + +Copyright (c) 2025 SignalWire. Licensed under the MIT License. + +**Synopsis** + +```perl +use SignalWire::SWAIG::JoinConference qw(ON_ENTER RECORD_FROM_START); +use SignalWire::SWAIG::FunctionResult; +``` + +```perl +my $result = SignalWire::SWAIG::FunctionResult->new; +``` + +```perl +# Named constants and bare wire strings are interchangeable: +$result->join_conference( 'lobby', + beep => ON_ENTER, + record => RECORD_FROM_START ); +$result->join_conference( 'lobby', + beep => 'onEnter', + record => 'record-from-start' ); +``` + +```perl +# Membership / iteration helpers: +SignalWire::SWAIG::JoinConference->is_beep('onEnter'); # 1 +@{ SignalWire::SWAIG::JoinConference->records }; # do-not-record,... +``` + +## Signature + +```perl +package SignalWire::SWAIG::JoinConference +``` + +## See Also + +- SignalWire::SWAIG::FunctionResult, SignalWire::SWAIG::RecordCall, SignalWire::SWAIG::Tap. + +## Constants + + + + + + + + + + + + + + + + + + + + + +## Methods + +### beeps + +#### Signature + +```perl +sub beeps() +``` + +#### Source + +[`lib/SignalWire/SWAIG/JoinConference.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/JoinConference.pm) + +Line 104. + +*** + +### is\_beep + +#### Signature + +```perl +sub is_beep($class, $value) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/SWAIG/JoinConference.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/JoinConference.pm) + +Line 117. + +*** + +### is\_method + +#### Signature + +```perl +sub is_method($class, $value) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/SWAIG/JoinConference.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/JoinConference.pm) + +Line 141. + +*** + +### is\_record + +#### Signature + +```perl +sub is_record($class, $value) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/SWAIG/JoinConference.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/JoinConference.pm) + +Line 125. + +*** + +### is\_trim + +#### Signature + +```perl +sub is_trim($class, $value) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/SWAIG/JoinConference.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/JoinConference.pm) + +Line 133. + +*** + +### methods + +#### Signature + +```perl +sub methods() +``` + +#### Source + +[`lib/SignalWire/SWAIG/JoinConference.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/JoinConference.pm) + +Line 113. + +*** + +### records + +#### Signature + +```perl +sub records() +``` + +#### Source + +[`lib/SignalWire/SWAIG/JoinConference.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/JoinConference.pm) + +Line 107. + +*** + +### trims + +#### Signature + +```perl +sub trims() +``` + +#### Source + +[`lib/SignalWire/SWAIG/JoinConference.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/JoinConference.pm) + +Line 110. + +## Source + +[`lib/SignalWire/SWAIG/JoinConference.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/JoinConference.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/swaig/parameter-schema/parameter-schema/index.mdx b/fern/products/sdk-reference/perl/signal-wire/swaig/parameter-schema/parameter-schema/index.mdx new file mode 100644 index 0000000000..1167516675 --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/swaig/parameter-schema/parameter-schema/index.mdx @@ -0,0 +1,288 @@ +--- +slug: "/reference/perl/signal-wire/swaig/parameter-schema/parameter-schema" +title: "ParameterSchema" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::SWAIG::ParameterSchema" + module: "SignalWire.SWAIG.ParameterSchema" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/ParameterSchema.pm" +--- +# `ParameterSchema` + +A SWAIG tool's argument schema is the JSON-Schema `parameters` object that SignalWire::Agent::AgentBase's `define_tool` renders into the SWAIG function block. It is normally written by hand as nested hashrefs. This class builds the **exact same hashref** through a fluent, named, typed API: `->to_hash` returns the identical `{ type => 'object', properties => {...}, required => [...] }` structure a hand-written literal produces, byte for byte (`required` is omitted when no property was marked required, just as hand-written schemas omit it). + +It is a **convenience over the same wire output, not a new format**. The untyped-hashref path into `define_tool` is unchanged and still accepted, so Python parity and every existing caller keep working; the builder is purely additive (see PORT\_ADDITIONS.md). This is the Perl realisation of the cross-port Tier-2 flagship idiom: a typed SWAIG tool-parameter builder. + +**LICENSE** + +Copyright (c) 2025 SignalWire. Licensed under the MIT License. + +**MARKING REQUIRED FIELDS** + +- `->required(@names)` — mark already-declared properties required. Accumulates across calls and de-duplicates on emit, preserving first-seen order. Equivalent to passing `required => 1` on each kind call. + +**NEW** + +my $schema = SignalWire::SWAIG::ParameterSchema->new; + +Construct an empty builder. + +**PROPERTY KINDS** + +Each kind method has the form `->KIND($name, $description, %opts)` and returns `$self` so calls chain. The `$description` second positional is the LLM-facing prompt text (it may also be given as `description => ...` in `%opts`). `%opts` carries the optional facets: `required => 1` (shorthand for also calling `->required($name)`), `default => ...`, `enum => [...]`, `format => ...`, and any other JSON-Schema keyword, emitted verbatim in caller-given order. + +- `->string($name, $desc, %opts)` — `{ type => 'string' }`. + +- `->number($name, $desc, %opts)` — `{ type => 'number' }`. + +- `->integer($name, $desc, %opts)` — `{ type => 'integer' }`. + +- `->boolean($name, $desc, %opts)` — `{ type => 'boolean' }`. + +- `->enum($name, $values, $desc, %opts)` — a closed-set string, `{ type => 'string', enum => [ @$values ] }`. `$values` is an arrayref of accepted values; pass a Tier-1 constant set directly (`SignalWire::SWAIG::RecordCall->formats`, `SignalWire::SWAIG::Tap->codecs`, ...) so the schema's `enum` is single-sourced from the same closed set the verb validates against. Pass `type => 'integer'` in `%opts` for a numeric enum. + +- `->array($name, $desc, %opts)` — `{ type => 'array' }`, with an optional `of => ...` element spec rendered as `items`. `of` may be a kind-name string (`'string'`, `'object'`, ...), a nested `ParameterSchema`, or a raw hashref items schema. Omit `of` for an untyped array. + +- `->object($name, $desc, %opts)` — `{ type => 'object' }`, with an optional `properties => ...` nested spec. `properties` may be a nested `ParameterSchema`, a coderef called with a fresh child schema, or a raw hashref. The nested `properties`/`required` are spliced in. Omit `properties` for an open object. + +**REQUIRED** + +$schema->required('a', 'b'); + +Mark properties required. See \["Marking required fields"]\(Marking required fields). Returns `$self`. + +**STRING / NUMBER / INTEGER / BOOLEAN / ENUM / ARRAY / OBJECT** + +Add a property of the named kind. See \["Property kinds"]\(Property kinds). Each returns `$self`. Dies on a duplicate property name. + +**TO DICT** + +Alias for "to\_hash", matching the SDK's serialiser naming. Identical output. + +**TO HASH** + +my $params = $schema->to\_hash; + +Render the JSON-Schema `parameters` hashref. `required` is omitted when empty. The result is is\_deeply- and JSON-identical to the equivalent hand-written literal and shares no references with the builder's internal state. + +**Synopsis** + +```perl +use SignalWire::SWAIG::ParameterSchema; +use SignalWire::SWAIG::RecordCall; +``` + +```perl +my $params = SignalWire::SWAIG::ParameterSchema->new + ->string('service', 'The service to book') + ->string('date', 'Appointment date, YYYY-MM-DD') + ->enum('format', SignalWire::SWAIG::RecordCall->formats, + 'Recording container format') + ->integer('seats', 'How many seats', default => 1) + ->required('service', 'date') + ->to_hash; +``` + +```perl +# $params is the SAME hashref you would have hand-written: +# { +# type => 'object', +# properties => { +# service => { type => 'string', description => 'The service to book' }, +# date => { type => 'string', description => 'Appointment date, YYYY-MM-DD' }, +# format => { type => 'string', description => 'Recording container format', +# enum => ['wav','mp3','mp4'] }, +# seats => { type => 'integer', description => 'How many seats', default => 1 }, +# }, +# required => ['service','date'], +# } +``` + +```perl +$agent->define_tool( + name => 'book_appointment', + description => 'Book an appointment for a service on a date.', + parameters => $params, # typed-built, same wire shape + handler => sub { ... }, +); +``` + +## Signature + +```perl +package SignalWire::SWAIG::ParameterSchema +``` + +## See Also + +- SignalWire::Agent::AgentBase (`define_tool`), SignalWire::SWML::Service (`define_tool`), SignalWire::SWAIG::RecordCall, SignalWire::SWAIG::Tap (Tier-1 closed-set constant sets that drop into `->enum`), SignalWire::POM::Section (sibling Tier-2 typed-builder idiom). + +## Methods + +### array + +#### Signature + +```perl +sub array() +``` + +#### Source + +[`lib/SignalWire/SWAIG/ParameterSchema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/ParameterSchema.pm) + +Line 149. + +*** + +### boolean + +#### Signature + +```perl +sub boolean() +``` + +#### Source + +[`lib/SignalWire/SWAIG/ParameterSchema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/ParameterSchema.pm) + +Line 118. + +*** + +### enum + +#### Signature + +```perl +sub enum() +``` + +#### Source + +[`lib/SignalWire/SWAIG/ParameterSchema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/ParameterSchema.pm) + +Line 129. + +*** + +### integer + +#### Signature + +```perl +sub integer() +``` + +#### Source + +[`lib/SignalWire/SWAIG/ParameterSchema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/ParameterSchema.pm) + +Line 113. + +*** + +### number + +#### Signature + +```perl +sub number() +``` + +#### Source + +[`lib/SignalWire/SWAIG/ParameterSchema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/ParameterSchema.pm) + +Line 108. + +*** + +### object + +#### Signature + +```perl +sub object() +``` + +#### Source + +[`lib/SignalWire/SWAIG/ParameterSchema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/ParameterSchema.pm) + +Line 176. + +*** + +### required + +#### Signature + +```perl +sub required() +``` + +#### Source + +[`lib/SignalWire/SWAIG/ParameterSchema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/ParameterSchema.pm) + +Line 189. + +*** + +### string + +#### Signature + +```perl +sub string() +``` + +#### Source + +[`lib/SignalWire/SWAIG/ParameterSchema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/ParameterSchema.pm) + +Line 103. + +*** + +### to\_dict + +#### Signature + +```perl +sub to_dict() +``` + +#### Source + +[`lib/SignalWire/SWAIG/ParameterSchema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/ParameterSchema.pm) + +Line 230. + +*** + +### to\_hash + +#### Signature + +```perl +sub to_hash() +``` + +#### Source + +[`lib/SignalWire/SWAIG/ParameterSchema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/ParameterSchema.pm) + +Line 210. + +## Source + +[`lib/SignalWire/SWAIG/ParameterSchema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/ParameterSchema.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/swaig/record-call/record-call/index.mdx b/fern/products/sdk-reference/perl/signal-wire/swaig/record-call/record-call/index.mdx new file mode 100644 index 0000000000..16fe1cc9c1 --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/swaig/record-call/record-call/index.mdx @@ -0,0 +1,192 @@ +--- +slug: "/reference/perl/signal-wire/swaig/record-call/record-call" +title: "RecordCall" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::SWAIG::RecordCall" + module: "SignalWire.SWAIG.RecordCall" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/RecordCall.pm" +--- +# `RecordCall` + +The two closed-set string parameters of SignalWire::SWAIG::FunctionResult's `record_call` verb, surfaced as typed, named constants: + +- **FORMAT** — the recording container: `wav`, `mp3`, or `mp4`. + +- **DIRECTION** — which audio channel(s) to capture: `speak`, `listen`, or `both`. + +These sets are not merely advisory. `record_call` validates both inline and dies on anything outside the set; this module hoists those literal sets into a single source of truth so the accepted values are discoverable and autocompletable instead of living only inside the `die` strings. The constants **are** the canonical wire strings, so `record_call`'s signature is unchanged — it still takes plain `format => ...` / `direction => ...` strings, preserving Python parity. + +The record `direction` here is the write-side record-channel selector. It is unrelated to the read-only inbound/outbound `direction` field on Relay message events, and it uses `listen` where SignalWire::SWAIG::Tap uses `hear` — the two vocabularies must never be unified. + +**CONSTANTS** + +Exported on request via Exporter. The `:formats` tag pulls `WAV`/`MP3`/`MP4`; `:directions` pulls `SPEAK`/`LISTEN`/`BOTH`; `:all` pulls every constant. + +```perl +WAV => 'wav' SPEAK => 'speak' +MP3 => 'mp3' LISTEN => 'listen' +MP4 => 'mp4' BOTH => 'both' +``` + +**DIRECTIONS** + +my $aref = SignalWire::SWAIG::RecordCall->directions; + +Arrayref of the accepted record-direction strings. + +**FORMATS** + +my $aref = SignalWire::SWAIG::RecordCall->formats; + +Arrayref of the accepted format strings, in the order `record_call` lists them in its validation message. + +**IS DIRECTION** + +my $bool = SignalWire::SWAIG::RecordCall->is\_direction($value); + +True if `$value` is an accepted record direction. + +**IS FORMAT** + +my $bool = SignalWire::SWAIG::RecordCall->is\_format($value); + +True if `$value` is an accepted recording format. Accepts the bareword constant too (it is just the string). + +**LICENSE** + +Copyright (c) 2025 SignalWire. Licensed under the MIT License. + +**Synopsis** + +```perl +use SignalWire::SWAIG::RecordCall qw(MP3 BOTH); +use SignalWire::SWAIG::FunctionResult; +``` + +```perl +my $result = SignalWire::SWAIG::FunctionResult->new; +``` + +```perl +# Named constants and bare wire strings are interchangeable: +$result->record_call( format => MP3, direction => BOTH ); +$result->record_call( format => 'mp3', direction => 'both' ); +``` + +```perl +# Membership / iteration helpers: +SignalWire::SWAIG::RecordCall->is_format('mp3'); # 1 +SignalWire::SWAIG::RecordCall->is_direction('hear'); # 0 (that's tap's word) +@{ SignalWire::SWAIG::RecordCall->formats }; # ('wav','mp3','mp4') +``` + +## Signature + +```perl +package SignalWire::SWAIG::RecordCall +``` + +## See Also + +- SignalWire::SWAIG::FunctionResult, SignalWire::SWAIG::Tap, SignalWire::SWAIG::JoinConference, SignalWire::Skills::SkillName, SignalWire::Logging::LogLevel. + +## Constants + + + + + + + + + + + + + +## Methods + +### directions + +#### Signature + +```perl +sub directions() +``` + +#### Source + +[`lib/SignalWire/SWAIG/RecordCall.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/RecordCall.pm) + +Line 83. + +*** + +### formats + +#### Signature + +```perl +sub formats() +``` + +#### Source + +[`lib/SignalWire/SWAIG/RecordCall.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/RecordCall.pm) + +Line 78. + +*** + +### is\_direction + +#### Signature + +```perl +sub is_direction($class, $value) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/SWAIG/RecordCall.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/RecordCall.pm) + +Line 97. + +*** + +### is\_format + +#### Signature + +```perl +sub is_format($class, $value) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/SWAIG/RecordCall.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/RecordCall.pm) + +Line 89. + +## Source + +[`lib/SignalWire/SWAIG/RecordCall.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/RecordCall.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/swaig/tap/tap/index.mdx b/fern/products/sdk-reference/perl/signal-wire/swaig/tap/tap/index.mdx new file mode 100644 index 0000000000..94ad60d6e1 --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/swaig/tap/tap/index.mdx @@ -0,0 +1,190 @@ +--- +slug: "/reference/perl/signal-wire/swaig/tap/tap" +title: "Tap" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::SWAIG::Tap" + module: "SignalWire.SWAIG.Tap" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/Tap.pm" +--- +# `Tap` + +The two closed-set string parameters of SignalWire::SWAIG::FunctionResult's `tap` verb, surfaced as typed, named constants: + +- **DIRECTION** — which audio channel(s) to tap: `speak`, `hear`, or `both`. + +- **CODEC** — the RTP codec for the tapped media: `PCMU` or `PCMA`. + +`tap` validates both inline and dies on anything outside the set; this module hoists those literal sets into a single source of truth so the accepted values are discoverable and autocompletable instead of living only inside the `die` strings. The constants **are** the canonical wire strings, so `tap`'s signature is unchanged. + +**Distinct from RecordCall.** The tap direction set is `{speak, hear, both}`: the inbound-listen channel is `hear`, not `record_call`'s `listen`. Likewise this two-value codec set `{PCMU, PCMA}` is the SWAIG-tap codec set only — a strict subset of the RELAY connect/stream codec superset (`PCMU`, `PCMA`, `OPUS`, `G722`, ...). These vocabularies must never be conflated. + +**CODECS** + +my $aref = SignalWire::SWAIG::Tap->codecs; + +Arrayref of the accepted tap-codec strings. + +**CONSTANTS** + +Exported on request via Exporter. The `:directions` tag pulls `SPEAK`/`HEAR`/`BOTH`; `:codecs` pulls `PCMU`/`PCMA`; `:all` pulls every constant. + +```perl +SPEAK => 'speak' PCMU => 'PCMU' +HEAR => 'hear' PCMA => 'PCMA' +BOTH => 'both' +``` + +**DIRECTIONS** + +my $aref = SignalWire::SWAIG::Tap->directions; + +Arrayref of the accepted tap-direction strings. + +**IS CODEC** + +my $bool = SignalWire::SWAIG::Tap->is\_codec($value); + +True if `$value` is an accepted tap codec. + +**IS DIRECTION** + +my $bool = SignalWire::SWAIG::Tap->is\_direction($value); + +True if `$value` is an accepted tap direction. Accepts the bareword constant too (it is just the string). + +**LICENSE** + +Copyright (c) 2025 SignalWire. Licensed under the MIT License. + +**Synopsis** + +```perl +use SignalWire::SWAIG::Tap qw(SPEAK HEAR BOTH PCMU PCMA); +use SignalWire::SWAIG::FunctionResult; +``` + +```perl +my $result = SignalWire::SWAIG::FunctionResult->new; +``` + +```perl +# Named constants and bare wire strings are interchangeable: +$result->tap( 'rtp://1.2.3.4:5000', direction => HEAR, codec => PCMA ); +$result->tap( 'rtp://1.2.3.4:5000', direction => 'hear', codec => 'PCMA' ); +``` + +```perl +# Membership / iteration helpers: +SignalWire::SWAIG::Tap->is_direction('hear'); # 1 +SignalWire::SWAIG::Tap->is_codec('OPUS'); # 0 (RELAY-only codec) +@{ SignalWire::SWAIG::Tap->codecs }; # ('PCMU','PCMA') +``` + +## Signature + +```perl +package SignalWire::SWAIG::Tap +``` + +## See Also + +- SignalWire::SWAIG::FunctionResult, SignalWire::SWAIG::RecordCall, SignalWire::SWAIG::JoinConference. + +## Constants + + + + + + + + + + + +## Methods + +### codecs + +#### Signature + +```perl +sub codecs() +``` + +#### Source + +[`lib/SignalWire/SWAIG/Tap.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/Tap.pm) + +Line 85. + +*** + +### directions + +#### Signature + +```perl +sub directions() +``` + +#### Source + +[`lib/SignalWire/SWAIG/Tap.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/Tap.pm) + +Line 80. + +*** + +### is\_codec + +#### Signature + +```perl +sub is_codec($class, $value) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/SWAIG/Tap.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/Tap.pm) + +Line 99. + +*** + +### is\_direction + +#### Signature + +```perl +sub is_direction($class, $value) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/SWAIG/Tap.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/Tap.pm) + +Line 91. + +## Source + +[`lib/SignalWire/SWAIG/Tap.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/Tap.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/swml/document/document/index.mdx b/fern/products/sdk-reference/perl/signal-wire/swml/document/document/index.mdx new file mode 100644 index 0000000000..317473d377 --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/swml/document/document/index.mdx @@ -0,0 +1,200 @@ +--- +slug: "/reference/perl/signal-wire/swml/document/document" +title: "Document" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::SWML::Document" + module: "SignalWire.SWML.Document" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Document.pm" +--- +# `Document` + +## Signature + +```perl +package SignalWire::SWML::Document +``` + +## Methods + +### add\_raw\_verb + +#### Signature + +```perl +sub add_raw_verb($section_name, $verb_hash) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/SWML/Document.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Document.pm) + +Line 30. + +*** + +### add\_section + +#### Signature + +```perl +sub add_section($name) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/SWML/Document.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Document.pm) + +Line 17. + +*** + +### add\_verb + +#### Signature + +```perl +sub add_verb($section_name, $verb_name, $verb_data) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/SWML/Document.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Document.pm) + +Line 23. + +*** + +### clear\_section + +#### Signature + +```perl +sub clear_section($name) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/SWML/Document.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Document.pm) + +Line 47. + +*** + +### get\_section + +#### Signature + +```perl +sub get_section($name) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/SWML/Document.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Document.pm) + +Line 37. + +*** + +### has\_section + +#### Signature + +```perl +sub has_section($name) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/SWML/Document.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Document.pm) + +Line 42. + +*** + +### to\_hash + +#### Signature + +```perl +sub to_hash() +``` + +#### Source + +[`lib/SignalWire/SWML/Document.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Document.pm) + +Line 53. + +*** + +### to\_json + +#### Signature + +```perl +sub to_json() +``` + +#### Source + +[`lib/SignalWire/SWML/Document.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Document.pm) + +Line 61. + +*** + +### to\_pretty\_json + +#### Signature + +```perl +sub to_pretty_json() +``` + +#### Source + +[`lib/SignalWire/SWML/Document.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Document.pm) + +Line 66. + +## Source + +[`lib/SignalWire/SWML/Document.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Document.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/swml/schema/schema/index.mdx b/fern/products/sdk-reference/perl/signal-wire/swml/schema/schema/index.mdx new file mode 100644 index 0000000000..3b596fe6f8 --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/swml/schema/schema/index.mdx @@ -0,0 +1,134 @@ +--- +slug: "/reference/perl/signal-wire/swml/schema/schema" +title: "Schema" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::SWML::Schema" + module: "SignalWire.SWML.Schema" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Schema.pm" +--- +# `Schema` + +## Signature + +```perl +package SignalWire::SWML::Schema +``` + +## Methods + +### BUILD + +#### Signature + +```perl +sub BUILD() +``` + +#### Source + +[`lib/SignalWire/SWML/Schema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Schema.pm) + +Line 21. + +*** + +### get\_verb + +#### Signature + +```perl +sub get_verb($name) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/SWML/Schema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Schema.pm) + +Line 83. + +*** + +### get\_verb\_names + +#### Signature + +```perl +sub get_verb_names() +``` + +#### Source + +[`lib/SignalWire/SWML/Schema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Schema.pm) + +Line 73. + +*** + +### has\_verb + +#### Signature + +```perl +sub has_verb($name) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/SWML/Schema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Schema.pm) + +Line 78. + +*** + +### instance + +#### Signature + +```perl +sub instance($class) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/SWML/Schema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Schema.pm) + +Line 67. + +*** + +### verb\_count + +#### Signature + +```perl +sub verb_count() +``` + +#### Source + +[`lib/SignalWire/SWML/Schema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Schema.pm) + +Line 88. + +## Source + +[`lib/SignalWire/SWML/Schema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Schema.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/swml/service/service/index.mdx b/fern/products/sdk-reference/perl/signal-wire/swml/service/service/index.mdx new file mode 100644 index 0000000000..5857dae8e8 --- /dev/null +++ b/fern/products/sdk-reference/perl/signal-wire/swml/service/service/index.mdx @@ -0,0 +1,474 @@ +--- +slug: "/reference/perl/signal-wire/swml/service/service" +title: "Service" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::SWML::Service" + module: "SignalWire.SWML.Service" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm" +--- +# `Service` + +## Signature + +```perl +package SignalWire::SWML::Service +``` + +## Methods + +### can + +#### Signature + +```perl +sub can($method) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) + +Line 146. + +*** + +### define\_tool + +#### Signature + +```perl +sub define_tool(%opts) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) + +Line 402. + +*** + +### define\_tools + +#### Signature + +```perl +sub define_tools(@tool_defs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) + +Line 468. + +*** + +### extract\_sip\_username + +#### Signature + +```perl +sub extract_sip_username($class_or_self, $request_body) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) + +Line 235. + +*** + +### get\_all\_functions + +#### Signature + +```perl +sub get_all_functions() +``` + +#### Source + +[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) + +Line 452. + +*** + +### get\_basic\_auth\_credentials + +#### Signature + +```perl +sub get_basic_auth_credentials($include_source) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) + +Line 199. + +*** + +### get\_basic\_auth\_credentials\_with\_source + +#### Signature + +```perl +sub get_basic_auth_credentials_with_source() +``` + +#### Source + +[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) + +Line 219. + +*** + +### get\_function + +#### Signature + +```perl +sub get_function($name) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) + +Line 445. + +*** + +### handle\_additional\_route + +#### Signature + +```perl +sub handle_additional_route($sub_path, $request_data, $env) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) + +Line 509. + +*** + +### has\_function + +#### Signature + +```perl +sub has_function($name) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) + +Line 438. + +*** + +### list\_tool\_names + +#### Signature + +```perl +sub list_tool_names() +``` + +#### Source + +[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) + +Line 492. + +*** + +### on\_function\_call + +#### Signature + +```perl +sub on_function_call($name, $args, $raw_data) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) + +Line 484. + +*** + +### on\_request + +#### Signature + +```perl +sub on_request($request_data, $callback_path) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) + +Line 377. + +*** + +### on\_swml\_request + +#### Signature + +```perl +sub on_swml_request($request_data, $callback_path, $request) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) + +Line 390. + +*** + +### register\_routing\_callback + +#### Signature + +```perl +sub register_routing_callback($path, $cb) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) + +Line 515. + +*** + +### register\_swaig\_function + +#### Signature + +```perl +sub register_swaig_function($func_def) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) + +Line 427. + +*** + +### remove\_function + +#### Signature + +```perl +sub remove_function($name) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) + +Line 459. + +*** + +### render\_main\_swml + +#### Signature + +```perl +sub render_main_swml($env) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) + +Line 356. + +*** + +### render\_swml + +#### Signature + +```perl +sub render_swml($env) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) + +Line 362. + +*** + +### swaig\_pre\_dispatch + +#### Signature + +```perl +sub swaig_pre_dispatch($request_data, $func_name, $env) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) + +Line 501. + +*** + +### to\_psgi\_app + +#### Signature + +```perl +sub to_psgi_app() +``` + +#### Source + +[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) + +Line 299. + +*** + +### validate\_basic\_auth + +#### Signature + +```perl +sub validate_basic_auth($username, $password) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) + +Line 186. + +## Source + +[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) + +Line 1. diff --git a/fern/products/sdk-reference/php/_meta.json b/fern/products/sdk-reference/php/_meta.json new file mode 100644 index 0000000000..86e5c7a2ce --- /dev/null +++ b/fern/products/sdk-reference/php/_meta.json @@ -0,0 +1,10 @@ +{ + "language": "php", + "sdk_name": "php-sdk", + "version": null, + "source_repo": "https://github.com/signalwire/signalwire-php", + "format": "mdx", + "platform": "fern", + "base_slug": "/reference/php", + "item_count": 1615 +} \ No newline at end of file diff --git a/fern/products/sdk-reference/php/index.mdx b/fern/products/sdk-reference/php/index.mdx new file mode 100644 index 0000000000..f91a497583 --- /dev/null +++ b/fern/products/sdk-reference/php/index.mdx @@ -0,0 +1,27 @@ +--- +title: "PHP SDK" +slug: "/reference/php" +lustri: + auto_generated: true + language: "php" + kind: "sdk" +--- +# PHP SDK Reference + +## Modules + +- [`Builtin`](/docs/sdk-reference/reference/php/signal-wire/skills/builtin/builtin) +- [`Contexts`](/docs/sdk-reference/reference/php/signal-wire/contexts/contexts) +- [`Logging`](/docs/sdk-reference/reference/php/signal-wire/logging/logging) +- [`Namespaces`](/docs/sdk-reference/reference/php/signal-wire/rest/namespaces/namespaces) +- [`POM`](/docs/sdk-reference/reference/php/signal-wire/pom/pom) +- [`Relay`](/docs/sdk-reference/reference/php/signal-wire/relay/relay) +- [`REST`](/docs/sdk-reference/reference/php/signal-wire/rest/rest) +- [`Security`](/docs/sdk-reference/reference/php/signal-wire/security/security) +- [`Server`](/docs/sdk-reference/reference/php/signal-wire/server/server) +- [`Serverless`](/docs/sdk-reference/reference/php/signal-wire/serverless/serverless) +- [`Skills`](/docs/sdk-reference/reference/php/signal-wire/skills/skills) +- [`SWAIG`](/docs/sdk-reference/reference/php/signal-wire/swaig/swaig) +- [`SWML`](/docs/sdk-reference/reference/php/signal-wire/swml/swml) +- [`Utils`](/docs/sdk-reference/reference/php/signal-wire/utils/utils) + diff --git a/fern/products/sdk-reference/php/signal-wire/contexts/contexts/context-builder/index.mdx b/fern/products/sdk-reference/php/signal-wire/contexts/contexts/context-builder/index.mdx new file mode 100644 index 0000000000..25ad075566 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/contexts/contexts/context-builder/index.mdx @@ -0,0 +1,287 @@ +--- +slug: "/reference/php/signal-wire/contexts/contexts/context-builder" +title: "ContextBuilder" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Contexts\\ContextBuilder" + parent: "SignalWire\\Contexts" + module: "SignalWire.Contexts" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php" +--- +# `ContextBuilder` + +Builder for multi-step, multi-context AI agent workflows. + +A ContextBuilder owns one or more Contexts; each Context owns an +ordered list of Steps. Only one context and one step is active at a +time. Per chat turn, the runtime injects the current step's +instructions as a system message, then asks the LLM for a response. + +## Native tools auto-injected by the runtime + +When a step (or its enclosing context) declares valid\_steps or +valid\_contexts, the runtime auto-injects two native tools so the +model can navigate the flow: + +- next\_step(step: enum) — present when valid\_steps is set +- change\_context(context: enum) — present when valid\_contexts is set + +A third native tool — gather\_submit — is injected during gather\_info +questioning. These three names are reserved: validate() rejects any +agent that defines a SWAIG tool with one of them. See the +RESERVED\_NATIVE\_TOOL\_NAMES constant. + +## Function whitelisting (Step::setFunctions) + +Each step may declare a functions whitelist. The whitelist is +applied in-memory at the start of each LLM turn. CRITICALLY: if a +step does NOT declare a functions field, it INHERITS the previous +step's active set. See Step::setFunctions for details and examples. + +## Signature + +```php +class ContextBuilder +``` + +## Methods + +### \_\_construct + +Construct a builder. The optional $agent reference mirrors Python's + +ContextBuilder(agent) so callers (typically AgentBase) can hand the +builder a reference to the owning agent for tool-name collision +checks during validate(). + +If $agent has a method named getRegisteredToolNames() returning an +array of strings, validate() will use it automatically — no +separate attachToolNameSupplier() call required. + +#### Signature + +```php +public function __construct(?object $agent = NULL) +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 1090. + +*** + +### addContext + +Add a new context and return it for further configuration. + +#### Signature + +```php +public function addContext(string $name): SignalWire\Contexts\Context +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Contexts\Context` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 1128. + +*** + +### attachToolNameSupplier + +Attach a callable that returns registered SWAIG tool names so + +validate() can check them against RESERVED\_NATIVE\_TOOL\_NAMES. +Called internally by AgentBase::defineContexts(). + +#### Signature + +```php +public function attachToolNameSupplier( + callable $supplier +): SignalWire\Contexts\ContextBuilder +``` + +#### Parameters + + + () => array<string> + + +#### Returns + +`SignalWire\Contexts\ContextBuilder` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 1107. + +*** + +### createSimpleContext + +Create a builder pre-populated with a single named context. + +**Modifiers:** `static` + +#### Signature + +```php +public static function createSimpleContext(string $name): SignalWire\Contexts\ContextBuilder +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Contexts\ContextBuilder` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 1343. + +*** + +### getContext + +Get an existing context by name, or null if not found. + +#### Signature + +```php +public function getContext(string $name): ?SignalWire\Contexts\Context +``` + +#### Parameters + + + +#### Returns + +`?SignalWire\Contexts\Context` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 1149. + +*** + +### hasContexts + +#### Signature + +```php +public function hasContexts(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 1154. + +*** + +### reset + +Remove all contexts, returning the builder to its initial state. + +Use this in a dynamic config callback when you need to rebuild +contexts from scratch for a specific request. + +#### Signature + +```php +public function reset(): SignalWire\Contexts\ContextBuilder +``` + +#### Returns + +`SignalWire\Contexts\ContextBuilder` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 1118. + +*** + +### toArray + +Serialize all contexts in order. Validates before converting. + +#### Signature + +```php +public function toArray(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 1323. + +*** + +### validate + +Validate the contexts configuration. + +#### Signature + +```php +public function validate(): array +``` + +#### Returns + +`array` — Array of error strings (empty if valid) + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 1164. + +## Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 1058. diff --git a/fern/products/sdk-reference/php/signal-wire/contexts/contexts/context/index.mdx b/fern/products/sdk-reference/php/signal-wire/contexts/contexts/context/index.mdx new file mode 100644 index 0000000000..e478b93d60 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/contexts/contexts/context/index.mdx @@ -0,0 +1,809 @@ +--- +slug: "/reference/php/signal-wire/contexts/contexts/context" +title: "Context" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Contexts\\Context" + parent: "SignalWire\\Contexts" + module: "SignalWire.Contexts" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php" +--- +# `Context` + +## Signature + +```php +class Context +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(string $name) +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 587. + +*** + +### addBullets + +#### Signature + +```php +public function addBullets(string $title, array $bullets): SignalWire\Contexts\Context +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire\Contexts\Context` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 715. + +*** + +### addEnterFiller + +Add enter fillers for a specific language. + +Mirrors Python's Context.add\_enter\_filler(language\_code: str, fillers: +List\[str]) — pass a list of phrases to associate with this language code. + +#### Signature + +```php +public function addEnterFiller( + string $language_code, + array $fillers +): SignalWire\Contexts\Context +``` + +#### Parameters + + + Language code (e.g. "en-US", "es") or "default" for catch-all. + + + + List of filler phrases. + + +#### Returns + +`SignalWire\Contexts\Context` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 880. + +*** + +### addExitFiller + +Add exit fillers for a specific language. + +Mirrors Python's Context.add\_exit\_filler(language\_code: str, fillers: +List\[str]) — pass a list of phrases to associate with this language code. + +#### Signature + +```php +public function addExitFiller( + string $language_code, + array $fillers +): SignalWire\Contexts\Context +``` + +#### Parameters + + + Language code (e.g. "en-US", "es") or "default" for catch-all. + + + + List of filler phrases. + + +#### Returns + +`SignalWire\Contexts\Context` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 902. + +*** + +### addSection + +#### Signature + +```php +public function addSection(string $title, string $body): SignalWire\Contexts\Context +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire\Contexts\Context` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 704. + +*** + +### addStep + +Add a new step to this context. + +When called with only $name the returned Step can be configured with +the usual method-chaining API. When the optional keyword arguments are +supplied the step is fully configured in one call: + +#### Signature + +```php +public function addStep( + string $name, + ?string $task = NULL, + ?array $bullets = NULL, + ?string $criteria = NULL, + $functions = NULL, + ?array $valid_steps = NULL +): SignalWire\Contexts\Step +``` + +#### Parameters + + + Step name (must be unique within the context). + + + + Text for the "Task" section (≡ addSection("Task", $task)). + + + + List of bullet strings for the "Process" section (≡ addBullets("Process", $bullets)). Requires $task to also be set. + + + + Step-completion criteria (≡ setStepCriteria()). + + + + Tool names the step may call, or 'none' (≡ setFunctions()). + + + + Names of steps the agent may transition to (≡ setValidSteps()). + + +#### Returns + +`SignalWire\Contexts\Step` — The configured Step object for optional further chaining. + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 619. + +*** + +### addSystemBullets + +#### Signature + +```php +public function addSystemBullets( + string $title, + array $bullets +): SignalWire\Contexts\Context +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire\Contexts\Context` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 750. + +*** + +### addSystemSection + +#### Signature + +```php +public function addSystemSection( + string $title, + string $body +): SignalWire\Contexts\Context +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire\Contexts\Context` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 739. + +*** + +### getInitialStep + +#### Signature + +```php +public function getInitialStep(): ?string +``` + +#### Returns + +`?string` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 777. + +*** + +### getName + +#### Signature + +```php +public function getName(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 592. + +*** + +### getStep + +#### Signature + +```php +public function getStep(string $name): ?SignalWire\Contexts\Step +``` + +#### Parameters + + + +#### Returns + +`?SignalWire\Contexts\Step` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 659. + +*** + +### getStepOrder + +#### Signature + +```php +public function getStepOrder(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 927. + +*** + +### getSteps + +#### Signature + +```php +public function getSteps(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 919. + +*** + +### getValidContexts + +#### Signature + +```php +public function getValidContexts(): ?array +``` + +#### Returns + +`?array` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 932. + +*** + +### moveStep + +#### Signature + +```php +public function moveStep(string $name, int $position): SignalWire\Contexts\Context +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire\Contexts\Context` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 676. + +*** + +### removeStep + +#### Signature + +```php +public function removeStep(string $name): SignalWire\Contexts\Context +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Contexts\Context` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 664. + +*** + +### setConsolidate + +#### Signature + +```php +public function setConsolidate(bool $consolidate): SignalWire\Contexts\Context +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Contexts\Context` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 800. + +*** + +### setEnterFillers + +Set fillers played by the AI when entering this context. + +#### Signature + +```php +public function setEnterFillers(array $enter_fillers): SignalWire\Contexts\Context +``` + +#### Parameters + + + Map of language code ("en-US" / "default") to a list of phrases. + + +#### Returns + +`SignalWire\Contexts\Context` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 852. + +*** + +### setExitFillers + +Set fillers played by the AI when leaving this context. + +#### Signature + +```php +public function setExitFillers(array $exit_fillers): SignalWire\Contexts\Context +``` + +#### Parameters + + + Map of language code ("en-US" / "default") to a list of phrases. + + +#### Returns + +`SignalWire\Contexts\Context` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 864. + +*** + +### setFullReset + +#### Signature + +```php +public function setFullReset(bool $fullReset): SignalWire\Contexts\Context +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Contexts\Context` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 806. + +*** + +### setInitialStep + +Set which step the context starts on when entered. + +By default, a context starts on its first step (index 0). Use +this to skip a preamble step on re-entry via change\_context. + +#### Signature + +```php +public function setInitialStep(string $stepName): SignalWire\Contexts\Context +``` + +#### Parameters + + + name of the step to start on. + + +#### Returns + +`SignalWire\Contexts\Context` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 771. + +*** + +### setIsolated + +Mark this context as isolated — entering it wipes conversation + +history. + +When $isolated = true and the context is entered via +change\_context, the runtime wipes the conversation array. The +model starts fresh with only the new context's system\_prompt + +step instructions, with no memory of prior turns. + +EXCEPTION — reset overrides the wipe: +If the context also has a reset configuration (via +setConsolidate or setFullReset), the wipe is skipped in +favor of the reset behavior. Use reset with consolidate=true +to summarize prior history into a single message instead of +dropping it entirely. + +Use cases: switching to a sensitive billing flow that should +not see prior small-talk; handing off to a different agent +persona; resetting after a long off-topic detour. + +#### Signature + +```php +public function setIsolated(bool $isolated): SignalWire\Contexts\Context +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Contexts\Context` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 838. + +*** + +### setPostPrompt + +#### Signature + +```php +public function setPostPrompt(string $postPrompt): SignalWire\Contexts\Context +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Contexts\Context` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 794. + +*** + +### setPrompt + +#### Signature + +```php +public function setPrompt(string $prompt): SignalWire\Contexts\Context +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Contexts\Context` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 693. + +*** + +### setSystemPrompt + +#### Signature + +```php +public function setSystemPrompt(string $systemPrompt): SignalWire\Contexts\Context +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Contexts\Context` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 728. + +*** + +### setUserPrompt + +#### Signature + +```php +public function setUserPrompt(string $userPrompt): SignalWire\Contexts\Context +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Contexts\Context` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 812. + +*** + +### setValidContexts + +#### Signature + +```php +public function setValidContexts(array $contexts): SignalWire\Contexts\Context +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Contexts\Context` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 782. + +*** + +### setValidSteps + +#### Signature + +```php +public function setValidSteps(array $steps): SignalWire\Contexts\Context +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Contexts\Context` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 788. + +*** + +### toArray + +#### Signature + +```php +public function toArray(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 965. + +## Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 546. diff --git a/fern/products/sdk-reference/php/signal-wire/contexts/contexts/gather-info/index.mdx b/fern/products/sdk-reference/php/signal-wire/contexts/contexts/gather-info/index.mdx new file mode 100644 index 0000000000..028cbbd477 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/contexts/contexts/gather-info/index.mdx @@ -0,0 +1,161 @@ +--- +slug: "/reference/php/signal-wire/contexts/contexts/gather-info" +title: "GatherInfo" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Contexts\\GatherInfo" + parent: "SignalWire\\Contexts" + module: "SignalWire.Contexts" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php" +--- +# `GatherInfo` + +## Signature + +```php +class GatherInfo +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct( + ?string $outputKey = NULL, + ?string $completionAction = NULL, + ?string $prompt = NULL +) +``` + +#### Parameters + + + + + + + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 99. + +*** + +### addQuestion + +Add a question to gather. + +#### Signature + +```php +public function addQuestion( + string $key, + string $question, + array $kwargs = array ( +) +): SignalWire\Contexts\GatherInfo +``` + +#### Parameters + + + Key name for storing the answer in global\_data. + + + + The question text to ask. + + + + Optional named arguments forwarded to GatherQuestion. + + +#### Returns + +`SignalWire\Contexts\GatherInfo` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 117. + +*** + +### getCompletionAction + +#### Signature + +```php +public function getCompletionAction(): ?string +``` + +#### Returns + +`?string` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 138. + +*** + +### getQuestions + +#### Signature + +```php +public function getQuestions(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 133. + +*** + +### toArray + +#### Signature + +```php +public function toArray(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 143. + +## Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 91. diff --git a/fern/products/sdk-reference/php/signal-wire/contexts/contexts/gather-question/index.mdx b/fern/products/sdk-reference/php/signal-wire/contexts/contexts/gather-question/index.mdx new file mode 100644 index 0000000000..3607155dc5 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/contexts/contexts/gather-question/index.mdx @@ -0,0 +1,116 @@ +--- +slug: "/reference/php/signal-wire/contexts/contexts/gather-question" +title: "GatherQuestion" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Contexts\\GatherQuestion" + parent: "SignalWire\\Contexts" + module: "SignalWire.Contexts" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php" +--- +# `GatherQuestion` + +## Signature + +```php +class GatherQuestion +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct( + string $key, + string $question, + string $type = 'string', + bool $confirm = false, + ?string $prompt = NULL, + ?array $functions = NULL +) +``` + +#### Parameters + + + Key name for storing the answer in global\_data. + + + + The question text to ask. + + + + JSON schema type for the answer (default 'string'). + + + + If true, the model must confirm the answer. + + + + Extra instruction text appended after the question. + + + + Functions to unlock for this question. + + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 44. + +*** + +### getKey + +#### Signature + +```php +public function getKey(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 60. + +*** + +### toArray + +#### Signature + +```php +public function toArray(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 65. + +## Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 27. diff --git a/fern/products/sdk-reference/php/signal-wire/contexts/contexts/index.mdx b/fern/products/sdk-reference/php/signal-wire/contexts/contexts/index.mdx new file mode 100644 index 0000000000..945dc0bd9d --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/contexts/contexts/index.mdx @@ -0,0 +1,35 @@ +--- +slug: "/reference/php/signal-wire/contexts/contexts" +title: "Contexts" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "module" + language: "php" + qualified_name: "SignalWire\\Contexts" + module: "SignalWire.Contexts" +--- +# `Contexts` + +## Signature + +```php +namespace SignalWire\Contexts +``` + +## Classes + + + + + + Builder for multi-step, multi-context AI agent workflows. + + + + + + + + diff --git a/fern/products/sdk-reference/php/signal-wire/contexts/contexts/step/index.mdx b/fern/products/sdk-reference/php/signal-wire/contexts/contexts/step/index.mdx new file mode 100644 index 0000000000..6dc48bbff2 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/contexts/contexts/step/index.mdx @@ -0,0 +1,668 @@ +--- +slug: "/reference/php/signal-wire/contexts/contexts/step" +title: "Step" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Contexts\\Step" + parent: "SignalWire\\Contexts" + module: "SignalWire.Contexts" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php" +--- +# `Step` + +## Signature + +```php +class Step +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(string $name) +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 197. + +*** + +### addBullets + +Add a POM section with bullet points. + +#### Signature + +```php +public function addBullets(string $title, array $bullets): SignalWire\Contexts\Step +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire\Contexts\Step` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 238. + +*** + +### addGatherQuestion + +Add a question to this step's gather\_info. Initializes + +gather\_info if not yet set. + +IMPORTANT — gather mode locks function access: +While the model is asking gather questions, the runtime +forcibly deactivates ALL of the step's other functions. The +only callable tools during a gather question are: + +``` +- gather_submit (the native answer-submission tool) +- Whatever names you pass in this question's 'functions' + option +``` + +next\_step and change\_context are also filtered out — the +model cannot navigate away until the gather completes. This +is by design: it forces a tight ask → submit → next-question +loop. + +If a question needs to call out to a tool (e.g. validate an +email, geocode a ZIP), list that tool name in this question's +'functions' option. Functions listed here are active ONLY for +this question. + +#### Signature + +```php +public function addGatherQuestion( + string $key, + string $question, + string $type = 'string', + bool $confirm = false, + ?string $prompt = NULL, + ?array $functions = NULL +): SignalWire\Contexts\Step +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`SignalWire\Contexts\Step` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 392. + +*** + +### addSection + +Add a POM section with a body paragraph. + +#### Signature + +```php +public function addSection(string $title, string $body): SignalWire\Contexts\Step +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire\Contexts\Step` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 224. + +*** + +### clearSections + +Clear all content (both text and sections). + +#### Signature + +```php +public function clearSections(): SignalWire\Contexts\Step +``` + +#### Returns + +`SignalWire\Contexts\Step` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 252. + +*** + +### getGatherInfo + +#### Signature + +```php +public function getGatherInfo(): ?SignalWire\Contexts\GatherInfo +``` + +#### Returns + +`?SignalWire\Contexts\GatherInfo` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 450. + +*** + +### getName + +#### Signature + +```php +public function getName(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 202. + +*** + +### getValidContexts + +#### Signature + +```php +public function getValidContexts(): ?array +``` + +#### Returns + +`?array` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 445. + +*** + +### getValidSteps + +#### Signature + +```php +public function getValidSteps(): ?array +``` + +#### Returns + +`?array` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 440. + +*** + +### setEnd + +Mark this step as terminal for the step flow. + +IMPORTANT: $end = true does NOT end the conversation or hang up +the call. It exits step mode entirely after this step executes +— clearing the steps list, current step index, valid\_steps, and +valid\_contexts. The agent keeps running, but operates only +under the base system prompt and the context-level prompt; no +more step instructions are injected and no more next\_step tool +is offered. + +To actually end the call, call a hangup tool or define a +hangup hook. + +#### Signature + +```php +public function setEnd(bool $end): SignalWire\Contexts\Step +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Contexts\Step` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 329. + +*** + +### setFunctions + +Set which non-internal functions are callable while this step is + +active. + +IMPORTANT — inheritance behavior: +If you do NOT call this method, the step inherits whichever +function set was active on the previous step (or the previous +context's last step). The server-side runtime only resets the +active set when a step explicitly declares its `functions` +field. This is the most common source of bugs in multi-step +agents: forgetting setFunctions() on a later step lets the +previous step's tools leak through. Best practice is to call +setFunctions() explicitly on every step that should differ +from the previous one. + +Keep the per-step active set small: LLM tool selection accuracy +degrades noticeably past ~7-8 simultaneously-active tools per +call. Use per-step whitelisting to partition large tool +collections. + +Internal functions (e.g. gather\_submit, hangup hook) are ALWAYS +protected and cannot be deactivated by this whitelist. The +native navigation tools next\_step and change\_context are +injected automatically when setValidSteps / setValidContexts is +used; they are not affected by this list and do not need to +appear in it. + +#### Signature + +```php +public function setFunctions($functions): SignalWire\Contexts\Step +``` + +#### Parameters + + + One of: + + +#### Returns + +`SignalWire\Contexts\Step` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 297. + +*** + +### setGatherInfo + +Initialize the gather\_info configuration for this step. Questions are + +presented one at a time via dynamic step instruction re-injection, +producing zero tool\_call/tool\_result entries in LLM-visible history. + +After calling this, use addGatherQuestion() to define questions. + +#### Signature + +```php +public function setGatherInfo( + ?string $output_key = NULL, + ?string $completion_action = NULL, + ?string $prompt = NULL +): SignalWire\Contexts\Step +``` + +#### Parameters + + + Key in global\_data to store answers under. + + + + Where to go when all questions are answered ('next\_step', a step name, or null). + + + + Preamble text injected once when entering the gather step. + + +#### Returns + +`SignalWire\Contexts\Step` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 360. + +*** + +### setResetConsolidate + +#### Signature + +```php +public function setResetConsolidate(bool $consolidate): SignalWire\Contexts\Step +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Contexts\Step` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 426. + +*** + +### setResetFullReset + +#### Signature + +```php +public function setResetFullReset(bool $fullReset): SignalWire\Contexts\Step +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Contexts\Step` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 432. + +*** + +### setResetSystemPrompt + +#### Signature + +```php +public function setResetSystemPrompt(string $systemPrompt): SignalWire\Contexts\Step +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Contexts\Step` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 414. + +*** + +### setResetUserPrompt + +#### Signature + +```php +public function setResetUserPrompt(string $userPrompt): SignalWire\Contexts\Step +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Contexts\Step` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 420. + +*** + +### setSkipToNextStep + +#### Signature + +```php +public function setSkipToNextStep(bool $skip): SignalWire\Contexts\Step +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Contexts\Step` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 341. + +*** + +### setSkipUserTurn + +#### Signature + +```php +public function setSkipUserTurn(bool $skip): SignalWire\Contexts\Step +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Contexts\Step` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 335. + +*** + +### setStepCriteria + +#### Signature + +```php +public function setStepCriteria(string $criteria): SignalWire\Contexts\Step +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Contexts\Step` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 259. + +*** + +### setText + +Set the step's prompt text directly. Mutually exclusive with POM sections. + +#### Signature + +```php +public function setText(string $text): SignalWire\Contexts\Step +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Contexts\Step` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 210. + +*** + +### setValidContexts + +#### Signature + +```php +public function setValidContexts(array $contexts): SignalWire\Contexts\Step +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Contexts\Step` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 309. + +*** + +### setValidSteps + +#### Signature + +```php +public function setValidSteps(array $steps): SignalWire\Contexts\Step +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Contexts\Step` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 303. + +*** + +### toArray + +#### Signature + +```php +public function toArray(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 489. + +## Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 169. diff --git a/fern/products/sdk-reference/php/signal-wire/data-map/data-map/index.mdx b/fern/products/sdk-reference/php/signal-wire/data-map/data-map/index.mdx new file mode 100644 index 0000000000..8c3f491adc --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/data-map/data-map/index.mdx @@ -0,0 +1,600 @@ +--- +slug: "/reference/php/signal-wire/data-map/data-map" +title: "DataMap" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\DataMap" + module: "SignalWire.DataMap" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/DataMap/DataMap.php" +--- +# `DataMap` + +## Signature + +```php +class DataMap +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(string $functionName) +``` + +#### Parameters + + + +#### Source + +[`SignalWire/DataMap/DataMap.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/DataMap/DataMap.php) + +Line 33. + +*** + +### body + +Set body on the last webhook. + +#### Signature + +```php +public function body(array $data): SignalWire\DataMap\DataMap +``` + +#### Parameters + + + +#### Returns + +`SignalWire\DataMap\DataMap` + +#### Source + +[`SignalWire/DataMap/DataMap.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/DataMap/DataMap.php) + +Line 199. + +*** + +### createExpressionTool + +Build a complete SWAIG function definition with expressions only. + +**Modifiers:** `static` + +#### Signature + +```php +public static function createExpressionTool( + string $name, + string $purpose, + array $parameters, + array $expressions +): array +``` + +#### Parameters + + + + + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/DataMap/DataMap.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/DataMap/DataMap.php) + +Line 379. + +*** + +### createSimpleApiTool + +Build a complete SWAIG function definition with a single webhook. + +**Modifiers:** `static` + +#### Signature + +```php +public static function createSimpleApiTool( + string $name, + string $purpose, + array $parameters, + string $method, + string $url, + mixed $output, + array $headers = array ( +) +): array +``` + +#### Parameters + + + + + + + + + + + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/DataMap/DataMap.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/DataMap/DataMap.php) + +Line 344. + +*** + +### description + +Alias for purpose(). Sets the LLM-facing tool description. + +This string is read by the model to decide WHEN to call this +tool. See purpose() for bad-vs-good examples. + +#### Signature + +```php +public function description(string $desc): SignalWire\DataMap\DataMap +``` + +#### Parameters + + + +#### Returns + +`SignalWire\DataMap\DataMap` + +#### Source + +[`SignalWire/DataMap/DataMap.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/DataMap/DataMap.php) + +Line 68. + +*** + +### errorKeys + +Set error\_keys on the last webhook. + +#### Signature + +```php +public function errorKeys(array $keys): SignalWire\DataMap\DataMap +``` + +#### Parameters + + + +#### Returns + +`SignalWire\DataMap\DataMap` + +#### Source + +[`SignalWire/DataMap/DataMap.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/DataMap/DataMap.php) + +Line 263. + +*** + +### expression + +Add an expression rule. + +#### Signature + +```php +public function expression( + string $testValue, + string $pattern, + mixed $output, + mixed $nomatchOutput = NULL +): SignalWire\DataMap\DataMap +``` + +#### Parameters + + + + + + + + + +#### Returns + +`SignalWire\DataMap\DataMap` + +#### Source + +[`SignalWire/DataMap/DataMap.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/DataMap/DataMap.php) + +Line 122. + +*** + +### fallbackOutput + +Set global fallback output. + +#### Signature + +```php +public function fallbackOutput(mixed $result): SignalWire\DataMap\DataMap +``` + +#### Parameters + + + FunctionResult, array, or string + + +#### Returns + +`SignalWire\DataMap\DataMap` + +#### Source + +[`SignalWire/DataMap/DataMap.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/DataMap/DataMap.php) + +Line 251. + +*** + +### foreach + +Set foreach on the last webhook. + +#### Signature + +```php +public function foreach(array $config): SignalWire\DataMap\DataMap +``` + +#### Parameters + + + +#### Returns + +`SignalWire\DataMap\DataMap` + +#### Source + +[`SignalWire/DataMap/DataMap.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/DataMap/DataMap.php) + +Line 225. + +*** + +### globalErrorKeys + +Set global error\_keys. + +#### Signature + +```php +public function globalErrorKeys(array $keys): SignalWire\DataMap\DataMap +``` + +#### Parameters + + + +#### Returns + +`SignalWire\DataMap\DataMap` + +#### Source + +[`SignalWire/DataMap/DataMap.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/DataMap/DataMap.php) + +Line 276. + +*** + +### output + +Set output on the last webhook. + +#### Signature + +```php +public function output(mixed $result): SignalWire\DataMap\DataMap +``` + +#### Parameters + + + FunctionResult, array, or string + + +#### Returns + +`SignalWire\DataMap\DataMap` + +#### Source + +[`SignalWire/DataMap/DataMap.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/DataMap/DataMap.php) + +Line 238. + +*** + +### parameter + +Add a parameter to this data-map tool — the `$description` is + +LLM-FACING. + +Each parameter description is rendered into the OpenAI tool +schema under parameters.properties.<name>.description and sent +to the model. The model uses it to decide HOW to fill in the +argument from user speech. It is prompt engineering, not +developer FYI. + +Bad vs good: + +BAD : ->parameter('city', 'string', 'the city') +GOOD: ->parameter('city', 'string', +'The name of the city to get weather for, e.g. ' +. '"San Francisco". Ask the user if they did not ' +. 'provide one. Include the state or country if the ' +. 'city name is ambiguous.') + +#### Signature + +```php +public function parameter( + string $name, + string $type, + string $description, + bool $required = false, + array $enum = array ( +) +): SignalWire\DataMap\DataMap +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`SignalWire\DataMap\DataMap` + +#### Source + +[`SignalWire/DataMap/DataMap.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/DataMap/DataMap.php) + +Line 94. + +*** + +### params + +Set params on the last webhook. + +#### Signature + +```php +public function params(array $data): SignalWire\DataMap\DataMap +``` + +#### Parameters + + + +#### Returns + +`SignalWire\DataMap\DataMap` + +#### Source + +[`SignalWire/DataMap/DataMap.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/DataMap/DataMap.php) + +Line 212. + +*** + +### purpose + +Set the LLM-facing tool description (the "purpose"). PROMPT + +ENGINEERING, not developer documentation. + +The description string is rendered into the OpenAI tool schema +`description` field on every LLM turn. The model reads it to +decide WHEN to call this tool. A vague purpose() is the #1 +cause of "the model has the right tool but doesn't call it" +failures with data-map tools. + +Bad vs good: + +BAD : ->purpose('weather api') +GOOD: ->purpose('Get the current weather conditions and ' +. 'forecast for a specific city. Use this ' +. 'whenever the user asks about weather, ' +. 'temperature, rain, or similar conditions ' +. 'in a named location.') + +#### Signature + +```php +public function purpose(string $desc): SignalWire\DataMap\DataMap +``` + +#### Parameters + + + +#### Returns + +`SignalWire\DataMap\DataMap` + +#### Source + +[`SignalWire/DataMap/DataMap.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/DataMap/DataMap.php) + +Line 57. + +*** + +### toSwaigFunction + +Serialize to a SWAIG function definition array. + +#### Signature + +```php +public function toSwaigFunction(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/DataMap/DataMap.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/DataMap/DataMap.php) + +Line 287. + +*** + +### webhook + +Add a webhook definition. + +#### Signature + +```php +public function webhook( + string $method, + string $url, + array $headers = array ( +), + string $formParam = '', + bool $inputArgsAsParams = false, + array $requireArgs = array ( +) +): SignalWire\DataMap\DataMap +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`SignalWire\DataMap\DataMap` + +#### Source + +[`SignalWire/DataMap/DataMap.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/DataMap/DataMap.php) + +Line 148. + +*** + +### webhookExpressions + +Set expressions on the last webhook. + +#### Signature + +```php +public function webhookExpressions(array $expressions): SignalWire\DataMap\DataMap +``` + +#### Parameters + + + +#### Returns + +`SignalWire\DataMap\DataMap` + +#### Source + +[`SignalWire/DataMap/DataMap.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/DataMap/DataMap.php) + +Line 186. + +## Source + +[`SignalWire/DataMap/DataMap.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/DataMap/DataMap.php) + +Line 9. diff --git a/fern/products/sdk-reference/php/signal-wire/logging/logging/index.mdx b/fern/products/sdk-reference/php/signal-wire/logging/logging/index.mdx new file mode 100644 index 0000000000..6bde0c385a --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/logging/logging/index.mdx @@ -0,0 +1,147 @@ +--- +slug: "/reference/php/signal-wire/logging/logging" +title: "Logging" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "module" + language: "php" + qualified_name: "SignalWire\\Logging" + module: "SignalWire.Logging" +--- +# `Logging` + +## Signature + +```php +namespace SignalWire\Logging +``` + +## Classes + + + + + + Cross-language SDK contract for serverless / deployment-mode detection. + + + +## Enums + +### LogLevel + +Logger severity levels as a typed, compile-time-checked closed set. + +\{@see \SignalWire\Logging\Logger::setLevel()\} and \{@see Logger::shouldLog()\} +accept this enum OR a string. The enum gives editor autocompletion and makes +a typo fail at the call site (a bare string like `'wrn'` only fails silently +at runtime — `setLevel()` ignores unknown levels); strings keep parity with +the Python reference (which configures stdlib `logging` with bare names) and +remain available for callers reading a level out of config/env. + +``` +$logger->setLevel(LogLevel::Warn); // typed, autocompleted +$logger->setLevel('warn'); // string still works (parity) +``` + +The backing values are the exact lowercase strings the Logger keys on. + +#### Signature + +```php +final enum LogLevel implements UnitEnum, BackedEnum +``` + +#### Inheritance + +**Implements:** `UnitEnum`, `BackedEnum` + +#### Properties + + + + + +#### Constants + + + + + + + + + +#### Variants + + + + + + + + + +#### Methods + +##### cases + +**Modifiers:** `static` + +###### Signature + +```php +public static function cases(): array +``` + +###### Returns + +`array` + +*** + +##### from + +**Modifiers:** `static` + +###### Signature + +```php +public static function from(string|int $value): static +``` + +###### Parameters + + + +###### Returns + +`static` + +*** + +##### tryFrom + +**Modifiers:** `static` + +###### Signature + +```php +public static function tryFrom(string|int $value): ?static +``` + +###### Parameters + + + +###### Returns + +`?static` + +#### Source + +[`SignalWire/Logging/LogLevel.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Logging/LogLevel.php) + +Line 22. diff --git a/fern/products/sdk-reference/php/signal-wire/logging/logging/logger/index.mdx b/fern/products/sdk-reference/php/signal-wire/logging/logging/logger/index.mdx new file mode 100644 index 0000000000..91113d3990 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/logging/logging/logger/index.mdx @@ -0,0 +1,281 @@ +--- +slug: "/reference/php/signal-wire/logging/logging/logger" +title: "Logger" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Logging\\Logger" + parent: "SignalWire\\Logging" + module: "SignalWire.Logging" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Logging/Logger.php" +--- +# `Logger` + +## Signature + +```php +class Logger +``` + +## Methods + +### debug + +#### Signature + +```php +public function debug(string ...$messages): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Logging/Logger.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Logging/Logger.php) + +Line 99. + +*** + +### error + +#### Signature + +```php +public function error(string ...$messages): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Logging/Logger.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Logging/Logger.php) + +Line 114. + +*** + +### getLevel + +#### Signature + +```php +public function getLevel(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Logging/Logger.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Logging/Logger.php) + +Line 56. + +*** + +### getLogger + +**Modifiers:** `static` + +#### Signature + +```php +public static function getLogger(string $name = 'signalwire'): SignalWire\Logging\Logger +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Logging\Logger` + +#### Source + +[`SignalWire/Logging/Logger.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Logging/Logger.php) + +Line 35. + +*** + +### getName + +#### Signature + +```php +public function getName(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Logging/Logger.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Logging/Logger.php) + +Line 51. + +*** + +### info + +#### Signature + +```php +public function info(string ...$messages): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Logging/Logger.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Logging/Logger.php) + +Line 104. + +*** + +### isSuppressed + +#### Signature + +```php +public function isSuppressed(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Logging/Logger.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Logging/Logger.php) + +Line 74. + +*** + +### reset + +Reset all logger instances (for testing). + +**Modifiers:** `static` + +#### Signature + +```php +public static function reset(): void +``` + +#### Source + +[`SignalWire/Logging/Logger.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Logging/Logger.php) + +Line 46. + +*** + +### setLevel + +#### Signature + +```php +public function setLevel(SignalWire\Logging\LogLevel|string $level): void +``` + +#### Parameters + + + severity level — the typed \{@see LogLevel\} enum (typo-checked at the call site) or a bare string (parity with the Python reference). Unknown string levels are ignored, as before. + + +#### Source + +[`SignalWire/Logging/Logger.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Logging/Logger.php) + +Line 66. + +*** + +### setSuppressed + +#### Signature + +```php +public function setSuppressed(bool $suppressed): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Logging/Logger.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Logging/Logger.php) + +Line 79. + +*** + +### shouldLog + +#### Signature + +```php +public function shouldLog(SignalWire\Logging\LogLevel|string $level): bool +``` + +#### Parameters + + + severity to test — the typed \{@see LogLevel\} enum or a bare string (parity with Python). + + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Logging/Logger.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Logging/Logger.php) + +Line 88. + +*** + +### warn + +#### Signature + +```php +public function warn(string ...$messages): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Logging/Logger.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Logging/Logger.php) + +Line 109. + +## Source + +[`SignalWire/Logging/Logger.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Logging/Logger.php) + +Line 7. diff --git a/fern/products/sdk-reference/php/signal-wire/logging/logging/logging-config/index.mdx b/fern/products/sdk-reference/php/signal-wire/logging/logging/logging-config/index.mdx new file mode 100644 index 0000000000..2c8c9433d2 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/logging/logging/logging-config/index.mdx @@ -0,0 +1,97 @@ +--- +slug: "/reference/php/signal-wire/logging/logging/logging-config" +title: "LoggingConfig" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Logging\\LoggingConfig" + parent: "SignalWire\\Logging" + module: "SignalWire.Logging" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Logging/LoggingConfig.php" +--- +# `LoggingConfig` + +Cross-language SDK contract for serverless / deployment-mode detection. + +Mirrors signalwire.core.logging\_config.get\_execution\_mode and +signalwire.utils.is\_serverless\_mode in the Python reference. Order +of precedence (FIRST match wins): + +1. GATEWAY\_INTERFACE -> 'cgi' +2. AWS\_LAMBDA\_FUNCTION\_NAME or LAMBDA\_TASK\_ROOT -> 'lambda' +3. FUNCTION\_TARGET, K\_SERVICE, or GOOGLE\_CLOUD\_PROJECT -> 'google\_cloud\_function' +4. AZURE\_FUNCTIONS\_ENVIRONMENT, FUNCTIONS\_WORKER\_RUNTIME, or + AzureWebJobsStorage -> 'azure\_function' +5. otherwise -> 'server' + +The static methods getExecutionMode() and isServerlessMode() project +onto the Python free functions + +- signalwire.core.logging\_config.get\_execution\_mode +- signalwire.utils.is\_serverless\_mode + via scripts/enumerate\_signatures.py FREE\_FUNCTION\_PROJECTIONS. + +**Modifiers:** `final` + +## Signature + +```php +final class LoggingConfig +``` + +## Methods + +### getExecutionMode + +Detect the SDK's deployment environment based on well-known + +environment variables. + +**Modifiers:** `static` + +#### Signature + +```php +public static function getExecutionMode(): string +``` + +#### Returns + +`string` — One of 'cgi', 'lambda', 'google\_cloud\_function', 'azure\_function', or 'server'. + +#### Source + +[`SignalWire/Logging/LoggingConfig.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Logging/LoggingConfig.php) + +Line 43. + +*** + +### isServerlessMode + +**Modifiers:** `static` + +#### Signature + +```php +public static function isServerlessMode(): bool +``` + +#### Returns + +`bool` — True when running in any serverless invocation environment (anything other than 'server'). + +#### Source + +[`SignalWire/Logging/LoggingConfig.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Logging/LoggingConfig.php) + +Line 72. + +## Source + +[`SignalWire/Logging/LoggingConfig.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Logging/LoggingConfig.php) + +Line 34. diff --git a/fern/products/sdk-reference/php/signal-wire/pom/pom/index.mdx b/fern/products/sdk-reference/php/signal-wire/pom/pom/index.mdx new file mode 100644 index 0000000000..7187b6bcd3 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/pom/pom/index.mdx @@ -0,0 +1,31 @@ +--- +slug: "/reference/php/signal-wire/pom/pom" +title: "POM" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "module" + language: "php" + qualified_name: "SignalWire\\POM" + module: "SignalWire.POM" +--- +# `POM` + +## Signature + +```php +namespace SignalWire\POM +``` + +## Classes + + + + A structured data format for composing, organizing, and rendering prompt + + + + Represents a section in the Prompt Object Model. + + diff --git a/fern/products/sdk-reference/php/signal-wire/pom/pom/prompt-object-model/index.mdx b/fern/products/sdk-reference/php/signal-wire/pom/pom/prompt-object-model/index.mdx new file mode 100644 index 0000000000..af33efc0ab --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/pom/pom/prompt-object-model/index.mdx @@ -0,0 +1,331 @@ +--- +slug: "/reference/php/signal-wire/pom/pom/prompt-object-model" +title: "PromptObjectModel" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\POM\\PromptObjectModel" + parent: "SignalWire\\POM" + module: "SignalWire.POM" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/POM/PromptObjectModel.php" +--- +# `PromptObjectModel` + +A structured data format for composing, organizing, and rendering prompt + +instructions for large language models. + +Mirrors Python's `signalwire.pom.pom.PromptObjectModel`. Provides a +tree-based representation of nested sections, supporting JSON / YAML +serialization and Markdown / XML rendering. + +YAML support: a small bundled emitter and parser implement the subset of +PyYAML's default block style needed for round-tripping POM documents. +Composer-installed yaml extensions are not required. + +## Signature + +```php +class PromptObjectModel +``` + +## Properties + + + + + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(bool $debug = false) +``` + +#### Parameters + + + +#### Source + +[`SignalWire/POM/PromptObjectModel.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/POM/PromptObjectModel.php) + +Line 25. + +*** + +### addPomAsSubsection + +Add another PromptObjectModel as a subsection block under a target. + +#### Signature + +```php +public function addPomAsSubsection( + SignalWire\POM\Section|string $target, + SignalWire\POM\PromptObjectModel $pomToAdd +): void +``` + +#### Parameters + + + Either a section title or a Section instance. + + + + +#### Throws + +- `\InvalidArgumentException` — When the title cannot be resolved. + +#### Source + +[`SignalWire/POM/PromptObjectModel.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/POM/PromptObjectModel.php) + +Line 359. + +*** + +### addSection + +Add a top-level section to the model. + +#### Signature + +```php +public function addSection( + ?string $title = NULL, + array $params = array ( +) +): SignalWire\POM\Section +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire\POM\Section` + +#### Throws + +- `\InvalidArgumentException` — If $title is null and there is already at least one section + +#### Source + +[`SignalWire/POM/PromptObjectModel.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/POM/PromptObjectModel.php) + +Line 181. + +*** + +### findSection + +Recursively search for a section by title. + +#### Signature + +```php +public function findSection(string $title): ?SignalWire\POM\Section +``` + +#### Parameters + + + +#### Returns + +`?SignalWire\POM\Section` + +#### Source + +[`SignalWire/POM/PromptObjectModel.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/POM/PromptObjectModel.php) + +Line 201. + +*** + +### fromJson + +Create a PromptObjectModel from a JSON string or a parsed array. + +**Modifiers:** `static` + +#### Signature + +```php +public static function fromJson(array|string $jsonData): SignalWire\POM\PromptObjectModel +``` + +#### Parameters + + + +#### Returns + +`SignalWire\POM\PromptObjectModel` + +#### Throws + +- `\InvalidArgumentException` — on malformed JSON or invalid structure + +#### Source + +[`SignalWire/POM/PromptObjectModel.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/POM/PromptObjectModel.php) + +Line 41. + +*** + +### fromYaml + +Create a PromptObjectModel from a YAML string or a parsed array. + +**Modifiers:** `static` + +#### Signature + +```php +public static function fromYaml(array|string $yamlData): SignalWire\POM\PromptObjectModel +``` + +#### Parameters + + + +#### Returns + +`SignalWire\POM\PromptObjectModel` + +#### Source + +[`SignalWire/POM/PromptObjectModel.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/POM/PromptObjectModel.php) + +Line 64. + +*** + +### renderMarkdown + +#### Signature + +```php +public function renderMarkdown(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/POM/PromptObjectModel.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/POM/PromptObjectModel.php) + +Line 289. + +*** + +### renderXml + +#### Signature + +```php +public function renderXml(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/POM/PromptObjectModel.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/POM/PromptObjectModel.php) + +Line 318. + +*** + +### toArray + +#### Signature + +```php +public function toArray(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/POM/PromptObjectModel.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/POM/PromptObjectModel.php) + +Line 230. + +*** + +### toJson + +Serialize the model as JSON. Matches Python `json.dumps(.., indent=2)`. + +#### Signature + +```php +public function toJson(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/POM/PromptObjectModel.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/POM/PromptObjectModel.php) + +Line 238. + +*** + +### toYaml + +Serialize the model as YAML. Matches PyYAML's default block style + +with `default_flow_style=False, sort_keys=False`. + +#### Signature + +```php +public function toYaml(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/POM/PromptObjectModel.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/POM/PromptObjectModel.php) + +Line 280. + +## Source + +[`SignalWire/POM/PromptObjectModel.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/POM/PromptObjectModel.php) + +Line 19. diff --git a/fern/products/sdk-reference/php/signal-wire/pom/pom/section/index.mdx b/fern/products/sdk-reference/php/signal-wire/pom/pom/section/index.mdx new file mode 100644 index 0000000000..7ca6fac58c --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/pom/pom/section/index.mdx @@ -0,0 +1,261 @@ +--- +slug: "/reference/php/signal-wire/pom/pom/section" +title: "Section" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\POM\\Section" + parent: "SignalWire\\POM" + module: "SignalWire.POM" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/POM/Section.php" +--- +# `Section` + +Represents a section in the Prompt Object Model. + +Each section contains a title, optional body text, optional bullet +points, and any number of nested subsections. Mirrors Python's +`signalwire.pom.pom.Section` byte-for-byte for `render_markdown`, +`render_xml`, `to_dict` (and indirectly `to_json` / `to_yaml`). + +Python parity: signalwire/signalwire/pom/pom.py::Section + +Constructor params (`params` array — PHP idiom for kwargs): + +- title (?string) section title; null is permitted only on the + first top-level section of a PromptObjectModel +- body (string) paragraph text; default '' +- bullets (?list<string>) bullet items; default \[] +- numbered (?bool) null = inherit; true/false = explicit +- numberedBullets (bool) render bullets as "1. foo" instead of "- foo" + +## Signature + +```php +class Section +``` + +## Properties + + + + + + + + + + + + + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(?string $title = NULL, array $params = array ( +)) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/POM/Section.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/POM/Section.php) + +Line 45. + +*** + +### addBody + +Add or replace the body text for this section. + +#### Signature + +```php +public function addBody(string $body): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/POM/Section.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/POM/Section.php) + +Line 72. + +*** + +### addBullets + +Append bullet points to this section. + +#### Signature + +```php +public function addBullets(array $bullets): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/POM/Section.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/POM/Section.php) + +Line 82. + +*** + +### addSubsection + +Add a subsection to this section. + +#### Signature + +```php +public function addSubsection( + string $title, + array $params = array ( +) +): SignalWire\POM\Section +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire\POM\Section` + +#### Throws + +- `\InvalidArgumentException` — If $title is null + +#### Source + +[`SignalWire/POM/Section.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/POM/Section.php) + +Line 104. + +*** + +### renderMarkdown + +Render this section and all its subsections as Markdown. + +#### Signature + +```php +public function renderMarkdown(int $level = 2, ?array $sectionNumber = NULL): string +``` + +#### Parameters + + + heading level (default 2 -> ##) + + + + numbering breadcrumb + + +#### Returns + +`string` + +#### Source + +[`SignalWire/POM/Section.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/POM/Section.php) + +Line 155. + +*** + +### renderXml + +Render this section and all its subsections as XML. + +#### Signature + +```php +public function renderXml(int $indent = 0, ?array $sectionNumber = NULL): string +``` + +#### Parameters + + + indentation level (each = 2 spaces) + + + + numbering breadcrumb + + +#### Returns + +`string` + +#### Source + +[`SignalWire/POM/Section.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/POM/Section.php) + +Line 216. + +*** + +### toArray + +Convert the section to a dictionary representation. + +Key ordering (must match Python): title, body, bullets, subsections, +numbered, numberedBullets. + +#### Signature + +```php +public function toArray(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/POM/Section.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/POM/Section.php) + +Line 122. + +## Source + +[`SignalWire/POM/Section.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/POM/Section.php) + +Line 25. diff --git a/fern/products/sdk-reference/php/signal-wire/relay/relay/action/index.mdx b/fern/products/sdk-reference/php/signal-wire/relay/relay/action/index.mdx new file mode 100644 index 0000000000..797d546e25 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/relay/relay/action/index.mdx @@ -0,0 +1,409 @@ +--- +slug: "/reference/php/signal-wire/relay/relay/action" +title: "Action" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Relay\\Action" + parent: "SignalWire\\Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php" +--- +# `Action` + +Base class for all RELAY call actions (play, record, collect, etc.). + +An Action is the client-side handle returned when you start an +asynchronous operation on a call. It accumulates events, tracks +state, and resolves once the operation reaches a terminal state. + +## Signature + +```php +class Action +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct( + string $controlId, + string $callId, + string $nodeId, + object $client +) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 33. + +*** + +### executeSubcommand + +Send a sub-command RPC through the client. + +The payload always includes control\_id, call\_id, and node\_id so +the server knows which action instance to target. + +#### Signature + +```php +public function executeSubcommand(string $method, array $extraParams = array ( +)): void +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 211. + +*** + +### getCallId + +#### Signature + +```php +public function getCallId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 107. + +*** + +### getControlId + +#### Signature + +```php +public function getControlId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 102. + +*** + +### getEvents + +#### Signature + +```php +public function getEvents(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 97. + +*** + +### getNodeId + +#### Signature + +```php +public function getNodeId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 112. + +*** + +### getPayload + +#### Signature + +```php +public function getPayload(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 91. + +*** + +### getResult + +#### Signature + +```php +public function getResult() +``` + +#### Returns + +`mixed` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 81. + +*** + +### getState + +#### Signature + +```php +public function getState(): ?string +``` + +#### Returns + +`?string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 86. + +*** + +### getStopMethod + +Return the RELAY RPC method that stops this action. + +Subclasses MUST override this to return the correct method name +(e.g. 'calling.play.stop'). + +#### Signature + +```php +public function getStopMethod(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 200. + +*** + +### handleEvent + +Append an incoming event and update local state / payload. + +#### Signature + +```php +public function handleEvent(SignalWire\Relay\Event $event): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 144. + +*** + +### isDone + +#### Signature + +```php +public function isDone(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 75. + +*** + +### onCompleted + +Register a callback to fire when the action completes. + +If the action is already done the callback fires immediately. + +#### Signature + +```php +public function onCompleted(callable $cb): SignalWire\Relay\Action +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Relay\Action` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 126. + +*** + +### resolve + +Mark this action as completed. + +The optional $result is stored and the onCompleted callback is +fired exactly once. + +#### Signature + +```php +public function resolve($result = NULL): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 167. + +*** + +### stop + +Stop the running action by sending its stop sub-command. + +#### Signature + +```php +public function stop(): void +``` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 186. + +*** + +### wait + +Block until the action completes or $timeout seconds elapse. + +Each iteration calls $client->readOnce() so the event-loop +keeps processing inbound frames. + +Returns the resolving Event when the action completes (mirrors +Python's `return self._wait_event.wait()`). Returns null on +timeout. The numeric `$timeout` is interpreted as seconds and +accepts integers or floats. + +#### Signature + +```php +public function wait(int|float $timeout = 30): ?SignalWire\Relay\Event +``` + +#### Parameters + + + +#### Returns + +`?SignalWire\Relay\Event` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 58. + +## Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 16. diff --git a/fern/products/sdk-reference/php/signal-wire/relay/relay/ai-action/index.mdx b/fern/products/sdk-reference/php/signal-wire/relay/relay/ai-action/index.mdx new file mode 100644 index 0000000000..5254d09837 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/relay/relay/ai-action/index.mdx @@ -0,0 +1,404 @@ +--- +slug: "/reference/php/signal-wire/relay/relay/ai-action" +title: "AIAction" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Relay\\AIAction" + parent: "SignalWire\\Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php" +--- +# `AIAction` + +Handle for calling.ai operations. + +## Signature + +```php +class AIAction extends Action +``` + +## Inheritance + +**Extends:** [SignalWire\Relay\Action](/docs/sdk-reference/reference/php/signal-wire/relay/relay/action) + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct( + string $controlId, + string $callId, + string $nodeId, + object $client +) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 33. + +*** + +### executeSubcommand + +Send a sub-command RPC through the client. + +The payload always includes control\_id, call\_id, and node\_id so +the server knows which action instance to target. + +#### Signature + +```php +public function executeSubcommand(string $method, array $extraParams = array ( +)): void +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 211. + +*** + +### getCallId + +#### Signature + +```php +public function getCallId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 107. + +*** + +### getControlId + +#### Signature + +```php +public function getControlId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 102. + +*** + +### getEvents + +#### Signature + +```php +public function getEvents(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 97. + +*** + +### getNodeId + +#### Signature + +```php +public function getNodeId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 112. + +*** + +### getPayload + +#### Signature + +```php +public function getPayload(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 91. + +*** + +### getResult + +#### Signature + +```php +public function getResult() +``` + +#### Returns + +`mixed` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 81. + +*** + +### getState + +#### Signature + +```php +public function getState(): ?string +``` + +#### Returns + +`?string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 86. + +*** + +### getStopMethod + +#### Signature + +```php +public function getStopMethod(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 478. + +*** + +### handleEvent + +Append an incoming event and update local state / payload. + +#### Signature + +```php +public function handleEvent(SignalWire\Relay\Event $event): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 144. + +*** + +### isDone + +#### Signature + +```php +public function isDone(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 75. + +*** + +### onCompleted + +Register a callback to fire when the action completes. + +If the action is already done the callback fires immediately. + +#### Signature + +```php +public function onCompleted(callable $cb): SignalWire\Relay\Action +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Relay\Action` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 126. + +*** + +### resolve + +Mark this action as completed. + +The optional $result is stored and the onCompleted callback is +fired exactly once. + +#### Signature + +```php +public function resolve($result = NULL): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 167. + +*** + +### stop + +Stop the running action by sending its stop sub-command. + +#### Signature + +```php +public function stop(): void +``` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 186. + +*** + +### wait + +Block until the action completes or $timeout seconds elapse. + +Each iteration calls $client->readOnce() so the event-loop +keeps processing inbound frames. + +Returns the resolving Event when the action completes (mirrors +Python's `return self._wait_event.wait()`). Returns null on +timeout. The numeric `$timeout` is interpreted as seconds and +accepts integers or floats. + +#### Signature + +```php +public function wait(int|float $timeout = 30): ?SignalWire\Relay\Event +``` + +#### Parameters + + + +#### Returns + +`?SignalWire\Relay\Event` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 58. + +## Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 476. diff --git a/fern/products/sdk-reference/php/signal-wire/relay/relay/call/index.mdx b/fern/products/sdk-reference/php/signal-wire/relay/relay/call/index.mdx new file mode 100644 index 0000000000..ad506c465f --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/relay/relay/call/index.mdx @@ -0,0 +1,1813 @@ +--- +slug: "/reference/php/signal-wire/relay/relay/call" +title: "Call" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Relay\\Call" + parent: "SignalWire\\Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php" +--- +# `Call` + +Represents a RELAY voice call. + +Holds call-level state, dispatches server events to registered listeners +and to in-flight Action objects, and exposes every calling.\* RPC method +as a first-class PHP method. + +## Signature + +```php +class Call +``` + +## Properties + + + controlId => Action + + + + + + RELAY Client instance + + + + + + + + + + + + + + + + + + + + + + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(array $params, object $client) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 48. + +*** + +### ai + +#### Signature + +```php +public function ai(array $prompt, array $opts = array ( +)): SignalWire\Relay\AIAction +``` + +#### Parameters + + + AI prompt config. + + + + +#### Returns + +`SignalWire\Relay\AIAction` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 888. + +*** + +### aiHold + +#### Signature + +```php +public function aiHold(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 432. + +*** + +### aiMessage + +#### Signature + +```php +public function aiMessage(array $params): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 427. + +*** + +### aiUnhold + +#### Signature + +```php +public function aiUnhold(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 437. + +*** + +### amazonBedrock + +#### Signature + +```php +public function amazonBedrock(array $params): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 422. + +*** + +### answer + +#### Signature + +```php +public function answer(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 303. + +*** + +### bindDigit + +#### Signature + +```php +public function bindDigit(array $params): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 377. + +*** + +### callState + +The current call lifecycle state as a typed \{@see CallState\}, or null + +when the raw \{@see $state\} string is outside the known closed set +(a forward-compatible server value). + +Offered ALONGSIDE the bare-string \{@see $state\} property for parity with +the Python reference: `$call->state` stays the canonical string; +`$call->callState()` is the typed view for autocompletion + an +exhaustive `match` + `->isTerminal()`. PORT\_ADDITION. + +#### Signature + +```php +public function callState(): ?SignalWire\Relay\CallState +``` + +#### Returns + +`?SignalWire\Relay\CallState` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 178. + +*** + +### clearDigitBindings + +Clear all digit bindings, optionally filtered by realm. + +Mirrors Python's Call.clear\_digit\_bindings(\*, realm=None, \*\*kwargs). + +#### Signature + +```php +public function clearDigitBindings( + ?string $realm = NULL, + array $kwargs = array ( +) +): array +``` + +#### Parameters + + + Optional realm filter — restricts clearing to bindings registered under that realm. + + + + Additional params forwarded to the wire call. + + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 392. + +*** + +### collect + +Standalone collect (digits / speech / both). + +#### Signature + +```php +public function collect(array $opts = array ( +)): SignalWire\Relay\CollectAction +``` + +#### Parameters + + + \- \`\`digits\`\` / \`\`speech\`\` / \`\`initial\_timeout\`\` etc forwarded as-is + \- \`\`control\_id\`\` + \- \`\`start\_input\_timers\`\` (bool) + \- \`\`on\_completed\`\` callback + + +#### Returns + +`SignalWire\Relay\CollectAction` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 644. + +*** + +### connect + +#### Signature + +```php +public function connect(array $params): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 327. + +*** + +### denoise + +#### Signature + +```php +public function denoise(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 347. + +*** + +### denoiseStop + +#### Signature + +```php +public function denoiseStop(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 352. + +*** + +### detect + +#### Signature + +```php +public function detect( + array $detect, + array $opts = array ( +) +): SignalWire\Relay\DetectAction +``` + +#### Parameters + + + Detection request (`{type: 'machine'|'fax'|'digit', params: {...}}`). + + + + +#### Returns + +`SignalWire\Relay\DetectAction` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 725. + +*** + +### detectAnsweringMachine + +Detect human vs answering machine (AMD). Typed convenience over + +\{@see detect()\}. Mirrors Python's `Call.detect_answering_machine(*, +initial_timeout, end_silence_timeout, machine_voice_threshold, +machine_words_threshold, detect_interruptions, detect_message_end, +timeout, on_completed)`. Only the AMD keys the caller supplies are +emitted under `params` (matches Python's only-provided-keys behavior); +`timeout` rides at the top level. + +Wire shape: detect `{type:"machine", params:{...only-provided...}}` +with optional top-level `timeout`. + +#### Signature + +```php +public function detectAnsweringMachine( + array $opts = array ( +) +): SignalWire\Relay\DetectAction +``` + +#### Parameters + + + any of the AMD tuning keys above plus `timeout` / `control_id` / `on_completed`. + + +#### Returns + +`SignalWire\Relay\DetectAction` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 779. + +*** + +### detectDigit + +Detect DTMF digits. Typed convenience over \{@see detect()\}. + +Mirrors Python's `Call.detect_digit(*, digits, timeout, +on_completed)`. `digits` is nested under `params` only when +supplied; `timeout` rides at the top level via the generic detect +frame. + +Wire shape: detect `{type:"digit", params:{digits?}}` with optional +top-level `timeout`. + +#### Signature + +```php +public function detectDigit(array $opts = array ( +)): SignalWire\Relay\DetectAction +``` + +#### Parameters + + + `digits`/`timeout` plus `control_id` / `on_completed`. + + +#### Returns + +`SignalWire\Relay\DetectAction` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 749. + +*** + +### detectFax + +Detect a fax tone (CED/CNG). Typed convenience over \{@see detect()\}. + +Mirrors Python's `Call.detect_fax(*, tone, timeout, on_completed)`. +`tone` is nested under `params` only when supplied; `timeout` +rides at the top level. + +Wire shape: detect `{type:"fax", params:{tone?}}` with optional +top-level `timeout`. + +#### Signature + +```php +public function detectFax(array $opts = array ( +)): SignalWire\Relay\DetectAction +``` + +#### Parameters + + + `tone`/`timeout` plus `control_id` / `on_completed`. + + +#### Returns + +`SignalWire\Relay\DetectAction` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 815. + +*** + +### disconnect + +#### Signature + +```php +public function disconnect(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 332. + +*** + +### dispatchEvent + +Central event router invoked by the Client whenever a server event + +targets this call. + +#### Signature + +```php +public function dispatchEvent(SignalWire\Relay\Event $event): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 71. + +*** + +### echo + +#### Signature + +```php +public function echo(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 372. + +*** + +### hangup + +Hang up the call. `$reason` is forwarded as `reason` on the + +wire (RELAY accepts `hangup`, `busy`, `decline`, etc.). + +The on-wire method is `calling.end` (production), which historically +was named `calling.hangup` — we send `calling.end` to match the +RELAY schema set extracted from switchblade. + +#### Signature + +```php +public function hangup(?string $reason = NULL): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 316. + +*** + +### hold + +#### Signature + +```php +public function hold(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 337. + +*** + +### joinConference + +#### Signature + +```php +public function joinConference(array $params): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 362. + +*** + +### joinRoom + +#### Signature + +```php +public function joinRoom(array $params): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 412. + +*** + +### leaveConference + +#### Signature + +```php +public function leaveConference(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 367. + +*** + +### leaveRoom + +#### Signature + +```php +public function leaveRoom(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 417. + +*** + +### liveTranscribe + +#### Signature + +```php +public function liveTranscribe(array $params): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 402. + +*** + +### liveTranslate + +#### Signature + +```php +public function liveTranslate(array $params): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 407. + +*** + +### on + +Register a generic event listener on this call. + +#### Signature + +```php +public function on(callable $cb): SignalWire\Relay\Call +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Relay\Call` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 162. + +*** + +### pass + +#### Signature + +```php +public function pass(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 322. + +*** + +### pay + +#### Signature + +```php +public function pay( + string $paymentConnectorUrl, + array $opts = array ( +) +): SignalWire\Relay\PayAction +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire\Relay\PayAction` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 874. + +*** + +### play + +Start a calling.play action. + +#### Signature + +```php +public function play( + array $media, + array $opts = array ( +) +): SignalWire\Relay\PlayAction +``` + +#### Parameters + + + Play list (each entry is `{type:..., params:...}`). + + + + `control_id` (auto-generated when omitted), `on_completed` callback fired on terminal events. + + +#### Returns + +`SignalWire\Relay\PlayAction` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 526. + +*** + +### playAndCollect + +Play media then collect a response (digits, speech). + +#### Signature + +```php +public function playAndCollect( + array $media, + array $collect, + array $opts = array ( +) +): SignalWire\Relay\CollectAction +``` + +#### Parameters + + + + + + + +#### Returns + +`SignalWire\Relay\CollectAction` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 657. + +*** + +### playAudio + +Play an audio file from a URL. Typed convenience over \{@see play()\}. + +Mirrors Python's `Call.play_audio(url, *, volume, on_completed)`. + +Wire shape: play `[{type:"audio", params:{url}}]` with optional +top-level `volume`. + +#### Signature + +```php +public function playAudio( + string $url, + array $opts = array ( +) +): SignalWire\Relay\PlayAction +``` + +#### Parameters + + + + + `volume` plus `control_id` / `on_completed`. + + +#### Returns + +`SignalWire\Relay\PlayAction` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 576. + +*** + +### playRingtone + +Play a named ringtone by country code. Typed convenience over + +\{@see play()\}. Mirrors Python's `Call.play_ringtone(name, *, +duration, volume, on_completed)`. `duration` is nested under +`params` only when supplied; `volume` rides at the top level. + +Wire shape: play `[{type:"ringtone", params:{name, duration?}}]` with +optional top-level `volume`. + +#### Signature + +```php +public function playRingtone( + string $name, + array $opts = array ( +) +): SignalWire\Relay\PlayAction +``` + +#### Parameters + + + + + `duration`/`volume` plus `control_id` / `on_completed`. + + +#### Returns + +`SignalWire\Relay\PlayAction` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 612. + +*** + +### playSilence + +Play silence for `$duration` seconds. Typed convenience over + +\{@see play()\}. Mirrors Python's `Call.play_silence(duration, *, +on_completed)`. + +Wire shape: play `[{type:"silence", params:{duration}}]`. + +#### Signature + +```php +public function playSilence( + int|float $duration, + array $opts = array ( +) +): SignalWire\Relay\PlayAction +``` + +#### Parameters + + + + + `control_id` / `on_completed`. + + +#### Returns + +`SignalWire\Relay\PlayAction` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 591. + +*** + +### playTts + +Play text-to-speech. Typed convenience over \{@see play()\}. + +Restores the legacy `play_tts(text=...)` ergonomics so callers don't +hand-build the `{type:"tts", params:{...}}` media shape. Mirrors +Python's `Call.play_tts(text, *, language, gender, voice, volume, +on_completed)`. Optional `language` / `gender` / `voice` are +nested under `params` only when supplied; `volume` rides at the +top level via the generic play frame; `control_id` / `on_completed` +are honored from `$opts`. + +Wire shape: play `[{type:"tts", params:{text, language?, gender?, +voice?}}]` with optional top-level `volume`. + +#### Signature + +```php +public function playTts( + string $text, + array $opts = array ( +) +): SignalWire\Relay\PlayAction +``` + +#### Parameters + + + + + `language`/`gender`/`voice`/ `volume` plus the usual `control_id` / `on_completed`. + + +#### Returns + +`SignalWire\Relay\PlayAction` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 553. + +*** + +### promptAudio + +Play an audio file then collect input. Typed media over + +\{@see playAndCollect()\}. Mirrors Python's `Call.prompt_audio(url, +collect, *, volume, on_completed)`. + +Wire shape: play\_and\_collect `[{type:"audio", params:{url}}]` + the +given `collect` with optional top-level `volume`. + +#### Signature + +```php +public function promptAudio( + string $url, + array $collect, + array $opts = array ( +) +): SignalWire\Relay\CollectAction +``` + +#### Parameters + + + + + Collect spec (`digits`/`speech`/…). + + + + `volume` plus `control_id` / `on_completed`. + + +#### Returns + +`SignalWire\Relay\CollectAction` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 711. + +*** + +### promptTts + +Play TTS then collect input. Typed media over \{@see playAndCollect()\}. + +Mirrors Python's `Call.prompt_tts(text, collect, *, language, gender, +voice, volume, on_completed)`. Builds the same `{type:"tts"}` media +shape as \{@see playTts()\} and forwards the caller's `$collect` object +verbatim. + +Wire shape: play\_and\_collect `[{type:"tts", params:{text, language?, +gender?, voice?}}]` + the given `collect` with optional top-level +`volume`. + +#### Signature + +```php +public function promptTts( + string $text, + array $collect, + array $opts = array ( +) +): SignalWire\Relay\CollectAction +``` + +#### Parameters + + + + + Collect spec (`digits`/`speech`/…). + + + + `language`/`gender`/`voice`/ `volume` plus `control_id` / `on_completed`. + + +#### Returns + +`SignalWire\Relay\CollectAction` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 683. + +*** + +### queueEnter + +#### Signature + +```php +public function queueEnter(array $params): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 447. + +*** + +### queueLeave + +Remove the call from a named queue. + +Mirrors Python's Call.queue\_leave(queue\_name, \*, control\_id=None, +queue\_id=None, status\_url=None, \*\*kwargs). When called with no args +the legacy "leave the current queue" behavior is preserved. + +#### Signature + +```php +public function queueLeave( + ?string $queue_name = NULL, + ?string $control_id = NULL, + ?string $queue_id = NULL, + ?string $status_url = NULL, + array $kwargs = array ( +) +): array +``` + +#### Parameters + + + Name of the queue to leave. Required when also supplying control\_id / queue\_id; when null the legacy no-arg "leave-current" behavior is preserved. + + + + Optional control\_id; auto-generated when null and other named-args are supplied. + + + + Optional explicit queue\_id passed to the server. + + + + Optional status callback URL. + + + + Extra params merged onto the wire call. + + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 471. + +*** + +### receiveFax + +#### Signature + +```php +public function receiveFax(array $opts = array ( +)): SignalWire\Relay\FaxAction +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Relay\FaxAction` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 844. + +*** + +### record + +#### Signature + +```php +public function record( + array $audio, + array $opts = array ( +) +): SignalWire\Relay\RecordAction +``` + +#### Parameters + + + Recording config (`format`, etc.) + + + + +#### Returns + +`SignalWire\Relay\RecordAction` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 625. + +*** + +### refer + +#### Signature + +```php +public function refer(array $params): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 504. + +*** + +### resolveAllActions + +Mark every outstanding action as completed. Called when the call + +enters a terminal state (ended). + +#### Signature + +```php +public function resolveAllActions(): void +``` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 291. + +*** + +### sendDigits + +#### Signature + +```php +public function sendDigits(array $params): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 509. + +*** + +### sendFax + +#### Signature + +```php +public function sendFax( + string $document, + ?string $identity = NULL, + array $opts = array ( +) +): SignalWire\Relay\FaxAction +``` + +#### Parameters + + + + + + + +#### Returns + +`SignalWire\Relay\FaxAction` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 829. + +*** + +### stream + +#### Signature + +```php +public function stream( + string $url, + array $opts = array ( +) +): SignalWire\Relay\StreamAction +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire\Relay\StreamAction` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 868. + +*** + +### tap + +#### Signature + +```php +public function tap( + array $tap, + array $device, + array $opts = array ( +) +): SignalWire\Relay\TapAction +``` + +#### Parameters + + + Tap config. + + + + Tap delivery device. + + + + +#### Returns + +`SignalWire\Relay\TapAction` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 858. + +*** + +### transcribe + +#### Signature + +```php +public function transcribe(array $opts = array ( +)): SignalWire\Relay\TranscribeAction +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Relay\TranscribeAction` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 880. + +*** + +### transfer + +#### Signature + +```php +public function transfer(array $params): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 357. + +*** + +### unhold + +#### Signature + +```php +public function unhold(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 342. + +*** + +### userEvent + +#### Signature + +```php +public function userEvent(array $params): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 442. + +*** + +### waitForAnswered + +Wait until the call is answered (immediate if already answered or past + +it). Typed wait over the call lifecycle, mirroring Python's +`Call.wait_for_answered(timeout)`. + +#### Signature + +```php +public function waitForAnswered(int|float|null $timeout = NULL): bool +``` + +#### Parameters + + + +#### Returns + +`bool` — True once the call is answered (or already past it); false on timeout. + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 256. + +*** + +### waitForEnding + +Wait until the call is ending (immediate if already ending or past it). + +Typed wait over the call lifecycle, mirroring Python's +`Call.wait_for_ending(timeout)`. + +#### Signature + +```php +public function waitForEnding(int|float|null $timeout = NULL): bool +``` + +#### Parameters + + + +#### Returns + +`bool` — True once the call is ending (or already past it); false on timeout. + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 282. + +*** + +### waitForRinging + +Wait until the call is ringing (immediate if already ringing or past + +it). Typed wait over the call lifecycle, mirroring Python's +`Call.wait_for_ringing(timeout)`. + +#### Signature + +```php +public function waitForRinging(int|float|null $timeout = NULL): bool +``` + +#### Parameters + + + +#### Returns + +`bool` — True once the call is ringing (or already past it); false on timeout. + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 269. + +## Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 16. diff --git a/fern/products/sdk-reference/php/signal-wire/relay/relay/client/index.mdx b/fern/products/sdk-reference/php/signal-wire/relay/relay/client/index.mdx new file mode 100644 index 0000000000..45bd138322 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/relay/relay/client/index.mdx @@ -0,0 +1,607 @@ +--- +slug: "/reference/php/signal-wire/relay/relay/client" +title: "Client" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Relay\\Client" + parent: "SignalWire\\Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Client.php" +--- +# `Client` + +RELAY Client – manages the WebSocket connection to SignalWire, sends + +JSON-RPC requests, and dispatches inbound events to the correct Call +or Message objects. + +The transport layer (WebSocket send/receive) is abstracted behind +thin methods so that unit tests can subclass or mock without needing +a real WebSocket extension. + +## Signature + +```php +class Client +``` + +## Properties + + + + + + + Optional path to a CA bundle (PEM) used to verify the server certificate on `wss://` connections. Sourced from the `ca_file` option or the `SIGNALWIRE_CA_FILE` / `SSL_CERT_FILE` env vars. Peer verification stays enabled regardless; this only selects which CA to trust (system store when null). + + + + callId => Call + + + + + + + + + + + + messageId => Message + + + + + + + + + + id => callbacks + + + + tag => dial promise + + + + + + + + + + + + + + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(array $options) +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/Client.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Client.php) + +Line 94. + +*** + +### authenticate + +Send the signalwire.connect RPC to authenticate and bind a session. + +Sends project/token both at the top level AND nested under +`authentication`. Python sends the nested form; the audit fixture +accepts either; sending both is forward-compatible (per +SUBAGENT\_PLAYBOOK lessons-learned). + +#### Signature + +```php +public function authenticate(): void +``` + +#### Source + +[`SignalWire/Relay/Client.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Client.php) + +Line 208. + +*** + +### connect + +Open the WebSocket connection and run the JSON-RPC `signalwire.connect` + +handshake. Throws on transport or auth failure. + +The transport URI is `://` (defaults to +`wss:///api/relay/ws`). Tests point SIGNALWIRE\_RELAY\_SCHEME +at `ws` and SIGNALWIRE\_RELAY\_HOST at the fixture's host:port. + +#### Signature + +```php +public function connect(): void +``` + +#### Source + +[`SignalWire/Relay/Client.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Client.php) + +Line 169. + +*** + +### dial + +Originate an outbound call, blocking until `calling.call.dial` + +resolves with a winner or fails. + +#### Signature + +```php +public function dial(array $devices, array $opts = array ( +)): SignalWire\Relay\Call +``` + +#### Parameters + + + Two-dimensional array of devices: each outer entry is one parallel "leg" of the dial, each inner entry is a serial step within that leg. Mirrors the Python `[[device, device], [device]]` shape. + + + + \- \`\`tag\`\`: explicit dial tag (UUID4 generated when omitted) + \- \`\`dial\_timeout\`\`: seconds to wait for the dial event (default 30.0) + \- \`\`max\_duration\`\`: max call lifetime in seconds, passed through + to \`\`calling.dial\`\`. + \- any other key is forwarded as a top-level param on the wire. + + +#### Returns + +`SignalWire\Relay\Call` + +#### Throws + +- `RelayError` — on dial failure or timeout. + +#### Source + +[`SignalWire/Relay/Client.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Client.php) + +Line 623. + +*** + +### disconnect + +Gracefully close the connection. + +#### Signature + +```php +public function disconnect(): void +``` + +#### Source + +[`SignalWire/Relay/Client.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Client.php) + +Line 263. + +*** + +### execute + +Send a JSON-RPC request and synchronously wait for the matching + +response. Returns the "result" portion of the response. + +#### Signature + +```php +public function execute(string $method, array $params = array ( +)): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Throws + +- `\RuntimeException` — on error responses or transport timeout. + +#### Source + +[`SignalWire/Relay/Client.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Client.php) + +Line 344. + +*** + +### getCall + +#### Signature + +```php +public function getCall(string $callId): ?SignalWire\Relay\Call +``` + +#### Parameters + + + +#### Returns + +`?SignalWire\Relay\Call` + +#### Source + +[`SignalWire/Relay/Client.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Client.php) + +Line 781. + +*** + +### getCalls + +#### Signature + +```php +public function getCalls(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Client.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Client.php) + +Line 789. + +*** + +### getMessages + +#### Signature + +```php +public function getMessages(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Client.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Client.php) + +Line 797. + +*** + +### handleEvent + +Route a signalwire.event payload to the appropriate handler. + +#### Signature + +```php +public function handleEvent(array $outerParams): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/Client.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Client.php) + +Line 511. + +*** + +### handleMessage + +Parse a raw JSON string from the server and route it. + +#### Signature + +```php +public function handleMessage(string $raw): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/Client.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Client.php) + +Line 464. + +*** + +### onCall + +Register a handler for inbound calls. + +#### Signature + +```php +public function onCall(callable $cb): SignalWire\Relay\Client +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Relay\Client` + +#### Source + +[`SignalWire/Relay/Client.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Client.php) + +Line 764. + +*** + +### onMessage + +Register a handler for inbound messages. + +#### Signature + +```php +public function onMessage(callable $cb): SignalWire\Relay\Client +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Relay\Client` + +#### Source + +[`SignalWire/Relay/Client.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Client.php) + +Line 773. + +*** + +### readOnce + +Read a single inbound frame from the WebSocket and dispatch it. + +Returns silently on a read timeout (no frame within $this->readTimeout +seconds — the run loop will call again). Throws on socket errors so +the run loop can trigger reconnect. + +#### Signature + +```php +public function readOnce(): void +``` + +#### Source + +[`SignalWire/Relay/Client.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Client.php) + +Line 420. + +*** + +### receive + +Subscribe to one or more inbound contexts so that events for those + +contexts are delivered to this client. + +#### Signature + +```php +public function receive(array $contexts): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/Client.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Client.php) + +Line 729. + +*** + +### reconnect + +Reconnect with exponential back-off (1 s -> 30 s cap). + +#### Signature + +```php +public function reconnect(): void +``` + +#### Source + +[`SignalWire/Relay/Client.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Client.php) + +Line 283. + +*** + +### run + +Main event loop – reads messages until disconnect. + +Auto-reconnects with exponential backoff on transport errors, +preserving authorization\_state across reconnects so the server +can fast-path the session resumption. + +#### Signature + +```php +public function run(): void +``` + +#### Source + +[`SignalWire/Relay/Client.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Client.php) + +Line 309. + +*** + +### send + +Encode and send a JSON message over the WebSocket. Throws if the + +socket is closed; the run loop catches and triggers reconnect. + +#### Signature + +```php +public function send(array $msg): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/Client.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Client.php) + +Line 402. + +*** + +### sendAck + +Send an acknowledgement (empty result) for a server-initiated request. + +Best-effort: an ACK that fails because the socket dropped during +the request handling is not propagated as an exception (the run +loop will already trigger reconnect on the next read). + +#### Signature + +```php +public function sendAck(string $id): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/Client.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Client.php) + +Line 444. + +*** + +### sendMessage + +Send an outbound message. + +#### Signature + +```php +public function sendMessage(array $params): SignalWire\Relay\Message +``` + +#### Parameters + + + Outbound messaging.send params (`to_number`, `from_number`, `body`, `media`, `tags`, `context`). + + +#### Returns + +`SignalWire\Relay\Message` — Tracking object for the message lifecycle. The Message starts in `queued` state; subsequent `messaging.state` events from the server progress it through `sent` / `delivered` / `undelivered` / `failed`. + +#### Source + +[`SignalWire/Relay/Client.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Client.php) + +Line 697. + +*** + +### unreceive + +Unsubscribe from one or more contexts. + +#### Signature + +```php +public function unreceive(array $contexts): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/Client.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Client.php) + +Line 747. + +## Source + +[`SignalWire/Relay/Client.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Client.php) + +Line 18. diff --git a/fern/products/sdk-reference/php/signal-wire/relay/relay/collect-action/index.mdx b/fern/products/sdk-reference/php/signal-wire/relay/relay/collect-action/index.mdx new file mode 100644 index 0000000000..283943776c --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/relay/relay/collect-action/index.mdx @@ -0,0 +1,472 @@ +--- +slug: "/reference/php/signal-wire/relay/relay/collect-action" +title: "CollectAction" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Relay\\CollectAction" + parent: "SignalWire\\Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php" +--- +# `CollectAction` + +Handle for calling.collect (and play\_and\_collect) operations. + +Note: play\_and\_collect emits intermediate calling.call.play events +that must be silently ignored so they do not pollute the collect +action's state. + +## Signature + +```php +class CollectAction extends Action +``` + +## Inheritance + +**Extends:** [SignalWire\Relay\Action](/docs/sdk-reference/reference/php/signal-wire/relay/relay/action) + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct( + string $controlId, + string $callId, + string $nodeId, + object $client +) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 33. + +*** + +### executeSubcommand + +Send a sub-command RPC through the client. + +The payload always includes control\_id, call\_id, and node\_id so +the server knows which action instance to target. + +#### Signature + +```php +public function executeSubcommand(string $method, array $extraParams = array ( +)): void +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 211. + +*** + +### getCallId + +#### Signature + +```php +public function getCallId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 107. + +*** + +### getCollectResult + +Return the structured collect result from the payload. + +#### Signature + +```php +public function getCollectResult(): ?array +``` + +#### Returns + +`?array` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 360. + +*** + +### getControlId + +#### Signature + +```php +public function getControlId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 102. + +*** + +### getEvents + +#### Signature + +```php +public function getEvents(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 97. + +*** + +### getNodeId + +#### Signature + +```php +public function getNodeId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 112. + +*** + +### getPayload + +#### Signature + +```php +public function getPayload(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 91. + +*** + +### getResult + +#### Signature + +```php +public function getResult() +``` + +#### Returns + +`mixed` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 81. + +*** + +### getState + +#### Signature + +```php +public function getState(): ?string +``` + +#### Returns + +`?string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 86. + +*** + +### getStopMethod + +#### Signature + +```php +public function getStopMethod(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 343. + +*** + +### handleEvent + +Override: silently ignore intermediate play events that arrive + +during a play\_and\_collect operation. + +#### Signature + +```php +public function handleEvent(SignalWire\Relay\Event $event): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 369. + +*** + +### isDone + +#### Signature + +```php +public function isDone(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 75. + +*** + +### onCompleted + +Register a callback to fire when the action completes. + +If the action is already done the callback fires immediately. + +#### Signature + +```php +public function onCompleted(callable $cb): SignalWire\Relay\Action +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Relay\Action` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 126. + +*** + +### resolve + +Mark this action as completed. + +The optional $result is stored and the onCompleted callback is +fired exactly once. + +#### Signature + +```php +public function resolve($result = NULL): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 167. + +*** + +### setStopMethod + +#### Signature + +```php +public function setStopMethod(string $method): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 338. + +*** + +### startInputTimers + +Notify the server to start input timers now rather than waiting + +for the initial-timeout to expire naturally. + +#### Signature + +```php +public function startInputTimers(): void +``` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 352. + +*** + +### stop + +Stop the running action by sending its stop sub-command. + +#### Signature + +```php +public function stop(): void +``` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 186. + +*** + +### wait + +Block until the action completes or $timeout seconds elapse. + +Each iteration calls $client->readOnce() so the event-loop +keeps processing inbound frames. + +Returns the resolving Event when the action completes (mirrors +Python's `return self._wait_event.wait()`). Returns null on +timeout. The numeric `$timeout` is interpreted as seconds and +accepts integers or floats. + +#### Signature + +```php +public function wait(int|float $timeout = 30): ?SignalWire\Relay\Event +``` + +#### Parameters + + + +#### Returns + +`?SignalWire\Relay\Event` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 58. + +## Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 328. diff --git a/fern/products/sdk-reference/php/signal-wire/relay/relay/constants/index.mdx b/fern/products/sdk-reference/php/signal-wire/relay/relay/constants/index.mdx new file mode 100644 index 0000000000..643b151594 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/relay/relay/constants/index.mdx @@ -0,0 +1,140 @@ +--- +slug: "/reference/php/signal-wire/relay/relay/constants" +title: "Constants" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Relay\\Constants" + parent: "SignalWire\\Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Constants.php" +--- +# `Constants` + +**Modifiers:** `final` + +## Signature + +```php +final class Constants +``` + +## Constants + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## Source + +[`SignalWire/Relay/Constants.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Constants.php) + +Line 7. diff --git a/fern/products/sdk-reference/php/signal-wire/relay/relay/detect-action/index.mdx b/fern/products/sdk-reference/php/signal-wire/relay/relay/detect-action/index.mdx new file mode 100644 index 0000000000..ae1491b932 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/relay/relay/detect-action/index.mdx @@ -0,0 +1,424 @@ +--- +slug: "/reference/php/signal-wire/relay/relay/detect-action" +title: "DetectAction" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Relay\\DetectAction" + parent: "SignalWire\\Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php" +--- +# `DetectAction` + +Handle for calling.detect operations (fax-tone, digit, machine, etc.). + +## Signature + +```php +class DetectAction extends Action +``` + +## Inheritance + +**Extends:** [SignalWire\Relay\Action](/docs/sdk-reference/reference/php/signal-wire/relay/relay/action) + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct( + string $controlId, + string $callId, + string $nodeId, + object $client +) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 33. + +*** + +### executeSubcommand + +Send a sub-command RPC through the client. + +The payload always includes control\_id, call\_id, and node\_id so +the server knows which action instance to target. + +#### Signature + +```php +public function executeSubcommand(string $method, array $extraParams = array ( +)): void +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 211. + +*** + +### getCallId + +#### Signature + +```php +public function getCallId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 107. + +*** + +### getControlId + +#### Signature + +```php +public function getControlId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 102. + +*** + +### getDetectResult + +#### Signature + +```php +public function getDetectResult(): ?array +``` + +#### Returns + +`?array` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 389. + +*** + +### getEvents + +#### Signature + +```php +public function getEvents(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 97. + +*** + +### getNodeId + +#### Signature + +```php +public function getNodeId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 112. + +*** + +### getPayload + +#### Signature + +```php +public function getPayload(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 91. + +*** + +### getResult + +#### Signature + +```php +public function getResult() +``` + +#### Returns + +`mixed` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 81. + +*** + +### getState + +#### Signature + +```php +public function getState(): ?string +``` + +#### Returns + +`?string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 86. + +*** + +### getStopMethod + +#### Signature + +```php +public function getStopMethod(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 384. + +*** + +### handleEvent + +Append an incoming event and update local state / payload. + +#### Signature + +```php +public function handleEvent(SignalWire\Relay\Event $event): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 144. + +*** + +### isDone + +#### Signature + +```php +public function isDone(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 75. + +*** + +### onCompleted + +Register a callback to fire when the action completes. + +If the action is already done the callback fires immediately. + +#### Signature + +```php +public function onCompleted(callable $cb): SignalWire\Relay\Action +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Relay\Action` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 126. + +*** + +### resolve + +Mark this action as completed. + +The optional $result is stored and the onCompleted callback is +fired exactly once. + +#### Signature + +```php +public function resolve($result = NULL): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 167. + +*** + +### stop + +Stop the running action by sending its stop sub-command. + +#### Signature + +```php +public function stop(): void +``` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 186. + +*** + +### wait + +Block until the action completes or $timeout seconds elapse. + +Each iteration calls $client->readOnce() so the event-loop +keeps processing inbound frames. + +Returns the resolving Event when the action completes (mirrors +Python's `return self._wait_event.wait()`). Returns null on +timeout. The numeric `$timeout` is interpreted as seconds and +accepts integers or floats. + +#### Signature + +```php +public function wait(int|float $timeout = 30): ?SignalWire\Relay\Event +``` + +#### Parameters + + + +#### Returns + +`?SignalWire\Relay\Event` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 58. + +## Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 382. diff --git a/fern/products/sdk-reference/php/signal-wire/relay/relay/device/index.mdx b/fern/products/sdk-reference/php/signal-wire/relay/relay/device/index.mdx new file mode 100644 index 0000000000..8306c28591 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/relay/relay/device/index.mdx @@ -0,0 +1,211 @@ +--- +slug: "/reference/php/signal-wire/relay/relay/device" +title: "Device" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Relay\\Device" + parent: "SignalWire\\Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Device.php" +--- +# `Device` + +A RELAY `{type, params}` device descriptor, as an immutable typed value + +object. + +The device object is the single most-recurring blob in the RELAY calling +layer: it identifies WHERE a call leg, tap delivery, or referral goes +(a phone number, a SIP endpoint, a WebRTC client, an RTP sink, …) and rides +inside `calling.connect` / `calling.dial` / `calling.tap` / `calling.refer` +params. Its shape is grounded in the switchblade-extracted wire schemas +(`relay-protocol/calling.{connect,dial,tap,refer}.params.json`): an object +with a required `type` string and a `params` payload. + +The Python reference (and this port until now) passes that object as a raw +associative array. This value object types the SHAPE — readonly, +constructor-promoted (consistent with the Wave-A \{@see Event\} immutability +work) — while keeping `type` a bare `string`: the discriminant is NOT +schema-enumerated (the set of device types is open — phone / sip / webrtc / +rtp / agent / …), so per the idiom philosophy it stays a string, not an enum. + +It is purely ADDITIVE: every method that takes a device still accepts the +raw array; \{@see Device::toArray()\} produces the byte-identical +`['type' => …, 'params' => …]` wire array, so a `Device` is a drop-in for the +hand-written literal. PORT\_ADDITION — the Python reference has no equivalent. + +``` +// hand-written (still works): +['type' => 'phone', 'params' => ['to_number' => $to, 'from_number' => $frm]] + +// typed, identical on the wire: +(new Device('phone', ['to_number' => $to, 'from_number' => $frm]))->toArray() +Device::phone($to, $frm)->toArray(); // convenience for the common case +``` + +**Modifiers:** `final` + +## Signature + +```php +final class Device +``` + +## Properties + + + + + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(string $type, array $params = array ( +)) +``` + +#### Parameters + + + The device discriminant (`phone`, `sip`, `webrtc`, `rtp`, …). Kept a bare string — the set is open and not schema-enumerated. + + + + The device parameters (e.g. `to_number` / `from_number` for a phone, `to` for a SIP referral). + + +#### Source + +[`SignalWire/Relay/Device.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Device.php) + +Line 47. + +*** + +### phone + +Convenience constructor for the most common device: a PSTN phone leg. + +Mirrors the `['type' => 'phone', 'params' => ['to_number' => …, +'from_number' => …]]` literal callers hand-write today. + +**Modifiers:** `static` + +#### Signature + +```php +public static function phone( + string $toNumber, + string $fromNumber, + array $extra = array ( +) +): SignalWire\Relay\Device +``` + +#### Parameters + + + + + + + Additional `params` keys (e.g. `timeout`) merged after the numbers. + + +#### Returns + +`SignalWire\Relay\Device` + +#### Source + +[`SignalWire/Relay/Device.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Device.php) + +Line 78. + +*** + +### sip + +Convenience constructor for a SIP endpoint device. + +**Modifiers:** `static` + +#### Signature + +```php +public static function sip(string $to, array $extra = array ( +)): SignalWire\Relay\Device +``` + +#### Parameters + + + + + Additional `params` keys merged after the address (e.g. `from`, `headers`, `codecs`). + + +#### Returns + +`SignalWire\Relay\Device` + +#### Source + +[`SignalWire/Relay/Device.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Device.php) + +Line 92. + +*** + +### toArray + +Render the device to its wire array — byte-identical to the + +hand-written `['type' => …, 'params' => …]` literal (same keys, same +order). This is what \{@see Call::connect()\} / \{@see Client::dial()\} / +\{@see Call::tap()\} / \{@see Call::refer()\} put on the wire. + +#### Signature + +```php +public function toArray(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Device.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Device.php) + +Line 61. + +## Source + +[`SignalWire/Relay/Device.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Device.php) + +Line 38. diff --git a/fern/products/sdk-reference/php/signal-wire/relay/relay/event/index.mdx b/fern/products/sdk-reference/php/signal-wire/relay/relay/event/index.mdx new file mode 100644 index 0000000000..ba61ce4e1b --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/relay/relay/event/index.mdx @@ -0,0 +1,307 @@ +--- +slug: "/reference/php/signal-wire/relay/relay/event" +title: "Event" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Relay\\Event" + parent: "SignalWire\\Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Event.php" +--- +# `Event` + +An immutable RELAY event value object. + +An Event carries the event type, its raw params, and a receive timestamp. +Once constructed it never changes — the three backing fields are +`readonly` (PHP 8.1), so an accidental write after construction is a hard +`\Error` rather than silent state corruption. This matches how the event is +actually used: handlers (`Call::dispatchEvent`, `Action::handleEvent`, +`Message::handleEvent`) only ever _read_ it. + +`eventType` and `params` are promoted constructor parameters; `timestamp` +is declared separately because its default is computed (`microtime(true)` +when the caller passes 0), which a promoted default expression cannot +express. + +The fields stay `private` (exposed only through the `get*` accessors) so the +public surface — and therefore the cross-port audit shape — is unchanged by +the immutability upgrade. + +## Signature + +```php +class Event +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(string $eventType, array $params, float $timestamp = 0.0) +``` + +#### Parameters + + + + + + + +#### Source + +[`SignalWire/Relay/Event.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Event.php) + +Line 30. + +*** + +### dialState + +The dial outcome carried by a `calling.call.dial` event as a typed + +\{@see DialState\}, read from the `dial_state` (or legacy `state`) param, +or null when absent / outside the known closed set (a forward-compatible +server value). + +Offered ALONGSIDE the raw `getParams()['dial_state']` string for parity: +the wire string stays available; `dialState()` is the typed view for +autocompletion + an exhaustive `match` + `->isTerminal()`. PORT\_ADDITION. + +#### Signature + +```php +public function dialState(): ?SignalWire\Relay\DialState +``` + +#### Returns + +`?SignalWire\Relay\DialState` + +#### Source + +[`SignalWire/Relay/Event.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Event.php) + +Line 88. + +*** + +### getCallId + +#### Signature + +```php +public function getCallId(): ?string +``` + +#### Returns + +`?string` + +#### Source + +[`SignalWire/Relay/Event.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Event.php) + +Line 53. + +*** + +### getControlId + +#### Signature + +```php +public function getControlId(): ?string +``` + +#### Returns + +`?string` + +#### Source + +[`SignalWire/Relay/Event.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Event.php) + +Line 63. + +*** + +### getEventType + +#### Signature + +```php +public function getEventType(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Event.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Event.php) + +Line 38. + +*** + +### getNodeId + +#### Signature + +```php +public function getNodeId(): ?string +``` + +#### Returns + +`?string` + +#### Source + +[`SignalWire/Relay/Event.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Event.php) + +Line 58. + +*** + +### getParams + +#### Signature + +```php +public function getParams(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Event.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Event.php) + +Line 48. + +*** + +### getState + +#### Signature + +```php +public function getState(): ?string +``` + +#### Returns + +`?string` + +#### Source + +[`SignalWire/Relay/Event.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Event.php) + +Line 73. + +*** + +### getTag + +#### Signature + +```php +public function getTag(): ?string +``` + +#### Returns + +`?string` + +#### Source + +[`SignalWire/Relay/Event.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Event.php) + +Line 68. + +*** + +### getTimestamp + +#### Signature + +```php +public function getTimestamp(): float +``` + +#### Returns + +`float` + +#### Source + +[`SignalWire/Relay/Event.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Event.php) + +Line 43. + +*** + +### parse + +**Modifiers:** `static` + +#### Signature + +```php +public static function parse(string $eventType, array $params): SignalWire\Relay\Event +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire\Relay\Event` + +#### Source + +[`SignalWire/Relay/Event.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Event.php) + +Line 103. + +*** + +### toArray + +#### Signature + +```php +public function toArray(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Event.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Event.php) + +Line 94. + +## Source + +[`SignalWire/Relay/Event.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Event.php) + +Line 26. diff --git a/fern/products/sdk-reference/php/signal-wire/relay/relay/fax-action/index.mdx b/fern/products/sdk-reference/php/signal-wire/relay/relay/fax-action/index.mdx new file mode 100644 index 0000000000..aaa54f0593 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/relay/relay/fax-action/index.mdx @@ -0,0 +1,429 @@ +--- +slug: "/reference/php/signal-wire/relay/relay/fax-action" +title: "FaxAction" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Relay\\FaxAction" + parent: "SignalWire\\Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php" +--- +# `FaxAction` + +Handle for calling.fax operations (send or receive). + +## Signature + +```php +class FaxAction extends Action +``` + +## Inheritance + +**Extends:** [SignalWire\Relay\Action](/docs/sdk-reference/reference/php/signal-wire/relay/relay/action) + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct( + string $controlId, + string $callId, + string $nodeId, + object $client, + string $faxType = 'send' +) +``` + +#### Parameters + + + + + + + + + + + 'send' or 'receive' + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 405. + +*** + +### executeSubcommand + +Send a sub-command RPC through the client. + +The payload always includes control\_id, call\_id, and node\_id so +the server knows which action instance to target. + +#### Signature + +```php +public function executeSubcommand(string $method, array $extraParams = array ( +)): void +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 211. + +*** + +### getCallId + +#### Signature + +```php +public function getCallId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 107. + +*** + +### getControlId + +#### Signature + +```php +public function getControlId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 102. + +*** + +### getEvents + +#### Signature + +```php +public function getEvents(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 97. + +*** + +### getFaxType + +#### Signature + +```php +public function getFaxType(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 416. + +*** + +### getNodeId + +#### Signature + +```php +public function getNodeId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 112. + +*** + +### getPayload + +#### Signature + +```php +public function getPayload(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 91. + +*** + +### getResult + +#### Signature + +```php +public function getResult() +``` + +#### Returns + +`mixed` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 81. + +*** + +### getState + +#### Signature + +```php +public function getState(): ?string +``` + +#### Returns + +`?string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 86. + +*** + +### getStopMethod + +#### Signature + +```php +public function getStopMethod(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 421. + +*** + +### handleEvent + +Append an incoming event and update local state / payload. + +#### Signature + +```php +public function handleEvent(SignalWire\Relay\Event $event): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 144. + +*** + +### isDone + +#### Signature + +```php +public function isDone(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 75. + +*** + +### onCompleted + +Register a callback to fire when the action completes. + +If the action is already done the callback fires immediately. + +#### Signature + +```php +public function onCompleted(callable $cb): SignalWire\Relay\Action +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Relay\Action` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 126. + +*** + +### resolve + +Mark this action as completed. + +The optional $result is stored and the onCompleted callback is +fired exactly once. + +#### Signature + +```php +public function resolve($result = NULL): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 167. + +*** + +### stop + +Stop the running action by sending its stop sub-command. + +#### Signature + +```php +public function stop(): void +``` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 186. + +*** + +### wait + +Block until the action completes or $timeout seconds elapse. + +Each iteration calls $client->readOnce() so the event-loop +keeps processing inbound frames. + +Returns the resolving Event when the action completes (mirrors +Python's `return self._wait_event.wait()`). Returns null on +timeout. The numeric `$timeout` is interpreted as seconds and +accepts integers or floats. + +#### Signature + +```php +public function wait(int|float $timeout = 30): ?SignalWire\Relay\Event +``` + +#### Parameters + + + +#### Returns + +`?SignalWire\Relay\Event` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 58. + +## Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 398. diff --git a/fern/products/sdk-reference/php/signal-wire/relay/relay/index.mdx b/fern/products/sdk-reference/php/signal-wire/relay/relay/index.mdx new file mode 100644 index 0000000000..3ba6d6f18c --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/relay/relay/index.mdx @@ -0,0 +1,787 @@ +--- +slug: "/reference/php/signal-wire/relay/relay" +title: "Relay" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "module" + language: "php" + qualified_name: "SignalWire\\Relay" + module: "SignalWire.Relay" +--- +# `Relay` + +## Signature + +```php +namespace SignalWire\Relay +``` + +## Classes + + + + Base class for all RELAY call actions (play, record, collect, etc.). + + + + Handle for calling.ai operations. + + + + Represents a RELAY voice call. + + + + RELAY Client – manages the WebSocket connection to SignalWire, sends + + + + Handle for calling.collect (and play\_and\_collect) operations. + + + + + + Handle for calling.detect operations (fax-tone, digit, machine, etc.). + + + + A RELAY `{type, params}` device descriptor, as an immutable typed value + + + + An immutable RELAY event value object. + + + + Handle for calling.fax operations (send or receive). + + + + Represents a RELAY messaging message (SMS / MMS). + + + + Handle for calling.pay operations. + + + + Handle for calling.play operations. + + + + Handle for calling.record operations. + + + + Exception type for RELAY-protocol-level failures. + + + + Handle for calling.stream operations. + + + + Handle for calling.tap operations. + + + + Handle for calling.transcribe operations. + + + + RELAY WebSocket transport. + + + +## Enums + +### CallState + +RELAY call lifecycle state, as a typed, compile-time-checked closed set. + +A call moves through these states over its lifetime: + +``` +created → ringing → answered → ending → ended +``` + +The five members are exactly the \{@see Constants\}::CALL\_STATE\_\* tokens +(grounded in the Python reference's `relay/constants.py` CALL\_STATES tuple); +each backing string IS the wire value the server emits in a +`calling.call.state` event's `call_state` / `state` field. \{@see Call\} +keeps the bare-string `$state` property for parity with the Python reference +(which models state as a plain `str`); this enum is offered ALONGSIDE it via +the typed \{@see Call::callState()\} accessor — autocompletion and an +exhaustive `match` at the call site, with the string preserved. + +``` +$call->state; // 'answered' (string, parity) +$call->callState(); // CallState::Answered (typed) +$call->callState()?->isTerminal(); // false +``` + +Server states can GROW (the wire vocabulary is owned by the server, not the +SDK), so \{@see CallState::tryFromWire()\} maps an unknown value to `null` +rather than throwing — a forward-compatible coerce. This is a PHP +PORT\_ADDITION: the Python reference uses a bare `str`. + +This is the CALL-state vocabulary ONLY. It is deliberately NOT unified with +\{@see DialState\} (dial-outcome) or \{@see MessageState\} (message-delivery) — +three distinct vocabularies that must never be conflated. + +#### Signature + +```php +final enum CallState implements UnitEnum, BackedEnum +``` + +#### Inheritance + +**Implements:** `UnitEnum`, `BackedEnum` + +#### Properties + + + + + +#### Constants + + + The call has been answered and is up. + + + + The call object exists but nothing has happened yet (the default). + + + + The call has ended — the one terminal state. + + + + The call is tearing down. + + + + The call is ringing the destination. + + +#### Variants + + + The call has been answered and is up. + + + + The call object exists but nothing has happened yet (the default). + + + + The call has ended — the one terminal state. + + + + The call is tearing down. + + + + The call is ringing the destination. + + +#### Methods + +##### cases + +**Modifiers:** `static` + +###### Signature + +```php +public static function cases(): array +``` + +###### Returns + +`array` + +*** + +##### from + +**Modifiers:** `static` + +###### Signature + +```php +public static function from(string|int $value): static +``` + +###### Parameters + + + +###### Returns + +`static` + +*** + +##### isTerminal + +True once the call has reached its terminal state. + +Terminal = \{@see CallState::Ended\} only, matching +\{@see Constants\}::CALL\_TERMINAL\_STATES (`['ended' => true]`). A terminal +state is what resolves every in-flight action on the call. + +###### Signature + +```php +public function isTerminal(): bool +``` + +###### Returns + +`bool` + +###### Source + +[`SignalWire/Relay/CallState.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/CallState.php) + +Line 60. + +*** + +##### tryFrom + +**Modifiers:** `static` + +###### Signature + +```php +public static function tryFrom(string|int $value): ?static +``` + +###### Parameters + + + +###### Returns + +`?static` + +*** + +##### tryFromWire + +Coerce a wire string (or null) to this enum, mapping any value outside + +the known closed set — or null — to null instead of throwing. + +Use this when reading a SERVER-emitted state: the wire vocabulary is +owned by the server and may grow, so an unrecognised value is not an +error — the caller falls back to the raw string. (Contrast PHP's +built-in \{@see CallState::from()\}, which throws \ValueError on a miss.) + +**Modifiers:** `static` + +###### Signature + +```php +public static function tryFromWire(?string $wire): ?SignalWire\Relay\CallState +``` + +###### Parameters + + + The raw `call_state` / `state` value from the wire. + + +###### Returns + +`?SignalWire\Relay\CallState` + +###### Source + +[`SignalWire/Relay/CallState.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/CallState.php) + +Line 76. + +#### Source + +[`SignalWire/Relay/CallState.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/CallState.php) + +Line 36. + +*** + +### DialState + +RELAY dial outcome state, as a typed, compile-time-checked closed set. + +A `calling.call.dial` event carries a `dial_state` (or legacy `state`) that +reports how the outbound dial is progressing: + +``` +dialing → (answered | failed | no_answer | busy) +``` + +The Python reference's `RelayClient` documents the core three +(`dialing | answered | failed`, see `relay/client.py`'s dial-event handler); +this port's \{@see Client::handleDialEvent()\} additionally treats the wire's +`no_answer` / `busy` as terminal failures, so they are modelled here too. +Each backing string IS the wire value. \{@see Constants\}::DIAL\_STATE\_\* keeps +the bare-string constants for parity (the Python reference reads +`dial_state` as a plain `str`); this enum is offered ALONGSIDE them. + +``` +DialState::Answered->value; // 'answered' (wire string) +DialState::tryFromWire('failed'); // DialState::Failed +DialState::Failed->isTerminal(); // true +DialState::Dialing->isTerminal(); // false (still in progress) +``` + +Server states can GROW, so \{@see DialState::tryFromWire()\} maps an unknown +value to `null` rather than throwing — a forward-compatible coerce. This is +a PHP PORT\_ADDITION: the Python reference uses a bare `str`. + +This is the DIAL-outcome vocabulary ONLY. It is deliberately NOT unified +with \{@see CallState\} (call-lifecycle) or \{@see MessageState\} +(message-delivery) — three distinct vocabularies that must never be +conflated. (Note `answered` appears in both CallState and DialState but +means different things — a call lifecycle phase vs a dial outcome — which is +exactly why the vocabularies are kept apart.) + +#### Signature + +```php +final enum DialState implements UnitEnum, BackedEnum +``` + +#### Inheritance + +**Implements:** `UnitEnum`, `BackedEnum` + +#### Properties + + + + + +#### Constants + + + A leg answered — the dial succeeded with a winner. + + + + Every leg returned busy. + + + + The dial is in progress, no leg has been picked yet. + + + + The dial failed outright. + + + + No leg answered before the dial timed out. + + +#### Variants + + + A leg answered — the dial succeeded with a winner. + + + + Every leg returned busy. + + + + The dial is in progress, no leg has been picked yet. + + + + The dial failed outright. + + + + No leg answered before the dial timed out. + + +#### Methods + +##### cases + +**Modifiers:** `static` + +###### Signature + +```php +public static function cases(): array +``` + +###### Returns + +`array` + +*** + +##### from + +**Modifiers:** `static` + +###### Signature + +```php +public static function from(string|int $value): static +``` + +###### Parameters + + + +###### Returns + +`static` + +*** + +##### isTerminal + +True once the dial has reached a terminal outcome. + +Terminal = any state other than \{@see DialState::Dialing\} — i.e. a +winner answered (\{@see DialState::Answered\}) or the dial gave up +(failed / no-answer / busy). This mirrors +\{@see Client::handleDialEvent()\}, which resolves (or rejects) the +pending dial on exactly these states and keeps waiting while `dialing`. + +###### Signature + +```php +public function isTerminal(): bool +``` + +###### Returns + +`bool` + +###### Source + +[`SignalWire/Relay/DialState.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/DialState.php) + +Line 65. + +*** + +##### tryFrom + +**Modifiers:** `static` + +###### Signature + +```php +public static function tryFrom(string|int $value): ?static +``` + +###### Parameters + + + +###### Returns + +`?static` + +*** + +##### tryFromWire + +Coerce a wire string (or null) to this enum, mapping any value outside + +the known closed set — or null — to null instead of throwing. + +Use this when reading a SERVER-emitted `dial_state`: the wire vocabulary +is owned by the server and may grow, so an unrecognised value is not an +error — the caller falls back to the raw string. (Contrast PHP's +built-in \{@see DialState::from()\}, which throws \ValueError on a miss.) + +**Modifiers:** `static` + +###### Signature + +```php +public static function tryFromWire(?string $wire): ?SignalWire\Relay\DialState +``` + +###### Parameters + + + The raw `dial_state` / `state` value from the wire. + + +###### Returns + +`?SignalWire\Relay\DialState` + +###### Source + +[`SignalWire/Relay/DialState.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/DialState.php) + +Line 81. + +#### Source + +[`SignalWire/Relay/DialState.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/DialState.php) + +Line 39. + +*** + +### MessageState + +RELAY message delivery state, as a typed, compile-time-checked closed set. + +A \{@see Message\} progresses through these states as the server reports +delivery via `messaging.state` events: + +``` +queued → initiated → sent → (delivered | undelivered | failed) +``` + +plus `received` for an inbound message. The seven members are exactly the +\{@see Constants\}::MESSAGE\_STATE\_\* tokens (grounded in the Python reference's +`relay/constants.py` MESSAGE\_STATE\_\* + MESSAGE\_TERMINAL\_STATES); each +backing string IS the wire value the server emits in the `message_state` / +`state` field. \{@see Message\} keeps the bare-string `getState()` accessor +for parity with the Python reference (which models state as a plain `str`); +this enum is offered ALONGSIDE it via the typed +\{@see Message::messageState()\} accessor. + +``` +$msg->getState(); // 'delivered' (string, parity) +$msg->messageState(); // MessageState::Delivered (typed) +$msg->messageState()?->isTerminal(); // true +``` + +Server states can GROW, so \{@see MessageState::tryFromWire()\} maps an +unknown value to `null` rather than throwing — a forward-compatible coerce. +This is a PHP PORT\_ADDITION: the Python reference uses a bare `str`. + +This is the MESSAGE-delivery vocabulary ONLY. It is deliberately NOT unified +with \{@see CallState\} (call-lifecycle) or \{@see DialState\} (dial-outcome) — +three distinct vocabularies that must never be conflated. (Note `failed` +appears in both MessageState and DialState but means different things — +message-delivery failure vs dial-outcome failure.) + +#### Signature + +```php +final enum MessageState implements UnitEnum, BackedEnum +``` + +#### Inheritance + +**Implements:** `UnitEnum`, `BackedEnum` + +#### Properties + + + + + +#### Constants + + + The message was delivered to the carrier/handset (terminal, success). + + + + The message failed to send (terminal, failure). + + + + Sending has been initiated. + + + + The message is queued for sending (the initial state). + + + + An inbound message was received. + + + + The message has left the platform. + + + + Delivery was attempted but not confirmed (terminal, failure). + + +#### Variants + + + The message was delivered to the carrier/handset (terminal, success). + + + + The message failed to send (terminal, failure). + + + + Sending has been initiated. + + + + The message is queued for sending (the initial state). + + + + An inbound message was received. + + + + The message has left the platform. + + + + Delivery was attempted but not confirmed (terminal, failure). + + +#### Methods + +##### cases + +**Modifiers:** `static` + +###### Signature + +```php +public static function cases(): array +``` + +###### Returns + +`array` + +*** + +##### from + +**Modifiers:** `static` + +###### Signature + +```php +public static function from(string|int $value): static +``` + +###### Parameters + + + +###### Returns + +`static` + +*** + +##### isTerminal + +True once the message has reached a terminal delivery state. + +Terminal = \{@see MessageState::Delivered\}, \{@see MessageState::Undelivered\}, +or \{@see MessageState::Failed\}, matching +\{@see Constants\}::MESSAGE\_TERMINAL\_STATES — the three states on which +\{@see Message::dispatchEvent()\} auto-resolves the message. Note `received` +is NOT terminal here (it mirrors the Python reference, whose +MESSAGE\_TERMINAL\_STATES excludes it). + +###### Signature + +```php +public function isTerminal(): bool +``` + +###### Returns + +`bool` + +###### Source + +[`SignalWire/Relay/MessageState.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/MessageState.php) + +Line 71. + +*** + +##### tryFrom + +**Modifiers:** `static` + +###### Signature + +```php +public static function tryFrom(string|int $value): ?static +``` + +###### Parameters + + + +###### Returns + +`?static` + +*** + +##### tryFromWire + +Coerce a wire string (or null) to this enum, mapping any value outside + +the known closed set — or null — to null instead of throwing. + +Use this when reading a SERVER-emitted `message_state`: the wire +vocabulary is owned by the server and may grow, so an unrecognised value +is not an error — the caller falls back to the raw string. (Contrast +PHP's built-in \{@see MessageState::from()\}, which throws \ValueError on a +miss.) + +**Modifiers:** `static` + +###### Signature + +```php +public static function tryFromWire(?string $wire): ?SignalWire\Relay\MessageState +``` + +###### Parameters + + + The raw `message_state` / `state` value from the wire. + + +###### Returns + +`?SignalWire\Relay\MessageState` + +###### Source + +[`SignalWire/Relay/MessageState.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/MessageState.php) + +Line 91. + +#### Source + +[`SignalWire/Relay/MessageState.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/MessageState.php) + +Line 38. diff --git a/fern/products/sdk-reference/php/signal-wire/relay/relay/message/index.mdx b/fern/products/sdk-reference/php/signal-wire/relay/relay/message/index.mdx new file mode 100644 index 0000000000..493d876114 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/relay/relay/message/index.mdx @@ -0,0 +1,499 @@ +--- +slug: "/reference/php/signal-wire/relay/relay/message" +title: "Message" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Relay\\Message" + parent: "SignalWire\\Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Message.php" +--- +# `Message` + +Represents a RELAY messaging message (SMS / MMS). + +A Message is created when you send or receive a message through the +RELAY messaging namespace. It accumulates state-change events and +resolves once the message reaches a terminal state (delivered, +undelivered, or failed). + +## Signature + +```php +class Message +``` + +## Methods + +### \_\_construct + +Build a Message from a params array (as returned by the server). + +Expected keys (all optional with sane defaults): +message\_id, context, direction, from\_number / from, +to\_number / to, body, media, tags, state, reason + +#### Signature + +```php +public function __construct(array $params = array ( +)) +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/Message.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Message.php) + +Line 46. + +*** + +### dispatchEvent + +Process an inbound event for this message. + +Updates state/reason, fires any registered event listeners, and +auto-resolves the message when it reaches a terminal state. + +Accepts both `state` and `message_state` keys on the event +payload — production RELAY emits `message_state` while older +fixtures use `state`. + +#### Signature + +```php +public function dispatchEvent(SignalWire\Relay\Event $event): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/Message.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Message.php) + +Line 74. + +*** + +### getBody + +#### Signature + +```php +public function getBody(): ?string +``` + +#### Returns + +`?string` + +#### Source + +[`SignalWire/Relay/Message.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Message.php) + +Line 205. + +*** + +### getContext + +#### Signature + +```php +public function getContext(): ?string +``` + +#### Returns + +`?string` + +#### Source + +[`SignalWire/Relay/Message.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Message.php) + +Line 185. + +*** + +### getDirection + +#### Signature + +```php +public function getDirection(): ?string +``` + +#### Returns + +`?string` + +#### Source + +[`SignalWire/Relay/Message.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Message.php) + +Line 190. + +*** + +### getFromNumber + +#### Signature + +```php +public function getFromNumber(): ?string +``` + +#### Returns + +`?string` + +#### Source + +[`SignalWire/Relay/Message.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Message.php) + +Line 195. + +*** + +### getMedia + +#### Signature + +```php +public function getMedia(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Message.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Message.php) + +Line 210. + +*** + +### getMessageId + +#### Signature + +```php +public function getMessageId(): ?string +``` + +#### Returns + +`?string` + +#### Source + +[`SignalWire/Relay/Message.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Message.php) + +Line 180. + +*** + +### getReason + +#### Signature + +```php +public function getReason(): ?string +``` + +#### Returns + +`?string` + +#### Source + +[`SignalWire/Relay/Message.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Message.php) + +Line 240. + +*** + +### getResult + +#### Signature + +```php +public function getResult() +``` + +#### Returns + +`mixed` + +#### Source + +[`SignalWire/Relay/Message.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Message.php) + +Line 246. + +*** + +### getState + +#### Signature + +```php +public function getState(): ?string +``` + +#### Returns + +`?string` + +#### Source + +[`SignalWire/Relay/Message.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Message.php) + +Line 220. + +*** + +### getTags + +#### Signature + +```php +public function getTags(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Message.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Message.php) + +Line 215. + +*** + +### getToNumber + +#### Signature + +```php +public function getToNumber(): ?string +``` + +#### Returns + +`?string` + +#### Source + +[`SignalWire/Relay/Message.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Message.php) + +Line 200. + +*** + +### handleEvent + +Alias for `dispatchEvent` so the Client's event router (which + +calls `handleEvent` for symmetry with Action) doesn't need a +special case. Both names route the same way. + +#### Signature + +```php +public function handleEvent(SignalWire\Relay\Event $event): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/Message.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Message.php) + +Line 112. + +*** + +### isDone + +#### Signature + +```php +public function isDone(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Relay/Message.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Message.php) + +Line 175. + +*** + +### messageState + +The current delivery state as a typed \{@see MessageState\}, or null when + +the raw \{@see getState()\} string is outside the known closed set +(a forward-compatible server value). + +Offered ALONGSIDE the bare-string \{@see getState()\} accessor for parity +with the Python reference: `getState()` stays the canonical string; +`messageState()` is the typed view for autocompletion + an exhaustive +`match` + `->isTerminal()`. PORT\_ADDITION. + +#### Signature + +```php +public function messageState(): ?SignalWire\Relay\MessageState +``` + +#### Returns + +`?SignalWire\Relay\MessageState` + +#### Source + +[`SignalWire/Relay/Message.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Message.php) + +Line 235. + +*** + +### on + +Register a listener that fires on every state-change event. + +#### Signature + +```php +public function on(callable $cb): SignalWire\Relay\Message +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Relay\Message` + +#### Source + +[`SignalWire/Relay/Message.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Message.php) + +Line 149. + +*** + +### onCompleted + +Register a callback to fire when the message reaches a terminal state. + +If the message is already complete the callback fires immediately. + +#### Signature + +```php +public function onCompleted(callable $cb): SignalWire\Relay\Message +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Relay\Message` + +#### Source + +[`SignalWire/Relay/Message.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Message.php) + +Line 160. + +*** + +### resolve + +Mark this message as completed. + +The optional $result is stored and the onCompleted callback fires +exactly once. + +#### Signature + +```php +public function resolve($result = NULL): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/Message.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Message.php) + +Line 263. + +*** + +### wait + +Block until the message completes or $timeout seconds elapse. + +The caller is expected to feed events into dispatchEvent() from +another mechanism (e.g. the client's read loop). This method +simply spins until completion. + +#### Signature + +```php +public function wait(int $timeout = 30) +``` + +#### Parameters + + + +#### Returns + +`mixed` — The resolved result, or null on timeout. + +#### Source + +[`SignalWire/Relay/Message.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Message.php) + +Line 130. + +## Source + +[`SignalWire/Relay/Message.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Message.php) + +Line 17. diff --git a/fern/products/sdk-reference/php/signal-wire/relay/relay/pay-action/index.mdx b/fern/products/sdk-reference/php/signal-wire/relay/relay/pay-action/index.mdx new file mode 100644 index 0000000000..9bb833a20e --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/relay/relay/pay-action/index.mdx @@ -0,0 +1,404 @@ +--- +slug: "/reference/php/signal-wire/relay/relay/pay-action" +title: "PayAction" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Relay\\PayAction" + parent: "SignalWire\\Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php" +--- +# `PayAction` + +Handle for calling.pay operations. + +## Signature + +```php +class PayAction extends Action +``` + +## Inheritance + +**Extends:** [SignalWire\Relay\Action](/docs/sdk-reference/reference/php/signal-wire/relay/relay/action) + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct( + string $controlId, + string $callId, + string $nodeId, + object $client +) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 33. + +*** + +### executeSubcommand + +Send a sub-command RPC through the client. + +The payload always includes control\_id, call\_id, and node\_id so +the server knows which action instance to target. + +#### Signature + +```php +public function executeSubcommand(string $method, array $extraParams = array ( +)): void +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 211. + +*** + +### getCallId + +#### Signature + +```php +public function getCallId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 107. + +*** + +### getControlId + +#### Signature + +```php +public function getControlId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 102. + +*** + +### getEvents + +#### Signature + +```php +public function getEvents(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 97. + +*** + +### getNodeId + +#### Signature + +```php +public function getNodeId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 112. + +*** + +### getPayload + +#### Signature + +```php +public function getPayload(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 91. + +*** + +### getResult + +#### Signature + +```php +public function getResult() +``` + +#### Returns + +`mixed` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 81. + +*** + +### getState + +#### Signature + +```php +public function getState(): ?string +``` + +#### Returns + +`?string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 86. + +*** + +### getStopMethod + +#### Signature + +```php +public function getStopMethod(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 456. + +*** + +### handleEvent + +Append an incoming event and update local state / payload. + +#### Signature + +```php +public function handleEvent(SignalWire\Relay\Event $event): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 144. + +*** + +### isDone + +#### Signature + +```php +public function isDone(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 75. + +*** + +### onCompleted + +Register a callback to fire when the action completes. + +If the action is already done the callback fires immediately. + +#### Signature + +```php +public function onCompleted(callable $cb): SignalWire\Relay\Action +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Relay\Action` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 126. + +*** + +### resolve + +Mark this action as completed. + +The optional $result is stored and the onCompleted callback is +fired exactly once. + +#### Signature + +```php +public function resolve($result = NULL): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 167. + +*** + +### stop + +Stop the running action by sending its stop sub-command. + +#### Signature + +```php +public function stop(): void +``` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 186. + +*** + +### wait + +Block until the action completes or $timeout seconds elapse. + +Each iteration calls $client->readOnce() so the event-loop +keeps processing inbound frames. + +Returns the resolving Event when the action completes (mirrors +Python's `return self._wait_event.wait()`). Returns null on +timeout. The numeric `$timeout` is interpreted as seconds and +accepts integers or floats. + +#### Signature + +```php +public function wait(int|float $timeout = 30): ?SignalWire\Relay\Event +``` + +#### Parameters + + + +#### Returns + +`?SignalWire\Relay\Event` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 58. + +## Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 454. diff --git a/fern/products/sdk-reference/php/signal-wire/relay/relay/play-action/index.mdx b/fern/products/sdk-reference/php/signal-wire/relay/relay/play-action/index.mdx new file mode 100644 index 0000000000..635acdf031 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/relay/relay/play-action/index.mdx @@ -0,0 +1,460 @@ +--- +slug: "/reference/php/signal-wire/relay/relay/play-action" +title: "PlayAction" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Relay\\PlayAction" + parent: "SignalWire\\Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php" +--- +# `PlayAction` + +Handle for calling.play operations. + +## Signature + +```php +class PlayAction extends Action +``` + +## Inheritance + +**Extends:** [SignalWire\Relay\Action](/docs/sdk-reference/reference/php/signal-wire/relay/relay/action) + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct( + string $controlId, + string $callId, + string $nodeId, + object $client +) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 33. + +*** + +### executeSubcommand + +Send a sub-command RPC through the client. + +The payload always includes control\_id, call\_id, and node\_id so +the server knows which action instance to target. + +#### Signature + +```php +public function executeSubcommand(string $method, array $extraParams = array ( +)): void +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 211. + +*** + +### getCallId + +#### Signature + +```php +public function getCallId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 107. + +*** + +### getControlId + +#### Signature + +```php +public function getControlId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 102. + +*** + +### getEvents + +#### Signature + +```php +public function getEvents(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 97. + +*** + +### getNodeId + +#### Signature + +```php +public function getNodeId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 112. + +*** + +### getPayload + +#### Signature + +```php +public function getPayload(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 91. + +*** + +### getResult + +#### Signature + +```php +public function getResult() +``` + +#### Returns + +`mixed` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 81. + +*** + +### getState + +#### Signature + +```php +public function getState(): ?string +``` + +#### Returns + +`?string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 86. + +*** + +### getStopMethod + +#### Signature + +```php +public function getStopMethod(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 251. + +*** + +### handleEvent + +Append an incoming event and update local state / payload. + +#### Signature + +```php +public function handleEvent(SignalWire\Relay\Event $event): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 144. + +*** + +### isDone + +#### Signature + +```php +public function isDone(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 75. + +*** + +### onCompleted + +Register a callback to fire when the action completes. + +If the action is already done the callback fires immediately. + +#### Signature + +```php +public function onCompleted(callable $cb): SignalWire\Relay\Action +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Relay\Action` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 126. + +*** + +### pause + +#### Signature + +```php +public function pause(): void +``` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 256. + +*** + +### resolve + +Mark this action as completed. + +The optional $result is stored and the onCompleted callback is +fired exactly once. + +#### Signature + +```php +public function resolve($result = NULL): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 167. + +*** + +### resume + +#### Signature + +```php +public function resume(): void +``` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 261. + +*** + +### stop + +Stop the running action by sending its stop sub-command. + +#### Signature + +```php +public function stop(): void +``` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 186. + +*** + +### volume + +Adjust playback volume. + +#### Signature + +```php +public function volume(float $db): void +``` + +#### Parameters + + + Volume adjustment in dB (e.g. -4.0 or 6.0). + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 271. + +*** + +### wait + +Block until the action completes or $timeout seconds elapse. + +Each iteration calls $client->readOnce() so the event-loop +keeps processing inbound frames. + +Returns the resolving Event when the action completes (mirrors +Python's `return self._wait_event.wait()`). Returns null on +timeout. The numeric `$timeout` is interpreted as seconds and +accepts integers or floats. + +#### Signature + +```php +public function wait(int|float $timeout = 30): ?SignalWire\Relay\Event +``` + +#### Parameters + + + +#### Returns + +`?SignalWire\Relay\Event` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 58. + +## Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 249. diff --git a/fern/products/sdk-reference/php/signal-wire/relay/relay/record-action/index.mdx b/fern/products/sdk-reference/php/signal-wire/relay/relay/record-action/index.mdx new file mode 100644 index 0000000000..f444dd8dcd --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/relay/relay/record-action/index.mdx @@ -0,0 +1,508 @@ +--- +slug: "/reference/php/signal-wire/relay/relay/record-action" +title: "RecordAction" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Relay\\RecordAction" + parent: "SignalWire\\Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php" +--- +# `RecordAction` + +Handle for calling.record operations. + +## Signature + +```php +class RecordAction extends Action +``` + +## Inheritance + +**Extends:** [SignalWire\Relay\Action](/docs/sdk-reference/reference/php/signal-wire/relay/relay/action) + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct( + string $controlId, + string $callId, + string $nodeId, + object $client +) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 33. + +*** + +### executeSubcommand + +Send a sub-command RPC through the client. + +The payload always includes control\_id, call\_id, and node\_id so +the server knows which action instance to target. + +#### Signature + +```php +public function executeSubcommand(string $method, array $extraParams = array ( +)): void +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 211. + +*** + +### getCallId + +#### Signature + +```php +public function getCallId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 107. + +*** + +### getControlId + +#### Signature + +```php +public function getControlId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 102. + +*** + +### getDuration + +#### Signature + +```php +public function getDuration(): ?float +``` + +#### Returns + +`?float` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 308. + +*** + +### getEvents + +#### Signature + +```php +public function getEvents(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 97. + +*** + +### getNodeId + +#### Signature + +```php +public function getNodeId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 112. + +*** + +### getPayload + +#### Signature + +```php +public function getPayload(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 91. + +*** + +### getResult + +#### Signature + +```php +public function getResult() +``` + +#### Returns + +`mixed` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 81. + +*** + +### getSize + +#### Signature + +```php +public function getSize(): ?int +``` + +#### Returns + +`?int` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 314. + +*** + +### getState + +#### Signature + +```php +public function getState(): ?string +``` + +#### Returns + +`?string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 86. + +*** + +### getStopMethod + +#### Signature + +```php +public function getStopMethod(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 284. + +*** + +### getUrl + +#### Signature + +```php +public function getUrl(): ?string +``` + +#### Returns + +`?string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 303. + +*** + +### handleEvent + +Append an incoming event and update local state / payload. + +#### Signature + +```php +public function handleEvent(SignalWire\Relay\Event $event): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 144. + +*** + +### isDone + +#### Signature + +```php +public function isDone(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 75. + +*** + +### onCompleted + +Register a callback to fire when the action completes. + +If the action is already done the callback fires immediately. + +#### Signature + +```php +public function onCompleted(callable $cb): SignalWire\Relay\Action +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Relay\Action` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 126. + +*** + +### pause + +#### Signature + +```php +public function pause(array $extra = array ( +)): void +``` + +#### Parameters + + + Additional params to merge onto the wire (e.g. `['behavior' => 'continuous']`). + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 293. + +*** + +### resolve + +Mark this action as completed. + +The optional $result is stored and the onCompleted callback is +fired exactly once. + +#### Signature + +```php +public function resolve($result = NULL): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 167. + +*** + +### resume + +#### Signature + +```php +public function resume(): void +``` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 298. + +*** + +### stop + +Stop the running action by sending its stop sub-command. + +#### Signature + +```php +public function stop(): void +``` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 186. + +*** + +### wait + +Block until the action completes or $timeout seconds elapse. + +Each iteration calls $client->readOnce() so the event-loop +keeps processing inbound frames. + +Returns the resolving Event when the action completes (mirrors +Python's `return self._wait_event.wait()`). Returns null on +timeout. The numeric `$timeout` is interpreted as seconds and +accepts integers or floats. + +#### Signature + +```php +public function wait(int|float $timeout = 30): ?SignalWire\Relay\Event +``` + +#### Parameters + + + +#### Returns + +`?SignalWire\Relay\Event` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 58. + +## Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 282. diff --git a/fern/products/sdk-reference/php/signal-wire/relay/relay/relay-error/index.mdx b/fern/products/sdk-reference/php/signal-wire/relay/relay/relay-error/index.mdx new file mode 100644 index 0000000000..59a0a4401c --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/relay/relay/relay-error/index.mdx @@ -0,0 +1,43 @@ +--- +slug: "/reference/php/signal-wire/relay/relay/relay-error" +title: "RelayError" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Relay\\RelayError" + parent: "SignalWire\\Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/RelayError.php" +--- +# `RelayError` + +Exception type for RELAY-protocol-level failures. + +Mirrors signalwire.relay.client.RelayError in the Python SDK: raised +when a JSON-RPC response carries an `error` field, when a dial +resolves to a failure outcome, or when an SDK-side timeout fires. + +The numeric code field carries the JSON-RPC error code where +applicable (e.g. -32601 method-not-found from the server) or an +SDK-defined sentinel (e.g. 408 for client-side timeout). + +## Signature + +```php +class RelayError extends RuntimeException implements Stringable, Throwable +``` + +## Inheritance + +**Extends:** `RuntimeException` + +**Implements:** `Stringable`, `Throwable` + +## Source + +[`SignalWire/Relay/RelayError.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/RelayError.php) + +Line 18. diff --git a/fern/products/sdk-reference/php/signal-wire/relay/relay/stream-action/index.mdx b/fern/products/sdk-reference/php/signal-wire/relay/relay/stream-action/index.mdx new file mode 100644 index 0000000000..704bc69dae --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/relay/relay/stream-action/index.mdx @@ -0,0 +1,404 @@ +--- +slug: "/reference/php/signal-wire/relay/relay/stream-action" +title: "StreamAction" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Relay\\StreamAction" + parent: "SignalWire\\Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php" +--- +# `StreamAction` + +Handle for calling.stream operations. + +## Signature + +```php +class StreamAction extends Action +``` + +## Inheritance + +**Extends:** [SignalWire\Relay\Action](/docs/sdk-reference/reference/php/signal-wire/relay/relay/action) + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct( + string $controlId, + string $callId, + string $nodeId, + object $client +) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 33. + +*** + +### executeSubcommand + +Send a sub-command RPC through the client. + +The payload always includes control\_id, call\_id, and node\_id so +the server knows which action instance to target. + +#### Signature + +```php +public function executeSubcommand(string $method, array $extraParams = array ( +)): void +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 211. + +*** + +### getCallId + +#### Signature + +```php +public function getCallId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 107. + +*** + +### getControlId + +#### Signature + +```php +public function getControlId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 102. + +*** + +### getEvents + +#### Signature + +```php +public function getEvents(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 97. + +*** + +### getNodeId + +#### Signature + +```php +public function getNodeId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 112. + +*** + +### getPayload + +#### Signature + +```php +public function getPayload(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 91. + +*** + +### getResult + +#### Signature + +```php +public function getResult() +``` + +#### Returns + +`mixed` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 81. + +*** + +### getState + +#### Signature + +```php +public function getState(): ?string +``` + +#### Returns + +`?string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 86. + +*** + +### getStopMethod + +#### Signature + +```php +public function getStopMethod(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 445. + +*** + +### handleEvent + +Append an incoming event and update local state / payload. + +#### Signature + +```php +public function handleEvent(SignalWire\Relay\Event $event): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 144. + +*** + +### isDone + +#### Signature + +```php +public function isDone(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 75. + +*** + +### onCompleted + +Register a callback to fire when the action completes. + +If the action is already done the callback fires immediately. + +#### Signature + +```php +public function onCompleted(callable $cb): SignalWire\Relay\Action +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Relay\Action` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 126. + +*** + +### resolve + +Mark this action as completed. + +The optional $result is stored and the onCompleted callback is +fired exactly once. + +#### Signature + +```php +public function resolve($result = NULL): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 167. + +*** + +### stop + +Stop the running action by sending its stop sub-command. + +#### Signature + +```php +public function stop(): void +``` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 186. + +*** + +### wait + +Block until the action completes or $timeout seconds elapse. + +Each iteration calls $client->readOnce() so the event-loop +keeps processing inbound frames. + +Returns the resolving Event when the action completes (mirrors +Python's `return self._wait_event.wait()`). Returns null on +timeout. The numeric `$timeout` is interpreted as seconds and +accepts integers or floats. + +#### Signature + +```php +public function wait(int|float $timeout = 30): ?SignalWire\Relay\Event +``` + +#### Parameters + + + +#### Returns + +`?SignalWire\Relay\Event` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 58. + +## Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 443. diff --git a/fern/products/sdk-reference/php/signal-wire/relay/relay/tap-action/index.mdx b/fern/products/sdk-reference/php/signal-wire/relay/relay/tap-action/index.mdx new file mode 100644 index 0000000000..50ba40582b --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/relay/relay/tap-action/index.mdx @@ -0,0 +1,404 @@ +--- +slug: "/reference/php/signal-wire/relay/relay/tap-action" +title: "TapAction" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Relay\\TapAction" + parent: "SignalWire\\Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php" +--- +# `TapAction` + +Handle for calling.tap operations. + +## Signature + +```php +class TapAction extends Action +``` + +## Inheritance + +**Extends:** [SignalWire\Relay\Action](/docs/sdk-reference/reference/php/signal-wire/relay/relay/action) + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct( + string $controlId, + string $callId, + string $nodeId, + object $client +) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 33. + +*** + +### executeSubcommand + +Send a sub-command RPC through the client. + +The payload always includes control\_id, call\_id, and node\_id so +the server knows which action instance to target. + +#### Signature + +```php +public function executeSubcommand(string $method, array $extraParams = array ( +)): void +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 211. + +*** + +### getCallId + +#### Signature + +```php +public function getCallId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 107. + +*** + +### getControlId + +#### Signature + +```php +public function getControlId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 102. + +*** + +### getEvents + +#### Signature + +```php +public function getEvents(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 97. + +*** + +### getNodeId + +#### Signature + +```php +public function getNodeId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 112. + +*** + +### getPayload + +#### Signature + +```php +public function getPayload(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 91. + +*** + +### getResult + +#### Signature + +```php +public function getResult() +``` + +#### Returns + +`mixed` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 81. + +*** + +### getState + +#### Signature + +```php +public function getState(): ?string +``` + +#### Returns + +`?string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 86. + +*** + +### getStopMethod + +#### Signature + +```php +public function getStopMethod(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 434. + +*** + +### handleEvent + +Append an incoming event and update local state / payload. + +#### Signature + +```php +public function handleEvent(SignalWire\Relay\Event $event): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 144. + +*** + +### isDone + +#### Signature + +```php +public function isDone(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 75. + +*** + +### onCompleted + +Register a callback to fire when the action completes. + +If the action is already done the callback fires immediately. + +#### Signature + +```php +public function onCompleted(callable $cb): SignalWire\Relay\Action +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Relay\Action` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 126. + +*** + +### resolve + +Mark this action as completed. + +The optional $result is stored and the onCompleted callback is +fired exactly once. + +#### Signature + +```php +public function resolve($result = NULL): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 167. + +*** + +### stop + +Stop the running action by sending its stop sub-command. + +#### Signature + +```php +public function stop(): void +``` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 186. + +*** + +### wait + +Block until the action completes or $timeout seconds elapse. + +Each iteration calls $client->readOnce() so the event-loop +keeps processing inbound frames. + +Returns the resolving Event when the action completes (mirrors +Python's `return self._wait_event.wait()`). Returns null on +timeout. The numeric `$timeout` is interpreted as seconds and +accepts integers or floats. + +#### Signature + +```php +public function wait(int|float $timeout = 30): ?SignalWire\Relay\Event +``` + +#### Parameters + + + +#### Returns + +`?SignalWire\Relay\Event` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 58. + +## Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 432. diff --git a/fern/products/sdk-reference/php/signal-wire/relay/relay/transcribe-action/index.mdx b/fern/products/sdk-reference/php/signal-wire/relay/relay/transcribe-action/index.mdx new file mode 100644 index 0000000000..c7a38f4e51 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/relay/relay/transcribe-action/index.mdx @@ -0,0 +1,404 @@ +--- +slug: "/reference/php/signal-wire/relay/relay/transcribe-action" +title: "TranscribeAction" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Relay\\TranscribeAction" + parent: "SignalWire\\Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php" +--- +# `TranscribeAction` + +Handle for calling.transcribe operations. + +## Signature + +```php +class TranscribeAction extends Action +``` + +## Inheritance + +**Extends:** [SignalWire\Relay\Action](/docs/sdk-reference/reference/php/signal-wire/relay/relay/action) + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct( + string $controlId, + string $callId, + string $nodeId, + object $client +) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 33. + +*** + +### executeSubcommand + +Send a sub-command RPC through the client. + +The payload always includes control\_id, call\_id, and node\_id so +the server knows which action instance to target. + +#### Signature + +```php +public function executeSubcommand(string $method, array $extraParams = array ( +)): void +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 211. + +*** + +### getCallId + +#### Signature + +```php +public function getCallId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 107. + +*** + +### getControlId + +#### Signature + +```php +public function getControlId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 102. + +*** + +### getEvents + +#### Signature + +```php +public function getEvents(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 97. + +*** + +### getNodeId + +#### Signature + +```php +public function getNodeId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 112. + +*** + +### getPayload + +#### Signature + +```php +public function getPayload(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 91. + +*** + +### getResult + +#### Signature + +```php +public function getResult() +``` + +#### Returns + +`mixed` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 81. + +*** + +### getState + +#### Signature + +```php +public function getState(): ?string +``` + +#### Returns + +`?string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 86. + +*** + +### getStopMethod + +#### Signature + +```php +public function getStopMethod(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 467. + +*** + +### handleEvent + +Append an incoming event and update local state / payload. + +#### Signature + +```php +public function handleEvent(SignalWire\Relay\Event $event): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 144. + +*** + +### isDone + +#### Signature + +```php +public function isDone(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 75. + +*** + +### onCompleted + +Register a callback to fire when the action completes. + +If the action is already done the callback fires immediately. + +#### Signature + +```php +public function onCompleted(callable $cb): SignalWire\Relay\Action +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Relay\Action` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 126. + +*** + +### resolve + +Mark this action as completed. + +The optional $result is stored and the onCompleted callback is +fired exactly once. + +#### Signature + +```php +public function resolve($result = NULL): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 167. + +*** + +### stop + +Stop the running action by sending its stop sub-command. + +#### Signature + +```php +public function stop(): void +``` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 186. + +*** + +### wait + +Block until the action completes or $timeout seconds elapse. + +Each iteration calls $client->readOnce() so the event-loop +keeps processing inbound frames. + +Returns the resolving Event when the action completes (mirrors +Python's `return self._wait_event.wait()`). Returns null on +timeout. The numeric `$timeout` is interpreted as seconds and +accepts integers or floats. + +#### Signature + +```php +public function wait(int|float $timeout = 30): ?SignalWire\Relay\Event +``` + +#### Parameters + + + +#### Returns + +`?SignalWire\Relay\Event` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 58. + +## Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 465. diff --git a/fern/products/sdk-reference/php/signal-wire/relay/relay/web-socket/index.mdx b/fern/products/sdk-reference/php/signal-wire/relay/relay/web-socket/index.mdx new file mode 100644 index 0000000000..1739b9198f --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/relay/relay/web-socket/index.mdx @@ -0,0 +1,240 @@ +--- +slug: "/reference/php/signal-wire/relay/relay/web-socket" +title: "WebSocket" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Relay\\WebSocket" + parent: "SignalWire\\Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/WebSocket.php" +--- +# `WebSocket` + +RELAY WebSocket transport. + +This is a thin adapter over the maintained \{@link \WebSocket\Client\} +(phrity/websocket) library. It deliberately keeps the same small public +surface the rest of the SDK depends on — connect / sendText / receive / +close / isConnected, plus the \{@see self::CLOSE\_FRAME\} sentinel — so that +\{@see Client\} (and its test subclasses overriding createSocket()) need no +changes. The previous implementation hand-rolled RFC 6455 framing on raw +PHP streams; that responsibility now belongs to phrity/websocket. + +Why phrity/websocket: + +- It performs a _real_, verified TLS handshake for `wss://` URIs. A + private CA (e.g. the porting-sdk test CA) is trusted by passing its + `cafile` through the stream \{@see \Phrity\Net\Context\} — peer + verification stays ON (no allow\_self\_signed, no verify\_peer=false). +- It owns frame masking/decoding, the upgrade handshake, the + Sec-WebSocket-Accept check, ping/pong, and close framing. + +Transport contract preserved for \{@see Client\}: + +- `receive()` returns the decoded text payload of the next data frame, + \{@see self::CLOSE\_FRAME\} when the peer closed, or `null` on read + timeout (socket still healthy). Ping/pong are consumed internally. +- Outbound application messages are always text frames (JSON-RPC). + +## Signature + +```php +class WebSocket +``` + +## Constants + + + Special marker the read loop uses to surface a remote close. + + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(?string $caFile = NULL) +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/WebSocket.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/WebSocket.php) + +Line 58. + +*** + +### close + +Send a close frame and tear down the socket. Best-effort. + +#### Signature + +```php +public function close(int $code = 1000, string $reason = ''): void +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/Relay/WebSocket.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/WebSocket.php) + +Line 153. + +*** + +### connect + +Open a WebSocket connection to the given URI. + +#### Signature + +```php +public function connect( + string $uri, + array $headers = array ( +), + float $timeout = 10.0, + ?string $caFile = NULL +): void +``` + +#### Parameters + + + ws:// or wss:// URI. + + + + Additional handshake headers. + + + + TCP-connect / read timeout (seconds). + + + + Optional CA bundle (PEM) for wss:// peer verification; overrides the value passed to the constructor. + + +#### Throws + +- `\InvalidArgumentException` — on an invalid/unsupported URI. +- `\RuntimeException` — on connection or handshake failure. + +#### Source + +[`SignalWire/Relay/WebSocket.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/WebSocket.php) + +Line 75. + +*** + +### isConnected + +#### Signature + +```php +public function isConnected(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Relay/WebSocket.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/WebSocket.php) + +Line 233. + +*** + +### receive + +Read one complete inbound data frame, blocking up to $timeout seconds. + +Returns: + +- the decoded payload string for a text/binary frame +- \{@see self::CLOSE\_FRAME\} for a close (or peer EOF) +- null on read timeout (socket still healthy) + +Ping frames are answered with a pong and skipped; pong frames are +consumed; the next non-control frame (within the deadline) is returned. + +#### Signature + +```php +public function receive(float $timeout = 5.0): ?string +``` + +#### Parameters + + + +#### Returns + +`?string` + +#### Throws + +- `\RuntimeException` — on a fatal socket error. + +#### Source + +[`SignalWire/Relay/WebSocket.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/WebSocket.php) + +Line 185. + +*** + +### sendText + +Send a UTF-8 text frame (the only application frame type RELAY uses). + +#### Signature + +```php +public function sendText(string $payload): void +``` + +#### Parameters + + + +#### Throws + +- `\RuntimeException` — if the socket is closed or the write fails. + +#### Source + +[`SignalWire/Relay/WebSocket.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/WebSocket.php) + +Line 137. + +## Source + +[`SignalWire/Relay/WebSocket.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/WebSocket.php) + +Line 43. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/addresses/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/addresses/index.mdx new file mode 100644 index 0000000000..ee77d6dc63 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/addresses/index.mdx @@ -0,0 +1,175 @@ +--- +slug: "/reference/php/signal-wire/rest/namespaces/namespaces/addresses" +title: "Addresses" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\Addresses" + parent: "SignalWire\\REST\\Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Addresses.php" +--- +# `Addresses` + +Addresses namespace — list / create / get / delete (no update). + +## Signature + +```php +class Addresses +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http) +``` + +#### Parameters + + + +#### Source + +[`SignalWire/REST/Namespaces/Addresses.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Addresses.php) + +Line 17. + +*** + +### create + +#### Signature + +```php +public function create(array $body): array +``` + +#### Parameters + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Addresses.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Addresses.php) + +Line 34. + +*** + +### delete + +#### Signature + +```php +public function delete(string $addressId): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Addresses.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Addresses.php) + +Line 46. + +*** + +### get + +#### Signature + +```php +public function get(string $addressId): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Addresses.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Addresses.php) + +Line 40. + +*** + +### getBasePath + +#### Signature + +```php +public function getBasePath(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/Namespaces/Addresses.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Addresses.php) + +Line 22. + +*** + +### list + +#### Signature + +```php +public function list(array $params = array ( +)): array +``` + +#### Parameters + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Addresses.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Addresses.php) + +Line 28. + +## Source + +[`SignalWire/REST/Namespaces/Addresses.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Addresses.php) + +Line 12. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/calling/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/calling/index.mdx new file mode 100644 index 0000000000..83f57a39fc --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/calling/index.mdx @@ -0,0 +1,1303 @@ +--- +slug: "/reference/php/signal-wire/rest/namespaces/namespaces/calling" +title: "Calling" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\Calling" + parent: "SignalWire\\REST\\Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php" +--- +# `Calling` + +Calling API namespace. + +Provides 37 call-control command methods that each POST to +/api/calling/calls with a JSON body containing the command name, +an optional call ID, and parameters. + +## Signature + +```php +class Calling +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $client, string $projectId) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 23. + +*** + +### aiHold + +#### Signature + +```php +public function aiHold(string $callId, array $params = array ( +)): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 285. + +*** + +### aiMessage + +#### Signature + +```php +public function aiMessage(string $callId, array $params = array ( +)): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 279. + +*** + +### aiStop + +#### Signature + +```php +public function aiStop(string $callId, array $params = array ( +)): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 297. + +*** + +### aiUnhold + +#### Signature + +```php +public function aiUnhold(string $callId, array $params = array ( +)): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 291. + +*** + +### collect + +#### Signature + +```php +public function collect(string $callId, array $params = array ( +)): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 177. + +*** + +### collectStartInputTimers + +#### Signature + +```php +public function collectStartInputTimers( + string $callId, + array $params = array ( +) +): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 189. + +*** + +### collectStop + +#### Signature + +```php +public function collectStop(string $callId, array $params = array ( +)): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 183. + +*** + +### denoise + +#### Signature + +```php +public function denoise(string $callId, array $params = array ( +)): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 247. + +*** + +### denoiseStop + +#### Signature + +```php +public function denoiseStop(string $callId, array $params = array ( +)): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 253. + +*** + +### detect + +#### Signature + +```php +public function detect(string $callId, array $params = array ( +)): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 199. + +*** + +### detectStop + +#### Signature + +```php +public function detectStop(string $callId, array $params = array ( +)): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 205. + +*** + +### dial + +#### Signature + +```php +public function dial(array $params = array ( +)): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 75. + +*** + +### disconnect + +#### Signature + +```php +public function disconnect(string $callId, array $params = array ( +)): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 105. + +*** + +### end + +#### Signature + +```php +public function end(string $callId, array $params = array ( +)): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 93. + +*** + +### getBasePath + +#### Signature + +```php +public function getBasePath(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 39. + +*** + +### getClient + +#### Signature + +```php +public function getClient(): SignalWire\REST\HttpClient +``` + +#### Returns + +`SignalWire\REST\HttpClient` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 29. + +*** + +### getProjectId + +#### Signature + +```php +public function getProjectId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 34. + +*** + +### liveTranscribe + +#### Signature + +```php +public function liveTranscribe(string $callId, array $params = array ( +)): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 307. + +*** + +### liveTranslate + +#### Signature + +```php +public function liveTranslate(string $callId, array $params = array ( +)): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 313. + +*** + +### play + +#### Signature + +```php +public function play(string $callId, array $params = array ( +)): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 115. + +*** + +### playPause + +#### Signature + +```php +public function playPause(string $callId, array $params = array ( +)): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 121. + +*** + +### playResume + +#### Signature + +```php +public function playResume(string $callId, array $params = array ( +)): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 127. + +*** + +### playStop + +#### Signature + +```php +public function playStop(string $callId, array $params = array ( +)): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 133. + +*** + +### playVolume + +#### Signature + +```php +public function playVolume(string $callId, array $params = array ( +)): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 139. + +*** + +### receiveFaxStop + +#### Signature + +```php +public function receiveFaxStop(string $callId, array $params = array ( +)): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 329. + +*** + +### record + +#### Signature + +```php +public function record(string $callId, array $params = array ( +)): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 149. + +*** + +### recordPause + +#### Signature + +```php +public function recordPause(string $callId, array $params = array ( +)): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 155. + +*** + +### recordResume + +#### Signature + +```php +public function recordResume(string $callId, array $params = array ( +)): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 161. + +*** + +### recordStop + +#### Signature + +```php +public function recordStop(string $callId, array $params = array ( +)): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 167. + +*** + +### refer + +#### Signature + +```php +public function refer(string $callId, array $params = array ( +)): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 339. + +*** + +### sendFaxStop + +#### Signature + +```php +public function sendFaxStop(string $callId, array $params = array ( +)): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 323. + +*** + +### stream + +#### Signature + +```php +public function stream(string $callId, array $params = array ( +)): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 231. + +*** + +### streamStop + +#### Signature + +```php +public function streamStop(string $callId, array $params = array ( +)): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 237. + +*** + +### tap + +#### Signature + +```php +public function tap(string $callId, array $params = array ( +)): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 215. + +*** + +### tapStop + +#### Signature + +```php +public function tapStop(string $callId, array $params = array ( +)): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 221. + +*** + +### transcribe + +#### Signature + +```php +public function transcribe(string $callId, array $params = array ( +)): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 263. + +*** + +### transcribeStop + +#### Signature + +```php +public function transcribeStop(string $callId, array $params = array ( +)): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 269. + +*** + +### transfer + +#### Signature + +```php +public function transfer(string $callId, array $params = array ( +)): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 99. + +*** + +### update + +Send the bare `update` command (no call\_id at body root; `id` is + +passed inside `params`). Mirrors Python's +`CallingNamespace.update(**params)`. + +#### Signature + +```php +public function update(array $params = array ( +)): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 87. + +*** + +### userEvent + +#### Signature + +```php +public function userEvent(string $callId, array $params = array ( +)): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 349. + +## Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 16. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/compat-accounts/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/compat-accounts/index.mdx new file mode 100644 index 0000000000..fee9d6b3c7 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/compat-accounts/index.mdx @@ -0,0 +1,176 @@ +--- +slug: "/reference/php/signal-wire/rest/namespaces/namespaces/compat-accounts" +title: "CompatAccounts" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\CompatAccounts" + parent: "SignalWire\\REST\\Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatAccounts.php" +--- +# `CompatAccounts` + +Compat account / sub-project management. + +Mirrors Python `CompatAccounts`: the only resource that lives under +`/api/laml/2010-04-01/Accounts` (rather than `.../Accounts/{Sid}/...`). + +## Signature + +```php +class CompatAccounts +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http) +``` + +#### Parameters + + + +#### Source + +[`SignalWire/REST/Namespaces/CompatAccounts.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatAccounts.php) + +Line 20. + +*** + +### create + +#### Signature + +```php +public function create(array $body): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/CompatAccounts.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatAccounts.php) + +Line 43. + +*** + +### get + +#### Signature + +```php +public function get(string $sid): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/CompatAccounts.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatAccounts.php) + +Line 49. + +*** + +### getBasePath + +#### Signature + +```php +public function getBasePath(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/Namespaces/CompatAccounts.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatAccounts.php) + +Line 25. + +*** + +### list + +#### Signature + +```php +public function list(array $params = array ( +)): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/CompatAccounts.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatAccounts.php) + +Line 34. + +*** + +### update + +#### Signature + +```php +public function update(string $sid, array $body): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/CompatAccounts.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatAccounts.php) + +Line 58. + +## Source + +[`SignalWire/REST/Namespaces/CompatAccounts.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatAccounts.php) + +Line 15. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/compat-conferences/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/compat-conferences/index.mdx new file mode 100644 index 0000000000..26f94abab0 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/compat-conferences/index.mdx @@ -0,0 +1,460 @@ +--- +slug: "/reference/php/signal-wire/rest/namespaces/namespaces/compat-conferences" +title: "CompatConferences" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\CompatConferences" + parent: "SignalWire\\REST\\Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatConferences.php" +--- +# `CompatConferences` + +Compat conference management with participants, recordings, and streams. + +## Signature + +```php +class CompatConferences +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http, string $basePath) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/REST/Namespaces/CompatConferences.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatConferences.php) + +Line 17. + +*** + +### deleteRecording + +#### Signature + +```php +public function deleteRecording(string $conferenceSid, string $recordingSid): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/CompatConferences.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatConferences.php) + +Line 115. + +*** + +### get + +#### Signature + +```php +public function get(string $sid): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/CompatConferences.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatConferences.php) + +Line 35. + +*** + +### getBasePath + +#### Signature + +```php +public function getBasePath(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/Namespaces/CompatConferences.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatConferences.php) + +Line 23. + +*** + +### getParticipant + +#### Signature + +```php +public function getParticipant(string $conferenceSid, string $callSid): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/CompatConferences.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatConferences.php) + +Line 60. + +*** + +### getRecording + +#### Signature + +```php +public function getRecording(string $conferenceSid, string $recordingSid): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/CompatConferences.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatConferences.php) + +Line 98. + +*** + +### list + +#### Signature + +```php +public function list(array $params = array ( +)): array +``` + +#### Parameters + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/CompatConferences.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatConferences.php) + +Line 29. + +*** + +### listParticipants + +#### Signature + +```php +public function listParticipants( + string $conferenceSid, + array $params = array ( +) +): array +``` + +#### Parameters + + + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/CompatConferences.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatConferences.php) + +Line 51. + +*** + +### listRecordings + +#### Signature + +```php +public function listRecordings(string $conferenceSid, array $params = array ( +)): array +``` + +#### Parameters + + + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/CompatConferences.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatConferences.php) + +Line 89. + +*** + +### removeParticipant + +#### Signature + +```php +public function removeParticipant(string $conferenceSid, string $callSid): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/CompatConferences.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatConferences.php) + +Line 77. + +*** + +### startStream + +#### Signature + +```php +public function startStream(string $conferenceSid, array $body): array +``` + +#### Parameters + + + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/CompatConferences.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatConferences.php) + +Line 127. + +*** + +### stopStream + +#### Signature + +```php +public function stopStream( + string $conferenceSid, + string $streamSid, + array $body +): array +``` + +#### Parameters + + + + + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/CompatConferences.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatConferences.php) + +Line 136. + +*** + +### update + +#### Signature + +```php +public function update(string $sid, array $body): array +``` + +#### Parameters + + + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/CompatConferences.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatConferences.php) + +Line 41. + +*** + +### updateParticipant + +#### Signature + +```php +public function updateParticipant( + string $conferenceSid, + string $callSid, + array $body +): array +``` + +#### Parameters + + + + + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/CompatConferences.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatConferences.php) + +Line 68. + +*** + +### updateRecording + +#### Signature + +```php +public function updateRecording( + string $conferenceSid, + string $recordingSid, + array $body +): array +``` + +#### Parameters + + + + + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/CompatConferences.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatConferences.php) + +Line 106. + +## Source + +[`SignalWire/REST/Namespaces/CompatConferences.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatConferences.php) + +Line 12. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/compat-phone-numbers/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/compat-phone-numbers/index.mdx new file mode 100644 index 0000000000..d214026c7a --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/compat-phone-numbers/index.mdx @@ -0,0 +1,376 @@ +--- +slug: "/reference/php/signal-wire/rest/namespaces/namespaces/compat-phone-numbers" +title: "CompatPhoneNumbers" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\CompatPhoneNumbers" + parent: "SignalWire\\REST\\Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatPhoneNumbers.php" +--- +# `CompatPhoneNumbers` + +Compat IncomingPhoneNumbers + AvailablePhoneNumbers + ImportedPhoneNumbers + +management. + +The base path is the IncomingPhoneNumbers collection; the available / +imported variants live at sibling paths derived from the base. + +## Signature + +```php +class CompatPhoneNumbers +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http, string $basePath) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/REST/Namespaces/CompatPhoneNumbers.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatPhoneNumbers.php) + +Line 23. + +*** + +### delete + +#### Signature + +```php +public function delete(string $sid): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/CompatPhoneNumbers.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatPhoneNumbers.php) + +Line 73. + +*** + +### get + +#### Signature + +```php +public function get(string $sid): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/CompatPhoneNumbers.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatPhoneNumbers.php) + +Line 61. + +*** + +### getAvailableBase + +#### Signature + +```php +public function getAvailableBase(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/Namespaces/CompatPhoneNumbers.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatPhoneNumbers.php) + +Line 44. + +*** + +### getBasePath + +#### Signature + +```php +public function getBasePath(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/Namespaces/CompatPhoneNumbers.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatPhoneNumbers.php) + +Line 39. + +*** + +### getImportedBase + +#### Signature + +```php +public function getImportedBase(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/Namespaces/CompatPhoneNumbers.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatPhoneNumbers.php) + +Line 49. + +*** + +### importNumber + +#### Signature + +```php +public function importNumber(array $body): array +``` + +#### Parameters + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/CompatPhoneNumbers.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatPhoneNumbers.php) + +Line 85. + +*** + +### list + +#### Signature + +```php +public function list(array $params = array ( +)): array +``` + +#### Parameters + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/CompatPhoneNumbers.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatPhoneNumbers.php) + +Line 55. + +*** + +### listAvailableCountries + +#### Signature + +```php +public function listAvailableCountries(array $params = array ( +)): array +``` + +#### Parameters + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/CompatPhoneNumbers.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatPhoneNumbers.php) + +Line 91. + +*** + +### purchase + +#### Signature + +```php +public function purchase(array $body): array +``` + +#### Parameters + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/CompatPhoneNumbers.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatPhoneNumbers.php) + +Line 79. + +*** + +### searchLocal + +#### Signature + +```php +public function searchLocal(string $country, array $params = array ( +)): array +``` + +#### Parameters + + + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/CompatPhoneNumbers.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatPhoneNumbers.php) + +Line 97. + +*** + +### searchTollFree + +#### Signature + +```php +public function searchTollFree(string $country, array $params = array ( +)): array +``` + +#### Parameters + + + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/CompatPhoneNumbers.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatPhoneNumbers.php) + +Line 103. + +*** + +### update + +#### Signature + +```php +public function update(string $sid, array $body): array +``` + +#### Parameters + + + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/CompatPhoneNumbers.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatPhoneNumbers.php) + +Line 67. + +## Source + +[`SignalWire/REST/Namespaces/CompatPhoneNumbers.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatPhoneNumbers.php) + +Line 16. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/compat-recordings/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/compat-recordings/index.mdx new file mode 100644 index 0000000000..f771caf887 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/compat-recordings/index.mdx @@ -0,0 +1,154 @@ +--- +slug: "/reference/php/signal-wire/rest/namespaces/namespaces/compat-recordings" +title: "CompatRecordings" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\CompatRecordings" + parent: "SignalWire\\REST\\Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatRecordings.php" +--- +# `CompatRecordings` + +Compat recording management. + +Account-scoped recordings — distinct from per-call recordings on +`CompatCalls`. Surface is list / get / delete only. + +## Signature + +```php +class CompatRecordings +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http, string $basePath) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/REST/Namespaces/CompatRecordings.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatRecordings.php) + +Line 20. + +*** + +### delete + +#### Signature + +```php +public function delete(string $sid): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/CompatRecordings.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatRecordings.php) + +Line 44. + +*** + +### get + +#### Signature + +```php +public function get(string $sid): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/CompatRecordings.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatRecordings.php) + +Line 38. + +*** + +### getBasePath + +#### Signature + +```php +public function getBasePath(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/Namespaces/CompatRecordings.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatRecordings.php) + +Line 26. + +*** + +### list + +#### Signature + +```php +public function list(array $params = array ( +)): array +``` + +#### Parameters + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/CompatRecordings.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatRecordings.php) + +Line 32. + +## Source + +[`SignalWire/REST/Namespaces/CompatRecordings.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatRecordings.php) + +Line 15. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/compat-tokens/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/compat-tokens/index.mdx new file mode 100644 index 0000000000..f70e47c989 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/compat-tokens/index.mdx @@ -0,0 +1,151 @@ +--- +slug: "/reference/php/signal-wire/rest/namespaces/namespaces/compat-tokens" +title: "CompatTokens" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\CompatTokens" + parent: "SignalWire\\REST\\Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatTokens.php" +--- +# `CompatTokens` + +Compat API token management. + +Surface is create / update (PATCH) / delete only. + +## Signature + +```php +class CompatTokens +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http, string $basePath) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/REST/Namespaces/CompatTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatTokens.php) + +Line 19. + +*** + +### create + +#### Signature + +```php +public function create(array $body): array +``` + +#### Parameters + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/CompatTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatTokens.php) + +Line 31. + +*** + +### delete + +#### Signature + +```php +public function delete(string $tokenId): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/CompatTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatTokens.php) + +Line 43. + +*** + +### getBasePath + +#### Signature + +```php +public function getBasePath(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/Namespaces/CompatTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatTokens.php) + +Line 25. + +*** + +### update + +#### Signature + +```php +public function update(string $tokenId, array $body): array +``` + +#### Parameters + + + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/CompatTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatTokens.php) + +Line 37. + +## Source + +[`SignalWire/REST/Namespaces/CompatTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatTokens.php) + +Line 14. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/compat-transcriptions/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/compat-transcriptions/index.mdx new file mode 100644 index 0000000000..81caa784b2 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/compat-transcriptions/index.mdx @@ -0,0 +1,153 @@ +--- +slug: "/reference/php/signal-wire/rest/namespaces/namespaces/compat-transcriptions" +title: "CompatTranscriptions" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\CompatTranscriptions" + parent: "SignalWire\\REST\\Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatTranscriptions.php" +--- +# `CompatTranscriptions` + +Compat transcription management. + +Account-scoped transcriptions. Surface is list / get / delete only. + +## Signature + +```php +class CompatTranscriptions +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http, string $basePath) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/REST/Namespaces/CompatTranscriptions.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatTranscriptions.php) + +Line 19. + +*** + +### delete + +#### Signature + +```php +public function delete(string $sid): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/CompatTranscriptions.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatTranscriptions.php) + +Line 43. + +*** + +### get + +#### Signature + +```php +public function get(string $sid): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/CompatTranscriptions.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatTranscriptions.php) + +Line 37. + +*** + +### getBasePath + +#### Signature + +```php +public function getBasePath(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/Namespaces/CompatTranscriptions.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatTranscriptions.php) + +Line 25. + +*** + +### list + +#### Signature + +```php +public function list(array $params = array ( +)): array +``` + +#### Parameters + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/CompatTranscriptions.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatTranscriptions.php) + +Line 31. + +## Source + +[`SignalWire/REST/Namespaces/CompatTranscriptions.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatTranscriptions.php) + +Line 14. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/compat/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/compat/index.mdx new file mode 100644 index 0000000000..ea8ebac94c --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/compat/index.mdx @@ -0,0 +1,357 @@ +--- +slug: "/reference/php/signal-wire/rest/namespaces/namespaces/compat" +title: "Compat" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\Compat" + parent: "SignalWire\\REST\\Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Compat.php" +--- +# `Compat` + +Compatibility (Twilio-compatible LAML) API namespace. + +Mounted under `/api/laml/2010-04-01/Accounts/{AccountSid}` and exposes +the LAML-flavoured REST surface (Accounts, Calls, Messages, Faxes, +Conferences, IncomingPhoneNumbers + AvailablePhoneNumbers, Applications, +LamlBins, Queues, Recordings, Transcriptions, tokens) as object-style +sub-resources to mirror the Python `CompatNamespace` class. + +## Signature + +```php +class Compat +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http, string $accountSid) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/REST/Namespaces/Compat.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Compat.php) + +Line 38. + +*** + +### accounts + +#### Signature + +```php +public function accounts(): SignalWire\REST\Namespaces\CompatAccounts +``` + +#### Returns + +`SignalWire\REST\Namespaces\CompatAccounts` + +#### Source + +[`SignalWire/REST/Namespaces/Compat.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Compat.php) + +Line 73. + +*** + +### applications + +#### Signature + +```php +public function applications(): SignalWire\REST\Namespaces\CompatApplications +``` + +#### Returns + +`SignalWire\REST\Namespaces\CompatApplications` + +#### Source + +[`SignalWire/REST/Namespaces/Compat.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Compat.php) + +Line 103. + +*** + +### calls + +#### Signature + +```php +public function calls(): SignalWire\REST\Namespaces\CompatCalls +``` + +#### Returns + +`SignalWire\REST\Namespaces\CompatCalls` + +#### Source + +[`SignalWire/REST/Namespaces/Compat.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Compat.php) + +Line 78. + +*** + +### conferences + +#### Signature + +```php +public function conferences(): SignalWire\REST\Namespaces\CompatConferences +``` + +#### Returns + +`SignalWire\REST\Namespaces\CompatConferences` + +#### Source + +[`SignalWire/REST/Namespaces/Compat.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Compat.php) + +Line 93. + +*** + +### faxes + +#### Signature + +```php +public function faxes(): SignalWire\REST\Namespaces\CompatFaxes +``` + +#### Returns + +`SignalWire\REST\Namespaces\CompatFaxes` + +#### Source + +[`SignalWire/REST/Namespaces/Compat.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Compat.php) + +Line 88. + +*** + +### getAccountBase + +#### Signature + +```php +public function getAccountBase(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/Namespaces/Compat.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Compat.php) + +Line 63. + +*** + +### getAccountSid + +#### Signature + +```php +public function getAccountSid(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/Namespaces/Compat.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Compat.php) + +Line 58. + +*** + +### getHttp + +#### Signature + +```php +public function getHttp(): SignalWire\REST\HttpClient +``` + +#### Returns + +`SignalWire\REST\HttpClient` + +#### Source + +[`SignalWire/REST/Namespaces/Compat.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Compat.php) + +Line 68. + +*** + +### lamlBins + +#### Signature + +```php +public function lamlBins(): SignalWire\REST\Namespaces\CompatLamlBins +``` + +#### Returns + +`SignalWire\REST\Namespaces\CompatLamlBins` + +#### Source + +[`SignalWire/REST/Namespaces/Compat.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Compat.php) + +Line 108. + +*** + +### messages + +#### Signature + +```php +public function messages(): SignalWire\REST\Namespaces\CompatMessages +``` + +#### Returns + +`SignalWire\REST\Namespaces\CompatMessages` + +#### Source + +[`SignalWire/REST/Namespaces/Compat.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Compat.php) + +Line 83. + +*** + +### phoneNumbers + +#### Signature + +```php +public function phoneNumbers(): SignalWire\REST\Namespaces\CompatPhoneNumbers +``` + +#### Returns + +`SignalWire\REST\Namespaces\CompatPhoneNumbers` + +#### Source + +[`SignalWire/REST/Namespaces/Compat.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Compat.php) + +Line 98. + +*** + +### queues + +#### Signature + +```php +public function queues(): SignalWire\REST\Namespaces\CompatQueues +``` + +#### Returns + +`SignalWire\REST\Namespaces\CompatQueues` + +#### Source + +[`SignalWire/REST/Namespaces/Compat.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Compat.php) + +Line 113. + +*** + +### recordings + +#### Signature + +```php +public function recordings(): SignalWire\REST\Namespaces\CompatRecordings +``` + +#### Returns + +`SignalWire\REST\Namespaces\CompatRecordings` + +#### Source + +[`SignalWire/REST/Namespaces/Compat.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Compat.php) + +Line 118. + +*** + +### tokens + +#### Signature + +```php +public function tokens(): SignalWire\REST\Namespaces\CompatTokens +``` + +#### Returns + +`SignalWire\REST\Namespaces\CompatTokens` + +#### Source + +[`SignalWire/REST/Namespaces/Compat.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Compat.php) + +Line 128. + +*** + +### transcriptions + +#### Signature + +```php +public function transcriptions(): SignalWire\REST\Namespaces\CompatTranscriptions +``` + +#### Returns + +`SignalWire\REST\Namespaces\CompatTranscriptions` + +#### Source + +[`SignalWire/REST/Namespaces/Compat.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Compat.php) + +Line 123. + +## Source + +[`SignalWire/REST/Namespaces/Compat.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Compat.php) + +Line 19. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/conference-logs/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/conference-logs/index.mdx new file mode 100644 index 0000000000..16befa93de --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/conference-logs/index.mdx @@ -0,0 +1,103 @@ +--- +slug: "/reference/php/signal-wire/rest/namespaces/namespaces/conference-logs" +title: "ConferenceLogs" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\ConferenceLogs" + parent: "SignalWire\\REST\\Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ConferenceLogs.php" +--- +# `ConferenceLogs` + +Conference log queries — list-only resource. + +## Signature + +```php +class ConferenceLogs +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http, string $basePath) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/REST/Namespaces/ConferenceLogs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ConferenceLogs.php) + +Line 17. + +*** + +### getBasePath + +#### Signature + +```php +public function getBasePath(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/Namespaces/ConferenceLogs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ConferenceLogs.php) + +Line 23. + +*** + +### list + +#### Signature + +```php +public function list(array $params = array ( +)): array +``` + +#### Parameters + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/ConferenceLogs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ConferenceLogs.php) + +Line 29. + +## Source + +[`SignalWire/REST/Namespaces/ConferenceLogs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ConferenceLogs.php) + +Line 12. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/datasphere/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/datasphere/index.mdx new file mode 100644 index 0000000000..8036964fbd --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/datasphere/index.mdx @@ -0,0 +1,89 @@ +--- +slug: "/reference/php/signal-wire/rest/namespaces/namespaces/datasphere" +title: "Datasphere" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\Datasphere" + parent: "SignalWire\\REST\\Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Datasphere.php" +--- +# `Datasphere` + +Datasphere API namespace — exposes the documents sub-resource. + +## Signature + +```php +class Datasphere +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http) +``` + +#### Parameters + + + +#### Source + +[`SignalWire/REST/Namespaces/Datasphere.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Datasphere.php) + +Line 17. + +*** + +### documents + +#### Signature + +```php +public function documents(): SignalWire\REST\Namespaces\DatasphereDocuments +``` + +#### Returns + +`SignalWire\REST\Namespaces\DatasphereDocuments` + +#### Source + +[`SignalWire/REST/Namespaces/Datasphere.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Datasphere.php) + +Line 23. + +*** + +### getHttp + +#### Signature + +```php +public function getHttp(): SignalWire\REST\HttpClient +``` + +#### Returns + +`SignalWire\REST\HttpClient` + +#### Source + +[`SignalWire/REST/Namespaces/Datasphere.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Datasphere.php) + +Line 28. + +## Source + +[`SignalWire/REST/Namespaces/Datasphere.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Datasphere.php) + +Line 12. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/fabric-addresses/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/fabric-addresses/index.mdx new file mode 100644 index 0000000000..3c870f4454 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/fabric-addresses/index.mdx @@ -0,0 +1,127 @@ +--- +slug: "/reference/php/signal-wire/rest/namespaces/namespaces/fabric-addresses" +title: "FabricAddresses" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\FabricAddresses" + parent: "SignalWire\\REST\\Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricAddresses.php" +--- +# `FabricAddresses` + +Read-only fabric addresses (`/api/fabric/addresses`). + +## Signature + +```php +class FabricAddresses +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http, string $basePath) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/REST/Namespaces/FabricAddresses.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricAddresses.php) + +Line 17. + +*** + +### get + +#### Signature + +```php +public function get(string $addressId): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/FabricAddresses.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricAddresses.php) + +Line 35. + +*** + +### getBasePath + +#### Signature + +```php +public function getBasePath(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/Namespaces/FabricAddresses.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricAddresses.php) + +Line 23. + +*** + +### list + +#### Signature + +```php +public function list(array $params = array ( +)): array +``` + +#### Parameters + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/FabricAddresses.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricAddresses.php) + +Line 29. + +## Source + +[`SignalWire/REST/Namespaces/FabricAddresses.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricAddresses.php) + +Line 12. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/fabric-generic-resources/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/fabric-generic-resources/index.mdx new file mode 100644 index 0000000000..facc8270d4 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/fabric-generic-resources/index.mdx @@ -0,0 +1,217 @@ +--- +slug: "/reference/php/signal-wire/rest/namespaces/namespaces/fabric-generic-resources" +title: "FabricGenericResources" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\FabricGenericResources" + parent: "SignalWire\\REST\\Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricGenericResources.php" +--- +# `FabricGenericResources` + +Generic operations across all fabric resource types + +(`/api/fabric/resources`). + +Mirrors Python `signalwire.rest.namespaces.fabric.GenericResources`. + +## Signature + +```php +class FabricGenericResources +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http, string $basePath) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/REST/Namespaces/FabricGenericResources.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricGenericResources.php) + +Line 20. + +*** + +### assignDomainApplication + +Bind a domain application to a fabric resource. + +#### Signature + +```php +public function assignDomainApplication(string $resourceId, array $body): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/FabricGenericResources.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricGenericResources.php) + +Line 64. + +*** + +### delete + +#### Signature + +```php +public function delete(string $resourceId): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/FabricGenericResources.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricGenericResources.php) + +Line 44. + +*** + +### get + +#### Signature + +```php +public function get(string $resourceId): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/FabricGenericResources.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricGenericResources.php) + +Line 38. + +*** + +### getBasePath + +#### Signature + +```php +public function getBasePath(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/Namespaces/FabricGenericResources.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricGenericResources.php) + +Line 26. + +*** + +### list + +#### Signature + +```php +public function list(array $params = array ( +)): array +``` + +#### Parameters + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/FabricGenericResources.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricGenericResources.php) + +Line 32. + +*** + +### listAddresses + +#### Signature + +```php +public function listAddresses(string $resourceId, array $params = array ( +)): array +``` + +#### Parameters + + + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/FabricGenericResources.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricGenericResources.php) + +Line 50. + +## Source + +[`SignalWire/REST/Namespaces/FabricGenericResources.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricGenericResources.php) + +Line 15. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/fabric-tokens/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/fabric-tokens/index.mdx new file mode 100644 index 0000000000..8ebde3ba25 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/fabric-tokens/index.mdx @@ -0,0 +1,210 @@ +--- +slug: "/reference/php/signal-wire/rest/namespaces/namespaces/fabric-tokens" +title: "FabricTokens" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\FabricTokens" + parent: "SignalWire\\REST\\Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricTokens.php" +--- +# `FabricTokens` + +Subscriber, guest, invite, and embed token creation under + +`/api/fabric/...`. + +Note: token endpoints sit under different sub-paths inside the Fabric +mount point (`subscribers/tokens`, `subscriber/invites`, `guests`, +`embeds`) — singular vs plural is API-specific so each helper has the +exact path the API expects. + +## Signature + +```php +class FabricTokens +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http, string $basePath) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/REST/Namespaces/FabricTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricTokens.php) + +Line 23. + +*** + +### createEmbedToken + +#### Signature + +```php +public function createEmbedToken(array $body): array +``` + +#### Parameters + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/FabricTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricTokens.php) + +Line 65. + +*** + +### createGuestToken + +#### Signature + +```php +public function createGuestToken(array $body): array +``` + +#### Parameters + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/FabricTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricTokens.php) + +Line 59. + +*** + +### createInviteToken + +Note the singular `subscriber` here — the invite endpoint uses + +`/api/fabric/subscriber/invites`, not `subscribers`. + +#### Signature + +```php +public function createInviteToken(array $body): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/FabricTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricTokens.php) + +Line 53. + +*** + +### createSubscriberToken + +#### Signature + +```php +public function createSubscriberToken(array $body): array +``` + +#### Parameters + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/FabricTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricTokens.php) + +Line 35. + +*** + +### getBasePath + +#### Signature + +```php +public function getBasePath(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/Namespaces/FabricTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricTokens.php) + +Line 29. + +*** + +### refreshSubscriberToken + +#### Signature + +```php +public function refreshSubscriberToken(array $body): array +``` + +#### Parameters + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/FabricTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricTokens.php) + +Line 41. + +## Source + +[`SignalWire/REST/Namespaces/FabricTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricTokens.php) + +Line 18. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/fabric/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/fabric/index.mdx new file mode 100644 index 0000000000..c0750e9870 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/fabric/index.mdx @@ -0,0 +1,535 @@ +--- +slug: "/reference/php/signal-wire/rest/namespaces/namespaces/fabric" +title: "Fabric" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\Fabric" + parent: "SignalWire\\REST\\Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php" +--- +# `Fabric` + +Fabric API namespace. + +Mirrors Python `signalwire.rest.namespaces.fabric.FabricNamespace`: +groups all Fabric sub-resources (subscribers, SIP endpoints, call flows, +SWML scripts, conference rooms, AI agents, etc.) under a single object. + +Sub-resources fall into a few buckets: + +- PUT-update CRUD: `swml_scripts`, `relay_applications`, + `call_flows`, `conference_rooms`, `freeswitch_connectors`, + `subscribers`, `sip_endpoints`, `cxml_scripts`, + `cxml_applications`. +- PATCH-update CRUD: `swml_webhooks`, `ai_agents`, `sip_gateways`, + `cxml_webhooks`. +- Special: `resources` (generic `/api/fabric/resources`), + `addresses` (read-only `/api/fabric/addresses`), `tokens` + (subscriber/guest/embed token creation). + +## Signature + +```php +class Fabric +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $client) +``` + +#### Parameters + + + +#### Source + +[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) + +Line 65. + +*** + +### addresses + +Read-only fabric addresses (`/api/fabric/addresses`). + +#### Signature + +```php +public function addresses(): SignalWire\REST\Namespaces\FabricAddresses +``` + +#### Returns + +`SignalWire\REST\Namespaces\FabricAddresses` + +#### Source + +[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) + +Line 250. + +*** + +### aiAgents + +#### Signature + +```php +public function aiAgents(): SignalWire\REST\CrudResource +``` + +#### Returns + +`SignalWire\REST\CrudResource` + +#### Source + +[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) + +Line 159. + +*** + +### callFlows + +#### Signature + +```php +public function callFlows(): SignalWire\REST\Namespaces\FabricCallFlows +``` + +#### Returns + +`SignalWire\REST\Namespaces\FabricCallFlows` + +#### Source + +[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) + +Line 95. + +*** + +### callQueues + +#### Signature + +```php +public function callQueues(): SignalWire\REST\CrudResource +``` + +#### Returns + +`SignalWire\REST\CrudResource` + +#### Source + +[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) + +Line 209. + +*** + +### conferenceRooms + +#### Signature + +```php +public function conferenceRooms(): SignalWire\REST\Namespaces\FabricConferenceRooms +``` + +#### Returns + +`SignalWire\REST\Namespaces\FabricConferenceRooms` + +#### Source + +[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) + +Line 119. + +*** + +### conversations + +#### Signature + +```php +public function conversations(): SignalWire\REST\CrudResource +``` + +#### Returns + +`SignalWire\REST\CrudResource` + +#### Source + +[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) + +Line 185. + +*** + +### cxmlApplications + +#### Signature + +```php +public function cxmlApplications(): SignalWire\REST\Namespaces\FabricCxmlApplications +``` + +#### Returns + +`SignalWire\REST\Namespaces\FabricCxmlApplications` + +#### Source + +[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) + +Line 143. + +*** + +### cxmlScripts + +#### Signature + +```php +public function cxmlScripts(): SignalWire\REST\CrudResource +``` + +#### Returns + +`SignalWire\REST\CrudResource` + +#### Source + +[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) + +Line 135. + +*** + +### cxmlWebhooks + +#### Signature + +```php +public function cxmlWebhooks(): SignalWire\REST\CrudResource +``` + +#### Returns + +`SignalWire\REST\CrudResource` + +#### Source + +[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) + +Line 175. + +*** + +### dialPlans + +#### Signature + +```php +public function dialPlans(): SignalWire\REST\CrudResource +``` + +#### Returns + +`SignalWire\REST\CrudResource` + +#### Source + +[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) + +Line 193. + +*** + +### freeclimbApps + +#### Signature + +```php +public function freeclimbApps(): SignalWire\REST\CrudResource +``` + +#### Returns + +`SignalWire\REST\CrudResource` + +#### Source + +[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) + +Line 201. + +*** + +### freeswitchConnectors + +#### Signature + +```php +public function freeswitchConnectors(): SignalWire\REST\CrudResource +``` + +#### Returns + +`SignalWire\REST\CrudResource` + +#### Source + +[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) + +Line 127. + +*** + +### getClient + +#### Signature + +```php +public function getClient(): SignalWire\REST\HttpClient +``` + +#### Returns + +`SignalWire\REST\HttpClient` + +#### Source + +[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) + +Line 70. + +*** + +### phoneNumbers + +#### Signature + +```php +public function phoneNumbers(): SignalWire\REST\CrudResource +``` + +#### Returns + +`SignalWire\REST\CrudResource` + +#### Source + +[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) + +Line 225. + +*** + +### relayApplications + +#### Signature + +```php +public function relayApplications(): SignalWire\REST\CrudResource +``` + +#### Returns + +`SignalWire\REST\CrudResource` + +#### Source + +[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) + +Line 111. + +*** + +### resources + +Generic operations across all fabric resource types + +(`/api/fabric/resources`). + +#### Signature + +```php +public function resources(): SignalWire\REST\Namespaces\FabricGenericResources +``` + +#### Returns + +`SignalWire\REST\Namespaces\FabricGenericResources` + +#### Source + +[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) + +Line 239. + +*** + +### sipEndpoints + +#### Signature + +```php +public function sipEndpoints(): SignalWire\REST\CrudResource +``` + +#### Returns + +`SignalWire\REST\CrudResource` + +#### Source + +[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) + +Line 87. + +*** + +### sipGateways + +#### Signature + +```php +public function sipGateways(): SignalWire\REST\CrudResource +``` + +#### Returns + +`SignalWire\REST\CrudResource` + +#### Source + +[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) + +Line 167. + +*** + +### sipProfiles + +#### Signature + +```php +public function sipProfiles(): SignalWire\REST\CrudResource +``` + +#### Returns + +`SignalWire\REST\CrudResource` + +#### Source + +[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) + +Line 217. + +*** + +### subscribers + +#### Signature + +```php +public function subscribers(): SignalWire\REST\Namespaces\FabricSubscribers +``` + +#### Returns + +`SignalWire\REST\Namespaces\FabricSubscribers` + +#### Source + +[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) + +Line 79. + +*** + +### swmlScripts + +#### Signature + +```php +public function swmlScripts(): SignalWire\REST\CrudResource +``` + +#### Returns + +`SignalWire\REST\CrudResource` + +#### Source + +[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) + +Line 103. + +*** + +### swmlWebhooks + +#### Signature + +```php +public function swmlWebhooks(): SignalWire\REST\CrudResource +``` + +#### Returns + +`SignalWire\REST\CrudResource` + +#### Source + +[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) + +Line 151. + +*** + +### tokens + +Subscriber / guest / invite / embed token creation + +(`/api/fabric/...`). + +#### Signature + +```php +public function tokens(): SignalWire\REST\Namespaces\FabricTokens +``` + +#### Returns + +`SignalWire\REST\Namespaces\FabricTokens` + +#### Source + +[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) + +Line 262. + +## Source + +[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) + +Line 28. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/fax-logs/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/fax-logs/index.mdx new file mode 100644 index 0000000000..45ad8d9b86 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/fax-logs/index.mdx @@ -0,0 +1,127 @@ +--- +slug: "/reference/php/signal-wire/rest/namespaces/namespaces/fax-logs" +title: "FaxLogs" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\FaxLogs" + parent: "SignalWire\\REST\\Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FaxLogs.php" +--- +# `FaxLogs` + +Fax log queries — list + get by id. + +## Signature + +```php +class FaxLogs +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http, string $basePath) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/REST/Namespaces/FaxLogs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FaxLogs.php) + +Line 17. + +*** + +### get + +#### Signature + +```php +public function get(string $logId): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/FaxLogs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FaxLogs.php) + +Line 35. + +*** + +### getBasePath + +#### Signature + +```php +public function getBasePath(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/Namespaces/FaxLogs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FaxLogs.php) + +Line 23. + +*** + +### list + +#### Signature + +```php +public function list(array $params = array ( +)): array +``` + +#### Parameters + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/FaxLogs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FaxLogs.php) + +Line 29. + +## Source + +[`SignalWire/REST/Namespaces/FaxLogs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FaxLogs.php) + +Line 12. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/imported-numbers/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/imported-numbers/index.mdx new file mode 100644 index 0000000000..da99392a14 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/imported-numbers/index.mdx @@ -0,0 +1,97 @@ +--- +slug: "/reference/php/signal-wire/rest/namespaces/namespaces/imported-numbers" +title: "ImportedNumbers" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\ImportedNumbers" + parent: "SignalWire\\REST\\Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ImportedNumbers.php" +--- +# `ImportedNumbers` + +Imported phone numbers — create only (registers an externally-hosted + +number). + +## Signature + +```php +class ImportedNumbers +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http) +``` + +#### Parameters + + + +#### Source + +[`SignalWire/REST/Namespaces/ImportedNumbers.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ImportedNumbers.php) + +Line 18. + +*** + +### create + +#### Signature + +```php +public function create(array $body): array +``` + +#### Parameters + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/ImportedNumbers.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ImportedNumbers.php) + +Line 29. + +*** + +### getBasePath + +#### Signature + +```php +public function getBasePath(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/Namespaces/ImportedNumbers.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ImportedNumbers.php) + +Line 23. + +## Source + +[`SignalWire/REST/Namespaces/ImportedNumbers.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ImportedNumbers.php) + +Line 13. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/index.mdx new file mode 100644 index 0000000000..18811367c2 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/index.mdx @@ -0,0 +1,171 @@ +--- +slug: "/reference/php/signal-wire/rest/namespaces/namespaces" +title: "Namespaces" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "module" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces" + module: "SignalWire.REST.Namespaces" +--- +# `Namespaces` + +## Signature + +```php +namespace SignalWire\REST\Namespaces +``` + +## Classes + + + + Addresses namespace — list / create / get / delete (no update). + + + + Calling API namespace. + + + + Compatibility (Twilio-compatible LAML) API namespace. + + + + Compat account / sub-project management. + + + + Compat conference management with participants, recordings, and streams. + + + + Compat IncomingPhoneNumbers + AvailablePhoneNumbers + ImportedPhoneNumbers + + + + Compat recording management. + + + + Compat API token management. + + + + Compat transcription management. + + + + Conference log queries — list-only resource. + + + + Datasphere API namespace — exposes the documents sub-resource. + + + + Fabric API namespace. + + + + Read-only fabric addresses (`/api/fabric/addresses`). + + + + Generic operations across all fabric resource types + + + + Subscriber, guest, invite, and embed token creation under + + + + Fax log queries — list + get by id. + + + + Imported phone numbers — create only (registers an externally-hosted + + + + Logs namespace — message, voice, fax, and conference logs (read-only). + + + + Message log queries — list + get by id. + + + + Multi-factor authentication via SMS or phone call. + + + + Project API namespace — currently exposes the project tokens sub-resource. + + + + Project API token management — create / update (PATCH) / delete. + + + + Recordings — read-only list/get plus delete (no create or update). + + + + 10DLC Campaign Registry namespace — brands, campaigns, orders, numbers. + + + + 10DLC brand management — list, create, get, list\_campaigns, create\_campaign. + + + + 10DLC campaign management — get, update (PUT), list\_numbers, + + + + 10DLC number assignment management — release a number. + + + + 10DLC assignment order management — read-only, retrieve by id. + + + + Short codes management — read + update (PUT) only. + + + + Project SIP profile (singleton resource) — get + update (PUT). + + + + Video API namespace. + + + + Video conference token management — get + reset. + + + + Video room recording management — top-level recordings collection + + + + Video room session management. Read-only with several sub-collections + + + + Video room token generation. Surface is `create` only. + + + + Top-level video stream management — get / update (PUT) / delete. + + + + Voice log queries — list + get by id + per-id event sub-collection. + + diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/logs/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/logs/index.mdx new file mode 100644 index 0000000000..890a5376d1 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/logs/index.mdx @@ -0,0 +1,153 @@ +--- +slug: "/reference/php/signal-wire/rest/namespaces/namespaces/logs" +title: "Logs" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\Logs" + parent: "SignalWire\\REST\\Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Logs.php" +--- +# `Logs` + +Logs namespace — message, voice, fax, and conference logs (read-only). + +Mirrors Python `signalwire.rest.namespaces.logs.LogsNamespace`: each +sub-API lives at a different mount point because that's how the spec +docs slice them. + +## Signature + +```php +class Logs +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http) +``` + +#### Parameters + + + +#### Source + +[`SignalWire/REST/Namespaces/Logs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Logs.php) + +Line 25. + +*** + +### conferences + +#### Signature + +```php +public function conferences(): SignalWire\REST\Namespaces\ConferenceLogs +``` + +#### Returns + +`SignalWire\REST\Namespaces\ConferenceLogs` + +#### Source + +[`SignalWire/REST/Namespaces/Logs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Logs.php) + +Line 49. + +*** + +### fax + +#### Signature + +```php +public function fax(): SignalWire\REST\Namespaces\FaxLogs +``` + +#### Returns + +`SignalWire\REST\Namespaces\FaxLogs` + +#### Source + +[`SignalWire/REST/Namespaces/Logs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Logs.php) + +Line 44. + +*** + +### getHttp + +#### Signature + +```php +public function getHttp(): SignalWire\REST\HttpClient +``` + +#### Returns + +`SignalWire\REST\HttpClient` + +#### Source + +[`SignalWire/REST/Namespaces/Logs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Logs.php) + +Line 54. + +*** + +### messages + +#### Signature + +```php +public function messages(): SignalWire\REST\Namespaces\MessageLogs +``` + +#### Returns + +`SignalWire\REST\Namespaces\MessageLogs` + +#### Source + +[`SignalWire/REST/Namespaces/Logs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Logs.php) + +Line 34. + +*** + +### voice + +#### Signature + +```php +public function voice(): SignalWire\REST\Namespaces\VoiceLogs +``` + +#### Returns + +`SignalWire\REST\Namespaces\VoiceLogs` + +#### Source + +[`SignalWire/REST/Namespaces/Logs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Logs.php) + +Line 39. + +## Source + +[`SignalWire/REST/Namespaces/Logs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Logs.php) + +Line 16. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/message-logs/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/message-logs/index.mdx new file mode 100644 index 0000000000..dd116dc77c --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/message-logs/index.mdx @@ -0,0 +1,127 @@ +--- +slug: "/reference/php/signal-wire/rest/namespaces/namespaces/message-logs" +title: "MessageLogs" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\MessageLogs" + parent: "SignalWire\\REST\\Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/MessageLogs.php" +--- +# `MessageLogs` + +Message log queries — list + get by id. + +## Signature + +```php +class MessageLogs +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http, string $basePath) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/REST/Namespaces/MessageLogs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/MessageLogs.php) + +Line 17. + +*** + +### get + +#### Signature + +```php +public function get(string $logId): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/MessageLogs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/MessageLogs.php) + +Line 35. + +*** + +### getBasePath + +#### Signature + +```php +public function getBasePath(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/Namespaces/MessageLogs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/MessageLogs.php) + +Line 23. + +*** + +### list + +#### Signature + +```php +public function list(array $params = array ( +)): array +``` + +#### Parameters + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/MessageLogs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/MessageLogs.php) + +Line 29. + +## Source + +[`SignalWire/REST/Namespaces/MessageLogs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/MessageLogs.php) + +Line 12. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/mfa/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/mfa/index.mdx new file mode 100644 index 0000000000..df9356777f --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/mfa/index.mdx @@ -0,0 +1,149 @@ +--- +slug: "/reference/php/signal-wire/rest/namespaces/namespaces/mfa" +title: "Mfa" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\Mfa" + parent: "SignalWire\\REST\\Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Mfa.php" +--- +# `Mfa` + +Multi-factor authentication via SMS or phone call. + +## Signature + +```php +class Mfa +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http) +``` + +#### Parameters + + + +#### Source + +[`SignalWire/REST/Namespaces/Mfa.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Mfa.php) + +Line 17. + +*** + +### call + +#### Signature + +```php +public function call(array $body): array +``` + +#### Parameters + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Mfa.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Mfa.php) + +Line 34. + +*** + +### getBasePath + +#### Signature + +```php +public function getBasePath(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/Namespaces/Mfa.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Mfa.php) + +Line 22. + +*** + +### sms + +#### Signature + +```php +public function sms(array $body): array +``` + +#### Parameters + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Mfa.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Mfa.php) + +Line 28. + +*** + +### verify + +#### Signature + +```php +public function verify(string $requestId, array $body): array +``` + +#### Parameters + + + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Mfa.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Mfa.php) + +Line 40. + +## Source + +[`SignalWire/REST/Namespaces/Mfa.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Mfa.php) + +Line 12. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/project-tokens/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/project-tokens/index.mdx new file mode 100644 index 0000000000..3dcbe82aa5 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/project-tokens/index.mdx @@ -0,0 +1,147 @@ +--- +slug: "/reference/php/signal-wire/rest/namespaces/namespaces/project-tokens" +title: "ProjectTokens" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\ProjectTokens" + parent: "SignalWire\\REST\\Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ProjectTokens.php" +--- +# `ProjectTokens` + +Project API token management — create / update (PATCH) / delete. + +## Signature + +```php +class ProjectTokens +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http) +``` + +#### Parameters + + + +#### Source + +[`SignalWire/REST/Namespaces/ProjectTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ProjectTokens.php) + +Line 17. + +*** + +### create + +#### Signature + +```php +public function create(array $body): array +``` + +#### Parameters + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/ProjectTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ProjectTokens.php) + +Line 28. + +*** + +### delete + +#### Signature + +```php +public function delete(string $tokenId): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/ProjectTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ProjectTokens.php) + +Line 40. + +*** + +### getBasePath + +#### Signature + +```php +public function getBasePath(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/Namespaces/ProjectTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ProjectTokens.php) + +Line 22. + +*** + +### update + +#### Signature + +```php +public function update(string $tokenId, array $body): array +``` + +#### Parameters + + + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/ProjectTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ProjectTokens.php) + +Line 34. + +## Source + +[`SignalWire/REST/Namespaces/ProjectTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ProjectTokens.php) + +Line 12. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/project/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/project/index.mdx new file mode 100644 index 0000000000..0ad38ec33f --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/project/index.mdx @@ -0,0 +1,89 @@ +--- +slug: "/reference/php/signal-wire/rest/namespaces/namespaces/project" +title: "Project" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\Project" + parent: "SignalWire\\REST\\Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Project.php" +--- +# `Project` + +Project API namespace — currently exposes the project tokens sub-resource. + +## Signature + +```php +class Project +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http) +``` + +#### Parameters + + + +#### Source + +[`SignalWire/REST/Namespaces/Project.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Project.php) + +Line 17. + +*** + +### getHttp + +#### Signature + +```php +public function getHttp(): SignalWire\REST\HttpClient +``` + +#### Returns + +`SignalWire\REST\HttpClient` + +#### Source + +[`SignalWire/REST/Namespaces/Project.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Project.php) + +Line 28. + +*** + +### tokens + +#### Signature + +```php +public function tokens(): SignalWire\REST\Namespaces\ProjectTokens +``` + +#### Returns + +`SignalWire\REST\Namespaces\ProjectTokens` + +#### Source + +[`SignalWire/REST/Namespaces/Project.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Project.php) + +Line 23. + +## Source + +[`SignalWire/REST/Namespaces/Project.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Project.php) + +Line 12. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/recordings/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/recordings/index.mdx new file mode 100644 index 0000000000..d25762697e --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/recordings/index.mdx @@ -0,0 +1,149 @@ +--- +slug: "/reference/php/signal-wire/rest/namespaces/namespaces/recordings" +title: "Recordings" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\Recordings" + parent: "SignalWire\\REST\\Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Recordings.php" +--- +# `Recordings` + +Recordings — read-only list/get plus delete (no create or update). + +## Signature + +```php +class Recordings +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http) +``` + +#### Parameters + + + +#### Source + +[`SignalWire/REST/Namespaces/Recordings.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Recordings.php) + +Line 17. + +*** + +### delete + +#### Signature + +```php +public function delete(string $recordingId): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Recordings.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Recordings.php) + +Line 40. + +*** + +### get + +#### Signature + +```php +public function get(string $recordingId): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Recordings.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Recordings.php) + +Line 34. + +*** + +### getBasePath + +#### Signature + +```php +public function getBasePath(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/Namespaces/Recordings.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Recordings.php) + +Line 22. + +*** + +### list + +#### Signature + +```php +public function list(array $params = array ( +)): array +``` + +#### Parameters + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Recordings.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Recordings.php) + +Line 28. + +## Source + +[`SignalWire/REST/Namespaces/Recordings.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Recordings.php) + +Line 12. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/registry-brands/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/registry-brands/index.mdx new file mode 100644 index 0000000000..08cf9423b9 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/registry-brands/index.mdx @@ -0,0 +1,215 @@ +--- +slug: "/reference/php/signal-wire/rest/namespaces/namespaces/registry-brands" +title: "RegistryBrands" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\RegistryBrands" + parent: "SignalWire\\REST\\Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryBrands.php" +--- +# `RegistryBrands` + +10DLC brand management — list, create, get, list\_campaigns, create\_campaign. + +## Signature + +```php +class RegistryBrands +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http, string $basePath) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/REST/Namespaces/RegistryBrands.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryBrands.php) + +Line 17. + +*** + +### create + +#### Signature + +```php +public function create(array $body): array +``` + +#### Parameters + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/RegistryBrands.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryBrands.php) + +Line 35. + +*** + +### createCampaign + +#### Signature + +```php +public function createCampaign(string $brandId, array $body): array +``` + +#### Parameters + + + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/RegistryBrands.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryBrands.php) + +Line 53. + +*** + +### get + +#### Signature + +```php +public function get(string $brandId): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/RegistryBrands.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryBrands.php) + +Line 41. + +*** + +### getBasePath + +#### Signature + +```php +public function getBasePath(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/Namespaces/RegistryBrands.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryBrands.php) + +Line 23. + +*** + +### list + +#### Signature + +```php +public function list(array $params = array ( +)): array +``` + +#### Parameters + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/RegistryBrands.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryBrands.php) + +Line 29. + +*** + +### listCampaigns + +#### Signature + +```php +public function listCampaigns(string $brandId, array $params = array ( +)): array +``` + +#### Parameters + + + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/RegistryBrands.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryBrands.php) + +Line 47. + +## Source + +[`SignalWire/REST/Namespaces/RegistryBrands.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryBrands.php) + +Line 12. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/registry-campaigns/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/registry-campaigns/index.mdx new file mode 100644 index 0000000000..42bdb21977 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/registry-campaigns/index.mdx @@ -0,0 +1,221 @@ +--- +slug: "/reference/php/signal-wire/rest/namespaces/namespaces/registry-campaigns" +title: "RegistryCampaigns" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\RegistryCampaigns" + parent: "SignalWire\\REST\\Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryCampaigns.php" +--- +# `RegistryCampaigns` + +10DLC campaign management — get, update (PUT), list\_numbers, + +list\_orders, create\_order. + +## Signature + +```php +class RegistryCampaigns +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http, string $basePath) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/REST/Namespaces/RegistryCampaigns.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryCampaigns.php) + +Line 18. + +*** + +### createOrder + +#### Signature + +```php +public function createOrder(string $campaignId, array $body): array +``` + +#### Parameters + + + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/RegistryCampaigns.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryCampaigns.php) + +Line 59. + +*** + +### get + +#### Signature + +```php +public function get(string $campaignId): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/RegistryCampaigns.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryCampaigns.php) + +Line 30. + +*** + +### getBasePath + +#### Signature + +```php +public function getBasePath(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/Namespaces/RegistryCampaigns.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryCampaigns.php) + +Line 24. + +*** + +### listNumbers + +#### Signature + +```php +public function listNumbers(string $campaignId, array $params = array ( +)): array +``` + +#### Parameters + + + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/RegistryCampaigns.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryCampaigns.php) + +Line 47. + +*** + +### listOrders + +#### Signature + +```php +public function listOrders(string $campaignId, array $params = array ( +)): array +``` + +#### Parameters + + + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/RegistryCampaigns.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryCampaigns.php) + +Line 53. + +*** + +### update + +Update uses PUT (not PATCH) to mirror the Python `RegistryCampaigns`. + +#### Signature + +```php +public function update(string $campaignId, array $body): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/RegistryCampaigns.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryCampaigns.php) + +Line 41. + +## Source + +[`SignalWire/REST/Namespaces/RegistryCampaigns.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryCampaigns.php) + +Line 13. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/registry-numbers/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/registry-numbers/index.mdx new file mode 100644 index 0000000000..1ea90dab6b --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/registry-numbers/index.mdx @@ -0,0 +1,95 @@ +--- +slug: "/reference/php/signal-wire/rest/namespaces/namespaces/registry-numbers" +title: "RegistryNumbers" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\RegistryNumbers" + parent: "SignalWire\\REST\\Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryNumbers.php" +--- +# `RegistryNumbers` + +10DLC number assignment management — release a number. + +## Signature + +```php +class RegistryNumbers +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http, string $basePath) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/REST/Namespaces/RegistryNumbers.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryNumbers.php) + +Line 17. + +*** + +### delete + +#### Signature + +```php +public function delete(string $numberId): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/RegistryNumbers.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryNumbers.php) + +Line 29. + +*** + +### getBasePath + +#### Signature + +```php +public function getBasePath(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/Namespaces/RegistryNumbers.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryNumbers.php) + +Line 23. + +## Source + +[`SignalWire/REST/Namespaces/RegistryNumbers.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryNumbers.php) + +Line 12. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/registry-orders/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/registry-orders/index.mdx new file mode 100644 index 0000000000..76294a19c1 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/registry-orders/index.mdx @@ -0,0 +1,95 @@ +--- +slug: "/reference/php/signal-wire/rest/namespaces/namespaces/registry-orders" +title: "RegistryOrders" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\RegistryOrders" + parent: "SignalWire\\REST\\Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryOrders.php" +--- +# `RegistryOrders` + +10DLC assignment order management — read-only, retrieve by id. + +## Signature + +```php +class RegistryOrders +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http, string $basePath) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/REST/Namespaces/RegistryOrders.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryOrders.php) + +Line 17. + +*** + +### get + +#### Signature + +```php +public function get(string $orderId): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/RegistryOrders.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryOrders.php) + +Line 29. + +*** + +### getBasePath + +#### Signature + +```php +public function getBasePath(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/Namespaces/RegistryOrders.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryOrders.php) + +Line 23. + +## Source + +[`SignalWire/REST/Namespaces/RegistryOrders.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryOrders.php) + +Line 12. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/registry/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/registry/index.mdx new file mode 100644 index 0000000000..41543c2502 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/registry/index.mdx @@ -0,0 +1,152 @@ +--- +slug: "/reference/php/signal-wire/rest/namespaces/namespaces/registry" +title: "Registry" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\Registry" + parent: "SignalWire\\REST\\Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Registry.php" +--- +# `Registry` + +10DLC Campaign Registry namespace — brands, campaigns, orders, numbers. + +Mirrors Python `signalwire.rest.namespaces.registry.RegistryNamespace`. +All registry endpoints sit under `/api/relay/rest/registry/beta`. + +## Signature + +```php +class Registry +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http) +``` + +#### Parameters + + + +#### Source + +[`SignalWire/REST/Namespaces/Registry.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Registry.php) + +Line 25. + +*** + +### brands + +#### Signature + +```php +public function brands(): SignalWire\REST\Namespaces\RegistryBrands +``` + +#### Returns + +`SignalWire\REST\Namespaces\RegistryBrands` + +#### Source + +[`SignalWire/REST/Namespaces/Registry.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Registry.php) + +Line 34. + +*** + +### campaigns + +#### Signature + +```php +public function campaigns(): SignalWire\REST\Namespaces\RegistryCampaigns +``` + +#### Returns + +`SignalWire\REST\Namespaces\RegistryCampaigns` + +#### Source + +[`SignalWire/REST/Namespaces/Registry.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Registry.php) + +Line 39. + +*** + +### getHttp + +#### Signature + +```php +public function getHttp(): SignalWire\REST\HttpClient +``` + +#### Returns + +`SignalWire\REST\HttpClient` + +#### Source + +[`SignalWire/REST/Namespaces/Registry.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Registry.php) + +Line 54. + +*** + +### numbers + +#### Signature + +```php +public function numbers(): SignalWire\REST\Namespaces\RegistryNumbers +``` + +#### Returns + +`SignalWire\REST\Namespaces\RegistryNumbers` + +#### Source + +[`SignalWire/REST/Namespaces/Registry.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Registry.php) + +Line 49. + +*** + +### orders + +#### Signature + +```php +public function orders(): SignalWire\REST\Namespaces\RegistryOrders +``` + +#### Returns + +`SignalWire\REST\Namespaces\RegistryOrders` + +#### Source + +[`SignalWire/REST/Namespaces/Registry.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Registry.php) + +Line 44. + +## Source + +[`SignalWire/REST/Namespaces/Registry.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Registry.php) + +Line 15. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/short-codes/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/short-codes/index.mdx new file mode 100644 index 0000000000..7f01721d82 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/short-codes/index.mdx @@ -0,0 +1,153 @@ +--- +slug: "/reference/php/signal-wire/rest/namespaces/namespaces/short-codes" +title: "ShortCodes" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\ShortCodes" + parent: "SignalWire\\REST\\Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ShortCodes.php" +--- +# `ShortCodes` + +Short codes management — read + update (PUT) only. + +## Signature + +```php +class ShortCodes +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http) +``` + +#### Parameters + + + +#### Source + +[`SignalWire/REST/Namespaces/ShortCodes.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ShortCodes.php) + +Line 17. + +*** + +### get + +#### Signature + +```php +public function get(string $shortCodeId): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/ShortCodes.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ShortCodes.php) + +Line 34. + +*** + +### getBasePath + +#### Signature + +```php +public function getBasePath(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/Namespaces/ShortCodes.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ShortCodes.php) + +Line 22. + +*** + +### list + +#### Signature + +```php +public function list(array $params = array ( +)): array +``` + +#### Parameters + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/ShortCodes.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ShortCodes.php) + +Line 28. + +*** + +### update + +#### Signature + +```php +public function update(string $shortCodeId, array $body): array +``` + +#### Parameters + + + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/ShortCodes.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ShortCodes.php) + +Line 40. + +## Source + +[`SignalWire/REST/Namespaces/ShortCodes.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ShortCodes.php) + +Line 12. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/sip-profile/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/sip-profile/index.mdx new file mode 100644 index 0000000000..d307401a66 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/sip-profile/index.mdx @@ -0,0 +1,115 @@ +--- +slug: "/reference/php/signal-wire/rest/namespaces/namespaces/sip-profile" +title: "SipProfile" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\SipProfile" + parent: "SignalWire\\REST\\Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/SipProfile.php" +--- +# `SipProfile` + +Project SIP profile (singleton resource) — get + update (PUT). + +## Signature + +```php +class SipProfile +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http) +``` + +#### Parameters + + + +#### Source + +[`SignalWire/REST/Namespaces/SipProfile.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/SipProfile.php) + +Line 17. + +*** + +### get + +#### Signature + +```php +public function get(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/SipProfile.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/SipProfile.php) + +Line 28. + +*** + +### getBasePath + +#### Signature + +```php +public function getBasePath(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/Namespaces/SipProfile.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/SipProfile.php) + +Line 22. + +*** + +### update + +#### Signature + +```php +public function update(array $body): array +``` + +#### Parameters + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/SipProfile.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/SipProfile.php) + +Line 34. + +## Source + +[`SignalWire/REST/Namespaces/SipProfile.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/SipProfile.php) + +Line 12. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/video-conference-tokens/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/video-conference-tokens/index.mdx new file mode 100644 index 0000000000..0c14653a45 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/video-conference-tokens/index.mdx @@ -0,0 +1,119 @@ +--- +slug: "/reference/php/signal-wire/rest/namespaces/namespaces/video-conference-tokens" +title: "VideoConferenceTokens" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\VideoConferenceTokens" + parent: "SignalWire\\REST\\Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoConferenceTokens.php" +--- +# `VideoConferenceTokens` + +Video conference token management — get + reset. + +## Signature + +```php +class VideoConferenceTokens +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http, string $basePath) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/REST/Namespaces/VideoConferenceTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoConferenceTokens.php) + +Line 17. + +*** + +### get + +#### Signature + +```php +public function get(string $tokenId): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/VideoConferenceTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoConferenceTokens.php) + +Line 29. + +*** + +### getBasePath + +#### Signature + +```php +public function getBasePath(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/Namespaces/VideoConferenceTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoConferenceTokens.php) + +Line 23. + +*** + +### reset + +#### Signature + +```php +public function reset(string $tokenId): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/VideoConferenceTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoConferenceTokens.php) + +Line 35. + +## Source + +[`SignalWire/REST/Namespaces/VideoConferenceTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoConferenceTokens.php) + +Line 12. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/video-room-recordings/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/video-room-recordings/index.mdx new file mode 100644 index 0000000000..d67223d4c9 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/video-room-recordings/index.mdx @@ -0,0 +1,187 @@ +--- +slug: "/reference/php/signal-wire/rest/namespaces/namespaces/video-room-recordings" +title: "VideoRoomRecordings" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\VideoRoomRecordings" + parent: "SignalWire\\REST\\Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoRoomRecordings.php" +--- +# `VideoRoomRecordings` + +Video room recording management — top-level recordings collection + +(distinct from session-scoped recordings). + +## Signature + +```php +class VideoRoomRecordings +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http, string $basePath) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/REST/Namespaces/VideoRoomRecordings.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoRoomRecordings.php) + +Line 18. + +*** + +### delete + +#### Signature + +```php +public function delete(string $recordingId): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/VideoRoomRecordings.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoRoomRecordings.php) + +Line 42. + +*** + +### get + +#### Signature + +```php +public function get(string $recordingId): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/VideoRoomRecordings.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoRoomRecordings.php) + +Line 36. + +*** + +### getBasePath + +#### Signature + +```php +public function getBasePath(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/Namespaces/VideoRoomRecordings.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoRoomRecordings.php) + +Line 24. + +*** + +### list + +#### Signature + +```php +public function list(array $params = array ( +)): array +``` + +#### Parameters + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/VideoRoomRecordings.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoRoomRecordings.php) + +Line 30. + +*** + +### listEvents + +#### Signature + +```php +public function listEvents(string $recordingId, array $params = array ( +)): array +``` + +#### Parameters + + + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/VideoRoomRecordings.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoRoomRecordings.php) + +Line 48. + +## Source + +[`SignalWire/REST/Namespaces/VideoRoomRecordings.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoRoomRecordings.php) + +Line 13. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/video-room-sessions/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/video-room-sessions/index.mdx new file mode 100644 index 0000000000..8d125fd135 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/video-room-sessions/index.mdx @@ -0,0 +1,231 @@ +--- +slug: "/reference/php/signal-wire/rest/namespaces/namespaces/video-room-sessions" +title: "VideoRoomSessions" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\VideoRoomSessions" + parent: "SignalWire\\REST\\Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoRoomSessions.php" +--- +# `VideoRoomSessions` + +Video room session management. Read-only with several sub-collections + +(events, members, recordings). + +## Signature + +```php +class VideoRoomSessions +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http, string $basePath) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/REST/Namespaces/VideoRoomSessions.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoRoomSessions.php) + +Line 18. + +*** + +### get + +#### Signature + +```php +public function get(string $sessionId): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/VideoRoomSessions.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoRoomSessions.php) + +Line 36. + +*** + +### getBasePath + +#### Signature + +```php +public function getBasePath(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/Namespaces/VideoRoomSessions.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoRoomSessions.php) + +Line 24. + +*** + +### list + +#### Signature + +```php +public function list(array $params = array ( +)): array +``` + +#### Parameters + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/VideoRoomSessions.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoRoomSessions.php) + +Line 30. + +*** + +### listEvents + +#### Signature + +```php +public function listEvents(string $sessionId, array $params = array ( +)): array +``` + +#### Parameters + + + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/VideoRoomSessions.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoRoomSessions.php) + +Line 42. + +*** + +### listMembers + +#### Signature + +```php +public function listMembers(string $sessionId, array $params = array ( +)): array +``` + +#### Parameters + + + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/VideoRoomSessions.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoRoomSessions.php) + +Line 48. + +*** + +### listRecordings + +#### Signature + +```php +public function listRecordings(string $sessionId, array $params = array ( +)): array +``` + +#### Parameters + + + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/VideoRoomSessions.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoRoomSessions.php) + +Line 54. + +## Source + +[`SignalWire/REST/Namespaces/VideoRoomSessions.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoRoomSessions.php) + +Line 13. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/video-room-tokens/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/video-room-tokens/index.mdx new file mode 100644 index 0000000000..f2b83138d1 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/video-room-tokens/index.mdx @@ -0,0 +1,97 @@ +--- +slug: "/reference/php/signal-wire/rest/namespaces/namespaces/video-room-tokens" +title: "VideoRoomTokens" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\VideoRoomTokens" + parent: "SignalWire\\REST\\Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoRoomTokens.php" +--- +# `VideoRoomTokens` + +Video room token generation. Surface is `create` only. + +## Signature + +```php +class VideoRoomTokens +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http, string $basePath) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/REST/Namespaces/VideoRoomTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoRoomTokens.php) + +Line 17. + +*** + +### create + +#### Signature + +```php +public function create(array $body): array +``` + +#### Parameters + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/VideoRoomTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoRoomTokens.php) + +Line 29. + +*** + +### getBasePath + +#### Signature + +```php +public function getBasePath(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/Namespaces/VideoRoomTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoRoomTokens.php) + +Line 23. + +## Source + +[`SignalWire/REST/Namespaces/VideoRoomTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoRoomTokens.php) + +Line 12. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/video-streams/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/video-streams/index.mdx new file mode 100644 index 0000000000..af385b21cb --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/video-streams/index.mdx @@ -0,0 +1,147 @@ +--- +slug: "/reference/php/signal-wire/rest/namespaces/namespaces/video-streams" +title: "VideoStreams" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\VideoStreams" + parent: "SignalWire\\REST\\Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoStreams.php" +--- +# `VideoStreams` + +Top-level video stream management — get / update (PUT) / delete. + +## Signature + +```php +class VideoStreams +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http, string $basePath) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/REST/Namespaces/VideoStreams.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoStreams.php) + +Line 17. + +*** + +### delete + +#### Signature + +```php +public function delete(string $streamId): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/VideoStreams.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoStreams.php) + +Line 41. + +*** + +### get + +#### Signature + +```php +public function get(string $streamId): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/VideoStreams.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoStreams.php) + +Line 29. + +*** + +### getBasePath + +#### Signature + +```php +public function getBasePath(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/Namespaces/VideoStreams.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoStreams.php) + +Line 23. + +*** + +### update + +#### Signature + +```php +public function update(string $streamId, array $body): array +``` + +#### Parameters + + + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/VideoStreams.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoStreams.php) + +Line 35. + +## Source + +[`SignalWire/REST/Namespaces/VideoStreams.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoStreams.php) + +Line 12. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/video/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/video/index.mdx new file mode 100644 index 0000000000..e49f841877 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/video/index.mdx @@ -0,0 +1,213 @@ +--- +slug: "/reference/php/signal-wire/rest/namespaces/namespaces/video" +title: "Video" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\Video" + parent: "SignalWire\\REST\\Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Video.php" +--- +# `Video` + +Video API namespace. + +Mirrors Python `signalwire.rest.namespaces.video.VideoNamespace`: groups +the Video API sub-resources (rooms, room\_sessions, room\_recordings, +conferences, conference\_tokens, streams) under one object. + +## Signature + +```php +class Video +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http) +``` + +#### Parameters + + + +#### Source + +[`SignalWire/REST/Namespaces/Video.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Video.php) + +Line 29. + +*** + +### conferences + +#### Signature + +```php +public function conferences(): SignalWire\REST\Namespaces\VideoConferences +``` + +#### Returns + +`SignalWire\REST\Namespaces\VideoConferences` + +#### Source + +[`SignalWire/REST/Namespaces/Video.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Video.php) + +Line 67. + +*** + +### conferenceTokens + +#### Signature + +```php +public function conferenceTokens(): SignalWire\REST\Namespaces\VideoConferenceTokens +``` + +#### Returns + +`SignalWire\REST\Namespaces\VideoConferenceTokens` + +#### Source + +[`SignalWire/REST/Namespaces/Video.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Video.php) + +Line 72. + +*** + +### getHttp + +#### Signature + +```php +public function getHttp(): SignalWire\REST\HttpClient +``` + +#### Returns + +`SignalWire\REST\HttpClient` + +#### Source + +[`SignalWire/REST/Namespaces/Video.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Video.php) + +Line 42. + +*** + +### roomRecordings + +#### Signature + +```php +public function roomRecordings(): SignalWire\REST\Namespaces\VideoRoomRecordings +``` + +#### Returns + +`SignalWire\REST\Namespaces\VideoRoomRecordings` + +#### Source + +[`SignalWire/REST/Namespaces/Video.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Video.php) + +Line 62. + +*** + +### rooms + +#### Signature + +```php +public function rooms(): SignalWire\REST\Namespaces\VideoRooms +``` + +#### Returns + +`SignalWire\REST\Namespaces\VideoRooms` + +#### Source + +[`SignalWire/REST/Namespaces/Video.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Video.php) + +Line 47. + +*** + +### roomSessions + +#### Signature + +```php +public function roomSessions(): SignalWire\REST\Namespaces\VideoRoomSessions +``` + +#### Returns + +`SignalWire\REST\Namespaces\VideoRoomSessions` + +#### Source + +[`SignalWire/REST/Namespaces/Video.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Video.php) + +Line 57. + +*** + +### roomTokens + +#### Signature + +```php +public function roomTokens(): SignalWire\REST\Namespaces\VideoRoomTokens +``` + +#### Returns + +`SignalWire\REST\Namespaces\VideoRoomTokens` + +#### Source + +[`SignalWire/REST/Namespaces/Video.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Video.php) + +Line 52. + +*** + +### streams + +#### Signature + +```php +public function streams(): SignalWire\REST\Namespaces\VideoStreams +``` + +#### Returns + +`SignalWire\REST\Namespaces\VideoStreams` + +#### Source + +[`SignalWire/REST/Namespaces/Video.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Video.php) + +Line 77. + +## Source + +[`SignalWire/REST/Namespaces/Video.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Video.php) + +Line 17. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/voice-logs/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/voice-logs/index.mdx new file mode 100644 index 0000000000..e67d287f89 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/voice-logs/index.mdx @@ -0,0 +1,161 @@ +--- +slug: "/reference/php/signal-wire/rest/namespaces/namespaces/voice-logs" +title: "VoiceLogs" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\VoiceLogs" + parent: "SignalWire\\REST\\Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VoiceLogs.php" +--- +# `VoiceLogs` + +Voice log queries — list + get by id + per-id event sub-collection. + +## Signature + +```php +class VoiceLogs +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http, string $basePath) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/REST/Namespaces/VoiceLogs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VoiceLogs.php) + +Line 17. + +*** + +### get + +#### Signature + +```php +public function get(string $logId): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/VoiceLogs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VoiceLogs.php) + +Line 35. + +*** + +### getBasePath + +#### Signature + +```php +public function getBasePath(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/Namespaces/VoiceLogs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VoiceLogs.php) + +Line 23. + +*** + +### list + +#### Signature + +```php +public function list(array $params = array ( +)): array +``` + +#### Parameters + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/VoiceLogs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VoiceLogs.php) + +Line 29. + +*** + +### listEvents + +#### Signature + +```php +public function listEvents(string $logId, array $params = array ( +)): array +``` + +#### Parameters + + + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/VoiceLogs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VoiceLogs.php) + +Line 41. + +## Source + +[`SignalWire/REST/Namespaces/VoiceLogs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VoiceLogs.php) + +Line 12. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/rest/base-resource/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/rest/base-resource/index.mdx new file mode 100644 index 0000000000..abca126d0d --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/rest/rest/base-resource/index.mdx @@ -0,0 +1,97 @@ +--- +slug: "/reference/php/signal-wire/rest/rest/base-resource" +title: "BaseResource" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\BaseResource" + parent: "SignalWire\\REST" + module: "SignalWire.REST" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php" +--- +# `BaseResource` + +Common base class for namespace and resource classes. + +Mirrors Python's signalwire.rest.\_base.BaseResource — minimal wrapper +around an HttpClient and a base path. CrudResource extends this for +standard REST collection+item access; namespace classes that want a +shared base path (without inheriting list/create/get/update/delete) +can subclass BaseResource directly. + +## Signature + +```php +class BaseResource +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http, string $base_path) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) + +Line 21. + +*** + +### getBasePath + +#### Signature + +```php +public function getBasePath(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) + +Line 38. + +*** + +### getHttp + +#### Signature + +```php +public function getHttp(): SignalWire\REST\HttpClient +``` + +#### Returns + +`SignalWire\REST\HttpClient` + +#### Source + +[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) + +Line 43. + +## Source + +[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) + +Line 16. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/rest/crud-resource/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/rest/crud-resource/index.mdx new file mode 100644 index 0000000000..c2ecdeb5a8 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/rest/rest/crud-resource/index.mdx @@ -0,0 +1,262 @@ +--- +slug: "/reference/php/signal-wire/rest/rest/crud-resource" +title: "CrudResource" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\CrudResource" + parent: "SignalWire\\REST" + module: "SignalWire.REST" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php" +--- +# `CrudResource` + +Generic CRUD wrapper around an HttpClient and a base API path. + +Provides list / create / get / update / delete for any REST resource that +follows the standard SignalWire collection+item URL pattern. + +## Signature + +```php +class CrudResource extends BaseResource +``` + +## Inheritance + +**Extends:** [SignalWire\REST\BaseResource](/docs/sdk-reference/reference/php/signal-wire/rest/rest/base-resource) + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $client, string $basePath) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) + +Line 59. + +*** + +### create + +Create a new resource (POST basePath). + +#### Signature + +```php +public function create(array $data): array +``` + +#### Parameters + + + JSON body. + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) + +Line 105. + +*** + +### delete + +Delete a resource by ID (DELETE basePath/\{id\}). + +#### Signature + +```php +public function delete(string $id): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) + +Line 136. + +*** + +### get + +Retrieve a single resource by ID (GET basePath/\{id\}). + +#### Signature + +```php +public function get(string $id): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) + +Line 115. + +*** + +### getBasePath + +#### Signature + +```php +public function getBasePath(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) + +Line 65. + +*** + +### getClient + +#### Signature + +```php +public function getClient(): SignalWire\REST\HttpClient +``` + +#### Returns + +`SignalWire\REST\HttpClient` + +#### Source + +[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) + +Line 70. + +*** + +### getHttp + +#### Signature + +```php +public function getHttp(): SignalWire\REST\HttpClient +``` + +#### Returns + +`SignalWire\REST\HttpClient` + +#### Source + +[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) + +Line 43. + +*** + +### list + +List resources (GET basePath). + +#### Signature + +```php +public function list(array $params = array ( +)): array +``` + +#### Parameters + + + Query-string parameters. + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) + +Line 94. + +*** + +### update + +Update a resource by ID (PUT basePath/\{id\}). + +#### Signature + +```php +public function update(string $id, array $data): array +``` + +#### Parameters + + + + + JSON body. + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) + +Line 126. + +## Source + +[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) + +Line 55. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/rest/crud-with-addresses/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/rest/crud-with-addresses/index.mdx new file mode 100644 index 0000000000..7ee65aa371 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/rest/rest/crud-with-addresses/index.mdx @@ -0,0 +1,298 @@ +--- +slug: "/reference/php/signal-wire/rest/rest/crud-with-addresses" +title: "CrudWithAddresses" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\CrudWithAddresses" + parent: "SignalWire\\REST" + module: "SignalWire.REST" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php" +--- +# `CrudWithAddresses` + +CRUD resource that also supports listing addresses for an item. + +Mirrors Python's signalwire.rest.\_base.CrudWithAddresses — adds +list\_addresses(resource\_id, \*\*params) on top of the standard CRUD set. + +## Signature + +```php +class CrudWithAddresses extends CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire\REST\CrudResource](/docs/sdk-reference/reference/php/signal-wire/rest/rest/crud-resource) + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $client, string $basePath) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) + +Line 59. + +*** + +### create + +Create a new resource (POST basePath). + +#### Signature + +```php +public function create(array $data): array +``` + +#### Parameters + + + JSON body. + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) + +Line 105. + +*** + +### delete + +Delete a resource by ID (DELETE basePath/\{id\}). + +#### Signature + +```php +public function delete(string $id): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) + +Line 136. + +*** + +### get + +Retrieve a single resource by ID (GET basePath/\{id\}). + +#### Signature + +```php +public function get(string $id): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) + +Line 115. + +*** + +### getBasePath + +#### Signature + +```php +public function getBasePath(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) + +Line 65. + +*** + +### getClient + +#### Signature + +```php +public function getClient(): SignalWire\REST\HttpClient +``` + +#### Returns + +`SignalWire\REST\HttpClient` + +#### Source + +[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) + +Line 70. + +*** + +### getHttp + +#### Signature + +```php +public function getHttp(): SignalWire\REST\HttpClient +``` + +#### Returns + +`SignalWire\REST\HttpClient` + +#### Source + +[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) + +Line 43. + +*** + +### list + +List resources (GET basePath). + +#### Signature + +```php +public function list(array $params = array ( +)): array +``` + +#### Parameters + + + Query-string parameters. + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) + +Line 94. + +*** + +### listAddresses + +List the addresses associated with a resource (GET basePath/\{id\}/addresses). + +#### Signature + +```php +public function listAddresses(string $resource_id, array $params = array ( +)): array +``` + +#### Parameters + + + + + Query-string parameters. + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) + +Line 156. + +*** + +### update + +Update a resource by ID (PUT basePath/\{id\}). + +#### Signature + +```php +public function update(string $id, array $data): array +``` + +#### Parameters + + + + + JSON body. + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) + +Line 126. + +## Source + +[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) + +Line 148. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/rest/http-client/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/rest/http-client/index.mdx new file mode 100644 index 0000000000..eea5a9e65d --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/rest/rest/http-client/index.mdx @@ -0,0 +1,344 @@ +--- +slug: "/reference/php/signal-wire/rest/rest/http-client" +title: "HttpClient" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\HttpClient" + parent: "SignalWire\\REST" + module: "SignalWire.REST" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/HttpClient.php" +--- +# `HttpClient` + +Low-level HTTP client for SignalWire REST APIs. + +Uses cURL for HTTP requests, Basic Auth with project\_id:token, +and returns parsed JSON responses as associative arrays. + +## Signature + +```php +class HttpClient +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct( + string $projectId, + string $token, + string $baseUrl, + ?string $caBundle = NULL +) +``` + +#### Parameters + + + + + + + + + Optional CA bundle (PEM) for HTTPS peer verification. Falls back to the SIGNALWIRE\_CA\_FILE / SSL\_CERT\_FILE env vars (PHP's cURL does not honor those env vars on its own). + + +#### Source + +[`SignalWire/REST/HttpClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/HttpClient.php) + +Line 38. + +*** + +### delete + +#### Signature + +```php +public function delete(string $path): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/HttpClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/HttpClient.php) + +Line 129. + +*** + +### get + +#### Signature + +```php +public function get(string $path, array $params = array ( +)): array +``` + +#### Parameters + + + + + Query-string parameters. + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/HttpClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/HttpClient.php) + +Line 94. + +*** + +### getAuthHeader + +#### Signature + +```php +public function getAuthHeader(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/HttpClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/HttpClient.php) + +Line 81. + +*** + +### getBaseUrl + +#### Signature + +```php +public function getBaseUrl(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/HttpClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/HttpClient.php) + +Line 76. + +*** + +### getProjectId + +#### Signature + +```php +public function getProjectId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/HttpClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/HttpClient.php) + +Line 66. + +*** + +### getToken + +#### Signature + +```php +public function getToken(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/HttpClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/HttpClient.php) + +Line 71. + +*** + +### listAll + +Return a generator that follows `next` links automatically. + +Expects the API to return `{ "data": [...], "links": { "next": "..." } }` +or similar paginated envelope. Each yield is one page (array of items). + +#### Signature + +```php +public function listAll(string $path, array $params = array ( +)): Generator +``` + +#### Parameters + + + + + Initial query-string parameters. + + +#### Returns + +`Generator` + +#### Source + +[`SignalWire/REST/HttpClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/HttpClient.php) + +Line 147. + +*** + +### patch + +#### Signature + +```php +public function patch(string $path, array $data = array ( +)): array +``` + +#### Parameters + + + + + JSON body payload. + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/HttpClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/HttpClient.php) + +Line 121. + +*** + +### post + +#### Signature + +```php +public function post(string $path, array $data = array ( +)): array +``` + +#### Parameters + + + + + JSON body payload. + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/HttpClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/HttpClient.php) + +Line 103. + +*** + +### put + +#### Signature + +```php +public function put(string $path, array $data = array ( +)): array +``` + +#### Parameters + + + + + JSON body payload. + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/HttpClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/HttpClient.php) + +Line 112. + +## Source + +[`SignalWire/REST/HttpClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/HttpClient.php) + +Line 13. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/rest/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/rest/index.mdx new file mode 100644 index 0000000000..b9587de480 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/rest/rest/index.mdx @@ -0,0 +1,51 @@ +--- +slug: "/reference/php/signal-wire/rest/rest" +title: "REST" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "module" + language: "php" + qualified_name: "SignalWire\\REST" + module: "SignalWire.REST" +--- +# `REST` + +## Signature + +```php +namespace SignalWire\REST +``` + +## Classes + + + + Common base class for namespace and resource classes. + + + + Generic CRUD wrapper around an HttpClient and a base API path. + + + + CRUD resource that also supports listing addresses for an item. + + + + Low-level HTTP client for SignalWire REST APIs. + + + + Iterates items across paginated API responses. + + + + Top-level SignalWire REST client. + + + + Exception thrown when a SignalWire REST API request fails with a non-2xx status. + + diff --git a/fern/products/sdk-reference/php/signal-wire/rest/rest/paginated-iterator/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/rest/paginated-iterator/index.mdx new file mode 100644 index 0000000000..af8f40b380 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/rest/rest/paginated-iterator/index.mdx @@ -0,0 +1,307 @@ +--- +slug: "/reference/php/signal-wire/rest/rest/paginated-iterator" +title: "PaginatedIterator" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\PaginatedIterator" + parent: "SignalWire\\REST" + module: "SignalWire.REST" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/PaginatedIterator.php" +--- +# `PaginatedIterator` + +Iterates items across paginated API responses. + +Mirrors Python `signalwire.rest._pagination.PaginatedIterator`: walks +pages by following the `links.next` cursor and extracting query params +from the URL. + +Usage: +foreach (new PaginatedIterator($http, '/api/path', \['k' => 'v']) as $item) \{ +// ... +\} + +## Signature + +```php +class PaginatedIterator implements Iterator, Traversable +``` + +## Inheritance + +**Implements:** `Iterator`, `Traversable` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct( + SignalWire\REST\HttpClient $http, + string $path, + ?array $params = NULL, + string $dataKey = 'data' +) +``` + +#### Parameters + + + + + + + Initial query-string parameters. + + + + +#### Source + +[`SignalWire/REST/PaginatedIterator.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/PaginatedIterator.php) + +Line 35. + +*** + +### current + +#### Signature + +```php +public function current(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/PaginatedIterator.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/PaginatedIterator.php) + +Line 107. + +*** + +### getDataKey + +#### Signature + +```php +public function getDataKey(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/PaginatedIterator.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/PaginatedIterator.php) + +Line 63. + +*** + +### getHttp + +#### Signature + +```php +public function getHttp(): SignalWire\REST\HttpClient +``` + +#### Returns + +`SignalWire\REST\HttpClient` + +#### Source + +[`SignalWire/REST/PaginatedIterator.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/PaginatedIterator.php) + +Line 47. + +*** + +### getIndex + +#### Signature + +```php +public function getIndex(): int +``` + +#### Returns + +`int` + +#### Source + +[`SignalWire/REST/PaginatedIterator.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/PaginatedIterator.php) + +Line 73. + +*** + +### getItems + +#### Signature + +```php +public function getItems(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/PaginatedIterator.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/PaginatedIterator.php) + +Line 79. + +*** + +### getParams + +#### Signature + +```php +public function getParams(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/PaginatedIterator.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/PaginatedIterator.php) + +Line 58. + +*** + +### getPath + +#### Signature + +```php +public function getPath(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/PaginatedIterator.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/PaginatedIterator.php) + +Line 52. + +*** + +### isDone + +#### Signature + +```php +public function isDone(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/REST/PaginatedIterator.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/PaginatedIterator.php) + +Line 68. + +*** + +### key + +#### Signature + +```php +public function key(): int +``` + +#### Returns + +`int` + +#### Source + +[`SignalWire/REST/PaginatedIterator.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/PaginatedIterator.php) + +Line 112. + +*** + +### next + +#### Signature + +```php +public function next(): void +``` + +#### Source + +[`SignalWire/REST/PaginatedIterator.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/PaginatedIterator.php) + +Line 117. + +*** + +### rewind + +#### Signature + +```php +public function rewind(): void +``` + +#### Source + +[`SignalWire/REST/PaginatedIterator.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/PaginatedIterator.php) + +Line 88. + +*** + +### valid + +#### Signature + +```php +public function valid(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/REST/PaginatedIterator.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/PaginatedIterator.php) + +Line 93. + +## Source + +[`SignalWire/REST/PaginatedIterator.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/PaginatedIterator.php) + +Line 19. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/rest/rest-client/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/rest/rest-client/index.mdx new file mode 100644 index 0000000000..8fde5fddd8 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/rest/rest/rest-client/index.mdx @@ -0,0 +1,637 @@ +--- +slug: "/reference/php/signal-wire/rest/rest/rest-client" +title: "RestClient" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\RestClient" + parent: "SignalWire\\REST" + module: "SignalWire.REST" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php" +--- +# `RestClient` + +Top-level SignalWire REST client. + +Provides lazy access to every API namespace (fabric, calling, +phone\_numbers, datasphere, video, compat, etc.). Credentials can be +supplied explicitly or pulled from environment variables. + +## Signature + +```php +class RestClient +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct( + string $projectId = '', + string $token = '', + string $space = '', + ?string $caBundle = NULL +) +``` + +#### Parameters + + + Project ID (falls back to SIGNALWIRE\_PROJECT\_ID env var). + + + + API token (falls back to SIGNALWIRE\_API\_TOKEN env var). + + + + Space host or full base URL. - "mycompany.signalwire.com" → https://mycompany.signalwire.com - "https://example.com:8080" → used verbatim - "http://127.0.0.1:8080" → used verbatim (test fixtures) Falls back to SIGNALWIRE\_SPACE env var. + + + + +#### Source + +[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) + +Line 73. + +*** + +### addresses + +Addresses (list / create / get / delete — no update). + +#### Signature + +```php +public function addresses(): SignalWire\REST\Namespaces\Addresses +``` + +#### Returns + +`SignalWire\REST\Namespaces\Addresses` + +#### Source + +[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) + +Line 200. + +*** + +### calling + +Calling API (37 call-control commands). + +#### Signature + +```php +public function calling(): SignalWire\REST\Namespaces\Calling +``` + +#### Returns + +`SignalWire\REST\Namespaces\Calling` + +#### Source + +[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) + +Line 147. + +*** + +### chat + +Chat tokens. + +#### Signature + +```php +public function chat(): SignalWire\REST\CrudResource +``` + +#### Returns + +`SignalWire\REST\CrudResource` + +#### Source + +[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) + +Line 326. + +*** + +### compat + +Compatibility (Twilio-compatible LaML) API. + +Returns a `Compat` namespace object exposing the LAML sub-resources +(calls, messages, faxes, conferences, phoneNumbers, recordings, ...). + +#### Signature + +```php +public function compat(): SignalWire\REST\Namespaces\Compat +``` + +#### Returns + +`SignalWire\REST\Namespaces\Compat` + +#### Source + +[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) + +Line 191. + +*** + +### datasphere + +Datasphere documents (CRUD + chunks + search). + +#### Signature + +```php +public function datasphere(): SignalWire\REST\Namespaces\Datasphere +``` + +#### Returns + +`SignalWire\REST\Namespaces\Datasphere` + +#### Source + +[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) + +Line 165. + +*** + +### fabric + +Fabric API (sub-resources: subscribers, sip\_endpoints, call\_flows, ...). + +#### Signature + +```php +public function fabric(): SignalWire\REST\Namespaces\Fabric +``` + +#### Returns + +`SignalWire\REST\Namespaces\Fabric` + +#### Source + +[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) + +Line 138. + +*** + +### getBaseUrl + +#### Signature + +```php +public function getBaseUrl(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) + +Line 123. + +*** + +### getHttp + +#### Signature + +```php +public function getHttp(): SignalWire\REST\HttpClient +``` + +#### Returns + +`SignalWire\REST\HttpClient` + +#### Source + +[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) + +Line 128. + +*** + +### getProjectId + +#### Signature + +```php +public function getProjectId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) + +Line 108. + +*** + +### getSpace + +#### Signature + +```php +public function getSpace(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) + +Line 118. + +*** + +### getToken + +#### Signature + +```php +public function getToken(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) + +Line 113. + +*** + +### importedNumbers + +Imported phone numbers (create only). + +#### Signature + +```php +public function importedNumbers(): SignalWire\REST\Namespaces\ImportedNumbers +``` + +#### Returns + +`SignalWire\REST\Namespaces\ImportedNumbers` + +#### Source + +[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) + +Line 272. + +*** + +### logs + +Logs (messages, voice, fax, conferences). + +#### Signature + +```php +public function logs(): SignalWire\REST\Namespaces\Logs +``` + +#### Returns + +`SignalWire\REST\Namespaces\Logs` + +#### Source + +[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) + +Line 299. + +*** + +### lookup + +Phone number lookup. + +#### Signature + +```php +public function lookup(): SignalWire\REST\CrudResource +``` + +#### Returns + +`SignalWire\REST\CrudResource` + +#### Source + +[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) + +Line 254. + +*** + +### mfa + +Multi-factor authentication (sms / call / verify). + +#### Signature + +```php +public function mfa(): SignalWire\REST\Namespaces\Mfa +``` + +#### Returns + +`SignalWire\REST\Namespaces\Mfa` + +#### Source + +[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) + +Line 281. + +*** + +### numberGroups + +Number groups (CRUD + membership operations). + +#### Signature + +```php +public function numberGroups(): SignalWire\REST\Namespaces\NumberGroups +``` + +#### Returns + +`SignalWire\REST\Namespaces\NumberGroups` + +#### Source + +[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) + +Line 227. + +*** + +### phoneNumbers + +Phone numbers. + +#### Signature + +```php +public function phoneNumbers(): SignalWire\REST\CrudResource +``` + +#### Returns + +`SignalWire\REST\CrudResource` + +#### Source + +[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) + +Line 156. + +*** + +### project + +Project management (project tokens). + +#### Signature + +```php +public function project(): SignalWire\REST\Namespaces\Project +``` + +#### Returns + +`SignalWire\REST\Namespaces\Project` + +#### Source + +[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) + +Line 308. + +*** + +### pubsub + +PubSub tokens. + +#### Signature + +```php +public function pubsub(): SignalWire\REST\CrudResource +``` + +#### Returns + +`SignalWire\REST\CrudResource` + +#### Source + +[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) + +Line 317. + +*** + +### queues + +Queues (CRUD + member operations). + +#### Signature + +```php +public function queues(): SignalWire\REST\Namespaces\Queues +``` + +#### Returns + +`SignalWire\REST\Namespaces\Queues` + +#### Source + +[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) + +Line 209. + +*** + +### recordings + +Recordings (list / get / delete only). + +#### Signature + +```php +public function recordings(): SignalWire\REST\Namespaces\Recordings +``` + +#### Returns + +`SignalWire\REST\Namespaces\Recordings` + +#### Source + +[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) + +Line 218. + +*** + +### registry + +Registry (10DLC brands, campaigns, orders, numbers). + +#### Signature + +```php +public function registry(): SignalWire\REST\Namespaces\Registry +``` + +#### Returns + +`SignalWire\REST\Namespaces\Registry` + +#### Source + +[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) + +Line 290. + +*** + +### shortCodes + +Short codes (list / get / update only). + +#### Signature + +```php +public function shortCodes(): SignalWire\REST\Namespaces\ShortCodes +``` + +#### Returns + +`SignalWire\REST\Namespaces\ShortCodes` + +#### Source + +[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) + +Line 263. + +*** + +### sipProfile + +SIP profile (singleton, get + update). + +#### Signature + +```php +public function sipProfile(): SignalWire\REST\Namespaces\SipProfile +``` + +#### Returns + +`SignalWire\REST\Namespaces\SipProfile` + +#### Source + +[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) + +Line 245. + +*** + +### verifiedCallers + +Verified callers. + +#### Signature + +```php +public function verifiedCallers(): SignalWire\REST\CrudResource +``` + +#### Returns + +`SignalWire\REST\CrudResource` + +#### Source + +[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) + +Line 236. + +*** + +### video + +Video API namespace (rooms, room\_sessions, room\_recordings, + +conferences, conference\_tokens, streams). + +#### Signature + +```php +public function video(): SignalWire\REST\Namespaces\Video +``` + +#### Returns + +`SignalWire\REST\Namespaces\Video` + +#### Source + +[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) + +Line 177. + +## Source + +[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) + +Line 31. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/rest/signal-wire-rest-error/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/rest/signal-wire-rest-error/index.mdx new file mode 100644 index 0000000000..0690d16ba0 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/rest/rest/signal-wire-rest-error/index.mdx @@ -0,0 +1,123 @@ +--- +slug: "/reference/php/signal-wire/rest/rest/signal-wire-rest-error" +title: "SignalWireRestError" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\SignalWireRestError" + parent: "SignalWire\\REST" + module: "SignalWire.REST" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/SignalWireRestError.php" +--- +# `SignalWireRestError` + +Exception thrown when a SignalWire REST API request fails with a non-2xx status. + +## Signature + +```php +class SignalWireRestError extends RuntimeException implements Throwable, Stringable +``` + +## Inheritance + +**Extends:** `RuntimeException` + +**Implements:** `Throwable`, `Stringable` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct( + string $message, + int $statusCode = 0, + string $responseBody = '' +) +``` + +#### Parameters + + + + + + + +#### Source + +[`SignalWire/REST/SignalWireRestError.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/SignalWireRestError.php) + +Line 15. + +*** + +### \_\_toString + +#### Signature + +```php +public function __toString(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/SignalWireRestError.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/SignalWireRestError.php) + +Line 33. + +*** + +### getResponseBody + +#### Signature + +```php +public function getResponseBody(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/SignalWireRestError.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/SignalWireRestError.php) + +Line 28. + +*** + +### getStatusCode + +#### Signature + +```php +public function getStatusCode(): int +``` + +#### Returns + +`int` + +#### Source + +[`SignalWire/REST/SignalWireRestError.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/SignalWireRestError.php) + +Line 23. + +## Source + +[`SignalWire/REST/SignalWireRestError.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/SignalWireRestError.php) + +Line 10. diff --git a/fern/products/sdk-reference/php/signal-wire/security/security/index.mdx b/fern/products/sdk-reference/php/signal-wire/security/security/index.mdx new file mode 100644 index 0000000000..320d8bf481 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/security/security/index.mdx @@ -0,0 +1,33 @@ +--- +slug: "/reference/php/signal-wire/security/security" +title: "Security" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "module" + language: "php" + qualified_name: "SignalWire\\Security" + module: "SignalWire.Security" +--- +# `Security` + +## Signature + +```php +namespace SignalWire\Security +``` + +## Classes + + + + + + Middleware that validates SignalWire webhook signatures before forwarding + + + + Webhook signature validation for SignalWire-signed HTTP requests. + + diff --git a/fern/products/sdk-reference/php/signal-wire/security/security/session-manager/index.mdx b/fern/products/sdk-reference/php/signal-wire/security/security/session-manager/index.mdx new file mode 100644 index 0000000000..a5bb51bd2a --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/security/security/session-manager/index.mdx @@ -0,0 +1,249 @@ +--- +slug: "/reference/php/signal-wire/security/security/session-manager" +title: "SessionManager" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Security\\SessionManager" + parent: "SignalWire\\Security" + module: "SignalWire.Security" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Security/SessionManager.php" +--- +# `SessionManager` + +## Signature + +```php +class SessionManager +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(int $tokenExpirySecs = 3600) +``` + +#### Parameters + + + Token lifetime in seconds (default 3600). + + +#### Throws + +- `RuntimeException` — If secure random bytes cannot be generated. + +#### Source + +[`SignalWire/Security/SessionManager.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Security/SessionManager.php) + +Line 19. + +*** + +### createSession + +Create or confirm a session, returning the call ID. + +#### Signature + +```php +public function createSession(?string $callId = NULL): string +``` + +#### Parameters + + + An existing call ID, or null to generate one. + + +#### Returns + +`string` — The call ID for this session. + +#### Source + +[`SignalWire/Security/SessionManager.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Security/SessionManager.php) + +Line 41. + +*** + +### createToolToken + +Alias for generateToken(). + +#### Signature + +```php +public function createToolToken(string $functionName, string $callId): string +``` + +#### Parameters + + + The function name to bind into the token. + + + + The call ID to bind into the token. + + +#### Returns + +`string` — A base64url-encoded token. + +#### Source + +[`SignalWire/Security/SessionManager.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Security/SessionManager.php) + +Line 79. + +*** + +### generateToken + +Generate an HMAC-SHA256 signed token for a given function and call. + +#### Signature + +```php +public function generateToken(string $functionName, string $callId): string +``` + +#### Parameters + + + The function name to bind into the token. + + + + The call ID to bind into the token. + + +#### Returns + +`string` — A base64url-encoded token. + +#### Source + +[`SignalWire/Security/SessionManager.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Security/SessionManager.php) + +Line 58. + +*** + +### getTokenExpirySecs + +Get the configured token expiry duration in seconds. + +#### Signature + +```php +public function getTokenExpirySecs(): int +``` + +#### Returns + +`int` — Token lifetime in seconds. + +#### Source + +[`SignalWire/Security/SessionManager.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Security/SessionManager.php) + +Line 154. + +*** + +### validateToken + +Validate a token against the expected call ID and function name. + +All comparisons use timing-safe equality checks to prevent side-channel attacks. + +#### Signature + +```php +public function validateToken( + string $callId, + string $functionName, + string $token +): bool +``` + +#### Parameters + + + The expected call ID. + + + + The expected function name. + + + + The base64url-encoded token to validate. + + +#### Returns + +`bool` — True if the token is valid and not expired. + +#### Source + +[`SignalWire/Security/SessionManager.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Security/SessionManager.php) + +Line 95. + +*** + +### validateToolToken + +Alias for validateToken() with reordered parameters. + +#### Signature + +```php +public function validateToolToken( + string $functionName, + string $token, + string $callId +): bool +``` + +#### Parameters + + + The expected function name. + + + + The base64url-encoded token to validate. + + + + The expected call ID. + + +#### Returns + +`bool` — True if the token is valid and not expired. + +#### Source + +[`SignalWire/Security/SessionManager.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Security/SessionManager.php) + +Line 144. + +## Source + +[`SignalWire/Security/SessionManager.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Security/SessionManager.php) + +Line 9. diff --git a/fern/products/sdk-reference/php/signal-wire/security/security/webhook-middleware/index.mdx b/fern/products/sdk-reference/php/signal-wire/security/security/webhook-middleware/index.mdx new file mode 100644 index 0000000000..21c3faa910 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/security/security/webhook-middleware/index.mdx @@ -0,0 +1,130 @@ +--- +slug: "/reference/php/signal-wire/security/security/webhook-middleware" +title: "WebhookMiddleware" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Security\\WebhookMiddleware" + parent: "SignalWire\\Security" + module: "SignalWire.Security" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Security/WebhookMiddleware.php" +--- +# `WebhookMiddleware` + +Middleware that validates SignalWire webhook signatures before forwarding + +the request to the next handler. + +The signalwire-php SDK does not use PSR-15 — it has its own internal +(method, path, headers, body) -> \[status, headers, body] handler shape. +This middleware mirrors that shape and is the canonical way to add +signature validation to any handleRequest pipeline. + +Usage: + +``` +$mw = new WebhookMiddleware($signingKey); +[$status, $headers, $body] = $mw->process( + $method, $url, $headers, $rawBody, + function ($method, $url, $headers, $rawBody) use ($svc) { + return $svc->handleRequest($method, parse_url($url, PHP_URL_PATH), $headers, $rawBody); + }, +); +``` + +Behaviour: + +- Reads X-SignalWire-Signature (or X-Twilio-Signature alias). +- On valid signature: forwards to $next, returns its result unchanged. +- On invalid signature: returns 403 Forbidden, never calls $next. +- On missing header: returns 403 Forbidden, never calls $next. +- Never logs / echoes the signing key, signature, or expected digest. + +**Modifiers:** `final` + +## Signature + +```php +final class WebhookMiddleware +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(string $signingKey) +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Security/WebhookMiddleware.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Security/WebhookMiddleware.php) + +Line 40. + +*** + +### process + +Run the middleware. On valid signature delegates to $next; on + +invalid / missing signature returns 403 directly. + +#### Signature + +```php +public function process( + string $method, + string $url, + array $headers, + string $rawBody, + callable $next +): array +``` + +#### Parameters + + + HTTP method. + + + + Full reconstructed URL the platform POSTed to (scheme + host + optional port + path + query). Caller is responsible for honouring proxy headers / SWML\_PROXY\_URL\_BASE before passing it in. + + + + Request headers (mixed case keys allowed). + + + + Raw request body bytes. + + + + Downstream handler. Signature: function(string $method, string $url, array $headers, string $rawBody): array + + +#### Returns + +`array` — \[status, headers, body]. + +#### Source + +[`SignalWire/Security/WebhookMiddleware.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Security/WebhookMiddleware.php) + +Line 66. + +## Source + +[`SignalWire/Security/WebhookMiddleware.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Security/WebhookMiddleware.php) + +Line 35. diff --git a/fern/products/sdk-reference/php/signal-wire/security/security/webhook-validator/index.mdx b/fern/products/sdk-reference/php/signal-wire/security/security/webhook-validator/index.mdx new file mode 100644 index 0000000000..02cda0e5ee --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/security/security/webhook-validator/index.mdx @@ -0,0 +1,154 @@ +--- +slug: "/reference/php/signal-wire/security/security/webhook-validator" +title: "WebhookValidator" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Security\\WebhookValidator" + parent: "SignalWire\\Security" + module: "SignalWire.Security" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Security/WebhookValidator.php" +--- +# `WebhookValidator` + +Webhook signature validation for SignalWire-signed HTTP requests. + +Implements both schemes from porting-sdk/webhooks.md: + +- Scheme A (RELAY/SWML/JSON): hex(HMAC-SHA1(key, url + rawBody)) +- Scheme B (Compat/cXML form): base64(HMAC-SHA1(key, url + sortedFormParams)) + with optional bodySHA256 query-param fallback for JSON-on-compat-surface. + +Public API: + +``` +WebhookValidator::validateWebhookSignature($key, $sig, $url, $rawBody): bool +WebhookValidator::validateRequest($key, $sig, $url, $paramsOrRawBody): bool +``` + +All comparisons use hash\_equals() (constant-time) so the secret is not +leaked across repeated requests. + +**Modifiers:** `final` + +## Signature + +```php +final class WebhookValidator +``` + +## Methods + +### validateRequest + +Legacy @signalwire/compatibility-api drop-in entry point. + +If $paramsOrRawBody is a string, delegates to validateWebhookSignature +(Scheme A then Scheme B with parsed form). If it is an array, treats +it as pre-parsed form params and runs Scheme B directly (with URL +port normalisation). + +**Modifiers:** `static` + +#### Signature + +```php +public static function validateRequest( + string $signingKey, + string $signature, + string $url, + mixed $paramsOrRawBody +): bool +``` + +#### Parameters + + + Customer's Signing Key. + + + + Header value. Empty returns false. + + + + Full URL SignalWire POSTed to. + + + + Raw body string OR pre-parsed form params (associative or list-of- \[key, value] pairs). + + +#### Returns + +`bool` — True on match, false otherwise. + +#### Throws + +- `InvalidArgumentException` — When $signingKey is missing or the 4th argument has an invalid type. + +#### Source + +[`SignalWire/Security/WebhookValidator.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Security/WebhookValidator.php) + +Line 118. + +*** + +### validateWebhookSignature + +Validate a SignalWire webhook signature against both schemes. + +**Modifiers:** `static` + +#### Signature + +```php +public static function validateWebhookSignature( + string $signingKey, + string $signature, + string $url, + string $rawBody +): bool +``` + +#### Parameters + + + Customer's Signing Key from the Dashboard. UTF-8 string, secret. Empty string raises InvalidArgumentException — that is a programming error, not a validation failure. + + + + The X-SignalWire-Signature header value (or X-Twilio-Signature for cXML compat). Empty / missing returns false without raising. + + + + The full URL SignalWire POSTed to (scheme, host, optional port, path, query). Must match what the platform saw — see the URL-reconstruction section of porting-sdk/webhooks.md. + + + + The raw request body bytes as a UTF-8 string, BEFORE any JSON / form parsing. Type-hinted string so a parsed array passed by mistake yields a TypeError. + + +#### Returns + +`bool` — True if the signature matches either Scheme A (hex JSON) or Scheme B (base64 form, with port-normalisation variants and optional bodySHA256 fallback). False otherwise. + +#### Throws + +- `InvalidArgumentException` — When $signingKey is missing. + +#### Source + +[`SignalWire/Security/WebhookValidator.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Security/WebhookValidator.php) + +Line 51. + +## Source + +[`SignalWire/Security/WebhookValidator.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Security/WebhookValidator.php) + +Line 26. diff --git a/fern/products/sdk-reference/php/signal-wire/server/server/agent-server/index.mdx b/fern/products/sdk-reference/php/signal-wire/server/server/agent-server/index.mdx new file mode 100644 index 0000000000..89aa3650f4 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/server/server/agent-server/index.mdx @@ -0,0 +1,477 @@ +--- +slug: "/reference/php/signal-wire/server/server/agent-server" +title: "AgentServer" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Server\\AgentServer" + parent: "SignalWire\\Server" + module: "SignalWire.Server" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php" +--- +# `AgentServer` + +## Signature + +```php +class AgentServer +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct( + ?string $host = NULL, + ?int $port = NULL, + string $logLevel = 'info' +) +``` + +#### Parameters + + + + + + + +#### Source + +[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) + +Line 59. + +*** + +### getAgent + +Get an agent by route. + +#### Signature + +```php +public function getAgent(string $route): ?SignalWire\Agent\AgentBase +``` + +#### Parameters + + + +#### Returns + +`?SignalWire\Agent\AgentBase` + +#### Source + +[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) + +Line 119. + +*** + +### getAgents + +Get all registered routes (sorted). + +#### Signature + +```php +public function getAgents(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) + +Line 109. + +*** + +### getHost + +#### Signature + +```php +public function getHost(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) + +Line 424. + +*** + +### getPort + +#### Signature + +```php +public function getPort(): int +``` + +#### Returns + +`int` + +#### Source + +[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) + +Line 429. + +*** + +### getSipAutoMap + +#### Signature + +```php +public function getSipAutoMap(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) + +Line 178. + +*** + +### getSipRoute + +#### Signature + +```php +public function getSipRoute(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) + +Line 173. + +*** + +### getSipUsernameMapping + +Get the SIP username mapping. + +#### Signature + +```php +public function getSipUsernameMapping(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) + +Line 206. + +*** + +### handleRequest + +Handle an HTTP request and return \[status, headers, body]. + +#### Signature + +```php +public function handleRequest( + string $method, + string $path, + array $headers = array ( +), + ?string $body = NULL +): array +``` + +#### Parameters + + + + + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) + +Line 242. + +*** + +### isSipRoutingEnabled + +Check if SIP routing is enabled. + +#### Signature + +```php +public function isSipRoutingEnabled(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) + +Line 196. + +*** + +### register + +Register an agent at a route. + +#### Signature + +```php +public function register( + SignalWire\Agent\AgentBase $agent, + ?string $route = NULL +): SignalWire\Server\AgentServer +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire\Server\AgentServer` + +#### Throws + +- `\RuntimeException` — If the route is already registered. + +#### Source + +[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) + +Line 79. + +*** + +### registerSipUsername + +Map a SIP username to a route. + +#### Signature + +```php +public function registerSipUsername( + string $username, + string $route +): SignalWire\Server\AgentServer +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire\Server\AgentServer` + +#### Source + +[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) + +Line 186. + +*** + +### run + +Start the server (blocking). + +#### Signature + +```php +public function run(): void +``` + +#### Source + +[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) + +Line 296. + +*** + +### serve + +Start the server (blocking). + +Mirrors Python's AgentServer SSL handling: when `SWML_SSL_ENABLED` is +truthy and `SWML_SSL_CERT_PATH` / `SWML_SSL_KEY_PATH` point at a +readable cert + key, the server is served over verified HTTPS via a +Workerman SSL worker. Otherwise it falls back to PHP's built-in +(plaintext HTTP) server. + +#### Signature + +```php +public function serve(): void +``` + +#### Source + +[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) + +Line 310. + +*** + +### serveStatic + +Serve static files from a directory under a URL prefix. + +#### Signature + +```php +public function serveStatic( + string $directory, + string $urlPrefix +): SignalWire\Server\AgentServer +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire\Server\AgentServer` + +#### Throws + +- `\RuntimeException` — If the directory does not exist. + +#### Source + +[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) + +Line 220. + +*** + +### setupSipRouting + +Set up central SIP-based routing for the server. + +Mirrors Python's AgentServer.setup\_sip\_routing(route, auto\_map). When +called with no args, defaults match Python: route="/sip", auto\_map=true. + +#### Signature + +```php +public function setupSipRouting( + string $route = '/sip', + bool $auto_map = true +): SignalWire\Server\AgentServer +``` + +#### Parameters + + + Path for SIP routing (default "/sip"). Leading slash is added if missing; trailing slash is stripped. + + + + If true, existing agents have their SIP usernames auto-derived from their route. + + +#### Returns + +`SignalWire\Server\AgentServer` + +#### Source + +[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) + +Line 141. + +*** + +### unregister + +Unregister an agent from a route. + +#### Signature + +```php +public function unregister(string $route): SignalWire\Server\AgentServer +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Server\AgentServer` + +#### Source + +[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) + +Line 96. + +## Source + +[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) + +Line 10. diff --git a/fern/products/sdk-reference/php/signal-wire/server/server/index.mdx b/fern/products/sdk-reference/php/signal-wire/server/server/index.mdx new file mode 100644 index 0000000000..ab205999ce --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/server/server/index.mdx @@ -0,0 +1,25 @@ +--- +slug: "/reference/php/signal-wire/server/server" +title: "Server" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "module" + language: "php" + qualified_name: "SignalWire\\Server" + module: "SignalWire.Server" +--- +# `Server` + +## Signature + +```php +namespace SignalWire\Server +``` + +## Classes + + + + diff --git a/fern/products/sdk-reference/php/signal-wire/serverless/serverless/adapter/index.mdx b/fern/products/sdk-reference/php/signal-wire/serverless/serverless/adapter/index.mdx new file mode 100644 index 0000000000..6938e5a13e --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/serverless/serverless/adapter/index.mdx @@ -0,0 +1,259 @@ +--- +slug: "/reference/php/signal-wire/serverless/serverless/adapter" +title: "Adapter" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Serverless\\Adapter" + parent: "SignalWire\\Serverless" + module: "SignalWire.Serverless" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Serverless/Adapter.php" +--- +# `Adapter` + +Auto-detect and handle serverless environments (Lambda, GCF, Azure, CGI) + +or fall back to the built-in PHP server. + +## Signature + +```php +class Adapter +``` + +## Methods + +### detect + +Detect the current runtime environment. + +**Modifiers:** `static` + +#### Signature + +```php +public static function detect(): string +``` + +#### Returns + +`string` — One of 'lambda', 'gcf', 'azure', 'cgi', or 'server'. For a typed result, see \{@see detectMode()\}. + +#### Source + +[`SignalWire/Serverless/Adapter.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Serverless/Adapter.php) + +Line 19. + +*** + +### detectMode + +Detect the current runtime environment as a typed \{@see ExecutionMode\}. + +The typed counterpart to \{@see detect()\}: same detection logic and +precedence, but returns the enum (autocompletion, exhaustive `match`, +`->isServerless()`) instead of a bare string. `detectMode()->value` +equals `detect()`. + +**Modifiers:** `static` + +#### Signature + +```php +public static function detectMode(): SignalWire\Serverless\ExecutionMode +``` + +#### Returns + +`SignalWire\Serverless\ExecutionMode` + +#### Source + +[`SignalWire/Serverless/Adapter.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Serverless/Adapter.php) + +Line 32. + +*** + +### handleAzure + +Handle an Azure Functions invocation. + +Extracts method, path, headers, and body from the Azure request +array, calls agent->handleRequest(), and returns an Azure-compatible +response array. + +**Modifiers:** `static` + +#### Signature + +```php +public static function handleAzure(object $agent, array $request): array +``` + +#### Parameters + + + An AgentBase or Service instance with handleRequest(). + + + + The Azure Functions HTTP request array. + + +#### Returns + +`array` — Azure response format \{status, headers, body\}. + +#### Source + +[`SignalWire/Serverless/Adapter.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Serverless/Adapter.php) + +Line 141. + +*** + +### handleCgi + +Handle a CGI/FastCGI invocation. + +Reads REQUEST\_METHOD, PATH\_INFO, CONTENT\_TYPE from $_SERVER, +reads body from php://input, parses headers from HTTP_\* env vars, +and outputs the status line, headers, and body to stdout. + +**Modifiers:** `static` + +#### Signature + +```php +public static function handleCgi(object $agent): void +``` + +#### Parameters + + + An AgentBase or Service instance with handleRequest(). + + +#### Source + +[`SignalWire/Serverless/Adapter.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Serverless/Adapter.php) + +Line 171. + +*** + +### handleGcf + +Handle a Google Cloud Function invocation. + +Reads from php://input and $\_SERVER, calls agent->handleRequest(), +then outputs headers and body directly to the response stream. + +**Modifiers:** `static` + +#### Signature + +```php +public static function handleGcf(object $agent): void +``` + +#### Parameters + + + An AgentBase or Service instance with handleRequest(). + + +#### Source + +[`SignalWire/Serverless/Adapter.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Serverless/Adapter.php) + +Line 103. + +*** + +### handleLambda + +Handle an AWS Lambda (API Gateway) invocation. + +Extracts method, path, headers, and body from the API Gateway event +format, calls agent->handleRequest(), and returns an API Gateway +compatible response. + +**Modifiers:** `static` + +#### Signature + +```php +public static function handleLambda(object $agent, array $event, object $context): array +``` + +#### Parameters + + + An AgentBase or Service instance with handleRequest(). + + + + The API Gateway event payload. + + + + The Lambda context object. + + +#### Returns + +`array` — API Gateway response format \{statusCode, headers, body\}. + +#### Source + +[`SignalWire/Serverless/Adapter.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Serverless/Adapter.php) + +Line 65. + +*** + +### serve + +Auto-detect the runtime environment and serve the agent. + +For serverless environments, calls the appropriate handler. +For 'server', calls agent->run(). + +**Modifiers:** `static` + +#### Signature + +```php +public static function serve( + object $agent, + SignalWire\Serverless\ExecutionMode|string|null $mode = NULL +): void +``` + +#### Parameters + + + An AgentBase or Service instance. + + + + Optional explicit mode override. Pass an \{@see ExecutionMode\} (typed) or its backing string ('lambda'/'gcf'/'azure'/'cgi'/'server', for parity) to pin the dispatch instead of auto-detecting via \{@see detectMode()\}. An out-of-set string raises \ValueError. Defaults to null (auto-detect), preserving the original single-argument behaviour. + + +#### Source + +[`SignalWire/Serverless/Adapter.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Serverless/Adapter.php) + +Line 221. + +## Source + +[`SignalWire/Serverless/Adapter.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Serverless/Adapter.php) + +Line 11. diff --git a/fern/products/sdk-reference/php/signal-wire/serverless/serverless/index.mdx b/fern/products/sdk-reference/php/signal-wire/serverless/serverless/index.mdx new file mode 100644 index 0000000000..c74893b7cf --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/serverless/serverless/index.mdx @@ -0,0 +1,247 @@ +--- +slug: "/reference/php/signal-wire/serverless/serverless" +title: "Serverless" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "module" + language: "php" + qualified_name: "SignalWire\\Serverless" + module: "SignalWire.Serverless" +--- +# `Serverless` + +## Signature + +```php +namespace SignalWire\Serverless +``` + +## Classes + + + + Auto-detect and handle serverless environments (Lambda, GCF, Azure, CGI) + + + +## Enums + +### ExecutionMode + +The runtime environment \{@see Adapter\} detects, as a typed, backed enum. + +The five members are exactly the modes \{@see Adapter::detect()\} can return +(`lambda`, `gcf`, `azure`, `cgi`, `server`). The backing string of each case +IS that wire/dispatch token, so the enum and the legacy bare string are +interchangeable: + +``` +Adapter::detect(); // 'lambda' (string, parity) +Adapter::detectMode(); // ExecutionMode::Lambda (typed) +Adapter::detectMode()->value; // 'lambda' (round-trips) +ExecutionMode::from(Adapter::detect()); // ExecutionMode::Lambda +``` + +\{@see Adapter::serve()\} accepts an explicit `ExecutionMode|string|null` +override alongside auto-detection, so callers may pin the mode in a typed, +typo-checked way while the bare string still works for parity with the +stringly-typed original. + +This closed set is knowable from `Adapter::detect()`'s own implementation, so +per the idiom philosophy (knowable → type it) it is modelled as a native enum +_alongside_ the string rather than left as a magic-string literal. It is a PHP +PORT\_ADDITION — the Python reference has no equivalent (its serverless +handling lives in the broader `cli.simulation.mock_env` machinery). + +NOTE: this is the \{@see Adapter\} platform-detection vocabulary ONLY. It is +deliberately NOT unified with \{@see \SignalWire\Logging\LoggingConfig\}'s +execution-mode set (`cgi`/`lambda`/`google_cloud_function`/`azure_function`/ +`server`), which mirrors Python's `get_execution_mode` and uses different, +longer tokens. The two vocabularies must not be merged. + +#### Signature + +```php +final enum ExecutionMode implements UnitEnum, BackedEnum +``` + +#### Inheritance + +**Implements:** `UnitEnum`, `BackedEnum` + +#### Properties + + + + + +#### Constants + + + Azure Functions. + + + + CGI / FastCGI. + + + + Google Cloud Functions / Cloud Run. + + + + AWS Lambda (API Gateway / Lambda Function URL). + + + + The built-in PHP server (the default, non-serverless mode). + + +#### Variants + + + Azure Functions. + + + + CGI / FastCGI. + + + + Google Cloud Functions / Cloud Run. + + + + AWS Lambda (API Gateway / Lambda Function URL). + + + + The built-in PHP server (the default, non-serverless mode). + + +#### Methods + +##### cases + +**Modifiers:** `static` + +###### Signature + +```php +public static function cases(): array +``` + +###### Returns + +`array` + +*** + +##### coerce + +Coerce a mode given as either this enum or its backing string into the + +enum, validating the string against the closed set. + +Accepting `ExecutionMode|string` lets the public API take the typed enum +for safety while preserving the bare-string call style for parity. + +**Modifiers:** `static` + +###### Signature + +```php +public static function coerce( + SignalWire\Serverless\ExecutionMode|string $mode +): SignalWire\Serverless\ExecutionMode +``` + +###### Parameters + + + +###### Returns + +`SignalWire\Serverless\ExecutionMode` + +###### Throws + +- `\ValueError` — if $mode is a string outside the closed set. + +###### Source + +[`SignalWire/Serverless/ExecutionMode.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Serverless/ExecutionMode.php) + +Line 72. + +*** + +##### from + +**Modifiers:** `static` + +###### Signature + +```php +public static function from(string|int $value): static +``` + +###### Parameters + + + +###### Returns + +`static` + +*** + +##### isServerless + +True for every serverless invocation mode — anything other than the + +built-in \{@see ExecutionMode::Server\}. + +###### Signature + +```php +public function isServerless(): bool +``` + +###### Returns + +`bool` + +###### Source + +[`SignalWire/Serverless/ExecutionMode.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Serverless/ExecutionMode.php) + +Line 58. + +*** + +##### tryFrom + +**Modifiers:** `static` + +###### Signature + +```php +public static function tryFrom(string|int $value): ?static +``` + +###### Parameters + + + +###### Returns + +`?static` + +#### Source + +[`SignalWire/Serverless/ExecutionMode.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Serverless/ExecutionMode.php) + +Line 37. diff --git a/fern/products/sdk-reference/php/signal-wire/signal-wire/index.mdx b/fern/products/sdk-reference/php/signal-wire/signal-wire/index.mdx new file mode 100644 index 0000000000..6b7a037d1f --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/signal-wire/index.mdx @@ -0,0 +1,207 @@ +--- +slug: "/reference/php/signal-wire/signal-wire" +title: "SignalWire" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire" + module: "SignalWire" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SignalWire.php" +--- +# `SignalWire` + +**Modifiers:** `final` + +## Signature + +```php +final class SignalWire +``` + +## Constants + + + +## Methods + +### add\_skill\_directory + +Add a directory to search for skills. + +Mirrors Python's `signalwire.add_skill_directory(path)`. Delegates +to the singleton \{@see SkillRegistry\} instance. + +**Modifiers:** `static` + +#### Signature + +```php +public static function add_skill_directory(string $path): void +``` + +#### Parameters + + + +#### Throws + +- `\InvalidArgumentException` — when the path doesn't exist or isn't a directory. + +#### Source + +[`SignalWire/SignalWire.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SignalWire.php) + +Line 103. + +*** + +### getLogger + +Get a logger instance. + +**Modifiers:** `static` + +#### Signature + +```php +public static function getLogger(string $name = 'signalwire'): SignalWire\Logging\Logger +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Logging\Logger` + +#### Source + +[`SignalWire/SignalWire.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SignalWire.php) + +Line 19. + +*** + +### list\_skills\_with\_params + +Get complete schema for all available skills. + +Mirrors Python's `signalwire.list_skills_with_params()`. Returns +an associative array keyed by skill name with metadata + parameter +schema. Useful for GUI configuration tools, API documentation, or +programmatic skill discovery. + +**Modifiers:** `static` + +#### Signature + +```php +public static function list_skills_with_params(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/SignalWire.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SignalWire.php) + +Line 118. + +*** + +### register\_skill + +Register a custom skill class with the global skill registry. + +Mirrors Python's `signalwire.register_skill(skill_class)`. +Delegates to the singleton \{@see SkillRegistry\} instance. + +**Modifiers:** `static` + +#### Signature + +```php +public static function register_skill(string $skillClass): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/SignalWire.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SignalWire.php) + +Line 70. + +*** + +### RestClient + +Construct a REST client. + +Mirrors Python's top-level `signalwire.RestClient(*args, **kwargs)` +factory — a thin wrapper that lazy-imports +`signalwire.rest.RestClient` and instantiates it. + +The signature accepts two parallel parameters that mirror Python's +variadic shape (`*args` -> `$args` array, `**kwargs` -> +`$kwargs` associative array). Either positional credentials in +`$args` or keyword credentials in `$kwargs` (or both) work. +The cross-language audit recognises `list<*>` ↔ var\_positional +and `dict` ↔ var\_keyword via type-driven leniency. + +**Modifiers:** `static` + +#### Signature + +```php +public static function RestClient( + array $args = array ( +), + array $kwargs = array ( +) +): SignalWire\REST\RestClient +``` + +#### Parameters + + + Positional credentials (project, token, space) + + + + Keyword credentials + + +#### Returns + +`SignalWire\REST\RestClient` + +#### Source + +[`SignalWire/SignalWire.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SignalWire.php) + +Line 42. + +## Source + +[`SignalWire/SignalWire.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SignalWire.php) + +Line 12. diff --git a/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/api-ninjas-trivia/index.mdx b/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/api-ninjas-trivia/index.mdx new file mode 100644 index 0000000000..d523a8b9c2 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/api-ninjas-trivia/index.mdx @@ -0,0 +1,331 @@ +--- +slug: "/reference/php/signal-wire/skills/builtin/builtin/api-ninjas-trivia" +title: "ApiNinjasTrivia" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Skills\\Builtin\\ApiNinjasTrivia" + parent: "SignalWire\\Skills\\Builtin" + module: "SignalWire.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/ApiNinjasTrivia.php" +--- +# `ApiNinjasTrivia` + +## Signature + +```php +class ApiNinjasTrivia extends SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire\Skills\SkillBase](/docs/sdk-reference/reference/php/signal-wire/skills/skills/skill-base) + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(object $agent, array $params = array ( +)) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 13. + +*** + +### cleanup + +#### Signature + +```php +public function cleanup(): void +``` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 62. + +*** + +### getDescription + +#### Signature + +```php +public function getDescription(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/ApiNinjasTrivia.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/ApiNinjasTrivia.php) + +Line 34. + +*** + +### getGlobalData + +#### Signature + +```php +public function getGlobalData(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 48. + +*** + +### getHints + +#### Signature + +```php +public function getHints(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 43. + +*** + +### getInstanceKey + +#### Signature + +```php +public function getInstanceKey(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 89. + +*** + +### getName + +#### Signature + +```php +public function getName(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/ApiNinjasTrivia.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/ApiNinjasTrivia.php) + +Line 29. + +*** + +### getParameterSchema + +#### Signature + +```php +public function getParameterSchema(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 66. + +*** + +### getPromptSections + +#### Signature + +```php +public function getPromptSections(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 53. + +*** + +### getRequiredEnvVars + +#### Signature + +```php +public function getRequiredEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 33. + +*** + +### getVersion + +#### Signature + +```php +public function getVersion(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 28. + +*** + +### registerTools + +#### Signature + +```php +public function registerTools(): void +``` + +#### Source + +[`SignalWire/Skills/Builtin/ApiNinjasTrivia.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/ApiNinjasTrivia.php) + +Line 53. + +*** + +### setup + +#### Signature + +```php +public function setup(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/Builtin/ApiNinjasTrivia.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/ApiNinjasTrivia.php) + +Line 44. + +*** + +### supportsMultipleInstances + +#### Signature + +```php +public function supportsMultipleInstances(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/Builtin/ApiNinjasTrivia.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/ApiNinjasTrivia.php) + +Line 39. + +*** + +### validateEnvVars + +#### Signature + +```php +public function validateEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 100. + +## Source + +[`SignalWire/Skills/Builtin/ApiNinjasTrivia.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/ApiNinjasTrivia.php) + +Line 10. diff --git a/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/claude-skills/index.mdx b/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/claude-skills/index.mdx new file mode 100644 index 0000000000..314c4702b8 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/claude-skills/index.mdx @@ -0,0 +1,365 @@ +--- +slug: "/reference/php/signal-wire/skills/builtin/builtin/claude-skills" +title: "ClaudeSkills" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Skills\\Builtin\\ClaudeSkills" + parent: "SignalWire\\Skills\\Builtin" + module: "SignalWire.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/ClaudeSkills.php" +--- +# `ClaudeSkills` + +Claude Skills loader. + +Mirrors signalwire-python's +`signalwire.skills.claude_skills.skill.ClaudeSkillsSkill`: + +- Walks `skills_path` for `/SKILL.md` files. +- Parses YAML frontmatter (name, description, argument-hint, + disable-model-invocation, user-invocable). +- Discovers companion `*.md` files inside each skill dir as + selectable sections. +- Registers one SWAIG tool per loadable skill with a `(arguments, + section)` parameter pair, where `section` enums over the + discovered companion docs. +- When invoked, returns the SKILL.md body (or the requested + section), with `$ARGUMENTS`, `$ARGUMENTS[N]`, `$N`, + `${CLAUDE_SKILL_DIR}` and `${CLAUDE_SESSION_ID}` substituted. + +Two deliberate omissions vs Python (each documented in +PORT\_OMISSIONS.md): + +- `allow_shell_injection`: Python preprocesses `!`cmd\`\` patterns + by shelling out. PHP prefers not to ship a hot path that + subprocess() any user-controlled string by default — Python + itself defaults this off too. The flag is accepted but the + processor is a no-op (the pattern is left in place); set + `allow_shell_injection=false` (the default) and the behavior + matches Python. +- YAML frontmatter parser: PHP has no first-class YAML in + core. Implemented a small tolerant subset that handles the + forms Claude Code itself emits (string scalars, bool, list of + strings on continuation lines). Skill files using deeply + nested YAML constructs aren't supported and will hit a + graceful "frontmatter parse failed" warning at load. + +## Signature + +```php +class ClaudeSkills extends SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire\Skills\SkillBase](/docs/sdk-reference/reference/php/signal-wire/skills/skills/skill-base) + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(object $agent, array $params = array ( +)) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 13. + +*** + +### cleanup + +#### Signature + +```php +public function cleanup(): void +``` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 62. + +*** + +### getDescription + +#### Signature + +```php +public function getDescription(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/ClaudeSkills.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/ClaudeSkills.php) + +Line 64. + +*** + +### getGlobalData + +#### Signature + +```php +public function getGlobalData(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 48. + +*** + +### getHints + +#### Signature + +```php +public function getHints(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/Builtin/ClaudeSkills.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/ClaudeSkills.php) + +Line 502. + +*** + +### getInstanceKey + +#### Signature + +```php +public function getInstanceKey(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 89. + +*** + +### getName + +#### Signature + +```php +public function getName(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/ClaudeSkills.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/ClaudeSkills.php) + +Line 59. + +*** + +### getParameterSchema + +#### Signature + +```php +public function getParameterSchema(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 66. + +*** + +### getPromptSections + +#### Signature + +```php +public function getPromptSections(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/Builtin/ClaudeSkills.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/ClaudeSkills.php) + +Line 520. + +*** + +### getRequiredEnvVars + +#### Signature + +```php +public function getRequiredEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 33. + +*** + +### getVersion + +#### Signature + +```php +public function getVersion(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 28. + +*** + +### registerTools + +#### Signature + +```php +public function registerTools(): void +``` + +#### Source + +[`SignalWire/Skills/Builtin/ClaudeSkills.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/ClaudeSkills.php) + +Line 108. + +*** + +### setup + +#### Signature + +```php +public function setup(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/Builtin/ClaudeSkills.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/ClaudeSkills.php) + +Line 74. + +*** + +### supportsMultipleInstances + +#### Signature + +```php +public function supportsMultipleInstances(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/Builtin/ClaudeSkills.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/ClaudeSkills.php) + +Line 69. + +*** + +### validateEnvVars + +#### Signature + +```php +public function validateEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 100. + +## Source + +[`SignalWire/Skills/Builtin/ClaudeSkills.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/ClaudeSkills.php) + +Line 45. diff --git a/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/custom-skills/index.mdx b/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/custom-skills/index.mdx new file mode 100644 index 0000000000..8f1d9c488c --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/custom-skills/index.mdx @@ -0,0 +1,331 @@ +--- +slug: "/reference/php/signal-wire/skills/builtin/builtin/custom-skills" +title: "CustomSkills" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Skills\\Builtin\\CustomSkills" + parent: "SignalWire\\Skills\\Builtin" + module: "SignalWire.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/CustomSkills.php" +--- +# `CustomSkills` + +## Signature + +```php +class CustomSkills extends SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire\Skills\SkillBase](/docs/sdk-reference/reference/php/signal-wire/skills/skills/skill-base) + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(object $agent, array $params = array ( +)) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 13. + +*** + +### cleanup + +#### Signature + +```php +public function cleanup(): void +``` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 62. + +*** + +### getDescription + +#### Signature + +```php +public function getDescription(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/CustomSkills.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/CustomSkills.php) + +Line 17. + +*** + +### getGlobalData + +#### Signature + +```php +public function getGlobalData(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 48. + +*** + +### getHints + +#### Signature + +```php +public function getHints(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 43. + +*** + +### getInstanceKey + +#### Signature + +```php +public function getInstanceKey(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 89. + +*** + +### getName + +#### Signature + +```php +public function getName(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/CustomSkills.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/CustomSkills.php) + +Line 12. + +*** + +### getParameterSchema + +#### Signature + +```php +public function getParameterSchema(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 66. + +*** + +### getPromptSections + +#### Signature + +```php +public function getPromptSections(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 53. + +*** + +### getRequiredEnvVars + +#### Signature + +```php +public function getRequiredEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 33. + +*** + +### getVersion + +#### Signature + +```php +public function getVersion(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 28. + +*** + +### registerTools + +#### Signature + +```php +public function registerTools(): void +``` + +#### Source + +[`SignalWire/Skills/Builtin/CustomSkills.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/CustomSkills.php) + +Line 32. + +*** + +### setup + +#### Signature + +```php +public function setup(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/Builtin/CustomSkills.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/CustomSkills.php) + +Line 27. + +*** + +### supportsMultipleInstances + +#### Signature + +```php +public function supportsMultipleInstances(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/Builtin/CustomSkills.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/CustomSkills.php) + +Line 22. + +*** + +### validateEnvVars + +#### Signature + +```php +public function validateEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 100. + +## Source + +[`SignalWire/Skills/Builtin/CustomSkills.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/CustomSkills.php) + +Line 10. diff --git a/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/datasphere-serverless/index.mdx b/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/datasphere-serverless/index.mdx new file mode 100644 index 0000000000..8d563dda4d --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/datasphere-serverless/index.mdx @@ -0,0 +1,331 @@ +--- +slug: "/reference/php/signal-wire/skills/builtin/builtin/datasphere-serverless" +title: "DatasphereServerless" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Skills\\Builtin\\DatasphereServerless" + parent: "SignalWire\\Skills\\Builtin" + module: "SignalWire.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/DatasphereServerless.php" +--- +# `DatasphereServerless` + +## Signature + +```php +class DatasphereServerless extends SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire\Skills\SkillBase](/docs/sdk-reference/reference/php/signal-wire/skills/skills/skill-base) + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(object $agent, array $params = array ( +)) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 13. + +*** + +### cleanup + +#### Signature + +```php +public function cleanup(): void +``` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 62. + +*** + +### getDescription + +#### Signature + +```php +public function getDescription(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/DatasphereServerless.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/DatasphereServerless.php) + +Line 17. + +*** + +### getGlobalData + +#### Signature + +```php +public function getGlobalData(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/Builtin/DatasphereServerless.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/DatasphereServerless.php) + +Line 116. + +*** + +### getHints + +#### Signature + +```php +public function getHints(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 43. + +*** + +### getInstanceKey + +#### Signature + +```php +public function getInstanceKey(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 89. + +*** + +### getName + +#### Signature + +```php +public function getName(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/DatasphereServerless.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/DatasphereServerless.php) + +Line 12. + +*** + +### getParameterSchema + +#### Signature + +```php +public function getParameterSchema(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 66. + +*** + +### getPromptSections + +#### Signature + +```php +public function getPromptSections(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/Builtin/DatasphereServerless.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/DatasphereServerless.php) + +Line 125. + +*** + +### getRequiredEnvVars + +#### Signature + +```php +public function getRequiredEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 33. + +*** + +### getVersion + +#### Signature + +```php +public function getVersion(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 28. + +*** + +### registerTools + +#### Signature + +```php +public function registerTools(): void +``` + +#### Source + +[`SignalWire/Skills/Builtin/DatasphereServerless.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/DatasphereServerless.php) + +Line 40. + +*** + +### setup + +#### Signature + +```php +public function setup(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/Builtin/DatasphereServerless.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/DatasphereServerless.php) + +Line 27. + +*** + +### supportsMultipleInstances + +#### Signature + +```php +public function supportsMultipleInstances(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/Builtin/DatasphereServerless.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/DatasphereServerless.php) + +Line 22. + +*** + +### validateEnvVars + +#### Signature + +```php +public function validateEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 100. + +## Source + +[`SignalWire/Skills/Builtin/DatasphereServerless.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/DatasphereServerless.php) + +Line 10. diff --git a/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/datasphere/index.mdx b/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/datasphere/index.mdx new file mode 100644 index 0000000000..eaf245bf47 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/datasphere/index.mdx @@ -0,0 +1,346 @@ +--- +slug: "/reference/php/signal-wire/skills/builtin/builtin/datasphere" +title: "Datasphere" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Skills\\Builtin\\Datasphere" + parent: "SignalWire\\Skills\\Builtin" + module: "SignalWire.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Datasphere.php" +--- +# `Datasphere` + +SignalWire DataSphere knowledge-search skill. + +Mirrors signalwire-python's +`signalwire.skills.datasphere.skill.DataSphereSkill._search_knowledge_handler`: + +POST https://\{space\_name\}.signalwire.com/api/datasphere/documents/search +Auth: Basic project\_id:token +Body: \{ document\_id, query\_string, distance, count, \[tags, language, ...] \} + +The response carries `chunks: [{text, score, ...}]` (NOT `results`). +The handler stringifies the chunks the same way the Python skill does. + +Upstream URL override: `DATASPHERE_BASE_URL` for the audit fixture. +The path `/api/datasphere/documents/search` is preserved. + +## Signature + +```php +class Datasphere extends SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire\Skills\SkillBase](/docs/sdk-reference/reference/php/signal-wire/skills/skills/skill-base) + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(object $agent, array $params = array ( +)) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 13. + +*** + +### cleanup + +#### Signature + +```php +public function cleanup(): void +``` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 62. + +*** + +### getDescription + +#### Signature + +```php +public function getDescription(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/Datasphere.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Datasphere.php) + +Line 37. + +*** + +### getGlobalData + +#### Signature + +```php +public function getGlobalData(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/Builtin/Datasphere.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Datasphere.php) + +Line 202. + +*** + +### getHints + +#### Signature + +```php +public function getHints(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 43. + +*** + +### getInstanceKey + +#### Signature + +```php +public function getInstanceKey(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 89. + +*** + +### getName + +#### Signature + +```php +public function getName(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/Datasphere.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Datasphere.php) + +Line 32. + +*** + +### getParameterSchema + +#### Signature + +```php +public function getParameterSchema(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 66. + +*** + +### getPromptSections + +#### Signature + +```php +public function getPromptSections(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/Builtin/Datasphere.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Datasphere.php) + +Line 211. + +*** + +### getRequiredEnvVars + +#### Signature + +```php +public function getRequiredEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 33. + +*** + +### getVersion + +#### Signature + +```php +public function getVersion(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 28. + +*** + +### registerTools + +#### Signature + +```php +public function registerTools(): void +``` + +#### Source + +[`SignalWire/Skills/Builtin/Datasphere.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Datasphere.php) + +Line 58. + +*** + +### setup + +#### Signature + +```php +public function setup(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/Builtin/Datasphere.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Datasphere.php) + +Line 47. + +*** + +### supportsMultipleInstances + +#### Signature + +```php +public function supportsMultipleInstances(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/Builtin/Datasphere.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Datasphere.php) + +Line 42. + +*** + +### validateEnvVars + +#### Signature + +```php +public function validateEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 100. + +## Source + +[`SignalWire/Skills/Builtin/Datasphere.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Datasphere.php) + +Line 27. diff --git a/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/datetime/index.mdx b/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/datetime/index.mdx new file mode 100644 index 0000000000..8cd28a0f2d --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/datetime/index.mdx @@ -0,0 +1,331 @@ +--- +slug: "/reference/php/signal-wire/skills/builtin/builtin/datetime" +title: "Datetime" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Skills\\Builtin\\Datetime" + parent: "SignalWire\\Skills\\Builtin" + module: "SignalWire.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Datetime.php" +--- +# `Datetime` + +## Signature + +```php +class Datetime extends SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire\Skills\SkillBase](/docs/sdk-reference/reference/php/signal-wire/skills/skills/skill-base) + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(object $agent, array $params = array ( +)) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 13. + +*** + +### cleanup + +#### Signature + +```php +public function cleanup(): void +``` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 62. + +*** + +### getDescription + +#### Signature + +```php +public function getDescription(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/Datetime.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Datetime.php) + +Line 17. + +*** + +### getGlobalData + +#### Signature + +```php +public function getGlobalData(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 48. + +*** + +### getHints + +#### Signature + +```php +public function getHints(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 43. + +*** + +### getInstanceKey + +#### Signature + +```php +public function getInstanceKey(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 89. + +*** + +### getName + +#### Signature + +```php +public function getName(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/Datetime.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Datetime.php) + +Line 12. + +*** + +### getParameterSchema + +#### Signature + +```php +public function getParameterSchema(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 66. + +*** + +### getPromptSections + +#### Signature + +```php +public function getPromptSections(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/Builtin/Datetime.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Datetime.php) + +Line 84. + +*** + +### getRequiredEnvVars + +#### Signature + +```php +public function getRequiredEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 33. + +*** + +### getVersion + +#### Signature + +```php +public function getVersion(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 28. + +*** + +### registerTools + +#### Signature + +```php +public function registerTools(): void +``` + +#### Source + +[`SignalWire/Skills/Builtin/Datetime.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Datetime.php) + +Line 27. + +*** + +### setup + +#### Signature + +```php +public function setup(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/Builtin/Datetime.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Datetime.php) + +Line 22. + +*** + +### supportsMultipleInstances + +#### Signature + +```php +public function supportsMultipleInstances(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 38. + +*** + +### validateEnvVars + +#### Signature + +```php +public function validateEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 100. + +## Source + +[`SignalWire/Skills/Builtin/Datetime.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Datetime.php) + +Line 10. diff --git a/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/google-maps/index.mdx b/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/google-maps/index.mdx new file mode 100644 index 0000000000..27df099b4c --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/google-maps/index.mdx @@ -0,0 +1,331 @@ +--- +slug: "/reference/php/signal-wire/skills/builtin/builtin/google-maps" +title: "GoogleMaps" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Skills\\Builtin\\GoogleMaps" + parent: "SignalWire\\Skills\\Builtin" + module: "SignalWire.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/GoogleMaps.php" +--- +# `GoogleMaps` + +## Signature + +```php +class GoogleMaps extends SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire\Skills\SkillBase](/docs/sdk-reference/reference/php/signal-wire/skills/skills/skill-base) + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(object $agent, array $params = array ( +)) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 13. + +*** + +### cleanup + +#### Signature + +```php +public function cleanup(): void +``` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 62. + +*** + +### getDescription + +#### Signature + +```php +public function getDescription(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/GoogleMaps.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/GoogleMaps.php) + +Line 17. + +*** + +### getGlobalData + +#### Signature + +```php +public function getGlobalData(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 48. + +*** + +### getHints + +#### Signature + +```php +public function getHints(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/Builtin/GoogleMaps.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/GoogleMaps.php) + +Line 157. + +*** + +### getInstanceKey + +#### Signature + +```php +public function getInstanceKey(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 89. + +*** + +### getName + +#### Signature + +```php +public function getName(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/GoogleMaps.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/GoogleMaps.php) + +Line 12. + +*** + +### getParameterSchema + +#### Signature + +```php +public function getParameterSchema(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 66. + +*** + +### getPromptSections + +#### Signature + +```php +public function getPromptSections(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/Builtin/GoogleMaps.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/GoogleMaps.php) + +Line 162. + +*** + +### getRequiredEnvVars + +#### Signature + +```php +public function getRequiredEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 33. + +*** + +### getVersion + +#### Signature + +```php +public function getVersion(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 28. + +*** + +### registerTools + +#### Signature + +```php +public function registerTools(): void +``` + +#### Source + +[`SignalWire/Skills/Builtin/GoogleMaps.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/GoogleMaps.php) + +Line 31. + +*** + +### setup + +#### Signature + +```php +public function setup(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/Builtin/GoogleMaps.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/GoogleMaps.php) + +Line 22. + +*** + +### supportsMultipleInstances + +#### Signature + +```php +public function supportsMultipleInstances(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 38. + +*** + +### validateEnvVars + +#### Signature + +```php +public function validateEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 100. + +## Source + +[`SignalWire/Skills/Builtin/GoogleMaps.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/GoogleMaps.php) + +Line 10. diff --git a/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/index.mdx b/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/index.mdx new file mode 100644 index 0000000000..53bc966867 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/index.mdx @@ -0,0 +1,73 @@ +--- +slug: "/reference/php/signal-wire/skills/builtin/builtin" +title: "Builtin" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "module" + language: "php" + qualified_name: "SignalWire\\Skills\\Builtin" + module: "SignalWire.Skills.Builtin" +--- +# `Builtin` + +## Signature + +```php +namespace SignalWire\Skills\Builtin +``` + +## Classes + + + + + + Claude Skills loader. + + + + + + SignalWire DataSphere knowledge-search skill. + + + + + + + + + + + + + + + + MCP Gateway skill. + + + + Native vector search skill — network/remote mode only. + + + + + + Spider scraping skill. + + + + + + + + Web search skill backed by Google Custom Search. + + + + Wikipedia search skill backed by the public MediaWiki action API. + + diff --git a/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/info-gatherer/index.mdx b/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/info-gatherer/index.mdx new file mode 100644 index 0000000000..60811195f3 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/info-gatherer/index.mdx @@ -0,0 +1,331 @@ +--- +slug: "/reference/php/signal-wire/skills/builtin/builtin/info-gatherer" +title: "InfoGatherer" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Skills\\Builtin\\InfoGatherer" + parent: "SignalWire\\Skills\\Builtin" + module: "SignalWire.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/InfoGatherer.php" +--- +# `InfoGatherer` + +## Signature + +```php +class InfoGatherer extends SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire\Skills\SkillBase](/docs/sdk-reference/reference/php/signal-wire/skills/skills/skill-base) + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(object $agent, array $params = array ( +)) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 13. + +*** + +### cleanup + +#### Signature + +```php +public function cleanup(): void +``` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 62. + +*** + +### getDescription + +#### Signature + +```php +public function getDescription(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/InfoGatherer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/InfoGatherer.php) + +Line 17. + +*** + +### getGlobalData + +#### Signature + +```php +public function getGlobalData(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/Builtin/InfoGatherer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/InfoGatherer.php) + +Line 156. + +*** + +### getHints + +#### Signature + +```php +public function getHints(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 43. + +*** + +### getInstanceKey + +#### Signature + +```php +public function getInstanceKey(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 89. + +*** + +### getName + +#### Signature + +```php +public function getName(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/InfoGatherer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/InfoGatherer.php) + +Line 12. + +*** + +### getParameterSchema + +#### Signature + +```php +public function getParameterSchema(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 66. + +*** + +### getPromptSections + +#### Signature + +```php +public function getPromptSections(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/Builtin/InfoGatherer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/InfoGatherer.php) + +Line 170. + +*** + +### getRequiredEnvVars + +#### Signature + +```php +public function getRequiredEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 33. + +*** + +### getVersion + +#### Signature + +```php +public function getVersion(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 28. + +*** + +### registerTools + +#### Signature + +```php +public function registerTools(): void +``` + +#### Source + +[`SignalWire/Skills/Builtin/InfoGatherer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/InfoGatherer.php) + +Line 36. + +*** + +### setup + +#### Signature + +```php +public function setup(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/Builtin/InfoGatherer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/InfoGatherer.php) + +Line 27. + +*** + +### supportsMultipleInstances + +#### Signature + +```php +public function supportsMultipleInstances(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/Builtin/InfoGatherer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/InfoGatherer.php) + +Line 22. + +*** + +### validateEnvVars + +#### Signature + +```php +public function validateEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 100. + +## Source + +[`SignalWire/Skills/Builtin/InfoGatherer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/InfoGatherer.php) + +Line 10. diff --git a/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/joke/index.mdx b/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/joke/index.mdx new file mode 100644 index 0000000000..d16cdcce6b --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/joke/index.mdx @@ -0,0 +1,331 @@ +--- +slug: "/reference/php/signal-wire/skills/builtin/builtin/joke" +title: "Joke" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Skills\\Builtin\\Joke" + parent: "SignalWire\\Skills\\Builtin" + module: "SignalWire.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Joke.php" +--- +# `Joke` + +## Signature + +```php +class Joke extends SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire\Skills\SkillBase](/docs/sdk-reference/reference/php/signal-wire/skills/skills/skill-base) + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(object $agent, array $params = array ( +)) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 13. + +*** + +### cleanup + +#### Signature + +```php +public function cleanup(): void +``` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 62. + +*** + +### getDescription + +#### Signature + +```php +public function getDescription(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/Joke.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Joke.php) + +Line 17. + +*** + +### getGlobalData + +#### Signature + +```php +public function getGlobalData(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/Builtin/Joke.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Joke.php) + +Line 78. + +*** + +### getHints + +#### Signature + +```php +public function getHints(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 43. + +*** + +### getInstanceKey + +#### Signature + +```php +public function getInstanceKey(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 89. + +*** + +### getName + +#### Signature + +```php +public function getName(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/Joke.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Joke.php) + +Line 12. + +*** + +### getParameterSchema + +#### Signature + +```php +public function getParameterSchema(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 66. + +*** + +### getPromptSections + +#### Signature + +```php +public function getPromptSections(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/Builtin/Joke.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Joke.php) + +Line 83. + +*** + +### getRequiredEnvVars + +#### Signature + +```php +public function getRequiredEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 33. + +*** + +### getVersion + +#### Signature + +```php +public function getVersion(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 28. + +*** + +### registerTools + +#### Signature + +```php +public function registerTools(): void +``` + +#### Source + +[`SignalWire/Skills/Builtin/Joke.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Joke.php) + +Line 31. + +*** + +### setup + +#### Signature + +```php +public function setup(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/Builtin/Joke.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Joke.php) + +Line 22. + +*** + +### supportsMultipleInstances + +#### Signature + +```php +public function supportsMultipleInstances(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 38. + +*** + +### validateEnvVars + +#### Signature + +```php +public function validateEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 100. + +## Source + +[`SignalWire/Skills/Builtin/Joke.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Joke.php) + +Line 10. diff --git a/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/math/index.mdx b/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/math/index.mdx new file mode 100644 index 0000000000..08896bb65b --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/math/index.mdx @@ -0,0 +1,331 @@ +--- +slug: "/reference/php/signal-wire/skills/builtin/builtin/math" +title: "Math" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Skills\\Builtin\\Math" + parent: "SignalWire\\Skills\\Builtin" + module: "SignalWire.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Math.php" +--- +# `Math` + +## Signature + +```php +class Math extends SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire\Skills\SkillBase](/docs/sdk-reference/reference/php/signal-wire/skills/skills/skill-base) + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(object $agent, array $params = array ( +)) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 13. + +*** + +### cleanup + +#### Signature + +```php +public function cleanup(): void +``` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 62. + +*** + +### getDescription + +#### Signature + +```php +public function getDescription(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/Math.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Math.php) + +Line 17. + +*** + +### getGlobalData + +#### Signature + +```php +public function getGlobalData(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 48. + +*** + +### getHints + +#### Signature + +```php +public function getHints(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 43. + +*** + +### getInstanceKey + +#### Signature + +```php +public function getInstanceKey(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 89. + +*** + +### getName + +#### Signature + +```php +public function getName(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/Math.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Math.php) + +Line 12. + +*** + +### getParameterSchema + +#### Signature + +```php +public function getParameterSchema(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 66. + +*** + +### getPromptSections + +#### Signature + +```php +public function getPromptSections(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/Builtin/Math.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Math.php) + +Line 79. + +*** + +### getRequiredEnvVars + +#### Signature + +```php +public function getRequiredEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 33. + +*** + +### getVersion + +#### Signature + +```php +public function getVersion(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 28. + +*** + +### registerTools + +#### Signature + +```php +public function registerTools(): void +``` + +#### Source + +[`SignalWire/Skills/Builtin/Math.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Math.php) + +Line 27. + +*** + +### setup + +#### Signature + +```php +public function setup(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/Builtin/Math.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Math.php) + +Line 22. + +*** + +### supportsMultipleInstances + +#### Signature + +```php +public function supportsMultipleInstances(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 38. + +*** + +### validateEnvVars + +#### Signature + +```php +public function validateEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 100. + +## Source + +[`SignalWire/Skills/Builtin/Math.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Math.php) + +Line 10. diff --git a/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/mcp-gateway/index.mdx b/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/mcp-gateway/index.mdx new file mode 100644 index 0000000000..5e426f91fa --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/mcp-gateway/index.mdx @@ -0,0 +1,351 @@ +--- +slug: "/reference/php/signal-wire/skills/builtin/builtin/mcp-gateway" +title: "McpGateway" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Skills\\Builtin\\McpGateway" + parent: "SignalWire\\Skills\\Builtin" + module: "SignalWire.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/McpGateway.php" +--- +# `McpGateway` + +MCP Gateway skill. + +Mirrors signalwire-python's `signalwire.skills.mcp_gateway.skill`: + +POST \{gateway\_url\}/services/\{service\}/call +Auth: Bearer auth\_token OR Basic auth\_user:auth\_password +Body: \{ tool, arguments, session\_id, timeout, metadata \} +Response: \{ result \} — surfaced verbatim + +For session cleanup the Python skill issues `DELETE +/sessions/{session_id}` from the hangup-hook tool. The audit only +exercises the per-tool `call` path; the hangup hook is preserved +but does not block on the audit. + +No upstream URL override env var — the gateway URL is mandatory and +fully user-supplied (no third-party host to mock). The audit path +isn't probed for this skill (it's not in audit\_skills\_dispatch's +SKILL\_PROBES list as of this writing) but the implementation must +still be real because the surface is shipped to users. + +## Signature + +```php +class McpGateway extends SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire\Skills\SkillBase](/docs/sdk-reference/reference/php/signal-wire/skills/skills/skill-base) + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(object $agent, array $params = array ( +)) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 13. + +*** + +### cleanup + +#### Signature + +```php +public function cleanup(): void +``` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 62. + +*** + +### getDescription + +#### Signature + +```php +public function getDescription(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/McpGateway.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/McpGateway.php) + +Line 39. + +*** + +### getGlobalData + +#### Signature + +```php +public function getGlobalData(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/Builtin/McpGateway.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/McpGateway.php) + +Line 314. + +*** + +### getHints + +#### Signature + +```php +public function getHints(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/Builtin/McpGateway.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/McpGateway.php) + +Line 297. + +*** + +### getInstanceKey + +#### Signature + +```php +public function getInstanceKey(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 89. + +*** + +### getName + +#### Signature + +```php +public function getName(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/McpGateway.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/McpGateway.php) + +Line 34. + +*** + +### getParameterSchema + +#### Signature + +```php +public function getParameterSchema(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 66. + +*** + +### getPromptSections + +#### Signature + +```php +public function getPromptSections(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/Builtin/McpGateway.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/McpGateway.php) + +Line 335. + +*** + +### getRequiredEnvVars + +#### Signature + +```php +public function getRequiredEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 33. + +*** + +### getVersion + +#### Signature + +```php +public function getVersion(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 28. + +*** + +### registerTools + +#### Signature + +```php +public function registerTools(): void +``` + +#### Source + +[`SignalWire/Skills/Builtin/McpGateway.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/McpGateway.php) + +Line 56. + +*** + +### setup + +#### Signature + +```php +public function setup(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/Builtin/McpGateway.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/McpGateway.php) + +Line 44. + +*** + +### supportsMultipleInstances + +#### Signature + +```php +public function supportsMultipleInstances(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 38. + +*** + +### validateEnvVars + +#### Signature + +```php +public function validateEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 100. + +## Source + +[`SignalWire/Skills/Builtin/McpGateway.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/McpGateway.php) + +Line 32. diff --git a/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/native-vector-search/index.mdx b/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/native-vector-search/index.mdx new file mode 100644 index 0000000000..32bdc99bdd --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/native-vector-search/index.mdx @@ -0,0 +1,347 @@ +--- +slug: "/reference/php/signal-wire/skills/builtin/builtin/native-vector-search" +title: "NativeVectorSearch" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Skills\\Builtin\\NativeVectorSearch" + parent: "SignalWire\\Skills\\Builtin" + module: "SignalWire.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/NativeVectorSearch.php" +--- +# `NativeVectorSearch` + +Native vector search skill — network/remote mode only. + +Mirrors signalwire-python's +`signalwire.skills.native_vector_search.skill.NativeVectorSearchSkill`, +specifically the `_search_remote` branch: + +POST \{remote\_url\}/search +Auth: Optional Basic (parsed from remote\_url's user:pass@ if set) +Body: \{ query, index\_name, count, similarity\_threshold, tags \} +Response: \{ results: \[\{ content, score, metadata \}] \} + +The Python skill also supports a local SQLite/pgvector backend via +`signalwire.search`. PHP doesn't ship that backend; in remote mode +the SDK is just a thin HTTP client, which the audit verifies. Local +backend is recorded in PORT\_OMISSIONS.md. + +## Signature + +```php +class NativeVectorSearch extends SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire\Skills\SkillBase](/docs/sdk-reference/reference/php/signal-wire/skills/skills/skill-base) + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(object $agent, array $params = array ( +)) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 13. + +*** + +### cleanup + +#### Signature + +```php +public function cleanup(): void +``` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 62. + +*** + +### getDescription + +#### Signature + +```php +public function getDescription(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/NativeVectorSearch.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/NativeVectorSearch.php) + +Line 35. + +*** + +### getGlobalData + +#### Signature + +```php +public function getGlobalData(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 48. + +*** + +### getHints + +#### Signature + +```php +public function getHints(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/Builtin/NativeVectorSearch.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/NativeVectorSearch.php) + +Line 258. + +*** + +### getInstanceKey + +#### Signature + +```php +public function getInstanceKey(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 89. + +*** + +### getName + +#### Signature + +```php +public function getName(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/NativeVectorSearch.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/NativeVectorSearch.php) + +Line 30. + +*** + +### getParameterSchema + +#### Signature + +```php +public function getParameterSchema(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 66. + +*** + +### getPromptSections + +#### Signature + +```php +public function getPromptSections(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 53. + +*** + +### getRequiredEnvVars + +#### Signature + +```php +public function getRequiredEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 33. + +*** + +### getVersion + +#### Signature + +```php +public function getVersion(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 28. + +*** + +### registerTools + +#### Signature + +```php +public function registerTools(): void +``` + +#### Source + +[`SignalWire/Skills/Builtin/NativeVectorSearch.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/NativeVectorSearch.php) + +Line 54. + +*** + +### setup + +#### Signature + +```php +public function setup(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/Builtin/NativeVectorSearch.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/NativeVectorSearch.php) + +Line 45. + +*** + +### supportsMultipleInstances + +#### Signature + +```php +public function supportsMultipleInstances(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/Builtin/NativeVectorSearch.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/NativeVectorSearch.php) + +Line 40. + +*** + +### validateEnvVars + +#### Signature + +```php +public function validateEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 100. + +## Source + +[`SignalWire/Skills/Builtin/NativeVectorSearch.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/NativeVectorSearch.php) + +Line 28. diff --git a/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/play-background-file/index.mdx b/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/play-background-file/index.mdx new file mode 100644 index 0000000000..617edacc3e --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/play-background-file/index.mdx @@ -0,0 +1,331 @@ +--- +slug: "/reference/php/signal-wire/skills/builtin/builtin/play-background-file" +title: "PlayBackgroundFile" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Skills\\Builtin\\PlayBackgroundFile" + parent: "SignalWire\\Skills\\Builtin" + module: "SignalWire.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/PlayBackgroundFile.php" +--- +# `PlayBackgroundFile` + +## Signature + +```php +class PlayBackgroundFile extends SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire\Skills\SkillBase](/docs/sdk-reference/reference/php/signal-wire/skills/skills/skill-base) + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(object $agent, array $params = array ( +)) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 13. + +*** + +### cleanup + +#### Signature + +```php +public function cleanup(): void +``` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 62. + +*** + +### getDescription + +#### Signature + +```php +public function getDescription(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/PlayBackgroundFile.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/PlayBackgroundFile.php) + +Line 17. + +*** + +### getGlobalData + +#### Signature + +```php +public function getGlobalData(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 48. + +*** + +### getHints + +#### Signature + +```php +public function getHints(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 43. + +*** + +### getInstanceKey + +#### Signature + +```php +public function getInstanceKey(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 89. + +*** + +### getName + +#### Signature + +```php +public function getName(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/PlayBackgroundFile.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/PlayBackgroundFile.php) + +Line 12. + +*** + +### getParameterSchema + +#### Signature + +```php +public function getParameterSchema(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 66. + +*** + +### getPromptSections + +#### Signature + +```php +public function getPromptSections(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 53. + +*** + +### getRequiredEnvVars + +#### Signature + +```php +public function getRequiredEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 33. + +*** + +### getVersion + +#### Signature + +```php +public function getVersion(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 28. + +*** + +### registerTools + +#### Signature + +```php +public function registerTools(): void +``` + +#### Source + +[`SignalWire/Skills/Builtin/PlayBackgroundFile.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/PlayBackgroundFile.php) + +Line 36. + +*** + +### setup + +#### Signature + +```php +public function setup(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/Builtin/PlayBackgroundFile.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/PlayBackgroundFile.php) + +Line 27. + +*** + +### supportsMultipleInstances + +#### Signature + +```php +public function supportsMultipleInstances(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/Builtin/PlayBackgroundFile.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/PlayBackgroundFile.php) + +Line 22. + +*** + +### validateEnvVars + +#### Signature + +```php +public function validateEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 100. + +## Source + +[`SignalWire/Skills/Builtin/PlayBackgroundFile.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/PlayBackgroundFile.php) + +Line 10. diff --git a/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/spider/index.mdx b/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/spider/index.mdx new file mode 100644 index 0000000000..a607ae3ca7 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/spider/index.mdx @@ -0,0 +1,346 @@ +--- +slug: "/reference/php/signal-wire/skills/builtin/builtin/spider" +title: "Spider" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Skills\\Builtin\\Spider" + parent: "SignalWire\\Skills\\Builtin" + module: "SignalWire.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Spider.php" +--- +# `Spider` + +Spider scraping skill. + +Mirrors signalwire-python's `signalwire.skills.spider.skill` (the +`_scrape_url_handler` / `_crawl_site_handler` paths). PHP doesn't +ship `lxml`, so HTML extraction uses a strip\_tags + regex pipeline +that handles the audit's canned `...` +sentinel and basic real-world pages — the Python version's quality +scorer and Reddit-aware extractor are not yet ported, but the +upstream contract (real GET, real text extraction) is met. + +Upstream URL override: `SPIDER_BASE_URL` for the audit fixture. +The audit fixture is a generic JSON server, so the response body +may either be a raw HTML string (production) or a JSON object with +an `_raw_html` field (audit fixture). We accept both. + +## Signature + +```php +class Spider extends SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire\Skills\SkillBase](/docs/sdk-reference/reference/php/signal-wire/skills/skills/skill-base) + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(object $agent, array $params = array ( +)) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 13. + +*** + +### cleanup + +#### Signature + +```php +public function cleanup(): void +``` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 62. + +*** + +### getDescription + +#### Signature + +```php +public function getDescription(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/Spider.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Spider.php) + +Line 36. + +*** + +### getGlobalData + +#### Signature + +```php +public function getGlobalData(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 48. + +*** + +### getHints + +#### Signature + +```php +public function getHints(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/Builtin/Spider.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Spider.php) + +Line 455. + +*** + +### getInstanceKey + +#### Signature + +```php +public function getInstanceKey(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 89. + +*** + +### getName + +#### Signature + +```php +public function getName(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/Spider.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Spider.php) + +Line 31. + +*** + +### getParameterSchema + +#### Signature + +```php +public function getParameterSchema(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 66. + +*** + +### getPromptSections + +#### Signature + +```php +public function getPromptSections(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 53. + +*** + +### getRequiredEnvVars + +#### Signature + +```php +public function getRequiredEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 33. + +*** + +### getVersion + +#### Signature + +```php +public function getVersion(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 28. + +*** + +### registerTools + +#### Signature + +```php +public function registerTools(): void +``` + +#### Source + +[`SignalWire/Skills/Builtin/Spider.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Spider.php) + +Line 51. + +*** + +### setup + +#### Signature + +```php +public function setup(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/Builtin/Spider.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Spider.php) + +Line 46. + +*** + +### supportsMultipleInstances + +#### Signature + +```php +public function supportsMultipleInstances(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/Builtin/Spider.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Spider.php) + +Line 41. + +*** + +### validateEnvVars + +#### Signature + +```php +public function validateEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 100. + +## Source + +[`SignalWire/Skills/Builtin/Spider.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Spider.php) + +Line 27. diff --git a/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/swml-transfer/index.mdx b/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/swml-transfer/index.mdx new file mode 100644 index 0000000000..d2c344d112 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/swml-transfer/index.mdx @@ -0,0 +1,331 @@ +--- +slug: "/reference/php/signal-wire/skills/builtin/builtin/swml-transfer" +title: "SwmlTransfer" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Skills\\Builtin\\SwmlTransfer" + parent: "SignalWire\\Skills\\Builtin" + module: "SignalWire.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/SwmlTransfer.php" +--- +# `SwmlTransfer` + +## Signature + +```php +class SwmlTransfer extends SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire\Skills\SkillBase](/docs/sdk-reference/reference/php/signal-wire/skills/skills/skill-base) + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(object $agent, array $params = array ( +)) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 13. + +*** + +### cleanup + +#### Signature + +```php +public function cleanup(): void +``` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 62. + +*** + +### getDescription + +#### Signature + +```php +public function getDescription(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/SwmlTransfer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/SwmlTransfer.php) + +Line 17. + +*** + +### getGlobalData + +#### Signature + +```php +public function getGlobalData(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 48. + +*** + +### getHints + +#### Signature + +```php +public function getHints(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/Builtin/SwmlTransfer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/SwmlTransfer.php) + +Line 131. + +*** + +### getInstanceKey + +#### Signature + +```php +public function getInstanceKey(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 89. + +*** + +### getName + +#### Signature + +```php +public function getName(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/SwmlTransfer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/SwmlTransfer.php) + +Line 12. + +*** + +### getParameterSchema + +#### Signature + +```php +public function getParameterSchema(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 66. + +*** + +### getPromptSections + +#### Signature + +```php +public function getPromptSections(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/Builtin/SwmlTransfer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/SwmlTransfer.php) + +Line 150. + +*** + +### getRequiredEnvVars + +#### Signature + +```php +public function getRequiredEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 33. + +*** + +### getVersion + +#### Signature + +```php +public function getVersion(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 28. + +*** + +### registerTools + +#### Signature + +```php +public function registerTools(): void +``` + +#### Source + +[`SignalWire/Skills/Builtin/SwmlTransfer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/SwmlTransfer.php) + +Line 36. + +*** + +### setup + +#### Signature + +```php +public function setup(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/Builtin/SwmlTransfer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/SwmlTransfer.php) + +Line 27. + +*** + +### supportsMultipleInstances + +#### Signature + +```php +public function supportsMultipleInstances(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/Builtin/SwmlTransfer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/SwmlTransfer.php) + +Line 22. + +*** + +### validateEnvVars + +#### Signature + +```php +public function validateEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 100. + +## Source + +[`SignalWire/Skills/Builtin/SwmlTransfer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/SwmlTransfer.php) + +Line 10. diff --git a/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/weather-api/index.mdx b/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/weather-api/index.mdx new file mode 100644 index 0000000000..e01c107981 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/weather-api/index.mdx @@ -0,0 +1,331 @@ +--- +slug: "/reference/php/signal-wire/skills/builtin/builtin/weather-api" +title: "WeatherApi" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Skills\\Builtin\\WeatherApi" + parent: "SignalWire\\Skills\\Builtin" + module: "SignalWire.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WeatherApi.php" +--- +# `WeatherApi` + +## Signature + +```php +class WeatherApi extends SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire\Skills\SkillBase](/docs/sdk-reference/reference/php/signal-wire/skills/skills/skill-base) + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(object $agent, array $params = array ( +)) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 13. + +*** + +### cleanup + +#### Signature + +```php +public function cleanup(): void +``` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 62. + +*** + +### getDescription + +#### Signature + +```php +public function getDescription(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/WeatherApi.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WeatherApi.php) + +Line 17. + +*** + +### getGlobalData + +#### Signature + +```php +public function getGlobalData(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 48. + +*** + +### getHints + +#### Signature + +```php +public function getHints(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 43. + +*** + +### getInstanceKey + +#### Signature + +```php +public function getInstanceKey(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 89. + +*** + +### getName + +#### Signature + +```php +public function getName(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/WeatherApi.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WeatherApi.php) + +Line 12. + +*** + +### getParameterSchema + +#### Signature + +```php +public function getParameterSchema(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 66. + +*** + +### getPromptSections + +#### Signature + +```php +public function getPromptSections(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 53. + +*** + +### getRequiredEnvVars + +#### Signature + +```php +public function getRequiredEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 33. + +*** + +### getVersion + +#### Signature + +```php +public function getVersion(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 28. + +*** + +### registerTools + +#### Signature + +```php +public function registerTools(): void +``` + +#### Source + +[`SignalWire/Skills/Builtin/WeatherApi.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WeatherApi.php) + +Line 31. + +*** + +### setup + +#### Signature + +```php +public function setup(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/Builtin/WeatherApi.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WeatherApi.php) + +Line 22. + +*** + +### supportsMultipleInstances + +#### Signature + +```php +public function supportsMultipleInstances(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 38. + +*** + +### validateEnvVars + +#### Signature + +```php +public function validateEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 100. + +## Source + +[`SignalWire/Skills/Builtin/WeatherApi.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WeatherApi.php) + +Line 10. diff --git a/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/web-search/index.mdx b/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/web-search/index.mdx new file mode 100644 index 0000000000..280d2fdb5f --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/web-search/index.mdx @@ -0,0 +1,368 @@ +--- +slug: "/reference/php/signal-wire/skills/builtin/builtin/web-search" +title: "WebSearch" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Skills\\Builtin\\WebSearch" + parent: "SignalWire\\Skills\\Builtin" + module: "SignalWire.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WebSearch.php" +--- +# `WebSearch` + +Web search skill backed by Google Custom Search. + +Mirrors signalwire-python's `signalwire.skills.web_search.skill` +(the `WebSearchSkill.search_and_scrape_best` path). The Python +reference fetches CSE results, then scrapes each result URL and +quality-scores the extracted text with a Reddit-aware extractor, a +per-domain weight table, and a length/diversity scorer. The PHP port +issues the CSE call faithfully and scrapes each result page with a +lighter strip\_tags/regex extractor (the heavyweight BeautifulSoup +scorer and the per-domain quality table remain Python-specific and +are tracked in PORT\_OMISSIONS.md). When no scraped page clears the +quality threshold — or the overall deadline fires — the handler falls +back to formatting the CSE titles+snippets so the response is always +non-empty. + +Latency control (Python skill.py commits 51101da + 295745b — the +SignalWire kernel times out webhook responses around 55s, so the +handler MUST finish under that): + +- per\_page\_timeout (2.0s): cURL CURLOPT\_TIMEOUT on each page scrape. +- overall\_deadline (10.0s): wall-clock budget for the whole tool + call, tracked from microtime(true); once exceeded, remaining + scrapes are abandoned and we return whatever we have (or the + snippet fallback). +- snippets\_only (false): skip page scraping entirely and format the + CSE snippets directly. Sub-second response. +- parallel\_scrape (true): accepted for API/schema parity with + Python/Go/TS. PHP is single-threaded and true concurrent HTTP + would require curl\_multi (invasive, and parallelism is NOT part of + the latency contract), so scrapes run SEQUENTIALLY with strict + per-page + overall-deadline enforcement. See PORT\_ADDITIONS.md. + +Upstream URL override: `WEB_SEARCH_BASE_URL` (used by +audit\_skills\_dispatch.py to point at a local fixture). When set, +the URL is rewritten to the override host while the path +`/customsearch/v1` is preserved. + +## Signature + +```php +class WebSearch extends SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire\Skills\SkillBase](/docs/sdk-reference/reference/php/signal-wire/skills/skills/skill-base) + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(object $agent, array $params = array ( +)) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 13. + +*** + +### cleanup + +#### Signature + +```php +public function cleanup(): void +``` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 62. + +*** + +### getDescription + +#### Signature + +```php +public function getDescription(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/WebSearch.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WebSearch.php) + +Line 58. + +*** + +### getGlobalData + +#### Signature + +```php +public function getGlobalData(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/Builtin/WebSearch.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WebSearch.php) + +Line 545. + +*** + +### getHints + +#### Signature + +```php +public function getHints(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 43. + +*** + +### getInstanceKey + +#### Signature + +```php +public function getInstanceKey(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 89. + +*** + +### getName + +#### Signature + +```php +public function getName(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/WebSearch.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WebSearch.php) + +Line 53. + +*** + +### getParameterSchema + +#### Signature + +```php +public function getParameterSchema(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/Builtin/WebSearch.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WebSearch.php) + +Line 81. + +*** + +### getPromptSections + +#### Signature + +```php +public function getPromptSections(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/Builtin/WebSearch.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WebSearch.php) + +Line 554. + +*** + +### getRequiredEnvVars + +#### Signature + +```php +public function getRequiredEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 33. + +*** + +### getVersion + +#### Signature + +```php +public function getVersion(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/WebSearch.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WebSearch.php) + +Line 63. + +*** + +### registerTools + +#### Signature + +```php +public function registerTools(): void +``` + +#### Source + +[`SignalWire/Skills/Builtin/WebSearch.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WebSearch.php) + +Line 152. + +*** + +### setup + +#### Signature + +```php +public function setup(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/Builtin/WebSearch.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WebSearch.php) + +Line 73. + +*** + +### supportsMultipleInstances + +#### Signature + +```php +public function supportsMultipleInstances(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/Builtin/WebSearch.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WebSearch.php) + +Line 68. + +*** + +### validateEnvVars + +#### Signature + +```php +public function validateEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 100. + +## Source + +[`SignalWire/Skills/Builtin/WebSearch.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WebSearch.php) + +Line 48. diff --git a/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/wikipedia-search/index.mdx b/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/wikipedia-search/index.mdx new file mode 100644 index 0000000000..7855f4c269 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/wikipedia-search/index.mdx @@ -0,0 +1,343 @@ +--- +slug: "/reference/php/signal-wire/skills/builtin/builtin/wikipedia-search" +title: "WikipediaSearch" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Skills\\Builtin\\WikipediaSearch" + parent: "SignalWire\\Skills\\Builtin" + module: "SignalWire.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WikipediaSearch.php" +--- +# `WikipediaSearch` + +Wikipedia search skill backed by the public MediaWiki action API. + +Mirrors signalwire-python's +`signalwire.skills.wikipedia_search.skill.WikipediaSearchSkill.search_wiki`: + +1. GET en.wikipedia.org/w/api.php?action=query\&list=search\&srsearch=... +2. For each top result, GET ?action=query\&prop=extracts\&exintro&... + to fetch the article intro extract. + +Upstream URL override: `WIKIPEDIA_BASE_URL` for the audit fixture. +The path component (`/w/api.php`) is preserved. + +## Signature + +```php +class WikipediaSearch extends SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire\Skills\SkillBase](/docs/sdk-reference/reference/php/signal-wire/skills/skills/skill-base) + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(object $agent, array $params = array ( +)) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 13. + +*** + +### cleanup + +#### Signature + +```php +public function cleanup(): void +``` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 62. + +*** + +### getDescription + +#### Signature + +```php +public function getDescription(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/WikipediaSearch.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WikipediaSearch.php) + +Line 34. + +*** + +### getGlobalData + +#### Signature + +```php +public function getGlobalData(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 48. + +*** + +### getHints + +#### Signature + +```php +public function getHints(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 43. + +*** + +### getInstanceKey + +#### Signature + +```php +public function getInstanceKey(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 89. + +*** + +### getName + +#### Signature + +```php +public function getName(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/WikipediaSearch.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WikipediaSearch.php) + +Line 29. + +*** + +### getParameterSchema + +#### Signature + +```php +public function getParameterSchema(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 66. + +*** + +### getPromptSections + +#### Signature + +```php +public function getPromptSections(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/Builtin/WikipediaSearch.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WikipediaSearch.php) + +Line 177. + +*** + +### getRequiredEnvVars + +#### Signature + +```php +public function getRequiredEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 33. + +*** + +### getVersion + +#### Signature + +```php +public function getVersion(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 28. + +*** + +### registerTools + +#### Signature + +```php +public function registerTools(): void +``` + +#### Source + +[`SignalWire/Skills/Builtin/WikipediaSearch.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WikipediaSearch.php) + +Line 44. + +*** + +### setup + +#### Signature + +```php +public function setup(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/Builtin/WikipediaSearch.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WikipediaSearch.php) + +Line 39. + +*** + +### supportsMultipleInstances + +#### Signature + +```php +public function supportsMultipleInstances(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 38. + +*** + +### validateEnvVars + +#### Signature + +```php +public function validateEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 100. + +## Source + +[`SignalWire/Skills/Builtin/WikipediaSearch.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WikipediaSearch.php) + +Line 24. diff --git a/fern/products/sdk-reference/php/signal-wire/skills/skills/http-helper/index.mdx b/fern/products/sdk-reference/php/signal-wire/skills/skills/http-helper/index.mdx new file mode 100644 index 0000000000..0dddd997f5 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/skills/skills/http-helper/index.mdx @@ -0,0 +1,232 @@ +--- +slug: "/reference/php/signal-wire/skills/skills/http-helper" +title: "HttpHelper" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Skills\\HttpHelper" + parent: "SignalWire\\Skills" + module: "SignalWire.Skills" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/HttpHelper.php" +--- +# `HttpHelper` + +Tiny HTTP helper for skill upstream calls. + +The REST client uses cURL behind a Basic-auth wrapper bound to +`https://` — that's the wrong shape for skills, which talk to +arbitrary third-party services with their own URL bases, headers, +and auth schemes. Each skill could call cURL inline, but they all +need the same handful of mechanics (URL building, headers, basic +auth, JSON encode/decode, base-URL override for testing). This +helper centralises that and gives skills a way to honor the +`_BASE_URL` env-var override that audit\_skills\_dispatch +relies on without each skill duplicating the env lookup. + +## Signature + +```php +class HttpHelper +``` + +## Constants + + + Default request timeout in seconds. + + +## Methods + +### applyBaseUrlOverride + +Look up a URL override env var and rewrite the URL host/scheme + +to point at the audit fixture when set. Skills call this with +the documented env name (e.g. `WEB_SEARCH_BASE_URL`) and the +production URL; the helper returns either the original URL or +an audit-fixture rewrite, preserving path + query. + +**Modifiers:** `static` + +#### Signature + +```php +public static function applyBaseUrlOverride(string $url, string $envVarName): string +``` + +#### Parameters + + + + + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/HttpHelper.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/HttpHelper.php) + +Line 75. + +*** + +### get + +Issue a GET. Returns \[status, body, parsed\_json\_or\_null]. + +**Modifiers:** `static` + +#### Signature + +```php +public static function get( + string $url, + array $headers = array ( +), + ?array $query = NULL, + ?array $basicAuth = NULL, + int $timeout = 15 +): array +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/HttpHelper.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/HttpHelper.php) + +Line 31. + +*** + +### postJson + +Issue a POST with a JSON body. Returns \[status, body, parsed]. + +**Modifiers:** `static` + +#### Signature + +```php +public static function postJson( + string $url, + mixed $body, + array $headers = array ( +), + ?array $basicAuth = NULL, + int $timeout = 15 +): array +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/HttpHelper.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/HttpHelper.php) + +Line 51. + +*** + +### request + +Inner request engine using cURL. Other skills may use this + +directly when they need PUT/DELETE; the GET / POST helpers +above cover the common cases. + +**Modifiers:** `static` + +#### Signature + +```php +public static function request( + string $method, + string $url, + array $headers = array ( +), + ?string $body = NULL, + ?array $basicAuth = NULL, + int $timeout = 15 +): array +``` + +#### Parameters + + + + + + + + + + + \[user, password] + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/HttpHelper.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/HttpHelper.php) + +Line 104. + +## Source + +[`SignalWire/Skills/HttpHelper.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/HttpHelper.php) + +Line 20. diff --git a/fern/products/sdk-reference/php/signal-wire/skills/skills/index.mdx b/fern/products/sdk-reference/php/signal-wire/skills/skills/index.mdx new file mode 100644 index 0000000000..20dc8871b6 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/skills/skills/index.mdx @@ -0,0 +1,205 @@ +--- +slug: "/reference/php/signal-wire/skills/skills" +title: "Skills" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "module" + language: "php" + qualified_name: "SignalWire\\Skills" + module: "SignalWire.Skills" +--- +# `Skills` + +## Signature + +```php +namespace SignalWire\Skills +``` + +## Classes + + + + Tiny HTTP helper for skill upstream calls. + + + + + + + + + +## Enums + +### SkillName + +Built-in skill names as a typed, compile-time-checked closed set. + +\{@see \SignalWire\Agent\AgentBase::addSkill()\} accepts this enum OR a string. +The enum gives editor autocompletion and makes a typo fail at the call site +(a bare string like `'datetiem'` only fails at runtime, on the server); +strings keep parity with the Python reference (which uses bare `str`) and +still allow custom / third-party skills that aren't built in. + +``` +$agent->addSkill(SkillName::Datetime); // typed, autocompleted +$agent->addSkill('datetime'); // string still works (parity) +$agent->addSkill('my_custom_skill'); // open set: custom skills ok +``` + +#### Signature + +```php +final enum SkillName implements UnitEnum, BackedEnum +``` + +#### Inheritance + +**Implements:** `UnitEnum`, `BackedEnum` + +#### Properties + + + + + +#### Constants + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#### Variants + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#### Methods + +##### cases + +**Modifiers:** `static` + +###### Signature + +```php +public static function cases(): array +``` + +###### Returns + +`array` + +*** + +##### from + +**Modifiers:** `static` + +###### Signature + +```php +public static function from(string|int $value): static +``` + +###### Parameters + + + +###### Returns + +`static` + +*** + +##### tryFrom + +**Modifiers:** `static` + +###### Signature + +```php +public static function tryFrom(string|int $value): ?static +``` + +###### Parameters + + + +###### Returns + +`?static` + +#### Source + +[`SignalWire/Skills/SkillName.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillName.php) + +Line 20. diff --git a/fern/products/sdk-reference/php/signal-wire/skills/skills/skill-base/index.mdx b/fern/products/sdk-reference/php/signal-wire/skills/skills/skill-base/index.mdx new file mode 100644 index 0000000000..e0f92b3156 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/skills/skills/skill-base/index.mdx @@ -0,0 +1,337 @@ +--- +slug: "/reference/php/signal-wire/skills/skills/skill-base" +title: "SkillBase" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Skills\\SkillBase" + parent: "SignalWire\\Skills" + module: "SignalWire.Skills" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php" +--- +# `SkillBase` + +**Modifiers:** `abstract` + +## Signature + +```php +abstract class SkillBase +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(object $agent, array $params = array ( +)) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 13. + +*** + +### cleanup + +#### Signature + +```php +public function cleanup(): void +``` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 62. + +*** + +### getDescription + +**Modifiers:** `abstract` + +#### Signature + +```php +public abstract function getDescription(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 26. + +*** + +### getGlobalData + +#### Signature + +```php +public function getGlobalData(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 48. + +*** + +### getHints + +#### Signature + +```php +public function getHints(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 43. + +*** + +### getInstanceKey + +#### Signature + +```php +public function getInstanceKey(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 89. + +*** + +### getName + +**Modifiers:** `abstract` + +#### Signature + +```php +public abstract function getName(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 24. + +*** + +### getParameterSchema + +#### Signature + +```php +public function getParameterSchema(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 66. + +*** + +### getPromptSections + +#### Signature + +```php +public function getPromptSections(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 53. + +*** + +### getRequiredEnvVars + +#### Signature + +```php +public function getRequiredEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 33. + +*** + +### getVersion + +#### Signature + +```php +public function getVersion(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 28. + +*** + +### registerTools + +**Modifiers:** `abstract` + +#### Signature + +```php +public abstract function registerTools(): void +``` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 22. + +*** + +### setup + +**Modifiers:** `abstract` + +#### Signature + +```php +public abstract function setup(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 20. + +*** + +### supportsMultipleInstances + +#### Signature + +```php +public function supportsMultipleInstances(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 38. + +*** + +### validateEnvVars + +#### Signature + +```php +public function validateEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 100. + +## Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 7. diff --git a/fern/products/sdk-reference/php/signal-wire/skills/skills/skill-manager/index.mdx b/fern/products/sdk-reference/php/signal-wire/skills/skills/skill-manager/index.mdx new file mode 100644 index 0000000000..84d96c8ace --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/skills/skills/skill-manager/index.mdx @@ -0,0 +1,177 @@ +--- +slug: "/reference/php/signal-wire/skills/skills/skill-manager" +title: "SkillManager" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Skills\\SkillManager" + parent: "SignalWire\\Skills" + module: "SignalWire.Skills" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillManager.php" +--- +# `SkillManager` + +## Signature + +```php +class SkillManager +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(object $agent) +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Skills/SkillManager.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillManager.php) + +Line 13. + +*** + +### getSkill + +#### Signature + +```php +public function getSkill(string $key): ?SignalWire\Skills\SkillBase +``` + +#### Parameters + + + +#### Returns + +`?SignalWire\Skills\SkillBase` + +#### Source + +[`SignalWire/Skills/SkillManager.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillManager.php) + +Line 96. + +*** + +### hasSkill + +#### Signature + +```php +public function hasSkill(string $key): bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/SkillManager.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillManager.php) + +Line 91. + +*** + +### listSkills + +#### Signature + +```php +public function listSkills(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillManager.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillManager.php) + +Line 86. + +*** + +### loadSkill + +#### Signature + +```php +public function loadSkill( + string $skillName, + array $params = array ( +), + ?string $skillClass = NULL +): array +``` + +#### Parameters + + + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillManager.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillManager.php) + +Line 22. + +*** + +### unloadSkill + +#### Signature + +```php +public function unloadSkill(string $key): bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/SkillManager.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillManager.php) + +Line 74. + +## Source + +[`SignalWire/Skills/SkillManager.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillManager.php) + +Line 7. diff --git a/fern/products/sdk-reference/php/signal-wire/skills/skills/skill-registry/index.mdx b/fern/products/sdk-reference/php/signal-wire/skills/skills/skill-registry/index.mdx new file mode 100644 index 0000000000..ab85aa51ea --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/skills/skills/skill-registry/index.mdx @@ -0,0 +1,220 @@ +--- +slug: "/reference/php/signal-wire/skills/skills/skill-registry" +title: "SkillRegistry" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Skills\\SkillRegistry" + parent: "SignalWire\\Skills" + module: "SignalWire.Skills" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillRegistry.php" +--- +# `SkillRegistry` + +## Signature + +```php +class SkillRegistry +``` + +## Methods + +### addSkillDirectory + +Add a directory to search for skills. + +Mirrors Python's +`signalwire.skills.registry.SkillRegistry.add_skill_directory`: +validate that the path exists and is a directory, then append it +(de-duplicated) to the external paths list. Throws +`InvalidArgumentException` (the PHP analog of Python's `ValueError`) +for invalid input. + +#### Signature + +```php +public function addSkillDirectory(string $path): void +``` + +#### Parameters + + + +#### Throws + +- `\InvalidArgumentException` — when the path doesn't exist or isn't a directory. + +#### Source + +[`SignalWire/Skills/SkillRegistry.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillRegistry.php) + +Line 107. + +*** + +### getAllSkillsSchema + +Get complete schema for all registered skills. + +Mirrors Python's instance-method +`SkillRegistry.get_all_skills_schema()` — returns an associative +array keyed by skill name where each entry contains metadata + +parameter schema. PHP skills don't carry rich Python-style +parameter introspection in v1, so the value defaults to a minimal +shape with the skill name; built-ins that expose +`getDescription` / `getVersion` get those merged in. + +#### Signature + +```php +public function getAllSkillsSchema(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillRegistry.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillRegistry.php) + +Line 144. + +*** + +### getExternalPaths + +Returns the registered external skill directories. + +Parity surface for Python's `_external_paths`. + +#### Signature + +```php +public function getExternalPaths(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillRegistry.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillRegistry.php) + +Line 126. + +*** + +### getFactory + +#### Signature + +```php +public function getFactory(string $name): ?string +``` + +#### Parameters + + + +#### Returns + +`?string` + +#### Source + +[`SignalWire/Skills/SkillRegistry.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillRegistry.php) + +Line 47. + +*** + +### instance + +**Modifiers:** `static` + +#### Signature + +```php +public static function instance(): SignalWire\Skills\SkillRegistry +``` + +#### Returns + +`SignalWire\Skills\SkillRegistry` + +#### Source + +[`SignalWire/Skills/SkillRegistry.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillRegistry.php) + +Line 80. + +*** + +### listSkills + +#### Signature + +```php +public function listSkills(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillRegistry.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillRegistry.php) + +Line 64. + +*** + +### registerSkill + +#### Signature + +```php +public function registerSkill(string $name, string $className): void +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/Skills/SkillRegistry.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillRegistry.php) + +Line 42. + +*** + +### reset + +**Modifiers:** `static` + +#### Signature + +```php +public static function reset(): void +``` + +#### Source + +[`SignalWire/Skills/SkillRegistry.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillRegistry.php) + +Line 89. + +## Source + +[`SignalWire/Skills/SkillRegistry.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillRegistry.php) + +Line 7. diff --git a/fern/products/sdk-reference/php/signal-wire/swaig/swaig/function-result/index.mdx b/fern/products/sdk-reference/php/signal-wire/swaig/swaig/function-result/index.mdx new file mode 100644 index 0000000000..00b664e019 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/swaig/swaig/function-result/index.mdx @@ -0,0 +1,1674 @@ +--- +slug: "/reference/php/signal-wire/swaig/swaig/function-result" +title: "FunctionResult" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\SWAIG\\FunctionResult" + parent: "SignalWire\\SWAIG" + module: "SignalWire.SWAIG" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php" +--- +# `FunctionResult` + +## Signature + +```php +class FunctionResult +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(?string $response = '', bool $postProcess = false) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 13. + +*** + +### addAction + +#### Signature + +```php +public function addAction(array $action): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 33. + +*** + +### addActions + +#### Signature + +```php +public function addActions(array $actions): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 39. + +*** + +### addDynamicHints + +#### Signature + +```php +public function addDynamicHints(array $hints): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 430. + +*** + +### clearDynamicHints + +#### Signature + +```php +public function clearDynamicHints(): SignalWire\SWAIG\FunctionResult +``` + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 436. + +*** + +### connect + +#### Signature + +```php +public function connect( + string $destination, + bool $final = true, + string $from = '' +): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + + + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 80. + +*** + +### createPaymentAction + +Create a payment action for use in payment prompts. + +Parity: \{"type": $actionType, "phrase": $phrase\}. + +**Modifiers:** `static` + +#### Signature + +```php +public static function createPaymentAction(string $actionType, string $phrase): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 1131. + +*** + +### createPaymentParameter + +Create a payment parameter (name/value pair) for \{@see FunctionResult::pay()\}. + +Parity: \{"name": $name, "value": $value\}. + +**Modifiers:** `static` + +#### Signature + +```php +public static function createPaymentParameter(string $name, string $value): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 1145. + +*** + +### createPaymentPrompt + +Create a payment-prompt structure for use with \{@see FunctionResult::pay()\}. + +Parity with the Python reference `create_payment_prompt`: +\{"for": $forSituation, "actions": $actions, "card\_type"?, "error\_type"?\}. + +**Modifiers:** `static` + +#### Signature + +```php +public static function createPaymentPrompt( + string $forSituation, + array $actions, + ?string $cardType = NULL, + ?string $errorType = NULL +): array +``` + +#### Parameters + + + + + actions with 'type'/'phrase' keys. + + + + space-separated card types. + + + + space-separated error types. + + +#### Returns + +`array` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 1104. + +*** + +### enableExtensiveData + +#### Signature + +```php +public function enableExtensiveData( + bool $enabled = true +): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 475. + +*** + +### enableFunctionsOnTimeout + +#### Signature + +```php +public function enableFunctionsOnTimeout( + bool $enabled = true +): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 468. + +*** + +### executeRpc + +Execute an RPC method on a call using SWML. + +Parity with the Python reference `execute_rpc`: the rpc params are +keyed \{method, call\_id?, node\_id?, params?\} (call\_id/node\_id are +TOP-LEVEL siblings of method/params, NOT nested inside params) and the +\{"execute\_rpc": ...\} verb is wrapped in a full SWML document. There is +no `jsonrpc` envelope — method strings are bare (e.g. "dial", not +"calling.dial"). + +#### Signature + +```php +public function executeRpc( + string $method, + ?array $params = NULL, + ?string $callId = NULL, + ?string $nodeId = NULL +): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + + + optional RPC method parameters. + + + + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 1010. + +*** + +### executeSwml + +Execute SWML content with optional transfer behavior. Parity with the + +Python reference `execute_swml`: a string is parsed to an array (on parse +failure it is wrapped as \{"raw\_swml": <text>\}); when $transfer is true the +key "transfer" => "true" is set INSIDE the SWML document; the action is +ALWAYS added under the "SWML" key (there is no separate transfer key). + +#### Signature + +```php +public function executeSwml( + $swmlContent, + bool $transfer = false +): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + SWML JSON string or already-decoded array. + + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 499. + +*** + +### hangup + +#### Signature + +```php +public function hangup(): SignalWire\SWAIG\FunctionResult +``` + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 129. + +*** + +### hold + +#### Signature + +```php +public function hold(int $timeout = 300): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 136. + +*** + +### joinConference + +Join an ad-hoc audio conference with RELAY and CXML calls using SWML. + +Full parity with signalwire-python core/function\_result.py +`join_conference`: 18 optional parameters, 7 validations, and the +same simple/full emission. When every parameter is at its default the +payload collapses to the bare conference-NAME string +(\{"join\_conference": "<name>"\}); otherwise it is the object form keyed +by snake\_case wire keys, with each key emitted only when it differs +from its default. The \{"join\_conference": ...\} payload is wrapped in a +full SWML document and emitted through \{@see FunctionResult::executeSwml()\} +— the same path Python's `record_call` uses — so it lands under the +"SWML" action key. + +Note: Python uses `wait_url` (SWML URL) for hold music; there is no +`hold_audio` parameter. (The previously-invented `holdAudio`/`hold_audio` +had no Python equivalent and was removed.) + +#### Signature + +```php +public function joinConference( + string $name, + bool $muted = false, + string $beep = 'true', + bool $startOnEnter = true, + bool $endOnExit = false, + ?string $waitUrl = NULL, + int $maxParticipants = 250, + string $record = 'do-not-record', + ?string $region = NULL, + string $trim = 'trim-silence', + ?string $coach = NULL, + ?string $statusCallbackEvent = NULL, + ?string $statusCallback = NULL, + string $statusCallbackMethod = 'POST', + ?string $recordingStatusCallback = NULL, + string $recordingStatusCallbackMethod = 'POST', + string $recordingStatusCallbackEvent = 'completed', + mixed $result = NULL +): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Switch on return\_value when object \{\} or cond when array \[]; null to omit (parity with Python `Optional[Any]`). + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Throws + +- `\InvalidArgumentException` — on any of the 7 validation failures. + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 554. + +*** + +### joinRoom + +#### Signature + +```php +public function joinRoom(string $name): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 721. + +*** + +### pay + +Process payment using the SWML pay action. + +Full parity with the Python reference `pay` (19 user-facing params): the +SWML document runs `{set:{ai_response}}` then `{pay:{...}}`. The wire key +for the collection method is `input` (NOT `input_method`); numeric and +boolean fields are stringified ("5"/"true"); `postal_code` is emitted as a +lowercased bool-string when a bool, or verbatim when a string. Optional +fields (status\_url/charge\_amount/description/parameters/prompts) are +emitted only when supplied. + +#### Signature + +```php +public function pay( + string $paymentConnectorUrl, + string $inputMethod = 'dtmf', + ?string $statusUrl = NULL, + string $paymentMethod = 'credit-card', + int $timeout = 5, + int $maxAttempts = 1, + bool $securityCode = true, + string|bool $postalCode = true, + int $minPostalCodeLength = 0, + string $tokenType = 'reusable', + ?string $chargeAmount = NULL, + string $currency = 'usd', + string $language = 'en-US', + string $voice = 'woman', + ?string $description = NULL, + string $validCardTypes = 'visa mastercard amex', + ?array $parameters = NULL, + ?array $prompts = NULL, + ?string $aiResponse = 'The payment status is ${pay_result}, do not mention anything else about collecting payment if successful.' +): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + + + + + + + + + + + + + + + prompt-for-postal (bool) or an actual postcode (string). + + + + + + + + + + + + + + + + + + + + name/value pairs for the connector. + + + + custom prompt configs. + + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 924. + +*** + +### playBackgroundFile + +#### Signature + +```php +public function playBackgroundFile( + string $filename, + bool $wait = false +): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 298. + +*** + +### recordCall + +Start background call recording using SWML. + +Full parity with the Python reference `record_call`: validates the +format (\{wav,mp3,mp4\}) and direction (\{speak,listen,both\}) closed sets, +ALWAYS emits stereo/format/direction/beep/input\_sensitivity, adds the +optional fields only when supplied, and wraps the \{"record\_call": ...\} +verb in a full SWML document emitted via \{@see FunctionResult::executeSwml()\} +(so it lands under the "SWML" action key). + +#### Signature + +```php +public function recordCall( + ?string $controlId = NULL, + bool $stereo = false, + SignalWire\SWAIG\RecordFormat|string $format = 'wav', + SignalWire\SWAIG\RecordDirection|string $direction = 'both', + ?string $terminators = NULL, + bool $beep = false, + float $inputSensitivity = 44.0, + ?float $initialTimeout = NULL, + ?float $endSilenceTimeout = NULL, + ?float $maxLength = NULL, + ?string $statusUrl = NULL +): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + + + + + recording container format — the typed \{@see RecordFormat\} enum (typo-checked at the call site) or a bare string (parity with Python's `record_call`). Normalized to the wire string ('wav'/'mp3'/'mp4'). 'mp4' is valid for the SWML `record_call` verb, distinct from the RELAY `record` action's 2-value format set. + + + + stream direction — the typed \{@see RecordDirection\} enum (typo-checked at the call site) or a bare string (parity with Python's `record_call`). Normalized to the wire string ('speak'/'listen'/'both'). Note `record_call` uses 'listen' where \{@see FunctionResult::tap()\} uses 'hear' — distinct closed sets. + + + + + + + + + + + + + + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Throws + +- `\InvalidArgumentException` — on an invalid format or direction. + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 339. + +*** + +### removeGlobalData + +#### Signature + +```php +public function removeGlobalData(array|string $keys): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + single key or list of keys to remove + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 181. + +*** + +### removeMetadata + +#### Signature + +```php +public function removeMetadata(array|string $keys): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + single key or list of keys to remove + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 198. + +*** + +### replaceInHistory + +After first send, replace the tool\_call+result pair in history. + +#### Signature + +```php +public function replaceInHistory( + string|bool $text = true +): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + String -> replace the tool\_call with an assistant message containing this text. True (default) -> remove the pair entirely. + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 282. + +*** + +### rpcAiMessage + +Inject a message into an AI agent on another call using execute\_rpc. + +Parity: method="ai\_message", call\_id top-level, params=\{role, +message\_text\}. `role` defaults to "system". + +#### Signature + +```php +public function rpcAiMessage( + string $callId, + string $messageText, + string $role = 'system' +): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + + + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 1068. + +*** + +### rpcAiUnhold + +Unhold another call using execute\_rpc. + +Parity: method="ai\_unhold", call\_id top-level, params=\{\}. + +#### Signature + +```php +public function rpcAiUnhold(string $callId): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 1080. + +*** + +### rpcDial + +Dial out to a number with a destination SWML URL using execute\_rpc. + +Parity: method="dial", params=\{devices:\{type,params:\{to\_number, +from\_number\}\}, dest\_swml\}. + +#### Signature + +```php +public function rpcDial( + string $toNumber, + string $fromNumber, + string $destSwml, + string $deviceType = 'phone' +): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + + + + + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 1045. + +*** + +### say + +#### Signature + +```php +public function say(string $text): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 292. + +*** + +### sendSms + +Send a text message to a PSTN phone number using SWML. + +Full parity with the Python reference `send_sms`: either body or media +(or both) must be provided; the \{"send\_sms": ...\} verb is wrapped in a +full SWML document via executeSwml. Optional fields (body/media/tags/ +region) are emitted only when supplied. + +#### Signature + +```php +public function sendSms( + string $toNumber, + string $fromNumber, + ?string $body = NULL, + array $media = array ( +), + array $tags = array ( +), + ?string $region = NULL +): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + + + + + + + URLs to send (optional if $body is given). + + + + tags for UI searching. + + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Throws + +- `\InvalidArgumentException` — if neither body nor media is provided. + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 866. + +*** + +### setEndOfSpeechTimeout + +#### Signature + +```php +public function setEndOfSpeechTimeout(int $ms): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 446. + +*** + +### setMetadata + +#### Signature + +```php +public function setMetadata(array $data): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 189. + +*** + +### setPostProcess + +#### Signature + +```php +public function setPostProcess(bool $val): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 27. + +*** + +### setResponse + +#### Signature + +```php +public function setResponse(string $text): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 21. + +*** + +### setSpeechEventTimeout + +#### Signature + +```php +public function setSpeechEventTimeout(int $ms): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 452. + +*** + +### simulateUserInput + +#### Signature + +```php +public function simulateUserInput(string $text): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 1085. + +*** + +### sipRefer + +#### Signature + +```php +public function sipRefer(string $toUri): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 736. + +*** + +### stop + +#### Signature + +```php +public function stop(): SignalWire\SWAIG\FunctionResult +``` + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 164. + +*** + +### stopBackgroundFile + +#### Signature + +```php +public function stopBackgroundFile(): SignalWire\SWAIG\FunctionResult +``` + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 310. + +*** + +### stopRecordCall + +#### Signature + +```php +public function stopRecordCall( + ?string $controlId = NULL +): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 408. + +*** + +### stopTap + +#### Signature + +```php +public function stopTap(?string $controlId = NULL): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 834. + +*** + +### switchContext + +#### Signature + +```php +public function switchContext( + string $systemPrompt, + string $userPrompt = '', + bool $consolidate = false, + bool $fullReset = false, + bool $isolated = false +): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 238. + +*** + +### swmlChangeContext + +#### Signature + +```php +public function swmlChangeContext(string $contextName): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 231. + +*** + +### swmlChangeStep + +#### Signature + +```php +public function swmlChangeStep(string $stepName): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 224. + +*** + +### swmlTransfer + +Add a SWML transfer action with AI-response setup for when the transfer + +completes. Parity with the Python reference `swml_transfer`: builds a SWML +document whose `main` runs `{set:{ai_response}}` then `{transfer:{dest}}`, +and emits a top-level `transfer` = str($final).lower() that marks the call +(non-)final. `$final` defaults TRUE (permanent transfer), same as connect(). + +#### Signature + +```php +public function swmlTransfer( + string $dest, + string $aiResponse, + bool $final = true +): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + + + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 111. + +*** + +### swmlUserEvent + +#### Signature + +```php +public function swmlUserEvent(array $eventData): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 206. + +*** + +### tap + +Start background call tap using SWML. + +Full parity with the Python reference `tap`: validates direction +(\{speak,hear,both\}), codec (\{PCMU,PCMA\}) and rtp\_ptime (> 0); the only +always-emitted field is `uri`; control\_id/direction/codec/rtp\_ptime/ +status\_url are added only when they differ from their defaults; the +\{"tap": ...\} verb is wrapped in a full SWML document via executeSwml. + +#### Signature + +```php +public function tap( + string $uri, + ?string $controlId = NULL, + SignalWire\SWAIG\TapDirection|string $direction = 'both', + SignalWire\SWAIG\Codec|string $codec = 'PCMU', + int $rtpPtime = 20, + ?string $statusUrl = NULL +): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + + + + + stream direction — the typed \{@see TapDirection\} enum (typo-checked at the call site) or a bare string (parity with Python's `tap`). Normalized to the wire string ('speak'/'hear'/'both'). + + + + media codec — the typed \{@see Codec\} enum (typo-checked at the call site) or a bare string (parity with Python's `tap`). Normalized to the wire string ('PCMU'/'PCMA'). This is the SWAIG tap codec set only, NOT the larger RELAY stream/connect codec superset. + + + + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Throws + +- `\InvalidArgumentException` — on invalid direction, codec, or rtp\_ptime. + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 770. + +*** + +### toArray + +#### Signature + +```php +public function toArray(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 47. + +*** + +### toggleFunctions + +#### Signature + +```php +public function toggleFunctions(array $toggles): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 458. + +*** + +### toJson + +#### Signature + +```php +public function toJson(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 73. + +*** + +### updateGlobalData + +#### Signature + +```php +public function updateGlobalData(array $data): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 172. + +*** + +### updateSettings + +#### Signature + +```php +public function updateSettings(array $settings): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 481. + +*** + +### waitForUser + +#### Signature + +```php +public function waitForUser( + ?bool $enabled = NULL, + ?int $timeout = NULL, + bool $answerFirst = false +): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + + + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 145. + +## Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 7. diff --git a/fern/products/sdk-reference/php/signal-wire/swaig/swaig/index.mdx b/fern/products/sdk-reference/php/signal-wire/swaig/swaig/index.mdx new file mode 100644 index 0000000000..f96e97abee --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/swaig/swaig/index.mdx @@ -0,0 +1,512 @@ +--- +slug: "/reference/php/signal-wire/swaig/swaig" +title: "SWAIG" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "module" + language: "php" + qualified_name: "SignalWire\\SWAIG" + module: "SignalWire.SWAIG" +--- +# `SWAIG` + +## Signature + +```php +namespace SignalWire\SWAIG +``` + +## Classes + + + + + + Fluent, type-safe builder for a SWAIG tool's parameter schema. + + + +## Enums + +### Codec + +Media codec for call tapping, as a typed, compile-time-checked closed set. + +\{@see FunctionResult::tap()\} accepts this enum OR a string for its `$codec` +argument. The enum gives editor autocompletion and makes a typo fail at the +call site; strings keep parity with the Python reference (`tap` takes a bare +`str`). + +``` +$result->tap($uri, codec: Codec::Pcma); // typed +$result->tap($uri, codec: 'PCMA'); // string (parity) +``` + +The two members are the only codecs the Python reference's `tap` accepts +(`["PCMU", "PCMA"]`). The wire strings are upper-case and matching is +case-sensitive, mirroring the reference's literal list. + +NOTE: this is the SWAIG `tap` codec set ONLY. It is deliberately NOT shared +with the RELAY `stream`/`connect` codec superset +(`{PCMU,PCMA,OPUS,G729,G722,VP8,H264}`, comma-joinable) — those are a +distinct, larger vocabulary and must not be unified with this 2-value set. + +- `Pcmu` — `PCMU` (G.711 µ-law, the default). +- `Pcma` — `PCMA` (G.711 A-law). + +#### Signature + +```php +final enum Codec implements UnitEnum, BackedEnum +``` + +#### Inheritance + +**Implements:** `UnitEnum`, `BackedEnum` + +#### Properties + + + + + +#### Constants + + + + + +#### Variants + + + + + +#### Methods + +##### cases + +**Modifiers:** `static` + +###### Signature + +```php +public static function cases(): array +``` + +###### Returns + +`array` + +*** + +##### from + +**Modifiers:** `static` + +###### Signature + +```php +public static function from(string|int $value): static +``` + +###### Parameters + + + +###### Returns + +`static` + +*** + +##### tryFrom + +**Modifiers:** `static` + +###### Signature + +```php +public static function tryFrom(string|int $value): ?static +``` + +###### Parameters + + + +###### Returns + +`?static` + +#### Source + +[`SignalWire/SWAIG/Codec.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/Codec.php) + +Line 30. + +*** + +### RecordDirection + +Audio-stream direction for call recording, as a typed, compile-time-checked + +closed set. + +\{@see FunctionResult::recordCall()\} accepts this enum OR a string for its +`$direction` argument. The enum gives editor autocompletion and makes a typo +fail at the call site; strings keep parity with the Python reference +(`record_call` takes a bare `str`). + +``` +$result->recordCall(direction: RecordDirection::Listen); // typed +$result->recordCall(direction: 'listen'); // string (parity) +``` + +The three members are the only directions the Python reference's `record_call` +accepts (`["speak", "listen", "both"]`). Note this set uses `listen`, which +differs from \{@see TapDirection\} — the `tap` set uses `hear`. They are +deliberately separate enums because the reference validates two distinct lists. +The backing values are the exact wire strings. + +- `Speak` — audio the far end hears from the agent. +- `Listen` — audio the agent hears from the far end. +- `Both` — bidirectional (the default). + +#### Signature + +```php +final enum RecordDirection implements UnitEnum, BackedEnum +``` + +#### Inheritance + +**Implements:** `UnitEnum`, `BackedEnum` + +#### Properties + + + + + +#### Constants + + + + + + + +#### Variants + + + + + + + +#### Methods + +##### cases + +**Modifiers:** `static` + +###### Signature + +```php +public static function cases(): array +``` + +###### Returns + +`array` + +*** + +##### from + +**Modifiers:** `static` + +###### Signature + +```php +public static function from(string|int $value): static +``` + +###### Parameters + + + +###### Returns + +`static` + +*** + +##### tryFrom + +**Modifiers:** `static` + +###### Signature + +```php +public static function tryFrom(string|int $value): ?static +``` + +###### Parameters + + + +###### Returns + +`?static` + +#### Source + +[`SignalWire/SWAIG/RecordDirection.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/RecordDirection.php) + +Line 29. + +*** + +### RecordFormat + +Recording container format for call recording, as a typed, + +compile-time-checked closed set. + +\{@see FunctionResult::recordCall()\} accepts this enum OR a string for its +`$format` argument. The enum gives editor autocompletion and makes a typo +fail at the call site; strings keep parity with the Python reference +(`record_call` takes a bare `str`). + +``` +$result->recordCall(format: RecordFormat::Mp3); // typed +$result->recordCall(format: 'mp3'); // string (parity) +``` + +The three members are the only formats the Python reference's `record_call` +accepts (`["wav", "mp3", "mp4"]` — the SWML `record_call` verb schema; `mp4` +is valid here, distinct from the RELAY `record` action's 2-value +`audio.format` set). The backing values are the exact wire strings. + +- `Wav` — WAV container (the default). +- `Mp3` — MP3 container. +- `Mp4` — MP4 container. + +#### Signature + +```php +final enum RecordFormat implements UnitEnum, BackedEnum +``` + +#### Inheritance + +**Implements:** `UnitEnum`, `BackedEnum` + +#### Properties + + + + + +#### Constants + + + + + + + +#### Variants + + + + + + + +#### Methods + +##### cases + +**Modifiers:** `static` + +###### Signature + +```php +public static function cases(): array +``` + +###### Returns + +`array` + +*** + +##### from + +**Modifiers:** `static` + +###### Signature + +```php +public static function from(string|int $value): static +``` + +###### Parameters + + + +###### Returns + +`static` + +*** + +##### tryFrom + +**Modifiers:** `static` + +###### Signature + +```php +public static function tryFrom(string|int $value): ?static +``` + +###### Parameters + + + +###### Returns + +`?static` + +#### Source + +[`SignalWire/SWAIG/RecordFormat.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/RecordFormat.php) + +Line 28. + +*** + +### TapDirection + +Audio-stream direction for call tapping, as a typed, compile-time-checked + +closed set. + +\{@see FunctionResult::tap()\} accepts this enum OR a string for its +`$direction` argument. The enum gives editor autocompletion and makes a typo +fail at the call site; strings keep parity with the Python reference (`tap` +takes a bare `str`). + +``` +$result->tap($uri, direction: TapDirection::Speak); // typed +$result->tap($uri, direction: 'speak'); // string (parity) +``` + +The three members are the only directions the Python reference's `tap` accepts +(`["speak", "hear", "both"]`). Note this set uses `hear`, which differs from +\{@see RecordDirection\} — the `record_call` set uses `listen`. They are +deliberately separate enums because the reference validates two distinct lists. +The backing values are the exact wire strings. + +- `Speak` — audio the far end hears from the agent. +- `Hear` — audio the agent hears from the far end. +- `Both` — bidirectional (the default). + +#### Signature + +```php +final enum TapDirection implements UnitEnum, BackedEnum +``` + +#### Inheritance + +**Implements:** `UnitEnum`, `BackedEnum` + +#### Properties + + + + + +#### Constants + + + + + + + +#### Variants + + + + + + + +#### Methods + +##### cases + +**Modifiers:** `static` + +###### Signature + +```php +public static function cases(): array +``` + +###### Returns + +`array` + +*** + +##### from + +**Modifiers:** `static` + +###### Signature + +```php +public static function from(string|int $value): static +``` + +###### Parameters + + + +###### Returns + +`static` + +*** + +##### tryFrom + +**Modifiers:** `static` + +###### Signature + +```php +public static function tryFrom(string|int $value): ?static +``` + +###### Parameters + + + +###### Returns + +`?static` + +#### Source + +[`SignalWire/SWAIG/TapDirection.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/TapDirection.php) + +Line 29. diff --git a/fern/products/sdk-reference/php/signal-wire/swaig/swaig/parameter-schema/index.mdx b/fern/products/sdk-reference/php/signal-wire/swaig/swaig/parameter-schema/index.mdx new file mode 100644 index 0000000000..cce15968d9 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/swaig/swaig/parameter-schema/index.mdx @@ -0,0 +1,535 @@ +--- +slug: "/reference/php/signal-wire/swaig/swaig/parameter-schema" +title: "ParameterSchema" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\SWAIG\\ParameterSchema" + parent: "SignalWire\\SWAIG" + module: "SignalWire.SWAIG" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/ParameterSchema.php" +--- +# `ParameterSchema` + +Fluent, type-safe builder for a SWAIG tool's parameter schema. + +Defining a tool's parameters today means hand-writing the JSON-Schema +`properties` blob as a nested associative array — exactly the shape +\{@see \SignalWire\SWML\Service::defineTool()\} expects for its +`$parameters` argument: + +``` +$agent->defineTool('lookup', 'Look it up', [ + 'service' => ['type' => 'string', 'description' => 'The service'], + 'date' => ['type' => 'string', 'description' => 'YYYY-MM-DD'], +], $handler); +``` + +That untyped array is error-prone: a misspelled `'tpye'`, a wrong +nesting level, or an `enum` value that drifts from a closed set fails +silently at runtime (the model just sees a malformed schema). This +builder produces the **byte-identical** `properties` map type-safely — +one method per JSON-Schema property kind, with the kind, description, +and modifiers checked at the call site: + +``` +$params = ParameterSchema::create() + ->string('service', 'The service to look up') + ->string('date', 'YYYY-MM-DD') + ->enum('fmt', RecordFormat::cases(), 'Recording format') + ->required('service', 'date') + ->toArray(); // <- same array as the hand-written form + +$agent->defineTool('lookup', 'Look it up', $params, $handler); +``` + +This is a typed convenience over the SAME wire output, NOT a new +format. The untyped-array path keeps working unchanged; the builder is +purely additive (Python's reference takes a bare `Dict[str, Any]`, so +there is no Python equivalent — see PORT\_ADDITIONS.md). + +Two outputs, matching the two registration paths: + +- \{@see toArray()\} returns the bare `properties` map for the + `defineTool($name, $desc, $parameters, …)` slot. Per-`defineTool` + convention the schema-level `required` list has no home there, so + `required()` names are emitted as a per-property `'required' => true` + flag (the convention used by the built-in Math / WikipediaSearch + skills). +- \{@see toArgument()\} returns the full `argument` object + `{type: object, properties: {…}, required: […]}` for the + `registerSwaigFunction()` path, with `required` at the argument + level — byte-identical to the hand-written `argument` blocks (the + Joke / ApiNinjasTrivia / GoogleMaps skills). + +Each property carries a kind + description and accepts optional +modifiers (default, enum, format, nested items/object). Closed-set +enums integrate the Tier-1 typed enums +(\{@see RecordFormat\} / \{@see RecordDirection\} / \{@see TapDirection\} / +\{@see Codec\}) via \{@see enum()\} — pass `RecordFormat::cases()` and the +backing `->value` strings become the schema `enum` array. + +**Modifiers:** `final` + +## Signature + +```php +final class ParameterSchema +``` + +## Methods + +### array + +Add an `array` property whose elements are all of kind `$itemsKind` + +(`string`, `number`, `integer`, `boolean`, or `object`). + +For `object` items, pass a nested \{@see ParameterSchema\} via +`$opts['items_schema']` to describe the element shape. + +#### Signature + +```php +public function array( + string $name, + string $itemsKind, + string $description, + array $opts = array ( +) +): SignalWire\SWAIG\ParameterSchema +``` + +#### Parameters + + + + + + + + + +#### Returns + +`SignalWire\SWAIG\ParameterSchema` + +#### Source + +[`SignalWire/SWAIG/ParameterSchema.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/ParameterSchema.php) + +Line 164. + +*** + +### boolean + +Add a `boolean` property. + +#### Signature + +```php +public function boolean( + string $name, + string $description, + array $opts = array ( +) +): SignalWire\SWAIG\ParameterSchema +``` + +#### Parameters + + + + + + + +#### Returns + +`SignalWire\SWAIG\ParameterSchema` + +#### Source + +[`SignalWire/SWAIG/ParameterSchema.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/ParameterSchema.php) + +Line 121. + +*** + +### create + +Start a new, empty schema builder. + +**Modifiers:** `static` + +#### Signature + +```php +public static function create(): SignalWire\SWAIG\ParameterSchema +``` + +#### Returns + +`SignalWire\SWAIG\ParameterSchema` + +#### Source + +[`SignalWire/SWAIG/ParameterSchema.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/ParameterSchema.php) + +Line 81. + +*** + +### enum + +Add a closed-set `string` property whose value must be one of + +`$values`. + +The JSON-Schema kind is `string` with an `enum` constraint — the +wire shape the built-in skills already emit (e.g. Joke's +`{'type':'string','description':…,'enum':['jokes','dadjokes']}`). + +`$values` accepts: + +- a list of scalar wire values: `['jokes', 'dadjokes']`; +- the Tier-1 typed enums via `cases()`: `RecordFormat::cases()` — + each `\BackedEnum` is normalized to its backing `->value`, so + the typo-checked enum and the bare-string form produce the + SAME `enum` array. + +#### Signature + +```php +public function enum( + string $name, + array $values, + string $description, + array $opts = array ( +) +): SignalWire\SWAIG\ParameterSchema +``` + +#### Parameters + + + + + + + + + +#### Returns + +`SignalWire\SWAIG\ParameterSchema` + +#### Source + +[`SignalWire/SWAIG/ParameterSchema.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/ParameterSchema.php) + +Line 144. + +*** + +### integer + +Add an `integer` property. + +#### Signature + +```php +public function integer( + string $name, + string $description, + array $opts = array ( +) +): SignalWire\SWAIG\ParameterSchema +``` + +#### Parameters + + + + + + + +#### Returns + +`SignalWire\SWAIG\ParameterSchema` + +#### Source + +[`SignalWire/SWAIG/ParameterSchema.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/ParameterSchema.php) + +Line 111. + +*** + +### number + +Add a `number` property (JSON-Schema `number`: any numeric value). + +#### Signature + +```php +public function number( + string $name, + string $description, + array $opts = array ( +) +): SignalWire\SWAIG\ParameterSchema +``` + +#### Parameters + + + + + + + +#### Returns + +`SignalWire\SWAIG\ParameterSchema` + +#### Source + +[`SignalWire/SWAIG/ParameterSchema.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/ParameterSchema.php) + +Line 101. + +*** + +### object + +Add a nested `object` property described by another + +\{@see ParameterSchema\} (`$schema`). The nested schema's `required` +names are emitted at the nested-object level. + +#### Signature + +```php +public function object( + string $name, + SignalWire\SWAIG\ParameterSchema $schema, + string $description, + array $opts = array ( +) +): SignalWire\SWAIG\ParameterSchema +``` + +#### Parameters + + + + + + + + + +#### Returns + +`SignalWire\SWAIG\ParameterSchema` + +#### Source + +[`SignalWire/SWAIG/ParameterSchema.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/ParameterSchema.php) + +Line 194. + +*** + +### required + +Flag one or more already-declared (or yet-to-be-declared) property + +names as required. Idempotent; preserves first-seen order. + +#### Signature + +```php +public function required(string ...$names): SignalWire\SWAIG\ParameterSchema +``` + +#### Parameters + + + +#### Returns + +`SignalWire\SWAIG\ParameterSchema` + +#### Source + +[`SignalWire/SWAIG/ParameterSchema.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/ParameterSchema.php) + +Line 204. + +*** + +### requiredNames + +The required-property names, in declaration order. + +#### Signature + +```php +public function requiredNames(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/SWAIG/ParameterSchema.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/ParameterSchema.php) + +Line 270. + +*** + +### string + +Add a `string` property. + +#### Signature + +```php +public function string( + string $name, + string $description, + array $opts = array ( +) +): SignalWire\SWAIG\ParameterSchema +``` + +#### Parameters + + + + + + + +#### Returns + +`SignalWire\SWAIG\ParameterSchema` + +#### Source + +[`SignalWire/SWAIG/ParameterSchema.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/ParameterSchema.php) + +Line 91. + +*** + +### toArgument + +The full JSON-Schema `argument` object: + +`{type: 'object', properties: {…}}`, plus a top-level `required` +list when any names were flagged. + +Byte-identical to the hand-written `argument` blocks used with +\{@see \SignalWire\SWML\Service::registerSwaigFunction()\} (the Joke / +ApiNinjasTrivia / GoogleMaps skills). Here `required` lives at the +argument level, so individual properties are NOT marked — use this +form, not \{@see toArray()\}, when you want the schema-level list. + +#### Signature + +```php +public function toArgument(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/SWAIG/ParameterSchema.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/ParameterSchema.php) + +Line 253. + +*** + +### toArray + +The bare JSON-Schema `properties` map — the value + +\{@see \SignalWire\SWML\Service::defineTool()\} expects for its +`$parameters` argument. + +Byte-identical to the hand-written nested-array form. Because the +`defineTool` slot carries no schema-level `required`, names passed +to \{@see required()\} surface as a per-property `'required' => true` +flag on each matching property (the Math / WikipediaSearch skill +convention). Use \{@see toArgument()\} when you want the schema-level +`required` list instead. + +#### Signature + +```php +public function toArray(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/SWAIG/ParameterSchema.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/ParameterSchema.php) + +Line 228. + +## Source + +[`SignalWire/SWAIG/ParameterSchema.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/ParameterSchema.php) + +Line 62. diff --git a/fern/products/sdk-reference/php/signal-wire/swml/swml/document/index.mdx b/fern/products/sdk-reference/php/signal-wire/swml/swml/document/index.mdx new file mode 100644 index 0000000000..b6b8d8d7bc --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/swml/swml/document/index.mdx @@ -0,0 +1,323 @@ +--- +slug: "/reference/php/signal-wire/swml/swml/document" +title: "Document" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\SWML\\Document" + parent: "SignalWire\\SWML" + module: "SignalWire.SWML" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Document.php" +--- +# `Document` + +## Signature + +```php +class Document +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct() +``` + +#### Source + +[`SignalWire/SWML/Document.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Document.php) + +Line 14. + +*** + +### addRawVerb + +Append a pre-formatted verb hash to a section. + +#### Signature + +```php +public function addRawVerb(string $section, array $verbHash): void +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/SWML/Document.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Document.php) + +Line 73. + +*** + +### addSection + +Add a new named section. Returns true if created, false if it already existed. + +#### Signature + +```php +public function addSection(string $name): bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`SignalWire/SWML/Document.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Document.php) + +Line 27. + +*** + +### addVerb + +Append a verb to the main section. + +#### Signature + +```php +public function addVerb(string $verbName, mixed $config): void +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/SWML/Document.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Document.php) + +Line 54. + +*** + +### addVerbToSection + +Append a verb to a named section. + +#### Signature + +```php +public function addVerbToSection( + string $section, + string $verbName, + mixed $config +): void +``` + +#### Parameters + + + + + + + +#### Source + +[`SignalWire/SWML/Document.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Document.php) + +Line 62. + +*** + +### clearSection + +Clear all verbs in a section. + +#### Signature + +```php +public function clearSection(string $section): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/SWML/Document.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Document.php) + +Line 84. + +*** + +### getVerbs + +Get a copy of the verbs for a section. + +#### Signature + +```php +public function getVerbs(string $section = 'main'): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/SWML/Document.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Document.php) + +Line 46. + +*** + +### getVersion + +#### Signature + +```php +public function getVersion(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/SWML/Document.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Document.php) + +Line 19. + +*** + +### hasSection + +#### Signature + +```php +public function hasSection(string $name): bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`SignalWire/SWML/Document.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Document.php) + +Line 36. + +*** + +### render + +Compact JSON string. + +#### Signature + +```php +public function render(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/SWML/Document.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Document.php) + +Line 115. + +*** + +### renderPretty + +Pretty-printed JSON string. + +#### Signature + +```php +public function renderPretty(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/SWML/Document.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Document.php) + +Line 123. + +*** + +### reset + +Reset document to initial state. + +#### Signature + +```php +public function reset(): void +``` + +#### Source + +[`SignalWire/SWML/Document.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Document.php) + +Line 94. + +*** + +### toArray + +Return document as associative array. + +#### Signature + +```php +public function toArray(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/SWML/Document.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Document.php) + +Line 104. + +## Source + +[`SignalWire/SWML/Document.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Document.php) + +Line 7. diff --git a/fern/products/sdk-reference/php/signal-wire/swml/swml/index.mdx b/fern/products/sdk-reference/php/signal-wire/swml/swml/index.mdx new file mode 100644 index 0000000000..ed45b0589b --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/swml/swml/index.mdx @@ -0,0 +1,29 @@ +--- +slug: "/reference/php/signal-wire/swml/swml" +title: "SWML" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "module" + language: "php" + qualified_name: "SignalWire\\SWML" + module: "SignalWire.SWML" +--- +# `SWML` + +## Signature + +```php +namespace SignalWire\SWML +``` + +## Classes + + + + + + + + diff --git a/fern/products/sdk-reference/php/signal-wire/swml/swml/schema/index.mdx b/fern/products/sdk-reference/php/signal-wire/swml/swml/schema/index.mdx new file mode 100644 index 0000000000..6dcf0a3cee --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/swml/swml/schema/index.mdx @@ -0,0 +1,165 @@ +--- +slug: "/reference/php/signal-wire/swml/swml/schema" +title: "Schema" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\SWML\\Schema" + parent: "SignalWire\\SWML" + module: "SignalWire.SWML" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Schema.php" +--- +# `Schema` + +## Signature + +```php +class Schema +``` + +## Methods + +### getVerb + +Get verb metadata, or null if not found. + +#### Signature + +```php +public function getVerb(string $name): ?array +``` + +#### Parameters + + + +#### Returns + +`?array` + +#### Source + +[`SignalWire/SWML/Schema.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Schema.php) + +Line 62. + +*** + +### getVerbNames + +Get sorted list of all verb names. + +#### Signature + +```php +public function getVerbNames(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/SWML/Schema.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Schema.php) + +Line 50. + +*** + +### instance + +**Modifiers:** `static` + +#### Signature + +```php +public static function instance(): SignalWire\SWML\Schema +``` + +#### Returns + +`SignalWire\SWML\Schema` + +#### Source + +[`SignalWire/SWML/Schema.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Schema.php) + +Line 21. + +*** + +### isValidVerb + +Check whether a verb name is valid. + +#### Signature + +```php +public function isValidVerb(string $name): bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`SignalWire/SWML/Schema.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Schema.php) + +Line 40. + +*** + +### reset + +Reset the singleton (for testing). + +**Modifiers:** `static` + +#### Signature + +```php +public static function reset(): void +``` + +#### Source + +[`SignalWire/SWML/Schema.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Schema.php) + +Line 32. + +*** + +### verbCount + +Number of verbs defined in the schema. + +#### Signature + +```php +public function verbCount(): int +``` + +#### Returns + +`int` + +#### Source + +[`SignalWire/SWML/Schema.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Schema.php) + +Line 70. + +## Source + +[`SignalWire/SWML/Schema.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Schema.php) + +Line 7. diff --git a/fern/products/sdk-reference/php/signal-wire/swml/swml/service/index.mdx b/fern/products/sdk-reference/php/signal-wire/swml/swml/service/index.mdx new file mode 100644 index 0000000000..7e42522865 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/swml/swml/service/index.mdx @@ -0,0 +1,958 @@ +--- +slug: "/reference/php/signal-wire/swml/swml/service" +title: "Service" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\SWML\\Service" + parent: "SignalWire\\SWML" + module: "SignalWire.SWML" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php" +--- +# `Service` + +## Signature + +```php +class Service +``` + +## Methods + +### \_\_call + +Dynamic verb methods from schema. + +$service->answer('main', \['max\_duration' => 3600]); +$service->sleep('main', 2000); +$service->hangup(); + +#### Signature + +```php +public function __call(string $method, array $args): static +``` + +#### Parameters + + + + + +#### Returns + +`static` + +#### Source + +[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) + +Line 114. + +*** + +### \_\_construct + +#### Signature + +```php +public function __construct( + string $name, + string $route = '/', + ?string $host = NULL, + ?int $port = NULL, + ?string $basicAuthUser = NULL, + ?string $basicAuthPassword = NULL +) +``` + +#### Parameters + + + + + + + + + + + + + +#### Source + +[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) + +Line 50. + +*** + +### defineTool + +Define a SWAIG function the AI can call. + +Tool descriptions and parameter descriptions are LLM-facing prompt +engineering, not internal documentation. See PORTING\_GUIDE for guidance. + +#### Signature + +```php +public function defineTool( + string $name, + string $description, + array $parameters, + callable $handler, + bool $secure = false +): static +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`static` + +#### Source + +[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) + +Line 226. + +*** + +### defineTools + +Register multiple tool definitions at once. + +#### Signature + +```php +public function defineTools(array $toolDefs): static +``` + +#### Parameters + + + +#### Returns + +`static` + +#### Source + +[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) + +Line 268. + +*** + +### dispatchFromGlobals + +Dispatch the current PHP request (cli-server / php-fpm / mod\_php) to + +handleRequest() and write the response. Must be called inside a SAPI +that has populated $\_SERVER for the inbound request. + +#### Signature + +```php +public function dispatchFromGlobals(): void +``` + +#### Source + +[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) + +Line 773. + +*** + +### extractSipUsername + +Extract SIP username from a request body. + +Validates format: only \[a-zA-Z0-9.\_-], max 64 chars. + +**Modifiers:** `static` + +#### Signature + +```php +public static function extractSipUsername(?array $requestBody): ?string +``` + +#### Parameters + + + +#### Returns + +`?string` + +#### Source + +[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) + +Line 648. + +*** + +### getAllFunctions + +Snapshot of all registered SWAIG functions keyed by name. + +Python parity: `ToolRegistry.get_all_functions`. + +#### Signature + +```php +public function getAllFunctions(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) + +Line 306. + +*** + +### getBasicAuthCredentials + +#### Signature + +```php +public function getBasicAuthCredentials(): array +``` + +#### Returns + +`array` — \[user, password] + +#### Source + +[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) + +Line 161. + +*** + +### getBasicAuthCredentialsWithSource + +Get (user, password, source) where source is "provided", + +"environment", or "generated". Python parity: +AuthMixin.get\_basic\_auth\_credentials(include\_source=True). + +#### Signature + +```php +public function getBasicAuthCredentialsWithSource(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) + +Line 178. + +*** + +### getDocument + +#### Signature + +```php +public function getDocument(): SignalWire\SWML\Document +``` + +#### Returns + +`SignalWire\SWML\Document` + +#### Source + +[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) + +Line 444. + +*** + +### getFullUrl + +Build the full URL for this service. + +#### Signature + +```php +public function getFullUrl(bool $includeAuth = false): string +``` + +#### Parameters + + + +#### Returns + +`string` + +#### Source + +[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) + +Line 198. + +*** + +### getFunction + +Get a registered SWAIG function by name, or null when absent. + +Python parity: `ToolRegistry.get_function`. + +#### Signature + +```php +public function getFunction(string $name): ?array +``` + +#### Parameters + + + +#### Returns + +`?array` + +#### Source + +[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) + +Line 299. + +*** + +### getHost + +#### Signature + +```php +public function getHost(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) + +Line 434. + +*** + +### getName + +#### Signature + +```php +public function getName(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) + +Line 424. + +*** + +### getPort + +#### Signature + +```php +public function getPort(): int +``` + +#### Returns + +`int` + +#### Source + +[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) + +Line 439. + +*** + +### getProxyUrlBase + +Detect or construct the proxy URL base from request headers. + +#### Signature + +```php +public function getProxyUrlBase(array $headers = array ( +)): string +``` + +#### Parameters + + + +#### Returns + +`string` + +#### Source + +[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) + +Line 682. + +*** + +### getRoute + +#### Signature + +```php +public function getRoute(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) + +Line 429. + +*** + +### getSchemaUtils + +SchemaUtils helper bound to this Service. Mirrors Python's + +self.schema\_utils public instance attribute on SWMLService. +Built lazily on first access. + +#### Signature + +```php +public function getSchemaUtils(): SignalWire\Utils\SchemaUtils +``` + +#### Returns + +`SignalWire\Utils\SchemaUtils` + +#### Source + +[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) + +Line 454. + +*** + +### getToolNames + +Return the names of registered tools in the order they were + +registered. Stable ordering matters for CLI output and for +tests that rely on deterministic enumeration. + +#### Signature + +```php +public function getToolNames(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) + +Line 327. + +*** + +### getTools + +Return the registered SWAIG tool definitions. + +Used by introspection (CLI --list-tools, the skills audit +harness, and any test that needs to inspect what's been +registered without going through a HTTP round trip). + +#### Signature + +```php +public function getTools(): array +``` + +#### Returns + +`array` — name => tool definition + +#### Source + +[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) + +Line 285. + +*** + +### handleRequest + +Handle an HTTP request. Returns \[status, headers, body]. + +#### Signature + +```php +public function handleRequest( + string $method, + string $path, + array $headers = array ( +), + ?string $body = NULL +): array +``` + +#### Parameters + + + + + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) + +Line 489. + +*** + +### hasFunction + +Whether a SWAIG function with the given name is registered. + +Python parity: `ToolRegistry.has_function`. + +#### Signature + +```php +public function hasFunction(string $name): bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) + +Line 292. + +*** + +### onFunctionCall + +Dispatch a function call to the registered handler. + +#### Signature + +```php +public function onFunctionCall( + string $name, + array $args, + array $rawData +): ?SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + + + + + +#### Returns + +`?SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) + +Line 335. + +*** + +### onRequest + +Customization hook called when SWML is requested. Default + +delegates to \{@see onSwmlRequest()\}; subclasses typically +override `onSwmlRequest` rather than this method. + +Return null to use the default SWML rendering, or an array of +modifications to merge into the rendered document. + +Python parity: WebMixin.on\_request(request\_data, callback\_path). +The Python third `request` arg is FastAPI-specific and is not +mirrored. + +#### Signature + +```php +public function onRequest( + ?array $requestData = NULL, + ?string $callbackPath = NULL +): ?array +``` + +#### Parameters + + + + + +#### Returns + +`?array` + +#### Source + +[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) + +Line 402. + +*** + +### onSwmlRequest + +Customization point for subclasses to modify SWML based on + +request data. The default implementation returns null (no +modification). Subclasses override to inspect the body or +callback path and return an associative array of overrides. + +Python parity: WebMixin.on\_swml\_request(request\_data, callback\_path). + +#### Signature + +```php +public function onSwmlRequest( + ?array $requestData = NULL, + ?string $callbackPath = NULL +): ?array +``` + +#### Parameters + + + + + +#### Returns + +`?array` + +#### Source + +[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) + +Line 415. + +*** + +### registerRoutingCallback + +#### Signature + +```php +public function registerRoutingCallback(string $path, callable $callback): void +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) + +Line 211. + +*** + +### registerSwaigFunction + +Register a raw SWAIG function definition (e.g. DataMap tools). + +#### Signature + +```php +public function registerSwaigFunction(array $funcDef): static +``` + +#### Parameters + + + +#### Returns + +`static` + +#### Source + +[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) + +Line 252. + +*** + +### removeFunction + +Remove a registered SWAIG function. True on success, false if absent. + +Python parity: `ToolRegistry.remove_function`. + +#### Signature + +```php +public function removeFunction(string $name): bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) + +Line 313. + +*** + +### render + +#### Signature + +```php +public function render(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) + +Line 462. + +*** + +### renderPretty + +#### Signature + +```php +public function renderPretty(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) + +Line 467. + +*** + +### renderSwml + +Render SWML for a request. Subclasses override this. + +#### Signature + +```php +public function renderSwml( + ?array $requestBody = NULL, + array $headers = array ( +) +): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) + +Line 475. + +*** + +### run + +Run the service (alias for serve). + +#### Signature + +```php +public function run(): void +``` + +#### Source + +[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) + +Line 763. + +*** + +### serve + +Start serving using PHP's built-in server (blocking). + +In CLI mode: spawns `php -S host:port ` where entry-script +is the example file the user ran. The entry script is responsible for +(re)building the service and calling run() — under the cli-server SAPI, +run() dispatches from $\_SERVER instead of re-spawning. + +Under cli-server SAPI: directly dispatches the inbound request to +handleRequest() and writes the result to the response. + +#### Signature + +```php +public function serve(): void +``` + +#### Source + +[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) + +Line 731. + +*** + +### validateBasicAuth + +Validate provided basic-auth credentials against the configured ones + +using a constant-time comparison. Python parity: +AuthMixin.validate\_basic\_auth(username, password). + +#### Signature + +```php +public function validateBasicAuth(string $username, string $password): bool +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) + +Line 169. + +## Source + +[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) + +Line 11. diff --git a/fern/products/sdk-reference/php/signal-wire/utils/utils/index.mdx b/fern/products/sdk-reference/php/signal-wire/utils/utils/index.mdx new file mode 100644 index 0000000000..dc6cae9256 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/utils/utils/index.mdx @@ -0,0 +1,35 @@ +--- +slug: "/reference/php/signal-wire/utils/utils" +title: "Utils" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "module" + language: "php" + qualified_name: "SignalWire\\Utils" + module: "SignalWire.Utils" +--- +# `Utils` + +## Signature + +```php +namespace SignalWire\Utils +``` + +## Classes + + + + SchemaUtils — PHP port of signalwire.utils.schema\_utils.SchemaUtils. + + + + SchemaValidationError — PHP port of + + + + SSRF-prevention guard for user-supplied URLs. + + diff --git a/fern/products/sdk-reference/php/signal-wire/utils/utils/schema-utils/index.mdx b/fern/products/sdk-reference/php/signal-wire/utils/utils/schema-utils/index.mdx new file mode 100644 index 0000000000..c80e6869a2 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/utils/utils/schema-utils/index.mdx @@ -0,0 +1,345 @@ +--- +slug: "/reference/php/signal-wire/utils/utils/schema-utils" +title: "SchemaUtils" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Utils\\SchemaUtils" + parent: "SignalWire\\Utils" + module: "SignalWire.Utils" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Utils/SchemaUtils.php" +--- +# `SchemaUtils` + +SchemaUtils — PHP port of signalwire.utils.schema\_utils.SchemaUtils. + +Loads the SWML JSON Schema, extracts verb metadata, and validates +either a single verb config or a complete SWML document. + +Construction rules mirror Python: + +- Pass schemaPath=null to use the bundled schema.json. +- schemaValidation=false disables validation (validate\_verb returns + valid=true for every call). +- The env var SWML\_SKIP\_SCHEMA\_VALIDATION=1/true/yes also disables + validation regardless of the constructor argument. + +The PHP port currently ships only the lightweight validator (verb +existence + required-property check). Full JSON Schema validation +can be wired in via justinrainbow/json-schema by extending +initFullValidator(). The lightweight contract matches Python's +\_validate\_verb\_lightweight() exactly. + +**Modifiers:** `final` + +## Signature + +```php +final class SchemaUtils +``` + +## Methods + +### \_\_construct + +Construct a SchemaUtils. + +#### Signature + +```php +public function __construct(?string $schemaPath = NULL, bool $schemaValidation = true) +``` + +#### Parameters + + + Path to a schema.json file; null for the bundled copy. + + + + Whether to enable schema validation (env override applies). + + +#### Source + +[`SignalWire/Utils/SchemaUtils.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Utils/SchemaUtils.php) + +Line 56. + +*** + +### generateMethodBody + +Generate a Python-style method body string for a verb. + +Mirrors Python's generate\_method\_body(verb\_name). + +#### Signature + +```php +public function generateMethodBody(string $verbName): string +``` + +#### Parameters + + + +#### Returns + +`string` + +#### Source + +[`SignalWire/Utils/SchemaUtils.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Utils/SchemaUtils.php) + +Line 344. + +*** + +### generateMethodSignature + +Generate a Python-style method signature string for a verb. + +Mirrors Python's generate\_method\_signature(verb\_name). + +#### Signature + +```php +public function generateMethodSignature(string $verbName): string +``` + +#### Parameters + + + +#### Returns + +`string` + +#### Source + +[`SignalWire/Utils/SchemaUtils.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Utils/SchemaUtils.php) + +Line 309. + +*** + +### getAllVerbNames + +Sorted list of all known verb names. + +Mirrors Python's get\_all\_verb\_names(). + +#### Signature + +```php +public function getAllVerbNames(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Utils/SchemaUtils.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Utils/SchemaUtils.php) + +Line 180. + +*** + +### getVerbParameters + +Parameter-definition block used by code-gen tooling. + +Mirrors Python's get\_verb\_parameters(verb\_name). + +#### Signature + +```php +public function getVerbParameters(string $verbName): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/Utils/SchemaUtils.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Utils/SchemaUtils.php) + +Line 232. + +*** + +### getVerbProperties + +The properties\[verb\_name] block for a verb, or \[] when unknown. + +Mirrors Python's get\_verb\_properties(verb\_name). + +#### Signature + +```php +public function getVerbProperties(string $verbName): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/Utils/SchemaUtils.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Utils/SchemaUtils.php) + +Line 193. + +*** + +### getVerbRequiredProperties + +The required list for a verb, or \[] when unknown / no required. + +Mirrors Python's get\_verb\_required\_properties(verb\_name). + +#### Signature + +```php +public function getVerbRequiredProperties(string $verbName): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/Utils/SchemaUtils.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Utils/SchemaUtils.php) + +Line 216. + +*** + +### isFullValidationAvailable + +Whether full JSON Schema validation is wired up. + +Mirrors Python's full\_validation\_available property. + +#### Signature + +```php +public function isFullValidationAvailable(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Utils/SchemaUtils.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Utils/SchemaUtils.php) + +Line 169. + +*** + +### loadSchema + +Read and parse the JSON Schema. Mirrors Python's load\_schema(). + +#### Signature + +```php +public function loadSchema(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Utils/SchemaUtils.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Utils/SchemaUtils.php) + +Line 79. + +*** + +### validateDocument + +Validate a complete SWML document. Mirrors Python's + +validate\_document(document). Returns (false, \['Schema validator +not initialized']) when no full validator is wired in. + +#### Signature + +```php +public function validateDocument(array $document): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/Utils/SchemaUtils.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Utils/SchemaUtils.php) + +Line 296. + +*** + +### validateVerb + +Validate a verb config against the schema. + +Mirrors Python's validate\_verb(verb\_name, verb\_config). + +#### Signature + +```php +public function validateVerb(string $verbName, array $verbConfig): array +``` + +#### Parameters + + + + + +#### Returns + +`array` — Tuple of (valid, errors). + +#### Source + +[`SignalWire/Utils/SchemaUtils.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Utils/SchemaUtils.php) + +Line 249. + +## Source + +[`SignalWire/Utils/SchemaUtils.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Utils/SchemaUtils.php) + +Line 33. diff --git a/fern/products/sdk-reference/php/signal-wire/utils/utils/schema-validation-error/index.mdx b/fern/products/sdk-reference/php/signal-wire/utils/utils/schema-validation-error/index.mdx new file mode 100644 index 0000000000..94d83a39a5 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/utils/utils/schema-validation-error/index.mdx @@ -0,0 +1,109 @@ +--- +slug: "/reference/php/signal-wire/utils/utils/schema-validation-error" +title: "SchemaValidationError" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Utils\\SchemaValidationError" + parent: "SignalWire\\Utils" + module: "SignalWire.Utils" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Utils/SchemaValidationError.php" +--- +# `SchemaValidationError` + +SchemaValidationError — PHP port of + +signalwire.utils.schema\_utils.SchemaValidationError. + +Thrown when SWML schema validation of a verb config fails. + +## Signature + +```php +class SchemaValidationError extends RuntimeException implements Stringable, Throwable +``` + +## Inheritance + +**Extends:** `RuntimeException` + +**Implements:** `Stringable`, `Throwable` + +## Methods + +### \_\_construct + +Construct a SchemaValidationError. Mirrors Python's + +SchemaValidationError(verb\_name, errors). + +#### Signature + +```php +public function __construct(string $verbName, array $errors) +``` + +#### Parameters + + + the verb whose validation failed + + + + human-readable error messages + + +#### Source + +[`SignalWire/Utils/SchemaValidationError.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Utils/SchemaValidationError.php) + +Line 34. + +*** + +### getErrors + +#### Signature + +```php +public function getErrors(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Utils/SchemaValidationError.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Utils/SchemaValidationError.php) + +Line 48. + +*** + +### getVerbName + +#### Signature + +```php +public function getVerbName(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Utils/SchemaValidationError.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Utils/SchemaValidationError.php) + +Line 42. + +## Source + +[`SignalWire/Utils/SchemaValidationError.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Utils/SchemaValidationError.php) + +Line 20. diff --git a/fern/products/sdk-reference/php/signal-wire/utils/utils/url-validator/index.mdx b/fern/products/sdk-reference/php/signal-wire/utils/utils/url-validator/index.mdx new file mode 100644 index 0000000000..83097210a7 --- /dev/null +++ b/fern/products/sdk-reference/php/signal-wire/utils/utils/url-validator/index.mdx @@ -0,0 +1,100 @@ +--- +slug: "/reference/php/signal-wire/utils/utils/url-validator" +title: "UrlValidator" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Utils\\UrlValidator" + parent: "SignalWire\\Utils" + module: "SignalWire.Utils" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Utils/UrlValidator.php" +--- +# `UrlValidator` + +SSRF-prevention guard for user-supplied URLs. + +Mirrors Python's signalwire.utils.url\_validator.validate\_url: +rejects non-http(s) schemes, missing hostnames, and any URL whose +hostname resolves to a private / loopback / link-local / cloud-metadata +IP. The $allowPrivate parameter, OR the SWML\_ALLOW\_PRIVATE\_URLS env +var with value "1", "true" or "yes" (case-insensitive), bypasses the +IP-blocklist check. + +The static method validateUrl projects onto the Python free function +signalwire.utils.url\_validator.validate\_url via +scripts/enumerate\_signatures.py. + +**Modifiers:** `final` + +## Signature + +```php +final class UrlValidator +``` + +## Properties + + + Pluggable resolver. Tests inject a callable to keep the suite hermetic; production calls dns\_get\_record/gethostbynamel. Signature: function(string $hostname): ?array (array of IP strings, or null on resolution failure). + + +## Constants + + + +## Methods + +### validateUrl + +Validate that a URL is safe to fetch. + +**Modifiers:** `static` + +#### Signature + +```php +public static function validateUrl(string $url, bool $allowPrivate = false): bool +``` + +#### Parameters + + + URL to validate. + + + + When true, bypass the IP-blocklist check. + + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Utils/UrlValidator.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Utils/UrlValidator.php) + +Line 62. + +## Source + +[`SignalWire/Utils/UrlValidator.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Utils/UrlValidator.php) + +Line 30. diff --git a/fern/products/sdk-reference/python/_meta.json b/fern/products/sdk-reference/python/_meta.json new file mode 100644 index 0000000000..c6cee27f71 --- /dev/null +++ b/fern/products/sdk-reference/python/_meta.json @@ -0,0 +1,10 @@ +{ + "language": "python", + "sdk_name": "signalwire", + "version": null, + "source_repo": "https://github.com/signalwire/signalwire-python", + "format": "mdx", + "platform": "fern", + "base_slug": "/reference/python", + "item_count": 2478 +} \ No newline at end of file diff --git a/fern/products/sdk-reference/python/index.mdx b/fern/products/sdk-reference/python/index.mdx new file mode 100644 index 0000000000..e32f140e72 --- /dev/null +++ b/fern/products/sdk-reference/python/index.mdx @@ -0,0 +1,14 @@ +--- +title: "Python SDK" +slug: "/reference/python" +lustri: + auto_generated: true + language: "python" + kind: "sdk" +--- +# Python SDK Reference + +## Modules + +- [`signalwire`](/docs/sdk-reference/reference/python/signalwire) + diff --git a/fern/products/sdk-reference/python/signalwire/agent-server/agent-server/add-security-headers.mdx b/fern/products/sdk-reference/python/signalwire/agent-server/agent-server/add-security-headers.mdx new file mode 100644 index 0000000000..b5887cf098 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/agent-server/agent-server/add-security-headers.mdx @@ -0,0 +1,37 @@ +--- +slug: "/reference/python/signalwire/agent-server/agent-server/add-security-headers" +title: "add_security_headers" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "function" + language: "python" + qualified_name: "signalwire.agent_server.AgentServer.__init__.add_security_headers" + parent: "signalwire.agent_server.AgentServer.__init__" + module: "signalwire.agent_server" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/agent_server.py" +--- +# `add_security_headers` + +**Modifiers:** `async` + +**Decorators:** `@self.app.middleware('http')` + +## Signature + +```python +async add_security_headers(request, call_next) +``` + +## Parameters + + + + + +## Source + +[`signalwire/signalwire/agent_server.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/agent_server.py) + +Line 72. diff --git a/fern/products/sdk-reference/python/signalwire/agent-server/agent-server/index.mdx b/fern/products/sdk-reference/python/signalwire/agent-server/agent-server/index.mdx new file mode 100644 index 0000000000..9249f14392 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/agent-server/agent-server/index.mdx @@ -0,0 +1,403 @@ +--- +slug: "/reference/python/signalwire/agent-server/agent-server" +title: "AgentServer" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.agent_server.AgentServer" + parent: "signalwire.agent_server" + module: "signalwire.agent_server" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/agent_server.py" +--- +# `AgentServer` + +Server for hosting multiple SignalWire AI Agents under a single FastAPI application. + +This allows you to run multiple agents on different routes of the same server, +which is useful for deployment and resource management. + +> \[!NOTE] +> server = AgentServer() +> server.register(SupportAgent(), "/support") +> server.register(SalesAgent(), "/sales") +> server.run() + +## Signature + +```python +class AgentServer +``` + +## Properties + + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +Initialize a new agent server + +#### Signature + +```python +__init__(host: str = '0.0.0.0', port: int = 3000, log_level: str = 'info') +``` + +#### Parameters + + + Host to bind the server to + + + + Port to bind the server to + + + + Logging level (debug, info, warning, error, critical) + + +#### Source + +[`signalwire/signalwire/agent_server.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/agent_server.py) + +Line 45. + +*** + +### get\_agent + +Get an agent by route + +#### Signature + +```python +get_agent(route: str) -> Optional[AgentBase] +``` + +#### Parameters + + + The route of the agent + + +#### Returns + +`Optional[AgentBase]` — The agent or None if not found + +#### Source + +[`signalwire/signalwire/agent_server.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/agent_server.py) + +Line 310. + +*** + +### get\_agents + +Get all registered agents + +#### Signature + +```python +get_agents() -> List[Tuple[str, AgentBase]] +``` + +#### Returns + +`List[Tuple[str, AgentBase]]` — List of (route, agent) tuples + +#### Source + +[`signalwire/signalwire/agent_server.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/agent_server.py) + +Line 301. + +*** + +### register + +Register an agent with the server + +#### Signature + +```python +register(agent: AgentBase, route: Optional[str] = None) -> None +``` + +#### Parameters + + + The agent to register + + + + Optional route to override the agent's default route + + +#### Returns + +`None` + +#### Throws + +- `ValueError` — If the route is already in use + +#### Source + +[`signalwire/signalwire/agent_server.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/agent_server.py) + +Line 102. + +*** + +### register\_global\_routing\_callback + +Register a routing callback across all agents + +This allows you to add unified routing logic to all agents at the same path. + +#### Signature + +```python +register_global_routing_callback( + callback_fn: Callable[Request, Dict[str, Any], Optional[str]], + path: str +) -> None +``` + +#### Parameters + + + The callback function to register + + + + The path to register the callback at + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/agent_server.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/agent_server.py) + +Line 652. + +*** + +### register\_sip\_username + +Register a mapping from SIP username to agent route + +#### Signature + +```python +register_sip_username(username: str, route: str) -> None +``` + +#### Parameters + + + The SIP username + + + + The route to the agent + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/agent_server.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/agent_server.py) + +Line 210. + +*** + +### run + +Universal run method that automatically detects environment and handles accordingly + +Detects execution mode and routes appropriately: + +- Server mode: Starts uvicorn server with FastAPI +- CGI mode: Uses same routing logic but outputs CGI headers +- Lambda mode: Uses same routing logic but returns Lambda response + +#### Signature + +```python +run( + event = None, + context = None, + host: Optional[str] = None, + port: Optional[int] = None +) -> Any +``` + +#### Parameters + + + Serverless event object (Lambda, Cloud Functions) + + + + Serverless context object (Lambda, Cloud Functions) + + + + Optional host to override the default (server mode only) + + + + Optional port to override the default (server mode only) + + +#### Returns + +`Any` — Response for serverless modes, None for server mode + +#### Source + +[`signalwire/signalwire/agent_server.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/agent_server.py) + +Line 328. + +*** + +### serve\_static\_files + +Serve static files from a directory. + +This method properly integrates static file serving with agent routes, +ensuring that agent routes take priority over static files. + +Unlike using StaticFiles.mount("/", ...) directly on self.app, this method +uses explicit route handlers that work correctly with agent routes. + +> \[!NOTE] +> server = AgentServer() +> server.register(SupportAgent(), "/support") +> server.serve\_static\_files("./web") # Serves at / +> +> ### /support -> SupportAgent +> +> ### /index.html -> ./web/index.html +> +> ### / -> ./web/index.html + +#### Signature + +```python +serve_static_files(directory: str, route: str = '/') -> None +``` + +#### Parameters + + + Path to the directory containing static files + + + + URL path prefix for static files (default: "/" for root) + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/agent_server.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/agent_server.py) + +Line 675. + +*** + +### setup\_sip\_routing + +Set up central SIP-based routing for the server + +This configures all agents to handle SIP requests at the specified path, +using a coordinated routing system where each agent checks if it can +handle SIP requests for specific usernames. + +#### Signature + +```python +setup_sip_routing(route: str = '/sip', auto_map: bool = True) -> None +``` + +#### Parameters + + + The path for SIP routing (default: "/sip") + + + + Whether to automatically map SIP usernames to agent routes + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/agent_server.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/agent_server.py) + +Line 147. + +*** + +### unregister + +Unregister an agent from the server + +#### Signature + +```python +unregister(route: str) -> bool +``` + +#### Parameters + + + The route of the agent to unregister + + +#### Returns + +`bool` — True if the agent was unregistered, False if not found + +#### Source + +[`signalwire/signalwire/agent_server.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/agent_server.py) + +Line 274. + +## Source + +[`signalwire/signalwire/agent_server.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/agent_server.py) + +Line 31. diff --git a/fern/products/sdk-reference/python/signalwire/agent-server/index.mdx b/fern/products/sdk-reference/python/signalwire/agent-server/index.mdx new file mode 100644 index 0000000000..f8ffa07256 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/agent-server/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/signalwire/agent-server" +title: "agent_server" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.agent_server" + parent: "signalwire" + module: "signalwire" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/agent_server.py" +--- +# `agent_server` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module agent_server +``` + +## Classes + + + + Server for hosting multiple SignalWire AI Agents under a single FastAPI application. + + + +## Source + +[`signalwire/signalwire/agent_server.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/agent_server.py) diff --git a/fern/products/sdk-reference/python/signalwire/cli/build-search/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/build-search/index.mdx new file mode 100644 index 0000000000..52de4851b6 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/cli/build-search/index.mdx @@ -0,0 +1,140 @@ +--- +slug: "/reference/python/signalwire/cli/build-search" +title: "build_search" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.cli.build_search" + parent: "signalwire.cli" + module: "signalwire.cli" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/build_search.py" +--- +# `build_search` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module build_search +``` + +## Functions + +### console\_entry\_point + +Console script entry point for pip installation + +#### Signature + +```python +console_entry_point() +``` + +#### Source + +[`signalwire/signalwire/cli/build_search.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/build_search.py) + +Line 1238. + +*** + +### main + +Main entry point for the build-search command + +#### Signature + +```python +main() +``` + +#### Source + +[`signalwire/signalwire/cli/build_search.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/build_search.py) + +Line 34. + +*** + +### migrate\_command + +Migrate search indexes between backends + +#### Signature + +```python +migrate_command() +``` + +#### Source + +[`signalwire/signalwire/cli/build_search.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/build_search.py) + +Line 967. + +*** + +### remote\_command + +Search via remote API endpoint + +#### Signature + +```python +remote_command() +``` + +#### Source + +[`signalwire/signalwire/cli/build_search.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/build_search.py) + +Line 1103. + +*** + +### search\_command + +Search within an existing search index + +#### Signature + +```python +search_command() +``` + +#### Source + +[`signalwire/signalwire/cli/build_search.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/build_search.py) + +Line 659. + +*** + +### validate\_command + +Validate an existing search index + +#### Signature + +```python +validate_command() +``` + +#### Source + +[`signalwire/signalwire/cli/build_search.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/build_search.py) + +Line 621. + +## Source + +[`signalwire/signalwire/cli/build_search.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/build_search.py) diff --git a/fern/products/sdk-reference/python/signalwire/cli/config/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/config/index.mdx new file mode 100644 index 0000000000..e10c749376 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/cli/config/index.mdx @@ -0,0 +1,80 @@ +--- +slug: "/reference/python/signalwire/cli/config" +title: "config" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.cli.config" + parent: "signalwire.cli" + module: "signalwire.cli" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/config.py" +--- +# `config` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module config +``` + +## Constants + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## Source + +[`signalwire/signalwire/cli/config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/config.py) diff --git a/fern/products/sdk-reference/python/signalwire/cli/core/agent-loader/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/core/agent-loader/index.mdx new file mode 100644 index 0000000000..fefe7afd3f --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/cli/core/agent-loader/index.mdx @@ -0,0 +1,186 @@ +--- +slug: "/reference/python/signalwire/cli/core/agent-loader" +title: "agent_loader" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.cli.core.agent_loader" + parent: "signalwire.cli.core" + module: "signalwire.cli.core" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/agent_loader.py" +--- +# `agent_loader` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module agent_loader +``` + +## Constants + + + + + + + +## Functions + +### discover\_agents\_in\_file + +Backward compatibility wrapper - discovers agents in a file + +#### Signature + +```python +discover_agents_in_file(agent_path: str) -> List[Dict[str, Any]] +``` + +#### Parameters + + + Path to the Python file containing agents + + +#### Returns + +`List[Dict[str, Any]]` — List of dictionaries with agent information + +#### Source + +[`signalwire/signalwire/cli/core/agent_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/agent_loader.py) + +Line 59. + +*** + +### discover\_services\_in\_file + +Discover all available SWML services (including agents) in a Python file without instantiating them + +#### Signature + +```python +discover_services_in_file(service_path: str) -> List[Dict[str, Any]] +``` + +#### Parameters + + + Path to the Python file containing services + + +#### Returns + +`List[Dict[str, Any]]` — List of dictionaries with service information + +#### Throws + +- `ImportError` — If the file cannot be imported +- `FileNotFoundError` — If the file doesn't exist + +#### Source + +[`signalwire/signalwire/cli/core/agent_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/agent_loader.py) + +Line 38. + +*** + +### load\_agent\_from\_file + +Load an agent from a Python file + +#### Signature + +```python +load_agent_from_file( + agent_path: str, + agent_class_name: Optional[str] = None +) -> AgentBase +``` + +#### Parameters + + + Path to the Python file containing the agent + + + + Optional name of the agent class to instantiate + + +#### Returns + +`AgentBase` — AgentBase instance + +#### Throws + +- `ImportError` — If the file cannot be imported +- `ValueError` — If no agent is found in the file + +#### Source + +[`signalwire/signalwire/cli/core/agent_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/agent_loader.py) + +Line 193. + +*** + +### load\_service\_from\_file + +Load a SWML service from a Python file + +#### Signature + +```python +load_service_from_file( + service_path: str, + service_identifier: Optional[str] = None, + prefer_route: bool = True +) -> SWMLService +``` + +#### Parameters + + + Path to the Python file containing the service + + + + Optional service identifier - can be class name or route + + + + If True, interpret identifier as route first, then class name + + +#### Returns + +`SWMLService` — SWMLService instance (could be AgentBase or basic SWMLService) + +#### Throws + +- `ImportError` — If the file cannot be imported +- `ValueError` — If no service is found in the file + +#### Source + +[`signalwire/signalwire/cli/core/agent_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/agent_loader.py) + +Line 170. + +## Source + +[`signalwire/signalwire/cli/core/agent_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/agent_loader.py) diff --git a/fern/products/sdk-reference/python/signalwire/cli/core/argparse-helpers/custom-argument-parser/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/core/argparse-helpers/custom-argument-parser/index.mdx new file mode 100644 index 0000000000..6a183c242f --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/cli/core/argparse-helpers/custom-argument-parser/index.mdx @@ -0,0 +1,123 @@ +--- +slug: "/reference/python/signalwire/cli/core/argparse-helpers/custom-argument-parser" +title: "CustomArgumentParser" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.cli.core.argparse_helpers.CustomArgumentParser" + parent: "signalwire.cli.core.argparse_helpers" + module: "signalwire.cli.core.argparse_helpers" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/argparse_helpers.py" +--- +# `CustomArgumentParser` + +Custom ArgumentParser with better error handling + +## Signature + +```python +class CustomArgumentParser(argparse.ArgumentParser) +``` + +## Inheritance + +**Extends:** `argparse.ArgumentParser` + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(*args = (), **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/cli/core/argparse_helpers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/argparse_helpers.py) + +Line 23. + +*** + +### error + +Override error method to provide user-friendly error messages + +#### Signature + +```python +error(message) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/cli/core/argparse_helpers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/argparse_helpers.py) + +Line 33. + +*** + +### parse\_args + +Override parse\_args to provide custom error handling for missing arguments + +#### Signature + +```python +parse_args(args = None, namespace = None) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/cli/core/argparse_helpers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/argparse_helpers.py) + +Line 58. + +*** + +### print\_usage + +Override print\_usage to suppress output when we want custom error handling + +#### Signature + +```python +print_usage(file = None) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/cli/core/argparse_helpers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/argparse_helpers.py) + +Line 52. + +## Source + +[`signalwire/signalwire/cli/core/argparse_helpers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/argparse_helpers.py) + +Line 20. diff --git a/fern/products/sdk-reference/python/signalwire/cli/core/argparse-helpers/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/core/argparse-helpers/index.mdx new file mode 100644 index 0000000000..9ea189b848 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/cli/core/argparse-helpers/index.mdx @@ -0,0 +1,75 @@ +--- +slug: "/reference/python/signalwire/cli/core/argparse-helpers" +title: "argparse_helpers" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.cli.core.argparse_helpers" + parent: "signalwire.cli.core" + module: "signalwire.cli.core" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/argparse_helpers.py" +--- +# `argparse_helpers` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module argparse_helpers +``` + +## Classes + + + + Custom ArgumentParser with better error handling + + + +## Functions + +### parse\_function\_arguments + +Parse function arguments from command line with type coercion based on schema + +#### Signature + +```python +parse_function_arguments( + function_args_list: List[str], + func_schema: Dict[str, Any] +) -> Dict[str, Any] +``` + +#### Parameters + + + List of command line arguments after --args + + + + Function schema with parameter definitions + + +#### Returns + +`Dict[str, Any]` — Dictionary of parsed function arguments + +#### Source + +[`signalwire/signalwire/cli/core/argparse_helpers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/argparse_helpers.py) + +Line 82. + +## Source + +[`signalwire/signalwire/cli/core/argparse_helpers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/argparse_helpers.py) diff --git a/fern/products/sdk-reference/python/signalwire/cli/core/dynamic-config/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/core/dynamic-config/index.mdx new file mode 100644 index 0000000000..42b2f277b5 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/cli/core/dynamic-config/index.mdx @@ -0,0 +1,72 @@ +--- +slug: "/reference/python/signalwire/cli/core/dynamic-config" +title: "dynamic_config" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.cli.core.dynamic_config" + parent: "signalwire.cli.core" + module: "signalwire.cli.core" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/dynamic_config.py" +--- +# `dynamic_config` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module dynamic_config +``` + +## Functions + +### apply\_dynamic\_config + +Apply dynamic configuration callback if the agent has one + +#### Signature + +```python +apply_dynamic_config( + agent: AgentBase, + mock_request: Optional[MockRequest] = None, + verbose: bool = False +) -> None +``` + +#### Parameters + + + The agent instance + + + + Optional mock request object + + + + Whether to print verbose output + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/cli/core/dynamic_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/dynamic_config.py) + +Line 22. + +## Source + +[`signalwire/signalwire/cli/core/dynamic_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/dynamic_config.py) diff --git a/fern/products/sdk-reference/python/signalwire/cli/core/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/core/index.mdx new file mode 100644 index 0000000000..18825713f6 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/cli/core/index.mdx @@ -0,0 +1,52 @@ +--- +slug: "/reference/python/signalwire/cli/core" +title: "core" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.cli.core" + parent: "signalwire.cli" + module: "signalwire.cli" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/__init__.py" +--- +# `core` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module core +``` + +## Modules + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + +## Source + +[`signalwire/signalwire/cli/core/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/cli/core/service-loader/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/core/service-loader/index.mdx new file mode 100644 index 0000000000..925c6b734c --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/cli/core/service-loader/index.mdx @@ -0,0 +1,218 @@ +--- +slug: "/reference/python/signalwire/cli/core/service-loader" +title: "service_loader" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.cli.core.service_loader" + parent: "signalwire.cli.core" + module: "signalwire.cli.core" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/service_loader.py" +--- +# `service_loader` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module service_loader +``` + +## Constants + + + +## Classes + + + + Captures SWMLService instances when they try to run/serve + + + +## Functions + +### discover\_agents\_in\_file + +Backward compatibility wrapper + +#### Signature + +```python +discover_agents_in_file(agent_path: str) -> List[Dict[str, Any]] +``` + +#### Parameters + + + +#### Returns + +`List[Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/cli/core/service_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/service_loader.py) + +Line 282. + +*** + +### load\_agent\_from\_file + +Backward compatibility wrapper + +Note: This still uses the direct extraction approach for compatibility + +#### Signature + +```python +load_agent_from_file( + agent_path: str, + agent_class_name: Optional[str] = None, + suppress_output: bool = False +) -> AgentBase +``` + +#### Parameters + + + + + + + +#### Returns + +`AgentBase` + +#### Source + +[`signalwire/signalwire/cli/core/service_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/service_loader.py) + +Line 253. + +*** + +### load\_and\_simulate\_service + +Load a service file and simulate a request to it + +This is the main entry point that combines loading and request simulation + +#### Signature + +```python +load_and_simulate_service( + service_path: str, + route: Optional[str] = None, + method: str = 'POST', + body: Optional[dict] = None, + query_params: Optional[dict] = None, + headers: Optional[dict] = None, + suppress_output: bool = False +) -> dict +``` + +#### Parameters + + + Path to the service file + + + + Optional route to request (for multi-service files) + + + + HTTP method + + + + Request body + + + + Query parameters + + + + Request headers + + + + +#### Returns + +`dict` — The service's response + +#### Source + +[`signalwire/signalwire/cli/core/service_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/service_loader.py) + +Line 183. + +*** + +### simulate\_request\_to\_service + +Simulate a request to a SWMLService instance + +**Modifiers:** `async` + +#### Signature + +```python +async simulate_request_to_service( + service: SWMLService, + method: str = 'POST', + body: Optional[dict] = None, + query_params: Optional[dict] = None, + headers: Optional[dict] = None +) -> dict +``` + +#### Parameters + + + The SWMLService instance + + + + HTTP method (GET or POST) + + + + Request body for POST requests + + + + Query parameters + + + + Request headers + + +#### Returns + +`dict` — The service's response as a dict + +#### Source + +[`signalwire/signalwire/cli/core/service_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/service_loader.py) + +Line 135. + +## Source + +[`signalwire/signalwire/cli/core/service_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/service_loader.py) diff --git a/fern/products/sdk-reference/python/signalwire/cli/core/service-loader/service-capture/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/core/service-loader/service-capture/index.mdx new file mode 100644 index 0000000000..670ecc071b --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/cli/core/service-loader/service-capture/index.mdx @@ -0,0 +1,83 @@ +--- +slug: "/reference/python/signalwire/cli/core/service-loader/service-capture" +title: "ServiceCapture" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.cli.core.service_loader.ServiceCapture" + parent: "signalwire.cli.core.service_loader" + module: "signalwire.cli.core.service_loader" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/service_loader.py" +--- +# `ServiceCapture` + +Captures SWMLService instances when they try to run/serve + +## Signature + +```python +class ServiceCapture +``` + +## Properties + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__() +``` + +#### Source + +[`signalwire/signalwire/cli/core/service_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/service_loader.py) + +Line 40. + +*** + +### capture + +Execute a service file and capture any services that try to run + +#### Signature + +```python +capture(service_path: str, suppress_output: bool = False) -> List[SWMLService] +``` + +#### Parameters + + + Path to the Python file + + + + If True, suppress stdout during module execution + + +#### Returns + +`List[SWMLService]` — List of captured SWMLService instances + +#### Source + +[`signalwire/signalwire/cli/core/service_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/service_loader.py) + +Line 44. + +## Source + +[`signalwire/signalwire/cli/core/service_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/service_loader.py) + +Line 37. diff --git a/fern/products/sdk-reference/python/signalwire/cli/dokku/colors/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/dokku/colors/index.mdx new file mode 100644 index 0000000000..b3a5aa4639 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/cli/dokku/colors/index.mdx @@ -0,0 +1,47 @@ +--- +slug: "/reference/python/signalwire/cli/dokku/colors" +title: "Colors" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.cli.dokku.Colors" + parent: "signalwire.cli.dokku" + module: "signalwire.cli.dokku" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/dokku.py" +--- +# `Colors` + +## Signature + +```python +class Colors +``` + +## Properties + + + + + + + + + + + + + + + + + + + +## Source + +[`signalwire/signalwire/cli/dokku.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/dokku.py) + +Line 34. diff --git a/fern/products/sdk-reference/python/signalwire/cli/dokku/dokku-project-generator/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/dokku/dokku-project-generator/index.mdx new file mode 100644 index 0000000000..b713ee7dd5 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/cli/dokku/dokku-project-generator/index.mdx @@ -0,0 +1,85 @@ +--- +slug: "/reference/python/signalwire/cli/dokku/dokku-project-generator" +title: "DokkuProjectGenerator" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.cli.dokku.DokkuProjectGenerator" + parent: "signalwire.cli.dokku" + module: "signalwire.cli.dokku" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/dokku.py" +--- +# `DokkuProjectGenerator` + +Generates Dokku deployment files for SignalWire agents. + +## Signature + +```python +class DokkuProjectGenerator +``` + +## Properties + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(app_name: str, options: Dict[str, Any]) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/cli/dokku.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/dokku.py) + +Line 1816. + +*** + +### generate + +Generate the project files. + +#### Signature + +```python +generate() -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/cli/dokku.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/dokku.py) + +Line 1828. + +## Source + +[`signalwire/signalwire/cli/dokku.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/dokku.py) + +Line 1813. diff --git a/fern/products/sdk-reference/python/signalwire/cli/dokku/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/dokku/index.mdx new file mode 100644 index 0000000000..92d6bafe3f --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/cli/dokku/index.mdx @@ -0,0 +1,390 @@ +--- +slug: "/reference/python/signalwire/cli/dokku" +title: "dokku" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.cli.dokku" + parent: "signalwire.cli" + module: "signalwire.cli" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/dokku.py" +--- +# `dokku` + +SignalWire Agent Dokku Deployment Tool + +CLI tool for deploying SignalWire agents to Dokku with support for: + +- Simple git push deployment +- Full CI/CD with GitHub Actions +- Service provisioning (PostgreSQL, Redis) +- Preview environments for PRs + +> \[!NOTE] +> sw-agent-dokku init myagent # Simple mode +> sw-agent-dokku init myagent --cicd # With GitHub Actions CI/CD +> sw-agent-dokku deploy # Deploy current directory +> sw-agent-dokku logs # Tail logs +> sw-agent-dokku config set KEY=value # Set environment variables +> sw-agent-dokku scale web=2 # Scale processes + +## Signature + +```python +module dokku +``` + +## Constants + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## Classes + + + + + + Generates Dokku deployment files for SignalWire agents. + + + +## Functions + +### cmd\_config + +Manage Dokku config. + +#### Signature + +```python +cmd_config(args) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/cli/dokku.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/dokku.py) + +Line 2158. + +*** + +### cmd\_deploy + +Deploy to Dokku. + +#### Signature + +```python +cmd_deploy(args) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/cli/dokku.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/dokku.py) + +Line 2071. + +*** + +### cmd\_init + +Initialize a new Dokku project. + +#### Signature + +```python +cmd_init(args) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/cli/dokku.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/dokku.py) + +Line 1970. + +*** + +### cmd\_logs + +Tail Dokku logs. + +#### Signature + +```python +cmd_logs(args) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/cli/dokku.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/dokku.py) + +Line 2136. + +*** + +### cmd\_scale + +Scale Dokku processes. + +#### Signature + +```python +cmd_scale(args) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/cli/dokku.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/dokku.py) + +Line 2186. + +*** + +### generate\_password + +#### Signature + +```python +generate_password(length: int = 32) -> str +``` + +#### Parameters + + + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/cli/dokku.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/dokku.py) + +Line 81. + +*** + +### main + +#### Signature + +```python +main() +``` + +#### Source + +[`signalwire/signalwire/cli/dokku.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/dokku.py) + +Line 2223. + +*** + +### print\_error + +#### Signature + +```python +print_error(msg: str) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/cli/dokku.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/dokku.py) + +Line 58. + +*** + +### print\_header + +#### Signature + +```python +print_header(msg: str) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/cli/dokku.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/dokku.py) + +Line 62. + +*** + +### print\_step + +#### Signature + +```python +print_step(msg: str) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/cli/dokku.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/dokku.py) + +Line 46. + +*** + +### print\_success + +#### Signature + +```python +print_success(msg: str) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/cli/dokku.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/dokku.py) + +Line 50. + +*** + +### print\_warning + +#### Signature + +```python +print_warning(msg: str) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/cli/dokku.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/dokku.py) + +Line 54. + +*** + +### prompt + +#### Signature + +```python +prompt(question: str, default: str = '') -> str +``` + +#### Parameters + + + + + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/cli/dokku.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/dokku.py) + +Line 66. + +*** + +### prompt\_yes\_no + +#### Signature + +```python +prompt_yes_no(question: str, default: bool = True) -> bool +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/cli/dokku.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/dokku.py) + +Line 73. + +## Source + +[`signalwire/signalwire/cli/dokku.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/dokku.py) diff --git a/fern/products/sdk-reference/python/signalwire/cli/execution/datamap-exec/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/execution/datamap-exec/index.mdx new file mode 100644 index 0000000000..ff2a87bf82 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/cli/execution/datamap-exec/index.mdx @@ -0,0 +1,111 @@ +--- +slug: "/reference/python/signalwire/cli/execution/datamap-exec" +title: "datamap_exec" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.cli.execution.datamap_exec" + parent: "signalwire.cli.execution" + module: "signalwire.cli.execution" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/execution/datamap_exec.py" +--- +# `datamap_exec` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module datamap_exec +``` + +## Functions + +### execute\_datamap\_function + +Execute a DataMap function following the actual DataMap processing pipeline: + +1. Expressions (pattern matching) +2. Webhooks (try each sequentially until one succeeds) +3. Foreach (within successful webhook) +4. Output (from successful webhook) +5. Fallback output (if all webhooks fail) + +#### Signature + +```python +execute_datamap_function( + datamap_config: Dict[str, Any], + args: Dict[str, Any], + verbose: bool = False +) -> Dict[str, Any] +``` + +#### Parameters + + + DataMap configuration dictionary + + + + Function arguments + + + + Enable verbose output + + +#### Returns + +`Dict[str, Any]` — Function result (should be string or dict with 'response' key) + +#### Source + +[`signalwire/signalwire/cli/execution/datamap_exec.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/execution/datamap_exec.py) + +Line 124. + +*** + +### simple\_template\_expand + +Simple template expansion for DataMap testing +Supports both $\{key\} and %\{key\} syntax with nested object access and array indexing + +#### Signature + +```python +simple_template_expand(template: str, data: Dict[str, Any]) -> str +``` + +#### Parameters + + + Template string with $\{\} or %\{\} variables + + + + Data dictionary for expansion + + +#### Returns + +`str` — Expanded string + +#### Source + +[`signalwire/signalwire/cli/execution/datamap_exec.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/execution/datamap_exec.py) + +Line 22. + +## Source + +[`signalwire/signalwire/cli/execution/datamap_exec.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/execution/datamap_exec.py) diff --git a/fern/products/sdk-reference/python/signalwire/cli/execution/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/execution/index.mdx new file mode 100644 index 0000000000..35d6511250 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/cli/execution/index.mdx @@ -0,0 +1,44 @@ +--- +slug: "/reference/python/signalwire/cli/execution" +title: "execution" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.cli.execution" + parent: "signalwire.cli" + module: "signalwire.cli" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/execution/__init__.py" +--- +# `execution` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module execution +``` + +## Modules + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + +## Source + +[`signalwire/signalwire/cli/execution/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/execution/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/cli/execution/webhook-exec/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/execution/webhook-exec/index.mdx new file mode 100644 index 0000000000..ad4a9bbc04 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/cli/execution/webhook-exec/index.mdx @@ -0,0 +1,83 @@ +--- +slug: "/reference/python/signalwire/cli/execution/webhook-exec" +title: "webhook_exec" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.cli.execution.webhook_exec" + parent: "signalwire.cli.execution" + module: "signalwire.cli.execution" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/execution/webhook_exec.py" +--- +# `webhook_exec` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module webhook_exec +``` + +## Functions + +### execute\_external\_webhook\_function + +Execute an external webhook SWAIG function by making an HTTP request to the external service. +This simulates what SignalWire would do when calling an external webhook function. + +#### Signature + +```python +execute_external_webhook_function( + func: SWAIGFunction, + function_name: str, + function_args: Dict[str, Any], + post_data: Dict[str, Any], + verbose: bool = False +) -> Dict[str, Any] +``` + +#### Parameters + + + The SWAIGFunction object with webhook\_url + + + + Name of the function being called + + + + Parsed function arguments + + + + Complete post data to send to the webhook + + + + Whether to show verbose output + + +#### Returns + +`Dict[str, Any]` — Response from the external webhook service + +#### Source + +[`signalwire/signalwire/cli/execution/webhook_exec.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/execution/webhook_exec.py) + +Line 24. + +## Source + +[`signalwire/signalwire/cli/execution/webhook_exec.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/execution/webhook_exec.py) diff --git a/fern/products/sdk-reference/python/signalwire/cli/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/index.mdx new file mode 100644 index 0000000000..80a6dc7f5f --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/cli/index.mdx @@ -0,0 +1,84 @@ +--- +slug: "/reference/python/signalwire/cli" +title: "cli" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.cli" + parent: "signalwire" + module: "signalwire" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/__init__.py" +--- +# `cli` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module cli +``` + +## Properties + + + +## Modules + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + SignalWire Agent Dokku Deployment Tool + + + + Copyright (c) 2025 SignalWire + + + + SignalWire Agent Project Generator + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + +## Source + +[`signalwire/signalwire/cli/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/cli/init-project/colors/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/init-project/colors/index.mdx new file mode 100644 index 0000000000..bd6672b56c --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/cli/init-project/colors/index.mdx @@ -0,0 +1,45 @@ +--- +slug: "/reference/python/signalwire/cli/init-project/colors" +title: "Colors" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.cli.init_project.Colors" + parent: "signalwire.cli.init_project" + module: "signalwire.cli.init_project" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py" +--- +# `Colors` + +## Signature + +```python +class Colors +``` + +## Properties + + + + + + + + + + + + + + + + + +## Source + +[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) + +Line 38. diff --git a/fern/products/sdk-reference/python/signalwire/cli/init-project/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/init-project/index.mdx new file mode 100644 index 0000000000..a1de82e117 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/cli/init-project/index.mdx @@ -0,0 +1,558 @@ +--- +slug: "/reference/python/signalwire/cli/init-project" +title: "init_project" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.cli.init_project" + parent: "signalwire.cli" + module: "signalwire.cli" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py" +--- +# `init_project` + +SignalWire Agent Project Generator + +Interactive CLI tool to create new SignalWire agent projects with customizable features. + +> \[!NOTE] +> sw-agent-init # Interactive mode +> sw-agent-init myagent # Quick mode with project name +> sw-agent-init myagent --type full --no-venv + +## Signature + +```python +module init_project +``` + +## Constants + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## Classes + + + + + + Generates a new SignalWire agent project. + + + +## Functions + +### generate\_password + +Generate a secure random password. + +#### Signature + +```python +generate_password(length: int = 32) -> str +``` + +#### Parameters + + + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) + +Line 139. + +*** + +### get\_agent\_template + +Generate the main agent template based on type and features. + +#### Signature + +```python +get_agent_template(agent_type: str, features: Dict[str, bool]) -> str +``` + +#### Parameters + + + + + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) + +Line 1177. + +*** + +### get\_app\_template + +Generate the app.py template based on features. + +#### Signature + +```python +get_app_template(features: Dict[str, bool]) -> str +``` + +#### Parameters + + + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) + +Line 1329. + +*** + +### get\_env\_credentials + +Get SignalWire credentials from environment variables. + +#### Signature + +```python +get_env_credentials() -> Dict[str, str] +``` + +#### Returns + +`Dict[str, str]` + +#### Source + +[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) + +Line 130. + +*** + +### get\_readme\_template + +Generate README template. + +#### Signature + +```python +get_readme_template(project_name: str, features: Dict[str, bool]) -> str +``` + +#### Parameters + + + + + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) + +Line 1652. + +*** + +### get\_test\_template + +Generate test template. + +#### Signature + +```python +get_test_template(has_tool: bool) -> str +``` + +#### Parameters + + + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) + +Line 1525. + +*** + +### get\_web\_index\_template + +Generate a simple web UI template. + +#### Signature + +```python +get_web_index_template() -> str +``` + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) + +Line 1744. + +*** + +### main + +Main entry point. + +#### Signature + +```python +main() +``` + +#### Source + +[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) + +Line 2578. + +*** + +### mask\_token + +Mask a token showing only first 4 and last 3 characters. + +#### Signature + +```python +mask_token(token: str) -> str +``` + +#### Parameters + + + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) + +Line 123. + +*** + +### print\_error + +#### Signature + +```python +print_error(msg: str) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) + +Line 61. + +*** + +### print\_step + +#### Signature + +```python +print_step(msg: str) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) + +Line 49. + +*** + +### print\_success + +#### Signature + +```python +print_success(msg: str) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) + +Line 53. + +*** + +### print\_warning + +#### Signature + +```python +print_warning(msg: str) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) + +Line 57. + +*** + +### prompt + +Prompt user for input with optional default. + +#### Signature + +```python +prompt(question: str, default: str = '') -> str +``` + +#### Parameters + + + + + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) + +Line 65. + +*** + +### prompt\_multiselect + +Prompt user to toggle multiple options. Returns list of booleans. + +#### Signature + +```python +prompt_multiselect( + question: str, + options: List[str], + defaults: List[bool] +) -> List[bool] +``` + +#### Parameters + + + + + + + +#### Returns + +`List[bool]` + +#### Source + +[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) + +Line 101. + +*** + +### prompt\_select + +Prompt user to select from numbered options. Returns 1-based index. + +#### Signature + +```python +prompt_select(question: str, options: List[str], default: int = 1) -> int +``` + +#### Parameters + + + + + + + +#### Returns + +`int` + +#### Source + +[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) + +Line 83. + +*** + +### prompt\_yes\_no + +Prompt user for yes/no answer. + +#### Signature + +```python +prompt_yes_no(question: str, default: bool = True) -> bool +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) + +Line 74. + +*** + +### run\_interactive + +Run interactive prompts and return configuration. + +#### Signature + +```python +run_interactive() -> Dict[str, Any] +``` + +#### Returns + +`Dict[str, Any]` + +#### Source + +[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) + +Line 2388. + +*** + +### run\_quick + +Run in quick mode with minimal prompts. + +#### Signature + +```python +run_quick(project_name: str, args: Any) -> Dict[str, Any] +``` + +#### Parameters + + + + + +#### Returns + +`Dict[str, Any]` + +#### Source + +[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) + +Line 2511. + +## Source + +[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) diff --git a/fern/products/sdk-reference/python/signalwire/cli/init-project/project-generator/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/init-project/project-generator/index.mdx new file mode 100644 index 0000000000..f61db57d05 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/cli/init-project/project-generator/index.mdx @@ -0,0 +1,87 @@ +--- +slug: "/reference/python/signalwire/cli/init-project/project-generator" +title: "ProjectGenerator" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.cli.init_project.ProjectGenerator" + parent: "signalwire.cli.init_project" + module: "signalwire.cli.init_project" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py" +--- +# `ProjectGenerator` + +Generates a new SignalWire agent project. + +## Signature + +```python +class ProjectGenerator +``` + +## Properties + + + + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(config: Dict[str, Any]) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) + +Line 1850. + +*** + +### generate + +Generate the project. Returns True on success. + +#### Signature + +```python +generate() -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) + +Line 1859. + +## Source + +[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) + +Line 1847. diff --git a/fern/products/sdk-reference/python/signalwire/cli/output/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/output/index.mdx new file mode 100644 index 0000000000..8993c5e747 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/cli/output/index.mdx @@ -0,0 +1,44 @@ +--- +slug: "/reference/python/signalwire/cli/output" +title: "output" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.cli.output" + parent: "signalwire.cli" + module: "signalwire.cli" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/output/__init__.py" +--- +# `output` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module output +``` + +## Modules + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + +## Source + +[`signalwire/signalwire/cli/output/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/output/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/cli/output/output-formatter/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/output/output-formatter/index.mdx new file mode 100644 index 0000000000..50613ec2c1 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/cli/output/output-formatter/index.mdx @@ -0,0 +1,92 @@ +--- +slug: "/reference/python/signalwire/cli/output/output-formatter" +title: "output_formatter" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.cli.output.output_formatter" + parent: "signalwire.cli.output" + module: "signalwire.cli.output" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/output/output_formatter.py" +--- +# `output_formatter` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module output_formatter +``` + +## Functions + +### display\_agent\_tools + +Display the available SWAIG functions for an agent + +#### Signature + +```python +display_agent_tools(agent: AgentBase, verbose: bool = False) -> None +``` + +#### Parameters + + + The agent instance + + + + Whether to show verbose details + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/cli/output/output_formatter.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/output/output_formatter.py) + +Line 23. + +*** + +### format\_result + +Format the result of a SWAIG function call for display + +#### Signature + +```python +format_result(result: Any) -> str +``` + +#### Parameters + + + The result from the SWAIG function + + +#### Returns + +`str` — Formatted string representation + +#### Source + +[`signalwire/signalwire/cli/output/output_formatter.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/output/output_formatter.py) + +Line 220. + +## Source + +[`signalwire/signalwire/cli/output/output_formatter.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/output/output_formatter.py) diff --git a/fern/products/sdk-reference/python/signalwire/cli/output/swml-dump/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/output/swml-dump/index.mdx new file mode 100644 index 0000000000..ff684a5f9e --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/cli/output/swml-dump/index.mdx @@ -0,0 +1,86 @@ +--- +slug: "/reference/python/signalwire/cli/output/swml-dump" +title: "swml_dump" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.cli.output.swml_dump" + parent: "signalwire.cli.output" + module: "signalwire.cli.output" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/output/swml_dump.py" +--- +# `swml_dump` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module swml_dump +``` + +## Properties + + + +## Functions + +### handle\_dump\_swml + +Handle SWML dumping with fake post\_data and mock request support + +#### Signature + +```python +handle_dump_swml(agent: AgentBase, args: argparse.Namespace) -> int +``` + +#### Parameters + + + The loaded agent instance + + + + Parsed CLI arguments + + +#### Returns + +`int` — Exit code (0 for success, 1 for error) + +#### Source + +[`signalwire/signalwire/cli/output/swml_dump.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/output/swml_dump.py) + +Line 53. + +*** + +### setup\_output\_suppression + +Set up output suppression for SWML dumping + +#### Signature + +```python +setup_output_suppression() +``` + +#### Source + +[`signalwire/signalwire/cli/output/swml_dump.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/output/swml_dump.py) + +Line 33. + +## Source + +[`signalwire/signalwire/cli/output/swml_dump.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/output/swml_dump.py) diff --git a/fern/products/sdk-reference/python/signalwire/cli/simulation/data-generation/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/simulation/data-generation/index.mdx new file mode 100644 index 0000000000..dcca48fa31 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/cli/simulation/data-generation/index.mdx @@ -0,0 +1,275 @@ +--- +slug: "/reference/python/signalwire/cli/simulation/data-generation" +title: "data_generation" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.cli.simulation.data_generation" + parent: "signalwire.cli.simulation" + module: "signalwire.cli.simulation" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/data_generation.py" +--- +# `data_generation` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module data_generation +``` + +## Functions + +### adapt\_for\_call\_type + +Adapt call data structure based on call type (sip vs webrtc) + +#### Signature + +```python +adapt_for_call_type(call_data: Dict[str, Any], call_type: str) -> Dict[str, Any] +``` + +#### Parameters + + + Base call data structure + + + + "sip" or "webrtc" + + +#### Returns + +`Dict[str, Any]` — Adapted call data with appropriate addresses and metadata + +#### Source + +[`signalwire/signalwire/cli/simulation/data_generation.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/data_generation.py) + +Line 48. + +*** + +### generate\_comprehensive\_post\_data + +Generate comprehensive post\_data that matches what SignalWire would send + +#### Signature + +```python +generate_comprehensive_post_data( + function_name: str, + args: Dict[str, Any], + custom_data: Optional[Dict[str, Any]] = None +) -> Dict[str, Any] +``` + +#### Parameters + + + Name of the SWAIG function being called + + + + Function arguments + + + + Optional custom data to override defaults + + +#### Returns + +`Dict[str, Any]` — Complete post\_data dict with all possible keys + +#### Source + +[`signalwire/signalwire/cli/simulation/data_generation.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/data_generation.py) + +Line 143. + +*** + +### generate\_fake\_node\_id + +Generate a fake node ID for testing + +#### Signature + +```python +generate_fake_node_id() -> str +``` + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/cli/simulation/data_generation.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/data_generation.py) + +Line 27. + +*** + +### generate\_fake\_sip\_from + +Generate a fake 'from' address based on call type + +#### Signature + +```python +generate_fake_sip_from(call_type: str) -> str +``` + +#### Parameters + + + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/cli/simulation/data_generation.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/data_generation.py) + +Line 32. + +*** + +### generate\_fake\_sip\_to + +Generate a fake 'to' address based on call type + +#### Signature + +```python +generate_fake_sip_to(call_type: str) -> str +``` + +#### Parameters + + + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/cli/simulation/data_generation.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/data_generation.py) + +Line 40. + +*** + +### generate\_fake\_swml\_post\_data + +Generate fake SWML post\_data that matches real SignalWire structure + +#### Signature + +```python +generate_fake_swml_post_data( + call_type: str = 'webrtc', + call_direction: str = 'inbound', + call_state: str = 'created' +) -> Dict[str, Any] +``` + +#### Parameters + + + "sip" or "webrtc" (default: webrtc) + + + + "inbound" or "outbound" (default: inbound) + + + + Call state (default: created) + + +#### Returns + +`Dict[str, Any]` — Fake post\_data dict with call, vars, and envs structure + +#### Source + +[`signalwire/signalwire/cli/simulation/data_generation.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/data_generation.py) + +Line 85. + +*** + +### generate\_fake\_uuid + +Generate a fake UUID for testing + +#### Signature + +```python +generate_fake_uuid() -> str +``` + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/cli/simulation/data_generation.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/data_generation.py) + +Line 22. + +*** + +### generate\_minimal\_post\_data + +Generate minimal post\_data with only essential keys + +#### Signature + +```python +generate_minimal_post_data( + function_name: str, + args: Dict[str, Any] +) -> Dict[str, Any] +``` + +#### Parameters + + + Name of the SWAIG function being called + + + + Function arguments + + +#### Returns + +`Dict[str, Any]` — Minimal post\_data dict + +#### Source + +[`signalwire/signalwire/cli/simulation/data_generation.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/data_generation.py) + +Line 358. + +## Source + +[`signalwire/signalwire/cli/simulation/data_generation.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/data_generation.py) diff --git a/fern/products/sdk-reference/python/signalwire/cli/simulation/data-overrides/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/simulation/data-overrides/index.mdx new file mode 100644 index 0000000000..1b59630101 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/cli/simulation/data-overrides/index.mdx @@ -0,0 +1,171 @@ +--- +slug: "/reference/python/signalwire/cli/simulation/data-overrides" +title: "data_overrides" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.cli.simulation.data_overrides" + parent: "signalwire.cli.simulation" + module: "signalwire.cli.simulation" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/data_overrides.py" +--- +# `data_overrides` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module data_overrides +``` + +## Functions + +### apply\_convenience\_mappings + +Apply convenience CLI arguments to data structure + +#### Signature + +```python +apply_convenience_mappings( + data: Dict[str, Any], + args: argparse.Namespace +) -> Dict[str, Any] +``` + +#### Parameters + + + Data dictionary to modify + + + + Parsed CLI arguments + + +#### Returns + +`Dict[str, Any]` — Modified data dictionary + +#### Source + +[`signalwire/signalwire/cli/simulation/data_overrides.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/data_overrides.py) + +Line 117. + +*** + +### apply\_overrides + +Apply override values to data using dot notation paths + +#### Signature + +```python +apply_overrides( + data: Dict[str, Any], + overrides: List[str], + json_overrides: List[str] +) -> Dict[str, Any] +``` + +#### Parameters + + + Data dictionary to modify + + + + List of "path=value" strings + + + + List of "path=json\_value" strings + + +#### Returns + +`Dict[str, Any]` — Modified data dictionary + +#### Source + +[`signalwire/signalwire/cli/simulation/data_overrides.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/data_overrides.py) + +Line 80. + +*** + +### parse\_value + +Parse a string value into appropriate Python type + +#### Signature + +```python +parse_value(value_str: str) -> Any +``` + +#### Parameters + + + String representation of value + + +#### Returns + +`Any` — Parsed value (str, int, float, bool, None, or JSON object) + +#### Source + +[`signalwire/signalwire/cli/simulation/data_overrides.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/data_overrides.py) + +Line 43. + +*** + +### set\_nested\_value + +Set a nested value using dot notation path + +#### Signature + +```python +set_nested_value(data: Dict[str, Any], path: str, value: Any) -> None +``` + +#### Parameters + + + Dictionary to modify + + + + Dot-notation path (e.g., "call.call\_id" or "vars.userVariables.custom") + + + + Value to set + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/cli/simulation/data_overrides.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/data_overrides.py) + +Line 21. + +## Source + +[`signalwire/signalwire/cli/simulation/data_overrides.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/data_overrides.py) diff --git a/fern/products/sdk-reference/python/signalwire/cli/simulation/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/simulation/index.mdx new file mode 100644 index 0000000000..842003cc67 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/cli/simulation/index.mdx @@ -0,0 +1,48 @@ +--- +slug: "/reference/python/signalwire/cli/simulation" +title: "simulation" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.cli.simulation" + parent: "signalwire.cli" + module: "signalwire.cli" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/__init__.py" +--- +# `simulation` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module simulation +``` + +## Modules + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + +## Source + +[`signalwire/signalwire/cli/simulation/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/cli/simulation/mock-env/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/simulation/mock-env/index.mdx new file mode 100644 index 0000000000..613a9994cb --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/cli/simulation/mock-env/index.mdx @@ -0,0 +1,122 @@ +--- +slug: "/reference/python/signalwire/cli/simulation/mock-env" +title: "mock_env" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.cli.simulation.mock_env" + parent: "signalwire.cli.simulation" + module: "signalwire.cli.simulation" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py" +--- +# `mock_env` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module mock_env +``` + +## Classes + + + + Mock FastAPI Headers (case-insensitive dict-like) + + + + Mock FastAPI QueryParams (simple dict-like) + + + + Mock FastAPI Request object for dynamic agent testing + + + + Mock FastAPI URL object + + + + Manages serverless environment simulation for different platforms + + + +## Functions + +### create\_mock\_request + +Factory function to create a mock FastAPI Request object + +#### Signature + +```python +create_mock_request( + method: str = 'POST', + url: str = 'http://localhost:8080/swml', + headers: Optional[Dict[str, str]] = None, + query_params: Optional[Dict[str, str]] = None, + body: Optional[Dict[str, Any]] = None +) -> MockRequest +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`MockRequest` + +#### Source + +[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) + +Line 128. + +*** + +### load\_env\_file + +Load environment variables from a file + +#### Signature + +```python +load_env_file(env_file_path: str) -> Dict[str, str] +``` + +#### Parameters + + + +#### Returns + +`Dict[str, str]` + +#### Source + +[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) + +Line 269. + +## Source + +[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) diff --git a/fern/products/sdk-reference/python/signalwire/cli/simulation/mock-env/mock-headers/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/simulation/mock-env/mock-headers/index.mdx new file mode 100644 index 0000000000..c5b61bd734 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/cli/simulation/mock-env/mock-headers/index.mdx @@ -0,0 +1,171 @@ +--- +slug: "/reference/python/signalwire/cli/simulation/mock-env/mock-headers" +title: "MockHeaders" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.cli.simulation.mock_env.MockHeaders" + parent: "signalwire.cli.simulation.mock_env" + module: "signalwire.cli.simulation.mock_env" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py" +--- +# `MockHeaders` + +Mock FastAPI Headers (case-insensitive dict-like) + +## Signature + +```python +class MockHeaders +``` + +## Methods + +### \_\_contains\_\_ + +#### Signature + +```python +__contains__(key: str) -> bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) + +Line 60. + +*** + +### \_\_getitem\_\_ + +#### Signature + +```python +__getitem__(key: str) -> str +``` + +#### Parameters + + + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) + +Line 57. + +*** + +### \_\_init\_\_ + +#### Signature + +```python +__init__(headers: Optional[Dict[str, str]] = None) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) + +Line 47. + +*** + +### get + +#### Signature + +```python +get(key: str, default: Optional[str] = None) -> Optional[str] +``` + +#### Parameters + + + + + +#### Returns + +`Optional[str]` + +#### Source + +[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) + +Line 54. + +*** + +### items + +#### Signature + +```python +items() +``` + +#### Source + +[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) + +Line 63. + +*** + +### keys + +#### Signature + +```python +keys() +``` + +#### Source + +[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) + +Line 66. + +*** + +### values + +#### Signature + +```python +values() +``` + +#### Source + +[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) + +Line 69. + +## Source + +[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) + +Line 45. diff --git a/fern/products/sdk-reference/python/signalwire/cli/simulation/mock-env/mock-query-params/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/simulation/mock-env/mock-query-params/index.mdx new file mode 100644 index 0000000000..e49458d0f2 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/cli/simulation/mock-env/mock-query-params/index.mdx @@ -0,0 +1,171 @@ +--- +slug: "/reference/python/signalwire/cli/simulation/mock-env/mock-query-params" +title: "MockQueryParams" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.cli.simulation.mock_env.MockQueryParams" + parent: "signalwire.cli.simulation.mock_env" + module: "signalwire.cli.simulation.mock_env" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py" +--- +# `MockQueryParams` + +Mock FastAPI QueryParams (simple dict-like) + +## Signature + +```python +class MockQueryParams +``` + +## Methods + +### \_\_contains\_\_ + +#### Signature + +```python +__contains__(key: str) -> bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) + +Line 32. + +*** + +### \_\_getitem\_\_ + +#### Signature + +```python +__getitem__(key: str) -> str +``` + +#### Parameters + + + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) + +Line 29. + +*** + +### \_\_init\_\_ + +#### Signature + +```python +__init__(params: Optional[Dict[str, str]] = None) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) + +Line 23. + +*** + +### get + +#### Signature + +```python +get(key: str, default: Optional[str] = None) -> Optional[str] +``` + +#### Parameters + + + + + +#### Returns + +`Optional[str]` + +#### Source + +[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) + +Line 26. + +*** + +### items + +#### Signature + +```python +items() +``` + +#### Source + +[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) + +Line 35. + +*** + +### keys + +#### Signature + +```python +keys() +``` + +#### Source + +[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) + +Line 38. + +*** + +### values + +#### Signature + +```python +values() +``` + +#### Source + +[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) + +Line 41. + +## Source + +[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) + +Line 21. diff --git a/fern/products/sdk-reference/python/signalwire/cli/simulation/mock-env/mock-request/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/simulation/mock-env/mock-request/index.mdx new file mode 100644 index 0000000000..2543ca68a8 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/cli/simulation/mock-env/mock-request/index.mdx @@ -0,0 +1,141 @@ +--- +slug: "/reference/python/signalwire/cli/simulation/mock-env/mock-request" +title: "MockRequest" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.cli.simulation.mock_env.MockRequest" + parent: "signalwire.cli.simulation.mock_env" + module: "signalwire.cli.simulation.mock_env" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py" +--- +# `MockRequest` + +Mock FastAPI Request object for dynamic agent testing + +## Signature + +```python +class MockRequest +``` + +## Properties + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + method: str = 'POST', + url: str = 'http://localhost:8080/swml', + headers: Optional[Dict[str, str]] = None, + query_params: Optional[Dict[str, str]] = None, + json_body: Optional[Dict[str, Any]] = None +) +``` + +#### Parameters + + + + + + + + + + + +#### Source + +[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) + +Line 102. + +*** + +### body + +Return the raw body bytes + +**Modifiers:** `async` + +#### Signature + +```python +async body() -> bytes +``` + +#### Returns + +`bytes` + +#### Source + +[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) + +Line 119. + +*** + +### client + +Mock client property + +#### Signature + +```python +client() +``` + +#### Source + +[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) + +Line 123. + +*** + +### json + +Return the JSON body + +**Modifiers:** `async` + +#### Signature + +```python +async json() -> Dict[str, Any] +``` + +#### Returns + +`Dict[str, Any]` + +#### Source + +[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) + +Line 115. + +## Source + +[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) + +Line 100. diff --git a/fern/products/sdk-reference/python/signalwire/cli/simulation/mock-env/mock-url/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/simulation/mock-env/mock-url/index.mdx new file mode 100644 index 0000000000..dc2b8841b4 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/cli/simulation/mock-env/mock-url/index.mdx @@ -0,0 +1,75 @@ +--- +slug: "/reference/python/signalwire/cli/simulation/mock-env/mock-url" +title: "MockURL" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.cli.simulation.mock_env.MockURL" + parent: "signalwire.cli.simulation.mock_env" + module: "signalwire.cli.simulation.mock_env" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py" +--- +# `MockURL` + +Mock FastAPI URL object + +## Signature + +```python +class MockURL +``` + +## Properties + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(url: str = 'http://localhost:8080/swml') +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) + +Line 75. + +*** + +### \_\_str\_\_ + +#### Signature + +```python +__str__() +``` + +#### Source + +[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) + +Line 96. + +## Source + +[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) + +Line 73. diff --git a/fern/products/sdk-reference/python/signalwire/cli/simulation/mock-env/serverless-simulator/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/simulation/mock-env/serverless-simulator/index.mdx new file mode 100644 index 0000000000..47e1565f57 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/cli/simulation/mock-env/serverless-simulator/index.mdx @@ -0,0 +1,155 @@ +--- +slug: "/reference/python/signalwire/cli/simulation/mock-env/serverless-simulator" +title: "ServerlessSimulator" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.cli.simulation.mock_env.ServerlessSimulator" + parent: "signalwire.cli.simulation.mock_env" + module: "signalwire.cli.simulation.mock_env" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py" +--- +# `ServerlessSimulator` + +Manages serverless environment simulation for different platforms + +## Signature + +```python +class ServerlessSimulator +``` + +## Properties + + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(platform: str, overrides: Optional[Dict[str, str]] = None) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) + +Line 170. + +*** + +### activate + +Apply serverless environment simulation + +#### Signature + +```python +activate(verbose: bool = False) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) + +Line 178. + +*** + +### add\_override + +Add an environment variable override + +#### Signature + +```python +add_override(key: str, value: str) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) + +Line 256. + +*** + +### deactivate + +Restore original environment + +#### Signature + +```python +deactivate(verbose: bool = False) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) + +Line 227. + +*** + +### get\_current\_env + +Get the current environment that would be applied + +#### Signature + +```python +get_current_env() -> Dict[str, str] +``` + +#### Returns + +`Dict[str, str]` + +#### Source + +[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) + +Line 262. + +## Source + +[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) + +Line 139. diff --git a/fern/products/sdk-reference/python/signalwire/cli/swaig-test-wrapper/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/swaig-test-wrapper/index.mdx new file mode 100644 index 0000000000..57961fc799 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/cli/swaig-test-wrapper/index.mdx @@ -0,0 +1,50 @@ +--- +slug: "/reference/python/signalwire/cli/swaig-test-wrapper" +title: "swaig_test_wrapper" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.cli.swaig_test_wrapper" + parent: "signalwire.cli" + module: "signalwire.cli" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/swaig_test_wrapper.py" +--- +# `swaig_test_wrapper` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module swaig_test_wrapper +``` + +## Functions + +### main + +Main entry point for the swaig-test command + +#### Signature + +```python +main() +``` + +#### Source + +[`signalwire/signalwire/cli/swaig_test_wrapper.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/swaig_test_wrapper.py) + +Line 21. + +## Source + +[`signalwire/signalwire/cli/swaig_test_wrapper.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/swaig_test_wrapper.py) diff --git a/fern/products/sdk-reference/python/signalwire/cli/test-swaig/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/test-swaig/index.mdx new file mode 100644 index 0000000000..de6b03284f --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/cli/test-swaig/index.mdx @@ -0,0 +1,104 @@ +--- +slug: "/reference/python/signalwire/cli/test-swaig" +title: "test_swaig" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.cli.test_swaig" + parent: "signalwire.cli" + module: "signalwire.cli" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/test_swaig.py" +--- +# `test_swaig` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module test_swaig +``` + +## Functions + +### console\_entry\_point + +Console script entry point for pip installation + +#### Signature + +```python +console_entry_point() +``` + +#### Source + +[`signalwire/signalwire/cli/test_swaig.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/test_swaig.py) + +Line 800. + +*** + +### main + +Main entry point for the CLI tool + +#### Signature + +```python +main() +``` + +#### Source + +[`signalwire/signalwire/cli/test_swaig.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/test_swaig.py) + +Line 222. + +*** + +### print\_help\_examples + +Print comprehensive usage examples + +#### Signature + +```python +print_help_examples() +``` + +#### Source + +[`signalwire/signalwire/cli/test_swaig.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/test_swaig.py) + +Line 95. + +*** + +### print\_help\_platforms + +Print detailed help for serverless platform options + +#### Signature + +```python +print_help_platforms() +``` + +#### Source + +[`signalwire/signalwire/cli/test_swaig.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/test_swaig.py) + +Line 51. + +## Source + +[`signalwire/signalwire/cli/test_swaig.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/test_swaig.py) diff --git a/fern/products/sdk-reference/python/signalwire/cli/types/agent-info/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/types/agent-info/index.mdx new file mode 100644 index 0000000000..33f9d9bbf5 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/cli/types/agent-info/index.mdx @@ -0,0 +1,43 @@ +--- +slug: "/reference/python/signalwire/cli/types/agent-info" +title: "AgentInfo" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.cli.types.AgentInfo" + parent: "signalwire.cli.types" + module: "signalwire.cli.types" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/types.py" +--- +# `AgentInfo` + +Information about a discovered agent + +## Signature + +```python +class AgentInfo(TypedDict) +``` + +## Inheritance + +**Extends:** `TypedDict` + +## Properties + + + + + + + + + +## Source + +[`signalwire/signalwire/cli/types.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/types.py) + +Line 67. diff --git a/fern/products/sdk-reference/python/signalwire/cli/types/call-data/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/types/call-data/index.mdx new file mode 100644 index 0000000000..74ccd9ed6a --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/cli/types/call-data/index.mdx @@ -0,0 +1,65 @@ +--- +slug: "/reference/python/signalwire/cli/types/call-data" +title: "CallData" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.cli.types.CallData" + parent: "signalwire.cli.types" + module: "signalwire.cli.types" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/types.py" +--- +# `CallData` + +Call data structure for SWML post\_data + +## Signature + +```python +class CallData(TypedDict) +``` + +## Inheritance + +**Extends:** `TypedDict` + +## Properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## Source + +[`signalwire/signalwire/cli/types.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/types.py) + +Line 18. diff --git a/fern/products/sdk-reference/python/signalwire/cli/types/data-map-config/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/types/data-map-config/index.mdx new file mode 100644 index 0000000000..cb8f98e8c9 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/cli/types/data-map-config/index.mdx @@ -0,0 +1,43 @@ +--- +slug: "/reference/python/signalwire/cli/types/data-map-config" +title: "DataMapConfig" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.cli.types.DataMapConfig" + parent: "signalwire.cli.types" + module: "signalwire.cli.types" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/types.py" +--- +# `DataMapConfig` + +DataMap function configuration + +## Signature + +```python +class DataMapConfig(TypedDict) +``` + +## Inheritance + +**Extends:** `TypedDict` + +## Properties + + + + + + + + + +## Source + +[`signalwire/signalwire/cli/types.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/types.py) + +Line 59. diff --git a/fern/products/sdk-reference/python/signalwire/cli/types/function-info/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/types/function-info/index.mdx new file mode 100644 index 0000000000..170115f7ed --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/cli/types/function-info/index.mdx @@ -0,0 +1,45 @@ +--- +slug: "/reference/python/signalwire/cli/types/function-info" +title: "FunctionInfo" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.cli.types.FunctionInfo" + parent: "signalwire.cli.types" + module: "signalwire.cli.types" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/types.py" +--- +# `FunctionInfo` + +Information about a SWAIG function + +## Signature + +```python +class FunctionInfo(TypedDict) +``` + +## Inheritance + +**Extends:** `TypedDict` + +## Properties + + + + + + + + + + + +## Source + +[`signalwire/signalwire/cli/types.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/types.py) + +Line 75. diff --git a/fern/products/sdk-reference/python/signalwire/cli/types/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/types/index.mdx new file mode 100644 index 0000000000..b45c369540 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/cli/types/index.mdx @@ -0,0 +1,60 @@ +--- +slug: "/reference/python/signalwire/cli/types" +title: "types" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.cli.types" + parent: "signalwire.cli" + module: "signalwire.cli" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/types.py" +--- +# `types` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module types +``` + +## Classes + + + + Information about a discovered agent + + + + Call data structure for SWML post\_data + + + + DataMap function configuration + + + + Information about a SWAIG function + + + + Complete post\_data structure for SWML requests + + + + Variables data structure for SWML post\_data + + + +## Source + +[`signalwire/signalwire/cli/types.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/types.py) diff --git a/fern/products/sdk-reference/python/signalwire/cli/types/post-data/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/types/post-data/index.mdx new file mode 100644 index 0000000000..2487e8ec5c --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/cli/types/post-data/index.mdx @@ -0,0 +1,57 @@ +--- +slug: "/reference/python/signalwire/cli/types/post-data" +title: "PostData" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.cli.types.PostData" + parent: "signalwire.cli.types" + module: "signalwire.cli.types" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/types.py" +--- +# `PostData` + +Complete post\_data structure for SWML requests + +## Signature + +```python +class PostData(TypedDict) +``` + +## Inheritance + +**Extends:** `TypedDict` + +## Properties + + + + + + + + + + + + + + + + + + + + + + + +## Source + +[`signalwire/signalwire/cli/types.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/types.py) + +Line 44. diff --git a/fern/products/sdk-reference/python/signalwire/cli/types/vars-data/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/types/vars-data/index.mdx new file mode 100644 index 0000000000..2bc387bc8b --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/cli/types/vars-data/index.mdx @@ -0,0 +1,41 @@ +--- +slug: "/reference/python/signalwire/cli/types/vars-data" +title: "VarsData" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.cli.types.VarsData" + parent: "signalwire.cli.types" + module: "signalwire.cli.types" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/types.py" +--- +# `VarsData` + +Variables data structure for SWML post\_data + +## Signature + +```python +class VarsData(TypedDict) +``` + +## Inheritance + +**Extends:** `TypedDict` + +## Properties + + + + + + + +## Source + +[`signalwire/signalwire/cli/types.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/types.py) + +Line 37. diff --git a/fern/products/sdk-reference/python/signalwire/core/agent-base/agent-base/index.mdx b/fern/products/sdk-reference/python/signalwire/core/agent-base/agent-base/index.mdx new file mode 100644 index 0000000000..d75dd6da2f --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/agent-base/agent-base/index.mdx @@ -0,0 +1,779 @@ +--- +slug: "/reference/python/signalwire/core/agent-base/agent-base" +title: "AgentBase" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.core.agent_base.AgentBase" + parent: "signalwire.core.agent_base" + module: "signalwire.core.agent_base" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py" +--- +# `AgentBase` + +Base class for all SignalWire AI Agents. + +This class extends SWMLService and provides enhanced functionality for building agents including: + +- Prompt building and customization +- SWML rendering +- SWAIG function definition and execution +- Web service for serving SWML and handling webhooks +- Security and session management + +Subclassing options: + +1. Simple override of get\_prompt() for raw text +2. Using prompt\_\* methods for structured prompts +3. Declarative PROMPT\_SECTIONS class attribute + +## Signature + +```python +class AgentBase(AuthMixin, WebMixin, SWMLService, PromptMixin, SkillMixin, AIConfigMixin, ServerlessMixin, StateMixin, MCPServerMixin) +``` + +## Inheritance + +**Extends:** [AuthMixin](/docs/sdk-reference/reference/python/signalwire/core/mixins/auth-mixin/auth-mixin), [WebMixin](/docs/sdk-reference/reference/python/signalwire/core/mixins/web-mixin/web-mixin), [SWMLService](/docs/sdk-reference/reference/python/signalwire/core/swml-service/swml-service), [PromptMixin](/docs/sdk-reference/reference/python/signalwire/core/mixins/prompt-mixin/prompt-mixin), [SkillMixin](/docs/sdk-reference/reference/python/signalwire/core/mixins/skill-mixin/skill-mixin), [AIConfigMixin](/docs/sdk-reference/reference/python/signalwire/core/mixins/ai-config-mixin/ai-config-mixin), [ServerlessMixin](/docs/sdk-reference/reference/python/signalwire/core/mixins/serverless-mixin/serverless-mixin), [StateMixin](/docs/sdk-reference/reference/python/signalwire/core/mixins/state-mixin/state-mixin), [MCPServerMixin](/docs/sdk-reference/reference/python/signalwire/core/mixins/mcp-server-mixin/mcp-server-mixin) + +## Properties + + + + + + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +Initialize a new agent + +#### Signature + +```python +__init__( + name: str, + route: str = '/', + host: str = '0.0.0.0', + port: Optional[int] = None, + basic_auth: Optional[Tuple[str, str]] = None, + use_pom: bool = True, + token_expiry_secs: int = 3600, + auto_answer: bool = True, + record_call: bool = False, + record_format: str = 'mp4', + record_stereo: bool = True, + default_webhook_url: Optional[str] = None, + agent_id: Optional[str] = None, + native_functions: Optional[List[str]] = None, + schema_path: Optional[str] = None, + suppress_logs: bool = False, + enable_post_prompt_override: bool = False, + check_for_input_override: bool = False, + config_file: Optional[str] = None, + schema_validation: bool = True, + signing_key: Optional[str] = None, + trust_proxy_for_signature: bool = False +) +``` + +#### Parameters + + + Agent name/identifier + + + + HTTP route path for this agent + + + + Host to bind the web server to + + + + Port to bind the web server to + + + + Optional (username, password) tuple for basic auth + + + + Whether to use POM for prompt building + + + + Seconds until tokens expire + + + + Whether to automatically answer calls + + + + Whether to record calls + + + + Recording format + + + + Whether to record in stereo + + + + Optional default webhook URL for all SWAIG functions + + + + Optional unique ID for this agent, generated if not provided + + + + Optional list of native functions to include in the SWAIG object + + + + Optional path to the schema file + + + + Whether to suppress structured logs + + + + Whether to enable post-prompt override + + + + Whether to enable check-for-input override + + + + Optional path to configuration file + + + + Enable SWML schema validation. Default True. Can also be disabled via SWML\_SKIP\_SCHEMA\_VALIDATION=1 env var. + + + + Optional SignalWire Signing Key (from Dashboard → API Credentials). When set, webhook signature validation is enforced on POST /, /swaig, /post\_prompt — unsigned or invalidly-signed requests get a 403. Falls back to the SIGNALWIRE\_SIGNING\_KEY env var if not passed. See porting-sdk/webhooks.md for the contract. + + + + If True, honor X-Forwarded-Proto / X-Forwarded-Host when reconstructing the URL during signature validation. Default False — proxy headers are spoofable, so opt in only when you control the proxy chain. + + +#### Source + +[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) + +Line 108. + +*** + +### add\_answer\_verb + +Configure the answer verb. + +The answer verb connects the call. Use this method to customize +answer behavior, such as setting max\_duration. + +> \[!NOTE] +> +> ### Set maximum call duration to 1 hour +> +> agent.add\_answer\_verb(\{"max\_duration": 3600\}) + +#### Signature + +```python +add_answer_verb(config: Optional[Dict[str, Any]] = None) -> AgentBase +``` + +#### Parameters + + + Optional answer verb configuration (e.g., \{"max\_duration": 3600\}) + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) + +Line 536. + +*** + +### add\_post\_ai\_verb + +Add a verb to run after the AI conversation ends. + +Post-AI verbs run when the AI completes its conversation. Common uses +include clean disconnects, transfers, and logging. + +> \[!NOTE] +> +> ### Log call completion and hang up +> +> agent.add\_post\_ai\_verb("request", \{ +> "url": "https://api.example.com/call-complete", +> "method": "POST" +> \}) +> agent.add\_post\_ai\_verb("hangup", \{\}) + +#### Signature + +```python +add_post_ai_verb(verb_name: str, config: Dict[str, Any]) -> AgentBase +``` + +#### Parameters + + + The SWML verb name (e.g., "hangup", "transfer", "request") + + + + Verb configuration dictionary + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) + +Line 581. + +*** + +### add\_post\_answer\_verb + +Add a verb to run after the call is answered but before the AI starts. + +Post-answer verbs run after the call is connected. Common uses include +welcome messages, legal disclaimers, and hold music. + +> \[!NOTE] +> +> ### Play welcome message +> +> agent.add\_post\_answer\_verb("play", \{ +> "url": "say:Welcome to Acme Corporation." +> \}) +> +> ### Brief pause +> +> agent.add\_post\_answer\_verb("sleep", \{"time": 500\}) + +#### Signature + +```python +add_post_answer_verb(verb_name: str, config: Dict[str, Any]) -> AgentBase +``` + +#### Parameters + + + The SWML verb name (e.g., "play", "sleep") + + + + Verb configuration dictionary + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) + +Line 556. + +*** + +### add\_pre\_answer\_verb + +Add a verb to run before the call is answered. + +Pre-answer verbs execute while the call is still ringing. Only certain +verbs are safe to use before answering: + +> \[!NOTE] +> cond, if, eval, set, unset, hangup, send\_sms, sleep, +> stop\_record\_call, stop\_denoise, stop\_tap + +Verbs with auto\_answer option (play, connect): Must include +"auto\_answer": False in config to prevent automatic answering. + +> \[!NOTE] +> +> ### Play ringback tone before answering +> +> agent.add\_pre\_answer\_verb("play", \{ +> "urls": \["ring:us"], +> "auto\_answer": False +> \}) + +#### Signature + +```python +add_pre_answer_verb(verb_name: str, config: Dict[str, Any]) -> AgentBase +``` + +#### Parameters + + + The SWML verb name (e.g., "play", "sleep", "request") + + + + Verb configuration dictionary + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Throws + +- `ValueError` — If verb is not safe for pre-answer use + +#### Source + +[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) + +Line 488. + +*** + +### add\_swaig\_query\_params + +Add query parameters that will be included in all SWAIG webhook URLs + +This is particularly useful for preserving dynamic configuration state +across SWAIG callbacks. For example, if your dynamic config adds skills +based on query parameters, you can pass those same parameters through +to the SWAIG webhook so the same configuration is applied. + +> \[!NOTE] +> def dynamic\_config(query\_params, body\_params, headers, agent): +> if query\_params.get('tier') == 'premium': +> agent.add\_skill('advanced\_search') +> \# Preserve the tier param so SWAIG callbacks work +> agent.add\_swaig\_query\_params(\{'tier': 'premium'\}) + +#### Signature + +```python +add_swaig_query_params(params: Dict[str, str]) -> AgentBase +``` + +#### Parameters + + + Dictionary of query parameters to add to SWAIG URLs + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) + +Line 753. + +*** + +### auto\_map\_sip\_usernames + +Automatically register common SIP usernames based on this agent's +name and route + +#### Signature + +```python +auto_map_sip_usernames() -> AgentBase +``` + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) + +Line 700. + +*** + +### clear\_post\_ai\_verbs + +Remove all post-AI verbs. + +#### Signature + +```python +clear_post_ai_verbs() -> AgentBase +``` + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) + +Line 626. + +*** + +### clear\_post\_answer\_verbs + +Remove all post-answer verbs. + +#### Signature + +```python +clear_post_answer_verbs() -> AgentBase +``` + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) + +Line 616. + +*** + +### clear\_pre\_answer\_verbs + +Remove all pre-answer verbs. + +#### Signature + +```python +clear_pre_answer_verbs() -> AgentBase +``` + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) + +Line 606. + +*** + +### clear\_swaig\_query\_params + +Clear all SWAIG query parameters + +#### Signature + +```python +clear_swaig_query_params() -> AgentBase +``` + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) + +Line 779. + +*** + +### enable\_sip\_routing + +Enable SIP-based routing for this agent + +This allows the agent to automatically route SIP requests based on SIP usernames. +When enabled, an endpoint at the specified path is automatically created +that will handle SIP requests and deliver them to this agent. + +#### Signature + +```python +enable_sip_routing(auto_map: bool = True, path: str = '/sip') -> AgentBase +``` + +#### Parameters + + + Whether to automatically map common SIP usernames to this agent (based on the agent name and route path) + + + + The path to register the SIP routing endpoint (default: "/sip") + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) + +Line 638. + +*** + +### get\_full\_url + +Get the full URL for this agent's endpoint + +#### Signature + +```python +get_full_url(include_auth: bool = False) -> str +``` + +#### Parameters + + + Whether to include authentication credentials in the URL + + +#### Returns + +`str` — Full URL including host, port, and route (with auth if requested) + +#### Source + +[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) + +Line 351. + +*** + +### get\_name + +Get agent name + +#### Signature + +```python +get_name() -> str +``` + +#### Returns + +`str` — Agent name + +#### Source + +[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) + +Line 342. + +*** + +### on\_debug\_event + +Register a handler for debug webhook events. + +Use as a decorator to receive real-time debug events from the AI module +during calls. Requires enable\_debug\_events() to be called first. + +> \[!NOTE] +> event\_type (str): The event label (e.g. "barge", "llm\_error", "session\_start") +> data (dict): The full event payload including call\_id, label, and event-specific fields + +The handler may be sync or async. + +> \[!NOTE] +> @agent.on\_debug\_event +> def handle(event\_type, data): +> if event\_type == "barge": +> print(f"Barge detected: \{data.get('barge\_elapsed\_ms')\}ms") + +#### Signature + +```python +on_debug_event(handler: Callable) -> Callable +``` + +#### Parameters + + + Callback function with signature (event\_type: str, data: dict) + + +#### Returns + +`Callable` — The handler function (unchanged), for use as a decorator + +#### Source + +[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) + +Line 458. + +*** + +### on\_summary + +Called when a post-prompt summary is received + +#### Signature + +```python +on_summary( + summary: Optional[Dict[str, Any]], + raw_data: Optional[Dict[str, Any]] = None +) -> None +``` + +#### Parameters + + + The summary object or None if no summary was found + + + + The complete raw POST data from the request + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) + +Line 447. + +*** + +### register\_sip\_username + +Register a SIP username that should be routed to this agent + +#### Signature + +```python +register_sip_username(sip_username: str) -> AgentBase +``` + +#### Parameters + + + SIP username to register + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) + +Line 682. + +*** + +### set\_post\_prompt\_url + +Override the default post\_prompt\_url with a supplied URL string + +#### Signature + +```python +set_post_prompt_url(url: str) -> AgentBase +``` + +#### Parameters + + + The URL to use for post-prompt summary delivery + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) + +Line 740. + +*** + +### set\_web\_hook\_url + +Override the default web\_hook\_url with a supplied URL string + +#### Signature + +```python +set_web_hook_url(url: str) -> AgentBase +``` + +#### Parameters + + + The URL to use for SWAIG function webhooks + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) + +Line 727. + +## Source + +[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) + +Line 78. diff --git a/fern/products/sdk-reference/python/signalwire/core/agent-base/index.mdx b/fern/products/sdk-reference/python/signalwire/core/agent-base/index.mdx new file mode 100644 index 0000000000..109b39d598 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/agent-base/index.mdx @@ -0,0 +1,44 @@ +--- +slug: "/reference/python/signalwire/core/agent-base" +title: "agent_base" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.agent_base" + parent: "signalwire.core" + module: "signalwire.core" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py" +--- +# `agent_base` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module agent_base +``` + +## Properties + + + +## Classes + + + + Base class for all SignalWire AI Agents. + + + +## Source + +[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/agent/config/index.mdx b/fern/products/sdk-reference/python/signalwire/core/agent/config/index.mdx new file mode 100644 index 0000000000..99c927c957 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/agent/config/index.mdx @@ -0,0 +1,36 @@ +--- +slug: "/reference/python/signalwire/core/agent/config" +title: "config" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.agent.config" + parent: "signalwire.core.agent" + module: "signalwire.core.agent" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/config/__init__.py" +--- +# `config` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module config +``` + +## Properties + + + +## Source + +[`signalwire/signalwire/core/agent/config/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/config/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/agent/deployment/handlers/index.mdx b/fern/products/sdk-reference/python/signalwire/core/agent/deployment/handlers/index.mdx new file mode 100644 index 0000000000..3a66848798 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/agent/deployment/handlers/index.mdx @@ -0,0 +1,32 @@ +--- +slug: "/reference/python/signalwire/core/agent/deployment/handlers" +title: "handlers" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.agent.deployment.handlers" + parent: "signalwire.core.agent.deployment" + module: "signalwire.core.agent.deployment" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/deployment/handlers/__init__.py" +--- +# `handlers` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module handlers +``` + +## Source + +[`signalwire/signalwire/core/agent/deployment/handlers/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/deployment/handlers/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/agent/deployment/index.mdx b/fern/products/sdk-reference/python/signalwire/core/agent/deployment/index.mdx new file mode 100644 index 0000000000..f513ec6933 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/agent/deployment/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/signalwire/core/agent/deployment" +title: "deployment" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.agent.deployment" + parent: "signalwire.core.agent" + module: "signalwire.core.agent" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/deployment/__init__.py" +--- +# `deployment` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module deployment +``` + +## Modules + + + + Copyright (c) 2025 SignalWire + + + +## Source + +[`signalwire/signalwire/core/agent/deployment/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/deployment/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/agent/index.mdx b/fern/products/sdk-reference/python/signalwire/core/agent/index.mdx new file mode 100644 index 0000000000..2ae5b9e15a --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/agent/index.mdx @@ -0,0 +1,68 @@ +--- +slug: "/reference/python/signalwire/core/agent" +title: "agent" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.agent" + parent: "signalwire.core" + module: "signalwire.core" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/__init__.py" +--- +# `agent` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module agent +``` + +## Properties + + + +## Modules + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + +## Source + +[`signalwire/signalwire/core/agent/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/agent/prompt/index.mdx b/fern/products/sdk-reference/python/signalwire/core/agent/prompt/index.mdx new file mode 100644 index 0000000000..ff8f923ed3 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/agent/prompt/index.mdx @@ -0,0 +1,44 @@ +--- +slug: "/reference/python/signalwire/core/agent/prompt" +title: "prompt" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.agent.prompt" + parent: "signalwire.core.agent" + module: "signalwire.core.agent" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/__init__.py" +--- +# `prompt` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module prompt +``` + +## Properties + + + +## Modules + + + + Copyright (c) 2025 SignalWire + + + +## Source + +[`signalwire/signalwire/core/agent/prompt/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/agent/prompt/manager/index.mdx b/fern/products/sdk-reference/python/signalwire/core/agent/prompt/manager/index.mdx new file mode 100644 index 0000000000..5d00864bc2 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/agent/prompt/manager/index.mdx @@ -0,0 +1,44 @@ +--- +slug: "/reference/python/signalwire/core/agent/prompt/manager" +title: "manager" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.agent.prompt.manager" + parent: "signalwire.core.agent.prompt" + module: "signalwire.core.agent.prompt" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py" +--- +# `manager` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module manager +``` + +## Properties + + + +## Classes + + + + Manages prompt building and configuration. + + + +## Source + +[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/agent/prompt/manager/prompt-manager/index.mdx b/fern/products/sdk-reference/python/signalwire/core/agent/prompt/manager/prompt-manager/index.mdx new file mode 100644 index 0000000000..9a1e2783cd --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/agent/prompt/manager/prompt-manager/index.mdx @@ -0,0 +1,434 @@ +--- +slug: "/reference/python/signalwire/core/agent/prompt/manager/prompt-manager" +title: "PromptManager" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.core.agent.prompt.manager.PromptManager" + parent: "signalwire.core.agent.prompt.manager" + module: "signalwire.core.agent.prompt.manager" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py" +--- +# `PromptManager` + +Manages prompt building and configuration. + +## Signature + +```python +class PromptManager +``` + +## Properties + + + +## Methods + +### \_\_init\_\_ + +Initialize PromptManager with reference to parent agent. + +#### Signature + +```python +__init__(agent) +``` + +#### Parameters + + + Parent AgentBase instance + + +#### Source + +[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) + +Line 23. + +*** + +### define\_contexts + +Define contexts for the agent. + +#### Signature + +```python +define_contexts(contexts: Union[Dict[str, Any], Any]) -> None +``` + +#### Parameters + + + Context configuration (dict or ContextBuilder) + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) + +Line 73. + +*** + +### get\_contexts + +Get the contexts configuration. + +#### Signature + +```python +get_contexts() -> Optional[Dict[str, Any]] +``` + +#### Returns + +`Optional[Dict[str, Any]]` — Contexts dict or None + +#### Source + +[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) + +Line 300. + +*** + +### get\_post\_prompt + +Get the post-prompt text. + +#### Signature + +```python +get_post_prompt() -> Optional[str] +``` + +#### Returns + +`Optional[str]` — Post-prompt text or None + +#### Source + +[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) + +Line 291. + +*** + +### get\_prompt + +Get the prompt configuration. + +#### Signature + +```python +get_prompt() -> Optional[Union[str, List[Dict[str, Any]]]] +``` + +#### Returns + +`Optional[Union[str, List[Dict[str, Any]]]]` — Prompt text or sections or None + +#### Source + +[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) + +Line 273. + +*** + +### get\_raw\_prompt + +Get the raw prompt text if set. + +#### Signature + +```python +get_raw_prompt() -> Optional[str] +``` + +#### Returns + +`Optional[str]` — Raw prompt text or None + +#### Source + +[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) + +Line 282. + +*** + +### prompt\_add\_section + +Add a section to the prompt. + +#### Signature + +```python +prompt_add_section( + title: str, + body: str = '', + bullets: Optional[List[str]] = None, + numbered: bool = False, + numbered_bullets: bool = False, + subsections: Optional[List[Dict[str, Any]]] = None +) -> None +``` + +#### Parameters + + + Section title + + + + Optional section body text + + + + Optional list of bullet points + + + + Whether this section should be numbered + + + + Whether bullets should be numbered + + + + Optional list of subsection objects + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) + +Line 127. + +*** + +### prompt\_add\_subsection + +Add a subsection to an existing section (creating parent if needed). + +#### Signature + +```python +prompt_add_subsection( + parent_title: str, + title: str, + body: str = '', + bullets: Optional[List[str]] = None +) -> None +``` + +#### Parameters + + + Parent section title + + + + Subsection title + + + + Optional subsection body text + + + + Optional list of bullet points + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) + +Line 220. + +*** + +### prompt\_add\_to\_section + +Add content to an existing section (creating it if needed). + +#### Signature + +```python +prompt_add_to_section( + title: str, + body: Optional[str] = None, + bullet: Optional[str] = None, + bullets: Optional[List[str]] = None +) -> None +``` + +#### Parameters + + + Section title + + + + Optional text to append to section body + + + + Optional single bullet point to add + + + + Optional list of bullet points to add + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) + +Line 179. + +*** + +### prompt\_has\_section + +Check if a section exists in the prompt. + +#### Signature + +```python +prompt_has_section(title: str) -> bool +``` + +#### Parameters + + + Section title to check + + +#### Returns + +`bool` — True if section exists, False otherwise + +#### Source + +[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) + +Line 258. + +*** + +### set\_post\_prompt + +Set the post-prompt text. + +#### Signature + +```python +set_post_prompt(text: str) -> None +``` + +#### Parameters + + + Post-prompt text + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) + +Line 102. + +*** + +### set\_prompt\_pom + +Set the prompt as a POM dictionary. + +#### Signature + +```python +set_prompt_pom(pom: List[Dict[str, Any]]) -> None +``` + +#### Parameters + + + POM dictionary structure + + +#### Returns + +`None` + +#### Throws + +- `ValueError` — If use\_pom is False + +#### Source + +[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) + +Line 112. + +*** + +### set\_prompt\_text + +Set the agent's prompt as raw text. + +#### Signature + +```python +set_prompt_text(text: str) -> None +``` + +#### Parameters + + + Prompt text + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) + +Line 91. + +## Source + +[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) + +Line 20. diff --git a/fern/products/sdk-reference/python/signalwire/core/agent/routing/index.mdx b/fern/products/sdk-reference/python/signalwire/core/agent/routing/index.mdx new file mode 100644 index 0000000000..c4c479a5d7 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/agent/routing/index.mdx @@ -0,0 +1,32 @@ +--- +slug: "/reference/python/signalwire/core/agent/routing" +title: "routing" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.agent.routing" + parent: "signalwire.core.agent" + module: "signalwire.core.agent" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/routing/__init__.py" +--- +# `routing` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module routing +``` + +## Source + +[`signalwire/signalwire/core/agent/routing/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/routing/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/agent/security/index.mdx b/fern/products/sdk-reference/python/signalwire/core/agent/security/index.mdx new file mode 100644 index 0000000000..c0bb8eb1a3 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/agent/security/index.mdx @@ -0,0 +1,32 @@ +--- +slug: "/reference/python/signalwire/core/agent/security" +title: "security" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.agent.security" + parent: "signalwire.core.agent" + module: "signalwire.core.agent" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/security/__init__.py" +--- +# `security` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module security +``` + +## Source + +[`signalwire/signalwire/core/agent/security/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/security/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/agent/swml/index.mdx b/fern/products/sdk-reference/python/signalwire/core/agent/swml/index.mdx new file mode 100644 index 0000000000..aaaeac9ce2 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/agent/swml/index.mdx @@ -0,0 +1,32 @@ +--- +slug: "/reference/python/signalwire/core/agent/swml" +title: "swml" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.agent.swml" + parent: "signalwire.core.agent" + module: "signalwire.core.agent" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/swml/__init__.py" +--- +# `swml` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module swml +``` + +## Source + +[`signalwire/signalwire/core/agent/swml/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/swml/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/agent/tools/decorator/index.mdx b/fern/products/sdk-reference/python/signalwire/core/agent/tools/decorator/index.mdx new file mode 100644 index 0000000000..74ef4378cd --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/agent/tools/decorator/index.mdx @@ -0,0 +1,44 @@ +--- +slug: "/reference/python/signalwire/core/agent/tools/decorator" +title: "decorator" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.agent.tools.decorator" + parent: "signalwire.core.agent.tools" + module: "signalwire.core.agent.tools" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/decorator.py" +--- +# `decorator` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module decorator +``` + +## Properties + + + +## Classes + + + + Handles tool decoration logic. + + + +## Source + +[`signalwire/signalwire/core/agent/tools/decorator.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/decorator.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/agent/tools/decorator/tool-decorator/index.mdx b/fern/products/sdk-reference/python/signalwire/core/agent/tools/decorator/tool-decorator/index.mdx new file mode 100644 index 0000000000..4f66700e58 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/agent/tools/decorator/tool-decorator/index.mdx @@ -0,0 +1,85 @@ +--- +slug: "/reference/python/signalwire/core/agent/tools/decorator/tool-decorator" +title: "ToolDecorator" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.core.agent.tools.decorator.ToolDecorator" + parent: "signalwire.core.agent.tools.decorator" + module: "signalwire.core.agent.tools.decorator" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/decorator.py" +--- +# `ToolDecorator` + +Handles tool decoration logic. + +## Signature + +```python +class ToolDecorator +``` + +## Methods + +### create\_class\_decorator + +Create class tool decorator. + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +create_class_decorator() +``` + +#### Returns + +Decorator function + +#### Source + +[`signalwire/signalwire/core/agent/tools/decorator.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/decorator.py) + +Line 132. + +*** + +### create\_instance\_decorator + +Create instance tool decorator. + +**Modifiers:** `static` + +#### Signature + +```python +@staticmethod +create_instance_decorator(registry) +``` + +#### Parameters + + + ToolRegistry instance to register with + + +#### Returns + +Decorator function + +#### Source + +[`signalwire/signalwire/core/agent/tools/decorator.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/decorator.py) + +Line 23. + +## Source + +[`signalwire/signalwire/core/agent/tools/decorator.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/decorator.py) + +Line 20. diff --git a/fern/products/sdk-reference/python/signalwire/core/agent/tools/index.mdx b/fern/products/sdk-reference/python/signalwire/core/agent/tools/index.mdx new file mode 100644 index 0000000000..fa63cadb09 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/agent/tools/index.mdx @@ -0,0 +1,52 @@ +--- +slug: "/reference/python/signalwire/core/agent/tools" +title: "tools" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.agent.tools" + parent: "signalwire.core.agent" + module: "signalwire.core.agent" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/__init__.py" +--- +# `tools` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module tools +``` + +## Properties + + + +## Modules + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + +## Source + +[`signalwire/signalwire/core/agent/tools/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/agent/tools/registry/index.mdx b/fern/products/sdk-reference/python/signalwire/core/agent/tools/registry/index.mdx new file mode 100644 index 0000000000..5ffc67b78b --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/agent/tools/registry/index.mdx @@ -0,0 +1,44 @@ +--- +slug: "/reference/python/signalwire/core/agent/tools/registry" +title: "registry" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.agent.tools.registry" + parent: "signalwire.core.agent.tools" + module: "signalwire.core.agent.tools" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/registry.py" +--- +# `registry` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module registry +``` + +## Properties + + + +## Classes + + + + Manages SWAIG function registration. + + + +## Source + +[`signalwire/signalwire/core/agent/tools/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/registry.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/agent/tools/registry/tool-registry/index.mdx b/fern/products/sdk-reference/python/signalwire/core/agent/tools/registry/tool-registry/index.mdx new file mode 100644 index 0000000000..1b7f23a31d --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/agent/tools/registry/tool-registry/index.mdx @@ -0,0 +1,309 @@ +--- +slug: "/reference/python/signalwire/core/agent/tools/registry/tool-registry" +title: "ToolRegistry" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.core.agent.tools.registry.ToolRegistry" + parent: "signalwire.core.agent.tools.registry" + module: "signalwire.core.agent.tools.registry" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/registry.py" +--- +# `ToolRegistry` + +Manages SWAIG function registration. + +## Signature + +```python +class ToolRegistry +``` + +## Properties + + + +## Methods + +### \_\_init\_\_ + +Initialize ToolRegistry with reference to parent agent. + +#### Signature + +```python +__init__(agent) +``` + +#### Parameters + + + Parent AgentBase instance + + +#### Source + +[`signalwire/signalwire/core/agent/tools/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/registry.py) + +Line 24. + +*** + +### define\_tool + +Define a SWAIG function that the AI can call. + +#### Signature + +```python +define_tool( + name: str, + description: str, + parameters: Dict[str, Any], + handler: Callable, + secure: bool = True, + fillers: Optional[Dict[str, List[str]]] = None, + wait_file: Optional[str] = None, + wait_file_loops: Optional[int] = None, + webhook_url: Optional[str] = None, + required: Optional[List[str]] = None, + is_typed_handler: bool = False, + **swaig_fields = {} +) -> None +``` + +#### Parameters + + + Function name (must be unique) + + + + Function description for the AI + + + + JSON Schema of parameters + + + + Function to call when invoked + + + + Whether to require token validation + + + + Optional dict mapping language codes to arrays of filler phrases (deprecated) + + + + Optional URL to audio file to play while function executes + + + + Optional number of times to loop the wait\_file + + + + Optional external webhook URL to use instead of local handling + + + + Optional list of required parameter names + + + + Whether the handler uses type-hinted parameters + + + + +#### Returns + +`None` + +#### Throws + +- `ValueError` — If tool name already exists + +#### Source + +[`signalwire/signalwire/core/agent/tools/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/registry.py) + +Line 35. + +*** + +### get\_all\_functions + +Get all registered functions. + +#### Signature + +```python +get_all_functions() -> Dict[str, Union[SWAIGFunction, Dict[str, Any]]] +``` + +#### Returns + +`Dict[str, Union[SWAIGFunction, Dict[str, Any]]]` — Dictionary of function name to function object/dict + +#### Source + +[`signalwire/signalwire/core/agent/tools/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/registry.py) + +Line 204. + +*** + +### get\_function + +Get a registered function by name. + +#### Signature + +```python +get_function(name: str) -> Optional[Union[SWAIGFunction, Dict[str, Any]]] +``` + +#### Parameters + + + Function name + + +#### Returns + +`Optional[Union[SWAIGFunction, Dict[str, Any]]]` — SWAIGFunction instance or raw function dict, or None if not found + +#### Source + +[`signalwire/signalwire/core/agent/tools/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/registry.py) + +Line 192. + +*** + +### has\_function + +Check if a function is registered. + +#### Signature + +```python +has_function(name: str) -> bool +``` + +#### Parameters + + + Function name + + +#### Returns + +`bool` — True if function exists, False otherwise + +#### Source + +[`signalwire/signalwire/core/agent/tools/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/registry.py) + +Line 213. + +*** + +### register\_class\_decorated\_tools + +Register tools defined with @AgentBase.tool class decorator. + +This method scans the class for methods decorated with @AgentBase.tool +and registers them automatically. If parameters are not explicitly +provided and the function has type-hinted parameters, the schema +is inferred from the type hints. + +#### Signature + +```python +register_class_decorated_tools() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/core/agent/tools/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/registry.py) + +Line 116. + +*** + +### register\_swaig\_function + +Register a raw SWAIG function dictionary (e.g., from DataMap.to\_swaig\_function()). + +#### Signature + +```python +register_swaig_function(function_dict: Dict[str, Any]) -> None +``` + +#### Parameters + + + Complete SWAIG function definition dictionary + + +#### Returns + +`None` + +#### Throws + +- `ValueError` — If function name missing or already exists + +#### Source + +[`signalwire/signalwire/core/agent/tools/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/registry.py) + +Line 90. + +*** + +### remove\_function + +Remove a registered function. + +#### Signature + +```python +remove_function(name: str) -> bool +``` + +#### Parameters + + + Function name + + +#### Returns + +`bool` — True if removed, False if not found + +#### Source + +[`signalwire/signalwire/core/agent/tools/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/registry.py) + +Line 225. + +## Source + +[`signalwire/signalwire/core/agent/tools/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/registry.py) + +Line 21. diff --git a/fern/products/sdk-reference/python/signalwire/core/agent/tools/type-inference/index.mdx b/fern/products/sdk-reference/python/signalwire/core/agent/tools/type-inference/index.mdx new file mode 100644 index 0000000000..f8b1ebe897 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/agent/tools/type-inference/index.mdx @@ -0,0 +1,99 @@ +--- +slug: "/reference/python/signalwire/core/agent/tools/type-inference" +title: "type_inference" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.agent.tools.type_inference" + parent: "signalwire.core.agent.tools" + module: "signalwire.core.agent.tools" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/type_inference.py" +--- +# `type_inference` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module type_inference +``` + +## Functions + +### create\_typed\_handler\_wrapper + +Wrap a typed handler function so it can be called with the standard +SWAIG calling convention (args\_dict, raw\_data). + +The wrapper unpacks the args dict into keyword arguments for the +original function. + +#### Signature + +```python +create_typed_handler_wrapper(func, has_raw_data: bool) +``` + +#### Parameters + + + The original typed handler function. + + + + If True, pass raw\_data as a keyword argument. + + +#### Returns + +A wrapper function with signature (args, raw\_data). + +#### Source + +[`signalwire/signalwire/core/agent/tools/type_inference.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/type_inference.py) + +Line 248. + +*** + +### infer\_schema + +Inspect a function's signature and type hints to infer a JSON Schema +for SWAIG tool parameters. + +#### Signature + +```python +infer_schema( + func +) -> Tuple[Dict[str, Dict], List[str], Optional[str], bool, bool] +``` + +#### Parameters + + + The function to inspect. + + +#### Returns + +`Tuple[Dict[str, Dict], List[str], Optional[str], bool, bool]` — A tuple of (parameters, required, description, is\_typed, has\_raw\_data): - parameters: dict mapping parameter names to JSON Schema property dicts - required: list of required parameter names - description: tool description from docstring (or None) - is\_typed: True if the function uses typed parameters (new style) - has\_raw\_data: True if the function accepts a `raw_data` parameter + +#### Source + +[`signalwire/signalwire/core/agent/tools/type_inference.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/type_inference.py) + +Line 147. + +## Source + +[`signalwire/signalwire/core/agent/tools/type_inference.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/type_inference.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/auth-handler/auth-handler/index.mdx b/fern/products/sdk-reference/python/signalwire/core/auth-handler/auth-handler/index.mdx new file mode 100644 index 0000000000..be79cc0910 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/auth-handler/auth-handler/index.mdx @@ -0,0 +1,220 @@ +--- +slug: "/reference/python/signalwire/core/auth-handler/auth-handler" +title: "AuthHandler" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.core.auth_handler.AuthHandler" + parent: "signalwire.core.auth_handler" + module: "signalwire.core.auth_handler" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/auth_handler.py" +--- +# `AuthHandler` + +Unified authentication handler supporting multiple auth methods. + +This class provides a clean pattern for handling Basic Auth, Bearer tokens, +and API keys across all SignalWire services. + +## Signature + +```python +class AuthHandler +``` + +## Properties + + + + + + + +## Methods + +### \_\_init\_\_ + +Initialize auth handler with security configuration. + +#### Signature + +```python +__init__(security_config: SecurityConfig) +``` + +#### Parameters + + + SecurityConfig instance with auth settings + + +#### Source + +[`signalwire/signalwire/core/auth_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/auth_handler.py) + +Line 38. + +*** + +### flask\_decorator + +Flask decorator for authentication. + +This provides compatibility with Flask-based services like MCP Gateway. + +#### Signature + +```python +flask_decorator(f: Callable) -> Callable +``` + +#### Parameters + + + +#### Returns + +`Callable` + +#### Source + +[`signalwire/signalwire/core/auth_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/auth_handler.py) + +Line 160. + +*** + +### get\_auth\_info + +Get information about configured auth methods + +#### Signature + +```python +get_auth_info() -> Dict[str, Any] +``` + +#### Returns + +`Dict[str, Any]` + +#### Source + +[`signalwire/signalwire/core/auth_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/auth_handler.py) + +Line 209. + +*** + +### get\_fastapi\_dependency + +Get FastAPI dependency for authentication. + +#### Signature + +```python +get_fastapi_dependency(optional: bool = False) +``` + +#### Parameters + + + If True, authentication is optional + + +#### Returns + +FastAPI dependency function + +#### Source + +[`signalwire/signalwire/core/auth_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/auth_handler.py) + +Line 114. + +*** + +### verify\_api\_key + +Verify API key + +#### Signature + +```python +verify_api_key(api_key: str) -> bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/core/auth_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/auth_handler.py) + +Line 106. + +*** + +### verify\_basic\_auth + +Verify basic auth credentials + +#### Signature + +```python +verify_basic_auth(credentials: HTTPBasicCredentials) -> bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/core/auth_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/auth_handler.py) + +Line 81. + +*** + +### verify\_bearer\_token + +Verify bearer token + +#### Signature + +```python +verify_bearer_token(credentials: HTTPAuthorizationCredentials) -> bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/core/auth_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/auth_handler.py) + +Line 96. + +## Source + +[`signalwire/signalwire/core/auth_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/auth_handler.py) + +Line 30. diff --git a/fern/products/sdk-reference/python/signalwire/core/auth-handler/index.mdx b/fern/products/sdk-reference/python/signalwire/core/auth-handler/index.mdx new file mode 100644 index 0000000000..f63f9b6ecb --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/auth-handler/index.mdx @@ -0,0 +1,44 @@ +--- +slug: "/reference/python/signalwire/core/auth-handler" +title: "auth_handler" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.auth_handler" + parent: "signalwire.core" + module: "signalwire.core" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/auth_handler.py" +--- +# `auth_handler` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module auth_handler +``` + +## Properties + + + +## Classes + + + + Unified authentication handler supporting multiple auth methods. + + + +## Source + +[`signalwire/signalwire/core/auth_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/auth_handler.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/config-loader/config-loader/index.mdx b/fern/products/sdk-reference/python/signalwire/core/config-loader/config-loader/index.mdx new file mode 100644 index 0000000000..adf0a53eec --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/config-loader/config-loader/index.mdx @@ -0,0 +1,293 @@ +--- +slug: "/reference/python/signalwire/core/config-loader/config-loader" +title: "ConfigLoader" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.core.config_loader.ConfigLoader" + parent: "signalwire.core.config_loader" + module: "signalwire.core.config_loader" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/config_loader.py" +--- +# `ConfigLoader` + +Configuration loader with environment variable substitution. + +Supports $\{VAR|default\} syntax for referencing environment variables +within JSON configuration files. This provides a clean pattern for +configuration across all SignalWire services. + +## Signature + +```python +class ConfigLoader +``` + +## Properties + + + +## Methods + +### \_\_init\_\_ + +Initialize config loader. + +#### Signature + +```python +__init__(config_paths: Optional[List[str]] = None) +``` + +#### Parameters + + + Optional list of config file paths to check. If not provided, uses default search paths. + + +#### Source + +[`signalwire/signalwire/core/config_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/config_loader.py) + +Line 28. + +*** + +### find\_config\_file + +Static method to find a config file for a service. + +**Modifiers:** `static` + +#### Signature + +```python +@staticmethod +find_config_file( + service_name: Optional[str] = None, + additional_paths: Optional[List[str]] = None +) -> Optional[str] +``` + +#### Parameters + + + Optional service name for service-specific config + + + + Additional paths to check + + +#### Returns + +`Optional[str]` — Path to the first config file found, or None + +#### Source + +[`signalwire/signalwire/core/config_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/config_loader.py) + +Line 224. + +*** + +### get + +Get a configuration value by dot-notation path. + +#### Signature + +```python +get(key_path: str, default: Any = None) -> Any +``` + +#### Parameters + + + Dot-separated path (e.g., "security.ssl\_enabled") + + + + Default value if path not found + + +#### Returns + +`Any` — The configuration value with variables substituted + +#### Source + +[`signalwire/signalwire/core/config_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/config_loader.py) + +Line 129. + +*** + +### get\_config + +Get the raw configuration (before substitution). + +#### Signature + +```python +get_config() -> Dict[str, Any] +``` + +#### Returns + +`Dict[str, Any]` + +#### Source + +[`signalwire/signalwire/core/config_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/config_loader.py) + +Line 73. + +*** + +### get\_config\_file + +Get the path of the loaded config file. + +#### Signature + +```python +get_config_file() -> Optional[str] +``` + +#### Returns + +`Optional[str]` + +#### Source + +[`signalwire/signalwire/core/config_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/config_loader.py) + +Line 69. + +*** + +### get\_section + +Get an entire configuration section. + +#### Signature + +```python +get_section(section: str) -> Dict[str, Any] +``` + +#### Parameters + + + The section name (e.g., "security", "server") + + +#### Returns + +`Dict[str, Any]` — The configuration section with all variables substituted + +#### Source + +[`signalwire/signalwire/core/config_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/config_loader.py) + +Line 156. + +*** + +### has\_config + +Check if a configuration was loaded. + +#### Signature + +```python +has_config() -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/core/config_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/config_loader.py) + +Line 65. + +*** + +### merge\_with\_env + +Merge configuration with environment variables. + +Config file takes precedence over environment variables, +but config can reference env vars via substitution. + +#### Signature + +```python +merge_with_env(env_prefix: str = 'SWML_') -> Dict[str, Any] +``` + +#### Parameters + + + Prefix for environment variables to consider + + +#### Returns + +`Dict[str, Any]` — Merged configuration dictionary + +#### Source + +[`signalwire/signalwire/core/config_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/config_loader.py) + +Line 171. + +*** + +### substitute\_vars + +Recursively substitute environment variables in configuration values. + +Supports $\{VAR|default\} syntax where: + +- VAR is the environment variable name +- default is the fallback value if VAR is not set + +#### Signature + +```python +substitute_vars(value: Any, max_depth: int = 10) -> Any +``` + +#### Parameters + + + The value to process (can be string, dict, list, etc.) + + + + Maximum recursion depth to prevent infinite loops + + +#### Returns + +`Any` — The value with all environment variables substituted + +#### Source + +[`signalwire/signalwire/core/config_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/config_loader.py) + +Line 77. + +## Source + +[`signalwire/signalwire/core/config_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/config_loader.py) + +Line 19. diff --git a/fern/products/sdk-reference/python/signalwire/core/config-loader/index.mdx b/fern/products/sdk-reference/python/signalwire/core/config-loader/index.mdx new file mode 100644 index 0000000000..eb55685c06 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/config-loader/index.mdx @@ -0,0 +1,44 @@ +--- +slug: "/reference/python/signalwire/core/config-loader" +title: "config_loader" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.config_loader" + parent: "signalwire.core" + module: "signalwire.core" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/config_loader.py" +--- +# `config_loader` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module config_loader +``` + +## Properties + + + +## Classes + + + + Configuration loader with environment variable substitution. + + + +## Source + +[`signalwire/signalwire/core/config_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/config_loader.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/contexts/context-builder/index.mdx b/fern/products/sdk-reference/python/signalwire/core/contexts/context-builder/index.mdx new file mode 100644 index 0000000000..bbffa31a53 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/contexts/context-builder/index.mdx @@ -0,0 +1,240 @@ +--- +slug: "/reference/python/signalwire/core/contexts/context-builder" +title: "ContextBuilder" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.core.contexts.ContextBuilder" + parent: "signalwire.core.contexts" + module: "signalwire.core.contexts" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py" +--- +# `ContextBuilder` + +Builder for multi-step, multi-context AI agent workflows. + +A ContextBuilder owns one or more Contexts; each Context owns an ordered +list of Steps. Only one context and one step is active at a time. Per +chat turn, the runtime injects the current step's instructions as a +system message, then asks the LLM for a response. + +## Native tools auto-injected by the runtime + +When a step (or its enclosing context) declares `valid_steps` or +`valid_contexts`, the runtime auto-injects two native tools so the model +can navigate the flow: + +- `next_step(step: enum)` — present when valid\_steps is set +- `change_context(context: enum)` — present when valid\_contexts is set + +Their `enum` schemas are rewritten on every turn to match whatever +valid\_steps / valid\_contexts apply to the current step. You do NOT need +to define these tools yourself; they appear automatically. + +A third native tool — `gather_submit` — is injected during gather\_info +questioning (see Step.set\_gather\_info / add\_gather\_question). + +These three names — `next_step`, `change_context`, `gather_submit` +— are reserved. ContextBuilder.validate() will reject any agent that +defines a SWAIG tool with one of these names. + +## Function whitelisting (Step.set\_functions) + +Each step may declare a `functions` whitelist. The whitelist is applied +in-memory at the start of each LLM turn. CRITICALLY: if a step does NOT +declare a `functions` field, it INHERITS the previous step's active set. +See Step.set\_functions() for details and examples. + +## Validation + +Call validate() (or to\_dict(), which calls it) to check that: + +- At least one context is defined +- A single context must be named "default" +- Every context has at least one step +- valid\_steps references resolve to real step names (or "next") +- valid\_contexts references resolve to real context names +- gather\_info questions are non-empty and have unique keys +- gather\_info completion\_action targets a reachable step +- No user-defined SWAIG tool collides with a reserved native name + +## Signature + +```python +class ContextBuilder +``` + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(agent) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 1154. + +*** + +### add\_context + +Add a new context + +#### Signature + +```python +add_context(name: str) -> Context +``` + +#### Parameters + + + Context name + + +#### Returns + +`Context` — Context object for method chaining + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 1182. + +*** + +### get\_context + +Get an existing context by name for inspection or modification. + +#### Signature + +```python +get_context(name: str) -> Optional[Context] +``` + +#### Parameters + + + Context name + + +#### Returns + +`Optional[Context]` — Context object if found, None otherwise + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 1203. + +*** + +### reset + +Remove all contexts, returning the builder to its initial state. + +Use this in a dynamic config callback when you need to rebuild +contexts from scratch for a specific request — e.g. skipping a +greeting context on transfers. + +Example:: + +``` +def on_dynamic_config(query, body, headers, agent): + if query.get("transfer"): + agent.define_contexts().reset() + ctx = agent.define_contexts().add_context("default") + ctx.add_step("route").set_text("Route the caller.") +``` + +#### Signature + +```python +reset() -> ContextBuilder +``` + +#### Returns + +`ContextBuilder` — Self for method chaining. + +#### Examples + +```python +def on_dynamic_config(query, body, headers, agent): + if query.get("transfer"): + agent.define_contexts().reset() + ctx = agent.define_contexts().add_context("default") + ctx.add_step("route").set_text("Route the caller.") +``` + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 1159. + +*** + +### to\_dict + +Convert all contexts to dictionary for SWML generation + +#### Signature + +```python +to_dict() -> Dict[str, Any] +``` + +#### Returns + +`Dict[str, Any]` + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 1339. + +*** + +### validate + +Validate the contexts configuration + +#### Signature + +```python +validate() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 1215. + +## Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 1105. diff --git a/fern/products/sdk-reference/python/signalwire/core/contexts/context/index.mdx b/fern/products/sdk-reference/python/signalwire/core/contexts/context/index.mdx new file mode 100644 index 0000000000..42db5226f8 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/contexts/context/index.mdx @@ -0,0 +1,816 @@ +--- +slug: "/reference/python/signalwire/core/contexts/context" +title: "Context" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.core.contexts.Context" + parent: "signalwire.core.contexts" + module: "signalwire.core.contexts" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py" +--- +# `Context` + +A single context containing an ordered list of steps. + +## Conversation history across context switches + +By default (`isolated=False`), switching from one context to another +via `change_context` PRESERVES the entire conversation history. The +user's prior turns and the model's prior responses remain visible +on the next LLM call. The only thing that changes is which step +instructions get injected. + +A common confusion: "the AI re-asked for information the user already +gave." If you see this, history loss is almost never the cause — +history is preserved unless you set `isolated=True`. The real cause +is usually one of: + +- The destination step's `text` literally tells the model to ask + ("Ask the user for their account number"). The model follows + instructions; rephrase to "Confirm the user's account number" + or have the step instructions check global\_data first. +- The relevant info was never extracted into global\_data, so + $\{var\} expansion has nothing to inject and the step prompt + looks generic. Add a webhook that captures the field. +- You explicitly called `set_isolated(True)` on the destination + context. Isolated contexts wipe the conversation array on entry. + Pair with `set_consolidate(True)` if you want a summary instead. + +See Context.set\_isolated() for the wipe semantics, and the SDK's +FunctionResult.swml\_change\_step / swml\_change\_context docstrings +for how to communicate transition intent through tool response text +and global\_data. + +## Signature + +```python +class Context +``` + +## Properties + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(name: str) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 571. + +*** + +### add\_bullets + +Add a POM section with bullet points to the context prompt + +#### Signature + +```python +add_bullets(title: str, bullets: List[str]) -> Context +``` + +#### Parameters + + + Section title + + + + List of bullet points + + +#### Returns + +`Context` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 916. + +*** + +### add\_enter\_filler + +Add enter fillers for a specific language + +#### Signature + +```python +add_enter_filler(language_code: str, fillers: List[str]) -> Context +``` + +#### Parameters + + + Language code (e.g., "en-US", "es") or "default" for catch-all + + + + List of filler phrases for entering this context + + +#### Returns + +`Context` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 962. + +*** + +### add\_exit\_filler + +Add exit fillers for a specific language + +#### Signature + +```python +add_exit_filler(language_code: str, fillers: List[str]) -> Context +``` + +#### Parameters + + + Language code (e.g., "en-US", "es") or "default" for catch-all + + + + List of filler phrases for exiting this context + + +#### Returns + +`Context` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 979. + +*** + +### add\_section + +Add a POM section to the context prompt + +#### Signature + +```python +add_section(title: str, body: str) -> Context +``` + +#### Parameters + + + Section title + + + + Section body text + + +#### Returns + +`Context` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 900. + +*** + +### add\_step + +Add a new step to this context. + +When called with only `name` the returned Step can be configured +with the usual method-chaining API. When the optional keyword +arguments are supplied the step is fully configured in one call: + +#### Signature + +```python +add_step( + name: str, + *, + task: Optional[str] = None, + bullets: Optional[List[str]] = None, + criteria: Optional[str] = None, + functions: Optional[Union[str, List[str]]] = None, + valid_steps: Optional[List[str]] = None +) -> Step +``` + +#### Parameters + + + Step name (must be unique within the context). + + + + Text for the "Task" section (equivalent to `step.add_section("Task", task)`). + + + + List of bullet strings for the "Process" section (equivalent to `step.add_bullets("Process", bullets)`). Requires _task_ to also be set. + + + + Step-completion criteria (equivalent to `step.set_step_criteria(criteria)`). + + + + Tool names the step may call, or `"none"` (equivalent to `step.set_functions(functions)`). + + + + Names of steps the agent may transition to (equivalent to `step.set_valid_steps(valid_steps)`). + + +#### Returns + +`Step` — The configured Step object for optional further chaining. + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 596. + +*** + +### add\_system\_bullets + +Add a POM section with bullet points to the system prompt + +#### Signature + +```python +add_system_bullets(title: str, bullets: List[str]) -> Context +``` + +#### Parameters + + + Section title + + + + List of bullet points + + +#### Returns + +`Context` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 869. + +*** + +### add\_system\_section + +Add a POM section to the system prompt + +#### Signature + +```python +add_system_section(title: str, body: str) -> Context +``` + +#### Parameters + + + Section title + + + + Section body text + + +#### Returns + +`Context` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 853. + +*** + +### get\_step + +Get an existing step by name for inspection or modification. + +#### Signature + +```python +get_step(name: str) -> Optional[Step] +``` + +#### Parameters + + + Step name + + +#### Returns + +`Optional[Step]` — Step object if found, None otherwise + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 653. + +*** + +### move\_step + +Move an existing step to a specific position in the step order. + +#### Signature + +```python +move_step(name: str, position: int) -> Context +``` + +#### Parameters + + + Step name to move + + + + Target index in the step order (0 = first) + + +#### Returns + +`Context` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 680. + +*** + +### remove\_step + +Remove a step from this context entirely. + +#### Signature + +```python +remove_step(name: str) -> Context +``` + +#### Parameters + + + Step name to remove + + +#### Returns + +`Context` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 665. + +*** + +### set\_consolidate + +Set whether to consolidate conversation history when entering this context + +#### Signature + +```python +set_consolidate(consolidate: bool) -> Context +``` + +#### Parameters + + + Whether to consolidate previous conversation + + +#### Returns + +`Context` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 781. + +*** + +### set\_enter\_fillers + +Set fillers that the AI says when entering this context + +#### Signature + +```python +set_enter_fillers(enter_fillers: Dict[str, List[str]]) -> Context +``` + +#### Parameters + + + Dictionary mapping language codes (or "default") to lists of filler phrases Example: \{"en-US": \["Welcome...", "Hello..."], "default": \["Entering..."]\} + + +#### Returns + +`Context` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 932. + +*** + +### set\_exit\_fillers + +Set fillers that the AI says when exiting this context + +#### Signature + +```python +set_exit_fillers(exit_fillers: Dict[str, List[str]]) -> Context +``` + +#### Parameters + + + Dictionary mapping language codes (or "default") to lists of filler phrases Example: \{"en-US": \["Goodbye...", "Thank you..."], "default": \["Exiting..."]\} + + +#### Returns + +`Context` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 947. + +*** + +### set\_full\_reset + +Set whether to do full reset when entering this context + +#### Signature + +```python +set_full_reset(full_reset: bool) -> Context +``` + +#### Parameters + + + Whether to completely rewrite system prompt vs inject + + +#### Returns + +`Context` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 794. + +*** + +### set\_initial\_step + +Set which step the context starts on when entered. + +By default, a context starts on its first step (index 0). If the +context has a preamble step that should only run on first entry +(e.g. a greeting), later entries via `change_context` can skip +it by setting `initial_step` to the name of the step to start +from instead. + +`initial_step` is honoured both at conversation creation (when +the context is first activated) and when switching to this context +via `change_context` during the conversation. + +> \[!NOTE] +> ctx = contexts.add\_context("support") +> ctx.add\_step("greeting").set\_text("Welcome!") +> ctx.add\_step("triage").set\_text("What do you need help with?") +> ctx.set\_initial\_step("triage") # skip greeting on re-entry + +#### Signature + +```python +set_initial_step(step_name: str) -> Context +``` + +#### Parameters + + + Name of the step to start on. Must exist in this context's step list; validated by ContextBuilder.validate(). + + +#### Returns + +`Context` — Self for method chaining. + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 723. + +*** + +### set\_isolated + +Mark this context as isolated — entering it wipes conversation history. + +When `isolated=True` and the context is entered via change\_context, +the runtime calls ai\_conversation\_restart() and the entire conversation +array is wiped. The model starts fresh with only the new context's +system\_prompt + step instructions, with no memory of prior turns. + +EXCEPTION — `reset` overrides the wipe: +If the context also has a `reset` configuration (set via the +Step.set\_reset\_\*() methods on a step that switches into this +context, or via set\_consolidate() / set\_full\_reset() on the +context itself), the wipe is skipped in favor of the reset +behavior. Use `reset` with `consolidate=True` to summarize prior +history into a single message instead of dropping it entirely. + +> \[!NOTE] +> +> - Switching to a sensitive billing flow that should not see +> prior small-talk +> - Handing off to a different agent persona +> - Resetting after a long off-topic detour + +#### Signature + +```python +set_isolated(isolated: bool) -> Context +``` + +#### Parameters + + + True to wipe conversation history on context entry (subject to the reset exception above). + + +#### Returns + +`Context` — Self for method chaining. + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 820. + +*** + +### set\_post\_prompt + +Set post prompt override for this context + +#### Signature + +```python +set_post_prompt(post_prompt: str) -> Context +``` + +#### Parameters + + + Post prompt text to use when this context is active + + +#### Returns + +`Context` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 753. + +*** + +### set\_prompt + +Set the context's prompt text directly + +#### Signature + +```python +set_prompt(prompt: str) -> Context +``` + +#### Parameters + + + The prompt text for this context + + +#### Returns + +`Context` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 885. + +*** + +### set\_system\_prompt + +Set system prompt for context switching (triggers context reset) + +#### Signature + +```python +set_system_prompt(system_prompt: str) -> Context +``` + +#### Parameters + + + New system prompt for when this context is entered + + +#### Returns + +`Context` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 766. + +*** + +### set\_user\_prompt + +Set user prompt to inject when entering this context + +#### Signature + +```python +set_user_prompt(user_prompt: str) -> Context +``` + +#### Parameters + + + User message to inject for context + + +#### Returns + +`Context` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 807. + +*** + +### set\_valid\_contexts + +Set which contexts can be navigated to from this context + +#### Signature + +```python +set_valid_contexts(contexts: List[str]) -> Context +``` + +#### Parameters + + + List of valid context names + + +#### Returns + +`Context` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 697. + +*** + +### set\_valid\_steps + +Set which steps can be navigated to from any step in this context + +#### Signature + +```python +set_valid_steps(steps: List[str]) -> Context +``` + +#### Parameters + + + List of valid step names (include "next" for sequential flow) + + +#### Returns + +`Context` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 710. + +*** + +### to\_dict + +Convert context to dictionary for SWML generation + +#### Signature + +```python +to_dict() -> Dict[str, Any] +``` + +#### Returns + +`Dict[str, Any]` + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 1040. + +## Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 538. diff --git a/fern/products/sdk-reference/python/signalwire/core/contexts/gather-info/index.mdx b/fern/products/sdk-reference/python/signalwire/core/contexts/gather-info/index.mdx new file mode 100644 index 0000000000..735d83f279 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/contexts/gather-info/index.mdx @@ -0,0 +1,117 @@ +--- +slug: "/reference/python/signalwire/core/contexts/gather-info" +title: "GatherInfo" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.core.contexts.GatherInfo" + parent: "signalwire.core.contexts" + module: "signalwire.core.contexts" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py" +--- +# `GatherInfo` + +Configuration for gathering information in a step via the C-side gather\_info system. + +This produces zero tool\_call/tool\_result entries in LLM-visible history, +instead using dynamic step instruction re-injection to present one question +at a time. + +## Signature + +```python +class GatherInfo +``` + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + output_key: Optional[str] = None, + completion_action: Optional[str] = None, + prompt: Optional[str] = None +) +``` + +#### Parameters + + + + + + + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 59. + +*** + +### add\_question + +Add a question to gather. + +#### Signature + +```python +add_question(key: str, question: str, **kwargs = {}) -> GatherInfo +``` + +#### Parameters + + + Key name for storing the answer in global\_data + + + + The question text to ask + + + + +#### Returns + +`GatherInfo` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 67. + +*** + +### to\_dict + +Convert to dictionary for SWML generation + +#### Signature + +```python +to_dict() -> Dict[str, Any] +``` + +#### Returns + +`Dict[str, Any]` + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 90. + +## Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 51. diff --git a/fern/products/sdk-reference/python/signalwire/core/contexts/gather-question/index.mdx b/fern/products/sdk-reference/python/signalwire/core/contexts/gather-question/index.mdx new file mode 100644 index 0000000000..8e38394f33 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/contexts/gather-question/index.mdx @@ -0,0 +1,102 @@ +--- +slug: "/reference/python/signalwire/core/contexts/gather-question" +title: "GatherQuestion" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.core.contexts.GatherQuestion" + parent: "signalwire.core.contexts" + module: "signalwire.core.contexts" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py" +--- +# `GatherQuestion` + +Represents a single question in a gather\_info configuration + +## Signature + +```python +class GatherQuestion +``` + +## Properties + + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + key: str, + question: str, + type: str = 'string', + confirm: bool = False, + prompt: Optional[str] = None, + functions: Optional[List[str]] = None +) +``` + +#### Parameters + + + + + + + + + + + + + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 27. + +*** + +### to\_dict + +Convert question to dictionary for SWML generation + +#### Signature + +```python +to_dict() -> Dict[str, Any] +``` + +#### Returns + +`Dict[str, Any]` + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 37. + +## Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 24. diff --git a/fern/products/sdk-reference/python/signalwire/core/contexts/index.mdx b/fern/products/sdk-reference/python/signalwire/core/contexts/index.mdx new file mode 100644 index 0000000000..6fbebe854f --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/contexts/index.mdx @@ -0,0 +1,92 @@ +--- +slug: "/reference/python/signalwire/core/contexts" +title: "contexts" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.contexts" + parent: "signalwire.core" + module: "signalwire.core" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py" +--- +# `contexts` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module contexts +``` + +## Constants + + + + + + + +## Classes + + + + A single context containing an ordered list of steps. + + + + Builder for multi-step, multi-context AI agent workflows. + + + + Configuration for gathering information in a step via the C-side gather\_info system. + + + + Represents a single question in a gather\_info configuration + + + + Represents a single step within a context + + + +## Functions + +### create\_simple\_context + +Helper function to create a simple single context + +#### Signature + +```python +create_simple_context(name: str = 'default') -> Context +``` + +#### Parameters + + + Context name (defaults to "default") + + +#### Returns + +`Context` — Context object for method chaining + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 1350. + +## Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/contexts/step/index.mdx b/fern/products/sdk-reference/python/signalwire/core/contexts/step/index.mdx new file mode 100644 index 0000000000..b29c3b9e08 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/contexts/step/index.mdx @@ -0,0 +1,714 @@ +--- +slug: "/reference/python/signalwire/core/contexts/step" +title: "Step" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.core.contexts.Step" + parent: "signalwire.core.contexts" + module: "signalwire.core.contexts" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py" +--- +# `Step` + +Represents a single step within a context + +## Signature + +```python +class Step +``` + +## Properties + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(name: str) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 107. + +*** + +### add\_bullets + +Add a POM section with bullet points + +#### Signature + +```python +add_bullets(title: str, bullets: List[str]) -> Step +``` + +#### Parameters + + + Section title + + + + List of bullet points + + +#### Returns + +`Step` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 163. + +*** + +### add\_gather\_question + +Add a question to this step's gather\_info configuration. +set\_gather\_info() must be called before this method. + +IMPORTANT — gather mode locks function access: +While the model is asking gather questions, the runtime forcibly +deactivates ALL of the step's other functions. The only callable +tools during a gather question are: + +``` + - `gather_submit` (the native answer-submission tool) + - Whatever names you list in this question's `functions` arg + +`next_step` and `change_context` are also filtered out — the model +cannot navigate away until the gather completes. This is by design: +it forces a tight ask → submit → next-question loop. + +If a question needs to call out to a tool (e.g. validate an email, +geocode a ZIP), list that tool name in this question's `functions`. +Functions listed here are active ONLY for this question. +``` + +#### Signature + +```python +add_gather_question( + key: str, + question: str, + type: str = 'string', + confirm: bool = False, + prompt: Optional[str] = None, + functions: Optional[List[str]] = None +) -> Step +``` + +#### Parameters + + + Key name for storing the answer in global\_data. + + + + The question text the model is instructed to ask. + + + + JSON schema type for the answer ("string", "integer", "number", "boolean"). Default: "string". + + + + If True, the model must read the answer back and obtain explicit user confirmation before submitting (the gather\_submit schema gains a required `confirmed_by_user` parameter). + + + + Extra instruction text appended after the question. + + + + Names of functions to unlock for this question only. These are activated on top of `gather_submit`. All other step functions remain locked out. + + +#### Returns + +`Step` — Self for method chaining. + +#### Examples + +```python + - `gather_submit` (the native answer-submission tool) + - Whatever names you list in this question's `functions` arg + +`next_step` and `change_context` are also filtered out — the model +cannot navigate away until the gather completes. This is by design: +it forces a tight ask → submit → next-question loop. + +If a question needs to call out to a tool (e.g. validate an email, +geocode a ZIP), list that tool name in this question's `functions`. +Functions listed here are active ONLY for this question. +``` + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 358. + +*** + +### add\_section + +Add a POM section to the step + +#### Signature + +```python +add_section(title: str, body: str) -> Step +``` + +#### Parameters + + + Section title + + + + Section body text + + +#### Returns + +`Step` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 147. + +*** + +### clear\_sections + +Remove all POM sections and direct text from this step, allowing it +to be repopulated with new content. + +#### Signature + +```python +clear_sections() -> Step +``` + +#### Returns + +`Step` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 404. + +*** + +### set\_end + +Mark this step as terminal for the step flow. + +IMPORTANT: `end=True` does NOT end the conversation or hang up the +call. It exits step mode entirely after this step executes — clearing +the steps list, current step index, valid\_steps, and valid\_contexts. +The agent keeps running, but operates only under the base system +prompt and the context-level prompt; no more step instructions are +injected and no more `next_step` tool is offered. + +To actually end the call, call a hangup tool or define a hangup\_hook. + +Combine with `set_reset_*()` if you also want to reset/consolidate +the conversation when this step exits. + +#### Signature + +```python +set_end(end: bool) -> Step +``` + +#### Parameters + + + True to exit step mode after this step. + + +#### Returns + +`Step` — Self for method chaining. + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 278. + +*** + +### set\_functions + +Set which non-internal functions are callable while this step is active. + +IMPORTANT — keep the per-step active set small: +LLM tool selection accuracy degrades noticeably once the +per-call tool list grows past ~7-8 entries. Symptoms: the model +has the right tool available, the user's request clearly matches +it, but the model doesn't call it (or calls a near-neighbor +instead). Same prompt may pass on rerun. This is the LLM's +native tool-selection behavior — not something the SDK can fix. + +``` +Mitigations: + - Whitelist only the tools the current step actually needs. + A 4-tool step is more reliable than a 12-tool step. + - Split a busy step into two narrower steps so the relevant + tools are partitioned by phase of the conversation. + - Remember that `next_step` and `change_context` are + auto-injected when valid_steps / valid_contexts are set — + they count against the budget too. Don't list them in + `functions`; the runtime adds them separately. +``` + +IMPORTANT — inheritance behavior: +If you do NOT call this method, the step inherits whichever function +set was active on the previous step (or the previous context's last +step). The server-side runtime only resets the active set when a +step explicitly declares its `functions` field. This is by design, +but it is the most common source of bugs in multi-step agents: +forgetting set\_functions() on a later step lets the previous step's +tools leak through. + +``` +Best practice: call set_functions() explicitly on every step that +should have a different toolset than the previous one. +``` + +Internal functions (`startup_hook`, `hangup_hook`, `check_for_input`, +`summarize_conversation`, `gather_submit`, `get_ideal_strategy`) are +ALWAYS protected and cannot be deactivated by this whitelist. + +The native navigation tools `next_step` and `change_context` are +injected automatically when valid\_steps / valid\_contexts is set; they +are not affected by this list and do not need to appear in it. + +step.set\_functions(\["lookup\_account", "check\_balance"]) # whitelist +step.set\_functions(\[]) # disable all +step.set\_functions("none") # disable all (alt) + +#### Signature + +```python +set_functions(functions: Union[str, List[str]]) -> Step +``` + +#### Parameters + + + One of: + + +#### Returns + +`Step` — Self for method chaining. + +#### Examples + + + + ```python + Mitigations: + - Whitelist only the tools the current step actually needs. + A 4-tool step is more reliable than a 12-tool step. + - Split a busy step into two narrower steps so the relevant + tools are partitioned by phase of the conversation. + - Remember that `next_step` and `change_context` are + auto-injected when valid_steps / valid_contexts are set — + they count against the budget too. Don't list them in + `functions`; the runtime adds them separately. + ``` + + + + ```python + Best practice: call set_functions() explicitly on every step that + should have a different toolset than the previous one. + ``` + + + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 192. + +*** + +### set\_gather\_info + +Enable info gathering for this step. Questions are presented one at a time +via dynamic step instruction re-injection, producing zero tool\_call/tool\_result +entries in LLM-visible history. + +After calling this, use add\_gather\_question() to define questions. + +#### Signature + +```python +set_gather_info( + output_key: Optional[str] = None, + completion_action: Optional[str] = None, + prompt: Optional[str] = None +) -> Step +``` + +#### Parameters + + + Key in global\_data to store answers under (default: top-level) + + + + Where to go when all questions are answered. Can be: + + + + Preamble text injected once when entering the gather step, giving the model personality/context for why it is asking these questions + + +#### Returns + +`Step` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 329. + +*** + +### set\_reset\_consolidate + +Set whether to consolidate conversation when this step switches contexts + +#### Signature + +```python +set_reset_consolidate(consolidate: bool) -> Step +``` + +#### Parameters + + + Whether to consolidate previous conversation + + +#### Returns + +`Step` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 442. + +*** + +### set\_reset\_full\_reset + +Set whether to do full reset when this step switches contexts + +#### Signature + +```python +set_reset_full_reset(full_reset: bool) -> Step +``` + +#### Parameters + + + Whether to completely rewrite system prompt vs inject + + +#### Returns + +`Step` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 455. + +*** + +### set\_reset\_system\_prompt + +Set system prompt for context switching when this step navigates to a context + +#### Signature + +```python +set_reset_system_prompt(system_prompt: str) -> Step +``` + +#### Parameters + + + New system prompt for context switching + + +#### Returns + +`Step` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 416. + +*** + +### set\_reset\_user\_prompt + +Set user prompt for context switching when this step navigates to a context + +#### Signature + +```python +set_reset_user_prompt(user_prompt: str) -> Step +``` + +#### Parameters + + + User message to inject for context switching + + +#### Returns + +`Step` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 429. + +*** + +### set\_skip\_to\_next\_step + +Set whether to automatically advance to the next step + +#### Signature + +```python +set_skip_to_next_step(skip: bool) -> Step +``` + +#### Parameters + + + Whether to skip to the next step automatically + + +#### Returns + +`Step` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 316. + +*** + +### set\_skip\_user\_turn + +Set whether to skip waiting for user input after this step + +#### Signature + +```python +set_skip_user_turn(skip: bool) -> Step +``` + +#### Parameters + + + Whether to skip the user turn after this step + + +#### Returns + +`Step` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 303. + +*** + +### set\_step\_criteria + +Set the criteria for determining when this step is complete + +#### Signature + +```python +set_step_criteria(criteria: str) -> Step +``` + +#### Parameters + + + Description of step completion criteria + + +#### Returns + +`Step` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 179. + +*** + +### set\_text + +Set the step's prompt text directly + +#### Signature + +```python +set_text(text: str) -> Step +``` + +#### Parameters + + + The prompt text for this step + + +#### Returns + +`Step` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 132. + +*** + +### set\_valid\_contexts + +Set which contexts can be navigated to from this step + +#### Signature + +```python +set_valid_contexts(contexts: List[str]) -> Step +``` + +#### Parameters + + + List of valid context names + + +#### Returns + +`Step` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 265. + +*** + +### set\_valid\_steps + +Set which steps can be navigated to from this step + +#### Signature + +```python +set_valid_steps(steps: List[str]) -> Step +``` + +#### Parameters + + + List of valid step names (include "next" for sequential flow) + + +#### Returns + +`Step` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 252. + +*** + +### to\_dict + +Convert step to dictionary for SWML generation + +#### Signature + +```python +to_dict() -> Dict[str, Any] +``` + +#### Returns + +`Dict[str, Any]` + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 490. + +## Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 104. diff --git a/fern/products/sdk-reference/python/signalwire/core/data-map/data-map/index.mdx b/fern/products/sdk-reference/python/signalwire/core/data-map/data-map/index.mdx new file mode 100644 index 0000000000..2c805677cc --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/data-map/data-map/index.mdx @@ -0,0 +1,660 @@ +--- +slug: "/reference/python/signalwire/core/data-map/data-map" +title: "DataMap" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.core.data_map.DataMap" + parent: "signalwire.core.data_map" + module: "signalwire.core.data_map" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py" +--- +# `DataMap` + +Builder class for creating SWAIG data\_map configurations. + +This provides a fluent interface for building data\_map tools that execute +on the SignalWire server without requiring webhook endpoints. Works similar +to FunctionResult but for building data\_map structures. + +> \[!NOTE] +> +> # Simple API call - output goes inside webhook +> +> data\_map = (DataMap('get\_weather') +> .purpose('Get current weather information') +> .parameter('location', 'string', 'City name', required=True) +> .webhook('GET', 'https://api.weather.com/v1/current?key=API\_KEY\&q=$\{location\}') +> .output(FunctionResult('Weather in $\{location\}: $\{response.current.condition.text\}, $\{response.current.temp\_f\}°F')) +> ) +> +> # Multiple webhooks with fallback +> +> data\_map = (DataMap('search\_multi') +> .purpose('Search with fallback APIs') +> .parameter('query', 'string', 'Search query', required=True) +> .webhook('GET', 'https://api.primary.com/search?q=$\{query\}') +> .output(FunctionResult('Primary result: $\{response.title\}')) +> .webhook('GET', 'https://api.fallback.com/search?q=$\{query\}') +> .output(FunctionResult('Fallback result: $\{response.title\}')) +> .fallback\_output(FunctionResult('Sorry, all search APIs are unavailable')) +> ) +> +> # Expression-based responses (no API calls) +> +> data\_map = (DataMap('file\_control') +> .purpose('Control file playback') +> .parameter('command', 'string', 'Playback command') +> .parameter('filename', 'string', 'File to control', required=False) +> .expression('$\{args.command\}', r'start._', FunctionResult().add\_action('start\_playbook', \{'file': '$\{args.filename\}'\})) +> .expression('$\{args.command\}', r'stop._', FunctionResult().add\_action('stop\_playback', True)) +> ) +> +> # API with array processing +> +> data\_map = (DataMap('search\_docs') +> .purpose('Search documentation') +> .parameter('query', 'string', 'Search query', required=True) +> .webhook('POST', 'https://api.docs.com/search', headers=\{'Authorization': 'Bearer TOKEN'\}) +> .body(\{'query': '$\{query\}', 'limit': 3\}) +> .output(FunctionResult('Found: $\{response.results\[0].title\} - $\{response.results\[0].summary\}')) +> .foreach('$\{response.results\}') +> ) + +## Signature + +```python +class DataMap +``` + +## Examples + +```python +# Multiple webhooks with fallback +data_map = (DataMap('search_multi') + .purpose('Search with fallback APIs') + .parameter('query', 'string', 'Search query', required=True) + .webhook('GET', 'https://api.primary.com/search?q=${query}') + .output(FunctionResult('Primary result: ${response.title}')) + .webhook('GET', 'https://api.fallback.com/search?q=${query}') + .output(FunctionResult('Fallback result: ${response.title}')) + .fallback_output(FunctionResult('Sorry, all search APIs are unavailable')) +) + +# Expression-based responses (no API calls) +data_map = (DataMap('file_control') + .purpose('Control file playback') + .parameter('command', 'string', 'Playback command') + .parameter('filename', 'string', 'File to control', required=False) + .expression('${args.command}', r'start.*', FunctionResult().add_action('start_playbook', {'file': '${args.filename}'})) + .expression('${args.command}', r'stop.*', FunctionResult().add_action('stop_playback', True)) +) + +# API with array processing +data_map = (DataMap('search_docs') + .purpose('Search documentation') + .parameter('query', 'string', 'Search query', required=True) + .webhook('POST', 'https://api.docs.com/search', headers={'Authorization': 'Bearer TOKEN'}) + .body({'query': '${query}', 'limit': 3}) + .output(FunctionResult('Found: ${response.results[0].title} - ${response.results[0].summary}')) + .foreach('${response.results}') +) +``` + +## Properties + + + +## Methods + +### \_\_init\_\_ + +Initialize a new DataMap builder + +#### Signature + +```python +__init__(function_name: str) +``` + +#### Parameters + + + Name of the SWAIG function this data\_map will create + + +#### Source + +[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) + +Line 67. + +*** + +### body + +Set request body for the last added webhook (POST/PUT requests) + +#### Signature + +```python +body(data: Dict[str, Any]) -> DataMap +``` + +#### Parameters + + + Request body data (can include $\{variable\} substitutions) + + +#### Returns + +`DataMap` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) + +Line 255. + +*** + +### description + +Set the function description (alias for purpose). + +See purpose() for guidance on writing description text the LLM +can act on. + +#### Signature + +```python +description(description: str) -> DataMap +``` + +#### Parameters + + + LLM-facing description of what this function does and when to use it. + + +#### Returns + +`DataMap` — Self for method chaining. + +#### Source + +[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) + +Line 110. + +*** + +### error\_keys + +Set error keys for the most recent webhook (if webhooks exist) or top-level + +#### Signature + +```python +error_keys(keys: List[str]) -> DataMap +``` + +#### Parameters + + + List of JSON keys whose presence indicates an error + + +#### Returns + +`DataMap` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) + +Line 356. + +*** + +### expression + +Add an expression pattern for pattern-based responses + +#### Signature + +```python +expression( + test_value: str, + pattern: Union[str, Pattern], + output: FunctionResult, + nomatch_output: Optional[FunctionResult] = None +) -> DataMap +``` + +#### Parameters + + + Template string to test (e.g., "$\{args.command\}") + + + + Regex pattern string or compiled Pattern object to match against + + + + FunctionResult to return when pattern matches + + + + Optional FunctionResult to return when pattern doesn't match + + +#### Returns + +`DataMap` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) + +Line 173. + +*** + +### fallback\_output + +Set a fallback output result at the top level (used when all webhooks fail) + +#### Signature + +```python +fallback_output(result: FunctionResult) -> DataMap +``` + +#### Parameters + + + FunctionResult defining the fallback response + + +#### Returns + +`DataMap` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) + +Line 343. + +*** + +### foreach + +Process an array from the webhook response using foreach mechanism + +``` + Args: + foreach_config: Either: + - Dict: Foreach configuration with keys: + - input_key: Key in API response containing the array + - output_key: Name for the built string variable + - max: Maximum number of items to process (optional) + - append: Template string to append for each item + + Returns: + Self for method chaining + + Example: + .foreach({ + "input_key": "results", + "output_key": "formatted_results", + "max": 3, + "append": "Result: ${this.title} - ${this.summary} +``` + +" +\}) + +#### Signature + +```python +foreach(foreach_config: Dict[str, Any]) -> DataMap +``` + +#### Parameters + + + +#### Returns + +`DataMap` + +#### Examples + +```python + Args: + foreach_config: Either: + - Dict: Foreach configuration with keys: + - input_key: Key in API response containing the array + - output_key: Name for the built string variable + - max: Maximum number of items to process (optional) + - append: Template string to append for each item + + Returns: + Self for method chaining + + Example: + .foreach({ + "input_key": "results", + "output_key": "formatted_results", + "max": 3, + "append": "Result: ${this.title} - ${this.summary} +``` + +#### Source + +[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) + +Line 287. + +*** + +### global\_error\_keys + +Set top-level error keys (applies to all webhooks) + +#### Signature + +```python +global_error_keys(keys: List[str]) -> DataMap +``` + +#### Parameters + + + List of JSON keys whose presence indicates an error + + +#### Returns + +`DataMap` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) + +Line 374. + +*** + +### output + +Set the output result for the most recent webhook + +#### Signature + +```python +output(result: FunctionResult) -> DataMap +``` + +#### Parameters + + + FunctionResult defining the response for this webhook + + +#### Returns + +`DataMap` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) + +Line 327. + +*** + +### parameter + +Add a function parameter. + +Just like the function-level `description`, this parameter +`description` is sent to the LLM as part of the tool schema and +is read by the model when deciding HOW to fill in the argument. +Write it as an instruction to the model: + +- Bad: "the id" +- Good: "The customer's 8-digit account number, no dashes or + spaces. Ask the user if they don't provide it." + +#### Signature + +```python +parameter( + name: str, + param_type: str, + description: str, + required: bool = False, + enum: Optional[List[str]] = None +) -> DataMap +``` + +#### Parameters + + + Parameter name. Becomes a key in the tool schema's `properties` object and is what the model emits. + + + + JSON schema type (string, number, boolean, array, object). + + + + LLM-facing parameter description. See above — this should tell the model what value to put here, in what format, and where to source it. + + + + Whether parameter is required. + + + + Optional list of allowed values. The model will only emit values from this list. + + +#### Returns + +`DataMap` — Self for method chaining. + +#### Source + +[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) + +Line 126. + +*** + +### params + +Set request params for the last added webhook (alias for body) + +#### Signature + +```python +params(data: Dict[str, Any]) -> DataMap +``` + +#### Parameters + + + Request params data (can include $\{variable\} substitutions) + + +#### Returns + +`DataMap` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) + +Line 271. + +*** + +### purpose + +Set the function description that the LLM will read. + +A DataMap creates a SWAIG function that gets sent to the model in +OpenAI tool-schema format. This `description` field is what the +model reads on every turn to decide WHEN to call the tool. It is +prompt-engineered text, not developer documentation: + +- Bad: "Search function" +- Good: "Search the company's knowledge base for help articles + matching a user query. Use this when the user asks a + product or how-to question that the base prompt does + not cover." + +Vague descriptions are the most common cause of "the model has +the right tool but doesn't call it" failures. + +#### Signature + +```python +purpose(description: str) -> DataMap +``` + +#### Parameters + + + LLM-facing description of what this function does and when to use it. See above. + + +#### Returns + +`DataMap` — Self for method chaining. + +#### Source + +[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) + +Line 82. + +*** + +### to\_swaig\_function + +Convert this DataMap to a SWAIG function definition + +#### Signature + +```python +to_swaig_function() -> Dict[str, Any] +``` + +#### Returns + +`Dict[str, Any]` — Dictionary with function definition and data\_map instead of url + +#### Source + +[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) + +Line 387. + +*** + +### webhook + +Add a webhook API call + +#### Signature + +```python +webhook( + method: str, + url: str, + headers: Optional[Dict[str, str]] = None, + form_param: Optional[str] = None, + input_args_as_params: bool = False, + require_args: Optional[List[str]] = None +) -> DataMap +``` + +#### Parameters + + + HTTP method (GET, POST, PUT, DELETE, etc.) + + + + API endpoint URL (can include $\{variable\} substitutions) + + + + Optional HTTP headers + + + + Send JSON body as single form parameter with this name + + + + Merge function arguments into params + + + + Only execute if these arguments are present + + +#### Returns + +`DataMap` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) + +Line 204. + +*** + +### webhook\_expressions + +Add expressions that run after the most recent webhook completes + +#### Signature + +```python +webhook_expressions(expressions: List[Dict[str, Any]]) -> DataMap +``` + +#### Parameters + + + List of expression definitions to check post-webhook + + +#### Returns + +`DataMap` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) + +Line 239. + +## Source + +[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) + +Line 19. diff --git a/fern/products/sdk-reference/python/signalwire/core/data-map/index.mdx b/fern/products/sdk-reference/python/signalwire/core/data-map/index.mdx new file mode 100644 index 0000000000..d55d0cbe5f --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/data-map/index.mdx @@ -0,0 +1,145 @@ +--- +slug: "/reference/python/signalwire/core/data-map" +title: "data_map" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.data_map" + parent: "signalwire.core" + module: "signalwire.core" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py" +--- +# `data_map` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module data_map +``` + +## Classes + + + + Builder class for creating SWAIG data\_map configurations. + + + +## Functions + +### create\_expression\_tool + +Create an expression-based tool for pattern matching responses + +#### Signature + +```python +create_expression_tool( + name: str, + patterns: Dict[str, Tuple[str, FunctionResult]], + parameters: Optional[Dict[str, Dict]] = None +) -> DataMap +``` + +#### Parameters + + + Function name + + + + Dictionary mapping test\_values to (pattern, FunctionResult) tuples + + + + Optional parameter definitions + + +#### Returns + +`DataMap` — Configured DataMap object + +#### Source + +[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) + +Line 490. + +*** + +### create\_simple\_api\_tool + +Create a simple API tool with minimal configuration + +#### Signature + +```python +create_simple_api_tool( + name: str, + url: str, + response_template: str, + parameters: Optional[Dict[str, Dict]] = None, + method: str = 'GET', + headers: Optional[Dict[str, str]] = None, + body: Optional[Dict[str, Any]] = None, + error_keys: Optional[List[str]] = None +) -> DataMap +``` + +#### Parameters + + + Function name + + + + API endpoint URL + + + + Template for formatting the response + + + + Optional parameter definitions + + + + HTTP method (default: GET) + + + + Optional HTTP headers + + + + Optional request body (for POST/PUT) + + + + Optional list of error indicator keys + + +#### Returns + +`DataMap` — Configured DataMap object + +#### Source + +[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) + +Line 439. + +## Source + +[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/function-result/function-result/index.mdx b/fern/products/sdk-reference/python/signalwire/core/function-result/function-result/index.mdx new file mode 100644 index 0000000000..73dd951c7d --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/function-result/function-result/index.mdx @@ -0,0 +1,2253 @@ +--- +slug: "/reference/python/signalwire/core/function-result/function-result" +title: "FunctionResult" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.core.function_result.FunctionResult" + parent: "signalwire.core.function_result" + module: "signalwire.core.function_result" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py" +--- +# `FunctionResult` + +Wrapper around SWAIG function responses that handles proper formatting +of response text and actions. + +The result object has three main components: + +1. response: Text the AI should say back to the user +2. action: List of structured actions to execute +3. post\_process: Whether to let AI take another turn before executing actions + +Post-processing behavior: + +- post\_process=False (default): Execute actions immediately after AI response +- post\_process=True: Let AI respond to user one more time, then execute actions + +This is useful for confirmation workflows like: +"I'll transfer you to sales. Do you have any other questions first?" +(AI can handle follow-up, then execute the transfer) + +> \[!NOTE] +> return FunctionResult("Found your order") +> +> # With actions +> +> return ( +> FunctionResult("I'll transfer you to support") +> .add\_action("transfer", \{"dest": "support"\}) +> ) +> +> # With simple action value +> +> return ( +> FunctionResult("I'll confirm that") +> .add\_action("confirm", True) +> ) +> +> # With multiple actions +> +> return ( +> FunctionResult("Processing your request") +> .add\_actions(\[ +> \{"set\_global\_data": \{"key": "value"\}\}, +> \{"play": \{"url": "music.mp3"\}\} +> ]) +> ) +> +> # With post-processing enabled +> +> return ( +> FunctionResult("Let me transfer you to billing", post\_process=True) +> .connect("+15551234567", final=True) +> ) +> +> # Using the connect helper +> +> return ( +> FunctionResult("I'll transfer you to our sales team now") +> .connect("sales@company.com", final=False, from\_addr="+15559876543") +> ) + +## Signature + +```python +class FunctionResult +``` + +## Examples + +```python +# With actions +return ( + FunctionResult("I'll transfer you to support") + .add_action("transfer", {"dest": "support"}) +) + +# With simple action value +return ( + FunctionResult("I'll confirm that") + .add_action("confirm", True) +) + +# With multiple actions +return ( + FunctionResult("Processing your request") + .add_actions([ + {"set_global_data": {"key": "value"}}, + {"play": {"url": "music.mp3"}} + ]) +) + +# With post-processing enabled +return ( + FunctionResult("Let me transfer you to billing", post_process=True) + .connect("+15551234567", final=True) +) + +# Using the connect helper +return ( + FunctionResult("I'll transfer you to our sales team now") + .connect("sales@company.com", final=False, from_addr="+15559876543") +) +``` + +## Properties + + + + + + + +## Methods + +### \_\_init\_\_ + +Initialize a new SWAIG function result + +#### Signature + +```python +__init__(response: Optional[str] = None, post_process: bool = False) +``` + +#### Parameters + + + Optional natural language response to include + + + + Whether to let AI take another turn before executing actions. Defaults to False (execute actions immediately after response). + + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 71. + +*** + +### add\_action + +Add a structured action to the response + +#### Signature + +```python +add_action(name: str, data: Any) -> FunctionResult +``` + +#### Parameters + + + The name/type of the action (e.g., "play", "transfer") + + + + The data for the action - can be a string, boolean, object, or array + + +#### Returns + +`FunctionResult` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 114. + +*** + +### add\_actions + +Add multiple structured actions to the response + +#### Signature + +```python +add_actions(actions: List[Dict[str, Any]]) -> FunctionResult +``` + +#### Parameters + + + List of action objects to add to the response + + +#### Returns + +`FunctionResult` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 128. + +*** + +### add\_dynamic\_hints + +Add dynamic speech recognition hints during a call. + +Hints improve speech recognition accuracy for domain-specific terms. +Each hint can be a simple string or a pronunciation pattern object. + +> \[!NOTE] +> result = ( +> FunctionResult("I'll listen for that name") +> .add\_dynamic\_hints(\[ +> "Cabby", +> \{"pattern": "cab bee", "replace": "Cabby", "ignore\_case": True\} +> ]) +> ) + +#### Signature + +```python +add_dynamic_hints(hints: List[Union[str, Dict[str, Any]]]) -> FunctionResult +``` + +#### Parameters + + + List of hints, where each entry is either: + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 525. + +*** + +### clear\_dynamic\_hints + +Clear all dynamic speech recognition hints. + +Removes all hints previously added via add\_dynamic\_hints(). + +#### Signature + +```python +clear_dynamic_hints() -> FunctionResult +``` + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 554. + +*** + +### connect + +Add a connect action to transfer/connect the call to another destination. + +This is a convenience method that abstracts the SWML connect verb, so users +don't need to manually construct SWML documents. + +Transfer behavior: + +- final=True: Permanent transfer - call exits the agent completely, + SWML replaces the agent and call continues there +- final=False: Temporary transfer - if far end hangs up, call returns + to the agent to continue the conversation + +> \[!NOTE] +> +> ### Permanent transfer to a phone number +> +> result.connect("+15551234567", final=True) +> +> ### Temporary transfer to SIP address with custom caller ID +> +> result.connect("support@company.com", final=False, from\_addr="+15559876543") + +#### Signature + +```python +connect( + destination: str, + final: bool = True, + from_addr: Optional[str] = None +) -> FunctionResult +``` + +#### Parameters + + + Where to connect the call (phone number, SIP address, etc.) + + + + Whether this is a permanent transfer (True) or temporary (False). Defaults to True for permanent transfers. + + + + Optional caller ID override (phone number or SIP address). If None, uses the current call's from address. + + +#### Returns + +`FunctionResult` — Self for method chaining + +#### Examples + +```python +# Temporary transfer to SIP address with custom caller ID +result.connect("support@company.com", final=False, from_addr="+15559876543") +``` + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 141. + +*** + +### create\_payment\_action + +Create a payment action for use in payment prompts. + +**Modifiers:** `static` + +#### Signature + +```python +@staticmethod +create_payment_action(action_type: str, phrase: str) -> Dict[str, str] +``` + +#### Parameters + + + "Say" for text-to-speech or "Play" for audio file + + + + Sentence to say or URL to play + + +#### Returns + +`Dict[str, str]` — Dictionary representing the action + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 1472. + +*** + +### create\_payment\_parameter + +Create a payment parameter for use with pay() method. + +**Modifiers:** `static` + +#### Signature + +```python +@staticmethod +create_payment_parameter(name: str, value: str) -> Dict[str, str] +``` + +#### Parameters + + + Parameter name + + + + Parameter value + + +#### Returns + +`Dict[str, str]` — Dictionary representing the parameter + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 1489. + +*** + +### create\_payment\_prompt + +Create a payment prompt structure for use with pay() method. + +**Modifiers:** `static` + +#### Signature + +```python +@staticmethod +create_payment_prompt( + for_situation: str, + actions: List[Dict[str, str]], + card_type: Optional[str] = None, + error_type: Optional[str] = None +) -> Dict[str, Any] +``` + +#### Parameters + + + Situation to use prompt for (e.g., "payment-card-number") + + + + List of actions with 'type' and 'phrase' keys + + + + Space-separated card types for this prompt + + + + Space-separated error types for this prompt + + +#### Returns + +`Dict[str, Any]` — Dictionary representing the prompt structure + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 1444. + +*** + +### enable\_extensive\_data + +Send full data to LLM for this turn only, then use smaller replacement +in subsequent turns. + +#### Signature + +```python +enable_extensive_data(enabled: bool = True) -> FunctionResult +``` + +#### Parameters + + + Whether to send extensive data this turn only + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 652. + +*** + +### enable\_functions\_on\_timeout + +Enable function calls on speaker timeout. + +#### Signature + +```python +enable_functions_on_timeout(enabled: bool = True) -> FunctionResult +``` + +#### Parameters + + + Whether to enable functions on timeout + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 640. + +*** + +### execute\_rpc + +Execute an RPC method on a call using SWML. + +This is a generic helper for executing RPC commands. For common operations, +consider using the specific helpers: rpc\_dial(), rpc\_ai\_message(), rpc\_ai\_unhold(). + +> \[!NOTE] +> result = ( +> FunctionResult("Executing RPC") +> .execute\_rpc( +> method="ai\_message", +> call\_id="some-call-id", +> params=\{"role": "system", "message\_text": "Hello"\} +> ) +> ) + +#### Signature + +```python +execute_rpc( + method: str, + params: Optional[Dict[str, Any]] = None, + call_id: Optional[str] = None, + node_id: Optional[str] = None +) -> FunctionResult +``` + +#### Parameters + + + The RPC method to execute (e.g., "dial", "ai\_message", "ai\_unhold") + + + + Parameters for the RPC method (optional) + + + + Target call ID for the RPC (optional) + + + + Target node ID for the RPC (optional) + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 1290. + +*** + +### execute\_swml + +Execute SWML content with optional transfer behavior. + +#### Signature + +```python +execute_swml(swml_content, transfer: bool = False) -> FunctionResult +``` + +#### Parameters + + + Can be: + + + + Boolean - whether call should exit agent after execution + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 396. + +*** + +### hangup + +Terminate the call. + +#### Signature + +```python +hangup() -> FunctionResult +``` + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 433. + +*** + +### hold + +Put the call on hold with optional timeout. + +#### Signature + +```python +hold(timeout: int = 300) -> FunctionResult +``` + +#### Parameters + + + Timeout in seconds (max 900, default 300) + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 442. + +*** + +### join\_conference + +Join an ad-hoc audio conference with RELAY and CXML calls using SWML. + +This is a virtual helper that generates SWML to join audio conferences +with extensive configuration options for call management and recording. + +#### Signature + +```python +join_conference( + name: str, + muted: bool = False, + beep: str = 'true', + start_on_enter: bool = True, + end_on_exit: bool = False, + wait_url: Optional[str] = None, + max_participants: int = 250, + record: str = 'do-not-record', + region: Optional[str] = None, + trim: str = 'trim-silence', + coach: Optional[str] = None, + status_callback_event: Optional[str] = None, + status_callback: Optional[str] = None, + status_callback_method: str = 'POST', + recording_status_callback: Optional[str] = None, + recording_status_callback_method: str = 'POST', + recording_status_callback_event: str = 'completed', + result: Optional[Any] = None +) -> FunctionResult +``` + +#### Parameters + + + Name of conference (required) + + + + Whether to join muted (default: False) + + + + Beep configuration - "true", "false", "onEnter", "onExit" (default: "true") + + + + Whether conference starts when this participant enters (default: True) + + + + Whether conference ends when this participant exits (default: False) + + + + SWML URL for hold music (default: None for default hold music) + + + + Maximum participants \<= 250 (default: 250) + + + + Recording mode - "do-not-record", "record-from-start" (default: "do-not-record") + + + + Conference region (default: None) + + + + Trim silence - "trim-silence", "do-not-trim" (default: "trim-silence") + + + + SWML Call ID or CXML CallSid for coaching (default: None) + + + + Events to report - "start end join leave mute hold modify speaker announcement" (default: None) + + + + URL for status callbacks (default: None) + + + + HTTP method - "GET", "POST" (default: "POST") + + + + URL for recording status callbacks (default: None) + + + + HTTP method - "GET", "POST" (default: "POST") + + + + Recording events - "in-progress completed absent" (default: "completed") + + + + Switch on return\_value when object \{\} or cond when array \[] (default: None) + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Throws + +- `ValueError` — If beep value is invalid or max\_participants exceeds 250 + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 1049. + +*** + +### join\_room + +Join a RELAY room using SWML. + +This is a virtual helper that generates SWML to join a RELAY room, +which enables multi-party communication and collaboration. + +#### Signature + +```python +join_room(name: str) -> FunctionResult +``` + +#### Parameters + + + The name of the room to join (required) + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 991. + +*** + +### pay + +Process payment using SWML pay action. + +This is a virtual helper that generates SWML for payment processing. + +#### Signature + +```python +pay( + payment_connector_url: str, + input_method: str = 'dtmf', + status_url: Optional[str] = None, + payment_method: str = 'credit-card', + timeout: int = 5, + max_attempts: int = 1, + security_code: bool = True, + postal_code: Union[bool, str] = True, + min_postal_code_length: int = 0, + token_type: str = 'reusable', + charge_amount: Optional[str] = None, + currency: str = 'usd', + language: str = 'en-US', + voice: str = 'woman', + description: Optional[str] = None, + valid_card_types: str = 'visa mastercard amex', + parameters: Optional[List[Dict[str, str]]] = None, + prompts: Optional[List[Dict[str, Any]]] = None, + ai_response: Optional[str] = 'The payment status is ${pay_result}, do not mention anything else about collecting payment if successful.' +) -> FunctionResult +``` + +#### Parameters + + + URL to make payment requests to (required) + + + + Method to collect payment details. The SWML pay verb only accepts "dtmf" (schema `input` is `const: "dtmf"`); the earlier "voice" option was never valid. + + + + URL for status change notifications + + + + Payment method ("credit-card" currently supported) + + + + Seconds to wait for next digit (default: 5) + + + + Number of retry attempts (default: 1) + + + + Whether to prompt for security code (default: True) + + + + Whether to prompt for postal code, or actual postcode + + + + Minimum postal code digits (default: 0) + + + + Payment type ("one-time" or "reusable", default: "reusable") + + + + Amount to charge as decimal string + + + + Currency code (default: "usd") + + + + Language for prompts (default: "en-US") + + + + TTS voice to use (default: "woman") + + + + Custom payment description + + + + Space-separated card types (default: "visa mastercard amex") + + + + Array of name/value pairs for payment connector + + + + Array of custom prompt configurations + + + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 797. + +*** + +### play\_background\_file + +Play audio or video file in background. + +#### Signature + +```python +play_background_file(filename: str, wait: bool = False) -> FunctionResult +``` + +#### Parameters + + + Audio/video filename/path + + + + Whether to suppress attention-getting behavior during playback + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 500. + +*** + +### record\_call + +Start background call recording using SWML. + +This is a virtual helper that generates SWML to start recording the call +in the background. Unlike foreground recording, the script continues +executing while recording happens in the background. + +#### Signature + +```python +record_call( + control_id: Optional[str] = None, + stereo: bool = False, + format: Literal['wav', 'mp3', 'mp4'] = 'wav', + direction: Literal['speak', 'listen', 'both'] = 'both', + terminators: Optional[str] = None, + beep: bool = False, + input_sensitivity: float = 44.0, + initial_timeout: Optional[float] = None, + end_silence_timeout: Optional[float] = None, + max_length: Optional[float] = None, + status_url: Optional[str] = None +) -> FunctionResult +``` + +#### Parameters + + + Identifier for this recording (for use with stop\_record\_call) + + + + Record in stereo (default: False) + + + + Recording format - "wav", "mp3", or "mp4" (default: "wav") + + + + Audio direction - "speak", "listen", or "both" (default: "both") + + + + Digits that stop recording when pressed + + + + Play beep before recording (default: False) + + + + Input sensitivity for recording (default: 44.0) + + + + Time in seconds to wait for speech start (for voicemail-style recording) + + + + Time in seconds to wait in silence before ending (for voicemail-style recording) + + + + Maximum recording length in seconds + + + + URL to send recording status events to + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 885. + +*** + +### remove\_global\_data + +Remove global agent data variables. + +#### Signature + +```python +remove_global_data(keys: Union[str, List[str]]) -> FunctionResult +``` + +#### Parameters + + + Single key string or list of keys to remove + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 592. + +*** + +### remove\_metadata + +Remove metadata from current function's meta\_data\_token scope. + +#### Signature + +```python +remove_metadata(keys: Union[str, List[str]]) -> FunctionResult +``` + +#### Parameters + + + Single key string or list of keys to remove + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 616. + +*** + +### replace\_in\_history + +After first send, replace tool\_call+result pair in conversation history. + +#### Signature + +```python +replace_in_history(text: Union[str, bool] = True) -> FunctionResult +``` + +#### Parameters + + + String = replace tool\_call with an assistant message containing this text. True = remove the tool\_call+result pair from history entirely. + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 665. + +*** + +### rpc\_ai\_message + +Inject a message into an AI agent on another call using execute\_rpc. + +This is useful for cross-call communication, such as notifying a held +caller's AI agent about a status change or instructing it to relay +a message. + +> \[!NOTE] +> result = ( +> FunctionResult("I'll let them know.") +> .rpc\_ai\_message( +> call\_id=original\_call\_id, +> message\_text="The person you were trying to reach is unavailable. Please take a message." +> ) +> ) + +#### Signature + +```python +rpc_ai_message( + call_id: str, + message_text: str, + role: str = 'system' +) -> FunctionResult +``` + +#### Parameters + + + The call ID of the target call + + + + The message text to inject into the AI conversation + + + + The role for the message, typically "system" (default: "system") + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 1383. + +*** + +### rpc\_ai\_unhold + +Unhold another call using execute\_rpc. + +This releases a call from hold state, typically used after injecting +a message to the held caller's AI agent. + +> \[!NOTE] +> result = ( +> FunctionResult("Understood, I'll let them know.") +> .rpc\_ai\_message(call\_id, "No one is available. Please take a message.") +> .rpc\_ai\_unhold(call\_id) +> ) + +#### Signature + +```python +rpc_ai_unhold(call_id: str) -> FunctionResult +``` + +#### Parameters + + + The call ID of the call to unhold + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 1418. + +*** + +### rpc\_dial + +Dial out to a number with a destination SWML URL using execute\_rpc. + +This is commonly used in call screening scenarios where you place a caller +on hold and dial out to a human, with the dest\_swml specifying what agent +handles the outbound leg. + +> \[!NOTE] +> result = ( +> FunctionResult("Please hold while I connect you.") +> .hold(timeout=120) +> .rpc\_dial( +> to\_number="+15551234567", +> from\_number="+15559876543", +> dest\_swml="https://example.com/call-agent?caller=John" +> ) +> ) + +#### Signature + +```python +rpc_dial( + to_number: str, + from_number: str, + dest_swml: str, + device_type: str = 'phone' +) -> FunctionResult +``` + +#### Parameters + + + Phone number to dial (E.164 format) + + + + Caller ID to use (E.164 format) + + + + URL to the SWML that handles the outbound call + + + + Device type, typically "phone" (default: "phone") + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 1340. + +*** + +### say + +Make the agent speak specific text. + +#### Signature + +```python +say(text: str) -> FunctionResult +``` + +#### Parameters + + + Text for agent to speak + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 488. + +*** + +### send\_sms + +Send a text message to a PSTN phone number using SWML. + +This is a virtual helper that generates SWML to send SMS messages. +Either body or media (or both) must be provided. + +#### Signature + +```python +send_sms( + to_number: str, + from_number: str, + body: Optional[str] = None, + media: Optional[List[str]] = None, + tags: Optional[List[str]] = None, + region: Optional[str] = None +) -> FunctionResult +``` + +#### Parameters + + + Phone number in E.164 format to send to + + + + Phone number in E.164 format to send from + + + + Body text of the message (optional if media provided) + + + + Array of URLs to send in the message (optional if body provided) + + + + Array of tags to associate with the message for UI searching + + + + Region to originate the message from + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Throws + +- `ValueError` — If neither body nor media is provided + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 741. + +*** + +### set\_end\_of\_speech\_timeout + +Adjust end of speech timeout - milliseconds of silence after speaking +has been detected to finalize speech recognition. + +#### Signature + +```python +set_end_of_speech_timeout(milliseconds: int) -> FunctionResult +``` + +#### Parameters + + + Timeout in milliseconds + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 566. + +*** + +### set\_metadata + +Set metadata scoped to current function's meta\_data\_token. + +#### Signature + +```python +set_metadata(data: Dict[str, Any]) -> FunctionResult +``` + +#### Parameters + + + Dictionary of key-value pairs for metadata + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 604. + +*** + +### set\_post\_process + +Set whether to enable post-processing for this result. + +Post-processing allows the AI to take one more turn with the user +before executing any actions. This is useful for confirmation workflows. + +#### Signature + +```python +set_post_process(post_process: bool) -> FunctionResult +``` + +#### Parameters + + + True to let AI respond once more before executing actions, False to execute actions immediately after the response. + + +#### Returns + +`FunctionResult` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 97. + +*** + +### set\_response + +Set the natural language response text + +#### Signature + +```python +set_response(response: str) -> FunctionResult +``` + +#### Parameters + + + The text the AI should say + + +#### Returns + +`FunctionResult` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 84. + +*** + +### set\_speech\_event\_timeout + +Adjust speech event timeout - milliseconds since last speech detection +event to finalize recognition. Works better in noisy environments. + +#### Signature + +```python +set_speech_event_timeout(milliseconds: int) -> FunctionResult +``` + +#### Parameters + + + Timeout in milliseconds + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 579. + +*** + +### simulate\_user\_input + +Queue simulated user input. + +#### Signature + +```python +simulate_user_input(text: str) -> FunctionResult +``` + +#### Parameters + + + Text to simulate as user input + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 729. + +*** + +### sip\_refer + +Send SIP REFER to a SIP call using SWML. + +This is a virtual helper that generates SWML to send a SIP REFER +message, which is used for call transfer in SIP environments. + +#### Signature + +```python +sip_refer(to_uri: str) -> FunctionResult +``` + +#### Parameters + + + The SIP URI to send the REFER to (required) + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 1020. + +*** + +### stop + +Stop the agent execution. + +#### Signature + +```python +stop() -> FunctionResult +``` + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 479. + +*** + +### stop\_background\_file + +Stop currently playing background file. + +#### Signature + +```python +stop_background_file() -> FunctionResult +``` + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 516. + +*** + +### stop\_record\_call + +Stop an active background call recording using SWML. + +This is a virtual helper that generates SWML to stop a recording that +was started with record\_call(). + +#### Signature + +```python +stop_record_call(control_id: Optional[str] = None) -> FunctionResult +``` + +#### Parameters + + + Identifier for the recording to stop. If not provided, the most recent recording will be stopped. + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 959. + +*** + +### stop\_tap + +Stop an active tap stream using SWML. + +This is a virtual helper that generates SWML to stop a tap stream +that was started with tap(). + +#### Signature + +```python +stop_tap(control_id: Optional[str] = None) -> FunctionResult +``` + +#### Parameters + + + ID of the tap to stop (optional) If not set, the last tap started will be stopped + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 1256. + +*** + +### switch\_context + +Change agent context/prompt during conversation. + +#### Signature + +```python +switch_context( + system_prompt: Optional[str] = None, + user_prompt: Optional[str] = None, + consolidate: bool = False, + full_reset: bool = False +) -> FunctionResult +``` + +#### Parameters + + + New system prompt + + + + User message to add + + + + Whether to summarize existing conversation + + + + Whether to do complete context reset + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 699. + +*** + +### swml\_change\_context + +Force the conversation into a different context. + +Webhook-triggered context changes bypass any `valid_contexts` clamp. +Step state resets (cur\_step = 0) on entry. The new context's first +step's instructions are injected on the next turn. + +#### Communicating intent to the destination context + +Same pattern as swml\_change\_step: the model reads your FunctionResult's +`response` text as the tool result before it sees the destination +context's first step. Put your reason there: + +``` +FunctionResult( + "I'm transferring you to billing because your question is " + "about an invoice charge." +).swml_change_context("billing") +``` + +For structured carry-over, use update\_global\_data() and reference the +values via $\{var\} expansion in the destination context's step text. + +Note that conversation history is preserved across context switches +unless the destination context is marked `isolated=True`. The model +retains everything the user said in the previous context — you do +not need to re-state it. + +> \[!NOTE] +> result = ( +> FunctionResult("Transferring you to technical support.") +> .update\_global\_data(\{"original\_issue": user\_problem\}) +> .swml\_change\_context("technical\_support") +> ) + +#### Signature + +```python +swml_change_context(context_name: str) -> FunctionResult +``` + +#### Parameters + + + Name of the context to switch to. Must exist in the agent's context map. + + +#### Returns + +`FunctionResult` — Self for method chaining. + +#### Examples + +```python +FunctionResult( + "I'm transferring you to billing because your question is " + "about an invoice charge." +).swml_change_context("billing") +``` + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 353. + +*** + +### swml\_change\_step + +Force the conversation into a specific step in the current context. + +This is a workflow-level transition driven by your webhook, not by the +model. Webhook-triggered step changes bypass any `valid_steps` clamp +on the current step (the model's `next_step` tool is the constrained +path; this is the unconstrained one). Use it when something the user +said unambiguously requires moving the flow forward. + +#### Communicating intent to the destination step + +When the model arrives at the new step, the next thing it sees in +history is the tool result that contained this action — i.e., your +FunctionResult's `response` text. Put your "why" there. The model +reads it before the new step's injected instructions: + +``` +FunctionResult( + "Premium plan confirmed. Now collecting payment details." +).swml_change_step("collect_payment") +``` + +For structured data the destination step needs (account number, +plan tier, etc.), pair this with `update_global_data()` and reference +the values from the destination step's `text` via $\{var\} expansion: + +``` +(FunctionResult("Premium plan confirmed.") + .update_global_data({"plan": "premium", "billing_cycle": "annual"}) + .swml_change_step("collect_payment")) +``` + +And in the destination step's text: + +``` +step.set_text( + "Collect payment for the ${plan} plan, billed ${billing_cycle}. " + "Confirm the amount with the user before proceeding." +) +``` + +> \[!NOTE] +> result = ( +> FunctionResult("Starting a new hand") +> .update\_global\_data(\{"chips": 1000\}) +> .swml\_change\_step("betting") +> ) + +#### Signature + +```python +swml_change_step(step_name: str) -> FunctionResult +``` + +#### Parameters + + + Name of the step to transition to. The step must exist in the current context. + + +#### Returns + +`FunctionResult` — Self for method chaining. + +#### Examples + + + + ```python + FunctionResult( + "Premium plan confirmed. Now collecting payment details." + ).swml_change_step("collect_payment") + ``` + + + + ```python + (FunctionResult("Premium plan confirmed.") + .update_global_data({"plan": "premium", "billing_cycle": "annual"}) + .swml_change_step("collect_payment")) + ``` + + + + ```python + step.set_text( + "Collect payment for the ${plan} plan, billed ${billing_cycle}. " + "Confirm the amount with the user before proceeding." + ) + ``` + + + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 301. + +*** + +### swml\_transfer + +Add a SWML transfer action with AI response setup for when transfer completes. + +This is a virtual helper that generates SWML to transfer the call to another +destination and sets up an AI response for when the transfer completes and +control returns to the agent. + +For transfers, you typically want to enable post-processing so the AI speaks +the response first before executing the transfer. + +> \[!NOTE] +> +> ### Permanent transfer (default) +> +> result = ( +> FunctionResult("I'm transferring you to support", post\_process=True) +> .swml\_transfer( +> "https://support.example.com/swml", +> "Goodbye!" # Won't be used since final=True by default +> ) +> ) +> +> ### Temporary transfer with return +> +> result.swml\_transfer( +> dest, +> "The support call is complete. How else can I help?", +> final=False +> ) + +#### Signature + +```python +swml_transfer(dest: str, ai_response: str, final: bool = True) -> FunctionResult +``` + +#### Parameters + + + Destination URL for the transfer (SWML endpoint, SIP address, etc.) + + + + Message the AI should say when transfer completes and control returns + + + + Whether this is a permanent transfer (True) or temporary (False). Defaults to True for permanent transfers (same as connect method). + + +#### Returns + +`FunctionResult` — Self for method chaining + +#### Examples + +```python +# Temporary transfer with return +result.swml_transfer( + dest, + "The support call is complete. How else can I help?", + final=False +) +``` + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 191. + +*** + +### swml\_user\_event + +Send a user event through SWML to update the client UI. + +This is a convenience method for sending user events to connected clients, +commonly used for real-time UI updates in interactive applications. + +> \[!NOTE] +> result = ( +> FunctionResult("You have blackjack!") +> .swml\_user\_event(\{ +> "type": "cards\_dealt", +> "player\_hand": player\_cards, +> "dealer\_hand": dealer\_cards, +> "player\_score": 21 +> \}) +> ) + +#### Signature + +```python +swml_user_event(event_data: Dict[str, Any]) -> FunctionResult +``` + +#### Parameters + + + Dictionary containing the event type and any associated data Example: \{"type": "cards\_dealt", "player\_hand": \[...], "score": 21\} + + +#### Returns + +`FunctionResult` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 263. + +*** + +### tap + +Start background call tap using SWML. + +This is a virtual helper that generates SWML to start background call tapping. +Media is streamed over Websocket or RTP to customer controlled URI. + +#### Signature + +```python +tap( + uri: str, + control_id: Optional[str] = None, + direction: Literal['speak', 'hear', 'both'] = 'both', + codec: Literal['PCMU', 'PCMA'] = 'PCMU', + rtp_ptime: int = 20, + status_url: Optional[str] = None +) -> FunctionResult +``` + +#### Parameters + + + Destination of tap media stream (required) Formats: rtp://IP:port, ws://example.com, or wss://example.com + + + + Identifier for this tap to use with stop\_tap (optional) Default is generated and stored in tap\_control\_id variable + + + + Direction of audio to tap (default: "both") "speak" = what party says "hear" = what party hears\ + "both" = what party hears and says + + + + Codec for tap media stream - "PCMU" or "PCMA" (default: "PCMU") + + + + Packetization time in milliseconds for RTP (default: 20) + + + + URL for status change requests (optional) + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Throws + +- `ValueError` — If direction or codec values are invalid + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 1186. + +*** + +### to\_dict + +Convert to the JSON structure expected by SWAIG + +The result must have at least one of: + +- 'response': Text to be spoken by the AI +- 'action': Array of action objects + +Optional: + +- 'post\_process': Boolean controlling when actions execute + +#### Signature + +```python +to_dict() -> Dict[str, Any] +``` + +#### Returns + +`Dict[str, Any]` — Dictionary in SWAIG function response format + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 1506. + +*** + +### toggle\_functions + +Enable/disable specific SWAIG functions. + +#### Signature + +```python +toggle_functions(function_toggles: List[Dict[str, Any]]) -> FunctionResult +``` + +#### Parameters + + + List of dicts with 'function' and 'active' keys + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 628. + +*** + +### update\_global\_data + +Update global agent data variables. + +This is a convenience method that abstracts the set\_global\_data action. +Global data persists across the entire agent session and is available +in prompt variables and can be accessed by all functions. + +#### Signature + +```python +update_global_data(data: Dict[str, Any]) -> FunctionResult +``` + +#### Parameters + + + Dictionary of key-value pairs to set/update in global data + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 247. + +*** + +### update\_settings + +Update agent runtime settings. + +Supported settings: + +- frequency-penalty: Float (-2.0 to 2.0) +- presence-penalty: Float (-2.0 to 2.0) +- max-tokens: Integer (0 to 4096) +- top-p: Float (0.0 to 1.0) +- confidence: Float (0.0 to 1.0) +- barge-confidence: Float (0.0 to 1.0) +- temperature: Float (0.0 to 2.0, clamped to 1.5) + +#### Signature + +```python +update_settings(settings: Dict[str, Any]) -> FunctionResult +``` + +#### Parameters + + + Dictionary of settings to update + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 678. + +*** + +### wait\_for\_user + +Control how agent waits for user input. + +#### Signature + +```python +wait_for_user( + enabled: Optional[bool] = None, + timeout: Optional[int] = None, + answer_first: bool = False +) -> FunctionResult +``` + +#### Parameters + + + Boolean to enable/disable waiting + + + + Number of seconds to wait + + + + Special "answer\_first" mode + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 456. + +## Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 17. diff --git a/fern/products/sdk-reference/python/signalwire/core/function-result/index.mdx b/fern/products/sdk-reference/python/signalwire/core/function-result/index.mdx new file mode 100644 index 0000000000..2dd57448e3 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/function-result/index.mdx @@ -0,0 +1,44 @@ +--- +slug: "/reference/python/signalwire/core/function-result" +title: "function_result" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.function_result" + parent: "signalwire.core" + module: "signalwire.core" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py" +--- +# `function_result` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module function_result +``` + +## Properties + + + +## Classes + + + + Wrapper around SWAIG function responses that handles proper formatting of response text and actions. + + + +## Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/index.mdx b/fern/products/sdk-reference/python/signalwire/core/index.mdx new file mode 100644 index 0000000000..d6bf9fabca --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/index.mdx @@ -0,0 +1,116 @@ +--- +slug: "/reference/python/signalwire/core" +title: "core" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core" + parent: "signalwire" + module: "signalwire" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/__init__.py" +--- +# `core` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module core +``` + +## Properties + + + +## Modules + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + +## Source + +[`signalwire/signalwire/core/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/logging-config/index.mdx b/fern/products/sdk-reference/python/signalwire/core/logging-config/index.mdx new file mode 100644 index 0000000000..51d3fb6bff --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/logging-config/index.mdx @@ -0,0 +1,154 @@ +--- +slug: "/reference/python/signalwire/core/logging-config" +title: "logging_config" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.logging_config" + parent: "signalwire.core" + module: "signalwire.core" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/logging_config.py" +--- +# `logging_config` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module logging_config +``` + +## Functions + +### configure\_logging + +Configure logging system once, globally, based on environment variables + +> \[!NOTE] +> SIGNALWIRE\_LOG\_MODE: off, stderr, default, auto +> SIGNALWIRE\_LOG\_LEVEL: debug, info, warning, error, critical +> SIGNALWIRE\_LOG\_FORMAT: console, json (default: console) + +#### Signature + +```python +configure_logging() +``` + +#### Source + +[`signalwire/signalwire/core/logging_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/logging_config.py) + +Line 98. + +*** + +### get\_execution\_mode + +Determine the execution mode based on environment variables + +#### Signature + +```python +get_execution_mode() +``` + +#### Returns + +'server', 'cgi', 'lambda', 'google\_cloud\_function', 'azure\_function', or 'unknown' + +#### Source + +[`signalwire/signalwire/core/logging_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/logging_config.py) + +Line 44. + +*** + +### get\_logger + +Get a logger instance for the specified name with structured logging support + +This is the single entry point for all logging in the SDK. +All modules should use this instead of direct logging module usage. + +#### Signature + +```python +get_logger(name) +``` + +#### Parameters + + + Logger name, typically **name** + + +#### Returns + +A structlog BoundLogger that supports .bind(), .info(), .debug(), etc. + +#### Source + +[`signalwire/signalwire/core/logging_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/logging_config.py) + +Line 280. + +*** + +### reset\_logging\_configuration + +Reset the logging configuration flag to allow reconfiguration + +This is useful when environment variables change after initial configuration. + +#### Signature + +```python +reset_logging_configuration() +``` + +#### Source + +[`signalwire/signalwire/core/logging_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/logging_config.py) + +Line 75. + +*** + +### strip\_control\_chars + +Strip control characters from log event values to prevent log injection. + +#### Signature + +```python +strip_control_chars(logger, method_name, event_dict) +``` + +#### Parameters + + + + + + + +#### Source + +[`signalwire/signalwire/core/logging_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/logging_config.py) + +Line 33. + +## Source + +[`signalwire/signalwire/core/logging_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/logging_config.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/mixins/ai-config-mixin/ai-config-mixin/index.mdx b/fern/products/sdk-reference/python/signalwire/core/mixins/ai-config-mixin/ai-config-mixin/index.mdx new file mode 100644 index 0000000000..ce7e7e3020 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/mixins/ai-config-mixin/ai-config-mixin/index.mdx @@ -0,0 +1,963 @@ +--- +slug: "/reference/python/signalwire/core/mixins/ai-config-mixin/ai-config-mixin" +title: "AIConfigMixin" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.core.mixins.ai_config_mixin.AIConfigMixin" + parent: "signalwire.core.mixins.ai_config_mixin" + module: "signalwire.core.mixins.ai_config_mixin" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py" +--- +# `AIConfigMixin` + +Mixin class containing all AI configuration methods for AgentBase + +## Signature + +```python +class AIConfigMixin +``` + +## Properties + + + +## Methods + +### add\_function\_include + +Add a remote function include to the SWAIG configuration + +#### Signature + +```python +add_function_include( + url: str, + functions: List[str], + meta_data: Optional[Dict[str, Any]] = None +) -> AgentBase +``` + +#### Parameters + + + URL to fetch remote functions from + + + + List of function names to include + + + + Optional metadata to include with the function include + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 502. + +*** + +### add\_hint + +Add a simple string hint to help the AI agent understand certain words better + +#### Signature + +```python +add_hint(hint: str) -> AgentBase +``` + +#### Parameters + + + The hint string to add + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 19. + +*** + +### add\_hints + +Add multiple string hints + +#### Signature + +```python +add_hints(hints: List[str]) -> AgentBase +``` + +#### Parameters + + + List of hint strings + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 33. + +*** + +### add\_internal\_filler + +Add internal fillers for a single internal function and language. + +See set\_internal\_fillers() for the complete list of supported +function\_name values and an explanation of what fillers do. + +> \[!NOTE] +> agent.add\_internal\_filler( +> "change\_context", "en-US", +> \["Let me switch over to that...", "One moment..."] +> ) + +#### Signature + +```python +add_internal_filler( + function_name: str, + language_code: str, + fillers: List[str] +) -> AgentBase +``` + +#### Parameters + + + One of the supported internal function names (see SUPPORTED\_INTERNAL\_FILLER\_NAMES). Common values: 'next\_step', 'change\_context', 'check\_time', 'wait\_for\_user', 'hangup'. Names outside the supported set log a warning and are ignored by the runtime. + + + + Language code (e.g. 'en-US', 'es', 'fr'). + + + + List of filler phrases for this function and language. + + +#### Returns + +`AgentBase` — Self for method chaining. + +#### Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 425. + +*** + +### add\_language + +Add a language configuration to support multilingual conversations + +### Simple voice name + +agent.add\_language("English", "en-US", "en-US-Neural2-F") + +### Explicit parameters + +agent.add\_language("English", "en-US", "josh", engine="elevenlabs", model="eleven\_turbo\_v2\_5") + +### Combined format + +agent.add\_language("English", "en-US", "elevenlabs.josh:eleven\_turbo\_v2\_5") + +### Per-language params (engine-specific knobs) + +agent.add\_language("English", "en-US", "josh", +engine="elevenlabs", +params=\{"stability": 0.5, "similarity\_boost": 0.75\}) + +#### Signature + +```python +add_language( + name: str, + code: str, + voice: str, + speech_fillers: Optional[List[str]] = None, + function_fillers: Optional[List[str]] = None, + engine: Optional[str] = None, + model: Optional[str] = None, + params: Optional[Dict[str, Any]] = None +) -> AgentBase +``` + +#### Parameters + + + Name of the language (e.g., "English", "French") + + + + Language code (e.g., "en-US", "fr-FR") + + + + TTS voice to use. Can be a simple name (e.g., "en-US-Neural2-F") or a combined format "engine.voice:model" (e.g., "elevenlabs.josh:eleven\_turbo\_v2\_5") + + + + Optional list of filler phrases for natural speech + + + + Optional list of filler phrases during function calls + + + + Optional explicit engine name (e.g., "elevenlabs", "rime") + + + + Optional explicit model name (e.g., "eleven\_turbo\_v2\_5", "arcana") + + + + Optional per-language params dict (engine-specific tuning, voice settings, etc.). Emitted as the language object's `params` key in SWML. + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Examples + +```python +# Explicit parameters +agent.add_language("English", "en-US", "josh", engine="elevenlabs", model="eleven_turbo_v2_5") + +# Combined format +agent.add_language("English", "en-US", "elevenlabs.josh:eleven_turbo_v2_5") + +# Per-language params (engine-specific knobs) +agent.add_language("English", "en-US", "josh", + engine="elevenlabs", + params={"stability": 0.5, "similarity_boost": 0.75}) +``` + +#### Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 75. + +*** + +### add\_mcp\_server + +Add an external MCP server for tool discovery and invocation. + +Tools are discovered via the MCP protocol at session start and +registered as SWAIG functions. Resources are optionally fetched +into global\_data. + +#### Signature + +```python +add_mcp_server( + url: str, + headers: Optional[Dict[str, str]] = None, + resources: bool = False, + resource_vars: Optional[Dict[str, str]] = None +) -> AgentBase +``` + +#### Parameters + + + MCP server HTTP endpoint URL + + + + Optional HTTP headers (e.g. \{"Authorization": "Bearer sk-xxx"\}) + + + + Whether to fetch resources into global\_data + + + + Variables for URI template substitution (e.g. \{"caller\_id": "$\{caller\_id\_number\}"\}) + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 546. + +*** + +### add\_pattern\_hint + +Add a complex hint with pattern matching + +#### Signature + +```python +add_pattern_hint( + hint: str, + pattern: str, + replace: str, + ignore_case: bool = False +) -> AgentBase +``` + +#### Parameters + + + The hint to match + + + + Regular expression pattern + + + + Text to replace the hint with + + + + Whether to ignore case when matching + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 49. + +*** + +### add\_pronunciation + +Add a pronunciation rule to help the AI speak certain words correctly + +#### Signature + +```python +add_pronunciation( + replace: str, + with_text: str, + ignore_case: bool = False +) -> AgentBase +``` + +#### Parameters + + + The expression to replace + + + + The phonetic spelling to use instead + + + + Whether to ignore case when matching + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 217. + +*** + +### enable\_debug\_events + +Enable debug event webhook for this agent. + +When enabled, the AI module will POST real-time debug events to a +/debug\_events endpoint on this agent during calls. Events are +automatically logged via the agent's structured logger, and can +optionally be handled with a custom callback via on\_debug\_event(). + +> \[!NOTE] +> agent = AgentBase("my\_agent") +> agent.enable\_debug\_events(level=1) +> +> @agent.on\_debug\_event +> def handle\_debug(event\_type, data): +> if event\_type == "llm\_error": +> alert\_ops\_team(data) + +#### Signature + +```python +enable_debug_events(level: int = 1) -> AgentBase +``` + +#### Parameters + + + Debug event verbosity level. 1 = high-level events (barge, errors, session start/end, step changes) 2+ = adds high-volume events (every LLM request/response, conversation\_add) + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Examples + +```python +@agent.on_debug_event +def handle_debug(event_type, data): + if event_type == "llm_error": + alert_ops_team(data) +``` + +#### Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 472. + +*** + +### enable\_mcp\_server + +Expose this agent's @tool functions as an MCP server endpoint. + +Adds a /mcp route that speaks JSON-RPC 2.0 (MCP protocol). +Other MCP clients (Claude Desktop, other agents, etc.) can +connect and use the same tools. The agent's SWML output also +references this endpoint for native MCP tool discovery. + +#### Signature + +```python +enable_mcp_server() -> AgentBase +``` + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 574. + +*** + +### get\_language\_params + +Read the per-language `params` dict for a previously-added language. + +#### Signature + +```python +get_language_params(code: str) -> Optional[Dict[str, Any]] +``` + +#### Parameters + + + Language code as previously passed to `add_language`. + + +#### Returns + +`Optional[Dict[str, Any]]` — The params dict if set, `None` otherwise (including when the code is unknown). + +#### Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 188. + +*** + +### set\_function\_includes + +Set the complete list of function includes + +#### Signature + +```python +set_function_includes(includes: List[Dict[str, Any]]) -> AgentBase +``` + +#### Parameters + + + List of include objects, each with url and functions properties + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 525. + +*** + +### set\_global\_data + +Merge data into the global data available to the AI throughout the conversation. + +This merges (not replaces) so that skills and other callers can each +contribute keys without clobbering each other. + +#### Signature + +```python +set_global_data(data: Dict[str, Any]) -> AgentBase +``` + +#### Parameters + + + Dictionary of global data to merge + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 286. + +*** + +### set\_internal\_fillers + +Set internal fillers for native SWAIG functions. + +Internal fillers are short phrases the AI agent speaks (via TTS) while +an internal/native function is running, so the caller doesn't hear +dead air during transitions or background work. + +Supported function names (matches the SWAIGInternalFiller schema): + +``` +hangup — when the agent is hanging up +check_time — when checking the time +wait_for_user — when waiting for user input +wait_seconds — during deliberate pauses +adjust_response_latency — when adjusting response timing +next_step — transitioning between steps in prompt.contexts +change_context — switching between contexts in prompt.contexts +get_visual_input — processing visual input (enable_vision=True) +get_ideal_strategy — thinking (enable_thinking=True) +``` + +Notably NOT supported: change\_step, gather\_submit, or arbitrary +user-defined SWAIG function names. The runtime only honors fillers +for the names listed above; everything else is silently ignored at +the SWML level. This method warns at registration time if you pass +an unknown name so you catch the typo early. + +Without internal fillers, callers hear dead air during context +switches and other internal transitions — set this on every agent +that uses contexts/steps with audio. + +> \[!NOTE] +> agent.set\_internal\_fillers(\{ +> "next\_step": \{ +> "en-US": \["Moving to the next step...", "Great, let's continue..."], +> "es": \["Pasando al siguiente paso...", "Excelente, continuemos..."] +> \}, +> "change\_context": \{ +> "en-US": \["Let me switch modes...", "One moment..."] +> \}, +> "check\_time": \{ +> "en-US": \["Let me check the time...", "Getting the current time..."] +> \} +> \}) + +#### Signature + +```python +set_internal_fillers( + internal_fillers: Dict[str, Dict[str, List[str]]] +) -> AgentBase +``` + +#### Parameters + + + Dictionary mapping function names to language-specific filler phrases. Format: \{"function\_name": \{"language\_code": \["phrase1", "phrase2"]\}\} + + +#### Returns + +`AgentBase` — Self for method chaining. + +#### Examples + +```python +hangup — when the agent is hanging up +check_time — when checking the time +wait_for_user — when waiting for user input +wait_seconds — during deliberate pauses +adjust_response_latency — when adjusting response timing +next_step — transitioning between steps in prompt.contexts +change_context — switching between contexts in prompt.contexts +get_visual_input — processing visual input (enable_vision=True) +get_ideal_strategy — thinking (enable_thinking=True) +``` + +#### Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 353. + +*** + +### set\_language\_params + +Set (or replace) the per-language `params` dict on an already-added +language. Useful when language entries are built up via add\_language() +first and engine-specific tuning is added later (e.g., from a config +loader). Returns self for chaining. + +#### Signature + +```python +set_language_params(code: str, params: Dict[str, Any]) -> AgentBase +``` + +#### Parameters + + + Language code as previously passed to `add_language` (e.g. `"en-US"`). + + + + Engine-specific params dict to attach. Empty dict removes the key. + + +#### Returns + +`AgentBase` — Self for method chaining. No-op if the code isn't found. + +#### Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 165. + +*** + +### set\_languages + +Set all language configurations at once + +#### Signature + +```python +set_languages(languages: List[Dict[str, Any]]) -> AgentBase +``` + +#### Parameters + + + List of language configuration dictionaries + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 203. + +*** + +### set\_native\_functions + +Set the list of native functions to enable + +#### Signature + +```python +set_native_functions(function_names: List[str]) -> AgentBase +``` + +#### Parameters + + + List of native function names + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 323. + +*** + +### set\_param + +Set a single AI parameter + +#### Signature + +```python +set_param(key: str, value: Any) -> AgentBase +``` + +#### Parameters + + + Parameter name + + + + Parameter value + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 257. + +*** + +### set\_params + +Set multiple AI parameters at once + +#### Signature + +```python +set_params(params: Dict[str, Any]) -> AgentBase +``` + +#### Parameters + + + Dictionary of parameter name/value pairs + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 272. + +*** + +### set\_post\_prompt\_llm\_params + +Set LLM parameters for the post-prompt. + +Accepts any parameters which will be passed through to the SignalWire server. +The server will validate and apply parameters based on the target model's capabilities. + +> \[!NOTE] +> model: The AI model to use (gpt-4o-mini, gpt-4.1-mini, gpt-4.1-nano, nova-micro, nova-lite, qwen3-235b-A22b-instruct) +> temperature: Randomness setting. Lower values make output more deterministic. +> top\_p: Alternative to temperature. Controls nucleus sampling. +> presence\_penalty: Topic diversity. Positive values encourage new topics. +> frequency\_penalty: Repetition control. Positive values reduce repetition. + +Note: Parameters are model-specific and will be validated by the server. +Invalid parameters for the selected model will be handled/ignored by the server. +barge\_confidence is not applicable to post-prompt. + +> \[!NOTE] +> agent.set\_post\_prompt\_llm\_params( +> model="gpt-4o-mini", +> temperature=0.5, # More deterministic for post-prompt +> top\_p=0.9 +> ) + +#### Signature + +```python +set_post_prompt_llm_params(**params = {}) -> AgentBase +``` + +#### Parameters + + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 624. + +*** + +### set\_prompt\_llm\_params + +Set LLM parameters for the main prompt. + +Accepts any parameters which will be passed through to the SignalWire server. +The server will validate and apply parameters based on the target model's capabilities. + +> \[!NOTE] +> model: The AI model to use (gpt-4o-mini, gpt-4.1-mini, gpt-4.1-nano, nova-micro, nova-lite, qwen3-235b-A22b-instruct) +> temperature: Randomness setting. Lower values make output more deterministic. +> top\_p: Alternative to temperature. Controls nucleus sampling. +> barge\_confidence: ASR confidence to interrupt. Higher values make it harder to interrupt. +> presence\_penalty: Topic diversity. Positive values encourage new topics. +> frequency\_penalty: Repetition control. Positive values reduce repetition. + +Note: Parameters are model-specific and will be validated by the server. +Invalid parameters for the selected model will be handled/ignored by the server. + +> \[!NOTE] +> agent.set\_prompt\_llm\_params( +> model="nova-micro", # Using Amazon's nova-micro model +> temperature=0.7, +> top\_p=0.9, +> barge\_confidence=0.6 +> ) + +#### Signature + +```python +set_prompt_llm_params(**params = {}) -> AgentBase +``` + +#### Parameters + + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 589. + +*** + +### set\_pronunciations + +Set all pronunciation rules at once + +#### Signature + +```python +set_pronunciations(pronunciations: List[Dict[str, Any]]) -> AgentBase +``` + +#### Parameters + + + List of pronunciation rule dictionaries + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 243. + +*** + +### update\_global\_data + +Update the global data with new values + +#### Signature + +```python +update_global_data(data: Dict[str, Any]) -> AgentBase +``` + +#### Parameters + + + Dictionary of global data to update + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 306. + +## Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 14. diff --git a/fern/products/sdk-reference/python/signalwire/core/mixins/ai-config-mixin/index.mdx b/fern/products/sdk-reference/python/signalwire/core/mixins/ai-config-mixin/index.mdx new file mode 100644 index 0000000000..cf510052b1 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/mixins/ai-config-mixin/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/signalwire/core/mixins/ai-config-mixin" +title: "ai_config_mixin" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.mixins.ai_config_mixin" + parent: "signalwire.core.mixins" + module: "signalwire.core.mixins" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py" +--- +# `ai_config_mixin` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module ai_config_mixin +``` + +## Classes + + + + Mixin class containing all AI configuration methods for AgentBase + + + +## Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/mixins/auth-mixin/auth-mixin/index.mdx b/fern/products/sdk-reference/python/signalwire/core/mixins/auth-mixin/auth-mixin/index.mdx new file mode 100644 index 0000000000..f6db8d43e5 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/mixins/auth-mixin/auth-mixin/index.mdx @@ -0,0 +1,93 @@ +--- +slug: "/reference/python/signalwire/core/mixins/auth-mixin/auth-mixin" +title: "AuthMixin" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.core.mixins.auth_mixin.AuthMixin" + parent: "signalwire.core.mixins.auth_mixin" + module: "signalwire.core.mixins.auth_mixin" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/auth_mixin.py" +--- +# `AuthMixin` + +Mixin class containing all authentication-related methods for AgentBase + +## Signature + +```python +class AuthMixin +``` + +## Methods + +### get\_basic\_auth\_credentials + +Get the basic auth credentials + +#### Signature + +```python +get_basic_auth_credentials( + include_source: bool = False +) -> Union[Tuple[str, str], Tuple[str, str, str]] +``` + +#### Parameters + + + Whether to include the source of the credentials + + +#### Returns + +`Union[Tuple[str, str], Tuple[str, str, str]]` — If include\_source is False: (username, password) tuple If include\_source is True: (username, password, source) tuple, where source is one of: "provided", "environment", or "generated" + +#### Source + +[`signalwire/signalwire/core/mixins/auth_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/auth_mixin.py) + +Line 42. + +*** + +### validate\_basic\_auth + +Validate basic auth credentials + +This method can be overridden by subclasses. + +#### Signature + +```python +validate_basic_auth(username: str, password: str) -> bool +``` + +#### Parameters + + + Username from request + + + + Password from request + + +#### Returns + +`bool` — True if valid, False otherwise + +#### Source + +[`signalwire/signalwire/core/mixins/auth_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/auth_mixin.py) + +Line 24. + +## Source + +[`signalwire/signalwire/core/mixins/auth_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/auth_mixin.py) + +Line 19. diff --git a/fern/products/sdk-reference/python/signalwire/core/mixins/auth-mixin/index.mdx b/fern/products/sdk-reference/python/signalwire/core/mixins/auth-mixin/index.mdx new file mode 100644 index 0000000000..45b0d5cf6e --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/mixins/auth-mixin/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/signalwire/core/mixins/auth-mixin" +title: "auth_mixin" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.mixins.auth_mixin" + parent: "signalwire.core.mixins" + module: "signalwire.core.mixins" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/auth_mixin.py" +--- +# `auth_mixin` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module auth_mixin +``` + +## Classes + + + + Mixin class containing all authentication-related methods for AgentBase + + + +## Source + +[`signalwire/signalwire/core/mixins/auth_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/auth_mixin.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/mixins/index.mdx b/fern/products/sdk-reference/python/signalwire/core/mixins/index.mdx new file mode 100644 index 0000000000..8758d7d052 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/mixins/index.mdx @@ -0,0 +1,76 @@ +--- +slug: "/reference/python/signalwire/core/mixins" +title: "mixins" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.mixins" + parent: "signalwire.core" + module: "signalwire.core" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/__init__.py" +--- +# `mixins` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module mixins +``` + +## Properties + + + +## Modules + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + +## Source + +[`signalwire/signalwire/core/mixins/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/mixins/mcp-server-mixin/index.mdx b/fern/products/sdk-reference/python/signalwire/core/mixins/mcp-server-mixin/index.mdx new file mode 100644 index 0000000000..80abd8abb1 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/mixins/mcp-server-mixin/index.mdx @@ -0,0 +1,44 @@ +--- +slug: "/reference/python/signalwire/core/mixins/mcp-server-mixin" +title: "mcp_server_mixin" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.mixins.mcp_server_mixin" + parent: "signalwire.core.mixins" + module: "signalwire.core.mixins" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/mcp_server_mixin.py" +--- +# `mcp_server_mixin` + +Copyright (c) 2025 SignalWire + +MCP Server Mixin for AgentBase + +Exposes @tool decorated functions as an MCP server endpoint at /mcp. +Handles the MCP JSON-RPC 2.0 protocol: initialize, tools/list, tools/call. + +## Signature + +```python +module mcp_server_mixin +``` + +## Properties + + + +## Classes + + + + Mixin that adds MCP server endpoint to an agent + + + +## Source + +[`signalwire/signalwire/core/mixins/mcp_server_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/mcp_server_mixin.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/mixins/mcp-server-mixin/mcp-server-mixin/index.mdx b/fern/products/sdk-reference/python/signalwire/core/mixins/mcp-server-mixin/mcp-server-mixin/index.mdx new file mode 100644 index 0000000000..d2b138ab30 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/mixins/mcp-server-mixin/mcp-server-mixin/index.mdx @@ -0,0 +1,29 @@ +--- +slug: "/reference/python/signalwire/core/mixins/mcp-server-mixin/mcp-server-mixin" +title: "MCPServerMixin" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.core.mixins.mcp_server_mixin.MCPServerMixin" + parent: "signalwire.core.mixins.mcp_server_mixin" + module: "signalwire.core.mixins.mcp_server_mixin" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/mcp_server_mixin.py" +--- +# `MCPServerMixin` + +Mixin that adds MCP server endpoint to an agent + +## Signature + +```python +class MCPServerMixin +``` + +## Source + +[`signalwire/signalwire/core/mixins/mcp_server_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/mcp_server_mixin.py) + +Line 18. diff --git a/fern/products/sdk-reference/python/signalwire/core/mixins/prompt-mixin/index.mdx b/fern/products/sdk-reference/python/signalwire/core/mixins/prompt-mixin/index.mdx new file mode 100644 index 0000000000..d47f15aa79 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/mixins/prompt-mixin/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/signalwire/core/mixins/prompt-mixin" +title: "prompt_mixin" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.mixins.prompt_mixin" + parent: "signalwire.core.mixins" + module: "signalwire.core.mixins" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/prompt_mixin.py" +--- +# `prompt_mixin` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module prompt_mixin +``` + +## Classes + + + + Mixin class containing all prompt-related methods for AgentBase + + + +## Source + +[`signalwire/signalwire/core/mixins/prompt_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/prompt_mixin.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/mixins/prompt-mixin/prompt-mixin/index.mdx b/fern/products/sdk-reference/python/signalwire/core/mixins/prompt-mixin/prompt-mixin/index.mdx new file mode 100644 index 0000000000..6bfe1bdfe8 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/mixins/prompt-mixin/prompt-mixin/index.mdx @@ -0,0 +1,414 @@ +--- +slug: "/reference/python/signalwire/core/mixins/prompt-mixin/prompt-mixin" +title: "PromptMixin" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.core.mixins.prompt_mixin.PromptMixin" + parent: "signalwire.core.mixins.prompt_mixin" + module: "signalwire.core.mixins.prompt_mixin" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/prompt_mixin.py" +--- +# `PromptMixin` + +Mixin class containing all prompt-related methods for AgentBase + +## Signature + +```python +class PromptMixin +``` + +## Properties + + + Get the ContextBuilder for this agent + + +## Methods + +### define\_contexts + +Define contexts and steps for this agent (alternative to POM/prompt) + +> \[!NOTE] +> Contexts can coexist with traditional prompts. The restriction is only +> that you can't mix POM sections with raw text in the main prompt. + +#### Signature + +```python +define_contexts(contexts = None) -> Union[AgentBase, ContextBuilder] +``` + +#### Parameters + + + Optional context configuration (dict or ContextBuilder) + + +#### Returns + +`Union[AgentBase, ContextBuilder]` — ContextBuilder for method chaining if no contexts provided + +#### Source + +[`signalwire/signalwire/core/mixins/prompt_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/prompt_mixin.py) + +Line 121. + +*** + +### get\_post\_prompt + +Get the post-prompt for the agent + +#### Signature + +```python +get_post_prompt() -> Optional[str] +``` + +#### Returns + +`Optional[str]` — Post-prompt text or None if not set + +#### Source + +[`signalwire/signalwire/core/mixins/prompt_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/prompt_mixin.py) + +Line 374. + +*** + +### get\_prompt + +Get the prompt for the agent + +#### Signature + +```python +get_prompt() -> Union[str, List[Dict[str, Any]]] +``` + +#### Returns + +`Union[str, List[Dict[str, Any]]]` — Either a string prompt or a POM object as list of dicts + +#### Source + +[`signalwire/signalwire/core/mixins/prompt_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/prompt_mixin.py) + +Line 327. + +*** + +### prompt\_add\_section + +Add a section to the prompt + +#### Signature + +```python +prompt_add_section( + title: str, + body: str = '', + bullets: Optional[List[str]] = None, + numbered: bool = False, + numbered_bullets: bool = False, + subsections: Optional[List[Dict[str, Any]]] = None +) -> AgentBase +``` + +#### Parameters + + + Section title + + + + Optional section body text + + + + Optional list of bullet points + + + + Whether this section should be numbered + + + + Whether bullets should be numbered + + + + Optional list of subsection objects + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/prompt_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/prompt_mixin.py) + +Line 228. + +*** + +### prompt\_add\_subsection + +Add a subsection to an existing section (creating parent if needed) + +#### Signature + +```python +prompt_add_subsection( + parent_title: str, + title: str, + body: str = '', + bullets: Optional[List[str]] = None +) -> AgentBase +``` + +#### Parameters + + + Parent section title + + + + Subsection title + + + + Optional subsection body text + + + + Optional list of bullet points + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/prompt_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/prompt_mixin.py) + +Line 288. + +*** + +### prompt\_add\_to\_section + +Add content to an existing section (creating it if needed) + +#### Signature + +```python +prompt_add_to_section( + title: str, + body: Optional[str] = None, + bullet: Optional[str] = None, + bullets: Optional[List[str]] = None +) -> AgentBase +``` + +#### Parameters + + + Section title + + + + Optional text to append to section body + + + + Optional single bullet point to add + + + + Optional list of bullet points to add + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/prompt_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/prompt_mixin.py) + +Line 261. + +*** + +### prompt\_has\_section + +Check if a section exists in the prompt + +#### Signature + +```python +prompt_has_section(title: str) -> bool +``` + +#### Parameters + + + Section title to check + + +#### Returns + +`bool` — True if section exists, False otherwise + +#### Source + +[`signalwire/signalwire/core/mixins/prompt_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/prompt_mixin.py) + +Line 315. + +*** + +### reset\_contexts + +Remove all contexts, returning the agent to a no-contexts state. + +This is a convenience wrapper around `define_contexts().reset()`. +Use it in a dynamic config callback when you need to rebuild +contexts from scratch for a specific request. + +Example:: + +``` +def on_dynamic_config(query, body, headers, agent): + if query.get("transfer"): + agent.reset_contexts() + ctx = agent.define_contexts().add_context("default") + ctx.add_step("route").set_text("Route the caller.") +``` + +#### Signature + +```python +reset_contexts() -> AgentBase +``` + +#### Returns + +`AgentBase` — Self for method chaining. + +#### Examples + +```python +def on_dynamic_config(query, body, headers, agent): + if query.get("transfer"): + agent.reset_contexts() + ctx = agent.define_contexts().add_context("default") + ctx.add_step("route").set_text("Route the caller.") +``` + +#### Source + +[`signalwire/signalwire/core/mixins/prompt_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/prompt_mixin.py) + +Line 157. + +*** + +### set\_post\_prompt + +Set the post-prompt text for summary generation + +#### Signature + +```python +set_post_prompt(text: str) -> AgentBase +``` + +#### Parameters + + + The post-prompt text + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/prompt_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/prompt_mixin.py) + +Line 202. + +*** + +### set\_prompt\_pom + +Set the prompt as a POM dictionary + +#### Signature + +```python +set_prompt_pom(pom: List[Dict[str, Any]]) -> AgentBase +``` + +#### Parameters + + + POM dictionary structure + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/prompt_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/prompt_mixin.py) + +Line 215. + +*** + +### set\_prompt\_text + +Set the prompt as raw text instead of using POM + +#### Signature + +```python +set_prompt_text(text: str) -> AgentBase +``` + +#### Parameters + + + The raw prompt text + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/prompt_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/prompt_mixin.py) + +Line 189. + +## Source + +[`signalwire/signalwire/core/mixins/prompt_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/prompt_mixin.py) + +Line 19. diff --git a/fern/products/sdk-reference/python/signalwire/core/mixins/serverless-mixin/index.mdx b/fern/products/sdk-reference/python/signalwire/core/mixins/serverless-mixin/index.mdx new file mode 100644 index 0000000000..ac734a5e86 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/mixins/serverless-mixin/index.mdx @@ -0,0 +1,44 @@ +--- +slug: "/reference/python/signalwire/core/mixins/serverless-mixin" +title: "serverless_mixin" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.mixins.serverless_mixin" + parent: "signalwire.core.mixins" + module: "signalwire.core.mixins" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/serverless_mixin.py" +--- +# `serverless_mixin` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module serverless_mixin +``` + +## Constants + + + +## Classes + + + + Mixin class containing all serverless/cloud platform methods for AgentBase + + + +## Source + +[`signalwire/signalwire/core/mixins/serverless_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/serverless_mixin.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/mixins/serverless-mixin/serverless-mixin/index.mdx b/fern/products/sdk-reference/python/signalwire/core/mixins/serverless-mixin/serverless-mixin/index.mdx new file mode 100644 index 0000000000..baafe80410 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/mixins/serverless-mixin/serverless-mixin/index.mdx @@ -0,0 +1,65 @@ +--- +slug: "/reference/python/signalwire/core/mixins/serverless-mixin/serverless-mixin" +title: "ServerlessMixin" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.core.mixins.serverless_mixin.ServerlessMixin" + parent: "signalwire.core.mixins.serverless_mixin" + module: "signalwire.core.mixins.serverless_mixin" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/serverless_mixin.py" +--- +# `ServerlessMixin` + +Mixin class containing all serverless/cloud platform methods for AgentBase + +## Signature + +```python +class ServerlessMixin +``` + +## Methods + +### handle\_serverless\_request + +Handle serverless environment requests (CGI, Lambda, Cloud Functions) + +#### Signature + +```python +handle_serverless_request(event = None, context = None, mode = None) +``` + +#### Parameters + + + Serverless event object (Lambda, Cloud Functions) + + + + Serverless context object (Lambda, Cloud Functions) + + + + Override execution mode (from force\_mode in run()) + + +#### Returns + +Response appropriate for the serverless platform + +#### Source + +[`signalwire/signalwire/core/mixins/serverless_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/serverless_mixin.py) + +Line 28. + +## Source + +[`signalwire/signalwire/core/mixins/serverless_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/serverless_mixin.py) + +Line 23. diff --git a/fern/products/sdk-reference/python/signalwire/core/mixins/skill-mixin/index.mdx b/fern/products/sdk-reference/python/signalwire/core/mixins/skill-mixin/index.mdx new file mode 100644 index 0000000000..f6201fd467 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/mixins/skill-mixin/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/signalwire/core/mixins/skill-mixin" +title: "skill_mixin" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.mixins.skill_mixin" + parent: "signalwire.core.mixins" + module: "signalwire.core.mixins" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/skill_mixin.py" +--- +# `skill_mixin` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module skill_mixin +``` + +## Classes + + + + Mixin class containing all skill management methods for AgentBase + + + +## Source + +[`signalwire/signalwire/core/mixins/skill_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/skill_mixin.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/mixins/skill-mixin/skill-mixin/index.mdx b/fern/products/sdk-reference/python/signalwire/core/mixins/skill-mixin/skill-mixin/index.mdx new file mode 100644 index 0000000000..9acf84fb83 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/mixins/skill-mixin/skill-mixin/index.mdx @@ -0,0 +1,139 @@ +--- +slug: "/reference/python/signalwire/core/mixins/skill-mixin/skill-mixin" +title: "SkillMixin" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.core.mixins.skill_mixin.SkillMixin" + parent: "signalwire.core.mixins.skill_mixin" + module: "signalwire.core.mixins.skill_mixin" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/skill_mixin.py" +--- +# `SkillMixin` + +Mixin class containing all skill management methods for AgentBase + +## Signature + +```python +class SkillMixin +``` + +## Methods + +### add\_skill + +Add a skill to this agent + +#### Signature + +```python +add_skill(skill_name: str, params: Optional[Dict[str, Any]] = None) -> AgentBase +``` + +#### Parameters + + + Name of the skill to add + + + + Optional parameters to pass to the skill for configuration + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Throws + +- `ValueError` — If skill not found or failed to load with detailed error message + +#### Source + +[`signalwire/signalwire/core/mixins/skill_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/skill_mixin.py) + +Line 18. + +*** + +### has\_skill + +Check if skill is loaded + +#### Signature + +```python +has_skill(skill_name: str) -> bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/core/mixins/skill_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/skill_mixin.py) + +Line 53. + +*** + +### list\_skills + +List currently loaded skills + +#### Signature + +```python +list_skills() -> List[str] +``` + +#### Returns + +`List[str]` + +#### Source + +[`signalwire/signalwire/core/mixins/skill_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/skill_mixin.py) + +Line 49. + +*** + +### remove\_skill + +Remove a skill from this agent + +#### Signature + +```python +remove_skill(skill_name: str) -> AgentBase +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`signalwire/signalwire/core/mixins/skill_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/skill_mixin.py) + +Line 44. + +## Source + +[`signalwire/signalwire/core/mixins/skill_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/skill_mixin.py) + +Line 13. diff --git a/fern/products/sdk-reference/python/signalwire/core/mixins/state-mixin/index.mdx b/fern/products/sdk-reference/python/signalwire/core/mixins/state-mixin/index.mdx new file mode 100644 index 0000000000..4de3d0f7b6 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/mixins/state-mixin/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/signalwire/core/mixins/state-mixin" +title: "state_mixin" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.mixins.state_mixin" + parent: "signalwire.core.mixins" + module: "signalwire.core.mixins" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/state_mixin.py" +--- +# `state_mixin` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module state_mixin +``` + +## Classes + + + + Mixin class containing all state and session management methods for AgentBase + + + +## Source + +[`signalwire/signalwire/core/mixins/state_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/state_mixin.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/mixins/state-mixin/state-mixin/index.mdx b/fern/products/sdk-reference/python/signalwire/core/mixins/state-mixin/state-mixin/index.mdx new file mode 100644 index 0000000000..6eea6c5a80 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/mixins/state-mixin/state-mixin/index.mdx @@ -0,0 +1,65 @@ +--- +slug: "/reference/python/signalwire/core/mixins/state-mixin/state-mixin" +title: "StateMixin" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.core.mixins.state_mixin.StateMixin" + parent: "signalwire.core.mixins.state_mixin" + module: "signalwire.core.mixins.state_mixin" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/state_mixin.py" +--- +# `StateMixin` + +Mixin class containing all state and session management methods for AgentBase + +## Signature + +```python +class StateMixin +``` + +## Methods + +### validate\_tool\_token + +Validate a tool token + +#### Signature + +```python +validate_tool_token(function_name: str, token: str, call_id: str) -> bool +``` + +#### Parameters + + + Name of the function/tool + + + + Token to validate + + + + Call ID for the session + + +#### Returns + +`bool` — True if token is valid, False otherwise + +#### Source + +[`signalwire/signalwire/core/mixins/state_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/state_mixin.py) + +Line 43. + +## Source + +[`signalwire/signalwire/core/mixins/state_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/state_mixin.py) + +Line 15. diff --git a/fern/products/sdk-reference/python/signalwire/core/mixins/tool-mixin/index.mdx b/fern/products/sdk-reference/python/signalwire/core/mixins/tool-mixin/index.mdx new file mode 100644 index 0000000000..1d394bec64 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/mixins/tool-mixin/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/signalwire/core/mixins/tool-mixin" +title: "tool_mixin" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.mixins.tool_mixin" + parent: "signalwire.core.mixins" + module: "signalwire.core.mixins" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/tool_mixin.py" +--- +# `tool_mixin` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module tool_mixin +``` + +## Classes + + + + Mixin class containing all tool/function-related methods for AgentBase + + + +## Source + +[`signalwire/signalwire/core/mixins/tool_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/tool_mixin.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/mixins/tool-mixin/tool-mixin/index.mdx b/fern/products/sdk-reference/python/signalwire/core/mixins/tool-mixin/tool-mixin/index.mdx new file mode 100644 index 0000000000..9fcb70fec7 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/mixins/tool-mixin/tool-mixin/index.mdx @@ -0,0 +1,309 @@ +--- +slug: "/reference/python/signalwire/core/mixins/tool-mixin/tool-mixin" +title: "ToolMixin" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.core.mixins.tool_mixin.ToolMixin" + parent: "signalwire.core.mixins.tool_mixin" + module: "signalwire.core.mixins.tool_mixin" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/tool_mixin.py" +--- +# `ToolMixin` + +Mixin class containing all tool/function-related methods for AgentBase + +## Signature + +```python +class ToolMixin +``` + +## Methods + +### define\_tool + +Define a SWAIG function the AI can call. + +#### How this becomes a tool the model sees + +SWAIG functions are NOT a separate concept from "LLM tools" — they +ARE the tools, exposed to the model in exactly the same shape as +native OpenAI / Anthropic tool calling. Under the hood, the SDK +renders each SWAIG function into an OpenAI-format tool schema: + +``` +{"type": "function", "function": { + "name": "", + "description": "", + "parameters": {} +}} +``` + +That schema is sent to the model on every turn. The model reads +the `description` field and the per-parameter `description` +strings inside `parameters` to decide WHEN to call this tool and +HOW to fill in the arguments. + +Treat description text as prompt engineering, not as developer +documentation: + +- Bad: "Lookup function" + +- Bad: "Internal helper for account fetching" + +- Good: "Look up a customer's account details by their account + number. Use this BEFORE quoting any account-specific + information (balance, plan, status, billing date)." + +- Bad parameter: "the id" + +- Good parameter: "The customer's account number, exactly 8 + digits, no dashes or spaces. Ask the user if + they don't provide it." + +Vague descriptions are the #1 cause of "the model has the right +tool but doesn't call it" failures. Be specific about WHEN to +use the tool, what makes it the right choice over alternatives, +and any preconditions on the arguments. + +Tool count matters too: LLM tool selection accuracy degrades past +\~7-8 simultaneously-active tools per call. If you have many tools, +partition them across steps using Step.set\_functions() so only +the relevant subset is active at any moment. + +> \[!NOTE] +> agent.define\_tool( +> name="lookup\_account", +> description=( +> "Look up a customer's account details by their account " +> "number. Use this BEFORE quoting any account-specific " +> "information. Do not call it for general questions about " +> "the product." +> ), +> parameters=\{ +> "type": "object", +> "properties": \{ +> "account\_number": \{ +> "type": "string", +> "description": ( +> "The customer's 8-digit account number, " +> "no dashes. Ask the user if not provided." +> ), +> \} +> \}, +> "required": \["account\_number"], +> \}, +> handler=self.handle\_lookup\_account, +> ) + +#### Signature + +```python +define_tool( + name: str, + description: str, + parameters: Dict[str, Any], + handler: Callable, + secure: bool = True, + fillers: Optional[Dict[str, List[str]]] = None, + webhook_url: Optional[str] = None, + required: Optional[List[str]] = None, + is_typed_handler: bool = False, + **swaig_fields = {} +) -> AgentBase +``` + +#### Parameters + + + Function name. Must be unique across all SWAIG functions on this agent. Becomes the `name` field in the OpenAI tool schema and is what the model emits when it picks this tool. Use snake\_case; the model picks up naming conventions from this field too. + + + + The function description as the LLM will read it. See above — this is prompt-engineered text, not internal docs. Explain what the tool does, when to use it, and what NOT to use it for if there are sibling tools the model might confuse it with. + + + + JSON Schema for the function's arguments. The per-property `description` fields inside the schema are also LLM-facing — give every parameter a description that tells the model how to fill it in (format, source, constraints). + + + + Python callable invoked when the model calls this tool. Receives parsed args and the raw request data. Should return a FunctionResult or dict; anything else logs a warning and is stringified. + + + + Whether to require SWAIG token validation on the webhook callback. + + + + Optional dict mapping language codes to arrays of filler phrases the AI speaks while the function executes. Format: \{"en-US": \["one moment...", "checking..."]\} + + + + Optional external webhook URL. If set, the SDK does not handle the call locally — the model's tool call is forwarded to this URL. + + + + Optional list of required parameter names. May also be set inside `parameters["required"]`. + + + + Whether the handler uses type-hinted parameters (auto-wrapped from inferred schema). + + + + +#### Returns + +`AgentBase` — Self for method chaining. + +#### Examples + +```python +{"type": "function", "function": { + "name": "", + "description": "", + "parameters": {} +}} +``` + +#### Source + +[`signalwire/signalwire/core/mixins/tool_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/tool_mixin.py) + +Line 26. + +*** + +### define\_tools + +Define the tools this agent can use + +This method can be overridden by subclasses. + +#### Signature + +```python +define_tools() -> List[SWAIGFunction] +``` + +#### Returns + +`List[SWAIGFunction]` — List of SWAIGFunction objects or raw dictionaries (for data\_map tools) + +#### Source + +[`signalwire/signalwire/core/mixins/tool_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/tool_mixin.py) + +Line 200. + +*** + +### on\_function\_call + +Called when a SWAIG function is invoked + +#### Signature + +```python +on_function_call( + name: str, + args: Dict[str, Any], + raw_data: Optional[Dict[str, Any]] = None +) -> Any +``` + +#### Parameters + + + Function name + + + + Function arguments + + + + Raw request data + + +#### Returns + +`Any` — Function result + +#### Source + +[`signalwire/signalwire/core/mixins/tool_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/tool_mixin.py) + +Line 219. + +*** + +### register\_swaig\_function + +Register a raw SWAIG function dictionary (e.g., from DataMap.to\_swaig\_function()) + +#### Signature + +```python +register_swaig_function(function_dict: Dict[str, Any]) -> AgentBase +``` + +#### Parameters + + + Complete SWAIG function definition dictionary + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/tool_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/tool_mixin.py) + +Line 162. + +*** + +### tool + +Class method decorator for defining SWAIG tools + +Used as: + +@AgentBase.tool(name="example\_function", parameters=\{...\}) +def example\_function(self, param1): +\# ... + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +tool(name = None, **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/core/mixins/tool_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/tool_mixin.py) + +Line 187. + +## Source + +[`signalwire/signalwire/core/mixins/tool_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/tool_mixin.py) + +Line 21. diff --git a/fern/products/sdk-reference/python/signalwire/core/mixins/web-mixin/index.mdx b/fern/products/sdk-reference/python/signalwire/core/mixins/web-mixin/index.mdx new file mode 100644 index 0000000000..8793c05613 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/mixins/web-mixin/index.mdx @@ -0,0 +1,44 @@ +--- +slug: "/reference/python/signalwire/core/mixins/web-mixin" +title: "web_mixin" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.mixins.web_mixin" + parent: "signalwire.core.mixins" + module: "signalwire.core.mixins" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/web_mixin.py" +--- +# `web_mixin` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module web_mixin +``` + +## Constants + + + +## Classes + + + + Mixin class containing all web server and routing-related methods for AgentBase + + + +## Source + +[`signalwire/signalwire/core/mixins/web_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/web_mixin.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/mixins/web-mixin/web-mixin/index.mdx b/fern/products/sdk-reference/python/signalwire/core/mixins/web-mixin/web-mixin/index.mdx new file mode 100644 index 0000000000..7fcba36c55 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/mixins/web-mixin/web-mixin/index.mdx @@ -0,0 +1,405 @@ +--- +slug: "/reference/python/signalwire/core/mixins/web-mixin/web-mixin" +title: "WebMixin" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.core.mixins.web_mixin.WebMixin" + parent: "signalwire.core.mixins.web_mixin" + module: "signalwire.core.mixins.web_mixin" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/web_mixin.py" +--- +# `WebMixin` + +Mixin class containing all web server and routing-related methods for AgentBase + +## Signature + +```python +class WebMixin +``` + +## Methods + +### as\_router + +Get a FastAPI router for this agent + +#### Signature + +```python +as_router() -> APIRouter +``` + +#### Returns + +`APIRouter` — FastAPI router + +#### Source + +[`signalwire/signalwire/core/mixins/web_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/web_mixin.py) + +Line 133. + +*** + +### enable\_debug\_routes + +Enable debug routes for testing and development + +#### Signature + +```python +enable_debug_routes() -> AgentBase +``` + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/web_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/web_mixin.py) + +Line 1244. + +*** + +### get\_app + +Get the FastAPI application instance for deployment adapters like Lambda/Mangum + +This method ensures the FastAPI app is properly initialized and configured, +then returns it for use with deployment adapters like Mangum for AWS Lambda. + +#### Signature + +```python +get_app() +``` + +#### Returns + +The configured FastAPI application instance + +#### Source + +[`signalwire/signalwire/core/mixins/web_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/web_mixin.py) + +Line 41. + +*** + +### manual\_set\_proxy\_url + +Manually set the proxy URL base for webhook callbacks + +This can be called at runtime to set or update the proxy URL + +#### Signature + +```python +manual_set_proxy_url(proxy_url: str) -> AgentBase +``` + +#### Parameters + + + The base URL to use for webhooks (e.g., https://example.ngrok.io) + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/web_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/web_mixin.py) + +Line 1191. + +*** + +### on\_request + +Called when SWML is requested, with request data when available + +This method overrides SWMLService's on\_request to properly handle SWML generation +for AI Agents. + +#### Signature + +```python +on_request( + request_data: Optional[dict] = None, + callback_path: Optional[str] = None +) -> Optional[dict] +``` + +#### Parameters + + + Optional dictionary containing the parsed POST body + + + + Optional callback path + + +#### Returns + +`Optional[dict]` — None to use the default SWML rendering (which will call \_render\_swml) + +#### Source + +[`signalwire/signalwire/core/mixins/web_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/web_mixin.py) + +Line 1079. + +*** + +### on\_swml\_request + +Customization point for subclasses to modify SWML based on request data + +#### Signature + +```python +on_swml_request( + request_data: Optional[dict] = None, + callback_path: Optional[str] = None, + request: Optional[Request] = None +) -> Optional[dict] +``` + +#### Parameters + + + Optional dictionary containing the parsed POST body + + + + Optional callback path + + + + Optional FastAPI Request object for accessing query params, headers, etc. + + +#### Returns + +`Optional[dict]` — Optional dict with modifications to apply to the SWML document + +#### Source + +[`signalwire/signalwire/core/mixins/web_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/web_mixin.py) + +Line 1100. + +*** + +### register\_routing\_callback + +Register a callback function that will be called to determine routing +based on POST data. + +When a routing callback is registered, an endpoint at the specified path is automatically +created that will handle requests. This endpoint will use the callback to +determine if the request should be processed by this service or redirected. + +The callback should take a request object and request body dictionary and return: + +- A route string if it should be routed to a different endpoint +- None if normal processing should continue + +#### Signature + +```python +register_routing_callback( + callback_fn: Callable[Request, Dict[str, Any], Optional[str]], + path: str = '/sip' +) -> None +``` + +#### Parameters + + + The callback function to register + + + + The path where this callback should be registered (default: "/sip") + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/core/mixins/web_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/web_mixin.py) + +Line 1131. + +*** + +### run + +Smart run method that automatically detects environment and handles accordingly + +#### Signature + +```python +run( + event = None, + context = None, + force_mode = None, + host: Optional[str] = None, + port: Optional[int] = None +) +``` + +#### Parameters + + + Serverless event object (Lambda, Cloud Functions) + + + + Serverless context object (Lambda, Cloud Functions) + + + + Override automatic mode detection for testing + + + + Host override for server mode + + + + Port override for server mode + + +#### Returns + +Response for serverless modes, None for server mode + +#### Source + +[`signalwire/signalwire/core/mixins/web_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/web_mixin.py) + +Line 305. + +*** + +### serve + +Start a web server for this agent + +#### Signature + +```python +serve(host: Optional[str] = None, port: Optional[int] = None) -> None +``` + +#### Parameters + + + Optional host to override the default + + + + Optional port to override the default + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/core/mixins/web_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/web_mixin.py) + +Line 153. + +*** + +### set\_dynamic\_config\_callback + +Set a callback function for dynamic agent configuration + +This callback receives the actual agent instance, allowing you to dynamically +configure ANY aspect of the agent including adding skills, modifying prompts, +changing parameters, etc. based on request data. + +> \[!NOTE] +> def my\_config(query\_params, body\_params, headers, agent): +> if query\_params.get('tier') == 'premium': +> agent.add\_skill("advanced\_search") +> agent.add\_language("English", "en-US", "premium\_voice") +> agent.set\_params(\{"end\_of\_speech\_timeout": 500\}) +> agent.set\_global\_data(\{"tier": query\_params.get('tier', 'standard')\}) +> +> my\_agent.set\_dynamic\_config\_callback(my\_config) + +#### Signature + +```python +set_dynamic_config_callback( + callback: Callable[dict, dict, dict, AgentBase, None] +) -> AgentBase +``` + +#### Parameters + + + Function that takes (query\_params, body\_params, headers, agent) and configures the agent using any available methods like: - agent.add\_skill(...) - agent.add\_language(...) - agent.prompt\_add\_section(...) - agent.set\_params(...) - agent.set\_global\_data(...) - agent.define\_tool(...) + + +#### Returns + +`AgentBase` + +#### Examples + +```python +my_agent.set_dynamic_config_callback(my_config) +``` + +#### Source + +[`signalwire/signalwire/core/mixins/web_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/web_mixin.py) + +Line 1160. + +*** + +### setup\_graceful\_shutdown + +Setup signal handlers for graceful shutdown (useful for Kubernetes) + +#### Signature + +```python +setup_graceful_shutdown() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/core/mixins/web_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/web_mixin.py) + +Line 1218. + +## Source + +[`signalwire/signalwire/core/mixins/web_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/web_mixin.py) + +Line 36. diff --git a/fern/products/sdk-reference/python/signalwire/core/pom-builder/index.mdx b/fern/products/sdk-reference/python/signalwire/core/pom-builder/index.mdx new file mode 100644 index 0000000000..010398abc9 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/pom-builder/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/signalwire/core/pom-builder" +title: "pom_builder" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.pom_builder" + parent: "signalwire.core" + module: "signalwire.core" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/pom_builder.py" +--- +# `pom_builder` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module pom_builder +``` + +## Classes + + + + Builder class for creating structured prompts using the Prompt Object Model. + + + +## Source + +[`signalwire/signalwire/core/pom_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/pom_builder.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/pom-builder/pom-builder/index.mdx b/fern/products/sdk-reference/python/signalwire/core/pom-builder/pom-builder/index.mdx new file mode 100644 index 0000000000..a33975d3c7 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/pom-builder/pom-builder/index.mdx @@ -0,0 +1,381 @@ +--- +slug: "/reference/python/signalwire/core/pom-builder/pom-builder" +title: "PomBuilder" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.core.pom_builder.PomBuilder" + parent: "signalwire.core.pom_builder" + module: "signalwire.core.pom_builder" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/pom_builder.py" +--- +# `PomBuilder` + +Builder class for creating structured prompts using the Prompt Object Model. + +This class is a flexible wrapper around the POM API that allows for: + +- Dynamic creation of sections on demand +- Adding content to existing sections +- Nesting subsections +- Rendering to markdown or XML + +Unlike previous implementations, there are no predefined section types - +you can create any section structure that fits your needs. + +## Signature + +```python +class PomBuilder +``` + +## Properties + + + +## Methods + +### \_\_init\_\_ + +Initialize a new POM builder with an empty POM + +#### Signature + +```python +__init__() +``` + +#### Source + +[`signalwire/signalwire/core/pom_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/pom_builder.py) + +Line 33. + +*** + +### add\_section + +Add a new section to the POM + +#### Signature + +```python +add_section( + title: str, + body: str = '', + bullets: Optional[List[str]] = None, + numbered: bool = False, + numbered_bullets: bool = False, + subsections: Optional[List[Dict[str, Any]]] = None +) -> PomBuilder +``` + +#### Parameters + + + Section title + + + + Optional body text + + + + Optional list of bullet points + + + + Whether to number this section + + + + Whether to number bullet points + + + + Optional list of subsection objects + + +#### Returns + +`PomBuilder` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/pom_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/pom_builder.py) + +Line 38. + +*** + +### add\_subsection + +Add a subsection to an existing section, creating the parent if needed + +#### Signature + +```python +add_subsection( + parent_title: str, + title: str, + body: str = '', + bullets: Optional[List[str]] = None +) -> PomBuilder +``` + +#### Parameters + + + Title of the parent section + + + + Title for the new subsection + + + + Optional body text + + + + Optional list of bullet points + + +#### Returns + +`PomBuilder` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/pom_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/pom_builder.py) + +Line 115. + +*** + +### add\_to\_section + +Add content to an existing section + +#### Signature + +```python +add_to_section( + title: str, + body: Optional[str] = None, + bullet: Optional[str] = None, + bullets: Optional[List[str]] = None +) -> PomBuilder +``` + +#### Parameters + + + Section title + + + + Text to append to the section body + + + + Single bullet to add + + + + List of bullets to add + + +#### Returns + +`PomBuilder` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/pom_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/pom_builder.py) + +Line 80. + +*** + +### from\_sections + +Create a PomBuilder from a list of section dictionaries + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +from_sections(sections: List[Dict[str, Any]]) -> PomBuilder +``` + +#### Parameters + + + List of section definition dictionaries + + +#### Returns + +`PomBuilder` — A new PomBuilder instance with the sections added + +#### Source + +[`signalwire/signalwire/core/pom_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/pom_builder.py) + +Line 181. + +*** + +### get\_section + +Get a section by title + +#### Signature + +```python +get_section(title: str) -> Optional[Section] +``` + +#### Parameters + + + Section title + + +#### Returns + +`Optional[Section]` — Section object or None if not found + +#### Source + +[`signalwire/signalwire/core/pom_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/pom_builder.py) + +Line 153. + +*** + +### has\_section + +Check if a section with the given title exists + +#### Signature + +```python +has_section(title: str) -> bool +``` + +#### Parameters + + + Section title to check + + +#### Returns + +`bool` — True if the section exists, False otherwise + +#### Source + +[`signalwire/signalwire/core/pom_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/pom_builder.py) + +Line 141. + +*** + +### render\_markdown + +Render the POM as markdown + +#### Signature + +```python +render_markdown() -> str +``` + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/core/pom_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/pom_builder.py) + +Line 165. + +*** + +### render\_xml + +Render the POM as XML + +#### Signature + +```python +render_xml() -> str +``` + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/core/pom_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/pom_builder.py) + +Line 169. + +*** + +### to\_dict + +Convert the POM to a list of section dictionaries + +#### Signature + +```python +to_dict() -> List[Dict[str, Any]] +``` + +#### Returns + +`List[Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/core/pom_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/pom_builder.py) + +Line 173. + +*** + +### to\_json + +Convert the POM to a JSON string + +#### Signature + +```python +to_json() -> str +``` + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/core/pom_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/pom_builder.py) + +Line 177. + +## Source + +[`signalwire/signalwire/core/pom_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/pom_builder.py) + +Line 19. diff --git a/fern/products/sdk-reference/python/signalwire/core/security-config/index.mdx b/fern/products/sdk-reference/python/signalwire/core/security-config/index.mdx new file mode 100644 index 0000000000..ae500e88d1 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/security-config/index.mdx @@ -0,0 +1,46 @@ +--- +slug: "/reference/python/signalwire/core/security-config" +title: "security_config" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.security_config" + parent: "signalwire.core" + module: "signalwire.core" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security_config.py" +--- +# `security_config` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module security_config +``` + +## Properties + + + + + +## Classes + + + + Unified security configuration for SignalWire services. + + + +## Source + +[`signalwire/signalwire/core/security_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security_config.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/security-config/security-config/index.mdx b/fern/products/sdk-reference/python/signalwire/core/security-config/security-config/index.mdx new file mode 100644 index 0000000000..c81b9b16f6 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/security-config/security-config/index.mdx @@ -0,0 +1,310 @@ +--- +slug: "/reference/python/signalwire/core/security-config/security-config" +title: "SecurityConfig" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.core.security_config.SecurityConfig" + parent: "signalwire.core.security_config" + module: "signalwire.core.security_config" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security_config.py" +--- +# `SecurityConfig` + +Unified security configuration for SignalWire services. + +This class provides centralized security settings that can be used by +both SWML and Search services, ensuring consistent security behavior. + +## Signature + +```python +class SecurityConfig +``` + +## Properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +Initialize security configuration. + +#### Signature + +```python +__init__(config_file: Optional[str] = None, service_name: Optional[str] = None) +``` + +#### Parameters + + + Optional path to config file + + + + Optional service name for finding service-specific config + + +#### Source + +[`signalwire/signalwire/core/security_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security_config.py) + +Line 60. + +*** + +### get\_basic\_auth + +Get basic auth credentials, generating if not set. + +If no basic auth password is configured (e.g. SWML\_BASIC\_AUTH\_PASSWORD +env var is unset and the SDK caller didn't pass one explicitly), the +SDK falls back to a random password generated via secrets.token\_urlsafe. +That password lives only in memory and is regenerated on every process +start, so any external caller (tests, RPC clients, MCP) that doesn't +share the auto-generated value will get HTTP 401. + +We log a warning the first time the auto-generated fallback fires so +the failure mode is visible in logs instead of silently breaking +external callers. Set SWML\_BASIC\_AUTH\_USER / SWML\_BASIC\_AUTH\_PASSWORD +(or load .env before constructing the agent) to suppress the warning. + +#### Signature + +```python +get_basic_auth() -> Tuple[str, str] +``` + +#### Returns + +`Tuple[str, str]` — Tuple of (username, password) + +#### Source + +[`signalwire/signalwire/core/security_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security_config.py) + +Line 247. + +*** + +### get\_cors\_config + +Get CORS configuration for FastAPI. + +#### Signature + +```python +get_cors_config() -> Dict[str, Any] +``` + +#### Returns + +`Dict[str, Any]` — Dictionary of CORS settings + +#### Source + +[`signalwire/signalwire/core/security_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security_config.py) + +Line 328. + +*** + +### get\_security\_headers + +Get security headers to add to responses. + +#### Signature + +```python +get_security_headers(is_https: bool = False) -> Dict[str, str] +``` + +#### Parameters + + + Whether the connection is over HTTPS + + +#### Returns + +`Dict[str, str]` — Dictionary of security headers + +#### Source + +[`signalwire/signalwire/core/security_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security_config.py) + +Line 290. + +*** + +### get\_ssl\_context\_kwargs + +Get SSL context kwargs for uvicorn. + +#### Signature + +```python +get_ssl_context_kwargs() -> Dict[str, Any] +``` + +#### Returns + +`Dict[str, Any]` — Dictionary of SSL parameters for uvicorn + +#### Source + +[`signalwire/signalwire/core/security_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security_config.py) + +Line 226. + +*** + +### get\_url\_scheme + +Get the URL scheme based on SSL configuration + +#### Signature + +```python +get_url_scheme() -> str +``` + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/core/security_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security_config.py) + +Line 342. + +*** + +### load\_from\_env + +Load configuration from environment variables + +#### Signature + +```python +load_from_env() +``` + +#### Source + +[`signalwire/signalwire/core/security_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security_config.py) + +Line 168. + +*** + +### log\_config + +Log the current security configuration + +#### Signature + +```python +log_config(service_name: str) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/core/security_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security_config.py) + +Line 346. + +*** + +### should\_allow\_host + +Check if a host is allowed. + +#### Signature + +```python +should_allow_host(host: str) -> bool +``` + +#### Parameters + + + The host to check + + +#### Returns + +`bool` — True if the host is allowed + +#### Source + +[`signalwire/signalwire/core/security_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security_config.py) + +Line 313. + +*** + +### validate\_ssl\_config + +Validate SSL configuration. + +#### Signature + +```python +validate_ssl_config() -> Tuple[bool, Optional[str]] +``` + +#### Returns + +`Tuple[bool, Optional[str]]` — Tuple of (is\_valid, error\_message) + +#### Source + +[`signalwire/signalwire/core/security_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security_config.py) + +Line 202. + +## Source + +[`signalwire/signalwire/core/security_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security_config.py) + +Line 19. diff --git a/fern/products/sdk-reference/python/signalwire/core/security/index.mdx b/fern/products/sdk-reference/python/signalwire/core/security/index.mdx new file mode 100644 index 0000000000..b43879a0ec --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/security/index.mdx @@ -0,0 +1,52 @@ +--- +slug: "/reference/python/signalwire/core/security" +title: "security" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.security" + parent: "signalwire.core" + module: "signalwire.core" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/__init__.py" +--- +# `security` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module security +``` + +## Properties + + + +## Modules + + + + Copyright (c) 2025 SignalWire + + + + FastAPI middleware / dependency for SignalWire webhook signature validation. + + + + Webhook signature validation for SignalWire-signed HTTP requests. + + + +## Source + +[`signalwire/signalwire/core/security/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/security/session-manager/index.mdx b/fern/products/sdk-reference/python/signalwire/core/security/session-manager/index.mdx new file mode 100644 index 0000000000..a06f36646b --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/security/session-manager/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/signalwire/core/security/session-manager" +title: "session_manager" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.security.session_manager" + parent: "signalwire.core.security" + module: "signalwire.core.security" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/session_manager.py" +--- +# `session_manager` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module session_manager +``` + +## Classes + + + + Manages security tokens for function calls + + + +## Source + +[`signalwire/signalwire/core/security/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/session_manager.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/security/session-manager/session-manager/index.mdx b/fern/products/sdk-reference/python/signalwire/core/security/session-manager/session-manager/index.mdx new file mode 100644 index 0000000000..a01dde36fc --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/security/session-manager/session-manager/index.mdx @@ -0,0 +1,370 @@ +--- +slug: "/reference/python/signalwire/core/security/session-manager/session-manager" +title: "SessionManager" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.core.security.session_manager.SessionManager" + parent: "signalwire.core.security.session_manager" + module: "signalwire.core.security.session_manager" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/session_manager.py" +--- +# `SessionManager` + +Manages security tokens for function calls + +This implementation is completely stateless - it does not track call sessions +or store any information in memory. All validation is done using cryptographic +signatures with the tokens containing all necessary information. + +## Signature + +```python +class SessionManager +``` + +## Properties + + + + + +## Methods + +### \_\_init\_\_ + +Initialize the session manager + +#### Signature + +```python +__init__(token_expiry_secs: int = 900, secret_key: Optional[str] = None) +``` + +#### Parameters + + + Seconds until tokens expire (default: 15 minutes) + + + + Secret key for signing tokens (generated if not provided) + + +#### Source + +[`signalwire/signalwire/core/security/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/session_manager.py) + +Line 31. + +*** + +### activate\_session + +Legacy method, does nothing but returns success + +#### Signature + +```python +activate_session(call_id: str) -> bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/core/security/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/session_manager.py) + +Line 184. + +*** + +### create\_session + +Create a new session ID if one isn't provided + +#### Signature + +```python +create_session(call_id: Optional[str] = None) -> str +``` + +#### Parameters + + + Optional call ID, generated if not provided + + +#### Returns + +`str` — The call\_id for the session + +#### Source + +[`signalwire/signalwire/core/security/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/session_manager.py) + +Line 44. + +*** + +### create\_tool\_token + +Alias for generate\_token to maintain backward compatibility + +#### Signature + +```python +create_tool_token(function_name: str, call_id: str) -> str +``` + +#### Parameters + + + Name of the function to generate a token for + + + + Call session ID + + +#### Returns + +`str` — A secure token + +#### Source + +[`signalwire/signalwire/core/security/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/session_manager.py) + +Line 92. + +*** + +### debug\_token + +Debug a token without validating it + +This method decodes the token and extracts its components for debugging purposes +without performing validation. Requires \_debug\_mode to be True. + +#### Signature + +```python +debug_token(token: str) -> Dict[str, Any] +``` + +#### Parameters + + + The token to debug + + +#### Returns + +`Dict[str, Any]` — Dictionary with token components and analysis + +#### Source + +[`signalwire/signalwire/core/security/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/session_manager.py) + +Line 208. + +*** + +### end\_session + +Legacy method, does nothing but returns success + +#### Signature + +```python +end_session(call_id: str) -> bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/core/security/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/session_manager.py) + +Line 190. + +*** + +### generate\_token + +Generate a secure self-contained token for a function call + +#### Signature + +```python +generate_token(function_name: str, call_id: str) -> str +``` + +#### Parameters + + + Name of the function to generate a token for + + + + Call session ID + + +#### Returns + +`str` — A secure token + +#### Source + +[`signalwire/signalwire/core/security/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/session_manager.py) + +Line 60. + +*** + +### get\_session\_metadata + +Legacy method, always returns empty metadata + +#### Signature + +```python +get_session_metadata(call_id: str) -> Optional[Dict[str, Any]] +``` + +#### Parameters + + + +#### Returns + +`Optional[Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/core/security/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/session_manager.py) + +Line 196. + +*** + +### set\_session\_metadata + +Legacy method, does nothing but returns success + +#### Signature + +```python +set_session_metadata(call_id: str, key: str, value: Any) -> bool +``` + +#### Parameters + + + + + + + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/core/security/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/session_manager.py) + +Line 202. + +*** + +### validate\_token + +Validate a function call token + +#### Signature + +```python +validate_token(call_id: str, function_name: str, token: str) -> bool +``` + +#### Parameters + + + Call session ID + + + + Name of the function being called + + + + Token to validate + + +#### Returns + +`bool` — True if valid, False otherwise + +#### Source + +[`signalwire/signalwire/core/security/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/session_manager.py) + +Line 105. + +*** + +### validate\_tool\_token + +Alias for validate\_token to maintain backward compatibility + +#### Signature + +```python +validate_tool_token(function_name: str, token: str, call_id: str) -> bool +``` + +#### Parameters + + + Name of the function being called + + + + Token to validate + + + + Call session ID + + +#### Returns + +`bool` — True if valid, False otherwise + +#### Source + +[`signalwire/signalwire/core/security/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/session_manager.py) + +Line 167. + +## Source + +[`signalwire/signalwire/core/security/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/session_manager.py) + +Line 23. diff --git a/fern/products/sdk-reference/python/signalwire/core/security/webhook-middleware/index.mdx b/fern/products/sdk-reference/python/signalwire/core/security/webhook-middleware/index.mdx new file mode 100644 index 0000000000..91c19e3a37 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/security/webhook-middleware/index.mdx @@ -0,0 +1,140 @@ +--- +slug: "/reference/python/signalwire/core/security/webhook-middleware" +title: "webhook_middleware" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.security.webhook_middleware" + parent: "signalwire.core.security" + module: "signalwire.core.security" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/webhook_middleware.py" +--- +# `webhook_middleware` + +FastAPI middleware / dependency for SignalWire webhook signature validation. + +Copyright (c) 2025 SignalWire. Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +This module ships a small, framework-aware adapter around +:func:`signalwire.core.security.webhook_validator.validate_webhook_signature`. + +Why a custom dependency rather than a vanilla `Depends` on `request.body()`? + +- We MUST capture the raw bytes BEFORE FastAPI's JSON parser consumes the + stream — re-serialization changes whitespace and key order, which breaks + the Scheme A digest. The dependency stashes the raw body on + `request.state.raw_body` so the downstream handler can re-parse without + re-reading the stream. +- Reverse-proxy / ngrok deployments need the URL the platform POSTed to, + which differs from the URL the SDK sees. The dependency honors + `X-Forwarded-Proto` / `X-Forwarded-Host` when `trust_proxy=True`, + plus the `SWML_PROXY_URL_BASE` env var, with `request.url` as last + resort. +- The legacy cXML/Compatibility scheme used the `X-Twilio-Signature` + header. We accept it as an alias of `X-SignalWire-Signature` so users + migrating from the legacy SDK can keep their callers unchanged. + +Usage:: + +``` +from signalwire.core.security.webhook_middleware import ( + make_webhook_validation_dependency, +) + +dep = make_webhook_validation_dependency(signing_key="PSK...") + +@app.post("/webhook", dependencies=[Depends(dep)]) +async def webhook(request: Request): + body = request.state.raw_body # bytes; re-parse if you need JSON +``` + +## Signature + +```python +module webhook_middleware +``` + +## Examples + +```python +from signalwire.core.security.webhook_middleware import ( + make_webhook_validation_dependency, +) + +dep = make_webhook_validation_dependency(signing_key="PSK...") + +@app.post("/webhook", dependencies=[Depends(dep)]) +async def webhook(request: Request): + body = request.state.raw_body # bytes; re-parse if you need JSON +``` + +## Properties + + + +## Constants + + + + + +## Functions + +### make\_webhook\_validation\_dependency + +Build a FastAPI dependency that enforces signature validation. + +The returned coroutine: + +1. Reads `await request.body()` and stashes the bytes on + `request.state.raw_body`. +2. Pulls the `X-SignalWire-Signature` header (or the Twilio alias). +3. Reconstructs the public URL (proxy headers / env / fallback). +4. Calls :func:`validate_webhook_signature`. +5. On invalid signature: raises `HTTPException(403)` to short-circuit + the handler. FastAPI's `dependencies=[Depends(...)]` only honors + short-circuiting via raised exceptions — returning a Response from a + dependency does not stop the endpoint. +6. On valid: returns `None` so the handler runs as normal. + +#### Signature + +```python +make_webhook_validation_dependency( + signing_key: str, + *, + trust_proxy: bool = False +) -> Callable[Request, Response, Awaitable[Optional[Response]]] +``` + +#### Parameters + + + The customer's Signing Key. Required, non-empty. + + + + If True, honor `X-Forwarded-Proto` / `X-Forwarded-Host` when reconstructing the URL. Default False — proxy headers are spoofable, so opt in only when you control the proxy. + + +#### Returns + +`Callable[Request, Response, Awaitable[Optional[Response]]]` — Async callable suitable for `Depends(...)`. + +#### Throws + +- `ValueError` — at construction time if `signing_key` is empty. + +#### Source + +[`signalwire/signalwire/core/security/webhook_middleware.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/webhook_middleware.py) + +Line 88. + +## Source + +[`signalwire/signalwire/core/security/webhook_middleware.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/webhook_middleware.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/security/webhook-validator/index.mdx b/fern/products/sdk-reference/python/signalwire/core/security/webhook-validator/index.mdx new file mode 100644 index 0000000000..bcc98787f1 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/security/webhook-validator/index.mdx @@ -0,0 +1,154 @@ +--- +slug: "/reference/python/signalwire/core/security/webhook-validator" +title: "webhook_validator" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.security.webhook_validator" + parent: "signalwire.core.security" + module: "signalwire.core.security" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/webhook_validator.py" +--- +# `webhook_validator` + +Webhook signature validation for SignalWire-signed HTTP requests. + +Copyright (c) 2025 SignalWire. Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +Implements both schemes from porting-sdk/webhooks.md: + +- Scheme A (RELAY/SWML/JSON): hex(HMAC-SHA1(key, url + raw\_body)) +- Scheme B (Compat/cXML form): base64(HMAC-SHA1(key, url + sortedFormParams)) + with optional bodySHA256 query-param fallback for JSON-on-compat-surface. + +> \[!NOTE] +> validate\_webhook\_signature(signing\_key, signature, url, raw\_body) -> bool +> validate\_request(signing\_key, signature, url, params\_or\_raw\_body) -> bool + +All comparisons use `hmac.compare_digest` (constant-time) so the secret +is not leaked over repeated requests. + +## Signature + +```python +module webhook_validator +``` + +## Properties + + + +## Functions + +### validate\_request + +Legacy `@signalwire/compatibility-api` drop-in entry point. + +If `params_or_raw_body` is a string, delegates to +:func:`validate_webhook_signature` (Scheme A then Scheme B with parsed form). + +If it's a mapping or a list of (key, value) tuples, treats it as +pre-parsed form params and runs Scheme B directly (with URL port +normalization and optional bodySHA256 fallback). + +#### Signature + +```python +validate_request( + signing_key: str, + signature: str, + url: str, + params_or_raw_body: Union[str, Mapping[str, Any], List[Tuple[str, Any]], None] +) -> bool +``` + +#### Parameters + + + Customer's Signing Key. Missing raises `ValueError`. + + + + Header value. Missing / empty returns False. + + + + Full URL SignalWire POSTed to. + + + + `str` raw body OR pre-parsed form params. + + +#### Returns + +`bool` — True on match, False otherwise. + +#### Throws + +- `ValueError` — when `signing_key` is missing. +- `TypeError` — when `params_or_raw_body` is neither a string nor a mapping/list (e.g. a parsed JSON dict-like that's been rejected). + +#### Source + +[`signalwire/signalwire/core/security/webhook_validator.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/webhook_validator.py) + +Line 268. + +*** + +### validate\_webhook\_signature + +Validate a SignalWire webhook signature against both schemes. + +#### Signature + +```python +validate_webhook_signature( + signing_key: str, + signature: str, + url: str, + raw_body: str +) -> bool +``` + +#### Parameters + + + Customer's Signing Key from the Dashboard. UTF-8 string, secret. `None` / empty raises `ValueError` — that's a programming error, not a validation failure. + + + + The `X-SignalWire-Signature` header value (or `X-Twilio-Signature` for cXML compat). Missing / empty returns False without raising. + + + + The full URL SignalWire POSTed to (scheme, host, optional port, path, query). Must match what the platform saw — see the `URL reconstruction` section of porting-sdk/webhooks.md. + + + + The raw request body bytes as a UTF-8 string, BEFORE any JSON / form parsing. Must be a `str` — passing a parsed dict raises `TypeError`. + + +#### Returns + +`bool` — True if the signature matches either Scheme A (hex JSON) or Scheme B (base64 form, with port-normalization variants and optional bodySHA256 fallback). False otherwise. + +#### Throws + +- `ValueError` — when `signing_key` is missing. +- `TypeError` — when `raw_body` is not a string. + +#### Source + +[`signalwire/signalwire/core/security/webhook_validator.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/webhook_validator.py) + +Line 198. + +## Source + +[`signalwire/signalwire/core/security/webhook_validator.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/webhook_validator.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/skill-base/index.mdx b/fern/products/sdk-reference/python/signalwire/core/skill-base/index.mdx new file mode 100644 index 0000000000..21232b5e6f --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/skill-base/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/signalwire/core/skill-base" +title: "skill_base" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.skill_base" + parent: "signalwire.core" + module: "signalwire.core" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py" +--- +# `skill_base` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module skill_base +``` + +## Classes + + + + Abstract base class for all agent skills + + + +## Source + +[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/skill-base/skill-base/index.mdx b/fern/products/sdk-reference/python/signalwire/core/skill-base/skill-base/index.mdx new file mode 100644 index 0000000000..6c58149de2 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/skill-base/skill-base/index.mdx @@ -0,0 +1,436 @@ +--- +slug: "/reference/python/signalwire/core/skill-base/skill-base" +title: "SkillBase" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.core.skill_base.SkillBase" + parent: "signalwire.core.skill_base" + module: "signalwire.core.skill_base" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py" +--- +# `SkillBase` + +Abstract base class for all agent skills + +## Signature + +```python +class SkillBase(ABC) +``` + +## Inheritance + +**Extends:** `ABC` + +## Properties + + + + + + + + + + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(agent: AgentBase, params: Optional[Dict[str, Any]] = None) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) + +Line 32. + +*** + +### cleanup + +Cleanup when skill is removed or agent shuts down + +#### Signature + +```python +cleanup() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) + +Line 99. + +*** + +### define\_tool + +Wrapper method that automatically includes swaig\_fields when defining tools. + +This method delegates to self.agent.define\_tool() but automatically merges +any swaig\_fields configured for this skill. Skills should use this method +instead of calling self.agent.define\_tool() directly. + +#### Signature + +```python +define_tool(**kwargs = {}) -> None +``` + +#### Parameters + + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) + +Line 58. + +*** + +### get\_global\_data + +Return data to add to agent's global context + +#### Signature + +```python +get_global_data() -> Dict[str, Any] +``` + +#### Returns + +`Dict[str, Any]` + +#### Source + +[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) + +Line 84. + +*** + +### get\_hints + +Return speech recognition hints for this skill + +#### Signature + +```python +get_hints() -> List[str] +``` + +#### Returns + +`List[str]` + +#### Source + +[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) + +Line 80. + +*** + +### get\_instance\_key + +Get the key used to track this skill instance + +For skills that support multiple instances (SUPPORTS\_MULTIPLE\_INSTANCES = True), +this method can be overridden to provide a unique key for each instance. + +Default implementation: + +- If SUPPORTS\_MULTIPLE\_INSTANCES is False: returns SKILL\_NAME +- If SUPPORTS\_MULTIPLE\_INSTANCES is True: returns SKILL\_NAME + "\_" + tool\_name + (where tool\_name comes from params\['tool\_name'] or defaults to the skill name) + +#### Signature + +```python +get_instance_key() -> str +``` + +#### Returns + +`str` — Unique key for this skill instance + +#### Source + +[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) + +Line 126. + +*** + +### get\_parameter\_schema + +Get the parameter schema for this skill + +This method returns metadata about all parameters the skill accepts, +including their types, descriptions, default values, and whether they +are required or should be hidden (e.g., API keys). + +The base implementation provides common parameters available to all skills. +Subclasses should override this method and merge their specific parameters +with the base schema. + +> \[!NOTE] +> \{ +> "tool\_name": \{ +> "type": "string", +> "description": "Name for the tool when using multiple instances", +> "default": "my\_skill", +> "required": False +> \}, +> "api\_key": \{ +> "type": "string", +> "description": "API key for the service", +> "required": True, +> "hidden": True, +> "env\_var": "MY\_API\_KEY" +> \} +> \} + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +get_parameter_schema() -> Dict[str, Dict[str, Any]] +``` + +#### Returns + +`Dict[str, Dict[str, Any]]` — Dict\[str, Dict\[str, Any]]: Parameter schema where keys are parameter names and values are dictionaries containing: + +#### Source + +[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) + +Line 197. + +*** + +### get\_prompt\_sections + +Return prompt sections to add to agent. +Returns empty list if skip\_prompt is set to True in params. + +#### Signature + +```python +get_prompt_sections() -> List[Dict[str, Any]] +``` + +#### Returns + +`List[Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) + +Line 88. + +*** + +### get\_skill\_data + +Read this skill instance's namespaced data from raw\_data global\_data. + +#### Signature + +```python +get_skill_data(raw_data: Dict[str, Any]) -> Dict[str, Any] +``` + +#### Parameters + + + The raw\_data dict passed to SWAIG function handlers, expected to contain a 'global\_data' key. + + +#### Returns + +`Dict[str, Any]` — The skill's namespaced state, or empty dict if not found. + +#### Source + +[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) + +Line 164. + +*** + +### register\_tools + +Register SWAIG tools with the agent + +**Modifiers:** `abstract` + +#### Signature + +```python +register_tools() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) + +Line 53. + +*** + +### setup + +Setup the skill (validate env vars, initialize APIs, etc.) +Returns True if setup successful, False otherwise + +**Modifiers:** `abstract` + +#### Signature + +```python +setup() -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) + +Line 45. + +*** + +### update\_skill\_data + +Write this skill instance's namespaced data into a FunctionResult. + +Wraps the data under the skill's namespace key and calls +result.update\_global\_data(). + +#### Signature + +```python +update_skill_data( + result: FunctionResult, + data: Dict[str, Any] +) -> FunctionResult +``` + +#### Parameters + + + The FunctionResult to add the global\_data update to. + + + + The skill state dict to store under the namespace. + + +#### Returns + +`FunctionResult` — The result, for method chaining. + +#### Source + +[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) + +Line 179. + +*** + +### validate\_env\_vars + +Check if all required environment variables are set + +#### Signature + +```python +validate_env_vars() -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) + +Line 103. + +*** + +### validate\_packages + +Check if all required packages are available + +#### Signature + +```python +validate_packages() -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) + +Line 112. + +## Source + +[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) + +Line 19. diff --git a/fern/products/sdk-reference/python/signalwire/core/skill-manager/index.mdx b/fern/products/sdk-reference/python/signalwire/core/skill-manager/index.mdx new file mode 100644 index 0000000000..71e79dea7a --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/skill-manager/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/signalwire/core/skill-manager" +title: "skill_manager" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.skill_manager" + parent: "signalwire.core" + module: "signalwire.core" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_manager.py" +--- +# `skill_manager` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module skill_manager +``` + +## Classes + + + + Manages loading and lifecycle of agent skills + + + +## Source + +[`signalwire/signalwire/core/skill_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_manager.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/skill-manager/skill-manager/index.mdx b/fern/products/sdk-reference/python/signalwire/core/skill-manager/skill-manager/index.mdx new file mode 100644 index 0000000000..a6f2f12ce7 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/skill-manager/skill-manager/index.mdx @@ -0,0 +1,203 @@ +--- +slug: "/reference/python/signalwire/core/skill-manager/skill-manager" +title: "SkillManager" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.core.skill_manager.SkillManager" + parent: "signalwire.core.skill_manager" + module: "signalwire.core.skill_manager" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_manager.py" +--- +# `SkillManager` + +Manages loading and lifecycle of agent skills + +## Signature + +```python +class SkillManager +``` + +## Properties + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(agent) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/core/skill_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_manager.py) + +Line 17. + +*** + +### get\_skill + +Get a loaded skill instance by identifier + +#### Signature + +```python +get_skill(skill_identifier: str) -> Optional[SkillBase] +``` + +#### Parameters + + + Either a skill name or an instance key + + +#### Returns + +`Optional[SkillBase]` — The skill instance if found, None otherwise + +#### Source + +[`signalwire/signalwire/core/skill_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_manager.py) + +Line 228. + +*** + +### has\_skill + +Check if skill is currently loaded + +#### Signature + +```python +has_skill(skill_identifier: str) -> bool +``` + +#### Parameters + + + Either a skill name or an instance key + + +#### Returns + +`bool` — True if loaded, False otherwise + +#### Source + +[`signalwire/signalwire/core/skill_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_manager.py) + +Line 212. + +*** + +### list\_loaded\_skills + +List instance keys of currently loaded skills + +#### Signature + +```python +list_loaded_skills() -> List[str] +``` + +#### Returns + +`List[str]` + +#### Source + +[`signalwire/signalwire/core/skill_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_manager.py) + +Line 208. + +*** + +### load\_skill + +Load and setup a skill by name + +#### Signature + +```python +load_skill( + skill_name: str, + skill_class: Type[SkillBase] = None, + params: Optional[Dict[str, Any]] = None +) -> tuple[bool, str] +``` + +#### Parameters + + + Name of the skill to load + + + + Optional skill class (if not provided, will try to find it) + + + + Optional parameters to pass to the skill + + +#### Returns + +`tuple[bool, str]` — (success, error\_message) - error\_message is empty string if successful + +#### Source + +[`signalwire/signalwire/core/skill_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_manager.py) + +Line 22. + +*** + +### unload\_skill + +Unload a skill and cleanup + +#### Signature + +```python +unload_skill(skill_identifier: str) -> bool +``` + +#### Parameters + + + Either a skill name or an instance key + + +#### Returns + +`bool` — True if successfully unloaded, False otherwise + +#### Source + +[`signalwire/signalwire/core/skill_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_manager.py) + +Line 176. + +## Source + +[`signalwire/signalwire/core/skill_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_manager.py) + +Line 14. diff --git a/fern/products/sdk-reference/python/signalwire/core/swaig-function/index.mdx b/fern/products/sdk-reference/python/signalwire/core/swaig-function/index.mdx new file mode 100644 index 0000000000..87a16ca4e1 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/swaig-function/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/signalwire/core/swaig-function" +title: "swaig_function" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.swaig_function" + parent: "signalwire.core" + module: "signalwire.core" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swaig_function.py" +--- +# `swaig_function` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module swaig_function +``` + +## Classes + + + + Represents a SWAIG function — i.e., a tool the AI model can call. + + + +## Source + +[`signalwire/signalwire/core/swaig_function.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swaig_function.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/swaig-function/swaig-function/index.mdx b/fern/products/sdk-reference/python/signalwire/core/swaig-function/swaig-function/index.mdx new file mode 100644 index 0000000000..dd12c1ca4e --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/swaig-function/swaig-function/index.mdx @@ -0,0 +1,302 @@ +--- +slug: "/reference/python/signalwire/core/swaig-function/swaig-function" +title: "SWAIGFunction" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.core.swaig_function.SWAIGFunction" + parent: "signalwire.core.swaig_function" + module: "signalwire.core.swaig_function" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swaig_function.py" +--- +# `SWAIGFunction` + +Represents a SWAIG function — i.e., a tool the AI model can call. + +A SWAIG function is exactly the same concept as a "tool" in native +OpenAI / Anthropic tool calling. Each SWAIGFunction is rendered into +the OpenAI tool schema format and sent to the model on every turn: + +``` +{"type": "function", "function": { + "name": self.name, + "description": self.description, + "parameters": self.parameters, +}} +``` + +The model parses `description` (and the `description` inside each +parameter) to decide WHEN to call the tool and HOW to fill in the +arguments. Both fields are prompt-engineered text — the quality of +your descriptions directly drives tool-selection accuracy. + +Use AgentBase.define\_tool() to create one (it builds the +SWAIGFunction for you and registers it). Use the @agent.tool() +decorator for the same thing in class-based agents. + +## Signature + +```python +class SWAIGFunction +``` + +## Examples + +```python +{"type": "function", "function": { + "name": self.name, + "description": self.description, + "parameters": self.parameters, +}} +``` + +## Properties + + + + + + + + + + + + + + + + + + + + + + + + + + + +## Methods + +### \_\_call\_\_ + +Call the underlying handler function + +#### Signature + +```python +__call__(*args = (), **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/core/swaig_function.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swaig_function.py) + +Line 133. + +*** + +### \_\_init\_\_ + +Initialize a new SWAIG function. + +#### Signature + +```python +__init__( + name: str, + handler: Callable, + description: str, + parameters: Dict[str, Dict] = None, + secure: bool = False, + fillers: Optional[Dict[str, List[str]]] = None, + wait_file: Optional[str] = None, + wait_file_loops: Optional[int] = None, + webhook_url: Optional[str] = None, + required: Optional[List[str]] = None, + is_typed_handler: bool = False, + **extra_swaig_fields = {} +) +``` + +#### Parameters + + + Function name. Becomes the `name` field in the OpenAI tool schema sent to the model — what the model emits when it decides to call this tool. + + + + Python callable invoked when the model calls this tool. + + + + LLM-facing description. The model reads this on every turn to decide whether to call the tool. Be specific about WHEN to use it and what makes it the right choice over sibling tools — vague descriptions are the most common cause of "model has the right tool but doesn't call it" failures. + + + + JSON Schema for the arguments. Per-property `description` strings inside the schema are also LLM-facing — write them as instructions to the model on how to fill in each argument. + + + + Whether this function requires SWAIG token validation. + + + + Optional dictionary of filler phrases by language code (deprecated, use wait\_file). + + + + Optional URL to audio file to play while function executes. + + + + Optional number of times to loop the wait\_file. + + + + Optional external webhook URL to use instead of local handling. + + + + Optional list of required parameter names. + + + + Whether the handler uses type-hinted parameters (auto-wrapped). + + + + +#### Source + +[`signalwire/signalwire/core/swaig_function.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swaig_function.py) + +Line 44. + +*** + +### execute + +Execute the function with the given arguments + +#### Signature + +```python +execute( + args: Dict[str, Any], + raw_data: Optional[Dict[str, Any]] = None +) -> Dict[str, Any] +``` + +#### Parameters + + + Parsed arguments for the function + + + + Optional raw request data + + +#### Returns + +`Dict[str, Any]` — Function result as a dictionary (from FunctionResult.to\_dict()) + +#### Source + +[`signalwire/signalwire/core/swaig_function.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swaig_function.py) + +Line 139. + +*** + +### to\_swaig + +Convert this function to a SWAIG-compatible JSON object for SWML + +#### Signature + +```python +to_swaig( + base_url: str, + token: Optional[str] = None, + call_id: Optional[str] = None, + include_auth: bool = True +) -> Dict[str, Any] +``` + +#### Parameters + + + Base URL for the webhook + + + + Optional auth token to include + + + + Optional call ID for session tracking + + + + Whether to include auth credentials in URL + + +#### Returns + +`Dict[str, Any]` — Dictionary representation for the SWAIG array in SWML + +#### Source + +[`signalwire/signalwire/core/swaig_function.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swaig_function.py) + +Line 234. + +*** + +### validate\_args + +Validate the arguments against the parameter schema. + +Uses jsonschema\_rs if available for fast validation, falls back to +jsonschema if available, otherwise skips validation. + +#### Signature + +```python +validate_args(args: Dict[str, Any]) -> tuple +``` + +#### Parameters + + + Arguments to validate + + +#### Returns + +`tuple` — Tuple of (is\_valid: bool, errors: list\[str]) If no validation library is available, returns (True, \[]) + +#### Source + +[`signalwire/signalwire/core/swaig_function.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swaig_function.py) + +Line 180. + +## Source + +[`signalwire/signalwire/core/swaig_function.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swaig_function.py) + +Line 21. diff --git a/fern/products/sdk-reference/python/signalwire/core/swml-builder/index.mdx b/fern/products/sdk-reference/python/signalwire/core/swml-builder/index.mdx new file mode 100644 index 0000000000..d395efd66e --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/swml-builder/index.mdx @@ -0,0 +1,44 @@ +--- +slug: "/reference/python/signalwire/core/swml-builder" +title: "swml_builder" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.swml_builder" + parent: "signalwire.core" + module: "signalwire.core" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_builder.py" +--- +# `swml_builder` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module swml_builder +``` + +## Constants + + + +## Classes + + + + Fluent builder for SWML documents + + + +## Source + +[`signalwire/signalwire/core/swml_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_builder.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/swml-builder/swml-builder/index.mdx b/fern/products/sdk-reference/python/signalwire/core/swml-builder/swml-builder/index.mdx new file mode 100644 index 0000000000..47ccf1f187 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/swml-builder/swml-builder/index.mdx @@ -0,0 +1,414 @@ +--- +slug: "/reference/python/signalwire/core/swml-builder/swml-builder" +title: "SWMLBuilder" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.core.swml_builder.SWMLBuilder" + parent: "signalwire.core.swml_builder" + module: "signalwire.core.swml_builder" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_builder.py" +--- +# `SWMLBuilder` + +Fluent builder for SWML documents + +This class provides a fluent interface for building SWML documents +by chaining method calls. It delegates to an underlying SWMLService +instance for the actual document creation. + +## Signature + +```python +class SWMLBuilder +``` + +## Properties + + + +## Methods + +### \_\_getattr\_\_ + +Dynamically generate and return SWML verb methods when accessed + +This method is called when an attribute lookup fails through the normal +mechanisms. It checks if the attribute name corresponds to a SWML verb +defined in the schema, and if so, dynamically creates a method for that verb. + +#### Signature + +```python +__getattr__(name: str) -> Any +``` + +#### Parameters + + + The name of the attribute being accessed + + +#### Returns + +`Any` — The dynamically created verb method if name is a valid SWML verb, otherwise raises AttributeError + +#### Throws + +- `AttributeError` — If name is not a valid SWML verb + +#### Source + +[`signalwire/signalwire/core/swml_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_builder.py) + +Line 326. + +*** + +### \_\_init\_\_ + +Initialize with a SWMLService instance + +#### Signature + +```python +__init__(service: SWMLService) +``` + +#### Parameters + + + The SWMLService to delegate to + + +#### Source + +[`signalwire/signalwire/core/swml_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_builder.py) + +Line 39. + +*** + +### add\_section + +Add a new section to the document + +#### Signature + +```python +add_section(section_name: str) -> Self +``` + +#### Parameters + + + Name of the section to add + + +#### Returns + +`Self` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/swml_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_builder.py) + +Line 206. + +*** + +### ai + +Add an 'ai' verb to the main section + +#### Signature + +```python +ai( + prompt_text: Optional[str] = None, + prompt_pom: Optional[List[Dict[str, Any]]] = None, + post_prompt: Optional[str] = None, + post_prompt_url: Optional[str] = None, + swaig: Optional[Dict[str, Any]] = None, + **kwargs = {} +) -> Self +``` + +#### Parameters + + + Text prompt for the AI (mutually exclusive with prompt\_pom) + + + + POM structure for the AI prompt (mutually exclusive with prompt\_text) + + + + Optional post-prompt text + + + + Optional URL for post-prompt processing + + + + Optional SWAIG configuration + + + + +#### Returns + +`Self` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/swml_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_builder.py) + +Line 89. + +*** + +### answer + +Add an 'answer' verb to the main section + +#### Signature + +```python +answer(max_duration: Optional[int] = None, codecs: Optional[str] = None) -> Self +``` + +#### Parameters + + + Maximum duration in seconds + + + + Comma-separated list of codecs + + +#### Returns + +`Self` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/swml_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_builder.py) + +Line 54. + +*** + +### build + +Build and return the SWML document + +#### Signature + +```python +build() -> Dict[str, Any] +``` + +#### Returns + +`Dict[str, Any]` — The complete SWML document as a dictionary + +#### Source + +[`signalwire/signalwire/core/swml_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_builder.py) + +Line 219. + +*** + +### hangup + +Add a 'hangup' verb to the main section + +#### Signature + +```python +hangup(reason: Optional[str] = None) -> Self +``` + +#### Parameters + + + Optional reason for hangup + + +#### Returns + +`Self` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/swml_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_builder.py) + +Line 73. + +*** + +### play + +Add a 'play' verb to the main section + +#### Signature + +```python +play( + url: Optional[str] = None, + urls: Optional[List[str]] = None, + volume: Optional[float] = None, + say_voice: Optional[str] = None, + say_language: Optional[str] = None, + say_gender: Optional[str] = None, + auto_answer: Optional[bool] = None +) -> Self +``` + +#### Parameters + + + Single URL to play (mutually exclusive with urls) + + + + List of URLs to play (mutually exclusive with url) + + + + Volume level (-40 to 40) + + + + Voice for text-to-speech + + + + Language for text-to-speech + + + + Gender for text-to-speech + + + + Whether to auto-answer the call + + +#### Returns + +`Self` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/swml_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_builder.py) + +Line 132. + +*** + +### render + +Build and render the SWML document as a JSON string + +#### Signature + +```python +render() -> str +``` + +#### Returns + +`str` — The complete SWML document as a JSON string + +#### Source + +[`signalwire/signalwire/core/swml_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_builder.py) + +Line 228. + +*** + +### reset + +Reset the document to an empty state + +#### Signature + +```python +reset() -> Self +``` + +#### Returns + +`Self` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/swml_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_builder.py) + +Line 237. + +*** + +### say + +Add a 'play' verb with say: prefix for text-to-speech + +#### Signature + +```python +say( + text: str, + voice: Optional[str] = None, + language: Optional[str] = None, + gender: Optional[str] = None, + volume: Optional[float] = None +) -> Self +``` + +#### Parameters + + + Text to speak + + + + Voice for text-to-speech + + + + Language for text-to-speech + + + + Gender for text-to-speech + + + + Volume level (-40 to 40) + + +#### Returns + +`Self` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/swml_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_builder.py) + +Line 178. + +## Source + +[`signalwire/signalwire/core/swml_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_builder.py) + +Line 30. diff --git a/fern/products/sdk-reference/python/signalwire/core/swml-handler/ai-verb-handler/index.mdx b/fern/products/sdk-reference/python/signalwire/core/swml-handler/ai-verb-handler/index.mdx new file mode 100644 index 0000000000..b48f51823f --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/swml-handler/ai-verb-handler/index.mdx @@ -0,0 +1,144 @@ +--- +slug: "/reference/python/signalwire/core/swml-handler/ai-verb-handler" +title: "AIVerbHandler" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.core.swml_handler.AIVerbHandler" + parent: "signalwire.core.swml_handler" + module: "signalwire.core.swml_handler" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_handler.py" +--- +# `AIVerbHandler` + +Handler for the SWML 'ai' verb + +The 'ai' verb is complex and requires specialized handling, particularly +for managing prompts, SWAIG functions, and AI configurations. + +## Signature + +```python +class AIVerbHandler(SWMLVerbHandler) +``` + +## Inheritance + +**Extends:** [SWMLVerbHandler](/docs/sdk-reference/reference/python/signalwire/core/swml-handler/swml-verb-handler) + +## Methods + +### build\_config + +Build a configuration for the AI verb + +#### Signature + +```python +build_config( + prompt_text: Optional[str] = None, + prompt_pom: Optional[List[Dict[str, Any]]] = None, + contexts: Optional[Dict[str, Any]] = None, + post_prompt: Optional[str] = None, + post_prompt_url: Optional[str] = None, + swaig: Optional[Dict[str, Any]] = None, + **kwargs = {} +) -> Dict[str, Any] +``` + +#### Parameters + + + Text prompt for the AI (mutually exclusive with prompt\_pom) + + + + POM structure for the AI prompt (mutually exclusive with prompt\_text) + + + + Optional contexts and steps configuration (can be combined with text or pom) + + + + Optional post-prompt text + + + + Optional URL for post-prompt processing + + + + Optional SWAIG configuration + + + + +#### Returns + +`Dict[str, Any]` — AI verb configuration dictionary + +#### Source + +[`signalwire/signalwire/core/swml_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_handler.py) + +Line 132. + +*** + +### get\_verb\_name + +Get the name of the verb this handler handles + +#### Signature + +```python +get_verb_name() -> str +``` + +#### Returns + +`str` — "ai" as the verb name + +#### Source + +[`signalwire/signalwire/core/swml_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_handler.py) + +Line 75. + +*** + +### validate\_config + +Validate the configuration for the AI verb + +#### Signature + +```python +validate_config(config: Dict[str, Any]) -> Tuple[bool, List[str]] +``` + +#### Parameters + + + The configuration dictionary for the AI verb + + +#### Returns + +`Tuple[bool, List[str]]` — (is\_valid, error\_messages) tuple + +#### Source + +[`signalwire/signalwire/core/swml_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_handler.py) + +Line 84. + +## Source + +[`signalwire/signalwire/core/swml_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_handler.py) + +Line 67. diff --git a/fern/products/sdk-reference/python/signalwire/core/swml-handler/index.mdx b/fern/products/sdk-reference/python/signalwire/core/swml-handler/index.mdx new file mode 100644 index 0000000000..db7ad0947a --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/swml-handler/index.mdx @@ -0,0 +1,48 @@ +--- +slug: "/reference/python/signalwire/core/swml-handler" +title: "swml_handler" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.swml_handler" + parent: "signalwire.core" + module: "signalwire.core" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_handler.py" +--- +# `swml_handler` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module swml_handler +``` + +## Classes + + + + Handler for the SWML 'ai' verb + + + + Base interface for SWML verb handlers + + + + Registry for SWML verb handlers + + + +## Source + +[`signalwire/signalwire/core/swml_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_handler.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/swml-handler/swml-verb-handler/index.mdx b/fern/products/sdk-reference/python/signalwire/core/swml-handler/swml-verb-handler/index.mdx new file mode 100644 index 0000000000..db38133f3f --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/swml-handler/swml-verb-handler/index.mdx @@ -0,0 +1,119 @@ +--- +slug: "/reference/python/signalwire/core/swml-handler/swml-verb-handler" +title: "SWMLVerbHandler" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.core.swml_handler.SWMLVerbHandler" + parent: "signalwire.core.swml_handler" + module: "signalwire.core.swml_handler" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_handler.py" +--- +# `SWMLVerbHandler` + +Base interface for SWML verb handlers + +This abstract class defines the interface that all SWML verb handlers +must implement. Verb handlers provide specialized logic for complex +SWML verbs that cannot be handled generically. + +## Signature + +```python +class SWMLVerbHandler(ABC) +``` + +## Inheritance + +**Extends:** `ABC` + +## Methods + +### build\_config + +Build a configuration for this verb from the provided arguments + +**Modifiers:** `abstract` + +#### Signature + +```python +build_config(**kwargs = {}) -> Dict[str, Any] +``` + +#### Parameters + + + +#### Returns + +`Dict[str, Any]` — Configuration dictionary + +#### Source + +[`signalwire/signalwire/core/swml_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_handler.py) + +Line 53. + +*** + +### get\_verb\_name + +Get the name of the verb this handler handles + +**Modifiers:** `abstract` + +#### Signature + +```python +get_verb_name() -> str +``` + +#### Returns + +`str` — The verb name as a string + +#### Source + +[`signalwire/signalwire/core/swml_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_handler.py) + +Line 30. + +*** + +### validate\_config + +Validate the configuration for this verb + +**Modifiers:** `abstract` + +#### Signature + +```python +validate_config(config: Dict[str, Any]) -> Tuple[bool, List[str]] +``` + +#### Parameters + + + The configuration dictionary for this verb + + +#### Returns + +`Tuple[bool, List[str]]` — (is\_valid, error\_messages) tuple + +#### Source + +[`signalwire/signalwire/core/swml_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_handler.py) + +Line 40. + +## Source + +[`signalwire/signalwire/core/swml_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_handler.py) + +Line 21. diff --git a/fern/products/sdk-reference/python/signalwire/core/swml-handler/verb-handler-registry/index.mdx b/fern/products/sdk-reference/python/signalwire/core/swml-handler/verb-handler-registry/index.mdx new file mode 100644 index 0000000000..fdcdf78396 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/swml-handler/verb-handler-registry/index.mdx @@ -0,0 +1,134 @@ +--- +slug: "/reference/python/signalwire/core/swml-handler/verb-handler-registry" +title: "VerbHandlerRegistry" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.core.swml_handler.VerbHandlerRegistry" + parent: "signalwire.core.swml_handler" + module: "signalwire.core.swml_handler" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_handler.py" +--- +# `VerbHandlerRegistry` + +Registry for SWML verb handlers + +This class maintains a registry of handlers for special SWML verbs +and provides methods for accessing and using them. + +## Signature + +```python +class VerbHandlerRegistry +``` + +## Methods + +### \_\_init\_\_ + +Initialize the registry with default handlers + +#### Signature + +```python +__init__() +``` + +#### Source + +[`signalwire/signalwire/core/swml_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_handler.py) + +Line 218. + +*** + +### get\_handler + +Get the handler for a specific verb + +#### Signature + +```python +get_handler(verb_name: str) -> Optional[SWMLVerbHandler] +``` + +#### Parameters + + + The name of the verb + + +#### Returns + +`Optional[SWMLVerbHandler]` — The handler if found, None otherwise + +#### Source + +[`signalwire/signalwire/core/swml_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_handler.py) + +Line 235. + +*** + +### has\_handler + +Check if a handler exists for a specific verb + +#### Signature + +```python +has_handler(verb_name: str) -> bool +``` + +#### Parameters + + + The name of the verb + + +#### Returns + +`bool` — True if a handler exists, False otherwise + +#### Source + +[`signalwire/signalwire/core/swml_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_handler.py) + +Line 247. + +*** + +### register\_handler + +Register a new verb handler + +#### Signature + +```python +register_handler(handler: SWMLVerbHandler) -> None +``` + +#### Parameters + + + The handler to register + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/core/swml_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_handler.py) + +Line 225. + +## Source + +[`signalwire/signalwire/core/swml_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_handler.py) + +Line 210. diff --git a/fern/products/sdk-reference/python/signalwire/core/swml-renderer/index.mdx b/fern/products/sdk-reference/python/signalwire/core/swml-renderer/index.mdx new file mode 100644 index 0000000000..c2fcdca3a1 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/swml-renderer/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/signalwire/core/swml-renderer" +title: "swml_renderer" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.swml_renderer" + parent: "signalwire.core" + module: "signalwire.core" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_renderer.py" +--- +# `swml_renderer` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module swml_renderer +``` + +## Classes + + + + Renders SWML documents for SignalWire AI Agents with AI and SWAIG components + + + +## Source + +[`signalwire/signalwire/core/swml_renderer.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_renderer.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/swml-renderer/swml-renderer/index.mdx b/fern/products/sdk-reference/python/signalwire/core/swml-renderer/swml-renderer/index.mdx new file mode 100644 index 0000000000..74e71a97a4 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/swml-renderer/swml-renderer/index.mdx @@ -0,0 +1,182 @@ +--- +slug: "/reference/python/signalwire/core/swml-renderer/swml-renderer" +title: "SwmlRenderer" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.core.swml_renderer.SwmlRenderer" + parent: "signalwire.core.swml_renderer" + module: "signalwire.core.swml_renderer" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_renderer.py" +--- +# `SwmlRenderer` + +Renders SWML documents for SignalWire AI Agents with AI and SWAIG components + +This class provides methods for rendering SWML documents using the SWMLService architecture. + +## Signature + +```python +class SwmlRenderer +``` + +## Methods + +### render\_function\_response\_swml + +Generate a SWML document for a function response + +**Modifiers:** `static` + +#### Signature + +```python +@staticmethod +render_function_response_swml( + response_text: str, + service: SWMLService, + actions: Optional[List[Dict[str, Any]]] = None, + format: str = 'json' +) -> str +``` + +#### Parameters + + + Text response to include in the document + + + + SWMLService instance to use + + + + Optional list of actions to perform + + + + Output format (json or yaml) + + +#### Returns + +`str` — SWML document as a string + +#### Source + +[`signalwire/signalwire/core/swml_renderer.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_renderer.py) + +Line 150. + +*** + +### render\_swml + +Generate a complete SWML document with AI configuration + +**Modifiers:** `static` + +#### Signature + +```python +@staticmethod +render_swml( + prompt: Union[str, List[Dict[str, Any]]], + service: SWMLService, + post_prompt: Optional[str] = None, + post_prompt_url: Optional[str] = None, + swaig_functions: Optional[List[Dict[str, Any]]] = None, + startup_hook_url: Optional[str] = None, + hangup_hook_url: Optional[str] = None, + prompt_is_pom: bool = False, + params: Optional[Dict[str, Any]] = None, + add_answer: bool = False, + record_call: bool = False, + record_format: str = 'mp4', + record_stereo: bool = True, + format: str = 'json', + default_webhook_url: Optional[str] = None +) -> str +``` + +#### Parameters + + + AI prompt text or POM structure + + + + SWMLService instance to use for document building + + + + Optional post-prompt text + + + + Optional post-prompt URL + + + + List of SWAIG function definitions + + + + Optional startup hook URL + + + + Optional hangup hook URL + + + + Whether prompt is POM format + + + + Additional AI verb parameters + + + + Whether to add answer verb + + + + Whether to add record\_call verb + + + + Recording format + + + + Whether to record in stereo + + + + Output format (json or yaml) + + + + Default webhook URL for SWAIG functions + + +#### Returns + +`str` — SWML document as a string + +#### Source + +[`signalwire/signalwire/core/swml_renderer.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_renderer.py) + +Line 28. + +## Source + +[`signalwire/signalwire/core/swml_renderer.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_renderer.py) + +Line 21. diff --git a/fern/products/sdk-reference/python/signalwire/core/swml-service/index.mdx b/fern/products/sdk-reference/python/signalwire/core/swml-service/index.mdx new file mode 100644 index 0000000000..9dc4bc9a00 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/swml-service/index.mdx @@ -0,0 +1,48 @@ +--- +slug: "/reference/python/signalwire/core/swml-service" +title: "swml_service" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.swml_service" + parent: "signalwire.core" + module: "signalwire.core" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py" +--- +# `swml_service` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module swml_service +``` + +## Properties + + + +## Constants + + + +## Classes + + + + Base class for creating and serving SWML documents. + + + +## Source + +[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/swml-service/swml-service/index.mdx b/fern/products/sdk-reference/python/signalwire/core/swml-service/swml-service/index.mdx new file mode 100644 index 0000000000..450c5d60eb --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/core/swml-service/swml-service/index.mdx @@ -0,0 +1,639 @@ +--- +slug: "/reference/python/signalwire/core/swml-service/swml-service" +title: "SWMLService" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.core.swml_service.SWMLService" + parent: "signalwire.core.swml_service" + module: "signalwire.core.swml_service" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py" +--- +# `SWMLService` + +Base class for creating and serving SWML documents. + +This class provides core functionality for: + +- Loading and validating SWML schema +- Creating SWML documents +- Setting up web endpoints for serving SWML +- Managing authentication +- Registering SWML functions + +It serves as the foundation for more specialized services like AgentBase. + +## Signature + +```python +class SWMLService(ToolMixin) +``` + +## Inheritance + +**Extends:** [ToolMixin](/docs/sdk-reference/reference/python/signalwire/core/mixins/tool-mixin/tool-mixin) + +## Properties + + + + + Check if full JSON Schema validation is enabled. + + + + + + + + + + + + + + + + + + + + + + + + +## Methods + +### \_\_getattr\_\_ + +Dynamically generate and return SWML verb methods when accessed + +This method is called when an attribute lookup fails through the normal +mechanisms. It checks if the attribute name corresponds to a SWML verb +defined in the schema, and if so, dynamically creates a method for that verb. + +#### Signature + +```python +__getattr__(name: str) -> Any +``` + +#### Parameters + + + The name of the attribute being accessed + + +#### Returns + +`Any` — The dynamically created verb method if name is a valid SWML verb, otherwise raises AttributeError + +#### Throws + +- `AttributeError` — If name is not a valid SWML verb + +#### Source + +[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) + +Line 256. + +*** + +### \_\_init\_\_ + +Initialize a new SWML service + +#### Signature + +```python +__init__( + name: str, + route: str = '/', + host: str = '0.0.0.0', + port: Optional[int] = None, + basic_auth: Optional[Tuple[str, str]] = None, + schema_path: Optional[str] = None, + config_file: Optional[str] = None, + schema_validation: bool = True +) +``` + +#### Parameters + + + Service name/identifier + + + + HTTP route path for this service + + + + Host to bind the web server to + + + + Port to bind the web server to + + + + Optional (username, password) tuple for basic auth + + + + Optional path to the schema file + + + + Optional path to configuration file + + + + Enable schema validation. Default True. Can also be disabled via SWML\_SKIP\_SCHEMA\_VALIDATION=1 env var. + + +#### Source + +[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) + +Line 70. + +*** + +### add\_section + +Add a new section to the document + +#### Signature + +```python +add_section(section_name: str) -> bool +``` + +#### Parameters + + + Name of the section to add + + +#### Returns + +`bool` — True if the section was added, False if it already exists + +#### Source + +[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) + +Line 473. + +*** + +### add\_verb + +Add a verb to the main section of the current document + +#### Signature + +```python +add_verb(verb_name: str, config: Union[Dict[str, Any], int]) -> bool +``` + +#### Parameters + + + The name of the verb to add + + + + Configuration for the verb or direct value for certain verbs (e.g., sleep) + + +#### Returns + +`bool` — True if the verb was added successfully, False otherwise + +#### Source + +[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) + +Line 433. + +*** + +### add\_verb\_to\_section + +Add a verb to a specific section + +#### Signature + +```python +add_verb_to_section( + section_name: str, + verb_name: str, + config: Union[Dict[str, Any], int] +) -> bool +``` + +#### Parameters + + + Name of the section to add to + + + + The name of the verb to add + + + + Configuration for the verb or direct value for certain verbs (e.g., sleep) + + +#### Returns + +`bool` — True if the verb was added successfully, False otherwise + +#### Source + +[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) + +Line 489. + +*** + +### as\_router + +Create a FastAPI router for this service + +#### Signature + +```python +as_router() -> APIRouter +``` + +#### Returns + +`APIRouter` — FastAPI router + +#### Source + +[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) + +Line 561. + +*** + +### extract\_sip\_username + +Extract SIP username from request body + +This extracts the username portion of a SIP URI from the 'to' field +in the call data of a request body. + +**Modifiers:** `static` + +#### Signature + +```python +@staticmethod +extract_sip_username(request_body: Dict[str, Any]) -> Optional[str] +``` + +#### Parameters + + + The parsed JSON body of the request + + +#### Returns + +`Optional[str]` — The extracted SIP username, or None if not found + +#### Source + +[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) + +Line 821. + +*** + +### get\_basic\_auth\_credentials + +Get the basic auth credentials + +#### Signature + +```python +get_basic_auth_credentials( + include_source: bool = False +) -> Union[Tuple[str, str], Tuple[str, str, str]] +``` + +#### Parameters + + + Whether to include the source of the credentials + + +#### Returns + +`Union[Tuple[str, str], Tuple[str, str, str]]` — (username, password) tuple or (username, password, source) tuple if include\_source is True + +#### Source + +[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) + +Line 1133. + +*** + +### get\_document + +Get the current SWML document + +#### Signature + +```python +get_document() -> Dict[str, Any] +``` + +#### Returns + +`Dict[str, Any]` — The current SWML document as a dictionary + +#### Source + +[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) + +Line 534. + +*** + +### manual\_set\_proxy\_url + +Manually set the proxy URL base for webhook callbacks + +This can be called at runtime to set or update the proxy URL + +#### Signature + +```python +manual_set_proxy_url(proxy_url: str) -> None +``` + +#### Parameters + + + The base URL to use for webhooks (e.g., https://example.ngrok.io) + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) + +Line 1399. + +*** + +### on\_request + +Called when SWML is requested, with request data when available + +Subclasses can override this to inspect or modify SWML based on the request + +#### Signature + +```python +on_request( + request_data: Optional[dict] = None, + callback_path: Optional[str] = None +) -> Optional[dict] +``` + +#### Parameters + + + Optional dictionary containing the parsed POST body + + + + Optional callback path + + +#### Returns + +`Optional[dict]` — Optional dict to modify/augment the SWML document + +#### Source + +[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) + +Line 941. + +*** + +### register\_routing\_callback + +Register a callback function that will be called to determine routing +based on POST data. + +When a routing callback is registered, an endpoint at the specified path is automatically +created that will handle requests. This endpoint will use the callback to +determine if the request should be processed by this service or redirected. + +The callback should take a request object and request body dictionary and return: + +- A route string if it should be routed to a different endpoint +- None if normal processing should continue + +#### Signature + +```python +register_routing_callback( + callback_fn: Callable[Request, Dict[str, Any], Optional[str]], + path: str = '/sip' +) -> None +``` + +#### Parameters + + + The callback function to register + + + + The path where this callback should be registered (default: "/sip") + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) + +Line 795. + +*** + +### register\_verb\_handler + +Register a custom verb handler + +#### Signature + +```python +register_verb_handler(handler: SWMLVerbHandler) -> None +``` + +#### Parameters + + + The verb handler to register + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) + +Line 552. + +*** + +### render\_document + +Render the current SWML document as a JSON string + +#### Signature + +```python +render_document() -> str +``` + +#### Returns + +`str` — The current SWML document as a JSON string + +#### Source + +[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) + +Line 543. + +*** + +### reset\_document + +Reset the current document to an empty state + +#### Signature + +```python +reset_document() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) + +Line 427. + +*** + +### serve + +Start a web server for this service + +#### Signature + +```python +serve( + host: Optional[str] = None, + port: Optional[int] = None, + ssl_cert: Optional[str] = None, + ssl_key: Optional[str] = None, + ssl_enabled: Optional[bool] = None, + domain: Optional[str] = None +) -> None +``` + +#### Parameters + + + Host to bind to (defaults to self.host) + + + + Port to bind to (defaults to self.port) + + + + Path to SSL certificate file + + + + Path to SSL key file + + + + Whether to enable SSL + + + + Domain name for SSL certificate + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) + +Line 957. + +*** + +### stop + +Stop the web server + +#### Signature + +```python +stop() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) + +Line 1098. + +## Source + +[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) + +Line 56. diff --git a/fern/products/sdk-reference/python/signalwire/index.mdx b/fern/products/sdk-reference/python/signalwire/index.mdx new file mode 100644 index 0000000000..4b1372e213 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/index.mdx @@ -0,0 +1,245 @@ +--- +slug: "/reference/python/signalwire" +title: "signalwire" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/__init__.py" +--- +# `signalwire` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module signalwire +``` + +## Properties + + + + + +## Modules + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + SignalWire RELAY client — real-time call control over WebSocket. + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + +## Functions + +### add\_skill\_directory + +Add a directory to search for skills + +This allows third-party skill collections to be registered by path. +Skills in these directories should follow the same structure as built-in skills. + +> \[!NOTE] +> +> > > > add\_skill\_directory('/opt/custom\_skills') +> > > > +> > > > ### Now agent.add\_skill('my\_custom\_skill') will search in this directory + +#### Signature + +```python +add_skill_directory(path) +``` + +#### Parameters + + + Path to directory containing skill subdirectories + + +#### Source + +[`signalwire/signalwire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/__init__.py) + +Line 98. + +*** + +### list\_skills + +List all available skills with metadata. + +Returns one dict per skill (name, description, version, required packages / +env vars, multi-instance support). Delegates to the skill registry — the +same source as `list_skills_with_params()`, but the lighter summary. + +#### Signature + +```python +list_skills() +``` + +#### Source + +[`signalwire/signalwire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/__init__.py) + +Line 45. + +*** + +### list\_skills\_with\_params + +Get complete schema for all available skills including parameter metadata + +This function returns a comprehensive schema for all available skills, +including their metadata and parameter definitions. This is useful for +GUI configuration tools, API documentation, or programmatic skill discovery. + +> \[!NOTE] +> +> > > > schema = list\_skills\_with\_params() +> > > > print(schema\['web\_search']\['parameters']\['api\_key']) +> > > > \{ +> > > > 'type': 'string', +> > > > 'description': 'Google Custom Search API key', +> > > > 'required': True, +> > > > 'hidden': True, +> > > > 'env\_var': 'GOOGLE\_SEARCH\_API\_KEY' +> > > > \} + +#### Signature + +```python +list_skills_with_params() +``` + +#### Returns + +Dict\[str, Dict\[str, Any]]: Complete skill schema where keys are skill names + +#### Source + +[`signalwire/signalwire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/__init__.py) + +Line 54. + +*** + +### register\_skill + +Register a custom skill class + +This allows third-party code to register skill classes directly without +requiring them to be in a specific directory structure. + +> \[!NOTE] +> +> > > > from my\_custom\_skills import MyWeatherSkill +> > > > register\_skill(MyWeatherSkill) +> > > > +> > > > ### Now you can use it in agents: +> > > > +> > > > agent.add\_skill('my\_weather') + +#### Signature + +```python +register_skill(skill_class) +``` + +#### Parameters + + + A class that inherits from SkillBase + + +#### Source + +[`signalwire/signalwire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/__init__.py) + +Line 79. + +*** + +### RestClient + +Create a SignalWire REST API client (lazy import) + +#### Signature + +```python +RestClient(*args = (), **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/__init__.py) + +Line 115. + +## Source + +[`signalwire/signalwire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/livewire/agent-handoff/index.mdx b/fern/products/sdk-reference/python/signalwire/livewire/agent-handoff/index.mdx new file mode 100644 index 0000000000..fc553469bb --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/livewire/agent-handoff/index.mdx @@ -0,0 +1,57 @@ +--- +slug: "/reference/python/signalwire/livewire/agent-handoff" +title: "AgentHandoff" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.livewire.AgentHandoff" + parent: "signalwire.livewire" + module: "signalwire.livewire" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py" +--- +# `AgentHandoff` + +Signals a handoff to another agent in multi-agent scenarios. + +## Signature + +```python +class AgentHandoff +``` + +## Properties + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(agent, *, returns = None) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 153. + +## Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 150. diff --git a/fern/products/sdk-reference/python/signalwire/livewire/agent-server/index.mdx b/fern/products/sdk-reference/python/signalwire/livewire/agent-server/index.mdx new file mode 100644 index 0000000000..295efb1f64 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/livewire/agent-server/index.mdx @@ -0,0 +1,90 @@ +--- +slug: "/reference/python/signalwire/livewire/agent-server" +title: "AgentServer" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.livewire.AgentServer" + parent: "signalwire.livewire" + module: "signalwire.livewire" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py" +--- +# `AgentServer` + +Mirrors a livekit AgentServer -- registers entrypoints and starts. + +## Signature + +```python +class AgentServer +``` + +## Properties + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(**kwargs = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 686. + +*** + +### rtc\_session + +Decorator that registers the session entrypoint. + +#### Signature + +```python +rtc_session( + func = None, + *, + agent_name: str = '', + type: str = 'room', + on_request = None, + on_session_end = None +) +``` + +#### Parameters + + + + + + + + + + + +#### Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 691. + +## Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 683. diff --git a/fern/products/sdk-reference/python/signalwire/livewire/agent-session/index.mdx b/fern/products/sdk-reference/python/signalwire/livewire/agent-session/index.mdx new file mode 100644 index 0000000000..7343ca0a06 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/livewire/agent-session/index.mdx @@ -0,0 +1,211 @@ +--- +slug: "/reference/python/signalwire/livewire/agent-session" +title: "AgentSession" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.livewire.AgentSession" + parent: "signalwire.livewire" + module: "signalwire.livewire" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py" +--- +# `AgentSession` + +Mirrors a livekit AgentSession -- orchestrator that binds an Agent +to the SignalWire platform. + +## Signature + +```python +class AgentSession +``` + +## Properties + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + *, + stt: Any = None, + tts: Any = None, + llm: Any = None, + vad: Any = None, + turn_detection: Any = None, + tools: Optional[List[Any]] = None, + mcp_servers: Any = None, + userdata: Any = None, + allow_interruptions: bool = True, + min_interruption_duration: float = 0.5, + min_endpointing_delay: float = 0.5, + max_endpointing_delay: float = 3.0, + max_tool_steps: int = 3, + preemptive_generation: bool = False +) +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#### Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 407. + +*** + +### generate\_reply + +Trigger the agent to generate a reply. On SignalWire the prompt +handles this; if _instructions_ is provided they are noted. + +#### Signature + +```python +generate_reply(*, instructions: Optional[str] = None) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 514. + +*** + +### interrupt + +Noop -- SignalWire handles barge-in automatically. + +#### Signature + +```python +interrupt() +``` + +#### Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 520. + +*** + +### say + +Queue text to be spoken by the agent. + +#### Signature + +```python +say(text: str) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 510. + +*** + +### start + +Bind to an Agent and prepare the underlying SignalWire AgentBase. + +**Modifiers:** `async` + +#### Signature + +```python +async start(agent: Agent, *, room = None, record: bool = False) +``` + +#### Parameters + + + + + + + +#### Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 504. + +*** + +### update\_agent + +Swap in a new Agent. + +#### Signature + +```python +update_agent(agent: Agent) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 528. + +## Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 403. diff --git a/fern/products/sdk-reference/python/signalwire/livewire/agent/index.mdx b/fern/products/sdk-reference/python/signalwire/livewire/agent/index.mdx new file mode 100644 index 0000000000..febd6f84a1 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/livewire/agent/index.mdx @@ -0,0 +1,285 @@ +--- +slug: "/reference/python/signalwire/livewire/agent" +title: "Agent" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.livewire.Agent" + parent: "signalwire.livewire" + module: "signalwire.livewire" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py" +--- +# `Agent` + +Mirrors a livekit Agent -- holds instructions and tool definitions. + +## Signature + +```python +class Agent +``` + +## Properties + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + *, + instructions: str = '', + tools: Optional[List[Any]] = None, + chat_ctx: Any = NOT_GIVEN, + stt: Any = NOT_GIVEN, + tts: Any = NOT_GIVEN, + llm: Any = NOT_GIVEN, + vad: Any = NOT_GIVEN, + turn_detection: Any = NOT_GIVEN, + mcp_servers: Any = NOT_GIVEN, + allow_interruptions: Any = NOT_GIVEN, + min_endpointing_delay: Any = NOT_GIVEN, + max_endpointing_delay: Any = NOT_GIVEN +) +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + + + +#### Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 274. + +*** + +### llm\_node + +Noop -- SignalWire handles LLM in its control plane. + +**Modifiers:** `async` + +#### Signature + +```python +async llm_node(chat_ctx = None, tools = None, model_settings = None) +``` + +#### Parameters + + + + + + + +#### Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 370. + +*** + +### on\_enter + +Called when the agent enters. Override in subclass. + +**Modifiers:** `async` + +#### Signature + +```python +async on_enter() +``` + +#### Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 346. + +*** + +### on\_exit + +Called when the agent exits. Override in subclass. + +**Modifiers:** `async` + +#### Signature + +```python +async on_exit() +``` + +#### Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 350. + +*** + +### on\_user\_turn\_completed + +Called when the user finishes speaking. Override in subclass. + +**Modifiers:** `async` + +#### Signature + +```python +async on_user_turn_completed(turn_ctx = None, new_message = None) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 354. + +*** + +### stt\_node + +Noop -- SignalWire handles STT in its control plane. + +**Modifiers:** `async` + +#### Signature + +```python +async stt_node(audio = None, model_settings = None) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 362. + +*** + +### tts\_node + +Noop -- SignalWire handles TTS in its control plane. + +**Modifiers:** `async` + +#### Signature + +```python +async tts_node(text = None, model_settings = None) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 378. + +*** + +### update\_instructions + +Update the agent's instructions mid-session. + +**Modifiers:** `async` + +#### Signature + +```python +async update_instructions(instructions: str) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 390. + +*** + +### update\_tools + +Update the agent's tool list mid-session. + +**Modifiers:** `async` + +#### Signature + +```python +async update_tools(tools: List[Any]) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 394. + +## Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 271. diff --git a/fern/products/sdk-reference/python/signalwire/livewire/chat-context/index.mdx b/fern/products/sdk-reference/python/signalwire/livewire/chat-context/index.mdx new file mode 100644 index 0000000000..afd0ae8865 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/livewire/chat-context/index.mdx @@ -0,0 +1,71 @@ +--- +slug: "/reference/python/signalwire/livewire/chat-context" +title: "ChatContext" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.livewire.ChatContext" + parent: "signalwire.livewire" + module: "signalwire.livewire" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py" +--- +# `ChatContext` + +Minimal stub mirroring livekit ChatContext. + +## Signature + +```python +class ChatContext +``` + +## Properties + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__() +``` + +#### Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 165. + +*** + +### append + +#### Signature + +```python +append(*, role: str = 'user', text: str = '') +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 168. + +## Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 162. diff --git a/fern/products/sdk-reference/python/signalwire/livewire/index.mdx b/fern/products/sdk-reference/python/signalwire/livewire/index.mdx new file mode 100644 index 0000000000..9979a91fd6 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/livewire/index.mdx @@ -0,0 +1,179 @@ +--- +slug: "/reference/python/signalwire/livewire" +title: "livewire" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.livewire" + parent: "signalwire" + module: "signalwire" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py" +--- +# `livewire` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module livewire +``` + +## Properties + + + + + + + + + + + +## Constants + + + + + + + +## Classes + + + + Mirrors a livekit Agent -- holds instructions and tool definitions. + + + + Signals a handoff to another agent in multi-agent scenarios. + + + + Mirrors a livekit AgentServer -- registers entrypoints and starts. + + + + Mirrors a livekit AgentSession -- orchestrator that binds an Agent to the SignalWire platform. + + + + Minimal stub mirroring livekit ChatContext. + + + + Stub for livekit inference.LLM. + + + + Stub for livekit inference.STT. + + + + Stub for livekit inference.TTS. + + + + Mirrors a livekit JobContext -- provides room and connection info. + + + + Mirrors a livekit JobProcess -- used for prewarm/setup. + + + + Stub -- SignalWire doesn't use the LiveKit room abstraction. + + + + Mirrors livekit RunContext -- available inside tool handlers. + + + + Signals that a tool should not trigger another LLM reply. + + + + Signals a tool execution error. + + + +## Modules + + + + Copyright (c) 2025 SignalWire + + + +## Functions + +### function\_tool + +Mirrors the livekit `@function_tool` decorator. + +Wraps a plain function so it can be passed into `Agent(tools=[...])`. +Parameters are extracted from type-hints; the docstring is used as the +description when _description_ is not provided explicitly. + +#### Signature + +```python +function_tool( + func = None, + *, + name: Optional[str] = None, + description: Optional[str] = None +) +``` + +#### Parameters + + + + + + + +#### Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 177. + +*** + +### run\_app + +Print banner, print a random tip, run the agent. + +This is the main entry point -- mirrors `livekit.agents.cli.run_app`. + +#### Signature + +```python +run_app(server: AgentServer) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 799. + +## Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/livewire/inference-llm/index.mdx b/fern/products/sdk-reference/python/signalwire/livewire/inference-llm/index.mdx new file mode 100644 index 0000000000..8271745f8b --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/livewire/inference-llm/index.mdx @@ -0,0 +1,55 @@ +--- +slug: "/reference/python/signalwire/livewire/inference-llm" +title: "InferenceLLM" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.livewire.InferenceLLM" + parent: "signalwire.livewire" + module: "signalwire.livewire" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py" +--- +# `InferenceLLM` + +Stub for livekit inference.LLM. + +## Signature + +```python +class InferenceLLM +``` + +## Properties + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(model: str = '', **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 751. + +## Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 748. diff --git a/fern/products/sdk-reference/python/signalwire/livewire/inference-stt/index.mdx b/fern/products/sdk-reference/python/signalwire/livewire/inference-stt/index.mdx new file mode 100644 index 0000000000..dc71d468bb --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/livewire/inference-stt/index.mdx @@ -0,0 +1,55 @@ +--- +slug: "/reference/python/signalwire/livewire/inference-stt" +title: "InferenceSTT" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.livewire.InferenceSTT" + parent: "signalwire.livewire" + module: "signalwire.livewire" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py" +--- +# `InferenceSTT` + +Stub for livekit inference.STT. + +## Signature + +```python +class InferenceSTT +``` + +## Properties + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(model: str = '', **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 739. + +## Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 736. diff --git a/fern/products/sdk-reference/python/signalwire/livewire/inference-tts/index.mdx b/fern/products/sdk-reference/python/signalwire/livewire/inference-tts/index.mdx new file mode 100644 index 0000000000..74d87d0f2e --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/livewire/inference-tts/index.mdx @@ -0,0 +1,55 @@ +--- +slug: "/reference/python/signalwire/livewire/inference-tts" +title: "InferenceTTS" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.livewire.InferenceTTS" + parent: "signalwire.livewire" + module: "signalwire.livewire" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py" +--- +# `InferenceTTS` + +Stub for livekit inference.TTS. + +## Signature + +```python +class InferenceTTS +``` + +## Properties + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(model: str = '', **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 758. + +## Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 755. diff --git a/fern/products/sdk-reference/python/signalwire/livewire/job-context/index.mdx b/fern/products/sdk-reference/python/signalwire/livewire/job-context/index.mdx new file mode 100644 index 0000000000..d260fb402b --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/livewire/job-context/index.mdx @@ -0,0 +1,96 @@ +--- +slug: "/reference/python/signalwire/livewire/job-context" +title: "JobContext" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.livewire.JobContext" + parent: "signalwire.livewire" + module: "signalwire.livewire" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py" +--- +# `JobContext` + +Mirrors a livekit JobContext -- provides room and connection info. + +## Signature + +```python +class JobContext +``` + +## Properties + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__() +``` + +#### Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 656. + +*** + +### connect + +Noop -- SignalWire agents connect automatically when the platform +invokes the SWML endpoint. + +**Modifiers:** `async` + +#### Signature + +```python +async connect() +``` + +#### Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 661. + +*** + +### wait\_for\_participant + +Noop -- SignalWire handles participant management automatically. + +**Modifiers:** `async` + +#### Signature + +```python +async wait_for_participant(*, identity = None) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 670. + +## Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 653. diff --git a/fern/products/sdk-reference/python/signalwire/livewire/job-process/index.mdx b/fern/products/sdk-reference/python/signalwire/livewire/job-process/index.mdx new file mode 100644 index 0000000000..dde44c5473 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/livewire/job-process/index.mdx @@ -0,0 +1,49 @@ +--- +slug: "/reference/python/signalwire/livewire/job-process" +title: "JobProcess" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.livewire.JobProcess" + parent: "signalwire.livewire" + module: "signalwire.livewire" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py" +--- +# `JobProcess` + +Mirrors a livekit JobProcess -- used for prewarm/setup. + +## Signature + +```python +class JobProcess +``` + +## Properties + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__() +``` + +#### Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 649. + +## Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 646. diff --git a/fern/products/sdk-reference/python/signalwire/livewire/plugins/cartesia-tts/index.mdx b/fern/products/sdk-reference/python/signalwire/livewire/plugins/cartesia-tts/index.mdx new file mode 100644 index 0000000000..92bfa90b3b --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/livewire/plugins/cartesia-tts/index.mdx @@ -0,0 +1,49 @@ +--- +slug: "/reference/python/signalwire/livewire/plugins/cartesia-tts" +title: "CartesiaTTS" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.livewire.plugins.CartesiaTTS" + parent: "signalwire.livewire.plugins" + module: "signalwire.livewire.plugins" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/plugins.py" +--- +# `CartesiaTTS` + +Stub for livekit Cartesia TTS plugin. + +## Signature + +```python +class CartesiaTTS +``` + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(**kwargs: Any = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/livewire/plugins.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/plugins.py) + +Line 85. + +## Source + +[`signalwire/signalwire/livewire/plugins.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/plugins.py) + +Line 82. diff --git a/fern/products/sdk-reference/python/signalwire/livewire/plugins/deepgram-stt/index.mdx b/fern/products/sdk-reference/python/signalwire/livewire/plugins/deepgram-stt/index.mdx new file mode 100644 index 0000000000..b5a7fc295f --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/livewire/plugins/deepgram-stt/index.mdx @@ -0,0 +1,49 @@ +--- +slug: "/reference/python/signalwire/livewire/plugins/deepgram-stt" +title: "DeepgramSTT" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.livewire.plugins.DeepgramSTT" + parent: "signalwire.livewire.plugins" + module: "signalwire.livewire.plugins" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/plugins.py" +--- +# `DeepgramSTT` + +Stub for livekit Deepgram STT plugin. + +## Signature + +```python +class DeepgramSTT +``` + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(**kwargs: Any = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/livewire/plugins.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/plugins.py) + +Line 52. + +## Source + +[`signalwire/signalwire/livewire/plugins.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/plugins.py) + +Line 49. diff --git a/fern/products/sdk-reference/python/signalwire/livewire/plugins/eleven-labs-tts/index.mdx b/fern/products/sdk-reference/python/signalwire/livewire/plugins/eleven-labs-tts/index.mdx new file mode 100644 index 0000000000..4063e282b6 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/livewire/plugins/eleven-labs-tts/index.mdx @@ -0,0 +1,49 @@ +--- +slug: "/reference/python/signalwire/livewire/plugins/eleven-labs-tts" +title: "ElevenLabsTTS" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.livewire.plugins.ElevenLabsTTS" + parent: "signalwire.livewire.plugins" + module: "signalwire.livewire.plugins" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/plugins.py" +--- +# `ElevenLabsTTS` + +Stub for livekit ElevenLabs TTS plugin. + +## Signature + +```python +class ElevenLabsTTS +``` + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(**kwargs: Any = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/livewire/plugins.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/plugins.py) + +Line 97. + +## Source + +[`signalwire/signalwire/livewire/plugins.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/plugins.py) + +Line 94. diff --git a/fern/products/sdk-reference/python/signalwire/livewire/plugins/index.mdx b/fern/products/sdk-reference/python/signalwire/livewire/plugins/index.mdx new file mode 100644 index 0000000000..c929d06eb0 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/livewire/plugins/index.mdx @@ -0,0 +1,56 @@ +--- +slug: "/reference/python/signalwire/livewire/plugins" +title: "plugins" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.livewire.plugins" + parent: "signalwire.livewire" + module: "signalwire.livewire" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/plugins.py" +--- +# `plugins` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module plugins +``` + +## Classes + + + + Stub for livekit Cartesia TTS plugin. + + + + Stub for livekit Deepgram STT plugin. + + + + Stub for livekit ElevenLabs TTS plugin. + + + + Stub for livekit OpenAI LLM plugin. + + + + Stub for livekit Silero VAD plugin. + + + +## Source + +[`signalwire/signalwire/livewire/plugins.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/plugins.py) diff --git a/fern/products/sdk-reference/python/signalwire/livewire/plugins/open-aillm/index.mdx b/fern/products/sdk-reference/python/signalwire/livewire/plugins/open-aillm/index.mdx new file mode 100644 index 0000000000..4c0771d9f4 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/livewire/plugins/open-aillm/index.mdx @@ -0,0 +1,53 @@ +--- +slug: "/reference/python/signalwire/livewire/plugins/open-aillm" +title: "OpenAILLM" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.livewire.plugins.OpenAILLM" + parent: "signalwire.livewire.plugins" + module: "signalwire.livewire.plugins" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/plugins.py" +--- +# `OpenAILLM` + +Stub for livekit OpenAI LLM plugin. + +## Signature + +```python +class OpenAILLM +``` + +## Properties + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(**kwargs: Any = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/livewire/plugins.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/plugins.py) + +Line 68. + +## Source + +[`signalwire/signalwire/livewire/plugins.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/plugins.py) + +Line 65. diff --git a/fern/products/sdk-reference/python/signalwire/livewire/plugins/silero-vad/index.mdx b/fern/products/sdk-reference/python/signalwire/livewire/plugins/silero-vad/index.mdx new file mode 100644 index 0000000000..a2b73bcdcd --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/livewire/plugins/silero-vad/index.mdx @@ -0,0 +1,70 @@ +--- +slug: "/reference/python/signalwire/livewire/plugins/silero-vad" +title: "SileroVAD" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.livewire.plugins.SileroVAD" + parent: "signalwire.livewire.plugins" + module: "signalwire.livewire.plugins" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/plugins.py" +--- +# `SileroVAD` + +Stub for livekit Silero VAD plugin. + +## Signature + +```python +class SileroVAD +``` + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(**kwargs: Any = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/livewire/plugins.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/plugins.py) + +Line 113. + +*** + +### load + +Mirrors the SileroVAD.load() factory. + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +load() +``` + +#### Source + +[`signalwire/signalwire/livewire/plugins.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/plugins.py) + +Line 121. + +## Source + +[`signalwire/signalwire/livewire/plugins.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/plugins.py) + +Line 110. diff --git a/fern/products/sdk-reference/python/signalwire/livewire/room/index.mdx b/fern/products/sdk-reference/python/signalwire/livewire/room/index.mdx new file mode 100644 index 0000000000..3d64c75d27 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/livewire/room/index.mdx @@ -0,0 +1,33 @@ +--- +slug: "/reference/python/signalwire/livewire/room" +title: "Room" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.livewire.Room" + parent: "signalwire.livewire" + module: "signalwire.livewire" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py" +--- +# `Room` + +Stub -- SignalWire doesn't use the LiveKit room abstraction. + +## Signature + +```python +class Room +``` + +## Properties + + + +## Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 641. diff --git a/fern/products/sdk-reference/python/signalwire/livewire/run-context/index.mdx b/fern/products/sdk-reference/python/signalwire/livewire/run-context/index.mdx new file mode 100644 index 0000000000..29e29a0e1d --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/livewire/run-context/index.mdx @@ -0,0 +1,63 @@ +--- +slug: "/reference/python/signalwire/livewire/run-context" +title: "RunContext" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.livewire.RunContext" + parent: "signalwire.livewire" + module: "signalwire.livewire" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py" +--- +# `RunContext` + +Mirrors livekit RunContext -- available inside tool handlers. + +## Signature + +```python +class RunContext +``` + +## Properties + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(session = None, *, speech_handle = None, function_call = None) +``` + +#### Parameters + + + + + + + +#### Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 255. + +## Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 252. diff --git a/fern/products/sdk-reference/python/signalwire/livewire/stop-response/index.mdx b/fern/products/sdk-reference/python/signalwire/livewire/stop-response/index.mdx new file mode 100644 index 0000000000..ab42b1d085 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/livewire/stop-response/index.mdx @@ -0,0 +1,33 @@ +--- +slug: "/reference/python/signalwire/livewire/stop-response" +title: "StopResponse" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.livewire.StopResponse" + parent: "signalwire.livewire" + module: "signalwire.livewire" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py" +--- +# `StopResponse` + +Signals that a tool should not trigger another LLM reply. + +## Signature + +```python +class StopResponse(Exception) +``` + +## Inheritance + +**Extends:** `Exception` + +## Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 140. diff --git a/fern/products/sdk-reference/python/signalwire/livewire/tool-error/index.mdx b/fern/products/sdk-reference/python/signalwire/livewire/tool-error/index.mdx new file mode 100644 index 0000000000..c659793062 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/livewire/tool-error/index.mdx @@ -0,0 +1,33 @@ +--- +slug: "/reference/python/signalwire/livewire/tool-error" +title: "ToolError" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.livewire.ToolError" + parent: "signalwire.livewire" + module: "signalwire.livewire" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py" +--- +# `ToolError` + +Signals a tool execution error. + +## Signature + +```python +class ToolError(Exception) +``` + +## Inheritance + +**Extends:** `Exception` + +## Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 145. diff --git a/fern/products/sdk-reference/python/signalwire/mcp-gateway/gateway-service/index.mdx b/fern/products/sdk-reference/python/signalwire/mcp-gateway/gateway-service/index.mdx new file mode 100644 index 0000000000..1833266f79 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/mcp-gateway/gateway-service/index.mdx @@ -0,0 +1,62 @@ +--- +slug: "/reference/python/signalwire/mcp-gateway/gateway-service" +title: "gateway_service" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.mcp_gateway.gateway_service" + parent: "signalwire.mcp_gateway" + module: "signalwire.mcp_gateway" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/gateway_service.py" +--- +# `gateway_service` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module gateway_service +``` + +## Properties + + + +## Classes + + + + Main gateway service class + + + +## Functions + +### main + +Main entry point + +#### Signature + +```python +main() +``` + +#### Source + +[`signalwire/signalwire/mcp_gateway/gateway_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/gateway_service.py) + +Line 557. + +## Source + +[`signalwire/signalwire/mcp_gateway/gateway_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/gateway_service.py) diff --git a/fern/products/sdk-reference/python/signalwire/mcp-gateway/gateway-service/mcp-gateway/index.mdx b/fern/products/sdk-reference/python/signalwire/mcp-gateway/gateway-service/mcp-gateway/index.mdx new file mode 100644 index 0000000000..40229c175f --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/mcp-gateway/gateway-service/mcp-gateway/index.mdx @@ -0,0 +1,105 @@ +--- +slug: "/reference/python/signalwire/mcp-gateway/gateway-service/mcp-gateway" +title: "MCPGateway" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.mcp_gateway.gateway_service.MCPGateway" + parent: "signalwire.mcp_gateway.gateway_service" + module: "signalwire.mcp_gateway.gateway_service" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/gateway_service.py" +--- +# `MCPGateway` + +Main gateway service class + +## Signature + +```python +class MCPGateway +``` + +## Properties + + + + + + + + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(config_path: str = 'config.json') +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/mcp_gateway/gateway_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/gateway_service.py) + +Line 55. + +*** + +### run + +Run the gateway service + +#### Signature + +```python +run() +``` + +#### Source + +[`signalwire/signalwire/mcp_gateway/gateway_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/gateway_service.py) + +Line 478. + +*** + +### shutdown + +Shutdown the gateway service + +#### Signature + +```python +shutdown() +``` + +#### Source + +[`signalwire/signalwire/mcp_gateway/gateway_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/gateway_service.py) + +Line 520. + +## Source + +[`signalwire/signalwire/mcp_gateway/gateway_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/gateway_service.py) + +Line 52. diff --git a/fern/products/sdk-reference/python/signalwire/mcp-gateway/gateway-service/mcp-gateway/set-security-headers.mdx b/fern/products/sdk-reference/python/signalwire/mcp-gateway/gateway-service/mcp-gateway/set-security-headers.mdx new file mode 100644 index 0000000000..f3cbf656ab --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/mcp-gateway/gateway-service/mcp-gateway/set-security-headers.mdx @@ -0,0 +1,33 @@ +--- +slug: "/reference/python/signalwire/mcp-gateway/gateway-service/mcp-gateway/set-security-headers" +title: "set_security_headers" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "function" + language: "python" + qualified_name: "signalwire.mcp_gateway.gateway_service.MCPGateway.__init__.set_security_headers" + parent: "signalwire.mcp_gateway.gateway_service.MCPGateway.__init__" + module: "signalwire.mcp_gateway.gateway_service" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/gateway_service.py" +--- +# `set_security_headers` + +**Decorators:** `@self.app.after_request` + +## Signature + +```python +set_security_headers(response) +``` + +## Parameters + + + +## Source + +[`signalwire/signalwire/mcp_gateway/gateway_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/gateway_service.py) + +Line 92. diff --git a/fern/products/sdk-reference/python/signalwire/mcp-gateway/index.mdx b/fern/products/sdk-reference/python/signalwire/mcp-gateway/index.mdx new file mode 100644 index 0000000000..7e77c3d3ac --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/mcp-gateway/index.mdx @@ -0,0 +1,52 @@ +--- +slug: "/reference/python/signalwire/mcp-gateway" +title: "mcp_gateway" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.mcp_gateway" + parent: "signalwire" + module: "signalwire" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/__init__.py" +--- +# `mcp_gateway` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module mcp_gateway +``` + +## Properties + + + +## Modules + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + +## Source + +[`signalwire/signalwire/mcp_gateway/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/mcp-gateway/mcp-manager/index.mdx b/fern/products/sdk-reference/python/signalwire/mcp-gateway/mcp-manager/index.mdx new file mode 100644 index 0000000000..daed38d9b4 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/mcp-gateway/mcp-manager/index.mdx @@ -0,0 +1,52 @@ +--- +slug: "/reference/python/signalwire/mcp-gateway/mcp-manager" +title: "mcp_manager" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.mcp_gateway.mcp_manager" + parent: "signalwire.mcp_gateway" + module: "signalwire.mcp_gateway" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py" +--- +# `mcp_manager` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module mcp_manager +``` + +## Properties + + + +## Classes + + + + Client for communicating with a single MCP server process + + + + Manages multiple MCP services and their lifecycles + + + + Configuration for an MCP service + + + +## Source + +[`signalwire/signalwire/mcp_gateway/mcp_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py) diff --git a/fern/products/sdk-reference/python/signalwire/mcp-gateway/mcp-manager/mcp-client/index.mdx b/fern/products/sdk-reference/python/signalwire/mcp-gateway/mcp-manager/mcp-client/index.mdx new file mode 100644 index 0000000000..824a609493 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/mcp-gateway/mcp-manager/mcp-client/index.mdx @@ -0,0 +1,191 @@ +--- +slug: "/reference/python/signalwire/mcp-gateway/mcp-manager/mcp-client" +title: "MCPClient" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.mcp_gateway.mcp_manager.MCPClient" + parent: "signalwire.mcp_gateway.mcp_manager" + module: "signalwire.mcp_gateway.mcp_manager" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py" +--- +# `MCPClient` + +Client for communicating with a single MCP server process + +## Signature + +```python +class MCPClient +``` + +## Properties + + + + + + + + + + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(service: MCPService, sandbox_base_dir: str = './sandbox') +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/mcp_gateway/mcp_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py) + +Line 62. + +*** + +### call\_method + +Call an RPC method and wait for response + +#### Signature + +```python +call_method(method: str, params: Dict[str, Any]) -> Any +``` + +#### Parameters + + + + + +#### Returns + +`Any` + +#### Source + +[`signalwire/signalwire/mcp_gateway/mcp_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py) + +Line 282. + +*** + +### call\_tool + +Call a tool on the MCP server + +#### Signature + +```python +call_tool(tool_name: str, arguments: Dict[str, Any]) -> Dict[str, Any] +``` + +#### Parameters + + + + + +#### Returns + +`Dict[str, Any]` + +#### Source + +[`signalwire/signalwire/mcp_gateway/mcp_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py) + +Line 275. + +*** + +### get\_tools + +Get the list of available tools + +#### Signature + +```python +get_tools() -> List[Dict[str, Any]] +``` + +#### Returns + +`List[Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/mcp_gateway/mcp_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py) + +Line 321. + +*** + +### start + +Start the MCP server process and initialize connection + +#### Signature + +```python +start() -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/mcp_gateway/mcp_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py) + +Line 163. + +*** + +### stop + +Stop the MCP server process and clean up sandbox + +#### Signature + +```python +stop() +``` + +#### Source + +[`signalwire/signalwire/mcp_gateway/mcp_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py) + +Line 213. + +## Source + +[`signalwire/signalwire/mcp_gateway/mcp_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py) + +Line 59. diff --git a/fern/products/sdk-reference/python/signalwire/mcp-gateway/mcp-manager/mcp-manager/index.mdx b/fern/products/sdk-reference/python/signalwire/mcp-gateway/mcp-manager/mcp-manager/index.mdx new file mode 100644 index 0000000000..e14c16f58d --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/mcp-gateway/mcp-manager/mcp-manager/index.mdx @@ -0,0 +1,199 @@ +--- +slug: "/reference/python/signalwire/mcp-gateway/mcp-manager/mcp-manager" +title: "MCPManager" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.mcp_gateway.mcp_manager.MCPManager" + parent: "signalwire.mcp_gateway.mcp_manager" + module: "signalwire.mcp_gateway.mcp_manager" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py" +--- +# `MCPManager` + +Manages multiple MCP services and their lifecycles + +## Signature + +```python +class MCPManager +``` + +## Properties + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(config: Dict[str, Any]) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/mcp_gateway/mcp_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py) + +Line 412. + +*** + +### create\_client + +Create a new MCP client for a service + +#### Signature + +```python +create_client(service_name: str) -> MCPClient +``` + +#### Parameters + + + +#### Returns + +`MCPClient` + +#### Source + +[`signalwire/signalwire/mcp_gateway/mcp_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py) + +Line 465. + +*** + +### get\_service + +Get a service definition by name + +#### Signature + +```python +get_service(service_name: str) -> Optional[MCPService] +``` + +#### Parameters + + + +#### Returns + +`Optional[MCPService]` + +#### Source + +[`signalwire/signalwire/mcp_gateway/mcp_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py) + +Line 448. + +*** + +### get\_service\_tools + +Get tools for a service by starting a temporary instance + +#### Signature + +```python +get_service_tools(service_name: str) -> List[Dict[str, Any]] +``` + +#### Parameters + + + +#### Returns + +`List[Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/mcp_gateway/mcp_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py) + +Line 484. + +*** + +### list\_services + +List all available services + +#### Signature + +```python +list_services() -> Dict[str, Dict[str, Any]] +``` + +#### Returns + +`Dict[str, Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/mcp_gateway/mcp_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py) + +Line 452. + +*** + +### shutdown + +Shutdown all active MCP clients + +#### Signature + +```python +shutdown() +``` + +#### Source + +[`signalwire/signalwire/mcp_gateway/mcp_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py) + +Line 519. + +*** + +### validate\_services + +Validate that all services can be started + +#### Signature + +```python +validate_services() -> Dict[str, bool] +``` + +#### Returns + +`Dict[str, bool]` + +#### Source + +[`signalwire/signalwire/mcp_gateway/mcp_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py) + +Line 499. + +## Source + +[`signalwire/signalwire/mcp_gateway/mcp_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py) + +Line 409. diff --git a/fern/products/sdk-reference/python/signalwire/mcp-gateway/mcp-manager/mcp-service/index.mdx b/fern/products/sdk-reference/python/signalwire/mcp-gateway/mcp-manager/mcp-service/index.mdx new file mode 100644 index 0000000000..541d443b18 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/mcp-gateway/mcp-manager/mcp-service/index.mdx @@ -0,0 +1,113 @@ +--- +slug: "/reference/python/signalwire/mcp-gateway/mcp-manager/mcp-service" +title: "MCPService" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.mcp_gateway.mcp_manager.MCPService" + parent: "signalwire.mcp_gateway.mcp_manager" + module: "signalwire.mcp_gateway.mcp_manager" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py" +--- +# `MCPService` + +Configuration for an MCP service + +**Modifiers:** `dataclass` + +**Decorators:** `@dataclass` + +## Signature + +```python +class MCPService +``` + +## Properties + + + + + + + + + + + +## Methods + +### \_\_hash\_\_ + +#### Signature + +```python +__hash__() +``` + +#### Source + +[`signalwire/signalwire/mcp_gateway/mcp_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py) + +Line 55. + +*** + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + name: str, + command: List[str], + description: str, + enabled: bool = True, + sandbox_config: Dict[str, Any] = None +) -> None +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/mcp_gateway/mcp_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py) + +*** + +### \_\_post\_init\_\_ + +#### Signature + +```python +__post_init__() +``` + +#### Source + +[`signalwire/signalwire/mcp_gateway/mcp_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py) + +Line 46. + +## Source + +[`signalwire/signalwire/mcp_gateway/mcp_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py) + +Line 37. diff --git a/fern/products/sdk-reference/python/signalwire/mcp-gateway/session-manager/index.mdx b/fern/products/sdk-reference/python/signalwire/mcp-gateway/session-manager/index.mdx new file mode 100644 index 0000000000..0796149674 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/mcp-gateway/session-manager/index.mdx @@ -0,0 +1,48 @@ +--- +slug: "/reference/python/signalwire/mcp-gateway/session-manager" +title: "session_manager" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.mcp_gateway.session_manager" + parent: "signalwire.mcp_gateway" + module: "signalwire.mcp_gateway" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/session_manager.py" +--- +# `session_manager` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module session_manager +``` + +## Properties + + + +## Classes + + + + Represents an active MCP session + + + + Manages MCP server sessions with automatic cleanup + + + +## Source + +[`signalwire/signalwire/mcp_gateway/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/session_manager.py) diff --git a/fern/products/sdk-reference/python/signalwire/mcp-gateway/session-manager/session-manager/index.mdx b/fern/products/sdk-reference/python/signalwire/mcp-gateway/session-manager/session-manager/index.mdx new file mode 100644 index 0000000000..2252b7259f --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/mcp-gateway/session-manager/session-manager/index.mdx @@ -0,0 +1,227 @@ +--- +slug: "/reference/python/signalwire/mcp-gateway/session-manager/session-manager" +title: "SessionManager" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.mcp_gateway.session_manager.SessionManager" + parent: "signalwire.mcp_gateway.session_manager" + module: "signalwire.mcp_gateway.session_manager" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/session_manager.py" +--- +# `SessionManager` + +Manages MCP server sessions with automatic cleanup + +## Signature + +```python +class SessionManager +``` + +## Properties + + + + + + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(config: Dict[str, Any], max_total_sessions: int = 500) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/mcp_gateway/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/session_manager.py) + +Line 57. + +*** + +### close\_session + +Close and remove a session + +#### Signature + +```python +close_session(session_id: str) -> bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/mcp_gateway/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/session_manager.py) + +Line 126. + +*** + +### create\_session + +Create and register a new session + +#### Signature + +```python +create_session( + session_id: str, + service_name: str, + process: Any, + timeout: Optional[int] = None, + metadata: Optional[Dict[str, Any]] = None +) -> Session +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`Session` + +#### Source + +[`signalwire/signalwire/mcp_gateway/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/session_manager.py) + +Line 73. + +*** + +### get\_service\_session\_count + +Get number of active sessions for a service + +#### Signature + +```python +get_service_session_count(service_name: str) -> int +``` + +#### Parameters + + + +#### Returns + +`int` + +#### Source + +[`signalwire/signalwire/mcp_gateway/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/session_manager.py) + +Line 168. + +*** + +### get\_session + +Get an active session by ID + +#### Signature + +```python +get_session(session_id: str) -> Optional[Session] +``` + +#### Parameters + + + +#### Returns + +`Optional[Session]` + +#### Source + +[`signalwire/signalwire/mcp_gateway/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/session_manager.py) + +Line 105. + +*** + +### list\_sessions + +List all active sessions with their info + +#### Signature + +```python +list_sessions() -> Dict[str, Dict[str, Any]] +``` + +#### Returns + +`Dict[str, Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/mcp_gateway/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/session_manager.py) + +Line 146. + +*** + +### shutdown + +Shutdown all sessions and cleanup + +#### Signature + +```python +shutdown() +``` + +#### Source + +[`signalwire/signalwire/mcp_gateway/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/session_manager.py) + +Line 203. + +## Source + +[`signalwire/signalwire/mcp_gateway/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/session_manager.py) + +Line 54. diff --git a/fern/products/sdk-reference/python/signalwire/mcp-gateway/session-manager/session/index.mdx b/fern/products/sdk-reference/python/signalwire/mcp-gateway/session-manager/session/index.mdx new file mode 100644 index 0000000000..db3c5b905b --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/mcp-gateway/session-manager/session/index.mdx @@ -0,0 +1,117 @@ +--- +slug: "/reference/python/signalwire/mcp-gateway/session-manager/session" +title: "Session" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.mcp_gateway.session_manager.Session" + parent: "signalwire.mcp_gateway.session_manager" + module: "signalwire.mcp_gateway.session_manager" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/session_manager.py" +--- +# `Session` + +Represents an active MCP session + +**Modifiers:** `dataclass` + +**Decorators:** `@dataclass` + +## Signature + +```python +class Session +``` + +## Properties + + + + + Check if the underlying MCP client is still running + + + + Check if session has expired based on timeout + + + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + session_id: str, + service_name: str, + process: Any, + created_at: datetime = datetime.now(), + last_accessed: datetime = datetime.now(), + timeout: int = 300, + metadata: Dict[str, Any] = dict() +) -> None +``` + +#### Parameters + + + + + + + + + + + + + + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/mcp_gateway/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/session_manager.py) + +*** + +### touch + +Update last accessed time + +#### Signature + +```python +touch() +``` + +#### Source + +[`signalwire/signalwire/mcp_gateway/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/session_manager.py) + +Line 49. + +## Source + +[`signalwire/signalwire/mcp_gateway/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/session_manager.py) + +Line 28. diff --git a/fern/products/sdk-reference/python/signalwire/pom/index.mdx b/fern/products/sdk-reference/python/signalwire/pom/index.mdx new file mode 100644 index 0000000000..bd3f2641e9 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/pom/index.mdx @@ -0,0 +1,46 @@ +--- +slug: "/reference/python/signalwire/pom" +title: "pom" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.pom" + parent: "signalwire" + module: "signalwire" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/__init__.py" +--- +# `pom` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module pom +``` + +## Properties + + + +## Modules + + + + + + POM Tool - Command line utility for working with Prompt Object Model files + + + +## Source + +[`signalwire/signalwire/pom/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/pom/pom-tool/index.mdx b/fern/products/sdk-reference/python/signalwire/pom/pom-tool/index.mdx new file mode 100644 index 0000000000..d2138dd926 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/pom/pom-tool/index.mdx @@ -0,0 +1,123 @@ +--- +slug: "/reference/python/signalwire/pom/pom-tool" +title: "pom_tool" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.pom.pom_tool" + parent: "signalwire.pom" + module: "signalwire.pom" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom_tool.py" +--- +# `pom_tool` + +POM Tool - Command line utility for working with Prompt Object Model files + +> \[!NOTE] +> pom\_tool \ \[--output=<format>] \[--outfile=<file>] \[--merge\_pom="<section name>:<filename>"] +> pom\_tool (-h | --help) + +> \[!NOTE] +> -h --help Show this help message +> \--output=<format> Output format: md, xml, json, yaml \[default: md] +> \--outfile=<file> Output file (if not specified, prints to stdout) +> \--merge\_pom=<arg> Merge another POM into a section: "<section name>:<filename>" + +## Signature + +```python +module pom_tool +``` + +## Functions + +### detect\_file\_format + +Detect if the file is JSON or YAML based on extension and content. + +#### Signature + +```python +detect_file_format(file_path) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/pom/pom_tool.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom_tool.py) + +Line 23. + +*** + +### load\_pom + +Load a POM from a file, auto-detecting the format. + +#### Signature + +```python +load_pom(file_path) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/pom/pom_tool.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom_tool.py) + +Line 55. + +*** + +### main + +Main entry point for the POM tool. + +#### Signature + +```python +main() +``` + +#### Source + +[`signalwire/signalwire/pom/pom_tool.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom_tool.py) + +Line 80. + +*** + +### render\_pom + +Render the POM in the specified format. + +#### Signature + +```python +render_pom(pom, output_format) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/pom/pom_tool.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom_tool.py) + +Line 67. + +## Source + +[`signalwire/signalwire/pom/pom_tool.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom_tool.py) diff --git a/fern/products/sdk-reference/python/signalwire/pom/pom/index.mdx b/fern/products/sdk-reference/python/signalwire/pom/pom/index.mdx new file mode 100644 index 0000000000..02ecd381d7 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/pom/pom/index.mdx @@ -0,0 +1,37 @@ +--- +slug: "/reference/python/signalwire/pom/pom" +title: "pom" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.pom.pom" + parent: "signalwire.pom" + module: "signalwire.pom" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py" +--- +# `pom` + +## Signature + +```python +module pom +``` + +## Classes + + + + A structured data format for composing, organizing, and rendering prompt instructions for large language models. + + + + Represents a section in the Prompt Object Model. + + + +## Source + +[`signalwire/signalwire/pom/pom.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py) diff --git a/fern/products/sdk-reference/python/signalwire/pom/pom/prompt-object-model/index.mdx b/fern/products/sdk-reference/python/signalwire/pom/pom/prompt-object-model/index.mdx new file mode 100644 index 0000000000..37b1508a1f --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/pom/pom/prompt-object-model/index.mdx @@ -0,0 +1,364 @@ +--- +slug: "/reference/python/signalwire/pom/pom/prompt-object-model" +title: "PromptObjectModel" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.pom.pom.PromptObjectModel" + parent: "signalwire.pom.pom" + module: "signalwire.pom.pom" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py" +--- +# `PromptObjectModel` + +A structured data format for composing, organizing, and rendering prompt +instructions for large language models. + +The Prompt Object Model provides a tree-based representation of a prompt +document composed of nested sections, each of which can include a title, +body text, bullet points, and arbitrarily nested subsections. + +This class supports both machine-readability (via JSON/YAML) and structured +rendering (via Markdown/XML), making it ideal for prompt templating, modular +editing, and traceable documentation. + +## Signature + +```python +class PromptObjectModel +``` + +## Properties + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(debug: bool = False) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/pom/pom.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py) + +Line 359. + +*** + +### add\_pom\_as\_subsection + +Add another PromptObjectModel as a subsection to a section with the given title or section object. + +#### Signature + +```python +add_pom_as_subsection( + target: Union[str, Section], + pom_to_add: PromptObjectModel +) +``` + +#### Parameters + + + The title of the section or the Section object to which the POM should be added as a subsection. + + + + The PromptObjectModel to add as a subsection. + + +#### Throws + +- `ValueError` — If no section with the target title is found (when target is a string). + +#### Source + +[`signalwire/signalwire/pom/pom.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py) + +Line 519. + +*** + +### add\_section + +Add a top-level section to the model. + +#### Signature + +```python +add_section( + title: Optional[str] = None, + *, + body: str = '', + bullets: Optional[Union[List[str], str]] = None, + numbered: Optional[bool] = None, + numberedBullets: bool = False +) -> Section +``` + +#### Parameters + + + The title of the section + + + + Optional body text for the section + + + + Optional list of bullet points or a single string + + + + Whether this section should be numbered + + + + Whether bullets should be numbered + + +#### Returns + +`Section` — The newly created Section object + +#### Throws + +- `ValueError` — If a section without a title is added after the first section + +#### Source + +[`signalwire/signalwire/pom/pom.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py) + +Line 363. + +*** + +### find\_section + +Find a section by its title. + +Performs a recursive search through all sections and subsections. + +#### Signature + +```python +find_section(title: str) -> Optional[Section] +``` + +#### Parameters + + + The title to search for + + +#### Returns + +`Optional[Section]` — The Section object if found, None otherwise + +#### Source + +[`signalwire/signalwire/pom/pom.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py) + +Line 397. + +*** + +### from\_json + +Create a PromptObjectModel instance from JSON data. + +**Modifiers:** `static` + +#### Signature + +```python +@staticmethod +from_json(json_data: Union[str, dict]) -> PromptObjectModel +``` + +#### Parameters + + + Either a JSON string or a parsed dictionary + + +#### Returns + +`PromptObjectModel` — A new PromptObjectModel populated with the data from the JSON + +#### Throws + +- `ValueError` — If the JSON is not properly formatted + +#### Source + +[`signalwire/signalwire/pom/pom.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py) + +Line 247. + +*** + +### from\_yaml + +Create a PromptObjectModel instance from YAML data. + +**Modifiers:** `static` + +#### Signature + +```python +@staticmethod +from_yaml(yaml_data: Union[str, dict]) -> PromptObjectModel +``` + +#### Parameters + + + Either a YAML string or a parsed dictionary + + +#### Returns + +`PromptObjectModel` — A new PromptObjectModel populated with the data from the YAML + +#### Throws + +- `ValueError` — If the YAML is not properly formatted + +#### Source + +[`signalwire/signalwire/pom/pom.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py) + +Line 268. + +*** + +### render\_markdown + +Render the entire model as markdown. + +#### Signature + +```python +render_markdown() -> str +``` + +#### Returns + +`str` — A string containing the markdown representation + +#### Source + +[`signalwire/signalwire/pom/pom.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py) + +Line 448. + +*** + +### render\_xml + +Render the entire model as XML. + +#### Signature + +```python +render_xml() -> str +``` + +#### Returns + +`str` — A string containing the XML representation + +#### Source + +[`signalwire/signalwire/pom/pom.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py) + +Line 488. + +*** + +### to\_dict + +Convert the entire model to a list of dictionaries. + +#### Signature + +```python +to_dict() -> List[dict] +``` + +#### Returns + +`List[dict]` — A list of dictionaries representing the model + +#### Source + +[`signalwire/signalwire/pom/pom.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py) + +Line 439. + +*** + +### to\_json + +Convert the entire model to a JSON string. + +#### Signature + +```python +to_json() -> str +``` + +#### Returns + +`str` — A JSON string representation of the model + +#### Source + +[`signalwire/signalwire/pom/pom.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py) + +Line 419. + +*** + +### to\_yaml + +Convert the entire model to a YAML string. + +#### Signature + +```python +to_yaml() -> str +``` + +#### Returns + +`str` — A YAML string representation of the model + +#### Source + +[`signalwire/signalwire/pom/pom.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py) + +Line 428. + +## Source + +[`signalwire/signalwire/pom/pom.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py) + +Line 234. diff --git a/fern/products/sdk-reference/python/signalwire/pom/pom/section/index.mdx b/fern/products/sdk-reference/python/signalwire/pom/pom/section/index.mdx new file mode 100644 index 0000000000..a1d3780f29 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/pom/pom/section/index.mdx @@ -0,0 +1,277 @@ +--- +slug: "/reference/python/signalwire/pom/pom/section" +title: "Section" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.pom.pom.Section" + parent: "signalwire.pom.pom" + module: "signalwire.pom.pom" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py" +--- +# `Section` + +Represents a section in the Prompt Object Model. + +Each section contains a title, optional body text, optional bullet points, +and can have any number of nested subsections. + +## Signature + +```python +class Section +``` + +## Properties + + + A paragraph of text associated with the section. + + + + Bullet-pointed items. + + + + Whether this section should be numbered. + + + + Whether bullets should be numbered instead of using bullet points. + + + + Nested sections with the same structure. + + + + The name of the section. + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + title: Optional[str] = None, + *, + body: str = '', + bullets: Optional[List[str]] = None, + numbered: Optional[bool] = None, + numberedBullets: bool = False +) +``` + +#### Parameters + + + + + + + + + + + +#### Source + +[`signalwire/signalwire/pom/pom.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py) + +Line 20. + +*** + +### add\_body + +Add or replace the body text for this section. + +#### Signature + +```python +add_body(body: str) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/pom/pom.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py) + +Line 39. + +*** + +### add\_bullets + +Add bullet points to this section. + +#### Signature + +```python +add_bullets(bullets: List[str]) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/pom/pom.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py) + +Line 45. + +*** + +### add\_subsection + +Add a subsection to this section. + +#### Signature + +```python +add_subsection( + title: str, + *, + body: str = '', + bullets: Optional[List[str]] = None, + numbered: bool = False, + numberedBullets: bool = False +) -> Section +``` + +#### Parameters + + + The title of the subsection + + + + Optional body text for the subsection + + + + Optional list of bullet points + + + + Whether this section should be numbered + + + + Whether bullets should be numbered + + +#### Returns + +`Section` — The newly created Section object + +#### Throws + +- `ValueError` — If the title is None or if the section has neither a body nor bullets + +#### Source + +[`signalwire/signalwire/pom/pom.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py) + +Line 51. + +*** + +### render\_markdown + +Render this section and all its subsections as markdown. + +#### Signature + +```python +render_markdown( + level: int = 2, + section_number: Optional[List[int]] = None +) -> str +``` + +#### Parameters + + + The heading level to start with (default: 2, which corresponds to ##) + + + + The current section number for numbered sections + + +#### Returns + +`str` — A string containing the markdown representation + +#### Source + +[`signalwire/signalwire/pom/pom.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py) + +Line 103. + +*** + +### render\_xml + +Render this section and all its subsections as XML. + +#### Signature + +```python +render_xml(indent: int = 0, section_number: Optional[List[int]] = None) -> str +``` + +#### Parameters + + + The indentation level to start with (default: 0) + + + + The current section number for numbered sections + + +#### Returns + +`str` — A string containing the XML representation + +#### Source + +[`signalwire/signalwire/pom/pom.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py) + +Line 164. + +*** + +### to\_dict + +Convert the section to a dictionary representation. + +#### Signature + +```python +to_dict() +``` + +#### Source + +[`signalwire/signalwire/pom/pom.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py) + +Line 79. + +## Source + +[`signalwire/signalwire/pom/pom.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py) + +Line 5. diff --git a/fern/products/sdk-reference/python/signalwire/prefabs/concierge/concierge-agent/index.mdx b/fern/products/sdk-reference/python/signalwire/prefabs/concierge/concierge-agent/index.mdx new file mode 100644 index 0000000000..4a547a2861 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/prefabs/concierge/concierge-agent/index.mdx @@ -0,0 +1,210 @@ +--- +slug: "/reference/python/signalwire/prefabs/concierge/concierge-agent" +title: "ConciergeAgent" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.prefabs.concierge.ConciergeAgent" + parent: "signalwire.prefabs.concierge" + module: "signalwire.prefabs.concierge" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/concierge.py" +--- +# `ConciergeAgent` + +A prefab agent designed to act as a virtual concierge, providing information +and services to users. + +This agent will: + +1. Welcome users and explain available services +2. Answer questions about amenities, hours, and directions +3. Help with bookings and reservations +4. Provide personalized recommendations + +> \[!NOTE] +> agent = ConciergeAgent( +> venue\_name="Grand Hotel", +> services=\["room service", "spa bookings", "restaurant reservations"], +> amenities=\{ +> "pool": \{"hours": "7 AM - 10 PM", "location": "2nd Floor"\}, +> "gym": \{"hours": "24 hours", "location": "3rd Floor"\} +> \} +> ) + +## Signature + +```python +class ConciergeAgent(AgentBase) +``` + +## Inheritance + +**Extends:** [AgentBase](/docs/sdk-reference/reference/python/signalwire/core/agent-base/agent-base) + +## Properties + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +Initialize a concierge agent + +#### Signature + +```python +__init__( + venue_name: str, + services: List[str], + amenities: Dict[str, Dict[str, str]], + hours_of_operation: Optional[Dict[str, str]] = None, + special_instructions: Optional[List[str]] = None, + welcome_message: Optional[str] = None, + name: str = 'concierge', + route: str = '/concierge', + **kwargs = {} +) +``` + +#### Parameters + + + Name of the venue or business + + + + List of services offered + + + + Dictionary of amenities with details + + + + Optional dictionary of operating hours + + + + Optional list of special instructions + + + + Optional custom welcome message + + + + Agent name for the route + + + + HTTP route for this agent + + + + +#### Source + +[`signalwire/signalwire/prefabs/concierge.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/concierge.py) + +Line 45. + +*** + +### check\_availability + +Check availability for a service on a specific date and time + +This is a simulated function that would typically connect to a real booking system. +In this example, it returns a mock availability response. + +**Decorators:** `@AgentBase.tool(Any, Any, Any)` + +#### Signature + +```python +check_availability(args, raw_data) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/prefabs/concierge.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/concierge.py) + +Line 184. + +*** + +### get\_directions + +Provide directions to a specific location or amenity + +**Decorators:** `@AgentBase.tool(Any, Any, Any)` + +#### Signature + +```python +get_directions(args, raw_data) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/prefabs/concierge.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/concierge.py) + +Line 226. + +*** + +### on\_summary + +Process the interaction summary + +#### Signature + +```python +on_summary(summary, raw_data = None) +``` + +#### Parameters + + + Summary data from the conversation + + + + The complete raw POST data from the request + + +#### Source + +[`signalwire/signalwire/prefabs/concierge.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/concierge.py) + +Line 253. + +## Source + +[`signalwire/signalwire/prefabs/concierge.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/concierge.py) + +Line 23. diff --git a/fern/products/sdk-reference/python/signalwire/prefabs/concierge/index.mdx b/fern/products/sdk-reference/python/signalwire/prefabs/concierge/index.mdx new file mode 100644 index 0000000000..ca1673a89d --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/prefabs/concierge/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/signalwire/prefabs/concierge" +title: "concierge" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.prefabs.concierge" + parent: "signalwire.prefabs" + module: "signalwire.prefabs" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/concierge.py" +--- +# `concierge` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module concierge +``` + +## Classes + + + + A prefab agent designed to act as a virtual concierge, providing information and services to users. + + + +## Source + +[`signalwire/signalwire/prefabs/concierge.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/concierge.py) diff --git a/fern/products/sdk-reference/python/signalwire/prefabs/faq-bot/faq-bot-agent/index.mdx b/fern/products/sdk-reference/python/signalwire/prefabs/faq-bot/faq-bot-agent/index.mdx new file mode 100644 index 0000000000..2b8d6f6c73 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/prefabs/faq-bot/faq-bot-agent/index.mdx @@ -0,0 +1,168 @@ +--- +slug: "/reference/python/signalwire/prefabs/faq-bot/faq-bot-agent" +title: "FAQBotAgent" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.prefabs.faq_bot.FAQBotAgent" + parent: "signalwire.prefabs.faq_bot" + module: "signalwire.prefabs.faq_bot" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/faq_bot.py" +--- +# `FAQBotAgent` + +A prefab agent designed to answer frequently asked questions based on +a provided list of question/answer pairs. + +This agent will: + +1. Match user questions against the FAQ database +2. Provide the most relevant answer +3. Suggest other relevant questions when appropriate + +> \[!NOTE] +> agent = FAQBotAgent( +> faqs=\[ +> \{ +> "question": "What is SignalWire?", +> "answer": "SignalWire is a developer-friendly cloud communications platform." +> \}, +> \{ +> "question": "How much does it cost?", +> "answer": "SignalWire offers pay-as-you-go pricing with no monthly fees." +> \} +> ] +> ) + +## Signature + +```python +class FAQBotAgent(AgentBase) +``` + +## Inheritance + +**Extends:** [AgentBase](/docs/sdk-reference/reference/python/signalwire/core/agent-base/agent-base) + +## Properties + + + + + + + +## Methods + +### \_\_init\_\_ + +Initialize an FAQ bot agent + +#### Signature + +```python +__init__( + faqs: List[Dict[str, str]], + suggest_related: bool = True, + persona: Optional[str] = None, + name: str = 'faq_bot', + route: str = '/faq', + **kwargs = {} +) +``` + +#### Parameters + + + List of FAQ items, each with: + + + + Whether to suggest related questions + + + + Optional custom personality description + + + + Agent name for the route + + + + HTTP route for this agent + + + + +#### Source + +[`signalwire/signalwire/prefabs/faq_bot.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/faq_bot.py) + +Line 47. + +*** + +### on\_summary + +Process the interaction summary + +#### Signature + +```python +on_summary(summary, raw_data = None) +``` + +#### Parameters + + + Summary data from the conversation + + + + The complete raw POST data from the request + + +#### Source + +[`signalwire/signalwire/prefabs/faq_bot.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/faq_bot.py) + +Line 287. + +*** + +### search\_faqs + +Search for FAQs matching a specific query or category + +This function helps find relevant FAQs based on a search query or category. +It returns matching FAQs in order of relevance. + +**Decorators:** `@AgentBase.tool(Any, Any, Any)` + +#### Signature + +```python +search_faqs(args, raw_data) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/prefabs/faq_bot.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/faq_bot.py) + +Line 216. + +## Source + +[`signalwire/signalwire/prefabs/faq_bot.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/faq_bot.py) + +Line 22. diff --git a/fern/products/sdk-reference/python/signalwire/prefabs/faq-bot/index.mdx b/fern/products/sdk-reference/python/signalwire/prefabs/faq-bot/index.mdx new file mode 100644 index 0000000000..8e82944ab7 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/prefabs/faq-bot/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/signalwire/prefabs/faq-bot" +title: "faq_bot" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.prefabs.faq_bot" + parent: "signalwire.prefabs" + module: "signalwire.prefabs" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/faq_bot.py" +--- +# `faq_bot` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module faq_bot +``` + +## Classes + + + + A prefab agent designed to answer frequently asked questions based on a provided list of question/answer pairs. + + + +## Source + +[`signalwire/signalwire/prefabs/faq_bot.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/faq_bot.py) diff --git a/fern/products/sdk-reference/python/signalwire/prefabs/index.mdx b/fern/products/sdk-reference/python/signalwire/prefabs/index.mdx new file mode 100644 index 0000000000..c3d7c605da --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/prefabs/index.mdx @@ -0,0 +1,60 @@ +--- +slug: "/reference/python/signalwire/prefabs" +title: "prefabs" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.prefabs" + parent: "signalwire" + module: "signalwire" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/__init__.py" +--- +# `prefabs` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module prefabs +``` + +## Properties + + + +## Modules + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + +## Source + +[`signalwire/signalwire/prefabs/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/prefabs/info-gatherer/index.mdx b/fern/products/sdk-reference/python/signalwire/prefabs/info-gatherer/index.mdx new file mode 100644 index 0000000000..f1e909602b --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/prefabs/info-gatherer/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/signalwire/prefabs/info-gatherer" +title: "info_gatherer" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.prefabs.info_gatherer" + parent: "signalwire.prefabs" + module: "signalwire.prefabs" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/info_gatherer.py" +--- +# `info_gatherer` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module info_gatherer +``` + +## Classes + + + + A prefab agent designed to collect answers to a series of questions. + + + +## Source + +[`signalwire/signalwire/prefabs/info_gatherer.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/info_gatherer.py) diff --git a/fern/products/sdk-reference/python/signalwire/prefabs/info-gatherer/info-gatherer-agent/index.mdx b/fern/products/sdk-reference/python/signalwire/prefabs/info-gatherer/info-gatherer-agent/index.mdx new file mode 100644 index 0000000000..b2408f17a3 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/prefabs/info-gatherer/info-gatherer-agent/index.mdx @@ -0,0 +1,222 @@ +--- +slug: "/reference/python/signalwire/prefabs/info-gatherer/info-gatherer-agent" +title: "InfoGathererAgent" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.prefabs.info_gatherer.InfoGathererAgent" + parent: "signalwire.prefabs.info_gatherer" + module: "signalwire.prefabs.info_gatherer" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/info_gatherer.py" +--- +# `InfoGathererAgent` + +A prefab agent designed to collect answers to a series of questions. + +This agent will: + +1. Ask if the user is ready to begin +2. Ask each question in sequence +3. Store the answers for later use + +> \[!NOTE] +> agent = InfoGathererAgent( +> questions=\[ +> \{"key\_name": "full\_name", "question\_text": "What is your full name?"\}, +> \{"key\_name": "email", "question\_text": "What is your email address?", "confirm": True\}, +> \{"key\_name": "reason", "question\_text": "How can I help you today?"\} +> ] +> ) + +## Signature + +```python +class InfoGathererAgent(AgentBase) +``` + +## Inheritance + +**Extends:** [AgentBase](/docs/sdk-reference/reference/python/signalwire/core/agent-base/agent-base) + +## Methods + +### \_\_init\_\_ + +Initialize an information gathering agent + +#### Signature + +```python +__init__( + questions: Optional[List[Dict[str, str]]] = None, + name: str = 'info_gatherer', + route: str = '/info_gatherer', + **kwargs = {} +) +``` + +#### Parameters + + + Optional list of questions to ask. If None, questions will be determined dynamically via a callback function. Each question dict should have: + + + + Agent name for the route + + + + HTTP route for this agent + + + + +#### Source + +[`signalwire/signalwire/prefabs/info_gatherer.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/info_gatherer.py) + +Line 43. + +*** + +### on\_swml\_request + +Handle dynamic configuration using the callback function + +This method is called when SWML is requested and allows us to configure +the agent just-in-time using the provided callback. + +#### Signature + +```python +on_swml_request(request_data = None, callback_path = None, request = None) +``` + +#### Parameters + + + + + + + +#### Source + +[`signalwire/signalwire/prefabs/info_gatherer.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/info_gatherer.py) + +Line 158. + +*** + +### set\_question\_callback + +Set a callback function for dynamic question configuration + +> \[!NOTE] +> def my\_question\_callback(query\_params, body\_params, headers): +> question\_set = query\_params.get('set', 'default') +> if question\_set == 'support': +> return \[ +> \{"key\_name": "name", "question\_text": "What is your name?"\}, +> \{"key\_name": "issue", "question\_text": "What's the issue?"\} +> ] +> else: +> return \[\{"key\_name": "name", "question\_text": "What is your name?"\}] +> +> agent.set\_question\_callback(my\_question\_callback) + +#### Signature + +```python +set_question_callback( + callback: Callable[dict, dict, dict, List[Dict[str, str]]] +) +``` + +#### Parameters + + + Function that takes (query\_params, body\_params, headers) and returns a list of question dictionaries. Each question dict should have: - key\_name: Identifier for storing the answer - question\_text: The actual question to ask the user - confirm: (Optional) If True, agent will confirm answer before submitting + + +#### Examples + +```python +agent.set_question_callback(my_question_callback) +``` + +#### Source + +[`signalwire/signalwire/prefabs/info_gatherer.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/info_gatherer.py) + +Line 93. + +*** + +### start\_questions + +Start the question sequence by retrieving the first question + +This function gets the current question index from global\_data +and returns the corresponding question. + +**Decorators:** `@AgentBase.tool(Any, Any, Any)` + +#### Signature + +```python +start_questions(args, raw_data) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/prefabs/info_gatherer.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/info_gatherer.py) + +Line 258. + +*** + +### submit\_answer + +Submit an answer to the current question and move to the next one + +This function: + +1. Stores the answer in global\_data +2. Increments the question index +3. Returns the next question or completion message + +**Decorators:** `@AgentBase.tool(Any, Any, Any)` + +#### Signature + +```python +submit_answer(args, raw_data) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/prefabs/info_gatherer.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/info_gatherer.py) + +Line 296. + +## Source + +[`signalwire/signalwire/prefabs/info_gatherer.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/info_gatherer.py) + +Line 24. diff --git a/fern/products/sdk-reference/python/signalwire/prefabs/receptionist/index.mdx b/fern/products/sdk-reference/python/signalwire/prefabs/receptionist/index.mdx new file mode 100644 index 0000000000..f5634b7370 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/prefabs/receptionist/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/signalwire/prefabs/receptionist" +title: "receptionist" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.prefabs.receptionist" + parent: "signalwire.prefabs" + module: "signalwire.prefabs" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/receptionist.py" +--- +# `receptionist` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module receptionist +``` + +## Classes + + + + A prefab agent designed to act as a receptionist that: 1. Greets callers 2. Collects basic information about their needs 3. Transfers them to the appropriate department + + + +## Source + +[`signalwire/signalwire/prefabs/receptionist.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/receptionist.py) diff --git a/fern/products/sdk-reference/python/signalwire/prefabs/receptionist/receptionist-agent/index.mdx b/fern/products/sdk-reference/python/signalwire/prefabs/receptionist/receptionist-agent/index.mdx new file mode 100644 index 0000000000..37b4d88c95 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/prefabs/receptionist/receptionist-agent/index.mdx @@ -0,0 +1,122 @@ +--- +slug: "/reference/python/signalwire/prefabs/receptionist/receptionist-agent" +title: "ReceptionistAgent" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.prefabs.receptionist.ReceptionistAgent" + parent: "signalwire.prefabs.receptionist" + module: "signalwire.prefabs.receptionist" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/receptionist.py" +--- +# `ReceptionistAgent` + +A prefab agent designed to act as a receptionist that: + +1. Greets callers +2. Collects basic information about their needs +3. Transfers them to the appropriate department + +> \[!NOTE] +> agent = ReceptionistAgent( +> departments=\[ +> \{"name": "sales", "description": "For product inquiries, pricing, and purchasing", "number": "+15551235555"\}, +> \{"name": "support", "description": "For technical help and troubleshooting", "number": "+15551236666"\} +> ] +> ) + +## Signature + +```python +class ReceptionistAgent(AgentBase) +``` + +## Inheritance + +**Extends:** [AgentBase](/docs/sdk-reference/reference/python/signalwire/core/agent-base/agent-base) + +## Methods + +### \_\_init\_\_ + +Initialize a receptionist agent + +#### Signature + +```python +__init__( + departments: List[Dict[str, str]], + name: str = 'receptionist', + route: str = '/receptionist', + greeting: str = 'Thank you for calling. How can I help you today?', + voice: str = 'rime.spore', + **kwargs = {} +) +``` + +#### Parameters + + + List of departments to transfer to, each with: + + + + Agent name for the route + + + + HTTP route for this agent + + + + Initial greeting message + + + + Voice ID to use + + + + +#### Source + +[`signalwire/signalwire/prefabs/receptionist.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/receptionist.py) + +Line 37. + +*** + +### on\_summary + +Process the conversation summary + +#### Signature + +```python +on_summary(summary, raw_data = None) +``` + +#### Parameters + + + Summary data from the conversation + + + + The complete raw POST data from the request + + +#### Source + +[`signalwire/signalwire/prefabs/receptionist.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/receptionist.py) + +Line 278. + +## Source + +[`signalwire/signalwire/prefabs/receptionist.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/receptionist.py) + +Line 21. diff --git a/fern/products/sdk-reference/python/signalwire/prefabs/survey/index.mdx b/fern/products/sdk-reference/python/signalwire/prefabs/survey/index.mdx new file mode 100644 index 0000000000..58cb90509f --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/prefabs/survey/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/signalwire/prefabs/survey" +title: "survey" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.prefabs.survey" + parent: "signalwire.prefabs" + module: "signalwire.prefabs" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/survey.py" +--- +# `survey` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module survey +``` + +## Classes + + + + A prefab agent designed to conduct automated surveys with users. + + + +## Source + +[`signalwire/signalwire/prefabs/survey.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/survey.py) diff --git a/fern/products/sdk-reference/python/signalwire/prefabs/survey/survey-agent/index.mdx b/fern/products/sdk-reference/python/signalwire/prefabs/survey/survey-agent/index.mdx new file mode 100644 index 0000000000..234f315adf --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/prefabs/survey/survey-agent/index.mdx @@ -0,0 +1,225 @@ +--- +slug: "/reference/python/signalwire/prefabs/survey/survey-agent" +title: "SurveyAgent" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.prefabs.survey.SurveyAgent" + parent: "signalwire.prefabs.survey" + module: "signalwire.prefabs.survey" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/survey.py" +--- +# `SurveyAgent` + +A prefab agent designed to conduct automated surveys with users. + +This agent will: + +1. Introduce the survey purpose and structure +2. Ask predefined questions in sequence +3. Collect and validate responses +4. Provide a summary of collected responses + +> \[!NOTE] +> agent = SurveyAgent( +> survey\_name="Customer Satisfaction Survey", +> introduction="We'd like to get your feedback on your recent experience.", +> questions=\[ +> \{ +> "id": "satisfaction", +> "text": "How satisfied were you with our service?", +> "type": "rating", +> "scale": 5, +> "required": True +> \}, +> \{ +> "id": "comments", +> "text": "Do you have any additional comments?", +> "type": "open\_ended", +> "required": False +> \} +> ] +> ) + +## Signature + +```python +class SurveyAgent(AgentBase) +``` + +## Inheritance + +**Extends:** [AgentBase](/docs/sdk-reference/reference/python/signalwire/core/agent-base/agent-base) + +## Properties + + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +Initialize a survey agent + +#### Signature + +```python +__init__( + survey_name: str, + questions: List[Dict[str, Any]], + introduction: Optional[str] = None, + conclusion: Optional[str] = None, + brand_name: Optional[str] = None, + max_retries: int = 2, + name: str = 'survey', + route: str = '/survey', + **kwargs = {} +) +``` + +#### Parameters + + + Name of the survey + + + + List of question objects with the following keys: + + + + Optional custom introduction message + + + + Optional custom conclusion message + + + + Optional brand or company name + + + + Maximum number of times to retry invalid answers + + + + Name for the agent (default: "survey") + + + + HTTP route for the agent (default: "/survey") + + + + +#### Source + +[`signalwire/signalwire/prefabs/survey.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/survey.py) + +Line 55. + +*** + +### log\_response + +Log a validated response to a survey question + +This function would typically connect to a database or API to store the response. +In this example, it just acknowledges that the response was received. + +**Decorators:** `@AgentBase.tool(Any, Any, Any)` + +#### Signature + +```python +log_response(args, raw_data) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/prefabs/survey.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/survey.py) + +Line 314. + +*** + +### on\_summary + +Process the survey results summary + +#### Signature + +```python +on_summary(summary, raw_data = None) +``` + +#### Parameters + + + Summary data containing survey responses + + + + The complete raw POST data from the request + + +#### Source + +[`signalwire/signalwire/prefabs/survey.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/survey.py) + +Line 351. + +*** + +### validate\_response + +Validate if a response meets the requirements for a specific question + +This function checks if a user's response is valid for the specified question +based on the question type and constraints. + +**Decorators:** `@AgentBase.tool(Any, Any, Any)` + +#### Signature + +```python +validate_response(args, raw_data) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/prefabs/survey.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/survey.py) + +Line 246. + +## Source + +[`signalwire/signalwire/prefabs/survey.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/survey.py) + +Line 23. diff --git a/fern/products/sdk-reference/python/signalwire/relay/call/action/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/call/action/index.mdx new file mode 100644 index 0000000000..f782e5c414 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/relay/call/action/index.mdx @@ -0,0 +1,103 @@ +--- +slug: "/reference/python/signalwire/relay/call/action" +title: "Action" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.call.Action" + parent: "signalwire.relay.call" + module: "signalwire.relay.call" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py" +--- +# `Action` + +Base class for async action handles (play, record, detect, etc.). + +Holds a control\_id and back-reference to the Call. Resolves when the +server sends a terminal event for this control\_id. + +## Signature + +```python +class Action +``` + +## Properties + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + call: 'Call', + control_id: str, + terminal_event: str, + terminal_states: tuple[str, ...] +) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 54. + +*** + +### wait + +Wait for the action to complete. Returns the terminal event. + +**Modifiers:** `async` + +#### Signature + +```python +async wait(timeout: Optional[float] = None) -> RelayEvent +``` + +#### Parameters + + + +#### Returns + +`RelayEvent` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 84. + +## Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 47. diff --git a/fern/products/sdk-reference/python/signalwire/relay/call/ai-action/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/call/ai-action/index.mdx new file mode 100644 index 0000000000..709a0c459f --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/relay/call/ai-action/index.mdx @@ -0,0 +1,77 @@ +--- +slug: "/reference/python/signalwire/relay/call/ai-action" +title: "AIAction" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.call.AIAction" + parent: "signalwire.relay.call" + module: "signalwire.relay.call" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py" +--- +# `AIAction` + +Handle for an active AI agent session. + +## Signature + +```python +class AIAction(Action) +``` + +## Inheritance + +**Extends:** [Action](/docs/sdk-reference/reference/python/signalwire/relay/call/action) + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(call: 'Call', control_id: str) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 273. + +*** + +### stop + +**Modifiers:** `async` + +#### Signature + +```python +async stop() -> dict +``` + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 280. + +## Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 270. diff --git a/fern/products/sdk-reference/python/signalwire/relay/call/collect-action/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/call/collect-action/index.mdx new file mode 100644 index 0000000000..609e63acf0 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/relay/call/collect-action/index.mdx @@ -0,0 +1,127 @@ +--- +slug: "/reference/python/signalwire/relay/call/collect-action" +title: "CollectAction" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.call.CollectAction" + parent: "signalwire.relay.call" + module: "signalwire.relay.call" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py" +--- +# `CollectAction` + +Handle for play\_and\_collect or standalone collect. + +## Signature + +```python +class CollectAction(Action) +``` + +## Inheritance + +**Extends:** [Action](/docs/sdk-reference/reference/python/signalwire/relay/call/action) + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(call: 'Call', control_id: str) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 158. + +*** + +### start\_input\_timers + +Start the initial\_timeout timer on an active collect. + +**Modifiers:** `async` + +#### Signature + +```python +async start_input_timers() -> dict +``` + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 182. + +*** + +### stop + +**Modifiers:** `async` + +#### Signature + +```python +async stop() -> dict +``` + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 173. + +*** + +### volume + +**Modifiers:** `async` + +#### Signature + +```python +async volume(volume: float) -> dict +``` + +#### Parameters + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 177. + +## Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 155. diff --git a/fern/products/sdk-reference/python/signalwire/relay/call/detect-action/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/call/detect-action/index.mdx new file mode 100644 index 0000000000..e185301c9f --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/relay/call/detect-action/index.mdx @@ -0,0 +1,77 @@ +--- +slug: "/reference/python/signalwire/relay/call/detect-action" +title: "DetectAction" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.call.DetectAction" + parent: "signalwire.relay.call" + module: "signalwire.relay.call" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py" +--- +# `DetectAction` + +Handle for an active detect operation. + +## Signature + +```python +class DetectAction(Action) +``` + +## Inheritance + +**Extends:** [Action](/docs/sdk-reference/reference/python/signalwire/relay/call/action) + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(call: 'Call', control_id: str) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 140. + +*** + +### stop + +**Modifiers:** `async` + +#### Signature + +```python +async stop() -> dict +``` + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 151. + +## Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 137. diff --git a/fern/products/sdk-reference/python/signalwire/relay/call/fax-action/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/call/fax-action/index.mdx new file mode 100644 index 0000000000..e970868448 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/relay/call/fax-action/index.mdx @@ -0,0 +1,79 @@ +--- +slug: "/reference/python/signalwire/relay/call/fax-action" +title: "FaxAction" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.call.FaxAction" + parent: "signalwire.relay.call" + module: "signalwire.relay.call" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py" +--- +# `FaxAction` + +Handle for an active send\_fax or receive\_fax operation. + +## Signature + +```python +class FaxAction(Action) +``` + +## Inheritance + +**Extends:** [Action](/docs/sdk-reference/reference/python/signalwire/relay/call/action) + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(call: 'Call', control_id: str, method_prefix: str) +``` + +#### Parameters + + + + + + + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 216. + +*** + +### stop + +**Modifiers:** `async` + +#### Signature + +```python +async stop() -> dict +``` + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 221. + +## Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 213. diff --git a/fern/products/sdk-reference/python/signalwire/relay/call/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/call/index.mdx new file mode 100644 index 0000000000..bd3f92a2ad --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/relay/call/index.mdx @@ -0,0 +1,2344 @@ +--- +slug: "/reference/python/signalwire/relay/call" +title: "call" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.call" + parent: "signalwire.relay" + module: "signalwire.relay" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py" +--- +# `call` + +Represents a live RELAY call. + +Created by RelayClient on inbound `calling.call.receive` events or +outbound `dial`/`begin` responses. + +## Signature + +```python +class Call +``` + +## Properties + + + + + + + + + + + + + + + + + + + + + + + +## Classes + + + + Base class for async action handles (play, record, detect, etc.). + + + + Handle for an active AI agent session. + + + + Handle for play\_and\_collect or standalone collect. + + + + Handle for an active detect operation. + + + + Handle for an active send\_fax or receive\_fax operation. + + + + Handle for an active pay operation. + + + + Handle for an active play operation. + + + + Handle for an active record operation. + + + + Handle for standalone calling.collect (without play). + + + + Handle for an active stream operation. + + + + Handle for an active tap operation. + + + + Handle for an active transcribe operation. + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + client: 'RelayClient', + call_id: str, + node_id: str, + project_id: str, + context: str, + *, + tag: str = '', + direction: str = '', + device: Optional[dict[str, Any]] = None, + state: str = '', + segment_id: str = '' +) +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 295. + +*** + +### \_\_repr\_\_ + +#### Signature + +```python +__repr__() -> str +``` + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 1527. + +*** + +### ai + +Start an AI agent session on the call. Returns an AIAction. + +**Modifiers:** `async` + +#### Signature + +```python +async ai( + *, + control_id: Optional[str] = None, + agent: Optional[str] = None, + prompt: Optional[dict[str, Any]] = None, + post_prompt: Optional[dict[str, Any]] = None, + post_prompt_url: Optional[str] = None, + post_prompt_auth_user: Optional[str] = None, + post_prompt_auth_password: Optional[str] = None, + global_data: Optional[dict[str, Any]] = None, + pronounce: Optional[list[dict[str, Any]]] = None, + hints: Optional[list[str]] = None, + languages: Optional[list[dict[str, Any]]] = None, + SWAIG: Optional[dict[str, Any]] = None, + ai_params: Optional[dict[str, Any]] = None, + on_completed: Optional[Callable[RelayEvent, Any]] = None, + **kwargs: Any = {} +) -> AIAction +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`AIAction` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 1332. + +*** + +### ai\_hold + +Put an AI agent session on hold. + +**Modifiers:** `async` + +#### Signature + +```python +async ai_hold( + *, + timeout: Optional[str] = None, + prompt: Optional[str] = None, + **kwargs: Any = {} +) -> dict +``` + +#### Parameters + + + + + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 1432. + +*** + +### ai\_message + +Send a message to an active AI agent session. + +**Modifiers:** `async` + +#### Signature + +```python +async ai_message( + *, + message_text: Optional[str] = None, + role: Optional[str] = None, + reset: Optional[dict[str, Any]] = None, + global_data: Optional[dict[str, Any]] = None, + **kwargs: Any = {} +) -> dict +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 1410. + +*** + +### ai\_unhold + +Resume an AI agent session from hold. + +**Modifiers:** `async` + +#### Signature + +```python +async ai_unhold(*, prompt: Optional[str] = None, **kwargs: Any = {}) -> dict +``` + +#### Parameters + + + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 1448. + +*** + +### amazon\_bedrock + +Connect to an Amazon Bedrock AI agent. + +**Modifiers:** `async` + +#### Signature + +```python +async amazon_bedrock( + *, + prompt: Optional[Any] = None, + SWAIG: Optional[dict[str, Any]] = None, + ai_params: Optional[dict[str, Any]] = None, + global_data: Optional[dict[str, Any]] = None, + post_prompt: Optional[dict[str, Any]] = None, + post_prompt_url: Optional[str] = None, + **kwargs: Any = {} +) -> dict +``` + +#### Parameters + + + + + + + + + + + + + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 1382. + +*** + +### answer + +Answer an inbound call. + +**Modifiers:** `async` + +#### Signature + +```python +async answer(**kwargs: Any = {}) -> dict +``` + +#### Parameters + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 482. + +*** + +### bind\_digit + +Bind a DTMF digit sequence to trigger a RELAY method. + +**Modifiers:** `async` + +#### Signature + +```python +async bind_digit( + digits: str, + bind_method: str, + *, + bind_params: Optional[dict[str, Any]] = None, + realm: Optional[str] = None, + max_triggers: Optional[int] = None, + **kwargs: Any = {} +) -> dict +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 1241. + +*** + +### clear\_digit\_bindings + +Clear all digit bindings, optionally filtered by realm. + +**Modifiers:** `async` + +#### Signature + +```python +async clear_digit_bindings( + *, + realm: Optional[str] = None, + **kwargs: Any = {} +) -> dict +``` + +#### Parameters + + + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 1265. + +*** + +### collect + +Collect digit/speech input without playing media. + +**Modifiers:** `async` + +#### Signature + +```python +async collect( + *, + digits: Optional[dict[str, Any]] = None, + speech: Optional[dict[str, Any]] = None, + initial_timeout: Optional[float] = None, + partial_results: Optional[bool] = None, + continuous: Optional[bool] = None, + send_start_of_input: Optional[bool] = None, + start_input_timers: Optional[bool] = None, + control_id: Optional[str] = None, + on_completed: Optional[Callable[RelayEvent, Any]] = None, + **kwargs: Any = {} +) -> StandaloneCollectAction +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`StandaloneCollectAction` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 779. + +*** + +### connect + +Bridge the call to one or more destinations. + +**Modifiers:** `async` + +#### Signature + +```python +async connect( + devices: list[list[dict[str, Any]]], + *, + ringback: Optional[list[dict[str, Any]]] = None, + tag: Optional[str] = None, + max_duration: Optional[int] = None, + max_price_per_minute: Optional[float] = None, + status_url: Optional[str] = None, + **kwargs: Any = {} +) -> dict +``` + +#### Parameters + + + + + + + + + + + + + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 818. + +*** + +### denoise + +Start noise reduction on the call. + +**Modifiers:** `async` + +#### Signature + +```python +async denoise() -> dict +``` + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 1188. + +*** + +### denoise\_stop + +Stop noise reduction on the call. + +**Modifiers:** `async` + +#### Signature + +```python +async denoise_stop() -> dict +``` + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 1192. + +*** + +### detect + +Start audio detection (machine, fax, digit). Returns a DetectAction. + +**Modifiers:** `async` + +#### Signature + +```python +async detect( + detect: dict[str, Any], + *, + timeout: Optional[float] = None, + control_id: Optional[str] = None, + on_completed: Optional[Callable[RelayEvent, Any]] = None, + **kwargs: Any = {} +) -> DetectAction +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`DetectAction` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 868. + +*** + +### detect\_answering\_machine + +Detect human vs answering machine (AMD). Typed convenience over :meth:`detect`. + +**Modifiers:** `async` + +#### Signature + +```python +async detect_answering_machine( + *, + initial_timeout: Optional[float] = None, + end_silence_timeout: Optional[float] = None, + machine_voice_threshold: Optional[float] = None, + machine_words_threshold: Optional[int] = None, + detect_interruptions: Optional[bool] = None, + detect_message_end: Optional[bool] = None, + timeout: Optional[float] = None, + on_completed: Optional[Callable[RelayEvent, Any]] = None +) -> DetectAction +``` + +#### Parameters + + + + + + + + + + + + + + + + + +#### Returns + +`DetectAction` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 609. + +*** + +### detect\_digit + +Detect DTMF digits. Typed convenience over :meth:`detect`. + +**Modifiers:** `async` + +#### Signature + +```python +async detect_digit( + *, + digits: Optional[str] = None, + timeout: Optional[float] = None, + on_completed: Optional[Callable[RelayEvent, Any]] = None +) -> DetectAction +``` + +#### Parameters + + + + + + + +#### Returns + +`DetectAction` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 594. + +*** + +### detect\_fax + +Detect a fax tone (CED/CNG). Typed convenience over :meth:`detect`. + +**Modifiers:** `async` + +#### Signature + +```python +async detect_fax( + *, + tone: Optional[str] = None, + timeout: Optional[float] = None, + on_completed: Optional[Callable[RelayEvent, Any]] = None +) -> DetectAction +``` + +#### Parameters + + + + + + + +#### Returns + +`DetectAction` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 637. + +*** + +### disconnect + +Disconnect (unbridge) a connected call. + +**Modifiers:** `async` + +#### Signature + +```python +async disconnect() -> dict +``` + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 844. + +*** + +### echo + +Echo audio back to the caller (useful for testing). + +**Modifiers:** `async` + +#### Signature + +```python +async echo( + *, + timeout: Optional[float] = None, + status_url: Optional[str] = None, + **kwargs: Any = {} +) -> dict +``` + +#### Parameters + + + + + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 1221. + +*** + +### hangup + +End/hang up the call. + +**Modifiers:** `async` + +#### Signature + +```python +async hangup(reason: str = 'hangup') -> dict +``` + +#### Parameters + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 486. + +*** + +### hold + +Put the call on hold. + +**Modifiers:** `async` + +#### Signature + +```python +async hold() -> dict +``` + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 1176. + +*** + +### join\_conference + +Join an ad-hoc audio conference. + +**Modifiers:** `async` + +#### Signature + +```python +async join_conference( + name: str, + *, + muted: Optional[bool] = None, + beep: Optional[str] = None, + start_on_enter: Optional[bool] = None, + end_on_exit: Optional[bool] = None, + wait_url: Optional[str] = None, + max_participants: Optional[int] = None, + record: Optional[str] = None, + region: Optional[str] = None, + trim: Optional[str] = None, + coach: Optional[str] = None, + status_callback: Optional[str] = None, + status_callback_event: Optional[str] = None, + status_callback_event_type: Optional[str] = None, + status_callback_method: Optional[str] = None, + recording_status_callback: Optional[str] = None, + recording_status_callback_event: Optional[str] = None, + recording_status_callback_event_type: Optional[str] = None, + recording_status_callback_method: Optional[str] = None, + stream_obj: Optional[dict[str, Any]] = None, + **kwargs: Any = {} +) -> dict +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 1098. + +*** + +### join\_room + +Join a video/audio room. + +**Modifiers:** `async` + +#### Signature + +```python +async join_room( + name: str, + *, + status_url: Optional[str] = None, + **kwargs: Any = {} +) -> dict +``` + +#### Parameters + + + + + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 1310. + +*** + +### leave\_conference + +Leave an audio conference. + +**Modifiers:** `async` + +#### Signature + +```python +async leave_conference(conference_id: str, **kwargs: Any = {}) -> dict +``` + +#### Parameters + + + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 1166. + +*** + +### leave\_room + +Leave the current room. + +**Modifiers:** `async` + +#### Signature + +```python +async leave_room(**kwargs: Any = {}) -> dict +``` + +#### Parameters + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 1324. + +*** + +### live\_transcribe + +Start or stop live transcription on the call. + +**Modifiers:** `async` + +#### Signature + +```python +async live_transcribe(action: dict[str, Any], **kwargs: Any = {}) -> dict +``` + +#### Parameters + + + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 1282. + +*** + +### live\_translate + +Start or stop live translation on the call. + +**Modifiers:** `async` + +#### Signature + +```python +async live_translate( + action: dict[str, Any], + *, + status_url: Optional[str] = None, + **kwargs: Any = {} +) -> dict +``` + +#### Parameters + + + + + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 1292. + +*** + +### on + +Register an event listener for this call. + +#### Signature + +```python +on(event_type: str, handler: EventHandler) -> None +``` + +#### Parameters + + + + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 361. + +*** + +### pass\_ + +Decline control of an inbound call, returning it to routing. + +**Modifiers:** `async` + +#### Signature + +```python +async pass_() -> dict +``` + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 490. + +*** + +### pay + +Start a payment collection. Returns a PayAction. + +**Modifiers:** `async` + +#### Signature + +```python +async pay( + payment_connector_url: str, + *, + control_id: Optional[str] = None, + input_method: Optional[str] = None, + status_url: Optional[str] = None, + payment_method: Optional[str] = None, + timeout: Optional[str] = None, + max_attempts: Optional[str] = None, + security_code: Optional[str] = None, + postal_code: Optional[str] = None, + min_postal_code_length: Optional[str] = None, + token_type: Optional[str] = None, + charge_amount: Optional[str] = None, + currency: Optional[str] = None, + language: Optional[str] = None, + voice: Optional[str] = None, + description: Optional[str] = None, + valid_card_types: Optional[str] = None, + parameters: Optional[list[dict[str, Any]]] = None, + prompts: Optional[list[dict[str, Any]]] = None, + on_completed: Optional[Callable[RelayEvent, Any]] = None, + **kwargs: Any = {} +) -> PayAction +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`PayAction` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 908. + +*** + +### play + +Play audio content. Returns a PlayAction for stop/pause/resume/wait. + +**Modifiers:** `async` + +#### Signature + +```python +async play( + media: list[dict[str, Any]], + *, + volume: Optional[float] = None, + direction: Optional[str] = None, + loop: Optional[int] = None, + control_id: Optional[str] = None, + on_completed: Optional[Callable[RelayEvent, Any]] = None, + **kwargs: Any = {} +) -> PlayAction +``` + +#### Parameters + + + + + + + + + + + + + + + +#### Returns + +`PlayAction` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 498. + +*** + +### play\_and\_collect + +Play audio and collect digit/speech input. + +**Modifiers:** `async` + +#### Signature + +```python +async play_and_collect( + media: list[dict[str, Any]], + collect: dict[str, Any], + *, + volume: Optional[float] = None, + control_id: Optional[str] = None, + on_completed: Optional[Callable[RelayEvent, Any]] = None, + **kwargs: Any = {} +) -> CollectAction +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`CollectAction` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 756. + +*** + +### play\_audio + +Play an audio file from a URL. Typed convenience over :meth:`play`. + +**Modifiers:** `async` + +#### Signature + +```python +async play_audio( + url: str, + *, + volume: Optional[float] = None, + on_completed: Optional[Callable[RelayEvent, Any]] = None +) -> PlayAction +``` + +#### Parameters + + + + + + + +#### Returns + +`PlayAction` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 548. + +*** + +### play\_ringtone + +Play a named ringtone by country code. Typed convenience over :meth:`play`. + +**Modifiers:** `async` + +#### Signature + +```python +async play_ringtone( + name: str, + *, + duration: Optional[float] = None, + volume: Optional[float] = None, + on_completed: Optional[Callable[RelayEvent, Any]] = None +) -> PlayAction +``` + +#### Parameters + + + + + + + + + +#### Returns + +`PlayAction` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 574. + +*** + +### play\_silence + +Play silence for `duration` seconds. Typed convenience over :meth:`play`. + +**Modifiers:** `async` + +#### Signature + +```python +async play_silence( + duration: float, + *, + on_completed: Optional[Callable[RelayEvent, Any]] = None +) -> PlayAction +``` + +#### Parameters + + + + + +#### Returns + +`PlayAction` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 562. + +*** + +### play\_tts + +Play text-to-speech. Typed convenience over :meth:`play`. + +Restores the legacy `call.play_tts(text=...)` ergonomics so callers +don't hand-build the `{"type": "tts", "params": {...}}` media shape. + +**Modifiers:** `async` + +#### Signature + +```python +async play_tts( + text: str, + *, + language: Optional[str] = None, + gender: Optional[str] = None, + voice: Optional[str] = None, + volume: Optional[float] = None, + on_completed: Optional[Callable[RelayEvent, Any]] = None +) -> PlayAction +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`PlayAction` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 522. + +*** + +### prompt\_audio + +Play an audio file then collect input. Typed media over :meth:`play_and_collect`. + +**Modifiers:** `async` + +#### Signature + +```python +async prompt_audio( + url: str, + collect: dict[str, Any], + *, + volume: Optional[float] = None, + on_completed: Optional[Callable[RelayEvent, Any]] = None +) -> CollectAction +``` + +#### Parameters + + + + + + + + + +#### Returns + +`CollectAction` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 679. + +*** + +### prompt\_tts + +Play TTS then collect input. Typed media over :meth:`play_and_collect`. + +**Modifiers:** `async` + +#### Signature + +```python +async prompt_tts( + text: str, + collect: dict[str, Any], + *, + language: Optional[str] = None, + gender: Optional[str] = None, + voice: Optional[str] = None, + volume: Optional[float] = None, + on_completed: Optional[Callable[RelayEvent, Any]] = None +) -> CollectAction +``` + +#### Parameters + + + + + + + + + + + + + + + +#### Returns + +`CollectAction` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 656. + +*** + +### queue\_enter + +Place the call in a queue. + +**Modifiers:** `async` + +#### Signature + +```python +async queue_enter( + queue_name: str, + *, + control_id: Optional[str] = None, + status_url: Optional[str] = None, + **kwargs: Any = {} +) -> dict +``` + +#### Parameters + + + + + + + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 1482. + +*** + +### queue\_leave + +Remove the call from a queue. + +**Modifiers:** `async` + +#### Signature + +```python +async queue_leave( + queue_name: str, + *, + control_id: Optional[str] = None, + queue_id: Optional[str] = None, + status_url: Optional[str] = None, + **kwargs: Any = {} +) -> dict +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 1501. + +*** + +### receive\_fax + +Receive a fax. Returns a FaxAction. + +**Modifiers:** `async` + +#### Signature + +```python +async receive_fax( + *, + control_id: Optional[str] = None, + on_completed: Optional[Callable[RelayEvent, Any]] = None, + **kwargs: Any = {} +) -> FaxAction +``` + +#### Parameters + + + + + + + +#### Returns + +`FaxAction` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 1002. + +*** + +### record + +Record audio from the call. Returns a RecordAction. + +**Modifiers:** `async` + +#### Signature + +```python +async record( + audio: Optional[dict[str, Any]] = None, + *, + control_id: Optional[str] = None, + on_completed: Optional[Callable[RelayEvent, Any]] = None, + **kwargs: Any = {} +) -> RecordAction +``` + +#### Parameters + + + + + + + + + +#### Returns + +`RecordAction` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 736. + +*** + +### refer + +Transfer a SIP call to an external SIP endpoint via REFER. + +**Modifiers:** `async` + +#### Signature + +```python +async refer( + device: dict[str, Any], + *, + status_url: Optional[str] = None, + **kwargs: Any = {} +) -> dict +``` + +#### Parameters + + + + + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 890. + +*** + +### send\_digits + +Send DTMF digits on the call. + +**Modifiers:** `async` + +#### Signature + +```python +async send_digits(digits: str, *, control_id: Optional[str] = None) -> dict +``` + +#### Parameters + + + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 852. + +*** + +### send\_fax + +Send a fax document. Returns a FaxAction. + +**Modifiers:** `async` + +#### Signature + +```python +async send_fax( + document: str, + *, + identity: Optional[str] = None, + header_info: Optional[str] = None, + control_id: Optional[str] = None, + on_completed: Optional[Callable[RelayEvent, Any]] = None, + **kwargs: Any = {} +) -> FaxAction +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`FaxAction` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 981. + +*** + +### stream + +Start streaming call audio to a WebSocket endpoint. Returns a StreamAction. + +**Modifiers:** `async` + +#### Signature + +```python +async stream( + url: str, + *, + name: Optional[str] = None, + codec: Optional[str] = None, + track: Optional[str] = None, + status_url: Optional[str] = None, + status_url_method: Optional[str] = None, + authorization_bearer_token: Optional[str] = None, + custom_parameters: Optional[dict[str, Any]] = None, + control_id: Optional[str] = None, + on_completed: Optional[Callable[RelayEvent, Any]] = None, + **kwargs: Any = {} +) -> StreamAction +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`StreamAction` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 1044. + +*** + +### tap + +Intercept call media and stream it. Returns a TapAction. + +**Modifiers:** `async` + +#### Signature + +```python +async tap( + tap: dict[str, Any], + device: dict[str, Any], + *, + control_id: Optional[str] = None, + on_completed: Optional[Callable[RelayEvent, Any]] = None, + **kwargs: Any = {} +) -> TapAction +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`TapAction` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 1020. + +*** + +### transcribe + +Start transcribing the call. Returns a TranscribeAction. + +**Modifiers:** `async` + +#### Signature + +```python +async transcribe( + *, + control_id: Optional[str] = None, + status_url: Optional[str] = None, + on_completed: Optional[Callable[RelayEvent, Any]] = None, + **kwargs: Any = {} +) -> TranscribeAction +``` + +#### Parameters + + + + + + + + + +#### Returns + +`TranscribeAction` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 1200. + +*** + +### transfer + +Transfer call control to another RELAY app or SWML script. + +**Modifiers:** `async` + +#### Signature + +```python +async transfer(dest: str, **kwargs: Any = {}) -> dict +``` + +#### Parameters + + + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 1084. + +*** + +### unhold + +Release the call from hold. + +**Modifiers:** `async` + +#### Signature + +```python +async unhold() -> dict +``` + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 1180. + +*** + +### user\_event + +Send a custom user-defined event. + +**Modifiers:** `async` + +#### Signature + +```python +async user_event(*, event: Optional[str] = None, **kwargs: Any = {}) -> dict +``` + +#### Parameters + + + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 1465. + +*** + +### wait\_for + +Wait for a specific event, optionally filtered by predicate. + +**Modifiers:** `async` + +#### Signature + +```python +async wait_for( + event_type: str, + predicate: Optional[Callable[RelayEvent, bool]] = None, + timeout: Optional[float] = None +) -> RelayEvent +``` + +#### Parameters + + + + + + + +#### Returns + +`RelayEvent` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 395. + +*** + +### wait\_for\_answered + +Wait until the call is answered (immediate if already answered or past it). + +**Modifiers:** `async` + +#### Signature + +```python +async wait_for_answered(timeout: Optional[float] = None) -> RelayEvent +``` + +#### Parameters + + + +#### Returns + +`RelayEvent` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 720. + +*** + +### wait\_for\_ended + +Wait for the call to reach the ended state. + +**Modifiers:** `async` + +#### Signature + +```python +async wait_for_ended(timeout: Optional[float] = None) -> RelayEvent +``` + +#### Parameters + + + +#### Returns + +`RelayEvent` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 423. + +*** + +### wait\_for\_ending + +Wait until the call is ending (immediate if already ending or past it). + +**Modifiers:** `async` + +#### Signature + +```python +async wait_for_ending(timeout: Optional[float] = None) -> RelayEvent +``` + +#### Parameters + + + +#### Returns + +`RelayEvent` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 728. + +*** + +### wait\_for\_ringing + +Wait until the call is ringing (immediate if already ringing or past it). + +**Modifiers:** `async` + +#### Signature + +```python +async wait_for_ringing(timeout: Optional[float] = None) -> RelayEvent +``` + +#### Parameters + + + +#### Returns + +`RelayEvent` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 724. + +## Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 288. diff --git a/fern/products/sdk-reference/python/signalwire/relay/call/pay-action/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/call/pay-action/index.mdx new file mode 100644 index 0000000000..bf79be530b --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/relay/call/pay-action/index.mdx @@ -0,0 +1,77 @@ +--- +slug: "/reference/python/signalwire/relay/call/pay-action" +title: "PayAction" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.call.PayAction" + parent: "signalwire.relay.call" + module: "signalwire.relay.call" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py" +--- +# `PayAction` + +Handle for an active pay operation. + +## Signature + +```python +class PayAction(Action) +``` + +## Inheritance + +**Extends:** [Action](/docs/sdk-reference/reference/python/signalwire/relay/call/action) + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(call: 'Call', control_id: str) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 251. + +*** + +### stop + +**Modifiers:** `async` + +#### Signature + +```python +async stop() -> dict +``` + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 255. + +## Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 248. diff --git a/fern/products/sdk-reference/python/signalwire/relay/call/play-action/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/call/play-action/index.mdx new file mode 100644 index 0000000000..08f7fce79a --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/relay/call/play-action/index.mdx @@ -0,0 +1,147 @@ +--- +slug: "/reference/python/signalwire/relay/call/play-action" +title: "PlayAction" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.call.PlayAction" + parent: "signalwire.relay.call" + module: "signalwire.relay.call" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py" +--- +# `PlayAction` + +Handle for an active play operation. + +## Signature + +```python +class PlayAction(Action) +``` + +## Inheritance + +**Extends:** [Action](/docs/sdk-reference/reference/python/signalwire/relay/call/action) + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(call: 'Call', control_id: str) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 98. + +*** + +### pause + +**Modifiers:** `async` + +#### Signature + +```python +async pause() -> dict +``` + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 105. + +*** + +### resume + +**Modifiers:** `async` + +#### Signature + +```python +async resume() -> dict +``` + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 108. + +*** + +### stop + +**Modifiers:** `async` + +#### Signature + +```python +async stop() -> dict +``` + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 102. + +*** + +### volume + +**Modifiers:** `async` + +#### Signature + +```python +async volume(volume: float) -> dict +``` + +#### Parameters + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 111. + +## Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 95. diff --git a/fern/products/sdk-reference/python/signalwire/relay/call/record-action/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/call/record-action/index.mdx new file mode 100644 index 0000000000..a55c7839d8 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/relay/call/record-action/index.mdx @@ -0,0 +1,125 @@ +--- +slug: "/reference/python/signalwire/relay/call/record-action" +title: "RecordAction" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.call.RecordAction" + parent: "signalwire.relay.call" + module: "signalwire.relay.call" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py" +--- +# `RecordAction` + +Handle for an active record operation. + +## Signature + +```python +class RecordAction(Action) +``` + +## Inheritance + +**Extends:** [Action](/docs/sdk-reference/reference/python/signalwire/relay/call/action) + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(call: 'Call', control_id: str) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 120. + +*** + +### pause + +**Modifiers:** `async` + +#### Signature + +```python +async pause(behavior: Optional[str] = None) -> dict +``` + +#### Parameters + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 127. + +*** + +### resume + +**Modifiers:** `async` + +#### Signature + +```python +async resume() -> dict +``` + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 133. + +*** + +### stop + +**Modifiers:** `async` + +#### Signature + +```python +async stop() -> dict +``` + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 124. + +## Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 117. diff --git a/fern/products/sdk-reference/python/signalwire/relay/call/standalone-collect-action/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/call/standalone-collect-action/index.mdx new file mode 100644 index 0000000000..fe3573a388 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/relay/call/standalone-collect-action/index.mdx @@ -0,0 +1,101 @@ +--- +slug: "/reference/python/signalwire/relay/call/standalone-collect-action" +title: "StandaloneCollectAction" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.call.StandaloneCollectAction" + parent: "signalwire.relay.call" + module: "signalwire.relay.call" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py" +--- +# `StandaloneCollectAction` + +Handle for standalone calling.collect (without play). + +## Signature + +```python +class StandaloneCollectAction(Action) +``` + +## Inheritance + +**Extends:** [Action](/docs/sdk-reference/reference/python/signalwire/relay/call/action) + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(call: 'Call', control_id: str) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 191. + +*** + +### start\_input\_timers + +Start the initial\_timeout timer on an active collect. + +**Modifiers:** `async` + +#### Signature + +```python +async start_input_timers() -> dict +``` + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 207. + +*** + +### stop + +**Modifiers:** `async` + +#### Signature + +```python +async stop() -> dict +``` + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 203. + +## Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 188. diff --git a/fern/products/sdk-reference/python/signalwire/relay/call/stream-action/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/call/stream-action/index.mdx new file mode 100644 index 0000000000..e4aac7bcea --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/relay/call/stream-action/index.mdx @@ -0,0 +1,77 @@ +--- +slug: "/reference/python/signalwire/relay/call/stream-action" +title: "StreamAction" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.call.StreamAction" + parent: "signalwire.relay.call" + module: "signalwire.relay.call" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py" +--- +# `StreamAction` + +Handle for an active stream operation. + +## Signature + +```python +class StreamAction(Action) +``` + +## Inheritance + +**Extends:** [Action](/docs/sdk-reference/reference/python/signalwire/relay/call/action) + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(call: 'Call', control_id: str) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 240. + +*** + +### stop + +**Modifiers:** `async` + +#### Signature + +```python +async stop() -> dict +``` + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 244. + +## Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 237. diff --git a/fern/products/sdk-reference/python/signalwire/relay/call/tap-action/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/call/tap-action/index.mdx new file mode 100644 index 0000000000..987d311082 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/relay/call/tap-action/index.mdx @@ -0,0 +1,77 @@ +--- +slug: "/reference/python/signalwire/relay/call/tap-action" +title: "TapAction" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.call.TapAction" + parent: "signalwire.relay.call" + module: "signalwire.relay.call" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py" +--- +# `TapAction` + +Handle for an active tap operation. + +## Signature + +```python +class TapAction(Action) +``` + +## Inheritance + +**Extends:** [Action](/docs/sdk-reference/reference/python/signalwire/relay/call/action) + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(call: 'Call', control_id: str) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 229. + +*** + +### stop + +**Modifiers:** `async` + +#### Signature + +```python +async stop() -> dict +``` + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 233. + +## Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 226. diff --git a/fern/products/sdk-reference/python/signalwire/relay/call/transcribe-action/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/call/transcribe-action/index.mdx new file mode 100644 index 0000000000..8340ec78e2 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/relay/call/transcribe-action/index.mdx @@ -0,0 +1,77 @@ +--- +slug: "/reference/python/signalwire/relay/call/transcribe-action" +title: "TranscribeAction" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.call.TranscribeAction" + parent: "signalwire.relay.call" + module: "signalwire.relay.call" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py" +--- +# `TranscribeAction` + +Handle for an active transcribe operation. + +## Signature + +```python +class TranscribeAction(Action) +``` + +## Inheritance + +**Extends:** [Action](/docs/sdk-reference/reference/python/signalwire/relay/call/action) + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(call: 'Call', control_id: str) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 262. + +*** + +### stop + +**Modifiers:** `async` + +#### Signature + +```python +async stop() -> dict +``` + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 266. + +## Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 259. diff --git a/fern/products/sdk-reference/python/signalwire/relay/client/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/client/index.mdx new file mode 100644 index 0000000000..1f895d9394 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/relay/client/index.mdx @@ -0,0 +1,65 @@ +--- +slug: "/reference/python/signalwire/relay/client" +title: "client" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.relay.client" + parent: "signalwire.relay" + module: "signalwire.relay" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/client.py" +--- +# `client` + +RelayClient — WebSocket + JSON-RPC 2.0 protocol + event dispatch. + +One instance = one persistent WebSocket connection to SignalWire RELAY. + +Architecture notes (mirrors the JS SDK): + +- JSON-RPC requests are tracked by `id` in `_pending`; responses resolve + the corresponding Future. +- `signalwire.event` messages are acknowledged back to the server (event ACK) + and then dispatched by `event_type` → Call object → Action object. +- Each Action registers with a `control_id` and listens for its own + event\_type (e.g. `calling.call.play`). Actions filter events by + `control_id` so multiple concurrent actions on the same call work. +- Result code checking accepts any 2xx (matching the JS SDK regex /^2\[0-9]\[0-9]$/). + `signalwire.connect` responses skip code checking entirely. +- Execute has a configurable timeout (default 10s) to detect half-open connections. +- Requests made while disconnected are queued and flushed after re-auth. +- Server pings are tracked; if no ping arrives within the check interval the + connection is assumed half-open and force-closed for reconnect. + +## Signature + +```python +module client +``` + +## Properties + + + + + + + +## Classes + + + + Manages a WebSocket connection to SignalWire RELAY. + + + + Error returned by the RELAY server. + + + +## Source + +[`signalwire/signalwire/relay/client.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/client.py) diff --git a/fern/products/sdk-reference/python/signalwire/relay/client/relay-client/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/client/relay-client/index.mdx new file mode 100644 index 0000000000..fe4d2cbc35 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/relay/client/relay-client/index.mdx @@ -0,0 +1,526 @@ +--- +slug: "/reference/python/signalwire/relay/client/relay-client" +title: "RelayClient" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.client.RelayClient" + parent: "signalwire.relay.client" + module: "signalwire.relay.client" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/client.py" +--- +# `RelayClient` + +Manages a WebSocket connection to SignalWire RELAY. + +Usage:: + +``` +client = RelayClient(project="...", token="...", contexts=["default"]) + +@client.on_call +async def handle(call): + await call.answer() + await call.hangup() + +client.run() +``` + +## Signature + +```python +class RelayClient +``` + +## Examples + +```python +client = RelayClient(project="...", token="...", contexts=["default"]) + +@client.on_call +async def handle(call): + await call.answer() + await call.hangup() + +client.run() +``` + +## Properties + + + + + + + + + + + Server-assigned protocol string from the connect response. + + + + +## Methods + +### \_\_aenter\_\_ + +**Modifiers:** `async` + +#### Signature + +```python +async __aenter__() -> 'RelayClient' +``` + +#### Returns + +`'RelayClient'` + +#### Source + +[`signalwire/signalwire/relay/client.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/client.py) + +Line 186. + +*** + +### \_\_aexit\_\_ + +**Modifiers:** `async` + +#### Signature + +```python +async __aexit__(*exc: Any = ()) -> None +``` + +#### Parameters + + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/relay/client.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/client.py) + +Line 190. + +*** + +### \_\_del\_\_ + +#### Signature + +```python +__del__() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/relay/client.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/client.py) + +Line 183. + +*** + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + project: Optional[str] = None, + token: Optional[str] = None, + jwt_token: Optional[str] = None, + host: Optional[str] = None, + contexts: Optional[list[str]] = None, + max_active_calls: Optional[int] = None +) +``` + +#### Parameters + + + + + + + + + + + + + +#### Source + +[`signalwire/signalwire/relay/client.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/client.py) + +Line 106. + +*** + +### connect + +Connect to RELAY and authenticate. + +**Modifiers:** `async` + +#### Signature + +```python +async connect() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/relay/client.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/client.py) + +Line 216. + +*** + +### dial + +Initiate an outbound call using dial. Returns a Call object. + +The `calling.dial` RPC response only contains +`{"code": "200", "message": "Dialing"}` — no call\_id. The real +call\_id and node\_id arrive via `calling.call.dial` events +matched by `tag`. This method waits for that event so the +returned Call always has valid identifiers. + +**Modifiers:** `async` + +#### Signature + +```python +async dial( + devices: list[list[dict[str, Any]]], + *, + tag: Optional[str] = None, + max_duration: Optional[int] = None, + dial_timeout: Optional[float] = None +) -> Call +``` + +#### Parameters + + + Array of device lists (serial/parallel dial). + + + + Client-provided tag for event correlation. Auto-generated if not supplied. + + + + Optional max call duration in minutes. + + + + How long (seconds) to wait for the dial to complete before raising TimeoutError. Defaults to 120s. + + +#### Returns + +`Call` + +#### Source + +[`signalwire/signalwire/relay/client.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/client.py) + +Line 343. + +*** + +### disconnect + +Cleanly close the connection. + +**Modifiers:** `async` + +#### Signature + +```python +async disconnect() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/relay/client.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/client.py) + +Line 286. + +*** + +### execute + +Send a JSON-RPC request and await the response. + +For calling methods, `method` is the full name (e.g. +`"calling.answer"`, `"calling.play"`) with `node_id` +and `call_id` in `params`. + +If the connection is not ready, the request is queued and sent +after re-authentication completes. + +**Modifiers:** `async` + +#### Signature + +```python +async execute(method: str, params: dict[str, Any]) -> dict +``` + +#### Parameters + + + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/client.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/client.py) + +Line 331. + +*** + +### on\_call + +Register the inbound call handler (decorator). + +#### Signature + +```python +on_call(handler: CallHandler) -> CallHandler +``` + +#### Parameters + + + +#### Returns + +`CallHandler` + +#### Source + +[`signalwire/signalwire/relay/client.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/client.py) + +Line 202. + +*** + +### on\_message + +Register the inbound message handler (decorator). + +#### Signature + +```python +on_message(handler: MessageHandler) -> MessageHandler +``` + +#### Parameters + + + +#### Returns + +`MessageHandler` + +#### Source + +[`signalwire/signalwire/relay/client.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/client.py) + +Line 207. + +*** + +### receive + +Subscribe to additional contexts for inbound events. + +Sends `signalwire.receive` on the assigned protocol to start +receiving inbound calls on the given contexts. Can be called +after `connect()` to dynamically add contexts without reconnecting. + +**Modifiers:** `async` + +#### Signature + +```python +async receive(contexts: list[str]) -> None +``` + +#### Parameters + + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/relay/client.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/client.py) + +Line 481. + +*** + +### run + +Blocking entry point — runs the event loop until interrupted. + +#### Signature + +```python +run() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/relay/client.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/client.py) + +Line 512. + +*** + +### send\_message + +Send an outbound SMS/MMS message. + +At least one of `body` or `media` must be provided. + +Returns a Message object that tracks state changes. Use +`await message.wait()` to block until delivery confirmation +(or failure). + +**Modifiers:** `async` + +#### Signature + +```python +async send_message( + *, + to_number: str, + from_number: str, + context: Optional[str] = None, + body: Optional[str] = None, + media: Optional[list[str]] = None, + tags: Optional[list[str]] = None, + region: Optional[str] = None, + on_completed: Optional[Callable] = None +) -> Message +``` + +#### Parameters + + + Destination phone number in E.164 format. + + + + Sender phone number in E.164 format. + + + + Context for receiving state events. Defaults to the relay protocol. + + + + Text body of the message. + + + + List of media URLs for MMS. + + + + Optional tags for the message. + + + + Optional origination region. + + + + Optional callback fired when a terminal state (delivered/undelivered/failed) is reached. + + +#### Returns + +`Message` + +#### Source + +[`signalwire/signalwire/relay/client.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/client.py) + +Line 406. + +*** + +### unreceive + +Unsubscribe from contexts for inbound events. + +Sends `signalwire.unreceive` to stop receiving inbound calls +on the given contexts. + +**Modifiers:** `async` + +#### Signature + +```python +async unreceive(contexts: list[str]) -> None +``` + +#### Parameters + + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/relay/client.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/client.py) + +Line 495. + +## Source + +[`signalwire/signalwire/relay/client.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/client.py) + +Line 91. diff --git a/fern/products/sdk-reference/python/signalwire/relay/client/relay-error/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/client/relay-error/index.mdx new file mode 100644 index 0000000000..eb28142568 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/relay/client/relay-error/index.mdx @@ -0,0 +1,61 @@ +--- +slug: "/reference/python/signalwire/relay/client/relay-error" +title: "RelayError" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.client.RelayError" + parent: "signalwire.relay.client" + module: "signalwire.relay.client" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/client.py" +--- +# `RelayError` + +Error returned by the RELAY server. + +## Signature + +```python +class RelayError(Exception) +``` + +## Inheritance + +**Extends:** `Exception` + +## Properties + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(code: int, message: str) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/relay/client.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/client.py) + +Line 1109. + +## Source + +[`signalwire/signalwire/relay/client.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/client.py) + +Line 1106. diff --git a/fern/products/sdk-reference/python/signalwire/relay/constants/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/constants/index.mdx new file mode 100644 index 0000000000..a69b061985 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/relay/constants/index.mdx @@ -0,0 +1,183 @@ +--- +slug: "/reference/python/signalwire/relay/constants" +title: "constants" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.relay.constants" + parent: "signalwire.relay" + module: "signalwire.relay" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/constants.py" +--- +# `constants` + +Protocol constants for the SignalWire RELAY calling API. + +## Signature + +```python +module constants +``` + +## Constants + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## Source + +[`signalwire/signalwire/relay/constants.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/constants.py) diff --git a/fern/products/sdk-reference/python/signalwire/relay/event/call-receive-event/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/event/call-receive-event/index.mdx new file mode 100644 index 0000000000..04ce72dd69 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/relay/event/call-receive-event/index.mdx @@ -0,0 +1,139 @@ +--- +slug: "/reference/python/signalwire/relay/event/call-receive-event" +title: "CallReceiveEvent" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.event.CallReceiveEvent" + parent: "signalwire.relay.event" + module: "signalwire.relay.event" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" +--- +# `CallReceiveEvent` + +Event for calling.call.receive — inbound call notification. + +**Modifiers:** `dataclass` + +**Decorators:** `@dataclass` + +## Signature + +```python +class CallReceiveEvent(RelayEvent) +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/python/signalwire/relay/event/relay-event) + +## Properties + + + + + + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + event_type: str, + params: dict[str, Any], + call_id: str = '', + timestamp: float = 0.0, + call_state: str = '', + direction: str = '', + device: dict[str, Any] = dict(), + node_id: str = '', + project_id: str = '', + context: str = '', + segment_id: str = '', + tag: str = '' +) -> None +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +*** + +### from\_payload + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +from_payload(payload: dict[str, Any]) -> 'CallReceiveEvent' +``` + +#### Parameters + + + +#### Returns + +`'CallReceiveEvent'` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 72. + +## Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 59. diff --git a/fern/products/sdk-reference/python/signalwire/relay/event/call-state-event/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/event/call-state-event/index.mdx new file mode 100644 index 0000000000..c321fcdcb4 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/relay/event/call-state-event/index.mdx @@ -0,0 +1,119 @@ +--- +slug: "/reference/python/signalwire/relay/event/call-state-event" +title: "CallStateEvent" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.event.CallStateEvent" + parent: "signalwire.relay.event" + module: "signalwire.relay.event" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" +--- +# `CallStateEvent` + +Event for calling.call.state. + +**Modifiers:** `dataclass` + +**Decorators:** `@dataclass` + +## Signature + +```python +class CallStateEvent(RelayEvent) +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/python/signalwire/relay/event/relay-event) + +## Properties + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + event_type: str, + params: dict[str, Any], + call_id: str = '', + timestamp: float = 0.0, + call_state: str = '', + end_reason: str = '', + direction: str = '', + device: dict[str, Any] = dict() +) -> None +``` + +#### Parameters + + + + + + + + + + + + + + + + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +*** + +### from\_payload + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +from_payload(payload: dict[str, Any]) -> 'CallStateEvent' +``` + +#### Parameters + + + +#### Returns + +`'CallStateEvent'` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 43. + +## Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 34. diff --git a/fern/products/sdk-reference/python/signalwire/relay/event/calling-error-event/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/event/calling-error-event/index.mdx new file mode 100644 index 0000000000..0914acc3b1 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/relay/event/calling-error-event/index.mdx @@ -0,0 +1,109 @@ +--- +slug: "/reference/python/signalwire/relay/event/calling-error-event" +title: "CallingErrorEvent" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.event.CallingErrorEvent" + parent: "signalwire.relay.event" + module: "signalwire.relay.event" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" +--- +# `CallingErrorEvent` + +Event for calling.error. + +**Modifiers:** `dataclass` + +**Decorators:** `@dataclass` + +## Signature + +```python +class CallingErrorEvent(RelayEvent) +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/python/signalwire/relay/event/relay-event) + +## Properties + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + event_type: str, + params: dict[str, Any], + call_id: str = '', + timestamp: float = 0.0, + code: str = '', + message: str = '' +) -> None +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +*** + +### from\_payload + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +from_payload(payload: dict[str, Any]) -> 'CallingErrorEvent' +``` + +#### Parameters + + + +#### Returns + +`'CallingErrorEvent'` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 516. + +## Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 509. diff --git a/fern/products/sdk-reference/python/signalwire/relay/event/collect-event/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/event/collect-event/index.mdx new file mode 100644 index 0000000000..88e3dfd736 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/relay/event/collect-event/index.mdx @@ -0,0 +1,119 @@ +--- +slug: "/reference/python/signalwire/relay/event/collect-event" +title: "CollectEvent" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.event.CollectEvent" + parent: "signalwire.relay.event" + module: "signalwire.relay.event" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" +--- +# `CollectEvent` + +Event for calling.call.collect. + +**Modifiers:** `dataclass` + +**Decorators:** `@dataclass` + +## Signature + +```python +class CollectEvent(RelayEvent) +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/python/signalwire/relay/event/relay-event) + +## Properties + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + event_type: str, + params: dict[str, Any], + call_id: str = '', + timestamp: float = 0.0, + control_id: str = '', + state: str = '', + result: dict[str, Any] = dict(), + final: Optional[bool] = None +) -> None +``` + +#### Parameters + + + + + + + + + + + + + + + + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +*** + +### from\_payload + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +from_payload(payload: dict[str, Any]) -> 'CollectEvent' +``` + +#### Parameters + + + +#### Returns + +`'CollectEvent'` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 152. + +## Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 143. diff --git a/fern/products/sdk-reference/python/signalwire/relay/event/conference-event/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/event/conference-event/index.mdx new file mode 100644 index 0000000000..566521a4bc --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/relay/event/conference-event/index.mdx @@ -0,0 +1,114 @@ +--- +slug: "/reference/python/signalwire/relay/event/conference-event" +title: "ConferenceEvent" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.event.ConferenceEvent" + parent: "signalwire.relay.event" + module: "signalwire.relay.event" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" +--- +# `ConferenceEvent` + +Event for calling.conference. + +**Modifiers:** `dataclass` + +**Decorators:** `@dataclass` + +## Signature + +```python +class ConferenceEvent(RelayEvent) +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/python/signalwire/relay/event/relay-event) + +## Properties + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + event_type: str, + params: dict[str, Any], + call_id: str = '', + timestamp: float = 0.0, + conference_id: str = '', + name: str = '', + status: str = '' +) -> None +``` + +#### Parameters + + + + + + + + + + + + + + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +*** + +### from\_payload + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +from_payload(payload: dict[str, Any]) -> 'ConferenceEvent' +``` + +#### Parameters + + + +#### Returns + +`'ConferenceEvent'` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 494. + +## Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 486. diff --git a/fern/products/sdk-reference/python/signalwire/relay/event/connect-event/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/event/connect-event/index.mdx new file mode 100644 index 0000000000..6b3d65b107 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/relay/event/connect-event/index.mdx @@ -0,0 +1,109 @@ +--- +slug: "/reference/python/signalwire/relay/event/connect-event" +title: "ConnectEvent" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.event.ConnectEvent" + parent: "signalwire.relay.event" + module: "signalwire.relay.event" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" +--- +# `ConnectEvent` + +Event for calling.call.connect. + +**Modifiers:** `dataclass` + +**Decorators:** `@dataclass` + +## Signature + +```python +class ConnectEvent(RelayEvent) +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/python/signalwire/relay/event/relay-event) + +## Properties + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + event_type: str, + params: dict[str, Any], + call_id: str = '', + timestamp: float = 0.0, + connect_state: str = '', + peer: dict[str, Any] = dict() +) -> None +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +*** + +### from\_payload + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +from_payload(payload: dict[str, Any]) -> 'ConnectEvent' +``` + +#### Parameters + + + +#### Returns + +`'ConnectEvent'` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 175. + +## Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 168. diff --git a/fern/products/sdk-reference/python/signalwire/relay/event/denoise-event/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/event/denoise-event/index.mdx new file mode 100644 index 0000000000..08f0d56839 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/relay/event/denoise-event/index.mdx @@ -0,0 +1,104 @@ +--- +slug: "/reference/python/signalwire/relay/event/denoise-event" +title: "DenoiseEvent" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.event.DenoiseEvent" + parent: "signalwire.relay.event" + module: "signalwire.relay.event" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" +--- +# `DenoiseEvent` + +Event for calling.call.denoise. + +**Modifiers:** `dataclass` + +**Decorators:** `@dataclass` + +## Signature + +```python +class DenoiseEvent(RelayEvent) +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/python/signalwire/relay/event/relay-event) + +## Properties + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + event_type: str, + params: dict[str, Any], + call_id: str = '', + timestamp: float = 0.0, + denoised: bool = False +) -> None +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +*** + +### from\_payload + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +from_payload(payload: dict[str, Any]) -> 'DenoiseEvent' +``` + +#### Parameters + + + +#### Returns + +`'DenoiseEvent'` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 356. + +## Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 350. diff --git a/fern/products/sdk-reference/python/signalwire/relay/event/detect-event/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/event/detect-event/index.mdx new file mode 100644 index 0000000000..a93699f684 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/relay/event/detect-event/index.mdx @@ -0,0 +1,109 @@ +--- +slug: "/reference/python/signalwire/relay/event/detect-event" +title: "DetectEvent" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.event.DetectEvent" + parent: "signalwire.relay.event" + module: "signalwire.relay.event" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" +--- +# `DetectEvent` + +Event for calling.call.detect. + +**Modifiers:** `dataclass` + +**Decorators:** `@dataclass` + +## Signature + +```python +class DetectEvent(RelayEvent) +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/python/signalwire/relay/event/relay-event) + +## Properties + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + event_type: str, + params: dict[str, Any], + call_id: str = '', + timestamp: float = 0.0, + control_id: str = '', + detect: dict[str, Any] = dict() +) -> None +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +*** + +### from\_payload + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +from_payload(payload: dict[str, Any]) -> 'DetectEvent' +``` + +#### Parameters + + + +#### Returns + +`'DetectEvent'` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 196. + +## Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 189. diff --git a/fern/products/sdk-reference/python/signalwire/relay/event/dial-event/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/event/dial-event/index.mdx new file mode 100644 index 0000000000..7e5fa0740e --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/relay/event/dial-event/index.mdx @@ -0,0 +1,114 @@ +--- +slug: "/reference/python/signalwire/relay/event/dial-event" +title: "DialEvent" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.event.DialEvent" + parent: "signalwire.relay.event" + module: "signalwire.relay.event" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" +--- +# `DialEvent` + +Event for calling.call.dial. + +**Modifiers:** `dataclass` + +**Decorators:** `@dataclass` + +## Signature + +```python +class DialEvent(RelayEvent) +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/python/signalwire/relay/event/relay-event) + +## Properties + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + event_type: str, + params: dict[str, Any], + call_id: str = '', + timestamp: float = 0.0, + tag: str = '', + dial_state: str = '', + call: dict[str, Any] = dict() +) -> None +``` + +#### Parameters + + + + + + + + + + + + + + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +*** + +### from\_payload + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +from_payload(payload: dict[str, Any]) -> 'DialEvent' +``` + +#### Parameters + + + +#### Returns + +`'DialEvent'` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 310. + +## Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 302. diff --git a/fern/products/sdk-reference/python/signalwire/relay/event/echo-event/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/event/echo-event/index.mdx new file mode 100644 index 0000000000..06cf0f7df9 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/relay/event/echo-event/index.mdx @@ -0,0 +1,104 @@ +--- +slug: "/reference/python/signalwire/relay/event/echo-event" +title: "EchoEvent" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.event.EchoEvent" + parent: "signalwire.relay.event" + module: "signalwire.relay.event" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" +--- +# `EchoEvent` + +Event for calling.call.echo. + +**Modifiers:** `dataclass` + +**Decorators:** `@dataclass` + +## Signature + +```python +class EchoEvent(RelayEvent) +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/python/signalwire/relay/event/relay-event) + +## Properties + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + event_type: str, + params: dict[str, Any], + call_id: str = '', + timestamp: float = 0.0, + state: str = '' +) -> None +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +*** + +### from\_payload + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +from_payload(payload: dict[str, Any]) -> 'EchoEvent' +``` + +#### Parameters + + + +#### Returns + +`'EchoEvent'` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 425. + +## Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 419. diff --git a/fern/products/sdk-reference/python/signalwire/relay/event/fax-event/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/event/fax-event/index.mdx new file mode 100644 index 0000000000..b04f3a9cd3 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/relay/event/fax-event/index.mdx @@ -0,0 +1,109 @@ +--- +slug: "/reference/python/signalwire/relay/event/fax-event" +title: "FaxEvent" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.event.FaxEvent" + parent: "signalwire.relay.event" + module: "signalwire.relay.event" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" +--- +# `FaxEvent` + +Event for calling.call.fax. + +**Modifiers:** `dataclass` + +**Decorators:** `@dataclass` + +## Signature + +```python +class FaxEvent(RelayEvent) +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/python/signalwire/relay/event/relay-event) + +## Properties + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + event_type: str, + params: dict[str, Any], + call_id: str = '', + timestamp: float = 0.0, + control_id: str = '', + fax: dict[str, Any] = dict() +) -> None +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +*** + +### from\_payload + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +from_payload(payload: dict[str, Any]) -> 'FaxEvent' +``` + +#### Parameters + + + +#### Returns + +`'FaxEvent'` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 217. + +## Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 210. diff --git a/fern/products/sdk-reference/python/signalwire/relay/event/hold-event/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/event/hold-event/index.mdx new file mode 100644 index 0000000000..e0a85ad9e2 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/relay/event/hold-event/index.mdx @@ -0,0 +1,104 @@ +--- +slug: "/reference/python/signalwire/relay/event/hold-event" +title: "HoldEvent" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.event.HoldEvent" + parent: "signalwire.relay.event" + module: "signalwire.relay.event" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" +--- +# `HoldEvent` + +Event for calling.call.hold. + +**Modifiers:** `dataclass` + +**Decorators:** `@dataclass` + +## Signature + +```python +class HoldEvent(RelayEvent) +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/python/signalwire/relay/event/relay-event) + +## Properties + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + event_type: str, + params: dict[str, Any], + call_id: str = '', + timestamp: float = 0.0, + state: str = '' +) -> None +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +*** + +### from\_payload + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +from_payload(payload: dict[str, Any]) -> 'HoldEvent' +``` + +#### Parameters + + + +#### Returns + +`'HoldEvent'` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 473. + +## Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 467. diff --git a/fern/products/sdk-reference/python/signalwire/relay/event/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/event/index.mdx new file mode 100644 index 0000000000..15bb03d8ea --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/relay/event/index.mdx @@ -0,0 +1,160 @@ +--- +slug: "/reference/python/signalwire/relay/event" +title: "event" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.relay.event" + parent: "signalwire.relay" + module: "signalwire.relay" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" +--- +# `event` + +Typed event wrappers for RELAY calling events. + +These are convenience dataclasses over raw event dicts. All Call event handlers +also accept the raw dict, so these are optional. + +## Signature + +```python +module event +``` + +## Constants + + + +## Classes + + + + Event for calling.error. + + + + Event for calling.call.receive — inbound call notification. + + + + Event for calling.call.state. + + + + Event for calling.call.collect. + + + + Event for calling.conference. + + + + Event for calling.call.connect. + + + + Event for calling.call.denoise. + + + + Event for calling.call.detect. + + + + Event for calling.call.dial. + + + + Event for calling.call.echo. + + + + Event for calling.call.fax. + + + + Event for calling.call.hold. + + + + Event for messaging.receive — inbound message notification. + + + + Event for messaging.state — outbound message state change. + + + + Event for calling.call.pay. + + + + Event for calling.call.play. + + + + Event for calling.call.queue. + + + + Event for calling.call.record. + + + + Event for calling.call.refer. + + + + Base event — wraps the raw params dict from a signalwire.event message. + + + + Event for calling.call.send\_digits. + + + + Event for calling.call.stream. + + + + Event for calling.call.tap. + + + + Event for calling.call.transcribe. + + + +## Functions + +### parse\_event + +Parse a raw signalwire.event params dict into a typed event object. + +#### Signature + +```python +parse_event(payload: dict[str, Any]) -> RelayEvent +``` + +#### Parameters + + + +#### Returns + +`RelayEvent` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 634. + +## Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) diff --git a/fern/products/sdk-reference/python/signalwire/relay/event/message-receive-event/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/event/message-receive-event/index.mdx new file mode 100644 index 0000000000..9160e3e032 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/relay/event/message-receive-event/index.mdx @@ -0,0 +1,149 @@ +--- +slug: "/reference/python/signalwire/relay/event/message-receive-event" +title: "MessageReceiveEvent" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.event.MessageReceiveEvent" + parent: "signalwire.relay.event" + module: "signalwire.relay.event" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" +--- +# `MessageReceiveEvent` + +Event for messaging.receive — inbound message notification. + +**Modifiers:** `dataclass` + +**Decorators:** `@dataclass` + +## Signature + +```python +class MessageReceiveEvent(RelayEvent) +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/python/signalwire/relay/event/relay-event) + +## Properties + + + + + + + + + + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + event_type: str, + params: dict[str, Any], + call_id: str = '', + timestamp: float = 0.0, + message_id: str = '', + context: str = '', + direction: str = '', + from_number: str = '', + to_number: str = '', + body: str = '', + media: list[str] = list(), + segments: int = 0, + message_state: str = '', + tags: list[str] = list() +) -> None +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +*** + +### from\_payload + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +from_payload(payload: dict[str, Any]) -> 'MessageReceiveEvent' +``` + +#### Parameters + + + +#### Returns + +`'MessageReceiveEvent'` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 545. + +## Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 530. diff --git a/fern/products/sdk-reference/python/signalwire/relay/event/message-state-event/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/event/message-state-event/index.mdx new file mode 100644 index 0000000000..f101c21419 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/relay/event/message-state-event/index.mdx @@ -0,0 +1,154 @@ +--- +slug: "/reference/python/signalwire/relay/event/message-state-event" +title: "MessageStateEvent" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.event.MessageStateEvent" + parent: "signalwire.relay.event" + module: "signalwire.relay.event" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" +--- +# `MessageStateEvent` + +Event for messaging.state — outbound message state change. + +**Modifiers:** `dataclass` + +**Decorators:** `@dataclass` + +## Signature + +```python +class MessageStateEvent(RelayEvent) +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/python/signalwire/relay/event/relay-event) + +## Properties + + + + + + + + + + + + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + event_type: str, + params: dict[str, Any], + call_id: str = '', + timestamp: float = 0.0, + message_id: str = '', + context: str = '', + direction: str = '', + from_number: str = '', + to_number: str = '', + body: str = '', + media: list[str] = list(), + segments: int = 0, + message_state: str = '', + reason: str = '', + tags: list[str] = list() +) -> None +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +*** + +### from\_payload + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +from_payload(payload: dict[str, Any]) -> 'MessageStateEvent' +``` + +#### Parameters + + + +#### Returns + +`'MessageStateEvent'` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 583. + +## Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 567. diff --git a/fern/products/sdk-reference/python/signalwire/relay/event/pay-event/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/event/pay-event/index.mdx new file mode 100644 index 0000000000..ef44d38721 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/relay/event/pay-event/index.mdx @@ -0,0 +1,109 @@ +--- +slug: "/reference/python/signalwire/relay/event/pay-event" +title: "PayEvent" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.event.PayEvent" + parent: "signalwire.relay.event" + module: "signalwire.relay.event" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" +--- +# `PayEvent` + +Event for calling.call.pay. + +**Modifiers:** `dataclass` + +**Decorators:** `@dataclass` + +## Signature + +```python +class PayEvent(RelayEvent) +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/python/signalwire/relay/event/relay-event) + +## Properties + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + event_type: str, + params: dict[str, Any], + call_id: str = '', + timestamp: float = 0.0, + control_id: str = '', + state: str = '' +) -> None +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +*** + +### from\_payload + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +from_payload(payload: dict[str, Any]) -> 'PayEvent' +``` + +#### Parameters + + + +#### Returns + +`'PayEvent'` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 376. + +## Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 369. diff --git a/fern/products/sdk-reference/python/signalwire/relay/event/play-event/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/event/play-event/index.mdx new file mode 100644 index 0000000000..d84c14bb0f --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/relay/event/play-event/index.mdx @@ -0,0 +1,109 @@ +--- +slug: "/reference/python/signalwire/relay/event/play-event" +title: "PlayEvent" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.event.PlayEvent" + parent: "signalwire.relay.event" + module: "signalwire.relay.event" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" +--- +# `PlayEvent` + +Event for calling.call.play. + +**Modifiers:** `dataclass` + +**Decorators:** `@dataclass` + +## Signature + +```python +class PlayEvent(RelayEvent) +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/python/signalwire/relay/event/relay-event) + +## Properties + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + event_type: str, + params: dict[str, Any], + call_id: str = '', + timestamp: float = 0.0, + control_id: str = '', + state: str = '' +) -> None +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +*** + +### from\_payload + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +from_payload(payload: dict[str, Any]) -> 'PlayEvent' +``` + +#### Parameters + + + +#### Returns + +`'PlayEvent'` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 99. + +## Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 92. diff --git a/fern/products/sdk-reference/python/signalwire/relay/event/queue-event/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/event/queue-event/index.mdx new file mode 100644 index 0000000000..729f44d10d --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/relay/event/queue-event/index.mdx @@ -0,0 +1,129 @@ +--- +slug: "/reference/python/signalwire/relay/event/queue-event" +title: "QueueEvent" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.event.QueueEvent" + parent: "signalwire.relay.event" + module: "signalwire.relay.event" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" +--- +# `QueueEvent` + +Event for calling.call.queue. + +**Modifiers:** `dataclass` + +**Decorators:** `@dataclass` + +## Signature + +```python +class QueueEvent(RelayEvent) +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/python/signalwire/relay/event/relay-event) + +## Properties + + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + event_type: str, + params: dict[str, Any], + call_id: str = '', + timestamp: float = 0.0, + control_id: str = '', + status: str = '', + queue_id: str = '', + queue_name: str = '', + position: int = 0, + size: int = 0 +) -> None +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +*** + +### from\_payload + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +from_payload(payload: dict[str, Any]) -> 'QueueEvent' +``` + +#### Parameters + + + +#### Returns + +`'QueueEvent'` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 401. + +## Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 390. diff --git a/fern/products/sdk-reference/python/signalwire/relay/event/record-event/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/event/record-event/index.mdx new file mode 100644 index 0000000000..d286d4be93 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/relay/event/record-event/index.mdx @@ -0,0 +1,129 @@ +--- +slug: "/reference/python/signalwire/relay/event/record-event" +title: "RecordEvent" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.event.RecordEvent" + parent: "signalwire.relay.event" + module: "signalwire.relay.event" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" +--- +# `RecordEvent` + +Event for calling.call.record. + +**Modifiers:** `dataclass` + +**Decorators:** `@dataclass` + +## Signature + +```python +class RecordEvent(RelayEvent) +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/python/signalwire/relay/event/relay-event) + +## Properties + + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + event_type: str, + params: dict[str, Any], + call_id: str = '', + timestamp: float = 0.0, + control_id: str = '', + state: str = '', + url: str = '', + duration: float = 0.0, + size: int = 0, + record: dict[str, Any] = dict() +) -> None +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +*** + +### from\_payload + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +from_payload(payload: dict[str, Any]) -> 'RecordEvent' +``` + +#### Parameters + + + +#### Returns + +`'RecordEvent'` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 124. + +## Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 113. diff --git a/fern/products/sdk-reference/python/signalwire/relay/event/refer-event/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/event/refer-event/index.mdx new file mode 100644 index 0000000000..d3c6083eba --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/relay/event/refer-event/index.mdx @@ -0,0 +1,119 @@ +--- +slug: "/reference/python/signalwire/relay/event/refer-event" +title: "ReferEvent" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.event.ReferEvent" + parent: "signalwire.relay.event" + module: "signalwire.relay.event" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" +--- +# `ReferEvent` + +Event for calling.call.refer. + +**Modifiers:** `dataclass` + +**Decorators:** `@dataclass` + +## Signature + +```python +class ReferEvent(RelayEvent) +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/python/signalwire/relay/event/relay-event) + +## Properties + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + event_type: str, + params: dict[str, Any], + call_id: str = '', + timestamp: float = 0.0, + state: str = '', + sip_refer_to: str = '', + sip_refer_response_code: str = '', + sip_notify_response_code: str = '' +) -> None +``` + +#### Parameters + + + + + + + + + + + + + + + + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +*** + +### from\_payload + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +from_payload(payload: dict[str, Any]) -> 'ReferEvent' +``` + +#### Parameters + + + +#### Returns + +`'ReferEvent'` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 334. + +## Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 325. diff --git a/fern/products/sdk-reference/python/signalwire/relay/event/relay-event/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/event/relay-event/index.mdx new file mode 100644 index 0000000000..cfc92ca7d1 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/relay/event/relay-event/index.mdx @@ -0,0 +1,103 @@ +--- +slug: "/reference/python/signalwire/relay/event/relay-event" +title: "RelayEvent" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.event.RelayEvent" + parent: "signalwire.relay.event" + module: "signalwire.relay.event" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" +--- +# `RelayEvent` + +Base event — wraps the raw params dict from a signalwire.event message. + +**Modifiers:** `dataclass` + +**Decorators:** `@dataclass` + +## Signature + +```python +class RelayEvent +``` + +## Properties + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + event_type: str, + params: dict[str, Any], + call_id: str = '', + timestamp: float = 0.0 +) -> None +``` + +#### Parameters + + + + + + + + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +*** + +### from\_payload + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +from_payload(payload: dict[str, Any]) -> 'RelayEvent' +``` + +#### Parameters + + + +#### Returns + +`'RelayEvent'` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 22. + +## Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 13. diff --git a/fern/products/sdk-reference/python/signalwire/relay/event/send-digits-event/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/event/send-digits-event/index.mdx new file mode 100644 index 0000000000..63d6d52d39 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/relay/event/send-digits-event/index.mdx @@ -0,0 +1,109 @@ +--- +slug: "/reference/python/signalwire/relay/event/send-digits-event" +title: "SendDigitsEvent" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.event.SendDigitsEvent" + parent: "signalwire.relay.event" + module: "signalwire.relay.event" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" +--- +# `SendDigitsEvent` + +Event for calling.call.send\_digits. + +**Modifiers:** `dataclass` + +**Decorators:** `@dataclass` + +## Signature + +```python +class SendDigitsEvent(RelayEvent) +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/python/signalwire/relay/event/relay-event) + +## Properties + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + event_type: str, + params: dict[str, Any], + call_id: str = '', + timestamp: float = 0.0, + control_id: str = '', + state: str = '' +) -> None +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +*** + +### from\_payload + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +from_payload(payload: dict[str, Any]) -> 'SendDigitsEvent' +``` + +#### Parameters + + + +#### Returns + +`'SendDigitsEvent'` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 288. + +## Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 281. diff --git a/fern/products/sdk-reference/python/signalwire/relay/event/stream-event/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/event/stream-event/index.mdx new file mode 100644 index 0000000000..4919e0ef55 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/relay/event/stream-event/index.mdx @@ -0,0 +1,119 @@ +--- +slug: "/reference/python/signalwire/relay/event/stream-event" +title: "StreamEvent" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.event.StreamEvent" + parent: "signalwire.relay.event" + module: "signalwire.relay.event" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" +--- +# `StreamEvent` + +Event for calling.call.stream. + +**Modifiers:** `dataclass` + +**Decorators:** `@dataclass` + +## Signature + +```python +class StreamEvent(RelayEvent) +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/python/signalwire/relay/event/relay-event) + +## Properties + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + event_type: str, + params: dict[str, Any], + call_id: str = '', + timestamp: float = 0.0, + control_id: str = '', + state: str = '', + url: str = '', + name: str = '' +) -> None +``` + +#### Parameters + + + + + + + + + + + + + + + + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +*** + +### from\_payload + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +from_payload(payload: dict[str, Any]) -> 'StreamEvent' +``` + +#### Parameters + + + +#### Returns + +`'StreamEvent'` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 265. + +## Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 256. diff --git a/fern/products/sdk-reference/python/signalwire/relay/event/tap-event/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/event/tap-event/index.mdx new file mode 100644 index 0000000000..06549d8d27 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/relay/event/tap-event/index.mdx @@ -0,0 +1,119 @@ +--- +slug: "/reference/python/signalwire/relay/event/tap-event" +title: "TapEvent" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.event.TapEvent" + parent: "signalwire.relay.event" + module: "signalwire.relay.event" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" +--- +# `TapEvent` + +Event for calling.call.tap. + +**Modifiers:** `dataclass` + +**Decorators:** `@dataclass` + +## Signature + +```python +class TapEvent(RelayEvent) +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/python/signalwire/relay/event/relay-event) + +## Properties + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + event_type: str, + params: dict[str, Any], + call_id: str = '', + timestamp: float = 0.0, + control_id: str = '', + state: str = '', + tap: dict[str, Any] = dict(), + device: dict[str, Any] = dict() +) -> None +``` + +#### Parameters + + + + + + + + + + + + + + + + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +*** + +### from\_payload + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +from_payload(payload: dict[str, Any]) -> 'TapEvent' +``` + +#### Parameters + + + +#### Returns + +`'TapEvent'` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 240. + +## Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 231. diff --git a/fern/products/sdk-reference/python/signalwire/relay/event/transcribe-event/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/event/transcribe-event/index.mdx new file mode 100644 index 0000000000..874a7a5584 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/relay/event/transcribe-event/index.mdx @@ -0,0 +1,129 @@ +--- +slug: "/reference/python/signalwire/relay/event/transcribe-event" +title: "TranscribeEvent" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.event.TranscribeEvent" + parent: "signalwire.relay.event" + module: "signalwire.relay.event" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" +--- +# `TranscribeEvent` + +Event for calling.call.transcribe. + +**Modifiers:** `dataclass` + +**Decorators:** `@dataclass` + +## Signature + +```python +class TranscribeEvent(RelayEvent) +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/python/signalwire/relay/event/relay-event) + +## Properties + + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + event_type: str, + params: dict[str, Any], + call_id: str = '', + timestamp: float = 0.0, + control_id: str = '', + state: str = '', + url: str = '', + recording_id: str = '', + duration: float = 0.0, + size: int = 0 +) -> None +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +*** + +### from\_payload + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +from_payload(payload: dict[str, Any]) -> 'TranscribeEvent' +``` + +#### Parameters + + + +#### Returns + +`'TranscribeEvent'` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 449. + +## Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 438. diff --git a/fern/products/sdk-reference/python/signalwire/relay/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/index.mdx new file mode 100644 index 0000000000..00e4e6e6a5 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/relay/index.mdx @@ -0,0 +1,59 @@ +--- +slug: "/reference/python/signalwire/relay" +title: "relay" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.relay" + parent: "signalwire" + module: "signalwire" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/__init__.py" +--- +# `relay` + +SignalWire RELAY client — real-time call control over WebSocket. + +## Signature + +```python +module relay +``` + +## Properties + + + +## Classes + + + + Represents a live RELAY call. + + + + Represents a single SMS/MMS message. + + + +## Modules + + + + RelayClient — WebSocket + JSON-RPC 2.0 protocol + event dispatch. + + + + Protocol constants for the SignalWire RELAY calling API. + + + + Typed event wrappers for RELAY calling events. + + + +## Source + +[`signalwire/signalwire/relay/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/relay/message/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/message/index.mdx new file mode 100644 index 0000000000..75cabea3c2 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/relay/message/index.mdx @@ -0,0 +1,196 @@ +--- +slug: "/reference/python/signalwire/relay/message" +title: "message" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.message" + parent: "signalwire.relay" + module: "signalwire.relay" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/message.py" +--- +# `message` + +Represents a single SMS/MMS message. + +For outbound messages, use `await message.wait()` to block until a +terminal state (delivered, undelivered, failed) is reached. + +## Signature + +```python +class Message +``` + +## Properties + + + + + + + + + + + True if the message has reached a terminal state. + + + + + + + + + + + + The terminal RelayEvent, or None if not yet done. + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + *, + message_id: str = '', + context: str = '', + direction: str = '', + from_number: str = '', + to_number: str = '', + body: str = '', + media: Optional[list[str]] = None, + segments: int = 0, + state: str = '', + reason: str = '', + tags: Optional[list[str]] = None +) +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + +#### Source + +[`signalwire/signalwire/relay/message.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/message.py) + +Line 28. + +*** + +### \_\_repr\_\_ + +#### Signature + +```python +__repr__() -> str +``` + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/relay/message.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/message.py) + +Line 123. + +*** + +### on + +Register an event listener for state changes on this message. + +#### Signature + +```python +on(handler: Callable) -> None +``` + +#### Parameters + + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/relay/message.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/message.py) + +Line 72. + +*** + +### wait + +Block until the message reaches a terminal state. + +Returns the terminal RelayEvent. Raises asyncio.TimeoutError if +timeout is specified and exceeded. + +**Modifiers:** `async` + +#### Signature + +```python +async wait(timeout: Optional[float] = None) -> RelayEvent +``` + +#### Parameters + + + +#### Returns + +`RelayEvent` + +#### Source + +[`signalwire/signalwire/relay/message.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/message.py) + +Line 76. + +## Source + +[`signalwire/signalwire/relay/message.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/message.py) + +Line 21. diff --git a/fern/products/sdk-reference/python/signalwire/rest/call-handler/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/call-handler/index.mdx new file mode 100644 index 0000000000..ff04a17838 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/call-handler/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/signalwire/rest/call-handler" +title: "call_handler" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.rest.call_handler" + parent: "signalwire.rest" + module: "signalwire.rest" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/call_handler.py" +--- +# `call_handler` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module call_handler +``` + +## Classes + + + + `call_handler` values for `phone_numbers.update`. + + + +## Source + +[`signalwire/signalwire/rest/call_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/call_handler.py) diff --git a/fern/products/sdk-reference/python/signalwire/rest/call-handler/phone-call-handler/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/call-handler/phone-call-handler/index.mdx new file mode 100644 index 0000000000..168570dd38 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/call-handler/phone-call-handler/index.mdx @@ -0,0 +1,80 @@ +--- +slug: "/reference/python/signalwire/rest/call-handler/phone-call-handler" +title: "PhoneCallHandler" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.call_handler.PhoneCallHandler" + parent: "signalwire.rest.call_handler" + module: "signalwire.rest.call_handler" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/call_handler.py" +--- +# `PhoneCallHandler` + +`call_handler` values for `phone_numbers.update`. + +Each value is a `str` subclass, so passing the enum member directly into +`phone_numbers.update(..., call_handler=PhoneCallHandler.RELAY_SCRIPT)` +serializes to the wire value without `.value` indirection. + +\================= ============================= ======================= +Enum member Companion field (required) Auto-creates resource +\================= ============================= ======================= +RELAY\_SCRIPT call\_relay\_script\_url swml\_webhook +LAML\_WEBHOOKS call\_request\_url cxml\_webhook +LAML\_APPLICATION call\_laml\_application\_id cxml\_application +AI\_AGENT call\_ai\_agent\_id ai\_agent +CALL\_FLOW call\_flow\_id call\_flow +RELAY\_APPLICATION call\_relay\_application relay\_application +RELAY\_TOPIC call\_relay\_topic (routes via RELAY) +RELAY\_CONTEXT call\_relay\_context (legacy, prefer topic) +RELAY\_CONNECTOR (connector config) (internal) +VIDEO\_ROOM call\_video\_room\_id (routes to Video API) +DIALOGFLOW call\_dialogflow\_agent\_id (none) +\================= ============================= ======================= + +Note: `LAML_WEBHOOKS` (wire value `laml_webhooks`) produces a **cXML** +handler, not a generic webhook. For SWML, use `RELAY_SCRIPT`. + +## Signature + +```python +class PhoneCallHandler(str, Enum) +``` + +## Inheritance + +**Extends:** `str`, `Enum` + +## Properties + + + + + + + + + + + + + + + + + + + + + + + +## Source + +[`signalwire/signalwire/rest/call_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/call_handler.py) + +Line 25. diff --git a/fern/products/sdk-reference/python/signalwire/rest/client/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/client/index.mdx new file mode 100644 index 0000000000..337451dc63 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/client/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/signalwire/rest/client" +title: "client" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.rest.client" + parent: "signalwire.rest" + module: "signalwire.rest" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/client.py" +--- +# `client` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module client +``` + +## Classes + + + + REST client for the SignalWire platform APIs. + + + +## Source + +[`signalwire/signalwire/rest/client.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/client.py) diff --git a/fern/products/sdk-reference/python/signalwire/rest/client/rest-client/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/client/rest-client/index.mdx new file mode 100644 index 0000000000..2b0d21b5fa --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/client/rest-client/index.mdx @@ -0,0 +1,133 @@ +--- +slug: "/reference/python/signalwire/rest/client/rest-client" +title: "RestClient" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.client.RestClient" + parent: "signalwire.rest.client" + module: "signalwire.rest.client" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/client.py" +--- +# `RestClient` + +REST client for the SignalWire platform APIs. + +> \[!NOTE] +> client = RestClient( +> project="your-project-id", +> token="your-api-token", +> host="your-space.signalwire.com", +> ) +> +> # Or use environment variables: +> +> # SIGNALWIRE\_PROJECT\_ID, SIGNALWIRE\_API\_TOKEN, SIGNALWIRE\_SPACE +> +> client = RestClient() +> +> # Use namespaced resources +> +> client.fabric.ai\_agents.list() +> client.calling.play(call\_id, play=\[...]) +> client.phone\_numbers.search(area\_code="512") +> client.video.rooms.create(name="standup") +> client.compat.calls.list() + +## Signature + +```python +class RestClient +``` + +## Examples + +```python +# Or use environment variables: +# SIGNALWIRE_PROJECT_ID, SIGNALWIRE_API_TOKEN, SIGNALWIRE_SPACE +client = RestClient() + +# Use namespaced resources +client.fabric.ai_agents.list() +client.calling.play(call_id, play=[...]) +client.phone_numbers.search(area_code="512") +client.video.rooms.create(name="standup") +client.compat.calls.list() +``` + +## Properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(project = None, token = None, host = None) +``` + +#### Parameters + + + + + + + +#### Source + +[`signalwire/signalwire/rest/client.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/client.py) + +Line 61. + +## Source + +[`signalwire/signalwire/rest/client.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/client.py) + +Line 39. diff --git a/fern/products/sdk-reference/python/signalwire/rest/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/index.mdx new file mode 100644 index 0000000000..bdfbe03b2c --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/index.mdx @@ -0,0 +1,52 @@ +--- +slug: "/reference/python/signalwire/rest" +title: "rest" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.rest" + parent: "signalwire" + module: "signalwire" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/__init__.py" +--- +# `rest` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module rest +``` + +## Properties + + + +## Modules + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + +## Source + +[`signalwire/signalwire/rest/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/addresses/addresses-resource/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/addresses/addresses-resource/index.mdx new file mode 100644 index 0000000000..e80490e620 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/addresses/addresses-resource/index.mdx @@ -0,0 +1,133 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/addresses/addresses-resource" +title: "AddressesResource" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.addresses.AddressesResource" + parent: "signalwire.rest.namespaces.addresses" + module: "signalwire.rest.namespaces.addresses" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/addresses.py" +--- +# `AddressesResource` + +Address management (no update endpoint). + +## Signature + +```python +class AddressesResource(BaseResource) +``` + +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(http) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/addresses.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/addresses.py) + +Line 20. + +*** + +### create + +#### Signature + +```python +create(**kwargs = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/addresses.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/addresses.py) + +Line 26. + +*** + +### delete + +#### Signature + +```python +delete(address_id) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/addresses.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/addresses.py) + +Line 32. + +*** + +### get + +#### Signature + +```python +get(address_id) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/addresses.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/addresses.py) + +Line 29. + +*** + +### list + +#### Signature + +```python +list(**params = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/addresses.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/addresses.py) + +Line 23. + +## Source + +[`signalwire/signalwire/rest/namespaces/addresses.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/addresses.py) + +Line 17. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/addresses/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/addresses/index.mdx new file mode 100644 index 0000000000..37b6c0a0b2 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/addresses/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/addresses" +title: "addresses" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.rest.namespaces.addresses" + parent: "signalwire.rest.namespaces" + module: "signalwire.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/addresses.py" +--- +# `addresses` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module addresses +``` + +## Classes + + + + Address management (no update endpoint). + + + +## Source + +[`signalwire/signalwire/rest/namespaces/addresses.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/addresses.py) diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/calling/calling-namespace/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/calling/calling-namespace/index.mdx new file mode 100644 index 0000000000..4e93578ae8 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/calling/calling-namespace/index.mdx @@ -0,0 +1,863 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/calling/calling-namespace" +title: "CallingNamespace" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.calling.CallingNamespace" + parent: "signalwire.rest.namespaces.calling" + module: "signalwire.rest.namespaces.calling" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py" +--- +# `CallingNamespace` + +REST call control — all 37 commands dispatched via single POST endpoint. + +## Signature + +```python +class CallingNamespace(BaseResource) +``` + +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(http) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 22. + +*** + +### ai\_hold + +#### Signature + +```python +ai_hold(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 125. + +*** + +### ai\_message + +#### Signature + +```python +ai_message(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 122. + +*** + +### ai\_stop + +#### Signature + +```python +ai_stop(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 131. + +*** + +### ai\_unhold + +#### Signature + +```python +ai_unhold(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 128. + +*** + +### collect + +#### Signature + +```python +collect(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 77. + +*** + +### collect\_start\_input\_timers + +#### Signature + +```python +collect_start_input_timers(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 83. + +*** + +### collect\_stop + +#### Signature + +```python +collect_stop(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 80. + +*** + +### denoise + +#### Signature + +```python +denoise(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 108. + +*** + +### denoise\_stop + +#### Signature + +```python +denoise_stop(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 111. + +*** + +### detect + +#### Signature + +```python +detect(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 87. + +*** + +### detect\_stop + +#### Signature + +```python +detect_stop(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 90. + +*** + +### dial + +#### Signature + +```python +dial(**params = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 32. + +*** + +### disconnect + +#### Signature + +```python +disconnect(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 44. + +*** + +### end + +#### Signature + +```python +end(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 38. + +*** + +### live\_transcribe + +#### Signature + +```python +live_transcribe(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 135. + +*** + +### live\_translate + +#### Signature + +```python +live_translate(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 138. + +*** + +### play + +#### Signature + +```python +play(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 48. + +*** + +### play\_pause + +#### Signature + +```python +play_pause(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 51. + +*** + +### play\_resume + +#### Signature + +```python +play_resume(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 54. + +*** + +### play\_stop + +#### Signature + +```python +play_stop(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 57. + +*** + +### play\_volume + +#### Signature + +```python +play_volume(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 60. + +*** + +### receive\_fax\_stop + +#### Signature + +```python +receive_fax_stop(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 145. + +*** + +### record + +#### Signature + +```python +record(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 64. + +*** + +### record\_pause + +#### Signature + +```python +record_pause(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 67. + +*** + +### record\_resume + +#### Signature + +```python +record_resume(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 70. + +*** + +### record\_stop + +#### Signature + +```python +record_stop(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 73. + +*** + +### refer + +#### Signature + +```python +refer(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 149. + +*** + +### send\_fax\_stop + +#### Signature + +```python +send_fax_stop(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 142. + +*** + +### stream + +#### Signature + +```python +stream(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 101. + +*** + +### stream\_stop + +#### Signature + +```python +stream_stop(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 104. + +*** + +### tap + +#### Signature + +```python +tap(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 94. + +*** + +### tap\_stop + +#### Signature + +```python +tap_stop(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 97. + +*** + +### transcribe + +#### Signature + +```python +transcribe(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 115. + +*** + +### transcribe\_stop + +#### Signature + +```python +transcribe_stop(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 118. + +*** + +### transfer + +#### Signature + +```python +transfer(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 41. + +*** + +### update + +#### Signature + +```python +update(**params = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 35. + +*** + +### user\_event + +#### Signature + +```python +user_event(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 153. + +## Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 19. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/calling/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/calling/index.mdx new file mode 100644 index 0000000000..efc716bfa1 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/calling/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/calling" +title: "calling" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.rest.namespaces.calling" + parent: "signalwire.rest.namespaces" + module: "signalwire.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py" +--- +# `calling` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module calling +``` + +## Classes + + + + REST call control — all 37 commands dispatched via single POST endpoint. + + + +## Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/chat/chat-resource/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/chat/chat-resource/index.mdx new file mode 100644 index 0000000000..855b2c3df6 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/chat/chat-resource/index.mdx @@ -0,0 +1,73 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/chat/chat-resource" +title: "ChatResource" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.chat.ChatResource" + parent: "signalwire.rest.namespaces.chat" + module: "signalwire.rest.namespaces.chat" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/chat.py" +--- +# `ChatResource` + +Chat token generation. + +## Signature + +```python +class ChatResource(BaseResource) +``` + +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(http) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/chat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/chat.py) + +Line 20. + +*** + +### create\_token + +#### Signature + +```python +create_token(**kwargs = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/chat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/chat.py) + +Line 23. + +## Source + +[`signalwire/signalwire/rest/namespaces/chat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/chat.py) + +Line 17. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/chat/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/chat/index.mdx new file mode 100644 index 0000000000..ba7ca3d40e --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/chat/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/chat" +title: "chat" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.rest.namespaces.chat" + parent: "signalwire.rest.namespaces" + module: "signalwire.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/chat.py" +--- +# `chat` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module chat +``` + +## Classes + + + + Chat token generation. + + + +## Source + +[`signalwire/signalwire/rest/namespaces/chat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/chat.py) diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-accounts/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-accounts/index.mdx new file mode 100644 index 0000000000..503651949a --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-accounts/index.mdx @@ -0,0 +1,135 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/compat/compat-accounts" +title: "CompatAccounts" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.compat.CompatAccounts" + parent: "signalwire.rest.namespaces.compat" + module: "signalwire.rest.namespaces.compat" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py" +--- +# `CompatAccounts` + +Compat account/subproject management. + +## Signature + +```python +class CompatAccounts(BaseResource) +``` + +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(http) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 20. + +*** + +### create + +#### Signature + +```python +create(**kwargs = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 26. + +*** + +### get + +#### Signature + +```python +get(sid) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 29. + +*** + +### list + +#### Signature + +```python +list(**params = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 23. + +*** + +### update + +#### Signature + +```python +update(sid, **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 32. + +## Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 17. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-applications/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-applications/index.mdx new file mode 100644 index 0000000000..5052e63b67 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-applications/index.mdx @@ -0,0 +1,55 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/compat/compat-applications" +title: "CompatApplications" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.compat.CompatApplications" + parent: "signalwire.rest.namespaces.compat" + module: "signalwire.rest.namespaces.compat" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py" +--- +# `CompatApplications` + +Compat application management. + +## Signature + +```python +class CompatApplications(CrudResource) +``` + +## Inheritance + +**Extends:** `CrudResource` + +## Methods + +### update + +#### Signature + +```python +update(sid, **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 187. + +## Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 184. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-calls/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-calls/index.mdx new file mode 100644 index 0000000000..3e677cd66c --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-calls/index.mdx @@ -0,0 +1,147 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/compat/compat-calls" +title: "CompatCalls" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.compat.CompatCalls" + parent: "signalwire.rest.namespaces.compat" + module: "signalwire.rest.namespaces.compat" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py" +--- +# `CompatCalls` + +Compat call management with recording and stream sub-resources. + +## Signature + +```python +class CompatCalls(CrudResource) +``` + +## Inheritance + +**Extends:** `CrudResource` + +## Methods + +### start\_recording + +#### Signature + +```python +start_recording(call_sid, **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 42. + +*** + +### start\_stream + +#### Signature + +```python +start_stream(call_sid, **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 48. + +*** + +### stop\_stream + +#### Signature + +```python +stop_stream(call_sid, stream_sid, **kwargs = {}) +``` + +#### Parameters + + + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 51. + +*** + +### update + +#### Signature + +```python +update(sid, **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 39. + +*** + +### update\_recording + +#### Signature + +```python +update_recording(call_sid, recording_sid, **kwargs = {}) +``` + +#### Parameters + + + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 45. + +## Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 36. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-conferences/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-conferences/index.mdx new file mode 100644 index 0000000000..c0808b9fa9 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-conferences/index.mdx @@ -0,0 +1,321 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/compat/compat-conferences" +title: "CompatConferences" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.compat.CompatConferences" + parent: "signalwire.rest.namespaces.compat" + module: "signalwire.rest.namespaces.compat" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py" +--- +# `CompatConferences` + +Compat conference management with participants, recordings, and streams. + +## Signature + +```python +class CompatConferences(BaseResource) +``` + +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### delete\_recording + +#### Signature + +```python +delete_recording(conference_sid, recording_sid) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 134. + +*** + +### get + +#### Signature + +```python +get(sid) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 93. + +*** + +### get\_participant + +#### Signature + +```python +get_participant(conference_sid, call_sid) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 106. + +*** + +### get\_recording + +#### Signature + +```python +get_recording(conference_sid, recording_sid) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 125. + +*** + +### list + +#### Signature + +```python +list(**params = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 90. + +*** + +### list\_participants + +#### Signature + +```python +list_participants(conference_sid, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 100. + +*** + +### list\_recordings + +#### Signature + +```python +list_recordings(conference_sid, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 119. + +*** + +### remove\_participant + +#### Signature + +```python +remove_participant(conference_sid, call_sid) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 115. + +*** + +### start\_stream + +#### Signature + +```python +start_stream(conference_sid, **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 138. + +*** + +### stop\_stream + +#### Signature + +```python +stop_stream(conference_sid, stream_sid, **kwargs = {}) +``` + +#### Parameters + + + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 141. + +*** + +### update + +#### Signature + +```python +update(sid, **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 96. + +*** + +### update\_participant + +#### Signature + +```python +update_participant(conference_sid, call_sid, **kwargs = {}) +``` + +#### Parameters + + + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 109. + +*** + +### update\_recording + +#### Signature + +```python +update_recording(conference_sid, recording_sid, **kwargs = {}) +``` + +#### Parameters + + + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 128. + +## Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 87. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-faxes/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-faxes/index.mdx new file mode 100644 index 0000000000..6309e16f45 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-faxes/index.mdx @@ -0,0 +1,121 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/compat/compat-faxes" +title: "CompatFaxes" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.compat.CompatFaxes" + parent: "signalwire.rest.namespaces.compat" + module: "signalwire.rest.namespaces.compat" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py" +--- +# `CompatFaxes` + +Compat fax management with media sub-resources. + +## Signature + +```python +class CompatFaxes(CrudResource) +``` + +## Inheritance + +**Extends:** `CrudResource` + +## Methods + +### delete\_media + +#### Signature + +```python +delete_media(fax_sid, media_sid) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 83. + +*** + +### get\_media + +#### Signature + +```python +get_media(fax_sid, media_sid) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 80. + +*** + +### list\_media + +#### Signature + +```python +list_media(fax_sid, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 77. + +*** + +### update + +#### Signature + +```python +update(sid, **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 74. + +## Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 71. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-laml-bins/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-laml-bins/index.mdx new file mode 100644 index 0000000000..92d6125f36 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-laml-bins/index.mdx @@ -0,0 +1,55 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/compat/compat-laml-bins" +title: "CompatLamlBins" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.compat.CompatLamlBins" + parent: "signalwire.rest.namespaces.compat" + module: "signalwire.rest.namespaces.compat" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py" +--- +# `CompatLamlBins` + +Compat cXML/LaML script management. + +## Signature + +```python +class CompatLamlBins(CrudResource) +``` + +## Inheritance + +**Extends:** `CrudResource` + +## Methods + +### update + +#### Signature + +```python +update(sid, **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 194. + +## Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 191. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-messages/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-messages/index.mdx new file mode 100644 index 0000000000..b3844bbf7f --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-messages/index.mdx @@ -0,0 +1,121 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/compat/compat-messages" +title: "CompatMessages" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.compat.CompatMessages" + parent: "signalwire.rest.namespaces.compat" + module: "signalwire.rest.namespaces.compat" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py" +--- +# `CompatMessages` + +Compat message management with media sub-resources. + +## Signature + +```python +class CompatMessages(CrudResource) +``` + +## Inheritance + +**Extends:** `CrudResource` + +## Methods + +### delete\_media + +#### Signature + +```python +delete_media(message_sid, media_sid) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 67. + +*** + +### get\_media + +#### Signature + +```python +get_media(message_sid, media_sid) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 64. + +*** + +### list\_media + +#### Signature + +```python +list_media(message_sid, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 61. + +*** + +### update + +#### Signature + +```python +update(sid, **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 58. + +## Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 55. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-namespace/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-namespace/index.mdx new file mode 100644 index 0000000000..8bcdc99b03 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-namespace/index.mdx @@ -0,0 +1,77 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/compat/compat-namespace" +title: "CompatNamespace" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.compat.CompatNamespace" + parent: "signalwire.rest.namespaces.compat" + module: "signalwire.rest.namespaces.compat" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py" +--- +# `CompatNamespace` + +Twilio-compatible LAML API namespace with AccountSid scoping. + +## Signature + +```python +class CompatNamespace +``` + +## Properties + + + + + + + + + + + + + + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(http, account_sid) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 256. + +## Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 253. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-phone-numbers/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-phone-numbers/index.mdx new file mode 100644 index 0000000000..df887b7bba --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-phone-numbers/index.mdx @@ -0,0 +1,241 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/compat/compat-phone-numbers" +title: "CompatPhoneNumbers" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.compat.CompatPhoneNumbers" + parent: "signalwire.rest.namespaces.compat" + module: "signalwire.rest.namespaces.compat" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py" +--- +# `CompatPhoneNumbers` + +Compat phone number management. + +## Signature + +```python +class CompatPhoneNumbers(BaseResource) +``` + +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(http, base) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 151. + +*** + +### delete + +#### Signature + +```python +delete(sid) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 167. + +*** + +### get + +#### Signature + +```python +get(sid) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 161. + +*** + +### import\_number + +#### Signature + +```python +import_number(**kwargs = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 170. + +*** + +### list + +#### Signature + +```python +list(**params = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 155. + +*** + +### list\_available\_countries + +#### Signature + +```python +list_available_countries(**params = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 174. + +*** + +### purchase + +#### Signature + +```python +purchase(**kwargs = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 158. + +*** + +### search\_local + +#### Signature + +```python +search_local(country, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 177. + +*** + +### search\_toll\_free + +#### Signature + +```python +search_toll_free(country, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 180. + +*** + +### update + +#### Signature + +```python +update(sid, **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 164. + +## Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 148. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-queues/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-queues/index.mdx new file mode 100644 index 0000000000..a851dd75d8 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-queues/index.mdx @@ -0,0 +1,123 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/compat/compat-queues" +title: "CompatQueues" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.compat.CompatQueues" + parent: "signalwire.rest.namespaces.compat" + module: "signalwire.rest.namespaces.compat" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py" +--- +# `CompatQueues` + +Compat queue management with members. + +## Signature + +```python +class CompatQueues(CrudResource) +``` + +## Inheritance + +**Extends:** `CrudResource` + +## Methods + +### dequeue\_member + +#### Signature + +```python +dequeue_member(queue_sid, call_sid, **kwargs = {}) +``` + +#### Parameters + + + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 210. + +*** + +### get\_member + +#### Signature + +```python +get_member(queue_sid, call_sid) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 207. + +*** + +### list\_members + +#### Signature + +```python +list_members(queue_sid, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 204. + +*** + +### update + +#### Signature + +```python +update(sid, **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 201. + +## Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 198. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-recordings/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-recordings/index.mdx new file mode 100644 index 0000000000..40e79e44b3 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-recordings/index.mdx @@ -0,0 +1,93 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/compat/compat-recordings" +title: "CompatRecordings" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.compat.CompatRecordings" + parent: "signalwire.rest.namespaces.compat" + module: "signalwire.rest.namespaces.compat" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py" +--- +# `CompatRecordings` + +Compat recording management. + +## Signature + +```python +class CompatRecordings(BaseResource) +``` + +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### delete + +#### Signature + +```python +delete(sid) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 223. + +*** + +### get + +#### Signature + +```python +get(sid) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 220. + +*** + +### list + +#### Signature + +```python +list(**params = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 217. + +## Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 214. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-tokens/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-tokens/index.mdx new file mode 100644 index 0000000000..846062a631 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-tokens/index.mdx @@ -0,0 +1,95 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/compat/compat-tokens" +title: "CompatTokens" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.compat.CompatTokens" + parent: "signalwire.rest.namespaces.compat" + module: "signalwire.rest.namespaces.compat" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py" +--- +# `CompatTokens` + +Compat API token management. + +## Signature + +```python +class CompatTokens(BaseResource) +``` + +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### create + +#### Signature + +```python +create(**kwargs = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 243. + +*** + +### delete + +#### Signature + +```python +delete(token_id) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 249. + +*** + +### update + +#### Signature + +```python +update(token_id, **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 246. + +## Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 240. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-transcriptions/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-transcriptions/index.mdx new file mode 100644 index 0000000000..2714c99854 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-transcriptions/index.mdx @@ -0,0 +1,93 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/compat/compat-transcriptions" +title: "CompatTranscriptions" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.compat.CompatTranscriptions" + parent: "signalwire.rest.namespaces.compat" + module: "signalwire.rest.namespaces.compat" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py" +--- +# `CompatTranscriptions` + +Compat transcription management. + +## Signature + +```python +class CompatTranscriptions(BaseResource) +``` + +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### delete + +#### Signature + +```python +delete(sid) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 236. + +*** + +### get + +#### Signature + +```python +get(sid) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 233. + +*** + +### list + +#### Signature + +```python +list(**params = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 230. + +## Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 227. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/index.mdx new file mode 100644 index 0000000000..70187f1799 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/index.mdx @@ -0,0 +1,88 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/compat" +title: "compat" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.rest.namespaces.compat" + parent: "signalwire.rest.namespaces" + module: "signalwire.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py" +--- +# `compat` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module compat +``` + +## Classes + + + + Compat account/subproject management. + + + + Compat application management. + + + + Compat call management with recording and stream sub-resources. + + + + Compat conference management with participants, recordings, and streams. + + + + Compat fax management with media sub-resources. + + + + Compat cXML/LaML script management. + + + + Compat message management with media sub-resources. + + + + Twilio-compatible LAML API namespace with AccountSid scoping. + + + + Compat phone number management. + + + + Compat queue management with members. + + + + Compat recording management. + + + + Compat API token management. + + + + Compat transcription management. + + + +## Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/datasphere/datasphere-documents/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/datasphere/datasphere-documents/index.mdx new file mode 100644 index 0000000000..a551172a48 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/datasphere/datasphere-documents/index.mdx @@ -0,0 +1,139 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/datasphere/datasphere-documents" +title: "DatasphereDocuments" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.datasphere.DatasphereDocuments" + parent: "signalwire.rest.namespaces.datasphere" + module: "signalwire.rest.namespaces.datasphere" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/datasphere.py" +--- +# `DatasphereDocuments` + +Document management with search and chunk operations. + +## Signature + +```python +class DatasphereDocuments(CrudResource) +``` + +## Inheritance + +**Extends:** `CrudResource` + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(http) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/datasphere.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/datasphere.py) + +Line 20. + +*** + +### delete\_chunk + +#### Signature + +```python +delete_chunk(document_id, chunk_id) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/datasphere.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/datasphere.py) + +Line 32. + +*** + +### get\_chunk + +#### Signature + +```python +get_chunk(document_id, chunk_id) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/datasphere.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/datasphere.py) + +Line 29. + +*** + +### list\_chunks + +#### Signature + +```python +list_chunks(document_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/datasphere.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/datasphere.py) + +Line 26. + +*** + +### search + +#### Signature + +```python +search(**kwargs = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/datasphere.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/datasphere.py) + +Line 23. + +## Source + +[`signalwire/signalwire/rest/namespaces/datasphere.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/datasphere.py) + +Line 17. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/datasphere/datasphere-namespace/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/datasphere/datasphere-namespace/index.mdx new file mode 100644 index 0000000000..caa1716d22 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/datasphere/datasphere-namespace/index.mdx @@ -0,0 +1,53 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/datasphere/datasphere-namespace" +title: "DatasphereNamespace" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.datasphere.DatasphereNamespace" + parent: "signalwire.rest.namespaces.datasphere" + module: "signalwire.rest.namespaces.datasphere" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/datasphere.py" +--- +# `DatasphereNamespace` + +Datasphere API namespace. + +## Signature + +```python +class DatasphereNamespace +``` + +## Properties + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(http) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/datasphere.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/datasphere.py) + +Line 39. + +## Source + +[`signalwire/signalwire/rest/namespaces/datasphere.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/datasphere.py) + +Line 36. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/datasphere/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/datasphere/index.mdx new file mode 100644 index 0000000000..c977de38fa --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/datasphere/index.mdx @@ -0,0 +1,44 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/datasphere" +title: "datasphere" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.rest.namespaces.datasphere" + parent: "signalwire.rest.namespaces" + module: "signalwire.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/datasphere.py" +--- +# `datasphere` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module datasphere +``` + +## Classes + + + + Document management with search and chunk operations. + + + + Datasphere API namespace. + + + +## Source + +[`signalwire/signalwire/rest/namespaces/datasphere.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/datasphere.py) diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/auto-materialized-webhook/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/auto-materialized-webhook/index.mdx new file mode 100644 index 0000000000..7b2b8efb93 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/auto-materialized-webhook/index.mdx @@ -0,0 +1,59 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/fabric/auto-materialized-webhook" +title: "AutoMaterializedWebhook" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.fabric.AutoMaterializedWebhook" + parent: "signalwire.rest.namespaces.fabric" + module: "signalwire.rest.namespaces.fabric" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py" +--- +# `AutoMaterializedWebhook` + +Fabric webhook resource that's normally auto-created by phone\_numbers.set\_\*. + +Exposed for backwards compatibility. The binding model for these resources +is on the phone number (see `phone_numbers.set_swml_webhook` / +`set_cxml_webhook`) — setting `call_handler` on a phone number +auto-materializes the webhook. Calling `create` here produces an orphan +resource that isn't bound to any phone number. + +## Signature + +```python +class AutoMaterializedWebhook(FabricResource) +``` + +## Inheritance + +**Extends:** [FabricResource](/docs/sdk-reference/reference/python/signalwire/rest/namespaces/fabric/fabric-resource) + +## Methods + +### create + +#### Signature + +```python +create(**kwargs = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 41. + +## Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 29. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/call-flows-resource/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/call-flows-resource/index.mdx new file mode 100644 index 0000000000..bc93568e45 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/call-flows-resource/index.mdx @@ -0,0 +1,101 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/fabric/call-flows-resource" +title: "CallFlowsResource" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.fabric.CallFlowsResource" + parent: "signalwire.rest.namespaces.fabric" + module: "signalwire.rest.namespaces.fabric" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py" +--- +# `CallFlowsResource` + +Call flows with version management. + +Note: call\_flow (singular) is used in address/version paths per the API spec. + +## Signature + +```python +class CallFlowsResource(FabricResourcePUT) +``` + +## Inheritance + +**Extends:** [FabricResourcePUT](/docs/sdk-reference/reference/python/signalwire/rest/namespaces/fabric/fabric-resource-put) + +## Methods + +### deploy\_version + +#### Signature + +```python +deploy_version(resource_id, **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 76. + +*** + +### list\_addresses + +#### Signature + +```python +list_addresses(resource_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 67. + +*** + +### list\_versions + +#### Signature + +```python +list_versions(resource_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 72. + +## Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 61. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/conference-rooms-resource/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/conference-rooms-resource/index.mdx new file mode 100644 index 0000000000..e05ac064d7 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/conference-rooms-resource/index.mdx @@ -0,0 +1,55 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/fabric/conference-rooms-resource" +title: "ConferenceRoomsResource" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.fabric.ConferenceRoomsResource" + parent: "signalwire.rest.namespaces.fabric" + module: "signalwire.rest.namespaces.fabric" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py" +--- +# `ConferenceRoomsResource` + +Conference rooms — uses singular 'conference\_room' for sub-resource paths. + +## Signature + +```python +class ConferenceRoomsResource(FabricResourcePUT) +``` + +## Inheritance + +**Extends:** [FabricResourcePUT](/docs/sdk-reference/reference/python/signalwire/rest/namespaces/fabric/fabric-resource-put) + +## Methods + +### list\_addresses + +#### Signature + +```python +list_addresses(resource_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 84. + +## Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 81. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/cxml-applications-resource/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/cxml-applications-resource/index.mdx new file mode 100644 index 0000000000..f2c129918b --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/cxml-applications-resource/index.mdx @@ -0,0 +1,53 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/fabric/cxml-applications-resource" +title: "CxmlApplicationsResource" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.fabric.CxmlApplicationsResource" + parent: "signalwire.rest.namespaces.fabric" + module: "signalwire.rest.namespaces.fabric" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py" +--- +# `CxmlApplicationsResource` + +cXML applications — no create method (read/update/delete only). + +## Signature + +```python +class CxmlApplicationsResource(FabricResourcePUT) +``` + +## Inheritance + +**Extends:** [FabricResourcePUT](/docs/sdk-reference/reference/python/signalwire/rest/namespaces/fabric/fabric-resource-put) + +## Methods + +### create + +#### Signature + +```python +create(**kwargs = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 124. + +## Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 121. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/cxml-webhooks-resource/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/cxml-webhooks-resource/index.mdx new file mode 100644 index 0000000000..7fd7766fa0 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/cxml-webhooks-resource/index.mdx @@ -0,0 +1,31 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/fabric/cxml-webhooks-resource" +title: "CxmlWebhooksResource" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.fabric.CxmlWebhooksResource" + parent: "signalwire.rest.namespaces.fabric" + module: "signalwire.rest.namespaces.fabric" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py" +--- +# `CxmlWebhooksResource` + +## Signature + +```python +class CxmlWebhooksResource(AutoMaterializedWebhook) +``` + +## Inheritance + +**Extends:** [AutoMaterializedWebhook](/docs/sdk-reference/reference/python/signalwire/rest/namespaces/fabric/auto-materialized-webhook) + +## Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 57. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/fabric-addresses/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/fabric-addresses/index.mdx new file mode 100644 index 0000000000..c196537826 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/fabric-addresses/index.mdx @@ -0,0 +1,73 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/fabric/fabric-addresses" +title: "FabricAddresses" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.fabric.FabricAddresses" + parent: "signalwire.rest.namespaces.fabric" + module: "signalwire.rest.namespaces.fabric" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py" +--- +# `FabricAddresses` + +Read-only fabric addresses. + +## Signature + +```python +class FabricAddresses(BaseResource) +``` + +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### get + +#### Signature + +```python +get(address_id) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 178. + +*** + +### list + +#### Signature + +```python +list(**params = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 175. + +## Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 172. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/fabric-namespace/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/fabric-namespace/index.mdx new file mode 100644 index 0000000000..497505f140 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/fabric-namespace/index.mdx @@ -0,0 +1,83 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/fabric/fabric-namespace" +title: "FabricNamespace" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.fabric.FabricNamespace" + parent: "signalwire.rest.namespaces.fabric" + module: "signalwire.rest.namespaces.fabric" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py" +--- +# `FabricNamespace` + +Fabric API namespace grouping all resource types. + +## Signature + +```python +class FabricNamespace +``` + +## Properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(http) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 207. + +## Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 204. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/fabric-resource-put/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/fabric-resource-put/index.mdx new file mode 100644 index 0000000000..df98434f74 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/fabric-resource-put/index.mdx @@ -0,0 +1,33 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/fabric/fabric-resource-put" +title: "FabricResourcePUT" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.fabric.FabricResourcePUT" + parent: "signalwire.rest.namespaces.fabric" + module: "signalwire.rest.namespaces.fabric" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py" +--- +# `FabricResourcePUT` + +Fabric resource that uses PUT for updates. + +## Signature + +```python +class FabricResourcePUT(CrudWithAddresses) +``` + +## Inheritance + +**Extends:** `CrudWithAddresses` + +## Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 24. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/fabric-resource/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/fabric-resource/index.mdx new file mode 100644 index 0000000000..b6c3e51e63 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/fabric-resource/index.mdx @@ -0,0 +1,33 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/fabric/fabric-resource" +title: "FabricResource" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.fabric.FabricResource" + parent: "signalwire.rest.namespaces.fabric" + module: "signalwire.rest.namespaces.fabric" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py" +--- +# `FabricResource` + +Standard fabric resource with CRUD + addresses. + +## Signature + +```python +class FabricResource(CrudWithAddresses) +``` + +## Inheritance + +**Extends:** `CrudWithAddresses` + +## Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 19. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/fabric-tokens/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/fabric-tokens/index.mdx new file mode 100644 index 0000000000..6708cf8513 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/fabric-tokens/index.mdx @@ -0,0 +1,153 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/fabric/fabric-tokens" +title: "FabricTokens" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.fabric.FabricTokens" + parent: "signalwire.rest.namespaces.fabric" + module: "signalwire.rest.namespaces.fabric" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py" +--- +# `FabricTokens` + +Subscriber, guest, invite, and embed token creation. + +## Signature + +```python +class FabricTokens(BaseResource) +``` + +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(http) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 185. + +*** + +### create\_embed\_token + +#### Signature + +```python +create_embed_token(**kwargs = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 200. + +*** + +### create\_guest\_token + +#### Signature + +```python +create_guest_token(**kwargs = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 197. + +*** + +### create\_invite\_token + +#### Signature + +```python +create_invite_token(**kwargs = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 194. + +*** + +### create\_subscriber\_token + +#### Signature + +```python +create_subscriber_token(**kwargs = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 188. + +*** + +### refresh\_subscriber\_token + +#### Signature + +```python +refresh_subscriber_token(**kwargs = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 191. + +## Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 182. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/generic-resources/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/generic-resources/index.mdx new file mode 100644 index 0000000000..fe5c3efe8a --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/generic-resources/index.mdx @@ -0,0 +1,169 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/fabric/generic-resources" +title: "GenericResources" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.fabric.GenericResources" + parent: "signalwire.rest.namespaces.fabric" + module: "signalwire.rest.namespaces.fabric" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py" +--- +# `GenericResources` + +Generic resource operations across all fabric resource types. + +## Signature + +```python +class GenericResources(BaseResource) +``` + +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### assign\_domain\_application + +#### Signature + +```python +assign_domain_application(resource_id, **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 168. + +*** + +### assign\_phone\_route + +Deprecated for the common binding cases. Use `phone_numbers.set_*` helpers. + +This endpoint (`POST /api/fabric/resources/{id}/phone_routes`) accepts +only a narrow set of legacy resource types as the attach target. It +**does not work** for `swml_webhook` / `cxml_webhook` / `ai_agent` +bindings — those are configured on the phone number and the Fabric +resource is auto-materialized (see `phone_numbers.set_swml_webhook` +etc.). The authoritative list of accepting resource types lives in the +OpenAPI spec; routing here for those types returns 404 or 422. + +#### Signature + +```python +assign_phone_route(resource_id, **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 146. + +*** + +### delete + +#### Signature + +```python +delete(resource_id) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 137. + +*** + +### get + +#### Signature + +```python +get(resource_id) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 134. + +*** + +### list + +#### Signature + +```python +list(**params = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 131. + +*** + +### list\_addresses + +#### Signature + +```python +list_addresses(resource_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 140. + +## Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 128. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/index.mdx new file mode 100644 index 0000000000..12a0f85347 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/index.mdx @@ -0,0 +1,84 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/fabric" +title: "fabric" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.rest.namespaces.fabric" + parent: "signalwire.rest.namespaces" + module: "signalwire.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py" +--- +# `fabric` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module fabric +``` + +## Classes + + + + Fabric webhook resource that's normally auto-created by phone\_numbers.set\_\*. + + + + Call flows with version management. + + + + Conference rooms — uses singular 'conference\_room' for sub-resource paths. + + + + cXML applications — no create method (read/update/delete only). + + + + + + Read-only fabric addresses. + + + + Fabric API namespace grouping all resource types. + + + + Standard fabric resource with CRUD + addresses. + + + + Fabric resource that uses PUT for updates. + + + + Subscriber, guest, invite, and embed token creation. + + + + Generic resource operations across all fabric resource types. + + + + Subscribers with SIP endpoint management. + + + + + +## Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/subscribers-resource/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/subscribers-resource/index.mdx new file mode 100644 index 0000000000..290a8130f3 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/subscribers-resource/index.mdx @@ -0,0 +1,145 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/fabric/subscribers-resource" +title: "SubscribersResource" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.fabric.SubscribersResource" + parent: "signalwire.rest.namespaces.fabric" + module: "signalwire.rest.namespaces.fabric" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py" +--- +# `SubscribersResource` + +Subscribers with SIP endpoint management. + +## Signature + +```python +class SubscribersResource(FabricResourcePUT) +``` + +## Inheritance + +**Extends:** [FabricResourcePUT](/docs/sdk-reference/reference/python/signalwire/rest/namespaces/fabric/fabric-resource-put) + +## Methods + +### create\_sip\_endpoint + +#### Signature + +```python +create_sip_endpoint(subscriber_id, **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 98. + +*** + +### delete\_sip\_endpoint + +#### Signature + +```python +delete_sip_endpoint(subscriber_id, endpoint_id) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 115. + +*** + +### get\_sip\_endpoint + +#### Signature + +```python +get_sip_endpoint(subscriber_id, endpoint_id) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 104. + +*** + +### list\_sip\_endpoints + +#### Signature + +```python +list_sip_endpoints(subscriber_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 92. + +*** + +### update\_sip\_endpoint + +#### Signature + +```python +update_sip_endpoint(subscriber_id, endpoint_id, **kwargs = {}) +``` + +#### Parameters + + + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 109. + +## Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 89. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/swml-webhooks-resource/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/swml-webhooks-resource/index.mdx new file mode 100644 index 0000000000..6e2f28c94e --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/swml-webhooks-resource/index.mdx @@ -0,0 +1,31 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/fabric/swml-webhooks-resource" +title: "SwmlWebhooksResource" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.fabric.SwmlWebhooksResource" + parent: "signalwire.rest.namespaces.fabric" + module: "signalwire.rest.namespaces.fabric" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py" +--- +# `SwmlWebhooksResource` + +## Signature + +```python +class SwmlWebhooksResource(AutoMaterializedWebhook) +``` + +## Inheritance + +**Extends:** [AutoMaterializedWebhook](/docs/sdk-reference/reference/python/signalwire/rest/namespaces/fabric/auto-materialized-webhook) + +## Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 53. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/imported-numbers/imported-numbers-resource/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/imported-numbers/imported-numbers-resource/index.mdx new file mode 100644 index 0000000000..b75a6c54e7 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/imported-numbers/imported-numbers-resource/index.mdx @@ -0,0 +1,73 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/imported-numbers/imported-numbers-resource" +title: "ImportedNumbersResource" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.imported_numbers.ImportedNumbersResource" + parent: "signalwire.rest.namespaces.imported_numbers" + module: "signalwire.rest.namespaces.imported_numbers" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/imported_numbers.py" +--- +# `ImportedNumbersResource` + +Import externally-hosted phone numbers. + +## Signature + +```python +class ImportedNumbersResource(BaseResource) +``` + +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(http) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/imported_numbers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/imported_numbers.py) + +Line 20. + +*** + +### create + +#### Signature + +```python +create(**kwargs = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/imported_numbers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/imported_numbers.py) + +Line 23. + +## Source + +[`signalwire/signalwire/rest/namespaces/imported_numbers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/imported_numbers.py) + +Line 17. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/imported-numbers/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/imported-numbers/index.mdx new file mode 100644 index 0000000000..5216a4f7e0 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/imported-numbers/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/imported-numbers" +title: "imported_numbers" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.rest.namespaces.imported_numbers" + parent: "signalwire.rest.namespaces" + module: "signalwire.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/imported_numbers.py" +--- +# `imported_numbers` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module imported_numbers +``` + +## Classes + + + + Import externally-hosted phone numbers. + + + +## Source + +[`signalwire/signalwire/rest/namespaces/imported_numbers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/imported_numbers.py) diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/index.mdx new file mode 100644 index 0000000000..3d74e91b87 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/index.mdx @@ -0,0 +1,120 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces" +title: "namespaces" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.rest.namespaces" + parent: "signalwire.rest" + module: "signalwire.rest" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/__init__.py" +--- +# `namespaces` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module namespaces +``` + +## Modules + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + +## Source + +[`signalwire/signalwire/rest/namespaces/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/logs/conference-logs/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/logs/conference-logs/index.mdx new file mode 100644 index 0000000000..412bebfd74 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/logs/conference-logs/index.mdx @@ -0,0 +1,53 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/logs/conference-logs" +title: "ConferenceLogs" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.logs.ConferenceLogs" + parent: "signalwire.rest.namespaces.logs" + module: "signalwire.rest.namespaces.logs" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/logs.py" +--- +# `ConferenceLogs` + +Conference log queries. + +## Signature + +```python +class ConferenceLogs(BaseResource) +``` + +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### list + +#### Signature + +```python +list(**params = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/logs.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/logs.py) + +Line 53. + +## Source + +[`signalwire/signalwire/rest/namespaces/logs.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/logs.py) + +Line 50. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/logs/fax-logs/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/logs/fax-logs/index.mdx new file mode 100644 index 0000000000..115dd0201d --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/logs/fax-logs/index.mdx @@ -0,0 +1,73 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/logs/fax-logs" +title: "FaxLogs" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.logs.FaxLogs" + parent: "signalwire.rest.namespaces.logs" + module: "signalwire.rest.namespaces.logs" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/logs.py" +--- +# `FaxLogs` + +Fax log queries. + +## Signature + +```python +class FaxLogs(BaseResource) +``` + +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### get + +#### Signature + +```python +get(log_id) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/logs.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/logs.py) + +Line 46. + +*** + +### list + +#### Signature + +```python +list(**params = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/logs.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/logs.py) + +Line 43. + +## Source + +[`signalwire/signalwire/rest/namespaces/logs.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/logs.py) + +Line 40. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/logs/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/logs/index.mdx new file mode 100644 index 0000000000..adf709662a --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/logs/index.mdx @@ -0,0 +1,56 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/logs" +title: "logs" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.rest.namespaces.logs" + parent: "signalwire.rest.namespaces" + module: "signalwire.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/logs.py" +--- +# `logs` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module logs +``` + +## Classes + + + + Conference log queries. + + + + Fax log queries. + + + + Logs API namespace. + + + + Message log queries. + + + + Voice log queries. + + + +## Source + +[`signalwire/signalwire/rest/namespaces/logs.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/logs.py) diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/logs/logs-namespace/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/logs/logs-namespace/index.mdx new file mode 100644 index 0000000000..8b5343fe5c --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/logs/logs-namespace/index.mdx @@ -0,0 +1,59 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/logs/logs-namespace" +title: "LogsNamespace" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.logs.LogsNamespace" + parent: "signalwire.rest.namespaces.logs" + module: "signalwire.rest.namespaces.logs" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/logs.py" +--- +# `LogsNamespace` + +Logs API namespace. + +## Signature + +```python +class LogsNamespace +``` + +## Properties + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(http) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/logs.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/logs.py) + +Line 60. + +## Source + +[`signalwire/signalwire/rest/namespaces/logs.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/logs.py) + +Line 57. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/logs/message-logs/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/logs/message-logs/index.mdx new file mode 100644 index 0000000000..768969b036 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/logs/message-logs/index.mdx @@ -0,0 +1,73 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/logs/message-logs" +title: "MessageLogs" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.logs.MessageLogs" + parent: "signalwire.rest.namespaces.logs" + module: "signalwire.rest.namespaces.logs" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/logs.py" +--- +# `MessageLogs` + +Message log queries. + +## Signature + +```python +class MessageLogs(BaseResource) +``` + +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### get + +#### Signature + +```python +get(log_id) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/logs.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/logs.py) + +Line 23. + +*** + +### list + +#### Signature + +```python +list(**params = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/logs.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/logs.py) + +Line 20. + +## Source + +[`signalwire/signalwire/rest/namespaces/logs.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/logs.py) + +Line 17. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/logs/voice-logs/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/logs/voice-logs/index.mdx new file mode 100644 index 0000000000..c065d3f487 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/logs/voice-logs/index.mdx @@ -0,0 +1,95 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/logs/voice-logs" +title: "VoiceLogs" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.logs.VoiceLogs" + parent: "signalwire.rest.namespaces.logs" + module: "signalwire.rest.namespaces.logs" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/logs.py" +--- +# `VoiceLogs` + +Voice log queries. + +## Signature + +```python +class VoiceLogs(BaseResource) +``` + +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### get + +#### Signature + +```python +get(log_id) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/logs.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/logs.py) + +Line 33. + +*** + +### list + +#### Signature + +```python +list(**params = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/logs.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/logs.py) + +Line 30. + +*** + +### list\_events + +#### Signature + +```python +list_events(log_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/logs.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/logs.py) + +Line 36. + +## Source + +[`signalwire/signalwire/rest/namespaces/logs.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/logs.py) + +Line 27. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/lookup/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/lookup/index.mdx new file mode 100644 index 0000000000..d501e29044 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/lookup/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/lookup" +title: "lookup" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.rest.namespaces.lookup" + parent: "signalwire.rest.namespaces" + module: "signalwire.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/lookup.py" +--- +# `lookup` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module lookup +``` + +## Classes + + + + Phone number lookup (carrier, CNAM). + + + +## Source + +[`signalwire/signalwire/rest/namespaces/lookup.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/lookup.py) diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/lookup/lookup-resource/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/lookup/lookup-resource/index.mdx new file mode 100644 index 0000000000..b88684dde3 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/lookup/lookup-resource/index.mdx @@ -0,0 +1,75 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/lookup/lookup-resource" +title: "LookupResource" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.lookup.LookupResource" + parent: "signalwire.rest.namespaces.lookup" + module: "signalwire.rest.namespaces.lookup" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/lookup.py" +--- +# `LookupResource` + +Phone number lookup (carrier, CNAM). + +## Signature + +```python +class LookupResource(BaseResource) +``` + +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(http) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/lookup.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/lookup.py) + +Line 20. + +*** + +### phone\_number + +#### Signature + +```python +phone_number(e164, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/lookup.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/lookup.py) + +Line 23. + +## Source + +[`signalwire/signalwire/rest/namespaces/lookup.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/lookup.py) + +Line 17. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/mfa/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/mfa/index.mdx new file mode 100644 index 0000000000..9550715e84 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/mfa/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/mfa" +title: "mfa" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.rest.namespaces.mfa" + parent: "signalwire.rest.namespaces" + module: "signalwire.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/mfa.py" +--- +# `mfa` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module mfa +``` + +## Classes + + + + Multi-factor authentication via SMS or phone call. + + + +## Source + +[`signalwire/signalwire/rest/namespaces/mfa.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/mfa.py) diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/mfa/mfa-resource/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/mfa/mfa-resource/index.mdx new file mode 100644 index 0000000000..f5b2ae74a3 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/mfa/mfa-resource/index.mdx @@ -0,0 +1,115 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/mfa/mfa-resource" +title: "MfaResource" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.mfa.MfaResource" + parent: "signalwire.rest.namespaces.mfa" + module: "signalwire.rest.namespaces.mfa" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/mfa.py" +--- +# `MfaResource` + +Multi-factor authentication via SMS or phone call. + +## Signature + +```python +class MfaResource(BaseResource) +``` + +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(http) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/mfa.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/mfa.py) + +Line 20. + +*** + +### call + +#### Signature + +```python +call(**kwargs = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/mfa.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/mfa.py) + +Line 26. + +*** + +### sms + +#### Signature + +```python +sms(**kwargs = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/mfa.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/mfa.py) + +Line 23. + +*** + +### verify + +#### Signature + +```python +verify(request_id, **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/mfa.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/mfa.py) + +Line 29. + +## Source + +[`signalwire/signalwire/rest/namespaces/mfa.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/mfa.py) + +Line 17. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/number-groups/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/number-groups/index.mdx new file mode 100644 index 0000000000..02756081fe --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/number-groups/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/number-groups" +title: "number_groups" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.rest.namespaces.number_groups" + parent: "signalwire.rest.namespaces" + module: "signalwire.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/number_groups.py" +--- +# `number_groups` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module number_groups +``` + +## Classes + + + + Number group management with membership operations. + + + +## Source + +[`signalwire/signalwire/rest/namespaces/number_groups.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/number_groups.py) diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/number-groups/number-groups-resource/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/number-groups/number-groups-resource/index.mdx new file mode 100644 index 0000000000..2b9af1f93f --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/number-groups/number-groups-resource/index.mdx @@ -0,0 +1,137 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/number-groups/number-groups-resource" +title: "NumberGroupsResource" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.number_groups.NumberGroupsResource" + parent: "signalwire.rest.namespaces.number_groups" + module: "signalwire.rest.namespaces.number_groups" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/number_groups.py" +--- +# `NumberGroupsResource` + +Number group management with membership operations. + +## Signature + +```python +class NumberGroupsResource(CrudResource) +``` + +## Inheritance + +**Extends:** `CrudResource` + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(http) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/number_groups.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/number_groups.py) + +Line 22. + +*** + +### add\_membership + +#### Signature + +```python +add_membership(group_id, **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/number_groups.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/number_groups.py) + +Line 31. + +*** + +### delete\_membership + +#### Signature + +```python +delete_membership(membership_id) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/number_groups.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/number_groups.py) + +Line 40. + +*** + +### get\_membership + +#### Signature + +```python +get_membership(membership_id) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/number_groups.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/number_groups.py) + +Line 37. + +*** + +### list\_memberships + +#### Signature + +```python +list_memberships(group_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/number_groups.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/number_groups.py) + +Line 25. + +## Source + +[`signalwire/signalwire/rest/namespaces/number_groups.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/number_groups.py) + +Line 17. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/phone-numbers/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/phone-numbers/index.mdx new file mode 100644 index 0000000000..704e5a777e --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/phone-numbers/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/phone-numbers" +title: "phone_numbers" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.rest.namespaces.phone_numbers" + parent: "signalwire.rest.namespaces" + module: "signalwire.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/phone_numbers.py" +--- +# `phone_numbers` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module phone_numbers +``` + +## Classes + + + + Phone number management. + + + +## Source + +[`signalwire/signalwire/rest/namespaces/phone_numbers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/phone_numbers.py) diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/phone-numbers/phone-numbers-resource/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/phone-numbers/phone-numbers-resource/index.mdx new file mode 100644 index 0000000000..789dbf6551 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/phone-numbers/phone-numbers-resource/index.mdx @@ -0,0 +1,330 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/phone-numbers/phone-numbers-resource" +title: "PhoneNumbersResource" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.phone_numbers.PhoneNumbersResource" + parent: "signalwire.rest.namespaces.phone_numbers" + module: "signalwire.rest.namespaces.phone_numbers" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/phone_numbers.py" +--- +# `PhoneNumbersResource` + +Phone number management. + +Supports the standard CRUD surface plus typed helpers for binding an +inbound call to a handler (SWML webhook, cXML webhook, AI agent, call +flow, RELAY application/topic). The binding model is: set +`call_handler` + the handler-specific companion field on the phone +number; the server auto-materializes the matching Fabric resource. +See :mod:`signalwire.rest.call_handler` for the enum, and the +porting-sdk's `phone-binding.md` for the full model. + +## Signature + +```python +class PhoneNumbersResource(CrudResource) +``` + +## Inheritance + +**Extends:** `CrudResource` + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(http) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/phone_numbers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/phone_numbers.py) + +Line 34. + +*** + +### search + +#### Signature + +```python +search(**params = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/phone_numbers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/phone_numbers.py) + +Line 37. + +*** + +### set\_ai\_agent + +Route inbound calls to an AI Agent Fabric resource by ID. + +#### Signature + +```python +set_ai_agent(resource_id: str, agent_id: str, **extra = {}) -> dict +``` + +#### Parameters + + + + + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/rest/namespaces/phone_numbers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/phone_numbers.py) + +Line 95. + +*** + +### set\_call\_flow + +Route inbound calls to a Call Flow by ID. + +`version` accepts `"working_copy"` or `"current_deployed"` +(server default when omitted). + +#### Signature + +```python +set_call_flow( + resource_id: str, + flow_id: str, + version: Optional[str] = None, + **extra = {} +) -> dict +``` + +#### Parameters + + + + + + + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/rest/namespaces/phone_numbers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/phone_numbers.py) + +Line 104. + +*** + +### set\_cxml\_application + +Route inbound calls to an existing cXML application by ID. + +#### Signature + +```python +set_cxml_application( + resource_id: str, + application_id: str, + **extra = {} +) -> dict +``` + +#### Parameters + + + + + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/rest/namespaces/phone_numbers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/phone_numbers.py) + +Line 86. + +*** + +### set\_cxml\_webhook + +Route inbound calls to a cXML (Twilio-compat / LAML) webhook. + +Despite the wire value `laml_webhooks` being plural, this creates +a single `cxml_webhook` Fabric resource. `fallback_url` is used +when the primary URL fails; `status_callback_url` receives call +status updates. + +#### Signature + +```python +set_cxml_webhook( + resource_id: str, + url: str, + fallback_url: Optional[str] = None, + status_callback_url: Optional[str] = None, + **extra = {} +) -> dict +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/rest/namespaces/phone_numbers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/phone_numbers.py) + +Line 60. + +*** + +### set\_relay\_application + +Route inbound calls to a named RELAY application. + +#### Signature + +```python +set_relay_application(resource_id: str, name: str, **extra = {}) -> dict +``` + +#### Parameters + + + + + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/rest/namespaces/phone_numbers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/phone_numbers.py) + +Line 125. + +*** + +### set\_relay\_topic + +Route inbound calls to a RELAY topic (client subscription). + +#### Signature + +```python +set_relay_topic( + resource_id: str, + topic: str, + status_callback_url: Optional[str] = None, + **extra = {} +) -> dict +``` + +#### Parameters + + + + + + + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/rest/namespaces/phone_numbers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/phone_numbers.py) + +Line 134. + +*** + +### set\_swml\_webhook + +Route inbound calls to an SWML webhook URL. + +Your backend returns an SWML document per call. The server +auto-creates a `swml_webhook` Fabric resource keyed off this URL. + +#### Signature + +```python +set_swml_webhook(resource_id: str, url: str, **extra = {}) -> dict +``` + +#### Parameters + + + + + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/rest/namespaces/phone_numbers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/phone_numbers.py) + +Line 47. + +## Source + +[`signalwire/signalwire/rest/namespaces/phone_numbers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/phone_numbers.py) + +Line 20. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/project/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/project/index.mdx new file mode 100644 index 0000000000..a1b0c54f0e --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/project/index.mdx @@ -0,0 +1,44 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/project" +title: "project" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.rest.namespaces.project" + parent: "signalwire.rest.namespaces" + module: "signalwire.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/project.py" +--- +# `project` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module project +``` + +## Classes + + + + Project API namespace. + + + + Project API token management. + + + +## Source + +[`signalwire/signalwire/rest/namespaces/project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/project.py) diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/project/project-namespace/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/project/project-namespace/index.mdx new file mode 100644 index 0000000000..b5343865db --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/project/project-namespace/index.mdx @@ -0,0 +1,53 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/project/project-namespace" +title: "ProjectNamespace" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.project.ProjectNamespace" + parent: "signalwire.rest.namespaces.project" + module: "signalwire.rest.namespaces.project" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/project.py" +--- +# `ProjectNamespace` + +Project API namespace. + +## Signature + +```python +class ProjectNamespace +``` + +## Properties + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(http) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/project.py) + +Line 36. + +## Source + +[`signalwire/signalwire/rest/namespaces/project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/project.py) + +Line 33. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/project/project-tokens/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/project/project-tokens/index.mdx new file mode 100644 index 0000000000..143af35534 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/project/project-tokens/index.mdx @@ -0,0 +1,115 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/project/project-tokens" +title: "ProjectTokens" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.project.ProjectTokens" + parent: "signalwire.rest.namespaces.project" + module: "signalwire.rest.namespaces.project" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/project.py" +--- +# `ProjectTokens` + +Project API token management. + +## Signature + +```python +class ProjectTokens(BaseResource) +``` + +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(http) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/project.py) + +Line 20. + +*** + +### create + +#### Signature + +```python +create(**kwargs = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/project.py) + +Line 23. + +*** + +### delete + +#### Signature + +```python +delete(token_id) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/project.py) + +Line 29. + +*** + +### update + +#### Signature + +```python +update(token_id, **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/project.py) + +Line 26. + +## Source + +[`signalwire/signalwire/rest/namespaces/project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/project.py) + +Line 17. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/pubsub/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/pubsub/index.mdx new file mode 100644 index 0000000000..b60a8caeca --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/pubsub/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/pubsub" +title: "pubsub" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.rest.namespaces.pubsub" + parent: "signalwire.rest.namespaces" + module: "signalwire.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/pubsub.py" +--- +# `pubsub` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module pubsub +``` + +## Classes + + + + PubSub token generation. + + + +## Source + +[`signalwire/signalwire/rest/namespaces/pubsub.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/pubsub.py) diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/pubsub/pub-sub-resource/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/pubsub/pub-sub-resource/index.mdx new file mode 100644 index 0000000000..9cafd2822f --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/pubsub/pub-sub-resource/index.mdx @@ -0,0 +1,73 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/pubsub/pub-sub-resource" +title: "PubSubResource" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.pubsub.PubSubResource" + parent: "signalwire.rest.namespaces.pubsub" + module: "signalwire.rest.namespaces.pubsub" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/pubsub.py" +--- +# `PubSubResource` + +PubSub token generation. + +## Signature + +```python +class PubSubResource(BaseResource) +``` + +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(http) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/pubsub.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/pubsub.py) + +Line 20. + +*** + +### create\_token + +#### Signature + +```python +create_token(**kwargs = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/pubsub.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/pubsub.py) + +Line 23. + +## Source + +[`signalwire/signalwire/rest/namespaces/pubsub.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/pubsub.py) + +Line 17. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/queues/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/queues/index.mdx new file mode 100644 index 0000000000..8323fafe26 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/queues/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/queues" +title: "queues" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.rest.namespaces.queues" + parent: "signalwire.rest.namespaces" + module: "signalwire.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/queues.py" +--- +# `queues` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module queues +``` + +## Classes + + + + Queue management with member operations. + + + +## Source + +[`signalwire/signalwire/rest/namespaces/queues.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/queues.py) diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/queues/queues-resource/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/queues/queues-resource/index.mdx new file mode 100644 index 0000000000..afee10bc92 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/queues/queues-resource/index.mdx @@ -0,0 +1,117 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/queues/queues-resource" +title: "QueuesResource" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.queues.QueuesResource" + parent: "signalwire.rest.namespaces.queues" + module: "signalwire.rest.namespaces.queues" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/queues.py" +--- +# `QueuesResource` + +Queue management with member operations. + +## Signature + +```python +class QueuesResource(CrudResource) +``` + +## Inheritance + +**Extends:** `CrudResource` + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(http) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/queues.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/queues.py) + +Line 22. + +*** + +### get\_member + +#### Signature + +```python +get_member(queue_id, member_id) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/queues.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/queues.py) + +Line 31. + +*** + +### get\_next\_member + +#### Signature + +```python +get_next_member(queue_id) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/queues.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/queues.py) + +Line 28. + +*** + +### list\_members + +#### Signature + +```python +list_members(queue_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/queues.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/queues.py) + +Line 25. + +## Source + +[`signalwire/signalwire/rest/namespaces/queues.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/queues.py) + +Line 17. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/recordings/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/recordings/index.mdx new file mode 100644 index 0000000000..c372a5b768 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/recordings/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/recordings" +title: "recordings" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.rest.namespaces.recordings" + parent: "signalwire.rest.namespaces" + module: "signalwire.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/recordings.py" +--- +# `recordings` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module recordings +``` + +## Classes + + + + Recording management (read-only + delete). + + + +## Source + +[`signalwire/signalwire/rest/namespaces/recordings.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/recordings.py) diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/recordings/recordings-resource/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/recordings/recordings-resource/index.mdx new file mode 100644 index 0000000000..9070ed6c02 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/recordings/recordings-resource/index.mdx @@ -0,0 +1,113 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/recordings/recordings-resource" +title: "RecordingsResource" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.recordings.RecordingsResource" + parent: "signalwire.rest.namespaces.recordings" + module: "signalwire.rest.namespaces.recordings" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/recordings.py" +--- +# `RecordingsResource` + +Recording management (read-only + delete). + +## Signature + +```python +class RecordingsResource(BaseResource) +``` + +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(http) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/recordings.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/recordings.py) + +Line 20. + +*** + +### delete + +#### Signature + +```python +delete(recording_id) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/recordings.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/recordings.py) + +Line 29. + +*** + +### get + +#### Signature + +```python +get(recording_id) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/recordings.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/recordings.py) + +Line 26. + +*** + +### list + +#### Signature + +```python +list(**params = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/recordings.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/recordings.py) + +Line 23. + +## Source + +[`signalwire/signalwire/rest/namespaces/recordings.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/recordings.py) + +Line 17. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/registry/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/registry/index.mdx new file mode 100644 index 0000000000..48b987d42a --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/registry/index.mdx @@ -0,0 +1,56 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/registry" +title: "registry" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.rest.namespaces.registry" + parent: "signalwire.rest.namespaces" + module: "signalwire.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py" +--- +# `registry` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module registry +``` + +## Classes + + + + 10DLC brand management. + + + + 10DLC campaign management. + + + + 10DLC Campaign Registry namespace. + + + + 10DLC number assignment management. + + + + 10DLC assignment order management. + + + +## Source + +[`signalwire/signalwire/rest/namespaces/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py) diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/registry/registry-brands/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/registry/registry-brands/index.mdx new file mode 100644 index 0000000000..c4b91c00df --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/registry/registry-brands/index.mdx @@ -0,0 +1,137 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/registry/registry-brands" +title: "RegistryBrands" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.registry.RegistryBrands" + parent: "signalwire.rest.namespaces.registry" + module: "signalwire.rest.namespaces.registry" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py" +--- +# `RegistryBrands` + +10DLC brand management. + +## Signature + +```python +class RegistryBrands(BaseResource) +``` + +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### create + +#### Signature + +```python +create(**kwargs = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py) + +Line 23. + +*** + +### create\_campaign + +#### Signature + +```python +create_campaign(brand_id, **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py) + +Line 32. + +*** + +### get + +#### Signature + +```python +get(brand_id) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py) + +Line 26. + +*** + +### list + +#### Signature + +```python +list(**params = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py) + +Line 20. + +*** + +### list\_campaigns + +#### Signature + +```python +list_campaigns(brand_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py) + +Line 29. + +## Source + +[`signalwire/signalwire/rest/namespaces/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py) + +Line 17. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/registry/registry-campaigns/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/registry/registry-campaigns/index.mdx new file mode 100644 index 0000000000..1ca265154b --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/registry/registry-campaigns/index.mdx @@ -0,0 +1,141 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/registry/registry-campaigns" +title: "RegistryCampaigns" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.registry.RegistryCampaigns" + parent: "signalwire.rest.namespaces.registry" + module: "signalwire.rest.namespaces.registry" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py" +--- +# `RegistryCampaigns` + +10DLC campaign management. + +## Signature + +```python +class RegistryCampaigns(BaseResource) +``` + +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### create\_order + +#### Signature + +```python +create_order(campaign_id, **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py) + +Line 51. + +*** + +### get + +#### Signature + +```python +get(campaign_id) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py) + +Line 39. + +*** + +### list\_numbers + +#### Signature + +```python +list_numbers(campaign_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py) + +Line 45. + +*** + +### list\_orders + +#### Signature + +```python +list_orders(campaign_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py) + +Line 48. + +*** + +### update + +#### Signature + +```python +update(campaign_id, **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py) + +Line 42. + +## Source + +[`signalwire/signalwire/rest/namespaces/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py) + +Line 36. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/registry/registry-namespace/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/registry/registry-namespace/index.mdx new file mode 100644 index 0000000000..7bb9c56981 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/registry/registry-namespace/index.mdx @@ -0,0 +1,59 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/registry/registry-namespace" +title: "RegistryNamespace" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.registry.RegistryNamespace" + parent: "signalwire.rest.namespaces.registry" + module: "signalwire.rest.namespaces.registry" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py" +--- +# `RegistryNamespace` + +10DLC Campaign Registry namespace. + +## Signature + +```python +class RegistryNamespace +``` + +## Properties + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(http) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py) + +Line 72. + +## Source + +[`signalwire/signalwire/rest/namespaces/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py) + +Line 69. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/registry/registry-numbers/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/registry/registry-numbers/index.mdx new file mode 100644 index 0000000000..a80ed4e9a1 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/registry/registry-numbers/index.mdx @@ -0,0 +1,53 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/registry/registry-numbers" +title: "RegistryNumbers" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.registry.RegistryNumbers" + parent: "signalwire.rest.namespaces.registry" + module: "signalwire.rest.namespaces.registry" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py" +--- +# `RegistryNumbers` + +10DLC number assignment management. + +## Signature + +```python +class RegistryNumbers(BaseResource) +``` + +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### delete + +#### Signature + +```python +delete(number_id) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py) + +Line 65. + +## Source + +[`signalwire/signalwire/rest/namespaces/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py) + +Line 62. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/registry/registry-orders/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/registry/registry-orders/index.mdx new file mode 100644 index 0000000000..d54e36dad3 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/registry/registry-orders/index.mdx @@ -0,0 +1,53 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/registry/registry-orders" +title: "RegistryOrders" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.registry.RegistryOrders" + parent: "signalwire.rest.namespaces.registry" + module: "signalwire.rest.namespaces.registry" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py" +--- +# `RegistryOrders` + +10DLC assignment order management. + +## Signature + +```python +class RegistryOrders(BaseResource) +``` + +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### get + +#### Signature + +```python +get(order_id) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py) + +Line 58. + +## Source + +[`signalwire/signalwire/rest/namespaces/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py) + +Line 55. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/short-codes/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/short-codes/index.mdx new file mode 100644 index 0000000000..160a0c9a98 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/short-codes/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/short-codes" +title: "short_codes" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.rest.namespaces.short_codes" + parent: "signalwire.rest.namespaces" + module: "signalwire.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/short_codes.py" +--- +# `short_codes` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module short_codes +``` + +## Classes + + + + Short code management (read + update only). + + + +## Source + +[`signalwire/signalwire/rest/namespaces/short_codes.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/short_codes.py) diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/short-codes/short-codes-resource/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/short-codes/short-codes-resource/index.mdx new file mode 100644 index 0000000000..301fd2db8c --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/short-codes/short-codes-resource/index.mdx @@ -0,0 +1,115 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/short-codes/short-codes-resource" +title: "ShortCodesResource" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.short_codes.ShortCodesResource" + parent: "signalwire.rest.namespaces.short_codes" + module: "signalwire.rest.namespaces.short_codes" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/short_codes.py" +--- +# `ShortCodesResource` + +Short code management (read + update only). + +## Signature + +```python +class ShortCodesResource(BaseResource) +``` + +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(http) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/short_codes.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/short_codes.py) + +Line 20. + +*** + +### get + +#### Signature + +```python +get(short_code_id) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/short_codes.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/short_codes.py) + +Line 26. + +*** + +### list + +#### Signature + +```python +list(**params = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/short_codes.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/short_codes.py) + +Line 23. + +*** + +### update + +#### Signature + +```python +update(short_code_id, **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/short_codes.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/short_codes.py) + +Line 29. + +## Source + +[`signalwire/signalwire/rest/namespaces/short_codes.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/short_codes.py) + +Line 17. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/sip-profile/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/sip-profile/index.mdx new file mode 100644 index 0000000000..07e9622c2e --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/sip-profile/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/sip-profile" +title: "sip_profile" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.rest.namespaces.sip_profile" + parent: "signalwire.rest.namespaces" + module: "signalwire.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/sip_profile.py" +--- +# `sip_profile` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module sip_profile +``` + +## Classes + + + + Project SIP profile (singleton resource). + + + +## Source + +[`signalwire/signalwire/rest/namespaces/sip_profile.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/sip_profile.py) diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/sip-profile/sip-profile-resource/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/sip-profile/sip-profile-resource/index.mdx new file mode 100644 index 0000000000..9a77e5e287 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/sip-profile/sip-profile-resource/index.mdx @@ -0,0 +1,89 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/sip-profile/sip-profile-resource" +title: "SipProfileResource" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.sip_profile.SipProfileResource" + parent: "signalwire.rest.namespaces.sip_profile" + module: "signalwire.rest.namespaces.sip_profile" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/sip_profile.py" +--- +# `SipProfileResource` + +Project SIP profile (singleton resource). + +## Signature + +```python +class SipProfileResource(BaseResource) +``` + +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(http) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/sip_profile.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/sip_profile.py) + +Line 20. + +*** + +### get + +#### Signature + +```python +get() +``` + +#### Source + +[`signalwire/signalwire/rest/namespaces/sip_profile.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/sip_profile.py) + +Line 23. + +*** + +### update + +#### Signature + +```python +update(**kwargs = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/sip_profile.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/sip_profile.py) + +Line 26. + +## Source + +[`signalwire/signalwire/rest/namespaces/sip_profile.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/sip_profile.py) + +Line 17. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/verified-callers/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/verified-callers/index.mdx new file mode 100644 index 0000000000..2157a9e0d3 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/verified-callers/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/verified-callers" +title: "verified_callers" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.rest.namespaces.verified_callers" + parent: "signalwire.rest.namespaces" + module: "signalwire.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/verified_callers.py" +--- +# `verified_callers` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module verified_callers +``` + +## Classes + + + + Verified caller ID management with verification flow. + + + +## Source + +[`signalwire/signalwire/rest/namespaces/verified_callers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/verified_callers.py) diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/verified-callers/verified-callers-resource/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/verified-callers/verified-callers-resource/index.mdx new file mode 100644 index 0000000000..87652ccd90 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/verified-callers/verified-callers-resource/index.mdx @@ -0,0 +1,95 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/verified-callers/verified-callers-resource" +title: "VerifiedCallersResource" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.verified_callers.VerifiedCallersResource" + parent: "signalwire.rest.namespaces.verified_callers" + module: "signalwire.rest.namespaces.verified_callers" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/verified_callers.py" +--- +# `VerifiedCallersResource` + +Verified caller ID management with verification flow. + +## Signature + +```python +class VerifiedCallersResource(CrudResource) +``` + +## Inheritance + +**Extends:** `CrudResource` + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(http) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/verified_callers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/verified_callers.py) + +Line 22. + +*** + +### redial\_verification + +#### Signature + +```python +redial_verification(caller_id) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/verified_callers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/verified_callers.py) + +Line 25. + +*** + +### submit\_verification + +#### Signature + +```python +submit_verification(caller_id, **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/verified_callers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/verified_callers.py) + +Line 28. + +## Source + +[`signalwire/signalwire/rest/namespaces/verified_callers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/verified_callers.py) + +Line 17. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/video/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/video/index.mdx new file mode 100644 index 0000000000..1256a3a351 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/video/index.mdx @@ -0,0 +1,68 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/video" +title: "video" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.rest.namespaces.video" + parent: "signalwire.rest.namespaces" + module: "signalwire.rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py" +--- +# `video` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module video +``` + +## Classes + + + + Video conference management with tokens and streams. + + + + Video conference token management. + + + + Video API namespace. + + + + Video room recording management. + + + + Video room management with streams. + + + + Video room session management. + + + + Video room token generation. + + + + Video stream management. + + + +## Source + +[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/video/video-conference-tokens/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/video/video-conference-tokens/index.mdx new file mode 100644 index 0000000000..a7c6931c39 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/video/video-conference-tokens/index.mdx @@ -0,0 +1,73 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/video/video-conference-tokens" +title: "VideoConferenceTokens" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.video.VideoConferenceTokens" + parent: "signalwire.rest.namespaces.video" + module: "signalwire.rest.namespaces.video" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py" +--- +# `VideoConferenceTokens` + +Video conference token management. + +## Signature + +```python +class VideoConferenceTokens(BaseResource) +``` + +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### get + +#### Signature + +```python +get(token_id) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) + +Line 92. + +*** + +### reset + +#### Signature + +```python +reset(token_id) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) + +Line 95. + +## Source + +[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) + +Line 89. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/video/video-conferences/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/video/video-conferences/index.mdx new file mode 100644 index 0000000000..18172605bf --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/video/video-conferences/index.mdx @@ -0,0 +1,99 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/video/video-conferences" +title: "VideoConferences" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.video.VideoConferences" + parent: "signalwire.rest.namespaces.video" + module: "signalwire.rest.namespaces.video" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py" +--- +# `VideoConferences` + +Video conference management with tokens and streams. + +## Signature + +```python +class VideoConferences(CrudResource) +``` + +## Inheritance + +**Extends:** `CrudResource` + +## Methods + +### create\_stream + +#### Signature + +```python +create_stream(conference_id, **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) + +Line 85. + +*** + +### list\_conference\_tokens + +#### Signature + +```python +list_conference_tokens(conference_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) + +Line 76. + +*** + +### list\_streams + +#### Signature + +```python +list_streams(conference_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) + +Line 82. + +## Source + +[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) + +Line 71. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/video/video-namespace/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/video/video-namespace/index.mdx new file mode 100644 index 0000000000..a92e0a9914 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/video/video-namespace/index.mdx @@ -0,0 +1,65 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/video/video-namespace" +title: "VideoNamespace" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.video.VideoNamespace" + parent: "signalwire.rest.namespaces.video" + module: "signalwire.rest.namespaces.video" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py" +--- +# `VideoNamespace` + +Video API namespace. + +## Signature + +```python +class VideoNamespace +``` + +## Properties + + + + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(http) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) + +Line 115. + +## Source + +[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) + +Line 112. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/video/video-room-recordings/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/video/video-room-recordings/index.mdx new file mode 100644 index 0000000000..fdf83aec37 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/video/video-room-recordings/index.mdx @@ -0,0 +1,115 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/video/video-room-recordings" +title: "VideoRoomRecordings" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.video.VideoRoomRecordings" + parent: "signalwire.rest.namespaces.video" + module: "signalwire.rest.namespaces.video" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py" +--- +# `VideoRoomRecordings` + +Video room recording management. + +## Signature + +```python +class VideoRoomRecordings(BaseResource) +``` + +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### delete + +#### Signature + +```python +delete(recording_id) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) + +Line 64. + +*** + +### get + +#### Signature + +```python +get(recording_id) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) + +Line 61. + +*** + +### list + +#### Signature + +```python +list(**params = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) + +Line 58. + +*** + +### list\_events + +#### Signature + +```python +list_events(recording_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) + +Line 67. + +## Source + +[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) + +Line 55. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/video/video-room-sessions/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/video/video-room-sessions/index.mdx new file mode 100644 index 0000000000..d96e670345 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/video/video-room-sessions/index.mdx @@ -0,0 +1,139 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/video/video-room-sessions" +title: "VideoRoomSessions" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.video.VideoRoomSessions" + parent: "signalwire.rest.namespaces.video" + module: "signalwire.rest.namespaces.video" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py" +--- +# `VideoRoomSessions` + +Video room session management. + +## Signature + +```python +class VideoRoomSessions(BaseResource) +``` + +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### get + +#### Signature + +```python +get(session_id) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) + +Line 42. + +*** + +### list + +#### Signature + +```python +list(**params = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) + +Line 39. + +*** + +### list\_events + +#### Signature + +```python +list_events(session_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) + +Line 45. + +*** + +### list\_members + +#### Signature + +```python +list_members(session_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) + +Line 48. + +*** + +### list\_recordings + +#### Signature + +```python +list_recordings(session_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) + +Line 51. + +## Source + +[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) + +Line 36. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/video/video-room-tokens/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/video/video-room-tokens/index.mdx new file mode 100644 index 0000000000..34e219f9c6 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/video/video-room-tokens/index.mdx @@ -0,0 +1,53 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/video/video-room-tokens" +title: "VideoRoomTokens" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.video.VideoRoomTokens" + parent: "signalwire.rest.namespaces.video" + module: "signalwire.rest.namespaces.video" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py" +--- +# `VideoRoomTokens` + +Video room token generation. + +## Signature + +```python +class VideoRoomTokens(BaseResource) +``` + +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### create + +#### Signature + +```python +create(**kwargs = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) + +Line 32. + +## Source + +[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) + +Line 29. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/video/video-rooms/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/video/video-rooms/index.mdx new file mode 100644 index 0000000000..0711a41a0c --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/video/video-rooms/index.mdx @@ -0,0 +1,77 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/video/video-rooms" +title: "VideoRooms" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.video.VideoRooms" + parent: "signalwire.rest.namespaces.video" + module: "signalwire.rest.namespaces.video" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py" +--- +# `VideoRooms` + +Video room management with streams. + +## Signature + +```python +class VideoRooms(CrudResource) +``` + +## Inheritance + +**Extends:** `CrudResource` + +## Methods + +### create\_stream + +#### Signature + +```python +create_stream(room_id, **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) + +Line 25. + +*** + +### list\_streams + +#### Signature + +```python +list_streams(room_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) + +Line 22. + +## Source + +[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) + +Line 17. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/video/video-streams/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/video/video-streams/index.mdx new file mode 100644 index 0000000000..ba5dff9670 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/rest/namespaces/video/video-streams/index.mdx @@ -0,0 +1,95 @@ +--- +slug: "/reference/python/signalwire/rest/namespaces/video/video-streams" +title: "VideoStreams" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.video.VideoStreams" + parent: "signalwire.rest.namespaces.video" + module: "signalwire.rest.namespaces.video" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py" +--- +# `VideoStreams` + +Video stream management. + +## Signature + +```python +class VideoStreams(BaseResource) +``` + +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### delete + +#### Signature + +```python +delete(stream_id) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) + +Line 108. + +*** + +### get + +#### Signature + +```python +get(stream_id) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) + +Line 102. + +*** + +### update + +#### Signature + +```python +update(stream_id, **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) + +Line 105. + +## Source + +[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) + +Line 99. diff --git a/fern/products/sdk-reference/python/signalwire/search/document-processor/document-processor/index.mdx b/fern/products/sdk-reference/python/signalwire/search/document-processor/document-processor/index.mdx new file mode 100644 index 0000000000..d92ae081c1 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/search/document-processor/document-processor/index.mdx @@ -0,0 +1,151 @@ +--- +slug: "/reference/python/signalwire/search/document-processor/document-processor" +title: "DocumentProcessor" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.search.document_processor.DocumentProcessor" + parent: "signalwire.search.document_processor" + module: "signalwire.search.document_processor" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/document_processor.py" +--- +# `DocumentProcessor` + +Enhanced document processor with smart chunking capabilities + +## Signature + +```python +class DocumentProcessor +``` + +## Properties + + + + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +Initialize document processor + +#### Signature + +```python +__init__( + chunking_strategy: str = 'sentence', + max_sentences_per_chunk: int = 5, + chunk_size: int = 50, + chunk_overlap: int = 10, + split_newlines: Optional[int] = None, + index_nlp_backend: str = 'nltk', + verbose: bool = False, + semantic_threshold: float = 0.5, + topic_threshold: float = 0.3 +) +``` + +#### Parameters + + + Strategy for chunking documents: + + + + For sentence strategy (default: 5) + + + + For sliding strategy - words per chunk (default: 50) + + + + For sliding strategy - overlap in words (default: 10) + + + + For sentence strategy - split on multiple newlines (optional) + + + + NLP backend for indexing (default: 'nltk') + + + + Whether to enable verbose logging (default: False) + + + + Similarity threshold for semantic chunking (default: 0.5) + + + + Similarity threshold for topic chunking (default: 0.3) + + +#### Source + +[`signalwire/signalwire/search/document_processor.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/document_processor.py) + +Line 82. + +*** + +### create\_chunks + +Create chunks from document content using specified chunking strategy + +#### Signature + +```python +create_chunks( + content: str, + filename: str, + file_type: str +) -> List[Dict[str, Any]] +``` + +#### Parameters + + + Document content (string) - should be the actual content, not a file path + + + + Name of the file (for metadata) + + + + File extension/type + + +#### Returns + +`List[Dict[str, Any]]` — List of chunk dictionaries + +#### Source + +[`signalwire/signalwire/search/document_processor.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/document_processor.py) + +Line 128. + +## Source + +[`signalwire/signalwire/search/document_processor.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/document_processor.py) + +Line 79. diff --git a/fern/products/sdk-reference/python/signalwire/search/document-processor/index.mdx b/fern/products/sdk-reference/python/signalwire/search/document-processor/index.mdx new file mode 100644 index 0000000000..541d7f97cc --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/search/document-processor/index.mdx @@ -0,0 +1,49 @@ +--- +slug: "/reference/python/signalwire/search/document-processor" +title: "DocumentProcessor" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.search.DocumentProcessor" + parent: "signalwire.search" + module: "signalwire.search" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/__init__.py" +--- +# `DocumentProcessor` + +## Signature + +```python +class DocumentProcessor +``` + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(*args = (), **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/search/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/__init__.py) + +Line 115. + +## Source + +[`signalwire/signalwire/search/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/__init__.py) + +Line 114. diff --git a/fern/products/sdk-reference/python/signalwire/search/document-processor/index__2.mdx b/fern/products/sdk-reference/python/signalwire/search/document-processor/index__2.mdx new file mode 100644 index 0000000000..fad23a2e25 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/search/document-processor/index__2.mdx @@ -0,0 +1,44 @@ +--- +slug: "/reference/python/signalwire/search/document-processor/index__2" +title: "document_processor" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.search.document_processor" + parent: "signalwire.search" + module: "signalwire.search" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/document_processor.py" +--- +# `document_processor` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module document_processor +``` + +## Properties + + + +## Classes + + + + Enhanced document processor with smart chunking capabilities + + + +## Source + +[`signalwire/signalwire/search/document_processor.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/document_processor.py) diff --git a/fern/products/sdk-reference/python/signalwire/search/index-builder/index-builder/index.mdx b/fern/products/sdk-reference/python/signalwire/search/index-builder/index-builder/index.mdx new file mode 100644 index 0000000000..d93b46501a --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/search/index-builder/index-builder/index.mdx @@ -0,0 +1,271 @@ +--- +slug: "/reference/python/signalwire/search/index-builder/index-builder" +title: "IndexBuilder" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.search.index_builder.IndexBuilder" + parent: "signalwire.search.index_builder" + module: "signalwire.search.index_builder" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/index_builder.py" +--- +# `IndexBuilder` + +Build searchable indexes from document directories + +## Signature + +```python +class IndexBuilder +``` + +## Properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +Initialize the index builder + +#### Signature + +```python +__init__( + model_name: str = 'sentence-transformers/all-mpnet-base-v2', + chunking_strategy: str = 'sentence', + max_sentences_per_chunk: int = 5, + chunk_size: int = 50, + chunk_overlap: int = 10, + split_newlines: Optional[int] = None, + index_nlp_backend: str = 'nltk', + verbose: bool = False, + semantic_threshold: float = 0.5, + topic_threshold: float = 0.3, + backend: str = 'sqlite', + connection_string: Optional[str] = None +) +``` + +#### Parameters + + + Name of the sentence transformer model to use + + + + Strategy for chunking documents ('sentence', 'sliding', 'paragraph', 'page', 'semantic', 'topic', 'qa', 'json') + + + + For sentence strategy (default: 5) + + + + For sliding strategy - words per chunk (default: 50) + + + + For sliding strategy - overlap in words (default: 10) + + + + For sentence strategy - split on multiple newlines (optional) + + + + NLP backend for indexing (default: 'nltk') + + + + Whether to enable verbose logging (default: False) + + + + Similarity threshold for semantic chunking (default: 0.5) + + + + Similarity threshold for topic chunking (default: 0.3) + + + + Storage backend ('sqlite' or 'pgvector') (default: 'sqlite') + + + + PostgreSQL connection string for pgvector backend + + +#### Source + +[`signalwire/signalwire/search/index_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/index_builder.py) + +Line 38. + +*** + +### build\_index + +Build complete search index from a single directory + +#### Signature + +```python +build_index( + source_dir: str, + output_file: str, + file_types: List[str], + exclude_patterns: Optional[List[str]] = None, + languages: List[str] = None, + tags: Optional[List[str]] = None +) +``` + +#### Parameters + + + Directory to scan for documents + + + + Output .swsearch file path + + + + List of file extensions to include + + + + Glob patterns to exclude + + + + List of languages to support + + + + Global tags to add to all chunks + + +#### Source + +[`signalwire/signalwire/search/index_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/index_builder.py) + +Line 283. + +*** + +### build\_index\_from\_sources + +Build complete search index from multiple sources (files and directories) + +#### Signature + +```python +build_index_from_sources( + sources: List[Path], + output_file: str, + file_types: List[str], + exclude_patterns: Optional[List[str]] = None, + languages: List[str] = None, + tags: Optional[List[str]] = None, + overwrite: bool = False +) +``` + +#### Parameters + + + List of Path objects (files and/or directories) + + + + Output .swsearch file path + + + + List of file extensions to include for directories + + + + Glob patterns to exclude + + + + List of languages to support + + + + Global tags to add to all chunks + + + + +#### Source + +[`signalwire/signalwire/search/index_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/index_builder.py) + +Line 164. + +*** + +### validate\_index + +Validate an existing search index + +#### Signature + +```python +validate_index(index_file: str) -> Dict[str, Any] +``` + +#### Parameters + + + +#### Returns + +`Dict[str, Any]` + +#### Source + +[`signalwire/signalwire/search/index_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/index_builder.py) + +Line 687. + +## Source + +[`signalwire/signalwire/search/index_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/index_builder.py) + +Line 35. diff --git a/fern/products/sdk-reference/python/signalwire/search/index-builder/index.mdx b/fern/products/sdk-reference/python/signalwire/search/index-builder/index.mdx new file mode 100644 index 0000000000..6e3bdc3907 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/search/index-builder/index.mdx @@ -0,0 +1,49 @@ +--- +slug: "/reference/python/signalwire/search/index-builder" +title: "IndexBuilder" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.search.IndexBuilder" + parent: "signalwire.search" + module: "signalwire.search" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/__init__.py" +--- +# `IndexBuilder` + +## Signature + +```python +class IndexBuilder +``` + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(*args = (), **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/search/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/__init__.py) + +Line 119. + +## Source + +[`signalwire/signalwire/search/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/__init__.py) + +Line 118. diff --git a/fern/products/sdk-reference/python/signalwire/search/index-builder/index__2.mdx b/fern/products/sdk-reference/python/signalwire/search/index-builder/index__2.mdx new file mode 100644 index 0000000000..22b9e760a7 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/search/index-builder/index__2.mdx @@ -0,0 +1,44 @@ +--- +slug: "/reference/python/signalwire/search/index-builder/index__2" +title: "index_builder" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.search.index_builder" + parent: "signalwire.search" + module: "signalwire.search" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/index_builder.py" +--- +# `index_builder` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module index_builder +``` + +## Properties + + + +## Classes + + + + Build searchable indexes from document directories + + + +## Source + +[`signalwire/signalwire/search/index_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/index_builder.py) diff --git a/fern/products/sdk-reference/python/signalwire/search/index.mdx b/fern/products/sdk-reference/python/signalwire/search/index.mdx new file mode 100644 index 0000000000..a4a2d1c936 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/search/index.mdx @@ -0,0 +1,128 @@ +--- +slug: "/reference/python/signalwire/search" +title: "search" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.search" + parent: "signalwire" + module: "signalwire" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/__init__.py" +--- +# `search` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module search +``` + +## Properties + + + +## Classes + + + + + + + + + + + +## Modules + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + +## Functions + +### preprocess\_document\_content + +#### Signature + +```python +preprocess_document_content(*args = (), **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/search/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/__init__.py) + +Line 111. + +*** + +### preprocess\_query + +#### Signature + +```python +preprocess_query(*args = (), **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/search/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/__init__.py) + +Line 108. + +## Source + +[`signalwire/signalwire/search/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/search/migration/index.mdx b/fern/products/sdk-reference/python/signalwire/search/migration/index.mdx new file mode 100644 index 0000000000..1f74a8ef7d --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/search/migration/index.mdx @@ -0,0 +1,44 @@ +--- +slug: "/reference/python/signalwire/search/migration" +title: "migration" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.search.migration" + parent: "signalwire.search" + module: "signalwire.search" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/migration.py" +--- +# `migration` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module migration +``` + +## Properties + + + +## Classes + + + + Migrate search indexes between different backends + + + +## Source + +[`signalwire/signalwire/search/migration.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/migration.py) diff --git a/fern/products/sdk-reference/python/signalwire/search/migration/search-index-migrator/index.mdx b/fern/products/sdk-reference/python/signalwire/search/migration/search-index-migrator/index.mdx new file mode 100644 index 0000000000..e6aa7e3377 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/search/migration/search-index-migrator/index.mdx @@ -0,0 +1,180 @@ +--- +slug: "/reference/python/signalwire/search/migration/search-index-migrator" +title: "SearchIndexMigrator" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.search.migration.SearchIndexMigrator" + parent: "signalwire.search.migration" + module: "signalwire.search.migration" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/migration.py" +--- +# `SearchIndexMigrator` + +Migrate search indexes between different backends + +## Signature + +```python +class SearchIndexMigrator +``` + +## Properties + + + +## Methods + +### \_\_init\_\_ + +Initialize the migrator + +#### Signature + +```python +__init__(verbose: bool = False) +``` + +#### Parameters + + + Enable verbose output + + +#### Source + +[`signalwire/signalwire/search/migration.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/migration.py) + +Line 29. + +*** + +### get\_index\_info + +Get information about a search index + +#### Signature + +```python +get_index_info(index_path: str) -> Dict[str, Any] +``` + +#### Parameters + + + Path to index file or pgvector collection identifier + + +#### Returns + +`Dict[str, Any]` — Index information including type, config, and statistics + +#### Source + +[`signalwire/signalwire/search/migration.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/migration.py) + +Line 382. + +*** + +### migrate\_pgvector\_to\_sqlite + +Migrate a pgvector collection to SQLite .swsearch format + +#### Signature + +```python +migrate_pgvector_to_sqlite( + connection_string: str, + collection_name: str, + output_path: str, + batch_size: int = 100 +) -> Dict[str, Any] +``` + +#### Parameters + + + PostgreSQL connection string + + + + Name of the pgvector collection + + + + Output .swsearch file path + + + + Number of chunks to fetch at once + + +#### Returns + +`Dict[str, Any]` — Migration statistics + +#### Source + +[`signalwire/signalwire/search/migration.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/migration.py) + +Line 237. + +*** + +### migrate\_sqlite\_to\_pgvector + +Migrate a .swsearch SQLite index to pgvector + +#### Signature + +```python +migrate_sqlite_to_pgvector( + sqlite_path: str, + connection_string: str, + collection_name: str, + overwrite: bool = False, + batch_size: int = 100 +) -> Dict[str, Any] +``` + +#### Parameters + + + Path to .swsearch file + + + + PostgreSQL connection string + + + + Name for the pgvector collection + + + + Whether to overwrite existing collection + + + + Number of chunks to insert at once + + +#### Returns + +`Dict[str, Any]` — Migration statistics + +#### Source + +[`signalwire/signalwire/search/migration.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/migration.py) + +Line 38. + +## Source + +[`signalwire/signalwire/search/migration.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/migration.py) + +Line 26. diff --git a/fern/products/sdk-reference/python/signalwire/search/models/index.mdx b/fern/products/sdk-reference/python/signalwire/search/models/index.mdx new file mode 100644 index 0000000000..f9e3e41356 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/search/models/index.mdx @@ -0,0 +1,66 @@ +--- +slug: "/reference/python/signalwire/search/models" +title: "models" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.search.models" + parent: "signalwire.search" + module: "signalwire.search" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/models.py" +--- +# `models` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module models +``` + +## Constants + + + + + +## Functions + +### resolve\_model\_alias + +Resolve model alias to full model name + +#### Signature + +```python +resolve_model_alias(model_name: str) -> str +``` + +#### Parameters + + + Model name or alias (mini, base, large) + + +#### Returns + +`str` — Full model name + +#### Source + +[`signalwire/signalwire/search/models.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/models.py) + +Line 20. + +## Source + +[`signalwire/signalwire/search/models.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/models.py) diff --git a/fern/products/sdk-reference/python/signalwire/search/pgvector-backend/index.mdx b/fern/products/sdk-reference/python/signalwire/search/pgvector-backend/index.mdx new file mode 100644 index 0000000000..deca302af2 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/search/pgvector-backend/index.mdx @@ -0,0 +1,52 @@ +--- +slug: "/reference/python/signalwire/search/pgvector-backend" +title: "pgvector_backend" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.search.pgvector_backend" + parent: "signalwire.search" + module: "signalwire.search" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/pgvector_backend.py" +--- +# `pgvector_backend` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module pgvector_backend +``` + +## Properties + + + +## Constants + + + +## Classes + + + + PostgreSQL pgvector backend for search indexing and retrieval + + + + PostgreSQL pgvector backend for search operations + + + +## Source + +[`signalwire/signalwire/search/pgvector_backend.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/pgvector_backend.py) diff --git a/fern/products/sdk-reference/python/signalwire/search/pgvector-backend/pg-vector-backend/index.mdx b/fern/products/sdk-reference/python/signalwire/search/pgvector-backend/pg-vector-backend/index.mdx new file mode 100644 index 0000000000..fd33ddb763 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/search/pgvector-backend/pg-vector-backend/index.mdx @@ -0,0 +1,211 @@ +--- +slug: "/reference/python/signalwire/search/pgvector-backend/pg-vector-backend" +title: "PgVectorBackend" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.search.pgvector_backend.PgVectorBackend" + parent: "signalwire.search.pgvector_backend" + module: "signalwire.search.pgvector_backend" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/pgvector_backend.py" +--- +# `PgVectorBackend` + +PostgreSQL pgvector backend for search indexing and retrieval + +## Signature + +```python +class PgVectorBackend +``` + +## Properties + + + + + +## Methods + +### \_\_init\_\_ + +Initialize pgvector backend + +#### Signature + +```python +__init__(connection_string: str) +``` + +#### Parameters + + + PostgreSQL connection string + + +#### Source + +[`signalwire/signalwire/search/pgvector_backend.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/pgvector_backend.py) + +Line 45. + +*** + +### close + +Close database connection + +#### Signature + +```python +close() +``` + +#### Source + +[`signalwire/signalwire/search/pgvector_backend.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/pgvector_backend.py) + +Line 396. + +*** + +### create\_schema + +Create database schema for a collection + +#### Signature + +```python +create_schema(collection_name: str, embedding_dim: int = 768) +``` + +#### Parameters + + + Name of the collection + + + + Dimension of embeddings + + +#### Source + +[`signalwire/signalwire/search/pgvector_backend.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/pgvector_backend.py) + +Line 84. + +*** + +### delete\_collection + +Delete a collection and its data + +#### Signature + +```python +delete_collection(collection_name: str) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/search/pgvector_backend.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/pgvector_backend.py) + +Line 378. + +*** + +### get\_stats + +Get statistics for a collection + +#### Signature + +```python +get_stats(collection_name: str) -> Dict[str, Any] +``` + +#### Parameters + + + +#### Returns + +`Dict[str, Any]` + +#### Source + +[`signalwire/signalwire/search/pgvector_backend.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/pgvector_backend.py) + +Line 328. + +*** + +### list\_collections + +List all collections in the database + +#### Signature + +```python +list_collections() -> List[str] +``` + +#### Returns + +`List[str]` + +#### Source + +[`signalwire/signalwire/search/pgvector_backend.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/pgvector_backend.py) + +Line 370. + +*** + +### store\_chunks + +Store document chunks in the database + +#### Signature + +```python +store_chunks( + chunks: List[Dict[str, Any]], + collection_name: str, + config: Dict[str, Any] +) +``` + +#### Parameters + + + List of processed chunks with embeddings + + + + Name of the collection + + + + Configuration metadata + + +#### Source + +[`signalwire/signalwire/search/pgvector_backend.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/pgvector_backend.py) + +Line 209. + +## Source + +[`signalwire/signalwire/search/pgvector_backend.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/pgvector_backend.py) + +Line 42. diff --git a/fern/products/sdk-reference/python/signalwire/search/pgvector-backend/pg-vector-search-backend/index.mdx b/fern/products/sdk-reference/python/signalwire/search/pgvector-backend/pg-vector-search-backend/index.mdx new file mode 100644 index 0000000000..e62907d0c2 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/search/pgvector-backend/pg-vector-search-backend/index.mdx @@ -0,0 +1,230 @@ +--- +slug: "/reference/python/signalwire/search/pgvector-backend/pg-vector-search-backend" +title: "PgVectorSearchBackend" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.search.pgvector_backend.PgVectorSearchBackend" + parent: "signalwire.search.pgvector_backend" + module: "signalwire.search.pgvector_backend" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/pgvector_backend.py" +--- +# `PgVectorSearchBackend` + +PostgreSQL pgvector backend for search operations + +## Signature + +```python +class PgVectorSearchBackend +``` + +## Properties + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +Initialize search backend + +#### Signature + +```python +__init__(connection_string: str, collection_name: str) +``` + +#### Parameters + + + PostgreSQL connection string + + + + Name of the collection to search + + +#### Source + +[`signalwire/signalwire/search/pgvector_backend.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/pgvector_backend.py) + +Line 406. + +*** + +### close + +Close database connection + +#### Signature + +```python +close() +``` + +#### Source + +[`signalwire/signalwire/search/pgvector_backend.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/pgvector_backend.py) + +Line 1010. + +*** + +### fetch\_candidates + +Fetch raw candidates with per-source signal scores. + +Runs vector/keyword/metadata/filename searches, applies similarity +threshold to raw vector scores pre-merge (keeps threshold intuitive), +and merges into a candidate list keyed by chunk id. Does NOT compute +final scores, boost exact matches, dedupe, or apply diversity - +those run uniformly in SearchEngine for every backend. + +Result shape per candidate (matches sqlite path): +\{ +'id', 'content', 'metadata': \{filename, section, tags, \*\*custom\}, +'search\_type', 'vector\_score' (if vector matched), +'vector\_distance' (if vector matched), +'sources': \{source\_type: True, ...\}, +'source\_scores': \{source\_type: raw\_score, ...\}, +\} + +#### Signature + +```python +fetch_candidates( + query_vector: List[float], + enhanced_text: str, + count: int, + similarity_threshold: float = 0.0, + tags: Optional[List[str]] = None, + original_query: Optional[str] = None +) -> List[Dict[str, Any]] +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`List[Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/search/pgvector_backend.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/pgvector_backend.py) + +Line 847. + +*** + +### get\_stats + +Get statistics for the collection + +#### Signature + +```python +get_stats() -> Dict[str, Any] +``` + +#### Returns + +`Dict[str, Any]` + +#### Source + +[`signalwire/signalwire/search/pgvector_backend.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/pgvector_backend.py) + +Line 1003. + +*** + +### search + +Perform hybrid search (vector + keyword + metadata). + +NOTE: As of the unified-pipeline refactor, production traffic flows +through SearchEngine.search() which calls fetch\_candidates() here +and then runs all post-processing (scoring, dedup, diversity) in +SearchEngine. This method remains as a self-contained search path +for direct backend use and test coverage, but does NOT receive the +SearchEngine's exact-match boost, filename diversity, or match-type +diversity logic. For consistent behavior, call SearchEngine.search(). + +#### Signature + +```python +search( + query_vector: List[float], + enhanced_text: str, + count: int = 5, + similarity_threshold: float = 0.0, + tags: Optional[List[str]] = None, + keyword_weight: Optional[float] = None +) -> List[Dict[str, Any]] +``` + +#### Parameters + + + Embedding vector for the query + + + + Processed query text for keyword search + + + + Number of results to return + + + + Minimum similarity score + + + + Filter by tags + + + + Manual keyword weight (0.0-1.0). If None, uses default weighting + + +#### Returns + +`List[Dict[str, Any]]` — List of search results with scores and metadata + +#### Source + +[`signalwire/signalwire/search/pgvector_backend.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/pgvector_backend.py) + +Line 471. + +## Source + +[`signalwire/signalwire/search/pgvector_backend.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/pgvector_backend.py) + +Line 403. diff --git a/fern/products/sdk-reference/python/signalwire/search/query-processor/index.mdx b/fern/products/sdk-reference/python/signalwire/search/query-processor/index.mdx new file mode 100644 index 0000000000..36dd239447 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/search/query-processor/index.mdx @@ -0,0 +1,362 @@ +--- +slug: "/reference/python/signalwire/search/query-processor" +title: "query_processor" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.search.query_processor" + parent: "signalwire.search" + module: "signalwire.search" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/query_processor.py" +--- +# `query_processor` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module query_processor +``` + +## Properties + + + + + + + +## Functions + +### detect\_language + +Detect language of input text +Simple implementation - can be enhanced with langdetect library + +#### Signature + +```python +detect_language(text: str) -> str +``` + +#### Parameters + + + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/search/query_processor.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/query_processor.py) + +Line 25. + +*** + +### ensure\_nltk\_resources + +Download required NLTK resources if not already present + +#### Signature + +```python +ensure_nltk_resources() +``` + +#### Source + +[`signalwire/signalwire/search/query_processor.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/query_processor.py) + +Line 195. + +*** + +### get\_synonyms + +Get synonyms for a word using WordNet + +#### Signature + +```python +get_synonyms(word: str, pos_tag: str, max_synonyms: int = 5) -> List[str] +``` + +#### Parameters + + + + + + + +#### Returns + +`List[str]` + +#### Source + +[`signalwire/signalwire/search/query_processor.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/query_processor.py) + +Line 236. + +*** + +### get\_wordnet\_pos + +Map spaCy POS tags to WordNet POS tags. + +#### Signature + +```python +get_wordnet_pos(spacy_pos) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/search/query_processor.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/query_processor.py) + +Line 232. + +*** + +### load\_spacy\_model + +Load spaCy model for the given language +Returns None if spaCy is not available or model not found + +#### Signature + +```python +load_spacy_model(language: str) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/search/query_processor.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/query_processor.py) + +Line 44. + +*** + +### preprocess\_document\_content + +Preprocess document content for better searchability + +#### Signature + +```python +preprocess_document_content( + content: str, + language: str = 'en', + nlp_backend: str = None, + index_nlp_backend: str = 'nltk' +) -> Dict[str, Any] +``` + +#### Parameters + + + Document content to process + + + + Language code for processing + + + + DEPRECATED - use index\_nlp\_backend instead + + + + NLP backend for document processing ('nltk' for fast, 'spacy' for better quality) + + +#### Returns + +`Dict[str, Any]` — Dict containing enhanced text and extracted keywords + +#### Source + +[`signalwire/signalwire/search/query_processor.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/query_processor.py) + +Line 462. + +*** + +### preprocess\_query + +Advanced query preprocessing with language detection, POS tagging, synonym expansion, and vectorization + +#### Signature + +```python +preprocess_query( + query: str, + language: str = 'en', + pos_to_expand: Optional[List[str]] = None, + max_synonyms: int = 5, + debug: bool = False, + vector: bool = False, + vectorize_query_param: bool = False, + nlp_backend: str = None, + query_nlp_backend: str = 'nltk', + model_name: str = None, + preserve_original: bool = True +) -> Dict[str, Any] +``` + +#### Parameters + + + Input query string + + + + Language code ('en', 'es', etc.) or 'auto' for detection + + + + List of POS tags to expand with synonyms + + + + Maximum synonyms per word + + + + Enable debug output + + + + Include vector embedding in output + + + + If True, just vectorize without other processing + + + + DEPRECATED - use query\_nlp\_backend instead + + + + NLP backend for query processing ('nltk' for fast, 'spacy' for better quality) + + + + + + +#### Returns + +`Dict[str, Any]` — Dict containing processed query, language, POS tags, and optionally vector + +#### Source + +[`signalwire/signalwire/search/query_processor.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/query_processor.py) + +Line 276. + +*** + +### remove\_duplicate\_words + +Remove duplicate words from the input string while preserving the order and punctuation. + +#### Signature + +```python +remove_duplicate_words(input_string: str) -> str +``` + +#### Parameters + + + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/search/query_processor.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/query_processor.py) + +Line 255. + +*** + +### set\_global\_model + +Legacy function - adds model to cache instead of setting globally + +#### Signature + +```python +set_global_model(model) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/search/query_processor.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/query_processor.py) + +Line 86. + +*** + +### vectorize\_query + +Vectorize query using sentence transformers +Returns numpy array of embeddings + +#### Signature + +```python +vectorize_query(query: str, model = None, model_name: str = None) +``` + +#### Parameters + + + Query string to vectorize + + + + Optional pre-loaded model instance. If not provided, uses cached model. + + + + Optional model name to use if loading a new model + + +#### Source + +[`signalwire/signalwire/search/query_processor.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/query_processor.py) + +Line 145. + +## Source + +[`signalwire/signalwire/search/query_processor.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/query_processor.py) diff --git a/fern/products/sdk-reference/python/signalwire/search/search-engine/index.mdx b/fern/products/sdk-reference/python/signalwire/search/search-engine/index.mdx new file mode 100644 index 0000000000..a2b5b88ff8 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/search/search-engine/index.mdx @@ -0,0 +1,49 @@ +--- +slug: "/reference/python/signalwire/search/search-engine" +title: "SearchEngine" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.search.SearchEngine" + parent: "signalwire.search" + module: "signalwire.search" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/__init__.py" +--- +# `SearchEngine` + +## Signature + +```python +class SearchEngine +``` + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(*args = (), **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/search/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/__init__.py) + +Line 123. + +## Source + +[`signalwire/signalwire/search/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/__init__.py) + +Line 122. diff --git a/fern/products/sdk-reference/python/signalwire/search/search-engine/index__2.mdx b/fern/products/sdk-reference/python/signalwire/search/search-engine/index__2.mdx new file mode 100644 index 0000000000..42b45f0f1c --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/search/search-engine/index__2.mdx @@ -0,0 +1,46 @@ +--- +slug: "/reference/python/signalwire/search/search-engine/index__2" +title: "search_engine" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.search.search_engine" + parent: "signalwire.search" + module: "signalwire.search" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_engine.py" +--- +# `search_engine` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module search_engine +``` + +## Properties + + + + + +## Classes + + + + Hybrid search engine for vector and keyword search + + + +## Source + +[`signalwire/signalwire/search/search_engine.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_engine.py) diff --git a/fern/products/sdk-reference/python/signalwire/search/search-engine/search-engine/index.mdx b/fern/products/sdk-reference/python/signalwire/search/search-engine/search-engine/index.mdx new file mode 100644 index 0000000000..8d0c9e27e6 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/search/search-engine/search-engine/index.mdx @@ -0,0 +1,180 @@ +--- +slug: "/reference/python/signalwire/search/search-engine/search-engine" +title: "SearchEngine" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.search.search_engine.SearchEngine" + parent: "signalwire.search.search_engine" + module: "signalwire.search.search_engine" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_engine.py" +--- +# `SearchEngine` + +Hybrid search engine for vector and keyword search + +## Signature + +```python +class SearchEngine +``` + +## Properties + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +Initialize search engine + +#### Signature + +```python +__init__( + backend: str = 'sqlite', + index_path: Optional[str] = None, + connection_string: Optional[str] = None, + collection_name: Optional[str] = None, + model = None +) +``` + +#### Parameters + + + Storage backend ('sqlite' or 'pgvector') + + + + Path to .swsearch file (for sqlite backend) + + + + PostgreSQL connection string (for pgvector backend) + + + + Collection name (for pgvector backend) + + + + Optional sentence transformer model + + +#### Source + +[`signalwire/signalwire/search/search_engine.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_engine.py) + +Line 30. + +*** + +### get\_stats + +Get statistics about the search index + +#### Signature + +```python +get_stats() -> Dict[str, Any] +``` + +#### Returns + +`Dict[str, Any]` + +#### Source + +[`signalwire/signalwire/search/search_engine.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_engine.py) + +Line 1346. + +*** + +### search + +Unified hybrid search: backends fetch candidates, SearchEngine post-processes. + +> \[!NOTE] +> +> 1. fetch\_candidates(k = count \* search\_multiplier) — per-source signals +> 2. \_process\_candidates — score / boost / dedupe / diversity +> 3. return top `count` + +Backends (sqlite, pgvector, future) only implement candidate fetching. +All quality logic (max-signal scoring with agreement boost, exact-match +boosting, content dedup, filename diversity, match-type diversity) runs +once here and therefore applies to every backend uniformly. + +#### Signature + +```python +search( + query_vector: List[float], + enhanced_text: str, + count: int = 3, + similarity_threshold: float = 0.0, + tags: Optional[List[str]] = None, + keyword_weight: Optional[float] = None, + original_query: Optional[str] = None +) -> List[Dict[str, Any]] +``` + +#### Parameters + + + Embedding vector for the query + + + + Processed query text for keyword search + + + + Number of results to return + + + + Minimum similarity score (applied to raw vector pre-merge so the threshold is intuitive) + + + + Filter by tags + + + + Accepted for API stability; scoring is max-signal-wins with agreement boost, so this is no-op currently + + + + Original query for exact matching / filename match + + +#### Returns + +`List[Dict[str, Any]]` — List of search results with scores and metadata + +#### Source + +[`signalwire/signalwire/search/search_engine.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_engine.py) + +Line 79. + +## Source + +[`signalwire/signalwire/search/search_engine.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_engine.py) + +Line 27. diff --git a/fern/products/sdk-reference/python/signalwire/search/search-service/index.mdx b/fern/products/sdk-reference/python/signalwire/search/search-service/index.mdx new file mode 100644 index 0000000000..38d1b08ce5 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/search/search-service/index.mdx @@ -0,0 +1,49 @@ +--- +slug: "/reference/python/signalwire/search/search-service" +title: "SearchService" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.search.SearchService" + parent: "signalwire.search" + module: "signalwire.search" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/__init__.py" +--- +# `SearchService` + +## Signature + +```python +class SearchService +``` + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(*args = (), **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/search/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/__init__.py) + +Line 127. + +## Source + +[`signalwire/signalwire/search/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/__init__.py) + +Line 126. diff --git a/fern/products/sdk-reference/python/signalwire/search/search-service/index__2.mdx b/fern/products/sdk-reference/python/signalwire/search/search-service/index__2.mdx new file mode 100644 index 0000000000..8c61afbb57 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/search/search-service/index__2.mdx @@ -0,0 +1,50 @@ +--- +slug: "/reference/python/signalwire/search/search-service/index__2" +title: "search_service" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.search.search_service" + parent: "signalwire.search" + module: "signalwire.search" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_service.py" +--- +# `search_service` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module search_service +``` + +## Properties + + + +## Classes + + + + + + + + + + Local search service with HTTP API supporting both SQLite and pgvector backends + + + +## Source + +[`signalwire/signalwire/search/search_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_service.py) diff --git a/fern/products/sdk-reference/python/signalwire/search/search-service/search-request/index.mdx b/fern/products/sdk-reference/python/signalwire/search/search-service/search-request/index.mdx new file mode 100644 index 0000000000..52631c4c1f --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/search/search-service/search-request/index.mdx @@ -0,0 +1,78 @@ +--- +slug: "/reference/python/signalwire/search/search-service/search-request" +title: "SearchRequest" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.search.search_service.SearchRequest" + parent: "signalwire.search.search_service" + module: "signalwire.search.search_service" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_service.py" +--- +# `SearchRequest` + +## Signature + +```python +class SearchRequest +``` + +## Properties + + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + query: str, + index_name: str = 'default', + count: int = 3, + similarity_threshold: float = 0.0, + tags: Optional[List[str]] = None, + language: Optional[str] = None +) +``` + +#### Parameters + + + + + + + + + + + + + +#### Source + +[`signalwire/signalwire/search/search_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_service.py) + +Line 68. + +## Source + +[`signalwire/signalwire/search/search_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_service.py) + +Line 67. diff --git a/fern/products/sdk-reference/python/signalwire/search/search-service/search-response/index.mdx b/fern/products/sdk-reference/python/signalwire/search/search-service/search-response/index.mdx new file mode 100644 index 0000000000..dbbd247148 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/search/search-service/search-response/index.mdx @@ -0,0 +1,58 @@ +--- +slug: "/reference/python/signalwire/search/search-service/search-response" +title: "SearchResponse" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.search.search_service.SearchResponse" + parent: "signalwire.search.search_service" + module: "signalwire.search.search_service" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_service.py" +--- +# `SearchResponse` + +## Signature + +```python +class SearchResponse +``` + +## Properties + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + results: List[SearchResult], + query_analysis: Optional[Dict[str, Any]] = None +) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/search/search_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_service.py) + +Line 85. + +## Source + +[`signalwire/signalwire/search/search_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_service.py) + +Line 84. diff --git a/fern/products/sdk-reference/python/signalwire/search/search-service/search-result/index.mdx b/fern/products/sdk-reference/python/signalwire/search/search-service/search-result/index.mdx new file mode 100644 index 0000000000..3904110bbb --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/search/search-service/search-result/index.mdx @@ -0,0 +1,59 @@ +--- +slug: "/reference/python/signalwire/search/search-service/search-result" +title: "SearchResult" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.search.search_service.SearchResult" + parent: "signalwire.search.search_service" + module: "signalwire.search.search_service" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_service.py" +--- +# `SearchResult` + +## Signature + +```python +class SearchResult +``` + +## Properties + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(content: str, score: float, metadata: Dict[str, Any]) +``` + +#### Parameters + + + + + + + +#### Source + +[`signalwire/signalwire/search/search_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_service.py) + +Line 79. + +## Source + +[`signalwire/signalwire/search/search_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_service.py) + +Line 78. diff --git a/fern/products/sdk-reference/python/signalwire/search/search-service/search-service/index.mdx b/fern/products/sdk-reference/python/signalwire/search/search-service/search-service/index.mdx new file mode 100644 index 0000000000..a5cd7ba53b --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/search/search-service/search-service/index.mdx @@ -0,0 +1,186 @@ +--- +slug: "/reference/python/signalwire/search/search-service/search-service" +title: "SearchService" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.search.search_service.SearchService" + parent: "signalwire.search.search_service" + module: "signalwire.search.search_service" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_service.py" +--- +# `SearchService` + +Local search service with HTTP API supporting both SQLite and pgvector backends + +## Signature + +```python +class SearchService +``` + +## Properties + + + + + + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + port: int = 8001, + indexes: Dict[str, str] = None, + basic_auth: Optional[Tuple[str, str]] = None, + config_file: Optional[str] = None, + backend: str = 'sqlite', + connection_string: Optional[str] = None +) +``` + +#### Parameters + + + + + + + + + + + + + +#### Source + +[`signalwire/signalwire/search/search_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_service.py) + +Line 103. + +*** + +### search\_direct + +Direct search method (non-async) for programmatic use + +#### Signature + +```python +search_direct( + query: str, + index_name: str = 'default', + count: int = 3, + distance: float = 0.0, + tags: Optional[List[str]] = None, + language: Optional[str] = None +) -> Dict[str, Any] +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`Dict[str, Any]` + +#### Source + +[`signalwire/signalwire/search/search_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_service.py) + +Line 483. + +*** + +### start + +Start the service with optional HTTPS support. + +#### Signature + +```python +start( + host: str = '0.0.0.0', + port: Optional[int] = None, + ssl_cert: Optional[str] = None, + ssl_key: Optional[str] = None +) +``` + +#### Parameters + + + Host to bind to (default: "0.0.0.0") + + + + Port to bind to (default: self.port) + + + + Path to SSL certificate file (overrides environment) + + + + Path to SSL key file (overrides environment) + + +#### Source + +[`signalwire/signalwire/search/search_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_service.py) + +Line 521. + +*** + +### stop + +Stop the service (placeholder for cleanup) + +#### Signature + +```python +stop() +``` + +#### Source + +[`signalwire/signalwire/search/search_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_service.py) + +Line 585. + +## Source + +[`signalwire/signalwire/search/search_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_service.py) + +Line 100. diff --git a/fern/products/sdk-reference/python/signalwire/skills/api-ninjas-trivia/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/api-ninjas-trivia/index.mdx new file mode 100644 index 0000000000..6ae109a07b --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/skills/api-ninjas-trivia/index.mdx @@ -0,0 +1,44 @@ +--- +slug: "/reference/python/signalwire/skills/api-ninjas-trivia" +title: "api_ninjas_trivia" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.api_ninjas_trivia" + parent: "signalwire.skills" + module: "signalwire.skills" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/api_ninjas_trivia/__init__.py" +--- +# `api_ninjas_trivia` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module api_ninjas_trivia +``` + +## Properties + + + +## Modules + + + + Copyright (c) 2025 SignalWire + + + +## Source + +[`signalwire/signalwire/skills/api_ninjas_trivia/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/api_ninjas_trivia/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/api-ninjas-trivia/skill/api-ninjas-trivia-skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/api-ninjas-trivia/skill/api-ninjas-trivia-skill/index.mdx new file mode 100644 index 0000000000..1362fab3ae --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/skills/api-ninjas-trivia/skill/api-ninjas-trivia-skill/index.mdx @@ -0,0 +1,227 @@ +--- +slug: "/reference/python/signalwire/skills/api-ninjas-trivia/skill/api-ninjas-trivia-skill" +title: "ApiNinjasTriviaSkill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.skills.api_ninjas_trivia.skill.ApiNinjasTriviaSkill" + parent: "signalwire.skills.api_ninjas_trivia.skill" + module: "signalwire.skills.api_ninjas_trivia.skill" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/api_ninjas_trivia/skill.py" +--- +# `ApiNinjasTriviaSkill` + +Skill for getting trivia questions from API Ninjas with configurable categories. + +Supports multiple instances with different tool names and category combinations. +Uses DataMap for serverless execution with dynamic enum generation. + +Configuration: + +- tool\_name: Custom name for the generated SWAIG function +- api\_key: API Ninjas API key +- categories: Array of category strings to enable + +Available categories: + +- artliterature: Art and Literature +- language: Language +- sciencenature: Science and Nature +- general: General Knowledge +- fooddrink: Food and Drink +- peopleplaces: People and Places +- geography: Geography +- historyholidays: History and Holidays +- entertainment: Entertainment +- toysgames: Toys and Games +- music: Music +- mathematics: Mathematics +- religionmythology: Religion and Mythology +- sportsleisure: Sports and Leisure + +> \[!NOTE] +> agent.add\_skill("api\_ninjas\_trivia", \{ +> "tool\_name": "get\_science\_trivia", +> "api\_key": "your\_api\_key", +> "categories": \["sciencenature", "mathematics", "general"] +> \}) + +## Signature + +```python +class ApiNinjasTriviaSkill(SkillBase) +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/python/signalwire/core/skill-base/skill-base) + +## Properties + + + + + + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +Initialize the skill with configuration parameters. + +#### Signature + +```python +__init__(agent, params: Dict[str, Any] = None) +``` + +#### Parameters + + + The agent instance this skill belongs to + + + + Configuration dictionary containing: + + +#### Source + +[`signalwire/signalwire/skills/api_ninjas_trivia/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/api_ninjas_trivia/skill.py) + +Line 81. + +*** + +### get\_instance\_key + +Generate a unique instance key for this skill configuration. + +#### Signature + +```python +get_instance_key() -> str +``` + +#### Returns + +`str` — Unique key combining skill name and tool name + +#### Source + +[`signalwire/signalwire/skills/api_ninjas_trivia/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/api_ninjas_trivia/skill.py) + +Line 139. + +*** + +### get\_parameter\_schema + +Get the parameter schema for the API Ninjas Trivia skill. + +Returns parameter definitions for GUI configuration. + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +get_parameter_schema() -> Dict[str, Dict[str, Any]] +``` + +#### Returns + +`Dict[str, Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/api_ninjas_trivia/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/api_ninjas_trivia/skill.py) + +Line 203. + +*** + +### get\_tools + +Generate the SWAIG tool with DataMap webhook. + +#### Signature + +```python +get_tools() -> List[Dict[str, Any]] +``` + +#### Returns + +`List[Dict[str, Any]]` — List containing the generated tool configuration + +#### Source + +[`signalwire/signalwire/skills/api_ninjas_trivia/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/api_ninjas_trivia/skill.py) + +Line 148. + +*** + +### register\_tools + +Register SWAIG tools with the agent + +#### Signature + +```python +register_tools() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/skills/api_ninjas_trivia/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/api_ninjas_trivia/skill.py) + +Line 130. + +*** + +### setup + +Setup the skill - validates API key is available. + +#### Signature + +```python +setup() -> bool +``` + +#### Returns + +`bool` — True if setup successful + +#### Source + +[`signalwire/signalwire/skills/api_ninjas_trivia/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/api_ninjas_trivia/skill.py) + +Line 120. + +## Source + +[`signalwire/signalwire/skills/api_ninjas_trivia/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/api_ninjas_trivia/skill.py) + +Line 22. diff --git a/fern/products/sdk-reference/python/signalwire/skills/api-ninjas-trivia/skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/api-ninjas-trivia/skill/index.mdx new file mode 100644 index 0000000000..790afd86cc --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/skills/api-ninjas-trivia/skill/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/signalwire/skills/api-ninjas-trivia/skill" +title: "skill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.api_ninjas_trivia.skill" + parent: "signalwire.skills.api_ninjas_trivia" + module: "signalwire.skills.api_ninjas_trivia" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/api_ninjas_trivia/skill.py" +--- +# `skill` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module skill +``` + +## Classes + + + + Skill for getting trivia questions from API Ninjas with configurable categories. + + + +## Source + +[`signalwire/signalwire/skills/api_ninjas_trivia/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/api_ninjas_trivia/skill.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/claude-skills/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/claude-skills/index.mdx new file mode 100644 index 0000000000..08b1e9b7f8 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/skills/claude-skills/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/signalwire/skills/claude-skills" +title: "claude_skills" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.claude_skills" + parent: "signalwire.skills" + module: "signalwire.skills" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/claude_skills/__init__.py" +--- +# `claude_skills` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module claude_skills +``` + +## Modules + + + + Copyright (c) 2025 SignalWire + + + +## Source + +[`signalwire/signalwire/skills/claude_skills/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/claude_skills/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/claude-skills/skill/claude-skills-skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/claude-skills/skill/claude-skills-skill/index.mdx new file mode 100644 index 0000000000..867c168ee4 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/skills/claude-skills/skill/claude-skills-skill/index.mdx @@ -0,0 +1,182 @@ +--- +slug: "/reference/python/signalwire/skills/claude-skills/skill/claude-skills-skill" +title: "ClaudeSkillsSkill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.skills.claude_skills.skill.ClaudeSkillsSkill" + parent: "signalwire.skills.claude_skills.skill" + module: "signalwire.skills.claude_skills.skill" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/claude_skills/skill.py" +--- +# `ClaudeSkillsSkill` + +Load Claude-style SKILL.md files as SignalWire agent tools. + +This skill parses Claude Code skill directories and makes them available +as SWAIG tools that the AI can call. Each Claude skill becomes a tool +that returns the skill's instructions when invoked. + +> ## \[!NOTE] +> +> name: skill-name +> description: When to use this skill +> ----------------------------------- +> +> Markdown instructions here... +> Use $ARGUMENTS for passed args. + +## Signature + +```python +class ClaudeSkillsSkill(SkillBase) +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/python/signalwire/core/skill-base/skill-base) + +## Examples + +```python +Markdown instructions here... +Use $ARGUMENTS for passed args. +``` + +## Properties + + + + + + + + + + + + + +## Methods + +### get\_hints + +Return speech recognition hints based on loaded skills. + +#### Signature + +```python +get_hints() -> List[str] +``` + +#### Returns + +`List[str]` + +#### Source + +[`signalwire/signalwire/skills/claude_skills/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/claude_skills/skill.py) + +Line 610. + +*** + +### get\_instance\_key + +Return unique key for this skill instance. + +#### Signature + +```python +get_instance_key() -> str +``` + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/skills/claude_skills/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/claude_skills/skill.py) + +Line 667. + +*** + +### get\_parameter\_schema + +Get the parameter schema for the Claude skills loader. + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +get_parameter_schema() -> Dict[str, Dict[str, Any]] +``` + +#### Returns + +`Dict[str, Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/claude_skills/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/claude_skills/skill.py) + +Line 673. + +*** + +### register\_tools + +Register a SWAIG tool for each discovered Claude skill. + +#### Signature + +```python +register_tools() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/skills/claude_skills/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/claude_skills/skill.py) + +Line 518. + +*** + +### setup + +Setup the Claude skills loader. + +Discovers and parses all SKILL.md files in the configured directory. + +#### Signature + +```python +setup() -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/skills/claude_skills/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/claude_skills/skill.py) + +Line 63. + +## Source + +[`signalwire/signalwire/skills/claude_skills/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/claude_skills/skill.py) + +Line 38. diff --git a/fern/products/sdk-reference/python/signalwire/skills/claude-skills/skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/claude-skills/skill/index.mdx new file mode 100644 index 0000000000..e522cd9629 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/skills/claude-skills/skill/index.mdx @@ -0,0 +1,44 @@ +--- +slug: "/reference/python/signalwire/skills/claude-skills/skill" +title: "skill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.claude_skills.skill" + parent: "signalwire.skills.claude_skills" + module: "signalwire.skills.claude_skills" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/claude_skills/skill.py" +--- +# `skill` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module skill +``` + +## Properties + + + +## Classes + + + + Load Claude-style SKILL.md files as SignalWire agent tools. + + + +## Source + +[`signalwire/signalwire/skills/claude_skills/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/claude_skills/skill.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/datasphere-serverless/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/datasphere-serverless/index.mdx new file mode 100644 index 0000000000..48688c2e42 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/skills/datasphere-serverless/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/signalwire/skills/datasphere-serverless" +title: "datasphere_serverless" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.datasphere_serverless" + parent: "signalwire.skills" + module: "signalwire.skills" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere_serverless/__init__.py" +--- +# `datasphere_serverless` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module datasphere_serverless +``` + +## Modules + + + + Copyright (c) 2025 SignalWire + + + +## Source + +[`signalwire/signalwire/skills/datasphere_serverless/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere_serverless/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/datasphere-serverless/skill/data-sphere-serverless-skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/datasphere-serverless/skill/data-sphere-serverless-skill/index.mdx new file mode 100644 index 0000000000..a65872bcdc --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/skills/datasphere-serverless/skill/data-sphere-serverless-skill/index.mdx @@ -0,0 +1,206 @@ +--- +slug: "/reference/python/signalwire/skills/datasphere-serverless/skill/data-sphere-serverless-skill" +title: "DataSphereServerlessSkill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.skills.datasphere_serverless.skill.DataSphereServerlessSkill" + parent: "signalwire.skills.datasphere_serverless.skill" + module: "signalwire.skills.datasphere_serverless.skill" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere_serverless/skill.py" +--- +# `DataSphereServerlessSkill` + +SignalWire DataSphere knowledge search using DataMap (serverless execution) + +## Signature + +```python +class DataSphereServerlessSkill(SkillBase) +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/python/signalwire/core/skill-base/skill-base) + +## Properties + + + + + + + + + + + + + +## Methods + +### get\_global\_data + +Return global data for agent context + +#### Signature + +```python +get_global_data() -> Dict[str, Any] +``` + +#### Returns + +`Dict[str, Any]` + +#### Source + +[`signalwire/signalwire/skills/datasphere_serverless/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere_serverless/skill.py) + +Line 216. + +*** + +### get\_hints + +Return speech recognition hints + +#### Signature + +```python +get_hints() -> List[str] +``` + +#### Returns + +`List[str]` + +#### Source + +[`signalwire/signalwire/skills/datasphere_serverless/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere_serverless/skill.py) + +Line 212. + +*** + +### get\_instance\_key + +Get the key used to track this skill instance + +For DataSphere Serverless, we use 'search\_knowledge' as the default tool name + +#### Signature + +```python +get_instance_key() -> str +``` + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/skills/datasphere_serverless/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere_serverless/skill.py) + +Line 111. + +*** + +### get\_parameter\_schema + +Get parameter schema for DataSphere Serverless skill + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +get_parameter_schema() -> Dict[str, Dict[str, Any]] +``` + +#### Returns + +`Dict[str, Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/datasphere_serverless/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere_serverless/skill.py) + +Line 29. + +*** + +### get\_prompt\_sections + +Return prompt sections to add to agent + +#### Signature + +```python +get_prompt_sections() -> List[Dict[str, Any]] +``` + +#### Returns + +`List[Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/datasphere_serverless/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere_serverless/skill.py) + +Line 224. + +*** + +### register\_tools + +Register knowledge search tool using DataMap + +#### Signature + +```python +register_tools() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/skills/datasphere_serverless/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere_serverless/skill.py) + +Line 161. + +*** + +### setup + +Setup the datasphere serverless skill + +#### Signature + +```python +setup() -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/skills/datasphere_serverless/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere_serverless/skill.py) + +Line 120. + +## Source + +[`signalwire/signalwire/skills/datasphere_serverless/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere_serverless/skill.py) + +Line 17. diff --git a/fern/products/sdk-reference/python/signalwire/skills/datasphere-serverless/skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/datasphere-serverless/skill/index.mdx new file mode 100644 index 0000000000..65f5e4ab1d --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/skills/datasphere-serverless/skill/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/signalwire/skills/datasphere-serverless/skill" +title: "skill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.datasphere_serverless.skill" + parent: "signalwire.skills.datasphere_serverless" + module: "signalwire.skills.datasphere_serverless" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere_serverless/skill.py" +--- +# `skill` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module skill +``` + +## Classes + + + + SignalWire DataSphere knowledge search using DataMap (serverless execution) + + + +## Source + +[`signalwire/signalwire/skills/datasphere_serverless/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere_serverless/skill.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/datasphere/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/datasphere/index.mdx new file mode 100644 index 0000000000..82b9f9b327 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/skills/datasphere/index.mdx @@ -0,0 +1,44 @@ +--- +slug: "/reference/python/signalwire/skills/datasphere" +title: "datasphere" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.datasphere" + parent: "signalwire.skills" + module: "signalwire.skills" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere/__init__.py" +--- +# `datasphere` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module datasphere +``` + +## Properties + + + +## Modules + + + + Copyright (c) 2025 SignalWire + + + +## Source + +[`signalwire/signalwire/skills/datasphere/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/datasphere/skill/data-sphere-skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/datasphere/skill/data-sphere-skill/index.mdx new file mode 100644 index 0000000000..b6c9ecb735 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/skills/datasphere/skill/data-sphere-skill/index.mdx @@ -0,0 +1,228 @@ +--- +slug: "/reference/python/signalwire/skills/datasphere/skill/data-sphere-skill" +title: "DataSphereSkill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.skills.datasphere.skill.DataSphereSkill" + parent: "signalwire.skills.datasphere.skill" + module: "signalwire.skills.datasphere.skill" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere/skill.py" +--- +# `DataSphereSkill` + +SignalWire DataSphere knowledge search capability + +## Signature + +```python +class DataSphereSkill(SkillBase) +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/python/signalwire/core/skill-base/skill-base) + +## Properties + + + + + + + + + + + + + +## Methods + +### cleanup + +Clean up resources when skill is unloaded. + +#### Signature + +```python +cleanup() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/skills/datasphere/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere/skill.py) + +Line 280. + +*** + +### get\_global\_data + +Return global data for agent context + +#### Signature + +```python +get_global_data() -> Dict[str, Any] +``` + +#### Returns + +`Dict[str, Any]` + +#### Source + +[`signalwire/signalwire/skills/datasphere/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere/skill.py) + +Line 294. + +*** + +### get\_hints + +Return speech recognition hints + +#### Signature + +```python +get_hints() -> List[str] +``` + +#### Returns + +`List[str]` + +#### Source + +[`signalwire/signalwire/skills/datasphere/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere/skill.py) + +Line 285. + +*** + +### get\_instance\_key + +Get the key used to track this skill instance + +For DataSphere, we use 'search\_knowledge' as the default tool name instead of 'datasphere' + +#### Signature + +```python +get_instance_key() -> str +``` + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/skills/datasphere/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere/skill.py) + +Line 111. + +*** + +### get\_parameter\_schema + +Get parameter schema for DataSphere skill + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +get_parameter_schema() -> Dict[str, Dict[str, Any]] +``` + +#### Returns + +`Dict[str, Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/datasphere/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere/skill.py) + +Line 29. + +*** + +### get\_prompt\_sections + +Return prompt sections to add to agent + +#### Signature + +```python +get_prompt_sections() -> List[Dict[str, Any]] +``` + +#### Returns + +`List[Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/datasphere/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere/skill.py) + +Line 302. + +*** + +### register\_tools + +Register knowledge search tool with the agent + +#### Signature + +```python +register_tools() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/skills/datasphere/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere/skill.py) + +Line 160. + +*** + +### setup + +Setup the datasphere skill + +#### Signature + +```python +setup() -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/skills/datasphere/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere/skill.py) + +Line 120. + +## Source + +[`signalwire/signalwire/skills/datasphere/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere/skill.py) + +Line 17. diff --git a/fern/products/sdk-reference/python/signalwire/skills/datasphere/skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/datasphere/skill/index.mdx new file mode 100644 index 0000000000..0404cd7956 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/skills/datasphere/skill/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/signalwire/skills/datasphere/skill" +title: "skill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.datasphere.skill" + parent: "signalwire.skills.datasphere" + module: "signalwire.skills.datasphere" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere/skill.py" +--- +# `skill` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module skill +``` + +## Classes + + + + SignalWire DataSphere knowledge search capability + + + +## Source + +[`signalwire/signalwire/skills/datasphere/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere/skill.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/datetime/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/datetime/index.mdx new file mode 100644 index 0000000000..00785820b7 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/skills/datetime/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/signalwire/skills/datetime" +title: "datetime" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.datetime" + parent: "signalwire.skills" + module: "signalwire.skills" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datetime/__init__.py" +--- +# `datetime` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module datetime +``` + +## Modules + + + + Copyright (c) 2025 SignalWire + + + +## Source + +[`signalwire/signalwire/skills/datetime/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datetime/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/datetime/skill/date-time-skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/datetime/skill/date-time-skill/index.mdx new file mode 100644 index 0000000000..912685fd2b --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/skills/datetime/skill/date-time-skill/index.mdx @@ -0,0 +1,161 @@ +--- +slug: "/reference/python/signalwire/skills/datetime/skill/date-time-skill" +title: "DateTimeSkill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.skills.datetime.skill.DateTimeSkill" + parent: "signalwire.skills.datetime.skill" + module: "signalwire.skills.datetime.skill" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datetime/skill.py" +--- +# `DateTimeSkill` + +Provides current date, time, and timezone information + +## Signature + +```python +class DateTimeSkill(SkillBase) +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/python/signalwire/core/skill-base/skill-base) + +## Properties + + + + + + + + + + + +## Methods + +### get\_hints + +Return speech recognition hints + +#### Signature + +```python +get_hints() -> List[str] +``` + +#### Returns + +`List[str]` + +#### Source + +[`signalwire/signalwire/skills/datetime/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datetime/skill.py) + +Line 93. + +*** + +### get\_parameter\_schema + +Get the parameter schema for the datetime skill + +The datetime skill has no custom parameters - it inherits only +the base parameters from SkillBase. + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +get_parameter_schema() -> Dict[str, Dict[str, Any]] +``` + +#### Returns + +`Dict[str, Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/datetime/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datetime/skill.py) + +Line 113. + +*** + +### get\_prompt\_sections + +Return prompt sections to add to agent + +#### Signature + +```python +get_prompt_sections() -> List[Dict[str, Any]] +``` + +#### Returns + +`List[Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/datetime/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datetime/skill.py) + +Line 99. + +*** + +### register\_tools + +Register datetime tools with the agent + +#### Signature + +```python +register_tools() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/skills/datetime/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datetime/skill.py) + +Line 30. + +*** + +### setup + +Setup the datetime skill + +#### Signature + +```python +setup() -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/skills/datetime/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datetime/skill.py) + +Line 26. + +## Source + +[`signalwire/signalwire/skills/datetime/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datetime/skill.py) + +Line 17. diff --git a/fern/products/sdk-reference/python/signalwire/skills/datetime/skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/datetime/skill/index.mdx new file mode 100644 index 0000000000..6f20aab45e --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/skills/datetime/skill/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/signalwire/skills/datetime/skill" +title: "skill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.datetime.skill" + parent: "signalwire.skills.datetime" + module: "signalwire.skills.datetime" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datetime/skill.py" +--- +# `skill` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module skill +``` + +## Classes + + + + Provides current date, time, and timezone information + + + +## Source + +[`signalwire/signalwire/skills/datetime/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datetime/skill.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/google-maps/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/google-maps/index.mdx new file mode 100644 index 0000000000..a48b3324cf --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/skills/google-maps/index.mdx @@ -0,0 +1,35 @@ +--- +slug: "/reference/python/signalwire/skills/google-maps" +title: "google_maps" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.google_maps" + parent: "signalwire.skills" + module: "signalwire.skills" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/google_maps/__init__.py" +--- +# `google_maps` + +Google Maps skill for SignalWire Agents + +## Signature + +```python +module google_maps +``` + +## Modules + + + + Copyright (c) 2025 SignalWire + + + +## Source + +[`signalwire/signalwire/skills/google_maps/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/google_maps/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/google-maps/skill/google-maps-client/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/google-maps/skill/google-maps-client/index.mdx new file mode 100644 index 0000000000..d9ded96ab8 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/skills/google-maps/skill/google-maps-client/index.mdx @@ -0,0 +1,118 @@ +--- +slug: "/reference/python/signalwire/skills/google-maps/skill/google-maps-client" +title: "GoogleMapsClient" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.skills.google_maps.skill.GoogleMapsClient" + parent: "signalwire.skills.google_maps.skill" + module: "signalwire.skills.google_maps.skill" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/google_maps/skill.py" +--- +# `GoogleMapsClient` + +## Signature + +```python +class GoogleMapsClient +``` + +## Properties + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(api_key) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/skills/google_maps/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/google_maps/skill.py) + +Line 117. + +*** + +### compute\_route + +Compute route using Google Routes API. + +Returns: \{"distance\_meters": int, "duration\_seconds": int\} or None + +#### Signature + +```python +compute_route(origin_lat, origin_lng, dest_lat, dest_lng) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`signalwire/signalwire/skills/google_maps/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/google_maps/skill.py) + +Line 316. + +*** + +### validate\_address + +Validate and geocode an address or business name. + +When bias\_lat/bias\_lng are provided (destination search with known pickup): + +1. First tries Nearby Search with rankby=distance to find the CLOSEST + matching business (e.g. "Walmart" → nearest Walmart to pickup). +2. Falls back to Autocomplete with location bias (no strictbounds) for + street addresses or if Nearby Search finds nothing. + +Without bias coords (pickup search): uses plain Autocomplete. + +Returns: \{"address": str, "lat": float, "lng": float\} or None + +#### Signature + +```python +validate_address(input_text, bias_lat = None, bias_lng = None) +``` + +#### Parameters + + + + + + + +#### Source + +[`signalwire/signalwire/skills/google_maps/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/google_maps/skill.py) + +Line 120. + +## Source + +[`signalwire/signalwire/skills/google_maps/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/google_maps/skill.py) + +Line 116. diff --git a/fern/products/sdk-reference/python/signalwire/skills/google-maps/skill/google-maps-skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/google-maps/skill/google-maps-skill/index.mdx new file mode 100644 index 0000000000..c774c96632 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/skills/google-maps/skill/google-maps-skill/index.mdx @@ -0,0 +1,158 @@ +--- +slug: "/reference/python/signalwire/skills/google-maps/skill/google-maps-skill" +title: "GoogleMapsSkill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.skills.google_maps.skill.GoogleMapsSkill" + parent: "signalwire.skills.google_maps.skill" + module: "signalwire.skills.google_maps.skill" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/google_maps/skill.py" +--- +# `GoogleMapsSkill` + +Validate addresses and compute driving routes using Google Maps + +## Signature + +```python +class GoogleMapsSkill(SkillBase) +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/python/signalwire/core/skill-base/skill-base) + +## Properties + + + + + + + + + + + +## Methods + +### get\_hints + +Return speech recognition hints + +#### Signature + +```python +get_hints() -> List[str] +``` + +#### Returns + +`List[str]` + +#### Source + +[`signalwire/signalwire/skills/google_maps/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/google_maps/skill.py) + +Line 530. + +*** + +### get\_parameter\_schema + +Get parameter schema for google\_maps skill + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +get_parameter_schema() -> Dict[str, Dict[str, Any]] +``` + +#### Returns + +`Dict[str, Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/google_maps/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/google_maps/skill.py) + +Line 387. + +*** + +### get\_prompt\_sections + +Return prompt sections to add to agent + +#### Signature + +```python +get_prompt_sections() -> List[Dict[str, Any]] +``` + +#### Returns + +`List[Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/google_maps/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/google_maps/skill.py) + +Line 534. + +*** + +### register\_tools + +Register address lookup and route computation tools + +#### Signature + +```python +register_tools() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/skills/google_maps/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/google_maps/skill.py) + +Line 429. + +*** + +### setup + +Setup the Google Maps skill + +#### Signature + +```python +setup() -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/skills/google_maps/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/google_maps/skill.py) + +Line 414. + +## Source + +[`signalwire/signalwire/skills/google_maps/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/google_maps/skill.py) + +Line 378. diff --git a/fern/products/sdk-reference/python/signalwire/skills/google-maps/skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/google-maps/skill/index.mdx new file mode 100644 index 0000000000..26fa341bae --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/skills/google-maps/skill/index.mdx @@ -0,0 +1,46 @@ +--- +slug: "/reference/python/signalwire/skills/google-maps/skill" +title: "skill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.google_maps.skill" + parent: "signalwire.skills.google_maps" + module: "signalwire.skills.google_maps" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/google_maps/skill.py" +--- +# `skill` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module skill +``` + +## Properties + + + +## Classes + + + + + + Validate addresses and compute driving routes using Google Maps + + + +## Source + +[`signalwire/signalwire/skills/google_maps/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/google_maps/skill.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/index.mdx new file mode 100644 index 0000000000..74d5c76c56 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/skills/index.mdx @@ -0,0 +1,112 @@ +--- +slug: "/reference/python/signalwire/skills" +title: "skills" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills" + parent: "signalwire" + module: "signalwire" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/__init__.py" +--- +# `skills` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module skills +``` + +## Properties + + + +## Modules + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Google Maps skill for SignalWire Agents + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + +## Source + +[`signalwire/signalwire/skills/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/info-gatherer/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/info-gatherer/index.mdx new file mode 100644 index 0000000000..f63588edf7 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/skills/info-gatherer/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/signalwire/skills/info-gatherer" +title: "info_gatherer" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.info_gatherer" + parent: "signalwire.skills" + module: "signalwire.skills" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/info_gatherer/__init__.py" +--- +# `info_gatherer` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module info_gatherer +``` + +## Modules + + + + Copyright (c) 2025 SignalWire + + + +## Source + +[`signalwire/signalwire/skills/info_gatherer/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/info_gatherer/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/info-gatherer/skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/info-gatherer/skill/index.mdx new file mode 100644 index 0000000000..1587e1a3c9 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/skills/info-gatherer/skill/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/signalwire/skills/info-gatherer/skill" +title: "skill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.info_gatherer.skill" + parent: "signalwire.skills.info_gatherer" + module: "signalwire.skills.info_gatherer" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/info_gatherer/skill.py" +--- +# `skill` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module skill +``` + +## Classes + + + + Skill that guides an AI agent through a series of questions, collecting and storing answers in namespaced global\_data. + + + +## Source + +[`signalwire/signalwire/skills/info_gatherer/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/info_gatherer/skill.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/info-gatherer/skill/info-gatherer-skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/info-gatherer/skill/info-gatherer-skill/index.mdx new file mode 100644 index 0000000000..eab10c79ba --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/skills/info-gatherer/skill/info-gatherer-skill/index.mdx @@ -0,0 +1,155 @@ +--- +slug: "/reference/python/signalwire/skills/info-gatherer/skill/info-gatherer-skill" +title: "InfoGathererSkill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.skills.info_gatherer.skill.InfoGathererSkill" + parent: "signalwire.skills.info_gatherer.skill" + module: "signalwire.skills.info_gatherer.skill" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/info_gatherer/skill.py" +--- +# `InfoGathererSkill` + +Skill that guides an AI agent through a series of questions, collecting +and storing answers in namespaced global\_data. + +Supports multiple instances with different prefixes so several +question sets can coexist on a single agent (e.g. "intake" and +"medical" questionnaires running side by side). + +## Signature + +```python +class InfoGathererSkill(SkillBase) +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/python/signalwire/core/skill-base/skill-base) + +## Properties + + + + + + + + + + + + + +## Methods + +### get\_global\_data + +#### Signature + +```python +get_global_data() -> Dict[str, Any] +``` + +#### Returns + +`Dict[str, Any]` + +#### Source + +[`signalwire/signalwire/skills/info_gatherer/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/info_gatherer/skill.py) + +Line 127. + +*** + +### get\_instance\_key + +#### Signature + +```python +get_instance_key() -> str +``` + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/skills/info_gatherer/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/info_gatherer/skill.py) + +Line 81. + +*** + +### get\_parameter\_schema + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +get_parameter_schema() -> Dict[str, Dict[str, Any]] +``` + +#### Returns + +`Dict[str, Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/info_gatherer/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/info_gatherer/skill.py) + +Line 33. + +*** + +### register\_tools + +#### Signature + +```python +register_tools() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/skills/info_gatherer/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/info_gatherer/skill.py) + +Line 162. + +*** + +### setup + +#### Signature + +```python +setup() -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/skills/info_gatherer/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/info_gatherer/skill.py) + +Line 91. + +## Source + +[`signalwire/signalwire/skills/info_gatherer/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/info_gatherer/skill.py) + +Line 16. diff --git a/fern/products/sdk-reference/python/signalwire/skills/joke/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/joke/index.mdx new file mode 100644 index 0000000000..ad156f678f --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/skills/joke/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/signalwire/skills/joke" +title: "joke" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.joke" + parent: "signalwire.skills" + module: "signalwire.skills" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/joke/__init__.py" +--- +# `joke` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module joke +``` + +## Modules + + + + Copyright (c) 2025 SignalWire + + + +## Source + +[`signalwire/signalwire/skills/joke/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/joke/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/joke/skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/joke/skill/index.mdx new file mode 100644 index 0000000000..6821efb017 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/skills/joke/skill/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/signalwire/skills/joke/skill" +title: "skill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.joke.skill" + parent: "signalwire.skills.joke" + module: "signalwire.skills.joke" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/joke/skill.py" +--- +# `skill` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module skill +``` + +## Classes + + + + Joke telling capability using API Ninjas with DataMap + + + +## Source + +[`signalwire/signalwire/skills/joke/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/joke/skill.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/joke/skill/joke-skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/joke/skill/joke-skill/index.mdx new file mode 100644 index 0000000000..40ae1b8a94 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/skills/joke/skill/joke-skill/index.mdx @@ -0,0 +1,180 @@ +--- +slug: "/reference/python/signalwire/skills/joke/skill/joke-skill" +title: "JokeSkill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.skills.joke.skill.JokeSkill" + parent: "signalwire.skills.joke.skill" + module: "signalwire.skills.joke.skill" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/joke/skill.py" +--- +# `JokeSkill` + +Joke telling capability using API Ninjas with DataMap + +## Signature + +```python +class JokeSkill(SkillBase) +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/python/signalwire/core/skill-base/skill-base) + +## Properties + + + + + + + + + + + +## Methods + +### get\_global\_data + +Return global data to be available in DataMap variables + +#### Signature + +```python +get_global_data() -> Dict[str, Any] +``` + +#### Returns + +`Dict[str, Any]` + +#### Source + +[`signalwire/signalwire/skills/joke/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/joke/skill.py) + +Line 91. + +*** + +### get\_hints + +Return speech recognition hints + +#### Signature + +```python +get_hints() -> List[str] +``` + +#### Returns + +`List[str]` + +#### Source + +[`signalwire/signalwire/skills/joke/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/joke/skill.py) + +Line 82. + +*** + +### get\_parameter\_schema + +Get parameter schema for joke skill + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +get_parameter_schema() -> Dict[str, Dict[str, Any]] +``` + +#### Returns + +`Dict[str, Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/joke/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/joke/skill.py) + +Line 26. + +*** + +### get\_prompt\_sections + +Return prompt sections to add to agent + +#### Signature + +```python +get_prompt_sections() -> List[Dict[str, Any]] +``` + +#### Returns + +`List[Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/joke/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/joke/skill.py) + +Line 97. + +*** + +### register\_tools + +Register joke tool using DataMap + +#### Signature + +```python +register_tools() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/skills/joke/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/joke/skill.py) + +Line 64. + +*** + +### setup + +Setup the joke skill + +#### Signature + +```python +setup() -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/skills/joke/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/joke/skill.py) + +Line 47. + +## Source + +[`signalwire/signalwire/skills/joke/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/joke/skill.py) + +Line 17. diff --git a/fern/products/sdk-reference/python/signalwire/skills/math/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/math/index.mdx new file mode 100644 index 0000000000..418da0cc74 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/skills/math/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/signalwire/skills/math" +title: "math" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.math" + parent: "signalwire.skills" + module: "signalwire.skills" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/math/__init__.py" +--- +# `math` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module math +``` + +## Modules + + + + Copyright (c) 2025 SignalWire + + + +## Source + +[`signalwire/signalwire/skills/math/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/math/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/math/skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/math/skill/index.mdx new file mode 100644 index 0000000000..7f4c11e743 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/skills/math/skill/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/signalwire/skills/math/skill" +title: "skill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.math.skill" + parent: "signalwire.skills.math" + module: "signalwire.skills.math" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/math/skill.py" +--- +# `skill` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module skill +``` + +## Classes + + + + Provides basic mathematical calculation capabilities + + + +## Source + +[`signalwire/signalwire/skills/math/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/math/skill.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/math/skill/math-skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/math/skill/math-skill/index.mdx new file mode 100644 index 0000000000..5e7671bb8b --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/skills/math/skill/math-skill/index.mdx @@ -0,0 +1,161 @@ +--- +slug: "/reference/python/signalwire/skills/math/skill/math-skill" +title: "MathSkill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.skills.math.skill.MathSkill" + parent: "signalwire.skills.math.skill" + module: "signalwire.skills.math.skill" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/math/skill.py" +--- +# `MathSkill` + +Provides basic mathematical calculation capabilities + +## Signature + +```python +class MathSkill(SkillBase) +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/python/signalwire/core/skill-base/skill-base) + +## Properties + + + + + + + + + + + +## Methods + +### get\_hints + +Return speech recognition hints + +#### Signature + +```python +get_hints() -> List[str] +``` + +#### Returns + +`List[str]` + +#### Source + +[`signalwire/signalwire/skills/math/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/math/skill.py) + +Line 108. + +*** + +### get\_parameter\_schema + +Get the parameter schema for the math skill + +The math skill has no custom parameters - it inherits only +the base parameters from SkillBase. + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +get_parameter_schema() -> Dict[str, Dict[str, Any]] +``` + +#### Returns + +`Dict[str, Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/math/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/math/skill.py) + +Line 131. + +*** + +### get\_prompt\_sections + +Return prompt sections to add to agent + +#### Signature + +```python +get_prompt_sections() -> List[Dict[str, Any]] +``` + +#### Returns + +`List[Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/math/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/math/skill.py) + +Line 117. + +*** + +### register\_tools + +Register math tools with the agent + +#### Signature + +```python +register_tools() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/skills/math/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/math/skill.py) + +Line 30. + +*** + +### setup + +Setup the math skill + +#### Signature + +```python +setup() -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/skills/math/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/math/skill.py) + +Line 26. + +## Source + +[`signalwire/signalwire/skills/math/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/math/skill.py) + +Line 17. diff --git a/fern/products/sdk-reference/python/signalwire/skills/mcp-gateway/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/mcp-gateway/index.mdx new file mode 100644 index 0000000000..7bc7a45f33 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/skills/mcp-gateway/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/signalwire/skills/mcp-gateway" +title: "mcp_gateway" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.mcp_gateway" + parent: "signalwire.skills" + module: "signalwire.skills" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/mcp_gateway/__init__.py" +--- +# `mcp_gateway` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module mcp_gateway +``` + +## Modules + + + + Copyright (c) 2025 SignalWire + + + +## Source + +[`signalwire/signalwire/skills/mcp_gateway/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/mcp_gateway/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/mcp-gateway/skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/mcp-gateway/skill/index.mdx new file mode 100644 index 0000000000..3516dcf714 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/skills/mcp-gateway/skill/index.mdx @@ -0,0 +1,44 @@ +--- +slug: "/reference/python/signalwire/skills/mcp-gateway/skill" +title: "skill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.mcp_gateway.skill" + parent: "signalwire.skills.mcp_gateway" + module: "signalwire.skills.mcp_gateway" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/mcp_gateway/skill.py" +--- +# `skill` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module skill +``` + +## Properties + + + +## Classes + + + + MCP Gateway Skill - Bridge MCP servers with SWAIG functions + + + +## Source + +[`signalwire/signalwire/skills/mcp_gateway/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/mcp_gateway/skill.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/mcp-gateway/skill/mcp-gateway-skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/mcp-gateway/skill/mcp-gateway-skill/index.mdx new file mode 100644 index 0000000000..2c3f2a4777 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/skills/mcp-gateway/skill/mcp-gateway-skill/index.mdx @@ -0,0 +1,183 @@ +--- +slug: "/reference/python/signalwire/skills/mcp-gateway/skill/mcp-gateway-skill" +title: "MCPGatewaySkill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.skills.mcp_gateway.skill.MCPGatewaySkill" + parent: "signalwire.skills.mcp_gateway.skill" + module: "signalwire.skills.mcp_gateway.skill" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/mcp_gateway/skill.py" +--- +# `MCPGatewaySkill` + +MCP Gateway Skill - Bridge MCP servers with SWAIG functions + +This skill connects SignalWire agents to MCP (Model Context Protocol) servers +through a gateway service, dynamically creating SWAIG functions for MCP tools. + +## Signature + +```python +class MCPGatewaySkill(SkillBase) +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/python/signalwire/core/skill-base/skill-base) + +## Properties + + + + + + + + + + + +## Methods + +### get\_global\_data + +Return global data for DataMap variables + +#### Signature + +```python +get_global_data() -> Dict[str, Any] +``` + +#### Returns + +`Dict[str, Any]` + +#### Source + +[`signalwire/signalwire/skills/mcp_gateway/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/mcp_gateway/skill.py) + +Line 392. + +*** + +### get\_hints + +Return speech recognition hints + +#### Signature + +```python +get_hints() -> List[str] +``` + +#### Returns + +`List[str]` + +#### Source + +[`signalwire/signalwire/skills/mcp_gateway/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/mcp_gateway/skill.py) + +Line 381. + +*** + +### get\_parameter\_schema + +Get parameter schema for MCP Gateway skill + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +get_parameter_schema() -> Dict[str, Dict[str, Any]] +``` + +#### Returns + +`Dict[str, Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/mcp_gateway/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/mcp_gateway/skill.py) + +Line 36. + +*** + +### get\_prompt\_sections + +Return prompt sections to add to agent + +#### Signature + +```python +get_prompt_sections() -> List[Dict[str, Any]] +``` + +#### Returns + +`List[Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/mcp_gateway/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/mcp_gateway/skill.py) + +Line 401. + +*** + +### register\_tools + +Register SWAIG tools from MCP services + +#### Signature + +```python +register_tools() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/skills/mcp_gateway/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/mcp_gateway/skill.py) + +Line 185. + +*** + +### setup + +Setup and validate skill configuration + +#### Signature + +```python +setup() -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/skills/mcp_gateway/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/mcp_gateway/skill.py) + +Line 118. + +## Source + +[`signalwire/signalwire/skills/mcp_gateway/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/mcp_gateway/skill.py) + +Line 22. diff --git a/fern/products/sdk-reference/python/signalwire/skills/native-vector-search/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/native-vector-search/index.mdx new file mode 100644 index 0000000000..a694711b22 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/skills/native-vector-search/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/signalwire/skills/native-vector-search" +title: "native_vector_search" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.native_vector_search" + parent: "signalwire.skills" + module: "signalwire.skills" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/native_vector_search/__init__.py" +--- +# `native_vector_search` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module native_vector_search +``` + +## Modules + + + + Copyright (c) 2025 SignalWire + + + +## Source + +[`signalwire/signalwire/skills/native_vector_search/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/native_vector_search/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/native-vector-search/skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/native-vector-search/skill/index.mdx new file mode 100644 index 0000000000..0111d68ba7 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/skills/native-vector-search/skill/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/signalwire/skills/native-vector-search/skill" +title: "skill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.native_vector_search.skill" + parent: "signalwire.skills.native_vector_search" + module: "signalwire.skills.native_vector_search" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/native_vector_search/skill.py" +--- +# `skill` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module skill +``` + +## Classes + + + + Native vector search capability using local document indexes or remote search servers + + + +## Source + +[`signalwire/signalwire/skills/native_vector_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/native_vector_search/skill.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/native-vector-search/skill/native-vector-search-skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/native-vector-search/skill/native-vector-search-skill/index.mdx new file mode 100644 index 0000000000..e59357ff9a --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/skills/native-vector-search/skill/native-vector-search-skill/index.mdx @@ -0,0 +1,234 @@ +--- +slug: "/reference/python/signalwire/skills/native-vector-search/skill/native-vector-search-skill" +title: "NativeVectorSearchSkill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.skills.native_vector_search.skill.NativeVectorSearchSkill" + parent: "signalwire.skills.native_vector_search.skill" + module: "signalwire.skills.native_vector_search.skill" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/native_vector_search/skill.py" +--- +# `NativeVectorSearchSkill` + +Native vector search capability using local document indexes or remote search servers + +## Signature + +```python +class NativeVectorSearchSkill(SkillBase) +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/python/signalwire/core/skill-base/skill-base) + +## Properties + + + + + + + + + + + + + +## Methods + +### cleanup + +Cleanup when skill is removed or agent shuts down + +#### Signature + +```python +cleanup() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/skills/native_vector_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/native_vector_search/skill.py) + +Line 818. + +*** + +### get\_global\_data + +Return data to add to agent's global context + +#### Signature + +```python +get_global_data() -> Dict[str, Any] +``` + +#### Returns + +`Dict[str, Any]` + +#### Source + +[`signalwire/signalwire/skills/native_vector_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/native_vector_search/skill.py) + +Line 783. + +*** + +### get\_hints + +Return speech recognition hints for this skill + +#### Signature + +```python +get_hints() -> List[str] +``` + +#### Returns + +`List[str]` + +#### Source + +[`signalwire/signalwire/skills/native_vector_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/native_vector_search/skill.py) + +Line 767. + +*** + +### get\_instance\_key + +Get the key used to track this skill instance + +For native vector search, we use the tool name to differentiate instances + +#### Signature + +```python +get_instance_key() -> str +``` + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/skills/native_vector_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/native_vector_search/skill.py) + +Line 231. + +*** + +### get\_parameter\_schema + +Get parameter schema for Native Vector Search skill + +This skill supports three modes of operation: + +1. Network Mode: Set 'remote\_url' to connect to a remote search server +2. Local pgvector: Set backend='pgvector' with connection\_string and collection\_name +3. Local SQLite: Set 'index\_file' to use a local .swsearch file (default) + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +get_parameter_schema() -> Dict[str, Dict[str, Any]] +``` + +#### Returns + +`Dict[str, Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/native_vector_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/native_vector_search/skill.py) + +Line 31. + +*** + +### get\_prompt\_sections + +Return prompt sections to add to agent + +#### Signature + +```python +get_prompt_sections() -> List[Dict[str, Any]] +``` + +#### Returns + +`List[Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/native_vector_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/native_vector_search/skill.py) + +Line 796. + +*** + +### register\_tools + +Register native vector search tool with the agent + +#### Signature + +```python +register_tools() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/skills/native_vector_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/native_vector_search/skill.py) + +Line 468. + +*** + +### setup + +Setup the native vector search skill + +#### Signature + +```python +setup() -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/skills/native_vector_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/native_vector_search/skill.py) + +Line 241. + +## Source + +[`signalwire/signalwire/skills/native_vector_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/native_vector_search/skill.py) + +Line 19. diff --git a/fern/products/sdk-reference/python/signalwire/skills/play-background-file/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/play-background-file/index.mdx new file mode 100644 index 0000000000..8a7517a6e6 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/skills/play-background-file/index.mdx @@ -0,0 +1,44 @@ +--- +slug: "/reference/python/signalwire/skills/play-background-file" +title: "play_background_file" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.play_background_file" + parent: "signalwire.skills" + module: "signalwire.skills" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/play_background_file/__init__.py" +--- +# `play_background_file` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module play_background_file +``` + +## Properties + + + +## Modules + + + + Copyright (c) 2025 SignalWire + + + +## Source + +[`signalwire/signalwire/skills/play_background_file/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/play_background_file/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/play-background-file/skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/play-background-file/skill/index.mdx new file mode 100644 index 0000000000..9e99c004e6 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/skills/play-background-file/skill/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/signalwire/skills/play-background-file/skill" +title: "skill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.play_background_file.skill" + parent: "signalwire.skills.play_background_file" + module: "signalwire.skills.play_background_file" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/play_background_file/skill.py" +--- +# `skill` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module skill +``` + +## Classes + + + + Skill for playing background files (audio/video) with configurable tool names. + + + +## Source + +[`signalwire/signalwire/skills/play_background_file/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/play_background_file/skill.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/play-background-file/skill/play-background-file-skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/play-background-file/skill/play-background-file-skill/index.mdx new file mode 100644 index 0000000000..ea107fdb2f --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/skills/play-background-file/skill/play-background-file-skill/index.mdx @@ -0,0 +1,207 @@ +--- +slug: "/reference/python/signalwire/skills/play-background-file/skill/play-background-file-skill" +title: "PlayBackgroundFileSkill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.skills.play_background_file.skill.PlayBackgroundFileSkill" + parent: "signalwire.skills.play_background_file.skill" + module: "signalwire.skills.play_background_file.skill" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/play_background_file/skill.py" +--- +# `PlayBackgroundFileSkill` + +Skill for playing background files (audio/video) with configurable tool names. + +Supports multiple instances with different tool names and file collections. +Uses DataMap for serverless execution with dynamic enum generation. + +Configuration: + +- tool\_name: Custom name for the generated SWAIG function +- files: Array of file objects with key, description, url, and optional wait + +> \[!NOTE] +> agent.add\_skill("play\_background\_file", \{ +> "tool\_name": "play\_testimonial", +> "files": \[ +> \{ +> "key": "massey", +> "description": "Customer success story from Massey Energy", +> "url": "https://example.com/massey.mp4", +> "wait": True +> \} +> ] +> \}) + +## Signature + +```python +class PlayBackgroundFileSkill(SkillBase) +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/python/signalwire/core/skill-base/skill-base) + +## Properties + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +Initialize the skill with configuration parameters. + +#### Signature + +```python +__init__(agent, params: Dict[str, Any] = None) +``` + +#### Parameters + + + The agent instance this skill belongs to + + + + Configuration dictionary containing: + + +#### Source + +[`signalwire/signalwire/skills/play_background_file/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/play_background_file/skill.py) + +Line 87. + +*** + +### get\_instance\_key + +Generate a unique instance key for this skill configuration. + +#### Signature + +```python +get_instance_key() -> str +``` + +#### Returns + +`str` — Unique key combining skill name and tool name + +#### Source + +[`signalwire/signalwire/skills/play_background_file/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/play_background_file/skill.py) + +Line 131. + +*** + +### get\_parameter\_schema + +Get parameter schema for Play Background File skill + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +get_parameter_schema() -> Dict[str, Dict[str, Any]] +``` + +#### Returns + +`Dict[str, Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/play_background_file/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/play_background_file/skill.py) + +Line 51. + +*** + +### get\_tools + +Generate the SWAIG tool with DataMap expressions. + +#### Signature + +```python +get_tools() -> List[Dict[str, Any]] +``` + +#### Returns + +`List[Dict[str, Any]]` — List containing the generated tool configuration + +#### Source + +[`signalwire/signalwire/skills/play_background_file/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/play_background_file/skill.py) + +Line 158. + +*** + +### register\_tools + +Register SWAIG tools with the agent + +#### Signature + +```python +register_tools() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/skills/play_background_file/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/play_background_file/skill.py) + +Line 149. + +*** + +### setup + +Setup the skill - no external dependencies needed. + +#### Signature + +```python +setup() -> bool +``` + +#### Returns + +`bool` — True if setup successful + +#### Source + +[`signalwire/signalwire/skills/play_background_file/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/play_background_file/skill.py) + +Line 140. + +## Source + +[`signalwire/signalwire/skills/play_background_file/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/play_background_file/skill.py) + +Line 22. diff --git a/fern/products/sdk-reference/python/signalwire/skills/registry/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/registry/index.mdx new file mode 100644 index 0000000000..9a51d738f4 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/skills/registry/index.mdx @@ -0,0 +1,44 @@ +--- +slug: "/reference/python/signalwire/skills/registry" +title: "registry" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.registry" + parent: "signalwire.skills" + module: "signalwire.skills" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/registry.py" +--- +# `registry` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module registry +``` + +## Properties + + + +## Classes + + + + Global registry for on-demand skill loading + + + +## Source + +[`signalwire/signalwire/skills/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/registry.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/registry/skill-registry/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/registry/skill-registry/index.mdx new file mode 100644 index 0000000000..fa232db0bb --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/skills/registry/skill-registry/index.mdx @@ -0,0 +1,276 @@ +--- +slug: "/reference/python/signalwire/skills/registry/skill-registry" +title: "SkillRegistry" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.skills.registry.SkillRegistry" + parent: "signalwire.skills.registry" + module: "signalwire.skills.registry" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/registry.py" +--- +# `SkillRegistry` + +Global registry for on-demand skill loading + +## Signature + +```python +class SkillRegistry +``` + +## Properties + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__() +``` + +#### Source + +[`signalwire/signalwire/skills/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/registry.py) + +Line 25. + +*** + +### add\_skill\_directory + +Add a directory to search for skills + +This allows third-party skill collections to be registered by path. +Skills in these directories should follow the same structure as built-in skills: + +- Each skill in its own subdirectory +- skill.py file containing the skill class + +> \[!NOTE] +> skill\_registry.add\_skill\_directory('/opt/custom\_skills') +> +> ### Now agent.add\_skill('my\_custom\_skill') will search in this directory + +#### Signature + +```python +add_skill_directory(path: str) -> None +``` + +#### Parameters + + + Path to directory containing skill subdirectories + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/skills/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/registry.py) + +Line 353. + +*** + +### discover\_skills + +Discover and return all available skills. + +Skills load on-demand, so there is nothing to eagerly register; this +scans the skills package and returns metadata for everything +discoverable, so callers can enumerate what is available. + +#### Signature + +```python +discover_skills() -> List[Dict[str, str]] +``` + +#### Returns + +`List[Dict[str, str]]` + +#### Source + +[`signalwire/signalwire/skills/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/registry.py) + +Line 122. + +*** + +### get\_all\_skills\_schema + +Get complete schema for all available skills including parameter metadata + +This method scans all available skills and returns a comprehensive schema +that includes skill metadata and parameter definitions suitable for GUI +configuration or API documentation. + +> \[!NOTE] +> \{ +> "web\_search": \{ +> "name": "web\_search", +> "description": "Search the web for information", +> "version": "1.0.0", +> "supports\_multiple\_instances": True, +> "required\_packages": \["bs4", "requests"], +> "required\_env\_vars": \[], +> "parameters": \{ +> "api\_key": \{ +> "type": "string", +> "description": "Google API key", +> "required": True, +> "hidden": True, +> "env\_var": "GOOGLE\_SEARCH\_API\_KEY" +> \}, +> ... +> \}, +> "source": "built-in" +> \} +> \} + +#### Signature + +```python +get_all_skills_schema() -> Dict[str, Dict[str, Any]] +``` + +#### Returns + +`Dict[str, Dict[str, Any]]` — Dict\[str, Dict\[str, Any]]: Complete skill schema where keys are skill names and values contain: + +#### Source + +[`signalwire/signalwire/skills/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/registry.py) + +Line 232. + +*** + +### get\_skill\_class + +Get skill class by name, loading on-demand if needed + +#### Signature + +```python +get_skill_class(skill_name: str) -> Optional[Type[SkillBase]] +``` + +#### Parameters + + + +#### Returns + +`Optional[Type[SkillBase]]` + +#### Source + +[`signalwire/signalwire/skills/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/registry.py) + +Line 199. + +*** + +### list\_all\_skill\_sources + +List all skill sources and the skills available from each + +Returns a dictionary mapping source types to lists of skill names: +\{ +'built-in': \['datetime', 'math', ...], +'external\_paths': \['custom\_skill1', ...], +'entry\_points': \['weather', ...], +'registered': \['my\_skill', ...] +\} + +#### Signature + +```python +list_all_skill_sources() -> Dict[str, List[str]] +``` + +#### Returns + +`Dict[str, List[str]]` + +#### Source + +[`signalwire/signalwire/skills/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/registry.py) + +Line 439. + +*** + +### list\_skills + +List all available skills by scanning directories (only when explicitly requested) + +#### Signature + +```python +list_skills() -> List[Dict[str, str]] +``` + +#### Returns + +`List[Dict[str, str]]` + +#### Source + +[`signalwire/signalwire/skills/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/registry.py) + +Line 208. + +*** + +### register\_skill + +Register a skill class directly + +This allows third-party code to register skill classes without +requiring them to be in a specific directory structure. + +> \[!NOTE] +> from my\_custom\_skills import MyWeatherSkill +> skill\_registry.register\_skill(MyWeatherSkill) + +#### Signature + +```python +register_skill(skill_class: Type[SkillBase]) -> None +``` + +#### Parameters + + + A class that inherits from SkillBase + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/skills/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/registry.py) + +Line 135. + +## Source + +[`signalwire/signalwire/skills/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/registry.py) + +Line 22. diff --git a/fern/products/sdk-reference/python/signalwire/skills/spider/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/spider/index.mdx new file mode 100644 index 0000000000..56de394ceb --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/skills/spider/index.mdx @@ -0,0 +1,44 @@ +--- +slug: "/reference/python/signalwire/skills/spider" +title: "spider" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.spider" + parent: "signalwire.skills" + module: "signalwire.skills" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/spider/__init__.py" +--- +# `spider` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module spider +``` + +## Properties + + + +## Modules + + + + Copyright (c) 2025 SignalWire + + + +## Source + +[`signalwire/signalwire/skills/spider/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/spider/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/spider/skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/spider/skill/index.mdx new file mode 100644 index 0000000000..542fca5f6e --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/skills/spider/skill/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/signalwire/skills/spider/skill" +title: "skill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.spider.skill" + parent: "signalwire.skills.spider" + module: "signalwire.skills.spider" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/spider/skill.py" +--- +# `skill` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module skill +``` + +## Classes + + + + Fast web scraping skill optimized for speed and token efficiency. + + + +## Source + +[`signalwire/signalwire/skills/spider/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/spider/skill.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/spider/skill/spider-skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/spider/skill/spider-skill/index.mdx new file mode 100644 index 0000000000..f4306067a5 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/skills/spider/skill/spider-skill/index.mdx @@ -0,0 +1,238 @@ +--- +slug: "/reference/python/signalwire/skills/spider/skill/spider-skill" +title: "SpiderSkill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.skills.spider.skill.SpiderSkill" + parent: "signalwire.skills.spider.skill" + module: "signalwire.skills.spider.skill" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/spider/skill.py" +--- +# `SpiderSkill` + +Fast web scraping skill optimized for speed and token efficiency. + +## Signature + +```python +class SpiderSkill(SkillBase) +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/python/signalwire/core/skill-base/skill-base) + +## Properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +Initialize the spider skill with configuration parameters. + +#### Signature + +```python +__init__(agent, params: Dict[str, Any]) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/skills/spider/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/spider/skill.py) + +Line 150. + +*** + +### cleanup + +Clean up resources when skill is unloaded. + +#### Signature + +```python +cleanup() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/skills/spider/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/spider/skill.py) + +Line 620. + +*** + +### get\_hints + +Return speech recognition hints for this skill. + +#### Signature + +```python +get_hints() -> List[str] +``` + +#### Returns + +`List[str]` + +#### Source + +[`signalwire/signalwire/skills/spider/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/spider/skill.py) + +Line 613. + +*** + +### get\_instance\_key + +Return unique key for this skill instance. + +#### Signature + +```python +get_instance_key() -> str +``` + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/skills/spider/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/spider/skill.py) + +Line 191. + +*** + +### get\_parameter\_schema + +Get parameter schema for Spider skill + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +get_parameter_schema() -> Dict[str, Dict[str, Any]] +``` + +#### Returns + +`Dict[str, Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/spider/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/spider/skill.py) + +Line 37. + +*** + +### register\_tools + +Register the web scraping tools with the agent. + +#### Signature + +```python +register_tools() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/skills/spider/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/spider/skill.py) + +Line 229. + +*** + +### setup + +Validate configuration and setup the skill. + +#### Signature + +```python +setup() -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/skills/spider/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/spider/skill.py) + +Line 196. + +## Source + +[`signalwire/signalwire/skills/spider/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/spider/skill.py) + +Line 24. diff --git a/fern/products/sdk-reference/python/signalwire/skills/swml-transfer/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/swml-transfer/index.mdx new file mode 100644 index 0000000000..40ce76451d --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/skills/swml-transfer/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/signalwire/skills/swml-transfer" +title: "swml_transfer" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.swml_transfer" + parent: "signalwire.skills" + module: "signalwire.skills" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/swml_transfer/__init__.py" +--- +# `swml_transfer` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module swml_transfer +``` + +## Modules + + + + Copyright (c) 2025 SignalWire + + + +## Source + +[`signalwire/signalwire/skills/swml_transfer/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/swml_transfer/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/swml-transfer/skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/swml-transfer/skill/index.mdx new file mode 100644 index 0000000000..2e95c2ef14 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/skills/swml-transfer/skill/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/signalwire/skills/swml-transfer/skill" +title: "skill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.swml_transfer.skill" + parent: "signalwire.skills.swml_transfer" + module: "signalwire.skills.swml_transfer" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/swml_transfer/skill.py" +--- +# `skill` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module skill +``` + +## Classes + + + + Skill for transferring calls between agents using SWML with pattern matching + + + +## Source + +[`signalwire/signalwire/skills/swml_transfer/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/swml_transfer/skill.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/swml-transfer/skill/swml-transfer-skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/swml-transfer/skill/swml-transfer-skill/index.mdx new file mode 100644 index 0000000000..a66b9f7a42 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/skills/swml-transfer/skill/swml-transfer-skill/index.mdx @@ -0,0 +1,184 @@ +--- +slug: "/reference/python/signalwire/skills/swml-transfer/skill/swml-transfer-skill" +title: "SWMLTransferSkill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.skills.swml_transfer.skill.SWMLTransferSkill" + parent: "signalwire.skills.swml_transfer.skill" + module: "signalwire.skills.swml_transfer.skill" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/swml_transfer/skill.py" +--- +# `SWMLTransferSkill` + +Skill for transferring calls between agents using SWML with pattern matching + +## Signature + +```python +class SWMLTransferSkill(SkillBase) +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/python/signalwire/core/skill-base/skill-base) + +## Properties + + + + + + + + + + + + + +## Methods + +### get\_hints + +Return speech recognition hints + +#### Signature + +```python +get_hints() -> List[str] +``` + +#### Returns + +`List[str]` + +#### Source + +[`signalwire/signalwire/skills/swml_transfer/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/swml_transfer/skill.py) + +Line 266. + +*** + +### get\_instance\_key + +Get the key used to track this skill instance + +For SWML transfer, we use the tool name to differentiate instances + +#### Signature + +```python +get_instance_key() -> str +``` + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/skills/swml_transfer/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/swml_transfer/skill.py) + +Line 120. + +*** + +### get\_parameter\_schema + +Get parameter schema for SWML Transfer skill + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +get_parameter_schema() -> Dict[str, Dict[str, Any]] +``` + +#### Returns + +`Dict[str, Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/swml_transfer/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/swml_transfer/skill.py) + +Line 30. + +*** + +### get\_prompt\_sections + +Return prompt sections to add to agent + +#### Signature + +```python +get_prompt_sections() -> List[Dict[str, Any]] +``` + +#### Returns + +`List[Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/swml_transfer/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/swml_transfer/skill.py) + +Line 297. + +*** + +### register\_tools + +Register the transfer tool with pattern matching + +#### Signature + +```python +register_tools() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/skills/swml_transfer/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/swml_transfer/skill.py) + +Line 180. + +*** + +### setup + +Setup and validate skill configuration + +#### Signature + +```python +setup() -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/skills/swml_transfer/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/swml_transfer/skill.py) + +Line 129. + +## Source + +[`signalwire/signalwire/skills/swml_transfer/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/swml_transfer/skill.py) + +Line 18. diff --git a/fern/products/sdk-reference/python/signalwire/skills/weather-api/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/weather-api/index.mdx new file mode 100644 index 0000000000..697ff0fc97 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/skills/weather-api/index.mdx @@ -0,0 +1,44 @@ +--- +slug: "/reference/python/signalwire/skills/weather-api" +title: "weather_api" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.weather_api" + parent: "signalwire.skills" + module: "signalwire.skills" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/weather_api/__init__.py" +--- +# `weather_api` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module weather_api +``` + +## Properties + + + +## Modules + + + + Copyright (c) 2025 SignalWire + + + +## Source + +[`signalwire/signalwire/skills/weather_api/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/weather_api/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/weather-api/skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/weather-api/skill/index.mdx new file mode 100644 index 0000000000..28ff2a35b0 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/skills/weather-api/skill/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/signalwire/skills/weather-api/skill" +title: "skill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.weather_api.skill" + parent: "signalwire.skills.weather_api" + module: "signalwire.skills.weather_api" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/weather_api/skill.py" +--- +# `skill` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module skill +``` + +## Classes + + + + Skill for getting weather information from WeatherAPI.com. + + + +## Source + +[`signalwire/signalwire/skills/weather_api/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/weather_api/skill.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/weather-api/skill/weather-api-skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/weather-api/skill/weather-api-skill/index.mdx new file mode 100644 index 0000000000..edc044020b --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/skills/weather-api/skill/weather-api-skill/index.mdx @@ -0,0 +1,184 @@ +--- +slug: "/reference/python/signalwire/skills/weather-api/skill/weather-api-skill" +title: "WeatherApiSkill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.skills.weather_api.skill.WeatherApiSkill" + parent: "signalwire.skills.weather_api.skill" + module: "signalwire.skills.weather_api.skill" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/weather_api/skill.py" +--- +# `WeatherApiSkill` + +Skill for getting weather information from WeatherAPI.com. + +Provides current weather data with configurable temperature units and +TTS-optimized natural language responses. + +Configuration: + +- tool\_name: Custom name for the generated SWAIG function +- api\_key: WeatherAPI.com API key +- temperature\_unit: "fahrenheit" or "celsius" for temperature display + +> \[!NOTE] +> agent.add\_skill("weather\_api", \{ +> "tool\_name": "get\_weather", +> "api\_key": "your\_weatherapi\_key", +> "temperature\_unit": "fahrenheit" +> \}) + +## Signature + +```python +class WeatherApiSkill(SkillBase) +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/python/signalwire/core/skill-base/skill-base) + +## Properties + + + + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +Initialize the skill with configuration parameters. + +#### Signature + +```python +__init__(agent, params: Dict[str, Any] = None) +``` + +#### Parameters + + + The agent instance this skill belongs to + + + + Configuration dictionary containing: + + +#### Source + +[`signalwire/signalwire/skills/weather_api/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/weather_api/skill.py) + +Line 75. + +*** + +### get\_parameter\_schema + +Get parameter schema for weather API skill + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +get_parameter_schema() -> Dict[str, Dict[str, Any]] +``` + +#### Returns + +`Dict[str, Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/weather_api/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/weather_api/skill.py) + +Line 47. + +*** + +### get\_tools + +Generate the SWAIG tool with DataMap webhook. + +#### Signature + +```python +get_tools() -> List[Dict[str, Any]] +``` + +#### Returns + +`List[Dict[str, Any]]` — List containing the generated tool configuration + +#### Source + +[`signalwire/signalwire/skills/weather_api/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/weather_api/skill.py) + +Line 125. + +*** + +### register\_tools + +Register SWAIG tools with the agent + +#### Signature + +```python +register_tools() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/skills/weather_api/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/weather_api/skill.py) + +Line 116. + +*** + +### setup + +Setup the skill - validates API key is available. + +#### Signature + +```python +setup() -> bool +``` + +#### Returns + +`bool` — True if setup successful + +#### Source + +[`signalwire/signalwire/skills/weather_api/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/weather_api/skill.py) + +Line 106. + +## Source + +[`signalwire/signalwire/skills/weather_api/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/weather_api/skill.py) + +Line 22. diff --git a/fern/products/sdk-reference/python/signalwire/skills/web-search/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/web-search/index.mdx new file mode 100644 index 0000000000..60d34dce71 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/skills/web-search/index.mdx @@ -0,0 +1,48 @@ +--- +slug: "/reference/python/signalwire/skills/web-search" +title: "web_search" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.web_search" + parent: "signalwire.skills" + module: "signalwire.skills" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/__init__.py" +--- +# `web_search` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module web_search +``` + +## Modules + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + +## Source + +[`signalwire/signalwire/skills/web_search/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/web-search/skill-improved/google-search-scraper/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/web-search/skill-improved/google-search-scraper/index.mdx new file mode 100644 index 0000000000..0f836e986d --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/skills/web-search/skill-improved/google-search-scraper/index.mdx @@ -0,0 +1,205 @@ +--- +slug: "/reference/python/signalwire/skills/web-search/skill-improved/google-search-scraper" +title: "GoogleSearchScraper" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.skills.web_search.skill_improved.GoogleSearchScraper" + parent: "signalwire.skills.web_search.skill_improved" + module: "signalwire.skills.web_search.skill_improved" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_improved.py" +--- +# `GoogleSearchScraper` + +Google Search and Web Scraping functionality with quality scoring + +## Signature + +```python +class GoogleSearchScraper +``` + +## Properties + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(api_key: str, search_engine_id: str, max_content_length: int = 32768) +``` + +#### Parameters + + + + + + + +#### Source + +[`signalwire/signalwire/skills/web_search/skill_improved.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_improved.py) + +Line 25. + +*** + +### extract\_text\_from\_url + +Scrape a URL and extract readable text content with quality metrics + +#### Signature + +```python +extract_text_from_url( + url: str, + content_limit: int = None, + timeout: int = 10 +) -> Tuple[str, Dict[str, Any]] +``` + +#### Parameters + + + + + + + +#### Returns + +`Tuple[str, Dict[str, Any]]` — Tuple of (text\_content, quality\_metrics) + +#### Source + +[`signalwire/signalwire/skills/web_search/skill_improved.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_improved.py) + +Line 66. + +*** + +### search\_and\_scrape + +Backward compatible method that uses the improved search + +#### Signature + +```python +search_and_scrape(query: str, num_results: int = 3, delay: float = 0.5) -> str +``` + +#### Parameters + + + + + + + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/skills/web_search/skill_improved.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_improved.py) + +Line 328. + +*** + +### search\_and\_scrape\_best + +Search and scrape with quality filtering + +#### Signature + +```python +search_and_scrape_best( + query: str, + num_results: int = 3, + oversample_factor: float = 2.5, + delay: float = 0.5, + min_quality_score: float = 0.3 +) -> str +``` + +#### Parameters + + + Search query + + + + Number of best results to return + + + + How many extra results to fetch (e.g., 2.5 = fetch 2.5x) + + + + Delay between requests + + + + Minimum quality score to include a result + + +#### Returns + +`str` — Formatted string with the best N results + +#### Source + +[`signalwire/signalwire/skills/web_search/skill_improved.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_improved.py) + +Line 243. + +*** + +### search\_google + +Search Google using Custom Search JSON API + +#### Signature + +```python +search_google(query: str, num_results: int = 5) -> list +``` + +#### Parameters + + + + + +#### Returns + +`list` + +#### Source + +[`signalwire/signalwire/skills/web_search/skill_improved.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_improved.py) + +Line 34. + +## Source + +[`signalwire/signalwire/skills/web_search/skill_improved.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_improved.py) + +Line 22. diff --git a/fern/products/sdk-reference/python/signalwire/skills/web-search/skill-improved/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/web-search/skill-improved/index.mdx new file mode 100644 index 0000000000..4dd87e8871 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/skills/web-search/skill-improved/index.mdx @@ -0,0 +1,44 @@ +--- +slug: "/reference/python/signalwire/skills/web-search/skill-improved" +title: "skill_improved" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.web_search.skill_improved" + parent: "signalwire.skills.web_search" + module: "signalwire.skills.web_search" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_improved.py" +--- +# `skill_improved` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module skill_improved +``` + +## Classes + + + + Google Search and Web Scraping functionality with quality scoring + + + + Web search capability using Google Custom Search API with quality filtering + + + +## Source + +[`signalwire/signalwire/skills/web_search/skill_improved.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_improved.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/web-search/skill-improved/web-search-skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/web-search/skill-improved/web-search-skill/index.mdx new file mode 100644 index 0000000000..31ef14eece --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/skills/web-search/skill-improved/web-search-skill/index.mdx @@ -0,0 +1,204 @@ +--- +slug: "/reference/python/signalwire/skills/web-search/skill-improved/web-search-skill" +title: "WebSearchSkill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.skills.web_search.skill_improved.WebSearchSkill" + parent: "signalwire.skills.web_search.skill_improved" + module: "signalwire.skills.web_search.skill_improved" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_improved.py" +--- +# `WebSearchSkill` + +Web search capability using Google Custom Search API with quality filtering + +## Signature + +```python +class WebSearchSkill(SkillBase) +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/python/signalwire/core/skill-base/skill-base) + +## Properties + + + + + + + + + + + + + +## Methods + +### get\_global\_data + +Return global data for agent context + +#### Signature + +```python +get_global_data() -> Dict[str, Any] +``` + +#### Returns + +`Dict[str, Any]` + +#### Source + +[`signalwire/signalwire/skills/web_search/skill_improved.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_improved.py) + +Line 457. + +*** + +### get\_hints + +Return speech recognition hints + +#### Signature + +```python +get_hints() -> List[str] +``` + +#### Returns + +`List[str]` + +#### Source + +[`signalwire/signalwire/skills/web_search/skill_improved.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_improved.py) + +Line 453. + +*** + +### get\_instance\_key + +Get the key used to track this skill instance + +#### Signature + +```python +get_instance_key() -> str +``` + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/skills/web_search/skill_improved.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_improved.py) + +Line 353. + +*** + +### get\_parameter\_schema + +Get the parameter schema for the web search skill + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +get_parameter_schema() -> Dict[str, Dict[str, Any]] +``` + +#### Returns + +`Dict[str, Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/web_search/skill_improved.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_improved.py) + +Line 480. + +*** + +### get\_prompt\_sections + +Return prompt sections to add to agent + +#### Signature + +```python +get_prompt_sections() -> List[Dict[str, Any]] +``` + +#### Returns + +`List[Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/web_search/skill_improved.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_improved.py) + +Line 465. + +*** + +### register\_tools + +Register web search tool with the agent + +#### Signature + +```python +register_tools() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/skills/web_search/skill_improved.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_improved.py) + +Line 402. + +*** + +### setup + +Setup the web search skill + +#### Signature + +```python +setup() -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/skills/web_search/skill_improved.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_improved.py) + +Line 359. + +## Source + +[`signalwire/signalwire/skills/web_search/skill_improved.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_improved.py) + +Line 341. diff --git a/fern/products/sdk-reference/python/signalwire/skills/web-search/skill-original/google-search-scraper/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/web-search/skill-original/google-search-scraper/index.mdx new file mode 100644 index 0000000000..38af428baf --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/skills/web-search/skill-original/google-search-scraper/index.mdx @@ -0,0 +1,164 @@ +--- +slug: "/reference/python/signalwire/skills/web-search/skill-original/google-search-scraper" +title: "GoogleSearchScraper" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.skills.web_search.skill_original.GoogleSearchScraper" + parent: "signalwire.skills.web_search.skill_original" + module: "signalwire.skills.web_search.skill_original" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_original.py" +--- +# `GoogleSearchScraper` + +Google Search and Web Scraping functionality + +## Signature + +```python +class GoogleSearchScraper +``` + +## Properties + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(api_key: str, search_engine_id: str, max_content_length: int = 32768) +``` + +#### Parameters + + + + + + + +#### Source + +[`signalwire/signalwire/skills/web_search/skill_original.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_original.py) + +Line 24. + +*** + +### extract\_text\_from\_url + +Scrape a URL and extract readable text content + +#### Signature + +```python +extract_text_from_url( + url: str, + content_limit: int = None, + timeout: int = 10 +) -> str +``` + +#### Parameters + + + URL to scrape + + + + Maximum characters to return (uses self.max\_content\_length if not provided) + + + + Request timeout in seconds + + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/skills/web_search/skill_original.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_original.py) + +Line 65. + +*** + +### search\_and\_scrape + +Main function: search Google and scrape the resulting pages + +Dynamically calculates per-result content limit based on total max\_content\_length +and number of results to ensure total response stays within bounds. + +#### Signature + +```python +search_and_scrape(query: str, num_results: int = 3, delay: float = 0.5) -> str +``` + +#### Parameters + + + + + + + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/skills/web_search/skill_original.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_original.py) + +Line 100. + +*** + +### search\_google + +Search Google using Custom Search JSON API + +#### Signature + +```python +search_google(query: str, num_results: int = 5) -> list +``` + +#### Parameters + + + + + +#### Returns + +`list` + +#### Source + +[`signalwire/signalwire/skills/web_search/skill_original.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_original.py) + +Line 33. + +## Source + +[`signalwire/signalwire/skills/web_search/skill_original.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_original.py) + +Line 21. diff --git a/fern/products/sdk-reference/python/signalwire/skills/web-search/skill-original/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/web-search/skill-original/index.mdx new file mode 100644 index 0000000000..24298e2e6b --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/skills/web-search/skill-original/index.mdx @@ -0,0 +1,44 @@ +--- +slug: "/reference/python/signalwire/skills/web-search/skill-original" +title: "skill_original" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.web_search.skill_original" + parent: "signalwire.skills.web_search" + module: "signalwire.skills.web_search" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_original.py" +--- +# `skill_original` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module skill_original +``` + +## Classes + + + + Google Search and Web Scraping functionality + + + + Web search capability using Google Custom Search API + + + +## Source + +[`signalwire/signalwire/skills/web_search/skill_original.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_original.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/web-search/skill-original/web-search-skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/web-search/skill-original/web-search-skill/index.mdx new file mode 100644 index 0000000000..8fceb03f68 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/skills/web-search/skill-original/web-search-skill/index.mdx @@ -0,0 +1,209 @@ +--- +slug: "/reference/python/signalwire/skills/web-search/skill-original/web-search-skill" +title: "WebSearchSkill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.skills.web_search.skill_original.WebSearchSkill" + parent: "signalwire.skills.web_search.skill_original" + module: "signalwire.skills.web_search.skill_original" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_original.py" +--- +# `WebSearchSkill` + +Web search capability using Google Custom Search API + +## Signature + +```python +class WebSearchSkill(SkillBase) +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/python/signalwire/core/skill-base/skill-base) + +## Properties + + + + + + + + + + + + + +## Methods + +### get\_global\_data + +Return global data for agent context + +#### Signature + +```python +get_global_data() -> Dict[str, Any] +``` + +#### Returns + +`Dict[str, Any]` + +#### Source + +[`signalwire/signalwire/skills/web_search/skill_original.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_original.py) + +Line 265. + +*** + +### get\_hints + +Return speech recognition hints + +#### Signature + +```python +get_hints() -> List[str] +``` + +#### Returns + +`List[str]` + +#### Source + +[`signalwire/signalwire/skills/web_search/skill_original.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_original.py) + +Line 256. + +*** + +### get\_instance\_key + +Get the key used to track this skill instance + +For web search, we use the search\_engine\_id to differentiate instances + +#### Signature + +```python +get_instance_key() -> str +``` + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/skills/web_search/skill_original.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_original.py) + +Line 158. + +*** + +### get\_parameter\_schema + +Get the parameter schema for the web search skill + +Returns all configurable parameters for web search including +API credentials, search settings, and response customization. + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +get_parameter_schema() -> Dict[str, Dict[str, Any]] +``` + +#### Returns + +`Dict[str, Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/web_search/skill_original.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_original.py) + +Line 287. + +*** + +### get\_prompt\_sections + +Return prompt sections to add to agent + +#### Signature + +```python +get_prompt_sections() -> List[Dict[str, Any]] +``` + +#### Returns + +`List[Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/web_search/skill_original.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_original.py) + +Line 272. + +*** + +### register\_tools + +Register web search tool with the agent + +#### Signature + +```python +register_tools() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/skills/web_search/skill_original.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_original.py) + +Line 206. + +*** + +### setup + +Setup the web search skill + +#### Signature + +```python +setup() -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/skills/web_search/skill_original.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_original.py) + +Line 168. + +## Source + +[`signalwire/signalwire/skills/web_search/skill_original.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_original.py) + +Line 146. diff --git a/fern/products/sdk-reference/python/signalwire/skills/web-search/skill/google-search-scraper/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/web-search/skill/google-search-scraper/index.mdx new file mode 100644 index 0000000000..e1b3604ea3 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/skills/web-search/skill/google-search-scraper/index.mdx @@ -0,0 +1,319 @@ +--- +slug: "/reference/python/signalwire/skills/web-search/skill/google-search-scraper" +title: "GoogleSearchScraper" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.skills.web_search.skill.GoogleSearchScraper" + parent: "signalwire.skills.web_search.skill" + module: "signalwire.skills.web_search.skill" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill.py" +--- +# `GoogleSearchScraper` + +Google Search and Web Scraping functionality with quality scoring + +## Signature + +```python +class GoogleSearchScraper +``` + +## Properties + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(api_key: str, search_engine_id: str, max_content_length: int = 32768) +``` + +#### Parameters + + + + + + + +#### Source + +[`signalwire/signalwire/skills/web_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill.py) + +Line 25. + +*** + +### extract\_html\_content + +Original HTML extraction method (renamed from extract\_text\_from\_url) + +#### Signature + +```python +extract_html_content( + url: str, + content_limit: int = None, + timeout: int = 10 +) -> Tuple[str, Dict[str, Any]] +``` + +#### Parameters + + + + + + + +#### Returns + +`Tuple[str, Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/web_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill.py) + +Line 204. + +*** + +### extract\_reddit\_content + +Extract Reddit content using JSON API for better quality + +#### Signature + +```python +extract_reddit_content( + url: str, + content_limit: int = None, + timeout: int = 10 +) -> Tuple[str, Dict[str, Any]] +``` + +#### Parameters + + + + + + + +#### Returns + +`Tuple[str, Dict[str, Any]]` — Tuple of (text\_content, quality\_metrics) + +#### Source + +[`signalwire/signalwire/skills/web_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill.py) + +Line 71. + +*** + +### extract\_text\_from\_url + +Main extraction method that routes to appropriate extractor + +#### Signature + +```python +extract_text_from_url( + url: str, + content_limit: int = None, + timeout: int = 10 +) -> Tuple[str, Dict[str, Any]] +``` + +#### Parameters + + + + + + + +#### Returns + +`Tuple[str, Dict[str, Any]]` — Tuple of (text\_content, quality\_metrics) + +#### Source + +[`signalwire/signalwire/skills/web_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill.py) + +Line 192. + +*** + +### is\_reddit\_url + +Check if URL is from Reddit + +#### Signature + +```python +is_reddit_url(url: str) -> bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/skills/web_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill.py) + +Line 66. + +*** + +### search\_and\_scrape + +Backward compatible method that uses the improved search + +#### Signature + +```python +search_and_scrape(query: str, num_results: int = 3, delay: float = 0.5) -> str +``` + +#### Parameters + + + + + + + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/skills/web_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill.py) + +Line 607. + +*** + +### search\_and\_scrape\_best + +Search and scrape with quality filtering and source diversity. + +#### Signature + +```python +search_and_scrape_best( + query: str, + num_results: int = 3, + oversample_factor: float = 4.0, + delay: float = 0.5, + min_quality_score: float = 0.2, + per_page_timeout: float = 2.0, + overall_deadline: float = 10.0, + parallel_scrape: bool = True, + snippets_only: bool = False +) -> str +``` + +#### Parameters + + + Search query + + + + Number of best results to return + + + + How many extra results to fetch (e.g., 4.0 = fetch 4x) + + + + Delay between scrape requests (ignored in parallel mode) + + + + Minimum quality score to include a result + + + + Max seconds to wait on each page scrape + + + + Wall-clock budget (seconds) for the whole call. Anything not yet returned by this deadline is abandoned. + + + + Run all page scrapes concurrently in a thread pool + + + + Skip page scraping entirely; format the CSE snippets directly. Use for fast voice answers when full page content is not required. + + +#### Returns + +`str` — Formatted string with the best N results from diverse sources + +#### Source + +[`signalwire/signalwire/skills/web_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill.py) + +Line 442. + +*** + +### search\_google + +Search Google using Custom Search JSON API + +#### Signature + +```python +search_google(query: str, num_results: int = 5) -> list +``` + +#### Parameters + + + + + +#### Returns + +`list` + +#### Source + +[`signalwire/signalwire/skills/web_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill.py) + +Line 34. + +## Source + +[`signalwire/signalwire/skills/web_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill.py) + +Line 22. diff --git a/fern/products/sdk-reference/python/signalwire/skills/web-search/skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/web-search/skill/index.mdx new file mode 100644 index 0000000000..9985cdb753 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/skills/web-search/skill/index.mdx @@ -0,0 +1,44 @@ +--- +slug: "/reference/python/signalwire/skills/web-search/skill" +title: "skill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.web_search.skill" + parent: "signalwire.skills.web_search" + module: "signalwire.skills.web_search" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill.py" +--- +# `skill` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module skill +``` + +## Classes + + + + Google Search and Web Scraping functionality with quality scoring + + + + Web search capability using Google Custom Search API with quality filtering + + + +## Source + +[`signalwire/signalwire/skills/web_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/web-search/skill/web-search-skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/web-search/skill/web-search-skill/index.mdx new file mode 100644 index 0000000000..bad643e2b4 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/skills/web-search/skill/web-search-skill/index.mdx @@ -0,0 +1,204 @@ +--- +slug: "/reference/python/signalwire/skills/web-search/skill/web-search-skill" +title: "WebSearchSkill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.skills.web_search.skill.WebSearchSkill" + parent: "signalwire.skills.web_search.skill" + module: "signalwire.skills.web_search.skill" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill.py" +--- +# `WebSearchSkill` + +Web search capability using Google Custom Search API with quality filtering + +## Signature + +```python +class WebSearchSkill(SkillBase) +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/python/signalwire/core/skill-base/skill-base) + +## Properties + + + + + + + + + + + + + +## Methods + +### get\_global\_data + +Return global data for agent context + +#### Signature + +```python +get_global_data() -> Dict[str, Any] +``` + +#### Returns + +`Dict[str, Any]` + +#### Source + +[`signalwire/signalwire/skills/web_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill.py) + +Line 768. + +*** + +### get\_hints + +Return speech recognition hints + +#### Signature + +```python +get_hints() -> List[str] +``` + +#### Returns + +`List[str]` + +#### Source + +[`signalwire/signalwire/skills/web_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill.py) + +Line 764. + +*** + +### get\_instance\_key + +Get the key used to track this skill instance + +#### Signature + +```python +get_instance_key() -> str +``` + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/skills/web_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill.py) + +Line 632. + +*** + +### get\_parameter\_schema + +Get the parameter schema for the web search skill + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +get_parameter_schema() -> Dict[str, Dict[str, Any]] +``` + +#### Returns + +`Dict[str, Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/web_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill.py) + +Line 791. + +*** + +### get\_prompt\_sections + +Return prompt sections to add to agent + +#### Signature + +```python +get_prompt_sections() -> List[Dict[str, Any]] +``` + +#### Returns + +`List[Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/web_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill.py) + +Line 776. + +*** + +### register\_tools + +Register web search tool with the agent + +#### Signature + +```python +register_tools() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/skills/web_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill.py) + +Line 705. + +*** + +### setup + +Setup the web search skill + +#### Signature + +```python +setup() -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/skills/web_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill.py) + +Line 638. + +## Source + +[`signalwire/signalwire/skills/web_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill.py) + +Line 620. diff --git a/fern/products/sdk-reference/python/signalwire/skills/wikipedia-search/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/wikipedia-search/index.mdx new file mode 100644 index 0000000000..e7ee197825 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/skills/wikipedia-search/index.mdx @@ -0,0 +1,44 @@ +--- +slug: "/reference/python/signalwire/skills/wikipedia-search" +title: "wikipedia_search" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.wikipedia_search" + parent: "signalwire.skills" + module: "signalwire.skills" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/wikipedia_search/__init__.py" +--- +# `wikipedia_search` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module wikipedia_search +``` + +## Properties + + + +## Modules + + + + Copyright (c) 2025 SignalWire + + + +## Source + +[`signalwire/signalwire/skills/wikipedia_search/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/wikipedia_search/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/wikipedia-search/skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/wikipedia-search/skill/index.mdx new file mode 100644 index 0000000000..9b325893c6 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/skills/wikipedia-search/skill/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/signalwire/skills/wikipedia-search/skill" +title: "skill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.wikipedia_search.skill" + parent: "signalwire.skills.wikipedia_search" + module: "signalwire.skills.wikipedia_search" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/wikipedia_search/skill.py" +--- +# `skill` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module skill +``` + +## Classes + + + + Skill for searching Wikipedia articles and retrieving content. + + + +## Source + +[`signalwire/signalwire/skills/wikipedia_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/wikipedia_search/skill.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/wikipedia-search/skill/wikipedia-search-skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/wikipedia-search/skill/wikipedia-search-skill/index.mdx new file mode 100644 index 0000000000..d00c5fd478 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/skills/wikipedia-search/skill/wikipedia-search-skill/index.mdx @@ -0,0 +1,191 @@ +--- +slug: "/reference/python/signalwire/skills/wikipedia-search/skill/wikipedia-search-skill" +title: "WikipediaSearchSkill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.skills.wikipedia_search.skill.WikipediaSearchSkill" + parent: "signalwire.skills.wikipedia_search.skill" + module: "signalwire.skills.wikipedia_search.skill" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/wikipedia_search/skill.py" +--- +# `WikipediaSearchSkill` + +Skill for searching Wikipedia articles and retrieving content. + +This skill uses the Wikipedia API to search for articles and retrieve +their introductory content, similar to getting a summary of a topic. + +## Signature + +```python +class WikipediaSearchSkill(SkillBase) +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/python/signalwire/core/skill-base/skill-base) + +## Properties + + + + + + + + + + + + + +## Methods + +### get\_hints + +Return speech recognition hints for better accuracy. + +#### Signature + +```python +get_hints() -> list +``` + +#### Returns + +`list` — List of words/phrases to help with speech recognition + +#### Source + +[`signalwire/signalwire/skills/wikipedia_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/wikipedia_search/skill.py) + +Line 198. + +*** + +### get\_parameter\_schema + +Get parameter schema for Wikipedia search skill + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +get_parameter_schema() -> Dict[str, Dict[str, Any]] +``` + +#### Returns + +`Dict[str, Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/wikipedia_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/wikipedia_search/skill.py) + +Line 40. + +*** + +### get\_prompt\_sections + +Return additional context for the agent prompt. + +#### Signature + +```python +get_prompt_sections() -> list +``` + +#### Returns + +`list` — List of prompt sections to add to the agent + +#### Source + +[`signalwire/signalwire/skills/wikipedia_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/wikipedia_search/skill.py) + +Line 181. + +*** + +### register\_tools + +Register the SWAIG tool for Wikipedia search. + +#### Signature + +```python +register_tools() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/skills/wikipedia_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/wikipedia_search/skill.py) + +Line 83. + +*** + +### search\_wiki + +Search Wikipedia for articles matching the query. + +#### Signature + +```python +search_wiki(query: str) -> str +``` + +#### Parameters + + + The search term to look up + + +#### Returns + +`str` — String containing the Wikipedia article content or error message + +#### Source + +[`signalwire/signalwire/skills/wikipedia_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/wikipedia_search/skill.py) + +Line 110. + +*** + +### setup + +Setup the Wikipedia search skill. + +#### Signature + +```python +setup() -> bool +``` + +#### Returns + +`bool` — True if setup successful, False otherwise + +#### Source + +[`signalwire/signalwire/skills/wikipedia_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/wikipedia_search/skill.py) + +Line 62. + +## Source + +[`signalwire/signalwire/skills/wikipedia_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/wikipedia_search/skill.py) + +Line 22. diff --git a/fern/products/sdk-reference/python/signalwire/utils/index.mdx b/fern/products/sdk-reference/python/signalwire/utils/index.mdx new file mode 100644 index 0000000000..11037cef26 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/utils/index.mdx @@ -0,0 +1,82 @@ +--- +slug: "/reference/python/signalwire/utils" +title: "utils" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.utils" + parent: "signalwire" + module: "signalwire" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/__init__.py" +--- +# `utils` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module utils +``` + +## Properties + + + +## Modules + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + +## Functions + +### is\_serverless\_mode + +Check if running in any serverless environment. + +#### Signature + +```python +is_serverless_mode() -> bool +``` + +#### Returns + +`bool` — True if in serverless mode, False if in server mode + +#### Source + +[`signalwire/signalwire/utils/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/__init__.py) + +Line 14. + +## Source + +[`signalwire/signalwire/utils/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/utils/pom-utils/index.mdx b/fern/products/sdk-reference/python/signalwire/utils/pom-utils/index.mdx new file mode 100644 index 0000000000..75db294754 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/utils/pom-utils/index.mdx @@ -0,0 +1,32 @@ +--- +slug: "/reference/python/signalwire/utils/pom-utils" +title: "pom_utils" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.utils.pom_utils" + parent: "signalwire.utils" + module: "signalwire.utils" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/pom_utils.py" +--- +# `pom_utils` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module pom_utils +``` + +## Source + +[`signalwire/signalwire/utils/pom_utils.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/pom_utils.py) diff --git a/fern/products/sdk-reference/python/signalwire/utils/schema-utils/index.mdx b/fern/products/sdk-reference/python/signalwire/utils/schema-utils/index.mdx new file mode 100644 index 0000000000..7ebd76daf8 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/utils/schema-utils/index.mdx @@ -0,0 +1,48 @@ +--- +slug: "/reference/python/signalwire/utils/schema-utils" +title: "schema_utils" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.utils.schema_utils" + parent: "signalwire.utils" + module: "signalwire.utils" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/schema_utils.py" +--- +# `schema_utils` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module schema_utils +``` + +## Properties + + + +## Classes + + + + Utility class for loading and working with SWML schemas + + + + Raised when SWML schema validation fails. + + + +## Source + +[`signalwire/signalwire/utils/schema_utils.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/schema_utils.py) diff --git a/fern/products/sdk-reference/python/signalwire/utils/schema-utils/schema-utils/index.mdx b/fern/products/sdk-reference/python/signalwire/utils/schema-utils/schema-utils/index.mdx new file mode 100644 index 0000000000..f56063cb19 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/utils/schema-utils/schema-utils/index.mdx @@ -0,0 +1,321 @@ +--- +slug: "/reference/python/signalwire/utils/schema-utils/schema-utils" +title: "SchemaUtils" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.utils.schema_utils.SchemaUtils" + parent: "signalwire.utils.schema_utils" + module: "signalwire.utils.schema_utils" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/schema_utils.py" +--- +# `SchemaUtils` + +Utility class for loading and working with SWML schemas + +## Signature + +```python +class SchemaUtils +``` + +## Properties + + + Check if full JSON Schema validation is available. + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +Initialize the schema utilities. + +#### Signature + +```python +__init__(schema_path: Optional[str] = None, schema_validation: bool = True) +``` + +#### Parameters + + + Path to the schema file + + + + Enable schema validation. Can also be disabled via SWML\_SKIP\_SCHEMA\_VALIDATION=1 environment variable. + + +#### Source + +[`signalwire/signalwire/utils/schema_utils.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/schema_utils.py) + +Line 45. + +*** + +### generate\_method\_body + +Generate the method body implementation for a verb + +#### Signature + +```python +generate_method_body(verb_name: str) -> str +``` + +#### Parameters + + + The name of the verb + + +#### Returns + +`str` — The method body as a string + +#### Source + +[`signalwire/signalwire/utils/schema_utils.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/schema_utils.py) + +Line 460. + +*** + +### generate\_method\_signature + +Generate a Python method signature for a verb + +#### Signature + +```python +generate_method_signature(verb_name: str) -> str +``` + +#### Parameters + + + The name of the verb + + +#### Returns + +`str` — A Python method signature string + +#### Source + +[`signalwire/signalwire/utils/schema_utils.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/schema_utils.py) + +Line 403. + +*** + +### get\_all\_verb\_names + +Get all verb names defined in the schema + +#### Signature + +```python +get_all_verb_names() -> List[str] +``` + +#### Returns + +`List[str]` — List of verb names + +#### Source + +[`signalwire/signalwire/utils/schema_utils.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/schema_utils.py) + +Line 379. + +*** + +### get\_verb\_parameters + +Get the parameter definitions for a specific verb + +#### Signature + +```python +get_verb_parameters(verb_name: str) -> Dict[str, Any] +``` + +#### Parameters + + + The name of the verb (e.g., "ai", "answer", etc.) + + +#### Returns + +`Dict[str, Any]` — Dictionary mapping parameter names to their definitions + +#### Source + +[`signalwire/signalwire/utils/schema_utils.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/schema_utils.py) + +Line 388. + +*** + +### get\_verb\_properties + +Get the properties for a specific verb + +#### Signature + +```python +get_verb_properties(verb_name: str) -> Dict[str, Any] +``` + +#### Parameters + + + The name of the verb (e.g., "ai", "answer", etc.) + + +#### Returns + +`Dict[str, Any]` — The properties for the verb or an empty dict if not found + +#### Source + +[`signalwire/signalwire/utils/schema_utils.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/schema_utils.py) + +Line 227. + +*** + +### get\_verb\_required\_properties + +Get the required properties for a specific verb + +#### Signature + +```python +get_verb_required_properties(verb_name: str) -> List[str] +``` + +#### Parameters + + + The name of the verb (e.g., "ai", "answer", etc.) + + +#### Returns + +`List[str]` — List of required property names for the verb or an empty list if not found + +#### Source + +[`signalwire/signalwire/utils/schema_utils.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/schema_utils.py) + +Line 243. + +*** + +### load\_schema + +Load the JSON schema from the specified path + +#### Signature + +```python +load_schema() -> Dict[str, Any] +``` + +#### Returns + +`Dict[str, Any]` — The schema as a dictionary + +#### Source + +[`signalwire/signalwire/utils/schema_utils.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/schema_utils.py) + +Line 148. + +*** + +### validate\_document + +Validate a complete SWML document against the schema. + +#### Signature + +```python +validate_document(document: Dict[str, Any]) -> Tuple[bool, List[str]] +``` + +#### Parameters + + + The complete SWML document to validate + + +#### Returns + +`Tuple[bool, List[str]]` — (is\_valid, error\_messages) tuple + +#### Source + +[`signalwire/signalwire/utils/schema_utils.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/schema_utils.py) + +Line 357. + +*** + +### validate\_verb + +Validate a verb configuration against the schema. + +Performs full JSON Schema validation including type checking and nested +object validation using jsonschema-rs. + +#### Signature + +```python +validate_verb( + verb_name: str, + verb_config: Dict[str, Any] +) -> Tuple[bool, List[str]] +``` + +#### Parameters + + + The name of the verb (e.g., "ai", "answer", etc.) + + + + The configuration for the verb + + +#### Returns + +`Tuple[bool, List[str]]` — (is\_valid, error\_messages) tuple + +#### Source + +[`signalwire/signalwire/utils/schema_utils.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/schema_utils.py) + +Line 260. + +## Source + +[`signalwire/signalwire/utils/schema_utils.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/schema_utils.py) + +Line 40. diff --git a/fern/products/sdk-reference/python/signalwire/utils/schema-utils/schema-validation-error/index.mdx b/fern/products/sdk-reference/python/signalwire/utils/schema-utils/schema-validation-error/index.mdx new file mode 100644 index 0000000000..c9192a5634 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/utils/schema-utils/schema-validation-error/index.mdx @@ -0,0 +1,61 @@ +--- +slug: "/reference/python/signalwire/utils/schema-utils/schema-validation-error" +title: "SchemaValidationError" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.utils.schema_utils.SchemaValidationError" + parent: "signalwire.utils.schema_utils" + module: "signalwire.utils.schema_utils" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/schema_utils.py" +--- +# `SchemaValidationError` + +Raised when SWML schema validation fails. + +## Signature + +```python +class SchemaValidationError(Exception) +``` + +## Inheritance + +**Extends:** `Exception` + +## Properties + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(verb_name: str, errors: List[str]) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/utils/schema_utils.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/schema_utils.py) + +Line 30. + +## Source + +[`signalwire/signalwire/utils/schema_utils.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/schema_utils.py) + +Line 27. diff --git a/fern/products/sdk-reference/python/signalwire/utils/token-generators/index.mdx b/fern/products/sdk-reference/python/signalwire/utils/token-generators/index.mdx new file mode 100644 index 0000000000..71aaa4a9e4 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/utils/token-generators/index.mdx @@ -0,0 +1,32 @@ +--- +slug: "/reference/python/signalwire/utils/token-generators" +title: "token_generators" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.utils.token_generators" + parent: "signalwire.utils" + module: "signalwire.utils" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/token_generators.py" +--- +# `token_generators` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module token_generators +``` + +## Source + +[`signalwire/signalwire/utils/token_generators.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/token_generators.py) diff --git a/fern/products/sdk-reference/python/signalwire/utils/url-validator/index.mdx b/fern/products/sdk-reference/python/signalwire/utils/url-validator/index.mdx new file mode 100644 index 0000000000..180bba6447 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/utils/url-validator/index.mdx @@ -0,0 +1,68 @@ +--- +slug: "/reference/python/signalwire/utils/url-validator" +title: "url_validator" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.utils.url_validator" + parent: "signalwire.utils" + module: "signalwire.utils" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/url_validator.py" +--- +# `url_validator` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module url_validator +``` + +## Properties + + + +## Functions + +### validate\_url + +Validate that a URL is safe to fetch (not pointing to private/internal resources). + +#### Signature + +```python +validate_url(url: str, allow_private: bool = False) -> bool +``` + +#### Parameters + + + The URL to validate + + + + If True, allow private IP ranges (default: False) + + +#### Returns + +`bool` — True if the URL is safe to fetch, False otherwise + +#### Source + +[`signalwire/signalwire/utils/url_validator.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/url_validator.py) + +Line 34. + +## Source + +[`signalwire/signalwire/utils/url_validator.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/url_validator.py) diff --git a/fern/products/sdk-reference/python/signalwire/utils/validators/index.mdx b/fern/products/sdk-reference/python/signalwire/utils/validators/index.mdx new file mode 100644 index 0000000000..81407e3cc3 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/utils/validators/index.mdx @@ -0,0 +1,32 @@ +--- +slug: "/reference/python/signalwire/utils/validators" +title: "validators" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.utils.validators" + parent: "signalwire.utils" + module: "signalwire.utils" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/validators.py" +--- +# `validators` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module validators +``` + +## Source + +[`signalwire/signalwire/utils/validators.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/validators.py) diff --git a/fern/products/sdk-reference/python/signalwire/web/index.mdx b/fern/products/sdk-reference/python/signalwire/web/index.mdx new file mode 100644 index 0000000000..e8b769038d --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/web/index.mdx @@ -0,0 +1,44 @@ +--- +slug: "/reference/python/signalwire/web" +title: "web" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.web" + parent: "signalwire" + module: "signalwire" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/web/__init__.py" +--- +# `web` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module web +``` + +## Properties + + + +## Modules + + + + Copyright (c) 2025 SignalWire + + + +## Source + +[`signalwire/signalwire/web/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/web/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/web/web-service/index.mdx b/fern/products/sdk-reference/python/signalwire/web/web-service/index.mdx new file mode 100644 index 0000000000..1c00b97924 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/web/web-service/index.mdx @@ -0,0 +1,44 @@ +--- +slug: "/reference/python/signalwire/web/web-service" +title: "web_service" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.web.web_service" + parent: "signalwire.web" + module: "signalwire.web" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/web/web_service.py" +--- +# `web_service` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module web_service +``` + +## Properties + + + +## Classes + + + + Static file serving service with HTTP API + + + +## Source + +[`signalwire/signalwire/web/web_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/web/web_service.py) diff --git a/fern/products/sdk-reference/python/signalwire/web/web-service/web-service/index.mdx b/fern/products/sdk-reference/python/signalwire/web/web-service/web-service/index.mdx new file mode 100644 index 0000000000..27adfc8221 --- /dev/null +++ b/fern/products/sdk-reference/python/signalwire/web/web-service/web-service/index.mdx @@ -0,0 +1,234 @@ +--- +slug: "/reference/python/signalwire/web/web-service/web-service" +title: "WebService" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.web.web_service.WebService" + parent: "signalwire.web.web_service" + module: "signalwire.web.web_service" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/web/web_service.py" +--- +# `WebService` + +Static file serving service with HTTP API + +## Signature + +```python +class WebService +``` + +## Properties + + + + + + + + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +Initialize WebService + +#### Signature + +```python +__init__( + port: int = 8002, + directories: Dict[str, str] = None, + basic_auth: Optional[Tuple[str, str]] = None, + config_file: Optional[str] = None, + enable_directory_browsing: bool = False, + allowed_extensions: Optional[list] = None, + blocked_extensions: Optional[list] = None, + max_file_size: int = 100 * 1024 * 1024, + enable_cors: bool = True +) +``` + +#### Parameters + + + Port to bind to (default: 8002) + + + + Dict mapping URL paths to local directories + + + + Optional tuple of (username, password) + + + + Optional configuration file path + + + + Allow directory listing + + + + List of allowed file extensions (e.g., \['.html', '.css']) + + + + List of blocked extensions (e.g., \['.env', '.git']) + + + + Maximum file size in bytes to serve + + + + Enable CORS support + + +#### Source + +[`signalwire/signalwire/web/web_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/web/web_service.py) + +Line 44. + +*** + +### add\_directory + +Add a new directory to serve + +#### Signature + +```python +add_directory(route: str, directory: str) -> None +``` + +#### Parameters + + + URL path to mount at (e.g., "/docs") + + + + Local directory path to serve + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/web/web_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/web/web_service.py) + +Line 461. + +*** + +### remove\_directory + +Remove a directory from being served + +#### Signature + +```python +remove_directory(route: str) -> None +``` + +#### Parameters + + + URL path to remove + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/web/web_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/web/web_service.py) + +Line 487. + +*** + +### start + +Start the service with optional HTTPS support + +#### Signature + +```python +start( + host: str = '0.0.0.0', + port: Optional[int] = None, + ssl_cert: Optional[str] = None, + ssl_key: Optional[str] = None +) +``` + +#### Parameters + + + Host to bind to (default: "0.0.0.0") + + + + Port to bind to (default: self.port) + + + + Path to SSL certificate file (overrides environment) + + + + Path to SSL key file (overrides environment) + + +#### Source + +[`signalwire/signalwire/web/web_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/web/web_service.py) + +Line 501. + +*** + +### stop + +Stop the service (placeholder for cleanup) + +#### Signature + +```python +stop() +``` + +#### Source + +[`signalwire/signalwire/web/web_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/web/web_service.py) + +Line 566. + +## Source + +[`signalwire/signalwire/web/web_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/web/web_service.py) + +Line 41. diff --git a/fern/products/sdk-reference/ruby/_meta.json b/fern/products/sdk-reference/ruby/_meta.json new file mode 100644 index 0000000000..31ed89c584 --- /dev/null +++ b/fern/products/sdk-reference/ruby/_meta.json @@ -0,0 +1,10 @@ +{ + "language": "ruby", + "sdk_name": "ruby-sdk", + "version": null, + "source_repo": "https://github.com/signalwire/signalwire-ruby", + "format": "mdx", + "platform": "fern", + "base_slug": "/reference/ruby", + "item_count": 1778 +} \ No newline at end of file diff --git a/fern/products/sdk-reference/ruby/index.mdx b/fern/products/sdk-reference/ruby/index.mdx new file mode 100644 index 0000000000..4652c79949 --- /dev/null +++ b/fern/products/sdk-reference/ruby/index.mdx @@ -0,0 +1,14 @@ +--- +title: "Ruby SDK" +slug: "/reference/ruby" +lustri: + auto_generated: true + language: "ruby" + kind: "sdk" +--- +# Ruby SDK Reference + +## Modules + +- [`SignalWire`](/docs/sdk-reference/reference/ruby/signal-wire) + diff --git a/fern/products/sdk-reference/ruby/signal-wire/agent-base/agent-body-limit-middleware/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/agent-base/agent-body-limit-middleware/index.mdx new file mode 100644 index 0000000000..3e266e6f07 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/agent-base/agent-body-limit-middleware/index.mdx @@ -0,0 +1,78 @@ +--- +slug: "/reference/ruby/signal-wire/agent-base/agent-body-limit-middleware" +title: "AgentBodyLimitMiddleware" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::AgentBase::AgentBodyLimitMiddleware" + parent: "SignalWire::AgentBase" + module: "SignalWire.AgentBase" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb" + visibility: "public" +--- +# `AgentBodyLimitMiddleware` + +## Signature + +```ruby +class AgentBodyLimitMiddleware < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### call + +#### Signature + +```ruby +def call(env) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 2220. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(app, max_size) +``` + +#### Parameters + + + + + +#### Returns + +`AgentBodyLimitMiddleware` — a new instance of AgentBodyLimitMiddleware + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 2215. + +## Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 2214. diff --git a/fern/products/sdk-reference/ruby/signal-wire/agent-base/agent-security-headers-middleware/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/agent-base/agent-security-headers-middleware/index.mdx new file mode 100644 index 0000000000..93d1701b85 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/agent-base/agent-security-headers-middleware/index.mdx @@ -0,0 +1,90 @@ +--- +slug: "/reference/ruby/signal-wire/agent-base/agent-security-headers-middleware" +title: "AgentSecurityHeadersMiddleware" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::AgentBase::AgentSecurityHeadersMiddleware" + parent: "SignalWire::AgentBase" + module: "SignalWire.AgentBase" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb" + visibility: "public" +--- +# `AgentSecurityHeadersMiddleware` + +\================================================================== +Rack Middleware +=============== + +## Signature + +```ruby +class AgentSecurityHeadersMiddleware < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Constants + + + +## Methods + +### call + +#### Signature + +```ruby +def call(env) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 2207. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(app) +``` + +#### Parameters + + + +#### Returns + +`AgentSecurityHeadersMiddleware` — a new instance of AgentSecurityHeadersMiddleware + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 2203. + +## Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 2196. diff --git a/fern/products/sdk-reference/ruby/signal-wire/agent-base/agent-timing-safe-basic-auth/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/agent-base/agent-timing-safe-basic-auth/index.mdx new file mode 100644 index 0000000000..2e510a9099 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/agent-base/agent-timing-safe-basic-auth/index.mdx @@ -0,0 +1,78 @@ +--- +slug: "/reference/ruby/signal-wire/agent-base/agent-timing-safe-basic-auth" +title: "AgentTimingSafeBasicAuth" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::AgentBase::AgentTimingSafeBasicAuth" + parent: "SignalWire::AgentBase" + module: "SignalWire.AgentBase" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb" + visibility: "public" +--- +# `AgentTimingSafeBasicAuth` + +## Signature + +```ruby +class AgentTimingSafeBasicAuth < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### call + +#### Signature + +```ruby +def call(env) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 2235. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(app, agent) +``` + +#### Parameters + + + + + +#### Returns + +`AgentTimingSafeBasicAuth` — a new instance of AgentTimingSafeBasicAuth + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 2230. + +## Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 2229. diff --git a/fern/products/sdk-reference/ruby/signal-wire/agent-base/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/agent-base/index.mdx new file mode 100644 index 0000000000..66b374b6a8 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/agent-base/index.mdx @@ -0,0 +1,2590 @@ +--- +slug: "/reference/ruby/signal-wire/agent-base" +title: "AgentBase" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::AgentBase" + parent: "SignalWire" + module: "SignalWire" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb" + visibility: "public" +--- +# `AgentBase` + +Central agent class that composes SWML rendering, tool dispatch, +prompt management, AI config, and HTTP serving. + +AgentBase extends SWMLService with agent-specific capabilities: + +- Prompt management (POM sections and raw text) +- Tool (SWAIG function) registration & dispatch +- AI configuration (hints, languages, pronunciations, params) +- Verb management (pre/post answer, post-AI) +- Context & step workflows +- Skill integration +- Dynamic configuration via per-request ephemeral copies + +All configuration methods return +self+ for method chaining. + +## Signature + +```ruby +class AgentBase < SignalWire::SWML::Service +``` + +## Inheritance + +**Extends:** [SignalWire::SWML::Service](/docs/sdk-reference/reference/ruby/signal-wire/swml/service) + +## Constants + + + Maximum request body size (1 MB) + + + + The complete set of internal SWAIG function names that accept fillers, matching the SWAIGInternalFiller schema definition. Any name outside this set is silently ignored by the runtime — +set\_internal\_fillers+ and +add\_internal\_filler+ warn if you pass an unknown name. Notable absences: +change\_step+, +gather\_submit+, or arbitrary user-defined SWAIG function names are NOT supported. + + +## Classes + + + + + + \================================================================== Rack Middleware ================================================================== + + + + + +## Methods + +### add\_answer\_verb + +#### Signature + +```ruby +def add_answer_verb(config) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1089. + +*** + +### add\_function\_include + +#### Signature + +```ruby +def add_function_include(url, functions, meta_data: nil) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1053. + +*** + +### add\_hint + +### ================================================================== AI Config methods + +#### Signature + +```ruby +def add_hint(hint) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 749. + +*** + +### add\_hints + +#### Signature + +```ruby +def add_hints(hints) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 754. + +*** + +### add\_internal\_filler + +Add internal fillers for a single internal function and language. + +See +set\_internal\_fillers+ for the complete list of supported ++func\_name+ values (SUPPORTED\_INTERNAL\_FILLER\_NAMES) and what +fillers do. Names outside the supported set log a warning and are +stored but the runtime will not play them. + +#### Signature + +```ruby +def add_internal_filler(func_name, lang_code, fillers) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1030. + +*** + +### add\_language + +Add a language configuration. + +Python parity: `add_language(name, code, voice, speech_fillers=None, +function_fillers=None, engine=None, model=None)`. Ruby supports +both the Python-style positional shape AND the original +`add_language(config)` hash form. + +Voice argument can be either a simple voice id (`"en-US-Neural2-F"`) +or a combined `"engine.voice:model"` string +(`"elevenlabs.josh:eleven_turbo_v2_5"`); the combined form is +parsed into `engine`/`voice`/`model` keys when `engine` +and `model` aren't supplied explicitly. + +#### Signature + + + + ```ruby + add_language(config) + ``` + + + + ```ruby + add_language(name, code, voice, speech_fillers: nil, + ``` + + + +#### Parameters (Overload 1) + + + preformed language config + + +#### Parameters (Overload 2) + + + language name (e.g. `"English"`) + + + + BCP47 language code (e.g. `"en-US"`) + + + + voice id or `engine.voice:model` string + + + + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 844. + +*** + +### add\_mcp\_server + +Add an external MCP server for tool discovery and invocation. + +#### Signature + +```ruby +def add_mcp_server(url, headers: nil, resources: false, resource_vars: nil) +``` + +#### Parameters + + + MCP server HTTP endpoint URL + + + + + + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1406. + +*** + +### add\_pattern\_hint + +Add a complex (pattern-matched) hint. + +Python parity: +`add_pattern_hint(hint, pattern, replace, ignore_case=False)`. +Ruby supports both the Python-style positional form and the +legacy keyword form (`add_pattern_hint(pattern, hint:, language:)`) +for backward compat. + +#### Signature + + + + ```ruby + add_pattern_hint(hint, pattern, replace, ignore_case: false) + ``` + + + + ```ruby + add_pattern_hint(pattern, hint:, language: 'en-US') + ``` + + + +#### Parameters (Overload 1) + + + hint to match + + + + regex pattern + + + + replacement text + + + + +#### Parameters (Overload 2) + + + + + + + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 776. + +*** + +### add\_post\_ai\_verb + +#### Signature + +```ruby +def add_post_ai_verb(verb_name, config) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1104. + +*** + +### add\_post\_answer\_verb + +#### Signature + +```ruby +def add_post_answer_verb(verb_name, config) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1094. + +*** + +### add\_pre\_answer\_verb + +### ================================================================== Verb management + +#### Signature + +```ruby +def add_pre_answer_verb(verb_name, config) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1079. + +*** + +### add\_pronunciation + +#### Signature + +```ruby +def add_pronunciation(phrase, pronunciation, language_code: 'en-US') +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 929. + +*** + +### add\_skill + +Load and register a skill by name. + +#### Signature + +```ruby +def add_skill(skill_name, params = {}) +``` + +#### Parameters + + + + + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1193. + +*** + +### add\_swaig\_query\_params + +#### Signature + +```ruby +def add_swaig_query_params(params) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1282. + +*** + +### agent\_id + +Python parity: + +- `logger` — agent-specific structured logger (Python: `self.log`). +- `skill_manager` — owning SkillManager (Python's `self.skill_manager`). +- `agent_id` — UUID identifier from constructor or auto-generated. +- `default_webhook_url` — base URL for SWAIG webhook fallbacks. +- `native_functions` — names of built-in SWAIG functions to advertise. +- `use_pom` — whether prompt-object-model rendering is enabled. + +#### Signature + +```ruby +attr_reader agent_id -> Object +``` + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 50. + +*** + +### as\_rack\_app + +Return a Rack-compatible application for mounting. + +#### Signature + +```ruby +def rack_app +``` + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1688. + +*** + +### auto\_map\_sip\_usernames + +Automatically register common SIP usernames based on this agent's +name and route. + +Python parity: `AgentBase.auto_map_sip_usernames` derives SIP +usernames from the agent name and route (lower-cased, stripped to +`[a-z0-9_]`) plus a no-vowels variant of the name, registering +each via \{#register\_sip\_username\}. Duplicates are skipped so the +registered set matches Python's set-backed dedup. + +#### Signature + +```ruby +def auto_map_sip_usernames +``` + +#### Returns + +`self` — for method chaining + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1323. + +*** + +### clear\_post\_ai\_verbs + +#### Signature + +```ruby +def clear_post_ai_verbs +``` + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1109. + +*** + +### clear\_post\_answer\_verbs + +#### Signature + +```ruby +def clear_post_answer_verbs +``` + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1099. + +*** + +### clear\_pre\_answer\_verbs + +#### Signature + +```ruby +def clear_pre_answer_verbs +``` + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1084. + +*** + +### clear\_swaig\_query\_params + +#### Signature + +```ruby +def clear_swaig_query_params +``` + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1287. + +*** + +### contexts + +Define / retrieve the ContextBuilder for this agent. + +Python parity: `define_contexts(contexts)` accepts either a +`ContextBuilder` (calls `.to_dict()` to materialise) or a +raw `dict` and stores it on the agent. Ruby supports both +forms PLUS the original lazy-getter idiom: + +1. **Lazy getter** (Ruby idiom) — `agent.define_contexts` + returns the existing builder, creating one if needed. +2. **Override with builder** — `agent.define_contexts(other_cb)` + replaces the current builder with the supplied one (Python + parity). +3. **Override with hash** — `agent.define_contexts({...})` + builds a fresh builder using the provided contexts hash + (Python parity for raw-dict input). + +#### Signature + +```ruby +def define_contexts(contexts = nil) +``` + +#### Returns + +`SignalWire::Contexts::ContextBuilder` — the active builder + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 468. + +*** + +### create\_tool\_token + +Mint a per-call SWAIG-function token via the agent's SessionManager. + +Python parity: state\_mixin.StateMixin#\_create\_tool\_token — +delegates to SessionManager#create\_token and returns "" on any +raised error (Python rescues all exceptions and returns ""). + +#### Signature + +```ruby +def create_tool_token(tool_name, call_id) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 681. + +*** + +### default\_webhook\_url + +Python parity: + +- `logger` — agent-specific structured logger (Python: `self.log`). +- `skill_manager` — owning SkillManager (Python's `self.skill_manager`). +- `agent_id` — UUID identifier from constructor or auto-generated. +- `default_webhook_url` — base URL for SWAIG webhook fallbacks. +- `native_functions` — names of built-in SWAIG functions to advertise. +- `use_pom` — whether prompt-object-model rendering is enabled. + +#### Signature + +```ruby +attr_reader default_webhook_url -> Object +``` + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 50. + +*** + +### define\_contexts + +Define / retrieve the ContextBuilder for this agent. + +Python parity: `define_contexts(contexts)` accepts either a +`ContextBuilder` (calls `.to_dict()` to materialise) or a +raw `dict` and stores it on the agent. Ruby supports both +forms PLUS the original lazy-getter idiom: + +1. **Lazy getter** (Ruby idiom) — `agent.define_contexts` + returns the existing builder, creating one if needed. +2. **Override with builder** — `agent.define_contexts(other_cb)` + replaces the current builder with the supplied one (Python + parity). +3. **Override with hash** — `agent.define_contexts({...})` + builds a fresh builder using the provided contexts hash + (Python parity for raw-dict input). + +#### Signature + +```ruby +def define_contexts(contexts = nil) +``` + +#### Parameters + + + optional override + + +#### Returns + +`SignalWire::Contexts::ContextBuilder` — the active builder + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1137. + +*** + +### define\_tool + +Register a SWAIG tool (function) that the AI can invoke during a +call. + +\== How this becomes a tool the model sees + +A SWAIG function is _exactly the same concept_ as a "tool" in +native OpenAI / Anthropic tool calling. On every LLM turn, the +SDK renders each registered SWAIG function into the OpenAI tool +schema: + +``` +{ + "type": "function", + "function": { + "name": "your_name_here", + "description": "your description text", + "parameters": { ... your JSON schema ... } + } +} +``` + +That schema is sent to the model as part of the same API call +that produces the next assistant message. The model reads: + +- the function +description+ to decide WHEN to call this tool +- each parameter +description+ (inside +parameters+) to decide + HOW to fill in that argument from the user's utterance + +This means _descriptions are prompt engineering_, not developer +comments. A vague description is the #1 cause of "the model has +the right tool but doesn't call it" failures. + +\== Bad vs good descriptions + +BAD : description: "Lookup function" +GOOD: description: "Look up a customer's account details by " \ +"account number. Use this BEFORE quoting " \ +"any account-specific info (balance, plan, " \ +"status). Do not use for general product " \ +"questions." + +BAD : parameters: \{ id: \{ type: 'string', description: 'the id' \} \} +GOOD: parameters: \{ account\_number: \{ type: 'string', +description: "The customer's 8-digit account " \ +"number, no dashes or spaces. Ask the user if they " \ +"don't provide it." \} \} + +\== Tool count matters + +LLM tool selection accuracy degrades past ~7-8 +simultaneously-active tools per call. Use +Contexts::Step#set\_functions to partition tools across steps so +only the relevant subset is active at any moment. + +Define a SWAIG tool. + +Python parity: +`define_tool(name, description, parameters, handler, +secure=True, fillers=None, wait_file=None, wait_file_loops=None, +webhook_url=None, required=None, is_typed_handler=False, **swaig_fields)`. + +#### Signature + +```ruby +def define_tool(name:, description:, parameters: {}, handler: nil, secure: false, fillers: nil, wait_file: nil, wait_file_loops: nil, webhook_url: nil, required: nil, is_typed_handler: false, swaig_fields: nil, &block) +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + +#### Yields + +- `args, raw_data` — the tool handler +- `args, raw_data` — tool handler body (alternative to passing `handler:`) + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 617. + +*** + +### define\_tools + +Return an array of all tool definitions (for SWML rendering). + +#### Signature + +```ruby +def define_tools +``` + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 671. + +*** + +### enable\_debug\_events + +#### Signature + +```ruby +def enable_debug_events(level = 1) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1047. + +*** + +### enable\_debug\_routes + +#### Signature + +```ruby +def enable_debug_routes +``` + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1292. + +*** + +### enable\_mcp\_server + +Expose this agent's tools as an MCP server endpoint at /mcp. + +#### Signature + +```ruby +def enable_mcp_server +``` + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1418. + +*** + +### enable\_sip\_routing + +### ================================================================== SIP + +#### Signature + +```ruby +def enable_sip_routing(auto_map: true, path: '/sip') +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1301. + +*** + +### extract\_sip\_username + +Extract a SIP username from a SIP URI string. + +Parses URIs of the form "sip:user@domain" and returns the user part. +Handles optional "sip:" or "sips:" scheme prefixes. + +#### Signature + +```ruby +def extract_sip_username(sip_uri) +``` + +#### Parameters + + + a SIP URI, e.g. "sip:alice@example.com" + + +#### Returns + +`String | nil` — the username, or nil if the URI cannot be parsed + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1352. + +*** + +### extract\_sip\_username\_from\_request + +Extract the SIP username from request body data. + +Looks for SIP URI in common request body fields +(e.g., "to", "from", "sip\_uri", "call.to", "call.from"). + +#### Signature + +```ruby +def extract_sip_username_from_request(request_data) +``` + +#### Parameters + + + the parsed request body + + +#### Returns + +`String | nil` — the extracted SIP username, or nil + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1375. + +*** + +### function\_includes= + +#### Signature + +```ruby +def function_includes=(includes) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 470. + +*** + +### get\_basic\_auth\_credentials + +Get the configured basic-auth credentials. + +Python parity: `get_basic_auth_credentials(include_source=False)`. +When `include_source` is true, returns a 3-tuple `[user, +pass, source]` (`"environment"` / `"auto-generated"` / +`"provided"`). Otherwise returns `[user, pass]`. + +#### Signature + +```ruby +def get_basic_auth_credentials(include_source: false) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1769. + +*** + +### get\_language\_params + +Read the per-language `params` hash for a previously-added +language. + +#### Signature + +```ruby +def get_language_params(code) +``` + +#### Parameters + + + language code as previously passed to `add_language`. + + +#### Returns + +`Hash | nil` — the params hash if set, `nil` otherwise (including when the code is unknown). + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 917. + +*** + +### global\_data= + +#### Signature + +```ruby +def global_data=(data) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 474. + +*** + +### handle\_additional\_route + +#### Signature + +```ruby +def handle_additional_route(sub_path, request_data, env) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 2118. + +*** + +### has\_skill? + +#### Signature + +```ruby +def has_skill?(skill_name) +``` + +#### Parameters + + + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1254. + +*** + +### initialize + +*** + +#### Construction + +#### Signature + +```ruby +def initialize(name: 'agent', route: '/', host: '0.0.0.0', port: nil, basic_auth: nil, use_pom: true, token_expiry_secs: 3600, auto_answer: true, record_call: false, record_format: 'mp4', record_stereo: true, default_webhook_url: nil, agent_id: nil, native_functions: nil, schema_path: nil, suppress_logs: false, enable_post_prompt_override: false, check_for_input_override: false, config_file: nil, schema_validation: true, signing_key: nil, trust_proxy_for_signature: false) +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`AgentBase` — a new instance of AgentBase + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 60. + +*** + +### internal\_fillers= + +#### Signature + +```ruby +def internal_fillers=(fillers) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 478. + +*** + +### languages= + +#### Signature + +```ruby +def languages=(languages) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 482. + +*** + +### list\_skills + +#### Signature + +```ruby +def list_skills +``` + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1250. + +*** + +### list\_tool\_names + +Return the names of all registered SWAIG tools in insertion +order. Used by ContextBuilder#validate! to detect collisions with +reserved native tool names. + +#### Signature + +```ruby +def list_tool_names +``` + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1184. + +*** + +### logger + +Python parity: + +- `logger` — agent-specific structured logger (Python: `self.log`). +- `skill_manager` — owning SkillManager (Python's `self.skill_manager`). +- `agent_id` — UUID identifier from constructor or auto-generated. +- `default_webhook_url` — base URL for SWAIG webhook fallbacks. +- `native_functions` — names of built-in SWAIG functions to advertise. +- `use_pom` — whether prompt-object-model rendering is enabled. + +#### Signature + +```ruby +attr_reader logger -> Object +``` + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 50. + +*** + +### manual\_set\_proxy\_url + +#### Signature + +```ruby +def manual_set_proxy_url(url) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1267. + +*** + +### native\_functions + +Python parity: + +- `logger` — agent-specific structured logger (Python: `self.log`). +- `skill_manager` — owning SkillManager (Python's `self.skill_manager`). +- `agent_id` — UUID identifier from constructor or auto-generated. +- `default_webhook_url` — base URL for SWAIG webhook fallbacks. +- `native_functions` — names of built-in SWAIG functions to advertise. +- `use_pom` — whether prompt-object-model rendering is enabled. + +#### Signature + +```ruby +attr_accessor native_functions <-> Object +``` + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 50. + +*** + +### native\_functions= + +#### Signature + +```ruby +attr_accessor native_functions= <-> Object +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 486. + +*** + +### on\_debug\_event + +#### Signature + +```ruby +def on_debug_event(&block) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1560. + +*** + +### on\_function\_call + +Dispatch a function call to the registered handler. + +#### Signature + +```ruby +def on_function_call(name, args, raw_data) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 701. + +*** + +### on\_summary + +Python parity: `on_summary(self, summary, raw_data=None)` is a +virtual hook called when a post-prompt summary is received. +Ruby supports two equivalent shapes: + +1. **Registration** (Ruby idiom) — pass a block to install a + callback. The block receives `(summary, raw_data)` when a + summary is delivered. `on_summary { |sum, raw| ... }` +2. **Override** (Python idiom) — subclass and override + `on_summary(summary, raw_data = nil)`. Default + implementation calls the registered block (if any) and + otherwise no-ops. + +#### Signature + +```ruby +def on_summary(summary = nil, raw_data = nil, &block) +``` + +#### Parameters + + + the post-prompt summary + + + + the complete raw POST data + + + + +#### Yields + +- `summary, raw_data` — optional callback registration + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1550. + +*** + +### params= + +#### Signature + +```ruby +def params=(params) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 490. + +*** + +### pom + +Read-only snapshot of the agent's POM as a typed +\{SignalWire::POM::PromptObjectModel\} instance. + +Python parity: `agent.pom` instance attribute (agent\_base.py +line 209) is a `PromptObjectModel` instance. Returns `nil` when +raw-text prompt mode is in effect (`set_prompt_text` was called) +— mirrors Python's `self.pom = None when use_pom=False`. + +The returned PromptObjectModel is a fresh build of the agent's +current section state, so caller mutations do not leak into agent +state. Use `agent.pom.to_h` to retrieve the legacy +array-of-hashes representation. + +#### Signature + +```ruby +def pom +``` + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 373. + +*** + +### post\_prompt + +Returns the post-prompt text whatever set\_post\_prompt stored, or +nil when no post-prompt has been set. + +Mirrors Python's PromptManager#get\_post\_prompt / +PromptMixin#get\_post\_prompt — used by SWML rendering when a +post-prompt is configured. +Post-prompt text. Clean symmetric reader/writer pair — the showcase case. + +#### Signature + +```ruby +def get_post_prompt +``` + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 451. + +*** + +### post\_prompt\_url= + +#### Signature + +```ruby +def post_prompt_url=(url) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 494. + +*** + +### post\_prompt= + +#### Signature + +```ruby +def post_prompt=(text) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 452. + +*** + +### prompt + +Return the current prompt: either a string (text mode) or an array (POM). +Reader: the effective prompt (string in text mode, POM array otherwise). +Alias of #get\_prompt. Reader-only — `get_prompt` is a _computed_ getter +(raw text vs POM), so there is no symmetric writer; set the raw text via +\#prompt\_text= or build a POM. This raw-vs-rendered asymmetry is the main +edge case the migration doc calls out. + +#### Signature + +```ruby +def get_prompt +``` + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 440. + +*** + +### prompt\_add\_section + +Add a POM section. + +Python parity: +`prompt_add_section(title, body="", bullets=None, +numbered=False, numbered_bullets=False, subsections=None)`. + +#### Signature + +```ruby +def prompt_add_section(title, body = nil, bullets: nil, numbered: false, numbered_bullets: false, subsections: nil) +``` + +#### Parameters + + + section title + + + + optional body text + + + + + + + + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 270. + +*** + +### prompt\_add\_subsection + +Add a subsection under a parent section. + +#### Signature + +```ruby +def prompt_add_subsection(parent_title, title, body = nil, bullets: nil) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 334. + +*** + +### prompt\_add\_to\_section + +Append content to an existing POM section, creating it if absent. + +Python parity: +`prompt_add_to_section(title, body=None, bullet=None, +bullets=None)`. Supports appending body text, a single bullet, +or a list of bullets. + +**Backwards compat:** the original Ruby signature was +`prompt_add_to_section(title, text)`. When called with two +positional arguments the second becomes `body`; this preserves +existing call sites while still supporting Python's keyword form. + +#### Signature + +```ruby +def prompt_add_to_section(title, body_arg = nil, body: nil, bullet: nil, bullets: nil) +``` + +#### Parameters + + + section title + + + + + + + + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 310. + +*** + +### prompt\_has\_section? + +Check whether a POM section with the given title exists. + +#### Signature + +```ruby +def prompt_has_section?(title) +``` + +#### Parameters + + + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 347. + +*** + +### prompt\_pom= + +#### Signature + +```ruby +def prompt_pom=(pom) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 498. + +*** + +### prompt\_text + +Returns the raw prompt text whatever set\_prompt\_text stored, or +nil when no raw prompt has been set. Distinct from #get\_prompt +which may return the POM array when use\_pom is true. + +Mirrors Python's PromptManager#get\_raw\_prompt. +Raw prompt text (whatever #set\_prompt\_text stored). Symmetric pair. + +#### Signature + +```ruby +def get_raw_prompt +``` + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 443. + +*** + +### prompt\_text= + +Writer returns the assigned value (Ruby `=` semantics), not self, so it +can't chain — but `=` writers are never chained anyway. + +#### Signature + +```ruby +def prompt_text=(text) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 446. + +*** + +### pronunciations= + +#### Signature + +```ruby +def pronunciations=(pronunciations) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 502. + +*** + +### rack\_app + +Return a Rack-compatible application for mounting. + +#### Signature + +```ruby +def rack_app +``` + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1684. + +*** + +### register\_sip\_username + +#### Signature + +```ruby +def register_sip_username(username) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1308. + +*** + +### register\_swaig\_function + +Register a raw SWAIG function definition (e.g. from DataMap#to\_swaig\_function). + +#### Signature + +```ruby +def register_swaig_function(func_def) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 663. + +*** + +### remove\_skill + +#### Signature + +```ruby +def remove_skill(skill_name) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1244. + +*** + +### render\_swml + +Build the complete SWML document hash. + +#### Signature + +```ruby +def render_swml(request_data = nil, request: nil) +``` + +#### Parameters + + + parsed request body + + + + +#### Returns + +`Hash` + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1699. + +*** + +### reset\_contexts + +Remove all contexts, returning the agent to a no-contexts state. +This is a convenience wrapper around +define\_contexts.reset+. +Use it in a dynamic config callback when you need to rebuild +contexts from scratch for a specific request. + +#### Signature + +```ruby +def reset_contexts +``` + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1176. + +*** + +### run + +Universal run method — mirrors Python's +`WebMixin.run(event=None, context=None, force_mode=None, +host=None, port=None)`. + +Detects execution mode (server / lambda / cgi) and routes +accordingly. `force_mode` overrides auto-detection. + +#### Signature + +```ruby +def run(event: nil, context: nil, force_mode: nil, host: nil, port: nil) +``` + +#### Parameters + + + + + + + + + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1578. + +*** + +### serve + +Start the HTTP server (blocking). + +Python parity: `serve(host=None, port=None)`. `host` / +`port` overrides default to constructor-supplied values. + +#### Signature + +```ruby +def serve(host: nil, port: nil) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1644. + +*** + +### set\_dynamic\_config\_callback + +### ================================================================== Web / HTTP configuration + +#### Signature + +```ruby +def set_dynamic_config_callback(callable = nil, &block) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1262. + +*** + +### set\_function\_includes + +#### Signature + +```ruby +def set_function_includes(includes) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1060. + +*** + +### set\_global\_data + +#### Signature + +```ruby +def set_global_data(data) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 953. + +*** + +### set\_internal\_fillers + +Set internal fillers for native SWAIG functions. + +Internal fillers are short phrases the AI agent speaks (via TTS) +while an internal/native function is running, so the caller +doesn't hear dead air during transitions or background work. + +Supported function names (match the SWAIGInternalFiller schema): ++hangup+, +check\_time+, +wait\_for\_user+, +wait\_seconds+, ++adjust\_response\_latency+, +next\_step+, +change\_context+, ++get\_visual\_input+, +get\_ideal\_strategy+. See +SUPPORTED\_INTERNAL\_FILLER\_NAMES. + +Notably NOT supported: +change\_step+, +gather\_submit+, or +arbitrary user-defined SWAIG function names. The runtime only +honors fillers for the names listed above; everything else is +silently ignored at the SWML level. This method warns at +registration time if you pass an unknown name so you catch the +typo early. + +Expected format: +\{ function\_name => \{ language\_code => \[phrases] \} \}+ + +#### Signature + +```ruby +def set_internal_fillers(fillers) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1008. + +*** + +### set\_language\_params + +Set (or replace) the per-language `params` dict on an +already-added language. Useful when language entries are built up +via add\_language first and engine-specific tuning is added later +(e.g. from a config loader). Returns self for chaining. + +#### Signature + +```ruby +def set_language_params(code, params) +``` + +#### Parameters + + + language code as previously passed to `add_language` (e.g. `"en-US"`). + + + + engine-specific params hash to attach. Empty hash removes the key. + + +#### Returns + +`self` — No-op if the code isn't found. + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 898. + +*** + +### set\_languages + +#### Signature + +```ruby +def set_languages(languages) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 924. + +*** + +### set\_native\_functions + +#### Signature + +```ruby +def set_native_functions(names) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 962. + +*** + +### set\_param + +#### Signature + +```ruby +def set_param(key, value) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 941. + +*** + +### set\_params + +#### Signature + +```ruby +def set_params(params) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 946. + +*** + +### set\_post\_prompt + +Set post-prompt text. + +#### Signature + +```ruby +def set_post_prompt(text) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 244. + +*** + +### set\_post\_prompt\_llm\_params + +#### Signature + +```ruby +def set_post_prompt_llm_params(**params) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1070. + +*** + +### set\_post\_prompt\_url + +#### Signature + +```ruby +def set_post_prompt_url(url) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1277. + +*** + +### set\_prompt\_llm\_params + +#### Signature + +```ruby +def set_prompt_llm_params(**params) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1065. + +*** + +### set\_prompt\_pom + +Set POM array directly. + +#### Signature + +```ruby +def set_prompt_pom(pom) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 250. + +*** + +### set\_prompt\_text + +Set prompt as raw text. Clears any POM state. + +#### Signature + +```ruby +def set_prompt_text(text) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 236. + +*** + +### set\_pronunciations + +#### Signature + +```ruby +def set_pronunciations(pronunciations) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 936. + +*** + +### set\_web\_hook\_url + +#### Signature + +```ruby +def set_web_hook_url(url) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1272. + +*** + +### signing\_key + +Python parity: + +- `logger` — agent-specific structured logger (Python: `self.log`). +- `skill_manager` — owning SkillManager (Python's `self.skill_manager`). +- `agent_id` — UUID identifier from constructor or auto-generated. +- `default_webhook_url` — base URL for SWAIG webhook fallbacks. +- `native_functions` — names of built-in SWAIG functions to advertise. +- `use_pom` — whether prompt-object-model rendering is enabled. + +#### Signature + +```ruby +attr_reader signing_key -> Object +``` + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 50. + +*** + +### skill\_manager + +Python parity: + +- `logger` — agent-specific structured logger (Python: `self.log`). +- `skill_manager` — owning SkillManager (Python's `self.skill_manager`). +- `agent_id` — UUID identifier from constructor or auto-generated. +- `default_webhook_url` — base URL for SWAIG webhook fallbacks. +- `native_functions` — names of built-in SWAIG functions to advertise. +- `use_pom` — whether prompt-object-model rendering is enabled. + +#### Signature + +```ruby +attr_reader skill_manager -> Object +``` + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 50. + +*** + +### update\_global\_data + +#### Signature + +```ruby +def update_global_data(data) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 958. + +*** + +### use\_pom + +Python parity: + +- `logger` — agent-specific structured logger (Python: `self.log`). +- `skill_manager` — owning SkillManager (Python's `self.skill_manager`). +- `agent_id` — UUID identifier from constructor or auto-generated. +- `default_webhook_url` — base URL for SWAIG webhook fallbacks. +- `native_functions` — names of built-in SWAIG functions to advertise. +- `use_pom` — whether prompt-object-model rendering is enabled. + +#### Signature + +```ruby +attr_reader use_pom -> Object +``` + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 50. + +*** + +### validate\_tool\_token + +Validate a per-call SWAIG-function token. Returns false when the +function is not registered, when the SessionManager rejects the +token, or on any underlying exception. + +Python parity: state\_mixin.StateMixin#validate\_tool\_token — +rejects unknown function names up-front and rescues exceptions. + +#### Signature + +```ruby +def validate_tool_token(function_name, token, call_id) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 693. + +*** + +### web\_hook\_url= + +#### Signature + +```ruby +def web_hook_url=(url) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 506. + +## Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 42. diff --git a/fern/products/sdk-reference/ruby/signal-wire/agent-server/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/agent-server/index.mdx new file mode 100644 index 0000000000..c39666840f --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/agent-server/index.mdx @@ -0,0 +1,487 @@ +--- +slug: "/reference/ruby/signal-wire/agent-server" +title: "AgentServer" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::AgentServer" + parent: "SignalWire" + module: "SignalWire" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/server/agent_server.rb" + visibility: "public" +--- +# `AgentServer` + +Multi-agent hosting on a single Rack application. + +server = AgentServer.new(host: '0.0.0.0', port: 3000) +server.register(my\_agent, route: '/agent1') +server.register(my\_agent2, route: '/agent2') +server.run + +## Signature + +```ruby +class AgentServer < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Constants + + + MIME types for static file serving. + + + + Security headers applied to static file responses. + + +## Methods + +### app + +Public Rack application — Python parity: `server.app` exposes +the underlying FastAPI instance. Ruby exposes the cached Rack +app (a Proc) so callers can mount it on their own server or +pass it to Rack-compatible test harnesses. + +#### Signature + +```ruby +def app +``` + +#### Source + +[`lib/signalwire/server/agent_server.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/server/agent_server.rb) + +Line 27. + +*** + +### get\_agent + +Get a specific agent by route. + +#### Signature + +```ruby +def get_agent(route) +``` + +#### Parameters + + + +#### Returns + +`Object | nil` + +#### Source + +[`lib/signalwire/server/agent_server.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/server/agent_server.rb) + +Line 154. + +*** + +### get\_agents + +Get all registered agents. + +#### Signature + +```ruby +def get_agents +``` + +#### Returns + +`Hash` — route => agent + +#### Source + +[`lib/signalwire/server/agent_server.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/server/agent_server.rb) + +Line 147. + +*** + +### host + +Returns the value of attribute host. + +#### Signature + +```ruby +attr_reader host -> Object +``` + +#### Source + +[`lib/signalwire/server/agent_server.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/server/agent_server.rb) + +Line 21. + +*** + +### initialize + +Construct an AgentServer. + +Python parity: `AgentServer(host, port, log_level)` — +`log_level` controls the AgentServer's logger verbosity. The +Ruby port maps it through `SignalWire::Logging.logger` so the +WARN/INFO/DEBUG semantics match Python's `logging` levels. + +#### Signature + +```ruby +def initialize(host: '0.0.0.0', port: 3000, log_level: 'info') +``` + +#### Parameters + + + + + + + +#### Returns + +`AgentServer` — a new instance of AgentServer + +#### Source + +[`lib/signalwire/server/agent_server.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/server/agent_server.rb) + +Line 74. + +*** + +### log\_level + +Returns the value of attribute log\_level. + +#### Signature + +```ruby +attr_reader log_level -> Object +``` + +#### Source + +[`lib/signalwire/server/agent_server.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/server/agent_server.rb) + +Line 21. + +*** + +### logger + +Returns the value of attribute logger. + +#### Signature + +```ruby +attr_reader logger -> Object +``` + +#### Source + +[`lib/signalwire/server/agent_server.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/server/agent_server.rb) + +Line 21. + +*** + +### port + +Returns the value of attribute port. + +#### Signature + +```ruby +attr_reader port -> Object +``` + +#### Source + +[`lib/signalwire/server/agent_server.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/server/agent_server.rb) + +Line 21. + +*** + +### rack\_app + +Build a Rack application that routes requests to the appropriate agent. + +#### Signature + +```ruby +def rack_app +``` + +#### Returns + +`Proc` — a Rack-compatible app + +#### Source + +[`lib/signalwire/server/agent_server.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/server/agent_server.rb) + +Line 340. + +*** + +### register + +Register an agent at a given route. + +#### Signature + +```ruby +def register(agent, route: nil) +``` + +#### Parameters + + + an agent object (e.g. AgentBase or prefab) + + + + +#### Source + +[`lib/signalwire/server/agent_server.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/server/agent_server.rb) + +Line 126. + +*** + +### register\_global\_routing\_callback + +Register a routing callback across all agents. + +Python parity: +`AgentServer.register_global_routing_callback(callback_fn, path)`. +Adds unified routing logic to every registered agent at the same +path. The +path+ is normalized (leading slash ensured, trailing +slash stripped) and the callback is registered on each agent that +exposes +register\_routing\_callback+. + +The callback may be supplied either as a Ruby block or as a +callable (Proc/lambda) +callback\_fn+ positional argument, matching +Python's function-valued first parameter. + +#### Signature + +```ruby +def register_global_routing_callback(callback_fn = nil, path:, &block) +``` + +#### Parameters + + + the routing callback (Proc/lambda) + + + + + + +#### Returns + +`self` + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/server/agent_server.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/server/agent_server.rb) + +Line 191. + +*** + +### register\_sip\_username + +Register a SIP username mapping to a route. + +#### Signature + +```ruby +def register_sip_username(username, route) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/server/agent_server.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/server/agent_server.rb) + +Line 209. + +*** + +### run + +Universal run method — mirrors Python's +`AgentServer.run(event=None, context=None, host=None, port=None)`. + +Detects execution mode and routes appropriately: + +- **Server mode** — starts WEBrick (Ruby's stdlib HTTP server) + bound to `host`/`port` (overrides honoured if supplied). +- **Lambda mode** (`AWS_LAMBDA_FUNCTION_NAME` env var present) + — invokes `_handle_lambda_request(event, context)` and + returns the Lambda response Hash. +- **CGI mode** (`GATEWAY_INTERFACE` env var present) — invokes + `_handle_cgi_request` and returns the CGI response String. + +#### Signature + +```ruby +def run(event: nil, context: nil, host: nil, port: nil) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`Object | nil` — response for serverless modes, nil for server mode (blocking until shutdown). + +#### Source + +[`lib/signalwire/server/agent_server.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/server/agent_server.rb) + +Line 249. + +*** + +### serve\_static\_files + +Serve static files from a directory at a given route. + +#### Signature + +```ruby +def serve_static_files(directory, route) +``` + +#### Parameters + + + absolute or relative path to the directory + + + + the URL prefix to serve files at + + +#### Returns + +`self` + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/server/agent_server.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/server/agent_server.rb) + +Line 220. + +*** + +### setup\_sip\_routing + +Set up SIP-based routing. + +#### Signature + +```ruby +def setup_sip_routing(route: '/sip', auto_map: true) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/server/agent_server.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/server/agent_server.rb) + +Line 162. + +*** + +### unregister + +Unregister an agent by route. + +#### Signature + +```ruby +def unregister(route) +``` + +#### Parameters + + + +#### Returns + +`Object | nil` — the removed agent + +#### Source + +[`lib/signalwire/server/agent_server.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/server/agent_server.rb) + +Line 140. + +## Source + +[`lib/signalwire/server/agent_server.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/server/agent_server.rb) + +Line 20. diff --git a/fern/products/sdk-reference/ruby/signal-wire/contexts/context-builder/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/contexts/context-builder/index.mdx new file mode 100644 index 0000000000..7f7b63238e --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/contexts/context-builder/index.mdx @@ -0,0 +1,231 @@ +--- +slug: "/reference/ruby/signal-wire/contexts/context-builder" +title: "ContextBuilder" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Contexts::ContextBuilder" + parent: "SignalWire::Contexts" + module: "SignalWire.Contexts" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb" + visibility: "public" +--- +# `ContextBuilder` + +Builder for multi-step, multi-context AI agent workflows. + +A ContextBuilder owns one or more Contexts; each Context owns an +ordered list of Steps. Only one context and one step is active at +a time. Per chat turn, the runtime injects the current step's +instructions as a system message, then asks the LLM for a +response. + +\== Native tools auto-injected by the runtime + +When a step (or its enclosing context) declares +valid\_steps+ or ++valid\_contexts+, the runtime auto-injects two native tools so +the model can navigate the flow: + +- +next\_step(step: enum)+ — present when valid\_steps is set +- +change\_context(context: enum)+ — present when valid\_contexts is set + +Their +enum+ schemas are rewritten on every turn to match +whatever valid\_steps / valid\_contexts apply to the current step. +You do NOT need to define these tools yourself; they appear +automatically. + +A third native tool — +gather\_submit+ — is injected during +gather\_info questioning (see Step#set\_gather\_info / +Step#add\_gather\_question). + +These three names — +next\_step+, +change\_context+, ++gather\_submit+ — are reserved. +validate!+ will reject any agent +that defines a SWAIG tool with one of these names. See +RESERVED\_NATIVE\_TOOL\_NAMES. + +\== Function whitelisting (Step#set\_functions) + +Each step may declare a +functions+ whitelist. The whitelist is +applied in-memory at the start of each LLM turn. CRITICALLY: if a +step does NOT declare a +functions+ field, it INHERITS the +previous step's active set. See Step#set\_functions for details +and examples. + +## Signature + +```ruby +class ContextBuilder < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### add\_context + +Add a new context. Returns the Context object. + +#### Signature + +```ruby +def add_context(name) +``` + +#### Parameters + + + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 804. + +*** + +### attach\_agent + +Attach an agent reference so +validate!+ can check +user-defined tool names against RESERVED\_NATIVE\_TOOL\_NAMES. +Called internally by AgentBase#define\_contexts. + +#### Signature + +```ruby +def attach_agent(agent) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 789. + +*** + +### get\_context + +Get an existing context by name. Returns Context or nil. + +#### Signature + +```ruby +def get_context(name) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 815. + +*** + +### initialize + +Python parity: `ContextBuilder.__init__(self, agent)` accepts +an owning agent so `validate!` can introspect registered +SWAIG tools when checking for reserved-name collisions. +Ruby allows nil for standalone use (tests, idiom of building +a builder before attaching). + +#### Signature + +```ruby +def initialize(agent = nil) +``` + +#### Parameters + + + +#### Returns + +`ContextBuilder` — a new instance of ContextBuilder + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 780. + +*** + +### reset + +Remove all contexts, returning the builder to its initial state. +Use this in a dynamic config callback when you need to rebuild +contexts from scratch for a specific request. + +#### Signature + +```ruby +def reset +``` + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 797. + +*** + +### to\_h + +#### Signature + +```ruby +def to_h +``` + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 954. + +*** + +### validate! + +Validate the full configuration. Raises ArgumentError on problems. + +#### Signature + +```ruby +def validate! +``` + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 820. + +## Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 774. diff --git a/fern/products/sdk-reference/ruby/signal-wire/contexts/context/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/contexts/context/index.mdx new file mode 100644 index 0000000000..3ffe0d16e8 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/contexts/context/index.mdx @@ -0,0 +1,929 @@ +--- +slug: "/reference/ruby/signal-wire/contexts/context" +title: "Context" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Contexts::Context" + parent: "SignalWire::Contexts" + module: "SignalWire.Contexts" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb" + visibility: "public" +--- +# `Context` + +Represents a single context containing multiple steps. + +## Signature + +```ruby +class Context < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### \_initial\_step + +#### Signature + +```ruby +def _initial_step +``` + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 709. + +*** + +### \_step\_order + +#### Signature + +```ruby +def _step_order +``` + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 708. + +*** + +### add\_bullets + +Add a POM section with bullets to the context prompt. + +#### Signature + +```ruby +def add_bullets(title, bullets) +``` + +#### Parameters + + + + + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 568. + +*** + +### add\_enter\_filler + +#### Signature + +```ruby +def add_enter_filler(lang_code, fillers) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 601. + +*** + +### add\_exit\_filler + +#### Signature + +```ruby +def add_exit_filler(lang_code, fillers) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 609. + +*** + +### add\_section + +Add a POM section to the context prompt. + +#### Signature + +```ruby +def add_section(title, body) +``` + +#### Parameters + + + + + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 560. + +*** + +### add\_step + +Add a new step. Returns the new Step object (not self). + +Python parity: `Context.add_step(name, *, task=None, bullets=None, +criteria=None, functions=None, valid_steps=None)`. The optional +keyword arguments give a one-call configuration shortcut: + +ctx.add\_step("greet", +task: "Greet the caller", +bullets: \["Say hi", "Ask how can I help"], +criteria: "User has been greeted", +functions: \["weather"], +valid\_steps: \["help"]) + +Without the optional args this stays the bare `add_step("greet")` +form that returns a Step for further fluent configuration. + +#### Signature + +```ruby +def add_step(name, task: nil, bullets: nil, criteria: nil, functions: nil, valid_steps: nil) +``` + +#### Parameters + + + + + + + + + + + + + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 440. + +*** + +### add\_system\_bullets + +Add a POM section with bullets to the system prompt. + +#### Signature + +```ruby +def add_system_bullets(title, bullets) +``` + +#### Parameters + + + + + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 584. + +*** + +### add\_system\_section + +Add a POM section to the system prompt. + +#### Signature + +```ruby +def add_system_section(title, body) +``` + +#### Parameters + + + + + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 576. + +*** + +### consolidate= + +#### Signature + +```ruby +def consolidate=(v) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 681. + +*** + +### enter\_fillers= + +#### Signature + +```ruby +def enter_fillers=(v) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 697. + +*** + +### exit\_fillers= + +#### Signature + +```ruby +def exit_fillers=(v) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 701. + +*** + +### full\_reset= + +#### Signature + +```ruby +def full_reset=(v) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 685. + +*** + +### get\_step + +Get an existing step by name. Returns Step or nil. + +#### Signature + +```ruby +def get_step(name) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 459. + +*** + +### initial\_step= + +\--- Idiomatic Ruby accessors (additive aliases over the get\_/set\_ originals) --- + +Writers use the block `def x=(v); set_x(v); end` form so the RHS is +returned (Ruby `=` semantics), not `self`. The chainable `set_*` +originals stay available and untouched. + +Skipped: get\_step / get\_context (take a required `name` arg — lookups, +not bare accessors). + +#### Signature + +```ruby +def initial_step=(v) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 657. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(name) +``` + +#### Parameters + + + +#### Returns + +`Context` — a new instance of Context + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 397. + +*** + +### isolated= + +#### Signature + +```ruby +def isolated=(v) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 693. + +*** + +### move\_step + +Move an existing step to a specific position. Returns self. + +#### Signature + +```ruby +def move_step(name, position) +``` + +#### Parameters + + + + + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 473. + +*** + +### name + +Returns the value of attribute name. + +#### Signature + +```ruby +attr_reader name -> Object +``` + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 395. + +*** + +### post\_prompt= + +#### Signature + +```ruby +def post_prompt=(v) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 669. + +*** + +### prompt= + +#### Signature + +```ruby +def prompt=(v) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 677. + +*** + +### remove\_step + +Remove a step by name. Returns self. + +#### Signature + +```ruby +def remove_step(name) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 464. + +*** + +### set\_consolidate + +#### Signature + +```ruby +def set_consolidate(val) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 521. + +*** + +### set\_enter\_fillers + +#### Signature + +```ruby +def set_enter_fillers(fillers) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 591. + +*** + +### set\_exit\_fillers + +#### Signature + +```ruby +def set_exit_fillers(fillers) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 596. + +*** + +### set\_full\_reset + +#### Signature + +```ruby +def set_full_reset(val) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 526. + +*** + +### set\_initial\_step + +Set which step the context starts on when entered. + +By default, a context starts on its first step (index 0). Use +this to skip a preamble step on re-entry via +change\_context+. + +#### Signature + +```ruby +def set_initial_step(step_name) +``` + +#### Parameters + + + name of the step to start on. + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 487. + +*** + +### set\_isolated + +Mark this context as isolated — entering it wipes conversation +history. + +When +val+ = true and the context is entered via change\_context, +the runtime wipes the conversation array. The model starts +fresh with only the new context's system\_prompt + step +instructions, with no memory of prior turns. + +EXCEPTION — reset overrides the wipe: +If the context also has a reset configuration (via ++set\_consolidate+ or +set\_full\_reset+), the wipe is skipped in +favor of the reset behavior. Use reset with consolidate=true +to summarize prior history into a single message instead of +dropping it entirely. + +Use cases: switching to a sensitive billing flow that should +not see prior small-talk; handing off to a different agent +persona; resetting after a long off-topic detour. + +#### Signature + +```ruby +def set_isolated(val) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 554. + +*** + +### set\_post\_prompt + +#### Signature + +```ruby +def set_post_prompt(prompt) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 502. + +*** + +### set\_prompt + +#### Signature + +```ruby +def set_prompt(prompt) +``` + +#### Parameters + + + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 514. + +*** + +### set\_system\_prompt + +#### Signature + +```ruby +def set_system_prompt(prompt) +``` + +#### Parameters + + + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 507. + +*** + +### set\_user\_prompt + +#### Signature + +```ruby +def set_user_prompt(prompt) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 531. + +*** + +### set\_valid\_contexts + +#### Signature + +```ruby +def set_valid_contexts(contexts) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 492. + +*** + +### set\_valid\_steps + +#### Signature + +```ruby +def set_valid_steps(steps) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 497. + +*** + +### system\_prompt= + +#### Signature + +```ruby +def system_prompt=(v) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 673. + +*** + +### to\_h + +#### Signature + +```ruby +def to_h +``` + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 617. + +*** + +### user\_prompt= + +#### Signature + +```ruby +def user_prompt=(v) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 689. + +*** + +### valid\_contexts= + +#### Signature + +```ruby +def valid_contexts=(v) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 661. + +*** + +### valid\_steps= + +#### Signature + +```ruby +def valid_steps=(v) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 665. + +## Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 394. diff --git a/fern/products/sdk-reference/ruby/signal-wire/contexts/gather-info/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/contexts/gather-info/index.mdx new file mode 100644 index 0000000000..a745481c67 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/contexts/gather-info/index.mdx @@ -0,0 +1,252 @@ +--- +slug: "/reference/ruby/signal-wire/contexts/gather-info" +title: "GatherInfo" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Contexts::GatherInfo" + parent: "SignalWire::Contexts" + module: "SignalWire.Contexts" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb" + visibility: "public" +--- +# `GatherInfo` + +Configuration for gathering information in a step via the C-side gather\_info system. + +## Signature + +```ruby +class GatherInfo < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### add\_question + +Add a question. Returns +self+ for chaining. + +#### Signature + +```ruby +def add_question(key:, question:, **opts) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 63. + +*** + +### completion\_action + +Returns the value of attribute completion\_action. + +#### Signature + +```ruby +attr_accessor completion_action <-> Object +``` + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 52. + +*** + +### completion\_action= + +Sets the attribute completion\_action + +#### Signature + +```ruby +attr_accessor completion_action= <-> Object +``` + +#### Parameters + + + the value to set the attribute completion\_action to. + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 52. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(output_key: nil, completion_action: nil, prompt: nil) +``` + +#### Parameters + + + + + + + +#### Returns + +`GatherInfo` — a new instance of GatherInfo + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 55. + +*** + +### output\_key + +Returns the value of attribute output\_key. + +#### Signature + +```ruby +attr_accessor output_key <-> Object +``` + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 52. + +*** + +### output\_key= + +Sets the attribute output\_key + +#### Signature + +```ruby +attr_accessor output_key= <-> Object +``` + +#### Parameters + + + the value to set the attribute output\_key to. + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 52. + +*** + +### prompt + +Returns the value of attribute prompt. + +#### Signature + +```ruby +attr_accessor prompt <-> Object +``` + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 52. + +*** + +### prompt= + +Sets the attribute prompt + +#### Signature + +```ruby +attr_accessor prompt= <-> Object +``` + +#### Parameters + + + the value to set the attribute prompt to. + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 52. + +*** + +### questions + +Returns the value of attribute questions. + +#### Signature + +```ruby +attr_reader questions -> Object +``` + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 53. + +*** + +### to\_h + +#### Signature + +```ruby +def to_h +``` + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 75. + +## Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 51. diff --git a/fern/products/sdk-reference/ruby/signal-wire/contexts/gather-question/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/contexts/gather-question/index.mdx new file mode 100644 index 0000000000..52cf0d0651 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/contexts/gather-question/index.mdx @@ -0,0 +1,336 @@ +--- +slug: "/reference/ruby/signal-wire/contexts/gather-question" +title: "GatherQuestion" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Contexts::GatherQuestion" + parent: "SignalWire::Contexts" + module: "SignalWire.Contexts" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb" + visibility: "public" +--- +# `GatherQuestion` + +Represents a single question in a gather\_info configuration. + +## Signature + +```ruby +class GatherQuestion < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### confirm + +Returns the value of attribute confirm. + +#### Signature + +```ruby +attr_accessor confirm <-> Object +``` + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 29. + +*** + +### confirm= + +Sets the attribute confirm + +#### Signature + +```ruby +attr_accessor confirm= <-> Object +``` + +#### Parameters + + + the value to set the attribute confirm to. + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 29. + +*** + +### functions + +Returns the value of attribute functions. + +#### Signature + +```ruby +attr_accessor functions <-> Object +``` + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 29. + +*** + +### functions= + +Sets the attribute functions + +#### Signature + +```ruby +attr_accessor functions= <-> Object +``` + +#### Parameters + + + the value to set the attribute functions to. + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 29. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(key:, question:, type: 'string', confirm: false, prompt: nil, functions: nil) +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`GatherQuestion` — a new instance of GatherQuestion + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 31. + +*** + +### key + +Returns the value of attribute key. + +#### Signature + +```ruby +attr_accessor key <-> Object +``` + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 29. + +*** + +### key= + +Sets the attribute key + +#### Signature + +```ruby +attr_accessor key= <-> Object +``` + +#### Parameters + + + the value to set the attribute key to. + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 29. + +*** + +### prompt + +Returns the value of attribute prompt. + +#### Signature + +```ruby +attr_accessor prompt <-> Object +``` + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 29. + +*** + +### prompt= + +Sets the attribute prompt + +#### Signature + +```ruby +attr_accessor prompt= <-> Object +``` + +#### Parameters + + + the value to set the attribute prompt to. + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 29. + +*** + +### question + +Returns the value of attribute question. + +#### Signature + +```ruby +attr_accessor question <-> Object +``` + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 29. + +*** + +### question= + +Sets the attribute question + +#### Signature + +```ruby +attr_accessor question= <-> Object +``` + +#### Parameters + + + the value to set the attribute question to. + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 29. + +*** + +### to\_h + +#### Signature + +```ruby +def to_h +``` + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 40. + +*** + +### type + +Returns the value of attribute type. + +#### Signature + +```ruby +attr_accessor type <-> Object +``` + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 29. + +*** + +### type= + +Sets the attribute type + +#### Signature + +```ruby +attr_accessor type= <-> Object +``` + +#### Parameters + + + the value to set the attribute type to. + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 29. + +## Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 28. diff --git a/fern/products/sdk-reference/ruby/signal-wire/contexts/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/contexts/index.mdx new file mode 100644 index 0000000000..0423d0f548 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/contexts/index.mdx @@ -0,0 +1,84 @@ +--- +slug: "/reference/ruby/signal-wire/contexts" +title: "Contexts" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "module" + language: "ruby" + qualified_name: "SignalWire::Contexts" + parent: "SignalWire" + module: "SignalWire" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb" + visibility: "public" +--- +# `Contexts` + +## Signature + +```ruby +module Contexts +``` + +## Constants + + + + + + + Reserved tool names auto-injected by the runtime when contexts/steps are present. User-defined SWAIG tools must not collide with these names. ContextBuilder#validate! rejects any agent that registers a user tool sharing one of these names — the runtime would never call the user tool because the native one wins. + + +## Classes + + + + Represents a single context containing multiple steps. + + + + Builder for multi-step, multi-context AI agent workflows. + + + + Configuration for gathering information in a step via the C-side gather\_info system. + + + + Represents a single question in a gather\_info configuration. + + + + Represents a single step within a context. + + + +## Methods + +### create\_simple\_context + +Helper to create a standalone context (not via ContextBuilder). + +#### Signature + +```ruby +def create_simple_context(name = 'default') +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 965. + +## Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 9. diff --git a/fern/products/sdk-reference/ruby/signal-wire/contexts/step/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/contexts/step/index.mdx new file mode 100644 index 0000000000..139217a7c6 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/contexts/step/index.mdx @@ -0,0 +1,772 @@ +--- +slug: "/reference/ruby/signal-wire/contexts/step" +title: "Step" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Contexts::Step" + parent: "SignalWire::Contexts" + module: "SignalWire.Contexts" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb" + visibility: "public" +--- +# `Step` + +Represents a single step within a context. + +All mutator methods return +self+ for fluent chaining. + +## Signature + +```ruby +class Step < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### add\_bullets + +Add a POM section with bullet points. Mutually exclusive with +set\_text+. + +#### Signature + +```ruby +def add_bullets(title, bullets) +``` + +#### Parameters + + + + + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 131. + +*** + +### add\_gather\_question + +Add a question to this step's gather\_info configuration. ++set\_gather\_info+ must be called first. + +IMPORTANT — gather mode locks function access: +While the model is asking gather questions, the runtime +forcibly deactivates ALL of the step's other functions. The +only callable tools during a gather question are: + +``` +- +gather_submit+ (the native answer-submission tool) +- Whatever names you pass in this question's +functions:+ + option +``` + ++next\_step+ and +change\_context+ are also filtered out — the +model cannot navigate away until the gather completes. This +is by design: it forces a tight ask → submit → next-question +loop. + +If a question needs to call out to a tool (e.g. validate an +email, geocode a ZIP), pass that tool name in this question's ++functions:+ option. Functions listed here are active ONLY for +this question. +Python parity: `add_gather_question(key, question, type='string', +confirm=False, prompt=None, functions=None)`. Ruby exposes the +same parameter set as keyword args. + +#### Signature + +```ruby +def add_gather_question(key:, question:, type: 'string', confirm: false, prompt: nil, functions: nil) +``` + +#### Parameters + + + + + + + + + + + + + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 251. + +*** + +### add\_section + +Add a POM section (title + body). Mutually exclusive with +set\_text+. + +#### Signature + +```ruby +def add_section(title, body) +``` + +#### Parameters + + + + + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 123. + +*** + +### clear\_sections + +Remove all POM sections and direct text. + +#### Signature + +```ruby +def clear_sections +``` + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 267. + +*** + +### functions= + +#### Signature + +```ruby +def functions=(v) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 335. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(name) +``` + +#### Parameters + + + +#### Returns + +`Step` — a new instance of Step + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 92. + +*** + +### name + +Returns the value of attribute name. + +#### Signature + +```ruby +attr_reader name -> Object +``` + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 90. + +*** + +### reset\_consolidate= + +#### Signature + +```ruby +def reset_consolidate=(v) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 363. + +*** + +### reset\_full\_reset= + +#### Signature + +```ruby +def reset_full_reset=(v) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 367. + +*** + +### reset\_system\_prompt= + +#### Signature + +```ruby +def reset_system_prompt=(v) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 355. + +*** + +### reset\_user\_prompt= + +#### Signature + +```ruby +def reset_user_prompt=(v) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 359. + +*** + +### set\_end + +Mark this step as terminal for the step flow. + +IMPORTANT: +is\_end+ = true does NOT end the conversation or hang +up the call. It exits step mode entirely after this step +executes — clearing the steps list, current step index, +valid\_steps, and valid\_contexts. The agent keeps running, but +operates only under the base system prompt and the +context-level prompt; no more step instructions are injected +and no more +next\_step+ tool is offered. + +To actually end the call, call a hangup tool or define a +hangup hook. + +#### Signature + +```ruby +def set_end(is_end) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 201. + +*** + +### set\_functions + +Set which non-internal functions are callable while this step is +active. + +IMPORTANT — inheritance behavior: +If you do NOT call this method, the step inherits whichever +function set was active on the previous step (or the previous +context's last step). The server-side runtime only resets the +active set when a step explicitly declares its +functions+ +field. This is the most common source of bugs in multi-step +agents: forgetting +set\_functions+ on a later step lets the +previous step's tools leak through. Best practice is to call ++set\_functions+ explicitly on every step that should differ +from the previous one. + +Keep the per-step active set small: LLM tool selection accuracy +degrades noticeably past ~7-8 simultaneously-active tools per +call. Use per-step whitelisting to partition large tool +collections. + +Internal functions (e.g. +gather\_submit+, hangup hook) are +ALWAYS protected and cannot be deactivated by this whitelist. +The native navigation tools +next\_step+ and +change\_context+ are +injected automatically when +set\_valid\_steps+/+set\_valid\_contexts+ +is used; they are not affected by this list and do not need to +appear in it. + +#### Signature + +```ruby +def set_functions(functions) +``` + +#### Parameters + + + one of: + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 174. + +*** + +### set\_gather\_info + +Enable info gathering for this step. Returns +self+. +After calling this, use +add\_gather\_question+ to define questions. + +#### Signature + +```ruby +def set_gather_info(output_key: nil, completion_action: nil, prompt: nil) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 218. + +*** + +### set\_reset\_consolidate + +#### Signature + +```ruby +def set_reset_consolidate(val) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 283. + +*** + +### set\_reset\_full\_reset + +#### Signature + +```ruby +def set_reset_full_reset(val) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 288. + +*** + +### set\_reset\_system\_prompt + +#### Signature + +```ruby +def set_reset_system_prompt(prompt) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 273. + +*** + +### set\_reset\_user\_prompt + +#### Signature + +```ruby +def set_reset_user_prompt(prompt) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 278. + +*** + +### set\_skip\_to\_next\_step + +#### Signature + +```ruby +def set_skip_to_next_step(skip) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 211. + +*** + +### set\_skip\_user\_turn + +#### Signature + +```ruby +def set_skip_user_turn(skip) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 206. + +*** + +### set\_step\_criteria + +#### Signature + +```ruby +def set_step_criteria(criteria) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 138. + +*** + +### set\_text + +Set the step's prompt text directly. Mutually exclusive with POM sections. + +#### Signature + +```ruby +def set_text(text) +``` + +#### Parameters + + + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 115. + +*** + +### set\_valid\_contexts + +#### Signature + +```ruby +def set_valid_contexts(contexts) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 184. + +*** + +### set\_valid\_steps + +#### Signature + +```ruby +def set_valid_steps(steps) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 179. + +*** + +### skip\_to\_next\_step= + +#### Signature + +```ruby +def skip_to_next_step=(v) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 351. + +*** + +### skip\_user\_turn= + +#### Signature + +```ruby +def skip_user_turn=(v) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 347. + +*** + +### step\_criteria= + +#### Signature + +```ruby +def step_criteria=(v) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 331. + +*** + +### text= + +\--- Idiomatic Ruby accessors (additive aliases over the get\_/set\_ originals) --- + +Writers use the block `def x=(v); set_x(v); end` form so the RHS is +returned (Ruby `=` semantics), not `self`. The chainable `set_*` +originals stay available and untouched. + +Skipped: set\_end (`end=` is a Ruby keyword, illegal method name); +set\_gather\_info (keyword args, not a single-value setter). + +#### Signature + +```ruby +def text=(v) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 327. + +*** + +### to\_h + +#### Signature + +```ruby +def to_h +``` + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 293. + +*** + +### valid\_contexts= + +#### Signature + +```ruby +def valid_contexts=(v) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 343. + +*** + +### valid\_steps= + +#### Signature + +```ruby +def valid_steps=(v) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 339. + +## Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 89. diff --git a/fern/products/sdk-reference/ruby/signal-wire/core/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/core/index.mdx new file mode 100644 index 0000000000..f4478f2f60 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/core/index.mdx @@ -0,0 +1,34 @@ +--- +slug: "/reference/ruby/signal-wire/core" +title: "Core" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "module" + language: "ruby" + qualified_name: "SignalWire::Core" + parent: "SignalWire" + module: "SignalWire" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/core/logging_config.rb" + visibility: "public" +--- +# `Core` + +## Signature + +```ruby +module Core +``` + +## Modules + + + + + +## Source + +[`lib/signalwire/core/logging_config.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/core/logging_config.rb) + +Line 19. diff --git a/fern/products/sdk-reference/ruby/signal-wire/core/logging-config/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/core/logging-config/index.mdx new file mode 100644 index 0000000000..4e06b6cccb --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/core/logging-config/index.mdx @@ -0,0 +1,51 @@ +--- +slug: "/reference/ruby/signal-wire/core/logging-config" +title: "LoggingConfig" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "module" + language: "ruby" + qualified_name: "SignalWire::Core::LoggingConfig" + parent: "SignalWire::Core" + module: "SignalWire.Core" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/core/logging_config.rb" + visibility: "public" +--- +# `LoggingConfig` + +## Signature + +```ruby +module LoggingConfig +``` + +## Methods + +### get\_execution\_mode + +Detect the SDK's deployment environment based on well-known +environment variables. + +#### Signature + +```ruby +def get_execution_mode +``` + +#### Returns + +`String` — one of 'cgi', 'lambda', 'google\_cloud\_function', 'azure\_function', or 'server'. + +#### Source + +[`lib/signalwire/core/logging_config.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/core/logging_config.rb) + +Line 28. + +## Source + +[`lib/signalwire/core/logging_config.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/core/logging_config.rb) + +Line 20. diff --git a/fern/products/sdk-reference/ruby/signal-wire/data-map/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/data-map/index.mdx new file mode 100644 index 0000000000..4bf2af8285 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/data-map/index.mdx @@ -0,0 +1,561 @@ +--- +slug: "/reference/ruby/signal-wire/data-map" +title: "DataMap" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::DataMap" + parent: "SignalWire" + module: "SignalWire" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/datamap/data_map.rb" + visibility: "public" +--- +# `DataMap` + +Fluent builder for server-side DataMap tools. + +DataMap tools execute on SignalWire servers without requiring webhook +endpoints. This class provides a chainable API for building data\_map +configurations that become SWAIG function definitions. + +All mutator methods return +self+ so calls can be chained: + +dm = DataMap.new('get\_weather') +.purpose('Get current weather') +.parameter('location', 'string', 'City name', required: true) +.webhook('GET', 'https://api.weather.com/v1/current?q=$\{location\}') +.output(Swaig::FunctionResult.new('Weather: $\{response.current.temp\_f\}F')) + +## Signature + +```ruby +class DataMap < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### body + +Set the request body for the most-recently-added webhook (POST / PUT). + +#### Signature + +```ruby +def body(data) +``` + +#### Parameters + + + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/datamap/data_map.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/datamap/data_map.rb) + +Line 156. + +*** + +### create\_expression\_tool + +Build an expression-only tool (no HTTP calls). + +#### Signature + +```ruby +def create_expression_tool(name:, patterns:, parameters: nil) +``` + +#### Parameters + + + + + + + +#### Returns + +`DataMap` + +#### Source + +[`lib/signalwire/datamap/data_map.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/datamap/data_map.rb) + +Line 294. + +*** + +### create\_simple\_api\_tool + +Build a simple API-calling tool in one shot. + +#### Signature + +```ruby +def create_simple_api_tool(name:, url:, response_template:, parameters: nil, method: 'GET', headers: nil, body: nil, error_keys: nil) +``` + +#### Parameters + + + + + + + + + + + + + + + + + +#### Returns + +`DataMap` + +#### Source + +[`lib/signalwire/datamap/data_map.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/datamap/data_map.rb) + +Line 266. + +*** + +### description + +Alias for +purpose+. Sets the LLM-facing tool description. This +string is read by the model to decide WHEN to call this tool. +See +purpose+ for bad-vs-good examples. + +#### Signature + +```ruby +def description(desc) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/datamap/data_map.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/datamap/data_map.rb) + +Line 64. + +*** + +### error\_keys + +Set error keys on the most-recently-added webhook, or at the top level +if no webhook has been added yet. + +#### Signature + +```ruby +def error_keys(keys) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/datamap/data_map.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/datamap/data_map.rb) + +Line 206. + +*** + +### expression + +Add an expression (pattern-matching rule). + +#### Signature + +```ruby +def expression(test_value, pattern, output, nomatch_output: nil) +``` + +#### Parameters + + + template string to test, e.g. "$\{args.command\}" + + + + regex pattern to match against + + + + result when pattern matches + + + + +#### Source + +[`lib/signalwire/datamap/data_map.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/datamap/data_map.rb) + +Line 107. + +*** + +### fallback\_output + +Set a fallback output used when all webhooks fail. + +#### Signature + +```ruby +def fallback_output(result) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/datamap/data_map.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/datamap/data_map.rb) + +Line 199. + +*** + +### foreach + +Configure array processing on the most-recently-added webhook response. + +#### Signature + +```ruby +def foreach(config) +``` + +#### Parameters + + + must include keys: input\_key, output\_key, append. Optional: max. + + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/datamap/data_map.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/datamap/data_map.rb) + +Line 174. + +*** + +### function\_name + +Returns the value of attribute function\_name. + +#### Signature + +```ruby +attr_reader function_name -> Object +``` + +#### Source + +[`lib/signalwire/datamap/data_map.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/datamap/data_map.rb) + +Line 26. + +*** + +### global\_error\_keys + +Set top-level error keys (applies to all webhooks). + +#### Signature + +```ruby +def global_error_keys(keys) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/datamap/data_map.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/datamap/data_map.rb) + +Line 216. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(function_name) +``` + +#### Parameters + + + +#### Returns + +`DataMap` — a new instance of DataMap + +#### Source + +[`lib/signalwire/datamap/data_map.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/datamap/data_map.rb) + +Line 28. + +*** + +### output + +Set the output result for the most-recently-added webhook. + +#### Signature + +```ruby +def output(result) +``` + +#### Parameters + + + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/datamap/data_map.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/datamap/data_map.rb) + +Line 189. + +*** + +### parameter + +Add a typed parameter to the function signature — the +desc+ is +LLM-FACING. + +Each parameter description is rendered into the OpenAI tool +schema under +parameters.properties.<name>.description+ and sent +to the model. The model uses it to decide HOW to fill in the +argument from user speech. It is prompt engineering, not +developer FYI. + +\== Bad vs good + +BAD : .parameter("city", "string", "the city") +GOOD: .parameter("city", "string", +"The name of the city to get weather for, e.g. " \ +"'San Francisco'. Ask the user if they did not " \ +"provide one. Include the state or country if the " \ +"city name is ambiguous.") + +#### Signature + +```ruby +def parameter(name, type, desc, required: false, enum: nil) +``` + +#### Parameters + + + + + JSON-Schema type (string, number, boolean, array, object) + + + + LLM-facing prompt-engineering description telling the model how to extract this value from the user's utterance + + + + + + +#### Source + +[`lib/signalwire/datamap/data_map.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/datamap/data_map.rb) + +Line 93. + +*** + +### params + +Set request params for the most-recently-added webhook. + +#### Signature + +```ruby +def params(data) +``` + +#### Parameters + + + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/datamap/data_map.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/datamap/data_map.rb) + +Line 164. + +*** + +### purpose + +Set the LLM-facing tool description (a.k.a. "purpose"). _PROMPT +ENGINEERING_, not developer documentation. + +The description string is rendered into the OpenAI tool schema ++description+ field on every LLM turn. The model reads it to +decide WHEN to call this tool. A vague +purpose+ is the #1 cause +of "the model has the right tool but doesn't call it" failures +with data-map tools. + +\== Bad vs good + +BAD : .purpose("weather api") +GOOD: .purpose("Get the current weather conditions and " \ +"forecast for a specific city. Use this " \ +"whenever the user asks about weather, " \ +"temperature, rain, or similar conditions in a " \ +"named location.") + +#### Signature + +```ruby +def purpose(desc) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/datamap/data_map.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/datamap/data_map.rb) + +Line 56. + +*** + +### to\_swaig\_function + +Serialize this DataMap into a complete SWAIG function definition Hash. + +#### Signature + +```ruby +def to_swaig_function +``` + +#### Returns + +`Hash` — with keys: "function", "description", "parameters", "data\_map" + +#### Source + +[`lib/signalwire/datamap/data_map.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/datamap/data_map.rb) + +Line 224. + +*** + +### webhook + +Add a webhook (HTTP call) to the data\_map pipeline. + +#### Signature + +```ruby +def webhook(method, url, headers: nil, form_param: nil, input_args_as_params: false, require_args: nil) +``` + +#### Parameters + + + HTTP method (GET, POST, PUT, DELETE, etc.) + + + + endpoint URL (may contain $\{variable\} substitutions) + + + + + + + + + + +#### Source + +[`lib/signalwire/datamap/data_map.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/datamap/data_map.rb) + +Line 134. + +*** + +### webhook\_expressions + +Add expressions to run after the most-recently-added webhook completes. + +#### Signature + +```ruby +def webhook_expressions(expressions) +``` + +#### Parameters + + + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/datamap/data_map.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/datamap/data_map.rb) + +Line 148. + +## Source + +[`lib/signalwire/datamap/data_map.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/datamap/data_map.rb) + +Line 25. diff --git a/fern/products/sdk-reference/ruby/signal-wire/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/index.mdx new file mode 100644 index 0000000000..f5351ff46f --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/index.mdx @@ -0,0 +1,248 @@ +--- +slug: "/reference/ruby/signal-wire" +title: "SignalWire" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "module" + language: "ruby" + qualified_name: "SignalWire" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/runtime.rb" + visibility: "public" +--- +# `SignalWire` + +Copyright (c) 2025 SignalWire + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```ruby +module SignalWire +``` + +## Constants + + + +## Classes + + + + Central agent class that composes SWML rendering, tool dispatch, prompt management, AI config, and HTTP serving. + + + + Multi-agent hosting on a single Rack application. + + + + Fluent builder for server-side DataMap tools. + + + +## Modules + + + + + + + + + + + + + + + + + + Runtime environment detection. + + + + + + + + + + + + + + + +## Methods + +### add\_skill\_directory + +Add a directory to search for skills. + +Mirrors Python's `signalwire.add_skill_directory(path)` — delegates +to the singleton \{SignalWire::Skills::SkillRegistry\} instance so +third-party skill collections can be registered by path. Subsequent +calls accumulate (de-duplicated) into a shared external paths list. + +#### Signature + +```ruby +def add_skill_directory(path) +``` + +#### Parameters + + + absolute or relative path to a skill directory. + + +#### Returns + +`void` + +#### Throws + +- `ArgumentError` — when the path doesn't exist or isn't a directory. + +#### Source + +[`lib/signalwire.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire.rb) + +Line 85. + +*** + +### list\_skills + +List all available skills. + +Mirrors Python's top-level `signalwire.list_skills()`. Delegates to +\{SignalWire::Skills::SkillRegistry#list\_skills\} on the shared +singleton registry, returning one hash per skill (`name` plus +`description` / `version` when the factory can be instantiated +without arguments). + +#### Signature + +```ruby +def list_skills +``` + +#### Returns + +`Array` + +#### Source + +[`lib/signalwire.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire.rb) + +Line 99. + +*** + +### list\_skills\_with\_params + +Get complete schema for all available skills, including parameter metadata. + +Mirrors Python's `signalwire.list_skills_with_params()`. Keys are +skill names; values describe metadata + parameter schema. Useful for +GUI configuration tools, API documentation, or programmatic skill +discovery. + +#### Signature + +```ruby +def list_skills_with_params +``` + +#### Returns + +`Hash{String => Hash}` + +#### Source + +[`lib/signalwire.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire.rb) + +Line 112. + +*** + +### register\_skill + +Register a custom skill class with the global skill registry. + +Mirrors Python's `signalwire.register_skill(skill_class)` — the +Ruby singleton registry stores factories by name. The class is +expected to expose a `::skill_name` (or `SKILL_NAME` constant) +so we can derive the registration key. + +#### Signature + +```ruby +def register_skill(skill_class) +``` + +#### Parameters + + + A subclass of \{SignalWire::Skills::SkillBase\} + + +#### Returns + +`void` + +#### Source + +[`lib/signalwire.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire.rb) + +Line 62. + +*** + +### RestClient + +Construct a \{SignalWire::REST::RestClient\} instance. + +Mirrors Python's top-level `signalwire.RestClient(*args, **kwargs)` +factory — a thin wrapper that lazy-imports +`signalwire.rest.RestClient` and instantiates it. Supports both +positional credentials (matching Go-style `RestClient(project, +token, host)`) and keyword credentials (Ruby-idiomatic). + +#### Signature + +```ruby +def RestClient(*args, **kwargs) +``` + +#### Parameters + + + Positional credentials (compat shim). + + + + Keyword credentials forwarded to the constructor. + + +#### Returns + +`SignalWire::REST::RestClient` + +#### Source + +[`lib/signalwire.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire.rb) + +Line 42. + +## Source + +[`lib/signalwire/runtime.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/runtime.rb) + +Line 8. diff --git a/fern/products/sdk-reference/ruby/signal-wire/logging/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/logging/index.mdx new file mode 100644 index 0000000000..e0bd276920 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/logging/index.mdx @@ -0,0 +1,144 @@ +--- +slug: "/reference/ruby/signal-wire/logging" +title: "Logging" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "module" + language: "ruby" + qualified_name: "SignalWire::Logging" + parent: "SignalWire" + module: "SignalWire" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/logging.rb" + visibility: "public" +--- +# `Logging` + +## Signature + +```ruby +module Logging +``` + +## Constants + + + +## Classes + + + + \------------------------------------------------------------------- + + + +## Methods + +### global\_level + +Returns the current global log level, derived from: + +1. SIGNALWIRE\_LOG\_MODE=off -> :off (suppresses everything) +2. SIGNALWIRE\_LOG\_LEVEL env -> the named level +3. Default -> :info + +#### Signature + +```ruby +def global_level +``` + +#### Source + +[`lib/signalwire/logging.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/logging.rb) + +Line 11. + +*** + +### global\_level= + +#### Signature + +```ruby +def global_level=(level) +``` + +#### Parameters + + + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/logging.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/logging.rb) + +Line 15. + +*** + +### logger + +Convenience factory + +#### Signature + +```ruby +def logger(name) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/logging.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/logging.rb) + +Line 31. + +*** + +### reset! + +#### Signature + +```ruby +def reset! +``` + +#### Source + +[`lib/signalwire/logging.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/logging.rb) + +Line 22. + +*** + +### suppressed? + +#### Signature + +```ruby +def suppressed? +``` + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/logging.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/logging.rb) + +Line 26. + +## Source + +[`lib/signalwire/logging.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/logging.rb) + +Line 4. diff --git a/fern/products/sdk-reference/ruby/signal-wire/logging/logger/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/logging/logger/index.mdx new file mode 100644 index 0000000000..f5eea642a5 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/logging/logger/index.mdx @@ -0,0 +1,156 @@ +--- +slug: "/reference/ruby/signal-wire/logging/logger" +title: "Logger" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Logging::Logger" + parent: "SignalWire::Logging" + module: "SignalWire.Logging" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/logging.rb" + visibility: "public" +--- +# `Logger` + +*** + +## Signature + +```ruby +class Logger < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### debug + +#### Signature + +```ruby +def debug(msg) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/logging.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/logging.rb) + +Line 44. + +*** + +### error + +#### Signature + +```ruby +def error(msg) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/logging.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/logging.rb) + +Line 56. + +*** + +### info + +#### Signature + +```ruby +def info(msg) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/logging.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/logging.rb) + +Line 48. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(name) +``` + +#### Parameters + + + +#### Returns + +`Logger` — a new instance of Logger + +#### Source + +[`lib/signalwire/logging.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/logging.rb) + +Line 39. + +*** + +### name + +Returns the value of attribute name. + +#### Signature + +```ruby +attr_reader name -> Object +``` + +#### Source + +[`lib/signalwire/logging.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/logging.rb) + +Line 37. + +*** + +### warn + +#### Signature + +```ruby +def warn(msg) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/logging.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/logging.rb) + +Line 52. + +## Source + +[`lib/signalwire/logging.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/logging.rb) + +Line 36. diff --git a/fern/products/sdk-reference/ruby/signal-wire/pom/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/pom/index.mdx new file mode 100644 index 0000000000..518f54d496 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/pom/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/ruby/signal-wire/pom" +title: "POM" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "module" + language: "ruby" + qualified_name: "SignalWire::POM" + parent: "SignalWire" + module: "SignalWire" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/section.rb" + visibility: "public" +--- +# `POM` + +## Signature + +```ruby +module POM +``` + +## Classes + + + + A structured data format for composing, organising, and rendering prompt instructions for large language models. + + + + Represents a section in the Prompt Object Model. + + + +## Source + +[`lib/signalwire/pom/section.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/section.rb) + +Line 4. diff --git a/fern/products/sdk-reference/ruby/signal-wire/pom/prompt-object-model/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/pom/prompt-object-model/index.mdx new file mode 100644 index 0000000000..597587cc2e --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/pom/prompt-object-model/index.mdx @@ -0,0 +1,446 @@ +--- +slug: "/reference/ruby/signal-wire/pom/prompt-object-model" +title: "PromptObjectModel" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::POM::PromptObjectModel" + parent: "SignalWire::POM" + module: "SignalWire.POM" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/prompt_object_model.rb" + visibility: "public" +--- +# `PromptObjectModel` + +A structured data format for composing, organising, and rendering +prompt instructions for large language models. + +The Prompt Object Model provides a tree-based representation of a +prompt document composed of nested Section objects, each of which +can include a title, body text, bullet points, and arbitrarily +nested subsections. + +Mirrors Python's `signalwire.pom.pom.PromptObjectModel`. The +rendered output (Markdown / XML / JSON / YAML) is byte-for-byte +identical to the Python reference so cross-language POM documents +interoperate. + +## Signature + +```ruby +class PromptObjectModel < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### \_build\_section + +Internal: build a Section (recursively) from a Hash section +descriptor. Mirrors Python's `build_section` inner helper. + +#### Signature + +```ruby +def _build_section(hash, is_subsection: false) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/pom/prompt_object_model.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/prompt_object_model.rb) + +Line 71. + +*** + +### \_from\_array + +Internal: build a PromptObjectModel from a raw Array of Hash +section descriptors. Mirrors Python's `_from_dict` (which +confusingly takes a list, not a dict). + +#### Signature + +```ruby +def _from_array(data) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/pom/prompt_object_model.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/prompt_object_model.rb) + +Line 53. + +*** + +### add\_pom\_as\_subsection + +Add another PromptObjectModel as a subsection of an existing +section identified either by title or by Section reference. + +Mirrors Python's +`PromptObjectModel.add_pom_as_subsection(target, pom_to_add)`. + +#### Signature + +```ruby +def add_pom_as_subsection(target, pom_to_add) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/pom/prompt_object_model.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/prompt_object_model.rb) + +Line 252. + +*** + +### add\_section + +Add a top-level section to the model and return the new Section. + +Mirrors Python's `PromptObjectModel.add_section`. If +bullets+ +is a String it is wrapped into a single-element Array (Python +parity). Raises ArgumentError when +title+ is nil and the model +already has at least one section (only the first section may +be untitled). + +#### Signature + +```ruby +def add_section(title = nil, body: '', bullets: nil, numbered: nil, numbered_bullets: false) +``` + +#### Parameters + + + + + + + + + + + +#### Source + +[`lib/signalwire/pom/prompt_object_model.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/prompt_object_model.rb) + +Line 126. + +*** + +### debug + +Returns the value of attribute debug. + +#### Signature + +```ruby +attr_accessor debug <-> Object +``` + +#### Source + +[`lib/signalwire/pom/prompt_object_model.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/prompt_object_model.rb) + +Line 23. + +*** + +### debug= + +Sets the attribute debug + +#### Signature + +```ruby +attr_accessor debug= <-> Object +``` + +#### Parameters + + + the value to set the attribute debug to. + + +#### Source + +[`lib/signalwire/pom/prompt_object_model.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/prompt_object_model.rb) + +Line 23. + +*** + +### find\_section + +Find a section by title, recursing into subsections. Returns ++nil+ when the title is not present anywhere in the tree. + +#### Signature + +```ruby +def find_section(title) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/pom/prompt_object_model.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/prompt_object_model.rb) + +Line 141. + +*** + +### from\_json + +Build a PromptObjectModel from JSON. + ++json\_data+ may be either a JSON string or an already-parsed +Array. Mirrors Python's +`PromptObjectModel.from_json(json_data: Union[str, dict])`. + +#### Signature + +```ruby +def from_json(json_data) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/pom/prompt_object_model.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/prompt_object_model.rb) + +Line 35. + +*** + +### from\_yaml + +Build a PromptObjectModel from YAML. + ++yaml\_data+ may be either a YAML string or an already-parsed +Array. Mirrors Python's +`PromptObjectModel.from_yaml(yaml_data: Union[str, dict])`. + +#### Signature + +```ruby +def from_yaml(yaml_data) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/pom/prompt_object_model.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/prompt_object_model.rb) + +Line 45. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(debug: false) +``` + +#### Parameters + + + +#### Returns + +`PromptObjectModel` — a new instance of PromptObjectModel + +#### Source + +[`lib/signalwire/pom/prompt_object_model.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/prompt_object_model.rb) + +Line 25. + +*** + +### render\_markdown + +Render the entire model as Markdown. Output is byte-for-byte +identical to Python's `PromptObjectModel.render_markdown`. + +#### Signature + +```ruby +def render_markdown +``` + +#### Source + +[`lib/signalwire/pom/prompt_object_model.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/prompt_object_model.rb) + +Line 185. + +*** + +### render\_xml + +Render the entire model as XML. Output is byte-for-byte identical +to Python's `PromptObjectModel.render_xml`. + +#### Signature + +```ruby +def render_xml +``` + +#### Source + +[`lib/signalwire/pom/prompt_object_model.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/prompt_object_model.rb) + +Line 222. + +*** + +### sections + +Returns the value of attribute sections. + +#### Signature + +```ruby +attr_accessor sections <-> Object +``` + +#### Source + +[`lib/signalwire/pom/prompt_object_model.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/prompt_object_model.rb) + +Line 23. + +*** + +### sections= + +Sets the attribute sections + +#### Signature + +```ruby +attr_accessor sections= <-> Object +``` + +#### Parameters + + + the value to set the attribute sections to. + + +#### Source + +[`lib/signalwire/pom/prompt_object_model.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/prompt_object_model.rb) + +Line 23. + +*** + +### to\_h + +Convert the model to an Array of Hash section descriptors. +Mirrors Python's `PromptObjectModel.to_dict` (Ruby idiom uses +`to_h`). + +#### Signature + +```ruby +def to_h +``` + +#### Source + +[`lib/signalwire/pom/prompt_object_model.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/prompt_object_model.rb) + +Line 179. + +*** + +### to\_json + +Convert the model to a JSON string. Output matches Python's +`json.dumps(..., indent=2)` byte-for-byte, with one +special case: an empty model serializes to `"[]"` (Ruby's +default `JSON.pretty_generate([])` emits `"[\n\n]"`). + +#### Signature + +```ruby +def to_json(*_args) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/pom/prompt_object_model.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/prompt_object_model.rb) + +Line 158. + +*** + +### to\_yaml + +Convert the model to a YAML string. Output matches Python's +`yaml.dump(..., default_flow_style=False, sort_keys=False)` +byte-for-byte. Ruby's `YAML.dump` prepends `---\n`; we strip +it. The empty-list case (Ruby emits `--- []\n`) is normalised +to Python's `[]\n`. + +#### Signature + +```ruby +def to_yaml +``` + +#### Source + +[`lib/signalwire/pom/prompt_object_model.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/prompt_object_model.rb) + +Line 169. + +## Source + +[`lib/signalwire/pom/prompt_object_model.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/prompt_object_model.rb) + +Line 22. diff --git a/fern/products/sdk-reference/ruby/signal-wire/pom/section/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/pom/section/index.mdx new file mode 100644 index 0000000000..43bc3766d4 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/pom/section/index.mdx @@ -0,0 +1,499 @@ +--- +slug: "/reference/ruby/signal-wire/pom/section" +title: "Section" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::POM::Section" + parent: "SignalWire::POM" + module: "SignalWire.POM" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/section.rb" + visibility: "public" +--- +# `Section` + +Represents a section in the Prompt Object Model. + +Each section contains a title, optional body text, optional bullet +points, and can have any number of nested subsections. + +Mirrors Python's `signalwire.pom.pom.Section` exactly. See +`signalwire-python/signalwire/signalwire/pom/pom.py` for the +source-of-truth specification; rendering output (markdown / XML / +JSON / YAML) must match Python byte-for-byte so cross-language POM +documents are interoperable. + +Attributes: + +- +title+ — the name of the section. +- +body+ — a paragraph of text associated with the section. +- +bullets+ — bullet-pointed items (Array<String>). +- +subsections+ — nested Section objects. +- +numbered+ — whether this section should be numbered. +- +numbered\_bullets+ — whether bullets should be numbered (rendered + to/from the JSON/YAML key +numberedBullets+ for Python parity). + +## Signature + +```ruby +class Section < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### add\_body + +Add or replace the body text for this section. Mirrors Python's +`Section.add_body` (which is documented to "Add or replace"). + +#### Signature + +```ruby +def add_body(body) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/pom/section.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/section.rb) + +Line 55. + +*** + +### add\_bullets + +Append bullet points to this section. Does not replace existing +bullets — mirrors Python's `self.bullets.extend(bullets)`. + +#### Signature + +```ruby +def add_bullets(bullets) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/pom/section.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/section.rb) + +Line 65. + +*** + +### add\_subsection + +Add a subsection to this section, returning the new Section. + +Raises ArgumentError when +title+ is nil (Python raises +`ValueError("Subsections must have a title")`; Ruby idiom +is ArgumentError for invalid arguments). + +#### Signature + +```ruby +def add_subsection(title, body: '', bullets: nil, numbered: false, numbered_bullets: false) +``` + +#### Parameters + + + + + + + + + + + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/pom/section.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/section.rb) + +Line 78. + +*** + +### body + +Returns the value of attribute body. + +#### Signature + +```ruby +attr_accessor body <-> Object +``` + +#### Source + +[`lib/signalwire/pom/section.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/section.rb) + +Line 25. + +*** + +### body= + +Sets the attribute body + +#### Signature + +```ruby +attr_accessor body= <-> Object +``` + +#### Parameters + + + the value to set the attribute body to. + + +#### Source + +[`lib/signalwire/pom/section.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/section.rb) + +Line 25. + +*** + +### bullets + +Returns the value of attribute bullets. + +#### Signature + +```ruby +attr_accessor bullets <-> Object +``` + +#### Source + +[`lib/signalwire/pom/section.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/section.rb) + +Line 25. + +*** + +### bullets= + +Sets the attribute bullets + +#### Signature + +```ruby +attr_accessor bullets= <-> Object +``` + +#### Parameters + + + the value to set the attribute bullets to. + + +#### Source + +[`lib/signalwire/pom/section.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/section.rb) + +Line 25. + +*** + +### initialize + +Construct a Section. + +All arguments after +title+ are keyword arguments mirroring the +Python `Section.__init__` signature. `numbered_bullets` is +snake\_case in Ruby; the camelCase `numberedBullets` form used +by Python's JSON/YAML serialization is preserved on the wire. + +#### Signature + +```ruby +def initialize(title = nil, body: '', bullets: nil, numbered: nil, numbered_bullets: false) +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`Section` — a new instance of Section + +#### Source + +[`lib/signalwire/pom/section.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/section.rb) + +Line 33. + +*** + +### numbered + +Returns the value of attribute numbered. + +#### Signature + +```ruby +attr_accessor numbered <-> Object +``` + +#### Source + +[`lib/signalwire/pom/section.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/section.rb) + +Line 25. + +*** + +### numbered\_bullets + +Returns the value of attribute numbered\_bullets. + +#### Signature + +```ruby +attr_accessor numbered_bullets <-> Object +``` + +#### Source + +[`lib/signalwire/pom/section.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/section.rb) + +Line 25. + +*** + +### numbered\_bullets= + +Sets the attribute numbered\_bullets + +#### Signature + +```ruby +attr_accessor numbered_bullets= <-> Object +``` + +#### Parameters + + + the value to set the attribute numbered\_bullets to. + + +#### Source + +[`lib/signalwire/pom/section.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/section.rb) + +Line 25. + +*** + +### numbered= + +Sets the attribute numbered + +#### Signature + +```ruby +attr_accessor numbered= <-> Object +``` + +#### Parameters + + + the value to set the attribute numbered to. + + +#### Source + +[`lib/signalwire/pom/section.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/section.rb) + +Line 25. + +*** + +### render\_markdown + +Render this section and all its subsections as Markdown. The +output is byte-for-byte identical to Python's +`Section.render_markdown`. + +#### Signature + +```ruby +def render_markdown(level: 2, section_number: nil) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/pom/section.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/section.rb) + +Line 104. + +*** + +### render\_xml + +Render this section and all its subsections as XML. Output is +byte-for-byte identical to Python's `Section.render_xml`. + +#### Signature + +```ruby +def render_xml(indent: 0, section_number: nil) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/pom/section.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/section.rb) + +Line 150. + +*** + +### subsections + +Returns the value of attribute subsections. + +#### Signature + +```ruby +attr_accessor subsections <-> Object +``` + +#### Source + +[`lib/signalwire/pom/section.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/section.rb) + +Line 25. + +*** + +### subsections= + +Sets the attribute subsections + +#### Signature + +```ruby +attr_accessor subsections= <-> Object +``` + +#### Parameters + + + the value to set the attribute subsections to. + + +#### Source + +[`lib/signalwire/pom/section.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/section.rb) + +Line 25. + +*** + +### title + +Returns the value of attribute title. + +#### Signature + +```ruby +attr_accessor title <-> Object +``` + +#### Source + +[`lib/signalwire/pom/section.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/section.rb) + +Line 25. + +*** + +### title= + +Sets the attribute title + +#### Signature + +```ruby +attr_accessor title= <-> Object +``` + +#### Parameters + + + the value to set the attribute title to. + + +#### Source + +[`lib/signalwire/pom/section.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/section.rb) + +Line 25. + +*** + +### to\_h + +Convert the section to a Hash representation suitable for JSON or +YAML serialization. Keys are emitted in the same order as Python +so cross-port string comparisons line up. + +#### Signature + +```ruby +def to_h +``` + +#### Source + +[`lib/signalwire/pom/section.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/section.rb) + +Line 90. + +## Source + +[`lib/signalwire/pom/section.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/section.rb) + +Line 24. diff --git a/fern/products/sdk-reference/ruby/signal-wire/prefabs/concierge/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/prefabs/concierge/index.mdx new file mode 100644 index 0000000000..5456da4a0e --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/prefabs/concierge/index.mdx @@ -0,0 +1,368 @@ +--- +slug: "/reference/ruby/signal-wire/prefabs/concierge" +title: "Concierge" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Prefabs::Concierge" + parent: "SignalWire::Prefabs" + module: "SignalWire.Prefabs" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/concierge.rb" + visibility: "public" +--- +# `Concierge` + +Prefab agent for providing virtual concierge services. + +agent = Concierge.new( +venue\_name: 'Grand Hotel', +services: \['room service', 'spa bookings'], +amenities: \{ 'pool' => \{ 'hours' => '7 AM - 10 PM', 'location' => '2nd Floor' \} \} +) + +## Signature + +```ruby +class Concierge < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### amenities + +Returns the value of attribute amenities. + +#### Signature + +```ruby +attr_reader amenities -> Object +``` + +#### Source + +[`lib/signalwire/prefabs/concierge.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/concierge.rb) + +Line 23. + +*** + +### check\_availability + +Tool: check\_availability — Python parity +(signalwire.prefabs.concierge.ConciergeAgent#check\_availability). + +Simulated booking lookup: confirms availability when the requested +service is one of the venue's offered services, otherwise lists the +available services. + +#### Signature + +```ruby +def check_availability(args, _raw_data) +``` + +#### Parameters + + + expects "service", "date", "time" + + + + +#### Returns + +`Swaig::FunctionResult` + +#### Source + +[`lib/signalwire/prefabs/concierge.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/concierge.rb) + +Line 102. + +*** + +### get\_directions + +Tool: get\_directions — Python parity +(signalwire.prefabs.concierge.ConciergeAgent#get\_directions). + +Returns directions to an amenity when that amenity declares a +"location" detail, otherwise points the caller at the front desk. + +#### Signature + +```ruby +def get_directions(args, _raw_data) +``` + +#### Parameters + + + expects "location" + + + + +#### Returns + +`Swaig::FunctionResult` + +#### Source + +[`lib/signalwire/prefabs/concierge.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/concierge.rb) + +Line 128. + +*** + +### global\_data + +#### Signature + +```ruby +def global_data +``` + +#### Source + +[`lib/signalwire/prefabs/concierge.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/concierge.rb) + +Line 64. + +*** + +### handle\_amenity\_info + +#### Signature + +```ruby +def handle_amenity_info(args, _raw_data) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/prefabs/concierge.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/concierge.rb) + +Line 72. + +*** + +### handle\_service\_info + +#### Signature + +```ruby +def handle_service_info(args, _raw_data) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/prefabs/concierge.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/concierge.rb) + +Line 83. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(venue_name:, services:, amenities:, hours_of_operation: nil, special_instructions: nil, welcome_message: nil, name: 'concierge', route: '/concierge', **_opts) +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + +#### Returns + +`Concierge` — a new instance of Concierge + +#### Source + +[`lib/signalwire/prefabs/concierge.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/concierge.rb) + +Line 25. + +*** + +### name + +Returns the value of attribute name. + +#### Signature + +```ruby +attr_reader name -> Object +``` + +#### Source + +[`lib/signalwire/prefabs/concierge.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/concierge.rb) + +Line 23. + +*** + +### on\_summary + +Lifecycle hook: on\_summary — Python parity +(signalwire.prefabs.concierge.ConciergeAgent#on\_summary). + +Processes the post-prompt interaction summary. Structured (Hash) +summaries are logged as pretty JSON; anything else is logged as-is. +Subclasses may override to persist or forward the interaction. + +#### Signature + +```ruby +def on_summary(summary, _raw_data = nil) +``` + +#### Parameters + + + conversation summary + + + + full raw POST data + + +#### Returns + +`void` + +#### Source + +[`lib/signalwire/prefabs/concierge.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/concierge.rb) + +Line 156. + +*** + +### prompt\_sections + +#### Signature + +```ruby +def prompt_sections +``` + +#### Source + +[`lib/signalwire/prefabs/concierge.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/concierge.rb) + +Line 42. + +*** + +### route + +Returns the value of attribute route. + +#### Signature + +```ruby +attr_reader route -> Object +``` + +#### Source + +[`lib/signalwire/prefabs/concierge.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/concierge.rb) + +Line 23. + +*** + +### services + +Returns the value of attribute services. + +#### Signature + +```ruby +attr_reader services -> Object +``` + +#### Source + +[`lib/signalwire/prefabs/concierge.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/concierge.rb) + +Line 23. + +*** + +### tools + +#### Signature + +```ruby +def tools +``` + +#### Source + +[`lib/signalwire/prefabs/concierge.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/concierge.rb) + +Line 38. + +*** + +### venue\_name + +Returns the value of attribute venue\_name. + +#### Signature + +```ruby +attr_reader venue_name -> Object +``` + +#### Source + +[`lib/signalwire/prefabs/concierge.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/concierge.rb) + +Line 23. + +## Source + +[`lib/signalwire/prefabs/concierge.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/concierge.rb) + +Line 22. diff --git a/fern/products/sdk-reference/ruby/signal-wire/prefabs/faq-bot/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/prefabs/faq-bot/index.mdx new file mode 100644 index 0000000000..be0475be2f --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/prefabs/faq-bot/index.mdx @@ -0,0 +1,238 @@ +--- +slug: "/reference/ruby/signal-wire/prefabs/faq-bot" +title: "FaqBot" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Prefabs::FaqBot" + parent: "SignalWire::Prefabs" + module: "SignalWire.Prefabs" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/faq_bot.rb" + visibility: "public" +--- +# `FaqBot` + +Prefab agent for answering frequently asked questions. + +agent = FaqBot.new( +faqs: \[ +\{ 'question' => 'What is SignalWire?', 'answer' => 'A cloud communications platform.' \} +] +) + +## Signature + +```ruby +class FaqBot < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### faqs + +Returns the value of attribute faqs. + +#### Signature + +```ruby +attr_reader faqs -> Object +``` + +#### Source + +[`lib/signalwire/prefabs/faq_bot.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/faq_bot.rb) + +Line 23. + +*** + +### global\_data + +#### Signature + +```ruby +def global_data +``` + +#### Source + +[`lib/signalwire/prefabs/faq_bot.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/faq_bot.rb) + +Line 51. + +*** + +### handle\_search + +#### Signature + +```ruby +def handle_search(args, _raw_data) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/prefabs/faq_bot.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/faq_bot.rb) + +Line 58. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(faqs:, suggest_related: true, persona: nil, name: 'faq_bot', route: '/faq', **_opts) +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`FaqBot` — a new instance of FaqBot + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/prefabs/faq_bot.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/faq_bot.rb) + +Line 25. + +*** + +### name + +Returns the value of attribute name. + +#### Signature + +```ruby +attr_reader name -> Object +``` + +#### Source + +[`lib/signalwire/prefabs/faq_bot.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/faq_bot.rb) + +Line 23. + +*** + +### on\_summary + +Lifecycle hook: on\_summary — Python parity +(signalwire.prefabs.faq\_bot.FAQBotAgent#on\_summary). + +Logs the post-prompt interaction summary; structured (Hash) summaries +are emitted as pretty JSON. Subclasses may override to persist. + +#### Signature + +```ruby +def on_summary(summary, _raw_data = nil) +``` + +#### Parameters + + + conversation summary + + + + full raw POST data + + +#### Returns + +`void` + +#### Source + +[`lib/signalwire/prefabs/faq_bot.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/faq_bot.rb) + +Line 77. + +*** + +### prompt\_sections + +#### Signature + +```ruby +def prompt_sections +``` + +#### Source + +[`lib/signalwire/prefabs/faq_bot.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/faq_bot.rb) + +Line 40. + +*** + +### route + +Returns the value of attribute route. + +#### Signature + +```ruby +attr_reader route -> Object +``` + +#### Source + +[`lib/signalwire/prefabs/faq_bot.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/faq_bot.rb) + +Line 23. + +*** + +### tools + +#### Signature + +```ruby +def tools +``` + +#### Source + +[`lib/signalwire/prefabs/faq_bot.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/faq_bot.rb) + +Line 36. + +## Source + +[`lib/signalwire/prefabs/faq_bot.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/faq_bot.rb) + +Line 22. diff --git a/fern/products/sdk-reference/ruby/signal-wire/prefabs/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/prefabs/index.mdx new file mode 100644 index 0000000000..5a13120346 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/prefabs/index.mdx @@ -0,0 +1,52 @@ +--- +slug: "/reference/ruby/signal-wire/prefabs" +title: "Prefabs" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "module" + language: "ruby" + qualified_name: "SignalWire::Prefabs" + parent: "SignalWire" + module: "SignalWire" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/survey.rb" + visibility: "public" +--- +# `Prefabs` + +## Signature + +```ruby +module Prefabs +``` + +## Classes + + + + Prefab agent for providing virtual concierge services. + + + + Prefab agent for answering frequently asked questions. + + + + Prefab agent for collecting answers to a series of questions. + + + + Prefab agent for greeting callers and transferring them to departments. + + + + Prefab agent for conducting automated surveys. + + + +## Source + +[`lib/signalwire/prefabs/survey.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/survey.rb) + +Line 13. diff --git a/fern/products/sdk-reference/ruby/signal-wire/prefabs/info-gatherer/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/prefabs/info-gatherer/index.mdx new file mode 100644 index 0000000000..5e58b825a7 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/prefabs/info-gatherer/index.mdx @@ -0,0 +1,306 @@ +--- +slug: "/reference/ruby/signal-wire/prefabs/info-gatherer" +title: "InfoGatherer" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Prefabs::InfoGatherer" + parent: "SignalWire::Prefabs" + module: "SignalWire.Prefabs" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/info_gatherer.rb" + visibility: "public" +--- +# `InfoGatherer` + +Prefab agent for collecting answers to a series of questions. + +agent = InfoGatherer.new( +questions: \[ +\{ 'key\_name' => 'full\_name', 'question\_text' => 'What is your full name?' \}, +\{ 'key\_name' => 'email', 'question\_text' => 'Email?', 'confirm' => true \} +] +) + +## Signature + +```ruby +class InfoGatherer < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Constants + + + Fallback questions used in dynamic mode when no callback is registered or the callback raises (mirrors Python's fallback list). + + +## Methods + +### global\_data + +Global data for initial state. + +#### Signature + +```ruby +def global_data +``` + +#### Source + +[`lib/signalwire/prefabs/info_gatherer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/info_gatherer.rb) + +Line 79. + +*** + +### handle\_start + +Tool handler: start\_questions + +#### Signature + +```ruby +def handle_start(_args, _raw_data) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/prefabs/info_gatherer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/info_gatherer.rb) + +Line 90. + +*** + +### handle\_submit + +Tool handler: submit\_answer + +#### Signature + +```ruby +def handle_submit(args, _raw_data) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/prefabs/info_gatherer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/info_gatherer.rb) + +Line 100. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(questions: nil, name: 'info_gatherer', route: '/info_gatherer', **_opts) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`InfoGatherer` — a new instance of InfoGatherer + +#### Source + +[`lib/signalwire/prefabs/info_gatherer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/info_gatherer.rb) + +Line 33. + +*** + +### name + +Returns the value of attribute name. + +#### Signature + +```ruby +attr_reader name -> Object +``` + +#### Source + +[`lib/signalwire/prefabs/info_gatherer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/info_gatherer.rb) + +Line 29. + +*** + +### on\_swml\_request + +Lifecycle hook: on\_swml\_request — Python parity +(InfoGathererAgent#on\_swml\_request). In dynamic mode, invokes the +registered question callback (or a fallback) and returns a +\{ 'global\_data' => \{...\} \} Hash that AgentBase merges into the SWML +response. In static mode this is a no-op (returns nil). + +#### Signature + +```ruby +def on_swml_request(request_data = nil, _callback_path = nil, request: nil) +``` + +#### Parameters + + + parsed request body + + + + + + +#### Returns + +`Hash | nil` + +#### Source + +[`lib/signalwire/prefabs/info_gatherer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/info_gatherer.rb) + +Line 116. + +*** + +### prompt\_sections + +Build the prompt sections. + +#### Signature + +```ruby +def prompt_sections +``` + +#### Source + +[`lib/signalwire/prefabs/info_gatherer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/info_gatherer.rb) + +Line 68. + +*** + +### questions + +Returns the value of attribute questions. + +#### Signature + +```ruby +attr_reader questions -> Object +``` + +#### Source + +[`lib/signalwire/prefabs/info_gatherer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/info_gatherer.rb) + +Line 29. + +*** + +### route + +Returns the value of attribute route. + +#### Signature + +```ruby +attr_reader route -> Object +``` + +#### Source + +[`lib/signalwire/prefabs/info_gatherer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/info_gatherer.rb) + +Line 29. + +*** + +### set\_question\_callback + +Register a callback for dynamic, per-request question configuration — +Python parity (InfoGathererAgent#set\_question\_callback). The callback +receives (query\_params, body\_params, headers) and returns the list of +questions to ask on that call. + +#### Signature + +```ruby +def set_question_callback(callback) +``` + +#### Parameters + + + callable taking three Hash args, returning an Array of question Hashes + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/prefabs/info_gatherer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/info_gatherer.rb) + +Line 57. + +*** + +### tools + +Tool definitions this prefab provides. + +#### Signature + +```ruby +def tools +``` + +#### Source + +[`lib/signalwire/prefabs/info_gatherer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/info_gatherer.rb) + +Line 63. + +## Source + +[`lib/signalwire/prefabs/info_gatherer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/info_gatherer.rb) + +Line 21. diff --git a/fern/products/sdk-reference/ruby/signal-wire/prefabs/receptionist/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/prefabs/receptionist/index.mdx new file mode 100644 index 0000000000..f963b0fa1d --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/prefabs/receptionist/index.mdx @@ -0,0 +1,256 @@ +--- +slug: "/reference/ruby/signal-wire/prefabs/receptionist" +title: "Receptionist" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Prefabs::Receptionist" + parent: "SignalWire::Prefabs" + module: "SignalWire.Prefabs" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/receptionist.rb" + visibility: "public" +--- +# `Receptionist` + +Prefab agent for greeting callers and transferring them to departments. + +agent = Receptionist.new( +departments: \[ +\{ 'name' => 'sales', 'description' => 'Product inquiries', 'number' => '+15551235555' \}, +\{ 'name' => 'support', 'description' => 'Technical help', 'number' => '+15551236666' \} +] +) + +## Signature + +```ruby +class Receptionist < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### departments + +Returns the value of attribute departments. + +#### Signature + +```ruby +attr_reader departments -> Object +``` + +#### Source + +[`lib/signalwire/prefabs/receptionist.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/receptionist.rb) + +Line 22. + +*** + +### global\_data + +#### Signature + +```ruby +def global_data +``` + +#### Source + +[`lib/signalwire/prefabs/receptionist.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/receptionist.rb) + +Line 54. + +*** + +### greeting + +Returns the value of attribute greeting. + +#### Signature + +```ruby +attr_reader greeting -> Object +``` + +#### Source + +[`lib/signalwire/prefabs/receptionist.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/receptionist.rb) + +Line 22. + +*** + +### handle\_transfer + +#### Signature + +```ruby +def handle_transfer(args, _raw_data) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/prefabs/receptionist.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/receptionist.rb) + +Line 61. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(departments:, name: 'receptionist', route: '/receptionist', greeting: 'Thank you for calling. How can I help you today?', **_opts) +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`Receptionist` — a new instance of Receptionist + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/prefabs/receptionist.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/receptionist.rb) + +Line 24. + +*** + +### name + +Returns the value of attribute name. + +#### Signature + +```ruby +attr_reader name -> Object +``` + +#### Source + +[`lib/signalwire/prefabs/receptionist.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/receptionist.rb) + +Line 22. + +*** + +### on\_summary + +Lifecycle hook: on\_summary — Python parity +(signalwire.prefabs.receptionist.ReceptionistAgent#on\_summary). + +No-op extension point: the base receptionist does not process the +transfer summary. Subclasses override this to handle the summary +(mirrors Python's `def on_summary(...): pass`). + +#### Signature + +```ruby +def on_summary(_summary, _raw_data = nil) +``` + +#### Parameters + + + conversation summary + + + + full raw POST data + + +#### Returns + +`void` + +#### Source + +[`lib/signalwire/prefabs/receptionist.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/receptionist.rb) + +Line 83. + +*** + +### prompt\_sections + +#### Signature + +```ruby +def prompt_sections +``` + +#### Source + +[`lib/signalwire/prefabs/receptionist.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/receptionist.rb) + +Line 43. + +*** + +### route + +Returns the value of attribute route. + +#### Signature + +```ruby +attr_reader route -> Object +``` + +#### Source + +[`lib/signalwire/prefabs/receptionist.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/receptionist.rb) + +Line 22. + +*** + +### tools + +#### Signature + +```ruby +def tools +``` + +#### Source + +[`lib/signalwire/prefabs/receptionist.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/receptionist.rb) + +Line 39. + +## Source + +[`lib/signalwire/prefabs/receptionist.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/receptionist.rb) + +Line 21. diff --git a/fern/products/sdk-reference/ruby/signal-wire/prefabs/survey/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/prefabs/survey/index.mdx new file mode 100644 index 0000000000..730b2f99b4 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/prefabs/survey/index.mdx @@ -0,0 +1,373 @@ +--- +slug: "/reference/ruby/signal-wire/prefabs/survey" +title: "Survey" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Prefabs::Survey" + parent: "SignalWire::Prefabs" + module: "SignalWire.Prefabs" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/survey.rb" + visibility: "public" +--- +# `Survey` + +Prefab agent for conducting automated surveys. + +agent = Survey.new( +survey\_name: 'Customer Satisfaction', +questions: \[ +\{ 'id' => 'satisfaction', 'text' => 'How satisfied were you?', 'type' => 'rating', 'scale' => 5 \} +] +) + +## Signature + +```ruby +class Survey < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### global\_data + +#### Signature + +```ruby +def global_data +``` + +#### Source + +[`lib/signalwire/prefabs/survey.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/survey.rb) + +Line 52. + +*** + +### handle\_start + +#### Signature + +```ruby +def handle_start(_args, _raw_data) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/prefabs/survey.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/survey.rb) + +Line 63. + +*** + +### handle\_submit + +#### Signature + +```ruby +def handle_submit(args, _raw_data) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/prefabs/survey.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/survey.rb) + +Line 68. + +*** + +### handle\_summary + +#### Signature + +```ruby +def handle_summary(_args, _raw_data) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/prefabs/survey.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/survey.rb) + +Line 72. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(survey_name:, questions:, introduction: nil, conclusion: nil, name: 'survey', route: '/survey', **_opts) +``` + +#### Parameters + + + + + + + + + + + + + + + +#### Returns + +`Survey` — a new instance of Survey + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/prefabs/survey.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/survey.rb) + +Line 26. + +*** + +### log\_response + +Tool: log\_response — Python parity +(signalwire.prefabs.survey.SurveyAgent#log\_response). + +Acknowledges that a validated response has been recorded, naming the +question by its text. A real implementation would persist the answer. + +#### Signature + +```ruby +def log_response(args, _raw_data) +``` + +#### Parameters + + + expects "question\_id", "response" + + + + +#### Returns + +`Swaig::FunctionResult` + +#### Source + +[`lib/signalwire/prefabs/survey.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/survey.rb) + +Line 126. + +*** + +### name + +Returns the value of attribute name. + +#### Signature + +```ruby +attr_reader name -> Object +``` + +#### Source + +[`lib/signalwire/prefabs/survey.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/survey.rb) + +Line 24. + +*** + +### on\_summary + +Lifecycle hook: on\_summary — Python parity +(signalwire.prefabs.survey.SurveyAgent#on\_summary). + +Logs the completed survey results; structured (Hash) summaries are +emitted as pretty JSON. Subclasses override to store responses or +trigger follow-up actions. + +#### Signature + +```ruby +def on_summary(summary, _raw_data = nil) +``` + +#### Parameters + + + survey responses summary + + + + full raw POST data + + +#### Returns + +`void` + +#### Source + +[`lib/signalwire/prefabs/survey.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/survey.rb) + +Line 144. + +*** + +### prompt\_sections + +#### Signature + +```ruby +def prompt_sections +``` + +#### Source + +[`lib/signalwire/prefabs/survey.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/survey.rb) + +Line 42. + +*** + +### questions + +Returns the value of attribute questions. + +#### Signature + +```ruby +attr_reader questions -> Object +``` + +#### Source + +[`lib/signalwire/prefabs/survey.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/survey.rb) + +Line 24. + +*** + +### route + +Returns the value of attribute route. + +#### Signature + +```ruby +attr_reader route -> Object +``` + +#### Source + +[`lib/signalwire/prefabs/survey.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/survey.rb) + +Line 24. + +*** + +### survey\_name + +Returns the value of attribute survey\_name. + +#### Signature + +```ruby +attr_reader survey_name -> Object +``` + +#### Source + +[`lib/signalwire/prefabs/survey.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/survey.rb) + +Line 24. + +*** + +### tools + +#### Signature + +```ruby +def tools +``` + +#### Source + +[`lib/signalwire/prefabs/survey.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/survey.rb) + +Line 38. + +*** + +### validate\_response + +Tool: validate\_response — Python parity +(signalwire.prefabs.survey.SurveyAgent#validate\_response). + +Validates a user's answer against the constraints of the identified +question (rating range, multiple-choice options, yes/no, required +open-ended) and returns a human-readable validity message. + +#### Signature + +```ruby +def validate_response(args, _raw_data) +``` + +#### Parameters + + + expects "question\_id", "response" + + + + +#### Returns + +`Swaig::FunctionResult` + +#### Source + +[`lib/signalwire/prefabs/survey.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/survey.rb) + +Line 85. + +## Source + +[`lib/signalwire/prefabs/survey.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/survey.rb) + +Line 23. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/action-timeout-error/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/action-timeout-error/index.mdx new file mode 100644 index 0000000000..4da016ae3b --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/relay/action-timeout-error/index.mdx @@ -0,0 +1,34 @@ +--- +slug: "/reference/ruby/signal-wire/relay/action-timeout-error" +title: "ActionTimeoutError" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::ActionTimeoutError" + parent: "SignalWire::Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb" + visibility: "public" +--- +# `ActionTimeoutError` + +Raised when an action times out waiting for completion. + +## Signature + +```ruby +class ActionTimeoutError < StandardError +``` + +## Inheritance + +**Extends:** `StandardError` + +## Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 8. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/action/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/action/index.mdx new file mode 100644 index 0000000000..d1422f7a90 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/relay/action/index.mdx @@ -0,0 +1,292 @@ +--- +slug: "/reference/ruby/signal-wire/relay/action" +title: "Action" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::Action" + parent: "SignalWire::Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb" + visibility: "public" +--- +# `Action` + +Base class for async action handles (play, record, detect, etc.). + +Holds a control\_id and back-reference to the Call. Resolves when the +server sends a terminal event for this control\_id. + +Uses Ruby's Queue for blocking wait semantics. + +## Signature + +```ruby +class Action < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### \_check\_event + +Called by Call when an event matches our control\_id. + +#### Signature + +```ruby +def _check_event(event) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 42. + +*** + +### \_resolve + +Mark the action as completed and fire the on\_completed callback. + +#### Signature + +```ruby +def _resolve(event) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 50. + +*** + +### \_set\_on\_completed + +Called internally to set the on\_completed callback from options. + +#### Signature + +```ruby +def _set_on_completed(callback) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 37. + +*** + +### call + +Returns the value of attribute call. + +#### Signature + +```ruby +attr_reader call -> Object +``` + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 17. + +*** + +### completed + +Returns the value of attribute completed. + +#### Signature + +```ruby +attr_reader completed -> Object +``` + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 17. + +*** + +### control\_id + +Returns the value of attribute control\_id. + +#### Signature + +```ruby +attr_reader control_id -> Object +``` + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 17. + +*** + +### done? + +#### Signature + +```ruby +def done? +``` + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 89. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(call, control_id, terminal_event, terminal_states) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`Action` — a new instance of Action + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 19. + +*** + +### is\_done? + +#### Signature + +```ruby +def done? +``` + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 93. + +*** + +### on\_completed + +Set the on\_completed callback. + +#### Signature + +```ruby +def on_completed(&block) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 32. + +*** + +### result + +Returns the value of attribute result. + +#### Signature + +```ruby +attr_reader result -> Object +``` + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 17. + +*** + +### wait + +Wait for the action to complete. Returns the terminal event. +Raises ActionTimeoutError if timeout is specified and exceeded. + +#### Signature + +```ruby +def wait(timeout: nil) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 69. + +## Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 16. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/ai-action/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/ai-action/index.mdx new file mode 100644 index 0000000000..feab7bc2f4 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/relay/ai-action/index.mdx @@ -0,0 +1,76 @@ +--- +slug: "/reference/ruby/signal-wire/relay/ai-action" +title: "AIAction" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::AIAction" + parent: "SignalWire::Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb" + visibility: "public" +--- +# `AIAction` + +Handle for an active AI agent session. + +## Signature + +```ruby +class AIAction < SignalWire::Relay::Action +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::Action](/docs/sdk-reference/reference/ruby/signal-wire/relay/action) + +## Methods + +### initialize + +#### Signature + +```ruby +def initialize(call, control_id) +``` + +#### Parameters + + + + + +#### Returns + +`AIAction` — a new instance of AIAction + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 282. + +*** + +### stop + +#### Signature + +```ruby +def stop +``` + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 286. + +## Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 281. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/call-receive-event/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/call-receive-event/index.mdx new file mode 100644 index 0000000000..555e44ca36 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/relay/call-receive-event/index.mdx @@ -0,0 +1,238 @@ +--- +slug: "/reference/ruby/signal-wire/relay/call-receive-event" +title: "CallReceiveEvent" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::CallReceiveEvent" + parent: "SignalWire::Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" + visibility: "public" +--- +# `CallReceiveEvent` + +calling.call.receive + +## Signature + +```ruby +class CallReceiveEvent < SignalWire::Relay::RelayEvent +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::RelayEvent](/docs/sdk-reference/reference/ruby/signal-wire/relay/relay-event) + +## Methods + +### call\_state + +Returns the value of attribute call\_state. + +#### Signature + +```ruby +attr_reader call_state -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 164. + +*** + +### context + +Returns the value of attribute context. + +#### Signature + +```ruby +attr_reader context -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 164. + +*** + +### device + +Returns the value of attribute device. + +#### Signature + +```ruby +attr_reader device -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 164. + +*** + +### direction + +Returns the value of attribute direction. + +#### Signature + +```ruby +attr_reader direction -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 164. + +*** + +### from\_payload + +#### Signature + +```ruby +def from_payload(payload) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 167. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(call_state: '', direction: '', device: {}, node_id: '', project_id: '', context: '', segment_id: '', tag: '', **base) +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + +#### Returns + +`CallReceiveEvent` — a new instance of CallReceiveEvent + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 184. + +*** + +### node\_id + +Returns the value of attribute node\_id. + +#### Signature + +```ruby +attr_reader node_id -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 164. + +*** + +### project\_id + +Returns the value of attribute project\_id. + +#### Signature + +```ruby +attr_reader project_id -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 164. + +*** + +### segment\_id + +Returns the value of attribute segment\_id. + +#### Signature + +```ruby +attr_reader segment_id -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 164. + +*** + +### tag + +Returns the value of attribute tag. + +#### Signature + +```ruby +attr_reader tag -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 164. + +## Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 163. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/call-state-event/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/call-state-event/index.mdx new file mode 100644 index 0000000000..94d6d847b4 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/relay/call-state-event/index.mdx @@ -0,0 +1,182 @@ +--- +slug: "/reference/ruby/signal-wire/relay/call-state-event" +title: "CallStateEvent" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::CallStateEvent" + parent: "SignalWire::Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" + visibility: "public" +--- +# `CallStateEvent` + +calling.call.state + +## Signature + +```ruby +class CallStateEvent < SignalWire::Relay::RelayEvent +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::RelayEvent](/docs/sdk-reference/reference/ruby/signal-wire/relay/relay-event) + +## Methods + +### call\_state + +Returns the value of attribute call\_state. + +#### Signature + +```ruby +attr_reader call_state -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 122. + +*** + +### device + +Returns the value of attribute device. + +#### Signature + +```ruby +attr_reader device -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 122. + +*** + +### direction + +Returns the value of attribute direction. + +#### Signature + +```ruby +attr_reader direction -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 122. + +*** + +### end\_reason + +Returns the value of attribute end\_reason. + +#### Signature + +```ruby +attr_reader end_reason -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 122. + +*** + +### from\_payload + +#### Signature + +```ruby +def from_payload(payload) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 124. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(call_state: '', end_reason: '', direction: '', device: {}, **base) +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`CallStateEvent` — a new instance of CallStateEvent + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 137. + +*** + +### terminal? + +Typed predicate over \{#call\_state\}, alongside the bare string. +Agrees with \{CallState.terminal?\} — true exactly when the call has +ended (\{CallState::ENDED\}). + +#### Signature + +```ruby +def terminal? +``` + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 150. + +## Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 121. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/call-state/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/call-state/index.mdx new file mode 100644 index 0000000000..670ed16ec5 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/relay/call-state/index.mdx @@ -0,0 +1,107 @@ +--- +slug: "/reference/ruby/signal-wire/relay/call-state" +title: "CallState" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "module" + language: "ruby" + qualified_name: "SignalWire::Relay::CallState" + parent: "SignalWire::Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/constants.rb" + visibility: "public" +--- +# `CallState` + +Named, frozen view over the call-state vocabulary. Additive: the wire +value stays a bare String everywhere (the events carry +call\_state+ as a +String, +Call#state+ is a String), and the flat +CALL\_STATE\_\*+ constants +above remain the single source of the literals. This module wraps them +with the Wave-A/Tier-1 idiom — a frozen +ALL+ ordered list, a frozen ++TERMINAL+ set, and a +terminal?+ predicate — so callers can ask ++CallState.terminal?(state)+ instead of hard-coding +== "ended"+. + +Grounded in +signalwire/relay/constants.py+ (+CALL\_STATES+) — the same +closed, server-emitted lifecycle the Python reference enumerates. +ended+ +is the one terminal state (the call is gone; \{Call#wait\_for\_ended\} +resolves on it). + +## Signature + +```ruby +module CallState +``` + +## Constants + + + + + + + + + + + + + + + +## Methods + +### terminal? + +#### Signature + +```ruby +def terminal?(state) +``` + +#### Parameters + + + a +call\_state+ string. + + +#### Returns + +`Boolean` — true when +state+ is a terminal call state. + +#### Source + +[`lib/signalwire/relay/constants.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/constants.rb) + +Line 62. + +*** + +### valid? + +#### Signature + +```ruby +def valid?(state) +``` + +#### Parameters + + + +#### Returns + +`Boolean` — true when +state+ is a known call state. + +#### Source + +[`lib/signalwire/relay/constants.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/constants.rb) + +Line 68. + +## Source + +[`lib/signalwire/relay/constants.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/constants.rb) + +Line 47. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/call/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/call/index.mdx new file mode 100644 index 0000000000..553fb930ec --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/relay/call/index.mdx @@ -0,0 +1,1873 @@ +--- +slug: "/reference/ruby/signal-wire/relay/call" +title: "Call" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::Call" + parent: "SignalWire::Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb" + visibility: "public" +--- +# `Call` + +Represents a live RELAY call. + +Created by RelayClient on inbound calling.call.receive events or +outbound dial responses. + +## Signature + +```ruby +class Call < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### \_dispatch\_event + +Called by RelayClient when an event arrives for this call. + +#### Signature + +```ruby +def _dispatch_event(payload) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 80. + +*** + +### \_execute + +Send a calling.<method> JSON-RPC request for this call. + +#### Signature + +```ruby +def _execute(method, extra_params = nil) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 49. + +*** + +### \_start\_action + +*** + +#### Action helper + +#### Signature + +```ruby +def _start_action(action, method, params, on_completed: nil) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 251. + +*** + +### \_wait\_for\_state + +Block until the call reaches +target+, returning immediately if the +call is already at or past that state. Backs the typed +wait\_for\_\*+ +helpers below. Mirrors Python's +Call.\_wait\_for\_state+: states are +ordered created \< ringing \< answered \< ending \< ended, and a call +already at/past the target resolves with a synthetic state event +(matching the legacy SDK's short-circuit). + +#### Signature + +```ruby +def _wait_for_state(target, timeout) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 147. + +*** + +### ai + +*** + +#### AI (returns AIAction) + +#### Signature + +```ruby +def ai(control_id: nil, on_completed: nil, **kwargs) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 746. + +*** + +### ai\_hold + +#### Signature + +```ruby +def ai_hold(**kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 466. + +*** + +### ai\_message + +*** + +#### AI + +#### Signature + +```ruby +def ai_message(**kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 462. + +*** + +### ai\_unhold + +#### Signature + +```ruby +def ai_unhold(**kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 470. + +*** + +### amazon\_bedrock + +#### Signature + +```ruby +def amazon_bedrock(**kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 474. + +*** + +### answer + +*** + +#### Call lifecycle methods + +#### Signature + +```ruby +def answer(**kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 282. + +*** + +### bind\_digit + +*** + +#### Digit binding + +#### Signature + +```ruby +def bind_digit(digits:, bind_method:, **kwargs) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 368. + +*** + +### call\_id + +Returns the value of attribute call\_id. + +#### Signature + +```ruby +attr_reader call_id -> Object +``` + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 16. + +*** + +### clear\_digit\_bindings + +#### Signature + +```ruby +def clear_digit_bindings(**kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 374. + +*** + +### collect + +#### Signature + +```ruby +def collect(collect_opts, control_id: nil, on_completed: nil, **kwargs) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 572. + +*** + +### connect + +*** + +#### Connect + +#### Signature + +```ruby +def connect(devices:, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 298. + +*** + +### context + +Returns the value of attribute context. + +#### Signature + +```ruby +attr_reader context -> Object +``` + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 16. + +*** + +### denoise + +*** + +#### Denoise + +#### Signature + +```ruby +def denoise +``` + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 324. + +*** + +### denoise\_stop + +#### Signature + +```ruby +def denoise_stop +``` + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 328. + +*** + +### detect + +*** + +#### Detect + +#### Signature + +```ruby +def detect(detect_opts, timeout: nil, control_id: nil, on_completed: nil, **kwargs) +``` + +#### Parameters + + + + + + + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 614. + +*** + +### detect\_answering\_machine + +Detect human vs answering machine (AMD). Typed convenience over +\#detect. Mirrors Python's +Call.detect\_answering\_machine(\*, +initial\_timeout, end\_silence\_timeout, machine\_voice\_threshold, +machine\_words\_threshold, detect\_interruptions, detect\_message\_end, +timeout, on\_completed)+. + +Wire shape: detect \{ 'type' => 'machine', 'params' => \{ ...only the +provided fields... \} \} with an optional top-level +timeout+. + +#### Signature + +```ruby +def detect_answering_machine(initial_timeout: nil, end_silence_timeout: nil, machine_voice_threshold: nil, machine_words_threshold: nil, detect_interruptions: nil, detect_message_end: nil, timeout: nil, on_completed: nil) +``` + +#### Parameters + + + + + + + + + + + + + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 645. + +*** + +### detect\_digit + +Detect DTMF digits. Typed convenience over #detect. +Mirrors Python's +Call.detect\_digit(\*, digits, timeout, +on\_completed)+. + +Wire shape: detect \{ 'type' => 'digit', 'params' => \{ digits? \} \} with +an optional top-level +timeout+. + +#### Signature + +```ruby +def detect_digit(digits: nil, timeout: nil, on_completed: nil) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 630. + +*** + +### detect\_fax + +Detect a fax tone (CED/CNG). Typed convenience over #detect. +Mirrors Python's +Call.detect\_fax(\*, tone, timeout, on\_completed)+. + +Wire shape: detect \{ 'type' => 'fax', 'params' => \{ tone? \} \} with an +optional top-level +timeout+. + +#### Signature + +```ruby +def detect_fax(tone: nil, timeout: nil, on_completed: nil) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 667. + +*** + +### device + +Returns the value of attribute device. + +#### Signature + +```ruby +attr_reader device -> Object +``` + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 16. + +*** + +### direction + +Returns the value of attribute direction. + +#### Signature + +```ruby +attr_reader direction -> Object +``` + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 16. + +*** + +### disconnect + +#### Signature + +```ruby +def disconnect +``` + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 304. + +*** + +### echo + +*** + +#### Echo + +#### Signature + +```ruby +def echo(**kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 360. + +*** + +### ended? + +#### Signature + +```ruby +def ended? +``` + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 137. + +*** + +### hangup + +#### Signature + +```ruby +def hangup(reason: 'hangup') +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 286. + +*** + +### hold + +*** + +#### Hold / Unhold + +#### Signature + +```ruby +def hold +``` + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 312. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(client, call_id:, node_id:, project_id: '', context: '', tag: '', direction: '', device: {}, state: '', segment_id: '') +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`Call` — a new instance of Call + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 20. + +*** + +### inspect + +#### Signature + +```ruby +def inspect +``` + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 758. + +*** + +### join\_conference + +*** + +#### Conference + +#### Signature + +```ruby +def join_conference(name:, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 346. + +*** + +### join\_room + +*** + +#### Room + +#### Signature + +```ruby +def join_room(name:, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 437. + +*** + +### leave\_conference + +#### Signature + +```ruby +def leave_conference(conference_id:) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 352. + +*** + +### leave\_room + +#### Signature + +```ruby +def leave_room +``` + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 443. + +*** + +### live\_transcribe + +*** + +#### Live transcribe / translate + +#### Signature + +```ruby +def live_transcribe(action:, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 421. + +*** + +### live\_translate + +#### Signature + +```ruby +def live_translate(action:, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 427. + +*** + +### node\_id + +Returns the value of attribute node\_id. + +#### Signature + +```ruby +attr_reader node_id -> Object +``` + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 16. + +*** + +### on + +Register an event listener for this call. + +#### Signature + +```ruby +def on(event_type, &handler) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 73. + +*** + +### pass\_call + +#### Signature + +```ruby +def pass_call +``` + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 290. + +*** + +### pay + +*** + +#### Pay + +#### Signature + +```ruby +def pay(payment_connector_url:, control_id: nil, on_completed: nil, **kwargs) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 734. + +*** + +### play + +*** + +#### Audio playback (returns PlayAction) + +#### Signature + +```ruby +def play(media, volume: nil, direction: nil, loop_count: nil, control_id: nil, on_completed: nil, **kwargs) +``` + +#### Parameters + + + + + + + + + + + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 482. + +*** + +### play\_and\_collect + +*** + +#### Input collection + +#### Signature + +```ruby +def play_and_collect(media, collect, volume: nil, control_id: nil, on_completed: nil, **kwargs) +``` + +#### Parameters + + + + + + + + + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 562. + +*** + +### play\_audio + +Play an audio file from a URL. Typed convenience over #play. +Mirrors Python's +Call.play\_audio(url, \*, volume, on\_completed)+. + +Wire shape: play \[\{ 'type' => 'audio', 'params' => \{ 'url' \} \}] with an +optional top-level +volume+. + +#### Signature + +```ruby +def play_audio(url, volume: nil, on_completed: nil) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 518. + +*** + +### play\_ringtone + +Play a named ringtone by country code. Typed convenience over #play. +Mirrors Python's +Call.play\_ringtone(name, \*, duration, volume, +on\_completed)+. + +Wire shape: play \[\{ 'type' => 'ringtone', 'params' => \{ 'name', +duration? \} \}] with an optional top-level +volume+. + +#### Signature + +```ruby +def play_ringtone(name, duration: nil, volume: nil, on_completed: nil) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 538. + +*** + +### play\_silence + +Play silence for +duration+ seconds. Typed convenience over #play. +Mirrors Python's +Call.play\_silence(duration, \*, on\_completed)+. + +Wire shape: play \[\{ 'type' => 'silence', 'params' => \{ 'duration' \} \}]. + +#### Signature + +```ruby +def play_silence(duration, on_completed: nil) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 527. + +*** + +### play\_tts + +Play text-to-speech. Typed convenience over #play. + +Restores the legacy +call.play\_tts(text)+ ergonomics so callers don't +hand-build the +\{ 'type' => 'tts', 'params' => \{...\} \}+ media shape. +Mirrors Python's +Call.play\_tts(text, \*, language, gender, voice, +volume, on\_completed)+. + +Wire shape: play \[\{ 'type' => 'tts', 'params' => \{ 'text', language?, +gender?, voice? \} \}] with an optional top-level +volume+. + +#### Signature + +```ruby +def play_tts(text, language: nil, gender: nil, voice: nil, volume: nil, on_completed: nil) +``` + +#### Parameters + + + + + + + + + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 503. + +*** + +### project\_id + +Returns the value of attribute project\_id. + +#### Signature + +```ruby +attr_reader project_id -> Object +``` + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 16. + +*** + +### prompt\_audio + +Play an audio file then collect input. Typed media over +\#play\_and\_collect. Mirrors Python's +Call.prompt\_audio(url, collect, +\*, volume, on\_completed)+. + +Wire shape: play\_and\_collect \[\{ 'type' => 'audio', 'params' => +\{ 'url' \} \}] with the given +collect+ object and an optional top-level ++volume+. + +#### Signature + +```ruby +def prompt_audio(url, collect, volume: nil, on_completed: nil) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 605. + +*** + +### prompt\_tts + +Play TTS then collect input. Typed media over #play\_and\_collect. +Mirrors Python's +Call.prompt\_tts(text, collect, \*, language, gender, +voice, volume, on\_completed)+. + +Wire shape: play\_and\_collect \[\{ 'type' => 'tts', 'params' => \{ 'text', +language?, gender?, voice? \} \}] with the given +collect+ object and an +optional top-level +volume+. + +#### Signature + +```ruby +def prompt_tts(text, collect, language: nil, gender: nil, voice: nil, volume: nil, on_completed: nil) +``` + +#### Parameters + + + + + + + + + + + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 588. + +*** + +### queue\_enter + +*** + +#### Queue + +#### Signature + +```ruby +def queue_enter(queue_name:, control_id: nil, **kwargs) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 382. + +*** + +### queue\_leave + +#### Signature + +```ruby +def queue_leave(queue_name:, control_id: nil, **kwargs) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 389. + +*** + +### receive\_fax + +#### Signature + +```ruby +def receive_fax(control_id: nil, on_completed: nil, **kwargs) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 686. + +*** + +### record + +*** + +#### Recording (returns RecordAction) + +#### Signature + +```ruby +def record(audio: nil, control_id: nil, on_completed: nil, **kwargs) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 549. + +*** + +### refer + +*** + +#### Refer (SIP REFER) + +#### Signature + +```ruby +def refer(device:, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 400. + +*** + +### segment\_id + +Returns the value of attribute segment\_id. + +#### Signature + +```ruby +attr_reader segment_id -> Object +``` + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 16. + +*** + +### send\_digits + +*** + +#### Send digits + +#### Signature + +```ruby +def send_digits(digits:, control_id: nil, **kwargs) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 410. + +*** + +### send\_fax + +*** + +#### Fax + +#### Signature + +```ruby +def send_fax(document:, control_id: nil, on_completed: nil, **kwargs) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 678. + +*** + +### state + +Returns the value of attribute state. + +#### Signature + +```ruby +attr_accessor state <-> Object +``` + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 18. + +*** + +### state= + +Sets the attribute state + +#### Signature + +```ruby +attr_accessor state= <-> Object +``` + +#### Parameters + + + the value to set the attribute state to. + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 18. + +*** + +### stream + +*** + +#### Stream + +#### Signature + +```ruby +def stream(url:, control_id: nil, on_completed: nil, **kwargs) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 710. + +*** + +### tag + +Returns the value of attribute tag. + +#### Signature + +```ruby +attr_reader tag -> Object +``` + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 16. + +*** + +### tap\_audio + +*** + +#### Tap + +#### Signature + +```ruby +def tap_audio(tap_opts, device:, control_id: nil, on_completed: nil, **kwargs) +``` + +#### Parameters + + + + + + + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 698. + +*** + +### to\_s + +#### Signature + +```ruby +def to_s +``` + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 754. + +*** + +### transcribe + +*** + +#### Transcribe + +#### Signature + +```ruby +def transcribe(control_id: nil, on_completed: nil, **kwargs) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 722. + +*** + +### transfer + +*** + +#### Transfer + +#### Signature + +```ruby +def transfer(dest:, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 336. + +*** + +### unhold + +#### Signature + +```ruby +def unhold +``` + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 316. + +*** + +### user\_event + +*** + +#### User events + +#### Signature + +```ruby +def user_event(event: nil, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 451. + +*** + +### wait\_for + +Wait for a specific event, optionally filtered by a predicate. + +Python parity: `Call.wait_for(event_type, predicate=None, +timeout=None)`. Registers a one-shot listener for +event\_type+ and +blocks until the first matching event arrives (or +timeout+ seconds +elapse). When +predicate+ is supplied, only events for which it +returns truthy satisfy the wait. The Python coroutine resolves an +asyncio future; the Ruby port blocks the calling thread on a +ConditionVariable, mirroring +#wait\_for\_ended+'s synchronization +model. + +#### Signature + +```ruby +def wait_for(event_type, predicate: nil, timeout: nil) +``` + +#### Parameters + + + the RELAY event type to wait for + + + + + + +#### Returns + +`RelayEvent | nil` — the matching event, or +nil+ on timeout + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 205. + +*** + +### wait\_for\_answered + +Wait until the call is answered (immediate if already answered or past +it). Typed wait over #wait\_for. Mirrors Python's ++Call.wait\_for\_answered(timeout)+. + +#### Signature + +```ruby +def wait_for_answered(timeout: nil) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 172. + +*** + +### wait\_for\_ended + +Wait for the call to reach the ended state. + +#### Signature + +```ruby +def wait_for_ended(timeout: nil) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 119. + +*** + +### wait\_for\_ending + +Wait until the call is ending (immediate if already ending or past +it). Typed wait over #wait\_for. Mirrors Python's ++Call.wait\_for\_ending(timeout)+. + +#### Signature + +```ruby +def wait_for_ending(timeout: nil) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 186. + +*** + +### wait\_for\_ringing + +Wait until the call is ringing (immediate if already ringing or past +it). Typed wait over #wait\_for. Mirrors Python's ++Call.wait\_for\_ringing(timeout)+. + +#### Signature + +```ruby +def wait_for_ringing(timeout: nil) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 179. + +## Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 15. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/calling-error-event/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/calling-error-event/index.mdx new file mode 100644 index 0000000000..e794de5136 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/relay/calling-error-event/index.mdx @@ -0,0 +1,118 @@ +--- +slug: "/reference/ruby/signal-wire/relay/calling-error-event" +title: "CallingErrorEvent" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::CallingErrorEvent" + parent: "SignalWire::Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" + visibility: "public" +--- +# `CallingErrorEvent` + +calling.error + +## Signature + +```ruby +class CallingErrorEvent < SignalWire::Relay::RelayEvent +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::RelayEvent](/docs/sdk-reference/reference/ruby/signal-wire/relay/relay-event) + +## Methods + +### code + +Returns the value of attribute code. + +#### Signature + +```ruby +attr_reader code -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 780. + +*** + +### from\_payload + +#### Signature + +```ruby +def from_payload(payload) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 782. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(code: '', message: '', **base) +``` + +#### Parameters + + + + + + + +#### Returns + +`CallingErrorEvent` — a new instance of CallingErrorEvent + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 793. + +*** + +### message + +Returns the value of attribute message. + +#### Signature + +```ruby +attr_reader message -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 780. + +## Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 779. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/client/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/client/index.mdx new file mode 100644 index 0000000000..00fa34d84e --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/relay/client/index.mdx @@ -0,0 +1,522 @@ +--- +slug: "/reference/ruby/signal-wire/relay/client" +title: "Client" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::Client" + parent: "SignalWire::Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb" + visibility: "public" +--- +# `Client` + +RelayClient -- WebSocket + JSON-RPC 2.0 protocol + event dispatch. + +One instance = one persistent WebSocket connection to SignalWire RELAY. + +Implements the 4 correlation mechanisms: + +1. JSON-RPC id -> pending hash with ConditionVariable +2. call\_id -> Call routing +3. control\_id -> Action tracking per Call +4. tag -> dial correlation + +## Signature + +```ruby +class Client < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### \_authorization\_state + +Return the SDK's tracked authorization-state blob (Python parity: ++RelayClient.\_authorization\_state+). Captured from ++signalwire.authorization.state+ events for use on reconnect. + +#### Signature + +```ruby +def _authorization_state +``` + +#### Source + +[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) + +Line 157. + +*** + +### \_calls\_snapshot + +Return the current call\_id -> Call registry (a snapshot copy). +Test/audit-only surface for asserting on internal routing state; +the Python reference exposes the same via +RelayClient.\_calls+. + +#### Signature + +```ruby +def _calls_snapshot +``` + +#### Source + +[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) + +Line 142. + +*** + +### \_connected? + +True when the client believes the WebSocket is open. Exposed for +tests that need to assert the recv loop is still alive after an +injected error / handler exception. + +#### Signature + +```ruby +def _connected? +``` + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) + +Line 164. + +*** + +### \_set\_protocol + +Test/reconnect surface: stamp a previously issued protocol +string before calling +run+ so the next signalwire.connect frame +carries it (the production server replies with ++session\_restored: true+). Mirrors Python's +RelayClient.\_relay\_protocol = ...+. + +#### Signature + +```ruby +def _set_protocol(value) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) + +Line 150. + +*** + +### dial + +Dial outbound call(s). Returns a Call object. + +#### Signature + +```ruby +def dial(devices, timeout: 120, tag: nil, **kwargs) +``` + +#### Parameters + + + + + + + + + +#### Throws + +- `RelayError` + +#### Source + +[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) + +Line 213. + +*** + +### execute + +Send a JSON-RPC request and wait for the response. +Returns the result hash. Raises RelayError on error. + +#### Signature + +```ruby +def execute(method, params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) + +Line 309. + +*** + +### host + +Returns the value of attribute host. + +#### Signature + +```ruby +attr_reader host -> Object +``` + +#### Source + +[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) + +Line 38. + +*** + +### initialize + +Python parity: +`RelayClient(project=None, token=None, jwt_token=None, +host=None, contexts=None, max_active_calls=None)`. Ruby v1 +accepted `space:` for the same purpose; both keyword names +are honoured for backwards compat. `host` is the canonical +Python name and now drives the WebSocket endpoint. + +#### Signature + +```ruby +def initialize(project: nil, token: nil, jwt_token: nil, host: nil, contexts: ['default'], max_active_calls: nil, space: nil) +``` + +#### Parameters + + + + + + + + + + + + + + + +#### Returns + +`Client` — a new instance of Client + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) + +Line 58. + +*** + +### max\_active\_calls + +Returns the value of attribute max\_active\_calls. + +#### Signature + +```ruby +attr_reader max_active_calls -> Object +``` + +#### Source + +[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) + +Line 38. + +*** + +### on\_call + +Register inbound call handler. + +#### Signature + +```ruby +def on_call(&block) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) + +Line 114. + +*** + +### on\_event + +Register a generic inbound-event handler. Called for every ++signalwire.event+ frame BEFORE the type-specific handlers +(call/message/dial) run. Used by integration probes (e.g. the +audit harness) that need to react to raw events. + +#### Signature + +```ruby +def on_event(&block) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) + +Line 127. + +*** + +### on\_message + +Register inbound message handler. + +#### Signature + +```ruby +def on_message(&block) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) + +Line 119. + +*** + +### project\_id + +Returns the value of attribute project\_id. + +#### Signature + +```ruby +attr_reader project_id -> Object +``` + +#### Source + +[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) + +Line 38. + +*** + +### protocol + +Returns the value of attribute protocol. + +#### Signature + +```ruby +attr_reader protocol -> Object +``` + +#### Source + +[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) + +Line 38. + +*** + +### receive + +*** + +#### Dynamic context subscription + +#### Signature + +```ruby +def receive(contexts) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) + +Line 295. + +*** + +### run + +Connect, authenticate, subscribe, and enter the read loop. +Blocks until stop is called. + +#### Signature + +```ruby +def run +``` + +#### Source + +[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) + +Line 170. + +*** + +### send\_json + +Send an arbitrary JSON-RPC frame to the server. Public surface for +tests, the audit harness, and one-off RELAY methods that don't +have a high-level wrapper. Returns nothing; outbound failures are +silently ignored (matching +\_send\_json+ semantics). + +#### Signature + +```ruby +def send_json(msg) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) + +Line 135. + +*** + +### send\_message + +Send an SMS/MMS message. Returns a Message object. + +Mirrors Python's RelayClient.send\_message keyword-only signature +exactly. At least one of body: or media: is required. + +#### Signature + +```ruby +def send_message(to_number:, from_number:, context: nil, body: nil, media: nil, tags: nil, region: nil, on_completed: nil) +``` + +#### Parameters + + + + + + + + + + + + + + + + + +#### Source + +[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) + +Line 255. + +*** + +### stop + +Graceful shutdown. + +#### Signature + +```ruby +def stop +``` + +#### Source + +[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) + +Line 194. + +*** + +### unreceive + +#### Signature + +```ruby +def unreceive(contexts) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) + +Line 299. + +## Source + +[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) + +Line 37. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/collect-action/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/collect-action/index.mdx new file mode 100644 index 0000000000..b5d7491a8c --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/relay/collect-action/index.mdx @@ -0,0 +1,135 @@ +--- +slug: "/reference/ruby/signal-wire/relay/collect-action" +title: "CollectAction" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::CollectAction" + parent: "SignalWire::Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb" + visibility: "public" +--- +# `CollectAction` + +Handle for play\_and\_collect or standalone collect. + +## Signature + +```ruby +class CollectAction < SignalWire::Relay::Action +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::Action](/docs/sdk-reference/reference/ruby/signal-wire/relay/action) + +## Methods + +### \_check\_event + +play\_and\_collect shares a control\_id across play and collect +phases. Only resolve on collect events, not play events. + +#### Signature + +```ruby +def _check_event(event) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 172. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(call, control_id) +``` + +#### Parameters + + + + + +#### Returns + +`CollectAction` — a new instance of CollectAction + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 165. + +*** + +### start\_input\_timers + +#### Signature + +```ruby +def start_input_timers +``` + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 193. + +*** + +### stop + +#### Signature + +```ruby +def stop +``` + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 183. + +*** + +### volume + +#### Signature + +```ruby +def volume(vol) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 187. + +## Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 164. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/collect-config/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/collect-config/index.mdx new file mode 100644 index 0000000000..b54d386413 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/relay/collect-config/index.mdx @@ -0,0 +1,430 @@ +--- +slug: "/reference/ruby/signal-wire/relay/collect-config" +title: "CollectConfig" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::CollectConfig" + parent: "SignalWire::Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/collect_config.rb" + visibility: "public" +--- +# `CollectConfig` + +A typed RELAY +collect+ configuration: the known-shape options object the +input-collection wrappers (\{Call#collect\}, \{Call#play\_and\_collect\}, +\{Call#prompt\_tts\}, \{Call#prompt\_audio\}) currently take as a raw Hash and +pass through verbatim onto the +calling.collect+ / ++calling.play\_and\_collect+ wire frame. + +The shape is fully grounded in ++porting-sdk/relay-protocol/calling.collect.params.json+: a +digits+ +sub-object (+max+, +min+, +digit\_timeout+, +terminators+), a +speech+ +sub-object (+end\_silence\_timeout+, +hints+, +language+, +model+, ++speech\_timeout+), and top-level toggles (+initial\_timeout+, ++partial\_results+, +continuous+, +send\_start\_of\_input+, ++start\_input\_timers+). +CollectConfig+ types that shape so callers stop +hand-building nested Hashes. + +**No closed-set enum is folded in here:** the collect shape carries _no_ +schema-enumerated value sets — +terminators+ is a free DTMF string, ++language+/+model+ are open vocabularies (ASR language tags / model +names). Inventing an enum would contradict the wire contract. (This is +why ruby's named Tier-3 collect item types only the _shape_; the Tier-1 +enum integration lives in the record/tap/SWAIG items, where the sets +genuinely _are_ closed.) + +This is **additive**: every wrapper still accepts a raw Hash. A ++CollectConfig+ yields the _identical_ wire Hash via \{#to\_h\} (string +keys, only the provided fields present — unset optionals are omitted, so +the frame is byte identical to the hand-built literal the wrapper tests +assert). + +Idiomatic Ruby value object, consistent with the Wave-A relay-event +idioms: Ruby 3.0 pattern matching (+#deconstruct\_keys+), value ++#==+/+#eql?+/+#hash+, and +#to\_h+/+#to\_json+ projections. + +## Signature + +```ruby +class CollectConfig < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Examples + + + + ```ruby + cfg = SignalWire::Relay::CollectConfig.new( + digits: { max: 4, terminators: "#" }, initial_timeout: 5.0 + ) + call.collect(cfg.to_h) + ``` + + + + ```ruby + cfg = SignalWire::Relay::CollectConfig.new( + speech: { end_silence_timeout: 1.0, language: "en-US" } + ) + call.prompt_tts("Say something", cfg.to_h) + ``` + + + +## Methods + +### == + +Value equality: same projected wire shape. + +#### Signature + +```ruby +def ==(other) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/collect_config.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/collect_config.rb) + +Line 127. + +*** + +### continuous + +#### Signature + +```ruby +attr_reader continuous -> Numeric | nil +``` + +#### Returns + +`Numeric | nil` + +#### Source + +[`lib/signalwire/relay/collect_config.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/collect_config.rb) + +Line 59. + +*** + +### deconstruct\_keys + +Ruby 3.0 hash pattern-matching hook. Returns symbol-keyed config with +only the _set_ fields (mirroring \{#to\_h\}'s omit-when-nil contract); a +subset of +keys+ returns only those that are both requested and set. + +#### Signature + +```ruby +def deconstruct_keys(keys) +``` + +#### Parameters + + + +#### Returns + +`Hash{Symbol => Object}` + +#### Source + +[`lib/signalwire/relay/collect_config.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/collect_config.rb) + +Line 112. + +*** + +### digits + +#### Signature + +```ruby +attr_reader digits -> Hash | nil +``` + +#### Returns + +`Hash | nil` — the +digits+ sub-config, or nil. + +#### Source + +[`lib/signalwire/relay/collect_config.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/collect_config.rb) + +Line 53. + +*** + +### eql? + +Value equality: same projected wire shape. + +#### Signature + +```ruby +def ==(other) +``` + +#### Source + +[`lib/signalwire/relay/collect_config.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/collect_config.rb) + +Line 130. + +*** + +### hash + +Hash key parity with \{#==\}. + +#### Signature + +```ruby +def hash +``` + +#### Source + +[`lib/signalwire/relay/collect_config.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/collect_config.rb) + +Line 133. + +*** + +### initial\_timeout + +#### Signature + +```ruby +attr_reader initial_timeout -> Numeric | nil +``` + +#### Returns + +`Numeric | nil` + +#### Source + +[`lib/signalwire/relay/collect_config.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/collect_config.rb) + +Line 59. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(digits: nil, speech: nil, initial_timeout: nil, partial_results: nil, continuous: nil, send_start_of_input: nil, start_input_timers: nil) +``` + +#### Parameters + + + + + + + + + + + + + + + +#### Returns + +`CollectConfig` — a new instance of CollectConfig + +#### Source + +[`lib/signalwire/relay/collect_config.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/collect_config.rb) + +Line 71. + +*** + +### inspect + +#### Signature + +```ruby +def to_s +``` + +#### Source + +[`lib/signalwire/relay/collect_config.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/collect_config.rb) + +Line 140. + +*** + +### partial\_results + +#### Signature + +```ruby +attr_reader partial_results -> Numeric | nil +``` + +#### Returns + +`Numeric | nil` + +#### Source + +[`lib/signalwire/relay/collect_config.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/collect_config.rb) + +Line 59. + +*** + +### send\_start\_of\_input + +#### Signature + +```ruby +attr_reader send_start_of_input -> Numeric | nil +``` + +#### Returns + +`Numeric | nil` + +#### Source + +[`lib/signalwire/relay/collect_config.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/collect_config.rb) + +Line 59. + +*** + +### speech + +#### Signature + +```ruby +attr_reader speech -> Hash | nil +``` + +#### Returns + +`Hash | nil` — the +speech+ sub-config, or nil. + +#### Source + +[`lib/signalwire/relay/collect_config.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/collect_config.rb) + +Line 56. + +*** + +### start\_input\_timers + +#### Signature + +```ruby +attr_reader start_input_timers -> Numeric | nil +``` + +#### Returns + +`Numeric | nil` + +#### Source + +[`lib/signalwire/relay/collect_config.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/collect_config.rb) + +Line 59. + +*** + +### to\_h + +The wire Hash, string-keyed, with **only the provided fields present** +(unset optionals omitted). +digits+/+speech+ sub-Hashes are +key-stringified one level deep. Byte identical to the collect literal a +caller would hand-write and the wrapper tests assert on the journal. + +#### Signature + +```ruby +def to_h +``` + +#### Returns + +`Hash{String => Object}` + +#### Source + +[`lib/signalwire/relay/collect_config.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/collect_config.rb) + +Line 89. + +*** + +### to\_json + +#### Signature + +```ruby +def to_json(*args) +``` + +#### Parameters + + + +#### Returns + +`String` — JSON serialization of \{#to\_h\}. + +#### Source + +[`lib/signalwire/relay/collect_config.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/collect_config.rb) + +Line 102. + +*** + +### to\_s + +#### Signature + +```ruby +def to_s +``` + +#### Source + +[`lib/signalwire/relay/collect_config.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/collect_config.rb) + +Line 137. + +## Source + +[`lib/signalwire/relay/collect_config.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/collect_config.rb) + +Line 51. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/collect-event/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/collect-event/index.mdx new file mode 100644 index 0000000000..62a8d157a2 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/relay/collect-event/index.mdx @@ -0,0 +1,158 @@ +--- +slug: "/reference/ruby/signal-wire/relay/collect-event" +title: "CollectEvent" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::CollectEvent" + parent: "SignalWire::Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" + visibility: "public" +--- +# `CollectEvent` + +calling.call.collect + +## Signature + +```ruby +class CollectEvent < SignalWire::Relay::RelayEvent +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::RelayEvent](/docs/sdk-reference/reference/ruby/signal-wire/relay/relay-event) + +## Methods + +### control\_id + +Returns the value of attribute control\_id. + +#### Signature + +```ruby +attr_reader control_id -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 274. + +*** + +### final + +Returns the value of attribute final. + +#### Signature + +```ruby +attr_reader final -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 274. + +*** + +### from\_payload + +#### Signature + +```ruby +def from_payload(payload) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 276. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(control_id: '', state: '', result_data: {}, final: nil, **base) +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`CollectEvent` — a new instance of CollectEvent + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 289. + +*** + +### result\_data + +Returns the value of attribute result\_data. + +#### Signature + +```ruby +attr_reader result_data -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 274. + +*** + +### state + +Returns the value of attribute state. + +#### Signature + +```ruby +attr_reader state -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 274. + +## Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 273. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/conference-event/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/conference-event/index.mdx new file mode 100644 index 0000000000..701993987d --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/relay/conference-event/index.mdx @@ -0,0 +1,138 @@ +--- +slug: "/reference/ruby/signal-wire/relay/conference-event" +title: "ConferenceEvent" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::ConferenceEvent" + parent: "SignalWire::Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" + visibility: "public" +--- +# `ConferenceEvent` + +calling.conference + +## Signature + +```ruby +class ConferenceEvent < SignalWire::Relay::RelayEvent +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::RelayEvent](/docs/sdk-reference/reference/ruby/signal-wire/relay/relay-event) + +## Methods + +### conference\_id + +Returns the value of attribute conference\_id. + +#### Signature + +```ruby +attr_reader conference_id -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 750. + +*** + +### from\_payload + +#### Signature + +```ruby +def from_payload(payload) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 752. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(conference_id: '', name: '', status: '', **base) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`ConferenceEvent` — a new instance of ConferenceEvent + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 764. + +*** + +### name + +Returns the value of attribute name. + +#### Signature + +```ruby +attr_reader name -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 750. + +*** + +### status + +Returns the value of attribute status. + +#### Signature + +```ruby +attr_reader status -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 750. + +## Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 749. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/connect-event/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/connect-event/index.mdx new file mode 100644 index 0000000000..535fb76754 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/relay/connect-event/index.mdx @@ -0,0 +1,118 @@ +--- +slug: "/reference/ruby/signal-wire/relay/connect-event" +title: "ConnectEvent" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::ConnectEvent" + parent: "SignalWire::Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" + visibility: "public" +--- +# `ConnectEvent` + +calling.call.connect + +## Signature + +```ruby +class ConnectEvent < SignalWire::Relay::RelayEvent +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::RelayEvent](/docs/sdk-reference/reference/ruby/signal-wire/relay/relay-event) + +## Methods + +### connect\_state + +Returns the value of attribute connect\_state. + +#### Signature + +```ruby +attr_reader connect_state -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 307. + +*** + +### from\_payload + +#### Signature + +```ruby +def from_payload(payload) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 309. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(connect_state: '', peer: {}, **base) +``` + +#### Parameters + + + + + + + +#### Returns + +`ConnectEvent` — a new instance of ConnectEvent + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 320. + +*** + +### peer + +Returns the value of attribute peer. + +#### Signature + +```ruby +attr_reader peer -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 307. + +## Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 306. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/denoise-event/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/denoise-event/index.mdx new file mode 100644 index 0000000000..ddeb49e6e5 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/relay/denoise-event/index.mdx @@ -0,0 +1,98 @@ +--- +slug: "/reference/ruby/signal-wire/relay/denoise-event" +title: "DenoiseEvent" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::DenoiseEvent" + parent: "SignalWire::Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" + visibility: "public" +--- +# `DenoiseEvent` + +calling.call.denoise + +## Signature + +```ruby +class DenoiseEvent < SignalWire::Relay::RelayEvent +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::RelayEvent](/docs/sdk-reference/reference/ruby/signal-wire/relay/relay-event) + +## Methods + +### denoised + +Returns the value of attribute denoised. + +#### Signature + +```ruby +attr_reader denoised -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 568. + +*** + +### from\_payload + +#### Signature + +```ruby +def from_payload(payload) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 570. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(denoised: false, **base) +``` + +#### Parameters + + + + + +#### Returns + +`DenoiseEvent` — a new instance of DenoiseEvent + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 580. + +## Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 567. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/detect-action/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/detect-action/index.mdx new file mode 100644 index 0000000000..1f82e47a0d --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/relay/detect-action/index.mdx @@ -0,0 +1,99 @@ +--- +slug: "/reference/ruby/signal-wire/relay/detect-action" +title: "DetectAction" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::DetectAction" + parent: "SignalWire::Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb" + visibility: "public" +--- +# `DetectAction` + +Handle for an active detect operation. + +## Signature + +```ruby +class DetectAction < SignalWire::Relay::Action +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::Action](/docs/sdk-reference/reference/ruby/signal-wire/relay/action) + +## Methods + +### \_check\_event + +Detect delivers results continuously. Resolve on first result or +when finished/error. + +#### Signature + +```ruby +def _check_event(event) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 150. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(call, control_id) +``` + +#### Parameters + + + + + +#### Returns + +`DetectAction` — a new instance of DetectAction + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 144. + +*** + +### stop + +#### Signature + +```ruby +def stop +``` + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 158. + +## Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 143. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/detect-event/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/detect-event/index.mdx new file mode 100644 index 0000000000..bdbdb7a774 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/relay/detect-event/index.mdx @@ -0,0 +1,118 @@ +--- +slug: "/reference/ruby/signal-wire/relay/detect-event" +title: "DetectEvent" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::DetectEvent" + parent: "SignalWire::Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" + visibility: "public" +--- +# `DetectEvent` + +calling.call.detect + +## Signature + +```ruby +class DetectEvent < SignalWire::Relay::RelayEvent +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::RelayEvent](/docs/sdk-reference/reference/ruby/signal-wire/relay/relay-event) + +## Methods + +### control\_id + +Returns the value of attribute control\_id. + +#### Signature + +```ruby +attr_reader control_id -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 335. + +*** + +### detect + +Returns the value of attribute detect. + +#### Signature + +```ruby +attr_reader detect -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 335. + +*** + +### from\_payload + +#### Signature + +```ruby +def from_payload(payload) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 337. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(control_id: '', detect: {}, **base) +``` + +#### Parameters + + + + + + + +#### Returns + +`DetectEvent` — a new instance of DetectEvent + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 348. + +## Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 334. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/device/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/device/index.mdx new file mode 100644 index 0000000000..2274f0a463 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/relay/device/index.mdx @@ -0,0 +1,400 @@ +--- +slug: "/reference/ruby/signal-wire/relay/device" +title: "Device" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::Device" + parent: "SignalWire::Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/device.rb" + visibility: "public" +--- +# `Device` + +A typed RELAY +device+ descriptor: the +\{ "type" => ..., "params" => \{...\} \}+ +object handed to \{Call#connect\}, \{Call#refer\}, \{Call#tap\_audio\}, and +\{Client#dial\} (where it nests inside the +devices+ list-of-lists). + +Across the relay layer this is the single highest-traffic untyped blob: +a phone/sip/agora device is hand-built as a raw Hash at every call site. ++Device+ types the _shape_ — a +type+ discriminant plus a free-form ++params+ map — while leaving +type+ a String, because the discriminant +("phone", "sip", "agora", …) is **not** schema-enumerated in ++porting-sdk/relay-protocol/calling.\{connect,refer,dial,tap\}.params.json+ +(each declares +type+ as a bare +"string"+). Typing it as an enum would +invent a closed set the wire contract does not promise. + +This is **additive**: every relay method still accepts a raw Hash. A ++Device+ is a convenience that yields the _identical_ wire Hash via +\{#to\_h\}, so callers can build one and pass +device.to\_h+ (or pass the ++Device+ where a +#to\_h+-coercible value is expected). The wire shape is ++\{ "type" => <type>, "params" => <params> \}+ with **string** keys, byte +identical to the hand-written literal. + +Idiomatic Ruby value object, consistent with the Wave-A relay-event +idioms (\{RelayEvent\}): Ruby 3.0 pattern matching +(+#deconstruct\_keys+/+#deconstruct+), value +#==+/+#eql?+/+#hash+ so two +devices carrying the same data are interchangeable Set members / Hash +keys, plus +#to\_h+/+#to\_json+ projections. + +## Signature + +```ruby +class Device < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Examples + + + + ```ruby + dev = SignalWire::Relay::Device.phone(to: "+15551112222", from: "+15553334444") + client.dial([[dev.to_h]], tag: "t1") + ``` + + + + ```ruby + case dev + in { type: "phone", params: { to_number: } } + puts "dialing #{to_number}" + end + ``` + + + +## Methods + +### == + +Value equality: same +type+ and same +params+. + +#### Signature + +```ruby +def ==(other) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/device.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/device.rb) + +Line 124. + +*** + +### deconstruct + +Ruby 3.0 array pattern-matching hook, e.g. +in \[type, params]+. + +#### Signature + +```ruby +def deconstruct +``` + +#### Returns + +`Array(String, Hash)` + +#### Source + +[`lib/signalwire/relay/device.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/device.rb) + +Line 119. + +*** + +### deconstruct\_keys + +Ruby 3.0 hash pattern-matching hook, e.g. ++in \{ type: "phone", params: \}+. Returns symbol-keyed +\{ type:, params: \}+ +(idiomatic for Ruby pattern matching); when the matcher requests a +subset of +keys+, only those are returned. + +#### Signature + +```ruby +def deconstruct_keys(keys) +``` + +#### Parameters + + + +#### Returns + +`Hash{Symbol => Object}` + +#### Source + +[`lib/signalwire/relay/device.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/device.rb) + +Line 109. + +*** + +### eql? + +Value equality: same +type+ and same +params+. + +#### Signature + +```ruby +def ==(other) +``` + +#### Source + +[`lib/signalwire/relay/device.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/device.rb) + +Line 127. + +*** + +### hash + +Hash key parity with \{#==\}: equal devices share a hash bucket. + +#### Signature + +```ruby +def hash +``` + +#### Source + +[`lib/signalwire/relay/device.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/device.rb) + +Line 130. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(type, params = {}) +``` + +#### Parameters + + + the device discriminant. + + + + device-specific parameters. Keys are stringified for the wire on \{#to\_h\} so callers may pass symbol keys ergonomically. + + +#### Returns + +`Device` — a new instance of Device + +#### Source + +[`lib/signalwire/relay/device.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/device.rb) + +Line 54. + +*** + +### inspect + +#### Signature + +```ruby +def to_s +``` + +#### Source + +[`lib/signalwire/relay/device.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/device.rb) + +Line 137. + +*** + +### params + +#### Signature + +```ruby +attr_reader params -> Hash +``` + +#### Returns + +`Hash` — the device-specific parameters (string-keyed on the wire). + +#### Source + +[`lib/signalwire/relay/device.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/device.rb) + +Line 49. + +*** + +### phone + +Build a +phone+ device. Convenience over +new("phone", …)+ that builds +the canonical +\{ to\_number:, from\_number:, timeout? \}+ params, omitting ++timeout+ when unset (so the wire shape matches a hand-built literal). + +#### Signature + +```ruby +def phone(to:, from: nil, timeout: nil) +``` + +#### Parameters + + + + + + + +#### Returns + +`Device` + +#### Source + +[`lib/signalwire/relay/device.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/device.rb) + +Line 67. + +*** + +### sip + +Build a +sip+ device. Convenience over +new("sip", …)+. + +#### Signature + +```ruby +def sip(to:, from: nil, headers: nil) +``` + +#### Parameters + + + + + + + +#### Returns + +`Device` + +#### Source + +[`lib/signalwire/relay/device.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/device.rb) + +Line 80. + +*** + +### to\_h + +The wire Hash: +\{ "type" => <type>, "params" => <params> \}+ with string +keys, byte identical to the hand-written device literal. Symbol keys in ++params+ are stringified (one level) so a +Device+ built with symbol +params still serializes the wire spelling. + +#### Signature + +```ruby +def to_h +``` + +#### Returns + +`Hash{String => Object}` + +#### Source + +[`lib/signalwire/relay/device.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/device.rb) + +Line 93. + +*** + +### to\_json + +#### Signature + +```ruby +def to_json(*args) +``` + +#### Parameters + + + +#### Returns + +`String` — JSON serialization of \{#to\_h\}. + +#### Source + +[`lib/signalwire/relay/device.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/device.rb) + +Line 98. + +*** + +### to\_s + +#### Signature + +```ruby +def to_s +``` + +#### Source + +[`lib/signalwire/relay/device.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/device.rb) + +Line 134. + +*** + +### type + +#### Signature + +```ruby +attr_reader type -> String +``` + +#### Returns + +`String` — the device discriminant ("phone", "sip", "agora", …); a free String, not a closed enum (the wire contract does not promise a fixed set). + +#### Source + +[`lib/signalwire/relay/device.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/device.rb) + +Line 46. + +## Source + +[`lib/signalwire/relay/device.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/device.rb) + +Line 42. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/dial-event/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/dial-event/index.mdx new file mode 100644 index 0000000000..cdcb92e5db --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/relay/dial-event/index.mdx @@ -0,0 +1,202 @@ +--- +slug: "/reference/ruby/signal-wire/relay/dial-event" +title: "DialEvent" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::DialEvent" + parent: "SignalWire::Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" + visibility: "public" +--- +# `DialEvent` + +calling.call.dial + +## Signature + +```ruby +class DialEvent < SignalWire::Relay::RelayEvent +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::RelayEvent](/docs/sdk-reference/reference/ruby/signal-wire/relay/relay-event) + +## Methods + +### answered? + +#### Signature + +```ruby +def answered? +``` + +#### Returns + +`Boolean` — true when the dial succeeded (\{DialState::ANSWERED\}). + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 514. + +*** + +### call\_data + +Returns the value of attribute call\_data. + +#### Signature + +```ruby +attr_reader call_data -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 483. + +*** + +### dial\_state + +Returns the value of attribute dial\_state. + +#### Signature + +```ruby +attr_reader dial_state -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 483. + +*** + +### failed? + +#### Signature + +```ruby +def failed? +``` + +#### Returns + +`Boolean` — true when the dial failed (\{DialState::FAILED\}). + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 519. + +*** + +### from\_payload + +#### Signature + +```ruby +def from_payload(payload) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 485. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(tag: '', dial_state: '', call_data: {}, **base) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`DialEvent` — a new instance of DialEvent + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 497. + +*** + +### tag + +Returns the value of attribute tag. + +#### Signature + +```ruby +attr_reader tag -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 483. + +*** + +### terminal? + +Typed predicate over \{#dial\_state\}, alongside the bare string. +Agrees with \{DialState.terminal?\} — true when the dial has resolved +(answered or failed). + +#### Signature + +```ruby +def terminal? +``` + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 509. + +## Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 482. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/dial-state/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/dial-state/index.mdx new file mode 100644 index 0000000000..d24b67157c --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/relay/dial-state/index.mdx @@ -0,0 +1,117 @@ +--- +slug: "/reference/ruby/signal-wire/relay/dial-state" +title: "DialState" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "module" + language: "ruby" + qualified_name: "SignalWire::Relay::DialState" + parent: "SignalWire::Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/constants.rb" + visibility: "public" +--- +# `DialState` + +Named, frozen view over the outbound-dial vocabulary. Unlike call/message +states, the reference exposes _no_ flat dial-state constants — the values +are grounded in +signalwire/relay/client.py+'s ++_handle\_dial\_event+ docstring ("`dial_state` — `dialing` | +`answered` | `failed`") and the mock dial-dance. This module names +them (+DIAL\_STATE_\*+ above are the single source) and adds +ALL+ + ++TERMINAL+ + +terminal?+. + +Both +answered+ and +failed+ are terminal: \{Client#dial\} resolves to a +\{Call\} on +answered+ and raises \{RelayError\} on +failed+; +dialing+ is +the only in-flight state. + +## Signature + +```ruby +module DialState +``` + +## Constants + + + + + + + + + + + +## Methods + +### terminal? + +#### Signature + +```ruby +def terminal?(state) +``` + +#### Parameters + + + a +dial\_state+ string. + + +#### Returns + +`Boolean` — true when +state+ resolves the dial. + +#### Source + +[`lib/signalwire/relay/constants.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/constants.rb) + +Line 126. + +*** + +### valid? + +#### Signature + +```ruby +def valid?(state) +``` + +#### Parameters + + + +#### Returns + +`Boolean` — true when +state+ is a known dial state. + +#### Source + +[`lib/signalwire/relay/constants.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/constants.rb) + +Line 132. + +## Source + +[`lib/signalwire/relay/constants.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/constants.rb) + +Line 106. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/echo-event/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/echo-event/index.mdx new file mode 100644 index 0000000000..ec466e9f28 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/relay/echo-event/index.mdx @@ -0,0 +1,98 @@ +--- +slug: "/reference/ruby/signal-wire/relay/echo-event" +title: "EchoEvent" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::EchoEvent" + parent: "SignalWire::Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" + visibility: "public" +--- +# `EchoEvent` + +calling.call.echo + +## Signature + +```ruby +class EchoEvent < SignalWire::Relay::RelayEvent +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::RelayEvent](/docs/sdk-reference/reference/ruby/signal-wire/relay/relay-event) + +## Methods + +### from\_payload + +#### Signature + +```ruby +def from_payload(payload) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 662. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(state: '', **base) +``` + +#### Parameters + + + + + +#### Returns + +`EchoEvent` — a new instance of EchoEvent + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 672. + +*** + +### state + +Returns the value of attribute state. + +#### Signature + +```ruby +attr_reader state -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 660. + +## Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 659. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/fax-action/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/fax-action/index.mdx new file mode 100644 index 0000000000..59e4b659a0 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/relay/fax-action/index.mdx @@ -0,0 +1,78 @@ +--- +slug: "/reference/ruby/signal-wire/relay/fax-action" +title: "FaxAction" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::FaxAction" + parent: "SignalWire::Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb" + visibility: "public" +--- +# `FaxAction` + +Handle for send\_fax or receive\_fax. + +## Signature + +```ruby +class FaxAction < SignalWire::Relay::Action +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::Action](/docs/sdk-reference/reference/ruby/signal-wire/relay/action) + +## Methods + +### initialize + +#### Signature + +```ruby +def initialize(call, control_id, method_prefix) +``` + +#### Parameters + + + + + + + +#### Returns + +`FaxAction` — a new instance of FaxAction + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 226. + +*** + +### stop + +#### Signature + +```ruby +def stop +``` + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 231. + +## Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 225. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/fax-event/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/fax-event/index.mdx new file mode 100644 index 0000000000..2d3cf8d634 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/relay/fax-event/index.mdx @@ -0,0 +1,118 @@ +--- +slug: "/reference/ruby/signal-wire/relay/fax-event" +title: "FaxEvent" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::FaxEvent" + parent: "SignalWire::Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" + visibility: "public" +--- +# `FaxEvent` + +calling.call.fax + +## Signature + +```ruby +class FaxEvent < SignalWire::Relay::RelayEvent +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::RelayEvent](/docs/sdk-reference/reference/ruby/signal-wire/relay/relay-event) + +## Methods + +### control\_id + +Returns the value of attribute control\_id. + +#### Signature + +```ruby +attr_reader control_id -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 363. + +*** + +### fax + +Returns the value of attribute fax. + +#### Signature + +```ruby +attr_reader fax -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 363. + +*** + +### from\_payload + +#### Signature + +```ruby +def from_payload(payload) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 365. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(control_id: '', fax: {}, **base) +``` + +#### Parameters + + + + + + + +#### Returns + +`FaxEvent` — a new instance of FaxEvent + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 376. + +## Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 362. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/hold-event/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/hold-event/index.mdx new file mode 100644 index 0000000000..40a3f6707f --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/relay/hold-event/index.mdx @@ -0,0 +1,98 @@ +--- +slug: "/reference/ruby/signal-wire/relay/hold-event" +title: "HoldEvent" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::HoldEvent" + parent: "SignalWire::Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" + visibility: "public" +--- +# `HoldEvent` + +calling.call.hold + +## Signature + +```ruby +class HoldEvent < SignalWire::Relay::RelayEvent +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::RelayEvent](/docs/sdk-reference/reference/ruby/signal-wire/relay/relay-event) + +## Methods + +### from\_payload + +#### Signature + +```ruby +def from_payload(payload) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 726. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(state: '', **base) +``` + +#### Parameters + + + + + +#### Returns + +`HoldEvent` — a new instance of HoldEvent + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 736. + +*** + +### state + +Returns the value of attribute state. + +#### Signature + +```ruby +attr_reader state -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 724. + +## Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 723. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/index.mdx new file mode 100644 index 0000000000..e9109ea5f5 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/relay/index.mdx @@ -0,0 +1,461 @@ +--- +slug: "/reference/ruby/signal-wire/relay" +title: "Relay" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "module" + language: "ruby" + qualified_name: "SignalWire::Relay" + parent: "SignalWire" + module: "SignalWire" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb" + visibility: "public" +--- +# `Relay` + +## Signature + +```ruby +module Relay +``` + +## Constants + + + + + + + Call states + + + + + + + + + + + + + + Connect states + + + + + + + + Default host + + + + + + + + Detect types + + + + + + Dial states (the +dial\_state+ field on calling.call.dial events) + + + + + + + + + + + + + + + + End reasons + + + + + + + + + + Authorization state event + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Event types — calling + + + + + + + + + + + + Map event\_type string to typed event class + + + + + + Messaging event types + + + + + + + + + + + + Message states + + + + + + + + + + + + JSON-RPC methods + + + + + + + + + + + + + + + + + + + + Play states + + + + Protocol version sent during signalwire.connect + + + + + + + + Reconnect settings + + + + + + + + + + Record states + + + + + + Join room states + + + + + + +## Classes + + + + Base class for async action handles (play, record, detect, etc.). + + + + Raised when an action times out waiting for completion. + + + + Handle for an active AI agent session. + + + + Represents a live RELAY call. + + + + calling.error + + + + calling.call.receive + + + + calling.call.state + + + + RelayClient -- WebSocket + JSON-RPC 2.0 protocol + event dispatch. + + + + Handle for play\_and\_collect or standalone collect. + + + + A typed RELAY +collect+ configuration: the known-shape options object the input-collection wrappers (\{Call#collect\}, \{Call#play\_and\_collect\}, \{Call#prompt\_tts\}, \{Call#prompt\_audio\}) currently take as a raw Hash and pass through verbatim onto the +calling.collect+ / +calling.play\_and\_collect+ wire frame. + + + + calling.call.collect + + + + calling.conference + + + + calling.call.connect + + + + calling.call.denoise + + + + Handle for an active detect operation. + + + + calling.call.detect + + + + A typed RELAY +device+ descriptor: the +\{ "type" => ..., "params" => \{...\} \}+ object handed to \{Call#connect\}, \{Call#refer\}, \{Call#tap\_audio\}, and \{Client#dial\} (where it nests inside the +devices+ list-of-lists). + + + + calling.call.dial + + + + calling.call.echo + + + + Handle for send\_fax or receive\_fax. + + + + calling.call.fax + + + + calling.call.hold + + + + Represents a single SMS/MMS message. + + + + messaging.receive + + + + messaging.state + + + + Handle for an active pay operation. + + + + calling.call.pay + + + + Handle for an active play operation. + + + + calling.call.play + + + + calling.call.queue + + + + Handle for an active record operation. + + + + calling.call.record + + + + calling.call.refer + + + + Raised for RELAY JSON-RPC errors. + + + + Base event wrapper for raw signalwire.event payloads. Subclasses provide typed accessors for specific event types. + + + + calling.call.send\_digits + + + + Handle for standalone calling.collect (without play). + + + + Handle for an active stream operation. + + + + calling.call.stream + + + + Handle for an active tap operation. + + + + calling.call.tap + + + + Handle for an active transcribe operation. + + + + calling.call.transcribe + + + +## Modules + + + + Named, frozen view over the call-state vocabulary. Additive: the wire value stays a bare String everywhere (the events carry +call\_state+ as a String, +Call#state+ is a String), and the flat +CALL\_STATE\_\*+ constants above remain the single source of the literals. This module wraps them with the Wave-A/Tier-1 idiom — a frozen +ALL+ ordered list, a frozen +TERMINAL+ set, and a +terminal?+ predicate — so callers can ask +CallState.terminal?(state)+ instead of hard-coding +== "ended"+. + + + + Named, frozen view over the outbound-dial vocabulary. Unlike call/message states, the reference exposes _no_ flat dial-state constants — the values are grounded in +signalwire/relay/client.py+'s +_handle\_dial\_event+ docstring ("`dial_state` — `dialing` | `answered` | `failed`") and the mock dial-dance. This module names them (+DIAL\_STATE_\*+ above are the single source) and adds +ALL+ + +TERMINAL+ + +terminal?+. + + + + Named, frozen view over the messaging-state vocabulary. Additive: the wire value stays a bare String (+Message#state+, the +message\_state+ event field). Wraps the flat +MESSAGE\_STATE\_\*+ constants (the single source of the literals) with +ALL+ + +TERMINAL+ + +terminal?+, so callers can ask +MessageState.terminal?(state)+ instead of re-deriving the set. + + + +## Methods + +### parse\_event + +Parse a raw signalwire.event params hash into a typed event object. + +#### Signature + +```ruby +def parse_event(payload) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 945. + +## Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 10. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/message-receive-event/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/message-receive-event/index.mdx new file mode 100644 index 0000000000..15d524b0a4 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/relay/message-receive-event/index.mdx @@ -0,0 +1,278 @@ +--- +slug: "/reference/ruby/signal-wire/relay/message-receive-event" +title: "MessageReceiveEvent" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::MessageReceiveEvent" + parent: "SignalWire::Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" + visibility: "public" +--- +# `MessageReceiveEvent` + +messaging.receive + +## Signature + +```ruby +class MessageReceiveEvent < SignalWire::Relay::RelayEvent +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::RelayEvent](/docs/sdk-reference/reference/ruby/signal-wire/relay/relay-event) + +## Methods + +### body + +Returns the value of attribute body. + +#### Signature + +```ruby +attr_reader body -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 808. + +*** + +### context + +Returns the value of attribute context. + +#### Signature + +```ruby +attr_reader context -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 808. + +*** + +### direction + +Returns the value of attribute direction. + +#### Signature + +```ruby +attr_reader direction -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 808. + +*** + +### from\_number + +Returns the value of attribute from\_number. + +#### Signature + +```ruby +attr_reader from_number -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 808. + +*** + +### from\_payload + +#### Signature + +```ruby +def from_payload(payload) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 811. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(message_id: '', context: '', direction: '', from_number: '', to_number: '', body: '', media: [], segments: 0, message_state: '', tags: [], **base) +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`MessageReceiveEvent` — a new instance of MessageReceiveEvent + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 830. + +*** + +### media + +Returns the value of attribute media. + +#### Signature + +```ruby +attr_reader media -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 808. + +*** + +### message\_id + +Returns the value of attribute message\_id. + +#### Signature + +```ruby +attr_reader message_id -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 808. + +*** + +### message\_state + +Returns the value of attribute message\_state. + +#### Signature + +```ruby +attr_reader message_state -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 808. + +*** + +### segments + +Returns the value of attribute segments. + +#### Signature + +```ruby +attr_reader segments -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 808. + +*** + +### tags + +Returns the value of attribute tags. + +#### Signature + +```ruby +attr_reader tags -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 808. + +*** + +### to\_number + +Returns the value of attribute to\_number. + +#### Signature + +```ruby +attr_reader to_number -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 808. + +## Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 807. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/message-state-event/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/message-state-event/index.mdx new file mode 100644 index 0000000000..dd923fb26e --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/relay/message-state-event/index.mdx @@ -0,0 +1,322 @@ +--- +slug: "/reference/ruby/signal-wire/relay/message-state-event" +title: "MessageStateEvent" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::MessageStateEvent" + parent: "SignalWire::Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" + visibility: "public" +--- +# `MessageStateEvent` + +messaging.state + +## Signature + +```ruby +class MessageStateEvent < SignalWire::Relay::RelayEvent +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::RelayEvent](/docs/sdk-reference/reference/ruby/signal-wire/relay/relay-event) + +## Methods + +### body + +Returns the value of attribute body. + +#### Signature + +```ruby +attr_reader body -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 858. + +*** + +### context + +Returns the value of attribute context. + +#### Signature + +```ruby +attr_reader context -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 858. + +*** + +### direction + +Returns the value of attribute direction. + +#### Signature + +```ruby +attr_reader direction -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 858. + +*** + +### from\_number + +Returns the value of attribute from\_number. + +#### Signature + +```ruby +attr_reader from_number -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 858. + +*** + +### from\_payload + +#### Signature + +```ruby +def from_payload(payload) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 861. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(message_id: '', context: '', direction: '', from_number: '', to_number: '', body: '', media: [], segments: 0, message_state: '', reason: '', tags: [], **base) +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`MessageStateEvent` — a new instance of MessageStateEvent + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 881. + +*** + +### media + +Returns the value of attribute media. + +#### Signature + +```ruby +attr_reader media -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 858. + +*** + +### message\_id + +Returns the value of attribute message\_id. + +#### Signature + +```ruby +attr_reader message_id -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 858. + +*** + +### message\_state + +Returns the value of attribute message\_state. + +#### Signature + +```ruby +attr_reader message_state -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 858. + +*** + +### reason + +Returns the value of attribute reason. + +#### Signature + +```ruby +attr_reader reason -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 858. + +*** + +### segments + +Returns the value of attribute segments. + +#### Signature + +```ruby +attr_reader segments -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 858. + +*** + +### tags + +Returns the value of attribute tags. + +#### Signature + +```ruby +attr_reader tags -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 858. + +*** + +### terminal? + +Typed predicate over \{#message\_state\}, alongside the bare string. +Agrees with \{MessageState.terminal?\} — true when the message has +reached a final delivery outcome (delivered / undelivered / failed). + +#### Signature + +```ruby +def terminal? +``` + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 903. + +*** + +### to\_number + +Returns the value of attribute to\_number. + +#### Signature + +```ruby +attr_reader to_number -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 858. + +## Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 857. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/message-state/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/message-state/index.mdx new file mode 100644 index 0000000000..1efa269f51 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/relay/message-state/index.mdx @@ -0,0 +1,116 @@ +--- +slug: "/reference/ruby/signal-wire/relay/message-state" +title: "MessageState" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "module" + language: "ruby" + qualified_name: "SignalWire::Relay::MessageState" + parent: "SignalWire::Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/constants.rb" + visibility: "public" +--- +# `MessageState` + +Named, frozen view over the messaging-state vocabulary. Additive: the +wire value stays a bare String (+Message#state+, the +message\_state+ +event field). Wraps the flat +MESSAGE\_STATE\_\*+ constants (the single +source of the literals) with +ALL+ + +TERMINAL+ + +terminal?+, so callers +can ask +MessageState.terminal?(state)+ instead of re-deriving the set. + +Grounded in +signalwire/relay/constants.py+: the terminal set is ++MESSAGE\_TERMINAL\_STATES+ (\{delivered, undelivered, failed\}) — the same +set the Python reference uses to resolve a sent message's final outcome. + +## Signature + +```ruby +module MessageState +``` + +## Constants + + + + + + + + + + + + + + + + + + + +## Methods + +### terminal? + +#### Signature + +```ruby +def terminal?(state) +``` + +#### Parameters + + + a +message\_state+ string. + + +#### Returns + +`Boolean` — true when +state+ is a terminal messaging state. + +#### Source + +[`lib/signalwire/relay/constants.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/constants.rb) + +Line 212. + +*** + +### valid? + +#### Signature + +```ruby +def valid?(state) +``` + +#### Parameters + + + +#### Returns + +`Boolean` — true when +state+ is a known messaging state. + +#### Source + +[`lib/signalwire/relay/constants.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/constants.rb) + +Line 218. + +## Source + +[`lib/signalwire/relay/constants.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/constants.rb) + +Line 187. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/message/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/message/index.mdx new file mode 100644 index 0000000000..1e9537d07c --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/relay/message/index.mdx @@ -0,0 +1,677 @@ +--- +slug: "/reference/ruby/signal-wire/relay/message" +title: "Message" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::Message" + parent: "SignalWire::Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb" + visibility: "public" +--- +# `Message` + +Represents a single SMS/MMS message. + +For outbound messages, use message.wait to block until a terminal state +(delivered, undelivered, failed) is reached. + +## Signature + +```ruby +class Message < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### \_dispatch\_event + +Handle a messaging.state event for this message. + +#### Signature + +```ruby +def _dispatch_event(payload) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) + +Line 99. + +*** + +### \_set\_on\_completed + +Set the on\_completed callback from options. + +#### Signature + +```ruby +def _set_on_completed(callback) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) + +Line 47. + +*** + +### == + +Value equality over the message's data (ignores completion state). + +#### Signature + +```ruby +def ==(other) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) + +Line 173. + +*** + +### body + +Returns the value of attribute body. + +#### Signature + +```ruby +attr_reader body -> Object +``` + +#### Source + +[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) + +Line 13. + +*** + +### context + +Returns the value of attribute context. + +#### Signature + +```ruby +attr_reader context -> Object +``` + +#### Source + +[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) + +Line 13. + +*** + +### deconstruct + +Array pattern matching: the stable identity triple. + +#### Signature + +```ruby +def deconstruct +``` + +#### Returns + +`Array` + +#### Source + +[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) + +Line 168. + +*** + +### deconstruct\_keys + +Ruby 3.0 pattern matching: +case msg; in \{ direction:, body: \}+. + +#### Signature + +```ruby +def deconstruct_keys(keys) +``` + +#### Parameters + + + +#### Returns + +`Hash{Symbol => Object}` + +#### Source + +[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) + +Line 157. + +*** + +### direction + +Returns the value of attribute direction. + +#### Signature + +```ruby +attr_reader direction -> Object +``` + +#### Source + +[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) + +Line 13. + +*** + +### done? + +#### Signature + +```ruby +def done? +``` + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) + +Line 56. + +*** + +### eql? + +Value equality over the message's data (ignores completion state). + +#### Signature + +```ruby +def ==(other) +``` + +#### Source + +[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) + +Line 176. + +*** + +### from\_number + +Returns the value of attribute from\_number. + +#### Signature + +```ruby +attr_reader from_number -> Object +``` + +#### Source + +[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) + +Line 13. + +*** + +### hash + +Hash parity with \{#==\} so equal messages share a bucket. + +#### Signature + +```ruby +def hash +``` + +#### Source + +[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) + +Line 179. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(message_id: '', context: '', direction: '', from_number: '', to_number: '', body: '', media: nil, segments: 0, state: '', reason: '', tags: nil) +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`Message` — a new instance of Message + +#### Source + +[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) + +Line 17. + +*** + +### inspect + +#### Signature + +```ruby +def inspect +``` + +#### Source + +[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) + +Line 126. + +*** + +### is\_done? + +#### Signature + +```ruby +def done? +``` + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) + +Line 60. + +*** + +### media + +Returns the value of attribute media. + +#### Signature + +```ruby +attr_reader media -> Object +``` + +#### Source + +[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) + +Line 13. + +*** + +### message\_id + +Returns the value of attribute message\_id. + +#### Signature + +```ruby +attr_reader message_id -> Object +``` + +#### Source + +[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) + +Line 13. + +*** + +### on\_completed + +Set the on\_completed callback. + +#### Signature + +```ruby +def on_completed(&block) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) + +Line 42. + +*** + +### on\_event + +Register an event listener for state changes. + +#### Signature + +```ruby +def on_event(&handler) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) + +Line 52. + +*** + +### reason + +Returns the value of attribute reason. + +#### Signature + +```ruby +attr_reader reason -> Object +``` + +#### Source + +[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) + +Line 13. + +*** + +### result + +#### Signature + +```ruby +def result +``` + +#### Source + +[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) + +Line 72. + +*** + +### segments + +Returns the value of attribute segments. + +#### Signature + +```ruby +attr_reader segments -> Object +``` + +#### Source + +[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) + +Line 13. + +*** + +### state + +Returns the value of attribute state. + +#### Signature + +```ruby +attr_accessor state <-> Object +``` + +#### Source + +[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) + +Line 15. + +*** + +### state= + +Sets the attribute state + +#### Signature + +```ruby +attr_accessor state= <-> Object +``` + +#### Parameters + + + the value to set the attribute state to. + + +#### Source + +[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) + +Line 15. + +*** + +### tags + +Returns the value of attribute tags. + +#### Signature + +```ruby +attr_reader tags -> Object +``` + +#### Source + +[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) + +Line 13. + +*** + +### terminal? + +Typed predicate over \{#state\}, alongside the bare string. Agrees with +\{MessageState.terminal?\} — true once the message has reached a final +delivery outcome (delivered / undelivered / failed), which is exactly +when \{#wait\} unblocks. + +#### Signature + +```ruby +def terminal? +``` + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) + +Line 68. + +*** + +### to\_h + +Semantic Hash view of the message's value fields (the completion +machinery — mutex/condition/callbacks — is excluded). Symbol keys, +idiomatic for Ruby. @return \[Hash\{Symbol => Object\}] + +#### Signature + +```ruby +def to_h +``` + +#### Source + +[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) + +Line 133. + +*** + +### to\_json + +#### Signature + +```ruby +def to_json(*args) +``` + +#### Parameters + + + +#### Returns + +`String` — JSON serialization of \{#to\_h\}. + +#### Source + +[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) + +Line 150. + +*** + +### to\_number + +Returns the value of attribute to\_number. + +#### Signature + +```ruby +attr_reader to_number -> Object +``` + +#### Source + +[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) + +Line 13. + +*** + +### to\_s + +#### Signature + +```ruby +def to_s +``` + +#### Source + +[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) + +Line 121. + +*** + +### wait + +Wait for the message to reach a terminal state. +Raises ActionTimeoutError if timeout exceeded. + +#### Signature + +```ruby +def wait(timeout: nil) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) + +Line 78. + +## Source + +[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) + +Line 12. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/pay-action/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/pay-action/index.mdx new file mode 100644 index 0000000000..55e86c82e7 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/relay/pay-action/index.mdx @@ -0,0 +1,76 @@ +--- +slug: "/reference/ruby/signal-wire/relay/pay-action" +title: "PayAction" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::PayAction" + parent: "SignalWire::Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb" + visibility: "public" +--- +# `PayAction` + +Handle for an active pay operation. + +## Signature + +```ruby +class PayAction < SignalWire::Relay::Action +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::Action](/docs/sdk-reference/reference/ruby/signal-wire/relay/action) + +## Methods + +### initialize + +#### Signature + +```ruby +def initialize(call, control_id) +``` + +#### Parameters + + + + + +#### Returns + +`PayAction` — a new instance of PayAction + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 260. + +*** + +### stop + +#### Signature + +```ruby +def stop +``` + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 264. + +## Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 259. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/pay-event/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/pay-event/index.mdx new file mode 100644 index 0000000000..c7f78b2f02 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/relay/pay-event/index.mdx @@ -0,0 +1,118 @@ +--- +slug: "/reference/ruby/signal-wire/relay/pay-event" +title: "PayEvent" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::PayEvent" + parent: "SignalWire::Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" + visibility: "public" +--- +# `PayEvent` + +calling.call.pay + +## Signature + +```ruby +class PayEvent < SignalWire::Relay::RelayEvent +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::RelayEvent](/docs/sdk-reference/reference/ruby/signal-wire/relay/relay-event) + +## Methods + +### control\_id + +Returns the value of attribute control\_id. + +#### Signature + +```ruby +attr_reader control_id -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 594. + +*** + +### from\_payload + +#### Signature + +```ruby +def from_payload(payload) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 596. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(control_id: '', state: '', **base) +``` + +#### Parameters + + + + + + + +#### Returns + +`PayEvent` — a new instance of PayEvent + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 607. + +*** + +### state + +Returns the value of attribute state. + +#### Signature + +```ruby +attr_reader state -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 594. + +## Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 593. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/play-action/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/play-action/index.mdx new file mode 100644 index 0000000000..3ecdc3080e --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/relay/play-action/index.mdx @@ -0,0 +1,128 @@ +--- +slug: "/reference/ruby/signal-wire/relay/play-action" +title: "PlayAction" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::PlayAction" + parent: "SignalWire::Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb" + visibility: "public" +--- +# `PlayAction` + +Handle for an active play operation. + +## Signature + +```ruby +class PlayAction < SignalWire::Relay::Action +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::Action](/docs/sdk-reference/reference/ruby/signal-wire/relay/action) + +## Methods + +### initialize + +#### Signature + +```ruby +def initialize(call, control_id) +``` + +#### Parameters + + + + + +#### Returns + +`PlayAction` — a new instance of PlayAction + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 98. + +*** + +### pause + +#### Signature + +```ruby +def pause +``` + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 107. + +*** + +### resume + +#### Signature + +```ruby +def resume +``` + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 111. + +*** + +### stop + +#### Signature + +```ruby +def stop +``` + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 103. + +*** + +### volume + +#### Signature + +```ruby +def volume(vol) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 115. + +## Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 97. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/play-event/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/play-event/index.mdx new file mode 100644 index 0000000000..c1366b9466 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/relay/play-event/index.mdx @@ -0,0 +1,118 @@ +--- +slug: "/reference/ruby/signal-wire/relay/play-event" +title: "PlayEvent" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::PlayEvent" + parent: "SignalWire::Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" + visibility: "public" +--- +# `PlayEvent` + +calling.call.play + +## Signature + +```ruby +class PlayEvent < SignalWire::Relay::RelayEvent +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::RelayEvent](/docs/sdk-reference/reference/ruby/signal-wire/relay/relay-event) + +## Methods + +### control\_id + +Returns the value of attribute control\_id. + +#### Signature + +```ruby +attr_reader control_id -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 208. + +*** + +### from\_payload + +#### Signature + +```ruby +def from_payload(payload) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 210. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(control_id: '', state: '', **base) +``` + +#### Parameters + + + + + + + +#### Returns + +`PlayEvent` — a new instance of PlayEvent + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 221. + +*** + +### state + +Returns the value of attribute state. + +#### Signature + +```ruby +attr_reader state -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 208. + +## Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 207. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/queue-event/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/queue-event/index.mdx new file mode 100644 index 0000000000..4f4d165f39 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/relay/queue-event/index.mdx @@ -0,0 +1,198 @@ +--- +slug: "/reference/ruby/signal-wire/relay/queue-event" +title: "QueueEvent" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::QueueEvent" + parent: "SignalWire::Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" + visibility: "public" +--- +# `QueueEvent` + +calling.call.queue + +## Signature + +```ruby +class QueueEvent < SignalWire::Relay::RelayEvent +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::RelayEvent](/docs/sdk-reference/reference/ruby/signal-wire/relay/relay-event) + +## Methods + +### control\_id + +Returns the value of attribute control\_id. + +#### Signature + +```ruby +attr_reader control_id -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 622. + +*** + +### from\_payload + +#### Signature + +```ruby +def from_payload(payload) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 624. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(control_id: '', status: '', queue_id: '', queue_name: '', position: 0, size: 0, **base) +``` + +#### Parameters + + + + + + + + + + + + + + + +#### Returns + +`QueueEvent` — a new instance of QueueEvent + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 639. + +*** + +### position + +Returns the value of attribute position. + +#### Signature + +```ruby +attr_reader position -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 622. + +*** + +### queue\_id + +Returns the value of attribute queue\_id. + +#### Signature + +```ruby +attr_reader queue_id -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 622. + +*** + +### queue\_name + +Returns the value of attribute queue\_name. + +#### Signature + +```ruby +attr_reader queue_name -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 622. + +*** + +### size + +Returns the value of attribute size. + +#### Signature + +```ruby +attr_reader size -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 622. + +*** + +### status + +Returns the value of attribute status. + +#### Signature + +```ruby +attr_reader status -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 622. + +## Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 621. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/record-action/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/record-action/index.mdx new file mode 100644 index 0000000000..093ef8f83e --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/relay/record-action/index.mdx @@ -0,0 +1,112 @@ +--- +slug: "/reference/ruby/signal-wire/relay/record-action" +title: "RecordAction" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::RecordAction" + parent: "SignalWire::Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb" + visibility: "public" +--- +# `RecordAction` + +Handle for an active record operation. + +## Signature + +```ruby +class RecordAction < SignalWire::Relay::Action +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::Action](/docs/sdk-reference/reference/ruby/signal-wire/relay/action) + +## Methods + +### initialize + +#### Signature + +```ruby +def initialize(call, control_id) +``` + +#### Parameters + + + + + +#### Returns + +`RecordAction` — a new instance of RecordAction + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 122. + +*** + +### pause + +#### Signature + +```ruby +def pause(behavior: nil) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 131. + +*** + +### resume + +#### Signature + +```ruby +def resume +``` + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 137. + +*** + +### stop + +#### Signature + +```ruby +def stop +``` + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 127. + +## Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 121. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/record-event/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/record-event/index.mdx new file mode 100644 index 0000000000..14703b7448 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/relay/record-event/index.mdx @@ -0,0 +1,198 @@ +--- +slug: "/reference/ruby/signal-wire/relay/record-event" +title: "RecordEvent" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::RecordEvent" + parent: "SignalWire::Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" + visibility: "public" +--- +# `RecordEvent` + +calling.call.record + +## Signature + +```ruby +class RecordEvent < SignalWire::Relay::RelayEvent +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::RelayEvent](/docs/sdk-reference/reference/ruby/signal-wire/relay/relay-event) + +## Methods + +### control\_id + +Returns the value of attribute control\_id. + +#### Signature + +```ruby +attr_reader control_id -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 236. + +*** + +### duration + +Returns the value of attribute duration. + +#### Signature + +```ruby +attr_reader duration -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 236. + +*** + +### from\_payload + +#### Signature + +```ruby +def from_payload(payload) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 238. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(control_id: '', state: '', url: '', duration: 0.0, size: 0, record: {}, **base) +``` + +#### Parameters + + + + + + + + + + + + + + + +#### Returns + +`RecordEvent` — a new instance of RecordEvent + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 254. + +*** + +### record + +Returns the value of attribute record. + +#### Signature + +```ruby +attr_reader record -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 236. + +*** + +### size + +Returns the value of attribute size. + +#### Signature + +```ruby +attr_reader size -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 236. + +*** + +### state + +Returns the value of attribute state. + +#### Signature + +```ruby +attr_reader state -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 236. + +*** + +### url + +Returns the value of attribute url. + +#### Signature + +```ruby +attr_reader url -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 236. + +## Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 235. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/refer-event/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/refer-event/index.mdx new file mode 100644 index 0000000000..963cd0d9e8 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/relay/refer-event/index.mdx @@ -0,0 +1,158 @@ +--- +slug: "/reference/ruby/signal-wire/relay/refer-event" +title: "ReferEvent" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::ReferEvent" + parent: "SignalWire::Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" + visibility: "public" +--- +# `ReferEvent` + +calling.call.refer + +## Signature + +```ruby +class ReferEvent < SignalWire::Relay::RelayEvent +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::RelayEvent](/docs/sdk-reference/reference/ruby/signal-wire/relay/relay-event) + +## Methods + +### from\_payload + +#### Signature + +```ruby +def from_payload(payload) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 535. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(state: '', sip_refer_to: '', sip_refer_response_code: '', sip_notify_response_code: '', **base) +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`ReferEvent` — a new instance of ReferEvent + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 548. + +*** + +### sip\_notify\_response\_code + +Returns the value of attribute sip\_notify\_response\_code. + +#### Signature + +```ruby +attr_reader sip_notify_response_code -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 532. + +*** + +### sip\_refer\_response\_code + +Returns the value of attribute sip\_refer\_response\_code. + +#### Signature + +```ruby +attr_reader sip_refer_response_code -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 532. + +*** + +### sip\_refer\_to + +Returns the value of attribute sip\_refer\_to. + +#### Signature + +```ruby +attr_reader sip_refer_to -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 532. + +*** + +### state + +Returns the value of attribute state. + +#### Signature + +```ruby +attr_reader state -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 532. + +## Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 531. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/relay-error/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/relay-error/index.mdx new file mode 100644 index 0000000000..40bba9451e --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/relay/relay-error/index.mdx @@ -0,0 +1,96 @@ +--- +slug: "/reference/ruby/signal-wire/relay/relay-error" +title: "RelayError" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::RelayError" + parent: "SignalWire::Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb" + visibility: "public" +--- +# `RelayError` + +Raised for RELAY JSON-RPC errors. + +## Signature + +```ruby +class RelayError < StandardError +``` + +## Inheritance + +**Extends:** `StandardError` + +## Methods + +### code + +Returns the value of attribute code. + +#### Signature + +```ruby +attr_reader code -> Object +``` + +#### Source + +[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) + +Line 19. + +*** + +### error\_message + +Returns the value of attribute error\_message. + +#### Signature + +```ruby +attr_reader error_message -> Object +``` + +#### Source + +[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) + +Line 19. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(code, message) +``` + +#### Parameters + + + + + +#### Returns + +`RelayError` — a new instance of RelayError + +#### Source + +[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) + +Line 21. + +## Source + +[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) + +Line 18. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/relay-event/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/relay-event/index.mdx new file mode 100644 index 0000000000..a9d9c5d0e2 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/relay/relay-event/index.mdx @@ -0,0 +1,344 @@ +--- +slug: "/reference/ruby/signal-wire/relay/relay-event" +title: "RelayEvent" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::RelayEvent" + parent: "SignalWire::Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" + visibility: "public" +--- +# `RelayEvent` + +Base event wrapper for raw signalwire.event payloads. +Subclasses provide typed accessors for specific event types. + +Idiomatic Ruby surface (defined once here, inherited by every typed +subclass so the cross-language audit only counts it on the base): + +- +#to\_h+ / +#to\_json+ — a clean, semantic Hash/JSON view of the + event (the common +event\_type+/+call\_id+/+timestamp+ fields plus + whatever typed fields the subclass declares). +- +#deconstruct\_keys+ / +#deconstruct+ — Ruby 3.0 pattern matching, + so callers can write + case event + in \{ event\_type: "calling.call.state", call\_state: \} + ... + end +- value +#==+ / +#eql?+ / +#hash+ — two events carrying the same + semantic data compare equal and hash equal, so events work as + Set members and Hash keys. + +Subclasses contribute their typed fields by overriding the private ++#\_event\_fields+ hook (underscore-prefixed, so it stays off the +public surface); they never redefine +#to\_h+/+#==+/etc. themselves. + +## Signature + +```ruby +class RelayEvent < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### == + +Value equality: same concrete class carrying the same semantic data. +Exact-class (not +is\_a?+) so a typed event never equals a bare ++RelayEvent+ that happens to share the envelope. + +#### Signature + +```ruby +def ==(other) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 98. + +*** + +### call\_id + +Returns the value of attribute call\_id. + +#### Signature + +```ruby +attr_reader call_id -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 31. + +*** + +### deconstruct + +Ruby 3.0 array pattern-matching hook for +in \[a, b, c]+. The stable, +cross-event positional triple is the envelope: event type, call id, +timestamp. + +#### Signature + +```ruby +def deconstruct +``` + +#### Returns + +`Array` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 91. + +*** + +### deconstruct\_keys + +Ruby 3.0 pattern-matching hook for +in \{ key: \}+ / +in \{ key: \}+. +Returns the same Symbol-keyed map as \{#to\_h\}. When the matcher +requests a specific subset of +keys+, only those are computed/returned +(the contract +deconstruct\_keys+ promises the pattern matcher). + +#### Signature + +```ruby +def deconstruct_keys(keys) +``` + +#### Parameters + + + keys the pattern is matching, or nil + + +#### Returns + +`Hash{Symbol => Object}` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 77. + +*** + +### eql? + +Value equality: same concrete class carrying the same semantic data. +Exact-class (not +is\_a?+) so a typed event never equals a bare ++RelayEvent+ that happens to share the envelope. + +#### Signature + +```ruby +def ==(other) +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 101. + +*** + +### event\_type + +Returns the value of attribute event\_type. + +#### Signature + +```ruby +attr_reader event_type -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 31. + +*** + +### from\_payload + +#### Signature + +```ruby +def from_payload(payload) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 40. + +*** + +### hash + +Hash key parity with \{#==\}: equal events share a hash bucket, so they +behave correctly as Set members and Hash keys. + +#### Signature + +```ruby +def hash +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 105. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(event_type:, params: {}, call_id: '', timestamp: 0.0) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`RelayEvent` — a new instance of RelayEvent + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 33. + +*** + +### params + +Returns the value of attribute params. + +#### Signature + +```ruby +attr_reader params -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 31. + +*** + +### timestamp + +Returns the value of attribute timestamp. + +#### Signature + +```ruby +attr_reader timestamp -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 31. + +*** + +### to\_h + +Semantic Hash view: the shared envelope fields plus the subclass's +typed fields. Raw +params+ are intentionally excluded — +#to\_h+ is +the friendly, typed projection, not the wire frame (which stays +available via +#params+). Keys are symbols, idiomatic for Ruby. + +#### Signature + +```ruby +def to_h +``` + +#### Returns + +`Hash{Symbol => Object}` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 57. + +*** + +### to\_json + +#### Signature + +```ruby +def to_json(*args) +``` + +#### Parameters + + + +#### Returns + +`String` — JSON serialization of \{#to\_h\}. + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 66. + +## Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 30. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/send-digits-event/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/send-digits-event/index.mdx new file mode 100644 index 0000000000..905c7c3435 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/relay/send-digits-event/index.mdx @@ -0,0 +1,118 @@ +--- +slug: "/reference/ruby/signal-wire/relay/send-digits-event" +title: "SendDigitsEvent" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::SendDigitsEvent" + parent: "SignalWire::Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" + visibility: "public" +--- +# `SendDigitsEvent` + +calling.call.send\_digits + +## Signature + +```ruby +class SendDigitsEvent < SignalWire::Relay::RelayEvent +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::RelayEvent](/docs/sdk-reference/reference/ruby/signal-wire/relay/relay-event) + +## Methods + +### control\_id + +Returns the value of attribute control\_id. + +#### Signature + +```ruby +attr_reader control_id -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 455. + +*** + +### from\_payload + +#### Signature + +```ruby +def from_payload(payload) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 457. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(control_id: '', state: '', **base) +``` + +#### Parameters + + + + + + + +#### Returns + +`SendDigitsEvent` — a new instance of SendDigitsEvent + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 468. + +*** + +### state + +Returns the value of attribute state. + +#### Signature + +```ruby +attr_reader state -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 455. + +## Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 454. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/standalone-collect-action/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/standalone-collect-action/index.mdx new file mode 100644 index 0000000000..2bd26d2a6c --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/relay/standalone-collect-action/index.mdx @@ -0,0 +1,112 @@ +--- +slug: "/reference/ruby/signal-wire/relay/standalone-collect-action" +title: "StandaloneCollectAction" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::StandaloneCollectAction" + parent: "SignalWire::Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb" + visibility: "public" +--- +# `StandaloneCollectAction` + +Handle for standalone calling.collect (without play). + +## Signature + +```ruby +class StandaloneCollectAction < SignalWire::Relay::Action +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::Action](/docs/sdk-reference/reference/ruby/signal-wire/relay/action) + +## Methods + +### \_check\_event + +#### Signature + +```ruby +def _check_event(event) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 205. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(call, control_id) +``` + +#### Parameters + + + + + +#### Returns + +`StandaloneCollectAction` — a new instance of StandaloneCollectAction + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 200. + +*** + +### start\_input\_timers + +#### Signature + +```ruby +def start_input_timers +``` + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 219. + +*** + +### stop + +#### Signature + +```ruby +def stop +``` + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 215. + +## Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 199. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/stream-action/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/stream-action/index.mdx new file mode 100644 index 0000000000..7f7a30483b --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/relay/stream-action/index.mdx @@ -0,0 +1,76 @@ +--- +slug: "/reference/ruby/signal-wire/relay/stream-action" +title: "StreamAction" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::StreamAction" + parent: "SignalWire::Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb" + visibility: "public" +--- +# `StreamAction` + +Handle for an active stream operation. + +## Signature + +```ruby +class StreamAction < SignalWire::Relay::Action +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::Action](/docs/sdk-reference/reference/ruby/signal-wire/relay/action) + +## Methods + +### initialize + +#### Signature + +```ruby +def initialize(call, control_id) +``` + +#### Parameters + + + + + +#### Returns + +`StreamAction` — a new instance of StreamAction + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 249. + +*** + +### stop + +#### Signature + +```ruby +def stop +``` + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 253. + +## Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 248. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/stream-event/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/stream-event/index.mdx new file mode 100644 index 0000000000..9f45644214 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/relay/stream-event/index.mdx @@ -0,0 +1,158 @@ +--- +slug: "/reference/ruby/signal-wire/relay/stream-event" +title: "StreamEvent" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::StreamEvent" + parent: "SignalWire::Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" + visibility: "public" +--- +# `StreamEvent` + +calling.call.stream + +## Signature + +```ruby +class StreamEvent < SignalWire::Relay::RelayEvent +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::RelayEvent](/docs/sdk-reference/reference/ruby/signal-wire/relay/relay-event) + +## Methods + +### control\_id + +Returns the value of attribute control\_id. + +#### Signature + +```ruby +attr_reader control_id -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 423. + +*** + +### from\_payload + +#### Signature + +```ruby +def from_payload(payload) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 425. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(control_id: '', state: '', url: '', name: '', **base) +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`StreamEvent` — a new instance of StreamEvent + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 438. + +*** + +### name + +Returns the value of attribute name. + +#### Signature + +```ruby +attr_reader name -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 423. + +*** + +### state + +Returns the value of attribute state. + +#### Signature + +```ruby +attr_reader state -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 423. + +*** + +### url + +Returns the value of attribute url. + +#### Signature + +```ruby +attr_reader url -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 423. + +## Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 422. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/tap-action/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/tap-action/index.mdx new file mode 100644 index 0000000000..59fee3ebdd --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/relay/tap-action/index.mdx @@ -0,0 +1,76 @@ +--- +slug: "/reference/ruby/signal-wire/relay/tap-action" +title: "TapAction" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::TapAction" + parent: "SignalWire::Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb" + visibility: "public" +--- +# `TapAction` + +Handle for an active tap operation. + +## Signature + +```ruby +class TapAction < SignalWire::Relay::Action +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::Action](/docs/sdk-reference/reference/ruby/signal-wire/relay/action) + +## Methods + +### initialize + +#### Signature + +```ruby +def initialize(call, control_id) +``` + +#### Parameters + + + + + +#### Returns + +`TapAction` — a new instance of TapAction + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 238. + +*** + +### stop + +#### Signature + +```ruby +def stop +``` + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 242. + +## Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 237. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/tap-event/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/tap-event/index.mdx new file mode 100644 index 0000000000..9306228fa1 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/relay/tap-event/index.mdx @@ -0,0 +1,158 @@ +--- +slug: "/reference/ruby/signal-wire/relay/tap-event" +title: "TapEvent" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::TapEvent" + parent: "SignalWire::Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" + visibility: "public" +--- +# `TapEvent` + +calling.call.tap + +## Signature + +```ruby +class TapEvent < SignalWire::Relay::RelayEvent +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::RelayEvent](/docs/sdk-reference/reference/ruby/signal-wire/relay/relay-event) + +## Methods + +### control\_id + +Returns the value of attribute control\_id. + +#### Signature + +```ruby +attr_reader control_id -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 391. + +*** + +### device + +Returns the value of attribute device. + +#### Signature + +```ruby +attr_reader device -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 391. + +*** + +### from\_payload + +#### Signature + +```ruby +def from_payload(payload) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 393. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(control_id: '', state: '', tap: {}, device: {}, **base) +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`TapEvent` — a new instance of TapEvent + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 406. + +*** + +### state + +Returns the value of attribute state. + +#### Signature + +```ruby +attr_reader state -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 391. + +*** + +### tap + +Returns the value of attribute tap. + +#### Signature + +```ruby +attr_reader tap -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 391. + +## Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 390. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/transcribe-action/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/transcribe-action/index.mdx new file mode 100644 index 0000000000..a9685e5161 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/relay/transcribe-action/index.mdx @@ -0,0 +1,76 @@ +--- +slug: "/reference/ruby/signal-wire/relay/transcribe-action" +title: "TranscribeAction" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::TranscribeAction" + parent: "SignalWire::Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb" + visibility: "public" +--- +# `TranscribeAction` + +Handle for an active transcribe operation. + +## Signature + +```ruby +class TranscribeAction < SignalWire::Relay::Action +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::Action](/docs/sdk-reference/reference/ruby/signal-wire/relay/action) + +## Methods + +### initialize + +#### Signature + +```ruby +def initialize(call, control_id) +``` + +#### Parameters + + + + + +#### Returns + +`TranscribeAction` — a new instance of TranscribeAction + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 271. + +*** + +### stop + +#### Signature + +```ruby +def stop +``` + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 275. + +## Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 270. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/transcribe-event/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/transcribe-event/index.mdx new file mode 100644 index 0000000000..8f0ee86078 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/relay/transcribe-event/index.mdx @@ -0,0 +1,198 @@ +--- +slug: "/reference/ruby/signal-wire/relay/transcribe-event" +title: "TranscribeEvent" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::TranscribeEvent" + parent: "SignalWire::Relay" + module: "SignalWire.Relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" + visibility: "public" +--- +# `TranscribeEvent` + +calling.call.transcribe + +## Signature + +```ruby +class TranscribeEvent < SignalWire::Relay::RelayEvent +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::RelayEvent](/docs/sdk-reference/reference/ruby/signal-wire/relay/relay-event) + +## Methods + +### control\_id + +Returns the value of attribute control\_id. + +#### Signature + +```ruby +attr_reader control_id -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 686. + +*** + +### duration + +Returns the value of attribute duration. + +#### Signature + +```ruby +attr_reader duration -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 686. + +*** + +### from\_payload + +#### Signature + +```ruby +def from_payload(payload) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 688. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(control_id: '', state: '', url: '', recording_id: '', duration: 0.0, size: 0, **base) +``` + +#### Parameters + + + + + + + + + + + + + + + +#### Returns + +`TranscribeEvent` — a new instance of TranscribeEvent + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 703. + +*** + +### recording\_id + +Returns the value of attribute recording\_id. + +#### Signature + +```ruby +attr_reader recording_id -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 686. + +*** + +### size + +Returns the value of attribute size. + +#### Signature + +```ruby +attr_reader size -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 686. + +*** + +### state + +Returns the value of attribute state. + +#### Signature + +```ruby +attr_reader state -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 686. + +*** + +### url + +Returns the value of attribute url. + +#### Signature + +```ruby +attr_reader url -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 686. + +## Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 685. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/base-resource/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/base-resource/index.mdx new file mode 100644 index 0000000000..cbfe927431 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/base-resource/index.mdx @@ -0,0 +1,60 @@ +--- +slug: "/reference/ruby/signal-wire/rest/base-resource" +title: "BaseResource" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::BaseResource" + parent: "SignalWire::REST" + module: "SignalWire.REST" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb" + visibility: "public" +--- +# `BaseResource` + +Base for all namespace/resource classes. + +## Signature + +```ruby +class BaseResource < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### initialize + +#### Signature + +```ruby +def initialize(http, base_path) +``` + +#### Parameters + + + + + +#### Returns + +`BaseResource` — a new instance of BaseResource + +#### Source + +[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) + +Line 138. + +## Source + +[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) + +Line 137. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/crud-resource/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/crud-resource/index.mdx new file mode 100644 index 0000000000..e67ade838e --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/crud-resource/index.mdx @@ -0,0 +1,172 @@ +--- +slug: "/reference/ruby/signal-wire/rest/crud-resource" +title: "CrudResource" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::CrudResource" + parent: "SignalWire::REST" + module: "SignalWire.REST" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb" + visibility: "public" +--- +# `CrudResource` + +Standard CRUD resource with list/create/get/update/delete. + +## Signature + +```ruby +class CrudResource < SignalWire::REST::BaseResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/base-resource) + +## Methods + +### create + +#### Signature + +```ruby +def create(**kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) + +Line 164. + +*** + +### delete + +#### Signature + +```ruby +def delete(resource_id) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) + +Line 177. + +*** + +### get + +#### Signature + +```ruby +def get(resource_id) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) + +Line 168. + +*** + +### list + +#### Signature + +```ruby +def list(**params) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) + +Line 160. + +*** + +### update + +#### Signature + +```ruby +def update(resource_id, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) + +Line 172. + +*** + +### update\_method + +#### Signature + +```ruby +def update_method +``` + +#### Source + +[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) + +Line 152. + +*** + +### update\_method= + +#### Signature + +```ruby +def update_method=(m) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) + +Line 156. + +## Source + +[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) + +Line 151. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/crud-with-addresses/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/crud-with-addresses/index.mdx new file mode 100644 index 0000000000..d808b9548f --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/crud-with-addresses/index.mdx @@ -0,0 +1,60 @@ +--- +slug: "/reference/ruby/signal-wire/rest/crud-with-addresses" +title: "CrudWithAddresses" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::CrudWithAddresses" + parent: "SignalWire::REST" + module: "SignalWire.REST" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb" + visibility: "public" +--- +# `CrudWithAddresses` + +CRUD resource that also supports listing the addresses bound to a +resource. Mirrors Python's +signalwire.rest.\_base.CrudWithAddresses+: +it adds a single +list\_addresses+ helper on top of the standard +list/create/get/update/delete surface, issuing ++GET \{base\_path\}/\{resource\_id\}/addresses+. + +## Signature + +```ruby +class CrudWithAddresses < SignalWire::REST::CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::CrudResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/crud-resource) + +## Methods + +### list\_addresses + +#### Signature + +```ruby +def list_addresses(resource_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) + +Line 188. + +## Source + +[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) + +Line 187. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/http-client/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/http-client/index.mdx new file mode 100644 index 0000000000..a238bbf8c4 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/http-client/index.mdx @@ -0,0 +1,222 @@ +--- +slug: "/reference/ruby/signal-wire/rest/http-client" +title: "HttpClient" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::HttpClient" + parent: "SignalWire::REST" + module: "SignalWire.REST" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb" + visibility: "public" +--- +# `HttpClient` + +Thin wrapper around Net::HTTP with Basic Auth and JSON handling. + +## Signature + +```ruby +class HttpClient < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### base\_url + +Returns the value of attribute base\_url. + +#### Signature + +```ruby +attr_reader base_url -> Object +``` + +#### Source + +[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) + +Line 26. + +*** + +### delete + +#### Signature + +```ruby +def delete(path) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) + +Line 72. + +*** + +### get + +#### Signature + +```ruby +def get(path, params = nil) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) + +Line 56. + +*** + +### initialize + ++base\_url+ overrides the derived +https://\{space\}+ value when set, +which is how the audit fixture and tests point the client at a +loopback server. Pass either +space+ ("acme") / a host +("acme.signalwire.com") OR an explicit +base\_url+ ("http://127.0.0.1:NNNN"). + ++ca\_file+ (optional) names a PEM CA bundle to trust for HTTPS, for +private-CA / pinned-CA deployments. When set, requests verify the peer +(VERIFY\_PEER) against a store seeded from the OpenSSL defaults (which +honor SSL\_CERT\_FILE) plus that bundle. When unset, Net::HTTP's default +verification (system store, VERIFY\_PEER) applies unchanged. HTTPS is +always verified either way — there is no VERIFY\_NONE path. + +#### Signature + +```ruby +def initialize(project_id, token, space, base_url: nil, ca_file: nil) +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`HttpClient` — a new instance of HttpClient + +#### Source + +[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) + +Line 39. + +*** + +### patch + +#### Signature + +```ruby +def patch(path, body = nil) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) + +Line 68. + +*** + +### post + +#### Signature + +```ruby +def post(path, body = nil, params: nil) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) + +Line 60. + +*** + +### project\_id + +#### Signature + +```ruby +def project_id +``` + +#### Source + +[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) + +Line 52. + +*** + +### put + +#### Signature + +```ruby +def put(path, body = nil) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) + +Line 64. + +## Source + +[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) + +Line 25. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/index.mdx new file mode 100644 index 0000000000..16f00615c8 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/index.mdx @@ -0,0 +1,70 @@ +--- +slug: "/reference/ruby/signal-wire/rest" +title: "REST" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "module" + language: "ruby" + qualified_name: "SignalWire::REST" + parent: "SignalWire" + module: "SignalWire" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/pagination.rb" + visibility: "public" +--- +# `REST` + +## Signature + +```ruby +module REST +``` + +## Classes + + + + Base for all namespace/resource classes. + + + + Standard CRUD resource with list/create/get/update/delete. + + + + CRUD resource that also supports listing the addresses bound to a resource. Mirrors Python's +signalwire.rest.\_base.CrudWithAddresses+: it adds a single +list\_addresses+ helper on top of the standard list/create/get/update/delete surface, issuing +GET \{base\_path\}/\{resource\_id\}/addresses+. + + + + Thin wrapper around Net::HTTP with Basic Auth and JSON handling. + + + + Iterates items across paginated API responses. + + + + REST client for the SignalWire platform APIs. + + + + Raised when the SignalWire REST API returns a non-2xx response. + + + +## Modules + + + + + + PhoneCallHandler -- enum-like constants of the +call\_handler+ values accepted by +phone\_numbers.update+. + + + +## Source + +[`lib/signalwire/rest/pagination.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/pagination.rb) + +Line 4. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/addresses-resource/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/addresses-resource/index.mdx new file mode 100644 index 0000000000..7b84b9180e --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/addresses-resource/index.mdx @@ -0,0 +1,138 @@ +--- +slug: "/reference/ruby/signal-wire/rest/namespaces/addresses-resource" +title: "AddressesResource" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::AddressesResource" + parent: "SignalWire::REST::Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/addresses.rb" + visibility: "public" +--- +# `AddressesResource` + +Address management (no update endpoint). + +## Signature + +```ruby +class AddressesResource < SignalWire::REST::BaseResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/base-resource) + +## Methods + +### create + +#### Signature + +```ruby +def create(**kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/addresses.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/addresses.rb) + +Line 13. + +*** + +### delete + +#### Signature + +```ruby +def delete(address_id) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/addresses.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/addresses.rb) + +Line 15. + +*** + +### get + +#### Signature + +```ruby +def get(address_id) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/addresses.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/addresses.rb) + +Line 14. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(http) +``` + +#### Parameters + + + +#### Returns + +`AddressesResource` — a new instance of AddressesResource + +#### Source + +[`lib/signalwire/rest/namespaces/addresses.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/addresses.rb) + +Line 8. + +*** + +### list + +#### Signature + +```ruby +def list(**params) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/addresses.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/addresses.rb) + +Line 12. + +## Source + +[`lib/signalwire/rest/namespaces/addresses.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/addresses.rb) + +Line 7. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/auto-materialized-webhook/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/auto-materialized-webhook/index.mdx new file mode 100644 index 0000000000..c83b0ea34e --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/auto-materialized-webhook/index.mdx @@ -0,0 +1,71 @@ +--- +slug: "/reference/ruby/signal-wire/rest/namespaces/auto-materialized-webhook" +title: "AutoMaterializedWebhook" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::AutoMaterializedWebhook" + parent: "SignalWire::REST::Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb" + visibility: "public" +--- +# `AutoMaterializedWebhook` + +Fabric webhook resource that's normally auto-created by ++phone\_numbers.set\_\*\_webhook+. Exposed for backwards compatibility. + +The binding model for these resources is on the phone number (see ++phone\_numbers.set\_swml\_webhook+ / +set\_cxml\_webhook+) -- setting ++call\_handler+ on a phone number auto-materializes the webhook +Fabric resource. Calling +create+ directly here produces an orphan +resource that isn't bound to any phone number. + +## Signature + +```ruby +class AutoMaterializedWebhook < SignalWire::REST::Namespaces::FabricResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::Namespaces::FabricResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/namespaces/fabric-resource) + +## Constants + + + Subclasses override to advertise the correct helper in the warning. + + +## Methods + +### create + + + **Deprecated.** Creating a webhook Fabric resource directly produces an orphan that isn't bound to any phone number. Use the matching +phone\_numbers.set\_\*\_webhook+ helper instead; it updates the phone number and the server auto-materializes the resource. See porting-sdk's +phone-binding.md+. + + +#### Signature + +```ruby +def create(**kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 35. + +## Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 26. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/call-flows-resource/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/call-flows-resource/index.mdx new file mode 100644 index 0000000000..d5d8284f90 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/call-flows-resource/index.mdx @@ -0,0 +1,100 @@ +--- +slug: "/reference/ruby/signal-wire/rest/namespaces/call-flows-resource" +title: "CallFlowsResource" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::CallFlowsResource" + parent: "SignalWire::REST::Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb" + visibility: "public" +--- +# `CallFlowsResource` + +Call flows with version management. + +## Signature + +```ruby +class CallFlowsResource < SignalWire::REST::Namespaces::FabricResourcePUT +``` + +## Inheritance + +**Extends:** [SignalWire::REST::Namespaces::FabricResourcePUT](/docs/sdk-reference/reference/ruby/signal-wire/rest/namespaces/fabric-resource-put) + +## Methods + +### deploy\_version + +#### Signature + +```ruby +def deploy_version(resource_id, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 70. + +*** + +### list\_addresses + +#### Signature + +```ruby +def list_addresses(resource_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 60. + +*** + +### list\_versions + +#### Signature + +```ruby +def list_versions(resource_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 65. + +## Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 59. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/calling-namespace/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/calling-namespace/index.mdx new file mode 100644 index 0000000000..cc9acb96c8 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/calling-namespace/index.mdx @@ -0,0 +1,896 @@ +--- +slug: "/reference/ruby/signal-wire/rest/namespaces/calling-namespace" +title: "CallingNamespace" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::CallingNamespace" + parent: "SignalWire::REST::Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb" + visibility: "public" +--- +# `CallingNamespace` + +REST call control -- all 37 commands dispatched via single POST endpoint. + +## Signature + +```ruby +class CallingNamespace < SignalWire::REST::BaseResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/base-resource) + +## Methods + +### ai\_hold + +#### Signature + +```ruby +def ai_hold(call_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 129. + +*** + +### ai\_message + +AI + +#### Signature + +```ruby +def ai_message(call_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 125. + +*** + +### ai\_stop + +#### Signature + +```ruby +def ai_stop(call_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 137. + +*** + +### ai\_unhold + +#### Signature + +```ruby +def ai_unhold(call_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 133. + +*** + +### collect + +Collect + +#### Signature + +```ruby +def collect(call_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 67. + +*** + +### collect\_start\_input\_timers + +#### Signature + +```ruby +def collect_start_input_timers(call_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 75. + +*** + +### collect\_stop + +#### Signature + +```ruby +def collect_stop(call_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 71. + +*** + +### denoise + +Denoise + +#### Signature + +```ruby +def denoise(call_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 107. + +*** + +### denoise\_stop + +#### Signature + +```ruby +def denoise_stop(call_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 111. + +*** + +### detect + +Detect + +#### Signature + +```ruby +def detect(call_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 80. + +*** + +### detect\_stop + +#### Signature + +```ruby +def detect_stop(call_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 84. + +*** + +### dial + +Call lifecycle + +#### Signature + +```ruby +def dial(**params) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 13. + +*** + +### disconnect + +#### Signature + +```ruby +def disconnect(call_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 24. + +*** + +### end\_call + +#### Signature + +```ruby +def end_call(call_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 16. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(http) +``` + +#### Parameters + + + +#### Returns + +`CallingNamespace` — a new instance of CallingNamespace + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 8. + +*** + +### live\_transcribe + +Live transcribe / translate + +#### Signature + +```ruby +def live_transcribe(call_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 142. + +*** + +### live\_translate + +#### Signature + +```ruby +def live_translate(call_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 146. + +*** + +### play + +Play + +#### Signature + +```ruby +def play(call_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 29. + +*** + +### play\_pause + +#### Signature + +```ruby +def play_pause(call_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 33. + +*** + +### play\_resume + +#### Signature + +```ruby +def play_resume(call_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 37. + +*** + +### play\_stop + +#### Signature + +```ruby +def play_stop(call_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 41. + +*** + +### play\_volume + +#### Signature + +```ruby +def play_volume(call_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 45. + +*** + +### receive\_fax\_stop + +#### Signature + +```ruby +def receive_fax_stop(call_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 155. + +*** + +### record + +Record + +#### Signature + +```ruby +def record(call_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 50. + +*** + +### record\_pause + +#### Signature + +```ruby +def record_pause(call_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 54. + +*** + +### record\_resume + +#### Signature + +```ruby +def record_resume(call_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 58. + +*** + +### record\_stop + +#### Signature + +```ruby +def record_stop(call_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 62. + +*** + +### refer + +SIP + +#### Signature + +```ruby +def refer(call_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 160. + +*** + +### send\_fax\_stop + +Fax + +#### Signature + +```ruby +def send_fax_stop(call_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 151. + +*** + +### stream + +Stream + +#### Signature + +```ruby +def stream(call_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 98. + +*** + +### stream\_stop + +#### Signature + +```ruby +def stream_stop(call_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 102. + +*** + +### tap + +Tap + +#### Signature + +```ruby +def tap(call_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 89. + +*** + +### tap\_stop + +#### Signature + +```ruby +def tap_stop(call_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 93. + +*** + +### transcribe + +Transcribe + +#### Signature + +```ruby +def transcribe(call_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 116. + +*** + +### transcribe\_stop + +#### Signature + +```ruby +def transcribe_stop(call_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 120. + +*** + +### transfer + +#### Signature + +```ruby +def transfer(call_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 20. + +*** + +### update + +#### Signature + +```ruby +def update(**params) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 14. + +*** + +### user\_event + +Custom events + +#### Signature + +```ruby +def user_event(call_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 165. + +## Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 7. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/chat-resource/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/chat-resource/index.mdx new file mode 100644 index 0000000000..40631c8849 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/chat-resource/index.mdx @@ -0,0 +1,78 @@ +--- +slug: "/reference/ruby/signal-wire/rest/namespaces/chat-resource" +title: "ChatResource" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::ChatResource" + parent: "SignalWire::REST::Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/chat.rb" + visibility: "public" +--- +# `ChatResource` + +Chat token generation. + +## Signature + +```ruby +class ChatResource < SignalWire::REST::BaseResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/base-resource) + +## Methods + +### create\_token + +#### Signature + +```ruby +def create_token(**kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/chat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/chat.rb) + +Line 12. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(http) +``` + +#### Parameters + + + +#### Returns + +`ChatResource` — a new instance of ChatResource + +#### Source + +[`lib/signalwire/rest/namespaces/chat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/chat.rb) + +Line 8. + +## Source + +[`lib/signalwire/rest/namespaces/chat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/chat.rb) + +Line 7. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-accounts/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-accounts/index.mdx new file mode 100644 index 0000000000..efb56b7a54 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-accounts/index.mdx @@ -0,0 +1,140 @@ +--- +slug: "/reference/ruby/signal-wire/rest/namespaces/compat-accounts" +title: "CompatAccounts" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::CompatAccounts" + parent: "SignalWire::REST::Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb" + visibility: "public" +--- +# `CompatAccounts` + +Compat account/subproject management. + +## Signature + +```ruby +class CompatAccounts < SignalWire::REST::BaseResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/base-resource) + +## Methods + +### create + +#### Signature + +```ruby +def create(**kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 13. + +*** + +### get + +#### Signature + +```ruby +def get(sid) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 14. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(http) +``` + +#### Parameters + + + +#### Returns + +`CompatAccounts` — a new instance of CompatAccounts + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 8. + +*** + +### list + +#### Signature + +```ruby +def list(**params) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 12. + +*** + +### update + +#### Signature + +```ruby +def update(sid, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 15. + +## Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 7. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-applications/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-applications/index.mdx new file mode 100644 index 0000000000..b323880465 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-applications/index.mdx @@ -0,0 +1,56 @@ +--- +slug: "/reference/ruby/signal-wire/rest/namespaces/compat-applications" +title: "CompatApplications" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::CompatApplications" + parent: "SignalWire::REST::Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb" + visibility: "public" +--- +# `CompatApplications` + +Compat application management. + +## Signature + +```ruby +class CompatApplications < SignalWire::REST::CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::CrudResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/crud-resource) + +## Methods + +### update + +#### Signature + +```ruby +def update(sid, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 158. + +## Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 157. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-calls/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-calls/index.mdx new file mode 100644 index 0000000000..92d3cb0146 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-calls/index.mdx @@ -0,0 +1,148 @@ +--- +slug: "/reference/ruby/signal-wire/rest/namespaces/compat-calls" +title: "CompatCalls" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::CompatCalls" + parent: "SignalWire::REST::Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb" + visibility: "public" +--- +# `CompatCalls` + +Compat call management with recording and stream sub-resources. + +## Signature + +```ruby +class CompatCalls < SignalWire::REST::CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::CrudResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/crud-resource) + +## Methods + +### start\_recording + +#### Signature + +```ruby +def start_recording(call_sid, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 24. + +*** + +### start\_stream + +#### Signature + +```ruby +def start_stream(call_sid, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 32. + +*** + +### stop\_stream + +#### Signature + +```ruby +def stop_stream(call_sid, stream_sid, **kwargs) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 36. + +*** + +### update + +#### Signature + +```ruby +def update(sid, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 20. + +*** + +### update\_recording + +#### Signature + +```ruby +def update_recording(call_sid, recording_sid, **kwargs) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 28. + +## Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 19. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-conferences/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-conferences/index.mdx new file mode 100644 index 0000000000..505edb7d49 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-conferences/index.mdx @@ -0,0 +1,328 @@ +--- +slug: "/reference/ruby/signal-wire/rest/namespaces/compat-conferences" +title: "CompatConferences" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::CompatConferences" + parent: "SignalWire::REST::Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb" + visibility: "public" +--- +# `CompatConferences` + +Compat conference management. + +## Signature + +```ruby +class CompatConferences < SignalWire::REST::BaseResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/base-resource) + +## Methods + +### delete\_recording + +#### Signature + +```ruby +def delete_recording(conference_sid, recording_sid) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 111. + +*** + +### get + +#### Signature + +```ruby +def get(sid) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 78. + +*** + +### get\_participant + +#### Signature + +```ruby +def get_participant(conference_sid, call_sid) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 86. + +*** + +### get\_recording + +#### Signature + +```ruby +def get_recording(conference_sid, recording_sid) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 103. + +*** + +### list + +#### Signature + +```ruby +def list(**params) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 77. + +*** + +### list\_participants + +Participants + +#### Signature + +```ruby +def list_participants(conference_sid, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 82. + +*** + +### list\_recordings + +Conference recordings + +#### Signature + +```ruby +def list_recordings(conference_sid, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 99. + +*** + +### remove\_participant + +#### Signature + +```ruby +def remove_participant(conference_sid, call_sid) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 94. + +*** + +### start\_stream + +Conference streams + +#### Signature + +```ruby +def start_stream(conference_sid, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 116. + +*** + +### stop\_stream + +#### Signature + +```ruby +def stop_stream(conference_sid, stream_sid, **kwargs) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 120. + +*** + +### update + +#### Signature + +```ruby +def update(sid, **kw) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 79. + +*** + +### update\_participant + +#### Signature + +```ruby +def update_participant(conference_sid, call_sid, **kwargs) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 90. + +*** + +### update\_recording + +#### Signature + +```ruby +def update_recording(conference_sid, recording_sid, **kwargs) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 107. + +## Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 76. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-faxes/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-faxes/index.mdx new file mode 100644 index 0000000000..4f5cdae381 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-faxes/index.mdx @@ -0,0 +1,122 @@ +--- +slug: "/reference/ruby/signal-wire/rest/namespaces/compat-faxes" +title: "CompatFaxes" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::CompatFaxes" + parent: "SignalWire::REST::Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb" + visibility: "public" +--- +# `CompatFaxes` + +Compat fax management with media sub-resources. + +## Signature + +```ruby +class CompatFaxes < SignalWire::REST::CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::CrudResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/crud-resource) + +## Methods + +### delete\_media + +#### Signature + +```ruby +def delete_media(fax_sid, media_sid) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 70. + +*** + +### get\_media + +#### Signature + +```ruby +def get_media(fax_sid, media_sid) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 66. + +*** + +### list\_media + +#### Signature + +```ruby +def list_media(fax_sid, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 62. + +*** + +### update + +#### Signature + +```ruby +def update(sid, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 60. + +## Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 59. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-laml-bins/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-laml-bins/index.mdx new file mode 100644 index 0000000000..1f359f6310 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-laml-bins/index.mdx @@ -0,0 +1,56 @@ +--- +slug: "/reference/ruby/signal-wire/rest/namespaces/compat-laml-bins" +title: "CompatLamlBins" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::CompatLamlBins" + parent: "SignalWire::REST::Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb" + visibility: "public" +--- +# `CompatLamlBins` + +Compat cXML/LaML script management. + +## Signature + +```ruby +class CompatLamlBins < SignalWire::REST::CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::CrudResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/crud-resource) + +## Methods + +### update + +#### Signature + +```ruby +def update(sid, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 163. + +## Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 162. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-messages/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-messages/index.mdx new file mode 100644 index 0000000000..3b117f1b90 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-messages/index.mdx @@ -0,0 +1,122 @@ +--- +slug: "/reference/ruby/signal-wire/rest/namespaces/compat-messages" +title: "CompatMessages" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::CompatMessages" + parent: "SignalWire::REST::Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb" + visibility: "public" +--- +# `CompatMessages` + +Compat message management with media sub-resources. + +## Signature + +```ruby +class CompatMessages < SignalWire::REST::CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::CrudResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/crud-resource) + +## Methods + +### delete\_media + +#### Signature + +```ruby +def delete_media(message_sid, media_sid) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 53. + +*** + +### get\_media + +#### Signature + +```ruby +def get_media(message_sid, media_sid) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 49. + +*** + +### list\_media + +#### Signature + +```ruby +def list_media(message_sid, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 45. + +*** + +### update + +#### Signature + +```ruby +def update(sid, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 43. + +## Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 42. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-namespace/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-namespace/index.mdx new file mode 100644 index 0000000000..e3978b7938 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-namespace/index.mdx @@ -0,0 +1,276 @@ +--- +slug: "/reference/ruby/signal-wire/rest/namespaces/compat-namespace" +title: "CompatNamespace" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::CompatNamespace" + parent: "SignalWire::REST::Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb" + visibility: "public" +--- +# `CompatNamespace` + +Twilio-compatible LAML API namespace. + +## Signature + +```ruby +class CompatNamespace < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### accounts + +Returns the value of attribute accounts. + +#### Signature + +```ruby +attr_reader accounts -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 206. + +*** + +### applications + +Returns the value of attribute applications. + +#### Signature + +```ruby +attr_reader applications -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 206. + +*** + +### calls + +Returns the value of attribute calls. + +#### Signature + +```ruby +attr_reader calls -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 206. + +*** + +### conferences + +Returns the value of attribute conferences. + +#### Signature + +```ruby +attr_reader conferences -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 206. + +*** + +### faxes + +Returns the value of attribute faxes. + +#### Signature + +```ruby +attr_reader faxes -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 206. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(http, account_sid) +``` + +#### Parameters + + + + + +#### Returns + +`CompatNamespace` — a new instance of CompatNamespace + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 210. + +*** + +### laml\_bins + +Returns the value of attribute laml\_bins. + +#### Signature + +```ruby +attr_reader laml_bins -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 206. + +*** + +### messages + +Returns the value of attribute messages. + +#### Signature + +```ruby +attr_reader messages -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 206. + +*** + +### phone\_numbers + +Returns the value of attribute phone\_numbers. + +#### Signature + +```ruby +attr_reader phone_numbers -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 206. + +*** + +### queues + +Returns the value of attribute queues. + +#### Signature + +```ruby +attr_reader queues -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 206. + +*** + +### recordings + +Returns the value of attribute recordings. + +#### Signature + +```ruby +attr_reader recordings -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 206. + +*** + +### tokens + +Returns the value of attribute tokens. + +#### Signature + +```ruby +attr_reader tokens -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 206. + +*** + +### transcriptions + +Returns the value of attribute transcriptions. + +#### Signature + +```ruby +attr_reader transcriptions -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 206. + +## Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 205. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-phone-numbers/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-phone-numbers/index.mdx new file mode 100644 index 0000000000..8a06b684a1 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-phone-numbers/index.mdx @@ -0,0 +1,246 @@ +--- +slug: "/reference/ruby/signal-wire/rest/namespaces/compat-phone-numbers" +title: "CompatPhoneNumbers" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::CompatPhoneNumbers" + parent: "SignalWire::REST::Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb" + visibility: "public" +--- +# `CompatPhoneNumbers` + +Compat phone number management. + +## Signature + +```ruby +class CompatPhoneNumbers < SignalWire::REST::BaseResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/base-resource) + +## Methods + +### delete + +#### Signature + +```ruby +def delete(sid) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 136. + +*** + +### get + +#### Signature + +```ruby +def get(sid) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 134. + +*** + +### import\_number + +#### Signature + +```ruby +def import_number(**kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 138. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(http, base) +``` + +#### Parameters + + + + + +#### Returns + +`CompatPhoneNumbers` — a new instance of CompatPhoneNumbers + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 127. + +*** + +### list + +#### Signature + +```ruby +def list(**params) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 132. + +*** + +### list\_available\_countries + +#### Signature + +```ruby +def list_available_countries(**params) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 143. + +*** + +### purchase + +#### Signature + +```ruby +def purchase(**kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 133. + +*** + +### search\_local + +#### Signature + +```ruby +def search_local(country, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 147. + +*** + +### search\_toll\_free + +#### Signature + +```ruby +def search_toll_free(country, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 151. + +*** + +### update + +#### Signature + +```ruby +def update(sid, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 135. + +## Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 126. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-queues/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-queues/index.mdx new file mode 100644 index 0000000000..bda9f2e0eb --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-queues/index.mdx @@ -0,0 +1,124 @@ +--- +slug: "/reference/ruby/signal-wire/rest/namespaces/compat-queues" +title: "CompatQueues" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::CompatQueues" + parent: "SignalWire::REST::Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb" + visibility: "public" +--- +# `CompatQueues` + +Compat queue management with members. + +## Signature + +```ruby +class CompatQueues < SignalWire::REST::CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::CrudResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/crud-resource) + +## Methods + +### dequeue\_member + +#### Signature + +```ruby +def dequeue_member(queue_sid, call_sid, **kwargs) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 178. + +*** + +### get\_member + +#### Signature + +```ruby +def get_member(queue_sid, call_sid) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 174. + +*** + +### list\_members + +#### Signature + +```ruby +def list_members(queue_sid, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 170. + +*** + +### update + +#### Signature + +```ruby +def update(sid, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 168. + +## Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 167. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-recordings/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-recordings/index.mdx new file mode 100644 index 0000000000..ba57226cf9 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-recordings/index.mdx @@ -0,0 +1,94 @@ +--- +slug: "/reference/ruby/signal-wire/rest/namespaces/compat-recordings" +title: "CompatRecordings" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::CompatRecordings" + parent: "SignalWire::REST::Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb" + visibility: "public" +--- +# `CompatRecordings` + +Compat recording management. + +## Signature + +```ruby +class CompatRecordings < SignalWire::REST::BaseResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/base-resource) + +## Methods + +### delete + +#### Signature + +```ruby +def delete(sid) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 187. + +*** + +### get + +#### Signature + +```ruby +def get(sid) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 186. + +*** + +### list + +#### Signature + +```ruby +def list(**params) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 185. + +## Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 184. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-tokens/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-tokens/index.mdx new file mode 100644 index 0000000000..4aa8c60d5b --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-tokens/index.mdx @@ -0,0 +1,96 @@ +--- +slug: "/reference/ruby/signal-wire/rest/namespaces/compat-tokens" +title: "CompatTokens" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::CompatTokens" + parent: "SignalWire::REST::Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb" + visibility: "public" +--- +# `CompatTokens` + +Compat API token management. + +## Signature + +```ruby +class CompatTokens < SignalWire::REST::BaseResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/base-resource) + +## Methods + +### create + +#### Signature + +```ruby +def create(**kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 199. + +*** + +### delete + +#### Signature + +```ruby +def delete(token_id) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 201. + +*** + +### update + +#### Signature + +```ruby +def update(token_id, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 200. + +## Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 198. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-transcriptions/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-transcriptions/index.mdx new file mode 100644 index 0000000000..520ce2304c --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-transcriptions/index.mdx @@ -0,0 +1,94 @@ +--- +slug: "/reference/ruby/signal-wire/rest/namespaces/compat-transcriptions" +title: "CompatTranscriptions" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::CompatTranscriptions" + parent: "SignalWire::REST::Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb" + visibility: "public" +--- +# `CompatTranscriptions` + +Compat transcription management. + +## Signature + +```ruby +class CompatTranscriptions < SignalWire::REST::BaseResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/base-resource) + +## Methods + +### delete + +#### Signature + +```ruby +def delete(sid) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 194. + +*** + +### get + +#### Signature + +```ruby +def get(sid) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 193. + +*** + +### list + +#### Signature + +```ruby +def list(**params) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 192. + +## Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 191. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/conference-logs/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/conference-logs/index.mdx new file mode 100644 index 0000000000..62a6d74c92 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/conference-logs/index.mdx @@ -0,0 +1,54 @@ +--- +slug: "/reference/ruby/signal-wire/rest/namespaces/conference-logs" +title: "ConferenceLogs" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::ConferenceLogs" + parent: "SignalWire::REST::Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/logs.rb" + visibility: "public" +--- +# `ConferenceLogs` + +Conference log queries. + +## Signature + +```ruby +class ConferenceLogs < SignalWire::REST::BaseResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/base-resource) + +## Methods + +### list + +#### Signature + +```ruby +def list(**params) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/logs.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/logs.rb) + +Line 30. + +## Source + +[`lib/signalwire/rest/namespaces/logs.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/logs.rb) + +Line 29. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/conference-rooms-resource/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/conference-rooms-resource/index.mdx new file mode 100644 index 0000000000..4885af404e --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/conference-rooms-resource/index.mdx @@ -0,0 +1,56 @@ +--- +slug: "/reference/ruby/signal-wire/rest/namespaces/conference-rooms-resource" +title: "ConferenceRoomsResource" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::ConferenceRoomsResource" + parent: "SignalWire::REST::Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb" + visibility: "public" +--- +# `ConferenceRoomsResource` + +Conference rooms -- uses singular 'conference\_room' for sub-resource paths. + +## Signature + +```ruby +class ConferenceRoomsResource < SignalWire::REST::Namespaces::FabricResourcePUT +``` + +## Inheritance + +**Extends:** [SignalWire::REST::Namespaces::FabricResourcePUT](/docs/sdk-reference/reference/ruby/signal-wire/rest/namespaces/fabric-resource-put) + +## Methods + +### list\_addresses + +#### Signature + +```ruby +def list_addresses(resource_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 78. + +## Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 77. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/cxml-applications-resource/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/cxml-applications-resource/index.mdx new file mode 100644 index 0000000000..7bafc829c5 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/cxml-applications-resource/index.mdx @@ -0,0 +1,58 @@ +--- +slug: "/reference/ruby/signal-wire/rest/namespaces/cxml-applications-resource" +title: "CxmlApplicationsResource" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::CxmlApplicationsResource" + parent: "SignalWire::REST::Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb" + visibility: "public" +--- +# `CxmlApplicationsResource` + +cXML applications -- no create method. + +## Signature + +```ruby +class CxmlApplicationsResource < SignalWire::REST::Namespaces::FabricResourcePUT +``` + +## Inheritance + +**Extends:** [SignalWire::REST::Namespaces::FabricResourcePUT](/docs/sdk-reference/reference/ruby/signal-wire/rest/namespaces/fabric-resource-put) + +## Methods + +### create + +#### Signature + +```ruby +def create(**_kwargs) +``` + +#### Parameters + + + +#### Throws + +- `NotImplementedError` + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 109. + +## Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 108. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/cxml-webhooks-resource/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/cxml-webhooks-resource/index.mdx new file mode 100644 index 0000000000..300bf57547 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/cxml-webhooks-resource/index.mdx @@ -0,0 +1,38 @@ +--- +slug: "/reference/ruby/signal-wire/rest/namespaces/cxml-webhooks-resource" +title: "CxmlWebhooksResource" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::CxmlWebhooksResource" + parent: "SignalWire::REST::Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb" + visibility: "public" +--- +# `CxmlWebhooksResource` + +cXML webhooks -- auto-materialized by +phone\_numbers.set\_cxml\_webhook+. + +## Signature + +```ruby +class CxmlWebhooksResource < SignalWire::REST::Namespaces::AutoMaterializedWebhook +``` + +## Inheritance + +**Extends:** [SignalWire::REST::Namespaces::AutoMaterializedWebhook](/docs/sdk-reference/reference/ruby/signal-wire/rest/namespaces/auto-materialized-webhook) + +## Constants + + + +## Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 54. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/datasphere-documents/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/datasphere-documents/index.mdx new file mode 100644 index 0000000000..23d3a5704a --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/datasphere-documents/index.mdx @@ -0,0 +1,144 @@ +--- +slug: "/reference/ruby/signal-wire/rest/namespaces/datasphere-documents" +title: "DatasphereDocuments" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::DatasphereDocuments" + parent: "SignalWire::REST::Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/datasphere.rb" + visibility: "public" +--- +# `DatasphereDocuments` + +Document management with search and chunk operations. + +## Signature + +```ruby +class DatasphereDocuments < SignalWire::REST::CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::CrudResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/crud-resource) + +## Methods + +### delete\_chunk + +#### Signature + +```ruby +def delete_chunk(document_id, chunk_id) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/datasphere.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/datasphere.rb) + +Line 24. + +*** + +### get\_chunk + +#### Signature + +```ruby +def get_chunk(document_id, chunk_id) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/datasphere.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/datasphere.rb) + +Line 20. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(http) +``` + +#### Parameters + + + +#### Returns + +`DatasphereDocuments` — a new instance of DatasphereDocuments + +#### Source + +[`lib/signalwire/rest/namespaces/datasphere.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/datasphere.rb) + +Line 8. + +*** + +### list\_chunks + +#### Signature + +```ruby +def list_chunks(document_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/datasphere.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/datasphere.rb) + +Line 16. + +*** + +### search + +#### Signature + +```ruby +def search(**kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/datasphere.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/datasphere.rb) + +Line 12. + +## Source + +[`lib/signalwire/rest/namespaces/datasphere.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/datasphere.rb) + +Line 7. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/datasphere-namespace/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/datasphere-namespace/index.mdx new file mode 100644 index 0000000000..410c234290 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/datasphere-namespace/index.mdx @@ -0,0 +1,76 @@ +--- +slug: "/reference/ruby/signal-wire/rest/namespaces/datasphere-namespace" +title: "DatasphereNamespace" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::DatasphereNamespace" + parent: "SignalWire::REST::Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/datasphere.rb" + visibility: "public" +--- +# `DatasphereNamespace` + +Datasphere API namespace. + +## Signature + +```ruby +class DatasphereNamespace < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### documents + +Returns the value of attribute documents. + +#### Signature + +```ruby +attr_reader documents -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/datasphere.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/datasphere.rb) + +Line 31. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(http) +``` + +#### Parameters + + + +#### Returns + +`DatasphereNamespace` — a new instance of DatasphereNamespace + +#### Source + +[`lib/signalwire/rest/namespaces/datasphere.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/datasphere.rb) + +Line 33. + +## Source + +[`lib/signalwire/rest/namespaces/datasphere.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/datasphere.rb) + +Line 30. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/fabric-addresses/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/fabric-addresses/index.mdx new file mode 100644 index 0000000000..bf50fdd70e --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/fabric-addresses/index.mdx @@ -0,0 +1,74 @@ +--- +slug: "/reference/ruby/signal-wire/rest/namespaces/fabric-addresses" +title: "FabricAddresses" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::FabricAddresses" + parent: "SignalWire::REST::Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb" + visibility: "public" +--- +# `FabricAddresses` + +Read-only fabric addresses. + +## Signature + +```ruby +class FabricAddresses < SignalWire::REST::BaseResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/base-resource) + +## Methods + +### get + +#### Signature + +```ruby +def get(address_id) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 164. + +*** + +### list + +#### Signature + +```ruby +def list(**params) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 160. + +## Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 159. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/fabric-namespace/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/fabric-namespace/index.mdx new file mode 100644 index 0000000000..e82d903ce7 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/fabric-namespace/index.mdx @@ -0,0 +1,346 @@ +--- +slug: "/reference/ruby/signal-wire/rest/namespaces/fabric-namespace" +title: "FabricNamespace" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::FabricNamespace" + parent: "SignalWire::REST::Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb" + visibility: "public" +--- +# `FabricNamespace` + +Fabric API namespace grouping all resource types. + +## Signature + +```ruby +class FabricNamespace < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### addresses + +Returns the value of attribute addresses. + +#### Signature + +```ruby +attr_reader addresses -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 198. + +*** + +### ai\_agents + +Returns the value of attribute ai\_agents. + +#### Signature + +```ruby +attr_reader ai_agents -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 198. + +*** + +### call\_flows + +Returns the value of attribute call\_flows. + +#### Signature + +```ruby +attr_reader call_flows -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 198. + +*** + +### conference\_rooms + +Returns the value of attribute conference\_rooms. + +#### Signature + +```ruby +attr_reader conference_rooms -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 198. + +*** + +### cxml\_applications + +Returns the value of attribute cxml\_applications. + +#### Signature + +```ruby +attr_reader cxml_applications -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 198. + +*** + +### cxml\_scripts + +Returns the value of attribute cxml\_scripts. + +#### Signature + +```ruby +attr_reader cxml_scripts -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 198. + +*** + +### cxml\_webhooks + +Returns the value of attribute cxml\_webhooks. + +#### Signature + +```ruby +attr_reader cxml_webhooks -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 198. + +*** + +### freeswitch\_connectors + +Returns the value of attribute freeswitch\_connectors. + +#### Signature + +```ruby +attr_reader freeswitch_connectors -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 198. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(http) +``` + +#### Parameters + + + +#### Returns + +`FabricNamespace` — a new instance of FabricNamespace + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 204. + +*** + +### relay\_applications + +Returns the value of attribute relay\_applications. + +#### Signature + +```ruby +attr_reader relay_applications -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 198. + +*** + +### resources + +Returns the value of attribute resources. + +#### Signature + +```ruby +attr_reader resources -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 198. + +*** + +### sip\_endpoints + +Returns the value of attribute sip\_endpoints. + +#### Signature + +```ruby +attr_reader sip_endpoints -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 198. + +*** + +### sip\_gateways + +Returns the value of attribute sip\_gateways. + +#### Signature + +```ruby +attr_reader sip_gateways -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 198. + +*** + +### subscribers + +Returns the value of attribute subscribers. + +#### Signature + +```ruby +attr_reader subscribers -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 198. + +*** + +### swml\_scripts + +Returns the value of attribute swml\_scripts. + +#### Signature + +```ruby +attr_reader swml_scripts -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 198. + +*** + +### swml\_webhooks + +Returns the value of attribute swml\_webhooks. + +#### Signature + +```ruby +attr_reader swml_webhooks -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 198. + +*** + +### tokens + +Returns the value of attribute tokens. + +#### Signature + +```ruby +attr_reader tokens -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 198. + +## Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 197. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/fabric-resource-put/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/fabric-resource-put/index.mdx new file mode 100644 index 0000000000..2b1f170e82 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/fabric-resource-put/index.mdx @@ -0,0 +1,34 @@ +--- +slug: "/reference/ruby/signal-wire/rest/namespaces/fabric-resource-put" +title: "FabricResourcePUT" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::FabricResourcePUT" + parent: "SignalWire::REST::Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb" + visibility: "public" +--- +# `FabricResourcePUT` + +Fabric resource that uses PUT for updates. + +## Signature + +```ruby +class FabricResourcePUT < SignalWire::REST::Namespaces::FabricResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::Namespaces::FabricResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/namespaces/fabric-resource) + +## Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 14. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/fabric-resource/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/fabric-resource/index.mdx new file mode 100644 index 0000000000..a8bb4f728c --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/fabric-resource/index.mdx @@ -0,0 +1,37 @@ +--- +slug: "/reference/ruby/signal-wire/rest/namespaces/fabric-resource" +title: "FabricResource" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::FabricResource" + parent: "SignalWire::REST::Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb" + visibility: "public" +--- +# `FabricResource` + +Standard fabric resource with CRUD + addresses. Inherits the ++list\_addresses+ helper from +CrudWithAddresses+ (matching Python's ++FabricResource(CrudWithAddresses)+ hierarchy); subclasses that use a +singular sub-resource path override +list\_addresses+ below. + +## Signature + +```ruby +class FabricResource < SignalWire::REST::CrudWithAddresses +``` + +## Inheritance + +**Extends:** [SignalWire::REST::CrudWithAddresses](/docs/sdk-reference/reference/ruby/signal-wire/rest/crud-with-addresses) + +## Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 10. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/fabric-tokens/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/fabric-tokens/index.mdx new file mode 100644 index 0000000000..8cb4e1f77d --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/fabric-tokens/index.mdx @@ -0,0 +1,158 @@ +--- +slug: "/reference/ruby/signal-wire/rest/namespaces/fabric-tokens" +title: "FabricTokens" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::FabricTokens" + parent: "SignalWire::REST::Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb" + visibility: "public" +--- +# `FabricTokens` + +Subscriber, guest, invite, and embed token creation. + +## Signature + +```ruby +class FabricTokens < SignalWire::REST::BaseResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/base-resource) + +## Methods + +### create\_embed\_token + +#### Signature + +```ruby +def create_embed_token(**kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 191. + +*** + +### create\_guest\_token + +#### Signature + +```ruby +def create_guest_token(**kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 187. + +*** + +### create\_invite\_token + +#### Signature + +```ruby +def create_invite_token(**kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 183. + +*** + +### create\_subscriber\_token + +#### Signature + +```ruby +def create_subscriber_token(**kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 175. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(http) +``` + +#### Parameters + + + +#### Returns + +`FabricTokens` — a new instance of FabricTokens + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 171. + +*** + +### refresh\_subscriber\_token + +#### Signature + +```ruby +def refresh_subscriber_token(**kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 179. + +## Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 170. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/fax-logs/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/fax-logs/index.mdx new file mode 100644 index 0000000000..9640d54aec --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/fax-logs/index.mdx @@ -0,0 +1,74 @@ +--- +slug: "/reference/ruby/signal-wire/rest/namespaces/fax-logs" +title: "FaxLogs" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::FaxLogs" + parent: "SignalWire::REST::Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/logs.rb" + visibility: "public" +--- +# `FaxLogs` + +Fax log queries. + +## Signature + +```ruby +class FaxLogs < SignalWire::REST::BaseResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/base-resource) + +## Methods + +### get + +#### Signature + +```ruby +def get(log_id) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/logs.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/logs.rb) + +Line 25. + +*** + +### list + +#### Signature + +```ruby +def list(**params) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/logs.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/logs.rb) + +Line 24. + +## Source + +[`lib/signalwire/rest/namespaces/logs.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/logs.rb) + +Line 23. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/generic-resources/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/generic-resources/index.mdx new file mode 100644 index 0000000000..36c114de6c --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/generic-resources/index.mdx @@ -0,0 +1,172 @@ +--- +slug: "/reference/ruby/signal-wire/rest/namespaces/generic-resources" +title: "GenericResources" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::GenericResources" + parent: "SignalWire::REST::Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb" + visibility: "public" +--- +# `GenericResources` + +Generic resource operations across all fabric resource types. + +## Signature + +```ruby +class GenericResources < SignalWire::REST::BaseResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/base-resource) + +## Methods + +### assign\_domain\_application + +#### Signature + +```ruby +def assign_domain_application(resource_id, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 153. + +*** + +### assign\_phone\_route + + + **Deprecated.** For the common binding cases use +phone\_numbers.set\_\*+ helpers. + + +This endpoint (+POST /api/fabric/resources/\{id\}/phone\_routes+) accepts +only a narrow set of legacy resource types as the attach target. It +_does not work_ for +swml\_webhook+ / +cxml\_webhook+ / +ai\_agent+ +bindings -- those are configured on the phone number and the Fabric +resource is auto-materialized (see +phone\_numbers.set\_swml\_webhook+ +etc.). The authoritative list of accepting resource types lives in +the OpenAPI spec; routing here for those types returns 404 or 422. + +#### Signature + +```ruby +def assign_phone_route(resource_id, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 141. + +*** + +### delete + +#### Signature + +```ruby +def delete(resource_id) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 124. + +*** + +### get + +#### Signature + +```ruby +def get(resource_id) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 120. + +*** + +### list + +#### Signature + +```ruby +def list(**params) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 116. + +*** + +### list\_addresses + +#### Signature + +```ruby +def list_addresses(resource_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 128. + +## Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 115. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/imported-numbers-resource/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/imported-numbers-resource/index.mdx new file mode 100644 index 0000000000..463d39baf1 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/imported-numbers-resource/index.mdx @@ -0,0 +1,78 @@ +--- +slug: "/reference/ruby/signal-wire/rest/namespaces/imported-numbers-resource" +title: "ImportedNumbersResource" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::ImportedNumbersResource" + parent: "SignalWire::REST::Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/imported_numbers.rb" + visibility: "public" +--- +# `ImportedNumbersResource` + +Import externally-hosted phone numbers. + +## Signature + +```ruby +class ImportedNumbersResource < SignalWire::REST::BaseResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/base-resource) + +## Methods + +### create + +#### Signature + +```ruby +def create(**kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/imported_numbers.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/imported_numbers.rb) + +Line 12. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(http) +``` + +#### Parameters + + + +#### Returns + +`ImportedNumbersResource` — a new instance of ImportedNumbersResource + +#### Source + +[`lib/signalwire/rest/namespaces/imported_numbers.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/imported_numbers.rb) + +Line 8. + +## Source + +[`lib/signalwire/rest/namespaces/imported_numbers.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/imported_numbers.rb) + +Line 7. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/index.mdx new file mode 100644 index 0000000000..362a54b364 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/index.mdx @@ -0,0 +1,280 @@ +--- +slug: "/reference/ruby/signal-wire/rest/namespaces" +title: "Namespaces" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "module" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces" + parent: "SignalWire::REST" + module: "SignalWire.REST" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/mfa.rb" + visibility: "public" +--- +# `Namespaces` + +## Signature + +```ruby +module Namespaces +``` + +## Classes + + + + Address management (no update endpoint). + + + + Fabric webhook resource that's normally auto-created by +phone\_numbers.set\_\*\_webhook+. Exposed for backwards compatibility. + + + + Call flows with version management. + + + + REST call control -- all 37 commands dispatched via single POST endpoint. + + + + Chat token generation. + + + + Compat account/subproject management. + + + + Compat application management. + + + + Compat call management with recording and stream sub-resources. + + + + Compat conference management. + + + + Compat fax management with media sub-resources. + + + + Compat cXML/LaML script management. + + + + Compat message management with media sub-resources. + + + + Twilio-compatible LAML API namespace. + + + + Compat phone number management. + + + + Compat queue management with members. + + + + Compat recording management. + + + + Compat API token management. + + + + Compat transcription management. + + + + Conference log queries. + + + + Conference rooms -- uses singular 'conference\_room' for sub-resource paths. + + + + cXML applications -- no create method. + + + + cXML webhooks -- auto-materialized by +phone\_numbers.set\_cxml\_webhook+. + + + + Document management with search and chunk operations. + + + + Datasphere API namespace. + + + + Read-only fabric addresses. + + + + Fabric API namespace grouping all resource types. + + + + Standard fabric resource with CRUD + addresses. Inherits the +list\_addresses+ helper from +CrudWithAddresses+ (matching Python's +FabricResource(CrudWithAddresses)+ hierarchy); subclasses that use a singular sub-resource path override +list\_addresses+ below. + + + + Fabric resource that uses PUT for updates. + + + + Subscriber, guest, invite, and embed token creation. + + + + Fax log queries. + + + + Generic resource operations across all fabric resource types. + + + + Import externally-hosted phone numbers. + + + + Logs API namespace. + + + + Phone number lookup (carrier, CNAM). + + + + Message log queries. + + + + Multi-factor authentication via SMS or phone call. + + + + Number group management with membership operations. + + + + Phone number management. + + + + Project API namespace. + + + + Project API token management. + + + + PubSub token generation. + + + + Queue management with member operations. + + + + Recording management (read-only + delete). + + + + 10DLC brand management. + + + + 10DLC campaign management. + + + + 10DLC Campaign Registry namespace. + + + + 10DLC number assignment management. + + + + 10DLC assignment order management. + + + + Short code management (read + update only). + + + + Project SIP profile (singleton resource). + + + + Subscribers with SIP endpoint management. + + + + SWML webhooks -- auto-materialized by +phone\_numbers.set\_swml\_webhook+. + + + + Verified caller ID management with verification flow. + + + + Video conference management with tokens and streams. + + + + Video conference token management. + + + + Video API namespace. + + + + Video room recording management. + + + + Video room management with streams. + + + + Video room session management. + + + + Video room token generation. + + + + Video stream management. + + + + Voice log queries. + + + +## Source + +[`lib/signalwire/rest/namespaces/mfa.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/mfa.rb) + +Line 5. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/logs-namespace/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/logs-namespace/index.mdx new file mode 100644 index 0000000000..b4be9ddf7f --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/logs-namespace/index.mdx @@ -0,0 +1,130 @@ +--- +slug: "/reference/ruby/signal-wire/rest/namespaces/logs-namespace" +title: "LogsNamespace" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::LogsNamespace" + parent: "SignalWire::REST::Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/logs.rb" + visibility: "public" +--- +# `LogsNamespace` + +Logs API namespace. + +## Signature + +```ruby +class LogsNamespace < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### conferences + +Returns the value of attribute conferences. + +#### Signature + +```ruby +attr_reader conferences -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/logs.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/logs.rb) + +Line 35. + +*** + +### fax + +Returns the value of attribute fax. + +#### Signature + +```ruby +attr_reader fax -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/logs.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/logs.rb) + +Line 35. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(http) +``` + +#### Parameters + + + +#### Returns + +`LogsNamespace` — a new instance of LogsNamespace + +#### Source + +[`lib/signalwire/rest/namespaces/logs.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/logs.rb) + +Line 37. + +*** + +### messages + +Returns the value of attribute messages. + +#### Signature + +```ruby +attr_reader messages -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/logs.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/logs.rb) + +Line 35. + +*** + +### voice + +Returns the value of attribute voice. + +#### Signature + +```ruby +attr_reader voice -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/logs.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/logs.rb) + +Line 35. + +## Source + +[`lib/signalwire/rest/namespaces/logs.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/logs.rb) + +Line 34. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/lookup-resource/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/lookup-resource/index.mdx new file mode 100644 index 0000000000..a66b60f379 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/lookup-resource/index.mdx @@ -0,0 +1,80 @@ +--- +slug: "/reference/ruby/signal-wire/rest/namespaces/lookup-resource" +title: "LookupResource" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::LookupResource" + parent: "SignalWire::REST::Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/lookup.rb" + visibility: "public" +--- +# `LookupResource` + +Phone number lookup (carrier, CNAM). + +## Signature + +```ruby +class LookupResource < SignalWire::REST::BaseResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/base-resource) + +## Methods + +### initialize + +#### Signature + +```ruby +def initialize(http) +``` + +#### Parameters + + + +#### Returns + +`LookupResource` — a new instance of LookupResource + +#### Source + +[`lib/signalwire/rest/namespaces/lookup.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/lookup.rb) + +Line 8. + +*** + +### phone\_number + +#### Signature + +```ruby +def phone_number(e164, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/lookup.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/lookup.rb) + +Line 12. + +## Source + +[`lib/signalwire/rest/namespaces/lookup.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/lookup.rb) + +Line 7. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/message-logs/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/message-logs/index.mdx new file mode 100644 index 0000000000..b86f8d1ced --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/message-logs/index.mdx @@ -0,0 +1,74 @@ +--- +slug: "/reference/ruby/signal-wire/rest/namespaces/message-logs" +title: "MessageLogs" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::MessageLogs" + parent: "SignalWire::REST::Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/logs.rb" + visibility: "public" +--- +# `MessageLogs` + +Message log queries. + +## Signature + +```ruby +class MessageLogs < SignalWire::REST::BaseResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/base-resource) + +## Methods + +### get + +#### Signature + +```ruby +def get(log_id) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/logs.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/logs.rb) + +Line 9. + +*** + +### list + +#### Signature + +```ruby +def list(**params) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/logs.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/logs.rb) + +Line 8. + +## Source + +[`lib/signalwire/rest/namespaces/logs.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/logs.rb) + +Line 7. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/mfa-resource/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/mfa-resource/index.mdx new file mode 100644 index 0000000000..a16ed42c22 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/mfa-resource/index.mdx @@ -0,0 +1,120 @@ +--- +slug: "/reference/ruby/signal-wire/rest/namespaces/mfa-resource" +title: "MfaResource" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::MfaResource" + parent: "SignalWire::REST::Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/mfa.rb" + visibility: "public" +--- +# `MfaResource` + +Multi-factor authentication via SMS or phone call. + +## Signature + +```ruby +class MfaResource < SignalWire::REST::BaseResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/base-resource) + +## Methods + +### call + +#### Signature + +```ruby +def call(**kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/mfa.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/mfa.rb) + +Line 16. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(http) +``` + +#### Parameters + + + +#### Returns + +`MfaResource` — a new instance of MfaResource + +#### Source + +[`lib/signalwire/rest/namespaces/mfa.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/mfa.rb) + +Line 8. + +*** + +### sms + +#### Signature + +```ruby +def sms(**kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/mfa.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/mfa.rb) + +Line 12. + +*** + +### verify + +#### Signature + +```ruby +def verify(request_id, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/mfa.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/mfa.rb) + +Line 20. + +## Source + +[`lib/signalwire/rest/namespaces/mfa.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/mfa.rb) + +Line 7. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/number-groups-resource/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/number-groups-resource/index.mdx new file mode 100644 index 0000000000..56a42838d6 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/number-groups-resource/index.mdx @@ -0,0 +1,142 @@ +--- +slug: "/reference/ruby/signal-wire/rest/namespaces/number-groups-resource" +title: "NumberGroupsResource" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::NumberGroupsResource" + parent: "SignalWire::REST::Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/number_groups.rb" + visibility: "public" +--- +# `NumberGroupsResource` + +Number group management with membership operations. + +## Signature + +```ruby +class NumberGroupsResource < SignalWire::REST::CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::CrudResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/crud-resource) + +## Methods + +### add\_membership + +#### Signature + +```ruby +def add_membership(group_id, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/number_groups.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/number_groups.rb) + +Line 18. + +*** + +### delete\_membership + +#### Signature + +```ruby +def delete_membership(membership_id) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/number_groups.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/number_groups.rb) + +Line 26. + +*** + +### get\_membership + +#### Signature + +```ruby +def get_membership(membership_id) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/number_groups.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/number_groups.rb) + +Line 22. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(http) +``` + +#### Parameters + + + +#### Returns + +`NumberGroupsResource` — a new instance of NumberGroupsResource + +#### Source + +[`lib/signalwire/rest/namespaces/number_groups.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/number_groups.rb) + +Line 10. + +*** + +### list\_memberships + +#### Signature + +```ruby +def list_memberships(group_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/number_groups.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/number_groups.rb) + +Line 14. + +## Source + +[`lib/signalwire/rest/namespaces/number_groups.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/number_groups.rb) + +Line 7. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/phone-numbers-resource/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/phone-numbers-resource/index.mdx new file mode 100644 index 0000000000..ca97cf5f0c --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/phone-numbers-resource/index.mdx @@ -0,0 +1,295 @@ +--- +slug: "/reference/ruby/signal-wire/rest/namespaces/phone-numbers-resource" +title: "PhoneNumbersResource" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::PhoneNumbersResource" + parent: "SignalWire::REST::Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/phone_numbers.rb" + visibility: "public" +--- +# `PhoneNumbersResource` + +Phone number management. + +Supports the standard CRUD surface plus typed helpers for binding an +inbound call to a handler (SWML webhook, cXML webhook, AI agent, call +flow, RELAY application/topic). The binding model is: set ++call\_handler+ and the handler-specific companion field on the phone +number; the server auto-materializes the matching Fabric resource. +See +SignalWire::REST::PhoneCallHandler+ for the enum, and the +porting-sdk's +phone-binding.md+ for the full model. + +## Signature + +```ruby +class PhoneNumbersResource < SignalWire::REST::CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::CrudResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/crud-resource) + +## Methods + +### initialize + +#### Signature + +```ruby +def initialize(http) +``` + +#### Parameters + + + +#### Returns + +`PhoneNumbersResource` — a new instance of PhoneNumbersResource + +#### Source + +[`lib/signalwire/rest/namespaces/phone_numbers.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/phone_numbers.rb) + +Line 20. + +*** + +### search + +#### Signature + +```ruby +def search(**params) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/phone_numbers.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/phone_numbers.rb) + +Line 24. + +*** + +### set\_ai\_agent + +Route inbound calls to an AI Agent Fabric resource by ID. + +#### Signature + +```ruby +def set_ai_agent(sid, agent_id:, **extra) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/phone_numbers.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/phone_numbers.rb) + +Line 80. + +*** + +### set\_call\_flow + +Route inbound calls to a Call Flow by ID. + ++version+ accepts +"working\_copy"+ or +"current\_deployed"+ (server +default when omitted). + +#### Signature + +```ruby +def set_call_flow(sid, flow_id:, version: nil, **extra) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/phone_numbers.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/phone_numbers.rb) + +Line 93. + +*** + +### set\_cxml\_application + +Route inbound calls to an existing cXML application by ID. + +#### Signature + +```ruby +def set_cxml_application(sid, application_id:, **extra) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/phone_numbers.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/phone_numbers.rb) + +Line 70. + +*** + +### set\_cxml\_webhook + +Route inbound calls to a cXML (Twilio-compat / LAML) webhook. + +Despite the wire value +laml\_webhooks+ being plural, this creates a +single +cxml\_webhook+ Fabric resource. +fallback\_url+ is used when +the primary URL fails; +status\_callback\_url+ receives call status +updates. + +#### Signature + +```ruby +def set_cxml_webhook(sid, url:, fallback_url: nil, status_callback_url: nil, **extra) +``` + +#### Parameters + + + + + + + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/phone_numbers.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/phone_numbers.rb) + +Line 59. + +*** + +### set\_relay\_application + +Route inbound calls to a named RELAY application. + +#### Signature + +```ruby +def set_relay_application(sid, name:, **extra) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/phone_numbers.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/phone_numbers.rb) + +Line 103. + +*** + +### set\_relay\_topic + +Route inbound calls to a RELAY topic (client subscription). + +#### Signature + +```ruby +def set_relay_topic(sid, topic:, status_callback_url: nil, **extra) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/phone_numbers.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/phone_numbers.rb) + +Line 113. + +*** + +### set\_swml\_webhook + +Route inbound calls to an SWML webhook URL. + +Your backend returns an SWML document per call. The server +auto-creates a +swml\_webhook+ Fabric resource keyed off this URL. + +#### Signature + +```ruby +def set_swml_webhook(sid, url:, **extra) +``` + +#### Parameters + + + the phone number SID (e.g. +pn-...+) + + + + + + additional fields passed to +update+ + + +#### Returns + +`Hash` — the updated phone number representation + +#### Source + +[`lib/signalwire/rest/namespaces/phone_numbers.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/phone_numbers.rb) + +Line 44. + +## Source + +[`lib/signalwire/rest/namespaces/phone_numbers.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/phone_numbers.rb) + +Line 17. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/project-namespace/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/project-namespace/index.mdx new file mode 100644 index 0000000000..54c950506c --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/project-namespace/index.mdx @@ -0,0 +1,76 @@ +--- +slug: "/reference/ruby/signal-wire/rest/namespaces/project-namespace" +title: "ProjectNamespace" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::ProjectNamespace" + parent: "SignalWire::REST::Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/project.rb" + visibility: "public" +--- +# `ProjectNamespace` + +Project API namespace. + +## Signature + +```ruby +class ProjectNamespace < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### initialize + +#### Signature + +```ruby +def initialize(http) +``` + +#### Parameters + + + +#### Returns + +`ProjectNamespace` — a new instance of ProjectNamespace + +#### Source + +[`lib/signalwire/rest/namespaces/project.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/project.rb) + +Line 27. + +*** + +### tokens + +Returns the value of attribute tokens. + +#### Signature + +```ruby +attr_reader tokens -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/project.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/project.rb) + +Line 25. + +## Source + +[`lib/signalwire/rest/namespaces/project.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/project.rb) + +Line 24. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/project-tokens/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/project-tokens/index.mdx new file mode 100644 index 0000000000..2499d89502 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/project-tokens/index.mdx @@ -0,0 +1,120 @@ +--- +slug: "/reference/ruby/signal-wire/rest/namespaces/project-tokens" +title: "ProjectTokens" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::ProjectTokens" + parent: "SignalWire::REST::Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/project.rb" + visibility: "public" +--- +# `ProjectTokens` + +Project API token management. + +## Signature + +```ruby +class ProjectTokens < SignalWire::REST::BaseResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/base-resource) + +## Methods + +### create + +#### Signature + +```ruby +def create(**kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/project.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/project.rb) + +Line 12. + +*** + +### delete + +#### Signature + +```ruby +def delete(token_id) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/project.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/project.rb) + +Line 18. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(http) +``` + +#### Parameters + + + +#### Returns + +`ProjectTokens` — a new instance of ProjectTokens + +#### Source + +[`lib/signalwire/rest/namespaces/project.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/project.rb) + +Line 8. + +*** + +### update + +#### Signature + +```ruby +def update(token_id, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/project.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/project.rb) + +Line 14. + +## Source + +[`lib/signalwire/rest/namespaces/project.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/project.rb) + +Line 7. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/pub-sub-resource/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/pub-sub-resource/index.mdx new file mode 100644 index 0000000000..5801d168d8 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/pub-sub-resource/index.mdx @@ -0,0 +1,78 @@ +--- +slug: "/reference/ruby/signal-wire/rest/namespaces/pub-sub-resource" +title: "PubSubResource" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::PubSubResource" + parent: "SignalWire::REST::Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/pubsub.rb" + visibility: "public" +--- +# `PubSubResource` + +PubSub token generation. + +## Signature + +```ruby +class PubSubResource < SignalWire::REST::BaseResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/base-resource) + +## Methods + +### create\_token + +#### Signature + +```ruby +def create_token(**kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/pubsub.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/pubsub.rb) + +Line 12. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(http) +``` + +#### Parameters + + + +#### Returns + +`PubSubResource` — a new instance of PubSubResource + +#### Source + +[`lib/signalwire/rest/namespaces/pubsub.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/pubsub.rb) + +Line 8. + +## Source + +[`lib/signalwire/rest/namespaces/pubsub.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/pubsub.rb) + +Line 7. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/queues-resource/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/queues-resource/index.mdx new file mode 100644 index 0000000000..7763cf64e7 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/queues-resource/index.mdx @@ -0,0 +1,122 @@ +--- +slug: "/reference/ruby/signal-wire/rest/namespaces/queues-resource" +title: "QueuesResource" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::QueuesResource" + parent: "SignalWire::REST::Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/queues.rb" + visibility: "public" +--- +# `QueuesResource` + +Queue management with member operations. + +## Signature + +```ruby +class QueuesResource < SignalWire::REST::CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::CrudResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/crud-resource) + +## Methods + +### get\_member + +#### Signature + +```ruby +def get_member(queue_id, member_id) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/queues.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/queues.rb) + +Line 22. + +*** + +### get\_next\_member + +#### Signature + +```ruby +def get_next_member(queue_id) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/queues.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/queues.rb) + +Line 18. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(http) +``` + +#### Parameters + + + +#### Returns + +`QueuesResource` — a new instance of QueuesResource + +#### Source + +[`lib/signalwire/rest/namespaces/queues.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/queues.rb) + +Line 10. + +*** + +### list\_members + +#### Signature + +```ruby +def list_members(queue_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/queues.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/queues.rb) + +Line 14. + +## Source + +[`lib/signalwire/rest/namespaces/queues.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/queues.rb) + +Line 7. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/recordings-resource/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/recordings-resource/index.mdx new file mode 100644 index 0000000000..cd268d6363 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/recordings-resource/index.mdx @@ -0,0 +1,118 @@ +--- +slug: "/reference/ruby/signal-wire/rest/namespaces/recordings-resource" +title: "RecordingsResource" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::RecordingsResource" + parent: "SignalWire::REST::Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/recordings.rb" + visibility: "public" +--- +# `RecordingsResource` + +Recording management (read-only + delete). + +## Signature + +```ruby +class RecordingsResource < SignalWire::REST::BaseResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/base-resource) + +## Methods + +### delete + +#### Signature + +```ruby +def delete(recording_id) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/recordings.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/recordings.rb) + +Line 14. + +*** + +### get + +#### Signature + +```ruby +def get(recording_id) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/recordings.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/recordings.rb) + +Line 13. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(http) +``` + +#### Parameters + + + +#### Returns + +`RecordingsResource` — a new instance of RecordingsResource + +#### Source + +[`lib/signalwire/rest/namespaces/recordings.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/recordings.rb) + +Line 8. + +*** + +### list + +#### Signature + +```ruby +def list(**params) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/recordings.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/recordings.rb) + +Line 12. + +## Source + +[`lib/signalwire/rest/namespaces/recordings.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/recordings.rb) + +Line 7. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/registry-brands/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/registry-brands/index.mdx new file mode 100644 index 0000000000..45c106c570 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/registry-brands/index.mdx @@ -0,0 +1,138 @@ +--- +slug: "/reference/ruby/signal-wire/rest/namespaces/registry-brands" +title: "RegistryBrands" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::RegistryBrands" + parent: "SignalWire::REST::Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb" + visibility: "public" +--- +# `RegistryBrands` + +10DLC brand management. + +## Signature + +```ruby +class RegistryBrands < SignalWire::REST::BaseResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/base-resource) + +## Methods + +### create + +#### Signature + +```ruby +def create(**kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb) + +Line 9. + +*** + +### create\_campaign + +#### Signature + +```ruby +def create_campaign(brand_id, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb) + +Line 16. + +*** + +### get + +#### Signature + +```ruby +def get(brand_id) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb) + +Line 10. + +*** + +### list + +#### Signature + +```ruby +def list(**params) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb) + +Line 8. + +*** + +### list\_campaigns + +#### Signature + +```ruby +def list_campaigns(brand_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb) + +Line 12. + +## Source + +[`lib/signalwire/rest/namespaces/registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb) + +Line 7. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/registry-campaigns/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/registry-campaigns/index.mdx new file mode 100644 index 0000000000..f03e899acb --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/registry-campaigns/index.mdx @@ -0,0 +1,142 @@ +--- +slug: "/reference/ruby/signal-wire/rest/namespaces/registry-campaigns" +title: "RegistryCampaigns" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::RegistryCampaigns" + parent: "SignalWire::REST::Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb" + visibility: "public" +--- +# `RegistryCampaigns` + +10DLC campaign management. + +## Signature + +```ruby +class RegistryCampaigns < SignalWire::REST::BaseResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/base-resource) + +## Methods + +### create\_order + +#### Signature + +```ruby +def create_order(campaign_id, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb) + +Line 34. + +*** + +### get + +#### Signature + +```ruby +def get(campaign_id) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb) + +Line 23. + +*** + +### list\_numbers + +#### Signature + +```ruby +def list_numbers(campaign_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb) + +Line 26. + +*** + +### list\_orders + +#### Signature + +```ruby +def list_orders(campaign_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb) + +Line 30. + +*** + +### update + +#### Signature + +```ruby +def update(campaign_id, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb) + +Line 24. + +## Source + +[`lib/signalwire/rest/namespaces/registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb) + +Line 22. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/registry-namespace/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/registry-namespace/index.mdx new file mode 100644 index 0000000000..47cdf1ae11 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/registry-namespace/index.mdx @@ -0,0 +1,130 @@ +--- +slug: "/reference/ruby/signal-wire/rest/namespaces/registry-namespace" +title: "RegistryNamespace" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::RegistryNamespace" + parent: "SignalWire::REST::Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb" + visibility: "public" +--- +# `RegistryNamespace` + +10DLC Campaign Registry namespace. + +## Signature + +```ruby +class RegistryNamespace < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### brands + +Returns the value of attribute brands. + +#### Signature + +```ruby +attr_reader brands -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb) + +Line 55. + +*** + +### campaigns + +Returns the value of attribute campaigns. + +#### Signature + +```ruby +attr_reader campaigns -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb) + +Line 55. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(http) +``` + +#### Parameters + + + +#### Returns + +`RegistryNamespace` — a new instance of RegistryNamespace + +#### Source + +[`lib/signalwire/rest/namespaces/registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb) + +Line 57. + +*** + +### numbers + +Returns the value of attribute numbers. + +#### Signature + +```ruby +attr_reader numbers -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb) + +Line 55. + +*** + +### orders + +Returns the value of attribute orders. + +#### Signature + +```ruby +attr_reader orders -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb) + +Line 55. + +## Source + +[`lib/signalwire/rest/namespaces/registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb) + +Line 54. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/registry-numbers/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/registry-numbers/index.mdx new file mode 100644 index 0000000000..b9c676ce3e --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/registry-numbers/index.mdx @@ -0,0 +1,54 @@ +--- +slug: "/reference/ruby/signal-wire/rest/namespaces/registry-numbers" +title: "RegistryNumbers" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::RegistryNumbers" + parent: "SignalWire::REST::Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb" + visibility: "public" +--- +# `RegistryNumbers` + +10DLC number assignment management. + +## Signature + +```ruby +class RegistryNumbers < SignalWire::REST::BaseResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/base-resource) + +## Methods + +### delete + +#### Signature + +```ruby +def delete(number_id) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb) + +Line 48. + +## Source + +[`lib/signalwire/rest/namespaces/registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb) + +Line 47. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/registry-orders/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/registry-orders/index.mdx new file mode 100644 index 0000000000..e7b176b108 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/registry-orders/index.mdx @@ -0,0 +1,54 @@ +--- +slug: "/reference/ruby/signal-wire/rest/namespaces/registry-orders" +title: "RegistryOrders" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::RegistryOrders" + parent: "SignalWire::REST::Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb" + visibility: "public" +--- +# `RegistryOrders` + +10DLC assignment order management. + +## Signature + +```ruby +class RegistryOrders < SignalWire::REST::BaseResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/base-resource) + +## Methods + +### get + +#### Signature + +```ruby +def get(order_id) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb) + +Line 41. + +## Source + +[`lib/signalwire/rest/namespaces/registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb) + +Line 40. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/short-codes-resource/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/short-codes-resource/index.mdx new file mode 100644 index 0000000000..ec5a177957 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/short-codes-resource/index.mdx @@ -0,0 +1,120 @@ +--- +slug: "/reference/ruby/signal-wire/rest/namespaces/short-codes-resource" +title: "ShortCodesResource" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::ShortCodesResource" + parent: "SignalWire::REST::Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/short_codes.rb" + visibility: "public" +--- +# `ShortCodesResource` + +Short code management (read + update only). + +## Signature + +```ruby +class ShortCodesResource < SignalWire::REST::BaseResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/base-resource) + +## Methods + +### get + +#### Signature + +```ruby +def get(short_code_id) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/short_codes.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/short_codes.rb) + +Line 16. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(http) +``` + +#### Parameters + + + +#### Returns + +`ShortCodesResource` — a new instance of ShortCodesResource + +#### Source + +[`lib/signalwire/rest/namespaces/short_codes.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/short_codes.rb) + +Line 8. + +*** + +### list + +#### Signature + +```ruby +def list(**params) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/short_codes.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/short_codes.rb) + +Line 12. + +*** + +### update + +#### Signature + +```ruby +def update(short_code_id, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/short_codes.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/short_codes.rb) + +Line 20. + +## Source + +[`lib/signalwire/rest/namespaces/short_codes.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/short_codes.rb) + +Line 7. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/sip-profile-resource/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/sip-profile-resource/index.mdx new file mode 100644 index 0000000000..53b0da8981 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/sip-profile-resource/index.mdx @@ -0,0 +1,94 @@ +--- +slug: "/reference/ruby/signal-wire/rest/namespaces/sip-profile-resource" +title: "SipProfileResource" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::SipProfileResource" + parent: "SignalWire::REST::Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/sip_profile.rb" + visibility: "public" +--- +# `SipProfileResource` + +Project SIP profile (singleton resource). + +## Signature + +```ruby +class SipProfileResource < SignalWire::REST::BaseResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/base-resource) + +## Methods + +### get + +#### Signature + +```ruby +def get +``` + +#### Source + +[`lib/signalwire/rest/namespaces/sip_profile.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/sip_profile.rb) + +Line 12. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(http) +``` + +#### Parameters + + + +#### Returns + +`SipProfileResource` — a new instance of SipProfileResource + +#### Source + +[`lib/signalwire/rest/namespaces/sip_profile.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/sip_profile.rb) + +Line 8. + +*** + +### update + +#### Signature + +```ruby +def update(**kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/sip_profile.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/sip_profile.rb) + +Line 16. + +## Source + +[`lib/signalwire/rest/namespaces/sip_profile.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/sip_profile.rb) + +Line 7. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/subscribers-resource/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/subscribers-resource/index.mdx new file mode 100644 index 0000000000..495ffb5b94 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/subscribers-resource/index.mdx @@ -0,0 +1,146 @@ +--- +slug: "/reference/ruby/signal-wire/rest/namespaces/subscribers-resource" +title: "SubscribersResource" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::SubscribersResource" + parent: "SignalWire::REST::Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb" + visibility: "public" +--- +# `SubscribersResource` + +Subscribers with SIP endpoint management. + +## Signature + +```ruby +class SubscribersResource < SignalWire::REST::Namespaces::FabricResourcePUT +``` + +## Inheritance + +**Extends:** [SignalWire::REST::Namespaces::FabricResourcePUT](/docs/sdk-reference/reference/ruby/signal-wire/rest/namespaces/fabric-resource-put) + +## Methods + +### create\_sip\_endpoint + +#### Signature + +```ruby +def create_sip_endpoint(subscriber_id, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 90. + +*** + +### delete\_sip\_endpoint + +#### Signature + +```ruby +def delete_sip_endpoint(subscriber_id, endpoint_id) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 102. + +*** + +### get\_sip\_endpoint + +#### Signature + +```ruby +def get_sip_endpoint(subscriber_id, endpoint_id) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 94. + +*** + +### list\_sip\_endpoints + +#### Signature + +```ruby +def list_sip_endpoints(subscriber_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 86. + +*** + +### update\_sip\_endpoint + +#### Signature + +```ruby +def update_sip_endpoint(subscriber_id, endpoint_id, **kwargs) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 98. + +## Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 85. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/swml-webhooks-resource/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/swml-webhooks-resource/index.mdx new file mode 100644 index 0000000000..9ac3e3648b --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/swml-webhooks-resource/index.mdx @@ -0,0 +1,38 @@ +--- +slug: "/reference/ruby/signal-wire/rest/namespaces/swml-webhooks-resource" +title: "SwmlWebhooksResource" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::SwmlWebhooksResource" + parent: "SignalWire::REST::Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb" + visibility: "public" +--- +# `SwmlWebhooksResource` + +SWML webhooks -- auto-materialized by +phone\_numbers.set\_swml\_webhook+. + +## Signature + +```ruby +class SwmlWebhooksResource < SignalWire::REST::Namespaces::AutoMaterializedWebhook +``` + +## Inheritance + +**Extends:** [SignalWire::REST::Namespaces::AutoMaterializedWebhook](/docs/sdk-reference/reference/ruby/signal-wire/rest/namespaces/auto-materialized-webhook) + +## Constants + + + +## Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 49. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/verified-callers-resource/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/verified-callers-resource/index.mdx new file mode 100644 index 0000000000..51a6f17b32 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/verified-callers-resource/index.mdx @@ -0,0 +1,100 @@ +--- +slug: "/reference/ruby/signal-wire/rest/namespaces/verified-callers-resource" +title: "VerifiedCallersResource" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::VerifiedCallersResource" + parent: "SignalWire::REST::Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/verified_callers.rb" + visibility: "public" +--- +# `VerifiedCallersResource` + +Verified caller ID management with verification flow. + +## Signature + +```ruby +class VerifiedCallersResource < SignalWire::REST::CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::CrudResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/crud-resource) + +## Methods + +### initialize + +#### Signature + +```ruby +def initialize(http) +``` + +#### Parameters + + + +#### Returns + +`VerifiedCallersResource` — a new instance of VerifiedCallersResource + +#### Source + +[`lib/signalwire/rest/namespaces/verified_callers.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/verified_callers.rb) + +Line 10. + +*** + +### redial\_verification + +#### Signature + +```ruby +def redial_verification(caller_id) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/verified_callers.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/verified_callers.rb) + +Line 14. + +*** + +### submit\_verification + +#### Signature + +```ruby +def submit_verification(caller_id, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/verified_callers.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/verified_callers.rb) + +Line 18. + +## Source + +[`lib/signalwire/rest/namespaces/verified_callers.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/verified_callers.rb) + +Line 7. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/video-conference-tokens/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/video-conference-tokens/index.mdx new file mode 100644 index 0000000000..caa057285b --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/video-conference-tokens/index.mdx @@ -0,0 +1,74 @@ +--- +slug: "/reference/ruby/signal-wire/rest/namespaces/video-conference-tokens" +title: "VideoConferenceTokens" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::VideoConferenceTokens" + parent: "SignalWire::REST::Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb" + visibility: "public" +--- +# `VideoConferenceTokens` + +Video conference token management. + +## Signature + +```ruby +class VideoConferenceTokens < SignalWire::REST::BaseResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/base-resource) + +## Methods + +### get + +#### Signature + +```ruby +def get(token_id) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 87. + +*** + +### reset + +#### Signature + +```ruby +def reset(token_id) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 91. + +## Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 86. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/video-conferences/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/video-conferences/index.mdx new file mode 100644 index 0000000000..59f126ca74 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/video-conferences/index.mdx @@ -0,0 +1,100 @@ +--- +slug: "/reference/ruby/signal-wire/rest/namespaces/video-conferences" +title: "VideoConferences" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::VideoConferences" + parent: "SignalWire::REST::Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb" + visibility: "public" +--- +# `VideoConferences` + +Video conference management with tokens and streams. + +## Signature + +```ruby +class VideoConferences < SignalWire::REST::CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::CrudResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/crud-resource) + +## Methods + +### create\_stream + +#### Signature + +```ruby +def create_stream(conference_id, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 80. + +*** + +### list\_conference\_tokens + +#### Signature + +```ruby +def list_conference_tokens(conference_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 72. + +*** + +### list\_streams + +#### Signature + +```ruby +def list_streams(conference_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 76. + +## Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 69. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/video-namespace/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/video-namespace/index.mdx new file mode 100644 index 0000000000..5feb7940cb --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/video-namespace/index.mdx @@ -0,0 +1,184 @@ +--- +slug: "/reference/ruby/signal-wire/rest/namespaces/video-namespace" +title: "VideoNamespace" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::VideoNamespace" + parent: "SignalWire::REST::Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb" + visibility: "public" +--- +# `VideoNamespace` + +Video API namespace. + +## Signature + +```ruby +class VideoNamespace < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### conference\_tokens + +Returns the value of attribute conference\_tokens. + +#### Signature + +```ruby +attr_reader conference_tokens -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 113. + +*** + +### conferences + +Returns the value of attribute conferences. + +#### Signature + +```ruby +attr_reader conferences -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 113. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(http) +``` + +#### Parameters + + + +#### Returns + +`VideoNamespace` — a new instance of VideoNamespace + +#### Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 116. + +*** + +### room\_recordings + +Returns the value of attribute room\_recordings. + +#### Signature + +```ruby +attr_reader room_recordings -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 113. + +*** + +### room\_sessions + +Returns the value of attribute room\_sessions. + +#### Signature + +```ruby +attr_reader room_sessions -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 113. + +*** + +### room\_tokens + +Returns the value of attribute room\_tokens. + +#### Signature + +```ruby +attr_reader room_tokens -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 113. + +*** + +### rooms + +Returns the value of attribute rooms. + +#### Signature + +```ruby +attr_reader rooms -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 113. + +*** + +### streams + +Returns the value of attribute streams. + +#### Signature + +```ruby +attr_reader streams -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 113. + +## Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 112. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/video-room-recordings/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/video-room-recordings/index.mdx new file mode 100644 index 0000000000..01fc5afd7d --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/video-room-recordings/index.mdx @@ -0,0 +1,116 @@ +--- +slug: "/reference/ruby/signal-wire/rest/namespaces/video-room-recordings" +title: "VideoRoomRecordings" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::VideoRoomRecordings" + parent: "SignalWire::REST::Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb" + visibility: "public" +--- +# `VideoRoomRecordings` + +Video room recording management. + +## Signature + +```ruby +class VideoRoomRecordings < SignalWire::REST::BaseResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/base-resource) + +## Methods + +### delete + +#### Signature + +```ruby +def delete(recording_id) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 59. + +*** + +### get + +#### Signature + +```ruby +def get(recording_id) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 55. + +*** + +### list + +#### Signature + +```ruby +def list(**params) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 51. + +*** + +### list\_events + +#### Signature + +```ruby +def list_events(recording_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 63. + +## Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 50. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/video-room-sessions/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/video-room-sessions/index.mdx new file mode 100644 index 0000000000..27e7ed0e51 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/video-room-sessions/index.mdx @@ -0,0 +1,140 @@ +--- +slug: "/reference/ruby/signal-wire/rest/namespaces/video-room-sessions" +title: "VideoRoomSessions" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::VideoRoomSessions" + parent: "SignalWire::REST::Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb" + visibility: "public" +--- +# `VideoRoomSessions` + +Video room session management. + +## Signature + +```ruby +class VideoRoomSessions < SignalWire::REST::BaseResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/base-resource) + +## Methods + +### get + +#### Signature + +```ruby +def get(session_id) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 32. + +*** + +### list + +#### Signature + +```ruby +def list(**params) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 28. + +*** + +### list\_events + +#### Signature + +```ruby +def list_events(session_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 36. + +*** + +### list\_members + +#### Signature + +```ruby +def list_members(session_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 40. + +*** + +### list\_recordings + +#### Signature + +```ruby +def list_recordings(session_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 44. + +## Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 27. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/video-room-tokens/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/video-room-tokens/index.mdx new file mode 100644 index 0000000000..3c713e0004 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/video-room-tokens/index.mdx @@ -0,0 +1,54 @@ +--- +slug: "/reference/ruby/signal-wire/rest/namespaces/video-room-tokens" +title: "VideoRoomTokens" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::VideoRoomTokens" + parent: "SignalWire::REST::Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb" + visibility: "public" +--- +# `VideoRoomTokens` + +Video room token generation. + +## Signature + +```ruby +class VideoRoomTokens < SignalWire::REST::BaseResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/base-resource) + +## Methods + +### create + +#### Signature + +```ruby +def create(**kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 21. + +## Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 20. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/video-rooms/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/video-rooms/index.mdx new file mode 100644 index 0000000000..722f42b71d --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/video-rooms/index.mdx @@ -0,0 +1,78 @@ +--- +slug: "/reference/ruby/signal-wire/rest/namespaces/video-rooms" +title: "VideoRooms" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::VideoRooms" + parent: "SignalWire::REST::Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb" + visibility: "public" +--- +# `VideoRooms` + +Video room management with streams. + +## Signature + +```ruby +class VideoRooms < SignalWire::REST::CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::CrudResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/crud-resource) + +## Methods + +### create\_stream + +#### Signature + +```ruby +def create_stream(room_id, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 14. + +*** + +### list\_streams + +#### Signature + +```ruby +def list_streams(room_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 10. + +## Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 7. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/video-streams/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/video-streams/index.mdx new file mode 100644 index 0000000000..be7e8e4710 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/video-streams/index.mdx @@ -0,0 +1,96 @@ +--- +slug: "/reference/ruby/signal-wire/rest/namespaces/video-streams" +title: "VideoStreams" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::VideoStreams" + parent: "SignalWire::REST::Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb" + visibility: "public" +--- +# `VideoStreams` + +Video stream management. + +## Signature + +```ruby +class VideoStreams < SignalWire::REST::BaseResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/base-resource) + +## Methods + +### delete + +#### Signature + +```ruby +def delete(stream_id) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 106. + +*** + +### get + +#### Signature + +```ruby +def get(stream_id) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 98. + +*** + +### update + +#### Signature + +```ruby +def update(stream_id, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 102. + +## Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 97. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/voice-logs/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/voice-logs/index.mdx new file mode 100644 index 0000000000..1e15d3baa7 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/voice-logs/index.mdx @@ -0,0 +1,96 @@ +--- +slug: "/reference/ruby/signal-wire/rest/namespaces/voice-logs" +title: "VoiceLogs" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::VoiceLogs" + parent: "SignalWire::REST::Namespaces" + module: "SignalWire.REST.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/logs.rb" + visibility: "public" +--- +# `VoiceLogs` + +Voice log queries. + +## Signature + +```ruby +class VoiceLogs < SignalWire::REST::BaseResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/base-resource) + +## Methods + +### get + +#### Signature + +```ruby +def get(log_id) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/logs.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/logs.rb) + +Line 15. + +*** + +### list + +#### Signature + +```ruby +def list(**params) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/logs.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/logs.rb) + +Line 14. + +*** + +### list\_events + +#### Signature + +```ruby +def list_events(log_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/logs.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/logs.rb) + +Line 17. + +## Source + +[`lib/signalwire/rest/namespaces/logs.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/logs.rb) + +Line 13. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/paginated-iterator/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/paginated-iterator/index.mdx new file mode 100644 index 0000000000..af15d0b199 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/paginated-iterator/index.mdx @@ -0,0 +1,283 @@ +--- +slug: "/reference/ruby/signal-wire/rest/paginated-iterator" +title: "PaginatedIterator" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::PaginatedIterator" + parent: "SignalWire::REST" + module: "SignalWire.REST" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/pagination.rb" + visibility: "public" +--- +# `PaginatedIterator` + +Iterates items across paginated API responses. + +Mirrors the Python PaginatedIterator (signalwire.rest.\_pagination): +the constructor records http/path/params/data\_key without fetching; +iteration walks pages by following the +links.next+ cursor. + +Usage: +iter = SignalWire::REST::PaginatedIterator.new(http, '/api/path', +params: \{\}, data\_key: 'data') +iter.each \{ |item| ... \} + +The iterator is single-pass (matching Python's **next** semantics); +use #to\_a to collect every item across all pages. + +## Signature + +```ruby +class PaginatedIterator < Object +``` + +## Inheritance + +**Extends:** `Object` + +**Mixins:** `Enumerable` + +## Methods + +### \_\_iter\_\_ + +Equivalent of Python's +**iter**+: returns the iterator itself. + +#### Signature + +```ruby +def __iter__ +``` + +#### Source + +[`lib/signalwire/rest/pagination.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/pagination.rb) + +Line 52. + +*** + +### \_\_next\_\_ + +Equivalent of Python's +**next**+: returns the next item across pages, +raising +StopIteration+ when the iterator is exhausted (mirroring +Python's raise-StopIteration contract rather than the +:**stop**+ +sentinel used internally by +#each+). + +#### Signature + +```ruby +def __next__ +``` + +#### Throws + +- `StopIteration` + +#### Source + +[`lib/signalwire/rest/pagination.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/pagination.rb) + +Line 60. + +*** + +### data\_key + +Returns the value of attribute data\_key. + +#### Signature + +```ruby +attr_reader data_key -> Object +``` + +#### Source + +[`lib/signalwire/rest/pagination.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/pagination.rb) + +Line 21. + +*** + +### done + +Returns the value of attribute done. + +#### Signature + +```ruby +attr_reader done -> Object +``` + +#### Source + +[`lib/signalwire/rest/pagination.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/pagination.rb) + +Line 21. + +*** + +### each + +#### Signature + +```ruby +def each +``` + +#### Source + +[`lib/signalwire/rest/pagination.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/pagination.rb) + +Line 34. + +*** + +### http + +Returns the value of attribute http. + +#### Signature + +```ruby +attr_reader http -> Object +``` + +#### Source + +[`lib/signalwire/rest/pagination.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/pagination.rb) + +Line 21. + +*** + +### index + +Returns the value of attribute index. + +#### Signature + +```ruby +attr_reader index -> Object +``` + +#### Source + +[`lib/signalwire/rest/pagination.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/pagination.rb) + +Line 21. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(http, path, params = nil, data_key = 'data') +``` + +#### Parameters + + + + + + + + + +#### Returns + +`PaginatedIterator` — a new instance of PaginatedIterator + +#### Source + +[`lib/signalwire/rest/pagination.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/pagination.rb) + +Line 23. + +*** + +### items + +Returns the value of attribute items. + +#### Signature + +```ruby +attr_reader items -> Object +``` + +#### Source + +[`lib/signalwire/rest/pagination.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/pagination.rb) + +Line 21. + +*** + +### next\_item + +Equivalent of Python's **next**. Returns the sentinel +:**stop**+ +when exhausted (Ruby has no StopIteration error idiom for plain +Enumerable), but the public surface is +#each+. + +#### Signature + +```ruby +def next_item +``` + +#### Source + +[`lib/signalwire/rest/pagination.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/pagination.rb) + +Line 70. + +*** + +### params + +Returns the value of attribute params. + +#### Signature + +```ruby +attr_reader params -> Object +``` + +#### Source + +[`lib/signalwire/rest/pagination.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/pagination.rb) + +Line 21. + +*** + +### path + +Returns the value of attribute path. + +#### Signature + +```ruby +attr_reader path -> Object +``` + +#### Source + +[`lib/signalwire/rest/pagination.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/pagination.rb) + +Line 21. + +## Source + +[`lib/signalwire/rest/pagination.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/pagination.rb) + +Line 18. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/phone-call-handler/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/phone-call-handler/index.mdx new file mode 100644 index 0000000000..79c6a6f10f --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/phone-call-handler/index.mdx @@ -0,0 +1,93 @@ +--- +slug: "/reference/ruby/signal-wire/rest/phone-call-handler" +title: "PhoneCallHandler" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "module" + language: "ruby" + qualified_name: "SignalWire::REST::PhoneCallHandler" + parent: "SignalWire::REST" + module: "SignalWire.REST" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/phone_call_handler.rb" + visibility: "public" +--- +# `PhoneCallHandler` + +PhoneCallHandler -- enum-like constants of the +call\_handler+ values +accepted by +phone\_numbers.update+. + +Named +PhoneCallHandler+ (not +CallHandler+) to avoid colliding with +the RELAY client's inbound-call-handler callback (+Relay::Client#on\_call+). + +Setting a phone number's +call\_handler+ together with the handler-specific +companion field routes inbound calls and auto-materializes the matching +Fabric resource on the server. See the high-level helpers on ++SignalWire::REST::Namespaces::PhoneNumbersResource+. + +\=== Mapping + +Constant | Companion field (required) | Auto-creates resource +\------------------+--------------------------------+---------------------- +RELAY\_SCRIPT | call\_relay\_script\_url | swml\_webhook +LAML\_WEBHOOKS | call\_request\_url | cxml\_webhook +LAML\_APPLICATION | call\_laml\_application\_id | cxml\_application +AI\_AGENT | call\_ai\_agent\_id | ai\_agent +CALL\_FLOW | call\_flow\_id | call\_flow +RELAY\_APPLICATION | call\_relay\_application | relay\_application +RELAY\_TOPIC | call\_relay\_topic | (routes via RELAY) +RELAY\_CONTEXT | call\_relay\_context | (legacy, prefer topic) +RELAY\_CONNECTOR | (connector config) | (internal) +VIDEO\_ROOM | call\_video\_room\_id | (routes to Video API) +DIALOGFLOW | call\_dialogflow\_agent\_id | (none) + +Note: +LAML\_WEBHOOKS+ (wire value +laml\_webhooks+) produces a _cXML_ +handler despite the plural name, not a generic webhook. For SWML, use ++RELAY\_SCRIPT+. + +## Signature + +```ruby +module PhoneCallHandler +``` + +## Constants + + + + + All supported wire values, in the same order as the constants. + + + + + + + + + + + + + + + + + + + + + + +## Source + +[`lib/signalwire/rest/phone_call_handler.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/phone_call_handler.rb) + +Line 35. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/rest-client/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/rest-client/index.mdx new file mode 100644 index 0000000000..a103d27d8d --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/rest-client/index.mdx @@ -0,0 +1,507 @@ +--- +slug: "/reference/ruby/signal-wire/rest/rest-client" +title: "RestClient" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::RestClient" + parent: "SignalWire::REST" + module: "SignalWire.REST" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb" + visibility: "public" +--- +# `RestClient` + +REST client for the SignalWire platform APIs. + +Usage: +client = SignalWire::REST::RestClient.new( +project: 'your-project-id', +token: 'your-api-token', +host: 'your-space.signalwire.com' +) + +# Or use environment variables: + +# SIGNALWIRE\_PROJECT\_ID, SIGNALWIRE\_API\_TOKEN, SIGNALWIRE\_SPACE + +client = SignalWire::REST::RestClient.new + +# Use namespaced resources + +client.fabric.ai\_agents.list +client.calling.play(call\_id, play: \[...]) +client.phone\_numbers.search(area\_code: '512') +client.video.rooms.create(name: 'standup') +client.compat.calls.list + +## Signature + +```ruby +class RestClient < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### addresses + +Returns the value of attribute addresses. + +#### Signature + +```ruby +attr_reader addresses -> Object +``` + +#### Source + +[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) + +Line 50. + +*** + +### calling + +Returns the value of attribute calling. + +#### Signature + +```ruby +attr_reader calling -> Object +``` + +#### Source + +[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) + +Line 50. + +*** + +### chat + +Returns the value of attribute chat. + +#### Signature + +```ruby +attr_reader chat -> Object +``` + +#### Source + +[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) + +Line 50. + +*** + +### compat + +Returns the value of attribute compat. + +#### Signature + +```ruby +attr_reader compat -> Object +``` + +#### Source + +[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) + +Line 50. + +*** + +### datasphere + +Returns the value of attribute datasphere. + +#### Signature + +```ruby +attr_reader datasphere -> Object +``` + +#### Source + +[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) + +Line 50. + +*** + +### fabric + +Returns the value of attribute fabric. + +#### Signature + +```ruby +attr_reader fabric -> Object +``` + +#### Source + +[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) + +Line 50. + +*** + +### http + +Returns the value of attribute http. + +#### Signature + +```ruby +attr_reader http -> Object +``` + +#### Source + +[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) + +Line 50. + +*** + +### imported\_numbers + +Returns the value of attribute imported\_numbers. + +#### Signature + +```ruby +attr_reader imported_numbers -> Object +``` + +#### Source + +[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) + +Line 50. + +*** + +### initialize + ++base\_url+ overrides the derived +https://\{space\}+ default. The +audit harness uses this to point at the local fixture server. ++ca\_file+ (optional) names a PEM CA bundle to trust for HTTPS in +addition to the system store — for private-CA deployments; forwarded +to the underlying HttpClient. + +#### Signature + +```ruby +def initialize(project: nil, token: nil, host: nil, base_url: nil, ca_file: nil) +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`RestClient` — a new instance of RestClient + +#### Source + +[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) + +Line 61. + +*** + +### logs + +Returns the value of attribute logs. + +#### Signature + +```ruby +attr_reader logs -> Object +``` + +#### Source + +[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) + +Line 50. + +*** + +### lookup + +Returns the value of attribute lookup. + +#### Signature + +```ruby +attr_reader lookup -> Object +``` + +#### Source + +[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) + +Line 50. + +*** + +### mfa + +Returns the value of attribute mfa. + +#### Signature + +```ruby +attr_reader mfa -> Object +``` + +#### Source + +[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) + +Line 50. + +*** + +### number\_groups + +Returns the value of attribute number\_groups. + +#### Signature + +```ruby +attr_reader number_groups -> Object +``` + +#### Source + +[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) + +Line 50. + +*** + +### phone\_numbers + +Returns the value of attribute phone\_numbers. + +#### Signature + +```ruby +attr_reader phone_numbers -> Object +``` + +#### Source + +[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) + +Line 50. + +*** + +### project + +Returns the value of attribute project. + +#### Signature + +```ruby +attr_reader project -> Object +``` + +#### Source + +[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) + +Line 50. + +*** + +### project\_id + +Returns the value of attribute project\_id. + +#### Signature + +```ruby +attr_reader project_id -> Object +``` + +#### Source + +[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) + +Line 50. + +*** + +### pubsub + +Returns the value of attribute pubsub. + +#### Signature + +```ruby +attr_reader pubsub -> Object +``` + +#### Source + +[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) + +Line 50. + +*** + +### queues + +Returns the value of attribute queues. + +#### Signature + +```ruby +attr_reader queues -> Object +``` + +#### Source + +[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) + +Line 50. + +*** + +### recordings + +Returns the value of attribute recordings. + +#### Signature + +```ruby +attr_reader recordings -> Object +``` + +#### Source + +[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) + +Line 50. + +*** + +### registry + +Returns the value of attribute registry. + +#### Signature + +```ruby +attr_reader registry -> Object +``` + +#### Source + +[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) + +Line 50. + +*** + +### short\_codes + +Returns the value of attribute short\_codes. + +#### Signature + +```ruby +attr_reader short_codes -> Object +``` + +#### Source + +[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) + +Line 50. + +*** + +### sip\_profile + +Returns the value of attribute sip\_profile. + +#### Signature + +```ruby +attr_reader sip_profile -> Object +``` + +#### Source + +[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) + +Line 50. + +*** + +### verified\_callers + +Returns the value of attribute verified\_callers. + +#### Signature + +```ruby +attr_reader verified_callers -> Object +``` + +#### Source + +[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) + +Line 50. + +*** + +### video + +Returns the value of attribute video. + +#### Signature + +```ruby +attr_reader video -> Object +``` + +#### Source + +[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) + +Line 50. + +## Source + +[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) + +Line 49. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/signal-wire-rest-error/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/signal-wire-rest-error/index.mdx new file mode 100644 index 0000000000..9052689221 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/signal-wire-rest-error/index.mdx @@ -0,0 +1,136 @@ +--- +slug: "/reference/ruby/signal-wire/rest/signal-wire-rest-error" +title: "SignalWireRestError" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::SignalWireRestError" + parent: "SignalWire::REST" + module: "SignalWire.REST" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb" + visibility: "public" +--- +# `SignalWireRestError` + +Raised when the SignalWire REST API returns a non-2xx response. + +## Signature + +```ruby +class SignalWireRestError < StandardError +``` + +## Inheritance + +**Extends:** `StandardError` + +## Methods + +### body + +Returns the value of attribute body. + +#### Signature + +```ruby +attr_reader body -> Object +``` + +#### Source + +[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) + +Line 13. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(status_code, body, url, method_name = 'GET') +``` + +#### Parameters + + + + + + + + + +#### Returns + +`SignalWireRestError` — a new instance of SignalWireRestError + +#### Source + +[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) + +Line 15. + +*** + +### method\_name + +Returns the value of attribute method\_name. + +#### Signature + +```ruby +attr_reader method_name -> Object +``` + +#### Source + +[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) + +Line 13. + +*** + +### status\_code + +Returns the value of attribute status\_code. + +#### Signature + +```ruby +attr_reader status_code -> Object +``` + +#### Source + +[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) + +Line 13. + +*** + +### url + +Returns the value of attribute url. + +#### Signature + +```ruby +attr_reader url -> Object +``` + +#### Source + +[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) + +Line 13. + +## Source + +[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) + +Line 12. diff --git a/fern/products/sdk-reference/ruby/signal-wire/runtime/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/runtime/index.mdx new file mode 100644 index 0000000000..18daa71aa1 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/runtime/index.mdx @@ -0,0 +1,148 @@ +--- +slug: "/reference/ruby/signal-wire/runtime" +title: "Runtime" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "module" + language: "ruby" + qualified_name: "SignalWire::Runtime" + parent: "SignalWire" + module: "SignalWire" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/runtime.rb" + visibility: "public" +--- +# `Runtime` + +Runtime environment detection. + +Detects the execution environment (plain server, AWS Lambda, CGI, +Google Cloud Functions, Azure Functions) by inspecting well-known +environment variables set by each platform. + +This is the Ruby counterpart to the Python SDK's ++signalwire.core.logging\_config.get\_execution\_mode+. + +## Signature + +```ruby +module Runtime +``` + +## Constants + + + +## Methods + +### execution\_mode + +Determine the current execution mode. + +Returns one of: + +- +:cgi+ - running under a CGI gateway (GATEWAY\_INTERFACE is set) +- +:lambda+ - running under AWS Lambda +- +:google\_cloud\_function+ - Google Cloud Functions / Cloud Run +- +:azure\_function+ - Azure Functions +- +:server+ - long-running HTTP server (the default) + +Detection order matters: CGI is checked before Lambda because a +Lambda function invoked through an emulator that also sets +GATEWAY\_INTERFACE should still be treated as CGI. + +#### Signature + +```ruby +def execution_mode +``` + +#### Returns + +`Symbol` — one of the values in \{MODES\} + +#### Source + +[`lib/signalwire/runtime.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/runtime.rb) + +Line 34. + +*** + +### lambda\_base\_url + +Construct the base URL for the current Lambda function. + +Prefers +AWS\_LAMBDA\_FUNCTION\_URL+ when set; otherwise falls back to +the standard Function URL shape built from +AWS\_LAMBDA\_FUNCTION\_NAME+ +and +AWS\_REGION+. Returns +nil+ when neither signal is present. + +The returned URL never has a trailing slash and never contains a +path component, so callers must append the agent's route themselves. + +#### Signature + +```ruby +def lambda_base_url +``` + +#### Returns + +`String | nil` + +#### Source + +[`lib/signalwire/runtime.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/runtime.rb) + +Line 85. + +*** + +### lambda? + +True when the SDK is running inside AWS Lambda. + +#### Signature + +```ruby +def lambda? +``` + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/runtime.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/runtime.rb) + +Line 63. + +*** + +### serverless? + +True when the SDK is running inside any serverless platform. + +#### Signature + +```ruby +def serverless? +``` + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/runtime.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/runtime.rb) + +Line 69. + +## Source + +[`lib/signalwire/runtime.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/runtime.rb) + +Line 17. diff --git a/fern/products/sdk-reference/ruby/signal-wire/security/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/security/index.mdx new file mode 100644 index 0000000000..8b7230f741 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/security/index.mdx @@ -0,0 +1,48 @@ +--- +slug: "/reference/ruby/signal-wire/security" +title: "Security" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "module" + language: "ruby" + qualified_name: "SignalWire::Security" + parent: "SignalWire" + module: "SignalWire" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/security/session_manager.rb" + visibility: "public" +--- +# `Security` + +## Signature + +```ruby +module Security +``` + +## Classes + + + + Stateless HMAC-SHA256 session manager for secure SWAIG tool tokens. + + + + Rack middleware that rejects webhook requests with bad signatures. + + + +## Modules + + + + Stateless validator for SignalWire-signed webhook requests. + + + +## Source + +[`lib/signalwire/security/session_manager.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/security/session_manager.rb) + +Line 14. diff --git a/fern/products/sdk-reference/ruby/signal-wire/security/session-manager/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/security/session-manager/index.mdx new file mode 100644 index 0000000000..b6992260c8 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/security/session-manager/index.mdx @@ -0,0 +1,350 @@ +--- +slug: "/reference/ruby/signal-wire/security/session-manager" +title: "SessionManager" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Security::SessionManager" + parent: "SignalWire::Security" + module: "SignalWire.Security" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/security/session_manager.rb" + visibility: "public" +--- +# `SessionManager` + +Stateless HMAC-SHA256 session manager for secure SWAIG tool tokens. + +Tokens are self-contained: all information needed for validation is +encoded inside the token itself. No server-side session state is stored. + +mgr = SessionManager.new(token\_expiry\_secs: 900) +token = mgr.create\_token("lookup\_order", "call-abc-123") +mgr.validate\_token("lookup\_order", token, "call-abc-123") # => true + +## Signature + +```ruby +class SessionManager < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### activate\_session + +Legacy lifecycle hook retained for API compatibility with the Python +reference. The session manager is stateless with respect to +activation, so this accepts the call ID and reports success. + +#### Signature + +```ruby +def activate_session(_call_id) +``` + +#### Parameters + + + +#### Returns + +`Boolean` — always +true+ + +#### Source + +[`lib/signalwire/security/session_manager.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/security/session_manager.rb) + +Line 126. + +*** + +### create\_session + +Return the given +call\_id+, or generate a new URL-safe session +identifier when none is supplied. + +Matches the Python reference's stateless +create\_session+: the SDK +does not persist sessions, it just mints an identifier callers can +thread through subsequent token operations. + +#### Signature + +```ruby +def create_session(call_id = nil) +``` + +#### Parameters + + + existing call ID to reuse + + +#### Returns + +`String` — the resolved call ID + +#### Source + +[`lib/signalwire/security/session_manager.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/security/session_manager.rb) + +Line 113. + +*** + +### create\_token + +Create a secure, self-contained token for a function call. + +Token format (before Base64): +call\_id.function\_name.expiry\_timestamp.nonce.hmac\_hex + +#### Signature + +```ruby +def create_token(function_name, call_id) +``` + +#### Parameters + + + + + +#### Returns + +`String` — URL-safe Base64-encoded token + +#### Source + +[`lib/signalwire/security/session_manager.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/security/session_manager.rb) + +Line 50. + +*** + +### debug\_mode= + +When set true, \{#debug\_token\} decodes token internals instead of +returning +\{ "error" => "debug mode not enabled" \}+. Mirrors the +Python reference's +\_debug\_mode+ attribute (off by default). Exposed +as a writer only — there is no corresponding reader on the Python +surface, so none is projected here. + +#### Signature + +```ruby +attr_writer debug_mode==(value: Object) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/security/session_manager.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/security/session_manager.rb) + +Line 30. + +*** + +### debug\_token + +Decode a token's components for inspection WITHOUT validating it. + +Requires \{#debug\_mode=\} to have been set +true+; otherwise returns ++\{ "error" => "debug mode not enabled" \}+, matching the Python +reference. The returned structure mirrors Python's nested ++components+/+status+ shape (call\_id and signature truncated to +8 chars + "..." when longer). + +#### Signature + +```ruby +def debug_token(token) +``` + +#### Parameters + + + +#### Returns + +`Hash` — decoded components/status, or an error/malformed hash + +#### Source + +[`lib/signalwire/security/session_manager.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/security/session_manager.rb) + +Line 181. + +*** + +### end\_session + +Legacy lifecycle hook retained for API compatibility with the Python +reference. Clears any metadata accumulated for the session and +reports success. + +#### Signature + +```ruby +def end_session(call_id) +``` + +#### Parameters + + + +#### Returns + +`Boolean` — always +true+ + +#### Source + +[`lib/signalwire/security/session_manager.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/security/session_manager.rb) + +Line 136. + +*** + +### get\_session\_metadata + +Fetch the metadata hash stored for +call\_id+. + +The Python reference is stateless and always returns +\{\}+; this port +keeps a real per-session store (matching the TypeScript port) so the +getter/setter pair round-trips, but still returns an empty hash for +unknown sessions — callers never get +nil+. + +#### Signature + +```ruby +def get_session_metadata(call_id) +``` + +#### Parameters + + + +#### Returns + +`Hash` — the session's metadata, or +\{\}+ if none is stored + +#### Source + +[`lib/signalwire/security/session_manager.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/security/session_manager.rb) + +Line 150. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(token_expiry_secs: 3600, secret_key: nil) +``` + +#### Parameters + + + + + +#### Returns + +`SessionManager` — a new instance of SessionManager + +#### Source + +[`lib/signalwire/security/session_manager.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/security/session_manager.rb) + +Line 34. + +*** + +### set\_session\_metadata + +Store a single +key+/+value+ pair in +call\_id+'s metadata, merging +with anything already recorded for that session. + +Signature mirrors the Python reference's ++set\_session\_metadata(call\_id, key, value)+. + +#### Signature + +```ruby +def set_session_metadata(call_id, key, value) +``` + +#### Parameters + + + + + + + +#### Returns + +`Boolean` — always +true+ + +#### Source + +[`lib/signalwire/security/session_manager.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/security/session_manager.rb) + +Line 165. + +*** + +### validate\_token + +Validate a function-call token. + +Checks: + +1. Correct Base64 / structure (5 dot-separated parts) +2. HMAC signature (timing-safe comparison) +3. Function name matches +4. Call ID matches +5. Token not expired + +#### Signature + +```ruby +def validate_token(function_name, token, call_id) +``` + +#### Parameters + + + + + the token to validate + + + + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/security/session_manager.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/security/session_manager.rb) + +Line 74. + +## Source + +[`lib/signalwire/security/session_manager.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/security/session_manager.rb) + +Line 24. diff --git a/fern/products/sdk-reference/ruby/signal-wire/security/webhook-middleware/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/security/webhook-middleware/index.mdx new file mode 100644 index 0000000000..2b14c13f88 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/security/webhook-middleware/index.mdx @@ -0,0 +1,86 @@ +--- +slug: "/reference/ruby/signal-wire/security/webhook-middleware" +title: "WebhookMiddleware" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Security::WebhookMiddleware" + parent: "SignalWire::Security" + module: "SignalWire.Security" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/security/webhook_middleware.rb" + visibility: "public" +--- +# `WebhookMiddleware` + +Rack middleware that rejects webhook requests with bad signatures. + +Configure with the customer's Signing Key (and optional `trust_proxy` +to honor X-Forwarded headers). Mount upstream of any body-parsing +middleware so the raw bytes survive intact. + +## Signature + +```ruby +class WebhookMiddleware < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Constants + + + Key under which the captured raw body is stashed on the request env. + + + + + + +## Methods + +### initialize + +#### Signature + +```ruby +def initialize(app, signing_key:, trust_proxy: false, paths: nil, methods: ['POST']) +``` + +#### Parameters + + + the wrapped Rack app. + + + + + + + + + + +#### Returns + +`WebhookMiddleware` — a new instance of WebhookMiddleware + +#### Throws + +- `ArgumentError` — when `signing_key` is missing. + +#### Source + +[`lib/signalwire/security/webhook_middleware.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/security/webhook_middleware.rb) + +Line 66. + +## Source + +[`lib/signalwire/security/webhook_middleware.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/security/webhook_middleware.rb) + +Line 47. diff --git a/fern/products/sdk-reference/ruby/signal-wire/security/webhook-validator/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/security/webhook-validator/index.mdx new file mode 100644 index 0000000000..22c7b1c04f --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/security/webhook-validator/index.mdx @@ -0,0 +1,129 @@ +--- +slug: "/reference/ruby/signal-wire/security/webhook-validator" +title: "WebhookValidator" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "module" + language: "ruby" + qualified_name: "SignalWire::Security::WebhookValidator" + parent: "SignalWire::Security" + module: "SignalWire.Security" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/security/webhook_validator.rb" + visibility: "public" +--- +# `WebhookValidator` + +Stateless validator for SignalWire-signed webhook requests. + +Both Scheme A (JSON, hex digest) and Scheme B (form-encoded, base64 +digest with bodySHA256 fallback) per porting-sdk/webhooks.md are +tried by the combined entry point. + +The two public entry points are exposed via `module_function` so +they can be invoked as `WebhookValidator.validate_webhook_signature(...)`. +All internal helpers are deliberately `_`-prefixed and private so +they don't pollute the public surface (`audit_no_cheat_tests` and +`signature_dump.rb` skip `_`-prefixed methods). + +## Signature + +```ruby +module WebhookValidator +``` + +## Methods + +### validate\_request + +Legacy `@signalwire/compatibility-api` drop-in entry point. + +If `params_or_raw_body` is a `String`, delegates to +\{validate\_webhook\_signature\} (Scheme A then Scheme B with parsed form). + +If it's a `Hash` or an array of (key, value) pairs, treats it as +pre-parsed form params and runs Scheme B directly (with URL port +normalization and optional bodySHA256 fallback). + +#### Signature + +```ruby +def validate_request(signing_key, signature, url, params_or_raw_body) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`Boolean` + +#### Throws + +- `ArgumentError` — when `signing_key` is missing. +- `TypeError` — when `params_or_raw_body` is neither a String, Hash, nor an array of pairs. + +#### Source + +[`lib/signalwire/security/webhook_validator.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/security/webhook_validator.rb) + +Line 121. + +*** + +### validate\_webhook\_signature + +Validate a SignalWire webhook signature against both schemes. + +#### Signature + +```ruby +def validate_webhook_signature(signing_key, signature, url, raw_body) +``` + +#### Parameters + + + Customer's Signing Key from the Dashboard. UTF-8 string, secret. `nil` / empty raises `ArgumentError` — that's a programming error, not a validation failure. + + + + The `X-SignalWire-Signature` header value (or `X-Twilio-Signature` for cXML compat). Missing / empty returns false without raising. + + + + The full URL SignalWire POSTed to (scheme, host, optional port, path, query). Must match what the platform saw — see the URL reconstruction section of porting-sdk/webhooks.md. + + + + The raw request body bytes as a UTF-8 string, BEFORE any JSON / form parsing. Must be a `String` — passing a parsed Hash raises `TypeError`. + + +#### Returns + +`Boolean` — true if the signature matches either Scheme A or Scheme B (with port-normalization variants and optional bodySHA256 fallback). false otherwise. + +#### Throws + +- `ArgumentError` — when `signing_key` is missing. +- `TypeError` — when `raw_body` is not a String. + +#### Source + +[`lib/signalwire/security/webhook_validator.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/security/webhook_validator.rb) + +Line 67. + +## Source + +[`lib/signalwire/security/webhook_validator.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/security/webhook_validator.rb) + +Line 45. diff --git a/fern/products/sdk-reference/ruby/signal-wire/serverless/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/serverless/index.mdx new file mode 100644 index 0000000000..a1f646c766 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/serverless/index.mdx @@ -0,0 +1,36 @@ +--- +slug: "/reference/ruby/signal-wire/serverless" +title: "Serverless" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "module" + language: "ruby" + qualified_name: "SignalWire::Serverless" + parent: "SignalWire" + module: "SignalWire" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/serverless/lambda_handler.rb" + visibility: "public" +--- +# `Serverless` + +## Signature + +```ruby +module Serverless +``` + +## Classes + + + + Adapter that lets an AWS Lambda function invoke a Rack application. + + + +## Source + +[`lib/signalwire/serverless/lambda_handler.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/serverless/lambda_handler.rb) + +Line 14. diff --git a/fern/products/sdk-reference/ruby/signal-wire/serverless/lambda-handler/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/serverless/lambda-handler/index.mdx new file mode 100644 index 0000000000..38339a7b54 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/serverless/lambda-handler/index.mdx @@ -0,0 +1,151 @@ +--- +slug: "/reference/ruby/signal-wire/serverless/lambda-handler" +title: "LambdaHandler" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Serverless::LambdaHandler" + parent: "SignalWire::Serverless" + module: "SignalWire.Serverless" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/serverless/lambda_handler.rb" + visibility: "public" +--- +# `LambdaHandler` + +Adapter that lets an AWS Lambda function invoke a Rack application. + +Typical usage from a Lambda entrypoint file: + +require 'signalwire' + +AGENT = SignalWire::AgentBase.new(name: 'my-agent', route: '/') + +# ...configure AGENT... + +HANDLER = SignalWire::Serverless::LambdaHandler.new(AGENT.rack\_app) + +def handler(event:, context:) +HANDLER.call(event, context) +end + +The adapter accepts events from either Lambda Function URLs / API +Gateway HTTP API (payload format v2) or the classic API Gateway REST +API (payload format v1) and returns a response in the matching +shape. Any triple returned by the Rack app (status, headers, body) +is translated into the +\{statusCode:, headers:, body:\}+ shape +expected by Lambda. + +The adapter never reaches out to the network and has no gem +dependencies beyond what the SignalWire SDK already requires, so it +can be bundled directly into a Lambda zip. + +## Signature + +```ruby +class LambdaHandler < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### call + +Invoke the wrapped Rack application with a Lambda event. + +#### Signature + +```ruby +def call(event, _context = nil) +``` + +#### Parameters + + + the Lambda invocation event + + + + the Lambda context (ignored) + + +#### Returns + +`Hash` — a Lambda-shaped response hash + +#### Source + +[`lib/signalwire/serverless/lambda_handler.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/serverless/lambda_handler.rb) + +Line 53. + +*** + +### for + +Class-level convenience so consumers can use ++SignalWire::Serverless::LambdaHandler.for(agent)+ without +duplicating +.rack\_app+ at the call site. + +#### Signature + +```ruby +def for(agent_or_app) +``` + +#### Parameters + + + either an AgentBase (responds to +rack\_app+) or any Rack-compatible application + + +#### Returns + +`LambdaHandler` + +#### Source + +[`lib/signalwire/serverless/lambda_handler.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/serverless/lambda_handler.rb) + +Line 71. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(app) +``` + +#### Parameters + + + a Rack-compatible application + + +#### Returns + +`LambdaHandler` — a new instance of LambdaHandler + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/serverless/lambda_handler.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/serverless/lambda_handler.rb) + +Line 42. + +## Source + +[`lib/signalwire/serverless/lambda_handler.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/serverless/lambda_handler.rb) + +Line 40. diff --git a/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/api-ninjas-trivia-skill/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/api-ninjas-trivia-skill/index.mdx new file mode 100644 index 0000000000..2f94fff9c9 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/api-ninjas-trivia-skill/index.mdx @@ -0,0 +1,158 @@ +--- +slug: "/reference/ruby/signal-wire/skills/builtin/api-ninjas-trivia-skill" +title: "ApiNinjasTriviaSkill" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Skills::Builtin::ApiNinjasTriviaSkill" + parent: "SignalWire::Skills::Builtin" + module: "SignalWire.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/api_ninjas_trivia.rb" + visibility: "public" +--- +# `ApiNinjasTriviaSkill` + +## Signature + +```ruby +class ApiNinjasTriviaSkill < SignalWire::Skills::SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/ruby/signal-wire/skills/skill-base) + +## Constants + + + +## Methods + +### description + +#### Signature + +```ruby +def description +``` + +#### Source + +[`lib/signalwire/skills/builtin/api_ninjas_trivia.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/api_ninjas_trivia.rb) + +Line 28. + +*** + +### get\_parameter\_schema + +#### Signature + +```ruby +def get_parameter_schema +``` + +#### Source + +[`lib/signalwire/skills/builtin/api_ninjas_trivia.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/api_ninjas_trivia.rb) + +Line 86. + +*** + +### instance\_key + +#### Signature + +```ruby +def instance_key +``` + +#### Source + +[`lib/signalwire/skills/builtin/api_ninjas_trivia.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/api_ninjas_trivia.rb) + +Line 41. + +*** + +### name + +#### Signature + +```ruby +def name +``` + +#### Source + +[`lib/signalwire/skills/builtin/api_ninjas_trivia.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/api_ninjas_trivia.rb) + +Line 27. + +*** + +### register\_tools + +#### Signature + +```ruby +def register_tools +``` + +#### Source + +[`lib/signalwire/skills/builtin/api_ninjas_trivia.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/api_ninjas_trivia.rb) + +Line 43. + +*** + +### setup + +#### Signature + +```ruby +def setup +``` + +#### Source + +[`lib/signalwire/skills/builtin/api_ninjas_trivia.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/api_ninjas_trivia.rb) + +Line 31. + +*** + +### supports\_multiple\_instances? + +#### Signature + +```ruby +def supports_multiple_instances? +``` + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/skills/builtin/api_ninjas_trivia.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/api_ninjas_trivia.rb) + +Line 29. + +## Source + +[`lib/signalwire/skills/builtin/api_ninjas_trivia.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/api_ninjas_trivia.rb) + +Line 9. diff --git a/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/claude-skills-skill/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/claude-skills-skill/index.mdx new file mode 100644 index 0000000000..f0a8759536 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/claude-skills-skill/index.mdx @@ -0,0 +1,182 @@ +--- +slug: "/reference/ruby/signal-wire/skills/builtin/claude-skills-skill" +title: "ClaudeSkillsSkill" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Skills::Builtin::ClaudeSkillsSkill" + parent: "SignalWire::Skills::Builtin" + module: "SignalWire.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/claude_skills.rb" + visibility: "public" +--- +# `ClaudeSkillsSkill` + +Loads Claude SKILL.md files as agent tools. + +## Signature + +```ruby +class ClaudeSkillsSkill < SignalWire::Skills::SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/ruby/signal-wire/skills/skill-base) + +## Methods + +### description + +#### Signature + +```ruby +def description +``` + +#### Source + +[`lib/signalwire/skills/builtin/claude_skills.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/claude_skills.rb) + +Line 12. + +*** + +### get\_hints + +#### Signature + +```ruby +def get_hints +``` + +#### Source + +[`lib/signalwire/skills/builtin/claude_skills.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/claude_skills.rb) + +Line 46. + +*** + +### get\_parameter\_schema + +#### Signature + +```ruby +def get_parameter_schema +``` + +#### Source + +[`lib/signalwire/skills/builtin/claude_skills.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/claude_skills.rb) + +Line 56. + +*** + +### get\_prompt\_sections + +#### Signature + +```ruby +def get_prompt_sections +``` + +#### Source + +[`lib/signalwire/skills/builtin/claude_skills.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/claude_skills.rb) + +Line 50. + +*** + +### instance\_key + +#### Signature + +```ruby +def instance_key +``` + +#### Source + +[`lib/signalwire/skills/builtin/claude_skills.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/claude_skills.rb) + +Line 29. + +*** + +### name + +#### Signature + +```ruby +def name +``` + +#### Source + +[`lib/signalwire/skills/builtin/claude_skills.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/claude_skills.rb) + +Line 11. + +*** + +### register\_tools + +#### Signature + +```ruby +def register_tools +``` + +#### Source + +[`lib/signalwire/skills/builtin/claude_skills.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/claude_skills.rb) + +Line 31. + +*** + +### setup + +#### Signature + +```ruby +def setup +``` + +#### Source + +[`lib/signalwire/skills/builtin/claude_skills.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/claude_skills.rb) + +Line 15. + +*** + +### supports\_multiple\_instances? + +#### Signature + +```ruby +def supports_multiple_instances? +``` + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/skills/builtin/claude_skills.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/claude_skills.rb) + +Line 13. + +## Source + +[`lib/signalwire/skills/builtin/claude_skills.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/claude_skills.rb) + +Line 10. diff --git a/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/custom-skills-skill/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/custom-skills-skill/index.mdx new file mode 100644 index 0000000000..c83aad5504 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/custom-skills-skill/index.mdx @@ -0,0 +1,150 @@ +--- +slug: "/reference/ruby/signal-wire/skills/builtin/custom-skills-skill" +title: "CustomSkillsSkill" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Skills::Builtin::CustomSkillsSkill" + parent: "SignalWire::Skills::Builtin" + module: "SignalWire.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/custom_skills.rb" + visibility: "public" +--- +# `CustomSkillsSkill` + +User-defined custom tools. + +## Signature + +```ruby +class CustomSkillsSkill < SignalWire::Skills::SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/ruby/signal-wire/skills/skill-base) + +## Methods + +### description + +#### Signature + +```ruby +def description +``` + +#### Source + +[`lib/signalwire/skills/builtin/custom_skills.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/custom_skills.rb) + +Line 12. + +*** + +### get\_parameter\_schema + +#### Signature + +```ruby +def get_parameter_schema +``` + +#### Source + +[`lib/signalwire/skills/builtin/custom_skills.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/custom_skills.rb) + +Line 42. + +*** + +### instance\_key + +#### Signature + +```ruby +def instance_key +``` + +#### Source + +[`lib/signalwire/skills/builtin/custom_skills.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/custom_skills.rb) + +Line 21. + +*** + +### name + +#### Signature + +```ruby +def name +``` + +#### Source + +[`lib/signalwire/skills/builtin/custom_skills.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/custom_skills.rb) + +Line 11. + +*** + +### register\_tools + +#### Signature + +```ruby +def register_tools +``` + +#### Source + +[`lib/signalwire/skills/builtin/custom_skills.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/custom_skills.rb) + +Line 26. + +*** + +### setup + +#### Signature + +```ruby +def setup +``` + +#### Source + +[`lib/signalwire/skills/builtin/custom_skills.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/custom_skills.rb) + +Line 15. + +*** + +### supports\_multiple\_instances? + +#### Signature + +```ruby +def supports_multiple_instances? +``` + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/skills/builtin/custom_skills.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/custom_skills.rb) + +Line 13. + +## Source + +[`lib/signalwire/skills/builtin/custom_skills.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/custom_skills.rb) + +Line 10. diff --git a/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/datasphere-serverless-skill/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/datasphere-serverless-skill/index.mdx new file mode 100644 index 0000000000..ec0626dfc1 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/datasphere-serverless-skill/index.mdx @@ -0,0 +1,180 @@ +--- +slug: "/reference/ruby/signal-wire/skills/builtin/datasphere-serverless-skill" +title: "DatasphereServerlessSkill" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Skills::Builtin::DatasphereServerlessSkill" + parent: "SignalWire::Skills::Builtin" + module: "SignalWire.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datasphere_serverless.rb" + visibility: "public" +--- +# `DatasphereServerlessSkill` + +## Signature + +```ruby +class DatasphereServerlessSkill < SignalWire::Skills::SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/ruby/signal-wire/skills/skill-base) + +## Methods + +### description + +#### Signature + +```ruby +def description +``` + +#### Source + +[`lib/signalwire/skills/builtin/datasphere_serverless.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datasphere_serverless.rb) + +Line 14. + +*** + +### get\_global\_data + +#### Signature + +```ruby +def get_global_data +``` + +#### Source + +[`lib/signalwire/skills/builtin/datasphere_serverless.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datasphere_serverless.rb) + +Line 67. + +*** + +### get\_parameter\_schema + +#### Signature + +```ruby +def get_parameter_schema +``` + +#### Source + +[`lib/signalwire/skills/builtin/datasphere_serverless.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datasphere_serverless.rb) + +Line 90. + +*** + +### get\_prompt\_sections + +#### Signature + +```ruby +def get_prompt_sections +``` + +#### Source + +[`lib/signalwire/skills/builtin/datasphere_serverless.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datasphere_serverless.rb) + +Line 75. + +*** + +### instance\_key + +#### Signature + +```ruby +def instance_key +``` + +#### Source + +[`lib/signalwire/skills/builtin/datasphere_serverless.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datasphere_serverless.rb) + +Line 37. + +*** + +### name + +#### Signature + +```ruby +def name +``` + +#### Source + +[`lib/signalwire/skills/builtin/datasphere_serverless.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datasphere_serverless.rb) + +Line 13. + +*** + +### register\_tools + +#### Signature + +```ruby +def register_tools +``` + +#### Source + +[`lib/signalwire/skills/builtin/datasphere_serverless.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datasphere_serverless.rb) + +Line 39. + +*** + +### setup + +#### Signature + +```ruby +def setup +``` + +#### Source + +[`lib/signalwire/skills/builtin/datasphere_serverless.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datasphere_serverless.rb) + +Line 17. + +*** + +### supports\_multiple\_instances? + +#### Signature + +```ruby +def supports_multiple_instances? +``` + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/skills/builtin/datasphere_serverless.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datasphere_serverless.rb) + +Line 15. + +## Source + +[`lib/signalwire/skills/builtin/datasphere_serverless.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datasphere_serverless.rb) + +Line 12. diff --git a/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/datasphere-skill/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/datasphere-skill/index.mdx new file mode 100644 index 0000000000..298fc9fb7b --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/datasphere-skill/index.mdx @@ -0,0 +1,180 @@ +--- +slug: "/reference/ruby/signal-wire/skills/builtin/datasphere-skill" +title: "DatasphereSkill" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Skills::Builtin::DatasphereSkill" + parent: "SignalWire::Skills::Builtin" + module: "SignalWire.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datasphere.rb" + visibility: "public" +--- +# `DatasphereSkill` + +## Signature + +```ruby +class DatasphereSkill < SignalWire::Skills::SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/ruby/signal-wire/skills/skill-base) + +## Methods + +### description + +#### Signature + +```ruby +def description +``` + +#### Source + +[`lib/signalwire/skills/builtin/datasphere.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datasphere.rb) + +Line 16. + +*** + +### get\_global\_data + +#### Signature + +```ruby +def get_global_data +``` + +#### Source + +[`lib/signalwire/skills/builtin/datasphere.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datasphere.rb) + +Line 63. + +*** + +### get\_parameter\_schema + +#### Signature + +```ruby +def get_parameter_schema +``` + +#### Source + +[`lib/signalwire/skills/builtin/datasphere.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datasphere.rb) + +Line 86. + +*** + +### get\_prompt\_sections + +#### Signature + +```ruby +def get_prompt_sections +``` + +#### Source + +[`lib/signalwire/skills/builtin/datasphere.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datasphere.rb) + +Line 71. + +*** + +### instance\_key + +#### Signature + +```ruby +def instance_key +``` + +#### Source + +[`lib/signalwire/skills/builtin/datasphere.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datasphere.rb) + +Line 48. + +*** + +### name + +#### Signature + +```ruby +def name +``` + +#### Source + +[`lib/signalwire/skills/builtin/datasphere.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datasphere.rb) + +Line 15. + +*** + +### register\_tools + +#### Signature + +```ruby +def register_tools +``` + +#### Source + +[`lib/signalwire/skills/builtin/datasphere.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datasphere.rb) + +Line 50. + +*** + +### setup + +#### Signature + +```ruby +def setup +``` + +#### Source + +[`lib/signalwire/skills/builtin/datasphere.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datasphere.rb) + +Line 19. + +*** + +### supports\_multiple\_instances? + +#### Signature + +```ruby +def supports_multiple_instances? +``` + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/skills/builtin/datasphere.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datasphere.rb) + +Line 17. + +## Source + +[`lib/signalwire/skills/builtin/datasphere.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datasphere.rb) + +Line 14. diff --git a/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/date-time-skill/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/date-time-skill/index.mdx new file mode 100644 index 0000000000..a011614a06 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/date-time-skill/index.mdx @@ -0,0 +1,137 @@ +--- +slug: "/reference/ruby/signal-wire/skills/builtin/date-time-skill" +title: "DateTimeSkill" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Skills::Builtin::DateTimeSkill" + parent: "SignalWire::Skills::Builtin" + module: "SignalWire.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datetime.rb" + visibility: "public" +--- +# `DateTimeSkill` + +## Signature + +```ruby +class DateTimeSkill < SignalWire::Skills::SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/ruby/signal-wire/skills/skill-base) + +## Methods + +### description + +#### Signature + +```ruby +def description +``` + +#### Source + +[`lib/signalwire/skills/builtin/datetime.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datetime.rb) + +Line 11. + +*** + +### get\_parameter\_schema + +Python parity: `DateTimeSkill.get_parameter_schema` returns only the +base-class schema (the datetime skill adds no custom parameters). + +#### Signature + +```ruby +def get_parameter_schema +``` + +#### Source + +[`lib/signalwire/skills/builtin/datetime.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datetime.rb) + +Line 29. + +*** + +### get\_prompt\_sections + +#### Signature + +```ruby +def get_prompt_sections +``` + +#### Source + +[`lib/signalwire/skills/builtin/datetime.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datetime.rb) + +Line 54. + +*** + +### name + +#### Signature + +```ruby +def name +``` + +#### Source + +[`lib/signalwire/skills/builtin/datetime.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datetime.rb) + +Line 10. + +*** + +### register\_tools + +#### Signature + +```ruby +def register_tools +``` + +#### Source + +[`lib/signalwire/skills/builtin/datetime.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datetime.rb) + +Line 33. + +*** + +### setup + +Python parity: `DateTimeSkill.setup` -> `self.validate_packages()`. +Python validates that `pytz` is importable before the skill is +usable. Ruby resolves timezones through the stdlib `time`/`date` +libraries (no third-party dependency), so setup here verifies those +are loadable and returns whether the skill is ready. + +#### Signature + +```ruby +def setup +``` + +#### Source + +[`lib/signalwire/skills/builtin/datetime.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datetime.rb) + +Line 18. + +## Source + +[`lib/signalwire/skills/builtin/datetime.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datetime.rb) + +Line 9. diff --git a/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/google-maps-skill/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/google-maps-skill/index.mdx new file mode 100644 index 0000000000..99cc5977b6 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/google-maps-skill/index.mdx @@ -0,0 +1,144 @@ +--- +slug: "/reference/ruby/signal-wire/skills/builtin/google-maps-skill" +title: "GoogleMapsSkill" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Skills::Builtin::GoogleMapsSkill" + parent: "SignalWire::Skills::Builtin" + module: "SignalWire.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/google_maps.rb" + visibility: "public" +--- +# `GoogleMapsSkill` + +## Signature + +```ruby +class GoogleMapsSkill < SignalWire::Skills::SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/ruby/signal-wire/skills/skill-base) + +## Methods + +### description + +#### Signature + +```ruby +def description +``` + +#### Source + +[`lib/signalwire/skills/builtin/google_maps.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/google_maps.rb) + +Line 15. + +*** + +### get\_hints + +#### Signature + +```ruby +def get_hints +``` + +#### Source + +[`lib/signalwire/skills/builtin/google_maps.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/google_maps.rb) + +Line 51. + +*** + +### get\_parameter\_schema + +#### Signature + +```ruby +def get_parameter_schema +``` + +#### Source + +[`lib/signalwire/skills/builtin/google_maps.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/google_maps.rb) + +Line 70. + +*** + +### get\_prompt\_sections + +#### Signature + +```ruby +def get_prompt_sections +``` + +#### Source + +[`lib/signalwire/skills/builtin/google_maps.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/google_maps.rb) + +Line 55. + +*** + +### name + +#### Signature + +```ruby +def name +``` + +#### Source + +[`lib/signalwire/skills/builtin/google_maps.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/google_maps.rb) + +Line 14. + +*** + +### register\_tools + +#### Signature + +```ruby +def register_tools +``` + +#### Source + +[`lib/signalwire/skills/builtin/google_maps.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/google_maps.rb) + +Line 25. + +*** + +### setup + +#### Signature + +```ruby +def setup +``` + +#### Source + +[`lib/signalwire/skills/builtin/google_maps.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/google_maps.rb) + +Line 17. + +## Source + +[`lib/signalwire/skills/builtin/google_maps.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/google_maps.rb) + +Line 13. diff --git a/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/index.mdx new file mode 100644 index 0000000000..ec3e1f590c --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/index.mdx @@ -0,0 +1,76 @@ +--- +slug: "/reference/ruby/signal-wire/skills/builtin" +title: "Builtin" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "module" + language: "ruby" + qualified_name: "SignalWire::Skills::Builtin" + parent: "SignalWire::Skills" + module: "SignalWire.Skills" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/joke.rb" + visibility: "public" +--- +# `Builtin` + +## Signature + +```ruby +module Builtin +``` + +## Classes + + + + + + Loads Claude SKILL.md files as agent tools. + + + + User-defined custom tools. + + + + + + + + + + + + + + + + + + Bridge MCP servers with SWAIG functions. + + + + Network/remote mode only (as per porting manifest). + + + + + + + + + + + + + + + +## Source + +[`lib/signalwire/skills/builtin/joke.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/joke.rb) + +Line 9. diff --git a/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/info-gatherer-skill/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/info-gatherer-skill/index.mdx new file mode 100644 index 0000000000..49a0a2224e --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/info-gatherer-skill/index.mdx @@ -0,0 +1,180 @@ +--- +slug: "/reference/ruby/signal-wire/skills/builtin/info-gatherer-skill" +title: "InfoGathererSkill" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Skills::Builtin::InfoGathererSkill" + parent: "SignalWire::Skills::Builtin" + module: "SignalWire.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/info_gatherer.rb" + visibility: "public" +--- +# `InfoGathererSkill` + +## Signature + +```ruby +class InfoGathererSkill < SignalWire::Skills::SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/ruby/signal-wire/skills/skill-base) + +## Methods + +### description + +#### Signature + +```ruby +def description +``` + +#### Source + +[`lib/signalwire/skills/builtin/info_gatherer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/info_gatherer.rb) + +Line 11. + +*** + +### get\_global\_data + +#### Signature + +```ruby +def get_global_data +``` + +#### Source + +[`lib/signalwire/skills/builtin/info_gatherer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/info_gatherer.rb) + +Line 63. + +*** + +### get\_parameter\_schema + +#### Signature + +```ruby +def get_parameter_schema +``` + +#### Source + +[`lib/signalwire/skills/builtin/info_gatherer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/info_gatherer.rb) + +Line 84. + +*** + +### get\_prompt\_sections + +#### Signature + +```ruby +def get_prompt_sections +``` + +#### Source + +[`lib/signalwire/skills/builtin/info_gatherer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/info_gatherer.rb) + +Line 73. + +*** + +### instance\_key + +#### Signature + +```ruby +def instance_key +``` + +#### Source + +[`lib/signalwire/skills/builtin/info_gatherer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/info_gatherer.rb) + +Line 38. + +*** + +### name + +#### Signature + +```ruby +def name +``` + +#### Source + +[`lib/signalwire/skills/builtin/info_gatherer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/info_gatherer.rb) + +Line 10. + +*** + +### register\_tools + +#### Signature + +```ruby +def register_tools +``` + +#### Source + +[`lib/signalwire/skills/builtin/info_gatherer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/info_gatherer.rb) + +Line 43. + +*** + +### setup + +#### Signature + +```ruby +def setup +``` + +#### Source + +[`lib/signalwire/skills/builtin/info_gatherer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/info_gatherer.rb) + +Line 14. + +*** + +### supports\_multiple\_instances? + +#### Signature + +```ruby +def supports_multiple_instances? +``` + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/skills/builtin/info_gatherer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/info_gatherer.rb) + +Line 12. + +## Source + +[`lib/signalwire/skills/builtin/info_gatherer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/info_gatherer.rb) + +Line 9. diff --git a/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/joke-skill/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/joke-skill/index.mdx new file mode 100644 index 0000000000..6bdc45692c --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/joke-skill/index.mdx @@ -0,0 +1,144 @@ +--- +slug: "/reference/ruby/signal-wire/skills/builtin/joke-skill" +title: "JokeSkill" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Skills::Builtin::JokeSkill" + parent: "SignalWire::Skills::Builtin" + module: "SignalWire.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/joke.rb" + visibility: "public" +--- +# `JokeSkill` + +## Signature + +```ruby +class JokeSkill < SignalWire::Skills::SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/ruby/signal-wire/skills/skill-base) + +## Methods + +### description + +#### Signature + +```ruby +def description +``` + +#### Source + +[`lib/signalwire/skills/builtin/joke.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/joke.rb) + +Line 12. + +*** + +### get\_global\_data + +#### Signature + +```ruby +def get_global_data +``` + +#### Source + +[`lib/signalwire/skills/builtin/joke.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/joke.rb) + +Line 34. + +*** + +### get\_parameter\_schema + +#### Signature + +```ruby +def get_parameter_schema +``` + +#### Source + +[`lib/signalwire/skills/builtin/joke.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/joke.rb) + +Line 52. + +*** + +### get\_prompt\_sections + +#### Signature + +```ruby +def get_prompt_sections +``` + +#### Source + +[`lib/signalwire/skills/builtin/joke.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/joke.rb) + +Line 38. + +*** + +### name + +#### Signature + +```ruby +def name +``` + +#### Source + +[`lib/signalwire/skills/builtin/joke.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/joke.rb) + +Line 11. + +*** + +### register\_tools + +#### Signature + +```ruby +def register_tools +``` + +#### Source + +[`lib/signalwire/skills/builtin/joke.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/joke.rb) + +Line 21. + +*** + +### setup + +#### Signature + +```ruby +def setup +``` + +#### Source + +[`lib/signalwire/skills/builtin/joke.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/joke.rb) + +Line 14. + +## Source + +[`lib/signalwire/skills/builtin/joke.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/joke.rb) + +Line 10. diff --git a/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/math-skill/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/math-skill/index.mdx new file mode 100644 index 0000000000..f660ec8875 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/math-skill/index.mdx @@ -0,0 +1,135 @@ +--- +slug: "/reference/ruby/signal-wire/skills/builtin/math-skill" +title: "MathSkill" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Skills::Builtin::MathSkill" + parent: "SignalWire::Skills::Builtin" + module: "SignalWire.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/math.rb" + visibility: "public" +--- +# `MathSkill` + +## Signature + +```ruby +class MathSkill < SignalWire::Skills::SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/ruby/signal-wire/skills/skill-base) + +## Methods + +### description + +#### Signature + +```ruby +def description +``` + +#### Source + +[`lib/signalwire/skills/builtin/math.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/math.rb) + +Line 11. + +*** + +### get\_parameter\_schema + +Python parity: `MathSkill.get_parameter_schema` returns only the +base-class schema (the math skill adds no custom parameters). + +#### Signature + +```ruby +def get_parameter_schema +``` + +#### Source + +[`lib/signalwire/skills/builtin/math.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/math.rb) + +Line 22. + +*** + +### get\_prompt\_sections + +#### Signature + +```ruby +def get_prompt_sections +``` + +#### Source + +[`lib/signalwire/skills/builtin/math.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/math.rb) + +Line 39. + +*** + +### name + +#### Signature + +```ruby +def name +``` + +#### Source + +[`lib/signalwire/skills/builtin/math.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/math.rb) + +Line 10. + +*** + +### register\_tools + +#### Signature + +```ruby +def register_tools +``` + +#### Source + +[`lib/signalwire/skills/builtin/math.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/math.rb) + +Line 26. + +*** + +### setup + +Python parity: `MathSkill.setup` -> `return True`. The math skill +has no external packages or environment to validate; it is always +ready once constructed. + +#### Signature + +```ruby +def setup +``` + +#### Source + +[`lib/signalwire/skills/builtin/math.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/math.rb) + +Line 16. + +## Source + +[`lib/signalwire/skills/builtin/math.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/math.rb) + +Line 9. diff --git a/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/mcp-gateway-skill/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/mcp-gateway-skill/index.mdx new file mode 100644 index 0000000000..6b3f3b4e6e --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/mcp-gateway-skill/index.mdx @@ -0,0 +1,162 @@ +--- +slug: "/reference/ruby/signal-wire/skills/builtin/mcp-gateway-skill" +title: "McpGatewaySkill" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Skills::Builtin::McpGatewaySkill" + parent: "SignalWire::Skills::Builtin" + module: "SignalWire.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/mcp_gateway.rb" + visibility: "public" +--- +# `McpGatewaySkill` + +Bridge MCP servers with SWAIG functions. + +## Signature + +```ruby +class McpGatewaySkill < SignalWire::Skills::SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/ruby/signal-wire/skills/skill-base) + +## Methods + +### description + +#### Signature + +```ruby +def description +``` + +#### Source + +[`lib/signalwire/skills/builtin/mcp_gateway.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/mcp_gateway.rb) + +Line 16. + +*** + +### get\_global\_data + +#### Signature + +```ruby +def get_global_data +``` + +#### Source + +[`lib/signalwire/skills/builtin/mcp_gateway.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/mcp_gateway.rb) + +Line 53. + +*** + +### get\_hints + +#### Signature + +```ruby +def get_hints +``` + +#### Source + +[`lib/signalwire/skills/builtin/mcp_gateway.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/mcp_gateway.rb) + +Line 47. + +*** + +### get\_parameter\_schema + +#### Signature + +```ruby +def get_parameter_schema +``` + +#### Source + +[`lib/signalwire/skills/builtin/mcp_gateway.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/mcp_gateway.rb) + +Line 72. + +*** + +### get\_prompt\_sections + +#### Signature + +```ruby +def get_prompt_sections +``` + +#### Source + +[`lib/signalwire/skills/builtin/mcp_gateway.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/mcp_gateway.rb) + +Line 61. + +*** + +### name + +#### Signature + +```ruby +def name +``` + +#### Source + +[`lib/signalwire/skills/builtin/mcp_gateway.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/mcp_gateway.rb) + +Line 15. + +*** + +### register\_tools + +#### Signature + +```ruby +def register_tools +``` + +#### Source + +[`lib/signalwire/skills/builtin/mcp_gateway.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/mcp_gateway.rb) + +Line 34. + +*** + +### setup + +#### Signature + +```ruby +def setup +``` + +#### Source + +[`lib/signalwire/skills/builtin/mcp_gateway.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/mcp_gateway.rb) + +Line 18. + +## Source + +[`lib/signalwire/skills/builtin/mcp_gateway.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/mcp_gateway.rb) + +Line 14. diff --git a/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/native-vector-search-skill/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/native-vector-search-skill/index.mdx new file mode 100644 index 0000000000..47f40c10fc --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/native-vector-search-skill/index.mdx @@ -0,0 +1,166 @@ +--- +slug: "/reference/ruby/signal-wire/skills/builtin/native-vector-search-skill" +title: "NativeVectorSearchSkill" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Skills::Builtin::NativeVectorSearchSkill" + parent: "SignalWire::Skills::Builtin" + module: "SignalWire.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/native_vector_search.rb" + visibility: "public" +--- +# `NativeVectorSearchSkill` + +Network/remote mode only (as per porting manifest). + +## Signature + +```ruby +class NativeVectorSearchSkill < SignalWire::Skills::SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/ruby/signal-wire/skills/skill-base) + +## Methods + +### description + +#### Signature + +```ruby +def description +``` + +#### Source + +[`lib/signalwire/skills/builtin/native_vector_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/native_vector_search.rb) + +Line 16. + +*** + +### get\_hints + +#### Signature + +```ruby +def get_hints +``` + +#### Source + +[`lib/signalwire/skills/builtin/native_vector_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/native_vector_search.rb) + +Line 49. + +*** + +### get\_parameter\_schema + +#### Signature + +```ruby +def get_parameter_schema +``` + +#### Source + +[`lib/signalwire/skills/builtin/native_vector_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/native_vector_search.rb) + +Line 55. + +*** + +### instance\_key + +#### Signature + +```ruby +def instance_key +``` + +#### Source + +[`lib/signalwire/skills/builtin/native_vector_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/native_vector_search.rb) + +Line 33. + +*** + +### name + +#### Signature + +```ruby +def name +``` + +#### Source + +[`lib/signalwire/skills/builtin/native_vector_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/native_vector_search.rb) + +Line 15. + +*** + +### register\_tools + +#### Signature + +```ruby +def register_tools +``` + +#### Source + +[`lib/signalwire/skills/builtin/native_vector_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/native_vector_search.rb) + +Line 35. + +*** + +### setup + +#### Signature + +```ruby +def setup +``` + +#### Source + +[`lib/signalwire/skills/builtin/native_vector_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/native_vector_search.rb) + +Line 19. + +*** + +### supports\_multiple\_instances? + +#### Signature + +```ruby +def supports_multiple_instances? +``` + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/skills/builtin/native_vector_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/native_vector_search.rb) + +Line 17. + +## Source + +[`lib/signalwire/skills/builtin/native_vector_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/native_vector_search.rb) + +Line 14. diff --git a/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/play-background-file-skill/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/play-background-file-skill/index.mdx new file mode 100644 index 0000000000..8b46b17e70 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/play-background-file-skill/index.mdx @@ -0,0 +1,148 @@ +--- +slug: "/reference/ruby/signal-wire/skills/builtin/play-background-file-skill" +title: "PlayBackgroundFileSkill" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Skills::Builtin::PlayBackgroundFileSkill" + parent: "SignalWire::Skills::Builtin" + module: "SignalWire.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/play_background_file.rb" + visibility: "public" +--- +# `PlayBackgroundFileSkill` + +## Signature + +```ruby +class PlayBackgroundFileSkill < SignalWire::Skills::SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/ruby/signal-wire/skills/skill-base) + +## Methods + +### description + +#### Signature + +```ruby +def description +``` + +#### Source + +[`lib/signalwire/skills/builtin/play_background_file.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/play_background_file.rb) + +Line 11. + +*** + +### get\_parameter\_schema + +#### Signature + +```ruby +def get_parameter_schema +``` + +#### Source + +[`lib/signalwire/skills/builtin/play_background_file.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/play_background_file.rb) + +Line 73. + +*** + +### instance\_key + +#### Signature + +```ruby +def instance_key +``` + +#### Source + +[`lib/signalwire/skills/builtin/play_background_file.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/play_background_file.rb) + +Line 25. + +*** + +### name + +#### Signature + +```ruby +def name +``` + +#### Source + +[`lib/signalwire/skills/builtin/play_background_file.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/play_background_file.rb) + +Line 10. + +*** + +### register\_tools + +#### Signature + +```ruby +def register_tools +``` + +#### Source + +[`lib/signalwire/skills/builtin/play_background_file.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/play_background_file.rb) + +Line 27. + +*** + +### setup + +#### Signature + +```ruby +def setup +``` + +#### Source + +[`lib/signalwire/skills/builtin/play_background_file.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/play_background_file.rb) + +Line 14. + +*** + +### supports\_multiple\_instances? + +#### Signature + +```ruby +def supports_multiple_instances? +``` + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/skills/builtin/play_background_file.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/play_background_file.rb) + +Line 12. + +## Source + +[`lib/signalwire/skills/builtin/play_background_file.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/play_background_file.rb) + +Line 9. diff --git a/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/spider-skill/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/spider-skill/index.mdx new file mode 100644 index 0000000000..5ccd3c4532 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/spider-skill/index.mdx @@ -0,0 +1,186 @@ +--- +slug: "/reference/ruby/signal-wire/skills/builtin/spider-skill" +title: "SpiderSkill" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Skills::Builtin::SpiderSkill" + parent: "SignalWire::Skills::Builtin" + module: "SignalWire.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/spider.rb" + visibility: "public" +--- +# `SpiderSkill` + +## Signature + +```ruby +class SpiderSkill < SignalWire::Skills::SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/ruby/signal-wire/skills/skill-base) + +## Methods + +### cleanup + +Python parity: `SpiderSkill.cleanup` closes the HTTP session, clears +the response cache, and logs. Ruby opens a fresh Net::HTTP connection +per request (no persistent session to close), so teardown here drops +the response cache and logs that the skill was cleaned up. Safe to +call more than once. + +#### Signature + +```ruby +def cleanup +``` + +#### Source + +[`lib/signalwire/skills/builtin/spider.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/spider.rb) + +Line 35. + +*** + +### description + +#### Signature + +```ruby +def description +``` + +#### Source + +[`lib/signalwire/skills/builtin/spider.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/spider.rb) + +Line 14. + +*** + +### get\_hints + +#### Signature + +```ruby +def get_hints +``` + +#### Source + +[`lib/signalwire/skills/builtin/spider.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/spider.rb) + +Line 69. + +*** + +### get\_parameter\_schema + +#### Signature + +```ruby +def get_parameter_schema +``` + +#### Source + +[`lib/signalwire/skills/builtin/spider.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/spider.rb) + +Line 73. + +*** + +### instance\_key + +#### Signature + +```ruby +def instance_key +``` + +#### Source + +[`lib/signalwire/skills/builtin/spider.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/spider.rb) + +Line 42. + +*** + +### name + +#### Signature + +```ruby +def name +``` + +#### Source + +[`lib/signalwire/skills/builtin/spider.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/spider.rb) + +Line 13. + +*** + +### register\_tools + +#### Signature + +```ruby +def register_tools +``` + +#### Source + +[`lib/signalwire/skills/builtin/spider.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/spider.rb) + +Line 46. + +*** + +### setup + +#### Signature + +```ruby +def setup +``` + +#### Source + +[`lib/signalwire/skills/builtin/spider.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/spider.rb) + +Line 17. + +*** + +### supports\_multiple\_instances? + +#### Signature + +```ruby +def supports_multiple_instances? +``` + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/skills/builtin/spider.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/spider.rb) + +Line 15. + +## Source + +[`lib/signalwire/skills/builtin/spider.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/spider.rb) + +Line 12. diff --git a/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/swml-transfer-skill/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/swml-transfer-skill/index.mdx new file mode 100644 index 0000000000..734ff9ba25 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/swml-transfer-skill/index.mdx @@ -0,0 +1,180 @@ +--- +slug: "/reference/ruby/signal-wire/skills/builtin/swml-transfer-skill" +title: "SwmlTransferSkill" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Skills::Builtin::SwmlTransferSkill" + parent: "SignalWire::Skills::Builtin" + module: "SignalWire.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/swml_transfer.rb" + visibility: "public" +--- +# `SwmlTransferSkill` + +## Signature + +```ruby +class SwmlTransferSkill < SignalWire::Skills::SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/ruby/signal-wire/skills/skill-base) + +## Methods + +### description + +#### Signature + +```ruby +def description +``` + +#### Source + +[`lib/signalwire/skills/builtin/swml_transfer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/swml_transfer.rb) + +Line 12. + +*** + +### get\_hints + +#### Signature + +```ruby +def get_hints +``` + +#### Source + +[`lib/signalwire/skills/builtin/swml_transfer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/swml_transfer.rb) + +Line 69. + +*** + +### get\_parameter\_schema + +#### Signature + +```ruby +def get_parameter_schema +``` + +#### Source + +[`lib/signalwire/skills/builtin/swml_transfer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/swml_transfer.rb) + +Line 102. + +*** + +### get\_prompt\_sections + +#### Signature + +```ruby +def get_prompt_sections +``` + +#### Source + +[`lib/signalwire/skills/builtin/swml_transfer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/swml_transfer.rb) + +Line 83. + +*** + +### instance\_key + +#### Signature + +```ruby +def instance_key +``` + +#### Source + +[`lib/signalwire/skills/builtin/swml_transfer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/swml_transfer.rb) + +Line 38. + +*** + +### name + +#### Signature + +```ruby +def name +``` + +#### Source + +[`lib/signalwire/skills/builtin/swml_transfer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/swml_transfer.rb) + +Line 11. + +*** + +### register\_tools + +#### Signature + +```ruby +def register_tools +``` + +#### Source + +[`lib/signalwire/skills/builtin/swml_transfer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/swml_transfer.rb) + +Line 40. + +*** + +### setup + +#### Signature + +```ruby +def setup +``` + +#### Source + +[`lib/signalwire/skills/builtin/swml_transfer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/swml_transfer.rb) + +Line 15. + +*** + +### supports\_multiple\_instances? + +#### Signature + +```ruby +def supports_multiple_instances? +``` + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/skills/builtin/swml_transfer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/swml_transfer.rb) + +Line 13. + +## Source + +[`lib/signalwire/skills/builtin/swml_transfer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/swml_transfer.rb) + +Line 10. diff --git a/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/weather-api-skill/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/weather-api-skill/index.mdx new file mode 100644 index 0000000000..5a9cc44d2d --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/weather-api-skill/index.mdx @@ -0,0 +1,112 @@ +--- +slug: "/reference/ruby/signal-wire/skills/builtin/weather-api-skill" +title: "WeatherApiSkill" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Skills::Builtin::WeatherApiSkill" + parent: "SignalWire::Skills::Builtin" + module: "SignalWire.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/weather_api.rb" + visibility: "public" +--- +# `WeatherApiSkill` + +## Signature + +```ruby +class WeatherApiSkill < SignalWire::Skills::SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/ruby/signal-wire/skills/skill-base) + +## Methods + +### description + +#### Signature + +```ruby +def description +``` + +#### Source + +[`lib/signalwire/skills/builtin/weather_api.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/weather_api.rb) + +Line 12. + +*** + +### get\_parameter\_schema + +#### Signature + +```ruby +def get_parameter_schema +``` + +#### Source + +[`lib/signalwire/skills/builtin/weather_api.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/weather_api.rb) + +Line 78. + +*** + +### name + +#### Signature + +```ruby +def name +``` + +#### Source + +[`lib/signalwire/skills/builtin/weather_api.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/weather_api.rb) + +Line 11. + +*** + +### register\_tools + +#### Signature + +```ruby +def register_tools +``` + +#### Source + +[`lib/signalwire/skills/builtin/weather_api.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/weather_api.rb) + +Line 22. + +*** + +### setup + +#### Signature + +```ruby +def setup +``` + +#### Source + +[`lib/signalwire/skills/builtin/weather_api.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/weather_api.rb) + +Line 14. + +## Source + +[`lib/signalwire/skills/builtin/weather_api.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/weather_api.rb) + +Line 10. diff --git a/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/web-search-skill/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/web-search-skill/index.mdx new file mode 100644 index 0000000000..30c62e7dad --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/web-search-skill/index.mdx @@ -0,0 +1,196 @@ +--- +slug: "/reference/ruby/signal-wire/skills/builtin/web-search-skill" +title: "WebSearchSkill" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Skills::Builtin::WebSearchSkill" + parent: "SignalWire::Skills::Builtin" + module: "SignalWire.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/web_search.rb" + visibility: "public" +--- +# `WebSearchSkill` + +## Signature + +```ruby +class WebSearchSkill < SignalWire::Skills::SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/ruby/signal-wire/skills/skill-base) + +## Methods + +### description + +#### Signature + +```ruby +def description +``` + +#### Source + +[`lib/signalwire/skills/builtin/web_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/web_search.rb) + +Line 15. + +*** + +### get\_global\_data + +#### Signature + +```ruby +def get_global_data +``` + +#### Source + +[`lib/signalwire/skills/builtin/web_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/web_search.rb) + +Line 77. + +*** + +### get\_parameter\_schema + +#### Signature + +```ruby +def get_parameter_schema +``` + +#### Source + +[`lib/signalwire/skills/builtin/web_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/web_search.rb) + +Line 96. + +*** + +### get\_prompt\_sections + +#### Signature + +```ruby +def get_prompt_sections +``` + +#### Source + +[`lib/signalwire/skills/builtin/web_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/web_search.rb) + +Line 81. + +*** + +### instance\_key + +#### Signature + +```ruby +def instance_key +``` + +#### Source + +[`lib/signalwire/skills/builtin/web_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/web_search.rb) + +Line 62. + +*** + +### name + +#### Signature + +```ruby +def name +``` + +#### Source + +[`lib/signalwire/skills/builtin/web_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/web_search.rb) + +Line 14. + +*** + +### register\_tools + +#### Signature + +```ruby +def register_tools +``` + +#### Source + +[`lib/signalwire/skills/builtin/web_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/web_search.rb) + +Line 64. + +*** + +### setup + +#### Signature + +```ruby +def setup +``` + +#### Source + +[`lib/signalwire/skills/builtin/web_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/web_search.rb) + +Line 19. + +*** + +### supports\_multiple\_instances? + +#### Signature + +```ruby +def supports_multiple_instances? +``` + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/skills/builtin/web_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/web_search.rb) + +Line 17. + +*** + +### version + +#### Signature + +```ruby +def version +``` + +#### Source + +[`lib/signalwire/skills/builtin/web_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/web_search.rb) + +Line 16. + +## Source + +[`lib/signalwire/skills/builtin/web_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/web_search.rb) + +Line 13. diff --git a/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/wikipedia-search-skill/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/wikipedia-search-skill/index.mdx new file mode 100644 index 0000000000..55e56d44c8 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/wikipedia-search-skill/index.mdx @@ -0,0 +1,156 @@ +--- +slug: "/reference/ruby/signal-wire/skills/builtin/wikipedia-search-skill" +title: "WikipediaSearchSkill" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Skills::Builtin::WikipediaSearchSkill" + parent: "SignalWire::Skills::Builtin" + module: "SignalWire.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/wikipedia_search.rb" + visibility: "public" +--- +# `WikipediaSearchSkill` + +## Signature + +```ruby +class WikipediaSearchSkill < SignalWire::Skills::SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/ruby/signal-wire/skills/skill-base) + +## Methods + +### description + +#### Signature + +```ruby +def description +``` + +#### Source + +[`lib/signalwire/skills/builtin/wikipedia_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/wikipedia_search.rb) + +Line 15. + +*** + +### get\_parameter\_schema + +#### Signature + +```ruby +def get_parameter_schema +``` + +#### Source + +[`lib/signalwire/skills/builtin/wikipedia_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/wikipedia_search.rb) + +Line 51. + +*** + +### get\_prompt\_sections + +#### Signature + +```ruby +def get_prompt_sections +``` + +#### Source + +[`lib/signalwire/skills/builtin/wikipedia_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/wikipedia_search.rb) + +Line 37. + +*** + +### name + +#### Signature + +```ruby +def name +``` + +#### Source + +[`lib/signalwire/skills/builtin/wikipedia_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/wikipedia_search.rb) + +Line 14. + +*** + +### register\_tools + +#### Signature + +```ruby +def register_tools +``` + +#### Source + +[`lib/signalwire/skills/builtin/wikipedia_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/wikipedia_search.rb) + +Line 24. + +*** + +### search\_wiki + +Python parity: `WikipediaSearchSkill.search_wiki(query)` — the +extracted helper that performs the two-step Wikipedia API lookup +(search, then per-title extract) and returns the formatted article +text (or the no-results message). Public so callers/tests can invoke +the lookup directly, matching Python where the tool handler delegates +to this method. `@num_results`/`@no_results_msg` are populated by +\#setup; fall back to defaults if called before setup. + +#### Signature + +```ruby +def search_wiki(query) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/skills/builtin/wikipedia_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/wikipedia_search.rb) + +Line 65. + +*** + +### setup + +#### Signature + +```ruby +def setup +``` + +#### Source + +[`lib/signalwire/skills/builtin/wikipedia_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/wikipedia_search.rb) + +Line 17. + +## Source + +[`lib/signalwire/skills/builtin/wikipedia_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/wikipedia_search.rb) + +Line 13. diff --git a/fern/products/sdk-reference/ruby/signal-wire/skills/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/skills/index.mdx new file mode 100644 index 0000000000..c141109ae6 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/skills/index.mdx @@ -0,0 +1,54 @@ +--- +slug: "/reference/ruby/signal-wire/skills" +title: "Skills" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "module" + language: "ruby" + qualified_name: "SignalWire::Skills" + parent: "SignalWire" + module: "SignalWire" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb" + visibility: "public" +--- +# `Skills` + +## Signature + +```ruby +module Skills +``` + +## Classes + + + + Base class for all skills. Subclasses override the metadata methods and +register\_tools+ to supply tool hashes. + + + + Thread-safe lifecycle manager for loaded skill instances. + + + + Global registry mapping skill names to factory lambdas. + + + +## Modules + + + + + + Named constants for the skills that ship built in with this gem. + + + +## Source + +[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) + +Line 12. diff --git a/fern/products/sdk-reference/ruby/signal-wire/skills/skill-base/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/skills/skill-base/index.mdx new file mode 100644 index 0000000000..91377f5ad8 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/skills/skill-base/index.mdx @@ -0,0 +1,548 @@ +--- +slug: "/reference/ruby/signal-wire/skills/skill-base" +title: "SkillBase" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Skills::SkillBase" + parent: "SignalWire::Skills" + module: "SignalWire.Skills" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb" + visibility: "public" +--- +# `SkillBase` + +Base class for all skills. Subclasses override the metadata methods +and +register\_tools+ to supply tool hashes. + +## Signature + +```ruby +class SkillBase < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### agent + +Python parity: + +- `params` — params hash passed at construction +- `agent` — owning AgentBase instance (or nil for standalone) +- `logger` — namespaced logger `signalwire.skills.` +- `swaig_fields` — extra SWAIG fields merged into tool defs; + pulled out of `params` if provided + +#### Signature + +```ruby +attr_reader agent -> Object +``` + +#### Source + +[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) + +Line 22. + +*** + +### cleanup + +Called when the skill is unloaded. + +#### Signature + +```ruby +def cleanup +``` + +#### Source + +[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) + +Line 72. + +*** + +### description + +#### Signature + +```ruby +def description +``` + +#### Throws + +- `NotImplementedError` + +#### Source + +[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) + +Line 25. + +*** + +### get\_global\_data + +Global data to merge into the agent. + +#### Signature + +```ruby +def get_global_data +``` + +#### Source + +[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) + +Line 66. + +*** + +### get\_hints + +Speech recognition hints. + +#### Signature + +```ruby +def get_hints +``` + +#### Source + +[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) + +Line 63. + +*** + +### get\_param + +Helper to get a param with env-var fallback. + +#### Signature + +```ruby +def get_param(key, env_var: nil, default: nil) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) + +Line 153. + +*** + +### get\_parameter\_schema + +Parameter schema for GUI / validation. + +#### Signature + +```ruby +def get_parameter_schema +``` + +#### Source + +[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) + +Line 78. + +*** + +### get\_prompt\_sections + +Prompt sections to add to the agent. + +#### Signature + +```ruby +def get_prompt_sections +``` + +#### Source + +[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) + +Line 69. + +*** + +### get\_skill\_data + +Read this skill instance's namespaced data out of a raw\_data hash. + +Python parity: `SkillBase.get_skill_data(raw_data)` — reads +`raw_data["global_data"][namespace]` and returns it (or an +empty hash when absent). +raw\_data+ is the per-call data hash +SWAIG handlers receive; +global\_data+ is its agent-state bucket. +Tolerates symbol or string keys for `global_data`. + +#### Signature + +```ruby +def get_skill_data(raw_data) +``` + +#### Parameters + + + the raw\_data passed to a SWAIG handler. + + +#### Returns + +`Hash` — the namespaced skill state, or +\{\}+ if not present. + +#### Source + +[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) + +Line 90. + +*** + +### initialize + +Python parity: `SkillBase.__init__(self, agent, params=None)`. +First positional arg is the owning AgentBase (or nil for +standalone). The second is the params hash. We accept the legacy +1-arg form for backwards compatibility (`DateTimeSkill.new({...})`). + +#### Signature + +```ruby +def initialize(agent = nil, params = nil) +``` + +#### Parameters + + + + + +#### Returns + +`SkillBase` — a new instance of SkillBase + +#### Source + +[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) + +Line 38. + +*** + +### instance\_key + +Unique key for tracking this skill instance. + +#### Signature + +```ruby +def instance_key +``` + +#### Source + +[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) + +Line 75. + +*** + +### logger + +Python parity: + +- `params` — params hash passed at construction +- `agent` — owning AgentBase instance (or nil for standalone) +- `logger` — namespaced logger `signalwire.skills.` +- `swaig_fields` — extra SWAIG fields merged into tool defs; + pulled out of `params` if provided + +#### Signature + +```ruby +attr_reader logger -> Object +``` + +#### Source + +[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) + +Line 22. + +*** + +### name + +#### Signature + +```ruby +def name +``` + +#### Throws + +- `NotImplementedError` + +#### Source + +[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) + +Line 24. + +*** + +### params + +Python parity: + +- `params` — params hash passed at construction +- `agent` — owning AgentBase instance (or nil for standalone) +- `logger` — namespaced logger `signalwire.skills.` +- `swaig_fields` — extra SWAIG fields merged into tool defs; + pulled out of `params` if provided + +#### Signature + +```ruby +attr_reader params -> Object +``` + +#### Source + +[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) + +Line 22. + +*** + +### register\_tools + +Return an Array of tool definition hashes. Each hash should have: +:name, :description, :parameters, :handler (lambda/proc) + +#### Signature + +```ruby +def register_tools +``` + +#### Source + +[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) + +Line 60. + +*** + +### required\_env\_vars + +#### Signature + +```ruby +def required_env_vars +``` + +#### Source + +[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) + +Line 27. + +*** + +### setup + +Called once after construction. Return +true+ if the skill is ready. + +#### Signature + +```ruby +def setup +``` + +#### Source + +[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) + +Line 56. + +*** + +### supports\_multiple\_instances? + +#### Signature + +```ruby +def supports_multiple_instances? +``` + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) + +Line 32. + +*** + +### swaig\_fields + +Python parity: + +- `params` — params hash passed at construction +- `agent` — owning AgentBase instance (or nil for standalone) +- `logger` — namespaced logger `signalwire.skills.` +- `swaig_fields` — extra SWAIG fields merged into tool defs; + pulled out of `params` if provided + +#### Signature + +```ruby +attr_reader swaig_fields -> Object +``` + +#### Source + +[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) + +Line 22. + +*** + +### update\_skill\_data + +Write this skill instance's namespaced data into a FunctionResult. + +Python parity: `SkillBase.update_skill_data(result, data)` — +wraps +data+ under the skill namespace and calls +`result.update_global_data`. Returns +result+ so callers can +chain (mirrors Python returning the result). + +#### Signature + +```ruby +def update_skill_data(result, data) +``` + +#### Parameters + + + + + the skill state to persist under the namespace. + + +#### Returns + +`SignalWire::Swaig::FunctionResult` — +result+, for chaining. + +#### Source + +[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) + +Line 106. + +*** + +### validate\_env\_vars + +Check that every required environment variable is set. + +Python parity: `SkillBase.validate_env_vars` — returns +false+ +(and logs the missing names) when any entry of \{#required\_env\_vars\} +is absent or empty in +ENV+, otherwise +true+. + +#### Signature + +```ruby +def validate_env_vars +``` + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) + +Line 118. + +*** + +### validate\_packages + +Check that every required gem is loadable. + +Python parity: `SkillBase.validate_packages` (Python imports the +module; Ruby +require+s the gem). Returns +false+ (and logs the +missing names) when any entry of \{#required\_packages\} can't be ++require+d, otherwise +true+. A successful +require+ leaves the +gem loaded — matching Python's `importlib.import_module`. + +#### Signature + +```ruby +def validate_packages +``` + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) + +Line 136. + +*** + +### version + +#### Signature + +```ruby +def version +``` + +#### Source + +[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) + +Line 26. + +## Source + +[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) + +Line 15. diff --git a/fern/products/sdk-reference/ruby/signal-wire/skills/skill-manager/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/skills/skill-manager/index.mdx new file mode 100644 index 0000000000..371c92d97a --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/skills/skill-manager/index.mdx @@ -0,0 +1,276 @@ +--- +slug: "/reference/ruby/signal-wire/skills/skill-manager" +title: "SkillManager" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Skills::SkillManager" + parent: "SignalWire::Skills" + module: "SignalWire.Skills" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_manager.rb" + visibility: "public" +--- +# `SkillManager` + +Thread-safe lifecycle manager for loaded skill instances. + +manager = SkillManager.new +manager.load('datetime', DateTimeSkill.new) +manager.get('datetime') #=> <DateTimeSkill> +manager.unload('datetime') + +## Signature + +```ruby +class SkillManager < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### agent + +Python parity: + +- `agent` — owning AgentBase instance (or nil) +- `logger` — namespaced logger + +#### Signature + +```ruby +attr_reader agent -> Object +``` + +#### Source + +[`lib/signalwire/skills/skill_manager.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_manager.rb) + +Line 25. + +*** + +### clear + +Unload all skills. + +#### Signature + +```ruby +def clear +``` + +#### Source + +[`lib/signalwire/skills/skill_manager.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_manager.rb) + +Line 89. + +*** + +### get + +Retrieve a loaded skill. + +#### Signature + +```ruby +def get(key) +``` + +#### Parameters + + + +#### Returns + +`SkillBase | nil` + +#### Source + +[`lib/signalwire/skills/skill_manager.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_manager.rb) + +Line 69. + +*** + +### initialize + +Python parity: `SkillManager.__init__(self, agent)` — +SkillManager keeps a back-pointer to its agent so loaded +skills can attach prompt sections / SWAIG tools directly. +Ruby allows nil for standalone use (tests, registry tools). + +#### Signature + +```ruby +def initialize(agent = nil) +``` + +#### Parameters + + + +#### Returns + +`SkillManager` — a new instance of SkillManager + +#### Source + +[`lib/signalwire/skills/skill_manager.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_manager.rb) + +Line 31. + +*** + +### load + +Load a skill instance. Calls +setup+ on the skill; raises if it fails. + +#### Signature + +```ruby +def load(key, skill) +``` + +#### Parameters + + + the instance key + + + + the skill instance + + +#### Returns + +`SkillBase` — the loaded skill + +#### Source + +[`lib/signalwire/skills/skill_manager.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_manager.rb) + +Line 42. + +*** + +### loaded\_keys + +#### Signature + +```ruby +def loaded_keys +``` + +#### Returns + +`Array` + +#### Source + +[`lib/signalwire/skills/skill_manager.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_manager.rb) + +Line 79. + +*** + +### loaded? + +#### Signature + +```ruby +def loaded?(key) +``` + +#### Parameters + + + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/skills/skill_manager.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_manager.rb) + +Line 74. + +*** + +### logger + +Python parity: + +- `agent` — owning AgentBase instance (or nil) +- `logger` — namespaced logger + +#### Signature + +```ruby +attr_reader logger -> Object +``` + +#### Source + +[`lib/signalwire/skills/skill_manager.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_manager.rb) + +Line 25. + +*** + +### size + +#### Signature + +```ruby +def size +``` + +#### Returns + +`Integer` + +#### Source + +[`lib/signalwire/skills/skill_manager.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_manager.rb) + +Line 84. + +*** + +### unload + +Unload a skill by instance key. Calls +cleanup+ on it. + +#### Signature + +```ruby +def unload(key) +``` + +#### Parameters + + + +#### Returns + +`SkillBase | nil` — the removed skill, or nil + +#### Source + +[`lib/signalwire/skills/skill_manager.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_manager.rb) + +Line 58. + +## Source + +[`lib/signalwire/skills/skill_manager.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_manager.rb) + +Line 21. diff --git a/fern/products/sdk-reference/ruby/signal-wire/skills/skill-name/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/skills/skill-name/index.mdx new file mode 100644 index 0000000000..876e1485d7 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/skills/skill-name/index.mdx @@ -0,0 +1,130 @@ +--- +slug: "/reference/ruby/signal-wire/skills/skill-name" +title: "SkillName" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "module" + language: "ruby" + qualified_name: "SignalWire::Skills::SkillName" + parent: "SignalWire::Skills" + module: "SignalWire.Skills" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_name.rb" + visibility: "public" +--- +# `SkillName` + +Named constants for the skills that ship built in with this gem. + +Skill names are an open _string_ set in the Python reference +(`add_skill` takes a bare +str+), which keeps parity and lets callers +load custom / third-party skills. \{SkillName\} gives the built-in +skills a named alternative so a typo — +add\_skill("datetiem")+ — has a +canonical constant to reach for instead, while the string path stays +available for parity and custom skills. + +Each constant's value IS the snake\_case wire name the +\{SkillRegistry\} is keyed by (the same string a skill reports from its ++#name+), so these are interchangeable: + +agent.add\_skill(SignalWire::Skills::SkillName::DATETIME) # named +agent.add\_skill("datetime") # string (parity) +agent.add\_skill("my\_custom\_skill") # open set: custom ok + +Single source of truth: \{ALL\} is exactly the set the registry +registers and that +AgentBase#add\_skill+ validates against +(+SkillRegistry.builtin\_skill\_names+ is derived from \{ALL\}). The +spec proves the two never drift. + +Idiom note: mirrors +SignalWire::Relay+'s constants module — flat ++NAME = 'value'+ string constants grouped into a frozen +ALL+ array. + +## Signature + +```ruby +module SkillName +``` + +## Constants + + + Every built-in skill name, sorted to match +SkillRegistry.builtin\_skill\_names+ (which sorts the +builtin/+ directory listing). This is the single source of truth for the built-in set. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## Methods + +### builtin? + +#### Signature + +```ruby +def builtin?(name) +``` + +#### Parameters + + + a candidate skill name + + +#### Returns + +`Boolean` — true when +name+ is one of the built-in skills. Custom / third-party skill names return false (the set is open). + +#### Source + +[`lib/signalwire/skills/skill_name.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_name.rb) + +Line 82. + +## Source + +[`lib/signalwire/skills/skill_name.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_name.rb) + +Line 34. diff --git a/fern/products/sdk-reference/ruby/signal-wire/skills/skill-registry/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/skills/skill-registry/index.mdx new file mode 100644 index 0000000000..a10fe1df85 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/skills/skill-registry/index.mdx @@ -0,0 +1,587 @@ +--- +slug: "/reference/ruby/signal-wire/skills/skill-registry" +title: "SkillRegistry" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Skills::SkillRegistry" + parent: "SignalWire::Skills" + module: "SignalWire.Skills" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_registry.rb" + visibility: "public" +--- +# `SkillRegistry` + +Global registry mapping skill names to factory lambdas. + +SkillRegistry.register('datetime') \{ |params| DateTimeSkill.new(params) \} +factory = SkillRegistry.get\_factory('datetime') +skill = factory.call(\{ 'timezone' => 'UTC' \}) + +## Signature + +```ruby +class SkillRegistry < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### add\_skill\_directory + +Add a directory to search for skills. + +Mirrors Python's `SkillRegistry.add_skill_directory`: validate +that the path exists and is a directory, then append it +(de-duplicated) to `@external_paths`. Raises `ArgumentError` +(the Ruby analog of Python's `ValueError`) for invalid input. + +#### Signature + +```ruby +def add_skill_directory(path) +``` + +#### Parameters + + + absolute or relative path to a directory + + +#### Returns + +`void` + +#### Throws + +- `ArgumentError` — when the path doesn't exist or isn't a directory. + +#### Source + +[`lib/signalwire/skills/skill_registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_registry.rb) + +Line 53. + +*** + +### builtin\_skill\_names + +Skill names this gem ships as built-ins. + +Single source of truth: this returns \{SkillName::ALL\}, the named +constant set. The +builtin/+ directory is the runtime origin of +the actual factories (one file per skill, each calling ++SkillRegistry.register+ on require); the spec asserts the +directory listing and \{SkillName::ALL\} stay identical so the +named set can never silently drift from what gets registered. + +#### Signature + +```ruby +def builtin_skill_names +``` + +#### Returns + +`Array` + +#### Source + +[`lib/signalwire/skills/skill_registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_registry.rb) + +Line 253. + +*** + +### discover\_skills + +Ensure built-in skills are discovered/registered (instance form). + +Python parity: `SkillRegistry.discover_skills` is a deprecated +no-op there because skills load on-demand. Ruby ships its +built-ins explicitly, so the faithful equivalent is to make sure +they're registered — idempotent, since \{register\_builtins!\} just +re-requires the (already loaded) built-in files. Returns the +registered skill names so callers can confirm discovery ran. + +#### Signature + +```ruby +def discover_skills +``` + +#### Returns + +`Array` — currently registered skill names. + +#### Source + +[`lib/signalwire/skills/skill_registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_registry.rb) + +Line 102. + +*** + +### discover\_skills + +Ensure built-in skills are registered and return their names. + +Python parity: `SkillRegistry.discover_skills` (a no-op there +since skills load on-demand). Ruby ships built-ins explicitly, +so this guarantees they're registered via \{register\_builtins!\} +(idempotent) and returns the registered skill names. + +#### Signature + +```ruby +def discover_skills +``` + +#### Returns + +`Array` — currently registered skill names. + +#### Source + +[`lib/signalwire/skills/skill_registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_registry.rb) + +Line 268. + +*** + +### external\_paths + +External skill directories registered via #add\_skill\_directory. +Mirrors Python's `_external_paths` accessor surface. + +#### Signature + +```ruby +attr_reader external_paths -> Object +``` + +#### Source + +[`lib/signalwire/skills/skill_registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_registry.rb) + +Line 40. + +*** + +### get\_all\_skills\_schema + +Get complete schema for all registered skills (instance form). + +Mirrors Python's instance-method +`SkillRegistry.get_all_skills_schema()` — returns a hash keyed +by skill name, each value containing parameter metadata. Ruby +skills don't carry rich Python-style parameter introspection in +v1, so the value defaults to a minimal shape with the skill +name; built-ins that expose `parameter_schema` get richer +detail. + +#### Signature + +```ruby +def get_all_skills_schema +``` + +#### Returns + +`Hash{String => Hash}` + +#### Source + +[`lib/signalwire/skills/skill_registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_registry.rb) + +Line 76. + +*** + +### get\_all\_skills\_schema + +Get complete schema for all registered skills. + +Mirrors Python's +`SkillRegistry.get_all_skills_schema()` — returns a hash +keyed by skill name, with each value containing parameter +metadata. Ruby skills don't carry rich Python-style parameter +introspection in v1, so the value defaults to a minimal shape +with the skill name; built-in skills that expose +`parameter_schema` get richer detail. + +#### Signature + +```ruby +def get_all_skills_schema +``` + +#### Returns + +`Hash{String => Hash}` + +#### Source + +[`lib/signalwire/skills/skill_registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_registry.rb) + +Line 323. + +*** + +### get\_factory + +Get the factory for a skill. + +#### Signature + +```ruby +def get_factory(skill_name) +``` + +#### Parameters + + + +#### Returns + +`Proc | nil` + +#### Source + +[`lib/signalwire/skills/skill_registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_registry.rb) + +Line 191. + +*** + +### initialize + +Per-instance state for the skill-directory parity surface; the +class-method API above is preserved for backwards compatibility, +but `add_skill_directory` mirrors Python's instance-method shape +exactly (Python's `signalwire.skills.registry.SkillRegistry`). + +#### Signature + +```ruby +def initialize +``` + +#### Returns + +`SkillRegistry` — a new instance of SkillRegistry + +#### Source + +[`lib/signalwire/skills/skill_registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_registry.rb) + +Line 28. + +*** + +### last\_registered + +The most recently registered skill name (instance form). + +#### Signature + +```ruby +attr_reader last_registered -> Object +``` + +#### Source + +[`lib/signalwire/skills/skill_registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_registry.rb) + +Line 167. + +*** + +### list\_all\_skill\_sources + +List skill sources and the skills available from each (instance form). + +Python parity: `SkillRegistry.list_all_skill_sources` returns a +hash mapping source type to skill names. This instance form folds +in any directories registered via \{#add\_skill\_directory\}. + +#### Signature + +```ruby +def list_all_skill_sources +``` + +#### Returns + +`Hash{String => Array}` + +#### Source + +[`lib/signalwire/skills/skill_registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_registry.rb) + +Line 113. + +*** + +### list\_all\_skill\_sources + +List all skill sources and the skills available from each. + +Python parity: `SkillRegistry.list_all_skill_sources` returns +a hash keyed by source type. Ruby has no Python-style entry +points, so that bucket is always empty; +registered+ holds any +skill that isn't a shipped built-in (e.g. registered via +\{register\_skill\}). +external\_paths+ folds in skill subdirectory +names found under any directories passed in. + +#### Signature + +```ruby +def list_all_skill_sources(external_paths: []) +``` + +#### Parameters + + + +#### Returns + +`Hash{String => Array}` + +#### Source + +[`lib/signalwire/skills/skill_registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_registry.rb) + +Line 285. + +*** + +### list\_skills + +List all registered skill names (instance form). + +Python parity: `SkillRegistry.list_skills(self)` returns a list of +dictionaries describing each skill. Ruby v1 returns the +registered names plus available metadata (description / version) +when the factory can be instantiated without arguments. + +#### Signature + +```ruby +def list_skills +``` + +#### Returns + +`Array` + +#### Source + +[`lib/signalwire/skills/skill_registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_registry.rb) + +Line 88. + +*** + +### list\_skills + +List all registered skill names. + +#### Signature + +```ruby +def list_skills +``` + +#### Returns + +`Array` + +#### Source + +[`lib/signalwire/skills/skill_registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_registry.rb) + +Line 197. + +*** + +### logger + +Python parity: `self.logger = get_logger("skill_registry")`. +Per-instance logger; the class-level API uses the same name. + +#### Signature + +```ruby +attr_reader logger -> Object +``` + +#### Source + +[`lib/signalwire/skills/skill_registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_registry.rb) + +Line 36. + +*** + +### register + +Register a skill factory. + +#### Signature + +```ruby +def register(skill_name, &block) +``` + +#### Parameters + + + + + +#### Yields + +- `params` — block that receives params hash and returns a SkillBase + +#### Source + +[`lib/signalwire/skills/skill_registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_registry.rb) + +Line 173. + +*** + +### register\_builtins! + +Register all built-in skills. Called at load time. + +#### Signature + +```ruby +def register_builtins! +``` + +#### Source + +[`lib/signalwire/skills/skill_registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_registry.rb) + +Line 237. + +*** + +### register\_skill + +Register a skill class or factory (instance form). + +Python parity: `SkillRegistry.register_skill(self, skill_class)` +accepts a SkillBase subclass and stores its factory. Ruby +accepts either a class with a `new(params)` constructor, a +`Proc` /`Lambda`, or a 2-arg `(name, factory)` form for +explicit naming. Returns `self` for chaining. + +#### Signature + +```ruby +def register_skill(skill_class_or_name, factory = nil) +``` + +#### Parameters + + + either a SkillBase subclass (Python style) or a string skill name (legacy 2-arg form). + + + + explicit factory when first arg is a string (legacy form). + + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/skills/skill_registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_registry.rb) + +Line 130. + +*** + +### register\_skill + +Register with an explicit lambda / proc instead of a block. + +#### Signature + +```ruby +def register_skill(skill_name, factory) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/skills/skill_registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_registry.rb) + +Line 182. + +*** + +### registered? + +Check if a skill is registered. + +#### Signature + +```ruby +def registered?(skill_name) +``` + +#### Parameters + + + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/skills/skill_registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_registry.rb) + +Line 227. + +*** + +### reset! + +Clear all registrations (primarily for testing). + +#### Signature + +```ruby +def reset! +``` + +#### Source + +[`lib/signalwire/skills/skill_registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_registry.rb) + +Line 232. + +## Source + +[`lib/signalwire/skills/skill_registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_registry.rb) + +Line 20. diff --git a/fern/products/sdk-reference/ruby/signal-wire/swaig/codec/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/swaig/codec/index.mdx new file mode 100644 index 0000000000..cb1de3e12b --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/swaig/codec/index.mdx @@ -0,0 +1,44 @@ +--- +slug: "/reference/ruby/signal-wire/swaig/codec" +title: "Codec" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "module" + language: "ruby" + qualified_name: "SignalWire::Swaig::Codec" + parent: "SignalWire::Swaig" + module: "SignalWire.Swaig" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb" + visibility: "public" +--- +# `Codec` + +RTP payload codec for the +tap+ verb. + +This is the 2-value SWAIG tap codec only. It is DELIBERATELY NOT the +broader RELAY +stream+/+connect+ device-codec superset (which adds +OPUS/G729/G722/VP8/H264). Never reuse this constant there. + +## Signature + +```ruby +module Codec +``` + +## Constants + + + Every valid +tap+ codec, in wire order. + + + + + + +## Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 72. diff --git a/fern/products/sdk-reference/ruby/signal-wire/swaig/function-result/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/swaig/function-result/index.mdx new file mode 100644 index 0000000000..49e5cc3fb5 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/swaig/function-result/index.mdx @@ -0,0 +1,1760 @@ +--- +slug: "/reference/ruby/signal-wire/swaig/function-result" +title: "FunctionResult" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Swaig::FunctionResult" + parent: "SignalWire::Swaig" + module: "SignalWire.Swaig" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb" + visibility: "public" +--- +# `FunctionResult` + +Response builder that tool handlers return. +All mutating methods return +self+ for fluent chaining. + +result = FunctionResult.new("Found your order") +.update\_global\_data("order\_id" => "12345") +.say("Let me look that up") + +The result object has three main components: + +1. response - Text the AI should say back to the user +2. action - List of structured actions to execute +3. post\_process - Whether to let AI take another turn before executing actions + +## Signature + +```ruby +class FunctionResult < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### action + +Returns the value of attribute action. + +#### Signature + +```ruby +attr_accessor action <-> Object +``` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 93. + +*** + +### action= + +Sets the attribute action + +#### Signature + +```ruby +attr_accessor action= <-> Object +``` + +#### Parameters + + + the value to set the attribute action to. + + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 93. + +*** + +### add\_action + +Add a single structured action. + +#### Signature + +```ruby +def add_action(name, data) +``` + +#### Parameters + + + action key + + + + action value + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 125. + +*** + +### add\_actions + +Add multiple structured actions at once. + +#### Signature + +```ruby +def add_actions(actions) +``` + +#### Parameters + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 133. + +*** + +### add\_dynamic\_hints + +Add dynamic speech recognition hints. + +#### Signature + +```ruby +def add_dynamic_hints(hints) +``` + +#### Parameters + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 410. + +*** + +### clear\_dynamic\_hints + +Clear all dynamic speech recognition hints. + +#### Signature + +```ruby +def clear_dynamic_hints +``` + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 416. + +*** + +### connect + +Connect / transfer the call to another destination. + +#### Signature + +```ruby +def connect(destination, final: true, from_addr: nil) +``` + +#### Parameters + + + phone number, SIP address, etc. + + + + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 148. + +*** + +### create\_payment\_action + +Create a payment action for use inside payment prompts. + +#### Signature + +```ruby +def create_payment_action(action_type, phrase) +``` + +#### Parameters + + + "Say" or "Play" + + + + +#### Returns + +`Hash` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 819. + +*** + +### create\_payment\_parameter + +Create a payment parameter for use with +pay+. + +#### Signature + +```ruby +def create_payment_parameter(name, value) +``` + +#### Parameters + + + + + +#### Returns + +`Hash` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 828. + +*** + +### create\_payment\_prompt + +Create a payment prompt structure for use with +pay+. + +#### Signature + +```ruby +def create_payment_prompt(for_situation, actions, card_type: nil, error_type: nil) +``` + +#### Parameters + + + e.g. "payment-card-number" + + + + actions with "type" and "phrase" keys + + + + + + +#### Returns + +`Hash` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 804. + +*** + +### enable\_extensive\_data + +Send full data to LLM for this turn only. + +#### Signature + +```ruby +def enable_extensive_data(enabled = true) +``` + +#### Parameters + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 452. + +*** + +### enable\_functions\_on\_timeout + +Enable function calls on speaker timeout. + +#### Signature + +```ruby +def enable_functions_on_timeout(enabled = true) +``` + +#### Parameters + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 445. + +*** + +### end\_of\_speech\_timeout= + +\--- Idiomatic Ruby accessors (additive aliases over set\_\* originals) --- + +#### Signature + +```ruby +def end_of_speech_timeout=(v) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 863. + +*** + +### execute\_rpc + +Execute a generic RPC method via SWML. + +#### Signature + +```ruby +def execute_rpc(method, params: nil, call_id: nil, node_id: nil) +``` + +#### Parameters + + + RPC method name + + + + + + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 726. + +*** + +### execute\_swml + +Execute SWML content with optional transfer. + +#### Signature + +```ruby +def execute_swml(swml_content, transfer: false) +``` + +#### Parameters + + + SWML data structure or JSON string + + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 472. + +*** + +### hangup + +Terminate the call. + +#### Signature + +```ruby +def hangup +``` + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 192. + +*** + +### hold + +Put the call on hold. + +#### Signature + +```ruby +def hold(timeout = 300) +``` + +#### Parameters + + + seconds, clamped to 0..900 + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 199. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(response = nil, post_process: false) +``` + +#### Parameters + + + text the AI speaks back to the user + + + + +#### Returns + +`FunctionResult` — a new instance of FunctionResult + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 97. + +*** + +### join\_conference + +Join an ad-hoc audio conference via SWML. + +#### Signature + +```ruby +def join_conference(name, muted: false, beep: "true", start_on_enter: true, end_on_exit: false, wait_url: nil, max_participants: 250, record: "do-not-record", region: nil, trim: "trim-silence", coach: nil, status_callback_event: nil, status_callback: nil, status_callback_method: "POST", recording_status_callback: nil, recording_status_callback_method: "POST", recording_status_callback_event: "completed", result: nil) +``` + +#### Parameters + + + conference name (required) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`self` + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 498. + +*** + +### join\_room + +Join a RELAY room via SWML. + +#### Signature + +```ruby +def join_room(name) +``` + +#### Parameters + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 574. + +*** + +### metadata= + +#### Signature + +```ruby +def metadata=(v) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 867. + +*** + +### pay + +Process payment using SWML pay action. + +#### Signature + +```ruby +def pay(payment_connector_url:, input_method: "dtmf", status_url: nil, payment_method: "credit-card", timeout: 5, max_attempts: 1, security_code: true, postal_code: true, min_postal_code_length: 0, token_type: "reusable", charge_amount: nil, currency: "usd", language: "en-US", voice: "woman", description: nil, valid_card_types: "visa mastercard amex", parameters: nil, prompts: nil, ai_response: 'The payment status is ${pay_result}, do not mention anything else about collecting payment if successful.') +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 672. + +*** + +### play\_background\_file + +Play audio/video file in the background. + +#### Signature + +```ruby +def play_background_file(filename, wait: false) +``` + +#### Parameters + + + audio/video filename or URL + + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 340. + +*** + +### post\_process + +Returns the value of attribute post\_process. + +#### Signature + +```ruby +attr_accessor post_process <-> Object +``` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 93. + +*** + +### post\_process= + +Sets the attribute post\_process + +#### Signature + +```ruby +attr_accessor post_process= <-> Object +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 93. + +*** + +### record\_call + +Start background call recording via SWML. + +#### Signature + +```ruby +def record_call(control_id: nil, stereo: false, format: RecordFormat::WAV, direction: RecordDirection::BOTH, terminators: nil, beep: false, input_sensitivity: 44.0, initial_timeout: nil, end_silence_timeout: nil, max_length: nil, status_url: nil) +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`self` + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 361. + +*** + +### remove\_global\_data + +Remove global agent data variables. + +#### Signature + +```ruby +def remove_global_data(keys) +``` + +#### Parameters + + + key(s) to remove + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 243. + +*** + +### remove\_metadata + +Remove metadata from current function's scope. + +#### Signature + +```ruby +def remove_metadata(keys) +``` + +#### Parameters + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 257. + +*** + +### replace\_in\_history + +Replace the tool\_call + result pair in conversation history. + +#### Signature + +```ruby +def replace_in_history(text = true) +``` + +#### Parameters + + + replacement text, or +true+ to remove entirely + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 320. + +*** + +### response + +Returns the value of attribute response. + +#### Signature + +```ruby +attr_accessor response <-> Object +``` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 93. + +*** + +### response= + +Sets the attribute response + +#### Signature + +```ruby +attr_accessor response= <-> Object +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 93. + +*** + +### rpc\_ai\_message + +Inject a message into an AI agent on another call. + +#### Signature + +```ruby +def rpc_ai_message(call_id, message_text, role: "system") +``` + +#### Parameters + + + + + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 768. + +*** + +### rpc\_ai\_unhold + +Unhold another call via RPC. + +#### Signature + +```ruby +def rpc_ai_unhold(call_id) +``` + +#### Parameters + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 782. + +*** + +### rpc\_dial + +Dial out to a number via RPC. + +#### Signature + +```ruby +def rpc_dial(to_number:, from_number:, dest_swml:, device_type: "phone") +``` + +#### Parameters + + + + + + + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 746. + +*** + +### say + +Make the agent speak specific text. + +#### Signature + +```ruby +def say(text) +``` + +#### Parameters + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 331. + +*** + +### send\_sms + +Send an SMS message via SWML. + +#### Signature + +```ruby +def send_sms(to_number:, from_number:, body: nil, media: nil, tags: nil, region: nil) +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`self` + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 645. + +*** + +### set\_end\_of\_speech\_timeout + +Adjust end-of-speech timeout. + +#### Signature + +```ruby +def set_end_of_speech_timeout(milliseconds) +``` + +#### Parameters + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 424. + +*** + +### set\_metadata + +Set metadata scoped to current function's meta\_data\_token. + +#### Signature + +```ruby +def set_metadata(data) +``` + +#### Parameters + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 250. + +*** + +### set\_post\_process + +Enable / disable post-processing. + +#### Signature + +```ruby +def set_post_process(val) +``` + +#### Parameters + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 116. + +*** + +### set\_response + +Set the natural-language response text. + +#### Signature + +```ruby +def set_response(text) +``` + +#### Parameters + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 109. + +*** + +### set\_speech\_event\_timeout + +Adjust speech event timeout. + +#### Signature + +```ruby +def set_speech_event_timeout(milliseconds) +``` + +#### Parameters + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 431. + +*** + +### simulate\_user\_input + +Queue simulated user input. + +#### Signature + +```ruby +def simulate_user_input(text) +``` + +#### Parameters + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 789. + +*** + +### sip\_refer + +Send SIP REFER via SWML. + +#### Signature + +```ruby +def sip_refer(to_uri) +``` + +#### Parameters + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 585. + +*** + +### speech\_event\_timeout= + +#### Signature + +```ruby +def speech_event_timeout=(v) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 879. + +*** + +### stop + +Stop agent execution. + +#### Signature + +```ruby +def stop +``` + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 225. + +*** + +### stop\_background\_file + +Stop currently playing background file. + +#### Signature + +```ruby +def stop_background_file +``` + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 350. + +*** + +### stop\_record\_call + +Stop an active background call recording. + +#### Signature + +```ruby +def stop_record_call(control_id: nil) +``` + +#### Parameters + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 392. + +*** + +### stop\_tap + +Stop an active tap stream via SWML. + +#### Signature + +```ruby +def stop_tap(control_id: nil) +``` + +#### Parameters + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 625. + +*** + +### switch\_context + +Switch agent context/prompt during conversation. + +When only +system\_prompt+ is provided and all flags are false, emits +a simple string context switch. Otherwise emits the full object form. + +#### Signature + +```ruby +def switch_context(system_prompt: nil, user_prompt: nil, consolidate: false, full_reset: false, isolated: false) +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 301. + +*** + +### swml\_change\_context + +Change the conversation context. + +#### Signature + +```ruby +def swml_change_context(context_name) +``` + +#### Parameters + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 286. + +*** + +### swml\_change\_step + +Change the conversation step. + +#### Signature + +```ruby +def swml_change_step(step_name) +``` + +#### Parameters + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 279. + +*** + +### swml\_transfer + +Transfer via SWML with an AI response when transfer completes. + +#### Signature + +```ruby +def swml_transfer(dest, ai_response, final: true) +``` + +#### Parameters + + + destination URL for the transfer + + + + message AI says when transfer completes + + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 172. + +*** + +### swml\_user\_event + +Send a user event through SWML. + +#### Signature + +```ruby +def swml_user_event(event_data) +``` + +#### Parameters + + + event payload + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 264. + +*** + +### tap + +Start a background call tap via SWML. + +#### Signature + +```ruby +def tap(uri, control_id: nil, direction: TapDirection::BOTH, codec: Codec::PCMU, rtp_ptime: 20, status_url: nil) +``` + +#### Parameters + + + destination URI (rtp://, ws://, wss://) + + + + + + + + + + + + +#### Returns + +`self` + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 602. + +*** + +### to\_h + +Convert to the Hash structure expected by SWAIG. + +Rules: + +- +response+ always included (string) +- +action+ only included if at least one action exists +- +post\_process+ only included if +true+ and actions exist + +#### Signature + +```ruby +def to_h +``` + +#### Returns + +`Hash` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 844. + +*** + +### to\_json + +#### Signature + +```ruby +def to_json(*args) +``` + +#### Parameters + + + +#### Returns + +`String` — JSON representation + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 858. + +*** + +### toggle\_functions + +Enable / disable specific SWAIG functions. + +#### Signature + +```ruby +def toggle_functions(toggles) +``` + +#### Parameters + + + each with "function" and "active" keys + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 438. + +*** + +### update\_global\_data + +Update global agent data variables. + +#### Signature + +```ruby +def update_global_data(data) +``` + +#### Parameters + + + key-value pairs to set/update + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 236. + +*** + +### update\_settings + +Update agent runtime settings (temperature, top\_p, etc.). + +#### Signature + +```ruby +def update_settings(settings) +``` + +#### Parameters + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 459. + +*** + +### wait\_for\_user + +Control how the agent waits for user input. + +#### Signature + +```ruby +def wait_for_user(enabled: nil, timeout: nil, answer_first: false) +``` + +#### Parameters + + + + + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 210. + +## Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 92. diff --git a/fern/products/sdk-reference/ruby/signal-wire/swaig/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/swaig/index.mdx new file mode 100644 index 0000000000..cb882d2f2c --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/swaig/index.mdx @@ -0,0 +1,60 @@ +--- +slug: "/reference/ruby/signal-wire/swaig" +title: "Swaig" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "module" + language: "ruby" + qualified_name: "SignalWire::Swaig" + parent: "SignalWire" + module: "SignalWire" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb" + visibility: "public" +--- +# `Swaig` + +## Signature + +```ruby +module Swaig +``` + +## Classes + + + + Response builder that tool handlers return. All mutating methods return +self+ for fluent chaining. + + + + \------------------------------------------------------------------ ParameterSchema — a typed, block-DSL builder for SWAIG tool parameters (the Tier-2 idiom flagship for the Ruby port; see porting-sdk/IDIOM\_PASS\_JOURNAL.md §4). + + + +## Modules + + + + RTP payload codec for the +tap+ verb. + + + + Channel selection for the +record\_call+ verb. + + + + Audio container format for the +record\_call+ verb. + + + + Channel selection for the +tap+ verb. + + + +## Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 11. diff --git a/fern/products/sdk-reference/ruby/signal-wire/swaig/parameter-schema/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/swaig/parameter-schema/index.mdx new file mode 100644 index 0000000000..cf165eebdb --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/swaig/parameter-schema/index.mdx @@ -0,0 +1,614 @@ +--- +slug: "/reference/ruby/signal-wire/swaig/parameter-schema" +title: "ParameterSchema" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Swaig::ParameterSchema" + parent: "SignalWire::Swaig" + module: "SignalWire.Swaig" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/parameter_schema.rb" + visibility: "public" +--- +# `ParameterSchema` + +*** + +ParameterSchema — a typed, block-DSL builder for SWAIG tool +parameters (the Tier-2 idiom flagship for the Ruby port; see +porting-sdk/IDIOM\_PASS\_JOURNAL.md §4). + +Defining a SWAIG tool's +parameters+ in the Python reference (and in +the existing Ruby path) means hand-writing a JSON-Schema blob as +nested Hashes: + +``` +define_tool(name: "lookup", description: "...", parameters: { + "service" => { "type" => "string", "description" => "The service" }, + "date" => { "type" => "string", "description" => "YYYY-MM-DD" } +}, required: %w[service date]) +``` + ++ParameterSchema+ is a _typed convenience over the SAME wire output_: +the Hash it produces is BYTE-IDENTICAL to the normalised hand-written +form (a +\{ 'type' => 'object', 'properties' => \{...\}, 'required' => +\[...] \}+ object — +required+ omitted when empty). It is NOT a new +format; the untyped Hash path stays fully supported. This is purely +additive (a PORT\_ADDITION). + +The idiom is a Ruby block DSL — the most natural way to render nested +structure readably: + +``` +params = SignalWire::Swaig::ParameterSchema.build do + string :service, 'The service to look up' + string :date, 'Appointment date, YYYY-MM-DD' + enum :fmt, RecordFormat::ALL, 'Audio container format' + integer :count, 'How many results', default: 10 + array :tags, 'Search tags', of: :string + object :filter, 'Structured filter' do + string :status, 'open|closed' + end + required :service, :date +end + +# params is the same Hash a hand-written schema would produce: +# { 'type' => 'object', 'properties' => { ... }, 'required' => [...] } +``` + +The +enum+ kind integrates the Tier-1 frozen closed-set constants +(\{RecordFormat\}, \{RecordDirection\}, \{TapDirection\}, \{Codec\}) — pass +any of their +ALL+ arrays (or any literal array) as the closed set and +it lands in the schema as +"enum" => \[...]+. + +Supported property kinds: +string+, +number+, +integer+, +boolean+, ++enum+ (closed set), +array+ (of a kind), +object+ (nested). Every +kind accepts +description+ plus optional +required:+ / +default:+ / ++enum:+ / +format:+. + +The result Hash is plain JSON-Schema — feed it straight to ++define\_tool(parameters:)+. Because the kind methods return +self+ a +fluent style works too: + +``` +ParameterSchema.new.string(:q, 'query').require(:q).to_h +``` + +*** + +## Signature + +```ruby +class ParameterSchema < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Constants + + + + + + + + + + + + + JSON-Schema "type" keyword each builder method emits. + + +## Methods + +### array + +Add an +array+ property. The element kind is given by +of:+ (a JSON +type string like +'string'+ / +:integer+), producing an +items+ +subschema. When +of:+ names +object+ (or +:object+) a block may +define the element object's properties. + +array :tags, 'Search tags', of: :string +\#=> properties.tags == \{ 'type' => 'array', +\# 'description' => '...', 'items' => \{ 'type' => 'string' \} \} + +``` +array :people, 'Attendees', of: :object do + string :name, 'Full name' +end +``` + +#### Signature + +```ruby +def array(name, description = nil, of: nil, required: false, default: nil, enum: nil, &block) +``` + +#### Parameters + + + property name + + + + LLM-facing description + + + + + + + + + + + + +#### Returns + +`self` + +#### Yields + +- nested element-object property DSL (only when +of: :object+) + +#### Source + +[`lib/signalwire/swaig/parameter_schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/parameter_schema.rb) + +Line 173. + +*** + +### boolean + +Add a +boolean+ property. Same options as \{#string\}. + +#### Signature + +```ruby +def boolean(name, description = nil, required: false, default: nil) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/parameter_schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/parameter_schema.rb) + +Line 125. + +*** + +### build + +Build a schema with the block DSL. The block runs in the builder's +instance context, so the bare +string :x, '...'+ verbs resolve to +this object's methods. + +schema = ParameterSchema.build do +string :name, 'Caller name' +required :name +end #=> Hash + +#### Signature + +```ruby +def build(&block) +``` + +#### Parameters + + + +#### Returns + +`Hash` — the JSON-Schema parameters object (byte-identical to the equivalent hand-written + normalised +parameters+ Hash) + +#### Yields + +- DSL body evaluated against a fresh \{ParameterSchema\} + +#### Source + +[`lib/signalwire/swaig/parameter_schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/parameter_schema.rb) + +Line 88. + +*** + +### enum + +Add a closed-set property (a +string+-typed schema carrying an ++enum+ list). Integrates the Tier-1 frozen vocabularies — pass ++RecordFormat::ALL+, +TapDirection::ALL+, +Codec::ALL+, etc. (or any +literal array) as the +values+ closed set. + +enum :fmt, RecordFormat::ALL, 'Audio container format' +\#=> properties.fmt == \{ 'type' => 'string', +\# 'description' => '...', 'enum' => \['wav','mp3','mp4'] \} + +#### Signature + +```ruby +def enum(name, values, description = nil, required: false, default: nil, type: STRING) +``` + +#### Parameters + + + property name + + + + the closed set (e.g. a constant module's +ALL+) + + + + LLM-facing description + + + + + + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/parameter_schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/parameter_schema.rb) + +Line 146. + +*** + +### initialize + +#### Signature + +```ruby +def initialize +``` + +#### Returns + +`ParameterSchema` — a new instance of ParameterSchema + +#### Source + +[`lib/signalwire/swaig/parameter_schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/parameter_schema.rb) + +Line 94. + +*** + +### integer + +Add an +integer+ property. Same options as \{#string\}. + +#### Signature + +```ruby +def integer(name, description = nil, required: false, default: nil, enum: nil, format: nil) +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/parameter_schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/parameter_schema.rb) + +Line 119. + +*** + +### number + +Add a +number+ (floating-point) property. Same options as \{#string\}. + +#### Signature + +```ruby +def number(name, description = nil, required: false, default: nil, enum: nil, format: nil) +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/parameter_schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/parameter_schema.rb) + +Line 113. + +*** + +### object + +Add a nested +object+ property whose sub-properties are defined in +the block (a recursively-evaluated \{ParameterSchema\}). + +object :address, 'Mailing address' do +string :street, 'Street line' +string :zip, 'Postal code' +required :street +end + +The nested object's own +required+ list (from a nested +required+ +call) is carried inside the sub-schema, exactly as a hand-written +nested object would render. + +#### Signature + +```ruby +def object(name, description = nil, required: false, &block) +``` + +#### Parameters + + + property name + + + + LLM-facing description + + + + + + +#### Returns + +`self` + +#### Yields + +- nested property DSL + +#### Source + +[`lib/signalwire/swaig/parameter_schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/parameter_schema.rb) + +Line 210. + +*** + +### require + +Singular alias of \{#required\} for fluent single-property chains +(+.string(:q,'..').require(:q)+). Avoids reading as a plural when +only one name is passed. + +#### Signature + +```ruby +def require(*names) +``` + +#### Parameters + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/parameter_schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/parameter_schema.rb) + +Line 244. + +*** + +### required + +Mark one or more already-declared (or to-be-declared) properties as +required. Names are de-duplicated, preserving first-seen order — the +same shape +define\_tool(required:)+ produces. + +required :service, :date + +#### Signature + +```ruby +def required(*names) +``` + +#### Parameters + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/parameter_schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/parameter_schema.rb) + +Line 232. + +*** + +### string + +Add a +string+ property. + +#### Signature + +```ruby +def string(name, description = nil, required: false, default: nil, enum: nil, format: nil) +``` + +#### Parameters + + + property name (rendered as a String key) + + + + LLM-facing description + + + + + + + + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/parameter_schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/parameter_schema.rb) + +Line 107. + +*** + +### to\_h + +Render the JSON-Schema parameters object. + +Shape (byte-identical to a hand-written + normalised schema): + +- always +'type' => 'object'+ +- +'properties' => \{...\}+ (insertion-ordered) +- +'required' => \[...]+ ONLY when at least one name is required + (omitted entirely otherwise — matching +define\_tool+, which only + writes +required+ when the supplied Array is non-empty) + +#### Signature + +```ruby +def to_h +``` + +#### Returns + +`Hash` + +#### Source + +[`lib/signalwire/swaig/parameter_schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/parameter_schema.rb) + +Line 258. + +*** + +### to\_hash + +Render the JSON-Schema parameters object. + +Shape (byte-identical to a hand-written + normalised schema): + +- always +'type' => 'object'+ +- +'properties' => \{...\}+ (insertion-ordered) +- +'required' => \[...]+ ONLY when at least one name is required + (omitted entirely otherwise — matching +define\_tool+, which only + writes +required+ when the supplied Array is non-empty) + +#### Signature + +```ruby +def to_h +``` + +#### Returns + +`Hash` + +#### Source + +[`lib/signalwire/swaig/parameter_schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/parameter_schema.rb) + +Line 266. + +*** + +### to\_json + +#### Signature + +```ruby +def to_json(*args) +``` + +#### Parameters + + + +#### Returns + +`String` — JSON serialization of \{#to\_h\} + +#### Source + +[`lib/signalwire/swaig/parameter_schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/parameter_schema.rb) + +Line 269. + +## Source + +[`lib/signalwire/swaig/parameter_schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/parameter_schema.rb) + +Line 67. diff --git a/fern/products/sdk-reference/ruby/signal-wire/swaig/record-direction/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/swaig/record-direction/index.mdx new file mode 100644 index 0000000000..accaa72c9a --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/swaig/record-direction/index.mdx @@ -0,0 +1,46 @@ +--- +slug: "/reference/ruby/signal-wire/swaig/record-direction" +title: "RecordDirection" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "module" + language: "ruby" + qualified_name: "SignalWire::Swaig::RecordDirection" + parent: "SignalWire::Swaig" + module: "SignalWire.Swaig" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb" + visibility: "public" +--- +# `RecordDirection` + +Channel selection for the +record\_call+ verb. + +DISTINCT from \{TapDirection\}: record uses +listen+, tap uses +hear+. +Never share a constant between the two — Python validates two +different lists, and conflating them is a known bug generator. + +## Signature + +```ruby +module RecordDirection +``` + +## Constants + + + Every valid +record\_call+ direction, in wire order. + + + + + + + + +## Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 44. diff --git a/fern/products/sdk-reference/ruby/signal-wire/swaig/record-format/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/swaig/record-format/index.mdx new file mode 100644 index 0000000000..abae07c1e0 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/swaig/record-format/index.mdx @@ -0,0 +1,42 @@ +--- +slug: "/reference/ruby/signal-wire/swaig/record-format" +title: "RecordFormat" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "module" + language: "ruby" + qualified_name: "SignalWire::Swaig::RecordFormat" + parent: "SignalWire::Swaig" + module: "SignalWire.Swaig" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb" + visibility: "public" +--- +# `RecordFormat` + +Audio container format for the +record\_call+ verb. + +## Signature + +```ruby +module RecordFormat +``` + +## Constants + + + Every valid +record\_call+ format, in wire order. + + + + + + + + +## Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 30. diff --git a/fern/products/sdk-reference/ruby/signal-wire/swaig/tap-direction/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/swaig/tap-direction/index.mdx new file mode 100644 index 0000000000..f932500516 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/swaig/tap-direction/index.mdx @@ -0,0 +1,46 @@ +--- +slug: "/reference/ruby/signal-wire/swaig/tap-direction" +title: "TapDirection" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "module" + language: "ruby" + qualified_name: "SignalWire::Swaig::TapDirection" + parent: "SignalWire::Swaig" + module: "SignalWire.Swaig" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb" + visibility: "public" +--- +# `TapDirection` + +Channel selection for the +tap+ verb. + +DISTINCT from \{RecordDirection\}: tap uses +hear+, record uses ++listen+. Also distinct from the RELAY play/record/tap direction +vocabulary. Never unify. + +## Signature + +```ruby +module TapDirection +``` + +## Constants + + + Every valid +tap+ direction, in wire order. + + + + + + + + +## Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 58. diff --git a/fern/products/sdk-reference/ruby/signal-wire/swml/document/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/swml/document/index.mdx new file mode 100644 index 0000000000..53e8b0bc64 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/swml/document/index.mdx @@ -0,0 +1,283 @@ +--- +slug: "/reference/ruby/signal-wire/swml/document" +title: "Document" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::SWML::Document" + parent: "SignalWire::SWML" + module: "SignalWire.SWML" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/document.rb" + visibility: "public" +--- +# `Document` + +## Signature + +```ruby +class Document < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### add\_section + +Add a new named section. Returns true if created, false if it already exists. + +#### Signature + +```ruby +def add_section(name) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/swml/document.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/document.rb) + +Line 24. + +*** + +### add\_verb + +Append a verb to the _main_ section. + +add\_verb('answer', \{\}) +add\_verb('sleep', 2000) + +#### Signature + +```ruby +def add_verb(verb_name, config) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/swml/document.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/document.rb) + +Line 43. + +*** + +### add\_verb\_to\_section + +Append a verb to an arbitrary section. + +#### Signature + +```ruby +def add_verb_to_section(section, verb_name, config) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/swml/document.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/document.rb) + +Line 48. + +*** + +### get\_verbs + +Return the list of verb hashes for a section. + +#### Signature + +```ruby +def get_verbs(section = 'main') +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/swml/document.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/document.rb) + +Line 61. + +*** + +### has\_section? + +Check whether a section exists. + +#### Signature + +```ruby +def has_section?(name) +``` + +#### Parameters + + + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/swml/document.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/document.rb) + +Line 35. + +*** + +### initialize + +#### Signature + +```ruby +def initialize +``` + +#### Returns + +`Document` — a new instance of Document + +#### Source + +[`lib/signalwire/swml/document.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/document.rb) + +Line 10. + +*** + +### render + +Compact JSON string. + +#### Signature + +```ruby +def render +``` + +#### Source + +[`lib/signalwire/swml/document.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/document.rb) + +Line 74. + +*** + +### render\_pretty + +Pretty-printed JSON string. + +#### Signature + +```ruby +def render_pretty +``` + +#### Source + +[`lib/signalwire/swml/document.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/document.rb) + +Line 79. + +*** + +### reset + +Reset the document to its initial empty state. + +#### Signature + +```ruby +def reset +``` + +#### Source + +[`lib/signalwire/swml/document.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/document.rb) + +Line 17. + +*** + +### sections + +Returns the value of attribute sections. + +#### Signature + +```ruby +attr_reader sections -> Object +``` + +#### Source + +[`lib/signalwire/swml/document.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/document.rb) + +Line 8. + +*** + +### to\_h + +Produce a plain Ruby hash suitable for JSON serialization. + +#### Signature + +```ruby +def to_h +``` + +#### Source + +[`lib/signalwire/swml/document.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/document.rb) + +Line 66. + +*** + +### version + +Returns the value of attribute version. + +#### Signature + +```ruby +attr_reader version -> Object +``` + +#### Source + +[`lib/signalwire/swml/document.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/document.rb) + +Line 8. + +## Source + +[`lib/signalwire/swml/document.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/document.rb) + +Line 7. diff --git a/fern/products/sdk-reference/ruby/signal-wire/swml/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/swml/index.mdx new file mode 100644 index 0000000000..7fed482f30 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/swml/index.mdx @@ -0,0 +1,74 @@ +--- +slug: "/reference/ruby/signal-wire/swml" +title: "SWML" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "module" + language: "ruby" + qualified_name: "SignalWire::SWML" + parent: "SignalWire" + module: "SignalWire" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/schema.rb" + visibility: "public" +--- +# `SWML` + +## Signature + +```ruby +module SWML +``` + +## Classes + + + + + + + + + +## Methods + +### reset\_schema! + +Allow resetting for tests + +#### Signature + +```ruby +def reset_schema! +``` + +#### Source + +[`lib/signalwire/swml/schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/schema.rb) + +Line 77. + +*** + +### schema + +Module-level singleton so the schema is loaded at most once. + +#### Signature + +```ruby +def schema +``` + +#### Source + +[`lib/signalwire/swml/schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/schema.rb) + +Line 72. + +## Source + +[`lib/signalwire/swml/schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/schema.rb) + +Line 6. diff --git a/fern/products/sdk-reference/ruby/signal-wire/swml/schema/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/swml/schema/index.mdx new file mode 100644 index 0000000000..d5f0ee1483 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/swml/schema/index.mdx @@ -0,0 +1,154 @@ +--- +slug: "/reference/ruby/signal-wire/swml/schema" +title: "Schema" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::SWML::Schema" + parent: "SignalWire::SWML" + module: "SignalWire.SWML" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/schema.rb" + visibility: "public" +--- +# `Schema` + +## Signature + +```ruby +class Schema < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### get\_verb + +Return the full definition hash for a verb, or nil. + +#### Signature + +```ruby +def get_verb(name) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/swml/schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/schema.rb) + +Line 31. + +*** + +### initialize + +#### Signature + +```ruby +def initialize +``` + +#### Returns + +`Schema` — a new instance of Schema + +#### Source + +[`lib/signalwire/swml/schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/schema.rb) + +Line 10. + +*** + +### valid\_verb? + +Is +name+ a recognised SWML verb? + +#### Signature + +```ruby +def valid_verb?(name) +``` + +#### Parameters + + + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/swml/schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/schema.rb) + +Line 16. + +*** + +### verb\_count + +How many verbs are defined in the schema. + +#### Signature + +```ruby +def verb_count +``` + +#### Source + +[`lib/signalwire/swml/schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/schema.rb) + +Line 26. + +*** + +### verb\_names + +Sorted list of all known verb names. + +#### Signature + +```ruby +def verb_names +``` + +#### Source + +[`lib/signalwire/swml/schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/schema.rb) + +Line 21. + +*** + +### verbs + +Returns the value of attribute verbs. + +#### Signature + +```ruby +attr_reader verbs -> Object +``` + +#### Source + +[`lib/signalwire/swml/schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/schema.rb) + +Line 8. + +## Source + +[`lib/signalwire/swml/schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/schema.rb) + +Line 7. diff --git a/fern/products/sdk-reference/ruby/signal-wire/swml/service/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/swml/service/index.mdx new file mode 100644 index 0000000000..e657773ec5 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/swml/service/index.mdx @@ -0,0 +1,1005 @@ +--- +slug: "/reference/ruby/signal-wire/swml/service" +title: "Service" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::SWML::Service" + parent: "SignalWire::SWML" + module: "SignalWire.SWML" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb" + visibility: "public" +--- +# `Service` + +## Signature + +```ruby +class Service < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Constants + + + Maximum request body size enforced on /swaig and the main route (1 MB). + + +## Classes + + + + \------------------------------------------------------------------ Middleware: security headers ------------------------------------------------------------------ + + + + \------------------------------------------------------------------ Middleware: timing-safe Basic-Auth ------------------------------------------------------------------ + + + +## Methods + +### all\_functions + +\--- Idiomatic Ruby accessors/predicates (additive aliases) --- +def-wrappers (not alias\_method) so placement is independent of where +the get\_\* target is defined in the class body. + +#### Signature + +```ruby +def all_functions +``` + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 156. + +*** + +### basic\_auth\_credentials\_with\_source + +#### Signature + +```ruby +def basic_auth_credentials_with_source +``` + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 157. + +*** + +### config\_file + +Python parity: + +- `name`, `route`, `host`, `port` — surface from + SWMLService. +- `schema_path` — path to the SWML schema file (or nil to use + the gem-bundled default). +- `config_file` — optional TOML/YAML config file path. +- `schema_validation` — boolean flag mirroring Python's + `self._schema_validation`. `SWML_SKIP_SCHEMA_VALIDATION=1` + env var forces this to false. + +#### Signature + +```ruby +attr_reader config_file -> Object +``` + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 23. + +*** + +### define\_tool + +Define a SWAIG function the AI can call. Tool descriptions and +parameter descriptions are LLM-facing prompt engineering — see +PORTING\_GUIDE for guidance. + +#### Signature + +```ruby +def define_tool(name:, description:, parameters: {}, secure: false, &handler) +``` + +#### Parameters + + + + + + + + + + + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 98. + +*** + +### define\_tools + +Return an array of all tool definitions (for SWML rendering). + +#### Signature + +```ruby +def define_tools +``` + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 120. + +*** + +### document + +Expose the underlying document (useful for tests and subclasses). + +#### Signature + +```ruby +def document +``` + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 380. + +*** + +### execute\_verb + +Execute a SWML verb, adding it to the current document. + +For most verbs the config is a keyword-args Hash. +The +sleep+ verb is special: it also accepts a bare Integer. + +#### Signature + +```ruby +def execute_verb(verb_name, args = [], kwargs = {}) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 242. + +*** + +### function? + +Ruby `?`-predicate form of has\_function. + +#### Signature + +```ruby +def function?(name) +``` + +#### Parameters + + + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 159. + +*** + +### get\_basic\_auth\_credentials + +Get the configured basic-auth credentials. + +Python parity: `get_basic_auth_credentials(include_source=False)`. +When `include_source` is true, returns a 3-tuple `[user, +pass, source]` where `source` is one of `"environment"`, +`"auto-generated"`, or `"provided"`. Otherwise returns the +2-tuple `[user, pass]`. + +#### Signature + +```ruby +def get_basic_auth_credentials(include_source: false) +``` + +#### Parameters + + + +#### Returns + +`Array(String, String)` — or \[Array(String, String, String)] + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 277. + +*** + +### get\_full\_url + +Build the full URL for this service. + +get\_full\_url # => "http://0.0.0.0:3000/" +get\_full\_url(include\_auth: true) # => "http://user:pass@0.0.0.0:3000/" + +#### Signature + +```ruby +def get_full_url(include_auth: false) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 320. + +*** + +### get\_function + +Get a registered SWAIG function by name, or nil when absent. +(Python parity: ToolRegistry#get\_function.) + +#### Signature + +```ruby +def get_function(name) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 163. + +*** + +### handle\_additional\_route + +Extension point: register additional Rack routes after Service +mounts /health, /ready, /swaig, and the main route. AgentBase uses +this to add /post\_prompt, /debug\_events, /mcp. + +#### Signature + +```ruby +def handle_additional_route(_sub_path, _request_data, _env) +``` + +#### Parameters + + + + + + + +#### Returns + +`Array | nil` — A Rack response triple, or nil if not handled + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 216. + +*** + +### host + +Python parity: + +- `name`, `route`, `host`, `port` — surface from + SWMLService. +- `schema_path` — path to the SWML schema file (or nil to use + the gem-bundled default). +- `config_file` — optional TOML/YAML config file path. +- `schema_validation` — boolean flag mirroring Python's + `self._schema_validation`. `SWML_SKIP_SCHEMA_VALIDATION=1` + env var forces this to false. + +#### Signature + +```ruby +attr_reader host -> Object +``` + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 23. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(name:, route: '/', host: '0.0.0.0', port: nil, basic_auth: nil, schema_path: nil, config_file: nil, schema_validation: true) +``` + +#### Parameters + + + + + + + + + + + + + + + + + +#### Returns + +`Service` — a new instance of Service + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 34. + +*** + +### list\_tool\_names + +List registered SWAIG tool names in registration order. + +#### Signature + +```ruby +def list_tool_names +``` + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 141. + +*** + +### method\_missing + +*** + +#### Verb auto-vivification via method\_missing + +#### Signature + +```ruby +def method_missing(method_name, *args, **kwargs) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 224. + +*** + +### name + +Python parity: + +- `name`, `route`, `host`, `port` — surface from + SWMLService. +- `schema_path` — path to the SWML schema file (or nil to use + the gem-bundled default). +- `config_file` — optional TOML/YAML config file path. +- `schema_validation` — boolean flag mirroring Python's + `self._schema_validation`. `SWML_SKIP_SCHEMA_VALIDATION=1` + env var forces this to false. + +#### Signature + +```ruby +attr_reader name -> Object +``` + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 23. + +*** + +### on\_function\_call + +Dispatch a function call to the registered handler. Default plain +implementation — AgentBase overrides with token validation. + +#### Signature + +```ruby +def on_function_call(name, args, raw_data) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 127. + +*** + +### on\_request + +Customization hook called when SWML is requested. Default +delegates to \{#on\_swml\_request\} and returns its result. +Subclasses typically override +on\_swml\_request+ rather than +this method. + +Return +nil+ to use the default SWML rendering, or a Hash of +modifications to merge into the document. + +Python parity: WebMixin#on\_request(request\_data, callback\_path). +The Python third +request+ argument is FastAPI-specific and +intentionally not mirrored. +Python parity: `on_request(request_data, callback_path)`. The +third Python parameter (`request`) — a FastAPI `Request` — +is propagated through Ruby as the optional `request:` keyword +so subclasses can read query/header info when a Rack-style +request is available. Default: delegate to `on_swml_request`. + +#### Signature + +```ruby +def on_request(request_data = nil, callback_path = nil, request: nil) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 351. + +*** + +### on\_swml\_request + +Customization point for subclasses to modify SWML based on +request data. The default returns nil (no modification). + +Python parity: +`on_swml_request(request_data, callback_path, request)`. The +`request:` keyword carries the Rack request (or FastAPI +`Request` analogue) for subclasses that need query params +or headers. + +#### Signature + +```ruby +def on_swml_request(request_data = nil, callback_path = nil, request: nil) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 363. + +*** + +### port + +Python parity: + +- `name`, `route`, `host`, `port` — surface from + SWMLService. +- `schema_path` — path to the SWML schema file (or nil to use + the gem-bundled default). +- `config_file` — optional TOML/YAML config file path. +- `schema_validation` — boolean flag mirroring Python's + `self._schema_validation`. `SWML_SKIP_SCHEMA_VALIDATION=1` + env var forces this to false. + +#### Signature + +```ruby +attr_reader port -> Object +``` + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 23. + +*** + +### rack\_app + +Returns a Rack-compatible application. + +#### Signature + +```ruby +def rack_app +``` + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 399. + +*** + +### register\_routing\_callback + +*** + +#### Routing callbacks & request handling + +#### Signature + +```ruby +def register_routing_callback(path, &block) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 331. + +*** + +### register\_swaig\_function + +Register a raw SWAIG function definition (e.g. from DataMap#to\_swaig\_function). + +#### Signature + +```ruby +def register_swaig_function(func_def) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 112. + +*** + +### remove\_function + +Remove a registered SWAIG function. Returns true on success, +false when the function was not registered. +(Python parity: ToolRegistry#remove\_function.) + +#### Signature + +```ruby +def remove_function(name) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 181. + +*** + +### render + +*** + +#### Render the current SWML document + +#### Signature + +```ruby +def render +``` + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 371. + +*** + +### render\_main\_swml + +Extension point: handle GET /swaig (returns the SWML document by +default). AgentBase overrides to render with prompts + dynamic config. + +#### Signature + +```ruby +def render_main_swml(_request_data = nil, request: nil) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 204. + +*** + +### render\_pretty + +#### Signature + +```ruby +def render_pretty +``` + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 375. + +*** + +### respond\_to\_missing? + +#### Signature + +```ruby +def respond_to_missing?(method_name, include_private = false) +``` + +#### Parameters + + + + + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 234. + +*** + +### route + +Python parity: + +- `name`, `route`, `host`, `port` — surface from + SWMLService. +- `schema_path` — path to the SWML schema file (or nil to use + the gem-bundled default). +- `config_file` — optional TOML/YAML config file path. +- `schema_validation` — boolean flag mirroring Python's + `self._schema_validation`. `SWML_SKIP_SCHEMA_VALIDATION=1` + env var forces this to false. + +#### Signature + +```ruby +attr_reader route -> Object +``` + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 23. + +*** + +### schema\_path + +Python parity: + +- `name`, `route`, `host`, `port` — surface from + SWMLService. +- `schema_path` — path to the SWML schema file (or nil to use + the gem-bundled default). +- `config_file` — optional TOML/YAML config file path. +- `schema_validation` — boolean flag mirroring Python's + `self._schema_validation`. `SWML_SKIP_SCHEMA_VALIDATION=1` + env var forces this to false. + +#### Signature + +```ruby +attr_reader schema_path -> Object +``` + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 23. + +*** + +### schema\_utils + +SchemaUtils helper bound to this Service. Mirrors Python's +self.schema\_utils public instance attribute on SWMLService. +Built lazily on first access. + +#### Signature + +```ruby +def schema_utils +``` + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 387. + +*** + +### schema\_validation + +Python parity: + +- `name`, `route`, `host`, `port` — surface from + SWMLService. +- `schema_path` — path to the SWML schema file (or nil to use + the gem-bundled default). +- `config_file` — optional TOML/YAML config file path. +- `schema_validation` — boolean flag mirroring Python's + `self._schema_validation`. `SWML_SKIP_SCHEMA_VALIDATION=1` + env var forces this to false. + +#### Signature + +```ruby +attr_reader schema_validation -> Object +``` + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 23. + +*** + +### serve + +Start serving (blocking). + +Python parity: +`serve(host=None, port=None, ssl_cert=None, ssl_key=None, +ssl_enabled=None, domain=None)`. When SSL parameters are +supplied the server is started with HTTPS bindings; otherwise +plain HTTP. `host`/`port` overrides default to the +constructor-provided values. + +#### Signature + +```ruby +def serve(host: nil, port: nil, ssl_cert: nil, ssl_key: nil, ssl_enabled: nil, domain: nil) +``` + +#### Parameters + + + + + + + + + + + + + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 418. + +*** + +### stop + +Gracefully stop the server. + +#### Signature + +```ruby +def stop +``` + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 465. + +*** + +### swaig\_pre\_dispatch + +Extension point: invoked between argument parsing and function +dispatch on POST /swaig. Returns \[target, short\_circuit]. If +short\_circuit is non-nil, it's returned as the SWAIG response +without calling on\_function\_call. AgentBase overrides to add +session-token validation and ephemeral dynamic-config copies. + +#### Signature + +```ruby +def swaig_pre_dispatch(_request_data, _func_name, _env) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 198. + +*** + +### validate\_basic\_auth + +Validate provided basic-auth credentials against the configured ones +using a constant-time comparison. +Python parity: AuthMixin#validate\_basic\_auth(username, password). + +#### Signature + +```ruby +def validate_basic_auth(username, password) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 297. + +## Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 13. diff --git a/fern/products/sdk-reference/ruby/signal-wire/swml/service/security-headers-middleware/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/swml/service/security-headers-middleware/index.mdx new file mode 100644 index 0000000000..cd307d28fd --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/swml/service/security-headers-middleware/index.mdx @@ -0,0 +1,90 @@ +--- +slug: "/reference/ruby/signal-wire/swml/service/security-headers-middleware" +title: "SecurityHeadersMiddleware" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::SWML::Service::SecurityHeadersMiddleware" + parent: "SignalWire::SWML::Service" + module: "SignalWire.SWML.Service" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb" + visibility: "public" +--- +# `SecurityHeadersMiddleware` + +*** + +## Middleware: security headers + +## Signature + +```ruby +class SecurityHeadersMiddleware < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Constants + + + +## Methods + +### call + +#### Signature + +```ruby +def call(env) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 633. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(app) +``` + +#### Parameters + + + +#### Returns + +`SecurityHeadersMiddleware` — a new instance of SecurityHeadersMiddleware + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 629. + +## Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 622. diff --git a/fern/products/sdk-reference/ruby/signal-wire/swml/service/timing-safe-basic-auth/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/swml/service/timing-safe-basic-auth/index.mdx new file mode 100644 index 0000000000..06eeaae48f --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/swml/service/timing-safe-basic-auth/index.mdx @@ -0,0 +1,82 @@ +--- +slug: "/reference/ruby/signal-wire/swml/service/timing-safe-basic-auth" +title: "TimingSafeBasicAuth" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::SWML::Service::TimingSafeBasicAuth" + parent: "SignalWire::SWML::Service" + module: "SignalWire.SWML.Service" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb" + visibility: "public" +--- +# `TimingSafeBasicAuth` + +*** + +## Middleware: timing-safe Basic-Auth + +## Signature + +```ruby +class TimingSafeBasicAuth < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### call + +#### Signature + +```ruby +def call(env) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 649. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(app, service) +``` + +#### Parameters + + + + + +#### Returns + +`TimingSafeBasicAuth` — a new instance of TimingSafeBasicAuth + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 644. + +## Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 643. diff --git a/fern/products/sdk-reference/ruby/signal-wire/utils/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/utils/index.mdx new file mode 100644 index 0000000000..d56848d986 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/utils/index.mdx @@ -0,0 +1,66 @@ +--- +slug: "/reference/ruby/signal-wire/utils" +title: "Utils" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "module" + language: "ruby" + qualified_name: "SignalWire::Utils" + parent: "SignalWire" + module: "SignalWire" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/serverless.rb" + visibility: "public" +--- +# `Utils` + +## Signature + +```ruby +module Utils +``` + +## Classes + + + + SchemaUtils — Ruby port of signalwire.utils.schema\_utils.SchemaUtils. + + + + SchemaValidationError — Ruby port of signalwire.utils.schema\_utils.SchemaValidationError. + + + +## Modules + + + + SSRF-prevention guard for user-supplied URLs. + + + +## Methods + +### serverless? + +Idiomatic Ruby `?`-predicate alias of is\_serverless\_mode. + +#### Signature + +```ruby +def serverless? +``` + +#### Source + +[`lib/signalwire/utils/serverless.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/serverless.rb) + +Line 22. + +## Source + +[`lib/signalwire/utils/serverless.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/serverless.rb) + +Line 11. diff --git a/fern/products/sdk-reference/ruby/signal-wire/utils/schema-utils/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/utils/schema-utils/index.mdx new file mode 100644 index 0000000000..2b9c549349 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/utils/schema-utils/index.mdx @@ -0,0 +1,352 @@ +--- +slug: "/reference/ruby/signal-wire/utils/schema-utils" +title: "SchemaUtils" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Utils::SchemaUtils" + parent: "SignalWire::Utils" + module: "SignalWire.Utils" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/schema_utils.rb" + visibility: "public" +--- +# `SchemaUtils` + +SchemaUtils — Ruby port of signalwire.utils.schema\_utils.SchemaUtils. + +Loads the SWML JSON Schema, extracts verb metadata, and validates +either a single verb config or a complete SWML document. + +Construction rules mirror Python: + +- Pass schema\_path: nil to use the bundled schema.json. +- schema\_validation: false disables validation (validate\_verb returns + true for every call). +- The env var SWML\_SKIP\_SCHEMA\_VALIDATION=1/true/yes also disables + validation regardless of the constructor argument. + +The Ruby port currently ships only the lightweight validator (verb +existence + required-property check). Full JSON Schema validation +can be wired in via the `json_schemer` gem by extending +init\_full\_validator. The lightweight contract matches Python's +\_validate\_verb\_lightweight() exactly. + +## Signature + +```ruby +class SchemaUtils < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### full\_validation\_available? + +Whether full JSON Schema validation is wired up. +Mirrors Python's full\_validation\_available property. + +#### Signature + +```ruby +def full_validation_available? +``` + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/utils/schema_utils.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/schema_utils.rb) + +Line 70. + +*** + +### generate\_method\_body + +Generate a Python-style method body string for a verb. +Mirrors Python's generate\_method\_body(verb\_name). + +#### Signature + +```ruby +def generate_method_body(verb_name) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/utils/schema_utils.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/schema_utils.rb) + +Line 188. + +*** + +### generate\_method\_signature + +Generate a Python-style method signature string for a verb. +Mirrors Python's generate\_method\_signature(verb\_name). + +#### Signature + +```ruby +def generate_method_signature(verb_name) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/utils/schema_utils.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/schema_utils.rb) + +Line 159. + +*** + +### get\_all\_verb\_names + +Sorted list of all known verb names. +Mirrors Python's get\_all\_verb\_names(). + +#### Signature + +```ruby +def get_all_verb_names +``` + +#### Source + +[`lib/signalwire/utils/schema_utils.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/schema_utils.rb) + +Line 87. + +*** + +### get\_verb\_parameters + +Parameter-definition block used by code-gen tooling. +Mirrors Python's get\_verb\_parameters(verb\_name). + +#### Signature + +```ruby +def get_verb_parameters(verb_name) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/utils/schema_utils.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/schema_utils.rb) + +Line 118. + +*** + +### get\_verb\_properties + +The properties\[verb\_name] block for a verb, or \{\} when unknown. +Mirrors Python's get\_verb\_properties(verb\_name). + +#### Signature + +```ruby +def get_verb_properties(verb_name) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/utils/schema_utils.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/schema_utils.rb) + +Line 93. + +*** + +### get\_verb\_required\_properties + +The required list for a verb, or \[] when unknown / no required. +Mirrors Python's get\_verb\_required\_properties(verb\_name). + +#### Signature + +```ruby +def get_verb_required_properties(verb_name) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/utils/schema_utils.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/schema_utils.rb) + +Line 108. + +*** + +### initialize + +Construct a SchemaUtils. + +#### Signature + +```ruby +def initialize(schema_path = nil, schema_validation = true) +``` + +#### Parameters + + + path to a schema.json file; nil for the bundled copy at lib/signalwire/swml/schema.json. + + + + enable/disable schema validation. + + +#### Returns + +`SchemaUtils` — a new instance of SchemaUtils + +#### Source + +[`lib/signalwire/utils/schema_utils.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/schema_utils.rb) + +Line 58. + +*** + +### load\_schema + +Read and parse the JSON Schema. Mirrors Python's load\_schema(). + +#### Signature + +```ruby +def load_schema +``` + +#### Source + +[`lib/signalwire/utils/schema_utils.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/schema_utils.rb) + +Line 75. + +*** + +### schema + +#### Signature + +```ruby +attr_reader schema -> Hash{String=>Object} +``` + +#### Returns + +`Hash{String=>Object}` — parsed JSON Schema document + +#### Source + +[`lib/signalwire/utils/schema_utils.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/schema_utils.rb) + +Line 48. + +*** + +### schema\_path + +#### Signature + +```ruby +attr_reader schema_path -> String | nil +``` + +#### Returns + +`String | nil` — resolved schema path (nil = embedded default) + +#### Source + +[`lib/signalwire/utils/schema_utils.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/schema_utils.rb) + +Line 51. + +*** + +### validate\_document + +Validate a complete SWML document. +Mirrors Python's validate\_document(document). Returns +(false, \['Schema validator not initialized']) when no full +validator is wired in. + +#### Signature + +```ruby +def validate_document(document) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/utils/schema_utils.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/schema_utils.rb) + +Line 148. + +*** + +### validate\_verb + +Validate a verb config against the schema. +Mirrors Python's validate\_verb(verb\_name, verb\_config). + +#### Signature + +```ruby +def validate_verb(verb_name, verb_config) +``` + +#### Parameters + + + + + +#### Returns + +`Array(Boolean, Array)` — (valid, errors) tuple. + +#### Source + +[`lib/signalwire/utils/schema_utils.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/schema_utils.rb) + +Line 130. + +## Source + +[`lib/signalwire/utils/schema_utils.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/schema_utils.rb) + +Line 46. diff --git a/fern/products/sdk-reference/ruby/signal-wire/utils/schema-validation-error/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/utils/schema-validation-error/index.mdx new file mode 100644 index 0000000000..c750026492 --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/utils/schema-validation-error/index.mdx @@ -0,0 +1,102 @@ +--- +slug: "/reference/ruby/signal-wire/utils/schema-validation-error" +title: "SchemaValidationError" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Utils::SchemaValidationError" + parent: "SignalWire::Utils" + module: "SignalWire.Utils" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/schema_utils.rb" + visibility: "public" +--- +# `SchemaValidationError` + +SchemaValidationError — Ruby port of +signalwire.utils.schema\_utils.SchemaValidationError. + +Raised when SWML schema validation of a verb config fails. + +## Signature + +```ruby +class SchemaValidationError < StandardError +``` + +## Inheritance + +**Extends:** `StandardError` + +## Methods + +### errors + +Returns the value of attribute errors. + +#### Signature + +```ruby +attr_reader errors -> Object +``` + +#### Source + +[`lib/signalwire/utils/schema_utils.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/schema_utils.rb) + +Line 17. + +*** + +### initialize + +Construct a SchemaValidationError. Mirrors Python's +SchemaValidationError(verb\_name, errors). + +#### Signature + +```ruby +def initialize(verb_name, errors) +``` + +#### Parameters + + + + + +#### Returns + +`SchemaValidationError` — a new instance of SchemaValidationError + +#### Source + +[`lib/signalwire/utils/schema_utils.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/schema_utils.rb) + +Line 21. + +*** + +### verb\_name + +Returns the value of attribute verb\_name. + +#### Signature + +```ruby +attr_reader verb_name -> Object +``` + +#### Source + +[`lib/signalwire/utils/schema_utils.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/schema_utils.rb) + +Line 17. + +## Source + +[`lib/signalwire/utils/schema_utils.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/schema_utils.rb) + +Line 16. diff --git a/fern/products/sdk-reference/ruby/signal-wire/utils/url-validator/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/utils/url-validator/index.mdx new file mode 100644 index 0000000000..7989be4aad --- /dev/null +++ b/fern/products/sdk-reference/ruby/signal-wire/utils/url-validator/index.mdx @@ -0,0 +1,131 @@ +--- +slug: "/reference/ruby/signal-wire/utils/url-validator" +title: "UrlValidator" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "module" + language: "ruby" + qualified_name: "SignalWire::Utils::UrlValidator" + parent: "SignalWire::Utils" + module: "SignalWire.Utils" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/url_validator.rb" + visibility: "public" +--- +# `UrlValidator` + +SSRF-prevention guard for user-supplied URLs. + +Mirrors Python's signalwire.utils.url\_validator.validate\_url: +rejects non-http(s) schemes, missing hostnames, and any URL whose +hostname resolves to a private / loopback / link-local / cloud- +metadata IP. When +allow\_private+ is true, OR the ++SWML\_ALLOW\_PRIVATE\_URLS+ env var is set to "1", "true" or "yes" +(case-insensitive), the IP-blocklist check is skipped. + +The method UrlValidator.validate\_url projects onto the Python free +function signalwire.utils.url\_validator.validate\_url via +scripts/enumerate\_signatures.py. + +## Signature + +```ruby +module UrlValidator +``` + +## Constants + + + Cross-port SSRF block list. Order matches the Python reference. + + + + +## Methods + +### \_resolver + +Pluggable resolver hook. Tests inject a lambda to keep the suite +hermetic; production calls Resolv.getaddresses. Underscore prefix +keeps it out of the public surface inventory — the Python +reference only exposes `validate_url` at this module level. + +#### Signature + +```ruby +def _resolver +``` + +#### Source + +[`lib/signalwire/utils/url_validator.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/url_validator.rb) + +Line 48. + +*** + +### \_resolver= + +#### Signature + +```ruby +def _resolver=(value) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/utils/url_validator.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/url_validator.rb) + +Line 52. + +*** + +### validate\_url + +Validate that a URL is safe to fetch. + +#### Signature + +```ruby +def validate_url(url, allow_private = false) +``` + +#### Parameters + + + URL to validate + + + + when true, bypass the IP-blocklist check + + +#### Returns + +`Boolean` — true if the URL is safe to fetch + +#### Source + +[`lib/signalwire/utils/url_validator.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/url_validator.rb) + +Line 61. + +## Source + +[`lib/signalwire/utils/url_validator.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/url_validator.rb) + +Line 28. diff --git a/fern/products/sdk-reference/rust/_meta.json b/fern/products/sdk-reference/rust/_meta.json new file mode 100644 index 0000000000..6e2f0cb58f --- /dev/null +++ b/fern/products/sdk-reference/rust/_meta.json @@ -0,0 +1,10 @@ +{ + "language": "rust", + "sdk_name": "signalwire (Rust)", + "version": "1.1.2", + "source_repo": "https://github.com/signalwire/signalwire-rust", + "format": "mdx", + "platform": "fern", + "base_slug": "/reference/rust", + "item_count": 1898 +} \ No newline at end of file diff --git a/fern/products/sdk-reference/rust/index.mdx b/fern/products/sdk-reference/rust/index.mdx new file mode 100644 index 0000000000..8478858ca0 --- /dev/null +++ b/fern/products/sdk-reference/rust/index.mdx @@ -0,0 +1,15 @@ +--- +title: "Rust SDK" +slug: "/reference/rust" +lustri: + auto_generated: true + language: "rust" + kind: "sdk" +--- +# Rust SDK Reference +Version: **1.1.2** + +## Modules + +- [`signalwire`](/docs/sdk-reference/reference/rust/signalwire) + diff --git a/fern/products/sdk-reference/rust/signalwire/agent/agent-base/agent-base/index.mdx b/fern/products/sdk-reference/rust/signalwire/agent/agent-base/agent-base/index.mdx new file mode 100644 index 0000000000..13b5c7abfa --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/agent/agent-base/agent-base/index.mdx @@ -0,0 +1,2140 @@ +--- +slug: "/reference/rust/signalwire/agent/agent-base/agent-base" +title: "AgentBase" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::agent::agent_base::AgentBase" + parent: "signalwire::agent::agent_base" + module: "agent.agent_base" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs" + visibility: "public" +--- +# `AgentBase` + +Core agent that extends `Service` with AI-specific capabilities. + +Manages prompt configuration, tool registration, SWML rendering, +and HTTP request handling for AI agent endpoints. + +AgentBase implements `Deref` (Rust's idiomatic +equivalent of inheritance) so `Service` methods like `set_route`, +`define_tool`, `on_function_call`, etc. are usable on `AgentBase` +instances directly without needing forwarding wrappers. + +## Signature + +```rust +struct AgentBase { /* fields */ } +``` + +## Inheritance + +**Implements:** `Clone`, `Deref`, `DerefMut` + +## Constants + + + The complete set of internal SWAIG function names that accept fillers, matching the SWAIGInternalFiller schema definition. Any name outside this set is silently ignored by the runtime — \[`Self::set_internal_fillers_map`] and \[`Self::add_internal_filler_for`] warn if you pass an unknown name. Notable absences: `change_step`, `gather_submit`, and arbitrary user-defined SWAIG function names are NOT supported. + + +## Methods + +### add\_function\_include + +#### Signature + +```rust +fn add_function_include(&mut self, include: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 949. + +*** + +### add\_hint + +#### Signature + +```rust +fn add_hint(&mut self, hint: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 710. + +*** + +### add\_hints + +#### Signature + +```rust +fn add_hints(&mut self, hints: ?<&str>) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 715. + +*** + +### add\_internal\_filler + +#### Signature + +```rust +fn add_internal_filler(&mut self, filler: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 911. + +*** + +### add\_internal\_filler\_for + +Add internal fillers for a single internal function and language. + +See \[`Self::set_internal_fillers_map`] for the complete list of +supported `function_name` values +(\[`Self::SUPPORTED_INTERNAL_FILLER_NAMES`]) and what fillers do. +Names outside the supported set log a warning. + +#### Signature + +```rust +fn add_internal_filler_for( + &mut self, + function_name: &str, + language_code: &str, + fillers: ? +) -> &mut Self +``` + +#### Parameters + + + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 922. + +*** + +### add\_language + +#### Signature + +```rust +fn add_language(&mut self, name: &str, code: &str, voice: &str) -> &mut Self +``` + +#### Parameters + + + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 727. + +*** + +### add\_pattern\_hint + +#### Signature + +```rust +fn add_pattern_hint(&mut self, pattern: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 722. + +*** + +### add\_post\_ai\_verb + +#### Signature + +```rust +fn add_post_ai_verb(&mut self, verb: &str, config: ?) -> &mut Self +``` + +#### Parameters + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 987. + +*** + +### add\_post\_answer\_verb + +#### Signature + +```rust +fn add_post_answer_verb(&mut self, verb: &str, config: ?) -> &mut Self +``` + +#### Parameters + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 982. + +*** + +### add\_pre\_answer\_verb + +#### Signature + +```rust +fn add_pre_answer_verb(&mut self, verb: &str, config: ?) -> &mut Self +``` + +#### Parameters + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 977. + +*** + +### add\_pronunciation + +#### Signature + +```rust +fn add_pronunciation( + &mut self, + replace: &str, + with: &str, + ignore: &str +) -> &mut Self +``` + +#### Parameters + + + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 789. + +*** + +### add\_skill + +#### Signature + +```rust +fn add_skill(&mut self, name: &str, params: ?) -> &mut Self +``` + +#### Parameters + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 1063. + +*** + +### add\_swaig\_query\_params + +#### Signature + +```rust +fn add_swaig_query_params(&mut self, params: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 1170. + +*** + +### build\_ai\_verb + +Build the AI verb configuration block. + +#### Signature + +```rust +fn build_ai_verb(&self, headers: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 1282. + +*** + +### clear\_post\_ai\_verbs + +#### Signature + +```rust +fn clear_post_ai_verbs(&mut self) -> &mut Self +``` + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 1002. + +*** + +### clear\_post\_answer\_verbs + +#### Signature + +```rust +fn clear_post_answer_verbs(&mut self) -> &mut Self +``` + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 997. + +*** + +### clear\_pre\_answer\_verbs + +#### Signature + +```rust +fn clear_pre_answer_verbs(&mut self) -> &mut Self +``` + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 992. + +*** + +### clear\_swaig\_query\_params + +#### Signature + +```rust +fn clear_swaig_query_params(&mut self) -> &mut Self +``` + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 1177. + +*** + +### clone + +#### Signature + +```rust +fn clone(&self) -> Self +``` + +#### Returns + +`Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 254. + +*** + +### clone\_for\_request + +Create a deep copy of this agent for per-request customisation. + +#### Signature + +```rust +fn clone_for_request(&self) -> Self +``` + +#### Returns + +`Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 1504. + +*** + +### create\_tool\_token + +Mint a per-call SWAIG-function token via the agent's SessionManager. + +Python parity: `state_mixin.StateMixin._create_tool_token` — +delegates to `SessionManager::create_token` and returns `String::new()` +on failure (Python catches all exceptions and returns ""). + +#### Signature + +```rust +fn create_tool_token(&self, tool_name: &str, call_id: &str) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 426. + +*** + +### define\_contexts + +Return the ContextBuilder, creating it lazily on first access. + +The builder's tool-name supplier is set to a snapshot of the +currently registered tool names so \[`ContextBuilder::validate`] +can check for collisions with reserved native tool names +(`next_step`, `change_context`, `gather_submit`). Tools added to +the agent after the first `define_contexts()` call will not be +included in that snapshot — call \[`AgentBase::refresh_context_tools`] +to update it, or call `define_contexts` only after defining all +tools. + +#### Signature + +```rust +fn define_contexts(&mut self) -> &mut ? +``` + +#### Returns + +`&mut ?` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 1021. + +*** + +### define\_tools + +Register a SWAIG tool (function) that the AI can invoke during a +call. + +### How this becomes a tool the model sees + +A SWAIG function is **exactly the same concept** as a "tool" in +native OpenAI / Anthropic tool calling. On every LLM turn, the +SDK renders each registered SWAIG function into the OpenAI tool +schema: + +```text +{ + "type": "function", + "function": { + "name": "your_name_here", + "description": "your description text", + "parameters": { ... your JSON schema ... } + } +} +``` + +That schema is sent to the model as part of the same API call +that produces the next assistant message. The model reads: + +- the function `description` to decide WHEN to call this tool +- each parameter `description` (inside `parameters`) to decide + HOW to fill in that argument from the user's utterance + +This means **descriptions are prompt engineering**, not developer +comments. A vague description is the #1 cause of "the model has +the right tool but doesn't call it" failures. + +### Bad vs good descriptions + +```text +BAD : description: "Lookup function" +GOOD: description: "Look up a customer's account details by " + + "account number. Use this BEFORE quoting any " + + "account-specific info (balance, plan, status). " + + "Do not use for general product questions." + +BAD : parameters: json!({"id": {"type": "string", "description": "the id"}}) +GOOD: parameters: json!({"account_number": {"type": "string", + "description": "The customer's 8-digit account number, " + "no dashes or spaces. Ask the user if they " + "don't provide it."}}) +``` + +### Tool count matters + +LLM tool selection accuracy degrades past ~7-8 +simultaneously-active tools per call. Use +\[`crate::contexts::Step::set_functions`] to partition tools +across steps so only the relevant subset is active at any moment. +Convenience: register multiple raw SWAIG function descriptors. +Wraps the inherited `register_swaig_function` for each. + +#### Signature + +```rust +fn define_tools(&mut self, tool_defs: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Examples + + + + ```rust + { + "type": "function", + "function": { + "name": "your_name_here", + "description": "your description text", + "parameters": { ... your JSON schema ... } + } + } + ``` + + + + ```rust + BAD : description: "Lookup function" + GOOD: description: "Look up a customer's account details by " + + "account number. Use this BEFORE quoting any " + + "account-specific info (balance, plan, status). " + + "Do not use for general product questions." + + BAD : parameters: json!({"id": {"type": "string", "description": "the id"}}) + GOOD: parameters: json!({"account_number": {"type": "string", + "description": "The customer's 8-digit account number, " + "no dashes or spaces. Ask the user if they " + "don't provide it."}}) + ``` + + + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 699. + +*** + +### deref + +#### Signature + +```rust +fn deref(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 316. + +*** + +### deref\_mut + +#### Signature + +```rust +fn deref_mut(&mut self) -> &mut ? +``` + +#### Returns + +`&mut ?` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 322. + +*** + +### enable\_debug\_events + +#### Signature + +```rust +fn enable_debug_events(&mut self, level: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 944. + +*** + +### enable\_sip\_routing + +#### Signature + +```rust +fn enable_sip_routing(&mut self) -> &mut Self +``` + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 1206. + +*** + +### get\_basic\_auth\_credentials + +Return `(user, password)` for the agent's basic auth. + +#### Signature + +```rust +fn get_basic_auth_credentials(&self) -> (?, ?) +``` + +#### Returns + +`(?, ?)` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 1712. + +*** + +### get\_contexts + +Returns the contexts dictionary as a serialised `Value::Object`, +or `None` when no contexts have been defined yet. + +Mirrors Python's `PromptManager.get_contexts` which returns the +contexts dict or `None`. + +#### Signature + +```rust +fn get_contexts(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 629. + +*** + +### get\_language\_params + +Read the per-language `params` dict for a previously-added +language. Mirrors Python's `AIConfigMixin.get_language_params`. + +Returns `Some(&Value)` (always a JSON object) when params were set, +`None` otherwise — including when the language code is unknown. +No error path. + +#### Signature + +```rust +fn get_language_params(&self, code: &str) -> ?<&?> +``` + +#### Parameters + + + +#### Returns + +`?<&?>` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 775. + +*** + +### get\_post\_prompt + +Returns the post-prompt text whatever `set_post_prompt` stored, or +`None` when no post-prompt has been set. + +Mirrors Python's `PromptManager.get_post_prompt` / +`PromptMixin.get_post_prompt` — used by SWML rendering when a +post-prompt is configured. + +#### Signature + +```rust +fn get_post_prompt(&self) -> ?<&str> +``` + +#### Returns + +`?<&str>` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 590. + +*** + +### get\_prompt + +Return the prompt payload: POM array if enabled and populated, otherwise raw text. + +#### Signature + +```rust +fn get_prompt(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 548. + +*** + +### get\_raw\_prompt + +Returns the raw prompt text whatever `set_prompt_text` stored, or +`None` when no raw prompt has been set. Distinct from `get_prompt` +which may return the POM array when `use_pom` is `true`. + +Mirrors Python's `PromptManager.get_raw_prompt`. + +#### Signature + +```rust +fn get_raw_prompt(&self) -> ?<&str> +``` + +#### Returns + +`?<&str>` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 603. + +*** + +### handle\_request + +Handle an HTTP request. Overrides the service handler with agent-specific +logic for SWML, SWAIG dispatch, and post-prompt callbacks. + +#### Signature + +```rust +fn handle_request( + &self, + method: &str, + path: &str, + headers: &?, + body: &str +) -> (u16, ?, ?) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`(u16, ?, ?)` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 1391. + +*** + +### has\_skill + +#### Signature + +```rust +fn has_skill(&self, name: &str) -> bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 1135. + +*** + +### list\_skills + +#### Signature + +```rust +fn list_skills(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 1131. + +*** + +### list\_tool\_names + +Return the names of every registered SWAIG tool in insertion order. + +#### Signature + +```rust +fn list_tool_names(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 1044. + +*** + +### manual\_set\_proxy\_url + +#### Signature + +```rust +fn manual_set_proxy_url(&mut self, url: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 1165. + +*** + +### new + +#### Signature + +```rust +fn new(options: ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 328. + +*** + +### on\_debug\_event + +#### Signature + +```rust +fn on_debug_event(&mut self, callback: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 1192. + +*** + +### on\_summary + +#### Signature + +```rust +fn on_summary(&mut self, callback: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 1182. + +*** + +### pom + +Read-only snapshot of the agent's POM as a typed +\[`PromptObjectModel`]. + +Python parity: `agent.pom` instance attribute (agent\_base.py +line 209). Returns `None` when `use_pom` is `false` (mirroring +Python's `self.pom = None`); otherwise returns a freshly built +\[`PromptObjectModel`] populated from the agent's stored +section list. + +Returning a typed POM (rather than the raw `Vec`) lets +callers reach for `render_markdown` / `render_xml` / `to_json` +directly without re-implementing the renderers — matching +Python's `agent.pom.render_markdown()` ergonomics. + +#### Signature + +```rust +fn pom(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 569. + +*** + +### prompt\_add\_section + +Add a top-level POM section with an optional body and bullets. + +#### Signature + +```rust +fn prompt_add_section( + &mut self, + title: &str, + body: &str, + bullets: ?<&str> +) -> &mut Self +``` + +#### Parameters + + + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 462. + +*** + +### prompt\_add\_subsection + +Add a subsection nested under an existing parent section. + +#### Signature + +```rust +fn prompt_add_subsection( + &mut self, + parent_title: &str, + title: &str, + body: &str +) -> &mut Self +``` + +#### Parameters + + + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 480. + +*** + +### prompt\_add\_to\_section + +Append body text and/or bullets to an existing section. + +#### Signature + +```rust +fn prompt_add_to_section( + &mut self, + title: &str, + body: ?<&str>, + bullets: ?<&str> +) -> &mut Self +``` + +#### Parameters + + + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 503. + +*** + +### prompt\_has\_section + +Check whether a POM section with the given title exists. + +#### Signature + +```rust +fn prompt_has_section(&self, title: &str) -> bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 538. + +*** + +### refresh\_context\_tools + +Refresh the ContextBuilder's tool-name supplier with the current +list of registered SWAIG tools. Call this if you define new tools +after the first `define_contexts()` call and want the next +`validate()` to see them. + +#### Signature + +```rust +fn refresh_context_tools(&mut self) -> &mut Self +``` + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 1035. + +*** + +### register\_sip\_username + +#### Signature + +```rust +fn register_sip_username(&mut self, username: &str, route: &str) -> &mut Self +``` + +#### Parameters + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 1211. + +*** + +### remove\_skill + +#### Signature + +```rust +fn remove_skill(&mut self, name: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 1126. + +*** + +### render\_swml + +Build the complete SWML document for a request. + +Phases: + +1. Pre-answer verbs +2. Answer verb (if auto\_answer) +3. Record call verb (if record\_call) +4. Post-answer verbs +5. AI verb (via build\_ai\_verb) +6. Post-AI verbs + +#### Signature + +```rust +fn render_swml(&self, headers: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 1232. + +*** + +### reset\_contexts + +Remove all contexts, returning the agent to a no-contexts state. +This is a convenience wrapper around `define_contexts().reset()`. +Use it in a dynamic config callback when you need to rebuild +contexts from scratch for a specific request. + +#### Signature + +```rust +fn reset_contexts(&mut self) -> &mut Self +``` + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 1052. + +*** + +### run + +Start a blocking HTTP server on the configured host:port. + +Serves HTTPS instead when `SWML_SSL_ENABLED` is set together with +`SWML_SSL_CERT_PATH` / `SWML_SSL_KEY_PATH` (mirrors Python's +`SecurityConfig` / uvicorn `ssl_*` contract). + +#### Signature + +```rust +fn run(&self) +``` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 1722. + +*** + +### service + +Access the underlying service. + +#### Signature + +```rust +fn service(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 397. + +*** + +### service\_mut + +Access the underlying service mutably. + +#### Signature + +```rust +fn service_mut(&mut self) -> &mut ? +``` + +#### Returns + +`&mut ?` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 402. + +*** + +### set\_dynamic\_config\_callback + +#### Signature + +```rust +fn set_dynamic_config_callback( + &mut self, + callback: ? +) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 1143. + +*** + +### set\_function\_includes + +#### Signature + +```rust +fn set_function_includes(&mut self, includes: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 954. + +*** + +### set\_global\_data + +#### Signature + +```rust +fn set_global_data(&mut self, data: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 822. + +*** + +### set\_internal\_fillers + +#### Signature + +```rust +fn set_internal_fillers(&mut self, fillers: ?<&str>) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 865. + +*** + +### set\_internal\_fillers\_map + +Set internal fillers for native SWAIG functions (structured form). + +Internal fillers are short phrases the AI agent speaks (via TTS) +while an internal/native function is running, so the caller +doesn't hear dead air during transitions or background work. + +Supported function names (match the SWAIGInternalFiller schema): +`hangup`, `check_time`, `wait_for_user`, `wait_seconds`, +`adjust_response_latency`, `next_step`, `change_context`, +`get_visual_input`, `get_ideal_strategy`. See +\[`Self::SUPPORTED_INTERNAL_FILLER_NAMES`]. + +Notably NOT supported: `change_step`, `gather_submit`, or +arbitrary user-defined SWAIG function names. The runtime only +honors fillers for the names listed above; everything else is +silently ignored at the SWML level. This method warns at +registration time if you pass an unknown name so you catch the +typo early. + +#### Signature + +```rust +fn set_internal_fillers_map(&mut self, fillers: ?>>) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 888. + +*** + +### set\_language\_params + +Set (or replace) the per-language `params` dict on an already-added +language. Mirrors Python's `AIConfigMixin.set_language_params` — +engine-specific tuning (voice stability/similarity, model knobs, +etc.) can be attached after the language entry was created. + +Behavior, matching Python: + +- If `params` is a non-empty JSON object, store it under the + `params` key on the matching language entry (replacing any + prior value). +- If `params` is an empty object (or any non-object value), + remove the `params` key (treated as unset). +- If no language with the given code exists, this is a no-op. +- Returns `&mut Self` for chaining. + +Python parity: the per-language params are emitted as the language +object's `params` key in SWML and use snake\_case wire shape. + +#### Signature + +```rust +fn set_language_params(&mut self, code: &str, params: ?) -> &mut Self +``` + +#### Parameters + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 749. + +*** + +### set\_languages + +#### Signature + +```rust +fn set_languages(&mut self, languages: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 784. + +*** + +### set\_native\_functions + +#### Signature + +```rust +fn set_native_functions(&mut self, functions: ?<&str>) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 838. + +*** + +### set\_param + +#### Signature + +```rust +fn set_param(&mut self, key: &str, value: ?) -> &mut Self +``` + +#### Parameters + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 810. + +*** + +### set\_params + +#### Signature + +```rust +fn set_params(&mut self, params: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 815. + +*** + +### set\_post\_prompt + +#### Signature + +```rust +fn set_post_prompt(&mut self, text: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 456. + +*** + +### set\_post\_prompt\_llm\_params + +#### Signature + +```rust +fn set_post_prompt_llm_params(&mut self, params: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 966. + +*** + +### set\_post\_prompt\_url + +#### Signature + +```rust +fn set_post_prompt_url(&mut self, url: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 1160. + +*** + +### set\_prompt\_llm\_params + +#### Signature + +```rust +fn set_prompt_llm_params(&mut self, params: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 959. + +*** + +### set\_prompt\_pom + +Sets the prompt as a list of POM section objects. Each section +supports keys "title", "body", "bullets", "numbered", +"numbered\_bullets", and "subsections". Switches the agent to POM +mode. + +Mirrors Python's `PromptManager.set_prompt_pom` — accepts a list +of section dicts and stores them in `pom_sections`. + +#### Signature + +```rust +fn set_prompt_pom(&mut self, pom: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 618. + +*** + +### set\_prompt\_text + +#### Signature + +```rust +fn set_prompt_text(&mut self, text: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 451. + +*** + +### set\_pronunciations + +#### Signature + +```rust +fn set_pronunciations(&mut self, pronunciations: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 805. + +*** + +### set\_signing\_key + +Set or clear the signing key after construction. Useful for +tests and dynamic-config flows. Pass an empty string or +`None`-equivalent to disable. + +#### Signature + +```rust +fn set_signing_key(&mut self, key: ?<&str>) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 416. + +*** + +### set\_webhook\_url + +#### Signature + +```rust +fn set_webhook_url(&mut self, url: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 1155. + +*** + +### signing\_key + +Return the signing key resolved from `AgentOptions::signing_key` +or the `SIGNALWIRE_SIGNING_KEY` environment variable. `None` +means signature validation is disabled. + +#### Signature + +```rust +fn signing_key(&self) -> ?<&str> +``` + +#### Returns + +`?<&str>` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 409. + +*** + +### update\_global\_data + +#### Signature + +```rust +fn update_global_data(&mut self, data: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 829. + +*** + +### validate\_tool\_token + +Validate a per-call SWAIG-function token. Returns `false` when the +function is not registered or when the SessionManager rejects the +token. + +Python parity: `state_mixin.StateMixin.validate_tool_token` — +rejects unknown function names up-front. Rust's +`SessionManager::validate_token` returns `bool` (no panics on bad +input — see security/session\_manager.rs), so no try/catch is +required for parity. + +#### Signature + +```rust +fn validate_tool_token( + &self, + function_name: &str, + token: &str, + call_id: &str +) -> bool +``` + +#### Parameters + + + + + + + +#### Returns + +`bool` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 439. + +## Type Aliases + +### Target + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 315. + +## Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 171. diff --git a/fern/products/sdk-reference/rust/signalwire/agent/agent-base/agent-options/index.mdx b/fern/products/sdk-reference/rust/signalwire/agent/agent-base/agent-options/index.mdx new file mode 100644 index 0000000000..4aa8951c56 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/agent/agent-base/agent-options/index.mdx @@ -0,0 +1,349 @@ +--- +slug: "/reference/rust/signalwire/agent/agent-base/agent-options" +title: "AgentOptions" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::agent::agent_base::AgentOptions" + parent: "signalwire::agent::agent_base" + module: "agent.agent_base" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs" + visibility: "public" +--- +# `AgentOptions` + +Options for constructing an `AgentBase`. + +Doubles as an idiomatic **builder**: every field has a fluent +`with_*`/setter that takes and returns `self`, so an agent can be configured +in one expression and handed straight to \[`AgentBase::new`]: + +```no_run +use signalwire::agent::{AgentBase, AgentOptions}; + +let agent = AgentBase::new( + AgentOptions::new("receptionist") + .route("/reception") + .basic_auth("user", "secret") + .auto_answer(true) + .signing_key("whsec_…"), +); +``` + +Direct field assignment (`opts.route = Some(...)`) still works — the builder +methods are an additive convenience. `#[must_use]` flags an `AgentOptions` +that is built but never passed to \[`AgentBase::new`]; under +`#[deny(unused_must_use)]` that is a hard compile error, as this +`compile_fail` doctest proves: + +```compile_fail +#![deny(unused_must_use)] +use signalwire::agent::AgentOptions; +// Building an AgentOptions and dropping it on the floor is a compile error +// because the type is `#[must_use]` — you must feed it to AgentBase::new. +AgentOptions::new("oops").route("/x"); +``` + +**Decorators:** `@must_use` + +## Signature + +```rust +struct AgentOptions { /* fields */ } +``` + +## Examples + + + + ```rust + use signalwire::agent::{AgentBase, AgentOptions}; + + let agent = AgentBase::new( + AgentOptions::new("receptionist") + .route("/reception") + .basic_auth("user", "secret") + .auto_answer(true) + .signing_key("whsec_…"), + ); + ``` + + + + ```rust + #![deny(unused_must_use)] + use signalwire::agent::AgentOptions; + // Building an AgentOptions and dropping it on the floor is a compile error + // because the type is `#[must_use]` — you must feed it to AgentBase::new. + AgentOptions::new("oops").route("/x"); + ``` + + + +## Properties + + + + + + + + + + + + + + + + + + + SignalWire Signing Key used to validate the `X-SignalWire-Signature` header on incoming POST webhooks (`POST /`, `POST /swaig`, `POST /post_prompt`). When `None`, the agent falls back to the `SIGNALWIRE_SIGNING_KEY` environment variable. When neither is set, the agent logs a prominent warning at startup and accepts unsigned requests — see Python parity (`webhook_validator.py`, reference at `signalwire-python/signalwire/signalwire/core/security/`). + + + + +## Methods + +### auto\_answer + +Toggle automatic call answering (default `true`). + +#### Signature + +```rust +fn auto_answer(self, auto_answer: bool) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 122. + +*** + +### basic\_auth + +Set HTTP Basic-Auth credentials guarding this agent's endpoints. + +#### Signature + +```rust +fn basic_auth(self, user: &str, password: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 115. + +*** + +### host + +Set the bind host (e.g. `"0.0.0.0"`). + +#### Signature + +```rust +fn host(self, host: &str) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 103. + +*** + +### new + +#### Signature + +```rust +fn new(name: &str) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 73. + +*** + +### port + +Set the bind port. + +#### Signature + +```rust +fn port(self, port: u16) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 109. + +*** + +### record\_call + +Toggle call recording (default `false`). + +#### Signature + +```rust +fn record_call(self, record_call: bool) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 128. + +*** + +### route + +Set the HTTP route this agent serves (e.g. `"/reception"`). + +#### Signature + +```rust +fn route(self, route: &str) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 97. + +*** + +### signing\_key + +Set the SignalWire signing key used to validate inbound +`X-SignalWire-Signature` webhook headers. See \[`AgentOptions::signing_key`]. + +#### Signature + +```rust +fn signing_key(self, signing_key: &str) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 141. + +*** + +### use\_pom + +Toggle Prompt-Object-Model prompt rendering (default `true`). + +#### Signature + +```rust +fn use_pom(self, use_pom: bool) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 134. + +## Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 50. diff --git a/fern/products/sdk-reference/rust/signalwire/agent/agent-base/index.mdx b/fern/products/sdk-reference/rust/signalwire/agent/agent-base/index.mdx new file mode 100644 index 0000000000..9e937e10c0 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/agent/agent-base/index.mdx @@ -0,0 +1,34 @@ +--- +slug: "/reference/rust/signalwire/agent/agent-base" +title: "agent_base" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::agent::agent_base" + parent: "signalwire::agent" + module: "agent" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs" + visibility: "public" +--- +# `agent_base` + +## Classes + + + + Core agent that extends `Service` with AI-specific capabilities. + + + + Options for constructing an `AgentBase`. + + + +## Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/agent/index.mdx b/fern/products/sdk-reference/rust/signalwire/agent/index.mdx new file mode 100644 index 0000000000..b151e4353b --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/agent/index.mdx @@ -0,0 +1,27 @@ +--- +slug: "/reference/rust/signalwire/agent" +title: "agent" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::agent" + parent: "signalwire" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/agent/mod.rs" + visibility: "public" +--- +# `agent` + +## Modules + + + + + +## Source + +[`src/agent/mod.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/mod.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/contexts/context-builder/context-builder/index.mdx b/fern/products/sdk-reference/rust/signalwire/contexts/context-builder/context-builder/index.mdx new file mode 100644 index 0000000000..c991ab71bb --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/contexts/context-builder/context-builder/index.mdx @@ -0,0 +1,342 @@ +--- +slug: "/reference/rust/signalwire/contexts/context-builder/context-builder" +title: "ContextBuilder" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::contexts::context_builder::ContextBuilder" + parent: "signalwire::contexts::context_builder" + module: "contexts.context_builder" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs" + visibility: "public" +--- +# `ContextBuilder` + +Builder for multi-step, multi-context AI agent workflows. + +A ContextBuilder owns one or more \[`Context`]s; each Context owns an +ordered list of \[`Step`]s. Only one context and one step is active at +a time. Per chat turn, the runtime injects the current step's +instructions as a system message, then asks the LLM for a response. + +# Native tools auto-injected by the runtime + +When a step (or its enclosing context) declares valid\_steps or +valid\_contexts, the runtime auto-injects two native tools so the +model can navigate the flow: + +- `next_step(step: enum)` — present when valid\_steps is set +- `change_context(context: enum)` — present when valid\_contexts is set + +A third native tool — `gather_submit` — is injected during +gather\_info questioning. These three names are reserved: see +\[`RESERVED_NATIVE_TOOL_NAMES`]. \[`ContextBuilder::validate`] rejects +any agent that defines a SWAIG tool with one of these names. + +# Function whitelisting (\[`Step::set_functions`]) + +Each step may declare a functions whitelist. The whitelist is applied +in-memory at the start of each LLM turn. CRITICALLY: if a step does +NOT declare a functions field, it INHERITS the previous step's +active set. See \[`Step::set_functions`] for details and examples. + +**Decorators:** `@must_use` + +## Signature + +```rust +struct ContextBuilder { /* fields */ } +``` + +## Inheritance + +**Implements:** `Clone`, `Debug`, `Default` + +## Methods + +### add\_context + +#### Signature + +```rust +fn add_context(&mut self, name: &str) -> &mut ? +``` + +#### Parameters + + + +#### Returns + +`&mut ?` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 651. + +*** + +### attach\_tool\_name\_supplier + +Attach a closure that returns registered SWAIG tool names so +\[`Self::validate`] can check for collisions with +\[`RESERVED_NATIVE_TOOL_NAMES`]. + +#### Signature + +```rust +fn attach_tool_name_supplier( + &mut self, + supplier: F +) -> &mut Self where F: ?() -> ? + ? + ? + 'static +``` + +#### Type Parameters + + + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 634. + +*** + +### clone + +#### Signature + +```rust +fn clone(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 596. + +*** + +### default + +#### Signature + +```rust +fn default() -> Self +``` + +#### Returns + +`Self` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 864. + +*** + +### fmt + +#### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 610. + +*** + +### get\_context + +#### Signature + +```rust +fn get_context(&self, name: &str) -> ?<&?> +``` + +#### Parameters + + + +#### Returns + +`?<&?>` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 670. + +*** + +### get\_context\_mut + +#### Signature + +```rust +fn get_context_mut(&mut self, name: &str) -> ?<&mut ?> +``` + +#### Parameters + + + +#### Returns + +`?<&mut ?>` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 674. + +*** + +### has\_contexts + +#### Signature + +```rust +fn has_contexts(&self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 678. + +*** + +### new + +#### Signature + +```rust +fn new() -> Self +``` + +#### Returns + +`Self` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 623. + +*** + +### reset + +Remove all contexts, returning the builder to its initial state. +Use this in a dynamic config callback when you need to rebuild +contexts from scratch for a specific request. + +#### Signature + +```rust +fn reset(&mut self) -> &mut Self +``` + +#### Returns + +`&mut Self` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 645. + +*** + +### to\_value + +Serialise all contexts in order. Validates before converting. + +#### Signature + +```rust +fn to_value(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 848. + +*** + +### validate + +Validate the contexts configuration. +Returns `Ok(())` if valid, `Err(errors)` with a list of error messages. + +#### Signature + +```rust +fn validate(&self) -> ?<(), ?> +``` + +#### Returns + +`?<(), ?>` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 684. + +## Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 598. diff --git a/fern/products/sdk-reference/rust/signalwire/contexts/context-builder/context/index.mdx b/fern/products/sdk-reference/rust/signalwire/contexts/context-builder/context/index.mdx new file mode 100644 index 0000000000..364cee61de --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/contexts/context-builder/context/index.mdx @@ -0,0 +1,429 @@ +--- +slug: "/reference/rust/signalwire/contexts/context-builder/context" +title: "Context" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::contexts::context_builder::Context" + parent: "signalwire::contexts::context_builder" + module: "contexts.context_builder" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs" + visibility: "public" +--- +# `Context` + +A named context containing an ordered set of steps. + +## Signature + +```rust +struct Context { /* fields */ } +``` + +## Inheritance + +**Implements:** `Debug`, `Clone` + +## Methods + +### add\_step + +#### Signature + +```rust +fn add_step(&mut self, name: &str) -> &mut ? +``` + +#### Parameters + + + +#### Returns + +`&mut ?` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 441. + +*** + +### clone + +#### Signature + +```rust +fn clone(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 407. + +*** + +### fmt + +#### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 407. + +*** + +### get\_step + +#### Signature + +```rust +fn get_step(&self, name: &str) -> ?<&?> +``` + +#### Parameters + + + +#### Returns + +`?<&?>` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 461. + +*** + +### get\_step\_mut + +#### Signature + +```rust +fn get_step_mut(&mut self, name: &str) -> ?<&mut ?> +``` + +#### Parameters + + + +#### Returns + +`?<&mut ?>` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 465. + +*** + +### move\_step + +#### Signature + +```rust +fn move_step(&mut self, name: &str, position: usize) -> &mut Self +``` + +#### Parameters + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 476. + +*** + +### name + +#### Signature + +```rust +fn name(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 435. + +*** + +### new + +#### Signature + +```rust +fn new(name: &str) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 422. + +*** + +### remove\_step + +#### Signature + +```rust +fn remove_step(&mut self, name: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 469. + +*** + +### set\_enter\_fillers + +#### Signature + +```rust +fn set_enter_fillers(&mut self, fillers: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 512. + +*** + +### set\_exit\_fillers + +#### Signature + +```rust +fn set_exit_fillers(&mut self, fillers: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 517. + +*** + +### set\_initial\_step + +Set which step the context starts on when entered. + +By default, a context starts on its first step (index 0). Use +this to skip a preamble step on re-entry via `change_context`. + +#### Signature + +```rust +fn set_initial_step(&mut self, step_name: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 493. + +*** + +### set\_prompt\_text + +#### Signature + +```rust +fn set_prompt_text(&mut self, prompt: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 500. + +*** + +### set\_system\_prompt + +#### Signature + +```rust +fn set_system_prompt(&mut self, system_prompt: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 505. + +*** + +### step\_order + +#### Signature + +```rust +fn step_order(&self) -> &[?] +``` + +#### Returns + +`&[?]` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 528. + +*** + +### steps + +#### Signature + +```rust +fn steps(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 524. + +*** + +### to\_value + +#### Signature + +```rust +fn to_value(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 534. + +## Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 408. diff --git a/fern/products/sdk-reference/rust/signalwire/contexts/context-builder/gather-info/index.mdx b/fern/products/sdk-reference/rust/signalwire/contexts/context-builder/gather-info/index.mdx new file mode 100644 index 0000000000..aca564fe5a --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/contexts/context-builder/gather-info/index.mdx @@ -0,0 +1,208 @@ +--- +slug: "/reference/rust/signalwire/contexts/context-builder/gather-info" +title: "GatherInfo" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::contexts::context_builder::GatherInfo" + parent: "signalwire::contexts::context_builder" + module: "contexts.context_builder" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs" + visibility: "public" +--- +# `GatherInfo` + +Configuration for structured data gathering within a step. + +## Signature + +```rust +struct GatherInfo { /* fields */ } +``` + +## Inheritance + +**Implements:** `Debug`, `Clone` + +## Methods + +### add\_question + +#### Signature + +```rust +fn add_question( + &mut self, + key: &str, + question: &str, + question_type: &str, + confirm: bool, + prompt: ?<&str>, + functions: ?> +) -> &mut Self +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 107. + +*** + +### clone + +#### Signature + +```rust +fn clone(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 85. + +*** + +### completion\_action + +#### Signature + +```rust +fn completion_action(&self) -> ?<&str> +``` + +#### Returns + +`?<&str>` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 131. + +*** + +### fmt + +#### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 85. + +*** + +### new + +#### Signature + +```rust +fn new(output_key: ?<&str>, completion_action: ?<&str>, prompt: ?<&str>) -> Self +``` + +#### Parameters + + + + + + + +#### Returns + +`Self` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 94. + +*** + +### questions + +#### Signature + +```rust +fn questions(&self) -> &[?] +``` + +#### Returns + +`&[?]` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 127. + +*** + +### to\_value + +#### Signature + +```rust +fn to_value(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 135. + +## Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 86. diff --git a/fern/products/sdk-reference/rust/signalwire/contexts/context-builder/gather-question/index.mdx b/fern/products/sdk-reference/rust/signalwire/contexts/context-builder/gather-question/index.mdx new file mode 100644 index 0000000000..bfa7d3237e --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/contexts/context-builder/gather-question/index.mdx @@ -0,0 +1,159 @@ +--- +slug: "/reference/rust/signalwire/contexts/context-builder/gather-question" +title: "GatherQuestion" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::contexts::context_builder::GatherQuestion" + parent: "signalwire::contexts::context_builder" + module: "contexts.context_builder" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs" + visibility: "public" +--- +# `GatherQuestion` + +A single question within a gather\_info block. + +## Signature + +```rust +struct GatherQuestion { /* fields */ } +``` + +## Inheritance + +**Implements:** `Debug`, `Clone` + +## Methods + +### clone + +#### Signature + +```rust +fn clone(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 25. + +*** + +### fmt + +#### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 25. + +*** + +### key + +#### Signature + +```rust +fn key(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 54. + +*** + +### new + +#### Signature + +```rust +fn new( + key: &str, + question: &str, + question_type: &str, + confirm: bool, + prompt: ?<&str>, + functions: ?> +) -> Self +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`Self` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 36. + +*** + +### to\_value + +#### Signature + +```rust +fn to_value(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 58. + +## Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 26. diff --git a/fern/products/sdk-reference/rust/signalwire/contexts/context-builder/index.mdx b/fern/products/sdk-reference/rust/signalwire/contexts/context-builder/index.mdx new file mode 100644 index 0000000000..bb1b18d6c0 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/contexts/context-builder/index.mdx @@ -0,0 +1,78 @@ +--- +slug: "/reference/rust/signalwire/contexts/context-builder" +title: "context_builder" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::contexts::context_builder" + parent: "signalwire::contexts" + module: "contexts" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs" + visibility: "public" +--- +# `context_builder` + +## Constants + + + Reserved tool names auto-injected by the runtime when contexts/steps are present. User-defined SWAIG tools must not collide with these names: \[`ContextBuilder::validate`] rejects any agent that registers a user tool sharing one of these names — the runtime would never call the user tool because the native one wins. + + +## Classes + + + + A named context containing an ordered set of steps. + + + + Builder for multi-step, multi-context AI agent workflows. + + + + Configuration for structured data gathering within a step. + + + + A single question within a gather\_info block. + + + + A single step within a context. + + + +## Functions + +### create\_simple\_context + +Create a builder pre-populated with a single named context. + +#### Signature + +```rust +fn create_simple_context(name: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 872. + +## Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/contexts/context-builder/step/index.mdx b/fern/products/sdk-reference/rust/signalwire/contexts/context-builder/step/index.mdx new file mode 100644 index 0000000000..5f5ff0fdcc --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/contexts/context-builder/step/index.mdx @@ -0,0 +1,539 @@ +--- +slug: "/reference/rust/signalwire/contexts/context-builder/step" +title: "Step" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::contexts::context_builder::Step" + parent: "signalwire::contexts::context_builder" + module: "contexts.context_builder" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs" + visibility: "public" +--- +# `Step` + +A single step within a context. + +## Signature + +```rust +struct Step { /* fields */ } +``` + +## Inheritance + +**Implements:** `Debug`, `Clone` + +## Methods + +### add\_gather\_question + +Add a question to this step's gather\_info. Initialises +gather\_info if needed. + +### Gather mode locks function access (IMPORTANT) + +While the model is asking gather questions, the runtime +forcibly deactivates ALL of the step's other functions. The +only callable tools during a gather question are: + +- `gather_submit` (the native answer-submission tool) +- Whatever names you pass in this question's `functions` + argument + +`next_step` and `change_context` are also filtered out — the +model cannot navigate away until the gather completes. This +is by design: it forces a tight ask → submit → next-question +loop. + +If a question needs to call out to a tool (e.g. validate an +email, geocode a ZIP), list that tool name in this question's +`functions` argument. Functions listed here are active ONLY +for this question. + +#### Signature + +```rust +fn add_gather_question( + &mut self, + key: &str, + question: &str, + question_type: &str, + confirm: bool, + prompt: ?<&str>, + functions: ?> +) -> &mut Self +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 319. + +*** + +### add\_section + +Add a POM section with title and body. + +#### Signature + +```rust +fn add_section(&mut self, title: &str, body: &str) -> &mut Self +``` + +#### Parameters + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 203. + +*** + +### clone + +#### Signature + +```rust +fn clone(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 158. + +*** + +### fmt + +#### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 158. + +*** + +### gather\_info + +#### Signature + +```rust +fn gather_info(&self) -> ?<&?> +``` + +#### Returns + +`?<&?>` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 347. + +*** + +### name + +#### Signature + +```rust +fn name(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 188. + +*** + +### new + +#### Signature + +```rust +fn new(name: &str) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 173. + +*** + +### set\_end + +Mark this step as terminal for the step flow. + +**IMPORTANT**: `end = true` does NOT end the conversation or +hang up the call. It exits step mode entirely after this step +executes — clearing the steps list, current step index, +valid\_steps, and valid\_contexts. The agent keeps running, but +operates only under the base system prompt and the context-level +prompt; no more step instructions are injected and no more +`next_step` tool is offered. + +To actually end the call, call a hangup tool or define a +hangup hook. + +#### Signature + +```rust +fn set_end(&mut self, end: bool) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 276. + +*** + +### set\_functions + +Set which non-internal functions are callable while this step is +active. + +### Inheritance behavior (IMPORTANT) + +If you do NOT call this method, the step inherits whichever +function set was active on the previous step (or the previous +context's last step). The server-side runtime only resets the +active set when a step explicitly declares its `functions` field. +This is the most common source of bugs in multi-step agents: +forgetting `set_functions` on a later step lets the previous +step's tools leak through. Best practice is to call +`set_functions` explicitly on every step that should differ from +the previous one. + +Keep the per-step active set small: LLM tool selection accuracy +degrades noticeably past ~7-8 simultaneously-active tools per +call. Use per-step whitelisting to partition large tool +collections. + +Internal functions (e.g. `gather_submit`, hangup hook) are +ALWAYS protected and cannot be deactivated by this whitelist. The +native navigation tools `next_step` and `change_context` are +injected automatically when `set_valid_steps` / +`set_valid_contexts` is used; they are not affected by this list. + +#### Signature + +```rust +fn set_functions(&mut self, functions: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 249. + +*** + +### set\_gather\_info + +Initialise gather\_info for this step. + +#### Signature + +```rust +fn set_gather_info( + &mut self, + output_key: ?<&str>, + completion_action: ?<&str>, + prompt: ?<&str> +) -> &mut Self +``` + +#### Parameters + + + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 287. + +*** + +### set\_skip\_user\_turn + +#### Signature + +```rust +fn set_skip_user_turn(&mut self, skip: bool) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 281. + +*** + +### set\_step\_criteria + +#### Signature + +```rust +fn set_step_criteria(&mut self, criteria: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 212. + +*** + +### set\_text + +Set the step's prompt text directly. Mutually exclusive with POM sections. + +#### Signature + +```rust +fn set_text(&mut self, text: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 193. + +*** + +### set\_valid\_contexts + +#### Signature + +```rust +fn set_valid_contexts(&mut self, contexts: ?<&str>) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 259. + +*** + +### set\_valid\_steps + +#### Signature + +```rust +fn set_valid_steps(&mut self, steps: ?<&str>) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 254. + +*** + +### to\_value + +#### Signature + +```rust +fn to_value(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 371. + +*** + +### valid\_contexts + +#### Signature + +```rust +fn valid_contexts(&self) -> ?<&[?]> +``` + +#### Returns + +`?<&[?]>` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 343. + +*** + +### valid\_steps + +#### Signature + +```rust +fn valid_steps(&self) -> ?<&[?]> +``` + +#### Returns + +`?<&[?]>` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 339. + +## Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 159. diff --git a/fern/products/sdk-reference/rust/signalwire/contexts/index.mdx b/fern/products/sdk-reference/rust/signalwire/contexts/index.mdx new file mode 100644 index 0000000000..649a4787a7 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/contexts/index.mdx @@ -0,0 +1,27 @@ +--- +slug: "/reference/rust/signalwire/contexts" +title: "contexts" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::contexts" + parent: "signalwire" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/mod.rs" + visibility: "public" +--- +# `contexts` + +## Modules + + + + + +## Source + +[`src/contexts/mod.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/mod.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/core/index.mdx b/fern/products/sdk-reference/rust/signalwire/core/index.mdx new file mode 100644 index 0000000000..59a962dd1f --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/core/index.mdx @@ -0,0 +1,27 @@ +--- +slug: "/reference/rust/signalwire/core" +title: "core" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::core" + parent: "signalwire" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/core/mod.rs" + visibility: "public" +--- +# `core` + +## Modules + + + + + +## Source + +[`src/core/mod.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/core/mod.rs) + +Line 5. diff --git a/fern/products/sdk-reference/rust/signalwire/core/logging-config/index.mdx b/fern/products/sdk-reference/rust/signalwire/core/logging-config/index.mdx new file mode 100644 index 0000000000..2f9f44962a --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/core/logging-config/index.mdx @@ -0,0 +1,48 @@ +--- +slug: "/reference/rust/signalwire/core/logging-config" +title: "logging_config" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::core::logging_config" + parent: "signalwire::core" + module: "core" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/core/logging_config.rs" + visibility: "public" +--- +# `logging_config` + +## Functions + +### get\_execution\_mode + +Detect the SDK's deployment environment based on well-known +environment variables. + +Returns one of `"cgi"`, `"lambda"`, `"google_cloud_function"`, +`"azure_function"`, or `"server"`. + +#### Signature + +```rust +fn get_execution_mode() -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/core/logging_config.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/core/logging_config.rs) + +Line 20. + +## Source + +[`src/core/logging_config.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/core/logging_config.rs) + +Line 13. diff --git a/fern/products/sdk-reference/rust/signalwire/datamap/datamap/index.mdx b/fern/products/sdk-reference/rust/signalwire/datamap/datamap/index.mdx new file mode 100644 index 0000000000..d7c517554d --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/datamap/datamap/index.mdx @@ -0,0 +1,653 @@ +--- +slug: "/reference/rust/signalwire/datamap/datamap" +title: "datamap" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::datamap::datamap" + parent: "signalwire::datamap" + module: "datamap" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/datamap/datamap.rs" + visibility: "public" +--- +# `datamap` + +Fluent builder for DataMap-based SWAIG function definitions. + +A DataMap tool defines its behaviour declaratively (expressions, webhooks) +instead of with a code handler. + +**Decorators:** `@must_use` + +## Signature + +```rust +struct DataMap { /* fields */ } +``` + +## Inheritance + +**Implements:** `Debug`, `Clone` + +## Methods + +### body + +Set body on the last webhook. + +#### Signature + +```rust +fn body(&mut self, data: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/datamap/datamap.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/datamap/datamap.rs) + +Line 173. + +*** + +### clone + +#### Signature + +```rust +fn clone(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/datamap/datamap.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/datamap/datamap.rs) + +Line 8. + +*** + +### create\_expression\_tool + +Build a complete SWAIG function definition with expressions only. + +#### Signature + +```rust +fn create_expression_tool( + name: &str, + purpose: &str, + parameters: ?, + expressions: ? +) -> ? +``` + +#### Parameters + + + + + + + + + +#### Returns + +`?` + +#### Source + +[`src/datamap/datamap.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/datamap/datamap.rs) + +Line 308. + +*** + +### create\_simple\_api\_tool + +Build a complete SWAIG function definition with a single webhook. + +#### Signature + +```rust +fn create_simple_api_tool( + name: &str, + purpose: &str, + parameters: ?, + method: &str, + url: &str, + output: ?, + headers: ? +) -> ? +``` + +#### Parameters + + + + + + + + + + + + + + + +#### Returns + +`?` + +#### Source + +[`src/datamap/datamap.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/datamap/datamap.rs) + +Line 277. + +*** + +### description + +Alias for \[`Self::purpose`]. Sets the LLM-facing tool +description. This string is read by the model to decide WHEN +to call this tool. See \[`Self::purpose`] for bad-vs-good +examples. + +#### Signature + +```rust +fn description(&mut self, desc: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/datamap/datamap.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/datamap/datamap.rs) + +Line 68. + +*** + +### error\_keys + +Set error\_keys on the last webhook. + +#### Signature + +```rust +fn error_keys(&mut self, keys: ?<&str>) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/datamap/datamap.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/datamap/datamap.rs) + +Line 212. + +*** + +### expression + +Add an expression rule. + +#### Signature + +```rust +fn expression( + &mut self, + test_value: &str, + pattern: &str, + output: ?, + nomatch_output: ? +) -> &mut Self +``` + +#### Parameters + + + + + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/datamap/datamap.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/datamap/datamap.rs) + +Line 114. + +*** + +### fallback\_output + +Set global fallback output. + +#### Signature + +```rust +fn fallback_output(&mut self, result: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/datamap/datamap.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/datamap/datamap.rs) + +Line 206. + +*** + +### fmt + +#### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/datamap/datamap.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/datamap/datamap.rs) + +Line 8. + +*** + +### for\_each + +Set foreach on the last webhook. + +#### Signature + +```rust +fn for_each(&mut self, config: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/datamap/datamap.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/datamap/datamap.rs) + +Line 189. + +*** + +### global\_error\_keys + +Set global error\_keys. + +#### Signature + +```rust +fn global_error_keys(&mut self, keys: ?<&str>) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/datamap/datamap.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/datamap/datamap.rs) + +Line 220. + +*** + +### new + +#### Signature + +```rust +fn new(function_name: &str) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/datamap/datamap.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/datamap/datamap.rs) + +Line 26. + +*** + +### output + +Set output on the last webhook. + +#### Signature + +```rust +fn output(&mut self, result: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/datamap/datamap.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/datamap/datamap.rs) + +Line 197. + +*** + +### parameter + +Add a parameter definition — the `description` is **LLM-FACING**. + +Each parameter description is rendered into the OpenAI tool +schema under `parameters.properties..description` and +sent to the model. The model uses it to decide HOW to fill in +the argument from user speech. It is prompt engineering, not +developer FYI. + +### Bad vs good + +```text +BAD : .parameter("city", "string", "the city", ...) +GOOD: .parameter("city", "string", + "The name of the city to get weather for, e.g. " + "'San Francisco'. Ask the user if they did not " + "provide one. Include the state or country if the " + "city name is ambiguous.", ...) +``` + +#### Signature + +```rust +fn parameter( + &mut self, + name: &str, + param_type: &str, + description: &str, + required: bool, + enum_values: ?<&str> +) -> &mut Self +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`&mut Self` + +#### Examples + +```rust +BAD : .parameter("city", "string", "the city", ...) +GOOD: .parameter("city", "string", + "The name of the city to get weather for, e.g. " + "'San Francisco'. Ask the user if they did not " + "provide one. Include the state or country if the " + "city name is ambiguous.", ...) +``` + +#### Source + +[`src/datamap/datamap.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/datamap/datamap.rs) + +Line 90. + +*** + +### params + +Set params on the last webhook. + +#### Signature + +```rust +fn params(&mut self, data: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/datamap/datamap.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/datamap/datamap.rs) + +Line 181. + +*** + +### purpose + +Set the LLM-facing tool description (the "purpose"). **Prompt +engineering, not developer documentation.** + +The description string is rendered into the OpenAI tool schema +`description` field on every LLM turn. The model reads it to +decide WHEN to call this tool. A vague `purpose()` is the #1 +cause of "the model has the right tool but doesn't call it" +failures with data-map tools. + +### Bad vs good + +```text +BAD : .purpose("weather api") +GOOD: .purpose("Get the current weather conditions and forecast " + + "for a specific city. Use this whenever the user " + + "asks about weather, temperature, rain, or similar " + + "conditions in a named location.") +``` + +#### Signature + +```rust +fn purpose(&mut self, desc: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Examples + +```rust +BAD : .purpose("weather api") +GOOD: .purpose("Get the current weather conditions and forecast " + + "for a specific city. Use this whenever the user " + + "asks about weather, temperature, rain, or similar " + + "conditions in a named location.") +``` + +#### Source + +[`src/datamap/datamap.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/datamap/datamap.rs) + +Line 59. + +*** + +### to\_swaig\_function + +Serialise to a SWAIG function definition. + +#### Signature + +```rust +fn to_swaig_function(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/datamap/datamap.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/datamap/datamap.rs) + +Line 228. + +*** + +### webhook + +Add a webhook definition. + +#### Signature + +```rust +fn webhook( + &mut self, + method: &str, + url: &str, + headers: ?, + form_param: &str, + input_args_as_params: bool, + require_args: ?<&str> +) -> &mut Self +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/datamap/datamap.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/datamap/datamap.rs) + +Line 133. + +*** + +### webhook\_expressions + +Set expressions on the last webhook. + +#### Signature + +```rust +fn webhook_expressions(&mut self, expressions: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/datamap/datamap.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/datamap/datamap.rs) + +Line 165. + +## Source + +[`src/datamap/datamap.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/datamap/datamap.rs) + +Line 10. diff --git a/fern/products/sdk-reference/rust/signalwire/datamap/index.mdx b/fern/products/sdk-reference/rust/signalwire/datamap/index.mdx new file mode 100644 index 0000000000..1885d17bdf --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/datamap/index.mdx @@ -0,0 +1,29 @@ +--- +slug: "/reference/rust/signalwire/datamap" +title: "datamap" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::datamap" + parent: "signalwire" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/datamap/mod.rs" + visibility: "public" +--- +# `datamap` + +## Classes + + + + Fluent builder for DataMap-based SWAIG function definitions. + + + +## Source + +[`src/datamap/mod.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/datamap/mod.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/index.mdx b/fern/products/sdk-reference/rust/signalwire/index.mdx new file mode 100644 index 0000000000..980ff575a1 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/index.mdx @@ -0,0 +1,238 @@ +--- +slug: "/reference/rust/signalwire" +title: "signalwire" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/lib.rs" + visibility: "public" +--- +# `signalwire` + +## Classes + + + + Skill registration descriptor — Rust's analogue of a Python skill class. Bundles a skill's registration name with its factory closure into a single value so \[`register_skill`] can mirror Python's one-argument signature. + + + +## Modules + + + + + + + + + + + + + + Prompt Object Model (POM) + + + + + + + + + + + + + + + + + + + + + + + +## Functions + +### add\_skill\_directory + +Add a directory to the global skill search path. + +Mirrors `signalwire.add_skill_directory(path)`. In Rust the +directory contents cannot be loaded at runtime — third-party +skills must call \[`skills::SkillRegistry::register_skill`] at +startup — but the registered path is recorded for introspection. + +**Errors:** + +Returns an error string if the directory does not exist or is not +a directory. + +#### Signature + +```rust +fn add_skill_directory(path: &str) -> ?<(), ?> +``` + +#### Parameters + + + +#### Returns + +`?<(), ?>` + +#### Source + +[`src/lib.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/lib.rs) + +Line 50. + +*** + +### list\_skills + +Sorted list of every registered skill name. + +Mirrors Python's `signalwire.list_skills()`. + +#### Signature + +```rust +fn list_skills() -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/lib.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/lib.rs) + +Line 57. + +*** + +### list\_skills\_with\_params + +Per-skill schema map (parameter metadata) for every registered +skill. Currently returns only the skill name as the key with an +empty parameter map — Rust skills don't carry rich Python-style +parameter introspection. The shape matches Python's contract so +downstream tooling can iterate. + +Mirrors Python's `signalwire.list_skills_with_params()`. + +#### Signature + +```rust +fn list_skills_with_params() -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/lib.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/lib.rs) + +Line 68. + +*** + +### register\_skill + +Register a custom skill class. + +Mirrors Python's `signalwire.register_skill(skill_class)`. Python's +`skill_class` carries both the name (via `SKILL_NAME` attribute) and +the factory (via the class itself); Rust packages the same pair as +a \[`SkillSpec`] tuple — the canonical "skill class" descriptor in +Rust. + +#### Signature + +```rust +fn register_skill(skill_class: ?) +``` + +#### Parameters + + + A \[`SkillSpec`] describing the skill's name and factory function. To preserve the older two-argument call style, \[`SkillRegistry::register_skill`] remains available as `signalwire::skills::SkillRegistry::register_skill(name, factory)`. + + +#### Source + +[`src/lib.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/lib.rs) + +Line 90. + +*** + +### RestClient + +Construct a \[`RestClient`] from positional or keyword credentials. + +Mirrors Python's top-level `signalwire.RestClient(*args, **kwargs)` +factory — in Python that's a thin wrapper that lazy-imports +`signalwire.rest.RestClient` and instantiates it. The Rust struct +is exposed at `signalwire::rest::RestClient`; this free function +provides the same one-line entry point under `signalwire::`. + +The struct re-export at `signalwire::RestClient` (a type) and this +function at `signalwire::RestClient` (a value) coexist because +they live in distinct namespaces — types and values, respectively. + +The signature mirrors Python's `(*args, **kwargs)` shape so the +cross-language signature audit recognises them as compatible. In +practice callers pass either: + +- `args = ["proj", "tok", "space"]` (three positional strings), or +- `args = []` and `kwargs = {"project": ..., "token": ..., "host": ...}` + +Either form maps onto \[`rest::RestClient::new`]. + +**Errors:** + +Returns an error string if credentials cannot be derived from either +`args` or `kwargs` (or fall back to the standard environment +variables `SIGNALWIRE_PROJECT_ID` / `SIGNALWIRE_API_TOKEN` / +`SIGNALWIRE_SPACE`). + +#### Signature + +```rust +fn RestClient(args: ?, kwargs: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/lib.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/lib.rs) + +Line 140. + +## Source + +[`src/lib.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/lib.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/logging/index.mdx b/fern/products/sdk-reference/rust/signalwire/logging/index.mdx new file mode 100644 index 0000000000..de85ca8266 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/logging/index.mdx @@ -0,0 +1,349 @@ +--- +slug: "/reference/rust/signalwire/logging" +title: "logging" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::logging" + parent: "signalwire" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs" + visibility: "public" +--- +# `logging` + +## Classes + + + + Logger with level filtering and suppression via environment variables. + + + + Error returned when a string is parsed into \[`Level`] (via \[`FromStr`]) but is not one of `debug`/`info`/`warn`/`error` (case-insensitive). + + + +## Functions + +### init + +Initialize the global logger (call once at startup). + +#### Signature + +```rust +fn init() +``` + +#### Source + +[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) + +Line 165. + +## Enums + +### Level + +Log levels matching the SDK convention — the closed set `debug` / `info` / +`warn` / `error`, ordered by increasing severity. + +`as_str()` returns the upper-case label used in emitted log lines +(`"DEBUG"`); `Display` and \[`AsRef`] agree with it. +`from_str()` parses the lower-case names (case-insensitively) accepted by +`SIGNALWIRE_LOG_LEVEL`. + +#### Signature + +```rust +enum Level +``` + +#### Inheritance + +**Implements:** `Debug`, `Clone`, `Copy`, `PartialEq`, `Eq`, `PartialOrd`, `Ord`, `Display`, `AsRef`, `FromStr` + +#### Variants + + + + + + + + + +#### Methods + +##### all + +Every \[`Level`], in ascending-severity order. + +###### Signature + +```rust +fn all() -> &'static [?] +``` + +###### Returns + +`&'static [?]` + +###### Source + +[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) + +Line 44. + +*** + +##### as\_ref + +###### Signature + +```rust +fn as_ref(&self) -> &str +``` + +###### Returns + +`&str` + +###### Source + +[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) + +Line 56. + +*** + +##### as\_str + +###### Signature + +```rust +fn as_str(&self) -> &'static str +``` + +###### Returns + +`&'static str` + +###### Source + +[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) + +Line 34. + +*** + +##### clone + +###### Signature + +```rust +fn clone(&self) -> ? +``` + +###### Returns + +`?` + +###### Source + +[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) + +Line 15. + +*** + +##### cmp + +###### Signature + +```rust +fn cmp(&self, other: &?) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) + +Line 15. + +*** + +##### eq + +###### Signature + +```rust +fn eq(&self, other: &?) -> bool +``` + +###### Parameters + + + +###### Returns + +`bool` + +###### Source + +[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) + +Line 15. + +*** + +##### fmt + +###### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) + +Line 15. + +*** + +##### fmt + +###### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) + +Line 50. + +*** + +##### from\_str + +###### Signature + +```rust +fn from_str(s: &str) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) + +Line 24. + +*** + +##### from\_str + +###### Signature + +```rust +fn from_str(s: &str) -> ?::Err> +``` + +###### Parameters + + + +###### Returns + +`?::Err>` + +###### Source + +[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) + +Line 93. + +*** + +##### partial\_cmp + +###### Signature + +```rust +fn partial_cmp(&self, other: &?) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) + +Line 15. + +#### Type Aliases + +##### Err + +###### Source + +[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) + +Line 91. + +#### Source + +[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) + +Line 16. + +## Source + +[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/logging/logger/index.mdx b/fern/products/sdk-reference/rust/signalwire/logging/logger/index.mdx new file mode 100644 index 0000000000..c60c041b71 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/logging/logger/index.mdx @@ -0,0 +1,191 @@ +--- +slug: "/reference/rust/signalwire/logging/logger" +title: "Logger" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::logging::Logger" + parent: "signalwire::logging" + module: "logging" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs" + visibility: "public" +--- +# `Logger` + +Logger with level filtering and suppression via environment variables. + +- `SIGNALWIRE_LOG_LEVEL` — sets the minimum level (debug/info/warn/error) +- `SIGNALWIRE_LOG_MODE=off` — suppresses all output + +## Signature + +```rust +struct Logger { /* fields */ } +``` + +## Properties + + + + + + + +## Methods + +### debug + +#### Signature + +```rust +fn debug(&self, message: &str) +``` + +#### Parameters + + + +#### Source + +[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) + +Line 147. + +*** + +### error + +#### Signature + +```rust +fn error(&self, message: &str) +``` + +#### Parameters + + + +#### Source + +[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) + +Line 159. + +*** + +### info + +#### Signature + +```rust +fn info(&self, message: &str) +``` + +#### Parameters + + + +#### Source + +[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) + +Line 151. + +*** + +### log + +#### Signature + +```rust +fn log(&self, level: ?, message: &str) +``` + +#### Parameters + + + + + +#### Source + +[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) + +Line 139. + +*** + +### new + +#### Signature + +```rust +fn new(name: &str) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) + +Line 117. + +*** + +### should\_log + +#### Signature + +```rust +fn should_log(&self, level: ?) -> bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) + +Line 135. + +*** + +### warn + +#### Signature + +```rust +fn warn(&self, message: &str) +``` + +#### Parameters + + + +#### Source + +[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) + +Line 155. + +## Source + +[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) + +Line 110. diff --git a/fern/products/sdk-reference/rust/signalwire/logging/parse-level-error/index.mdx b/fern/products/sdk-reference/rust/signalwire/logging/parse-level-error/index.mdx new file mode 100644 index 0000000000..fe2a3731b6 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/logging/parse-level-error/index.mdx @@ -0,0 +1,149 @@ +--- +slug: "/reference/rust/signalwire/logging/parse-level-error" +title: "ParseLevelError" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::logging::ParseLevelError" + parent: "signalwire::logging" + module: "logging" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs" + visibility: "public" +--- +# `ParseLevelError` + +Error returned when a string is parsed into \[`Level`] (via \[`FromStr`]) but +is not one of `debug`/`info`/`warn`/`error` (case-insensitive). + +## Signature + +```rust +struct ParseLevelError { /* fields */ } +``` + +## Inheritance + +**Implements:** `Debug`, `Clone`, `PartialEq`, `Eq`, `Display`, [Error](/docs/sdk-reference/reference/rust/signalwire/security/webhook-layer/webhook-validate#error) + +## Methods + +### clone + +#### Signature + +```rust +fn clone(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) + +Line 63. + +*** + +### eq + +#### Signature + +```rust +fn eq(&self, other: &?) -> bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) + +Line 63. + +*** + +### fmt + +#### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) + +Line 63. + +*** + +### fmt + +#### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) + +Line 76. + +*** + +### input + +The string that failed to parse as a log level. + +#### Signature + +```rust +fn input(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) + +Line 70. + +## Source + +[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) + +Line 64. diff --git a/fern/products/sdk-reference/rust/signalwire/pom/index.mdx b/fern/products/sdk-reference/rust/signalwire/pom/index.mdx new file mode 100644 index 0000000000..d61970c080 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/pom/index.mdx @@ -0,0 +1,50 @@ +--- +slug: "/reference/rust/signalwire/pom" +title: "pom" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::pom" + parent: "signalwire" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/pom/mod.rs" + visibility: "public" +--- +# `pom` + +Prompt Object Model (POM) + +A typed tree of prompt sections that supports markdown / XML / JSON / +YAML rendering. Direct port of `signalwire.pom.pom` from +signalwire-python. + +The two public types are \[`PromptObjectModel`] (the root container) +and \[`Section`] (one node in the tree). Build a model with +`add_section` / `add_subsection`, then render via `render_markdown`, +`render_xml`, `to_json`, or `to_yaml`. All renderers match Python +byte-for-byte — the cross-port parity contract lives in +`signalwire-python/tests/unit/pom/test_pom_render_parity.py`. + +## Classes + + + + One node in a Prompt Object Model tree. + + + +## Modules + + + + `PromptObjectModel` — root container for a POM document. + + + +## Source + +[`src/pom/mod.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/mod.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/pom/pom/index.mdx b/fern/products/sdk-reference/rust/signalwire/pom/pom/index.mdx new file mode 100644 index 0000000000..ff965ba6f0 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/pom/pom/index.mdx @@ -0,0 +1,44 @@ +--- +slug: "/reference/rust/signalwire/pom/pom" +title: "pom" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::pom::pom" + parent: "signalwire::pom" + module: "pom" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs" + visibility: "public" +--- +# `pom` + +`PromptObjectModel` — root container for a POM document. + +Direct port of `signalwire.pom.pom.PromptObjectModel` +(signalwire-python/signalwire/signalwire/pom/pom.py:234-540). + +Owns a `Vec
` (the top-level sections) and exposes +markdown / XML / JSON / YAML rendering plus structural helpers +(`add_section`, `find_section`, `add_pom_as_subsection`). + +All renderers match Python byte-for-byte — the cross-port +parity contract is asserted in +`signalwire-python/tests/unit/pom/test_pom_render_parity.py` and +mirrored in this crate's inline tests. + +## Classes + + + + Root container for a Prompt Object Model document. + + + +## Source + +[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/pom/pom/prompt-object-model/index.mdx b/fern/products/sdk-reference/rust/signalwire/pom/pom/prompt-object-model/index.mdx new file mode 100644 index 0000000000..11665ec74c --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/pom/pom/prompt-object-model/index.mdx @@ -0,0 +1,547 @@ +--- +slug: "/reference/rust/signalwire/pom/pom/prompt-object-model" +title: "PromptObjectModel" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::pom::pom::PromptObjectModel" + parent: "signalwire::pom::pom" + module: "pom.pom" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs" + visibility: "public" +--- +# `PromptObjectModel` + +Root container for a Prompt Object Model document. + +Mirrors Python's `signalwire.pom.pom.PromptObjectModel`. Construct +with \[`PromptObjectModel::new`], populate with [`add_section`], +then render via [`render_markdown`], [`render_xml`], [`to_json`], +or [`to_yaml`]. + +[`add_section`]: PromptObjectModel::add_section + +[`render_markdown`]: PromptObjectModel::render_markdown + +[`render_xml`]: PromptObjectModel::render_xml + +[`to_json`]: PromptObjectModel::to_json + +[`to_yaml`]: PromptObjectModel::to_yaml + +**Decorators:** `@must_use` + +## Signature + +```rust +struct PromptObjectModel { /* fields */ } +``` + +## Inheritance + +**Implements:** `Debug`, `Clone`, `Default`, `PartialEq`, `Eq` + +## Properties + + + Top-level sections, in insertion order. Only the _first_ entry may have `title = None`; all others must carry a title (Python raises `ValueError` otherwise — see `add_section`). + + +## Methods + +### add\_pom\_as\_subsection + +Append every top-level section of `pom_to_add` as a +subsection of the section identified by `target_title`. + +Mirrors Python's `add_pom_as_subsection(target, pom_to_add)` +where `target` is a section title. Returns `Err` when no +section with the given title exists. + +#### Signature + +```rust +fn add_pom_as_subsection( + &mut self, + target_title: &str, + pom_to_add: &? +) -> ?<(), ?> +``` + +#### Parameters + + + + + +#### Returns + +`?<(), ?>` + +#### Source + +[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) + +Line 252. + +*** + +### add\_section + +Append a top-level section with the given title and body. + +Mirrors Python's `PromptObjectModel.add_section(title, body=...)`. +Only the _first_ section may pass `title = None`; subsequent +`None` titles return `Err`. + +Returns a mutable reference to the new section so callers +can keep configuring it (Python returns the `Section` object +— Rust's borrow checker makes a `&mut` reference the +equivalent shape). + +#### Signature + +```rust +fn add_section(&mut self, title: ?) -> ?<&mut ?, ?> +``` + +#### Parameters + + + +#### Returns + +`?<&mut ?, ?>` + +#### Source + +[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) + +Line 97. + +*** + +### add\_section\_with + +Append a top-level section with title + body in one call. +Convenience wrapper that mirrors Python's keyword-style +`add_section(title=..., body=...)`. + +#### Signature + +```rust +fn add_section_with: ?>( + &mut self, + title: ?, + body: impl ? +) -> ?<&mut ?, ?> +``` + +#### Type Parameters + + + +#### Parameters + + + + + +#### Returns + +`?<&mut ?, ?>` + +#### Source + +[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) + +Line 108. + +*** + +### clone + +#### Signature + +```rust +fn clone(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) + +Line 31. + +*** + +### default + +#### Signature + +```rust +fn default() -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) + +Line 31. + +*** + +### eq + +#### Signature + +```rust +fn eq(&self, other: &?) -> bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) + +Line 31. + +*** + +### find\_section + +Find the first section (recursively, depth-first) with the +given title. Returns `None` when no match. Mirrors Python's +`find_section`. + +#### Signature + +```rust +fn find_section(&self, title: &str) -> ?<&?> +``` + +#### Parameters + + + +#### Returns + +`?<&?>` + +#### Source + +[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) + +Line 121. + +*** + +### find\_section\_mut + +Mutable variant of \[`find_section`]. + +[`find_section`]: PromptObjectModel::find_section + +#### Signature + +```rust +fn find_section_mut(&mut self, title: &str) -> ?<&mut ?> +``` + +#### Parameters + + + +#### Returns + +`?<&mut ?>` + +#### Source + +[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) + +Line 139. + +*** + +### fmt + +#### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) + +Line 31. + +*** + +### from\_json + +Parse a JSON string into a \[`PromptObjectModel`]. Mirrors +Python's `PromptObjectModel.from_json(json_data)`. + +Returns `Err(String)` with a descriptive message on parse +errors, matching Python's `ValueError`. + +#### Signature + +```rust +fn from_json(json_str: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) + +Line 55. + +*** + +### from\_value + +Build a model from a parsed `serde_json::Value`. Used by +both \[`from_json`] and \[`from_yaml`]. + +[`from_json`]: PromptObjectModel::from_json + +[`from_yaml`]: PromptObjectModel::from_yaml + +#### Signature + +```rust +fn from_value(value: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) + +Line 74. + +*** + +### from\_yaml + +Parse a YAML string into a \[`PromptObjectModel`]. Mirrors +Python's `PromptObjectModel.from_yaml(yaml_data)`. + +#### Signature + +```rust +fn from_yaml(yaml_str: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) + +Line 63. + +*** + +### new + +Construct an empty model. Mirrors Python's +`PromptObjectModel()` constructor. + +#### Signature + +```rust +fn new() -> Self +``` + +#### Returns + +`Self` + +#### Source + +[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) + +Line 44. + +*** + +### render\_markdown + +Render the entire model as markdown. Matches Python's +`render_markdown` byte-for-byte. + +#### Signature + +```rust +fn render_markdown(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) + +Line 195. + +*** + +### render\_xml + +Render the entire model as XML. Matches Python's +`render_xml` byte-for-byte. + +#### Signature + +```rust +fn render_xml(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) + +Line 219. + +*** + +### to\_json + +Render the model as a JSON string (indent=2). Matches +Python's `to_json` byte-for-byte: `json.dumps([...], indent=2)`. + +#### Signature + +```rust +fn to_json(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) + +Line 164. + +*** + +### to\_value + +Convert the model to a `serde_json::Value` (a JSON array of +section dicts). Mirrors Python's `to_dict`. The Rust name +follows serde idiom (`to_value`) but the cross-port surface +audit treats `to_value` ≡ `to_dict`. + +#### Signature + +```rust +fn to_value(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) + +Line 158. + +*** + +### to\_yaml + +Render the model as a YAML string. Matches PyYAML's output +shape (`default_flow_style=False, sort_keys=False`). + +We hand-emit YAML rather than rely on `serde_norway::to_string` +because the latter (a) sorts keys alphabetically when fed a +`serde_json::Value` (which uses BTreeMap internally) and +(b) doesn't expose a switch to disable that. The POM +document shape is fully constrained — list of dicts with +known string/list-of-string/list-of-dict values — so a +targeted emitter is straightforward and guarantees parity. + +#### Signature + +```rust +fn to_yaml(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) + +Line 181. + +## Source + +[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) + +Line 33. diff --git a/fern/products/sdk-reference/rust/signalwire/pom/section/index.mdx b/fern/products/sdk-reference/rust/signalwire/pom/section/index.mdx new file mode 100644 index 0000000000..fe93e4a72c --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/pom/section/index.mdx @@ -0,0 +1,417 @@ +--- +slug: "/reference/rust/signalwire/pom/section" +title: "section" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::pom::section" + parent: "signalwire::pom" + module: "pom" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/pom/section.rs" + visibility: "public" +--- +# `section` + +One node in a Prompt Object Model tree. + +Mirrors Python's `signalwire.pom.pom.Section`. Fields are owned +strings/vecs (Rust idiom — the model is a value-type document). + +## Signature + +```rust +struct Section { /* fields */ } +``` + +## Inheritance + +**Implements:** `Debug`, `Clone`, `PartialEq`, `Eq`, `Default` + +## Properties + + + Paragraph of body text. Empty string when not set (matches Python's `body=''` default). + + + + Bullet items. Rendered as `- text` (or `1. text` when `numbered_bullets` is `true`). + + + + Whether this section participates in numbered numbering. `None` means "unspecified" (Python's `None` default). `Some(true)` enables numbering on this and all sibling sections at the same level (unless explicitly set to `Some(false)`). + + + + Whether bullets in _this_ section render as `1. x` (true) or `- x` (false). Default `false` matches Python. + + + + Nested subsections. Renderer walks this tree depth-first. + + + + The section title. `None` is valid only for the _first_ top-level section in a \[`crate::pom::PromptObjectModel`]; every other section must carry a title. + + +## Methods + +### add\_body + +Replace the body text. Mirrors Python's `Section.add_body` — +the docstring explicitly says "Add OR REPLACE the body". + +#### Signature + +```rust +fn add_body: ?>(&mut self, body: impl ?) -> &mut Self +``` + +#### Type Parameters + + + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/pom/section.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/section.rs) + +Line 73. + +*** + +### add\_bullets + +Append additional bullets. Mirrors Python's +`Section.add_bullets` (`self.bullets.extend(bullets)`). + +#### Signature + +```rust +fn add_bullets(&mut self, bullets: I) -> &mut Self where I: ?, S: ? +``` + +#### Type Parameters + + + + + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/pom/section.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/section.rs) + +Line 80. + +*** + +### add\_subsection + +Add a subsection. Mirrors Python's `Section.add_subsection` +— the title is required (Python raises `ValueError` when +`title is None`); we encode the same constraint by accepting +`String` (not `Option`). + +Returns a mutable reference to the freshly-appended +subsection so the caller can keep configuring it. (Python +returns the `Section` object directly; Rust's borrow checker +makes a `&mut` reference the equivalent shape.) + +#### Signature + +```rust +fn add_subsection: ?>( + &mut self, + title: impl ? +) -> &mut ? +``` + +#### Type Parameters + + + +#### Parameters + + + +#### Returns + +`&mut ?` + +#### Source + +[`src/pom/section.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/section.rs) + +Line 98. + +*** + +### add\_subsection\_full + +Add a fully-specified subsection. Convenience that mirrors +Python's keyword-argument form +`add_subsection(title=..., body=..., bullets=..., numbered=..., numberedBullets=...)`. + +#### Signature + +```rust +fn add_subsection_full: ?, impl Into: ?>( + &mut self, + title: impl ?, + body: impl ?, + bullets: ?, + numbered: ?, + numbered_bullets: bool +) -> &mut ? +``` + +#### Type Parameters + + + + + +#### Parameters + + + + + + + + + + + +#### Returns + +`&mut ?` + +#### Source + +[`src/pom/section.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/section.rs) + +Line 106. + +*** + +### clone + +#### Signature + +```rust +fn clone(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/pom/section.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/section.rs) + +Line 18. + +*** + +### default + +#### Signature + +```rust +fn default() -> Self +``` + +#### Returns + +`Self` + +#### Source + +[`src/pom/section.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/section.rs) + +Line 44. + +*** + +### eq + +#### Signature + +```rust +fn eq(&self, other: &?) -> bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/pom/section.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/section.rs) + +Line 18. + +*** + +### fmt + +#### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/pom/section.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/section.rs) + +Line 18. + +*** + +### new + +Construct a section with the given title. + +Use the field-setter methods (`add_body`, `add_bullets`, +`add_subsection`) or struct-literal construction for further +configuration. Mirrors Python's `Section(title=..., ...)` +keyword constructor — Rust's idiom uses a builder-style call +chain via `add_*`. + +#### Signature + +```rust +fn new(title: ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/pom/section.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/section.rs) + +Line 64. + +*** + +### render\_markdown + +Render this section (and all nested subsections) as +markdown. Output matches Python's +`Section.render_markdown` byte-for-byte — see +`signalwire-python/tests/unit/pom/test_pom_render_parity.py` +for the cross-port contract. + +#### Signature + +```rust +fn render_markdown(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/pom/section.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/section.rs) + +Line 177. + +*** + +### render\_xml + +Render this section as XML. Matches Python's +`Section.render_xml` byte-for-byte. + +#### Signature + +```rust +fn render_xml(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/pom/section.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/section.rs) + +Line 239. + +*** + +### to\_value + +Convert this section to a `serde_json::Value` matching +Python's `Section.to_dict` exactly. Key order is fixed +(`title`, `body`, `bullets`, `subsections`, `numbered`, +`numberedBullets`) so JSON/YAML serialisation is +byte-for-byte deterministic across ports. + +The Python name is `to_dict`; in Rust the natural name for +a `serde_json::Value` is `to_value`. The cross-port surface +audit treats the two as equivalent (see +`enumerate_surface.py` METHOD\_RENAMES). + +#### Signature + +```rust +fn to_value(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/pom/section.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/section.rs) + +Line 136. + +## Source + +[`src/pom/section.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/section.rs) + +Line 19. diff --git a/fern/products/sdk-reference/rust/signalwire/prefabs/bedrock/bedrock-agent/index.mdx b/fern/products/sdk-reference/rust/signalwire/prefabs/bedrock/bedrock-agent/index.mdx new file mode 100644 index 0000000000..db9607b38b --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/prefabs/bedrock/bedrock-agent/index.mdx @@ -0,0 +1,504 @@ +--- +slug: "/reference/rust/signalwire/prefabs/bedrock/bedrock-agent" +title: "BedrockAgent" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::prefabs::bedrock::BedrockAgent" + parent: "signalwire::prefabs::bedrock" + module: "prefabs.bedrock" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs" + visibility: "public" +--- +# `BedrockAgent` + +Voice-to-voice agent backed by Amazon Bedrock. + +Wraps an \[`AgentBase`]: every standard agent operation +(`set_prompt_text`, `prompt_add_section`, `define_tool`, …) is +available through `Deref`/`DerefMut`. The single divergence is at +SWML rendering time: \[`BedrockAgent::render_swml`] takes the SWML +produced by `AgentBase::render_swml` and rewrites the `ai` verb +into an `amazon_bedrock` verb that carries Bedrock-specific +inference parameters (voice id, temperature, top-p) inside the +prompt object. + +## Signature + +```rust +struct BedrockAgent { /* fields */ } +``` + +## Inheritance + +**Implements:** `Deref`, `DerefMut`, `Debug` + +## Methods + +### agent + +Borrow the underlying `AgentBase` (read-only). + +#### Signature + +```rust +fn agent(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) + +Line 309. + +*** + +### agent\_mut + +Borrow the underlying `AgentBase` (mutable). Most consumers use +`Deref`/`DerefMut` for chaining; this is occasionally useful +when an explicit handle is needed. + +#### Signature + +```rust +fn agent_mut(&mut self) -> &mut ? +``` + +#### Returns + +`&mut ?` + +#### Source + +[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) + +Line 316. + +*** + +### deref + +#### Signature + +```rust +fn deref(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) + +Line 343. + +*** + +### deref\_mut + +#### Signature + +```rust +fn deref_mut(&mut self) -> &mut ? +``` + +#### Returns + +`&mut ?` + +#### Source + +[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) + +Line 349. + +*** + +### fmt + +#### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) + +Line 355. + +*** + +### max\_tokens + +Current max-tokens cap. + +#### Signature + +```rust +fn max_tokens(&self) -> u32 +``` + +#### Returns + +`u32` + +#### Source + +[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) + +Line 336. + +*** + +### new + +Construct a new BedrockAgent. + +Mirrors Python's +`BedrockAgent(name=..., route=..., system_prompt=..., voice_id=..., +temperature=..., top_p=..., max_tokens=..., **kwargs)`. + +#### Signature + +```rust +fn new(options: ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) + +Line 99. + +*** + +### render\_swml + +Render SWML, transforming the `ai` verb into an +`amazon_bedrock` verb that carries the Bedrock voice and +inference parameters. Mirrors Python's `_render_swml`. + +#### Signature + +```rust +fn render_swml(&self, headers: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) + +Line 202. + +*** + +### repr + +String representation matching Python's `__repr__`. + +#### Signature + +```rust +fn repr(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) + +Line 299. + +*** + +### set\_inference\_params + +Update Bedrock inference parameters. Pass `None` to keep an +existing value untouched. Mirrors the Python signature. + +#### Signature + +```rust +fn set_inference_params( + &mut self, + temperature: ?, + top_p: ?, + max_tokens: ? +) -> &mut Self +``` + +#### Parameters + + + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) + +Line 141. + +*** + +### set\_llm\_model + +Set LLM model — not applicable for Bedrock. Logs a warning and +is a no-op (Bedrock uses a fixed voice-to-voice model). Matches +Python's documented behavior. + +#### Signature + +```rust +fn set_llm_model(&mut self, model: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) + +Line 166. + +*** + +### set\_llm\_temperature + +Set LLM temperature — redirects to `set_inference_params` for +Bedrock. Matches Python's documented behavior. + +#### Signature + +```rust +fn set_llm_temperature(&mut self, temperature: f64) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) + +Line 176. + +*** + +### set\_post\_prompt\_llm\_params + +Set post-prompt LLM params — not applicable for Bedrock. Logs a +warning and is a no-op (post-prompt summarisation runs on a +platform-side model). Matches Python's documented behavior. + +#### Signature + +```rust +fn set_post_prompt_llm_params(&mut self, _params: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) + +Line 183. + +*** + +### set\_prompt\_llm\_params + +Set prompt LLM params — Bedrock callers should use +`set_inference_params` instead. Logs a warning and is a no-op. +Matches Python's documented behavior. + +#### Signature + +```rust +fn set_prompt_llm_params(&mut self, _params: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) + +Line 193. + +*** + +### set\_voice + +Set the Bedrock voice id (e.g. `"matthew"`, `"joanna"`). + +#### Signature + +```rust +fn set_voice(&mut self, voice_id: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) + +Line 133. + +*** + +### temperature + +Current generation temperature. + +#### Signature + +```rust +fn temperature(&self) -> f64 +``` + +#### Returns + +`f64` + +#### Source + +[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) + +Line 326. + +*** + +### top\_p + +Current nucleus sampling parameter. + +#### Signature + +```rust +fn top_p(&self) -> f64 +``` + +#### Returns + +`f64` + +#### Source + +[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) + +Line 331. + +*** + +### voice\_id + +Current voice id. + +#### Signature + +```rust +fn voice_id(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) + +Line 321. + +## Type Aliases + +### Target + +#### Source + +[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) + +Line 342. + +## Source + +[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) + +Line 28. diff --git a/fern/products/sdk-reference/rust/signalwire/prefabs/bedrock/bedrock-options/index.mdx b/fern/products/sdk-reference/rust/signalwire/prefabs/bedrock/bedrock-options/index.mdx new file mode 100644 index 0000000000..023bc2f8d5 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/prefabs/bedrock/bedrock-options/index.mdx @@ -0,0 +1,129 @@ +--- +slug: "/reference/rust/signalwire/prefabs/bedrock/bedrock-options" +title: "BedrockOptions" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::prefabs::bedrock::BedrockOptions" + parent: "signalwire::prefabs::bedrock" + module: "prefabs.bedrock" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs" + visibility: "public" +--- +# `BedrockOptions` + +Construction options for \[`BedrockAgent`]. Mirrors the keyword +arguments of Python's `BedrockAgent.__init__`. + +**Decorators:** `@must_use` + +## Signature + +```rust +struct BedrockOptions { /* fields */ } +``` + +## Inheritance + +**Implements:** `Default` + +## Properties + + + Optional basic-auth password override. + + + + Optional basic-auth user override. + + + + Optional bind host override. + + + + Max generation tokens (default `1024`). + + + + Agent name (default `"bedrock_agent"`). + + + + Optional bind port override. + + + + HTTP route (default `"/bedrock"`). + + + + Optional system prompt to register with `set_prompt_text`. + + + + Generation temperature 0..1 (default `0.7`). + + + + Nucleus sampling top-p 0..1 (default `0.9`). + + + + Bedrock voice id (default `"matthew"`). + + +## Methods + +### default + +#### Signature + +```rust +fn default() -> Self +``` + +#### Returns + +`Self` + +#### Source + +[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) + +Line 66. + +*** + +### with\_name + +Convenience: create with a name (other fields keep defaults). + +#### Signature + +```rust +fn with_name(name: &str) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) + +Line 85. + +## Source + +[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) + +Line 40. diff --git a/fern/products/sdk-reference/rust/signalwire/prefabs/bedrock/index.mdx b/fern/products/sdk-reference/rust/signalwire/prefabs/bedrock/index.mdx new file mode 100644 index 0000000000..3146d6d315 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/prefabs/bedrock/index.mdx @@ -0,0 +1,44 @@ +--- +slug: "/reference/rust/signalwire/prefabs/bedrock" +title: "bedrock" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::prefabs::bedrock" + parent: "signalwire::prefabs" + module: "prefabs" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs" + visibility: "public" +--- +# `bedrock` + +Amazon Bedrock voice-to-voice agent. + +`BedrockAgent` extends \[`AgentBase`] (via composition + `Deref`) so it +shares all of AgentBase's features (prompt building, skills, tools, +post-prompt, dynamic configuration) but emits an `amazon_bedrock` +verb in the rendered SWML document instead of the standard `ai` +verb. + +Mirrors the Python `signalwire.agents.bedrock.BedrockAgent`. + +## Classes + + + + Voice-to-voice agent backed by Amazon Bedrock. + + + + Construction options for \[`BedrockAgent`]. Mirrors the keyword arguments of Python's `BedrockAgent.__init__`. + + + +## Source + +[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/prefabs/concierge/concierge-agent/index.mdx b/fern/products/sdk-reference/rust/signalwire/prefabs/concierge/concierge-agent/index.mdx new file mode 100644 index 0000000000..69cbbcdf14 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/prefabs/concierge/concierge-agent/index.mdx @@ -0,0 +1,161 @@ +--- +slug: "/reference/rust/signalwire/prefabs/concierge/concierge-agent" +title: "ConciergeAgent" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::prefabs::concierge::ConciergeAgent" + parent: "signalwire::prefabs::concierge" + module: "prefabs.concierge" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/concierge.rs" + visibility: "public" +--- +# `ConciergeAgent` + +A pre-built concierge agent for venues — answers questions about services, +amenities, hours, and provides directions. + +## Signature + +```rust +struct ConciergeAgent { /* fields */ } +``` + +## Methods + +### agent + +#### Signature + +```rust +fn agent(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/prefabs/concierge.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/concierge.rs) + +Line 227. + +*** + +### agent\_mut + +#### Signature + +```rust +fn agent_mut(&mut self) -> &mut ? +``` + +#### Returns + +`&mut ?` + +#### Source + +[`src/prefabs/concierge.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/concierge.rs) + +Line 231. + +*** + +### amenities + +#### Signature + +```rust +fn amenities(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/prefabs/concierge.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/concierge.rs) + +Line 243. + +*** + +### new + +Create a new ConciergeAgent. + +#### Signature + +```rust +fn new(name: &str, venue_info: &?, route: ?<&str>) -> Self +``` + +#### Parameters + + + + + + + +#### Returns + +`Self` + +#### Source + +[`src/prefabs/concierge.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/concierge.rs) + +Line 25. + +*** + +### services + +#### Signature + +```rust +fn services(&self) -> &[?] +``` + +#### Returns + +`&[?]` + +#### Source + +[`src/prefabs/concierge.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/concierge.rs) + +Line 239. + +*** + +### venue\_name + +#### Signature + +```rust +fn venue_name(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/prefabs/concierge.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/concierge.rs) + +Line 235. + +## Source + +[`src/prefabs/concierge.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/concierge.rs) + +Line 10. diff --git a/fern/products/sdk-reference/rust/signalwire/prefabs/concierge/index.mdx b/fern/products/sdk-reference/rust/signalwire/prefabs/concierge/index.mdx new file mode 100644 index 0000000000..f37cf31ee8 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/prefabs/concierge/index.mdx @@ -0,0 +1,30 @@ +--- +slug: "/reference/rust/signalwire/prefabs/concierge" +title: "concierge" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::prefabs::concierge" + parent: "signalwire::prefabs" + module: "prefabs" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/concierge.rs" + visibility: "public" +--- +# `concierge` + +## Classes + + + + A pre-built concierge agent for venues — answers questions about services, amenities, hours, and provides directions. + + + +## Source + +[`src/prefabs/concierge.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/concierge.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/prefabs/faq-bot/faq-bot-agent/index.mdx b/fern/products/sdk-reference/rust/signalwire/prefabs/faq-bot/faq-bot-agent/index.mdx new file mode 100644 index 0000000000..e43c97b86d --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/prefabs/faq-bot/faq-bot-agent/index.mdx @@ -0,0 +1,150 @@ +--- +slug: "/reference/rust/signalwire/prefabs/faq-bot/faq-bot-agent" +title: "FAQBotAgent" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::prefabs::faq_bot::FAQBotAgent" + parent: "signalwire::prefabs::faq_bot" + module: "prefabs.faq_bot" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/faq_bot.rs" + visibility: "public" +--- +# `FAQBotAgent` + +A pre-built FAQ bot agent that provides answers from a knowledge base. + +## Signature + +```rust +struct FAQBotAgent { /* fields */ } +``` + +## Methods + +### agent + +#### Signature + +```rust +fn agent(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/prefabs/faq_bot.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/faq_bot.rs) + +Line 172. + +*** + +### agent\_mut + +#### Signature + +```rust +fn agent_mut(&mut self) -> &mut ? +``` + +#### Returns + +`&mut ?` + +#### Source + +[`src/prefabs/faq_bot.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/faq_bot.rs) + +Line 176. + +*** + +### faqs + +#### Signature + +```rust +fn faqs(&self) -> &[?] +``` + +#### Returns + +`&[?]` + +#### Source + +[`src/prefabs/faq_bot.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/faq_bot.rs) + +Line 180. + +*** + +### new + +Create a new FAQBotAgent. + +#### Signature + +```rust +fn new( + name: &str, + faqs: ?, + suggest_related: bool, + persona: ?<&str>, + route: ?<&str> +) -> Self +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`Self` + +#### Source + +[`src/prefabs/faq_bot.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/faq_bot.rs) + +Line 22. + +*** + +### suggest\_related + +#### Signature + +```rust +fn suggest_related(&self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/prefabs/faq_bot.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/faq_bot.rs) + +Line 184. + +## Source + +[`src/prefabs/faq_bot.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/faq_bot.rs) + +Line 7. diff --git a/fern/products/sdk-reference/rust/signalwire/prefabs/faq-bot/index.mdx b/fern/products/sdk-reference/rust/signalwire/prefabs/faq-bot/index.mdx new file mode 100644 index 0000000000..6940e2b66f --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/prefabs/faq-bot/index.mdx @@ -0,0 +1,30 @@ +--- +slug: "/reference/rust/signalwire/prefabs/faq-bot" +title: "faq_bot" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::prefabs::faq_bot" + parent: "signalwire::prefabs" + module: "prefabs" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/faq_bot.rs" + visibility: "public" +--- +# `faq_bot` + +## Classes + + + + A pre-built FAQ bot agent that provides answers from a knowledge base. + + + +## Source + +[`src/prefabs/faq_bot.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/faq_bot.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/prefabs/index.mdx b/fern/products/sdk-reference/rust/signalwire/prefabs/index.mdx new file mode 100644 index 0000000000..64b26dca18 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/prefabs/index.mdx @@ -0,0 +1,39 @@ +--- +slug: "/reference/rust/signalwire/prefabs" +title: "prefabs" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::prefabs" + parent: "signalwire" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/mod.rs" + visibility: "public" +--- +# `prefabs` + +## Modules + + + + Amazon Bedrock voice-to-voice agent. + + + + + + + + + + + + + +## Source + +[`src/prefabs/mod.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/mod.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/prefabs/info-gatherer/index.mdx b/fern/products/sdk-reference/rust/signalwire/prefabs/info-gatherer/index.mdx new file mode 100644 index 0000000000..96b438c941 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/prefabs/info-gatherer/index.mdx @@ -0,0 +1,30 @@ +--- +slug: "/reference/rust/signalwire/prefabs/info-gatherer" +title: "info_gatherer" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::prefabs::info_gatherer" + parent: "signalwire::prefabs" + module: "prefabs" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/info_gatherer.rs" + visibility: "public" +--- +# `info_gatherer` + +## Classes + + + + A pre-built agent that asks a series of questions and collects answers. + + + +## Source + +[`src/prefabs/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/info_gatherer.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/prefabs/info-gatherer/info-gatherer-agent/index.mdx b/fern/products/sdk-reference/rust/signalwire/prefabs/info-gatherer/info-gatherer-agent/index.mdx new file mode 100644 index 0000000000..2ebe08fd27 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/prefabs/info-gatherer/info-gatherer-agent/index.mdx @@ -0,0 +1,126 @@ +--- +slug: "/reference/rust/signalwire/prefabs/info-gatherer/info-gatherer-agent" +title: "InfoGathererAgent" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::prefabs::info_gatherer::InfoGathererAgent" + parent: "signalwire::prefabs::info_gatherer" + module: "prefabs.info_gatherer" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/info_gatherer.rs" + visibility: "public" +--- +# `InfoGathererAgent` + +A pre-built agent that asks a series of questions and collects answers. + +## Signature + +```rust +struct InfoGathererAgent { /* fields */ } +``` + +## Methods + +### agent + +Access the underlying `AgentBase`. + +#### Signature + +```rust +fn agent(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/prefabs/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/info_gatherer.rs) + +Line 96. + +*** + +### agent\_mut + +Access the underlying `AgentBase` mutably. + +#### Signature + +```rust +fn agent_mut(&mut self) -> &mut ? +``` + +#### Returns + +`&mut ?` + +#### Source + +[`src/prefabs/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/info_gatherer.rs) + +Line 101. + +*** + +### new + +Create a new InfoGathererAgent. + +#### Signature + +```rust +fn new(name: &str, questions: ?, route: ?<&str>) -> Self +``` + +#### Parameters + + + + + + + +#### Returns + +`Self` + +#### Source + +[`src/prefabs/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/info_gatherer.rs) + +Line 19. + +*** + +### questions + +Get the configured questions. + +#### Signature + +```rust +fn questions(&self) -> &[?] +``` + +#### Returns + +`&[?]` + +#### Source + +[`src/prefabs/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/info_gatherer.rs) + +Line 106. + +## Source + +[`src/prefabs/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/info_gatherer.rs) + +Line 7. diff --git a/fern/products/sdk-reference/rust/signalwire/prefabs/receptionist/index.mdx b/fern/products/sdk-reference/rust/signalwire/prefabs/receptionist/index.mdx new file mode 100644 index 0000000000..efb91bf4e2 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/prefabs/receptionist/index.mdx @@ -0,0 +1,30 @@ +--- +slug: "/reference/rust/signalwire/prefabs/receptionist" +title: "receptionist" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::prefabs::receptionist" + parent: "signalwire::prefabs" + module: "prefabs" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/receptionist.rs" + visibility: "public" +--- +# `receptionist` + +## Classes + + + + A pre-built receptionist agent that routes callers to departments. + + + +## Source + +[`src/prefabs/receptionist.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/receptionist.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/prefabs/receptionist/receptionist-agent/index.mdx b/fern/products/sdk-reference/rust/signalwire/prefabs/receptionist/receptionist-agent/index.mdx new file mode 100644 index 0000000000..f0befcf2ea --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/prefabs/receptionist/receptionist-agent/index.mdx @@ -0,0 +1,142 @@ +--- +slug: "/reference/rust/signalwire/prefabs/receptionist/receptionist-agent" +title: "ReceptionistAgent" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::prefabs::receptionist::ReceptionistAgent" + parent: "signalwire::prefabs::receptionist" + module: "prefabs.receptionist" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/receptionist.rs" + visibility: "public" +--- +# `ReceptionistAgent` + +A pre-built receptionist agent that routes callers to departments. + +## Signature + +```rust +struct ReceptionistAgent { /* fields */ } +``` + +## Methods + +### agent + +#### Signature + +```rust +fn agent(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/prefabs/receptionist.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/receptionist.rs) + +Line 154. + +*** + +### agent\_mut + +#### Signature + +```rust +fn agent_mut(&mut self) -> &mut ? +``` + +#### Returns + +`&mut ?` + +#### Source + +[`src/prefabs/receptionist.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/receptionist.rs) + +Line 158. + +*** + +### departments + +#### Signature + +```rust +fn departments(&self) -> &[?] +``` + +#### Returns + +`&[?]` + +#### Source + +[`src/prefabs/receptionist.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/receptionist.rs) + +Line 162. + +*** + +### greeting + +#### Signature + +```rust +fn greeting(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/prefabs/receptionist.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/receptionist.rs) + +Line 166. + +*** + +### new + +Create a new ReceptionistAgent. + +#### Signature + +```rust +fn new(name: &str, departments: ?, greeting: ?<&str>, route: ?<&str>) -> Self +``` + +#### Parameters + + + + + + + + + +#### Returns + +`Self` + +#### Source + +[`src/prefabs/receptionist.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/receptionist.rs) + +Line 21. + +## Source + +[`src/prefabs/receptionist.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/receptionist.rs) + +Line 7. diff --git a/fern/products/sdk-reference/rust/signalwire/prefabs/survey/index.mdx b/fern/products/sdk-reference/rust/signalwire/prefabs/survey/index.mdx new file mode 100644 index 0000000000..6f99850671 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/prefabs/survey/index.mdx @@ -0,0 +1,30 @@ +--- +slug: "/reference/rust/signalwire/prefabs/survey" +title: "survey" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::prefabs::survey" + parent: "signalwire::prefabs" + module: "prefabs" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/survey.rs" + visibility: "public" +--- +# `survey` + +## Classes + + + + A pre-built agent for conducting surveys with typed question validation. + + + +## Source + +[`src/prefabs/survey.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/survey.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/prefabs/survey/survey-agent/index.mdx b/fern/products/sdk-reference/rust/signalwire/prefabs/survey/survey-agent/index.mdx new file mode 100644 index 0000000000..96af475458 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/prefabs/survey/survey-agent/index.mdx @@ -0,0 +1,140 @@ +--- +slug: "/reference/rust/signalwire/prefabs/survey/survey-agent" +title: "SurveyAgent" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::prefabs::survey::SurveyAgent" + parent: "signalwire::prefabs::survey" + module: "prefabs.survey" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/survey.rs" + visibility: "public" +--- +# `SurveyAgent` + +A pre-built agent for conducting surveys with typed question validation. + +## Signature + +```rust +struct SurveyAgent { /* fields */ } +``` + +## Methods + +### agent + +#### Signature + +```rust +fn agent(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/prefabs/survey.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/survey.rs) + +Line 240. + +*** + +### agent\_mut + +#### Signature + +```rust +fn agent_mut(&mut self) -> &mut ? +``` + +#### Returns + +`&mut ?` + +#### Source + +[`src/prefabs/survey.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/survey.rs) + +Line 244. + +*** + +### new + +Create a new SurveyAgent. + +#### Signature + +```rust +fn new(name: &str, questions: ?, options: ?<&?>) -> Self +``` + +#### Parameters + + + + + + + +#### Returns + +`Self` + +#### Source + +[`src/prefabs/survey.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/survey.rs) + +Line 21. + +*** + +### survey\_name + +#### Signature + +```rust +fn survey_name(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/prefabs/survey.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/survey.rs) + +Line 248. + +*** + +### survey\_questions + +#### Signature + +```rust +fn survey_questions(&self) -> &[?] +``` + +#### Returns + +`&[?]` + +#### Source + +[`src/prefabs/survey.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/survey.rs) + +Line 252. + +## Source + +[`src/prefabs/survey.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/survey.rs) + +Line 7. diff --git a/fern/products/sdk-reference/rust/signalwire/relay/action/ai-action/index.mdx b/fern/products/sdk-reference/rust/signalwire/relay/action/ai-action/index.mdx new file mode 100644 index 0000000000..3bb7b4528e --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/relay/action/ai-action/index.mdx @@ -0,0 +1,114 @@ +--- +slug: "/reference/rust/signalwire/relay/action/ai-action" +title: "AIAction" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::relay::action::AIAction" + parent: "signalwire::relay::action" + module: "relay.action" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs" + visibility: "public" +--- +# `AIAction` + +## Signature + +```rust +struct AIAction { /* fields */ } +``` + +## Inheritance + +**Implements:** `Deref` + +## Properties + + + +## Methods + +### action + +#### Signature + +```rust +fn action(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 425. + +*** + +### deref + +#### Signature + +```rust +fn deref(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 425. + +*** + +### new + +#### Signature + +```rust +fn new(control_id: &str, call_id: &str, node_id: &str) -> Self +``` + +#### Parameters + + + + + + + +#### Returns + +`Self` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 425. + +## Type Aliases + +### Target + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 425. + +## Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 425. diff --git a/fern/products/sdk-reference/rust/signalwire/relay/action/collect-action/index.mdx b/fern/products/sdk-reference/rust/signalwire/relay/action/collect-action/index.mdx new file mode 100644 index 0000000000..ca23a2f7b0 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/relay/action/collect-action/index.mdx @@ -0,0 +1,172 @@ +--- +slug: "/reference/rust/signalwire/relay/action/collect-action" +title: "CollectAction" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::relay::action::CollectAction" + parent: "signalwire::relay::action" + module: "relay.action" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs" + visibility: "public" +--- +# `CollectAction` + +## Signature + +```rust +struct CollectAction { /* fields */ } +``` + +## Inheritance + +**Implements:** `Deref` + +## Properties + + + +## Methods + +### action + +#### Signature + +```rust +fn action(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 344. + +*** + +### collect\_result + +#### Signature + +```rust +fn collect_result(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 352. + +*** + +### deref + +#### Signature + +```rust +fn deref(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 367. + +*** + +### handle\_event\_filtered + +Handle an event, silently ignoring intermediate play events. + +#### Signature + +```rust +fn handle_event_filtered(&self, event: &?) +``` + +#### Parameters + + + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 357. + +*** + +### new + +#### Signature + +```rust +fn new(control_id: &str, call_id: &str, node_id: &str) -> Self +``` + +#### Parameters + + + + + + + +#### Returns + +`Self` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 333. + +*** + +### start\_input\_timers + +#### Signature + +```rust +fn start_input_timers(&self) +``` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 348. + +## Type Aliases + +### Target + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 366. + +## Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 328. diff --git a/fern/products/sdk-reference/rust/signalwire/relay/action/detect-action/index.mdx b/fern/products/sdk-reference/rust/signalwire/relay/action/detect-action/index.mdx new file mode 100644 index 0000000000..7a0267fb8f --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/relay/action/detect-action/index.mdx @@ -0,0 +1,134 @@ +--- +slug: "/reference/rust/signalwire/relay/action/detect-action" +title: "DetectAction" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::relay::action::DetectAction" + parent: "signalwire::relay::action" + module: "relay.action" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs" + visibility: "public" +--- +# `DetectAction` + +## Signature + +```rust +struct DetectAction { /* fields */ } +``` + +## Inheritance + +**Implements:** `Deref` + +## Properties + + + +## Methods + +### action + +#### Signature + +```rust +fn action(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 374. + +*** + +### deref + +#### Signature + +```rust +fn deref(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 374. + +*** + +### detect\_result + +#### Signature + +```rust +fn detect_result(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 377. + +*** + +### new + +#### Signature + +```rust +fn new(control_id: &str, call_id: &str, node_id: &str) -> Self +``` + +#### Parameters + + + + + + + +#### Returns + +`Self` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 374. + +## Type Aliases + +### Target + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 374. + +## Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 374. diff --git a/fern/products/sdk-reference/rust/signalwire/relay/action/fax-action/index.mdx b/fern/products/sdk-reference/rust/signalwire/relay/action/fax-action/index.mdx new file mode 100644 index 0000000000..f51e828468 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/relay/action/fax-action/index.mdx @@ -0,0 +1,138 @@ +--- +slug: "/reference/rust/signalwire/relay/action/fax-action" +title: "FaxAction" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::relay::action::FaxAction" + parent: "signalwire::relay::action" + module: "relay.action" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs" + visibility: "public" +--- +# `FaxAction` + +## Signature + +```rust +struct FaxAction { /* fields */ } +``` + +## Inheritance + +**Implements:** `Deref` + +## Properties + + + + + +## Methods + +### action + +#### Signature + +```rust +fn action(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 403. + +*** + +### deref + +#### Signature + +```rust +fn deref(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 414. + +*** + +### fax\_type + +#### Signature + +```rust +fn fax_type(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 407. + +*** + +### new + +#### Signature + +```rust +fn new(control_id: &str, call_id: &str, node_id: &str, fax_type: &str) -> Self +``` + +#### Parameters + + + + + + + + + +#### Returns + +`Self` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 391. + +## Type Aliases + +### Target + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 413. + +## Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 385. diff --git a/fern/products/sdk-reference/rust/signalwire/relay/action/index.mdx b/fern/products/sdk-reference/rust/signalwire/relay/action/index.mdx new file mode 100644 index 0000000000..80cd967c70 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/relay/action/index.mdx @@ -0,0 +1,456 @@ +--- +slug: "/reference/rust/signalwire/relay/action" +title: "action" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::relay::action" + parent: "signalwire::relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs" + visibility: "public" +--- +# `action` + +Base class for all RELAY call actions (play, record, collect, etc.). + +An Action is the client-side handle returned when you start an +asynchronous operation on a call. It accumulates events, tracks +state, and resolves once the operation reaches a terminal state. + +## Signature + +```rust +struct Action { /* fields */ } +``` + +## Classes + + + + + + + + + + + + + + + + + + + + + + + +## Methods + +### call\_id + +#### Signature + +```rust +fn call_id(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 75. + +*** + +### control\_id + +#### Signature + +```rust +fn control_id(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 71. + +*** + +### events + +#### Signature + +```rust +fn events(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 99. + +*** + +### execute\_subcommand + +Send a sub-command RPC through the client. + +#### Signature + +```rust +fn execute_subcommand(&self, method: &str, extra: ?) +``` + +#### Parameters + + + + + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 199. + +*** + +### handle\_event + +Append an incoming event and update local state / payload. +Subclasses override `should_handle_event` to filter. + +#### Signature + +```rust +fn handle_event(&self, event: &?) +``` + +#### Parameters + + + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 139. + +*** + +### is\_done + +#### Signature + +```rust +fn is_done(&self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 83. + +*** + +### new + +#### Signature + +```rust +fn new(control_id: &str, call_id: &str, node_id: &str) -> Self +``` + +#### Parameters + + + + + + + +#### Returns + +`Self` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 40. + +*** + +### node\_id + +#### Signature + +```rust +fn node_id(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 79. + +*** + +### on\_completed + +Register a callback to fire when the action completes. +If the action is already done, the callback fires immediately. + +#### Signature + +```rust +fn on_completed(&self, cb: F) +``` + +#### Type Parameters + + + +#### Parameters + + + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 123. + +*** + +### payload + +#### Signature + +```rust +fn payload(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 95. + +*** + +### resolve + +Mark this action as completed. + +#### Signature + +```rust +fn resolve(&self, result: ?) +``` + +#### Parameters + + + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 168. + +*** + +### result + +#### Signature + +```rust +fn result(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 91. + +*** + +### set\_notify\_sender + +Install a channel sender so that `wait_sync()` can block until +the action resolves. + +#### Signature + +```rust +fn set_notify_sender(&self, tx: ?<()>) +``` + +#### Parameters + + + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 113. + +*** + +### state + +#### Signature + +```rust +fn state(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 87. + +*** + +### stop + +Stop the running action by sending its stop sub-command. + +#### Signature + +```rust +fn stop(&self) +``` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 192. + +*** + +### stop\_method + +#### Signature + +```rust +fn stop_method(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 103. + +*** + +### with\_stop\_method + +#### Signature + +```rust +fn with_stop_method( + control_id: &str, + call_id: &str, + node_id: &str, + stop_method: &str +) -> Self +``` + +#### Parameters + + + + + + + + + +#### Returns + +`Self` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 44. + +## Type Aliases + +### CompletedCallback + +Callback type for completion notifications. + +#### Signature + +```rust +type CompletedCallback = ? +``` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 9. + +## Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 20. diff --git a/fern/products/sdk-reference/rust/signalwire/relay/action/pay-action/index.mdx b/fern/products/sdk-reference/rust/signalwire/relay/action/pay-action/index.mdx new file mode 100644 index 0000000000..469469a354 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/relay/action/pay-action/index.mdx @@ -0,0 +1,114 @@ +--- +slug: "/reference/rust/signalwire/relay/action/pay-action" +title: "PayAction" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::relay::action::PayAction" + parent: "signalwire::relay::action" + module: "relay.action" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs" + visibility: "public" +--- +# `PayAction` + +## Signature + +```rust +struct PayAction { /* fields */ } +``` + +## Inheritance + +**Implements:** `Deref` + +## Properties + + + +## Methods + +### action + +#### Signature + +```rust +fn action(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 423. + +*** + +### deref + +#### Signature + +```rust +fn deref(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 423. + +*** + +### new + +#### Signature + +```rust +fn new(control_id: &str, call_id: &str, node_id: &str) -> Self +``` + +#### Parameters + + + + + + + +#### Returns + +`Self` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 423. + +## Type Aliases + +### Target + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 423. + +## Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 423. diff --git a/fern/products/sdk-reference/rust/signalwire/relay/action/play-action/index.mdx b/fern/products/sdk-reference/rust/signalwire/relay/action/play-action/index.mdx new file mode 100644 index 0000000000..080c4cce71 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/relay/action/play-action/index.mdx @@ -0,0 +1,166 @@ +--- +slug: "/reference/rust/signalwire/relay/action/play-action" +title: "PlayAction" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::relay::action::PlayAction" + parent: "signalwire::relay::action" + module: "relay.action" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs" + visibility: "public" +--- +# `PlayAction` + +## Signature + +```rust +struct PlayAction { /* fields */ } +``` + +## Inheritance + +**Implements:** `Deref` + +## Properties + + + +## Methods + +### action + +#### Signature + +```rust +fn action(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 279. + +*** + +### deref + +#### Signature + +```rust +fn deref(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 279. + +*** + +### new + +#### Signature + +```rust +fn new(control_id: &str, call_id: &str, node_id: &str) -> Self +``` + +#### Parameters + + + + + + + +#### Returns + +`Self` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 279. + +*** + +### pause + +#### Signature + +```rust +fn pause(&self) +``` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 282. + +*** + +### resume + +#### Signature + +```rust +fn resume(&self) +``` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 286. + +*** + +### volume + +#### Signature + +```rust +fn volume(&self, db: f64) +``` + +#### Parameters + + + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 290. + +## Type Aliases + +### Target + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 279. + +## Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 279. diff --git a/fern/products/sdk-reference/rust/signalwire/relay/action/record-action/index.mdx b/fern/products/sdk-reference/rust/signalwire/relay/action/record-action/index.mdx new file mode 100644 index 0000000000..e58bbd312f --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/relay/action/record-action/index.mdx @@ -0,0 +1,206 @@ +--- +slug: "/reference/rust/signalwire/relay/action/record-action" +title: "RecordAction" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::relay::action::RecordAction" + parent: "signalwire::relay::action" + module: "relay.action" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs" + visibility: "public" +--- +# `RecordAction` + +## Signature + +```rust +struct RecordAction { /* fields */ } +``` + +## Inheritance + +**Implements:** `Deref` + +## Properties + + + +## Methods + +### action + +#### Signature + +```rust +fn action(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 299. + +*** + +### deref + +#### Signature + +```rust +fn deref(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 299. + +*** + +### duration + +#### Signature + +```rust +fn duration(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 317. + +*** + +### new + +#### Signature + +```rust +fn new(control_id: &str, call_id: &str, node_id: &str) -> Self +``` + +#### Parameters + + + + + + + +#### Returns + +`Self` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 299. + +*** + +### pause + +#### Signature + +```rust +fn pause(&self) +``` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 302. + +*** + +### resume + +#### Signature + +```rust +fn resume(&self) +``` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 306. + +*** + +### size + +#### Signature + +```rust +fn size(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 321. + +*** + +### url + +#### Signature + +```rust +fn url(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 310. + +## Type Aliases + +### Target + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 299. + +## Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 299. diff --git a/fern/products/sdk-reference/rust/signalwire/relay/action/stream-action/index.mdx b/fern/products/sdk-reference/rust/signalwire/relay/action/stream-action/index.mdx new file mode 100644 index 0000000000..9baf6dfa61 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/relay/action/stream-action/index.mdx @@ -0,0 +1,114 @@ +--- +slug: "/reference/rust/signalwire/relay/action/stream-action" +title: "StreamAction" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::relay::action::StreamAction" + parent: "signalwire::relay::action" + module: "relay.action" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs" + visibility: "public" +--- +# `StreamAction` + +## Signature + +```rust +struct StreamAction { /* fields */ } +``` + +## Inheritance + +**Implements:** `Deref` + +## Properties + + + +## Methods + +### action + +#### Signature + +```rust +fn action(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 422. + +*** + +### deref + +#### Signature + +```rust +fn deref(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 422. + +*** + +### new + +#### Signature + +```rust +fn new(control_id: &str, call_id: &str, node_id: &str) -> Self +``` + +#### Parameters + + + + + + + +#### Returns + +`Self` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 422. + +## Type Aliases + +### Target + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 422. + +## Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 422. diff --git a/fern/products/sdk-reference/rust/signalwire/relay/action/tap-action/index.mdx b/fern/products/sdk-reference/rust/signalwire/relay/action/tap-action/index.mdx new file mode 100644 index 0000000000..d321787786 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/relay/action/tap-action/index.mdx @@ -0,0 +1,114 @@ +--- +slug: "/reference/rust/signalwire/relay/action/tap-action" +title: "TapAction" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::relay::action::TapAction" + parent: "signalwire::relay::action" + module: "relay.action" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs" + visibility: "public" +--- +# `TapAction` + +## Signature + +```rust +struct TapAction { /* fields */ } +``` + +## Inheritance + +**Implements:** `Deref` + +## Properties + + + +## Methods + +### action + +#### Signature + +```rust +fn action(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 421. + +*** + +### deref + +#### Signature + +```rust +fn deref(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 421. + +*** + +### new + +#### Signature + +```rust +fn new(control_id: &str, call_id: &str, node_id: &str) -> Self +``` + +#### Parameters + + + + + + + +#### Returns + +`Self` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 421. + +## Type Aliases + +### Target + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 421. + +## Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 421. diff --git a/fern/products/sdk-reference/rust/signalwire/relay/action/transcribe-action/index.mdx b/fern/products/sdk-reference/rust/signalwire/relay/action/transcribe-action/index.mdx new file mode 100644 index 0000000000..cfbbd276c6 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/relay/action/transcribe-action/index.mdx @@ -0,0 +1,114 @@ +--- +slug: "/reference/rust/signalwire/relay/action/transcribe-action" +title: "TranscribeAction" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::relay::action::TranscribeAction" + parent: "signalwire::relay::action" + module: "relay.action" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs" + visibility: "public" +--- +# `TranscribeAction` + +## Signature + +```rust +struct TranscribeAction { /* fields */ } +``` + +## Inheritance + +**Implements:** `Deref` + +## Properties + + + +## Methods + +### action + +#### Signature + +```rust +fn action(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 424. + +*** + +### deref + +#### Signature + +```rust +fn deref(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 424. + +*** + +### new + +#### Signature + +```rust +fn new(control_id: &str, call_id: &str, node_id: &str) -> Self +``` + +#### Parameters + + + + + + + +#### Returns + +`Self` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 424. + +## Type Aliases + +### Target + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 424. + +## Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 424. diff --git a/fern/products/sdk-reference/rust/signalwire/relay/call/index.mdx b/fern/products/sdk-reference/rust/signalwire/relay/call/index.mdx new file mode 100644 index 0000000000..e88a2e7fdf --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/relay/call/index.mdx @@ -0,0 +1,1436 @@ +--- +slug: "/reference/rust/signalwire/relay/call" +title: "call" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::relay::call" + parent: "signalwire::relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs" + visibility: "public" +--- +# `call` + +Represents a RELAY voice call. + +Holds call-level state, dispatches server events to registered listeners +and to in-flight Action objects, and exposes every calling.\* RPC method +as a first-class Rust method. + +## Signature + +```rust +struct Call { /* fields */ } +``` + +## Properties + + + + + + + + + + + + + + + + + + + + + + + +## Methods + +### ai + +#### Signature + +```rust +fn ai(&self, params: ?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 361. + +*** + +### ai\_hold + +#### Signature + +```rust +fn ai_hold(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 285. + +*** + +### ai\_message + +#### Signature + +```rust +fn ai_message(&self, params: ?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 281. + +*** + +### ai\_unhold + +#### Signature + +```rust +fn ai_unhold(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 289. + +*** + +### amazon\_bedrock + +#### Signature + +```rust +fn amazon_bedrock(&self, params: ?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 277. + +*** + +### answer + +#### Signature + +```rust +fn answer(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 201. + +*** + +### bind\_digit + +#### Signature + +```rust +fn bind_digit(&self, params: ?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 253. + +*** + +### call\_state + +Current call state as a typed \[`CallState`]. + +The typed counterpart to `current_state`: both +read the same underlying string, so +`call.call_state().as_str() == call.current_state()` always holds. An +unrecognised server value parses to \[`CallState::Other`] rather than +panicking. Enables `match call.call_state() { CallState::Ended => …, … }` +and `call.call_state().is_terminal()` instead of stringly comparisons. + +**Decorators:** `@must_use` + +#### Signature + +```rust +fn call_state(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 101. + +*** + +### clear\_digit\_bindings + +#### Signature + +```rust +fn clear_digit_bindings(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 257. + +*** + +### collect + +#### Signature + +```rust +fn collect(&self, params: ?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 325. + +*** + +### connect + +#### Signature + +```rust +fn connect(&self, params: ?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 213. + +*** + +### current\_state + +Current call state. + +#### Signature + +```rust +fn current_state(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 88. + +*** + +### denoise + +#### Signature + +```rust +fn denoise(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 229. + +*** + +### denoise\_stop + +#### Signature + +```rust +fn denoise_stop(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 233. + +*** + +### detect + +#### Signature + +```rust +fn detect(&self, params: ?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 333. + +*** + +### detect\_answering\_machine + +Detect human vs answering machine (AMD). Typed convenience over +\[`Call::detect`]. + +Wire shape: `detect {"type":"machine","params":{...only-provided...}}` +with an optional top-level `timeout`. `opts` may carry any of +`initial_timeout`, `end_silence_timeout`, `machine_voice_threshold`, +`machine_words_threshold`, `detect_interruptions`, +`detect_message_end`, and `timeout`. + +#### Signature + +```rust +fn detect_answering_machine(&self, opts: ?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 486. + +*** + +### detect\_digit + +Detect DTMF digits. Typed convenience over \[`Call::detect`]. + +Wire shape: `detect {"type":"digit","params":{digits?}}` with an +optional top-level `timeout`. `opts` may carry `digits` (string) +and `timeout` (number). + +#### Signature + +```rust +fn detect_digit(&self, opts: ?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 462. + +*** + +### detect\_fax + +Detect a fax tone (CED/CNG). Typed convenience over \[`Call::detect`]. + +Wire shape: `detect {"type":"fax","params":{tone?}}` with an optional +top-level `timeout`. `opts` may carry `tone` (string) and `timeout` +(number). + +#### Signature + +```rust +fn detect_fax(&self, opts: ?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 516. + +*** + +### disconnect + +#### Signature + +```rust +fn disconnect(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 217. + +*** + +### dispatch\_event + +Central event router invoked by the Client whenever a server event +targets this call. + +#### Signature + +```rust +fn dispatch_event(&self, event: &?) +``` + +#### Parameters + + + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 121. + +*** + +### echo\_call + +#### Signature + +```rust +fn echo_call(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 249. + +*** + +### hangup + +#### Signature + +```rust +fn hangup(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 205. + +*** + +### hold + +#### Signature + +```rust +fn hold(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 221. + +*** + +### join\_conference + +#### Signature + +```rust +fn join_conference(&self, params: ?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 241. + +*** + +### join\_room + +#### Signature + +```rust +fn join_room(&self, params: ?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 269. + +*** + +### leave\_conference + +#### Signature + +```rust +fn leave_conference(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 245. + +*** + +### leave\_room + +#### Signature + +```rust +fn leave_room(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 273. + +*** + +### live\_transcribe + +#### Signature + +```rust +fn live_transcribe(&self, params: ?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 261. + +*** + +### live\_translate + +#### Signature + +```rust +fn live_translate(&self, params: ?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 265. + +*** + +### new + +Construct a Call from a server params object. + +#### Signature + +```rust +fn new(params: &?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 47. + +*** + +### on + +Register a generic event listener on this call. + +#### Signature + +```rust +fn on(&self, cb: F) +``` + +#### Type Parameters + + + +#### Parameters + + + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 182. + +*** + +### pass + +#### Signature + +```rust +fn pass(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 209. + +*** + +### pay + +#### Signature + +```rust +fn pay(&self, params: ?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 353. + +*** + +### play + +#### Signature + +```rust +fn play(&self, params: ?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 317. + +*** + +### play\_and\_collect + +#### Signature + +```rust +fn play_and_collect(&self, params: ?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 329. + +*** + +### play\_audio + +Play an audio file from a URL. Typed convenience over \[`Call::play`]. + +Wire shape: `play [{"type":"audio","params":{"url":...}}]` with an +optional top-level `volume` (read from `opts`). + +#### Signature + +```rust +fn play_audio(&self, url: &str, opts: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 412. + +*** + +### play\_ringtone + +Play a named ringtone by country code. Typed convenience over +\[`Call::play`]. + +Wire shape: `play [{"type":"ringtone","params":{"name":..., +duration?}}]` with an optional top-level `volume`. +`opts` may carry `duration` and `volume` (numbers). + +#### Signature + +```rust +fn play_ringtone(&self, name: &str, opts: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 440. + +*** + +### play\_silence + +Play silence for `duration` seconds. Typed convenience over +\[`Call::play`]. + +Wire shape: `play [{"type":"silence","params":{"duration":...}}]`. + +#### Signature + +```rust +fn play_silence(&self, duration: f64) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 428. + +*** + +### play\_tts + +Play text-to-speech. Typed convenience over \[`Call::play`]. + +Wire shape: `play [{"type":"tts","params":{"text":...,language?, +gender?,voice?}}]` with an optional top-level `volume`. +`opts` may carry `language`, `gender`, `voice` (strings) and +`volume` (number). + +#### Signature + +```rust +fn play_tts(&self, text: &str, opts: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 389. + +*** + +### prompt\_audio + +Play an audio file then collect input. Typed media over +\[`Call::play_and_collect`]. + +Wire shape: `play_and_collect [{"type":"audio","params":{"url":...}}]` +with the given `collect` object and an optional top-level `volume`. +`opts` may carry `volume` (number). + +#### Signature + +```rust +fn prompt_audio(&self, url: &str, collect: ?, opts: ?) -> ? +``` + +#### Parameters + + + + + + + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 565. + +*** + +### prompt\_tts + +Play TTS then collect input. Typed media over +\[`Call::play_and_collect`]. + +Wire shape: `play_and_collect [{"type":"tts","params":{"text":..., +language?,gender?,voice?}}]` with the given `collect` object and an +optional top-level `volume`. `opts` may carry `language`, `gender`, +`voice` (strings) and `volume` (number). + +#### Signature + +```rust +fn prompt_tts(&self, text: &str, collect: ?, opts: ?) -> ? +``` + +#### Parameters + + + + + + + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 539. + +*** + +### queue\_enter + +#### Signature + +```rust +fn queue_enter(&self, params: ?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 297. + +*** + +### queue\_leave + +#### Signature + +```rust +fn queue_leave(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 301. + +*** + +### receive\_fax + +#### Signature + +```rust +fn receive_fax(&self, params: ?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 341. + +*** + +### record + +#### Signature + +```rust +fn record(&self, params: ?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 321. + +*** + +### refer\_call + +#### Signature + +```rust +fn refer_call(&self, params: ?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 305. + +*** + +### repr + +Python-style `__repr__` (mirrors `Call.__repr__` in the +signalwire-python reference). Returns a string of the form +`Call(call_id=..., state=...)`. + +#### Signature + +```rust +fn repr(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 108. + +*** + +### resolve\_all\_actions + +Mark every outstanding action as completed. + +#### Signature + +```rust +fn resolve_all_actions(&self) +``` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 190. + +*** + +### send\_digits + +#### Signature + +```rust +fn send_digits(&self, params: ?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 309. + +*** + +### send\_fax + +#### Signature + +```rust +fn send_fax(&self, params: ?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 337. + +*** + +### stream + +#### Signature + +```rust +fn stream(&self, params: ?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 349. + +*** + +### tap + +#### Signature + +```rust +fn tap(&self, params: ?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 345. + +*** + +### transcribe + +#### Signature + +```rust +fn transcribe(&self, params: ?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 357. + +*** + +### transfer + +#### Signature + +```rust +fn transfer(&self, params: ?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 237. + +*** + +### unhold + +#### Signature + +```rust +fn unhold(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 225. + +*** + +### user\_event + +#### Signature + +```rust +fn user_event(&self, params: ?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 293. + +## Type Aliases + +### CallEventCallback + +Callback type for call-level event listeners. + +#### Signature + +```rust +type CallEventCallback = ? +``` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 12. + +## Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 19. diff --git a/fern/products/sdk-reference/rust/signalwire/relay/client/index.mdx b/fern/products/sdk-reference/rust/signalwire/relay/client/index.mdx new file mode 100644 index 0000000000..2d91ac114d --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/relay/client/index.mdx @@ -0,0 +1,932 @@ +--- +slug: "/reference/rust/signalwire/relay/client" +title: "client" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::relay::client" + parent: "signalwire::relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs" + visibility: "public" +--- +# `client` + +RELAY Client -- manages the WebSocket connection to SignalWire, sends +JSON-RPC requests, and dispatches inbound events to the correct Call +or Message objects. + +The transport is a real WebSocket connection over TCP (plus TLS for +`wss://`). One reader thread (spawned on `connect()`) owns the read +half and dispatches every inbound JSON-RPC frame through +`handle_message`. Writes go through `send()` which serializes the +frame and pushes it onto an mpsc channel that the reader thread +drains alongside its read loop, so all socket I/O is single- +threaded but both directions make forward progress. + +Tests still use `sent_messages` to inspect what the client _would_ +have written; `send()` mirrors every frame into that Vec whether or +not a live socket is attached. That keeps the unit tests covering +dispatch logic working without a real RELAY server. + +## Signature + +```rust +struct Client { /* fields */ } +``` + +## Properties + + + + + + + + + + + + + + + + + + + + + Messages sent through the transport (for testing). + + + + + + +## Methods + +### authenticate + +Backwards-compat: enqueue the `signalwire.connect` frame without +waiting. Used by older tests that drive `handle_message` directly. +Production code should call \[`connect`] which runs the full +handshake. + +#### Signature + +```rust +fn authenticate(&self) +``` + +#### Source + +[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) + +Line 480. + +*** + +### authenticate\_blocking + +Send the `signalwire.connect` RPC and block until the response +arrives or the handshake times out. The response carries the +server-assigned protocol string and authorization state. + +#### Signature + +```rust +fn authenticate_blocking(&self) -> ?<(), ?> +``` + +#### Returns + +`?<(), ?>` + +#### Source + +[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) + +Line 365. + +*** + +### bump\_reconnect\_delay + +Compute the next reconnect delay (1s → 2s → 4s → … → 30s) and +return the value to wait _this_ time. Mirrors Python's +`RECONNECT_MIN_DELAY` / `RECONNECT_MAX_DELAY` / backoff factor. +Exposed (and tested) separately from \[`reconnect`] so the math +is verifiable without opening a real socket. + +#### Signature + +```rust +fn bump_reconnect_delay(&self) -> u64 +``` + +#### Returns + +`u64` + +#### Source + +[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) + +Line 541. + +*** + +### connect + +Open the WebSocket connection, run the `signalwire.connect` +handshake, subscribe to the configured contexts, and spawn the +reader thread that dispatches every inbound frame through +`handle_message`. + +Reads the WebSocket scheme from `SIGNALWIRE_RELAY_SCHEME` (defaults +to `wss`; the audit fixture sets `ws`) and the host override from +`SIGNALWIRE_RELAY_HOST` (used by the audit fixture to point at a +`127.0.0.1:N` ephemeral port). In production neither env var is +usually set and the URL resolves to `wss://{self.host}/api/relay/ws`, +matching Python's `RelayClient.connect()`. + +Returns `Err` if the TCP/WS upgrade fails, the server rejects the +connect handshake, or the response doesn't arrive within +`HANDSHAKE_TIMEOUT`. + +#### Signature + +```rust +fn connect(&self) -> ?<(), ?> +``` + +#### Returns + +`?<(), ?>` + +#### Source + +[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) + +Line 294. + +*** + +### connect\_fresh + +Initial connect -- resets reconnect delay and connects. + +#### Signature + +```rust +fn connect_fresh(&self) -> ?<(), ?> +``` + +#### Returns + +`?<(), ?>` + +#### Source + +[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) + +Line 357. + +*** + +### dial\_blocking + +Initiate an outbound call using `calling.dial`. + +Mirrors Python's `RelayClient.dial`. The dial response carries no +`call_id` — the actual call info arrives via subsequent +`calling.call.dial` events keyed by `tag`. This method waits for +that event up to `dial_timeout` and returns the resolved Call. + +`devices` is the standard serial/parallel device matrix +(`[[device]]` for one parallel leg / serial = one inner list with +multiple devices). + +#### Signature + +```rust +fn dial_blocking( + &self, + devices: ?, + tag: ?<&str>, + max_duration: ?, + dial_timeout: ? +) -> ?, ?> +``` + +#### Parameters + + + + + + + + + +#### Returns + +`?, ?>` + +#### Source + +[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) + +Line 1014. + +*** + +### disconnect + +Gracefully close the connection. Signals the reader thread to +exit, sends a WS close frame, and joins the thread. + +#### Signature + +```rust +fn disconnect(&self) +``` + +#### Source + +[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) + +Line 504. + +*** + +### execute\_blocking + +Send a JSON-RPC request for a calling/messaging method. + +Mirrors Python's `RelayClient._send_request`: emits a flat-Blade +frame `{"method": , "params": }` directly — no +`signalwire.execute` wrapper. Both forms are accepted by the +production RELAY server and the mock; the flat form is what +every existing SDK port emits because it keeps the journal +filterable by inner method name without unwrapping. + +Returns the response's `result` value on success, or an `Err` +with the server's error message on failure or timeout. + +#### Signature + +```rust +fn execute_blocking(&self, method: &str, inner_params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) + +Line 872. + +*** + +### from\_env + +Create from env vars SIGNALWIRE\_PROJECT\_ID, SIGNALWIRE\_API\_TOKEN, SIGNALWIRE\_SPACE. + +#### Signature + +```rust +fn from_env() -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) + +Line 265. + +*** + +### get\_call + +Get a call by ID. + +#### Signature + +```rust +fn get_call(&self, call_id: &str) -> ?> +``` + +#### Parameters + + + +#### Returns + +`?>` + +#### Source + +[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) + +Line 820. + +*** + +### get\_message + +Get a message by ID. + +#### Signature + +```rust +fn get_message(&self, message_id: &str) -> ?> +``` + +#### Parameters + + + +#### Returns + +`?>` + +#### Source + +[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) + +Line 825. + +*** + +### handle\_event + +Route a signalwire.event payload to the appropriate handler. + +#### Signature + +```rust +fn handle_event(&self, outer_params: &?) +``` + +#### Parameters + + + +#### Source + +[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) + +Line 676. + +*** + +### handle\_message + +Parse a raw JSON string from the server and route it. + +#### Signature + +```rust +fn handle_message(&self, raw: &str) +``` + +#### Parameters + + + +#### Source + +[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) + +Line 621. + +*** + +### is\_connected + +#### Signature + +```rust +fn is_connected(&self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) + +Line 548. + +*** + +### is\_running + +#### Signature + +```rust +fn is_running(&self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) + +Line 552. + +*** + +### new + +#### Signature + +```rust +fn new(project: &str, token: &str, host: &str) -> Self +``` + +#### Parameters + + + + + + + +#### Returns + +`Self` + +#### Source + +[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) + +Line 236. + +*** + +### on\_call + +Register a handler for inbound calls. + +#### Signature + +```rust +fn on_call, &?) + ? + ? + 'static>(&self, cb: F) +``` + +#### Type Parameters + + + +#### Parameters + + + +#### Source + +[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) + +Line 805. + +*** + +### on\_event + +Register a generic event handler. + +#### Signature + +```rust +fn on_event(&self, cb: F) +``` + +#### Type Parameters + + + +#### Parameters + + + +#### Source + +[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) + +Line 815. + +*** + +### on\_message + +Register a handler for inbound messages. + +#### Signature + +```rust +fn on_message(&self, cb: F) +``` + +#### Type Parameters + + + +#### Parameters + + + +#### Source + +[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) + +Line 810. + +*** + +### receive + +Subscribe to one or more inbound contexts. + +#### Signature + +```rust +fn receive(&self, contexts: &[?]) +``` + +#### Parameters + + + +#### Source + +[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) + +Line 781. + +*** + +### reconnect + +Reconnect with exponential back-off (1s → 30s cap). Sleeps for +the current delay, doubles the delay (capped at 30s), and runs +the full connect handshake again. Authorization state survives +across reconnects because \[`authenticate_blocking`] re-sends the +stored token on the new socket. + +#### Signature + +```rust +fn reconnect(&self) -> ?<(), ?> +``` + +#### Returns + +`?<(), ?>` + +#### Source + +[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) + +Line 525. + +*** + +### register\_dial + +Register a pending dial. + +#### Signature + +```rust +fn register_dial) + ? + 'static>(&self, tag: &str, resolve: F) +``` + +#### Type Parameters + + + +#### Parameters + + + + + +#### Source + +[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) + +Line 838. + +*** + +### register\_pending + +Register a pending-response slot for a request ID. + +#### Signature + +```rust +fn register_pending( + &self, + id: &str, + resolve: R, + reject: E +) where R: ?(?) + ? + 'static, E: ?(?) + ? + 'static +``` + +#### Type Parameters + + + + + +#### Parameters + + + + + + + +#### Source + +[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) + +Line 574. + +*** + +### remove\_pending\_dial + +Remove a pending dial. + +#### Signature + +```rust +fn remove_pending_dial(&self, tag: &str) +``` + +#### Parameters + + + +#### Source + +[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) + +Line 853. + +*** + +### send + +Send a raw JSON message through the transport. + +Records the frame in `sent_messages` (used by tests and for debug +inspection) and, when a live socket is attached, enqueues the +frame on the writer channel so the reader thread flushes it to +the WebSocket. With no live socket attached the call is purely +in-memory — that's the path the dispatch unit tests below take. + +#### Signature + +```rust +fn send(&self, msg: &?) +``` + +#### Parameters + + + +#### Source + +[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) + +Line 595. + +*** + +### send\_ack + +Send an acknowledgement for a server-initiated request. + +#### Signature + +```rust +fn send_ack(&self, id: &str) +``` + +#### Parameters + + + +#### Source + +[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) + +Line 608. + +*** + +### send\_message\_blocking + +Send an outbound SMS/MMS message. + +Mirrors Python's `RelayClient.send_message`. At least one of +`body` or `media` must be supplied. Returns a tracked `Message` +whose state will progress as `messaging.state` events arrive +from the server. + +#### Signature + +```rust +fn send_message_blocking( + &self, + to_number: &str, + from_number: &str, + body: ?<&str>, + media: ?<&[?]>, + tags: ?<&[?]>, + context: ?<&str> +) -> ?, ?> +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`?, ?>` + +#### Source + +[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) + +Line 927. + +*** + +### send\_request + +Build and send a JSON-RPC request. Returns the message ID. + +#### Signature + +```rust +fn send_request(&self, method: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) + +Line 561. + +*** + +### track\_message + +Track a new message. + +#### Signature + +```rust +fn track_message(&self, message_id: &str, msg: ?) +``` + +#### Parameters + + + + + +#### Source + +[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) + +Line 830. + +*** + +### unreceive + +Unsubscribe from one or more contexts. + +#### Signature + +```rust +fn unreceive(&self, contexts: &[?]) +``` + +#### Parameters + + + +#### Source + +[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) + +Line 795. + +## Type Aliases + +### OnCallHandler + +Callback type for inbound call handler. + +#### Signature + +```rust +type OnCallHandler = ? +``` + +#### Source + +[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) + +Line 147. + +*** + +### OnEventHandler + +Callback type for generic events. + +#### Signature + +```rust +type OnEventHandler = ? +``` + +#### Source + +[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) + +Line 153. + +*** + +### OnMessageHandler + +Callback type for inbound message handler. + +#### Signature + +```rust +type OnMessageHandler = ? +``` + +#### Source + +[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) + +Line 150. + +## Source + +[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) + +Line 190. diff --git a/fern/products/sdk-reference/rust/signalwire/relay/constants/index.mdx b/fern/products/sdk-reference/rust/signalwire/relay/constants/index.mdx new file mode 100644 index 0000000000..191fc52cbb --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/relay/constants/index.mdx @@ -0,0 +1,148 @@ +--- +slug: "/reference/rust/signalwire/relay/constants" +title: "constants" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::relay::constants" + parent: "signalwire::relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/constants.rs" + visibility: "public" +--- +# `constants` + +RELAY module -- real-time event signalling over WebSocket (JSON-RPC 2.0). + +Provides constants, event/action primitives, call control, message +tracking, and the async-ready `Client` that ties everything together. + +## Constants + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + RELAY protocol constants. Mirrors the PHP `Constants` class: protocol version, call/dial/message states, terminal-state maps, and per-event-type action terminal states. Protocol version exchanged during `signalwire.connect`. + + + + + + +## Functions + +### is\_action\_terminal + +Returns `true` when the given `(event_type, action_state)` pair represents +a terminal state for an in-flight action. + +#### Signature + +```rust +fn is_action_terminal(event_type: &str, state: &str) -> bool +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`src/relay/constants.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/constants.rs) + +Line 60. + +*** + +### is\_call\_terminal + +Returns `true` when the call state is terminal (i.e. `"ended"`). + +#### Signature + +```rust +fn is_call_terminal(state: &str) -> bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/relay/constants.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/constants.rs) + +Line 22. + +*** + +### is\_message\_terminal + +Returns `true` when the message state is terminal. + +#### Signature + +```rust +fn is_message_terminal(state: &str) -> bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/relay/constants.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/constants.rs) + +Line 47. + +## Source + +[`src/relay/constants.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/constants.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/relay/device/index.mdx b/fern/products/sdk-reference/rust/signalwire/relay/device/index.mdx new file mode 100644 index 0000000000..cc50f50c40 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/relay/device/index.mdx @@ -0,0 +1,321 @@ +--- +slug: "/reference/rust/signalwire/relay/device" +title: "device" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::relay::device" + parent: "signalwire::relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/device.rs" + visibility: "public" +--- +# `device` + +A typed RELAY device descriptor (`{type, params}`). + +`type` is the device-kind discriminant (kept as a `String` — the wire +contract does not enumerate it). `params` is the device-specific +parameter object (e.g. `{to_number, from_number}` for a `phone`). + +Build one with \[`Device::new`] (raw params) or \[`Device::phone`] / +\[`Device::sip`] convenience constructors, then hand its +`to_value` to any device-taking call: + +```ignore +let dev = Device::phone("+15551112222", "+15553334444"); +// single parallel leg = one inner list +let devices = Device::matrix(&[&[dev]]); +client.dial_blocking(devices, None, None, timeout); +``` + +## Signature + +```rust +struct Device { /* fields */ } +``` + +## Inheritance + +**Implements:** `Debug`, `Clone`, `PartialEq` + +## Examples + +```rust +let dev = Device::phone("+15551112222", "+15553334444"); +// single parallel leg = one inner list +let devices = Device::matrix(&[&[dev]]); +client.dial_blocking(devices, None, None, timeout); +``` + +## Properties + + + Device kind discriminant (`phone`, `sip`, `webrtc`, `rtp`, …). A plain string: the wire schema does not enumerate it. + + + + Device-specific parameters object. + + +## Methods + +### clone + +#### Signature + +```rust +fn clone(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/device.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/device.rs) + +Line 38. + +*** + +### eq + +#### Signature + +```rust +fn eq(&self, other: &?) -> bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/relay/device.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/device.rs) + +Line 38. + +*** + +### fmt + +#### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/relay/device.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/device.rs) + +Line 38. + +*** + +### matrix + +Build the serial/parallel device **matrix** (`[[device, …], …]`) that +`dial` / `connect` take, from rows of devices. + +Each inner slice is one _serial_ attempt; the outer slice runs its +rows in _parallel_. `Device::matrix(&[&[a, b]])` = try `a` then `b` +in one parallel leg; `Device::matrix(&[&[a], &[b]])` = ring `a` and +`b` in parallel. + +**Decorators:** `@must_use` + +#### Signature + +```rust +fn matrix(rows: &[&[?]]) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/relay/device.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/device.rs) + +Line 121. + +*** + +### new + +Build a device from its `type` discriminant and a `params` object. + +A non-object `params` (or \[`Value::Null`]) is normalised to an empty +object on the wire, matching the hand-written `"params": {}` form. + +**Decorators:** `@must_use` + +#### Signature + +```rust +fn new: ?>(device_type: impl ?, params: ?) -> Self +``` + +#### Type Parameters + + + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/relay/device.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/device.rs) + +Line 53. + +*** + +### phone + +A `phone` device with `to_number` / `from_number` params. + +Emits `{"type":"phone","params":{"to_number":…,"from_number":…}}` — +the shape `Client::dial_blocking` and `Call::connect` expect for PSTN +legs. + +**Decorators:** `@must_use` + +#### Signature + +```rust +fn phone: ?, impl Into: ?>( + to_number: impl ?, + from_number: impl ? +) -> Self +``` + +#### Type Parameters + + + + + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/relay/device.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/device.rs) + +Line 66. + +*** + +### sip + +A `sip` device addressed to a SIP URI. + +Emits `{"type":"sip","params":{"to":…,"from":…}}`. + +**Decorators:** `@must_use` + +#### Signature + +```rust +fn sip: ?, impl Into: ?>( + to: impl ?, + from: impl ? +) -> Self +``` + +#### Type Parameters + + + + + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/relay/device.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/device.rs) + +Line 82. + +*** + +### to\_value + +Serialise to the wire device object: `{"type": …, "params": {…}}`. + +Field order is `type` then `params` and `params` is always an object, +so the output is byte-identical to the hand-written +`json!({"type": t, "params": p})` that every existing device call +site uses. (`serde_json` is built with `preserve_order`, so insertion +order is the serialised order.) + +**Decorators:** `@must_use` + +#### Signature + +```rust +fn to_value(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/device.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/device.rs) + +Line 102. + +## Source + +[`src/relay/device.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/device.rs) + +Line 39. diff --git a/fern/products/sdk-reference/rust/signalwire/relay/error/index.mdx b/fern/products/sdk-reference/rust/signalwire/relay/error/index.mdx new file mode 100644 index 0000000000..911ed34caa --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/relay/error/index.mdx @@ -0,0 +1,261 @@ +--- +slug: "/reference/rust/signalwire/relay/error" +title: "error" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::relay::error" + parent: "signalwire::relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/error.rs" + visibility: "public" +--- +# `error` + +Typed error for the RELAY client surface. + +The REST layer already ships a proper error enum +(`SignalWireRestError`); this is the +RELAY-side analogue. Before this, the relay client returned +`Result<_, String>` everywhere — a stringly-typed failure channel that +forces callers to pattern-match on message _text_ to react differently to +(say) an auth rejection vs. a transport drop vs. a timeout. \[`RelayError`] +makes the failure modes a closed, inspectable set, exactly like the REST +exemplar. + +Design notes (idiomatic Rust, matching the REST error's bar): + +- The data each failure carries lives **in the variant**, so callers react + by `match`ing rather than calling accessor getters. That keeps the public + surface to the type + its trait impls (`Display` / \[`std::error::Error`]) + and means the audit sees no new methods. +- `#[non_exhaustive]` because the failure set mirrors transport/server + conditions that can grow (new RELAY error classes) without that being a + breaking change — downstream `match` must carry a wildcard. +- Every variant's \[`Display`] is human-actionable and preserves the same + context the old `format!("…")` strings carried, so log output is no worse. + +## Enums + +### RelayError + +Something went wrong talking to the RELAY WebSocket service. + +Returned by the connection-lifecycle and blocking-RPC methods on +`Client` (e.g. `connect`, `authenticate_blocking`, +`execute_blocking`, `dial_blocking`, `send_message_blocking`). + +#### Signature + +```rust +enum RelayError +``` + +#### Inheritance + +**Implements:** `Debug`, `Clone`, `PartialEq`, `Eq`, `Display`, [Error](/docs/sdk-reference/reference/rust/signalwire/security/webhook-layer/webhook-validate#error) + +#### Variants + + + The RELAY server rejected the `signalwire.connect` authentication handshake. Carries the server-reported reason. + + + + A `dial` completed with a `failed` state or never produced an answer before the dial deadline. Carries the reason / tag. + + + + A required argument was invalid (e.g. `send_message` with neither body nor media). Carries the validation message. + + + + A required environment variable was missing when building the client from the environment (`from_env`). Carries the variable name. + + + + The server returned a JSON-RPC error for a request (e.g. a failed `messaging.send` / `calling.dial`). Carries the inner method and the server's error message. + + + + A blocking call did not receive its response within the deadline. Carries what was being awaited so the log line is actionable. + + + + The underlying WebSocket transport failed to connect, upgrade, read, or write. Carries a human description of the transport-level cause. + + +#### Methods + +##### clone + +###### Signature + +```rust +fn clone(&self) -> ? +``` + +###### Returns + +`?` + +###### Source + +[`src/relay/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/error.rs) + +Line 30. + +*** + +##### eq + +###### Signature + +```rust +fn eq(&self, other: &?) -> bool +``` + +###### Parameters + + + +###### Returns + +`bool` + +###### Source + +[`src/relay/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/error.rs) + +Line 30. + +*** + +##### fmt + +###### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/relay/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/error.rs) + +Line 30. + +*** + +##### fmt + +###### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/relay/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/error.rs) + +Line 105. + +*** + +##### missing\_env + +Build a \[`RelayError::MissingEnv`] for the named variable. + +###### Signature + +```rust +fn missing_env: ?>(var: impl ?) -> Self +``` + +###### Type Parameters + + + +###### Parameters + + + +###### Returns + +`Self` + +###### Source + +[`src/relay/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/error.rs) + +Line 99. + +*** + +##### transport + +Build a \[`RelayError::Transport`] from a context and any `Display` cause. +Convenience for the `map_err(|e| …)` call sites in the client. + +###### Signature + +```rust +fn transport: ?, impl fmt::Display: ?>( + context: impl ?, + source: impl ? +) -> Self +``` + +###### Type Parameters + + + + + +###### Parameters + + + + + +###### Returns + +`Self` + +###### Source + +[`src/relay/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/error.rs) + +Line 91. + +#### Source + +[`src/relay/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/error.rs) + +Line 32. + +## Source + +[`src/relay/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/error.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/relay/event/index.mdx b/fern/products/sdk-reference/rust/signalwire/relay/event/index.mdx new file mode 100644 index 0000000000..6be80928db --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/relay/event/index.mdx @@ -0,0 +1,321 @@ +--- +slug: "/reference/rust/signalwire/relay/event" +title: "event" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::relay::event" + parent: "signalwire::relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/event.rs" + visibility: "public" +--- +# `event` + +A RELAY event received from the SignalWire server. + +Events carry an `event_type` (e.g. `"calling.call.state"`), a +timestamp, and a bag of string-keyed parameters. + +## Signature + +```rust +struct Event { /* fields */ } +``` + +## Inheritance + +**Implements:** `Debug`, `Clone` + +## Methods + +### call\_id + +#### Signature + +```rust +fn call_id(&self) -> ?<&str> +``` + +#### Returns + +`?<&str>` + +#### Source + +[`src/relay/event.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/event.rs) + +Line 61. + +*** + +### clone + +#### Signature + +```rust +fn clone(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/event.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/event.rs) + +Line 7. + +*** + +### control\_id + +#### Signature + +```rust +fn control_id(&self) -> ?<&str> +``` + +#### Returns + +`?<&str>` + +#### Source + +[`src/relay/event.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/event.rs) + +Line 73. + +*** + +### event\_type + +#### Signature + +```rust +fn event_type(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/relay/event.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/event.rs) + +Line 49. + +*** + +### fmt + +#### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/relay/event.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/event.rs) + +Line 7. + +*** + +### new + +Create a new event. If `timestamp` is `0.0`, the current time is used. + +#### Signature + +```rust +fn new(event_type: &str, params: ?, timestamp: f64) -> Self +``` + +#### Parameters + + + + + + + +#### Returns + +`Self` + +#### Source + +[`src/relay/event.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/event.rs) + +Line 16. + +*** + +### node\_id + +#### Signature + +```rust +fn node_id(&self) -> ?<&str> +``` + +#### Returns + +`?<&str>` + +#### Source + +[`src/relay/event.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/event.rs) + +Line 67. + +*** + +### params + +#### Signature + +```rust +fn params(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/relay/event.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/event.rs) + +Line 57. + +*** + +### parse + +Convenience constructor from a `serde_json::Value` params object. + +#### Signature + +```rust +fn parse(event_type: &str, params_value: &?) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/relay/event.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/event.rs) + +Line 34. + +*** + +### state + +#### Signature + +```rust +fn state(&self) -> ?<&str> +``` + +#### Returns + +`?<&str>` + +#### Source + +[`src/relay/event.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/event.rs) + +Line 83. + +*** + +### tag + +#### Signature + +```rust +fn tag(&self) -> ?<&str> +``` + +#### Returns + +`?<&str>` + +#### Source + +[`src/relay/event.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/event.rs) + +Line 79. + +*** + +### timestamp + +#### Signature + +```rust +fn timestamp(&self) -> f64 +``` + +#### Returns + +`f64` + +#### Source + +[`src/relay/event.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/event.rs) + +Line 53. + +*** + +### to\_value + +Serialize back to a JSON-compatible map. + +#### Signature + +```rust +fn to_value(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/event.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/event.rs) + +Line 88. + +## Source + +[`src/relay/event.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/event.rs) + +Line 8. diff --git a/fern/products/sdk-reference/rust/signalwire/relay/index.mdx b/fern/products/sdk-reference/rust/signalwire/relay/index.mdx new file mode 100644 index 0000000000..a1322f1768 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/relay/index.mdx @@ -0,0 +1,65 @@ +--- +slug: "/reference/rust/signalwire/relay" +title: "relay" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::relay" + parent: "signalwire" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/mod.rs" + visibility: "public" +--- +# `relay` + +## Classes + + + + Base class for all RELAY call actions (play, record, collect, etc.). + + + + Represents a RELAY voice call. + + + + RELAY Client -- manages the WebSocket connection to SignalWire, sends JSON-RPC requests, and dispatches inbound events to the correct Call or Message objects. + + + + A typed RELAY device descriptor (`{type, params}`). + + + + A RELAY event received from the SignalWire server. + + + + Represents a RELAY messaging message (SMS / MMS). + + + +## Modules + + + + RELAY module -- real-time event signalling over WebSocket (JSON-RPC 2.0). + + + + Typed error for the RELAY client surface. + + + + Typed RELAY lifecycle-state enums. + + + +## Source + +[`src/relay/mod.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/mod.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/relay/message/index.mdx b/fern/products/sdk-reference/rust/signalwire/relay/message/index.mdx new file mode 100644 index 0000000000..9c102740b4 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/relay/message/index.mdx @@ -0,0 +1,471 @@ +--- +slug: "/reference/rust/signalwire/relay/message" +title: "message" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::relay::message" + parent: "signalwire::relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/message.rs" + visibility: "public" +--- +# `message` + +Represents a RELAY messaging message (SMS / MMS). + +A Message is created when you send or receive a message through the +RELAY messaging namespace. It accumulates state-change events and +resolves once the message reaches a terminal state (delivered, +undelivered, or failed). + +## Signature + +```rust +struct Message { /* fields */ } +``` + +## Methods + +### body + +#### Signature + +```rust +fn body(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/message.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/message.rs) + +Line 144. + +*** + +### context + +#### Signature + +```rust +fn context(&self) -> ?<&str> +``` + +#### Returns + +`?<&str>` + +#### Source + +[`src/relay/message.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/message.rs) + +Line 128. + +*** + +### direction + +#### Signature + +```rust +fn direction(&self) -> ?<&str> +``` + +#### Returns + +`?<&str>` + +#### Source + +[`src/relay/message.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/message.rs) + +Line 132. + +*** + +### dispatch\_event + +Process an inbound event for this message. + +#### Signature + +```rust +fn dispatch_event(&self, event: &?) +``` + +#### Parameters + + + +#### Source + +[`src/relay/message.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/message.rs) + +Line 195. + +*** + +### from\_number + +#### Signature + +```rust +fn from_number(&self) -> ?<&str> +``` + +#### Returns + +`?<&str>` + +#### Source + +[`src/relay/message.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/message.rs) + +Line 136. + +*** + +### is\_done + +#### Signature + +```rust +fn is_done(&self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/relay/message.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/message.rs) + +Line 182. + +*** + +### media + +#### Signature + +```rust +fn media(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/message.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/message.rs) + +Line 148. + +*** + +### message\_id + +#### Signature + +```rust +fn message_id(&self) -> ?<&str> +``` + +#### Returns + +`?<&str>` + +#### Source + +[`src/relay/message.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/message.rs) + +Line 114. + +*** + +### message\_state + +Current delivery state as a typed \[`MessageState`]. + +The typed counterpart to `state`: both read the same +underlying string, so when a state is present +`msg.message_state().unwrap().as_str() == msg.state().unwrap()` holds. +`None` when no state has been observed yet. An unrecognised server +value parses to \[`MessageState::Other`] rather than panicking. Enables +`msg.message_state().map(|s| s.is_terminal())` and `match` instead of +stringly comparisons. + +**Decorators:** `@must_use` + +#### Signature + +```rust +fn message_state(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/message.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/message.rs) + +Line 170. + +*** + +### new + +Build a Message from a params map. + +#### Signature + +```rust +fn new(params: &?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/relay/message.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/message.rs) + +Line 37. + +*** + +### on + +Register a listener that fires on every state-change event. + +#### Signature + +```rust +fn on(&self, cb: F) +``` + +#### Type Parameters + + + +#### Parameters + + + +#### Source + +[`src/relay/message.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/message.rs) + +Line 240. + +*** + +### on\_completed + +Register a callback to fire when the message reaches a terminal state. + +#### Signature + +```rust +fn on_completed(&self, cb: F) +``` + +#### Type Parameters + + + +#### Parameters + + + +#### Source + +[`src/relay/message.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/message.rs) + +Line 248. + +*** + +### reason + +#### Signature + +```rust +fn reason(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/message.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/message.rs) + +Line 178. + +*** + +### repr + +Python-style `__repr__` (mirrors `Message.__repr__` in the +signalwire-python reference). Returns a string of the form +`Message(message_id=..., from=..., to=..., state=...)`. + +#### Signature + +```rust +fn repr(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/message.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/message.rs) + +Line 121. + +*** + +### resolve + +Mark this message as completed. + +#### Signature + +```rust +fn resolve(&self, result: ?) +``` + +#### Parameters + + + +#### Source + +[`src/relay/message.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/message.rs) + +Line 261. + +*** + +### result + +#### Signature + +```rust +fn result(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/message.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/message.rs) + +Line 186. + +*** + +### state + +#### Signature + +```rust +fn state(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/message.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/message.rs) + +Line 156. + +*** + +### tags + +#### Signature + +```rust +fn tags(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/message.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/message.rs) + +Line 152. + +*** + +### to\_number + +#### Signature + +```rust +fn to_number(&self) -> ?<&str> +``` + +#### Returns + +`?<&str>` + +#### Source + +[`src/relay/message.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/message.rs) + +Line 140. + +## Type Aliases + +### MessageCompletedCallback + +Callback type for completion notifications. + +#### Signature + +```rust +type MessageCompletedCallback = ? +``` + +#### Source + +[`src/relay/message.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/message.rs) + +Line 9. + +## Source + +[`src/relay/message.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/message.rs) + +Line 17. diff --git a/fern/products/sdk-reference/rust/signalwire/relay/state-enums/index.mdx b/fern/products/sdk-reference/rust/signalwire/relay/state-enums/index.mdx new file mode 100644 index 0000000000..b86764f8b6 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/relay/state-enums/index.mdx @@ -0,0 +1,928 @@ +--- +slug: "/reference/rust/signalwire/relay/state-enums" +title: "state_enums" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::relay::state_enums" + parent: "signalwire::relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs" + visibility: "public" +--- +# `state_enums` + +Typed RELAY lifecycle-state enums. + +The RELAY protocol carries three _distinct_ server-emitted state +vocabularies — call lifecycle, dial outcome, and message delivery — as +bare strings on the wire. `constants` keeps the raw +string consts and the `is_*_terminal(&str)` predicates (the byte-level +contract); this module layers a typed, idiomatic view on top for the +highest-traffic of those vocabularies. + +Three deliberately separate types — \[`CallState`], \[`DialState`], +\[`MessageState`] — because the three vocabularies are _not_ +interchangeable even where strings coincide (`"answered"` is both a +\[`CallState`] and a \[`DialState`], `"failed"` is both a \[`DialState`] +and a \[`MessageState`], but conflating them would let a message state +leak into a call predicate). The compiler now keeps them apart. + +## Server-growth semantics (why `#[non_exhaustive]` + `Other`) + +Unlike the client-validated closed sets in +`media_enums` (which mirror Python +`ValueError` checks and reject unknown input), these mirror values the +_server_ emits and may add to over time. So each enum: + +- is `#[non_exhaustive]` — downstream `match` must carry a wildcard arm, + so a future server value can't break a consumer at compile time; +- carries an `Other(String)` catch-all so parsing a + never-before-seen state **never panics or loses data** — it round-trips + verbatim through `as_str`; +- parses infallibly via `from_str` / + `FromStr` (an unknown string becomes `Other`, not an error). + +Grounded in the Python reference `relay/constants.py` +(`CALL_STATE_*` / `MESSAGE_STATE_*` / `MESSAGE_TERMINAL_STATES`) and the +port's own `constants` (`DIAL_STATE_*`). The typed +accessors (`Call::call_state` / `Message::message_state`) are exposed +_alongside_ the existing string accessors (`Call::current_state` / +`Message::state`) for parity. + +## Enums + +### CallState + +Call lifecycle state, as carried by `calling.call.state` events. + +Mirrors Python `relay/constants.py` `CALL_STATE_*` +(`created` → `ringing` → `answered` → `ending` → `ended`). The terminal +state is `ended` (see `is_terminal`), matching +\[`constants::is_call_terminal`]. + +`#[non_exhaustive]` — server-emitted; an unrecognised value parses to +`Other` rather than panicking. + +#### Signature + +```rust +enum CallState +``` + +#### Inheritance + +**Implements:** `Debug`, `Clone`, `PartialEq`, `Eq`, `Hash`, `Display`, `FromStr` + +#### Variants + + + `answered` — the call has been answered and is in progress. + + + + `created` — the call object exists but has not started ringing. + + + + `ended` — the call has fully ended (terminal). + + + + `ending` — the call is in the process of tearing down. + + + + Any state the server emits that this enum does not (yet) model. Carries the raw wire string so it round-trips losslessly. + + + + `ringing` — the call is ringing the destination. + + +#### Methods + +##### as\_str + +The canonical wire string for this state (e.g. `"ringing"`). + +For `Other` this is the captured raw string, so +`CallState::from_str(s).as_str() == s` for every `s`. + +**Decorators:** `@must_use` + +###### Signature + +```rust +fn as_str(&self) -> &str +``` + +###### Returns + +`&str` + +###### Source + +[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) + +Line 78. + +*** + +##### clone + +###### Signature + +```rust +fn clone(&self) -> ? +``` + +###### Returns + +`?` + +###### Source + +[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) + +Line 53. + +*** + +##### eq + +###### Signature + +```rust +fn eq(&self, other: &?) -> bool +``` + +###### Parameters + + + +###### Returns + +`bool` + +###### Source + +[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) + +Line 53. + +*** + +##### fmt + +###### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) + +Line 53. + +*** + +##### fmt + +###### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) + +Line 117. + +*** + +##### from\_str + +Parse a wire string into a \[`CallState`]. + +Infallible: an unrecognised value becomes `Other` +(server states can grow). Provided as an inherent method for +ergonomics alongside the \[`FromStr`] impl. + +**Decorators:** `@must_use` + +###### Signature + +```rust +fn from_str(s: &str) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) + +Line 95. + +*** + +##### from\_str + +###### Signature + +```rust +fn from_str(s: &str) -> ?::Err> +``` + +###### Parameters + + + +###### Returns + +`?::Err>` + +###### Source + +[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) + +Line 125. + +*** + +##### hash + +###### Signature + +```rust +fn hash<__H: ?>(&self, state: &mut __H) +``` + +###### Type Parameters + + + +###### Parameters + + + +###### Source + +[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) + +Line 53. + +*** + +##### is\_terminal + +`true` when this is a terminal call state (`ended`). + +Delegates to \[`constants::is_call_terminal`] so the typed and +string predicates can never disagree. + +**Decorators:** `@must_use` + +###### Signature + +```rust +fn is_terminal(&self) -> bool +``` + +###### Returns + +`bool` + +###### Source + +[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) + +Line 111. + +#### Type Aliases + +##### Err + +###### Source + +[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) + +Line 123. + +#### Source + +[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) + +Line 56. + +*** + +### DialState + +Dial outcome state, as carried by `calling.call.dial` events. + +Distinct from \[`CallState`]: a dial reports the _result_ of an outbound +attempt (`dialing` while in flight, then the terminal `answered` / +`failed`), not the lifecycle of an established call. Grounded in the +port's `constants` `DIAL_STATE_*`. + +`#[non_exhaustive]` — server-emitted; unrecognised values parse to +`Other`. + +#### Signature + +```rust +enum DialState +``` + +#### Inheritance + +**Implements:** `Debug`, `Clone`, `PartialEq`, `Eq`, `Hash`, `Display`, `FromStr` + +#### Variants + + + `answered` — a leg answered; the dial succeeded (terminal). + + + + `dialing` — the outbound attempt is in progress (non-terminal). + + + + `failed` — no leg answered; the dial failed (terminal). + + + + Any state the server emits that this enum does not (yet) model. + + +#### Methods + +##### as\_str + +The canonical wire string for this state (e.g. `"dialing"`). + +**Decorators:** `@must_use` + +###### Signature + +```rust +fn as_str(&self) -> &str +``` + +###### Returns + +`&str` + +###### Source + +[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) + +Line 156. + +*** + +##### clone + +###### Signature + +```rust +fn clone(&self) -> ? +``` + +###### Returns + +`?` + +###### Source + +[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) + +Line 139. + +*** + +##### eq + +###### Signature + +```rust +fn eq(&self, other: &?) -> bool +``` + +###### Parameters + + + +###### Returns + +`bool` + +###### Source + +[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) + +Line 139. + +*** + +##### fmt + +###### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) + +Line 139. + +*** + +##### fmt + +###### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) + +Line 189. + +*** + +##### from\_str + +Parse a wire string into a \[`DialState`] (infallible; unknown → +`Other`). + +**Decorators:** `@must_use` + +###### Signature + +```rust +fn from_str(s: &str) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) + +Line 168. + +*** + +##### from\_str + +###### Signature + +```rust +fn from_str(s: &str) -> ?::Err> +``` + +###### Parameters + + + +###### Returns + +`?::Err>` + +###### Source + +[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) + +Line 197. + +*** + +##### hash + +###### Signature + +```rust +fn hash<__H: ?>(&self, state: &mut __H) +``` + +###### Type Parameters + + + +###### Parameters + + + +###### Source + +[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) + +Line 139. + +*** + +##### is\_terminal + +`true` when this is a terminal dial outcome (`answered` or `failed`). + +A dial resolves once it either connects a leg or exhausts every +device, so both `answered` and `failed` are terminal; `dialing` is +not. + +**Decorators:** `@must_use` + +###### Signature + +```rust +fn is_terminal(&self) -> bool +``` + +###### Returns + +`bool` + +###### Source + +[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) + +Line 183. + +#### Type Aliases + +##### Err + +###### Source + +[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) + +Line 195. + +#### Source + +[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) + +Line 142. + +*** + +### MessageState + +Message delivery state, as carried by `messaging.state` events. + +Mirrors Python `relay/constants.py` `MESSAGE_STATE_*`. The terminal set +is `delivered` / `undelivered` / `failed` +(`MESSAGE_TERMINAL_STATES`; see `is_terminal`), +matching \[`constants::is_message_terminal`]. Distinct from both +\[`CallState`] and \[`DialState`] — `failed` here means _message_ failure, +not a dial failure. + +`#[non_exhaustive]` — server-emitted; unrecognised values parse to +`Other`. + +#### Signature + +```rust +enum MessageState +``` + +#### Inheritance + +**Implements:** `Debug`, `Clone`, `PartialEq`, `Eq`, `Hash`, `Display`, `FromStr` + +#### Variants + + + `delivered` — confirmed delivered (terminal). + + + + `failed` — sending failed (terminal). + + + + `initiated` — sending has begun. + + + + Any state the server emits that this enum does not (yet) model. + + + + `queued` — accepted and queued for sending. + + + + `received` — an inbound message was received. + + + + `sent` — handed off to the carrier. + + + + `undelivered` — the carrier reported non-delivery (terminal). + + +#### Methods + +##### as\_str + +The canonical wire string for this state (e.g. `"delivered"`). + +**Decorators:** `@must_use` + +###### Signature + +```rust +fn as_str(&self) -> &str +``` + +###### Returns + +`&str` + +###### Source + +[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) + +Line 238. + +*** + +##### clone + +###### Signature + +```rust +fn clone(&self) -> ? +``` + +###### Returns + +`?` + +###### Source + +[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) + +Line 213. + +*** + +##### eq + +###### Signature + +```rust +fn eq(&self, other: &?) -> bool +``` + +###### Parameters + + + +###### Returns + +`bool` + +###### Source + +[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) + +Line 213. + +*** + +##### fmt + +###### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) + +Line 213. + +*** + +##### fmt + +###### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) + +Line 279. + +*** + +##### from\_str + +Parse a wire string into a \[`MessageState`] (infallible; unknown → +`Other`). + +**Decorators:** `@must_use` + +###### Signature + +```rust +fn from_str(s: &str) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) + +Line 254. + +*** + +##### from\_str + +###### Signature + +```rust +fn from_str(s: &str) -> ?::Err> +``` + +###### Parameters + + + +###### Returns + +`?::Err>` + +###### Source + +[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) + +Line 287. + +*** + +##### hash + +###### Signature + +```rust +fn hash<__H: ?>(&self, state: &mut __H) +``` + +###### Type Parameters + + + +###### Parameters + + + +###### Source + +[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) + +Line 213. + +*** + +##### is\_terminal + +`true` when this is a terminal delivery state (`delivered`, +`undelivered`, or `failed`). + +Delegates to \[`constants::is_message_terminal`] so the typed and +string predicates can never disagree. + +**Decorators:** `@must_use` + +###### Signature + +```rust +fn is_terminal(&self) -> bool +``` + +###### Returns + +`bool` + +###### Source + +[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) + +Line 273. + +#### Type Aliases + +##### Err + +###### Source + +[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) + +Line 285. + +#### Source + +[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) + +Line 216. + +## Source + +[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/client/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/client/index.mdx new file mode 100644 index 0000000000..5a290401f8 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/rest/client/index.mdx @@ -0,0 +1,30 @@ +--- +slug: "/reference/rust/signalwire/rest/client" +title: "client" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::rest::client" + parent: "signalwire::rest" + module: "rest" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs" + visibility: "public" +--- +# `client` + +## Classes + + + + Top-level SignalWire REST client. + + + +## Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/client/rest-client/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/client/rest-client/index.mdx new file mode 100644 index 0000000000..4a058ab8c0 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/rest/client/rest-client/index.mdx @@ -0,0 +1,726 @@ +--- +slug: "/reference/rust/signalwire/rest/client/rest-client" +title: "RestClient" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::client::RestClient" + parent: "signalwire::rest::client" + module: "rest.client" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs" + visibility: "public" +--- +# `RestClient` + +Top-level SignalWire REST client. + +Provides lazy access to every API namespace (fabric, calling, +phone\_numbers, datasphere, video, compat, etc.). Credentials can +be supplied explicitly or pulled from environment variables. + +Production HTTP transport is `ureq` (sync, blocking, real network +I/O). Tests can substitute a stub via \[`with_http`]. + +## Signature + +```rust +struct RestClient { /* fields */ } +``` + +## Methods + +### addresses + +Addresses. + +#### Signature + +```rust +fn addresses(&self) -> ?<'_> +``` + +#### Returns + +`?<'_>` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 187. + +*** + +### base\_url + +#### Signature + +```rust +fn base_url(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 131. + +*** + +### calling + +Calling API (37 call-control commands). + +#### Signature + +```rust +fn calling(&self) -> ?<'_> +``` + +#### Returns + +`?<'_>` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 153. + +*** + +### chat + +Chat tokens. + +#### Signature + +```rust +fn chat(&self) -> ?<'_> +``` + +#### Returns + +`?<'_>` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 258. + +*** + +### compat + +Compatibility (Twilio-compatible LAML) API namespace. + +Returns a `Compat` handle whose +sub-resources (`calls`, `messages`, `faxes`, `phone_numbers`, +`conferences`, `recordings`, `transcriptions`, `applications`, +`laml_bins`, `queues`, `tokens`, `accounts`) cover the full Python +`client.compat.*` surface. + +#### Signature + +```rust +fn compat(&self) -> ?<'_> +``` + +#### Returns + +`?<'_>` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 182. + +*** + +### datasphere + +Datasphere namespace (documents + chunks + search). + +#### Signature + +```rust +fn datasphere(&self) -> ?<'_> +``` + +#### Returns + +`?<'_>` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 163. + +*** + +### fabric + +Fabric API (sub-resources: subscribers, sip\_endpoints, call\_flows, ...). + +#### Signature + +```rust +fn fabric(&self) -> ?<'_> +``` + +#### Returns + +`?<'_>` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 148. + +*** + +### from\_env + +Create from environment variables. + +#### Signature + +```rust +fn from_env() -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 109. + +*** + +### http + +#### Signature + +```rust +fn http(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 135. + +*** + +### imported\_numbers + +Imported phone numbers. + +#### Signature + +```rust +fn imported_numbers(&self) -> ?<'_> +``` + +#### Returns + +`?<'_>` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 228. + +*** + +### logs + +Logs (messages, voice, fax, conferences). + +#### Signature + +```rust +fn logs(&self) -> ?<'_> +``` + +#### Returns + +`?<'_>` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 243. + +*** + +### lookup + +Phone number lookup. + +#### Signature + +```rust +fn lookup(&self) -> ?<'_> +``` + +#### Returns + +`?<'_>` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 218. + +*** + +### mfa + +Multi-factor authentication (sms/call/verify). + +#### Signature + +```rust +fn mfa(&self) -> ?<'_> +``` + +#### Returns + +`?<'_>` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 233. + +*** + +### new + +Create a new REST client with explicit credentials. The base URL +resolves to `https://{space}`. Use \[`with_base_url`] to override +(e.g. for fixture-driven tests pointed at `http://127.0.0.1:N`). + +#### Signature + +```rust +fn new(project_id: &str, token: &str, space: &str) -> ? +``` + +#### Parameters + + + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 26. + +*** + +### number\_groups + +Number groups (CRUD + membership operations). + +#### Signature + +```rust +fn number_groups(&self) -> ?<'_> +``` + +#### Returns + +`?<'_>` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 202. + +*** + +### phone\_numbers + +Phone numbers. + +#### Signature + +```rust +fn phone_numbers(&self) -> ?<'_> +``` + +#### Returns + +`?<'_>` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 158. + +*** + +### project + +Project namespace (exposes `tokens` sub-resource). + +#### Signature + +```rust +fn project(&self) -> ?<'_> +``` + +#### Returns + +`?<'_>` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 248. + +*** + +### project\_id + +#### Signature + +```rust +fn project_id(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 119. + +*** + +### pubsub + +PubSub tokens. + +#### Signature + +```rust +fn pubsub(&self) -> ?<'_> +``` + +#### Returns + +`?<'_>` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 253. + +*** + +### queues + +Queues namespace (CRUD + member operations). + +#### Signature + +```rust +fn queues(&self) -> ?<'_> +``` + +#### Returns + +`?<'_>` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 192. + +*** + +### recordings + +Recordings. + +#### Signature + +```rust +fn recordings(&self) -> ?<'_> +``` + +#### Returns + +`?<'_>` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 197. + +*** + +### registry + +Registry (10DLC brands, campaigns, orders, numbers). + +#### Signature + +```rust +fn registry(&self) -> ?<'_> +``` + +#### Returns + +`?<'_>` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 238. + +*** + +### short\_codes + +Short codes. + +#### Signature + +```rust +fn short_codes(&self) -> ?<'_> +``` + +#### Returns + +`?<'_>` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 223. + +*** + +### sip\_profile + +Project SIP profile (singular: singleton resource at +`/api/relay/rest/sip_profile`). + +#### Signature + +```rust +fn sip_profile(&self) -> ?<'_> +``` + +#### Returns + +`?<'_>` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 213. + +*** + +### space + +#### Signature + +```rust +fn space(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 127. + +*** + +### token + +#### Signature + +```rust +fn token(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 123. + +*** + +### verified\_callers + +Verified callers. + +#### Signature + +```rust +fn verified_callers(&self) -> ?<'_> +``` + +#### Returns + +`?<'_>` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 207. + +*** + +### video + +Video API namespace (rooms, sessions, recordings, conferences, +tokens, streams). + +#### Signature + +```rust +fn video(&self) -> ?<'_> +``` + +#### Returns + +`?<'_>` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 171. + +*** + +### with\_base\_url + +Create a REST client with an explicit base URL. Used by audit +harnesses and integration tests to point at a local fixture +without going through the `https://{space}` resolution. Production +callers should use \[`new`] instead. + +#### Signature + +```rust +fn with_base_url(project_id: &str, token: &str, base_url: &str) -> ? +``` + +#### Parameters + + + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 64. + +*** + +### with\_http + +Create a REST client with a specific HTTP client (for testing). + +#### Signature + +```rust +fn with_http(project_id: &str, token: &str, space: &str, http: ?) -> ? +``` + +#### Parameters + + + + + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 90. + +## Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 14. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/crud-resource/crud-resource/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/crud-resource/crud-resource/index.mdx new file mode 100644 index 0000000000..e542b72883 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/rest/crud-resource/crud-resource/index.mdx @@ -0,0 +1,231 @@ +--- +slug: "/reference/rust/signalwire/rest/crud-resource/crud-resource" +title: "CrudResource" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::crud_resource::CrudResource" + parent: "signalwire::rest::crud_resource" + module: "rest.crud_resource" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/crud_resource.rs" + visibility: "public" +--- +# `CrudResource` + +Generic CRUD wrapper around an HttpClient and a base API path. + +Provides list / create / get / update / delete for any REST resource +that follows the standard SignalWire collection+item URL pattern. + +## Signature + +```rust +struct CrudResource { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/crud_resource.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/crud_resource.rs) + +Line 25. + +*** + +### client + +#### Signature + +```rust +fn client(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/rest/crud_resource.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/crud_resource.rs) + +Line 29. + +*** + +### create + +Create a new resource (POST basePath). + +#### Signature + +```rust +fn create(&self, data: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/crud_resource.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/crud_resource.rs) + +Line 47. + +*** + +### delete + +Delete a resource by ID (DELETE basePath/\{id\}). + +#### Signature + +```rust +fn delete(&self, id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/crud_resource.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/crud_resource.rs) + +Line 62. + +*** + +### get + +Retrieve a single resource by ID (GET basePath/\{id\}). + +#### Signature + +```rust +fn get(&self, id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/crud_resource.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/crud_resource.rs) + +Line 52. + +*** + +### list + +List resources (GET basePath). + +#### Signature + +```rust +fn list(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/crud_resource.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/crud_resource.rs) + +Line 42. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, base_path: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/crud_resource.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/crud_resource.rs) + +Line 18. + +*** + +### update + +Update a resource by ID (PUT basePath/\{id\}). + +#### Signature + +```rust +fn update(&self, id: &str, data: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/crud_resource.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/crud_resource.rs) + +Line 57. + +## Source + +[`src/rest/crud_resource.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/crud_resource.rs) + +Line 12. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/crud-resource/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/crud-resource/index.mdx new file mode 100644 index 0000000000..93cb41c495 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/rest/crud-resource/index.mdx @@ -0,0 +1,30 @@ +--- +slug: "/reference/rust/signalwire/rest/crud-resource" +title: "crud_resource" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::rest::crud_resource" + parent: "signalwire::rest" + module: "rest" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/crud_resource.rs" + visibility: "public" +--- +# `crud_resource` + +## Classes + + + + Generic CRUD wrapper around an HttpClient and a base API path. + + + +## Source + +[`src/rest/crud_resource.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/crud_resource.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/error/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/error/index.mdx new file mode 100644 index 0000000000..63add5a2b0 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/rest/error/index.mdx @@ -0,0 +1,33 @@ +--- +slug: "/reference/rust/signalwire/rest/error" +title: "error" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::rest::error" + parent: "signalwire::rest" + module: "rest" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/error.rs" + visibility: "public" +--- +# `error` + +REST module -- SignalWire REST API client, HTTP transport, and CRUD +resource helpers. + +## Classes + + + + Exception thrown when a SignalWire REST API request fails with a non-2xx status. + + + +## Source + +[`src/rest/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/error.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/error/signal-wire-rest-error/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/error/signal-wire-rest-error/index.mdx new file mode 100644 index 0000000000..d06891e5c0 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/rest/error/signal-wire-rest-error/index.mdx @@ -0,0 +1,190 @@ +--- +slug: "/reference/rust/signalwire/rest/error/signal-wire-rest-error" +title: "SignalWireRestError" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::error::SignalWireRestError" + parent: "signalwire::rest::error" + module: "rest.error" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/error.rs" + visibility: "public" +--- +# `SignalWireRestError` + +Exception thrown when a SignalWire REST API request fails with a non-2xx status. + +## Signature + +```rust +struct SignalWireRestError { /* fields */ } +``` + +## Inheritance + +**Implements:** `Debug`, `Clone`, `Display`, [Error](/docs/sdk-reference/reference/rust/signalwire/security/webhook-layer/webhook-validate#error) + +## Methods + +### clone + +#### Signature + +```rust +fn clone(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/rest/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/error.rs) + +Line 4. + +*** + +### fmt + +#### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/error.rs) + +Line 4. + +*** + +### fmt + +#### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/error.rs) + +Line 34. + +*** + +### message + +#### Signature + +```rust +fn message(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/error.rs) + +Line 20. + +*** + +### new + +#### Signature + +```rust +fn new(message: &str, status_code: u16, response_body: &str) -> Self +``` + +#### Parameters + + + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/error.rs) + +Line 12. + +*** + +### response\_body + +#### Signature + +```rust +fn response_body(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/error.rs) + +Line 28. + +*** + +### status\_code + +#### Signature + +```rust +fn status_code(&self) -> u16 +``` + +#### Returns + +`u16` + +#### Source + +[`src/rest/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/error.rs) + +Line 24. + +## Source + +[`src/rest/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/error.rs) + +Line 5. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/http-client/http-client/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/http-client/http-client/index.mdx new file mode 100644 index 0000000000..4a9772fecb --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/rest/http-client/http-client/index.mdx @@ -0,0 +1,334 @@ +--- +slug: "/reference/rust/signalwire/rest/http-client/http-client" +title: "HttpClient" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::http_client::HttpClient" + parent: "signalwire::rest::http_client" + module: "rest.http_client" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs" + visibility: "public" +--- +# `HttpClient` + +Low-level HTTP client for SignalWire REST APIs. + +Uses Basic Auth with project\_id:token and returns parsed JSON +responses as `serde_json::Value`. + +## Signature + +```rust +struct HttpClient { /* fields */ } +``` + +## Methods + +### auth\_header + +#### Signature + +```rust +fn auth_header(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) + +Line 251. + +*** + +### base\_url + +#### Signature + +```rust +fn base_url(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) + +Line 247. + +*** + +### delete + +#### Signature + +```rust +fn delete(&self, path: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) + +Line 276. + +*** + +### get + +#### Signature + +```rust +fn get(&self, path: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) + +Line 257. + +*** + +### list\_all + +Return all pages of results, following `links.next`. + +#### Signature + +```rust +fn list_all(&self, path: &str, params: &?) -> ?, ?> +``` + +#### Parameters + + + + + +#### Returns + +`?, ?>` + +#### Source + +[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) + +Line 283. + +*** + +### new + +#### Signature + +```rust +fn new( + project_id: &str, + token: &str, + base_url: &str, + transport: ? +) -> Self +``` + +#### Parameters + + + + + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) + +Line 205. + +*** + +### patch + +#### Signature + +```rust +fn patch(&self, path: &str, data: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) + +Line 271. + +*** + +### post + +#### Signature + +```rust +fn post(&self, path: &str, data: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) + +Line 261. + +*** + +### project\_id + +#### Signature + +```rust +fn project_id(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) + +Line 239. + +*** + +### put + +#### Signature + +```rust +fn put(&self, path: &str, data: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) + +Line 266. + +*** + +### token + +#### Signature + +```rust +fn token(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) + +Line 243. + +*** + +### with\_stub + +Create with a stub transport for testing. + +#### Signature + +```rust +fn with_stub(project_id: &str, token: &str, base_url: &str) -> (Self, ?) +``` + +#### Parameters + + + + + + + +#### Returns + +`(Self, ?)` + +#### Source + +[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) + +Line 226. + +## Source + +[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) + +Line 195. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/http-client/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/http-client/index.mdx new file mode 100644 index 0000000000..9c2d92dc19 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/rest/http-client/index.mdx @@ -0,0 +1,99 @@ +--- +slug: "/reference/rust/signalwire/rest/http-client" +title: "http_client" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::rest::http_client" + parent: "signalwire::rest" + module: "rest" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs" + visibility: "public" +--- +# `http_client` + +## Classes + + + + Low-level HTTP client for SignalWire REST APIs. + + + + A stub transport that records requests and returns canned responses. Useful for unit testing without network access. + + + + Real HTTP transport backed by ureq. + + + +## Interfaces + +### HttpTransport + +Trait for the HTTP transport layer. + +Production code uses a real implementation (e.g. ureq), while +tests inject a mock. + +#### Signature + +```rust +trait HttpTransport +``` + +#### Inheritance + +**Extends:** `?`, `?` + +#### Methods + +##### execute + +###### Signature + +```rust +fn execute( + &self, + method: &str, + url: &str, + headers: &?, + body: ?<&str> +) -> ?<(u16, ?), ?> +``` + +###### Parameters + + + + + + + + + +###### Returns + +`?<(u16, ?), ?>` + +###### Source + +[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) + +Line 14. + +#### Source + +[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) + +Line 13. + +## Source + +[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/http-client/stub-transport/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/http-client/stub-transport/index.mdx new file mode 100644 index 0000000000..53b8a4a33c --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/rest/http-client/stub-transport/index.mdx @@ -0,0 +1,129 @@ +--- +slug: "/reference/rust/signalwire/rest/http-client/stub-transport" +title: "StubTransport" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::http_client::StubTransport" + parent: "signalwire::rest::http_client" + module: "rest.http_client" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs" + visibility: "public" +--- +# `StubTransport` + +A stub transport that records requests and returns canned responses. +Useful for unit testing without network access. + +## Signature + +```rust +struct StubTransport { /* fields */ } +``` + +## Inheritance + +**Implements:** `HttpTransport` + +## Properties + + + Recorded requests: (method, url, body). + + + + Canned response: (status\_code, body). + + +## Methods + +### execute + +#### Signature + +```rust +fn execute( + &self, + method: &str, + url: &str, + _headers: &?, + body: ?<&str> +) -> ?<(u16, ?), ?> +``` + +#### Parameters + + + + + + + + + +#### Returns + +`?<(u16, ?), ?>` + +#### Source + +[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) + +Line 174. + +*** + +### new + +#### Signature + +```rust +fn new(status: u16, body: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) + +Line 161. + +*** + +### set\_response + +#### Signature + +```rust +fn set_response(&self, status: u16, body: &str) +``` + +#### Parameters + + + + + +#### Source + +[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) + +Line 168. + +## Source + +[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) + +Line 153. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/http-client/ureq-transport/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/http-client/ureq-transport/index.mdx new file mode 100644 index 0000000000..17ccea253f --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/rest/http-client/ureq-transport/index.mdx @@ -0,0 +1,116 @@ +--- +slug: "/reference/rust/signalwire/rest/http-client/ureq-transport" +title: "UreqTransport" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::http_client::UreqTransport" + parent: "signalwire::rest::http_client" + module: "rest.http_client" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs" + visibility: "public" +--- +# `UreqTransport` + +Real HTTP transport backed by ureq. + +This is the production transport — every REST namespace operation +goes through `ureq::Agent::request()` to a real HTTP endpoint. The +REST audit fixture (`audit_rest_transport.py`) drives the wire +shape (method, path, headers, body) end-to-end against this code, +so any regression in serialization is caught. + +## Signature + +```rust +struct UreqTransport { /* fields */ } +``` + +## Inheritance + +**Implements:** `Default`, `HttpTransport` + +## Methods + +### default + +#### Signature + +```rust +fn default() -> Self +``` + +#### Returns + +`Self` + +#### Source + +[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) + +Line 35. + +*** + +### execute + +#### Signature + +```rust +fn execute( + &self, + method: &str, + url: &str, + headers: &?, + body: ?<&str> +) -> ?<(u16, ?), ?> +``` + +#### Parameters + + + + + + + + + +#### Returns + +`?<(u16, ?), ?>` + +#### Source + +[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) + +Line 83. + +*** + +### new + +#### Signature + +```rust +fn new() -> Self +``` + +#### Returns + +`Self` + +#### Source + +[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) + +Line 41. + +## Source + +[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) + +Line 30. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/index.mdx new file mode 100644 index 0000000000..912d250892 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/rest/index.mdx @@ -0,0 +1,41 @@ +--- +slug: "/reference/rust/signalwire/rest" +title: "rest" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::rest" + parent: "signalwire" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/mod.rs" + visibility: "public" +--- +# `rest` + +## Modules + + + + + + + + REST module -- SignalWire REST API client, HTTP transport, and CRUD resource helpers. + + + + + + + + Paginated iterator over `links.next`-cursor responses. + + + +## Source + +[`src/rest/mod.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/mod.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/calling/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/calling/index.mdx new file mode 100644 index 0000000000..d713e5749c --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/calling/index.mdx @@ -0,0 +1,1082 @@ +--- +slug: "/reference/rust/signalwire/rest/namespaces/calling" +title: "calling" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::calling" + parent: "signalwire::rest::namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs" + visibility: "public" +--- +# `calling` + +Calling API namespace. + +Provides 37 call-control command methods that each POST to +`/api/calling/calls` with a JSON body containing the command name, +an optional call ID, and parameters. + +## Signature + +```rust +struct Calling { /* fields */ } +``` + +## Methods + +### ai\_hold + +#### Signature + +```rust +fn ai_hold(&self, call_id: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 246. + +*** + +### ai\_message + +#### Signature + +```rust +fn ai_message(&self, call_id: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 238. + +*** + +### ai\_stop + +#### Signature + +```rust +fn ai_stop(&self, call_id: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 254. + +*** + +### ai\_unhold + +#### Signature + +```rust +fn ai_unhold(&self, call_id: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 250. + +*** + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 35. + +*** + +### client + +#### Signature + +```rust +fn client(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 27. + +*** + +### collect + +#### Signature + +```rust +fn collect(&self, call_id: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 138. + +*** + +### collect\_start\_input\_timers + +#### Signature + +```rust +fn collect_start_input_timers(&self, call_id: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 150. + +*** + +### collect\_stop + +#### Signature + +```rust +fn collect_stop(&self, call_id: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 142. + +*** + +### denoise + +#### Signature + +```rust +fn denoise(&self, call_id: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 202. + +*** + +### denoise\_stop + +#### Signature + +```rust +fn denoise_stop(&self, call_id: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 206. + +*** + +### detect + +#### Signature + +```rust +fn detect(&self, call_id: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 162. + +*** + +### detect\_stop + +#### Signature + +```rust +fn detect_stop(&self, call_id: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 166. + +*** + +### dial + +#### Signature + +```rust +fn dial(&self, params: ?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 63. + +*** + +### disconnect + +#### Signature + +```rust +fn disconnect(&self, call_id: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 82. + +*** + +### end + +#### Signature + +```rust +fn end(&self, call_id: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 74. + +*** + +### live\_transcribe + +#### Signature + +```rust +fn live_transcribe(&self, call_id: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 262. + +*** + +### live\_translate + +#### Signature + +```rust +fn live_translate(&self, call_id: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 270. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, project_id: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 20. + +*** + +### play + +#### Signature + +```rust +fn play(&self, call_id: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 90. + +*** + +### play\_pause + +#### Signature + +```rust +fn play_pause(&self, call_id: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 94. + +*** + +### play\_resume + +#### Signature + +```rust +fn play_resume(&self, call_id: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 98. + +*** + +### play\_stop + +#### Signature + +```rust +fn play_stop(&self, call_id: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 102. + +*** + +### play\_volume + +#### Signature + +```rust +fn play_volume(&self, call_id: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 106. + +*** + +### project\_id + +#### Signature + +```rust +fn project_id(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 31. + +*** + +### receive\_fax\_stop + +#### Signature + +```rust +fn receive_fax_stop(&self, call_id: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 290. + +*** + +### record + +#### Signature + +```rust +fn record(&self, call_id: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 114. + +*** + +### record\_pause + +#### Signature + +```rust +fn record_pause(&self, call_id: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 118. + +*** + +### record\_resume + +#### Signature + +```rust +fn record_resume(&self, call_id: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 122. + +*** + +### record\_stop + +#### Signature + +```rust +fn record_stop(&self, call_id: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 130. + +*** + +### refer + +#### Signature + +```rust +fn refer(&self, call_id: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 302. + +*** + +### send\_fax\_stop + +#### Signature + +```rust +fn send_fax_stop(&self, call_id: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 282. + +*** + +### stream + +#### Signature + +```rust +fn stream(&self, call_id: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 186. + +*** + +### stream\_stop + +#### Signature + +```rust +fn stream_stop(&self, call_id: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 190. + +*** + +### tap + +#### Signature + +```rust +fn tap(&self, call_id: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 174. + +*** + +### tap\_stop + +#### Signature + +```rust +fn tap_stop(&self, call_id: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 178. + +*** + +### transcribe + +#### Signature + +```rust +fn transcribe(&self, call_id: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 218. + +*** + +### transcribe\_stop + +#### Signature + +```rust +fn transcribe_stop(&self, call_id: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 226. + +*** + +### transfer + +#### Signature + +```rust +fn transfer(&self, call_id: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 78. + +*** + +### update + +POST /api/calling/calls with `command="update"` — mirrors the Python +`client.calling.update(id=..., state=...)` shape: caller-supplied +`id` lives **inside** params, not as the top-level body field. + +#### Signature + +```rust +fn update(&self, params: ?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 70. + +*** + +### user\_event + +#### Signature + +```rust +fn user_event(&self, call_id: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 310. + +## Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 14. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-accounts/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-accounts/index.mdx new file mode 100644 index 0000000000..ce3aba82b1 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-accounts/index.mdx @@ -0,0 +1,172 @@ +--- +slug: "/reference/rust/signalwire/rest/namespaces/compat/compat-accounts" +title: "CompatAccounts" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::compat::CompatAccounts" + parent: "signalwire::rest::namespaces::compat" + module: "rest.namespaces.compat" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs" + visibility: "public" +--- +# `CompatAccounts` + +## Signature + +```rust +struct CompatAccounts { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 135. + +*** + +### create + +#### Signature + +```rust +fn create(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 144. + +*** + +### get + +#### Signature + +```rust +fn get(&self, sid: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 148. + +*** + +### list + +#### Signature + +```rust +fn list(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 139. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, base_path: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 128. + +*** + +### update + +#### Signature + +```rust +fn update(&self, sid: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 152. + +## Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 122. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-applications/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-applications/index.mdx new file mode 100644 index 0000000000..aab98d9c43 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-applications/index.mdx @@ -0,0 +1,196 @@ +--- +slug: "/reference/rust/signalwire/rest/namespaces/compat/compat-applications" +title: "CompatApplications" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::compat::CompatApplications" + parent: "signalwire::rest::namespaces::compat" + module: "rest.namespaces.compat" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs" + visibility: "public" +--- +# `CompatApplications` + +## Signature + +```rust +struct CompatApplications { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 597. + +*** + +### create + +#### Signature + +```rust +fn create(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 606. + +*** + +### delete + +#### Signature + +```rust +fn delete(&self, sid: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 618. + +*** + +### get + +#### Signature + +```rust +fn get(&self, sid: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 610. + +*** + +### list + +#### Signature + +```rust +fn list(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 601. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, base_path: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 590. + +*** + +### update + +#### Signature + +```rust +fn update(&self, sid: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 614. + +## Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 584. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-calls/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-calls/index.mdx new file mode 100644 index 0000000000..6bac64c7aa --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-calls/index.mdx @@ -0,0 +1,221 @@ +--- +slug: "/reference/rust/signalwire/rest/namespaces/compat/compat-calls" +title: "CompatCalls" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::compat::CompatCalls" + parent: "signalwire::rest::namespaces::compat" + module: "rest.namespaces.compat" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs" + visibility: "public" +--- +# `CompatCalls` + +## Signature + +```rust +struct CompatCalls { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 174. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, base_path: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 167. + +*** + +### start\_recording + +POST /Calls/\{sid\}/Recordings — start a new recording on the call. + +#### Signature + +```rust +fn start_recording(&self, call_sid: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 183. + +*** + +### start\_stream + +POST /Calls/\{sid\}/Streams — start a new stream on the call. + +#### Signature + +```rust +fn start_stream(&self, call_sid: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 204. + +*** + +### stop\_stream + +POST /Calls/\{sid\}/Streams/\{stream\_sid\} — stop / update a stream. + +#### Signature + +```rust +fn stop_stream(&self, call_sid: &str, stream_sid: &str, params: &?) -> ? +``` + +#### Parameters + + + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 214. + +*** + +### update + +#### Signature + +```rust +fn update(&self, sid: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 178. + +*** + +### update\_recording + +POST /Calls/\{sid\}/Recordings/\{rec\_sid\} — update a specific recording. + +#### Signature + +```rust +fn update_recording( + &self, + call_sid: &str, + recording_sid: &str, + params: &? +) -> ? +``` + +#### Parameters + + + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 193. + +## Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 161. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-conferences/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-conferences/index.mdx new file mode 100644 index 0000000000..ad0b4686cf --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-conferences/index.mdx @@ -0,0 +1,429 @@ +--- +slug: "/reference/rust/signalwire/rest/namespaces/compat/compat-conferences" +title: "CompatConferences" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::compat::CompatConferences" + parent: "signalwire::rest::namespaces::compat" + module: "rest.namespaces.compat" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs" + visibility: "public" +--- +# `CompatConferences` + +## Signature + +```rust +struct CompatConferences { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 380. + +*** + +### delete\_recording + +#### Signature + +```rust +fn delete_recording(&self, conference_sid: &str, recording_sid: &str) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 464. + +*** + +### get + +#### Signature + +```rust +fn get(&self, sid: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 389. + +*** + +### get\_participant + +#### Signature + +```rust +fn get_participant(&self, conference_sid: &str, call_sid: &str) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 407. + +*** + +### get\_recording + +#### Signature + +```rust +fn get_recording(&self, conference_sid: &str, recording_sid: &str) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 445. + +*** + +### list + +#### Signature + +```rust +fn list(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 384. + +*** + +### list\_participants + +#### Signature + +```rust +fn list_participants(&self, conference_sid: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 397. + +*** + +### list\_recordings + +#### Signature + +```rust +fn list_recordings(&self, conference_sid: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 435. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, base_path: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 373. + +*** + +### remove\_participant + +#### Signature + +```rust +fn remove_participant(&self, conference_sid: &str, call_sid: &str) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 426. + +*** + +### start\_stream + +#### Signature + +```rust +fn start_stream(&self, conference_sid: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 473. + +*** + +### stop\_stream + +#### Signature + +```rust +fn stop_stream( + &self, + conference_sid: &str, + stream_sid: &str, + params: &? +) -> ? +``` + +#### Parameters + + + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 482. + +*** + +### update + +#### Signature + +```rust +fn update(&self, sid: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 393. + +*** + +### update\_participant + +#### Signature + +```rust +fn update_participant( + &self, + conference_sid: &str, + call_sid: &str, + params: &? +) -> ? +``` + +#### Parameters + + + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 416. + +*** + +### update\_recording + +#### Signature + +```rust +fn update_recording( + &self, + conference_sid: &str, + recording_sid: &str, + params: &? +) -> ? +``` + +#### Parameters + + + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 454. + +## Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 367. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-faxes/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-faxes/index.mdx new file mode 100644 index 0000000000..82d8fbd55e --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-faxes/index.mdx @@ -0,0 +1,274 @@ +--- +slug: "/reference/rust/signalwire/rest/namespaces/compat/compat-faxes" +title: "CompatFaxes" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::compat::CompatFaxes" + parent: "signalwire::rest::namespaces::compat" + module: "rest.namespaces.compat" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs" + visibility: "public" +--- +# `CompatFaxes` + +## Signature + +```rust +struct CompatFaxes { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 313. + +*** + +### create + +#### Signature + +```rust +fn create(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 322. + +*** + +### delete + +#### Signature + +```rust +fn delete(&self, sid: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 334. + +*** + +### delete\_media + +#### Signature + +```rust +fn delete_media(&self, fax_sid: &str, media_sid: &str) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 353. + +*** + +### get + +#### Signature + +```rust +fn get(&self, sid: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 326. + +*** + +### get\_media + +#### Signature + +```rust +fn get_media(&self, fax_sid: &str, media_sid: &str) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 344. + +*** + +### list + +#### Signature + +```rust +fn list(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 317. + +*** + +### list\_media + +#### Signature + +```rust +fn list_media(&self, fax_sid: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 338. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, base_path: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 306. + +*** + +### update + +#### Signature + +```rust +fn update(&self, sid: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 330. + +## Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 300. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-laml-bins/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-laml-bins/index.mdx new file mode 100644 index 0000000000..a13b79ca5f --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-laml-bins/index.mdx @@ -0,0 +1,196 @@ +--- +slug: "/reference/rust/signalwire/rest/namespaces/compat/compat-laml-bins" +title: "CompatLamlBins" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::compat::CompatLamlBins" + parent: "signalwire::rest::namespaces::compat" + module: "rest.namespaces.compat" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs" + visibility: "public" +--- +# `CompatLamlBins` + +## Signature + +```rust +struct CompatLamlBins { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 640. + +*** + +### create + +#### Signature + +```rust +fn create(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 649. + +*** + +### delete + +#### Signature + +```rust +fn delete(&self, sid: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 661. + +*** + +### get + +#### Signature + +```rust +fn get(&self, sid: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 653. + +*** + +### list + +#### Signature + +```rust +fn list(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 644. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, base_path: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 633. + +*** + +### update + +#### Signature + +```rust +fn update(&self, sid: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 657. + +## Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 627. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-messages/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-messages/index.mdx new file mode 100644 index 0000000000..e3ade909a7 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-messages/index.mdx @@ -0,0 +1,274 @@ +--- +slug: "/reference/rust/signalwire/rest/namespaces/compat/compat-messages" +title: "CompatMessages" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::compat::CompatMessages" + parent: "signalwire::rest::namespaces::compat" + module: "rest.namespaces.compat" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs" + visibility: "public" +--- +# `CompatMessages` + +## Signature + +```rust +struct CompatMessages { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 242. + +*** + +### create + +#### Signature + +```rust +fn create(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 251. + +*** + +### delete + +#### Signature + +```rust +fn delete(&self, sid: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 263. + +*** + +### delete\_media + +#### Signature + +```rust +fn delete_media(&self, message_sid: &str, media_sid: &str) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 286. + +*** + +### get + +#### Signature + +```rust +fn get(&self, sid: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 255. + +*** + +### get\_media + +#### Signature + +```rust +fn get_media(&self, message_sid: &str, media_sid: &str) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 277. + +*** + +### list + +#### Signature + +```rust +fn list(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 246. + +*** + +### list\_media + +#### Signature + +```rust +fn list_media(&self, message_sid: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 267. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, base_path: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 235. + +*** + +### update + +#### Signature + +```rust +fn update(&self, sid: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 259. + +## Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 229. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-phone-numbers/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-phone-numbers/index.mdx new file mode 100644 index 0000000000..7087e935d5 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-phone-numbers/index.mdx @@ -0,0 +1,318 @@ +--- +slug: "/reference/rust/signalwire/rest/namespaces/compat/compat-phone-numbers" +title: "CompatPhoneNumbers" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::compat::CompatPhoneNumbers" + parent: "signalwire::rest::namespaces::compat" + module: "rest.namespaces.compat" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs" + visibility: "public" +--- +# `CompatPhoneNumbers` + +## Signature + +```rust +struct CompatPhoneNumbers { /* fields */ } +``` + +## Methods + +### available\_base + +#### Signature + +```rust +fn available_base(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 518. + +*** + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 514. + +*** + +### delete + +#### Signature + +```rust +fn delete(&self, sid: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 539. + +*** + +### get + +#### Signature + +```rust +fn get(&self, sid: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 531. + +*** + +### import\_number + +POST /ImportedPhoneNumbers — note the path is _Imported_, not _Incoming_. + +#### Signature + +```rust +fn import_number(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 544. + +*** + +### list + +#### Signature + +```rust +fn list(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 522. + +*** + +### list\_available\_countries + +#### Signature + +```rust +fn list_available_countries(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 551. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, base_path: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 504. + +*** + +### purchase + +#### Signature + +```rust +fn purchase(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 527. + +*** + +### search\_local + +#### Signature + +```rust +fn search_local(&self, country: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 559. + +*** + +### search\_toll\_free + +#### Signature + +```rust +fn search_toll_free(&self, country: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 569. + +*** + +### update + +#### Signature + +```rust +fn update(&self, sid: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 535. + +## Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 497. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-queues/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-queues/index.mdx new file mode 100644 index 0000000000..4fc37c244e --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-queues/index.mdx @@ -0,0 +1,276 @@ +--- +slug: "/reference/rust/signalwire/rest/namespaces/compat/compat-queues" +title: "CompatQueues" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::compat::CompatQueues" + parent: "signalwire::rest::namespaces::compat" + module: "rest.namespaces.compat" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs" + visibility: "public" +--- +# `CompatQueues` + +## Signature + +```rust +struct CompatQueues { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 683. + +*** + +### create + +#### Signature + +```rust +fn create(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 692. + +*** + +### delete + +#### Signature + +```rust +fn delete(&self, sid: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 704. + +*** + +### dequeue\_member + +#### Signature + +```rust +fn dequeue_member(&self, queue_sid: &str, call_sid: &str, params: &?) -> ? +``` + +#### Parameters + + + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 727. + +*** + +### get + +#### Signature + +```rust +fn get(&self, sid: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 696. + +*** + +### get\_member + +#### Signature + +```rust +fn get_member(&self, queue_sid: &str, call_sid: &str) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 718. + +*** + +### list + +#### Signature + +```rust +fn list(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 687. + +*** + +### list\_members + +#### Signature + +```rust +fn list_members(&self, queue_sid: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 708. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, base_path: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 676. + +*** + +### update + +#### Signature + +```rust +fn update(&self, sid: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 700. + +## Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 670. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-recordings/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-recordings/index.mdx new file mode 100644 index 0000000000..2d5c139995 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-recordings/index.mdx @@ -0,0 +1,146 @@ +--- +slug: "/reference/rust/signalwire/rest/namespaces/compat/compat-recordings" +title: "CompatRecordings" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::compat::CompatRecordings" + parent: "signalwire::rest::namespaces::compat" + module: "rest.namespaces.compat" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs" + visibility: "public" +--- +# `CompatRecordings` + +## Signature + +```rust +struct CompatRecordings { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 755. + +*** + +### delete + +#### Signature + +```rust +fn delete(&self, sid: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 768. + +*** + +### get + +#### Signature + +```rust +fn get(&self, sid: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 764. + +*** + +### list + +#### Signature + +```rust +fn list(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 759. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, base_path: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 748. + +## Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 742. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-tokens/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-tokens/index.mdx new file mode 100644 index 0000000000..5d79851429 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-tokens/index.mdx @@ -0,0 +1,148 @@ +--- +slug: "/reference/rust/signalwire/rest/namespaces/compat/compat-tokens" +title: "CompatTokens" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::compat::CompatTokens" + parent: "signalwire::rest::namespaces::compat" + module: "rest.namespaces.compat" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs" + visibility: "public" +--- +# `CompatTokens` + +## Signature + +```rust +struct CompatTokens { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 825. + +*** + +### create + +#### Signature + +```rust +fn create(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 829. + +*** + +### delete + +#### Signature + +```rust +fn delete(&self, token_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 841. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, base_path: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 818. + +*** + +### update + +#### Signature + +```rust +fn update(&self, token_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 833. + +## Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 812. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-transcriptions/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-transcriptions/index.mdx new file mode 100644 index 0000000000..b60f05c603 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-transcriptions/index.mdx @@ -0,0 +1,146 @@ +--- +slug: "/reference/rust/signalwire/rest/namespaces/compat/compat-transcriptions" +title: "CompatTranscriptions" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::compat::CompatTranscriptions" + parent: "signalwire::rest::namespaces::compat" + module: "rest.namespaces.compat" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs" + visibility: "public" +--- +# `CompatTranscriptions` + +## Signature + +```rust +struct CompatTranscriptions { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 790. + +*** + +### delete + +#### Signature + +```rust +fn delete(&self, sid: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 803. + +*** + +### get + +#### Signature + +```rust +fn get(&self, sid: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 799. + +*** + +### list + +#### Signature + +```rust +fn list(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 794. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, base_path: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 783. + +## Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 777. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/index.mdx new file mode 100644 index 0000000000..20bf6e2022 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/index.mdx @@ -0,0 +1,369 @@ +--- +slug: "/reference/rust/signalwire/rest/namespaces/compat" +title: "compat" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::compat" + parent: "signalwire::rest::namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs" + visibility: "public" +--- +# `compat` + +Compat (Twilio-compatible LAML) API namespace. + +Mirrors `signalwire.rest.namespaces.compat.CompatNamespace` from the +Python SDK. The base path is +`/api/laml/2010-04-01/Accounts/{account_sid}` and every sub-resource +is rooted under that. + +## Signature + +```rust +struct Compat { /* fields */ } +``` + +## Classes + + + + + + + + + + + + + + + + + + + + + + + + + + + +## Methods + +### account\_sid + +#### Signature + +```rust +fn account_sid(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 33. + +*** + +### accounts + +#### Signature + +```rust +fn accounts(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 43. + +*** + +### applications + +#### Signature + +```rust +fn applications(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 67. + +*** + +### calls + +#### Signature + +```rust +fn calls(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 47. + +*** + +### client + +#### Signature + +```rust +fn client(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 29. + +*** + +### conferences + +#### Signature + +```rust +fn conferences(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 59. + +*** + +### faxes + +#### Signature + +```rust +fn faxes(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 55. + +*** + +### laml\_bins + +#### Signature + +```rust +fn laml_bins(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 71. + +*** + +### messages + +#### Signature + +```rust +fn messages(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 51. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, account_sid: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 22. + +*** + +### phone\_numbers + +#### Signature + +```rust +fn phone_numbers(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 63. + +*** + +### queues + +#### Signature + +```rust +fn queues(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 75. + +*** + +### recordings + +#### Signature + +```rust +fn recordings(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 79. + +*** + +### tokens + +#### Signature + +```rust +fn tokens(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 87. + +*** + +### transcriptions + +#### Signature + +```rust +fn transcriptions(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 83. + +## Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 16. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/datasphere/datasphere-documents/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/datasphere/datasphere-documents/index.mdx new file mode 100644 index 0000000000..02b4d9d0d2 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/datasphere/datasphere-documents/index.mdx @@ -0,0 +1,301 @@ +--- +slug: "/reference/rust/signalwire/rest/namespaces/datasphere/datasphere-documents" +title: "DatasphereDocuments" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::datasphere::DatasphereDocuments" + parent: "signalwire::rest::namespaces::datasphere" + module: "rest.namespaces.datasphere" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/datasphere.rs" + visibility: "public" +--- +# `DatasphereDocuments` + +Datasphere documents resource. + +Rooted at `/api/datasphere/documents` with CRUD plus search and chunk +sub-paths. + +## Signature + +```rust +struct DatasphereDocuments { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/datasphere.rs) + +Line 42. + +*** + +### create + +#### Signature + +```rust +fn create(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/datasphere.rs) + +Line 66. + +*** + +### delete + +#### Signature + +```rust +fn delete(&self, document_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/datasphere.rs) + +Line 84. + +*** + +### delete\_chunk + +#### Signature + +```rust +fn delete_chunk(&self, document_id: &str, chunk_id: &str) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/datasphere.rs) + +Line 112. + +*** + +### get + +#### Signature + +```rust +fn get(&self, document_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/datasphere.rs) + +Line 70. + +*** + +### get\_chunk + +#### Signature + +```rust +fn get_chunk(&self, document_id: &str, chunk_id: &str) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/datasphere.rs) + +Line 103. + +*** + +### list + +#### Signature + +```rust +fn list(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/datasphere.rs) + +Line 61. + +*** + +### list\_chunks + +#### Signature + +```rust +fn list_chunks(&self, document_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/datasphere.rs) + +Line 93. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/datasphere.rs) + +Line 35. + +*** + +### search + +#### Signature + +```rust +fn search(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/datasphere.rs) + +Line 89. + +*** + +### update + +#### Signature + +```rust +fn update(&self, document_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/datasphere.rs) + +Line 75. + +## Source + +[`src/rest/namespaces/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/datasphere.rs) + +Line 29. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/datasphere/datasphere-namespace/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/datasphere/datasphere-namespace/index.mdx new file mode 100644 index 0000000000..3bfc630fcb --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/datasphere/datasphere-namespace/index.mdx @@ -0,0 +1,76 @@ +--- +slug: "/reference/rust/signalwire/rest/namespaces/datasphere/datasphere-namespace" +title: "DatasphereNamespace" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::datasphere::DatasphereNamespace" + parent: "signalwire::rest::namespaces::datasphere" + module: "rest.namespaces.datasphere" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/datasphere.rs" + visibility: "public" +--- +# `DatasphereNamespace` + +Datasphere API namespace — exposes documents. + +Mirrors `signalwire.rest.namespaces.datasphere.DatasphereNamespace`. + +## Signature + +```rust +struct DatasphereNamespace { /* fields */ } +``` + +## Methods + +### documents + +#### Signature + +```rust +fn documents(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/datasphere.rs) + +Line 20. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/datasphere.rs) + +Line 16. + +## Source + +[`src/rest/namespaces/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/datasphere.rs) + +Line 11. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/datasphere/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/datasphere/index.mdx new file mode 100644 index 0000000000..c591bbb3dc --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/datasphere/index.mdx @@ -0,0 +1,34 @@ +--- +slug: "/reference/rust/signalwire/rest/namespaces/datasphere" +title: "datasphere" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::rest::namespaces::datasphere" + parent: "signalwire::rest::namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/datasphere.rs" + visibility: "public" +--- +# `datasphere` + +## Classes + + + + Datasphere documents resource. + + + + Datasphere API namespace — exposes documents. + + + +## Source + +[`src/rest/namespaces/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/datasphere.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/fabric/call-flows-resource/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/fabric/call-flows-resource/index.mdx new file mode 100644 index 0000000000..75acdf64d5 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/fabric/call-flows-resource/index.mdx @@ -0,0 +1,276 @@ +--- +slug: "/reference/rust/signalwire/rest/namespaces/fabric/call-flows-resource" +title: "CallFlowsResource" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::fabric::CallFlowsResource" + parent: "signalwire::rest::namespaces::fabric" + module: "rest.namespaces.fabric" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs" + visibility: "public" +--- +# `CallFlowsResource` + +## Signature + +```rust +struct CallFlowsResource { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 293. + +*** + +### create + +#### Signature + +```rust +fn create(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 306. + +*** + +### delete + +#### Signature + +```rust +fn delete(&self, resource_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 324. + +*** + +### deploy\_version + +#### Signature + +```rust +fn deploy_version(&self, resource_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 352. + +*** + +### get + +#### Signature + +```rust +fn get(&self, resource_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 310. + +*** + +### list + +#### Signature + +```rust +fn list(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 301. + +*** + +### list\_addresses + +Sub-resource list — uses singular `call_flow` per the API spec. + +#### Signature + +```rust +fn list_addresses(&self, resource_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 330. + +*** + +### list\_versions + +#### Signature + +```rust +fn list_versions(&self, resource_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 341. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, base_path: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 286. + +*** + +### update + +#### Signature + +```rust +fn update(&self, resource_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 315. + +## Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 280. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/fabric/conference-rooms-resource/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/fabric/conference-rooms-resource/index.mdx new file mode 100644 index 0000000000..68b5751b65 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/fabric/conference-rooms-resource/index.mdx @@ -0,0 +1,222 @@ +--- +slug: "/reference/rust/signalwire/rest/namespaces/fabric/conference-rooms-resource" +title: "ConferenceRoomsResource" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::fabric::ConferenceRoomsResource" + parent: "signalwire::rest::namespaces::fabric" + module: "rest.namespaces.fabric" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs" + visibility: "public" +--- +# `ConferenceRoomsResource` + +## Signature + +```rust +struct ConferenceRoomsResource { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 380. + +*** + +### create + +#### Signature + +```rust +fn create(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 393. + +*** + +### delete + +#### Signature + +```rust +fn delete(&self, resource_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 411. + +*** + +### get + +#### Signature + +```rust +fn get(&self, resource_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 397. + +*** + +### list + +#### Signature + +```rust +fn list(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 388. + +*** + +### list\_addresses + +#### Signature + +```rust +fn list_addresses(&self, resource_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 416. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, base_path: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 373. + +*** + +### update + +#### Signature + +```rust +fn update(&self, resource_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 402. + +## Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 367. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/fabric/cxml-applications-resource/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/fabric/cxml-applications-resource/index.mdx new file mode 100644 index 0000000000..e2238b1af2 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/fabric/cxml-applications-resource/index.mdx @@ -0,0 +1,202 @@ +--- +slug: "/reference/rust/signalwire/rest/namespaces/fabric/cxml-applications-resource" +title: "CxmlApplicationsResource" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::fabric::CxmlApplicationsResource" + parent: "signalwire::rest::namespaces::fabric" + module: "rest.namespaces.fabric" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs" + visibility: "public" +--- +# `CxmlApplicationsResource` + +## Signature + +```rust +struct CxmlApplicationsResource { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 445. + +*** + +### create + +cXML applications cannot be created via this API. + +Returns an `Err` with a clear "not implemented" message that +mirrors the Python SDK's `NotImplementedError`. No HTTP request +is sent to the server. + +#### Signature + +```rust +fn create(&self, _params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 478. + +*** + +### delete + +#### Signature + +```rust +fn delete(&self, resource_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 468. + +*** + +### get + +#### Signature + +```rust +fn get(&self, resource_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 454. + +*** + +### list + +#### Signature + +```rust +fn list(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 449. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, base_path: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 438. + +*** + +### update + +#### Signature + +```rust +fn update(&self, resource_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 459. + +## Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 432. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/fabric/fabric-addresses/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/fabric/fabric-addresses/index.mdx new file mode 100644 index 0000000000..68008c0eba --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/fabric/fabric-addresses/index.mdx @@ -0,0 +1,122 @@ +--- +slug: "/reference/rust/signalwire/rest/namespaces/fabric/fabric-addresses" +title: "FabricAddresses" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::fabric::FabricAddresses" + parent: "signalwire::rest::namespaces::fabric" + module: "rest.namespaces.fabric" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs" + visibility: "public" +--- +# `FabricAddresses` + +## Signature + +```rust +struct FabricAddresses { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 154. + +*** + +### get + +#### Signature + +```rust +fn get(&self, address_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 163. + +*** + +### list + +#### Signature + +```rust +fn list(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 158. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, base_path: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 147. + +## Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 141. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/fabric/fabric-tokens/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/fabric/fabric-tokens/index.mdx new file mode 100644 index 0000000000..f35b51b005 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/fabric/fabric-tokens/index.mdx @@ -0,0 +1,174 @@ +--- +slug: "/reference/rust/signalwire/rest/namespaces/fabric/fabric-tokens" +title: "FabricTokens" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::fabric::FabricTokens" + parent: "signalwire::rest::namespaces::fabric" + module: "rest.namespaces.fabric" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs" + visibility: "public" +--- +# `FabricTokens` + +## Signature + +```rust +struct FabricTokens { /* fields */ } +``` + +## Methods + +### create\_embed\_token + +#### Signature + +```rust +fn create_embed_token(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 587. + +*** + +### create\_guest\_token + +#### Signature + +```rust +fn create_guest_token(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 580. + +*** + +### create\_invite\_token + +Note the singular `subscriber` segment per the spec. + +#### Signature + +```rust +fn create_invite_token(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 573. + +*** + +### create\_subscriber\_token + +#### Signature + +```rust +fn create_subscriber_token(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 556. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 552. + +*** + +### refresh\_subscriber\_token + +#### Signature + +```rust +fn refresh_subscriber_token(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 564. + +## Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 547. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/fabric/generic-resources/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/fabric/generic-resources/index.mdx new file mode 100644 index 0000000000..fefd377a6c --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/fabric/generic-resources/index.mdx @@ -0,0 +1,198 @@ +--- +slug: "/reference/rust/signalwire/rest/namespaces/fabric/generic-resources" +title: "GenericResources" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::fabric::GenericResources" + parent: "signalwire::rest::namespaces::fabric" + module: "rest.namespaces.fabric" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs" + visibility: "public" +--- +# `GenericResources` + +## Signature + +```rust +struct GenericResources { /* fields */ } +``` + +## Methods + +### assign\_domain\_application + +#### Signature + +```rust +fn assign_domain_application(&self, resource_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 533. + +*** + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 504. + +*** + +### delete + +#### Signature + +```rust +fn delete(&self, resource_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 518. + +*** + +### get + +#### Signature + +```rust +fn get(&self, resource_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 513. + +*** + +### list + +#### Signature + +```rust +fn list(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 508. + +*** + +### list\_addresses + +#### Signature + +```rust +fn list_addresses(&self, resource_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 523. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, base_path: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 497. + +## Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 491. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/fabric/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/fabric/index.mdx new file mode 100644 index 0000000000..840284ad22 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/fabric/index.mdx @@ -0,0 +1,431 @@ +--- +slug: "/reference/rust/signalwire/rest/namespaces/fabric" +title: "fabric" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::fabric" + parent: "signalwire::rest::namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs" + visibility: "public" +--- +# `fabric` + +REST API namespace modules. +Fabric API namespace — resource composition, addresses, and tokens. + +Mirrors `signalwire.rest.namespaces.fabric.FabricNamespace` from the +Python SDK. + +## Signature + +```rust +struct Fabric { /* fields */ } +``` + +## Classes + + + + + + + + + + + + + + + + + +## Methods + +### addresses + +Read-only top-level fabric addresses (NOT under `/resources`). + +#### Signature + +```rust +fn addresses(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 71. + +*** + +### ai\_agents + +#### Signature + +```rust +fn ai_agents(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 106. + +*** + +### call\_flows + +Call flows — exposes a singular `call_flow` sub-path for addresses +/ versions per the API spec. + +#### Signature + +```rust +fn call_flows(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 77. + +*** + +### call\_queues + +#### Signature + +```rust +fn call_queues(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 102. + +*** + +### client + +#### Signature + +```rust +fn client(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 55. + +*** + +### conference\_rooms + +Conference rooms — singular `conference_room` for sub-paths. + +#### Signature + +```rust +fn conference_rooms(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 90. + +*** + +### conversations + +#### Signature + +```rust +fn conversations(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 85. + +*** + +### cxml\_applications + +cXML applications — read/update/delete only (no create). + +#### Signature + +```rust +fn cxml_applications(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 119. + +*** + +### dial\_plans + +#### Signature + +```rust +fn dial_plans(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 94. + +*** + +### freeclimb\_apps + +#### Signature + +```rust +fn freeclimb_apps(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 98. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 51. + +*** + +### phone\_numbers + +#### Signature + +```rust +fn phone_numbers(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 114. + +*** + +### resources + +Generic resource operations across every fabric resource type. + +#### Signature + +```rust +fn resources(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 127. + +*** + +### sip\_endpoints + +#### Signature + +```rust +fn sip_endpoints(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 66. + +*** + +### sip\_profiles + +#### Signature + +```rust +fn sip_profiles(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 110. + +*** + +### subscribers + +Subscribers resource — full CRUD plus SIP-endpoint sub-resources. + +#### Signature + +```rust +fn subscribers(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 62. + +*** + +### swml\_scripts + +#### Signature + +```rust +fn swml_scripts(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 81. + +*** + +### tokens + +Fabric token factories (subscriber / guest / invite / embed). + +#### Signature + +```rust +fn tokens(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 132. + +## Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 46. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/fabric/subscribers-resource/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/fabric/subscribers-resource/index.mdx new file mode 100644 index 0000000000..dabb72b754 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/fabric/subscribers-resource/index.mdx @@ -0,0 +1,359 @@ +--- +slug: "/reference/rust/signalwire/rest/namespaces/fabric/subscribers-resource" +title: "SubscribersResource" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::fabric::SubscribersResource" + parent: "signalwire::rest::namespaces::fabric" + module: "rest.namespaces.fabric" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs" + visibility: "public" +--- +# `SubscribersResource` + +## Signature + +```rust +struct SubscribersResource { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 186. + +*** + +### create + +#### Signature + +```rust +fn create(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 195. + +*** + +### create\_sip\_endpoint + +#### Signature + +```rust +fn create_sip_endpoint(&self, subscriber_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 238. + +*** + +### delete + +#### Signature + +```rust +fn delete(&self, subscriber_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 213. + +*** + +### delete\_sip\_endpoint + +#### Signature + +```rust +fn delete_sip_endpoint(&self, subscriber_id: &str, endpoint_id: &str) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 266. + +*** + +### get + +#### Signature + +```rust +fn get(&self, subscriber_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 199. + +*** + +### get\_sip\_endpoint + +#### Signature + +```rust +fn get_sip_endpoint(&self, subscriber_id: &str, endpoint_id: &str) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 247. + +*** + +### list + +#### Signature + +```rust +fn list(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 190. + +*** + +### list\_addresses + +#### Signature + +```rust +fn list_addresses(&self, subscriber_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 218. + +*** + +### list\_sip\_endpoints + +#### Signature + +```rust +fn list_sip_endpoints(&self, subscriber_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 228. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, base_path: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 179. + +*** + +### update + +#### Signature + +```rust +fn update(&self, subscriber_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 204. + +*** + +### update\_sip\_endpoint + +#### Signature + +```rust +fn update_sip_endpoint( + &self, + subscriber_id: &str, + endpoint_id: &str, + params: &? +) -> ? +``` + +#### Parameters + + + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 256. + +## Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 173. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/index.mdx new file mode 100644 index 0000000000..15336fccbd --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/index.mdx @@ -0,0 +1,72 @@ +--- +slug: "/reference/rust/signalwire/rest/namespaces" +title: "namespaces" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::rest::namespaces" + parent: "signalwire::rest" + module: "rest" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/mod.rs" + visibility: "public" +--- +# `namespaces` + +## Classes + + + + Calling API namespace. + + + + Compat (Twilio-compatible LAML) API namespace. + + + + REST API namespace modules. Fabric API namespace — resource composition, addresses, and tokens. + + + + Logs namespace — message, voice, fax, conference logs (read-only). + + + + MFA (Multi-Factor Authentication) namespace. + + + + Project API namespace — exposes the API token sub-resource. + + + + Queues namespace. + + + + 10DLC Campaign Registry namespace — brands, campaigns, orders, numbers. + + + + Video API namespace — rooms, sessions, recordings, conferences, tokens, streams. + + + +## Modules + + + + + + + + + +## Source + +[`src/rest/namespaces/mod.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/mod.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/logs/conference-logs/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/logs/conference-logs/index.mdx new file mode 100644 index 0000000000..aa9cd7bec5 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/logs/conference-logs/index.mdx @@ -0,0 +1,98 @@ +--- +slug: "/reference/rust/signalwire/rest/namespaces/logs/conference-logs" +title: "ConferenceLogs" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::logs::ConferenceLogs" + parent: "signalwire::rest::namespaces::logs" + module: "rest.namespaces.logs" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs" + visibility: "public" +--- +# `ConferenceLogs` + +## Signature + +```rust +struct ConferenceLogs { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) + +Line 196. + +*** + +### list + +#### Signature + +```rust +fn list(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) + +Line 200. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, base_path: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) + +Line 189. + +## Source + +[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) + +Line 183. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/logs/fax-logs/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/logs/fax-logs/index.mdx new file mode 100644 index 0000000000..81cd97267b --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/logs/fax-logs/index.mdx @@ -0,0 +1,122 @@ +--- +slug: "/reference/rust/signalwire/rest/namespaces/logs/fax-logs" +title: "FaxLogs" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::logs::FaxLogs" + parent: "signalwire::rest::namespaces::logs" + module: "rest.namespaces.logs" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs" + visibility: "public" +--- +# `FaxLogs` + +## Signature + +```rust +struct FaxLogs { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) + +Line 164. + +*** + +### get + +#### Signature + +```rust +fn get(&self, log_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) + +Line 173. + +*** + +### list + +#### Signature + +```rust +fn list(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) + +Line 168. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, base_path: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) + +Line 157. + +## Source + +[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) + +Line 151. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/logs/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/logs/index.mdx new file mode 100644 index 0000000000..8fbb6b9f46 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/logs/index.mdx @@ -0,0 +1,170 @@ +--- +slug: "/reference/rust/signalwire/rest/namespaces/logs" +title: "logs" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::logs" + parent: "signalwire::rest::namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs" + visibility: "public" +--- +# `logs` + +Logs namespace — message, voice, fax, conference logs (read-only). + +Mirrors `signalwire.rest.namespaces.logs.LogsNamespace`. Each +sub-resource binds to a different sub-API path because the upstream +specs live in different documents. + +## Signature + +```rust +struct Logs { /* fields */ } +``` + +## Classes + + + + + + + + + + + +## Methods + +### client + +#### Signature + +```rust +fn client(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) + +Line 52. + +*** + +### conferences + +#### Signature + +```rust +fn conferences(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) + +Line 68. + +*** + +### fax + +#### Signature + +```rust +fn fax(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) + +Line 64. + +*** + +### messages + +#### Signature + +```rust +fn messages(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) + +Line 56. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) + +Line 48. + +*** + +### voice + +#### Signature + +```rust +fn voice(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) + +Line 60. + +## Source + +[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) + +Line 43. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/logs/message-logs/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/logs/message-logs/index.mdx new file mode 100644 index 0000000000..c5e93fe656 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/logs/message-logs/index.mdx @@ -0,0 +1,122 @@ +--- +slug: "/reference/rust/signalwire/rest/namespaces/logs/message-logs" +title: "MessageLogs" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::logs::MessageLogs" + parent: "signalwire::rest::namespaces::logs" + module: "rest.namespaces.logs" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs" + visibility: "public" +--- +# `MessageLogs` + +## Signature + +```rust +struct MessageLogs { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) + +Line 90. + +*** + +### get + +#### Signature + +```rust +fn get(&self, log_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) + +Line 99. + +*** + +### list + +#### Signature + +```rust +fn list(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) + +Line 94. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, base_path: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) + +Line 83. + +## Source + +[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) + +Line 77. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/logs/voice-logs/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/logs/voice-logs/index.mdx new file mode 100644 index 0000000000..e2ec072837 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/logs/voice-logs/index.mdx @@ -0,0 +1,148 @@ +--- +slug: "/reference/rust/signalwire/rest/namespaces/logs/voice-logs" +title: "VoiceLogs" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::logs::VoiceLogs" + parent: "signalwire::rest::namespaces::logs" + module: "rest.namespaces.logs" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs" + visibility: "public" +--- +# `VoiceLogs` + +## Signature + +```rust +struct VoiceLogs { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) + +Line 122. + +*** + +### get + +#### Signature + +```rust +fn get(&self, log_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) + +Line 131. + +*** + +### list + +#### Signature + +```rust +fn list(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) + +Line 126. + +*** + +### list\_events + +#### Signature + +```rust +fn list_events(&self, log_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) + +Line 136. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, base_path: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) + +Line 115. + +## Source + +[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) + +Line 109. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/mfa/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/mfa/index.mdx new file mode 100644 index 0000000000..21910448e6 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/mfa/index.mdx @@ -0,0 +1,158 @@ +--- +slug: "/reference/rust/signalwire/rest/namespaces/mfa" +title: "mfa" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::mfa" + parent: "signalwire::rest::namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/mfa.rs" + visibility: "public" +--- +# `mfa` + +MFA (Multi-Factor Authentication) namespace. + +Mirrors `signalwire.rest.namespaces.mfa.MfaResource` from the Python SDK. +Rooted at `/api/relay/rest/mfa` with `sms`, `call`, and `verify` +sub-paths. + +## Signature + +```rust +struct Mfa { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/mfa.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/mfa.rs) + +Line 24. + +*** + +### call + +POST /api/relay/rest/mfa/call — deliver a one-time code via voice. + +#### Signature + +```rust +fn call(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/mfa.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/mfa.rs) + +Line 34. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/mfa.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/mfa.rs) + +Line 17. + +*** + +### sms + +POST /api/relay/rest/mfa/sms — send a one-time code over SMS. + +#### Signature + +```rust +fn sms(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/mfa.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/mfa.rs) + +Line 29. + +*** + +### verify + +POST /api/relay/rest/mfa/\{request\_id\}/verify — verify a code. + +#### Signature + +```rust +fn verify(&self, request_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/mfa.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/mfa.rs) + +Line 39. + +## Source + +[`src/rest/namespaces/mfa.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/mfa.rs) + +Line 11. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/number-groups/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/number-groups/index.mdx new file mode 100644 index 0000000000..070198b832 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/number-groups/index.mdx @@ -0,0 +1,30 @@ +--- +slug: "/reference/rust/signalwire/rest/namespaces/number-groups" +title: "number_groups" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::rest::namespaces::number_groups" + parent: "signalwire::rest::namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs" + visibility: "public" +--- +# `number_groups` + +## Classes + + + + Number Groups namespace. + + + +## Source + +[`src/rest/namespaces/number_groups.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/number-groups/number-groups/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/number-groups/number-groups/index.mdx new file mode 100644 index 0000000000..7ea6dae154 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/number-groups/number-groups/index.mdx @@ -0,0 +1,303 @@ +--- +slug: "/reference/rust/signalwire/rest/namespaces/number-groups/number-groups" +title: "NumberGroups" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::number_groups::NumberGroups" + parent: "signalwire::rest::namespaces::number_groups" + module: "rest.namespaces.number_groups" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs" + visibility: "public" +--- +# `NumberGroups` + +Number Groups namespace. + +Mirrors `signalwire.rest.namespaces.number_groups.NumberGroupsResource`. +Provides standard CRUD over `/api/relay/rest/number_groups` plus the +membership endpoints rooted at the same collection and at the +project-scoped `/api/relay/rest/number_group_memberships` collection. + +## Signature + +```rust +struct NumberGroups { /* fields */ } +``` + +## Methods + +### add\_membership + +#### Signature + +```rust +fn add_membership(&self, group_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/number_groups.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs) + +Line 88. + +*** + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/number_groups.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs) + +Line 27. + +*** + +### create + +#### Signature + +```rust +fn create(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/number_groups.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs) + +Line 51. + +*** + +### delete + +#### Signature + +```rust +fn delete(&self, group_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/number_groups.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs) + +Line 69. + +*** + +### delete\_membership + +#### Signature + +```rust +fn delete_membership(&self, membership_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/number_groups.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs) + +Line 111. + +*** + +### get + +#### Signature + +```rust +fn get(&self, group_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/number_groups.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs) + +Line 55. + +*** + +### get\_membership + +#### Signature + +```rust +fn get_membership(&self, membership_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/number_groups.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs) + +Line 100. + +*** + +### list + +#### Signature + +```rust +fn list(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/number_groups.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs) + +Line 46. + +*** + +### list\_memberships + +GET /api/relay/rest/number\_groups/\{id\}/number\_group\_memberships + +#### Signature + +```rust +fn list_memberships(&self, group_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/number_groups.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs) + +Line 75. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/number_groups.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs) + +Line 20. + +*** + +### update + +#### Signature + +```rust +fn update(&self, group_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/number_groups.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs) + +Line 60. + +## Source + +[`src/rest/namespaces/number_groups.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs) + +Line 14. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/project/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/project/index.mdx new file mode 100644 index 0000000000..0fd12613ed --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/project/index.mdx @@ -0,0 +1,84 @@ +--- +slug: "/reference/rust/signalwire/rest/namespaces/project" +title: "project" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::project" + parent: "signalwire::rest::namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/project.rs" + visibility: "public" +--- +# `project` + +Project API namespace — exposes the API token sub-resource. + +Mirrors `signalwire.rest.namespaces.project.ProjectNamespace`. + +## Signature + +```rust +struct Project { /* fields */ } +``` + +## Classes + + + + Project API token management. + + + +## Methods + +### new + +#### Signature + +```rust +fn new(client: &'a ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/project.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/project.rs) + +Line 14. + +*** + +### tokens + +#### Signature + +```rust +fn tokens(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/project.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/project.rs) + +Line 18. + +## Source + +[`src/rest/namespaces/project.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/project.rs) + +Line 9. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/project/project-tokens/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/project/project-tokens/index.mdx new file mode 100644 index 0000000000..fe106c4cfe --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/project/project-tokens/index.mdx @@ -0,0 +1,151 @@ +--- +slug: "/reference/rust/signalwire/rest/namespaces/project/project-tokens" +title: "ProjectTokens" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::project::ProjectTokens" + parent: "signalwire::rest::namespaces::project" + module: "rest.namespaces.project" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/project.rs" + visibility: "public" +--- +# `ProjectTokens` + +Project API token management. + +Mirrors `ProjectTokens` from the Python SDK. Rooted at +`/api/project/tokens`. + +## Signature + +```rust +struct ProjectTokens { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/project.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/project.rs) + +Line 40. + +*** + +### create + +#### Signature + +```rust +fn create(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/project.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/project.rs) + +Line 44. + +*** + +### delete + +#### Signature + +```rust +fn delete(&self, token_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/project.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/project.rs) + +Line 57. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/project.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/project.rs) + +Line 33. + +*** + +### update + +#### Signature + +```rust +fn update(&self, token_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/project.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/project.rs) + +Line 48. + +## Source + +[`src/rest/namespaces/project.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/project.rs) + +Line 27. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/queues/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/queues/index.mdx new file mode 100644 index 0000000000..8ab65c7f8c --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/queues/index.mdx @@ -0,0 +1,275 @@ +--- +slug: "/reference/rust/signalwire/rest/namespaces/queues" +title: "queues" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::queues" + parent: "signalwire::rest::namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/queues.rs" + visibility: "public" +--- +# `queues` + +Queues namespace. + +Mirrors `signalwire.rest.namespaces.queues.QueuesResource`. CRUD over +`/api/relay/rest/queues` plus the queue-member operations. + +## Signature + +```rust +struct Queues { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/queues.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/queues.rs) + +Line 25. + +*** + +### create + +#### Signature + +```rust +fn create(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/queues.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/queues.rs) + +Line 49. + +*** + +### delete + +#### Signature + +```rust +fn delete(&self, queue_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/queues.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/queues.rs) + +Line 67. + +*** + +### get + +#### Signature + +```rust +fn get(&self, queue_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/queues.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/queues.rs) + +Line 53. + +*** + +### get\_member + +#### Signature + +```rust +fn get_member(&self, queue_id: &str, member_id: &str) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/queues.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/queues.rs) + +Line 90. + +*** + +### get\_next\_member + +#### Signature + +```rust +fn get_next_member(&self, queue_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/queues.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/queues.rs) + +Line 82. + +*** + +### list + +#### Signature + +```rust +fn list(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/queues.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/queues.rs) + +Line 44. + +*** + +### list\_members + +#### Signature + +```rust +fn list_members(&self, queue_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/queues.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/queues.rs) + +Line 72. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/queues.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/queues.rs) + +Line 18. + +*** + +### update + +#### Signature + +```rust +fn update(&self, queue_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/queues.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/queues.rs) + +Line 58. + +## Source + +[`src/rest/namespaces/queues.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/queues.rs) + +Line 12. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/registry/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/registry/index.mdx new file mode 100644 index 0000000000..70ba893e55 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/registry/index.mdx @@ -0,0 +1,169 @@ +--- +slug: "/reference/rust/signalwire/rest/namespaces/registry" +title: "registry" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::registry" + parent: "signalwire::rest::namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs" + visibility: "public" +--- +# `registry` + +10DLC Campaign Registry namespace — brands, campaigns, orders, numbers. + +Mirrors `signalwire.rest.namespaces.registry.RegistryNamespace`. Every +sub-resource lives under `/api/relay/rest/registry/beta`. + +## Signature + +```rust +struct Registry { /* fields */ } +``` + +## Classes + + + + + + + + + + + +## Methods + +### brands + +#### Signature + +```rust +fn brands(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) + +Line 57. + +*** + +### campaigns + +#### Signature + +```rust +fn campaigns(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) + +Line 61. + +*** + +### client + +#### Signature + +```rust +fn client(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) + +Line 53. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) + +Line 49. + +*** + +### numbers + +#### Signature + +```rust +fn numbers(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) + +Line 69. + +*** + +### orders + +#### Signature + +```rust +fn orders(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) + +Line 65. + +## Source + +[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) + +Line 44. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/registry/registry-brands/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/registry/registry-brands/index.mdx new file mode 100644 index 0000000000..5a99d7e062 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/registry/registry-brands/index.mdx @@ -0,0 +1,198 @@ +--- +slug: "/reference/rust/signalwire/rest/namespaces/registry/registry-brands" +title: "RegistryBrands" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::registry::RegistryBrands" + parent: "signalwire::rest::namespaces::registry" + module: "rest.namespaces.registry" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs" + visibility: "public" +--- +# `RegistryBrands` + +## Signature + +```rust +struct RegistryBrands { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) + +Line 91. + +*** + +### create + +#### Signature + +```rust +fn create(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) + +Line 100. + +*** + +### create\_campaign + +#### Signature + +```rust +fn create_campaign(&self, brand_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) + +Line 119. + +*** + +### get + +#### Signature + +```rust +fn get(&self, brand_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) + +Line 104. + +*** + +### list + +#### Signature + +```rust +fn list(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) + +Line 95. + +*** + +### list\_campaigns + +#### Signature + +```rust +fn list_campaigns(&self, brand_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) + +Line 109. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, base_path: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) + +Line 84. + +## Source + +[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) + +Line 78. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/registry/registry-campaigns/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/registry/registry-campaigns/index.mdx new file mode 100644 index 0000000000..0fdf097787 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/registry/registry-campaigns/index.mdx @@ -0,0 +1,202 @@ +--- +slug: "/reference/rust/signalwire/rest/namespaces/registry/registry-campaigns" +title: "RegistryCampaigns" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::registry::RegistryCampaigns" + parent: "signalwire::rest::namespaces::registry" + module: "rest.namespaces.registry" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs" + visibility: "public" +--- +# `RegistryCampaigns` + +## Signature + +```rust +struct RegistryCampaigns { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) + +Line 146. + +*** + +### create\_order + +#### Signature + +```rust +fn create_order(&self, campaign_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) + +Line 184. + +*** + +### get + +#### Signature + +```rust +fn get(&self, campaign_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) + +Line 150. + +*** + +### list\_numbers + +#### Signature + +```rust +fn list_numbers(&self, campaign_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) + +Line 164. + +*** + +### list\_orders + +#### Signature + +```rust +fn list_orders(&self, campaign_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) + +Line 174. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, base_path: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) + +Line 139. + +*** + +### update + +#### Signature + +```rust +fn update(&self, campaign_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) + +Line 155. + +## Source + +[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) + +Line 133. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/registry/registry-numbers/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/registry/registry-numbers/index.mdx new file mode 100644 index 0000000000..7b5699c8c4 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/registry/registry-numbers/index.mdx @@ -0,0 +1,98 @@ +--- +slug: "/reference/rust/signalwire/rest/namespaces/registry/registry-numbers" +title: "RegistryNumbers" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::registry::RegistryNumbers" + parent: "signalwire::rest::namespaces::registry" + module: "rest.namespaces.registry" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs" + visibility: "public" +--- +# `RegistryNumbers` + +## Signature + +```rust +struct RegistryNumbers { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) + +Line 238. + +*** + +### delete + +#### Signature + +```rust +fn delete(&self, number_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) + +Line 242. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, base_path: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) + +Line 231. + +## Source + +[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) + +Line 225. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/registry/registry-orders/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/registry/registry-orders/index.mdx new file mode 100644 index 0000000000..112614d8ac --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/registry/registry-orders/index.mdx @@ -0,0 +1,98 @@ +--- +slug: "/reference/rust/signalwire/rest/namespaces/registry/registry-orders" +title: "RegistryOrders" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::registry::RegistryOrders" + parent: "signalwire::rest::namespaces::registry" + module: "rest.namespaces.registry" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs" + visibility: "public" +--- +# `RegistryOrders` + +## Signature + +```rust +struct RegistryOrders { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) + +Line 211. + +*** + +### get + +#### Signature + +```rust +fn get(&self, order_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) + +Line 215. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, base_path: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) + +Line 204. + +## Source + +[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) + +Line 198. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/sip-profile/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/sip-profile/index.mdx new file mode 100644 index 0000000000..524a657fd4 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/sip-profile/index.mdx @@ -0,0 +1,30 @@ +--- +slug: "/reference/rust/signalwire/rest/namespaces/sip-profile" +title: "sip_profile" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::rest::namespaces::sip_profile" + parent: "signalwire::rest::namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/sip_profile.rs" + visibility: "public" +--- +# `sip_profile` + +## Classes + + + + SIP Profile (singleton resource) namespace. + + + +## Source + +[`src/rest/namespaces/sip_profile.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/sip_profile.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/sip-profile/sip-profile/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/sip-profile/sip-profile/index.mdx new file mode 100644 index 0000000000..61d12d6e7b --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/sip-profile/sip-profile/index.mdx @@ -0,0 +1,126 @@ +--- +slug: "/reference/rust/signalwire/rest/namespaces/sip-profile/sip-profile" +title: "SipProfile" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::sip_profile::SipProfile" + parent: "signalwire::rest::namespaces::sip_profile" + module: "rest.namespaces.sip_profile" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/sip_profile.rs" + visibility: "public" +--- +# `SipProfile` + +SIP Profile (singleton resource) namespace. + +Mirrors `signalwire.rest.namespaces.sip_profile.SipProfileResource`. +Rooted at `/api/relay/rest/sip_profile` (singular) — the project has +exactly one SIP profile, so there is no list/create/delete. + +## Signature + +```rust +struct SipProfile { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/sip_profile.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/sip_profile.rs) + +Line 24. + +*** + +### get + +GET /api/relay/rest/sip\_profile — fetch the current profile. + +#### Signature + +```rust +fn get(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/sip_profile.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/sip_profile.rs) + +Line 29. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/sip_profile.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/sip_profile.rs) + +Line 17. + +*** + +### update + +PUT /api/relay/rest/sip\_profile — update the SIP profile. + +#### Signature + +```rust +fn update(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/sip_profile.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/sip_profile.rs) + +Line 34. + +## Source + +[`src/rest/namespaces/sip_profile.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/sip_profile.rs) + +Line 11. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/video/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/video/index.mdx new file mode 100644 index 0000000000..b388505bce --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/video/index.mdx @@ -0,0 +1,237 @@ +--- +slug: "/reference/rust/signalwire/rest/namespaces/video" +title: "video" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::video" + parent: "signalwire::rest::namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs" + visibility: "public" +--- +# `video` + +Video API namespace — rooms, sessions, recordings, conferences, tokens, +streams. + +Mirrors `signalwire.rest.namespaces.video.VideoNamespace` from the Python +SDK. Each sub-resource exposes the methods present on the upstream +Python class. + +## Signature + +```rust +struct Video { /* fields */ } +``` + +## Classes + + + + + + + + + + + + + + + + + +## Methods + +### client + +#### Signature + +```rust +fn client(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 55. + +*** + +### conference\_tokens + +#### Signature + +```rust +fn conference_tokens(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 79. + +*** + +### conferences + +#### Signature + +```rust +fn conferences(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 75. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 51. + +*** + +### room\_recordings + +#### Signature + +```rust +fn room_recordings(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 71. + +*** + +### room\_sessions + +#### Signature + +```rust +fn room_sessions(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 67. + +*** + +### room\_tokens + +#### Signature + +```rust +fn room_tokens(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 63. + +*** + +### rooms + +#### Signature + +```rust +fn rooms(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 59. + +*** + +### streams + +#### Signature + +```rust +fn streams(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 83. + +## Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 46. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/video/video-conference-tokens/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/video/video-conference-tokens/index.mdx new file mode 100644 index 0000000000..1a96fcf277 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/video/video-conference-tokens/index.mdx @@ -0,0 +1,124 @@ +--- +slug: "/reference/rust/signalwire/rest/namespaces/video/video-conference-tokens" +title: "VideoConferenceTokens" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::video::VideoConferenceTokens" + parent: "signalwire::rest::namespaces::video" + module: "rest.namespaces.video" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs" + visibility: "public" +--- +# `VideoConferenceTokens` + +## Signature + +```rust +struct VideoConferenceTokens { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 389. + +*** + +### get + +#### Signature + +```rust +fn get(&self, token_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 393. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, base_path: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 382. + +*** + +### reset + +POST \{base\}/\{id\}/reset — no-body POST per Python. + +#### Signature + +```rust +fn reset(&self, token_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 399. + +## Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 376. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/video/video-conferences/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/video/video-conferences/index.mdx new file mode 100644 index 0000000000..df648ccccd --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/video/video-conferences/index.mdx @@ -0,0 +1,274 @@ +--- +slug: "/reference/rust/signalwire/rest/namespaces/video/video-conferences" +title: "VideoConferences" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::video::VideoConferences" + parent: "signalwire::rest::namespaces::video" + module: "rest.namespaces.video" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs" + visibility: "public" +--- +# `VideoConferences` + +## Signature + +```rust +struct VideoConferences { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 310. + +*** + +### create + +#### Signature + +```rust +fn create(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 319. + +*** + +### create\_stream + +#### Signature + +```rust +fn create_stream(&self, conference_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 362. + +*** + +### delete + +#### Signature + +```rust +fn delete(&self, conference_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 337. + +*** + +### get + +#### Signature + +```rust +fn get(&self, conference_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 323. + +*** + +### list + +#### Signature + +```rust +fn list(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 314. + +*** + +### list\_conference\_tokens + +#### Signature + +```rust +fn list_conference_tokens(&self, conference_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 342. + +*** + +### list\_streams + +#### Signature + +```rust +fn list_streams(&self, conference_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 352. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, base_path: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 303. + +*** + +### update + +#### Signature + +```rust +fn update(&self, conference_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 328. + +## Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 297. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/video/video-room-recordings/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/video/video-room-recordings/index.mdx new file mode 100644 index 0000000000..aca4587327 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/video/video-room-recordings/index.mdx @@ -0,0 +1,172 @@ +--- +slug: "/reference/rust/signalwire/rest/namespaces/video/video-room-recordings" +title: "VideoRoomRecordings" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::video::VideoRoomRecordings" + parent: "signalwire::rest::namespaces::video" + module: "rest.namespaces.video" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs" + visibility: "public" +--- +# `VideoRoomRecordings` + +## Signature + +```rust +struct VideoRoomRecordings { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 263. + +*** + +### delete + +#### Signature + +```rust +fn delete(&self, recording_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 277. + +*** + +### get + +#### Signature + +```rust +fn get(&self, recording_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 272. + +*** + +### list + +#### Signature + +```rust +fn list(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 267. + +*** + +### list\_events + +#### Signature + +```rust +fn list_events(&self, recording_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 282. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, base_path: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 256. + +## Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 250. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/video/video-room-sessions/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/video/video-room-sessions/index.mdx new file mode 100644 index 0000000000..f237dd9ba6 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/video/video-room-sessions/index.mdx @@ -0,0 +1,200 @@ +--- +slug: "/reference/rust/signalwire/rest/namespaces/video/video-room-sessions" +title: "VideoRoomSessions" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::video::VideoRoomSessions" + parent: "signalwire::rest::namespaces::video" + module: "rest.namespaces.video" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs" + visibility: "public" +--- +# `VideoRoomSessions` + +## Signature + +```rust +struct VideoRoomSessions { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 201. + +*** + +### get + +#### Signature + +```rust +fn get(&self, session_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 210. + +*** + +### list + +#### Signature + +```rust +fn list(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 205. + +*** + +### list\_events + +#### Signature + +```rust +fn list_events(&self, session_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 215. + +*** + +### list\_members + +#### Signature + +```rust +fn list_members(&self, session_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 225. + +*** + +### list\_recordings + +#### Signature + +```rust +fn list_recordings(&self, session_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 235. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, base_path: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 194. + +## Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 188. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/video/video-room-tokens/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/video/video-room-tokens/index.mdx new file mode 100644 index 0000000000..b7935c264b --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/video/video-room-tokens/index.mdx @@ -0,0 +1,98 @@ +--- +slug: "/reference/rust/signalwire/rest/namespaces/video/video-room-tokens" +title: "VideoRoomTokens" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::video::VideoRoomTokens" + parent: "signalwire::rest::namespaces::video" + module: "rest.namespaces.video" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs" + visibility: "public" +--- +# `VideoRoomTokens` + +## Signature + +```rust +struct VideoRoomTokens { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 175. + +*** + +### create + +#### Signature + +```rust +fn create(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 179. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, base_path: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 168. + +## Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 162. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/video/video-rooms/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/video/video-rooms/index.mdx new file mode 100644 index 0000000000..73ef778451 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/video/video-rooms/index.mdx @@ -0,0 +1,250 @@ +--- +slug: "/reference/rust/signalwire/rest/namespaces/video/video-rooms" +title: "VideoRooms" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::video::VideoRooms" + parent: "signalwire::rest::namespaces::video" + module: "rest.namespaces.video" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs" + visibility: "public" +--- +# `VideoRooms` + +## Signature + +```rust +struct VideoRooms { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 105. + +*** + +### create + +#### Signature + +```rust +fn create(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 114. + +*** + +### create\_stream + +#### Signature + +```rust +fn create_stream(&self, room_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 148. + +*** + +### delete + +#### Signature + +```rust +fn delete(&self, room_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 133. + +*** + +### get + +#### Signature + +```rust +fn get(&self, room_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 118. + +*** + +### list + +#### Signature + +```rust +fn list(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 109. + +*** + +### list\_streams + +#### Signature + +```rust +fn list_streams(&self, room_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 138. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, base_path: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 98. + +*** + +### update + +VideoRooms uses PUT for update. + +#### Signature + +```rust +fn update(&self, room_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 124. + +## Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 92. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/video/video-streams/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/video/video-streams/index.mdx new file mode 100644 index 0000000000..78d7076b5e --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/video/video-streams/index.mdx @@ -0,0 +1,148 @@ +--- +slug: "/reference/rust/signalwire/rest/namespaces/video/video-streams" +title: "VideoStreams" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::video::VideoStreams" + parent: "signalwire::rest::namespaces::video" + module: "rest.namespaces.video" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs" + visibility: "public" +--- +# `VideoStreams` + +## Signature + +```rust +struct VideoStreams { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 422. + +*** + +### delete + +#### Signature + +```rust +fn delete(&self, stream_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 440. + +*** + +### get + +#### Signature + +```rust +fn get(&self, stream_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 426. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, base_path: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 415. + +*** + +### update + +#### Signature + +```rust +fn update(&self, stream_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 431. + +## Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 409. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/pagination/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/pagination/index.mdx new file mode 100644 index 0000000000..e6ed82fde6 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/rest/pagination/index.mdx @@ -0,0 +1,37 @@ +--- +slug: "/reference/rust/signalwire/rest/pagination" +title: "pagination" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::rest::pagination" + parent: "signalwire::rest" + module: "rest" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/pagination.rs" + visibility: "public" +--- +# `pagination` + +Paginated iterator over `links.next`-cursor responses. + +Mirrors `signalwire.rest._pagination.PaginatedIterator` from the Python +SDK. Construction is lazy — no HTTP is dispatched until the iterator is +first stepped. Each fetch follows the response's `links.next` cursor; +when the cursor is empty/missing, the iterator is exhausted. + +## Classes + + + + Streaming iterator that walks a `links.next`-paginated REST endpoint. + + + +## Source + +[`src/rest/pagination.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/pagination.rs) + +Line 7. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/pagination/paginated-iterator/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/pagination/paginated-iterator/index.mdx new file mode 100644 index 0000000000..cff12adbe0 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/rest/pagination/paginated-iterator/index.mdx @@ -0,0 +1,267 @@ +--- +slug: "/reference/rust/signalwire/rest/pagination/paginated-iterator" +title: "PaginatedIterator" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::pagination::PaginatedIterator" + parent: "signalwire::rest::pagination" + module: "rest.pagination" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/pagination.rs" + visibility: "public" +--- +# `PaginatedIterator` + +Streaming iterator that walks a `links.next`-paginated REST endpoint. + +Holds a borrowed reference to the \[`HttpClient`] for the duration of +iteration. Use the \[`Iterator`] impl (`for item in it { ... }`) or +step manually via \[`PaginatedIterator::next_item`]. + +## Signature + +```rust +struct PaginatedIterator { /* fields */ } +``` + +## Inheritance + +**Implements:** `Iterator` + +## Methods + +### data\_key + +#### Signature + +```rust +fn data_key(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/pagination.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/pagination.rs) + +Line 79. + +*** + +### http + +#### Signature + +```rust +fn http(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/rest/pagination.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/pagination.rs) + +Line 67. + +*** + +### index + +#### Signature + +```rust +fn index(&self) -> usize +``` + +#### Returns + +`usize` + +#### Source + +[`src/rest/pagination.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/pagination.rs) + +Line 83. + +*** + +### is\_done + +#### Signature + +```rust +fn is_done(&self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/rest/pagination.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/pagination.rs) + +Line 91. + +*** + +### items + +#### Signature + +```rust +fn items(&self) -> &[?] +``` + +#### Returns + +`&[?]` + +#### Source + +[`src/rest/pagination.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/pagination.rs) + +Line 87. + +*** + +### new + +Construct a new iterator. + +`params` and `data_key` mirror the Python signature: the body field +containing the items array is named `data_key` (typically `"data"`), +and `params` is forwarded on the first GET. + +#### Signature + +```rust +fn new(http: &'a ?, path: &str, params: ?, data_key: &str) -> Self +``` + +#### Parameters + + + + + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/pagination.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/pagination.rs) + +Line 48. + +*** + +### next + +#### Signature + +```rust +fn next(&mut self) -> ?<::Item> +``` + +#### Returns + +`?<::Item>` + +#### Source + +[`src/rest/pagination.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/pagination.rs) + +Line 161. + +*** + +### next\_item + +Fetch the next item, dispatching a new page request if needed. +Returns `Ok(None)` when the cursor is exhausted. + +#### Signature + +```rust +fn next_item(&mut self) -> ?, ?> +``` + +#### Returns + +`?, ?>` + +#### Source + +[`src/rest/pagination.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/pagination.rs) + +Line 97. + +*** + +### params + +#### Signature + +```rust +fn params(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/rest/pagination.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/pagination.rs) + +Line 75. + +*** + +### path + +#### Signature + +```rust +fn path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/pagination.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/pagination.rs) + +Line 71. + +## Type Aliases + +### Item + +#### Source + +[`src/rest/pagination.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/pagination.rs) + +Line 159. + +## Source + +[`src/rest/pagination.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/pagination.rs) + +Line 26. diff --git a/fern/products/sdk-reference/rust/signalwire/security/index.mdx b/fern/products/sdk-reference/rust/signalwire/security/index.mdx new file mode 100644 index 0000000000..2b6385b2e1 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/security/index.mdx @@ -0,0 +1,35 @@ +--- +slug: "/reference/rust/signalwire/security" +title: "security" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::security" + parent: "signalwire" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/security/mod.rs" + visibility: "public" +--- +# `security` + +## Modules + + + + + + Webhook signature validation for SignalWire-signed HTTP requests. + + + + Tower / axum middleware for SignalWire webhook signature validation. + + + +## Source + +[`src/security/mod.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/mod.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/security/session-manager/index.mdx b/fern/products/sdk-reference/rust/signalwire/security/session-manager/index.mdx new file mode 100644 index 0000000000..68beee42a1 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/security/session-manager/index.mdx @@ -0,0 +1,30 @@ +--- +slug: "/reference/rust/signalwire/security/session-manager" +title: "session_manager" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::security::session_manager" + parent: "signalwire::security" + module: "security" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/security/session_manager.rs" + visibility: "public" +--- +# `session_manager` + +## Classes + + + + Session manager that generates and validates HMAC-signed tokens. + + + +## Source + +[`src/security/session_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/session_manager.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/security/session-manager/session-manager/index.mdx b/fern/products/sdk-reference/rust/signalwire/security/session-manager/session-manager/index.mdx new file mode 100644 index 0000000000..c432e74f33 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/security/session-manager/session-manager/index.mdx @@ -0,0 +1,221 @@ +--- +slug: "/reference/rust/signalwire/security/session-manager/session-manager" +title: "SessionManager" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::security::session_manager::SessionManager" + parent: "signalwire::security::session_manager" + module: "security.session_manager" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/security/session_manager.rs" + visibility: "public" +--- +# `SessionManager` + +Session manager that generates and validates HMAC-signed tokens. + +Tokens bind a function name and call ID together with an expiry time, +preventing replay attacks and cross-function/cross-call misuse. + +## Signature + +```rust +struct SessionManager { /* fields */ } +``` + +## Inheritance + +**Implements:** `Clone` + +## Methods + +### clone + +#### Signature + +```rust +fn clone(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/security/session_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/session_manager.rs) + +Line 13. + +*** + +### create\_session + +Create or confirm a session, returning the call ID. + +#### Signature + +```rust +fn create_session(&self, call_id: ?<&str>) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/security/session_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/session_manager.rs) + +Line 41. + +*** + +### create\_token + +Generate an HMAC-SHA256 signed token for a given function and call. + +Token format (before base64url encoding): +`{call_id}.{function_name}.{expiry}.{nonce}.{hmac_hex}` + +#### Signature + +```rust +fn create_token(&self, function_name: &str, call_id: &str) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/security/session_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/session_manager.rs) + +Line 52. + +*** + +### new + +Create a new session manager with a random 32-byte secret. + +#### Signature + +```rust +fn new(token_expiry_secs: u64) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/security/session_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/session_manager.rs) + +Line 21. + +*** + +### token\_expiry\_secs + +Get the configured token expiry in seconds. + +#### Signature + +```rust +fn token_expiry_secs(&self) -> u64 +``` + +#### Returns + +`u64` + +#### Source + +[`src/security/session_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/session_manager.rs) + +Line 36. + +*** + +### validate\_token + +Validate a token against the expected function name and call ID. + +Uses timing-safe comparison for all security-critical fields. + +#### Signature + +```rust +fn validate_token( + &self, + function_name: &str, + call_id: &str, + token: &str +) -> bool +``` + +#### Parameters + + + + + + + +#### Returns + +`bool` + +#### Source + +[`src/security/session_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/session_manager.rs) + +Line 70. + +*** + +### with\_defaults + +Create a new session manager with the default expiry (3600 seconds). + +#### Signature + +```rust +fn with_defaults() -> Self +``` + +#### Returns + +`Self` + +#### Source + +[`src/security/session_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/session_manager.rs) + +Line 31. + +## Source + +[`src/security/session_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/session_manager.rs) + +Line 14. diff --git a/fern/products/sdk-reference/rust/signalwire/security/webhook-layer/index.mdx b/fern/products/sdk-reference/rust/signalwire/security/webhook-layer/index.mdx new file mode 100644 index 0000000000..056c0f3762 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/security/webhook-layer/index.mdx @@ -0,0 +1,56 @@ +--- +slug: "/reference/rust/signalwire/security/webhook-layer" +title: "webhook_layer" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::security::webhook_layer" + parent: "signalwire::security" + module: "security" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook_layer.rs" + visibility: "public" +--- +# `webhook_layer` + +Tower / axum middleware for SignalWire webhook signature validation. + +This module provides a \[`tower::Layer`] that buffers the request body, +verifies the `X-SignalWire-Signature` (or `X-Twilio-Signature`) +header against a configured signing key, and either: + +- rejects the request with `403 Forbidden` (no body) when the + signature is missing or invalid, or +- rebuilds the request with the buffered body so downstream + handlers can re-read it as a normal `axum::body::Body`. + +The URL passed to the validator honors `X-Forwarded-Proto` / +`X-Forwarded-Host` (for reverse-proxy / tunnel deploys) and falls +back to scheme-derived-from-`x-forwarded-proto-or-https` plus the +`Host` header. + +The Layer is gated behind the `tower-middleware` Cargo feature +(enabled by default). Users who only need the raw validator can +depend on `signalwire` with `default-features = false`. + +Copyright (c) 2025 SignalWire. Licensed under the MIT License. + +## Classes + + + + Tower \[`Layer`] that wraps any `Service>` with SignalWire webhook signature validation. + + + + Tower \[`Service`] produced by \[`WebhookLayer::layer`]. Buffers the request body, validates the signature, and either forwards a reconstructed request to the inner service or short-circuits with a `403 Forbidden`. + + + +## Source + +[`src/security/webhook_layer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook_layer.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/security/webhook-layer/webhook-layer/index.mdx b/fern/products/sdk-reference/rust/signalwire/security/webhook-layer/webhook-layer/index.mdx new file mode 100644 index 0000000000..5a912e16fb --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/security/webhook-layer/webhook-layer/index.mdx @@ -0,0 +1,160 @@ +--- +slug: "/reference/rust/signalwire/security/webhook-layer/webhook-layer" +title: "WebhookLayer" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::security::webhook_layer::WebhookLayer" + parent: "signalwire::security::webhook_layer" + module: "security.webhook_layer" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook_layer.rs" + visibility: "public" +--- +# `WebhookLayer` + +Tower \[`Layer`] that wraps any `Service>` with +SignalWire webhook signature validation. + +Construct with \[`WebhookLayer::new`] and pass the customer's +Signing Key. Optionally provide an explicit URL via +\[`WebhookLayer::with_url_override`] when running behind a tunnel +or reverse proxy that doesn't set `X-Forwarded-*` headers. + +## Signature + +```rust +struct WebhookLayer { /* fields */ } +``` + +## Inheritance + +**Implements:** `Clone`, `Layer` + +## Methods + +### clone + +#### Signature + +```rust +fn clone(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/security/webhook_layer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook_layer.rs) + +Line 48. + +*** + +### layer + +#### Signature + +```rust +fn layer(&self, inner: S) -> ::Service +``` + +#### Parameters + + + +#### Returns + +`::Service` + +#### Source + +[`src/security/webhook_layer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook_layer.rs) + +Line 90. + +*** + +### new + +Construct a new layer bound to the given Signing Key. + +#### Signature + +```rust +fn new: ?>(signing_key: impl ?) -> Self +``` + +#### Type Parameters + + + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/security/webhook_layer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook_layer.rs) + +Line 60. + +*** + +### with\_url\_base + +Override the URL **base** the validator signs against. When set, +reverse-proxy header reconstruction is skipped and the full URL +is built as ``. + +`base` is typically `scheme://host[:port]` with no trailing slash +— e.g. `"https://example.ngrok.io"`. Any trailing `/` is +stripped before concatenation. + +#### Signature + +```rust +fn with_url_base: ?>(self, base: impl ?) -> Self +``` + +#### Type Parameters + + + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/security/webhook_layer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook_layer.rs) + +Line 76. + +## Type Aliases + +### Service + +#### Source + +[`src/security/webhook_layer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook_layer.rs) + +Line 88. + +## Source + +[`src/security/webhook_layer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook_layer.rs) + +Line 49. diff --git a/fern/products/sdk-reference/rust/signalwire/security/webhook-layer/webhook-validate/index.mdx b/fern/products/sdk-reference/rust/signalwire/security/webhook-layer/webhook-validate/index.mdx new file mode 100644 index 0000000000..77d6d255c3 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/security/webhook-layer/webhook-validate/index.mdx @@ -0,0 +1,135 @@ +--- +slug: "/reference/rust/signalwire/security/webhook-layer/webhook-validate" +title: "WebhookValidate" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::security::webhook_layer::WebhookValidate" + parent: "signalwire::security::webhook_layer" + module: "security.webhook_layer" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook_layer.rs" + visibility: "public" +--- +# `WebhookValidate` + +Tower \[`Service`] produced by \[`WebhookLayer::layer`]. Buffers the +request body, validates the signature, and either forwards a +reconstructed request to the inner service or short-circuits with +a `403 Forbidden`. + +## Signature + +```rust +struct WebhookValidate { /* fields */ } +``` + +## Inheritance + +**Implements:** `Clone`, [Service](/docs/sdk-reference/reference/rust/signalwire/security/webhook-layer/webhook-layer#service) + +## Methods + +### call + +#### Signature + +```rust +fn call(&mut self, req: ?) -> ::Future +``` + +#### Parameters + + + +#### Returns + +`::Future` + +#### Source + +[`src/security/webhook_layer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook_layer.rs) + +Line 124. + +*** + +### clone + +#### Signature + +```rust +fn clone(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/security/webhook_layer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook_layer.rs) + +Line 102. + +*** + +### poll\_ready + +#### Signature + +```rust +fn poll_ready(&mut self, cx: &mut ?<'_>) -> ?::Error>> +``` + +#### Parameters + + + +#### Returns + +`?::Error>>` + +#### Source + +[`src/security/webhook_layer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook_layer.rs) + +Line 120. + +## Type Aliases + +### Error + +#### Source + +[`src/security/webhook_layer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook_layer.rs) + +Line 117. + +*** + +### Future + +#### Source + +[`src/security/webhook_layer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook_layer.rs) + +Line 118. + +*** + +### Response + +#### Source + +[`src/security/webhook_layer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook_layer.rs) + +Line 116. + +## Source + +[`src/security/webhook_layer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook_layer.rs) + +Line 103. diff --git a/fern/products/sdk-reference/rust/signalwire/security/webhook/index.mdx b/fern/products/sdk-reference/rust/signalwire/security/webhook/index.mdx new file mode 100644 index 0000000000..bbadb91b19 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/security/webhook/index.mdx @@ -0,0 +1,356 @@ +--- +slug: "/reference/rust/signalwire/security/webhook" +title: "webhook" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::security::webhook" + parent: "signalwire::security" + module: "security" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook.rs" + visibility: "public" +--- +# `webhook` + +Webhook signature validation for SignalWire-signed HTTP requests. + +Implements both schemes from `porting-sdk/webhooks.md`: + +- **Scheme A** — RELAY/SWML/JSON: `lowercase_hex(HMAC-SHA1(key, url + raw_body))` +- **Scheme B** — Compat/cXML form: `base64(HMAC-SHA1(key, url + sortedFormParams))` + with optional `bodySHA256` query-param fallback for JSON-on-compat-surface. + +Public API mirrors Python's `signalwire.core.security.webhook_validator`: + +- \[`validate_webhook_signature`] — combined validator (tries A, then B). +- \[`validate_request`] — legacy `@signalwire/compatibility-api` drop-in + that accepts either a raw body string or pre-parsed form params. + +All comparisons go through \[`subtle::ConstantTimeEq`] so the secret +is not leaked through repeated requests. Inputs are taken as +`&str` / borrowed strings — no allocation hidden behind the API. + +``` +use signalwire::security::webhook::validate_webhook_signature; + +let key = "PSKtest1234567890abcdef"; +let url = "https://example.ngrok.io/webhook"; +let raw_body = r#"{"event":"call.state","params":{"call_id":"abc-123","state":"answered"}}"#; +let sig = "c3c08c1fefaf9ee198a100d5906765a6f394bf0f"; +assert!(validate_webhook_signature(key, sig, url, raw_body).unwrap()); +``` + +Copyright (c) 2025 SignalWire. Licensed under the MIT License. + +## Examples + +```rust +use signalwire::security::webhook::validate_webhook_signature; + +let key = "PSKtest1234567890abcdef"; +let url = "https://example.ngrok.io/webhook"; +let raw_body = r#"{"event":"call.state","params":{"call_id":"abc-123","state":"answered"}}"#; +let sig = "c3c08c1fefaf9ee198a100d5906765a6f394bf0f"; +assert!(validate_webhook_signature(key, sig, url, raw_body).unwrap()); +``` + +## Functions + +### validate\_request + +Legacy `@signalwire/compatibility-api` drop-in entry point. + +If `params_or_raw_body` is \[`ParamsOrBody::Body`], delegates to +\[`validate_webhook_signature`] (Scheme A then Scheme B with parsed form). + +If it's \[`ParamsOrBody::Params`], runs Scheme B directly with those +pre-parsed form params (plus URL port normalization). + +`bodySHA256` verification is skipped in the `Params` variant — there +is no raw body to hash. + +#### Signature + +```rust +fn validate_request( + signing_key: &str, + signature: &str, + url: &str, + params_or_raw_body: &? +) -> ? +``` + +#### Parameters + + + + + + + + + +#### Returns + +`?` + +#### Source + +[`src/security/webhook.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook.rs) + +Line 389. + +*** + +### validate\_webhook\_signature + +Validate a SignalWire webhook signature against both schemes. + +#### Signature + +```rust +fn validate_webhook_signature( + signing_key: &str, + signature: &str, + url: &str, + raw_body: &str +) -> ? +``` + +#### Parameters + + + + + + + + + +#### Returns + +`?` — All comparisons are constant-time via \[`subtle::ConstantTimeEq`]. + +#### Source + +[`src/security/webhook.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook.rs) + +Line 325. + +## Enums + +### ParamsOrBody + +Argument shape for \[`validate_request`]. Either a raw body string +(which will run Scheme A first, then Scheme B with the form-parsed +body) or a pre-parsed form-param list (which goes straight to +Scheme B). + +Repeated keys in the `Params` variant are supported by emitting a +`Vec` per key in submission order. + +#### Signature + +```rust +enum ParamsOrBody +``` + +#### Inheritance + +**Implements:** `Debug`, `Clone` + +#### Variants + + + Raw HTTP request body (UTF-8). The validator will sort form params if it parses cleanly; for JSON bodies this branch degrades to the empty-params Scheme B fallback. + + + + Pre-parsed form params, list-of-(key, list-of-values) so repeated keys keep their submission order. + + +#### Methods + +##### clone + +###### Signature + +```rust +fn clone(&self) -> ? +``` + +###### Returns + +`?` + +###### Source + +[`src/security/webhook.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook.rs) + +Line 74. + +*** + +##### fmt + +###### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/security/webhook.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook.rs) + +Line 74. + +#### Source + +[`src/security/webhook.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook.rs) + +Line 75. + +*** + +### WebhookError + +Errors returned by the webhook validator. + +`validate_webhook_signature` and `validate_request` return +`Result` so callers can distinguish a legitimate +"signature did not match" (`Ok(false)`) from a programming-error +"you forgot the signing key" (`Err(WebhookError::MissingSigningKey)`). +Per the spec, missing/empty _signature header_ and malformed +signatures return `Ok(false)` — those are not errors. + +#### Signature + +```rust +enum WebhookError +``` + +#### Inheritance + +**Implements:** `Debug`, `Clone`, `PartialEq`, `Eq`, `Display`, [Error](/docs/sdk-reference/reference/rust/signalwire/security/webhook-layer/webhook-validate#error) + +#### Variants + + + Caller passed an empty `signing_key`. This is a programming error (the key is mandatory configuration), not a validation failure — Python raises `ValueError` here, Node throws. + + +#### Methods + +##### clone + +###### Signature + +```rust +fn clone(&self) -> ? +``` + +###### Returns + +`?` + +###### Source + +[`src/security/webhook.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook.rs) + +Line 49. + +*** + +##### eq + +###### Signature + +```rust +fn eq(&self, other: &?) -> bool +``` + +###### Parameters + + + +###### Returns + +`bool` + +###### Source + +[`src/security/webhook.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook.rs) + +Line 49. + +*** + +##### fmt + +###### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/security/webhook.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook.rs) + +Line 49. + +*** + +##### fmt + +###### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/security/webhook.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook.rs) + +Line 58. + +#### Source + +[`src/security/webhook.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook.rs) + +Line 50. + +## Source + +[`src/security/webhook.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/server/agent-server/agent-server/index.mdx b/fern/products/sdk-reference/rust/signalwire/server/agent-server/agent-server/index.mdx new file mode 100644 index 0000000000..5f447e9071 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/server/agent-server/agent-server/index.mdx @@ -0,0 +1,507 @@ +--- +slug: "/reference/rust/signalwire/server/agent-server/agent-server" +title: "AgentServer" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::server::agent_server::AgentServer" + parent: "signalwire::server::agent_server" + module: "server.agent_server" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs" + visibility: "public" +--- +# `AgentServer` + +Multi-agent HTTP server that dispatches requests to registered agents +by longest-prefix route matching. + +## Signature + +```rust +struct AgentServer { /* fields */ } +``` + +## Methods + +### get\_agent + +Get an agent by route. + +#### Signature + +```rust +fn get_agent(&self, route: &str) -> ?<&?> +``` + +#### Parameters + + + +#### Returns + +`?<&?>` + +#### Source + +[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) + +Line 133. + +*** + +### get\_agent\_mut + +Get a mutable reference to an agent by route. + +#### Signature + +```rust +fn get_agent_mut(&mut self, route: &str) -> ?<&mut ?> +``` + +#### Parameters + + + +#### Returns + +`?<&mut ?>` + +#### Source + +[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) + +Line 139. + +*** + +### get\_agents + +Get all registered routes (sorted). + +#### Signature + +```rust +fn get_agents(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) + +Line 126. + +*** + +### handle\_request + +Handle an HTTP request and return `(status, headers, body)`. + +#### Signature + +```rust +fn handle_request( + &self, + method: &str, + path: &str, + headers: &?, + body: &str +) -> (u16, ?, ?) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`(u16, ?, ?)` + +#### Source + +[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) + +Line 309. + +*** + +### host + +#### Signature + +```rust +fn host(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) + +Line 414. + +*** + +### is\_sip\_routing\_enabled + +Check if SIP routing is enabled. + +#### Signature + +```rust +fn is_sip_routing_enabled(&self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) + +Line 163. + +*** + +### new + +#### Signature + +```rust +fn new(host: ?<&str>, port: ?) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) + +Line 65. + +*** + +### port + +#### Signature + +```rust +fn port(&self) -> u16 +``` + +#### Returns + +`u16` + +#### Source + +[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) + +Line 418. + +*** + +### register + +Register an agent at its default route (from the agent's service), +or at an explicit route override. + +**Errors:** + +Returns \[`ServerError::RouteAlreadyRegistered`] if the route is taken. + +#### Signature + +```rust +fn register(&mut self, agent: ?, route: ?<&str>) -> ?<(), ?> +``` + +#### Parameters + + + + + +#### Returns + +`?<(), ?>` + +#### Source + +[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) + +Line 95. + +*** + +### register\_global\_routing\_callback + +Register a routing callback that runs on every request whose +path matches the configured `path`. Returning `Some(route)` from +the callback redirects handling to that registered agent; +returning `None` falls through to normal longest-prefix +dispatch. + +Mirrors Python's +`AgentServer.register_global_routing_callback(callback_fn, path)`. + +In Python the callback signature is +`(request, body) -> Optional[route]`; the Rust signature passes +`(path, headers, parsed_body)` since Rust does not carry a +FastAPI request object. + +#### Signature + +```rust +fn register_global_routing_callback( + &mut self, + callback: ?, + path: &str +) -> &mut Self +``` + +#### Parameters + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) + +Line 238. + +*** + +### register\_sip\_username + +Map a SIP username to a route. + +#### Signature + +```rust +fn register_sip_username(&mut self, username: &str, route: &str) -> &mut Self +``` + +#### Parameters + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) + +Line 155. + +*** + +### run + +Run the HTTP server on the configured host:port, blocking the +current thread until the listener exits. + +Mirrors Python's `AgentServer.run(host, port)`. The optional +`host` and `port` arguments override the values supplied at +construction time (matching the Python contract). + +#### Signature + +```rust +fn run(&self, host: ?<&str>, port: ?) +``` + +#### Parameters + + + + + +#### Source + +[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) + +Line 258. + +*** + +### serve\_static + +Serve static files from a directory under a URL prefix. + +**Errors:** + +Returns \[`ServerError::StaticDir`] if the directory does not exist or is +not a directory. + +#### Signature + +```rust +fn serve_static(&mut self, directory: &str, url_prefix: &str) -> ?<(), ?> +``` + +#### Parameters + + + + + +#### Returns + +`?<(), ?>` + +#### Source + +[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) + +Line 181. + +*** + +### serve\_static\_files + +Serve static files from a directory under a URL prefix. + +This is the named-mirror of Python's +`AgentServer.serve_static_files(directory, route="/")`. Behaves +identically to \[`AgentServer::serve_static`] (which kept the +shorter Rust-idiomatic name) — both are kept so existing code +keeps working and the Python-name parity is preserved for the +surface diff. + +**Errors:** + +Returns \[`ServerError::StaticDir`] if the directory does not exist. + +#### Signature + +```rust +fn serve_static_files(&mut self, directory: &str, route: &str) -> ?<(), ?> +``` + +#### Parameters + + + + + +#### Returns + +`?<(), ?>` + +#### Source + +[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) + +Line 213. + +*** + +### setup\_sip\_routing + +Enable SIP-based routing. + +#### Signature + +```rust +fn setup_sip_routing(&mut self) -> &mut Self +``` + +#### Returns + +`&mut Self` + +#### Source + +[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) + +Line 149. + +*** + +### sip\_username\_mapping + +Get the SIP username mapping. + +#### Signature + +```rust +fn sip_username_mapping(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) + +Line 168. + +*** + +### unregister + +Unregister an agent from a route. + +#### Signature + +```rust +fn unregister(&mut self, route: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) + +Line 119. + +## Source + +[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) + +Line 50. diff --git a/fern/products/sdk-reference/rust/signalwire/server/agent-server/index.mdx b/fern/products/sdk-reference/rust/signalwire/server/agent-server/index.mdx new file mode 100644 index 0000000000..d88b806bbb --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/server/agent-server/index.mdx @@ -0,0 +1,58 @@ +--- +slug: "/reference/rust/signalwire/server/agent-server" +title: "agent_server" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::server::agent_server" + parent: "signalwire::server" + module: "server" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs" + visibility: "public" +--- +# `agent_server` + +## Classes + + + + Multi-agent HTTP server that dispatches requests to registered agents by longest-prefix route matching. + + + +## Type Aliases + +### GlobalRoutingCallback + +Callback signature for global request-time routing decisions. + +The callback receives the parsed request body (or `None` if absent +/ unparseable) and returns: + +- `Some(route)` — redirect handling to that route's agent. +- `None` — fall through to normal route dispatch. + +Mirrors Python's `register_routing_callback` / `register_global_routing_callback` +signature (`Callable[[Request, Dict[str, Any]], Optional[str]]`), +modulo Rust's lack of a FastAPI Request object. + +#### Signature + +```rust +type GlobalRoutingCallback = ? +``` + +#### Source + +[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) + +Line 23. + +## Source + +[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/server/error/index.mdx b/fern/products/sdk-reference/rust/signalwire/server/error/index.mdx new file mode 100644 index 0000000000..eba538ae79 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/server/error/index.mdx @@ -0,0 +1,168 @@ +--- +slug: "/reference/rust/signalwire/server/error" +title: "error" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::server::error" + parent: "signalwire::server" + module: "server" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/server/error.rs" + visibility: "public" +--- +# `error` + +Typed error for the `AgentServer` surface and +the shared HTTP(S) bind path. + +Like `RelayError`, this replaces the old +`Result<_, String>` returns on the server surface (`register`, +`serve_static`, `serve_static_files`, and the internal `bind_server`) with a +closed, inspectable failure set — matching the REST layer's +`SignalWireRestError` exemplar. + +The data each failure carries lives in the variant (callers `match` rather +than call getters), so the only public surface added is the type plus its +`Display` / \[`std::error::Error`] impls. `#[non_exhaustive]` leaves room to +add new failure modes without a breaking change. + +## Enums + +### ServerError + +A server-configuration or HTTP-bind operation failed. + +#### Signature + +```rust +enum ServerError +``` + +#### Inheritance + +**Implements:** `Debug`, `Clone`, `PartialEq`, `Eq`, `Display`, [Error](/docs/sdk-reference/reference/rust/signalwire/security/webhook-layer/webhook-validate#error) + +#### Variants + + + The HTTP(S) listener failed to bind the address. Carries the address and the underlying cause. + + + + An agent was registered at a route already in use. Carries the route. + + + + A static-file directory could not be served because the path does not exist or is not a directory. Carries the offending path. + + + + HTTPS was requested via `SWML_SSL_*` but the configuration was incomplete or the cert/key files were unreadable. + + +#### Methods + +##### clone + +###### Signature + +```rust +fn clone(&self) -> ? +``` + +###### Returns + +`?` + +###### Source + +[`src/server/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/error.rs) + +Line 18. + +*** + +##### eq + +###### Signature + +```rust +fn eq(&self, other: &?) -> bool +``` + +###### Parameters + + + +###### Returns + +`bool` + +###### Source + +[`src/server/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/error.rs) + +Line 18. + +*** + +##### fmt + +###### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/server/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/error.rs) + +Line 18. + +*** + +##### fmt + +###### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/server/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/error.rs) + +Line 54. + +#### Source + +[`src/server/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/error.rs) + +Line 20. + +## Source + +[`src/server/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/error.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/server/index.mdx b/fern/products/sdk-reference/rust/signalwire/server/index.mdx new file mode 100644 index 0000000000..d2b89625ef --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/server/index.mdx @@ -0,0 +1,31 @@ +--- +slug: "/reference/rust/signalwire/server" +title: "server" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::server" + parent: "signalwire" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/server/mod.rs" + visibility: "public" +--- +# `server` + +## Modules + + + + + + Typed error for the `AgentServer` surface and the shared HTTP(S) bind path. + + + +## Source + +[`src/server/mod.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/mod.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/serverless/adapter/index.mdx b/fern/products/sdk-reference/rust/signalwire/serverless/adapter/index.mdx new file mode 100644 index 0000000000..a6a9c990ca --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/serverless/adapter/index.mdx @@ -0,0 +1,346 @@ +--- +slug: "/reference/rust/signalwire/serverless/adapter" +title: "adapter" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::serverless::adapter" + parent: "signalwire::serverless" + module: "serverless" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/serverless/adapter.rs" + visibility: "public" +--- +# `adapter` + +Auto-detect and handle serverless environments (Lambda, Azure, GCF, CGI) +or fall back to the built-in server. + +## Signature + +```rust +struct Adapter; +``` + +## Methods + +### detect + +Detect the current runtime environment. + +#### Signature + +```rust +fn detect() -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/serverless/adapter.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/serverless/adapter.rs) + +Line 52. + +*** + +### handle\_azure + +Handle an Azure Functions invocation. + +#### Signature + +```rust +fn handle_azure(agent: &dyn ?, request: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/serverless/adapter.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/serverless/adapter.rs) + +Line 137. + +*** + +### handle\_lambda + +Handle an AWS Lambda (API Gateway) invocation. + +Extracts method, path, headers, and body from the API Gateway event +format, calls agent.handle\_request(), and returns an API Gateway +compatible response. + +#### Signature + +```rust +fn handle_lambda(agent: &dyn ?, event: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/serverless/adapter.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/serverless/adapter.rs) + +Line 74. + +*** + +### serve\_detect + +Auto-detect the runtime environment and return the environment type. +The caller can then dispatch accordingly. + +#### Signature + +```rust +fn serve_detect() -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/serverless/adapter.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/serverless/adapter.rs) + +Line 202. + +*** + +### status\_text + +Return the standard HTTP status text for a given status code. + +#### Signature + +```rust +fn status_text(code: u16) -> &'static str +``` + +#### Parameters + + + +#### Returns + +`&'static str` + +#### Source + +[`src/serverless/adapter.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/serverless/adapter.rs) + +Line 207. + +## Interfaces + +### RequestHandler + +Trait that the agent/service must implement so the adapter can +forward requests to it. + +#### Signature + +```rust +trait RequestHandler +``` + +#### Methods + +##### handle\_request + +Handle an HTTP request, returning (status\_code, headers, body). + +###### Signature + +```rust +fn handle_request( + &self, + method: &str, + path: &str, + headers: &?, + body: &str +) -> (u16, ?, ?) +``` + +###### Parameters + + + + + + + + + +###### Returns + +`(u16, ?, ?)` + +###### Source + +[`src/serverless/adapter.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/serverless/adapter.rs) + +Line 37. + +#### Source + +[`src/serverless/adapter.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/serverless/adapter.rs) + +Line 35. + +## Enums + +### RuntimeEnvironment + +Detected runtime environment. + +`#[non_exhaustive]` because the set of recognised serverless hosts mirrors +what \[`Adapter::detect`] probes for at runtime and is expected to grow +(new FaaS platforms) without that being a breaking change — downstream +`match` arms must include a wildcard. + +#### Signature + +```rust +enum RuntimeEnvironment +``` + +#### Inheritance + +**Implements:** `Debug`, `Clone`, `PartialEq`, `Eq` + +#### Variants + + + + + + + + + + + +#### Methods + +##### as\_str + +###### Signature + +```rust +fn as_str(&self) -> &'static str +``` + +###### Returns + +`&'static str` + +###### Source + +[`src/serverless/adapter.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/serverless/adapter.rs) + +Line 22. + +*** + +##### clone + +###### Signature + +```rust +fn clone(&self) -> ? +``` + +###### Returns + +`?` + +###### Source + +[`src/serverless/adapter.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/serverless/adapter.rs) + +Line 10. + +*** + +##### eq + +###### Signature + +```rust +fn eq(&self, other: &?) -> bool +``` + +###### Parameters + + + +###### Returns + +`bool` + +###### Source + +[`src/serverless/adapter.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/serverless/adapter.rs) + +Line 10. + +*** + +##### fmt + +###### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/serverless/adapter.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/serverless/adapter.rs) + +Line 10. + +#### Source + +[`src/serverless/adapter.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/serverless/adapter.rs) + +Line 13. + +## Source + +[`src/serverless/adapter.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/serverless/adapter.rs) + +Line 48. diff --git a/fern/products/sdk-reference/rust/signalwire/serverless/index.mdx b/fern/products/sdk-reference/rust/signalwire/serverless/index.mdx new file mode 100644 index 0000000000..5bb852f423 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/serverless/index.mdx @@ -0,0 +1,29 @@ +--- +slug: "/reference/rust/signalwire/serverless" +title: "serverless" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::serverless" + parent: "signalwire" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/serverless/mod.rs" + visibility: "public" +--- +# `serverless` + +## Classes + + + + Auto-detect and handle serverless environments (Lambda, Azure, GCF, CGI) or fall back to the built-in server. + + + +## Source + +[`src/serverless/mod.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/serverless/mod.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/skill-spec/index.mdx b/fern/products/sdk-reference/rust/signalwire/skill-spec/index.mdx new file mode 100644 index 0000000000..7a3f77b453 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/skill-spec/index.mdx @@ -0,0 +1,76 @@ +--- +slug: "/reference/rust/signalwire/skill-spec" +title: "SkillSpec" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::SkillSpec" + parent: "signalwire" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/lib.rs" + visibility: "public" +--- +# `SkillSpec` + +Skill registration descriptor — Rust's analogue of a Python skill +class. Bundles a skill's registration name with its factory closure +into a single value so \[`register_skill`] can mirror Python's +one-argument signature. + +**Decorators:** `@must_use` + +## Signature + +```rust +struct SkillSpec { /* fields */ } +``` + +## Properties + + + Factory closure that constructs a \[`skills::SkillBase`] from a JSON parameters map. + + + + Snake-case skill name used as the registry key. + + +## Methods + +### new + +Convenience constructor. + +#### Signature + +```rust +fn new: ?>(name: impl ?, factory: ?) -> Self +``` + +#### Type Parameters + + + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/lib.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/lib.rs) + +Line 109. + +## Source + +[`src/lib.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/lib.rs) + +Line 99. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/builtin/api-ninjas-trivia/api-ninjas-trivia/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/builtin/api-ninjas-trivia/api-ninjas-trivia/index.mdx new file mode 100644 index 0000000000..d8ad2fc7a2 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/skills/builtin/api-ninjas-trivia/api-ninjas-trivia/index.mdx @@ -0,0 +1,178 @@ +--- +slug: "/reference/rust/signalwire/skills/builtin/api-ninjas-trivia/api-ninjas-trivia" +title: "ApiNinjasTrivia" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::skills::builtin::api_ninjas_trivia::ApiNinjasTrivia" + parent: "signalwire::skills::builtin::api_ninjas_trivia" + module: "skills.builtin.api_ninjas_trivia" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/api_ninjas_trivia.rs" + visibility: "public" +--- +# `ApiNinjasTrivia` + +Get trivia questions from API Ninjas (DataMap-based). + +## Signature + +```rust +struct ApiNinjasTrivia { /* fields */ } +``` + +## Inheritance + +**Implements:** `SkillBase` + +## Methods + +### description + +#### Signature + +```rust +fn description(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/api_ninjas_trivia.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/api_ninjas_trivia.rs) + +Line 41. + +*** + +### name + +#### Signature + +```rust +fn name(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/api_ninjas_trivia.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/api_ninjas_trivia.rs) + +Line 37. + +*** + +### new + +#### Signature + +```rust +fn new(params: ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/skills/builtin/api_ninjas_trivia.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/api_ninjas_trivia.rs) + +Line 29. + +*** + +### params + +#### Signature + +```rust +fn params(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/skills/builtin/api_ninjas_trivia.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/api_ninjas_trivia.rs) + +Line 49. + +*** + +### register\_tools + +#### Signature + +```rust +fn register_tools(&self, agent: &mut ?) +``` + +#### Parameters + + + +#### Source + +[`src/skills/builtin/api_ninjas_trivia.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/api_ninjas_trivia.rs) + +Line 57. + +*** + +### setup + +#### Signature + +```rust +fn setup(&mut self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/api_ninjas_trivia.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/api_ninjas_trivia.rs) + +Line 53. + +*** + +### supports\_multiple\_instances + +#### Signature + +```rust +fn supports_multiple_instances(&self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/api_ninjas_trivia.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/api_ninjas_trivia.rs) + +Line 45. + +## Source + +[`src/skills/builtin/api_ninjas_trivia.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/api_ninjas_trivia.rs) + +Line 24. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/builtin/api-ninjas-trivia/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/builtin/api-ninjas-trivia/index.mdx new file mode 100644 index 0000000000..8d84b281ae --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/skills/builtin/api-ninjas-trivia/index.mdx @@ -0,0 +1,30 @@ +--- +slug: "/reference/rust/signalwire/skills/builtin/api-ninjas-trivia" +title: "api_ninjas_trivia" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::skills::builtin::api_ninjas_trivia" + parent: "signalwire::skills::builtin" + module: "skills.builtin" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/api_ninjas_trivia.rs" + visibility: "public" +--- +# `api_ninjas_trivia` + +## Classes + + + + Get trivia questions from API Ninjas (DataMap-based). + + + +## Source + +[`src/skills/builtin/api_ninjas_trivia.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/api_ninjas_trivia.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/builtin/claude-skills/claude-skills/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/builtin/claude-skills/claude-skills/index.mdx new file mode 100644 index 0000000000..49460ea232 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/skills/builtin/claude-skills/claude-skills/index.mdx @@ -0,0 +1,218 @@ +--- +slug: "/reference/rust/signalwire/skills/builtin/claude-skills/claude-skills" +title: "ClaudeSkills" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::skills::builtin::claude_skills::ClaudeSkills" + parent: "signalwire::skills::builtin::claude_skills" + module: "skills.builtin.claude_skills" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/claude_skills.rs" + visibility: "public" +--- +# `ClaudeSkills` + +Load Claude SKILL.md files as agent tools (handler-based). + +## Signature + +```rust +struct ClaudeSkills { /* fields */ } +``` + +## Inheritance + +**Implements:** `SkillBase` + +## Methods + +### description + +#### Signature + +```rust +fn description(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/claude_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/claude_skills.rs) + +Line 25. + +*** + +### get\_hints + +#### Signature + +```rust +fn get_hints(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/builtin/claude_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/claude_skills.rs) + +Line 105. + +*** + +### get\_prompt\_sections + +#### Signature + +```rust +fn get_prompt_sections(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/builtin/claude_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/claude_skills.rs) + +Line 109. + +*** + +### name + +#### Signature + +```rust +fn name(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/claude_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/claude_skills.rs) + +Line 21. + +*** + +### new + +#### Signature + +```rust +fn new(params: ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/skills/builtin/claude_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/claude_skills.rs) + +Line 13. + +*** + +### params + +#### Signature + +```rust +fn params(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/skills/builtin/claude_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/claude_skills.rs) + +Line 33. + +*** + +### register\_tools + +#### Signature + +```rust +fn register_tools(&self, agent: &mut ?) +``` + +#### Parameters + + + +#### Source + +[`src/skills/builtin/claude_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/claude_skills.rs) + +Line 41. + +*** + +### setup + +#### Signature + +```rust +fn setup(&mut self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/claude_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/claude_skills.rs) + +Line 37. + +*** + +### supports\_multiple\_instances + +#### Signature + +```rust +fn supports_multiple_instances(&self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/claude_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/claude_skills.rs) + +Line 29. + +## Source + +[`src/skills/builtin/claude_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/claude_skills.rs) + +Line 8. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/builtin/claude-skills/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/builtin/claude-skills/index.mdx new file mode 100644 index 0000000000..b0a75eefa5 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/skills/builtin/claude-skills/index.mdx @@ -0,0 +1,30 @@ +--- +slug: "/reference/rust/signalwire/skills/builtin/claude-skills" +title: "claude_skills" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::skills::builtin::claude_skills" + parent: "signalwire::skills::builtin" + module: "skills.builtin" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/claude_skills.rs" + visibility: "public" +--- +# `claude_skills` + +## Classes + + + + Load Claude SKILL.md files as agent tools (handler-based). + + + +## Source + +[`src/skills/builtin/claude_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/claude_skills.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/builtin/custom-skills/custom-skills/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/builtin/custom-skills/custom-skills/index.mdx new file mode 100644 index 0000000000..81343cc6aa --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/skills/builtin/custom-skills/custom-skills/index.mdx @@ -0,0 +1,178 @@ +--- +slug: "/reference/rust/signalwire/skills/builtin/custom-skills/custom-skills" +title: "CustomSkills" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::skills::builtin::custom_skills::CustomSkills" + parent: "signalwire::skills::builtin::custom_skills" + module: "skills.builtin.custom_skills" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/custom_skills.rs" + visibility: "public" +--- +# `CustomSkills` + +Register user-defined custom tools. + +## Signature + +```rust +struct CustomSkills { /* fields */ } +``` + +## Inheritance + +**Implements:** `SkillBase` + +## Methods + +### description + +#### Signature + +```rust +fn description(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/custom_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/custom_skills.rs) + +Line 24. + +*** + +### name + +#### Signature + +```rust +fn name(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/custom_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/custom_skills.rs) + +Line 20. + +*** + +### new + +#### Signature + +```rust +fn new(params: ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/skills/builtin/custom_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/custom_skills.rs) + +Line 12. + +*** + +### params + +#### Signature + +```rust +fn params(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/skills/builtin/custom_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/custom_skills.rs) + +Line 32. + +*** + +### register\_tools + +#### Signature + +```rust +fn register_tools(&self, agent: &mut ?) +``` + +#### Parameters + + + +#### Source + +[`src/skills/builtin/custom_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/custom_skills.rs) + +Line 40. + +*** + +### setup + +#### Signature + +```rust +fn setup(&mut self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/custom_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/custom_skills.rs) + +Line 36. + +*** + +### supports\_multiple\_instances + +#### Signature + +```rust +fn supports_multiple_instances(&self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/custom_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/custom_skills.rs) + +Line 28. + +## Source + +[`src/skills/builtin/custom_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/custom_skills.rs) + +Line 7. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/builtin/custom-skills/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/builtin/custom-skills/index.mdx new file mode 100644 index 0000000000..722075780c --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/skills/builtin/custom-skills/index.mdx @@ -0,0 +1,30 @@ +--- +slug: "/reference/rust/signalwire/skills/builtin/custom-skills" +title: "custom_skills" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::skills::builtin::custom_skills" + parent: "signalwire::skills::builtin" + module: "skills.builtin" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/custom_skills.rs" + visibility: "public" +--- +# `custom_skills` + +## Classes + + + + Register user-defined custom tools. + + + +## Source + +[`src/skills/builtin/custom_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/custom_skills.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/builtin/datasphere-serverless/datasphere-serverless/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/builtin/datasphere-serverless/datasphere-serverless/index.mdx new file mode 100644 index 0000000000..faab98c8c7 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/skills/builtin/datasphere-serverless/datasphere-serverless/index.mdx @@ -0,0 +1,218 @@ +--- +slug: "/reference/rust/signalwire/skills/builtin/datasphere-serverless/datasphere-serverless" +title: "DatasphereServerless" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::skills::builtin::datasphere_serverless::DatasphereServerless" + parent: "signalwire::skills::builtin::datasphere_serverless" + module: "skills.builtin.datasphere_serverless" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere_serverless.rs" + visibility: "public" +--- +# `DatasphereServerless` + +Search knowledge using SignalWire DataSphere with serverless DataMap execution. + +## Signature + +```rust +struct DatasphereServerless { /* fields */ } +``` + +## Inheritance + +**Implements:** `SkillBase` + +## Methods + +### description + +#### Signature + +```rust +fn description(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/datasphere_serverless.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere_serverless.rs) + +Line 26. + +*** + +### get\_global\_data + +#### Signature + +```rust +fn get_global_data(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/builtin/datasphere_serverless.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere_serverless.rs) + +Line 125. + +*** + +### get\_prompt\_sections + +#### Signature + +```rust +fn get_prompt_sections(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/builtin/datasphere_serverless.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere_serverless.rs) + +Line 142. + +*** + +### name + +#### Signature + +```rust +fn name(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/datasphere_serverless.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere_serverless.rs) + +Line 22. + +*** + +### new + +#### Signature + +```rust +fn new(params: ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/skills/builtin/datasphere_serverless.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere_serverless.rs) + +Line 14. + +*** + +### params + +#### Signature + +```rust +fn params(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/skills/builtin/datasphere_serverless.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere_serverless.rs) + +Line 34. + +*** + +### register\_tools + +#### Signature + +```rust +fn register_tools(&self, agent: &mut ?) +``` + +#### Parameters + + + +#### Source + +[`src/skills/builtin/datasphere_serverless.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere_serverless.rs) + +Line 47. + +*** + +### setup + +#### Signature + +```rust +fn setup(&mut self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/datasphere_serverless.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere_serverless.rs) + +Line 38. + +*** + +### supports\_multiple\_instances + +#### Signature + +```rust +fn supports_multiple_instances(&self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/datasphere_serverless.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere_serverless.rs) + +Line 30. + +## Source + +[`src/skills/builtin/datasphere_serverless.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere_serverless.rs) + +Line 9. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/builtin/datasphere-serverless/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/builtin/datasphere-serverless/index.mdx new file mode 100644 index 0000000000..25565fdff9 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/skills/builtin/datasphere-serverless/index.mdx @@ -0,0 +1,30 @@ +--- +slug: "/reference/rust/signalwire/skills/builtin/datasphere-serverless" +title: "datasphere_serverless" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::skills::builtin::datasphere_serverless" + parent: "signalwire::skills::builtin" + module: "skills.builtin" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere_serverless.rs" + visibility: "public" +--- +# `datasphere_serverless` + +## Classes + + + + Search knowledge using SignalWire DataSphere with serverless DataMap execution. + + + +## Source + +[`src/skills/builtin/datasphere_serverless.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere_serverless.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/builtin/datasphere/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/builtin/datasphere/index.mdx new file mode 100644 index 0000000000..ea25c8a332 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/skills/builtin/datasphere/index.mdx @@ -0,0 +1,227 @@ +--- +slug: "/reference/rust/signalwire/skills/builtin/datasphere" +title: "datasphere" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::skills::builtin::datasphere" + parent: "signalwire::skills::builtin" + module: "skills.builtin" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere.rs" + visibility: "public" +--- +# `datasphere` + +Search knowledge using SignalWire DataSphere RAG stack. + +Mirrors Python's `signalwire.skills.datasphere`: real HTTP POST to +`https://{space_name}.signalwire.com/api/datasphere/documents/search` +with project-id/token Basic auth and a JSON body containing the +document ID, query, distance, and count. + +The base URL can be overridden by setting `DATASPHERE_BASE_URL` — +`audit_skills_dispatch.py` uses this to point at its loopback +fixture. Token can also come from `DATASPHERE_TOKEN`. + +## Signature + +```rust +struct Datasphere { /* fields */ } +``` + +## Inheritance + +**Implements:** `SkillBase` + +## Methods + +### description + +#### Signature + +```rust +fn description(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere.rs) + +Line 36. + +*** + +### get\_global\_data + +#### Signature + +```rust +fn get_global_data(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/builtin/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere.rs) + +Line 164. + +*** + +### get\_prompt\_sections + +#### Signature + +```rust +fn get_prompt_sections(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/builtin/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere.rs) + +Line 178. + +*** + +### name + +#### Signature + +```rust +fn name(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere.rs) + +Line 32. + +*** + +### new + +#### Signature + +```rust +fn new(params: ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/skills/builtin/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere.rs) + +Line 24. + +*** + +### params + +#### Signature + +```rust +fn params(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/skills/builtin/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere.rs) + +Line 44. + +*** + +### register\_tools + +#### Signature + +```rust +fn register_tools(&self, agent: &mut ?) +``` + +#### Parameters + + + +#### Source + +[`src/skills/builtin/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere.rs) + +Line 63. + +*** + +### setup + +#### Signature + +```rust +fn setup(&mut self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere.rs) + +Line 48. + +*** + +### supports\_multiple\_instances + +#### Signature + +```rust +fn supports_multiple_instances(&self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere.rs) + +Line 40. + +## Source + +[`src/skills/builtin/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere.rs) + +Line 19. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/builtin/datetime/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/builtin/datetime/index.mdx new file mode 100644 index 0000000000..a941cc7e23 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/skills/builtin/datetime/index.mdx @@ -0,0 +1,178 @@ +--- +slug: "/reference/rust/signalwire/skills/builtin/datetime" +title: "datetime" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::skills::builtin::datetime" + parent: "signalwire::skills::builtin" + module: "skills.builtin" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datetime.rs" + visibility: "public" +--- +# `datetime` + +Get current date, time, and timezone information. + +## Signature + +```rust +struct Datetime { /* fields */ } +``` + +## Inheritance + +**Implements:** `SkillBase` + +## Methods + +### description + +#### Signature + +```rust +fn description(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/datetime.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datetime.rs) + +Line 25. + +*** + +### get\_prompt\_sections + +#### Signature + +```rust +fn get_prompt_sections(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/builtin/datetime.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datetime.rs) + +Line 96. + +*** + +### name + +#### Signature + +```rust +fn name(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/datetime.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datetime.rs) + +Line 21. + +*** + +### new + +#### Signature + +```rust +fn new(params: ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/skills/builtin/datetime.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datetime.rs) + +Line 13. + +*** + +### params + +#### Signature + +```rust +fn params(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/skills/builtin/datetime.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datetime.rs) + +Line 29. + +*** + +### register\_tools + +#### Signature + +```rust +fn register_tools(&self, agent: &mut ?) +``` + +#### Parameters + + + +#### Source + +[`src/skills/builtin/datetime.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datetime.rs) + +Line 37. + +*** + +### setup + +#### Signature + +```rust +fn setup(&mut self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/datetime.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datetime.rs) + +Line 33. + +## Source + +[`src/skills/builtin/datetime.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datetime.rs) + +Line 8. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/builtin/google-maps/google-maps/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/builtin/google-maps/google-maps/index.mdx new file mode 100644 index 0000000000..38b5ddfcb8 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/skills/builtin/google-maps/google-maps/index.mdx @@ -0,0 +1,198 @@ +--- +slug: "/reference/rust/signalwire/skills/builtin/google-maps/google-maps" +title: "GoogleMaps" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::skills::builtin::google_maps::GoogleMaps" + parent: "signalwire::skills::builtin::google_maps" + module: "skills.builtin.google_maps" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/google_maps.rs" + visibility: "public" +--- +# `GoogleMaps` + +Validate addresses and compute driving routes using Google Maps (DataMap-based). + +## Signature + +```rust +struct GoogleMaps { /* fields */ } +``` + +## Inheritance + +**Implements:** `SkillBase` + +## Methods + +### description + +#### Signature + +```rust +fn description(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/google_maps.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/google_maps.rs) + +Line 24. + +*** + +### get\_hints + +#### Signature + +```rust +fn get_hints(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/builtin/google_maps.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/google_maps.rs) + +Line 157. + +*** + +### get\_prompt\_sections + +#### Signature + +```rust +fn get_prompt_sections(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/builtin/google_maps.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/google_maps.rs) + +Line 168. + +*** + +### name + +#### Signature + +```rust +fn name(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/google_maps.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/google_maps.rs) + +Line 20. + +*** + +### new + +#### Signature + +```rust +fn new(params: ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/skills/builtin/google_maps.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/google_maps.rs) + +Line 12. + +*** + +### params + +#### Signature + +```rust +fn params(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/skills/builtin/google_maps.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/google_maps.rs) + +Line 28. + +*** + +### register\_tools + +#### Signature + +```rust +fn register_tools(&self, agent: &mut ?) +``` + +#### Parameters + + + +#### Source + +[`src/skills/builtin/google_maps.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/google_maps.rs) + +Line 36. + +*** + +### setup + +#### Signature + +```rust +fn setup(&mut self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/google_maps.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/google_maps.rs) + +Line 32. + +## Source + +[`src/skills/builtin/google_maps.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/google_maps.rs) + +Line 7. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/builtin/google-maps/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/builtin/google-maps/index.mdx new file mode 100644 index 0000000000..f6cacb1620 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/skills/builtin/google-maps/index.mdx @@ -0,0 +1,30 @@ +--- +slug: "/reference/rust/signalwire/skills/builtin/google-maps" +title: "google_maps" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::skills::builtin::google_maps" + parent: "signalwire::skills::builtin" + module: "skills.builtin" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/google_maps.rs" + visibility: "public" +--- +# `google_maps` + +## Classes + + + + Validate addresses and compute driving routes using Google Maps (DataMap-based). + + + +## Source + +[`src/skills/builtin/google_maps.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/google_maps.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/builtin/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/builtin/index.mdx new file mode 100644 index 0000000000..ef5ce1a8bd --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/skills/builtin/index.mdx @@ -0,0 +1,76 @@ +--- +slug: "/reference/rust/signalwire/skills/builtin" +title: "builtin" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::skills::builtin" + parent: "signalwire::skills" + module: "skills" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/mod.rs" + visibility: "public" +--- +# `builtin` + +## Classes + + + + Search knowledge using SignalWire DataSphere RAG stack. + + + + Get current date, time, and timezone information. + + + + Tell jokes using the API Ninjas joke API (DataMap-based). + + + + Perform basic mathematical calculations. + + + + Fast web scraping and crawling capabilities (handler-based). + + + +## Modules + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## Source + +[`src/skills/builtin/mod.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/mod.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/builtin/info-gatherer/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/builtin/info-gatherer/index.mdx new file mode 100644 index 0000000000..c736c5390f --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/skills/builtin/info-gatherer/index.mdx @@ -0,0 +1,30 @@ +--- +slug: "/reference/rust/signalwire/skills/builtin/info-gatherer" +title: "info_gatherer" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::skills::builtin::info_gatherer" + parent: "signalwire::skills::builtin" + module: "skills.builtin" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/info_gatherer.rs" + visibility: "public" +--- +# `info_gatherer` + +## Classes + + + + Gather answers to a configurable list of questions (handler-based). + + + +## Source + +[`src/skills/builtin/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/info_gatherer.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/builtin/info-gatherer/info-gatherer/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/builtin/info-gatherer/info-gatherer/index.mdx new file mode 100644 index 0000000000..09544b8457 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/skills/builtin/info-gatherer/info-gatherer/index.mdx @@ -0,0 +1,218 @@ +--- +slug: "/reference/rust/signalwire/skills/builtin/info-gatherer/info-gatherer" +title: "InfoGatherer" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::skills::builtin::info_gatherer::InfoGatherer" + parent: "signalwire::skills::builtin::info_gatherer" + module: "skills.builtin.info_gatherer" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/info_gatherer.rs" + visibility: "public" +--- +# `InfoGatherer` + +Gather answers to a configurable list of questions (handler-based). + +## Signature + +```rust +struct InfoGatherer { /* fields */ } +``` + +## Inheritance + +**Implements:** `SkillBase` + +## Methods + +### description + +#### Signature + +```rust +fn description(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/info_gatherer.rs) + +Line 25. + +*** + +### get\_global\_data + +#### Signature + +```rust +fn get_global_data(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/builtin/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/info_gatherer.rs) + +Line 171. + +*** + +### get\_prompt\_sections + +#### Signature + +```rust +fn get_prompt_sections(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/builtin/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/info_gatherer.rs) + +Line 187. + +*** + +### name + +#### Signature + +```rust +fn name(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/info_gatherer.rs) + +Line 21. + +*** + +### new + +#### Signature + +```rust +fn new(params: ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/skills/builtin/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/info_gatherer.rs) + +Line 13. + +*** + +### params + +#### Signature + +```rust +fn params(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/skills/builtin/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/info_gatherer.rs) + +Line 33. + +*** + +### register\_tools + +#### Signature + +```rust +fn register_tools(&self, agent: &mut ?) +``` + +#### Parameters + + + +#### Source + +[`src/skills/builtin/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/info_gatherer.rs) + +Line 42. + +*** + +### setup + +#### Signature + +```rust +fn setup(&mut self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/info_gatherer.rs) + +Line 37. + +*** + +### supports\_multiple\_instances + +#### Signature + +```rust +fn supports_multiple_instances(&self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/info_gatherer.rs) + +Line 29. + +## Source + +[`src/skills/builtin/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/info_gatherer.rs) + +Line 8. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/builtin/joke/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/builtin/joke/index.mdx new file mode 100644 index 0000000000..cdc86659bc --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/skills/builtin/joke/index.mdx @@ -0,0 +1,198 @@ +--- +slug: "/reference/rust/signalwire/skills/builtin/joke" +title: "joke" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::skills::builtin::joke" + parent: "signalwire::skills::builtin" + module: "skills.builtin" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/joke.rs" + visibility: "public" +--- +# `joke` + +Tell jokes using the API Ninjas joke API (DataMap-based). + +## Signature + +```rust +struct Joke { /* fields */ } +``` + +## Inheritance + +**Implements:** `SkillBase` + +## Methods + +### description + +#### Signature + +```rust +fn description(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/joke.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/joke.rs) + +Line 24. + +*** + +### get\_global\_data + +#### Signature + +```rust +fn get_global_data(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/builtin/joke.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/joke.rs) + +Line 84. + +*** + +### get\_prompt\_sections + +#### Signature + +```rust +fn get_prompt_sections(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/builtin/joke.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/joke.rs) + +Line 90. + +*** + +### name + +#### Signature + +```rust +fn name(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/joke.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/joke.rs) + +Line 20. + +*** + +### new + +#### Signature + +```rust +fn new(params: ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/skills/builtin/joke.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/joke.rs) + +Line 12. + +*** + +### params + +#### Signature + +```rust +fn params(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/skills/builtin/joke.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/joke.rs) + +Line 28. + +*** + +### register\_tools + +#### Signature + +```rust +fn register_tools(&self, agent: &mut ?) +``` + +#### Parameters + + + +#### Source + +[`src/skills/builtin/joke.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/joke.rs) + +Line 36. + +*** + +### setup + +#### Signature + +```rust +fn setup(&mut self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/joke.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/joke.rs) + +Line 32. + +## Source + +[`src/skills/builtin/joke.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/joke.rs) + +Line 7. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/builtin/math/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/builtin/math/index.mdx new file mode 100644 index 0000000000..d47be7efb3 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/skills/builtin/math/index.mdx @@ -0,0 +1,178 @@ +--- +slug: "/reference/rust/signalwire/skills/builtin/math" +title: "math" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::skills::builtin::math" + parent: "signalwire::skills::builtin" + module: "skills.builtin" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/math.rs" + visibility: "public" +--- +# `math` + +Perform basic mathematical calculations. + +## Signature + +```rust +struct Math { /* fields */ } +``` + +## Inheritance + +**Implements:** `SkillBase` + +## Methods + +### description + +#### Signature + +```rust +fn description(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/math.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/math.rs) + +Line 25. + +*** + +### get\_prompt\_sections + +#### Signature + +```rust +fn get_prompt_sections(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/builtin/math.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/math.rs) + +Line 99. + +*** + +### name + +#### Signature + +```rust +fn name(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/math.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/math.rs) + +Line 21. + +*** + +### new + +#### Signature + +```rust +fn new(params: ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/skills/builtin/math.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/math.rs) + +Line 13. + +*** + +### params + +#### Signature + +```rust +fn params(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/skills/builtin/math.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/math.rs) + +Line 29. + +*** + +### register\_tools + +#### Signature + +```rust +fn register_tools(&self, agent: &mut ?) +``` + +#### Parameters + + + +#### Source + +[`src/skills/builtin/math.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/math.rs) + +Line 37. + +*** + +### setup + +#### Signature + +```rust +fn setup(&mut self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/math.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/math.rs) + +Line 33. + +## Source + +[`src/skills/builtin/math.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/math.rs) + +Line 8. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/builtin/mcp-gateway/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/builtin/mcp-gateway/index.mdx new file mode 100644 index 0000000000..6b282c1765 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/skills/builtin/mcp-gateway/index.mdx @@ -0,0 +1,30 @@ +--- +slug: "/reference/rust/signalwire/skills/builtin/mcp-gateway" +title: "mcp_gateway" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::skills::builtin::mcp_gateway" + parent: "signalwire::skills::builtin" + module: "skills.builtin" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/mcp_gateway.rs" + visibility: "public" +--- +# `mcp_gateway` + +## Classes + + + + Bridge MCP servers with SWAIG functions (handler-based). + + + +## Source + +[`src/skills/builtin/mcp_gateway.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/mcp_gateway.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/builtin/mcp-gateway/mcp-gateway/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/builtin/mcp-gateway/mcp-gateway/index.mdx new file mode 100644 index 0000000000..1575651f41 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/skills/builtin/mcp-gateway/mcp-gateway/index.mdx @@ -0,0 +1,218 @@ +--- +slug: "/reference/rust/signalwire/skills/builtin/mcp-gateway/mcp-gateway" +title: "McpGateway" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::skills::builtin::mcp_gateway::McpGateway" + parent: "signalwire::skills::builtin::mcp_gateway" + module: "skills.builtin.mcp_gateway" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/mcp_gateway.rs" + visibility: "public" +--- +# `McpGateway` + +Bridge MCP servers with SWAIG functions (handler-based). + +## Signature + +```rust +struct McpGateway { /* fields */ } +``` + +## Inheritance + +**Implements:** `SkillBase` + +## Methods + +### description + +#### Signature + +```rust +fn description(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/mcp_gateway.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/mcp_gateway.rs) + +Line 25. + +*** + +### get\_global\_data + +#### Signature + +```rust +fn get_global_data(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/builtin/mcp_gateway.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/mcp_gateway.rs) + +Line 201. + +*** + +### get\_hints + +#### Signature + +```rust +fn get_hints(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/builtin/mcp_gateway.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/mcp_gateway.rs) + +Line 185. + +*** + +### get\_prompt\_sections + +#### Signature + +```rust +fn get_prompt_sections(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/builtin/mcp_gateway.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/mcp_gateway.rs) + +Line 218. + +*** + +### name + +#### Signature + +```rust +fn name(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/mcp_gateway.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/mcp_gateway.rs) + +Line 21. + +*** + +### new + +#### Signature + +```rust +fn new(params: ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/skills/builtin/mcp_gateway.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/mcp_gateway.rs) + +Line 13. + +*** + +### params + +#### Signature + +```rust +fn params(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/skills/builtin/mcp_gateway.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/mcp_gateway.rs) + +Line 29. + +*** + +### register\_tools + +#### Signature + +```rust +fn register_tools(&self, agent: &mut ?) +``` + +#### Parameters + + + +#### Source + +[`src/skills/builtin/mcp_gateway.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/mcp_gateway.rs) + +Line 37. + +*** + +### setup + +#### Signature + +```rust +fn setup(&mut self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/mcp_gateway.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/mcp_gateway.rs) + +Line 33. + +## Source + +[`src/skills/builtin/mcp_gateway.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/mcp_gateway.rs) + +Line 8. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/builtin/native-vector-search/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/builtin/native-vector-search/index.mdx new file mode 100644 index 0000000000..48216c936f --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/skills/builtin/native-vector-search/index.mdx @@ -0,0 +1,30 @@ +--- +slug: "/reference/rust/signalwire/skills/builtin/native-vector-search" +title: "native_vector_search" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::skills::builtin::native_vector_search" + parent: "signalwire::skills::builtin" + module: "skills.builtin" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/native_vector_search.rs" + visibility: "public" +--- +# `native_vector_search` + +## Classes + + + + Search document indexes using vector similarity and keyword search (handler-based). + + + +## Source + +[`src/skills/builtin/native_vector_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/native_vector_search.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/builtin/native-vector-search/native-vector-search/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/builtin/native-vector-search/native-vector-search/index.mdx new file mode 100644 index 0000000000..36d191a725 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/skills/builtin/native-vector-search/native-vector-search/index.mdx @@ -0,0 +1,198 @@ +--- +slug: "/reference/rust/signalwire/skills/builtin/native-vector-search/native-vector-search" +title: "NativeVectorSearch" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::skills::builtin::native_vector_search::NativeVectorSearch" + parent: "signalwire::skills::builtin::native_vector_search" + module: "skills.builtin.native_vector_search" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/native_vector_search.rs" + visibility: "public" +--- +# `NativeVectorSearch` + +Search document indexes using vector similarity and keyword search (handler-based). + +## Signature + +```rust +struct NativeVectorSearch { /* fields */ } +``` + +## Inheritance + +**Implements:** `SkillBase` + +## Methods + +### description + +#### Signature + +```rust +fn description(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/native_vector_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/native_vector_search.rs) + +Line 25. + +*** + +### get\_hints + +#### Signature + +```rust +fn get_hints(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/builtin/native_vector_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/native_vector_search.rs) + +Line 98. + +*** + +### name + +#### Signature + +```rust +fn name(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/native_vector_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/native_vector_search.rs) + +Line 21. + +*** + +### new + +#### Signature + +```rust +fn new(params: ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/skills/builtin/native_vector_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/native_vector_search.rs) + +Line 13. + +*** + +### params + +#### Signature + +```rust +fn params(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/skills/builtin/native_vector_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/native_vector_search.rs) + +Line 33. + +*** + +### register\_tools + +#### Signature + +```rust +fn register_tools(&self, agent: &mut ?) +``` + +#### Parameters + + + +#### Source + +[`src/skills/builtin/native_vector_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/native_vector_search.rs) + +Line 41. + +*** + +### setup + +#### Signature + +```rust +fn setup(&mut self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/native_vector_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/native_vector_search.rs) + +Line 37. + +*** + +### supports\_multiple\_instances + +#### Signature + +```rust +fn supports_multiple_instances(&self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/native_vector_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/native_vector_search.rs) + +Line 29. + +## Source + +[`src/skills/builtin/native_vector_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/native_vector_search.rs) + +Line 8. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/builtin/play-background-file/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/builtin/play-background-file/index.mdx new file mode 100644 index 0000000000..6ee3bc18aa --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/skills/builtin/play-background-file/index.mdx @@ -0,0 +1,30 @@ +--- +slug: "/reference/rust/signalwire/skills/builtin/play-background-file" +title: "play_background_file" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::skills::builtin::play_background_file" + parent: "signalwire::skills::builtin" + module: "skills.builtin" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/play_background_file.rs" + visibility: "public" +--- +# `play_background_file` + +## Classes + + + + Control background file playback (DataMap-based). + + + +## Source + +[`src/skills/builtin/play_background_file.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/play_background_file.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/builtin/play-background-file/play-background-file/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/builtin/play-background-file/play-background-file/index.mdx new file mode 100644 index 0000000000..fc90694a8e --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/skills/builtin/play-background-file/play-background-file/index.mdx @@ -0,0 +1,178 @@ +--- +slug: "/reference/rust/signalwire/skills/builtin/play-background-file/play-background-file" +title: "PlayBackgroundFile" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::skills::builtin::play_background_file::PlayBackgroundFile" + parent: "signalwire::skills::builtin::play_background_file" + module: "skills.builtin.play_background_file" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/play_background_file.rs" + visibility: "public" +--- +# `PlayBackgroundFile` + +Control background file playback (DataMap-based). + +## Signature + +```rust +struct PlayBackgroundFile { /* fields */ } +``` + +## Inheritance + +**Implements:** `SkillBase` + +## Methods + +### description + +#### Signature + +```rust +fn description(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/play_background_file.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/play_background_file.rs) + +Line 24. + +*** + +### name + +#### Signature + +```rust +fn name(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/play_background_file.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/play_background_file.rs) + +Line 20. + +*** + +### new + +#### Signature + +```rust +fn new(params: ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/skills/builtin/play_background_file.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/play_background_file.rs) + +Line 12. + +*** + +### params + +#### Signature + +```rust +fn params(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/skills/builtin/play_background_file.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/play_background_file.rs) + +Line 32. + +*** + +### register\_tools + +#### Signature + +```rust +fn register_tools(&self, agent: &mut ?) +``` + +#### Parameters + + + +#### Source + +[`src/skills/builtin/play_background_file.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/play_background_file.rs) + +Line 41. + +*** + +### setup + +#### Signature + +```rust +fn setup(&mut self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/play_background_file.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/play_background_file.rs) + +Line 36. + +*** + +### supports\_multiple\_instances + +#### Signature + +```rust +fn supports_multiple_instances(&self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/play_background_file.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/play_background_file.rs) + +Line 28. + +## Source + +[`src/skills/builtin/play_background_file.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/play_background_file.rs) + +Line 7. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/builtin/spider/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/builtin/spider/index.mdx new file mode 100644 index 0000000000..3667888598 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/skills/builtin/spider/index.mdx @@ -0,0 +1,198 @@ +--- +slug: "/reference/rust/signalwire/skills/builtin/spider" +title: "spider" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::skills::builtin::spider" + parent: "signalwire::skills::builtin" + module: "skills.builtin" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/spider.rs" + visibility: "public" +--- +# `spider` + +Fast web scraping and crawling capabilities (handler-based). + +## Signature + +```rust +struct Spider { /* fields */ } +``` + +## Inheritance + +**Implements:** `SkillBase` + +## Methods + +### description + +#### Signature + +```rust +fn description(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/spider.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/spider.rs) + +Line 25. + +*** + +### get\_hints + +#### Signature + +```rust +fn get_hints(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/builtin/spider.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/spider.rs) + +Line 161. + +*** + +### name + +#### Signature + +```rust +fn name(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/spider.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/spider.rs) + +Line 21. + +*** + +### new + +#### Signature + +```rust +fn new(params: ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/skills/builtin/spider.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/spider.rs) + +Line 13. + +*** + +### params + +#### Signature + +```rust +fn params(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/skills/builtin/spider.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/spider.rs) + +Line 33. + +*** + +### register\_tools + +#### Signature + +```rust +fn register_tools(&self, agent: &mut ?) +``` + +#### Parameters + + + +#### Source + +[`src/skills/builtin/spider.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/spider.rs) + +Line 41. + +*** + +### setup + +#### Signature + +```rust +fn setup(&mut self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/spider.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/spider.rs) + +Line 37. + +*** + +### supports\_multiple\_instances + +#### Signature + +```rust +fn supports_multiple_instances(&self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/spider.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/spider.rs) + +Line 29. + +## Source + +[`src/skills/builtin/spider.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/spider.rs) + +Line 8. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/builtin/swml-transfer/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/builtin/swml-transfer/index.mdx new file mode 100644 index 0000000000..d0bd672263 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/skills/builtin/swml-transfer/index.mdx @@ -0,0 +1,30 @@ +--- +slug: "/reference/rust/signalwire/skills/builtin/swml-transfer" +title: "swml_transfer" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::skills::builtin::swml_transfer" + parent: "signalwire::skills::builtin" + module: "skills.builtin" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/swml_transfer.rs" + visibility: "public" +--- +# `swml_transfer` + +## Classes + + + + Transfer calls between agents based on pattern matching (DataMap-based). + + + +## Source + +[`src/skills/builtin/swml_transfer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/swml_transfer.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/builtin/swml-transfer/swml-transfer/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/builtin/swml-transfer/swml-transfer/index.mdx new file mode 100644 index 0000000000..49631184e4 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/skills/builtin/swml-transfer/swml-transfer/index.mdx @@ -0,0 +1,218 @@ +--- +slug: "/reference/rust/signalwire/skills/builtin/swml-transfer/swml-transfer" +title: "SwmlTransfer" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::skills::builtin::swml_transfer::SwmlTransfer" + parent: "signalwire::skills::builtin::swml_transfer" + module: "skills.builtin.swml_transfer" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/swml_transfer.rs" + visibility: "public" +--- +# `SwmlTransfer` + +Transfer calls between agents based on pattern matching (DataMap-based). + +## Signature + +```rust +struct SwmlTransfer { /* fields */ } +``` + +## Inheritance + +**Implements:** `SkillBase` + +## Methods + +### description + +#### Signature + +```rust +fn description(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/swml_transfer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/swml_transfer.rs) + +Line 24. + +*** + +### get\_hints + +#### Signature + +```rust +fn get_hints(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/builtin/swml_transfer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/swml_transfer.rs) + +Line 169. + +*** + +### get\_prompt\_sections + +#### Signature + +```rust +fn get_prompt_sections(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/builtin/swml_transfer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/swml_transfer.rs) + +Line 190. + +*** + +### name + +#### Signature + +```rust +fn name(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/swml_transfer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/swml_transfer.rs) + +Line 20. + +*** + +### new + +#### Signature + +```rust +fn new(params: ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/skills/builtin/swml_transfer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/swml_transfer.rs) + +Line 12. + +*** + +### params + +#### Signature + +```rust +fn params(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/skills/builtin/swml_transfer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/swml_transfer.rs) + +Line 32. + +*** + +### register\_tools + +#### Signature + +```rust +fn register_tools(&self, agent: &mut ?) +``` + +#### Parameters + + + +#### Source + +[`src/skills/builtin/swml_transfer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/swml_transfer.rs) + +Line 45. + +*** + +### setup + +#### Signature + +```rust +fn setup(&mut self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/swml_transfer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/swml_transfer.rs) + +Line 36. + +*** + +### supports\_multiple\_instances + +#### Signature + +```rust +fn supports_multiple_instances(&self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/swml_transfer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/swml_transfer.rs) + +Line 28. + +## Source + +[`src/skills/builtin/swml_transfer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/swml_transfer.rs) + +Line 7. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/builtin/weather-api/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/builtin/weather-api/index.mdx new file mode 100644 index 0000000000..501efb5d8c --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/skills/builtin/weather-api/index.mdx @@ -0,0 +1,30 @@ +--- +slug: "/reference/rust/signalwire/skills/builtin/weather-api" +title: "weather_api" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::skills::builtin::weather_api" + parent: "signalwire::skills::builtin" + module: "skills.builtin" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/weather_api.rs" + visibility: "public" +--- +# `weather_api` + +## Classes + + + + Get current weather information from WeatherAPI.com (DataMap-based). + + + +## Source + +[`src/skills/builtin/weather_api.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/weather_api.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/builtin/weather-api/weather-api/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/builtin/weather-api/weather-api/index.mdx new file mode 100644 index 0000000000..cd59a61e51 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/skills/builtin/weather-api/weather-api/index.mdx @@ -0,0 +1,158 @@ +--- +slug: "/reference/rust/signalwire/skills/builtin/weather-api/weather-api" +title: "WeatherApi" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::skills::builtin::weather_api::WeatherApi" + parent: "signalwire::skills::builtin::weather_api" + module: "skills.builtin.weather_api" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/weather_api.rs" + visibility: "public" +--- +# `WeatherApi` + +Get current weather information from WeatherAPI.com (DataMap-based). + +## Signature + +```rust +struct WeatherApi { /* fields */ } +``` + +## Inheritance + +**Implements:** `SkillBase` + +## Methods + +### description + +#### Signature + +```rust +fn description(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/weather_api.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/weather_api.rs) + +Line 24. + +*** + +### name + +#### Signature + +```rust +fn name(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/weather_api.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/weather_api.rs) + +Line 20. + +*** + +### new + +#### Signature + +```rust +fn new(params: ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/skills/builtin/weather_api.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/weather_api.rs) + +Line 12. + +*** + +### params + +#### Signature + +```rust +fn params(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/skills/builtin/weather_api.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/weather_api.rs) + +Line 28. + +*** + +### register\_tools + +#### Signature + +```rust +fn register_tools(&self, agent: &mut ?) +``` + +#### Parameters + + + +#### Source + +[`src/skills/builtin/weather_api.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/weather_api.rs) + +Line 36. + +*** + +### setup + +#### Signature + +```rust +fn setup(&mut self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/weather_api.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/weather_api.rs) + +Line 32. + +## Source + +[`src/skills/builtin/weather_api.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/weather_api.rs) + +Line 7. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/builtin/web-search/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/builtin/web-search/index.mdx new file mode 100644 index 0000000000..5181b397cf --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/skills/builtin/web-search/index.mdx @@ -0,0 +1,30 @@ +--- +slug: "/reference/rust/signalwire/skills/builtin/web-search" +title: "web_search" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::skills::builtin::web_search" + parent: "signalwire::skills::builtin" + module: "skills.builtin" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/web_search.rs" + visibility: "public" +--- +# `web_search` + +## Classes + + + + Search the web using Google Custom Search API. + + + +## Source + +[`src/skills/builtin/web_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/web_search.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/builtin/web-search/web-search/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/builtin/web-search/web-search/index.mdx new file mode 100644 index 0000000000..77459055a5 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/skills/builtin/web-search/web-search/index.mdx @@ -0,0 +1,271 @@ +--- +slug: "/reference/rust/signalwire/skills/builtin/web-search/web-search" +title: "WebSearch" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::skills::builtin::web_search::WebSearch" + parent: "signalwire::skills::builtin::web_search" + module: "skills.builtin.web_search" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/web_search.rs" + visibility: "public" +--- +# `WebSearch` + +Search the web using Google Custom Search API. + +Mirrors Python's `signalwire.skills.web_search`: the SDK issues a +real HTTP GET to Google CSE (`https://www.googleapis.com/customsearch/v1`) +with the query, key, and CSE ID in the query string, and parses the +JSON response. The base URL can be overridden via the +`WEB_SEARCH_BASE_URL` env var (used by `audit_skills_dispatch.py`'s +fixture). Without that override, the URL points at Google. + +## Signature + +```rust +struct WebSearch { /* fields */ } +``` + +## Inheritance + +**Implements:** `SkillBase` + +## Methods + +### description + +#### Signature + +```rust +fn description(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/web_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/web_search.rs) + +Line 44. + +*** + +### get\_global\_data + +#### Signature + +```rust +fn get_global_data(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/builtin/web_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/web_search.rs) + +Line 248. + +*** + +### get\_parameter\_schema + +Advertise the accepted parameters, including the latency-control set +(Python `WebSearchSkill.get_parameter_schema`, commit 295745b). Every +param `register_tools` reads must appear here so it is discoverable; +the inline test module guards against the recurring "read a param but +forgot the schema entry" drift class. + +#### Signature + +```rust +fn get_parameter_schema(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/builtin/web_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/web_search.rs) + +Line 278. + +*** + +### get\_prompt\_sections + +#### Signature + +```rust +fn get_prompt_sections(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/builtin/web_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/web_search.rs) + +Line 258. + +*** + +### name + +#### Signature + +```rust +fn name(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/web_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/web_search.rs) + +Line 40. + +*** + +### new + +#### Signature + +```rust +fn new(params: ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/skills/builtin/web_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/web_search.rs) + +Line 32. + +*** + +### params + +#### Signature + +```rust +fn params(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/skills/builtin/web_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/web_search.rs) + +Line 56. + +*** + +### register\_tools + +#### Signature + +```rust +fn register_tools(&self, agent: &mut ?) +``` + +#### Parameters + + + +#### Source + +[`src/skills/builtin/web_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/web_search.rs) + +Line 73. + +*** + +### setup + +#### Signature + +```rust +fn setup(&mut self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/web_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/web_search.rs) + +Line 60. + +*** + +### supports\_multiple\_instances + +#### Signature + +```rust +fn supports_multiple_instances(&self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/web_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/web_search.rs) + +Line 52. + +*** + +### version + +#### Signature + +```rust +fn version(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/web_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/web_search.rs) + +Line 48. + +## Source + +[`src/skills/builtin/web_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/web_search.rs) + +Line 27. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/builtin/wikipedia-search/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/builtin/wikipedia-search/index.mdx new file mode 100644 index 0000000000..48e09fef3b --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/skills/builtin/wikipedia-search/index.mdx @@ -0,0 +1,30 @@ +--- +slug: "/reference/rust/signalwire/skills/builtin/wikipedia-search" +title: "wikipedia_search" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::skills::builtin::wikipedia_search" + parent: "signalwire::skills::builtin" + module: "skills.builtin" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/wikipedia_search.rs" + visibility: "public" +--- +# `wikipedia_search` + +## Classes + + + + Search Wikipedia and get article summaries. + + + +## Source + +[`src/skills/builtin/wikipedia_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/wikipedia_search.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/builtin/wikipedia-search/wikipedia-search/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/builtin/wikipedia-search/wikipedia-search/index.mdx new file mode 100644 index 0000000000..0debd8e5e0 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/skills/builtin/wikipedia-search/wikipedia-search/index.mdx @@ -0,0 +1,183 @@ +--- +slug: "/reference/rust/signalwire/skills/builtin/wikipedia-search/wikipedia-search" +title: "WikipediaSearch" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::skills::builtin::wikipedia_search::WikipediaSearch" + parent: "signalwire::skills::builtin::wikipedia_search" + module: "skills.builtin.wikipedia_search" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/wikipedia_search.rs" + visibility: "public" +--- +# `WikipediaSearch` + +Search Wikipedia and get article summaries. + +Mirrors Python's `signalwire.skills.wikipedia_search`: real HTTP GET +against the Wikipedia REST API. The base URL can be overridden by +setting `WIKIPEDIA_BASE_URL` (used by `audit_skills_dispatch.py`'s +fixture). Defaults to `https://en.wikipedia.org`. + +## Signature + +```rust +struct WikipediaSearch { /* fields */ } +``` + +## Inheritance + +**Implements:** `SkillBase` + +## Methods + +### description + +#### Signature + +```rust +fn description(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/wikipedia_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/wikipedia_search.rs) + +Line 30. + +*** + +### get\_prompt\_sections + +#### Signature + +```rust +fn get_prompt_sections(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/builtin/wikipedia_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/wikipedia_search.rs) + +Line 129. + +*** + +### name + +#### Signature + +```rust +fn name(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/wikipedia_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/wikipedia_search.rs) + +Line 26. + +*** + +### new + +#### Signature + +```rust +fn new(params: ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/skills/builtin/wikipedia_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/wikipedia_search.rs) + +Line 18. + +*** + +### params + +#### Signature + +```rust +fn params(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/skills/builtin/wikipedia_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/wikipedia_search.rs) + +Line 34. + +*** + +### register\_tools + +#### Signature + +```rust +fn register_tools(&self, agent: &mut ?) +``` + +#### Parameters + + + +#### Source + +[`src/skills/builtin/wikipedia_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/wikipedia_search.rs) + +Line 42. + +*** + +### setup + +#### Signature + +```rust +fn setup(&mut self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/wikipedia_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/wikipedia_search.rs) + +Line 38. + +## Source + +[`src/skills/builtin/wikipedia_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/wikipedia_search.rs) + +Line 13. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/index.mdx new file mode 100644 index 0000000000..25a1afbc98 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/skills/index.mdx @@ -0,0 +1,37 @@ +--- +slug: "/reference/rust/signalwire/skills" +title: "skills" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::skills" + parent: "signalwire" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/mod.rs" + visibility: "public" +--- +# `skills` + +## Modules + + + + + + + + + + Built-in skill names as a typed, compile-time-checked closed set. + + + + + +## Source + +[`src/skills/mod.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/mod.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/skill-base/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/skill-base/index.mdx new file mode 100644 index 0000000000..5bcb3d5a5a --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/skills/skill-base/index.mdx @@ -0,0 +1,455 @@ +--- +slug: "/reference/rust/signalwire/skills/skill-base" +title: "skill_base" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::skills::skill_base" + parent: "signalwire::skills" + module: "skills" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs" + visibility: "public" +--- +# `skill_base` + +## Classes + + + + Parameters holder used by the default `SkillBase` implementations. + + + +## Functions + +### value\_to\_map + +Convert a `Value` (expected to be an object) into a `Map`. + +#### Signature + +```rust +fn value_to_map(val: ?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 184. + +## Interfaces + +### SkillBase + +Trait implemented by all skills (both builtin and custom). + +A skill encapsulates tools, hints, global data, and prompt sections that can +be loaded into an `AgentBase` via the `SkillManager`. + +#### Signature + +```rust +trait SkillBase +``` + +#### Inheritance + +**Extends:** `?`, `?` + +#### Methods + +##### cleanup + +Called when the skill is unloaded. + +###### Signature + +```rust +fn cleanup(&mut self) +``` + +###### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 89. + +*** + +##### description + +Human-readable description. + +###### Signature + +```rust +fn description(&self) -> &str +``` + +###### Returns + +`&str` + +###### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 14. + +*** + +##### get\_global\_data + +Key/value pairs merged into the agent's global data. + +###### Signature + +```rust +fn get_global_data(&self) -> ? +``` + +###### Returns + +`?` + +###### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 53. + +*** + +##### get\_hints + +Speech recognition hints. + +###### Signature + +```rust +fn get_hints(&self) -> ? +``` + +###### Returns + +`?` + +###### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 48. + +*** + +##### get\_instance\_key + +Instance key used to track loaded skills (allows tool\_name overrides). + +###### Signature + +```rust +fn get_instance_key(&self) -> ? +``` + +###### Returns + +`?` + +###### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 32. + +*** + +##### get\_parameter\_schema + +JSON-Schema describing accepted parameters. + +###### Signature + +```rust +fn get_parameter_schema(&self) -> ? +``` + +###### Returns + +`?` + +###### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 66. + +*** + +##### get\_prompt\_sections + +POM sections merged into the agent's prompt. + +###### Signature + +```rust +fn get_prompt_sections(&self) -> ? +``` + +###### Returns + +`?` + +###### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 58. + +*** + +##### get\_swaig\_fields + +Get the SWAIG fields to merge into tool definitions. + +###### Signature + +```rust +fn get_swaig_fields(&self) -> ? +``` + +###### Returns + +`?` + +###### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 115. + +*** + +##### get\_tool\_name + +Get the tool name, falling back to `default` if no override is set. + +###### Signature + +```rust +fn get_tool_name(&self, default: &str) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 106. + +*** + +##### name + +Unique snake\_case name of this skill (e.g. `"datetime"`). + +###### Signature + +```rust +fn name(&self) -> &str +``` + +###### Returns + +`&str` + +###### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 11. + +*** + +##### params + +Access the skill's configuration parameters. + +###### Signature + +```rust +fn params(&self) -> &? +``` + +###### Returns + +`&?` + +###### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 92. + +*** + +##### register\_tools + +Register tools on the agent. + +###### Signature + +```rust +fn register_tools(&self, agent: &mut ?) +``` + +###### Parameters + + + +###### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 45. + +*** + +##### required\_env\_vars + +Environment variables that must be set before `setup` is called. + +###### Signature + +```rust +fn required_env_vars(&self) -> ? +``` + +###### Returns + +`?` + +###### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 22. + +*** + +##### setup + +One-time setup. Return `true` on success. + +###### Signature + +```rust +fn setup(&mut self) -> bool +``` + +###### Returns + +`bool` + +###### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 42. + +*** + +##### supports\_multiple\_instances + +Whether multiple instances of this skill can be loaded simultaneously. + +###### Signature + +```rust +fn supports_multiple_instances(&self) -> bool +``` + +###### Returns + +`bool` + +###### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 27. + +*** + +##### validate\_env\_vars + +Validate that all required env vars are set. Returns missing var names. + +###### Signature + +```rust +fn validate_env_vars(&self) -> ? +``` + +###### Returns + +`?` + +###### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 95. + +*** + +##### version + +Semantic version string. + +###### Signature + +```rust +fn version(&self) -> &str +``` + +###### Returns + +`&str` + +###### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 17. + +#### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 9. + +## Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/skill-base/skill-params/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/skill-base/skill-params/index.mdx new file mode 100644 index 0000000000..9a4755652b --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/skills/skill-base/skill-params/index.mdx @@ -0,0 +1,330 @@ +--- +slug: "/reference/rust/signalwire/skills/skill-base/skill-params" +title: "SkillParams" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::skills::skill_base::SkillParams" + parent: "signalwire::skills::skill_base" + module: "skills.skill_base" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs" + visibility: "public" +--- +# `SkillParams` + +Parameters holder used by the default `SkillBase` implementations. + +## Signature + +```rust +struct SkillParams { /* fields */ } +``` + +## Inheritance + +**Implements:** `Debug`, `Clone` + +## Properties + + + +## Methods + +### clone + +#### Signature + +```rust +fn clone(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 125. + +*** + +### empty + +#### Signature + +```rust +fn empty() -> Self +``` + +#### Returns + +`Self` + +#### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 135. + +*** + +### fmt + +#### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 125. + +*** + +### get\_array + +#### Signature + +```rust +fn get_array(&self, key: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 166. + +*** + +### get\_bool + +#### Signature + +```rust +fn get_bool(&self, key: &str) -> bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 147. + +*** + +### get\_bool\_or + +Like `get_bool` but returns `default` when the key is +absent (or not a boolean). Needed for params whose documented default +is `true` — `get_bool` always falls back to `false`. + +#### Signature + +```rust +fn get_bool_or(&self, key: &str, default: bool) -> bool +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 154. + +*** + +### get\_f64 + +#### Signature + +```rust +fn get_f64(&self, key: &str, default: f64) -> f64 +``` + +#### Parameters + + + + + +#### Returns + +`f64` + +#### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 162. + +*** + +### get\_i64 + +#### Signature + +```rust +fn get_i64(&self, key: &str, default: i64) -> i64 +``` + +#### Parameters + + + + + +#### Returns + +`i64` + +#### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 158. + +*** + +### get\_object + +#### Signature + +```rust +fn get_object(&self, key: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 174. + +*** + +### get\_str + +#### Signature + +```rust +fn get_str(&self, key: &str) -> ?<&str> +``` + +#### Parameters + + + +#### Returns + +`?<&str>` + +#### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 139. + +*** + +### get\_str\_or + +#### Signature + +```rust +fn get_str_or(&self, key: &str, default: &str) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 143. + +*** + +### new + +#### Signature + +```rust +fn new(params: ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 131. + +## Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 126. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/skill-manager/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/skill-manager/index.mdx new file mode 100644 index 0000000000..25de3e80e7 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/skills/skill-manager/index.mdx @@ -0,0 +1,30 @@ +--- +slug: "/reference/rust/signalwire/skills/skill-manager" +title: "skill_manager" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::skills::skill_manager" + parent: "signalwire::skills" + module: "skills" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_manager.rs" + visibility: "public" +--- +# `skill_manager` + +## Classes + + + + Manages loaded skills for an agent — validates, sets up, and merges skill contributions (tools, hints, global data, prompt sections) into the agent. + + + +## Source + +[`src/skills/skill_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_manager.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/skill-manager/skill-manager/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/skill-manager/skill-manager/index.mdx new file mode 100644 index 0000000000..22baed096d --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/skills/skill-manager/skill-manager/index.mdx @@ -0,0 +1,244 @@ +--- +slug: "/reference/rust/signalwire/skills/skill-manager/skill-manager" +title: "SkillManager" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::skills::skill_manager::SkillManager" + parent: "signalwire::skills::skill_manager" + module: "skills.skill_manager" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_manager.rs" + visibility: "public" +--- +# `SkillManager` + +Manages loaded skills for an agent — validates, sets up, and merges skill +contributions (tools, hints, global data, prompt sections) into the agent. + +## Signature + +```rust +struct SkillManager { /* fields */ } +``` + +## Inheritance + +**Implements:** `Default` + +## Methods + +### default + +#### Signature + +```rust +fn default() -> Self +``` + +#### Returns + +`Self` + +#### Source + +[`src/skills/skill_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_manager.rs) + +Line 207. + +*** + +### get\_skill + +Get a reference to a loaded skill. + +#### Signature + +```rust +fn get_skill(&self, key: &str) -> ?> +``` + +#### Parameters + + + +#### Returns + +`?>` + +#### Source + +[`src/skills/skill_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_manager.rs) + +Line 201. + +*** + +### has\_skill + +Check if a skill is loaded. + +#### Signature + +```rust +fn has_skill(&self, key: &str) -> bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/skill_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_manager.rs) + +Line 196. + +*** + +### list\_skills + +List all loaded skill instance keys. + +#### Signature + +```rust +fn list_skills(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/skill_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_manager.rs) + +Line 189. + +*** + +### load\_skill + +Load a skill by registry name, creating it via the registry factory. + +Returns `(true, "")` on success, or `(false, reason)` on failure. + +#### Signature + +```rust +fn load_skill( + &mut self, + skill_name: &str, + params: ?, + agent: &mut ? +) -> (bool, ?) +``` + +#### Parameters + + + + + + + +#### Returns + +`(bool, ?)` + +#### Source + +[`src/skills/skill_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_manager.rs) + +Line 26. + +*** + +### load\_skill\_instance + +Load a skill from a pre-constructed instance. + +#### Signature + +```rust +fn load_skill_instance( + &mut self, + instance: ?, + agent: &mut ? +) -> (bool, ?) +``` + +#### Parameters + + + + + +#### Returns + +`(bool, ?)` + +#### Source + +[`src/skills/skill_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_manager.rs) + +Line 113. + +*** + +### new + +#### Signature + +```rust +fn new() -> Self +``` + +#### Returns + +`Self` + +#### Source + +[`src/skills/skill_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_manager.rs) + +Line 17. + +*** + +### unload\_skill + +Unload a skill by instance key. + +#### Signature + +```rust +fn unload_skill(&mut self, key: &str) -> bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/skill_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_manager.rs) + +Line 184. + +## Source + +[`src/skills/skill_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_manager.rs) + +Line 12. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/skill-name/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/skill-name/index.mdx new file mode 100644 index 0000000000..76713fb2a0 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/skills/skill-name/index.mdx @@ -0,0 +1,516 @@ +--- +slug: "/reference/rust/signalwire/skills/skill-name" +title: "skill_name" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::skills::skill_name" + parent: "signalwire::skills" + module: "skills" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs" + visibility: "public" +--- +# `skill_name` + +Built-in skill names as a typed, compile-time-checked closed set. + +Skill names are an open _string_ set in the Python reference (`add_skill` +takes a bare `str`), which keeps parity and lets callers load custom / +third-party skills. The downside is that a typo — `add_skill("datetiem")` +— compiles fine and only fails later at the server. \[`SkillName`] gives the +18 built-in skills a typed alternative so the typo fails at the **call +site** with editor autocompletion, while the string path stays available +for parity and custom skills. + +`AgentBase::add_skill`, +`remove_skill` and +`has_skill` keep their `&str` +parameter (parity with Python's `str`); \[`SkillName`] plugs into them via +\[`SkillName::as_str`] / \[`AsRef`], so the wire behaviour is identical: + +```no_run +use signalwire::agent::{AgentBase, AgentOptions}; +use signalwire::skills::SkillName; +use serde_json::json; + +let mut agent = AgentBase::new(AgentOptions::new("demo")); +agent.add_skill(SkillName::Datetime.as_str(), json!({})); // typed, autocompleted +agent.add_skill("datetime", json!({})); // string still works (parity) +agent.add_skill("my_custom_skill", json!({})); // open set: custom skills ok +assert!(agent.has_skill(SkillName::Datetime.as_str())); +``` + +## Examples + +```rust +use signalwire::agent::{AgentBase, AgentOptions}; +use signalwire::skills::SkillName; +use serde_json::json; + +let mut agent = AgentBase::new(AgentOptions::new("demo")); +agent.add_skill(SkillName::Datetime.as_str(), json!({})); // typed, autocompleted +agent.add_skill("datetime", json!({})); // string still works (parity) +agent.add_skill("my_custom_skill", json!({})); // open set: custom skills ok +assert!(agent.has_skill(SkillName::Datetime.as_str())); +``` + +## Classes + + + + Error returned when a string is parsed into \[`SkillName`] (via \[`FromStr`]) but does not name one of the built-in skills. + + + +## Enums + +### SkillName + +The closed set of skill names that ship built in with this SDK. + +Each variant maps to the canonical snake\_case wire name returned by +\[`SkillName::as_str`] — the same string the [`SkillRegistry`] is keyed by +and that a skill reports from `SkillBase::name`. + +[`SkillRegistry`]: crate::skills::SkillRegistry + +#### Signature + +```rust +enum SkillName +``` + +#### Inheritance + +**Implements:** `Debug`, `Clone`, `Copy`, `PartialEq`, `Eq`, `Hash`, `PartialOrd`, `Ord`, `Display`, `AsRef`, `FromStr`, `From` + +#### Variants + + + `api_ninjas_trivia` + + + + `claude_skills` + + + + `custom_skills` + + + + `datasphere` + + + + `datasphere_serverless` + + + + `datetime` + + + + `google_maps` + + + + `info_gatherer` + + + + `joke` + + + + `math` + + + + `mcp_gateway` + + + + `native_vector_search` + + + + `play_background_file` + + + + `spider` + + + + `swml_transfer` + + + + `weather_api` + + + + `web_search` + + + + `wikipedia_search` + + +#### Methods + +##### all + +Every built-in \[`SkillName`], in declaration order. Useful for +exhaustive iteration (e.g. listing or registering all built-ins). + +###### Signature + +```rust +fn all() -> &'static [?] +``` + +###### Returns + +`&'static [?]` + +###### Source + +[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) + +Line 139. + +*** + +##### as\_ref + +###### Signature + +```rust +fn as_ref(&self) -> &str +``` + +###### Returns + +`&str` + +###### Source + +[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) + +Line 176. + +*** + +##### as\_str + +The canonical snake\_case wire name for this skill (e.g. `"datetime"`). + +This is exactly the string the bare-`str` API expects, so +`agent.add_skill(SkillName::Datetime.as_str(), params)` loads the same +skill as `agent.add_skill("datetime", params)`. + +###### Signature + +```rust +fn as_str(&self) -> &'static str +``` + +###### Returns + +`&'static str` + +###### Source + +[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) + +Line 114. + +*** + +##### clone + +###### Signature + +```rust +fn clone(&self) -> ? +``` + +###### Returns + +`?` + +###### Source + +[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) + +Line 67. + +*** + +##### cmp + +###### Signature + +```rust +fn cmp(&self, other: &?) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) + +Line 67. + +*** + +##### eq + +###### Signature + +```rust +fn eq(&self, other: &?) -> bool +``` + +###### Parameters + + + +###### Returns + +`bool` + +###### Source + +[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) + +Line 67. + +*** + +##### fmt + +###### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) + +Line 67. + +*** + +##### fmt + +###### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) + +Line 170. + +*** + +##### from + +###### Signature + +```rust +fn from(s: ?) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) + +Line 200. + +*** + +##### from + +###### Signature + +```rust +fn from(s: ?) -> &'static str +``` + +###### Parameters + + + +###### Returns + +`&'static str` + +###### Source + +[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) + +Line 206. + +*** + +##### from\_str + +Parse a wire name back into a \[`SkillName`], or `None` if the string is +not a built-in (i.e. a custom / third-party skill name). + +###### Signature + +```rust +fn from_str(name: &str) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) + +Line 164. + +*** + +##### from\_str + +###### Signature + +```rust +fn from_str(s: &str) -> ?::Err> +``` + +###### Parameters + + + +###### Returns + +`?::Err>` + +###### Source + +[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) + +Line 188. + +*** + +##### hash + +###### Signature + +```rust +fn hash<__H: ?>(&self, state: &mut __H) +``` + +###### Type Parameters + + + +###### Parameters + + + +###### Source + +[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) + +Line 67. + +*** + +##### partial\_cmp + +###### Signature + +```rust +fn partial_cmp(&self, other: &?) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) + +Line 67. + +#### Type Aliases + +##### Err + +###### Source + +[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) + +Line 186. + +#### Source + +[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) + +Line 69. + +## Source + +[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/skill-name/parse-skill-name-error/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/skill-name/parse-skill-name-error/index.mdx new file mode 100644 index 0000000000..4eff69353b --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/skills/skill-name/parse-skill-name-error/index.mdx @@ -0,0 +1,155 @@ +--- +slug: "/reference/rust/signalwire/skills/skill-name/parse-skill-name-error" +title: "ParseSkillNameError" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::skills::skill_name::ParseSkillNameError" + parent: "signalwire::skills::skill_name" + module: "skills.skill_name" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs" + visibility: "public" +--- +# `ParseSkillNameError` + +Error returned when a string is parsed into \[`SkillName`] (via \[`FromStr`]) +but does not name one of the built-in skills. + +Unlike the SWAIG media enums, the skill-name set is _open_ (custom skills +are valid), so most callers want the inherent \[`SkillName::from_str`] which +returns `None` for a custom name. The \[`FromStr`] impl exists for the +idiomatic `"datetime".parse::()` and reports the offending input +when it is not a built-in. + +## Signature + +```rust +struct ParseSkillNameError { /* fields */ } +``` + +## Inheritance + +**Implements:** `Debug`, `Clone`, `PartialEq`, `Eq`, `Display`, [Error](/docs/sdk-reference/reference/rust/signalwire/security/webhook-layer/webhook-validate#error) + +## Methods + +### clone + +#### Signature + +```rust +fn clone(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) + +Line 40. + +*** + +### eq + +#### Signature + +```rust +fn eq(&self, other: &?) -> bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) + +Line 40. + +*** + +### fmt + +#### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) + +Line 40. + +*** + +### fmt + +#### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) + +Line 53. + +*** + +### input + +The string that failed to parse as a built-in skill name. + +#### Signature + +```rust +fn input(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) + +Line 47. + +## Source + +[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) + +Line 41. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/skill-registry/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/skill-registry/index.mdx new file mode 100644 index 0000000000..37319a1db8 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/skills/skill-registry/index.mdx @@ -0,0 +1,48 @@ +--- +slug: "/reference/rust/signalwire/skills/skill-registry" +title: "skill_registry" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::skills::skill_registry" + parent: "signalwire::skills" + module: "skills" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_registry.rs" + visibility: "public" +--- +# `skill_registry` + +## Classes + + + + Public interface to the global skill registry. + + + +## Type Aliases + +### SkillFactory + +Factory function that creates a new skill instance given parameters. + +#### Signature + +```rust +type SkillFactory = ? +``` + +#### Source + +[`src/skills/skill_registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_registry.rs) + +Line 11. + +## Source + +[`src/skills/skill_registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_registry.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/skill-registry/skill-registry/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/skill-registry/skill-registry/index.mdx new file mode 100644 index 0000000000..c86d1b931b --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/skills/skill-registry/skill-registry/index.mdx @@ -0,0 +1,166 @@ +--- +slug: "/reference/rust/signalwire/skills/skill-registry/skill-registry" +title: "SkillRegistry" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::skills::skill_registry::SkillRegistry" + parent: "signalwire::skills::skill_registry" + module: "skills.skill_registry" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_registry.rs" + visibility: "public" +--- +# `SkillRegistry` + +Public interface to the global skill registry. + +## Signature + +```rust +struct SkillRegistry; +``` + +## Methods + +### add\_skill\_directory + +Register an external directory containing third-party skill +factories. + +Mirrors Python's +`signalwire.skills.registry.SkillRegistry.add_skill_directory`. +Rust cannot dynamically load `.rs` files the way Python loads +`.py` modules from a directory; in Rust, third-party skills +must call \[`SkillRegistry::register_skill`] at startup. The +path is recorded for introspection / logging purposes (matching +the Python `_external_paths` field) so the surface contract +matches. + +**Errors:** + +Returns an error string if the directory does not exist or is +not a directory. + +#### Signature + +```rust +fn add_skill_directory(path: &str) -> ?<(), ?> +``` + +#### Parameters + + + +#### Returns + +`?<(), ?>` + +#### Source + +[`src/skills/skill_registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_registry.rs) + +Line 172. + +*** + +### external\_paths + +Read the list of external skill directories registered via +\[`SkillRegistry::add_skill_directory`]. + +#### Signature + +```rust +fn external_paths() -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/skill_registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_registry.rs) + +Line 190. + +*** + +### get\_factory + +Get the factory for a skill by name. + +#### Signature + +```rust +fn get_factory(name: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/skills/skill_registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_registry.rs) + +Line 130. + +*** + +### list\_skills + +List all registered skill names (sorted). + +#### Signature + +```rust +fn list_skills() -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/skill_registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_registry.rs) + +Line 150. + +*** + +### register\_skill + +Register a custom skill factory. + +#### Signature + +```rust +fn register_skill(name: &str, factory: ?) +``` + +#### Parameters + + + + + +#### Source + +[`src/skills/skill_registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_registry.rs) + +Line 124. + +## Source + +[`src/skills/skill_registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_registry.rs) + +Line 120. diff --git a/fern/products/sdk-reference/rust/signalwire/swaig/function-result/function-result/index.mdx b/fern/products/sdk-reference/rust/signalwire/swaig/function-result/function-result/index.mdx new file mode 100644 index 0000000000..0756b2d24b --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/swaig/function-result/function-result/index.mdx @@ -0,0 +1,1899 @@ +--- +slug: "/reference/rust/signalwire/swaig/function-result/function-result" +title: "FunctionResult" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::swaig::function_result::FunctionResult" + parent: "signalwire::swaig::function_result" + module: "swaig.function_result" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs" + visibility: "public" +--- +# `FunctionResult` + +Result returned from a SWAIG function handler. + +Serialises to match the Python reference's `to_dict()`: `response` is omitted when empty, +`action` when empty, and `post_process` unless there are actions; an otherwise-empty result +defaults to `{"response": "Action completed."}`. + +**Decorators:** `@must_use` + +## Signature + +```rust +struct FunctionResult { /* fields */ } +``` + +## Inheritance + +**Implements:** `Debug`, `Clone`, `Default` + +## Methods + +### add\_action + +#### Signature + +```rust +fn add_action(&mut self, action: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 133. + +*** + +### add\_actions + +#### Signature + +```rust +fn add_actions(&mut self, actions: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 138. + +*** + +### add\_dynamic\_hints + +#### Signature + +```rust +fn add_dynamic_hints(&mut self, hints: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 552. + +*** + +### clear\_dynamic\_hints + +Clear all dynamic speech-recognition hints. + +Mirrors the Python reference (`FunctionResult.clear_dynamic_hints`), +which appends `{"clear_dynamic_hints": {}}` — the value is an **empty +object**, not a boolean. (`json!({})` serialises to `{}`.) + +#### Signature + +```rust +fn clear_dynamic_hints(&mut self) -> &mut Self +``` + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 562. + +*** + +### clone + +#### Signature + +```rust +fn clone(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 96. + +*** + +### connect + +#### Signature + +```rust +fn connect(&mut self, destination: &str, _final: bool, from: &str) -> &mut Self +``` + +#### Parameters + + + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 200. + +*** + +### create\_payment\_action + +Create a payment action for use in payment prompts. + +Mirrors the Python reference (`FunctionResult.create_payment_action`): +`{"type": action_type, "phrase": phrase}` (`action_type` is `"Say"` for +text-to-speech or `"Play"` for an audio file). + +#### Signature + +```rust +fn create_payment_action(action_type: &str, phrase: &str) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 1225. + +*** + +### create\_payment\_parameter + +Create a payment parameter (name/value pair) for use with `pay`. + +Mirrors the Python reference (`FunctionResult.create_payment_parameter`): +`{"name": name, "value": value}`. + +#### Signature + +```rust +fn create_payment_parameter(name: &str, value: &str) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 1236. + +*** + +### create\_payment\_prompt + +Create a payment-prompt structure for use with `pay`. + +Mirrors the Python reference (`FunctionResult.create_payment_prompt`): +`{"for": for_situation, "actions": actions, "card_type"?, "error_type"?}`. +`actions` is the list of `{type, phrase}` action objects (a JSON array). +`card_type`/`error_type` are emitted only when non-empty. + +#### Signature + +```rust +fn create_payment_prompt( + for_situation: &str, + actions: ?, + card_type: &str, + error_type: &str +) -> ? +``` + +#### Parameters + + + + + + + + + +#### Returns + +`?` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 1202. + +*** + +### default + +#### Signature + +```rust +fn default() -> Self +``` + +#### Returns + +`Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 1245. + +*** + +### enable\_extensive\_data + +#### Signature + +```rust +fn enable_extensive_data(&mut self, enabled: bool) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 600. + +*** + +### enable\_functions\_on\_timeout + +Python: add\_action("functions\_on\_speaker\_timeout", enabled). + +#### Signature + +```rust +fn enable_functions_on_timeout(&mut self, enabled: bool) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 594. + +*** + +### execute\_rpc + +Execute an RPC method on a call (SWML `execute_rpc`). + +Mirrors the Python reference (`FunctionResult.execute_rpc`): the rpc +params are keyed `{method, call_id?, node_id?, params?}` where +`call_id` and `node_id` are **TOP-LEVEL siblings** of `method`/`params` +(NOT nested inside `params`), and the whole `{"execute_rpc": ...}` verb +is wrapped in a canonical SWML document via `execute_swml` — never a +bare action key. There is **no** `jsonrpc` envelope (the previous port +invented one — removed) and method strings are **bare** (`"dial"`, not +`"calling.dial"`). `call_id`/`node_id` are emitted only when non-empty; +`params` is emitted only when it is a non-empty value (Python's +`if params:` — an empty object/null is dropped). + +#### Signature + +```rust +fn execute_rpc( + &mut self, + method: &str, + params: ?, + call_id: &str, + node_id: &str +) -> &mut Self +``` + +#### Parameters + + + + + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 1110. + +*** + +### execute\_swml + +Execute SWML content, optionally marking the call to exit the agent +afterward (`transfer = true`). + +Mirrors the Python reference (`FunctionResult.execute_swml`): the action +key is **always** `"SWML"`; when `transfer` is set, a `"transfer": "true"` +flag is added **inside** the SWML dict (it is not a separate action key). + +Input normalisation matches Python: + +- A JSON **string** is parsed to a dict so the transfer flag can be added; + if it is not valid JSON it falls back to `{"raw_swml": ""}`. +- A JSON **object** is used as-is (a copy, so the transfer flag does not + mutate the caller's value). +- Any other JSON scalar/array is wrapped as `{"raw_swml": }`, + the same fallback Python uses for a non-dict, non-string `swml_content`. + +#### Signature + +```rust +fn execute_swml(&mut self, swml_content: ?, transfer: bool) -> &mut Self +``` + +#### Parameters + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 627. + +*** + +### fmt + +#### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 96. + +*** + +### hangup + +#### Signature + +```rust +fn hangup(&mut self) -> &mut Self +``` + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 252. + +*** + +### hold + +#### Signature + +```rust +fn hold(&mut self, timeout: i64) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 258. + +*** + +### join\_conference + +Join an ad-hoc audio conference (SWML `join_conference`). + +Mirrors the Python reference +(`FunctionResult.join_conference`) — `name` is required and the +remaining 18 parameters are optional with the reference's defaults. +`wait_url` carries the hold-music URL (Python has no `hold_audio` +parameter; this port previously invented one — it is removed). + +The seven closed-set / range validations from the reference are +reproduced and return `Err(message)` with the reference's exact +`ValueError` text (Rust's idiomatic recoverable-validation channel — +the `Err` type is out-of-band to the cross-language audit, which +unwraps `Result` to `T`): + +- `beep` ∈ `{true, false, onEnter, onExit}` +- `0 < max_participants <= 250` +- `record` ∈ `{do-not-record, record-from-start}` +- `trim` ∈ `{trim-silence, do-not-trim}` +- `status_callback_method` ∈ `{GET, POST}` +- `recording_status_callback_method` ∈ `{GET, POST}` +- `name` (trimmed) must not be empty + +When every parameter is left at its default the `join_conference` value +is the bare conference name string; otherwise it is a `{"name": ...}` +object carrying every non-default parameter under its snake\_case wire +key. Either way the verb is wrapped in the canonical SWML document +(`{"SWML": {version, sections: {main: [{join_conference: ...}]}}}`), +matching the reference (which routes join\_conference through +`execute_swml`) — never a bare verb. + +#### Signature + +```rust +fn join_conference( + &mut self, + name: &str, + muted: bool, + beep: &str, + start_on_enter: bool, + end_on_exit: bool, + wait_url: ?<&str>, + max_participants: i64, + record: &str, + region: ?<&str>, + trim: &str, + coach: ?<&str>, + status_callback_event: ?<&str>, + status_callback: ?<&str>, + status_callback_method: &str, + recording_status_callback: ?<&str>, + recording_status_callback_method: &str, + recording_status_callback_event: &str, + result: ? +) -> ?<&mut Self, ?> +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`?<&mut Self, ?>` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 695. + +*** + +### join\_room + +Join a RELAY room (SWML `join_room`). Wrapped in a SWML document, +matching the Python reference. + +#### Signature + +```rust +fn join_room(&mut self, name: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 852. + +*** + +### new + +#### Signature + +```rust +fn new() -> Self +``` + +#### Returns + +`Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 105. + +*** + +### pay + +Process a payment (SWML `pay`). + +Mirrors the Python reference (`FunctionResult.pay`) exactly, including its +wire-key choices and value rendering: + +- the verb is wrapped in a SWML document whose `main` section is + `[{set: {ai_response}}, {pay: pay_params}]` — never a bare verb; +- the input-method key is **`input`** (not `input_method`); +- the status-callback key is **`status_url`** (the previous port invented + `action_url` — removed); +- `timeout`, `max_attempts`, `min_postal_code_length` are **stringified**; + `security_code` is rendered lower-case (`"true"`/`"false"`); +- `payment_method`, `token_type`, `currency`, `language`, `voice`, + `valid_card_types`, and `postal_code` are always emitted; `status_url`, + `charge_amount`, `description`, `parameters`, and `prompts` are emitted + only when supplied. + +`postal_code` is taken as the already-rendered wire string (pass +`"true"`/`"false"` for the boolean cases, or the literal postcode), +mirroring the reference's `Union[bool, str]`. `parameters`/`prompts` are +JSON arrays (`Value::Null` to omit). An empty `ai_response` uses the +reference's default status message. + +#### Signature + +```rust +fn pay( + &mut self, + payment_connector_url: &str, + input_method: &str, + status_url: &str, + payment_method: &str, + timeout: i64, + max_attempts: i64, + security_code: bool, + postal_code: &str, + min_postal_code_length: i64, + token_type: &str, + charge_amount: &str, + currency: &str, + language: &str, + voice: &str, + description: &str, + valid_card_types: &str, + parameters: ?, + prompts: ?, + ai_response: &str +) -> &mut Self +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 1011. + +*** + +### play\_background\_file + +Play an audio/video file in the background. + +Mirrors the Python reference (`FunctionResult.play_background_file`): the +action key is `"playback_bg"`. With `wait = true` the value is +`{"file": filename, "wait": true}` (suppress attention-getting behaviour); +otherwise it is the bare filename string. + +#### Signature + +```rust +fn play_background_file(&mut self, filename: &str, wait: bool) -> &mut Self +``` + +#### Parameters + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 439. + +*** + +### record\_call + +Start background call recording (SWML `record_call`). + +Mirrors the Python reference (`FunctionResult.record_call`): the verb is +wrapped in a SWML document (`{"SWML": {version, sections: {main: [{record_call: params}]}}}`) — never a bare verb — and the reference's +two closed-set validations are reproduced, returning `Err(message)` with +the exact reference `ValueError` text: + +- `format` ∈ `{wav, mp3, mp4}` +- `direction` ∈ `{speak, listen, both}` + +`stereo`, `format`, `direction`, `beep`, and `input_sensitivity` are +**always** emitted (matching the reference, which seeds `record_params` +with all five); `control_id`, `terminators`, `initial_timeout`, +`end_silence_timeout`, `max_length`, and `status_url` are emitted only +when supplied. There is no `initiator` field — the previous port invented +it; it is removed. + +#### Signature + +```rust +fn record_call>: ?>, impl Into>: ?>>( + &mut self, + control_id: &str, + stereo: bool, + format: impl ?>, + direction: impl ?>, + terminators: &str, + beep: bool, + input_sensitivity: f64, + initial_timeout: ?, + end_silence_timeout: ?, + max_length: ?, + status_url: &str +) -> ?<&mut Self, ?> +``` + +#### Type Parameters + + + + + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`?<&mut Self, ?>` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 473. + +*** + +### remove\_global\_data + +Python: add\_action("unset\_global\_data", keys) — the value is the bare key +(Python's `Union[str, List[str]]`, passed through verbatim): a single key +emits the **bare string** (`"plan"`), a list emits the **array** +(`["plan", "chips"]`); no `{"keys": ...}` wrapper. Accepts both call +styles via `impl Into` (`"plan"` or `vec!["plan", "chips"]`). + +#### Signature + +```rust +fn remove_global_data: ?>( + &mut self, + keys: impl ? +) -> &mut Self +``` + +#### Type Parameters + + + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 307. + +*** + +### remove\_metadata + +Python: add\_action("unset\_meta\_data", keys) — the value is the bare key +(Python's `Union[str, List[str]]`, passed through verbatim): a single key +emits the **bare string** (`"token"`), a list emits the **array** +(`["token", "count"]`); no `{"keys": ...}` wrapper. Accepts both call +styles via `impl Into`. + +#### Signature + +```rust +fn remove_metadata: ?>( + &mut self, + keys: impl ? +) -> &mut Self +``` + +#### Type Parameters + + + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 323. + +*** + +### replace\_in\_history + +After first send, replace the tool\_call+result pair in conversation +history. + +Mirrors the Python reference (`FunctionResult.replace_in_history`, whose +`text` parameter is `Union[str, bool] = True`): the action key is +`"replace_in_history"`. `Some(t)` replaces the tool call with an assistant +message containing `t`; `None` uses the default `true`, which removes the +tool\_call+result pair from history entirely. + +#### Signature + +```rust +fn replace_in_history(&mut self, text: ?<&str>) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 418. + +*** + +### rpc\_ai\_message + +Inject a message into an AI agent on another call (via `execute_rpc`). + +Mirrors the Python reference (`FunctionResult.rpc_ai_message`): method +`"ai_message"`, `call_id` carried as the TOP-LEVEL execute\_rpc sibling, +params `{role, message_text}`. `role` defaults to `"system"` and is +caller-overridable (the previous port omitted `role` and mis-nested +`call_id` — fixed). + +#### Signature + +```rust +fn rpc_ai_message( + &mut self, + call_id: &str, + message_text: &str, + role: &str +) -> &mut Self +``` + +#### Parameters + + + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 1167. + +*** + +### rpc\_ai\_unhold + +Unhold another call (via `execute_rpc`). + +Mirrors the Python reference (`FunctionResult.rpc_ai_unhold`): method +`"ai_unhold"`, `call_id` as the TOP-LEVEL execute\_rpc sibling, params +`{}` (which `execute_rpc` drops, since it is empty). + +#### Signature + +```rust +fn rpc_ai_unhold(&mut self, call_id: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 1180. + +*** + +### rpc\_dial + +Dial out to a number with a destination SWML URL (via `execute_rpc`). + +Mirrors the Python reference (`FunctionResult.rpc_dial`): method `"dial"`, +params `{devices: {type: device_type, params: {to_number, from_number}}, +dest_swml}`. `device_type` defaults to `"phone"` and is caller-overridable +(the previous port hard-coded the device and invented +`call_timeout`/`region` — removed). + +#### Signature + +```rust +fn rpc_dial( + &mut self, + to_number: &str, + from_number: &str, + dest_swml: &str, + device_type: &str +) -> &mut Self +``` + +#### Parameters + + + + + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 1140. + +*** + +### say + +#### Signature + +```rust +fn say(&mut self, text: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 428. + +*** + +### send\_sms + +Send a text message to a PSTN number (SWML `send_sms`). + +Mirrors the Python reference (`FunctionResult.send_sms`): the verb is +wrapped in a SWML document — never a bare verb. The reference's +validation is reproduced, returning `Err` with the exact reference +`ValueError` text when neither `body` nor `media` is provided. `body` is +emitted only when non-empty; `media`, `tags`, and `region` are emitted +only when supplied. + +#### Signature + +```rust +fn send_sms( + &mut self, + to: &str, + from: &str, + body: &str, + media: ?<&str>, + tags: ?<&str>, + region: &str +) -> ?<&mut Self, ?> +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`?<&mut Self, ?>` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 955. + +*** + +### set\_end\_of\_speech\_timeout + +#### Signature + +```rust +fn set_end_of_speech_timeout(&mut self, ms: i64) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 567. + +*** + +### set\_metadata + +#### Signature + +```rust +fn set_metadata(&mut self, data: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 313. + +*** + +### set\_post\_process + +#### Signature + +```rust +fn set_post_process(&mut self, val: bool) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 128. + +*** + +### set\_response + +#### Signature + +```rust +fn set_response(&mut self, text: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 123. + +*** + +### set\_speech\_event\_timeout + +#### Signature + +```rust +fn set_speech_event_timeout(&mut self, ms: i64) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 572. + +*** + +### simulate\_user\_input + +Queue simulated user input. + +Mirrors the Python reference (`FunctionResult.simulate_user_input`): +the action key is **`user_input`** (the previous port emitted +`simulate_user_input`, which is the _method_ name, not the wire key). + +#### Signature + +```rust +fn simulate_user_input(&mut self, text: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 1189. + +*** + +### sip\_refer + +Send a SIP REFER (SWML `sip_refer`). Wrapped in a SWML document, matching +the Python reference. + +#### Signature + +```rust +fn sip_refer(&mut self, to_uri: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 859. + +*** + +### stop + +#### Signature + +```rust +fn stop(&mut self) -> &mut Self +``` + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 290. + +*** + +### stop\_background\_file + +Python: add\_action("stop\_playback\_bg", True). + +#### Signature + +```rust +fn stop_background_file(&mut self) -> &mut Self +``` + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 450. + +*** + +### stop\_record\_call + +Stop an active background recording (SWML `stop_record_call`). + +Mirrors the Python reference: the verb is wrapped in a SWML document. The +params are `{"control_id": ...}` when supplied, else `{}` (most-recent). + +#### Signature + +```rust +fn stop_record_call(&mut self, control_id: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 540. + +*** + +### stop\_tap + +Stop an active tap stream (SWML `stop_tap`). Wrapped in a SWML document, +matching the Python reference. + +#### Signature + +```rust +fn stop_tap(&mut self, control_id: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 937. + +*** + +### switch\_context + +Change the agent context/prompt during the conversation. + +Mirrors the Python reference (`FunctionResult.switch_context`): when only +`system_prompt` is supplied (no `user_prompt`/`consolidate`/`full_reset`, +and — for this port's documented `isolated` extension — no `isolated`), +the action value is the **bare system-prompt string** +(`{"context_switch": ""}`). Otherwise it is the object form +carrying every set field. + +#### Signature + +```rust +fn switch_context( + &mut self, + system_prompt: &str, + user_prompt: &str, + consolidate: bool, + full_reset: bool, + isolated: bool +) -> &mut Self +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 369. + +*** + +### swml\_change\_context + +Python: add\_action("change\_context", context\_name) — the value is the +bare context name string (not a `context_switch` dict). + +#### Signature + +```rust +fn swml_change_context(&mut self, context_name: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 356. + +*** + +### swml\_change\_step + +Python: add\_action("change\_step", step\_name) — the value is the bare step +name string (not a `context_switch` dict). + +#### Signature + +```rust +fn swml_change_step(&mut self, step_name: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 349. + +*** + +### swml\_transfer + +Add a SWML transfer action with an AI response set up for when the +transfer completes and control returns to the agent. + +Mirrors the Python reference (`FunctionResult.swml_transfer`): emits a +SWML document whose `main` section is `[{set: {ai_response}}, {transfer: +{dest}}]`, with a top-level `"transfer": str(final).lower()` flag marking +whether the transfer is permanent (`final = true`, the default) or +temporary. `ai_response` is carried inside the SWML `set` verb (it is NOT +assigned to `self.response`). + +#### Signature + +```rust +fn swml_transfer( + &mut self, + dest: &str, + ai_response: &str, + _final: bool +) -> &mut Self +``` + +#### Parameters + + + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 233. + +*** + +### swml\_user\_event + +Send a user event through SWML to update the client UI. + +Mirrors the Python reference (`FunctionResult.swml_user_event`): emits a +`"SWML"` action whose `main` section nests the event payload under +`{"user_event": {"event": event_data}}`. + +#### Signature + +```rust +fn swml_user_event(&mut self, event_data: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 334. + +*** + +### tap + +Start a background call tap (SWML `tap`). + +Mirrors the Python reference (`FunctionResult.tap`): the verb is wrapped +in a SWML document — never a bare verb — and the reference's three +validations are reproduced, returning `Err(message)` with the exact +reference `ValueError` text: + +- `direction` ∈ `{speak, hear, both}` +- `codec` ∈ `{PCMU, PCMA}` +- `rtp_ptime > 0` + +Only `uri` is always emitted; `control_id`, `direction`, `codec`, +`rtp_ptime`, and `status_url` are emitted only when they differ from the +reference defaults (`direction="both"`, `codec="PCMU"`, `rtp_ptime=20`). + +#### Signature + +```rust +fn tap>: ?>, impl Into>: ?>>( + &mut self, + uri: &str, + control_id: &str, + direction: impl ?>, + codec: impl ?>, + rtp_ptime: i64, + status_url: &str +) -> ?<&mut Self, ?> +``` + +#### Type Parameters + + + + + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`?<&mut Self, ?>` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 878. + +*** + +### to\_json + +Compact JSON string. + +#### Signature + +```rust +fn to_json(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 178. + +*** + +### to\_value + +Serialise to a JSON value. + +- `response` is always included. +- `action` is only included if at least one action exists. +- `post_process` is only included if `true`. + +#### Signature + +```rust +fn to_value(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 150. + +*** + +### toggle\_functions + +Enable/disable specific SWAIG functions. + +Mirrors the Python reference (`FunctionResult.toggle_functions`), which +takes a `List[Dict[str, Any]]` (each dict carries `function` + `active`, +plus any further keys) and passes it through verbatim via +`add_action("toggle_functions", function_toggles)`. The action value is +therefore the **ordered list as-is** — order is preserved and arbitrary +keys/values survive. A `HashMap` cannot express this (it +drops ordering and forbids extra keys / non-bool values), so the +parameter is the bare `Vec` list, exactly like `add_dynamic_hints`. + +#### Signature + +```rust +fn toggle_functions(&mut self, function_toggles: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 587. + +*** + +### update\_global\_data + +#### Signature + +```rust +fn update_global_data(&mut self, data: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 297. + +*** + +### update\_settings + +Python: add\_action("settings", settings). + +#### Signature + +```rust +fn update_settings(&mut self, settings: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 606. + +*** + +### wait\_for\_user + +Control how the agent waits for user input. + +Mirrors the Python reference (`FunctionResult.wait_for_user`): the action +value is a **scalar**, chosen by the same precedence — +`answer_first` (the string `"answer_first"`) > `timeout` (bare int) > +`enabled` (bare bool) > the default bare bool `true`. + +#### Signature + +```rust +fn wait_for_user( + &mut self, + enabled: ?, + timeout: ?, + answer_first: ? +) -> &mut Self +``` + +#### Parameters + + + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 271. + +*** + +### with\_response + +#### Signature + +```rust +fn with_response(response: &str) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 113. + +## Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 98. diff --git a/fern/products/sdk-reference/rust/signalwire/swaig/function-result/index.mdx b/fern/products/sdk-reference/rust/signalwire/swaig/function-result/index.mdx new file mode 100644 index 0000000000..5bb0b32316 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/swaig/function-result/index.mdx @@ -0,0 +1,330 @@ +--- +slug: "/reference/rust/signalwire/swaig/function-result" +title: "function_result" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::swaig::function_result" + parent: "signalwire::swaig" + module: "swaig" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs" + visibility: "public" +--- +# `function_result` + +## Classes + + + + Result returned from a SWAIG function handler. + + + +## Enums + +### KeysArg + +A `Union[str, List[str]]` key argument for \[`FunctionResult::remove_global_data`] +and \[`FunctionResult::remove_metadata`]. + +The Python reference accepts **either** a single key string **or** a list of +keys and passes the value through _verbatim_ — so a `str` emits a **bare +string** (`{"unset_global_data": "plan"}`) and a `list` emits a **list** +(`{"unset_global_data": ["plan", "chips"]}`). A bare `Vec<&str>` parameter +cannot express the single-key bare-string form (it always wraps in a list), +which is a real emission divergence. This enum restores parity: both call +styles compile (`impl Into`), and `into_value` +yields the exact Python wire shape per arm. + +``` +use signalwire::swaig::FunctionResult; +let mut fr = FunctionResult::new(); +fr.remove_global_data("plan"); // -> {"unset_global_data": "plan"} +let mut fr2 = FunctionResult::new(); +fr2.remove_global_data(vec!["plan", "chips"]); // -> {"unset_global_data": ["plan","chips"]} +``` + +[`FunctionResult::remove_global_data`]: crate::swaig::FunctionResult::remove_global_data + +[`FunctionResult::remove_metadata`]: crate::swaig::FunctionResult::remove_metadata + +#### Signature + +```rust +enum KeysArg +``` + +#### Inheritance + +**Implements:** `Debug`, `Clone`, `PartialEq`, `Eq`, `From` + +#### Variants + + + A list of keys — emits the key array (Python's `List[str]` arm). + + + + A single key — emits the bare key string (Python's `str` arm). + + +#### Methods + +##### clone + +###### Signature + +```rust +fn clone(&self) -> ? +``` + +###### Returns + +`?` + +###### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 35. + +*** + +##### eq + +###### Signature + +```rust +fn eq(&self, other: &?) -> bool +``` + +###### Parameters + + + +###### Returns + +`bool` + +###### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 35. + +*** + +##### fmt + +###### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 35. + +*** + +##### from + +###### Signature + +```rust +fn from(s: &str) -> Self +``` + +###### Parameters + + + +###### Returns + +`Self` + +###### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 56. + +*** + +##### from + +###### Signature + +```rust +fn from(s: ?) -> Self +``` + +###### Parameters + + + +###### Returns + +`Self` + +###### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 62. + +*** + +##### from + +###### Signature + +```rust +fn from(s: &?) -> Self +``` + +###### Parameters + + + +###### Returns + +`Self` + +###### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 68. + +*** + +##### from + +###### Signature + +```rust +fn from(v: ?<&str>) -> Self +``` + +###### Parameters + + + +###### Returns + +`Self` + +###### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 74. + +*** + +##### from + +###### Signature + +```rust +fn from(v: ?) -> Self +``` + +###### Parameters + + + +###### Returns + +`Self` + +###### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 80. + +*** + +##### from + +###### Signature + +```rust +fn from(v: &[&str]) -> Self +``` + +###### Parameters + + + +###### Returns + +`Self` + +###### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 86. + +*** + +##### into\_value + +The JSON wire value for this argument: a bare string for `One`, +an array for `Many` — byte-identical to Python's +pass-through of its `Union[str, List[str]]` value. + +###### Signature + +```rust +fn into_value(self) -> ? +``` + +###### Returns + +`?` + +###### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 47. + +#### Examples + +```rust +use signalwire::swaig::FunctionResult; +let mut fr = FunctionResult::new(); +fr.remove_global_data("plan"); // -> {"unset_global_data": "plan"} +let mut fr2 = FunctionResult::new(); +fr2.remove_global_data(vec!["plan", "chips"]); // -> {"unset_global_data": ["plan","chips"]} +``` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 36. + +## Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/swaig/index.mdx b/fern/products/sdk-reference/rust/signalwire/swaig/index.mdx new file mode 100644 index 0000000000..2a91ed654b --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/swaig/index.mdx @@ -0,0 +1,35 @@ +--- +slug: "/reference/rust/signalwire/swaig" +title: "swaig" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::swaig" + parent: "signalwire" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/mod.rs" + visibility: "public" +--- +# `swaig` + +## Modules + + + + + + Typed, compile-time-checked closed sets for SWML media-action parameters. + + + + Typed builder for SWAIG tool-parameter JSON schemas. + + + +## Source + +[`src/swaig/mod.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/mod.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/swaig/media-enums/index.mdx b/fern/products/sdk-reference/rust/signalwire/swaig/media-enums/index.mdx new file mode 100644 index 0000000000..e348bb0b09 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/swaig/media-enums/index.mdx @@ -0,0 +1,1939 @@ +--- +slug: "/reference/rust/signalwire/swaig/media-enums" +title: "media_enums" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::swaig::media_enums" + parent: "signalwire::swaig" + module: "swaig" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs" + visibility: "public" +--- +# `media_enums` + +Typed, compile-time-checked closed sets for SWML media-action parameters. + +Several `FunctionResult` media helpers take +parameters that the Python reference _validates_ against a fixed set and +rejects with `ValueError` otherwise: + +\| Helper | Parameter | Allowed values (Python reference) | +\|-------------------|-------------|------------------------------------------| +\| `record_call` | `format` | `"wav"`, `"mp3"`, `"mp4"` | +\| `record_call` | `direction` | `"speak"`, `"listen"`, `"both"` | +\| `tap` | `direction` | `"speak"`, `"hear"`, `"both"` | +\| `tap` | `codec` | `"PCMU"`, `"PCMA"` | + +In Python a typo (`record_call(format="ogg")`) only fails at runtime with a +`ValueError`. These enums give the same closed sets a typed alternative so +the typo fails at the **call site** with editor autocompletion and +exhaustive matching. + +The consuming methods take `format: impl Into>` (and +likewise for `direction`/`codec`), so the **same parameter** accepts both +the typed enum _and_ a raw wire string (\[`MediaArg`] wraps the two). The raw +`&str` path stays available for Python parity / forward-compat; an out-of-set +raw value is still rejected in the method body with the reference's exact +`ValueError` text, and the emitted SWML is byte-identical either way: + +```no_run +use signalwire::swaig::FunctionResult; +use signalwire::swaig::{RecordFormat, RecordDirection}; + +let mut fr = FunctionResult::new(); +// typed + autocompleted — identical wire shape to the bare strings below +fr.record_call("rec1", false, RecordFormat::Mp3, RecordDirection::Both, + "", false, 44.0, None, None, None, "").unwrap(); +// bare strings still work (Python parity) +fr.record_call("rec2", false, "mp3", "both", "", false, 44.0, None, None, None, "").unwrap(); +``` + +Note that `record_call`'s direction set (`speak`/`listen`/`both`) and +`tap`'s direction set (`speak`/`hear`/`both`) are **different** — `tap` uses +`hear` where `record_call` uses `listen` — so they are modelled as two +distinct enums, \[`RecordDirection`] and \[`TapDirection`], faithfully +mirroring the reference's two separate validation lists. + +## Examples + +```rust +use signalwire::swaig::FunctionResult; +use signalwire::swaig::{RecordFormat, RecordDirection}; + +let mut fr = FunctionResult::new(); +// typed + autocompleted — identical wire shape to the bare strings below +fr.record_call("rec1", false, RecordFormat::Mp3, RecordDirection::Both, + "", false, 44.0, None, None, None, "").unwrap(); +// bare strings still work (Python parity) +fr.record_call("rec2", false, "mp3", "both", "", false, 44.0, None, None, None, "").unwrap(); +``` + +## Classes + + + + Error returned when a string is parsed into one of the closed-set media enums (via \[`FromStr`]) but is not a recognised wire value. + + + +## Enums + +### Codec + +Media codec for \[`FunctionResult::tap`]. + +Mirrors the Python reference's `valid_codecs = ["PCMU", "PCMA"]` +validation. The wire strings are upper-case (`"PCMU"` / `"PCMA"`). + +[`FunctionResult::tap`]: crate::swaig::FunctionResult::tap + +#### Signature + +```rust +enum Codec +``` + +#### Inheritance + +**Implements:** `Debug`, `Clone`, `Copy`, `PartialEq`, `Eq`, `Hash`, `PartialOrd`, `Ord`, `Display`, `AsRef`, `FromStr`, `From` + +#### Variants + + + `PCMA` (G.711 A-law). + + + + `PCMU` (G.711 µ-law, the reference default). + + +#### Methods + +##### all + +Every \[`Codec`], in declaration order. + +###### Signature + +```rust +fn all() -> &'static [?] +``` + +###### Returns + +`&'static [?]` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 364. + +*** + +##### as\_ref + +###### Signature + +```rust +fn as_ref(&self) -> &str +``` + +###### Returns + +`&str` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 383. + +*** + +##### as\_str + +The canonical (upper-case) wire string for this codec (e.g. `"PCMU"`). + +###### Signature + +```rust +fn as_str(&self) -> &'static str +``` + +###### Returns + +`&'static str` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 356. + +*** + +##### clone + +###### Signature + +```rust +fn clone(&self) -> ? +``` + +###### Returns + +`?` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 345. + +*** + +##### cmp + +###### Signature + +```rust +fn cmp(&self, other: &?) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 345. + +*** + +##### eq + +###### Signature + +```rust +fn eq(&self, other: &?) -> bool +``` + +###### Parameters + + + +###### Returns + +`bool` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 345. + +*** + +##### fmt + +###### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 345. + +*** + +##### fmt + +###### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 377. + +*** + +##### from + +###### Signature + +```rust +fn from(v: ?) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 403. + +*** + +##### from + +###### Signature + +```rust +fn from(v: ?) -> &'static str +``` + +###### Parameters + + + +###### Returns + +`&'static str` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 409. + +*** + +##### from + +###### Signature + +```rust +fn from(e: ?) -> Self +``` + +###### Parameters + + + +###### Returns + +`Self` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 510. + +*** + +##### from\_str + +Parse a wire string into a \[`Codec`], or `None` if it is not a +recognised codec. Matching is exact (case-sensitive), mirroring the +reference's literal `in ["PCMU", "PCMA"]` check. + +###### Signature + +```rust +fn from_str(s: &str) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 371. + +*** + +##### from\_str + +###### Signature + +```rust +fn from_str(s: &str) -> ?::Err> +``` + +###### Parameters + + + +###### Returns + +`?::Err>` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 393. + +*** + +##### hash + +###### Signature + +```rust +fn hash<__H: ?>(&self, state: &mut __H) +``` + +###### Type Parameters + + + +###### Parameters + + + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 345. + +*** + +##### partial\_cmp + +###### Signature + +```rust +fn partial_cmp(&self, other: &?) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 345. + +#### Type Aliases + +##### Err + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 391. + +#### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 347. + +*** + +### MediaArg + +The accepted value of a closed-set media-action parameter — _either_ the +typed enum (`RecordFormat::Mp3`) _or_ a raw wire string (`"mp3"`). + +This is the parameter type behind [`FunctionResult::record_call`]'s +`format`/`direction` and [`FunctionResult::tap`]'s `direction`/`codec` +(each method takes `impl Into>`). It exists so a single +parameter can be driven _both_ ways with no overloads: + +```no_run +use signalwire::swaig::FunctionResult; +use signalwire::swaig::RecordFormat; + +let mut fr = FunctionResult::new(); +// typed + autocompleted — fails at the call site on a typo +fr.record_call("r", false, RecordFormat::Mp3, "both", "", false, 44.0, None, None, None, "").unwrap(); +// raw &str still compiles (Python parity / forward-compat) and emits the +// byte-identical SWML +fr.record_call("r", false, "mp3", "both", "", false, 44.0, None, None, None, "").unwrap(); +``` + +**Validation is unchanged and still matches the Python reference.** The raw +arm carries the string _verbatim_ into the method body, where the same +closed-set check runs and rejects an out-of-set value with the reference's +exact `ValueError` text — e.g. `record_call(.., "ogg", ..)` still returns +`Err("format must be 'wav', 'mp3', or 'mp4'")`. The typed arm is always +valid by construction. Either way `wire` yields the exact +wire string, so the emitted SWML is byte-identical between the two call +styles. + +[`FunctionResult::record_call`]: crate::swaig::FunctionResult::record_call + +[`FunctionResult::tap`]: crate::swaig::FunctionResult::tap + +#### Signature + +```rust +enum MediaArg +``` + +#### Inheritance + +**Implements:** `Debug`, `Clone`, `PartialEq`, `Eq`, `From` + +#### Variants + + + A raw wire string, carried verbatim. Validated in the method body exactly as the Python reference validates its `str` argument. + + + + The typed, closed-set enum value (always a valid wire string). + + +#### Methods + +##### clone + +###### Signature + +```rust +fn clone(&self) -> ? +``` + +###### Returns + +`?` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 447. + +*** + +##### eq + +###### Signature + +```rust +fn eq(&self, other: &?) -> bool +``` + +###### Parameters + + + +###### Returns + +`bool` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 447. + +*** + +##### fmt + +###### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 447. + +*** + +##### from + +###### Signature + +```rust +fn from(s: &str) -> Self +``` + +###### Parameters + + + +###### Returns + +`Self` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 474. + +*** + +##### from + +###### Signature + +```rust +fn from(s: ?) -> Self +``` + +###### Parameters + + + +###### Returns + +`Self` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 480. + +*** + +##### from + +###### Signature + +```rust +fn from(s: &?) -> Self +``` + +###### Parameters + + + +###### Returns + +`Self` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 486. + +*** + +##### wire + +The wire string this argument resolves to. For `Typed` +it is the enum's canonical `as_str()`; for `Raw` it is +the string verbatim. The method body validates this value against the +closed set before emitting it (Python-reference parity). + +###### Signature + +```rust +fn wire(&self) -> &str +``` + +###### Returns + +`&str` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 461. + +#### Examples + +```rust +use signalwire::swaig::FunctionResult; +use signalwire::swaig::RecordFormat; + +let mut fr = FunctionResult::new(); +// typed + autocompleted — fails at the call site on a typo +fr.record_call("r", false, RecordFormat::Mp3, "both", "", false, 44.0, None, None, None, "").unwrap(); +// raw &str still compiles (Python parity / forward-compat) and emits the +// byte-identical SWML +fr.record_call("r", false, "mp3", "both", "", false, 44.0, None, None, None, "").unwrap(); +``` + +#### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 448. + +*** + +### RecordDirection + +Audio direction for \[`FunctionResult::record_call`]. + +Mirrors the Python reference's +`direction in ["speak", "listen", "both"]` validation. Note this differs +from \[`TapDirection`], which uses `hear` instead of `listen`. + +[`FunctionResult::record_call`]: crate::swaig::FunctionResult::record_call + +#### Signature + +```rust +enum RecordDirection +``` + +#### Inheritance + +**Implements:** `Debug`, `Clone`, `Copy`, `PartialEq`, `Eq`, `Hash`, `PartialOrd`, `Ord`, `Display`, `AsRef`, `FromStr`, `From` + +#### Variants + + + `both` — what the party hears and says (the reference default). + + + + `listen` — what the party hears. + + + + `speak` — what the party says. + + +#### Methods + +##### all + +Every \[`RecordDirection`], in declaration order. + +###### Signature + +```rust +fn all() -> &'static [?] +``` + +###### Returns + +`&'static [?]` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 204. + +*** + +##### as\_ref + +###### Signature + +```rust +fn as_ref(&self) -> &str +``` + +###### Returns + +`&str` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 226. + +*** + +##### as\_str + +The canonical wire string for this direction (e.g. `"both"`). + +###### Signature + +```rust +fn as_str(&self) -> &'static str +``` + +###### Returns + +`&'static str` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 195. + +*** + +##### clone + +###### Signature + +```rust +fn clone(&self) -> ? +``` + +###### Returns + +`?` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 182. + +*** + +##### cmp + +###### Signature + +```rust +fn cmp(&self, other: &?) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 182. + +*** + +##### eq + +###### Signature + +```rust +fn eq(&self, other: &?) -> bool +``` + +###### Parameters + + + +###### Returns + +`bool` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 182. + +*** + +##### fmt + +###### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 182. + +*** + +##### fmt + +###### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 220. + +*** + +##### from + +###### Signature + +```rust +fn from(v: ?) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 248. + +*** + +##### from + +###### Signature + +```rust +fn from(v: ?) -> &'static str +``` + +###### Parameters + + + +###### Returns + +`&'static str` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 254. + +*** + +##### from + +###### Signature + +```rust +fn from(e: ?) -> Self +``` + +###### Parameters + + + +###### Returns + +`Self` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 498. + +*** + +##### from\_str + +Parse a wire string into a \[`RecordDirection`], or `None` if it is not a +recognised direction. + +###### Signature + +```rust +fn from_str(s: &str) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 214. + +*** + +##### from\_str + +###### Signature + +```rust +fn from_str(s: &str) -> ?::Err> +``` + +###### Parameters + + + +###### Returns + +`?::Err>` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 236. + +*** + +##### hash + +###### Signature + +```rust +fn hash<__H: ?>(&self, state: &mut __H) +``` + +###### Type Parameters + + + +###### Parameters + + + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 182. + +*** + +##### partial\_cmp + +###### Signature + +```rust +fn partial_cmp(&self, other: &?) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 182. + +#### Type Aliases + +##### Err + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 234. + +#### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 184. + +*** + +### RecordFormat + +Recording container format for \[`FunctionResult::record_call`]. + +Mirrors the Python reference's `format in ["wav", "mp3", "mp4"]` validation. + +[`FunctionResult::record_call`]: crate::swaig::FunctionResult::record_call + +#### Signature + +```rust +enum RecordFormat +``` + +#### Inheritance + +**Implements:** `Debug`, `Clone`, `Copy`, `PartialEq`, `Eq`, `Hash`, `PartialOrd`, `Ord`, `Display`, `AsRef`, `FromStr`, `From` + +#### Variants + + + `mp3` + + + + `mp4` + + + + `wav` (the reference default). + + +#### Methods + +##### all + +Every \[`RecordFormat`], in declaration order. + +###### Signature + +```rust +fn all() -> &'static [?] +``` + +###### Returns + +`&'static [?]` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 125. + +*** + +##### as\_ref + +###### Signature + +```rust +fn as_ref(&self) -> &str +``` + +###### Returns + +`&str` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 143. + +*** + +##### as\_str + +The canonical wire string for this format (e.g. `"wav"`). + +This is exactly the string the raw-`str` call style carries, so +`record_call(.., RecordFormat::Mp3, ..)` emits the same SWML as +`record_call(.., "mp3", ..)` — both resolve here via \[`MediaArg`]. + +###### Signature + +```rust +fn as_str(&self) -> &'static str +``` + +###### Returns + +`&'static str` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 116. + +*** + +##### clone + +###### Signature + +```rust +fn clone(&self) -> ? +``` + +###### Returns + +`?` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 99. + +*** + +##### cmp + +###### Signature + +```rust +fn cmp(&self, other: &?) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 99. + +*** + +##### eq + +###### Signature + +```rust +fn eq(&self, other: &?) -> bool +``` + +###### Parameters + + + +###### Returns + +`bool` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 99. + +*** + +##### fmt + +###### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 99. + +*** + +##### fmt + +###### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 137. + +*** + +##### from + +###### Signature + +```rust +fn from(v: ?) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 164. + +*** + +##### from + +###### Signature + +```rust +fn from(v: ?) -> &'static str +``` + +###### Parameters + + + +###### Returns + +`&'static str` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 170. + +*** + +##### from + +###### Signature + +```rust +fn from(e: ?) -> Self +``` + +###### Parameters + + + +###### Returns + +`Self` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 492. + +*** + +##### from\_str + +Parse a wire string into a \[`RecordFormat`], or `None` if it is not a +recognised format (the same strings the reference would reject). + +###### Signature + +```rust +fn from_str(s: &str) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 131. + +*** + +##### from\_str + +###### Signature + +```rust +fn from_str(s: &str) -> ?::Err> +``` + +###### Parameters + + + +###### Returns + +`?::Err>` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 154. + +*** + +##### hash + +###### Signature + +```rust +fn hash<__H: ?>(&self, state: &mut __H) +``` + +###### Type Parameters + + + +###### Parameters + + + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 99. + +*** + +##### partial\_cmp + +###### Signature + +```rust +fn partial_cmp(&self, other: &?) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 99. + +#### Type Aliases + +##### Err + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 152. + +#### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 101. + +*** + +### TapDirection + +Audio direction for \[`FunctionResult::tap`]. + +Mirrors the Python reference's +`valid_directions = ["speak", "hear", "both"]` validation. Note this differs +from \[`RecordDirection`], which uses `listen` instead of `hear`. + +[`FunctionResult::tap`]: crate::swaig::FunctionResult::tap + +#### Signature + +```rust +enum TapDirection +``` + +#### Inheritance + +**Implements:** `Debug`, `Clone`, `Copy`, `PartialEq`, `Eq`, `Hash`, `PartialOrd`, `Ord`, `Display`, `AsRef`, `FromStr`, `From` + +#### Variants + + + `both` — what the party hears and says (the reference default). + + + + `hear` — what the party hears. + + + + `speak` — what the party says. + + +#### Methods + +##### all + +Every \[`TapDirection`], in declaration order. + +###### Signature + +```rust +fn all() -> &'static [?] +``` + +###### Returns + +`&'static [?]` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 288. + +*** + +##### as\_ref + +###### Signature + +```rust +fn as_ref(&self) -> &str +``` + +###### Returns + +`&str` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 306. + +*** + +##### as\_str + +The canonical wire string for this direction (e.g. `"both"`). + +###### Signature + +```rust +fn as_str(&self) -> &'static str +``` + +###### Returns + +`&'static str` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 279. + +*** + +##### clone + +###### Signature + +```rust +fn clone(&self) -> ? +``` + +###### Returns + +`?` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 266. + +*** + +##### cmp + +###### Signature + +```rust +fn cmp(&self, other: &?) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 266. + +*** + +##### eq + +###### Signature + +```rust +fn eq(&self, other: &?) -> bool +``` + +###### Parameters + + + +###### Returns + +`bool` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 266. + +*** + +##### fmt + +###### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 266. + +*** + +##### fmt + +###### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 300. + +*** + +##### from + +###### Signature + +```rust +fn from(v: ?) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 328. + +*** + +##### from + +###### Signature + +```rust +fn from(v: ?) -> &'static str +``` + +###### Parameters + + + +###### Returns + +`&'static str` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 334. + +*** + +##### from + +###### Signature + +```rust +fn from(e: ?) -> Self +``` + +###### Parameters + + + +###### Returns + +`Self` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 504. + +*** + +##### from\_str + +Parse a wire string into a \[`TapDirection`], or `None` if it is not a +recognised direction. + +###### Signature + +```rust +fn from_str(s: &str) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 294. + +*** + +##### from\_str + +###### Signature + +```rust +fn from_str(s: &str) -> ?::Err> +``` + +###### Parameters + + + +###### Returns + +`?::Err>` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 316. + +*** + +##### hash + +###### Signature + +```rust +fn hash<__H: ?>(&self, state: &mut __H) +``` + +###### Type Parameters + + + +###### Parameters + + + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 266. + +*** + +##### partial\_cmp + +###### Signature + +```rust +fn partial_cmp(&self, other: &?) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 266. + +#### Type Aliases + +##### Err + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 314. + +#### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 268. + +## Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/swaig/media-enums/parse-media-enum-error/index.mdx b/fern/products/sdk-reference/rust/signalwire/swaig/media-enums/parse-media-enum-error/index.mdx new file mode 100644 index 0000000000..865abdd669 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/swaig/media-enums/parse-media-enum-error/index.mdx @@ -0,0 +1,155 @@ +--- +slug: "/reference/rust/signalwire/swaig/media-enums/parse-media-enum-error" +title: "ParseMediaEnumError" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::swaig::media_enums::ParseMediaEnumError" + parent: "signalwire::swaig::media_enums" + module: "swaig.media_enums" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs" + visibility: "public" +--- +# `ParseMediaEnumError` + +Error returned when a string is parsed into one of the closed-set media +enums (via \[`FromStr`]) but is not a recognised wire value. + +Carries the offending input and the enum's accepted set so the message is +actionable — e.g. `"foo" is not a valid RecordFormat (expected one of: +wav, mp3, mp4)`. This is the typed analogue of the Python reference's +`ValueError`, surfaced through the idiomatic `"wav".parse::()` +entry point. + +## Signature + +```rust +struct ParseMediaEnumError { /* fields */ } +``` + +## Inheritance + +**Implements:** `Debug`, `Clone`, `PartialEq`, `Eq`, `Display`, [Error](/docs/sdk-reference/reference/rust/signalwire/security/webhook-layer/webhook-validate#error) + +## Methods + +### clone + +#### Signature + +```rust +fn clone(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 55. + +*** + +### eq + +#### Signature + +```rust +fn eq(&self, other: &?) -> bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 55. + +*** + +### fmt + +#### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 55. + +*** + +### fmt + +#### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 81. + +*** + +### input + +The string that failed to parse. + +#### Signature + +```rust +fn input(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 75. + +## Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 56. diff --git a/fern/products/sdk-reference/rust/signalwire/swaig/params-builder/index.mdx b/fern/products/sdk-reference/rust/signalwire/swaig/params-builder/index.mdx new file mode 100644 index 0000000000..00574d6b58 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/swaig/params-builder/index.mdx @@ -0,0 +1,398 @@ +--- +slug: "/reference/rust/signalwire/swaig/params-builder" +title: "params_builder" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::swaig::params_builder" + parent: "signalwire::swaig" + module: "swaig" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs" + visibility: "public" +--- +# `params_builder` + +Typed builder for SWAIG tool-parameter JSON schemas. + +[`AgentBase::define_tool`] / [`Service::define_tool`] take the function's +parameter schema as an untyped `serde_json::Value` — a `properties` object +hand-written as nested `json!({ ... })`: + +```ignore +agent.define_tool( + "search_faqs", + "Search the FAQ knowledge base", + json!({ + "query": {"type": "string", "description": "The question or keywords"}, + }), + handler, + false, +); +``` + +That is easy to typo (`"strign"`, `"desciption"`, a forgotten `"type"`) and +the compiler can't help. \[`ParamsBuilder`] is an _additive_, fully-typed +convenience over the **exact same wire output**: it produces the identical +`properties` object — so it drops straight into the existing, unchanged +`define_tool` path. It is not a new format. + +```no_run +use signalwire::swaig::ParamsBuilder; +use serde_json::json; + +let params = ParamsBuilder::new() + .string("query", "The question or keywords to search") + .build(); + +// Byte-identical to the hand-written form above: +assert_eq!( + params, + json!({"query": {"type": "string", "description": "The question or keywords to search"}}) +); +``` + +## Two outputs, both byte-identical to the hand-written forms + +- `build` returns the **`properties` object** — what + Rust's `define_tool(parameters)` accepts (it wraps it as + `{"type":"object","properties": }`). +- `build_schema` returns the **full** JSON + schema `{"type":"object","properties":{…},"required":[…]}` — exactly the + shape the Python reference's `_ensure_parameter_structure` emits and the + shape hand-written for `register_swaig_function` / DataMap full + definitions. This is the form that carries a top-level + `required` list. + +## Closed-set (enum) properties + +`enum_of` renders a schema `"enum": [...]` from any +iterator of `impl AsRef`, so the Tier-1 media enums plug straight in via +their `all()` slices: + +```no_run +use signalwire::swaig::{ParamsBuilder, RecordFormat}; +use serde_json::json; + +let params = ParamsBuilder::new() + .enum_of("fmt", RecordFormat::all(), "Recording container format") + .build(); + +assert_eq!( + params, + json!({"fmt": {"type": "string", "enum": ["wav", "mp3", "mp4"], "description": "Recording container format"}}) +); +``` + +[`AgentBase::define_tool`]: crate::agent::AgentBase::define_tool + +[`Service::define_tool`]: crate::swml::service::Service::define_tool + +## Examples + + + + ```rust + agent.define_tool( + "search_faqs", + "Search the FAQ knowledge base", + json!({ + "query": {"type": "string", "description": "The question or keywords"}, + }), + handler, + false, + ); + ``` + + + + ```rust + use signalwire::swaig::ParamsBuilder; + use serde_json::json; + + let params = ParamsBuilder::new() + .string("query", "The question or keywords to search") + .build(); + + // Byte-identical to the hand-written form above: + assert_eq!( + params, + json!({"query": {"type": "string", "description": "The question or keywords to search"}}) + ); + ``` + + + + ```rust + use signalwire::swaig::{ParamsBuilder, RecordFormat}; + use serde_json::json; + + let params = ParamsBuilder::new() + .enum_of("fmt", RecordFormat::all(), "Recording container format") + .build(); + + assert_eq!( + params, + json!({"fmt": {"type": "string", "enum": ["wav", "mp3", "mp4"], "description": "Recording container format"}}) + ); + ``` + + + +## Classes + + + + Fluent, typed builder for a SWAIG tool's parameter schema. + + + + A single parameter property under construction. + + + +## Enums + +### ParamKind + +The JSON-Schema primitive types a SWAIG parameter property can declare. + +Used by \[`ParamsBuilder::array`] (the element kind) and, indirectly, by the +per-kind builder methods. The `as_str` value is the literal that lands in +the schema's `"type"` field. + +#### Signature + +```rust +enum ParamKind +``` + +#### Inheritance + +**Implements:** `Debug`, `Clone`, `Copy`, `PartialEq`, `Eq`, `Hash`, `PartialOrd`, `Ord`, `Display` + +#### Variants + + + `"array"` + + + + `"boolean"` + + + + `"integer"` + + + + `"number"` (floating point) + + + + `"object"` + + + + `"string"` + + +#### Methods + +##### as\_str + +The canonical JSON-Schema `"type"` string for this kind. + +###### Signature + +```rust +fn as_str(&self) -> &'static str +``` + +###### Returns + +`&'static str` + +###### Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 101. + +*** + +##### clone + +###### Signature + +```rust +fn clone(&self) -> ? +``` + +###### Returns + +`?` + +###### Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 82. + +*** + +##### cmp + +###### Signature + +```rust +fn cmp(&self, other: &?) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 82. + +*** + +##### eq + +###### Signature + +```rust +fn eq(&self, other: &?) -> bool +``` + +###### Parameters + + + +###### Returns + +`bool` + +###### Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 82. + +*** + +##### fmt + +###### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 82. + +*** + +##### fmt + +###### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 114. + +*** + +##### hash + +###### Signature + +```rust +fn hash<__H: ?>(&self, state: &mut __H) +``` + +###### Type Parameters + + + +###### Parameters + + + +###### Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 82. + +*** + +##### partial\_cmp + +###### Signature + +```rust +fn partial_cmp(&self, other: &?) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 82. + +#### Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 84. + +## Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/swaig/params-builder/params-builder/index.mdx b/fern/products/sdk-reference/rust/signalwire/swaig/params-builder/params-builder/index.mdx new file mode 100644 index 0000000000..15d5685926 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/swaig/params-builder/params-builder/index.mdx @@ -0,0 +1,531 @@ +--- +slug: "/reference/rust/signalwire/swaig/params-builder/params-builder" +title: "ParamsBuilder" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::swaig::params_builder::ParamsBuilder" + parent: "signalwire::swaig::params_builder" + module: "swaig.params_builder" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs" + visibility: "public" +--- +# `ParamsBuilder` + +Fluent, typed builder for a SWAIG tool's parameter schema. + +Build up the parameters one property at a time, then call +`build` to get the `properties` object for `define_tool`, or +`build_schema` for the full +`{"type":"object","properties":{…},"required":[…]}` schema. See the +module docs for the full picture and byte-identity guarantees. + +```no_run +use signalwire::swaig::{ParamsBuilder, RecordFormat}; + +let params = ParamsBuilder::new() + .string("service", "The service the customer is asking about") + .string("date", "Appointment date, YYYY-MM-DD") + .integer("party_size", "Number of people") + .boolean("confirmed", "Whether the user confirmed") + .enum_of("fmt", RecordFormat::all(), "Recording container format") + .required(["service", "date"]) + .build(); +``` + +**Decorators:** `@must_use` + +## Signature + +```rust +struct ParamsBuilder { /* fields */ } +``` + +## Inheritance + +**Implements:** `Debug`, `Clone`, `Default` + +## Examples + +```rust +use signalwire::swaig::{ParamsBuilder, RecordFormat}; + +let params = ParamsBuilder::new() + .string("service", "The service the customer is asking about") + .string("date", "Appointment date, YYYY-MM-DD") + .integer("party_size", "Number of people") + .boolean("confirmed", "Whether the user confirmed") + .enum_of("fmt", RecordFormat::all(), "Recording container format") + .required(["service", "date"]) + .build(); +``` + +## Methods + +### array + +Add an `array` property whose elements are `items` (a \[`ParamKind`]), +with `description`. + +#### Signature + +```rust +fn array(self, name: &str, items: ?, description: &str) -> Self +``` + +#### Parameters + + + + + + + +#### Returns + +`Self` + +#### Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 325. + +*** + +### boolean + +Add a `boolean` property with `description`. + +#### Signature + +```rust +fn boolean(self, name: &str, description: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 291. + +*** + +### build + +Render just the **`properties` object** — the value Rust's +`define_tool(parameters)` accepts (it wraps it as +`{"type":"object","properties": }`). + +Byte-identical to the hand-written `json!({ : { … } })` form. The +top-level `required` list is **not** included here (it +has no slot inside a bare `properties` object); use +`build_schema` when you need it. + +**Decorators:** `@must_use` + +#### Signature + +```rust +fn build(self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 375. + +*** + +### build\_schema + +Render the **full JSON schema**: +`{"type":"object","properties":{…}}`, plus `"required":[…]` when a +top-level `required` list was declared. + +Byte-identical to the Python reference's `_ensure_parameter_structure` +output and to the hand-written full-schema forms used with +`register_swaig_function` / DataMap definitions. + +**Decorators:** `@must_use` + +#### Signature + +```rust +fn build_schema(self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 387. + +*** + +### clone + +#### Signature + +```rust +fn clone(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 259. + +*** + +### default + +#### Signature + +```rust +fn default() -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 259. + +*** + +### enum\_of + +Add a closed-set (`enum`) property with `description`. + +`variants` is any iterator of `impl AsRef`, so the Tier-1 media +enums plug in directly: + +```no_run +use signalwire::swaig::{ParamsBuilder, TapDirection}; +use serde_json::json; + +let params = ParamsBuilder::new() + .enum_of("direction", TapDirection::all(), "Audio direction to tap") + .build(); +assert_eq!( + params["direction"]["enum"], + json!(["speak", "hear", "both"]) +); +``` + +#### Signature + +```rust +fn enum_of( + self, + name: &str, + variants: I, + description: &str +) -> Self where I: ?, S: ? +``` + +#### Type Parameters + + + + + +#### Parameters + + + + + + + +#### Returns + +`Self` + +#### Examples + +```rust +use signalwire::swaig::{ParamsBuilder, TapDirection}; +use serde_json::json; + +let params = ParamsBuilder::new() + .enum_of("direction", TapDirection::all(), "Audio direction to tap") + .build(); +assert_eq!( + params["direction"]["enum"], + json!(["speak", "hear", "both"]) +); +``` + +#### Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 312. + +*** + +### fmt + +#### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 259. + +*** + +### integer + +Add an `integer` property with `description`. + +#### Signature + +```rust +fn integer(self, name: &str, description: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 286. + +*** + +### new + +Start an empty parameter schema. + +#### Signature + +```rust +fn new() -> Self +``` + +#### Returns + +`Self` + +#### Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 268. + +*** + +### number + +Add a `number` (floating-point) property with `description`. + +#### Signature + +```rust +fn number(self, name: &str, description: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 281. + +*** + +### object + +Add a nested `object` property whose shape is described by `inner` +(another \[`ParamsBuilder`]), with `description`. + +#### Signature + +```rust +fn object(self, name: &str, inner: ?, description: &str) -> Self +``` + +#### Parameters + + + + + + + +#### Returns + +`Self` + +#### Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 334. + +*** + +### property + +Add a fully-customised property built via \[`PropertyBuilder`] (the +escape hatch for `default`/`format`/per-property `required`/nesting that +the one-line helpers don't cover). + +#### Signature + +```rust +fn property(self, name: &str, property: ?) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 344. + +*** + +### required + +Declare the top-level required-parameter list, emitting +`"required": [, …]` in `build_schema`. + +This is the JSON-Schema-style required array (sibling of `properties`), +matching the Python reference's `required=[…]` argument. Calling it more +than once replaces the previous list. For a per-property flag instead, +use \[`PropertyBuilder::required`]. + +#### Signature + +```rust +fn required(self, names: I) -> Self where I: ?, S: ? +``` + +#### Type Parameters + + + + + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 357. + +*** + +### string + +Add a `string` property with `description`. + +#### Signature + +```rust +fn string(self, name: &str, description: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 276. + +## Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 261. diff --git a/fern/products/sdk-reference/rust/signalwire/swaig/params-builder/property-builder/index.mdx b/fern/products/sdk-reference/rust/signalwire/swaig/params-builder/property-builder/index.mdx new file mode 100644 index 0000000000..5d58a8f5c3 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/swaig/params-builder/property-builder/index.mdx @@ -0,0 +1,358 @@ +--- +slug: "/reference/rust/signalwire/swaig/params-builder/property-builder" +title: "PropertyBuilder" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::swaig::params_builder::PropertyBuilder" + parent: "signalwire::swaig::params_builder" + module: "swaig.params_builder" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs" + visibility: "public" +--- +# `PropertyBuilder` + +A single parameter property under construction. + +You rarely build one of these directly — \[`ParamsBuilder`]'s per-kind +methods create and insert one for you. Reach for \[`PropertyBuilder`] only +when you need a property whose options (`default`, `format`, a property-local +`required` flag, a nested schema) don't fit the one-line helpers, then pass +it to \[`ParamsBuilder::property`]. + +The rendered shape is a JSON object: `{"type": , "description": , +…optional keys…}`, byte-identical to what you'd hand-write. + +**Decorators:** `@must_use` + +## Signature + +```rust +struct PropertyBuilder { /* fields */ } +``` + +## Inheritance + +**Implements:** `Debug`, `Clone` + +## Methods + +### build + +Finish the property, yielding its rendered schema object. + +**Decorators:** `@must_use` + +#### Signature + +```rust +fn build(self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 230. + +*** + +### clone + +#### Signature + +```rust +fn clone(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 129. + +*** + +### default + +Attach a `"default"` value to the property. + +#### Signature + +```rust +fn default: ?>(self, default: impl ?) -> Self +``` + +#### Type Parameters + + + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 159. + +*** + +### enum\_values + +Constrain the property to a closed set, emitting +`"enum": [, …]`. + +Accepts any iterator of `impl AsRef`, so the Tier-1 media enums plug +in via their `all()` slices (`RecordFormat::all()`, `Codec::all()`, …) — +each variant renders as its canonical wire string. + +#### Signature + +```rust +fn enum_values(self, values: I) -> Self where I: ?, S: ? +``` + +#### Type Parameters + + + + + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 178. + +*** + +### extra + +Insert an arbitrary extra schema key (escape hatch for JSON-Schema +keywords without a dedicated helper, e.g. `"minimum"`, `"pattern"`). + +#### Signature + +```rust +fn extra: ?>(self, key: &str, value: impl ?) -> Self +``` + +#### Type Parameters + + + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 223. + +*** + +### fmt + +#### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 129. + +*** + +### format + +Attach a JSON-Schema `"format"` hint (e.g. `"date"`, `"email"`, +`"uri"`). Free-form: the format vocabulary is open, so this stays a +`&str`. + +#### Signature + +```rust +fn format(self, format: &str) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 167. + +*** + +### items + +Set the element schema for an array property, emitting +`"items": {"type": }`. + +#### Signature + +```rust +fn items(self, kind: ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 193. + +*** + +### new + +Start a property of `kind` with an LLM-facing `description`. + +`description` is prompt-engineering text the model reads to decide how to +fill the argument — be specific (format, source, constraints), not terse. + +#### Signature + +```rust +fn new(kind: ?, description: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 140. + +*** + +### properties + +Set the nested `properties` for an object property from another +\[`ParamsBuilder`], emitting `"properties": {…}` (and a nested +`"required": [...]` if the inner builder declared one). + +#### Signature + +```rust +fn properties(self, inner: ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 203. + +*** + +### required + +Mark this individual property required, emitting `"required": true` +alongside its `type`/`description`. + +This is the per-property flag style some skills use +(e.g. the `datasphere` skill). For the JSON-Schema top-level +`"required": ["a","b"]` array, use \[`ParamsBuilder::required`] instead. + +#### Signature + +```rust +fn required(self, required: bool) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 153. + +## Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 131. diff --git a/fern/products/sdk-reference/rust/signalwire/swml/document/index.mdx b/fern/products/sdk-reference/rust/signalwire/swml/document/index.mdx new file mode 100644 index 0000000000..86907957aa --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/swml/document/index.mdx @@ -0,0 +1,360 @@ +--- +slug: "/reference/rust/signalwire/swml/document" +title: "document" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::swml::document" + parent: "signalwire::swml" + module: "swml" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/swml/document.rs" + visibility: "public" +--- +# `document` + +SWML document: version + named sections containing verb arrays. + +**Decorators:** `@must_use` + +## Signature + +```rust +struct Document { /* fields */ } +``` + +## Inheritance + +**Implements:** `Default` + +## Methods + +### add\_raw\_verb + +Append a pre-formatted verb value to a section. + +**Panics:** + +Panics if the section does not exist. + +#### Signature + +```rust +fn add_raw_verb(&mut self, section: &str, verb_hash: ?) +``` + +#### Parameters + + + + + +#### Source + +[`src/swml/document.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/document.rs) + +Line 69. + +*** + +### add\_section + +Add a new named section. Returns `true` if created, `false` if it already existed. + +#### Signature + +```rust +fn add_section(&mut self, name: &str) -> bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/swml/document.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/document.rs) + +Line 27. + +*** + +### add\_verb + +Append a verb to the `main` section. + +#### Signature + +```rust +fn add_verb(&mut self, verb_name: &str, config: ?) +``` + +#### Parameters + + + + + +#### Source + +[`src/swml/document.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/document.rs) + +Line 45. + +*** + +### add\_verb\_to\_section + +Append a verb to a named section. + +**Panics:** + +Panics if the section does not exist. + +#### Signature + +```rust +fn add_verb_to_section(&mut self, section: &str, verb_name: &str, config: ?) +``` + +#### Parameters + + + + + + + +#### Source + +[`src/swml/document.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/document.rs) + +Line 54. + +*** + +### clear\_section + +Clear all verbs in a section (keeps the section itself). + +#### Signature + +```rust +fn clear_section(&mut self, section: &str) +``` + +#### Parameters + + + +#### Source + +[`src/swml/document.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/document.rs) + +Line 78. + +*** + +### default + +#### Signature + +```rust +fn default() -> Self +``` + +#### Returns + +`Self` + +#### Source + +[`src/swml/document.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/document.rs) + +Line 119. + +*** + +### get\_verbs + +Get a clone of the verbs for a section (empty vec if section does not exist). + +#### Signature + +```rust +fn get_verbs(&self, section: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/swml/document.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/document.rs) + +Line 40. + +*** + +### has\_section + +#### Signature + +```rust +fn has_section(&self, name: &str) -> bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/swml/document.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/document.rs) + +Line 35. + +*** + +### new + +#### Signature + +```rust +fn new() -> Self +``` + +#### Returns + +`Self` + +#### Source + +[`src/swml/document.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/document.rs) + +Line 13. + +*** + +### render + +Compact JSON string. + +#### Signature + +```rust +fn render(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/swml/document.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/document.rs) + +Line 107. + +*** + +### render\_pretty + +Pretty-printed JSON string. + +#### Signature + +```rust +fn render_pretty(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/swml/document.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/document.rs) + +Line 112. + +*** + +### reset + +Reset document to initial state (only `main` with no verbs). + +#### Signature + +```rust +fn reset(&mut self) +``` + +#### Source + +[`src/swml/document.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/document.rs) + +Line 85. + +*** + +### to\_value + +Build the document as a `serde_json::Value`. + +#### Signature + +```rust +fn to_value(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/swml/document.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/document.rs) + +Line 91. + +*** + +### version + +#### Signature + +```rust +fn version(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/swml/document.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/document.rs) + +Line 22. + +## Source + +[`src/swml/document.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/document.rs) + +Line 7. diff --git a/fern/products/sdk-reference/rust/signalwire/swml/index.mdx b/fern/products/sdk-reference/rust/signalwire/swml/index.mdx new file mode 100644 index 0000000000..3d681b1ade --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/swml/index.mdx @@ -0,0 +1,39 @@ +--- +slug: "/reference/rust/signalwire/swml" +title: "swml" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::swml" + parent: "signalwire" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/swml/mod.rs" + visibility: "public" +--- +# `swml` + +## Classes + + + + SWML document: version + named sections containing verb arrays. + + + + SWML service: holds a document, auth credentials, and handles HTTP requests. + + + +## Modules + + + + + +## Source + +[`src/swml/mod.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/mod.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/swml/schema/index.mdx b/fern/products/sdk-reference/rust/signalwire/swml/schema/index.mdx new file mode 100644 index 0000000000..0f56587cfe --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/swml/schema/index.mdx @@ -0,0 +1,126 @@ +--- +slug: "/reference/rust/signalwire/swml/schema" +title: "schema" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::swml::schema" + parent: "signalwire::swml" + module: "swml" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/swml/schema.rs" + visibility: "public" +--- +# `schema` + +## Classes + + + + Metadata about a single SWML verb extracted from the schema. + + + +## Functions + +### get\_verb + +Get verb metadata, or `None` if not found. + +#### Signature + +```rust +fn get_verb(name: &str) -> ?<&?> +``` + +#### Parameters + + + +#### Returns + +`?<&?>` + +#### Source + +[`src/swml/schema.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/schema.rs) + +Line 82. + +*** + +### get\_verb\_names + +Get sorted list of all verb names. + +#### Signature + +```rust +fn get_verb_names() -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/swml/schema.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/schema.rs) + +Line 75. + +*** + +### is\_valid\_verb + +Check whether a verb name is valid. + +#### Signature + +```rust +fn is_valid_verb(name: &str) -> bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/swml/schema.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/schema.rs) + +Line 70. + +*** + +### verb\_count + +Number of verbs defined in the schema. + +#### Signature + +```rust +fn verb_count() -> usize +``` + +#### Returns + +`usize` + +#### Source + +[`src/swml/schema.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/schema.rs) + +Line 87. + +## Source + +[`src/swml/schema.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/schema.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/swml/schema/verb-info/index.mdx b/fern/products/sdk-reference/rust/signalwire/swml/schema/verb-info/index.mdx new file mode 100644 index 0000000000..393be78e7c --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/swml/schema/verb-info/index.mdx @@ -0,0 +1,84 @@ +--- +slug: "/reference/rust/signalwire/swml/schema/verb-info" +title: "VerbInfo" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::swml::schema::VerbInfo" + parent: "signalwire::swml::schema" + module: "swml.schema" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/swml/schema.rs" + visibility: "public" +--- +# `VerbInfo` + +Metadata about a single SWML verb extracted from the schema. + +## Signature + +```rust +struct VerbInfo { /* fields */ } +``` + +## Inheritance + +**Implements:** `Debug`, `Clone` + +## Properties + + + + + +## Methods + +### clone + +#### Signature + +```rust +fn clone(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/swml/schema.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/schema.rs) + +Line 6. + +*** + +### fmt + +#### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/swml/schema.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/schema.rs) + +Line 6. + +## Source + +[`src/swml/schema.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/schema.rs) + +Line 7. diff --git a/fern/products/sdk-reference/rust/signalwire/swml/service/index.mdx b/fern/products/sdk-reference/rust/signalwire/swml/service/index.mdx new file mode 100644 index 0000000000..adc00421b6 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/swml/service/index.mdx @@ -0,0 +1,958 @@ +--- +slug: "/reference/rust/signalwire/swml/service" +title: "service" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::swml::service" + parent: "signalwire::swml" + module: "swml" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs" + visibility: "public" +--- +# `service` + +SWML service: holds a document, auth credentials, and handles HTTP requests. + +## Signature + +```rust +struct Service { /* fields */ } +``` + +## Classes + + + + Options for constructing a `Service`. + + + + Tool registered on a `Service` for SWAIG dispatch. The `definition` field holds the rendered SWAIG function dict (function/purpose/argument); `handler` is `None` for raw / DataMap-style functions, where dispatch happens server-side rather than in this process. + + + +## Methods + +### add\_verb + +Add a verb to a section, validating against the schema. + +**Panics:** + +Panics if the verb name is not in the schema. + +#### Signature + +```rust +fn add_verb(&mut self, verb: &str, section: &str, config: ?) +``` + +#### Parameters + + + + + + + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 501. + +*** + +### basic\_auth\_credentials + +#### Signature + +```rust +fn basic_auth_credentials(&self) -> (&str, &str) +``` + +#### Returns + +`(&str, &str)` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 390. + +*** + +### define\_tool + +Define a SWAIG function the AI can call. Tool descriptions and +parameter descriptions are LLM-facing prompt engineering — see +PORTING\_GUIDE for guidance. + +Same shape as `AgentBase::define_tool` — a tool registered here is +usable on both sidecar and agent paths because they share storage. + +#### Signature + +```rust +fn define_tool( + &mut self, + name: &str, + description: &str, + parameters: ?, + handler: ?, + secure: bool +) -> &mut Self +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 241. + +*** + +### document + +#### Signature + +```rust +fn document(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 382. + +*** + +### document\_mut + +#### Signature + +```rust +fn document_mut(&mut self) -> &mut ? +``` + +#### Returns + +`&mut ?` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 386. + +*** + +### extract\_sip\_username + +Extract SIP username from a request body. +Validates format: only `[a-zA-Z0-9._-]`, max 64 chars. + +#### Signature + +```rust +fn extract_sip_username(body: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 619. + +*** + +### get\_all\_functions + +Snapshot of all registered SWAIG functions keyed by name. +Python parity: `ToolRegistry.get_all_functions`. + +#### Signature + +```rust +fn get_all_functions(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 306. + +*** + +### get\_basic\_auth\_credentials + +Get (user, password) — Python-canonical name. +Python parity: `AuthMixin.get_basic_auth_credentials`. + +#### Signature + +```rust +fn get_basic_auth_credentials(&self) -> (?, ?) +``` + +#### Returns + +`(?, ?)` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 396. + +*** + +### get\_basic\_auth\_credentials\_with\_source + +Get (user, password, source) where source is one of "provided", +"environment", or "generated". Python parity: +`AuthMixin.get_basic_auth_credentials(include_source=True)`. + +#### Signature + +```rust +fn get_basic_auth_credentials_with_source(&self) -> (?, ?, ?) +``` + +#### Returns + +`(?, ?, ?)` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 403. + +*** + +### get\_function + +Get a registered SWAIG function definition by name, or `None` +when absent. Python parity: `ToolRegistry.get_function`. + +#### Signature + +```rust +fn get_function(&self, name: &str) -> ?<&?> +``` + +#### Parameters + + + +#### Returns + +`?<&?>` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 300. + +*** + +### get\_proxy\_url\_base + +Detect or construct the proxy URL base from request headers. + +#### Signature + +```rust +fn get_proxy_url_base(&self, headers: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 664. + +*** + +### handle\_request + +Handle an HTTP request. Returns (status\_code, headers, body). + +#### Signature + +```rust +fn handle_request( + &self, + method: &str, + path: &str, + headers: &?, + body: &str +) -> (u16, ?, ?) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`(u16, ?, ?)` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 519. + +*** + +### has\_function + +Whether a SWAIG function with the given name is registered. +Python parity: `ToolRegistry.has_function`. + +#### Signature + +```rust +fn has_function(&self, name: &str) -> bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 294. + +*** + +### has\_tool + +Whether a tool with the given name is registered. + +#### Signature + +```rust +fn has_tool(&self, name: &str) -> bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 337. + +*** + +### host + +#### Signature + +```rust +fn host(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 366. + +*** + +### list\_tool\_names + +Registered tool names in insertion order. + +#### Signature + +```rust +fn list_tool_names(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 342. + +*** + +### name + +#### Signature + +```rust +fn name(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 358. + +*** + +### new + +#### Signature + +```rust +fn new(options: ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 153. + +*** + +### on\_function\_call + +Dispatch a function call to the registered handler. Returns +`None` for unknown functions or registered functions with no +local handler (e.g. DataMap tools that execute server-side). + +#### Signature + +```rust +fn on_function_call( + &self, + name: &str, + args: &?, + raw_data: &? +) -> ? +``` + +#### Parameters + + + + + + + +#### Returns + +`?` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 325. + +*** + +### on\_request + +Customization hook called when SWML is requested. Default +delegates to \[`Service::on_swml_request`] and returns its result. +Subclasses (or external callers) typically configure +`on_swml_request` via \[`Service::set_on_swml_request_hook`] +rather than overriding this method. + +Returning `None` uses the default rendered SWML; returning a +non-`None` value applies modifications to the rendered document. + +Python parity: `WebMixin.on_request(request_data, callback_path)`. + +#### Signature + +```rust +fn on_request(&self, request_data: ?<&?>, callback_path: ?<&str>) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 465. + +*** + +### on\_swml\_request + +Customization point for modifying SWML based on request data. +If a hook has been registered via +\[`Service::set_on_swml_request_hook`] the hook is invoked; +otherwise this returns `None` (no modification). + +Python parity: `WebMixin.on_swml_request(request_data, callback_path)`. +The Python third `request` argument is FastAPI-specific and +intentionally not mirrored. + +#### Signature + +```rust +fn on_swml_request(&self, request_data: ?<&?>, callback_path: ?<&str>) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 481. + +*** + +### port + +#### Signature + +```rust +fn port(&self) -> u16 +``` + +#### Returns + +`u16` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 370. + +*** + +### register\_swaig\_function + +Register a raw SWAIG function definition (e.g. DataMap tools that +have no local handler). + +#### Signature + +```rust +fn register_swaig_function(&mut self, func_def: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 273. + +*** + +### remove\_function + +Remove a registered SWAIG function. Returns `true` when the +function was found and removed; `false` when it wasn't +registered. Python parity: `ToolRegistry.remove_function`. + +#### Signature + +```rust +fn remove_function(&mut self, name: &str) -> bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 313. + +*** + +### render + +#### Signature + +```rust +fn render(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 427. + +*** + +### render\_pretty + +#### Signature + +```rust +fn render_pretty(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 431. + +*** + +### route + +#### Signature + +```rust +fn route(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 362. + +*** + +### run + +#### Signature + +```rust +fn run(&self) +``` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 924. + +*** + +### schema\_utils + +SchemaUtils helper bound to this Service. Mirrors Python's +`self.schema_utils` instance attribute on `SWMLService`. +Returns a freshly-built helper each call — the underlying +schema is `LazyLock`-cached, so this is cheap. + +#### Signature + +```rust +fn schema_utils(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 378. + +*** + +### set\_on\_swml\_request\_hook + +Register a function that customizes the SWML response on a +per-request basis. The hook receives the parsed body and the +callback path; returning `Some(value)` applies modifications, +`None` falls through to the default rendering. + +Rust has no method overriding via inheritance — this hook is +the idiomatic Rust equivalent of Python's overridable +`on_swml_request`. + +#### Signature + +```rust +fn set_on_swml_request_hook( + &mut self, + hook: F +) -> &mut Self where F: ?(?<&?>, ?<&str>) -> ? + ? + ? + 'static +``` + +#### Type Parameters + + + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 447. + +*** + +### sleep + +Add a `sleep` verb (integer milliseconds) to a section. + +#### Signature + +```rust +fn sleep(&mut self, millis: i64, section: &str) +``` + +#### Parameters + + + + + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 509. + +*** + +### tool\_definition + +Look up a registered tool's full SWAIG definition (the JSON +shape returned to the SignalWire platform). Used by audit +harnesses that need to inspect the DataMap webhook URL of a +registered tool without invoking it. + +#### Signature + +```rust +fn tool_definition(&self, name: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 350. + +*** + +### validate\_basic\_auth + +Validate provided basic-auth credentials against the configured ones. +Python parity: `AuthMixin.validate_basic_auth(username, password)`. + +#### Signature + +```rust +fn validate_basic_auth(&self, username: &str, password: &str) -> bool +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 422. + +## Type Aliases + +### FunctionHandler + +Handler type for SWAIG function callbacks. + +Receives `(args, raw_data)` and returns a `FunctionResult`. Same signature +AgentBase uses, so handlers are interchangeable between the two paths. + +#### Signature + +```rust +type FunctionHandler = ? +``` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 135. + +*** + +### OnSwmlRequestHook + +Hook function for SWML-request customization. Mirrors Python's +`WebMixin.on_swml_request(request_data, callback_path)` — receives the +parsed body and optional callback path, and returns a JSON `Value` of +modifications to merge (or `None` to use default rendering). + +Rust has no method overriding via inheritance — the function-field +hook is the idiomatic equivalent of Python's overridable +`on_swml_request`. Set via `Service::set_on_swml_request_hook`. + +#### Signature + +```rust +type OnSwmlRequestHook = ? +``` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 104. + +## Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 109. diff --git a/fern/products/sdk-reference/rust/signalwire/swml/service/service-options/index.mdx b/fern/products/sdk-reference/rust/signalwire/swml/service/service-options/index.mdx new file mode 100644 index 0000000000..d3774d7968 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/swml/service/service-options/index.mdx @@ -0,0 +1,212 @@ +--- +slug: "/reference/rust/signalwire/swml/service/service-options" +title: "ServiceOptions" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::swml::service::ServiceOptions" + parent: "signalwire::swml::service" + module: "swml.service" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs" + visibility: "public" +--- +# `ServiceOptions` + +Options for constructing a `Service`. + +Doubles as an idiomatic **builder** (parallel to +`AgentOptions`): \[`ServiceOptions::new`] gives +a name-only default and the `with_*` methods take/return `self` for +one-expression configuration feeding \[`Service::new`]: + +```no_run +use signalwire::SWMLService; +use signalwire::swml::service::ServiceOptions; + +let svc = SWMLService::new( + ServiceOptions::new("sidecar") + .route("/swml") + .basic_auth("user", "secret"), +); +``` + +Direct struct-literal construction still works; the builder methods are an +additive convenience. `#[must_use]` flags an options value built but never +passed to \[`Service::new`]. + +**Decorators:** `@must_use` + +## Signature + +```rust +struct ServiceOptions { /* fields */ } +``` + +## Examples + +```rust +use signalwire::SWMLService; +use signalwire::swml::service::ServiceOptions; + +let svc = SWMLService::new( + ServiceOptions::new("sidecar") + .route("/swml") + .basic_auth("user", "secret"), +); +``` + +## Properties + + + + + + + + + + + + + +## Methods + +### basic\_auth + +Set HTTP Basic-Auth credentials guarding this service's endpoints. + +#### Signature + +```rust +fn basic_auth(self, user: &str, password: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 89. + +*** + +### host + +Set the bind host (e.g. `"0.0.0.0"`). + +#### Signature + +```rust +fn host(self, host: &str) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 77. + +*** + +### new + +Name-only options with the same defaults the struct-literal callers use +(`port` defaults to 3000 via \[`Service::new`] when left `None`). + +#### Signature + +```rust +fn new(name: &str) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 59. + +*** + +### port + +Set the bind port. + +#### Signature + +```rust +fn port(self, port: u16) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 83. + +*** + +### route + +Set the HTTP route this service serves (e.g. `"/swml"`). + +#### Signature + +```rust +fn route(self, route: &str) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 71. + +## Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 47. diff --git a/fern/products/sdk-reference/rust/signalwire/swml/service/tool-def/index.mdx b/fern/products/sdk-reference/rust/signalwire/swml/service/tool-def/index.mdx new file mode 100644 index 0000000000..7d6b6b5363 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/swml/service/tool-def/index.mdx @@ -0,0 +1,65 @@ +--- +slug: "/reference/rust/signalwire/swml/service/tool-def" +title: "ToolDef" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::swml::service::ToolDef" + parent: "signalwire::swml::service" + module: "swml.service" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs" + visibility: "public" +--- +# `ToolDef` + +Tool registered on a `Service` for SWAIG dispatch. The `definition` +field holds the rendered SWAIG function dict (function/purpose/argument); +`handler` is `None` for raw / DataMap-style functions, where dispatch +happens server-side rather than in this process. + +## Signature + +```rust +struct ToolDef { /* fields */ } +``` + +## Inheritance + +**Implements:** `Clone` + +## Properties + + + + + + + +## Methods + +### clone + +#### Signature + +```rust +fn clone(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 145. + +## Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 146. diff --git a/fern/products/sdk-reference/rust/signalwire/utils/index.mdx b/fern/products/sdk-reference/rust/signalwire/utils/index.mdx new file mode 100644 index 0000000000..e5ea1b0ff6 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/utils/index.mdx @@ -0,0 +1,60 @@ +--- +slug: "/reference/rust/signalwire/utils" +title: "utils" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::utils" + parent: "signalwire" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/utils/mod.rs" + visibility: "public" +--- +# `utils` + +## Modules + + + + + + SSRF-prevention guard for user-supplied URLs. + + + +## Functions + +### is\_serverless\_mode + +Cross-language SDK contract: `signalwire.utils.is_serverless_mode` +returns `true` whenever the SDK is running inside any short-lived / +event-driven invocation environment (anything other than `"server"`). + +Mirrors `signalwire.utils.is_serverless_mode` in the Python +reference. The actual detection ladder lives in +`core::logging_config::get_execution_mode`; this helper just maps +"anything except 'server'" -> `true`. + +#### Signature + +```rust +fn is_serverless_mode() -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/utils/mod.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/mod.rs) + +Line 20. + +## Source + +[`src/utils/mod.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/mod.rs) + +Line 4. diff --git a/fern/products/sdk-reference/rust/signalwire/utils/schema-utils/index.mdx b/fern/products/sdk-reference/rust/signalwire/utils/schema-utils/index.mdx new file mode 100644 index 0000000000..4ed3b0d234 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/utils/schema-utils/index.mdx @@ -0,0 +1,38 @@ +--- +slug: "/reference/rust/signalwire/utils/schema-utils" +title: "schema_utils" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::utils::schema_utils" + parent: "signalwire::utils" + module: "utils" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs" + visibility: "public" +--- +# `schema_utils` + +## Classes + + + + SchemaUtils — Rust port of `signalwire.utils.schema_utils.SchemaUtils`. + + + + SchemaValidationError — Rust port of `signalwire.utils.schema_utils.SchemaValidationError`. + + + + Verb metadata extracted from the schema. + + + +## Source + +[`src/utils/schema_utils.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs) + +Line 17. diff --git a/fern/products/sdk-reference/rust/signalwire/utils/schema-utils/schema-utils/index.mdx b/fern/products/sdk-reference/rust/signalwire/utils/schema-utils/schema-utils/index.mdx new file mode 100644 index 0000000000..97b5561ac1 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/utils/schema-utils/schema-utils/index.mdx @@ -0,0 +1,323 @@ +--- +slug: "/reference/rust/signalwire/utils/schema-utils/schema-utils" +title: "SchemaUtils" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::utils::schema_utils::SchemaUtils" + parent: "signalwire::utils::schema_utils" + module: "utils.schema_utils" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs" + visibility: "public" +--- +# `SchemaUtils` + +SchemaUtils — Rust port of +`signalwire.utils.schema_utils.SchemaUtils`. + +## Signature + +```rust +struct SchemaUtils { /* fields */ } +``` + +## Methods + +### full\_validation\_available + +Whether full JSON Schema validation is wired up. Mirrors +Python's `full_validation_available` property. + +#### Signature + +```rust +fn full_validation_available(&self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/utils/schema_utils.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs) + +Line 93. + +*** + +### generate\_method\_body + +Generate a Python-style method body string for a verb. Mirrors +Python's `generate_method_body(verb_name)`. + +#### Signature + +```rust +fn generate_method_body(&self, verb_name: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/utils/schema_utils.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs) + +Line 239. + +*** + +### generate\_method\_signature + +Generate a Python-style method signature string for a verb. +Mirrors Python's `generate_method_signature(verb_name)`. + +#### Signature + +```rust +fn generate_method_signature(&self, verb_name: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/utils/schema_utils.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs) + +Line 202. + +*** + +### get\_all\_verb\_names + +Sorted list of all known verb names. Mirrors Python's +`get_all_verb_names()`. + +#### Signature + +```rust +fn get_all_verb_names(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/utils/schema_utils.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs) + +Line 110. + +*** + +### get\_verb\_parameters + +Parameter-definition block used by code-gen tooling. Mirrors +Python's `get_verb_parameters(verb_name)`. + +#### Signature + +```rust +fn get_verb_parameters(&self, verb_name: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/utils/schema_utils.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs) + +Line 145. + +*** + +### get\_verb\_properties + +The `properties[verb_name]` block for a verb, or empty when +unknown. Mirrors Python's `get_verb_properties(verb_name)`. + +#### Signature + +```rust +fn get_verb_properties(&self, verb_name: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/utils/schema_utils.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs) + +Line 116. + +*** + +### get\_verb\_required\_properties + +The `required` list for a verb, or empty when unknown / not +specified. Mirrors Python's +`get_verb_required_properties(verb_name)`. + +#### Signature + +```rust +fn get_verb_required_properties(&self, verb_name: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/utils/schema_utils.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs) + +Line 132. + +*** + +### load\_schema + +Read and parse the JSON Schema. Mirrors Python's +`load_schema()`. + +#### Signature + +```rust +fn load_schema(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/utils/schema_utils.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs) + +Line 99. + +*** + +### new + +Construct a SchemaUtils. Mirrors Python's +`SchemaUtils(schema_path=None, schema_validation=True)`. + +#### Signature + +```rust +fn new(schema_path: ?, schema_validation: bool) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/utils/schema_utils.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs) + +Line 74. + +*** + +### validate\_document + +Validate a complete SWML document. Mirrors Python's +`validate_document(document)`. Returns +`(false, ["Schema validator not initialized"])` when no full +validator is wired in. + +#### Signature + +```rust +fn validate_document(&self, _document: &?) -> (bool, ?) +``` + +#### Parameters + + + +#### Returns + +`(bool, ?)` + +#### Source + +[`src/utils/schema_utils.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs) + +Line 192. + +*** + +### validate\_verb + +Validate a verb config against the schema. Mirrors Python's +`validate_verb(verb_name, verb_config)`. + +#### Signature + +```rust +fn validate_verb(&self, verb_name: &str, verb_config: &?) -> (bool, ?) +``` + +#### Parameters + + + + + +#### Returns + +`(bool, ?)` + +#### Source + +[`src/utils/schema_utils.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs) + +Line 155. + +## Source + +[`src/utils/schema_utils.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs) + +Line 63. diff --git a/fern/products/sdk-reference/rust/signalwire/utils/schema-utils/schema-validation-error/index.mdx b/fern/products/sdk-reference/rust/signalwire/utils/schema-utils/schema-validation-error/index.mdx new file mode 100644 index 0000000000..ede55e5c5a --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/utils/schema-utils/schema-validation-error/index.mdx @@ -0,0 +1,138 @@ +--- +slug: "/reference/rust/signalwire/utils/schema-utils/schema-validation-error" +title: "SchemaValidationError" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::utils::schema_utils::SchemaValidationError" + parent: "signalwire::utils::schema_utils" + module: "utils.schema_utils" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs" + visibility: "public" +--- +# `SchemaValidationError` + +SchemaValidationError — Rust port of +`signalwire.utils.schema_utils.SchemaValidationError`. + +## Signature + +```rust +struct SchemaValidationError { /* fields */ } +``` + +## Inheritance + +**Implements:** `Debug`, `Clone`, `Display`, [Error](/docs/sdk-reference/reference/rust/signalwire/security/webhook-layer/webhook-validate#error) + +## Properties + + + + + +## Methods + +### clone + +#### Signature + +```rust +fn clone(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/utils/schema_utils.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs) + +Line 26. + +*** + +### fmt + +#### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/utils/schema_utils.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs) + +Line 26. + +*** + +### fmt + +#### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/utils/schema_utils.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs) + +Line 41. + +*** + +### new + +Construct a SchemaValidationError. Mirrors Python's +`SchemaValidationError(verb_name, errors)`. + +#### Signature + +```rust +fn new(verb_name: ?, errors: ?) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/utils/schema_utils.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs) + +Line 35. + +## Source + +[`src/utils/schema_utils.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs) + +Line 27. diff --git a/fern/products/sdk-reference/rust/signalwire/utils/schema-utils/verb-definition/index.mdx b/fern/products/sdk-reference/rust/signalwire/utils/schema-utils/verb-definition/index.mdx new file mode 100644 index 0000000000..b5d0c9225e --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/utils/schema-utils/verb-definition/index.mdx @@ -0,0 +1,86 @@ +--- +slug: "/reference/rust/signalwire/utils/schema-utils/verb-definition" +title: "VerbDefinition" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::utils::schema_utils::VerbDefinition" + parent: "signalwire::utils::schema_utils" + module: "utils.schema_utils" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs" + visibility: "public" +--- +# `VerbDefinition` + +Verb metadata extracted from the schema. + +## Signature + +```rust +struct VerbDefinition { /* fields */ } +``` + +## Inheritance + +**Implements:** `Debug`, `Clone` + +## Properties + + + + + + + +## Methods + +### clone + +#### Signature + +```rust +fn clone(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/utils/schema_utils.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs) + +Line 54. + +*** + +### fmt + +#### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/utils/schema_utils.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs) + +Line 54. + +## Source + +[`src/utils/schema_utils.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs) + +Line 55. diff --git a/fern/products/sdk-reference/rust/signalwire/utils/url-validator/index.mdx b/fern/products/sdk-reference/rust/signalwire/utils/url-validator/index.mdx new file mode 100644 index 0000000000..8b14fdf486 --- /dev/null +++ b/fern/products/sdk-reference/rust/signalwire/utils/url-validator/index.mdx @@ -0,0 +1,89 @@ +--- +slug: "/reference/rust/signalwire/utils/url-validator" +title: "url_validator" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::utils::url_validator" + parent: "signalwire::utils" + module: "utils" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/utils/url_validator.rs" + visibility: "public" +--- +# `url_validator` + +SSRF-prevention guard for user-supplied URLs. + +Mirrors Python's `signalwire.utils.url_validator.validate_url`: +rejects non-http(s) schemes, missing hostnames, and any URL whose +hostname resolves to a private / loopback / link-local / cloud- +metadata IP. When `allow_private` is true, OR the +`SWML_ALLOW_PRIVATE_URLS` env var is set to `"1"`, `"true"`, or +`"yes"` (case-insensitive), the IP-blocklist check is skipped. + +## Constants + + + Cross-port SSRF block list. Order matches the Python reference for ease of cross-language review. + + +## Functions + +### \_set\_resolver + +Install a custom resolver (for tests). Pass `None` to clear. + +#### Signature + +```rust +fn _set_resolver(resolver: ?>) +``` + +#### Parameters + + + +#### Source + +[`src/utils/url_validator.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/url_validator.rs) + +Line 44. + +*** + +### validate\_url + +Validate that a URL is safe to fetch. + +Mirrors Python's `validate_url(url, allow_private=False) -> bool`. + +#### Signature + +```rust +fn validate_url(url: &str, allow_private: bool) -> bool +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`src/utils/url_validator.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/url_validator.rs) + +Line 116. + +## Source + +[`src/utils/url_validator.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/url_validator.rs) + +Line 6. diff --git a/fern/products/sdk-reference/sdk-reference.yml b/fern/products/sdk-reference/sdk-reference.yml new file mode 100644 index 0000000000..51880d83fe --- /dev/null +++ b/fern/products/sdk-reference/sdk-reference.yml @@ -0,0 +1,80 @@ +tabs: + reference: + display-name: Reference + icon: fa-regular fa-code + +navigation: + - tab: reference + variants: + - title: TypeScript + icon: brands fa-js + default: true + layout: + - folder: ./typescript + title: TypeScript SDK + collapsed: false + + - title: Python + icon: brands fa-python + layout: + - folder: ./python + title: Python SDK + collapsed: false + + - title: Ruby + icon: fa-regular fa-gem + layout: + - folder: ./ruby + title: Ruby SDK + collapsed: false + + - title: Go + icon: fa-regular fa-code + layout: + - folder: ./go + title: Go SDK + collapsed: false + + - title: Java + icon: brands fa-java + layout: + - folder: ./java + title: Java SDK + collapsed: false + + - title: .NET + slug: dotnet + icon: brands fa-microsoft + layout: + - folder: ./dotnet + title: .NET SDK + collapsed: false + + - title: PHP + icon: brands fa-php + layout: + - folder: ./php + title: PHP SDK + collapsed: false + + - title: Rust + icon: brands fa-rust + layout: + - folder: ./rust + title: Rust SDK + collapsed: false + + - title: C++ + slug: cpp + icon: fa-regular fa-code + layout: + - folder: ./cpp + title: C++ SDK + collapsed: false + + - title: Perl + icon: fa-regular fa-code + layout: + - folder: ./perl + title: Perl SDK + collapsed: false diff --git a/fern/products/sdk-reference/typescript/_meta.json b/fern/products/sdk-reference/typescript/_meta.json new file mode 100644 index 0000000000..101d43071b --- /dev/null +++ b/fern/products/sdk-reference/typescript/_meta.json @@ -0,0 +1,10 @@ +{ + "language": "typescript", + "sdk_name": "@signalwire/sdk", + "version": null, + "source_repo": "https://github.com/signalwire/signalwire-typescript", + "format": "mdx", + "platform": "fern", + "base_slug": "/reference/typescript", + "item_count": 3897 +} \ No newline at end of file diff --git a/fern/products/sdk-reference/typescript/add-skill-directory.mdx b/fern/products/sdk-reference/typescript/add-skill-directory.mdx new file mode 100644 index 0000000000..13a543ee23 --- /dev/null +++ b/fern/products/sdk-reference/typescript/add-skill-directory.mdx @@ -0,0 +1,41 @@ +--- +slug: "/reference/typescript/add-skill-directory" +title: "addSkillDirectory" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "function" + language: "typescript" + qualified_name: "addSkillDirectory" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/index.ts" +--- +# `addSkillDirectory` + +Register a directory to search for additional skill modules. + +Equivalent to Python's `add_skill_directory(path)`. Proxies to +`SkillRegistry.addSearchPath()`. Callers who want on-disk dynamic +discovery can pair this with `SkillRegistry.discoverFromDirectory()`. + +## Signature + +```typescript +addSkillDirectory(path: string): void +``` + +## Parameters + + + Absolute path to a directory containing skill files. + + +## Returns + +`void` + +## Source + +[`src/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/index.ts) + +Line 318. diff --git a/fern/products/sdk-reference/typescript/agent-base/index.mdx b/fern/products/sdk-reference/typescript/agent-base/index.mdx new file mode 100644 index 0000000000..34a20c6117 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agent-base/index.mdx @@ -0,0 +1,3741 @@ +--- +slug: "/reference/typescript/agent-base" +title: "AgentBase" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "AgentBase" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts" +--- +# `AgentBase` + +Core agent class that composes an HTTP server, prompt management, session handling, +SWAIG tool registry, and 5-phase SWML rendering into a single deployable unit. + +A single `AgentBase` is one HTTP-servable voice agent: + +- `GET /` returns the SWML call-flow document +- `POST /swaig` dispatches SWAIG function calls to registered tool handlers +- `POST /post_prompt` receives the end-of-call summary and invokes `onSummary` + +Most user agents either (a) subclass `AgentBase` and override `defineTools()` / `onSummary()` +or (b) use one of the `prefab agents` (e.g. `ReceptionistAgent`). + +## Signature + +```typescript +class AgentBase extends SWMLService +``` + +## Inheritance + +**Extends:** [SWMLService](/docs/sdk-reference/reference/typescript/swml-service) + +## Examples + + + + ```typescript + import { AgentBase, FunctionResult } from '@signalwire/sdk'; + + class WeatherAgent extends AgentBase { + static override PROMPT_SECTIONS = [ + { title: 'Role', body: 'You are a weather assistant.' }, + ]; + + protected override defineTools(): void { + this.defineTool({ + name: 'get_forecast', + description: 'Return the forecast for a city.', + parameters: { + type: 'object', + properties: { city: { type: 'string' } }, + required: ['city'], + }, + handler: async ({ city }) => { + const forecast = await fetchForecast(city as string); + return new FunctionResult(forecast); + }, + }); + } + } + + const agent = new WeatherAgent({ name: 'weather', route: '/' }); + await agent.serve({ port: 3000 }); + ``` + + + + ```typescript + const agent = new AgentBase({ name: 'hello', route: '/' }); + agent.setPromptText('You are a friendly greeter.'); + agent.defineTool({ + name: 'say_hi', + description: 'Respond with a greeting.', + parameters: { type: 'object', properties: {} }, + handler: () => new FunctionResult('Hello from SignalWire!'), + }); + await agent.serve(); + ``` + + + +## See Also + +- \- \[FunctionResult]\(/docs/sdk-reference/reference/typescript/function-result) — builder for tool handler responses + \- \[ContextBuilder]\(/docs/sdk-reference/reference/typescript/context-builder) — multi-step conversation state machines + \- \[DataMap]\(/docs/sdk-reference/reference/typescript/data-map) — server-side tools without webhooks + \- \[AgentServer]\(/docs/sdk-reference/reference/typescript/agent-server) — host multiple agents on one HTTP server + +## Properties + + + Unique identifier for this agent instance. + + + + + + + + Domain name for SSL. Mirrors Python's `self.domain`. + + + + Check if full JSON Schema validation is enabled. Mirrors Python's `@property full_validation_enabled`. + + + + Host the server binds to. + + + + Structured logger instance for this agent. Override the inherited SWMLService logger with an AgentBase-tagged one. + + + + Service display name. + + + + Public accessor for the native functions list. Python exposes `self.native_functions` as a public read/write attribute. + + + + + + Public accessor for the agent's POM as a [PromptObjectModel](/docs/sdk-reference/reference/typescript/pom/prompt-object-model) instance. Python parity: `agent.pom` instance attribute (agent\_base.py line 209) is a `signalwire.pom.pom.PromptObjectModel` when `use_pom=True`, or `None` otherwise. This getter returns the equivalent TypeScript `PromptObjectModel` instance — callers can use `addSection`, `findSection`, `renderMarkdown`, `renderXml`, `toJson`, `toYaml` exactly as in Python. The instance returned is a fresh snapshot built from the current `PomBuilder` state, so mutating it does not feed back into the agent's internal builder. To mutate the agent's prompt, use `promptAddSection` / `promptAddToSection` / `promptAddSubsection`. + + + + Port the server binds to. + + + + Static prompt sections: subclasses can define these declaratively. Each entry is applied via promptAddSection() in the constructor. + + + + Public accessor for the PromptManager (POM). Python exposes `self.pom` as a public attribute. This getter provides equivalent access for direct POM manipulation. + + + + HTTP route path. + + + + Schema validation utilities. Mirrors Python's `self.schema_utils`. + + + + Unified security configuration. Mirrors Python's `self.security`. + + + + Public read-only accessor for the SkillManager. Python exposes `self.skill_manager` as a public attribute. This getter provides equivalent read access. + + + + Path to SSL certificate. Mirrors Python's `self.ssl_cert_path`. + + + + Whether SSL is enabled. Mirrors Python's `self.ssl_enabled`. + + + + Path to SSL private key. Mirrors Python's `self.ssl_key_path`. + + + + The complete set of internal SWAIG function names that accept fillers, matching the SWAIGInternalFiller schema definition. Any name outside this set is silently ignored by the runtime — addInternalFiller / setInternalFillers warn if you pass an unknown name. + + + + + + + + Custom verb handler registry. Mirrors Python's `self.verb_registry`. + + +## Methods + +### addAnswerVerb + +Configure the answer verb (phase 2) with optional settings. + +#### Signature + +```typescript +addAnswerVerb(config?: Record): this +``` + +#### Parameters + + + Optional answer verb configuration. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1501. + +*** + +### addFunctionInclude + +Add a remote SWAIG function include reference. + +#### Signature + +```typescript +addFunctionInclude( + url: string, + functions: string[], + metaData?: Record +): this +``` + +#### Parameters + + + URL of the remote SWAIG endpoint. + + + + Function names available at that endpoint. + + + + Optional metadata to attach to the include. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 966. + +*** + +### addHint + +Add a single speech-recognition hint. + +#### Signature + +```typescript +addHint(hint: string): this +``` + +#### Parameters + + + Word or phrase to boost in speech recognition. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 653. + +*** + +### addHints + +Add multiple speech-recognition hints at once. + +#### Signature + +```typescript +addHints(hints: string[]): this +``` + +#### Parameters + + + Array of words or phrases to boost. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 663. + +*** + +### addInternalFiller + +Add internal filler phrases for a single internal function and language. + +See [setInternalFillers](/docs/sdk-reference/reference/typescript/agent-base#set-internal-fillers) for the complete list of supported +functionName values and an explanation of what fillers do. + +#### Signature + +```typescript +addInternalFiller( + functionName: string, + languageCode: string, + fillers: string[] +): this +``` + +#### Parameters + + + One of the supported internal function names (see SUPPORTED\_INTERNAL\_FILLER\_NAMES). Names outside the supported set log a warning and are ignored by the runtime. + + + + BCP-47 language code for the fillers (e.g. 'en-US'). + + + + Array of filler phrases. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 943. + +*** + +### addLanguage + +Add a supported language to the AI configuration. + +#### Signature + +```typescript +addLanguage(config: LanguageConfig): this +``` + +#### Parameters + + + Language configuration including name, code, voice, and optional fillers. `params` may be set to attach engine-specific tuning (voice stability, similarity boost, model knobs, etc.); only emitted into SWML when non-empty so existing entries stay byte-identical when no params are passed (Python ai\_config\_mixin.py `add_language`). + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 694. + +*** + +### addMcpServer + +Add an external MCP server for tool discovery and invocation. +Tools are discovered via MCP protocol at session start and added to the AI's tool list. + +#### Signature + +```typescript +addMcpServer(url: string, opts?: { ...3 fields }): this +``` + +#### Parameters + + + MCP server HTTP endpoint URL + + + + Optional configuration: headers, resources, resourceVars + + + + + + + + +#### Returns + +`this` — This agent instance for chaining + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1146. + +*** + +### addPatternHint + +Add a pattern-based speech-recognition hint with find-and-replace behavior. + +#### Signature + +```typescript +addPatternHint(opts: { ...4 fields }): this +``` + +#### Parameters + + + Pattern hint configuration with a descriptive hint label, regex pattern, replacement string, and optional case-insensitive flag. + + + + + + + + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 674. + +*** + +### addPostAiVerb + +Add a SWML verb to execute after the AI verb (phase 5). + +#### Signature + +```typescript +addPostAiVerb(verbName: string, config: Record): this +``` + +#### Parameters + + + Name of the SWML verb. + + + + Verb configuration object. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1523. + +*** + +### addPostAnswerVerb + +Add a SWML verb to execute after the answer phase but before the AI verb (phase 3). + +#### Signature + +```typescript +addPostAnswerVerb( + verbName: string, + config: number | Record +): this +``` + +#### Parameters + + + Name of the SWML verb. + + + + Verb configuration object. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1512. + +*** + +### addPreAnswerVerb + +Add a SWML verb to execute before the answer phase (phase 1). + +#### Signature + +```typescript +addPreAnswerVerb( + verbName: string, + config: number | Record +): this +``` + +#### Parameters + + + Name of the SWML verb (e.g. "play", "record"). + + + + Verb configuration object. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1491. + +*** + +### addPronunciation + +Add a pronunciation override rule for the TTS engine. + +#### Signature + +```typescript +addPronunciation(rule: PronunciationRule): this +``` + +#### Parameters + + + Pronunciation rule specifying the text to replace and its substitute. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 774. + +*** + +### addSection + +Add a new named section to the SWML document. +Mirrors Python's `add_section()`. + +#### Signature + +```typescript +addSection(sectionName: string): this +``` + +#### Parameters + + + Name of the section to create. + + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 653. + +*** + +### addSkill + +Add a skill to this agent, registering its tools, prompt sections, hints, and global data. + +#### Signature + +```typescript +addSkill(skill: SkillBase): Promise +``` + +#### Parameters + + + The skill instance to add. + + +#### Returns + +`Promise` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1570. + +*** + +### addSkillByName + +Add a skill by its registered name, looking it up in the global SkillRegistry. + +Matches Python's `add_skill(skill_name, params)` which loads skills by string +name via the SkillManager registry. Throws a `ValueError`-equivalent if the +skill name is not found in the registry. + +Accepts a typed [SkillNameOrString](/docs/sdk-reference/reference/typescript/skills/skill-name#skill-name-or-string): one of the built-in +`SkillName` values (autocompleted, with a typo caught at compile +time) or any other string for custom / third-party skills. The value is +forwarded to the registry unchanged — the typing is erased at runtime, so +this matches Python's bare-`str` `add_skill(skill_name, params)`. + +#### Signature + +```typescript +addSkillByName( + skillName: SkillNameOrString, + params?: SkillConfig +): Promise +``` + +#### Parameters + + + The name the skill was registered under in the SkillRegistry. + + + + Optional configuration parameters forwarded to the skill factory. + + +#### Returns + +`Promise` — This agent instance for chaining. + +#### Throws + +- Error if no skill with the given name is registered. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1641. + +*** + +### addSwaigQueryParams + +Add extra query parameters appended to all SWAIG webhook URLs. + +#### Signature + +```typescript +addSwaigQueryParams(params: Record): this +``` + +#### Parameters + + + Key-value pairs to append as query parameters. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1733. + +*** + +### addVerb + +Add a verb to the SWML document. + +#### Signature + +```typescript +addVerb(name: string, config: unknown): this +``` + +#### Parameters + + + Verb name (e.g., 'answer', 'play', 'hangup'). + + + + Verb configuration. + + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 642. + +*** + +### addVerbToSection + +Add a verb to a specific named section. +Mirrors Python's `add_verb_to_section()`. + +#### Signature + +```typescript +addVerbToSection(sectionName: string, verbName: string, config: unknown): this +``` + +#### Parameters + + + Target section name (auto-created if missing). + + + + Verb name. + + + + Verb configuration. + + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 669. + +*** + +### asRouter + +Return this agent's Hono app for mounting as a sub-router in an AgentServer. + +#### Signature + +```typescript +asRouter(): Hono +``` + +#### Returns + +`Hono` — The Hono application instance. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2656. + +*** + +### autoMapSipUsernames + +Automatically register common SIP usernames based on this agent's +name and route. Derives cleaned variants (alphanumeric + underscore) +and registers each via `registerSipUsername()`. + +Port of Python's `auto_map_sip_usernames()`: + +- Registers a cleaned version of the agent name +- Registers a cleaned version of the route (if different from name) +- For names longer than 3 characters, also registers a vowel-stripped variant + +#### Signature + +```typescript +autoMapSipUsernames(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1058. + +*** + +### buildSwmlForRequest + +Service-side SWML-builder hook. Subclasses return a `SwmlBuilder` +to fully replace the document for this request, or `null` to fall +through to `setOnRequestCallback` or the static builder. + +This is distinct from the WebMixin `onRequest(requestData, +callbackPath)` hook on AgentBase (which mirrors Python's +`on_request -> on_swml_request` modification-merge contract). +Use this hook when you want to swap the entire SWML builder; use +`onRequest` / `onSwmlRequest` on AgentBase when you want to merge +targeted modifications into the rendered document. + +Default implementation returns `null` (no-op). + +#### Signature + +```typescript +buildSwmlForRequest( + _queryParams: Record, + _bodyParams: Record, + _headers: Record, + _callbackPath?: string +): SwmlBuilder | null +``` + +#### Parameters + + + + + + + + + +#### Returns + +`SwmlBuilder | null` — A `SwmlBuilder` whose document is sent as the response, or `null` to delegate to the next handler in the chain. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 834. + +*** + +### clearPostAiVerbs + +Remove all post-AI verbs. + +#### Signature + +```typescript +clearPostAiVerbs(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1550. + +*** + +### clearPostAnswerVerbs + +Remove all post-answer verbs. + +#### Signature + +```typescript +clearPostAnswerVerbs(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1541. + +*** + +### clearPreAnswerVerbs + +Remove all pre-answer verbs. + +#### Signature + +```typescript +clearPreAnswerVerbs(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1532. + +*** + +### clearSwaigQueryParams + +Clear all SWAIG query parameters. + +#### Signature + +```typescript +clearSwaigQueryParams(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1742. + +*** + +### constructor + +Create a new AgentBase instance. + +#### Signature + +```typescript +constructor(opts: AgentOptions): AgentBase +``` + +#### Parameters + + + Agent configuration options including name, route, auth, and call settings. + + +#### Returns + +`AgentBase` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 221. + +*** + +### createToolToken + +Mint a per-call SWAIG-function token via the agent's SessionManager. + +Mirrors Python reference `core/mixins/state_mixin.py _create_tool_token`: +delegates to `SessionManager.createToolToken` and returns an empty +string on any failure (Python catches all exceptions and returns ""). + +#### Signature + +```typescript +createToolToken(toolName: string, callId: string): string +``` + +#### Parameters + + + + + +#### Returns + +`string` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1475. + +*** + +### defineContexts + +Define or replace the contexts configuration for the AI verb. + +#### Signature + +```typescript +defineContexts( + contexts?: Record | ContextBuilder +): ContextBuilder +``` + +#### Parameters + + + An existing ContextBuilder instance or a plain object; a new ContextBuilder is created if omitted. + + +#### Returns + +`ContextBuilder` — The active ContextBuilder for further configuration. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 604. + +*** + +### defineTool + +Register a SWAIG tool (function) that the AI can invoke during a call. + +#### How this becomes a tool the model sees + +A SWAIG function is **exactly the same concept** as a "tool" in +native OpenAI / Anthropic tool calling. On every LLM turn, the SDK +renders each registered SWAIG function into the OpenAI tool schema: + +```json +{ +"type": "function", +"function": { +"name": "your_name_here", +"description": "your description text", +"parameters": { /* your JSON schema */ } +} +} +``` + +That schema goes to the model in the same API call that produces +the next assistant message. The model reads: + +- the **function `description`** to decide WHEN to call this tool +- each **parameter `description`** (inside the JSON schema) to + decide HOW to fill in each argument + +This means **descriptions are prompt engineering**, not developer +comments. A vague description is the #1 cause of "the model has the +right tool but doesn't call it" failures. + +##### Bad vs good descriptions + +```text +BAD : description: 'Lookup function' +GOOD: description: 'Look up a customer's account details by account +number. Use this BEFORE quoting any account-specific info +(balance, plan, status). Do not use for general product +questions.' + +BAD : parameters: { id: { type: 'string', description: 'the id' } } +GOOD: parameters: { account_number: { type: 'string', description: +'The customer's 8-digit account number, no dashes or spaces. +Ask the user if they don't provide it.' } } +``` + +##### Tool count matters + +LLM tool selection accuracy degrades past ~7-8 simultaneously-active +tools per call. Use Step.setFunctions() to partition tools across +steps so only the relevant subset is active at any moment. + +#### Signature + +```typescript +defineTool(opts: { ...11 fields }): this +``` + +#### Parameters + + + Tool definition including name, description, parameter schema, and handler callback. `description` and per-parameter `description` strings are LLM-facing prompt engineering. + + + + + Additional fields to pass through to the SWAIG function definition (Python `**swaig_fields` equivalent). + + + + + + + + + + + + + + + + + + + + External webhook URL; makes this an externally-hosted tool. + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1330. + +*** + +### defineTools + +Lifecycle method to register tools. Subclasses should call this at the +end of their own constructor (after all fields are initialized). +Not called automatically — call `this.defineTools()` explicitly. + +#### Signature + +```typescript +defineTools(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 359. + +*** + +### defineTypedTool + +Register a SWAIG tool with a typed handler that receives named parameters +instead of the standard `(args, rawData)` convention. + +The SDK wraps the handler to unpack the args dict into positional params. +If no `parameters` schema is provided, one is inferred from the handler's +source code (parameter names and default values). + +#### Signature + +```typescript +defineTypedTool(opts: { ...9 fields }): this +``` + +#### Parameters + + + Tool definition with a typed handler function. + + + + + + + The typed handler. Receives the AI-extracted arguments as named positional parameters (in declaration order), optionally with a trailing `rawData` record, and returns a SWAIG result. Precisely typed as [TypedToolHandler](/docs/sdk-reference/reference/typescript/type-inference#typed-tool-handler) rather than the bare `Function` so a non-callable — or a callable that returns nothing usable — is a compile-time error. + + + + + + + + + + + + + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1373. + +*** + +### enableDebugEvents + +Enable debug event webhooks for this agent. + +#### Signature + +```typescript +enableDebugEvents(level: number = 1): this +``` + +#### Parameters + + + Debug verbosity level (defaults to 1). + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1011. + +*** + +### enableDebugRoutes + +Register a callback function that determines routing based on POST data. + +When a routing callback is registered, an endpoint at the specified path +is created in `getApp()`. The callback receives the request body and returns +Enable debug routes for testing and development. + +This is a backward-compatibility stub matching the Python SDK. +In the TypeScript SDK, debug routes (health, ready, debug\_events) +are automatically registered in `getApp()`. + +#### Signature + +```typescript +enableDebugRoutes(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1773. + +*** + +### enableMcpServer + +Expose this agent's tools as an MCP server endpoint at /mcp. +Adds a JSON-RPC 2.0 endpoint that MCP clients (Claude Desktop, other agents) can connect to. + +#### Signature + +```typescript +enableMcpServer(): this +``` + +#### Returns + +`this` — This agent instance for chaining + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1160. + +*** + +### enableSipRouting + +Enable SIP routing for this agent. + +#### Signature + +```typescript +enableSipRouting(autoMap: boolean = true, path: string = '/sip'): this +``` + +#### Parameters + + + When true, automatically map SIP usernames to the agent route (defaults to true). + + + + HTTP path for the SIP routing endpoint (defaults to '/sip'). + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1025. + +*** + +### extractSipUsername + +Extract the SIP username from a request body's call.to field. + +**Modifiers:** `static` + +#### Signature + +```typescript +extractSipUsername(requestBody: Record): string | null +``` + +#### Parameters + + + The parsed request body containing call information. + + +#### Returns + +`string | null` — The extracted SIP username, or null if not found. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1122. + +*** + +### getAllFunctions + +Snapshot of all registered SWAIG functions keyed by name. +(Python parity: `ToolRegistry.get_all_functions`.) + +#### Signature + +```typescript +getAllFunctions(): Record> +``` + +#### Returns + +`Record>` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 529. + +*** + +### getApp + +Get or lazily create the Hono HTTP application with all routes, middleware, auth, and CORS. + +#### Signature + +```typescript +getApp(): Hono +``` + +#### Returns + +`Hono` — The configured Hono application instance. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2269. + +*** + +### getBasicAuthCredentials + +Get the basic-auth credentials used by this agent. + +#### Signature + + + + ```typescript + getBasicAuthCredentials(includeSource?: false): [string, string] + ``` + + + + ```typescript + getBasicAuthCredentials( + includeSource: true + ): [string, string, "provided" | "environment" | "generated"] + ``` + + + +#### Parameters (Overload 1) + + + When true, a third element indicating the credential source is appended. + + +#### Parameters (Overload 2) + + + When true, a third element indicating the credential source is appended. + + +#### Returns (Overload 1) + +`[string, string]` — A tuple of \[username, password] or \[username, password, source]. + +#### Returns (Overload 2) + +`[string, string, "provided" | "environment" | "generated"]` — A tuple of \[username, password] or \[username, password, source]. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2794. + +*** + +### getBuilder + +Get the underlying SwmlBuilder for direct manipulation. + +#### Signature + +```typescript +getBuilder(): SwmlBuilder +``` + +#### Returns + +`SwmlBuilder` — The SwmlBuilder instance. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 632. + +*** + +### getContexts + +Get the contexts dictionary as serialised SWML, or null when no +contexts have been defined yet. + +Matches Python `PromptManager.get_contexts()` which returns the +contexts dict or `None`. + +#### Signature + +```typescript +getContexts(): Record | null +``` + +#### Returns + +`Record | null` — Contexts dict, or null when no contexts are defined. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 641. + +*** + +### getDocument + +Get the SWML document as a dictionary. +Alias for `renderSwml()` that matches Python's `get_document()` name. + +#### Signature + +```typescript +getDocument(): Record +``` + +#### Returns + +`Record` — The SWML document. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 706. + +*** + +### getFullUrl + +Get the full external URL of this agent, using the proxy base URL if available. + +#### Signature + +```typescript +getFullUrl(includeAuth: boolean = false): string +``` + +#### Parameters + + + Whether to embed basic-auth credentials in the URL (defaults to false). + + +#### Returns + +`string` — The fully-qualified URL string. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1857. + +*** + +### getFunction + +Get a registered SWAIG function entry, or undefined. +(Python parity: `ToolRegistry.get_function`.) + +#### Signature + +```typescript +getFunction(name: string): Record | SwaigFunction | undefined +``` + +#### Parameters + + + +#### Returns + +`Record | SwaigFunction | undefined` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 523. + +*** + +### getLanguageParams + +Read the per-language `params` dict for a previously-added language. + +Python parity: `get_language_params(code)`. Returns `undefined` if the +code is unknown or the language has no params set — no exception path. + +#### Signature + +```typescript +getLanguageParams(code: string): Record | undefined +``` + +#### Parameters + + + Language code as previously passed to [addLanguage](/docs/sdk-reference/reference/typescript/agent-base#add-language). + + +#### Returns + +`Record | undefined` — The params dict if set, `undefined` otherwise (including when the code is unknown). + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 760. + +*** + +### getMcpServers + +Get configured MCP servers (read-only copy). + +#### Signature + +```typescript +getMcpServers(): Record[] +``` + +#### Returns + +`Record[]` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1171. + +*** + +### getName + +Get the agent's display name. + +#### Signature + +```typescript +getName(): string +``` + +#### Returns + +`string` — The agent name string. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1559. + +*** + +### getPostPrompt + +Get the post-prompt text, if one has been set. + +#### Signature + +```typescript +getPostPrompt(): string | null +``` + +#### Returns + +`string | null` — The post-prompt string, or null if not configured. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 548. + +*** + +### getPrompt + +Get the fully rendered main prompt text. + +#### Signature + +```typescript +getPrompt(): string +``` + +#### Returns + +`string` — The assembled prompt string. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 520. + +*** + +### getPromptPom + +Get the raw POM (Prompt Object Model) structure as an array of section data objects, +when the agent is in POM mode and has at least one section. + +Matches Python `get_prompt()` which returns `Union[str, List[Dict]]` — a raw list when +in POM mode (via `pom.to_list()` / `pom.render_dict()`), or a string otherwise. +The TS `getPrompt()` always returns a string (rendered Markdown), so this companion +method exposes the raw POM structure for callers that need it for serialisation or +inspection (e.g. skills that inspect prompt sections). + +#### Signature + +```typescript +getPromptPom(): Record[] | null +``` + +#### Returns + +`Record[] | null` — An array of POM section data objects, or null if not in POM mode or POM is empty. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 536. + +*** + +### getRawPrompt + +Get the raw prompt text whatever `setPromptText` stored, or null when +no raw prompt has been set. + +Matches Python `PromptManager.get_raw_prompt()` which returns the raw +stored string or `None`. Use this instead of `getPrompt()` when you +need the unrendered text rather than the POM-rendered Markdown. + +#### Signature + +```typescript +getRawPrompt(): string | null +``` + +#### Returns + +`string | null` — The raw prompt string, or null if not set. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 562. + +*** + +### getRegisteredTools + +Get a summary of all registered tools with their names, descriptions, and +parameter schemas. Lifted from AgentBase so the swaig-test CLI can list +tools on a non-AgentBase SWMLService target (sidecar / standalone SWAIG +host). + +#### Signature + +```typescript +getRegisteredTools(): { description: string; name: string; parameters: Record }[] +``` + +#### Returns + +`{ description: string; name: string; parameters: Record }[]` — Array of tool descriptors. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 557. + +*** + +### getTool + +Look up a registered SwaigFunction by name. Lifted from AgentBase so +`swaig-test --exec ` works against a non-AgentBase SWMLService +target. + +#### Signature + +```typescript +getTool(name: string): SwaigFunction | undefined +``` + +#### Parameters + + + The tool name to search for. + + +#### Returns + +`SwaigFunction | undefined` — The SwaigFunction instance, or undefined if not found or not a SwaigFunction. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 581. + +*** + +### getTools + +Public access to the list of registered tools. + +In Python, `define_tools()` is public and returns `List[SWAIGFunction]`. +In TypeScript, `defineTools()` is a protected setup hook (void). This +method provides the equivalent public "get all tools" capability. + +#### Signature + +```typescript +getTools(): SwaigFunction[] +``` + +#### Returns + +`SwaigFunction[]` — Array of all registered SwaigFunction instances. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 371. + +*** + +### handleMcpRequest + +Handle an MCP JSON-RPC 2.0 request. Returns the response object. + +#### Signature + +```typescript +handleMcpRequest( + body: Record +): Promise> +``` + +#### Parameters + + + +#### Returns + +`Promise>` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1204. + +*** + +### hasFunction + +Whether a SWAIG function with the given name is registered. +(Python parity: `ToolRegistry.has_function`.) + +#### Signature + +```typescript +hasFunction(name: string): boolean +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 517. + +*** + +### hasSkill + +Check whether a skill with the given name is registered. + +Accepts a typed [SkillNameOrString](/docs/sdk-reference/reference/typescript/skills/skill-name#skill-name-or-string) so built-in names autocomplete +and a typo is a compile-time error; any other string is still accepted +(custom skills / parity with Python's bare-`str` `has_skill`). + +#### Signature + +```typescript +hasSkill(skillName: SkillNameOrString): boolean +``` + +#### Parameters + + + The skill name to check. + + +#### Returns + +`boolean` — True if a skill with that name exists. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1676. + +*** + +### hasTool + +Whether a tool with the given name is registered. + +#### Signature + +```typescript +hasTool(name: string): boolean +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 511. + +*** + +### isMcpServerEnabled + +Check if MCP server endpoint is enabled. + +#### Signature + +```typescript +isMcpServerEnabled(): boolean +``` + +#### Returns + +`boolean` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1166. + +*** + +### listSkills + +List all registered skills with their names, instance IDs, and initialization status. + +#### Signature + +```typescript +listSkills(): { initialized: boolean; instanceId: string; name: string }[] +``` + +#### Returns + +`{ initialized: boolean; instanceId: string; name: string }[]` — Array of skill descriptors. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1662. + +*** + +### listToolNames + +List registered tool names in insertion order (Map preserves it). + +#### Signature + +```typescript +listToolNames(): string[] +``` + +#### Returns + +`string[]` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 545. + +*** + +### manualSetProxyUrl + +Manually set the proxy base URL used for webhook URL generation. + +#### Signature + +```typescript +manualSetProxyUrl(url: string): this +``` + +#### Parameters + + + The external-facing base URL (trailing slashes are stripped). + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1754. + +*** + +### onDebugEvent + +Lifecycle hook called when a debug event webhook is received. Override in subclasses. + +#### Signature + +```typescript +onDebugEvent(_event: Record): void | Promise +``` + +#### Parameters + + + The debug event payload. + + +#### Returns + +`void | Promise` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1970. + +*** + +### onFunctionCall + +Hook called before each SWAIG function execution. Override in subclasses. + +**Behavioral note:** In the Python SDK, `on_function_call` IS the dispatcher +— it retrieves and executes the function, returning the result. In TypeScript, +`fn.execute()` is called separately after this hook. However, if this method +returns a non-void value, it is used as the result and the default execution +is skipped, enabling dispatch interception parity with Python. + +#### Signature + +```typescript +onFunctionCall( + _name: string, + _args: Record, + _rawData: Record +): void | Record | Promise> +``` + +#### Parameters + + + Name of the function about to execute. + + + + Parsed arguments for the function. + + + + The full raw SWAIG request payload. + + +#### Returns + +`void | Record | Promise>` — Optionally a result dict to short-circuit default execution, or void/undefined to proceed normally. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1999. + +*** + +### onRequest + +Lifecycle hook called when SWML is requested. Default delegates to +[onSwmlRequest](/docs/sdk-reference/reference/typescript/agent-base#on-swml-request) and returns its result. Subclasses typically +override `onSwmlRequest` rather than this method. + +Matches Python `WebMixin.on_request(request_data, callback_path)`. The +cross-language API is the two-arg form; the Hono `context` argument is +a TypeScript-side extra preserved for callers that already have it but +is not part of the audited surface. + +#### Signature + +```typescript +onRequest( + requestData?: Record | null, + callbackPath?: string | null +): void | Record | Promise> +``` + +#### Parameters + + + The parsed request body. + + + + Optional callback path from the request. + + +#### Returns + +`void | Record | Promise>` — Optionally a dict of SWML modifications, or undefined for default rendering. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1935. + +*** + +### onSummary + +Lifecycle hook called when a post-prompt summary is received. Override in subclasses. + +Invoked once at the end of a call when the AI has produced a structured summary +(configured via `setPostPrompt()` / `setPostPromptJson()`). Use this hook to persist +call data, notify other systems, or trigger follow-up workflows. + +#### Signature + +```typescript +onSummary( + _summary: Record | null, + _rawData: Record +): void | Promise +``` + +#### Parameters + + + Parsed summary object (JSON when the post-prompt requests structured output), or `null` if extraction/parsing failed. + + + + Full raw post-prompt payload received from the platform, including call metadata, conversation history, and the summary text. + + +#### Returns + +`void | Promise` + +#### Examples + +```typescript +class MyAgent extends AgentBase { + async onSummary(summary, rawData) { + if (!summary) return; + await db.calls.insert({ + callSid: rawData.call_id, + summary, + endedAt: new Date(), + }); + } +} +``` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1916. + +*** + +### onSwmlRequest + +Lifecycle hook called on every SWML request before rendering. Override in subclasses. + +May optionally return a modification dict that will be merged into the +rendered SWML document (matching Python's `Optional[dict]` return type). + +Matches Python `on_swml_request(request_data, callback_path, request)` — the third +parameter is the FastAPI `Request` in Python; here it is the raw Hono context object +so that subclasses can access query parameters (`context.req.query()`), raw request +headers (`context.req.raw.headers`), etc. + +#### Signature + +```typescript +onSwmlRequest( + _rawData: Record, + _callbackPath?: string, + _context?: any +): void | Record | Promise> +``` + +#### Parameters + + + The parsed request body. + + + + Optional callback path from the request. + + + + The raw Hono context object (c), providing access to headers and query params. + + +#### Returns + +`void | Record | Promise>` — Optionally a dict of SWML modifications, or void. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1958. + +*** + +### promptAddSection + +Add a new section to the prompt with optional body, bullets, and subsections. + +#### Signature + +```typescript +promptAddSection(title: string, opts?: { ...5 fields }): this +``` + +#### Parameters + + + Section heading. + + + + Optional section content including body text, bullet points, and subsections. + + + + + + + + + + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 467. + +*** + +### promptAddSubsection + +Add a subsection under an existing prompt section. + +#### Signature + +```typescript +promptAddSubsection( + parentTitle: string, + title: string, + opts?: { ...2 fields } +): this +``` + +#### Parameters + + + Title of the parent section. + + + + Title of the new subsection. + + + + Optional body text and bullet points for the subsection. + + + + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 502. + +*** + +### promptAddToSection + +Append content to an existing prompt section. + +#### Signature + +```typescript +promptAddToSection(title: string, opts?: { ...3 fields }): this +``` + +#### Parameters + + + Title of the section to append to. + + + + Content to add: body text, a single bullet, or multiple bullets. + + + + + + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 487. + +*** + +### promptHasSection + +Check whether a prompt section with the given title exists. + +#### Signature + +```typescript +promptHasSection(title: string): boolean +``` + +#### Parameters + + + Section title to look for. + + +#### Returns + +`boolean` — True if the section exists. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 512. + +*** + +### registerAdditionalRoutes + +Extension point: register additional Hono routes after SWMLService +mounts /health, /ready, /swaig, and the main route. AgentBase uses +this to add /post\_prompt, /check\_for\_input, /debug\_events, /mcp. + +#### Signature + +```typescript +registerAdditionalRoutes(_app: Hono): void +``` + +#### Parameters + + + +#### Returns + +`void` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 604. + +*** + +### registerRoutingCallback + +Register a callback at a specific HTTP path that decides how to route an +incoming request. + +When called, the endpoint at `path` will invoke `callback` with the parsed +request body. If `callback` returns a non-empty route string the server +responds with `{ action: "redirect", route }` so the platform can forward the +request to the right agent. If `callback` returns `null` / `undefined` the +agent's own SWML is returned instead (normal processing). + +Mirrors Python `swml_service.register_routing_callback` / +`web_mixin.register_routing_callback`. + +#### Signature + +```typescript +registerRoutingCallback(callback: RoutingCallback, path: string = '/sip'): this +``` + +#### Parameters + + + Function receiving the parsed request body and returning a route string to redirect, or null/undefined for normal processing. + + + + HTTP path where this callback endpoint is registered (default: '/sip'). + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1102. + +*** + +### registerSipUsername + +Register a SIP username to route to this agent. + +#### Signature + +```typescript +registerSipUsername(username: string): this +``` + +#### Parameters + + + The SIP username to register. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1040. + +*** + +### registerSwaigFunction + +Register a SwaigFunction instance or a raw function descriptor (DataMap). + +#### Signature + +```typescript +registerSwaigFunction(fn: Record | SwaigFunction): this +``` + +#### Parameters + + + +#### Returns + +`this` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 472. + +*** + +### registerVerbHandler + +Register a custom verb handler. +Mirrors Python's `register_verb_handler()`. + +#### Signature + +```typescript +registerVerbHandler(handler: SWMLVerbHandler): void +``` + +#### Parameters + + + The verb handler to register. + + +#### Returns + +`void` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 726. + +*** + +### removeFunction + +Remove a registered SWAIG function. Returns true when removed, +false when not found. (Python parity: +`ToolRegistry.remove_function`.) + +#### Signature + +```typescript +removeFunction(name: string): boolean +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 540. + +*** + +### removeSkill + +Remove a previously added skill by its instance ID. + +#### Signature + +```typescript +removeSkill(instanceId: string): Promise +``` + +#### Parameters + + + The unique instance ID of the skill to remove. + + +#### Returns + +`Promise` — True if the skill was found and removed. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1654. + +*** + +### removeSkillByName + +Remove a skill by its name (Python parity). + +Python's `remove_skill(skill_name)` removes by skill name. +The existing `removeSkill(instanceId)` removes by instance ID. +This method provides name-based removal for cross-SDK parity. + +#### Signature + +```typescript +removeSkillByName(skillName: string): Promise +``` + +#### Parameters + + + The skill name to remove. + + +#### Returns + +`Promise` — True if a skill with that name was found and removed. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1690. + +*** + +### renderDocument + +Render the SWML document as a JSON string. +Mirrors Python's `render_document()`. + +#### Signature + +```typescript +renderDocument(): string +``` + +#### Returns + +`string` — JSON-encoded SWML document. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 715. + +*** + +### renderSwml + +Render the complete SWML document by assembling all 5 phases: pre-answer, answer, +post-answer, AI, and post-AI verbs. + +#### Signature + +```typescript +renderSwml(callId?: string, modifications?: Record): string +``` + +#### Parameters + + + Optional call ID to use for session tokens; auto-generated if omitted. + + + + Optional dict returned from `onSwmlRequest` to merge into the AI verb config before rendering. Matches Python's `_render_swml(modifications)` semantics: `global_data` is deep-merged; all other keys override the AI config directly. + + +#### Returns + +`string` — The rendered SWML document as a JSON string. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2019. + +*** + +### resetContexts + +Remove all contexts, returning the agent to a no-contexts state. + +This is a convenience wrapper around `defineContexts().reset()`. +Use it in a dynamic config callback when you need to rebuild +contexts from scratch for a specific request. + +#### Signature + +```typescript +resetContexts(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 625. + +*** + +### resetDocument + +Reset the SWML document to an empty state. +Mirrors Python's `reset_document()`. + +#### Signature + +```typescript +resetDocument(): this +``` + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 679. + +*** + +### run + +Alias for [serve](/docs/sdk-reference/reference/typescript/agent-base#serve). Starts the HTTP server. + +#### Signature + +```typescript +run(opts?: { ...2 fields }): Promise +``` + +#### Parameters + + + Optional host and port overrides. + + + + + + +#### Returns + +`Promise` — A promise that resolves once the server is running. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2702. + +*** + +### runServerless + +Handle a single serverless invocation (AWS Lambda, Google Cloud Functions, Azure Functions, or CGI). + +Matches Python `run(event, context)` when executed in a serverless environment. Python's +`run()` auto-detects the platform via `get_execution_mode()` and dispatches accordingly; +in TypeScript the serverless path is an **explicit** method so that `run()` keeps its +HTTP-server semantics and callers opt in to serverless dispatch deliberately. + +Platform detection follows the same environment-variable heuristics as Python's +`ServerlessMixin`: `AWS_LAMBDA_FUNCTION_NAME` → Lambda, `K_SERVICE` → GCF, +`FUNCTIONS_WORKER_RUNTIME` → Azure, `GATEWAY_INTERFACE` → CGI. + +Usage in a Lambda handler file: + +```ts +export const handler = (event: any, context: any) => agent.runServerless(event, context); +``` + +#### Signature + +```typescript +runServerless( + event: ServerlessEvent, + context?: unknown, + platform?: "lambda" | "gcf" | "azure" | "cgi" | "auto" +): Promise +``` + +#### Parameters + + + The serverless event payload (Lambda event, GCF request body, etc.). + + + + The serverless context object (Lambda context, Azure context, etc.). + + + + Optional platform override; defaults to 'auto' (environment detection). + + +#### Returns + +`Promise` — The normalized serverless response object. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2728. + +*** + +### serve + +Start the HTTP server and begin listening for requests. + +Uses `@hono/node-server` under the hood. When run in CLI mode +(`SWAIG_CLI_MODE=true`, set automatically by `npx swaig-test`), this is a +no-op so agent config can be inspected without starting a server. + +#### Signature + +```typescript +serve(opts?: { ...2 fields }): Promise +``` + +#### Parameters + + + Optional host/port overrides. Defaults to the values provided in the constructor options or the `PORT` environment variable. + + + + + + +#### Returns + +`Promise` — A promise that resolves once the server has begun listening. + +#### Examples + +```typescript +const agent = new AgentBase({ name: 'demo', port: 3000 }); +await agent.serve(); +// Or override at runtime: +await agent.serve({ port: 8080, host: '127.0.0.1' }); +``` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2679. + +*** + +### setDynamicConfigCallback + +Set a callback invoked on each SWML request to dynamically modify an ephemeral agent copy. + +The callback receives a clone of this agent — mutations apply only to the current +request, so you can vary prompt, tools, languages, params, or global data per call +without affecting the long-lived agent instance. + +#### Signature + +```typescript +setDynamicConfigCallback(cb: DynamicConfigCallback): this +``` + +#### Parameters + + + Callback receiving `(queryParams, bodyParams, headers, agent)` where `agent` is the ephemeral `AgentBase` copy to mutate. May be async. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Examples + +```typescript +agent.setDynamicConfigCallback((query, body, headers, agent) => { + const lang = query.lang ?? 'en'; + if (lang === 'es') { + (agent as AgentBase).setPromptText('Eres un asistente útil.'); + } +}); +``` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1723. + +*** + +### setFunctionIncludes + +Replace the entire list of function includes. +Each include must have a `url` and `functions` array. + +#### Signature + +```typescript +setFunctionIncludes(includes: FunctionInclude[]): this +``` + +#### Parameters + + + Array of function include objects. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 979. + +*** + +### setGlobalData + +Merge data into the global\_data object passed into the AI configuration. + +Matches Python `set_global_data` which calls `.update()` on the internal dict — +existing keys are preserved; incoming keys overwrite on collision. Skills and +other callers can each contribute keys without clobbering one another. + +If you need to replace the entire object, assign a new agent instance or use +`Object.assign(agent.globalData, {})` to clear first. + +#### Signature + +```typescript +setGlobalData(data: Record): this +``` + +#### Parameters + + + Key-value pairs to merge into global data. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 828. + +*** + +### setInternalFillers + +Set internal fillers for native SWAIG functions. + +Internal fillers are short phrases the AI agent speaks (via TTS) while +an internal/native function is running, so the caller doesn't hear +dead air during transitions or background work. + +Supported function names (matches the SWAIGInternalFiller schema): + +hangup — when the agent is hanging up +check\_time — when checking the time +wait\_for\_user — when waiting for user input +wait\_seconds — during deliberate pauses +adjust\_response\_latency — when adjusting response timing +next\_step — transitioning between steps in prompt.contexts +change\_context — switching between contexts in prompt.contexts +get\_visual\_input — processing visual input (enable\_vision=true) +get\_ideal\_strategy — thinking (enable\_thinking=true) + +Notably NOT supported: change\_step, gather\_submit, or arbitrary +user-defined SWAIG function names. The runtime only honors fillers +for the names listed above; everything else is silently ignored at +the SWML level. This method warns at registration time if you pass +an unknown name so you catch the typo early. + +#### Signature + +```typescript +setInternalFillers( + internalFillers: Record> +): this +``` + +#### Parameters + + + Map of function name to language-keyed filler phrases. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Examples + +```typescript +agent.setInternalFillers({ + next_step: { + 'en-US': ['Moving to the next step...', 'Great, let us continue...'], + 'es': ['Pasando al siguiente paso...'] + }, + check_time: { + 'en-US': ['Let me check the time...'] + } +}); +``` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 910. + +*** + +### setLanguageParams + +Set (or replace) the per-language `params` dict on an already-added +language. Useful when language entries are built up via [addLanguage](/docs/sdk-reference/reference/typescript/agent-base#add-language) +first and engine-specific tuning is added later (e.g., from a config +loader). + +Python parity: `set_language_params(code, params)`. Passing an empty +object removes the `params` key entirely. Unknown codes are a no-op. + +#### Signature + +```typescript +setLanguageParams(code: string, params: Record): this +``` + +#### Parameters + + + Language code as previously passed to [addLanguage](/docs/sdk-reference/reference/typescript/agent-base#add-language) (e.g. `"en-US"`). + + + + Engine-specific params dict to attach. Empty object removes the key. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 737. + +*** + +### setLanguages + +Replace all configured languages with a new list. + +#### Signature + +```typescript +setLanguages(languages: LanguageConfig[]): this +``` + +#### Parameters + + + Array of language configurations. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 718. + +*** + +### setNativeFunctions + +Set the list of native SWAIG function names (built-in platform functions). + +#### Signature + +```typescript +setNativeFunctions(funcs: string[]): this +``` + +#### Parameters + + + Array of native function names. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 848. + +*** + +### setOnRequestCallback + +Set a callback invoked per-request to dynamically build SWML. +When set, the static SwmlBuilder is ignored and the callback's +returned SwmlBuilder is used instead. + +#### Signature + +```typescript +setOnRequestCallback(cb: OnRequestCallback): this +``` + +#### Parameters + + + Callback receiving query params, body params, and headers. + + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 850. + +*** + +### setParam + +Set a single AI parameter (e.g. "temperature", "top\_p"). + +#### Signature + +```typescript +setParam(key: string, value: unknown): this +``` + +#### Parameters + + + Parameter name. + + + + Parameter value. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 800. + +*** + +### setParams + +Merge multiple AI parameters into the existing params object. + +#### Signature + +```typescript +setParams(params: Record): this +``` + +#### Parameters + + + Key-value pairs to merge. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 810. + +*** + +### setPostPrompt + +Set the post-prompt text evaluated after the call ends. + +#### Signature + +```typescript +setPostPrompt(text: string): this +``` + +#### Parameters + + + The post-prompt text to use. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 456. + +*** + +### setPostPromptLlmParams + +Merge LLM-specific parameters into the post-prompt configuration. + +#### Signature + +```typescript +setPostPromptLlmParams(params: Record): this +``` + +#### Parameters + + + Key-value LLM parameters to merge. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1001. + +*** + +### setPostPromptUrl + +Override the default post-prompt webhook URL with a custom one. + +#### Signature + +```typescript +setPostPromptUrl(url: string): this +``` + +#### Parameters + + + The custom post-prompt URL. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1847. + +*** + +### setPromptLlmParams + +Merge LLM-specific parameters into the main prompt configuration (e.g. model, temperature). + +#### Signature + +```typescript +setPromptLlmParams(params: Record): this +``` + +#### Parameters + + + Key-value LLM parameters to merge. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 991. + +*** + +### setPromptPom + +Set the prompt as a POM (Prompt Object Model) dictionary. + +Replaces the current POM sections with the provided structured data. +Each entry should have `title`, and optionally `body`, `bullets`, +`numbered`, `numberedBullets`, and `subsections`. + +#### Signature + +```typescript +setPromptPom(pom: Record[]): this +``` + +#### Parameters + + + Array of POM section dictionaries. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Throws + +- Error if POM mode is not enabled (`usePom: false`). + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 577. + +*** + +### setPromptText + +Set the main system prompt text for the AI. + +#### Signature + +```typescript +setPromptText(text: string): this +``` + +#### Parameters + + + The prompt text to use. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 446. + +*** + +### setPronunciations + +Replace all pronunciation rules with a new list. + +#### Signature + +```typescript +setPronunciations(rules: PronunciationRule[]): this +``` + +#### Parameters + + + Array of pronunciation rule objects. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 786. + +*** + +### setupGracefulShutdown + +Register process signal handlers for clean Kubernetes/Docker shutdown. +Handles SIGTERM and SIGINT, waits for a timeout, then exits. + +**Modifiers:** `static` + +#### Signature + +```typescript +setupGracefulShutdown(opts?: { ...1 fields }): void +``` + +#### Parameters + + + Optional timeout in milliseconds (default 5000). + + + + +#### Returns + +`void` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2751. + +*** + +### setWebHookUrl + +Override the default SWAIG webhook URL with a custom one. + +#### Signature + +```typescript +setWebHookUrl(url: string): this +``` + +#### Parameters + + + The custom webhook URL. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1837. + +*** + +### stop + +Stop the HTTP server. +Mirrors Python's `stop()`. + +#### Signature + +```typescript +stop(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 1009. + +*** + +### swaigPreDispatch + +Extension point: invoked between argument parsing and function dispatch +on POST /swaig. Returns \[target, shortCircuit]: when shortCircuit is +non-null, it's returned directly without dispatching. AgentBase may +override to add session-token validation or ephemeral dynamic-config. + +#### Signature + +```typescript +swaigPreDispatch( + _requestData: Record, + _funcName: string +): [SWMLService, unknown] +``` + +#### Parameters + + + + + +#### Returns + +`[SWMLService, unknown]` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 592. + +*** + +### updateGlobalData + +Merge additional entries into the existing global\_data object. + +#### Signature + +```typescript +updateGlobalData(data: Record): this +``` + +#### Parameters + + + Key-value pairs to merge into global data. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 838. + +*** + +### validateBasicAuth + +Override to add custom basic-auth validation logic beyond credential matching. + +#### Signature + +```typescript +validateBasicAuth( + _username: string, + _password: string +): boolean | Promise +``` + +#### Parameters + + + The username from the request. + + + + The password from the request. + + +#### Returns + +`boolean | Promise` — True if the credentials are valid; false to reject the request. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1980. + +*** + +### validateToolToken + +Validate a tool-call token for the given function. + +Mirrors Python reference `core/mixins/state_mixin.py validate_tool_token`: + +1. Unknown function → `false`. +2. Registered but non-secure → `true` without consulting SessionManager + (non-secure tools never require a token). +3. Raw-dict descriptors (e.g. DataMap) are treated as secure, matching + Python's `isinstance(func, dict) → is_secure = True` branch. +4. Missing token on a secure tool → `false`. +5. Otherwise delegate to `SessionManager.validateToolToken`. + +Divergences from the Python reference: + +- No debug-logging branch: `AgentBase` does not expose an agent-level + debug-mode flag, so the per-call debug telemetry Python emits is + omitted. `SessionManager` still logs its own validation outcomes. +- No token-derived call-id fallback: `SessionManager.debugToken` + truncates the embedded call-id for log safety, so an extracted value + cannot be round-tripped back through `validateToolToken`. The caller + is expected to supply a non-empty `callId`; an empty one is forwarded + unchanged and the underlying validator will reject it. + +#### Signature + +```typescript +validateToolToken(functionName: string, token: string, callId: string): boolean +``` + +#### Parameters + + + + + + + +#### Returns + +`boolean` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1455. + +## Type Aliases + +### RoutingCallback + +Callback invoked at a registered routing endpoint to determine how to handle an +incoming request. Return a route string to redirect to that agent route, or +null / undefined to let normal SWML processing continue. + +Mirrors Python `web_mixin.register_routing_callback` callback signature (body-only +variant — Hono request object is not forwarded; use the parsed body instead). + +#### Signature + +```typescript +type RoutingCallback = (body: Record) => string | null | undefined | Promise +``` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 46. + +## Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 111. diff --git a/fern/products/sdk-reference/typescript/agent-server/index.mdx b/fern/products/sdk-reference/typescript/agent-server/index.mdx new file mode 100644 index 0000000000..7bf0e521f2 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agent-server/index.mdx @@ -0,0 +1,416 @@ +--- +slug: "/reference/typescript/agent-server" +title: "AgentServer" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "AgentServer" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentServer.ts" +--- +# `AgentServer` + +Multi-agent HTTP server that hosts multiple AgentBase instances on distinct route prefixes. + +Use `AgentServer` when one process should serve more than one agent — each with its own +prompt, tools, and route. Internally, each agent's Hono router is mounted under its own +path. Static assets can also be served from a configured directory. + +## Signature + +```typescript +class AgentServer +``` + +## Examples + +```typescript +import { AgentServer, AgentBase } from '@signalwire/sdk'; + +const salesAgent = new AgentBase({ name: 'sales', route: '/sales' }); +const supportAgent = new AgentBase({ name: 'support', route: '/support' }); + +const server = new AgentServer({ host: '0.0.0.0', port: 3000 }); +server.register(salesAgent); +server.register(supportAgent); + +await server.run(); +``` + +## See Also + +- \[[AgentBase](/docs/sdk-reference/reference/typescript/agent-base)]\(xref://[AgentBase](/docs/sdk-reference/reference/typescript/agent-base)) + +## Properties + + + Hostname the server binds to. + + + + Public logger for this server instance. + + + + Logging level (debug, info, warn, error). + + + + Port the server listens on. + + +## Methods + +### constructor + +Create an AgentServer. + +#### Signature + +```typescript +constructor(opts?: { ...3 fields }): AgentServer +``` + +#### Parameters + + + Optional host, port, and logLevel overrides; defaults to 0.0.0.0:3000, logLevel 'info'. + + + + + + + + +#### Returns + +`AgentServer` + +#### Source + +[`src/AgentServer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentServer.ts) + +Line 97. + +*** + +### getAgent + +Look up a registered agent by its route prefix. + +#### Signature + +```typescript +getAgent(route: string): AgentBase | undefined +``` + +#### Parameters + + + The route prefix to look up. + + +#### Returns + +`AgentBase | undefined` — The agent at that route, or undefined if none is registered. + +#### Source + +[`src/AgentServer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentServer.ts) + +Line 191. + +*** + +### getAgents + +Get all registered agents keyed by their route prefix. + +#### Signature + +```typescript +getAgents(): Map +``` + +#### Returns + +`Map` — A map of route prefixes to AgentBase instances. + +#### Source + +[`src/AgentServer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentServer.ts) + +Line 182. + +*** + +### getApp + +Build and return the Hono application with all registered agents and a root listing endpoint. + +#### Signature + +```typescript +getApp(): Hono +``` + +#### Returns + +`Hono` — The fully configured Hono app. + +#### Source + +[`src/AgentServer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentServer.ts) + +Line 384. + +*** + +### register + +Register an agent at the given route prefix. + +#### Signature + +```typescript +register(agent: AgentBase, route?: string): void +``` + +#### Parameters + + + The AgentBase instance to mount. + + + + Route prefix; defaults to the agent's own route or '/'. + + +#### Returns + +`void` + +#### Throws + +- If the route is already occupied by another agent. + +#### Source + +[`src/AgentServer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentServer.ts) + +Line 132. + +*** + +### registerGlobalRoutingCallback + +Register a routing callback across all agents at the given path. + +This allows unified routing logic to be applied to all agents from +a central server-level coordinator. + +#### Signature + +```typescript +registerGlobalRoutingCallback(callbackFn: RoutingCallback, path: string): void +``` + +#### Parameters + + + The callback function that receives a request and body, returning a route string or undefined. + + + + The path to register the callback at. + + +#### Returns + +`void` + +#### Source + +[`src/AgentServer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentServer.ts) + +Line 338. + +*** + +### registerSipUsername + +Register a mapping from a SIP username to an agent route at the server level. + +Allows callers to manually route an arbitrary SIP username to any already-registered +agent route, independent of the automatic mapping performed by `setupSipRouting`. + +#### Signature + +```typescript +registerSipUsername(username: string, route: string): void +``` + +#### Parameters + + + The SIP username to map (stored lowercase). + + + + The agent route to map the username to (leading `/` added if missing; trailing slashes stripped). + + +#### Returns + +`void` + +#### Source + +[`src/AgentServer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentServer.ts) + +Line 310. + +*** + +### run + +Start the HTTP server and begin listening for requests. + +This method handles server mode only. For serverless deployments +(AWS Lambda, Google Cloud Functions, Azure Functions), use +[ServerlessAdapter](/docs/sdk-reference/reference/typescript/serverless-adapter) instead. When `SWAIG_CLI_MODE=true` is set in +the environment, the call is a no-op so agent config can be inspected +without starting a server. + +#### Signature + +```typescript +run(host?: string, port?: number): Promise +``` + +#### Parameters + + + Override the configured hostname. Defaults to the constructor value. + + + + Override the configured port. Defaults to the constructor value. + + +#### Returns + +`Promise` — Resolves once the underlying Hono server has begun listening. + +#### Source + +[`src/AgentServer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentServer.ts) + +Line 420. + +*** + +### serveStaticFiles + +Serve static files from a local directory under a given route prefix. +Includes path traversal protection (rejects `..`), MIME type detection, +and security headers (Cache-Control, X-Content-Type-Options). + +#### Signature + +```typescript +serveStaticFiles(directory: string, route: string = '/'): void +``` + +#### Parameters + + + Absolute or relative path to the directory to serve. + + + + Route prefix for static files (defaults to '/'). + + +#### Returns + +`void` + +#### Source + +[`src/AgentServer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentServer.ts) + +Line 202. + +*** + +### setupSipRouting + +Set up central SIP-based routing for the server. + +This configures all agents to handle SIP requests at the specified path, +using a coordinated routing system where each agent checks if it can +handle SIP requests for specific usernames. + +#### Signature + +```typescript +setupSipRouting(route: string = '/sip', autoMap: boolean = true): void +``` + +#### Parameters + + + The path for SIP routing (default: '/sip'). + + + + Whether to automatically map SIP usernames to agent routes (default: true). + + +#### Returns + +`void` + +#### Source + +[`src/AgentServer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentServer.ts) + +Line 254. + +*** + +### unregister + +Remove an agent registration by route. + +#### Signature + +```typescript +unregister(route: string): boolean +``` + +#### Parameters + + + The route prefix to unregister. + + +#### Returns + +`boolean` — True if the agent was found and removed, false if not found. + +#### Source + +[`src/AgentServer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentServer.ts) + +Line 172. + +## Source + +[`src/AgentServer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentServer.ts) + +Line 70. diff --git a/fern/products/sdk-reference/typescript/auth-handler/index.mdx b/fern/products/sdk-reference/typescript/auth-handler/index.mdx new file mode 100644 index 0000000000..2680520872 --- /dev/null +++ b/fern/products/sdk-reference/typescript/auth-handler/index.mdx @@ -0,0 +1,385 @@ +--- +slug: "/reference/typescript/auth-handler" +title: "AuthHandler" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "AuthHandler" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/AuthHandler.ts" +--- +# `AuthHandler` + +Multi-method authentication handler with timing-safe credential comparison. + +## Signature + +```typescript +class AuthHandler +``` + +## Properties + + + The authentication configuration for this handler. + + +## Methods + +### constructor + +Create a new AuthHandler. + +#### Signature + +```typescript +constructor(config: AuthConfig): AuthHandler +``` + +#### Parameters + + + Authentication configuration specifying one or more auth methods. + + +#### Returns + +`AuthHandler` + +#### Source + +[`src/AuthHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AuthHandler.ts) + +Line 50. + +*** + +### expressMiddleware + +Create an Express/Connect-compatible middleware adapter. + +This serves as the framework-agnostic equivalent of Python's +`get_fastapi_dependency`. For standalone validation without a +framework, use [validate](/docs/sdk-reference/reference/typescript/auth-handler#validate) directly. + +#### Signature + +```typescript +expressMiddleware( + optional: boolean = false +): (req: any, res: any, next: () => void) => Promise +``` + +#### Parameters + + + When true, unauthenticated requests are allowed through (default: false). + + +#### Returns + +`(req: any, res: any, next: () => void) => Promise` — An Express-compatible middleware function. + +#### Source + +[`src/AuthHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AuthHandler.ts) + +Line 186. + +*** + +### getAuthInfo + +Get information about configured authentication methods. + +Returns structured metadata describing each enabled auth method, +including usernames, header names, and usage hints. + +#### Signature + +```typescript +getAuthInfo(): { apiKey?: { enabled: true; header: string; hint: string }; basic?: { enabled: true; username: string }; bearer?: { enabled: true; hint: string } } +``` + +#### Returns + +`{ apiKey?: { enabled: true; header: string; hint: string }; basic?: { enabled: true; username: string }; bearer?: { enabled: true; hint: string } }` — An object describing the enabled auth methods and their configuration. + +#### Source + +[`src/AuthHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AuthHandler.ts) + +Line 206. + +*** + +### hasApiKeyAuth + +Check whether API key authentication is configured. + +#### Signature + +```typescript +hasApiKeyAuth(): boolean +``` + +#### Returns + +`boolean` — True if an API key has been set. + +#### Source + +[`src/AuthHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AuthHandler.ts) + +Line 245. + +*** + +### hasBasicAuth + +Check whether Basic authentication is configured. + +#### Signature + +```typescript +hasBasicAuth(): boolean +``` + +#### Returns + +`boolean` — True if basic auth credentials have been set. + +#### Source + +[`src/AuthHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AuthHandler.ts) + +Line 253. + +*** + +### hasBearerAuth + +Check whether Bearer token authentication is configured. + +#### Signature + +```typescript +hasBearerAuth(): boolean +``` + +#### Returns + +`boolean` — True if a bearer token has been set. + +#### Source + +[`src/AuthHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AuthHandler.ts) + +Line 237. + +*** + +### middleware + +Create a Hono-compatible middleware that rejects unauthorized requests with a 401 response. + +#### Signature + +```typescript +middleware( + optional: boolean = false +): (c: any, next: () => Promise) => Promise +``` + +#### Parameters + + + When true, unauthenticated requests are allowed through instead of being rejected (default: false). + + +#### Returns + +`(c: any, next: () => Promise) => Promise` — A middleware function suitable for use with Hono's `app.use()`. + +#### Source + +[`src/AuthHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AuthHandler.ts) + +Line 163. + +*** + +### validate + +Validate request headers against configured auth methods (Bearer, API Key, Basic, Custom) in order. + +#### Signature + +```typescript +validate(headers: Record): Promise +``` + +#### Parameters + + + The request headers as a string-keyed record. + + +#### Returns + +`Promise` — True if any configured method accepts the request, or if no methods are configured. + +#### Source + +[`src/AuthHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AuthHandler.ts) + +Line 59. + +*** + +### verifyApiKey + +Verify an API key against the configured key. + +Returns false immediately if API key auth is not configured. +Uses constant-time comparison to prevent timing attacks. + +#### Signature + +```typescript +verifyApiKey(key: string): boolean +``` + +#### Parameters + + + The API key string to verify. + + +#### Returns + +`boolean` — True if the key matches the configured API key. + +#### Source + +[`src/AuthHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AuthHandler.ts) + +Line 153. + +*** + +### verifyBasicAuth + +Verify a Basic Auth username/password pair against the configured credentials. + +Returns false immediately if Basic Auth is not configured. +Uses constant-time comparison to prevent timing attacks. + +#### Signature + +```typescript +verifyBasicAuth(username: string, password: string): boolean +``` + +#### Parameters + + + The username to verify. + + + + The password to verify. + + +#### Returns + +`boolean` — True if the credentials match the configured Basic Auth credentials. + +#### Source + +[`src/AuthHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AuthHandler.ts) + +Line 124. + +*** + +### verifyBearerToken + +Verify a Bearer token against the configured token. + +Returns false immediately if Bearer token auth is not configured. +Uses constant-time comparison to prevent timing attacks. + +#### Signature + +```typescript +verifyBearerToken(token: string): boolean +``` + +#### Parameters + + + The Bearer token string to verify (without the "Bearer " prefix). + + +#### Returns + +`boolean` — True if the token matches the configured Bearer token. + +#### Source + +[`src/AuthHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AuthHandler.ts) + +Line 139. + +## Interfaces + +### AuthConfig + +Configuration for one or more authentication methods checked by [AuthHandler](/docs/sdk-reference/reference/typescript/auth-handler). + +#### Signature + +```typescript +interface AuthConfig +``` + +#### Properties + + + When explicitly set to false, deny requests if no auth methods are configured. + + + + API key matched against the X-Api-Key header. + + + + Custom header name for API key lookup (default: 'X-Api-Key'). + + + + Basic auth credentials as a \[username, password] tuple. + + + + Bearer token matched against the Authorization header. + + + + Custom validator function; return true to allow the request. + + +#### Source + +[`src/AuthHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AuthHandler.ts) + +Line 14. + +## Source + +[`src/AuthHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AuthHandler.ts) + +Line 42. diff --git a/fern/products/sdk-reference/typescript/cli/agent-loader/index.mdx b/fern/products/sdk-reference/typescript/cli/agent-loader/index.mdx new file mode 100644 index 0000000000..e4e6b48712 --- /dev/null +++ b/fern/products/sdk-reference/typescript/cli/agent-loader/index.mdx @@ -0,0 +1,86 @@ +--- +slug: "/reference/typescript/cli/agent-loader" +title: "agent-loader" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "cli.agent-loader" + module: "cli" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/cli/agent-loader.ts" +--- +# `agent-loader` + +## Signature + +```typescript +module agent-loader +``` + +## Functions + +### listAgents + +List all exported agent instances and classes in a module. + +#### Signature + +```typescript +listAgents(agentPath: string): Promise +``` + +#### Parameters + + + Path to the agent module file. + + +#### Returns + +`Promise` — Array of export names that are AgentBase instances or subclasses. + +#### Source + +[`src/cli/agent-loader.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/cli/agent-loader.ts) + +Line 157. + +*** + +### loadAgent + +Dynamically import an agent file and resolve an AgentBase instance using duck-typing heuristics. + +#### Signature + +```typescript +loadAgent(agentPath: string, agentClass?: string): Promise +``` + +#### Parameters + + + Path to the agent module file. + + + + Optional name of a specific exported class or instance to use. + + +#### Returns + +`Promise` — The resolved AgentBase instance. + +#### Source + +[`src/cli/agent-loader.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/cli/agent-loader.ts) + +Line 86. + +## Source + +[`src/cli/agent-loader.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/cli/agent-loader.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/cli/mock-data/index.mdx b/fern/products/sdk-reference/typescript/cli/mock-data/index.mdx new file mode 100644 index 0000000000..b2e2a2a093 --- /dev/null +++ b/fern/products/sdk-reference/typescript/cli/mock-data/index.mdx @@ -0,0 +1,146 @@ +--- +slug: "/reference/typescript/cli/mock-data" +title: "mock-data" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "cli.mock-data" + module: "cli" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/cli/mock-data.ts" +--- +# `mock-data` + +## Signature + +```typescript +module mock-data +``` + +## Functions + +### generateFakePostData + +Generate a full mock POST body simulating an inbound SignalWire call request. + +#### Signature + +```typescript +generateFakePostData(opts?: MockCallOptions): Record +``` + +#### Parameters + + + Optional overrides for call metadata fields. + + +#### Returns + +`Record` — A record representing the simulated call POST data. + +#### Source + +[`src/cli/mock-data.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/cli/mock-data.ts) + +Line 40. + +*** + +### generateMinimalPostData + +Generate a minimal mock POST body for executing a single SWAIG function. + +#### Signature + +```typescript +generateMinimalPostData( + fnName: string, + args?: Record, + opts?: { ...2 fields } +): Record +``` + +#### Parameters + + + Name of the SWAIG function to invoke. + + + + Arguments to pass to the function. + + + + Optional call ID and field overrides. + + + + + + +#### Returns + +`Record` — A record representing the minimal POST data for function execution. + +#### Source + +[`src/cli/mock-data.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/cli/mock-data.ts) + +Line 89. + +## Interfaces + +### MockCallOptions + +Options for generating mock call data in CLI testing. + +#### Signature + +```typescript +interface MockCallOptions +``` + +#### Properties + + + Direction of the call. + + + + Override the auto-generated call ID. + + + + Current call state (e.g. "active", "ringing", "hold"). + + + + Call transport type. + + + + Caller's phone number. + + + + Additional key-value overrides merged into the post data. + + + + Destination extension or agent name. + + +#### Source + +[`src/cli/mock-data.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/cli/mock-data.ts) + +Line 9. + +## Source + +[`src/cli/mock-data.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/cli/mock-data.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/cli/swaig-test/index.mdx b/fern/products/sdk-reference/typescript/cli/swaig-test/index.mdx new file mode 100644 index 0000000000..50af995ac2 --- /dev/null +++ b/fern/products/sdk-reference/typescript/cli/swaig-test/index.mdx @@ -0,0 +1,26 @@ +--- +slug: "/reference/typescript/cli/swaig-test" +title: "swaig-test" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "cli.swaig-test" + module: "cli" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/cli/swaig-test.ts" +--- +# `swaig-test` + +## Signature + +```typescript +module swaig-test +``` + +## Source + +[`src/cli/swaig-test.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/cli/swaig-test.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/config-loader/index.mdx b/fern/products/sdk-reference/typescript/config-loader/index.mdx new file mode 100644 index 0000000000..0d3e0dfc62 --- /dev/null +++ b/fern/products/sdk-reference/typescript/config-loader/index.mdx @@ -0,0 +1,543 @@ +--- +slug: "/reference/typescript/config-loader" +title: "ConfigLoader" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "ConfigLoader" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/ConfigLoader.ts" +--- +# `ConfigLoader` + +JSON configuration file loader with environment variable interpolation and dot-notation access. + +## Signature + +```typescript +class ConfigLoader +``` + +## Properties + + + Get the ordered list of config file paths that were passed/searched. + + +## Methods + +### constructor + +Create a new ConfigLoader, optionally loading a JSON file immediately. + +Accepts a single file path or an array of paths. When given an array, +the loader iterates in order and loads the first file that exists +(mirroring Python's ordered-search behaviour). + +#### Signature + +```typescript +constructor(filePaths?: string | string[]): ConfigLoader +``` + +#### Parameters + + + Path(s) to a JSON config file to load on construction. + + +#### Returns + +`ConfigLoader` + +#### Source + +[`src/ConfigLoader.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ConfigLoader.ts) + +Line 33. + +*** + +### findConfigFile + +Find a config file path without loading it. + +Searches service-specific filenames, additional paths, and default paths. +Returns the first found path string or null. + +**Modifiers:** `static` + +#### Signature + +```typescript +findConfigFile(serviceName?: string, additionalPaths?: string[]): string | null +``` + +#### Parameters + + + Optional service name for service-specific config filenames. + + + + Additional file paths to check. + + +#### Returns + +`string | null` — Path to the first config file found, or null. + +#### Source + +[`src/ConfigLoader.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ConfigLoader.ts) + +Line 109. + +*** + +### get + +Retrieve a configuration value using a dot-notation path (e.g. `'server.port'`). + +#### Signature + +```typescript +get(path: string, defaultValue?: T): T +``` + +#### Type Parameters + + + +#### Parameters + + + Dot-separated key path into the config object. + + + + Value returned when the path does not exist. + + +#### Returns + +`T` — The resolved value, or defaultValue if not found. + +#### Source + +[`src/ConfigLoader.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ConfigLoader.ts) + +Line 182. + +*** + +### getAll + +Return a shallow copy of the entire configuration object. + +#### Signature + +```typescript +getAll(): Record +``` + +#### Returns + +`Record` — A copy of the top-level config data. + +#### Source + +[`src/ConfigLoader.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ConfigLoader.ts) + +Line 247. + +*** + +### getConfig + +Alias for [getAll](/docs/sdk-reference/reference/typescript/config-loader#get-all) — matches the Python SDK's `get_config()` method name. + +#### Signature + +```typescript +getConfig(): Record +``` + +#### Returns + +`Record` — A copy of the top-level config data. + +#### Source + +[`src/ConfigLoader.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ConfigLoader.ts) + +Line 255. + +*** + +### getConfigFile + +Alias for [getFilePath](/docs/sdk-reference/reference/typescript/config-loader#get-file-path) — matches the Python SDK's `get_config_file()` method name. + +#### Signature + +```typescript +getConfigFile(): string | null +``` + +#### Returns + +`string | null` — The file path, or null if config was loaded from an object. + +#### Source + +[`src/ConfigLoader.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ConfigLoader.ts) + +Line 271. + +*** + +### getFilePath + +Return the absolute path of the loaded config file, if any. + +#### Signature + +```typescript +getFilePath(): string | null +``` + +#### Returns + +`string | null` — The file path, or null if config was loaded from an object. + +#### Source + +[`src/ConfigLoader.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ConfigLoader.ts) + +Line 263. + +*** + +### getSection + +Get an entire configuration section with all environment variables substituted. + +#### Signature + +```typescript +getSection(section: string): Record +``` + +#### Parameters + + + The top-level section name (e.g. 'security', 'server'). + + +#### Returns + +`Record` — The configuration section as an object, or an empty object if not found. + +#### Source + +[`src/ConfigLoader.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ConfigLoader.ts) + +Line 298. + +*** + +### has + +Check whether a dot-notation path exists in the loaded configuration. + +#### Signature + +```typescript +has(path: string): boolean +``` + +#### Parameters + + + Dot-separated key path to check. + + +#### Returns + +`boolean` — True if the path resolves to a defined value. + +#### Source + +[`src/ConfigLoader.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ConfigLoader.ts) + +Line 229. + +*** + +### hasConfig + +Check if a configuration was loaded. + +**Deliberate deviation from Python `has_config()`:** Python returns `True` +only when a file was loaded (`self._config is not None`). This TypeScript +implementation also returns `true` when data was loaded via +[loadFromObject](/docs/sdk-reference/reference/typescript/config-loader#load-from-object), because `loadFromObject` is an extra TS-only method +with no Python equivalent. Treating object-loaded data as "configured" is +the correct semantic for the TS API surface. + +If you need file-load-only detection, check `this.getFilePath() !== null`. + +#### Signature + +```typescript +hasConfig(): boolean +``` + +#### Returns + +`boolean` — True if configuration data exists (from file or object). + +#### Source + +[`src/ConfigLoader.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ConfigLoader.ts) + +Line 289. + +*** + +### interpolateEnvVars + +Interpolate $\{VAR|default\} patterns in a raw string. + +#### Signature + +```typescript +interpolateEnvVars(input: string): string +``` + +#### Parameters + + + The string containing env var references. + + +#### Returns + +`string` — The string with all env var references resolved. + +#### Source + +[`src/ConfigLoader.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ConfigLoader.ts) + +Line 439. + +*** + +### load + +Load configuration from a JSON file, performing `${VAR|default}` env var interpolation on the raw text. + +#### Signature + +```typescript +load(filePath: string): this +``` + +#### Parameters + + + Path to the JSON config file. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/ConfigLoader.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ConfigLoader.ts) + +Line 65. + +*** + +### loadFromObject + +Load configuration from a plain object instead of a file, useful for testing or programmatic setup. + +#### Signature + +```typescript +loadFromObject(obj: Record): this +``` + +#### Parameters + + + The configuration object to use. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/ConfigLoader.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ConfigLoader.ts) + +Line 428. + +*** + +### mergeWithEnv + +Merge configuration with environment variables that match a prefix. + +Config file values take precedence over environment variables. Matching +env var keys are stripped of the prefix, lowercased, split on `_`, and +written into a nested object (e.g. `SWML_FOO_BAR` → `{ foo: { bar: v } }`). +Mirrors Python's `merge_with_env` in +`signalwire/signalwire/core/config_loader.py`. + +#### Signature + +```typescript +mergeWithEnv(envPrefix: string = 'SWML_'): Record +``` + +#### Parameters + + + Prefix for environment variables to consider (default: `'SWML_'`). + + +#### Returns + +`Record` — Merged configuration dictionary. + +#### Source + +[`src/ConfigLoader.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ConfigLoader.ts) + +Line 367. + +*** + +### search + +Search for a config file in standard locations. + +Default search paths: CWD, `./config`, `$HOME/.signalwire`, +`.swml/`, `$HOME/.swml/`, `/etc/swml/`. + +**Modifiers:** `static` + +#### Signature + +```typescript +search( + filename: string, + additionalPaths?: string[], + serviceName?: string +): ConfigLoader | null +``` + +#### Parameters + + + The config file name to search for. + + + + Extra directories to search before the defaults. + + + + Optional service name; prepends service-specific filenames to the search. + + +#### Returns + +`ConfigLoader | null` — A loaded ConfigLoader if found, or null if the file does not exist in any search path. + +#### Source + +[`src/ConfigLoader.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ConfigLoader.ts) + +Line 88. + +*** + +### set + +Set a configuration value at the given dot-notation path, creating intermediate objects as needed. + +#### Signature + +```typescript +set(path: string, value: unknown): this +``` + +#### Parameters + + + Dot-separated key path into the config object. + + + + The value to store. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/ConfigLoader.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ConfigLoader.ts) + +Line 205. + +*** + +### substituteVars + +Recursively substitute `${VAR|default}` environment variables in any value. + +Walks strings, objects, and arrays. Coerces result strings to boolean +(`"true"` / `"false"`) or number when appropriate. + +#### Signature + +```typescript +substituteVars(value: unknown, maxDepth: number = 10): unknown +``` + +#### Parameters + + + The value to process (string, object, array, or primitive). + + + + Maximum recursion depth to prevent infinite loops (default: 10). + + +#### Returns + +`unknown` — The value with all environment variables substituted. + +#### Source + +[`src/ConfigLoader.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ConfigLoader.ts) + +Line 316. + +## Source + +[`src/ConfigLoader.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ConfigLoader.ts) + +Line 15. diff --git a/fern/products/sdk-reference/typescript/context-builder/context/index.mdx b/fern/products/sdk-reference/typescript/context-builder/context/index.mdx new file mode 100644 index 0000000000..878947c46f --- /dev/null +++ b/fern/products/sdk-reference/typescript/context-builder/context/index.mdx @@ -0,0 +1,764 @@ +--- +slug: "/reference/typescript/context-builder/context" +title: "Context" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "ContextBuilder.Context" + parent: "ContextBuilder" + module: "ContextBuilder" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts" +--- +# `Context` + +A named context containing ordered steps, prompt configuration, and navigation rules. + +## Signature + +```typescript +class Context +``` + +## Properties + + + The unique name identifying this context. + + +## Methods + +### addBullets + +Adds a POM section with bullets to the context prompt, mutually exclusive with raw prompt text. + +#### Signature + +```typescript +addBullets(title: string, bullets: string[]): this +``` + +#### Parameters + + + The section heading. + + + + The list of bullet point strings. + + +#### Returns + +`this` — This context for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 757. + +*** + +### addEnterFiller + +Adds enter filler phrases for a specific language. + +#### Signature + +```typescript +addEnterFiller(languageCode: string, fillers: string[]): this +``` + +#### Parameters + + + The language code (e.g., "en-US"). + + + + Array of filler phrases. + + +#### Returns + +`this` — This context for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 789. + +*** + +### addExitFiller + +Adds exit filler phrases for a specific language. + +#### Signature + +```typescript +addExitFiller(languageCode: string, fillers: string[]): this +``` + +#### Parameters + + + The language code (e.g., "en-US"). + + + + Array of filler phrases. + + +#### Returns + +`this` — This context for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 801. + +*** + +### addSection + +Adds a POM section with a body to the context prompt, mutually exclusive with raw prompt text. + +#### Signature + +```typescript +addSection(title: string, body: string): this +``` + +#### Parameters + + + The section heading. + + + + The section body text. + + +#### Returns + +`this` — This context for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 745. + +*** + +### addStep + +Adds a new step to this context. + +#### Signature + +```typescript +addStep(name: string, opts?: { ...5 fields }): Step +``` + +#### Parameters + + + The unique step name within this context. + + + + Optional shorthand for task text, bullets, criteria, functions, and valid steps. + + + + + + + + + + + + +#### Returns + +`Step` — The newly created Step for further configuration. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 532. + +*** + +### addSystemBullets + +Adds a POM section with bullets to the system prompt, mutually exclusive with raw system prompt text. + +#### Signature + +```typescript +addSystemBullets(title: string, bullets: string[]): this +``` + +#### Parameters + + + The section heading. + + + + The list of bullet point strings. + + +#### Returns + +`this` — This context for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 722. + +*** + +### addSystemSection + +Adds a POM section to the system prompt, mutually exclusive with raw system prompt text. + +#### Signature + +```typescript +addSystemSection(title: string, body: string): this +``` + +#### Parameters + + + The section heading. + + + + The section body text. + + +#### Returns + +`this` — This context for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 710. + +*** + +### constructor + +Creates a new Context. + +#### Signature + +```typescript +constructor(name: string): Context +``` + +#### Parameters + + + The unique context name. + + +#### Returns + +`Context` + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 522. + +*** + +### getStep + +Returns a step by name. + +#### Signature + +```typescript +getStep(name: string): Step | undefined +``` + +#### Parameters + + + The step name to retrieve. + + +#### Returns + +`Step | undefined` — The matching Step, or undefined if not found. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 562. + +*** + +### moveStep + +Moves a step to a new position in the step order. + +#### Signature + +```typescript +moveStep(name: string, position: number): this +``` + +#### Parameters + + + The step name to move. + + + + The zero-based index to insert at. + + +#### Returns + +`this` — This context for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 583. + +*** + +### removeStep + +Removes a step from this context by name. + +#### Signature + +```typescript +removeStep(name: string): this +``` + +#### Parameters + + + The step name to remove. + + +#### Returns + +`this` — This context for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 571. + +*** + +### setConsolidate + +Sets whether to consolidate conversation history when entering this context. + +#### Signature + +```typescript +setConsolidate(consolidate: boolean): this +``` + +#### Parameters + + + Whether to consolidate. + + +#### Returns + +`this` — This context for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 636. + +*** + +### setEnterFillers + +Sets filler phrases spoken when entering this context, keyed by language code. + +#### Signature + +```typescript +setEnterFillers(fillers: Record): this +``` + +#### Parameters + + + Map of language codes to arrays of filler phrases. + + +#### Returns + +`this` — This context for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 768. + +*** + +### setExitFillers + +Sets filler phrases spoken when exiting this context, keyed by language code. + +#### Signature + +```typescript +setExitFillers(fillers: Record): this +``` + +#### Parameters + + + Map of language codes to arrays of filler phrases. + + +#### Returns + +`this` — This context for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 778. + +*** + +### setFullReset + +Sets whether to fully reset conversation history when entering this context. + +#### Signature + +```typescript +setFullReset(fullReset: boolean): this +``` + +#### Parameters + + + Whether to fully reset. + + +#### Returns + +`this` — This context for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 646. + +*** + +### setInitialStep + +Set which step the context starts on when entered. + +By default, a context starts on its first step (index 0). Use this to +skip a preamble step on re-entry via `change_context`. + +#### Signature + +```typescript +setInitialStep(stepName: string): this +``` + +#### Parameters + + + Name of the step to start on. Must exist in this context (validated by ContextBuilder.validate()). + + +#### Returns + +`this` — This context for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 670. + +*** + +### setIsolated + +Mark this context as isolated — entering it wipes conversation history. + +When `isolated=true` and the context is entered via change\_context, the +runtime wipes the conversation array. The model starts fresh with only +the new context's systemPrompt + step instructions, with no memory of +prior turns. + +EXCEPTION — `reset` overrides the wipe: +If the context also has a `reset` configuration (via consolidate or +full\_reset), the wipe is skipped in favor of the reset behavior. Use +reset with consolidate=true to summarize prior history into a single +message instead of dropping it entirely. + +Use cases: + +- Switching to a sensitive billing flow that should not see prior + small-talk +- Handing off to a different agent persona +- Resetting after a long off-topic detour + +#### Signature + +```typescript +setIsolated(isolated: boolean): this +``` + +#### Parameters + + + True to wipe conversation history on context entry (subject to the reset exception above). + + +#### Returns + +`this` — This context for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 699. + +*** + +### setPostPrompt + +Sets the post-prompt text for this context. + +#### Signature + +```typescript +setPostPrompt(postPrompt: string): this +``` + +#### Parameters + + + The post-prompt string. + + +#### Returns + +`this` — This context for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 615. + +*** + +### setPrompt + +Sets raw prompt text for this context, mutually exclusive with POM prompt sections. + +#### Signature + +```typescript +setPrompt(prompt: string): this +``` + +#### Parameters + + + The prompt string. + + +#### Returns + +`this` — This context for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 733. + +*** + +### setSystemPrompt + +Sets raw system prompt text, mutually exclusive with system POM sections. + +#### Signature + +```typescript +setSystemPrompt(systemPrompt: string): this +``` + +#### Parameters + + + The system prompt string. + + +#### Returns + +`this` — This context for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 625. + +*** + +### setUserPrompt + +Sets the user prompt text for this context. + +#### Signature + +```typescript +setUserPrompt(userPrompt: string): this +``` + +#### Parameters + + + The user prompt string. + + +#### Returns + +`this` — This context for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 656. + +*** + +### setValidContexts + +Sets which contexts the AI may navigate to from this context. + +#### Signature + +```typescript +setValidContexts(contexts: string[]): this +``` + +#### Parameters + + + List of allowed context names. + + +#### Returns + +`this` — This context for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 595. + +*** + +### setValidSteps + +Sets which steps the AI may navigate to from this context. + +#### Signature + +```typescript +setValidSteps(steps: string[]): this +``` + +#### Parameters + + + List of allowed step names. + + +#### Returns + +`this` — This context for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 605. + +*** + +### toDict + +Serializes this context and all its steps to a plain object for SWML output. + +#### Signature + +```typescript +toDict(): Record +``` + +#### Returns + +`Record` — A dictionary representation of this context. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 854. + +## Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 498. diff --git a/fern/products/sdk-reference/typescript/context-builder/gather-info/index.mdx b/fern/products/sdk-reference/typescript/context-builder/gather-info/index.mdx new file mode 100644 index 0000000000..c0770d6f67 --- /dev/null +++ b/fern/products/sdk-reference/typescript/context-builder/gather-info/index.mdx @@ -0,0 +1,147 @@ +--- +slug: "/reference/typescript/context-builder/gather-info" +title: "GatherInfo" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "ContextBuilder.GatherInfo" + parent: "ContextBuilder" + module: "ContextBuilder" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts" +--- +# `GatherInfo` + +Collects structured information from the user through a series of questions. + +## Signature + +```typescript +class GatherInfo +``` + +## Methods + +### addQuestion + +Adds a question to this gather operation. + +#### Signature + +```typescript +addQuestion(opts: { ...6 fields }): this +``` + +#### Parameters + + + Question configuration including key, question text, and optional type/confirm/prompt/functions. + + + + + + + + + + + + + + +#### Returns + +`this` — This GatherInfo for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 105. + +*** + +### constructor + +Creates a new GatherInfo. + +#### Signature + +```typescript +constructor(opts?: { ...3 fields }): GatherInfo +``` + +#### Parameters + + + Optional output key, completion action, and prompt configuration. + + + + + + + + +#### Returns + +`GatherInfo` + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 94. + +*** + +### getQuestions + +Returns all questions in this gather operation. + +#### Signature + +```typescript +getQuestions(): GatherQuestion[] +``` + +#### Returns + +`GatherQuestion[]` — The array of GatherQuestion instances. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 121. + +*** + +### toDict + +Serializes this gather operation to a plain object for SWML output. + +#### Signature + +```typescript +toDict(): Record +``` + +#### Returns + +`Record` — A dictionary representation of the gather info and its questions. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 137. + +## Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 84. diff --git a/fern/products/sdk-reference/typescript/context-builder/gather-question/index.mdx b/fern/products/sdk-reference/typescript/context-builder/gather-question/index.mdx new file mode 100644 index 0000000000..9ea76b539c --- /dev/null +++ b/fern/products/sdk-reference/typescript/context-builder/gather-question/index.mdx @@ -0,0 +1,117 @@ +--- +slug: "/reference/typescript/context-builder/gather-question" +title: "GatherQuestion" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "ContextBuilder.GatherQuestion" + parent: "ContextBuilder" + module: "ContextBuilder" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts" +--- +# `GatherQuestion` + +Represents a single question within a gather operation. + +## Signature + +```typescript +class GatherQuestion +``` + +## Properties + + + Whether the answer requires user confirmation. + + + + Optional list of SWAIG function names available during this question. + + + + Unique key used to store the answer. + + + + Optional additional prompt context for this question. + + + + The question text presented to the user. + + + + Expected answer type (e.g., "string", "number"). + + +## Methods + +### constructor + +Creates a new GatherQuestion. + +#### Signature + +```typescript +constructor(opts: { ...6 fields }): GatherQuestion +``` + +#### Parameters + + + Question configuration including key, question text, and optional type/confirm/prompt/functions. + + + + + + + + + + + + + + +#### Returns + +`GatherQuestion` + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 51. + +*** + +### toDict + +Serializes this question to a plain object for SWML output. + +#### Signature + +```typescript +toDict(): Record +``` + +#### Returns + +`Record` — A dictionary representation of this question. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 71. + +## Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 33. diff --git a/fern/products/sdk-reference/typescript/context-builder/index.mdx b/fern/products/sdk-reference/typescript/context-builder/index.mdx new file mode 100644 index 0000000000..559358cfa7 --- /dev/null +++ b/fern/products/sdk-reference/typescript/context-builder/index.mdx @@ -0,0 +1,302 @@ +--- +slug: "/reference/typescript/context-builder" +title: "ContextBuilder" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "ContextBuilder" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts" +--- +# `ContextBuilder` + +Builder for multi-step, multi-context AI agent workflows. + +A ContextBuilder owns one or more Contexts; each Context owns an ordered +list of Steps. Only one context and one step is active at a time. Per +chat turn, the runtime injects the current step's instructions as a +system message, then asks the LLM for a response. + +## Native tools auto-injected by the runtime + +When a step (or its enclosing context) declares `validSteps` or +`validContexts`, the runtime auto-injects two native tools so the model +can navigate the flow: + +- `next_step(step: enum)` — present when validSteps is set +- `change_context(context: enum)` — present when validContexts is set + +Their `enum` schemas are rewritten on every turn to match whatever +validSteps / validContexts apply to the current step. You do NOT need +to define these tools yourself; they appear automatically. + +A third native tool — `gather_submit` — is injected during gather\_info +questioning (see Step.setGatherInfo / addGatherQuestion). + +These three names — `next_step`, `change_context`, `gather_submit` — +are reserved. ContextBuilder.validate() will reject any agent that +defines a SWAIG tool with one of these names. + +## Function whitelisting (Step.setFunctions) + +Each step may declare a `functions` whitelist. The whitelist is applied +in-memory at the start of each LLM turn. CRITICALLY: if a step does NOT +declare a `functions` field, it INHERITS the previous step's active set. +See Step.setFunctions() for details and examples. + +## Validation + +Call validate() (or toDict(), which calls it) to check that: + +- At least one context is defined +- A single context must be named "default" +- Every context has at least one step +- validSteps references resolve to real step names (or "next") +- validContexts references resolve to real context names +- gather\_info questions are non-empty and have unique keys +- gather\_info completion\_action targets a reachable step +- No user-defined SWAIG tool collides with a reserved native name + +## Signature + +```typescript +class ContextBuilder +``` + +## Examples + +```typescript +import { AgentBase, ContextBuilder } from '@signalwire/sdk'; + +const agent = new AgentBase({ name: 'support', route: '/' }); + +const contexts = new ContextBuilder(); +const flow = contexts.addContext('default'); + +flow.addStep('greeting') + .setText("Greet the caller and ask if they're an existing customer.") + .setValidSteps(['existing', 'new']); + +flow.addStep('existing') + .setText('Ask for the account number and read it back to confirm.'); + +flow.addStep('new') + .setText('Collect name, email, and reason for calling.'); + +agent.defineContexts(contexts); +``` + +## See Also + +- \- \[Context]\(/docs/sdk-reference/reference/typescript/context-builder/context) + \- \[Step]\(/docs/sdk-reference/reference/typescript/context-builder/step) + \- \[GatherInfo]\(/docs/sdk-reference/reference/typescript/context-builder/gather-info) + \- \[AgentBase.defineContexts]\(/docs/sdk-reference/reference/typescript/agent-base#define-contexts) + +## Constants + + + Reserved tool names auto-injected by the runtime when contexts/steps are present. User-defined SWAIG tools must not collide with these names. ContextBuilder.validate() rejects any agent that registers a user tool sharing one of these names — the runtime would never call the user tool because the native one wins. + + +## Classes + + + + A named context containing ordered steps, prompt configuration, and navigation rules. + + + + Collects structured information from the user through a series of questions. + + + + Represents a single question within a gather operation. + + + + A single step within a context, with prompt content, criteria, function restrictions, and navigation rules. + + + +## Methods + +### addContext + +Adds a new named context to the builder. + +#### Signature + +```typescript +addContext(name: string): Context +``` + +#### Parameters + + + The unique context name. A single-context flow must name its only context `"default"`. + + +#### Returns + +`Context` — The newly created [Context](/docs/sdk-reference/reference/typescript/context-builder/context) for further configuration. + +#### Throws + +- When the max-context limit is exceeded or a context with the same name already exists. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 994. + +*** + +### constructor + +#### Signature + +```typescript +constructor(): ContextBuilder +``` + +#### Returns + +`ContextBuilder` + +*** + +### getContext + +Returns a context by name. + +#### Signature + +```typescript +getContext(name: string): Context | undefined +``` + +#### Parameters + + + The context name to retrieve. + + +#### Returns + +`Context | undefined` — The matching Context, or undefined if not found. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 1010. + +*** + +### reset + +Removes all contexts, returning the builder to its initial state. +Use this in a dynamic config callback when you need to rebuild +contexts from scratch for a specific request. + +#### Signature + +```typescript +reset(): this +``` + +#### Returns + +`this` — This builder for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 979. + +*** + +### toDict + +Validates and serializes all contexts to a plain object for SWML output. + +#### Signature + +```typescript +toDict(): Record +``` + +#### Returns + +`Record` — A dictionary mapping context names to their serialized representations. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 1162. + +*** + +### validate + +Validates that all contexts have steps, naming constraints are met, and cross-context references are valid. + +#### Signature + +```typescript +validate(): void +``` + +#### Returns + +`void` + +#### Throws + +- Error if validation fails. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 1018. + +## Functions + +### createSimpleContext + +Creates a standalone Context instance without a ContextBuilder. + +#### Signature + +```typescript +createSimpleContext(name: string = 'default'): Context +``` + +#### Parameters + + + The context name (defaults to "default"). + + +#### Returns + +`Context` — A new Context instance. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 1179. + +## Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 957. diff --git a/fern/products/sdk-reference/typescript/context-builder/step/index.mdx b/fern/products/sdk-reference/typescript/context-builder/step/index.mdx new file mode 100644 index 0000000000..e3e5211d82 --- /dev/null +++ b/fern/products/sdk-reference/typescript/context-builder/step/index.mdx @@ -0,0 +1,637 @@ +--- +slug: "/reference/typescript/context-builder/step" +title: "Step" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "ContextBuilder.Step" + parent: "ContextBuilder" + module: "ContextBuilder" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts" +--- +# `Step` + +A single step within a context, with prompt content, criteria, function restrictions, and navigation rules. + +## Signature + +```typescript +class Step +``` + +## Properties + + + The unique name identifying this step within its context. + + +## Methods + +### addBullets + +Adds a POM section with bullet points, mutually exclusive with raw text. + +#### Signature + +```typescript +addBullets(title: string, bullets: string[]): this +``` + +#### Parameters + + + The section heading. + + + + The list of bullet point strings. + + +#### Returns + +`this` — This step for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 215. + +*** + +### addGatherQuestion + +Add a question to this step's gather\_info configuration. +setGatherInfo() must be called before this method. + +IMPORTANT — gather mode locks function access: +While the model is asking gather questions, the runtime forcibly +deactivates ALL of the step's other functions. The only callable +tools during a gather question are: + +- `gather_submit` (the native answer-submission tool) +- Whatever names you list in this question's `functions` option + +`next_step` and `change_context` are also filtered out — the model +cannot navigate away until the gather completes. This is by design: +it forces a tight ask → submit → next-question loop. + +If a question needs to call out to a tool (e.g. validate an email, +geocode a ZIP), list that tool name in this question's `functions`. +Functions listed here are active ONLY for this question. + +#### Signature + +```typescript +addGatherQuestion(opts: { ...6 fields }): this +``` + +#### Parameters + + + Question configuration including key, question text, and optional type/confirm/prompt/functions. + + + + + + + + + + + + + + +#### Returns + +`this` — This step for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 366. + +*** + +### addSection + +Adds a POM section with a body, mutually exclusive with raw text. + +#### Signature + +```typescript +addSection(title: string, body: string): this +``` + +#### Parameters + + + The section heading. + + + + The section body text. + + +#### Returns + +`this` — This step for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 203. + +*** + +### clearSections + +Removes all POM sections and raw text from this step. + +#### Signature + +```typescript +clearSections(): this +``` + +#### Returns + +`this` — This step for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 407. + +*** + +### constructor + +Creates a new Step. + +#### Signature + +```typescript +constructor(name: string): Step +``` + +#### Parameters + + + The unique step name. + + +#### Returns + +`Step` + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 182. + +*** + +### setEnd + +Mark this step as terminal for the step flow. + +IMPORTANT: `end=true` does NOT end the conversation or hang up the +call. It exits step mode entirely after this step executes — clearing +the steps list, current step index, validSteps, and validContexts. +The agent keeps running, but operates only under the base system +prompt and the context-level prompt; no more step instructions are +injected and no more `next_step` tool is offered. + +To actually end the call, call a hangup tool or define a hangup hook. + +#### Signature + +```typescript +setEnd(end: boolean): this +``` + +#### Parameters + + + True to exit step mode after this step. + + +#### Returns + +`this` — This step for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 308. + +*** + +### setFunctions + +Set which non-internal functions are callable while this step is active. + +IMPORTANT — inheritance behavior: +If you do NOT call this method, the step inherits whichever function +set was active on the previous step (or the previous context's last +step). The server-side runtime only resets the active set when a +step explicitly declares its `functions` field. This is by design, +but it is the most common source of bugs in multi-step agents: +forgetting setFunctions() on a later step lets the previous step's +tools leak through. + +Best practice: call setFunctions() explicitly on every step that +should have a different toolset than the previous one. + +Keep the per-step active set small: LLM tool selection accuracy +degrades noticeably past ~7-8 simultaneously-active tools per call. +Use per-step whitelisting to partition large tool collections. + +Internal functions (e.g. `startup_hook`, `hangup_hook`, `gather_submit`) +are ALWAYS protected and cannot be deactivated by this whitelist. The +native navigation tools `next_step` and `change_context` are injected +automatically when validSteps/validContexts is set; they are not +affected by this list and do not need to appear in it. + +#### Signature + +```typescript +setFunctions(functions: string | string[]): this +``` + +#### Parameters + + + One of: + + +#### Returns + +`this` — This step for chaining. + +#### Examples + +```typescript +step.setFunctions(['lookup_account', 'check_balance']); // whitelist +step.setFunctions([]); // disable all +step.setFunctions('none'); // disable all (alt) +``` + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 268. + +*** + +### setGatherInfo + +Initializes a gather info operation on this step for collecting structured data. + +#### Signature + +```typescript +setGatherInfo(opts?: { ...3 fields }): this +``` + +#### Parameters + + + Optional output key, completion action, and prompt configuration. + + + + + + + + +#### Returns + +`this` — This step for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 338. + +*** + +### setResetConsolidate + +Sets whether to consolidate conversation history when resetting at this step. + +#### Signature + +```typescript +setResetConsolidate(consolidate: boolean): this +``` + +#### Parameters + + + Whether to consolidate. + + +#### Returns + +`this` — This step for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 438. + +*** + +### setResetFullReset + +Sets whether to perform a full conversation reset at this step. + +#### Signature + +```typescript +setResetFullReset(fullReset: boolean): this +``` + +#### Parameters + + + Whether to fully reset. + + +#### Returns + +`this` — This step for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 448. + +*** + +### setResetSystemPrompt + +Sets the system prompt to use when resetting context at this step. + +#### Signature + +```typescript +setResetSystemPrompt(systemPrompt: string): this +``` + +#### Parameters + + + The replacement system prompt text. + + +#### Returns + +`this` — This step for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 418. + +*** + +### setResetUserPrompt + +Sets the user prompt to use when resetting context at this step. + +#### Signature + +```typescript +setResetUserPrompt(userPrompt: string): this +``` + +#### Parameters + + + The replacement user prompt text. + + +#### Returns + +`this` — This step for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 428. + +*** + +### setSkipToNextStep + +Sets whether to automatically advance to the next step after this one completes. + +#### Signature + +```typescript +setSkipToNextStep(skip: boolean): this +``` + +#### Parameters + + + Whether to skip to the next step. + + +#### Returns + +`this` — This step for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 328. + +*** + +### setSkipUserTurn + +Sets whether to skip waiting for user input when entering this step. + +#### Signature + +```typescript +setSkipUserTurn(skip: boolean): this +``` + +#### Parameters + + + Whether to skip the user turn. + + +#### Returns + +`this` — This step for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 318. + +*** + +### setStepCriteria + +Sets the criteria that must be met before this step is considered complete. + +#### Signature + +```typescript +setStepCriteria(criteria: string): this +``` + +#### Parameters + + + A description of the completion criteria. + + +#### Returns + +`this` — This step for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 226. + +*** + +### setText + +Sets raw text content for this step, mutually exclusive with POM sections. + +#### Signature + +```typescript +setText(text: string): this +``` + +#### Parameters + + + The raw prompt text. + + +#### Returns + +`this` — This step for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 191. + +*** + +### setValidContexts + +Sets which contexts the AI may navigate to from this step. + +#### Signature + +```typescript +setValidContexts(contexts: string[]): this +``` + +#### Parameters + + + List of allowed context names. + + +#### Returns + +`this` — This step for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 288. + +*** + +### setValidSteps + +Sets which steps the AI may navigate to from this step. + +#### Signature + +```typescript +setValidSteps(steps: string[]): this +``` + +#### Parameters + + + List of allowed step names. + + +#### Returns + +`this` — This step for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 278. + +*** + +### toDict + +Serializes this step to a plain object for SWML output. + +#### Signature + +```typescript +toDict(): Record +``` + +#### Returns + +`Record` — A dictionary representation of this step. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 473. + +## Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 160. diff --git a/fern/products/sdk-reference/typescript/data-map/index.mdx b/fern/products/sdk-reference/typescript/data-map/index.mdx new file mode 100644 index 0000000000..3bbe74d1f1 --- /dev/null +++ b/fern/products/sdk-reference/typescript/data-map/index.mdx @@ -0,0 +1,801 @@ +--- +slug: "/reference/typescript/data-map" +title: "DataMap" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "DataMap" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts" +--- +# `DataMap` + +Fluent builder for SWAIG data\_map configurations. + +Creates server-side tool definitions that execute on SignalWire's infrastructure +**without** requiring a webhook endpoint in your application. Ideal for simple +third-party API integrations (REST calls + pattern-matched response shaping). + +## Signature + +```typescript +class DataMap +``` + +## Examples + + + + ```typescript + import { DataMap, FunctionResult } from '@signalwire/sdk'; + + const weather = new DataMap('get_weather') + .purpose('Look up the current weather for a city') + .parameter('city', 'string', 'The city name', true) + .webhook('GET', 'https://api.example.com/weather?city=${args.city}') + .output(new FunctionResult('In ${city} it is ${response.temp}°F and ${response.condition}.')); + + // Register onto an agent: + agent.registerSwaigFunction(weather.toSwaigFunction()); + ``` + + + + ```typescript + new DataMap('classify_intent') + .purpose('Route callers to the right department.') + .parameter('utterance', 'string', 'What the caller said', true) + .expression('${args.utterance}', /billing|invoice|charge/i, new FunctionResult('billing')) + .expression('${args.utterance}', /tech|broken|error/i, new FunctionResult('support')); + ``` + + + +## See Also + +- \- \[FunctionResult]\(/docs/sdk-reference/reference/typescript/function-result) — response shape used in \`.output()\` / \`.expression()\` + \- \[createSimpleApiTool]\(/docs/sdk-reference/reference/typescript/data-map#create-simple-api-tool) — one-liner helper for REST API tools + \- \[AgentBase.defineTool]\(/docs/sdk-reference/reference/typescript/agent-base#define-tool) — alternative for tools that run in your process + +## Properties + + + The name of the SWAIG function this data map defines. + + +## Methods + +### body + +Set the JSON body for the most recently added webhook. + +#### Signature + +```typescript +body(data: Record): this +``` + +#### Parameters + + + The request body object. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/DataMap.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts) + +Line 292. + +*** + +### constructor + +#### Signature + +```typescript +constructor(functionName: string): DataMap +``` + +#### Parameters + + + The unique name for this data map tool. + + +#### Returns + +`DataMap` + +#### Source + +[`src/DataMap.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts) + +Line 109. + +*** + +### description + +Alias for [purpose](/docs/sdk-reference/reference/typescript/data-map#purpose); sets the LLM-facing tool description. + +This string is read by the model to decide WHEN to call this tool. +See [purpose](/docs/sdk-reference/reference/typescript/data-map#purpose) for bad-vs-good examples. + +#### Signature + +```typescript +description(description: string): this +``` + +#### Parameters + + + Prompt-engineering description of when to call this tool. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/DataMap.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts) + +Line 174. + +*** + +### enableEnvExpansion + +Enable `${ENV.*}` variable expansion in URLs, bodies, and outputs. + +#### Signature + +```typescript +enableEnvExpansion(enabled: boolean = true): this +``` + +#### Parameters + + + Whether to enable expansion (defaults to true). + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/DataMap.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts) + +Line 118. + +*** + +### errorKeys + +Set error keys on the most recently added webhook, or globally if no webhook exists. + +#### Signature + +```typescript +errorKeys(keys: string[]): this +``` + +#### Parameters + + + Response keys that indicate an error occurred. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/DataMap.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts) + +Line 351. + +*** + +### expression + +Add a pattern-matching expression that evaluates a test value against a regex. + +#### Signature + +```typescript +expression( + testValue: string, + pattern: string | RegExp, + output: FunctionResult, + nomatchOutput?: FunctionResult +): this +``` + +#### Parameters + + + The string or template variable to test. + + + + A regex pattern (string or RegExp) to match against. + + + + The result to return when the pattern matches. + + + + Optional result to return when the pattern does not match. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/DataMap.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts) + +Line 231. + +*** + +### fallbackOutput + +Set a fallback output used when no webhook or expression matches. + +#### Signature + +```typescript +fallbackOutput(result: FunctionResult): this +``` + +#### Parameters + + + The FunctionResult to use as the fallback. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/DataMap.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts) + +Line 341. + +*** + +### foreach + +Configure iteration over an array in the webhook response. + +#### Signature + +```typescript +foreach(config: { ...4 fields }): this +``` + +#### Parameters + + + Foreach configuration with input/output keys, append template, and optional max. + + + + + + + + + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/DataMap.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts) + +Line 314. + +*** + +### globalErrorKeys + +Set error keys at the top-level data map scope, regardless of webhook context. + +#### Signature + +```typescript +globalErrorKeys(keys: string[]): this +``` + +#### Parameters + + + Response keys that indicate an error occurred. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/DataMap.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts) + +Line 365. + +*** + +### output + +Set the output template for the most recently added webhook. + +#### Signature + +```typescript +output(result: FunctionResult): this +``` + +#### Parameters + + + The FunctionResult to use as the output template. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/DataMap.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts) + +Line 330. + +*** + +### parameter + +Define a parameter for this data-map tool — `description` is READ BY THE LLM. + +Each parameter `description` is rendered into the OpenAI tool schema +under `parameters.properties..description` and sent to the +model. The model uses it to decide HOW to fill in the argument from +user speech. It is **prompt engineering**, not developer FYI. + +##### Bad vs good + +```text +BAD : .parameter('city', 'string', 'the city') +GOOD: .parameter('city', 'string', +'The name of the city to get weather for, e.g. "San Francisco". +Ask the user if they did not provide one. Include the state +or country if the city name is ambiguous.') +``` + +#### Signature + +```typescript +parameter( + name: string, + paramType: string, + description: string, + opts?: { ...2 fields } +): this +``` + +#### Parameters + + + The parameter name (JSON object key). + + + + The JSON Schema type (e.g., "string", "number"). + + + + Prompt-engineering description telling the model how to extract this value from the user's utterance. Read by the LLM. + + + + Optional flags for required and enum constraints. + + + + + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/DataMap.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts) + +Line 203. + +*** + +### params + +Set query or form parameters for the most recently added webhook. + +#### Signature + +```typescript +params(data: Record): this +``` + +#### Parameters + + + The parameters object. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/DataMap.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts) + +Line 303. + +*** + +### purpose + +Set the purpose (description) for this data-map tool — READ BY THE LLM. + +This string is rendered into the OpenAI tool schema `description` +field and sent to the model on every turn. The model uses it to +decide WHEN to call this tool. It is **prompt engineering**, not +developer documentation. + +A vague `purpose()` is the #1 cause of "the model has the right tool +but doesn't call it" failures with data-map tools. + +##### Bad vs good + +```text +BAD : .purpose('weather api') +GOOD: .purpose('Get the current weather conditions and forecast for +a specific city. Use this whenever the user asks about weather, +temperature, rain, or similar conditions in a named location.') +``` + +#### Signature + +```typescript +purpose(description: string): this +``` + +#### Parameters + + + Prompt-engineering description of when to call this tool. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/DataMap.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts) + +Line 160. + +*** + +### registerWithAgent + +Register this DataMap tool with an AgentBase instance. + +#### Signature + +```typescript +registerWithAgent(agent: { ...1 fields }): this +``` + +#### Parameters + + + An object with a registerSwaigFunction method (typically an AgentBase). + + + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/DataMap.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts) + +Line 375. + +*** + +### setAllowedEnvPrefixes + +Set the allowed env var prefixes for this DataMap instance. + +Overrides the global defaults. Only env vars whose names start with +one of these prefixes will be expanded. An empty array allows all. + +#### Signature + +```typescript +setAllowedEnvPrefixes(prefixes: string[]): this +``` + +#### Parameters + + + Array of prefix strings to allow. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/DataMap.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts) + +Line 132. + +*** + +### toSwaigFunction + +Serialize this data map to a SWAIG function definition object. + +#### Signature + +```typescript +toSwaigFunction(): Record +``` + +#### Returns + +`Record` — A plain object suitable for inclusion in the SWML SWAIG array. + +#### Source + +[`src/DataMap.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts) + +Line 384. + +*** + +### webhook + +Add a webhook that is called when this data map tool is invoked. + +#### Signature + +```typescript +webhook(method: string, url: string, opts?: { ...4 fields }): this +``` + +#### Parameters + + + HTTP method (e.g., "GET", "POST"). + + + + The webhook URL to call. + + + + Optional headers, form parameter name, and argument settings. + + + + + + + + + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/DataMap.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts) + +Line 257. + +*** + +### webhookExpressions + +Set pattern-matching expressions on the most recently added webhook. + +#### Signature + +```typescript +webhookExpressions(expressions: Record[]): this +``` + +#### Parameters + + + Array of expression objects to evaluate against the webhook response. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/DataMap.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts) + +Line 281. + +## Functions + +### createExpressionTool + +Create a DataMap tool that evaluates expressions against patterns without making HTTP calls. + +#### Signature + +```typescript +createExpressionTool(opts: { ...3 fields }): DataMap +``` + +#### Parameters + + + Configuration including name, pattern-result pairs, and optional parameters. + + + + + + + + +#### Returns + +`DataMap` — A configured DataMap instance ready for registration. + +#### Source + +[`src/DataMap.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts) + +Line 460. + +*** + +### createSimpleApiTool + +Create a DataMap tool that calls a single API endpoint and formats the response. + +#### Signature + +```typescript +createSimpleApiTool(opts: { ...8 fields }): DataMap +``` + +#### Parameters + + + Configuration including name, URL, response template, and optional parameters. + + + + + + + + + + + + + + + + + + +#### Returns + +`DataMap` — A configured DataMap instance ready for registration. + +#### Source + +[`src/DataMap.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts) + +Line 430. + +*** + +### getAllowedEnvPrefixes + +Get the current global allowed env var prefixes. + +#### Signature + +```typescript +getAllowedEnvPrefixes(): string[] +``` + +#### Returns + +`string[]` — A copy of the current prefix list. + +#### Source + +[`src/DataMap.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts) + +Line 31. + +*** + +### setAllowedEnvPrefixes + +Set the global allowed env var prefixes for `${ENV.*}` expansion. + +Only environment variables whose names start with one of these prefixes +will be expanded. An empty array allows all variables (escape hatch). + +#### Signature + +```typescript +setAllowedEnvPrefixes(prefixes: string[]): void +``` + +#### Parameters + + + Array of prefix strings to allow. + + +#### Returns + +`void` + +#### Source + +[`src/DataMap.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts) + +Line 23. + +## Source + +[`src/DataMap.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts) + +Line 94. diff --git a/fern/products/sdk-reference/typescript/function-result/index.mdx b/fern/products/sdk-reference/typescript/function-result/index.mdx new file mode 100644 index 0000000000..1da97ecdde --- /dev/null +++ b/fern/products/sdk-reference/typescript/function-result/index.mdx @@ -0,0 +1,1788 @@ +--- +slug: "/reference/typescript/function-result" +title: "FunctionResult" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "FunctionResult" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts" +--- +# `FunctionResult` + +Builder for SWAIG function responses. + +Carries response text (what the AI says to the caller) and a list of structured +actions (connect, hangup, SMS, record, transfer, etc.) that the SignalWire platform +executes after the AI speaks. Every mutating method returns `this` for fluent chaining. + +Return an instance (or a promise that resolves to one) from any SWAIG tool handler. + +## Signature + +```typescript +class FunctionResult +``` + +## Examples + + + + ```typescript + agent.defineTool({ + name: 'say_hi', + description: 'Say hello.', + parameters: { type: 'object', properties: {} }, + handler: () => new FunctionResult('Hello there!'), + }); + ``` + + + + ```typescript + agent.defineTool({ + name: 'transfer_to_sales', + description: 'Forward the caller to sales.', + parameters: { type: 'object', properties: {} }, + handler: () => + new FunctionResult('Connecting you to sales now.').connect('+15551112222'), + }); + ``` + + + + ```typescript + new FunctionResult("Thanks, you're all set.") + .sendSms({ toNumber: '+15551234567', fromNumber: '+15559998888', body: 'Confirmation!' }) + .hangup(); + ``` + + + +## See Also + +- \- \[AgentBase.defineTool]\(/docs/sdk-reference/reference/typescript/agent-base#define-tool) — where handlers return a \`FunctionResult\` + \- \[DataMap]\(/docs/sdk-reference/reference/typescript/data-map) — alternative for purely data-driven (no handler) tools + +## Properties + + + Ordered list of actions to execute after the response. + + + + Whether actions should be post-processed after the AI responds. + + + + The text response returned to the AI agent. + + +## Methods + +### addAction + +Append a single named action to the action list. + +#### Signature + +```typescript +addAction(name: string, data: unknown): this +``` + +#### Parameters + + + The action name (e.g., "hangup", "say"). + + + + The action payload. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 122. + +*** + +### addActions + +Append multiple action objects to the action list. + +#### Signature + +```typescript +addActions(actions: Record[]): this +``` + +#### Parameters + + + Array of action objects to append. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 132. + +*** + +### addDynamicHints + +Add dynamic speech recognition hints to improve transcription accuracy. + +#### Signature + +```typescript +addDynamicHints( + hints: string | { ignore_case?: boolean; pattern: string; replace: string }[] +): this +``` + +#### Parameters + + + Array of hint strings or pattern-replacement objects. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 265. + +*** + +### clearDynamicHints + +Remove all previously added dynamic speech hints. + +#### Signature + +```typescript +clearDynamicHints(): this +``` + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 273. + +*** + +### connect + +Connect the call to another destination via SWML transfer. + +#### Signature + +```typescript +connect(destination: string, final: boolean = true, fromAddr?: string): this +``` + +#### Parameters + + + The destination address (phone number or SIP URI). + + + + Whether this is a final transfer that ends the AI session. + + + + Optional caller ID to use for the outbound leg. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 146. + +*** + +### constructor + +#### Signature + +```typescript +constructor(response?: string, postProcess: boolean = false): FunctionResult +``` + +#### Parameters + + + Initial response text; defaults to empty string. + + + + Whether to enable post-processing of actions. + + +#### Returns + +`FunctionResult` + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 88. + +*** + +### createPaymentAction + +Create a payment action for use within a payment prompt. + +**Modifiers:** `static` + +#### Signature + +```typescript +createPaymentAction(actionType: string, phrase: string): PaymentAction +``` + +#### Parameters + + + The action type (e.g., "say", "play"). + + + + The phrase or URL for this action. + + +#### Returns + +`PaymentAction` — A new PaymentAction object. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 900. + +*** + +### createPaymentParameter + +Create a custom payment parameter for the payment connector. + +**Modifiers:** `static` + +#### Signature + +```typescript +createPaymentParameter(name: string, value: string): PaymentParameter +``` + +#### Parameters + + + The parameter name. + + + + The parameter value. + + +#### Returns + +`PaymentParameter` — A new PaymentParameter object. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 910. + +*** + +### createPaymentPrompt + +Create a payment prompt configuration object. + +**Modifiers:** `static` + +#### Signature + +```typescript +createPaymentPrompt( + forSituation: string, + actions: PaymentAction[], + cardType?: string, + errorType?: string +): PaymentPrompt +``` + +#### Parameters + + + The situation this prompt applies to. + + + + Actions to perform for this prompt. + + + + Optional card type filter. + + + + Optional error type this prompt handles. + + +#### Returns + +`PaymentPrompt` — A new PaymentPrompt object. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 882. + +*** + +### enableExtensiveData + +Enable or disable extensive data reporting in function calls. + +#### Signature + +```typescript +enableExtensiveData(enabled: boolean = true): this +``` + +#### Parameters + + + Whether to enable extensive data. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 479. + +*** + +### enableFunctionsOnTimeout + +Control whether functions fire on speaker timeout. + +#### Signature + +```typescript +enableFunctionsOnTimeout(enabled: boolean = true): this +``` + +#### Parameters + + + Whether to enable function execution on timeout. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 450. + +*** + +### executeRpc + +Execute a SignalWire RPC method via SWML. + +#### Signature + +```typescript +executeRpc(opts: { ...4 fields }): this +``` + +#### Parameters + + + RPC parameters including method name and optional call/node IDs. + + + + + + + + + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 737. + +*** + +### executeSwml + +Execute arbitrary SWML content as an action. + +#### Signature + +```typescript +executeSwml( + swmlContent: string | Record | { toDict: unknown }, + transfer: boolean = false +): this +``` + +#### Parameters + + + SWML as a JSON string or object. + + + + Whether this SWML execution should transfer the call. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 342. + +*** + +### hangup + +Hang up the call. + +#### Signature + +```typescript +hangup(): this +``` + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 188. + +*** + +### hold + +Place the call on hold for a specified duration. + +#### Signature + +```typescript +hold(timeout: number = 300): this +``` + +#### Parameters + + + Hold duration in seconds, clamped to 0-900. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 197. + +*** + +### joinConference + +Join a conference by name with optional configuration. + +#### Signature + +```typescript +joinConference(name: string, opts?: { ...17 fields }): this +``` + +#### Parameters + + + The conference name to join. + + + + Optional conference settings such as mute, recording, and callbacks. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 658. + +*** + +### joinRoom + +Join a SignalWire room. + +#### Signature + +```typescript +joinRoom(name: string): this +``` + +#### Parameters + + + The room name to join. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 633. + +*** + +### pay + +Initiate a payment collection flow on the call. + +#### Signature + +```typescript +pay(opts: { ...19 fields }): this +``` + +#### Parameters + + + Payment configuration including connector URL, method, and prompt options. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 813. + +*** + +### playBackgroundFile + +Play an audio file in the background during the call. + +#### Signature + +```typescript +playBackgroundFile(filename: string, wait: boolean = false): this +``` + +#### Parameters + + + URL or path of the audio file. + + + + Whether to wait for playback to complete before continuing. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 243. + +*** + +### recordCall + +Start recording the call. + +#### Signature + +```typescript +recordCall(opts?: { ...11 fields }): this +``` + +#### Parameters + + + Recording options including format, direction, and timeouts. + + + + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 533. + +*** + +### removeGlobalData + +Remove keys from the global data store. + +#### Signature + +```typescript +removeGlobalData(keys: string | string[]): this +``` + +#### Parameters + + + A single key or array of keys to remove. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 312. + +*** + +### removeMetadata + +Remove metadata keys from the current call. + +#### Signature + +```typescript +removeMetadata(keys: string | string[]): this +``` + +#### Parameters + + + A single key or array of keys to remove. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 330. + +*** + +### replaceInHistory + +Replace the function call output in conversation history. + +#### Signature + +```typescript +replaceInHistory(text: string | boolean = true): this +``` + +#### Parameters + + + Replacement text, or true to replace with the response. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 488. + +*** + +### rpcAiMessage + +Send an AI message to another call via RPC. + +#### Signature + +```typescript +rpcAiMessage(callId: string, messageText: string, role: string = 'system'): this +``` + +#### Parameters + + + The target call ID. + + + + The message text to inject. + + + + The message role (defaults to "system"). + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 785. + +*** + +### rpcAiUnhold + +Unhold a call that was previously placed on hold via RPC. + +#### Signature + +```typescript +rpcAiUnhold(callId: string): this +``` + +#### Parameters + + + The target call ID to unhold. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 798. + +*** + +### rpcDial + +Dial a number via RPC, optionally specifying device type. + +#### Signature + +```typescript +rpcDial( + toNumber: string, + fromNumber: string, + destSwml: string, + deviceType: string = 'phone' +): this +``` + +#### Parameters + + + The destination phone number. + + + + The caller ID number. + + + + The SWML destination for the dialed call. + + + + The device type (defaults to "phone"). + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 765. + +*** + +### say + +Speak text to the caller via TTS. + +#### Signature + +```typescript +say(text: string): this +``` + +#### Parameters + + + The text to speak. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 233. + +*** + +### sendSms + +Send an SMS or MMS message from within the call flow. + +#### Signature + +```typescript +sendSms(opts: { ...6 fields }): this +``` + +#### Parameters + + + SMS parameters. Must include either `body` (text SMS) or `media` (MMS) — supplying neither throws. + + + + + + + + + + + + + + +#### Returns + +`this` — This instance for chaining. + +#### Throws + +- When neither `body` nor `media` is provided. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 502. + +*** + +### setEndOfSpeechTimeout + +Set the silence duration that marks the end of a user's speech. + +#### Signature + +```typescript +setEndOfSpeechTimeout(milliseconds: number): this +``` + +#### Parameters + + + Timeout in milliseconds. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 283. + +*** + +### setMetadata + +Set metadata key-value pairs on the current call. + +#### Signature + +```typescript +setMetadata(data: Record): this +``` + +#### Parameters + + + Metadata key-value pairs to set. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 321. + +*** + +### setPostProcess + +Enable or disable post-processing of actions. + +#### Signature + +```typescript +setPostProcess(postProcess: boolean): this +``` + +#### Parameters + + + Whether to post-process actions. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 111. + +*** + +### setResponse + +Set the response text returned to the AI agent. + +#### Signature + +```typescript +setResponse(response: string): this +``` + +#### Parameters + + + The response text. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 101. + +*** + +### setSpeechEventTimeout + +Set the timeout for speech event detection. + +#### Signature + +```typescript +setSpeechEventTimeout(milliseconds: number): this +``` + +#### Parameters + + + Timeout in milliseconds. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 292. + +*** + +### simulateUserInput + +Inject text as if the user had spoken it. + +#### Signature + +```typescript +simulateUserInput(text: string): this +``` + +#### Parameters + + + The simulated user input text. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 470. + +*** + +### sipRefer + +Send a SIP REFER to transfer the call. + +#### Signature + +```typescript +sipRefer(toUri: string): this +``` + +#### Parameters + + + The SIP URI to refer the call to. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 645. + +*** + +### stop + +Stop the AI session. + +#### Signature + +```typescript +stop(): this +``` + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 222. + +*** + +### stopBackgroundFile + +Stop any currently playing background audio file. + +#### Signature + +```typescript +stopBackgroundFile(): this +``` + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 254. + +*** + +### stopRecordCall + +Stop an active call recording. + +#### Signature + +```typescript +stopRecordCall(controlId?: string): this +``` + +#### Parameters + + + Optional control ID of the recording to stop. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 573. + +*** + +### stopTap + +Stop an active media tap. + +#### Signature + +```typescript +stopTap(controlId?: string): this +``` + +#### Parameters + + + Optional control ID of the tap to stop. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 617. + +*** + +### switchContext + +Switch the AI context with optional new prompts and reset options. + +#### Signature + +```typescript +switchContext(opts?: { ...4 fields }): this +``` + +#### Parameters + + + Context switch options including system/user prompts and reset flags. + + + + + + + + + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 412. + +*** + +### swmlChangeContext + +Change the current SWML context. + +#### Signature + +```typescript +swmlChangeContext(contextName: string): this +``` + +#### Parameters + + + The name of the context to switch to. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 391. + +*** + +### swmlChangeStep + +Change the current SWML step. + +#### Signature + +```typescript +swmlChangeStep(stepName: string): this +``` + +#### Parameters + + + The name of the step to switch to. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 382. + +*** + +### swmlTransfer + +Transfer the call to a SWML destination with a custom AI response. + +#### Signature + +```typescript +swmlTransfer(dest: string, aiResponse: string, final: boolean = true): this +``` + +#### Parameters + + + The transfer destination. + + + + The AI response text to set before transferring. + + + + Whether this is a final transfer. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 168. + +*** + +### swmlUserEvent + +Emit a custom user event via SWML. + +#### Signature + +```typescript +swmlUserEvent(eventData: Record): this +``` + +#### Parameters + + + The event payload. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 400. + +*** + +### tap + +Start a media tap to stream audio to an external URI. + +#### Signature + +```typescript +tap(opts: { ...6 fields }): this +``` + +#### Parameters + + + Tap parameters including URI, direction, and codec. + + + + + + + + + + + + + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 587. + +*** + +### toDict + +Serialize this result to a plain object for the SWAIG response. + +#### Signature + +```typescript +toDict(): Record +``` + +#### Returns + +`Record` — A dictionary with response, action, and post\_process fields; falls back to "Action completed." if empty. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 920. + +*** + +### toggleFunctions + +Enable or disable SWAIG functions by name. + +#### Signature + +```typescript +toggleFunctions(toggles: { active: boolean; function: string }[]): this +``` + +#### Parameters + + + Array of function name and active state pairs. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 441. + +*** + +### updateGlobalData + +Merge key-value pairs into the global data store shared across functions. + +#### Signature + +```typescript +updateGlobalData(data: Record): this +``` + +#### Parameters + + + Key-value pairs to set or update. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 303. + +*** + +### updateSettings + +Update AI engine settings at runtime. + +#### Signature + +```typescript +updateSettings(settings: Record): this +``` + +#### Parameters + + + Key-value pairs of settings to update. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 459. + +*** + +### waitForUser + +Wait for user input before continuing. + +#### Signature + +```typescript +waitForUser(opts?: { ...3 fields }): this +``` + +#### Parameters + + + Options controlling wait behavior: enable/disable, timeout, or answer-first mode. + + + + + + + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 206. + +## Interfaces + +### PaymentAction + +A single action within a payment prompt (e.g., say or play). + +#### Signature + +```typescript +interface PaymentAction +``` + +#### Properties + + + The phrase or URL to use for this action. + + + + The action type (e.g., "say", "play"). + + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 21. + +*** + +### PaymentParameter + +A custom key-value parameter passed to the payment connector. + +#### Signature + +```typescript +interface PaymentParameter +``` + +#### Properties + + + The parameter name. + + + + The parameter value. + + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 29. + +*** + +### PaymentPrompt + +Prompt configuration for a payment collection flow. + +#### Signature + +```typescript +interface PaymentPrompt +``` + +#### Properties + + + Actions to perform for this prompt. + + + + Optional card type filter for this prompt. + + + + Optional error type this prompt handles. + + + + The situation this prompt applies to (e.g., "payment-card-number"). + + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 9. + +## Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 76. diff --git a/fern/products/sdk-reference/typescript/generate-verb-types/index.mdx b/fern/products/sdk-reference/typescript/generate-verb-types/index.mdx new file mode 100644 index 0000000000..3121506e50 --- /dev/null +++ b/fern/products/sdk-reference/typescript/generate-verb-types/index.mdx @@ -0,0 +1,25 @@ +--- +slug: "/reference/typescript/generate-verb-types" +title: "generateVerbTypes" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "generateVerbTypes" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/generateVerbTypes.ts" +--- +# `generateVerbTypes` + +## Signature + +```typescript +module generateVerbTypes +``` + +## Source + +[`src/generateVerbTypes.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/generateVerbTypes.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/index.mdx b/fern/products/sdk-reference/typescript/index.mdx new file mode 100644 index 0000000000..56fb6d0e14 --- /dev/null +++ b/fern/products/sdk-reference/typescript/index.mdx @@ -0,0 +1,78 @@ +--- +title: "TypeScript SDK" +slug: "/reference/typescript" +lustri: + auto_generated: true + language: "typescript" + kind: "sdk" +--- +# TypeScript SDK Reference + +## Modules + +- [`addresses`](/docs/sdk-reference/reference/typescript/rest/namespaces/addresses) +- [`agent-loader`](/docs/sdk-reference/reference/typescript/cli/agent-loader) +- [`api_ninjas_trivia`](/docs/sdk-reference/reference/typescript/skills/builtin/api-ninjas-trivia) +- [`ask_claude`](/docs/sdk-reference/reference/typescript/skills/builtin/ask-claude) +- [`builtin`](/docs/sdk-reference/reference/typescript/skills/builtin) +- [`callHandler`](/docs/sdk-reference/reference/typescript/rest/call-handler) +- [`calling`](/docs/sdk-reference/reference/typescript/rest/namespaces/calling) +- [`chat`](/docs/sdk-reference/reference/typescript/rest/namespaces/chat) +- [`claude_skills`](/docs/sdk-reference/reference/typescript/skills/builtin/claude-skills) +- [`closedSets`](/docs/sdk-reference/reference/typescript/relay/closed-sets) +- [`compat`](/docs/sdk-reference/reference/typescript/rest/namespaces/compat) +- [`constants`](/docs/sdk-reference/reference/typescript/relay/constants) +- [`custom_skills`](/docs/sdk-reference/reference/typescript/skills/builtin/custom-skills) +- [`datasphere`](/docs/sdk-reference/reference/typescript/rest/namespaces/datasphere) +- [`datasphere`](/docs/sdk-reference/reference/typescript/skills/builtin/datasphere) +- [`datasphere_serverless`](/docs/sdk-reference/reference/typescript/skills/builtin/datasphere-serverless) +- [`datetime`](/docs/sdk-reference/reference/typescript/skills/builtin/datetime) +- [`fabric`](/docs/sdk-reference/reference/typescript/rest/namespaces/fabric) +- [`generateVerbTypes`](/docs/sdk-reference/reference/typescript/generate-verb-types) +- [`google_maps`](/docs/sdk-reference/reference/typescript/skills/builtin/google-maps) +- [`imported-numbers`](/docs/sdk-reference/reference/typescript/rest/namespaces/imported-numbers) +- [`info_gatherer`](/docs/sdk-reference/reference/typescript/skills/builtin/info-gatherer) +- [`joke`](/docs/sdk-reference/reference/typescript/skills/builtin/joke) +- [`livewire`](/docs/sdk-reference/reference/typescript/livewire) +- [`logs`](/docs/sdk-reference/reference/typescript/rest/namespaces/logs) +- [`lookup`](/docs/sdk-reference/reference/typescript/rest/namespaces/lookup) +- [`math`](/docs/sdk-reference/reference/typescript/skills/builtin/math) +- [`mcp_gateway`](/docs/sdk-reference/reference/typescript/skills/builtin/mcp-gateway) +- [`mfa`](/docs/sdk-reference/reference/typescript/rest/namespaces/mfa) +- [`mock-data`](/docs/sdk-reference/reference/typescript/cli/mock-data) +- [`native_vector_search`](/docs/sdk-reference/reference/typescript/skills/builtin/native-vector-search) +- [`normalize`](/docs/sdk-reference/reference/typescript/relay/normalize) +- [`number-groups`](/docs/sdk-reference/reference/typescript/rest/namespaces/number-groups) +- [`pagination`](/docs/sdk-reference/reference/typescript/rest/pagination) +- [`phone-numbers`](/docs/sdk-reference/reference/typescript/rest/namespaces/phone-numbers) +- [`play_background_file`](/docs/sdk-reference/reference/typescript/skills/builtin/play-background-file) +- [`prefabs`](/docs/sdk-reference/reference/typescript/prefabs) +- [`project`](/docs/sdk-reference/reference/typescript/rest/namespaces/project) +- [`pubsub`](/docs/sdk-reference/reference/typescript/rest/namespaces/pubsub) +- [`queues`](/docs/sdk-reference/reference/typescript/rest/namespaces/queues) +- [`recordings`](/docs/sdk-reference/reference/typescript/rest/namespaces/recordings) +- [`registry`](/docs/sdk-reference/reference/typescript/rest/namespaces/registry) +- [`relay`](/docs/sdk-reference/reference/typescript/relay) +- [`rest`](/docs/sdk-reference/reference/typescript/rest) +- [`SecurityUtils`](/docs/sdk-reference/reference/typescript/security-utils) +- [`short-codes`](/docs/sdk-reference/reference/typescript/rest/namespaces/short-codes) +- [`sip-profile`](/docs/sdk-reference/reference/typescript/rest/namespaces/sip-profile) +- [`SkillName`](/docs/sdk-reference/reference/typescript/skills/skill-name) +- [`skills`](/docs/sdk-reference/reference/typescript/skills) +- [`spider`](/docs/sdk-reference/reference/typescript/skills/builtin/spider) +- [`swaig-test`](/docs/sdk-reference/reference/typescript/cli/swaig-test) +- [`swml_transfer`](/docs/sdk-reference/reference/typescript/skills/builtin/swml-transfer) +- [`SWMLHandler`](/docs/sdk-reference/reference/typescript/swml-handler) +- [`SwmlVerbMethods.generated`](/docs/sdk-reference/reference/typescript/swml-verb-methods.generated) +- [`TypeInference`](/docs/sdk-reference/reference/typescript/type-inference) +- [`types`](/docs/sdk-reference/reference/typescript/relay/types) +- [`types`](/docs/sdk-reference/reference/typescript/rest/types) +- [`types`](/docs/sdk-reference/reference/typescript/types) +- [`verified-callers`](/docs/sdk-reference/reference/typescript/rest/namespaces/verified-callers) +- [`video`](/docs/sdk-reference/reference/typescript/rest/namespaces/video) +- [`weather_api`](/docs/sdk-reference/reference/typescript/skills/builtin/weather-api) +- [`web_search`](/docs/sdk-reference/reference/typescript/skills/builtin/web-search) +- [`WebhookMiddleware`](/docs/sdk-reference/reference/typescript/webhook-middleware) +- [`WebhookValidator`](/docs/sdk-reference/reference/typescript/webhook-validator) +- [`wikipedia_search`](/docs/sdk-reference/reference/typescript/skills/builtin/wikipedia-search) + diff --git a/fern/products/sdk-reference/typescript/list-skills-with-params.mdx b/fern/products/sdk-reference/typescript/list-skills-with-params.mdx new file mode 100644 index 0000000000..39281e2469 --- /dev/null +++ b/fern/products/sdk-reference/typescript/list-skills-with-params.mdx @@ -0,0 +1,34 @@ +--- +slug: "/reference/typescript/list-skills-with-params" +title: "listSkillsWithParams" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "function" + language: "typescript" + qualified_name: "listSkillsWithParams" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/index.ts" +--- +# `listSkillsWithParams` + +Get full schema for all registered skills, including parameter metadata. + +Equivalent to Python's `list_skills_with_params()`. Useful for GUI +configuration tools, API documentation, and programmatic skill discovery. + +## Signature + +```typescript +listSkillsWithParams(): Record +``` + +## Returns + +`Record` — Map of skill name to `schema info`. + +## Source + +[`src/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/index.ts) + +Line 293. diff --git a/fern/products/sdk-reference/typescript/list-skills.mdx b/fern/products/sdk-reference/typescript/list-skills.mdx new file mode 100644 index 0000000000..95e89a30ea --- /dev/null +++ b/fern/products/sdk-reference/typescript/list-skills.mdx @@ -0,0 +1,36 @@ +--- +slug: "/reference/typescript/list-skills" +title: "listSkills" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "function" + language: "typescript" + qualified_name: "listSkills" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/index.ts" +--- +# `listSkills` + +List metadata for all registered skills. + +Equivalent to Python's `list_skills()` — proxies to the singleton +[SkillRegistry](/docs/sdk-reference/reference/typescript/skills/skill-registry). Python's version returns a plain dict keyed by +skill name; this returns an array of `_SkillSchemaInfo` entries +(the TS shape is richer and includes the name field). + +## Signature + +```typescript +listSkills(): SkillSchemaInfo[] +``` + +## Returns + +`SkillSchemaInfo[]` — Array of skill metadata entries. + +## Source + +[`src/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/index.ts) + +Line 281. diff --git a/fern/products/sdk-reference/typescript/livewire/agent-handoff/index.mdx b/fern/products/sdk-reference/typescript/livewire/agent-handoff/index.mdx new file mode 100644 index 0000000000..13a3c20765 --- /dev/null +++ b/fern/products/sdk-reference/typescript/livewire/agent-handoff/index.mdx @@ -0,0 +1,53 @@ +--- +slug: "/reference/typescript/livewire/agent-handoff" +title: "AgentHandoff" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "livewire.AgentHandoff" + parent: "livewire" + module: "livewire" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" +--- +# `AgentHandoff` + +Signals a handoff to another agent in multi-agent scenarios. + +## Signature + +```typescript +class AgentHandoff +``` + +## Properties + + + Target agent that should take over the conversation. + + + + Optional return value surfaced when the handoff completes. + + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(): AgentHandoff +``` + +#### Returns + +`AgentHandoff` + +## Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 741. diff --git a/fern/products/sdk-reference/typescript/livewire/agent-server/index.mdx b/fern/products/sdk-reference/typescript/livewire/agent-server/index.mdx new file mode 100644 index 0000000000..6f2b14e140 --- /dev/null +++ b/fern/products/sdk-reference/typescript/livewire/agent-server/index.mdx @@ -0,0 +1,117 @@ +--- +slug: "/reference/typescript/livewire/agent-server" +title: "AgentServer" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "livewire.AgentServer" + parent: "livewire" + module: "livewire" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" +--- +# `AgentServer` + +Mirrors a LiveKit AgentServer -- registers entrypoints and starts. + +Usage: +const server = new AgentServer(); +server.setupFnc = async (proc) => \{ ... \}; + +// Bare decorator usage: +server.rtcSession(myEntryFn); + +// Parameterized decorator usage: +server.rtcSession(\{ agentName: 'myAgent' \})(myEntryFn); + +cli.runApp(server); + +## Signature + +```typescript +class AgentServer +``` + +## Properties + + + Optional prewarm hook called before the entrypoint. Mirrors Python's setup\_fnc. + + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(_opts?: any): AgentServer +``` + +#### Parameters + + + +#### Returns + +`AgentServer` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 988. + +*** + +### rtcSession + +Decorator that registers the session entrypoint. + +Supports both bare and parameterized usage: +server.rtcSession(fn) // bare +server.rtcSession(fn, \{ agentName: 'x' \}) // with opts, explicit fn +server.rtcSession(\{ agentName: 'x' \})(fn) // parameterized decorator +@server.rtcSession // decorator (bare) +@server.rtcSession(\{ agentName: 'x' \}) // decorator (parameterized) + +#### Signature + +```typescript +rtcSession( + fnOrOpts?: (ctx: JobContext) => Promise | { agentName?: string; onRequest?: (args: any[]) => any | null; onSessionEnd?: (args: any[]) => any | null; type?: string }, + opts?: { ...4 fields } +): void | (fn: (ctx: JobContext) => Promise) => (ctx: JobContext) => Promise +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`void | (fn: (ctx: JobContext) => Promise) => (ctx: JobContext) => Promise` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 1000. + +## Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 978. diff --git a/fern/products/sdk-reference/typescript/livewire/agent-session/index.mdx b/fern/products/sdk-reference/typescript/livewire/agent-session/index.mdx new file mode 100644 index 0000000000..05cae5c0e2 --- /dev/null +++ b/fern/products/sdk-reference/typescript/livewire/agent-session/index.mdx @@ -0,0 +1,289 @@ +--- +slug: "/reference/typescript/livewire/agent-session" +title: "AgentSession" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "livewire.AgentSession" + parent: "livewire" + module: "livewire" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" +--- +# `AgentSession` + +Mirrors a LiveKit `AgentSession` — binds an [Agent](/docs/sdk-reference/reference/typescript/livewire/agent) to SignalWire. + +Call [AgentSession.start](/docs/sdk-reference/reference/typescript/livewire/agent-session#start) with an `Agent` to construct an internal +[AgentBase](/docs/sdk-reference/reference/typescript/agent-base) and begin serving SWML. Pipeline-related options are +accepted for API parity but are no-ops server-side. + +## Signature + +```typescript +class AgentSession +``` + +## Type Parameters + + + +## Properties + + + Conversation history entries captured over the session's lifetime. + + + + Current per-session user data. Set by the constructor or via the setter. + + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(options?: { ...14 fields }): AgentSession +``` + +#### Type Parameters + + + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`AgentSession` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 436. + +*** + +### generateReply + +Trigger the agent to generate a reply, optionally with extra instructions. + +#### Signature + +```typescript +generateReply(options?: { ...1 fields }): void +``` + +#### Parameters + + + Generation options. + + + Extra instructions injected as a new prompt section before the next LLM turn. + + + +#### Returns + +`void` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 619. + +*** + +### getSwAgent + +Return the underlying SignalWire [AgentBase](/docs/sdk-reference/reference/typescript/agent-base). Useful for tests and +advanced use cases that need to reach past the LiveKit facade. + +#### Signature + +```typescript +getSwAgent(): AgentBase | undefined +``` + +#### Returns + +`AgentBase | undefined` — The wrapped `AgentBase`, or `undefined` before [start](/docs/sdk-reference/reference/typescript/livewire/agent-session#start). + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 669. + +*** + +### interrupt + +Interrupt current speech. **No-op** on SignalWire — barge-in is handled +automatically by the control plane. + +#### Signature + +```typescript +interrupt(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 629. + +*** + +### say + +Queue text to be spoken by the agent. + +Before [start](/docs/sdk-reference/reference/typescript/livewire/agent-session#start) is called, text is buffered and injected at start +time as the agent's initial greeting. After start, text is added as an +additional prompt section. + +#### Signature + +```typescript +say(text: string): void +``` + +#### Parameters + + + Line for the agent to speak. + + +#### Returns + +`void` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 602. + +*** + +### start + +Start the session by binding the agent to a freshly-constructed +[AgentBase](/docs/sdk-reference/reference/typescript/agent-base), mapping LiveKit-style options onto SignalWire AI params. + +Must be called before any other method on this session. The underlying +`AgentBase` is not started here — use [runApp](/docs/sdk-reference/reference/typescript/livewire#run-app) or an `AgentServer` +to serve it. + +#### Signature + +```typescript +start(params: { ...3 fields }): Promise +``` + +#### Parameters + + + Start parameters. + + + The [Agent](/docs/sdk-reference/reference/typescript/livewire/agent) to bind. + + + + Call-recording flag placeholder; ignored on SignalWire. + + + + LiveKit room placeholder; ignored on SignalWire. + + + +#### Returns + +`Promise` — Resolves once the underlying `AgentBase` has been built. + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 514. + +*** + +### updateAgent + +Swap the [Agent](/docs/sdk-reference/reference/typescript/livewire/agent) bound to this session. + +Preserves the underlying `AgentBase` but replaces its prompt with the new +agent's instructions. + +#### Signature + +```typescript +updateAgent(agent: Agent): void +``` + +#### Parameters + + + Replacement agent. + + +#### Returns + +`void` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 641. + +## Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 420. diff --git a/fern/products/sdk-reference/typescript/livewire/agent/index.mdx b/fern/products/sdk-reference/typescript/livewire/agent/index.mdx new file mode 100644 index 0000000000..22d509c00d --- /dev/null +++ b/fern/products/sdk-reference/typescript/livewire/agent/index.mdx @@ -0,0 +1,376 @@ +--- +slug: "/reference/typescript/livewire/agent" +title: "Agent" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "livewire.Agent" + parent: "livewire" + module: "livewire" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" +--- +# `Agent` + +Mirrors a LiveKit `voice.Agent` — holds instructions and tool definitions. + +Pipeline options (`stt`, `tts`, `vad`, `llm`, `turnDetection`) are accepted +for API parity but are **no-ops** — SignalWire's control plane handles the +entire AI pipeline server-side. Set instructions and tools; everything else +just logs once and continues. + +## Signature + +```typescript +class Agent +``` + +## Type Parameters + + + +## Examples + +```typescript +import { livewire } from '@signalwire/sdk'; + +const timeTool = livewire.tool({ + description: 'Return the current time.', + execute: () => new Date().toISOString(), +}); + +const agent = new livewire.Agent({ + instructions: 'You are a friendly helper.', + tools: [{ ...timeTool, name: 'time' }], +}); + +const session = new livewire.AgentSession(); +await session.start({ agent }); +``` + +## Properties + + + System instructions passed through to the SignalWire AI prompt. + + + + The currently-bound [AgentSession](/docs/sdk-reference/reference/typescript/livewire/agent-session), or `undefined` until [AgentSession.start](/docs/sdk-reference/reference/typescript/livewire/agent-session#start) is called. + + + + Registered tools keyed by name. Mutated by [updateTools](/docs/sdk-reference/reference/typescript/livewire/agent#update-tools). + + + + Arbitrary per-session user data passed to tool handlers via [RunContext.userData](/docs/sdk-reference/reference/typescript/livewire/run-context#user-data). + + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(options?: { ...13 fields }): Agent +``` + +#### Type Parameters + + + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`Agent` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 182. + +*** + +### llmNode + +LiveKit-compatible LLM node. **No-op** on SignalWire — the control plane +handles LLM inference server-side. + +#### Signature + +```typescript +llmNode( + _chatCtx?: unknown, + _tools?: unknown, + _modelSettings?: unknown +): Promise +``` + +#### Parameters + + + Chat context (ignored). + + + + Tool list (ignored). + + + + Model settings (ignored). + + +#### Returns + +`Promise` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 315. + +*** + +### onEnter + +Lifecycle hook called when the agent enters an active call. +Override in a subclass to run setup logic — the default is a no-op. + +#### Signature + +```typescript +onEnter(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 271. + +*** + +### onExit + +Lifecycle hook called when the agent exits (call ended or handoff). +Override in a subclass to run teardown logic — the default is a no-op. + +#### Signature + +```typescript +onExit(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 277. + +*** + +### onUserTurnCompleted + +Lifecycle hook called when the user finishes speaking. +Override in a subclass to inspect / mutate the turn context before the +LLM responds — the default is a no-op. + +#### Signature + +```typescript +onUserTurnCompleted(_turnCtx?: unknown, _newMessage?: unknown): Promise +``` + +#### Parameters + + + Turn context (LiveKit shape; passed through opaquely). + + + + Newly-captured user message. + + +#### Returns + +`Promise` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 287. + +*** + +### sttNode + +LiveKit-compatible STT node. **No-op** on SignalWire — the control plane +handles speech recognition server-side. + +#### Signature + +```typescript +sttNode(_audio?: unknown, _modelSettings?: unknown): Promise +``` + +#### Parameters + + + Audio input (ignored). + + + + Model settings (ignored). + + +#### Returns + +`Promise` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 300. + +*** + +### ttsNode + +LiveKit-compatible TTS node. **No-op** on SignalWire — the control plane +handles text-to-speech server-side. + +#### Signature + +```typescript +ttsNode(_text?: unknown, _modelSettings?: unknown): Promise +``` + +#### Parameters + + + Text to synthesise (ignored). + + + + Model settings (ignored). + + +#### Returns + +`Promise` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 329. + +*** + +### updateInstructions + +Update the agent's instructions mid-session. + +#### Signature + +```typescript +updateInstructions(instructions: string): Promise +``` + +#### Parameters + + + New system-instructions string for the agent. + + +#### Returns + +`Promise` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 345. + +*** + +### updateTools + +Update the agent's tool list mid-session. + +Replaces the current tool record with one built from the given array, +keyed by `tool.name`. Useful for dynamic tool injection based on +conversation state. + +#### Signature + +```typescript +updateTools(tools: FunctionTool[]): Promise +``` + +#### Parameters + + + Ordered array of [FunctionTool](/docs/sdk-reference/reference/typescript/livewire#function-tool) definitions. Each tool's `name` is used as its map key. + + +#### Returns + +`Promise` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 359. + +## Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 163. diff --git a/fern/products/sdk-reference/typescript/livewire/chat-context/index.mdx b/fern/products/sdk-reference/typescript/livewire/chat-context/index.mdx new file mode 100644 index 0000000000..95363305c5 --- /dev/null +++ b/fern/products/sdk-reference/typescript/livewire/chat-context/index.mdx @@ -0,0 +1,85 @@ +--- +slug: "/reference/typescript/livewire/chat-context" +title: "ChatContext" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "livewire.ChatContext" + parent: "livewire" + module: "livewire" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" +--- +# `ChatContext` + +Minimal `ChatContext` matching LiveKit's `ChatContext`. + +## Signature + +```typescript +class ChatContext +``` + +## Properties + + + Ordered chat messages, each `{ role, content }`. + + +## Methods + +### append + +Append a chat message. + +#### Signature + +```typescript +append(options: { ...2 fields }): this +``` + +#### Parameters + + + Message content. + + + Speaker role (`"user"`, `"assistant"`, or `"system"`). Defaults to `"user"`. + + + + Message text. Defaults to `""`. + + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 1232. + +*** + +### constructor + +#### Signature + +```typescript +constructor(): ChatContext +``` + +#### Returns + +`ChatContext` + +## Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 1219. diff --git a/fern/products/sdk-reference/typescript/livewire/index.mdx b/fern/products/sdk-reference/typescript/livewire/index.mdx new file mode 100644 index 0000000000..108fc2a288 --- /dev/null +++ b/fern/products/sdk-reference/typescript/livewire/index.mdx @@ -0,0 +1,394 @@ +--- +slug: "/reference/typescript/livewire" +title: "livewire" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "livewire" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" +--- +# `livewire` + +## Signature + +```typescript +module livewire +``` + +## Constants + + + + + LiveKit cli namespace equivalent. + + + + + + LiveKit llm namespace equivalent. + + + + Rotating "Did you know?" tips printed to stderr by the LiveWire banner. Exported for tests; reorder or extend to change what's displayed. + + + + LiveKit voice namespace equivalent. + + +## Classes + + + + Mirrors a LiveKit `voice.Agent` — holds instructions and tool definitions. + + + + Signals a handoff to another agent in multi-agent scenarios. + + + + Mirrors a LiveKit AgentServer -- registers entrypoints and starts. + + + + Mirrors a LiveKit `AgentSession` — binds an [Agent](/docs/sdk-reference/reference/typescript/livewire/agent) to SignalWire. + + + + Minimal `ChatContext` matching LiveKit's `ChatContext`. + + + + Mirrors a LiveKit `JobContext` — provides room and connection info to the entry-point callback registered via [defineAgent](/docs/sdk-reference/reference/typescript/livewire#define-agent). + + + + Mirrors a LiveKit `JobProcess` — placeholder for prewarm / setup hooks. + + + + NoopTracker ensures each informational message is logged at most once, preventing spam when the same noop path is exercised repeatedly. + + + + Stub `Room` — SignalWire does not use the LiveKit room abstraction. + + + + Mirrors a LiveKit `RunContext` — passed to tool handlers so they can read the current session, call handle, and user data. + + + + Stub class mirroring LiveKit's `ServerOptions`. + + + + Signals that a tool should not trigger another LLM reply. + + + + Error thrown from a tool to signal failure back to the LLM. + + + + Stub class mirroring LiveKit's `WorkerOptions`. + + + +## Modules + + + + Stub inference types matching LiveKit's `inference` namespace. + + + + Stub providers matching common LiveKit plugin packages. + + + +## Functions + +### defineAgent + +Mirrors `@livekit/agents.defineAgent()`. + +Packages an entry function (plus an optional prewarm hook) for later +execution by [runApp](/docs/sdk-reference/reference/typescript/livewire#run-app). Pass-through — no side effects. + +#### Signature + +```typescript +defineAgent( + agent: { ...2 fields } +): { entry: (ctx: JobContext) => Promise; prewarm?: (proc: JobProcess) => any } +``` + +#### Parameters + + + Entry and (optional) prewarm functions. + + + Main callback invoked with a [JobContext](/docs/sdk-reference/reference/typescript/livewire/job-context) when the agent runs. + + + + Optional prewarm callback invoked with a [JobProcess](/docs/sdk-reference/reference/typescript/livewire/job-process) before `entry`. + + + +#### Returns + +`{ entry: (ctx: JobContext) => Promise; prewarm?: (proc: JobProcess) => any }` — The same record (pass-through), typed consistently. + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 865. + +*** + +### handoff + +Create an [AgentHandoff](/docs/sdk-reference/reference/typescript/livewire/agent-handoff) descriptor for multi-agent scenarios. + +#### Signature + +```typescript +handoff(options: { ...2 fields }): AgentHandoff +``` + +#### Parameters + + + Handoff parameters. + + + Agent to transfer control to. + + + + Optional string returned to the current agent when the handoff completes. + + + +#### Returns + +`AgentHandoff` — A handoff descriptor that can be returned from a tool handler. + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 729. + +*** + +### printBanner + +Print the ASCII banner to stderr, using ANSI cyan when stderr is a TTY. + +#### Signature + +```typescript +printBanner(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 30. + +*** + +### printTip + +#### Signature + +```typescript +printTip(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 59. + +*** + +### runApp + +Mirrors `cli.runApp()` from `@livekit/agents-js`. + +1. Prints the LiveWire banner +2. Runs the registered prewarm callback (if any) with a fresh [JobProcess](/docs/sdk-reference/reference/typescript/livewire/job-process) +3. Creates a fresh [JobContext](/docs/sdk-reference/reference/typescript/livewire/job-context) +4. Prints a random tip +5. Invokes the entry function with the context +6. Starts the underlying SignalWire `AgentBase` once the entry function + binds one (via an `AgentSession.start()` call) + +Accepts either an object `{ entry, prewarm? }`, a bare entry function, or +an [AgentServer](/docs/sdk-reference/reference/typescript/agent-server) instance. + +#### Signature + +```typescript +runApp(options: any): void +``` + +#### Parameters + + + Agent descriptor, entry function, or `AgentServer`. + + +#### Returns + +`void` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 892. + +*** + +### tool + +Create a tool definition — mirrors `llm.tool()` from `@livekit/agents-js`. + +The returned tool has an empty `name` — the caller assigns it when the tool +is attached to an agent's tools map (see the [Agent](/docs/sdk-reference/reference/typescript/livewire/agent) example). + +#### Signature + +```typescript +tool

(options: { ...3 fields }): FunctionTool +``` + +#### Type Parameters + + + Parameter type passed into `execute`. + + +#### Parameters + + + Tool configuration. + + + Human-readable tool description exposed to the LLM. + + + + Handler invoked when the LLM calls the tool. + + + + JSON Schema or Zod schema describing the tool's inputs. + + + +#### Returns + +`FunctionTool` — A [FunctionTool](/docs/sdk-reference/reference/typescript/livewire#function-tool) ready to be attached to an agent. + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 691. + +## Interfaces + +### FunctionTool + +A tool definition that can be registered on an [Agent](/docs/sdk-reference/reference/typescript/livewire/agent). + +#### Signature + +```typescript +interface FunctionTool +``` + +#### Properties + + + Human-readable description shown to the LLM. + + + + Handler invoked by the platform when the LLM calls this tool. + + + + Tool name. Populated when the tool is attached to an `Agent.tools` map. + + + + JSON schema (or Zod schema passthrough) for the tool's parameters. + + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 122. + +*** + +### VoiceOptions + +Voice configuration options passed through to the SignalWire AI config. + +#### Signature + +```typescript +interface VoiceOptions +``` + +#### Properties + + + TTS engine identifier (e.g. `"google"`, `"elevenlabs"`). + + + + BCP-47 language code (e.g. `"en-US"`). + + + + TTS voice identifier (e.g. `"en-US-Standard-A"`). + + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 108. + +## Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/livewire/inference/index.mdx b/fern/products/sdk-reference/typescript/livewire/inference/index.mdx new file mode 100644 index 0000000000..2eef19b25b --- /dev/null +++ b/fern/products/sdk-reference/typescript/livewire/inference/index.mdx @@ -0,0 +1,49 @@ +--- +slug: "/reference/typescript/livewire/inference" +title: "inference" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "livewire.inference" + parent: "livewire" + module: "livewire" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" +--- +# `inference` + +Stub inference types matching LiveKit's `inference` namespace. + +None of these run inference on the client — SignalWire performs STT / LLM / +TTS in its control plane. These classes exist so LiveKit code that imports +and instantiates them still compiles. + +## Signature + +```typescript +module inference +``` + +## Classes + + + + LiveKit inference-LLM stub. Captures the model name; runs no inference locally. + + + + LiveKit inference-STT stub. Captures the model name; runs no inference locally. + + + + LiveKit inference-TTS stub. Captures the model name; runs no inference locally. + + + +## Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 1158. diff --git a/fern/products/sdk-reference/typescript/livewire/inference/llm/index.mdx b/fern/products/sdk-reference/typescript/livewire/inference/llm/index.mdx new file mode 100644 index 0000000000..de1dad0472 --- /dev/null +++ b/fern/products/sdk-reference/typescript/livewire/inference/llm/index.mdx @@ -0,0 +1,65 @@ +--- +slug: "/reference/typescript/livewire/inference/llm" +title: "LLM" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "livewire.inference.LLM" + parent: "livewire.inference" + module: "livewire.inference" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" +--- +# `LLM` + +LiveKit inference-LLM stub. Captures the model name; runs no inference locally. + +## Signature + +```typescript +class LLM +``` + +## Properties + + + Model identifier captured from the constructor. + + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(model: string = '', _opts?: any): LLM +``` + +#### Parameters + + + Model identifier (captured). + + + + Additional options (ignored). + + +#### Returns + +`LLM` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 1184. + +## Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 1177. diff --git a/fern/products/sdk-reference/typescript/livewire/inference/stt/index.mdx b/fern/products/sdk-reference/typescript/livewire/inference/stt/index.mdx new file mode 100644 index 0000000000..560c9e5aa4 --- /dev/null +++ b/fern/products/sdk-reference/typescript/livewire/inference/stt/index.mdx @@ -0,0 +1,65 @@ +--- +slug: "/reference/typescript/livewire/inference/stt" +title: "STT" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "livewire.inference.STT" + parent: "livewire.inference" + module: "livewire.inference" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" +--- +# `STT` + +LiveKit inference-STT stub. Captures the model name; runs no inference locally. + +## Signature + +```typescript +class STT +``` + +## Properties + + + Model identifier captured from the constructor. + + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(model: string = '', _opts?: any): STT +``` + +#### Parameters + + + Model identifier (captured). + + + + Additional options (ignored). + + +#### Returns + +`STT` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 1167. + +## Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 1160. diff --git a/fern/products/sdk-reference/typescript/livewire/inference/tts/index.mdx b/fern/products/sdk-reference/typescript/livewire/inference/tts/index.mdx new file mode 100644 index 0000000000..41e2bda370 --- /dev/null +++ b/fern/products/sdk-reference/typescript/livewire/inference/tts/index.mdx @@ -0,0 +1,65 @@ +--- +slug: "/reference/typescript/livewire/inference/tts" +title: "TTS" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "livewire.inference.TTS" + parent: "livewire.inference" + module: "livewire.inference" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" +--- +# `TTS` + +LiveKit inference-TTS stub. Captures the model name; runs no inference locally. + +## Signature + +```typescript +class TTS +``` + +## Properties + + + Model identifier captured from the constructor. + + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(model: string = '', _opts?: any): TTS +``` + +#### Parameters + + + Model identifier (captured). + + + + Additional options (ignored). + + +#### Returns + +`TTS` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 1197. + +## Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 1190. diff --git a/fern/products/sdk-reference/typescript/livewire/job-context/index.mdx b/fern/products/sdk-reference/typescript/livewire/job-context/index.mdx new file mode 100644 index 0000000000..9dbde4010d --- /dev/null +++ b/fern/products/sdk-reference/typescript/livewire/job-context/index.mdx @@ -0,0 +1,116 @@ +--- +slug: "/reference/typescript/livewire/job-context" +title: "JobContext" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "livewire.JobContext" + parent: "livewire" + module: "livewire" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" +--- +# `JobContext` + +Mirrors a LiveKit `JobContext` — provides room and connection info to the +entry-point callback registered via [defineAgent](/docs/sdk-reference/reference/typescript/livewire#define-agent). + +## Signature + +```typescript +class JobContext +``` + +## Properties + + + Shared [JobProcess](/docs/sdk-reference/reference/typescript/livewire/job-process) instance for prewarm-to-entry data passing. + + + + Placeholder [Room](/docs/sdk-reference/reference/typescript/livewire/room) (see class docs). + + +## Methods + +### connect + +Connect to the platform. **No-op** on SignalWire — the control plane +manages connection lifecycle automatically. + +#### Signature + +```typescript +connect(): Promise +``` + +#### Returns + +`Promise` — Resolves immediately. + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 827. + +*** + +### constructor + +#### Signature + +```typescript +constructor(): JobContext +``` + +#### Returns + +`JobContext` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 816. + +*** + +### waitForParticipant + +Wait for a participant to join. **No-op** on SignalWire — returns an +immediate stub participant. + +#### Signature + +```typescript +waitForParticipant(options?: { ...1 fields }): Promise +``` + +#### Parameters + + + Participant match options. + + + Requested identity; echoed back in the stub. Defaults to `"caller"`. + + + +#### Returns + +`Promise` — A stub participant `{ identity }` record. + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 843. + +## Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 808. diff --git a/fern/products/sdk-reference/typescript/livewire/job-process/index.mdx b/fern/products/sdk-reference/typescript/livewire/job-process/index.mdx new file mode 100644 index 0000000000..212180f0d2 --- /dev/null +++ b/fern/products/sdk-reference/typescript/livewire/job-process/index.mdx @@ -0,0 +1,52 @@ +--- +slug: "/reference/typescript/livewire/job-process" +title: "JobProcess" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "livewire.JobProcess" + parent: "livewire" + module: "livewire" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" +--- +# `JobProcess` + +Mirrors a LiveKit `JobProcess` — placeholder for prewarm / setup hooks. + +On SignalWire the control plane pre-warms infrastructure at scale, so this +class carries no real state beyond the LiveKit-compatible `userData` bag. + +## Signature + +```typescript +class JobProcess +``` + +## Properties + + + Mutable bag shared across prewarm and entry-point callbacks. + + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(): JobProcess +``` + +#### Returns + +`JobProcess` + +## Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 780. diff --git a/fern/products/sdk-reference/typescript/livewire/noop-tracker/index.mdx b/fern/products/sdk-reference/typescript/livewire/noop-tracker/index.mdx new file mode 100644 index 0000000000..95121f08ff --- /dev/null +++ b/fern/products/sdk-reference/typescript/livewire/noop-tracker/index.mdx @@ -0,0 +1,124 @@ +--- +slug: "/reference/typescript/livewire/noop-tracker" +title: "NoopTracker" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "livewire.NoopTracker" + parent: "livewire" + module: "livewire" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" +--- +# `NoopTracker` + +NoopTracker ensures each informational message is logged at most once, +preventing spam when the same noop path is exercised repeatedly. + +## Signature + +```typescript +class NoopTracker +``` + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(): NoopTracker +``` + +#### Returns + +`NoopTracker` + +*** + +### hasLogged + +Expose whether a key has been logged (for testing). + +#### Signature + +```typescript +hasLogged(key: string): boolean +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 88. + +*** + +### once + +Log the given message the first time this key is seen. + +#### Signature + +```typescript +once(key: string, message: string): void +``` + +#### Parameters + + + Dedup key. Subsequent calls with the same key are silent. + + + + Message to write to stderr on first occurrence. + + +#### Returns + +`void` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 81. + +*** + +### reset + +Reset all tracked keys (for testing). + +#### Signature + +```typescript +reset(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 93. + +## Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 72. diff --git a/fern/products/sdk-reference/typescript/livewire/plugins/cartesia-tts/index.mdx b/fern/products/sdk-reference/typescript/livewire/plugins/cartesia-tts/index.mdx new file mode 100644 index 0000000000..1a083bc694 --- /dev/null +++ b/fern/products/sdk-reference/typescript/livewire/plugins/cartesia-tts/index.mdx @@ -0,0 +1,55 @@ +--- +slug: "/reference/typescript/livewire/plugins/cartesia-tts" +title: "CartesiaTTS" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "livewire.plugins.CartesiaTTS" + parent: "livewire.plugins" + module: "livewire.plugins" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" +--- +# `CartesiaTTS` + +LiveKit Cartesia-TTS plugin stub. No-op on SignalWire. + +## Signature + +```typescript +class CartesiaTTS +``` + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(_opts?: any): CartesiaTTS +``` + +#### Parameters + + + Cartesia options (ignored). + + +#### Returns + +`CartesiaTTS` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 1105. + +## Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 1103. diff --git a/fern/products/sdk-reference/typescript/livewire/plugins/deepgram-stt/index.mdx b/fern/products/sdk-reference/typescript/livewire/plugins/deepgram-stt/index.mdx new file mode 100644 index 0000000000..87467076ec --- /dev/null +++ b/fern/products/sdk-reference/typescript/livewire/plugins/deepgram-stt/index.mdx @@ -0,0 +1,55 @@ +--- +slug: "/reference/typescript/livewire/plugins/deepgram-stt" +title: "DeepgramSTT" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "livewire.plugins.DeepgramSTT" + parent: "livewire.plugins" + module: "livewire.plugins" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" +--- +# `DeepgramSTT` + +LiveKit Deepgram-STT plugin stub. No-op on SignalWire. + +## Signature + +```typescript +class DeepgramSTT +``` + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(_opts?: any): DeepgramSTT +``` + +#### Parameters + + + Deepgram options (ignored). + + +#### Returns + +`DeepgramSTT` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 1075. + +## Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 1073. diff --git a/fern/products/sdk-reference/typescript/livewire/plugins/eleven-labs-tts/index.mdx b/fern/products/sdk-reference/typescript/livewire/plugins/eleven-labs-tts/index.mdx new file mode 100644 index 0000000000..76113e058e --- /dev/null +++ b/fern/products/sdk-reference/typescript/livewire/plugins/eleven-labs-tts/index.mdx @@ -0,0 +1,55 @@ +--- +slug: "/reference/typescript/livewire/plugins/eleven-labs-tts" +title: "ElevenLabsTTS" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "livewire.plugins.ElevenLabsTTS" + parent: "livewire.plugins" + module: "livewire.plugins" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" +--- +# `ElevenLabsTTS` + +LiveKit ElevenLabs-TTS plugin stub. No-op on SignalWire. + +## Signature + +```typescript +class ElevenLabsTTS +``` + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(_opts?: any): ElevenLabsTTS +``` + +#### Parameters + + + ElevenLabs options (ignored). + + +#### Returns + +`ElevenLabsTTS` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 1116. + +## Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 1114. diff --git a/fern/products/sdk-reference/typescript/livewire/plugins/index.mdx b/fern/products/sdk-reference/typescript/livewire/plugins/index.mdx new file mode 100644 index 0000000000..e84329874e --- /dev/null +++ b/fern/products/sdk-reference/typescript/livewire/plugins/index.mdx @@ -0,0 +1,57 @@ +--- +slug: "/reference/typescript/livewire/plugins" +title: "plugins" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "livewire.plugins" + parent: "livewire" + module: "livewire" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" +--- +# `plugins` + +Stub providers matching common LiveKit plugin packages. + +None of these do anything — they exist so LiveKit code that imports and +constructs these classes still compiles and runs under SignalWire. The +first construction of each logs an advisory to stderr. + +## Signature + +```typescript +module plugins +``` + +## Classes + + + + LiveKit Cartesia-TTS plugin stub. No-op on SignalWire. + + + + LiveKit Deepgram-STT plugin stub. No-op on SignalWire. + + + + LiveKit ElevenLabs-TTS plugin stub. No-op on SignalWire. + + + + LiveKit OpenAI-LLM plugin stub. + + + + LiveKit Silero-VAD plugin stub. No-op on SignalWire. + + + +## Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 1071. diff --git a/fern/products/sdk-reference/typescript/livewire/plugins/open-aillm/index.mdx b/fern/products/sdk-reference/typescript/livewire/plugins/open-aillm/index.mdx new file mode 100644 index 0000000000..8436b71e04 --- /dev/null +++ b/fern/products/sdk-reference/typescript/livewire/plugins/open-aillm/index.mdx @@ -0,0 +1,64 @@ +--- +slug: "/reference/typescript/livewire/plugins/open-aillm" +title: "OpenAILLM" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "livewire.plugins.OpenAILLM" + parent: "livewire.plugins" + module: "livewire.plugins" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" +--- +# `OpenAILLM` + +LiveKit OpenAI-LLM plugin stub. + +The `model` string is captured and mapped to the SignalWire AI `model` +param by [AgentSession.start](/docs/sdk-reference/reference/typescript/livewire/agent-session#start). Other options are ignored. + +## Signature + +```typescript +class OpenAILLM +``` + +## Properties + + + Model identifier captured from the constructor options. + + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(_opts?: any): OpenAILLM +``` + +#### Parameters + + + OpenAI options. `_opts.model` is captured; everything else ignored. + + +#### Returns + +`OpenAILLM` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 1093. + +## Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 1089. diff --git a/fern/products/sdk-reference/typescript/livewire/plugins/silero-vad/index.mdx b/fern/products/sdk-reference/typescript/livewire/plugins/silero-vad/index.mdx new file mode 100644 index 0000000000..e22c5b6c58 --- /dev/null +++ b/fern/products/sdk-reference/typescript/livewire/plugins/silero-vad/index.mdx @@ -0,0 +1,82 @@ +--- +slug: "/reference/typescript/livewire/plugins/silero-vad" +title: "SileroVAD" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "livewire.plugins.SileroVAD" + parent: "livewire.plugins" + module: "livewire.plugins" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" +--- +# `SileroVAD` + +LiveKit Silero-VAD plugin stub. No-op on SignalWire. + +## Signature + +```typescript +class SileroVAD +``` + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(_opts?: Record): SileroVAD +``` + +#### Parameters + + + Silero VAD options (ignored). + + +#### Returns + +`SileroVAD` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 1127. + +*** + +### load + +Load a Silero VAD model. + +**No-op** on SignalWire — returns a fresh stub instance and emits a +one-time advisory to stderr. + +**Modifiers:** `static` + +#### Signature + +```typescript +load(): SileroVAD +``` + +#### Returns + +`SileroVAD` — A new `SileroVAD` stub. + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 1137. + +## Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 1125. diff --git a/fern/products/sdk-reference/typescript/livewire/room/index.mdx b/fern/products/sdk-reference/typescript/livewire/room/index.mdx new file mode 100644 index 0000000000..a6e538f359 --- /dev/null +++ b/fern/products/sdk-reference/typescript/livewire/room/index.mdx @@ -0,0 +1,52 @@ +--- +slug: "/reference/typescript/livewire/room" +title: "Room" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "livewire.Room" + parent: "livewire" + module: "livewire" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" +--- +# `Room` + +Stub `Room` — SignalWire does not use the LiveKit room abstraction. + +Present purely for API parity so LiveKit-shaped code compiles; its only +meaningful attribute is the constant name. + +## Signature + +```typescript +class Room +``` + +## Properties + + + Always `"livewire-room"` — SignalWire has no per-call room identity. + + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(): Room +``` + +#### Returns + +`Room` + +## Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 795. diff --git a/fern/products/sdk-reference/typescript/livewire/run-context/index.mdx b/fern/products/sdk-reference/typescript/livewire/run-context/index.mdx new file mode 100644 index 0000000000..7d85ac503a --- /dev/null +++ b/fern/products/sdk-reference/typescript/livewire/run-context/index.mdx @@ -0,0 +1,97 @@ +--- +slug: "/reference/typescript/livewire/run-context" +title: "RunContext" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "livewire.RunContext" + parent: "livewire" + module: "livewire" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" +--- +# `RunContext` + +Mirrors a LiveKit `RunContext` — passed to tool handlers so they can +read the current session, call handle, and user data. + +## Signature + +```typescript +class RunContext +``` + +## Type Parameters + + + +## Properties + + + Opaque function-call descriptor (LiveKit shape; passed through untouched). + + + + The owning [AgentSession](/docs/sdk-reference/reference/typescript/livewire/agent-session), when one is bound. + + + + Opaque speech-turn handle (LiveKit shape; passed through untouched). + + + + Per-session user data, or an empty object when no session is bound. + + +## Methods + +### constructor + +#### Signature + +```typescript +constructor( + session?: AgentSession, + options?: { ...2 fields } +): RunContext +``` + +#### Type Parameters + + + +#### Parameters + + + Owning session, when available. + + + + Optional pass-through values. + + + Opaque LiveKit function-call descriptor. + + + + Opaque LiveKit speech handle. + + + +#### Returns + +`RunContext` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 390. + +## Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 376. diff --git a/fern/products/sdk-reference/typescript/livewire/server-options/index.mdx b/fern/products/sdk-reference/typescript/livewire/server-options/index.mdx new file mode 100644 index 0000000000..1cab6dc444 --- /dev/null +++ b/fern/products/sdk-reference/typescript/livewire/server-options/index.mdx @@ -0,0 +1,58 @@ +--- +slug: "/reference/typescript/livewire/server-options" +title: "ServerOptions" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "livewire.ServerOptions" + parent: "livewire" + module: "livewire" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" +--- +# `ServerOptions` + +Stub class mirroring LiveKit's `ServerOptions`. + +Accepts any configuration for source-compatibility with LiveKit code; +SignalWire ignores these settings. + +## Signature + +```typescript +class ServerOptions +``` + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(_opts?: any): ServerOptions +``` + +#### Parameters + + + LiveKit-shaped server options (ignored). + + +#### Returns + +`ServerOptions` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 956. + +## Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 954. diff --git a/fern/products/sdk-reference/typescript/livewire/stop-response/index.mdx b/fern/products/sdk-reference/typescript/livewire/stop-response/index.mdx new file mode 100644 index 0000000000..dff921d6a6 --- /dev/null +++ b/fern/products/sdk-reference/typescript/livewire/stop-response/index.mdx @@ -0,0 +1,59 @@ +--- +slug: "/reference/typescript/livewire/stop-response" +title: "StopResponse" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "livewire.StopResponse" + parent: "livewire" + module: "livewire" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" +--- +# `StopResponse` + +Signals that a tool should not trigger another LLM reply. + +## Signature + +```typescript +class StopResponse extends Error +``` + +## Inheritance + +**Extends:** `Error` + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(message?: string): StopResponse +``` + +#### Parameters + + + Optional error message. Defaults to `"StopResponse"`. + + +#### Returns + +`StopResponse` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 753. + +## Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 749. diff --git a/fern/products/sdk-reference/typescript/livewire/tool-error/index.mdx b/fern/products/sdk-reference/typescript/livewire/tool-error/index.mdx new file mode 100644 index 0000000000..bbb7b77054 --- /dev/null +++ b/fern/products/sdk-reference/typescript/livewire/tool-error/index.mdx @@ -0,0 +1,59 @@ +--- +slug: "/reference/typescript/livewire/tool-error" +title: "ToolError" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "livewire.ToolError" + parent: "livewire" + module: "livewire" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" +--- +# `ToolError` + +Error thrown from a tool to signal failure back to the LLM. + +## Signature + +```typescript +class ToolError extends Error +``` + +## Inheritance + +**Extends:** `Error` + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(message: string): ToolError +``` + +#### Parameters + + + Error message surfaced to the LLM. + + +#### Returns + +`ToolError` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 764. + +## Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 760. diff --git a/fern/products/sdk-reference/typescript/livewire/worker-options/index.mdx b/fern/products/sdk-reference/typescript/livewire/worker-options/index.mdx new file mode 100644 index 0000000000..0e7f9170ae --- /dev/null +++ b/fern/products/sdk-reference/typescript/livewire/worker-options/index.mdx @@ -0,0 +1,58 @@ +--- +slug: "/reference/typescript/livewire/worker-options" +title: "WorkerOptions" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "livewire.WorkerOptions" + parent: "livewire" + module: "livewire" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" +--- +# `WorkerOptions` + +Stub class mirroring LiveKit's `WorkerOptions`. + +Accepts any configuration for source-compatibility with LiveKit code; +SignalWire ignores these settings. + +## Signature + +```typescript +class WorkerOptions +``` + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(_opts?: any): WorkerOptions +``` + +#### Parameters + + + LiveKit-shaped worker options (ignored). + + +#### Returns + +`WorkerOptions` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 945. + +## Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 943. diff --git a/fern/products/sdk-reference/typescript/logger/index.mdx b/fern/products/sdk-reference/typescript/logger/index.mdx new file mode 100644 index 0000000000..957fd5385b --- /dev/null +++ b/fern/products/sdk-reference/typescript/logger/index.mdx @@ -0,0 +1,492 @@ +--- +slug: "/reference/typescript/logger" +title: "Logger" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "Logger" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/Logger.ts" +--- +# `Logger` + +Structured logger that respects global level, format, and color settings. + +## Signature + +```typescript +class Logger +``` + +## Methods + +### bind + +Create a child logger with additional bound context fields merged into the parent's context. + +#### Signature + +```typescript +bind(context: Record): Logger +``` + +#### Parameters + + + Key-value pairs to merge into the child logger's context. + + +#### Returns + +`Logger` — A new Logger instance with the merged context. + +#### Source + +[`src/Logger.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/Logger.ts) + +Line 238. + +*** + +### constructor + +Create a new Logger instance. + +#### Signature + +```typescript +constructor(name: string, context?: Record): Logger +``` + +#### Parameters + + + Logger name shown in log output. + + + + Optional key-value pairs included in every log entry. + + +#### Returns + +`Logger` + +#### Source + +[`src/Logger.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/Logger.ts) + +Line 228. + +*** + +### debug + +Log a message at the debug level. + +#### Signature + +```typescript +debug(msg: string, data?: Record): void +``` + +#### Parameters + + + The log message. + + + + Optional structured data to include. + + +#### Returns + +`void` + +#### Source + +[`src/Logger.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/Logger.ts) + +Line 247. + +*** + +### error + +Log a message at the error level. + +#### Signature + +```typescript +error(msg: string, data?: Record): void +``` + +#### Parameters + + + The log message. + + + + Optional structured data to include. + + +#### Returns + +`void` + +#### Source + +[`src/Logger.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/Logger.ts) + +Line 274. + +*** + +### info + +Log a message at the info level. + +#### Signature + +```typescript +info(msg: string, data?: Record): void +``` + +#### Parameters + + + The log message. + + + + Optional structured data to include. + + +#### Returns + +`void` + +#### Source + +[`src/Logger.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/Logger.ts) + +Line 256. + +*** + +### warn + +Log a message at the warn level. + +#### Signature + +```typescript +warn(msg: string, data?: Record): void +``` + +#### Parameters + + + The log message. + + + + Optional structured data to include. + + +#### Returns + +`void` + +#### Source + +[`src/Logger.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/Logger.ts) + +Line 265. + +## Functions + +### getExecutionMode + +Detect the execution environment, matching Python SDK's detection logic. + +#### Signature + +```typescript +getExecutionMode(): [string, "default" | "off" | "stderr"] +``` + +#### Returns + +`[string, "default" | "off" | "stderr"]` — A tuple of \[environment\_name, derived\_log\_mode]. + +#### Source + +[`src/Logger.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/Logger.ts) + +Line 29. + +*** + +### getLogger + +Create or retrieve a cached Logger instance with the given name. + +#### Signature + +```typescript +getLogger(name: string): Logger +``` + +#### Parameters + + + Logger name shown in log output. + + +#### Returns + +`Logger` — A Logger instance (cached by name). + +#### Source + +[`src/Logger.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/Logger.ts) + +Line 346. + +*** + +### resetLoggingConfiguration + +Reset all logging settings to their environment-variable-based defaults. + +#### Signature + +```typescript +resetLoggingConfiguration(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/Logger.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/Logger.ts) + +Line 142. + +*** + +### setGlobalLogColor + +Enable or disable ANSI color codes in text-format output. + +#### Signature + +```typescript +setGlobalLogColor(enabled: boolean): void +``` + +#### Parameters + + + True to enable colors, false to disable. + + +#### Returns + +`void` + +#### Source + +[`src/Logger.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/Logger.ts) + +Line 129. + +*** + +### setGlobalLogFormat + +Set the output format for all loggers. + +#### Signature + +```typescript +setGlobalLogFormat(format: LogFormat): void +``` + +#### Parameters + + + Either 'text' (human-readable) or 'json' (structured). + + +#### Returns + +`void` + +#### Source + +[`src/Logger.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/Logger.ts) + +Line 121. + +*** + +### setGlobalLogLevel + +Set the minimum log level for all loggers. + +Takes a [LogLevel](/docs/sdk-reference/reference/typescript/logger#log-level) (`'debug' | 'info' | 'warn' | 'error'`) — the +closed, port-owned set (the keys of the internal severity table). It is +developer input with no Python counterpart and no open-ended wire/reference +source, so the parameter is typed closed: editor autocompletion plus a typo +such as `'debgu'` is a compile-time error rather than a silent no-op. (The +env-var path, `SIGNALWIRE_LOG_LEVEL`, is necessarily untyped and still +tolerates an arbitrary string defensively at runtime.) + +#### Signature + +```typescript +setGlobalLogLevel(level: "debug" | "info" | "warn" | "error"): void +``` + +#### Parameters + + + The minimum severity level to emit. + + +#### Returns + +`void` + +#### Source + +[`src/Logger.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/Logger.ts) + +Line 105. + +*** + +### setGlobalLogStream + +Set the output stream for all loggers. + +#### Signature + +```typescript +setGlobalLogStream(stream: LogStream): void +``` + +#### Parameters + + + Either 'stdout' (default) or 'stderr'. + + +#### Returns + +`void` + +#### Source + +[`src/Logger.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/Logger.ts) + +Line 137. + +*** + +### stripControlChars + +Strip control characters from all string values in a data record to prevent +log injection attacks. Mirrors Python SDK's `strip_control_chars` structlog +processor. Processes nested objects and arrays recursively. + +#### Signature + +```typescript +stripControlChars(data: T): T +``` + +#### Type Parameters + + + +#### Parameters + + + The record whose string values should be sanitized. + + +#### Returns + +`T` — A shallow copy of `data` with control characters removed from strings. + +#### Source + +[`src/Logger.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/Logger.ts) + +Line 182. + +*** + +### suppressAllLogs + +Suppress or unsuppress all log output globally. + +#### Signature + +```typescript +suppressAllLogs(suppress: boolean = true): void +``` + +#### Parameters + + + True to suppress, false to restore (default true). + + +#### Returns + +`void` + +#### Source + +[`src/Logger.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/Logger.ts) + +Line 113. + +## Type Aliases + +### LogLevel + +Log severity level — the closed set this Logger emits and filters on. + +`'warn'` (not `'warning'`) matches the keys of `LEVELS` and the +`Logger.warn()` method; the Python reference's logger has no `set_log_level` +counterpart (this setter is a documented TS addition — see +`PORT_ADDITIONS.md`), so the canonical set is this port's own. + +#### Signature + +```typescript +type LogLevel = keyof typeof LEVELS +``` + +#### Source + +[`src/Logger.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/Logger.ts) + +Line 19. + +## Source + +[`src/Logger.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/Logger.ts) + +Line 219. diff --git a/fern/products/sdk-reference/typescript/parameter-schema/index.mdx b/fern/products/sdk-reference/typescript/parameter-schema/index.mdx new file mode 100644 index 0000000000..b94762abe7 --- /dev/null +++ b/fern/products/sdk-reference/typescript/parameter-schema/index.mdx @@ -0,0 +1,721 @@ +--- +slug: "/reference/typescript/parameter-schema" +title: "ParameterSchema" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "ParameterSchema" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts" +--- +# `ParameterSchema` + +Fluent builder producing a [ParameterSchemaObject](/docs/sdk-reference/reference/typescript/parameter-schema#parameter-schema-object) byte-identical to +the equivalent hand-written `parameters` blob. Every method returns `this` +for chaining; call `build` to obtain the plain object to hand to +`defineTool`/`defineTypedTool`. + +Insertion order is preserved: properties appear in the order their methods +were called (matching a hand-written object literal), and `required` lists +names in the order `required` received them. + +## Signature + +```typescript +class ParameterSchema +``` + +## Constants + + + Recording direction for the SWAIG `record_call` verb — Tier-1 closed set (`function_result.py:918`). NOTE: distinct from [TAP\_DIRECTIONS](/docs/sdk-reference/reference/typescript/parameter-schema#tap-directions) — record uses `listen`, tap uses `hear` (never unify; see journal §3 "three direction vocabularies"). Used by [ParameterSchema.recordDirection](/docs/sdk-reference/reference/typescript/parameter-schema#record-direction). + + + + Recording format for the SWAIG `record_call` verb — the strongly-grounded Tier-1 closed set (`function_result.py:914` `raise ValueError`-validated; SWML `$defs/RecordCall.format`). Used by [ParameterSchema.recordFormat](/docs/sdk-reference/reference/typescript/parameter-schema#record-format). + + + + Tap media codec for the SWAIG `tap` verb — Tier-1 closed set (`function_result.py:1218`). The 2-value SWAIG tap codec, distinct from the 7-value RELAY connect/stream codec superset (never reuse). Used by [ParameterSchema.codec](/docs/sdk-reference/reference/typescript/parameter-schema#codec). + + + + Tap direction for the SWAIG `tap` verb — Tier-1 closed set (`function_result.py:1213`). Uses `hear`, NOT record's `listen`. Used by [ParameterSchema.tapDirection](/docs/sdk-reference/reference/typescript/parameter-schema#tap-direction). + + +## Methods + +### array + +Add an `array` property. + +#### Signature + +```typescript +array( + name: string, + items?: Record, + description: string = '' +): this +``` + +#### Parameters + + + Parameter name. + + + + JSON-Schema for the array's element type (e.g. `{ type: 'string' }`). Omit for an untyped array. + + + + LLM-facing description. + + +#### Returns + +`this` — This builder, for chaining. + +#### Source + +[`src/ParameterSchema.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts) + +Line 196. + +*** + +### boolean + +Add a `boolean` property. + +#### Signature + +```typescript +boolean( + name: string, + description: string = '', + extra?: Record +): this +``` + +#### Parameters + + + + + + + +#### Returns + +`this` + +#### See Also + +- \[[property](/docs/sdk-reference/reference/typescript/parameter-schema#property)]\(xref://[property](/docs/sdk-reference/reference/typescript/parameter-schema#property)) + +#### Source + +[`src/ParameterSchema.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts) + +Line 183. + +*** + +### build + +Materialise the JSON-Schema `object`. Produces +`{ type: 'object', properties: {…} }`, plus `required: [...]` only when at +least one property was marked required — exactly matching a hand-written +blob (an omitted `required` is the same as `defineTool` receiving none). + +#### Signature + +```typescript +build(): ParameterSchemaObject +``` + +#### Returns + +`ParameterSchemaObject` — A fresh [ParameterSchemaObject](/docs/sdk-reference/reference/typescript/parameter-schema#parameter-schema-object); safe to mutate without affecting the builder. + +#### Source + +[`src/ParameterSchema.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts) + +Line 284. + +*** + +### codec + +Add a `tap` **codec** property (`enum: ['PCMU','PCMA']`) — the 2-value +SWAIG tap codec (NOT the 7-value RELAY superset). + +#### Signature + +```typescript +codec(name: string, description: string = ''): this +``` + +#### Parameters + + + + + +#### Returns + +`this` + +#### See Also + +- \[[TAP\_CODECS](/docs/sdk-reference/reference/typescript/parameter-schema#tap-codecs)]\(xref://[TAP\_CODECS](/docs/sdk-reference/reference/typescript/parameter-schema#tap-codecs)) + +#### Source + +[`src/ParameterSchema.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts) + +Line 256. + +*** + +### constructor + +#### Signature + +```typescript +constructor(): ParameterSchema +``` + +#### Returns + +`ParameterSchema` + +*** + +### enum + +Add a `string` property constrained to a closed set of values, rendered as +`enum:[...]` — the JSON-Schema form the model and the SignalWire validator +both honour. This is the typed-closed-set affordance: pass one of the +exported Tier-1 value arrays ([RECORD\_FORMATS](/docs/sdk-reference/reference/typescript/parameter-schema#record-formats) etc.) or any literal +list, and the values land verbatim in `enum`. + +#### Signature + +```typescript +enum( + name: string, + values: readonly unknown[], + description: string = '', + type: ParameterType = 'string' +): this +``` + +#### Parameters + + + Parameter name. + + + + The allowed values (a `readonly` array — the `as const` Tier-1 arrays are accepted directly). Emitted as `enum`, in order. + + + + LLM-facing description. + + + + The JSON-Schema base type for the enum (default `'string'`). + + +#### Returns + +`this` — This builder, for chaining. + +#### Source + +[`src/ParameterSchema.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts) + +Line 215. + +*** + +### integer + +Add an `integer` property. + +#### Signature + +```typescript +integer( + name: string, + description: string = '', + extra?: Record +): this +``` + +#### Parameters + + + + + + + +#### Returns + +`this` + +#### See Also + +- \[[property](/docs/sdk-reference/reference/typescript/parameter-schema#property)]\(xref://[property](/docs/sdk-reference/reference/typescript/parameter-schema#property)) + +#### Source + +[`src/ParameterSchema.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts) + +Line 173. + +*** + +### number + +Add a `number` (float) property. + +#### Signature + +```typescript +number( + name: string, + description: string = '', + extra?: Record +): this +``` + +#### Parameters + + + + + + + +#### Returns + +`this` + +#### See Also + +- \[[property](/docs/sdk-reference/reference/typescript/parameter-schema#property)]\(xref://[property](/docs/sdk-reference/reference/typescript/parameter-schema#property)) + +#### Source + +[`src/ParameterSchema.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts) + +Line 178. + +*** + +### property + +Add a property with an explicit JSON-Schema `type`. + +#### Signature + +```typescript +property( + name: string, + type: ParameterType, + description: string = '', + extra?: Record +): this +``` + +#### Parameters + + + Parameter name (the JSON key the model emits). + + + + JSON-Schema scalar type keyword. + + + + LLM-facing description (prompt engineering; tells the model HOW to fill this argument). Defaults to `''` to match a hand-written entry that omits a description. + + + + Additional JSON-Schema keywords merged into the property verbatim (`enum`, `minLength`, `pattern`, `format`, `items`, …). + + +#### Returns + +`this` — This builder, for chaining. + +#### Source + +[`src/ParameterSchema.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts) + +Line 157. + +*** + +### recordDirection + +Add a `record_call` **direction** property +(`enum: ['speak','listen','both']`). Uses record's `listen` (not tap's +`hear`). + +#### Signature + +```typescript +recordDirection(name: string, description: string = ''): this +``` + +#### Parameters + + + + + +#### Returns + +`this` + +#### See Also + +- \[[RECORD\_DIRECTIONS](/docs/sdk-reference/reference/typescript/parameter-schema#record-directions)]\(xref://[RECORD\_DIRECTIONS](/docs/sdk-reference/reference/typescript/parameter-schema#record-directions)) + +#### Source + +[`src/ParameterSchema.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts) + +Line 240. + +*** + +### recordFormat + +Add a `record_call` **format** property (`enum: ['wav','mp3','mp4']`) — the +Tier-1 closed set baked in. + +#### Signature + +```typescript +recordFormat(name: string, description: string = ''): this +``` + +#### Parameters + + + + + +#### Returns + +`this` + +#### See Also + +- \[[RECORD\_FORMATS](/docs/sdk-reference/reference/typescript/parameter-schema#record-formats)]\(xref://[RECORD\_FORMATS](/docs/sdk-reference/reference/typescript/parameter-schema#record-formats)) + +#### Source + +[`src/ParameterSchema.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts) + +Line 231. + +*** + +### required + +Mark one or more already-added properties as required. Names are appended +to the `required` array in the order received; duplicates are ignored. +Required-ness is independent of property order — call this at any point. + +#### Signature + +```typescript +required(...names: string[]): this +``` + +#### Parameters + + + Parameter names to require. + + +#### Returns + +`this` — This builder, for chaining. + +#### Source + +[`src/ParameterSchema.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts) + +Line 268. + +*** + +### string + +Add a `string` property. + +#### Signature + +```typescript +string( + name: string, + description: string = '', + extra?: Record +): this +``` + +#### Parameters + + + + + + + +#### Returns + +`this` + +#### See Also + +- \[[property](/docs/sdk-reference/reference/typescript/parameter-schema#property)]\(xref://[property](/docs/sdk-reference/reference/typescript/parameter-schema#property)) + +#### Source + +[`src/ParameterSchema.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts) + +Line 168. + +*** + +### tapDirection + +Add a `tap` **direction** property (`enum: ['speak','hear','both']`). Uses +tap's `hear` (not record's `listen`). + +#### Signature + +```typescript +tapDirection(name: string, description: string = ''): this +``` + +#### Parameters + + + + + +#### Returns + +`this` + +#### See Also + +- \[[TAP\_DIRECTIONS](/docs/sdk-reference/reference/typescript/parameter-schema#tap-directions)]\(xref://[TAP\_DIRECTIONS](/docs/sdk-reference/reference/typescript/parameter-schema#tap-directions)) + +#### Source + +[`src/ParameterSchema.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts) + +Line 248. + +## Functions + +### paramSchema + +Create a new [ParameterSchema](/docs/sdk-reference/reference/typescript/parameter-schema) builder — the idiomatic entry point. + +#### Signature + +```typescript +paramSchema(): ParameterSchema +``` + +#### Returns + +`ParameterSchema` — A fresh, empty builder. + +#### Examples + +```typescript +const params = paramSchema() + .string('service', 'The service to look up') + .codec('media_codec', 'Audio codec for the tap') + .required('service') + .build(); +``` + +#### Source + +[`src/ParameterSchema.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts) + +Line 308. + +## Type Aliases + +### ParameterType + +The JSON-Schema scalar `type` keywords a SWAIG parameter property may use. + +#### Signature + +```typescript +type ParameterType = "string" | "number" | "integer" | "boolean" | "array" | "object" +``` + +#### Source + +[`src/ParameterSchema.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts) + +Line 104. + +*** + +### RecordDirection + +A single [RECORD\_DIRECTIONS](/docs/sdk-reference/reference/typescript/parameter-schema#record-directions) value. + +#### Signature + +```typescript +type RecordDirection = typeof RECORD_DIRECTIONS[number] +``` + +#### Source + +[`src/ParameterSchema.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts) + +Line 82. + +*** + +### RecordFormat + +A single [RECORD\_FORMATS](/docs/sdk-reference/reference/typescript/parameter-schema#record-formats) value. + +#### Signature + +```typescript +type RecordFormat = typeof RECORD_FORMATS[number] +``` + +#### Source + +[`src/ParameterSchema.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts) + +Line 72. + +*** + +### TapCodec + +A single [TAP\_CODECS](/docs/sdk-reference/reference/typescript/parameter-schema#tap-codecs) value. + +#### Signature + +```typescript +type TapCodec = typeof TAP_CODECS[number] +``` + +#### Source + +[`src/ParameterSchema.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts) + +Line 101. + +*** + +### TapDirection + +A single [TAP\_DIRECTIONS](/docs/sdk-reference/reference/typescript/parameter-schema#tap-directions) value. + +#### Signature + +```typescript +type TapDirection = typeof TAP_DIRECTIONS[number] +``` + +#### Source + +[`src/ParameterSchema.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts) + +Line 91. + +## Interfaces + +### ParameterProperty + +A single JSON-Schema property entry inside a tool's `parameters.properties`. +Mirrors the shape the model reads on every turn: `type` + LLM-facing +`description`, with an optional `enum` / `items` and any extra JSON-Schema +keywords (`minLength`, `pattern`, `format`, …) merged through verbatim. + +#### Signature + +```typescript +interface ParameterProperty +``` + +#### Properties + + + + + + + + + +#### Source + +[`src/ParameterSchema.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts) + +Line 112. + +*** + +### ParameterSchemaObject + +The serialised SWAIG parameter schema: a JSON-Schema `object`. This is the +exact shape `defineTool({ parameters })` accepts and what the SDK renders +into the OpenAI tool schema's `parameters` field. + +#### Signature + +```typescript +interface ParameterSchemaObject +``` + +#### Properties + + + + + + + +#### Source + +[`src/ParameterSchema.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts) + +Line 125. + +## Source + +[`src/ParameterSchema.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts) + +Line 141. diff --git a/fern/products/sdk-reference/typescript/pom-builder/index.mdx b/fern/products/sdk-reference/typescript/pom-builder/index.mdx new file mode 100644 index 0000000000..66223ec4a8 --- /dev/null +++ b/fern/products/sdk-reference/typescript/pom-builder/index.mdx @@ -0,0 +1,508 @@ +--- +slug: "/reference/typescript/pom-builder" +title: "PomBuilder" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "PomBuilder" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts" +--- +# `PomBuilder` + +Builds a structured prompt by composing named POM sections, with Markdown and dict export. + +The Prompt Object Model lets you assemble a large system prompt from reusable, +named sections (Role, Objective, Constraints, etc.) instead of a single string. +This plays well with [AgentBase](/docs/sdk-reference/reference/typescript/agent-base) methods like `promptAddSection()` and +`promptAddToSection()` that let user code and skills add prompt content +incrementally. + +## Signature + +```typescript +class PomBuilder +``` + +## Examples + +```typescript +import { PomBuilder } from '@signalwire/sdk'; + +const pom = new PomBuilder() + .addSection('Role', { body: 'You are a friendly customer service agent.' }) + .addSection('Objectives', { bullets: [ + 'Identify the customer politely', + 'Resolve their issue in under 3 turns if possible', + ]}) + .addSection('Constraints', { bullets: [ + 'Never reveal internal tool names', + ]}); + +const systemPrompt = pom.renderMarkdown(); +``` + +## See Also + +- \- \[PomSection]\(/docs/sdk-reference/reference/typescript/pom-builder/pom-section) + \- \[AgentBase.promptAddSection]\(/docs/sdk-reference/reference/typescript/agent-base#prompt-add-section) + +## Properties + + + Returns the underlying [PromptObjectModel](/docs/sdk-reference/reference/typescript/pom/prompt-object-model) for the builder. Mirrors Python's `PomBuilder.pom` attribute (the wrapped low-level model). Returns a fresh `PromptObjectModel` populated from the builder's current sections; mutations on the returned instance do not propagate back to this builder. + + +## Classes + + + + A single section in a Prompt Object Model, with optional title, body, bullets, and nested subsections. + + + +## Methods + +### addPomAsSubsection + +Appends every top-level section of another PomBuilder as subsections of a target section. + +#### Signature + +```typescript +addPomAsSubsection(target: string | PomSection, pomToAdd: PomBuilder): this +``` + +#### Parameters + + + The heading of the target section, or the PomSection to append into. + + + + The PomBuilder whose sections should be appended as subsections. + + +#### Returns + +`this` — This builder for chaining. + +#### Throws + +- If target is a string and no section with that title is found. + +#### Source + +[`src/PomBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts) + +Line 374. + +*** + +### addSection + +Adds a new top-level section to the prompt. + +#### Signature + +```typescript +addSection(title: string, opts?: { ...5 fields }): this +``` + +#### Parameters + + + The section heading. + + + + Optional body, bullets, numbering, and subsection configuration. + + + + + + + + + + + + +#### Returns + +`this` — This builder for chaining. + +#### Source + +[`src/PomBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts) + +Line 255. + +*** + +### addSubsection + +Adds a subsection under an existing parent section, creating the parent if absent. + +#### Signature + +```typescript +addSubsection(parentTitle: string, title: string, opts?: { ...2 fields }): this +``` + +#### Parameters + + + The heading of the parent section. + + + + The subsection heading. + + + + Optional body text and bullets for the subsection. + + + + + + +#### Returns + +`this` — This builder for chaining. + +#### Source + +[`src/PomBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts) + +Line 316. + +*** + +### addToSection + +Appends body text or bullets to an existing section, creating it if absent. + +#### Signature + +```typescript +addToSection(title: string, opts?: { ...3 fields }): this +``` + +#### Parameters + + + The section heading to append to. + + + + Body text and/or bullets to add. + + + + + + + + +#### Returns + +`this` — This builder for chaining. + +#### Source + +[`src/PomBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts) + +Line 293. + +*** + +### constructor + +#### Signature + +```typescript +constructor(): PomBuilder +``` + +#### Returns + +`PomBuilder` + +*** + +### findSection + +Recursively searches all sections and subsections for one matching the given title. + +#### Signature + +```typescript +findSection(title: string): PomSection | undefined +``` + +#### Parameters + + + The section heading to search for. + + +#### Returns + +`PomSection | undefined` — The matching PomSection, or undefined if not found. + +#### Source + +[`src/PomBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts) + +Line 355. + +*** + +### fromSections + +Creates a PomBuilder from an array of section data objects. + +**Modifiers:** `static` + +#### Signature + +```typescript +fromSections(sections: PomSectionData[]): PomBuilder +``` + +#### Parameters + + + Array of section data to reconstruct. + + +#### Returns + +`PomBuilder` — A new PomBuilder populated with the given sections. + +#### Source + +[`src/PomBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts) + +Line 413. + +*** + +### getSection + +Returns a top-level section by title. + +#### Signature + +```typescript +getSection(title: string): PomSection | undefined +``` + +#### Parameters + + + The section heading to retrieve. + + +#### Returns + +`PomSection | undefined` — The matching PomSection, or undefined if not found. + +#### Source + +[`src/PomBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts) + +Line 346. + +*** + +### hasSection + +Checks whether a top-level section with the given title exists. + +#### Signature + +```typescript +hasSection(title: string): boolean +``` + +#### Parameters + + + The section heading to look for. + + +#### Returns + +`boolean` — True if the section exists. + +#### Source + +[`src/PomBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts) + +Line 337. + +*** + +### renderMarkdown + +Renders all sections as a combined Markdown string. + +#### Signature + +```typescript +renderMarkdown(): string +``` + +#### Returns + +`string` — The complete rendered Markdown prompt text. + +#### Source + +[`src/PomBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts) + +Line 467. + +*** + +### renderXml + +Renders all sections as a combined XML string with a `` root element. + +#### Signature + +```typescript +renderXml(): string +``` + +#### Returns + +`string` — The complete rendered XML prompt text. + +#### Source + +[`src/PomBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts) + +Line 488. + +*** + +### reset + +Clears all sections, returning the builder to its initial empty state. + +#### Signature + +```typescript +reset(): this +``` + +#### Returns + +`this` — This builder for chaining. + +#### Source + +[`src/PomBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts) + +Line 243. + +*** + +### toDict + +Serializes all sections to an array of plain data objects. + +#### Signature + +```typescript +toDict(): PomSectionData[] +``` + +#### Returns + +`PomSectionData[]` — An array of PomSectionData representing all top-level sections. + +#### Source + +[`src/PomBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts) + +Line 396. + +*** + +### toJson + +Serializes all sections to a JSON string. + +#### Signature + +```typescript +toJson(): string +``` + +#### Returns + +`string` — A JSON string representation of all top-level sections. + +#### Source + +[`src/PomBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts) + +Line 404. + +## Interfaces + +### PomSectionData + +Serializable representation of a POM section, used for JSON export. + +#### Signature + +```typescript +interface PomSectionData +``` + +#### Properties + + + Section body paragraph text. + + + + List of bullet point strings. + + + + Whether subsections are numbered. + + + + Whether bullet points are rendered as a numbered list. + + + + Nested child sections. + + + + Section heading text. + + +#### Source + +[`src/PomBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts) + +Line 12. + +## Source + +[`src/PomBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts) + +Line 235. diff --git a/fern/products/sdk-reference/typescript/pom-builder/pom-section/index.mdx b/fern/products/sdk-reference/typescript/pom-builder/pom-section/index.mdx new file mode 100644 index 0000000000..0c65e0c87a --- /dev/null +++ b/fern/products/sdk-reference/typescript/pom-builder/pom-section/index.mdx @@ -0,0 +1,217 @@ +--- +slug: "/reference/typescript/pom-builder/pom-section" +title: "PomSection" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "PomBuilder.PomSection" + parent: "PomBuilder" + module: "PomBuilder" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts" +--- +# `PomSection` + +A single section in a Prompt Object Model, with optional title, body, bullets, and nested subsections. + +## Signature + +```typescript +class PomSection +``` + +## Properties + + + Section body paragraph text. + + + + List of bullet point strings. + + + + Whether this section is numbered when rendered; null means inherit from parent context. + + + + Whether bullet points are rendered as a numbered list. + + + + Nested child sections. + + + + Section heading text, or null if untitled. + + +## Methods + +### addSubsection + +Adds a nested subsection to this section. + +#### Signature + +```typescript +addSubsection(opts: { ...5 fields }): PomSection +``` + +#### Parameters + + + Subsection configuration including title and optional body/bullets. + + + + + + + + + + + + +#### Returns + +`PomSection` — The newly created child PomSection. + +#### Source + +[`src/PomBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts) + +Line 66. + +*** + +### constructor + +Creates a new PomSection. + +#### Signature + +```typescript +constructor(opts?: { ...5 fields }): PomSection +``` + +#### Parameters + + + Optional section configuration. + + + + + + + + + + + + +#### Returns + +`PomSection` + +#### Source + +[`src/PomBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts) + +Line 46. + +*** + +### renderMarkdown + +Renders this section and its subsections as a Markdown string. + +#### Signature + +```typescript +renderMarkdown(level: number = 2, sectionNumber: number[] = []): string +``` + +#### Parameters + + + The heading level to start at (default 2 for ##). + + + + Hierarchical numbering prefix for numbered sections. + + +#### Returns + +`string` — The rendered Markdown string. + +#### Source + +[`src/PomBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts) + +Line 105. + +*** + +### renderXml + +Renders this section and its subsections as an XML string. + +#### Signature + +```typescript +renderXml(indent: number = 0, sectionNumber: number[] = []): string +``` + +#### Parameters + + + The indentation depth (default 0). + + + + Hierarchical numbering prefix for numbered sections. + + +#### Returns + +`string` — The rendered XML string. + +#### Source + +[`src/PomBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts) + +Line 154. + +*** + +### toDict + +Serializes this section to a plain data object. + +#### Signature + +```typescript +toDict(): PomSectionData +``` + +#### Returns + +`PomSectionData` — A PomSectionData representation of this section and its subsections. + +#### Source + +[`src/PomBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts) + +Line 88. + +## Source + +[`src/PomBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts) + +Line 28. diff --git a/fern/products/sdk-reference/typescript/pom/prompt-object-model/index.mdx b/fern/products/sdk-reference/typescript/pom/prompt-object-model/index.mdx new file mode 100644 index 0000000000..29ca8573fd --- /dev/null +++ b/fern/products/sdk-reference/typescript/pom/prompt-object-model/index.mdx @@ -0,0 +1,372 @@ +--- +slug: "/reference/typescript/pom/prompt-object-model" +title: "PromptObjectModel" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "POM.PromptObjectModel" + module: "POM" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts" +--- +# `PromptObjectModel` + +The Prompt Object Model — a structured, serializable representation of a +full prompt document. Direct port of Python's +`signalwire.pom.pom.PromptObjectModel`. + +## Signature + +```typescript +class PromptObjectModel +``` + +## Properties + + + Whether to print debug info during `renderMarkdown`. + + + + Top-level sections in the model. + + +## Classes + + + + A section in the Prompt Object Model. + + + +## Methods + +### addPomAsSubsection + +Add another PromptObjectModel as subsections of an existing section. + +#### Signature + +```typescript +addPomAsSubsection(target: string | Section, pomToAdd: PromptObjectModel): void +``` + +#### Parameters + + + Either the title of the target section, or a `Section` reference. + + + + The model whose top-level sections will be appended as subsections. + + +#### Returns + +`void` + +#### Throws + +- Error if `target` is a string and no section with that title is found. + +#### Source + +[`src/POM/PromptObjectModel.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts) + +Line 412. + +*** + +### addSection + +Add a top-level section to the model. + +#### Signature + +```typescript +addSection(title: string | null = null, opts: { ...4 fields } = {}): Section +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`Section` + +#### Throws + +- Error if a section without a title is added after the first section. + +#### Source + +[`src/POM/PromptObjectModel.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts) + +Line 269. + +*** + +### constructor + +#### Signature + +```typescript +constructor(debug: boolean = false): PromptObjectModel +``` + +#### Parameters + + + +#### Returns + +`PromptObjectModel` + +#### Source + +[`src/POM/PromptObjectModel.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts) + +Line 259. + +*** + +### findSection + +Find a section by its title (recursive search through all sections and subsections). + +#### Signature + +```typescript +findSection(title: string): Section | null +``` + +#### Parameters + + + +#### Returns + +`Section | null` — The matching Section or null if not found. + +#### Source + +[`src/POM/PromptObjectModel.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts) + +Line 307. + +*** + +### fromJson + +Create a PromptObjectModel from JSON data (string or already-parsed object). + +**Modifiers:** `static` + +#### Signature + +```typescript +fromJson(jsonData: unknown): PromptObjectModel +``` + +#### Parameters + + + +#### Returns + +`PromptObjectModel` + +#### Source + +[`src/POM/PromptObjectModel.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts) + +Line 434. + +*** + +### fromYaml + +Create a PromptObjectModel from YAML data (string or already-parsed object). + +**Modifiers:** `static` + +#### Signature + +```typescript +fromYaml(yamlData: unknown): PromptObjectModel +``` + +#### Parameters + + + +#### Returns + +`PromptObjectModel` + +#### Source + +[`src/POM/PromptObjectModel.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts) + +Line 447. + +*** + +### renderMarkdown + +Render the entire model as markdown. + +#### Signature + +```typescript +renderMarkdown(): string +``` + +#### Returns + +`string` + +#### Source + +[`src/POM/PromptObjectModel.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts) + +Line 337. + +*** + +### renderXml + +Render the entire model as XML. + +#### Signature + +```typescript +renderXml(): string +``` + +#### Returns + +`string` + +#### Source + +[`src/POM/PromptObjectModel.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts) + +Line 381. + +*** + +### toDict + +Convert the entire model to a list of dictionaries. + +#### Signature + +```typescript +toDict(): SectionData[] +``` + +#### Returns + +`SectionData[]` + +#### Source + +[`src/POM/PromptObjectModel.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts) + +Line 320. + +*** + +### toJson + +Convert the entire model to a JSON string (pretty-printed with 2-space indent). + +#### Signature + +```typescript +toJson(): string +``` + +#### Returns + +`string` + +#### Source + +[`src/POM/PromptObjectModel.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts) + +Line 325. + +*** + +### toYaml + +Convert the entire model to a YAML string. + +#### Signature + +```typescript +toYaml(): string +``` + +#### Returns + +`string` + +#### Source + +[`src/POM/PromptObjectModel.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts) + +Line 330. + +## Interfaces + +### SectionData + +Plain serializable representation of a section, used for JSON/YAML and `to_dict()` exchange. + +#### Signature + +```typescript +interface SectionData +``` + +#### Properties + + + + + + + + + + + + + +#### Source + +[`src/POM/PromptObjectModel.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts) + +Line 19. + +## Source + +[`src/POM/PromptObjectModel.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts) + +Line 253. diff --git a/fern/products/sdk-reference/typescript/pom/prompt-object-model/section/index.mdx b/fern/products/sdk-reference/typescript/pom/prompt-object-model/section/index.mdx new file mode 100644 index 0000000000..0277cb1829 --- /dev/null +++ b/fern/products/sdk-reference/typescript/pom/prompt-object-model/section/index.mdx @@ -0,0 +1,274 @@ +--- +slug: "/reference/typescript/pom/prompt-object-model/section" +title: "Section" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "POM.PromptObjectModel.Section" + parent: "POM.PromptObjectModel" + module: "POM.PromptObjectModel" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts" +--- +# `Section` + +A section in the Prompt Object Model. + +Each section contains a title, optional body text, optional bullet points, +and can have any number of nested subsections. + +## Signature + +```typescript +class Section +``` + +## Properties + + + A paragraph of text associated with the section. + + + + Bullet-pointed items. + + + + Whether this section should be numbered. + + + + Whether bullets should be numbered instead of using bullet points. + + + + Nested sections with the same structure. + + + + The name of the section. + + +## Methods + +### addBody + +Add or replace the body text for this section. + +#### Signature + +```typescript +addBody(body: string): void +``` + +#### Parameters + + + +#### Returns + +`void` + +#### Source + +[`src/POM/PromptObjectModel.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts) + +Line 84. + +*** + +### addBullets + +Add bullet points to this section (extends the existing list). + +#### Signature + +```typescript +addBullets(bullets: string[]): void +``` + +#### Parameters + + + +#### Returns + +`void` + +#### Source + +[`src/POM/PromptObjectModel.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts) + +Line 92. + +*** + +### addSubsection + +Add a subsection to this section. + +#### Signature + +```typescript +addSubsection(title: string, opts: { ...4 fields } = {}): Section +``` + +#### Parameters + + + The title of the subsection (required — subsections must have a title). + + + + Optional body / bullets / numbering for the subsection. + + + + + + + + + + +#### Returns + +`Section` — The newly created Section. + +#### Source + +[`src/POM/PromptObjectModel.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts) + +Line 106. + +*** + +### constructor + +#### Signature + +```typescript +constructor(title: string | null = null, opts: { ...4 fields } = {}): Section +``` + +#### Parameters + + + Section title (null permitted only on the very first top-level section). + + + + Keyword-style options matching Python's `body=`/`bullets=`/`numbered=`/`numberedBullets=`. + + + + + + + + + + +#### Returns + +`Section` + +#### Source + +[`src/POM/PromptObjectModel.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts) + +Line 52. + +*** + +### renderMarkdown + +Render this section and all its subsections as markdown. + +#### Signature + +```typescript +renderMarkdown(level: number = 2, sectionNumber: number[] | null = null): string +``` + +#### Parameters + + + The heading level to start with (default 2 = `##`). + + + + The current section number for numbered sections. + + +#### Returns + +`string` + +#### Source + +[`src/POM/PromptObjectModel.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts) + +Line 147. + +*** + +### renderXml + +Render this section and all its subsections as XML. + +#### Signature + +```typescript +renderXml(indent: number = 0, sectionNumber: number[] | null = null): string +``` + +#### Parameters + + + The indentation level to start with (default 0). + + + + The current section number for numbered sections. + + +#### Returns + +`string` + +#### Source + +[`src/POM/PromptObjectModel.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts) + +Line 194. + +*** + +### toDict + +Convert the section to a dictionary representation. + +#### Signature + +```typescript +toDict(): SectionData +``` + +#### Returns + +`SectionData` + +#### Source + +[`src/POM/PromptObjectModel.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts) + +Line 129. + +## Source + +[`src/POM/PromptObjectModel.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts) + +Line 34. diff --git a/fern/products/sdk-reference/typescript/prefabs/concierge-agent/index.mdx b/fern/products/sdk-reference/typescript/prefabs/concierge-agent/index.mdx new file mode 100644 index 0000000000..7f1d02ee64 --- /dev/null +++ b/fern/products/sdk-reference/typescript/prefabs/concierge-agent/index.mdx @@ -0,0 +1,3756 @@ +--- +slug: "/reference/typescript/prefabs/concierge-agent" +title: "ConciergeAgent" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "prefabs.ConciergeAgent" + module: "prefabs" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/ConciergeAgent.ts" +--- +# `ConciergeAgent` + +Prefab agent that acts as a virtual concierge for a venue, providing information +about services, amenities, hours of operation, availability, and directions. + +## Signature + +```typescript +class ConciergeAgent extends AgentBase +``` + +## Inheritance + +**Extends:** [AgentBase](/docs/sdk-reference/reference/typescript/agent-base) + +## Examples + +```typescript +import { ConciergeAgent } from '@signalwire/sdk'; + +const agent = new ConciergeAgent({ + venueName: 'The Park Hotel', + services: ['Room service', 'Valet parking', 'Spa', 'Restaurant'], + hoursOfOperation: { + restaurant: '7 AM - 10 PM daily', + spa: '9 AM - 9 PM daily', + default: '24 hours', + }, + amenities: { + pool: { location: 'Rooftop', hours: '6 AM - 10 PM' }, + gym: { location: 'Floor 2', hours: '24 hours' }, + }, +}); + +await agent.serve({ port: 3000 }); +``` + +## Properties + + + Unique identifier for this agent instance. + + + + Dictionary of amenities, each mapping to a dict of detail keys/values. + + + + + + + + Domain name for SSL. Mirrors Python's `self.domain`. + + + + Check if full JSON Schema validation is enabled. Mirrors Python's `@property full_validation_enabled`. + + + + Host the server binds to. + + + + Hours of operation by category. Defaults to `{ default: "9 AM - 5 PM" }`. + + + + Structured logger instance for this agent. Override the inherited SWMLService logger with an AgentBase-tagged one. + + + + Service display name. + + + + Public accessor for the native functions list. Python exposes `self.native_functions` as a public read/write attribute. + + + + + + Public accessor for the agent's POM as a [PromptObjectModel](/docs/sdk-reference/reference/typescript/pom/prompt-object-model) instance. Python parity: `agent.pom` instance attribute (agent\_base.py line 209) is a `signalwire.pom.pom.PromptObjectModel` when `use_pom=True`, or `None` otherwise. This getter returns the equivalent TypeScript `PromptObjectModel` instance — callers can use `addSection`, `findSection`, `renderMarkdown`, `renderXml`, `toJson`, `toYaml` exactly as in Python. The instance returned is a fresh snapshot built from the current `PomBuilder` state, so mutating it does not feed back into the agent's internal builder. To mutate the agent's prompt, use `promptAddSection` / `promptAddToSection` / `promptAddSubsection`. + + + + Port the server binds to. + + + + Static prompt sections: subclasses can define these declaratively. Each entry is applied via promptAddSection() in the constructor. + + + + Public accessor for the PromptManager (POM). Python exposes `self.pom` as a public attribute. This getter provides equivalent access for direct POM manipulation. + + + + HTTP route path. + + + + Schema validation utilities. Mirrors Python's `self.schema_utils`. + + + + Unified security configuration. Mirrors Python's `self.security`. + + + + List of services offered by the venue. + + + + Public read-only accessor for the SkillManager. Python exposes `self.skill_manager` as a public attribute. This getter provides equivalent read access. + + + + Special instructions appended to the agent's instruction bullets. + + + + Path to SSL certificate. Mirrors Python's `self.ssl_cert_path`. + + + + Whether SSL is enabled. Mirrors Python's `self.ssl_enabled`. + + + + Path to SSL private key. Mirrors Python's `self.ssl_key_path`. + + + + The complete set of internal SWAIG function names that accept fillers, matching the SWAIGInternalFiller schema definition. Any name outside this set is silently ignored by the runtime — addInternalFiller / setInternalFillers warn if you pass an unknown name. + + + + + + + + Name of the venue or business. + + + + Custom verb handler registry. Mirrors Python's `self.verb_registry`. + + +## Methods + +### addAnswerVerb + +Configure the answer verb (phase 2) with optional settings. + +#### Signature + +```typescript +addAnswerVerb(config?: Record): this +``` + +#### Parameters + + + Optional answer verb configuration. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1501. + +*** + +### addFunctionInclude + +Add a remote SWAIG function include reference. + +#### Signature + +```typescript +addFunctionInclude( + url: string, + functions: string[], + metaData?: Record +): this +``` + +#### Parameters + + + URL of the remote SWAIG endpoint. + + + + Function names available at that endpoint. + + + + Optional metadata to attach to the include. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 966. + +*** + +### addHint + +Add a single speech-recognition hint. + +#### Signature + +```typescript +addHint(hint: string): this +``` + +#### Parameters + + + Word or phrase to boost in speech recognition. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 653. + +*** + +### addHints + +Add multiple speech-recognition hints at once. + +#### Signature + +```typescript +addHints(hints: string[]): this +``` + +#### Parameters + + + Array of words or phrases to boost. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 663. + +*** + +### addInternalFiller + +Add internal filler phrases for a single internal function and language. + +See [setInternalFillers](/docs/sdk-reference/reference/typescript/prefabs/concierge-agent#set-internal-fillers) for the complete list of supported +functionName values and an explanation of what fillers do. + +#### Signature + +```typescript +addInternalFiller( + functionName: string, + languageCode: string, + fillers: string[] +): this +``` + +#### Parameters + + + One of the supported internal function names (see SUPPORTED\_INTERNAL\_FILLER\_NAMES). Names outside the supported set log a warning and are ignored by the runtime. + + + + BCP-47 language code for the fillers (e.g. 'en-US'). + + + + Array of filler phrases. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 943. + +*** + +### addLanguage + +Add a supported language to the AI configuration. + +#### Signature + +```typescript +addLanguage(config: LanguageConfig): this +``` + +#### Parameters + + + Language configuration including name, code, voice, and optional fillers. `params` may be set to attach engine-specific tuning (voice stability, similarity boost, model knobs, etc.); only emitted into SWML when non-empty so existing entries stay byte-identical when no params are passed (Python ai\_config\_mixin.py `add_language`). + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 694. + +*** + +### addMcpServer + +Add an external MCP server for tool discovery and invocation. +Tools are discovered via MCP protocol at session start and added to the AI's tool list. + +#### Signature + +```typescript +addMcpServer(url: string, opts?: { ...3 fields }): this +``` + +#### Parameters + + + MCP server HTTP endpoint URL + + + + Optional configuration: headers, resources, resourceVars + + + + + + + + +#### Returns + +`this` — This agent instance for chaining + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1146. + +*** + +### addPatternHint + +Add a pattern-based speech-recognition hint with find-and-replace behavior. + +#### Signature + +```typescript +addPatternHint(opts: { ...4 fields }): this +``` + +#### Parameters + + + Pattern hint configuration with a descriptive hint label, regex pattern, replacement string, and optional case-insensitive flag. + + + + + + + + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 674. + +*** + +### addPostAiVerb + +Add a SWML verb to execute after the AI verb (phase 5). + +#### Signature + +```typescript +addPostAiVerb(verbName: string, config: Record): this +``` + +#### Parameters + + + Name of the SWML verb. + + + + Verb configuration object. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1523. + +*** + +### addPostAnswerVerb + +Add a SWML verb to execute after the answer phase but before the AI verb (phase 3). + +#### Signature + +```typescript +addPostAnswerVerb( + verbName: string, + config: number | Record +): this +``` + +#### Parameters + + + Name of the SWML verb. + + + + Verb configuration object. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1512. + +*** + +### addPreAnswerVerb + +Add a SWML verb to execute before the answer phase (phase 1). + +#### Signature + +```typescript +addPreAnswerVerb( + verbName: string, + config: number | Record +): this +``` + +#### Parameters + + + Name of the SWML verb (e.g. "play", "record"). + + + + Verb configuration object. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1491. + +*** + +### addPronunciation + +Add a pronunciation override rule for the TTS engine. + +#### Signature + +```typescript +addPronunciation(rule: PronunciationRule): this +``` + +#### Parameters + + + Pronunciation rule specifying the text to replace and its substitute. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 774. + +*** + +### addSection + +Add a new named section to the SWML document. +Mirrors Python's `add_section()`. + +#### Signature + +```typescript +addSection(sectionName: string): this +``` + +#### Parameters + + + Name of the section to create. + + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 653. + +*** + +### addSkill + +Add a skill to this agent, registering its tools, prompt sections, hints, and global data. + +#### Signature + +```typescript +addSkill(skill: SkillBase): Promise +``` + +#### Parameters + + + The skill instance to add. + + +#### Returns + +`Promise` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1570. + +*** + +### addSkillByName + +Add a skill by its registered name, looking it up in the global SkillRegistry. + +Matches Python's `add_skill(skill_name, params)` which loads skills by string +name via the SkillManager registry. Throws a `ValueError`-equivalent if the +skill name is not found in the registry. + +Accepts a typed [SkillNameOrString](/docs/sdk-reference/reference/typescript/skills/skill-name#skill-name-or-string): one of the built-in +`SkillName` values (autocompleted, with a typo caught at compile +time) or any other string for custom / third-party skills. The value is +forwarded to the registry unchanged — the typing is erased at runtime, so +this matches Python's bare-`str` `add_skill(skill_name, params)`. + +#### Signature + +```typescript +addSkillByName( + skillName: SkillNameOrString, + params?: SkillConfig +): Promise +``` + +#### Parameters + + + The name the skill was registered under in the SkillRegistry. + + + + Optional configuration parameters forwarded to the skill factory. + + +#### Returns + +`Promise` — This agent instance for chaining. + +#### Throws + +- Error if no skill with the given name is registered. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1641. + +*** + +### addSwaigQueryParams + +Add extra query parameters appended to all SWAIG webhook URLs. + +#### Signature + +```typescript +addSwaigQueryParams(params: Record): this +``` + +#### Parameters + + + Key-value pairs to append as query parameters. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1733. + +*** + +### addVerb + +Add a verb to the SWML document. + +#### Signature + +```typescript +addVerb(name: string, config: unknown): this +``` + +#### Parameters + + + Verb name (e.g., 'answer', 'play', 'hangup'). + + + + Verb configuration. + + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 642. + +*** + +### addVerbToSection + +Add a verb to a specific named section. +Mirrors Python's `add_verb_to_section()`. + +#### Signature + +```typescript +addVerbToSection(sectionName: string, verbName: string, config: unknown): this +``` + +#### Parameters + + + Target section name (auto-created if missing). + + + + Verb name. + + + + Verb configuration. + + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 669. + +*** + +### asRouter + +Return this agent's Hono app for mounting as a sub-router in an AgentServer. + +#### Signature + +```typescript +asRouter(): Hono +``` + +#### Returns + +`Hono` — The Hono application instance. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2656. + +*** + +### autoMapSipUsernames + +Automatically register common SIP usernames based on this agent's +name and route. Derives cleaned variants (alphanumeric + underscore) +and registers each via `registerSipUsername()`. + +Port of Python's `auto_map_sip_usernames()`: + +- Registers a cleaned version of the agent name +- Registers a cleaned version of the route (if different from name) +- For names longer than 3 characters, also registers a vowel-stripped variant + +#### Signature + +```typescript +autoMapSipUsernames(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1058. + +*** + +### buildSwmlForRequest + +Service-side SWML-builder hook. Subclasses return a `SwmlBuilder` +to fully replace the document for this request, or `null` to fall +through to `setOnRequestCallback` or the static builder. + +This is distinct from the WebMixin `onRequest(requestData, +callbackPath)` hook on AgentBase (which mirrors Python's +`on_request -> on_swml_request` modification-merge contract). +Use this hook when you want to swap the entire SWML builder; use +`onRequest` / `onSwmlRequest` on AgentBase when you want to merge +targeted modifications into the rendered document. + +Default implementation returns `null` (no-op). + +#### Signature + +```typescript +buildSwmlForRequest( + _queryParams: Record, + _bodyParams: Record, + _headers: Record, + _callbackPath?: string +): SwmlBuilder | null +``` + +#### Parameters + + + + + + + + + +#### Returns + +`SwmlBuilder | null` — A `SwmlBuilder` whose document is sent as the response, or `null` to delegate to the next handler in the chain. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 834. + +*** + +### clearPostAiVerbs + +Remove all post-AI verbs. + +#### Signature + +```typescript +clearPostAiVerbs(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1550. + +*** + +### clearPostAnswerVerbs + +Remove all post-answer verbs. + +#### Signature + +```typescript +clearPostAnswerVerbs(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1541. + +*** + +### clearPreAnswerVerbs + +Remove all pre-answer verbs. + +#### Signature + +```typescript +clearPreAnswerVerbs(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1532. + +*** + +### clearSwaigQueryParams + +Clear all SWAIG query parameters. + +#### Signature + +```typescript +clearSwaigQueryParams(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1742. + +*** + +### constructor + +Create a ConciergeAgent for a venue with the given services, amenities, and hours. + +#### Signature + +```typescript +constructor(config: ConciergeConfig): ConciergeAgent +``` + +#### Parameters + + + Configuration including venue name, services, amenities, and optional hours/instructions/welcome. + + +#### Returns + +`ConciergeAgent` + +#### Source + +[`src/prefabs/ConciergeAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/ConciergeAgent.ts) + +Line 80. + +*** + +### createToolToken + +Mint a per-call SWAIG-function token via the agent's SessionManager. + +Mirrors Python reference `core/mixins/state_mixin.py _create_tool_token`: +delegates to `SessionManager.createToolToken` and returns an empty +string on any failure (Python catches all exceptions and returns ""). + +#### Signature + +```typescript +createToolToken(toolName: string, callId: string): string +``` + +#### Parameters + + + + + +#### Returns + +`string` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1475. + +*** + +### defineContexts + +Define or replace the contexts configuration for the AI verb. + +#### Signature + +```typescript +defineContexts( + contexts?: Record | ContextBuilder +): ContextBuilder +``` + +#### Parameters + + + An existing ContextBuilder instance or a plain object; a new ContextBuilder is created if omitted. + + +#### Returns + +`ContextBuilder` — The active ContextBuilder for further configuration. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 604. + +*** + +### defineTool + +Register a SWAIG tool (function) that the AI can invoke during a call. + +#### How this becomes a tool the model sees + +A SWAIG function is **exactly the same concept** as a "tool" in +native OpenAI / Anthropic tool calling. On every LLM turn, the SDK +renders each registered SWAIG function into the OpenAI tool schema: + +```json +{ +"type": "function", +"function": { +"name": "your_name_here", +"description": "your description text", +"parameters": { /* your JSON schema */ } +} +} +``` + +That schema goes to the model in the same API call that produces +the next assistant message. The model reads: + +- the **function `description`** to decide WHEN to call this tool +- each **parameter `description`** (inside the JSON schema) to + decide HOW to fill in each argument + +This means **descriptions are prompt engineering**, not developer +comments. A vague description is the #1 cause of "the model has the +right tool but doesn't call it" failures. + +##### Bad vs good descriptions + +```text +BAD : description: 'Lookup function' +GOOD: description: 'Look up a customer's account details by account +number. Use this BEFORE quoting any account-specific info +(balance, plan, status). Do not use for general product +questions.' + +BAD : parameters: { id: { type: 'string', description: 'the id' } } +GOOD: parameters: { account_number: { type: 'string', description: +'The customer's 8-digit account number, no dashes or spaces. +Ask the user if they don't provide it.' } } +``` + +##### Tool count matters + +LLM tool selection accuracy degrades past ~7-8 simultaneously-active +tools per call. Use Step.setFunctions() to partition tools across +steps so only the relevant subset is active at any moment. + +#### Signature + +```typescript +defineTool(opts: { ...11 fields }): this +``` + +#### Parameters + + + Tool definition including name, description, parameter schema, and handler callback. `description` and per-parameter `description` strings are LLM-facing prompt engineering. + + + + + Additional fields to pass through to the SWAIG function definition (Python `**swaig_fields` equivalent). + + + + + + + + + + + + + + + + + + + + External webhook URL; makes this an externally-hosted tool. + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1330. + +*** + +### defineTools + +Register the `check_availability` and `get_directions` SWAIG tools. + +#### Signature + +```typescript +defineTools(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/prefabs/ConciergeAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/ConciergeAgent.ts) + +Line 203. + +*** + +### defineTypedTool + +Register a SWAIG tool with a typed handler that receives named parameters +instead of the standard `(args, rawData)` convention. + +The SDK wraps the handler to unpack the args dict into positional params. +If no `parameters` schema is provided, one is inferred from the handler's +source code (parameter names and default values). + +#### Signature + +```typescript +defineTypedTool(opts: { ...9 fields }): this +``` + +#### Parameters + + + Tool definition with a typed handler function. + + + + + + + The typed handler. Receives the AI-extracted arguments as named positional parameters (in declaration order), optionally with a trailing `rawData` record, and returns a SWAIG result. Precisely typed as [TypedToolHandler](/docs/sdk-reference/reference/typescript/type-inference#typed-tool-handler) rather than the bare `Function` so a non-callable — or a callable that returns nothing usable — is a compile-time error. + + + + + + + + + + + + + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1373. + +*** + +### enableDebugEvents + +Enable debug event webhooks for this agent. + +#### Signature + +```typescript +enableDebugEvents(level: number = 1): this +``` + +#### Parameters + + + Debug verbosity level (defaults to 1). + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1011. + +*** + +### enableDebugRoutes + +Register a callback function that determines routing based on POST data. + +When a routing callback is registered, an endpoint at the specified path +is created in `getApp()`. The callback receives the request body and returns +Enable debug routes for testing and development. + +This is a backward-compatibility stub matching the Python SDK. +In the TypeScript SDK, debug routes (health, ready, debug\_events) +are automatically registered in `getApp()`. + +#### Signature + +```typescript +enableDebugRoutes(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1773. + +*** + +### enableMcpServer + +Expose this agent's tools as an MCP server endpoint at /mcp. +Adds a JSON-RPC 2.0 endpoint that MCP clients (Claude Desktop, other agents) can connect to. + +#### Signature + +```typescript +enableMcpServer(): this +``` + +#### Returns + +`this` — This agent instance for chaining + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1160. + +*** + +### enableSipRouting + +Enable SIP routing for this agent. + +#### Signature + +```typescript +enableSipRouting(autoMap: boolean = true, path: string = '/sip'): this +``` + +#### Parameters + + + When true, automatically map SIP usernames to the agent route (defaults to true). + + + + HTTP path for the SIP routing endpoint (defaults to '/sip'). + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1025. + +*** + +### extractSipUsername + +Extract the SIP username from a request body's call.to field. + +**Modifiers:** `static` + +#### Signature + +```typescript +extractSipUsername(requestBody: Record): string | null +``` + +#### Parameters + + + The parsed request body containing call information. + + +#### Returns + +`string | null` — The extracted SIP username, or null if not found. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1122. + +*** + +### getAllFunctions + +Snapshot of all registered SWAIG functions keyed by name. +(Python parity: `ToolRegistry.get_all_functions`.) + +#### Signature + +```typescript +getAllFunctions(): Record> +``` + +#### Returns + +`Record>` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 529. + +*** + +### getApp + +Get or lazily create the Hono HTTP application with all routes, middleware, auth, and CORS. + +#### Signature + +```typescript +getApp(): Hono +``` + +#### Returns + +`Hono` — The configured Hono application instance. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2269. + +*** + +### getBasicAuthCredentials + +Get the basic-auth credentials used by this agent. + +#### Signature + + + + ```typescript + getBasicAuthCredentials(includeSource?: false): [string, string] + ``` + + + + ```typescript + getBasicAuthCredentials( + includeSource: true + ): [string, string, "provided" | "environment" | "generated"] + ``` + + + +#### Parameters (Overload 1) + + + When true, a third element indicating the credential source is appended. + + +#### Parameters (Overload 2) + + + When true, a third element indicating the credential source is appended. + + +#### Returns (Overload 1) + +`[string, string]` — A tuple of \[username, password] or \[username, password, source]. + +#### Returns (Overload 2) + +`[string, string, "provided" | "environment" | "generated"]` — A tuple of \[username, password] or \[username, password, source]. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2794. + +*** + +### getBuilder + +Get the underlying SwmlBuilder for direct manipulation. + +#### Signature + +```typescript +getBuilder(): SwmlBuilder +``` + +#### Returns + +`SwmlBuilder` — The SwmlBuilder instance. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 632. + +*** + +### getContexts + +Get the contexts dictionary as serialised SWML, or null when no +contexts have been defined yet. + +Matches Python `PromptManager.get_contexts()` which returns the +contexts dict or `None`. + +#### Signature + +```typescript +getContexts(): Record | null +``` + +#### Returns + +`Record | null` — Contexts dict, or null when no contexts are defined. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 641. + +*** + +### getDocument + +Get the SWML document as a dictionary. +Alias for `renderSwml()` that matches Python's `get_document()` name. + +#### Signature + +```typescript +getDocument(): Record +``` + +#### Returns + +`Record` — The SWML document. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 706. + +*** + +### getFullUrl + +Get the full external URL of this agent, using the proxy base URL if available. + +#### Signature + +```typescript +getFullUrl(includeAuth: boolean = false): string +``` + +#### Parameters + + + Whether to embed basic-auth credentials in the URL (defaults to false). + + +#### Returns + +`string` — The fully-qualified URL string. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1857. + +*** + +### getFunction + +Get a registered SWAIG function entry, or undefined. +(Python parity: `ToolRegistry.get_function`.) + +#### Signature + +```typescript +getFunction(name: string): Record | SwaigFunction | undefined +``` + +#### Parameters + + + +#### Returns + +`Record | SwaigFunction | undefined` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 523. + +*** + +### getLanguageParams + +Read the per-language `params` dict for a previously-added language. + +Python parity: `get_language_params(code)`. Returns `undefined` if the +code is unknown or the language has no params set — no exception path. + +#### Signature + +```typescript +getLanguageParams(code: string): Record | undefined +``` + +#### Parameters + + + Language code as previously passed to [addLanguage](/docs/sdk-reference/reference/typescript/prefabs/concierge-agent#add-language). + + +#### Returns + +`Record | undefined` — The params dict if set, `undefined` otherwise (including when the code is unknown). + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 760. + +*** + +### getMcpServers + +Get configured MCP servers (read-only copy). + +#### Signature + +```typescript +getMcpServers(): Record[] +``` + +#### Returns + +`Record[]` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1171. + +*** + +### getName + +Get the agent's display name. + +#### Signature + +```typescript +getName(): string +``` + +#### Returns + +`string` — The agent name string. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1559. + +*** + +### getPostPrompt + +Get the post-prompt text, if one has been set. + +#### Signature + +```typescript +getPostPrompt(): string | null +``` + +#### Returns + +`string | null` — The post-prompt string, or null if not configured. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 548. + +*** + +### getPrompt + +Get the fully rendered main prompt text. + +#### Signature + +```typescript +getPrompt(): string +``` + +#### Returns + +`string` — The assembled prompt string. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 520. + +*** + +### getPromptPom + +Get the raw POM (Prompt Object Model) structure as an array of section data objects, +when the agent is in POM mode and has at least one section. + +Matches Python `get_prompt()` which returns `Union[str, List[Dict]]` — a raw list when +in POM mode (via `pom.to_list()` / `pom.render_dict()`), or a string otherwise. +The TS `getPrompt()` always returns a string (rendered Markdown), so this companion +method exposes the raw POM structure for callers that need it for serialisation or +inspection (e.g. skills that inspect prompt sections). + +#### Signature + +```typescript +getPromptPom(): Record[] | null +``` + +#### Returns + +`Record[] | null` — An array of POM section data objects, or null if not in POM mode or POM is empty. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 536. + +*** + +### getRawPrompt + +Get the raw prompt text whatever `setPromptText` stored, or null when +no raw prompt has been set. + +Matches Python `PromptManager.get_raw_prompt()` which returns the raw +stored string or `None`. Use this instead of `getPrompt()` when you +need the unrendered text rather than the POM-rendered Markdown. + +#### Signature + +```typescript +getRawPrompt(): string | null +``` + +#### Returns + +`string | null` — The raw prompt string, or null if not set. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 562. + +*** + +### getRegisteredTools + +Get a summary of all registered tools with their names, descriptions, and +parameter schemas. Lifted from AgentBase so the swaig-test CLI can list +tools on a non-AgentBase SWMLService target (sidecar / standalone SWAIG +host). + +#### Signature + +```typescript +getRegisteredTools(): { description: string; name: string; parameters: Record }[] +``` + +#### Returns + +`{ description: string; name: string; parameters: Record }[]` — Array of tool descriptors. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 557. + +*** + +### getTool + +Look up a registered SwaigFunction by name. Lifted from AgentBase so +`swaig-test --exec ` works against a non-AgentBase SWMLService +target. + +#### Signature + +```typescript +getTool(name: string): SwaigFunction | undefined +``` + +#### Parameters + + + The tool name to search for. + + +#### Returns + +`SwaigFunction | undefined` — The SwaigFunction instance, or undefined if not found or not a SwaigFunction. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 581. + +*** + +### getTools + +Public access to the list of registered tools. + +In Python, `define_tools()` is public and returns `List[SWAIGFunction]`. +In TypeScript, `defineTools()` is a protected setup hook (void). This +method provides the equivalent public "get all tools" capability. + +#### Signature + +```typescript +getTools(): SwaigFunction[] +``` + +#### Returns + +`SwaigFunction[]` — Array of all registered SwaigFunction instances. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 371. + +*** + +### handleMcpRequest + +Handle an MCP JSON-RPC 2.0 request. Returns the response object. + +#### Signature + +```typescript +handleMcpRequest( + body: Record +): Promise> +``` + +#### Parameters + + + +#### Returns + +`Promise>` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1204. + +*** + +### hasFunction + +Whether a SWAIG function with the given name is registered. +(Python parity: `ToolRegistry.has_function`.) + +#### Signature + +```typescript +hasFunction(name: string): boolean +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 517. + +*** + +### hasSkill + +Check whether a skill with the given name is registered. + +Accepts a typed [SkillNameOrString](/docs/sdk-reference/reference/typescript/skills/skill-name#skill-name-or-string) so built-in names autocomplete +and a typo is a compile-time error; any other string is still accepted +(custom skills / parity with Python's bare-`str` `has_skill`). + +#### Signature + +```typescript +hasSkill(skillName: SkillNameOrString): boolean +``` + +#### Parameters + + + The skill name to check. + + +#### Returns + +`boolean` — True if a skill with that name exists. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1676. + +*** + +### hasTool + +Whether a tool with the given name is registered. + +#### Signature + +```typescript +hasTool(name: string): boolean +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 511. + +*** + +### isMcpServerEnabled + +Check if MCP server endpoint is enabled. + +#### Signature + +```typescript +isMcpServerEnabled(): boolean +``` + +#### Returns + +`boolean` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1166. + +*** + +### listSkills + +List all registered skills with their names, instance IDs, and initialization status. + +#### Signature + +```typescript +listSkills(): { initialized: boolean; instanceId: string; name: string }[] +``` + +#### Returns + +`{ initialized: boolean; instanceId: string; name: string }[]` — Array of skill descriptors. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1662. + +*** + +### listToolNames + +List registered tool names in insertion order (Map preserves it). + +#### Signature + +```typescript +listToolNames(): string[] +``` + +#### Returns + +`string[]` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 545. + +*** + +### manualSetProxyUrl + +Manually set the proxy base URL used for webhook URL generation. + +#### Signature + +```typescript +manualSetProxyUrl(url: string): this +``` + +#### Parameters + + + The external-facing base URL (trailing slashes are stripped). + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1754. + +*** + +### onDebugEvent + +Lifecycle hook called when a debug event webhook is received. Override in subclasses. + +#### Signature + +```typescript +onDebugEvent(_event: Record): void | Promise +``` + +#### Parameters + + + The debug event payload. + + +#### Returns + +`void | Promise` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1970. + +*** + +### onFunctionCall + +Hook called before each SWAIG function execution. Override in subclasses. + +**Behavioral note:** In the Python SDK, `on_function_call` IS the dispatcher +— it retrieves and executes the function, returning the result. In TypeScript, +`fn.execute()` is called separately after this hook. However, if this method +returns a non-void value, it is used as the result and the default execution +is skipped, enabling dispatch interception parity with Python. + +#### Signature + +```typescript +onFunctionCall( + _name: string, + _args: Record, + _rawData: Record +): void | Record | Promise> +``` + +#### Parameters + + + Name of the function about to execute. + + + + Parsed arguments for the function. + + + + The full raw SWAIG request payload. + + +#### Returns + +`void | Record | Promise>` — Optionally a result dict to short-circuit default execution, or void/undefined to proceed normally. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1999. + +*** + +### onRequest + +Lifecycle hook called when SWML is requested. Default delegates to +[onSwmlRequest](/docs/sdk-reference/reference/typescript/prefabs/concierge-agent#on-swml-request) and returns its result. Subclasses typically +override `onSwmlRequest` rather than this method. + +Matches Python `WebMixin.on_request(request_data, callback_path)`. The +cross-language API is the two-arg form; the Hono `context` argument is +a TypeScript-side extra preserved for callers that already have it but +is not part of the audited surface. + +#### Signature + +```typescript +onRequest( + requestData?: Record | null, + callbackPath?: string | null +): void | Record | Promise> +``` + +#### Parameters + + + The parsed request body. + + + + Optional callback path from the request. + + +#### Returns + +`void | Record | Promise>` — Optionally a dict of SWML modifications, or undefined for default rendering. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1935. + +*** + +### onSummary + +Process the interaction summary returned at the end of a call. +Logs structured summaries as JSON. Subclasses may override to persist or process. + +#### Signature + +```typescript +onSummary( + summary: Record | null, + _rawData: Record +): void | Promise +``` + +#### Parameters + + + + + +#### Returns + +`void | Promise` + +#### Source + +[`src/prefabs/ConciergeAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/ConciergeAgent.ts) + +Line 282. + +*** + +### onSwmlRequest + +Lifecycle hook called on every SWML request before rendering. Override in subclasses. + +May optionally return a modification dict that will be merged into the +rendered SWML document (matching Python's `Optional[dict]` return type). + +Matches Python `on_swml_request(request_data, callback_path, request)` — the third +parameter is the FastAPI `Request` in Python; here it is the raw Hono context object +so that subclasses can access query parameters (`context.req.query()`), raw request +headers (`context.req.raw.headers`), etc. + +#### Signature + +```typescript +onSwmlRequest( + _rawData: Record, + _callbackPath?: string, + _context?: any +): void | Record | Promise> +``` + +#### Parameters + + + The parsed request body. + + + + Optional callback path from the request. + + + + The raw Hono context object (c), providing access to headers and query params. + + +#### Returns + +`void | Record | Promise>` — Optionally a dict of SWML modifications, or void. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1958. + +*** + +### promptAddSection + +Add a new section to the prompt with optional body, bullets, and subsections. + +#### Signature + +```typescript +promptAddSection(title: string, opts?: { ...5 fields }): this +``` + +#### Parameters + + + Section heading. + + + + Optional section content including body text, bullet points, and subsections. + + + + + + + + + + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 467. + +*** + +### promptAddSubsection + +Add a subsection under an existing prompt section. + +#### Signature + +```typescript +promptAddSubsection( + parentTitle: string, + title: string, + opts?: { ...2 fields } +): this +``` + +#### Parameters + + + Title of the parent section. + + + + Title of the new subsection. + + + + Optional body text and bullet points for the subsection. + + + + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 502. + +*** + +### promptAddToSection + +Append content to an existing prompt section. + +#### Signature + +```typescript +promptAddToSection(title: string, opts?: { ...3 fields }): this +``` + +#### Parameters + + + Title of the section to append to. + + + + Content to add: body text, a single bullet, or multiple bullets. + + + + + + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 487. + +*** + +### promptHasSection + +Check whether a prompt section with the given title exists. + +#### Signature + +```typescript +promptHasSection(title: string): boolean +``` + +#### Parameters + + + Section title to look for. + + +#### Returns + +`boolean` — True if the section exists. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 512. + +*** + +### registerAdditionalRoutes + +Extension point: register additional Hono routes after SWMLService +mounts /health, /ready, /swaig, and the main route. AgentBase uses +this to add /post\_prompt, /check\_for\_input, /debug\_events, /mcp. + +#### Signature + +```typescript +registerAdditionalRoutes(_app: Hono): void +``` + +#### Parameters + + + +#### Returns + +`void` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 604. + +*** + +### registerRoutingCallback + +Register a callback at a specific HTTP path that decides how to route an +incoming request. + +When called, the endpoint at `path` will invoke `callback` with the parsed +request body. If `callback` returns a non-empty route string the server +responds with `{ action: "redirect", route }` so the platform can forward the +request to the right agent. If `callback` returns `null` / `undefined` the +agent's own SWML is returned instead (normal processing). + +Mirrors Python `swml_service.register_routing_callback` / +`web_mixin.register_routing_callback`. + +#### Signature + +```typescript +registerRoutingCallback(callback: RoutingCallback, path: string = '/sip'): this +``` + +#### Parameters + + + Function receiving the parsed request body and returning a route string to redirect, or null/undefined for normal processing. + + + + HTTP path where this callback endpoint is registered (default: '/sip'). + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1102. + +*** + +### registerSipUsername + +Register a SIP username to route to this agent. + +#### Signature + +```typescript +registerSipUsername(username: string): this +``` + +#### Parameters + + + The SIP username to register. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1040. + +*** + +### registerSwaigFunction + +Register a SwaigFunction instance or a raw function descriptor (DataMap). + +#### Signature + +```typescript +registerSwaigFunction(fn: Record | SwaigFunction): this +``` + +#### Parameters + + + +#### Returns + +`this` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 472. + +*** + +### registerVerbHandler + +Register a custom verb handler. +Mirrors Python's `register_verb_handler()`. + +#### Signature + +```typescript +registerVerbHandler(handler: SWMLVerbHandler): void +``` + +#### Parameters + + + The verb handler to register. + + +#### Returns + +`void` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 726. + +*** + +### removeFunction + +Remove a registered SWAIG function. Returns true when removed, +false when not found. (Python parity: +`ToolRegistry.remove_function`.) + +#### Signature + +```typescript +removeFunction(name: string): boolean +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 540. + +*** + +### removeSkill + +Remove a previously added skill by its instance ID. + +#### Signature + +```typescript +removeSkill(instanceId: string): Promise +``` + +#### Parameters + + + The unique instance ID of the skill to remove. + + +#### Returns + +`Promise` — True if the skill was found and removed. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1654. + +*** + +### removeSkillByName + +Remove a skill by its name (Python parity). + +Python's `remove_skill(skill_name)` removes by skill name. +The existing `removeSkill(instanceId)` removes by instance ID. +This method provides name-based removal for cross-SDK parity. + +#### Signature + +```typescript +removeSkillByName(skillName: string): Promise +``` + +#### Parameters + + + The skill name to remove. + + +#### Returns + +`Promise` — True if a skill with that name was found and removed. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1690. + +*** + +### renderDocument + +Render the SWML document as a JSON string. +Mirrors Python's `render_document()`. + +#### Signature + +```typescript +renderDocument(): string +``` + +#### Returns + +`string` — JSON-encoded SWML document. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 715. + +*** + +### renderSwml + +Render the complete SWML document by assembling all 5 phases: pre-answer, answer, +post-answer, AI, and post-AI verbs. + +#### Signature + +```typescript +renderSwml(callId?: string, modifications?: Record): string +``` + +#### Parameters + + + Optional call ID to use for session tokens; auto-generated if omitted. + + + + Optional dict returned from `onSwmlRequest` to merge into the AI verb config before rendering. Matches Python's `_render_swml(modifications)` semantics: `global_data` is deep-merged; all other keys override the AI config directly. + + +#### Returns + +`string` — The rendered SWML document as a JSON string. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2019. + +*** + +### resetContexts + +Remove all contexts, returning the agent to a no-contexts state. + +This is a convenience wrapper around `defineContexts().reset()`. +Use it in a dynamic config callback when you need to rebuild +contexts from scratch for a specific request. + +#### Signature + +```typescript +resetContexts(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 625. + +*** + +### resetDocument + +Reset the SWML document to an empty state. +Mirrors Python's `reset_document()`. + +#### Signature + +```typescript +resetDocument(): this +``` + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 679. + +*** + +### run + +Alias for [serve](/docs/sdk-reference/reference/typescript/prefabs/concierge-agent#serve). Starts the HTTP server. + +#### Signature + +```typescript +run(opts?: { ...2 fields }): Promise +``` + +#### Parameters + + + Optional host and port overrides. + + + + + + +#### Returns + +`Promise` — A promise that resolves once the server is running. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2702. + +*** + +### runServerless + +Handle a single serverless invocation (AWS Lambda, Google Cloud Functions, Azure Functions, or CGI). + +Matches Python `run(event, context)` when executed in a serverless environment. Python's +`run()` auto-detects the platform via `get_execution_mode()` and dispatches accordingly; +in TypeScript the serverless path is an **explicit** method so that `run()` keeps its +HTTP-server semantics and callers opt in to serverless dispatch deliberately. + +Platform detection follows the same environment-variable heuristics as Python's +`ServerlessMixin`: `AWS_LAMBDA_FUNCTION_NAME` → Lambda, `K_SERVICE` → GCF, +`FUNCTIONS_WORKER_RUNTIME` → Azure, `GATEWAY_INTERFACE` → CGI. + +Usage in a Lambda handler file: + +```ts +export const handler = (event: any, context: any) => agent.runServerless(event, context); +``` + +#### Signature + +```typescript +runServerless( + event: ServerlessEvent, + context?: unknown, + platform?: "lambda" | "gcf" | "azure" | "cgi" | "auto" +): Promise +``` + +#### Parameters + + + The serverless event payload (Lambda event, GCF request body, etc.). + + + + The serverless context object (Lambda context, Azure context, etc.). + + + + Optional platform override; defaults to 'auto' (environment detection). + + +#### Returns + +`Promise` — The normalized serverless response object. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2728. + +*** + +### serve + +Start the HTTP server and begin listening for requests. + +Uses `@hono/node-server` under the hood. When run in CLI mode +(`SWAIG_CLI_MODE=true`, set automatically by `npx swaig-test`), this is a +no-op so agent config can be inspected without starting a server. + +#### Signature + +```typescript +serve(opts?: { ...2 fields }): Promise +``` + +#### Parameters + + + Optional host/port overrides. Defaults to the values provided in the constructor options or the `PORT` environment variable. + + + + + + +#### Returns + +`Promise` — A promise that resolves once the server has begun listening. + +#### Examples + +```typescript +const agent = new AgentBase({ name: 'demo', port: 3000 }); +await agent.serve(); +// Or override at runtime: +await agent.serve({ port: 8080, host: '127.0.0.1' }); +``` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2679. + +*** + +### setDynamicConfigCallback + +Set a callback invoked on each SWML request to dynamically modify an ephemeral agent copy. + +The callback receives a clone of this agent — mutations apply only to the current +request, so you can vary prompt, tools, languages, params, or global data per call +without affecting the long-lived agent instance. + +#### Signature + +```typescript +setDynamicConfigCallback(cb: DynamicConfigCallback): this +``` + +#### Parameters + + + Callback receiving `(queryParams, bodyParams, headers, agent)` where `agent` is the ephemeral `AgentBase` copy to mutate. May be async. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Examples + +```typescript +agent.setDynamicConfigCallback((query, body, headers, agent) => { + const lang = query.lang ?? 'en'; + if (lang === 'es') { + (agent as AgentBase).setPromptText('Eres un asistente útil.'); + } +}); +``` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1723. + +*** + +### setFunctionIncludes + +Replace the entire list of function includes. +Each include must have a `url` and `functions` array. + +#### Signature + +```typescript +setFunctionIncludes(includes: FunctionInclude[]): this +``` + +#### Parameters + + + Array of function include objects. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 979. + +*** + +### setGlobalData + +Merge data into the global\_data object passed into the AI configuration. + +Matches Python `set_global_data` which calls `.update()` on the internal dict — +existing keys are preserved; incoming keys overwrite on collision. Skills and +other callers can each contribute keys without clobbering one another. + +If you need to replace the entire object, assign a new agent instance or use +`Object.assign(agent.globalData, {})` to clear first. + +#### Signature + +```typescript +setGlobalData(data: Record): this +``` + +#### Parameters + + + Key-value pairs to merge into global data. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 828. + +*** + +### setInternalFillers + +Set internal fillers for native SWAIG functions. + +Internal fillers are short phrases the AI agent speaks (via TTS) while +an internal/native function is running, so the caller doesn't hear +dead air during transitions or background work. + +Supported function names (matches the SWAIGInternalFiller schema): + +hangup — when the agent is hanging up +check\_time — when checking the time +wait\_for\_user — when waiting for user input +wait\_seconds — during deliberate pauses +adjust\_response\_latency — when adjusting response timing +next\_step — transitioning between steps in prompt.contexts +change\_context — switching between contexts in prompt.contexts +get\_visual\_input — processing visual input (enable\_vision=true) +get\_ideal\_strategy — thinking (enable\_thinking=true) + +Notably NOT supported: change\_step, gather\_submit, or arbitrary +user-defined SWAIG function names. The runtime only honors fillers +for the names listed above; everything else is silently ignored at +the SWML level. This method warns at registration time if you pass +an unknown name so you catch the typo early. + +#### Signature + +```typescript +setInternalFillers( + internalFillers: Record> +): this +``` + +#### Parameters + + + Map of function name to language-keyed filler phrases. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Examples + +```typescript +agent.setInternalFillers({ + next_step: { + 'en-US': ['Moving to the next step...', 'Great, let us continue...'], + 'es': ['Pasando al siguiente paso...'] + }, + check_time: { + 'en-US': ['Let me check the time...'] + } +}); +``` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 910. + +*** + +### setLanguageParams + +Set (or replace) the per-language `params` dict on an already-added +language. Useful when language entries are built up via [addLanguage](/docs/sdk-reference/reference/typescript/prefabs/concierge-agent#add-language) +first and engine-specific tuning is added later (e.g., from a config +loader). + +Python parity: `set_language_params(code, params)`. Passing an empty +object removes the `params` key entirely. Unknown codes are a no-op. + +#### Signature + +```typescript +setLanguageParams(code: string, params: Record): this +``` + +#### Parameters + + + Language code as previously passed to [addLanguage](/docs/sdk-reference/reference/typescript/prefabs/concierge-agent#add-language) (e.g. `"en-US"`). + + + + Engine-specific params dict to attach. Empty object removes the key. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 737. + +*** + +### setLanguages + +Replace all configured languages with a new list. + +#### Signature + +```typescript +setLanguages(languages: LanguageConfig[]): this +``` + +#### Parameters + + + Array of language configurations. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 718. + +*** + +### setNativeFunctions + +Set the list of native SWAIG function names (built-in platform functions). + +#### Signature + +```typescript +setNativeFunctions(funcs: string[]): this +``` + +#### Parameters + + + Array of native function names. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 848. + +*** + +### setOnRequestCallback + +Set a callback invoked per-request to dynamically build SWML. +When set, the static SwmlBuilder is ignored and the callback's +returned SwmlBuilder is used instead. + +#### Signature + +```typescript +setOnRequestCallback(cb: OnRequestCallback): this +``` + +#### Parameters + + + Callback receiving query params, body params, and headers. + + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 850. + +*** + +### setParam + +Set a single AI parameter (e.g. "temperature", "top\_p"). + +#### Signature + +```typescript +setParam(key: string, value: unknown): this +``` + +#### Parameters + + + Parameter name. + + + + Parameter value. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 800. + +*** + +### setParams + +Merge multiple AI parameters into the existing params object. + +#### Signature + +```typescript +setParams(params: Record): this +``` + +#### Parameters + + + Key-value pairs to merge. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 810. + +*** + +### setPostPrompt + +Set the post-prompt text evaluated after the call ends. + +#### Signature + +```typescript +setPostPrompt(text: string): this +``` + +#### Parameters + + + The post-prompt text to use. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 456. + +*** + +### setPostPromptLlmParams + +Merge LLM-specific parameters into the post-prompt configuration. + +#### Signature + +```typescript +setPostPromptLlmParams(params: Record): this +``` + +#### Parameters + + + Key-value LLM parameters to merge. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1001. + +*** + +### setPostPromptUrl + +Override the default post-prompt webhook URL with a custom one. + +#### Signature + +```typescript +setPostPromptUrl(url: string): this +``` + +#### Parameters + + + The custom post-prompt URL. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1847. + +*** + +### setPromptLlmParams + +Merge LLM-specific parameters into the main prompt configuration (e.g. model, temperature). + +#### Signature + +```typescript +setPromptLlmParams(params: Record): this +``` + +#### Parameters + + + Key-value LLM parameters to merge. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 991. + +*** + +### setPromptPom + +Set the prompt as a POM (Prompt Object Model) dictionary. + +Replaces the current POM sections with the provided structured data. +Each entry should have `title`, and optionally `body`, `bullets`, +`numbered`, `numberedBullets`, and `subsections`. + +#### Signature + +```typescript +setPromptPom(pom: Record[]): this +``` + +#### Parameters + + + Array of POM section dictionaries. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Throws + +- Error if POM mode is not enabled (`usePom: false`). + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 577. + +*** + +### setPromptText + +Set the main system prompt text for the AI. + +#### Signature + +```typescript +setPromptText(text: string): this +``` + +#### Parameters + + + The prompt text to use. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 446. + +*** + +### setPronunciations + +Replace all pronunciation rules with a new list. + +#### Signature + +```typescript +setPronunciations(rules: PronunciationRule[]): this +``` + +#### Parameters + + + Array of pronunciation rule objects. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 786. + +*** + +### setupGracefulShutdown + +Register process signal handlers for clean Kubernetes/Docker shutdown. +Handles SIGTERM and SIGINT, waits for a timeout, then exits. + +**Modifiers:** `static` + +#### Signature + +```typescript +setupGracefulShutdown(opts?: { ...1 fields }): void +``` + +#### Parameters + + + Optional timeout in milliseconds (default 5000). + + + + +#### Returns + +`void` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2751. + +*** + +### setWebHookUrl + +Override the default SWAIG webhook URL with a custom one. + +#### Signature + +```typescript +setWebHookUrl(url: string): this +``` + +#### Parameters + + + The custom webhook URL. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1837. + +*** + +### stop + +Stop the HTTP server. +Mirrors Python's `stop()`. + +#### Signature + +```typescript +stop(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 1009. + +*** + +### swaigPreDispatch + +Extension point: invoked between argument parsing and function dispatch +on POST /swaig. Returns \[target, shortCircuit]: when shortCircuit is +non-null, it's returned directly without dispatching. AgentBase may +override to add session-token validation or ephemeral dynamic-config. + +#### Signature + +```typescript +swaigPreDispatch( + _requestData: Record, + _funcName: string +): [SWMLService, unknown] +``` + +#### Parameters + + + + + +#### Returns + +`[SWMLService, unknown]` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 592. + +*** + +### updateGlobalData + +Merge additional entries into the existing global\_data object. + +#### Signature + +```typescript +updateGlobalData(data: Record): this +``` + +#### Parameters + + + Key-value pairs to merge into global data. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 838. + +*** + +### validateBasicAuth + +Override to add custom basic-auth validation logic beyond credential matching. + +#### Signature + +```typescript +validateBasicAuth( + _username: string, + _password: string +): boolean | Promise +``` + +#### Parameters + + + The username from the request. + + + + The password from the request. + + +#### Returns + +`boolean | Promise` — True if the credentials are valid; false to reject the request. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1980. + +*** + +### validateToolToken + +Validate a tool-call token for the given function. + +Mirrors Python reference `core/mixins/state_mixin.py validate_tool_token`: + +1. Unknown function → `false`. +2. Registered but non-secure → `true` without consulting SessionManager + (non-secure tools never require a token). +3. Raw-dict descriptors (e.g. DataMap) are treated as secure, matching + Python's `isinstance(func, dict) → is_secure = True` branch. +4. Missing token on a secure tool → `false`. +5. Otherwise delegate to `SessionManager.validateToolToken`. + +Divergences from the Python reference: + +- No debug-logging branch: `AgentBase` does not expose an agent-level + debug-mode flag, so the per-call debug telemetry Python emits is + omitted. `SessionManager` still logs its own validation outcomes. +- No token-derived call-id fallback: `SessionManager.debugToken` + truncates the embedded call-id for log safety, so an extracted value + cannot be round-tripped back through `validateToolToken`. The caller + is expected to supply a non-empty `callId`; an empty one is forwarded + unchanged and the underlying validator will reject it. + +#### Signature + +```typescript +validateToolToken(functionName: string, token: string, callId: string): boolean +``` + +#### Parameters + + + + + + + +#### Returns + +`boolean` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1455. + +## Functions + +### createConciergeAgent + +Factory function that creates and returns a new ConciergeAgent. + +#### Signature + +```typescript +createConciergeAgent(config: ConciergeConfig): ConciergeAgent +``` + +#### Parameters + + + Configuration for the concierge agent. + + +#### Returns + +`ConciergeAgent` — A configured ConciergeAgent instance. + +#### Source + +[`src/prefabs/ConciergeAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/ConciergeAgent.ts) + +Line 305. + +## Interfaces + +### ConciergeConfig + +Configuration for the [ConciergeAgent](/docs/sdk-reference/reference/typescript/prefabs/concierge-agent). + +#### Signature + +```typescript +interface ConciergeConfig +``` + +#### Properties + + + Additional AgentBase options forwarded to `super()`. + + + + Dictionary of amenities, each mapping to a dict of detail keys/values. + + + + Optional hours of operation by category (e.g. `{ default: "9 AM - 5 PM" }`). + + + + Agent display name (defaults to `"concierge"`). + + + + HTTP route for this agent (defaults to `"/concierge"`). + + + + List of services offered by the venue (required). + + + + Optional special instructions appended to the agent's instruction bullets. + + + + Name of the venue or business (required). + + + + Optional custom welcome message spoken as a non-bargeable static greeting. + + +#### Source + +[`src/prefabs/ConciergeAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/ConciergeAgent.ts) + +Line 16. + +## Source + +[`src/prefabs/ConciergeAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/ConciergeAgent.ts) + +Line 64. diff --git a/fern/products/sdk-reference/typescript/prefabs/faq-bot-agent/index.mdx b/fern/products/sdk-reference/typescript/prefabs/faq-bot-agent/index.mdx new file mode 100644 index 0000000000..ce9625f5b1 --- /dev/null +++ b/fern/products/sdk-reference/typescript/prefabs/faq-bot-agent/index.mdx @@ -0,0 +1,3789 @@ +--- +slug: "/reference/typescript/prefabs/faq-bot-agent" +title: "FAQBotAgent" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "prefabs.FAQBotAgent" + module: "prefabs" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/FAQBotAgent.ts" +--- +# `FAQBotAgent` + +Prefab agent that answers frequently asked questions using keyword matching with optional escalation to a live agent. + +Pass an array of `{ question, answer, keywords }` entries and the agent will +fuzzy-match inbound utterances against them. If no match crosses the confidence +threshold, the call can optionally escalate to a configured phone number. + +## Signature + +```typescript +class FAQBotAgent extends AgentBase +``` + +## Inheritance + +**Extends:** [AgentBase](/docs/sdk-reference/reference/typescript/agent-base) + +## Examples + +```typescript +import { FAQBotAgent } from '@signalwire/sdk'; + +const agent = new FAQBotAgent({ + faqs: [ + { + question: 'What are your business hours?', + answer: "We're open 9 AM to 5 PM Pacific, Monday through Friday.", + keywords: ['hours', 'open', 'closed', 'time'], + }, + { + question: 'Where are you located?', + answer: 'Our headquarters are in San Francisco, California.', + keywords: ['location', 'address', 'office'], + }, + ], + escalationNumber: '+15551234567', +}); + +await agent.serve({ port: 3000 }); +``` + +## Properties + + + Unique identifier for this agent instance. + + + + + + + + Domain name for SSL. Mirrors Python's `self.domain`. + + + + The configured FAQ entries. + + + + Check if full JSON Schema validation is enabled. Mirrors Python's `@property full_validation_enabled`. + + + + Host the server binds to. + + + + Structured logger instance for this agent. Override the inherited SWMLService logger with an AgentBase-tagged one. + + + + Service display name. + + + + Public accessor for the native functions list. Python exposes `self.native_functions` as a public read/write attribute. + + + + + + The personality description used in the prompt. + + + + Public accessor for the agent's POM as a [PromptObjectModel](/docs/sdk-reference/reference/typescript/pom/prompt-object-model) instance. Python parity: `agent.pom` instance attribute (agent\_base.py line 209) is a `signalwire.pom.pom.PromptObjectModel` when `use_pom=True`, or `None` otherwise. This getter returns the equivalent TypeScript `PromptObjectModel` instance — callers can use `addSection`, `findSection`, `renderMarkdown`, `renderXml`, `toJson`, `toYaml` exactly as in Python. The instance returned is a fresh snapshot built from the current `PomBuilder` state, so mutating it does not feed back into the agent's internal builder. To mutate the agent's prompt, use `promptAddSection` / `promptAddToSection` / `promptAddSubsection`. + + + + Port the server binds to. + + + + Static prompt sections: subclasses can define these declaratively. Each entry is applied via promptAddSection() in the constructor. + + + + Public accessor for the PromptManager (POM). Python exposes `self.pom` as a public attribute. This getter provides equivalent access for direct POM manipulation. + + + + HTTP route path. + + + + Schema validation utilities. Mirrors Python's `self.schema_utils`. + + + + Unified security configuration. Mirrors Python's `self.security`. + + + + Public read-only accessor for the SkillManager. Python exposes `self.skill_manager` as a public attribute. This getter provides equivalent read access. + + + + Path to SSL certificate. Mirrors Python's `self.ssl_cert_path`. + + + + Whether SSL is enabled. Mirrors Python's `self.ssl_enabled`. + + + + Path to SSL private key. Mirrors Python's `self.ssl_key_path`. + + + + Whether runner-up FAQ suggestions are appended to matches. + + + + The complete set of internal SWAIG function names that accept fillers, matching the SWAIGInternalFiller schema definition. Any name outside this set is silently ignored by the runtime — addInternalFiller / setInternalFillers warn if you pass an unknown name. + + + + + + + + Custom verb handler registry. Mirrors Python's `self.verb_registry`. + + +## Methods + +### addAnswerVerb + +Configure the answer verb (phase 2) with optional settings. + +#### Signature + +```typescript +addAnswerVerb(config?: Record): this +``` + +#### Parameters + + + Optional answer verb configuration. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1501. + +*** + +### addFunctionInclude + +Add a remote SWAIG function include reference. + +#### Signature + +```typescript +addFunctionInclude( + url: string, + functions: string[], + metaData?: Record +): this +``` + +#### Parameters + + + URL of the remote SWAIG endpoint. + + + + Function names available at that endpoint. + + + + Optional metadata to attach to the include. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 966. + +*** + +### addHint + +Add a single speech-recognition hint. + +#### Signature + +```typescript +addHint(hint: string): this +``` + +#### Parameters + + + Word or phrase to boost in speech recognition. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 653. + +*** + +### addHints + +Add multiple speech-recognition hints at once. + +#### Signature + +```typescript +addHints(hints: string[]): this +``` + +#### Parameters + + + Array of words or phrases to boost. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 663. + +*** + +### addInternalFiller + +Add internal filler phrases for a single internal function and language. + +See [setInternalFillers](/docs/sdk-reference/reference/typescript/prefabs/faq-bot-agent#set-internal-fillers) for the complete list of supported +functionName values and an explanation of what fillers do. + +#### Signature + +```typescript +addInternalFiller( + functionName: string, + languageCode: string, + fillers: string[] +): this +``` + +#### Parameters + + + One of the supported internal function names (see SUPPORTED\_INTERNAL\_FILLER\_NAMES). Names outside the supported set log a warning and are ignored by the runtime. + + + + BCP-47 language code for the fillers (e.g. 'en-US'). + + + + Array of filler phrases. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 943. + +*** + +### addLanguage + +Add a supported language to the AI configuration. + +#### Signature + +```typescript +addLanguage(config: LanguageConfig): this +``` + +#### Parameters + + + Language configuration including name, code, voice, and optional fillers. `params` may be set to attach engine-specific tuning (voice stability, similarity boost, model knobs, etc.); only emitted into SWML when non-empty so existing entries stay byte-identical when no params are passed (Python ai\_config\_mixin.py `add_language`). + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 694. + +*** + +### addMcpServer + +Add an external MCP server for tool discovery and invocation. +Tools are discovered via MCP protocol at session start and added to the AI's tool list. + +#### Signature + +```typescript +addMcpServer(url: string, opts?: { ...3 fields }): this +``` + +#### Parameters + + + MCP server HTTP endpoint URL + + + + Optional configuration: headers, resources, resourceVars + + + + + + + + +#### Returns + +`this` — This agent instance for chaining + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1146. + +*** + +### addPatternHint + +Add a pattern-based speech-recognition hint with find-and-replace behavior. + +#### Signature + +```typescript +addPatternHint(opts: { ...4 fields }): this +``` + +#### Parameters + + + Pattern hint configuration with a descriptive hint label, regex pattern, replacement string, and optional case-insensitive flag. + + + + + + + + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 674. + +*** + +### addPostAiVerb + +Add a SWML verb to execute after the AI verb (phase 5). + +#### Signature + +```typescript +addPostAiVerb(verbName: string, config: Record): this +``` + +#### Parameters + + + Name of the SWML verb. + + + + Verb configuration object. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1523. + +*** + +### addPostAnswerVerb + +Add a SWML verb to execute after the answer phase but before the AI verb (phase 3). + +#### Signature + +```typescript +addPostAnswerVerb( + verbName: string, + config: number | Record +): this +``` + +#### Parameters + + + Name of the SWML verb. + + + + Verb configuration object. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1512. + +*** + +### addPreAnswerVerb + +Add a SWML verb to execute before the answer phase (phase 1). + +#### Signature + +```typescript +addPreAnswerVerb( + verbName: string, + config: number | Record +): this +``` + +#### Parameters + + + Name of the SWML verb (e.g. "play", "record"). + + + + Verb configuration object. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1491. + +*** + +### addPronunciation + +Add a pronunciation override rule for the TTS engine. + +#### Signature + +```typescript +addPronunciation(rule: PronunciationRule): this +``` + +#### Parameters + + + Pronunciation rule specifying the text to replace and its substitute. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 774. + +*** + +### addSection + +Add a new named section to the SWML document. +Mirrors Python's `add_section()`. + +#### Signature + +```typescript +addSection(sectionName: string): this +``` + +#### Parameters + + + Name of the section to create. + + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 653. + +*** + +### addSkill + +Add a skill to this agent, registering its tools, prompt sections, hints, and global data. + +#### Signature + +```typescript +addSkill(skill: SkillBase): Promise +``` + +#### Parameters + + + The skill instance to add. + + +#### Returns + +`Promise` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1570. + +*** + +### addSkillByName + +Add a skill by its registered name, looking it up in the global SkillRegistry. + +Matches Python's `add_skill(skill_name, params)` which loads skills by string +name via the SkillManager registry. Throws a `ValueError`-equivalent if the +skill name is not found in the registry. + +Accepts a typed [SkillNameOrString](/docs/sdk-reference/reference/typescript/skills/skill-name#skill-name-or-string): one of the built-in +`SkillName` values (autocompleted, with a typo caught at compile +time) or any other string for custom / third-party skills. The value is +forwarded to the registry unchanged — the typing is erased at runtime, so +this matches Python's bare-`str` `add_skill(skill_name, params)`. + +#### Signature + +```typescript +addSkillByName( + skillName: SkillNameOrString, + params?: SkillConfig +): Promise +``` + +#### Parameters + + + The name the skill was registered under in the SkillRegistry. + + + + Optional configuration parameters forwarded to the skill factory. + + +#### Returns + +`Promise` — This agent instance for chaining. + +#### Throws + +- Error if no skill with the given name is registered. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1641. + +*** + +### addSwaigQueryParams + +Add extra query parameters appended to all SWAIG webhook URLs. + +#### Signature + +```typescript +addSwaigQueryParams(params: Record): this +``` + +#### Parameters + + + Key-value pairs to append as query parameters. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1733. + +*** + +### addVerb + +Add a verb to the SWML document. + +#### Signature + +```typescript +addVerb(name: string, config: unknown): this +``` + +#### Parameters + + + Verb name (e.g., 'answer', 'play', 'hangup'). + + + + Verb configuration. + + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 642. + +*** + +### addVerbToSection + +Add a verb to a specific named section. +Mirrors Python's `add_verb_to_section()`. + +#### Signature + +```typescript +addVerbToSection(sectionName: string, verbName: string, config: unknown): this +``` + +#### Parameters + + + Target section name (auto-created if missing). + + + + Verb name. + + + + Verb configuration. + + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 669. + +*** + +### asRouter + +Return this agent's Hono app for mounting as a sub-router in an AgentServer. + +#### Signature + +```typescript +asRouter(): Hono +``` + +#### Returns + +`Hono` — The Hono application instance. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2656. + +*** + +### autoMapSipUsernames + +Automatically register common SIP usernames based on this agent's +name and route. Derives cleaned variants (alphanumeric + underscore) +and registers each via `registerSipUsername()`. + +Port of Python's `auto_map_sip_usernames()`: + +- Registers a cleaned version of the agent name +- Registers a cleaned version of the route (if different from name) +- For names longer than 3 characters, also registers a vowel-stripped variant + +#### Signature + +```typescript +autoMapSipUsernames(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1058. + +*** + +### buildSwmlForRequest + +Service-side SWML-builder hook. Subclasses return a `SwmlBuilder` +to fully replace the document for this request, or `null` to fall +through to `setOnRequestCallback` or the static builder. + +This is distinct from the WebMixin `onRequest(requestData, +callbackPath)` hook on AgentBase (which mirrors Python's +`on_request -> on_swml_request` modification-merge contract). +Use this hook when you want to swap the entire SWML builder; use +`onRequest` / `onSwmlRequest` on AgentBase when you want to merge +targeted modifications into the rendered document. + +Default implementation returns `null` (no-op). + +#### Signature + +```typescript +buildSwmlForRequest( + _queryParams: Record, + _bodyParams: Record, + _headers: Record, + _callbackPath?: string +): SwmlBuilder | null +``` + +#### Parameters + + + + + + + + + +#### Returns + +`SwmlBuilder | null` — A `SwmlBuilder` whose document is sent as the response, or `null` to delegate to the next handler in the chain. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 834. + +*** + +### clearPostAiVerbs + +Remove all post-AI verbs. + +#### Signature + +```typescript +clearPostAiVerbs(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1550. + +*** + +### clearPostAnswerVerbs + +Remove all post-answer verbs. + +#### Signature + +```typescript +clearPostAnswerVerbs(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1541. + +*** + +### clearPreAnswerVerbs + +Remove all pre-answer verbs. + +#### Signature + +```typescript +clearPreAnswerVerbs(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1532. + +*** + +### clearSwaigQueryParams + +Clear all SWAIG query parameters. + +#### Signature + +```typescript +clearSwaigQueryParams(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1742. + +*** + +### constructor + +Create a FAQBotAgent with the specified FAQ entries and matching threshold. + +#### Signature + +```typescript +constructor(config: FAQBotConfig): FAQBotAgent +``` + +#### Parameters + + + Configuration including FAQ entries, threshold, and escalation settings. + + +#### Returns + +`FAQBotAgent` + +#### Source + +[`src/prefabs/FAQBotAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/FAQBotAgent.ts) + +Line 98. + +*** + +### createToolToken + +Mint a per-call SWAIG-function token via the agent's SessionManager. + +Mirrors Python reference `core/mixins/state_mixin.py _create_tool_token`: +delegates to `SessionManager.createToolToken` and returns an empty +string on any failure (Python catches all exceptions and returns ""). + +#### Signature + +```typescript +createToolToken(toolName: string, callId: string): string +``` + +#### Parameters + + + + + +#### Returns + +`string` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1475. + +*** + +### defineContexts + +Define or replace the contexts configuration for the AI verb. + +#### Signature + +```typescript +defineContexts( + contexts?: Record | ContextBuilder +): ContextBuilder +``` + +#### Parameters + + + An existing ContextBuilder instance or a plain object; a new ContextBuilder is created if omitted. + + +#### Returns + +`ContextBuilder` — The active ContextBuilder for further configuration. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 604. + +*** + +### defineTool + +Register a SWAIG tool (function) that the AI can invoke during a call. + +#### How this becomes a tool the model sees + +A SWAIG function is **exactly the same concept** as a "tool" in +native OpenAI / Anthropic tool calling. On every LLM turn, the SDK +renders each registered SWAIG function into the OpenAI tool schema: + +```json +{ +"type": "function", +"function": { +"name": "your_name_here", +"description": "your description text", +"parameters": { /* your JSON schema */ } +} +} +``` + +That schema goes to the model in the same API call that produces +the next assistant message. The model reads: + +- the **function `description`** to decide WHEN to call this tool +- each **parameter `description`** (inside the JSON schema) to + decide HOW to fill in each argument + +This means **descriptions are prompt engineering**, not developer +comments. A vague description is the #1 cause of "the model has the +right tool but doesn't call it" failures. + +##### Bad vs good descriptions + +```text +BAD : description: 'Lookup function' +GOOD: description: 'Look up a customer's account details by account +number. Use this BEFORE quoting any account-specific info +(balance, plan, status). Do not use for general product +questions.' + +BAD : parameters: { id: { type: 'string', description: 'the id' } } +GOOD: parameters: { account_number: { type: 'string', description: +'The customer's 8-digit account number, no dashes or spaces. +Ask the user if they don't provide it.' } } +``` + +##### Tool count matters + +LLM tool selection accuracy degrades past ~7-8 simultaneously-active +tools per call. Use Step.setFunctions() to partition tools across +steps so only the relevant subset is active at any moment. + +#### Signature + +```typescript +defineTool(opts: { ...11 fields }): this +``` + +#### Parameters + + + Tool definition including name, description, parameter schema, and handler callback. `description` and per-parameter `description` strings are LLM-facing prompt engineering. + + + + + Additional fields to pass through to the SWAIG function definition (Python `**swaig_fields` equivalent). + + + + + + + + + + + + + + + + + + + + External webhook URL; makes this an externally-hosted tool. + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1330. + +*** + +### defineTools + +Register the search\_faqs and optional escalate SWAIG tools. + +#### Signature + +```typescript +defineTools(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/prefabs/FAQBotAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/FAQBotAgent.ts) + +Line 285. + +*** + +### defineTypedTool + +Register a SWAIG tool with a typed handler that receives named parameters +instead of the standard `(args, rawData)` convention. + +The SDK wraps the handler to unpack the args dict into positional params. +If no `parameters` schema is provided, one is inferred from the handler's +source code (parameter names and default values). + +#### Signature + +```typescript +defineTypedTool(opts: { ...9 fields }): this +``` + +#### Parameters + + + Tool definition with a typed handler function. + + + + + + + The typed handler. Receives the AI-extracted arguments as named positional parameters (in declaration order), optionally with a trailing `rawData` record, and returns a SWAIG result. Precisely typed as [TypedToolHandler](/docs/sdk-reference/reference/typescript/type-inference#typed-tool-handler) rather than the bare `Function` so a non-callable — or a callable that returns nothing usable — is a compile-time error. + + + + + + + + + + + + + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1373. + +*** + +### enableDebugEvents + +Enable debug event webhooks for this agent. + +#### Signature + +```typescript +enableDebugEvents(level: number = 1): this +``` + +#### Parameters + + + Debug verbosity level (defaults to 1). + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1011. + +*** + +### enableDebugRoutes + +Register a callback function that determines routing based on POST data. + +When a routing callback is registered, an endpoint at the specified path +is created in `getApp()`. The callback receives the request body and returns +Enable debug routes for testing and development. + +This is a backward-compatibility stub matching the Python SDK. +In the TypeScript SDK, debug routes (health, ready, debug\_events) +are automatically registered in `getApp()`. + +#### Signature + +```typescript +enableDebugRoutes(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1773. + +*** + +### enableMcpServer + +Expose this agent's tools as an MCP server endpoint at /mcp. +Adds a JSON-RPC 2.0 endpoint that MCP clients (Claude Desktop, other agents) can connect to. + +#### Signature + +```typescript +enableMcpServer(): this +``` + +#### Returns + +`this` — This agent instance for chaining + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1160. + +*** + +### enableSipRouting + +Enable SIP routing for this agent. + +#### Signature + +```typescript +enableSipRouting(autoMap: boolean = true, path: string = '/sip'): this +``` + +#### Parameters + + + When true, automatically map SIP usernames to the agent route (defaults to true). + + + + HTTP path for the SIP routing endpoint (defaults to '/sip'). + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1025. + +*** + +### extractSipUsername + +Extract the SIP username from a request body's call.to field. + +**Modifiers:** `static` + +#### Signature + +```typescript +extractSipUsername(requestBody: Record): string | null +``` + +#### Parameters + + + The parsed request body containing call information. + + +#### Returns + +`string | null` — The extracted SIP username, or null if not found. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1122. + +*** + +### getAllFunctions + +Snapshot of all registered SWAIG functions keyed by name. +(Python parity: `ToolRegistry.get_all_functions`.) + +#### Signature + +```typescript +getAllFunctions(): Record> +``` + +#### Returns + +`Record>` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 529. + +*** + +### getApp + +Get or lazily create the Hono HTTP application with all routes, middleware, auth, and CORS. + +#### Signature + +```typescript +getApp(): Hono +``` + +#### Returns + +`Hono` — The configured Hono application instance. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2269. + +*** + +### getBasicAuthCredentials + +Get the basic-auth credentials used by this agent. + +#### Signature + + + + ```typescript + getBasicAuthCredentials(includeSource?: false): [string, string] + ``` + + + + ```typescript + getBasicAuthCredentials( + includeSource: true + ): [string, string, "provided" | "environment" | "generated"] + ``` + + + +#### Parameters (Overload 1) + + + When true, a third element indicating the credential source is appended. + + +#### Parameters (Overload 2) + + + When true, a third element indicating the credential source is appended. + + +#### Returns (Overload 1) + +`[string, string]` — A tuple of \[username, password] or \[username, password, source]. + +#### Returns (Overload 2) + +`[string, string, "provided" | "environment" | "generated"]` — A tuple of \[username, password] or \[username, password, source]. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2794. + +*** + +### getBuilder + +Get the underlying SwmlBuilder for direct manipulation. + +#### Signature + +```typescript +getBuilder(): SwmlBuilder +``` + +#### Returns + +`SwmlBuilder` — The SwmlBuilder instance. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 632. + +*** + +### getContexts + +Get the contexts dictionary as serialised SWML, or null when no +contexts have been defined yet. + +Matches Python `PromptManager.get_contexts()` which returns the +contexts dict or `None`. + +#### Signature + +```typescript +getContexts(): Record | null +``` + +#### Returns + +`Record | null` — Contexts dict, or null when no contexts are defined. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 641. + +*** + +### getDocument + +Get the SWML document as a dictionary. +Alias for `renderSwml()` that matches Python's `get_document()` name. + +#### Signature + +```typescript +getDocument(): Record +``` + +#### Returns + +`Record` — The SWML document. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 706. + +*** + +### getFullUrl + +Get the full external URL of this agent, using the proxy base URL if available. + +#### Signature + +```typescript +getFullUrl(includeAuth: boolean = false): string +``` + +#### Parameters + + + Whether to embed basic-auth credentials in the URL (defaults to false). + + +#### Returns + +`string` — The fully-qualified URL string. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1857. + +*** + +### getFunction + +Get a registered SWAIG function entry, or undefined. +(Python parity: `ToolRegistry.get_function`.) + +#### Signature + +```typescript +getFunction(name: string): Record | SwaigFunction | undefined +``` + +#### Parameters + + + +#### Returns + +`Record | SwaigFunction | undefined` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 523. + +*** + +### getLanguageParams + +Read the per-language `params` dict for a previously-added language. + +Python parity: `get_language_params(code)`. Returns `undefined` if the +code is unknown or the language has no params set — no exception path. + +#### Signature + +```typescript +getLanguageParams(code: string): Record | undefined +``` + +#### Parameters + + + Language code as previously passed to [addLanguage](/docs/sdk-reference/reference/typescript/prefabs/faq-bot-agent#add-language). + + +#### Returns + +`Record | undefined` — The params dict if set, `undefined` otherwise (including when the code is unknown). + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 760. + +*** + +### getMcpServers + +Get configured MCP servers (read-only copy). + +#### Signature + +```typescript +getMcpServers(): Record[] +``` + +#### Returns + +`Record[]` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1171. + +*** + +### getName + +Get the agent's display name. + +#### Signature + +```typescript +getName(): string +``` + +#### Returns + +`string` — The agent name string. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1559. + +*** + +### getPostPrompt + +Get the post-prompt text, if one has been set. + +#### Signature + +```typescript +getPostPrompt(): string | null +``` + +#### Returns + +`string | null` — The post-prompt string, or null if not configured. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 548. + +*** + +### getPrompt + +Get the fully rendered main prompt text. + +#### Signature + +```typescript +getPrompt(): string +``` + +#### Returns + +`string` — The assembled prompt string. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 520. + +*** + +### getPromptPom + +Get the raw POM (Prompt Object Model) structure as an array of section data objects, +when the agent is in POM mode and has at least one section. + +Matches Python `get_prompt()` which returns `Union[str, List[Dict]]` — a raw list when +in POM mode (via `pom.to_list()` / `pom.render_dict()`), or a string otherwise. +The TS `getPrompt()` always returns a string (rendered Markdown), so this companion +method exposes the raw POM structure for callers that need it for serialisation or +inspection (e.g. skills that inspect prompt sections). + +#### Signature + +```typescript +getPromptPom(): Record[] | null +``` + +#### Returns + +`Record[] | null` — An array of POM section data objects, or null if not in POM mode or POM is empty. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 536. + +*** + +### getRawPrompt + +Get the raw prompt text whatever `setPromptText` stored, or null when +no raw prompt has been set. + +Matches Python `PromptManager.get_raw_prompt()` which returns the raw +stored string or `None`. Use this instead of `getPrompt()` when you +need the unrendered text rather than the POM-rendered Markdown. + +#### Signature + +```typescript +getRawPrompt(): string | null +``` + +#### Returns + +`string | null` — The raw prompt string, or null if not set. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 562. + +*** + +### getRegisteredTools + +Get a summary of all registered tools with their names, descriptions, and +parameter schemas. Lifted from AgentBase so the swaig-test CLI can list +tools on a non-AgentBase SWMLService target (sidecar / standalone SWAIG +host). + +#### Signature + +```typescript +getRegisteredTools(): { description: string; name: string; parameters: Record }[] +``` + +#### Returns + +`{ description: string; name: string; parameters: Record }[]` — Array of tool descriptors. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 557. + +*** + +### getTool + +Look up a registered SwaigFunction by name. Lifted from AgentBase so +`swaig-test --exec ` works against a non-AgentBase SWMLService +target. + +#### Signature + +```typescript +getTool(name: string): SwaigFunction | undefined +``` + +#### Parameters + + + The tool name to search for. + + +#### Returns + +`SwaigFunction | undefined` — The SwaigFunction instance, or undefined if not found or not a SwaigFunction. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 581. + +*** + +### getTools + +Public access to the list of registered tools. + +In Python, `define_tools()` is public and returns `List[SWAIGFunction]`. +In TypeScript, `defineTools()` is a protected setup hook (void). This +method provides the equivalent public "get all tools" capability. + +#### Signature + +```typescript +getTools(): SwaigFunction[] +``` + +#### Returns + +`SwaigFunction[]` — Array of all registered SwaigFunction instances. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 371. + +*** + +### handleMcpRequest + +Handle an MCP JSON-RPC 2.0 request. Returns the response object. + +#### Signature + +```typescript +handleMcpRequest( + body: Record +): Promise> +``` + +#### Parameters + + + +#### Returns + +`Promise>` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1204. + +*** + +### hasFunction + +Whether a SWAIG function with the given name is registered. +(Python parity: `ToolRegistry.has_function`.) + +#### Signature + +```typescript +hasFunction(name: string): boolean +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 517. + +*** + +### hasSkill + +Check whether a skill with the given name is registered. + +Accepts a typed [SkillNameOrString](/docs/sdk-reference/reference/typescript/skills/skill-name#skill-name-or-string) so built-in names autocomplete +and a typo is a compile-time error; any other string is still accepted +(custom skills / parity with Python's bare-`str` `has_skill`). + +#### Signature + +```typescript +hasSkill(skillName: SkillNameOrString): boolean +``` + +#### Parameters + + + The skill name to check. + + +#### Returns + +`boolean` — True if a skill with that name exists. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1676. + +*** + +### hasTool + +Whether a tool with the given name is registered. + +#### Signature + +```typescript +hasTool(name: string): boolean +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 511. + +*** + +### isMcpServerEnabled + +Check if MCP server endpoint is enabled. + +#### Signature + +```typescript +isMcpServerEnabled(): boolean +``` + +#### Returns + +`boolean` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1166. + +*** + +### listSkills + +List all registered skills with their names, instance IDs, and initialization status. + +#### Signature + +```typescript +listSkills(): { initialized: boolean; instanceId: string; name: string }[] +``` + +#### Returns + +`{ initialized: boolean; instanceId: string; name: string }[]` — Array of skill descriptors. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1662. + +*** + +### listToolNames + +List registered tool names in insertion order (Map preserves it). + +#### Signature + +```typescript +listToolNames(): string[] +``` + +#### Returns + +`string[]` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 545. + +*** + +### manualSetProxyUrl + +Manually set the proxy base URL used for webhook URL generation. + +#### Signature + +```typescript +manualSetProxyUrl(url: string): this +``` + +#### Parameters + + + The external-facing base URL (trailing slashes are stripped). + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1754. + +*** + +### onDebugEvent + +Lifecycle hook called when a debug event webhook is received. Override in subclasses. + +#### Signature + +```typescript +onDebugEvent(_event: Record): void | Promise +``` + +#### Parameters + + + The debug event payload. + + +#### Returns + +`void | Promise` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1970. + +*** + +### onFunctionCall + +Hook called before each SWAIG function execution. Override in subclasses. + +**Behavioral note:** In the Python SDK, `on_function_call` IS the dispatcher +— it retrieves and executes the function, returning the result. In TypeScript, +`fn.execute()` is called separately after this hook. However, if this method +returns a non-void value, it is used as the result and the default execution +is skipped, enabling dispatch interception parity with Python. + +#### Signature + +```typescript +onFunctionCall( + _name: string, + _args: Record, + _rawData: Record +): void | Record | Promise> +``` + +#### Parameters + + + Name of the function about to execute. + + + + Parsed arguments for the function. + + + + The full raw SWAIG request payload. + + +#### Returns + +`void | Record | Promise>` — Optionally a result dict to short-circuit default execution, or void/undefined to proceed normally. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1999. + +*** + +### onRequest + +Lifecycle hook called when SWML is requested. Default delegates to +[onSwmlRequest](/docs/sdk-reference/reference/typescript/prefabs/faq-bot-agent#on-swml-request) and returns its result. Subclasses typically +override `onSwmlRequest` rather than this method. + +Matches Python `WebMixin.on_request(request_data, callback_path)`. The +cross-language API is the two-arg form; the Hono `context` argument is +a TypeScript-side extra preserved for callers that already have it but +is not part of the audited surface. + +#### Signature + +```typescript +onRequest( + requestData?: Record | null, + callbackPath?: string | null +): void | Record | Promise> +``` + +#### Parameters + + + The parsed request body. + + + + Optional callback path from the request. + + +#### Returns + +`void | Record | Promise>` — Optionally a dict of SWML modifications, or undefined for default rendering. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1935. + +*** + +### onSummary + +Process the interaction summary returned at the end of a call. +Logs structured summaries as JSON. Subclasses may override to persist or process. + +#### Signature + +```typescript +onSummary( + summary: Record | null, + _rawData: Record +): void | Promise +``` + +#### Parameters + + + + + +#### Returns + +`void | Promise` + +#### Source + +[`src/prefabs/FAQBotAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/FAQBotAgent.ts) + +Line 376. + +*** + +### onSwmlRequest + +Lifecycle hook called on every SWML request before rendering. Override in subclasses. + +May optionally return a modification dict that will be merged into the +rendered SWML document (matching Python's `Optional[dict]` return type). + +Matches Python `on_swml_request(request_data, callback_path, request)` — the third +parameter is the FastAPI `Request` in Python; here it is the raw Hono context object +so that subclasses can access query parameters (`context.req.query()`), raw request +headers (`context.req.raw.headers`), etc. + +#### Signature + +```typescript +onSwmlRequest( + _rawData: Record, + _callbackPath?: string, + _context?: any +): void | Record | Promise> +``` + +#### Parameters + + + The parsed request body. + + + + Optional callback path from the request. + + + + The raw Hono context object (c), providing access to headers and query params. + + +#### Returns + +`void | Record | Promise>` — Optionally a dict of SWML modifications, or void. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1958. + +*** + +### promptAddSection + +Add a new section to the prompt with optional body, bullets, and subsections. + +#### Signature + +```typescript +promptAddSection(title: string, opts?: { ...5 fields }): this +``` + +#### Parameters + + + Section heading. + + + + Optional section content including body text, bullet points, and subsections. + + + + + + + + + + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 467. + +*** + +### promptAddSubsection + +Add a subsection under an existing prompt section. + +#### Signature + +```typescript +promptAddSubsection( + parentTitle: string, + title: string, + opts?: { ...2 fields } +): this +``` + +#### Parameters + + + Title of the parent section. + + + + Title of the new subsection. + + + + Optional body text and bullet points for the subsection. + + + + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 502. + +*** + +### promptAddToSection + +Append content to an existing prompt section. + +#### Signature + +```typescript +promptAddToSection(title: string, opts?: { ...3 fields }): this +``` + +#### Parameters + + + Title of the section to append to. + + + + Content to add: body text, a single bullet, or multiple bullets. + + + + + + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 487. + +*** + +### promptHasSection + +Check whether a prompt section with the given title exists. + +#### Signature + +```typescript +promptHasSection(title: string): boolean +``` + +#### Parameters + + + Section title to look for. + + +#### Returns + +`boolean` — True if the section exists. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 512. + +*** + +### registerAdditionalRoutes + +Extension point: register additional Hono routes after SWMLService +mounts /health, /ready, /swaig, and the main route. AgentBase uses +this to add /post\_prompt, /check\_for\_input, /debug\_events, /mcp. + +#### Signature + +```typescript +registerAdditionalRoutes(_app: Hono): void +``` + +#### Parameters + + + +#### Returns + +`void` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 604. + +*** + +### registerRoutingCallback + +Register a callback at a specific HTTP path that decides how to route an +incoming request. + +When called, the endpoint at `path` will invoke `callback` with the parsed +request body. If `callback` returns a non-empty route string the server +responds with `{ action: "redirect", route }` so the platform can forward the +request to the right agent. If `callback` returns `null` / `undefined` the +agent's own SWML is returned instead (normal processing). + +Mirrors Python `swml_service.register_routing_callback` / +`web_mixin.register_routing_callback`. + +#### Signature + +```typescript +registerRoutingCallback(callback: RoutingCallback, path: string = '/sip'): this +``` + +#### Parameters + + + Function receiving the parsed request body and returning a route string to redirect, or null/undefined for normal processing. + + + + HTTP path where this callback endpoint is registered (default: '/sip'). + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1102. + +*** + +### registerSipUsername + +Register a SIP username to route to this agent. + +#### Signature + +```typescript +registerSipUsername(username: string): this +``` + +#### Parameters + + + The SIP username to register. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1040. + +*** + +### registerSwaigFunction + +Register a SwaigFunction instance or a raw function descriptor (DataMap). + +#### Signature + +```typescript +registerSwaigFunction(fn: Record | SwaigFunction): this +``` + +#### Parameters + + + +#### Returns + +`this` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 472. + +*** + +### registerVerbHandler + +Register a custom verb handler. +Mirrors Python's `register_verb_handler()`. + +#### Signature + +```typescript +registerVerbHandler(handler: SWMLVerbHandler): void +``` + +#### Parameters + + + The verb handler to register. + + +#### Returns + +`void` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 726. + +*** + +### removeFunction + +Remove a registered SWAIG function. Returns true when removed, +false when not found. (Python parity: +`ToolRegistry.remove_function`.) + +#### Signature + +```typescript +removeFunction(name: string): boolean +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 540. + +*** + +### removeSkill + +Remove a previously added skill by its instance ID. + +#### Signature + +```typescript +removeSkill(instanceId: string): Promise +``` + +#### Parameters + + + The unique instance ID of the skill to remove. + + +#### Returns + +`Promise` — True if the skill was found and removed. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1654. + +*** + +### removeSkillByName + +Remove a skill by its name (Python parity). + +Python's `remove_skill(skill_name)` removes by skill name. +The existing `removeSkill(instanceId)` removes by instance ID. +This method provides name-based removal for cross-SDK parity. + +#### Signature + +```typescript +removeSkillByName(skillName: string): Promise +``` + +#### Parameters + + + The skill name to remove. + + +#### Returns + +`Promise` — True if a skill with that name was found and removed. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1690. + +*** + +### renderDocument + +Render the SWML document as a JSON string. +Mirrors Python's `render_document()`. + +#### Signature + +```typescript +renderDocument(): string +``` + +#### Returns + +`string` — JSON-encoded SWML document. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 715. + +*** + +### renderSwml + +Render the complete SWML document by assembling all 5 phases: pre-answer, answer, +post-answer, AI, and post-AI verbs. + +#### Signature + +```typescript +renderSwml(callId?: string, modifications?: Record): string +``` + +#### Parameters + + + Optional call ID to use for session tokens; auto-generated if omitted. + + + + Optional dict returned from `onSwmlRequest` to merge into the AI verb config before rendering. Matches Python's `_render_swml(modifications)` semantics: `global_data` is deep-merged; all other keys override the AI config directly. + + +#### Returns + +`string` — The rendered SWML document as a JSON string. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2019. + +*** + +### resetContexts + +Remove all contexts, returning the agent to a no-contexts state. + +This is a convenience wrapper around `defineContexts().reset()`. +Use it in a dynamic config callback when you need to rebuild +contexts from scratch for a specific request. + +#### Signature + +```typescript +resetContexts(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 625. + +*** + +### resetDocument + +Reset the SWML document to an empty state. +Mirrors Python's `reset_document()`. + +#### Signature + +```typescript +resetDocument(): this +``` + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 679. + +*** + +### run + +Alias for [serve](/docs/sdk-reference/reference/typescript/prefabs/faq-bot-agent#serve). Starts the HTTP server. + +#### Signature + +```typescript +run(opts?: { ...2 fields }): Promise +``` + +#### Parameters + + + Optional host and port overrides. + + + + + + +#### Returns + +`Promise` — A promise that resolves once the server is running. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2702. + +*** + +### runServerless + +Handle a single serverless invocation (AWS Lambda, Google Cloud Functions, Azure Functions, or CGI). + +Matches Python `run(event, context)` when executed in a serverless environment. Python's +`run()` auto-detects the platform via `get_execution_mode()` and dispatches accordingly; +in TypeScript the serverless path is an **explicit** method so that `run()` keeps its +HTTP-server semantics and callers opt in to serverless dispatch deliberately. + +Platform detection follows the same environment-variable heuristics as Python's +`ServerlessMixin`: `AWS_LAMBDA_FUNCTION_NAME` → Lambda, `K_SERVICE` → GCF, +`FUNCTIONS_WORKER_RUNTIME` → Azure, `GATEWAY_INTERFACE` → CGI. + +Usage in a Lambda handler file: + +```ts +export const handler = (event: any, context: any) => agent.runServerless(event, context); +``` + +#### Signature + +```typescript +runServerless( + event: ServerlessEvent, + context?: unknown, + platform?: "lambda" | "gcf" | "azure" | "cgi" | "auto" +): Promise +``` + +#### Parameters + + + The serverless event payload (Lambda event, GCF request body, etc.). + + + + The serverless context object (Lambda context, Azure context, etc.). + + + + Optional platform override; defaults to 'auto' (environment detection). + + +#### Returns + +`Promise` — The normalized serverless response object. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2728. + +*** + +### serve + +Start the HTTP server and begin listening for requests. + +Uses `@hono/node-server` under the hood. When run in CLI mode +(`SWAIG_CLI_MODE=true`, set automatically by `npx swaig-test`), this is a +no-op so agent config can be inspected without starting a server. + +#### Signature + +```typescript +serve(opts?: { ...2 fields }): Promise +``` + +#### Parameters + + + Optional host/port overrides. Defaults to the values provided in the constructor options or the `PORT` environment variable. + + + + + + +#### Returns + +`Promise` — A promise that resolves once the server has begun listening. + +#### Examples + +```typescript +const agent = new AgentBase({ name: 'demo', port: 3000 }); +await agent.serve(); +// Or override at runtime: +await agent.serve({ port: 8080, host: '127.0.0.1' }); +``` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2679. + +*** + +### setDynamicConfigCallback + +Set a callback invoked on each SWML request to dynamically modify an ephemeral agent copy. + +The callback receives a clone of this agent — mutations apply only to the current +request, so you can vary prompt, tools, languages, params, or global data per call +without affecting the long-lived agent instance. + +#### Signature + +```typescript +setDynamicConfigCallback(cb: DynamicConfigCallback): this +``` + +#### Parameters + + + Callback receiving `(queryParams, bodyParams, headers, agent)` where `agent` is the ephemeral `AgentBase` copy to mutate. May be async. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Examples + +```typescript +agent.setDynamicConfigCallback((query, body, headers, agent) => { + const lang = query.lang ?? 'en'; + if (lang === 'es') { + (agent as AgentBase).setPromptText('Eres un asistente útil.'); + } +}); +``` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1723. + +*** + +### setFunctionIncludes + +Replace the entire list of function includes. +Each include must have a `url` and `functions` array. + +#### Signature + +```typescript +setFunctionIncludes(includes: FunctionInclude[]): this +``` + +#### Parameters + + + Array of function include objects. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 979. + +*** + +### setGlobalData + +Merge data into the global\_data object passed into the AI configuration. + +Matches Python `set_global_data` which calls `.update()` on the internal dict — +existing keys are preserved; incoming keys overwrite on collision. Skills and +other callers can each contribute keys without clobbering one another. + +If you need to replace the entire object, assign a new agent instance or use +`Object.assign(agent.globalData, {})` to clear first. + +#### Signature + +```typescript +setGlobalData(data: Record): this +``` + +#### Parameters + + + Key-value pairs to merge into global data. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 828. + +*** + +### setInternalFillers + +Set internal fillers for native SWAIG functions. + +Internal fillers are short phrases the AI agent speaks (via TTS) while +an internal/native function is running, so the caller doesn't hear +dead air during transitions or background work. + +Supported function names (matches the SWAIGInternalFiller schema): + +hangup — when the agent is hanging up +check\_time — when checking the time +wait\_for\_user — when waiting for user input +wait\_seconds — during deliberate pauses +adjust\_response\_latency — when adjusting response timing +next\_step — transitioning between steps in prompt.contexts +change\_context — switching between contexts in prompt.contexts +get\_visual\_input — processing visual input (enable\_vision=true) +get\_ideal\_strategy — thinking (enable\_thinking=true) + +Notably NOT supported: change\_step, gather\_submit, or arbitrary +user-defined SWAIG function names. The runtime only honors fillers +for the names listed above; everything else is silently ignored at +the SWML level. This method warns at registration time if you pass +an unknown name so you catch the typo early. + +#### Signature + +```typescript +setInternalFillers( + internalFillers: Record> +): this +``` + +#### Parameters + + + Map of function name to language-keyed filler phrases. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Examples + +```typescript +agent.setInternalFillers({ + next_step: { + 'en-US': ['Moving to the next step...', 'Great, let us continue...'], + 'es': ['Pasando al siguiente paso...'] + }, + check_time: { + 'en-US': ['Let me check the time...'] + } +}); +``` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 910. + +*** + +### setLanguageParams + +Set (or replace) the per-language `params` dict on an already-added +language. Useful when language entries are built up via [addLanguage](/docs/sdk-reference/reference/typescript/prefabs/faq-bot-agent#add-language) +first and engine-specific tuning is added later (e.g., from a config +loader). + +Python parity: `set_language_params(code, params)`. Passing an empty +object removes the `params` key entirely. Unknown codes are a no-op. + +#### Signature + +```typescript +setLanguageParams(code: string, params: Record): this +``` + +#### Parameters + + + Language code as previously passed to [addLanguage](/docs/sdk-reference/reference/typescript/prefabs/faq-bot-agent#add-language) (e.g. `"en-US"`). + + + + Engine-specific params dict to attach. Empty object removes the key. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 737. + +*** + +### setLanguages + +Replace all configured languages with a new list. + +#### Signature + +```typescript +setLanguages(languages: LanguageConfig[]): this +``` + +#### Parameters + + + Array of language configurations. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 718. + +*** + +### setNativeFunctions + +Set the list of native SWAIG function names (built-in platform functions). + +#### Signature + +```typescript +setNativeFunctions(funcs: string[]): this +``` + +#### Parameters + + + Array of native function names. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 848. + +*** + +### setOnRequestCallback + +Set a callback invoked per-request to dynamically build SWML. +When set, the static SwmlBuilder is ignored and the callback's +returned SwmlBuilder is used instead. + +#### Signature + +```typescript +setOnRequestCallback(cb: OnRequestCallback): this +``` + +#### Parameters + + + Callback receiving query params, body params, and headers. + + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 850. + +*** + +### setParam + +Set a single AI parameter (e.g. "temperature", "top\_p"). + +#### Signature + +```typescript +setParam(key: string, value: unknown): this +``` + +#### Parameters + + + Parameter name. + + + + Parameter value. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 800. + +*** + +### setParams + +Merge multiple AI parameters into the existing params object. + +#### Signature + +```typescript +setParams(params: Record): this +``` + +#### Parameters + + + Key-value pairs to merge. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 810. + +*** + +### setPostPrompt + +Set the post-prompt text evaluated after the call ends. + +#### Signature + +```typescript +setPostPrompt(text: string): this +``` + +#### Parameters + + + The post-prompt text to use. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 456. + +*** + +### setPostPromptLlmParams + +Merge LLM-specific parameters into the post-prompt configuration. + +#### Signature + +```typescript +setPostPromptLlmParams(params: Record): this +``` + +#### Parameters + + + Key-value LLM parameters to merge. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1001. + +*** + +### setPostPromptUrl + +Override the default post-prompt webhook URL with a custom one. + +#### Signature + +```typescript +setPostPromptUrl(url: string): this +``` + +#### Parameters + + + The custom post-prompt URL. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1847. + +*** + +### setPromptLlmParams + +Merge LLM-specific parameters into the main prompt configuration (e.g. model, temperature). + +#### Signature + +```typescript +setPromptLlmParams(params: Record): this +``` + +#### Parameters + + + Key-value LLM parameters to merge. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 991. + +*** + +### setPromptPom + +Set the prompt as a POM (Prompt Object Model) dictionary. + +Replaces the current POM sections with the provided structured data. +Each entry should have `title`, and optionally `body`, `bullets`, +`numbered`, `numberedBullets`, and `subsections`. + +#### Signature + +```typescript +setPromptPom(pom: Record[]): this +``` + +#### Parameters + + + Array of POM section dictionaries. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Throws + +- Error if POM mode is not enabled (`usePom: false`). + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 577. + +*** + +### setPromptText + +Set the main system prompt text for the AI. + +#### Signature + +```typescript +setPromptText(text: string): this +``` + +#### Parameters + + + The prompt text to use. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 446. + +*** + +### setPronunciations + +Replace all pronunciation rules with a new list. + +#### Signature + +```typescript +setPronunciations(rules: PronunciationRule[]): this +``` + +#### Parameters + + + Array of pronunciation rule objects. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 786. + +*** + +### setupGracefulShutdown + +Register process signal handlers for clean Kubernetes/Docker shutdown. +Handles SIGTERM and SIGINT, waits for a timeout, then exits. + +**Modifiers:** `static` + +#### Signature + +```typescript +setupGracefulShutdown(opts?: { ...1 fields }): void +``` + +#### Parameters + + + Optional timeout in milliseconds (default 5000). + + + + +#### Returns + +`void` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2751. + +*** + +### setWebHookUrl + +Override the default SWAIG webhook URL with a custom one. + +#### Signature + +```typescript +setWebHookUrl(url: string): this +``` + +#### Parameters + + + The custom webhook URL. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1837. + +*** + +### stop + +Stop the HTTP server. +Mirrors Python's `stop()`. + +#### Signature + +```typescript +stop(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 1009. + +*** + +### swaigPreDispatch + +Extension point: invoked between argument parsing and function dispatch +on POST /swaig. Returns \[target, shortCircuit]: when shortCircuit is +non-null, it's returned directly without dispatching. AgentBase may +override to add session-token validation or ephemeral dynamic-config. + +#### Signature + +```typescript +swaigPreDispatch( + _requestData: Record, + _funcName: string +): [SWMLService, unknown] +``` + +#### Parameters + + + + + +#### Returns + +`[SWMLService, unknown]` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 592. + +*** + +### updateGlobalData + +Merge additional entries into the existing global\_data object. + +#### Signature + +```typescript +updateGlobalData(data: Record): this +``` + +#### Parameters + + + Key-value pairs to merge into global data. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 838. + +*** + +### validateBasicAuth + +Override to add custom basic-auth validation logic beyond credential matching. + +#### Signature + +```typescript +validateBasicAuth( + _username: string, + _password: string +): boolean | Promise +``` + +#### Parameters + + + The username from the request. + + + + The password from the request. + + +#### Returns + +`boolean | Promise` — True if the credentials are valid; false to reject the request. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1980. + +*** + +### validateToolToken + +Validate a tool-call token for the given function. + +Mirrors Python reference `core/mixins/state_mixin.py validate_tool_token`: + +1. Unknown function → `false`. +2. Registered but non-secure → `true` without consulting SessionManager + (non-secure tools never require a token). +3. Raw-dict descriptors (e.g. DataMap) are treated as secure, matching + Python's `isinstance(func, dict) → is_secure = True` branch. +4. Missing token on a secure tool → `false`. +5. Otherwise delegate to `SessionManager.validateToolToken`. + +Divergences from the Python reference: + +- No debug-logging branch: `AgentBase` does not expose an agent-level + debug-mode flag, so the per-call debug telemetry Python emits is + omitted. `SessionManager` still logs its own validation outcomes. +- No token-derived call-id fallback: `SessionManager.debugToken` + truncates the embedded call-id for log safety, so an extracted value + cannot be round-tripped back through `validateToolToken`. The caller + is expected to supply a non-empty `callId`; an empty one is forwarded + unchanged and the underlying validator will reject it. + +#### Signature + +```typescript +validateToolToken(functionName: string, token: string, callId: string): boolean +``` + +#### Parameters + + + + + + + +#### Returns + +`boolean` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1455. + +## Functions + +### createFAQBotAgent + +Factory function that creates and returns a new FAQBotAgent. + +#### Signature + +```typescript +createFAQBotAgent(config: FAQBotConfig): FAQBotAgent +``` + +#### Parameters + + + Configuration for the FAQ bot agent. + + +#### Returns + +`FAQBotAgent` — A configured FAQBotAgent instance. + +#### Source + +[`src/prefabs/FAQBotAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/FAQBotAgent.ts) + +Line 411. + +## Interfaces + +### FAQBotConfig + +Configuration for the [FAQBotAgent](/docs/sdk-reference/reference/typescript/prefabs/faq-bot-agent). + +#### Signature + +```typescript +interface FAQBotConfig +``` + +#### Properties + + + Additional AgentBase options forwarded to super(). + + + + Message spoken when no FAQ matches the query. + + + + Phone number to transfer to on escalation. If not set, escalate tool is not registered. + + + + List of FAQ entries for the knowledge base. + + + + Agent display name (defaults to `"faq_bot"`). + + + + Custom personality description for the agent's "Personality" prompt section. + + + + HTTP route for this agent (defaults to `"/faq"`). + + + + Whether to suggest related questions alongside a match. Default `true`. + + + + Minimum match score (0-1) for an FAQ to be considered a match. Default 0.5. + + +#### Source + +[`src/prefabs/FAQBotAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/FAQBotAgent.ts) + +Line 30. + +*** + +### FAQEntry + +A single frequently-asked-question entry consumed by [FAQBotAgent](/docs/sdk-reference/reference/typescript/prefabs/faq-bot-agent). + +#### Signature + +```typescript +interface FAQEntry +``` + +#### Properties + + + The answer to provide when this FAQ matches. + + + + Taxonomy categories this FAQ belongs to (used for filtering and hints). + + + + Additional keywords to boost matching accuracy. + + + + The representative question text. + + +#### Source + +[`src/prefabs/FAQBotAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/FAQBotAgent.ts) + +Line 18. + +## Source + +[`src/prefabs/FAQBotAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/FAQBotAgent.ts) + +Line 83. diff --git a/fern/products/sdk-reference/typescript/prefabs/index.mdx b/fern/products/sdk-reference/typescript/prefabs/index.mdx new file mode 100644 index 0000000000..a7e2c72470 --- /dev/null +++ b/fern/products/sdk-reference/typescript/prefabs/index.mdx @@ -0,0 +1,25 @@ +--- +slug: "/reference/typescript/prefabs" +title: "prefabs" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "prefabs" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/index.ts" +--- +# `prefabs` + +## Signature + +```typescript +module prefabs +``` + +## Source + +[`src/prefabs/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/index.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/prefabs/info-gatherer-agent/index.mdx b/fern/products/sdk-reference/typescript/prefabs/info-gatherer-agent/index.mdx new file mode 100644 index 0000000000..56f7b78c8e --- /dev/null +++ b/fern/products/sdk-reference/typescript/prefabs/info-gatherer-agent/index.mdx @@ -0,0 +1,3825 @@ +--- +slug: "/reference/typescript/prefabs/info-gatherer-agent" +title: "InfoGathererAgent" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "prefabs.InfoGathererAgent" + module: "prefabs" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/InfoGathererAgent.ts" +--- +# `InfoGathererAgent` + +Prefab agent that gathers caller information one question at a time. + +Supports two modes: + +- **Static** — provide `questions` at construction; the same questions are + asked on every call. +- **Dynamic** — leave `questions` unset and register a callback via + `questionCallback` (or `setQuestionCallback()`); the callback decides which + questions to ask per incoming call based on query params, body, or headers. + +## Signature + +```typescript +class InfoGathererAgent extends AgentBase +``` + +## Inheritance + +**Extends:** [AgentBase](/docs/sdk-reference/reference/typescript/agent-base) + +## Examples + + + + ```typescript + import { InfoGathererAgent } from '@signalwire/sdk'; + + const agent = new InfoGathererAgent({ + questions: [ + { key_name: 'name', question_text: 'What is your name?' }, + { key_name: 'email', question_text: 'What is your email address?', confirm: true }, + { key_name: 'issue', question_text: 'How can we help?' }, + ], + }); + + await agent.serve({ port: 3000 }); + ``` + + + + ```typescript + const agent = new InfoGathererAgent({ + questionCallback: async (query) => { + if (query.intake === 'medical') { + return [ + { key_name: 'dob', question_text: 'Date of birth?' }, + { key_name: 'insurance_id', question_text: 'Insurance member ID?' }, + ]; + } + return [{ key_name: 'message', question_text: 'How can I help?' }]; + }, + }); + ``` + + + +## Properties + + + Unique identifier for this agent instance. + + + + + + + + Domain name for SSL. Mirrors Python's `self.domain`. + + + + Check if full JSON Schema validation is enabled. Mirrors Python's `@property full_validation_enabled`. + + + + Host the server binds to. + + + + Structured logger instance for this agent. Override the inherited SWMLService logger with an AgentBase-tagged one. + + + + Service display name. + + + + Public accessor for the native functions list. Python exposes `self.native_functions` as a public read/write attribute. + + + + + + Public accessor for the agent's POM as a [PromptObjectModel](/docs/sdk-reference/reference/typescript/pom/prompt-object-model) instance. Python parity: `agent.pom` instance attribute (agent\_base.py line 209) is a `signalwire.pom.pom.PromptObjectModel` when `use_pom=True`, or `None` otherwise. This getter returns the equivalent TypeScript `PromptObjectModel` instance — callers can use `addSection`, `findSection`, `renderMarkdown`, `renderXml`, `toJson`, `toYaml` exactly as in Python. The instance returned is a fresh snapshot built from the current `PomBuilder` state, so mutating it does not feed back into the agent's internal builder. To mutate the agent's prompt, use `promptAddSection` / `promptAddToSection` / `promptAddSubsection`. + + + + Port the server binds to. + + + + Static prompt sections: subclasses can define these declaratively. Each entry is applied via promptAddSection() in the constructor. + + + + Public accessor for the PromptManager (POM). Python exposes `self.pom` as a public attribute. This getter provides equivalent access for direct POM manipulation. + + + + HTTP route path. + + + + Schema validation utilities. Mirrors Python's `self.schema_utils`. + + + + Unified security configuration. Mirrors Python's `self.security`. + + + + Public read-only accessor for the SkillManager. Python exposes `self.skill_manager` as a public attribute. This getter provides equivalent read access. + + + + Path to SSL certificate. Mirrors Python's `self.ssl_cert_path`. + + + + Whether SSL is enabled. Mirrors Python's `self.ssl_enabled`. + + + + Path to SSL private key. Mirrors Python's `self.ssl_key_path`. + + + + The complete set of internal SWAIG function names that accept fillers, matching the SWAIGInternalFiller schema definition. Any name outside this set is silently ignored by the runtime — addInternalFiller / setInternalFillers warn if you pass an unknown name. + + + + + + + + Custom verb handler registry. Mirrors Python's `self.verb_registry`. + + +## Methods + +### addAnswerVerb + +Configure the answer verb (phase 2) with optional settings. + +#### Signature + +```typescript +addAnswerVerb(config?: Record): this +``` + +#### Parameters + + + Optional answer verb configuration. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1501. + +*** + +### addFunctionInclude + +Add a remote SWAIG function include reference. + +#### Signature + +```typescript +addFunctionInclude( + url: string, + functions: string[], + metaData?: Record +): this +``` + +#### Parameters + + + URL of the remote SWAIG endpoint. + + + + Function names available at that endpoint. + + + + Optional metadata to attach to the include. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 966. + +*** + +### addHint + +Add a single speech-recognition hint. + +#### Signature + +```typescript +addHint(hint: string): this +``` + +#### Parameters + + + Word or phrase to boost in speech recognition. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 653. + +*** + +### addHints + +Add multiple speech-recognition hints at once. + +#### Signature + +```typescript +addHints(hints: string[]): this +``` + +#### Parameters + + + Array of words or phrases to boost. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 663. + +*** + +### addInternalFiller + +Add internal filler phrases for a single internal function and language. + +See [setInternalFillers](/docs/sdk-reference/reference/typescript/prefabs/info-gatherer-agent#set-internal-fillers) for the complete list of supported +functionName values and an explanation of what fillers do. + +#### Signature + +```typescript +addInternalFiller( + functionName: string, + languageCode: string, + fillers: string[] +): this +``` + +#### Parameters + + + One of the supported internal function names (see SUPPORTED\_INTERNAL\_FILLER\_NAMES). Names outside the supported set log a warning and are ignored by the runtime. + + + + BCP-47 language code for the fillers (e.g. 'en-US'). + + + + Array of filler phrases. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 943. + +*** + +### addLanguage + +Add a supported language to the AI configuration. + +#### Signature + +```typescript +addLanguage(config: LanguageConfig): this +``` + +#### Parameters + + + Language configuration including name, code, voice, and optional fillers. `params` may be set to attach engine-specific tuning (voice stability, similarity boost, model knobs, etc.); only emitted into SWML when non-empty so existing entries stay byte-identical when no params are passed (Python ai\_config\_mixin.py `add_language`). + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 694. + +*** + +### addMcpServer + +Add an external MCP server for tool discovery and invocation. +Tools are discovered via MCP protocol at session start and added to the AI's tool list. + +#### Signature + +```typescript +addMcpServer(url: string, opts?: { ...3 fields }): this +``` + +#### Parameters + + + MCP server HTTP endpoint URL + + + + Optional configuration: headers, resources, resourceVars + + + + + + + + +#### Returns + +`this` — This agent instance for chaining + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1146. + +*** + +### addPatternHint + +Add a pattern-based speech-recognition hint with find-and-replace behavior. + +#### Signature + +```typescript +addPatternHint(opts: { ...4 fields }): this +``` + +#### Parameters + + + Pattern hint configuration with a descriptive hint label, regex pattern, replacement string, and optional case-insensitive flag. + + + + + + + + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 674. + +*** + +### addPostAiVerb + +Add a SWML verb to execute after the AI verb (phase 5). + +#### Signature + +```typescript +addPostAiVerb(verbName: string, config: Record): this +``` + +#### Parameters + + + Name of the SWML verb. + + + + Verb configuration object. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1523. + +*** + +### addPostAnswerVerb + +Add a SWML verb to execute after the answer phase but before the AI verb (phase 3). + +#### Signature + +```typescript +addPostAnswerVerb( + verbName: string, + config: number | Record +): this +``` + +#### Parameters + + + Name of the SWML verb. + + + + Verb configuration object. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1512. + +*** + +### addPreAnswerVerb + +Add a SWML verb to execute before the answer phase (phase 1). + +#### Signature + +```typescript +addPreAnswerVerb( + verbName: string, + config: number | Record +): this +``` + +#### Parameters + + + Name of the SWML verb (e.g. "play", "record"). + + + + Verb configuration object. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1491. + +*** + +### addPronunciation + +Add a pronunciation override rule for the TTS engine. + +#### Signature + +```typescript +addPronunciation(rule: PronunciationRule): this +``` + +#### Parameters + + + Pronunciation rule specifying the text to replace and its substitute. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 774. + +*** + +### addSection + +Add a new named section to the SWML document. +Mirrors Python's `add_section()`. + +#### Signature + +```typescript +addSection(sectionName: string): this +``` + +#### Parameters + + + Name of the section to create. + + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 653. + +*** + +### addSkill + +Add a skill to this agent, registering its tools, prompt sections, hints, and global data. + +#### Signature + +```typescript +addSkill(skill: SkillBase): Promise +``` + +#### Parameters + + + The skill instance to add. + + +#### Returns + +`Promise` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1570. + +*** + +### addSkillByName + +Add a skill by its registered name, looking it up in the global SkillRegistry. + +Matches Python's `add_skill(skill_name, params)` which loads skills by string +name via the SkillManager registry. Throws a `ValueError`-equivalent if the +skill name is not found in the registry. + +Accepts a typed [SkillNameOrString](/docs/sdk-reference/reference/typescript/skills/skill-name#skill-name-or-string): one of the built-in +`SkillName` values (autocompleted, with a typo caught at compile +time) or any other string for custom / third-party skills. The value is +forwarded to the registry unchanged — the typing is erased at runtime, so +this matches Python's bare-`str` `add_skill(skill_name, params)`. + +#### Signature + +```typescript +addSkillByName( + skillName: SkillNameOrString, + params?: SkillConfig +): Promise +``` + +#### Parameters + + + The name the skill was registered under in the SkillRegistry. + + + + Optional configuration parameters forwarded to the skill factory. + + +#### Returns + +`Promise` — This agent instance for chaining. + +#### Throws + +- Error if no skill with the given name is registered. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1641. + +*** + +### addSwaigQueryParams + +Add extra query parameters appended to all SWAIG webhook URLs. + +#### Signature + +```typescript +addSwaigQueryParams(params: Record): this +``` + +#### Parameters + + + Key-value pairs to append as query parameters. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1733. + +*** + +### addVerb + +Add a verb to the SWML document. + +#### Signature + +```typescript +addVerb(name: string, config: unknown): this +``` + +#### Parameters + + + Verb name (e.g., 'answer', 'play', 'hangup'). + + + + Verb configuration. + + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 642. + +*** + +### addVerbToSection + +Add a verb to a specific named section. +Mirrors Python's `add_verb_to_section()`. + +#### Signature + +```typescript +addVerbToSection(sectionName: string, verbName: string, config: unknown): this +``` + +#### Parameters + + + Target section name (auto-created if missing). + + + + Verb name. + + + + Verb configuration. + + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 669. + +*** + +### asRouter + +Return this agent's Hono app for mounting as a sub-router in an AgentServer. + +#### Signature + +```typescript +asRouter(): Hono +``` + +#### Returns + +`Hono` — The Hono application instance. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2656. + +*** + +### autoMapSipUsernames + +Automatically register common SIP usernames based on this agent's +name and route. Derives cleaned variants (alphanumeric + underscore) +and registers each via `registerSipUsername()`. + +Port of Python's `auto_map_sip_usernames()`: + +- Registers a cleaned version of the agent name +- Registers a cleaned version of the route (if different from name) +- For names longer than 3 characters, also registers a vowel-stripped variant + +#### Signature + +```typescript +autoMapSipUsernames(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1058. + +*** + +### buildSwmlForRequest + +Service-side SWML-builder hook. Subclasses return a `SwmlBuilder` +to fully replace the document for this request, or `null` to fall +through to `setOnRequestCallback` or the static builder. + +This is distinct from the WebMixin `onRequest(requestData, +callbackPath)` hook on AgentBase (which mirrors Python's +`on_request -> on_swml_request` modification-merge contract). +Use this hook when you want to swap the entire SWML builder; use +`onRequest` / `onSwmlRequest` on AgentBase when you want to merge +targeted modifications into the rendered document. + +Default implementation returns `null` (no-op). + +#### Signature + +```typescript +buildSwmlForRequest( + _queryParams: Record, + _bodyParams: Record, + _headers: Record, + _callbackPath?: string +): SwmlBuilder | null +``` + +#### Parameters + + + + + + + + + +#### Returns + +`SwmlBuilder | null` — A `SwmlBuilder` whose document is sent as the response, or `null` to delegate to the next handler in the chain. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 834. + +*** + +### clearPostAiVerbs + +Remove all post-AI verbs. + +#### Signature + +```typescript +clearPostAiVerbs(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1550. + +*** + +### clearPostAnswerVerbs + +Remove all post-answer verbs. + +#### Signature + +```typescript +clearPostAnswerVerbs(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1541. + +*** + +### clearPreAnswerVerbs + +Remove all pre-answer verbs. + +#### Signature + +```typescript +clearPreAnswerVerbs(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1532. + +*** + +### clearSwaigQueryParams + +Clear all SWAIG query parameters. + +#### Signature + +```typescript +clearSwaigQueryParams(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1742. + +*** + +### constructor + +Create an InfoGathererAgent. + +#### Signature + +```typescript +constructor(config: InfoGathererConfig = {}): InfoGathererAgent +``` + +#### Parameters + + + Either `questions` (static mode) or leave omitted and use `questionCallback` / `setQuestionCallback()` (dynamic mode). + + +#### Returns + +`InfoGathererAgent` + +#### Source + +[`src/prefabs/InfoGathererAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/InfoGathererAgent.ts) + +Line 116. + +*** + +### createToolToken + +Mint a per-call SWAIG-function token via the agent's SessionManager. + +Mirrors Python reference `core/mixins/state_mixin.py _create_tool_token`: +delegates to `SessionManager.createToolToken` and returns an empty +string on any failure (Python catches all exceptions and returns ""). + +#### Signature + +```typescript +createToolToken(toolName: string, callId: string): string +``` + +#### Parameters + + + + + +#### Returns + +`string` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1475. + +*** + +### defineContexts + +Define or replace the contexts configuration for the AI verb. + +#### Signature + +```typescript +defineContexts( + contexts?: Record | ContextBuilder +): ContextBuilder +``` + +#### Parameters + + + An existing ContextBuilder instance or a plain object; a new ContextBuilder is created if omitted. + + +#### Returns + +`ContextBuilder` — The active ContextBuilder for further configuration. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 604. + +*** + +### defineTool + +Register a SWAIG tool (function) that the AI can invoke during a call. + +#### How this becomes a tool the model sees + +A SWAIG function is **exactly the same concept** as a "tool" in +native OpenAI / Anthropic tool calling. On every LLM turn, the SDK +renders each registered SWAIG function into the OpenAI tool schema: + +```json +{ +"type": "function", +"function": { +"name": "your_name_here", +"description": "your description text", +"parameters": { /* your JSON schema */ } +} +} +``` + +That schema goes to the model in the same API call that produces +the next assistant message. The model reads: + +- the **function `description`** to decide WHEN to call this tool +- each **parameter `description`** (inside the JSON schema) to + decide HOW to fill in each argument + +This means **descriptions are prompt engineering**, not developer +comments. A vague description is the #1 cause of "the model has the +right tool but doesn't call it" failures. + +##### Bad vs good descriptions + +```text +BAD : description: 'Lookup function' +GOOD: description: 'Look up a customer's account details by account +number. Use this BEFORE quoting any account-specific info +(balance, plan, status). Do not use for general product +questions.' + +BAD : parameters: { id: { type: 'string', description: 'the id' } } +GOOD: parameters: { account_number: { type: 'string', description: +'The customer's 8-digit account number, no dashes or spaces. +Ask the user if they don't provide it.' } } +``` + +##### Tool count matters + +LLM tool selection accuracy degrades past ~7-8 simultaneously-active +tools per call. Use Step.setFunctions() to partition tools across +steps so only the relevant subset is active at any moment. + +#### Signature + +```typescript +defineTool(opts: { ...11 fields }): this +``` + +#### Parameters + + + Tool definition including name, description, parameter schema, and handler callback. `description` and per-parameter `description` strings are LLM-facing prompt engineering. + + + + + Additional fields to pass through to the SWAIG function definition (Python `**swaig_fields` equivalent). + + + + + + + + + + + + + + + + + + + + External webhook URL; makes this an externally-hosted tool. + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1330. + +*** + +### defineTools + +Register the `start_questions` and `submit_answer` SWAIG tools. + +#### Signature + +```typescript +defineTools(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/prefabs/InfoGathererAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/InfoGathererAgent.ts) + +Line 282. + +*** + +### defineTypedTool + +Register a SWAIG tool with a typed handler that receives named parameters +instead of the standard `(args, rawData)` convention. + +The SDK wraps the handler to unpack the args dict into positional params. +If no `parameters` schema is provided, one is inferred from the handler's +source code (parameter names and default values). + +#### Signature + +```typescript +defineTypedTool(opts: { ...9 fields }): this +``` + +#### Parameters + + + Tool definition with a typed handler function. + + + + + + + The typed handler. Receives the AI-extracted arguments as named positional parameters (in declaration order), optionally with a trailing `rawData` record, and returns a SWAIG result. Precisely typed as [TypedToolHandler](/docs/sdk-reference/reference/typescript/type-inference#typed-tool-handler) rather than the bare `Function` so a non-callable — or a callable that returns nothing usable — is a compile-time error. + + + + + + + + + + + + + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1373. + +*** + +### enableDebugEvents + +Enable debug event webhooks for this agent. + +#### Signature + +```typescript +enableDebugEvents(level: number = 1): this +``` + +#### Parameters + + + Debug verbosity level (defaults to 1). + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1011. + +*** + +### enableDebugRoutes + +Register a callback function that determines routing based on POST data. + +When a routing callback is registered, an endpoint at the specified path +is created in `getApp()`. The callback receives the request body and returns +Enable debug routes for testing and development. + +This is a backward-compatibility stub matching the Python SDK. +In the TypeScript SDK, debug routes (health, ready, debug\_events) +are automatically registered in `getApp()`. + +#### Signature + +```typescript +enableDebugRoutes(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1773. + +*** + +### enableMcpServer + +Expose this agent's tools as an MCP server endpoint at /mcp. +Adds a JSON-RPC 2.0 endpoint that MCP clients (Claude Desktop, other agents) can connect to. + +#### Signature + +```typescript +enableMcpServer(): this +``` + +#### Returns + +`this` — This agent instance for chaining + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1160. + +*** + +### enableSipRouting + +Enable SIP routing for this agent. + +#### Signature + +```typescript +enableSipRouting(autoMap: boolean = true, path: string = '/sip'): this +``` + +#### Parameters + + + When true, automatically map SIP usernames to the agent route (defaults to true). + + + + HTTP path for the SIP routing endpoint (defaults to '/sip'). + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1025. + +*** + +### extractSipUsername + +Extract the SIP username from a request body's call.to field. + +**Modifiers:** `static` + +#### Signature + +```typescript +extractSipUsername(requestBody: Record): string | null +``` + +#### Parameters + + + The parsed request body containing call information. + + +#### Returns + +`string | null` — The extracted SIP username, or null if not found. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1122. + +*** + +### getAllFunctions + +Snapshot of all registered SWAIG functions keyed by name. +(Python parity: `ToolRegistry.get_all_functions`.) + +#### Signature + +```typescript +getAllFunctions(): Record> +``` + +#### Returns + +`Record>` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 529. + +*** + +### getApp + +Get or lazily create the Hono HTTP application with all routes, middleware, auth, and CORS. + +#### Signature + +```typescript +getApp(): Hono +``` + +#### Returns + +`Hono` — The configured Hono application instance. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2269. + +*** + +### getBasicAuthCredentials + +Get the basic-auth credentials used by this agent. + +#### Signature + + + + ```typescript + getBasicAuthCredentials(includeSource?: false): [string, string] + ``` + + + + ```typescript + getBasicAuthCredentials( + includeSource: true + ): [string, string, "provided" | "environment" | "generated"] + ``` + + + +#### Parameters (Overload 1) + + + When true, a third element indicating the credential source is appended. + + +#### Parameters (Overload 2) + + + When true, a third element indicating the credential source is appended. + + +#### Returns (Overload 1) + +`[string, string]` — A tuple of \[username, password] or \[username, password, source]. + +#### Returns (Overload 2) + +`[string, string, "provided" | "environment" | "generated"]` — A tuple of \[username, password] or \[username, password, source]. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2794. + +*** + +### getBuilder + +Get the underlying SwmlBuilder for direct manipulation. + +#### Signature + +```typescript +getBuilder(): SwmlBuilder +``` + +#### Returns + +`SwmlBuilder` — The SwmlBuilder instance. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 632. + +*** + +### getContexts + +Get the contexts dictionary as serialised SWML, or null when no +contexts have been defined yet. + +Matches Python `PromptManager.get_contexts()` which returns the +contexts dict or `None`. + +#### Signature + +```typescript +getContexts(): Record | null +``` + +#### Returns + +`Record | null` — Contexts dict, or null when no contexts are defined. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 641. + +*** + +### getDocument + +Get the SWML document as a dictionary. +Alias for `renderSwml()` that matches Python's `get_document()` name. + +#### Signature + +```typescript +getDocument(): Record +``` + +#### Returns + +`Record` — The SWML document. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 706. + +*** + +### getFullUrl + +Get the full external URL of this agent, using the proxy base URL if available. + +#### Signature + +```typescript +getFullUrl(includeAuth: boolean = false): string +``` + +#### Parameters + + + Whether to embed basic-auth credentials in the URL (defaults to false). + + +#### Returns + +`string` — The fully-qualified URL string. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1857. + +*** + +### getFunction + +Get a registered SWAIG function entry, or undefined. +(Python parity: `ToolRegistry.get_function`.) + +#### Signature + +```typescript +getFunction(name: string): Record | SwaigFunction | undefined +``` + +#### Parameters + + + +#### Returns + +`Record | SwaigFunction | undefined` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 523. + +*** + +### getLanguageParams + +Read the per-language `params` dict for a previously-added language. + +Python parity: `get_language_params(code)`. Returns `undefined` if the +code is unknown or the language has no params set — no exception path. + +#### Signature + +```typescript +getLanguageParams(code: string): Record | undefined +``` + +#### Parameters + + + Language code as previously passed to [addLanguage](/docs/sdk-reference/reference/typescript/prefabs/info-gatherer-agent#add-language). + + +#### Returns + +`Record | undefined` — The params dict if set, `undefined` otherwise (including when the code is unknown). + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 760. + +*** + +### getMcpServers + +Get configured MCP servers (read-only copy). + +#### Signature + +```typescript +getMcpServers(): Record[] +``` + +#### Returns + +`Record[]` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1171. + +*** + +### getName + +Get the agent's display name. + +#### Signature + +```typescript +getName(): string +``` + +#### Returns + +`string` — The agent name string. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1559. + +*** + +### getPostPrompt + +Get the post-prompt text, if one has been set. + +#### Signature + +```typescript +getPostPrompt(): string | null +``` + +#### Returns + +`string | null` — The post-prompt string, or null if not configured. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 548. + +*** + +### getPrompt + +Get the fully rendered main prompt text. + +#### Signature + +```typescript +getPrompt(): string +``` + +#### Returns + +`string` — The assembled prompt string. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 520. + +*** + +### getPromptPom + +Get the raw POM (Prompt Object Model) structure as an array of section data objects, +when the agent is in POM mode and has at least one section. + +Matches Python `get_prompt()` which returns `Union[str, List[Dict]]` — a raw list when +in POM mode (via `pom.to_list()` / `pom.render_dict()`), or a string otherwise. +The TS `getPrompt()` always returns a string (rendered Markdown), so this companion +method exposes the raw POM structure for callers that need it for serialisation or +inspection (e.g. skills that inspect prompt sections). + +#### Signature + +```typescript +getPromptPom(): Record[] | null +``` + +#### Returns + +`Record[] | null` — An array of POM section data objects, or null if not in POM mode or POM is empty. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 536. + +*** + +### getRawPrompt + +Get the raw prompt text whatever `setPromptText` stored, or null when +no raw prompt has been set. + +Matches Python `PromptManager.get_raw_prompt()` which returns the raw +stored string or `None`. Use this instead of `getPrompt()` when you +need the unrendered text rather than the POM-rendered Markdown. + +#### Signature + +```typescript +getRawPrompt(): string | null +``` + +#### Returns + +`string | null` — The raw prompt string, or null if not set. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 562. + +*** + +### getRegisteredTools + +Get a summary of all registered tools with their names, descriptions, and +parameter schemas. Lifted from AgentBase so the swaig-test CLI can list +tools on a non-AgentBase SWMLService target (sidecar / standalone SWAIG +host). + +#### Signature + +```typescript +getRegisteredTools(): { description: string; name: string; parameters: Record }[] +``` + +#### Returns + +`{ description: string; name: string; parameters: Record }[]` — Array of tool descriptors. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 557. + +*** + +### getTool + +Look up a registered SwaigFunction by name. Lifted from AgentBase so +`swaig-test --exec ` works against a non-AgentBase SWMLService +target. + +#### Signature + +```typescript +getTool(name: string): SwaigFunction | undefined +``` + +#### Parameters + + + The tool name to search for. + + +#### Returns + +`SwaigFunction | undefined` — The SwaigFunction instance, or undefined if not found or not a SwaigFunction. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 581. + +*** + +### getTools + +Public access to the list of registered tools. + +In Python, `define_tools()` is public and returns `List[SWAIGFunction]`. +In TypeScript, `defineTools()` is a protected setup hook (void). This +method provides the equivalent public "get all tools" capability. + +#### Signature + +```typescript +getTools(): SwaigFunction[] +``` + +#### Returns + +`SwaigFunction[]` — Array of all registered SwaigFunction instances. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 371. + +*** + +### handleMcpRequest + +Handle an MCP JSON-RPC 2.0 request. Returns the response object. + +#### Signature + +```typescript +handleMcpRequest( + body: Record +): Promise> +``` + +#### Parameters + + + +#### Returns + +`Promise>` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1204. + +*** + +### hasFunction + +Whether a SWAIG function with the given name is registered. +(Python parity: `ToolRegistry.has_function`.) + +#### Signature + +```typescript +hasFunction(name: string): boolean +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 517. + +*** + +### hasSkill + +Check whether a skill with the given name is registered. + +Accepts a typed [SkillNameOrString](/docs/sdk-reference/reference/typescript/skills/skill-name#skill-name-or-string) so built-in names autocomplete +and a typo is a compile-time error; any other string is still accepted +(custom skills / parity with Python's bare-`str` `has_skill`). + +#### Signature + +```typescript +hasSkill(skillName: SkillNameOrString): boolean +``` + +#### Parameters + + + The skill name to check. + + +#### Returns + +`boolean` — True if a skill with that name exists. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1676. + +*** + +### hasTool + +Whether a tool with the given name is registered. + +#### Signature + +```typescript +hasTool(name: string): boolean +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 511. + +*** + +### isMcpServerEnabled + +Check if MCP server endpoint is enabled. + +#### Signature + +```typescript +isMcpServerEnabled(): boolean +``` + +#### Returns + +`boolean` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1166. + +*** + +### listSkills + +List all registered skills with their names, instance IDs, and initialization status. + +#### Signature + +```typescript +listSkills(): { initialized: boolean; instanceId: string; name: string }[] +``` + +#### Returns + +`{ initialized: boolean; instanceId: string; name: string }[]` — Array of skill descriptors. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1662. + +*** + +### listToolNames + +List registered tool names in insertion order (Map preserves it). + +#### Signature + +```typescript +listToolNames(): string[] +``` + +#### Returns + +`string[]` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 545. + +*** + +### manualSetProxyUrl + +Manually set the proxy base URL used for webhook URL generation. + +#### Signature + +```typescript +manualSetProxyUrl(url: string): this +``` + +#### Parameters + + + The external-facing base URL (trailing slashes are stripped). + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1754. + +*** + +### onDebugEvent + +Lifecycle hook called when a debug event webhook is received. Override in subclasses. + +#### Signature + +```typescript +onDebugEvent(_event: Record): void | Promise +``` + +#### Parameters + + + The debug event payload. + + +#### Returns + +`void | Promise` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1970. + +*** + +### onFunctionCall + +Hook called before each SWAIG function execution. Override in subclasses. + +**Behavioral note:** In the Python SDK, `on_function_call` IS the dispatcher +— it retrieves and executes the function, returning the result. In TypeScript, +`fn.execute()` is called separately after this hook. However, if this method +returns a non-void value, it is used as the result and the default execution +is skipped, enabling dispatch interception parity with Python. + +#### Signature + +```typescript +onFunctionCall( + _name: string, + _args: Record, + _rawData: Record +): void | Record | Promise> +``` + +#### Parameters + + + Name of the function about to execute. + + + + Parsed arguments for the function. + + + + The full raw SWAIG request payload. + + +#### Returns + +`void | Record | Promise>` — Optionally a result dict to short-circuit default execution, or void/undefined to proceed normally. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1999. + +*** + +### onRequest + +Lifecycle hook called when SWML is requested. Default delegates to +[onSwmlRequest](/docs/sdk-reference/reference/typescript/prefabs/info-gatherer-agent#on-swml-request) and returns its result. Subclasses typically +override `onSwmlRequest` rather than this method. + +Matches Python `WebMixin.on_request(request_data, callback_path)`. The +cross-language API is the two-arg form; the Hono `context` argument is +a TypeScript-side extra preserved for callers that already have it but +is not part of the audited surface. + +#### Signature + +```typescript +onRequest( + requestData?: Record | null, + callbackPath?: string | null +): void | Record | Promise> +``` + +#### Parameters + + + The parsed request body. + + + + Optional callback path from the request. + + +#### Returns + +`void | Record | Promise>` — Optionally a dict of SWML modifications, or undefined for default rendering. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1935. + +*** + +### onSummary + +Lifecycle hook called when a post-prompt summary is received. Override in subclasses. + +Invoked once at the end of a call when the AI has produced a structured summary +(configured via `setPostPrompt()` / `setPostPromptJson()`). Use this hook to persist +call data, notify other systems, or trigger follow-up workflows. + +#### Signature + +```typescript +onSummary( + _summary: Record | null, + _rawData: Record +): void | Promise +``` + +#### Parameters + + + Parsed summary object (JSON when the post-prompt requests structured output), or `null` if extraction/parsing failed. + + + + Full raw post-prompt payload received from the platform, including call metadata, conversation history, and the summary text. + + +#### Returns + +`void | Promise` + +#### Examples + +```typescript +class MyAgent extends AgentBase { + async onSummary(summary, rawData) { + if (!summary) return; + await db.calls.insert({ + callSid: rawData.call_id, + summary, + endedAt: new Date(), + }); + } +} +``` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1916. + +*** + +### onSwmlRequest + +Handle dynamic configuration using the registered callback. Returns the +per-request global\_data payload which AgentBase merges into the SWML +response. Mirrors Python's `on_swml_request` return-dict contract. + +#### Signature + +```typescript +onSwmlRequest( + rawData: Record +): Promise> +``` + +#### Parameters + + + +#### Returns + +`Promise>` + +#### Source + +[`src/prefabs/InfoGathererAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/InfoGathererAgent.ts) + +Line 223. + +*** + +### promptAddSection + +Add a new section to the prompt with optional body, bullets, and subsections. + +#### Signature + +```typescript +promptAddSection(title: string, opts?: { ...5 fields }): this +``` + +#### Parameters + + + Section heading. + + + + Optional section content including body text, bullet points, and subsections. + + + + + + + + + + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 467. + +*** + +### promptAddSubsection + +Add a subsection under an existing prompt section. + +#### Signature + +```typescript +promptAddSubsection( + parentTitle: string, + title: string, + opts?: { ...2 fields } +): this +``` + +#### Parameters + + + Title of the parent section. + + + + Title of the new subsection. + + + + Optional body text and bullet points for the subsection. + + + + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 502. + +*** + +### promptAddToSection + +Append content to an existing prompt section. + +#### Signature + +```typescript +promptAddToSection(title: string, opts?: { ...3 fields }): this +``` + +#### Parameters + + + Title of the section to append to. + + + + Content to add: body text, a single bullet, or multiple bullets. + + + + + + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 487. + +*** + +### promptHasSection + +Check whether a prompt section with the given title exists. + +#### Signature + +```typescript +promptHasSection(title: string): boolean +``` + +#### Parameters + + + Section title to look for. + + +#### Returns + +`boolean` — True if the section exists. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 512. + +*** + +### registerAdditionalRoutes + +Extension point: register additional Hono routes after SWMLService +mounts /health, /ready, /swaig, and the main route. AgentBase uses +this to add /post\_prompt, /check\_for\_input, /debug\_events, /mcp. + +#### Signature + +```typescript +registerAdditionalRoutes(_app: Hono): void +``` + +#### Parameters + + + +#### Returns + +`void` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 604. + +*** + +### registerRoutingCallback + +Register a callback at a specific HTTP path that decides how to route an +incoming request. + +When called, the endpoint at `path` will invoke `callback` with the parsed +request body. If `callback` returns a non-empty route string the server +responds with `{ action: "redirect", route }` so the platform can forward the +request to the right agent. If `callback` returns `null` / `undefined` the +agent's own SWML is returned instead (normal processing). + +Mirrors Python `swml_service.register_routing_callback` / +`web_mixin.register_routing_callback`. + +#### Signature + +```typescript +registerRoutingCallback(callback: RoutingCallback, path: string = '/sip'): this +``` + +#### Parameters + + + Function receiving the parsed request body and returning a route string to redirect, or null/undefined for normal processing. + + + + HTTP path where this callback endpoint is registered (default: '/sip'). + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1102. + +*** + +### registerSipUsername + +Register a SIP username to route to this agent. + +#### Signature + +```typescript +registerSipUsername(username: string): this +``` + +#### Parameters + + + The SIP username to register. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1040. + +*** + +### registerSwaigFunction + +Register a SwaigFunction instance or a raw function descriptor (DataMap). + +#### Signature + +```typescript +registerSwaigFunction(fn: Record | SwaigFunction): this +``` + +#### Parameters + + + +#### Returns + +`this` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 472. + +*** + +### registerVerbHandler + +Register a custom verb handler. +Mirrors Python's `register_verb_handler()`. + +#### Signature + +```typescript +registerVerbHandler(handler: SWMLVerbHandler): void +``` + +#### Parameters + + + The verb handler to register. + + +#### Returns + +`void` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 726. + +*** + +### removeFunction + +Remove a registered SWAIG function. Returns true when removed, +false when not found. (Python parity: +`ToolRegistry.remove_function`.) + +#### Signature + +```typescript +removeFunction(name: string): boolean +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 540. + +*** + +### removeSkill + +Remove a previously added skill by its instance ID. + +#### Signature + +```typescript +removeSkill(instanceId: string): Promise +``` + +#### Parameters + + + The unique instance ID of the skill to remove. + + +#### Returns + +`Promise` — True if the skill was found and removed. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1654. + +*** + +### removeSkillByName + +Remove a skill by its name (Python parity). + +Python's `remove_skill(skill_name)` removes by skill name. +The existing `removeSkill(instanceId)` removes by instance ID. +This method provides name-based removal for cross-SDK parity. + +#### Signature + +```typescript +removeSkillByName(skillName: string): Promise +``` + +#### Parameters + + + The skill name to remove. + + +#### Returns + +`Promise` — True if a skill with that name was found and removed. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1690. + +*** + +### renderDocument + +Render the SWML document as a JSON string. +Mirrors Python's `render_document()`. + +#### Signature + +```typescript +renderDocument(): string +``` + +#### Returns + +`string` — JSON-encoded SWML document. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 715. + +*** + +### renderSwml + +Render the complete SWML document by assembling all 5 phases: pre-answer, answer, +post-answer, AI, and post-AI verbs. + +#### Signature + +```typescript +renderSwml(callId?: string, modifications?: Record): string +``` + +#### Parameters + + + Optional call ID to use for session tokens; auto-generated if omitted. + + + + Optional dict returned from `onSwmlRequest` to merge into the AI verb config before rendering. Matches Python's `_render_swml(modifications)` semantics: `global_data` is deep-merged; all other keys override the AI config directly. + + +#### Returns + +`string` — The rendered SWML document as a JSON string. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2019. + +*** + +### resetContexts + +Remove all contexts, returning the agent to a no-contexts state. + +This is a convenience wrapper around `defineContexts().reset()`. +Use it in a dynamic config callback when you need to rebuild +contexts from scratch for a specific request. + +#### Signature + +```typescript +resetContexts(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 625. + +*** + +### resetDocument + +Reset the SWML document to an empty state. +Mirrors Python's `reset_document()`. + +#### Signature + +```typescript +resetDocument(): this +``` + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 679. + +*** + +### run + +Alias for [serve](/docs/sdk-reference/reference/typescript/prefabs/info-gatherer-agent#serve). Starts the HTTP server. + +#### Signature + +```typescript +run(opts?: { ...2 fields }): Promise +``` + +#### Parameters + + + Optional host and port overrides. + + + + + + +#### Returns + +`Promise` — A promise that resolves once the server is running. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2702. + +*** + +### runServerless + +Handle a single serverless invocation (AWS Lambda, Google Cloud Functions, Azure Functions, or CGI). + +Matches Python `run(event, context)` when executed in a serverless environment. Python's +`run()` auto-detects the platform via `get_execution_mode()` and dispatches accordingly; +in TypeScript the serverless path is an **explicit** method so that `run()` keeps its +HTTP-server semantics and callers opt in to serverless dispatch deliberately. + +Platform detection follows the same environment-variable heuristics as Python's +`ServerlessMixin`: `AWS_LAMBDA_FUNCTION_NAME` → Lambda, `K_SERVICE` → GCF, +`FUNCTIONS_WORKER_RUNTIME` → Azure, `GATEWAY_INTERFACE` → CGI. + +Usage in a Lambda handler file: + +```ts +export const handler = (event: any, context: any) => agent.runServerless(event, context); +``` + +#### Signature + +```typescript +runServerless( + event: ServerlessEvent, + context?: unknown, + platform?: "lambda" | "gcf" | "azure" | "cgi" | "auto" +): Promise +``` + +#### Parameters + + + The serverless event payload (Lambda event, GCF request body, etc.). + + + + The serverless context object (Lambda context, Azure context, etc.). + + + + Optional platform override; defaults to 'auto' (environment detection). + + +#### Returns + +`Promise` — The normalized serverless response object. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2728. + +*** + +### serve + +Start the HTTP server and begin listening for requests. + +Uses `@hono/node-server` under the hood. When run in CLI mode +(`SWAIG_CLI_MODE=true`, set automatically by `npx swaig-test`), this is a +no-op so agent config can be inspected without starting a server. + +#### Signature + +```typescript +serve(opts?: { ...2 fields }): Promise +``` + +#### Parameters + + + Optional host/port overrides. Defaults to the values provided in the constructor options or the `PORT` environment variable. + + + + + + +#### Returns + +`Promise` — A promise that resolves once the server has begun listening. + +#### Examples + +```typescript +const agent = new AgentBase({ name: 'demo', port: 3000 }); +await agent.serve(); +// Or override at runtime: +await agent.serve({ port: 8080, host: '127.0.0.1' }); +``` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2679. + +*** + +### setDynamicConfigCallback + +Set a callback invoked on each SWML request to dynamically modify an ephemeral agent copy. + +The callback receives a clone of this agent — mutations apply only to the current +request, so you can vary prompt, tools, languages, params, or global data per call +without affecting the long-lived agent instance. + +#### Signature + +```typescript +setDynamicConfigCallback(cb: DynamicConfigCallback): this +``` + +#### Parameters + + + Callback receiving `(queryParams, bodyParams, headers, agent)` where `agent` is the ephemeral `AgentBase` copy to mutate. May be async. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Examples + +```typescript +agent.setDynamicConfigCallback((query, body, headers, agent) => { + const lang = query.lang ?? 'en'; + if (lang === 'es') { + (agent as AgentBase).setPromptText('Eres un asistente útil.'); + } +}); +``` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1723. + +*** + +### setFunctionIncludes + +Replace the entire list of function includes. +Each include must have a `url` and `functions` array. + +#### Signature + +```typescript +setFunctionIncludes(includes: FunctionInclude[]): this +``` + +#### Parameters + + + Array of function include objects. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 979. + +*** + +### setGlobalData + +Merge data into the global\_data object passed into the AI configuration. + +Matches Python `set_global_data` which calls `.update()` on the internal dict — +existing keys are preserved; incoming keys overwrite on collision. Skills and +other callers can each contribute keys without clobbering one another. + +If you need to replace the entire object, assign a new agent instance or use +`Object.assign(agent.globalData, {})` to clear first. + +#### Signature + +```typescript +setGlobalData(data: Record): this +``` + +#### Parameters + + + Key-value pairs to merge into global data. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 828. + +*** + +### setInternalFillers + +Set internal fillers for native SWAIG functions. + +Internal fillers are short phrases the AI agent speaks (via TTS) while +an internal/native function is running, so the caller doesn't hear +dead air during transitions or background work. + +Supported function names (matches the SWAIGInternalFiller schema): + +hangup — when the agent is hanging up +check\_time — when checking the time +wait\_for\_user — when waiting for user input +wait\_seconds — during deliberate pauses +adjust\_response\_latency — when adjusting response timing +next\_step — transitioning between steps in prompt.contexts +change\_context — switching between contexts in prompt.contexts +get\_visual\_input — processing visual input (enable\_vision=true) +get\_ideal\_strategy — thinking (enable\_thinking=true) + +Notably NOT supported: change\_step, gather\_submit, or arbitrary +user-defined SWAIG function names. The runtime only honors fillers +for the names listed above; everything else is silently ignored at +the SWML level. This method warns at registration time if you pass +an unknown name so you catch the typo early. + +#### Signature + +```typescript +setInternalFillers( + internalFillers: Record> +): this +``` + +#### Parameters + + + Map of function name to language-keyed filler phrases. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Examples + +```typescript +agent.setInternalFillers({ + next_step: { + 'en-US': ['Moving to the next step...', 'Great, let us continue...'], + 'es': ['Pasando al siguiente paso...'] + }, + check_time: { + 'en-US': ['Let me check the time...'] + } +}); +``` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 910. + +*** + +### setLanguageParams + +Set (or replace) the per-language `params` dict on an already-added +language. Useful when language entries are built up via [addLanguage](/docs/sdk-reference/reference/typescript/prefabs/info-gatherer-agent#add-language) +first and engine-specific tuning is added later (e.g., from a config +loader). + +Python parity: `set_language_params(code, params)`. Passing an empty +object removes the `params` key entirely. Unknown codes are a no-op. + +#### Signature + +```typescript +setLanguageParams(code: string, params: Record): this +``` + +#### Parameters + + + Language code as previously passed to [addLanguage](/docs/sdk-reference/reference/typescript/prefabs/info-gatherer-agent#add-language) (e.g. `"en-US"`). + + + + Engine-specific params dict to attach. Empty object removes the key. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 737. + +*** + +### setLanguages + +Replace all configured languages with a new list. + +#### Signature + +```typescript +setLanguages(languages: LanguageConfig[]): this +``` + +#### Parameters + + + Array of language configurations. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 718. + +*** + +### setNativeFunctions + +Set the list of native SWAIG function names (built-in platform functions). + +#### Signature + +```typescript +setNativeFunctions(funcs: string[]): this +``` + +#### Parameters + + + Array of native function names. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 848. + +*** + +### setOnRequestCallback + +Set a callback invoked per-request to dynamically build SWML. +When set, the static SwmlBuilder is ignored and the callback's +returned SwmlBuilder is used instead. + +#### Signature + +```typescript +setOnRequestCallback(cb: OnRequestCallback): this +``` + +#### Parameters + + + Callback receiving query params, body params, and headers. + + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 850. + +*** + +### setParam + +Set a single AI parameter (e.g. "temperature", "top\_p"). + +#### Signature + +```typescript +setParam(key: string, value: unknown): this +``` + +#### Parameters + + + Parameter name. + + + + Parameter value. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 800. + +*** + +### setParams + +Merge multiple AI parameters into the existing params object. + +#### Signature + +```typescript +setParams(params: Record): this +``` + +#### Parameters + + + Key-value pairs to merge. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 810. + +*** + +### setPostPrompt + +Set the post-prompt text evaluated after the call ends. + +#### Signature + +```typescript +setPostPrompt(text: string): this +``` + +#### Parameters + + + The post-prompt text to use. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 456. + +*** + +### setPostPromptLlmParams + +Merge LLM-specific parameters into the post-prompt configuration. + +#### Signature + +```typescript +setPostPromptLlmParams(params: Record): this +``` + +#### Parameters + + + Key-value LLM parameters to merge. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1001. + +*** + +### setPostPromptUrl + +Override the default post-prompt webhook URL with a custom one. + +#### Signature + +```typescript +setPostPromptUrl(url: string): this +``` + +#### Parameters + + + The custom post-prompt URL. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1847. + +*** + +### setPromptLlmParams + +Merge LLM-specific parameters into the main prompt configuration (e.g. model, temperature). + +#### Signature + +```typescript +setPromptLlmParams(params: Record): this +``` + +#### Parameters + + + Key-value LLM parameters to merge. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 991. + +*** + +### setPromptPom + +Set the prompt as a POM (Prompt Object Model) dictionary. + +Replaces the current POM sections with the provided structured data. +Each entry should have `title`, and optionally `body`, `bullets`, +`numbered`, `numberedBullets`, and `subsections`. + +#### Signature + +```typescript +setPromptPom(pom: Record[]): this +``` + +#### Parameters + + + Array of POM section dictionaries. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Throws + +- Error if POM mode is not enabled (`usePom: false`). + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 577. + +*** + +### setPromptText + +Set the main system prompt text for the AI. + +#### Signature + +```typescript +setPromptText(text: string): this +``` + +#### Parameters + + + The prompt text to use. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 446. + +*** + +### setPronunciations + +Replace all pronunciation rules with a new list. + +#### Signature + +```typescript +setPronunciations(rules: PronunciationRule[]): this +``` + +#### Parameters + + + Array of pronunciation rule objects. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 786. + +*** + +### setQuestionCallback + +Register a callback for dynamic question configuration. The callback is +invoked on each incoming SWML request with the query params, body, and +headers, and must return the list of questions to ask on that call. +Mirrors Python `set_question_callback`. + +#### Signature + +```typescript +setQuestionCallback(callback: InfoGathererQuestionCallback): this +``` + +#### Parameters + + + +#### Returns + +`this` + +#### Source + +[`src/prefabs/InfoGathererAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/InfoGathererAgent.ts) + +Line 159. + +*** + +### setupGracefulShutdown + +Register process signal handlers for clean Kubernetes/Docker shutdown. +Handles SIGTERM and SIGINT, waits for a timeout, then exits. + +**Modifiers:** `static` + +#### Signature + +```typescript +setupGracefulShutdown(opts?: { ...1 fields }): void +``` + +#### Parameters + + + Optional timeout in milliseconds (default 5000). + + + + +#### Returns + +`void` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2751. + +*** + +### setWebHookUrl + +Override the default SWAIG webhook URL with a custom one. + +#### Signature + +```typescript +setWebHookUrl(url: string): this +``` + +#### Parameters + + + The custom webhook URL. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1837. + +*** + +### stop + +Stop the HTTP server. +Mirrors Python's `stop()`. + +#### Signature + +```typescript +stop(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 1009. + +*** + +### swaigPreDispatch + +Extension point: invoked between argument parsing and function dispatch +on POST /swaig. Returns \[target, shortCircuit]: when shortCircuit is +non-null, it's returned directly without dispatching. AgentBase may +override to add session-token validation or ephemeral dynamic-config. + +#### Signature + +```typescript +swaigPreDispatch( + _requestData: Record, + _funcName: string +): [SWMLService, unknown] +``` + +#### Parameters + + + + + +#### Returns + +`[SWMLService, unknown]` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 592. + +*** + +### updateGlobalData + +Merge additional entries into the existing global\_data object. + +#### Signature + +```typescript +updateGlobalData(data: Record): this +``` + +#### Parameters + + + Key-value pairs to merge into global data. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 838. + +*** + +### validateBasicAuth + +Override to add custom basic-auth validation logic beyond credential matching. + +#### Signature + +```typescript +validateBasicAuth( + _username: string, + _password: string +): boolean | Promise +``` + +#### Parameters + + + The username from the request. + + + + The password from the request. + + +#### Returns + +`boolean | Promise` — True if the credentials are valid; false to reject the request. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1980. + +*** + +### validateToolToken + +Validate a tool-call token for the given function. + +Mirrors Python reference `core/mixins/state_mixin.py validate_tool_token`: + +1. Unknown function → `false`. +2. Registered but non-secure → `true` without consulting SessionManager + (non-secure tools never require a token). +3. Raw-dict descriptors (e.g. DataMap) are treated as secure, matching + Python's `isinstance(func, dict) → is_secure = True` branch. +4. Missing token on a secure tool → `false`. +5. Otherwise delegate to `SessionManager.validateToolToken`. + +Divergences from the Python reference: + +- No debug-logging branch: `AgentBase` does not expose an agent-level + debug-mode flag, so the per-call debug telemetry Python emits is + omitted. `SessionManager` still logs its own validation outcomes. +- No token-derived call-id fallback: `SessionManager.debugToken` + truncates the embedded call-id for log safety, so an extracted value + cannot be round-tripped back through `validateToolToken`. The caller + is expected to supply a non-empty `callId`; an empty one is forwarded + unchanged and the underlying validator will reject it. + +#### Signature + +```typescript +validateToolToken(functionName: string, token: string, callId: string): boolean +``` + +#### Parameters + + + + + + + +#### Returns + +`boolean` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1455. + +## Functions + +### createInfoGathererAgent + +Factory function that creates and returns a new InfoGathererAgent. + +#### Signature + +```typescript +createInfoGathererAgent(config: InfoGathererConfig = {}): InfoGathererAgent +``` + +#### Parameters + + + Configuration for the info gatherer agent. + + +#### Returns + +`InfoGathererAgent` — A configured InfoGathererAgent instance. + +#### Source + +[`src/prefabs/InfoGathererAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/InfoGathererAgent.ts) + +Line 375. + +## Type Aliases + +### InfoGathererQuestionCallback + +Callback invoked on each incoming SWML request to produce the list of +questions for that request. Mirrors Python's `set_question_callback`. + +#### Signature + +```typescript +type InfoGathererQuestionCallback = (queryParams: Record, bodyParams: Record, headers: Record) => InfoGathererQuestion[] | Promise +``` + +#### Source + +[`src/prefabs/InfoGathererAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/InfoGathererAgent.ts) + +Line 31. + +## Interfaces + +### InfoGathererConfig + +Configuration for the InfoGathererAgent. + +#### Signature + +```typescript +interface InfoGathererConfig +``` + +#### Properties + + + Additional AgentBase options forwarded to super(). + + + + Agent display name (defaults to `"info_gatherer"`). + + + + Convenience alternative to calling `setQuestionCallback()` after construction. Only consulted when `questions` is not provided. + + + + Optional list of questions to ask. When omitted, the agent runs in dynamic mode and resolves questions via the callback registered with `setQuestionCallback()` (or via `questionCallback` below). + + + + HTTP route for this agent (defaults to `"/info_gatherer"`). + + +#### Source + +[`src/prefabs/InfoGathererAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/InfoGathererAgent.ts) + +Line 38. + +*** + +### InfoGathererQuestion + +A single question in the information-gathering flow. + +#### Signature + +```typescript +interface InfoGathererQuestion +``` + +#### Properties + + + When true, the agent insists the caller confirms before submitting. + + + + Identifier used as the key when storing the caller's answer. + + + + The question text to ask the caller. + + +#### Source + +[`src/prefabs/InfoGathererAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/InfoGathererAgent.ts) + +Line 17. + +## Source + +[`src/prefabs/InfoGathererAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/InfoGathererAgent.ts) + +Line 107. diff --git a/fern/products/sdk-reference/typescript/prefabs/receptionist-agent/index.mdx b/fern/products/sdk-reference/typescript/prefabs/receptionist-agent/index.mdx new file mode 100644 index 0000000000..d4530c2d30 --- /dev/null +++ b/fern/products/sdk-reference/typescript/prefabs/receptionist-agent/index.mdx @@ -0,0 +1,3774 @@ +--- +slug: "/reference/typescript/prefabs/receptionist-agent" +title: "ReceptionistAgent" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "prefabs.ReceptionistAgent" + module: "prefabs" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/ReceptionistAgent.ts" +--- +# `ReceptionistAgent` + +Prefab agent that greets callers, collects basic information, and transfers them to the correct department. + +Optionally supports visitor check-in — when enabled, the agent can collect a visitor's name +and purpose-of-visit and invoke a callback (e.g., notify reception via Slack, write to a +database). If not transferring, the call ends after check-in. + +## Signature + +```typescript +class ReceptionistAgent extends AgentBase +``` + +## Inheritance + +**Extends:** [AgentBase](/docs/sdk-reference/reference/typescript/agent-base) + +## Examples + +```typescript +import { ReceptionistAgent } from '@signalwire/sdk'; + +const agent = new ReceptionistAgent({ + companyName: 'Acme Co', + greeting: 'Thanks for calling Acme! How can I direct your call?', + departments: [ + { name: 'sales', description: 'New customer inquiries', number: '+15551112222' }, + { name: 'support', description: 'Existing customer help', number: '+15553334444' }, + { name: 'billing', description: 'Billing and payments', number: '+15555556666' }, + ], + checkInEnabled: true, + onVisitorCheckIn: async (visitor) => { + await notifyFrontDesk(visitor); + }, +}); + +await agent.serve({ port: 3000 }); +``` + +## Properties + + + Unique identifier for this agent instance. + + + + + + + + Domain name for SSL. Mirrors Python's `self.domain`. + + + + Check if full JSON Schema validation is enabled. Mirrors Python's `@property full_validation_enabled`. + + + + Host the server binds to. + + + + Structured logger instance for this agent. Override the inherited SWMLService logger with an AgentBase-tagged one. + + + + Service display name. + + + + Public accessor for the native functions list. Python exposes `self.native_functions` as a public read/write attribute. + + + + + + Public accessor for the agent's POM as a [PromptObjectModel](/docs/sdk-reference/reference/typescript/pom/prompt-object-model) instance. Python parity: `agent.pom` instance attribute (agent\_base.py line 209) is a `signalwire.pom.pom.PromptObjectModel` when `use_pom=True`, or `None` otherwise. This getter returns the equivalent TypeScript `PromptObjectModel` instance — callers can use `addSection`, `findSection`, `renderMarkdown`, `renderXml`, `toJson`, `toYaml` exactly as in Python. The instance returned is a fresh snapshot built from the current `PomBuilder` state, so mutating it does not feed back into the agent's internal builder. To mutate the agent's prompt, use `promptAddSection` / `promptAddToSection` / `promptAddSubsection`. + + + + Port the server binds to. + + + + Static prompt sections: subclasses can define these declaratively. Each entry is applied via promptAddSection() in the constructor. + + + + Public accessor for the PromptManager (POM). Python exposes `self.pom` as a public attribute. This getter provides equivalent access for direct POM manipulation. + + + + HTTP route path. + + + + Schema validation utilities. Mirrors Python's `self.schema_utils`. + + + + Unified security configuration. Mirrors Python's `self.security`. + + + + Public read-only accessor for the SkillManager. Python exposes `self.skill_manager` as a public attribute. This getter provides equivalent read access. + + + + Path to SSL certificate. Mirrors Python's `self.ssl_cert_path`. + + + + Whether SSL is enabled. Mirrors Python's `self.ssl_enabled`. + + + + Path to SSL private key. Mirrors Python's `self.ssl_key_path`. + + + + The complete set of internal SWAIG function names that accept fillers, matching the SWAIGInternalFiller schema definition. Any name outside this set is silently ignored by the runtime — addInternalFiller / setInternalFillers warn if you pass an unknown name. + + + + + + + + Custom verb handler registry. Mirrors Python's `self.verb_registry`. + + +## Methods + +### addAnswerVerb + +Configure the answer verb (phase 2) with optional settings. + +#### Signature + +```typescript +addAnswerVerb(config?: Record): this +``` + +#### Parameters + + + Optional answer verb configuration. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1501. + +*** + +### addFunctionInclude + +Add a remote SWAIG function include reference. + +#### Signature + +```typescript +addFunctionInclude( + url: string, + functions: string[], + metaData?: Record +): this +``` + +#### Parameters + + + URL of the remote SWAIG endpoint. + + + + Function names available at that endpoint. + + + + Optional metadata to attach to the include. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 966. + +*** + +### addHint + +Add a single speech-recognition hint. + +#### Signature + +```typescript +addHint(hint: string): this +``` + +#### Parameters + + + Word or phrase to boost in speech recognition. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 653. + +*** + +### addHints + +Add multiple speech-recognition hints at once. + +#### Signature + +```typescript +addHints(hints: string[]): this +``` + +#### Parameters + + + Array of words or phrases to boost. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 663. + +*** + +### addInternalFiller + +Add internal filler phrases for a single internal function and language. + +See [setInternalFillers](/docs/sdk-reference/reference/typescript/prefabs/receptionist-agent#set-internal-fillers) for the complete list of supported +functionName values and an explanation of what fillers do. + +#### Signature + +```typescript +addInternalFiller( + functionName: string, + languageCode: string, + fillers: string[] +): this +``` + +#### Parameters + + + One of the supported internal function names (see SUPPORTED\_INTERNAL\_FILLER\_NAMES). Names outside the supported set log a warning and are ignored by the runtime. + + + + BCP-47 language code for the fillers (e.g. 'en-US'). + + + + Array of filler phrases. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 943. + +*** + +### addLanguage + +Add a supported language to the AI configuration. + +#### Signature + +```typescript +addLanguage(config: LanguageConfig): this +``` + +#### Parameters + + + Language configuration including name, code, voice, and optional fillers. `params` may be set to attach engine-specific tuning (voice stability, similarity boost, model knobs, etc.); only emitted into SWML when non-empty so existing entries stay byte-identical when no params are passed (Python ai\_config\_mixin.py `add_language`). + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 694. + +*** + +### addMcpServer + +Add an external MCP server for tool discovery and invocation. +Tools are discovered via MCP protocol at session start and added to the AI's tool list. + +#### Signature + +```typescript +addMcpServer(url: string, opts?: { ...3 fields }): this +``` + +#### Parameters + + + MCP server HTTP endpoint URL + + + + Optional configuration: headers, resources, resourceVars + + + + + + + + +#### Returns + +`this` — This agent instance for chaining + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1146. + +*** + +### addPatternHint + +Add a pattern-based speech-recognition hint with find-and-replace behavior. + +#### Signature + +```typescript +addPatternHint(opts: { ...4 fields }): this +``` + +#### Parameters + + + Pattern hint configuration with a descriptive hint label, regex pattern, replacement string, and optional case-insensitive flag. + + + + + + + + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 674. + +*** + +### addPostAiVerb + +Add a SWML verb to execute after the AI verb (phase 5). + +#### Signature + +```typescript +addPostAiVerb(verbName: string, config: Record): this +``` + +#### Parameters + + + Name of the SWML verb. + + + + Verb configuration object. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1523. + +*** + +### addPostAnswerVerb + +Add a SWML verb to execute after the answer phase but before the AI verb (phase 3). + +#### Signature + +```typescript +addPostAnswerVerb( + verbName: string, + config: number | Record +): this +``` + +#### Parameters + + + Name of the SWML verb. + + + + Verb configuration object. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1512. + +*** + +### addPreAnswerVerb + +Add a SWML verb to execute before the answer phase (phase 1). + +#### Signature + +```typescript +addPreAnswerVerb( + verbName: string, + config: number | Record +): this +``` + +#### Parameters + + + Name of the SWML verb (e.g. "play", "record"). + + + + Verb configuration object. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1491. + +*** + +### addPronunciation + +Add a pronunciation override rule for the TTS engine. + +#### Signature + +```typescript +addPronunciation(rule: PronunciationRule): this +``` + +#### Parameters + + + Pronunciation rule specifying the text to replace and its substitute. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 774. + +*** + +### addSection + +Add a new named section to the SWML document. +Mirrors Python's `add_section()`. + +#### Signature + +```typescript +addSection(sectionName: string): this +``` + +#### Parameters + + + Name of the section to create. + + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 653. + +*** + +### addSkill + +Add a skill to this agent, registering its tools, prompt sections, hints, and global data. + +#### Signature + +```typescript +addSkill(skill: SkillBase): Promise +``` + +#### Parameters + + + The skill instance to add. + + +#### Returns + +`Promise` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1570. + +*** + +### addSkillByName + +Add a skill by its registered name, looking it up in the global SkillRegistry. + +Matches Python's `add_skill(skill_name, params)` which loads skills by string +name via the SkillManager registry. Throws a `ValueError`-equivalent if the +skill name is not found in the registry. + +Accepts a typed [SkillNameOrString](/docs/sdk-reference/reference/typescript/skills/skill-name#skill-name-or-string): one of the built-in +`SkillName` values (autocompleted, with a typo caught at compile +time) or any other string for custom / third-party skills. The value is +forwarded to the registry unchanged — the typing is erased at runtime, so +this matches Python's bare-`str` `add_skill(skill_name, params)`. + +#### Signature + +```typescript +addSkillByName( + skillName: SkillNameOrString, + params?: SkillConfig +): Promise +``` + +#### Parameters + + + The name the skill was registered under in the SkillRegistry. + + + + Optional configuration parameters forwarded to the skill factory. + + +#### Returns + +`Promise` — This agent instance for chaining. + +#### Throws + +- Error if no skill with the given name is registered. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1641. + +*** + +### addSwaigQueryParams + +Add extra query parameters appended to all SWAIG webhook URLs. + +#### Signature + +```typescript +addSwaigQueryParams(params: Record): this +``` + +#### Parameters + + + Key-value pairs to append as query parameters. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1733. + +*** + +### addVerb + +Add a verb to the SWML document. + +#### Signature + +```typescript +addVerb(name: string, config: unknown): this +``` + +#### Parameters + + + Verb name (e.g., 'answer', 'play', 'hangup'). + + + + Verb configuration. + + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 642. + +*** + +### addVerbToSection + +Add a verb to a specific named section. +Mirrors Python's `add_verb_to_section()`. + +#### Signature + +```typescript +addVerbToSection(sectionName: string, verbName: string, config: unknown): this +``` + +#### Parameters + + + Target section name (auto-created if missing). + + + + Verb name. + + + + Verb configuration. + + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 669. + +*** + +### asRouter + +Return this agent's Hono app for mounting as a sub-router in an AgentServer. + +#### Signature + +```typescript +asRouter(): Hono +``` + +#### Returns + +`Hono` — The Hono application instance. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2656. + +*** + +### autoMapSipUsernames + +Automatically register common SIP usernames based on this agent's +name and route. Derives cleaned variants (alphanumeric + underscore) +and registers each via `registerSipUsername()`. + +Port of Python's `auto_map_sip_usernames()`: + +- Registers a cleaned version of the agent name +- Registers a cleaned version of the route (if different from name) +- For names longer than 3 characters, also registers a vowel-stripped variant + +#### Signature + +```typescript +autoMapSipUsernames(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1058. + +*** + +### buildSwmlForRequest + +Service-side SWML-builder hook. Subclasses return a `SwmlBuilder` +to fully replace the document for this request, or `null` to fall +through to `setOnRequestCallback` or the static builder. + +This is distinct from the WebMixin `onRequest(requestData, +callbackPath)` hook on AgentBase (which mirrors Python's +`on_request -> on_swml_request` modification-merge contract). +Use this hook when you want to swap the entire SWML builder; use +`onRequest` / `onSwmlRequest` on AgentBase when you want to merge +targeted modifications into the rendered document. + +Default implementation returns `null` (no-op). + +#### Signature + +```typescript +buildSwmlForRequest( + _queryParams: Record, + _bodyParams: Record, + _headers: Record, + _callbackPath?: string +): SwmlBuilder | null +``` + +#### Parameters + + + + + + + + + +#### Returns + +`SwmlBuilder | null` — A `SwmlBuilder` whose document is sent as the response, or `null` to delegate to the next handler in the chain. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 834. + +*** + +### clearPostAiVerbs + +Remove all post-AI verbs. + +#### Signature + +```typescript +clearPostAiVerbs(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1550. + +*** + +### clearPostAnswerVerbs + +Remove all post-answer verbs. + +#### Signature + +```typescript +clearPostAnswerVerbs(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1541. + +*** + +### clearPreAnswerVerbs + +Remove all pre-answer verbs. + +#### Signature + +```typescript +clearPreAnswerVerbs(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1532. + +*** + +### clearSwaigQueryParams + +Clear all SWAIG query parameters. + +#### Signature + +```typescript +clearSwaigQueryParams(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1742. + +*** + +### constructor + +Create a ReceptionistAgent with the specified departments. + +#### Signature + +```typescript +constructor(config: ReceptionistConfig): ReceptionistAgent +``` + +#### Parameters + + + Configuration including departments (name/description/number), greeting, and voice. + + +#### Returns + +`ReceptionistAgent` + +#### Source + +[`src/prefabs/ReceptionistAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/ReceptionistAgent.ts) + +Line 96. + +*** + +### createToolToken + +Mint a per-call SWAIG-function token via the agent's SessionManager. + +Mirrors Python reference `core/mixins/state_mixin.py _create_tool_token`: +delegates to `SessionManager.createToolToken` and returns an empty +string on any failure (Python catches all exceptions and returns ""). + +#### Signature + +```typescript +createToolToken(toolName: string, callId: string): string +``` + +#### Parameters + + + + + +#### Returns + +`string` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1475. + +*** + +### defineContexts + +Define or replace the contexts configuration for the AI verb. + +#### Signature + +```typescript +defineContexts( + contexts?: Record | ContextBuilder +): ContextBuilder +``` + +#### Parameters + + + An existing ContextBuilder instance or a plain object; a new ContextBuilder is created if omitted. + + +#### Returns + +`ContextBuilder` — The active ContextBuilder for further configuration. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 604. + +*** + +### defineTool + +Register a SWAIG tool (function) that the AI can invoke during a call. + +#### How this becomes a tool the model sees + +A SWAIG function is **exactly the same concept** as a "tool" in +native OpenAI / Anthropic tool calling. On every LLM turn, the SDK +renders each registered SWAIG function into the OpenAI tool schema: + +```json +{ +"type": "function", +"function": { +"name": "your_name_here", +"description": "your description text", +"parameters": { /* your JSON schema */ } +} +} +``` + +That schema goes to the model in the same API call that produces +the next assistant message. The model reads: + +- the **function `description`** to decide WHEN to call this tool +- each **parameter `description`** (inside the JSON schema) to + decide HOW to fill in each argument + +This means **descriptions are prompt engineering**, not developer +comments. A vague description is the #1 cause of "the model has the +right tool but doesn't call it" failures. + +##### Bad vs good descriptions + +```text +BAD : description: 'Lookup function' +GOOD: description: 'Look up a customer's account details by account +number. Use this BEFORE quoting any account-specific info +(balance, plan, status). Do not use for general product +questions.' + +BAD : parameters: { id: { type: 'string', description: 'the id' } } +GOOD: parameters: { account_number: { type: 'string', description: +'The customer's 8-digit account number, no dashes or spaces. +Ask the user if they don't provide it.' } } +``` + +##### Tool count matters + +LLM tool selection accuracy degrades past ~7-8 simultaneously-active +tools per call. Use Step.setFunctions() to partition tools across +steps so only the relevant subset is active at any moment. + +#### Signature + +```typescript +defineTool(opts: { ...11 fields }): this +``` + +#### Parameters + + + Tool definition including name, description, parameter schema, and handler callback. `description` and per-parameter `description` strings are LLM-facing prompt engineering. + + + + + Additional fields to pass through to the SWAIG function definition (Python `**swaig_fields` equivalent). + + + + + + + + + + + + + + + + + + + + External webhook URL; makes this an externally-hosted tool. + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1330. + +*** + +### defineTools + +Register the `collect_caller_info` and `transfer_call` SWAIG tools +(Python parity). When `checkInEnabled` is `true`, also registers the +TS-specific `check_in_visitor` tool. + +#### Signature + +```typescript +defineTools(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/prefabs/ReceptionistAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/ReceptionistAgent.ts) + +Line 234. + +*** + +### defineTypedTool + +Register a SWAIG tool with a typed handler that receives named parameters +instead of the standard `(args, rawData)` convention. + +The SDK wraps the handler to unpack the args dict into positional params. +If no `parameters` schema is provided, one is inferred from the handler's +source code (parameter names and default values). + +#### Signature + +```typescript +defineTypedTool(opts: { ...9 fields }): this +``` + +#### Parameters + + + Tool definition with a typed handler function. + + + + + + + The typed handler. Receives the AI-extracted arguments as named positional parameters (in declaration order), optionally with a trailing `rawData` record, and returns a SWAIG result. Precisely typed as [TypedToolHandler](/docs/sdk-reference/reference/typescript/type-inference#typed-tool-handler) rather than the bare `Function` so a non-callable — or a callable that returns nothing usable — is a compile-time error. + + + + + + + + + + + + + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1373. + +*** + +### enableDebugEvents + +Enable debug event webhooks for this agent. + +#### Signature + +```typescript +enableDebugEvents(level: number = 1): this +``` + +#### Parameters + + + Debug verbosity level (defaults to 1). + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1011. + +*** + +### enableDebugRoutes + +Register a callback function that determines routing based on POST data. + +When a routing callback is registered, an endpoint at the specified path +is created in `getApp()`. The callback receives the request body and returns +Enable debug routes for testing and development. + +This is a backward-compatibility stub matching the Python SDK. +In the TypeScript SDK, debug routes (health, ready, debug\_events) +are automatically registered in `getApp()`. + +#### Signature + +```typescript +enableDebugRoutes(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1773. + +*** + +### enableMcpServer + +Expose this agent's tools as an MCP server endpoint at /mcp. +Adds a JSON-RPC 2.0 endpoint that MCP clients (Claude Desktop, other agents) can connect to. + +#### Signature + +```typescript +enableMcpServer(): this +``` + +#### Returns + +`this` — This agent instance for chaining + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1160. + +*** + +### enableSipRouting + +Enable SIP routing for this agent. + +#### Signature + +```typescript +enableSipRouting(autoMap: boolean = true, path: string = '/sip'): this +``` + +#### Parameters + + + When true, automatically map SIP usernames to the agent route (defaults to true). + + + + HTTP path for the SIP routing endpoint (defaults to '/sip'). + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1025. + +*** + +### extractSipUsername + +Extract the SIP username from a request body's call.to field. + +**Modifiers:** `static` + +#### Signature + +```typescript +extractSipUsername(requestBody: Record): string | null +``` + +#### Parameters + + + The parsed request body containing call information. + + +#### Returns + +`string | null` — The extracted SIP username, or null if not found. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1122. + +*** + +### getAllFunctions + +Snapshot of all registered SWAIG functions keyed by name. +(Python parity: `ToolRegistry.get_all_functions`.) + +#### Signature + +```typescript +getAllFunctions(): Record> +``` + +#### Returns + +`Record>` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 529. + +*** + +### getApp + +Get or lazily create the Hono HTTP application with all routes, middleware, auth, and CORS. + +#### Signature + +```typescript +getApp(): Hono +``` + +#### Returns + +`Hono` — The configured Hono application instance. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2269. + +*** + +### getBasicAuthCredentials + +Get the basic-auth credentials used by this agent. + +#### Signature + + + + ```typescript + getBasicAuthCredentials(includeSource?: false): [string, string] + ``` + + + + ```typescript + getBasicAuthCredentials( + includeSource: true + ): [string, string, "provided" | "environment" | "generated"] + ``` + + + +#### Parameters (Overload 1) + + + When true, a third element indicating the credential source is appended. + + +#### Parameters (Overload 2) + + + When true, a third element indicating the credential source is appended. + + +#### Returns (Overload 1) + +`[string, string]` — A tuple of \[username, password] or \[username, password, source]. + +#### Returns (Overload 2) + +`[string, string, "provided" | "environment" | "generated"]` — A tuple of \[username, password] or \[username, password, source]. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2794. + +*** + +### getBuilder + +Get the underlying SwmlBuilder for direct manipulation. + +#### Signature + +```typescript +getBuilder(): SwmlBuilder +``` + +#### Returns + +`SwmlBuilder` — The SwmlBuilder instance. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 632. + +*** + +### getContexts + +Get the contexts dictionary as serialised SWML, or null when no +contexts have been defined yet. + +Matches Python `PromptManager.get_contexts()` which returns the +contexts dict or `None`. + +#### Signature + +```typescript +getContexts(): Record | null +``` + +#### Returns + +`Record | null` — Contexts dict, or null when no contexts are defined. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 641. + +*** + +### getDocument + +Get the SWML document as a dictionary. +Alias for `renderSwml()` that matches Python's `get_document()` name. + +#### Signature + +```typescript +getDocument(): Record +``` + +#### Returns + +`Record` — The SWML document. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 706. + +*** + +### getFullUrl + +Get the full external URL of this agent, using the proxy base URL if available. + +#### Signature + +```typescript +getFullUrl(includeAuth: boolean = false): string +``` + +#### Parameters + + + Whether to embed basic-auth credentials in the URL (defaults to false). + + +#### Returns + +`string` — The fully-qualified URL string. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1857. + +*** + +### getFunction + +Get a registered SWAIG function entry, or undefined. +(Python parity: `ToolRegistry.get_function`.) + +#### Signature + +```typescript +getFunction(name: string): Record | SwaigFunction | undefined +``` + +#### Parameters + + + +#### Returns + +`Record | SwaigFunction | undefined` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 523. + +*** + +### getLanguageParams + +Read the per-language `params` dict for a previously-added language. + +Python parity: `get_language_params(code)`. Returns `undefined` if the +code is unknown or the language has no params set — no exception path. + +#### Signature + +```typescript +getLanguageParams(code: string): Record | undefined +``` + +#### Parameters + + + Language code as previously passed to [addLanguage](/docs/sdk-reference/reference/typescript/prefabs/receptionist-agent#add-language). + + +#### Returns + +`Record | undefined` — The params dict if set, `undefined` otherwise (including when the code is unknown). + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 760. + +*** + +### getMcpServers + +Get configured MCP servers (read-only copy). + +#### Signature + +```typescript +getMcpServers(): Record[] +``` + +#### Returns + +`Record[]` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1171. + +*** + +### getName + +Get the agent's display name. + +#### Signature + +```typescript +getName(): string +``` + +#### Returns + +`string` — The agent name string. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1559. + +*** + +### getPostPrompt + +Get the post-prompt text, if one has been set. + +#### Signature + +```typescript +getPostPrompt(): string | null +``` + +#### Returns + +`string | null` — The post-prompt string, or null if not configured. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 548. + +*** + +### getPrompt + +Get the fully rendered main prompt text. + +#### Signature + +```typescript +getPrompt(): string +``` + +#### Returns + +`string` — The assembled prompt string. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 520. + +*** + +### getPromptPom + +Get the raw POM (Prompt Object Model) structure as an array of section data objects, +when the agent is in POM mode and has at least one section. + +Matches Python `get_prompt()` which returns `Union[str, List[Dict]]` — a raw list when +in POM mode (via `pom.to_list()` / `pom.render_dict()`), or a string otherwise. +The TS `getPrompt()` always returns a string (rendered Markdown), so this companion +method exposes the raw POM structure for callers that need it for serialisation or +inspection (e.g. skills that inspect prompt sections). + +#### Signature + +```typescript +getPromptPom(): Record[] | null +``` + +#### Returns + +`Record[] | null` — An array of POM section data objects, or null if not in POM mode or POM is empty. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 536. + +*** + +### getRawPrompt + +Get the raw prompt text whatever `setPromptText` stored, or null when +no raw prompt has been set. + +Matches Python `PromptManager.get_raw_prompt()` which returns the raw +stored string or `None`. Use this instead of `getPrompt()` when you +need the unrendered text rather than the POM-rendered Markdown. + +#### Signature + +```typescript +getRawPrompt(): string | null +``` + +#### Returns + +`string | null` — The raw prompt string, or null if not set. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 562. + +*** + +### getRegisteredTools + +Get a summary of all registered tools with their names, descriptions, and +parameter schemas. Lifted from AgentBase so the swaig-test CLI can list +tools on a non-AgentBase SWMLService target (sidecar / standalone SWAIG +host). + +#### Signature + +```typescript +getRegisteredTools(): { description: string; name: string; parameters: Record }[] +``` + +#### Returns + +`{ description: string; name: string; parameters: Record }[]` — Array of tool descriptors. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 557. + +*** + +### getTool + +Look up a registered SwaigFunction by name. Lifted from AgentBase so +`swaig-test --exec ` works against a non-AgentBase SWMLService +target. + +#### Signature + +```typescript +getTool(name: string): SwaigFunction | undefined +``` + +#### Parameters + + + The tool name to search for. + + +#### Returns + +`SwaigFunction | undefined` — The SwaigFunction instance, or undefined if not found or not a SwaigFunction. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 581. + +*** + +### getTools + +Public access to the list of registered tools. + +In Python, `define_tools()` is public and returns `List[SWAIGFunction]`. +In TypeScript, `defineTools()` is a protected setup hook (void). This +method provides the equivalent public "get all tools" capability. + +#### Signature + +```typescript +getTools(): SwaigFunction[] +``` + +#### Returns + +`SwaigFunction[]` — Array of all registered SwaigFunction instances. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 371. + +*** + +### handleMcpRequest + +Handle an MCP JSON-RPC 2.0 request. Returns the response object. + +#### Signature + +```typescript +handleMcpRequest( + body: Record +): Promise> +``` + +#### Parameters + + + +#### Returns + +`Promise>` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1204. + +*** + +### hasFunction + +Whether a SWAIG function with the given name is registered. +(Python parity: `ToolRegistry.has_function`.) + +#### Signature + +```typescript +hasFunction(name: string): boolean +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 517. + +*** + +### hasSkill + +Check whether a skill with the given name is registered. + +Accepts a typed [SkillNameOrString](/docs/sdk-reference/reference/typescript/skills/skill-name#skill-name-or-string) so built-in names autocomplete +and a typo is a compile-time error; any other string is still accepted +(custom skills / parity with Python's bare-`str` `has_skill`). + +#### Signature + +```typescript +hasSkill(skillName: SkillNameOrString): boolean +``` + +#### Parameters + + + The skill name to check. + + +#### Returns + +`boolean` — True if a skill with that name exists. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1676. + +*** + +### hasTool + +Whether a tool with the given name is registered. + +#### Signature + +```typescript +hasTool(name: string): boolean +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 511. + +*** + +### isMcpServerEnabled + +Check if MCP server endpoint is enabled. + +#### Signature + +```typescript +isMcpServerEnabled(): boolean +``` + +#### Returns + +`boolean` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1166. + +*** + +### listSkills + +List all registered skills with their names, instance IDs, and initialization status. + +#### Signature + +```typescript +listSkills(): { initialized: boolean; instanceId: string; name: string }[] +``` + +#### Returns + +`{ initialized: boolean; instanceId: string; name: string }[]` — Array of skill descriptors. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1662. + +*** + +### listToolNames + +List registered tool names in insertion order (Map preserves it). + +#### Signature + +```typescript +listToolNames(): string[] +``` + +#### Returns + +`string[]` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 545. + +*** + +### manualSetProxyUrl + +Manually set the proxy base URL used for webhook URL generation. + +#### Signature + +```typescript +manualSetProxyUrl(url: string): this +``` + +#### Parameters + + + The external-facing base URL (trailing slashes are stripped). + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1754. + +*** + +### onDebugEvent + +Lifecycle hook called when a debug event webhook is received. Override in subclasses. + +#### Signature + +```typescript +onDebugEvent(_event: Record): void | Promise +``` + +#### Parameters + + + The debug event payload. + + +#### Returns + +`void | Promise` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1970. + +*** + +### onFunctionCall + +Hook called before each SWAIG function execution. Override in subclasses. + +**Behavioral note:** In the Python SDK, `on_function_call` IS the dispatcher +— it retrieves and executes the function, returning the result. In TypeScript, +`fn.execute()` is called separately after this hook. However, if this method +returns a non-void value, it is used as the result and the default execution +is skipped, enabling dispatch interception parity with Python. + +#### Signature + +```typescript +onFunctionCall( + _name: string, + _args: Record, + _rawData: Record +): void | Record | Promise> +``` + +#### Parameters + + + Name of the function about to execute. + + + + Parsed arguments for the function. + + + + The full raw SWAIG request payload. + + +#### Returns + +`void | Record | Promise>` — Optionally a result dict to short-circuit default execution, or void/undefined to proceed normally. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1999. + +*** + +### onRequest + +Lifecycle hook called when SWML is requested. Default delegates to +[onSwmlRequest](/docs/sdk-reference/reference/typescript/prefabs/receptionist-agent#on-swml-request) and returns its result. Subclasses typically +override `onSwmlRequest` rather than this method. + +Matches Python `WebMixin.on_request(request_data, callback_path)`. The +cross-language API is the two-arg form; the Hono `context` argument is +a TypeScript-side extra preserved for callers that already have it but +is not part of the audited surface. + +#### Signature + +```typescript +onRequest( + requestData?: Record | null, + callbackPath?: string | null +): void | Record | Promise> +``` + +#### Parameters + + + The parsed request body. + + + + Optional callback path from the request. + + +#### Returns + +`void | Record | Promise>` — Optionally a dict of SWML modifications, or undefined for default rendering. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1935. + +*** + +### onSummary + +Python-style receptionist summary hook. Default is a no-op; subclasses +may override to persist the summary. Mirrors Python `on_summary` +(receptionist.py lines 278–287). + +#### Signature + +```typescript +onSummary( + _summary: Record | null, + _rawData: Record +): void | Promise +``` + +#### Parameters + + + + + +#### Returns + +`void | Promise` + +#### Source + +[`src/prefabs/ReceptionistAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/ReceptionistAgent.ts) + +Line 376. + +*** + +### onSwmlRequest + +Lifecycle hook called on every SWML request before rendering. Override in subclasses. + +May optionally return a modification dict that will be merged into the +rendered SWML document (matching Python's `Optional[dict]` return type). + +Matches Python `on_swml_request(request_data, callback_path, request)` — the third +parameter is the FastAPI `Request` in Python; here it is the raw Hono context object +so that subclasses can access query parameters (`context.req.query()`), raw request +headers (`context.req.raw.headers`), etc. + +#### Signature + +```typescript +onSwmlRequest( + _rawData: Record, + _callbackPath?: string, + _context?: any +): void | Record | Promise> +``` + +#### Parameters + + + The parsed request body. + + + + Optional callback path from the request. + + + + The raw Hono context object (c), providing access to headers and query params. + + +#### Returns + +`void | Record | Promise>` — Optionally a dict of SWML modifications, or void. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1958. + +*** + +### promptAddSection + +Add a new section to the prompt with optional body, bullets, and subsections. + +#### Signature + +```typescript +promptAddSection(title: string, opts?: { ...5 fields }): this +``` + +#### Parameters + + + Section heading. + + + + Optional section content including body text, bullet points, and subsections. + + + + + + + + + + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 467. + +*** + +### promptAddSubsection + +Add a subsection under an existing prompt section. + +#### Signature + +```typescript +promptAddSubsection( + parentTitle: string, + title: string, + opts?: { ...2 fields } +): this +``` + +#### Parameters + + + Title of the parent section. + + + + Title of the new subsection. + + + + Optional body text and bullet points for the subsection. + + + + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 502. + +*** + +### promptAddToSection + +Append content to an existing prompt section. + +#### Signature + +```typescript +promptAddToSection(title: string, opts?: { ...3 fields }): this +``` + +#### Parameters + + + Title of the section to append to. + + + + Content to add: body text, a single bullet, or multiple bullets. + + + + + + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 487. + +*** + +### promptHasSection + +Check whether a prompt section with the given title exists. + +#### Signature + +```typescript +promptHasSection(title: string): boolean +``` + +#### Parameters + + + Section title to look for. + + +#### Returns + +`boolean` — True if the section exists. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 512. + +*** + +### registerAdditionalRoutes + +Extension point: register additional Hono routes after SWMLService +mounts /health, /ready, /swaig, and the main route. AgentBase uses +this to add /post\_prompt, /check\_for\_input, /debug\_events, /mcp. + +#### Signature + +```typescript +registerAdditionalRoutes(_app: Hono): void +``` + +#### Parameters + + + +#### Returns + +`void` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 604. + +*** + +### registerRoutingCallback + +Register a callback at a specific HTTP path that decides how to route an +incoming request. + +When called, the endpoint at `path` will invoke `callback` with the parsed +request body. If `callback` returns a non-empty route string the server +responds with `{ action: "redirect", route }` so the platform can forward the +request to the right agent. If `callback` returns `null` / `undefined` the +agent's own SWML is returned instead (normal processing). + +Mirrors Python `swml_service.register_routing_callback` / +`web_mixin.register_routing_callback`. + +#### Signature + +```typescript +registerRoutingCallback(callback: RoutingCallback, path: string = '/sip'): this +``` + +#### Parameters + + + Function receiving the parsed request body and returning a route string to redirect, or null/undefined for normal processing. + + + + HTTP path where this callback endpoint is registered (default: '/sip'). + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1102. + +*** + +### registerSipUsername + +Register a SIP username to route to this agent. + +#### Signature + +```typescript +registerSipUsername(username: string): this +``` + +#### Parameters + + + The SIP username to register. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1040. + +*** + +### registerSwaigFunction + +Register a SwaigFunction instance or a raw function descriptor (DataMap). + +#### Signature + +```typescript +registerSwaigFunction(fn: Record | SwaigFunction): this +``` + +#### Parameters + + + +#### Returns + +`this` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 472. + +*** + +### registerVerbHandler + +Register a custom verb handler. +Mirrors Python's `register_verb_handler()`. + +#### Signature + +```typescript +registerVerbHandler(handler: SWMLVerbHandler): void +``` + +#### Parameters + + + The verb handler to register. + + +#### Returns + +`void` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 726. + +*** + +### removeFunction + +Remove a registered SWAIG function. Returns true when removed, +false when not found. (Python parity: +`ToolRegistry.remove_function`.) + +#### Signature + +```typescript +removeFunction(name: string): boolean +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 540. + +*** + +### removeSkill + +Remove a previously added skill by its instance ID. + +#### Signature + +```typescript +removeSkill(instanceId: string): Promise +``` + +#### Parameters + + + The unique instance ID of the skill to remove. + + +#### Returns + +`Promise` — True if the skill was found and removed. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1654. + +*** + +### removeSkillByName + +Remove a skill by its name (Python parity). + +Python's `remove_skill(skill_name)` removes by skill name. +The existing `removeSkill(instanceId)` removes by instance ID. +This method provides name-based removal for cross-SDK parity. + +#### Signature + +```typescript +removeSkillByName(skillName: string): Promise +``` + +#### Parameters + + + The skill name to remove. + + +#### Returns + +`Promise` — True if a skill with that name was found and removed. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1690. + +*** + +### renderDocument + +Render the SWML document as a JSON string. +Mirrors Python's `render_document()`. + +#### Signature + +```typescript +renderDocument(): string +``` + +#### Returns + +`string` — JSON-encoded SWML document. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 715. + +*** + +### renderSwml + +Render the complete SWML document by assembling all 5 phases: pre-answer, answer, +post-answer, AI, and post-AI verbs. + +#### Signature + +```typescript +renderSwml(callId?: string, modifications?: Record): string +``` + +#### Parameters + + + Optional call ID to use for session tokens; auto-generated if omitted. + + + + Optional dict returned from `onSwmlRequest` to merge into the AI verb config before rendering. Matches Python's `_render_swml(modifications)` semantics: `global_data` is deep-merged; all other keys override the AI config directly. + + +#### Returns + +`string` — The rendered SWML document as a JSON string. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2019. + +*** + +### resetContexts + +Remove all contexts, returning the agent to a no-contexts state. + +This is a convenience wrapper around `defineContexts().reset()`. +Use it in a dynamic config callback when you need to rebuild +contexts from scratch for a specific request. + +#### Signature + +```typescript +resetContexts(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 625. + +*** + +### resetDocument + +Reset the SWML document to an empty state. +Mirrors Python's `reset_document()`. + +#### Signature + +```typescript +resetDocument(): this +``` + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 679. + +*** + +### run + +Alias for [serve](/docs/sdk-reference/reference/typescript/prefabs/receptionist-agent#serve). Starts the HTTP server. + +#### Signature + +```typescript +run(opts?: { ...2 fields }): Promise +``` + +#### Parameters + + + Optional host and port overrides. + + + + + + +#### Returns + +`Promise` — A promise that resolves once the server is running. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2702. + +*** + +### runServerless + +Handle a single serverless invocation (AWS Lambda, Google Cloud Functions, Azure Functions, or CGI). + +Matches Python `run(event, context)` when executed in a serverless environment. Python's +`run()` auto-detects the platform via `get_execution_mode()` and dispatches accordingly; +in TypeScript the serverless path is an **explicit** method so that `run()` keeps its +HTTP-server semantics and callers opt in to serverless dispatch deliberately. + +Platform detection follows the same environment-variable heuristics as Python's +`ServerlessMixin`: `AWS_LAMBDA_FUNCTION_NAME` → Lambda, `K_SERVICE` → GCF, +`FUNCTIONS_WORKER_RUNTIME` → Azure, `GATEWAY_INTERFACE` → CGI. + +Usage in a Lambda handler file: + +```ts +export const handler = (event: any, context: any) => agent.runServerless(event, context); +``` + +#### Signature + +```typescript +runServerless( + event: ServerlessEvent, + context?: unknown, + platform?: "lambda" | "gcf" | "azure" | "cgi" | "auto" +): Promise +``` + +#### Parameters + + + The serverless event payload (Lambda event, GCF request body, etc.). + + + + The serverless context object (Lambda context, Azure context, etc.). + + + + Optional platform override; defaults to 'auto' (environment detection). + + +#### Returns + +`Promise` — The normalized serverless response object. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2728. + +*** + +### serve + +Start the HTTP server and begin listening for requests. + +Uses `@hono/node-server` under the hood. When run in CLI mode +(`SWAIG_CLI_MODE=true`, set automatically by `npx swaig-test`), this is a +no-op so agent config can be inspected without starting a server. + +#### Signature + +```typescript +serve(opts?: { ...2 fields }): Promise +``` + +#### Parameters + + + Optional host/port overrides. Defaults to the values provided in the constructor options or the `PORT` environment variable. + + + + + + +#### Returns + +`Promise` — A promise that resolves once the server has begun listening. + +#### Examples + +```typescript +const agent = new AgentBase({ name: 'demo', port: 3000 }); +await agent.serve(); +// Or override at runtime: +await agent.serve({ port: 8080, host: '127.0.0.1' }); +``` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2679. + +*** + +### setDynamicConfigCallback + +Set a callback invoked on each SWML request to dynamically modify an ephemeral agent copy. + +The callback receives a clone of this agent — mutations apply only to the current +request, so you can vary prompt, tools, languages, params, or global data per call +without affecting the long-lived agent instance. + +#### Signature + +```typescript +setDynamicConfigCallback(cb: DynamicConfigCallback): this +``` + +#### Parameters + + + Callback receiving `(queryParams, bodyParams, headers, agent)` where `agent` is the ephemeral `AgentBase` copy to mutate. May be async. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Examples + +```typescript +agent.setDynamicConfigCallback((query, body, headers, agent) => { + const lang = query.lang ?? 'en'; + if (lang === 'es') { + (agent as AgentBase).setPromptText('Eres un asistente útil.'); + } +}); +``` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1723. + +*** + +### setFunctionIncludes + +Replace the entire list of function includes. +Each include must have a `url` and `functions` array. + +#### Signature + +```typescript +setFunctionIncludes(includes: FunctionInclude[]): this +``` + +#### Parameters + + + Array of function include objects. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 979. + +*** + +### setGlobalData + +Merge data into the global\_data object passed into the AI configuration. + +Matches Python `set_global_data` which calls `.update()` on the internal dict — +existing keys are preserved; incoming keys overwrite on collision. Skills and +other callers can each contribute keys without clobbering one another. + +If you need to replace the entire object, assign a new agent instance or use +`Object.assign(agent.globalData, {})` to clear first. + +#### Signature + +```typescript +setGlobalData(data: Record): this +``` + +#### Parameters + + + Key-value pairs to merge into global data. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 828. + +*** + +### setInternalFillers + +Set internal fillers for native SWAIG functions. + +Internal fillers are short phrases the AI agent speaks (via TTS) while +an internal/native function is running, so the caller doesn't hear +dead air during transitions or background work. + +Supported function names (matches the SWAIGInternalFiller schema): + +hangup — when the agent is hanging up +check\_time — when checking the time +wait\_for\_user — when waiting for user input +wait\_seconds — during deliberate pauses +adjust\_response\_latency — when adjusting response timing +next\_step — transitioning between steps in prompt.contexts +change\_context — switching between contexts in prompt.contexts +get\_visual\_input — processing visual input (enable\_vision=true) +get\_ideal\_strategy — thinking (enable\_thinking=true) + +Notably NOT supported: change\_step, gather\_submit, or arbitrary +user-defined SWAIG function names. The runtime only honors fillers +for the names listed above; everything else is silently ignored at +the SWML level. This method warns at registration time if you pass +an unknown name so you catch the typo early. + +#### Signature + +```typescript +setInternalFillers( + internalFillers: Record> +): this +``` + +#### Parameters + + + Map of function name to language-keyed filler phrases. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Examples + +```typescript +agent.setInternalFillers({ + next_step: { + 'en-US': ['Moving to the next step...', 'Great, let us continue...'], + 'es': ['Pasando al siguiente paso...'] + }, + check_time: { + 'en-US': ['Let me check the time...'] + } +}); +``` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 910. + +*** + +### setLanguageParams + +Set (or replace) the per-language `params` dict on an already-added +language. Useful when language entries are built up via [addLanguage](/docs/sdk-reference/reference/typescript/prefabs/receptionist-agent#add-language) +first and engine-specific tuning is added later (e.g., from a config +loader). + +Python parity: `set_language_params(code, params)`. Passing an empty +object removes the `params` key entirely. Unknown codes are a no-op. + +#### Signature + +```typescript +setLanguageParams(code: string, params: Record): this +``` + +#### Parameters + + + Language code as previously passed to [addLanguage](/docs/sdk-reference/reference/typescript/prefabs/receptionist-agent#add-language) (e.g. `"en-US"`). + + + + Engine-specific params dict to attach. Empty object removes the key. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 737. + +*** + +### setLanguages + +Replace all configured languages with a new list. + +#### Signature + +```typescript +setLanguages(languages: LanguageConfig[]): this +``` + +#### Parameters + + + Array of language configurations. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 718. + +*** + +### setNativeFunctions + +Set the list of native SWAIG function names (built-in platform functions). + +#### Signature + +```typescript +setNativeFunctions(funcs: string[]): this +``` + +#### Parameters + + + Array of native function names. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 848. + +*** + +### setOnRequestCallback + +Set a callback invoked per-request to dynamically build SWML. +When set, the static SwmlBuilder is ignored and the callback's +returned SwmlBuilder is used instead. + +#### Signature + +```typescript +setOnRequestCallback(cb: OnRequestCallback): this +``` + +#### Parameters + + + Callback receiving query params, body params, and headers. + + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 850. + +*** + +### setParam + +Set a single AI parameter (e.g. "temperature", "top\_p"). + +#### Signature + +```typescript +setParam(key: string, value: unknown): this +``` + +#### Parameters + + + Parameter name. + + + + Parameter value. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 800. + +*** + +### setParams + +Merge multiple AI parameters into the existing params object. + +#### Signature + +```typescript +setParams(params: Record): this +``` + +#### Parameters + + + Key-value pairs to merge. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 810. + +*** + +### setPostPrompt + +Set the post-prompt text evaluated after the call ends. + +#### Signature + +```typescript +setPostPrompt(text: string): this +``` + +#### Parameters + + + The post-prompt text to use. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 456. + +*** + +### setPostPromptLlmParams + +Merge LLM-specific parameters into the post-prompt configuration. + +#### Signature + +```typescript +setPostPromptLlmParams(params: Record): this +``` + +#### Parameters + + + Key-value LLM parameters to merge. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1001. + +*** + +### setPostPromptUrl + +Override the default post-prompt webhook URL with a custom one. + +#### Signature + +```typescript +setPostPromptUrl(url: string): this +``` + +#### Parameters + + + The custom post-prompt URL. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1847. + +*** + +### setPromptLlmParams + +Merge LLM-specific parameters into the main prompt configuration (e.g. model, temperature). + +#### Signature + +```typescript +setPromptLlmParams(params: Record): this +``` + +#### Parameters + + + Key-value LLM parameters to merge. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 991. + +*** + +### setPromptPom + +Set the prompt as a POM (Prompt Object Model) dictionary. + +Replaces the current POM sections with the provided structured data. +Each entry should have `title`, and optionally `body`, `bullets`, +`numbered`, `numberedBullets`, and `subsections`. + +#### Signature + +```typescript +setPromptPom(pom: Record[]): this +``` + +#### Parameters + + + Array of POM section dictionaries. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Throws + +- Error if POM mode is not enabled (`usePom: false`). + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 577. + +*** + +### setPromptText + +Set the main system prompt text for the AI. + +#### Signature + +```typescript +setPromptText(text: string): this +``` + +#### Parameters + + + The prompt text to use. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 446. + +*** + +### setPronunciations + +Replace all pronunciation rules with a new list. + +#### Signature + +```typescript +setPronunciations(rules: PronunciationRule[]): this +``` + +#### Parameters + + + Array of pronunciation rule objects. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 786. + +*** + +### setupGracefulShutdown + +Register process signal handlers for clean Kubernetes/Docker shutdown. +Handles SIGTERM and SIGINT, waits for a timeout, then exits. + +**Modifiers:** `static` + +#### Signature + +```typescript +setupGracefulShutdown(opts?: { ...1 fields }): void +``` + +#### Parameters + + + Optional timeout in milliseconds (default 5000). + + + + +#### Returns + +`void` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2751. + +*** + +### setWebHookUrl + +Override the default SWAIG webhook URL with a custom one. + +#### Signature + +```typescript +setWebHookUrl(url: string): this +``` + +#### Parameters + + + The custom webhook URL. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1837. + +*** + +### stop + +Stop the HTTP server. +Mirrors Python's `stop()`. + +#### Signature + +```typescript +stop(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 1009. + +*** + +### swaigPreDispatch + +Extension point: invoked between argument parsing and function dispatch +on POST /swaig. Returns \[target, shortCircuit]: when shortCircuit is +non-null, it's returned directly without dispatching. AgentBase may +override to add session-token validation or ephemeral dynamic-config. + +#### Signature + +```typescript +swaigPreDispatch( + _requestData: Record, + _funcName: string +): [SWMLService, unknown] +``` + +#### Parameters + + + + + +#### Returns + +`[SWMLService, unknown]` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 592. + +*** + +### updateGlobalData + +Merge additional entries into the existing global\_data object. + +#### Signature + +```typescript +updateGlobalData(data: Record): this +``` + +#### Parameters + + + Key-value pairs to merge into global data. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 838. + +*** + +### validateBasicAuth + +Override to add custom basic-auth validation logic beyond credential matching. + +#### Signature + +```typescript +validateBasicAuth( + _username: string, + _password: string +): boolean | Promise +``` + +#### Parameters + + + The username from the request. + + + + The password from the request. + + +#### Returns + +`boolean | Promise` — True if the credentials are valid; false to reject the request. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1980. + +*** + +### validateToolToken + +Validate a tool-call token for the given function. + +Mirrors Python reference `core/mixins/state_mixin.py validate_tool_token`: + +1. Unknown function → `false`. +2. Registered but non-secure → `true` without consulting SessionManager + (non-secure tools never require a token). +3. Raw-dict descriptors (e.g. DataMap) are treated as secure, matching + Python's `isinstance(func, dict) → is_secure = True` branch. +4. Missing token on a secure tool → `false`. +5. Otherwise delegate to `SessionManager.validateToolToken`. + +Divergences from the Python reference: + +- No debug-logging branch: `AgentBase` does not expose an agent-level + debug-mode flag, so the per-call debug telemetry Python emits is + omitted. `SessionManager` still logs its own validation outcomes. +- No token-derived call-id fallback: `SessionManager.debugToken` + truncates the embedded call-id for log safety, so an extracted value + cannot be round-tripped back through `validateToolToken`. The caller + is expected to supply a non-empty `callId`; an empty one is forwarded + unchanged and the underlying validator will reject it. + +#### Signature + +```typescript +validateToolToken(functionName: string, token: string, callId: string): boolean +``` + +#### Parameters + + + + + + + +#### Returns + +`boolean` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1455. + +## Functions + +### createReceptionistAgent + +Factory function that creates and returns a new ReceptionistAgent. + +#### Signature + +```typescript +createReceptionistAgent(config: ReceptionistConfig): ReceptionistAgent +``` + +#### Parameters + + + Configuration for the receptionist agent. + + +#### Returns + +`ReceptionistAgent` — A configured ReceptionistAgent instance. + +#### Source + +[`src/prefabs/ReceptionistAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/ReceptionistAgent.ts) + +Line 391. + +## Interfaces + +### ReceptionistConfig + +Configuration for the [ReceptionistAgent](/docs/sdk-reference/reference/typescript/prefabs/receptionist-agent). + +#### Signature + +```typescript +interface ReceptionistConfig +``` + +#### Properties + + + Additional AgentBase options forwarded to super(). + + + + Whether visitor check-in functionality is enabled. Default `false`. + + + + Optional company name. Appended to the greeting when provided. + + + + Departments the agent can transfer callers to. + + + + Initial greeting message. Defaults to the Python receptionist greeting. + + + + Agent display name (defaults to `"receptionist"`). + + + + Callback fired when a visitor checks in. + + + + HTTP route for this agent (defaults to `"/receptionist"`). + + + + Voice identifier passed to `addLanguage`. Defaults to `"rime.spore"`. + + +#### Source + +[`src/prefabs/ReceptionistAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/ReceptionistAgent.ts) + +Line 27. + +*** + +### ReceptionistDepartment + +A department the receptionist can route callers to. + +#### Signature + +```typescript +interface ReceptionistDepartment +``` + +#### Properties + + + Description of the department's purpose (shown to the AI). + + + + Department identifier (e.g. `"sales"`, `"support"`). + + + + Phone number (or SIP address) used by `transfer_call`. + + +#### Source + +[`src/prefabs/ReceptionistAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/ReceptionistAgent.ts) + +Line 17. + +## Source + +[`src/prefabs/ReceptionistAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/ReceptionistAgent.ts) + +Line 84. diff --git a/fern/products/sdk-reference/typescript/prefabs/survey-agent/index.mdx b/fern/products/sdk-reference/typescript/prefabs/survey-agent/index.mdx new file mode 100644 index 0000000000..dccdfb5e6c --- /dev/null +++ b/fern/products/sdk-reference/typescript/prefabs/survey-agent/index.mdx @@ -0,0 +1,3823 @@ +--- +slug: "/reference/typescript/prefabs/survey-agent" +title: "SurveyAgent" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "prefabs.SurveyAgent" + module: "prefabs" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/SurveyAgent.ts" +--- +# `SurveyAgent` + +Prefab agent that conducts surveys with branching logic, answer scoring, and conditional question flow. + +Each survey question declares its response type (rating, yes/no, open text, etc.), an optional +set of conditional follow-ups, and a scoring map. The agent walks the question tree, tallies a +total score, and exposes the full response map at call end via `onSummary()`. + +## Signature + +```typescript +class SurveyAgent extends AgentBase +``` + +## Inheritance + +**Extends:** [AgentBase](/docs/sdk-reference/reference/typescript/agent-base) + +## Examples + +```typescript +import { SurveyAgent } from '@signalwire/sdk'; + +const agent = new SurveyAgent({ + surveyName: 'CSAT', + brandName: 'Acme Co', + questions: [ + { id: 'q1', text: 'How satisfied were you with our service?', type: 'rating', scale: 5 }, + { id: 'q2', text: 'Would you recommend us to a friend?', type: 'yesno' }, + { id: 'q3', text: 'Anything else you want to share?', type: 'open' }, + ], +}); + +await agent.serve({ port: 3000 }); +``` + +## Properties + + + Unique identifier for this agent instance. + + + + + + + + Brand/company name used in prompts. + + + + Closing message shown when the survey completes. + + + + Domain name for SSL. Mirrors Python's `self.domain`. + + + + Check if full JSON Schema validation is enabled. Mirrors Python's `@property full_validation_enabled`. + + + + Host the server binds to. + + + + Opening message before the first question. + + + + Structured logger instance for this agent. Override the inherited SWMLService logger with an AgentBase-tagged one. + + + + Maximum number of times to retry invalid answers. + + + + Service display name. + + + + Public accessor for the native functions list. Python exposes `self.native_functions` as a public read/write attribute. + + + + + + Public accessor for the agent's POM as a [PromptObjectModel](/docs/sdk-reference/reference/typescript/pom/prompt-object-model) instance. Python parity: `agent.pom` instance attribute (agent\_base.py line 209) is a `signalwire.pom.pom.PromptObjectModel` when `use_pom=True`, or `None` otherwise. This getter returns the equivalent TypeScript `PromptObjectModel` instance — callers can use `addSection`, `findSection`, `renderMarkdown`, `renderXml`, `toJson`, `toYaml` exactly as in Python. The instance returned is a fresh snapshot built from the current `PomBuilder` state, so mutating it does not feed back into the agent's internal builder. To mutate the agent's prompt, use `promptAddSection` / `promptAddToSection` / `promptAddSubsection`. + + + + Port the server binds to. + + + + Static prompt sections: subclasses can define these declaratively. Each entry is applied via promptAddSection() in the constructor. + + + + Public accessor for the PromptManager (POM). Python exposes `self.pom` as a public attribute. This getter provides equivalent access for direct POM manipulation. + + + + The configured survey questions (public, matching Python). + + + + HTTP route path. + + + + Schema validation utilities. Mirrors Python's `self.schema_utils`. + + + + Unified security configuration. Mirrors Python's `self.security`. + + + + Public read-only accessor for the SkillManager. Python exposes `self.skill_manager` as a public attribute. This getter provides equivalent read access. + + + + Path to SSL certificate. Mirrors Python's `self.ssl_cert_path`. + + + + Whether SSL is enabled. Mirrors Python's `self.ssl_enabled`. + + + + Path to SSL private key. Mirrors Python's `self.ssl_key_path`. + + + + The complete set of internal SWAIG function names that accept fillers, matching the SWAIGInternalFiller schema definition. Any name outside this set is silently ignored by the runtime — addInternalFiller / setInternalFillers warn if you pass an unknown name. + + + + Human-readable survey name. + + + + + + + + Custom verb handler registry. Mirrors Python's `self.verb_registry`. + + +## Methods + +### addAnswerVerb + +Configure the answer verb (phase 2) with optional settings. + +#### Signature + +```typescript +addAnswerVerb(config?: Record): this +``` + +#### Parameters + + + Optional answer verb configuration. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1501. + +*** + +### addFunctionInclude + +Add a remote SWAIG function include reference. + +#### Signature + +```typescript +addFunctionInclude( + url: string, + functions: string[], + metaData?: Record +): this +``` + +#### Parameters + + + URL of the remote SWAIG endpoint. + + + + Function names available at that endpoint. + + + + Optional metadata to attach to the include. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 966. + +*** + +### addHint + +Add a single speech-recognition hint. + +#### Signature + +```typescript +addHint(hint: string): this +``` + +#### Parameters + + + Word or phrase to boost in speech recognition. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 653. + +*** + +### addHints + +Add multiple speech-recognition hints at once. + +#### Signature + +```typescript +addHints(hints: string[]): this +``` + +#### Parameters + + + Array of words or phrases to boost. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 663. + +*** + +### addInternalFiller + +Add internal filler phrases for a single internal function and language. + +See [setInternalFillers](/docs/sdk-reference/reference/typescript/prefabs/survey-agent#set-internal-fillers) for the complete list of supported +functionName values and an explanation of what fillers do. + +#### Signature + +```typescript +addInternalFiller( + functionName: string, + languageCode: string, + fillers: string[] +): this +``` + +#### Parameters + + + One of the supported internal function names (see SUPPORTED\_INTERNAL\_FILLER\_NAMES). Names outside the supported set log a warning and are ignored by the runtime. + + + + BCP-47 language code for the fillers (e.g. 'en-US'). + + + + Array of filler phrases. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 943. + +*** + +### addLanguage + +Add a supported language to the AI configuration. + +#### Signature + +```typescript +addLanguage(config: LanguageConfig): this +``` + +#### Parameters + + + Language configuration including name, code, voice, and optional fillers. `params` may be set to attach engine-specific tuning (voice stability, similarity boost, model knobs, etc.); only emitted into SWML when non-empty so existing entries stay byte-identical when no params are passed (Python ai\_config\_mixin.py `add_language`). + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 694. + +*** + +### addMcpServer + +Add an external MCP server for tool discovery and invocation. +Tools are discovered via MCP protocol at session start and added to the AI's tool list. + +#### Signature + +```typescript +addMcpServer(url: string, opts?: { ...3 fields }): this +``` + +#### Parameters + + + MCP server HTTP endpoint URL + + + + Optional configuration: headers, resources, resourceVars + + + + + + + + +#### Returns + +`this` — This agent instance for chaining + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1146. + +*** + +### addPatternHint + +Add a pattern-based speech-recognition hint with find-and-replace behavior. + +#### Signature + +```typescript +addPatternHint(opts: { ...4 fields }): this +``` + +#### Parameters + + + Pattern hint configuration with a descriptive hint label, regex pattern, replacement string, and optional case-insensitive flag. + + + + + + + + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 674. + +*** + +### addPostAiVerb + +Add a SWML verb to execute after the AI verb (phase 5). + +#### Signature + +```typescript +addPostAiVerb(verbName: string, config: Record): this +``` + +#### Parameters + + + Name of the SWML verb. + + + + Verb configuration object. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1523. + +*** + +### addPostAnswerVerb + +Add a SWML verb to execute after the answer phase but before the AI verb (phase 3). + +#### Signature + +```typescript +addPostAnswerVerb( + verbName: string, + config: number | Record +): this +``` + +#### Parameters + + + Name of the SWML verb. + + + + Verb configuration object. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1512. + +*** + +### addPreAnswerVerb + +Add a SWML verb to execute before the answer phase (phase 1). + +#### Signature + +```typescript +addPreAnswerVerb( + verbName: string, + config: number | Record +): this +``` + +#### Parameters + + + Name of the SWML verb (e.g. "play", "record"). + + + + Verb configuration object. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1491. + +*** + +### addPronunciation + +Add a pronunciation override rule for the TTS engine. + +#### Signature + +```typescript +addPronunciation(rule: PronunciationRule): this +``` + +#### Parameters + + + Pronunciation rule specifying the text to replace and its substitute. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 774. + +*** + +### addSection + +Add a new named section to the SWML document. +Mirrors Python's `add_section()`. + +#### Signature + +```typescript +addSection(sectionName: string): this +``` + +#### Parameters + + + Name of the section to create. + + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 653. + +*** + +### addSkill + +Add a skill to this agent, registering its tools, prompt sections, hints, and global data. + +#### Signature + +```typescript +addSkill(skill: SkillBase): Promise +``` + +#### Parameters + + + The skill instance to add. + + +#### Returns + +`Promise` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1570. + +*** + +### addSkillByName + +Add a skill by its registered name, looking it up in the global SkillRegistry. + +Matches Python's `add_skill(skill_name, params)` which loads skills by string +name via the SkillManager registry. Throws a `ValueError`-equivalent if the +skill name is not found in the registry. + +Accepts a typed [SkillNameOrString](/docs/sdk-reference/reference/typescript/skills/skill-name#skill-name-or-string): one of the built-in +`SkillName` values (autocompleted, with a typo caught at compile +time) or any other string for custom / third-party skills. The value is +forwarded to the registry unchanged — the typing is erased at runtime, so +this matches Python's bare-`str` `add_skill(skill_name, params)`. + +#### Signature + +```typescript +addSkillByName( + skillName: SkillNameOrString, + params?: SkillConfig +): Promise +``` + +#### Parameters + + + The name the skill was registered under in the SkillRegistry. + + + + Optional configuration parameters forwarded to the skill factory. + + +#### Returns + +`Promise` — This agent instance for chaining. + +#### Throws + +- Error if no skill with the given name is registered. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1641. + +*** + +### addSwaigQueryParams + +Add extra query parameters appended to all SWAIG webhook URLs. + +#### Signature + +```typescript +addSwaigQueryParams(params: Record): this +``` + +#### Parameters + + + Key-value pairs to append as query parameters. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1733. + +*** + +### addVerb + +Add a verb to the SWML document. + +#### Signature + +```typescript +addVerb(name: string, config: unknown): this +``` + +#### Parameters + + + Verb name (e.g., 'answer', 'play', 'hangup'). + + + + Verb configuration. + + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 642. + +*** + +### addVerbToSection + +Add a verb to a specific named section. +Mirrors Python's `add_verb_to_section()`. + +#### Signature + +```typescript +addVerbToSection(sectionName: string, verbName: string, config: unknown): this +``` + +#### Parameters + + + Target section name (auto-created if missing). + + + + Verb name. + + + + Verb configuration. + + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 669. + +*** + +### asRouter + +Return this agent's Hono app for mounting as a sub-router in an AgentServer. + +#### Signature + +```typescript +asRouter(): Hono +``` + +#### Returns + +`Hono` — The Hono application instance. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2656. + +*** + +### autoMapSipUsernames + +Automatically register common SIP usernames based on this agent's +name and route. Derives cleaned variants (alphanumeric + underscore) +and registers each via `registerSipUsername()`. + +Port of Python's `auto_map_sip_usernames()`: + +- Registers a cleaned version of the agent name +- Registers a cleaned version of the route (if different from name) +- For names longer than 3 characters, also registers a vowel-stripped variant + +#### Signature + +```typescript +autoMapSipUsernames(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1058. + +*** + +### buildSwmlForRequest + +Service-side SWML-builder hook. Subclasses return a `SwmlBuilder` +to fully replace the document for this request, or `null` to fall +through to `setOnRequestCallback` or the static builder. + +This is distinct from the WebMixin `onRequest(requestData, +callbackPath)` hook on AgentBase (which mirrors Python's +`on_request -> on_swml_request` modification-merge contract). +Use this hook when you want to swap the entire SWML builder; use +`onRequest` / `onSwmlRequest` on AgentBase when you want to merge +targeted modifications into the rendered document. + +Default implementation returns `null` (no-op). + +#### Signature + +```typescript +buildSwmlForRequest( + _queryParams: Record, + _bodyParams: Record, + _headers: Record, + _callbackPath?: string +): SwmlBuilder | null +``` + +#### Parameters + + + + + + + + + +#### Returns + +`SwmlBuilder | null` — A `SwmlBuilder` whose document is sent as the response, or `null` to delegate to the next handler in the chain. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 834. + +*** + +### clearPostAiVerbs + +Remove all post-AI verbs. + +#### Signature + +```typescript +clearPostAiVerbs(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1550. + +*** + +### clearPostAnswerVerbs + +Remove all post-answer verbs. + +#### Signature + +```typescript +clearPostAnswerVerbs(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1541. + +*** + +### clearPreAnswerVerbs + +Remove all pre-answer verbs. + +#### Signature + +```typescript +clearPreAnswerVerbs(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1532. + +*** + +### clearSwaigQueryParams + +Clear all SWAIG query parameters. + +#### Signature + +```typescript +clearSwaigQueryParams(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1742. + +*** + +### constructor + +Create a SurveyAgent with the specified questions and callbacks. + +#### Signature + +```typescript +constructor(config: SurveyConfig): SurveyAgent +``` + +#### Parameters + + + Configuration including questions, messages, and completion callback. + + +#### Returns + +`SurveyAgent` + +#### Source + +[`src/prefabs/SurveyAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/SurveyAgent.ts) + +Line 133. + +*** + +### createToolToken + +Mint a per-call SWAIG-function token via the agent's SessionManager. + +Mirrors Python reference `core/mixins/state_mixin.py _create_tool_token`: +delegates to `SessionManager.createToolToken` and returns an empty +string on any failure (Python catches all exceptions and returns ""). + +#### Signature + +```typescript +createToolToken(toolName: string, callId: string): string +``` + +#### Parameters + + + + + +#### Returns + +`string` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1475. + +*** + +### defineContexts + +Define or replace the contexts configuration for the AI verb. + +#### Signature + +```typescript +defineContexts( + contexts?: Record | ContextBuilder +): ContextBuilder +``` + +#### Parameters + + + An existing ContextBuilder instance or a plain object; a new ContextBuilder is created if omitted. + + +#### Returns + +`ContextBuilder` — The active ContextBuilder for further configuration. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 604. + +*** + +### defineTool + +Register a SWAIG tool (function) that the AI can invoke during a call. + +#### How this becomes a tool the model sees + +A SWAIG function is **exactly the same concept** as a "tool" in +native OpenAI / Anthropic tool calling. On every LLM turn, the SDK +renders each registered SWAIG function into the OpenAI tool schema: + +```json +{ +"type": "function", +"function": { +"name": "your_name_here", +"description": "your description text", +"parameters": { /* your JSON schema */ } +} +} +``` + +That schema goes to the model in the same API call that produces +the next assistant message. The model reads: + +- the **function `description`** to decide WHEN to call this tool +- each **parameter `description`** (inside the JSON schema) to + decide HOW to fill in each argument + +This means **descriptions are prompt engineering**, not developer +comments. A vague description is the #1 cause of "the model has the +right tool but doesn't call it" failures. + +##### Bad vs good descriptions + +```text +BAD : description: 'Lookup function' +GOOD: description: 'Look up a customer's account details by account +number. Use this BEFORE quoting any account-specific info +(balance, plan, status). Do not use for general product +questions.' + +BAD : parameters: { id: { type: 'string', description: 'the id' } } +GOOD: parameters: { account_number: { type: 'string', description: +'The customer's 8-digit account number, no dashes or spaces. +Ask the user if they don't provide it.' } } +``` + +##### Tool count matters + +LLM tool selection accuracy degrades past ~7-8 simultaneously-active +tools per call. Use Step.setFunctions() to partition tools across +steps so only the relevant subset is active at any moment. + +#### Signature + +```typescript +defineTool(opts: { ...11 fields }): this +``` + +#### Parameters + + + Tool definition including name, description, parameter schema, and handler callback. `description` and per-parameter `description` strings are LLM-facing prompt engineering. + + + + + Additional fields to pass through to the SWAIG function definition (Python `**swaig_fields` equivalent). + + + + + + + + + + + + + + + + + + + + External webhook URL; makes this an externally-hosted tool. + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1330. + +*** + +### defineTools + +Register SWAIG tools: + +- Python-parity tools: `validate_response`, `log_response` +- TS-specific session tools: `answer_question`, `get_current_question`, `get_survey_progress` + +#### Signature + +```typescript +defineTools(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/prefabs/SurveyAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/SurveyAgent.ts) + +Line 409. + +*** + +### defineTypedTool + +Register a SWAIG tool with a typed handler that receives named parameters +instead of the standard `(args, rawData)` convention. + +The SDK wraps the handler to unpack the args dict into positional params. +If no `parameters` schema is provided, one is inferred from the handler's +source code (parameter names and default values). + +#### Signature + +```typescript +defineTypedTool(opts: { ...9 fields }): this +``` + +#### Parameters + + + Tool definition with a typed handler function. + + + + + + + The typed handler. Receives the AI-extracted arguments as named positional parameters (in declaration order), optionally with a trailing `rawData` record, and returns a SWAIG result. Precisely typed as [TypedToolHandler](/docs/sdk-reference/reference/typescript/type-inference#typed-tool-handler) rather than the bare `Function` so a non-callable — or a callable that returns nothing usable — is a compile-time error. + + + + + + + + + + + + + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1373. + +*** + +### enableDebugEvents + +Enable debug event webhooks for this agent. + +#### Signature + +```typescript +enableDebugEvents(level: number = 1): this +``` + +#### Parameters + + + Debug verbosity level (defaults to 1). + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1011. + +*** + +### enableDebugRoutes + +Register a callback function that determines routing based on POST data. + +When a routing callback is registered, an endpoint at the specified path +is created in `getApp()`. The callback receives the request body and returns +Enable debug routes for testing and development. + +This is a backward-compatibility stub matching the Python SDK. +In the TypeScript SDK, debug routes (health, ready, debug\_events) +are automatically registered in `getApp()`. + +#### Signature + +```typescript +enableDebugRoutes(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1773. + +*** + +### enableMcpServer + +Expose this agent's tools as an MCP server endpoint at /mcp. +Adds a JSON-RPC 2.0 endpoint that MCP clients (Claude Desktop, other agents) can connect to. + +#### Signature + +```typescript +enableMcpServer(): this +``` + +#### Returns + +`this` — This agent instance for chaining + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1160. + +*** + +### enableSipRouting + +Enable SIP routing for this agent. + +#### Signature + +```typescript +enableSipRouting(autoMap: boolean = true, path: string = '/sip'): this +``` + +#### Parameters + + + When true, automatically map SIP usernames to the agent route (defaults to true). + + + + HTTP path for the SIP routing endpoint (defaults to '/sip'). + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1025. + +*** + +### extractSipUsername + +Extract the SIP username from a request body's call.to field. + +**Modifiers:** `static` + +#### Signature + +```typescript +extractSipUsername(requestBody: Record): string | null +``` + +#### Parameters + + + The parsed request body containing call information. + + +#### Returns + +`string | null` — The extracted SIP username, or null if not found. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1122. + +*** + +### getAllFunctions + +Snapshot of all registered SWAIG functions keyed by name. +(Python parity: `ToolRegistry.get_all_functions`.) + +#### Signature + +```typescript +getAllFunctions(): Record> +``` + +#### Returns + +`Record>` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 529. + +*** + +### getApp + +Get or lazily create the Hono HTTP application with all routes, middleware, auth, and CORS. + +#### Signature + +```typescript +getApp(): Hono +``` + +#### Returns + +`Hono` — The configured Hono application instance. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2269. + +*** + +### getBasicAuthCredentials + +Get the basic-auth credentials used by this agent. + +#### Signature + + + + ```typescript + getBasicAuthCredentials(includeSource?: false): [string, string] + ``` + + + + ```typescript + getBasicAuthCredentials( + includeSource: true + ): [string, string, "provided" | "environment" | "generated"] + ``` + + + +#### Parameters (Overload 1) + + + When true, a third element indicating the credential source is appended. + + +#### Parameters (Overload 2) + + + When true, a third element indicating the credential source is appended. + + +#### Returns (Overload 1) + +`[string, string]` — A tuple of \[username, password] or \[username, password, source]. + +#### Returns (Overload 2) + +`[string, string, "provided" | "environment" | "generated"]` — A tuple of \[username, password] or \[username, password, source]. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2794. + +*** + +### getBuilder + +Get the underlying SwmlBuilder for direct manipulation. + +#### Signature + +```typescript +getBuilder(): SwmlBuilder +``` + +#### Returns + +`SwmlBuilder` — The SwmlBuilder instance. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 632. + +*** + +### getContexts + +Get the contexts dictionary as serialised SWML, or null when no +contexts have been defined yet. + +Matches Python `PromptManager.get_contexts()` which returns the +contexts dict or `None`. + +#### Signature + +```typescript +getContexts(): Record | null +``` + +#### Returns + +`Record | null` — Contexts dict, or null when no contexts are defined. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 641. + +*** + +### getDocument + +Get the SWML document as a dictionary. +Alias for `renderSwml()` that matches Python's `get_document()` name. + +#### Signature + +```typescript +getDocument(): Record +``` + +#### Returns + +`Record` — The SWML document. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 706. + +*** + +### getFullUrl + +Get the full external URL of this agent, using the proxy base URL if available. + +#### Signature + +```typescript +getFullUrl(includeAuth: boolean = false): string +``` + +#### Parameters + + + Whether to embed basic-auth credentials in the URL (defaults to false). + + +#### Returns + +`string` — The fully-qualified URL string. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1857. + +*** + +### getFunction + +Get a registered SWAIG function entry, or undefined. +(Python parity: `ToolRegistry.get_function`.) + +#### Signature + +```typescript +getFunction(name: string): Record | SwaigFunction | undefined +``` + +#### Parameters + + + +#### Returns + +`Record | SwaigFunction | undefined` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 523. + +*** + +### getLanguageParams + +Read the per-language `params` dict for a previously-added language. + +Python parity: `get_language_params(code)`. Returns `undefined` if the +code is unknown or the language has no params set — no exception path. + +#### Signature + +```typescript +getLanguageParams(code: string): Record | undefined +``` + +#### Parameters + + + Language code as previously passed to [addLanguage](/docs/sdk-reference/reference/typescript/prefabs/survey-agent#add-language). + + +#### Returns + +`Record | undefined` — The params dict if set, `undefined` otherwise (including when the code is unknown). + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 760. + +*** + +### getMcpServers + +Get configured MCP servers (read-only copy). + +#### Signature + +```typescript +getMcpServers(): Record[] +``` + +#### Returns + +`Record[]` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1171. + +*** + +### getName + +Get the agent's display name. + +#### Signature + +```typescript +getName(): string +``` + +#### Returns + +`string` — The agent name string. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1559. + +*** + +### getPostPrompt + +Get the post-prompt text, if one has been set. + +#### Signature + +```typescript +getPostPrompt(): string | null +``` + +#### Returns + +`string | null` — The post-prompt string, or null if not configured. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 548. + +*** + +### getPrompt + +Get the fully rendered main prompt text. + +#### Signature + +```typescript +getPrompt(): string +``` + +#### Returns + +`string` — The assembled prompt string. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 520. + +*** + +### getPromptPom + +Get the raw POM (Prompt Object Model) structure as an array of section data objects, +when the agent is in POM mode and has at least one section. + +Matches Python `get_prompt()` which returns `Union[str, List[Dict]]` — a raw list when +in POM mode (via `pom.to_list()` / `pom.render_dict()`), or a string otherwise. +The TS `getPrompt()` always returns a string (rendered Markdown), so this companion +method exposes the raw POM structure for callers that need it for serialisation or +inspection (e.g. skills that inspect prompt sections). + +#### Signature + +```typescript +getPromptPom(): Record[] | null +``` + +#### Returns + +`Record[] | null` — An array of POM section data objects, or null if not in POM mode or POM is empty. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 536. + +*** + +### getRawPrompt + +Get the raw prompt text whatever `setPromptText` stored, or null when +no raw prompt has been set. + +Matches Python `PromptManager.get_raw_prompt()` which returns the raw +stored string or `None`. Use this instead of `getPrompt()` when you +need the unrendered text rather than the POM-rendered Markdown. + +#### Signature + +```typescript +getRawPrompt(): string | null +``` + +#### Returns + +`string | null` — The raw prompt string, or null if not set. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 562. + +*** + +### getRegisteredTools + +Get a summary of all registered tools with their names, descriptions, and +parameter schemas. Lifted from AgentBase so the swaig-test CLI can list +tools on a non-AgentBase SWMLService target (sidecar / standalone SWAIG +host). + +#### Signature + +```typescript +getRegisteredTools(): { description: string; name: string; parameters: Record }[] +``` + +#### Returns + +`{ description: string; name: string; parameters: Record }[]` — Array of tool descriptors. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 557. + +*** + +### getTool + +Look up a registered SwaigFunction by name. Lifted from AgentBase so +`swaig-test --exec ` works against a non-AgentBase SWMLService +target. + +#### Signature + +```typescript +getTool(name: string): SwaigFunction | undefined +``` + +#### Parameters + + + The tool name to search for. + + +#### Returns + +`SwaigFunction | undefined` — The SwaigFunction instance, or undefined if not found or not a SwaigFunction. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 581. + +*** + +### getTools + +Public access to the list of registered tools. + +In Python, `define_tools()` is public and returns `List[SWAIGFunction]`. +In TypeScript, `defineTools()` is a protected setup hook (void). This +method provides the equivalent public "get all tools" capability. + +#### Signature + +```typescript +getTools(): SwaigFunction[] +``` + +#### Returns + +`SwaigFunction[]` — Array of all registered SwaigFunction instances. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 371. + +*** + +### handleMcpRequest + +Handle an MCP JSON-RPC 2.0 request. Returns the response object. + +#### Signature + +```typescript +handleMcpRequest( + body: Record +): Promise> +``` + +#### Parameters + + + +#### Returns + +`Promise>` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1204. + +*** + +### hasFunction + +Whether a SWAIG function with the given name is registered. +(Python parity: `ToolRegistry.has_function`.) + +#### Signature + +```typescript +hasFunction(name: string): boolean +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 517. + +*** + +### hasSkill + +Check whether a skill with the given name is registered. + +Accepts a typed [SkillNameOrString](/docs/sdk-reference/reference/typescript/skills/skill-name#skill-name-or-string) so built-in names autocomplete +and a typo is a compile-time error; any other string is still accepted +(custom skills / parity with Python's bare-`str` `has_skill`). + +#### Signature + +```typescript +hasSkill(skillName: SkillNameOrString): boolean +``` + +#### Parameters + + + The skill name to check. + + +#### Returns + +`boolean` — True if a skill with that name exists. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1676. + +*** + +### hasTool + +Whether a tool with the given name is registered. + +#### Signature + +```typescript +hasTool(name: string): boolean +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 511. + +*** + +### isMcpServerEnabled + +Check if MCP server endpoint is enabled. + +#### Signature + +```typescript +isMcpServerEnabled(): boolean +``` + +#### Returns + +`boolean` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1166. + +*** + +### listSkills + +List all registered skills with their names, instance IDs, and initialization status. + +#### Signature + +```typescript +listSkills(): { initialized: boolean; instanceId: string; name: string }[] +``` + +#### Returns + +`{ initialized: boolean; instanceId: string; name: string }[]` — Array of skill descriptors. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1662. + +*** + +### listToolNames + +List registered tool names in insertion order (Map preserves it). + +#### Signature + +```typescript +listToolNames(): string[] +``` + +#### Returns + +`string[]` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 545. + +*** + +### manualSetProxyUrl + +Manually set the proxy base URL used for webhook URL generation. + +#### Signature + +```typescript +manualSetProxyUrl(url: string): this +``` + +#### Parameters + + + The external-facing base URL (trailing slashes are stripped). + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1754. + +*** + +### onDebugEvent + +Lifecycle hook called when a debug event webhook is received. Override in subclasses. + +#### Signature + +```typescript +onDebugEvent(_event: Record): void | Promise +``` + +#### Parameters + + + The debug event payload. + + +#### Returns + +`void | Promise` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1970. + +*** + +### onFunctionCall + +Hook called before each SWAIG function execution. Override in subclasses. + +**Behavioral note:** In the Python SDK, `on_function_call` IS the dispatcher +— it retrieves and executes the function, returning the result. In TypeScript, +`fn.execute()` is called separately after this hook. However, if this method +returns a non-void value, it is used as the result and the default execution +is skipped, enabling dispatch interception parity with Python. + +#### Signature + +```typescript +onFunctionCall( + _name: string, + _args: Record, + _rawData: Record +): void | Record | Promise> +``` + +#### Parameters + + + Name of the function about to execute. + + + + Parsed arguments for the function. + + + + The full raw SWAIG request payload. + + +#### Returns + +`void | Record | Promise>` — Optionally a result dict to short-circuit default execution, or void/undefined to proceed normally. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1999. + +*** + +### onRequest + +Lifecycle hook called when SWML is requested. Default delegates to +[onSwmlRequest](/docs/sdk-reference/reference/typescript/prefabs/survey-agent#on-swml-request) and returns its result. Subclasses typically +override `onSwmlRequest` rather than this method. + +Matches Python `WebMixin.on_request(request_data, callback_path)`. The +cross-language API is the two-arg form; the Hono `context` argument is +a TypeScript-side extra preserved for callers that already have it but +is not part of the audited surface. + +#### Signature + +```typescript +onRequest( + requestData?: Record | null, + callbackPath?: string | null +): void | Record | Promise> +``` + +#### Parameters + + + The parsed request body. + + + + Optional callback path from the request. + + +#### Returns + +`void | Record | Promise>` — Optionally a dict of SWML modifications, or undefined for default rendering. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1935. + +*** + +### onSummary + +Process the survey results summary returned at the end of a call. +Mirrors Python `on_summary`: structured (dict-like) summaries are logged +as JSON; unstructured summaries are logged verbatim. + +The parameter type widens the base `AgentBase.onSummary` signature to +accept string payloads as well, matching Python's `isinstance(summary, dict)` +branch even though the current framework only surfaces object summaries. + +#### Signature + +```typescript +onSummary( + summary: string | Record | null, + _rawData: Record +): void | Promise +``` + +#### Parameters + + + + + +#### Returns + +`void | Promise` + +#### Source + +[`src/prefabs/SurveyAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/SurveyAgent.ts) + +Line 639. + +*** + +### onSwmlRequest + +Lifecycle hook called on every SWML request before rendering. Override in subclasses. + +May optionally return a modification dict that will be merged into the +rendered SWML document (matching Python's `Optional[dict]` return type). + +Matches Python `on_swml_request(request_data, callback_path, request)` — the third +parameter is the FastAPI `Request` in Python; here it is the raw Hono context object +so that subclasses can access query parameters (`context.req.query()`), raw request +headers (`context.req.raw.headers`), etc. + +#### Signature + +```typescript +onSwmlRequest( + _rawData: Record, + _callbackPath?: string, + _context?: any +): void | Record | Promise> +``` + +#### Parameters + + + The parsed request body. + + + + Optional callback path from the request. + + + + The raw Hono context object (c), providing access to headers and query params. + + +#### Returns + +`void | Record | Promise>` — Optionally a dict of SWML modifications, or void. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1958. + +*** + +### promptAddSection + +Add a new section to the prompt with optional body, bullets, and subsections. + +#### Signature + +```typescript +promptAddSection(title: string, opts?: { ...5 fields }): this +``` + +#### Parameters + + + Section heading. + + + + Optional section content including body text, bullet points, and subsections. + + + + + + + + + + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 467. + +*** + +### promptAddSubsection + +Add a subsection under an existing prompt section. + +#### Signature + +```typescript +promptAddSubsection( + parentTitle: string, + title: string, + opts?: { ...2 fields } +): this +``` + +#### Parameters + + + Title of the parent section. + + + + Title of the new subsection. + + + + Optional body text and bullet points for the subsection. + + + + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 502. + +*** + +### promptAddToSection + +Append content to an existing prompt section. + +#### Signature + +```typescript +promptAddToSection(title: string, opts?: { ...3 fields }): this +``` + +#### Parameters + + + Title of the section to append to. + + + + Content to add: body text, a single bullet, or multiple bullets. + + + + + + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 487. + +*** + +### promptHasSection + +Check whether a prompt section with the given title exists. + +#### Signature + +```typescript +promptHasSection(title: string): boolean +``` + +#### Parameters + + + Section title to look for. + + +#### Returns + +`boolean` — True if the section exists. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 512. + +*** + +### registerAdditionalRoutes + +Extension point: register additional Hono routes after SWMLService +mounts /health, /ready, /swaig, and the main route. AgentBase uses +this to add /post\_prompt, /check\_for\_input, /debug\_events, /mcp. + +#### Signature + +```typescript +registerAdditionalRoutes(_app: Hono): void +``` + +#### Parameters + + + +#### Returns + +`void` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 604. + +*** + +### registerRoutingCallback + +Register a callback at a specific HTTP path that decides how to route an +incoming request. + +When called, the endpoint at `path` will invoke `callback` with the parsed +request body. If `callback` returns a non-empty route string the server +responds with `{ action: "redirect", route }` so the platform can forward the +request to the right agent. If `callback` returns `null` / `undefined` the +agent's own SWML is returned instead (normal processing). + +Mirrors Python `swml_service.register_routing_callback` / +`web_mixin.register_routing_callback`. + +#### Signature + +```typescript +registerRoutingCallback(callback: RoutingCallback, path: string = '/sip'): this +``` + +#### Parameters + + + Function receiving the parsed request body and returning a route string to redirect, or null/undefined for normal processing. + + + + HTTP path where this callback endpoint is registered (default: '/sip'). + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1102. + +*** + +### registerSipUsername + +Register a SIP username to route to this agent. + +#### Signature + +```typescript +registerSipUsername(username: string): this +``` + +#### Parameters + + + The SIP username to register. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1040. + +*** + +### registerSwaigFunction + +Register a SwaigFunction instance or a raw function descriptor (DataMap). + +#### Signature + +```typescript +registerSwaigFunction(fn: Record | SwaigFunction): this +``` + +#### Parameters + + + +#### Returns + +`this` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 472. + +*** + +### registerVerbHandler + +Register a custom verb handler. +Mirrors Python's `register_verb_handler()`. + +#### Signature + +```typescript +registerVerbHandler(handler: SWMLVerbHandler): void +``` + +#### Parameters + + + The verb handler to register. + + +#### Returns + +`void` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 726. + +*** + +### removeFunction + +Remove a registered SWAIG function. Returns true when removed, +false when not found. (Python parity: +`ToolRegistry.remove_function`.) + +#### Signature + +```typescript +removeFunction(name: string): boolean +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 540. + +*** + +### removeSkill + +Remove a previously added skill by its instance ID. + +#### Signature + +```typescript +removeSkill(instanceId: string): Promise +``` + +#### Parameters + + + The unique instance ID of the skill to remove. + + +#### Returns + +`Promise` — True if the skill was found and removed. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1654. + +*** + +### removeSkillByName + +Remove a skill by its name (Python parity). + +Python's `remove_skill(skill_name)` removes by skill name. +The existing `removeSkill(instanceId)` removes by instance ID. +This method provides name-based removal for cross-SDK parity. + +#### Signature + +```typescript +removeSkillByName(skillName: string): Promise +``` + +#### Parameters + + + The skill name to remove. + + +#### Returns + +`Promise` — True if a skill with that name was found and removed. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1690. + +*** + +### renderDocument + +Render the SWML document as a JSON string. +Mirrors Python's `render_document()`. + +#### Signature + +```typescript +renderDocument(): string +``` + +#### Returns + +`string` — JSON-encoded SWML document. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 715. + +*** + +### renderSwml + +Render the complete SWML document by assembling all 5 phases: pre-answer, answer, +post-answer, AI, and post-AI verbs. + +#### Signature + +```typescript +renderSwml(callId?: string, modifications?: Record): string +``` + +#### Parameters + + + Optional call ID to use for session tokens; auto-generated if omitted. + + + + Optional dict returned from `onSwmlRequest` to merge into the AI verb config before rendering. Matches Python's `_render_swml(modifications)` semantics: `global_data` is deep-merged; all other keys override the AI config directly. + + +#### Returns + +`string` — The rendered SWML document as a JSON string. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2019. + +*** + +### resetContexts + +Remove all contexts, returning the agent to a no-contexts state. + +This is a convenience wrapper around `defineContexts().reset()`. +Use it in a dynamic config callback when you need to rebuild +contexts from scratch for a specific request. + +#### Signature + +```typescript +resetContexts(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 625. + +*** + +### resetDocument + +Reset the SWML document to an empty state. +Mirrors Python's `reset_document()`. + +#### Signature + +```typescript +resetDocument(): this +``` + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 679. + +*** + +### run + +Alias for [serve](/docs/sdk-reference/reference/typescript/prefabs/survey-agent#serve). Starts the HTTP server. + +#### Signature + +```typescript +run(opts?: { ...2 fields }): Promise +``` + +#### Parameters + + + Optional host and port overrides. + + + + + + +#### Returns + +`Promise` — A promise that resolves once the server is running. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2702. + +*** + +### runServerless + +Handle a single serverless invocation (AWS Lambda, Google Cloud Functions, Azure Functions, or CGI). + +Matches Python `run(event, context)` when executed in a serverless environment. Python's +`run()` auto-detects the platform via `get_execution_mode()` and dispatches accordingly; +in TypeScript the serverless path is an **explicit** method so that `run()` keeps its +HTTP-server semantics and callers opt in to serverless dispatch deliberately. + +Platform detection follows the same environment-variable heuristics as Python's +`ServerlessMixin`: `AWS_LAMBDA_FUNCTION_NAME` → Lambda, `K_SERVICE` → GCF, +`FUNCTIONS_WORKER_RUNTIME` → Azure, `GATEWAY_INTERFACE` → CGI. + +Usage in a Lambda handler file: + +```ts +export const handler = (event: any, context: any) => agent.runServerless(event, context); +``` + +#### Signature + +```typescript +runServerless( + event: ServerlessEvent, + context?: unknown, + platform?: "lambda" | "gcf" | "azure" | "cgi" | "auto" +): Promise +``` + +#### Parameters + + + The serverless event payload (Lambda event, GCF request body, etc.). + + + + The serverless context object (Lambda context, Azure context, etc.). + + + + Optional platform override; defaults to 'auto' (environment detection). + + +#### Returns + +`Promise` — The normalized serverless response object. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2728. + +*** + +### serve + +Start the HTTP server and begin listening for requests. + +Uses `@hono/node-server` under the hood. When run in CLI mode +(`SWAIG_CLI_MODE=true`, set automatically by `npx swaig-test`), this is a +no-op so agent config can be inspected without starting a server. + +#### Signature + +```typescript +serve(opts?: { ...2 fields }): Promise +``` + +#### Parameters + + + Optional host/port overrides. Defaults to the values provided in the constructor options or the `PORT` environment variable. + + + + + + +#### Returns + +`Promise` — A promise that resolves once the server has begun listening. + +#### Examples + +```typescript +const agent = new AgentBase({ name: 'demo', port: 3000 }); +await agent.serve(); +// Or override at runtime: +await agent.serve({ port: 8080, host: '127.0.0.1' }); +``` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2679. + +*** + +### setDynamicConfigCallback + +Set a callback invoked on each SWML request to dynamically modify an ephemeral agent copy. + +The callback receives a clone of this agent — mutations apply only to the current +request, so you can vary prompt, tools, languages, params, or global data per call +without affecting the long-lived agent instance. + +#### Signature + +```typescript +setDynamicConfigCallback(cb: DynamicConfigCallback): this +``` + +#### Parameters + + + Callback receiving `(queryParams, bodyParams, headers, agent)` where `agent` is the ephemeral `AgentBase` copy to mutate. May be async. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Examples + +```typescript +agent.setDynamicConfigCallback((query, body, headers, agent) => { + const lang = query.lang ?? 'en'; + if (lang === 'es') { + (agent as AgentBase).setPromptText('Eres un asistente útil.'); + } +}); +``` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1723. + +*** + +### setFunctionIncludes + +Replace the entire list of function includes. +Each include must have a `url` and `functions` array. + +#### Signature + +```typescript +setFunctionIncludes(includes: FunctionInclude[]): this +``` + +#### Parameters + + + Array of function include objects. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 979. + +*** + +### setGlobalData + +Merge data into the global\_data object passed into the AI configuration. + +Matches Python `set_global_data` which calls `.update()` on the internal dict — +existing keys are preserved; incoming keys overwrite on collision. Skills and +other callers can each contribute keys without clobbering one another. + +If you need to replace the entire object, assign a new agent instance or use +`Object.assign(agent.globalData, {})` to clear first. + +#### Signature + +```typescript +setGlobalData(data: Record): this +``` + +#### Parameters + + + Key-value pairs to merge into global data. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 828. + +*** + +### setInternalFillers + +Set internal fillers for native SWAIG functions. + +Internal fillers are short phrases the AI agent speaks (via TTS) while +an internal/native function is running, so the caller doesn't hear +dead air during transitions or background work. + +Supported function names (matches the SWAIGInternalFiller schema): + +hangup — when the agent is hanging up +check\_time — when checking the time +wait\_for\_user — when waiting for user input +wait\_seconds — during deliberate pauses +adjust\_response\_latency — when adjusting response timing +next\_step — transitioning between steps in prompt.contexts +change\_context — switching between contexts in prompt.contexts +get\_visual\_input — processing visual input (enable\_vision=true) +get\_ideal\_strategy — thinking (enable\_thinking=true) + +Notably NOT supported: change\_step, gather\_submit, or arbitrary +user-defined SWAIG function names. The runtime only honors fillers +for the names listed above; everything else is silently ignored at +the SWML level. This method warns at registration time if you pass +an unknown name so you catch the typo early. + +#### Signature + +```typescript +setInternalFillers( + internalFillers: Record> +): this +``` + +#### Parameters + + + Map of function name to language-keyed filler phrases. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Examples + +```typescript +agent.setInternalFillers({ + next_step: { + 'en-US': ['Moving to the next step...', 'Great, let us continue...'], + 'es': ['Pasando al siguiente paso...'] + }, + check_time: { + 'en-US': ['Let me check the time...'] + } +}); +``` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 910. + +*** + +### setLanguageParams + +Set (or replace) the per-language `params` dict on an already-added +language. Useful when language entries are built up via [addLanguage](/docs/sdk-reference/reference/typescript/prefabs/survey-agent#add-language) +first and engine-specific tuning is added later (e.g., from a config +loader). + +Python parity: `set_language_params(code, params)`. Passing an empty +object removes the `params` key entirely. Unknown codes are a no-op. + +#### Signature + +```typescript +setLanguageParams(code: string, params: Record): this +``` + +#### Parameters + + + Language code as previously passed to [addLanguage](/docs/sdk-reference/reference/typescript/prefabs/survey-agent#add-language) (e.g. `"en-US"`). + + + + Engine-specific params dict to attach. Empty object removes the key. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 737. + +*** + +### setLanguages + +Replace all configured languages with a new list. + +#### Signature + +```typescript +setLanguages(languages: LanguageConfig[]): this +``` + +#### Parameters + + + Array of language configurations. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 718. + +*** + +### setNativeFunctions + +Set the list of native SWAIG function names (built-in platform functions). + +#### Signature + +```typescript +setNativeFunctions(funcs: string[]): this +``` + +#### Parameters + + + Array of native function names. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 848. + +*** + +### setOnRequestCallback + +Set a callback invoked per-request to dynamically build SWML. +When set, the static SwmlBuilder is ignored and the callback's +returned SwmlBuilder is used instead. + +#### Signature + +```typescript +setOnRequestCallback(cb: OnRequestCallback): this +``` + +#### Parameters + + + Callback receiving query params, body params, and headers. + + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 850. + +*** + +### setParam + +Set a single AI parameter (e.g. "temperature", "top\_p"). + +#### Signature + +```typescript +setParam(key: string, value: unknown): this +``` + +#### Parameters + + + Parameter name. + + + + Parameter value. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 800. + +*** + +### setParams + +Merge multiple AI parameters into the existing params object. + +#### Signature + +```typescript +setParams(params: Record): this +``` + +#### Parameters + + + Key-value pairs to merge. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 810. + +*** + +### setPostPrompt + +Set the post-prompt text evaluated after the call ends. + +#### Signature + +```typescript +setPostPrompt(text: string): this +``` + +#### Parameters + + + The post-prompt text to use. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 456. + +*** + +### setPostPromptLlmParams + +Merge LLM-specific parameters into the post-prompt configuration. + +#### Signature + +```typescript +setPostPromptLlmParams(params: Record): this +``` + +#### Parameters + + + Key-value LLM parameters to merge. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1001. + +*** + +### setPostPromptUrl + +Override the default post-prompt webhook URL with a custom one. + +#### Signature + +```typescript +setPostPromptUrl(url: string): this +``` + +#### Parameters + + + The custom post-prompt URL. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1847. + +*** + +### setPromptLlmParams + +Merge LLM-specific parameters into the main prompt configuration (e.g. model, temperature). + +#### Signature + +```typescript +setPromptLlmParams(params: Record): this +``` + +#### Parameters + + + Key-value LLM parameters to merge. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 991. + +*** + +### setPromptPom + +Set the prompt as a POM (Prompt Object Model) dictionary. + +Replaces the current POM sections with the provided structured data. +Each entry should have `title`, and optionally `body`, `bullets`, +`numbered`, `numberedBullets`, and `subsections`. + +#### Signature + +```typescript +setPromptPom(pom: Record[]): this +``` + +#### Parameters + + + Array of POM section dictionaries. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Throws + +- Error if POM mode is not enabled (`usePom: false`). + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 577. + +*** + +### setPromptText + +Set the main system prompt text for the AI. + +#### Signature + +```typescript +setPromptText(text: string): this +``` + +#### Parameters + + + The prompt text to use. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 446. + +*** + +### setPronunciations + +Replace all pronunciation rules with a new list. + +#### Signature + +```typescript +setPronunciations(rules: PronunciationRule[]): this +``` + +#### Parameters + + + Array of pronunciation rule objects. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 786. + +*** + +### setupGracefulShutdown + +Register process signal handlers for clean Kubernetes/Docker shutdown. +Handles SIGTERM and SIGINT, waits for a timeout, then exits. + +**Modifiers:** `static` + +#### Signature + +```typescript +setupGracefulShutdown(opts?: { ...1 fields }): void +``` + +#### Parameters + + + Optional timeout in milliseconds (default 5000). + + + + +#### Returns + +`void` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2751. + +*** + +### setWebHookUrl + +Override the default SWAIG webhook URL with a custom one. + +#### Signature + +```typescript +setWebHookUrl(url: string): this +``` + +#### Parameters + + + The custom webhook URL. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1837. + +*** + +### stop + +Stop the HTTP server. +Mirrors Python's `stop()`. + +#### Signature + +```typescript +stop(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 1009. + +*** + +### swaigPreDispatch + +Extension point: invoked between argument parsing and function dispatch +on POST /swaig. Returns \[target, shortCircuit]: when shortCircuit is +non-null, it's returned directly without dispatching. AgentBase may +override to add session-token validation or ephemeral dynamic-config. + +#### Signature + +```typescript +swaigPreDispatch( + _requestData: Record, + _funcName: string +): [SWMLService, unknown] +``` + +#### Parameters + + + + + +#### Returns + +`[SWMLService, unknown]` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 592. + +*** + +### updateGlobalData + +Merge additional entries into the existing global\_data object. + +#### Signature + +```typescript +updateGlobalData(data: Record): this +``` + +#### Parameters + + + Key-value pairs to merge into global data. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 838. + +*** + +### validateBasicAuth + +Override to add custom basic-auth validation logic beyond credential matching. + +#### Signature + +```typescript +validateBasicAuth( + _username: string, + _password: string +): boolean | Promise +``` + +#### Parameters + + + The username from the request. + + + + The password from the request. + + +#### Returns + +`boolean | Promise` — True if the credentials are valid; false to reject the request. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1980. + +*** + +### validateToolToken + +Validate a tool-call token for the given function. + +Mirrors Python reference `core/mixins/state_mixin.py validate_tool_token`: + +1. Unknown function → `false`. +2. Registered but non-secure → `true` without consulting SessionManager + (non-secure tools never require a token). +3. Raw-dict descriptors (e.g. DataMap) are treated as secure, matching + Python's `isinstance(func, dict) → is_secure = True` branch. +4. Missing token on a secure tool → `false`. +5. Otherwise delegate to `SessionManager.validateToolToken`. + +Divergences from the Python reference: + +- No debug-logging branch: `AgentBase` does not expose an agent-level + debug-mode flag, so the per-call debug telemetry Python emits is + omitted. `SessionManager` still logs its own validation outcomes. +- No token-derived call-id fallback: `SessionManager.debugToken` + truncates the embedded call-id for log safety, so an extracted value + cannot be round-tripped back through `validateToolToken`. The caller + is expected to supply a non-empty `callId`; an empty one is forwarded + unchanged and the underlying validator will reject it. + +#### Signature + +```typescript +validateToolToken(functionName: string, token: string, callId: string): boolean +``` + +#### Parameters + + + + + + + +#### Returns + +`boolean` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1455. + +## Functions + +### createSurveyAgent + +Factory function that creates and returns a new SurveyAgent. + +#### Signature + +```typescript +createSurveyAgent(config: SurveyConfig): SurveyAgent +``` + +#### Parameters + + + Configuration for the survey agent. + + +#### Returns + +`SurveyAgent` — A configured SurveyAgent instance. + +#### Source + +[`src/prefabs/SurveyAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/SurveyAgent.ts) + +Line 667. + +## Interfaces + +### SurveyConfig + +Configuration for the [SurveyAgent](/docs/sdk-reference/reference/typescript/prefabs/survey-agent). + +#### Signature + +```typescript +interface SurveyConfig +``` + +#### Properties + + + Additional AgentBase options forwarded to super(). + + + + Brand or company name the agent represents (matches Python `brand_name`). + + + + Message after the survey is complete (matches Python `conclusion`). + + + + Opening message before the first question (matches Python `introduction`). + + + + Maximum number of times to retry invalid answers. Defaults to 2. + + + + Agent display name (defaults to `"survey"`). + + + + Callback fired when the survey is finished. + + + + Ordered list of survey questions. + + + + HTTP route for this agent (defaults to `"/survey"`). + + + + Human-readable survey name, used in prompts and global data. + + +#### Source + +[`src/prefabs/SurveyAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/SurveyAgent.ts) + +Line 52. + +*** + +### SurveyQuestion + +A single survey question consumed by [SurveyAgent](/docs/sdk-reference/reference/typescript/prefabs/survey-agent). + +#### Signature + +```typescript +interface SurveyQuestion +``` + +#### Properties + + + Unique question identifier. + + + + Next question ID after this one. + + + + Options for multiple\_choice questions. + + + + Points awarded for answers. + + + + Whether the question requires an answer. Defaults to `true`. Mirrors the Python `required` flag on each question dict. + + + + For `rating` questions, the upper bound of the scale (1..scale). Defaults to 5 (matching the Python prefab) when unspecified. + + + + The question text to ask the caller. + + + + Question type determines validation and display. + + +#### Source + +[`src/prefabs/SurveyAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/SurveyAgent.ts) + +Line 17. + +## Source + +[`src/prefabs/SurveyAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/SurveyAgent.ts) + +Line 111. diff --git a/fern/products/sdk-reference/typescript/prompt-manager/index.mdx b/fern/products/sdk-reference/typescript/prompt-manager/index.mdx new file mode 100644 index 0000000000..75b1febc36 --- /dev/null +++ b/fern/products/sdk-reference/typescript/prompt-manager/index.mdx @@ -0,0 +1,349 @@ +--- +slug: "/reference/typescript/prompt-manager" +title: "PromptManager" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "PromptManager" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/PromptManager.ts" +--- +# `PromptManager` + +Manages agent prompt text, supporting both raw text and structured POM-based prompts. + +## Signature + +```typescript +class PromptManager +``` + +## Methods + +### addSection + +Adds a POM section to the prompt, initializing the PomBuilder if needed. + +#### Signature + +```typescript +addSection(title: string, opts?: { ...5 fields }): void +``` + +#### Parameters + + + The section heading. + + + + Optional body, bullets, numbering, and subsection configuration. + + + + + + + + + + + + +#### Returns + +`void` + +#### Source + +[`src/PromptManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PromptManager.ts) + +Line 48. + +*** + +### addSubsection + +Adds a subsection under a parent POM section, creating the parent if absent. + +#### Signature + +```typescript +addSubsection(parentTitle: string, title: string, opts?: { ...2 fields }): void +``` + +#### Parameters + + + The heading of the parent section. + + + + The subsection heading. + + + + Optional body text and bullets for the subsection. + + + + + + +#### Returns + +`void` + +#### Source + +[`src/PromptManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PromptManager.ts) + +Line 87. + +*** + +### addToSection + +Appends body text or bullets to an existing POM section, creating it if absent. + +#### Signature + +```typescript +addToSection(title: string, opts?: { ...3 fields }): void +``` + +#### Parameters + + + The section heading to append to. + + + + Body text and/or bullets to add. + + + + + + + + +#### Returns + +`void` + +#### Source + +[`src/PromptManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PromptManager.ts) + +Line 70. + +*** + +### constructor + +Creates a new PromptManager. + +#### Signature + +```typescript +constructor(usePom: boolean = true): PromptManager +``` + +#### Parameters + + + Whether to use structured POM sections (default true). + + +#### Returns + +`PromptManager` + +#### Source + +[`src/PromptManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PromptManager.ts) + +Line 20. + +*** + +### getPomBuilder + +Returns the underlying PomBuilder instance, if POM mode is active. + +#### Signature + +```typescript +getPomBuilder(): PomBuilder | null +``` + +#### Returns + +`PomBuilder | null` — The PomBuilder, or null if POM is not in use. + +#### Source + +[`src/PromptManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PromptManager.ts) + +Line 130. + +*** + +### getPostPrompt + +Returns the post-prompt text. + +#### Signature + +```typescript +getPostPrompt(): string | null +``` + +#### Returns + +`string | null` — The post-prompt string, or null if not set. + +#### Source + +[`src/PromptManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PromptManager.ts) + +Line 122. + +*** + +### getPrompt + +Returns the fully rendered prompt text, either raw text or POM-rendered Markdown. + +#### Signature + +```typescript +getPrompt(): string +``` + +#### Returns + +`string` — The prompt string, or empty string if nothing is set. + +#### Source + +[`src/PromptManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PromptManager.ts) + +Line 112. + +*** + +### getRawPrompt + +Returns the raw prompt text whatever `setPromptText` stored, or null +when no raw prompt has been set. Mirrors Python's +`PromptManager.get_raw_prompt`. + +#### Signature + +```typescript +getRawPrompt(): string | null +``` + +#### Returns + +`string | null` — The raw prompt string, or null if not set. + +#### Source + +[`src/PromptManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PromptManager.ts) + +Line 140. + +*** + +### hasSection + +Checks whether a POM section with the given title exists. + +#### Signature + +```typescript +hasSection(title: string): boolean +``` + +#### Parameters + + + The section heading to look for. + + +#### Returns + +`boolean` — True if the section exists. + +#### Source + +[`src/PromptManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PromptManager.ts) + +Line 104. + +*** + +### setPostPrompt + +Sets the post-prompt text appended after the main prompt. + +#### Signature + +```typescript +setPostPrompt(text: string): void +``` + +#### Parameters + + + The post-prompt string. + + +#### Returns + +`void` + +#### Source + +[`src/PromptManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PromptManager.ts) + +Line 39. + +*** + +### setPromptText + +Sets the raw prompt text, bypassing POM rendering. + +#### Signature + +```typescript +setPromptText(text: string): void +``` + +#### Parameters + + + The raw prompt string. + + +#### Returns + +`void` + +#### Source + +[`src/PromptManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PromptManager.ts) + +Line 31. + +## Source + +[`src/PromptManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PromptManager.ts) + +Line 10. diff --git a/fern/products/sdk-reference/typescript/register-skill.mdx b/fern/products/sdk-reference/typescript/register-skill.mdx new file mode 100644 index 0000000000..b675829714 --- /dev/null +++ b/fern/products/sdk-reference/typescript/register-skill.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/typescript/register-skill" +title: "registerSkill" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "function" + language: "typescript" + qualified_name: "registerSkill" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/index.ts" +--- +# `registerSkill` + +Register a custom skill class with the global [SkillRegistry](/docs/sdk-reference/reference/typescript/skills/skill-registry). + +Equivalent to Python's `register_skill(skill_class)`. Allows third-party +code to register skills directly, bypassing the built-in directory scan. + +## Signature + +```typescript +registerSkill(skillClass: typeof SkillBase): void +``` + +## Parameters + + + Skill class to register (a subclass of [SkillBase](/docs/sdk-reference/reference/typescript/skills/skill-base)). + + +## Returns + +`void` + +## Source + +[`src/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/index.ts) + +Line 305. diff --git a/fern/products/sdk-reference/typescript/relay/action/ai-action/index.mdx b/fern/products/sdk-reference/typescript/relay/action/ai-action/index.mdx new file mode 100644 index 0000000000..2a665dc553 --- /dev/null +++ b/fern/products/sdk-reference/typescript/relay/action/ai-action/index.mdx @@ -0,0 +1,139 @@ +--- +slug: "/reference/typescript/relay/action/ai-action" +title: "AIAction" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "relay.Action.AIAction" + parent: "relay.Action" + module: "relay.Action" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts" +--- +# `AIAction` + +Async handle for a `calling.call.ai` action (on-call AI agent session). + +## Signature + +```typescript +class AIAction extends Action +``` + +## Inheritance + +**Extends:** [Action](/docs/sdk-reference/reference/typescript/relay/action) + +## Properties + + + Reference to the owning call. + + + + Whether the action has reached a terminal state. + + + + Unique control ID used by the server to route events back to this action. + + + + True once the action has reached a terminal state. + + + + Final event once the action terminates, or `null` while still running. + + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(call: CallLike, controlId: string): AIAction +``` + +#### Parameters + + + + + +#### Returns + +`AIAction` + +#### Source + +[`src/relay/Action.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts) + +Line 469. + +*** + +### stop + +Stop the AI agent session. + +#### Signature + +```typescript +stop(): Promise> +``` + +#### Returns + +`Promise>` — The platform's stop response. + +#### Throws + +- When the stop command is rejected. + +#### Source + +[`src/relay/Action.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts) + +Line 479. + +*** + +### wait + +Wait for the action to complete. + +#### Signature + +```typescript +wait(timeout?: number): Promise +``` + +#### Parameters + + + Maximum time to wait in **seconds** (matches the Python SDK convention — not milliseconds). + + +#### Returns + +`Promise` — The terminal [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) for this action. + +#### Throws + +- When the optional timeout elapses before the action ends. + +#### Source + +[`src/relay/Action.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts) + +Line 125. + +## Source + +[`src/relay/Action.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts) + +Line 468. diff --git a/fern/products/sdk-reference/typescript/relay/action/collect-action/index.mdx b/fern/products/sdk-reference/typescript/relay/action/collect-action/index.mdx new file mode 100644 index 0000000000..b0ca14efc7 --- /dev/null +++ b/fern/products/sdk-reference/typescript/relay/action/collect-action/index.mdx @@ -0,0 +1,225 @@ +--- +slug: "/reference/typescript/relay/action/collect-action" +title: "CollectAction" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "relay.Action.CollectAction" + parent: "relay.Action" + module: "relay.Action" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts" +--- +# `CollectAction` + +Async handle for a `play_and_collect` action (combined playback + input collection). + +## Signature + +```typescript +class CollectAction extends Action +``` + +## Inheritance + +**Extends:** [Action](/docs/sdk-reference/reference/typescript/relay/action) + +## Properties + + + Reference to the owning call. + + + + Whether the action has reached a terminal state. + + + + Unique control ID used by the server to route events back to this action. + + + + True once the action has reached a terminal state. + + + + Final event once the action terminates, or `null` while still running. + + +## Methods + +### \_checkEvent + +play\_and\_collect shares a control\_id across play and collect phases. +Only resolve on collect events, not play events. + +#### Signature + +```typescript +_checkEvent(event: RelayEvent): void +``` + +#### Parameters + + + +#### Returns + +`void` + +#### Source + +[`src/relay/Action.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts) + +Line 286. + +*** + +### constructor + +#### Signature + +```typescript +constructor(call: CallLike, controlId: string): CollectAction +``` + +#### Parameters + + + + + +#### Returns + +`CollectAction` + +#### Source + +[`src/relay/Action.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts) + +Line 278. + +*** + +### startInputTimers + +Start the collect input timers (useful when `initial_timeout` should be +reset after an async side effect completes). + +#### Signature + +```typescript +startInputTimers(): Promise> +``` + +#### Returns + +`Promise>` — The platform's start\_input\_timers response. + +#### Throws + +- When the command is rejected. + +#### Source + +[`src/relay/Action.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts) + +Line 324. + +*** + +### stop + +Stop the play\_and\_collect operation. + +#### Signature + +```typescript +stop(): Promise> +``` + +#### Returns + +`Promise>` — The platform's stop response. + +#### Throws + +- When the stop command is rejected. + +#### Source + +[`src/relay/Action.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts) + +Line 302. + +*** + +### volume + +Adjust playback volume of the prompt audio mid-collect. + +#### Signature + +```typescript +volume(volume: number): Promise> +``` + +#### Parameters + + + Volume adjustment in dB. + + +#### Returns + +`Promise>` — The platform's volume response. + +#### Throws + +- When the volume command is rejected. + +#### Source + +[`src/relay/Action.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts) + +Line 313. + +*** + +### wait + +Wait for the action to complete. + +#### Signature + +```typescript +wait(timeout?: number): Promise +``` + +#### Parameters + + + Maximum time to wait in **seconds** (matches the Python SDK convention — not milliseconds). + + +#### Returns + +`Promise` — The terminal [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) for this action. + +#### Throws + +- When the optional timeout elapses before the action ends. + +#### Source + +[`src/relay/Action.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts) + +Line 125. + +## Source + +[`src/relay/Action.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts) + +Line 277. diff --git a/fern/products/sdk-reference/typescript/relay/action/detect-action/index.mdx b/fern/products/sdk-reference/typescript/relay/action/detect-action/index.mdx new file mode 100644 index 0000000000..2726d954c1 --- /dev/null +++ b/fern/products/sdk-reference/typescript/relay/action/detect-action/index.mdx @@ -0,0 +1,165 @@ +--- +slug: "/reference/typescript/relay/action/detect-action" +title: "DetectAction" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "relay.Action.DetectAction" + parent: "relay.Action" + module: "relay.Action" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts" +--- +# `DetectAction` + +Async handle for a `calling.call.detect` action (machine / fax / digit). + +## Signature + +```typescript +class DetectAction extends Action +``` + +## Inheritance + +**Extends:** [Action](/docs/sdk-reference/reference/typescript/relay/action) + +## Properties + + + Reference to the owning call. + + + + Whether the action has reached a terminal state. + + + + Unique control ID used by the server to route events back to this action. + + + + True once the action has reached a terminal state. + + + + Final event once the action terminates, or `null` while still running. + + +## Methods + +### \_checkEvent + +Resolve on first meaningful result OR terminal state. + +#### Signature + +```typescript +_checkEvent(event: RelayEvent): void +``` + +#### Parameters + + + +#### Returns + +`void` + +#### Source + +[`src/relay/Action.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts) + +Line 255. + +*** + +### constructor + +#### Signature + +```typescript +constructor(call: CallLike, controlId: string): DetectAction +``` + +#### Parameters + + + + + +#### Returns + +`DetectAction` + +#### Source + +[`src/relay/Action.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts) + +Line 250. + +*** + +### stop + +Stop detection before the timeout elapses. + +#### Signature + +```typescript +stop(): Promise> +``` + +#### Returns + +`Promise>` — The platform's stop response. + +#### Throws + +- When the stop command is rejected. + +#### Source + +[`src/relay/Action.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts) + +Line 269. + +*** + +### wait + +Wait for the action to complete. + +#### Signature + +```typescript +wait(timeout?: number): Promise +``` + +#### Parameters + + + Maximum time to wait in **seconds** (matches the Python SDK convention — not milliseconds). + + +#### Returns + +`Promise` — The terminal [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) for this action. + +#### Throws + +- When the optional timeout elapses before the action ends. + +#### Source + +[`src/relay/Action.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts) + +Line 125. + +## Source + +[`src/relay/Action.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts) + +Line 249. diff --git a/fern/products/sdk-reference/typescript/relay/action/fax-action/index.mdx b/fern/products/sdk-reference/typescript/relay/action/fax-action/index.mdx new file mode 100644 index 0000000000..37963e0708 --- /dev/null +++ b/fern/products/sdk-reference/typescript/relay/action/fax-action/index.mdx @@ -0,0 +1,141 @@ +--- +slug: "/reference/typescript/relay/action/fax-action" +title: "FaxAction" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "relay.Action.FaxAction" + parent: "relay.Action" + module: "relay.Action" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts" +--- +# `FaxAction` + +Async handle for a `send_fax` or `receive_fax` action. + +## Signature + +```typescript +class FaxAction extends Action +``` + +## Inheritance + +**Extends:** [Action](/docs/sdk-reference/reference/typescript/relay/action) + +## Properties + + + Reference to the owning call. + + + + Whether the action has reached a terminal state. + + + + Unique control ID used by the server to route events back to this action. + + + + True once the action has reached a terminal state. + + + + Final event once the action terminates, or `null` while still running. + + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(call: CallLike, controlId: string, methodPrefix: string): FaxAction +``` + +#### Parameters + + + + + + + +#### Returns + +`FaxAction` + +#### Source + +[`src/relay/Action.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts) + +Line 373. + +*** + +### stop + +Stop the fax transfer mid-stream. + +#### Signature + +```typescript +stop(): Promise> +``` + +#### Returns + +`Promise>` — The platform's stop response. + +#### Throws + +- When the stop command is rejected. + +#### Source + +[`src/relay/Action.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts) + +Line 384. + +*** + +### wait + +Wait for the action to complete. + +#### Signature + +```typescript +wait(timeout?: number): Promise +``` + +#### Parameters + + + Maximum time to wait in **seconds** (matches the Python SDK convention — not milliseconds). + + +#### Returns + +`Promise` — The terminal [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) for this action. + +#### Throws + +- When the optional timeout elapses before the action ends. + +#### Source + +[`src/relay/Action.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts) + +Line 125. + +## Source + +[`src/relay/Action.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts) + +Line 370. diff --git a/fern/products/sdk-reference/typescript/relay/action/index.mdx b/fern/products/sdk-reference/typescript/relay/action/index.mdx new file mode 100644 index 0000000000..d40d8ba87a --- /dev/null +++ b/fern/products/sdk-reference/typescript/relay/action/index.mdx @@ -0,0 +1,234 @@ +--- +slug: "/reference/typescript/relay/action" +title: "Action" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "relay.Action" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts" +--- +# `Action` + +Async handle for a controllable call operation (play, record, tap, detect, etc.). + +An Action is returned from the async variants on [Call](/docs/sdk-reference/reference/typescript/relay/call) (e.g. `call.playAsync`). +It resolves when the server emits a terminal event for its `controlId`. Use +[Action.wait](/docs/sdk-reference/reference/typescript/relay/action#wait) to await completion, or register an `onCompleted` callback. + +## Signature + +```typescript +class Action +``` + +## Examples + +```typescript +const play = await call.playAsync({ play: [{ type: 'tts', text: 'Hello!' }] }); +// do other work while the greeting plays... +const event = await play.wait(10); // seconds +console.log('Playback finished with state', event.params.state); +``` + +## Properties + + + Reference to the owning call. + + + + Whether the action has reached a terminal state. + + + + Unique control ID used by the server to route events back to this action. + + + + True once the action has reached a terminal state. + + + + Final event once the action terminates, or `null` while still running. + + +## Classes + + + + Async handle for a `calling.call.ai` action (on-call AI agent session). + + + + Async handle for a `play_and_collect` action (combined playback + input collection). + + + + Async handle for a `calling.call.detect` action (machine / fax / digit). + + + + Async handle for a `send_fax` or `receive_fax` action. + + + + Async handle for a `calling.call.pay` action (PCI-compliant payment collection). + + + + Async handle for a `calling.call.play` action — controls playback in progress. + + + + Async handle for a `calling.call.record` action — controls recording in progress. + + + + Async handle for a bare `calling.call.collect` action (no accompanying play). + + + + Async handle for a `calling.call.stream` action (outbound media stream). + + + + Async handle for a `calling.call.tap` action (media mirroring). + + + + Async handle for a `calling.call.transcribe` action (real-time transcription). + + + +## Methods + +### constructor + +#### Signature + +```typescript +constructor( + call: CallLike, + controlId: string, + terminalEvent: string, + terminalStates: readonly string[] +): Action +``` + +#### Parameters + + + Owning call (via the structural [CallLike](/docs/sdk-reference/reference/typescript/relay/action#call-like) interface). + + + + Unique control ID the server will echo on events. + + + + Event type that carries terminal state transitions. + + + + State values that mark this action as completed. + + +#### Returns + +`Action` + +#### Source + +[`src/relay/Action.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts) + +Line 75. + +*** + +### wait + +Wait for the action to complete. + +#### Signature + +```typescript +wait(timeout?: number): Promise +``` + +#### Parameters + + + Maximum time to wait in **seconds** (matches the Python SDK convention — not milliseconds). + + +#### Returns + +`Promise` — The terminal [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) for this action. + +#### Throws + +- When the optional timeout elapses before the action ends. + +#### Source + +[`src/relay/Action.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts) + +Line 125. + +## Interfaces + +### CallLike + +Structural subset of [Call](/docs/sdk-reference/reference/typescript/relay/call) that an Action needs — avoids a circular +import between `Call.ts` and `Action.ts`. + +#### Signature + +```typescript +interface CallLike +``` + +#### Methods + +##### \_execute + +###### Signature + +```typescript +_execute( + method: string, + extraParams?: Record +): Promise> +``` + +###### Parameters + + + + + +###### Returns + +`Promise>` + +###### Source + +[`src/relay/Action.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts) + +Line 35. + +#### Source + +[`src/relay/Action.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts) + +Line 34. + +## Source + +[`src/relay/Action.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts) + +Line 55. diff --git a/fern/products/sdk-reference/typescript/relay/action/pay-action/index.mdx b/fern/products/sdk-reference/typescript/relay/action/pay-action/index.mdx new file mode 100644 index 0000000000..9c61666a6b --- /dev/null +++ b/fern/products/sdk-reference/typescript/relay/action/pay-action/index.mdx @@ -0,0 +1,139 @@ +--- +slug: "/reference/typescript/relay/action/pay-action" +title: "PayAction" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "relay.Action.PayAction" + parent: "relay.Action" + module: "relay.Action" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts" +--- +# `PayAction` + +Async handle for a `calling.call.pay` action (PCI-compliant payment collection). + +## Signature + +```typescript +class PayAction extends Action +``` + +## Inheritance + +**Extends:** [Action](/docs/sdk-reference/reference/typescript/relay/action) + +## Properties + + + Reference to the owning call. + + + + Whether the action has reached a terminal state. + + + + Unique control ID used by the server to route events back to this action. + + + + True once the action has reached a terminal state. + + + + Final event once the action terminates, or `null` while still running. + + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(call: CallLike, controlId: string): PayAction +``` + +#### Parameters + + + + + +#### Returns + +`PayAction` + +#### Source + +[`src/relay/Action.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts) + +Line 431. + +*** + +### stop + +Cancel the payment collection before it completes. + +#### Signature + +```typescript +stop(): Promise> +``` + +#### Returns + +`Promise>` — The platform's stop response. + +#### Throws + +- When the stop command is rejected. + +#### Source + +[`src/relay/Action.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts) + +Line 441. + +*** + +### wait + +Wait for the action to complete. + +#### Signature + +```typescript +wait(timeout?: number): Promise +``` + +#### Parameters + + + Maximum time to wait in **seconds** (matches the Python SDK convention — not milliseconds). + + +#### Returns + +`Promise` — The terminal [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) for this action. + +#### Throws + +- When the optional timeout elapses before the action ends. + +#### Source + +[`src/relay/Action.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts) + +Line 125. + +## Source + +[`src/relay/Action.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts) + +Line 430. diff --git a/fern/products/sdk-reference/typescript/relay/action/play-action/index.mdx b/fern/products/sdk-reference/typescript/relay/action/play-action/index.mdx new file mode 100644 index 0000000000..08d4a39d95 --- /dev/null +++ b/fern/products/sdk-reference/typescript/relay/action/play-action/index.mdx @@ -0,0 +1,223 @@ +--- +slug: "/reference/typescript/relay/action/play-action" +title: "PlayAction" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "relay.Action.PlayAction" + parent: "relay.Action" + module: "relay.Action" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts" +--- +# `PlayAction` + +Async handle for a `calling.call.play` action — controls playback in progress. + +## Signature + +```typescript +class PlayAction extends Action +``` + +## Inheritance + +**Extends:** [Action](/docs/sdk-reference/reference/typescript/relay/action) + +## Properties + + + Reference to the owning call. + + + + Whether the action has reached a terminal state. + + + + Unique control ID used by the server to route events back to this action. + + + + True once the action has reached a terminal state. + + + + Final event once the action terminates, or `null` while still running. + + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(call: CallLike, controlId: string): PlayAction +``` + +#### Parameters + + + + + +#### Returns + +`PlayAction` + +#### Source + +[`src/relay/Action.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts) + +Line 157. + +*** + +### pause + +Pause active playback (resumable with [resume](/docs/sdk-reference/reference/typescript/relay/action/play-action#resume)). + +#### Signature + +```typescript +pause(): Promise> +``` + +#### Returns + +`Promise>` — The platform's pause response. + +#### Throws + +- When the pause command is rejected. + +#### Source + +[`src/relay/Action.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts) + +Line 177. + +*** + +### resume + +Resume playback paused by [pause](/docs/sdk-reference/reference/typescript/relay/action/play-action#pause). + +#### Signature + +```typescript +resume(): Promise> +``` + +#### Returns + +`Promise>` — The platform's resume response. + +#### Throws + +- When the resume command is rejected. + +#### Source + +[`src/relay/Action.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts) + +Line 187. + +*** + +### stop + +Stop the playback. + +#### Signature + +```typescript +stop(): Promise> +``` + +#### Returns + +`Promise>` — The platform's stop response. + +#### Throws + +- When the stop command is rejected. + +#### Source + +[`src/relay/Action.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts) + +Line 167. + +*** + +### volume + +Adjust playback volume. + +#### Signature + +```typescript +volume(volume: number): Promise> +``` + +#### Parameters + + + Volume adjustment in dB. + + +#### Returns + +`Promise>` — The platform's volume response. + +#### Throws + +- When the volume command is rejected. + +#### Source + +[`src/relay/Action.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts) + +Line 198. + +*** + +### wait + +Wait for the action to complete. + +#### Signature + +```typescript +wait(timeout?: number): Promise +``` + +#### Parameters + + + Maximum time to wait in **seconds** (matches the Python SDK convention — not milliseconds). + + +#### Returns + +`Promise` — The terminal [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) for this action. + +#### Throws + +- When the optional timeout elapses before the action ends. + +#### Source + +[`src/relay/Action.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts) + +Line 125. + +## Source + +[`src/relay/Action.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts) + +Line 156. diff --git a/fern/products/sdk-reference/typescript/relay/action/record-action/index.mdx b/fern/products/sdk-reference/typescript/relay/action/record-action/index.mdx new file mode 100644 index 0000000000..305c5f4508 --- /dev/null +++ b/fern/products/sdk-reference/typescript/relay/action/record-action/index.mdx @@ -0,0 +1,197 @@ +--- +slug: "/reference/typescript/relay/action/record-action" +title: "RecordAction" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "relay.Action.RecordAction" + parent: "relay.Action" + module: "relay.Action" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts" +--- +# `RecordAction` + +Async handle for a `calling.call.record` action — controls recording in progress. + +## Signature + +```typescript +class RecordAction extends Action +``` + +## Inheritance + +**Extends:** [Action](/docs/sdk-reference/reference/typescript/relay/action) + +## Properties + + + Reference to the owning call. + + + + Whether the action has reached a terminal state. + + + + Unique control ID used by the server to route events back to this action. + + + + True once the action has reached a terminal state. + + + + Final event once the action terminates, or `null` while still running. + + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(call: CallLike, controlId: string): RecordAction +``` + +#### Parameters + + + + + +#### Returns + +`RecordAction` + +#### Source + +[`src/relay/Action.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts) + +Line 207. + +*** + +### pause + +Pause the recording (resumable with [resume](/docs/sdk-reference/reference/typescript/relay/action/record-action#resume)). + +#### Signature + +```typescript +pause(behavior?: string): Promise> +``` + +#### Parameters + + + Optional behaviour hint (e.g. `"silence"`) controlling what is recorded in place of paused audio. + + +#### Returns + +`Promise>` — The platform's pause response. + +#### Throws + +- When the pause command is rejected. + +#### Source + +[`src/relay/Action.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts) + +Line 229. + +*** + +### resume + +Resume recording paused by [pause](/docs/sdk-reference/reference/typescript/relay/action/record-action#pause). + +#### Signature + +```typescript +resume(): Promise> +``` + +#### Returns + +`Promise>` — The platform's resume response. + +#### Throws + +- When the resume command is rejected. + +#### Source + +[`src/relay/Action.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts) + +Line 241. + +*** + +### stop + +Stop the recording and finalise the file. + +#### Signature + +```typescript +stop(): Promise> +``` + +#### Returns + +`Promise>` — The platform's stop response. + +#### Throws + +- When the stop command is rejected. + +#### Source + +[`src/relay/Action.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts) + +Line 217. + +*** + +### wait + +Wait for the action to complete. + +#### Signature + +```typescript +wait(timeout?: number): Promise +``` + +#### Parameters + + + Maximum time to wait in **seconds** (matches the Python SDK convention — not milliseconds). + + +#### Returns + +`Promise` — The terminal [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) for this action. + +#### Throws + +- When the optional timeout elapses before the action ends. + +#### Source + +[`src/relay/Action.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts) + +Line 125. + +## Source + +[`src/relay/Action.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts) + +Line 206. diff --git a/fern/products/sdk-reference/typescript/relay/action/standalone-collect-action/index.mdx b/fern/products/sdk-reference/typescript/relay/action/standalone-collect-action/index.mdx new file mode 100644 index 0000000000..003af090bd --- /dev/null +++ b/fern/products/sdk-reference/typescript/relay/action/standalone-collect-action/index.mdx @@ -0,0 +1,165 @@ +--- +slug: "/reference/typescript/relay/action/standalone-collect-action" +title: "StandaloneCollectAction" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "relay.Action.StandaloneCollectAction" + parent: "relay.Action" + module: "relay.Action" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts" +--- +# `StandaloneCollectAction` + +Async handle for a bare `calling.call.collect` action (no accompanying play). + +## Signature + +```typescript +class StandaloneCollectAction extends Action +``` + +## Inheritance + +**Extends:** [Action](/docs/sdk-reference/reference/typescript/relay/action) + +## Properties + + + Reference to the owning call. + + + + Whether the action has reached a terminal state. + + + + Unique control ID used by the server to route events back to this action. + + + + True once the action has reached a terminal state. + + + + Final event once the action terminates, or `null` while still running. + + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(call: CallLike, controlId: string): StandaloneCollectAction +``` + +#### Parameters + + + + + +#### Returns + +`StandaloneCollectAction` + +#### Source + +[`src/relay/Action.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts) + +Line 333. + +*** + +### startInputTimers + +Start the collect input timers. + +#### Signature + +```typescript +startInputTimers(): Promise> +``` + +#### Returns + +`Promise>` — The platform's start\_input\_timers response. + +#### Throws + +- When the command is rejected. + +#### Source + +[`src/relay/Action.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts) + +Line 362. + +*** + +### stop + +Stop the collect operation before input is received. + +#### Signature + +```typescript +stop(): Promise> +``` + +#### Returns + +`Promise>` — The platform's stop response. + +#### Throws + +- When the stop command is rejected. + +#### Source + +[`src/relay/Action.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts) + +Line 352. + +*** + +### wait + +Wait for the action to complete. + +#### Signature + +```typescript +wait(timeout?: number): Promise +``` + +#### Parameters + + + Maximum time to wait in **seconds** (matches the Python SDK convention — not milliseconds). + + +#### Returns + +`Promise` — The terminal [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) for this action. + +#### Throws + +- When the optional timeout elapses before the action ends. + +#### Source + +[`src/relay/Action.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts) + +Line 125. + +## Source + +[`src/relay/Action.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts) + +Line 332. diff --git a/fern/products/sdk-reference/typescript/relay/action/stream-action/index.mdx b/fern/products/sdk-reference/typescript/relay/action/stream-action/index.mdx new file mode 100644 index 0000000000..7e640d2f86 --- /dev/null +++ b/fern/products/sdk-reference/typescript/relay/action/stream-action/index.mdx @@ -0,0 +1,139 @@ +--- +slug: "/reference/typescript/relay/action/stream-action" +title: "StreamAction" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "relay.Action.StreamAction" + parent: "relay.Action" + module: "relay.Action" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts" +--- +# `StreamAction` + +Async handle for a `calling.call.stream` action (outbound media stream). + +## Signature + +```typescript +class StreamAction extends Action +``` + +## Inheritance + +**Extends:** [Action](/docs/sdk-reference/reference/typescript/relay/action) + +## Properties + + + Reference to the owning call. + + + + Whether the action has reached a terminal state. + + + + Unique control ID used by the server to route events back to this action. + + + + True once the action has reached a terminal state. + + + + Final event once the action terminates, or `null` while still running. + + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(call: CallLike, controlId: string): StreamAction +``` + +#### Parameters + + + + + +#### Returns + +`StreamAction` + +#### Source + +[`src/relay/Action.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts) + +Line 412. + +*** + +### stop + +Stop the outbound stream. + +#### Signature + +```typescript +stop(): Promise> +``` + +#### Returns + +`Promise>` — The platform's stop response. + +#### Throws + +- When the stop command is rejected. + +#### Source + +[`src/relay/Action.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts) + +Line 422. + +*** + +### wait + +Wait for the action to complete. + +#### Signature + +```typescript +wait(timeout?: number): Promise +``` + +#### Parameters + + + Maximum time to wait in **seconds** (matches the Python SDK convention — not milliseconds). + + +#### Returns + +`Promise` — The terminal [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) for this action. + +#### Throws + +- When the optional timeout elapses before the action ends. + +#### Source + +[`src/relay/Action.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts) + +Line 125. + +## Source + +[`src/relay/Action.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts) + +Line 411. diff --git a/fern/products/sdk-reference/typescript/relay/action/tap-action/index.mdx b/fern/products/sdk-reference/typescript/relay/action/tap-action/index.mdx new file mode 100644 index 0000000000..12237dcabc --- /dev/null +++ b/fern/products/sdk-reference/typescript/relay/action/tap-action/index.mdx @@ -0,0 +1,139 @@ +--- +slug: "/reference/typescript/relay/action/tap-action" +title: "TapAction" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "relay.Action.TapAction" + parent: "relay.Action" + module: "relay.Action" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts" +--- +# `TapAction` + +Async handle for a `calling.call.tap` action (media mirroring). + +## Signature + +```typescript +class TapAction extends Action +``` + +## Inheritance + +**Extends:** [Action](/docs/sdk-reference/reference/typescript/relay/action) + +## Properties + + + Reference to the owning call. + + + + Whether the action has reached a terminal state. + + + + Unique control ID used by the server to route events back to this action. + + + + True once the action has reached a terminal state. + + + + Final event once the action terminates, or `null` while still running. + + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(call: CallLike, controlId: string): TapAction +``` + +#### Parameters + + + + + +#### Returns + +`TapAction` + +#### Source + +[`src/relay/Action.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts) + +Line 393. + +*** + +### stop + +Stop the media tap. + +#### Signature + +```typescript +stop(): Promise> +``` + +#### Returns + +`Promise>` — The platform's stop response. + +#### Throws + +- When the stop command is rejected. + +#### Source + +[`src/relay/Action.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts) + +Line 403. + +*** + +### wait + +Wait for the action to complete. + +#### Signature + +```typescript +wait(timeout?: number): Promise +``` + +#### Parameters + + + Maximum time to wait in **seconds** (matches the Python SDK convention — not milliseconds). + + +#### Returns + +`Promise` — The terminal [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) for this action. + +#### Throws + +- When the optional timeout elapses before the action ends. + +#### Source + +[`src/relay/Action.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts) + +Line 125. + +## Source + +[`src/relay/Action.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts) + +Line 392. diff --git a/fern/products/sdk-reference/typescript/relay/action/transcribe-action/index.mdx b/fern/products/sdk-reference/typescript/relay/action/transcribe-action/index.mdx new file mode 100644 index 0000000000..ab3d7cc142 --- /dev/null +++ b/fern/products/sdk-reference/typescript/relay/action/transcribe-action/index.mdx @@ -0,0 +1,139 @@ +--- +slug: "/reference/typescript/relay/action/transcribe-action" +title: "TranscribeAction" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "relay.Action.TranscribeAction" + parent: "relay.Action" + module: "relay.Action" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts" +--- +# `TranscribeAction` + +Async handle for a `calling.call.transcribe` action (real-time transcription). + +## Signature + +```typescript +class TranscribeAction extends Action +``` + +## Inheritance + +**Extends:** [Action](/docs/sdk-reference/reference/typescript/relay/action) + +## Properties + + + Reference to the owning call. + + + + Whether the action has reached a terminal state. + + + + Unique control ID used by the server to route events back to this action. + + + + True once the action has reached a terminal state. + + + + Final event once the action terminates, or `null` while still running. + + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(call: CallLike, controlId: string): TranscribeAction +``` + +#### Parameters + + + + + +#### Returns + +`TranscribeAction` + +#### Source + +[`src/relay/Action.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts) + +Line 450. + +*** + +### stop + +Stop the transcription. + +#### Signature + +```typescript +stop(): Promise> +``` + +#### Returns + +`Promise>` — The platform's stop response. + +#### Throws + +- When the stop command is rejected. + +#### Source + +[`src/relay/Action.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts) + +Line 460. + +*** + +### wait + +Wait for the action to complete. + +#### Signature + +```typescript +wait(timeout?: number): Promise +``` + +#### Parameters + + + Maximum time to wait in **seconds** (matches the Python SDK convention — not milliseconds). + + +#### Returns + +`Promise` — The terminal [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) for this action. + +#### Throws + +- When the optional timeout elapses before the action ends. + +#### Source + +[`src/relay/Action.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts) + +Line 125. + +## Source + +[`src/relay/Action.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts) + +Line 449. diff --git a/fern/products/sdk-reference/typescript/relay/call/index.mdx b/fern/products/sdk-reference/typescript/relay/call/index.mdx new file mode 100644 index 0000000000..939d6a7a3a --- /dev/null +++ b/fern/products/sdk-reference/typescript/relay/call/index.mdx @@ -0,0 +1,2725 @@ +--- +slug: "/reference/typescript/relay/call" +title: "Call" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "relay.Call" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts" +--- +# `Call` + +Live RELAY call with command methods. + +Don't construct directly — `Call` instances are created by [RelayClient](/docs/sdk-reference/reference/typescript/relay/relay-client) +for inbound calls (delivered to your `onCall` handler) and for outbound dials. + +Each command method (`answer()`, `play()`, `record()`, etc.) returns when the +platform acknowledges the command; event-driven completion is exposed via +[Action](/docs/sdk-reference/reference/typescript/relay/action) objects returned from the async "play/record/..." variants. + +## Signature + +```typescript +class Call +``` + +## Examples + +```typescript +client.onCall(async (call) => { + await call.answer(); + const play = await call.playAsync({ play: [{ type: 'tts', text: 'Hello!' }] }); + await play.wait(); + await call.hangup(); +}); +``` + +## See Also + +- \- \[RelayClient]\(/docs/sdk-reference/reference/typescript/relay/relay-client) + \- \[Action]\(/docs/sdk-reference/reference/typescript/relay/action) + +## Properties + + + Unique call identifier assigned by the platform. + + + + RELAY context this call was received on. + + + + Device descriptor the call is associated with (phone, SIP, etc.). + + + + `"inbound"` or `"outbound"`. + + + + Whether this call has reached its terminal lifecycle state (`ended`) and will emit no further `calling.call.state` transitions. Idiomatic shortcut for `isCallStateTerminal(call.state)` — prefer it over a hand-written `call.state === 'ended'` comparison so the terminal-set definition lives in one place (`../relay/closedSets.CallState`). + + + + RELAY node that owns this call. + + + + SignalWire project ID. + + + + Call segment ID used for event correlation. + + + + Current call state. One of the [CallState](/docs/sdk-reference/reference/typescript/relay/closed-sets#call-state) values (`"created"` | `"ringing"` | `"answered"` | `"ending"` | `"ended"`; closed literal union, autocompleted + typo-checked). A raw wire value is cast to the closed type at the hydration boundary. Use [Call.isTerminal](/docs/sdk-reference/reference/typescript/relay/call#is-terminal) to test for the terminal (`ended`) state rather than comparing strings by hand. + + + + Opaque correlation tag attached at dial time. + + +## Methods + +### ai + +Start an AI agent session on the call. + +#### Signature + +```typescript +ai(options: { ...14 fields } = {}): Promise +``` + +#### Parameters + + + AI configuration — prompts, voices, tools, languages, etc. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`Promise` — An [AIAction](/docs/sdk-reference/reference/typescript/relay/action/ai-action) for control and completion tracking. + +#### Throws + +- When the ai command is rejected. + +#### Source + +[`src/relay/Call.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts) + +Line 1481. + +*** + +### aiHold + +Put the AI agent session on hold (pause turn-taking). + +#### Signature + +```typescript +aiHold(options: { ...2 fields } = {}): Promise> +``` + +#### Parameters + + + Hold behaviour. + + + Prompt played to the caller during the hold. + + + + Maximum hold duration. + + + +#### Returns + +`Promise>` — The platform's ai\_hold response. + +#### Throws + +- When the ai\_hold command is rejected. + +#### Source + +[`src/relay/Call.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts) + +Line 1580. + +*** + +### aiMessage + +Send a message into an active AI agent session. + +#### Signature + +```typescript +aiMessage(options: { ...4 fields } = {}): Promise> +``` + +#### Parameters + + + Message parameters. + + + Global-data updates to merge. + + + + Text content to inject into the conversation. + + + + Reset directives for the conversation state. + + + + Speaker role (`"system"`, `"user"`, or `"assistant"`). + + + +#### Returns + +`Promise>` — The platform's ai\_message response. + +#### Throws + +- When the ai\_message command is rejected. + +#### Source + +[`src/relay/Call.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts) + +Line 1557. + +*** + +### aiUnhold + +Resume an AI agent session from hold. + +#### Signature + +```typescript +aiUnhold(options: { ...1 fields } = {}): Promise> +``` + +#### Parameters + + + Unhold behaviour. + + + Prompt played to the caller on resume. + + + +#### Returns + +`Promise>` — The platform's ai\_unhold response. + +#### Throws + +- When the ai\_unhold command is rejected. + +#### Source + +[`src/relay/Call.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts) + +Line 1595. + +*** + +### amazonBedrock + +Connect the call to an Amazon Bedrock AI agent. + +#### Signature + +```typescript +amazonBedrock(options: { ...6 fields } = {}): Promise> +``` + +#### Parameters + + + Bedrock agent configuration. + + + AI engine parameters. + + + + Global-data object available to SWAIG tools. + + + + Post-prompt configuration. + + + + URL to POST the final summary to. + + + + Prompt to send to the Bedrock agent. + + + + SWAIG configuration (functions, includes, etc.). + + + +#### Returns + +`Promise>` — The platform's amazon\_bedrock response. + +#### Throws + +- When the amazon\_bedrock command is rejected. + +#### Source + +[`src/relay/Call.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts) + +Line 1528. + +*** + +### answer + +Answer an inbound call. + +#### Signature + +```typescript +answer(extra?: Record): Promise> +``` + +#### Parameters + + + Optional additional params merged into the answer request (e.g. SIP headers, codec hints). + + +#### Returns + +`Promise>` — The platform's answer response. + +#### Throws + +- When the answer command is rejected. + +#### Source + +[`src/relay/Call.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts) + +Line 426. + +*** + +### bindDigit + +Bind a DTMF digit sequence to trigger a RELAY method automatically when +the caller presses it. + +#### Signature + +```typescript +bindDigit( + digits: string, + bindMethod: string, + options: { ...3 fields } = {} +): Promise> +``` + +#### Parameters + + + DTMF sequence that triggers the binding (e.g. `"*9"`). + + + + RELAY method to invoke when the sequence is detected. + + + + Binding behaviour. + + + Params forwarded to `bindMethod` on trigger. + + + + Maximum number of times the binding can fire. + + + + Optional realm label so bindings can be cleared in groups. + + + +#### Returns + +`Promise>` — The platform's bind\_digit response. + +#### Throws + +- When the bind\_digit command is rejected. + +#### Source + +[`src/relay/Call.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts) + +Line 1375. + +*** + +### clearDigitBindings + +Clear all digit bindings, optionally filtered by realm. + +#### Signature + +```typescript +clearDigitBindings(realm?: string): Promise> +``` + +#### Parameters + + + When provided, only bindings with this realm label are cleared. + + +#### Returns + +`Promise>` — The platform's clear\_digit\_bindings response. + +#### Throws + +- When the clear\_digit\_bindings command is rejected. + +#### Source + +[`src/relay/Call.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts) + +Line 1401. + +*** + +### collect + +Collect digit / speech input without playing media. + +#### Signature + +```typescript +collect(options: { ...9 fields } = {}): Promise +``` + +#### Parameters + + + Collect configuration. + + + Keep collecting until explicitly stopped. + + + + Explicit control ID. Auto-generated when omitted. + + + + DTMF digit-collection config. + + + + Seconds to wait for the first input. + + + + Callback fired when collect completes. + + + + Emit partial (interim) results. + + + + Emit a start-of-input event when detected. + + + + Speech-recognition config. + + + + Start input timers immediately. + + + +#### Returns + +`Promise` — A [StandaloneCollectAction](/docs/sdk-reference/reference/typescript/relay/action/standalone-collect-action) for control and completion tracking. + +#### Throws + +- When the collect command is rejected. + +#### Source + +[`src/relay/Call.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts) + +Line 761. + +*** + +### connect + +Bridge the call to one or more destinations. + +#### Signature + +```typescript +connect( + devices: Record[][], + options: { ...5 fields } = {} +): Promise> +``` + +#### Parameters + + + Serial/parallel dial plan — outer array of serial groups, inner arrays dialled in parallel. + + + + Connect behaviour. + + + Maximum connect duration in seconds. + + + + Price cap per minute. + + + + Ringback media played to the originating party. + + + + Webhook URL for status events. + + + + Tag for event correlation. + + + +#### Returns + +`Promise>` — The platform's connect response. + +#### Throws + +- When the connect command is rejected. + +#### Source + +[`src/relay/Call.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts) + +Line 801. + +*** + +### constructor + +#### Signature + +```typescript +constructor( + client: RelayClientLike, + callId: string, + nodeId: string, + projectId: string, + context: string, + options: { ...5 fields } = {} +): Call +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`Call` + +#### Source + +[`src/relay/Call.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts) + +Line 111. + +*** + +### denoise + +Start noise reduction on the call. + +#### Signature + +```typescript +denoise(): Promise> +``` + +#### Returns + +`Promise>` — The platform's denoise response. + +#### Throws + +- When the denoise command is rejected. + +#### Source + +[`src/relay/Call.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts) + +Line 1302. + +*** + +### denoiseStop + +Stop noise reduction on the call. + +#### Signature + +```typescript +denoiseStop(): Promise> +``` + +#### Returns + +`Promise>` — The platform's denoise-stop response. + +#### Throws + +- When the denoise.stop command is rejected. + +#### Source + +[`src/relay/Call.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts) + +Line 1312. + +*** + +### detect + +Start audio detection (answering machine, fax, DTMF). + +#### Signature + +```typescript +detect( + detect: Record, + options: { ...3 fields } = {} +): Promise +``` + +#### Parameters + + + Platform-shaped detect configuration. + + + + Detection behaviour. + + + Explicit control ID. Auto-generated when omitted. + + + + Callback fired when detection completes. + + + + Detection timeout in seconds. + + + +#### Returns + +`Promise` — A [DetectAction](/docs/sdk-reference/reference/typescript/relay/action/detect-action) for control and completion tracking. + +#### Throws + +- When the detect command is rejected. + +#### Source + +[`src/relay/Call.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts) + +Line 858. + +*** + +### detectAnsweringMachine + +Detect human vs answering machine (AMD). Typed convenience over [detect](/docs/sdk-reference/reference/typescript/relay/call#detect). + +Builds the `{ type: 'machine', params: { ...only-provided... } }` detect +object — only the options the caller supplies are emitted, matching +Python's behaviour. Mirrors Python's `call.detect_answering_machine(*, +initial_timeout, end_silence_timeout, machine_voice_threshold, +machine_words_threshold, detect_interruptions, detect_message_end, +timeout)`. + +#### Signature + +```typescript +detectAnsweringMachine(options: { ...8 fields } = {}): Promise +``` + +#### Parameters + + + AMD options. + + + Emit interruption events during detection. + + + + Detect the end of a machine's greeting/message. + + + + Trailing-silence cutoff in seconds. + + + + Seconds to wait for initial voice. + + + + Voice-duration threshold for a machine verdict. + + + + Word-count threshold for a machine verdict. + + + + Callback fired when detection completes. + + + + Top-level detection timeout in seconds. + + + +#### Returns + +`Promise` — A [DetectAction](/docs/sdk-reference/reference/typescript/relay/action/detect-action) for control and completion tracking. + +#### Throws + +- When the detect command is rejected. + +#### Source + +[`src/relay/Call.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts) + +Line 923. + +*** + +### detectDigit + +Detect DTMF digits. Typed convenience over [detect](/docs/sdk-reference/reference/typescript/relay/call#detect). + +Builds the `{ type: 'digit', params: { digits? } }` detect object. +Mirrors Python's `call.detect_digit(*, digits, timeout)`. + +#### Signature + +```typescript +detectDigit(options: { ...3 fields } = {}): Promise +``` + +#### Parameters + + + Digit-detection options. + + + Restrict detection to this DTMF digit set (nested in detect params). + + + + Callback fired when detection completes. + + + + Top-level detection timeout in seconds. + + + +#### Returns + +`Promise` — A [DetectAction](/docs/sdk-reference/reference/typescript/relay/action/detect-action) for control and completion tracking. + +#### Throws + +- When the detect command is rejected. + +#### Source + +[`src/relay/Call.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts) + +Line 886. + +*** + +### detectFax + +Detect a fax tone (CED/CNG). Typed convenience over [detect](/docs/sdk-reference/reference/typescript/relay/call#detect). + +Builds the `{ type: 'fax', params: { tone? } }` detect object. Mirrors +Python's `call.detect_fax(*, tone, timeout)`. + +#### Signature + +```typescript +detectFax(options: { ...3 fields } = {}): Promise +``` + +#### Parameters + + + Fax-detection options. + + + Callback fired when detection completes. + + + + Top-level detection timeout in seconds. + + + + Restrict detection to a specific tone (`"CED"` / `"CNG"`), nested in detect params. + + + +#### Returns + +`Promise` — A [DetectAction](/docs/sdk-reference/reference/typescript/relay/action/detect-action) for control and completion tracking. + +#### Throws + +- When the detect command is rejected. + +#### Source + +[`src/relay/Call.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts) + +Line 961. + +*** + +### disconnect + +Disconnect (unbridge) a connected call. + +#### Signature + +```typescript +disconnect(): Promise> +``` + +#### Returns + +`Promise>` — The platform's disconnect response. + +#### Throws + +- When the disconnect command is rejected. + +#### Source + +[`src/relay/Call.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts) + +Line 826. + +*** + +### echo + +Echo audio back to the caller (useful for testing network round-trip). + +#### Signature + +```typescript +echo(options: { ...2 fields } = {}): Promise> +``` + +#### Parameters + + + Echo behaviour. + + + Webhook URL for echo status events. + + + + How long to echo, in seconds. + + + +#### Returns + +`Promise>` — The platform's echo response. + +#### Throws + +- When the echo command is rejected. + +#### Source + +[`src/relay/Call.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts) + +Line 1353. + +*** + +### hangup + +End / hang up the call. + +#### Signature + +```typescript +hangup(reason: string = 'hangup'): Promise> +``` + +#### Parameters + + + Hangup reason delivered to the platform. Defaults to `"hangup"`. + + +#### Returns + +`Promise>` — The platform's end response. + +#### Throws + +- When the end command is rejected. + +#### Source + +[`src/relay/Call.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts) + +Line 438. + +*** + +### hold + +Put the call on hold. + +#### Signature + +```typescript +hold(): Promise> +``` + +#### Returns + +`Promise>` — The platform's hold response. + +#### Throws + +- When the hold command is rejected. + +#### Source + +[`src/relay/Call.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts) + +Line 1280. + +*** + +### joinConference + +Join an ad-hoc audio conference. + +#### Signature + +```typescript +joinConference( + name: string, + options: { ...19 fields } = {} +): Promise> +``` + +#### Parameters + + + Conference name. Participants on the same name hear each other. + + + + Conference behaviour (muting, recording, status callbacks, etc.). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`Promise>` — The platform's join-conference response. + +#### Throws + +- When the join\_conference command is rejected. + +#### Source + +[`src/relay/Call.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts) + +Line 1213. + +*** + +### joinRoom + +Join a video / audio room. + +#### Signature + +```typescript +joinRoom( + name: string, + options: { ...1 fields } = {} +): Promise> +``` + +#### Parameters + + + Room name — callers on the same name share the same room. + + + + Room behaviour. + + + Webhook URL for room status events. + + + +#### Returns + +`Promise>` — The platform's join\_room response. + +#### Throws + +- When the join\_room command is rejected. + +#### Source + +[`src/relay/Call.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts) + +Line 1452. + +*** + +### leaveConference + +Leave an audio conference. + +#### Signature + +```typescript +leaveConference( + conferenceId: string, + extra?: Record +): Promise> +``` + +#### Parameters + + + Identifier of the conference to leave. + + + + Optional additional params merged into the request. + + +#### Returns + +`Promise>` — The platform's leave-conference response. + +#### Throws + +- When the leave\_conference command is rejected. + +#### Source + +[`src/relay/Call.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts) + +Line 1268. + +*** + +### leaveRoom + +Leave the current room. + +#### Signature + +```typescript +leaveRoom(extra?: Record): Promise> +``` + +#### Parameters + + + Optional additional params merged into the request. + + +#### Returns + +`Promise>` — The platform's leave\_room response. + +#### Throws + +- When the leave\_room command is rejected. + +#### Source + +[`src/relay/Call.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts) + +Line 1468. + +*** + +### liveTranscribe + +Start or stop live transcription on the call. + +#### Signature + +```typescript +liveTranscribe( + action: Record, + extra?: Record +): Promise> +``` + +#### Parameters + + + Platform-shaped action block (`start` or `stop` plus configuration). + + + + Optional additional params merged into the request. + + +#### Returns + +`Promise>` — The platform's live\_transcribe response. + +#### Throws + +- When the live\_transcribe command is rejected. + +#### Source + +[`src/relay/Call.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts) + +Line 1418. + +*** + +### liveTranslate + +Start or stop live translation on the call. + +#### Signature + +```typescript +liveTranslate( + action: Record, + options: { ...1 fields } = {} +): Promise> +``` + +#### Parameters + + + Platform-shaped action block (`start` or `stop` plus source/target languages). + + + + Live-translate behaviour. + + + Webhook URL for translation status events. + + + +#### Returns + +`Promise>` — The platform's live\_translate response. + +#### Throws + +- When the live\_translate command is rejected. + +#### Source + +[`src/relay/Call.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts) + +Line 1432. + +*** + +### on + +Register an event listener for this call. + +Multiple listeners for the same event type are supported. Listener errors +are logged but do not disrupt dispatch to other listeners. + +#### Signature + +```typescript +on(eventType: string, handler: EventHandler): void +``` + +#### Parameters + + + Fully-qualified event type (e.g. `"calling.call.state"`, `"calling.call.play"`). + + + + Callback invoked for each matching event. + + +#### Returns + +`void` + +#### Source + +[`src/relay/Call.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts) + +Line 186. + +*** + +### pass + +Decline control of an inbound call, returning it to routing. + +Use instead of [answer](/docs/sdk-reference/reference/typescript/relay/call#answer) when you want the call to fall through to +the next matching route rather than be handled by this client. + +#### Signature + +```typescript +pass(): Promise> +``` + +#### Returns + +`Promise>` — The platform's pass response. + +#### Throws + +- When the pass command is rejected. + +#### Source + +[`src/relay/Call.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts) + +Line 451. + +*** + +### pay + +Start a PCI-compliant payment collection flow. + +#### Signature + +```typescript +pay( + paymentConnectorUrl: string, + options: { ...19 fields } = {} +): Promise +``` + +#### Parameters + + + URL of the configured payment connector to tokenise the card with. + + + + Payment configuration — card-type filters, prompts, charge amount, etc. See the SignalWire pay documentation for field details. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`Promise` — A [PayAction](/docs/sdk-reference/reference/typescript/relay/action/pay-action) tracking the payment-collection flow. + +#### Throws + +- When the pay command is rejected. + +#### Source + +[`src/relay/Call.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts) + +Line 1008. + +*** + +### play + +Play audio content on the call. + +Returns immediately with a [PlayAction](/docs/sdk-reference/reference/typescript/relay/action/play-action) — `await action.wait()` to +block until playback finishes, or call `stop()` / `pause()` / `resume()` +/ `volume()` on it to control playback. + +#### Signature + +```typescript +play( + media: Record[], + options: { ...5 fields } = {} +): Promise +``` + +#### Parameters + + + Platform-shaped play items (TTS, audio URLs, silence, etc.). + + + + Optional playback controls. + + + Explicit control ID. Auto-generated when omitted. + + + + `"speak"`, `"hear"`, or `"both"`. + + + + Number of times to loop the playback. + + + + Callback fired when playback reaches a terminal state. + + + + Volume adjustment in dB. + + + +#### Returns + +`Promise` — A [PlayAction](/docs/sdk-reference/reference/typescript/relay/action/play-action) for control and completion tracking. + +#### Throws + +- When the play command is rejected. + +#### Source + +[`src/relay/Call.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts) + +Line 475. + +*** + +### playAndCollect + +Play audio and collect digit / speech input in a single operation. + +Convenient for IVR prompts — playback stops as soon as input is received. + +#### Signature + +```typescript +playAndCollect( + media: Record[], + collect: Record, + options: { ...3 fields } = {} +): Promise +``` + +#### Parameters + + + Audio items to play while collecting. + + + + Platform-shaped collect config (`digits`, `speech`, etc.). + + + + Playback and collection behaviour. + + + Explicit control ID. Auto-generated when omitted. + + + + Callback fired when collect completes. + + + + Playback volume adjustment in dB. + + + +#### Returns + +`Promise` — A [CollectAction](/docs/sdk-reference/reference/typescript/relay/action/collect-action) for the combined play-and-collect flow. + +#### Throws + +- When the play\_and\_collect command is rejected. + +#### Source + +[`src/relay/Call.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts) + +Line 657. + +*** + +### playAudio + +Play an audio file from a URL. Typed convenience over [play](/docs/sdk-reference/reference/typescript/relay/call#play). + +Builds the `{ type: 'audio', params: { url } }` media entry. Mirrors +Python's `call.play_audio(url, *, volume)`. + +#### Signature + +```typescript +playAudio(url: string, options: { ...2 fields } = {}): Promise +``` + +#### Parameters + + + URL of the audio file to play. + + + + Audio options. + + + Callback fired when playback reaches a terminal state. + + + + Top-level playback volume in dB. + + + +#### Returns + +`Promise` — A [PlayAction](/docs/sdk-reference/reference/typescript/relay/action/play-action) for control and completion tracking. + +#### Throws + +- When the play command is rejected. + +#### Source + +[`src/relay/Call.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts) + +Line 549. + +*** + +### playRingtone + +Play a named ringtone by country code. Typed convenience over [play](/docs/sdk-reference/reference/typescript/relay/call#play). + +Builds the `{ type: 'ringtone', params: { name, duration? } }` media entry. +Mirrors Python's `call.play_ringtone(name, *, duration, volume)`. + +#### Signature + +```typescript +playRingtone(name: string, options: { ...3 fields } = {}): Promise +``` + +#### Parameters + + + Ringtone name / country code (e.g. `"us"`, `"gb"`). + + + + Ringtone options. + + + How long to play the ringtone, in seconds (nested in media params). + + + + Callback fired when playback reaches a terminal state. + + + + Top-level playback volume in dB. + + + +#### Returns + +`Promise` — A [PlayAction](/docs/sdk-reference/reference/typescript/relay/action/play-action) for control and completion tracking. + +#### Throws + +- When the play command is rejected. + +#### Source + +[`src/relay/Call.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts) + +Line 597. + +*** + +### playSilence + +Play silence for `duration` seconds. Typed convenience over [play](/docs/sdk-reference/reference/typescript/relay/call#play). + +Builds the `{ type: 'silence', params: { duration } }` media entry. +Mirrors Python's `call.play_silence(duration)`. + +#### Signature + +```typescript +playSilence( + duration: number, + options: { ...1 fields } = {} +): Promise +``` + +#### Parameters + + + Length of silence in seconds. + + + + Playback options. + + + Callback fired when playback reaches a terminal state. + + + +#### Returns + +`Promise` — A [PlayAction](/docs/sdk-reference/reference/typescript/relay/action/play-action) for control and completion tracking. + +#### Throws + +- When the play command is rejected. + +#### Source + +[`src/relay/Call.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts) + +Line 574. + +*** + +### playTTS + +Play text-to-speech. Typed convenience over [play](/docs/sdk-reference/reference/typescript/relay/call#play). + +Builds the `{ type: 'tts', params: { text, language?, gender?, voice? } }` +media entry so callers don't hand-assemble it. Mirrors Python's +`call.play_tts(text, *, language, gender, voice, volume)`. + +#### Signature + +```typescript +playTTS(text: string, options: { ...5 fields } = {}): Promise +``` + +#### Parameters + + + Text to speak. + + + + TTS options. + + + Voice gender (`"male"` / `"female"`). + + + + BCP-47 language tag (e.g. `"en-US"`). + + + + Callback fired when playback reaches a terminal state. + + + + Explicit voice identifier (overrides language/gender). + + + + Top-level playback volume in dB. + + + +#### Returns + +`Promise` — A [PlayAction](/docs/sdk-reference/reference/typescript/relay/action/play-action) for control and completion tracking. + +#### Throws + +- When the play command is rejected. + +#### Source + +[`src/relay/Call.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts) + +Line 516. + +*** + +### promptAudio + +Play an audio file then collect input. Typed media over [playAndCollect](/docs/sdk-reference/reference/typescript/relay/call#play-and-collect). + +Builds the `{ type: 'audio', params: { url } }` play media and forwards +the caller's `collect` config. Mirrors Python's +`call.prompt_audio(url, collect, *, volume)`. + +#### Signature + +```typescript +promptAudio( + url: string, + collect: Record, + options: { ...2 fields } = {} +): Promise +``` + +#### Parameters + + + URL of the audio file to play before collecting. + + + + Platform-shaped collect config (`digits`, `speech`, etc.). + + + + Prompt options. + + + Callback fired when collect completes. + + + + Top-level playback volume in dB. + + + +#### Returns + +`Promise` — A [CollectAction](/docs/sdk-reference/reference/typescript/relay/action/collect-action) for the combined play-and-collect flow. + +#### Throws + +- When the play\_and\_collect command is rejected. + +#### Source + +[`src/relay/Call.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts) + +Line 731. + +*** + +### promptTTS + +Play TTS then collect input. Typed media over [playAndCollect](/docs/sdk-reference/reference/typescript/relay/call#play-and-collect). + +Builds the `{ type: 'tts', params: { text, language?, gender?, voice? } }` +play media and forwards the caller's `collect` config. Mirrors Python's +`call.prompt_tts(text, collect, *, language, gender, voice, volume)`. + +#### Signature + +```typescript +promptTTS( + text: string, + collect: Record, + options: { ...5 fields } = {} +): Promise +``` + +#### Parameters + + + Text to speak before collecting. + + + + Platform-shaped collect config (`digits`, `speech`, etc.). + + + + Prompt options. + + + Voice gender (`"male"` / `"female"`). + + + + BCP-47 language tag (e.g. `"en-US"`). + + + + Callback fired when collect completes. + + + + Explicit voice identifier (overrides language/gender). + + + + Top-level playback volume in dB. + + + +#### Returns + +`Promise` — A [CollectAction](/docs/sdk-reference/reference/typescript/relay/action/collect-action) for the combined play-and-collect flow. + +#### Throws + +- When the play\_and\_collect command is rejected. + +#### Source + +[`src/relay/Call.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts) + +Line 695. + +*** + +### queueEnter + +Place the call into a named queue. + +#### Signature + +```typescript +queueEnter( + queueName: string, + options: { ...2 fields } = {} +): Promise> +``` + +#### Parameters + + + Name of the queue to enter. + + + + Queue-entry behaviour. + + + Explicit control ID. Auto-generated when omitted. + + + + Webhook URL for queue status events. + + + +#### Returns + +`Promise>` — The platform's queue.enter response. + +#### Throws + +- When the queue.enter command is rejected. + +#### Source + +[`src/relay/Call.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts) + +Line 1629. + +*** + +### queueLeave + +Remove the call from a queue. + +#### Signature + +```typescript +queueLeave( + queueName: string, + options: { ...3 fields } = {} +): Promise> +``` + +#### Parameters + + + Name of the queue to leave. + + + + Queue-exit behaviour. + + + Explicit control ID. Auto-generated when omitted. + + + + Queue ID override (when multiple queues share a name). + + + + Webhook URL for queue status events. + + + +#### Returns + +`Promise>` — The platform's queue.leave response. + +#### Throws + +- When the queue.leave command is rejected. + +#### Source + +[`src/relay/Call.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts) + +Line 1653. + +*** + +### receiveFax + +Receive a fax and save it server-side. + +#### Signature + +```typescript +receiveFax(options: { ...2 fields } = {}): Promise +``` + +#### Parameters + + + Fax reception behaviour. + + + Explicit control ID. Auto-generated when omitted. + + + + Callback fired when the fax completes. + + + +#### Returns + +`Promise` — A [FaxAction](/docs/sdk-reference/reference/typescript/relay/action/fax-action) for control and completion tracking. + +#### Throws + +- When the receive\_fax command is rejected. + +#### Source + +[`src/relay/Call.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts) + +Line 1098. + +*** + +### record + +Record audio from the call. + +#### Signature + +```typescript +record( + audio?: Record, + options: { ...2 fields } = {} +): Promise +``` + +#### Parameters + + + Platform-shaped audio recording options (direction, codec, timeouts, etc.). Defaults to `{}`. + + + + Recording behaviour. + + + Explicit control ID. Auto-generated when omitted. + + + + Callback fired when the recording reaches a terminal state. + + + +#### Returns + +`Promise` — A [RecordAction](/docs/sdk-reference/reference/typescript/relay/action/record-action) for control and completion tracking. + +#### Throws + +- When the record command is rejected. + +#### Source + +[`src/relay/Call.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts) + +Line 627. + +*** + +### refer + +Transfer a SIP call via REFER. + +#### Signature + +```typescript +refer( + device: Record, + options: { ...1 fields } = {} +): Promise> +``` + +#### Parameters + + + Platform-shaped SIP target device descriptor. + + + + Optional REFER behaviour. + + + Webhook URL for REFER status events. + + + +#### Returns + +`Promise>` — The platform's refer response. + +#### Throws + +- When the refer command is rejected. + +#### Source + +[`src/relay/Call.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts) + +Line 987. + +*** + +### sendDigits + +Send DTMF digits on the call. + +#### Signature + +```typescript +sendDigits(digits: string, controlId?: string): Promise> +``` + +#### Parameters + + + The DTMF digit string to send (e.g. `"1234#"`, `"ww*9"`). + + + + Explicit control ID. Auto-generated when omitted. + + +#### Returns + +`Promise>` — The platform's send-digits response. + +#### Throws + +- When the send\_digits command is rejected. + +#### Source + +[`src/relay/Call.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts) + +Line 840. + +*** + +### sendFax + +Send a fax document. + +#### Signature + +```typescript +sendFax(document: string, options: { ...4 fields } = {}): Promise +``` + +#### Parameters + + + URL of the document to fax (TIFF or PDF). + + + + Fax behaviour. + + + Explicit control ID. Auto-generated when omitted. + + + + Additional fax header text. + + + + Caller identity string sent in the fax header. + + + + Callback fired when the fax completes. + + + +#### Returns + +`Promise` — A [FaxAction](/docs/sdk-reference/reference/typescript/relay/action/fax-action) for control and completion tracking. + +#### Throws + +- When the send\_fax command is rejected. + +#### Source + +[`src/relay/Call.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts) + +Line 1072. + +*** + +### stream + +Start streaming call audio to a WebSocket endpoint. + +#### Signature + +```typescript +stream(url: string, options: { ...9 fields } = {}): Promise +``` + +#### Parameters + + + WebSocket URL to stream audio to. + + + + Stream behaviour. + + + Bearer token sent to the stream endpoint. + + + + Audio codec (e.g. `"PCMU"`, `"PCMA"`). + + + + Explicit control ID. Auto-generated when omitted. + + + + Extra parameters forwarded to the stream endpoint. + + + + Friendly name for the stream. + + + + Callback fired when the stream completes. + + + + Webhook URL for stream status events. + + + + HTTP method for `statusUrl` requests. + + + + Which track to send: `"inbound"`, `"outbound"`, or `"both"`. + + + +#### Returns + +`Promise` — A [StreamAction](/docs/sdk-reference/reference/typescript/relay/action/stream-action) for control and completion tracking. + +#### Throws + +- When the stream command is rejected. + +#### Source + +[`src/relay/Call.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts) + +Line 1161. + +*** + +### tap + +Intercept call media and stream it to an external destination. + +#### Signature + +```typescript +tap( + tap: Record, + device: Record, + options: { ...2 fields } = {} +): Promise +``` + +#### Parameters + + + Platform-shaped tap configuration (direction, codec, etc.). + + + + Destination device descriptor (WebSocket URL, etc.). + + + + Tap behaviour. + + + Explicit control ID. Auto-generated when omitted. + + + + Callback fired when the tap completes. + + + +#### Returns + +`Promise` — A [TapAction](/docs/sdk-reference/reference/typescript/relay/action/tap-action) for control and completion tracking. + +#### Throws + +- When the tap command is rejected. + +#### Source + +[`src/relay/Call.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts) + +Line 1123. + +*** + +### toString + +Return a human-readable diagnostic string. + +#### Signature + +```typescript +toString(): string +``` + +#### Returns + +`string` — `` — handy for log output. + +#### Source + +[`src/relay/Call.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts) + +Line 1674. + +*** + +### transcribe + +Start transcribing the call. + +#### Signature + +```typescript +transcribe(options: { ...3 fields } = {}): Promise +``` + +#### Parameters + + + Transcription behaviour. + + + Explicit control ID. Auto-generated when omitted. + + + + Callback fired when transcription completes. + + + + Webhook URL for transcription status events. + + + +#### Returns + +`Promise` — A [TranscribeAction](/docs/sdk-reference/reference/typescript/relay/action/transcribe-action) for control and completion tracking. + +#### Throws + +- When the transcribe command is rejected. + +#### Source + +[`src/relay/Call.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts) + +Line 1328. + +*** + +### transfer + +Transfer call control to another RELAY app or SWML script. + +#### Signature + +```typescript +transfer( + dest: string, + extra?: Record +): Promise> +``` + +#### Parameters + + + Destination identifier (RELAY context, SWML URL, etc.). + + + + Optional additional params merged into the transfer request. + + +#### Returns + +`Promise>` — The platform's transfer response. + +#### Throws + +- When the transfer command is rejected. + +#### Source + +[`src/relay/Call.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts) + +Line 1198. + +*** + +### unhold + +Release the call from hold. + +#### Signature + +```typescript +unhold(): Promise> +``` + +#### Returns + +`Promise>` — The platform's unhold response. + +#### Throws + +- When the unhold command is rejected. + +#### Source + +[`src/relay/Call.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts) + +Line 1290. + +*** + +### userEvent + +Emit a custom user-defined event on the call for your webhooks. + +#### Signature + +```typescript +userEvent( + options: { event?: string } & Record = {} +): Promise> +``` + +#### Parameters + + + Freeform event payload. Set `options.event` for the event name and include any additional fields your webhook expects. + + +#### Returns + +`Promise>` — The platform's user\_event response. + +#### Throws + +- When the user\_event command is rejected. + +#### Source + +[`src/relay/Call.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts) + +Line 1611. + +*** + +### waitFor + +Wait for a specific event, optionally filtered by predicate. + +Registers a one-shot listener that is removed after resolving (or after +the timeout elapses). Useful for awaiting a specific state transition. + +#### Signature + +```typescript +waitFor( + eventType: string, + predicate?: (event: RelayEvent) => boolean, + timeout?: number +): Promise +``` + +#### Parameters + + + Event type to wait for. + + + + Optional filter — only events for which this returns `true` resolve the wait. + + + + Optional timeout in milliseconds. Omit to wait forever. + + +#### Returns + +`Promise` — The first matching [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event). + +#### Throws + +- When the optional timeout elapses before a match. + +#### Source + +[`src/relay/Call.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts) + +Line 242. + +*** + +### waitForAnswered + +Wait until the call is answered. + +Returns immediately if the call is already answered (or past it, e.g. +ending/ended). Typed wait over [waitFor](/docs/sdk-reference/reference/typescript/relay/call#wait-for), mirroring Python's +`call.wait_for_answered(timeout)`. + +#### Signature + +```typescript +waitForAnswered(timeout?: number): Promise +``` + +#### Parameters + + + Optional timeout in milliseconds. Omit to wait forever. + + +#### Returns + +`Promise` — The `calling.call.state` [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) (synthesized on short-circuit). + +#### Throws + +- When the optional timeout elapses before the call is answered. + +#### Source + +[`src/relay/Call.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts) + +Line 344. + +*** + +### waitForEnded + +Wait for the call to reach the `ended` state. + +#### Signature + +```typescript +waitForEnded(timeout?: number): Promise +``` + +#### Parameters + + + Optional timeout in milliseconds. + + +#### Returns + +`Promise` — The terminating `calling.call.state` [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event). + +#### Throws + +- When the optional timeout elapses before the call ends. + +#### Source + +[`src/relay/Call.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts) + +Line 287. + +*** + +### waitForEnding + +Wait until the call is ending. + +Returns immediately if the call is already ending (or ended). Typed wait +over [waitFor](/docs/sdk-reference/reference/typescript/relay/call#wait-for), mirroring Python's `call.wait_for_ending(timeout)`. + +#### Signature + +```typescript +waitForEnding(timeout?: number): Promise +``` + +#### Parameters + + + Optional timeout in milliseconds. Omit to wait forever. + + +#### Returns + +`Promise` — The `calling.call.state` [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) (synthesized on short-circuit). + +#### Throws + +- When the optional timeout elapses before the call is ending. + +#### Source + +[`src/relay/Call.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts) + +Line 373. + +*** + +### waitForRinging + +Wait until the call is ringing. + +Returns immediately if the call is already ringing (or past it, e.g. +answered/ending/ended). Typed wait over [waitFor](/docs/sdk-reference/reference/typescript/relay/call#wait-for), mirroring +Python's `call.wait_for_ringing(timeout)`. + +#### Signature + +```typescript +waitForRinging(timeout?: number): Promise +``` + +#### Parameters + + + Optional timeout in milliseconds. Omit to wait forever. + + +#### Returns + +`Promise` — The `calling.call.state` [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) (synthesized on short-circuit). + +#### Throws + +- When the optional timeout elapses before the call is ringing. + +#### Source + +[`src/relay/Call.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts) + +Line 359. + +## Interfaces + +### RelayClientLike + +Interface the Call needs from RelayClient (avoids circular import). + +#### Signature + +```typescript +interface RelayClientLike +``` + +#### Methods + +##### execute + +###### Signature + +```typescript +execute( + method: string, + params: Record +): Promise> +``` + +###### Parameters + + + + + +###### Returns + +`Promise>` + +###### Source + +[`src/relay/Call.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts) + +Line 54. + +#### Source + +[`src/relay/Call.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts) + +Line 53. + +## Source + +[`src/relay/Call.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts) + +Line 80. diff --git a/fern/products/sdk-reference/typescript/relay/closed-sets/index.mdx b/fern/products/sdk-reference/typescript/relay/closed-sets/index.mdx new file mode 100644 index 0000000000..6c2c242302 --- /dev/null +++ b/fern/products/sdk-reference/typescript/relay/closed-sets/index.mdx @@ -0,0 +1,246 @@ +--- +slug: "/reference/typescript/relay/closed-sets" +title: "closedSets" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "relay.closedSets" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/closedSets.ts" +--- +# `closedSets` + +## Signature + +```typescript +module closedSets +``` + +## Constants + + + The single terminal [CallState](/docs/sdk-reference/reference/typescript/relay/closed-sets#call-state) (`'ended'`). + + + + The terminal [DialState](/docs/sdk-reference/reference/typescript/relay/closed-sets#dial-state) values (`'answered'`, `'failed'`). + + + + The terminal [MessageState](/docs/sdk-reference/reference/typescript/relay/closed-sets#message-state) values (`'delivered'`, `'undelivered'`, `'failed'`). Mirrors the runtime `MESSAGE_TERMINAL_STATES` in `relay/constants.ts`. + + +## Functions + +### isCallStateTerminal + +True when `state` is a terminal [CallState](/docs/sdk-reference/reference/typescript/relay/closed-sets#call-state) — i.e. the call has reached +`ended` and will emit no further state transitions. Accepts any string (the +value off the wire), so it is safe to call on a raw `call_state` field — a +wire-reading predicate widens its _parameter_, never the stored field. + +#### Signature + +```typescript +isCallStateTerminal(state: string): boolean +``` + +#### Parameters + + + A call state (typed [CallState](/docs/sdk-reference/reference/typescript/relay/closed-sets#call-state) or any wire string). + + +#### Returns + +`boolean` — `true` iff `state === 'ended'`. + +#### Source + +[`src/relay/closedSets.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/closedSets.ts) + +Line 144. + +*** + +### isDialStateTerminal + +True when `state` is a terminal [DialState](/docs/sdk-reference/reference/typescript/relay/closed-sets#dial-state) — i.e. the outbound dial +has resolved (`answered` or `failed`) and will emit no further dial +progress. Accepts any string (the value off the wire). + +#### Signature + +```typescript +isDialStateTerminal(state: string): boolean +``` + +#### Parameters + + + A dial state (typed [DialState](/docs/sdk-reference/reference/typescript/relay/closed-sets#dial-state) or any wire string). + + +#### Returns + +`boolean` — `true` iff `state` is `answered` or `failed`. + +#### Source + +[`src/relay/closedSets.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/closedSets.ts) + +Line 156. + +*** + +### isMessageStateTerminal + +True when `state` is a terminal [MessageState](/docs/sdk-reference/reference/typescript/relay/closed-sets#message-state) — i.e. the message has +reached a final delivery outcome (`delivered`, `undelivered`, or `failed`) +and will emit no further `messaging.state` events. Accepts any string (the +value off the wire), matching the runtime `MESSAGE_TERMINAL_STATES` check in +`../relay/Message.Message`. + +#### Signature + +```typescript +isMessageStateTerminal(state: string): boolean +``` + +#### Parameters + + + A message state (typed [MessageState](/docs/sdk-reference/reference/typescript/relay/closed-sets#message-state) or any wire string). + + +#### Returns + +`boolean` — `true` iff `state` is `delivered`, `undelivered`, or `failed`. + +#### Source + +[`src/relay/closedSets.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/closedSets.ts) + +Line 170. + +## Type Aliases + +### CallState + +Call lifecycle state for `../relay/Call.Call.state` and the +`call_state` field of a `calling.call.state` event +(`../relay/RelayEvent.CallStateEvent.callState`). The platform walks a +call through `created → ringing → answered → ending → ended`; `ended` is the +sole terminal state (see [isCallStateTerminal](/docs/sdk-reference/reference/typescript/relay/closed-sets#is-call-state-terminal)). + +#### Signature + +```typescript +type CallState = "created" | "ringing" | "answered" | "ending" | "ended" +``` + +#### Source + +[`src/relay/closedSets.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/closedSets.ts) + +Line 75. + +*** + +### DialState + +Outbound-dial state for the `dial_state` field of a `calling.call.dial` +event (`../relay/RelayEvent.DialEvent.dialState`). The platform reports +`dialing` while a leg is being attempted, then resolves to `answered` (a leg +won) or `failed` (all legs failed) — both terminal (see +[isDialStateTerminal](/docs/sdk-reference/reference/typescript/relay/closed-sets#is-dial-state-terminal)). Grounded in `signalwire/relay/client.py`. + +NOTE: distinct from [CallState](/docs/sdk-reference/reference/typescript/relay/closed-sets#call-state). A dial's `answered` is the _dial_ +resolving, not a `Call.state` transition. + +#### Signature + +```typescript +type DialState = "dialing" | "answered" | "failed" +``` + +#### Source + +[`src/relay/closedSets.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/closedSets.ts) + +Line 92. + +*** + +### FaxTone + +Fax tone to detect for `../relay/Call.Call.detectFax` (`tone` option): +`"CED"` (called-station, answering fax) or `"CNG"` (calling-station, +originating fax). Restricts detection to one tone; omit to detect either. + +#### Signature + +```typescript +type FaxTone = "CED" | "CNG" +``` + +#### Source + +[`src/relay/closedSets.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/closedSets.ts) + +Line 42. + +*** + +### MessageState + +Message lifecycle state for `../relay/Message.Message.state` and the +`message_state` field of a `messaging.state` event +(`../relay/RelayEvent.MessageStateEvent.messageState`). Outbound +messages walk `queued → initiated → sent → delivered` (or `undelivered` / +`failed`); inbound messages arrive as `received`. The terminal set is +`delivered | undelivered | failed` (see [isMessageStateTerminal](/docs/sdk-reference/reference/typescript/relay/closed-sets#is-message-state-terminal) and +`MESSAGE_TERMINAL_STATES`). + +NOTE: distinct from [CallState](/docs/sdk-reference/reference/typescript/relay/closed-sets#call-state) and [DialState](/docs/sdk-reference/reference/typescript/relay/closed-sets#dial-state). + +#### Signature + +```typescript +type MessageState = "queued" | "initiated" | "sent" | "delivered" | "undelivered" | "failed" | "received" +``` + +#### Source + +[`src/relay/closedSets.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/closedSets.ts) + +Line 108. + +*** + +### TtsGender + +Text-to-speech voice gender for `../relay/Call.Call.playTTS` / +`../relay/Call.Call.promptTTS` (`gender` option). The SignalWire +platform recognises `"male"` and `"female"`. + +#### Signature + +```typescript +type TtsGender = "male" | "female" +``` + +#### Source + +[`src/relay/closedSets.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/closedSets.ts) + +Line 35. + +## Source + +[`src/relay/closedSets.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/closedSets.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/relay/constants/index.mdx b/fern/products/sdk-reference/typescript/relay/constants/index.mdx new file mode 100644 index 0000000000..55958da008 --- /dev/null +++ b/fern/products/sdk-reference/typescript/relay/constants/index.mdx @@ -0,0 +1,196 @@ +--- +slug: "/reference/typescript/relay/constants" +title: "constants" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "relay.constants" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/constants.ts" +--- +# `constants` + +## Signature + +```typescript +module constants +``` + +## Constants + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Protocol constants for the SignalWire RELAY calling API. + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## Source + +[`src/relay/constants.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/constants.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/relay/deferred/index.mdx b/fern/products/sdk-reference/typescript/relay/deferred/index.mdx new file mode 100644 index 0000000000..544e661882 --- /dev/null +++ b/fern/products/sdk-reference/typescript/relay/deferred/index.mdx @@ -0,0 +1,131 @@ +--- +slug: "/reference/typescript/relay/deferred" +title: "Deferred" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "interface" + language: "typescript" + qualified_name: "relay.Deferred" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Deferred.ts" +--- +# `Deferred` + +A promise with externalised `resolve`/`reject` and a `settled` flag, +used by the RELAY client to bridge server-push events back to in-flight +JSON-RPC request callers. + +## Signature + +```typescript +interface Deferred +``` + +## Type Parameters + + + +## Properties + + + The wrapped promise. + + + + Reject the promise idempotently (later calls are ignored). + + + + Resolve the promise idempotently (later calls are ignored). + + + + True once either `resolve` or `reject` has been called. + + +## Functions + +### createDeferred + +Create a [Deferred](/docs/sdk-reference/reference/typescript/relay/deferred) with externalised `resolve` / `reject` and a +`settled` flag. + +The returned object exposes the promise plus its resolve and reject +functions so callers outside the executor can settle it. Later calls to +`resolve` or `reject` are idempotent. + +#### Signature + +```typescript +createDeferred(): Deferred +``` + +#### Type Parameters + + + Resolution value type of the wrapped promise. + + +#### Returns + +`Deferred` — A fresh `Deferred` in pending state. + +#### Source + +[`src/relay/Deferred.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Deferred.ts) + +Line 34. + +*** + +### withTimeout + +Race a promise against a timeout. + +#### Signature + +```typescript +withTimeout( + promise: Promise, + ms: number, + label: string = 'Operation' +): Promise +``` + +#### Type Parameters + + + Resolution value type of the input promise. + + +#### Parameters + + + Promise to race against the timeout. + + + + Timeout in milliseconds. + + + + Label used in the timeout error message. Defaults to `"Operation"`. + + +#### Returns + +`Promise` — A new promise that resolves with `promise`'s value if it settles before the timeout, and rejects with a timeout `Error` otherwise. + +#### Source + +[`src/relay/Deferred.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Deferred.ts) + +Line 73. + +## Source + +[`src/relay/Deferred.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Deferred.ts) + +Line 12. diff --git a/fern/products/sdk-reference/typescript/relay/index.mdx b/fern/products/sdk-reference/typescript/relay/index.mdx new file mode 100644 index 0000000000..993f35b32b --- /dev/null +++ b/fern/products/sdk-reference/typescript/relay/index.mdx @@ -0,0 +1,25 @@ +--- +slug: "/reference/typescript/relay" +title: "relay" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "relay" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/index.ts" +--- +# `relay` + +## Signature + +```typescript +module relay +``` + +## Source + +[`src/relay/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/index.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/relay/message/index.mdx b/fern/products/sdk-reference/typescript/relay/message/index.mdx new file mode 100644 index 0000000000..80604ea5e2 --- /dev/null +++ b/fern/products/sdk-reference/typescript/relay/message/index.mdx @@ -0,0 +1,236 @@ +--- +slug: "/reference/typescript/relay/message" +title: "Message" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "relay.Message" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Message.ts" +--- +# `Message` + +SMS/MMS message in the RELAY messaging namespace. + +Outbound messages progress through `queued` → `initiated` → `sent` → `delivered` +(or `undelivered` / `failed`). Inbound messages arrive with state `received`. +Call [Message.wait](/docs/sdk-reference/reference/typescript/relay/message#wait) to await a terminal state. + +## Signature + +```typescript +class Message +``` + +## Examples + +```typescript +const msg = await client.sendMessage({ + to: '+15551234567', + from: '+15557654321', + body: 'Your code is 4242', +}); + +const final = await msg.wait(30); // seconds +console.log('Final state:', final.params.message_state); +``` + +## Properties + + + Plain-text message body. + + + + RELAY context the message belongs to. + + + + `"inbound"` or `"outbound"`. + + + + Sender phone number in E.164 format. + + + + True once the message has reached a terminal state. + + + + Whether this message's current [Message.state](/docs/sdk-reference/reference/typescript/relay/message#state) is a terminal delivery outcome (`delivered` | `undelivered` | `failed`). Distinct from [Message.isDone](/docs/sdk-reference/reference/typescript/relay/message#is-done): `isDone` reflects whether the internal completion promise has settled (driven by event dispatch), whereas `isTerminal` is a pure test of the state _value_ (`../relay/closedSets.MessageState`) and is meaningful even on a freshly-constructed inbound message. + + + + Media URLs attached to the message (MMS). + + + + Unique message identifier assigned by the platform. + + + + Failure / undelivery reason when `state` is non-successful. + + + + Final event that terminated the message, or `null` if still in-flight. + + + + Number of segments the carrier split the message into. + + + + Current message state. One of the [MessageState](/docs/sdk-reference/reference/typescript/relay/closed-sets#message-state) values (`"queued"` | `"initiated"` | `"sent"` | `"delivered"` | `"undelivered"` | `"failed"` | `"received"`; closed literal union, autocompleted + typo-checked). A raw wire value is cast to the closed type at the hydration boundary. Use [Message.isTerminal](/docs/sdk-reference/reference/typescript/relay/message#is-terminal) to test for a final delivery outcome rather than comparing strings by hand. + + + + Opaque tags attached to the message. + + + + Destination phone number in E.164 format. + + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(options: { ...11 fields } = {}): Message +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`Message` + +#### Source + +[`src/relay/Message.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Message.ts) + +Line 73. + +*** + +### on + +Register an event listener for state changes on this message. + +The handler fires every time the server emits a `messaging.state` event +for this message (multiple listeners are supported). Listener errors are +logged but do not disrupt dispatch. + +#### Signature + +```typescript +on(handler: EventHandler): void +``` + +#### Parameters + + + Callback invoked for each state-change event. + + +#### Returns + +`void` + +#### Source + +[`src/relay/Message.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Message.ts) + +Line 137. + +*** + +### toString + +Return a human-readable diagnostic string. + +#### Signature + +```typescript +toString(): string +``` + +#### Returns + +`string` — `Message(id=..., direction=..., state=..., from=..., to=...)` — handy for log output. + +#### Source + +[`src/relay/Message.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Message.ts) + +Line 220. + +*** + +### wait + +Wait for the message to reach a terminal state (`delivered`, `failed`, +`undelivered`, etc.). + +#### Signature + +```typescript +wait(timeout?: number): Promise +``` + +#### Parameters + + + Maximum time to wait in **seconds** (matches the Python SDK convention — not milliseconds). + + +#### Returns + +`Promise` — The final `messaging.state` [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event). + +#### Throws + +- When the optional timeout elapses before a terminal state. + +#### Source + +[`src/relay/Message.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Message.ts) + +Line 150. + +## Source + +[`src/relay/Message.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Message.ts) + +Line 38. diff --git a/fern/products/sdk-reference/typescript/relay/normalize/index.mdx b/fern/products/sdk-reference/typescript/relay/normalize/index.mdx new file mode 100644 index 0000000000..6de7ab1315 --- /dev/null +++ b/fern/products/sdk-reference/typescript/relay/normalize/index.mdx @@ -0,0 +1,135 @@ +--- +slug: "/reference/typescript/relay/normalize" +title: "normalize" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "relay.normalize" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/normalize.ts" +--- +# `normalize` + +## Signature + +```typescript +module normalize +``` + +## Functions + +### normalizeDevice + +Normalize a single device descriptor (phone/sip/webrtc/agora/stream/...). + +For `phone`, also renames the SDK's short `to`/`from` keys to the wire-format +`to_number`/`from_number` that the platform expects. + +#### Signature + +```typescript +normalizeDevice(device: Record): Record +``` + +#### Parameters + + + +#### Returns + +`Record` + +#### Source + +[`src/relay/normalize.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/normalize.ts) + +Line 38. + +*** + +### normalizeDevicePlan + +Normalize a 2D dial plan (outer = serial groups, inner = parallel devices). + +#### Signature + +```typescript +normalizeDevicePlan( + plan: Record[][] +): Record[][] +``` + +#### Parameters + + + +#### Returns + +`Record[][]` + +#### Source + +[`src/relay/normalize.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/normalize.ts) + +Line 58. + +*** + +### normalizePlayItem + +Normalize a single play item (tts/audio/silence/ringtone). + +#### Signature + +```typescript +normalizePlayItem(item: Record): Record +``` + +#### Parameters + + + +#### Returns + +`Record` + +#### Source + +[`src/relay/normalize.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/normalize.ts) + +Line 17. + +*** + +### normalizePlayItems + +Normalize an array of play items. + +#### Signature + +```typescript +normalizePlayItems(items: Record[]): Record[] +``` + +#### Parameters + + + +#### Returns + +`Record[]` + +#### Source + +[`src/relay/normalize.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/normalize.ts) + +Line 26. + +## Source + +[`src/relay/normalize.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/normalize.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/relay/relay-client/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-client/index.mdx new file mode 100644 index 0000000000..33052b6bf2 --- /dev/null +++ b/fern/products/sdk-reference/typescript/relay/relay-client/index.mdx @@ -0,0 +1,638 @@ +--- +slug: "/reference/typescript/relay/relay-client" +title: "RelayClient" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "relay.RelayClient" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayClient.ts" +--- +# `RelayClient` + +Real-time WebSocket client for SignalWire RELAY. + +One instance = one persistent JSON-RPC 2.0 WebSocket connection. Lets you +place / receive calls and SMS, play/record media, run TTS, conference calls +together, and subscribe to platform events — all without HTTP polling. + +Authentication supports either a project/token pair or a JWT. + +## Signature + +```typescript +class RelayClient +``` + +## Examples + + + + ```typescript + import { RelayClient } from '@signalwire/sdk'; + + const client = new RelayClient({ + project: process.env.SIGNALWIRE_PROJECT_ID!, + token: process.env.SIGNALWIRE_API_TOKEN!, + host: 'example.signalwire.com', + contexts: ['office'], + }); + + client.onCall(async (call) => { + await call.answer(); + await call.playTTS({ text: 'Thanks for calling!' }); + await call.hangup(); + }); + + await client.connect(); + ``` + + + + ```typescript + await client.connect(); + const call = await client.dial({ + devices: [[{ type: 'phone', to: '+15551234567', from: '+15557654321' }]], + }); + await client.sendMessage({ to: '+15551234567', from: '+15557654321', body: 'Hi!' }); + ``` + + + +## See Also + +- \- \[Call]\(/docs/sdk-reference/reference/typescript/relay/call) + \- \[Message]\(/docs/sdk-reference/reference/typescript/relay/message) + +## Properties + + + Contexts this client subscribes to for inbound events. + + + + Hostname of the RELAY endpoint (e.g. `example.signalwire.com`). + + + + JWT used instead of project/token if provided. + + + + Project ID used for Basic Auth. + + + + The protocol name the server assigned to this client after `connect()`. + + + + WebSocket scheme — `'wss'` (production) or `'ws'` (loopback audits). See [RelayClientOptions.scheme](/docs/sdk-reference/reference/typescript/relay/types#relay-client-options#scheme) for the full rationale. + + + + API token used for Basic Auth. + + +## Methods + +### \[asyncDispose] + +Async disposable support — equivalent to Python's `__aexit__`. + +Enables usage with `await using`: + +```ts +await using client = new RelayClient({ ... }); +await client.connect(); +// ... automatically disconnects when scope exits +``` + +For environments without `await using`, use try/finally: + +```ts +const client = new RelayClient({ ... }); +try { await client.connect(); ... } +finally { await client.disconnect(); } +``` + +#### Signature + +```typescript +[asyncDispose](): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/relay/RelayClient.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayClient.ts) + +Line 266. + +*** + +### connect + +Connect to RELAY and authenticate. + +Opens the WebSocket, runs the JSON-RPC `signalwire.connect` handshake, +and starts the client-side ping loop. Safe to call again after a +`disconnect()` to reconnect; the process-wide concurrent-connection limit +is enforced here. + +#### Signature + +```typescript +connect(): Promise +``` + +#### Returns + +`Promise` — Resolves once the client is connected and authenticated. + +#### Throws + +- When the process-wide connection limit is reached, authentication fails, or the WebSocket cannot be opened. + +#### Source + +[`src/relay/RelayClient.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayClient.ts) + +Line 340. + +*** + +### constructor + +Create a new RELAY client. +Credentials fall back to the `SIGNALWIRE_PROJECT_ID`, `SIGNALWIRE_API_TOKEN`, +`SIGNALWIRE_JWT_TOKEN`, and `SIGNALWIRE_SPACE` env vars when omitted. + +#### Signature + +```typescript +constructor(options: RelayClientOptions = {}): RelayClient +``` + +#### Parameters + + + Optional client configuration. + + +#### Returns + +`RelayClient` + +#### Source + +[`src/relay/RelayClient.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayClient.ts) + +Line 196. + +*** + +### dial + +Initiate an outbound call. + +Accepts a "dial plan" — an outer array of serial groups, each containing +an inner array of devices dialled in parallel. Resolves when any device +answers; rejects if no device answers within `dialTimeout`. + +#### Signature + +```typescript +dial( + devices: Record[][], + options: { ...3 fields } = {} +): Promise +``` + +#### Parameters + + + Serial/parallel dial plan. `[[A], [B, C]]` dials A first, then B and C in parallel. + + + + Optional dial behaviour overrides. + + + Dial timeout in seconds (default 120). + + + + Maximum call duration in minutes. + + + + Client-provided tag for event correlation. Auto-generated (UUID) when omitted. + + + +#### Returns + +`Promise` — A [Call](/docs/sdk-reference/reference/typescript/relay/call) representing the answered leg. + +#### Throws + +- When the dial times out. +- When the server rejects the dial request. + +#### Source + +[`src/relay/RelayClient.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayClient.ts) + +Line 586. + +*** + +### disconnect + +Cleanly close the connection. + +Stops the ping loop, drops the WebSocket, rejects every pending request +and dial with a `Connection closed` [RelayError](/docs/sdk-reference/reference/typescript/relay/relay-error), and removes the +client from the process-wide active set. Safe to call repeatedly. + +#### Signature + +```typescript +disconnect(): Promise +``` + +#### Returns + +`Promise` — Resolves once all resources have been released. + +#### Source + +[`src/relay/RelayClient.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayClient.ts) + +Line 488. + +*** + +### execute + +Send a JSON-RPC request and await the response. + +This is the low-level escape hatch for calling RELAY methods that don't +yet have a higher-level helper on this class. Queued if the client is +currently disconnected; sent immediately otherwise. + +#### Signature + +```typescript +execute( + method: string, + params: Record +): Promise> +``` + +#### Parameters + + + Fully-qualified JSON-RPC method name (e.g. `"calling.play"`). + + + + Method-specific params object. + + +#### Returns + +`Promise>` — The `result` field of the JSON-RPC response. + +#### Throws + +- When the server returns a non-2xx code. + +#### Source + +[`src/relay/RelayClient.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayClient.ts) + +Line 542. + +*** + +### notify + +Fire-and-forget JSON-RPC notification (no response awaited). + +Sends a JSON-RPC frame on the open socket without registering a +pending-response future. Used by the audit harness to emit a +`signalwire.event`-method frame the fixture watches for; production +users should always use [execute](/docs/sdk-reference/reference/typescript/relay/relay-client#execute) instead so the response code +is checked. + +No-ops when the socket is closed. + +#### Signature + +```typescript +notify(method: string, params: Record): void +``` + +#### Parameters + + + JSON-RPC method name. + + + + Method params object. + + +#### Returns + +`void` + +#### Source + +[`src/relay/RelayClient.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayClient.ts) + +Line 560. + +*** + +### onCall + +Register the inbound call handler. + +The handler is invoked once per inbound call, with a fully-formed +[Call](/docs/sdk-reference/reference/typescript/relay/call) already in state `"created"`. Answer, reject, or forward +the call from inside the handler. + +#### Signature + +```typescript +onCall(handler: CallHandler): CallHandler +``` + +#### Parameters + + + Callback invoked for each inbound call. May return a promise; errors are logged but do not tear down the client. + + +#### Returns + +`CallHandler` — The same handler, to support decorator-style usage. + +#### Source + +[`src/relay/RelayClient.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayClient.ts) + +Line 283. + +*** + +### onEvent + +Register a low-level observer that fires for every inbound +`signalwire.event`, regardless of event type or whether a typed +Call / Message could be matched. + +Most users want [onCall](/docs/sdk-reference/reference/typescript/relay/relay-client#on-call) / [onMessage](/docs/sdk-reference/reference/typescript/relay/relay-client#on-message) — those deliver +typed objects and handle correlation. `onEvent` is the generic +escape hatch used by the porting-sdk audit harness to react to +every event the platform pushes. + +Fires BEFORE typed routing, so the same event will be observed here +AND on any matching [Call](/docs/sdk-reference/reference/typescript/relay/call) / [Message](/docs/sdk-reference/reference/typescript/relay/message). + +#### Signature + +```typescript +onEvent( + handler: (eventType: string, params: Record) => void | Promise +): (eventType: string, params: Record) => void | Promise +``` + +#### Parameters + + + Callback receiving `(eventType, params)`. May be async. + + +#### Returns + +`(eventType: string, params: Record) => void | Promise` — The same handler, for decorator-style usage. + +#### Source + +[`src/relay/RelayClient.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayClient.ts) + +Line 319. + +*** + +### onMessage + +Register the inbound message handler. + +The handler is invoked once per inbound SMS/MMS delivered to a subscribed +context, with a [Message](/docs/sdk-reference/reference/typescript/relay/message) already in state `"received"`. + +#### Signature + +```typescript +onMessage(handler: MessageHandler): MessageHandler +``` + +#### Parameters + + + Callback invoked for each inbound message. May return a promise; errors are logged but do not tear down the client. + + +#### Returns + +`MessageHandler` — The same handler, to support decorator-style usage. + +#### Source + +[`src/relay/RelayClient.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayClient.ts) + +Line 298. + +*** + +### receive + +Subscribe to additional RELAY contexts on an already-connected client. + +Inbound calls and messages on any of the listed contexts will be delivered +to the `onCall` / `onMessage` handlers. A no-op when `contexts` is empty. + +#### Signature + +```typescript +receive(contexts: string[]): Promise +``` + +#### Parameters + + + Context names to subscribe to. + + +#### Returns + +`Promise` — Resolves once the server has confirmed the subscription. + +#### Throws + +- When the server rejects the subscribe request. + +#### Source + +[`src/relay/RelayClient.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayClient.ts) + +Line 714. + +*** + +### run + +Blocking entry point — connects and maintains the connection with +auto-reconnect, returning only after a clean shutdown (Ctrl+C, SIGTERM, +or [disconnect](/docs/sdk-reference/reference/typescript/relay/relay-client#disconnect) from another scope). + +Installs `SIGINT` / `SIGTERM` handlers, so typically only one `RelayClient` +per process should call `run()`. + +#### Signature + +```typescript +run(): Promise +``` + +#### Returns + +`Promise` — Resolves once a shutdown has been requested and cleanup completes. + +#### Throws + +- Only on unrecoverable startup failures — normal disconnects are handled internally by the reconnect loop. + +#### Source + +[`src/relay/RelayClient.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayClient.ts) + +Line 748. + +*** + +### sendMessage + +Send an outbound SMS / MMS message. + +The method returns as soon as the server has accepted the send; track the +message's terminal state with [Message.wait](/docs/sdk-reference/reference/typescript/relay/message#wait) or the `onCompleted` +callback. + +#### Signature + +```typescript +sendMessage(options: { ...8 fields }): Promise +``` + +#### Parameters + + + Send parameters. + + + Text body of the message. + + + + Context for receiving state events. Defaults to the negotiated relay protocol. + + + + Sender phone number in E.164 format. + + + + List of media URLs for MMS. + + + + Optional callback fired when the message reaches a terminal state (delivered / failed / undelivered). + + + + Origination region override. + + + + Tags attached to the message for correlation. + + + + Destination phone number in E.164 format. + + + +#### Returns + +`Promise` — A [Message](/docs/sdk-reference/reference/typescript/relay/message) tracking the outbound send. + +#### Throws + +- When the server rejects the send request. + +#### Source + +[`src/relay/RelayClient.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayClient.ts) + +Line 655. + +*** + +### unreceive + +Unsubscribe from contexts previously passed to [receive](/docs/sdk-reference/reference/typescript/relay/relay-client#receive) (or the +constructor). A no-op when `contexts` is empty. + +#### Signature + +```typescript +unreceive(contexts: string[]): Promise +``` + +#### Parameters + + + Context names to unsubscribe from. + + +#### Returns + +`Promise` — Resolves once the server has confirmed the unsubscribe. + +#### Throws + +- When the server rejects the unsubscribe request. + +#### Source + +[`src/relay/RelayClient.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayClient.ts) + +Line 728. + +## Source + +[`src/relay/RelayClient.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayClient.ts) + +Line 129. diff --git a/fern/products/sdk-reference/typescript/relay/relay-error/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-error/index.mdx new file mode 100644 index 0000000000..1c72cf3796 --- /dev/null +++ b/fern/products/sdk-reference/typescript/relay/relay-error/index.mdx @@ -0,0 +1,71 @@ +--- +slug: "/reference/typescript/relay/relay-error" +title: "RelayError" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "relay.RelayError" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayError.ts" +--- +# `RelayError` + +Custom error class for RELAY protocol errors. + +Thrown when the server returns a non-2xx JSON-RPC result code. Mirrors the +Python SDK signature: `RelayError(code, message)`. + +## Signature + +```typescript +class RelayError extends Error +``` + +## Inheritance + +**Extends:** `Error` + +## Properties + + + Numeric RELAY result code returned by the server. + + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(code: number, message: string): RelayError +``` + +#### Parameters + + + Numeric RELAY result code (e.g. `404`, `503`). + + + + Human-readable error message from the server. + + +#### Returns + +`RelayError` + +#### Source + +[`src/relay/RelayError.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayError.ts) + +Line 15. + +## Source + +[`src/relay/RelayError.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayError.ts) + +Line 7. diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/call-receive-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/call-receive-event/index.mdx new file mode 100644 index 0000000000..189ab4a8d5 --- /dev/null +++ b/fern/products/sdk-reference/typescript/relay/relay-event/call-receive-event/index.mdx @@ -0,0 +1,159 @@ +--- +slug: "/reference/typescript/relay/relay-event/call-receive-event" +title: "CallReceiveEvent" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "relay.RelayEvent.CallReceiveEvent" + parent: "relay.RelayEvent" + module: "relay.RelayEvent" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts" +--- +# `CallReceiveEvent` + +`calling.call.receive` — fires when an inbound call arrives on a subscribed context. + +## Signature + +```typescript +class CallReceiveEvent extends RelayEvent +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) + +## Properties + + + Call ID associated with the event, or `""` for non-call events. + + + + Initial call state ([CallState](/docs/sdk-reference/reference/typescript/relay/closed-sets#call-state); typically `created`). + + + + + + + + + + Fully-qualified event type (e.g. `"calling.call.state"`). + + + + + + Raw params dict from the RELAY notification. + + + + + + + + + + Server timestamp (epoch seconds) at which the event was emitted. + + +## Methods + +### constructor + +#### Signature + +```typescript +constructor( + eventType: string, + params: Record, + callId: string, + timestamp: number, + callState: CallState, + direction: string, + device: Record, + nodeId: string, + projectId: string, + context: string, + segmentId: string, + tag: string +): CallReceiveEvent +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`CallReceiveEvent` + +#### Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 141. + +*** + +### fromPayload + +Factory that builds a typed event from a raw `signalwire.event` payload. +Subclasses override this to populate their specialised fields; the base +implementation returns a minimal `RelayEvent` used as the fallback for +unrecognised event types. + +**Modifiers:** `static` + +#### Signature + +```typescript +fromPayload(payload: Record): CallReceiveEvent +``` + +#### Parameters + + + +#### Returns + +`CallReceiveEvent` + +#### Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 166. + +## Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 130. diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/call-state-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/call-state-event/index.mdx new file mode 100644 index 0000000000..d361764f68 --- /dev/null +++ b/fern/products/sdk-reference/typescript/relay/relay-event/call-state-event/index.mdx @@ -0,0 +1,139 @@ +--- +slug: "/reference/typescript/relay/relay-event/call-state-event" +title: "CallStateEvent" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "relay.RelayEvent.CallStateEvent" + parent: "relay.RelayEvent" + module: "relay.RelayEvent" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts" +--- +# `CallStateEvent` + +`calling.call.state` — fires on every lifecycle transition (created, ringing, answered, ending, ended). + +## Signature + +```typescript +class CallStateEvent extends RelayEvent +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) + +## Properties + + + Call ID associated with the event, or `""` for non-call events. + + + + The new call state — a [CallState](/docs/sdk-reference/reference/typescript/relay/closed-sets#call-state) (`created` | `ringing` | `answered` | `ending` | `ended`; closed literal union, autocompleted + typo-checked). Pass to `../relay/closedSets.isCallStateTerminal` to test for the terminal state. + + + + + + + + + + Fully-qualified event type (e.g. `"calling.call.state"`). + + + + Raw params dict from the RELAY notification. + + + + Server timestamp (epoch seconds) at which the event was emitted. + + +## Methods + +### constructor + +#### Signature + +```typescript +constructor( + eventType: string, + params: Record, + callId: string, + timestamp: number, + callState: CallState, + endReason: string, + direction: string, + device: Record +): CallStateEvent +``` + +#### Parameters + + + + + + + + + + + + + + + + + +#### Returns + +`CallStateEvent` + +#### Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 100. + +*** + +### fromPayload + +Factory that builds a typed event from a raw `signalwire.event` payload. +Subclasses override this to populate their specialised fields; the base +implementation returns a minimal `RelayEvent` used as the fallback for +unrecognised event types. + +**Modifiers:** `static` + +#### Signature + +```typescript +fromPayload(payload: Record): CallStateEvent +``` + +#### Parameters + + + +#### Returns + +`CallStateEvent` + +#### Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 117. + +## Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 88. diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/calling-error-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/calling-error-event/index.mdx new file mode 100644 index 0000000000..ad36c2e42a --- /dev/null +++ b/fern/products/sdk-reference/typescript/relay/relay-event/calling-error-event/index.mdx @@ -0,0 +1,127 @@ +--- +slug: "/reference/typescript/relay/relay-event/calling-error-event" +title: "CallingErrorEvent" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "relay.RelayEvent.CallingErrorEvent" + parent: "relay.RelayEvent" + module: "relay.RelayEvent" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts" +--- +# `CallingErrorEvent` + +`calling.error` — platform-emitted error against the calling namespace. + +## Signature + +```typescript +class CallingErrorEvent extends RelayEvent +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) + +## Properties + + + Call ID associated with the event, or `""` for non-call events. + + + + + + Fully-qualified event type (e.g. `"calling.call.state"`). + + + + + + Raw params dict from the RELAY notification. + + + + Server timestamp (epoch seconds) at which the event was emitted. + + +## Methods + +### constructor + +#### Signature + +```typescript +constructor( + eventType: string, + params: Record, + callId: string, + timestamp: number, + code: string, + message: string +): CallingErrorEvent +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`CallingErrorEvent` + +#### Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 774. + +*** + +### fromPayload + +Factory that builds a typed event from a raw `signalwire.event` payload. +Subclasses override this to populate their specialised fields; the base +implementation returns a minimal `RelayEvent` used as the fallback for +unrecognised event types. + +**Modifiers:** `static` + +#### Signature + +```typescript +fromPayload(payload: Record): CallingErrorEvent +``` + +#### Parameters + + + +#### Returns + +`CallingErrorEvent` + +#### Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 787. + +## Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 770. diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/collect-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/collect-event/index.mdx new file mode 100644 index 0000000000..8cd7237e20 --- /dev/null +++ b/fern/products/sdk-reference/typescript/relay/relay-event/collect-event/index.mdx @@ -0,0 +1,137 @@ +--- +slug: "/reference/typescript/relay/relay-event/collect-event" +title: "CollectEvent" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "relay.RelayEvent.CollectEvent" + parent: "relay.RelayEvent" + module: "relay.RelayEvent" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts" +--- +# `CollectEvent` + +`calling.call.collect` — caller input (DTMF or speech) collected by a collect action. + +## Signature + +```typescript +class CollectEvent extends RelayEvent +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) + +## Properties + + + Call ID associated with the event, or `""` for non-call events. + + + + + + Fully-qualified event type (e.g. `"calling.call.state"`). + + + + + + Raw params dict from the RELAY notification. + + + + + + + + Server timestamp (epoch seconds) at which the event was emitted. + + +## Methods + +### constructor + +#### Signature + +```typescript +constructor( + eventType: string, + params: Record, + callId: string, + timestamp: number, + controlId: string = '', + state: string = '', + result: Record = {}, + final_: boolean | undefined = undefined +): CollectEvent +``` + +#### Parameters + + + + + + + + + + + + + + + + + +#### Returns + +`CollectEvent` + +#### Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 262. + +*** + +### fromPayload + +Factory that builds a typed event from a raw `signalwire.event` payload. +Subclasses override this to populate their specialised fields; the base +implementation returns a minimal `RelayEvent` used as the fallback for +unrecognised event types. + +**Modifiers:** `static` + +#### Signature + +```typescript +fromPayload(payload: Record): CollectEvent +``` + +#### Parameters + + + +#### Returns + +`CollectEvent` + +#### Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 279. + +## Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 256. diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/conference-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/conference-event/index.mdx new file mode 100644 index 0000000000..62f5d76520 --- /dev/null +++ b/fern/products/sdk-reference/typescript/relay/relay-event/conference-event/index.mdx @@ -0,0 +1,132 @@ +--- +slug: "/reference/typescript/relay/relay-event/conference-event" +title: "ConferenceEvent" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "relay.RelayEvent.ConferenceEvent" + parent: "relay.RelayEvent" + module: "relay.RelayEvent" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts" +--- +# `ConferenceEvent` + +`calling.conference` — conference lifecycle change (created, active, ended). + +## Signature + +```typescript +class ConferenceEvent extends RelayEvent +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) + +## Properties + + + Call ID associated with the event, or `""` for non-call events. + + + + + + Fully-qualified event type (e.g. `"calling.call.state"`). + + + + + + Raw params dict from the RELAY notification. + + + + + + Server timestamp (epoch seconds) at which the event was emitted. + + +## Methods + +### constructor + +#### Signature + +```typescript +constructor( + eventType: string, + params: Record, + callId: string, + timestamp: number, + conferenceId: string, + name: string, + status: string +): ConferenceEvent +``` + +#### Parameters + + + + + + + + + + + + + + + +#### Returns + +`ConferenceEvent` + +#### Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 743. + +*** + +### fromPayload + +Factory that builds a typed event from a raw `signalwire.event` payload. +Subclasses override this to populate their specialised fields; the base +implementation returns a minimal `RelayEvent` used as the fallback for +unrecognised event types. + +**Modifiers:** `static` + +#### Signature + +```typescript +fromPayload(payload: Record): ConferenceEvent +``` + +#### Parameters + + + +#### Returns + +`ConferenceEvent` + +#### Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 758. + +## Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 738. diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/connect-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/connect-event/index.mdx new file mode 100644 index 0000000000..811948afa2 --- /dev/null +++ b/fern/products/sdk-reference/typescript/relay/relay-event/connect-event/index.mdx @@ -0,0 +1,127 @@ +--- +slug: "/reference/typescript/relay/relay-event/connect-event" +title: "ConnectEvent" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "relay.RelayEvent.ConnectEvent" + parent: "relay.RelayEvent" + module: "relay.RelayEvent" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts" +--- +# `ConnectEvent` + +`calling.call.connect` — state transition when one call connects to another (dialplan/bridge). + +## Signature + +```typescript +class ConnectEvent extends RelayEvent +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) + +## Properties + + + Call ID associated with the event, or `""` for non-call events. + + + + + + Fully-qualified event type (e.g. `"calling.call.state"`). + + + + Raw params dict from the RELAY notification. + + + + + + Server timestamp (epoch seconds) at which the event was emitted. + + +## Methods + +### constructor + +#### Signature + +```typescript +constructor( + eventType: string, + params: Record, + callId: string, + timestamp: number, + connectState: string, + peer: Record +): ConnectEvent +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`ConnectEvent` + +#### Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 296. + +*** + +### fromPayload + +Factory that builds a typed event from a raw `signalwire.event` payload. +Subclasses override this to populate their specialised fields; the base +implementation returns a minimal `RelayEvent` used as the fallback for +unrecognised event types. + +**Modifiers:** `static` + +#### Signature + +```typescript +fromPayload(payload: Record): ConnectEvent +``` + +#### Parameters + + + +#### Returns + +`ConnectEvent` + +#### Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 309. + +## Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 292. diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/denoise-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/denoise-event/index.mdx new file mode 100644 index 0000000000..52b4bf7ece --- /dev/null +++ b/fern/products/sdk-reference/typescript/relay/relay-event/denoise-event/index.mdx @@ -0,0 +1,122 @@ +--- +slug: "/reference/typescript/relay/relay-event/denoise-event" +title: "DenoiseEvent" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "relay.RelayEvent.DenoiseEvent" + parent: "relay.RelayEvent" + module: "relay.RelayEvent" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts" +--- +# `DenoiseEvent` + +`calling.call.denoise` — noise-reduction on/off confirmation. + +## Signature + +```typescript +class DenoiseEvent extends RelayEvent +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) + +## Properties + + + Call ID associated with the event, or `""` for non-call events. + + + + + + Fully-qualified event type (e.g. `"calling.call.state"`). + + + + Raw params dict from the RELAY notification. + + + + Server timestamp (epoch seconds) at which the event was emitted. + + +## Methods + +### constructor + +#### Signature + +```typescript +constructor( + eventType: string, + params: Record, + callId: string, + timestamp: number, + denoised: boolean +): DenoiseEvent +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`DenoiseEvent` + +#### Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 553. + +*** + +### fromPayload + +Factory that builds a typed event from a raw `signalwire.event` payload. +Subclasses override this to populate their specialised fields; the base +implementation returns a minimal `RelayEvent` used as the fallback for +unrecognised event types. + +**Modifiers:** `static` + +#### Signature + +```typescript +fromPayload(payload: Record): DenoiseEvent +``` + +#### Parameters + + + +#### Returns + +`DenoiseEvent` + +#### Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 564. + +## Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 550. diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/detect-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/detect-event/index.mdx new file mode 100644 index 0000000000..24a13c98b6 --- /dev/null +++ b/fern/products/sdk-reference/typescript/relay/relay-event/detect-event/index.mdx @@ -0,0 +1,127 @@ +--- +slug: "/reference/typescript/relay/relay-event/detect-event" +title: "DetectEvent" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "relay.RelayEvent.DetectEvent" + parent: "relay.RelayEvent" + module: "relay.RelayEvent" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts" +--- +# `DetectEvent` + +`calling.call.detect` — answering-machine / fax / DTMF detection result. + +## Signature + +```typescript +class DetectEvent extends RelayEvent +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) + +## Properties + + + Call ID associated with the event, or `""` for non-call events. + + + + + + + + Fully-qualified event type (e.g. `"calling.call.state"`). + + + + Raw params dict from the RELAY notification. + + + + Server timestamp (epoch seconds) at which the event was emitted. + + +## Methods + +### constructor + +#### Signature + +```typescript +constructor( + eventType: string, + params: Record, + callId: string, + timestamp: number, + controlId: string, + detect: Record +): DetectEvent +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`DetectEvent` + +#### Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 324. + +*** + +### fromPayload + +Factory that builds a typed event from a raw `signalwire.event` payload. +Subclasses override this to populate their specialised fields; the base +implementation returns a minimal `RelayEvent` used as the fallback for +unrecognised event types. + +**Modifiers:** `static` + +#### Signature + +```typescript +fromPayload(payload: Record): DetectEvent +``` + +#### Parameters + + + +#### Returns + +`DetectEvent` + +#### Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 337. + +## Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 320. diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/dial-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/dial-event/index.mdx new file mode 100644 index 0000000000..df99936b37 --- /dev/null +++ b/fern/products/sdk-reference/typescript/relay/relay-event/dial-event/index.mdx @@ -0,0 +1,134 @@ +--- +slug: "/reference/typescript/relay/relay-event/dial-event" +title: "DialEvent" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "relay.RelayEvent.DialEvent" + parent: "relay.RelayEvent" + module: "relay.RelayEvent" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts" +--- +# `DialEvent` + +`calling.call.dial` — outbound dial progress (answered, failed, no-answer, etc.). + +## Signature + +```typescript +class DialEvent extends RelayEvent +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) + +## Properties + + + + + Call ID associated with the event, or `""` for non-call events. + + + + Outbound-dial state — a [DialState](/docs/sdk-reference/reference/typescript/relay/closed-sets#dial-state) (`dialing` | `answered` | `failed`; closed literal union, autocompleted + typo-checked). Pass to `../relay/closedSets.isDialStateTerminal` to test for resolution. Distinct from a [CallState](/docs/sdk-reference/reference/typescript/relay/closed-sets#call-state). + + + + Fully-qualified event type (e.g. `"calling.call.state"`). + + + + Raw params dict from the RELAY notification. + + + + + + Server timestamp (epoch seconds) at which the event was emitted. + + +## Methods + +### constructor + +#### Signature + +```typescript +constructor( + eventType: string, + params: Record, + callId: string, + timestamp: number, + tag: string, + dialState: DialState, + call: Record +): DialEvent +``` + +#### Parameters + + + + + + + + + + + + + + + +#### Returns + +`DialEvent` + +#### Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 487. + +*** + +### fromPayload + +Factory that builds a typed event from a raw `signalwire.event` payload. +Subclasses override this to populate their specialised fields; the base +implementation returns a minimal `RelayEvent` used as the fallback for +unrecognised event types. + +**Modifiers:** `static` + +#### Signature + +```typescript +fromPayload(payload: Record): DialEvent +``` + +#### Parameters + + + +#### Returns + +`DialEvent` + +#### Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 502. + +## Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 476. diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/echo-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/echo-event/index.mdx new file mode 100644 index 0000000000..b430755eff --- /dev/null +++ b/fern/products/sdk-reference/typescript/relay/relay-event/echo-event/index.mdx @@ -0,0 +1,122 @@ +--- +slug: "/reference/typescript/relay/relay-event/echo-event" +title: "EchoEvent" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "relay.RelayEvent.EchoEvent" + parent: "relay.RelayEvent" + module: "relay.RelayEvent" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts" +--- +# `EchoEvent` + +`calling.call.echo` — test/diagnostic echo reflection from the server. + +## Signature + +```typescript +class EchoEvent extends RelayEvent +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) + +## Properties + + + Call ID associated with the event, or `""` for non-call events. + + + + Fully-qualified event type (e.g. `"calling.call.state"`). + + + + Raw params dict from the RELAY notification. + + + + + + Server timestamp (epoch seconds) at which the event was emitted. + + +## Methods + +### constructor + +#### Signature + +```typescript +constructor( + eventType: string, + params: Record, + callId: string, + timestamp: number, + state: string +): EchoEvent +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`EchoEvent` + +#### Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 649. + +*** + +### fromPayload + +Factory that builds a typed event from a raw `signalwire.event` payload. +Subclasses override this to populate their specialised fields; the base +implementation returns a minimal `RelayEvent` used as the fallback for +unrecognised event types. + +**Modifiers:** `static` + +#### Signature + +```typescript +fromPayload(payload: Record): EchoEvent +``` + +#### Parameters + + + +#### Returns + +`EchoEvent` + +#### Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 660. + +## Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 646. diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/fax-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/fax-event/index.mdx new file mode 100644 index 0000000000..6a671103d7 --- /dev/null +++ b/fern/products/sdk-reference/typescript/relay/relay-event/fax-event/index.mdx @@ -0,0 +1,127 @@ +--- +slug: "/reference/typescript/relay/relay-event/fax-event" +title: "FaxEvent" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "relay.RelayEvent.FaxEvent" + parent: "relay.RelayEvent" + module: "relay.RelayEvent" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts" +--- +# `FaxEvent` + +`calling.call.fax` — fax send/receive progress update. + +## Signature + +```typescript +class FaxEvent extends RelayEvent +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) + +## Properties + + + Call ID associated with the event, or `""` for non-call events. + + + + + + Fully-qualified event type (e.g. `"calling.call.state"`). + + + + + + Raw params dict from the RELAY notification. + + + + Server timestamp (epoch seconds) at which the event was emitted. + + +## Methods + +### constructor + +#### Signature + +```typescript +constructor( + eventType: string, + params: Record, + callId: string, + timestamp: number, + controlId: string, + fax: Record +): FaxEvent +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`FaxEvent` + +#### Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 352. + +*** + +### fromPayload + +Factory that builds a typed event from a raw `signalwire.event` payload. +Subclasses override this to populate their specialised fields; the base +implementation returns a minimal `RelayEvent` used as the fallback for +unrecognised event types. + +**Modifiers:** `static` + +#### Signature + +```typescript +fromPayload(payload: Record): FaxEvent +``` + +#### Parameters + + + +#### Returns + +`FaxEvent` + +#### Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 365. + +## Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 348. diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/from-payload.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/from-payload.mdx new file mode 100644 index 0000000000..e540a85041 --- /dev/null +++ b/fern/products/sdk-reference/typescript/relay/relay-event/from-payload.mdx @@ -0,0 +1,35 @@ +--- +slug: "/reference/typescript/relay/relay-event/from-payload" +title: "fromPayload" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "method" + language: "typescript" + qualified_name: "relay.RelayEvent.EventClass.fromPayload" + parent: "relay.RelayEvent.EventClass" + module: "relay.RelayEvent" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts" +--- +# `fromPayload` + +## Signature + +```typescript +fromPayload(payload: Record): RelayEvent +``` + +## Parameters + + + +## Returns + +`RelayEvent` + +## Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 934. diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/hold-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/hold-event/index.mdx new file mode 100644 index 0000000000..80c4860165 --- /dev/null +++ b/fern/products/sdk-reference/typescript/relay/relay-event/hold-event/index.mdx @@ -0,0 +1,122 @@ +--- +slug: "/reference/typescript/relay/relay-event/hold-event" +title: "HoldEvent" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "relay.RelayEvent.HoldEvent" + parent: "relay.RelayEvent" + module: "relay.RelayEvent" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts" +--- +# `HoldEvent` + +`calling.call.hold` — hold/unhold state change on the call. + +## Signature + +```typescript +class HoldEvent extends RelayEvent +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) + +## Properties + + + Call ID associated with the event, or `""` for non-call events. + + + + Fully-qualified event type (e.g. `"calling.call.state"`). + + + + Raw params dict from the RELAY notification. + + + + + + Server timestamp (epoch seconds) at which the event was emitted. + + +## Methods + +### constructor + +#### Signature + +```typescript +constructor( + eventType: string, + params: Record, + callId: string, + timestamp: number, + state: string +): HoldEvent +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`HoldEvent` + +#### Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 717. + +*** + +### fromPayload + +Factory that builds a typed event from a raw `signalwire.event` payload. +Subclasses override this to populate their specialised fields; the base +implementation returns a minimal `RelayEvent` used as the fallback for +unrecognised event types. + +**Modifiers:** `static` + +#### Signature + +```typescript +fromPayload(payload: Record): HoldEvent +``` + +#### Parameters + + + +#### Returns + +`HoldEvent` + +#### Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 728. + +## Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 714. diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/index.mdx new file mode 100644 index 0000000000..e42376db44 --- /dev/null +++ b/fern/products/sdk-reference/typescript/relay/relay-event/index.mdx @@ -0,0 +1,271 @@ +--- +slug: "/reference/typescript/relay/relay-event" +title: "RelayEvent" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "relay.RelayEvent" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts" +--- +# `RelayEvent` + +Base class for all typed RELAY events. + +Raw events arrive as `signalwire.event` JSON-RPC notifications; the client +looks up the correct subclass in [EVENT\_CLASS\_MAP](/docs/sdk-reference/reference/typescript/relay/relay-event#event-class-map) and invokes +[RelayEvent.fromPayload](/docs/sdk-reference/reference/typescript/relay/relay-event#from-payload) to build a typed wrapper. Handlers receive +this wrapper; they can always read the original dict from `params`. + +## Signature + +```typescript +class RelayEvent +``` + +## Properties + + + Call ID associated with the event, or `""` for non-call events. + + + + Fully-qualified event type (e.g. `"calling.call.state"`). + + + + Raw params dict from the RELAY notification. + + + + Server timestamp (epoch seconds) at which the event was emitted. + + +## Constants + + + Maps RELAY `event_type` strings to the typed event subclass that builds its wrapper. Used by [parseEvent](/docs/sdk-reference/reference/typescript/relay/relay-event#parse-event) to dispatch raw payloads. + + +## Classes + + + + `calling.error` — platform-emitted error against the calling namespace. + + + + `calling.call.receive` — fires when an inbound call arrives on a subscribed context. + + + + `calling.call.state` — fires on every lifecycle transition (created, ringing, answered, ending, ended). + + + + `calling.call.collect` — caller input (DTMF or speech) collected by a collect action. + + + + `calling.conference` — conference lifecycle change (created, active, ended). + + + + `calling.call.connect` — state transition when one call connects to another (dialplan/bridge). + + + + `calling.call.denoise` — noise-reduction on/off confirmation. + + + + `calling.call.detect` — answering-machine / fax / DTMF detection result. + + + + `calling.call.dial` — outbound dial progress (answered, failed, no-answer, etc.). + + + + `calling.call.echo` — test/diagnostic echo reflection from the server. + + + + `calling.call.fax` — fax send/receive progress update. + + + + `calling.call.hold` — hold/unhold state change on the call. + + + + `messaging.receive` — inbound SMS/MMS received on a subscribed context. + + + + `messaging.state` — state change for an outbound message (queued → sent → delivered/failed). + + + + `calling.call.pay` — PCI-compliant payment collection progress update. + + + + `calling.call.play` — play-media action state change (`playing`, `paused`, `finished`, `error`). + + + + `calling.call.queue` — call-queue position update (queued, waiting, member answered, timed out). + + + + `calling.call.record` — recording state change with final URL, duration, and size when finished. + + + + `calling.call.refer` — SIP REFER result (off-platform transfer response codes). + + + + `calling.call.send_digits` — progress update for DTMF digits sent out on a call. + + + + `calling.call.stream` — outbound media stream state change (e.g. RTMP/WebSocket streaming). + + + + `calling.call.tap` — media tap state change (audio mirror to an external endpoint). + + + + `calling.call.transcribe` — transcription state change and final URL/duration when finished. + + + +## Methods + +### constructor + +#### Signature + +```typescript +constructor( + eventType: string, + params: Record, + callId: string = '', + timestamp: number = 0 +): RelayEvent +``` + +#### Parameters + + + Fully-qualified event type. + + + + Raw event params dict. + + + + Call ID (if applicable). + + + + Server-side event timestamp. + + +#### Returns + +`RelayEvent` + +#### Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 42. + +*** + +### fromPayload + +Factory that builds a typed event from a raw `signalwire.event` payload. +Subclasses override this to populate their specialised fields; the base +implementation returns a minimal `RelayEvent` used as the fallback for +unrecognised event types. + +**Modifiers:** `static` + +#### Signature + +```typescript +fromPayload(payload: Record): RelayEvent +``` + +#### Parameters + + + +#### Returns + +`RelayEvent` + +#### Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 60. + +## Functions + +### parseEvent + +Parse a raw signalwire.event params dict into a typed event object. + +#### Signature + +```typescript +parseEvent(payload: Record): RelayEvent +``` + +#### Parameters + + + +#### Returns + +`RelayEvent` + +#### Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 967. + +## Type Aliases + +### EventClass + +Structural type for an event class that exposes a `fromPayload` factory. + +#### Signature + +```typescript +type EventClass = unknown +``` + +#### Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 934. + +## Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 26. diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/message-receive-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/message-receive-event/index.mdx new file mode 100644 index 0000000000..56956af447 --- /dev/null +++ b/fern/products/sdk-reference/typescript/relay/relay-event/message-receive-event/index.mdx @@ -0,0 +1,167 @@ +--- +slug: "/reference/typescript/relay/relay-event/message-receive-event" +title: "MessageReceiveEvent" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "relay.RelayEvent.MessageReceiveEvent" + parent: "relay.RelayEvent" + module: "relay.RelayEvent" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts" +--- +# `MessageReceiveEvent` + +`messaging.receive` — inbound SMS/MMS received on a subscribed context. + +## Signature + +```typescript +class MessageReceiveEvent extends RelayEvent +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) + +## Properties + + + + + Call ID associated with the event, or `""` for non-call events. + + + + + + + + Fully-qualified event type (e.g. `"calling.call.state"`). + + + + + + + + + + + + Raw params dict from the RELAY notification. + + + + + + + + Server timestamp (epoch seconds) at which the event was emitted. + + + + +## Methods + +### constructor + +#### Signature + +```typescript +constructor( + eventType: string, + params: Record, + callId: string, + timestamp: number, + messageId: string, + context: string, + direction: string, + fromNumber: string, + toNumber: string, + body: string, + media: string[], + segments: number, + messageState: string, + tags: string[] +): MessageReceiveEvent +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`MessageReceiveEvent` + +#### Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 812. + +*** + +### fromPayload + +Factory that builds a typed event from a raw `signalwire.event` payload. +Subclasses override this to populate their specialised fields; the base +implementation returns a minimal `RelayEvent` used as the fallback for +unrecognised event types. + +**Modifiers:** `static` + +#### Signature + +```typescript +fromPayload(payload: Record): MessageReceiveEvent +``` + +#### Parameters + + + +#### Returns + +`MessageReceiveEvent` + +#### Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 841. + +## Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 800. diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/message-state-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/message-state-event/index.mdx new file mode 100644 index 0000000000..89140613ea --- /dev/null +++ b/fern/products/sdk-reference/typescript/relay/relay-event/message-state-event/index.mdx @@ -0,0 +1,174 @@ +--- +slug: "/reference/typescript/relay/relay-event/message-state-event" +title: "MessageStateEvent" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "relay.RelayEvent.MessageStateEvent" + parent: "relay.RelayEvent" + module: "relay.RelayEvent" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts" +--- +# `MessageStateEvent` + +`messaging.state` — state change for an outbound message (queued → sent → delivered/failed). + +## Signature + +```typescript +class MessageStateEvent extends RelayEvent +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) + +## Properties + + + + + Call ID associated with the event, or `""` for non-call events. + + + + + + + + Fully-qualified event type (e.g. `"calling.call.state"`). + + + + + + + + + + Message lifecycle state — a [MessageState](/docs/sdk-reference/reference/typescript/relay/closed-sets#message-state) (`queued` | `initiated` | `sent` | `delivered` | `undelivered` | `failed` | `received`; closed literal union, autocompleted + typo-checked). Pass to `../relay/closedSets.isMessageStateTerminal` to test for a final delivery outcome. Distinct from a [CallState](/docs/sdk-reference/reference/typescript/relay/closed-sets#call-state) / [DialState](/docs/sdk-reference/reference/typescript/relay/closed-sets#dial-state). + + + + Raw params dict from the RELAY notification. + + + + + + + + + + Server timestamp (epoch seconds) at which the event was emitted. + + + + +## Methods + +### constructor + +#### Signature + +```typescript +constructor( + eventType: string, + params: Record, + callId: string, + timestamp: number, + messageId: string, + context: string, + direction: string, + fromNumber: string, + toNumber: string, + body: string, + media: string[], + segments: number, + messageState: MessageState, + reason: string, + tags: string[] +): MessageStateEvent +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`MessageStateEvent` + +#### Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 881. + +*** + +### fromPayload + +Factory that builds a typed event from a raw `signalwire.event` payload. +Subclasses override this to populate their specialised fields; the base +implementation returns a minimal `RelayEvent` used as the fallback for +unrecognised event types. + +**Modifiers:** `static` + +#### Signature + +```typescript +fromPayload(payload: Record): MessageStateEvent +``` + +#### Parameters + + + +#### Returns + +`MessageStateEvent` + +#### Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 912. + +## Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 860. diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/pay-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/pay-event/index.mdx new file mode 100644 index 0000000000..95cb88d6d1 --- /dev/null +++ b/fern/products/sdk-reference/typescript/relay/relay-event/pay-event/index.mdx @@ -0,0 +1,127 @@ +--- +slug: "/reference/typescript/relay/relay-event/pay-event" +title: "PayEvent" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "relay.RelayEvent.PayEvent" + parent: "relay.RelayEvent" + module: "relay.RelayEvent" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts" +--- +# `PayEvent` + +`calling.call.pay` — PCI-compliant payment collection progress update. + +## Signature + +```typescript +class PayEvent extends RelayEvent +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) + +## Properties + + + Call ID associated with the event, or `""` for non-call events. + + + + + + Fully-qualified event type (e.g. `"calling.call.state"`). + + + + Raw params dict from the RELAY notification. + + + + + + Server timestamp (epoch seconds) at which the event was emitted. + + +## Methods + +### constructor + +#### Signature + +```typescript +constructor( + eventType: string, + params: Record, + callId: string, + timestamp: number, + controlId: string, + state: string +): PayEvent +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`PayEvent` + +#### Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 578. + +*** + +### fromPayload + +Factory that builds a typed event from a raw `signalwire.event` payload. +Subclasses override this to populate their specialised fields; the base +implementation returns a minimal `RelayEvent` used as the fallback for +unrecognised event types. + +**Modifiers:** `static` + +#### Signature + +```typescript +fromPayload(payload: Record): PayEvent +``` + +#### Parameters + + + +#### Returns + +`PayEvent` + +#### Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 591. + +## Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 574. diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/play-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/play-event/index.mdx new file mode 100644 index 0000000000..049c1f3899 --- /dev/null +++ b/fern/products/sdk-reference/typescript/relay/relay-event/play-event/index.mdx @@ -0,0 +1,127 @@ +--- +slug: "/reference/typescript/relay/relay-event/play-event" +title: "PlayEvent" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "relay.RelayEvent.PlayEvent" + parent: "relay.RelayEvent" + module: "relay.RelayEvent" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts" +--- +# `PlayEvent` + +`calling.call.play` — play-media action state change (`playing`, `paused`, `finished`, `error`). + +## Signature + +```typescript +class PlayEvent extends RelayEvent +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) + +## Properties + + + Call ID associated with the event, or `""` for non-call events. + + + + + + Fully-qualified event type (e.g. `"calling.call.state"`). + + + + Raw params dict from the RELAY notification. + + + + + + Server timestamp (epoch seconds) at which the event was emitted. + + +## Methods + +### constructor + +#### Signature + +```typescript +constructor( + eventType: string, + params: Record, + callId: string, + timestamp: number, + controlId: string, + state: string +): PlayEvent +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`PlayEvent` + +#### Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 187. + +*** + +### fromPayload + +Factory that builds a typed event from a raw `signalwire.event` payload. +Subclasses override this to populate their specialised fields; the base +implementation returns a minimal `RelayEvent` used as the fallback for +unrecognised event types. + +**Modifiers:** `static` + +#### Signature + +```typescript +fromPayload(payload: Record): PlayEvent +``` + +#### Parameters + + + +#### Returns + +`PlayEvent` + +#### Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 200. + +## Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 183. diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/queue-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/queue-event/index.mdx new file mode 100644 index 0000000000..07ae78edc9 --- /dev/null +++ b/fern/products/sdk-reference/typescript/relay/relay-event/queue-event/index.mdx @@ -0,0 +1,147 @@ +--- +slug: "/reference/typescript/relay/relay-event/queue-event" +title: "QueueEvent" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "relay.RelayEvent.QueueEvent" + parent: "relay.RelayEvent" + module: "relay.RelayEvent" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts" +--- +# `QueueEvent` + +`calling.call.queue` — call-queue position update (queued, waiting, member answered, timed out). + +## Signature + +```typescript +class QueueEvent extends RelayEvent +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) + +## Properties + + + Call ID associated with the event, or `""` for non-call events. + + + + + + Fully-qualified event type (e.g. `"calling.call.state"`). + + + + Raw params dict from the RELAY notification. + + + + + + + + + + + + + + Server timestamp (epoch seconds) at which the event was emitted. + + +## Methods + +### constructor + +#### Signature + +```typescript +constructor( + eventType: string, + params: Record, + callId: string, + timestamp: number, + controlId: string, + status: string, + queueId: string, + queueName: string, + position: number, + size: number +): QueueEvent +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`QueueEvent` + +#### Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 610. + +*** + +### fromPayload + +Factory that builds a typed event from a raw `signalwire.event` payload. +Subclasses override this to populate their specialised fields; the base +implementation returns a minimal `RelayEvent` used as the fallback for +unrecognised event types. + +**Modifiers:** `static` + +#### Signature + +```typescript +fromPayload(payload: Record): QueueEvent +``` + +#### Parameters + + + +#### Returns + +`QueueEvent` + +#### Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 631. + +## Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 602. diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/record-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/record-event/index.mdx new file mode 100644 index 0000000000..f3cb4a2ba1 --- /dev/null +++ b/fern/products/sdk-reference/typescript/relay/relay-event/record-event/index.mdx @@ -0,0 +1,147 @@ +--- +slug: "/reference/typescript/relay/relay-event/record-event" +title: "RecordEvent" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "relay.RelayEvent.RecordEvent" + parent: "relay.RelayEvent" + module: "relay.RelayEvent" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts" +--- +# `RecordEvent` + +`calling.call.record` — recording state change with final URL, duration, and size when finished. + +## Signature + +```typescript +class RecordEvent extends RelayEvent +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) + +## Properties + + + Call ID associated with the event, or `""` for non-call events. + + + + + + + + Fully-qualified event type (e.g. `"calling.call.state"`). + + + + Raw params dict from the RELAY notification. + + + + + + + + + + Server timestamp (epoch seconds) at which the event was emitted. + + + + +## Methods + +### constructor + +#### Signature + +```typescript +constructor( + eventType: string, + params: Record, + callId: string, + timestamp: number, + controlId: string, + state: string, + url: string, + duration: number, + size: number, + record: Record +): RecordEvent +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`RecordEvent` + +#### Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 219. + +*** + +### fromPayload + +Factory that builds a typed event from a raw `signalwire.event` payload. +Subclasses override this to populate their specialised fields; the base +implementation returns a minimal `RelayEvent` used as the fallback for +unrecognised event types. + +**Modifiers:** `static` + +#### Signature + +```typescript +fromPayload(payload: Record): RecordEvent +``` + +#### Parameters + + + +#### Returns + +`RecordEvent` + +#### Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 240. + +## Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 211. diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/refer-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/refer-event/index.mdx new file mode 100644 index 0000000000..4263fea541 --- /dev/null +++ b/fern/products/sdk-reference/typescript/relay/relay-event/refer-event/index.mdx @@ -0,0 +1,137 @@ +--- +slug: "/reference/typescript/relay/relay-event/refer-event" +title: "ReferEvent" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "relay.RelayEvent.ReferEvent" + parent: "relay.RelayEvent" + module: "relay.RelayEvent" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts" +--- +# `ReferEvent` + +`calling.call.refer` — SIP REFER result (off-platform transfer response codes). + +## Signature + +```typescript +class ReferEvent extends RelayEvent +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) + +## Properties + + + Call ID associated with the event, or `""` for non-call events. + + + + Fully-qualified event type (e.g. `"calling.call.state"`). + + + + Raw params dict from the RELAY notification. + + + + + + + + + + + + Server timestamp (epoch seconds) at which the event was emitted. + + +## Methods + +### constructor + +#### Signature + +```typescript +constructor( + eventType: string, + params: Record, + callId: string, + timestamp: number, + state: string, + sipReferTo: string, + sipReferResponseCode: string, + sipNotifyResponseCode: string +): ReferEvent +``` + +#### Parameters + + + + + + + + + + + + + + + + + +#### Returns + +`ReferEvent` + +#### Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 520. + +*** + +### fromPayload + +Factory that builds a typed event from a raw `signalwire.event` payload. +Subclasses override this to populate their specialised fields; the base +implementation returns a minimal `RelayEvent` used as the fallback for +unrecognised event types. + +**Modifiers:** `static` + +#### Signature + +```typescript +fromPayload(payload: Record): ReferEvent +``` + +#### Parameters + + + +#### Returns + +`ReferEvent` + +#### Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 537. + +## Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 514. diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/send-digits-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/send-digits-event/index.mdx new file mode 100644 index 0000000000..dc2f8c0227 --- /dev/null +++ b/fern/products/sdk-reference/typescript/relay/relay-event/send-digits-event/index.mdx @@ -0,0 +1,127 @@ +--- +slug: "/reference/typescript/relay/relay-event/send-digits-event" +title: "SendDigitsEvent" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "relay.RelayEvent.SendDigitsEvent" + parent: "relay.RelayEvent" + module: "relay.RelayEvent" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts" +--- +# `SendDigitsEvent` + +`calling.call.send_digits` — progress update for DTMF digits sent out on a call. + +## Signature + +```typescript +class SendDigitsEvent extends RelayEvent +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) + +## Properties + + + Call ID associated with the event, or `""` for non-call events. + + + + + + Fully-qualified event type (e.g. `"calling.call.state"`). + + + + Raw params dict from the RELAY notification. + + + + + + Server timestamp (epoch seconds) at which the event was emitted. + + +## Methods + +### constructor + +#### Signature + +```typescript +constructor( + eventType: string, + params: Record, + callId: string, + timestamp: number, + controlId: string, + state: string +): SendDigitsEvent +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`SendDigitsEvent` + +#### Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 452. + +*** + +### fromPayload + +Factory that builds a typed event from a raw `signalwire.event` payload. +Subclasses override this to populate their specialised fields; the base +implementation returns a minimal `RelayEvent` used as the fallback for +unrecognised event types. + +**Modifiers:** `static` + +#### Signature + +```typescript +fromPayload(payload: Record): SendDigitsEvent +``` + +#### Parameters + + + +#### Returns + +`SendDigitsEvent` + +#### Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 465. + +## Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 448. diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/stream-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/stream-event/index.mdx new file mode 100644 index 0000000000..280cdca7c7 --- /dev/null +++ b/fern/products/sdk-reference/typescript/relay/relay-event/stream-event/index.mdx @@ -0,0 +1,137 @@ +--- +slug: "/reference/typescript/relay/relay-event/stream-event" +title: "StreamEvent" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "relay.RelayEvent.StreamEvent" + parent: "relay.RelayEvent" + module: "relay.RelayEvent" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts" +--- +# `StreamEvent` + +`calling.call.stream` — outbound media stream state change (e.g. RTMP/WebSocket streaming). + +## Signature + +```typescript +class StreamEvent extends RelayEvent +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) + +## Properties + + + Call ID associated with the event, or `""` for non-call events. + + + + + + Fully-qualified event type (e.g. `"calling.call.state"`). + + + + + + Raw params dict from the RELAY notification. + + + + + + Server timestamp (epoch seconds) at which the event was emitted. + + + + +## Methods + +### constructor + +#### Signature + +```typescript +constructor( + eventType: string, + params: Record, + callId: string, + timestamp: number, + controlId: string, + state: string, + url: string, + name: string +): StreamEvent +``` + +#### Parameters + + + + + + + + + + + + + + + + + +#### Returns + +`StreamEvent` + +#### Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 418. + +*** + +### fromPayload + +Factory that builds a typed event from a raw `signalwire.event` payload. +Subclasses override this to populate their specialised fields; the base +implementation returns a minimal `RelayEvent` used as the fallback for +unrecognised event types. + +**Modifiers:** `static` + +#### Signature + +```typescript +fromPayload(payload: Record): StreamEvent +``` + +#### Parameters + + + +#### Returns + +`StreamEvent` + +#### Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 435. + +## Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 412. diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/tap-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/tap-event/index.mdx new file mode 100644 index 0000000000..e457889149 --- /dev/null +++ b/fern/products/sdk-reference/typescript/relay/relay-event/tap-event/index.mdx @@ -0,0 +1,137 @@ +--- +slug: "/reference/typescript/relay/relay-event/tap-event" +title: "TapEvent" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "relay.RelayEvent.TapEvent" + parent: "relay.RelayEvent" + module: "relay.RelayEvent" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts" +--- +# `TapEvent` + +`calling.call.tap` — media tap state change (audio mirror to an external endpoint). + +## Signature + +```typescript +class TapEvent extends RelayEvent +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) + +## Properties + + + Call ID associated with the event, or `""` for non-call events. + + + + + + + + Fully-qualified event type (e.g. `"calling.call.state"`). + + + + Raw params dict from the RELAY notification. + + + + + + + + Server timestamp (epoch seconds) at which the event was emitted. + + +## Methods + +### constructor + +#### Signature + +```typescript +constructor( + eventType: string, + params: Record, + callId: string, + timestamp: number, + controlId: string, + state: string, + tap: Record, + device: Record +): TapEvent +``` + +#### Parameters + + + + + + + + + + + + + + + + + +#### Returns + +`TapEvent` + +#### Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 382. + +*** + +### fromPayload + +Factory that builds a typed event from a raw `signalwire.event` payload. +Subclasses override this to populate their specialised fields; the base +implementation returns a minimal `RelayEvent` used as the fallback for +unrecognised event types. + +**Modifiers:** `static` + +#### Signature + +```typescript +fromPayload(payload: Record): TapEvent +``` + +#### Parameters + + + +#### Returns + +`TapEvent` + +#### Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 399. + +## Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 376. diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/transcribe-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/transcribe-event/index.mdx new file mode 100644 index 0000000000..aaa6003e33 --- /dev/null +++ b/fern/products/sdk-reference/typescript/relay/relay-event/transcribe-event/index.mdx @@ -0,0 +1,147 @@ +--- +slug: "/reference/typescript/relay/relay-event/transcribe-event" +title: "TranscribeEvent" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "relay.RelayEvent.TranscribeEvent" + parent: "relay.RelayEvent" + module: "relay.RelayEvent" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts" +--- +# `TranscribeEvent` + +`calling.call.transcribe` — transcription state change and final URL/duration when finished. + +## Signature + +```typescript +class TranscribeEvent extends RelayEvent +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) + +## Properties + + + Call ID associated with the event, or `""` for non-call events. + + + + + + + + Fully-qualified event type (e.g. `"calling.call.state"`). + + + + Raw params dict from the RELAY notification. + + + + + + + + + + Server timestamp (epoch seconds) at which the event was emitted. + + + + +## Methods + +### constructor + +#### Signature + +```typescript +constructor( + eventType: string, + params: Record, + callId: string, + timestamp: number, + controlId: string, + state: string, + url: string, + recordingId: string, + duration: number, + size: number +): TranscribeEvent +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`TranscribeEvent` + +#### Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 678. + +*** + +### fromPayload + +Factory that builds a typed event from a raw `signalwire.event` payload. +Subclasses override this to populate their specialised fields; the base +implementation returns a minimal `RelayEvent` used as the fallback for +unrecognised event types. + +**Modifiers:** `static` + +#### Signature + +```typescript +fromPayload(payload: Record): TranscribeEvent +``` + +#### Parameters + + + +#### Returns + +`TranscribeEvent` + +#### Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 699. + +## Source + +[`src/relay/RelayEvent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts) + +Line 670. diff --git a/fern/products/sdk-reference/typescript/relay/types/index.mdx b/fern/products/sdk-reference/typescript/relay/types/index.mdx new file mode 100644 index 0000000000..98cf3e78c1 --- /dev/null +++ b/fern/products/sdk-reference/typescript/relay/types/index.mdx @@ -0,0 +1,476 @@ +--- +slug: "/reference/typescript/relay/types" +title: "types" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "relay.types" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/types.ts" +--- +# `types` + +## Signature + +```typescript +module types +``` + +## Type Aliases + +### CallHandler + +Handler for inbound calls. + +#### Signature + +```typescript +type CallHandler = (call: Call) => void | Promise +``` + +#### Source + +[`src/relay/types.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/types.ts) + +Line 60. + +*** + +### CompletedCallback + +Callback when an action or message completes. + +#### Signature + +```typescript +type CompletedCallback = (event: RelayEvent) => void | Promise +``` + +#### Source + +[`src/relay/types.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/types.ts) + +Line 69. + +*** + +### Device + +Any device specification. + +#### Signature + +```typescript +type Device = PhoneDevice | SipDevice | Record +``` + +#### Source + +[`src/relay/types.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/types.ts) + +Line 94. + +*** + +### EventHandler + +Handler for relay events. + +#### Signature + +```typescript +type EventHandler = (event: RelayEvent) => void | Promise +``` + +#### Source + +[`src/relay/types.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/types.ts) + +Line 66. + +*** + +### MessageHandler + +Handler for inbound messages. + +#### Signature + +```typescript +type MessageHandler = (message: Message) => void | Promise +``` + +#### Source + +[`src/relay/types.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/types.ts) + +Line 63. + +*** + +### PlayItem + +Play item: TTS, audio URL, ringtone, or silence. + +#### Signature + +```typescript +type PlayItem = { gender?: string; language?: string; text: string; type: "tts" } | { type: "audio"; url: string } | { duration?: number; name: string; type: "ringtone" } | { duration: number; type: "silence" } | Record +``` + +#### Source + +[`src/relay/types.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/types.ts) + +Line 123. + +## Interfaces + +### CollectConfig + +Collect input configuration. + +#### Signature + +```typescript +interface CollectConfig +``` + +#### Properties + + + Continuous mode? + + + + Collect digits. + + + + Initial timeout in seconds. + + + + Partial results? + + + + Collect speech. + + +#### Source + +[`src/relay/types.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/types.ts) + +Line 131. + +*** + +### DialOptions + +Options for the dial() method. + +#### Signature + +```typescript +interface DialOptions +``` + +#### Properties + + + Caller ID / from number. + + + + Maximum call duration in seconds. + + + + Timeout in seconds for the dial. + + +#### Source + +[`src/relay/types.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/types.ts) + +Line 97. + +*** + +### JsonRpcError + +JSON-RPC 2.0 error object. + +#### Signature + +```typescript +interface JsonRpcError +``` + +#### Properties + + + + + + + +#### Source + +[`src/relay/types.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/types.ts) + +Line 53. + +*** + +### JsonRpcRequest + +JSON-RPC 2.0 request. + +#### Signature + +```typescript +interface JsonRpcRequest +``` + +#### Properties + + + + + + + + + +#### Source + +[`src/relay/types.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/types.ts) + +Line 37. + +*** + +### JsonRpcResponse + +JSON-RPC 2.0 response (success). + +#### Signature + +```typescript +interface JsonRpcResponse +``` + +#### Properties + + + + + + + + + +#### Source + +[`src/relay/types.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/types.ts) + +Line 45. + +*** + +### PhoneDevice + +Phone device specification for dial/connect. + +#### Signature + +```typescript +interface PhoneDevice +``` + +#### Properties + + + + + + + + + + + + + + + +#### Source + +[`src/relay/types.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/types.ts) + +Line 72. + +*** + +### QueuedRequest + +Queued request waiting for reconnection. + +#### Signature + +```typescript +interface QueuedRequest +``` + +#### Properties + + + + + + + + + +#### Source + +[`src/relay/types.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/types.ts) + +Line 155. + +*** + +### RelayClientOptions + +Options for constructing a RelayClient. + +#### Signature + +```typescript +interface RelayClientOptions +``` + +#### Properties + + + Contexts (topics) to receive inbound calls/messages on. + + + + RELAY host. Defaults to relay.signalwire.com. + + + + JWT token for authentication. Defaults to env SIGNALWIRE\_JWT\_TOKEN. + + + + Maximum number of concurrent active calls. Defaults to env RELAY\_MAX\_ACTIVE\_CALLS or 1000. + + + + SignalWire project ID. Defaults to env SIGNALWIRE\_PROJECT\_ID. + + + + WebSocket scheme — `'wss'` (production, the default) or `'ws'` (loopback fixtures and local audit harnesses). Reads from `SIGNALWIRE_RELAY_SCHEME` if not explicitly set; defaults to `'wss'`. Production deployments should never pass `'ws'` — the value exists solely so the porting-sdk's `audit_relay_handshake.py` can drive the real client against a plain-WS loopback fixture without standing up TLS termination. + + + + SignalWire API token. Defaults to env SIGNALWIRE\_API\_TOKEN. + + +#### Source + +[`src/relay/types.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/types.ts) + +Line 10. + +*** + +### SendMessageOptions + +Options for the sendMessage() method. + +#### Signature + +```typescript +interface SendMessageOptions +``` + +#### Properties + + + Message body text. + + + + Context for the message. + + + + Sender phone number in E.164 format. + + + + Media URLs for MMS. + + + + Tags for the message. + + + + Destination phone number in E.164 format. + + +#### Source + +[`src/relay/types.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/types.ts) + +Line 107. + +*** + +### SipDevice + +SIP device specification for dial/connect. + +#### Signature + +```typescript +interface SipDevice +``` + +#### Properties + + + + + + + + + + + + + + + +#### Source + +[`src/relay/types.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/types.ts) + +Line 83. + +## Source + +[`src/relay/types.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/types.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/rest-client.mdx b/fern/products/sdk-reference/typescript/rest-client.mdx new file mode 100644 index 0000000000..bb89a12e5b --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest-client.mdx @@ -0,0 +1,70 @@ +--- +slug: "/reference/typescript/rest-client" +title: "restClient" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "function" + language: "typescript" + qualified_name: "restClient" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/index.ts" +--- +# `restClient` + +Construct a [RestClient](/docs/sdk-reference/reference/typescript/rest/rest-client) instance. + +Equivalent to Python's top-level `signalwire.RestClient(*args, **kwargs)` +factory — a thin wrapper that lazy-imports `signalwire.rest.RestClient` +and instantiates it. The TS class is also exported directly at module +scope (`new RestClient(...)`); this function provides parity with the +Python-style factory call. + +Note: TypeScript exports the class `RestClient` at the same name from +`./rest/index.js`. The function below is named `restClient` (camelCase) +to avoid shadowing the class. The audit adapter remaps the emitted +surface entry from `signalwire.rest_client` to `signalwire.RestClient` +via the FREE\_FN\_NAME\_OVERRIDES table in enumerate-signatures.ts. + +The signature accepts a positional `args` rest parameter and a trailing +`kwargs` record. This mirrors Python's `(*args, **kwargs)` shape so the +cross-language signature audit recognizes them as compatible. In +practice callers pass either the `kwargs` object alone or nothing. + +## Signature + +```typescript +restClient(args?: string[], kwargs?: Record): RestClient +``` + +## Parameters + + + Positional credentials (compat shim for ports that pass project/token/host positionally). Usually empty in TS. + + + + Keyword-style credentials. When omitted, reads `SIGNALWIRE_PROJECT_ID`, `SIGNALWIRE_API_TOKEN`, and `SIGNALWIRE_SPACE` from the environment. + + +## Returns + +`RestClient` — A new `_RestClient` instance bound to the supplied (or environment-derived) credentials. + +## Examples + +```typescript +import { restClient } from '@signalwire/sdk'; + +const client = restClient([], { project: 'p', token: 't', host: 'h.signalwire.com' }); +await client.compat.calls.list(); + +// Or using just the options form: +const env = restClient(); // reads env vars +``` + +## Source + +[`src/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/index.ts) + +Line 255. diff --git a/fern/products/sdk-reference/typescript/rest/base/base-resource/index.mdx b/fern/products/sdk-reference/typescript/rest/base/base-resource/index.mdx new file mode 100644 index 0000000000..4f4ce1bfeb --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/base/base-resource/index.mdx @@ -0,0 +1,64 @@ +--- +slug: "/reference/typescript/rest/base/base-resource" +title: "BaseResource" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "rest.base.BaseResource" + module: "rest.base" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/BaseResource.ts" +--- +# `BaseResource` + +Abstract base class for all REST resources. + +Every namespace resource (e.g. [PhoneNumbersResource](/docs/sdk-reference/reference/typescript/rest/namespaces/phone-numbers/phone-numbers-resource), [VideoRooms](/docs/sdk-reference/reference/typescript/rest/namespaces/video/video-rooms)) +extends this class to get a typed reference to the shared [HttpClient](/docs/sdk-reference/reference/typescript/rest/http-client) +and a small path-building helper. Not exported for direct use — subclass it. + +**Modifiers:** `abstract` + +## Signature + +```typescript +class BaseResource +``` + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient, basePath: string): BaseResource +``` + +#### Parameters + + + Shared HTTP client to issue requests through. + + + + Absolute path prefix (e.g. `'/api/relay/rest/phone_numbers'`). + + +#### Returns + +`BaseResource` + +#### Source + +[`src/rest/base/BaseResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/BaseResource.ts) + +Line 18. + +## Source + +[`src/rest/base/BaseResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/BaseResource.ts) + +Line 10. diff --git a/fern/products/sdk-reference/typescript/rest/base/crud-resource/index.mdx b/fern/products/sdk-reference/typescript/rest/base/crud-resource/index.mdx new file mode 100644 index 0000000000..b948091810 --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/base/crud-resource/index.mdx @@ -0,0 +1,269 @@ +--- +slug: "/reference/typescript/rest/base/crud-resource" +title: "CrudResource" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "rest.base.CrudResource" + module: "rest.base" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts" +--- +# `CrudResource` + +Generic CRUD resource with configurable update method. + +Provides `list()`, `create()`, `get()`, `update()`, and `delete()` out of the +box — most namespace resources extend this and narrow the generic types. +`_updateMethod` may be overridden to `'PUT'` for APIs that replace instead +of patch. + +## Signature + +```typescript +class CrudResource extends BaseResource +``` + +## Type Parameters + + + Type of the paginated list response. + + + + Type of a single resource item. + + + + Request body type for `create()`. + + + + Request body type for `update()`. + + +## Inheritance + +**Extends:** [BaseResource](/docs/sdk-reference/reference/typescript/rest/base/base-resource) + +## Methods + +### constructor + +#### Signature + +```typescript +constructor( + http: HttpClient, + basePath: string +): CrudResource +``` + +#### Type Parameters + + + Type of the paginated list response. + + + + Type of a single resource item. + + + + Request body type for `create()`. + + + + Request body type for `update()`. + + +#### Parameters + + + + + +#### Returns + +`CrudResource` + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 33. + +*** + +### create + +Create a new resource. + +#### Signature + +```typescript +create(body: TCreate): Promise +``` + +#### Parameters + + + Request body describing the resource to create. + + +#### Returns + +`Promise` — The newly-created resource. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 55. + +*** + +### delete + +Delete a resource by ID. + +#### Signature + +```typescript +delete(resourceId: string): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + +#### Returns + +`Promise` — The platform's delete response (often an empty body on success). + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 95. + +*** + +### get + +Fetch a single resource by ID. + +#### Signature + +```typescript +get(resourceId: string): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + +#### Returns + +`Promise` — The resource record. + +#### Throws + +- On any non-2xx HTTP response (including `404`). + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 66. + +*** + +### list + +List resources with optional query parameters. + +#### Signature + +```typescript +list(params?: QueryParams): Promise +``` + +#### Parameters + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — The paginated list response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 44. + +*** + +### update + +Update a resource by ID. + +Uses HTTP `PATCH` by default; subclasses may set `_updateMethod = 'PUT'` +when the remote API requires a full-replacement semantics. + +#### Signature + +```typescript +update(resourceId: string, body: TUpdate): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + + + Request body with updated fields. + + +#### Returns + +`Promise` — The updated resource. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 81. + +## Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 24. diff --git a/fern/products/sdk-reference/typescript/rest/base/crud-with-addresses/index.mdx b/fern/products/sdk-reference/typescript/rest/base/crud-with-addresses/index.mdx new file mode 100644 index 0000000000..383fd92ca3 --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/base/crud-with-addresses/index.mdx @@ -0,0 +1,285 @@ +--- +slug: "/reference/typescript/rest/base/crud-with-addresses" +title: "CrudWithAddresses" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "rest.base.CrudWithAddresses" + module: "rest.base" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudWithAddresses.ts" +--- +# `CrudWithAddresses` + +[CrudResource](/docs/sdk-reference/reference/typescript/rest/base/crud-resource) extended with a `listAddresses()` helper for resources that +have associated Address records (e.g. fabric resources). + +## Signature + +```typescript +class CrudWithAddresses extends CrudResource +``` + +## Type Parameters + + + + + + + + + +## Inheritance + +**Extends:** `CrudResource` + +## Methods + +### constructor + +#### Signature + +```typescript +constructor( + http: HttpClient, + basePath: string +): CrudWithAddresses +``` + +#### Type Parameters + + + + + + + + + +#### Parameters + + + + + +#### Returns + +`CrudWithAddresses` + +#### Source + +[`src/rest/base/CrudWithAddresses.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudWithAddresses.ts) + +Line 22. + +*** + +### create + +Create a new resource. + +#### Signature + +```typescript +create(body: TCreate): Promise +``` + +#### Parameters + + + Request body describing the resource to create. + + +#### Returns + +`Promise` — The newly-created resource. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 55. + +*** + +### delete + +Delete a resource by ID. + +#### Signature + +```typescript +delete(resourceId: string): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + +#### Returns + +`Promise` — The platform's delete response (often an empty body on success). + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 95. + +*** + +### get + +Fetch a single resource by ID. + +#### Signature + +```typescript +get(resourceId: string): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + +#### Returns + +`Promise` — The resource record. + +#### Throws + +- On any non-2xx HTTP response (including `404`). + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 66. + +*** + +### list + +List resources with optional query parameters. + +#### Signature + +```typescript +list(params?: QueryParams): Promise +``` + +#### Parameters + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — The paginated list response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 44. + +*** + +### listAddresses + +List addresses associated with a specific resource instance. + +#### Signature + +```typescript +listAddresses(resourceId: string, params?: QueryParams): Promise +``` + +#### Parameters + + + Unique identifier of the owning resource. + + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — A paginated list of addresses. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudWithAddresses.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudWithAddresses.ts) + +Line 34. + +*** + +### update + +Update a resource by ID. + +Uses HTTP `PATCH` by default; subclasses may set `_updateMethod = 'PUT'` +when the remote API requires a full-replacement semantics. + +#### Signature + +```typescript +update(resourceId: string, body: TUpdate): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + + + Request body with updated fields. + + +#### Returns + +`Promise` — The updated resource. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 81. + +## Source + +[`src/rest/base/CrudWithAddresses.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudWithAddresses.ts) + +Line 15. diff --git a/fern/products/sdk-reference/typescript/rest/call-handler/index.mdx b/fern/products/sdk-reference/typescript/rest/call-handler/index.mdx new file mode 100644 index 0000000000..384f1c5e3c --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/call-handler/index.mdx @@ -0,0 +1,50 @@ +--- +slug: "/reference/typescript/rest/call-handler" +title: "callHandler" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "rest.callHandler" + module: "rest" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/callHandler.ts" +--- +# `callHandler` + +## Signature + +```typescript +module callHandler +``` + +## Constants + + + PhoneCallHandler — enum of `call_handler` values accepted by [PhoneNumbersResource.update](/docs/sdk-reference/reference/typescript/rest/namespaces/phone-numbers/phone-numbers-resource#update). Named `PhoneCallHandler` (not `CallHandler`) to avoid colliding with the RELAY client's inbound-call-handler callback type already exported from `src/relay/types.ts`. Setting a phone number's `call_handler` + the handler-specific companion field routes inbound calls and auto-materializes the matching Fabric resource on the server. See the high-level helpers on [PhoneNumbersResource](/docs/sdk-reference/reference/typescript/rest/namespaces/phone-numbers/phone-numbers-resource) (`setSwmlWebhook`, `setCxmlWebhook`, `setCxmlApplication`, `setAiAgent`, `setCallFlow`, `setRelayApplication`, `setRelayTopic`). | Member | Wire value | Companion field | Auto-creates Fabric resource | |---|---|---|---| | `RELAY_SCRIPT` | `relay_script` | `call_relay_script_url` | `swml_webhook` | | `LAML_WEBHOOKS` | `laml_webhooks` | `call_request_url` | `cxml_webhook` | | `LAML_APPLICATION` | `laml_application` | `call_laml_application_id` | `cxml_application` | | `AI_AGENT` | `ai_agent` | `call_ai_agent_id` | `ai_agent` | | `CALL_FLOW` | `call_flow` | `call_flow_id` | `call_flow` | | `RELAY_APPLICATION` | `relay_application` | `call_relay_application` | `relay_application` | | `RELAY_TOPIC` | `relay_topic` | `call_relay_topic` | _(routes via RELAY)_ | | `RELAY_CONTEXT` | `relay_context` | `call_relay_context` | _(legacy, prefer topic)_ | | `RELAY_CONNECTOR` | `relay_connector` | _(connector config)_ | _(internal)_ | | `VIDEO_ROOM` | `video_room` | `call_video_room_id` | _(routes to Video API)_ | | `DIALOGFLOW` | `dialogflow` | `call_dialogflow_agent_id` | _(none)_ | Note: `LAML_WEBHOOKS` (wire value `laml_webhooks`) produces a **cXML** handler, not a generic webhook. For SWML, use `RELAY_SCRIPT`. + + +## Type Aliases + +### PhoneCallHandler + +Union of every valid `call_handler` wire value. + +#### Signature + +```typescript +type PhoneCallHandler = typeof PhoneCallHandler[keyof typeof PhoneCallHandler] +``` + +#### Source + +[`src/rest/callHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/callHandler.ts) + +Line 46. + +## Source + +[`src/rest/callHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/callHandler.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/rest/http-client/index.mdx b/fern/products/sdk-reference/typescript/rest/http-client/index.mdx new file mode 100644 index 0000000000..8c657e796b --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/http-client/index.mdx @@ -0,0 +1,280 @@ +--- +slug: "/reference/typescript/rest/http-client" +title: "HttpClient" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "rest.HttpClient" + module: "rest" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/HttpClient.ts" +--- +# `HttpClient` + +Low-level HTTP client used by every REST namespace resource. + +Handles Basic Auth, JSON encoding/decoding, and error normalisation +([RestError](/docs/sdk-reference/reference/typescript/rest/rest-error) on non-2xx). Normally you do not instantiate this +directly — construct a [RestClient](/docs/sdk-reference/reference/typescript/rest/rest-client) instead. + +## Signature + +```typescript +class HttpClient +``` + +## Properties + + + Fully-qualified base URL (no trailing slash). + + +## Methods + +### constructor + +Build a new HTTP client. + +#### Signature + +```typescript +constructor(options: HttpClientOptions): HttpClient +``` + +#### Parameters + + + Connection options. Either `host` (bare hostname; `https://` is prepended automatically) or `baseUrl` (fully-qualified) must be provided along with `project` + `token`. + + +#### Returns + +`HttpClient` + +#### Throws + +- When neither `host` nor `baseUrl` is supplied. + +#### Source + +[`src/rest/HttpClient.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/HttpClient.ts) + +Line 37. + +*** + +### delete + +Perform an authenticated HTTP DELETE and return the parsed JSON response. + +#### Signature + +```typescript +delete(path: string): Promise +``` + +#### Type Parameters + + + Expected response body type. + + +#### Parameters + + + Absolute URL or path relative to [HttpClient.baseUrl](/docs/sdk-reference/reference/typescript/rest/http-client#base-url). + + +#### Returns + +`Promise` — The parsed JSON body, or `{}` on `204 No Content`. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/HttpClient.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/HttpClient.ts) + +Line 161. + +*** + +### get + +Perform an authenticated HTTP GET and return the parsed JSON response. + +#### Signature + +```typescript +get(path: string, params?: QueryParams): Promise +``` + +#### Type Parameters + + + Expected response body type. + + +#### Parameters + + + Absolute URL or path relative to [HttpClient.baseUrl](/docs/sdk-reference/reference/typescript/rest/http-client#base-url). + + + + Optional query parameters; `undefined` values are skipped. + + +#### Returns + +`Promise` — The parsed JSON body, or `{}` on `204 No Content`. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/HttpClient.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/HttpClient.ts) + +Line 109. + +*** + +### patch + +Perform an authenticated HTTP PATCH and return the parsed JSON response. + +#### Signature + +```typescript +patch(path: string, body?: any): Promise +``` + +#### Type Parameters + + + Expected response body type. + + +#### Parameters + + + Absolute URL or path relative to [HttpClient.baseUrl](/docs/sdk-reference/reference/typescript/rest/http-client#base-url). + + + + JSON-serialisable partial request body. + + +#### Returns + +`Promise` — The parsed JSON body, or `{}` on `204 No Content`. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/HttpClient.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/HttpClient.ts) + +Line 149. + +*** + +### post + +Perform an authenticated HTTP POST and return the parsed JSON response. + +#### Signature + +```typescript +post(path: string, body?: any, params?: QueryParams): Promise +``` + +#### Type Parameters + + + Expected response body type. + + +#### Parameters + + + Absolute URL or path relative to [HttpClient.baseUrl](/docs/sdk-reference/reference/typescript/rest/http-client#base-url). + + + + JSON-serialisable request body. Omit to send no body. + + + + Optional query parameters appended to the URL. + + +#### Returns + +`Promise` — The parsed JSON body, or `{}` on `204 No Content`. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/HttpClient.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/HttpClient.ts) + +Line 123. + +*** + +### put + +Perform an authenticated HTTP PUT and return the parsed JSON response. + +#### Signature + +```typescript +put(path: string, body?: any): Promise +``` + +#### Type Parameters + + + Expected response body type. + + +#### Parameters + + + Absolute URL or path relative to [HttpClient.baseUrl](/docs/sdk-reference/reference/typescript/rest/http-client#base-url). + + + + JSON-serialisable request body. + + +#### Returns + +`Promise` — The parsed JSON body, or `{}` on `204 No Content`. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/HttpClient.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/HttpClient.ts) + +Line 136. + +## Source + +[`src/rest/HttpClient.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/HttpClient.ts) + +Line 23. diff --git a/fern/products/sdk-reference/typescript/rest/index.mdx b/fern/products/sdk-reference/typescript/rest/index.mdx new file mode 100644 index 0000000000..1170cd9523 --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/index.mdx @@ -0,0 +1,33 @@ +--- +slug: "/reference/typescript/rest" +title: "rest" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "rest" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/index.ts" +--- +# `rest` + +## Signature + +```typescript +module rest +``` + +## Classes + + + + REST client for the SignalWire platform APIs. + + + +## Source + +[`src/rest/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/index.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/addresses/addresses-resource/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/addresses/addresses-resource/index.mdx new file mode 100644 index 0000000000..38ddfc7c57 --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/addresses/addresses-resource/index.mdx @@ -0,0 +1,187 @@ +--- +slug: "/reference/typescript/rest/namespaces/addresses/addresses-resource" +title: "AddressesResource" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "rest.namespaces.addresses.AddressesResource" + parent: "rest.namespaces.addresses" + module: "rest.namespaces.addresses" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/addresses.ts" +--- +# `AddressesResource` + +Address management (no update endpoint). + +Access via `client.addresses.*`. + +## Signature + +```typescript +class AddressesResource extends BaseResource +``` + +## Inheritance + +**Extends:** [BaseResource](/docs/sdk-reference/reference/typescript/rest/base/base-resource) + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient): AddressesResource +``` + +#### Parameters + + + +#### Returns + +`AddressesResource` + +#### Source + +[`src/rest/namespaces/addresses.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/addresses.ts) + +Line 17. + +*** + +### create + +Create a new address. + +#### Signature + +```typescript +create(body: any): Promise +``` + +#### Parameters + + + Address attributes (name, display name, context, etc.). + + +#### Returns + +`Promise` — The newly-created address. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/addresses.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/addresses.ts) + +Line 39. + +*** + +### delete + +Delete an address. + +#### Signature + +```typescript +delete(addressId: string): Promise +``` + +#### Parameters + + + Unique identifier of the address. + + +#### Returns + +`Promise` — The platform's delete response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/addresses.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/addresses.ts) + +Line 61. + +*** + +### get + +Fetch a single address by ID. + +#### Signature + +```typescript +get(addressId: string): Promise +``` + +#### Parameters + + + Unique identifier of the address. + + +#### Returns + +`Promise` — The address record. + +#### Throws + +- On any non-2xx HTTP response (including `404`). + +#### Source + +[`src/rest/namespaces/addresses.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/addresses.ts) + +Line 50. + +*** + +### list + +List all addresses in the project. + +#### Signature + +```typescript +list(params?: QueryParams): Promise +``` + +#### Parameters + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — A paginated list of addresses. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/addresses.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/addresses.ts) + +Line 28. + +## Source + +[`src/rest/namespaces/addresses.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/addresses.ts) + +Line 16. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/addresses/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/addresses/index.mdx new file mode 100644 index 0000000000..cf607a11c6 --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/addresses/index.mdx @@ -0,0 +1,34 @@ +--- +slug: "/reference/typescript/rest/namespaces/addresses" +title: "addresses" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "rest.namespaces.addresses" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/addresses.ts" +--- +# `addresses` + +## Signature + +```typescript +module addresses +``` + +## Classes + + + + Address management (no update endpoint). + + + +## Source + +[`src/rest/namespaces/addresses.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/addresses.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/calling/calling-namespace/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/calling/calling-namespace/index.mdx new file mode 100644 index 0000000000..458345ec4a --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/calling/calling-namespace/index.mdx @@ -0,0 +1,1414 @@ +--- +slug: "/reference/typescript/rest/namespaces/calling/calling-namespace" +title: "CallingNamespace" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "rest.namespaces.calling.CallingNamespace" + parent: "rest.namespaces.calling" + module: "rest.namespaces.calling" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts" +--- +# `CallingNamespace` + +REST call control — all 37 commands dispatched via a single POST endpoint. + +Access via `client.calling.*`. Every method issues one command against a live +call by ID and returns the platform's JSON response. + +Every command method shares the same shape: + +- First argument (when present) is the target call's ID. +- Second argument is a platform-shaped `params` object — see the + [Calling API reference](https://developer.signalwire.com/rest/signalwire-rest/endpoints/calling/) + for the fields each command accepts. +- The method returns the JSON-decoded platform response. +- Throws [RestError](/docs/sdk-reference/reference/typescript/rest/rest-error) on any non-2xx HTTP response. + +## Signature + +```typescript +class CallingNamespace extends BaseResource +``` + +## Inheritance + +**Extends:** [BaseResource](/docs/sdk-reference/reference/typescript/rest/base/base-resource) + +## Examples + + + + ```typescript + await client.calling.play(callId, { + play: [{ type: 'audio', url: 'https://cdn.example.com/hold.mp3' }], + }); + ``` + + + + ```typescript + const rec = await client.calling.record(callId, { record: { audio: {} } }); + // ... later ... + await client.calling.recordStop(callId, { control_id: rec.control_id }); + ``` + + + +## Methods + +### aiHold + +Put the AI session on hold (pause turn-taking). + +#### Signature + +```typescript +aiHold(callId: string, params: any = {}): Promise +``` + +#### Parameters + + + Target call's ID. + + + + Platform-shaped parameters. Defaults to `{}`. + + +#### Returns + +`Promise` — The platform's response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 424. + +*** + +### aiMessage + +Send a message into an active AI agent session. + +#### Signature + +```typescript +aiMessage(callId: string, params: any = {}): Promise +``` + +#### Parameters + + + Target call's ID. + + + + AI message payload. Defaults to `{}`. + + +#### Returns + +`Promise` — The platform's response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 412. + +*** + +### aiStop + +Terminate the active AI session on a call. + +#### Signature + +```typescript +aiStop(callId: string, params: any = {}): Promise +``` + +#### Parameters + + + Target call's ID. + + + + Platform-shaped parameters. Defaults to `{}`. + + +#### Returns + +`Promise` — The platform's response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 448. + +*** + +### aiUnhold + +Resume an AI session that was on hold. + +#### Signature + +```typescript +aiUnhold(callId: string, params: any = {}): Promise +``` + +#### Parameters + + + Target call's ID. + + + + Platform-shaped parameters. Defaults to `{}`. + + +#### Returns + +`Promise` — The platform's response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 436. + +*** + +### collect + +Collect DTMF / speech input from the caller. + +#### Signature + +```typescript +collect(callId: string, params: any = {}): Promise +``` + +#### Parameters + + + Target call's ID. + + + + Collect configuration (`digits`, `speech`, timeouts, etc.). Defaults to `{}`. + + +#### Returns + +`Promise` — The collect command response containing a `control_id`. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 242. + +*** + +### collectStartInputTimers + +Start input timers for a collect operation (useful when `initial_timeout` +should be reset after media finishes playing). + +#### Signature + +```typescript +collectStartInputTimers(callId: string, params: any = {}): Promise +``` + +#### Parameters + + + Target call's ID. + + + + Must include `control_id`. Defaults to `{}`. + + +#### Returns + +`Promise` — The platform's response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 267. + +*** + +### collectStop + +Stop an in-progress collect operation. + +#### Signature + +```typescript +collectStop(callId: string, params: any = {}): Promise +``` + +#### Parameters + + + Target call's ID. + + + + Must include `control_id`. Defaults to `{}`. + + +#### Returns + +`Promise` — The platform's response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 254. + +*** + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient): CallingNamespace +``` + +#### Parameters + + + +#### Returns + +`CallingNamespace` + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 42. + +*** + +### denoise + +Enable noise reduction on the call. + +#### Signature + +```typescript +denoise(callId: string, params: any = {}): Promise +``` + +#### Parameters + + + Target call's ID. + + + + Denoise configuration. Defaults to `{}`. + + +#### Returns + +`Promise` — The platform's response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 360. + +*** + +### denoiseStop + +Disable noise reduction. + +#### Signature + +```typescript +denoiseStop(callId: string, params: any = {}): Promise +``` + +#### Parameters + + + Target call's ID. + + + + Platform-shaped parameters. Defaults to `{}`. + + +#### Returns + +`Promise` — The platform's response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 372. + +*** + +### detect + +Run answering-machine / fax / DTMF detection. + +#### Signature + +```typescript +detect(callId: string, params: any = {}): Promise +``` + +#### Parameters + + + Target call's ID. + + + + Detect configuration. Defaults to `{}`. + + +#### Returns + +`Promise` — The detect command response containing a `control_id`. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 281. + +*** + +### detectStop + +Stop an active detect operation. + +#### Signature + +```typescript +detectStop(callId: string, params: any = {}): Promise +``` + +#### Parameters + + + Target call's ID. + + + + Must include `control_id`. Defaults to `{}`. + + +#### Returns + +`Promise` — The platform's response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 293. + +*** + +### dial + +Place an outbound call. + +#### Signature + +```typescript +dial(params: any = {}): Promise +``` + +#### Parameters + + + Platform-shaped dial parameters (from, to, timeout, etc.). Defaults to `{}`. + + +#### Returns + +`Promise` — The dial command response, typically containing a new `call_id`. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 64. + +*** + +### disconnect + +Drop one leg from a call without ending the other. + +#### Signature + +```typescript +disconnect(callId: string, params: any = {}): Promise +``` + +#### Parameters + + + Target call's ID. + + + + Platform-shaped disconnect parameters. Defaults to `{}`. + + +#### Returns + +`Promise` — The platform's response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 112. + +*** + +### end + +Gracefully end a call. + +#### Signature + +```typescript +end(callId: string, params: any = {}): Promise +``` + +#### Parameters + + + Target call's ID. + + + + Platform-shaped end parameters. Defaults to `{}`. + + +#### Returns + +`Promise` — The platform's response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 87. + +*** + +### liveTranscribe + +Start live transcription that emits events as speech is recognised. + +#### Signature + +```typescript +liveTranscribe(callId: string, params: any = {}): Promise +``` + +#### Parameters + + + Target call's ID. + + + + Configuration (languages, model, partials, etc.). Defaults to `{}`. + + +#### Returns + +`Promise` — The platform's response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 463. + +*** + +### liveTranslate + +Start live translation between two languages. + +#### Signature + +```typescript +liveTranslate(callId: string, params: any = {}): Promise +``` + +#### Parameters + + + Target call's ID. + + + + Configuration (`source_lang`, `target_lang`, etc.). Defaults to `{}`. + + +#### Returns + +`Promise` — The platform's response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 476. + +*** + +### play + +Start media playback on a call. + +#### Signature + +```typescript +play(callId: string, params: any = {}): Promise +``` + +#### Parameters + + + Target call's ID. + + + + Playback parameters — see `Play` action schema. Defaults to `{}`. + + +#### Returns + +`Promise` — The play command response, containing a `control_id` used to pause / resume / stop the playback later. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 127. + +*** + +### playPause + +Pause active playback. + +#### Signature + +```typescript +playPause(callId: string, params: any = {}): Promise +``` + +#### Parameters + + + Target call's ID. + + + + Must include `control_id` from the matching `play()` call. Defaults to `{}`. + + +#### Returns + +`Promise` — The platform's response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 140. + +*** + +### playResume + +Resume paused playback. + +#### Signature + +```typescript +playResume(callId: string, params: any = {}): Promise +``` + +#### Parameters + + + Target call's ID. + + + + Must include `control_id`. Defaults to `{}`. + + +#### Returns + +`Promise` — The platform's response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 152. + +*** + +### playStop + +Stop active playback. + +#### Signature + +```typescript +playStop(callId: string, params: any = {}): Promise +``` + +#### Parameters + + + Target call's ID. + + + + Must include `control_id`. Defaults to `{}`. + + +#### Returns + +`Promise` — The platform's response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 164. + +*** + +### playVolume + +Adjust the playback volume. + +#### Signature + +```typescript +playVolume(callId: string, params: any = {}): Promise +``` + +#### Parameters + + + Target call's ID. + + + + `control_id` plus `volume` (integer dB). Defaults to `{}`. + + +#### Returns + +`Promise` — The platform's response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 176. + +*** + +### receiveFaxStop + +Stop a receive-fax operation mid-stream. + +#### Signature + +```typescript +receiveFaxStop(callId: string, params: any = {}): Promise +``` + +#### Parameters + + + Target call's ID. + + + + Must include `control_id`. Defaults to `{}`. + + +#### Returns + +`Promise` — The platform's response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 502. + +*** + +### record + +Start recording a call. + +#### Signature + +```typescript +record(callId: string, params: any = {}): Promise +``` + +#### Parameters + + + Target call's ID. + + + + Recording parameters (`record` config, callbacks, etc.). Defaults to `{}`. + + +#### Returns + +`Promise` — The record command response containing a `control_id`. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 191. + +*** + +### recordPause + +Pause an active recording. + +#### Signature + +```typescript +recordPause(callId: string, params: any = {}): Promise +``` + +#### Parameters + + + Target call's ID. + + + + Must include `control_id`. Defaults to `{}`. + + +#### Returns + +`Promise` — The platform's response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 203. + +*** + +### recordResume + +Resume a paused recording. + +#### Signature + +```typescript +recordResume(callId: string, params: any = {}): Promise +``` + +#### Parameters + + + Target call's ID. + + + + Must include `control_id`. Defaults to `{}`. + + +#### Returns + +`Promise` — The platform's response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 215. + +*** + +### recordStop + +Stop and finalise a recording. + +#### Signature + +```typescript +recordStop(callId: string, params: any = {}): Promise +``` + +#### Parameters + + + Target call's ID. + + + + Must include `control_id`. Defaults to `{}`. + + +#### Returns + +`Promise` — The final recording metadata. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 227. + +*** + +### refer + +Send a SIP REFER to transfer a call outside the platform. + +#### Signature + +```typescript +refer(callId: string, params: any = {}): Promise +``` + +#### Parameters + + + Target call's ID. + + + + REFER parameters (`refer_to`, etc.). Defaults to `{}`. + + +#### Returns + +`Promise` — The platform's response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 516. + +*** + +### sendFaxStop + +Stop a send-fax operation mid-stream. + +#### Signature + +```typescript +sendFaxStop(callId: string, params: any = {}): Promise +``` + +#### Parameters + + + Target call's ID. + + + + Must include `control_id`. Defaults to `{}`. + + +#### Returns + +`Promise` — The platform's response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 490. + +*** + +### stream + +Start an outbound media stream (typically to a WebSocket endpoint). + +#### Signature + +```typescript +stream(callId: string, params: any = {}): Promise +``` + +#### Parameters + + + Target call's ID. + + + + Stream configuration. Defaults to `{}`. + + +#### Returns + +`Promise` — The stream command response containing a `control_id`. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 334. + +*** + +### streamStop + +Stop an outbound media stream. + +#### Signature + +```typescript +streamStop(callId: string, params: any = {}): Promise +``` + +#### Parameters + + + Target call's ID. + + + + Must include `control_id`. Defaults to `{}`. + + +#### Returns + +`Promise` — The platform's response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 346. + +*** + +### tap + +Start a media tap (mirror audio to an external URI). + +#### Signature + +```typescript +tap(callId: string, params: any = {}): Promise +``` + +#### Parameters + + + Target call's ID. + + + + Tap configuration (`uri`, `direction`, `codec`, etc.). Defaults to `{}`. + + +#### Returns + +`Promise` — The tap command response containing a `control_id`. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 308. + +*** + +### tapStop + +Stop an active media tap. + +#### Signature + +```typescript +tapStop(callId: string, params: any = {}): Promise +``` + +#### Parameters + + + Target call's ID. + + + + Must include `control_id`. Defaults to `{}`. + + +#### Returns + +`Promise` — The platform's response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 320. + +*** + +### transcribe + +Start real-time transcription on the call. + +#### Signature + +```typescript +transcribe(callId: string, params: any = {}): Promise +``` + +#### Parameters + + + Target call's ID. + + + + Transcription configuration. Defaults to `{}`. + + +#### Returns + +`Promise` — The transcribe command response containing a `control_id`. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 386. + +*** + +### transcribeStop + +Stop real-time transcription. + +#### Signature + +```typescript +transcribeStop(callId: string, params: any = {}): Promise +``` + +#### Parameters + + + Target call's ID. + + + + Must include `control_id`. Defaults to `{}`. + + +#### Returns + +`Promise` — The final transcription metadata. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 398. + +*** + +### transfer + +Transfer a call to another destination. + +#### Signature + +```typescript +transfer(callId: string, params: any = {}): Promise +``` + +#### Parameters + + + Target call's ID. + + + + Platform-shaped transfer parameters (`to`, `from`, etc.). Defaults to `{}`. + + +#### Returns + +`Promise` — The platform's response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 100. + +*** + +### update + +Update properties on an in-progress call. + +#### Signature + +```typescript +update(params: any = {}): Promise +``` + +#### Parameters + + + Platform-shaped update parameters. Defaults to `{}`. + + +#### Returns + +`Promise` — The platform's response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 75. + +*** + +### userEvent + +Emit a custom user event on the call for your webhooks. + +#### Signature + +```typescript +userEvent(callId: string, params: any = {}): Promise +``` + +#### Parameters + + + Target call's ID. + + + + Event payload — freeform data delivered to your webhook. Defaults to `{}`. + + +#### Returns + +`Promise` — The platform's response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 531. + +## Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 41. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/calling/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/calling/index.mdx new file mode 100644 index 0000000000..a9ea5b9085 --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/calling/index.mdx @@ -0,0 +1,34 @@ +--- +slug: "/reference/typescript/rest/namespaces/calling" +title: "calling" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "rest.namespaces.calling" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts" +--- +# `calling` + +## Signature + +```typescript +module calling +``` + +## Classes + + + + REST call control — all 37 commands dispatched via a single POST endpoint. + + + +## Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/chat/chat-resource/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/chat/chat-resource/index.mdx new file mode 100644 index 0000000000..7208051345 --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/chat/chat-resource/index.mdx @@ -0,0 +1,92 @@ +--- +slug: "/reference/typescript/rest/namespaces/chat/chat-resource" +title: "ChatResource" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "rest.namespaces.chat.ChatResource" + parent: "rest.namespaces.chat" + module: "rest.namespaces.chat" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/chat.ts" +--- +# `ChatResource` + +Chat token generation. + +Access via `client.chat.*`. Issues short-lived tokens that end-user clients +use to join chat channels. + +## Signature + +```typescript +class ChatResource extends BaseResource +``` + +## Inheritance + +**Extends:** [BaseResource](/docs/sdk-reference/reference/typescript/rest/base/base-resource) + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient): ChatResource +``` + +#### Parameters + + + +#### Returns + +`ChatResource` + +#### Source + +[`src/rest/namespaces/chat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/chat.ts) + +Line 17. + +*** + +### createToken + +Generate a short-lived Chat token. + +#### Signature + +```typescript +createToken(body: any): Promise +``` + +#### Parameters + + + Token payload (e.g. `{ room_name, user_name, permissions }`). + + +#### Returns + +`Promise` — The token record, typically `{ token: "eyJ..." }`. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/chat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/chat.ts) + +Line 28. + +## Source + +[`src/rest/namespaces/chat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/chat.ts) + +Line 16. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/chat/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/chat/index.mdx new file mode 100644 index 0000000000..4be5ab174d --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/chat/index.mdx @@ -0,0 +1,34 @@ +--- +slug: "/reference/typescript/rest/namespaces/chat" +title: "chat" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "rest.namespaces.chat" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/chat.ts" +--- +# `chat` + +## Signature + +```typescript +module chat +``` + +## Classes + + + + Chat token generation. + + + +## Source + +[`src/rest/namespaces/chat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/chat.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-accounts/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-accounts/index.mdx new file mode 100644 index 0000000000..ebad349d47 --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-accounts/index.mdx @@ -0,0 +1,189 @@ +--- +slug: "/reference/typescript/rest/namespaces/compat/compat-accounts" +title: "CompatAccounts" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "rest.namespaces.compat.CompatAccounts" + parent: "rest.namespaces.compat" + module: "rest.namespaces.compat" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts" +--- +# `CompatAccounts` + +Compat account / subproject management (Twilio-compatible LAML). + +## Signature + +```typescript +class CompatAccounts extends BaseResource +``` + +## Inheritance + +**Extends:** [BaseResource](/docs/sdk-reference/reference/typescript/rest/base/base-resource) + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient): CompatAccounts +``` + +#### Parameters + + + +#### Returns + +`CompatAccounts` + +#### Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 16. + +*** + +### create + +Create a new sub-account under the authenticated parent account. + +#### Signature + +```typescript +create(body: any): Promise +``` + +#### Parameters + + + Account payload (`FriendlyName`, etc.) — LAML form keys. + + +#### Returns + +`Promise` — The newly-created account record. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 38. + +*** + +### get + +Fetch an account by SID. + +#### Signature + +```typescript +get(sid: string): Promise +``` + +#### Parameters + + + Account SID (e.g. `"AC..."`). + + +#### Returns + +`Promise` — The account record. + +#### Throws + +- On any non-2xx HTTP response (including `404`). + +#### Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 49. + +*** + +### list + +List accounts visible to the authenticated project. + +#### Signature + +```typescript +list(params?: QueryParams): Promise +``` + +#### Parameters + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — A LAML-shaped paginated account list. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 27. + +*** + +### update + +Update an account's attributes. LAML uses `POST` (not PATCH/PUT). + +#### Signature + +```typescript +update(sid: string, body: any = {}): Promise +``` + +#### Parameters + + + Account SID. + + + + Partial update payload. Defaults to `{}`. + + +#### Returns + +`Promise` — The updated account record. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 61. + +## Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 15. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-applications/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-applications/index.mdx new file mode 100644 index 0000000000..6ae57d526a --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-applications/index.mdx @@ -0,0 +1,223 @@ +--- +slug: "/reference/typescript/rest/namespaces/compat/compat-applications" +title: "CompatApplications" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "rest.namespaces.compat.CompatApplications" + parent: "rest.namespaces.compat" + module: "rest.namespaces.compat" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts" +--- +# `CompatApplications` + +Compat application management (LAML-style `Applications`). + +## Signature + +```typescript +class CompatApplications extends CrudResource +``` + +## Inheritance + +**Extends:** [CrudResource](/docs/sdk-reference/reference/typescript/rest/base/crud-resource) + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient, basePath: string): CompatApplications +``` + +#### Parameters + + + + + +#### Returns + +`CompatApplications` + +#### Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 536. + +*** + +### create + +Create a new resource. + +#### Signature + +```typescript +create(body: any): Promise +``` + +#### Parameters + + + Request body describing the resource to create. + + +#### Returns + +`Promise` — The newly-created resource. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 55. + +*** + +### delete + +Delete a resource by ID. + +#### Signature + +```typescript +delete(resourceId: string): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + +#### Returns + +`Promise` — The platform's delete response (often an empty body on success). + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 95. + +*** + +### get + +Fetch a single resource by ID. + +#### Signature + +```typescript +get(resourceId: string): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + +#### Returns + +`Promise` — The resource record. + +#### Throws + +- On any non-2xx HTTP response (including `404`). + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 66. + +*** + +### list + +List resources with optional query parameters. + +#### Signature + +```typescript +list(params?: QueryParams): Promise +``` + +#### Parameters + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — The paginated list response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 44. + +*** + +### update + +Update an application. LAML uses `POST` (not PATCH/PUT). + +#### Signature + +```typescript +update(sid: string, body: any = {}): Promise +``` + +#### Parameters + + + Application SID (e.g. `"AP..."`). + + + + LAML-form update payload. Defaults to `{}`. + + +#### Returns + +`Promise` — The updated application record. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 548. + +## Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 535. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-calls/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-calls/index.mdx new file mode 100644 index 0000000000..1234307721 --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-calls/index.mdx @@ -0,0 +1,379 @@ +--- +slug: "/reference/typescript/rest/namespaces/compat/compat-calls" +title: "CompatCalls" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "rest.namespaces.compat.CompatCalls" + parent: "rest.namespaces.compat" + module: "rest.namespaces.compat" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts" +--- +# `CompatCalls` + +Compat call management with recording and stream sub-resources. + +## Signature + +```typescript +class CompatCalls extends CrudResource +``` + +## Inheritance + +**Extends:** [CrudResource](/docs/sdk-reference/reference/typescript/rest/base/crud-resource) + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient, basePath: string): CompatCalls +``` + +#### Parameters + + + + + +#### Returns + +`CompatCalls` + +#### Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 68. + +*** + +### create + +Create a new resource. + +#### Signature + +```typescript +create(body: any): Promise +``` + +#### Parameters + + + Request body describing the resource to create. + + +#### Returns + +`Promise` — The newly-created resource. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 55. + +*** + +### delete + +Delete a resource by ID. + +#### Signature + +```typescript +delete(resourceId: string): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + +#### Returns + +`Promise` — The platform's delete response (often an empty body on success). + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 95. + +*** + +### get + +Fetch a single resource by ID. + +#### Signature + +```typescript +get(resourceId: string): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + +#### Returns + +`Promise` — The resource record. + +#### Throws + +- On any non-2xx HTTP response (including `404`). + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 66. + +*** + +### list + +List resources with optional query parameters. + +#### Signature + +```typescript +list(params?: QueryParams): Promise +``` + +#### Parameters + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — The paginated list response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 44. + +*** + +### startRecording + +Start recording an active call. + +#### Signature + +```typescript +startRecording(callSid: string, body: any = {}): Promise +``` + +#### Parameters + + + Call SID. + + + + Recording parameters (channels, trim, status callback, etc.). Defaults to `{}`. + + +#### Returns + +`Promise` — The newly-started recording record. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 93. + +*** + +### startStream + +Start a media stream on an active call (WebSocket media forwarding). + +#### Signature + +```typescript +startStream(callSid: string, body: any = {}): Promise +``` + +#### Parameters + + + Call SID. + + + + Stream parameters (URL, track, etc.). Defaults to `{}`. + + +#### Returns + +`Promise` — The newly-started stream record. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 118. + +*** + +### stopStream + +Stop an active media stream on a call. + +#### Signature + +```typescript +stopStream(callSid: string, streamSid: string, body: any = {}): Promise +``` + +#### Parameters + + + Call SID. + + + + Stream SID returned by [startStream](/docs/sdk-reference/reference/typescript/rest/namespaces/compat/compat-calls#start-stream). + + + + Update payload. Defaults to `{}`. + + +#### Returns + +`Promise` — The stopped stream record. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 131. + +*** + +### update + +Update an in-progress or past call. LAML uses `POST` (not PATCH/PUT). + +#### Signature + +```typescript +update(sid: string, body: any = {}): Promise +``` + +#### Parameters + + + Call SID (e.g. `"CA..."`). + + + + LAML-form update payload (`Status`, `Url`, etc.). Defaults to `{}`. + + +#### Returns + +`Promise` — The updated call record. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 80. + +*** + +### updateRecording + +Update an active recording (e.g. `Status=paused` / `Status=stopped`). + +#### Signature + +```typescript +updateRecording( + callSid: string, + recordingSid: string, + body: any = {} +): Promise +``` + +#### Parameters + + + Call SID. + + + + Recording SID returned by [startRecording](/docs/sdk-reference/reference/typescript/rest/namespaces/compat/compat-calls#start-recording). + + + + Update payload. Defaults to `{}`. + + +#### Returns + +`Promise` — The updated recording record. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 106. + +## Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 67. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-conferences/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-conferences/index.mdx new file mode 100644 index 0000000000..61e7b7785a --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-conferences/index.mdx @@ -0,0 +1,544 @@ +--- +slug: "/reference/typescript/rest/namespaces/compat/compat-conferences" +title: "CompatConferences" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "rest.namespaces.compat.CompatConferences" + parent: "rest.namespaces.compat" + module: "rest.namespaces.compat" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts" +--- +# `CompatConferences` + +Compat conference management with participants, recordings, and streams. + +## Signature + +```typescript +class CompatConferences extends BaseResource +``` + +## Inheritance + +**Extends:** [BaseResource](/docs/sdk-reference/reference/typescript/rest/base/base-resource) + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient, basePath: string): CompatConferences +``` + +#### Parameters + + + + + +#### Returns + +`CompatConferences` + +#### Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 248. + +*** + +### deleteRecording + +Delete a conference recording. + +#### Signature + +```typescript +deleteRecording(conferenceSid: string, recordingSid: string): Promise +``` + +#### Parameters + + + Conference SID. + + + + Recording SID. + + +#### Returns + +`Promise` — The platform's delete response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 386. + +*** + +### get + +Fetch a conference by SID. + +#### Signature + +```typescript +get(sid: string): Promise +``` + +#### Parameters + + + Conference SID (e.g. `"CF..."`). + + +#### Returns + +`Promise` — The conference record. + +#### Throws + +- On any non-2xx HTTP response (including `404`). + +#### Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 270. + +*** + +### getParticipant + +Fetch a specific participant (by its call SID) in a conference. + +#### Signature + +```typescript +getParticipant(conferenceSid: string, callSid: string): Promise +``` + +#### Parameters + + + Conference SID. + + + + Participant's call SID. + + +#### Returns + +`Promise` — The participant record. + +#### Throws + +- On any non-2xx HTTP response (including `404`). + +#### Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 309. + +*** + +### getRecording + +Fetch a specific conference recording. + +#### Signature + +```typescript +getRecording(conferenceSid: string, recordingSid: string): Promise +``` + +#### Parameters + + + Conference SID. + + + + Recording SID. + + +#### Returns + +`Promise` — The recording record. + +#### Throws + +- On any non-2xx HTTP response (including `404`). + +#### Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 361. + +*** + +### list + +List conferences in the account. + +#### Signature + +```typescript +list(params?: QueryParams): Promise +``` + +#### Parameters + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — A paginated list of conferences. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 259. + +*** + +### listParticipants + +List participants in a conference. + +#### Signature + +```typescript +listParticipants(conferenceSid: string, params?: QueryParams): Promise +``` + +#### Parameters + + + Conference SID. + + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — A paginated list of participants. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 297. + +*** + +### listRecordings + +List recordings taken of a conference. + +#### Signature + +```typescript +listRecordings(conferenceSid: string, params?: QueryParams): Promise +``` + +#### Parameters + + + Conference SID. + + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — A paginated list of recordings. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 349. + +*** + +### removeParticipant + +Remove a participant from a conference (kick). + +#### Signature + +```typescript +removeParticipant(conferenceSid: string, callSid: string): Promise +``` + +#### Parameters + + + Conference SID. + + + + Participant's call SID. + + +#### Returns + +`Promise` — The platform's delete response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 335. + +*** + +### startStream + +Start a media stream on a conference. + +#### Signature + +```typescript +startStream(conferenceSid: string, body: any = {}): Promise +``` + +#### Parameters + + + Conference SID. + + + + Stream parameters (URL, track, etc.). Defaults to `{}`. + + +#### Returns + +`Promise` — The newly-started stream record. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 400. + +*** + +### stopStream + +Stop an active conference media stream. + +#### Signature + +```typescript +stopStream( + conferenceSid: string, + streamSid: string, + body: any = {} +): Promise +``` + +#### Parameters + + + Conference SID. + + + + Stream SID returned by [startStream](/docs/sdk-reference/reference/typescript/rest/namespaces/compat/compat-conferences#start-stream). + + + + Update payload. Defaults to `{}`. + + +#### Returns + +`Promise` — The stopped stream record. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 413. + +*** + +### update + +Update a conference (e.g. `Status=completed` to terminate). +LAML uses `POST` (not PATCH/PUT). + +#### Signature + +```typescript +update(sid: string, body: any = {}): Promise +``` + +#### Parameters + + + Conference SID. + + + + LAML-form update payload. Defaults to `{}`. + + +#### Returns + +`Promise` — The updated conference record. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 283. + +*** + +### updateParticipant + +Update a participant (mute, hold, announce, etc.). LAML uses `POST`. + +#### Signature + +```typescript +updateParticipant( + conferenceSid: string, + callSid: string, + body: any = {} +): Promise +``` + +#### Parameters + + + Conference SID. + + + + Participant's call SID. + + + + LAML-form update payload (e.g. `{ Muted: 'true' }`). Defaults to `{}`. + + +#### Returns + +`Promise` — The updated participant record. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 323. + +*** + +### updateRecording + +Update an active conference recording (pause, resume, stop). LAML uses `POST`. + +#### Signature + +```typescript +updateRecording( + conferenceSid: string, + recordingSid: string, + body: any = {} +): Promise +``` + +#### Parameters + + + Conference SID. + + + + Recording SID. + + + + LAML-form update payload. Defaults to `{}`. + + +#### Returns + +`Promise` — The updated recording record. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 374. + +## Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 247. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-faxes/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-faxes/index.mdx new file mode 100644 index 0000000000..ba7650d7eb --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-faxes/index.mdx @@ -0,0 +1,331 @@ +--- +slug: "/reference/typescript/rest/namespaces/compat/compat-faxes" +title: "CompatFaxes" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "rest.namespaces.compat.CompatFaxes" + parent: "rest.namespaces.compat" + module: "rest.namespaces.compat" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts" +--- +# `CompatFaxes` + +Compat fax management with media sub-resources. + +## Signature + +```typescript +class CompatFaxes extends CrudResource +``` + +## Inheritance + +**Extends:** [CrudResource](/docs/sdk-reference/reference/typescript/rest/base/crud-resource) + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient, basePath: string): CompatFaxes +``` + +#### Parameters + + + + + +#### Returns + +`CompatFaxes` + +#### Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 193. + +*** + +### create + +Create a new resource. + +#### Signature + +```typescript +create(body: any): Promise +``` + +#### Parameters + + + Request body describing the resource to create. + + +#### Returns + +`Promise` — The newly-created resource. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 55. + +*** + +### delete + +Delete a resource by ID. + +#### Signature + +```typescript +delete(resourceId: string): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + +#### Returns + +`Promise` — The platform's delete response (often an empty body on success). + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 95. + +*** + +### deleteMedia + +Delete a media attachment from a fax. + +#### Signature + +```typescript +deleteMedia(faxSid: string, mediaSid: string): Promise +``` + +#### Parameters + + + Fax SID. + + + + Media SID. + + +#### Returns + +`Promise` — The platform's delete response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 241. + +*** + +### get + +Fetch a single resource by ID. + +#### Signature + +```typescript +get(resourceId: string): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + +#### Returns + +`Promise` — The resource record. + +#### Throws + +- On any non-2xx HTTP response (including `404`). + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 66. + +*** + +### getMedia + +Fetch a specific media attachment on a fax. + +#### Signature + +```typescript +getMedia(faxSid: string, mediaSid: string): Promise +``` + +#### Parameters + + + Fax SID. + + + + Media SID. + + +#### Returns + +`Promise` — The media record. + +#### Throws + +- On any non-2xx HTTP response (including `404`). + +#### Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 229. + +*** + +### list + +List resources with optional query parameters. + +#### Signature + +```typescript +list(params?: QueryParams): Promise +``` + +#### Parameters + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — The paginated list response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 44. + +*** + +### listMedia + +List media attachments for a fax. + +#### Signature + +```typescript +listMedia(faxSid: string, params?: QueryParams): Promise +``` + +#### Parameters + + + Fax SID. + + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — A paginated list of media records. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 217. + +*** + +### update + +Update a fax. LAML uses `POST` (not PATCH/PUT). + +#### Signature + +```typescript +update(sid: string, body: any = {}): Promise +``` + +#### Parameters + + + Fax SID (e.g. `"FX..."`). + + + + LAML-form update payload. Defaults to `{}`. + + +#### Returns + +`Promise` — The updated fax record. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 205. + +## Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 192. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-laml-bins/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-laml-bins/index.mdx new file mode 100644 index 0000000000..b9dfae7bc1 --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-laml-bins/index.mdx @@ -0,0 +1,223 @@ +--- +slug: "/reference/typescript/rest/namespaces/compat/compat-laml-bins" +title: "CompatLamlBins" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "rest.namespaces.compat.CompatLamlBins" + parent: "rest.namespaces.compat" + module: "rest.namespaces.compat" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts" +--- +# `CompatLamlBins` + +Compat cXML / LaML Bin management. + +## Signature + +```typescript +class CompatLamlBins extends CrudResource +``` + +## Inheritance + +**Extends:** [CrudResource](/docs/sdk-reference/reference/typescript/rest/base/crud-resource) + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient, basePath: string): CompatLamlBins +``` + +#### Parameters + + + + + +#### Returns + +`CompatLamlBins` + +#### Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 555. + +*** + +### create + +Create a new resource. + +#### Signature + +```typescript +create(body: any): Promise +``` + +#### Parameters + + + Request body describing the resource to create. + + +#### Returns + +`Promise` — The newly-created resource. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 55. + +*** + +### delete + +Delete a resource by ID. + +#### Signature + +```typescript +delete(resourceId: string): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + +#### Returns + +`Promise` — The platform's delete response (often an empty body on success). + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 95. + +*** + +### get + +Fetch a single resource by ID. + +#### Signature + +```typescript +get(resourceId: string): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + +#### Returns + +`Promise` — The resource record. + +#### Throws + +- On any non-2xx HTTP response (including `404`). + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 66. + +*** + +### list + +List resources with optional query parameters. + +#### Signature + +```typescript +list(params?: QueryParams): Promise +``` + +#### Parameters + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — The paginated list response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 44. + +*** + +### update + +Update a LaML Bin's stored script. LAML uses `POST` (not PATCH/PUT). + +#### Signature + +```typescript +update(sid: string, body: any = {}): Promise +``` + +#### Parameters + + + LaML Bin SID (e.g. `"LA..."`). + + + + Payload containing the new `VoiceMethod`, `Url`, etc. Defaults to `{}`. + + +#### Returns + +`Promise` — The updated LaML Bin record. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 568. + +## Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 554. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-messages/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-messages/index.mdx new file mode 100644 index 0000000000..2a4d54f9d1 --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-messages/index.mdx @@ -0,0 +1,331 @@ +--- +slug: "/reference/typescript/rest/namespaces/compat/compat-messages" +title: "CompatMessages" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "rest.namespaces.compat.CompatMessages" + parent: "rest.namespaces.compat" + module: "rest.namespaces.compat" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts" +--- +# `CompatMessages` + +Compat message management with media sub-resources. + +## Signature + +```typescript +class CompatMessages extends CrudResource +``` + +## Inheritance + +**Extends:** [CrudResource](/docs/sdk-reference/reference/typescript/rest/base/crud-resource) + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient, basePath: string): CompatMessages +``` + +#### Parameters + + + + + +#### Returns + +`CompatMessages` + +#### Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 138. + +*** + +### create + +Create a new resource. + +#### Signature + +```typescript +create(body: any): Promise +``` + +#### Parameters + + + Request body describing the resource to create. + + +#### Returns + +`Promise` — The newly-created resource. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 55. + +*** + +### delete + +Delete a resource by ID. + +#### Signature + +```typescript +delete(resourceId: string): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + +#### Returns + +`Promise` — The platform's delete response (often an empty body on success). + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 95. + +*** + +### deleteMedia + +Delete a media attachment from a message. + +#### Signature + +```typescript +deleteMedia(messageSid: string, mediaSid: string): Promise +``` + +#### Parameters + + + Message SID. + + + + Media SID. + + +#### Returns + +`Promise` — The platform's delete response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 186. + +*** + +### get + +Fetch a single resource by ID. + +#### Signature + +```typescript +get(resourceId: string): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + +#### Returns + +`Promise` — The resource record. + +#### Throws + +- On any non-2xx HTTP response (including `404`). + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 66. + +*** + +### getMedia + +Fetch a specific media attachment on a message. + +#### Signature + +```typescript +getMedia(messageSid: string, mediaSid: string): Promise +``` + +#### Parameters + + + Message SID. + + + + Media SID. + + +#### Returns + +`Promise` — The media record (metadata + URL). + +#### Throws + +- On any non-2xx HTTP response (including `404`). + +#### Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 174. + +*** + +### list + +List resources with optional query parameters. + +#### Signature + +```typescript +list(params?: QueryParams): Promise +``` + +#### Parameters + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — The paginated list response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 44. + +*** + +### listMedia + +List media attachments for a message (MMS). + +#### Signature + +```typescript +listMedia(messageSid: string, params?: QueryParams): Promise +``` + +#### Parameters + + + Message SID. + + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — A paginated list of media records. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 162. + +*** + +### update + +Update a message. LAML uses `POST` (not PATCH/PUT). + +#### Signature + +```typescript +update(sid: string, body: any = {}): Promise +``` + +#### Parameters + + + Message SID (e.g. `"SM..."` / `"MM..."`). + + + + LAML-form update payload. Defaults to `{}`. + + +#### Returns + +`Promise` — The updated message record. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 150. + +## Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 137. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-namespace/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-namespace/index.mdx new file mode 100644 index 0000000000..bd9a7d3fd1 --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-namespace/index.mdx @@ -0,0 +1,120 @@ +--- +slug: "/reference/typescript/rest/namespaces/compat/compat-namespace" +title: "CompatNamespace" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "rest.namespaces.compat.CompatNamespace" + parent: "rest.namespaces.compat" + module: "rest.namespaces.compat" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts" +--- +# `CompatNamespace` + +Twilio-compatible LAML API namespace with AccountSid scoping. + +Access via `client.compat.*`. This is the legacy LAML (cXML) surface for code +migrated from Twilio — all updates use POST bodies instead of REST-idiomatic +PATCH/PUT. Prefer the native SignalWire namespaces (`client.calling`, `client.fabric`, +etc.) for greenfield projects. + +## Signature + +```typescript +class CompatNamespace +``` + +## Examples + +```typescript +await client.compat.messages.create({ + From: '+15551112222', + To: '+15553334444', + Body: 'Hello from SignalWire!', +}); +``` + +## Properties + + + Main and sub-account CRUD. + + + + LAML Application CRUD. + + + + Call CRUD plus recording / stream sub-resource management. + + + + Conference read / update with participants, recordings, and streams. + + + + Fax CRUD plus media sub-resource management. + + + + LaML Bin (hosted script) CRUD. + + + + Message CRUD plus media sub-resource management. + + + + Phone number CRUD plus search / purchase / import helpers. + + + + Queue CRUD plus member list / fetch / dequeue. + + + + Recording list / fetch / delete. + + + + Compat API token create / update / delete. + + + + Transcription list / fetch / delete. + + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient, accountSid: string): CompatNamespace +``` + +#### Parameters + + + + + +#### Returns + +`CompatNamespace` + +#### Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 796. + +## Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 770. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-phone-numbers/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-phone-numbers/index.mdx new file mode 100644 index 0000000000..93ba7aa0b3 --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-phone-numbers/index.mdx @@ -0,0 +1,361 @@ +--- +slug: "/reference/typescript/rest/namespaces/compat/compat-phone-numbers" +title: "CompatPhoneNumbers" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "rest.namespaces.compat.CompatPhoneNumbers" + parent: "rest.namespaces.compat" + module: "rest.namespaces.compat" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts" +--- +# `CompatPhoneNumbers` + +Compat phone number management with searching, purchasing, and import. + +## Signature + +```typescript +class CompatPhoneNumbers extends BaseResource +``` + +## Inheritance + +**Extends:** [BaseResource](/docs/sdk-reference/reference/typescript/rest/base/base-resource) + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient, basePath: string): CompatPhoneNumbers +``` + +#### Parameters + + + + + +#### Returns + +`CompatPhoneNumbers` + +#### Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 422. + +*** + +### delete + +Release an owned phone number (delete). + +#### Signature + +```typescript +delete(sid: string): Promise +``` + +#### Parameters + + + Phone number SID. + + +#### Returns + +`Promise` — The platform's delete response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 481. + +*** + +### get + +Fetch an owned phone number by SID. + +#### Signature + +```typescript +get(sid: string): Promise +``` + +#### Parameters + + + Phone number SID (e.g. `"PN..."`). + + +#### Returns + +`Promise` — The phone-number record. + +#### Throws + +- On any non-2xx HTTP response (including `404`). + +#### Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 457. + +*** + +### importNumber + +Import an externally-hosted phone number into the account +(LAML `/ImportedPhoneNumbers`). + +#### Signature + +```typescript +importNumber(body: any): Promise +``` + +#### Parameters + + + Import payload (number, carrier details, etc.). + + +#### Returns + +`Promise` — The newly-imported number record. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 493. + +*** + +### list + +List owned incoming phone numbers in the account. + +#### Signature + +```typescript +list(params?: QueryParams): Promise +``` + +#### Parameters + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — A paginated list of owned numbers. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 434. + +*** + +### listAvailableCountries + +List countries in which numbers are available for purchase. + +#### Signature + +```typescript +listAvailableCountries(params?: QueryParams): Promise +``` + +#### Parameters + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — A paginated list of country records with capabilities. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 505. + +*** + +### purchase + +Purchase a phone number (LAML `POST /IncomingPhoneNumbers`). + +#### Signature + +```typescript +purchase(body: any): Promise +``` + +#### Parameters + + + Purchase payload, typically including `PhoneNumber` or `AreaCode` plus webhook URLs. + + +#### Returns + +`Promise` — The newly-purchased phone-number record. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 446. + +*** + +### searchLocal + +Search for available local phone numbers in a country. + +#### Signature + +```typescript +searchLocal(country: string, params?: QueryParams): Promise +``` + +#### Parameters + + + ISO-3166 country code (e.g. `"US"`, `"CA"`). + + + + Search filters (`AreaCode`, `Contains`, `NearNumber`, etc.). + + +#### Returns + +`Promise` — A paginated list of available local numbers. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 517. + +*** + +### searchTollFree + +Search for available toll-free phone numbers in a country. + +#### Signature + +```typescript +searchTollFree(country: string, params?: QueryParams): Promise +``` + +#### Parameters + + + ISO-3166 country code. + + + + Search filters (`Contains`, `NearNumber`, etc.). + + +#### Returns + +`Promise` — A paginated list of available toll-free numbers. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 529. + +*** + +### update + +Update an owned phone number (webhook URLs, friendly name, etc.). +LAML uses `POST`. + +#### Signature + +```typescript +update(sid: string, body: any = {}): Promise +``` + +#### Parameters + + + Phone number SID. + + + + LAML-form update payload. Defaults to `{}`. + + +#### Returns + +`Promise` — The updated phone-number record. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 470. + +## Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 419. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-queues/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-queues/index.mdx new file mode 100644 index 0000000000..470f0df260 --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-queues/index.mdx @@ -0,0 +1,336 @@ +--- +slug: "/reference/typescript/rest/namespaces/compat/compat-queues" +title: "CompatQueues" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "rest.namespaces.compat.CompatQueues" + parent: "rest.namespaces.compat" + module: "rest.namespaces.compat" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts" +--- +# `CompatQueues` + +Compat queue management with member operations. + +## Signature + +```typescript +class CompatQueues extends CrudResource +``` + +## Inheritance + +**Extends:** [CrudResource](/docs/sdk-reference/reference/typescript/rest/base/crud-resource) + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient, basePath: string): CompatQueues +``` + +#### Parameters + + + + + +#### Returns + +`CompatQueues` + +#### Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 575. + +*** + +### create + +Create a new resource. + +#### Signature + +```typescript +create(body: any): Promise +``` + +#### Parameters + + + Request body describing the resource to create. + + +#### Returns + +`Promise` — The newly-created resource. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 55. + +*** + +### delete + +Delete a resource by ID. + +#### Signature + +```typescript +delete(resourceId: string): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + +#### Returns + +`Promise` — The platform's delete response (often an empty body on success). + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 95. + +*** + +### dequeueMember + +Dequeue a member — LAML's `POST` on a queued call redirects it to the +given `Url` (typically to connect the caller to a queue consumer). + +#### Signature + +```typescript +dequeueMember(queueSid: string, callSid: string, body: any = {}): Promise +``` + +#### Parameters + + + Queue SID. + + + + Call SID of the queued member. + + + + LAML-form payload (commonly `{ Url, Method }`). Defaults to `{}`. + + +#### Returns + +`Promise` — The updated queue-member record. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 626. + +*** + +### get + +Fetch a single resource by ID. + +#### Signature + +```typescript +get(resourceId: string): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + +#### Returns + +`Promise` — The resource record. + +#### Throws + +- On any non-2xx HTTP response (including `404`). + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 66. + +*** + +### getMember + +Fetch a specific member (by call SID) currently waiting in a queue. + +#### Signature + +```typescript +getMember(queueSid: string, callSid: string): Promise +``` + +#### Parameters + + + Queue SID. + + + + Call SID of the queued member. + + +#### Returns + +`Promise` — The queue-member record. + +#### Throws + +- On any non-2xx HTTP response (including `404`). + +#### Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 611. + +*** + +### list + +List resources with optional query parameters. + +#### Signature + +```typescript +list(params?: QueryParams): Promise +``` + +#### Parameters + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — The paginated list response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 44. + +*** + +### listMembers + +List members (calls) currently waiting in a queue. + +#### Signature + +```typescript +listMembers(queueSid: string, params?: QueryParams): Promise +``` + +#### Parameters + + + Queue SID. + + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — A paginated list of queue members. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 599. + +*** + +### update + +Update a queue. LAML uses `POST` (not PATCH/PUT). + +#### Signature + +```typescript +update(sid: string, body: any = {}): Promise +``` + +#### Parameters + + + Queue SID (e.g. `"QU..."`). + + + + LAML-form update payload. Defaults to `{}`. + + +#### Returns + +`Promise` — The updated queue record. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 587. + +## Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 574. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-recordings/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-recordings/index.mdx new file mode 100644 index 0000000000..b7336d2f38 --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-recordings/index.mdx @@ -0,0 +1,155 @@ +--- +slug: "/reference/typescript/rest/namespaces/compat/compat-recordings" +title: "CompatRecordings" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "rest.namespaces.compat.CompatRecordings" + parent: "rest.namespaces.compat" + module: "rest.namespaces.compat" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts" +--- +# `CompatRecordings` + +Compat recording management (list / get / delete). + +## Signature + +```typescript +class CompatRecordings extends BaseResource +``` + +## Inheritance + +**Extends:** [BaseResource](/docs/sdk-reference/reference/typescript/rest/base/base-resource) + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient, basePath: string): CompatRecordings +``` + +#### Parameters + + + + + +#### Returns + +`CompatRecordings` + +#### Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 633. + +*** + +### delete + +Delete a recording. + +#### Signature + +```typescript +delete(sid: string): Promise +``` + +#### Parameters + + + Recording SID. + + +#### Returns + +`Promise` — The platform's delete response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 667. + +*** + +### get + +Fetch a recording by SID. + +#### Signature + +```typescript +get(sid: string): Promise +``` + +#### Parameters + + + Recording SID (e.g. `"RE..."`). + + +#### Returns + +`Promise` — The recording record. + +#### Throws + +- On any non-2xx HTTP response (including `404`). + +#### Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 656. + +*** + +### list + +List recordings in the account. + +#### Signature + +```typescript +list(params?: QueryParams): Promise +``` + +#### Parameters + + + Optional filter / pagination query parameters (date range, call SID, conference SID, etc.). + + +#### Returns + +`Promise` — A paginated list of recordings. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 645. + +## Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 632. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-tokens/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-tokens/index.mdx new file mode 100644 index 0000000000..25369b6bb7 --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-tokens/index.mdx @@ -0,0 +1,159 @@ +--- +slug: "/reference/typescript/rest/namespaces/compat/compat-tokens" +title: "CompatTokens" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "rest.namespaces.compat.CompatTokens" + parent: "rest.namespaces.compat" + module: "rest.namespaces.compat" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts" +--- +# `CompatTokens` + +Compat API token management (non-LAML — uses `PATCH`). + +## Signature + +```typescript +class CompatTokens extends BaseResource +``` + +## Inheritance + +**Extends:** [BaseResource](/docs/sdk-reference/reference/typescript/rest/base/base-resource) + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient, basePath: string): CompatTokens +``` + +#### Parameters + + + + + +#### Returns + +`CompatTokens` + +#### Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 714. + +*** + +### create + +Create a new Compat API token. + +#### Signature + +```typescript +create(body: any): Promise +``` + +#### Parameters + + + Token payload (friendly name, scopes, etc.). + + +#### Returns + +`Promise` — The newly-created token record, including the secret value. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 725. + +*** + +### delete + +Revoke and delete a Compat API token. + +#### Signature + +```typescript +delete(tokenId: string): Promise +``` + +#### Parameters + + + Unique identifier of the token. + + +#### Returns + +`Promise` — The platform's delete response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 748. + +*** + +### update + +Update a Compat API token. + +#### Signature + +```typescript +update(tokenId: string, body: any = {}): Promise +``` + +#### Parameters + + + Unique identifier of the token. + + + + Partial update payload. Defaults to `{}`. + + +#### Returns + +`Promise` — The updated token record. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 737. + +## Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 713. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-transcriptions/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-transcriptions/index.mdx new file mode 100644 index 0000000000..e7bcfb03a9 --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-transcriptions/index.mdx @@ -0,0 +1,155 @@ +--- +slug: "/reference/typescript/rest/namespaces/compat/compat-transcriptions" +title: "CompatTranscriptions" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "rest.namespaces.compat.CompatTranscriptions" + parent: "rest.namespaces.compat" + module: "rest.namespaces.compat" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts" +--- +# `CompatTranscriptions` + +Compat transcription management (list / get / delete). + +## Signature + +```typescript +class CompatTranscriptions extends BaseResource +``` + +## Inheritance + +**Extends:** [BaseResource](/docs/sdk-reference/reference/typescript/rest/base/base-resource) + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient, basePath: string): CompatTranscriptions +``` + +#### Parameters + + + + + +#### Returns + +`CompatTranscriptions` + +#### Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 674. + +*** + +### delete + +Delete a transcription. + +#### Signature + +```typescript +delete(sid: string): Promise +``` + +#### Parameters + + + Transcription SID. + + +#### Returns + +`Promise` — The platform's delete response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 707. + +*** + +### get + +Fetch a transcription by SID. + +#### Signature + +```typescript +get(sid: string): Promise +``` + +#### Parameters + + + Transcription SID (e.g. `"TR..."`). + + +#### Returns + +`Promise` — The transcription record. + +#### Throws + +- On any non-2xx HTTP response (including `404`). + +#### Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 696. + +*** + +### list + +List transcriptions in the account. + +#### Signature + +```typescript +list(params?: QueryParams): Promise +``` + +#### Parameters + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — A paginated list of transcriptions. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 685. + +## Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 673. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/compat/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/compat/index.mdx new file mode 100644 index 0000000000..b070395b88 --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/compat/index.mdx @@ -0,0 +1,82 @@ +--- +slug: "/reference/typescript/rest/namespaces/compat" +title: "compat" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "rest.namespaces.compat" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts" +--- +# `compat` + +## Signature + +```typescript +module compat +``` + +## Classes + + + + Compat account / subproject management (Twilio-compatible LAML). + + + + Compat application management (LAML-style `Applications`). + + + + Compat call management with recording and stream sub-resources. + + + + Compat conference management with participants, recordings, and streams. + + + + Compat fax management with media sub-resources. + + + + Compat cXML / LaML Bin management. + + + + Compat message management with media sub-resources. + + + + Twilio-compatible LAML API namespace with AccountSid scoping. + + + + Compat phone number management with searching, purchasing, and import. + + + + Compat queue management with member operations. + + + + Compat recording management (list / get / delete). + + + + Compat API token management (non-LAML — uses `PATCH`). + + + + Compat transcription management (list / get / delete). + + + +## Source + +[`src/rest/namespaces/compat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/datasphere/datasphere-documents/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/datasphere/datasphere-documents/index.mdx new file mode 100644 index 0000000000..31fb3a5532 --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/datasphere/datasphere-documents/index.mdx @@ -0,0 +1,365 @@ +--- +slug: "/reference/typescript/rest/namespaces/datasphere/datasphere-documents" +title: "DatasphereDocuments" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "rest.namespaces.datasphere.DatasphereDocuments" + parent: "rest.namespaces.datasphere" + module: "rest.namespaces.datasphere" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/datasphere.ts" +--- +# `DatasphereDocuments` + +Document management with search and chunk operations. + +## Signature + +```typescript +class DatasphereDocuments extends CrudResource +``` + +## Inheritance + +**Extends:** [CrudResource](/docs/sdk-reference/reference/typescript/rest/base/crud-resource) + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient): DatasphereDocuments +``` + +#### Parameters + + + +#### Returns + +`DatasphereDocuments` + +#### Source + +[`src/rest/namespaces/datasphere.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/datasphere.ts) + +Line 13. + +*** + +### create + +Create a new resource. + +#### Signature + +```typescript +create(body: any): Promise +``` + +#### Parameters + + + Request body describing the resource to create. + + +#### Returns + +`Promise` — The newly-created resource. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 55. + +*** + +### delete + +Delete a resource by ID. + +#### Signature + +```typescript +delete(resourceId: string): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + +#### Returns + +`Promise` — The platform's delete response (often an empty body on success). + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 95. + +*** + +### deleteChunk + +Delete a specific chunk from a document. + +#### Signature + +```typescript +deleteChunk(documentId: string, chunkId: string): Promise +``` + +#### Parameters + + + Unique identifier of the document. + + + + Unique identifier of the chunk. + + +#### Returns + +`Promise` — The platform's delete response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/datasphere.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/datasphere.ts) + +Line 61. + +*** + +### get + +Fetch a single resource by ID. + +#### Signature + +```typescript +get(resourceId: string): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + +#### Returns + +`Promise` — The resource record. + +#### Throws + +- On any non-2xx HTTP response (including `404`). + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 66. + +*** + +### getChunk + +Fetch a specific chunk of a document by ID. + +#### Signature + +```typescript +getChunk(documentId: string, chunkId: string): Promise +``` + +#### Parameters + + + Unique identifier of the document. + + + + Unique identifier of the chunk. + + +#### Returns + +`Promise` — The chunk record with its content. + +#### Throws + +- On any non-2xx HTTP response (including `404`). + +#### Source + +[`src/rest/namespaces/datasphere.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/datasphere.ts) + +Line 49. + +*** + +### list + +List resources with optional query parameters. + +#### Signature + +```typescript +list(params?: QueryParams): Promise +``` + +#### Parameters + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — The paginated list response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 44. + +*** + +### listChunks + +List content chunks for a document. + +#### Signature + +```typescript +listChunks(documentId: string, params?: QueryParams): Promise +``` + +#### Parameters + + + Unique identifier of the document. + + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — A paginated list of chunks. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/datasphere.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/datasphere.ts) + +Line 37. + +*** + +### search + +Run a semantic search across indexed documents. + +#### Signature + +```typescript +search(body: any): Promise +``` + +#### Parameters + + + Search payload (typically `{ query: "...", document_id?: "...", + limit?: 5, tags?: [...] }`). + + +#### Returns + +`Promise` — The ranked search hits. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/datasphere.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/datasphere.ts) + +Line 25. + +*** + +### update + +Update a resource by ID. + +Uses HTTP `PATCH` by default; subclasses may set `_updateMethod = 'PUT'` +when the remote API requires a full-replacement semantics. + +#### Signature + +```typescript +update(resourceId: string, body: any): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + + + Request body with updated fields. + + +#### Returns + +`Promise` — The updated resource. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 81. + +## Source + +[`src/rest/namespaces/datasphere.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/datasphere.ts) + +Line 12. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/datasphere/datasphere-namespace/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/datasphere/datasphere-namespace/index.mdx new file mode 100644 index 0000000000..be9f8c03a4 --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/datasphere/datasphere-namespace/index.mdx @@ -0,0 +1,72 @@ +--- +slug: "/reference/typescript/rest/namespaces/datasphere/datasphere-namespace" +title: "DatasphereNamespace" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "rest.namespaces.datasphere.DatasphereNamespace" + parent: "rest.namespaces.datasphere" + module: "rest.namespaces.datasphere" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/datasphere.ts" +--- +# `DatasphereNamespace` + +Datasphere API namespace. + +Access via `client.datasphere.*`. Datasphere is SignalWire's RAG service — +index documents and run semantic search from within agent tools. + +## Signature + +```typescript +class DatasphereNamespace +``` + +## Examples + +```typescript +const hits = await client.datasphere.documents.search({ + query: 'refund policy', + document_id: 'doc_abc', + limit: 5, +}); +``` + +## Properties + + + Document CRUD plus semantic search and chunk management. + + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient): DatasphereNamespace +``` + +#### Parameters + + + +#### Returns + +`DatasphereNamespace` + +#### Source + +[`src/rest/namespaces/datasphere.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/datasphere.ts) + +Line 85. + +## Source + +[`src/rest/namespaces/datasphere.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/datasphere.ts) + +Line 81. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/datasphere/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/datasphere/index.mdx new file mode 100644 index 0000000000..15e42b1a31 --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/datasphere/index.mdx @@ -0,0 +1,38 @@ +--- +slug: "/reference/typescript/rest/namespaces/datasphere" +title: "datasphere" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "rest.namespaces.datasphere" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/datasphere.ts" +--- +# `datasphere` + +## Signature + +```typescript +module datasphere +``` + +## Classes + + + + Document management with search and chunk operations. + + + + Datasphere API namespace. + + + +## Source + +[`src/rest/namespaces/datasphere.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/datasphere.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/fabric/auto-materialized-webhook-resource/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/fabric/auto-materialized-webhook-resource/index.mdx new file mode 100644 index 0000000000..125e8f8682 --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/fabric/auto-materialized-webhook-resource/index.mdx @@ -0,0 +1,267 @@ +--- +slug: "/reference/typescript/rest/namespaces/fabric/auto-materialized-webhook-resource" +title: "AutoMaterializedWebhookResource" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "rest.namespaces.fabric.AutoMaterializedWebhookResource" + parent: "rest.namespaces.fabric" + module: "rest.namespaces.fabric" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts" +--- +# `AutoMaterializedWebhookResource` + +Fabric webhook resource that is normally auto-materialized by the +corresponding `phoneNumbers.set*Webhook` helper. + +Creating directly produces an orphan Fabric resource that isn't bound to +any phone number — the API's binding model configures the webhook on the +phone number, and the server materializes the Fabric resource as a +side-effect. `create` remains for backwards compatibility but emits a +one-time deprecation warning on first call. + +See the porting-sdk's `phone-binding.md` for the full model. + +## Signature + +```typescript +class AutoMaterializedWebhookResource extends FabricResource +``` + +## Inheritance + +**Extends:** [FabricResource](/docs/sdk-reference/reference/typescript/rest/namespaces/fabric/fabric-resource) + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient, basePath: string): AutoMaterializedWebhookResource +``` + +#### Parameters + + + + + +#### Returns + +`AutoMaterializedWebhookResource` + +#### Source + +[`src/rest/namespaces/fabric.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts) + +Line 190. + +*** + +### create + + + **Deprecated.** Creating a webhook Fabric resource directly produces an orphan that is not bound to any phone number. Use the `phoneNumbers.setSwmlWebhook` / `setCxmlWebhook` helper instead — it updates the phone number and the server auto-materializes the resource. Kept for backwards compatibility. + + +#### Signature + +```typescript +create(body: any = {}): Promise +``` + +#### Parameters + + + +#### Returns + +`Promise` + +#### Source + +[`src/rest/namespaces/fabric.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts) + +Line 201. + +*** + +### delete + +Delete a resource by ID. + +#### Signature + +```typescript +delete(resourceId: string): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + +#### Returns + +`Promise` — The platform's delete response (often an empty body on success). + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 95. + +*** + +### get + +Fetch a single resource by ID. + +#### Signature + +```typescript +get(resourceId: string): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + +#### Returns + +`Promise` — The resource record. + +#### Throws + +- On any non-2xx HTTP response (including `404`). + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 66. + +*** + +### list + +List resources with optional query parameters. + +#### Signature + +```typescript +list(params?: QueryParams): Promise +``` + +#### Parameters + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — The paginated list response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 44. + +*** + +### listAddresses + +List addresses associated with a specific resource instance. + +#### Signature + +```typescript +listAddresses(resourceId: string, params?: QueryParams): Promise +``` + +#### Parameters + + + Unique identifier of the owning resource. + + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — A paginated list of addresses. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudWithAddresses.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudWithAddresses.ts) + +Line 34. + +*** + +### update + +Update a resource by ID. + +Uses HTTP `PATCH` by default; subclasses may set `_updateMethod = 'PUT'` +when the remote API requires a full-replacement semantics. + +#### Signature + +```typescript +update(resourceId: string, body: any): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + + + Request body with updated fields. + + +#### Returns + +`Promise` — The updated resource. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 81. + +## Source + +[`src/rest/namespaces/fabric.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts) + +Line 185. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/fabric/call-flows-resource/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/fabric/call-flows-resource/index.mdx new file mode 100644 index 0000000000..cda9274afc --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/fabric/call-flows-resource/index.mdx @@ -0,0 +1,334 @@ +--- +slug: "/reference/typescript/rest/namespaces/fabric/call-flows-resource" +title: "CallFlowsResource" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "rest.namespaces.fabric.CallFlowsResource" + parent: "rest.namespaces.fabric" + module: "rest.namespaces.fabric" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts" +--- +# `CallFlowsResource` + +Call flows with version management. Uses singular `call_flow` for sub-resource paths. + +## Signature + +```typescript +class CallFlowsResource extends FabricResourcePUT +``` + +## Inheritance + +**Extends:** [FabricResourcePUT](/docs/sdk-reference/reference/typescript/rest/namespaces/fabric/fabric-resource-put) + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient, basePath: string): CallFlowsResource +``` + +#### Parameters + + + + + +#### Returns + +`CallFlowsResource` + +#### Source + +[`src/rest/namespaces/fabric.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts) + +Line 30. + +*** + +### create + +Create a new resource. + +#### Signature + +```typescript +create(body: any): Promise +``` + +#### Parameters + + + Request body describing the resource to create. + + +#### Returns + +`Promise` — The newly-created resource. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 55. + +*** + +### delete + +Delete a resource by ID. + +#### Signature + +```typescript +delete(resourceId: string): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + +#### Returns + +`Promise` — The platform's delete response (often an empty body on success). + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 95. + +*** + +### deployVersion + +Publish a new version of a call flow. + +#### Signature + +```typescript +deployVersion(resourceId: string, body: any = {}): Promise +``` + +#### Parameters + + + Unique identifier of the call flow. + + + + Version payload (schema and metadata). Defaults to `{}`. + + +#### Returns + +`Promise` — The newly-published version record. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/fabric.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts) + +Line 68. + +*** + +### get + +Fetch a single resource by ID. + +#### Signature + +```typescript +get(resourceId: string): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + +#### Returns + +`Promise` — The resource record. + +#### Throws + +- On any non-2xx HTTP response (including `404`). + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 66. + +*** + +### list + +List resources with optional query parameters. + +#### Signature + +```typescript +list(params?: QueryParams): Promise +``` + +#### Parameters + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — The paginated list response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 44. + +*** + +### listAddresses + +List addresses attached to a call flow resource. + +#### Signature + +```typescript +listAddresses(resourceId: string, params?: QueryParams): Promise +``` + +#### Parameters + + + Unique identifier of the call flow. + + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — A paginated list of addresses. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/fabric.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts) + +Line 42. + +*** + +### listVersions + +List all saved versions of a call flow. + +#### Signature + +```typescript +listVersions(resourceId: string, params?: QueryParams): Promise +``` + +#### Parameters + + + Unique identifier of the call flow. + + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — A paginated list of call-flow versions. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/fabric.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts) + +Line 55. + +*** + +### update + +Update a resource by ID. + +Uses HTTP `PATCH` by default; subclasses may set `_updateMethod = 'PUT'` +when the remote API requires a full-replacement semantics. + +#### Signature + +```typescript +update(resourceId: string, body: any): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + + + Request body with updated fields. + + +#### Returns + +`Promise` — The updated resource. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 81. + +## Source + +[`src/rest/namespaces/fabric.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts) + +Line 29. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/fabric/conference-rooms-resource/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/fabric/conference-rooms-resource/index.mdx new file mode 100644 index 0000000000..99deaad843 --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/fabric/conference-rooms-resource/index.mdx @@ -0,0 +1,262 @@ +--- +slug: "/reference/typescript/rest/namespaces/fabric/conference-rooms-resource" +title: "ConferenceRoomsResource" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "rest.namespaces.fabric.ConferenceRoomsResource" + parent: "rest.namespaces.fabric" + module: "rest.namespaces.fabric" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts" +--- +# `ConferenceRoomsResource` + +Conference rooms — uses singular 'conference\_room' for sub-resource paths. + +## Signature + +```typescript +class ConferenceRoomsResource extends FabricResourcePUT +``` + +## Inheritance + +**Extends:** [FabricResourcePUT](/docs/sdk-reference/reference/typescript/rest/namespaces/fabric/fabric-resource-put) + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient, basePath: string): ConferenceRoomsResource +``` + +#### Parameters + + + + + +#### Returns + +`ConferenceRoomsResource` + +#### Source + +[`src/rest/namespaces/fabric.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts) + +Line 76. + +*** + +### create + +Create a new resource. + +#### Signature + +```typescript +create(body: any): Promise +``` + +#### Parameters + + + Request body describing the resource to create. + + +#### Returns + +`Promise` — The newly-created resource. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 55. + +*** + +### delete + +Delete a resource by ID. + +#### Signature + +```typescript +delete(resourceId: string): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + +#### Returns + +`Promise` — The platform's delete response (often an empty body on success). + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 95. + +*** + +### get + +Fetch a single resource by ID. + +#### Signature + +```typescript +get(resourceId: string): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + +#### Returns + +`Promise` — The resource record. + +#### Throws + +- On any non-2xx HTTP response (including `404`). + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 66. + +*** + +### list + +List resources with optional query parameters. + +#### Signature + +```typescript +list(params?: QueryParams): Promise +``` + +#### Parameters + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — The paginated list response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 44. + +*** + +### listAddresses + +List addresses attached to a conference-room resource. + +#### Signature + +```typescript +listAddresses(resourceId: string, params?: QueryParams): Promise +``` + +#### Parameters + + + Unique identifier of the conference room. + + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — A paginated list of addresses. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/fabric.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts) + +Line 88. + +*** + +### update + +Update a resource by ID. + +Uses HTTP `PATCH` by default; subclasses may set `_updateMethod = 'PUT'` +when the remote API requires a full-replacement semantics. + +#### Signature + +```typescript +update(resourceId: string, body: any): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + + + Request body with updated fields. + + +#### Returns + +`Promise` — The updated resource. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 81. + +## Source + +[`src/rest/namespaces/fabric.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts) + +Line 75. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/fabric/cxml-applications-resource/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/fabric/cxml-applications-resource/index.mdx new file mode 100644 index 0000000000..5f797186b4 --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/fabric/cxml-applications-resource/index.mdx @@ -0,0 +1,256 @@ +--- +slug: "/reference/typescript/rest/namespaces/fabric/cxml-applications-resource" +title: "CxmlApplicationsResource" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "rest.namespaces.fabric.CxmlApplicationsResource" + parent: "rest.namespaces.fabric" + module: "rest.namespaces.fabric" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts" +--- +# `CxmlApplicationsResource` + +cXML applications — no create method (read/update/delete only). + +## Signature + +```typescript +class CxmlApplicationsResource extends FabricResourcePUT +``` + +## Inheritance + +**Extends:** [FabricResourcePUT](/docs/sdk-reference/reference/typescript/rest/namespaces/fabric/fabric-resource-put) + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient, basePath: string): CxmlApplicationsResource +``` + +#### Parameters + + + + + +#### Returns + +`CxmlApplicationsResource` + +#### Source + +[`src/rest/namespaces/fabric.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts) + +Line 164. + +*** + +### create + +Create a new resource. + +#### Signature + +```typescript +create(): Promise +``` + +#### Returns + +`Promise` — The newly-created resource. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/fabric.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts) + +Line 168. + +*** + +### delete + +Delete a resource by ID. + +#### Signature + +```typescript +delete(resourceId: string): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + +#### Returns + +`Promise` — The platform's delete response (often an empty body on success). + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 95. + +*** + +### get + +Fetch a single resource by ID. + +#### Signature + +```typescript +get(resourceId: string): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + +#### Returns + +`Promise` — The resource record. + +#### Throws + +- On any non-2xx HTTP response (including `404`). + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 66. + +*** + +### list + +List resources with optional query parameters. + +#### Signature + +```typescript +list(params?: QueryParams): Promise +``` + +#### Parameters + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — The paginated list response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 44. + +*** + +### listAddresses + +List addresses associated with a specific resource instance. + +#### Signature + +```typescript +listAddresses(resourceId: string, params?: QueryParams): Promise +``` + +#### Parameters + + + Unique identifier of the owning resource. + + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — A paginated list of addresses. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudWithAddresses.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudWithAddresses.ts) + +Line 34. + +*** + +### update + +Update a resource by ID. + +Uses HTTP `PATCH` by default; subclasses may set `_updateMethod = 'PUT'` +when the remote API requires a full-replacement semantics. + +#### Signature + +```typescript +update(resourceId: string, body: any): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + + + Request body with updated fields. + + +#### Returns + +`Promise` — The updated resource. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 81. + +## Source + +[`src/rest/namespaces/fabric.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts) + +Line 163. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/fabric/cxml-webhooks-resource/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/fabric/cxml-webhooks-resource/index.mdx new file mode 100644 index 0000000000..32db1f345e --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/fabric/cxml-webhooks-resource/index.mdx @@ -0,0 +1,258 @@ +--- +slug: "/reference/typescript/rest/namespaces/fabric/cxml-webhooks-resource" +title: "CxmlWebhooksResource" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "rest.namespaces.fabric.CxmlWebhooksResource" + parent: "rest.namespaces.fabric" + module: "rest.namespaces.fabric" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts" +--- +# `CxmlWebhooksResource` + +Auto-materialized cXML webhook — normally created via `phoneNumbers.setCxmlWebhook`. + +## Signature + +```typescript +class CxmlWebhooksResource extends AutoMaterializedWebhookResource +``` + +## Inheritance + +**Extends:** [AutoMaterializedWebhookResource](/docs/sdk-reference/reference/typescript/rest/namespaces/fabric/auto-materialized-webhook-resource) + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient, basePath: string): CxmlWebhooksResource +``` + +#### Parameters + + + + + +#### Returns + +`CxmlWebhooksResource` + +#### Source + +[`src/rest/namespaces/fabric.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts) + +Line 190. + +*** + +### create + + + **Deprecated.** Creating a webhook Fabric resource directly produces an orphan that is not bound to any phone number. Use the `phoneNumbers.setSwmlWebhook` / `setCxmlWebhook` helper instead — it updates the phone number and the server auto-materializes the resource. Kept for backwards compatibility. + + +#### Signature + +```typescript +create(body: any = {}): Promise +``` + +#### Parameters + + + +#### Returns + +`Promise` + +#### Source + +[`src/rest/namespaces/fabric.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts) + +Line 201. + +*** + +### delete + +Delete a resource by ID. + +#### Signature + +```typescript +delete(resourceId: string): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + +#### Returns + +`Promise` — The platform's delete response (often an empty body on success). + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 95. + +*** + +### get + +Fetch a single resource by ID. + +#### Signature + +```typescript +get(resourceId: string): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + +#### Returns + +`Promise` — The resource record. + +#### Throws + +- On any non-2xx HTTP response (including `404`). + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 66. + +*** + +### list + +List resources with optional query parameters. + +#### Signature + +```typescript +list(params?: QueryParams): Promise +``` + +#### Parameters + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — The paginated list response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 44. + +*** + +### listAddresses + +List addresses associated with a specific resource instance. + +#### Signature + +```typescript +listAddresses(resourceId: string, params?: QueryParams): Promise +``` + +#### Parameters + + + Unique identifier of the owning resource. + + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — A paginated list of addresses. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudWithAddresses.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudWithAddresses.ts) + +Line 34. + +*** + +### update + +Update a resource by ID. + +Uses HTTP `PATCH` by default; subclasses may set `_updateMethod = 'PUT'` +when the remote API requires a full-replacement semantics. + +#### Signature + +```typescript +update(resourceId: string, body: any): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + + + Request body with updated fields. + + +#### Returns + +`Promise` — The updated resource. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 81. + +## Source + +[`src/rest/namespaces/fabric.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts) + +Line 221. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/fabric/fabric-addresses/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/fabric/fabric-addresses/index.mdx new file mode 100644 index 0000000000..e26b701a2e --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/fabric/fabric-addresses/index.mdx @@ -0,0 +1,123 @@ +--- +slug: "/reference/typescript/rest/namespaces/fabric/fabric-addresses" +title: "FabricAddresses" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "rest.namespaces.fabric.FabricAddresses" + parent: "rest.namespaces.fabric" + module: "rest.namespaces.fabric" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts" +--- +# `FabricAddresses` + +Read-only fabric addresses. + +## Signature + +```typescript +class FabricAddresses extends BaseResource +``` + +## Inheritance + +**Extends:** [BaseResource](/docs/sdk-reference/reference/typescript/rest/base/base-resource) + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient, basePath: string): FabricAddresses +``` + +#### Parameters + + + + + +#### Returns + +`FabricAddresses` + +#### Source + +[`src/rest/namespaces/fabric.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts) + +Line 326. + +*** + +### get + +Fetch a single fabric address by ID. + +#### Signature + +```typescript +get(addressId: string): Promise +``` + +#### Parameters + + + Unique identifier of the address. + + +#### Returns + +`Promise` — The address record. + +#### Throws + +- On any non-2xx HTTP response (including `404`). + +#### Source + +[`src/rest/namespaces/fabric.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts) + +Line 348. + +*** + +### list + +List all fabric addresses in the project. + +#### Signature + +```typescript +list(params?: QueryParams): Promise +``` + +#### Parameters + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — A paginated list of fabric addresses. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/fabric.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts) + +Line 337. + +## Source + +[`src/rest/namespaces/fabric.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts) + +Line 325. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/fabric/fabric-namespace/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/fabric/fabric-namespace/index.mdx new file mode 100644 index 0000000000..42fb105e3a --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/fabric/fabric-namespace/index.mdx @@ -0,0 +1,129 @@ +--- +slug: "/reference/typescript/rest/namespaces/fabric/fabric-namespace" +title: "FabricNamespace" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "rest.namespaces.fabric.FabricNamespace" + parent: "rest.namespaces.fabric" + module: "rest.namespaces.fabric" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts" +--- +# `FabricNamespace` + +Fabric API namespace grouping all resource types. + +Access via `client.fabric.*`. + +## Signature + +```typescript +class FabricNamespace +``` + +## Examples + +```typescript +const agents = await client.fabric.aiAgents.list(); +const flow = await client.fabric.callFlows.create({ name: 'main-ivr' }); +const token = await client.fabric.tokens.createSubscriberToken({ subscriber_id: 'sub_123' }); +``` + +## Properties + + + Read-only access to the unified fabric address table. + + + + AI Agent CRUD — the platform-managed agent registration resource. + + + + Call Flow CRUD with version listing and publishing. + + + + Conference Room CRUD with address listing. + + + + cXML application read / update / delete (no create). + + + + cXML (LaML) script CRUD. + + + + cXML webhook CRUD. **Auto-materialized** as a side-effect of [PhoneNumbersResource.setCxmlWebhook](/docs/sdk-reference/reference/typescript/rest/namespaces/phone-numbers/phone-numbers-resource#set-cxml-webhook); direct `create` produces an orphan resource and emits a deprecation warning. + + + + FreeSWITCH Connector CRUD. + + + + Relay Application CRUD (full-replacement `PUT` update). + + + + Generic operations across all resource types (list, get, delete, phone route assignment). + + + + Top-level SIP endpoint CRUD. + + + + SIP Gateway CRUD. + + + + Subscriber CRUD plus nested SIP endpoint management. + + + + SWML script CRUD (full-replacement `PUT` update). + + + + SWML webhook CRUD. **Auto-materialized** as a side-effect of [PhoneNumbersResource.setSwmlWebhook](/docs/sdk-reference/reference/typescript/rest/namespaces/phone-numbers/phone-numbers-resource#set-swml-webhook); direct `create` produces an orphan resource and emits a deprecation warning. + + + + Subscriber, guest, invite, and embed token generation. + + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient): FabricNamespace +``` + +#### Parameters + + + +#### Returns + +`FabricNamespace` + +#### Source + +[`src/rest/namespaces/fabric.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts) + +Line 475. + +## Source + +[`src/rest/namespaces/fabric.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts) + +Line 428. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/fabric/fabric-resource-put/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/fabric/fabric-resource-put/index.mdx new file mode 100644 index 0000000000..e4bb36ed58 --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/fabric/fabric-resource-put/index.mdx @@ -0,0 +1,262 @@ +--- +slug: "/reference/typescript/rest/namespaces/fabric/fabric-resource-put" +title: "FabricResourcePUT" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "rest.namespaces.fabric.FabricResourcePUT" + parent: "rest.namespaces.fabric" + module: "rest.namespaces.fabric" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts" +--- +# `FabricResourcePUT` + +Fabric resource that uses PUT for updates. + +## Signature + +```typescript +class FabricResourcePUT extends CrudWithAddresses +``` + +## Inheritance + +**Extends:** [CrudWithAddresses](/docs/sdk-reference/reference/typescript/rest/base/crud-with-addresses) + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient, basePath: string): FabricResourcePUT +``` + +#### Parameters + + + + + +#### Returns + +`FabricResourcePUT` + +#### Source + +[`src/rest/namespaces/fabric.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts) + +Line 23. + +*** + +### create + +Create a new resource. + +#### Signature + +```typescript +create(body: any): Promise +``` + +#### Parameters + + + Request body describing the resource to create. + + +#### Returns + +`Promise` — The newly-created resource. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 55. + +*** + +### delete + +Delete a resource by ID. + +#### Signature + +```typescript +delete(resourceId: string): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + +#### Returns + +`Promise` — The platform's delete response (often an empty body on success). + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 95. + +*** + +### get + +Fetch a single resource by ID. + +#### Signature + +```typescript +get(resourceId: string): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + +#### Returns + +`Promise` — The resource record. + +#### Throws + +- On any non-2xx HTTP response (including `404`). + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 66. + +*** + +### list + +List resources with optional query parameters. + +#### Signature + +```typescript +list(params?: QueryParams): Promise +``` + +#### Parameters + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — The paginated list response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 44. + +*** + +### listAddresses + +List addresses associated with a specific resource instance. + +#### Signature + +```typescript +listAddresses(resourceId: string, params?: QueryParams): Promise +``` + +#### Parameters + + + Unique identifier of the owning resource. + + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — A paginated list of addresses. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudWithAddresses.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudWithAddresses.ts) + +Line 34. + +*** + +### update + +Update a resource by ID. + +Uses HTTP `PATCH` by default; subclasses may set `_updateMethod = 'PUT'` +when the remote API requires a full-replacement semantics. + +#### Signature + +```typescript +update(resourceId: string, body: any): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + + + Request body with updated fields. + + +#### Returns + +`Promise` — The updated resource. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 81. + +## Source + +[`src/rest/namespaces/fabric.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts) + +Line 20. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/fabric/fabric-resource/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/fabric/fabric-resource/index.mdx new file mode 100644 index 0000000000..2da2b13cc3 --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/fabric/fabric-resource/index.mdx @@ -0,0 +1,262 @@ +--- +slug: "/reference/typescript/rest/namespaces/fabric/fabric-resource" +title: "FabricResource" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "rest.namespaces.fabric.FabricResource" + parent: "rest.namespaces.fabric" + module: "rest.namespaces.fabric" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts" +--- +# `FabricResource` + +Standard fabric resource with CRUD + addresses (PATCH updates). + +## Signature + +```typescript +class FabricResource extends CrudWithAddresses +``` + +## Inheritance + +**Extends:** [CrudWithAddresses](/docs/sdk-reference/reference/typescript/rest/base/crud-with-addresses) + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient, basePath: string): FabricResource +``` + +#### Parameters + + + + + +#### Returns + +`FabricResource` + +#### Source + +[`src/rest/namespaces/fabric.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts) + +Line 14. + +*** + +### create + +Create a new resource. + +#### Signature + +```typescript +create(body: any): Promise +``` + +#### Parameters + + + Request body describing the resource to create. + + +#### Returns + +`Promise` — The newly-created resource. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 55. + +*** + +### delete + +Delete a resource by ID. + +#### Signature + +```typescript +delete(resourceId: string): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + +#### Returns + +`Promise` — The platform's delete response (often an empty body on success). + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 95. + +*** + +### get + +Fetch a single resource by ID. + +#### Signature + +```typescript +get(resourceId: string): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + +#### Returns + +`Promise` — The resource record. + +#### Throws + +- On any non-2xx HTTP response (including `404`). + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 66. + +*** + +### list + +List resources with optional query parameters. + +#### Signature + +```typescript +list(params?: QueryParams): Promise +``` + +#### Parameters + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — The paginated list response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 44. + +*** + +### listAddresses + +List addresses associated with a specific resource instance. + +#### Signature + +```typescript +listAddresses(resourceId: string, params?: QueryParams): Promise +``` + +#### Parameters + + + Unique identifier of the owning resource. + + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — A paginated list of addresses. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudWithAddresses.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudWithAddresses.ts) + +Line 34. + +*** + +### update + +Update a resource by ID. + +Uses HTTP `PATCH` by default; subclasses may set `_updateMethod = 'PUT'` +when the remote API requires a full-replacement semantics. + +#### Signature + +```typescript +update(resourceId: string, body: any): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + + + Request body with updated fields. + + +#### Returns + +`Promise` — The updated resource. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 81. + +## Source + +[`src/rest/namespaces/fabric.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts) + +Line 13. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/fabric/fabric-tokens/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/fabric/fabric-tokens/index.mdx new file mode 100644 index 0000000000..573c5fe618 --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/fabric/fabric-tokens/index.mdx @@ -0,0 +1,217 @@ +--- +slug: "/reference/typescript/rest/namespaces/fabric/fabric-tokens" +title: "FabricTokens" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "rest.namespaces.fabric.FabricTokens" + parent: "rest.namespaces.fabric" + module: "rest.namespaces.fabric" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts" +--- +# `FabricTokens` + +Subscriber, guest, invite, and embed token creation. + +## Signature + +```typescript +class FabricTokens extends BaseResource +``` + +## Inheritance + +**Extends:** [BaseResource](/docs/sdk-reference/reference/typescript/rest/base/base-resource) + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient): FabricTokens +``` + +#### Parameters + + + +#### Returns + +`FabricTokens` + +#### Source + +[`src/rest/namespaces/fabric.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts) + +Line 355. + +*** + +### createEmbedToken + +Issue a short-lived embed token for browser-side SignalWire widgets. + +#### Signature + +```typescript +createEmbedToken(body: any = {}): Promise +``` + +#### Parameters + + + Embed-token payload (allowed origins, TTL, etc.). Defaults to `{}`. + + +#### Returns + +`Promise` — The token record. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/fabric.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts) + +Line 411. + +*** + +### createGuestToken + +Issue a guest token (no subscriber account required). + +#### Signature + +```typescript +createGuestToken(body: any = {}): Promise +``` + +#### Parameters + + + Guest-token payload (context, TTL, etc.). Defaults to `{}`. + + +#### Returns + +`Promise` — The token record. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/fabric.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts) + +Line 400. + +*** + +### createInviteToken + +Create a single-use invite token for onboarding a new subscriber. + +#### Signature + +```typescript +createInviteToken(body: any = {}): Promise +``` + +#### Parameters + + + Invite payload (email, phone, permissions). Defaults to `{}`. + + +#### Returns + +`Promise` — The invite record, including the share URL / code. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/fabric.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts) + +Line 389. + +*** + +### createSubscriberToken + +Issue a new subscriber JWT used by end-user clients. + +#### Signature + +```typescript +createSubscriberToken(body: any = {}): Promise +``` + +#### Parameters + + + Token payload (subscriber ID, TTL, scopes). Defaults to `{}`. + + +#### Returns + +`Promise` — The token record, typically `{ token: "eyJ..." }`. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/fabric.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts) + +Line 366. + +*** + +### refreshSubscriberToken + +Refresh an existing subscriber JWT, extending its lifetime. + +#### Signature + +```typescript +refreshSubscriberToken(body: any = {}): Promise +``` + +#### Parameters + + + Refresh payload (usually containing the current token). Defaults to `{}`. + + +#### Returns + +`Promise` — The refreshed token record. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/fabric.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts) + +Line 378. + +## Source + +[`src/rest/namespaces/fabric.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts) + +Line 354. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/fabric/generic-resources/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/fabric/generic-resources/index.mdx new file mode 100644 index 0000000000..9225452227 --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/fabric/generic-resources/index.mdx @@ -0,0 +1,267 @@ +--- +slug: "/reference/typescript/rest/namespaces/fabric/generic-resources" +title: "GenericResources" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "rest.namespaces.fabric.GenericResources" + parent: "rest.namespaces.fabric" + module: "rest.namespaces.fabric" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts" +--- +# `GenericResources` + +Generic resource operations across all fabric resource types. + +## Signature + +```typescript +class GenericResources extends BaseResource +``` + +## Inheritance + +**Extends:** [BaseResource](/docs/sdk-reference/reference/typescript/rest/base/base-resource) + +## Methods + +### assignDomainApplication + +Assign a domain application to a fabric resource. + +#### Signature + +```typescript +assignDomainApplication(resourceId: string, body: any): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + + + Domain application payload. + + +#### Returns + +`Promise` — The domain-application assignment record. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/fabric.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts) + +Line 319. + +*** + +### assignPhoneRoute + + + **Deprecated.** For the common cases — SWML webhooks, cXML webhooks, AI agents — this endpoint **does not work**. Bindings for those are configured on the phone number via [PhoneNumbersResource.setSwmlWebhook](/docs/sdk-reference/reference/typescript/rest/namespaces/phone-numbers/phone-numbers-resource#set-swml-webhook) / `setCxmlWebhook` / `setAiAgent`, and the Fabric resource is auto-materialized by the server. Calling this method against `swml_webhook`, `cxml_webhook`, or `ai_agent` resource IDs returns `404` or `422`. The endpoint (`POST /api/fabric/resources/{id}/phone_routes`) applies only to a narrow set of legacy resource types listed in `rest-apis/relay-rest/openapi.yaml`. Emits a one-time deprecation warning on first call; kept for backwards compatibility. + + +Assign a phone route to a fabric resource. + +#### Signature + +```typescript +assignPhoneRoute(resourceId: string, body: any): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + + + Phone route payload. + + +#### Returns + +`Promise` — The phone-route assignment record. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/fabric.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts) + +Line 297. + +*** + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient, basePath: string): GenericResources +``` + +#### Parameters + + + + + +#### Returns + +`GenericResources` + +#### Source + +[`src/rest/namespaces/fabric.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts) + +Line 229. + +*** + +### delete + +Delete a fabric resource. + +#### Signature + +```typescript +delete(resourceId: string): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + +#### Returns + +`Promise` — The platform's delete response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/fabric.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts) + +Line 262. + +*** + +### get + +Fetch a single fabric resource by ID. + +#### Signature + +```typescript +get(resourceId: string): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + +#### Returns + +`Promise` — The resource record. + +#### Throws + +- On any non-2xx HTTP response (including `404`). + +#### Source + +[`src/rest/namespaces/fabric.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts) + +Line 251. + +*** + +### list + +List all fabric resources regardless of specific type. + +#### Signature + +```typescript +list(params?: QueryParams): Promise +``` + +#### Parameters + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — A paginated list of generic fabric resources. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/fabric.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts) + +Line 240. + +*** + +### listAddresses + +List addresses associated with any fabric resource. + +#### Signature + +```typescript +listAddresses(resourceId: string, params?: QueryParams): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — A paginated list of addresses. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/fabric.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts) + +Line 274. + +## Source + +[`src/rest/namespaces/fabric.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts) + +Line 226. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/fabric/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/fabric/index.mdx new file mode 100644 index 0000000000..fd5e21b9e8 --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/fabric/index.mdx @@ -0,0 +1,82 @@ +--- +slug: "/reference/typescript/rest/namespaces/fabric" +title: "fabric" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "rest.namespaces.fabric" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts" +--- +# `fabric` + +## Signature + +```typescript +module fabric +``` + +## Classes + + + + Fabric webhook resource that is normally auto-materialized by the corresponding `phoneNumbers.set*Webhook` helper. + + + + Call flows with version management. Uses singular `call_flow` for sub-resource paths. + + + + Conference rooms — uses singular 'conference\_room' for sub-resource paths. + + + + cXML applications — no create method (read/update/delete only). + + + + Auto-materialized cXML webhook — normally created via `phoneNumbers.setCxmlWebhook`. + + + + Read-only fabric addresses. + + + + Fabric API namespace grouping all resource types. + + + + Standard fabric resource with CRUD + addresses (PATCH updates). + + + + Fabric resource that uses PUT for updates. + + + + Subscriber, guest, invite, and embed token creation. + + + + Generic resource operations across all fabric resource types. + + + + Subscribers with SIP endpoint management. + + + + Auto-materialized SWML webhook — normally created via `phoneNumbers.setSwmlWebhook`. + + + +## Source + +[`src/rest/namespaces/fabric.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/fabric/subscribers-resource/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/fabric/subscribers-resource/index.mdx new file mode 100644 index 0000000000..030e13573d --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/fabric/subscribers-resource/index.mdx @@ -0,0 +1,450 @@ +--- +slug: "/reference/typescript/rest/namespaces/fabric/subscribers-resource" +title: "SubscribersResource" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "rest.namespaces.fabric.SubscribersResource" + parent: "rest.namespaces.fabric" + module: "rest.namespaces.fabric" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts" +--- +# `SubscribersResource` + +Subscribers with SIP endpoint management. + +## Signature + +```typescript +class SubscribersResource extends FabricResourcePUT +``` + +## Inheritance + +**Extends:** [FabricResourcePUT](/docs/sdk-reference/reference/typescript/rest/namespaces/fabric/fabric-resource-put) + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient, basePath: string): SubscribersResource +``` + +#### Parameters + + + + + +#### Returns + +`SubscribersResource` + +#### Source + +[`src/rest/namespaces/fabric.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts) + +Line 96. + +*** + +### create + +Create a new resource. + +#### Signature + +```typescript +create(body: any): Promise +``` + +#### Parameters + + + Request body describing the resource to create. + + +#### Returns + +`Promise` — The newly-created resource. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 55. + +*** + +### createSipEndpoint + +Register a new SIP endpoint under a subscriber. + +#### Signature + +```typescript +createSipEndpoint(subscriberId: string, body: any): Promise +``` + +#### Parameters + + + Unique identifier of the subscriber. + + + + SIP endpoint payload (credentials, codecs, etc.). + + +#### Returns + +`Promise` — The newly-created SIP endpoint record. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/fabric.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts) + +Line 120. + +*** + +### delete + +Delete a resource by ID. + +#### Signature + +```typescript +delete(resourceId: string): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + +#### Returns + +`Promise` — The platform's delete response (often an empty body on success). + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 95. + +*** + +### deleteSipEndpoint + +Delete a SIP endpoint. + +#### Signature + +```typescript +deleteSipEndpoint(subscriberId: string, endpointId: string): Promise +``` + +#### Parameters + + + Unique identifier of the subscriber. + + + + Unique identifier of the SIP endpoint. + + +#### Returns + +`Promise` — The platform's delete response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/fabric.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts) + +Line 157. + +*** + +### get + +Fetch a single resource by ID. + +#### Signature + +```typescript +get(resourceId: string): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + +#### Returns + +`Promise` — The resource record. + +#### Throws + +- On any non-2xx HTTP response (including `404`). + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 66. + +*** + +### getSipEndpoint + +Fetch a single SIP endpoint by ID. + +#### Signature + +```typescript +getSipEndpoint(subscriberId: string, endpointId: string): Promise +``` + +#### Parameters + + + Unique identifier of the subscriber. + + + + Unique identifier of the SIP endpoint. + + +#### Returns + +`Promise` — The SIP endpoint record. + +#### Throws + +- On any non-2xx HTTP response (including `404`). + +#### Source + +[`src/rest/namespaces/fabric.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts) + +Line 132. + +*** + +### list + +List resources with optional query parameters. + +#### Signature + +```typescript +list(params?: QueryParams): Promise +``` + +#### Parameters + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — The paginated list response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 44. + +*** + +### listAddresses + +List addresses associated with a specific resource instance. + +#### Signature + +```typescript +listAddresses(resourceId: string, params?: QueryParams): Promise +``` + +#### Parameters + + + Unique identifier of the owning resource. + + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — A paginated list of addresses. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudWithAddresses.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudWithAddresses.ts) + +Line 34. + +*** + +### listSipEndpoints + +List the SIP endpoints registered under a subscriber. + +#### Signature + +```typescript +listSipEndpoints(subscriberId: string, params?: QueryParams): Promise +``` + +#### Parameters + + + Unique identifier of the subscriber. + + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — A paginated list of SIP endpoints. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/fabric.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts) + +Line 108. + +*** + +### update + +Update a resource by ID. + +Uses HTTP `PATCH` by default; subclasses may set `_updateMethod = 'PUT'` +when the remote API requires a full-replacement semantics. + +#### Signature + +```typescript +update(resourceId: string, body: any): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + + + Request body with updated fields. + + +#### Returns + +`Promise` — The updated resource. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 81. + +*** + +### updateSipEndpoint + +Update a SIP endpoint's settings. + +#### Signature + +```typescript +updateSipEndpoint( + subscriberId: string, + endpointId: string, + body: any +): Promise +``` + +#### Parameters + + + Unique identifier of the subscriber. + + + + Unique identifier of the SIP endpoint. + + + + Partial update payload (PATCH semantics). + + +#### Returns + +`Promise` — The updated SIP endpoint record. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/fabric.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts) + +Line 145. + +## Source + +[`src/rest/namespaces/fabric.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts) + +Line 95. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/fabric/swml-webhooks-resource/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/fabric/swml-webhooks-resource/index.mdx new file mode 100644 index 0000000000..9223b18f8e --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/fabric/swml-webhooks-resource/index.mdx @@ -0,0 +1,258 @@ +--- +slug: "/reference/typescript/rest/namespaces/fabric/swml-webhooks-resource" +title: "SwmlWebhooksResource" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "rest.namespaces.fabric.SwmlWebhooksResource" + parent: "rest.namespaces.fabric" + module: "rest.namespaces.fabric" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts" +--- +# `SwmlWebhooksResource` + +Auto-materialized SWML webhook — normally created via `phoneNumbers.setSwmlWebhook`. + +## Signature + +```typescript +class SwmlWebhooksResource extends AutoMaterializedWebhookResource +``` + +## Inheritance + +**Extends:** [AutoMaterializedWebhookResource](/docs/sdk-reference/reference/typescript/rest/namespaces/fabric/auto-materialized-webhook-resource) + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient, basePath: string): SwmlWebhooksResource +``` + +#### Parameters + + + + + +#### Returns + +`SwmlWebhooksResource` + +#### Source + +[`src/rest/namespaces/fabric.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts) + +Line 190. + +*** + +### create + + + **Deprecated.** Creating a webhook Fabric resource directly produces an orphan that is not bound to any phone number. Use the `phoneNumbers.setSwmlWebhook` / `setCxmlWebhook` helper instead — it updates the phone number and the server auto-materializes the resource. Kept for backwards compatibility. + + +#### Signature + +```typescript +create(body: any = {}): Promise +``` + +#### Parameters + + + +#### Returns + +`Promise` + +#### Source + +[`src/rest/namespaces/fabric.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts) + +Line 201. + +*** + +### delete + +Delete a resource by ID. + +#### Signature + +```typescript +delete(resourceId: string): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + +#### Returns + +`Promise` — The platform's delete response (often an empty body on success). + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 95. + +*** + +### get + +Fetch a single resource by ID. + +#### Signature + +```typescript +get(resourceId: string): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + +#### Returns + +`Promise` — The resource record. + +#### Throws + +- On any non-2xx HTTP response (including `404`). + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 66. + +*** + +### list + +List resources with optional query parameters. + +#### Signature + +```typescript +list(params?: QueryParams): Promise +``` + +#### Parameters + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — The paginated list response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 44. + +*** + +### listAddresses + +List addresses associated with a specific resource instance. + +#### Signature + +```typescript +listAddresses(resourceId: string, params?: QueryParams): Promise +``` + +#### Parameters + + + Unique identifier of the owning resource. + + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — A paginated list of addresses. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudWithAddresses.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudWithAddresses.ts) + +Line 34. + +*** + +### update + +Update a resource by ID. + +Uses HTTP `PATCH` by default; subclasses may set `_updateMethod = 'PUT'` +when the remote API requires a full-replacement semantics. + +#### Signature + +```typescript +update(resourceId: string, body: any): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + + + Request body with updated fields. + + +#### Returns + +`Promise` — The updated resource. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 81. + +## Source + +[`src/rest/namespaces/fabric.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts) + +Line 216. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/imported-numbers/imported-numbers-resource/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/imported-numbers/imported-numbers-resource/index.mdx new file mode 100644 index 0000000000..b49267c62f --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/imported-numbers/imported-numbers-resource/index.mdx @@ -0,0 +1,91 @@ +--- +slug: "/reference/typescript/rest/namespaces/imported-numbers/imported-numbers-resource" +title: "ImportedNumbersResource" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "rest.namespaces.imported-numbers.ImportedNumbersResource" + parent: "rest.namespaces.imported-numbers" + module: "rest.namespaces.imported-numbers" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/imported-numbers.ts" +--- +# `ImportedNumbersResource` + +Import externally-hosted phone numbers. + +Access via `client.importedNumbers.*`. + +## Signature + +```typescript +class ImportedNumbersResource extends BaseResource +``` + +## Inheritance + +**Extends:** [BaseResource](/docs/sdk-reference/reference/typescript/rest/base/base-resource) + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient): ImportedNumbersResource +``` + +#### Parameters + + + +#### Returns + +`ImportedNumbersResource` + +#### Source + +[`src/rest/namespaces/imported-numbers.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/imported-numbers.ts) + +Line 16. + +*** + +### create + +Import an externally-hosted phone number into this project. + +#### Signature + +```typescript +create(body: any): Promise +``` + +#### Parameters + + + Import payload specifying the number, carrier details, and any routing configuration required by the platform. + + +#### Returns + +`Promise` — The newly-imported phone-number record. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/imported-numbers.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/imported-numbers.ts) + +Line 28. + +## Source + +[`src/rest/namespaces/imported-numbers.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/imported-numbers.ts) + +Line 15. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/imported-numbers/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/imported-numbers/index.mdx new file mode 100644 index 0000000000..dedff05d68 --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/imported-numbers/index.mdx @@ -0,0 +1,34 @@ +--- +slug: "/reference/typescript/rest/namespaces/imported-numbers" +title: "imported-numbers" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "rest.namespaces.imported-numbers" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/imported-numbers.ts" +--- +# `imported-numbers` + +## Signature + +```typescript +module imported-numbers +``` + +## Classes + + + + Import externally-hosted phone numbers. + + + +## Source + +[`src/rest/namespaces/imported-numbers.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/imported-numbers.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/logs/conference-logs/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/logs/conference-logs/index.mdx new file mode 100644 index 0000000000..57d366646a --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/logs/conference-logs/index.mdx @@ -0,0 +1,91 @@ +--- +slug: "/reference/typescript/rest/namespaces/logs/conference-logs" +title: "ConferenceLogs" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "rest.namespaces.logs.ConferenceLogs" + parent: "rest.namespaces.logs" + module: "rest.namespaces.logs" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/logs.ts" +--- +# `ConferenceLogs` + +Conference log queries. + +## Signature + +```typescript +class ConferenceLogs extends BaseResource +``` + +## Inheritance + +**Extends:** [BaseResource](/docs/sdk-reference/reference/typescript/rest/base/base-resource) + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient, basePath: string): ConferenceLogs +``` + +#### Parameters + + + + + +#### Returns + +`ConferenceLogs` + +#### Source + +[`src/rest/namespaces/logs.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/logs.ts) + +Line 113. + +*** + +### list + +List conference log entries. + +#### Signature + +```typescript +list(params?: QueryParams): Promise +``` + +#### Parameters + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — A paginated list of conference log entries. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/logs.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/logs.ts) + +Line 124. + +## Source + +[`src/rest/namespaces/logs.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/logs.ts) + +Line 112. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/logs/fax-logs/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/logs/fax-logs/index.mdx new file mode 100644 index 0000000000..5b7a0908c2 --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/logs/fax-logs/index.mdx @@ -0,0 +1,123 @@ +--- +slug: "/reference/typescript/rest/namespaces/logs/fax-logs" +title: "FaxLogs" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "rest.namespaces.logs.FaxLogs" + parent: "rest.namespaces.logs" + module: "rest.namespaces.logs" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/logs.ts" +--- +# `FaxLogs` + +Fax log queries. + +## Signature + +```typescript +class FaxLogs extends BaseResource +``` + +## Inheritance + +**Extends:** [BaseResource](/docs/sdk-reference/reference/typescript/rest/base/base-resource) + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient, basePath: string): FaxLogs +``` + +#### Parameters + + + + + +#### Returns + +`FaxLogs` + +#### Source + +[`src/rest/namespaces/logs.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/logs.ts) + +Line 84. + +*** + +### get + +Fetch a single fax log entry by ID. + +#### Signature + +```typescript +get(logId: string): Promise +``` + +#### Parameters + + + Unique identifier of the log entry. + + +#### Returns + +`Promise` — The log entry record. + +#### Throws + +- On any non-2xx HTTP response (including `404`). + +#### Source + +[`src/rest/namespaces/logs.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/logs.ts) + +Line 106. + +*** + +### list + +List fax log entries. + +#### Signature + +```typescript +list(params?: QueryParams): Promise +``` + +#### Parameters + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — A paginated list of fax log entries. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/logs.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/logs.ts) + +Line 95. + +## Source + +[`src/rest/namespaces/logs.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/logs.ts) + +Line 83. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/logs/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/logs/index.mdx new file mode 100644 index 0000000000..9512d2507e --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/logs/index.mdx @@ -0,0 +1,50 @@ +--- +slug: "/reference/typescript/rest/namespaces/logs" +title: "logs" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "rest.namespaces.logs" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/logs.ts" +--- +# `logs` + +## Signature + +```typescript +module logs +``` + +## Classes + + + + Conference log queries. + + + + Fax log queries. + + + + Logs API namespace. + + + + Message log queries. + + + + Voice log queries. + + + +## Source + +[`src/rest/namespaces/logs.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/logs.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/logs/logs-namespace/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/logs/logs-namespace/index.mdx new file mode 100644 index 0000000000..7da15aa50c --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/logs/logs-namespace/index.mdx @@ -0,0 +1,74 @@ +--- +slug: "/reference/typescript/rest/namespaces/logs/logs-namespace" +title: "LogsNamespace" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "rest.namespaces.logs.LogsNamespace" + parent: "rest.namespaces.logs" + module: "rest.namespaces.logs" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/logs.ts" +--- +# `LogsNamespace` + +Logs API namespace. + +Access via `client.logs.*`. Read-only access to message, voice, fax, and +conference logs for auditing and observability. + +## Signature + +```typescript +class LogsNamespace +``` + +## Properties + + + Conference log queries. + + + + Fax log queries. + + + + SMS/MMS message log queries. + + + + Voice call log queries with event drill-down. + + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient): LogsNamespace +``` + +#### Parameters + + + +#### Returns + +`LogsNamespace` + +#### Source + +[`src/rest/namespaces/logs.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/logs.ts) + +Line 145. + +## Source + +[`src/rest/namespaces/logs.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/logs.ts) + +Line 135. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/logs/message-logs/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/logs/message-logs/index.mdx new file mode 100644 index 0000000000..09360e440c --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/logs/message-logs/index.mdx @@ -0,0 +1,123 @@ +--- +slug: "/reference/typescript/rest/namespaces/logs/message-logs" +title: "MessageLogs" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "rest.namespaces.logs.MessageLogs" + parent: "rest.namespaces.logs" + module: "rest.namespaces.logs" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/logs.ts" +--- +# `MessageLogs` + +Message log queries. + +## Signature + +```typescript +class MessageLogs extends BaseResource +``` + +## Inheritance + +**Extends:** [BaseResource](/docs/sdk-reference/reference/typescript/rest/base/base-resource) + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient, basePath: string): MessageLogs +``` + +#### Parameters + + + + + +#### Returns + +`MessageLogs` + +#### Source + +[`src/rest/namespaces/logs.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/logs.ts) + +Line 13. + +*** + +### get + +Fetch a single message log entry by ID. + +#### Signature + +```typescript +get(logId: string): Promise +``` + +#### Parameters + + + Unique identifier of the log entry. + + +#### Returns + +`Promise` — The log entry record. + +#### Throws + +- On any non-2xx HTTP response (including `404`). + +#### Source + +[`src/rest/namespaces/logs.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/logs.ts) + +Line 36. + +*** + +### list + +List message log entries. + +#### Signature + +```typescript +list(params?: QueryParams): Promise +``` + +#### Parameters + + + Optional filter / pagination query parameters (e.g. date range, direction, status). + + +#### Returns + +`Promise` — A paginated list of message log entries. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/logs.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/logs.ts) + +Line 25. + +## Source + +[`src/rest/namespaces/logs.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/logs.ts) + +Line 12. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/logs/voice-logs/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/logs/voice-logs/index.mdx new file mode 100644 index 0000000000..10d7f5bbf2 --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/logs/voice-logs/index.mdx @@ -0,0 +1,159 @@ +--- +slug: "/reference/typescript/rest/namespaces/logs/voice-logs" +title: "VoiceLogs" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "rest.namespaces.logs.VoiceLogs" + parent: "rest.namespaces.logs" + module: "rest.namespaces.logs" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/logs.ts" +--- +# `VoiceLogs` + +Voice log queries. + +## Signature + +```typescript +class VoiceLogs extends BaseResource +``` + +## Inheritance + +**Extends:** [BaseResource](/docs/sdk-reference/reference/typescript/rest/base/base-resource) + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient, basePath: string): VoiceLogs +``` + +#### Parameters + + + + + +#### Returns + +`VoiceLogs` + +#### Source + +[`src/rest/namespaces/logs.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/logs.ts) + +Line 43. + +*** + +### get + +Fetch a single voice log entry by ID. + +#### Signature + +```typescript +get(logId: string): Promise +``` + +#### Parameters + + + Unique identifier of the log entry. + + +#### Returns + +`Promise` — The log entry record. + +#### Throws + +- On any non-2xx HTTP response (including `404`). + +#### Source + +[`src/rest/namespaces/logs.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/logs.ts) + +Line 65. + +*** + +### list + +List voice (call) log entries. + +#### Signature + +```typescript +list(params?: QueryParams): Promise +``` + +#### Parameters + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — A paginated list of voice log entries. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/logs.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/logs.ts) + +Line 54. + +*** + +### listEvents + +List events captured during a voice log entry. + +#### Signature + +```typescript +listEvents(logId: string, params?: QueryParams): Promise +``` + +#### Parameters + + + Unique identifier of the log entry. + + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — A paginated list of events for the log entry. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/logs.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/logs.ts) + +Line 77. + +## Source + +[`src/rest/namespaces/logs.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/logs.ts) + +Line 42. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/lookup/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/lookup/index.mdx new file mode 100644 index 0000000000..1063393830 --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/lookup/index.mdx @@ -0,0 +1,34 @@ +--- +slug: "/reference/typescript/rest/namespaces/lookup" +title: "lookup" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "rest.namespaces.lookup" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/lookup.ts" +--- +# `lookup` + +## Signature + +```typescript +module lookup +``` + +## Classes + + + + Phone number lookup (carrier, CNAM). + + + +## Source + +[`src/rest/namespaces/lookup.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/lookup.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/lookup/lookup-resource/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/lookup/lookup-resource/index.mdx new file mode 100644 index 0000000000..fb456fc169 --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/lookup/lookup-resource/index.mdx @@ -0,0 +1,101 @@ +--- +slug: "/reference/typescript/rest/namespaces/lookup/lookup-resource" +title: "LookupResource" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "rest.namespaces.lookup.LookupResource" + parent: "rest.namespaces.lookup" + module: "rest.namespaces.lookup" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/lookup.ts" +--- +# `LookupResource` + +Phone number lookup (carrier, CNAM). + +Access via `client.lookup.*`. + +## Signature + +```typescript +class LookupResource extends BaseResource +``` + +## Inheritance + +**Extends:** [BaseResource](/docs/sdk-reference/reference/typescript/rest/base/base-resource) + +## Examples + +```typescript +const info = await client.lookup.phoneNumber('+15551234567', { include: 'carrier,caller-name' }); +``` + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient): LookupResource +``` + +#### Parameters + + + +#### Returns + +`LookupResource` + +#### Source + +[`src/rest/namespaces/lookup.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/lookup.ts) + +Line 22. + +*** + +### phoneNumber + +Look up carrier and CNAM information for a phone number. + +#### Signature + +```typescript +phoneNumber(e164: string, params?: QueryParams): Promise +``` + +#### Parameters + + + The phone number in E.164 format (e.g. `"+15551234567"`). + + + + Optional query parameters, most commonly `include: "carrier,caller-name"` to enable carrier and CNAM lookups. + + +#### Returns + +`Promise` — The lookup record containing any requested datasets. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/lookup.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/lookup.ts) + +Line 35. + +## Source + +[`src/rest/namespaces/lookup.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/lookup.ts) + +Line 21. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/mfa/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/mfa/index.mdx new file mode 100644 index 0000000000..17f97910a6 --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/mfa/index.mdx @@ -0,0 +1,34 @@ +--- +slug: "/reference/typescript/rest/namespaces/mfa" +title: "mfa" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "rest.namespaces.mfa" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/mfa.ts" +--- +# `mfa` + +## Signature + +```typescript +module mfa +``` + +## Classes + + + + Multi-factor authentication via SMS or phone call. + + + +## Source + +[`src/rest/namespaces/mfa.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/mfa.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/mfa/mfa-resource/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/mfa/mfa-resource/index.mdx new file mode 100644 index 0000000000..5a2b4e7227 --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/mfa/mfa-resource/index.mdx @@ -0,0 +1,168 @@ +--- +slug: "/reference/typescript/rest/namespaces/mfa/mfa-resource" +title: "MfaResource" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "rest.namespaces.mfa.MfaResource" + parent: "rest.namespaces.mfa" + module: "rest.namespaces.mfa" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/mfa.ts" +--- +# `MfaResource` + +Multi-factor authentication via SMS or phone call. + +Access via `client.mfa.*`. Two-step flow: call `.sms()` or `.call()` to send +a code, then `.verify()` to confirm it. + +## Signature + +```typescript +class MfaResource extends BaseResource +``` + +## Inheritance + +**Extends:** [BaseResource](/docs/sdk-reference/reference/typescript/rest/base/base-resource) + +## Examples + +```typescript +const req = await client.mfa.sms({ to: '+15551234567' }); +const result = await client.mfa.verify(req.id, { token: '123456' }); +``` + +## Methods + +### call + +Initiate MFA by placing a phone call that reads out a one-time code. + +#### Signature + +```typescript +call(body: any): Promise +``` + +#### Parameters + + + MFA request payload (typically `{ to: "+15551234567" }`). + + +#### Returns + +`Promise` — The MFA request record; its `id` is used by [verify](/docs/sdk-reference/reference/typescript/rest/namespaces/mfa/mfa-resource#verify). + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/mfa.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/mfa.ts) + +Line 46. + +*** + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient): MfaResource +``` + +#### Parameters + + + +#### Returns + +`MfaResource` + +#### Source + +[`src/rest/namespaces/mfa.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/mfa.ts) + +Line 23. + +*** + +### sms + +Initiate MFA by sending a one-time code to a phone number over SMS. + +#### Signature + +```typescript +sms(body: any): Promise +``` + +#### Parameters + + + MFA request payload (typically `{ to: "+15551234567", + message?: "Your code is {code}" }`). + + +#### Returns + +`Promise` — The MFA request record; its `id` is used by [verify](/docs/sdk-reference/reference/typescript/rest/namespaces/mfa/mfa-resource#verify). + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/mfa.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/mfa.ts) + +Line 35. + +*** + +### verify + +Verify the one-time code the user received via SMS or call. + +#### Signature + +```typescript +verify(requestId: string, body: any): Promise +``` + +#### Parameters + + + The `id` returned from [sms](/docs/sdk-reference/reference/typescript/rest/namespaces/mfa/mfa-resource#sms) or [call](/docs/sdk-reference/reference/typescript/rest/namespaces/mfa/mfa-resource#call). + + + + Verification payload (typically `{ token: "123456" }`). + + +#### Returns + +`Promise` — The verification result — success or failure shape. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/mfa.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/mfa.ts) + +Line 58. + +## Source + +[`src/rest/namespaces/mfa.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/mfa.ts) + +Line 22. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/number-groups/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/number-groups/index.mdx new file mode 100644 index 0000000000..e29d76a36e --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/number-groups/index.mdx @@ -0,0 +1,34 @@ +--- +slug: "/reference/typescript/rest/namespaces/number-groups" +title: "number-groups" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "rest.namespaces.number-groups" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/number-groups.ts" +--- +# `number-groups` + +## Signature + +```typescript +module number-groups +``` + +## Classes + + + + Number group management with membership operations. + + + +## Source + +[`src/rest/namespaces/number-groups.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/number-groups.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/number-groups/number-groups-resource/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/number-groups/number-groups-resource/index.mdx new file mode 100644 index 0000000000..0f41f7b19e --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/number-groups/number-groups-resource/index.mdx @@ -0,0 +1,362 @@ +--- +slug: "/reference/typescript/rest/namespaces/number-groups/number-groups-resource" +title: "NumberGroupsResource" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "rest.namespaces.number-groups.NumberGroupsResource" + parent: "rest.namespaces.number-groups" + module: "rest.namespaces.number-groups" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/number-groups.ts" +--- +# `NumberGroupsResource` + +Number group management with membership operations. + +Access via `client.numberGroups.*`. Extends standard CRUD with membership helpers. + +## Signature + +```typescript +class NumberGroupsResource extends CrudResource +``` + +## Inheritance + +**Extends:** [CrudResource](/docs/sdk-reference/reference/typescript/rest/base/crud-resource) + +## Methods + +### addMembership + +Add a phone number to a group. + +#### Signature + +```typescript +addMembership(groupId: string, body: any): Promise +``` + +#### Parameters + + + Unique identifier of the number group. + + + + Membership payload (typically `{ phone_number_id: "..." }`). + + +#### Returns + +`Promise` — The newly-created membership record. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/number-groups.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/number-groups.ts) + +Line 43. + +*** + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient): NumberGroupsResource +``` + +#### Parameters + + + +#### Returns + +`NumberGroupsResource` + +#### Source + +[`src/rest/namespaces/number-groups.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/number-groups.ts) + +Line 19. + +*** + +### create + +Create a new resource. + +#### Signature + +```typescript +create(body: any): Promise +``` + +#### Parameters + + + Request body describing the resource to create. + + +#### Returns + +`Promise` — The newly-created resource. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 55. + +*** + +### delete + +Delete a resource by ID. + +#### Signature + +```typescript +delete(resourceId: string): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + +#### Returns + +`Promise` — The platform's delete response (often an empty body on success). + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 95. + +*** + +### deleteMembership + +Remove a number from a group by deleting its membership. + +#### Signature + +```typescript +deleteMembership(membershipId: string): Promise +``` + +#### Parameters + + + Unique identifier of the membership. + + +#### Returns + +`Promise` — The platform's delete response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/number-groups.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/number-groups.ts) + +Line 65. + +*** + +### get + +Fetch a single resource by ID. + +#### Signature + +```typescript +get(resourceId: string): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + +#### Returns + +`Promise` — The resource record. + +#### Throws + +- On any non-2xx HTTP response (including `404`). + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 66. + +*** + +### getMembership + +Fetch a membership by ID. + +#### Signature + +```typescript +getMembership(membershipId: string): Promise +``` + +#### Parameters + + + Unique identifier of the membership. + + +#### Returns + +`Promise` — The membership record. + +#### Throws + +- On any non-2xx HTTP response (including `404`). + +#### Source + +[`src/rest/namespaces/number-groups.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/number-groups.ts) + +Line 54. + +*** + +### list + +List resources with optional query parameters. + +#### Signature + +```typescript +list(params?: QueryParams): Promise +``` + +#### Parameters + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — The paginated list response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 44. + +*** + +### listMemberships + +List memberships (phone-number assignments) in a group. + +#### Signature + +```typescript +listMemberships(groupId: string, params?: QueryParams): Promise +``` + +#### Parameters + + + Unique identifier of the number group. + + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — A paginated list of number-group memberships. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/number-groups.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/number-groups.ts) + +Line 31. + +*** + +### update + +Update a resource by ID. + +Uses HTTP `PATCH` by default; subclasses may set `_updateMethod = 'PUT'` +when the remote API requires a full-replacement semantics. + +#### Signature + +```typescript +update(resourceId: string, body: any): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + + + Request body with updated fields. + + +#### Returns + +`Promise` — The updated resource. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 81. + +## Source + +[`src/rest/namespaces/number-groups.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/number-groups.ts) + +Line 16. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/phone-numbers/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/phone-numbers/index.mdx new file mode 100644 index 0000000000..2794007471 --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/phone-numbers/index.mdx @@ -0,0 +1,140 @@ +--- +slug: "/reference/typescript/rest/namespaces/phone-numbers" +title: "phone-numbers" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "rest.namespaces.phone-numbers" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/phone-numbers.ts" +--- +# `phone-numbers` + +## Signature + +```typescript +module phone-numbers +``` + +## Classes + + + + Phone number management. + + + +## Interfaces + +### SetCallFlowParams + +Parameters for [PhoneNumbersResource.setCallFlow](/docs/sdk-reference/reference/typescript/rest/namespaces/phone-numbers/phone-numbers-resource#set-call-flow). + +#### Signature + +```typescript +interface SetCallFlowParams +``` + +#### Properties + + + Call Flow resource ID. Serialized as `call_flow_id`. + + + + Optional pinned version — `"working_copy"` or `"current_deployed"` (server default when omitted). Serialized as `call_flow_version`. + + +#### Source + +[`src/rest/namespaces/phone-numbers.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/phone-numbers.ts) + +Line 30. + +*** + +### SetCxmlWebhookParams + +Parameters for [PhoneNumbersResource.setCxmlWebhook](/docs/sdk-reference/reference/typescript/rest/namespaces/phone-numbers/phone-numbers-resource#set-cxml-webhook). + +#### Signature + +```typescript +interface SetCxmlWebhookParams +``` + +#### Properties + + + Fallback URL if the primary request fails. Serialized as `call_fallback_url`. + + + + Status callback URL for call status updates. Serialized as `call_status_callback_url`. + + + + Primary cXML document URL. Serialized as `call_request_url`. + + +#### Source + +[`src/rest/namespaces/phone-numbers.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/phone-numbers.ts) + +Line 18. + +*** + +### SetRelayTopicParams + +Parameters for [PhoneNumbersResource.setRelayTopic](/docs/sdk-reference/reference/typescript/rest/namespaces/phone-numbers/phone-numbers-resource#set-relay-topic). + +#### Signature + +```typescript +interface SetRelayTopicParams +``` + +#### Properties + + + Optional status callback URL for RELAY topic delivery updates. Serialized as `call_relay_topic_status_callback_url`. + + + + RELAY topic name. Serialized as `call_relay_topic`. + + +#### Source + +[`src/rest/namespaces/phone-numbers.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/phone-numbers.ts) + +Line 43. + +*** + +### SetSwmlWebhookExtra + +Optional companion fields for [PhoneNumbersResource.setSwmlWebhook](/docs/sdk-reference/reference/typescript/rest/namespaces/phone-numbers/phone-numbers-resource#set-swml-webhook). + +#### Signature + +```typescript +interface SetSwmlWebhookExtra +``` + +#### Source + +[`src/rest/namespaces/phone-numbers.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/phone-numbers.ts) + +Line 13. + +## Source + +[`src/rest/namespaces/phone-numbers.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/phone-numbers.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/phone-numbers/phone-numbers-resource/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/phone-numbers/phone-numbers-resource/index.mdx new file mode 100644 index 0000000000..d03ce9a06f --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/phone-numbers/phone-numbers-resource/index.mdx @@ -0,0 +1,571 @@ +--- +slug: "/reference/typescript/rest/namespaces/phone-numbers/phone-numbers-resource" +title: "PhoneNumbersResource" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "rest.namespaces.phone-numbers.PhoneNumbersResource" + parent: "rest.namespaces.phone-numbers" + module: "rest.namespaces.phone-numbers" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/phone-numbers.ts" +--- +# `PhoneNumbersResource` + +Phone number management. + +Supports the standard CRUD surface plus typed helpers for binding an +inbound call to a handler (SWML webhook, cXML webhook, AI agent, call +flow, RELAY application/topic). The binding model is: set `call_handler` + +- the handler-specific companion field on the phone number; the server + auto-materializes the matching Fabric resource. See + `PhoneCallHandler` for the enum of valid `call_handler` values. + +`create` and `update` accept an untyped body object (`body: any = {}`). +No `PhoneNumberCreateParams` / `PhoneNumberUpdateParams` interfaces are +defined because the Python reference SDK uses bare `**kwargs` with no +named or typed parameters — there is no Python type contract to port. +This is an intentional IDIOMATIC\_DEVIATION: Python kwargs ↔ TS `any` object +literal with an optional default of `{}` to preserve call-without-args +semantics. If the REST API stabilises a known field set, consider adding +typed interfaces and specialising `CrudResource<>` generics here. + +## Signature + +```typescript +class PhoneNumbersResource extends CrudResource +``` + +## Inheritance + +**Extends:** [CrudResource](/docs/sdk-reference/reference/typescript/rest/base/crud-resource) + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient): PhoneNumbersResource +``` + +#### Parameters + + + +#### Returns + +`PhoneNumbersResource` + +#### Source + +[`src/rest/namespaces/phone-numbers.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/phone-numbers.ts) + +Line 77. + +*** + +### create + +Purchase / create a phone number resource in this project. +Body is optional to match Python's `**kwargs` call convention. + +#### Signature + +```typescript +create(body: any = {}): Promise +``` + +#### Parameters + + + Phone-number creation payload (platform-shaped JSON). Defaults to `{}` when omitted. + + +#### Returns + +`Promise` — The newly-created phone-number resource. + +#### Throws + +- On any non-2xx HTTP response. + +#### Examples + +```typescript +const num = await client.phoneNumbers.create({ number: '+15551234567' }); +``` + +#### Source + +[`src/rest/namespaces/phone-numbers.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/phone-numbers.ts) + +Line 95. + +*** + +### delete + +Delete a resource by ID. + +#### Signature + +```typescript +delete(resourceId: string): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + +#### Returns + +`Promise` — The platform's delete response (often an empty body on success). + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 95. + +*** + +### get + +Fetch a single resource by ID. + +#### Signature + +```typescript +get(resourceId: string): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + +#### Returns + +`Promise` — The resource record. + +#### Throws + +- On any non-2xx HTTP response (including `404`). + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 66. + +*** + +### list + +List resources with optional query parameters. + +#### Signature + +```typescript +list(params?: QueryParams): Promise +``` + +#### Parameters + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — The paginated list response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 44. + +*** + +### search + +Search available phone numbers for purchase. + +#### Signature + +```typescript +search(params?: QueryParams): Promise +``` + +#### Parameters + + + Search filters (e.g. `areaCode`, `contains`, `region`, `number_type`, pagination). + + +#### Returns + +`Promise` — A paginated list of matching available numbers. + +#### Throws + +- On any non-2xx HTTP response. + +#### Examples + +```typescript +const results = await client.phoneNumbers.search({ areaCode: '512', contains: '5555' }); +``` + +#### Source + +[`src/rest/namespaces/phone-numbers.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/phone-numbers.ts) + +Line 129. + +*** + +### setAiAgent + +Route inbound calls to an AI Agent Fabric resource by ID. + +#### Signature + +```typescript +setAiAgent( + resourceId: string, + agentId: string, + extra: Record = {} +): Promise +``` + +#### Parameters + + + Unique phone-number resource ID. + + + + AI agent Fabric resource ID. + + + + Additional wire-level fields merged into the body. + + +#### Returns + +`Promise` — The updated phone-number resource. + +#### Source + +[`src/rest/namespaces/phone-numbers.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/phone-numbers.ts) + +Line 227. + +*** + +### setCallFlow + +Route inbound calls to a Call Flow by ID. + +`version` accepts `"working_copy"` or `"current_deployed"` (server +default when omitted). + +#### Signature + +```typescript +setCallFlow(resourceId: string, params: SetCallFlowParams): Promise +``` + +#### Parameters + + + Unique phone-number resource ID. + + + + Flow ID and optional pinned version plus any extra wire-level fields. + + +#### Returns + +`Promise` — The updated phone-number resource. + +#### Source + +[`src/rest/namespaces/phone-numbers.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/phone-numbers.ts) + +Line 246. + +*** + +### setCxmlApplication + +Route inbound calls to an existing cXML application by ID. + +#### Signature + +```typescript +setCxmlApplication( + resourceId: string, + applicationId: string, + extra: Record = {} +): Promise +``` + +#### Parameters + + + Unique phone-number resource ID. + + + + cXML application ID. + + + + Additional wire-level fields merged into the body. + + +#### Returns + +`Promise` — The updated phone-number resource. + +#### Source + +[`src/rest/namespaces/phone-numbers.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/phone-numbers.ts) + +Line 211. + +*** + +### setCxmlWebhook + +Route inbound calls to a cXML (Twilio-compat / LAML) webhook. + +Despite the wire value `laml_webhooks` being plural, this creates a +single `cxml_webhook` Fabric resource. `fallbackUrl` is used when the +primary URL fails; `statusCallbackUrl` receives call status updates. + +#### Signature + +```typescript +setCxmlWebhook(resourceId: string, params: SetCxmlWebhookParams): Promise +``` + +#### Parameters + + + Unique phone-number resource ID. + + + + URL and optional fallback/status URLs plus any extra wire-level fields. + + +#### Returns + +`Promise` — The updated phone-number resource. + +#### Examples + +```typescript +await client.phoneNumbers.setCxmlWebhook('pn-1', { + url: 'https://example.com/voice.xml', + fallbackUrl: 'https://example.com/fallback.xml', +}); +``` + +#### Source + +[`src/rest/namespaces/phone-numbers.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/phone-numbers.ts) + +Line 187. + +*** + +### setRelayApplication + +Route inbound calls to a named RELAY application. + +#### Signature + +```typescript +setRelayApplication( + resourceId: string, + name: string, + extra: Record = {} +): Promise +``` + +#### Parameters + + + Unique phone-number resource ID. + + + + RELAY application name. + + + + Additional wire-level fields merged into the body. + + +#### Returns + +`Promise` — The updated phone-number resource. + +#### Source + +[`src/rest/namespaces/phone-numbers.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/phone-numbers.ts) + +Line 267. + +*** + +### setRelayTopic + +Route inbound calls to a RELAY topic (client subscription). + +#### Signature + +```typescript +setRelayTopic(resourceId: string, params: SetRelayTopicParams): Promise +``` + +#### Parameters + + + Unique phone-number resource ID. + + + + Topic name and optional status-callback URL plus any extra wire-level fields. + + +#### Returns + +`Promise` — The updated phone-number resource. + +#### Source + +[`src/rest/namespaces/phone-numbers.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/phone-numbers.ts) + +Line 283. + +*** + +### setSwmlWebhook + +Route inbound calls to an SWML webhook URL. + +Your backend returns an SWML document per call. The server +auto-creates a `swml_webhook` Fabric resource keyed off this URL — +you do **not** need to call `fabric.swmlWebhooks.create` or +`fabric.resources.assignPhoneRoute`. + +#### Signature + +```typescript +setSwmlWebhook( + resourceId: string, + url: string, + extra: SetSwmlWebhookExtra = {} +): Promise +``` + +#### Parameters + + + Unique phone-number resource ID. + + + + Your backend's SWML endpoint. + + + + Additional wire-level fields (e.g. `name`) merged into the PUT body. + + +#### Returns + +`Promise` — The updated phone-number resource. + +#### Examples + +```typescript +await client.phoneNumbers.setSwmlWebhook('pn-1', 'https://example.com/swml'); +``` + +#### Source + +[`src/rest/namespaces/phone-numbers.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/phone-numbers.ts) + +Line 159. + +*** + +### update + +Update a phone number resource by ID. Body is optional to match Python `**kwargs`. + +Setting `call_handler` + the matching companion field (see +`PhoneCallHandler`) on the phone number auto-materializes the +matching Fabric resource on the server; prefer the `set*` helpers +below for the common cases. + +#### Signature + +```typescript +update(resourceId: string, body: any = {}): Promise +``` + +#### Parameters + + + Unique phone-number resource ID. + + + + Partial update payload. Defaults to `{}`. + + +#### Returns + +`Promise` — The updated phone-number resource. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/phone-numbers.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/phone-numbers.ts) + +Line 112. + +## Source + +[`src/rest/namespaces/phone-numbers.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/phone-numbers.ts) + +Line 74. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/project/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/project/index.mdx new file mode 100644 index 0000000000..45b44f0227 --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/project/index.mdx @@ -0,0 +1,38 @@ +--- +slug: "/reference/typescript/rest/namespaces/project" +title: "project" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "rest.namespaces.project" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/project.ts" +--- +# `project` + +## Signature + +```typescript +module project +``` + +## Classes + + + + Project API namespace. + + + + Project API token management. + + + +## Source + +[`src/rest/namespaces/project.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/project.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/project/project-namespace/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/project/project-namespace/index.mdx new file mode 100644 index 0000000000..fccbd34e8f --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/project/project-namespace/index.mdx @@ -0,0 +1,62 @@ +--- +slug: "/reference/typescript/rest/namespaces/project/project-namespace" +title: "ProjectNamespace" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "rest.namespaces.project.ProjectNamespace" + parent: "rest.namespaces.project" + module: "rest.namespaces.project" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/project.ts" +--- +# `ProjectNamespace` + +Project API namespace. + +Access via `client.project.*`. Manages project-level resources like +secondary API tokens. + +## Signature + +```typescript +class ProjectNamespace +``` + +## Properties + + + Project-scoped API token create / update / delete. + + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient): ProjectNamespace +``` + +#### Parameters + + + +#### Returns + +`ProjectNamespace` + +#### Source + +[`src/rest/namespaces/project.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/project.ts) + +Line 62. + +## Source + +[`src/rest/namespaces/project.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/project.ts) + +Line 58. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/project/project-tokens/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/project/project-tokens/index.mdx new file mode 100644 index 0000000000..2130e6c4b7 --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/project/project-tokens/index.mdx @@ -0,0 +1,157 @@ +--- +slug: "/reference/typescript/rest/namespaces/project/project-tokens" +title: "ProjectTokens" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "rest.namespaces.project.ProjectTokens" + parent: "rest.namespaces.project" + module: "rest.namespaces.project" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/project.ts" +--- +# `ProjectTokens` + +Project API token management. + +## Signature + +```typescript +class ProjectTokens extends BaseResource +``` + +## Inheritance + +**Extends:** [BaseResource](/docs/sdk-reference/reference/typescript/rest/base/base-resource) + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient): ProjectTokens +``` + +#### Parameters + + + +#### Returns + +`ProjectTokens` + +#### Source + +[`src/rest/namespaces/project.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/project.ts) + +Line 12. + +*** + +### create + +Create a new project-scoped API token. + +#### Signature + +```typescript +create(body: any): Promise +``` + +#### Parameters + + + Token creation payload (friendly name, scopes, etc.). + + +#### Returns + +`Promise` — The newly-created token record, including the secret value (which is typically returned ONCE and not retrievable again). + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/project.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/project.ts) + +Line 24. + +*** + +### delete + +Revoke and delete a project API token. + +#### Signature + +```typescript +delete(tokenId: string): Promise +``` + +#### Parameters + + + Unique identifier of the token to revoke. + + +#### Returns + +`Promise` — The platform's delete response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/project.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/project.ts) + +Line 47. + +*** + +### update + +Update a project API token's attributes (e.g. friendly name). + +#### Signature + +```typescript +update(tokenId: string, body: any): Promise +``` + +#### Parameters + + + Unique identifier of the token. + + + + Partial update payload. + + +#### Returns + +`Promise` — The updated token record. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/project.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/project.ts) + +Line 36. + +## Source + +[`src/rest/namespaces/project.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/project.ts) + +Line 11. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/pubsub/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/pubsub/index.mdx new file mode 100644 index 0000000000..5ea5316300 --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/pubsub/index.mdx @@ -0,0 +1,34 @@ +--- +slug: "/reference/typescript/rest/namespaces/pubsub" +title: "pubsub" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "rest.namespaces.pubsub" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/pubsub.ts" +--- +# `pubsub` + +## Signature + +```typescript +module pubsub +``` + +## Classes + + + + PubSub token generation. + + + +## Source + +[`src/rest/namespaces/pubsub.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/pubsub.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/pubsub/pub-sub-resource/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/pubsub/pub-sub-resource/index.mdx new file mode 100644 index 0000000000..d3834fcd8b --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/pubsub/pub-sub-resource/index.mdx @@ -0,0 +1,92 @@ +--- +slug: "/reference/typescript/rest/namespaces/pubsub/pub-sub-resource" +title: "PubSubResource" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "rest.namespaces.pubsub.PubSubResource" + parent: "rest.namespaces.pubsub" + module: "rest.namespaces.pubsub" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/pubsub.ts" +--- +# `PubSubResource` + +PubSub token generation. + +Access via `client.pubsub.*`. Issues short-lived tokens that browser / mobile +clients can use to subscribe to project channels. + +## Signature + +```typescript +class PubSubResource extends BaseResource +``` + +## Inheritance + +**Extends:** [BaseResource](/docs/sdk-reference/reference/typescript/rest/base/base-resource) + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient): PubSubResource +``` + +#### Parameters + + + +#### Returns + +`PubSubResource` + +#### Source + +[`src/rest/namespaces/pubsub.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/pubsub.ts) + +Line 17. + +*** + +### createToken + +Generate a short-lived PubSub token. + +#### Signature + +```typescript +createToken(body: any): Promise +``` + +#### Parameters + + + Token payload (e.g. `{ namespace, channels, expires_in }`). + + +#### Returns + +`Promise` — The token record, typically `{ token: "eyJ..." }`. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/pubsub.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/pubsub.ts) + +Line 28. + +## Source + +[`src/rest/namespaces/pubsub.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/pubsub.ts) + +Line 16. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/queues/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/queues/index.mdx new file mode 100644 index 0000000000..c15652ef03 --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/queues/index.mdx @@ -0,0 +1,34 @@ +--- +slug: "/reference/typescript/rest/namespaces/queues" +title: "queues" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "rest.namespaces.queues" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/queues.ts" +--- +# `queues` + +## Signature + +```typescript +module queues +``` + +## Classes + + + + Queue management with member operations. + + + +## Source + +[`src/rest/namespaces/queues.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/queues.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/queues/queues-resource/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/queues/queues-resource/index.mdx new file mode 100644 index 0000000000..e2ca39f675 --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/queues/queues-resource/index.mdx @@ -0,0 +1,330 @@ +--- +slug: "/reference/typescript/rest/namespaces/queues/queues-resource" +title: "QueuesResource" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "rest.namespaces.queues.QueuesResource" + parent: "rest.namespaces.queues" + module: "rest.namespaces.queues" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/queues.ts" +--- +# `QueuesResource` + +Queue management with member operations. + +Access via `client.queues.*`. Extends standard CRUD with member list/fetch. + +## Signature + +```typescript +class QueuesResource extends CrudResource +``` + +## Inheritance + +**Extends:** [CrudResource](/docs/sdk-reference/reference/typescript/rest/base/crud-resource) + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient): QueuesResource +``` + +#### Parameters + + + +#### Returns + +`QueuesResource` + +#### Source + +[`src/rest/namespaces/queues.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/queues.ts) + +Line 19. + +*** + +### create + +Create a new resource. + +#### Signature + +```typescript +create(body: any): Promise +``` + +#### Parameters + + + Request body describing the resource to create. + + +#### Returns + +`Promise` — The newly-created resource. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 55. + +*** + +### delete + +Delete a resource by ID. + +#### Signature + +```typescript +delete(resourceId: string): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + +#### Returns + +`Promise` — The platform's delete response (often an empty body on success). + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 95. + +*** + +### get + +Fetch a single resource by ID. + +#### Signature + +```typescript +get(resourceId: string): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + +#### Returns + +`Promise` — The resource record. + +#### Throws + +- On any non-2xx HTTP response (including `404`). + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 66. + +*** + +### getMember + +Fetch a specific queue member by ID. + +#### Signature + +```typescript +getMember(queueId: string, memberId: string): Promise +``` + +#### Parameters + + + Unique identifier of the queue. + + + + Unique identifier of the queue member. + + +#### Returns + +`Promise` — The queue member record. + +#### Throws + +- On any non-2xx HTTP response (including `404`). + +#### Source + +[`src/rest/namespaces/queues.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/queues.ts) + +Line 55. + +*** + +### getNextMember + +Get the next member to be served in a queue (FIFO head). + +#### Signature + +```typescript +getNextMember(queueId: string): Promise +``` + +#### Parameters + + + Unique identifier of the queue. + + +#### Returns + +`Promise` — The next queue member record, or a platform-shaped empty response when the queue is empty. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/queues.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/queues.ts) + +Line 43. + +*** + +### list + +List resources with optional query parameters. + +#### Signature + +```typescript +list(params?: QueryParams): Promise +``` + +#### Parameters + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — The paginated list response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 44. + +*** + +### listMembers + +List members in a queue. + +#### Signature + +```typescript +listMembers(queueId: string, params?: QueryParams): Promise +``` + +#### Parameters + + + Unique identifier of the queue. + + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — A paginated list of queue members. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/queues.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/queues.ts) + +Line 31. + +*** + +### update + +Update a resource by ID. + +Uses HTTP `PATCH` by default; subclasses may set `_updateMethod = 'PUT'` +when the remote API requires a full-replacement semantics. + +#### Signature + +```typescript +update(resourceId: string, body: any): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + + + Request body with updated fields. + + +#### Returns + +`Promise` — The updated resource. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 81. + +## Source + +[`src/rest/namespaces/queues.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/queues.ts) + +Line 16. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/recordings/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/recordings/index.mdx new file mode 100644 index 0000000000..a72a0f7499 --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/recordings/index.mdx @@ -0,0 +1,34 @@ +--- +slug: "/reference/typescript/rest/namespaces/recordings" +title: "recordings" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "rest.namespaces.recordings" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/recordings.ts" +--- +# `recordings` + +## Signature + +```typescript +module recordings +``` + +## Classes + + + + Recording management (read-only + delete). + + + +## Source + +[`src/rest/namespaces/recordings.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/recordings.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/recordings/recordings-resource/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/recordings/recordings-resource/index.mdx new file mode 100644 index 0000000000..8bfb68ec1f --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/recordings/recordings-resource/index.mdx @@ -0,0 +1,155 @@ +--- +slug: "/reference/typescript/rest/namespaces/recordings/recordings-resource" +title: "RecordingsResource" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "rest.namespaces.recordings.RecordingsResource" + parent: "rest.namespaces.recordings" + module: "rest.namespaces.recordings" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/recordings.ts" +--- +# `RecordingsResource` + +Recording management (read-only + delete). + +Access via `client.recordings.*`. + +## Signature + +```typescript +class RecordingsResource extends BaseResource +``` + +## Inheritance + +**Extends:** [BaseResource](/docs/sdk-reference/reference/typescript/rest/base/base-resource) + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient): RecordingsResource +``` + +#### Parameters + + + +#### Returns + +`RecordingsResource` + +#### Source + +[`src/rest/namespaces/recordings.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/recordings.ts) + +Line 17. + +*** + +### delete + +Delete a recording. + +#### Signature + +```typescript +delete(recordingId: string): Promise +``` + +#### Parameters + + + Unique identifier of the recording. + + +#### Returns + +`Promise` — The platform's delete response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/recordings.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/recordings.ts) + +Line 50. + +*** + +### get + +Fetch a recording's metadata by ID. + +#### Signature + +```typescript +get(recordingId: string): Promise +``` + +#### Parameters + + + Unique identifier of the recording. + + +#### Returns + +`Promise` — The recording metadata record. + +#### Throws + +- On any non-2xx HTTP response (including `404`). + +#### Source + +[`src/rest/namespaces/recordings.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/recordings.ts) + +Line 39. + +*** + +### list + +List recordings in the project. + +#### Signature + +```typescript +list(params?: QueryParams): Promise +``` + +#### Parameters + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — A paginated list of recordings. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/recordings.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/recordings.ts) + +Line 28. + +## Source + +[`src/rest/namespaces/recordings.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/recordings.ts) + +Line 16. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/registry/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/registry/index.mdx new file mode 100644 index 0000000000..01e073f3fd --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/registry/index.mdx @@ -0,0 +1,50 @@ +--- +slug: "/reference/typescript/rest/namespaces/registry" +title: "registry" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "rest.namespaces.registry" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/registry.ts" +--- +# `registry` + +## Signature + +```typescript +module registry +``` + +## Classes + + + + 10DLC brand management. + + + + 10DLC campaign management. + + + + 10DLC Campaign Registry namespace. + + + + 10DLC number assignment management. + + + + 10DLC assignment order management. + + + +## Source + +[`src/rest/namespaces/registry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/registry.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/registry/registry-brands/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/registry/registry-brands/index.mdx new file mode 100644 index 0000000000..26c0a1b4e0 --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/registry/registry-brands/index.mdx @@ -0,0 +1,227 @@ +--- +slug: "/reference/typescript/rest/namespaces/registry/registry-brands" +title: "RegistryBrands" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "rest.namespaces.registry.RegistryBrands" + parent: "rest.namespaces.registry" + module: "rest.namespaces.registry" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/registry.ts" +--- +# `RegistryBrands` + +10DLC brand management. + +## Signature + +```typescript +class RegistryBrands extends BaseResource +``` + +## Inheritance + +**Extends:** [BaseResource](/docs/sdk-reference/reference/typescript/rest/base/base-resource) + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient, basePath: string): RegistryBrands +``` + +#### Parameters + + + + + +#### Returns + +`RegistryBrands` + +#### Source + +[`src/rest/namespaces/registry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/registry.ts) + +Line 13. + +*** + +### create + +Register a new 10DLC brand. + +#### Signature + +```typescript +create(body: any): Promise +``` + +#### Parameters + + + Brand registration payload (EIN, legal name, etc.). + + +#### Returns + +`Promise` — The newly-registered brand record. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/registry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/registry.ts) + +Line 35. + +*** + +### createCampaign + +Register a new campaign under a brand. + +#### Signature + +```typescript +createCampaign(brandId: string, body: any): Promise +``` + +#### Parameters + + + Unique identifier of the brand. + + + + Campaign registration payload (use case, sample messages, etc.). + + +#### Returns + +`Promise` — The newly-registered campaign record. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/registry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/registry.ts) + +Line 70. + +*** + +### get + +Fetch a brand by ID. + +#### Signature + +```typescript +get(brandId: string): Promise +``` + +#### Parameters + + + Unique identifier of the brand. + + +#### Returns + +`Promise` — The brand record. + +#### Throws + +- On any non-2xx HTTP response (including `404`). + +#### Source + +[`src/rest/namespaces/registry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/registry.ts) + +Line 46. + +*** + +### list + +List all 10DLC brands in the project. + +#### Signature + +```typescript +list(params?: QueryParams): Promise +``` + +#### Parameters + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — A paginated list of brands. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/registry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/registry.ts) + +Line 24. + +*** + +### listCampaigns + +List campaigns registered under a brand. + +#### Signature + +```typescript +listCampaigns(brandId: string, params?: QueryParams): Promise +``` + +#### Parameters + + + Unique identifier of the brand. + + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — A paginated list of campaigns. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/registry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/registry.ts) + +Line 58. + +## Source + +[`src/rest/namespaces/registry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/registry.ts) + +Line 12. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/registry/registry-campaigns/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/registry/registry-campaigns/index.mdx new file mode 100644 index 0000000000..8cc368a2b6 --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/registry/registry-campaigns/index.mdx @@ -0,0 +1,235 @@ +--- +slug: "/reference/typescript/rest/namespaces/registry/registry-campaigns" +title: "RegistryCampaigns" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "rest.namespaces.registry.RegistryCampaigns" + parent: "rest.namespaces.registry" + module: "rest.namespaces.registry" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/registry.ts" +--- +# `RegistryCampaigns` + +10DLC campaign management. + +## Signature + +```typescript +class RegistryCampaigns extends BaseResource +``` + +## Inheritance + +**Extends:** [BaseResource](/docs/sdk-reference/reference/typescript/rest/base/base-resource) + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient, basePath: string): RegistryCampaigns +``` + +#### Parameters + + + + + +#### Returns + +`RegistryCampaigns` + +#### Source + +[`src/rest/namespaces/registry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/registry.ts) + +Line 77. + +*** + +### createOrder + +Create a new number-assignment order against a campaign. + +#### Signature + +```typescript +createOrder(campaignId: string, body: any): Promise +``` + +#### Parameters + + + Unique identifier of the campaign. + + + + Order payload (phone number IDs, etc.). + + +#### Returns + +`Promise` — The newly-created order record. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/registry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/registry.ts) + +Line 136. + +*** + +### get + +Fetch a campaign by ID. + +#### Signature + +```typescript +get(campaignId: string): Promise +``` + +#### Parameters + + + Unique identifier of the campaign. + + +#### Returns + +`Promise` — The campaign record. + +#### Throws + +- On any non-2xx HTTP response (including `404`). + +#### Source + +[`src/rest/namespaces/registry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/registry.ts) + +Line 88. + +*** + +### listNumbers + +List the phone numbers assigned to a campaign. + +#### Signature + +```typescript +listNumbers(campaignId: string, params?: QueryParams): Promise +``` + +#### Parameters + + + Unique identifier of the campaign. + + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — A paginated list of assigned numbers. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/registry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/registry.ts) + +Line 112. + +*** + +### listOrders + +List number-assignment orders for a campaign. + +#### Signature + +```typescript +listOrders(campaignId: string, params?: QueryParams): Promise +``` + +#### Parameters + + + Unique identifier of the campaign. + + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — A paginated list of number-assignment orders. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/registry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/registry.ts) + +Line 124. + +*** + +### update + +Update a campaign's attributes. + +#### Signature + +```typescript +update(campaignId: string, body: any): Promise +``` + +#### Parameters + + + Unique identifier of the campaign. + + + + Full updated campaign attributes (replace semantics). + + +#### Returns + +`Promise` — The updated campaign record. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/registry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/registry.ts) + +Line 100. + +## Source + +[`src/rest/namespaces/registry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/registry.ts) + +Line 76. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/registry/registry-namespace/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/registry/registry-namespace/index.mdx new file mode 100644 index 0000000000..f8ff90cdc9 --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/registry/registry-namespace/index.mdx @@ -0,0 +1,74 @@ +--- +slug: "/reference/typescript/rest/namespaces/registry/registry-namespace" +title: "RegistryNamespace" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "rest.namespaces.registry.RegistryNamespace" + parent: "rest.namespaces.registry" + module: "rest.namespaces.registry" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/registry.ts" +--- +# `RegistryNamespace` + +10DLC Campaign Registry namespace. + +Access via `client.registry.*`. Groups brand, campaign, order, and number +resources for US A2P 10DLC compliance registration. + +## Signature + +```typescript +class RegistryNamespace +``` + +## Properties + + + 10DLC brand CRUD and nested campaign operations. + + + + 10DLC campaign CRUD, number listing, and order management. + + + + 10DLC number assignment removal. + + + + 10DLC number-assignment order read access. + + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient): RegistryNamespace +``` + +#### Parameters + + + +#### Returns + +`RegistryNamespace` + +#### Source + +[`src/rest/namespaces/registry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/registry.ts) + +Line 193. + +## Source + +[`src/rest/namespaces/registry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/registry.ts) + +Line 183. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/registry/registry-numbers/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/registry/registry-numbers/index.mdx new file mode 100644 index 0000000000..4d86a5527d --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/registry/registry-numbers/index.mdx @@ -0,0 +1,91 @@ +--- +slug: "/reference/typescript/rest/namespaces/registry/registry-numbers" +title: "RegistryNumbers" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "rest.namespaces.registry.RegistryNumbers" + parent: "rest.namespaces.registry" + module: "rest.namespaces.registry" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/registry.ts" +--- +# `RegistryNumbers` + +10DLC number assignment management. + +## Signature + +```typescript +class RegistryNumbers extends BaseResource +``` + +## Inheritance + +**Extends:** [BaseResource](/docs/sdk-reference/reference/typescript/rest/base/base-resource) + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient, basePath: string): RegistryNumbers +``` + +#### Parameters + + + + + +#### Returns + +`RegistryNumbers` + +#### Source + +[`src/rest/namespaces/registry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/registry.ts) + +Line 161. + +*** + +### delete + +Remove a number from a 10DLC campaign assignment. + +#### Signature + +```typescript +delete(numberId: string): Promise +``` + +#### Parameters + + + Unique identifier of the assigned number. + + +#### Returns + +`Promise` — The platform's delete response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/registry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/registry.ts) + +Line 172. + +## Source + +[`src/rest/namespaces/registry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/registry.ts) + +Line 160. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/registry/registry-orders/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/registry/registry-orders/index.mdx new file mode 100644 index 0000000000..91ec98aebb --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/registry/registry-orders/index.mdx @@ -0,0 +1,91 @@ +--- +slug: "/reference/typescript/rest/namespaces/registry/registry-orders" +title: "RegistryOrders" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "rest.namespaces.registry.RegistryOrders" + parent: "rest.namespaces.registry" + module: "rest.namespaces.registry" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/registry.ts" +--- +# `RegistryOrders` + +10DLC assignment order management. + +## Signature + +```typescript +class RegistryOrders extends BaseResource +``` + +## Inheritance + +**Extends:** [BaseResource](/docs/sdk-reference/reference/typescript/rest/base/base-resource) + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient, basePath: string): RegistryOrders +``` + +#### Parameters + + + + + +#### Returns + +`RegistryOrders` + +#### Source + +[`src/rest/namespaces/registry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/registry.ts) + +Line 143. + +*** + +### get + +Fetch a number-assignment order by ID. + +#### Signature + +```typescript +get(orderId: string): Promise +``` + +#### Parameters + + + Unique identifier of the order. + + +#### Returns + +`Promise` — The order record. + +#### Throws + +- On any non-2xx HTTP response (including `404`). + +#### Source + +[`src/rest/namespaces/registry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/registry.ts) + +Line 154. + +## Source + +[`src/rest/namespaces/registry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/registry.ts) + +Line 142. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/short-codes/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/short-codes/index.mdx new file mode 100644 index 0000000000..4e0c11cc7a --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/short-codes/index.mdx @@ -0,0 +1,34 @@ +--- +slug: "/reference/typescript/rest/namespaces/short-codes" +title: "short-codes" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "rest.namespaces.short-codes" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/short-codes.ts" +--- +# `short-codes` + +## Signature + +```typescript +module short-codes +``` + +## Classes + + + + Short code management (read + update only). + + + +## Source + +[`src/rest/namespaces/short-codes.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/short-codes.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/short-codes/short-codes-resource/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/short-codes/short-codes-resource/index.mdx new file mode 100644 index 0000000000..074d0a5710 --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/short-codes/short-codes-resource/index.mdx @@ -0,0 +1,159 @@ +--- +slug: "/reference/typescript/rest/namespaces/short-codes/short-codes-resource" +title: "ShortCodesResource" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "rest.namespaces.short-codes.ShortCodesResource" + parent: "rest.namespaces.short-codes" + module: "rest.namespaces.short-codes" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/short-codes.ts" +--- +# `ShortCodesResource` + +Short code management (read + update only). + +Access via `client.shortCodes.*`. + +## Signature + +```typescript +class ShortCodesResource extends BaseResource +``` + +## Inheritance + +**Extends:** [BaseResource](/docs/sdk-reference/reference/typescript/rest/base/base-resource) + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient): ShortCodesResource +``` + +#### Parameters + + + +#### Returns + +`ShortCodesResource` + +#### Source + +[`src/rest/namespaces/short-codes.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/short-codes.ts) + +Line 17. + +*** + +### get + +Fetch a short code by ID. + +#### Signature + +```typescript +get(shortCodeId: string): Promise +``` + +#### Parameters + + + Unique identifier of the short code. + + +#### Returns + +`Promise` — The short-code record. + +#### Throws + +- On any non-2xx HTTP response (including `404`). + +#### Source + +[`src/rest/namespaces/short-codes.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/short-codes.ts) + +Line 39. + +*** + +### list + +List short codes in the project. + +#### Signature + +```typescript +list(params?: QueryParams): Promise +``` + +#### Parameters + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — A paginated list of short codes. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/short-codes.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/short-codes.ts) + +Line 28. + +*** + +### update + +Update a short code's configuration (webhooks, friendly name, etc.). + +#### Signature + +```typescript +update(shortCodeId: string, body: any): Promise +``` + +#### Parameters + + + Unique identifier of the short code. + + + + Full updated short-code attributes (replace semantics). + + +#### Returns + +`Promise` — The updated short-code record. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/short-codes.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/short-codes.ts) + +Line 51. + +## Source + +[`src/rest/namespaces/short-codes.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/short-codes.ts) + +Line 16. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/sip-profile/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/sip-profile/index.mdx new file mode 100644 index 0000000000..7627127bfd --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/sip-profile/index.mdx @@ -0,0 +1,34 @@ +--- +slug: "/reference/typescript/rest/namespaces/sip-profile" +title: "sip-profile" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "rest.namespaces.sip-profile" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/sip-profile.ts" +--- +# `sip-profile` + +## Signature + +```typescript +module sip-profile +``` + +## Classes + + + + Project SIP profile (singleton resource). + + + +## Source + +[`src/rest/namespaces/sip-profile.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/sip-profile.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/sip-profile/sip-profile-resource/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/sip-profile/sip-profile-resource/index.mdx new file mode 100644 index 0000000000..18b38c2e02 --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/sip-profile/sip-profile-resource/index.mdx @@ -0,0 +1,117 @@ +--- +slug: "/reference/typescript/rest/namespaces/sip-profile/sip-profile-resource" +title: "SipProfileResource" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "rest.namespaces.sip-profile.SipProfileResource" + parent: "rest.namespaces.sip-profile" + module: "rest.namespaces.sip-profile" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/sip-profile.ts" +--- +# `SipProfileResource` + +Project SIP profile (singleton resource). + +Access via `client.sipProfile.*`. + +## Signature + +```typescript +class SipProfileResource extends BaseResource +``` + +## Inheritance + +**Extends:** [BaseResource](/docs/sdk-reference/reference/typescript/rest/base/base-resource) + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient): SipProfileResource +``` + +#### Parameters + + + +#### Returns + +`SipProfileResource` + +#### Source + +[`src/rest/namespaces/sip-profile.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/sip-profile.ts) + +Line 16. + +*** + +### get + +Fetch the project's SIP profile. + +#### Signature + +```typescript +get(): Promise +``` + +#### Returns + +`Promise` — The SIP profile record for this project. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/sip-profile.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/sip-profile.ts) + +Line 26. + +*** + +### update + +Update the project's SIP profile. + +#### Signature + +```typescript +update(body: any): Promise +``` + +#### Parameters + + + Full SIP profile attributes (replace semantics — not patch). + + +#### Returns + +`Promise` — The updated SIP profile. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/sip-profile.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/sip-profile.ts) + +Line 37. + +## Source + +[`src/rest/namespaces/sip-profile.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/sip-profile.ts) + +Line 15. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/verified-callers/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/verified-callers/index.mdx new file mode 100644 index 0000000000..f5e5bf12e2 --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/verified-callers/index.mdx @@ -0,0 +1,34 @@ +--- +slug: "/reference/typescript/rest/namespaces/verified-callers" +title: "verified-callers" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "rest.namespaces.verified-callers" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/verified-callers.ts" +--- +# `verified-callers` + +## Signature + +```typescript +module verified-callers +``` + +## Classes + + + + Verified caller ID management with verification flow. + + + +## Source + +[`src/rest/namespaces/verified-callers.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/verified-callers.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/verified-callers/verified-callers-resource/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/verified-callers/verified-callers-resource/index.mdx new file mode 100644 index 0000000000..a4779995f2 --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/verified-callers/verified-callers-resource/index.mdx @@ -0,0 +1,296 @@ +--- +slug: "/reference/typescript/rest/namespaces/verified-callers/verified-callers-resource" +title: "VerifiedCallersResource" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "rest.namespaces.verified-callers.VerifiedCallersResource" + parent: "rest.namespaces.verified-callers" + module: "rest.namespaces.verified-callers" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/verified-callers.ts" +--- +# `VerifiedCallersResource` + +Verified caller ID management with verification flow. + +Access via `client.verifiedCallers.*`. Extends standard CRUD with +`redialVerification()` and `submitVerification()` for the two-step +phone-number verification handshake. + +## Signature + +```typescript +class VerifiedCallersResource extends CrudResource +``` + +## Inheritance + +**Extends:** [CrudResource](/docs/sdk-reference/reference/typescript/rest/base/crud-resource) + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient): VerifiedCallersResource +``` + +#### Parameters + + + +#### Returns + +`VerifiedCallersResource` + +#### Source + +[`src/rest/namespaces/verified-callers.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/verified-callers.ts) + +Line 20. + +*** + +### create + +Create a new resource. + +#### Signature + +```typescript +create(body: any): Promise +``` + +#### Parameters + + + Request body describing the resource to create. + + +#### Returns + +`Promise` — The newly-created resource. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 55. + +*** + +### delete + +Delete a resource by ID. + +#### Signature + +```typescript +delete(resourceId: string): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + +#### Returns + +`Promise` — The platform's delete response (often an empty body on success). + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 95. + +*** + +### get + +Fetch a single resource by ID. + +#### Signature + +```typescript +get(resourceId: string): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + +#### Returns + +`Promise` — The resource record. + +#### Throws + +- On any non-2xx HTTP response (including `404`). + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 66. + +*** + +### list + +List resources with optional query parameters. + +#### Signature + +```typescript +list(params?: QueryParams): Promise +``` + +#### Parameters + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — The paginated list response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 44. + +*** + +### redialVerification + +Redial the verification call, starting the handshake over from scratch. + +#### Signature + +```typescript +redialVerification(callerId: string): Promise +``` + +#### Parameters + + + Unique identifier of the verified caller ID resource. + + +#### Returns + +`Promise` — The platform-shaped verification response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/verified-callers.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/verified-callers.ts) + +Line 31. + +*** + +### submitVerification + +Submit the verification code the caller received on the verification call. + +#### Signature + +```typescript +submitVerification(callerId: string, body: any): Promise +``` + +#### Parameters + + + Unique identifier of the verified caller ID resource. + + + + Verification payload (typically `{ verification_code: "1234" }`). + + +#### Returns + +`Promise` — The completed verification record. + +#### Throws + +- On any non-2xx HTTP response (including a rejected code). + +#### Source + +[`src/rest/namespaces/verified-callers.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/verified-callers.ts) + +Line 43. + +*** + +### update + +Update a resource by ID. + +Uses HTTP `PATCH` by default; subclasses may set `_updateMethod = 'PUT'` +when the remote API requires a full-replacement semantics. + +#### Signature + +```typescript +update(resourceId: string, body: any): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + + + Request body with updated fields. + + +#### Returns + +`Promise` — The updated resource. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 81. + +## Source + +[`src/rest/namespaces/verified-callers.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/verified-callers.ts) + +Line 17. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/video/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/video/index.mdx new file mode 100644 index 0000000000..31acf7ac95 --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/video/index.mdx @@ -0,0 +1,62 @@ +--- +slug: "/reference/typescript/rest/namespaces/video" +title: "video" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "rest.namespaces.video" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/video.ts" +--- +# `video` + +## Signature + +```typescript +module video +``` + +## Classes + + + + Video conference management with tokens and streams. + + + + Video conference token management. + + + + Video API namespace. + + + + Video room recording management. + + + + Video room management with streams. + + + + Video room session management. + + + + Video room token generation. + + + + Video stream management. + + + +## Source + +[`src/rest/namespaces/video.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/video.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/video/video-conference-tokens/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/video/video-conference-tokens/index.mdx new file mode 100644 index 0000000000..6b751a8239 --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/video/video-conference-tokens/index.mdx @@ -0,0 +1,123 @@ +--- +slug: "/reference/typescript/rest/namespaces/video/video-conference-tokens" +title: "VideoConferenceTokens" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "rest.namespaces.video.VideoConferenceTokens" + parent: "rest.namespaces.video" + module: "rest.namespaces.video" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/video.ts" +--- +# `VideoConferenceTokens` + +Video conference token management. + +## Signature + +```typescript +class VideoConferenceTokens extends BaseResource +``` + +## Inheritance + +**Extends:** [BaseResource](/docs/sdk-reference/reference/typescript/rest/base/base-resource) + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient, basePath: string): VideoConferenceTokens +``` + +#### Parameters + + + + + +#### Returns + +`VideoConferenceTokens` + +#### Source + +[`src/rest/namespaces/video.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/video.ts) + +Line 227. + +*** + +### get + +Fetch a conference token by ID. + +#### Signature + +```typescript +get(tokenId: string): Promise +``` + +#### Parameters + + + Unique identifier of the conference token. + + +#### Returns + +`Promise` — The conference-token record. + +#### Throws + +- On any non-2xx HTTP response (including `404`). + +#### Source + +[`src/rest/namespaces/video.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/video.ts) + +Line 238. + +*** + +### reset + +Reset / regenerate a conference token, invalidating the previous value. + +#### Signature + +```typescript +reset(tokenId: string): Promise +``` + +#### Parameters + + + Unique identifier of the conference token to reset. + + +#### Returns + +`Promise` — The refreshed token record with a new secret. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/video.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/video.ts) + +Line 249. + +## Source + +[`src/rest/namespaces/video.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/video.ts) + +Line 226. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/video/video-conferences/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/video/video-conferences/index.mdx new file mode 100644 index 0000000000..b4d49d6de1 --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/video/video-conferences/index.mdx @@ -0,0 +1,334 @@ +--- +slug: "/reference/typescript/rest/namespaces/video/video-conferences" +title: "VideoConferences" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "rest.namespaces.video.VideoConferences" + parent: "rest.namespaces.video" + module: "rest.namespaces.video" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/video.ts" +--- +# `VideoConferences` + +Video conference management with tokens and streams. + +## Signature + +```typescript +class VideoConferences extends CrudResource +``` + +## Inheritance + +**Extends:** [CrudResource](/docs/sdk-reference/reference/typescript/rest/base/crud-resource) + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient, basePath: string): VideoConferences +``` + +#### Parameters + + + + + +#### Returns + +`VideoConferences` + +#### Source + +[`src/rest/namespaces/video.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/video.ts) + +Line 184. + +*** + +### create + +Create a new resource. + +#### Signature + +```typescript +create(body: any): Promise +``` + +#### Parameters + + + Request body describing the resource to create. + + +#### Returns + +`Promise` — The newly-created resource. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 55. + +*** + +### createStream + +Start an outbound stream from a conference (e.g. RTMP to YouTube). + +#### Signature + +```typescript +createStream(conferenceId: string, body: any): Promise +``` + +#### Parameters + + + Unique identifier of the conference. + + + + Stream configuration (destination URL, credentials, etc.). + + +#### Returns + +`Promise` — The newly-created stream record. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/video.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/video.ts) + +Line 220. + +*** + +### delete + +Delete a resource by ID. + +#### Signature + +```typescript +delete(resourceId: string): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + +#### Returns + +`Promise` — The platform's delete response (often an empty body on success). + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 95. + +*** + +### get + +Fetch a single resource by ID. + +#### Signature + +```typescript +get(resourceId: string): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + +#### Returns + +`Promise` — The resource record. + +#### Throws + +- On any non-2xx HTTP response (including `404`). + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 66. + +*** + +### list + +List resources with optional query parameters. + +#### Signature + +```typescript +list(params?: QueryParams): Promise +``` + +#### Parameters + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — The paginated list response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 44. + +*** + +### listConferenceTokens + +List conference tokens associated with a conference. + +#### Signature + +```typescript +listConferenceTokens(conferenceId: string, params?: QueryParams): Promise +``` + +#### Parameters + + + Unique identifier of the conference. + + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — A paginated list of conference tokens. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/video.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/video.ts) + +Line 196. + +*** + +### listStreams + +List outbound streams associated with a conference. + +#### Signature + +```typescript +listStreams(conferenceId: string, params?: QueryParams): Promise +``` + +#### Parameters + + + Unique identifier of the conference. + + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — A paginated list of streams. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/video.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/video.ts) + +Line 208. + +*** + +### update + +Update a resource by ID. + +Uses HTTP `PATCH` by default; subclasses may set `_updateMethod = 'PUT'` +when the remote API requires a full-replacement semantics. + +#### Signature + +```typescript +update(resourceId: string, body: any): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + + + Request body with updated fields. + + +#### Returns + +`Promise` — The updated resource. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 81. + +## Source + +[`src/rest/namespaces/video.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/video.ts) + +Line 181. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/video/video-namespace/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/video/video-namespace/index.mdx new file mode 100644 index 0000000000..eb8371d448 --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/video/video-namespace/index.mdx @@ -0,0 +1,92 @@ +--- +slug: "/reference/typescript/rest/namespaces/video/video-namespace" +title: "VideoNamespace" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "rest.namespaces.video.VideoNamespace" + parent: "rest.namespaces.video" + module: "rest.namespaces.video" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/video.ts" +--- +# `VideoNamespace` + +Video API namespace. + +Access via `client.video.*`. + +## Signature + +```typescript +class VideoNamespace +``` + +## Examples + +```typescript +const room = await client.video.rooms.create({ name: 'standup' }); +const token = await client.video.roomTokens.create({ room_name: 'standup', user_name: 'Alice' }); +``` + +## Properties + + + Video conference CRUD plus stream / token management. + + + + Individual conference token read / reset operations. + + + + Room recording read, delete, and event-log access. + + + + Video room CRUD plus outbound stream management. + + + + Past and active room session read access. + + + + Issue JWT tokens for browser / mobile clients to join rooms. + + + + Individual video stream read / update / delete operations. + + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient): VideoNamespace +``` + +#### Parameters + + + +#### Returns + +`VideoNamespace` + +#### Source + +[`src/rest/namespaces/video.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/video.ts) + +Line 322. + +## Source + +[`src/rest/namespaces/video.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/video.ts) + +Line 306. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/video/video-room-recordings/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/video/video-room-recordings/index.mdx new file mode 100644 index 0000000000..2c3ee91eaa --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/video/video-room-recordings/index.mdx @@ -0,0 +1,191 @@ +--- +slug: "/reference/typescript/rest/namespaces/video/video-room-recordings" +title: "VideoRoomRecordings" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "rest.namespaces.video.VideoRoomRecordings" + parent: "rest.namespaces.video" + module: "rest.namespaces.video" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/video.ts" +--- +# `VideoRoomRecordings` + +Video room recording management. + +## Signature + +```typescript +class VideoRoomRecordings extends BaseResource +``` + +## Inheritance + +**Extends:** [BaseResource](/docs/sdk-reference/reference/typescript/rest/base/base-resource) + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient, basePath: string): VideoRoomRecordings +``` + +#### Parameters + + + + + +#### Returns + +`VideoRoomRecordings` + +#### Source + +[`src/rest/namespaces/video.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/video.ts) + +Line 130. + +*** + +### delete + +Delete a room recording. + +#### Signature + +```typescript +delete(recordingId: string): Promise +``` + +#### Parameters + + + Unique identifier of the recording. + + +#### Returns + +`Promise` — The platform's delete response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/video.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/video.ts) + +Line 163. + +*** + +### get + +Fetch a room recording by ID. + +#### Signature + +```typescript +get(recordingId: string): Promise +``` + +#### Parameters + + + Unique identifier of the recording. + + +#### Returns + +`Promise` — The recording record. + +#### Throws + +- On any non-2xx HTTP response (including `404`). + +#### Source + +[`src/rest/namespaces/video.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/video.ts) + +Line 152. + +*** + +### list + +List all room recordings in the project. + +#### Signature + +```typescript +list(params?: QueryParams): Promise +``` + +#### Parameters + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — A paginated list of recordings. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/video.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/video.ts) + +Line 141. + +*** + +### listEvents + +List event log entries for a room recording. + +#### Signature + +```typescript +listEvents(recordingId: string, params?: QueryParams): Promise +``` + +#### Parameters + + + Unique identifier of the recording. + + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — A paginated list of recording events. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/video.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/video.ts) + +Line 175. + +## Source + +[`src/rest/namespaces/video.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/video.ts) + +Line 129. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/video/video-room-sessions/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/video/video-room-sessions/index.mdx new file mode 100644 index 0000000000..82bb4784f3 --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/video/video-room-sessions/index.mdx @@ -0,0 +1,231 @@ +--- +slug: "/reference/typescript/rest/namespaces/video/video-room-sessions" +title: "VideoRoomSessions" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "rest.namespaces.video.VideoRoomSessions" + parent: "rest.namespaces.video" + module: "rest.namespaces.video" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/video.ts" +--- +# `VideoRoomSessions` + +Video room session management. + +## Signature + +```typescript +class VideoRoomSessions extends BaseResource +``` + +## Inheritance + +**Extends:** [BaseResource](/docs/sdk-reference/reference/typescript/rest/base/base-resource) + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient, basePath: string): VideoRoomSessions +``` + +#### Parameters + + + + + +#### Returns + +`VideoRoomSessions` + +#### Source + +[`src/rest/namespaces/video.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/video.ts) + +Line 65. + +*** + +### get + +Fetch a single room session by ID. + +#### Signature + +```typescript +get(sessionId: string): Promise +``` + +#### Parameters + + + Unique identifier of the room session. + + +#### Returns + +`Promise` — The room-session record. + +#### Throws + +- On any non-2xx HTTP response (including `404`). + +#### Source + +[`src/rest/namespaces/video.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/video.ts) + +Line 87. + +*** + +### list + +List past and active room sessions in the project. + +#### Signature + +```typescript +list(params?: QueryParams): Promise +``` + +#### Parameters + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — A paginated list of room sessions. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/video.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/video.ts) + +Line 76. + +*** + +### listEvents + +List the event log for a room session. + +#### Signature + +```typescript +listEvents(sessionId: string, params?: QueryParams): Promise +``` + +#### Parameters + + + Unique identifier of the room session. + + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — A paginated list of session events. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/video.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/video.ts) + +Line 99. + +*** + +### listMembers + +List members that participated in a room session. + +#### Signature + +```typescript +listMembers(sessionId: string, params?: QueryParams): Promise +``` + +#### Parameters + + + Unique identifier of the room session. + + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — A paginated list of members (past and current). + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/video.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/video.ts) + +Line 111. + +*** + +### listRecordings + +List recordings captured during a room session. + +#### Signature + +```typescript +listRecordings(sessionId: string, params?: QueryParams): Promise +``` + +#### Parameters + + + Unique identifier of the room session. + + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — A paginated list of session recordings. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/video.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/video.ts) + +Line 123. + +## Source + +[`src/rest/namespaces/video.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/video.ts) + +Line 64. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/video/video-room-tokens/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/video/video-room-tokens/index.mdx new file mode 100644 index 0000000000..660037bb20 --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/video/video-room-tokens/index.mdx @@ -0,0 +1,91 @@ +--- +slug: "/reference/typescript/rest/namespaces/video/video-room-tokens" +title: "VideoRoomTokens" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "rest.namespaces.video.VideoRoomTokens" + parent: "rest.namespaces.video" + module: "rest.namespaces.video" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/video.ts" +--- +# `VideoRoomTokens` + +Video room token generation. + +## Signature + +```typescript +class VideoRoomTokens extends BaseResource +``` + +## Inheritance + +**Extends:** [BaseResource](/docs/sdk-reference/reference/typescript/rest/base/base-resource) + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient, basePath: string): VideoRoomTokens +``` + +#### Parameters + + + + + +#### Returns + +`VideoRoomTokens` + +#### Source + +[`src/rest/namespaces/video.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/video.ts) + +Line 47. + +*** + +### create + +Issue a JWT token that grants a browser / mobile client access to a room. + +#### Signature + +```typescript +create(body: any): Promise +``` + +#### Parameters + + + Token payload (`room_name`, `user_name`, `permissions`, etc.). + + +#### Returns + +`Promise` — The token record, typically `{ token: "eyJ..." }`. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/video.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/video.ts) + +Line 58. + +## Source + +[`src/rest/namespaces/video.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/video.ts) + +Line 46. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/video/video-rooms/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/video/video-rooms/index.mdx new file mode 100644 index 0000000000..866df76069 --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/video/video-rooms/index.mdx @@ -0,0 +1,298 @@ +--- +slug: "/reference/typescript/rest/namespaces/video/video-rooms" +title: "VideoRooms" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "rest.namespaces.video.VideoRooms" + parent: "rest.namespaces.video" + module: "rest.namespaces.video" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/video.ts" +--- +# `VideoRooms` + +Video room management with streams. + +## Signature + +```typescript +class VideoRooms extends CrudResource +``` + +## Inheritance + +**Extends:** [CrudResource](/docs/sdk-reference/reference/typescript/rest/base/crud-resource) + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient, basePath: string): VideoRooms +``` + +#### Parameters + + + + + +#### Returns + +`VideoRooms` + +#### Source + +[`src/rest/namespaces/video.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/video.ts) + +Line 16. + +*** + +### create + +Create a new resource. + +#### Signature + +```typescript +create(body: any): Promise +``` + +#### Parameters + + + Request body describing the resource to create. + + +#### Returns + +`Promise` — The newly-created resource. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 55. + +*** + +### createStream + +Start a new outbound stream from a room (e.g. RTMP to YouTube, Twitch). + +#### Signature + +```typescript +createStream(roomId: string, body: any): Promise +``` + +#### Parameters + + + Unique identifier of the video room. + + + + Stream configuration (destination URL, credentials, etc.). + + +#### Returns + +`Promise` — The newly-created stream record. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/video.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/video.ts) + +Line 40. + +*** + +### delete + +Delete a resource by ID. + +#### Signature + +```typescript +delete(resourceId: string): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + +#### Returns + +`Promise` — The platform's delete response (often an empty body on success). + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 95. + +*** + +### get + +Fetch a single resource by ID. + +#### Signature + +```typescript +get(resourceId: string): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + +#### Returns + +`Promise` — The resource record. + +#### Throws + +- On any non-2xx HTTP response (including `404`). + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 66. + +*** + +### list + +List resources with optional query parameters. + +#### Signature + +```typescript +list(params?: QueryParams): Promise +``` + +#### Parameters + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — The paginated list response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 44. + +*** + +### listStreams + +List outbound streams associated with a room. + +#### Signature + +```typescript +listStreams(roomId: string, params?: QueryParams): Promise +``` + +#### Parameters + + + Unique identifier of the video room. + + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — A paginated list of outbound streams. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/video.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/video.ts) + +Line 28. + +*** + +### update + +Update a resource by ID. + +Uses HTTP `PATCH` by default; subclasses may set `_updateMethod = 'PUT'` +when the remote API requires a full-replacement semantics. + +#### Signature + +```typescript +update(resourceId: string, body: any): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + + + Request body with updated fields. + + +#### Returns + +`Promise` — The updated resource. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 81. + +## Source + +[`src/rest/namespaces/video.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/video.ts) + +Line 13. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/video/video-streams/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/video/video-streams/index.mdx new file mode 100644 index 0000000000..228d27dc84 --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/video/video-streams/index.mdx @@ -0,0 +1,159 @@ +--- +slug: "/reference/typescript/rest/namespaces/video/video-streams" +title: "VideoStreams" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "rest.namespaces.video.VideoStreams" + parent: "rest.namespaces.video" + module: "rest.namespaces.video" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/video.ts" +--- +# `VideoStreams` + +Video stream management. + +## Signature + +```typescript +class VideoStreams extends BaseResource +``` + +## Inheritance + +**Extends:** [BaseResource](/docs/sdk-reference/reference/typescript/rest/base/base-resource) + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient, basePath: string): VideoStreams +``` + +#### Parameters + + + + + +#### Returns + +`VideoStreams` + +#### Source + +[`src/rest/namespaces/video.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/video.ts) + +Line 256. + +*** + +### delete + +Stop and delete a video stream. + +#### Signature + +```typescript +delete(streamId: string): Promise +``` + +#### Parameters + + + Unique identifier of the stream. + + +#### Returns + +`Promise` — The platform's delete response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/video.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/video.ts) + +Line 290. + +*** + +### get + +Fetch a video stream by ID. + +#### Signature + +```typescript +get(streamId: string): Promise +``` + +#### Parameters + + + Unique identifier of the stream. + + +#### Returns + +`Promise` — The stream record. + +#### Throws + +- On any non-2xx HTTP response (including `404`). + +#### Source + +[`src/rest/namespaces/video.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/video.ts) + +Line 267. + +*** + +### update + +Update a video stream's configuration (e.g. destination URL). + +#### Signature + +```typescript +update(streamId: string, body: any): Promise +``` + +#### Parameters + + + Unique identifier of the stream. + + + + Full updated stream attributes (replace semantics). + + +#### Returns + +`Promise` — The updated stream record. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/video.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/video.ts) + +Line 279. + +## Source + +[`src/rest/namespaces/video.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/video.ts) + +Line 255. diff --git a/fern/products/sdk-reference/typescript/rest/pagination/index.mdx b/fern/products/sdk-reference/typescript/rest/pagination/index.mdx new file mode 100644 index 0000000000..cb900a1646 --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/pagination/index.mdx @@ -0,0 +1,135 @@ +--- +slug: "/reference/typescript/rest/pagination" +title: "pagination" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "rest.pagination" + module: "rest" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/pagination.ts" +--- +# `pagination` + +## Signature + +```typescript +module pagination +``` + +## Functions + +### paginate + +Async generator that yields items across paginated API responses. + +Handles both relay REST (`links.next`) and LAML (`next_page_uri`) pagination +styles transparently. + +#### Signature + +```typescript +paginate( + http: HttpClient, + path: string, + params?: QueryParams, + dataKey: string = 'data' +): AsyncGenerator +``` + +#### Type Parameters + + + Element type yielded. + + +#### Parameters + + + [HttpClient](/docs/sdk-reference/reference/typescript/rest/http-client) instance used to fetch each page. + + + + Initial API path (absolute URL or path relative to `http.baseUrl`). + + + + Query parameters applied to the first request only. Subsequent pages use the server-supplied next-page URL unchanged. + + + + Key on each response containing the array of items. Defaults to `"data"`. + + +#### Returns + +`AsyncGenerator` — An async iterable that yields one `T` per call until exhausted. + +#### Source + +[`src/rest/pagination.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/pagination.ts) + +Line 27. + +*** + +### paginateAll + +Collect all paginated items into an array. + +Convenience wrapper around [paginate](/docs/sdk-reference/reference/typescript/rest/pagination#paginate) for callers who want the full +list. Beware: loads every page into memory — for very large result sets, +iterate via `paginate()` directly. + +#### Signature + +```typescript +paginateAll( + http: HttpClient, + path: string, + params?: QueryParams, + dataKey: string = 'data' +): Promise +``` + +#### Type Parameters + + + Element type collected. + + +#### Parameters + + + [HttpClient](/docs/sdk-reference/reference/typescript/rest/http-client) instance used to fetch each page. + + + + Initial API path. + + + + Query parameters applied to the first request. + + + + Key on each response containing the array of items. Defaults to `"data"`. + + +#### Returns + +`Promise` — A flat array of every item across all pages. + +#### Source + +[`src/rest/pagination.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/pagination.ts) + +Line 87. + +## Source + +[`src/rest/pagination.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/pagination.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/rest/rest-client/index.mdx b/fern/products/sdk-reference/typescript/rest/rest-client/index.mdx new file mode 100644 index 0000000000..357165b912 --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/rest-client/index.mdx @@ -0,0 +1,167 @@ +--- +slug: "/reference/typescript/rest/rest-client" +title: "RestClient" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "rest.RestClient" + parent: "rest" + module: "rest" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/index.ts" +--- +# `RestClient` + +REST client for the SignalWire platform APIs. + +## Signature + +```typescript +class RestClient +``` + +## Examples + +```typescript +const client = new RestClient({ + project: 'your-project-id', + token: 'your-api-token', + host: 'your-space.signalwire.com', +}); + +// Or use env vars: SIGNALWIRE_PROJECT_ID, SIGNALWIRE_API_TOKEN, SIGNALWIRE_SPACE +const client = new RestClient(); + +// Use namespaced resources +await client.fabric.aiAgents.list(); +await client.calling.play(callId, { play: [...] }); +await client.phoneNumbers.search({ areaCode: '512' }); +await client.video.rooms.create({ name: 'standup' }); +await client.compat.calls.list(); +``` + +## Properties + + + Relay Address CRUD. + + + + REST-based call control surface (all 37 commands as methods). + + + + Chat token issuance. + + + + Twilio-compatible LAML surface (legacy; prefer native namespaces for new work). + + + + Datasphere RAG — document indexing and semantic search. + + + + Fabric composition — AI Agents, SWML scripts, call flows, tokens, etc. + + + + Import externally-hosted phone numbers. + + + + Read-only message / voice / fax / conference logs. + + + + Carrier + CNAM phone-number lookups. + + + + Multi-factor authentication (SMS / voice code send + verify). + + + + Number-group CRUD plus membership operations. + + + + Phone-number CRUD plus availability search. + + + + Project-scoped API token management. + + + + PubSub token issuance. + + + + Call-queue CRUD plus member operations. + + + + Recording read / delete. + + + + US 10DLC Campaign Registry — brands, campaigns, orders, numbers. + + + + Short-code read / update. + + + + Project-level SIP profile read / update (singleton). + + + + Verified Caller ID CRUD plus verification flow. + + + + Video rooms, sessions, recordings, conferences, tokens, streams. + + +## Methods + +### constructor + +Create a new REST client. + +#### Signature + +```typescript +constructor(options: ClientOptions = {}): RestClient +``` + +#### Parameters + + + Connection options. `project`, `token`, and `host` are required. If any are omitted they fall back to `SIGNALWIRE_PROJECT_ID`, `SIGNALWIRE_API_TOKEN`, and `SIGNALWIRE_SPACE` environment variables. + + +#### Returns + +`RestClient` + +#### Throws + +- When `project`, `token`, or `host` is missing from both the options and the environment. + +#### Source + +[`src/rest/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/index.ts) + +Line 128. + +## Source + +[`src/rest/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/index.ts) + +Line 58. diff --git a/fern/products/sdk-reference/typescript/rest/rest-error/index.mdx b/fern/products/sdk-reference/typescript/rest/rest-error/index.mdx new file mode 100644 index 0000000000..a624247ced --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/rest-error/index.mdx @@ -0,0 +1,97 @@ +--- +slug: "/reference/typescript/rest/rest-error" +title: "RestError" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "rest.RestError" + module: "rest" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/RestError.ts" +--- +# `RestError` + +Custom error class for REST API errors. + +`body` may be a parsed JSON object (when the server returned valid JSON) +or a plain string (when JSON parsing failed), matching the Python SDK's +`SignalWireRestError` behavior. + +## Signature + +```typescript +class RestError extends Error +``` + +## Inheritance + +**Extends:** `Error` + +## Properties + + + Parsed response body. An object when the server returned valid JSON, otherwise the raw response text as a string. + + + + HTTP method that produced the error (`GET`, `POST`, etc.). + + + + HTTP status code returned by the server (e.g. `404`, `500`). + + + + Fully-qualified URL that produced the error. + + +## Methods + +### constructor + +#### Signature + +```typescript +constructor( + statusCode: number, + body: string | Record, + url: string, + method: string = 'GET' +): RestError +``` + +#### Parameters + + + HTTP status code returned by the server. + + + + Response body — an object if JSON-parseable, otherwise the raw response text. + + + + Fully-qualified URL that produced the error. + + + + HTTP method that produced the error. Defaults to `"GET"`. + + +#### Returns + +`RestError` + +#### Source + +[`src/rest/RestError.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/RestError.ts) + +Line 28. + +## Source + +[`src/rest/RestError.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/RestError.ts) + +Line 8. diff --git a/fern/products/sdk-reference/typescript/rest/types/index.mdx b/fern/products/sdk-reference/typescript/rest/types/index.mdx new file mode 100644 index 0000000000..4269bf3880 --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/types/index.mdx @@ -0,0 +1,172 @@ +--- +slug: "/reference/typescript/rest/types" +title: "types" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "rest.types" + module: "rest" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/types.ts" +--- +# `types` + +## Signature + +```typescript +module types +``` + +## Type Aliases + +### QueryParams + +Query parameters for list operations. + +#### Signature + +```typescript +type QueryParams = Record +``` + +#### Source + +[`src/rest/types.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/types.ts) + +Line 61. + +## Interfaces + +### ClientOptions + +Options for constructing a RestClient. + +#### Signature + +```typescript +interface ClientOptions +``` + +#### Properties + + + Custom fetch implementation for testing. + + + + SignalWire space host (e.g. "example.signalwire.com"). Falls back to SIGNALWIRE\_SPACE env var. + + + + SignalWire project ID. Falls back to SIGNALWIRE\_PROJECT\_ID env var. + + + + SignalWire API token. Falls back to SIGNALWIRE\_API\_TOKEN env var. + + +#### Source + +[`src/rest/types.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/types.ts) + +Line 8. + +*** + +### HttpClientOptions + +Options for constructing an HttpClient. + +#### Signature + +```typescript +interface HttpClientOptions +``` + +#### Properties + + + Base URL (e.g. "https://example.signalwire.com"). Either `baseUrl` or `host` must be provided. If both are given, `host` takes precedence (matching the Python SDK convention where `host` is the canonical parameter). + + + + Custom fetch implementation for testing. + + + + Bare hostname (e.g. "example.signalwire.com"). `https://` is prepended automatically, matching the Python SDK's `HttpClient(project, token, host)` convention. + + + + Project ID for Basic Auth username. + + + + API token for Basic Auth password. + + +#### Source + +[`src/rest/types.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/types.ts) + +Line 20. + +*** + +### LamlPaginatedResponse + +LAML-style paginated response with next\_page\_uri. + +#### Signature + +```typescript +interface LamlPaginatedResponse +``` + +#### Properties + + + + + + + + + +#### Source + +[`src/rest/types.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/types.ts) + +Line 52. + +*** + +### PaginatedResponse + +Standard paginated response with links-based navigation (relay REST). + +#### Signature + +```typescript +interface PaginatedResponse +``` + +#### Properties + + + + + +#### Source + +[`src/rest/types.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/types.ts) + +Line 41. + +## Source + +[`src/rest/types.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/types.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/schema-utils/index.mdx b/fern/products/sdk-reference/typescript/schema-utils/index.mdx new file mode 100644 index 0000000000..f36fa9adcb --- /dev/null +++ b/fern/products/sdk-reference/typescript/schema-utils/index.mdx @@ -0,0 +1,362 @@ +--- +slug: "/reference/typescript/schema-utils" +title: "SchemaUtils" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "SchemaUtils" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/SchemaUtils.ts" +--- +# `SchemaUtils` + +Validates SWML documents against structural rules with an LRU-style result cache. + +## Signature + +```typescript +class SchemaUtils +``` + +## Methods + +### clearCache + +Clear the validation cache + +#### Signature + +```typescript +clearCache(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/SchemaUtils.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SchemaUtils.ts) + +Line 341. + +*** + +### constructor + +Create a SchemaUtils instance. + +#### Signature + +```typescript +constructor(opts?: { ...3 fields }): SchemaUtils +``` + +#### Parameters + + + Optional settings for skipping validation, limiting cache size, or overriding the schema file path. + + + + + + + + +#### Returns + +`SchemaUtils` + +#### Source + +[`src/SchemaUtils.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SchemaUtils.ts) + +Line 47. + +*** + +### getCacheSize + +Get the number of cached validation results. + +#### Signature + +```typescript +getCacheSize(): number +``` + +#### Returns + +`number` — The current cache entry count. + +#### Source + +[`src/SchemaUtils.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SchemaUtils.ts) + +Line 349. + +*** + +### getVerbDescription + +Get the description text for a verb. + +#### Signature + +```typescript +getVerbDescription(verbName: string): string +``` + +#### Parameters + + + The verb name. + + +#### Returns + +`string` — The description string or empty string. + +#### Source + +[`src/SchemaUtils.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SchemaUtils.ts) + +Line 158. + +*** + +### getVerbNames + +Get all verb names defined in the schema. + +#### Signature + +```typescript +getVerbNames(): string[] +``` + +#### Returns + +`string[]` — Array of verb names (e.g. \["answer", "ai", "hangup", ...]). + +#### Source + +[`src/SchemaUtils.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SchemaUtils.ts) + +Line 124. + +*** + +### getVerbProperties + +Get the inner properties schema for a specific verb. +For example, for "hangup" this returns `{ type: "object", properties: { reason: ... }, ... }`. + +#### Signature + +```typescript +getVerbProperties(verbName: string): Record +``` + +#### Parameters + + + The verb name (e.g. "answer", "tap"). + + +#### Returns + +`Record` — The inner schema definition or an empty object if not found. + +#### Source + +[`src/SchemaUtils.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SchemaUtils.ts) + +Line 134. + +*** + +### getVerbRequiredProperties + +Get the required properties for a verb's inner config. + +#### Signature + +```typescript +getVerbRequiredProperties(verbName: string): string[] +``` + +#### Parameters + + + The verb name. + + +#### Returns + +`string[]` — Array of required property names. + +#### Source + +[`src/SchemaUtils.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SchemaUtils.ts) + +Line 147. + +*** + +### hasVerb + +Check if a verb name is defined in the schema. + +#### Signature + +```typescript +hasVerb(verbName: string): boolean +``` + +#### Parameters + + + The verb name. + + +#### Returns + +`boolean` — True if the verb exists. + +#### Source + +[`src/SchemaUtils.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SchemaUtils.ts) + +Line 168. + +*** + +### validate + +Validate a SWML document against structural rules. + +#### Signature + +```typescript +validate(swml: string | Record): ValidationResult +``` + +#### Parameters + + + The SWML document as a JSON string or parsed object. + + +#### Returns + +`ValidationResult` — The validation result indicating success or a list of errors. + +#### Source + +[`src/SchemaUtils.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SchemaUtils.ts) + +Line 231. + +*** + +### validateVerb + +Lightweight validation of a verb config against the schema. +Checks that the verb exists and required properties are present. +Mirrors Python SDK's `_validate_verb_lightweight()`. + +#### Signature + +```typescript +validateVerb(verbName: string, config: unknown): ValidationResult +``` + +#### Parameters + + + The verb name. + + + + The verb configuration to validate. + + +#### Returns + +`ValidationResult` — Validation result. + +#### Source + +[`src/SchemaUtils.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SchemaUtils.ts) + +Line 181. + +## Interfaces + +### ValidationResult + +Result of validating a SWML document. + +#### Signature + +```typescript +interface ValidationResult +``` + +#### Properties + + + List of human-readable error messages; empty when valid. + + + + Whether the document passed all validation checks. + + +#### Source + +[`src/SchemaUtils.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SchemaUtils.ts) + +Line 12. + +*** + +### VerbDefinition + +A verb definition extracted from the schema. + +#### Signature + +```typescript +interface VerbDefinition +``` + +#### Properties + + + The raw JSON Schema definition object for this verb. + + + + The verb name as used in SWML (e.g. "answer", "hangup", "sip\_refer"). + + + + The PascalCase schema definition name (e.g. "Answer", "Hangup", "SIPRefer"). + + +#### Source + +[`src/SchemaUtils.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SchemaUtils.ts) + +Line 20. + +## Source + +[`src/SchemaUtils.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SchemaUtils.ts) + +Line 34. diff --git a/fern/products/sdk-reference/typescript/security-utils/index.mdx b/fern/products/sdk-reference/typescript/security-utils/index.mdx new file mode 100644 index 0000000000..aff662922e --- /dev/null +++ b/fern/products/sdk-reference/typescript/security-utils/index.mdx @@ -0,0 +1,278 @@ +--- +slug: "/reference/typescript/security-utils" +title: "SecurityUtils" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "SecurityUtils" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/SecurityUtils.ts" +--- +# `SecurityUtils` + +## Signature + +```typescript +module SecurityUtils +``` + +## Constants + + + Maximum allowed input length for skill handler arguments (characters). + + +## Functions + +### filterSensitiveHeaders + +Return a copy of `headers` with sensitive entries (authorization, cookie, etc.) removed. + +#### Signature + +```typescript +filterSensitiveHeaders(headers: Record): Record +``` + +#### Parameters + + + Original header record. + + +#### Returns + +`Record` — A new record with sensitive headers removed. + +#### Source + +[`src/SecurityUtils.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SecurityUtils.ts) + +Line 47. + +*** + +### isPrivateIp + +Check whether an IP address belongs to a private/reserved range. +Covers RFC1918, loopback, link-local, IPv6 private (fc/fd, ::1, fe80). + +#### Signature + +```typescript +isPrivateIp(ip: string): boolean +``` + +#### Parameters + + + The IP address string to check. + + +#### Returns + +`boolean` — True if the IP is private/reserved. + +#### Source + +[`src/SecurityUtils.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SecurityUtils.ts) + +Line 84. + +*** + +### isServerlessMode + +Whether the current process is running in a serverless environment +(anything other than a long-lived `server` runtime). + +Python parity: `signalwire.utils.is_serverless_mode`. + +#### Signature + +```typescript +isServerlessMode(): boolean +``` + +#### Returns + +`boolean` + +#### Source + +[`src/SecurityUtils.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SecurityUtils.ts) + +Line 162. + +*** + +### isValidHostname + +Validate that a hostname string does not contain whitespace, slashes, or control characters. + +#### Signature + +```typescript +isValidHostname(host: string): boolean +``` + +#### Parameters + + + Hostname to validate. + + +#### Returns + +`boolean` — True if the hostname is valid. + +#### Source + +[`src/SecurityUtils.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SecurityUtils.ts) + +Line 72. + +*** + +### redactUrl + +Redact credentials embedded in a URL (e.g. `https://user:secret@host` -> `https://user:****@host`). +Returns the URL unchanged if no credentials are present. + +#### Signature + +```typescript +redactUrl(url: string): string +``` + +#### Parameters + + + The URL string to redact. + + +#### Returns + +`string` — The URL with the password portion replaced by `****`. + +#### Source + +[`src/SecurityUtils.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SecurityUtils.ts) + +Line 63. + +*** + +### resolveAndValidateUrl + +DNS-resolve a URL's hostname and reject it if it points to a private IP. + +#### Signature + +```typescript +resolveAndValidateUrl(url: string, allowPrivate: boolean = false): Promise +``` + +#### Parameters + + + The full URL to validate. + + + + When true, skip the private-IP check (default false). + + +#### Returns + +`Promise` + +#### Throws + +- If the resolved IP is private and `allowPrivate` is false. + +#### Source + +[`src/SecurityUtils.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SecurityUtils.ts) + +Line 107. + +*** + +### safeAssign + +Copy properties from `source` to `target`, filtering out prototype-pollution keys. +Drop-in replacement for `Object.assign(target, source)` where `source` is untrusted. + +#### Signature + +```typescript +safeAssign(target: T, source: Record): T +``` + +#### Type Parameters + + + +#### Parameters + + + The object to assign into. + + + + The object to copy properties from. + + +#### Returns + +`T` — The target object. + +#### Source + +[`src/SecurityUtils.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SecurityUtils.ts) + +Line 24. + +*** + +### validateUrl + +Validate that a URL is safe to fetch (not pointing to private/internal resources). + +Matches Python's `validate_url(url, allow_private=False) -> bool` — returns `true` +if the URL is safe, `false` otherwise (never throws). + +#### Signature + +```typescript +validateUrl(url: string, allowPrivate: boolean = false): Promise +``` + +#### Parameters + + + The URL to validate. + + + + When true, allow private IP ranges (default false). + + +#### Returns + +`Promise` — `true` if the URL is safe to fetch, `false` otherwise. + +#### Source + +[`src/SecurityUtils.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SecurityUtils.ts) + +Line 147. + +## Source + +[`src/SecurityUtils.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SecurityUtils.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/serverless-adapter/index.mdx b/fern/products/sdk-reference/typescript/serverless-adapter/index.mdx new file mode 100644 index 0000000000..012e2bb806 --- /dev/null +++ b/fern/products/sdk-reference/typescript/serverless-adapter/index.mdx @@ -0,0 +1,394 @@ +--- +slug: "/reference/typescript/serverless-adapter" +title: "ServerlessAdapter" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "ServerlessAdapter" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/ServerlessAdapter.ts" +--- +# `ServerlessAdapter` + +Adapts a Hono application for deployment on AWS Lambda, Google Cloud Functions, Azure Functions, or CGI. + +Accepts the provider's native event shape (`APIGatewayProxyEvent`, Google Functions `Request`, +Azure function arguments, CGI env + stdin) and returns a provider-native response. + +## Signature + +```typescript +class ServerlessAdapter +``` + +## Examples + +```typescript +import { AgentBase, ServerlessAdapter } from '@signalwire/sdk'; + +const agent = new AgentBase({ name: 'lambda', route: '/' }); +agent.setPromptText('You are a helpful assistant.'); + +const adapter = new ServerlessAdapter('aws'); + +export const handler = async (event: any) => { + return adapter.handleRequest(agent.asRouter(), event); +}; +``` + +## Methods + +### constructor + +Create a ServerlessAdapter for the given platform. + +#### Signature + +```typescript +constructor(platform: ServerlessPlatform = 'auto'): ServerlessAdapter +``` + +#### Parameters + + + Target platform; defaults to 'auto' which detects from environment variables. + + +#### Returns + +`ServerlessAdapter` + +#### Source + +[`src/ServerlessAdapter.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ServerlessAdapter.ts) + +Line 72. + +*** + +### createAzureHandler + +Create an Azure Functions-compatible handler from a Hono app. + +**Modifiers:** `static` + +#### Signature + +```typescript +createAzureHandler( + app: { ...1 fields } +): (context: any, req: any) => Promise +``` + +#### Parameters + + + A Hono-compatible application with a `fetch` method. + + + + +#### Returns + +`(context: any, req: any) => Promise` — A function that accepts an Azure context and request object. + +#### Source + +[`src/ServerlessAdapter.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ServerlessAdapter.ts) + +Line 223. + +*** + +### createGcfHandler + +Create a Google Cloud Functions-compatible handler from a Hono app. + +**Modifiers:** `static` + +#### Signature + +```typescript +createGcfHandler(app: { ...1 fields }): (req: any, res: any) => Promise +``` + +#### Parameters + + + A Hono-compatible application with a `fetch` method. + + + + +#### Returns + +`(req: any, res: any) => Promise` — A function that accepts GCF request/response objects. + +#### Source + +[`src/ServerlessAdapter.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ServerlessAdapter.ts) + +Line 200. + +*** + +### createLambdaHandler + +Create an AWS Lambda-compatible handler function from a Hono app. + +**Modifiers:** `static` + +#### Signature + +```typescript +createLambdaHandler( + app: { ...1 fields } +): (event: ServerlessEvent) => Promise +``` + +#### Parameters + + + A Hono-compatible application with a `fetch` method. + + + + +#### Returns + +`(event: ServerlessEvent) => Promise` — A function that accepts a Lambda event and returns a promise of a serverless response. + +#### Source + +[`src/ServerlessAdapter.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ServerlessAdapter.ts) + +Line 190. + +*** + +### detectPlatform + +Detect the serverless platform by inspecting well-known environment variables. + +#### Signature + +```typescript +detectPlatform(): ServerlessPlatform +``` + +#### Returns + +`ServerlessPlatform` — The detected platform identifier; defaults to 'lambda' if no match is found. + +#### Source + +[`src/ServerlessAdapter.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ServerlessAdapter.ts) + +Line 80. + +*** + +### generateUrl + +Generate the platform-specific invocation URL for a deployed function. + +#### Signature + +```typescript +generateUrl(opts?: { ...5 fields }): string +``` + +#### Parameters + + + Optional overrides for region, project, function name, stage, or API ID. + + + + + + + + + + + + +#### Returns + +`string` — The constructed URL string. + +#### Source + +[`src/ServerlessAdapter.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ServerlessAdapter.ts) + +Line 153. + +*** + +### getPlatform + +Get the resolved platform identifier. + +#### Signature + +```typescript +getPlatform(): ServerlessPlatform +``` + +#### Returns + +`ServerlessPlatform` — The serverless platform this adapter is configured for. + +#### Source + +[`src/ServerlessAdapter.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ServerlessAdapter.ts) + +Line 92. + +*** + +### handleRequest + +Convert a serverless event into a standard Request, route it through the Hono app, and return a normalized response. + +#### Signature + +```typescript +handleRequest( + app: { ...1 fields }, + event: ServerlessEvent +): Promise +``` + +#### Parameters + + + A Hono-compatible application with a `fetch` method. + + + + + + The incoming serverless event to process. + + +#### Returns + +`Promise` — The normalized serverless response. + +#### Source + +[`src/ServerlessAdapter.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ServerlessAdapter.ts) + +Line 102. + +## Type Aliases + +### ServerlessPlatform + +Supported serverless platform identifiers, or 'auto' for environment-based detection. + +#### Signature + +```typescript +type ServerlessPlatform = "lambda" | "gcf" | "azure" | "cgi" | "auto" +``` + +#### Source + +[`src/ServerlessAdapter.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ServerlessAdapter.ts) + +Line 13. + +## Interfaces + +### ServerlessEvent + +Normalized incoming event from a serverless platform. + +#### Signature + +```typescript +interface ServerlessEvent +``` + +#### Properties + + + Request body, either raw JSON string or parsed object. + + + + Request headers as key-value pairs. + + + + HTTP method (AWS Lambda style). + + + + HTTP method (GCF/Azure style). + + + + Request path. + + + + Query string parameters as key-value pairs. + + + + Raw request path (AWS API Gateway v2). + + + + Platform-specific request context metadata. + + +#### Source + +[`src/ServerlessAdapter.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ServerlessAdapter.ts) + +Line 16. + +*** + +### ServerlessResponse + +Normalized outgoing response returned to a serverless platform. + +#### Signature + +```typescript +interface ServerlessResponse +``` + +#### Properties + + + Response body as a string. + + + + Response headers as key-value pairs. + + + + HTTP status code. + + +#### Source + +[`src/ServerlessAdapter.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ServerlessAdapter.ts) + +Line 36. + +## Source + +[`src/ServerlessAdapter.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ServerlessAdapter.ts) + +Line 65. diff --git a/fern/products/sdk-reference/typescript/session-manager/index.mdx b/fern/products/sdk-reference/typescript/session-manager/index.mdx new file mode 100644 index 0000000000..df56202281 --- /dev/null +++ b/fern/products/sdk-reference/typescript/session-manager/index.mdx @@ -0,0 +1,512 @@ +--- +slug: "/reference/typescript/session-manager" +title: "SessionManager" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "SessionManager" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/SessionManager.ts" +--- +# `SessionManager` + +Stateless HMAC-SHA256 token manager for SWAIG function call authentication and per-session metadata storage. + +## Signature + +```typescript +class SessionManager +``` + +## Properties + + + When true, [debugToken](/docs/sdk-reference/reference/typescript/session-manager#debug-token) decodes token internals. When false (default), it returns `{ error: "debug mode not enabled" }`. + + + + HMAC signing secret. + + + + Token validity duration in seconds. + + +## Methods + +### activateSession + +Legacy method retained for API compatibility with the Python SDK. +Does nothing and returns `true`. + +#### Signature + +```typescript +activateSession(_callId: string): boolean +``` + +#### Parameters + + + The call/session identifier (unused). + + +#### Returns + +`boolean` — Always `true`. + +#### Source + +[`src/SessionManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SessionManager.ts) + +Line 289. + +*** + +### cleanup + +Remove session metadata entries older than `maxAgeMs`. + +#### Signature + +```typescript +cleanup(maxAgeMs?: number): void +``` + +#### Parameters + + + Maximum age in milliseconds (defaults to `tokenExpirySecs * 1000`). + + +#### Returns + +`void` + +#### Source + +[`src/SessionManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SessionManager.ts) + +Line 272. + +*** + +### constructor + +Create a new SessionManager. + +#### Signature + +```typescript +constructor(tokenExpirySecs: number = 900, secretKey?: string): SessionManager +``` + +#### Parameters + + + Token validity duration in seconds (default 900). + + + + HMAC signing secret; a random key is generated if omitted. + + +#### Returns + +`SessionManager` + +#### Source + +[`src/SessionManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SessionManager.ts) + +Line 52. + +*** + +### createSession + +Return the given callId or generate a new random session identifier. + +#### Signature + +```typescript +createSession(callId?: string): string +``` + +#### Parameters + + + Existing call ID to reuse. + + +#### Returns + +`string` — The call ID string. + +#### Source + +[`src/SessionManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SessionManager.ts) + +Line 62. + +*** + +### createToolToken + +Alias for [generateToken](/docs/sdk-reference/reference/typescript/session-manager#generate-token). + +#### Signature + +```typescript +createToolToken(functionName: string, callId: string): string +``` + +#### Parameters + + + The SWAIG function name to bind. + + + + The call ID to bind. + + +#### Returns + +`string` — A base64url-encoded token string. + +#### Source + +[`src/SessionManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SessionManager.ts) + +Line 92. + +*** + +### debugToken + +Debug a token without validating it. + +Requires [debugMode](/docs/sdk-reference/reference/typescript/session-manager#debug-mode) to be `true`. When disabled, returns +`{ error: "debug mode not enabled" }` matching the Python SDK behaviour. + +#### Signature + +```typescript +debugToken(token: string): DebugTokenResult +``` + +#### Parameters + + + The base64url-encoded token to decode. + + +#### Returns + +`DebugTokenResult` — A nested debug structure matching the Python SDK, or an error object. + +#### Source + +[`src/SessionManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SessionManager.ts) + +Line 169. + +*** + +### deleteSessionMetadata + +Delete all metadata for a session. + +#### Signature + +```typescript +deleteSessionMetadata(sessionId: string): boolean +``` + +#### Parameters + + + The session identifier. + + +#### Returns + +`boolean` — True if the session existed and was deleted. + +#### Source + +[`src/SessionManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SessionManager.ts) + +Line 308. + +*** + +### endSession + +Legacy method retained for API compatibility with the Python SDK. +Does nothing and returns `true`. + +#### Signature + +```typescript +endSession(_callId: string): boolean +``` + +#### Parameters + + + The call/session identifier (unused). + + +#### Returns + +`boolean` — Always `true`. + +#### Source + +[`src/SessionManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SessionManager.ts) + +Line 299. + +*** + +### generateToken + +Generate a signed, base64url-encoded token binding a function name to a call ID. + +#### Signature + +```typescript +generateToken(functionName: string, callId: string): string +``` + +#### Parameters + + + The SWAIG function name to bind. + + + + The call ID to bind. + + +#### Returns + +`string` — A base64url-encoded token string. + +#### Source + +[`src/SessionManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SessionManager.ts) + +Line 73. + +*** + +### getSessionMetadata + +Retrieve metadata associated with a session. + +Returns an empty object when no metadata has been stored for the session, +matching Python SDK behavior (`get_session_metadata` always returns `{}`). +Callers can safely check truthiness or iterate keys without a null guard. + +#### Signature + +```typescript +getSessionMetadata(sessionId: string): Record +``` + +#### Parameters + + + The session identifier. + + +#### Returns + +`Record` — The metadata record for the session, or `{}` if no metadata exists. + +#### Source + +[`src/SessionManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SessionManager.ts) + +Line 233. + +*** + +### setSessionMetadata + +Merge metadata into a session, creating the entry if it does not exist. + +Supports two call signatures for Python SDK compatibility: + +- `setSessionMetadata(sessionId, metadata)` — bulk merge (TS-native) +- `setSessionMetadata(sessionId, key, value)` — single key/value (Python-compatible) + +#### Signature + + + + ```typescript + setSessionMetadata( + sessionId: string, + metadataOrKey: Record + ): void + ``` + + + + ```typescript + setSessionMetadata(sessionId: string, key: string, value: unknown): boolean + ``` + + + +#### Parameters (Overload 1) + + + The session identifier. + + + + A metadata record to merge, or a string key when called with three arguments. + + +#### Parameters (Overload 2) + + + The session identifier. + + + + + + The value to set when called with a string key. + + +#### Returns (Overload 1) + +`void` + +#### Returns (Overload 2) + +`boolean` + +#### Source + +[`src/SessionManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SessionManager.ts) + +Line 248. + +*** + +### validateToken + +Validate a token against the expected call ID and function name. + +#### Signature + +```typescript +validateToken(callId: string, functionName: string, token: string): boolean +``` + +#### Parameters + + + The expected call ID. + + + + The expected function name. + + + + The base64url-encoded token to validate. + + +#### Returns + +`boolean` — True if the token is valid and not expired. + +#### Source + +[`src/SessionManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SessionManager.ts) + +Line 103. + +*** + +### validateToolToken + +Alias for [validateToken](/docs/sdk-reference/reference/typescript/session-manager#validate-token) with reordered parameters. + +#### Signature + +```typescript +validateToolToken(functionName: string, token: string, callId: string): boolean +``` + +#### Parameters + + + The expected function name. + + + + The base64url-encoded token to validate. + + + + The expected call ID. + + +#### Returns + +`boolean` — True if the token is valid and not expired. + +#### Source + +[`src/SessionManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SessionManager.ts) + +Line 156. + +## Interfaces + +### DebugTokenResult + +Decoded token debug info matching the Python SDK's nested return structure. + +#### Signature + +```typescript +interface DebugTokenResult +``` + +#### Properties + + + + + + + + + + + + + +#### Source + +[`src/SessionManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SessionManager.ts) + +Line 12. + +## Source + +[`src/SessionManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SessionManager.ts) + +Line 33. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/api-ninjas-trivia/api-ninjas-trivia-skill/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/api-ninjas-trivia/api-ninjas-trivia-skill/index.mdx new file mode 100644 index 0000000000..07cfdaf323 --- /dev/null +++ b/fern/products/sdk-reference/typescript/skills/builtin/api-ninjas-trivia/api-ninjas-trivia-skill/index.mdx @@ -0,0 +1,709 @@ +--- +slug: "/reference/typescript/skills/builtin/api-ninjas-trivia/api-ninjas-trivia-skill" +title: "ApiNinjasTriviaSkill" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "skills.builtin.api_ninjas_trivia.ApiNinjasTriviaSkill" + parent: "skills.builtin.api_ninjas_trivia" + module: "skills.builtin.api_ninjas_trivia" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/api_ninjas_trivia.ts" +--- +# `ApiNinjasTriviaSkill` + +Fetches trivia questions from the API Ninjas service. + +Tier 2 built-in skill. Requires the `API_NINJAS_KEY` environment variable. +Supports optional `default_category` and `reveal_answer` config options. + +## Signature + +```typescript +class ApiNinjasTriviaSkill extends SkillBase +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/skills/skill-base) + +## Examples + +```typescript +agent.addSkill('api_ninjas_trivia', { default_category: 'sciencenature' }); +``` + +## Properties + + + Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. + + + + Configuration options provided at construction time. + + + + Unique identifier for this skill instance (includes timestamp and random bytes). + + + + Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. + + + + Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. + + + + Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. + + + + Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. + + + + Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. + + + + Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. + + + + The registered name of this skill type. + + + + Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. + + + + Additional SWAIG fields extracted from config, merged into tool definitions. + + +## Methods + +### cleanup + +Cleanup resources. Called when the skill is removed from an agent. + +#### Signature + +```typescript +cleanup(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 469. + +*** + +### constructor + +Create a new skill instance. + +Python parity: `core/skill_base.py:32-43`. +Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` +is left as `None` on the subclass. TS throws the equivalent when the static +defaults haven't been overridden. + +#### Signature + +```typescript +constructor(config?: SkillConfig): ApiNinjasTriviaSkill +``` + +#### Parameters + + + Optional configuration key-value pairs (Python: `params`). + + +#### Returns + +`ApiNinjasTriviaSkill` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 282. + +*** + +### defineTool + +Imperatively register a tool with this skill. + +Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. +Merges `this.swaigFields` into the tool definition (explicit fields on +`toolDef` take precedence), then pushes the result into `_dynamicTools` +so the default `getTools()` returns it at SWML render time. + +Intended for skills whose tool shape depends on config evaluated at +`setup()` time. Skills with a static tool list should override +`getTools()` instead. + +#### Signature + +```typescript +defineTool(toolDef: SkillToolDefinition): void +``` + +#### Parameters + + + The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 351. + +*** + +### getAgent + +Return the agent that owns this skill, asserting it is non-null. +Equivalent to accessing `self.agent` in Python, where the agent reference +is always set before `setup()` is called. + +The SkillManager lifecycle guarantees that `setAgent()` is called before +`setup()`, so this method is safe to use inside `setup()` and in any +tool handler invoked during an active agent session. + +#### Signature + +```typescript +getAgent(): AgentBase +``` + +#### Returns + +`AgentBase` — The owning `AgentBase` instance. + +#### Throws + +- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 261. + +*** + +### getConfig + +Get a configuration value by key, falling back to a default if not set. + +#### Signature + +```typescript +getConfig(key: string, defaultValue?: T): T +``` + +#### Type Parameters + + + +#### Parameters + + + The configuration key to look up. + + + + Value to return if the key is not present. + + +#### Returns + +`T` — The configuration value cast to type T, or the default value. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 524. + +*** + +### getDataMapTools + +Optional DataMap-style tool definitions. Skills that build their own +SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them +here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. + +Python equivalent: the direct `self.agent.register_swaig_function(fn)` +call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). +Default returns `[]` — skills using only the declarative `getTools()` path +do not need to override this. + +#### Signature + +```typescript +getDataMapTools(): Record[] +``` + +#### Returns + +`Record[]` — Array of fully-built SWAIG function dicts. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 372. + +*** + +### getGlobalData + +Get global data to merge into the agent's global data store. + +#### Signature + +```typescript +getGlobalData(): Record +``` + +#### Returns + +`Record` — Key-value pairs to be merged into the agent's global data. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 410. + +*** + +### getHints + +#### Signature + +```typescript +getHints(): string[] +``` + +#### Returns + +`string[]` — Speech recognition hints for trivia-related keywords. + +#### Source + +[`src/skills/builtin/api_ninjas_trivia.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/api_ninjas_trivia.ts) + +Line 278. + +*** + +### getInstanceKey + +Produce a compound instance key matching Python `get_instance_key` +(skill.py:139-146): `f"{SKILL_NAME}_{self.tool_name}"` with +`tool_name` defaulting to `'get_trivia'` (skill.py:95). The base +`SkillBase.getInstanceKey` uses `this.skillName` as the fallback, +so we override to match Python's `'get_trivia'` default. + +#### Signature + +```typescript +getInstanceKey(): string +``` + +#### Returns + +`string` + +#### Source + +[`src/skills/builtin/api_ninjas_trivia.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/api_ninjas_trivia.ts) + +Line 114. + +*** + +### getParameterSchema + +Get the parameter schema for this skill class, describing all accepted configuration options. +Subclasses should override and call `super.getParameterSchema()` to include base parameters. + +Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): +returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a +`tool_name` entry with `default: cls.SKILL_NAME` for classes with +`SUPPORTS_MULTIPLE_INSTANCES = true`. + +**Modifiers:** `static` + +#### Signature + +```typescript +getParameterSchema(): Record +``` + +#### Returns + +`Record` — Record mapping parameter names to their schema entries. + +#### Source + +[`src/skills/builtin/api_ninjas_trivia.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/api_ninjas_trivia.ts) + +Line 68. + +*** + +### getPromptSections + +Get prompt sections to inject into the agent's system prompt. +Respects the `skip_prompt` config option — returns `[]` if set to `true`. +Subclasses should override `_getPromptSections()` instead of this method. + +#### Signature + +```typescript +getPromptSections(): SkillPromptSection[] +``` + +#### Returns + +`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 382. + +*** + +### getSkillData + +Read this skill's data from a raw call data object's global\_data. + +#### Signature + +```typescript +getSkillData(rawData: Record): Record +``` + +#### Parameters + + + The raw request data containing global\_data. + + +#### Returns + +`Record` — The skill's stored data, or an empty object if not found. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 450. + +*** + +### getSkillNamespace + +Get the namespaced key for storing per-skill data in global\_data. + +#### Signature + +```typescript +getSkillNamespace(): string +``` + +#### Returns + +`string` — A string like "skill:datetime" or "skill:my\_prefix". + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 440. + +*** + +### getTools + +#### Signature + +```typescript +getTools(): SkillToolDefinition[] +``` + +#### Returns + +`SkillToolDefinition[]` — A single trivia tool (configurable name) that fetches a random trivia question with optional category. + +#### Source + +[`src/skills/builtin/api_ninjas_trivia.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/api_ninjas_trivia.ts) + +Line 120. + +*** + +### hasAllEnvVars + +Check if all required environment variables are present. +Convenience wrapper around `validateEnvVars()` that returns a boolean, +matching the Python `validate_env_vars() -> bool` return type. + +#### Signature + +```typescript +hasAllEnvVars(): boolean +``` + +#### Returns + +`boolean` — `true` if all required env vars are set, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 544. + +*** + +### hasAllPackages + +Check if all required packages declared in the manifest are available. +Convenience wrapper around `validatePackages()` that returns a boolean, +matching the Python `validate_packages() -> bool` return type. + +#### Signature + +```typescript +hasAllPackages(): Promise +``` + +#### Returns + +`Promise` — `true` if all required packages are importable, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 579. + +*** + +### isInitialized + +Check if the skill has been initialized by the SkillManager. + +#### Signature + +```typescript +isInitialized(): boolean +``` + +#### Returns + +`boolean` — True if setup() has completed and the skill is marked initialized. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 507. + +*** + +### markInitialized + +Mark the skill as initialized (called by SkillManager). + +#### Signature + +```typescript +markInitialized(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 514. + +*** + +### setAgent + +Set the agent reference for this skill. +Called by the SkillManager/AgentBase when the skill is attached to an agent. +Python equivalent: `self.agent = agent` in `__init__`. + +#### Signature + +```typescript +setAgent(agent: AgentBase): void +``` + +#### Parameters + + + The agent that owns this skill. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 534. + +*** + +### setup + +Setup the skill. Called when the skill is added to an agent. +Override to perform initialization (API connections, config validation, etc.) + +#### Signature + +```typescript +setup(): Promise +``` + +#### Returns + +`Promise` — `true` if setup succeeded, `false` otherwise. Python equivalent: abstract `setup() -> bool`. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 313. + +*** + +### updateSkillData + +Update this skill's namespaced data on a FunctionResult via updateGlobalData. + +#### Signature + +```typescript +updateSkillData( + result: FunctionResult, + data: Record +): FunctionResult +``` + +#### Parameters + + + The FunctionResult to update. + + + + The data to store under this skill's namespace. + + +#### Returns + +`FunctionResult` — The FunctionResult for chaining. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 462. + +*** + +### validateEnvVars + +Validate that all required environment variables declared on the skill class +are set in the current process environment. + +Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` +directly. TS reads the same static from the class. + +Returns the list of missing variable names so callers can produce actionable +error messages. This differs from Python's `validate_env_vars() -> bool` +return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/skills/builtin/api-ninjas-trivia/api-ninjas-trivia-skill#has-all-env-vars) is the boolean equivalent. + +#### Signature + +```typescript +validateEnvVars(): string[] +``` + +#### Returns + +`string[]` — Array of missing environment variable names (empty if all are present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 486. + +*** + +### validatePackages + +Validate that all required packages declared on the skill class can be imported. + +Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` +directly and tries `importlib.import_module(pkg)` for each; TS does the +equivalent with a dynamic `import()`. + +#### Signature + +```typescript +validatePackages(): Promise +``` + +#### Returns + +`Promise` — Array of package names that could not be imported (empty if all present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 557. + +## Source + +[`src/skills/builtin/api_ninjas_trivia.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/api_ninjas_trivia.ts) + +Line 59. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/api-ninjas-trivia/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/api-ninjas-trivia/index.mdx new file mode 100644 index 0000000000..47673c2a3e --- /dev/null +++ b/fern/products/sdk-reference/typescript/skills/builtin/api-ninjas-trivia/index.mdx @@ -0,0 +1,62 @@ +--- +slug: "/reference/typescript/skills/builtin/api-ninjas-trivia" +title: "api_ninjas_trivia" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "skills.builtin.api_ninjas_trivia" + module: "skills.builtin" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/api_ninjas_trivia.ts" +--- +# `api_ninjas_trivia` + +## Signature + +```typescript +module api_ninjas_trivia +``` + +## Classes + + + + Fetches trivia questions from the API Ninjas service. + + + +## Functions + +### createSkill + +Factory function for creating ApiNinjasTriviaSkill instances. + +#### Signature + +```typescript +createSkill(config?: SkillConfig): ApiNinjasTriviaSkill +``` + +#### Parameters + + + Optional skill configuration. + + +#### Returns + +`ApiNinjasTriviaSkill` — A new ApiNinjasTriviaSkill instance. + +#### Source + +[`src/skills/builtin/api_ninjas_trivia.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/api_ninjas_trivia.ts) + +Line 288. + +## Source + +[`src/skills/builtin/api_ninjas_trivia.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/api_ninjas_trivia.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/ask-claude/ask-claude-skill/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/ask-claude/ask-claude-skill/index.mdx new file mode 100644 index 0000000000..81fdf8a594 --- /dev/null +++ b/fern/products/sdk-reference/typescript/skills/builtin/ask-claude/ask-claude-skill/index.mdx @@ -0,0 +1,716 @@ +--- +slug: "/reference/typescript/skills/builtin/ask-claude/ask-claude-skill" +title: "AskClaudeSkill" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "skills.builtin.ask_claude.AskClaudeSkill" + parent: "skills.builtin.ask_claude" + module: "skills.builtin.ask_claude" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/ask_claude.ts" +--- +# `AskClaudeSkill` + +Provides access to Anthropic's Claude AI for sub-queries and complex reasoning. + +Tier 3 built-in skill. Requires the `ANTHROPIC_API_KEY` environment variable. +Supports `model` and `max_tokens` config options to control which Claude model +is used and the maximum response length. + +## Signature + +```typescript +class AskClaudeSkill extends SkillBase +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/skills/skill-base) + +## Examples + +```typescript +agent.addSkill('ask_claude', { model: 'claude-sonnet-4-6', max_tokens: 512 }); +``` + +## Properties + + + Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. + + + + Configuration options provided at construction time. + + + + Unique identifier for this skill instance (includes timestamp and random bytes). + + + + Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. + + + + Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. + + + + Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. + + + + Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. + + + + Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. + + + + Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. + + + + The registered name of this skill type. + + + + Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. + + + + Additional SWAIG fields extracted from config, merged into tool definitions. + + +## Methods + +### cleanup + +Cleanup resources. Called when the skill is removed from an agent. + +#### Signature + +```typescript +cleanup(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 469. + +*** + +### constructor + +Create a new skill instance. + +Python parity: `core/skill_base.py:32-43`. +Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` +is left as `None` on the subclass. TS throws the equivalent when the static +defaults haven't been overridden. + +#### Signature + +```typescript +constructor(config?: SkillConfig): AskClaudeSkill +``` + +#### Parameters + + + Optional configuration key-value pairs (Python: `params`). + + +#### Returns + +`AskClaudeSkill` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 282. + +*** + +### defineTool + +Imperatively register a tool with this skill. + +Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. +Merges `this.swaigFields` into the tool definition (explicit fields on +`toolDef` take precedence), then pushes the result into `_dynamicTools` +so the default `getTools()` returns it at SWML render time. + +Intended for skills whose tool shape depends on config evaluated at +`setup()` time. Skills with a static tool list should override +`getTools()` instead. + +#### Signature + +```typescript +defineTool(toolDef: SkillToolDefinition): void +``` + +#### Parameters + + + The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 351. + +*** + +### getAgent + +Return the agent that owns this skill, asserting it is non-null. +Equivalent to accessing `self.agent` in Python, where the agent reference +is always set before `setup()` is called. + +The SkillManager lifecycle guarantees that `setAgent()` is called before +`setup()`, so this method is safe to use inside `setup()` and in any +tool handler invoked during an active agent session. + +#### Signature + +```typescript +getAgent(): AgentBase +``` + +#### Returns + +`AgentBase` — The owning `AgentBase` instance. + +#### Throws + +- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 261. + +*** + +### getConfig + +Get a configuration value by key, falling back to a default if not set. + +#### Signature + +```typescript +getConfig(key: string, defaultValue?: T): T +``` + +#### Type Parameters + + + +#### Parameters + + + The configuration key to look up. + + + + Value to return if the key is not present. + + +#### Returns + +`T` — The configuration value cast to type T, or the default value. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 524. + +*** + +### getDataMapTools + +Optional DataMap-style tool definitions. Skills that build their own +SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them +here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. + +Python equivalent: the direct `self.agent.register_swaig_function(fn)` +call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). +Default returns `[]` — skills using only the declarative `getTools()` path +do not need to override this. + +#### Signature + +```typescript +getDataMapTools(): Record[] +``` + +#### Returns + +`Record[]` — Array of fully-built SWAIG function dicts. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 372. + +*** + +### getGlobalData + +Get global data to merge into the agent's global data store. + +#### Signature + +```typescript +getGlobalData(): Record +``` + +#### Returns + +`Record` — Key-value pairs to be merged into the agent's global data. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 410. + +*** + +### getHints + +Get speech recognition hints relevant to this skill. + +#### Signature + +```typescript +getHints(): string[] +``` + +#### Returns + +`string[]` — Array of hint strings to improve speech recognition accuracy. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 402. + +*** + +### getInstanceKey + +Get the instance key used for deduplication in the SkillManager. + +For single-instance skills (`SUPPORTS_MULTIPLE_INSTANCES = false`), returns +the skill name. For multi-instance skills, returns `${skillName}_${toolName}` +using the `tool_name` config (falls back to the skill name). + +Matches Python's `SkillBase.get_instance_key()` default (`skill_base.py:141-146`). +Multi-instance subclasses only need to override when their key derivation +depends on config beyond `tool_name`. + +#### Signature + +```typescript +getInstanceKey(): string +``` + +#### Returns + +`string` — A unique key identifying this skill instance. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 427. + +*** + +### getParameterSchema + +Get the parameter schema for this skill class, describing all accepted configuration options. +Subclasses should override and call `super.getParameterSchema()` to include base parameters. + +Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): +returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a +`tool_name` entry with `default: cls.SKILL_NAME` for classes with +`SUPPORTS_MULTIPLE_INSTANCES = true`. + +**Modifiers:** `static` + +#### Signature + +```typescript +getParameterSchema(): Record +``` + +#### Returns + +`Record` — Record mapping parameter names to their schema entries. + +#### Source + +[`src/skills/builtin/ask_claude.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/ask_claude.ts) + +Line 88. + +*** + +### getPromptSections + +Get prompt sections to inject into the agent's system prompt. +Respects the `skip_prompt` config option — returns `[]` if set to `true`. +Subclasses should override `_getPromptSections()` instead of this method. + +#### Signature + +```typescript +getPromptSections(): SkillPromptSection[] +``` + +#### Returns + +`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 382. + +*** + +### getSkillData + +Read this skill's data from a raw call data object's global\_data. + +#### Signature + +```typescript +getSkillData(rawData: Record): Record +``` + +#### Parameters + + + The raw request data containing global\_data. + + +#### Returns + +`Record` — The skill's stored data, or an empty object if not found. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 450. + +*** + +### getSkillNamespace + +Get the namespaced key for storing per-skill data in global\_data. + +#### Signature + +```typescript +getSkillNamespace(): string +``` + +#### Returns + +`string` — A string like "skill:datetime" or "skill:my\_prefix". + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 440. + +*** + +### getTools + +#### Signature + +```typescript +getTools(): SkillToolDefinition[] +``` + +#### Returns + +`SkillToolDefinition[]` — A single `ask_claude` tool that sends prompts to the Claude API. + +#### Source + +[`src/skills/builtin/ask_claude.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/ask_claude.ts) + +Line 112. + +*** + +### hasAllEnvVars + +Check if all required environment variables are present. +Convenience wrapper around `validateEnvVars()` that returns a boolean, +matching the Python `validate_env_vars() -> bool` return type. + +#### Signature + +```typescript +hasAllEnvVars(): boolean +``` + +#### Returns + +`boolean` — `true` if all required env vars are set, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 544. + +*** + +### hasAllPackages + +Check if all required packages declared in the manifest are available. +Convenience wrapper around `validatePackages()` that returns a boolean, +matching the Python `validate_packages() -> bool` return type. + +#### Signature + +```typescript +hasAllPackages(): Promise +``` + +#### Returns + +`Promise` — `true` if all required packages are importable, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 579. + +*** + +### isInitialized + +Check if the skill has been initialized by the SkillManager. + +#### Signature + +```typescript +isInitialized(): boolean +``` + +#### Returns + +`boolean` — True if setup() has completed and the skill is marked initialized. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 507. + +*** + +### markInitialized + +Mark the skill as initialized (called by SkillManager). + +#### Signature + +```typescript +markInitialized(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 514. + +*** + +### setAgent + +Set the agent reference for this skill. +Called by the SkillManager/AgentBase when the skill is attached to an agent. +Python equivalent: `self.agent = agent` in `__init__`. + +#### Signature + +```typescript +setAgent(agent: AgentBase): void +``` + +#### Parameters + + + The agent that owns this skill. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 534. + +*** + +### setup + +Setup the skill. Called when the skill is added to an agent. +Override to perform initialization (API connections, config validation, etc.) + +#### Signature + +```typescript +setup(): Promise +``` + +#### Returns + +`Promise` — `true` if setup succeeded, `false` otherwise. Python equivalent: abstract `setup() -> bool`. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 313. + +*** + +### updateSkillData + +Update this skill's namespaced data on a FunctionResult via updateGlobalData. + +#### Signature + +```typescript +updateSkillData( + result: FunctionResult, + data: Record +): FunctionResult +``` + +#### Parameters + + + The FunctionResult to update. + + + + The data to store under this skill's namespace. + + +#### Returns + +`FunctionResult` — The FunctionResult for chaining. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 462. + +*** + +### validateEnvVars + +Validate that all required environment variables declared on the skill class +are set in the current process environment. + +Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` +directly. TS reads the same static from the class. + +Returns the list of missing variable names so callers can produce actionable +error messages. This differs from Python's `validate_env_vars() -> bool` +return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/skills/builtin/ask-claude/ask-claude-skill#has-all-env-vars) is the boolean equivalent. + +#### Signature + +```typescript +validateEnvVars(): string[] +``` + +#### Returns + +`string[]` — Array of missing environment variable names (empty if all are present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 486. + +*** + +### validatePackages + +Validate that all required packages declared on the skill class can be imported. + +Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` +directly and tries `importlib.import_module(pkg)` for each; TS does the +equivalent with a dynamic `import()`. + +#### Signature + +```typescript +validatePackages(): Promise +``` + +#### Returns + +`Promise` — Array of package names that could not be imported (empty if all present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 557. + +## Source + +[`src/skills/builtin/ask_claude.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/ask_claude.ts) + +Line 81. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/ask-claude/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/ask-claude/index.mdx new file mode 100644 index 0000000000..4d3cabfd85 --- /dev/null +++ b/fern/products/sdk-reference/typescript/skills/builtin/ask-claude/index.mdx @@ -0,0 +1,62 @@ +--- +slug: "/reference/typescript/skills/builtin/ask-claude" +title: "ask_claude" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "skills.builtin.ask_claude" + module: "skills.builtin" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/ask_claude.ts" +--- +# `ask_claude` + +## Signature + +```typescript +module ask_claude +``` + +## Classes + + + + Provides access to Anthropic's Claude AI for sub-queries and complex reasoning. + + + +## Functions + +### createSkill + +Factory function for creating AskClaudeSkill instances. + +#### Signature + +```typescript +createSkill(config?: SkillConfig): AskClaudeSkill +``` + +#### Parameters + + + Optional skill configuration. + + +#### Returns + +`AskClaudeSkill` — A new AskClaudeSkill instance. + +#### Source + +[`src/skills/builtin/ask_claude.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/ask_claude.ts) + +Line 244. + +## Source + +[`src/skills/builtin/ask_claude.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/ask_claude.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/claude-skills/claude-skills-skill/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/claude-skills/claude-skills-skill/index.mdx new file mode 100644 index 0000000000..59b849ddec --- /dev/null +++ b/fern/products/sdk-reference/typescript/skills/builtin/claude-skills/claude-skills-skill/index.mdx @@ -0,0 +1,731 @@ +--- +slug: "/reference/typescript/skills/builtin/claude-skills/claude-skills-skill" +title: "ClaudeSkillsSkill" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "skills.builtin.claude_skills.ClaudeSkillsSkill" + parent: "skills.builtin.claude_skills" + module: "skills.builtin.claude_skills" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/claude_skills.ts" +--- +# `ClaudeSkillsSkill` + +Load Claude-style SKILL.md files as SignalWire agent tools. + +This skill parses Claude Code skill directories and makes them available +as SWAIG tools that the AI can call. Each Claude skill becomes a tool +that returns the skill's instructions when invoked. + +## Signature + +```typescript +class ClaudeSkillsSkill extends SkillBase +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/skills/skill-base) + +## Examples + +```typescript +agent.addSkill('claude_skills', { skills_dir: './claude-skills' }); +``` + +## Properties + + + Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. + + + + Configuration options provided at construction time. + + + + Unique identifier for this skill instance (includes timestamp and random bytes). + + + + Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. + + + + Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. + + + + Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. + + + + Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. + + + + Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. + + + + Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. + + + + The registered name of this skill type. + + + + Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. + + + + Additional SWAIG fields extracted from config, merged into tool definitions. + + +## Methods + +### cleanup + +Cleanup resources. Called when the skill is removed from an agent. + +#### Signature + +```typescript +cleanup(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 469. + +*** + +### constructor + +Create a new skill instance. + +Python parity: `core/skill_base.py:32-43`. +Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` +is left as `None` on the subclass. TS throws the equivalent when the static +defaults haven't been overridden. + +#### Signature + +```typescript +constructor(config?: SkillConfig): ClaudeSkillsSkill +``` + +#### Parameters + + + Optional configuration key-value pairs (Python: `params`). + + +#### Returns + +`ClaudeSkillsSkill` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 282. + +*** + +### defineTool + +Imperatively register a tool with this skill. + +Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. +Merges `this.swaigFields` into the tool definition (explicit fields on +`toolDef` take precedence), then pushes the result into `_dynamicTools` +so the default `getTools()` returns it at SWML render time. + +Intended for skills whose tool shape depends on config evaluated at +`setup()` time. Skills with a static tool list should override +`getTools()` instead. + +#### Signature + +```typescript +defineTool(toolDef: SkillToolDefinition): void +``` + +#### Parameters + + + The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 351. + +*** + +### getAgent + +Return the agent that owns this skill, asserting it is non-null. +Equivalent to accessing `self.agent` in Python, where the agent reference +is always set before `setup()` is called. + +The SkillManager lifecycle guarantees that `setAgent()` is called before +`setup()`, so this method is safe to use inside `setup()` and in any +tool handler invoked during an active agent session. + +#### Signature + +```typescript +getAgent(): AgentBase +``` + +#### Returns + +`AgentBase` — The owning `AgentBase` instance. + +#### Throws + +- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 261. + +*** + +### getConfig + +Get a configuration value by key, falling back to a default if not set. + +#### Signature + +```typescript +getConfig(key: string, defaultValue?: T): T +``` + +#### Type Parameters + + + +#### Parameters + + + The configuration key to look up. + + + + Value to return if the key is not present. + + +#### Returns + +`T` — The configuration value cast to type T, or the default value. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 524. + +*** + +### getDataMapTools + +Optional DataMap-style tool definitions. Skills that build their own +SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them +here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. + +Python equivalent: the direct `self.agent.register_swaig_function(fn)` +call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). +Default returns `[]` — skills using only the declarative `getTools()` path +do not need to override this. + +#### Signature + +```typescript +getDataMapTools(): Record[] +``` + +#### Returns + +`Record[]` — Array of fully-built SWAIG function dicts. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 372. + +*** + +### getGlobalData + +Get global data to merge into the agent's global data store. + +#### Signature + +```typescript +getGlobalData(): Record +``` + +#### Returns + +`Record` — Key-value pairs to be merged into the agent's global data. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 410. + +*** + +### getHints + +Get speech recognition hints relevant to this skill. + +#### Signature + +```typescript +getHints(): string[] +``` + +#### Returns + +`string[]` — Array of hint strings to improve speech recognition accuracy. + +#### Source + +[`src/skills/builtin/claude_skills.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/claude_skills.ts) + +Line 898. + +*** + +### getInstanceKey + +Get the instance key used for deduplication in the SkillManager. + +For single-instance skills (`SUPPORTS_MULTIPLE_INSTANCES = false`), returns +the skill name. For multi-instance skills, returns `${skillName}_${toolName}` +using the `tool_name` config (falls back to the skill name). + +Matches Python's `SkillBase.get_instance_key()` default (`skill_base.py:141-146`). +Multi-instance subclasses only need to override when their key derivation +depends on config beyond `tool_name`. + +#### Signature + +```typescript +getInstanceKey(): string +``` + +#### Returns + +`string` — A unique key identifying this skill instance. + +#### Source + +[`src/skills/builtin/claude_skills.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/claude_skills.ts) + +Line 964. + +*** + +### getParameterSchema + +Get the parameter schema for this skill class, describing all accepted configuration options. +Subclasses should override and call `super.getParameterSchema()` to include base parameters. + +Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): +returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a +`tool_name` entry with `default: cls.SKILL_NAME` for classes with +`SUPPORTS_MULTIPLE_INSTANCES = true`. + +**Modifiers:** `static` + +#### Signature + +```typescript +getParameterSchema(): Record +``` + +#### Returns + +`Record` — Record mapping parameter names to their schema entries. + +#### Source + +[`src/skills/builtin/claude_skills.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/claude_skills.ts) + +Line 99. + +*** + +### getPromptSections + +Get prompt sections to inject into the agent's system prompt. +Respects the `skip_prompt` config option — returns `[]` if set to `true`. +Subclasses should override `_getPromptSections()` instead of this method. + +#### Signature + +```typescript +getPromptSections(): SkillPromptSection[] +``` + +#### Returns + +`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 382. + +*** + +### getSkillData + +Read this skill's data from a raw call data object's global\_data. + +#### Signature + +```typescript +getSkillData(rawData: Record): Record +``` + +#### Parameters + + + The raw request data containing global\_data. + + +#### Returns + +`Record` — The skill's stored data, or an empty object if not found. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 450. + +*** + +### getSkillNamespace + +Get the namespaced key for storing per-skill data in global\_data. + +#### Signature + +```typescript +getSkillNamespace(): string +``` + +#### Returns + +`string` — A string like "skill:datetime" or "skill:my\_prefix". + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 440. + +*** + +### getTools + +Return the SWAIG tool definitions this skill provides. + +Default implementation returns tools registered imperatively via +`defineTool()`. Skills using the declarative pattern override this +method to return a static array built from their config. + +Python parity: replaces the `@abstractmethod register_tools()` contract +— Python skills call `self.define_tool(...)` inside `register_tools()`; +TypeScript skills either call `this.defineTool(...)` in `setup()` (and +let the default `getTools()` return them) or override `getTools()` +directly. + +#### Signature + +```typescript +getTools(): SkillToolDefinition[] +``` + +#### Returns + +`SkillToolDefinition[]` — Array of tool definitions to register with the agent. + +#### Source + +[`src/skills/builtin/claude_skills.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/claude_skills.ts) + +Line 762. + +*** + +### hasAllEnvVars + +Check if all required environment variables are present. +Convenience wrapper around `validateEnvVars()` that returns a boolean, +matching the Python `validate_env_vars() -> bool` return type. + +#### Signature + +```typescript +hasAllEnvVars(): boolean +``` + +#### Returns + +`boolean` — `true` if all required env vars are set, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 544. + +*** + +### hasAllPackages + +Check if all required packages declared in the manifest are available. +Convenience wrapper around `validatePackages()` that returns a boolean, +matching the Python `validate_packages() -> bool` return type. + +#### Signature + +```typescript +hasAllPackages(): Promise +``` + +#### Returns + +`Promise` — `true` if all required packages are importable, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 579. + +*** + +### isInitialized + +Check if the skill has been initialized by the SkillManager. + +#### Signature + +```typescript +isInitialized(): boolean +``` + +#### Returns + +`boolean` — True if setup() has completed and the skill is marked initialized. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 507. + +*** + +### markInitialized + +Mark the skill as initialized (called by SkillManager). + +#### Signature + +```typescript +markInitialized(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 514. + +*** + +### setAgent + +Set the agent reference for this skill. +Called by the SkillManager/AgentBase when the skill is attached to an agent. +Python equivalent: `self.agent = agent` in `__init__`. + +#### Signature + +```typescript +setAgent(agent: AgentBase): void +``` + +#### Parameters + + + The agent that owns this skill. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 534. + +*** + +### setup + +Setup the Claude skills loader — discovers and parses all SKILL.md files. + +Returns `true` on success and `false` on any failure (missing path, +invalid path, stat failure, or non-directory), mirroring the Python +skill's `setup() -> bool` contract. + +#### Signature + +```typescript +setup(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/skills/builtin/claude_skills.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/claude_skills.ts) + +Line 186. + +*** + +### updateSkillData + +Update this skill's namespaced data on a FunctionResult via updateGlobalData. + +#### Signature + +```typescript +updateSkillData( + result: FunctionResult, + data: Record +): FunctionResult +``` + +#### Parameters + + + The FunctionResult to update. + + + + The data to store under this skill's namespace. + + +#### Returns + +`FunctionResult` — The FunctionResult for chaining. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 462. + +*** + +### validateEnvVars + +Validate that all required environment variables declared on the skill class +are set in the current process environment. + +Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` +directly. TS reads the same static from the class. + +Returns the list of missing variable names so callers can produce actionable +error messages. This differs from Python's `validate_env_vars() -> bool` +return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/skills/builtin/claude-skills/claude-skills-skill#has-all-env-vars) is the boolean equivalent. + +#### Signature + +```typescript +validateEnvVars(): string[] +``` + +#### Returns + +`string[]` — Array of missing environment variable names (empty if all are present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 486. + +*** + +### validatePackages + +Validate that all required packages declared on the skill class can be imported. + +Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` +directly and tries `importlib.import_module(pkg)` for each; TS does the +equivalent with a dynamic `import()`. + +#### Signature + +```typescript +validatePackages(): Promise +``` + +#### Returns + +`Promise` — Array of package names that could not be imported (empty if all present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 557. + +## Source + +[`src/skills/builtin/claude_skills.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/claude_skills.ts) + +Line 81. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/claude-skills/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/claude-skills/index.mdx new file mode 100644 index 0000000000..6867d2e348 --- /dev/null +++ b/fern/products/sdk-reference/typescript/skills/builtin/claude-skills/index.mdx @@ -0,0 +1,62 @@ +--- +slug: "/reference/typescript/skills/builtin/claude-skills" +title: "claude_skills" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "skills.builtin.claude_skills" + module: "skills.builtin" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/claude_skills.ts" +--- +# `claude_skills` + +## Signature + +```typescript +module claude_skills +``` + +## Classes + + + + Load Claude-style SKILL.md files as SignalWire agent tools. + + + +## Functions + +### createSkill + +Factory function for creating ClaudeSkillsSkill instances. + +#### Signature + +```typescript +createSkill(config?: SkillConfig): ClaudeSkillsSkill +``` + +#### Parameters + + + Optional skill configuration. + + +#### Returns + +`ClaudeSkillsSkill` — A new ClaudeSkillsSkill instance. + +#### Source + +[`src/skills/builtin/claude_skills.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/claude_skills.ts) + +Line 981. + +## Source + +[`src/skills/builtin/claude_skills.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/claude_skills.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/custom-skills/custom-skills-skill/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/custom-skills/custom-skills-skill/index.mdx new file mode 100644 index 0000000000..ad96092d41 --- /dev/null +++ b/fern/products/sdk-reference/typescript/skills/builtin/custom-skills/custom-skills-skill/index.mdx @@ -0,0 +1,746 @@ +--- +slug: "/reference/typescript/skills/builtin/custom-skills/custom-skills-skill" +title: "CustomSkillsSkill" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "skills.builtin.custom_skills.CustomSkillsSkill" + parent: "skills.builtin.custom_skills" + module: "skills.builtin.custom_skills" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/custom_skills.ts" +--- +# `CustomSkillsSkill` + +A meta-skill that registers user-defined tools from configuration. + +Tier 2 built-in skill with no external dependencies. Allows users to define +arbitrary tools via config without writing skill classes. Each tool definition +specifies a name, description, parameters, and a JavaScript handler function +body that is compiled via the Function constructor at instantiation time. + +**Security warning:** This skill uses `new Function()` to compile user-provided +code at runtime. It is gated behind the `SWML_ALLOW_CUSTOM_HANDLER_CODE=true` +environment variable to prevent unintended code execution. + +## Signature + +```typescript +class CustomSkillsSkill extends SkillBase +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/skills/skill-base) + +## Examples + +```typescript +// Requires SWML_ALLOW_CUSTOM_HANDLER_CODE=true +agent.addSkill('custom_skills', { + tools: [ + { + name: 'echo', + description: 'Echo back the caller-supplied message.', + parameters: { type: 'object', properties: { msg: { type: 'string' } } }, + handlerBody: 'return new FunctionResult(args.msg);', + }, + ], +}); +``` + +## Properties + + + Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. + + + + Configuration options provided at construction time. + + + + Unique identifier for this skill instance (includes timestamp and random bytes). + + + + Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. + + + + Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. + + + + Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. + + + + Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. + + + + Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. + + + + Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. + + + + The registered name of this skill type. + + + + Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. + + + + Additional SWAIG fields extracted from config, merged into tool definitions. + + +## Methods + +### cleanup + +Cleanup resources. Called when the skill is removed from an agent. + +#### Signature + +```typescript +cleanup(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 469. + +*** + +### constructor + +#### Signature + +```typescript +constructor(config?: SkillConfig): CustomSkillsSkill +``` + +#### Parameters + + + Configuration object containing a `tools` array of custom tool definitions. + + +#### Returns + +`CustomSkillsSkill` + +#### Source + +[`src/skills/builtin/custom_skills.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/custom_skills.ts) + +Line 106. + +*** + +### defineTool + +Imperatively register a tool with this skill. + +Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. +Merges `this.swaigFields` into the tool definition (explicit fields on +`toolDef` take precedence), then pushes the result into `_dynamicTools` +so the default `getTools()` returns it at SWML render time. + +Intended for skills whose tool shape depends on config evaluated at +`setup()` time. Skills with a static tool list should override +`getTools()` instead. + +#### Signature + +```typescript +defineTool(toolDef: SkillToolDefinition): void +``` + +#### Parameters + + + The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 351. + +*** + +### getAgent + +Return the agent that owns this skill, asserting it is non-null. +Equivalent to accessing `self.agent` in Python, where the agent reference +is always set before `setup()` is called. + +The SkillManager lifecycle guarantees that `setAgent()` is called before +`setup()`, so this method is safe to use inside `setup()` and in any +tool handler invoked during an active agent session. + +#### Signature + +```typescript +getAgent(): AgentBase +``` + +#### Returns + +`AgentBase` — The owning `AgentBase` instance. + +#### Throws + +- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 261. + +*** + +### getCompilationErrors + +Get handler compilation errors for diagnostic purposes. + +#### Signature + +```typescript +getCompilationErrors(): Map +``` + +#### Returns + +`Map` — A copy of the map from tool name to error message. + +#### Source + +[`src/skills/builtin/custom_skills.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/custom_skills.ts) + +Line 315. + +*** + +### getConfig + +Get a configuration value by key, falling back to a default if not set. + +#### Signature + +```typescript +getConfig(key: string, defaultValue?: T): T +``` + +#### Type Parameters + + + +#### Parameters + + + The configuration key to look up. + + + + Value to return if the key is not present. + + +#### Returns + +`T` — The configuration value cast to type T, or the default value. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 524. + +*** + +### getDataMapTools + +Optional DataMap-style tool definitions. Skills that build their own +SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them +here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. + +Python equivalent: the direct `self.agent.register_swaig_function(fn)` +call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). +Default returns `[]` — skills using only the declarative `getTools()` path +do not need to override this. + +#### Signature + +```typescript +getDataMapTools(): Record[] +``` + +#### Returns + +`Record[]` — Array of fully-built SWAIG function dicts. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 372. + +*** + +### getGlobalData + +Get global data to merge into the agent's global data store. + +#### Signature + +```typescript +getGlobalData(): Record +``` + +#### Returns + +`Record` — Key-value pairs to be merged into the agent's global data. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 410. + +*** + +### getHints + +Get speech recognition hints relevant to this skill. + +#### Signature + +```typescript +getHints(): string[] +``` + +#### Returns + +`string[]` — Array of hint strings to improve speech recognition accuracy. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 402. + +*** + +### getInstanceKey + +Get the instance key used for deduplication in the SkillManager. + +For single-instance skills (`SUPPORTS_MULTIPLE_INSTANCES = false`), returns +the skill name. For multi-instance skills, returns `${skillName}_${toolName}` +using the `tool_name` config (falls back to the skill name). + +Matches Python's `SkillBase.get_instance_key()` default (`skill_base.py:141-146`). +Multi-instance subclasses only need to override when their key derivation +depends on config beyond `tool_name`. + +#### Signature + +```typescript +getInstanceKey(): string +``` + +#### Returns + +`string` — A unique key identifying this skill instance. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 427. + +*** + +### getParameterSchema + +Get the parameter schema for this skill class, describing all accepted configuration options. +Subclasses should override and call `super.getParameterSchema()` to include base parameters. + +Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): +returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a +`tool_name` entry with `default: cls.SKILL_NAME` for classes with +`SUPPORTS_MULTIPLE_INSTANCES = true`. + +**Modifiers:** `static` + +#### Signature + +```typescript +getParameterSchema(): Record +``` + +#### Returns + +`Record` — Record mapping parameter names to their schema entries. + +#### Source + +[`src/skills/builtin/custom_skills.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/custom_skills.ts) + +Line 111. + +*** + +### getPromptSections + +Get prompt sections to inject into the agent's system prompt. +Respects the `skip_prompt` config option — returns `[]` if set to `true`. +Subclasses should override `_getPromptSections()` instead of this method. + +#### Signature + +```typescript +getPromptSections(): SkillPromptSection[] +``` + +#### Returns + +`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 382. + +*** + +### getSkillData + +Read this skill's data from a raw call data object's global\_data. + +#### Signature + +```typescript +getSkillData(rawData: Record): Record +``` + +#### Parameters + + + The raw request data containing global\_data. + + +#### Returns + +`Record` — The skill's stored data, or an empty object if not found. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 450. + +*** + +### getSkillNamespace + +Get the namespaced key for storing per-skill data in global\_data. + +#### Signature + +```typescript +getSkillNamespace(): string +``` + +#### Returns + +`string` — A string like "skill:datetime" or "skill:my\_prefix". + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 440. + +*** + +### getTools + +#### Signature + +```typescript +getTools(): SkillToolDefinition[] +``` + +#### Returns + +`SkillToolDefinition[]` — Array of dynamically generated tools from the configuration, with compiled handlers. + +#### Source + +[`src/skills/builtin/custom_skills.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/custom_skills.ts) + +Line 181. + +*** + +### hasAllEnvVars + +Check if all required environment variables are present. +Convenience wrapper around `validateEnvVars()` that returns a boolean, +matching the Python `validate_env_vars() -> bool` return type. + +#### Signature + +```typescript +hasAllEnvVars(): boolean +``` + +#### Returns + +`boolean` — `true` if all required env vars are set, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 544. + +*** + +### hasAllPackages + +Check if all required packages declared in the manifest are available. +Convenience wrapper around `validatePackages()` that returns a boolean, +matching the Python `validate_packages() -> bool` return type. + +#### Signature + +```typescript +hasAllPackages(): Promise +``` + +#### Returns + +`Promise` — `true` if all required packages are importable, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 579. + +*** + +### isInitialized + +Check if the skill has been initialized by the SkillManager. + +#### Signature + +```typescript +isInitialized(): boolean +``` + +#### Returns + +`boolean` — True if setup() has completed and the skill is marked initialized. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 507. + +*** + +### markInitialized + +Mark the skill as initialized (called by SkillManager). + +#### Signature + +```typescript +markInitialized(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 514. + +*** + +### setAgent + +Set the agent reference for this skill. +Called by the SkillManager/AgentBase when the skill is attached to an agent. +Python equivalent: `self.agent = agent` in `__init__`. + +#### Signature + +```typescript +setAgent(agent: AgentBase): void +``` + +#### Parameters + + + The agent that owns this skill. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 534. + +*** + +### setup + +Setup the skill. Called when the skill is added to an agent. +Override to perform initialization (API connections, config validation, etc.) + +#### Signature + +```typescript +setup(): Promise +``` + +#### Returns + +`Promise` — `true` if setup succeeded, `false` otherwise. Python equivalent: abstract `setup() -> bool`. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 313. + +*** + +### updateSkillData + +Update this skill's namespaced data on a FunctionResult via updateGlobalData. + +#### Signature + +```typescript +updateSkillData( + result: FunctionResult, + data: Record +): FunctionResult +``` + +#### Parameters + + + The FunctionResult to update. + + + + The data to store under this skill's namespace. + + +#### Returns + +`FunctionResult` — The FunctionResult for chaining. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 462. + +*** + +### validateEnvVars + +Validate that all required environment variables declared on the skill class +are set in the current process environment. + +Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` +directly. TS reads the same static from the class. + +Returns the list of missing variable names so callers can produce actionable +error messages. This differs from Python's `validate_env_vars() -> bool` +return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/skills/builtin/custom-skills/custom-skills-skill#has-all-env-vars) is the boolean equivalent. + +#### Signature + +```typescript +validateEnvVars(): string[] +``` + +#### Returns + +`string[]` — Array of missing environment variable names (empty if all are present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 486. + +*** + +### validatePackages + +Validate that all required packages declared on the skill class can be imported. + +Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` +directly and tries `importlib.import_module(pkg)` for each; TS does the +equivalent with a dynamic `import()`. + +#### Signature + +```typescript +validatePackages(): Promise +``` + +#### Returns + +`Promise` — Array of package names that could not be imported (empty if all present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 557. + +## Source + +[`src/skills/builtin/custom_skills.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/custom_skills.ts) + +Line 94. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/custom-skills/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/custom-skills/index.mdx new file mode 100644 index 0000000000..5b34e9e03d --- /dev/null +++ b/fern/products/sdk-reference/typescript/skills/builtin/custom-skills/index.mdx @@ -0,0 +1,62 @@ +--- +slug: "/reference/typescript/skills/builtin/custom-skills" +title: "custom_skills" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "skills.builtin.custom_skills" + module: "skills.builtin" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/custom_skills.ts" +--- +# `custom_skills` + +## Signature + +```typescript +module custom_skills +``` + +## Classes + + + + A meta-skill that registers user-defined tools from configuration. + + + +## Functions + +### createSkill + +Factory function for creating CustomSkillsSkill instances. + +#### Signature + +```typescript +createSkill(config?: SkillConfig): CustomSkillsSkill +``` + +#### Parameters + + + Configuration containing a `tools` array of custom tool definitions. + + +#### Returns + +`CustomSkillsSkill` — A new CustomSkillsSkill instance. + +#### Source + +[`src/skills/builtin/custom_skills.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/custom_skills.ts) + +Line 325. + +## Source + +[`src/skills/builtin/custom_skills.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/custom_skills.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/datasphere-serverless/data-sphere-serverless-skill/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/datasphere-serverless/data-sphere-serverless-skill/index.mdx new file mode 100644 index 0000000000..191a9dcb93 --- /dev/null +++ b/fern/products/sdk-reference/typescript/skills/builtin/datasphere-serverless/data-sphere-serverless-skill/index.mdx @@ -0,0 +1,716 @@ +--- +slug: "/reference/typescript/skills/builtin/datasphere-serverless/data-sphere-serverless-skill" +title: "DataSphereServerlessSkill" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "skills.builtin.datasphere_serverless.DataSphereServerlessSkill" + parent: "skills.builtin.datasphere_serverless" + module: "skills.builtin.datasphere_serverless" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere_serverless.ts" +--- +# `DataSphereServerlessSkill` + +Searches SignalWire DataSphere using a server-side DataMap for serverless execution. + +Tier 3 built-in skill that generates a DataMap configuration SignalWire +executes directly, without a webhook endpoint. Supports `document_id`, +`count`, `distance`, `tags`, `language`, `pos_to_expand`, `max_synonyms`, +and `no_results_message` config options. + +## Signature + +```typescript +class DataSphereServerlessSkill extends SkillBase +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/skills/skill-base) + +## Examples + +```typescript +agent.addSkill('datasphere_serverless', { + document_id: 'doc_abc123', + count: 3, +}); +``` + +## Properties + + + Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. + + + + Configuration options provided at construction time. + + + + Unique identifier for this skill instance (includes timestamp and random bytes). + + + + Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. + + + + Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. + + + + Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. + + + + Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. + + + + Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. + + + + Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. + + + + The registered name of this skill type. + + + + Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. + + + + Additional SWAIG fields extracted from config, merged into tool definitions. + + +## Methods + +### cleanup + +Cleanup resources. Called when the skill is removed from an agent. + +#### Signature + +```typescript +cleanup(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 469. + +*** + +### constructor + +Create a new skill instance. + +Python parity: `core/skill_base.py:32-43`. +Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` +is left as `None` on the subclass. TS throws the equivalent when the static +defaults haven't been overridden. + +#### Signature + +```typescript +constructor(config?: SkillConfig): DataSphereServerlessSkill +``` + +#### Parameters + + + Optional configuration key-value pairs (Python: `params`). + + +#### Returns + +`DataSphereServerlessSkill` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 282. + +*** + +### defineTool + +Imperatively register a tool with this skill. + +Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. +Merges `this.swaigFields` into the tool definition (explicit fields on +`toolDef` take precedence), then pushes the result into `_dynamicTools` +so the default `getTools()` returns it at SWML render time. + +Intended for skills whose tool shape depends on config evaluated at +`setup()` time. Skills with a static tool list should override +`getTools()` instead. + +#### Signature + +```typescript +defineTool(toolDef: SkillToolDefinition): void +``` + +#### Parameters + + + The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 351. + +*** + +### getAgent + +Return the agent that owns this skill, asserting it is non-null. +Equivalent to accessing `self.agent` in Python, where the agent reference +is always set before `setup()` is called. + +The SkillManager lifecycle guarantees that `setAgent()` is called before +`setup()`, so this method is safe to use inside `setup()` and in any +tool handler invoked during an active agent session. + +#### Signature + +```typescript +getAgent(): AgentBase +``` + +#### Returns + +`AgentBase` — The owning `AgentBase` instance. + +#### Throws + +- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 261. + +*** + +### getConfig + +Get a configuration value by key, falling back to a default if not set. + +#### Signature + +```typescript +getConfig(key: string, defaultValue?: T): T +``` + +#### Type Parameters + + + +#### Parameters + + + The configuration key to look up. + + + + Value to return if the key is not present. + + +#### Returns + +`T` — The configuration value cast to type T, or the default value. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 524. + +*** + +### getDataMapTools + +Get DataMap-based tool definitions for server-side execution. +These are registered directly in the SWML output as data\_map functions +rather than as webhook-backed SWAIG tools. + +#### Signature + +```typescript +getDataMapTools(): Record[] +``` + +#### Returns + +`Record[]` — Array containing the DataSphere search DataMap function definition. + +#### Source + +[`src/skills/builtin/datasphere_serverless.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere_serverless.ts) + +Line 317. + +*** + +### getGlobalData + +Global data injected into the agent's SWML/SWAIG context. Matches +Python's `get_global_data()` shape so downstream consumers can +detect DataSphere availability. + +#### Signature + +```typescript +getGlobalData(): Record +``` + +#### Returns + +`Record` + +#### Source + +[`src/skills/builtin/datasphere_serverless.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere_serverless.ts) + +Line 164. + +*** + +### getHints + +Get speech recognition hints relevant to this skill. + +#### Signature + +```typescript +getHints(): string[] +``` + +#### Returns + +`string[]` — Array of hint strings to improve speech recognition accuracy. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 402. + +*** + +### getInstanceKey + +Instance key for the SkillManager. Defaults to +`datasphere_serverless_search_knowledge`, matching the Python SDK default. +When `tool_name` is set, uses `datasphere_serverless_`. + +#### Signature + +```typescript +getInstanceKey(): string +``` + +#### Returns + +`string` + +#### Source + +[`src/skills/builtin/datasphere_serverless.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere_serverless.ts) + +Line 135. + +*** + +### getParameterSchema + +Get the parameter schema for this skill class, describing all accepted configuration options. +Subclasses should override and call `super.getParameterSchema()` to include base parameters. + +Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): +returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a +`tool_name` entry with `default: cls.SKILL_NAME` for classes with +`SUPPORTS_MULTIPLE_INSTANCES = true`. + +**Modifiers:** `static` + +#### Signature + +```typescript +getParameterSchema(): Record +``` + +#### Returns + +`Record` — Record mapping parameter names to their schema entries. + +#### Source + +[`src/skills/builtin/datasphere_serverless.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere_serverless.ts) + +Line 55. + +*** + +### getPromptSections + +Get prompt sections to inject into the agent's system prompt. +Respects the `skip_prompt` config option — returns `[]` if set to `true`. +Subclasses should override `_getPromptSections()` instead of this method. + +#### Signature + +```typescript +getPromptSections(): SkillPromptSection[] +``` + +#### Returns + +`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 382. + +*** + +### getSkillData + +Read this skill's data from a raw call data object's global\_data. + +#### Signature + +```typescript +getSkillData(rawData: Record): Record +``` + +#### Parameters + + + The raw request data containing global\_data. + + +#### Returns + +`Record` — The skill's stored data, or an empty object if not found. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 450. + +*** + +### getSkillNamespace + +Get the namespaced key for storing per-skill data in global\_data. + +#### Signature + +```typescript +getSkillNamespace(): string +``` + +#### Returns + +`string` — A string like "skill:datetime" or "skill:my\_prefix". + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 440. + +*** + +### getTools + +Return a stub tool definition since this skill uses DataMap-based execution. +The actual DataMap function is provided by getDataMapTools(). + +#### Signature + +```typescript +getTools(): SkillToolDefinition[] +``` + +#### Returns + +`SkillToolDefinition[]` — A single stub tool (named via `tool_name`) that explains its DataMap nature. + +#### Source + +[`src/skills/builtin/datasphere_serverless.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere_serverless.ts) + +Line 287. + +*** + +### hasAllEnvVars + +Check if all required environment variables are present. +Convenience wrapper around `validateEnvVars()` that returns a boolean, +matching the Python `validate_env_vars() -> bool` return type. + +#### Signature + +```typescript +hasAllEnvVars(): boolean +``` + +#### Returns + +`boolean` — `true` if all required env vars are set, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 544. + +*** + +### hasAllPackages + +Check if all required packages declared in the manifest are available. +Convenience wrapper around `validatePackages()` that returns a boolean, +matching the Python `validate_packages() -> bool` return type. + +#### Signature + +```typescript +hasAllPackages(): Promise +``` + +#### Returns + +`Promise` — `true` if all required packages are importable, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 579. + +*** + +### isInitialized + +Check if the skill has been initialized by the SkillManager. + +#### Signature + +```typescript +isInitialized(): boolean +``` + +#### Returns + +`boolean` — True if setup() has completed and the skill is marked initialized. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 507. + +*** + +### markInitialized + +Mark the skill as initialized (called by SkillManager). + +#### Signature + +```typescript +markInitialized(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 514. + +*** + +### setAgent + +Set the agent reference for this skill. +Called by the SkillManager/AgentBase when the skill is attached to an agent. +Python equivalent: `self.agent = agent` in `__init__`. + +#### Signature + +```typescript +setAgent(agent: AgentBase): void +``` + +#### Parameters + + + The agent that owns this skill. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 534. + +*** + +### setup + +Validate required configuration parameters before the skill becomes active. + +Mirrors Python's `setup()` which checks `space_name`, `project_id`, `token`, +and `document_id` and returns `False` (logging an error) if any are absent. + +#### Signature + +```typescript +setup(): Promise +``` + +#### Returns + +`Promise` — `true` if all required params are present, `false` otherwise. + +#### Source + +[`src/skills/builtin/datasphere_serverless.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere_serverless.ts) + +Line 147. + +*** + +### updateSkillData + +Update this skill's namespaced data on a FunctionResult via updateGlobalData. + +#### Signature + +```typescript +updateSkillData( + result: FunctionResult, + data: Record +): FunctionResult +``` + +#### Parameters + + + The FunctionResult to update. + + + + The data to store under this skill's namespace. + + +#### Returns + +`FunctionResult` — The FunctionResult for chaining. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 462. + +*** + +### validateEnvVars + +Validate that all required environment variables declared on the skill class +are set in the current process environment. + +Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` +directly. TS reads the same static from the class. + +Returns the list of missing variable names so callers can produce actionable +error messages. This differs from Python's `validate_env_vars() -> bool` +return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/skills/builtin/datasphere-serverless/data-sphere-serverless-skill#has-all-env-vars) is the boolean equivalent. + +#### Signature + +```typescript +validateEnvVars(): string[] +``` + +#### Returns + +`string[]` — Array of missing environment variable names (empty if all are present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 486. + +*** + +### validatePackages + +Validate that all required packages declared on the skill class can be imported. + +Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` +directly and tries `importlib.import_module(pkg)` for each; TS does the +equivalent with a dynamic `import()`. + +#### Signature + +```typescript +validatePackages(): Promise +``` + +#### Returns + +`Promise` — Array of package names that could not be imported (empty if all present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 557. + +## Source + +[`src/skills/builtin/datasphere_serverless.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere_serverless.ts) + +Line 45. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/datasphere-serverless/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/datasphere-serverless/index.mdx new file mode 100644 index 0000000000..993e1a1987 --- /dev/null +++ b/fern/products/sdk-reference/typescript/skills/builtin/datasphere-serverless/index.mdx @@ -0,0 +1,62 @@ +--- +slug: "/reference/typescript/skills/builtin/datasphere-serverless" +title: "datasphere_serverless" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "skills.builtin.datasphere_serverless" + module: "skills.builtin" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere_serverless.ts" +--- +# `datasphere_serverless` + +## Signature + +```typescript +module datasphere_serverless +``` + +## Classes + + + + Searches SignalWire DataSphere using a server-side DataMap for serverless execution. + + + +## Functions + +### createSkill + +Factory function for creating DataSphereServerlessSkill instances. + +#### Signature + +```typescript +createSkill(config?: SkillConfig): DataSphereServerlessSkill +``` + +#### Parameters + + + Optional skill configuration. + + +#### Returns + +`DataSphereServerlessSkill` — A new DataSphereServerlessSkill instance. + +#### Source + +[`src/skills/builtin/datasphere_serverless.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere_serverless.ts) + +Line 345. + +## Source + +[`src/skills/builtin/datasphere_serverless.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere_serverless.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/datasphere/data-sphere-skill/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/datasphere/data-sphere-skill/index.mdx new file mode 100644 index 0000000000..2ed1bd3bc0 --- /dev/null +++ b/fern/products/sdk-reference/typescript/skills/builtin/datasphere/data-sphere-skill/index.mdx @@ -0,0 +1,721 @@ +--- +slug: "/reference/typescript/skills/builtin/datasphere/data-sphere-skill" +title: "DataSphereSkill" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "skills.builtin.datasphere.DataSphereSkill" + parent: "skills.builtin.datasphere" + module: "skills.builtin.datasphere" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere.ts" +--- +# `DataSphereSkill` + +Searches SignalWire DataSphere for knowledge base content using semantic search. + +Tier 3 built-in skill. Credentials can be supplied via params or fall back to +`SIGNALWIRE_PROJECT_ID`, `SIGNALWIRE_TOKEN`, and `SIGNALWIRE_SPACE` environment +variables. Supports `count`, `distance`, `tags`, `language`, `pos_to_expand`, +`max_synonyms`, and `no_results_message` config options. + +## Signature + +```typescript +class DataSphereSkill extends SkillBase +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/skills/skill-base) + +## Examples + +```typescript +agent.addSkill('datasphere', { + document_id: 'doc_abc123', + count: 3, + tags: ['faq'], +}); +``` + +## Properties + + + Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. + + + + Configuration options provided at construction time. + + + + Unique identifier for this skill instance (includes timestamp and random bytes). + + + + Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. + + + + Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. + + + + Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. + + + + Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. + + + + Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. + + + + Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. + + + + The registered name of this skill type. + + + + Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. + + + + Additional SWAIG fields extracted from config, merged into tool definitions. + + +## Methods + +### cleanup + +Cleanup resources. Called when the skill is removed from an agent. + +#### Signature + +```typescript +cleanup(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 469. + +*** + +### constructor + +Create a new skill instance. + +Python parity: `core/skill_base.py:32-43`. +Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` +is left as `None` on the subclass. TS throws the equivalent when the static +defaults haven't been overridden. + +#### Signature + +```typescript +constructor(config?: SkillConfig): DataSphereSkill +``` + +#### Parameters + + + Optional configuration key-value pairs (Python: `params`). + + +#### Returns + +`DataSphereSkill` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 282. + +*** + +### defineTool + +Imperatively register a tool with this skill. + +Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. +Merges `this.swaigFields` into the tool definition (explicit fields on +`toolDef` take precedence), then pushes the result into `_dynamicTools` +so the default `getTools()` returns it at SWML render time. + +Intended for skills whose tool shape depends on config evaluated at +`setup()` time. Skills with a static tool list should override +`getTools()` instead. + +#### Signature + +```typescript +defineTool(toolDef: SkillToolDefinition): void +``` + +#### Parameters + + + The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 351. + +*** + +### getAgent + +Return the agent that owns this skill, asserting it is non-null. +Equivalent to accessing `self.agent` in Python, where the agent reference +is always set before `setup()` is called. + +The SkillManager lifecycle guarantees that `setAgent()` is called before +`setup()`, so this method is safe to use inside `setup()` and in any +tool handler invoked during an active agent session. + +#### Signature + +```typescript +getAgent(): AgentBase +``` + +#### Returns + +`AgentBase` — The owning `AgentBase` instance. + +#### Throws + +- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 261. + +*** + +### getConfig + +Get a configuration value by key, falling back to a default if not set. + +#### Signature + +```typescript +getConfig(key: string, defaultValue?: T): T +``` + +#### Type Parameters + + + +#### Parameters + + + The configuration key to look up. + + + + Value to return if the key is not present. + + +#### Returns + +`T` — The configuration value cast to type T, or the default value. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 524. + +*** + +### getDataMapTools + +Optional DataMap-style tool definitions. Skills that build their own +SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them +here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. + +Python equivalent: the direct `self.agent.register_swaig_function(fn)` +call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). +Default returns `[]` — skills using only the declarative `getTools()` path +do not need to override this. + +#### Signature + +```typescript +getDataMapTools(): Record[] +``` + +#### Returns + +`Record[]` — Array of fully-built SWAIG function dicts. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 372. + +*** + +### getGlobalData + +Global data injected into the agent's SWML context. Matches Python's +`get_global_data()` so downstream consumers can detect DataSphere +availability, the configured `document_id`, and the knowledge provider. + +#### Signature + +```typescript +getGlobalData(): Record +``` + +#### Returns + +`Record` + +#### Source + +[`src/skills/builtin/datasphere.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere.ts) + +Line 179. + +*** + +### getHints + +Get speech recognition hints relevant to this skill. + +#### Signature + +```typescript +getHints(): string[] +``` + +#### Returns + +`string[]` — Array of hint strings to improve speech recognition accuracy. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 402. + +*** + +### getInstanceKey + +Instance key for the SkillManager. Defaults to `datasphere_search_knowledge`, +matching the Python SDK default. When `tool_name` is set, uses +`datasphere_`. + +#### Signature + +```typescript +getInstanceKey(): string +``` + +#### Returns + +`string` + +#### Source + +[`src/skills/builtin/datasphere.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere.ts) + +Line 169. + +*** + +### getParameterSchema + +Get the parameter schema for this skill class, describing all accepted configuration options. +Subclasses should override and call `super.getParameterSchema()` to include base parameters. + +Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): +returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a +`tool_name` entry with `default: cls.SKILL_NAME` for classes with +`SUPPORTS_MULTIPLE_INSTANCES = true`. + +**Modifiers:** `static` + +#### Signature + +```typescript +getParameterSchema(): Record +``` + +#### Returns + +`Record` — Record mapping parameter names to their schema entries. + +#### Source + +[`src/skills/builtin/datasphere.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere.ts) + +Line 81. + +*** + +### getPromptSections + +Get prompt sections to inject into the agent's system prompt. +Respects the `skip_prompt` config option — returns `[]` if set to `true`. +Subclasses should override `_getPromptSections()` instead of this method. + +#### Signature + +```typescript +getPromptSections(): SkillPromptSection[] +``` + +#### Returns + +`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 382. + +*** + +### getSkillData + +Read this skill's data from a raw call data object's global\_data. + +#### Signature + +```typescript +getSkillData(rawData: Record): Record +``` + +#### Parameters + + + The raw request data containing global\_data. + + +#### Returns + +`Record` — The skill's stored data, or an empty object if not found. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 450. + +*** + +### getSkillNamespace + +Get the namespaced key for storing per-skill data in global\_data. + +#### Signature + +```typescript +getSkillNamespace(): string +``` + +#### Returns + +`string` — A string like "skill:datetime" or "skill:my\_prefix". + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 440. + +*** + +### getTools + +#### Signature + +```typescript +getTools(): SkillToolDefinition[] +``` + +#### Returns + +`SkillToolDefinition[]` — A single tool (named via `tool_name`) that performs semantic search. + +#### Source + +[`src/skills/builtin/datasphere.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere.ts) + +Line 224. + +*** + +### hasAllEnvVars + +Check if all required environment variables are present. +Convenience wrapper around `validateEnvVars()` that returns a boolean, +matching the Python `validate_env_vars() -> bool` return type. + +#### Signature + +```typescript +hasAllEnvVars(): boolean +``` + +#### Returns + +`boolean` — `true` if all required env vars are set, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 544. + +*** + +### hasAllPackages + +Check if all required packages declared in the manifest are available. +Convenience wrapper around `validatePackages()` that returns a boolean, +matching the Python `validate_packages() -> bool` return type. + +#### Signature + +```typescript +hasAllPackages(): Promise +``` + +#### Returns + +`Promise` — `true` if all required packages are importable, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 579. + +*** + +### isInitialized + +Check if the skill has been initialized by the SkillManager. + +#### Signature + +```typescript +isInitialized(): boolean +``` + +#### Returns + +`boolean` — True if setup() has completed and the skill is marked initialized. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 507. + +*** + +### markInitialized + +Mark the skill as initialized (called by SkillManager). + +#### Signature + +```typescript +markInitialized(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 514. + +*** + +### setAgent + +Set the agent reference for this skill. +Called by the SkillManager/AgentBase when the skill is attached to an agent. +Python equivalent: `self.agent = agent` in `__init__`. + +#### Signature + +```typescript +setAgent(agent: AgentBase): void +``` + +#### Parameters + + + The agent that owns this skill. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 534. + +*** + +### setup + +Validate required credentials before the skill becomes active. + +Mirrors Python skills/datasphere/skill.py:120-128: `setup()` returns false +when any of `space_name`, `project_id`, `token`, or `document_id` is +missing from either config or env. Fails closed so SkillManager refuses +to register a skill that would break at call time. + +#### Signature + +```typescript +setup(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/skills/builtin/datasphere.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere.ts) + +Line 195. + +*** + +### updateSkillData + +Update this skill's namespaced data on a FunctionResult via updateGlobalData. + +#### Signature + +```typescript +updateSkillData( + result: FunctionResult, + data: Record +): FunctionResult +``` + +#### Parameters + + + The FunctionResult to update. + + + + The data to store under this skill's namespace. + + +#### Returns + +`FunctionResult` — The FunctionResult for chaining. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 462. + +*** + +### validateEnvVars + +Validate that all required environment variables declared on the skill class +are set in the current process environment. + +Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` +directly. TS reads the same static from the class. + +Returns the list of missing variable names so callers can produce actionable +error messages. This differs from Python's `validate_env_vars() -> bool` +return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/skills/builtin/datasphere/data-sphere-skill#has-all-env-vars) is the boolean equivalent. + +#### Signature + +```typescript +validateEnvVars(): string[] +``` + +#### Returns + +`string[]` — Array of missing environment variable names (empty if all are present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 486. + +*** + +### validatePackages + +Validate that all required packages declared on the skill class can be imported. + +Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` +directly and tries `importlib.import_module(pkg)` for each; TS does the +equivalent with a dynamic `import()`. + +#### Signature + +```typescript +validatePackages(): Promise +``` + +#### Returns + +`Promise` — Array of package names that could not be imported (empty if all present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 557. + +## Source + +[`src/skills/builtin/datasphere.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere.ts) + +Line 71. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/datasphere/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/datasphere/index.mdx new file mode 100644 index 0000000000..64182c3510 --- /dev/null +++ b/fern/products/sdk-reference/typescript/skills/builtin/datasphere/index.mdx @@ -0,0 +1,62 @@ +--- +slug: "/reference/typescript/skills/builtin/datasphere" +title: "datasphere" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "skills.builtin.datasphere" + module: "skills.builtin" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere.ts" +--- +# `datasphere` + +## Signature + +```typescript +module datasphere +``` + +## Classes + + + + Searches SignalWire DataSphere for knowledge base content using semantic search. + + + +## Functions + +### createSkill + +Factory function for creating DataSphereSkill instances. + +#### Signature + +```typescript +createSkill(config?: SkillConfig): DataSphereSkill +``` + +#### Parameters + + + Optional skill configuration. + + +#### Returns + +`DataSphereSkill` — A new DataSphereSkill instance. + +#### Source + +[`src/skills/builtin/datasphere.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere.ts) + +Line 457. + +## Source + +[`src/skills/builtin/datasphere.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/datetime/date-time-skill/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/datetime/date-time-skill/index.mdx new file mode 100644 index 0000000000..2f18993d73 --- /dev/null +++ b/fern/products/sdk-reference/typescript/skills/builtin/datetime/date-time-skill/index.mdx @@ -0,0 +1,717 @@ +--- +slug: "/reference/typescript/skills/builtin/datetime/date-time-skill" +title: "DateTimeSkill" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "skills.builtin.datetime.DateTimeSkill" + parent: "skills.builtin.datetime" + module: "skills.builtin.datetime" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datetime.ts" +--- +# `DateTimeSkill` + +Provides the current date and time with optional timezone support. + +Tier 1 built-in skill with no external dependencies. Supports all IANA +timezone identifiers via the Intl.DateTimeFormat API. + +Registers two SWAIG tools: `get_current_time` and `get_current_date`. + +## Signature + +```typescript +class DateTimeSkill extends SkillBase +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/skills/skill-base) + +## Examples + +```typescript +agent.addSkill('datetime'); +``` + +## Properties + + + Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. + + + + Configuration options provided at construction time. + + + + Unique identifier for this skill instance (includes timestamp and random bytes). + + + + Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. + + + + Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. + + + + Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. + + + + Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. + + + + Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. + + + + Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. + + + + The registered name of this skill type. + + + + Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. + + + + Additional SWAIG fields extracted from config, merged into tool definitions. + + +## Methods + +### cleanup + +Cleanup resources. Called when the skill is removed from an agent. + +#### Signature + +```typescript +cleanup(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 469. + +*** + +### constructor + +Create a new skill instance. + +Python parity: `core/skill_base.py:32-43`. +Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` +is left as `None` on the subclass. TS throws the equivalent when the static +defaults haven't been overridden. + +#### Signature + +```typescript +constructor(config?: SkillConfig): DateTimeSkill +``` + +#### Parameters + + + Optional configuration key-value pairs (Python: `params`). + + +#### Returns + +`DateTimeSkill` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 282. + +*** + +### defineTool + +Imperatively register a tool with this skill. + +Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. +Merges `this.swaigFields` into the tool definition (explicit fields on +`toolDef` take precedence), then pushes the result into `_dynamicTools` +so the default `getTools()` returns it at SWML render time. + +Intended for skills whose tool shape depends on config evaluated at +`setup()` time. Skills with a static tool list should override +`getTools()` instead. + +#### Signature + +```typescript +defineTool(toolDef: SkillToolDefinition): void +``` + +#### Parameters + + + The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 351. + +*** + +### getAgent + +Return the agent that owns this skill, asserting it is non-null. +Equivalent to accessing `self.agent` in Python, where the agent reference +is always set before `setup()` is called. + +The SkillManager lifecycle guarantees that `setAgent()` is called before +`setup()`, so this method is safe to use inside `setup()` and in any +tool handler invoked during an active agent session. + +#### Signature + +```typescript +getAgent(): AgentBase +``` + +#### Returns + +`AgentBase` — The owning `AgentBase` instance. + +#### Throws + +- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 261. + +*** + +### getConfig + +Get a configuration value by key, falling back to a default if not set. + +#### Signature + +```typescript +getConfig(key: string, defaultValue?: T): T +``` + +#### Type Parameters + + + +#### Parameters + + + The configuration key to look up. + + + + Value to return if the key is not present. + + +#### Returns + +`T` — The configuration value cast to type T, or the default value. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 524. + +*** + +### getDataMapTools + +Optional DataMap-style tool definitions. Skills that build their own +SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them +here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. + +Python equivalent: the direct `self.agent.register_swaig_function(fn)` +call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). +Default returns `[]` — skills using only the declarative `getTools()` path +do not need to override this. + +#### Signature + +```typescript +getDataMapTools(): Record[] +``` + +#### Returns + +`Record[]` — Array of fully-built SWAIG function dicts. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 372. + +*** + +### getGlobalData + +Get global data to merge into the agent's global data store. + +#### Signature + +```typescript +getGlobalData(): Record +``` + +#### Returns + +`Record` — Key-value pairs to be merged into the agent's global data. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 410. + +*** + +### getHints + +Get speech recognition hints relevant to this skill. + +#### Signature + +```typescript +getHints(): string[] +``` + +#### Returns + +`string[]` — Array of hint strings to improve speech recognition accuracy. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 402. + +*** + +### getInstanceKey + +Get the instance key used for deduplication in the SkillManager. + +For single-instance skills (`SUPPORTS_MULTIPLE_INSTANCES = false`), returns +the skill name. For multi-instance skills, returns `${skillName}_${toolName}` +using the `tool_name` config (falls back to the skill name). + +Matches Python's `SkillBase.get_instance_key()` default (`skill_base.py:141-146`). +Multi-instance subclasses only need to override when their key derivation +depends on config beyond `tool_name`. + +#### Signature + +```typescript +getInstanceKey(): string +``` + +#### Returns + +`string` — A unique key identifying this skill instance. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 427. + +*** + +### getParameterSchema + +Get the parameter schema for this skill class, describing all accepted configuration options. +Subclasses should override and call `super.getParameterSchema()` to include base parameters. + +Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): +returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a +`tool_name` entry with `default: cls.SKILL_NAME` for classes with +`SUPPORTS_MULTIPLE_INSTANCES = true`. + +**Modifiers:** `static` + +#### Signature + +```typescript +getParameterSchema(): Record +``` + +#### Returns + +`Record` — Record mapping parameter names to their schema entries. + +#### Source + +[`src/skills/builtin/datetime.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datetime.ts) + +Line 38. + +*** + +### getPromptSections + +Get prompt sections to inject into the agent's system prompt. +Respects the `skip_prompt` config option — returns `[]` if set to `true`. +Subclasses should override `_getPromptSections()` instead of this method. + +#### Signature + +```typescript +getPromptSections(): SkillPromptSection[] +``` + +#### Returns + +`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 382. + +*** + +### getSkillData + +Read this skill's data from a raw call data object's global\_data. + +#### Signature + +```typescript +getSkillData(rawData: Record): Record +``` + +#### Parameters + + + The raw request data containing global\_data. + + +#### Returns + +`Record` — The skill's stored data, or an empty object if not found. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 450. + +*** + +### getSkillNamespace + +Get the namespaced key for storing per-skill data in global\_data. + +#### Signature + +```typescript +getSkillNamespace(): string +``` + +#### Returns + +`string` — A string like "skill:datetime" or "skill:my\_prefix". + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 440. + +*** + +### getTools + +#### Signature + +```typescript +getTools(): SkillToolDefinition[] +``` + +#### Returns + +`SkillToolDefinition[]` — Two tools: `get_current_time` and `get_current_date`, each accepting an optional IANA timezone and defaulting to UTC. + +#### Source + +[`src/skills/builtin/datetime.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datetime.ts) + +Line 46. + +*** + +### hasAllEnvVars + +Check if all required environment variables are present. +Convenience wrapper around `validateEnvVars()` that returns a boolean, +matching the Python `validate_env_vars() -> bool` return type. + +#### Signature + +```typescript +hasAllEnvVars(): boolean +``` + +#### Returns + +`boolean` — `true` if all required env vars are set, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 544. + +*** + +### hasAllPackages + +Check if all required packages declared in the manifest are available. +Convenience wrapper around `validatePackages()` that returns a boolean, +matching the Python `validate_packages() -> bool` return type. + +#### Signature + +```typescript +hasAllPackages(): Promise +``` + +#### Returns + +`Promise` — `true` if all required packages are importable, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 579. + +*** + +### isInitialized + +Check if the skill has been initialized by the SkillManager. + +#### Signature + +```typescript +isInitialized(): boolean +``` + +#### Returns + +`boolean` — True if setup() has completed and the skill is marked initialized. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 507. + +*** + +### markInitialized + +Mark the skill as initialized (called by SkillManager). + +#### Signature + +```typescript +markInitialized(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 514. + +*** + +### setAgent + +Set the agent reference for this skill. +Called by the SkillManager/AgentBase when the skill is attached to an agent. +Python equivalent: `self.agent = agent` in `__init__`. + +#### Signature + +```typescript +setAgent(agent: AgentBase): void +``` + +#### Parameters + + + The agent that owns this skill. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 534. + +*** + +### setup + +Setup the skill. Called when the skill is added to an agent. +Override to perform initialization (API connections, config validation, etc.) + +#### Signature + +```typescript +setup(): Promise +``` + +#### Returns + +`Promise` — `true` if setup succeeded, `false` otherwise. Python equivalent: abstract `setup() -> bool`. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 313. + +*** + +### updateSkillData + +Update this skill's namespaced data on a FunctionResult via updateGlobalData. + +#### Signature + +```typescript +updateSkillData( + result: FunctionResult, + data: Record +): FunctionResult +``` + +#### Parameters + + + The FunctionResult to update. + + + + The data to store under this skill's namespace. + + +#### Returns + +`FunctionResult` — The FunctionResult for chaining. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 462. + +*** + +### validateEnvVars + +Validate that all required environment variables declared on the skill class +are set in the current process environment. + +Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` +directly. TS reads the same static from the class. + +Returns the list of missing variable names so callers can produce actionable +error messages. This differs from Python's `validate_env_vars() -> bool` +return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/skills/builtin/datetime/date-time-skill#has-all-env-vars) is the boolean equivalent. + +#### Signature + +```typescript +validateEnvVars(): string[] +``` + +#### Returns + +`string[]` — Array of missing environment variable names (empty if all are present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 486. + +*** + +### validatePackages + +Validate that all required packages declared on the skill class can be imported. + +Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` +directly and tries `importlib.import_module(pkg)` for each; TS does the +equivalent with a dynamic `import()`. + +#### Signature + +```typescript +validatePackages(): Promise +``` + +#### Returns + +`Promise` — Array of package names that could not be imported (empty if all present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 557. + +## Source + +[`src/skills/builtin/datetime.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datetime.ts) + +Line 29. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/datetime/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/datetime/index.mdx new file mode 100644 index 0000000000..1215de712e --- /dev/null +++ b/fern/products/sdk-reference/typescript/skills/builtin/datetime/index.mdx @@ -0,0 +1,62 @@ +--- +slug: "/reference/typescript/skills/builtin/datetime" +title: "datetime" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "skills.builtin.datetime" + module: "skills.builtin" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datetime.ts" +--- +# `datetime` + +## Signature + +```typescript +module datetime +``` + +## Classes + + + + Provides the current date and time with optional timezone support. + + + +## Functions + +### createSkill + +Factory function for creating DateTimeSkill instances. + +#### Signature + +```typescript +createSkill(config?: SkillConfig): DateTimeSkill +``` + +#### Parameters + + + Optional skill configuration. + + +#### Returns + +`DateTimeSkill` — A new DateTimeSkill instance. + +#### Source + +[`src/skills/builtin/datetime.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datetime.ts) + +Line 135. + +## Source + +[`src/skills/builtin/datetime.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datetime.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/google-maps/google-maps-skill/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/google-maps/google-maps-skill/index.mdx new file mode 100644 index 0000000000..af6381d376 --- /dev/null +++ b/fern/products/sdk-reference/typescript/skills/builtin/google-maps/google-maps-skill/index.mdx @@ -0,0 +1,715 @@ +--- +slug: "/reference/typescript/skills/builtin/google-maps/google-maps-skill" +title: "GoogleMapsSkill" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "skills.builtin.google_maps.GoogleMapsSkill" + parent: "skills.builtin.google_maps" + module: "skills.builtin.google_maps" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/google_maps.ts" +--- +# `GoogleMapsSkill` + +Provides driving/walking/transit directions and place search via Google Maps APIs. + +Tier 3 built-in skill. Requires the `GOOGLE_MAPS_API_KEY` environment variable. +Supports a `default_mode` config option ("driving"|"walking"|"bicycling"|"transit"). + +## Signature + +```typescript +class GoogleMapsSkill extends SkillBase +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/skills/skill-base) + +## Examples + +```typescript +agent.addSkill('google_maps', { default_mode: 'driving' }); +``` + +## Properties + + + Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. + + + + Configuration options provided at construction time. + + + + Unique identifier for this skill instance (includes timestamp and random bytes). + + + + Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. + + + + Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. + + + + Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. + + + + Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. + + + + Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. + + + + Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. + + + + The registered name of this skill type. + + + + Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. + + + + Additional SWAIG fields extracted from config, merged into tool definitions. + + +## Methods + +### cleanup + +Cleanup resources. Called when the skill is removed from an agent. + +#### Signature + +```typescript +cleanup(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 469. + +*** + +### constructor + +Create a new skill instance. + +Python parity: `core/skill_base.py:32-43`. +Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` +is left as `None` on the subclass. TS throws the equivalent when the static +defaults haven't been overridden. + +#### Signature + +```typescript +constructor(config?: SkillConfig): GoogleMapsSkill +``` + +#### Parameters + + + Optional configuration key-value pairs (Python: `params`). + + +#### Returns + +`GoogleMapsSkill` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 282. + +*** + +### defineTool + +Imperatively register a tool with this skill. + +Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. +Merges `this.swaigFields` into the tool definition (explicit fields on +`toolDef` take precedence), then pushes the result into `_dynamicTools` +so the default `getTools()` returns it at SWML render time. + +Intended for skills whose tool shape depends on config evaluated at +`setup()` time. Skills with a static tool list should override +`getTools()` instead. + +#### Signature + +```typescript +defineTool(toolDef: SkillToolDefinition): void +``` + +#### Parameters + + + The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 351. + +*** + +### getAgent + +Return the agent that owns this skill, asserting it is non-null. +Equivalent to accessing `self.agent` in Python, where the agent reference +is always set before `setup()` is called. + +The SkillManager lifecycle guarantees that `setAgent()` is called before +`setup()`, so this method is safe to use inside `setup()` and in any +tool handler invoked during an active agent session. + +#### Signature + +```typescript +getAgent(): AgentBase +``` + +#### Returns + +`AgentBase` — The owning `AgentBase` instance. + +#### Throws + +- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 261. + +*** + +### getConfig + +Get a configuration value by key, falling back to a default if not set. + +#### Signature + +```typescript +getConfig(key: string, defaultValue?: T): T +``` + +#### Type Parameters + + + +#### Parameters + + + The configuration key to look up. + + + + Value to return if the key is not present. + + +#### Returns + +`T` — The configuration value cast to type T, or the default value. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 524. + +*** + +### getDataMapTools + +Optional DataMap-style tool definitions. Skills that build their own +SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them +here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. + +Python equivalent: the direct `self.agent.register_swaig_function(fn)` +call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). +Default returns `[]` — skills using only the declarative `getTools()` path +do not need to override this. + +#### Signature + +```typescript +getDataMapTools(): Record[] +``` + +#### Returns + +`Record[]` — Array of fully-built SWAIG function dicts. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 372. + +*** + +### getGlobalData + +Get global data to merge into the agent's global data store. + +#### Signature + +```typescript +getGlobalData(): Record +``` + +#### Returns + +`Record` — Key-value pairs to be merged into the agent's global data. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 410. + +*** + +### getHints + +#### Signature + +```typescript +getHints(): string[] +``` + +#### Returns + +`string[]` — Speech recognition hints for maps/directions keywords. + +#### Source + +[`src/skills/builtin/google_maps.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/google_maps.ts) + +Line 174. + +*** + +### getInstanceKey + +Get the instance key used for deduplication in the SkillManager. + +For single-instance skills (`SUPPORTS_MULTIPLE_INSTANCES = false`), returns +the skill name. For multi-instance skills, returns `${skillName}_${toolName}` +using the `tool_name` config (falls back to the skill name). + +Matches Python's `SkillBase.get_instance_key()` default (`skill_base.py:141-146`). +Multi-instance subclasses only need to override when their key derivation +depends on config beyond `tool_name`. + +#### Signature + +```typescript +getInstanceKey(): string +``` + +#### Returns + +`string` — A unique key identifying this skill instance. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 427. + +*** + +### getParameterSchema + +Get the parameter schema for this skill class, describing all accepted configuration options. +Subclasses should override and call `super.getParameterSchema()` to include base parameters. + +Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): +returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a +`tool_name` entry with `default: cls.SKILL_NAME` for classes with +`SUPPORTS_MULTIPLE_INSTANCES = true`. + +**Modifiers:** `static` + +#### Signature + +```typescript +getParameterSchema(): Record +``` + +#### Returns + +`Record` — Record mapping parameter names to their schema entries. + +#### Source + +[`src/skills/builtin/google_maps.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/google_maps.ts) + +Line 119. + +*** + +### getPromptSections + +Get prompt sections to inject into the agent's system prompt. +Respects the `skip_prompt` config option — returns `[]` if set to `true`. +Subclasses should override `_getPromptSections()` instead of this method. + +#### Signature + +```typescript +getPromptSections(): SkillPromptSection[] +``` + +#### Returns + +`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 382. + +*** + +### getSkillData + +Read this skill's data from a raw call data object's global\_data. + +#### Signature + +```typescript +getSkillData(rawData: Record): Record +``` + +#### Parameters + + + The raw request data containing global\_data. + + +#### Returns + +`Record` — The skill's stored data, or an empty object if not found. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 450. + +*** + +### getSkillNamespace + +Get the namespaced key for storing per-skill data in global\_data. + +#### Signature + +```typescript +getSkillNamespace(): string +``` + +#### Returns + +`string` — A string like "skill:datetime" or "skill:my\_prefix". + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 440. + +*** + +### getTools + +#### Signature + +```typescript +getTools(): SkillToolDefinition[] +``` + +#### Returns + +`SkillToolDefinition[]` — Two tools: `get_directions` for route info and `find_place` for place discovery. + +#### Source + +[`src/skills/builtin/google_maps.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/google_maps.ts) + +Line 179. + +*** + +### hasAllEnvVars + +Check if all required environment variables are present. +Convenience wrapper around `validateEnvVars()` that returns a boolean, +matching the Python `validate_env_vars() -> bool` return type. + +#### Signature + +```typescript +hasAllEnvVars(): boolean +``` + +#### Returns + +`boolean` — `true` if all required env vars are set, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 544. + +*** + +### hasAllPackages + +Check if all required packages declared in the manifest are available. +Convenience wrapper around `validatePackages()` that returns a boolean, +matching the Python `validate_packages() -> bool` return type. + +#### Signature + +```typescript +hasAllPackages(): Promise +``` + +#### Returns + +`Promise` — `true` if all required packages are importable, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 579. + +*** + +### isInitialized + +Check if the skill has been initialized by the SkillManager. + +#### Signature + +```typescript +isInitialized(): boolean +``` + +#### Returns + +`boolean` — True if setup() has completed and the skill is marked initialized. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 507. + +*** + +### markInitialized + +Mark the skill as initialized (called by SkillManager). + +#### Signature + +```typescript +markInitialized(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 514. + +*** + +### setAgent + +Set the agent reference for this skill. +Called by the SkillManager/AgentBase when the skill is attached to an agent. +Python equivalent: `self.agent = agent` in `__init__`. + +#### Signature + +```typescript +setAgent(agent: AgentBase): void +``` + +#### Parameters + + + The agent that owns this skill. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 534. + +*** + +### setup + +Fail-fast when GOOGLE\_MAPS\_API\_KEY is not set, mirroring Python's +`setup()` validation. The env var is the only credential source for +this skill, so loading it without the key would produce runtime +errors on every tool call. + +#### Signature + +```typescript +setup(): Promise +``` + +#### Returns + +`Promise` — `true` if the API key is present, `false` otherwise. + +#### Source + +[`src/skills/builtin/google_maps.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/google_maps.ts) + +Line 165. + +*** + +### updateSkillData + +Update this skill's namespaced data on a FunctionResult via updateGlobalData. + +#### Signature + +```typescript +updateSkillData( + result: FunctionResult, + data: Record +): FunctionResult +``` + +#### Parameters + + + The FunctionResult to update. + + + + The data to store under this skill's namespace. + + +#### Returns + +`FunctionResult` — The FunctionResult for chaining. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 462. + +*** + +### validateEnvVars + +Validate that all required environment variables declared on the skill class +are set in the current process environment. + +Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` +directly. TS reads the same static from the class. + +Returns the list of missing variable names so callers can produce actionable +error messages. This differs from Python's `validate_env_vars() -> bool` +return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/skills/builtin/google-maps/google-maps-skill#has-all-env-vars) is the boolean equivalent. + +#### Signature + +```typescript +validateEnvVars(): string[] +``` + +#### Returns + +`string[]` — Array of missing environment variable names (empty if all are present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 486. + +*** + +### validatePackages + +Validate that all required packages declared on the skill class can be imported. + +Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` +directly and tries `importlib.import_module(pkg)` for each; TS does the +equivalent with a dynamic `import()`. + +#### Signature + +```typescript +validatePackages(): Promise +``` + +#### Returns + +`Promise` — Array of package names that could not be imported (empty if all present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 557. + +## Source + +[`src/skills/builtin/google_maps.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/google_maps.ts) + +Line 107. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/google-maps/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/google-maps/index.mdx new file mode 100644 index 0000000000..7c0e767c1e --- /dev/null +++ b/fern/products/sdk-reference/typescript/skills/builtin/google-maps/index.mdx @@ -0,0 +1,62 @@ +--- +slug: "/reference/typescript/skills/builtin/google-maps" +title: "google_maps" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "skills.builtin.google_maps" + module: "skills.builtin" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/google_maps.ts" +--- +# `google_maps` + +## Signature + +```typescript +module google_maps +``` + +## Classes + + + + Provides driving/walking/transit directions and place search via Google Maps APIs. + + + +## Functions + +### createSkill + +Factory function for creating GoogleMapsSkill instances. + +#### Signature + +```typescript +createSkill(config?: SkillConfig): GoogleMapsSkill +``` + +#### Parameters + + + Optional skill configuration. + + +#### Returns + +`GoogleMapsSkill` — A new GoogleMapsSkill instance. + +#### Source + +[`src/skills/builtin/google_maps.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/google_maps.ts) + +Line 654. + +## Source + +[`src/skills/builtin/google_maps.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/google_maps.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/index.mdx new file mode 100644 index 0000000000..bbaaecc0d7 --- /dev/null +++ b/fern/products/sdk-reference/typescript/skills/builtin/index.mdx @@ -0,0 +1,51 @@ +--- +slug: "/reference/typescript/skills/builtin" +title: "builtin" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "skills.builtin" + module: "skills" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/index.ts" +--- +# `builtin` + +## Signature + +```typescript +module builtin +``` + +## Functions + +### registerBuiltinSkills + +Register all 19 built-in skills with the global SkillRegistry singleton. +Matches Python's auto-discovery pattern (`skills/registry.py`) which finds +SkillBase subclasses in the skills directory and registers them by class +reference. Skips registration for any skill name already present. + +#### Signature + +```typescript +registerBuiltinSkills(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/skills/builtin/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/index.ts) + +Line 55. + +## Source + +[`src/skills/builtin/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/index.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/info-gatherer/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/info-gatherer/index.mdx new file mode 100644 index 0000000000..b88cdbbd3f --- /dev/null +++ b/fern/products/sdk-reference/typescript/skills/builtin/info-gatherer/index.mdx @@ -0,0 +1,62 @@ +--- +slug: "/reference/typescript/skills/builtin/info-gatherer" +title: "info_gatherer" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "skills.builtin.info_gatherer" + module: "skills.builtin" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/info_gatherer.ts" +--- +# `info_gatherer` + +## Signature + +```typescript +module info_gatherer +``` + +## Classes + + + + Collects answers to a configurable list of questions, one at a time. + + + +## Functions + +### createSkill + +Factory function for creating InfoGathererSkill instances. + +#### Signature + +```typescript +createSkill(config?: SkillConfig): InfoGathererSkill +``` + +#### Parameters + + + Optional skill configuration. + + +#### Returns + +`InfoGathererSkill` — A new InfoGathererSkill instance. + +#### Source + +[`src/skills/builtin/info_gatherer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/info_gatherer.ts) + +Line 413. + +## Source + +[`src/skills/builtin/info_gatherer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/info_gatherer.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/info-gatherer/info-gatherer-skill/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/info-gatherer/info-gatherer-skill/index.mdx new file mode 100644 index 0000000000..ee889fb7ef --- /dev/null +++ b/fern/products/sdk-reference/typescript/skills/builtin/info-gatherer/info-gatherer-skill/index.mdx @@ -0,0 +1,731 @@ +--- +slug: "/reference/typescript/skills/builtin/info-gatherer/info-gatherer-skill" +title: "InfoGathererSkill" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "skills.builtin.info_gatherer.InfoGathererSkill" + parent: "skills.builtin.info_gatherer" + module: "skills.builtin.info_gatherer" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/info_gatherer.ts" +--- +# `InfoGathererSkill` + +Collects answers to a configurable list of questions, one at a time. + +Mirrors Python `InfoGathererSkill` exactly: the same required +`questions` config, the same `prefix` / `completion_message` options, +the same two tools (`start_questions`, `submit_answer`), and the same +state shape in `global_data`. + +## Signature + +```typescript +class InfoGathererSkill extends SkillBase +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/skills/skill-base) + +## Examples + +```typescript +agent.addSkill('info_gatherer', { + questions: [ + { key_name: 'name', question_text: 'What is your name?' }, + { key_name: 'email', question_text: 'Your email?', confirm: true }, + ], +}); +``` + +## Properties + + + Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. + + + + Configuration options provided at construction time. + + + + Unique identifier for this skill instance (includes timestamp and random bytes). + + + + Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. + + + + Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. + + + + Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. + + + + Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. + + + + Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. + + + + Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. + + + + The registered name of this skill type. + + + + Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. + + + + Additional SWAIG fields extracted from config, merged into tool definitions. + + +## Methods + +### cleanup + +Cleanup resources. Called when the skill is removed from an agent. + +#### Signature + +```typescript +cleanup(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 469. + +*** + +### constructor + +Create a new skill instance. + +Python parity: `core/skill_base.py:32-43`. +Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` +is left as `None` on the subclass. TS throws the equivalent when the static +defaults haven't been overridden. + +#### Signature + +```typescript +constructor(config?: SkillConfig): InfoGathererSkill +``` + +#### Parameters + + + Optional configuration key-value pairs (Python: `params`). + + +#### Returns + +`InfoGathererSkill` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 282. + +*** + +### defineTool + +Imperatively register a tool with this skill. + +Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. +Merges `this.swaigFields` into the tool definition (explicit fields on +`toolDef` take precedence), then pushes the result into `_dynamicTools` +so the default `getTools()` returns it at SWML render time. + +Intended for skills whose tool shape depends on config evaluated at +`setup()` time. Skills with a static tool list should override +`getTools()` instead. + +#### Signature + +```typescript +defineTool(toolDef: SkillToolDefinition): void +``` + +#### Parameters + + + The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 351. + +*** + +### getAgent + +Return the agent that owns this skill, asserting it is non-null. +Equivalent to accessing `self.agent` in Python, where the agent reference +is always set before `setup()` is called. + +The SkillManager lifecycle guarantees that `setAgent()` is called before +`setup()`, so this method is safe to use inside `setup()` and in any +tool handler invoked during an active agent session. + +#### Signature + +```typescript +getAgent(): AgentBase +``` + +#### Returns + +`AgentBase` — The owning `AgentBase` instance. + +#### Throws + +- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 261. + +*** + +### getConfig + +Get a configuration value by key, falling back to a default if not set. + +#### Signature + +```typescript +getConfig(key: string, defaultValue?: T): T +``` + +#### Type Parameters + + + +#### Parameters + + + The configuration key to look up. + + + + Value to return if the key is not present. + + +#### Returns + +`T` — The configuration value cast to type T, or the default value. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 524. + +*** + +### getDataMapTools + +Optional DataMap-style tool definitions. Skills that build their own +SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them +here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. + +Python equivalent: the direct `self.agent.register_swaig_function(fn)` +call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). +Default returns `[]` — skills using only the declarative `getTools()` path +do not need to override this. + +#### Signature + +```typescript +getDataMapTools(): Record[] +``` + +#### Returns + +`Record[]` — Array of fully-built SWAIG function dicts. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 372. + +*** + +### getGlobalData + +Seed SWAIG `global_data` with the initial question state under this +skill's namespace. Mirrors Python `get_global_data()` (skill.py:127-135). + +Defensive no-op when the skill was not successfully set up (empty +`questions`). Python relies on the SkillManager to skip unloaded skills; +TS adds this guard so `getGlobalData()` called without a successful +`setup()` returns `{}` instead of a malformed state payload. + +#### Signature + +```typescript +getGlobalData(): Record +``` + +#### Returns + +`Record` + +#### Source + +[`src/skills/builtin/info_gatherer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/info_gatherer.ts) + +Line 170. + +*** + +### getHints + +Get speech recognition hints relevant to this skill. + +#### Signature + +```typescript +getHints(): string[] +``` + +#### Returns + +`string[]` — Array of hint strings to improve speech recognition accuracy. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 402. + +*** + +### getInstanceKey + +Instance key for the SkillManager. When `prefix` is configured, returns +`info_gatherer_` to support multi-instance use. Matches Python's +`get_instance_key()` (skill.py:81-85). + +#### Signature + +```typescript +getInstanceKey(): string +``` + +#### Returns + +`string` + +#### Source + +[`src/skills/builtin/info_gatherer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/info_gatherer.ts) + +Line 116. + +*** + +### getParameterSchema + +Get the parameter schema for this skill class, describing all accepted configuration options. +Subclasses should override and call `super.getParameterSchema()` to include base parameters. + +Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): +returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a +`tool_name` entry with `default: cls.SKILL_NAME` for classes with +`SUPPORTS_MULTIPLE_INSTANCES = true`. + +**Modifiers:** `static` + +#### Signature + +```typescript +getParameterSchema(): Record +``` + +#### Returns + +`Record` — Record mapping parameter names to their schema entries. + +#### Source + +[`src/skills/builtin/info_gatherer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/info_gatherer.ts) + +Line 78. + +*** + +### getPromptSections + +Get prompt sections to inject into the agent's system prompt. +Respects the `skip_prompt` config option — returns `[]` if set to `true`. +Subclasses should override `_getPromptSections()` instead of this method. + +#### Signature + +```typescript +getPromptSections(): SkillPromptSection[] +``` + +#### Returns + +`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 382. + +*** + +### getSkillData + +Read this skill's data from a raw call data object's global\_data. + +#### Signature + +```typescript +getSkillData(rawData: Record): Record +``` + +#### Parameters + + + The raw request data containing global\_data. + + +#### Returns + +`Record` — The skill's stored data, or an empty object if not found. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 450. + +*** + +### getSkillNamespace + +Get the namespaced key for storing per-skill data in global\_data. + +#### Signature + +```typescript +getSkillNamespace(): string +``` + +#### Returns + +`string` — A string like "skill:datetime" or "skill:my\_prefix". + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 440. + +*** + +### getTools + +Register the two sequential-flow tools. Mirrors Python +`register_tools()` (skill.py:162-184). Returns an empty array when +`setup()` did not complete (no questions) so the skill never exposes +half-initialized tools. + +#### Signature + +```typescript +getTools(): SkillToolDefinition[] +``` + +#### Returns + +`SkillToolDefinition[]` + +#### Source + +[`src/skills/builtin/info_gatherer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/info_gatherer.ts) + +Line 189. + +*** + +### hasAllEnvVars + +Check if all required environment variables are present. +Convenience wrapper around `validateEnvVars()` that returns a boolean, +matching the Python `validate_env_vars() -> bool` return type. + +#### Signature + +```typescript +hasAllEnvVars(): boolean +``` + +#### Returns + +`boolean` — `true` if all required env vars are set, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 544. + +*** + +### hasAllPackages + +Check if all required packages declared in the manifest are available. +Convenience wrapper around `validatePackages()` that returns a boolean, +matching the Python `validate_packages() -> bool` return type. + +#### Signature + +```typescript +hasAllPackages(): Promise +``` + +#### Returns + +`Promise` — `true` if all required packages are importable, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 579. + +*** + +### isInitialized + +Check if the skill has been initialized by the SkillManager. + +#### Signature + +```typescript +isInitialized(): boolean +``` + +#### Returns + +`boolean` — True if setup() has completed and the skill is marked initialized. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 507. + +*** + +### markInitialized + +Mark the skill as initialized (called by SkillManager). + +#### Signature + +```typescript +markInitialized(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 514. + +*** + +### setAgent + +Set the agent reference for this skill. +Called by the SkillManager/AgentBase when the skill is attached to an agent. +Python equivalent: `self.agent = agent` in `__init__`. + +#### Signature + +```typescript +setAgent(agent: AgentBase): void +``` + +#### Parameters + + + The agent that owns this skill. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 534. + +*** + +### setup + +Validate the `questions` config, derive tool names (with optional prefix), +and cache the completion message. + +Python parity: skill.py:91-121. Returns `false` (logging an error) when +`questions` is missing or fails validation; setup must produce a +functional skill or fail closed. + +#### Signature + +```typescript +setup(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/skills/builtin/info_gatherer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/info_gatherer.ts) + +Line 129. + +*** + +### updateSkillData + +Update this skill's namespaced data on a FunctionResult via updateGlobalData. + +#### Signature + +```typescript +updateSkillData( + result: FunctionResult, + data: Record +): FunctionResult +``` + +#### Parameters + + + The FunctionResult to update. + + + + The data to store under this skill's namespace. + + +#### Returns + +`FunctionResult` — The FunctionResult for chaining. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 462. + +*** + +### validateEnvVars + +Validate that all required environment variables declared on the skill class +are set in the current process environment. + +Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` +directly. TS reads the same static from the class. + +Returns the list of missing variable names so callers can produce actionable +error messages. This differs from Python's `validate_env_vars() -> bool` +return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/skills/builtin/info-gatherer/info-gatherer-skill#has-all-env-vars) is the boolean equivalent. + +#### Signature + +```typescript +validateEnvVars(): string[] +``` + +#### Returns + +`string[]` — Array of missing environment variable names (empty if all are present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 486. + +*** + +### validatePackages + +Validate that all required packages declared on the skill class can be imported. + +Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` +directly and tries `importlib.import_module(pkg)` for each; TS does the +equivalent with a dynamic `import()`. + +#### Signature + +```typescript +validatePackages(): Promise +``` + +#### Returns + +`Promise` — Array of package names that could not be imported (empty if all present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 557. + +## Source + +[`src/skills/builtin/info_gatherer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/info_gatherer.ts) + +Line 60. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/joke/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/joke/index.mdx new file mode 100644 index 0000000000..0f34aafaeb --- /dev/null +++ b/fern/products/sdk-reference/typescript/skills/builtin/joke/index.mdx @@ -0,0 +1,62 @@ +--- +slug: "/reference/typescript/skills/builtin/joke" +title: "joke" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "skills.builtin.joke" + module: "skills.builtin" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/joke.ts" +--- +# `joke` + +## Signature + +```typescript +module joke +``` + +## Classes + + + + Tells random jokes from a curated built-in collection. + + + +## Functions + +### createSkill + +Factory function for creating JokeSkill instances. + +#### Signature + +```typescript +createSkill(config?: SkillConfig): JokeSkill +``` + +#### Parameters + + + Optional skill configuration. + + +#### Returns + +`JokeSkill` — A new JokeSkill instance. + +#### Source + +[`src/skills/builtin/joke.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/joke.ts) + +Line 194. + +## Source + +[`src/skills/builtin/joke.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/joke.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/joke/joke-skill/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/joke/joke-skill/index.mdx new file mode 100644 index 0000000000..7b56ffb348 --- /dev/null +++ b/fern/products/sdk-reference/typescript/skills/builtin/joke/joke-skill/index.mdx @@ -0,0 +1,716 @@ +--- +slug: "/reference/typescript/skills/builtin/joke/joke-skill" +title: "JokeSkill" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "skills.builtin.joke.JokeSkill" + parent: "skills.builtin.joke" + module: "skills.builtin.joke" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/joke.ts" +--- +# `JokeSkill` + +Tells random jokes from a curated built-in collection. + +Tier 1 built-in skill with no external dependencies. Includes general, +programming, and dad joke categories. + +## Signature + +```typescript +class JokeSkill extends SkillBase +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/skills/skill-base) + +## Examples + +```typescript +agent.addSkill('joke'); +``` + +## Properties + + + Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. + + + + Configuration options provided at construction time. + + + + Unique identifier for this skill instance (includes timestamp and random bytes). + + + + Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. + + + + Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. + + + + Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. + + + + Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. + + + + Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. + + + + Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. + + + + The registered name of this skill type. + + + + Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. + + + + Additional SWAIG fields extracted from config, merged into tool definitions. + + +## Methods + +### cleanup + +Cleanup resources. Called when the skill is removed from an agent. + +#### Signature + +```typescript +cleanup(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 469. + +*** + +### constructor + +Create a new skill instance. + +Python parity: `core/skill_base.py:32-43`. +Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` +is left as `None` on the subclass. TS throws the equivalent when the static +defaults haven't been overridden. + +#### Signature + +```typescript +constructor(config?: SkillConfig): JokeSkill +``` + +#### Parameters + + + Optional configuration key-value pairs (Python: `params`). + + +#### Returns + +`JokeSkill` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 282. + +*** + +### defineTool + +Imperatively register a tool with this skill. + +Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. +Merges `this.swaigFields` into the tool definition (explicit fields on +`toolDef` take precedence), then pushes the result into `_dynamicTools` +so the default `getTools()` returns it at SWML render time. + +Intended for skills whose tool shape depends on config evaluated at +`setup()` time. Skills with a static tool list should override +`getTools()` instead. + +#### Signature + +```typescript +defineTool(toolDef: SkillToolDefinition): void +``` + +#### Parameters + + + The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 351. + +*** + +### getAgent + +Return the agent that owns this skill, asserting it is non-null. +Equivalent to accessing `self.agent` in Python, where the agent reference +is always set before `setup()` is called. + +The SkillManager lifecycle guarantees that `setAgent()` is called before +`setup()`, so this method is safe to use inside `setup()` and in any +tool handler invoked during an active agent session. + +#### Signature + +```typescript +getAgent(): AgentBase +``` + +#### Returns + +`AgentBase` — The owning `AgentBase` instance. + +#### Throws + +- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 261. + +*** + +### getConfig + +Get a configuration value by key, falling back to a default if not set. + +#### Signature + +```typescript +getConfig(key: string, defaultValue?: T): T +``` + +#### Type Parameters + + + +#### Parameters + + + The configuration key to look up. + + + + Value to return if the key is not present. + + +#### Returns + +`T` — The configuration value cast to type T, or the default value. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 524. + +*** + +### getDataMapTools + +Optional DataMap-style tool definitions. Skills that build their own +SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them +here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. + +Python equivalent: the direct `self.agent.register_swaig_function(fn)` +call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). +Default returns `[]` — skills using only the declarative `getTools()` path +do not need to override this. + +#### Signature + +```typescript +getDataMapTools(): Record[] +``` + +#### Returns + +`Record[]` — Array of fully-built SWAIG function dicts. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 372. + +*** + +### getGlobalData + +Signal to the agent prompt that the joke skill is active. Python +parity: `get_global_data` returns `{"joke_skill_enabled": true}`. + +#### Signature + +```typescript +getGlobalData(): Record +``` + +#### Returns + +`Record` + +#### Source + +[`src/skills/builtin/joke.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/joke.ts) + +Line 119. + +*** + +### getHints + +Get speech recognition hints relevant to this skill. + +#### Signature + +```typescript +getHints(): string[] +``` + +#### Returns + +`string[]` — Array of hint strings to improve speech recognition accuracy. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 402. + +*** + +### getInstanceKey + +Get the instance key used for deduplication in the SkillManager. + +For single-instance skills (`SUPPORTS_MULTIPLE_INSTANCES = false`), returns +the skill name. For multi-instance skills, returns `${skillName}_${toolName}` +using the `tool_name` config (falls back to the skill name). + +Matches Python's `SkillBase.get_instance_key()` default (`skill_base.py:141-146`). +Multi-instance subclasses only need to override when their key derivation +depends on config beyond `tool_name`. + +#### Signature + +```typescript +getInstanceKey(): string +``` + +#### Returns + +`string` — A unique key identifying this skill instance. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 427. + +*** + +### getParameterSchema + +Get the parameter schema for this skill class, describing all accepted configuration options. +Subclasses should override and call `super.getParameterSchema()` to include base parameters. + +Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): +returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a +`tool_name` entry with `default: cls.SKILL_NAME` for classes with +`SUPPORTS_MULTIPLE_INSTANCES = true`. + +**Modifiers:** `static` + +#### Signature + +```typescript +getParameterSchema(): Record +``` + +#### Returns + +`Record` — Record mapping parameter names to their schema entries. + +#### Source + +[`src/skills/builtin/joke.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/joke.ts) + +Line 104. + +*** + +### getPromptSections + +Get prompt sections to inject into the agent's system prompt. +Respects the `skip_prompt` config option — returns `[]` if set to `true`. +Subclasses should override `_getPromptSections()` instead of this method. + +#### Signature + +```typescript +getPromptSections(): SkillPromptSection[] +``` + +#### Returns + +`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 382. + +*** + +### getSkillData + +Read this skill's data from a raw call data object's global\_data. + +#### Signature + +```typescript +getSkillData(rawData: Record): Record +``` + +#### Parameters + + + The raw request data containing global\_data. + + +#### Returns + +`Record` — The skill's stored data, or an empty object if not found. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 450. + +*** + +### getSkillNamespace + +Get the namespaced key for storing per-skill data in global\_data. + +#### Signature + +```typescript +getSkillNamespace(): string +``` + +#### Returns + +`string` — A string like "skill:datetime" or "skill:my\_prefix". + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 440. + +*** + +### getTools + +#### Signature + +```typescript +getTools(): SkillToolDefinition[] +``` + +#### Returns + +`SkillToolDefinition[]` — A single joke tool (configurable name) that returns a random joke with optional category filter. + +#### Source + +[`src/skills/builtin/joke.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/joke.ts) + +Line 124. + +*** + +### hasAllEnvVars + +Check if all required environment variables are present. +Convenience wrapper around `validateEnvVars()` that returns a boolean, +matching the Python `validate_env_vars() -> bool` return type. + +#### Signature + +```typescript +hasAllEnvVars(): boolean +``` + +#### Returns + +`boolean` — `true` if all required env vars are set, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 544. + +*** + +### hasAllPackages + +Check if all required packages declared in the manifest are available. +Convenience wrapper around `validatePackages()` that returns a boolean, +matching the Python `validate_packages() -> bool` return type. + +#### Signature + +```typescript +hasAllPackages(): Promise +``` + +#### Returns + +`Promise` — `true` if all required packages are importable, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 579. + +*** + +### isInitialized + +Check if the skill has been initialized by the SkillManager. + +#### Signature + +```typescript +isInitialized(): boolean +``` + +#### Returns + +`boolean` — True if setup() has completed and the skill is marked initialized. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 507. + +*** + +### markInitialized + +Mark the skill as initialized (called by SkillManager). + +#### Signature + +```typescript +markInitialized(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 514. + +*** + +### setAgent + +Set the agent reference for this skill. +Called by the SkillManager/AgentBase when the skill is attached to an agent. +Python equivalent: `self.agent = agent` in `__init__`. + +#### Signature + +```typescript +setAgent(agent: AgentBase): void +``` + +#### Parameters + + + The agent that owns this skill. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 534. + +*** + +### setup + +Setup the skill. Called when the skill is added to an agent. +Override to perform initialization (API connections, config validation, etc.) + +#### Signature + +```typescript +setup(): Promise +``` + +#### Returns + +`Promise` — `true` if setup succeeded, `false` otherwise. Python equivalent: abstract `setup() -> bool`. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 313. + +*** + +### updateSkillData + +Update this skill's namespaced data on a FunctionResult via updateGlobalData. + +#### Signature + +```typescript +updateSkillData( + result: FunctionResult, + data: Record +): FunctionResult +``` + +#### Parameters + + + The FunctionResult to update. + + + + The data to store under this skill's namespace. + + +#### Returns + +`FunctionResult` — The FunctionResult for chaining. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 462. + +*** + +### validateEnvVars + +Validate that all required environment variables declared on the skill class +are set in the current process environment. + +Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` +directly. TS reads the same static from the class. + +Returns the list of missing variable names so callers can produce actionable +error messages. This differs from Python's `validate_env_vars() -> bool` +return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/skills/builtin/joke/joke-skill#has-all-env-vars) is the boolean equivalent. + +#### Signature + +```typescript +validateEnvVars(): string[] +``` + +#### Returns + +`string[]` — Array of missing environment variable names (empty if all are present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 486. + +*** + +### validatePackages + +Validate that all required packages declared on the skill class can be imported. + +Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` +directly and tries `importlib.import_module(pkg)` for each; TS does the +equivalent with a dynamic `import()`. + +#### Signature + +```typescript +validatePackages(): Promise +``` + +#### Returns + +`Promise` — Array of package names that could not be imported (empty if all present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 557. + +## Source + +[`src/skills/builtin/joke.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/joke.ts) + +Line 96. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/math/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/math/index.mdx new file mode 100644 index 0000000000..cc4d01a705 --- /dev/null +++ b/fern/products/sdk-reference/typescript/skills/builtin/math/index.mdx @@ -0,0 +1,62 @@ +--- +slug: "/reference/typescript/skills/builtin/math" +title: "math" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "skills.builtin.math" + module: "skills.builtin" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/math.ts" +--- +# `math` + +## Signature + +```typescript +module math +``` + +## Classes + + + + Evaluates mathematical expressions safely using a sandboxed parser. + + + +## Functions + +### createSkill + +Factory function for creating MathSkill instances. + +#### Signature + +```typescript +createSkill(config?: SkillConfig): MathSkill +``` + +#### Parameters + + + Optional skill configuration. + + +#### Returns + +`MathSkill` — A new MathSkill instance. + +#### Source + +[`src/skills/builtin/math.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/math.ts) + +Line 147. + +## Source + +[`src/skills/builtin/math.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/math.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/math/math-skill/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/math/math-skill/index.mdx new file mode 100644 index 0000000000..1b75f05bf1 --- /dev/null +++ b/fern/products/sdk-reference/typescript/skills/builtin/math/math-skill/index.mdx @@ -0,0 +1,717 @@ +--- +slug: "/reference/typescript/skills/builtin/math/math-skill" +title: "MathSkill" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "skills.builtin.math.MathSkill" + parent: "skills.builtin.math" + module: "skills.builtin.math" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/math.ts" +--- +# `MathSkill` + +Evaluates mathematical expressions safely using a sandboxed parser. + +Tier 1 built-in skill with no external dependencies. Only allows digits, +basic arithmetic operators, parentheses, decimal points, and spaces. + +Registers a single SWAIG tool: `calculate`. + +## Signature + +```typescript +class MathSkill extends SkillBase +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/skills/skill-base) + +## Examples + +```typescript +agent.addSkill('math'); +``` + +## Properties + + + Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. + + + + Configuration options provided at construction time. + + + + Unique identifier for this skill instance (includes timestamp and random bytes). + + + + Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. + + + + Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. + + + + Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. + + + + Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. + + + + Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. + + + + Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. + + + + The registered name of this skill type. + + + + Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. + + + + Additional SWAIG fields extracted from config, merged into tool definitions. + + +## Methods + +### cleanup + +Cleanup resources. Called when the skill is removed from an agent. + +#### Signature + +```typescript +cleanup(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 469. + +*** + +### constructor + +Create a new skill instance. + +Python parity: `core/skill_base.py:32-43`. +Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` +is left as `None` on the subclass. TS throws the equivalent when the static +defaults haven't been overridden. + +#### Signature + +```typescript +constructor(config?: SkillConfig): MathSkill +``` + +#### Parameters + + + Optional configuration key-value pairs (Python: `params`). + + +#### Returns + +`MathSkill` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 282. + +*** + +### defineTool + +Imperatively register a tool with this skill. + +Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. +Merges `this.swaigFields` into the tool definition (explicit fields on +`toolDef` take precedence), then pushes the result into `_dynamicTools` +so the default `getTools()` returns it at SWML render time. + +Intended for skills whose tool shape depends on config evaluated at +`setup()` time. Skills with a static tool list should override +`getTools()` instead. + +#### Signature + +```typescript +defineTool(toolDef: SkillToolDefinition): void +``` + +#### Parameters + + + The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 351. + +*** + +### getAgent + +Return the agent that owns this skill, asserting it is non-null. +Equivalent to accessing `self.agent` in Python, where the agent reference +is always set before `setup()` is called. + +The SkillManager lifecycle guarantees that `setAgent()` is called before +`setup()`, so this method is safe to use inside `setup()` and in any +tool handler invoked during an active agent session. + +#### Signature + +```typescript +getAgent(): AgentBase +``` + +#### Returns + +`AgentBase` — The owning `AgentBase` instance. + +#### Throws + +- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 261. + +*** + +### getConfig + +Get a configuration value by key, falling back to a default if not set. + +#### Signature + +```typescript +getConfig(key: string, defaultValue?: T): T +``` + +#### Type Parameters + + + +#### Parameters + + + The configuration key to look up. + + + + Value to return if the key is not present. + + +#### Returns + +`T` — The configuration value cast to type T, or the default value. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 524. + +*** + +### getDataMapTools + +Optional DataMap-style tool definitions. Skills that build their own +SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them +here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. + +Python equivalent: the direct `self.agent.register_swaig_function(fn)` +call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). +Default returns `[]` — skills using only the declarative `getTools()` path +do not need to override this. + +#### Signature + +```typescript +getDataMapTools(): Record[] +``` + +#### Returns + +`Record[]` — Array of fully-built SWAIG function dicts. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 372. + +*** + +### getGlobalData + +Get global data to merge into the agent's global data store. + +#### Signature + +```typescript +getGlobalData(): Record +``` + +#### Returns + +`Record` — Key-value pairs to be merged into the agent's global data. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 410. + +*** + +### getHints + +Get speech recognition hints relevant to this skill. + +#### Signature + +```typescript +getHints(): string[] +``` + +#### Returns + +`string[]` — Array of hint strings to improve speech recognition accuracy. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 402. + +*** + +### getInstanceKey + +Get the instance key used for deduplication in the SkillManager. + +For single-instance skills (`SUPPORTS_MULTIPLE_INSTANCES = false`), returns +the skill name. For multi-instance skills, returns `${skillName}_${toolName}` +using the `tool_name` config (falls back to the skill name). + +Matches Python's `SkillBase.get_instance_key()` default (`skill_base.py:141-146`). +Multi-instance subclasses only need to override when their key derivation +depends on config beyond `tool_name`. + +#### Signature + +```typescript +getInstanceKey(): string +``` + +#### Returns + +`string` — A unique key identifying this skill instance. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 427. + +*** + +### getParameterSchema + +Get the parameter schema for this skill class, describing all accepted configuration options. +Subclasses should override and call `super.getParameterSchema()` to include base parameters. + +Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): +returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a +`tool_name` entry with `default: cls.SKILL_NAME` for classes with +`SUPPORTS_MULTIPLE_INSTANCES = true`. + +**Modifiers:** `static` + +#### Signature + +```typescript +getParameterSchema(): Record +``` + +#### Returns + +`Record` — Record mapping parameter names to their schema entries. + +#### Source + +[`src/skills/builtin/math.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/math.ts) + +Line 83. + +*** + +### getPromptSections + +Get prompt sections to inject into the agent's system prompt. +Respects the `skip_prompt` config option — returns `[]` if set to `true`. +Subclasses should override `_getPromptSections()` instead of this method. + +#### Signature + +```typescript +getPromptSections(): SkillPromptSection[] +``` + +#### Returns + +`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 382. + +*** + +### getSkillData + +Read this skill's data from a raw call data object's global\_data. + +#### Signature + +```typescript +getSkillData(rawData: Record): Record +``` + +#### Parameters + + + The raw request data containing global\_data. + + +#### Returns + +`Record` — The skill's stored data, or an empty object if not found. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 450. + +*** + +### getSkillNamespace + +Get the namespaced key for storing per-skill data in global\_data. + +#### Signature + +```typescript +getSkillNamespace(): string +``` + +#### Returns + +`string` — A string like "skill:datetime" or "skill:my\_prefix". + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 440. + +*** + +### getTools + +#### Signature + +```typescript +getTools(): SkillToolDefinition[] +``` + +#### Returns + +`SkillToolDefinition[]` — A single `calculate` tool that evaluates a math expression string. + +#### Source + +[`src/skills/builtin/math.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/math.ts) + +Line 88. + +*** + +### hasAllEnvVars + +Check if all required environment variables are present. +Convenience wrapper around `validateEnvVars()` that returns a boolean, +matching the Python `validate_env_vars() -> bool` return type. + +#### Signature + +```typescript +hasAllEnvVars(): boolean +``` + +#### Returns + +`boolean` — `true` if all required env vars are set, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 544. + +*** + +### hasAllPackages + +Check if all required packages declared in the manifest are available. +Convenience wrapper around `validatePackages()` that returns a boolean, +matching the Python `validate_packages() -> bool` return type. + +#### Signature + +```typescript +hasAllPackages(): Promise +``` + +#### Returns + +`Promise` — `true` if all required packages are importable, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 579. + +*** + +### isInitialized + +Check if the skill has been initialized by the SkillManager. + +#### Signature + +```typescript +isInitialized(): boolean +``` + +#### Returns + +`boolean` — True if setup() has completed and the skill is marked initialized. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 507. + +*** + +### markInitialized + +Mark the skill as initialized (called by SkillManager). + +#### Signature + +```typescript +markInitialized(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 514. + +*** + +### setAgent + +Set the agent reference for this skill. +Called by the SkillManager/AgentBase when the skill is attached to an agent. +Python equivalent: `self.agent = agent` in `__init__`. + +#### Signature + +```typescript +setAgent(agent: AgentBase): void +``` + +#### Parameters + + + The agent that owns this skill. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 534. + +*** + +### setup + +Setup the skill. Called when the skill is added to an agent. +Override to perform initialization (API connections, config validation, etc.) + +#### Signature + +```typescript +setup(): Promise +``` + +#### Returns + +`Promise` — `true` if setup succeeded, `false` otherwise. Python equivalent: abstract `setup() -> bool`. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 313. + +*** + +### updateSkillData + +Update this skill's namespaced data on a FunctionResult via updateGlobalData. + +#### Signature + +```typescript +updateSkillData( + result: FunctionResult, + data: Record +): FunctionResult +``` + +#### Parameters + + + The FunctionResult to update. + + + + The data to store under this skill's namespace. + + +#### Returns + +`FunctionResult` — The FunctionResult for chaining. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 462. + +*** + +### validateEnvVars + +Validate that all required environment variables declared on the skill class +are set in the current process environment. + +Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` +directly. TS reads the same static from the class. + +Returns the list of missing variable names so callers can produce actionable +error messages. This differs from Python's `validate_env_vars() -> bool` +return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/skills/builtin/math/math-skill#has-all-env-vars) is the boolean equivalent. + +#### Signature + +```typescript +validateEnvVars(): string[] +``` + +#### Returns + +`string[]` — Array of missing environment variable names (empty if all are present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 486. + +*** + +### validatePackages + +Validate that all required packages declared on the skill class can be imported. + +Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` +directly and tries `importlib.import_module(pkg)` for each; TS does the +equivalent with a dynamic `import()`. + +#### Signature + +```typescript +validatePackages(): Promise +``` + +#### Returns + +`Promise` — Array of package names that could not be imported (empty if all present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 557. + +## Source + +[`src/skills/builtin/math.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/math.ts) + +Line 75. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/mcp-gateway/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/mcp-gateway/index.mdx new file mode 100644 index 0000000000..d7ee16ab5b --- /dev/null +++ b/fern/products/sdk-reference/typescript/skills/builtin/mcp-gateway/index.mdx @@ -0,0 +1,62 @@ +--- +slug: "/reference/typescript/skills/builtin/mcp-gateway" +title: "mcp_gateway" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "skills.builtin.mcp_gateway" + module: "skills.builtin" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/mcp_gateway.ts" +--- +# `mcp_gateway` + +## Signature + +```typescript +module mcp_gateway +``` + +## Classes + + + + Bridge MCP (Model Context Protocol) servers with SWAIG functions. + + + +## Functions + +### createSkill + +Factory function for creating McpGatewaySkill instances. + +#### Signature + +```typescript +createSkill(config?: SkillConfig): McpGatewaySkill +``` + +#### Parameters + + + Optional skill configuration. + + +#### Returns + +`McpGatewaySkill` — A new McpGatewaySkill instance. + +#### Source + +[`src/skills/builtin/mcp_gateway.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/mcp_gateway.ts) + +Line 683. + +## Source + +[`src/skills/builtin/mcp_gateway.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/mcp_gateway.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/mcp-gateway/mcp-gateway-skill/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/mcp-gateway/mcp-gateway-skill/index.mdx new file mode 100644 index 0000000000..6b4cb22860 --- /dev/null +++ b/fern/products/sdk-reference/typescript/skills/builtin/mcp-gateway/mcp-gateway-skill/index.mdx @@ -0,0 +1,720 @@ +--- +slug: "/reference/typescript/skills/builtin/mcp-gateway/mcp-gateway-skill" +title: "McpGatewaySkill" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "skills.builtin.mcp_gateway.McpGatewaySkill" + parent: "skills.builtin.mcp_gateway" + module: "skills.builtin.mcp_gateway" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/mcp_gateway.ts" +--- +# `McpGatewaySkill` + +Bridge MCP (Model Context Protocol) servers with SWAIG functions. + +When configured, calls a gateway's `/services` endpoint to discover MCP +services, enumerates each service's tools, and registers them as SWAIG +tools prefixed with `tool_prefix` (default `mcp_`). A hidden hangup hook +tool cleans up MCP sessions when the call ends. + +## Signature + +```typescript +class McpGatewaySkill extends SkillBase +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/skills/skill-base) + +## Examples + +```typescript +agent.addSkill('mcp_gateway', { + gateway_url: 'https://mcp-gateway.example.com', + tool_prefix: 'mcp_', +}); +``` + +## Properties + + + Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. + + + + Configuration options provided at construction time. + + + + Unique identifier for this skill instance (includes timestamp and random bytes). + + + + Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. + + + + Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. + + + + Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. + + + + Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. + + + + Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. + + + + Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. + + + + The registered name of this skill type. + + + + Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. + + + + Additional SWAIG fields extracted from config, merged into tool definitions. + + +## Methods + +### cleanup + +Cleanup resources. Called when the skill is removed from an agent. + +#### Signature + +```typescript +cleanup(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 469. + +*** + +### constructor + +Create a new skill instance. + +Python parity: `core/skill_base.py:32-43`. +Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` +is left as `None` on the subclass. TS throws the equivalent when the static +defaults haven't been overridden. + +#### Signature + +```typescript +constructor(config?: SkillConfig): McpGatewaySkill +``` + +#### Parameters + + + Optional configuration key-value pairs (Python: `params`). + + +#### Returns + +`McpGatewaySkill` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 282. + +*** + +### defineTool + +Imperatively register a tool with this skill. + +Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. +Merges `this.swaigFields` into the tool definition (explicit fields on +`toolDef` take precedence), then pushes the result into `_dynamicTools` +so the default `getTools()` returns it at SWML render time. + +Intended for skills whose tool shape depends on config evaluated at +`setup()` time. Skills with a static tool list should override +`getTools()` instead. + +#### Signature + +```typescript +defineTool(toolDef: SkillToolDefinition): void +``` + +#### Parameters + + + The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 351. + +*** + +### getAgent + +Return the agent that owns this skill, asserting it is non-null. +Equivalent to accessing `self.agent` in Python, where the agent reference +is always set before `setup()` is called. + +The SkillManager lifecycle guarantees that `setAgent()` is called before +`setup()`, so this method is safe to use inside `setup()` and in any +tool handler invoked during an active agent session. + +#### Signature + +```typescript +getAgent(): AgentBase +``` + +#### Returns + +`AgentBase` — The owning `AgentBase` instance. + +#### Throws + +- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 261. + +*** + +### getConfig + +Get a configuration value by key, falling back to a default if not set. + +#### Signature + +```typescript +getConfig(key: string, defaultValue?: T): T +``` + +#### Type Parameters + + + +#### Parameters + + + The configuration key to look up. + + + + Value to return if the key is not present. + + +#### Returns + +`T` — The configuration value cast to type T, or the default value. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 524. + +*** + +### getDataMapTools + +Optional DataMap-style tool definitions. Skills that build their own +SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them +here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. + +Python equivalent: the direct `self.agent.register_swaig_function(fn)` +call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). +Default returns `[]` — skills using only the declarative `getTools()` path +do not need to override this. + +#### Signature + +```typescript +getDataMapTools(): Record[] +``` + +#### Returns + +`Record[]` — Array of fully-built SWAIG function dicts. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 372. + +*** + +### getGlobalData + +Get global data to merge into the agent's global data store. + +#### Signature + +```typescript +getGlobalData(): Record +``` + +#### Returns + +`Record` — Key-value pairs to be merged into the agent's global data. + +#### Source + +[`src/skills/builtin/mcp_gateway.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/mcp_gateway.ts) + +Line 271. + +*** + +### getHints + +Get speech recognition hints relevant to this skill. + +#### Signature + +```typescript +getHints(): string[] +``` + +#### Returns + +`string[]` — Array of hint strings to improve speech recognition accuracy. + +#### Source + +[`src/skills/builtin/mcp_gateway.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/mcp_gateway.ts) + +Line 257. + +*** + +### getInstanceKey + +Get the instance key used for deduplication in the SkillManager. + +For single-instance skills (`SUPPORTS_MULTIPLE_INSTANCES = false`), returns +the skill name. For multi-instance skills, returns `${skillName}_${toolName}` +using the `tool_name` config (falls back to the skill name). + +Matches Python's `SkillBase.get_instance_key()` default (`skill_base.py:141-146`). +Multi-instance subclasses only need to override when their key derivation +depends on config beyond `tool_name`. + +#### Signature + +```typescript +getInstanceKey(): string +``` + +#### Returns + +`string` — A unique key identifying this skill instance. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 427. + +*** + +### getParameterSchema + +Get the parameter schema for this skill class, describing all accepted configuration options. +Subclasses should override and call `super.getParameterSchema()` to include base parameters. + +Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): +returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a +`tool_name` entry with `default: cls.SKILL_NAME` for classes with +`SUPPORTS_MULTIPLE_INSTANCES = true`. + +**Modifiers:** `static` + +#### Signature + +```typescript +getParameterSchema(): Record +``` + +#### Returns + +`Record` — Record mapping parameter names to their schema entries. + +#### Source + +[`src/skills/builtin/mcp_gateway.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/mcp_gateway.ts) + +Line 71. + +*** + +### getPromptSections + +Get prompt sections to inject into the agent's system prompt. +Respects the `skip_prompt` config option — returns `[]` if set to `true`. +Subclasses should override `_getPromptSections()` instead of this method. + +#### Signature + +```typescript +getPromptSections(): SkillPromptSection[] +``` + +#### Returns + +`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 382. + +*** + +### getSkillData + +Read this skill's data from a raw call data object's global\_data. + +#### Signature + +```typescript +getSkillData(rawData: Record): Record +``` + +#### Parameters + + + The raw request data containing global\_data. + + +#### Returns + +`Record` — The skill's stored data, or an empty object if not found. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 450. + +*** + +### getSkillNamespace + +Get the namespaced key for storing per-skill data in global\_data. + +#### Signature + +```typescript +getSkillNamespace(): string +``` + +#### Returns + +`string` — A string like "skill:datetime" or "skill:my\_prefix". + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 440. + +*** + +### getTools + +#### Signature + +```typescript +getTools(): SkillToolDefinition[] +``` + +#### Returns + +`SkillToolDefinition[]` — Dynamically discovered MCP tools plus an internal hangup-cleanup tool. If discovery has not completed, returns a single fallback `mcp_invoke` tool that explains configuration is missing. + +#### Source + +[`src/skills/builtin/mcp_gateway.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/mcp_gateway.ts) + +Line 290. + +*** + +### hasAllEnvVars + +Check if all required environment variables are present. +Convenience wrapper around `validateEnvVars()` that returns a boolean, +matching the Python `validate_env_vars() -> bool` return type. + +#### Signature + +```typescript +hasAllEnvVars(): boolean +``` + +#### Returns + +`boolean` — `true` if all required env vars are set, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 544. + +*** + +### hasAllPackages + +Check if all required packages declared in the manifest are available. +Convenience wrapper around `validatePackages()` that returns a boolean, +matching the Python `validate_packages() -> bool` return type. + +#### Signature + +```typescript +hasAllPackages(): Promise +``` + +#### Returns + +`Promise` — `true` if all required packages are importable, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 579. + +*** + +### isInitialized + +Check if the skill has been initialized by the SkillManager. + +#### Signature + +```typescript +isInitialized(): boolean +``` + +#### Returns + +`boolean` — True if setup() has completed and the skill is marked initialized. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 507. + +*** + +### markInitialized + +Mark the skill as initialized (called by SkillManager). + +#### Signature + +```typescript +markInitialized(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 514. + +*** + +### setAgent + +Set the agent reference for this skill. +Called by the SkillManager/AgentBase when the skill is attached to an agent. +Python equivalent: `self.agent = agent` in `__init__`. + +#### Signature + +```typescript +setAgent(agent: AgentBase): void +``` + +#### Parameters + + + The agent that owns this skill. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 534. + +*** + +### setup + +Setup the skill. Called when the skill is added to an agent. +Override to perform initialization (API connections, config validation, etc.) + +#### Signature + +```typescript +setup(): Promise +``` + +#### Returns + +`Promise` — `true` if setup succeeded, `false` otherwise. Python equivalent: abstract `setup() -> bool`. + +#### Source + +[`src/skills/builtin/mcp_gateway.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/mcp_gateway.ts) + +Line 173. + +*** + +### updateSkillData + +Update this skill's namespaced data on a FunctionResult via updateGlobalData. + +#### Signature + +```typescript +updateSkillData( + result: FunctionResult, + data: Record +): FunctionResult +``` + +#### Parameters + + + The FunctionResult to update. + + + + The data to store under this skill's namespace. + + +#### Returns + +`FunctionResult` — The FunctionResult for chaining. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 462. + +*** + +### validateEnvVars + +Validate that all required environment variables declared on the skill class +are set in the current process environment. + +Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` +directly. TS reads the same static from the class. + +Returns the list of missing variable names so callers can produce actionable +error messages. This differs from Python's `validate_env_vars() -> bool` +return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/skills/builtin/mcp-gateway/mcp-gateway-skill#has-all-env-vars) is the boolean equivalent. + +#### Signature + +```typescript +validateEnvVars(): string[] +``` + +#### Returns + +`string[]` — Array of missing environment variable names (empty if all are present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 486. + +*** + +### validatePackages + +Validate that all required packages declared on the skill class can be imported. + +Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` +directly and tries `importlib.import_module(pkg)` for each; TS does the +equivalent with a dynamic `import()`. + +#### Signature + +```typescript +validatePackages(): Promise +``` + +#### Returns + +`Promise` — Array of package names that could not be imported (empty if all present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 557. + +## Source + +[`src/skills/builtin/mcp_gateway.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/mcp_gateway.ts) + +Line 61. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/native-vector-search/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/native-vector-search/index.mdx new file mode 100644 index 0000000000..906f3d28e7 --- /dev/null +++ b/fern/products/sdk-reference/typescript/skills/builtin/native-vector-search/index.mdx @@ -0,0 +1,92 @@ +--- +slug: "/reference/typescript/skills/builtin/native-vector-search" +title: "native_vector_search" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "skills.builtin.native_vector_search" + module: "skills.builtin" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/native_vector_search.ts" +--- +# `native_vector_search` + +## Signature + +```typescript +module native_vector_search +``` + +## Classes + + + + Document search using TF-IDF in-memory scoring or a remote search server. + + + +## Functions + +### createSkill + +Factory function for creating NativeVectorSearchSkill instances. + +#### Signature + +```typescript +createSkill(config?: SkillConfig): NativeVectorSearchSkill +``` + +#### Parameters + + + Optional skill configuration. + + +#### Returns + +`NativeVectorSearchSkill` — A new NativeVectorSearchSkill instance. + +#### Source + +[`src/skills/builtin/native_vector_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/native_vector_search.ts) + +Line 908. + +## Type Aliases + +### ResponseFormatCallback + +Callback signature for customizing the formatted search response. + +The context object is the TypeScript idiom for Python's positional-args +convention: `(response, agent, query, results, args)`. All Python fields are +present plus TS-specific additions (`count`, `skill`): + +- `response` — pre-formatted response string (same as Python arg 1) +- `agent` — the AgentBase instance that owns this skill (same as Python arg 2) +- `query` — the search query string (same as Python arg 3) +- `results` — array of search results (same as Python arg 4) +- `args` — raw tool call arguments (same as Python arg 5) +- `count` — requested result count (TS addition) +- `skill` — this skill instance (TS addition) + +#### Signature + +```typescript +type ResponseFormatCallback = (ctx: { agent?: AgentBase; args: Record; count: number; query: string; response: string; results: { content: string; metadata: Record; score: number }[]; skill: NativeVectorSearchSkill }) => string +``` + +#### Source + +[`src/skills/builtin/native_vector_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/native_vector_search.ts) + +Line 47. + +## Source + +[`src/skills/builtin/native_vector_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/native_vector_search.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/native-vector-search/native-vector-search-skill/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/native-vector-search/native-vector-search-skill/index.mdx new file mode 100644 index 0000000000..d0835e13ea --- /dev/null +++ b/fern/products/sdk-reference/typescript/skills/builtin/native-vector-search/native-vector-search-skill/index.mdx @@ -0,0 +1,718 @@ +--- +slug: "/reference/typescript/skills/builtin/native-vector-search/native-vector-search-skill" +title: "NativeVectorSearchSkill" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "skills.builtin.native_vector_search.NativeVectorSearchSkill" + parent: "skills.builtin.native_vector_search" + module: "skills.builtin.native_vector_search" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/native_vector_search.ts" +--- +# `NativeVectorSearchSkill` + +Document search using TF-IDF in-memory scoring or a remote search server. + +Multi-instance capable (distinguished by `tool_name` + `index_file`). + +## Signature + +```typescript +class NativeVectorSearchSkill extends SkillBase +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/skills/skill-base) + +## Examples + +```typescript +agent.addSkill('native_vector_search', { + tool_name: 'search_docs', + index_file: './data/support-docs.json', + count: 3, +}); +``` + +## Properties + + + Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. + + + + Configuration options provided at construction time. + + + + Unique identifier for this skill instance (includes timestamp and random bytes). + + + + Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. + + + + Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. + + + + Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. + + + + Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. + + + + Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. + + + + Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. + + + + The registered name of this skill type. + + + + Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. + + + + Additional SWAIG fields extracted from config, merged into tool definitions. + + +## Methods + +### cleanup + +Cleanup resources. Called when the skill is removed from an agent. + +#### Signature + +```typescript +cleanup(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/skills/builtin/native_vector_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/native_vector_search.ts) + +Line 546. + +*** + +### constructor + +Create a new skill instance. + +Python parity: `core/skill_base.py:32-43`. +Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` +is left as `None` on the subclass. TS throws the equivalent when the static +defaults haven't been overridden. + +#### Signature + +```typescript +constructor(config?: SkillConfig): NativeVectorSearchSkill +``` + +#### Parameters + + + Optional configuration key-value pairs (Python: `params`). + + +#### Returns + +`NativeVectorSearchSkill` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 282. + +*** + +### defineTool + +Imperatively register a tool with this skill. + +Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. +Merges `this.swaigFields` into the tool definition (explicit fields on +`toolDef` take precedence), then pushes the result into `_dynamicTools` +so the default `getTools()` returns it at SWML render time. + +Intended for skills whose tool shape depends on config evaluated at +`setup()` time. Skills with a static tool list should override +`getTools()` instead. + +#### Signature + +```typescript +defineTool(toolDef: SkillToolDefinition): void +``` + +#### Parameters + + + The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 351. + +*** + +### getAgent + +Return the agent that owns this skill, asserting it is non-null. +Equivalent to accessing `self.agent` in Python, where the agent reference +is always set before `setup()` is called. + +The SkillManager lifecycle guarantees that `setAgent()` is called before +`setup()`, so this method is safe to use inside `setup()` and in any +tool handler invoked during an active agent session. + +#### Signature + +```typescript +getAgent(): AgentBase +``` + +#### Returns + +`AgentBase` — The owning `AgentBase` instance. + +#### Throws + +- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 261. + +*** + +### getConfig + +Get a configuration value by key, falling back to a default if not set. + +#### Signature + +```typescript +getConfig(key: string, defaultValue?: T): T +``` + +#### Type Parameters + + + +#### Parameters + + + The configuration key to look up. + + + + Value to return if the key is not present. + + +#### Returns + +`T` — The configuration value cast to type T, or the default value. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 524. + +*** + +### getDataMapTools + +Optional DataMap-style tool definitions. Skills that build their own +SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them +here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. + +Python equivalent: the direct `self.agent.register_swaig_function(fn)` +call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). +Default returns `[]` — skills using only the declarative `getTools()` path +do not need to override this. + +#### Signature + +```typescript +getDataMapTools(): Record[] +``` + +#### Returns + +`Record[]` — Array of fully-built SWAIG function dicts. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 372. + +*** + +### getGlobalData + +Get global data to merge into the agent's global data store. + +#### Signature + +```typescript +getGlobalData(): Record +``` + +#### Returns + +`Record` — Key-value pairs to be merged into the agent's global data. + +#### Source + +[`src/skills/builtin/native_vector_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/native_vector_search.ts) + +Line 535. + +*** + +### getHints + +Get speech recognition hints relevant to this skill. + +#### Signature + +```typescript +getHints(): string[] +``` + +#### Returns + +`string[]` — Array of hint strings to improve speech recognition accuracy. + +#### Source + +[`src/skills/builtin/native_vector_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/native_vector_search.ts) + +Line 529. + +*** + +### getInstanceKey + +Get the instance key used for deduplication in the SkillManager. + +For single-instance skills (`SUPPORTS_MULTIPLE_INSTANCES = false`), returns +the skill name. For multi-instance skills, returns `${skillName}_${toolName}` +using the `tool_name` config (falls back to the skill name). + +Matches Python's `SkillBase.get_instance_key()` default (`skill_base.py:141-146`). +Multi-instance subclasses only need to override when their key derivation +depends on config beyond `tool_name`. + +#### Signature + +```typescript +getInstanceKey(): string +``` + +#### Returns + +`string` — A unique key identifying this skill instance. + +#### Source + +[`src/skills/builtin/native_vector_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/native_vector_search.ts) + +Line 406. + +*** + +### getParameterSchema + +Get the parameter schema for this skill class, describing all accepted configuration options. +Subclasses should override and call `super.getParameterSchema()` to include base parameters. + +Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): +returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a +`tool_name` entry with `default: cls.SKILL_NAME` for classes with +`SUPPORTS_MULTIPLE_INSTANCES = true`. + +**Modifiers:** `static` + +#### Signature + +```typescript +getParameterSchema(): Record +``` + +#### Returns + +`Record` — Record mapping parameter names to their schema entries. + +#### Source + +[`src/skills/builtin/native_vector_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/native_vector_search.ts) + +Line 169. + +*** + +### getPromptSections + +Get prompt sections to inject into the agent's system prompt. +Respects the `skip_prompt` config option — returns `[]` if set to `true`. +Subclasses should override `_getPromptSections()` instead of this method. + +#### Signature + +```typescript +getPromptSections(): SkillPromptSection[] +``` + +#### Returns + +`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 382. + +*** + +### getSkillData + +Read this skill's data from a raw call data object's global\_data. + +#### Signature + +```typescript +getSkillData(rawData: Record): Record +``` + +#### Parameters + + + The raw request data containing global\_data. + + +#### Returns + +`Record` — The skill's stored data, or an empty object if not found. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 450. + +*** + +### getSkillNamespace + +Get the namespaced key for storing per-skill data in global\_data. + +#### Signature + +```typescript +getSkillNamespace(): string +``` + +#### Returns + +`string` — A string like "skill:datetime" or "skill:my\_prefix". + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 440. + +*** + +### getTools + +#### Signature + +```typescript +getTools(): SkillToolDefinition[] +``` + +#### Returns + +`SkillToolDefinition[]` — A single search tool using the configured `tool_name` (default `search_knowledge`). + +#### Source + +[`src/skills/builtin/native_vector_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/native_vector_search.ts) + +Line 588. + +*** + +### hasAllEnvVars + +Check if all required environment variables are present. +Convenience wrapper around `validateEnvVars()` that returns a boolean, +matching the Python `validate_env_vars() -> bool` return type. + +#### Signature + +```typescript +hasAllEnvVars(): boolean +``` + +#### Returns + +`boolean` — `true` if all required env vars are set, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 544. + +*** + +### hasAllPackages + +Check if all required packages declared in the manifest are available. +Convenience wrapper around `validatePackages()` that returns a boolean, +matching the Python `validate_packages() -> bool` return type. + +#### Signature + +```typescript +hasAllPackages(): Promise +``` + +#### Returns + +`Promise` — `true` if all required packages are importable, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 579. + +*** + +### isInitialized + +Check if the skill has been initialized by the SkillManager. + +#### Signature + +```typescript +isInitialized(): boolean +``` + +#### Returns + +`boolean` — True if setup() has completed and the skill is marked initialized. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 507. + +*** + +### markInitialized + +Mark the skill as initialized (called by SkillManager). + +#### Signature + +```typescript +markInitialized(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 514. + +*** + +### setAgent + +Set the agent reference for this skill. +Called by the SkillManager/AgentBase when the skill is attached to an agent. +Python equivalent: `self.agent = agent` in `__init__`. + +#### Signature + +```typescript +setAgent(agent: AgentBase): void +``` + +#### Parameters + + + The agent that owns this skill. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 534. + +*** + +### setup + +Setup the skill. Called when the skill is added to an agent. +Override to perform initialization (API connections, config validation, etc.) + +#### Signature + +```typescript +setup(): Promise +``` + +#### Returns + +`Promise` — `true` if setup succeeded, `false` otherwise. Python equivalent: abstract `setup() -> bool`. + +#### Source + +[`src/skills/builtin/native_vector_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/native_vector_search.ts) + +Line 412. + +*** + +### updateSkillData + +Update this skill's namespaced data on a FunctionResult via updateGlobalData. + +#### Signature + +```typescript +updateSkillData( + result: FunctionResult, + data: Record +): FunctionResult +``` + +#### Parameters + + + The FunctionResult to update. + + + + The data to store under this skill's namespace. + + +#### Returns + +`FunctionResult` — The FunctionResult for chaining. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 462. + +*** + +### validateEnvVars + +Validate that all required environment variables declared on the skill class +are set in the current process environment. + +Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` +directly. TS reads the same static from the class. + +Returns the list of missing variable names so callers can produce actionable +error messages. This differs from Python's `validate_env_vars() -> bool` +return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/skills/builtin/native-vector-search/native-vector-search-skill#has-all-env-vars) is the boolean equivalent. + +#### Signature + +```typescript +validateEnvVars(): string[] +``` + +#### Returns + +`string[]` — Array of missing environment variable names (empty if all are present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 486. + +*** + +### validatePackages + +Validate that all required packages declared on the skill class can be imported. + +Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` +directly and tries `importlib.import_module(pkg)` for each; TS does the +equivalent with a dynamic `import()`. + +#### Signature + +```typescript +validatePackages(): Promise +``` + +#### Returns + +`Promise` — Array of package names that could not be imported (empty if all present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 557. + +## Source + +[`src/skills/builtin/native_vector_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/native_vector_search.ts) + +Line 159. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/play-background-file/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/play-background-file/index.mdx new file mode 100644 index 0000000000..1f31a437d2 --- /dev/null +++ b/fern/products/sdk-reference/typescript/skills/builtin/play-background-file/index.mdx @@ -0,0 +1,62 @@ +--- +slug: "/reference/typescript/skills/builtin/play-background-file" +title: "play_background_file" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "skills.builtin.play_background_file" + module: "skills.builtin" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/play_background_file.ts" +--- +# `play_background_file` + +## Signature + +```typescript +module play_background_file +``` + +## Classes + + + + Controls background audio playback during calls via SWML actions. + + + +## Functions + +### createSkill + +Factory function for creating PlayBackgroundFileSkill instances. + +#### Signature + +```typescript +createSkill(config?: SkillConfig): PlayBackgroundFileSkill +``` + +#### Parameters + + + Optional skill configuration. + + +#### Returns + +`PlayBackgroundFileSkill` — A new PlayBackgroundFileSkill instance. + +#### Source + +[`src/skills/builtin/play_background_file.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/play_background_file.ts) + +Line 365. + +## Source + +[`src/skills/builtin/play_background_file.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/play_background_file.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/play-background-file/play-background-file-skill/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/play-background-file/play-background-file-skill/index.mdx new file mode 100644 index 0000000000..14d0ae729f --- /dev/null +++ b/fern/products/sdk-reference/typescript/skills/builtin/play-background-file/play-background-file-skill/index.mdx @@ -0,0 +1,719 @@ +--- +slug: "/reference/typescript/skills/builtin/play-background-file/play-background-file-skill" +title: "PlayBackgroundFileSkill" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "skills.builtin.play_background_file.PlayBackgroundFileSkill" + parent: "skills.builtin.play_background_file" + module: "skills.builtin.play_background_file" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/play_background_file.ts" +--- +# `PlayBackgroundFileSkill` + +Controls background audio playback during calls via SWML actions. + +Tier 2 built-in skill with no external dependencies. Provides tools to play +and stop background audio files (e.g., hold music, ambient sounds). Supports +two configuration modes: + +- Pre-configured `files` array (matches the Python skill): emits a single + configurable tool whose `action` enum maps to `start_` / `stop` + values that trigger the corresponding file playback. +- Free-form `default_file_url` / `allowed_domains`: emits two tools, + `play_background` (arbitrary URL) and `stop_background`. + +## Signature + +```typescript +class PlayBackgroundFileSkill extends SkillBase +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/skills/skill-base) + +## Examples + +```typescript +agent.addSkill('play_background_file', { + files: [ + { key: 'hold', url: 'https://cdn.example.com/hold-music.mp3', description: 'Hold music' }, + ], +}); +``` + +## Properties + + + Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. + + + + Configuration options provided at construction time. + + + + Unique identifier for this skill instance (includes timestamp and random bytes). + + + + Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. + + + + Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. + + + + Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. + + + + Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. + + + + Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. + + + + Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. + + + + The registered name of this skill type. + + + + Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. + + + + Additional SWAIG fields extracted from config, merged into tool definitions. + + +## Methods + +### cleanup + +Cleanup resources. Called when the skill is removed from an agent. + +#### Signature + +```typescript +cleanup(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 469. + +*** + +### constructor + +Create a new skill instance. + +Python parity: `core/skill_base.py:32-43`. +Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` +is left as `None` on the subclass. TS throws the equivalent when the static +defaults haven't been overridden. + +#### Signature + +```typescript +constructor(config?: SkillConfig): PlayBackgroundFileSkill +``` + +#### Parameters + + + Optional configuration key-value pairs (Python: `params`). + + +#### Returns + +`PlayBackgroundFileSkill` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 282. + +*** + +### defineTool + +Imperatively register a tool with this skill. + +Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. +Merges `this.swaigFields` into the tool definition (explicit fields on +`toolDef` take precedence), then pushes the result into `_dynamicTools` +so the default `getTools()` returns it at SWML render time. + +Intended for skills whose tool shape depends on config evaluated at +`setup()` time. Skills with a static tool list should override +`getTools()` instead. + +#### Signature + +```typescript +defineTool(toolDef: SkillToolDefinition): void +``` + +#### Parameters + + + The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 351. + +*** + +### getAgent + +Return the agent that owns this skill, asserting it is non-null. +Equivalent to accessing `self.agent` in Python, where the agent reference +is always set before `setup()` is called. + +The SkillManager lifecycle guarantees that `setAgent()` is called before +`setup()`, so this method is safe to use inside `setup()` and in any +tool handler invoked during an active agent session. + +#### Signature + +```typescript +getAgent(): AgentBase +``` + +#### Returns + +`AgentBase` — The owning `AgentBase` instance. + +#### Throws + +- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 261. + +*** + +### getConfig + +Get a configuration value by key, falling back to a default if not set. + +#### Signature + +```typescript +getConfig(key: string, defaultValue?: T): T +``` + +#### Type Parameters + + + +#### Parameters + + + The configuration key to look up. + + + + Value to return if the key is not present. + + +#### Returns + +`T` — The configuration value cast to type T, or the default value. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 524. + +*** + +### getDataMapTools + +Optional DataMap-style tool definitions. Skills that build their own +SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them +here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. + +Python equivalent: the direct `self.agent.register_swaig_function(fn)` +call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). +Default returns `[]` — skills using only the declarative `getTools()` path +do not need to override this. + +#### Signature + +```typescript +getDataMapTools(): Record[] +``` + +#### Returns + +`Record[]` — Array of fully-built SWAIG function dicts. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 372. + +*** + +### getGlobalData + +Get global data to merge into the agent's global data store. + +#### Signature + +```typescript +getGlobalData(): Record +``` + +#### Returns + +`Record` — Key-value pairs to be merged into the agent's global data. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 410. + +*** + +### getHints + +Get speech recognition hints relevant to this skill. + +#### Signature + +```typescript +getHints(): string[] +``` + +#### Returns + +`string[]` — Array of hint strings to improve speech recognition accuracy. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 402. + +*** + +### getInstanceKey + +Produce a compound instance key so multiple copies of the skill with +distinct `tool_name` values can coexist in a single agent. + +#### Signature + +```typescript +getInstanceKey(): string +``` + +#### Returns + +`string` + +#### Source + +[`src/skills/builtin/play_background_file.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/play_background_file.ts) + +Line 114. + +*** + +### getParameterSchema + +Get the parameter schema for this skill class, describing all accepted configuration options. +Subclasses should override and call `super.getParameterSchema()` to include base parameters. + +Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): +returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a +`tool_name` entry with `default: cls.SKILL_NAME` for classes with +`SUPPORTS_MULTIPLE_INSTANCES = true`. + +**Modifiers:** `static` + +#### Signature + +```typescript +getParameterSchema(): Record +``` + +#### Returns + +`Record` — Record mapping parameter names to their schema entries. + +#### Source + +[`src/skills/builtin/play_background_file.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/play_background_file.ts) + +Line 58. + +*** + +### getPromptSections + +Get prompt sections to inject into the agent's system prompt. +Respects the `skip_prompt` config option — returns `[]` if set to `true`. +Subclasses should override `_getPromptSections()` instead of this method. + +#### Signature + +```typescript +getPromptSections(): SkillPromptSection[] +``` + +#### Returns + +`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 382. + +*** + +### getSkillData + +Read this skill's data from a raw call data object's global\_data. + +#### Signature + +```typescript +getSkillData(rawData: Record): Record +``` + +#### Parameters + + + The raw request data containing global\_data. + + +#### Returns + +`Record` — The skill's stored data, or an empty object if not found. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 450. + +*** + +### getSkillNamespace + +Get the namespaced key for storing per-skill data in global\_data. + +#### Signature + +```typescript +getSkillNamespace(): string +``` + +#### Returns + +`string` — A string like "skill:datetime" or "skill:my\_prefix". + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 440. + +*** + +### getTools + +#### Signature + +```typescript +getTools(): SkillToolDefinition[] +``` + +#### Returns + +`SkillToolDefinition[]` — Either a single enum-based tool (when pre-configured `files` are supplied — matches Python), or two free-form tools (`play_background` and `stop_background`) when only `default_file_url`/`allowed_domains` are configured. + +#### Source + +[`src/skills/builtin/play_background_file.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/play_background_file.ts) + +Line 138. + +*** + +### hasAllEnvVars + +Check if all required environment variables are present. +Convenience wrapper around `validateEnvVars()` that returns a boolean, +matching the Python `validate_env_vars() -> bool` return type. + +#### Signature + +```typescript +hasAllEnvVars(): boolean +``` + +#### Returns + +`boolean` — `true` if all required env vars are set, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 544. + +*** + +### hasAllPackages + +Check if all required packages declared in the manifest are available. +Convenience wrapper around `validatePackages()` that returns a boolean, +matching the Python `validate_packages() -> bool` return type. + +#### Signature + +```typescript +hasAllPackages(): Promise +``` + +#### Returns + +`Promise` — `true` if all required packages are importable, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 579. + +*** + +### isInitialized + +Check if the skill has been initialized by the SkillManager. + +#### Signature + +```typescript +isInitialized(): boolean +``` + +#### Returns + +`boolean` — True if setup() has completed and the skill is marked initialized. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 507. + +*** + +### markInitialized + +Mark the skill as initialized (called by SkillManager). + +#### Signature + +```typescript +markInitialized(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 514. + +*** + +### setAgent + +Set the agent reference for this skill. +Called by the SkillManager/AgentBase when the skill is attached to an agent. +Python equivalent: `self.agent = agent` in `__init__`. + +#### Signature + +```typescript +setAgent(agent: AgentBase): void +``` + +#### Parameters + + + The agent that owns this skill. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 534. + +*** + +### setup + +Setup the skill. Called when the skill is added to an agent. +Override to perform initialization (API connections, config validation, etc.) + +#### Signature + +```typescript +setup(): Promise +``` + +#### Returns + +`Promise` — `true` if setup succeeded, `false` otherwise. Python equivalent: abstract `setup() -> bool`. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 313. + +*** + +### updateSkillData + +Update this skill's namespaced data on a FunctionResult via updateGlobalData. + +#### Signature + +```typescript +updateSkillData( + result: FunctionResult, + data: Record +): FunctionResult +``` + +#### Parameters + + + The FunctionResult to update. + + + + The data to store under this skill's namespace. + + +#### Returns + +`FunctionResult` — The FunctionResult for chaining. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 462. + +*** + +### validateEnvVars + +Validate that all required environment variables declared on the skill class +are set in the current process environment. + +Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` +directly. TS reads the same static from the class. + +Returns the list of missing variable names so callers can produce actionable +error messages. This differs from Python's `validate_env_vars() -> bool` +return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/skills/builtin/play-background-file/play-background-file-skill#has-all-env-vars) is the boolean equivalent. + +#### Signature + +```typescript +validateEnvVars(): string[] +``` + +#### Returns + +`string[]` — Array of missing environment variable names (empty if all are present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 486. + +*** + +### validatePackages + +Validate that all required packages declared on the skill class can be imported. + +Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` +directly and tries `importlib.import_module(pkg)` for each; TS does the +equivalent with a dynamic `import()`. + +#### Signature + +```typescript +validatePackages(): Promise +``` + +#### Returns + +`Promise` — Array of package names that could not be imported (empty if all present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 557. + +## Source + +[`src/skills/builtin/play_background_file.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/play_background_file.ts) + +Line 52. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/spider/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/spider/index.mdx new file mode 100644 index 0000000000..19e6934299 --- /dev/null +++ b/fern/products/sdk-reference/typescript/skills/builtin/spider/index.mdx @@ -0,0 +1,62 @@ +--- +slug: "/reference/typescript/skills/builtin/spider" +title: "spider" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "skills.builtin.spider" + module: "skills.builtin" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/spider.ts" +--- +# `spider` + +## Signature + +```typescript +module spider +``` + +## Classes + + + + Fast web scraping skill optimized for speed and token efficiency. + + + +## Functions + +### createSkill + +Factory function for creating SpiderSkill instances. + +#### Signature + +```typescript +createSkill(config?: SkillConfig): SpiderSkill +``` + +#### Parameters + + + Optional skill configuration. + + +#### Returns + +`SpiderSkill` — A new SpiderSkill instance. + +#### Source + +[`src/skills/builtin/spider.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/spider.ts) + +Line 937. + +## Source + +[`src/skills/builtin/spider.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/spider.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/spider/spider-skill/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/spider/spider-skill/index.mdx new file mode 100644 index 0000000000..45c105c45b --- /dev/null +++ b/fern/products/sdk-reference/typescript/skills/builtin/spider/spider-skill/index.mdx @@ -0,0 +1,718 @@ +--- +slug: "/reference/typescript/skills/builtin/spider/spider-skill" +title: "SpiderSkill" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "skills.builtin.spider.SpiderSkill" + parent: "skills.builtin.spider" + module: "skills.builtin.spider" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/spider.ts" +--- +# `SpiderSkill` + +Fast web scraping skill optimized for speed and token efficiency. + +Multi-instance capable. Port of the Python `SpiderSkill` with three tools: +`scrape_url`, `crawl_site`, and `extract_structured_data`. Configuration +mirrors the Python schema (delay, concurrent\_requests, timeout, max\_pages, +max\_depth, extract\_type, max\_text\_length, clean\_text, selectors, +follow\_patterns, user\_agent, headers, follow\_robots\_txt, cache\_enabled). + +## Signature + +```typescript +class SpiderSkill extends SkillBase +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/skills/skill-base) + +## Examples + +```typescript +agent.addSkill('spider', { max_pages: 5, max_depth: 2 }); +``` + +## Properties + + + Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. + + + + Configuration options provided at construction time. + + + + Unique identifier for this skill instance (includes timestamp and random bytes). + + + + Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. + + + + Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. + + + + Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. + + + + Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. + + + + Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. + + + + Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. + + + + The registered name of this skill type. + + + + Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. + + + + Additional SWAIG fields extracted from config, merged into tool definitions. + + +## Methods + +### cleanup + +Cleanup resources. Called when the skill is removed from an agent. + +#### Signature + +```typescript +cleanup(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/skills/builtin/spider.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/spider.ts) + +Line 321. + +*** + +### constructor + +Create a new skill instance. + +Python parity: `core/skill_base.py:32-43`. +Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` +is left as `None` on the subclass. TS throws the equivalent when the static +defaults haven't been overridden. + +#### Signature + +```typescript +constructor(config?: SkillConfig): SpiderSkill +``` + +#### Parameters + + + Optional configuration key-value pairs (Python: `params`). + + +#### Returns + +`SpiderSkill` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 282. + +*** + +### defineTool + +Imperatively register a tool with this skill. + +Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. +Merges `this.swaigFields` into the tool definition (explicit fields on +`toolDef` take precedence), then pushes the result into `_dynamicTools` +so the default `getTools()` returns it at SWML render time. + +Intended for skills whose tool shape depends on config evaluated at +`setup()` time. Skills with a static tool list should override +`getTools()` instead. + +#### Signature + +```typescript +defineTool(toolDef: SkillToolDefinition): void +``` + +#### Parameters + + + The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 351. + +*** + +### getAgent + +Return the agent that owns this skill, asserting it is non-null. +Equivalent to accessing `self.agent` in Python, where the agent reference +is always set before `setup()` is called. + +The SkillManager lifecycle guarantees that `setAgent()` is called before +`setup()`, so this method is safe to use inside `setup()` and in any +tool handler invoked during an active agent session. + +#### Signature + +```typescript +getAgent(): AgentBase +``` + +#### Returns + +`AgentBase` — The owning `AgentBase` instance. + +#### Throws + +- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 261. + +*** + +### getConfig + +Get a configuration value by key, falling back to a default if not set. + +#### Signature + +```typescript +getConfig(key: string, defaultValue?: T): T +``` + +#### Type Parameters + + + +#### Parameters + + + The configuration key to look up. + + + + Value to return if the key is not present. + + +#### Returns + +`T` — The configuration value cast to type T, or the default value. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 524. + +*** + +### getDataMapTools + +Optional DataMap-style tool definitions. Skills that build their own +SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them +here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. + +Python equivalent: the direct `self.agent.register_swaig_function(fn)` +call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). +Default returns `[]` — skills using only the declarative `getTools()` path +do not need to override this. + +#### Signature + +```typescript +getDataMapTools(): Record[] +``` + +#### Returns + +`Record[]` — Array of fully-built SWAIG function dicts. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 372. + +*** + +### getGlobalData + +Get global data to merge into the agent's global data store. + +#### Signature + +```typescript +getGlobalData(): Record +``` + +#### Returns + +`Record` — Key-value pairs to be merged into the agent's global data. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 410. + +*** + +### getHints + +Get speech recognition hints relevant to this skill. + +#### Signature + +```typescript +getHints(): string[] +``` + +#### Returns + +`string[]` — Array of hint strings to improve speech recognition accuracy. + +#### Source + +[`src/skills/builtin/spider.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/spider.ts) + +Line 308. + +*** + +### getInstanceKey + +Get the instance key used for deduplication in the SkillManager. + +For single-instance skills (`SUPPORTS_MULTIPLE_INSTANCES = false`), returns +the skill name. For multi-instance skills, returns `${skillName}_${toolName}` +using the `tool_name` config (falls back to the skill name). + +Matches Python's `SkillBase.get_instance_key()` default (`skill_base.py:141-146`). +Multi-instance subclasses only need to override when their key derivation +depends on config beyond `tool_name`. + +#### Signature + +```typescript +getInstanceKey(): string +``` + +#### Returns + +`string` — A unique key identifying this skill instance. + +#### Source + +[`src/skills/builtin/spider.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/spider.ts) + +Line 211. + +*** + +### getParameterSchema + +Get the parameter schema for this skill class, describing all accepted configuration options. +Subclasses should override and call `super.getParameterSchema()` to include base parameters. + +Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): +returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a +`tool_name` entry with `default: cls.SKILL_NAME` for classes with +`SUPPORTS_MULTIPLE_INSTANCES = true`. + +**Modifiers:** `static` + +#### Signature + +```typescript +getParameterSchema(): Record +``` + +#### Returns + +`Record` — Record mapping parameter names to their schema entries. + +#### Source + +[`src/skills/builtin/spider.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/spider.ts) + +Line 81. + +*** + +### getPromptSections + +Get prompt sections to inject into the agent's system prompt. +Respects the `skip_prompt` config option — returns `[]` if set to `true`. +Subclasses should override `_getPromptSections()` instead of this method. + +#### Signature + +```typescript +getPromptSections(): SkillPromptSection[] +``` + +#### Returns + +`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 382. + +*** + +### getSkillData + +Read this skill's data from a raw call data object's global\_data. + +#### Signature + +```typescript +getSkillData(rawData: Record): Record +``` + +#### Parameters + + + The raw request data containing global\_data. + + +#### Returns + +`Record` — The skill's stored data, or an empty object if not found. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 450. + +*** + +### getSkillNamespace + +Get the namespaced key for storing per-skill data in global\_data. + +#### Signature + +```typescript +getSkillNamespace(): string +``` + +#### Returns + +`string` — A string like "skill:datetime" or "skill:my\_prefix". + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 440. + +*** + +### getTools + +#### Signature + +```typescript +getTools(): SkillToolDefinition[] +``` + +#### Returns + +`SkillToolDefinition[]` — Three tools: `scrape_url`, `crawl_site`, and `extract_structured_data`. + +#### Source + +[`src/skills/builtin/spider.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/spider.ts) + +Line 329. + +*** + +### hasAllEnvVars + +Check if all required environment variables are present. +Convenience wrapper around `validateEnvVars()` that returns a boolean, +matching the Python `validate_env_vars() -> bool` return type. + +#### Signature + +```typescript +hasAllEnvVars(): boolean +``` + +#### Returns + +`boolean` — `true` if all required env vars are set, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 544. + +*** + +### hasAllPackages + +Check if all required packages declared in the manifest are available. +Convenience wrapper around `validatePackages()` that returns a boolean, +matching the Python `validate_packages() -> bool` return type. + +#### Signature + +```typescript +hasAllPackages(): Promise +``` + +#### Returns + +`Promise` — `true` if all required packages are importable, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 579. + +*** + +### isInitialized + +Check if the skill has been initialized by the SkillManager. + +#### Signature + +```typescript +isInitialized(): boolean +``` + +#### Returns + +`boolean` — True if setup() has completed and the skill is marked initialized. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 507. + +*** + +### markInitialized + +Mark the skill as initialized (called by SkillManager). + +#### Signature + +```typescript +markInitialized(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 514. + +*** + +### setAgent + +Set the agent reference for this skill. +Called by the SkillManager/AgentBase when the skill is attached to an agent. +Python equivalent: `self.agent = agent` in `__init__`. + +#### Signature + +```typescript +setAgent(agent: AgentBase): void +``` + +#### Parameters + + + The agent that owns this skill. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 534. + +*** + +### setup + +Setup the skill. Called when the skill is added to an agent. +Override to perform initialization (API connections, config validation, etc.) + +#### Signature + +```typescript +setup(): Promise +``` + +#### Returns + +`Promise` — `true` if setup succeeded, `false` otherwise. Python equivalent: abstract `setup() -> bool`. + +#### Source + +[`src/skills/builtin/spider.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/spider.ts) + +Line 216. + +*** + +### updateSkillData + +Update this skill's namespaced data on a FunctionResult via updateGlobalData. + +#### Signature + +```typescript +updateSkillData( + result: FunctionResult, + data: Record +): FunctionResult +``` + +#### Parameters + + + The FunctionResult to update. + + + + The data to store under this skill's namespace. + + +#### Returns + +`FunctionResult` — The FunctionResult for chaining. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 462. + +*** + +### validateEnvVars + +Validate that all required environment variables declared on the skill class +are set in the current process environment. + +Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` +directly. TS reads the same static from the class. + +Returns the list of missing variable names so callers can produce actionable +error messages. This differs from Python's `validate_env_vars() -> bool` +return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/skills/builtin/spider/spider-skill#has-all-env-vars) is the boolean equivalent. + +#### Signature + +```typescript +validateEnvVars(): string[] +``` + +#### Returns + +`string[]` — Array of missing environment variable names (empty if all are present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 486. + +*** + +### validatePackages + +Validate that all required packages declared on the skill class can be imported. + +Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` +directly and tries `importlib.import_module(pkg)` for each; TS does the +equivalent with a dynamic `import()`. + +#### Signature + +```typescript +validatePackages(): Promise +``` + +#### Returns + +`Promise` — Array of package names that could not be imported (empty if all present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 557. + +## Source + +[`src/skills/builtin/spider.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/spider.ts) + +Line 71. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/swml-transfer/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/swml-transfer/index.mdx new file mode 100644 index 0000000000..1dee6d47b5 --- /dev/null +++ b/fern/products/sdk-reference/typescript/skills/builtin/swml-transfer/index.mdx @@ -0,0 +1,62 @@ +--- +slug: "/reference/typescript/skills/builtin/swml-transfer" +title: "swml_transfer" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "skills.builtin.swml_transfer" + module: "skills.builtin" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/swml_transfer.ts" +--- +# `swml_transfer` + +## Signature + +```typescript +module swml_transfer +``` + +## Classes + + + + Transfer calls between agents based on pattern matching. + + + +## Functions + +### createSkill + +Factory function for creating SwmlTransferSkill instances. + +#### Signature + +```typescript +createSkill(config?: SkillConfig): SwmlTransferSkill +``` + +#### Parameters + + + Optional skill configuration. + + +#### Returns + +`SwmlTransferSkill` — A new SwmlTransferSkill instance. + +#### Source + +[`src/skills/builtin/swml_transfer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/swml_transfer.ts) + +Line 643. + +## Source + +[`src/skills/builtin/swml_transfer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/swml_transfer.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/swml-transfer/swml-transfer-skill/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/swml-transfer/swml-transfer-skill/index.mdx new file mode 100644 index 0000000000..b4fa0aa3a9 --- /dev/null +++ b/fern/products/sdk-reference/typescript/skills/builtin/swml-transfer/swml-transfer-skill/index.mdx @@ -0,0 +1,721 @@ +--- +slug: "/reference/typescript/skills/builtin/swml-transfer/swml-transfer-skill" +title: "SwmlTransferSkill" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "skills.builtin.swml_transfer.SwmlTransferSkill" + parent: "skills.builtin.swml_transfer" + module: "skills.builtin.swml_transfer" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/swml_transfer.ts" +--- +# `SwmlTransferSkill` + +Transfer calls between agents based on pattern matching. + +Multi-instance capable (distinguished by `tool_name`). +Accepts either Python-style `transfers` config (regex → per-entry config) +or TypeScript-style `patterns` array of named destinations. + +## Signature + +```typescript +class SwmlTransferSkill extends SkillBase +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/skills/skill-base) + +## Examples + +```typescript +agent.addSkill('swml_transfer', { + patterns: [ + { name: 'sales', pattern: /sales|pricing|buy/i, to: '+15551112222' }, + { name: 'support', pattern: /help|support|broken/i, to: '+15553334444' }, + ], +}); +``` + +## Properties + + + Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. + + + + Configuration options provided at construction time. + + + + Unique identifier for this skill instance (includes timestamp and random bytes). + + + + Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. + + + + Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. + + + + Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. + + + + Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. + + + + Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. + + + + Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. + + + + The registered name of this skill type. + + + + Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. + + + + Additional SWAIG fields extracted from config, merged into tool definitions. + + +## Methods + +### cleanup + +Cleanup resources. Called when the skill is removed from an agent. + +#### Signature + +```typescript +cleanup(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 469. + +*** + +### constructor + +Create a new skill instance. + +Python parity: `core/skill_base.py:32-43`. +Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` +is left as `None` on the subclass. TS throws the equivalent when the static +defaults haven't been overridden. + +#### Signature + +```typescript +constructor(config?: SkillConfig): SwmlTransferSkill +``` + +#### Parameters + + + Optional configuration key-value pairs (Python: `params`). + + +#### Returns + +`SwmlTransferSkill` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 282. + +*** + +### defineTool + +Imperatively register a tool with this skill. + +Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. +Merges `this.swaigFields` into the tool definition (explicit fields on +`toolDef` take precedence), then pushes the result into `_dynamicTools` +so the default `getTools()` returns it at SWML render time. + +Intended for skills whose tool shape depends on config evaluated at +`setup()` time. Skills with a static tool list should override +`getTools()` instead. + +#### Signature + +```typescript +defineTool(toolDef: SkillToolDefinition): void +``` + +#### Parameters + + + The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 351. + +*** + +### getAgent + +Return the agent that owns this skill, asserting it is non-null. +Equivalent to accessing `self.agent` in Python, where the agent reference +is always set before `setup()` is called. + +The SkillManager lifecycle guarantees that `setAgent()` is called before +`setup()`, so this method is safe to use inside `setup()` and in any +tool handler invoked during an active agent session. + +#### Signature + +```typescript +getAgent(): AgentBase +``` + +#### Returns + +`AgentBase` — The owning `AgentBase` instance. + +#### Throws + +- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 261. + +*** + +### getConfig + +Get a configuration value by key, falling back to a default if not set. + +#### Signature + +```typescript +getConfig(key: string, defaultValue?: T): T +``` + +#### Type Parameters + + + +#### Parameters + + + The configuration key to look up. + + + + Value to return if the key is not present. + + +#### Returns + +`T` — The configuration value cast to type T, or the default value. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 524. + +*** + +### getDataMapTools + +Optional DataMap-style tool definitions. Skills that build their own +SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them +here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. + +Python equivalent: the direct `self.agent.register_swaig_function(fn)` +call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). +Default returns `[]` — skills using only the declarative `getTools()` path +do not need to override this. + +#### Signature + +```typescript +getDataMapTools(): Record[] +``` + +#### Returns + +`Record[]` — Array of fully-built SWAIG function dicts. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 372. + +*** + +### getGlobalData + +Get global data to merge into the agent's global data store. + +#### Signature + +```typescript +getGlobalData(): Record +``` + +#### Returns + +`Record` — Key-value pairs to be merged into the agent's global data. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 410. + +*** + +### getHints + +Get speech recognition hints relevant to this skill. + +#### Signature + +```typescript +getHints(): string[] +``` + +#### Returns + +`string[]` — Array of hint strings to improve speech recognition accuracy. + +#### Source + +[`src/skills/builtin/swml_transfer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/swml_transfer.ts) + +Line 241. + +*** + +### getInstanceKey + +Get the instance key used for deduplication in the SkillManager. + +For single-instance skills (`SUPPORTS_MULTIPLE_INSTANCES = false`), returns +the skill name. For multi-instance skills, returns `${skillName}_${toolName}` +using the `tool_name` config (falls back to the skill name). + +Matches Python's `SkillBase.get_instance_key()` default (`skill_base.py:141-146`). +Multi-instance subclasses only need to override when their key derivation +depends on config beyond `tool_name`. + +#### Signature + +```typescript +getInstanceKey(): string +``` + +#### Returns + +`string` — A unique key identifying this skill instance. + +#### Source + +[`src/skills/builtin/swml_transfer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/swml_transfer.ts) + +Line 162. + +*** + +### getParameterSchema + +Get the parameter schema for this skill class, describing all accepted configuration options. +Subclasses should override and call `super.getParameterSchema()` to include base parameters. + +Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): +returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a +`tool_name` entry with `default: cls.SKILL_NAME` for classes with +`SUPPORTS_MULTIPLE_INSTANCES = true`. + +**Modifiers:** `static` + +#### Signature + +```typescript +getParameterSchema(): Record +``` + +#### Returns + +`Record` — Record mapping parameter names to their schema entries. + +#### Source + +[`src/skills/builtin/swml_transfer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/swml_transfer.ts) + +Line 82. + +*** + +### getPromptSections + +Get prompt sections to inject into the agent's system prompt. +Respects the `skip_prompt` config option — returns `[]` if set to `true`. +Subclasses should override `_getPromptSections()` instead of this method. + +#### Signature + +```typescript +getPromptSections(): SkillPromptSection[] +``` + +#### Returns + +`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 382. + +*** + +### getSkillData + +Read this skill's data from a raw call data object's global\_data. + +#### Signature + +```typescript +getSkillData(rawData: Record): Record +``` + +#### Parameters + + + The raw request data containing global\_data. + + +#### Returns + +`Record` — The skill's stored data, or an empty object if not found. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 450. + +*** + +### getSkillNamespace + +Get the namespaced key for storing per-skill data in global\_data. + +#### Signature + +```typescript +getSkillNamespace(): string +``` + +#### Returns + +`string` — A string like "skill:datetime" or "skill:my\_prefix". + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 440. + +*** + +### getTools + +#### Signature + +```typescript +getTools(): SkillToolDefinition[] +``` + +#### Returns + +`SkillToolDefinition[]` — A `transfer_call` tool, plus `list_transfer_destinations` when patterns are configured. + +#### Source + +[`src/skills/builtin/swml_transfer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/swml_transfer.ts) + +Line 272. + +*** + +### hasAllEnvVars + +Check if all required environment variables are present. +Convenience wrapper around `validateEnvVars()` that returns a boolean, +matching the Python `validate_env_vars() -> bool` return type. + +#### Signature + +```typescript +hasAllEnvVars(): boolean +``` + +#### Returns + +`boolean` — `true` if all required env vars are set, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 544. + +*** + +### hasAllPackages + +Check if all required packages declared in the manifest are available. +Convenience wrapper around `validatePackages()` that returns a boolean, +matching the Python `validate_packages() -> bool` return type. + +#### Signature + +```typescript +hasAllPackages(): Promise +``` + +#### Returns + +`Promise` — `true` if all required packages are importable, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 579. + +*** + +### isInitialized + +Check if the skill has been initialized by the SkillManager. + +#### Signature + +```typescript +isInitialized(): boolean +``` + +#### Returns + +`boolean` — True if setup() has completed and the skill is marked initialized. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 507. + +*** + +### markInitialized + +Mark the skill as initialized (called by SkillManager). + +#### Signature + +```typescript +markInitialized(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 514. + +*** + +### setAgent + +Set the agent reference for this skill. +Called by the SkillManager/AgentBase when the skill is attached to an agent. +Python equivalent: `self.agent = agent` in `__init__`. + +#### Signature + +```typescript +setAgent(agent: AgentBase): void +``` + +#### Parameters + + + The agent that owns this skill. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 534. + +*** + +### setup + +Setup the skill. Called when the skill is added to an agent. +Override to perform initialization (API connections, config validation, etc.) + +#### Signature + +```typescript +setup(): Promise +``` + +#### Returns + +`Promise` — `true` if setup succeeded, `false` otherwise. Python equivalent: abstract `setup() -> bool`. + +#### Source + +[`src/skills/builtin/swml_transfer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/swml_transfer.ts) + +Line 167. + +*** + +### updateSkillData + +Update this skill's namespaced data on a FunctionResult via updateGlobalData. + +#### Signature + +```typescript +updateSkillData( + result: FunctionResult, + data: Record +): FunctionResult +``` + +#### Parameters + + + The FunctionResult to update. + + + + The data to store under this skill's namespace. + + +#### Returns + +`FunctionResult` — The FunctionResult for chaining. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 462. + +*** + +### validateEnvVars + +Validate that all required environment variables declared on the skill class +are set in the current process environment. + +Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` +directly. TS reads the same static from the class. + +Returns the list of missing variable names so callers can produce actionable +error messages. This differs from Python's `validate_env_vars() -> bool` +return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/skills/builtin/swml-transfer/swml-transfer-skill#has-all-env-vars) is the boolean equivalent. + +#### Signature + +```typescript +validateEnvVars(): string[] +``` + +#### Returns + +`string[]` — Array of missing environment variable names (empty if all are present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 486. + +*** + +### validatePackages + +Validate that all required packages declared on the skill class can be imported. + +Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` +directly and tries `importlib.import_module(pkg)` for each; TS does the +equivalent with a dynamic `import()`. + +#### Signature + +```typescript +validatePackages(): Promise +``` + +#### Returns + +`Promise` — Array of package names that could not be imported (empty if all present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 557. + +## Source + +[`src/skills/builtin/swml_transfer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/swml_transfer.ts) + +Line 73. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/weather-api/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/weather-api/index.mdx new file mode 100644 index 0000000000..e85e7a3e12 --- /dev/null +++ b/fern/products/sdk-reference/typescript/skills/builtin/weather-api/index.mdx @@ -0,0 +1,62 @@ +--- +slug: "/reference/typescript/skills/builtin/weather-api" +title: "weather_api" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "skills.builtin.weather_api" + module: "skills.builtin" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/weather_api.ts" +--- +# `weather_api` + +## Signature + +```typescript +module weather_api +``` + +## Classes + + + + Fetches current weather data from OpenWeatherMap for any location worldwide. + + + +## Functions + +### createSkill + +Factory function for creating WeatherApiSkill instances. + +#### Signature + +```typescript +createSkill(config?: SkillConfig): WeatherApiSkill +``` + +#### Parameters + + + Optional skill configuration. + + +#### Returns + +`WeatherApiSkill` — A new WeatherApiSkill instance. + +#### Source + +[`src/skills/builtin/weather_api.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/weather_api.ts) + +Line 271. + +## Source + +[`src/skills/builtin/weather_api.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/weather_api.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/weather-api/weather-api-skill/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/weather-api/weather-api-skill/index.mdx new file mode 100644 index 0000000000..6e246ed483 --- /dev/null +++ b/fern/products/sdk-reference/typescript/skills/builtin/weather-api/weather-api-skill/index.mdx @@ -0,0 +1,732 @@ +--- +slug: "/reference/typescript/skills/builtin/weather-api/weather-api-skill" +title: "WeatherApiSkill" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "skills.builtin.weather_api.WeatherApiSkill" + parent: "skills.builtin.weather_api" + module: "skills.builtin.weather_api" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/weather_api.ts" +--- +# `WeatherApiSkill` + +Fetches current weather data from OpenWeatherMap for any location worldwide. + +Tier 2 built-in skill. Requires the `WEATHER_API_KEY` environment variable +containing a valid OpenWeatherMap API key (obtainable at openweathermap.org). +Supports metric, imperial, and standard temperature units via the `units` +config option. The `api_key` config value takes precedence over the +environment variable when both are set. + +**Provider note:** The Python reference SDK uses WeatherAPI.com +(`api.weatherapi.com/v1/current.json`). This TypeScript skill uses +OpenWeatherMap (`api.openweathermap.org/data/2.5/weather`). These providers +use different API key formats — a WeatherAPI.com key will NOT work here. +Obtain an OpenWeatherMap key at https://openweathermap.org/api. + +**Unit aliases:** For migration compatibility with the Python SDK the `units` +config also accepts `"fahrenheit"` (normalized to `"imperial"`) and +`"celsius"` (normalized to `"metric"`). + +## Signature + +```typescript +class WeatherApiSkill extends SkillBase +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/skills/skill-base) + +## Examples + +```typescript +agent.addSkill('weather_api', { units: 'imperial' }); +// or pass the key explicitly: +agent.addSkill('weather_api', { api_key: process.env.WEATHER_API_KEY }); +``` + +## Properties + + + Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. + + + + Configuration options provided at construction time. + + + + Unique identifier for this skill instance (includes timestamp and random bytes). + + + + Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. + + + + Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. + + + + Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. + + + + Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. + + + + Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. + + + + Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. + + + + The registered name of this skill type. + + + + Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. + + + + Additional SWAIG fields extracted from config, merged into tool definitions. + + +## Methods + +### cleanup + +Cleanup resources. Called when the skill is removed from an agent. + +#### Signature + +```typescript +cleanup(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 469. + +*** + +### constructor + +Create a new skill instance. + +Python parity: `core/skill_base.py:32-43`. +Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` +is left as `None` on the subclass. TS throws the equivalent when the static +defaults haven't been overridden. + +#### Signature + +```typescript +constructor(config?: SkillConfig): WeatherApiSkill +``` + +#### Parameters + + + Optional configuration key-value pairs (Python: `params`). + + +#### Returns + +`WeatherApiSkill` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 282. + +*** + +### defineTool + +Imperatively register a tool with this skill. + +Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. +Merges `this.swaigFields` into the tool definition (explicit fields on +`toolDef` take precedence), then pushes the result into `_dynamicTools` +so the default `getTools()` returns it at SWML render time. + +Intended for skills whose tool shape depends on config evaluated at +`setup()` time. Skills with a static tool list should override +`getTools()` instead. + +#### Signature + +```typescript +defineTool(toolDef: SkillToolDefinition): void +``` + +#### Parameters + + + The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 351. + +*** + +### getAgent + +Return the agent that owns this skill, asserting it is non-null. +Equivalent to accessing `self.agent` in Python, where the agent reference +is always set before `setup()` is called. + +The SkillManager lifecycle guarantees that `setAgent()` is called before +`setup()`, so this method is safe to use inside `setup()` and in any +tool handler invoked during an active agent session. + +#### Signature + +```typescript +getAgent(): AgentBase +``` + +#### Returns + +`AgentBase` — The owning `AgentBase` instance. + +#### Throws + +- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 261. + +*** + +### getConfig + +Get a configuration value by key, falling back to a default if not set. + +#### Signature + +```typescript +getConfig(key: string, defaultValue?: T): T +``` + +#### Type Parameters + + + +#### Parameters + + + The configuration key to look up. + + + + Value to return if the key is not present. + + +#### Returns + +`T` — The configuration value cast to type T, or the default value. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 524. + +*** + +### getDataMapTools + +Optional DataMap-style tool definitions. Skills that build their own +SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them +here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. + +Python equivalent: the direct `self.agent.register_swaig_function(fn)` +call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). +Default returns `[]` — skills using only the declarative `getTools()` path +do not need to override this. + +#### Signature + +```typescript +getDataMapTools(): Record[] +``` + +#### Returns + +`Record[]` — Array of fully-built SWAIG function dicts. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 372. + +*** + +### getGlobalData + +Get global data to merge into the agent's global data store. + +#### Signature + +```typescript +getGlobalData(): Record +``` + +#### Returns + +`Record` — Key-value pairs to be merged into the agent's global data. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 410. + +*** + +### getHints + +Get speech recognition hints relevant to this skill. + +#### Signature + +```typescript +getHints(): string[] +``` + +#### Returns + +`string[]` — Array of hint strings to improve speech recognition accuracy. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 402. + +*** + +### getInstanceKey + +Get the instance key used for deduplication in the SkillManager. + +For single-instance skills (`SUPPORTS_MULTIPLE_INSTANCES = false`), returns +the skill name. For multi-instance skills, returns `${skillName}_${toolName}` +using the `tool_name` config (falls back to the skill name). + +Matches Python's `SkillBase.get_instance_key()` default (`skill_base.py:141-146`). +Multi-instance subclasses only need to override when their key derivation +depends on config beyond `tool_name`. + +#### Signature + +```typescript +getInstanceKey(): string +``` + +#### Returns + +`string` — A unique key identifying this skill instance. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 427. + +*** + +### getParameterSchema + +Get the parameter schema for this skill class, describing all accepted configuration options. +Subclasses should override and call `super.getParameterSchema()` to include base parameters. + +Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): +returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a +`tool_name` entry with `default: cls.SKILL_NAME` for classes with +`SUPPORTS_MULTIPLE_INSTANCES = true`. + +**Modifiers:** `static` + +#### Signature + +```typescript +getParameterSchema(): Record +``` + +#### Returns + +`Record` — Record mapping parameter names to their schema entries. + +#### Source + +[`src/skills/builtin/weather_api.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/weather_api.ts) + +Line 93. + +*** + +### getPromptSections + +Get prompt sections to inject into the agent's system prompt. +Respects the `skip_prompt` config option — returns `[]` if set to `true`. +Subclasses should override `_getPromptSections()` instead of this method. + +#### Signature + +```typescript +getPromptSections(): SkillPromptSection[] +``` + +#### Returns + +`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 382. + +*** + +### getSkillData + +Read this skill's data from a raw call data object's global\_data. + +#### Signature + +```typescript +getSkillData(rawData: Record): Record +``` + +#### Parameters + + + The raw request data containing global\_data. + + +#### Returns + +`Record` — The skill's stored data, or an empty object if not found. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 450. + +*** + +### getSkillNamespace + +Get the namespaced key for storing per-skill data in global\_data. + +#### Signature + +```typescript +getSkillNamespace(): string +``` + +#### Returns + +`string` — A string like "skill:datetime" or "skill:my\_prefix". + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 440. + +*** + +### getTools + +#### Signature + +```typescript +getTools(): SkillToolDefinition[] +``` + +#### Returns + +`SkillToolDefinition[]` — A single weather tool (configurable name) that fetches current weather for a location. + +#### Source + +[`src/skills/builtin/weather_api.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/weather_api.ts) + +Line 121. + +*** + +### hasAllEnvVars + +Check if all required environment variables are present. +Convenience wrapper around `validateEnvVars()` that returns a boolean, +matching the Python `validate_env_vars() -> bool` return type. + +#### Signature + +```typescript +hasAllEnvVars(): boolean +``` + +#### Returns + +`boolean` — `true` if all required env vars are set, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 544. + +*** + +### hasAllPackages + +Check if all required packages declared in the manifest are available. +Convenience wrapper around `validatePackages()` that returns a boolean, +matching the Python `validate_packages() -> bool` return type. + +#### Signature + +```typescript +hasAllPackages(): Promise +``` + +#### Returns + +`Promise` — `true` if all required packages are importable, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 579. + +*** + +### isInitialized + +Check if the skill has been initialized by the SkillManager. + +#### Signature + +```typescript +isInitialized(): boolean +``` + +#### Returns + +`boolean` — True if setup() has completed and the skill is marked initialized. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 507. + +*** + +### markInitialized + +Mark the skill as initialized (called by SkillManager). + +#### Signature + +```typescript +markInitialized(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 514. + +*** + +### setAgent + +Set the agent reference for this skill. +Called by the SkillManager/AgentBase when the skill is attached to an agent. +Python equivalent: `self.agent = agent` in `__init__`. + +#### Signature + +```typescript +setAgent(agent: AgentBase): void +``` + +#### Parameters + + + The agent that owns this skill. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 534. + +*** + +### setup + +Validates that an API key is available either via inline config or the +`WEATHER_API_KEY` environment variable. Fails fast (returns `false`) when +neither source provides a key — matching Python SDK behaviour where +`_validate_config()` raises on construction when `api_key` is absent. + +#### Signature + +```typescript +setup(): Promise +``` + +#### Returns + +`Promise` — `true` if a key is present, `false` otherwise. + +#### Source + +[`src/skills/builtin/weather_api.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/weather_api.ts) + +Line 84. + +*** + +### updateSkillData + +Update this skill's namespaced data on a FunctionResult via updateGlobalData. + +#### Signature + +```typescript +updateSkillData( + result: FunctionResult, + data: Record +): FunctionResult +``` + +#### Parameters + + + The FunctionResult to update. + + + + The data to store under this skill's namespace. + + +#### Returns + +`FunctionResult` — The FunctionResult for chaining. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 462. + +*** + +### validateEnvVars + +Validate that all required environment variables declared on the skill class +are set in the current process environment. + +Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` +directly. TS reads the same static from the class. + +Returns the list of missing variable names so callers can produce actionable +error messages. This differs from Python's `validate_env_vars() -> bool` +return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/skills/builtin/weather-api/weather-api-skill#has-all-env-vars) is the boolean equivalent. + +#### Signature + +```typescript +validateEnvVars(): string[] +``` + +#### Returns + +`string[]` — Array of missing environment variable names (empty if all are present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 486. + +*** + +### validatePackages + +Validate that all required packages declared on the skill class can be imported. + +Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` +directly and tries `importlib.import_module(pkg)` for each; TS does the +equivalent with a dynamic `import()`. + +#### Signature + +```typescript +validatePackages(): Promise +``` + +#### Returns + +`Promise` — Array of package names that could not be imported (empty if all present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 557. + +## Source + +[`src/skills/builtin/weather_api.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/weather_api.ts) + +Line 68. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/web-search/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/web-search/index.mdx new file mode 100644 index 0000000000..0e109da668 --- /dev/null +++ b/fern/products/sdk-reference/typescript/skills/builtin/web-search/index.mdx @@ -0,0 +1,62 @@ +--- +slug: "/reference/typescript/skills/builtin/web-search" +title: "web_search" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "skills.builtin.web_search" + module: "skills.builtin" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/web_search.ts" +--- +# `web_search` + +## Signature + +```typescript +module web_search +``` + +## Classes + + + + Searches the web using the Google Custom Search JSON API. + + + +## Functions + +### createSkill + +Factory function for creating WebSearchSkill instances. + +#### Signature + +```typescript +createSkill(config?: SkillConfig): WebSearchSkill +``` + +#### Parameters + + + Optional skill configuration. + + +#### Returns + +`WebSearchSkill` — A new WebSearchSkill instance. + +#### Source + +[`src/skills/builtin/web_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/web_search.ts) + +Line 1351. + +## Source + +[`src/skills/builtin/web_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/web_search.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/web-search/web-search-skill/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/web-search/web-search-skill/index.mdx new file mode 100644 index 0000000000..0381a2b14f --- /dev/null +++ b/fern/products/sdk-reference/typescript/skills/builtin/web-search/web-search-skill/index.mdx @@ -0,0 +1,736 @@ +--- +slug: "/reference/typescript/skills/builtin/web-search/web-search-skill" +title: "WebSearchSkill" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "skills.builtin.web_search.WebSearchSkill" + parent: "skills.builtin.web_search" + module: "skills.builtin.web_search" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/web_search.ts" +--- +# `WebSearchSkill` + +Searches the web using the Google Custom Search JSON API. + +Tier 3 built-in skill. Credentials can be supplied via the `api_key` and +`search_engine_id` params or `GOOGLE_SEARCH_API_KEY` / +`GOOGLE_SEARCH_ENGINE_ID` (legacy: `GOOGLE_SEARCH_CX`) environment variables. + +The handler mirrors Python's `search_and_scrape_best` pipeline: fetches +`oversample_factor × num_results` candidates from Google, scrapes each +result page (SSRF-guarded, cheerio-based text extraction), scores for +quality (length + query relevance + boilerplate penalty), deduplicates by +domain, and returns the top `num_results` above `min_quality_score` with +full page content. If every scrape fails or falls below the threshold the +handler falls back to raw API snippets so the agent still has something +to say. + +Supported config: `tool_name`, `num_results`, `no_results_message`, +`safe_search`, `delay`, `max_content_length`, `oversample_factor`, +`min_quality_score`, `response_prefix`, `response_postfix`, and the +latency-control params `per_page_timeout`, `overall_deadline`, +`parallel_scrape`, `snippets_only` (Python skill.py commits 51101da + +295745b). When the overall deadline fires or no scraped page meets the +quality threshold, the handler falls back to formatting the CSE snippets. + +## Signature + +```typescript +class WebSearchSkill extends SkillBase +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/skills/skill-base) + +## Examples + +```typescript +agent.addSkill('web_search', { + api_key: process.env.GOOGLE_SEARCH_API_KEY, + search_engine_id: process.env.GOOGLE_CSE_ID, + num_results: 3, +}); +``` + +## Properties + + + Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. + + + + Configuration options provided at construction time. + + + + Unique identifier for this skill instance (includes timestamp and random bytes). + + + + Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. + + + + Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. + + + + Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. + + + + Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. + + + + Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. + + + + Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. + + + + The registered name of this skill type. + + + + Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. + + + + Additional SWAIG fields extracted from config, merged into tool definitions. + + +## Methods + +### cleanup + +Cleanup resources. Called when the skill is removed from an agent. + +#### Signature + +```typescript +cleanup(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 469. + +*** + +### constructor + +Create a new skill instance. + +Python parity: `core/skill_base.py:32-43`. +Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` +is left as `None` on the subclass. TS throws the equivalent when the static +defaults haven't been overridden. + +#### Signature + +```typescript +constructor(config?: SkillConfig): WebSearchSkill +``` + +#### Parameters + + + Optional configuration key-value pairs (Python: `params`). + + +#### Returns + +`WebSearchSkill` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 282. + +*** + +### defineTool + +Imperatively register a tool with this skill. + +Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. +Merges `this.swaigFields` into the tool definition (explicit fields on +`toolDef` take precedence), then pushes the result into `_dynamicTools` +so the default `getTools()` returns it at SWML render time. + +Intended for skills whose tool shape depends on config evaluated at +`setup()` time. Skills with a static tool list should override +`getTools()` instead. + +#### Signature + +```typescript +defineTool(toolDef: SkillToolDefinition): void +``` + +#### Parameters + + + The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 351. + +*** + +### getAgent + +Return the agent that owns this skill, asserting it is non-null. +Equivalent to accessing `self.agent` in Python, where the agent reference +is always set before `setup()` is called. + +The SkillManager lifecycle guarantees that `setAgent()` is called before +`setup()`, so this method is safe to use inside `setup()` and in any +tool handler invoked during an active agent session. + +#### Signature + +```typescript +getAgent(): AgentBase +``` + +#### Returns + +`AgentBase` — The owning `AgentBase` instance. + +#### Throws + +- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 261. + +*** + +### getConfig + +Get a configuration value by key, falling back to a default if not set. + +#### Signature + +```typescript +getConfig(key: string, defaultValue?: T): T +``` + +#### Type Parameters + + + +#### Parameters + + + The configuration key to look up. + + + + Value to return if the key is not present. + + +#### Returns + +`T` — The configuration value cast to type T, or the default value. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 524. + +*** + +### getDataMapTools + +Optional DataMap-style tool definitions. Skills that build their own +SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them +here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. + +Python equivalent: the direct `self.agent.register_swaig_function(fn)` +call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). +Default returns `[]` — skills using only the declarative `getTools()` path +do not need to override this. + +#### Signature + +```typescript +getDataMapTools(): Record[] +``` + +#### Returns + +`Record[]` — Array of fully-built SWAIG function dicts. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 372. + +*** + +### getGlobalData + +Global data injected into the agent's SWML context (mirrors Python). + +#### Signature + +```typescript +getGlobalData(): Record +``` + +#### Returns + +`Record` + +#### Source + +[`src/skills/builtin/web_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/web_search.ts) + +Line 399. + +*** + +### getHints + +Get speech recognition hints relevant to this skill. + +#### Signature + +```typescript +getHints(): string[] +``` + +#### Returns + +`string[]` — Array of hint strings to improve speech recognition accuracy. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 402. + +*** + +### getInstanceKey + +Instance key for the SkillManager. Includes the configured +`search_engine_id` (or `"default"`) and `tool_name` (or `"web_search"`) +to match Python's `"{SKILL_NAME}_{search_engine_id}_{tool_name}"` scheme. + +#### Signature + +```typescript +getInstanceKey(): string +``` + +#### Returns + +`string` + +#### Source + +[`src/skills/builtin/web_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/web_search.ts) + +Line 392. + +*** + +### getParameterSchema + +Get the parameter schema for this skill class, describing all accepted configuration options. +Subclasses should override and call `super.getParameterSchema()` to include base parameters. + +Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): +returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a +`tool_name` entry with `default: cls.SKILL_NAME` for classes with +`SUPPORTS_MULTIPLE_INSTANCES = true`. + +**Modifiers:** `static` + +#### Signature + +```typescript +getParameterSchema(): Record +``` + +#### Returns + +`Record` — Record mapping parameter names to their schema entries. + +#### Source + +[`src/skills/builtin/web_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/web_search.ts) + +Line 228. + +*** + +### getPromptSections + +Get prompt sections to inject into the agent's system prompt. +Respects the `skip_prompt` config option — returns `[]` if set to `true`. +Subclasses should override `_getPromptSections()` instead of this method. + +#### Signature + +```typescript +getPromptSections(): SkillPromptSection[] +``` + +#### Returns + +`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 382. + +*** + +### getSkillData + +Read this skill's data from a raw call data object's global\_data. + +#### Signature + +```typescript +getSkillData(rawData: Record): Record +``` + +#### Parameters + + + The raw request data containing global\_data. + + +#### Returns + +`Record` — The skill's stored data, or an empty object if not found. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 450. + +*** + +### getSkillNamespace + +Get the namespaced key for storing per-skill data in global\_data. + +#### Signature + +```typescript +getSkillNamespace(): string +``` + +#### Returns + +`string` — A string like "skill:datetime" or "skill:my\_prefix". + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 440. + +*** + +### getTools + +#### Signature + +```typescript +getTools(): SkillToolDefinition[] +``` + +#### Returns + +`SkillToolDefinition[]` — A single tool (named via `tool_name`) that performs a Google Custom Search and returns formatted results. + +#### Source + +[`src/skills/builtin/web_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/web_search.ts) + +Line 416. + +*** + +### hasAllEnvVars + +Check if all required environment variables are present. +Convenience wrapper around `validateEnvVars()` that returns a boolean, +matching the Python `validate_env_vars() -> bool` return type. + +#### Signature + +```typescript +hasAllEnvVars(): boolean +``` + +#### Returns + +`boolean` — `true` if all required env vars are set, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 544. + +*** + +### hasAllPackages + +Check if all required packages declared in the manifest are available. +Convenience wrapper around `validatePackages()` that returns a boolean, +matching the Python `validate_packages() -> bool` return type. + +#### Signature + +```typescript +hasAllPackages(): Promise +``` + +#### Returns + +`Promise` — `true` if all required packages are importable, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 579. + +*** + +### isInitialized + +Check if the skill has been initialized by the SkillManager. + +#### Signature + +```typescript +isInitialized(): boolean +``` + +#### Returns + +`boolean` — True if setup() has completed and the skill is marked initialized. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 507. + +*** + +### markInitialized + +Mark the skill as initialized (called by SkillManager). + +#### Signature + +```typescript +markInitialized(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 514. + +*** + +### setAgent + +Set the agent reference for this skill. +Called by the SkillManager/AgentBase when the skill is attached to an agent. +Python equivalent: `self.agent = agent` in `__init__`. + +#### Signature + +```typescript +setAgent(agent: AgentBase): void +``` + +#### Parameters + + + The agent that owns this skill. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 534. + +*** + +### setup + +Validate required credentials before the skill becomes active. + +Mirrors Python's `setup()` (skill.py:559-600) which checks `api_key` and +`search_engine_id` and returns `False` (logging an error) if either is +absent. In the TS SDK credentials may also arrive via environment variables +(`GOOGLE_SEARCH_API_KEY` / `GOOGLE_SEARCH_ENGINE_ID` or the legacy alias +`GOOGLE_SEARCH_CX`), so both config params and env vars are checked. + +#### Signature + +```typescript +setup(): Promise +``` + +#### Returns + +`Promise` — `true` if all required credentials are present, `false` otherwise. + +#### Source + +[`src/skills/builtin/web_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/web_search.ts) + +Line 367. + +*** + +### updateSkillData + +Update this skill's namespaced data on a FunctionResult via updateGlobalData. + +#### Signature + +```typescript +updateSkillData( + result: FunctionResult, + data: Record +): FunctionResult +``` + +#### Parameters + + + The FunctionResult to update. + + + + The data to store under this skill's namespace. + + +#### Returns + +`FunctionResult` — The FunctionResult for chaining. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 462. + +*** + +### validateEnvVars + +Validate that all required environment variables declared on the skill class +are set in the current process environment. + +Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` +directly. TS reads the same static from the class. + +Returns the list of missing variable names so callers can produce actionable +error messages. This differs from Python's `validate_env_vars() -> bool` +return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/skills/builtin/web-search/web-search-skill#has-all-env-vars) is the boolean equivalent. + +#### Signature + +```typescript +validateEnvVars(): string[] +``` + +#### Returns + +`string[]` — Array of missing environment variable names (empty if all are present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 486. + +*** + +### validatePackages + +Validate that all required packages declared on the skill class can be imported. + +Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` +directly and tries `importlib.import_module(pkg)` for each; TS does the +equivalent with a dynamic `import()`. + +#### Signature + +```typescript +validatePackages(): Promise +``` + +#### Returns + +`Promise` — Array of package names that could not be imported (empty if all present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 557. + +## Source + +[`src/skills/builtin/web_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/web_search.ts) + +Line 215. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/wikipedia-search/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/wikipedia-search/index.mdx new file mode 100644 index 0000000000..702941dfc4 --- /dev/null +++ b/fern/products/sdk-reference/typescript/skills/builtin/wikipedia-search/index.mdx @@ -0,0 +1,62 @@ +--- +slug: "/reference/typescript/skills/builtin/wikipedia-search" +title: "wikipedia_search" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "skills.builtin.wikipedia_search" + module: "skills.builtin" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/wikipedia_search.ts" +--- +# `wikipedia_search` + +## Signature + +```typescript +module wikipedia_search +``` + +## Classes + + + + Searches Wikipedia for article summaries and extracts. + + + +## Functions + +### createSkill + +Factory function for creating WikipediaSearchSkill instances. + +#### Signature + +```typescript +createSkill(config?: SkillConfig): WikipediaSearchSkill +``` + +#### Parameters + + + Optional skill configuration. + + +#### Returns + +`WikipediaSearchSkill` — A new WikipediaSearchSkill instance. + +#### Source + +[`src/skills/builtin/wikipedia_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/wikipedia_search.ts) + +Line 318. + +## Source + +[`src/skills/builtin/wikipedia_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/wikipedia_search.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/wikipedia-search/wikipedia-search-skill/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/wikipedia-search/wikipedia-search-skill/index.mdx new file mode 100644 index 0000000000..99729d84d9 --- /dev/null +++ b/fern/products/sdk-reference/typescript/skills/builtin/wikipedia-search/wikipedia-search-skill/index.mdx @@ -0,0 +1,758 @@ +--- +slug: "/reference/typescript/skills/builtin/wikipedia-search/wikipedia-search-skill" +title: "WikipediaSearchSkill" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "skills.builtin.wikipedia_search.WikipediaSearchSkill" + parent: "skills.builtin.wikipedia_search" + module: "skills.builtin.wikipedia_search" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/wikipedia_search.ts" +--- +# `WikipediaSearchSkill` + +Searches Wikipedia for article summaries and extracts. + +Tier 3 built-in skill with no external API key required. The configured +`num_results` drives how many articles are aggregated; `no_results_message` +customizes the fallback text (supports `{query}` interpolation). + +## Signature + +```typescript +class WikipediaSearchSkill extends SkillBase +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/skills/skill-base) + +## Examples + +```typescript +agent.addSkill('wikipedia_search', { num_results: 2 }); +``` + +## Properties + + + Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. + + + + Configuration options provided at construction time. + + + + Unique identifier for this skill instance (includes timestamp and random bytes). + + + + Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. + + + + Resolved `no_results_message` template (populated in `setup()`). Protected to mirror Python's `self.no_results_message` public visibility within the class hierarchy. + + + + Resolved `num_results` value (populated in `setup()`). Public to mirror Python's `self.num_results` — accessible to subclasses and external test code inspecting skill state. + + + + Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. + + + + Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. + + + + Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. + + + + Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. + + + + Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. + + + + The registered name of this skill type. + + + + Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. + + + + Additional SWAIG fields extracted from config, merged into tool definitions. + + +## Methods + +### cleanup + +Cleanup resources. Called when the skill is removed from an agent. + +#### Signature + +```typescript +cleanup(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 469. + +*** + +### constructor + +Create a new skill instance. + +Python parity: `core/skill_base.py:32-43`. +Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` +is left as `None` on the subclass. TS throws the equivalent when the static +defaults haven't been overridden. + +#### Signature + +```typescript +constructor(config?: SkillConfig): WikipediaSearchSkill +``` + +#### Parameters + + + Optional configuration key-value pairs (Python: `params`). + + +#### Returns + +`WikipediaSearchSkill` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 282. + +*** + +### defineTool + +Imperatively register a tool with this skill. + +Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. +Merges `this.swaigFields` into the tool definition (explicit fields on +`toolDef` take precedence), then pushes the result into `_dynamicTools` +so the default `getTools()` returns it at SWML render time. + +Intended for skills whose tool shape depends on config evaluated at +`setup()` time. Skills with a static tool list should override +`getTools()` instead. + +#### Signature + +```typescript +defineTool(toolDef: SkillToolDefinition): void +``` + +#### Parameters + + + The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 351. + +*** + +### getAgent + +Return the agent that owns this skill, asserting it is non-null. +Equivalent to accessing `self.agent` in Python, where the agent reference +is always set before `setup()` is called. + +The SkillManager lifecycle guarantees that `setAgent()` is called before +`setup()`, so this method is safe to use inside `setup()` and in any +tool handler invoked during an active agent session. + +#### Signature + +```typescript +getAgent(): AgentBase +``` + +#### Returns + +`AgentBase` — The owning `AgentBase` instance. + +#### Throws + +- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 261. + +*** + +### getConfig + +Get a configuration value by key, falling back to a default if not set. + +#### Signature + +```typescript +getConfig(key: string, defaultValue?: T): T +``` + +#### Type Parameters + + + +#### Parameters + + + The configuration key to look up. + + + + Value to return if the key is not present. + + +#### Returns + +`T` — The configuration value cast to type T, or the default value. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 524. + +*** + +### getDataMapTools + +Optional DataMap-style tool definitions. Skills that build their own +SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them +here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. + +Python equivalent: the direct `self.agent.register_swaig_function(fn)` +call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). +Default returns `[]` — skills using only the declarative `getTools()` path +do not need to override this. + +#### Signature + +```typescript +getDataMapTools(): Record[] +``` + +#### Returns + +`Record[]` — Array of fully-built SWAIG function dicts. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 372. + +*** + +### getGlobalData + +Get global data to merge into the agent's global data store. + +#### Signature + +```typescript +getGlobalData(): Record +``` + +#### Returns + +`Record` — Key-value pairs to be merged into the agent's global data. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 410. + +*** + +### getHints + +Get speech recognition hints relevant to this skill. + +#### Signature + +```typescript +getHints(): string[] +``` + +#### Returns + +`string[]` — Array of hint strings to improve speech recognition accuracy. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 402. + +*** + +### getInstanceKey + +Get the instance key used for deduplication in the SkillManager. + +For single-instance skills (`SUPPORTS_MULTIPLE_INSTANCES = false`), returns +the skill name. For multi-instance skills, returns `${skillName}_${toolName}` +using the `tool_name` config (falls back to the skill name). + +Matches Python's `SkillBase.get_instance_key()` default (`skill_base.py:141-146`). +Multi-instance subclasses only need to override when their key derivation +depends on config beyond `tool_name`. + +#### Signature + +```typescript +getInstanceKey(): string +``` + +#### Returns + +`string` — A unique key identifying this skill instance. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 427. + +*** + +### getParameterSchema + +Get the parameter schema for this skill class, describing all accepted configuration options. +Subclasses should override and call `super.getParameterSchema()` to include base parameters. + +Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): +returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a +`tool_name` entry with `default: cls.SKILL_NAME` for classes with +`SUPPORTS_MULTIPLE_INSTANCES = true`. + +**Modifiers:** `static` + +#### Signature + +```typescript +getParameterSchema(): Record +``` + +#### Returns + +`Record` — Record mapping parameter names to their schema entries. + +#### Source + +[`src/skills/builtin/wikipedia_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/wikipedia_search.ts) + +Line 79. + +*** + +### getPromptSections + +Get prompt sections to inject into the agent's system prompt. +Respects the `skip_prompt` config option — returns `[]` if set to `true`. +Subclasses should override `_getPromptSections()` instead of this method. + +#### Signature + +```typescript +getPromptSections(): SkillPromptSection[] +``` + +#### Returns + +`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 382. + +*** + +### getSkillData + +Read this skill's data from a raw call data object's global\_data. + +#### Signature + +```typescript +getSkillData(rawData: Record): Record +``` + +#### Parameters + + + The raw request data containing global\_data. + + +#### Returns + +`Record` — The skill's stored data, or an empty object if not found. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 450. + +*** + +### getSkillNamespace + +Get the namespaced key for storing per-skill data in global\_data. + +#### Signature + +```typescript +getSkillNamespace(): string +``` + +#### Returns + +`string` — A string like "skill:datetime" or "skill:my\_prefix". + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 440. + +*** + +### getTools + +#### Signature + +```typescript +getTools(): SkillToolDefinition[] +``` + +#### Returns + +`SkillToolDefinition[]` — A `search_wiki` tool that fetches article summaries from Wikipedia. + +#### Source + +[`src/skills/builtin/wikipedia_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/wikipedia_search.ts) + +Line 122. + +*** + +### hasAllEnvVars + +Check if all required environment variables are present. +Convenience wrapper around `validateEnvVars()` that returns a boolean, +matching the Python `validate_env_vars() -> bool` return type. + +#### Signature + +```typescript +hasAllEnvVars(): boolean +``` + +#### Returns + +`boolean` — `true` if all required env vars are set, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 544. + +*** + +### hasAllPackages + +Check if all required packages declared in the manifest are available. +Convenience wrapper around `validatePackages()` that returns a boolean, +matching the Python `validate_packages() -> bool` return type. + +#### Signature + +```typescript +hasAllPackages(): Promise +``` + +#### Returns + +`Promise` — `true` if all required packages are importable, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 579. + +*** + +### isInitialized + +Check if the skill has been initialized by the SkillManager. + +#### Signature + +```typescript +isInitialized(): boolean +``` + +#### Returns + +`boolean` — True if setup() has completed and the skill is marked initialized. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 507. + +*** + +### markInitialized + +Mark the skill as initialized (called by SkillManager). + +#### Signature + +```typescript +markInitialized(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 514. + +*** + +### searchWiki + +Search Wikipedia and return a formatted text summary. + +Mirrors the Python `search_wiki()` public entry point so the logic can be +tested and reused outside the SWAIG handler. Uses `num_results` to decide +how many articles to aggregate. + +#### Signature + +```typescript +searchWiki(query: string): Promise +``` + +#### Parameters + + + Plain-text search term. + + +#### Returns + +`Promise` — Formatted text ready for display to the caller. + +#### Source + +[`src/skills/builtin/wikipedia_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/wikipedia_search.ts) + +Line 166. + +*** + +### setAgent + +Set the agent reference for this skill. +Called by the SkillManager/AgentBase when the skill is attached to an agent. +Python equivalent: `self.agent = agent` in `__init__`. + +#### Signature + +```typescript +setAgent(agent: AgentBase): void +``` + +#### Parameters + + + The agent that owns this skill. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 534. + +*** + +### setup + +Extract config values into instance state. Enforces `num_results >= 1` +(matching Python `skill.py:_setup` `max(1, ...)` floor). The schema's +`max: 5` handles the upper bound at validation time — no runtime clamp +here, so callers passing larger values get the raw value as in Python. + +#### Signature + +```typescript +setup(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/skills/builtin/wikipedia_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/wikipedia_search.ts) + +Line 103. + +*** + +### updateSkillData + +Update this skill's namespaced data on a FunctionResult via updateGlobalData. + +#### Signature + +```typescript +updateSkillData( + result: FunctionResult, + data: Record +): FunctionResult +``` + +#### Parameters + + + The FunctionResult to update. + + + + The data to store under this skill's namespace. + + +#### Returns + +`FunctionResult` — The FunctionResult for chaining. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 462. + +*** + +### validateEnvVars + +Validate that all required environment variables declared on the skill class +are set in the current process environment. + +Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` +directly. TS reads the same static from the class. + +Returns the list of missing variable names so callers can produce actionable +error messages. This differs from Python's `validate_env_vars() -> bool` +return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/skills/builtin/wikipedia-search/wikipedia-search-skill#has-all-env-vars) is the boolean equivalent. + +#### Signature + +```typescript +validateEnvVars(): string[] +``` + +#### Returns + +`string[]` — Array of missing environment variable names (empty if all are present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 486. + +*** + +### validatePackages + +Validate that all required packages declared on the skill class can be imported. + +Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` +directly and tries `importlib.import_module(pkg)` for each; TS does the +equivalent with a dynamic `import()`. + +#### Signature + +```typescript +validatePackages(): Promise +``` + +#### Returns + +`Promise` — Array of package names that could not be imported (empty if all present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 557. + +## Source + +[`src/skills/builtin/wikipedia_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/wikipedia_search.ts) + +Line 55. diff --git a/fern/products/sdk-reference/typescript/skills/index.mdx b/fern/products/sdk-reference/typescript/skills/index.mdx new file mode 100644 index 0000000000..554e849068 --- /dev/null +++ b/fern/products/sdk-reference/typescript/skills/index.mdx @@ -0,0 +1,25 @@ +--- +slug: "/reference/typescript/skills" +title: "skills" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "skills" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/index.ts" +--- +# `skills` + +## Signature + +```typescript +module skills +``` + +## Source + +[`src/skills/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/index.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/skills/skill-base/index.mdx b/fern/products/sdk-reference/typescript/skills/skill-base/index.mdx new file mode 100644 index 0000000000..acec9a87d5 --- /dev/null +++ b/fern/products/sdk-reference/typescript/skills/skill-base/index.mdx @@ -0,0 +1,930 @@ +--- +slug: "/reference/typescript/skills/skill-base" +title: "SkillBase" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "skills.SkillBase" + module: "skills" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts" +--- +# `SkillBase` + +Abstract base class for agent skills. + +Skills are modular, reusable capabilities that plug into an [AgentBase](/docs/sdk-reference/reference/typescript/agent-base). +A single skill can contribute: + +- **Tools** (SWAIG functions) via `getTools()` or `defineTool()` +- **Prompt sections** via `_getPromptSections()` +- **Speech hints** via `getHints()` +- **Global data** seeded into each call via `getGlobalData()` + +Skills are added to an agent with `agent.addSkill('name', config)` and the +[SkillManager](/docs/sdk-reference/reference/typescript/skills/skill-manager) calls `setAgent()` + `setup()` in sequence before the +agent starts serving requests. + +**Modifiers:** `abstract` + +## Signature + +```typescript +class SkillBase +``` + +## Examples + +```typescript +import { SkillBase, FunctionResult, type SkillToolDefinition } from '@signalwire/sdk'; + +export class GreetingSkill extends SkillBase { + static override SKILL_NAME = 'greeting'; + static override SKILL_DESCRIPTION = 'Responds with a configurable greeting.'; + + override getTools(): SkillToolDefinition[] { + return [{ + name: 'say_hello', + description: 'Say a friendly hello.', + parameters: { type: 'object', properties: {} }, + handler: () => new FunctionResult(this.getConfig('message', 'Hi!')), + }]; + } +} + +// In your agent: +agent.addSkill(new GreetingSkill({ message: 'Howdy!' })); +``` + +## See Also + +- \- \[SkillManager]\(/docs/sdk-reference/reference/typescript/skills/skill-manager) + \- \[SkillRegistry]\(/docs/sdk-reference/reference/typescript/skills/skill-registry) + \- \[AgentBase.addSkill]\(/docs/sdk-reference/reference/typescript/agent-base#add-skill) + +## Properties + + + Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. + + + + Configuration options provided at construction time. + + + + Unique identifier for this skill instance (includes timestamp and random bytes). + + + + Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. + + + + Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. + + + + Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. + + + + Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. + + + + Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. + + + + Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. + + + + The registered name of this skill type. + + + + Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. + + + + Additional SWAIG fields extracted from config, merged into tool definitions. + + +## Methods + +### cleanup + +Cleanup resources. Called when the skill is removed from an agent. + +#### Signature + +```typescript +cleanup(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 469. + +*** + +### constructor + +Create a new skill instance. + +Python parity: `core/skill_base.py:32-43`. +Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` +is left as `None` on the subclass. TS throws the equivalent when the static +defaults haven't been overridden. + +#### Signature + +```typescript +constructor(config?: SkillConfig): SkillBase +``` + +#### Parameters + + + Optional configuration key-value pairs (Python: `params`). + + +#### Returns + +`SkillBase` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 282. + +*** + +### defineTool + +Imperatively register a tool with this skill. + +Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. +Merges `this.swaigFields` into the tool definition (explicit fields on +`toolDef` take precedence), then pushes the result into `_dynamicTools` +so the default `getTools()` returns it at SWML render time. + +Intended for skills whose tool shape depends on config evaluated at +`setup()` time. Skills with a static tool list should override +`getTools()` instead. + +#### Signature + +```typescript +defineTool(toolDef: SkillToolDefinition): void +``` + +#### Parameters + + + The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 351. + +*** + +### getAgent + +Return the agent that owns this skill, asserting it is non-null. +Equivalent to accessing `self.agent` in Python, where the agent reference +is always set before `setup()` is called. + +The SkillManager lifecycle guarantees that `setAgent()` is called before +`setup()`, so this method is safe to use inside `setup()` and in any +tool handler invoked during an active agent session. + +#### Signature + +```typescript +getAgent(): AgentBase +``` + +#### Returns + +`AgentBase` — The owning `AgentBase` instance. + +#### Throws + +- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 261. + +*** + +### getConfig + +Get a configuration value by key, falling back to a default if not set. + +#### Signature + +```typescript +getConfig(key: string, defaultValue?: T): T +``` + +#### Type Parameters + + + +#### Parameters + + + The configuration key to look up. + + + + Value to return if the key is not present. + + +#### Returns + +`T` — The configuration value cast to type T, or the default value. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 524. + +*** + +### getDataMapTools + +Optional DataMap-style tool definitions. Skills that build their own +SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them +here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. + +Python equivalent: the direct `self.agent.register_swaig_function(fn)` +call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). +Default returns `[]` — skills using only the declarative `getTools()` path +do not need to override this. + +#### Signature + +```typescript +getDataMapTools(): Record[] +``` + +#### Returns + +`Record[]` — Array of fully-built SWAIG function dicts. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 372. + +*** + +### getGlobalData + +Get global data to merge into the agent's global data store. + +#### Signature + +```typescript +getGlobalData(): Record +``` + +#### Returns + +`Record` — Key-value pairs to be merged into the agent's global data. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 410. + +*** + +### getHints + +Get speech recognition hints relevant to this skill. + +#### Signature + +```typescript +getHints(): string[] +``` + +#### Returns + +`string[]` — Array of hint strings to improve speech recognition accuracy. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 402. + +*** + +### getInstanceKey + +Get the instance key used for deduplication in the SkillManager. + +For single-instance skills (`SUPPORTS_MULTIPLE_INSTANCES = false`), returns +the skill name. For multi-instance skills, returns `${skillName}_${toolName}` +using the `tool_name` config (falls back to the skill name). + +Matches Python's `SkillBase.get_instance_key()` default (`skill_base.py:141-146`). +Multi-instance subclasses only need to override when their key derivation +depends on config beyond `tool_name`. + +#### Signature + +```typescript +getInstanceKey(): string +``` + +#### Returns + +`string` — A unique key identifying this skill instance. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 427. + +*** + +### getParameterSchema + +Get the parameter schema for this skill class, describing all accepted configuration options. +Subclasses should override and call `super.getParameterSchema()` to include base parameters. + +Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): +returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a +`tool_name` entry with `default: cls.SKILL_NAME` for classes with +`SUPPORTS_MULTIPLE_INSTANCES = true`. + +**Modifiers:** `static` + +#### Signature + +```typescript +getParameterSchema(): Record +``` + +#### Returns + +`Record` — Record mapping parameter names to their schema entries. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 183. + +*** + +### getPromptSections + +Get prompt sections to inject into the agent's system prompt. +Respects the `skip_prompt` config option — returns `[]` if set to `true`. +Subclasses should override `_getPromptSections()` instead of this method. + +#### Signature + +```typescript +getPromptSections(): SkillPromptSection[] +``` + +#### Returns + +`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 382. + +*** + +### getSkillData + +Read this skill's data from a raw call data object's global\_data. + +#### Signature + +```typescript +getSkillData(rawData: Record): Record +``` + +#### Parameters + + + The raw request data containing global\_data. + + +#### Returns + +`Record` — The skill's stored data, or an empty object if not found. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 450. + +*** + +### getSkillNamespace + +Get the namespaced key for storing per-skill data in global\_data. + +#### Signature + +```typescript +getSkillNamespace(): string +``` + +#### Returns + +`string` — A string like "skill:datetime" or "skill:my\_prefix". + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 440. + +*** + +### getTools + +Return the SWAIG tool definitions this skill provides. + +Default implementation returns tools registered imperatively via +`defineTool()`. Skills using the declarative pattern override this +method to return a static array built from their config. + +Python parity: replaces the `@abstractmethod register_tools()` contract +— Python skills call `self.define_tool(...)` inside `register_tools()`; +TypeScript skills either call `this.defineTool(...)` in `setup()` (and +let the default `getTools()` return them) or override `getTools()` +directly. + +#### Signature + +```typescript +getTools(): SkillToolDefinition[] +``` + +#### Returns + +`SkillToolDefinition[]` — Array of tool definitions to register with the agent. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 332. + +*** + +### hasAllEnvVars + +Check if all required environment variables are present. +Convenience wrapper around `validateEnvVars()` that returns a boolean, +matching the Python `validate_env_vars() -> bool` return type. + +#### Signature + +```typescript +hasAllEnvVars(): boolean +``` + +#### Returns + +`boolean` — `true` if all required env vars are set, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 544. + +*** + +### hasAllPackages + +Check if all required packages declared in the manifest are available. +Convenience wrapper around `validatePackages()` that returns a boolean, +matching the Python `validate_packages() -> bool` return type. + +#### Signature + +```typescript +hasAllPackages(): Promise +``` + +#### Returns + +`Promise` — `true` if all required packages are importable, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 579. + +*** + +### isInitialized + +Check if the skill has been initialized by the SkillManager. + +#### Signature + +```typescript +isInitialized(): boolean +``` + +#### Returns + +`boolean` — True if setup() has completed and the skill is marked initialized. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 507. + +*** + +### markInitialized + +Mark the skill as initialized (called by SkillManager). + +#### Signature + +```typescript +markInitialized(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 514. + +*** + +### setAgent + +Set the agent reference for this skill. +Called by the SkillManager/AgentBase when the skill is attached to an agent. +Python equivalent: `self.agent = agent` in `__init__`. + +#### Signature + +```typescript +setAgent(agent: AgentBase): void +``` + +#### Parameters + + + The agent that owns this skill. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 534. + +*** + +### setup + +Setup the skill. Called when the skill is added to an agent. +Override to perform initialization (API connections, config validation, etc.) + +#### Signature + +```typescript +setup(): Promise +``` + +#### Returns + +`Promise` — `true` if setup succeeded, `false` otherwise. Python equivalent: abstract `setup() -> bool`. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 313. + +*** + +### updateSkillData + +Update this skill's namespaced data on a FunctionResult via updateGlobalData. + +#### Signature + +```typescript +updateSkillData( + result: FunctionResult, + data: Record +): FunctionResult +``` + +#### Parameters + + + The FunctionResult to update. + + + + The data to store under this skill's namespace. + + +#### Returns + +`FunctionResult` — The FunctionResult for chaining. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 462. + +*** + +### validateEnvVars + +Validate that all required environment variables declared on the skill class +are set in the current process environment. + +Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` +directly. TS reads the same static from the class. + +Returns the list of missing variable names so callers can produce actionable +error messages. This differs from Python's `validate_env_vars() -> bool` +return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/skills/skill-base#has-all-env-vars) is the boolean equivalent. + +#### Signature + +```typescript +validateEnvVars(): string[] +``` + +#### Returns + +`string[]` — Array of missing environment variable names (empty if all are present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 486. + +*** + +### validatePackages + +Validate that all required packages declared on the skill class can be imported. + +Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` +directly and tries `importlib.import_module(pkg)` for each; TS does the +equivalent with a dynamic `import()`. + +#### Signature + +```typescript +validatePackages(): Promise +``` + +#### Returns + +`Promise` — Array of package names that could not be imported (empty if all present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 557. + +## Interfaces + +### ParameterSchemaEntry + +Schema entry describing a single skill configuration parameter. + +#### Signature + +```typescript +interface ParameterSchemaEntry +``` + +#### Properties + + + Default value used when the parameter is not provided. + + + + Human-readable description of the parameter. + + + + Allowed values for the parameter. + + + + Environment variable that can supply this parameter's value. + + + + Whether the parameter should be hidden from user-facing output (e.g., API keys). + + + + Item schema for array-type parameters. + + + + Maximum value (for numeric types). + + + + Minimum value (for numeric types). + + + + Whether the parameter must be supplied. + + + + JSON Schema type of the parameter value. + + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 61. + +*** + +### SkillConfig + +Configuration key-value pairs passed to a skill at construction time. + +#### Signature + +```typescript +interface SkillConfig +``` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 15. + +*** + +### SkillPromptSection + +A section of prompt content injected into the agent's system prompt by a skill. + +#### Signature + +```typescript +interface SkillPromptSection +``` + +#### Properties + + + Optional body text for the section. + + + + Optional bullet points appended after the body. + + + + If true, render bullets as a numbered list instead of unordered. + + + + Section heading displayed in the prompt. + + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 49. + +*** + +### SkillToolDefinition + +Definition of a SWAIG tool provided by a skill. + +#### Signature + +```typescript +interface SkillToolDefinition +``` + +#### Properties + + + Human-readable description of what the tool does, shown to the AI. + + + + Filler phrases spoken while the tool executes, keyed by language. + + + + Handler function invoked when the tool is called. + + + + When true, the SignalWire platform automatically invokes this tool when the call ends (hangup), regardless of whether the AI explicitly calls it. Equivalent to Python's `is_hangup_hook=True` in `define_tool()`. The flag is serialised as `"is_hangup_hook": true` in the SWAIG JSON. + + + + Unique tool name used in SWAIG function registration. + + + + Parameter schema for the tool, keyed by parameter name. + + + + List of parameter names that are required. + + + + Whether the tool requires secure (authenticated) invocation. + + + + If true, suppress filler phrases while the tool executes. + + + + If true, wait for any in-flight fillers to complete before executing the tool. + + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 20. + +## Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 125. diff --git a/fern/products/sdk-reference/typescript/skills/skill-manager/index.mdx b/fern/products/sdk-reference/typescript/skills/skill-manager/index.mdx new file mode 100644 index 0000000000..eca7d252c3 --- /dev/null +++ b/fern/products/sdk-reference/typescript/skills/skill-manager/index.mdx @@ -0,0 +1,531 @@ +--- +slug: "/reference/typescript/skills/skill-manager" +title: "SkillManager" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "skills.SkillManager" + module: "skills" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillManager.ts" +--- +# `SkillManager` + +Manages the lifecycle of skills attached to an agent. + +Handles loading, unloading, validation, and aggregation of skill tools, +hints, global data, and prompt sections. + +**Remarks:** **Architectural note — push vs pull model:** +Python's `SkillManager.__init__(self, agent)` stores the agent reference and +uses a **push model**: when a skill is loaded via `load_skill()`, the manager +immediately calls `agent.add_hints()`, `agent.update_global_data()`, and +`agent.prompt_add_section()` to inject skill data into the agent. + +This TypeScript implementation uses a **pull model** instead: `SkillManager` +has no agent reference and no constructor. `AgentBase` owns the manager and +calls `getAllHints()`, `getMergedGlobalData()`, and `getAllPromptSections()` +at render time. Both approaches produce the same observable behavior at the +SWML / SWAIG level. The pull model avoids circular-reference issues between +`AgentBase` and `SkillManager` and is better suited to TypeScript's +import-graph constraints. + +## Signature + +```typescript +class SkillManager +``` + +## Properties + + + Public read-only view of all loaded skill instances, keyed by instance key. Python equivalent: `self.loaded_skills` (public `Dict[str, SkillBase]`). Use this to iterate or inspect loaded skills without mutating the internal map. + + + + Get the number of currently loaded skill instances. + + +## Methods + +### addSkill + +Add a skill to the manager, validating env vars and calling setup(). +Uses the skill's instance key for deduplication. + +[loadSkill](/docs/sdk-reference/reference/typescript/skills/skill-manager#load-skill) / [loadSkillByName](/docs/sdk-reference/reference/typescript/skills/skill-manager#load-skill-by-name) wrap this and catch to return +`[false, msg]`, matching Python `load_skill`'s return contract +(`skill_manager.py` lines 114-118). + +#### Signature + +```typescript +addSkill(skill: SkillBase): Promise +``` + +#### Parameters + + + The skill instance to add. + + +#### Returns + +`Promise` — Resolves once the skill is registered. + +#### Throws + +- When a single-instance skill is already loaded, its required environment variables are missing, its parameter schema is empty, its required packages cannot be imported, or `setup()` returns `false`. + +#### Source + +[`src/skills/SkillManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillManager.ts) + +Line 74. + +*** + +### clear + +Remove all skills and clean up. + +#### Signature + +```typescript +clear(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/skills/SkillManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillManager.ts) + +Line 412. + +*** + +### constructor + +#### Signature + +```typescript +constructor(): SkillManager +``` + +#### Returns + +`SkillManager` + +*** + +### getAllHints + +Aggregate speech recognition hints from all loaded skills. + +#### Signature + +```typescript +getAllHints(): string[] +``` + +#### Returns + +`string[]` — Combined array of all skill hint strings. + +#### Source + +[`src/skills/SkillManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillManager.ts) + +Line 369. + +*** + +### getAllPromptSections + +Aggregate prompt sections from all loaded skills. + +#### Signature + +```typescript +getAllPromptSections(): SkillPromptSection[] +``` + +#### Returns + +`SkillPromptSection[]` — Combined array of all skill prompt sections. + +#### Source + +[`src/skills/SkillManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillManager.ts) + +Line 357. + +*** + +### getAllTools + +Aggregate tool definitions from all loaded skills. + +#### Signature + +```typescript +getAllTools(): SkillToolDefinition[] +``` + +#### Returns + +`SkillToolDefinition[]` — Combined array of all skill tool definitions. + +#### Source + +[`src/skills/SkillManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillManager.ts) + +Line 345. + +*** + +### getLoadedSkillEntries + +Get metadata for all loaded skills, enabling ephemeral copy re-instantiation. + +#### Signature + +```typescript +getLoadedSkillEntries(): { config: SkillConfig; SkillClass: typeof SkillBase; skillName: string }[] +``` + +#### Returns + +`{ config: SkillConfig; SkillClass: typeof SkillBase; skillName: string }[]` — Array of entries containing skill name, class constructor, and config. + +#### Source + +[`src/skills/SkillManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillManager.ts) + +Line 401. + +*** + +### getMergedGlobalData + +Merge global data from all loaded skills into a single object. + +#### Signature + +```typescript +getMergedGlobalData(): Record +``` + +#### Returns + +`Record` — Combined global data (later skills override earlier ones on key conflicts). + +#### Source + +[`src/skills/SkillManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillManager.ts) + +Line 381. + +*** + +### getSkill + +Get a skill by its instance key or instance ID. + +#### Signature + +```typescript +getSkill(keyOrId: string): SkillBase | undefined +``` + +#### Parameters + + + The instance key or instance ID to look up. + + +#### Returns + +`SkillBase | undefined` — The skill instance, or undefined if not found. + +#### Source + +[`src/skills/SkillManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillManager.ts) + +Line 319. + +*** + +### hasSkill + +Check if any skill instance with the given name is currently loaded. + +#### Signature + +```typescript +hasSkill(skillName: string): boolean +``` + +#### Parameters + + + The skill name to check for. + + +#### Returns + +`boolean` — True if at least one instance with this name is loaded. + +#### Source + +[`src/skills/SkillManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillManager.ts) + +Line 196. + +*** + +### hasSkillByKey + +Check if a skill with the given instance key is currently loaded. +This matches Python's `has_skill` semantics, which performs a direct +dictionary key lookup (`skill_identifier in self.loaded_skills`). + +Use `hasSkill(name)` to check by skill name (iterates values). +Use `hasSkillByKey(key)` to check by instance key (direct map lookup). + +**Remarks:** Equivalent to Python's `has_skill(skill_identifier)`. Callers porting +from Python should change `skill_manager.has_skill(key)` → +`skillManager.hasSkillByKey(key)`. + +#### Signature + +```typescript +hasSkillByKey(instanceKey: string): boolean +``` + +#### Parameters + + + The instance key to look up. + + +#### Returns + +`boolean` — True if a skill with this exact instance key is loaded. + +#### Source + +[`src/skills/SkillManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillManager.ts) + +Line 218. + +*** + +### listSkillKeys + +List the instance keys of all currently loaded skills. +Python equivalent: `list_loaded_skills() -> List[str]` which returns +`list(self.loaded_skills.keys())`. + +Use `listSkills()` for richer objects (name, instanceId, initialized). +Use `listSkillKeys()` for a flat list of instance key strings. + +**Remarks:** Equivalent to Python's `list_loaded_skills()`. Callers porting from +Python should change `skill_manager.list_loaded_skills()` → +`skillManager.listSkillKeys()`. + +#### Signature + +```typescript +listSkillKeys(): string[] +``` + +#### Returns + +`string[]` — Array of instance key strings. + +#### Source + +[`src/skills/SkillManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillManager.ts) + +Line 310. + +*** + +### listSkills + +List all loaded skill instances with their name, ID, and initialization state. + +#### Signature + +```typescript +listSkills(): { initialized: boolean; instanceId: string; name: string }[] +``` + +#### Returns + +`{ initialized: boolean; instanceId: string; name: string }[]` — Array of skill summary objects. + +#### Source + +[`src/skills/SkillManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillManager.ts) + +Line 333. + +*** + +### loadSkill + +Load a skill by providing the class constructor directly, bypassing the registry. +This is the TypeScript equivalent of Python's `load_skill(skill_name, skill_class, params)` +path where a caller-provided `skill_class` is used instead of a registry lookup. + +**Remarks:** Equivalent to Python's `load_skill(skill_name, skill_class=MySkillClass, params)`. + +#### Signature + +```typescript +loadSkill( + skillClass: typeof SkillBase, + config?: SkillConfig +): Promise<[boolean, string]> +``` + +#### Parameters + + + The skill class constructor (a subclass of `SkillBase`). + + + + Optional configuration to pass to the skill constructor. + + +#### Returns + +`Promise<[boolean, string]>` — A tuple `[success, errorMessage]` matching Python's `load_skill` return contract. `errorMessage` is an empty string on success. + +#### Examples + +```typescript +const [ok, err] = await manager.loadSkill(MyCustomSkill, { api_key: 'secret' }); +if (!ok) console.error(err); +``` + +#### Source + +[`src/skills/SkillManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillManager.ts) + +Line 240. + +*** + +### loadSkillByName + +Load a skill by name from the global SkillRegistry, construct it, and add it. +This is the TypeScript equivalent of Python's `load_skill(skill_name)` path +where `skill_class=None` triggers a registry lookup. + +**Remarks:** Equivalent to Python's `load_skill(skill_name)` (registry path, where +`skill_class=None`). Callers porting from Python should change +`skill_manager.load_skill(name)` → `skillManager.loadSkillByName(name)`. + +#### Signature + +```typescript +loadSkillByName( + skillName: string, + config?: SkillConfig +): Promise<[boolean, string]> +``` + +#### Parameters + + + The registered skill name to look up in the SkillRegistry. + + + + Optional configuration to pass to the skill factory. + + +#### Returns + +`Promise<[boolean, string]>` — A tuple `[success, errorMessage]` matching Python's `load_skill` return contract. `errorMessage` is an empty string on success. + +#### Source + +[`src/skills/SkillManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillManager.ts) + +Line 270. + +*** + +### removeSkill + +Remove a skill by its instance key or instance ID, calling cleanup() before removal. + +**Remarks:** Equivalent to Python's `unload_skill(skill_identifier)`. Callers porting +from Python should change `skill_manager.unload_skill(id)` → +`skillManager.removeSkill(id)`. + +#### Signature + +```typescript +removeSkill(keyOrId: string): Promise +``` + +#### Parameters + + + The instance key or instance ID of the skill to remove. + + +#### Returns + +`Promise` — True if the skill was found and removed, false otherwise. + +#### Source + +[`src/skills/SkillManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillManager.ts) + +Line 148. + +*** + +### removeSkillByName + +Remove all skill instances matching a given skill name. + +#### Signature + +```typescript +removeSkillByName(skillName: string): Promise +``` + +#### Parameters + + + The skill name to match against. + + +#### Returns + +`Promise` — The number of skill instances removed. + +#### Source + +[`src/skills/SkillManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillManager.ts) + +Line 178. + +## Source + +[`src/skills/SkillManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillManager.ts) + +Line 45. diff --git a/fern/products/sdk-reference/typescript/skills/skill-name/index.mdx b/fern/products/sdk-reference/typescript/skills/skill-name/index.mdx new file mode 100644 index 0000000000..3fbd7487ea --- /dev/null +++ b/fern/products/sdk-reference/typescript/skills/skill-name/index.mdx @@ -0,0 +1,93 @@ +--- +slug: "/reference/typescript/skills/skill-name" +title: "SkillName" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "skills.SkillName" + module: "skills" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillName.ts" +--- +# `SkillName` + +## Signature + +```typescript +module SkillName +``` + +## Type Aliases + +### SkillName + +Built-in skill names as a typed, compile-time-checked closed set. + +The 19 names below are exactly the `SKILL_NAME` declared by each built-in +skill class in `src/skills/builtin/` (the same set +[registerBuiltinSkills](/docs/sdk-reference/reference/typescript/skills/builtin#register-builtin-skills) locks into the global `SkillRegistry`). + +[AgentBase.addSkillByName](/docs/sdk-reference/reference/typescript/agent-base#add-skill-by-name) and [AgentBase.hasSkill](/docs/sdk-reference/reference/typescript/agent-base#has-skill) accept this +union OR any string (`SkillName | (string & {})`): + +- The union gives editor autocompletion for the built-ins and makes a typo + (`'datetiem'`) a **compile-time** error rather than a runtime/server + failure. +- The `string & {}` arm widens the parameter back to `string` at the type + level, so it still accepts custom / third-party skill names AND keeps + parity with the Python reference (whose `add_skill` / `has_skill` take a + bare `str`). It is a no-op at runtime — TypeScript erases types, so the + value passed on the wire is the identical string either way. + +#### Signature + +```typescript +type SkillName = "api_ninjas_trivia" | "ask_claude" | "claude_skills" | "custom_skills" | "datasphere" | "datasphere_serverless" | "datetime" | "google_maps" | "info_gatherer" | "joke" | "math" | "mcp_gateway" | "native_vector_search" | "play_background_file" | "spider" | "swml_transfer" | "weather_api" | "web_search" | "wikipedia_search" +``` + +#### Examples + +```typescript +await agent.addSkillByName('datetime'); // autocompleted built-in +agent.hasSkill('datetime'); // true +await agent.addSkillByName('my_custom_one'); // open set: custom names OK +// await agent.addSkillByName('datetiem'); // ✗ compile error (typo) +``` + +#### Source + +[`src/skills/SkillName.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillName.ts) + +Line 28. + +*** + +### SkillNameOrString + +A skill-name parameter: one of the typed built-in [SkillName](/docs/sdk-reference/reference/typescript/skills/skill-name#skill-name) values +(autocompleted + typo-checked) or any other string (custom / third-party +skills, and parity with Python's bare `str`). + +The `(string & {})` arm preserves string literal autocompletion for the +union members while still widening to accept arbitrary strings; it is purely +a type-level annotation and has no runtime effect. + +#### Signature + +```typescript +type SkillNameOrString = SkillName | string & object +``` + +#### Source + +[`src/skills/SkillName.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillName.ts) + +Line 58. + +## Source + +[`src/skills/SkillName.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillName.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/skills/skill-registry/index.mdx b/fern/products/sdk-reference/typescript/skills/skill-registry/index.mdx new file mode 100644 index 0000000000..bd566f9846 --- /dev/null +++ b/fern/products/sdk-reference/typescript/skills/skill-registry/index.mdx @@ -0,0 +1,652 @@ +--- +slug: "/reference/typescript/skills/skill-registry" +title: "SkillRegistry" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "skills.SkillRegistry" + module: "skills" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts" +--- +# `SkillRegistry` + +Global singleton registry for registering and instantiating skills. + +Skills can be registered programmatically via `register(SkillClass)`. +Matches Python's `skill_registry` global (`skills/registry.py:481`). + +## Signature + +```typescript +class SkillRegistry +``` + +## Properties + + + Get the number of registered skills. + + +## Methods + +### addSearchPath + +Add a directory path to search during skill discovery. + +#### Signature + +```typescript +addSearchPath(path: string): void +``` + +#### Parameters + + + Absolute path to a directory containing skill files. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) + +Line 224. + +*** + +### addSkillDirectory + +Add a directory to search for skills. + +Mirrors Python's +`signalwire.skills.registry.SkillRegistry.add_skill_directory` +(`registry.py:350-375`): validate that the path exists and is a +directory, then append it (de-duplicated) to `externalPaths`. Throws +`Error` (the JS analog of Python's `ValueError`) for non-existent +paths or non-directories. Distinct from `addSearchPath`, which +silently accepts anything; `addSkillDirectory` is the strict +Python-parity surface and the recommended entry point for +registering third-party skill directories. + +#### Signature + +```typescript +addSkillDirectory(path: string): void +``` + +#### Parameters + + + Absolute or relative path to a directory containing skill subdirectories. + + +#### Returns + +`void` + +#### Throws + +- Error when the path doesn't exist or isn't a directory. + +#### Source + +[`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) + +Line 247. + +*** + +### clear + +Clear all registrations. + +#### Signature + +```typescript +clear(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) + +Line 408. + +*** + +### constructor + +#### Signature + +```typescript +constructor(): SkillRegistry +``` + +#### Returns + +`SkillRegistry` + +#### Source + +[`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) + +Line 69. + +*** + +### create + +Create a new skill instance by looking up its class in the registry. +Matches Python's `skill_manager.load_skill(name)` class-lookup + instantiate +flow (`skill_manager.py:97`: `skill_instance = skill_class(self.agent, params)`). + +#### Signature + +```typescript +create(name: string, config?: SkillConfig): SkillBase | null +``` + +#### Parameters + + + The registered skill name. + + + + Optional configuration to pass to the skill constructor. + + +#### Returns + +`SkillBase | null` — A new skill instance, or null if the name is not registered. + +#### Source + +[`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) + +Line 163. + +*** + +### discoverAll + +Discover and register skills from all configured search paths. + +#### Signature + +```typescript +discoverAll(): Promise +``` + +#### Returns + +`Promise` — Array of all newly discovered skill names. + +#### Source + +[`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) + +Line 338. + +*** + +### discoverFromDirectory + +Discover and register skills from a directory by importing each file. +Looks for SkillBase subclass exports and registers them. + +#### Signature + +```typescript +discoverFromDirectory(dirPath: string): Promise +``` + +#### Parameters + + + Absolute path to the directory to scan. + + +#### Returns + +`Promise` — Array of newly discovered skill names. + +#### Source + +[`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) + +Line 282. + +*** + +### getAllSkillsSchema + +Get combined schema info for all registered skills. + +#### Signature + +```typescript +getAllSkillsSchema(): Record +``` + +#### Returns + +`Record` — Record mapping skill names to their schema info. + +#### Source + +[`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) + +Line 372. + +*** + +### getExternalPaths + +Returns a copy of the external skill directories registered via +[addSkillDirectory](/docs/sdk-reference/reference/typescript/add-skill-directory). Parity surface for Python's +`_external_paths`. + +#### Signature + +```typescript +getExternalPaths(): string[] +``` + +#### Returns + +`string[]` + +#### Source + +[`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) + +Line 264. + +*** + +### getInstance + +Get the global singleton instance, creating it on first access. + +**Modifiers:** `static` + +#### Signature + +```typescript +getInstance(): SkillRegistry +``` + +#### Returns + +`SkillRegistry` — The shared SkillRegistry instance. + +#### Source + +[`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) + +Line 78. + +*** + +### getSearchPaths + +Get all configured search paths for skill discovery. + +#### Signature + +```typescript +getSearchPaths(): string[] +``` + +#### Returns + +`string[]` — Copy of the search paths array. + +#### Source + +[`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) + +Line 272. + +*** + +### getSkillClass + +Get the registered skill class by name. Matches Python's +`get_skill_class(skill_name)` (`registry.py:196-203`). + +#### Signature + +```typescript +getSkillClass(name: string): typeof SkillBase | undefined +``` + +#### Parameters + + + The registered skill name. + + +#### Returns + +`typeof SkillBase | undefined` — The skill class reference, or undefined if not registered. + +#### Source + +[`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) + +Line 181. + +*** + +### getSkillSchema + +Get the combined schema info for a registered skill. +Matches Python `get_all_skills_schema` per-skill shape +(`registry.py:287-295`). + +#### Signature + +```typescript +getSkillSchema(name: string): SkillSchemaInfo | undefined +``` + +#### Parameters + + + The registered skill name to query. + + +#### Returns + +`SkillSchemaInfo | undefined` — The skill's schema info, or undefined if not found. + +#### Source + +[`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) + +Line 354. + +*** + +### has + +Check if a skill name is registered. + +#### Signature + +```typescript +has(name: string): boolean +``` + +#### Parameters + + + The skill name to check. + + +#### Returns + +`boolean` — True if the skill is registered. + +#### Source + +[`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) + +Line 190. + +*** + +### listAllSkillSources + +Group registered skill names by source category. Matches Python's +`list_all_skill_sources` (`skills/registry.py:436-478`). + +Current TS implementation treats every registered skill as "registered" +(the only category that fits — filesystem-based discovery is optional +and entry-points don't apply to Node the way they do to Python). + +#### Signature + +```typescript +listAllSkillSources(): Record +``` + +#### Returns + +`Record` — Record mapping source categories to arrays of skill names. + +#### Source + +[`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) + +Line 391. + +*** + +### listRegistered + +List all registered skill names. + +#### Signature + +```typescript +listRegistered(): string[] +``` + +#### Returns + +`string[]` — Array of registered skill name strings. + +#### Source + +[`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) + +Line 198. + +*** + +### listSkills + +List all registered skills with their full metadata. Matches Python's +`list_skills()` shape (`registry.py:205-227`) plus TS-idiomatic +camelCase keys. + +#### Signature + +```typescript +listSkills(): SkillSchemaInfo[] +``` + +#### Returns + +`SkillSchemaInfo[]` — Array of skill metadata objects. + +#### Source + +[`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) + +Line 208. + +*** + +### lock + +Lock one or more skill names to prevent overwriting. +If called with no arguments, locks all currently registered skills. + +#### Signature + +```typescript +lock(names?: string[]): void +``` + +#### Parameters + + + Skill names to lock; if omitted, all current names are locked. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) + +Line 138. + +*** + +### register + +Register a skill class. The skill name is read from the class's static +`SKILL_NAME`. Mirrors Python's `register_skill(skill_class)` +(`skills/registry.py:132-194`) — including the schema-non-empty check +and the protection against overwriting locked skills. + +#### Signature + +```typescript +register(SkillClass: typeof SkillBase): void +``` + +#### Parameters + + + A concrete subclass of `SkillBase` with a non-empty `SKILL_NAME`. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) + +Line 101. + +*** + +### resetInstance + +Reset the global singleton (for testing). + +**Modifiers:** `static` + +#### Signature + +```typescript +resetInstance(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) + +Line 88. + +*** + +### unregister + +Unregister a skill by name, removing it from the registry. + +#### Signature + +```typescript +unregister(name: string): boolean +``` + +#### Parameters + + + The skill name to unregister. + + +#### Returns + +`boolean` — True if the skill was found and removed. + +#### Source + +[`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) + +Line 150. + +## Interfaces + +### SkillSchemaInfo + +Metadata exposed for a registered skill. Shape matches Python's +`SkillRegistry.list_skills()` / `get_all_skills_schema()` return values +(`skills/registry.py:205-227`, `229-296`). + +#### Signature + +```typescript +interface SkillSchemaInfo +``` + +#### Properties + + + Human-readable description (from `SkillBase.SKILL_DESCRIPTION`). + + + + The skill's registered name (from `SkillBase.SKILL_NAME`). + + + + Full parameter schema with types, defaults, and constraints. + + + + Environment variables required by the skill. + + + + NPM packages required by the skill. + + + + Optional source category for grouping (e.g., "builtin", "external"). + + + + Whether this skill supports multiple simultaneous instances. + + + + Semantic version string (from `SkillBase.SKILL_VERSION`). + + +#### Source + +[`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) + +Line 28. + +## Source + +[`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) + +Line 55. diff --git a/fern/products/sdk-reference/typescript/ssl-config/index.mdx b/fern/products/sdk-reference/typescript/ssl-config/index.mdx new file mode 100644 index 0000000000..d009291d4e --- /dev/null +++ b/fern/products/sdk-reference/typescript/ssl-config/index.mdx @@ -0,0 +1,257 @@ +--- +slug: "/reference/typescript/ssl-config" +title: "SslConfig" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "SslConfig" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/SslConfig.ts" +--- +# `SslConfig` + +Manages SSL/TLS configuration sourced from explicit options or environment variables. + +## Signature + +```typescript +class SslConfig +``` + +## Properties + + + Filesystem path to the PEM certificate, or null if unset. + + + + Domain name for HSTS, or null if unset. + + + + Whether SSL is enabled. + + + + Whether HSTS headers should be emitted. + + + + HSTS max-age value in seconds. + + + + Filesystem path to the PEM private key, or null if unset. + + +## Methods + +### constructor + +Create an SslConfig, falling back to environment variables for any unset options. + +#### Signature + +```typescript +constructor(opts?: SslOptions): SslConfig +``` + +#### Parameters + + + Optional SSL configuration overrides. + + +#### Returns + +`SslConfig` + +#### Source + +[`src/SslConfig.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SslConfig.ts) + +Line 48. + +*** + +### getCert + +Read the PEM certificate file from disk. + +#### Signature + +```typescript +getCert(): string | null +``` + +#### Returns + +`string | null` — The certificate contents, or null if the file is missing. + +#### Source + +[`src/SslConfig.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SslConfig.ts) + +Line 71. + +*** + +### getHstsHeader + +Build the Strict-Transport-Security header value. + +#### Signature + +```typescript +getHstsHeader(): string | null +``` + +#### Returns + +`string | null` — The HSTS header string, or null if HSTS is disabled or SSL is off. + +#### Source + +[`src/SslConfig.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SslConfig.ts) + +Line 89. + +*** + +### getKey + +Read the PEM private key file from disk. + +#### Signature + +```typescript +getKey(): string | null +``` + +#### Returns + +`string | null` — The key contents, or null if the file is missing. + +#### Source + +[`src/SslConfig.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SslConfig.ts) + +Line 80. + +*** + +### getServerOptions + +Create the options object needed by Node.js `https.createServer()`. + +#### Signature + +```typescript +getServerOptions(): { cert: string; key: string } | null +``` + +#### Returns + +`{ cert: string; key: string } | null` — An object with `cert` and `key` strings, or null if either file is missing. + +#### Source + +[`src/SslConfig.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SslConfig.ts) + +Line 98. + +*** + +### hstsMiddleware + +Return a Hono middleware that appends the HSTS header to every response. + +#### Signature + +```typescript +hstsMiddleware(): (c: any, next: () => Promise) => Promise +``` + +#### Returns + +`(c: any, next: () => Promise) => Promise` — A Hono-compatible middleware function. + +#### Source + +[`src/SslConfig.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SslConfig.ts) + +Line 109. + +*** + +### isConfigured + +Check whether SSL is fully configured: enabled with both cert and key files present on disk. + +#### Signature + +```typescript +isConfigured(): boolean +``` + +#### Returns + +`boolean` — True if SSL is enabled and both certificate and key files exist. + +#### Source + +[`src/SslConfig.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SslConfig.ts) + +Line 61. + +## Interfaces + +### SslOptions + +Configuration options for SSL/TLS setup. + +#### Signature + +```typescript +interface SslOptions +``` + +#### Properties + + + Filesystem path to the PEM-encoded certificate. + + + + Domain name used for HSTS headers. + + + + Whether SSL is enabled. + + + + Whether to send HSTS headers; defaults to true. + + + + HSTS max-age in seconds; defaults to 31536000 (1 year). + + + + Filesystem path to the PEM-encoded private key. + + +#### Source + +[`src/SslConfig.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SslConfig.ts) + +Line 14. + +## Source + +[`src/SslConfig.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SslConfig.ts) + +Line 30. diff --git a/fern/products/sdk-reference/typescript/swaig-function/index.mdx b/fern/products/sdk-reference/typescript/swaig-function/index.mdx new file mode 100644 index 0000000000..10e4ca26bf --- /dev/null +++ b/fern/products/sdk-reference/typescript/swaig-function/index.mdx @@ -0,0 +1,328 @@ +--- +slug: "/reference/typescript/swaig-function" +title: "SwaigFunction" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "SwaigFunction" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/SwaigFunction.ts" +--- +# `SwaigFunction` + +A SWAIG function — exactly the same concept as a "tool" in native +OpenAI / Anthropic tool calling. + +Each SwaigFunction is rendered, on every LLM turn, into the OpenAI +tool schema: + +```json +{ +"type": "function", +"function": { +"name": "", +"description": "", +"parameters": { "type": "object", "properties": { ... } } +} +} +``` + +The `name`, `description`, and every per-parameter `description` inside +`parameters` are **read by the model** and directly determine whether +the model picks this tool when a matching user request comes in. +They are prompt engineering, not developer comments. + +## Signature + +```typescript +class SwaigFunction +``` + +## Properties + + + LLM-facing description. Tells the model WHEN to call this tool. A vague description is the #1 cause of "model has the tool but doesn't call it" failures. + + + + Additional fields included in the SWAIG definition output. + + + + Language-keyed filler phrases spoken while the tool executes. + + + + The handler function called when the tool is invoked. + + + + Whether this tool is externally hosted (has a webhookUrl). + + + + Whether this tool uses a typed handler with named parameters. + + + + Unique name — read by the LLM; use snake\_case verbs. + + + + JSON Schema properties describing the tool's parameters. Each property's `description` field is ALSO LLM-facing — it tells the model HOW to extract that argument from the user's utterance. + + + + List of required parameter names. + + + + Whether this tool requires session token authentication. + + + + Audio file URL to play while waiting for the tool to complete. + + + + Number of times to loop the wait file. + + + + External webhook URL; set when the tool is externally hosted. + + +## Methods + +### constructor + +Create a new SwaigFunction. + +#### Signature + +```typescript +constructor(opts: SwaigFunctionOptions): SwaigFunction +``` + +#### Parameters + + + Configuration options for the SWAIG function. Use `opts.extraFields` to pass any additional SWAIG-only fields (e.g. `meta_data_token`, `web_hook_auth_user`, `web_hook_auth_password`). This mirrors the Python constructor's `**extra_swaig_fields` kwargs: both are merged directly into the serialized SWAIG definition, so the wire format is identical — only the call-site syntax differs. + + +#### Returns + +`SwaigFunction` + +#### Source + +[`src/SwaigFunction.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwaigFunction.ts) + +Line 138. + +*** + +### execute + +Invoke the handler with the given arguments and return a serialized result. + +#### Signature + +```typescript +execute( + args: Record, + rawData?: Record +): Promise> +``` + +#### Parameters + + + Parsed arguments from the AI. + + + + The full raw request payload. + + +#### Returns + +`Promise>` — A serialized result dictionary suitable for the SWAIG response. + +#### Source + +[`src/SwaigFunction.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwaigFunction.ts) + +Line 213. + +*** + +### toSwaig + +Serialize this function to the SWAIG wire format for inclusion in SWML. + +#### Signature + +```typescript +toSwaig( + baseUrl: string, + token?: string, + callId?: string +): Record +``` + +#### Parameters + + + The base URL of the agent server. + + + + Optional session token for secure functions. + + + + Optional call ID for secure function URLs. + + +#### Returns + +`Record` — A SWAIG function definition object. + +#### Source + +[`src/SwaigFunction.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwaigFunction.ts) + +Line 257. + +*** + +### validateArgs + +Validate arguments against the parameter JSON schema using full +JSON Schema Draft-7 validation (via ajv). + +Mirrors Python's `validate_args` which tries `jsonschema_rs` (Rust-based +Draft-7 validator) then falls back to `jsonschema` (pure Python Draft-7). +All JSON Schema constraint keywords are honoured: `required`, `type`, +`minLength`, `maxLength`, `pattern`, `format`, `minimum`, `maximum`, +`enum`, `anyOf`, `oneOf`, `$ref`, nested object/array validation, etc. + +If the schema has no properties, validation is skipped and the args are +considered valid — matching Python's early-return path. + +#### Signature + +```typescript +validateArgs(args: Record): [boolean, string[]] +``` + +#### Parameters + + + Arguments to validate. + + +#### Returns + +`[boolean, string[]]` — A tuple of `[isValid, errors]`. When no validation is needed (empty schema), returns `[true, []]`. + +#### Source + +[`src/SwaigFunction.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwaigFunction.ts) + +Line 186. + +## Type Aliases + +### SwaigHandler + +Handler function for a SWAIG tool invocation. + +#### Signature + +```typescript +type SwaigHandler = (args: Record, rawData: Record) => FunctionResult | Record | string | Promise | string> +``` + +#### Source + +[`src/SwaigFunction.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwaigFunction.ts) + +Line 19. + +## Interfaces + +### SwaigFunctionOptions + +Configuration options for creating a SwaigFunction. + +#### Signature + +```typescript +interface SwaigFunctionOptions +``` + +#### Properties + + + Human-readable description of what the tool does, shown to the AI. + + + + Additional fields to merge directly into the SWAIG function definition. **Python equivalent:** `**extra_swaig_fields` kwargs on the constructor. In Python these are passed as bare keyword arguments and merged directly into the output dict via `function_def.update(self.extra_swaig_fields)`. In TypeScript the same fields are collected under this single options key and merged identically in `toSwaig()` — the wire format is identical. + + + + Language-keyed filler phrases spoken while the tool executes. + + + + The handler function called when the tool is invoked. + + + + Whether this tool uses a typed handler with named parameters. + + + + Unique name used to register and invoke this tool. + + + + JSON Schema properties describing the tool's parameters. + + + + List of required parameter names. + + + + Whether this tool requires session token authentication. + + + + Audio file URL to play while waiting for the tool to complete. + + + + Number of times to loop the wait file. + + + + External webhook URL; makes this an externally-hosted tool. + + +#### Source + +[`src/SwaigFunction.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwaigFunction.ts) + +Line 25. + +## Source + +[`src/SwaigFunction.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwaigFunction.ts) + +Line 92. diff --git a/fern/products/sdk-reference/typescript/swml-builder/index.mdx b/fern/products/sdk-reference/typescript/swml-builder/index.mdx new file mode 100644 index 0000000000..84d967d7de --- /dev/null +++ b/fern/products/sdk-reference/typescript/swml-builder/index.mdx @@ -0,0 +1,1639 @@ +--- +slug: "/reference/typescript/swml-builder" +title: "SwmlBuilder" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "SwmlBuilder" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlBuilder.ts" +--- +# `SwmlBuilder` + +Builds SWML documents composed of verb instructions organized into named sections. + +Verb methods (`.answer()`, `.play()`, `.hangup()`, `.transfer()`, etc.) are +auto-installed from the bundled SWML schema and all return `this` for fluent chaining. + +Most users don't instantiate `SwmlBuilder` directly — `AgentBase` uses it internally +and exposes higher-level helpers. Use this class directly for `SWMLService` (non-AI +call flows) or to hand-craft SWML returned from a route handler. + +## Signature + +```typescript +class SwmlBuilder +``` + +## Examples + +```typescript +import { SwmlBuilder } from '@signalwire/sdk'; + +const swml = new SwmlBuilder() + .answer() + .play({ url: 'https://cdn.example.com/greeting.mp3' }) + .hangup() + .build(); + +// swml is JSON ready to return from a SignalWire webhook. +``` + +## See Also + +- \- \[SWMLService]\(/docs/sdk-reference/reference/typescript/swml-service) — HTTP service that serves a built SWML document + \- \[AgentBase]\(/docs/sdk-reference/reference/typescript/agent-base) — for AI-driven call flows + +## Properties + + + Public read-only accessor for the underlying SWML document. Provides direct access to the document, equivalent to the Python SDK's `service` property on `SWMLBuilder`. + + +## Methods + +### addSection + +Creates a new empty named section in the document. +If the section already exists, this is a no-op. +Matches Python SDK's `add_section(section_name)`. + +#### Signature + +```typescript +addSection(sectionName: string): this +``` + +#### Parameters + + + The name of the section to create. + + +#### Returns + +`this` — this for fluent chaining. + +#### Source + +[`src/SwmlBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlBuilder.ts) + +Line 247. + +*** + +### addVerb + +Appends a verb to the main section. +Validates the verb config against the schema when validation is enabled. + +#### Signature + +```typescript +addVerb(verbName: string, config: unknown): void +``` + +#### Parameters + + + The SWML verb name (e.g., "answer", "ai"). + + + + The verb's configuration payload. + + +#### Returns + +`void` + +#### Source + +[`src/SwmlBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlBuilder.ts) + +Line 187. + +*** + +### addVerbToSection + +Appends a verb to a named section, creating the section if it does not exist. + +#### Signature + +```typescript +addVerbToSection(sectionName: string, verbName: string, config: unknown): void +``` + +#### Parameters + + + The target section name. + + + + The SWML verb name. + + + + The verb's configuration payload. + + +#### Returns + +`void` + +#### Source + +[`src/SwmlBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlBuilder.ts) + +Line 206. + +*** + +### ai + +Creates an AI agent that conducts voice conversations using automatic speech recognition (ASR), large language models (LLMs), and text-to-speech (TTS) synthesis. The agent processes caller speech in real-time, generates contextually appropriate responses, and can execute custom functions to interact with external systems through SignalWire AI Gateway (SWAIG). + +#### Signature + +```typescript +ai(config?: AiVerbConfig): this +``` + +#### Parameters + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 50. + +*** + +### amazon\_bedrock + +Creates a new Bedrock AI Agent + +#### Signature + +```typescript +amazon_bedrock(config?: unknown): this +``` + +#### Parameters + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 52. + +*** + +### answer + +Answer incoming call and set an optional maximum duration. + +#### Signature + +```typescript +answer(config?: { ...4 fields }): this +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 44. + +*** + +### build + +Alias for [getDocument](/docs/sdk-reference/reference/typescript/swml-builder#get-document). Matches the Python SDK's `build()` method. +Build and return the SWML document as a dictionary/object. + +#### Signature + +```typescript +build(): Record +``` + +#### Returns + +`Record` — The document with version and sections. + +#### Source + +[`src/SwmlBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlBuilder.ts) + +Line 268. + +*** + +### cond + +Execute a sequence of instructions depending on the value of a JavaScript condition. + +#### Signature + +```typescript +cond(config?: Record): this +``` + +#### Parameters + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 54. + +*** + +### connect + +Dial a SIP URI or phone number. + +#### Signature + +```typescript +connect(config: Record): this +``` + +#### Parameters + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 56. + +*** + +### constructor + +Creates a new SwmlBuilder. + +#### Signature + +```typescript +constructor(opts?: SwmlBuilderOptions): SwmlBuilder +``` + +#### Parameters + + + Optional configuration. + + +#### Returns + +`SwmlBuilder` + +#### Source + +[`src/SwmlBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlBuilder.ts) + +Line 73. + +*** + +### denoise + +Start noise reduction. You can stop it at any time using `stop_denoise`. + +#### Signature + +```typescript +denoise(config?: Record): this +``` + +#### Parameters + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 58. + +*** + +### detect\_machine + +A detection method that combines AMD (Answering Machine Detection) and fax detection. Detect whether the user on the other end of the call is a machine (fax, voicemail, etc.) or a human. The detection result(s) will be sent to the specified status\_url as a POST request and will also be saved in the detect\_result variable. + +#### Signature + +```typescript +detect_machine(config?: { ...11 fields }): this +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 217. + +*** + +### enter\_queue + +Place the current call in a named queue where it will wait to be connected to an available agent or resource. While waiting, callers will hear music or custom audio. When an agent connects to the queue (using the connect method), the caller and agent are bridged together. After the bridge completes, execution continues with the SWML script specified in transfer\_after\_bridge. + +#### Signature + +```typescript +enter_queue(config?: unknown): this +``` + +#### Parameters + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 60. + +*** + +### execute + +Execute a specified section or URL as a subroutine, and upon completion, return to the current document. Use the return statement to pass any return values or objects back to the current document. + +#### Signature + +```typescript +execute(config: { ...5 fields }): this +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 62. + +*** + +### getDocument + +Returns the raw SWML document object. + +#### Signature + +```typescript +getDocument(): Record +``` + +#### Returns + +`Record` — The document with version and sections. + +#### Source + +[`src/SwmlBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlBuilder.ts) + +Line 258. + +*** + +### getSchemaUtils + +Get or create the shared SchemaUtils singleton. +Exposed for use by the type generator and tests. + +**Modifiers:** `static` + +#### Signature + +```typescript +getSchemaUtils(): SchemaUtils +``` + +#### Returns + +`SchemaUtils` + +#### Source + +[`src/SwmlBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlBuilder.ts) + +Line 125. + +*** + +### goto + +Jump to a label within the current section, optionally based on a condition. The goto method will only navigate to a label within the same section. + +#### Signature + +```typescript +goto(config: { ...3 fields }): this +``` + +#### Parameters + + + + + + + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 69. + +*** + +### hangup + +End the call with an optional reason. + +#### Signature + +```typescript +hangup(config?: { ...1 fields }): this +``` + +#### Parameters + + + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 82. + +*** + +### join\_conference + +Join an ad-hoc audio conference started on either the SignalWire or Compatibility API. This method allows you to connect the current call to a named conference where multiple participants can communicate simultaneously. + +#### Signature + +```typescript +join_conference(config?: unknown): this +``` + +#### Parameters + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 88. + +*** + +### join\_room + +Join a RELAY room. If the room doesn't exist, it creates a new room. + +#### Signature + +```typescript +join_room(config: { ...1 fields }): this +``` + +#### Parameters + + + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 85. + +*** + +### label + +Mark any point of the SWML section with a label so that goto can jump to it. + +#### Signature + +```typescript +label(value: string): this +``` + +#### Parameters + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 74. + +*** + +### live\_transcribe + +Start live transcription of the call. The transcription will be sent to the specified webhook URL. + +#### Signature + +```typescript +live_transcribe(config: { ...1 fields }): this +``` + +#### Parameters + + + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 76. + +*** + +### live\_translate + +Start live translation of the call. The translation will be sent to the specified webhook URL. + +#### Signature + +```typescript +live_translate(config: { ...1 fields }): this +``` + +#### Parameters + + + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 79. + +*** + +### pay + +Enables secure payment processing during voice calls. When implemented, it manages the entire payment flow including data collection, validation, and processing through your configured payment gateway. + +#### Signature + +```typescript +pay(config: { ...18 fields }): this +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 197. + +*** + +### play + +Play file(s), ringtones, speech or silence. + +#### Signature + +```typescript +play(config?: PlayVerbConfig): this +``` + +#### Parameters + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 90. + +*** + +### prompt + +Play a prompt and wait for input. The input can be received either as digits from the keypad, or from speech, or both depending on what parameters are set. By default, only digit input is enabled. To enable speech input, set at least one speech parameter. To enable both digit and speech input, set at least one parameter for each. + +#### Signature + +```typescript +prompt(config: { ...15 fields }): this +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 92. + +*** + +### receive\_fax + +Receive a fax being delivered to this call. + +#### Signature + +```typescript +receive_fax(config?: { ...1 fields }): this +``` + +#### Parameters + + + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 109. + +*** + +### record + +Record the call audio in the foreground, pausing further SWML execution until recording ends. Use this, for example, to record voicemails. To record calls in the background in a non-blocking fashion, use the record\_call method. + +#### Signature + +```typescript +record(config?: { ...10 fields }): this +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 112. + +*** + +### record\_call + +Record call in the background. Unlike the record method, the record\_call method will start the recording and continue executing the SWML script while allowing the recording to happen in the background. To stop call recordings started with record\_call, use the stop\_record\_call method. + +#### Signature + +```typescript +record_call(config?: { ...11 fields }): this +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 124. + +*** + +### render + +Alias for [renderDocument](/docs/sdk-reference/reference/typescript/swml-builder#render-document). Matches the Python SDK's `render()` method. +Build and render the SWML document as a JSON string. + +#### Signature + +```typescript +render(): string +``` + +#### Returns + +`string` — The JSON-encoded SWML document. + +#### Source + +[`src/SwmlBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlBuilder.ts) + +Line 286. + +*** + +### renderDocument + +Serializes the SWML document to a JSON string. + +#### Signature + +```typescript +renderDocument(): string +``` + +#### Returns + +`string` — The JSON-encoded SWML document. + +#### Source + +[`src/SwmlBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlBuilder.ts) + +Line 276. + +*** + +### request + +Send a GET, POST, PUT, or DELETE request to a remote URL. + +#### Signature + +```typescript +request(config: { ...7 fields }): this +``` + +#### Parameters + + + + + + + + + + + + + + + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 137. + +*** + +### reset + +Resets the document to an empty SWML structure. + +#### Signature + +```typescript +reset(): this +``` + +#### Returns + +`this` — this for fluent chaining. + +#### Source + +[`src/SwmlBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlBuilder.ts) + +Line 176. + +*** + +### return + +Return a value from an execute call or exit the script. The value can be any type. + +#### Signature + +```typescript +return(config?: unknown): this +``` + +#### Parameters + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 146. + +*** + +### say + +Add a 'play' verb with say: prefix for text-to-speech. +Convenience wrapper matching Python SDK's `say()` method. + +#### Signature + +```typescript +say(text: string, opts?: { ...4 fields }): this +``` + +#### Parameters + + + Text to speak. + + + + Optional TTS parameters (voice, language, gender, volume). + + + + + + + + + + +#### Returns + +`this` — this for fluent chaining. + +#### Source + +[`src/SwmlBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlBuilder.ts) + +Line 221. + +*** + +### send\_digits + +Send digit presses as DTMF tones. + +#### Signature + +```typescript +send_digits(config: { ...1 fields }): this +``` + +#### Parameters + + + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 148. + +*** + +### send\_fax + +Send a fax. + +#### Signature + +```typescript +send_fax(config: { ...4 fields }): this +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 151. + +*** + +### send\_sms + +Send an outbound SMS or MMS message to a PSTN phone number. + +#### Signature + +```typescript +send_sms(config: number | Record): this +``` + +#### Parameters + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 157. + +*** + +### set + +Set script variables to the specified values. Accepts an object mapping variable names to values. Variables set using set can be removed using unset. + +#### Signature + +```typescript +set(config?: Record): this +``` + +#### Parameters + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 159. + +*** + +### setValidation + +Enable or disable verb schema validation at runtime. +Matches the Python `schema_validation` constructor parameter on AgentBase. + +#### Signature + +```typescript +setValidation(enabled: boolean): void +``` + +#### Parameters + + + True to enable validation, false to disable. + + +#### Returns + +`void` + +#### Source + +[`src/SwmlBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlBuilder.ts) + +Line 113. + +*** + +### sip\_refer + +Send SIP REFER to a SIP call. + +#### Signature + +```typescript +sip_refer(config: { ...4 fields }): this +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 163. + +*** + +### sleep + +Pause execution for a specified duration. + +#### Signature + +```typescript +sleep(durationOrConfig: number | { duration: number }): this +``` + +#### Parameters + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 161. + +*** + +### stop\_denoise + +Stop noise reduction that was started with denoise. + +#### Signature + +```typescript +stop_denoise(config?: Record): this +``` + +#### Parameters + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 169. + +*** + +### stop\_record\_call + +Stop an active background recording. + +#### Signature + +```typescript +stop_record_call(config?: { ...1 fields }): this +``` + +#### Parameters + + + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 171. + +*** + +### stop\_tap + +Stop an active tap stream. + +#### Signature + +```typescript +stop_tap(config?: { ...1 fields }): this +``` + +#### Parameters + + + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 174. + +*** + +### switch + +Execute different instructions based on a variable's value. + +#### Signature + +```typescript +switch(config: { ...3 fields }): this +``` + +#### Parameters + + + + + + + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 177. + +*** + +### tap + +Start background call tap. Media is streamed over Websocket or RTP to customer controlled URI. + +#### Signature + +```typescript +tap(config: { ...6 fields }): this +``` + +#### Parameters + + + + + + + + + + + + + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 182. + +*** + +### transfer + +Transfer the execution of the script to a different SWML section, URL, or Relay application. Once the transfer is complete, the script will continue executing SWML from the new location. + +#### Signature + +```typescript +transfer(config: { ...3 fields }): this +``` + +#### Parameters + + + + + + + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 190. + +*** + +### unset + +Unset specified variables. The variables may have been set using the set method or as a byproduct of other statements or methods. Accepts a single variable name as a string or an array of variable names. + +#### Signature + +```typescript +unset(config: number | Record): this +``` + +#### Parameters + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 195. + +*** + +### user\_event + +Allows the user to set and send events to the connected client on the call. This is useful for triggering actions on the client side. Commonly used with the [browser-sdk](https://developer.signalwire.com/sdks/reference/browser-sdk/SignalWire%20Client/). The event object can be any valid JSON object. Any key-value pair in the object is sent to the client as an event type called `user_event`. + +#### Signature + +```typescript +user_event(config: { ...1 fields }): this +``` + +#### Parameters + + + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 230. + +## Interfaces + +### SwmlBuilderOptions + +Options for constructing a SwmlBuilder. + +#### Signature + +```typescript +interface SwmlBuilderOptions +``` + +#### Properties + + + When false, disables verb schema validation. Defaults to true unless `SWML_SKIP_SCHEMA_VALIDATION=true` is set in the environment. + + + + An initial SWML document to seed the builder with, enabling document injection. When provided, the builder uses this document instead of creating an empty one. This mirrors the Python SDK's pattern of injecting an SWMLService instance. + + + + Optional path to a custom SWML schema JSON file. When set, the builder uses a per-instance SchemaUtils loaded from this path instead of the bundled schema. Mirrors Python's `schema_path` constructor parameter on `SWMLService`/`AgentBase`. + + +#### Source + +[`src/SwmlBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlBuilder.ts) + +Line 19. + +## Source + +[`src/SwmlBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlBuilder.ts) + +Line 59. diff --git a/fern/products/sdk-reference/typescript/swml-handler/ai-verb-handler/index.mdx b/fern/products/sdk-reference/typescript/swml-handler/ai-verb-handler/index.mdx new file mode 100644 index 0000000000..f85f833ae8 --- /dev/null +++ b/fern/products/sdk-reference/typescript/swml-handler/ai-verb-handler/index.mdx @@ -0,0 +1,140 @@ +--- +slug: "/reference/typescript/swml-handler/ai-verb-handler" +title: "AIVerbHandler" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "SWMLHandler.AIVerbHandler" + parent: "SWMLHandler" + module: "SWMLHandler" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLHandler.ts" +--- +# `AIVerbHandler` + +Handler for the SWML 'ai' verb. + +## Signature + +```typescript +class AIVerbHandler extends SWMLVerbHandler +``` + +## Inheritance + +**Extends:** [SWMLVerbHandler](/docs/sdk-reference/reference/typescript/swml-handler/swml-verb-handler) + +## Methods + +### buildConfig + +Build a configuration for the AI verb. + +Requires exactly one of `promptText` or `promptPom` (mutually exclusive). +Throws an `Error` if both or neither are provided. + +Extra keys in `opts` are routed as follows: + +- `languages`, `hints`, `pronounce`, `globalData` / `global_data` are placed at the top level of the config. +- All other extra keys are placed into `config.params`. + +#### Signature + +```typescript +buildConfig(opts: AIVerbBuildOptions = {}): Record +``` + +#### Parameters + + + Build options for the AI verb configuration. + + +#### Returns + +`Record` — AI verb configuration dictionary. + +#### Source + +[`src/SWMLHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLHandler.ts) + +Line 167. + +*** + +### constructor + +#### Signature + +```typescript +constructor(): AIVerbHandler +``` + +#### Returns + +`AIVerbHandler` + +*** + +### getVerbName + +Get the name of the verb this handler handles. + +#### Signature + +```typescript +getVerbName(): string +``` + +#### Returns + +`string` — "ai" as the verb name. + +#### Source + +[`src/SWMLHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLHandler.ts) + +Line 90. + +*** + +### validateConfig + +Validate the configuration for the AI verb. + +Checks that: + +- `prompt` is present and is an object +- `prompt` contains exactly one of `text` or `pom` (mutually exclusive) +- `prompt.contexts`, if present, is an object +- `SWAIG`, if present, is an object + +#### Signature + +```typescript +validateConfig(config: Record): [boolean, string[]] +``` + +#### Parameters + + + The configuration dictionary for the AI verb. + + +#### Returns + +`[boolean, string[]]` — A \[isValid, errorMessages] tuple. + +#### Source + +[`src/SWMLHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLHandler.ts) + +Line 106. + +## Source + +[`src/SWMLHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLHandler.ts) + +Line 85. diff --git a/fern/products/sdk-reference/typescript/swml-handler/index.mdx b/fern/products/sdk-reference/typescript/swml-handler/index.mdx new file mode 100644 index 0000000000..b0d5da11b6 --- /dev/null +++ b/fern/products/sdk-reference/typescript/swml-handler/index.mdx @@ -0,0 +1,85 @@ +--- +slug: "/reference/typescript/swml-handler" +title: "SWMLHandler" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "SWMLHandler" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLHandler.ts" +--- +# `SWMLHandler` + +## Signature + +```typescript +module SWMLHandler +``` + +## Classes + + + + Handler for the SWML 'ai' verb. + + + + Abstract base class for pluggable SWML verb handlers. + + + + Registry for SWML verb handlers. + + + +## Interfaces + +### AIVerbBuildOptions + +Options accepted by [AIVerbHandler.buildConfig](/docs/sdk-reference/reference/typescript/swml-handler/ai-verb-handler#build-config). + +#### Signature + +```typescript +interface AIVerbBuildOptions +``` + +#### Properties + + + Optional contexts and steps configuration (can be combined with text or pom). + + + + Optional post-prompt text. + + + + Optional URL for post-prompt processing. + + + + POM structure for the AI prompt (mutually exclusive with promptText). + + + + Text prompt for the AI (mutually exclusive with promptPom). + + + + Optional SWAIG configuration. + + +#### Source + +[`src/SWMLHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLHandler.ts) + +Line 67. + +## Source + +[`src/SWMLHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLHandler.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/swml-handler/swml-verb-handler/index.mdx b/fern/products/sdk-reference/typescript/swml-handler/swml-verb-handler/index.mdx new file mode 100644 index 0000000000..2eae3a8cb6 --- /dev/null +++ b/fern/products/sdk-reference/typescript/swml-handler/swml-verb-handler/index.mdx @@ -0,0 +1,150 @@ +--- +slug: "/reference/typescript/swml-handler/swml-verb-handler" +title: "SWMLVerbHandler" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "SWMLHandler.SWMLVerbHandler" + parent: "SWMLHandler" + module: "SWMLHandler" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLHandler.ts" +--- +# `SWMLVerbHandler` + +Abstract base class for pluggable SWML verb handlers. + +Each concrete handler owns one verb name and provides validate/build +logic for that verb's configuration. Subclass this to create handlers +for custom or complex SWML verbs that require specialized handling +beyond generic schema-driven validation. + +**Modifiers:** `abstract` + +## Signature + +```typescript +class SWMLVerbHandler +``` + +## Examples + +```typescript +class MyVerbHandler extends SWMLVerbHandler { + getVerbName(): string { return 'my_verb'; } + validateConfig(config: Record): [boolean, string[]] { + const errors: string[] = []; + if (!config['url']) errors.push("Missing required field 'url'"); + return [errors.length === 0, errors]; + } + buildConfig(opts: Record): Record { + return { url: opts['url'] }; + } +} +``` + +## Methods + +### buildConfig + +Build a configuration object for this verb from the provided arguments. + +**Modifiers:** `abstract` + +#### Signature + +```typescript +buildConfig(opts: Record): Record +``` + +#### Parameters + + + Key-value arguments specific to this verb. + + +#### Returns + +`Record` — A configuration dictionary ready for inclusion in a SWML document. + +#### Source + +[`src/SWMLHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLHandler.ts) + +Line 63. + +*** + +### constructor + +#### Signature + +```typescript +constructor(): SWMLVerbHandler +``` + +#### Returns + +`SWMLVerbHandler` + +*** + +### getVerbName + +Get the name of the SWML verb this handler handles. + +**Modifiers:** `abstract` + +#### Signature + +```typescript +getVerbName(): string +``` + +#### Returns + +`string` — The verb name as a string (e.g. "ai", "play"). + +#### Source + +[`src/SWMLHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLHandler.ts) + +Line 48. + +*** + +### validateConfig + +Validate the configuration for this verb. + +**Modifiers:** `abstract` + +#### Signature + +```typescript +validateConfig(config: Record): [boolean, string[]] +``` + +#### Parameters + + + The configuration dictionary for this verb. + + +#### Returns + +`[boolean, string[]]` — A `[isValid, errorMessages]` tuple where `isValid` is `true` when the config is valid and `errorMessages` lists any issues found. + +#### Source + +[`src/SWMLHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLHandler.ts) + +Line 56. + +## Source + +[`src/SWMLHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLHandler.ts) + +Line 43. diff --git a/fern/products/sdk-reference/typescript/swml-handler/verb-handler-registry/index.mdx b/fern/products/sdk-reference/typescript/swml-handler/verb-handler-registry/index.mdx new file mode 100644 index 0000000000..37556782ae --- /dev/null +++ b/fern/products/sdk-reference/typescript/swml-handler/verb-handler-registry/index.mdx @@ -0,0 +1,157 @@ +--- +slug: "/reference/typescript/swml-handler/verb-handler-registry" +title: "VerbHandlerRegistry" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "SWMLHandler.VerbHandlerRegistry" + parent: "SWMLHandler" + module: "SWMLHandler" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLHandler.ts" +--- +# `VerbHandlerRegistry` + +Registry for SWML verb handlers. + +This class maintains a registry of handlers for special SWML verbs +and provides methods for accessing and using them. The "ai" verb handler +([AIVerbHandler](/docs/sdk-reference/reference/typescript/swml-handler/ai-verb-handler)) is registered automatically on construction. + +## Signature + +```typescript +class VerbHandlerRegistry +``` + +## Examples + +```typescript +const registry = new VerbHandlerRegistry(); + +// The "ai" handler is already registered +registry.hasHandler('ai'); // true + +// Register a custom handler +registry.registerHandler(new MyCustomVerbHandler()); + +// Look up a handler +const handler = registry.getHandler('ai'); +if (handler) { + const [valid, errors] = handler.validateConfig(config); +} +``` + +## Methods + +### constructor + +Initialize the registry with default handlers. + +#### Signature + +```typescript +constructor(): VerbHandlerRegistry +``` + +#### Returns + +`VerbHandlerRegistry` + +#### Source + +[`src/SWMLHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLHandler.ts) + +Line 267. + +*** + +### getHandler + +Get the handler for a specific verb. + +#### Signature + +```typescript +getHandler(verbName: string): SWMLVerbHandler | undefined +``` + +#### Parameters + + + The name of the verb (e.g. "ai"). + + +#### Returns + +`SWMLVerbHandler | undefined` — The handler if found, or `undefined` otherwise. + +#### Source + +[`src/SWMLHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLHandler.ts) + +Line 286. + +*** + +### hasHandler + +Check if a handler exists for a specific verb. + +#### Signature + +```typescript +hasHandler(verbName: string): boolean +``` + +#### Parameters + + + The name of the verb. + + +#### Returns + +`boolean` — `true` if a handler is registered for the verb, `false` otherwise. + +#### Source + +[`src/SWMLHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLHandler.ts) + +Line 295. + +*** + +### registerHandler + +Register a new verb handler, replacing any existing handler for the same verb name. + +#### Signature + +```typescript +registerHandler(handler: SWMLVerbHandler): void +``` + +#### Parameters + + + The handler to register. + + +#### Returns + +`void` + +#### Source + +[`src/SWMLHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLHandler.ts) + +Line 276. + +## Source + +[`src/SWMLHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLHandler.ts) + +Line 263. diff --git a/fern/products/sdk-reference/typescript/swml-service/index.mdx b/fern/products/sdk-reference/typescript/swml-service/index.mdx new file mode 100644 index 0000000000..47842bbc13 --- /dev/null +++ b/fern/products/sdk-reference/typescript/swml-service/index.mdx @@ -0,0 +1,1380 @@ +--- +slug: "/reference/typescript/swml-service" +title: "SWMLService" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "SWMLService" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts" +--- +# `SWMLService` + +HTTP service that serves non-AI SWML documents built from verb methods. + +Use `SWMLService` when you need a SignalWire call flow but don't need AI — +plain call routing, IVR-style trees, recording workflows, static playback, etc. +For AI-powered voice agents, use [AgentBase](/docs/sdk-reference/reference/typescript/agent-base) instead. + +## Signature + +```typescript +class SWMLService +``` + +## Examples + +```typescript +import { SWMLService } from '@signalwire/sdk'; + +const service = new SWMLService({ name: 'greeter', route: '/', port: 3000 }); +service.builder + .answer() + .play({ url: 'https://cdn.example.com/welcome.mp3' }) + .hangup(); + +await service.serve(); +``` + +## See Also + +- \- \[SwmlBuilder]\(/docs/sdk-reference/reference/typescript/swml-builder) — the underlying SWML document builder + \- \[AgentBase]\(/docs/sdk-reference/reference/typescript/agent-base) — AI-powered alternative + +## Properties + + + + + + + Domain name for SSL. Mirrors Python's `self.domain`. + + + + Check if full JSON Schema validation is enabled. Mirrors Python's `@property full_validation_enabled`. + + + + Host the server binds to. + + + + Structured logger, exposed for subclass access. Mirrors Python's public `self.log`. + + + + Service display name. + + + + + + Port the server binds to. + + + + HTTP route path. + + + + Schema validation utilities. Mirrors Python's `self.schema_utils`. + + + + Unified security configuration. Mirrors Python's `self.security`. + + + + Path to SSL certificate. Mirrors Python's `self.ssl_cert_path`. + + + + Whether SSL is enabled. Mirrors Python's `self.ssl_enabled`. + + + + Path to SSL private key. Mirrors Python's `self.ssl_key_path`. + + + + + + + + Custom verb handler registry. Mirrors Python's `self.verb_registry`. + + +## Classes + + + + Unified security configuration. Mirrors Python SDK's `SecurityConfig` — reads from env vars and optional config file. + + + + Registry for custom SWML verb handlers. Mirrors Python SDK's `VerbHandlerRegistry`. + + + +## Methods + +### addSection + +Add a new named section to the SWML document. +Mirrors Python's `add_section()`. + +#### Signature + +```typescript +addSection(sectionName: string): this +``` + +#### Parameters + + + Name of the section to create. + + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 653. + +*** + +### addVerb + +Add a verb to the SWML document. + +#### Signature + +```typescript +addVerb(name: string, config: unknown): this +``` + +#### Parameters + + + Verb name (e.g., 'answer', 'play', 'hangup'). + + + + Verb configuration. + + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 642. + +*** + +### addVerbToSection + +Add a verb to a specific named section. +Mirrors Python's `add_verb_to_section()`. + +#### Signature + +```typescript +addVerbToSection(sectionName: string, verbName: string, config: unknown): this +``` + +#### Parameters + + + Target section name (auto-created if missing). + + + + Verb name. + + + + Verb configuration. + + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 669. + +*** + +### asRouter + +Alias for `getApp()`. Provided for cross-SDK consistency with Python's +`as_router()` method — allows Python callers porting to TypeScript to use +the familiar name without changes. + +#### Signature + +```typescript +asRouter(): Hono +``` + +#### Returns + +`Hono` — The configured Hono app. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 908. + +*** + +### buildSwmlForRequest + +Service-side SWML-builder hook. Subclasses return a `SwmlBuilder` +to fully replace the document for this request, or `null` to fall +through to `setOnRequestCallback` or the static builder. + +This is distinct from the WebMixin `onRequest(requestData, +callbackPath)` hook on AgentBase (which mirrors Python's +`on_request -> on_swml_request` modification-merge contract). +Use this hook when you want to swap the entire SWML builder; use +`onRequest` / `onSwmlRequest` on AgentBase when you want to merge +targeted modifications into the rendered document. + +Default implementation returns `null` (no-op). + +#### Signature + +```typescript +buildSwmlForRequest( + _queryParams: Record, + _bodyParams: Record, + _headers: Record, + _callbackPath?: string +): SwmlBuilder | null +``` + +#### Parameters + + + + + + + + + +#### Returns + +`SwmlBuilder | null` — A `SwmlBuilder` whose document is sent as the response, or `null` to delegate to the next handler in the chain. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 834. + +*** + +### constructor + + + **Deprecated.** Prefer passing an options object with a required `name`. The no-arg form defaults name to 'swml-service'. + + +#### Signature + + + + ```typescript + constructor(opts: SWMLServiceOptions): SWMLService + ``` + + + + ```typescript + constructor(opts?: Partial): SWMLService + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`SWMLService` + +#### Returns (Overload 2) + +`SWMLService` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 263. + +*** + +### defineTool + +Define a SWAIG function the AI can call. Tool descriptions and +parameter descriptions are LLM-facing prompt engineering — see +PORTING\_GUIDE for guidance on writing them. + +Accepts the full SwaigFunctionOptions surface so AgentBase's richer +call sites (fillers, secure tokens, wait files, extra fields) work +without overriding this method on the subclass. + +#### Signature + +```typescript +defineTool(opts: SwaigFunctionOptions): this +``` + +#### Parameters + + + +#### Returns + +`this` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 465. + +*** + +### extractSipUsername + +Extract the SIP username from a request body's call.to field. +Mirrors Python's `@staticmethod extract_sip_username()`. + +**Modifiers:** `static` + +#### Signature + +```typescript +extractSipUsername(requestBody: Record): string | null +``` + +#### Parameters + + + The parsed request body containing call information. + + +#### Returns + +`string | null` — The extracted SIP username, or null if not found. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 787. + +*** + +### getAllFunctions + +Snapshot of all registered SWAIG functions keyed by name. +(Python parity: `ToolRegistry.get_all_functions`.) + +#### Signature + +```typescript +getAllFunctions(): Record> +``` + +#### Returns + +`Record>` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 529. + +*** + +### getApp + +Get the Hono application for mounting or testing. +This is the TypeScript equivalent of Python's `as_router()`, which returns +a FastAPI `APIRouter`. Both expose the underlying app/router so callers can +mount it into a larger framework. Use `asRouter()` when porting Python code +that calls `as_router()` directly. + +#### Signature + +```typescript +getApp(): Hono +``` + +#### Returns + +`Hono` — The configured Hono app. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 898. + +*** + +### getBasicAuthCredentials + +Get the basic-auth credentials used by this service. +Mirrors Python's `get_basic_auth_credentials()`. + +#### Signature + + + + ```typescript + getBasicAuthCredentials(includeSource?: false): [string, string] + ``` + + + + ```typescript + getBasicAuthCredentials( + includeSource: true + ): [string, string, "provided" | "environment" | "generated"] + ``` + + + +#### Parameters (Overload 1) + + + When true, a third element indicating the credential source is appended. + + +#### Parameters (Overload 2) + + + When true, a third element indicating the credential source is appended. + + +#### Returns (Overload 1) + +`[string, string]` — A tuple of \[username, password] or \[username, password, source]. + +#### Returns (Overload 2) + +`[string, string, "provided" | "environment" | "generated"]` — A tuple of \[username, password] or \[username, password, source]. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 863. + +*** + +### getBuilder + +Get the underlying SwmlBuilder for direct manipulation. + +#### Signature + +```typescript +getBuilder(): SwmlBuilder +``` + +#### Returns + +`SwmlBuilder` — The SwmlBuilder instance. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 632. + +*** + +### getDocument + +Get the SWML document as a dictionary. +Alias for `renderSwml()` that matches Python's `get_document()` name. + +#### Signature + +```typescript +getDocument(): Record +``` + +#### Returns + +`Record` — The SWML document. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 706. + +*** + +### getFunction + +Get a registered SWAIG function entry, or undefined. +(Python parity: `ToolRegistry.get_function`.) + +#### Signature + +```typescript +getFunction(name: string): Record | SwaigFunction | undefined +``` + +#### Parameters + + + +#### Returns + +`Record | SwaigFunction | undefined` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 523. + +*** + +### getRegisteredTools + +Get a summary of all registered tools with their names, descriptions, and +parameter schemas. Lifted from AgentBase so the swaig-test CLI can list +tools on a non-AgentBase SWMLService target (sidecar / standalone SWAIG +host). + +#### Signature + +```typescript +getRegisteredTools(): { description: string; name: string; parameters: Record }[] +``` + +#### Returns + +`{ description: string; name: string; parameters: Record }[]` — Array of tool descriptors. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 557. + +*** + +### getTool + +Look up a registered SwaigFunction by name. Lifted from AgentBase so +`swaig-test --exec ` works against a non-AgentBase SWMLService +target. + +#### Signature + +```typescript +getTool(name: string): SwaigFunction | undefined +``` + +#### Parameters + + + The tool name to search for. + + +#### Returns + +`SwaigFunction | undefined` — The SwaigFunction instance, or undefined if not found or not a SwaigFunction. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 581. + +*** + +### hasFunction + +Whether a SWAIG function with the given name is registered. +(Python parity: `ToolRegistry.has_function`.) + +#### Signature + +```typescript +hasFunction(name: string): boolean +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 517. + +*** + +### hasTool + +Whether a tool with the given name is registered. + +#### Signature + +```typescript +hasTool(name: string): boolean +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 511. + +*** + +### listToolNames + +List registered tool names in insertion order (Map preserves it). + +#### Signature + +```typescript +listToolNames(): string[] +``` + +#### Returns + +`string[]` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 545. + +*** + +### manualSetProxyUrl + +Manually set the proxy base URL used for webhook URL generation. +Mirrors Python's `manual_set_proxy_url()`. + +#### Signature + +```typescript +manualSetProxyUrl(url: string): this +``` + +#### Parameters + + + The external-facing base URL (trailing slashes are stripped). + + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 879. + +*** + +### onFunctionCall + +Dispatch a function call to the registered handler. +Returns null when the function isn't registered or has no handler. +Subclasses (AgentBase) override to add session-token validation +and FunctionResult-shape normalization. Return type is wide enough +to accommodate the agent override (which may also return void +shapes for fire-and-forget tool calls). + +#### Signature + +```typescript +onFunctionCall( + name: string, + args: Record, + rawData: Record +): string | void | Record | FunctionResult | Promise | FunctionResult> | null | undefined +``` + +#### Parameters + + + + + + + +#### Returns + +`string | void | Record | FunctionResult | Promise | FunctionResult> | null | undefined` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 490. + +*** + +### registerAdditionalRoutes + +Extension point: register additional Hono routes after SWMLService +mounts /health, /ready, /swaig, and the main route. AgentBase uses +this to add /post\_prompt, /check\_for\_input, /debug\_events, /mcp. + +#### Signature + +```typescript +registerAdditionalRoutes(_app: Hono): void +``` + +#### Parameters + + + +#### Returns + +`void` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 604. + +*** + +### registerRoutingCallback + +Register a routing callback at a given path. +When a POST request arrives at `path`, the callback is invoked with the +parsed request body. If it returns a string, the response is a 307 redirect +to that route; if it returns null, normal SWML serving continues. +Mirrors Python's `register_routing_callback()`. + +#### Signature + +```typescript +registerRoutingCallback( + callbackFn: RoutingCallback, + path: string = '/sip' +): void +``` + +#### Parameters + + + Callback receiving the request body and returning a route or null. + + + + HTTP path for the callback (default '/sip'). + + +#### Returns + +`void` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 742. + +*** + +### registerSwaigFunction + +Register a SwaigFunction instance or a raw function descriptor (DataMap). + +#### Signature + +```typescript +registerSwaigFunction(fn: Record | SwaigFunction): this +``` + +#### Parameters + + + +#### Returns + +`this` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 472. + +*** + +### registerVerbHandler + +Register a custom verb handler. +Mirrors Python's `register_verb_handler()`. + +#### Signature + +```typescript +registerVerbHandler(handler: SWMLVerbHandler): void +``` + +#### Parameters + + + The verb handler to register. + + +#### Returns + +`void` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 726. + +*** + +### removeFunction + +Remove a registered SWAIG function. Returns true when removed, +false when not found. (Python parity: +`ToolRegistry.remove_function`.) + +#### Signature + +```typescript +removeFunction(name: string): boolean +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 540. + +*** + +### renderDocument + +Render the SWML document as a JSON string. +Mirrors Python's `render_document()`. + +#### Signature + +```typescript +renderDocument(): string +``` + +#### Returns + +`string` — JSON-encoded SWML document. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 715. + +*** + +### renderSwml + +Render the SWML document. + +Subclass-override-friendly signature: AgentBase overrides this with +`(callId?: string, modifications?: Record): string` +to return a serialized JSON string built from prompts + dynamic config. +Plain SWMLService returns the in-memory document object. + +#### Signature + +```typescript +renderSwml( + _callId?: string, + _modifications?: Record +): string | Record +``` + +#### Parameters + + + + + +#### Returns + +`string | Record` — The SWML document (object) or its serialized form (subclass). + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 694. + +*** + +### resetDocument + +Reset the SWML document to an empty state. +Mirrors Python's `reset_document()`. + +#### Signature + +```typescript +resetDocument(): this +``` + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 679. + +*** + +### run + +Start the HTTP server. + +Matches Python's `serve()` parameters including SSL options. When +`SWAIG_CLI_MODE=true` is set in the environment (e.g. while running the +`swaig-test` CLI) the call is a no-op. + +#### Signature + +```typescript +run( + hostOrOpts?: string | { domain?: string; host?: string; port?: number; sslCert?: string; sslEnabled?: boolean; sslKey?: string }, + port?: number, + opts?: { ...4 fields } +): Promise +``` + +#### Parameters + + + + + Port. Defaults to `this.port` (constructor value) or `3000`. + + + + Optional SSL/TLS configuration overrides. + + + Domain used for HSTS header configuration. + + + + Path to the PEM certificate file. + + + + When `true`, serve over HTTPS. + + + + Path to the PEM private key file. + + + +#### Returns + +`Promise` — Resolves once the server has begun listening. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 929. + +*** + +### serve + +Start the HTTP server. Alias for [run](/docs/sdk-reference/reference/typescript/swml-service#run) provided for cross-SDK +consistency with Python's `serve()` method — callers porting from +Python can use this name without changes. + +#### Signature + +```typescript +serve( + ...args: [hostOrOpts: string | { domain?: string; host?: string; port?: number; sslCert?: string; sslEnabled?: boolean; sslKey?: string }, port: number, opts: { domain?: string; sslCert?: string; sslEnabled?: boolean; sslKey?: string }] +): Promise +``` + +#### Parameters + + + Forwarded unchanged to [run](/docs/sdk-reference/reference/typescript/swml-service#run). + + +#### Returns + +`Promise` — Resolves once the server has begun listening. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 1001. + +*** + +### setOnRequestCallback + +Set a callback invoked per-request to dynamically build SWML. +When set, the static SwmlBuilder is ignored and the callback's +returned SwmlBuilder is used instead. + +#### Signature + +```typescript +setOnRequestCallback(cb: OnRequestCallback): this +``` + +#### Parameters + + + Callback receiving query params, body params, and headers. + + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 850. + +*** + +### stop + +Stop the HTTP server. +Mirrors Python's `stop()`. + +#### Signature + +```typescript +stop(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 1009. + +*** + +### swaigPreDispatch + +Extension point: invoked between argument parsing and function dispatch +on POST /swaig. Returns \[target, shortCircuit]: when shortCircuit is +non-null, it's returned directly without dispatching. AgentBase may +override to add session-token validation or ephemeral dynamic-config. + +#### Signature + +```typescript +swaigPreDispatch( + _requestData: Record, + _funcName: string +): [SWMLService, unknown] +``` + +#### Parameters + + + + + +#### Returns + +`[SWMLService, unknown]` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 592. + +*** + +### validateBasicAuth + +Validate provided basic-auth credentials against the configured ones +using a constant-time comparison. (Python parity: +`AuthMixin.validate_basic_auth(username, password)`.) + +#### Signature + +```typescript +validateBasicAuth( + username: string, + password: string +): boolean | Promise +``` + +#### Parameters + + + + + +#### Returns + +`boolean | Promise` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 241. + +## Type Aliases + +### OnRequestCallback + +Callback invoked per-request to dynamically build SWML. + +#### Signature + +```typescript +type OnRequestCallback = (queryParams: Record, bodyParams: Record, headers: Record) => SwmlBuilder | Promise +``` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 140. + +## Interfaces + +### SWMLServiceOptions + +Configuration options for SWMLService. + +#### Signature + +```typescript +interface SWMLServiceOptions +``` + +#### Properties + + + Basic auth credentials as \[username, password]. + + + + Path to a security configuration file. + + + + Host to bind the web server to (default '0.0.0.0'). + + + + Service display name. Required to match Python SDK where `name` is a positional required parameter. + + + + Port to bind the web server to (default PORT env var or 3000). + + + + HTTP route path (default '/'). + + + + Path to a JSON Schema file for verb validation. + + + + Enable schema validation (default true). Can also be disabled via SWML\_SKIP\_SCHEMA\_VALIDATION=true. + + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 155. + +*** + +### SWMLVerbHandler + +Interface for custom SWML verb handlers. +Mirrors Python SDK's `SWMLVerbHandler` abstract base class. + +#### Signature + +```typescript +interface SWMLVerbHandler +``` + +#### Methods + +##### buildConfig + +Build a verb configuration from keyword arguments. + +###### Signature + +```typescript +buildConfig(kwargs: Record): Record +``` + +###### Parameters + + + +###### Returns + +`Record` + +###### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 34. + +*** + +##### getVerbName + +Return the verb name this handler manages. + +###### Signature + +```typescript +getVerbName(): string +``` + +###### Returns + +`string` + +###### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 30. + +*** + +##### validateConfig + +Validate a verb configuration. Returns \[isValid, errorMessages]. + +###### Signature + +```typescript +validateConfig(config: Record): [boolean, string[]] +``` + +###### Parameters + + + +###### Returns + +`[boolean, string[]]` + +###### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 32. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 28. + +## Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 202. diff --git a/fern/products/sdk-reference/typescript/swml-service/security-config/index.mdx b/fern/products/sdk-reference/typescript/swml-service/security-config/index.mdx new file mode 100644 index 0000000000..27ce41f496 --- /dev/null +++ b/fern/products/sdk-reference/typescript/swml-service/security-config/index.mdx @@ -0,0 +1,128 @@ +--- +slug: "/reference/typescript/swml-service/security-config" +title: "SecurityConfig" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "SWMLService.SecurityConfig" + parent: "SWMLService" + module: "SWMLService" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts" +--- +# `SecurityConfig` + +Unified security configuration. +Mirrors Python SDK's `SecurityConfig` — reads from env vars and optional config file. + +## Signature + +```typescript +class SecurityConfig +``` + +## Properties + + + Basic auth password from config, or null. + + + + Basic auth username from config, or null. + + + + Domain name for SSL. + + + + Filesystem path to the PEM certificate. + + + + Whether SSL is enabled. + + + + Filesystem path to the PEM private key. + + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(opts?: { ...2 fields }): SecurityConfig +``` + +#### Parameters + + + + + + + +#### Returns + +`SecurityConfig` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 82. + +*** + +### getBasicAuth + +Get basic auth credentials from security config, or null if not configured. + +#### Signature + +```typescript +getBasicAuth(): [string, string] | null +``` + +#### Returns + +`[string, string] | null` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 121. + +*** + +### validateSslConfig + +Validate that SSL cert and key files are present when SSL is enabled. + +#### Signature + +```typescript +validateSslConfig(): [boolean, string | null] +``` + +#### Returns + +`[boolean, string | null]` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 129. + +## Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 66. diff --git a/fern/products/sdk-reference/typescript/swml-service/verb-handler-registry/index.mdx b/fern/products/sdk-reference/typescript/swml-service/verb-handler-registry/index.mdx new file mode 100644 index 0000000000..526b422de6 --- /dev/null +++ b/fern/products/sdk-reference/typescript/swml-service/verb-handler-registry/index.mdx @@ -0,0 +1,122 @@ +--- +slug: "/reference/typescript/swml-service/verb-handler-registry" +title: "VerbHandlerRegistry" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "SWMLService.VerbHandlerRegistry" + parent: "SWMLService" + module: "SWMLService" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts" +--- +# `VerbHandlerRegistry` + +Registry for custom SWML verb handlers. +Mirrors Python SDK's `VerbHandlerRegistry`. + +## Signature + +```typescript +class VerbHandlerRegistry +``` + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(): VerbHandlerRegistry +``` + +#### Returns + +`VerbHandlerRegistry` + +*** + +### getHandler + +Get the handler for a specific verb, or undefined if none registered. + +#### Signature + +```typescript +getHandler(verbName: string): SWMLVerbHandler | undefined +``` + +#### Parameters + + + +#### Returns + +`SWMLVerbHandler | undefined` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 50. + +*** + +### hasHandler + +Check whether a handler exists for the given verb. + +#### Signature + +```typescript +hasHandler(verbName: string): boolean +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 55. + +*** + +### registerHandler + +Register a custom verb handler. + +#### Signature + +```typescript +registerHandler(handler: SWMLVerbHandler): void +``` + +#### Parameters + + + +#### Returns + +`void` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 45. + +## Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 41. diff --git a/fern/products/sdk-reference/typescript/swml-verb-methods.generated/index.mdx b/fern/products/sdk-reference/typescript/swml-verb-methods.generated/index.mdx new file mode 100644 index 0000000000..b83ff8f28b --- /dev/null +++ b/fern/products/sdk-reference/typescript/swml-verb-methods.generated/index.mdx @@ -0,0 +1,111 @@ +--- +slug: "/reference/typescript/swml-verb-methods.generated" +title: "SwmlVerbMethods.generated" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "SwmlVerbMethods.generated" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts" +--- +# `SwmlVerbMethods.generated` + +## Signature + +```typescript +module SwmlVerbMethods.generated +``` + +## Interfaces + +### AiVerbConfig + +AUTO-GENERATED FILE — do not edit manually. +Generated by: npx tsx src/generateVerbTypes.ts + +Provides TypeScript interface augmentation for all SWML verb methods +auto-installed on SwmlBuilder from schema.json. + +#### Signature + +```typescript +interface AiVerbConfig +``` + +#### Properties + + + Optional post-prompt text sent to the LLM after the conversation ends. + + + + URL to receive post-prompt status callbacks. + + + + Text prompt for the AI agent (mutually exclusive with prompt when using POM). + + + + SignalWire AI Gateway (SWAIG) configuration for custom function/tool definitions. + + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 11. + +*** + +### PlayVerbConfig + +#### Signature + +```typescript +interface PlayVerbConfig +``` + +#### Properties + + + If true, auto-answer the call before playing audio. Default true. + + + + Gender for text-to-speech. The `"male" | "female"` literals are autocompleted + typo-checked; any other string is still accepted (WEAK GROUNDING: no `enum:` in the SWML schema, Python never validates — convention, not schema). + + + + Language code for text-to-speech (e.g. "en-US"). + + + + Voice name to use for text-to-speech (e.g. "Polly.Joanna"). + + + + Single URL to play (mutually exclusive with urls). + + + + Array of URLs to play (mutually exclusive with url). + + + + Volume level for audio playback. Valid range -40 to 40. Default 0. + + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 24. + +## Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/type-inference/index.mdx b/fern/products/sdk-reference/typescript/type-inference/index.mdx new file mode 100644 index 0000000000..ad43334604 --- /dev/null +++ b/fern/products/sdk-reference/typescript/type-inference/index.mdx @@ -0,0 +1,255 @@ +--- +slug: "/reference/typescript/type-inference" +title: "TypeInference" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "TypeInference" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/TypeInference.ts" +--- +# `TypeInference` + +## Signature + +```typescript +module TypeInference +``` + +## Functions + +### createTypedHandlerWrapper + +Create a wrapper function that adapts a typed handler to the standard +`(args, rawData) => result` SWAIG handler signature. + +The wrapper extracts named parameters from the args dict and passes them +as positional arguments to the original function. + +#### Signature + +```typescript +createTypedHandlerWrapper( + fn: TypedToolHandler, + paramNames: string[], + hasRawData: boolean +): SwaigHandler +``` + +#### Parameters + + + The typed handler whose parameters match `paramNames` in order. + + + + Ordered list of parameter names extracted from `fn`, produced by [inferSchema](/docs/sdk-reference/reference/typescript/type-inference#infer-schema). + + + + When `true`, the raw-data record is appended as the final positional argument to mirror the old-style handler shape. + + +#### Returns + +`SwaigHandler` — A [SwaigHandler](/docs/sdk-reference/reference/typescript/swaig-function#swaig-handler) suitable for registration with [AgentBase.defineTool](/docs/sdk-reference/reference/typescript/agent-base#define-tool). + +#### Source + +[`src/TypeInference.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/TypeInference.ts) + +Line 227. + +*** + +### inferSchema + +Infer a JSON Schema from a function's parameters. + +Extracts parameter names and infers JSON Schema types from default-value +literals: + +- Number literals → `"integer"` (whole numbers) or `"number"` (decimals) +- String literals → `"string"` +- Boolean literals → `"boolean"` +- No default → `"string"` (and the parameter is marked required) + +#### Signature + +```typescript +inferSchema(fn: IntrospectableFn): InferredSchema | null +``` + +#### Parameters + + + The function to inspect. Arrow functions, regular functions, and method shorthand all work. Typed as [IntrospectableFn](/docs/sdk-reference/reference/typescript/type-inference#introspectable-fn) because only the parameter list is read — the handler's return is irrelevant to schema inference (a [TypedToolHandler](/docs/sdk-reference/reference/typescript/type-inference#typed-tool-handler) satisfies this). + + +#### Returns + +`InferredSchema | null` — An [InferredSchema](/docs/sdk-reference/reference/typescript/type-inference#inferred-schema) describing the parameters, or `null` when the function looks like an old-style `(args, rawData)` SWAIG handler (in which case no inference is attempted). + +#### Source + +[`src/TypeInference.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/TypeInference.ts) + +Line 151. + +*** + +### parseFunctionParams + +Parse function parameter names and default values from source code. + +Handles arrow functions, regular functions, and method shorthand. + +#### Signature + +```typescript +parseFunctionParams(source: string): ParsedParam[] +``` + +#### Parameters + + + The function source text, typically from `fn.toString()`. + + +#### Returns + +`ParsedParam[]` — An array of `{ name, defaultValue? }` records in declaration order. Returns an empty array if no parameter list is present. + +#### Source + +[`src/TypeInference.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/TypeInference.ts) + +Line 76. + +## Type Aliases + +### IntrospectableFn + +A function the SDK _introspects_ (reads `fn.toString()` to recover parameter +names/defaults) but whose return value it does not consume. `inferSchema` +only inspects the parameter list, so — unlike [TypedToolHandler](/docs/sdk-reference/reference/typescript/type-inference#typed-tool-handler) — its +input is return-agnostic. Still a precise improvement over the bare +`Function`: it is a _callable_ (rejecting non-functions) with an arbitrary +concrete parameter list (`...args: never[]` accepts any), and any return. +Every [TypedToolHandler](/docs/sdk-reference/reference/typescript/type-inference#typed-tool-handler) is assignable to it. + +#### Signature + +```typescript +type IntrospectableFn = (args: never[]) => unknown +``` + +#### Source + +[`src/TypeInference.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/TypeInference.ts) + +Line 47. + +*** + +### TypedToolHandler + +A typed SWAIG tool handler: a function the SDK introspects and wraps so it +receives the AI-extracted arguments as _named positional parameters_ (any +arity, optionally with a trailing `rawData` record) rather than the raw +`(args, rawData)` pair of [SwaigHandler](/docs/sdk-reference/reference/typescript/swaig-function#swaig-handler). + +This is the precise replacement for the bare `Function` type at the +typed-tool sites: it constrains the value to a _callable whose return is a +valid SWAIG result_ (a [FunctionResult](/docs/sdk-reference/reference/typescript/function-result), a `{ response }`-style record, +or a string — sync or async), which `Function` does not — so a non-callable, +or a callable returning `void`/`boolean`/etc., is now a compile-time error. + +Parameters are `...args: never[]` rather than `...unknown[]`: the handler's +real parameters are user-named with arbitrary types (`(city: string, days = 5) => …`) and are recovered from `fn.toString()` by [inferSchema](/docs/sdk-reference/reference/typescript/type-inference#infer-schema), so +the type must accept _any_ concrete positional list. Under +`strictFunctionTypes`, `never[]` makes the parameter position accept any +function (every param type is a supertype of `never`) while still pinning the +return type — exactly "callable returning a SWAIG result, params don't +matter". (`...unknown[]` would wrongly REJECT a `(city: string) => …` handler, +defeating the purpose.) + +#### Signature + +```typescript +type TypedToolHandler = (args: never[]) => FunctionResult | Record | string | Promise | string> +``` + +#### Source + +[`src/TypeInference.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/TypeInference.ts) + +Line 34. + +## Interfaces + +### InferredSchema + +Result of schema inference from a function. + +#### Signature + +```typescript +interface InferredSchema +``` + +#### Properties + + + Whether the function accepts a rawData parameter. + + + + JSON Schema properties keyed by parameter name. + + + + Ordered parameter names (excluding rawData). + + + + List of required parameter names (those without defaults). + + +#### Source + +[`src/TypeInference.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/TypeInference.ts) + +Line 56. + +*** + +### ParsedParam + +A parsed function parameter with optional default value. + +#### Signature + +```typescript +interface ParsedParam +``` + +#### Properties + + + + + +#### Source + +[`src/TypeInference.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/TypeInference.ts) + +Line 50. + +## Source + +[`src/TypeInference.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/TypeInference.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/types/index.mdx b/fern/products/sdk-reference/typescript/types/index.mdx new file mode 100644 index 0000000000..be355d5ef7 --- /dev/null +++ b/fern/products/sdk-reference/typescript/types/index.mdx @@ -0,0 +1,290 @@ +--- +slug: "/reference/typescript/types" +title: "types" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "types" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/types.ts" +--- +# `types` + +## Signature + +```typescript +module types +``` + +## Type Aliases + +### DynamicConfigCallback + +Callback invoked on each SWML request to dynamically modify an ephemeral copy of the agent. + +The ephemeral agent is typed as `import('./AgentBase.js').AgentBase` at +call sites but kept as a generic type parameter here to avoid a circular +import between `types.ts` and `AgentBase.ts`. Cast or import the type +explicitly at the call site if you need specific methods. + +#### Signature + +```typescript +type DynamicConfigCallback = (queryParams: Record, bodyParams: Record, headers: Record, agent: TAgent) => void | Promise +``` + +#### Source + +[`src/types.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/types.ts) + +Line 155. + +*** + +### SummaryCallback + +Callback invoked when a post-prompt summary is received at the end of a call. + +#### Signature + +```typescript +type SummaryCallback = (summary: Record | null, rawData: Record) => void | Promise +``` + +#### Source + +[`src/types.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/types.ts) + +Line 167. + +## Interfaces + +### AgentOptions + +Configuration options for constructing an AgentBase instance. + +#### Signature + +```typescript +interface AgentOptions +``` + +#### Properties + + + Unique identifier for this agent instance; auto-generated if omitted. + + + + Whether to automatically insert an "answer" verb in the SWML call flow (defaults to true). + + + + Explicit basic-auth credentials as \[username, password]; auto-generated if omitted. + + + + Whether to enable the check-for-input override endpoint. When true, a `/check_for_input` route is registered that allows external callers to inject input checks at runtime. Defaults to false. + + + + Path to a JSON configuration file. When provided, the file is loaded at construction time and its `service` section can override name, route, host, and port (constructor arguments still take precedence over file values). + + + + Default webhook URL for SWAIG function callbacks. + + + + Whether to enable the post-prompt override endpoint. When true, a `/post_prompt_override` route is registered that allows external callers to replace the post-prompt text at runtime. Defaults to false. + + + + Hostname to bind the HTTP server to (defaults to "0.0.0.0"). + + + + Display name of the agent, also used as default basic-auth username when credentials are auto-generated. + + + + List of native function names to include in the SWAIG configuration. + + + + Port number for the HTTP server (defaults to env PORT or 3000). + + + + Whether to record the call (defaults to false). + + + + Recording format, e.g. "mp4" (defaults to "mp4"). + + + + Whether to record in stereo (defaults to true). + + + + HTTP route path the agent listens on (defaults to "/"). + + + + Path to a JSON Schema file for SWML validation. When provided, rendered SWML documents are validated against this schema. Falls back to the built-in schema if omitted. + + + + Whether to validate rendered SWML against the schema. Can also be disabled via the `SWML_SKIP_SCHEMA_VALIDATION` env var. Defaults to true. + + + + SignalWire Signing Key for verifying inbound webhook signatures. When set, AgentBase auto-mounts the webhook signature validation middleware on POST /, /swaig, and /post\_prompt; unsigned or mis-signed requests are rejected with 403. Falls back to the `SIGNALWIRE_SIGNING_KEY` environment variable when omitted. When both are unset, signature validation is disabled and the agent emits a one-time warning on startup so operators notice. Per `porting-sdk/webhooks.md`: this MUST be treated as secret — never logged, never echoed to clients, never included in error messages. + + + + When true, suppresses all log output. + + + + Session token expiry in seconds (defaults to 3600). + + + + Whether to use POM-based prompt rendering (defaults to true). + + + + When true, the webhook validation middleware honors `X-Forwarded-Proto` / `X-Forwarded-Host` headers when reconstructing the public URL the platform POSTed to. Default false because proxy headers are spoofable; opt in only when you control the proxy. The `SWML_PROXY_URL_BASE` env var always takes precedence over both forwarded headers and the raw request URL. + + +#### Source + +[`src/types.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/types.ts) + +Line 6. + +*** + +### FunctionInclude + +Reference to an external SWAIG function endpoint to include in the AI configuration. + +#### Signature + +```typescript +interface FunctionInclude +``` + +#### Properties + + + List of function names available at the remote endpoint. + + + + Optional metadata to pass along with the include. + + + + URL of the remote SWAIG endpoint. + + +#### Source + +[`src/types.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/types.ts) + +Line 133. + +*** + +### LanguageConfig + +Configuration for a supported language in the AI agent. + +#### Signature + +```typescript +interface LanguageConfig +``` + +#### Properties + + + BCP-47 language code (e.g. "en-US"). + + + + TTS engine identifier. + + + + Filler phrases keyed by category for this language. + + + + Per-function filler phrases, keyed by function name then language code. + + + + Human-readable language name (e.g. "English"). + + + + Optional per-language params dict (engine-specific tuning, voice settings, etc.). Emitted as the language object's `params` key in SWML — only present in the wire payload when non-empty so existing entries remain byte-identical when no params are passed. + + + + Speech recognition model identifier. + + + + Voice identifier to use for this language. + + +#### Source + +[`src/types.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/types.ts) + +Line 98. + +*** + +### PronunciationRule + +Rule for overriding how the TTS engine pronounces a specific word or phrase. + +#### Signature + +```typescript +interface PronunciationRule +``` + +#### Properties + + + Whether the match should be case-insensitive. + + + + The text pattern to match. + + + + The replacement pronunciation. + + +#### Source + +[`src/types.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/types.ts) + +Line 123. + +## Source + +[`src/types.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/types.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/web-service/index.mdx b/fern/products/sdk-reference/typescript/web-service/index.mdx new file mode 100644 index 0000000000..5b2e07aac5 --- /dev/null +++ b/fern/products/sdk-reference/typescript/web-service/index.mdx @@ -0,0 +1,330 @@ +--- +slug: "/reference/typescript/web-service" +title: "WebService" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "WebService" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/WebService.ts" +--- +# `WebService` + +Static file serving service with HTTP API. + +Provides configurable static file hosting with per-route directory mounting, +extension filtering, file size limits, HTTP Basic Auth, CORS, directory +browsing, and optional SSL/TLS. Mirrors the Python SDK's `WebService` class. + +Useful when an agent or prefab needs to serve supporting assets — prompts, audio +files, images — from the same process without running a separate nginx / CDN. + +## Signature + +```typescript +class WebService +``` + +## Examples + +```typescript +import { WebService } from '@signalwire/sdk'; + +const web = new WebService({ + port: 8080, + directories: { '/audio': './public/audio' }, + allowedExtensions: ['.mp3', '.wav'], +}); + +await web.serve(); +// GET http://host:8080/audio/greeting.mp3 +``` + +## Properties + + + Allowlist of file extensions, or null to allow all (subject to blocklist). + + + + Blocklist of file extensions and file names. + + + + Map of URL route prefixes to local directory paths. + + + + Whether CORS is enabled. + + + + Whether directory listings are enabled. + + + + Maximum file size in bytes that will be served. + + + + Port the service binds to. + + + + The SSL/TLS configuration for this service. Mirrors the Python SDK's `security` attribute (`SecurityConfig`), which exposes SSL settings for post-construction inspection. In the Python SDK `SecurityConfig` also covers CORS origins, HSTS, allowed hosts, and rate limiting; in this SDK those concerns are configured via their own constructor options (`enableCors`, `ssl`, etc.) and Hono middleware rather than a single combined object. + + +## Methods + +### addDirectory + +Add a new directory to serve at a URL route prefix. + +#### Signature + +```typescript +addDirectory(route: string, directory: string): void +``` + +#### Parameters + + + URL prefix (e.g. '/docs'). + + + + Local directory path to serve. + + +#### Returns + +`void` + +#### Throws + +- If the directory does not exist or is not a directory. + +#### Source + +[`src/WebService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/WebService.ts) + +Line 184. + +*** + +### constructor + +Create a WebService. + +#### Signature + +```typescript +constructor(options?: WebServiceOptions): WebService +``` + +#### Parameters + + + Configuration options for the service. + + +#### Returns + +`WebService` + +#### Source + +[`src/WebService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/WebService.ts) + +Line 152. + +*** + +### getApp + +Get the Hono application for mounting or testing. + +#### Signature + +```typescript +getApp(): Hono +``` + +#### Returns + +`Hono` — The configured Hono app. + +#### Source + +[`src/WebService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/WebService.ts) + +Line 218. + +*** + +### removeDirectory + +Remove a previously added directory route from the bookkeeping map. + +Note: Hono does not support dynamic route removal; a server restart +is required for the route to fully stop responding. + +#### Signature + +```typescript +removeDirectory(route: string): void +``` + +#### Parameters + + + The URL route prefix to remove. + + +#### Returns + +`void` + +#### Source + +[`src/WebService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/WebService.ts) + +Line 207. + +*** + +### start + +Start the HTTP(S) service. + +When `SWAIG_CLI_MODE=true` is set in the environment, the call is a +no-op so config can be inspected without binding a port. + +#### Signature + +```typescript +start( + host?: string, + port?: number, + sslCert?: string, + sslKey?: string +): Promise +``` + +#### Parameters + + + Bind address. Defaults to `'0.0.0.0'`. + + + + Port override. Defaults to `this.port`. + + + + Path to SSL certificate file (overrides `SslConfig`). + + + + Path to SSL key file (overrides `SslConfig`). + + +#### Returns + +`Promise` — Resolves once the server has begun listening. + +#### Source + +[`src/WebService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/WebService.ts) + +Line 250. + +*** + +### stop + +Stop the service and release resources. + +#### Signature + +```typescript +stop(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/WebService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/WebService.ts) + +Line 302. + +## Interfaces + +### WebServiceOptions + +Configuration options for WebService. + +#### Signature + +```typescript +interface WebServiceOptions +``` + +#### Properties + + + Allowlist of file extensions (e.g. \['.html', '.css']). Default: all allowed. + + + + Basic auth credentials as \[username, password]. Default: none. + + + + Blocklist of file extensions or names. Default: \['.env', '.git', '.gitignore', '.key', '.pem', '.crt', '.pyc', '**pycache**', '.DS\_Store', '.swp'] + + + + Path to a JSON config file. Default: none. + + + + Map of URL route prefixes to local directory paths. Default: \{\}. + + + + Enable CORS. Default: true. + + + + Serve directory listings and fall back to index.html. Default: false. + + + + Maximum file size in bytes. Default: 104857600 (100 MB). + + + + Port to bind to. Default: 8002. + + + + SSL/TLS configuration options. + + +#### Source + +[`src/WebService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/WebService.ts) + +Line 53. + +## Source + +[`src/WebService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/WebService.ts) + +Line 120. diff --git a/fern/products/sdk-reference/typescript/webhook-middleware/index.mdx b/fern/products/sdk-reference/typescript/webhook-middleware/index.mdx new file mode 100644 index 0000000000..1a1b656676 --- /dev/null +++ b/fern/products/sdk-reference/typescript/webhook-middleware/index.mdx @@ -0,0 +1,106 @@ +--- +slug: "/reference/typescript/webhook-middleware" +title: "WebhookMiddleware" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "WebhookMiddleware" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/WebhookMiddleware.ts" +--- +# `WebhookMiddleware` + +## Signature + +```typescript +module WebhookMiddleware +``` + +## Constants + + + Canonical lowercase header names (Hono's c.req.header() is case-insensitive). + + + + +## Functions + +### webhookValidationMiddleware + +Build a Hono middleware that enforces SignalWire webhook signature +validation. + +The middleware: + +1. Captures the raw body (`await c.req.text()`) BEFORE any other + consumer reads the stream. The string is stashed at `c.set('rawBody')` + so the downstream handler can re-parse without re-reading the stream. +2. Pulls the `X-SignalWire-Signature` header (or the `X-Twilio-Signature` + alias). +3. Reconstructs the public URL (`SWML_PROXY_URL_BASE` env > forwarded + headers when `trustProxy` > raw request URL). +4. Calls [validateWebhookSignature](/docs/sdk-reference/reference/typescript/webhook-validator#validate-webhook-signature). +5. On any failure: responds 403 with no body detail (would leak which + branch failed). Does NOT call `next()`. +6. On success: `next()`. + +#### Signature + +```typescript +webhookValidationMiddleware(opts: WebhookValidationOptions): MiddlewareHandler +``` + +#### Parameters + + + +#### Returns + +`MiddlewareHandler` + +#### Throws + +- Error at construction time if `signingKey` is empty. + +#### Source + +[`src/WebhookMiddleware.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/WebhookMiddleware.ts) + +Line 126. + +## Interfaces + +### WebhookValidationOptions + +Options for [webhookValidationMiddleware](/docs/sdk-reference/reference/typescript/webhook-middleware#webhook-validation-middleware). + +#### Signature + +```typescript +interface WebhookValidationOptions +``` + +#### Properties + + + The customer's Signing Key. Required; passing an empty string throws at construction time (it's a programming error, not a runtime failure). + + + + When true, honor `X-Forwarded-Proto` / `X-Forwarded-Host` headers when reconstructing the URL. Default false — proxy headers are spoofable, so opt in only when you control the proxy. + + +#### Source + +[`src/WebhookMiddleware.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/WebhookMiddleware.ts) + +Line 42. + +## Source + +[`src/WebhookMiddleware.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/WebhookMiddleware.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/webhook-validator/index.mdx b/fern/products/sdk-reference/typescript/webhook-validator/index.mdx new file mode 100644 index 0000000000..3e5d7b8791 --- /dev/null +++ b/fern/products/sdk-reference/typescript/webhook-validator/index.mdx @@ -0,0 +1,173 @@ +--- +slug: "/reference/typescript/webhook-validator" +title: "WebhookValidator" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "WebhookValidator" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/WebhookValidator.ts" +--- +# `WebhookValidator` + +## Signature + +```typescript +module WebhookValidator +``` + +## Functions + +### validateRequest + +Legacy `@signalwire/compatibility-api` drop-in entry point. + +If `paramsOrRawBody` is a string, delegates to +[validateWebhookSignature](/docs/sdk-reference/reference/typescript/webhook-validator#validate-webhook-signature) (Scheme A then Scheme B with parsed form). + +If it's a record, Map, or list of \[key, value] tuples, treats it as +pre-parsed form params and runs Scheme B directly (with URL port +normalization and optional bodySHA256 fallback). + +The parameter type matches Python's +`Union[str, Mapping[str, Any], List[Tuple[str, Any]], None]` for +cross-language signature parity. `Map` is also +accepted at runtime for ergonomic TS usage. + +#### Signature + +```typescript +validateRequest( + signingKey: string, + signature: string, + url: string, + paramsOrRawBody: string | Record | [string, unknown][] | null | undefined +): boolean +``` + +#### Parameters + + + Customer's Signing Key. Empty / null throws Error. + + + + Header value. Missing / empty returns false. + + + + Full URL SignalWire POSTed to. + + + + String raw body OR pre-parsed form params. + + +#### Returns + +`boolean` — true on match, false otherwise. + +#### Throws + +- Error when `signingKey` is missing. +- TypeError when `paramsOrRawBody` is neither a string nor a record/Map/array of tuples (e.g. a plain number). + +#### Source + +[`src/WebhookValidator.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/WebhookValidator.ts) + +Line 373. + +*** + +### validateWebhookSignature + +Validate a SignalWire webhook signature against both schemes (A then B). + +#### Signature + +```typescript +validateWebhookSignature( + signingKey: string, + signature: string, + url: string, + rawBody: string +): boolean +``` + +#### Parameters + + + The customer's Signing Key from the Dashboard. Empty / null throws `Error` — that's a programming error, not a validation failure. + + + + The `X-SignalWire-Signature` header value (or `X-Twilio-Signature` for cXML compat). Missing / empty returns `false` without throwing. + + + + The full URL SignalWire POSTed to (scheme, host, optional port, path, query). Must match what the platform saw — see the URL reconstruction section of porting-sdk/webhooks.md. + + + + The raw request body bytes as a UTF-8 string, BEFORE any JSON / form parsing. Must be a string — passing a parsed object throws `TypeError`. + + +#### Returns + +`boolean` — `true` if the signature matches either Scheme A (hex JSON) or Scheme B (base64 form, with port-normalization variants and optional bodySHA256 fallback). `false` otherwise. + +#### Throws + +- Error when `signingKey` is missing / empty. +- TypeError when `rawBody` is not a string. + +#### Source + +[`src/WebhookValidator.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/WebhookValidator.ts) + +Line 300. + +## Type Aliases + +### FormParams + +#### Signature + +```typescript +type FormParams = Record | [string, FormParamValue][] | Map +``` + +#### Source + +[`src/WebhookValidator.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/WebhookValidator.ts) + +Line 30. + +*** + +### FormParamValue + +Form params can be a record, a list of \[key, value] tuples, or a Map. Values +may be a string, number, boolean, null/undefined, or an array of those for +repeated keys. + +#### Signature + +```typescript +type FormParamValue = string | number | boolean | null | undefined +``` + +#### Source + +[`src/WebhookValidator.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/WebhookValidator.ts) + +Line 29. + +## Source + +[`src/WebhookValidator.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/WebhookValidator.ts) + +Line 1. From 7ceba096b0db64ffdc5f907e3da915b1b872ba8d Mon Sep 17 00:00:00 2001 From: Devon-White Date: Fri, 12 Jun 2026 07:44:43 -0400 Subject: [PATCH 2/8] Fresh regen: fix placeholder-URL autolinks + render inline code tags Regenerated all 10 SDKs from latest source. Prose-safety fixes: - placeholder example URLs (http://host:port, http://127.0.0.1:NNNN, http://hostFallback:portFallback{path}) wrapped in code so Fern no longer auto-links + rejects them as Invalid URL. - C#/Java XML-doc / inline tags now render as code spans instead of literal <code> text (58 dotnet + 2 java pages). fern check: 3 errors -> 0 (0 broken links). --- .../signal-wire.agent/agent-base/index.mdx | 52 ++--- .../signal-wire.agent/agent-options/index.mdx | 4 +- .../dotnet/signal-wire.agent/index.mdx | 2 +- .../context-builder/index.mdx | 7 +- .../signal-wire.contexts/context/index.mdx | 2 +- .../dotnet/signal-wire.contexts/index.mdx | 4 +- .../reserved-tool-names/index.mdx | 4 +- .../signal-wire.contexts/step/index.mdx | 18 +- .../signal-wire.data-map/data-map/index.mdx | 6 +- .../dotnet/signal-wire.data-map/index.mdx | 2 +- .../concierge-agent/index.mdx | 2 +- .../faq-bot-agent/index.mdx | 2 +- .../dotnet/signal-wire.prefabs/index.mdx | 10 +- .../info-gatherer-agent/index.mdx | 2 +- .../receptionist-agent/index.mdx | 2 +- .../survey-agent/index.mdx | 2 +- .../dotnet/signal-wire.relay/action/index.mdx | 4 +- .../call-state-extensions/index.mdx | 5 +- .../dotnet/signal-wire.relay/call/index.mdx | 2 +- .../dotnet/signal-wire.relay/client/index.mdx | 15 +- .../collect-action/index.mdx | 4 +- .../signal-wire.relay/detect-action/index.mdx | 2 +- .../dotnet/signal-wire.relay/device/index.mdx | 26 ++- .../dial-state-extensions/index.mdx | 3 +- .../dotnet/signal-wire.relay/index.mdx | 37 ++-- .../message-state-extensions/index.mdx | 6 +- .../signal-wire.relay/message/index.mdx | 2 +- .../signal-wire.rest/http-client/index.mdx | 2 +- .../signal-wire.rest/rest-client/index.mdx | 2 +- .../dotnet/signal-wire.security/index.mdx | 4 +- .../session-manager/index.mdx | 2 +- .../webhook-validation-middleware/index.mdx | 14 +- .../webhook-validator/index.mdx | 13 +- .../claude-skills-skill/index.mdx | 20 +- .../datasphere-skill/index.mdx | 8 +- .../signal-wire.skills.builtin/index.mdx | 14 +- .../mcp-gateway-skill/index.mdx | 12 +- .../native-vector-search-skill/index.mdx | 7 +- .../spider-skill/index.mdx | 7 +- .../web-search-skill/index.mdx | 22 +- .../wikipedia-search-skill/index.mdx | 11 +- .../dotnet/signal-wire.skills/index.mdx | 6 +- .../skill-name-extensions/index.mdx | 3 +- .../callback-method-extensions/index.mdx | 4 +- .../codec-extensions/index.mdx | 7 +- .../conference-beep-extensions/index.mdx | 4 +- .../conference-record-extensions/index.mdx | 4 +- .../conference-trim-extensions/index.mdx | 4 +- .../function-result/index.mdx | 209 ++++++++++-------- .../dotnet/signal-wire.swaig/index.mdx | 85 +++---- .../join-conference-options/index.mdx | 41 ++-- .../parameter-schema/index.mdx | 70 +++--- .../record-direction-extensions/index.mdx | 5 +- .../record-format-extensions/index.mdx | 5 +- .../tap-direction-extensions/index.mdx | 5 +- .../dotnet/signal-wire.swml/service/index.mdx | 8 +- .../pkg/swml/swml/service/index.mdx | 2 +- .../com/signalwire/sdk/utils/utils/index.mdx | 2 +- .../sdk/utils/utils/url-validator/index.mdx | 2 +- .../signal-wire/rest/http-client/index.mdx | 2 +- 60 files changed, 454 insertions(+), 379 deletions(-) diff --git a/fern/products/sdk-reference/dotnet/signal-wire.agent/agent-base/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.agent/agent-base/index.mdx index 6951e8c6fd..114b3dece9 100644 --- a/fern/products/sdk-reference/dotnet/signal-wire.agent/agent-base/index.mdx +++ b/fern/products/sdk-reference/dotnet/signal-wire.agent/agent-base/index.mdx @@ -17,7 +17,7 @@ lustri: AI agent built on <xref href="SignalWire.SWML.Service" data-throw-if-not-resolved="false"></xref>. Provides prompt management, SWAIG tool dispatch, context switching, skill stubs, and a 5-phase SWML rendering pipeline. -All configuration methods return <code>this</code> for fluent chaining. +All configuration methods return `this` for fluent chaining. ## Signature @@ -34,15 +34,15 @@ public class AgentBase : Service - True iff signature validation is enabled — i.e. either the <code>SigningKey</code> option or <code>SIGNALWIRE\_SIGNING\_KEY</code> env var was set at construction time. (Python parity: <code>bool(agent.signing\_key)</code>.) + True iff signature validation is enabled — i.e. either the `SigningKey` option or `SIGNALWIRE_SIGNING_KEY` env var was set at construction time. (Python parity: `bool(agent.signing_key)`.) - The prompt as a <xref href="SignalWire.POM.PromptObjectModel" data-throw-if-not-resolved="false"></xref> instance (Python parity: `agent.pom`). Returns null when <code>UsePom</code> is false. Materialised on each access from the internal list-of-dicts so mutations stay round-trip-safe. To inspect raw section dicts, use <xref href="SignalWire.Agent.AgentBase.GetPromptSections" data-throw-if-not-resolved="false"></xref>. + The prompt as a <xref href="SignalWire.POM.PromptObjectModel" data-throw-if-not-resolved="false"></xref> instance (Python parity: `agent.pom`). Returns null when `UsePom` is false. Materialised on each access from the internal list-of-dicts so mutations stay round-trip-safe. To inspect raw section dicts, use <xref href="SignalWire.Agent.AgentBase.GetPromptSections" data-throw-if-not-resolved="false"></xref>. - The configured Signing Key, or null when validation is disabled. Read-only — the resolution order (constructor arg → <code>SIGNALWIRE\_SIGNING\_KEY</code> env) is fixed at construction time. (Python parity: <code>agent.signing\_key</code>.) + The configured Signing Key, or null when validation is disabled. Read-only — the resolution order (constructor arg → `SIGNALWIRE_SIGNING_KEY` env) is fixed at construction time. (Python parity: `agent.signing_key`.) @@ -50,7 +50,7 @@ public class AgentBase : Service - The complete set of internal SWAIG function names that accept fillers, matching the SWAIGInternalFiller schema definition. Any name outside this set is silently ignored by the runtime — <xref href="SignalWire.Agent.AgentBase.SetInternalFillers(System.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Collections.Generic.List%7bSystem.String%7d%7d%7d)" data-throw-if-not-resolved="false"></xref> and <xref href="SignalWire.Agent.AgentBase.AddInternalFiller(System.String%2cSystem.String%2cSystem.Collections.Generic.List%7bSystem.String%7d)" data-throw-if-not-resolved="false"></xref> warn if you pass an unknown name. Notable absences: <code>change\_step</code>, <code>gather\_submit</code>, or arbitrary user-defined SWAIG function names are NOT supported. + The complete set of internal SWAIG function names that accept fillers, matching the SWAIGInternalFiller schema definition. Any name outside this set is silently ignored by the runtime — <xref href="SignalWire.Agent.AgentBase.SetInternalFillers(System.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Collections.Generic.List%7bSystem.String%7d%7d%7d)" data-throw-if-not-resolved="false"></xref> and <xref href="SignalWire.Agent.AgentBase.AddInternalFiller(System.String%2cSystem.String%2cSystem.Collections.Generic.List%7bSystem.String%7d)" data-throw-if-not-resolved="false"></xref> warn if you pass an unknown name. Notable absences: `change_step`, `gather_submit`, or arbitrary user-defined SWAIG function names are NOT supported. ## Methods @@ -230,9 +230,9 @@ Line 730. Add a language configuration with optional per-language engine-specific params (e.g. voice stability/similarity for ElevenLabs, model knobs). -The <code>params</code> key is only emitted into SWML when non-empty, so +The `params` key is only emitted into SWML when non-empty, so existing language entries stay byte-identical when no params are passed. -Mirrors signalwire-python's <code>AIConfigMixin.add\_language(params=...)</code>. +Mirrors signalwire-python's `AIConfigMixin.add_language(params=...)`. #### Signature @@ -273,7 +273,7 @@ Mirrors signalwire-python's <code>AIConfigMixin.add\_language(params=...)< - Optional engine-specific params dict. <code>null</code> or empty omits the SWML <code>params</code> key. + Optional engine-specific params dict. `null` or empty omits the SWML `params` key. #### Returns (Overload 1) @@ -724,7 +724,8 @@ Line 441. Return the ContextBuilder, creating it lazily on first access. The builder is wired to report registered SWAIG tool names back so its <xref href="SignalWire.Contexts.ContextBuilder.Validate" data-throw-if-not-resolved="false"></xref> can check for -collisions with reserved native tool names (<code>next\_step</code>, <code>change\_context</code>, <code>gather\_submit</code>). +collisions with reserved native tool names (`next_step`, +`change_context`, `gather_submit`). #### Signature @@ -823,8 +824,8 @@ Line 392. ### GetLanguageParams(string) -Read the per-language <code>params</code> dict for a previously-added -language. Returns <code>null</code> when the params were never set or +Read the per-language `params` dict for a previously-added +language. Returns `null` when the params were never set or when the code is unknown — no exception path, matching Python. #### Signature @@ -1018,22 +1019,23 @@ Line 1403. ### HandleRequest(string, string, Dictionary\, string?) Override the base dispatch to enforce webhook signature validation on -POST requests targeting the signed routes (<code>/</code>, <code>/swaig</code>, <code>/post\_prompt</code>) when <xref href="SignalWire.Agent.AgentBase.SigningKey" data-throw-if-not-resolved="false"></xref> is configured. +POST requests targeting the signed routes (`/`, `/swaig`, +`/post_prompt`) when <xref href="SignalWire.Agent.AgentBase.SigningKey" data-throw-if-not-resolved="false"></xref> is configured. <p>Validation is gated behind Basic Auth: callers must already satisfy the SWMLService basic-auth check (it always runs first in <xref href="SignalWire.SWML.Service.HandleRequest(System.String%2cSystem.String%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.String%7d%2cSystem.String)" data-throw-if-not-resolved="false"></xref>) before we even look at -signatures, matching Python where <code>signing_key</code> is layered on -top of <code>basic_auth</code>.</p> +signatures, matching Python where `signing_key` is layered on +top of `basic_auth`.</p> <p>On invalid signature: returns 403 directly without dispatching to the agent's POST handler. On valid signature (or non-POST, or non-signed route): delegates to <xref href="SignalWire.SWML.Service.HandleRequest(System.String%2cSystem.String%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.String%7d%2cSystem.String)" data-throw-if-not-resolved="false"></xref>. </p> -<p>(Python parity: <code>web_mixin._register_routes</code> wraps the -signed POST routes in a FastAPI <code>Depends(sig_dep)</code> dependency -when <code>signing_key</code> is set; this is the .NET equivalent.)</p> +<p>(Python parity: `web_mixin._register_routes` wraps the +signed POST routes in a FastAPI `Depends(sig_dep)` dependency +when `signing_key` is set; this is the .NET equivalent.)</p> **Modifiers:** `override` @@ -1517,7 +1519,7 @@ Line 1103. ### ResetContexts() Remove all contexts, returning the agent to a no-contexts state. -This is a convenience wrapper around <code>DefineContexts().Reset()</code>. +This is a convenience wrapper around `DefineContexts().Reset()`. Use it in a dynamic config callback when you need to rebuild contexts from scratch for a specific request. @@ -1620,14 +1622,14 @@ TTS) while an internal/native function is running, so the caller doesn't hear dead air during transitions or background work.</p> <p>Supported function names (match the SWAIGInternalFiller -schema): <code>hangup</code>, <code>check_time</code>, <code>wait_for_user</code>, -<code>wait_seconds</code>, <code>adjust_response_latency</code>, -<code>next_step</code>, <code>change_context</code>, <code>get_visual_input</code>, -<code>get_ideal_strategy</code>. See +schema): `hangup`, `check_time`, `wait_for_user`, +`wait_seconds`, `adjust_response_latency`, +`next_step`, `change_context`, `get_visual_input`, +`get_ideal_strategy`. See <xref href="SignalWire.Agent.AgentBase.SupportedInternalFillerNames" data-throw-if-not-resolved="false"></xref>.</p> -<p>Notably NOT supported: <code>change_step</code>, -<code>gather_submit</code>, or arbitrary user-defined SWAIG function +<p>Notably NOT supported: `change_step`, +`gather_submit`, or arbitrary user-defined SWAIG function names. The runtime only honors fillers for the names listed above; everything else is silently ignored at the SWML level. This method warns at registration time if you pass an unknown name so you @@ -1675,7 +1677,7 @@ Line 672. ### SetLanguageParams(string, Dictionary\) -Set (or replace) the per-language <code>params</code> dict on an +Set (or replace) the per-language `params` dict on an already-added language. Useful when language entries are built up via <xref href="SignalWire.Agent.AgentBase.AddLanguage(System.String%2cSystem.String%2cSystem.String)" data-throw-if-not-resolved="false"></xref> first and engine-specific tuning is added later (e.g., from a config loader). diff --git a/fern/products/sdk-reference/dotnet/signal-wire.agent/agent-options/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.agent/agent-options/index.mdx index c69df5ffbf..dca39bd9cd 100644 --- a/fern/products/sdk-reference/dotnet/signal-wire.agent/agent-options/index.mdx +++ b/fern/products/sdk-reference/dotnet/signal-wire.agent/agent-options/index.mdx @@ -48,11 +48,11 @@ public sealed class AgentOptions - Optional SignalWire Signing Key (from Dashboard → API Credentials). When set, webhook signature validation is enforced on POST /, /swaig, /post\_prompt — unsigned or invalidly-signed requests get a 403. Falls back to the <code>SIGNALWIRE\_SIGNING\_KEY</code> env var if not passed. See <code>porting-sdk/webhooks.md</code> for the contract. (Python parity: <code>AgentBase.**init**(signing\_key=...)</code>.) + Optional SignalWire Signing Key (from Dashboard → API Credentials). When set, webhook signature validation is enforced on POST /, /swaig, /post\_prompt — unsigned or invalidly-signed requests get a 403. Falls back to the `SIGNALWIRE_SIGNING_KEY` env var if not passed. See `porting-sdk/webhooks.md` for the contract. (Python parity: `AgentBase.__init__(signing_key=...)`.) - If true, honor <code>X-Forwarded-Proto</code> / <code>X-Forwarded-Host</code> headers when reconstructing the URL for signature validation. Default false because proxy headers are spoofable; opt in only when you control the proxy chain. (Python parity: <code>AgentBase.**init**(trust\_proxy\_for\_signature=...)</code>.) + If true, honor `X-Forwarded-Proto` / `X-Forwarded-Host` headers when reconstructing the URL for signature validation. Default false because proxy headers are spoofable; opt in only when you control the proxy chain. (Python parity: `AgentBase.__init__(trust_proxy_for_signature=...)`.) diff --git a/fern/products/sdk-reference/dotnet/signal-wire.agent/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.agent/index.mdx index 3616fc5587..20310c1186 100644 --- a/fern/products/sdk-reference/dotnet/signal-wire.agent/index.mdx +++ b/fern/products/sdk-reference/dotnet/signal-wire.agent/index.mdx @@ -15,7 +15,7 @@ lustri: - AI agent built on <xref href="SignalWire.SWML.Service" data-throw-if-not-resolved="false"></xref>. Provides prompt management, SWAIG tool dispatch, context switching, skill stubs, and a 5-phase SWML rendering pipeline. All configuration methods return <code>this</code> for fluent chaining. + AI agent built on <xref href="SignalWire.SWML.Service" data-throw-if-not-resolved="false"></xref>. Provides prompt management, SWAIG tool dispatch, context switching, skill stubs, and a 5-phase SWML rendering pipeline. All configuration methods return `this` for fluent chaining. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.contexts/context-builder/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.contexts/context-builder/index.mdx index 4c687daca9..45542aa38e 100644 --- a/fern/products/sdk-reference/dotnet/signal-wire.contexts/context-builder/index.mdx +++ b/fern/products/sdk-reference/dotnet/signal-wire.contexts/context-builder/index.mdx @@ -26,8 +26,8 @@ for a response.</p> <p><b>Native tools auto-injected by the runtime:</b> When a step (or its enclosing context) declares valid_steps or valid_contexts, the runtime auto-injects two native tools so the model can navigate the -flow: <code>next_step</code> and <code>change_context</code>. A third native tool, -<code>gather_submit</code>, is injected during gather_info questioning. +flow: `next_step` and `change_context`. A third native tool, +`gather_submit`, is injected during gather_info questioning. These three names are reserved: <xref href="SignalWire.Contexts.ContextBuilder.Validate" data-throw-if-not-resolved="false"></xref> rejects any agent that defines a SWAIG tool with one of them. See <xref href="SignalWire.Contexts.ReservedToolNames.Reserved" data-throw-if-not-resolved="false"></xref>.</p> @@ -72,7 +72,8 @@ Line 622. ### AttachToolNameSupplier(Func\>) -Attach a supplier that returns registered SWAIG tool names so <xref href="SignalWire.Contexts.ContextBuilder.Validate" data-throw-if-not-resolved="false"></xref> can check them against <xref href="SignalWire.Contexts.ReservedToolNames.Reserved" data-throw-if-not-resolved="false"></xref>. Called internally by <code>AgentBase.DefineContexts()</code>. +Attach a supplier that returns registered SWAIG tool names so <xref href="SignalWire.Contexts.ContextBuilder.Validate" data-throw-if-not-resolved="false"></xref> can check them against <xref href="SignalWire.Contexts.ReservedToolNames.Reserved" data-throw-if-not-resolved="false"></xref>. Called internally by +`AgentBase.DefineContexts()`. #### Signature diff --git a/fern/products/sdk-reference/dotnet/signal-wire.contexts/context/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.contexts/context/index.mdx index a40b77ad18..cc85ab2418 100644 --- a/fern/products/sdk-reference/dotnet/signal-wire.contexts/context/index.mdx +++ b/fern/products/sdk-reference/dotnet/signal-wire.contexts/context/index.mdx @@ -485,7 +485,7 @@ Set which step the context starts on when entered. <p>By default, a context starts on its first step (index 0). Use this to skip a preamble step on re-entry via -<code>change_context</code>.</p> +`change_context`.</p> #### Signature diff --git a/fern/products/sdk-reference/dotnet/signal-wire.contexts/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.contexts/index.mdx index 9357b39a35..3d47be0105 100644 --- a/fern/products/sdk-reference/dotnet/signal-wire.contexts/index.mdx +++ b/fern/products/sdk-reference/dotnet/signal-wire.contexts/index.mdx @@ -17,7 +17,7 @@ lustri: - Builder for multi-step, multi-context AI agent workflows. <p>A ContextBuilder owns one or more <xref href="SignalWire.Contexts.Context" data-throw-if-not-resolved="false"></xref>s; each context owns an ordered list of <xref href="SignalWire.Contexts.Step" data-throw-if-not-resolved="false"></xref>s. Only one context and one step is active at a time. Per chat turn, the runtime injects the current step's instructions as a system message, then asks the LLM for a response.</p> <p><b>Native tools auto-injected by the runtime:</b> When a step (or its enclosing context) declares valid\_steps or valid\_contexts, the runtime auto-injects two native tools so the model can navigate the flow: <code>next\_step</code> and <code>change\_context</code>. A third native tool, <code>gather\_submit</code>, is injected during gather\_info questioning. These three names are reserved: <xref href="SignalWire.Contexts.ContextBuilder.Validate" data-throw-if-not-resolved="false"></xref> rejects any agent that defines a SWAIG tool with one of them. See <xref href="SignalWire.Contexts.ReservedToolNames.Reserved" data-throw-if-not-resolved="false"></xref>.</p> <p><b>Function whitelisting (<xref href="SignalWire.Contexts.Step.SetFunctions(System.Object)" data-throw-if-not-resolved="false"></xref>):</b> Each step may declare a functions whitelist. The whitelist is applied in-memory at the start of each LLM turn. CRITICALLY: if a step does NOT declare a functions field, it INHERITS the previous step's active set. See <xref href="SignalWire.Contexts.Step.SetFunctions(System.Object)" data-throw-if-not-resolved="false"></xref> for details and examples.</p> + Builder for multi-step, multi-context AI agent workflows. <p>A ContextBuilder owns one or more <xref href="SignalWire.Contexts.Context" data-throw-if-not-resolved="false"></xref>s; each context owns an ordered list of <xref href="SignalWire.Contexts.Step" data-throw-if-not-resolved="false"></xref>s. Only one context and one step is active at a time. Per chat turn, the runtime injects the current step's instructions as a system message, then asks the LLM for a response.</p> <p><b>Native tools auto-injected by the runtime:</b> When a step (or its enclosing context) declares valid\_steps or valid\_contexts, the runtime auto-injects two native tools so the model can navigate the flow: `next_step` and `change_context`. A third native tool, `gather_submit`, is injected during gather\_info questioning. These three names are reserved: <xref href="SignalWire.Contexts.ContextBuilder.Validate" data-throw-if-not-resolved="false"></xref> rejects any agent that defines a SWAIG tool with one of them. See <xref href="SignalWire.Contexts.ReservedToolNames.Reserved" data-throw-if-not-resolved="false"></xref>.</p> <p><b>Function whitelisting (<xref href="SignalWire.Contexts.Step.SetFunctions(System.Object)" data-throw-if-not-resolved="false"></xref>):</b> Each step may declare a functions whitelist. The whitelist is applied in-memory at the start of each LLM turn. CRITICALLY: if a step does NOT declare a functions field, it INHERITS the previous step's active set. See <xref href="SignalWire.Contexts.Step.SetFunctions(System.Object)" data-throw-if-not-resolved="false"></xref> for details and examples.</p> @@ -25,7 +25,7 @@ lustri: - Reserved tool names auto-injected by the runtime when contexts/steps are present. User-defined SWAIG tools must not collide with these names. <ul><li><code>next\_step</code> / <code>change\_context</code> are injected when valid\_steps or valid\_contexts is set so the model can navigate the flow.</li><li><code>gather\_submit</code> is injected while a step's gather\_info is collecting answers.</li></ul> <xref href="SignalWire.Contexts.ContextBuilder.Validate" data-throw-if-not-resolved="false"></xref> rejects any agent that registers a user tool sharing one of these names — the runtime would never call the user tool because the native one wins. + Reserved tool names auto-injected by the runtime when contexts/steps are present. User-defined SWAIG tools must not collide with these names. <ul><li>`next_step` / `change_context` are injected when valid\_steps or valid\_contexts is set so the model can navigate the flow.</li><li>`gather_submit` is injected while a step's gather\_info is collecting answers.</li></ul> <xref href="SignalWire.Contexts.ContextBuilder.Validate" data-throw-if-not-resolved="false"></xref> rejects any agent that registers a user tool sharing one of these names — the runtime would never call the user tool because the native one wins. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.contexts/reserved-tool-names/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.contexts/reserved-tool-names/index.mdx index bf94e86685..140e0b2697 100644 --- a/fern/products/sdk-reference/dotnet/signal-wire.contexts/reserved-tool-names/index.mdx +++ b/fern/products/sdk-reference/dotnet/signal-wire.contexts/reserved-tool-names/index.mdx @@ -18,8 +18,8 @@ lustri: Reserved tool names auto-injected by the runtime when contexts/steps are present. User-defined SWAIG tools must not collide with these names. -<ul><li><code>next_step</code> / <code>change_context</code> are injected when -valid_steps or valid_contexts is set so the model can navigate the flow.</li><li><code>gather_submit</code> is injected while a step's gather_info is +<ul><li>`next_step` / `change_context` are injected when +valid_steps or valid_contexts is set so the model can navigate the flow.</li><li>`gather_submit` is injected while a step's gather_info is collecting answers.</li></ul> <xref href="SignalWire.Contexts.ContextBuilder.Validate" data-throw-if-not-resolved="false"></xref> rejects any agent that registers a diff --git a/fern/products/sdk-reference/dotnet/signal-wire.contexts/step/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.contexts/step/index.mdx index da0e58aebf..b67f9428cb 100644 --- a/fern/products/sdk-reference/dotnet/signal-wire.contexts/step/index.mdx +++ b/fern/products/sdk-reference/dotnet/signal-wire.contexts/step/index.mdx @@ -69,17 +69,17 @@ the model is asking gather questions, the runtime forcibly deactivates ALL of the step's other functions. The only callable tools during a gather question are:</p> -<ul><li><code>gather_submit</code> (the native answer-submission tool)</li><li>Whatever names you pass in this question's <code>"functions"</code> +<ul><li>`gather_submit` (the native answer-submission tool)</li><li>Whatever names you pass in this question's `"functions"` option</li></ul> -<p><code>next_step</code> and <code>change_context</code> are also filtered +<p>`next_step` and `change_context` are also filtered out — the model cannot navigate away until the gather completes. This is by design: it forces a tight ask → submit → next-question loop.</p> <p>If a question needs to call out to a tool (e.g. validate an email, geocode a ZIP), list that tool name in this question's -<code>"functions"</code> option. Functions listed here are active ONLY +`"functions"` option. Functions listed here are active ONLY for this question.</p> #### Signature @@ -160,7 +160,7 @@ after this step executes — clearing the steps list, current step index, valid_steps, and valid_contexts. The agent keeps running, but operates only under the base system prompt and the context-level prompt; no more step instructions are injected and -no more <code>next_step</code> tool is offered.</p> +no more `next_step` tool is offered.</p> <p>To actually end the call, call a hangup tool or define a hangup hook.</p> @@ -196,7 +196,7 @@ active. this method, the step inherits whichever function set was active on the previous step (or the previous context's last step). The server-side runtime only resets the active set when a step -explicitly declares its <code>functions</code> field. This is the most +explicitly declares its `functions` field. This is the most common source of bugs in multi-step agents: forgetting <xref href="SignalWire.Contexts.Step.SetFunctions(System.Object)" data-throw-if-not-resolved="false"></xref> on a later step lets the previous step's tools leak through. Best practice is to call @@ -208,10 +208,10 @@ accuracy degrades noticeably past ~7-8 simultaneously-active tools per call. Use per-step whitelisting to partition large tool collections.</p> -<p>Internal functions (e.g. <code>gather_submit</code>, hangup hook) +<p>Internal functions (e.g. `gather_submit`, hangup hook) are ALWAYS protected and cannot be deactivated by this whitelist. -The native navigation tools <code>next_step</code> and -<code>change_context</code> are injected automatically when +The native navigation tools `next_step` and +`change_context` are injected automatically when <xref href="SignalWire.Contexts.Step.SetValidSteps(System.Collections.Generic.List%7bSystem.String%7d)" data-throw-if-not-resolved="false"></xref> / <xref href="SignalWire.Contexts.Step.SetValidContexts(System.Collections.Generic.List%7bSystem.String%7d)" data-throw-if-not-resolved="false"></xref> is used; they are not affected by this list.</p> @@ -224,7 +224,7 @@ public Step SetFunctions(object functions) #### Parameters - One of: \

    \
  • \List\\ — whitelist of function names allowed in this step.\
  • \
  • An empty list — explicit disable-all (no user functions callable).\
  • \
  • The string \"none"\ — synonym for the empty list.\
  • \
+ One of: \
    \
  • \`List\\` — whitelist of function names allowed in this step.\
  • \
  • An empty list — explicit disable-all (no user functions callable).\
  • \
  • The string \`"none"\` — synonym for the empty list.\
  • \
#### Returns diff --git a/fern/products/sdk-reference/dotnet/signal-wire.data-map/data-map/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.data-map/data-map/index.mdx index 733528e18c..f3681802ac 100644 --- a/fern/products/sdk-reference/dotnet/signal-wire.data-map/data-map/index.mdx +++ b/fern/products/sdk-reference/dotnet/signal-wire.data-map/data-map/index.mdx @@ -16,7 +16,7 @@ lustri: # `DataMap` Builds a SWAIG data-map function definition with parameters, expressions, webhooks, -and output configuration. All builder methods return <code>this</code> for fluent chaining. +and output configuration. All builder methods return `this` for fluent chaining. ## Signature @@ -325,7 +325,7 @@ Add a parameter to this data-map tool — the <code class="paramref">descript is LLM-FACING. <p>Each parameter description is rendered into the OpenAI -tool schema under <code>parameters.properties.<name>.description</code> +tool schema under `parameters.properties.<name>.description` and sent to the model. The model uses it to decide HOW to fill in the argument from user speech. It is prompt engineering, not developer FYI.</p> @@ -398,7 +398,7 @@ Set the LLM-facing tool description (the "purpose"). PROMPT ENGINEERING, not developer documentation. <p>The description string is rendered into the OpenAI tool -schema <code>description</code> field on every LLM turn. The model +schema `description` field on every LLM turn. The model reads it to decide WHEN to call this tool. A vague <xref href="SignalWire.DataMap.DataMap.Purpose(System.String)" data-throw-if-not-resolved="false"></xref> is the #1 cause of "the model has the right tool but doesn't call it" failures with data-map tools.</p> diff --git a/fern/products/sdk-reference/dotnet/signal-wire.data-map/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.data-map/index.mdx index 4dc4668351..2e0be2a0f9 100644 --- a/fern/products/sdk-reference/dotnet/signal-wire.data-map/index.mdx +++ b/fern/products/sdk-reference/dotnet/signal-wire.data-map/index.mdx @@ -15,6 +15,6 @@ lustri: - Builds a SWAIG data-map function definition with parameters, expressions, webhooks, and output configuration. All builder methods return <code>this</code> for fluent chaining. + Builds a SWAIG data-map function definition with parameters, expressions, webhooks, and output configuration. All builder methods return `this` for fluent chaining. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.prefabs/concierge-agent/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.prefabs/concierge-agent/index.mdx index 86db611588..c5b7662c71 100644 --- a/fern/products/sdk-reference/dotnet/signal-wire.prefabs/concierge-agent/index.mdx +++ b/fern/products/sdk-reference/dotnet/signal-wire.prefabs/concierge-agent/index.mdx @@ -16,7 +16,7 @@ lustri: # `ConciergeAgent` Prefab concierge agent for venue/hotel style interactions. -Registers <code>check\_availability</code> and <code>get\_directions</code> tools. +Registers `check_availability` and `get_directions` tools. ## Signature diff --git a/fern/products/sdk-reference/dotnet/signal-wire.prefabs/faq-bot-agent/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.prefabs/faq-bot-agent/index.mdx index 0bcadee407..0e4d03c118 100644 --- a/fern/products/sdk-reference/dotnet/signal-wire.prefabs/faq-bot-agent/index.mdx +++ b/fern/products/sdk-reference/dotnet/signal-wire.prefabs/faq-bot-agent/index.mdx @@ -16,7 +16,7 @@ lustri: # `FAQBotAgent` Prefab FAQ bot agent with keyword-scored search. -Registers a <code>search\_faqs</code> tool. +Registers a `search_faqs` tool. ## Signature diff --git a/fern/products/sdk-reference/dotnet/signal-wire.prefabs/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.prefabs/index.mdx index 88eb4b9190..902e58c7ab 100644 --- a/fern/products/sdk-reference/dotnet/signal-wire.prefabs/index.mdx +++ b/fern/products/sdk-reference/dotnet/signal-wire.prefabs/index.mdx @@ -15,22 +15,22 @@ lustri: - Prefab concierge agent for venue/hotel style interactions. Registers <code>check\_availability</code> and <code>get\_directions</code> tools. + Prefab concierge agent for venue/hotel style interactions. Registers `check_availability` and `get_directions` tools. - Prefab FAQ bot agent with keyword-scored search. Registers a <code>search\_faqs</code> tool. + Prefab FAQ bot agent with keyword-scored search. Registers a `search_faqs` tool. - Prefab agent that gathers information by asking a series of questions. Registers <code>start\_questions</code> and <code>submit\_answer</code> tools. + Prefab agent that gathers information by asking a series of questions. Registers `start_questions` and `submit_answer` tools. - Prefab agent that greets callers and transfers them to departments. Registers <code>collect\_caller\_info</code> and <code>transfer\_call</code> tools. + Prefab agent that greets callers and transfers them to departments. Registers `collect_caller_info` and `transfer_call` tools. - Prefab agent that conducts surveys with typed question validation. Registers <code>validate\_response</code> and <code>log\_response</code> tools. + Prefab agent that conducts surveys with typed question validation. Registers `validate_response` and `log_response` tools. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.prefabs/info-gatherer-agent/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.prefabs/info-gatherer-agent/index.mdx index 7d75fa89d0..fd65299ed9 100644 --- a/fern/products/sdk-reference/dotnet/signal-wire.prefabs/info-gatherer-agent/index.mdx +++ b/fern/products/sdk-reference/dotnet/signal-wire.prefabs/info-gatherer-agent/index.mdx @@ -16,7 +16,7 @@ lustri: # `InfoGathererAgent` Prefab agent that gathers information by asking a series of questions. -Registers <code>start\_questions</code> and <code>submit\_answer</code> tools. +Registers `start_questions` and `submit_answer` tools. ## Signature diff --git a/fern/products/sdk-reference/dotnet/signal-wire.prefabs/receptionist-agent/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.prefabs/receptionist-agent/index.mdx index 1820868dcd..97e04a5994 100644 --- a/fern/products/sdk-reference/dotnet/signal-wire.prefabs/receptionist-agent/index.mdx +++ b/fern/products/sdk-reference/dotnet/signal-wire.prefabs/receptionist-agent/index.mdx @@ -16,7 +16,7 @@ lustri: # `ReceptionistAgent` Prefab agent that greets callers and transfers them to departments. -Registers <code>collect\_caller\_info</code> and <code>transfer\_call</code> tools. +Registers `collect_caller_info` and `transfer_call` tools. ## Signature diff --git a/fern/products/sdk-reference/dotnet/signal-wire.prefabs/survey-agent/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.prefabs/survey-agent/index.mdx index 4ccaca0bf8..5b450fa3f4 100644 --- a/fern/products/sdk-reference/dotnet/signal-wire.prefabs/survey-agent/index.mdx +++ b/fern/products/sdk-reference/dotnet/signal-wire.prefabs/survey-agent/index.mdx @@ -16,7 +16,7 @@ lustri: # `SurveyAgent` Prefab agent that conducts surveys with typed question validation. -Registers <code>validate\_response</code> and <code>log\_response</code> tools. +Registers `validate_response` and `log_response` tools. ## Signature diff --git a/fern/products/sdk-reference/dotnet/signal-wire.relay/action/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.relay/action/index.mdx index f96a32db9c..097a9b30dd 100644 --- a/fern/products/sdk-reference/dotnet/signal-wire.relay/action/index.mdx +++ b/fern/products/sdk-reference/dotnet/signal-wire.relay/action/index.mdx @@ -60,8 +60,8 @@ the standard terminal-state path. Default: any event type registered in <xref href="SignalWire.Relay.Constants.ActionTerminalStates" data-throw-if-not-resolved="false"></xref> may resolve. Override returns false to block resolution for a specific event type -(e.g. CollectAction blocks <code>calling.call.play</code> so the play -phase of <code>play\_and\_collect</code> doesn't resolve the collect side). +(e.g. CollectAction blocks `calling.call.play` so the play +phase of `play_and_collect` doesn't resolve the collect side). **Modifiers:** `virtual` diff --git a/fern/products/sdk-reference/dotnet/signal-wire.relay/call-state-extensions/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.relay/call-state-extensions/index.mdx index 7fcdae2100..2184d86264 100644 --- a/fern/products/sdk-reference/dotnet/signal-wire.relay/call-state-extensions/index.mdx +++ b/fern/products/sdk-reference/dotnet/signal-wire.relay/call-state-extensions/index.mdx @@ -29,7 +29,7 @@ public static class CallStateExtensions ### IsTerminal(CallState) -True when this state is terminal (the call has fully ended). Mirrors <xref href="SignalWire.Relay.Constants.CallTerminalStates" data-throw-if-not-resolved="false"></xref> — terminal = <code>ended</code>. +True when this state is terminal (the call has fully ended). Mirrors <xref href="SignalWire.Relay.Constants.CallTerminalStates" data-throw-if-not-resolved="false"></xref> — terminal = `ended`. **Modifiers:** `static` @@ -85,7 +85,8 @@ Line 69. ### TryParse(string?, out CallState) -Parse a wire string into a <xref href="SignalWire.Relay.CallState" data-throw-if-not-resolved="false"></xref>. Returns <code>false</code> (and <code>default</code>) for an unrecognised value — the +Parse a wire string into a <xref href="SignalWire.Relay.CallState" data-throw-if-not-resolved="false"></xref>. Returns +`false` (and `default`) for an unrecognised value — the server may introduce new states, so callers fall back to the raw string on <xref href="SignalWire.Relay.Call.State" data-throw-if-not-resolved="false"></xref> rather than crashing. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.relay/call/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.relay/call/index.mdx index e1c5887314..b855f63795 100644 --- a/fern/products/sdk-reference/dotnet/signal-wire.relay/call/index.mdx +++ b/fern/products/sdk-reference/dotnet/signal-wire.relay/call/index.mdx @@ -36,7 +36,7 @@ public class Call - The current call lifecycle state as the typed <xref href="SignalWire.Relay.CallState" data-throw-if-not-resolved="false"></xref> enum, parsed from <xref href="SignalWire.Relay.Call.State" data-throw-if-not-resolved="false"></xref>. Returns <code>null</code> when <xref href="SignalWire.Relay.Call.State" data-throw-if-not-resolved="false"></xref> is an unrecognised (e.g. newly-introduced server) value — read <xref href="SignalWire.Relay.Call.State" data-throw-if-not-resolved="false"></xref> for the raw string in that case. This is a typed convenience alongside the parity-bearing string <xref href="SignalWire.Relay.Call.State" data-throw-if-not-resolved="false"></xref>; it always agrees with it for known states. + The current call lifecycle state as the typed <xref href="SignalWire.Relay.CallState" data-throw-if-not-resolved="false"></xref> enum, parsed from <xref href="SignalWire.Relay.Call.State" data-throw-if-not-resolved="false"></xref>. Returns `null` when <xref href="SignalWire.Relay.Call.State" data-throw-if-not-resolved="false"></xref> is an unrecognised (e.g. newly-introduced server) value — read <xref href="SignalWire.Relay.Call.State" data-throw-if-not-resolved="false"></xref> for the raw string in that case. This is a typed convenience alongside the parity-bearing string <xref href="SignalWire.Relay.Call.State" data-throw-if-not-resolved="false"></xref>; it always agrees with it for known states. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.relay/client/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.relay/client/index.mdx index 45057af2c1..5b4434daea 100644 --- a/fern/products/sdk-reference/dotnet/signal-wire.relay/client/index.mdx +++ b/fern/products/sdk-reference/dotnet/signal-wire.relay/client/index.mdx @@ -61,7 +61,7 @@ public class Client : IAsyncDisposable - Inbound message handler. Mirrors Python's <code>@client.on\_message</code>: fires with a fully-formed <xref href="SignalWire.Relay.Message" data-throw-if-not-resolved="false"></xref> for every <code>messaging.receive</code> event. + Inbound message handler. Mirrors Python's `@client.on_message`: fires with a fully-formed <xref href="SignalWire.Relay.Message" data-throw-if-not-resolved="false"></xref> for every `messaging.receive` event. @@ -155,7 +155,8 @@ Line 90. ### ConnectAsync(CancellationToken) Establish the WebSocket connection and authenticate. Opens a real -WSS connection to the configured host, runs the JSON-RPC <code>signalwire.connect</code> handshake, and starts the reader loop +WSS connection to the configured host, runs the JSON-RPC +`signalwire.connect` handshake, and starts the reader loop that pumps inbound frames into <xref href="SignalWire.Relay.Client.HandleMessage(System.String)" data-throw-if-not-resolved="false"></xref>. **Modifiers:** `virtual` @@ -185,8 +186,8 @@ Line 137. ### DialAsync(Dictionary\, CancellationToken) Originate an outbound call, awaiting until the dial resolves. -Honours <code>params\_\["tag"]</code> when provided; otherwise a UUID is -generated. Honours <code>params\_\["dial\_timeout"]</code> (seconds) for the +Honours `params_["tag"]` when provided; otherwise a UUID is +generated. Honours `params_["dial_timeout"]` (seconds) for the resolve-or-throw deadline. #### Signature @@ -234,9 +235,9 @@ Line 229. ### DisposeAsync() Asynchronously release the connection and all owned IDisposables — -the WebSocket (<code>\_ws</code>), the lifetime token source (<code>\_cts</code>), -and the send lock (<code>\_sendLock</code>). This is the .NET analogue of -Python's <code>**aexit**</code>: <code>await using var client = ...;</code> closes +the WebSocket (`_ws`), the lifetime token source (`_cts`), +and the send lock (`_sendLock`). This is the .NET analogue of +Python's `__aexit__`: `await using var client = ...;` closes the socket and frees the handles deterministically instead of leaking them until finalization. Idempotent. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.relay/collect-action/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.relay/collect-action/index.mdx index ad7de483ef..46480d1d28 100644 --- a/fern/products/sdk-reference/dotnet/signal-wire.relay/collect-action/index.mdx +++ b/fern/products/sdk-reference/dotnet/signal-wire.relay/collect-action/index.mdx @@ -41,8 +41,8 @@ public class CollectAction : Action ### AcceptsTerminalEvent(string) -Block <code>calling.call.play</code> events from triggering the standard -terminal-state resolution path: only <code>calling.call.collect</code> +Block `calling.call.play` events from triggering the standard +terminal-state resolution path: only `calling.call.collect` may resolve a CollectAction. **Modifiers:** `override` diff --git a/fern/products/sdk-reference/dotnet/signal-wire.relay/detect-action/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.relay/detect-action/index.mdx index d3430bb6df..2f58b72133 100644 --- a/fern/products/sdk-reference/dotnet/signal-wire.relay/detect-action/index.mdx +++ b/fern/products/sdk-reference/dotnet/signal-wire.relay/detect-action/index.mdx @@ -87,7 +87,7 @@ Line 325. ### HandleEvent(Event) Per RELAY\_IMPLEMENTATION\_GUIDE.md "detect gotcha": detect events -continuously stream a <code>detect</code> object — resolve on the FIRST +continuously stream a `detect` object — resolve on the FIRST meaningful detect payload (or on terminal state if it arrives first with no detect data). diff --git a/fern/products/sdk-reference/dotnet/signal-wire.relay/device/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.relay/device/index.mdx index d3915f46a5..c78937cd42 100644 --- a/fern/products/sdk-reference/dotnet/signal-wire.relay/device/index.mdx +++ b/fern/products/sdk-reference/dotnet/signal-wire.relay/device/index.mdx @@ -15,21 +15,23 @@ lustri: --- # `Device` -A typed RELAY device object — the <code>\{type, params\}</code> shape that recurs -across <code>connect</code> / <code>refer</code> / <code>dial</code> / <code>tap</code> and the +A typed RELAY device object — the `{type, params}` shape that recurs +across `connect` / `refer` / `dial` / `tap` and the ringback list. **Remarks:** <p> -Grounded in the RELAY wire schema <code>relay-protocol/calling.connect.params.json</code>, where each device is an -object with a required <code>type</code> (string) and a free-form <code>params</code> +Grounded in the RELAY wire schema +`relay-protocol/calling.connect.params.json`, where each device is an +object with a required `type` (string) and a free-form `params` payload. This class types the <em>shape</em> only: <xref href="SignalWire.Relay.Device.Type" data-throw-if-not-resolved="false"></xref> stays -a <code>string</code> because the discriminant set (<code>phone</code>, <code>sip</code>, <code>webrtc</code>, …) is <strong>not</strong> enumerated in any schema, so an +a `string` because the discriminant set (`phone`, `sip`, +`webrtc`, …) is <strong>not</strong> enumerated in any schema, so an enum would risk rejecting a valid value. </p> <p> The reference and the rest of this port pass devices as raw -<code>Dictionary<string, object?></code> (e.g. <xref href="SignalWire.Relay.Call.Device" data-throw-if-not-resolved="false"></xref>); +`Dictionary<string, object?>` (e.g. <xref href="SignalWire.Relay.Call.Device" data-throw-if-not-resolved="false"></xref>); this is an additive typed convenience. <xref href="SignalWire.Relay.Device.ToDict" data-throw-if-not-resolved="false"></xref> yields the identical wire dictionary, so a <xref href="SignalWire.Relay.Device" data-throw-if-not-resolved="false"></xref> can be used anywhere a hand-built device dict is accepted with no change in emitted bytes. @@ -55,11 +57,11 @@ public sealed class Device ## Properties - The device-type-specific parameters (e.g. <code>to\_number</code> / <code>from\_number</code> for a phone device). Free-form by the wire schema. + The device-type-specific parameters (e.g. `to_number` / `from_number` for a phone device). Free-form by the wire schema. - The device discriminant (e.g. <code>"phone"</code>, <code>"sip"</code>). Kept a string: the valid set is not schema-enumerated. + The device discriminant (e.g. `"phone"`, `"sip"`). Kept a string: the valid set is not schema-enumerated. ## Methods @@ -94,9 +96,9 @@ Line 55. ### FromDict(Dictionary\?) -Build a <xref href="SignalWire.Relay.Device" data-throw-if-not-resolved="false"></xref> from a raw <code>\{type, params\}</code> dictionary -(e.g. <xref href="SignalWire.Relay.Call.Device" data-throw-if-not-resolved="false"></xref> or a wire frame). Returns <code>null</code> -when the dict has no <code>type</code> string — the discriminant is required. +Build a <xref href="SignalWire.Relay.Device" data-throw-if-not-resolved="false"></xref> from a raw `{type, params}` dictionary +(e.g. <xref href="SignalWire.Relay.Call.Device" data-throw-if-not-resolved="false"></xref> or a wire frame). Returns `null` +when the dict has no `type` string — the discriminant is required. **Modifiers:** `static` @@ -124,7 +126,7 @@ Line 76. ### ToDict() -Project to the raw <code>\{type, params\}</code> wire dictionary — byte-identical +Project to the raw `{type, params}` wire dictionary — byte-identical to the hand-written device dict the RELAY methods already accept. #### Signature diff --git a/fern/products/sdk-reference/dotnet/signal-wire.relay/dial-state-extensions/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.relay/dial-state-extensions/index.mdx index d3845375c0..56e12767cc 100644 --- a/fern/products/sdk-reference/dotnet/signal-wire.relay/dial-state-extensions/index.mdx +++ b/fern/products/sdk-reference/dotnet/signal-wire.relay/dial-state-extensions/index.mdx @@ -85,7 +85,8 @@ Line 55. ### TryParse(string?, out DialState) -Parse a wire string into a <xref href="SignalWire.Relay.DialState" data-throw-if-not-resolved="false"></xref>. Returns <code>false</code> (and <code>default</code>) for an unrecognised value so callers +Parse a wire string into a <xref href="SignalWire.Relay.DialState" data-throw-if-not-resolved="false"></xref>. Returns +`false` (and `default`) for an unrecognised value so callers can fall back to the raw string rather than crashing on a new server-emitted state. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.relay/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.relay/index.mdx index 49dce24279..49a2cbb345 100644 --- a/fern/products/sdk-reference/dotnet/signal-wire.relay/index.mdx +++ b/fern/products/sdk-reference/dotnet/signal-wire.relay/index.mdx @@ -47,7 +47,7 @@ lustri: - A typed RELAY device object — the <code>\{type, params\}</code> shape that recurs across <code>connect</code> / <code>refer</code> / <code>dial</code> / <code>tap</code> and the ringback list. + A typed RELAY device object — the `{type, params}` shape that recurs across `connect` / `refer` / `dial` / `tap` and the ringback list. @@ -103,9 +103,11 @@ Lifecycle state of a RELAY <xref href="SignalWire.Relay.Call" data-throw-if-n closed set. **Remarks:** <p> -The RELAY <code>calling.call.state</code> event carries one of a known set of -call-state strings (<code>created</code>, <code>ringing</code>, <code>answered</code>, <code>ending</code>, <code>ended</code>) — grounded in the Python reference's <code>signalwire/relay/constants.py</code> (<code>CALL\_STATES</code>) and mirrored by <xref href="SignalWire.Relay.Constants.CallStateCreated" data-throw-if-not-resolved="false"></xref> .. <xref href="SignalWire.Relay.Constants.CallStateEnded" data-throw-if-not-resolved="false"></xref>. -The reference exposes the state as a bare <code>str</code>; this enum is a typed +The RELAY `calling.call.state` event carries one of a known set of +call-state strings (`created`, `ringing`, `answered`, +`ending`, `ended`) — grounded in the Python reference's +`signalwire/relay/constants.py` (`CALL_STATES`) and mirrored by <xref href="SignalWire.Relay.Constants.CallStateCreated" data-throw-if-not-resolved="false"></xref> .. <xref href="SignalWire.Relay.Constants.CallStateEnded" data-throw-if-not-resolved="false"></xref>. +The reference exposes the state as a bare `str`; this enum is a typed alias over those strings so callers get autocompletion and a compile error on a typo, while <xref href="SignalWire.Relay.Call.State" data-throw-if-not-resolved="false"></xref> stays a string for parity and forward-compatibility. @@ -116,12 +118,12 @@ This is the <em>call</em> vocabulary and is deliberately <strong>distinct</strong> from <xref href="SignalWire.Relay.DialState" data-throw-if-not-resolved="false"></xref> (the dial-outcome vocabulary) and <xref href="SignalWire.Relay.MessageState" data-throw-if-not-resolved="false"></xref> (the messaging-delivery vocabulary). The three are never conflated — they index different wire -fields (<code>call_state</code> vs <code>dial_state</code> vs <code>message_state</code>). +fields (`call_state` vs `dial_state` vs `message_state`). </p> <p> Because the server emits these values and the set can grow, parse via <xref href="SignalWire.Relay.CallStateExtensions.TryParse(System.String%2cSignalWire.Relay.CallState%40)" data-throw-if-not-resolved="false"></xref>, which -returns <code>false</code> for an unknown value rather than throwing — the string +returns `false` for an unknown value rather than throwing — the string arm on <xref href="SignalWire.Relay.Call.State" data-throw-if-not-resolved="false"></xref> preserves any future server value. </p> @@ -163,18 +165,20 @@ Line 32. ### DialState -Outcome state of a RELAY dial attempt (<code>calling.call.dial</code>), as a +Outcome state of a RELAY dial attempt (`calling.call.dial`), as a typed, compile-time closed set. **Remarks:** <p> -The RELAY <code>calling.call.dial</code> event carries a <code>dial\_state</code> of <code>dialing</code>, <code>answered</code>, or <code>failed</code> (see <xref href="SignalWire.Relay.Client.HandleDialEvent(SignalWire.Relay.Event%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d)" data-throw-if-not-resolved="false"></xref> and <xref href="SignalWire.Relay.Constants.DialStateDialing" data-throw-if-not-resolved="false"></xref> .. <xref href="SignalWire.Relay.Constants.DialStateFailed" data-throw-if-not-resolved="false"></xref>). It is the dial-<em>outcome</em> -vocabulary and is deliberately <strong>distinct</strong> from <xref href="SignalWire.Relay.CallState" data-throw-if-not-resolved="false"></xref> (the per-call lifecycle) — a dial that resolves <code>answered</code> transitions the winning <xref href="SignalWire.Relay.Call" data-throw-if-not-resolved="false"></xref> to <xref href="SignalWire.Relay.CallState.Answered" data-throw-if-not-resolved="false"></xref>, but the two fields are separate on the +The RELAY `calling.call.dial` event carries a `dial_state` of +`dialing`, `answered`, or `failed` (see <xref href="SignalWire.Relay.Client.HandleDialEvent(SignalWire.Relay.Event%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d)" data-throw-if-not-resolved="false"></xref> and <xref href="SignalWire.Relay.Constants.DialStateDialing" data-throw-if-not-resolved="false"></xref> .. <xref href="SignalWire.Relay.Constants.DialStateFailed" data-throw-if-not-resolved="false"></xref>). It is the dial-<em>outcome</em> +vocabulary and is deliberately <strong>distinct</strong> from <xref href="SignalWire.Relay.CallState" data-throw-if-not-resolved="false"></xref> (the per-call lifecycle) — a dial that resolves +`answered` transitions the winning <xref href="SignalWire.Relay.Call" data-throw-if-not-resolved="false"></xref> to <xref href="SignalWire.Relay.CallState.Answered" data-throw-if-not-resolved="false"></xref>, but the two fields are separate on the wire. </p> <p> -Both <code>answered</code> and <code>failed</code> are terminal dial outcomes (the dial -is resolved); <code>dialing</code> is in-progress. Parse via +Both `answered` and `failed` are terminal dial outcomes (the dial +is resolved); `dialing` is in-progress. Parse via <xref href="SignalWire.Relay.DialStateExtensions.TryParse(System.String%2cSignalWire.Relay.DialState%40)" data-throw-if-not-resolved="false"></xref>, which tolerates an unknown server value. </p> @@ -213,10 +217,13 @@ Delivery state of a RELAY <xref href="SignalWire.Relay.Message" data-throw-if compile-time closed set. **Remarks:** <p> -The RELAY <code>messaging.state</code> event carries a <code>message\_state</code> of <code>queued</code>, <code>initiated</code>, <code>sent</code>, <code>delivered</code>, <code>undelivered</code>, or <code>failed</code> — grounded in the Python reference's <code>signalwire/relay/constants.py</code> (<code>MESSAGE\_STATE\_\*</code>) and the wire -schema <code>relay-protocol/messaging.state.event.json</code>; <code>received</code> is +The RELAY `messaging.state` event carries a `message_state` of +`queued`, `initiated`, `sent`, `delivered`, +`undelivered`, or `failed` — grounded in the Python reference's +`signalwire/relay/constants.py` (`MESSAGE_STATE_*`) and the wire +schema `relay-protocol/messaging.state.event.json`; `received` is the additional inbound state (<xref href="SignalWire.Relay.Constants.MessageStateReceived" data-throw-if-not-resolved="false"></xref>). -The reference exposes the state as a bare <code>str</code>; this enum is a typed +The reference exposes the state as a bare `str`; this enum is a typed alias so callers get autocompletion and a compile-time check, while <xref href="SignalWire.Relay.Message.State" data-throw-if-not-resolved="false"></xref> stays a string for parity and forward-compat. </p> @@ -224,7 +231,7 @@ alias so callers get autocompletion and a compile-time check, while <xref hre This is the <em>messaging</em> vocabulary and is deliberately <strong>distinct</strong> from <xref href="SignalWire.Relay.CallState" data-throw-if-not-resolved="false"></xref> and <xref href="SignalWire.Relay.DialState" data-throw-if-not-resolved="false"></xref> (the voice vocabularies) — it indexes the -<code>message_state</code> wire field, never <code>call_state</code>/<code>dial_state</code>. +`message_state` wire field, never `call_state`/`dial_state`. </p> <p> Parse via <xref href="SignalWire.Relay.MessageStateExtensions.TryParse(System.String%2cSignalWire.Relay.MessageState%40)" data-throw-if-not-resolved="false"></xref>, diff --git a/fern/products/sdk-reference/dotnet/signal-wire.relay/message-state-extensions/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.relay/message-state-extensions/index.mdx index 89269f1f37..391d4fafbc 100644 --- a/fern/products/sdk-reference/dotnet/signal-wire.relay/message-state-extensions/index.mdx +++ b/fern/products/sdk-reference/dotnet/signal-wire.relay/message-state-extensions/index.mdx @@ -29,7 +29,8 @@ public static class MessageStateExtensions ### IsTerminal(MessageState) -True when this state is terminal (delivery resolved). Mirrors <xref href="SignalWire.Relay.Constants.MessageTerminalStates" data-throw-if-not-resolved="false"></xref> — terminal = <code>delivered</code> / <code>undelivered</code> / <code>failed</code>. +True when this state is terminal (delivery resolved). Mirrors <xref href="SignalWire.Relay.Constants.MessageTerminalStates" data-throw-if-not-resolved="false"></xref> — terminal = +`delivered` / `undelivered` / `failed`. **Modifiers:** `static` @@ -85,7 +86,8 @@ Line 74. ### TryParse(string?, out MessageState) -Parse a wire string into a <xref href="SignalWire.Relay.MessageState" data-throw-if-not-resolved="false"></xref>. Returns <code>false</code> (and <code>default</code>) for an unrecognised value so callers +Parse a wire string into a <xref href="SignalWire.Relay.MessageState" data-throw-if-not-resolved="false"></xref>. Returns +`false` (and `default`) for an unrecognised value so callers can fall back to the raw string rather than crashing on a new server-emitted state. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.relay/message/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.relay/message/index.mdx index 081c73545e..16a75af95f 100644 --- a/fern/products/sdk-reference/dotnet/signal-wire.relay/message/index.mdx +++ b/fern/products/sdk-reference/dotnet/signal-wire.relay/message/index.mdx @@ -51,7 +51,7 @@ public sealed class Message - The current delivery state as the typed <xref href="SignalWire.Relay.MessageState" data-throw-if-not-resolved="false"></xref> enum, parsed from <xref href="SignalWire.Relay.Message.State" data-throw-if-not-resolved="false"></xref>. Returns <code>null</code> when <xref href="SignalWire.Relay.Message.State" data-throw-if-not-resolved="false"></xref> is unset or an unrecognised (e.g. newly-introduced server) value — read <xref href="SignalWire.Relay.Message.State" data-throw-if-not-resolved="false"></xref> for the raw string in that case. Typed convenience alongside the parity-bearing string <xref href="SignalWire.Relay.Message.State" data-throw-if-not-resolved="false"></xref>; agrees with it for known states. + The current delivery state as the typed <xref href="SignalWire.Relay.MessageState" data-throw-if-not-resolved="false"></xref> enum, parsed from <xref href="SignalWire.Relay.Message.State" data-throw-if-not-resolved="false"></xref>. Returns `null` when <xref href="SignalWire.Relay.Message.State" data-throw-if-not-resolved="false"></xref> is unset or an unrecognised (e.g. newly-introduced server) value — read <xref href="SignalWire.Relay.Message.State" data-throw-if-not-resolved="false"></xref> for the raw string in that case. Typed convenience alongside the parity-bearing string <xref href="SignalWire.Relay.Message.State" data-throw-if-not-resolved="false"></xref>; agrees with it for known states. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest/http-client/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest/http-client/index.mdx index 5cfcfbf28f..52c4a5a59c 100644 --- a/fern/products/sdk-reference/dotnet/signal-wire.rest/http-client/index.mdx +++ b/fern/products/sdk-reference/dotnet/signal-wire.rest/http-client/index.mdx @@ -75,7 +75,7 @@ Line 91. ### Dispose Release the underlying <xref href="System.Net.Http.HttpClient" data-throw-if-not-resolved="false"></xref> — but -ONLY when this object created it (<code>\_ownsHttp</code>). A caller-injected +ONLY when this object created it (`_ownsHttp`). A caller-injected HttpClient is left untouched: its lifetime belongs to whoever passed it in. Idempotent. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest/rest-client/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest/rest-client/index.mdx index 06369389c9..118e5dfa4d 100644 --- a/fern/products/sdk-reference/dotnet/signal-wire.rest/rest-client/index.mdx +++ b/fern/products/sdk-reference/dotnet/signal-wire.rest/rest-client/index.mdx @@ -133,7 +133,7 @@ public class RestClient : IDisposable Dispose the owned REST <xref href="SignalWire.REST.HttpClient" data-throw-if-not-resolved="false"></xref> (which, in turn, only disposes its inner <xref href="System.Net.Http.HttpClient" data-throw-if-not-resolved="false"></xref> because it -created it). <code>RestClient</code> always constructs its own transport, so +created it). `RestClient` always constructs its own transport, so it always owns it. Idempotent. #### Signature diff --git a/fern/products/sdk-reference/dotnet/signal-wire.security/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.security/index.mdx index 1ec82412f2..487d795290 100644 --- a/fern/products/sdk-reference/dotnet/signal-wire.security/index.mdx +++ b/fern/products/sdk-reference/dotnet/signal-wire.security/index.mdx @@ -19,10 +19,10 @@ lustri: - HTTP middleware that validates the <code>X-SignalWire-Signature</code> header on incoming requests using <xref href="SignalWire.Security.WebhookValidator" data-throw-if-not-resolved="false"></xref>. Designed for the .NET port's HttpListener-based dispatch surface; adapts the same contract Python's FastAPI dependency provides. <p>Use <xref href="SignalWire.Security.WebhookValidationMiddleware.Validate(System.String%2cSystem.String%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.String%7d%2cSystem.String%2cSystem.String%2cSystem.Int32)" data-throw-if-not-resolved="false"></xref> to short-circuit invalid requests with 403 before they reach an agent's POST handler. Returns null on success so the caller continues to dispatch.</p> <p>This is intentionally a non-async type: the underlying validator is pure CPU work and the dispatch surface uses synchronous strings.</p> + HTTP middleware that validates the `X-SignalWire-Signature` header on incoming requests using <xref href="SignalWire.Security.WebhookValidator" data-throw-if-not-resolved="false"></xref>. Designed for the .NET port's HttpListener-based dispatch surface; adapts the same contract Python's FastAPI dependency provides. <p>Use <xref href="SignalWire.Security.WebhookValidationMiddleware.Validate(System.String%2cSystem.String%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.String%7d%2cSystem.String%2cSystem.String%2cSystem.Int32)" data-throw-if-not-resolved="false"></xref> to short-circuit invalid requests with 403 before they reach an agent's POST handler. Returns null on success so the caller continues to dispatch.</p> <p>This is intentionally a non-async type: the underlying validator is pure CPU work and the dispatch surface uses synchronous strings.</p> - Validates SignalWire webhook signatures for both Scheme A (RELAY/JSON, hex HMAC-SHA1 over <code>url + rawBody</code>) and Scheme B (Compat/cXML form, base64 HMAC-SHA1 over <code>url + sortedFormParams</code>) per <code>porting-sdk/webhooks.md</code>. The contract is byte-identical across all SignalWire SDK ports — see the cross-port test vectors in the spec. + Validates SignalWire webhook signatures for both Scheme A (RELAY/JSON, hex HMAC-SHA1 over `url + rawBody`) and Scheme B (Compat/cXML form, base64 HMAC-SHA1 over `url + sortedFormParams`) per `porting-sdk/webhooks.md`. The contract is byte-identical across all SignalWire SDK ports — see the cross-port test vectors in the spec. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.security/session-manager/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.security/session-manager/index.mdx index 8f3a9e3b2a..15f61344d3 100644 --- a/fern/products/sdk-reference/dotnet/signal-wire.security/session-manager/index.mdx +++ b/fern/products/sdk-reference/dotnet/signal-wire.security/session-manager/index.mdx @@ -143,7 +143,7 @@ public bool ValidateToken(string functionName, string callId, string token) #### Returns -`bool` — <code>true</code> if the token is valid and not expired. +`bool` — `true` if the token is valid and not expired. #### Source diff --git a/fern/products/sdk-reference/dotnet/signal-wire.security/webhook-validation-middleware/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.security/webhook-validation-middleware/index.mdx index be5b060325..b523810cbf 100644 --- a/fern/products/sdk-reference/dotnet/signal-wire.security/webhook-validation-middleware/index.mdx +++ b/fern/products/sdk-reference/dotnet/signal-wire.security/webhook-validation-middleware/index.mdx @@ -15,7 +15,7 @@ lustri: --- # `WebhookValidationMiddleware` -HTTP middleware that validates the <code>X-SignalWire-Signature</code> header +HTTP middleware that validates the `X-SignalWire-Signature` header on incoming requests using <xref href="SignalWire.Security.WebhookValidator" data-throw-if-not-resolved="false"></xref>. Designed for the .NET port's HttpListener-based dispatch surface; adapts the same contract Python's FastAPI dependency provides. @@ -49,7 +49,8 @@ public sealed class WebhookValidationMiddleware ### ExtractSignatureHeader(Dictionary\) -Pull <code>X-SignalWire-Signature</code> from request headers, or the <code>X-Twilio-Signature</code> alias for cXML/Compat callers. Header +Pull `X-SignalWire-Signature` from request headers, or the +`X-Twilio-Signature` alias for cXML/Compat callers. Header lookups are case-insensitive (proxies / browsers vary). **Modifiers:** `static` @@ -80,8 +81,8 @@ Line 134. Reconstruct the public URL SignalWire POSTed to. Resolution order: -<ol><li><code>SWML_PROXY_URL_BASE</code> env var (joined with path + query).</li><li><code>X-Forwarded-Proto</code> / <code>X-Forwarded-Host</code> headers - when <code>trustProxy=true</code>.</li><li><code>http://hostFallback:portFallback{path}</code> as a last-resort +<ol><li>`SWML_PROXY_URL_BASE` env var (joined with path + query).</li><li>`X-Forwarded-Proto` / `X-Forwarded-Host` headers + when `trustProxy=true`.</li><li>`http://hostFallback:portFallback{path}` as a last-resort local construction.</li></ol> #### Signature @@ -121,7 +122,8 @@ the request passed validation — caller proceeds to the real handler. **Remarks:** The raw body is the caller's <code class="paramref">body</code> string verbatim; the caller is expected to capture the body once (before any JSON / form parser consumes the stream) and pass it here. The -HttpListenerContext dispatcher in <code>SignalWire.SWML.Service.Run</code> already does this, so AgentBase +HttpListenerContext dispatcher in +`SignalWire.SWML.Service.Run` already does this, so AgentBase and standalone HttpListener integrations can wire it in directly. #### Signature @@ -173,7 +175,7 @@ public WebhookValidationMiddleware(string signingKey, bool trustProxy = false) - When true, honor <code>X-Forwarded-Proto</code> / <code>X-Forwarded-Host</code> when reconstructing the URL. Default false because proxy headers are spoofable; opt in only when you control the proxy chain. + When true, honor `X-Forwarded-Proto` / `X-Forwarded-Host` when reconstructing the URL. Default false because proxy headers are spoofable; opt in only when you control the proxy chain. #### Throws diff --git a/fern/products/sdk-reference/dotnet/signal-wire.security/webhook-validator/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.security/webhook-validator/index.mdx index 6723f01696..6154af674c 100644 --- a/fern/products/sdk-reference/dotnet/signal-wire.security/webhook-validator/index.mdx +++ b/fern/products/sdk-reference/dotnet/signal-wire.security/webhook-validator/index.mdx @@ -16,8 +16,9 @@ lustri: # `WebhookValidator` Validates SignalWire webhook signatures for both Scheme A (RELAY/JSON, -hex HMAC-SHA1 over <code>url + rawBody</code>) and Scheme B (Compat/cXML form, -base64 HMAC-SHA1 over <code>url + sortedFormParams</code>) per <code>porting-sdk/webhooks.md</code>. The contract is byte-identical across all +hex HMAC-SHA1 over `url + rawBody`) and Scheme B (Compat/cXML form, +base64 HMAC-SHA1 over `url + sortedFormParams`) per +`porting-sdk/webhooks.md`. The contract is byte-identical across all SignalWire SDK ports — see the cross-port test vectors in the spec. **Modifiers:** `static` @@ -32,7 +33,7 @@ public static class WebhookValidator ### ValidateRequest(string, string?, string, object?) -Legacy <code>@signalwire/compatibility-api</code> drop-in entry point. +Legacy `@signalwire/compatibility-api` drop-in entry point. <p>If <code class="paramref">paramsOrRawBody</code> is a <xref href="System.String" data-throw-if-not-resolved="false"></xref>, delegates to <xref href="SignalWire.Security.WebhookValidator.ValidateWebhookSignature(System.String%2cSystem.String%2cSystem.String%2cSystem.String)" data-throw-if-not-resolved="false"></xref> (Scheme A then @@ -95,11 +96,11 @@ public static bool ValidateWebhookSignature(string signingKey, string? signature - The <code>X-SignalWire-Signature</code> header value (or <code>X-Twilio-Signature</code> for cXML compat). Missing / empty returns <code>false</code> without throwing. + The `X-SignalWire-Signature` header value (or `X-Twilio-Signature` for cXML compat). Missing / empty returns `false` without throwing. - The full URL SignalWire POSTed to (scheme, host, optional port, path, query). Must match what the platform saw — see the <code>URL reconstruction</code> section of <code>porting-sdk/webhooks.md</code>. + The full URL SignalWire POSTed to (scheme, host, optional port, path, query). Must match what the platform saw — see the `URL reconstruction` section of `porting-sdk/webhooks.md`. @@ -108,7 +109,7 @@ public static bool ValidateWebhookSignature(string signingKey, string? signature #### Returns -`bool` — <code>true</code> if the signature matches either Scheme A (hex JSON) or Scheme B (base64 form, with port-normalization variants and optional bodySHA256 fallback). <code>false</code> otherwise. +`bool` — `true` if the signature matches either Scheme A (hex JSON) or Scheme B (base64 form, with port-normalization variants and optional bodySHA256 fallback). `false` otherwise. #### Throws diff --git a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/claude-skills-skill/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/claude-skills-skill/index.mdx index 08dffb664e..a952f2b27f 100644 --- a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/claude-skills-skill/index.mdx +++ b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/claude-skills-skill/index.mdx @@ -17,23 +17,23 @@ lustri: Load Claude SKILL.md files as agent tools. -Mirrors signalwire-python's <code>signalwire.skills.claude\_skills.skill</code>. -At setup time, the skill walks <code>skills\_path</code> for child directories -containing <code>SKILL.md</code>; each such file is parsed for YAML -frontmatter (the bit between two <code>---</code> lines) plus a markdown +Mirrors signalwire-python's `signalwire.skills.claude_skills.skill`. +At setup time, the skill walks `skills_path` for child directories +containing `SKILL.md`; each such file is parsed for YAML +frontmatter (the bit between two `---` lines) plus a markdown body. Each loaded skill becomes one SWAIG tool whose handler returns the body with three substitutions: -<ul><li><code>$ARGUMENTS</code> / <code>$ARGUMENTS[N]</code> / <code>$N</code> — the - <code>arguments</code> string passed to the tool, optionally split into - positional pieces by whitespace.</li><li><code>${CLAUDE_SKILL_DIR}</code> — absolute path to the skill's - directory.</li><li><code>${CLAUDE_SESSION_ID}</code> — call id from raw_data.</li></ul> +<ul><li>`$ARGUMENTS` / `$ARGUMENTS[N]` / `$N` — the + `arguments` string passed to the tool, optionally split into + positional pieces by whitespace.</li><li>`${CLAUDE_SKILL_DIR}` — absolute path to the skill's + directory.</li><li>`${CLAUDE_SESSION_ID}` — call id from raw_data.</li></ul> The full Python implementation also runs a frontmatter-driven invocation gate (skip-tool / skip-prompt), tolerates supporting reference sections, -and offers an opt-in shell-injection preprocessor (<code>!`cmd`</code>). The +and offers an opt-in shell-injection preprocessor (`` !`cmd` ``). The .NET port ships the discovery/parse/handler core; the optional shell -preprocessor is left out by design (set <code>allow\_shell\_injection</code> +preprocessor is left out by design (set `allow_shell_injection` to a no-op — the surface is preserved for future expansion). **Modifiers:** `sealed` diff --git a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/datasphere-skill/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/datasphere-skill/index.mdx index 10e1247205..d22acc415a 100644 --- a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/datasphere-skill/index.mdx +++ b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/datasphere-skill/index.mdx @@ -17,15 +17,17 @@ lustri: SignalWire DataSphere knowledge-base search skill. -Mirrors signalwire-python's <code>signalwire.skills.datasphere.skill</code>. +Mirrors signalwire-python's `signalwire.skills.datasphere.skill`. POSTs a JSON body to <code>https://\.signalwire.com /api/datasphere/documents/search</code> with HTTP Basic auth -(project\_id : token). Real DataSphere returns matches under <code>chunks</code>; the porting-sdk audit fixture uses <code>results</code>; +(project\_id : token). Real DataSphere returns matches under +`chunks`; the porting-sdk audit fixture uses `results`; accept either so the skill round-trips against the live API and the offline audit alike (matching the precedent already in Java/PHP/Perl/ Rust). -Upstream URL override: <code>DATASPHERE\_BASE\_URL</code>. Path <code>/api/datasphere/documents/search</code> is preserved. +Upstream URL override: `DATASPHERE_BASE_URL`. Path +`/api/datasphere/documents/search` is preserved. **Modifiers:** `sealed` diff --git a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/index.mdx index 411adef344..36fcffa6c6 100644 --- a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/index.mdx +++ b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/index.mdx @@ -19,7 +19,7 @@ lustri: - Load Claude SKILL.md files as agent tools. Mirrors signalwire-python's <code>signalwire.skills.claude\_skills.skill</code>. At setup time, the skill walks <code>skills\_path</code> for child directories containing <code>SKILL.md</code>; each such file is parsed for YAML frontmatter (the bit between two <code>---</code> lines) plus a markdown body. Each loaded skill becomes one SWAIG tool whose handler returns the body with three substitutions: <ul><li><code>$ARGUMENTS</code> / <code>$ARGUMENTS\[N]</code> / <code>$N</code> — the <code>arguments</code> string passed to the tool, optionally split into positional pieces by whitespace.</li><li><code>$\{CLAUDE\_SKILL\_DIR\}</code> — absolute path to the skill's directory.</li><li><code>$\{CLAUDE\_SESSION\_ID\}</code> — call id from raw\_data.</li></ul> The full Python implementation also runs a frontmatter-driven invocation gate (skip-tool / skip-prompt), tolerates supporting reference sections, and offers an opt-in shell-injection preprocessor (<code>!`cmd`</code>). The .NET port ships the discovery/parse/handler core; the optional shell preprocessor is left out by design (set <code>allow\_shell\_injection</code> to a no-op — the surface is preserved for future expansion). + Load Claude SKILL.md files as agent tools. Mirrors signalwire-python's `signalwire.skills.claude_skills.skill`. At setup time, the skill walks `skills_path` for child directories containing `SKILL.md`; each such file is parsed for YAML frontmatter (the bit between two `---` lines) plus a markdown body. Each loaded skill becomes one SWAIG tool whose handler returns the body with three substitutions: <ul><li>`$ARGUMENTS` / `$ARGUMENTS[N]` / `$N` — the `arguments` string passed to the tool, optionally split into positional pieces by whitespace.</li><li>`${CLAUDE_SKILL_DIR}` — absolute path to the skill's directory.</li><li>`${CLAUDE_SESSION_ID}` — call id from raw\_data.</li></ul> The full Python implementation also runs a frontmatter-driven invocation gate (skip-tool / skip-prompt), tolerates supporting reference sections, and offers an opt-in shell-injection preprocessor (`` !`cmd` ``). The .NET port ships the discovery/parse/handler core; the optional shell preprocessor is left out by design (set `allow_shell_injection` to a no-op — the surface is preserved for future expansion). @@ -31,7 +31,7 @@ lustri: - SignalWire DataSphere knowledge-base search skill. Mirrors signalwire-python's <code>signalwire.skills.datasphere.skill</code>. POSTs a JSON body to <code>https://\.signalwire.com /api/datasphere/documents/search</code> with HTTP Basic auth (project\_id : token). Real DataSphere returns matches under <code>chunks</code>; the porting-sdk audit fixture uses <code>results</code>; accept either so the skill round-trips against the live API and the offline audit alike (matching the precedent already in Java/PHP/Perl/ Rust). Upstream URL override: <code>DATASPHERE\_BASE\_URL</code>. Path <code>/api/datasphere/documents/search</code> is preserved. + SignalWire DataSphere knowledge-base search skill. Mirrors signalwire-python's `signalwire.skills.datasphere.skill`. POSTs a JSON body to `https://<space_name>.signalwire.com /api/datasphere/documents/search` with HTTP Basic auth (project\_id : token). Real DataSphere returns matches under `chunks`; the porting-sdk audit fixture uses `results`; accept either so the skill round-trips against the live API and the offline audit alike (matching the precedent already in Java/PHP/Perl/ Rust). Upstream URL override: `DATASPHERE_BASE_URL`. Path `/api/datasphere/documents/search` is preserved. @@ -55,11 +55,11 @@ lustri: - Bridge MCP (Model Context Protocol) servers with SWAIG functions. Mirrors signalwire-python's <code>signalwire.skills.mcp\_gateway.skill</code>. Each configured service gets one or more SWAIG tools whose handler POSTs to the gateway with the tool name, arguments, and per-call session id (derived from <code>raw\_data.global\_data.mcp\_call\_id</code> if present, else <code>raw\_data.call\_id</code>). Auth: <code>auth\_token</code> (Bearer) or <code>auth\_user</code>/<code>auth\_password</code> (Basic). The skill prefers Bearer when both are configured. Endpoint shape: <code>POST \/services/\/call</code> per the Python implementation. Audit fixtures point <code>gateway\_url</code> at a loopback URL via the per-skill convention. + Bridge MCP (Model Context Protocol) servers with SWAIG functions. Mirrors signalwire-python's `signalwire.skills.mcp_gateway.skill`. Each configured service gets one or more SWAIG tools whose handler POSTs to the gateway with the tool name, arguments, and per-call session id (derived from `raw_data.global_data.mcp_call_id` if present, else `raw_data.call_id`). Auth: `auth_token` (Bearer) or `auth_user`/`auth_password` (Basic). The skill prefers Bearer when both are configured. Endpoint shape: `POST <gateway_url>/services/<service>/call` per the Python implementation. Audit fixtures point `gateway_url` at a loopback URL via the per-skill convention. - Vector / keyword similarity search. Mirrors signalwire-python's <code>signalwire.skills.native\_vector\_search.skill</code> in <strong>remote mode only</strong>. Local-mode SQLite/pgvector indexing relies on Python-only deps (sentence-transformers, FAISS, pgvector) and is not portable to the .NET BCL — recorded in <code>PORT\_OMISSIONS.md</code>. The remote mode POSTs the query to the configured search server, which returns a real-shape response the audit verifies on the wire. The handler reads <code>remote\_url</code> from skill params; the audit fixture sets it to a loopback URL so the SDK exercises the real transport against canned bytes. + Vector / keyword similarity search. Mirrors signalwire-python's `signalwire.skills.native_vector_search.skill` in <strong>remote mode only</strong>. Local-mode SQLite/pgvector indexing relies on Python-only deps (sentence-transformers, FAISS, pgvector) and is not portable to the .NET BCL — recorded in `PORT_OMISSIONS.md`. The remote mode POSTs the query to the configured search server, which returns a real-shape response the audit verifies on the wire. The handler reads `remote_url` from skill params; the audit fixture sets it to a loopback URL so the SDK exercises the real transport against canned bytes. @@ -67,7 +67,7 @@ lustri: - Web scraping / crawling skill. Mirrors signalwire-python's <code>signalwire.skills.spider.skill</code>. The Python implementation uses lxml + BeautifulSoup for selector-based extraction; the .NET port ships a faithful HTTP fetch + regex-based HTML stripping (script/style removal, tag removal, whitespace collapse, smart truncation). That covers the canonical <code>fast\_text</code> / <code>clean\_text</code> path the audit exercises; selector-driven structured extraction can be layered on later. Upstream URL override: <code>SPIDER\_BASE\_URL</code>. The skill rewrites the fetch host while preserving the requested URL's path + query so the audit fixture sees the documented page on the wire. + Web scraping / crawling skill. Mirrors signalwire-python's `signalwire.skills.spider.skill`. The Python implementation uses lxml + BeautifulSoup for selector-based extraction; the .NET port ships a faithful HTTP fetch + regex-based HTML stripping (script/style removal, tag removal, whitespace collapse, smart truncation). That covers the canonical `fast_text` / `clean_text` path the audit exercises; selector-driven structured extraction can be layered on later. Upstream URL override: `SPIDER_BASE_URL`. The skill rewrites the fetch host while preserving the requested URL's path + query so the audit fixture sees the documented page on the wire. @@ -79,10 +79,10 @@ lustri: - Web search skill backed by Google Custom Search. Mirrors signalwire-python's <code>signalwire.skills.web\_search.skill</code> (the <code>WebSearchSkill.search\_and\_scrape\_best</code> path). The CSE call is issued faithfully, then each result URL is scraped and a header line + per-result title/url/snippet (plus scraped content) is formatted. Latency control (Python skill.py commits 51101da + 295745b) bounds the whole tool call so a single slow site can never blow past the SignalWire kernel's ~55s webhook timeout: <code>per\_page\_timeout</code> (2.0s) caps each page scrape (a per-request linked <xref href="System.Threading.CancellationTokenSource" data-throw-if-not-resolved="false"></xref> with <code>CancelAfter</code>). <code>overall\_deadline</code> (10.0s) is the wall-clock budget for the whole call; once it fires, in-flight scrapes are abandoned and we return what we have (a <xref href="System.Threading.CancellationTokenSource" data-throw-if-not-resolved="false"></xref> with <code>CancelAfter(overall\_deadline)</code>). THIS IS THE CONTRACT. <code>parallel\_scrape</code> (true) dispatches each scrape as a Task and awaits <xref href="System.Threading.Tasks.Task.WhenAll(System.Threading.Tasks.Task%5b%5d)" data-throw-if-not-resolved="false"></xref>, harvesting whatever completed when the deadline cancels (best-effort). <code>snippets\_only</code> (false) skips scraping entirely and formats the CSE snippets directly. Sub-second response. When the deadline fires OR no scraped page meets the quality threshold, the handler falls back to formatting the CSE snippets into a NON-empty response rather than the empty no-results message, so the kernel never sees a webhook timeout. Upstream URL override: <code>WEB\_SEARCH\_BASE\_URL</code> (used by audit\_skills\_dispatch.py to point at a local fixture). When set, the URL is rewritten to the override host while the path <code>/customsearch/v1</code> is preserved. + Web search skill backed by Google Custom Search. Mirrors signalwire-python's `signalwire.skills.web_search.skill` (the `WebSearchSkill.search_and_scrape_best` path). The CSE call is issued faithfully, then each result URL is scraped and a header line + per-result title/url/snippet (plus scraped content) is formatted. Latency control (Python skill.py commits 51101da + 295745b) bounds the whole tool call so a single slow site can never blow past the SignalWire kernel's ~55s webhook timeout: `per_page_timeout` (2.0s) caps each page scrape (a per-request linked <xref href="System.Threading.CancellationTokenSource" data-throw-if-not-resolved="false"></xref> with `CancelAfter`). `overall_deadline` (10.0s) is the wall-clock budget for the whole call; once it fires, in-flight scrapes are abandoned and we return what we have (a <xref href="System.Threading.CancellationTokenSource" data-throw-if-not-resolved="false"></xref> with `CancelAfter(overall_deadline)`). THIS IS THE CONTRACT. `parallel_scrape` (true) dispatches each scrape as a Task and awaits <xref href="System.Threading.Tasks.Task.WhenAll(System.Threading.Tasks.Task%5b%5d)" data-throw-if-not-resolved="false"></xref>, harvesting whatever completed when the deadline cancels (best-effort). `snippets_only` (false) skips scraping entirely and formats the CSE snippets directly. Sub-second response. When the deadline fires OR no scraped page meets the quality threshold, the handler falls back to formatting the CSE snippets into a NON-empty response rather than the empty no-results message, so the kernel never sees a webhook timeout. Upstream URL override: `WEB_SEARCH_BASE_URL` (used by audit\_skills\_dispatch.py to point at a local fixture). When set, the URL is rewritten to the override host while the path `/customsearch/v1` is preserved. - Wikipedia search skill backed by the public Wikipedia REST API. Mirrors signalwire-python's <code>signalwire.skills.wikipedia\_search.skill</code>. The Python skill makes two API calls per query — first <code>action=query\&list=search</code> to find article titles, then <code>action=query\&prop=extracts</code> to fetch each article's intro extract. Returns the article(s) as <code>**Title**\n\nExtract</code> joined by separators. Upstream URL override: <code>WIKIPEDIA\_BASE\_URL</code>. Path <code>/w/api.php</code> is preserved when the env var is set so the audit fixture sees the documented Wikipedia API path on the wire. + Wikipedia search skill backed by the public Wikipedia REST API. Mirrors signalwire-python's `signalwire.skills.wikipedia_search.skill`. The Python skill makes two API calls per query — first `action=query&list=search` to find article titles, then `action=query&prop=extracts` to fetch each article's intro extract. Returns the article(s) as `**Title**\n\nExtract` joined by separators. Upstream URL override: `WIKIPEDIA_BASE_URL`. Path `/w/api.php` is preserved when the env var is set so the audit fixture sees the documented Wikipedia API path on the wire. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/mcp-gateway-skill/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/mcp-gateway-skill/index.mdx index 053368c371..42cc30890d 100644 --- a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/mcp-gateway-skill/index.mdx +++ b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/mcp-gateway-skill/index.mdx @@ -17,17 +17,17 @@ lustri: Bridge MCP (Model Context Protocol) servers with SWAIG functions. -Mirrors signalwire-python's <code>signalwire.skills.mcp\_gateway.skill</code>. +Mirrors signalwire-python's `signalwire.skills.mcp_gateway.skill`. Each configured service gets one or more SWAIG tools whose handler POSTs to the gateway with the tool name, arguments, and per-call -session id (derived from <code>raw\_data.global\_data.mcp\_call\_id</code> if -present, else <code>raw\_data.call\_id</code>). +session id (derived from `raw_data.global_data.mcp_call_id` if +present, else `raw_data.call_id`). -Auth: <code>auth\_token</code> (Bearer) or <code>auth\_user</code>/<code>auth\_password</code> +Auth: `auth_token` (Bearer) or `auth_user`/`auth_password` (Basic). The skill prefers Bearer when both are configured. -Endpoint shape: <code>POST \/services/\/call</code> -per the Python implementation. Audit fixtures point <code>gateway\_url</code> +Endpoint shape: `POST <gateway_url>/services/<service>/call` +per the Python implementation. Audit fixtures point `gateway_url` at a loopback URL via the per-skill convention. **Modifiers:** `sealed` diff --git a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/native-vector-search-skill/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/native-vector-search-skill/index.mdx index ac42e87243..f80bc75936 100644 --- a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/native-vector-search-skill/index.mdx +++ b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/native-vector-search-skill/index.mdx @@ -17,14 +17,15 @@ lustri: Vector / keyword similarity search. -Mirrors signalwire-python's <code>signalwire.skills.native\_vector\_search.skill</code> +Mirrors signalwire-python's `signalwire.skills.native_vector_search.skill` in <strong>remote mode only</strong>. Local-mode SQLite/pgvector indexing relies on Python-only deps (sentence-transformers, FAISS, -pgvector) and is not portable to the .NET BCL — recorded in <code>PORT\_OMISSIONS.md</code>. The remote mode POSTs the query to the +pgvector) and is not portable to the .NET BCL — recorded in +`PORT_OMISSIONS.md`. The remote mode POSTs the query to the configured search server, which returns a real-shape response the audit verifies on the wire. -The handler reads <code>remote\_url</code> from skill params; the audit +The handler reads `remote_url` from skill params; the audit fixture sets it to a loopback URL so the SDK exercises the real transport against canned bytes. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/spider-skill/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/spider-skill/index.mdx index 6d056bec13..e5d9b3f7b3 100644 --- a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/spider-skill/index.mdx +++ b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/spider-skill/index.mdx @@ -17,14 +17,15 @@ lustri: Web scraping / crawling skill. -Mirrors signalwire-python's <code>signalwire.skills.spider.skill</code>. The +Mirrors signalwire-python's `signalwire.skills.spider.skill`. The Python implementation uses lxml + BeautifulSoup for selector-based extraction; the .NET port ships a faithful HTTP fetch + regex-based HTML stripping (script/style removal, tag removal, whitespace -collapse, smart truncation). That covers the canonical <code>fast\_text</code> / <code>clean\_text</code> path the audit exercises; +collapse, smart truncation). That covers the canonical +`fast_text` / `clean_text` path the audit exercises; selector-driven structured extraction can be layered on later. -Upstream URL override: <code>SPIDER\_BASE\_URL</code>. The skill rewrites the +Upstream URL override: `SPIDER_BASE_URL`. The skill rewrites the fetch host while preserving the requested URL's path + query so the audit fixture sees the documented page on the wire. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/web-search-skill/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/web-search-skill/index.mdx index dc4be5f85f..59fae569d8 100644 --- a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/web-search-skill/index.mdx +++ b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/web-search-skill/index.mdx @@ -17,28 +17,34 @@ lustri: Web search skill backed by Google Custom Search. -Mirrors signalwire-python's <code>signalwire.skills.web\_search.skill</code> -(the <code>WebSearchSkill.search\_and\_scrape\_best</code> path). The CSE call is +Mirrors signalwire-python's `signalwire.skills.web_search.skill` +(the `WebSearchSkill.search_and_scrape_best` path). The CSE call is issued faithfully, then each result URL is scraped and a header line + per-result title/url/snippet (plus scraped content) is formatted. Latency control (Python skill.py commits 51101da + 295745b) bounds the whole tool call so a single slow site can never blow past the SignalWire -kernel's ~55s webhook timeout: <code>per\_page\_timeout</code> (2.0s) caps each page scrape (a per-request -linked <xref href="System.Threading.CancellationTokenSource" data-throw-if-not-resolved="false"></xref> with <code>CancelAfter</code>). <code>overall\_deadline</code> (10.0s) is the wall-clock budget for the whole +kernel's ~55s webhook timeout: +`per_page_timeout` (2.0s) caps each page scrape (a per-request +linked <xref href="System.Threading.CancellationTokenSource" data-throw-if-not-resolved="false"></xref> with +`CancelAfter`). +`overall_deadline` (10.0s) is the wall-clock budget for the whole call; once it fires, in-flight scrapes are abandoned and we return what we have (a <xref href="System.Threading.CancellationTokenSource" data-throw-if-not-resolved="false"></xref> -with <code>CancelAfter(overall\_deadline)</code>). THIS IS THE CONTRACT. <code>parallel\_scrape</code> (true) dispatches each scrape as a Task and awaits <xref href="System.Threading.Tasks.Task.WhenAll(System.Threading.Tasks.Task%5b%5d)" data-throw-if-not-resolved="false"></xref>, -harvesting whatever completed when the deadline cancels (best-effort). <code>snippets\_only</code> (false) skips scraping entirely and formats the CSE +with `CancelAfter(overall_deadline)`). THIS IS THE CONTRACT. +`parallel_scrape` (true) dispatches each scrape as a Task and awaits <xref href="System.Threading.Tasks.Task.WhenAll(System.Threading.Tasks.Task%5b%5d)" data-throw-if-not-resolved="false"></xref>, +harvesting whatever completed when the deadline cancels (best-effort). +`snippets_only` (false) skips scraping entirely and formats the CSE snippets directly. Sub-second response. When the deadline fires OR no scraped page meets the quality threshold, the handler falls back to formatting the CSE snippets into a NON-empty response rather than the empty no-results message, so the kernel never sees a webhook timeout. -Upstream URL override: <code>WEB\_SEARCH\_BASE\_URL</code> (used by +Upstream URL override: `WEB_SEARCH_BASE_URL` (used by audit\_skills\_dispatch.py to point at a local fixture). When set, the -URL is rewritten to the override host while the path <code>/customsearch/v1</code> is preserved. +URL is rewritten to the override host while the path +`/customsearch/v1` is preserved. **Modifiers:** `sealed` diff --git a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/wikipedia-search-skill/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/wikipedia-search-skill/index.mdx index 309bc981af..1ede2b3ee0 100644 --- a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/wikipedia-search-skill/index.mdx +++ b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/wikipedia-search-skill/index.mdx @@ -17,12 +17,15 @@ lustri: Wikipedia search skill backed by the public Wikipedia REST API. -Mirrors signalwire-python's <code>signalwire.skills.wikipedia\_search.skill</code>. -The Python skill makes two API calls per query — first <code>action=query\&list=search</code> to find article titles, then <code>action=query\&prop=extracts</code> to fetch each article's intro -extract. Returns the article(s) as <code>**Title**\n\nExtract</code> joined +Mirrors signalwire-python's `signalwire.skills.wikipedia_search.skill`. +The Python skill makes two API calls per query — first +`action=query&list=search` to find article titles, then +`action=query&prop=extracts` to fetch each article's intro +extract. Returns the article(s) as `**Title**\n\nExtract` joined by separators. -Upstream URL override: <code>WIKIPEDIA\_BASE\_URL</code>. Path <code>/w/api.php</code> is preserved when the env var is set so the audit +Upstream URL override: `WIKIPEDIA_BASE_URL`. Path +`/w/api.php` is preserved when the env var is set so the audit fixture sees the documented Wikipedia API path on the wire. **Modifiers:** `sealed` diff --git a/fern/products/sdk-reference/dotnet/signal-wire.skills/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.skills/index.mdx index 52a2c1f4ce..aa3f415de8 100644 --- a/fern/products/sdk-reference/dotnet/signal-wire.skills/index.mdx +++ b/fern/products/sdk-reference/dotnet/signal-wire.skills/index.mdx @@ -38,11 +38,11 @@ lustri: Built-in skill names as a typed, compile-time-checked closed set. **Remarks:** <p> <xref href="SignalWire.Agent.AgentBase.AddSkill(SignalWire.Skills.SkillName%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d)" data-throw-if-not-resolved="false"></xref> -(and the matching <code>RemoveSkill</code> / <code>HasSkill</code> overloads) accept this +(and the matching `RemoveSkill` / `HasSkill` overloads) accept this enum OR a string. The enum gives editor autocompletion and makes a typo fail -at the call site — a bare string like <code>"datetiem"</code> only fails at runtime, +at the call site — a bare string like `"datetiem"` only fails at runtime, on the server. Strings keep parity with the Python reference (which uses a -bare <code>str</code>) and still allow custom / third-party skills that aren't +bare `str`) and still allow custom / third-party skills that aren't built in. </p> diff --git a/fern/products/sdk-reference/dotnet/signal-wire.skills/skill-name-extensions/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.skills/skill-name-extensions/index.mdx index 4ecf8dbbbc..8c9dec8659 100644 --- a/fern/products/sdk-reference/dotnet/signal-wire.skills/skill-name-extensions/index.mdx +++ b/fern/products/sdk-reference/dotnet/signal-wire.skills/skill-name-extensions/index.mdx @@ -30,7 +30,8 @@ public static class SkillNameExtensions ### ToWireName(SkillName) -The canonical snake\_case skill name (the string a skill's <code>Name</code> property returns and that <xref href="SignalWire.Skills.SkillRegistry" data-throw-if-not-resolved="false"></xref> keys on). +The canonical snake\_case skill name (the string a skill's +`Name` property returns and that <xref href="SignalWire.Skills.SkillRegistry" data-throw-if-not-resolved="false"></xref> keys on). **Modifiers:** `static` diff --git a/fern/products/sdk-reference/dotnet/signal-wire.swaig/callback-method-extensions/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.swaig/callback-method-extensions/index.mdx index c01293aad5..445e397f06 100644 --- a/fern/products/sdk-reference/dotnet/signal-wire.swaig/callback-method-extensions/index.mdx +++ b/fern/products/sdk-reference/dotnet/signal-wire.swaig/callback-method-extensions/index.mdx @@ -16,8 +16,8 @@ lustri: # `CallbackMethodExtensions` Maps <xref href="SignalWire.SWAIG.CallbackMethod" data-throw-if-not-resolved="false"></xref> members to the canonical wire values -(uppercase HTTP verbs) that the SWML <code>join\_conference</code> action expects on -its <code>status\_callback\_method</code> / <code>recording\_status\_callback\_method</code> keys. +(uppercase HTTP verbs) that the SWML `join_conference` action expects on +its `status_callback_method` / `recording_status_callback_method` keys. **Modifiers:** `static` diff --git a/fern/products/sdk-reference/dotnet/signal-wire.swaig/codec-extensions/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.swaig/codec-extensions/index.mdx index 8203aa86a5..9dcd81e1dd 100644 --- a/fern/products/sdk-reference/dotnet/signal-wire.swaig/codec-extensions/index.mdx +++ b/fern/products/sdk-reference/dotnet/signal-wire.swaig/codec-extensions/index.mdx @@ -15,7 +15,8 @@ lustri: --- # `CodecExtensions` -Maps <xref href="SignalWire.SWAIG.Codec" data-throw-if-not-resolved="false"></xref> members to the canonical wire values that the SWML <code>tap</code> action expects. +Maps <xref href="SignalWire.SWAIG.Codec" data-throw-if-not-resolved="false"></xref> members to the canonical wire values that the SWML +`tap` action expects. **Modifiers:** `static` @@ -29,9 +30,9 @@ public static class CodecExtensions ### ToWireName(Codec) -The canonical codec string (the value placed on the <code>tap.codec</code> key +The canonical codec string (the value placed on the `tap.codec` key in the emitted SWML). The strings are upper-case and matched exactly, -mirroring the Python reference's literal <code>\["PCMU", "PCMA"]</code> check. +mirroring the Python reference's literal `["PCMU", "PCMA"]` check. **Modifiers:** `static` diff --git a/fern/products/sdk-reference/dotnet/signal-wire.swaig/conference-beep-extensions/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.swaig/conference-beep-extensions/index.mdx index 4cb67c2ded..2c8d705cec 100644 --- a/fern/products/sdk-reference/dotnet/signal-wire.swaig/conference-beep-extensions/index.mdx +++ b/fern/products/sdk-reference/dotnet/signal-wire.swaig/conference-beep-extensions/index.mdx @@ -16,7 +16,7 @@ lustri: # `ConferenceBeepExtensions` Maps <xref href="SignalWire.SWAIG.ConferenceBeep" data-throw-if-not-resolved="false"></xref> members to the canonical wire values that -the SWML <code>join\_conference</code> action expects on its <code>beep</code> key. +the SWML `join_conference` action expects on its `beep` key. **Modifiers:** `static` @@ -30,7 +30,7 @@ public static class ConferenceBeepExtensions ### ToWireName(ConferenceBeep) -The canonical beep string placed on the <code>join\_conference.beep</code> key. +The canonical beep string placed on the `join_conference.beep` key. **Modifiers:** `static` diff --git a/fern/products/sdk-reference/dotnet/signal-wire.swaig/conference-record-extensions/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.swaig/conference-record-extensions/index.mdx index 108dd9f0cf..743d857bc9 100644 --- a/fern/products/sdk-reference/dotnet/signal-wire.swaig/conference-record-extensions/index.mdx +++ b/fern/products/sdk-reference/dotnet/signal-wire.swaig/conference-record-extensions/index.mdx @@ -16,7 +16,7 @@ lustri: # `ConferenceRecordExtensions` Maps <xref href="SignalWire.SWAIG.ConferenceRecord" data-throw-if-not-resolved="false"></xref> members to the canonical wire values that -the SWML <code>join\_conference</code> action expects on its <code>record</code> key. +the SWML `join_conference` action expects on its `record` key. **Modifiers:** `static` @@ -30,7 +30,7 @@ public static class ConferenceRecordExtensions ### ToWireName(ConferenceRecord) -The canonical record string placed on the <code>join\_conference.record</code> key. +The canonical record string placed on the `join_conference.record` key. **Modifiers:** `static` diff --git a/fern/products/sdk-reference/dotnet/signal-wire.swaig/conference-trim-extensions/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.swaig/conference-trim-extensions/index.mdx index cb2c307e0d..f1085b590e 100644 --- a/fern/products/sdk-reference/dotnet/signal-wire.swaig/conference-trim-extensions/index.mdx +++ b/fern/products/sdk-reference/dotnet/signal-wire.swaig/conference-trim-extensions/index.mdx @@ -16,7 +16,7 @@ lustri: # `ConferenceTrimExtensions` Maps <xref href="SignalWire.SWAIG.ConferenceTrim" data-throw-if-not-resolved="false"></xref> members to the canonical wire values that -the SWML <code>join\_conference</code> action expects on its <code>trim</code> key. +the SWML `join_conference` action expects on its `trim` key. **Modifiers:** `static` @@ -30,7 +30,7 @@ public static class ConferenceTrimExtensions ### ToWireName(ConferenceTrim) -The canonical trim string placed on the <code>join\_conference.trim</code> key. +The canonical trim string placed on the `join_conference.trim` key. **Modifiers:** `static` diff --git a/fern/products/sdk-reference/dotnet/signal-wire.swaig/function-result/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.swaig/function-result/index.mdx index 45b7a1267e..d9ada236f6 100644 --- a/fern/products/sdk-reference/dotnet/signal-wire.swaig/function-result/index.mdx +++ b/fern/products/sdk-reference/dotnet/signal-wire.swaig/function-result/index.mdx @@ -16,7 +16,7 @@ lustri: # `FunctionResult` Builds a SWAIG function result with an optional response, actions, and post-processing flag. -All action methods return <code>this</code> for fluent chaining. +All action methods return `this` for fluent chaining. ## Signature @@ -173,9 +173,9 @@ Line 108. Create a payment action for use in payment prompts. -**Remarks:** Parity with the Python reference <code>create\_payment\_action(action\_type, phrase)</code>: -returns <code>\{"type": actionType, "phrase": phrase\}</code>. <code class="paramref">actionType</code> -is <code>"Say"</code> (text-to-speech) or <code>"Play"</code> (audio file URL). +**Remarks:** Parity with the Python reference `create_payment_action(action_type, phrase)`: +returns `{"type": actionType, "phrase": phrase}`. <code class="paramref">actionType</code> +is `"Say"` (text-to-speech) or `"Play"` (audio file URL). **Modifiers:** `static` @@ -207,8 +207,8 @@ Line 1376. Create a payment parameter (name/value pair) for use with <xref href="SignalWire.SWAIG.FunctionResult.Pay(System.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.Int32%2cSystem.Int32%2cSystem.Boolean%2cSystem.Object%2cSystem.Int32%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.Collections.Generic.List%7bSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.String%7d%7d%2cSystem.Collections.Generic.List%7bSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%7d%2cSystem.String)" data-throw-if-not-resolved="false"></xref>. -**Remarks:** Parity with the Python reference <code>create\_payment\_parameter(name, value)</code>: -returns <code>\{"name": name, "value": value\}</code>. +**Remarks:** Parity with the Python reference `create_payment_parameter(name, value)`: +returns `{"name": name, "value": value}`. **Modifiers:** `static` @@ -240,10 +240,11 @@ Line 1392. Create a payment-prompt structure for use with <xref href="SignalWire.SWAIG.FunctionResult.Pay(System.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.Int32%2cSystem.Int32%2cSystem.Boolean%2cSystem.Object%2cSystem.Int32%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.Collections.Generic.List%7bSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.String%7d%7d%2cSystem.Collections.Generic.List%7bSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%7d%2cSystem.String)" data-throw-if-not-resolved="false"></xref>. -**Remarks:** Parity with the Python reference <code>create\_payment\_prompt(for\_situation, actions, card\_type=None, error\_type=None)</code>: -returns <code>\{"for": forSituation, "actions": actions, "card\_type"?, "error\_type"?\}</code>. -The situation string is keyed <code>for</code> (a C# keyword, hence the parameter -is <code class="paramref">forSituation</code>); <code>card\_type</code>/<code>error\_type</code> are +**Remarks:** Parity with the Python reference +`create_payment_prompt(for_situation, actions, card_type=None, error_type=None)`: +returns `{"for": forSituation, "actions": actions, "card_type"?, "error_type"?}`. +The situation string is keyed `for` (a C# keyword, hence the parameter +is <code class="paramref">forSituation</code>); `card_type`/`error_type` are included only when supplied. **Modifiers:** `static` @@ -259,7 +260,7 @@ public static Dictionary CreatePaymentPrompt(string forSituation - Actions with <code>type</code>/<code>phrase</code> keys (see <xref href="SignalWire.SWAIG.FunctionResult.CreatePaymentAction(System.String%2cSystem.String)" data-throw-if-not-resolved="false"></xref>). + Actions with `type`/`phrase` keys (see <xref href="SignalWire.SWAIG.FunctionResult.CreatePaymentAction(System.String%2cSystem.String)" data-throw-if-not-resolved="false"></xref>). @@ -330,12 +331,14 @@ Line 660. Execute an RPC method on a call using SWML. -**Remarks:** Parity with the Python reference <code>execute\_rpc(method, params=None, call\_id=None, node\_id=None)</code>: the -rpc params dict is keyed <code>\{method, call\_id?, node\_id?, params?\}</code> — <code>call\_id</code>/<code>node\_id</code> are TOP-LEVEL siblings of <code>method</code>/<code>params</code>, -NOT nested inside <code>params</code> — and the <code>\{execute\_rpc: …\}</code> verb is -wrapped in a full SWML document under the <code>SWML</code> action key. There is -no <code>jsonrpc</code> envelope, and method strings are bare (e.g. <code>"dial"</code>, -not <code>"calling.dial"</code>). <code>params</code> is omitted when empty. +**Remarks:** Parity with the Python reference +`execute_rpc(method, params=None, call_id=None, node_id=None)`: the +rpc params dict is keyed `{method, call_id?, node_id?, params?}` — +`call_id`/`node_id` are TOP-LEVEL siblings of `method`/`params`, +NOT nested inside `params` — and the `{execute_rpc: …}` verb is +wrapped in a full SWML document under the `SWML` action key. There is +no `jsonrpc` envelope, and method strings are bare (e.g. `"dial"`, +not `"calling.dial"`). `params` is omitted when empty. #### Signature @@ -369,12 +372,13 @@ Line 1241. Execute SWML content with optional transfer behavior. -**Remarks:** Mirrors the Python reference <code>execute\_swml(swml\_content, transfer=False)</code>: +**Remarks:** Mirrors the Python reference `execute_swml(swml_content, transfer=False)`: the content (a dict, or a JSON string parsed to a dict) is emitted verbatim -under the <code>SWML</code> action key. When <code class="paramref">transfer</code> is true, -a <code>"transfer": "true"</code> entry is added INSIDE that SWML dict (Python does <code>action\["transfer"] = "true"</code> on the SWML payload itself — there is no -separate <code>transfer\_swml</code> action name). A JSON string that fails to parse -is wrapped as <code>\{ "raw\_swml": \ \}</code>, matching the reference. +under the `SWML` action key. When <code class="paramref">transfer</code> is true, +a `"transfer": "true"` entry is added INSIDE that SWML dict (Python does +`action["transfer"] = "true"` on the SWML payload itself — there is no +separate `transfer_swml` action name). A JSON string that fails to parse +is wrapped as `{ "raw_swml": <text> }`, matching the reference. #### Signature @@ -394,7 +398,7 @@ public FunctionResult ExecuteSwml(object swmlContent, bool transfer = false) #### Throws -- `System.ArgumentException` — If <code class="paramref">swmlContent</code> is neither a string nor a dictionary (parity with Python's <code>TypeError</code>). +- `System.ArgumentException` — If <code class="paramref">swmlContent</code> is neither a string nor a dictionary (parity with Python's `TypeError`). #### Source @@ -473,14 +477,15 @@ Line 180. ### JoinConference Join an ad-hoc audio conference (RELAY + CXML calls) using SWML. -Full parity with the Python reference <code>signalwire/core/function\_result.py::join\_conference</code>: the conference <code class="paramref">name</code> plus 18 optional parameters, each validated to the +Full parity with the Python reference +`signalwire/core/function_result.py::join_conference`: the conference <code class="paramref">name</code> plus 18 optional parameters, each validated to the same closed sets / bounds as Python, and emitted under its snake\_case wire key only when it differs from its default. When every parameter is at its default the action value is the bare conference-name string (simple form); -otherwise it is a <code>\{ "name": ..., ... \}</code> object (full form). +otherwise it is a `{ "name": ..., ... }` object (full form). **Remarks:** This flat, all-string overload is the parity-bearing signature against the -Python reference (which takes bare <code>str</code> arguments for the closed sets). +Python reference (which takes bare `str` arguments for the closed sets). For an idiomatic, compile-time-checked alternative see <xref href="SignalWire.SWAIG.FunctionResult.JoinConference(System.String%2cSignalWire.SWAIG.JoinConferenceOptions)" data-throw-if-not-resolved="false"></xref>, which accepts the typed <xref href="SignalWire.SWAIG.ConferenceBeep" data-throw-if-not-resolved="false"></xref> / <xref href="SignalWire.SWAIG.ConferenceRecord" data-throw-if-not-resolved="false"></xref> / <xref href="SignalWire.SWAIG.ConferenceTrim" data-throw-if-not-resolved="false"></xref> / <xref href="SignalWire.SWAIG.CallbackMethod" data-throw-if-not-resolved="false"></xref> enums and delegates straight here so the emitted SWML is identical. @@ -569,8 +574,9 @@ Line 786. Join a RELAY room using SWML. -**Remarks:** Parity with the Python reference <code>join\_room(name)</code>: the <code>join\_room</code> verb (params <code>\{name\}</code>) is wrapped in a SWML document -and emitted under the <code>SWML</code> action key. +**Remarks:** Parity with the Python reference `join_room(name)`: the +`join_room` verb (params `{name}`) is wrapped in a SWML document +and emitted under the `SWML` action key. #### Signature @@ -596,7 +602,7 @@ Line 931. ### Pay(string, string, string?, string, int, int, bool, object?, int, string, string?, string, string, string, string?, string, List\>?, List\>?, string?) -Process a payment using the SWML <code>pay</code> verb. +Process a payment using the SWML `pay` verb. **Remarks:** Full parity with the Python reference <code>pay(payment\_connector\_url, input\_method="dtmf", status\_url=None, payment\_method="credit-card", timeout=5, max\_attempts=1, security\_code=True, @@ -604,12 +610,14 @@ postal\_code=True, min\_postal\_code\_length=0, token\_type="reusable", charge\_amount=None, currency="usd", language="en-US", voice="woman", description=None, valid\_card\_types="visa mastercard amex", parameters=None, prompts=None, ai\_response=…)</code>. The SWML document is a two-verb main -section — a leading <code>\{set: \{ai\_response: …\}\}</code> followed by <code>\{pay: …\}</code> — routed through <xref href="SignalWire.SWAIG.FunctionResult.ExecuteSwml(System.Object%2cSystem.Boolean)" data-throw-if-not-resolved="false"></xref> under the <code>SWML</code> action key (NOT a bare top-level <code>pay</code>). +section — a leading `{set: {ai_response: …}}` followed by +`{pay: …}` — routed through <xref href="SignalWire.SWAIG.FunctionResult.ExecuteSwml(System.Object%2cSystem.Boolean)" data-throw-if-not-resolved="false"></xref> under the +`SWML` action key (NOT a bare top-level `pay`). <p> Wire-shape details matching Python: the collection-method key is -<code>input</code> (NOT <code>input_method</code>); numeric and boolean fields are -emitted as STRINGS (<code>"5"</code>/<code>"true"</code>); <code class="paramref">postalCode</code> +`input` (NOT `input_method`); numeric and boolean fields are +emitted as STRINGS (`"5"`/`"true"`); <code class="paramref">postalCode</code> is a lowercased bool-string when boolean, or verbatim when a string. The optional fields (status_url/charge_amount/description/parameters/prompts) are emitted only when supplied. @@ -638,7 +646,7 @@ public FunctionResult Pay(string paymentConnectorUrl, string inputMethod = "dtmf - Prompt-for-postal flag (<code>bool</code>) or an actual postcode (<code>string</code>); pass a <xref href="System.Boolean" data-throw-if-not-resolved="false"></xref> or a <xref href="System.String" data-throw-if-not-resolved="false"></xref>. + Prompt-for-postal flag (`bool`) or an actual postcode (`string`); pass a <xref href="System.Boolean" data-throw-if-not-resolved="false"></xref> or a <xref href="System.String" data-throw-if-not-resolved="false"></xref>. @@ -683,9 +691,10 @@ Line 1154. Play an audio or video file in the background. -**Remarks:** Parity with the Python reference <code>play\_background\_file(filename, wait=False)</code>: +**Remarks:** Parity with the Python reference `play_background_file(filename, wait=False)`: the action key is "playback\_bg". When <code class="paramref">wait</code> is false the -value is the bare filename string; when true it is a <code>\{file: filename, wait: true\}</code> object. +value is the bare filename string; when true it is a +`{file: filename, wait: true}` object. #### Signature @@ -719,15 +728,16 @@ overload with the two closed-set arguments (<code class="paramref">format< **Remarks:** Full parity with the Python reference <code>record\_call(control\_id, stereo, format, direction, terminators, beep, input\_sensitivity, initial\_timeout, end\_silence\_timeout, max\_length, status\_url)</code>, in the same parameter order. The Python reference -validates the bare-string <code>format</code>/<code>direction</code> against the closed +validates the bare-string `format`/`direction` against the closed sets \{wav,mp3,mp4\} / \{speak,listen,both\}; this overload surfaces those knowable sets as enums so a bad value is a compile error rather than a -runtime <code>ValueError</code> (a same-arity bare-string overload preserves the -Python <code>str</code> path — see <xref href="SignalWire.SWAIG.FunctionResult.RecordCall(System.String%2cSystem.Boolean%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.Boolean%2cSystem.Double%2cSystem.Nullable%7bSystem.Double%7d%2cSystem.Nullable%7bSystem.Double%7d%2cSystem.Nullable%7bSystem.Double%7d%2cSystem.String)" data-throw-if-not-resolved="false"></xref>). -The <code>record\_call</code> verb is wrapped in a SWML document -(<code>\{version, sections: \{main: \[\{record\_call: ...\}]\}\}</code>) and emitted under -the <code>SWML</code> action key — there is no bare top-level <code>record\_call</code> -action and no invented <code>initiator</code> key. <code>stereo</code>, <code>format</code>, <code>direction</code>, <code>beep</code>, and <code>input\_sensitivity</code> are ALWAYS +runtime `ValueError` (a same-arity bare-string overload preserves the +Python `str` path — see <xref href="SignalWire.SWAIG.FunctionResult.RecordCall(System.String%2cSystem.Boolean%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.Boolean%2cSystem.Double%2cSystem.Nullable%7bSystem.Double%7d%2cSystem.Nullable%7bSystem.Double%7d%2cSystem.Nullable%7bSystem.Double%7d%2cSystem.String)" data-throw-if-not-resolved="false"></xref>). +The `record_call` verb is wrapped in a SWML document +(`{version, sections: {main: [{record_call: ...}]}}`) and emitted under +the `SWML` action key — there is no bare top-level `record_call` +action and no invented `initiator` key. `stereo`, `format`, +`direction`, `beep`, and `input_sensitivity` are ALWAYS emitted (Python emits them unconditionally); the remaining parameters are emitted only when set. @@ -815,9 +825,9 @@ Line 478. Single-key overload of <xref href="SignalWire.SWAIG.FunctionResult.RemoveGlobalData(System.Collections.Generic.List%7bSystem.String%7d)" data-throw-if-not-resolved="false"></xref>. -**Remarks:** Python's <code>remove\_global\_data(keys: Union\[str, List\[str]])</code> accepts a +**Remarks:** Python's `remove_global_data(keys: Union[str, List[str]])` accepts a bare string AND a list; the bare-string call emits the action value as the -bare string (<code>\{"unset\_global\_data": "plan"\}</code>), NOT a one-element list. +bare string (`{"unset_global_data": "plan"}`), NOT a one-element list. This overload surfaces that arm so the emission is byte-identical to the reference for a single key. @@ -865,9 +875,9 @@ Line 231. Single-key overload of <xref href="SignalWire.SWAIG.FunctionResult.RemoveMetadata(System.Collections.Generic.List%7bSystem.String%7d)" data-throw-if-not-resolved="false"></xref>. -**Remarks:** Python's <code>remove\_metadata(keys: Union\[str, List\[str]])</code> accepts a bare +**Remarks:** Python's `remove_metadata(keys: Union[str, List[str]])` accepts a bare string AND a list; the bare-string call emits the action value as the bare -string (<code>\{"unset\_meta\_data": "token"\}</code>), NOT a one-element list. This +string (`{"unset_meta_data": "token"}`), NOT a one-element list. This overload surfaces that arm so the emission is byte-identical to the reference for a single key. @@ -943,8 +953,11 @@ Line 398. Inject a message into an AI agent on another call using <xref href="SignalWire.SWAIG.FunctionResult.ExecuteRpc(System.String%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%2cSystem.String%2cSystem.String)" data-throw-if-not-resolved="false"></xref>. -**Remarks:** Parity with the Python reference <code>rpc\_ai\_message(call\_id, message\_text, role="system")</code>: emits <code>method="ai\_message"</code>, <code>call\_id</code> as a top-level sibling, and <code>params=\{role, message\_text\}</code>. <code class="paramref">role</code> remains -caller-overridable (defaults to <code>"system"</code>), not hard-coded. +**Remarks:** Parity with the Python reference +`rpc_ai_message(call_id, message_text, role="system")`: emits +`method="ai_message"`, `call_id` as a top-level sibling, and +`params={role, message_text}`. <code class="paramref">role</code> remains +caller-overridable (defaults to `"system"`), not hard-coded. #### Signature @@ -976,7 +989,9 @@ Line 1298. Unhold another call using <xref href="SignalWire.SWAIG.FunctionResult.ExecuteRpc(System.String%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%2cSystem.String%2cSystem.String)" data-throw-if-not-resolved="false"></xref>. -**Remarks:** Parity with the Python reference <code>rpc\_ai\_unhold(call\_id)</code>: emits <code>method="ai\_unhold"</code>, <code>call\_id</code> as a top-level sibling, and <code>params=\{\}</code> (empty → omitted by <xref href="SignalWire.SWAIG.FunctionResult.ExecuteRpc(System.String%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%2cSystem.String%2cSystem.String)" data-throw-if-not-resolved="false"></xref>). +**Remarks:** Parity with the Python reference `rpc_ai_unhold(call_id)`: emits +`method="ai_unhold"`, `call_id` as a top-level sibling, and +`params={}` (empty → omitted by <xref href="SignalWire.SWAIG.FunctionResult.ExecuteRpc(System.String%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%2cSystem.String%2cSystem.String)" data-throw-if-not-resolved="false"></xref>). #### Signature @@ -1004,8 +1019,11 @@ Line 1315. Dial out to a number with a destination SWML URL using <xref href="SignalWire.SWAIG.FunctionResult.ExecuteRpc(System.String%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%2cSystem.String%2cSystem.String)" data-throw-if-not-resolved="false"></xref>. -**Remarks:** Parity with the Python reference <code>rpc\_dial(to\_number, from\_number, dest\_swml, device\_type="phone")</code>: -emits <code>method="dial"</code> with <code>params=\{devices: \{type: device\_type, params: \{to\_number, from\_number\}\}, dest\_swml\}</code>. <code class="paramref">deviceType</code> remains caller-overridable (defaults to <code>"phone"</code>), not hard-coded. +**Remarks:** Parity with the Python reference +`rpc_dial(to_number, from_number, dest_swml, device_type="phone")`: +emits `method="dial"` with +`params={devices: {type: device_type, params: {to_number, from_number}}, dest_swml}`. <code class="paramref">deviceType</code> remains caller-overridable (defaults to +`"phone"`), not hard-coded. #### Signature @@ -1063,11 +1081,12 @@ Line 412. Send a text message to a PSTN phone number using SWML. -**Remarks:** Full parity with the Python reference <code>send\_sms(to\_number, from\_number, body=None, media=None, tags=None, region=None)</code>. +**Remarks:** Full parity with the Python reference +`send_sms(to_number, from_number, body=None, media=None, tags=None, region=None)`. Either <code class="paramref">body</code> or <code class="paramref">media</code> (or both) must be -provided. The <code>send\_sms</code> verb is wrapped in a SWML document and emitted -under the <code>SWML</code> action key. <code>to\_number</code>/<code>from\_number</code> are -always present; <code>body</code>, <code>media</code>, <code>tags</code>, <code>region</code> are +provided. The `send_sms` verb is wrapped in a SWML document and emitted +under the `SWML` action key. `to_number`/`from_number` are +always present; `body`, `media`, `tags`, `region` are added only when set. #### Signature @@ -1096,7 +1115,7 @@ public FunctionResult SendSms(string toNumber, string fromNumber, string? body = #### Throws -- `System.ArgumentException` — If neither <code class="paramref">body</code> nor <code class="paramref">media</code> is provided (parity with Python's <code>ValueError("Either body or media must be provided")</code>). +- `System.ArgumentException` — If neither <code class="paramref">body</code> nor <code class="paramref">media</code> is provided (parity with Python's `ValueError("Either body or media must be provided")`). #### Source @@ -1230,8 +1249,8 @@ Line 638. Queue simulated user input. -**Remarks:** Parity with the Python reference <code>simulate\_user\_input(text)</code>: the -action key is <code>user\_input</code> (NOT <code>simulate\_user\_input</code>), with the +**Remarks:** Parity with the Python reference `simulate_user_input(text)`: the +action key is `user_input` (NOT `simulate_user_input`), with the bare text string as its value. #### Signature @@ -1260,8 +1279,9 @@ Line 1328. Send a SIP REFER to a SIP call using SWML. -**Remarks:** Parity with the Python reference <code>sip\_refer(to\_uri)</code>: the <code>sip\_refer</code> verb (params <code>\{to\_uri\}</code>) is wrapped in a SWML document -and emitted under the <code>SWML</code> action key. +**Remarks:** Parity with the Python reference `sip_refer(to_uri)`: the +`sip_refer` verb (params `{to_uri}`) is wrapped in a SWML document +and emitted under the `SWML` action key. #### Signature @@ -1329,9 +1349,9 @@ Line 447. Stop an active background call recording using SWML. -**Remarks:** Parity with the Python reference <code>stop\_record\_call(control\_id=None)</code>: -the <code>stop\_record\_call</code> verb (params <code>\{\}</code>, plus <code>control\_id</code> -when set) is wrapped in a SWML document and emitted under the <code>SWML</code> +**Remarks:** Parity with the Python reference `stop_record_call(control_id=None)`: +the `stop_record_call` verb (params `{}`, plus `control_id` +when set) is wrapped in a SWML document and emitted under the `SWML` action key. #### Signature @@ -1360,8 +1380,9 @@ Line 604. Stop an active tap stream using SWML. -**Remarks:** Parity with the Python reference <code>stop\_tap(control\_id=None)</code>: the <code>stop\_tap</code> verb (params <code>\{\}</code>, plus <code>control\_id</code> when set) is -wrapped in a SWML document and emitted under the <code>SWML</code> action key. +**Remarks:** Parity with the Python reference `stop_tap(control_id=None)`: the +`stop_tap` verb (params `{}`, plus `control_id` when set) is +wrapped in a SWML document and emitted under the `SWML` action key. #### Signature @@ -1389,11 +1410,13 @@ Line 1076. Change the agent's context/prompt during a conversation. -**Remarks:** Parity with the Python reference <code>switch\_context(system\_prompt=None, user\_prompt=None, consolidate=False, full\_reset=False)</code>: +**Remarks:** Parity with the Python reference +`switch_context(system_prompt=None, user_prompt=None, consolidate=False, full_reset=False)`: when ONLY <code class="paramref">systemPrompt</code> is set (and the other three are -at their defaults) the <code>context\_switch</code> value is the bare +at their defaults) the `context_switch` value is the bare system-prompt string (simple form); any other combination emits the object -form with each supplied field under its snake\_case key. There is no <code>isolated</code> parameter (the Python reference does not define one). +form with each supplied field under its snake\_case key. There is no +`isolated` parameter (the Python reference does not define one). #### Signature @@ -1427,7 +1450,7 @@ Line 353. Force the conversation into a different context. -**Remarks:** Parity with the Python reference <code>swml\_change\_context(context\_name)</code>: +**Remarks:** Parity with the Python reference `swml_change_context(context_name)`: add\_action("change\_context", context\_name) — the action key is "change\_context" and its value is the bare context-name string. @@ -1457,7 +1480,7 @@ Line 335. Force the conversation into a specific step in the current context. -**Remarks:** Parity with the Python reference <code>swml\_change\_step(step\_name)</code>: +**Remarks:** Parity with the Python reference `swml_change_step(step_name)`: add\_action("change\_step", step\_name) — the action key is "change\_step" and its value is the bare step-name string (not a context\_switch dict). @@ -1488,10 +1511,11 @@ Line 321. Add a SWML transfer action with an AI response set up for when the transfer completes and control returns to the agent. -**Remarks:** Parity with the Python reference <code>swml\_transfer(dest, ai\_response, final=True)</code>: -emits a two-verb SWML document — <code>\{set: \{ai\_response: ...\}\}</code> then <code>\{transfer: \{dest: ...\}\}</code> — under the <code>SWML</code> action key, plus a -top-level <code>"transfer": str(final).lower()</code> sibling marking the call -(non-)final. <code class="paramref">final</code> defaults to <code>true</code> (permanent +**Remarks:** Parity with the Python reference `swml_transfer(dest, ai_response, final=True)`: +emits a two-verb SWML document — `{set: {ai_response: ...}}` then +`{transfer: {dest: ...}}` — under the `SWML` action key, plus a +top-level `"transfer": str(final).lower()` sibling marking the call +(non-)final. <code class="paramref">final</code> defaults to `true` (permanent transfer), same as <xref href="SignalWire.SWAIG.FunctionResult.Connect(System.String%2cSystem.Boolean%2cSystem.String)" data-throw-if-not-resolved="false"></xref>. #### Signature @@ -1524,9 +1548,9 @@ Line 149. Send a user event through SWML to update the client UI. -**Remarks:** Parity with the Python reference <code>swml\_user\_event(event\_data)</code>: emits a -SWML document <code>\{sections: \{main: \[\{user\_event: \{event: \\}\}]\}, version: "1.0.0"\}</code> -under the <code>SWML</code> action key (NOT a bare top-level <code>user\_event</code>). +**Remarks:** Parity with the Python reference `swml_user_event(event_data)`: emits a +SWML document `{sections: {main: [{user_event: {event: <data>}}]}, version: "1.0.0"}` +under the `SWML` action key (NOT a bare top-level `user_event`). #### Signature @@ -1555,11 +1579,16 @@ Line 294. Start a background call tap using SWML — canonical, full-arity overload with the two closed-set arguments (<code class="paramref">direction</code> / <code class="paramref">codec</code>) as the typed <xref href="SignalWire.SWAIG.TapDirection" data-throw-if-not-resolved="false"></xref> / <xref href="SignalWire.SWAIG.Codec" data-throw-if-not-resolved="false"></xref> enums. -**Remarks:** Full parity with the Python reference <code>tap(uri, control\_id, direction, codec, rtp\_ptime, status\_url)</code>, in the -same parameter order. The Python reference validates the bare-string <code>direction</code>/<code>codec</code> against the closed sets \{speak,hear,both\} / +**Remarks:** Full parity with the Python reference +`tap(uri, control_id, direction, codec, rtp_ptime, status_url)`, in the +same parameter order. The Python reference validates the bare-string +`direction`/`codec` against the closed sets \{speak,hear,both\} / \{PCMU,PCMA\}; this overload surfaces those knowable sets as enums so a bad -value is a compile error rather than a runtime <code>ValueError</code> (a -same-arity bare-string overload preserves the Python <code>str</code> path — see <xref href="SignalWire.SWAIG.FunctionResult.Tap(System.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.Int32%2cSystem.String)" data-throw-if-not-resolved="false"></xref>). The <code>tap</code> verb is wrapped in a SWML document and emitted under the <code>SWML</code> action key. Only <code>uri</code> is always present; <code>control\_id</code>, <code>direction</code>, <code>codec</code>, <code>rtp\_ptime</code>, and <code>status\_url</code> are +value is a compile error rather than a runtime `ValueError` (a +same-arity bare-string overload preserves the Python `str` path — see <xref href="SignalWire.SWAIG.FunctionResult.Tap(System.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.Int32%2cSystem.String)" data-throw-if-not-resolved="false"></xref>). The +`tap` verb is wrapped in a SWML document and emitted under the +`SWML` action key. Only `uri` is always present; `control_id`, +`direction`, `codec`, `rtp_ptime`, and `status_url` are emitted only when they differ from their defaults (mirrors Python's per-key guards). @@ -1617,7 +1646,7 @@ guards). #### Throws -- `System.ArgumentException` — If <code class="paramref">rtpPtime</code> is not a positive integer (parity with Python's <code>ValueError</code>); <code class="paramref">direction</code>/<code class="paramref">codec</code> are closed-set enums and so cannot be invalid. +- `System.ArgumentException` — If <code class="paramref">rtpPtime</code> is not a positive integer (parity with Python's `ValueError`); <code class="paramref">direction</code>/<code class="paramref">codec</code> are closed-set enums and so cannot be invalid. #### Source @@ -1631,11 +1660,11 @@ Line 971. Serialize to the JSON structure expected by SWAIG. -**Remarks:** Byte-parity with the Python reference <code>to\_dict()</code>: +**Remarks:** Byte-parity with the Python reference `to_dict()`: -<ul><li><code>response</code> is included ONLY when non-empty (an empty string is omitted).</li><li><code>action</code> is included only when there is at least one action.</li><li><code>post_process</code> is included only when it is <code>true</code> AND there are -actions to execute (it is meaningless without actions).</li><li>When neither <code>response</code> nor <code>action</code> would be present, a default -<code>response</code> of <code>"Action completed."</code> is emitted so the result is never empty.</li></ul> +<ul><li>`response` is included ONLY when non-empty (an empty string is omitted).</li><li>`action` is included only when there is at least one action.</li><li>`post_process` is included only when it is `true` AND there are +actions to execute (it is meaningless without actions).</li><li>When neither `response` nor `action` would be present, a default +`response` of `"Action completed."` is emitted so the result is never empty.</li></ul> #### Signature @@ -1659,10 +1688,10 @@ Line 75. Enable/disable specific SWAIG functions. -**Remarks:** Parity with the Python reference <code>toggle\_functions(function\_toggles)</code>: -takes a list of toggle records (each a <code>\{function, active\}</code> dict) and -passes it through verbatim under the <code>toggle\_functions</code> action key — no -reshaping. (The previous <code>Dictionary\</code> shape both +**Remarks:** Parity with the Python reference `toggle_functions(function_toggles)`: +takes a list of toggle records (each a `{function, active}` dict) and +passes it through verbatim under the `toggle_functions` action key — no +reshaping. (The previous `Dictionary<string,bool>` shape both changed the signature AND lost caller-controlled key ordering / extra keys.) #### Signature diff --git a/fern/products/sdk-reference/dotnet/signal-wire.swaig/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.swaig/index.mdx index 60f71969a4..5e4bd98b57 100644 --- a/fern/products/sdk-reference/dotnet/signal-wire.swaig/index.mdx +++ b/fern/products/sdk-reference/dotnet/signal-wire.swaig/index.mdx @@ -15,27 +15,27 @@ lustri: - Maps <xref href="SignalWire.SWAIG.CallbackMethod" data-throw-if-not-resolved="false"></xref> members to the canonical wire values (uppercase HTTP verbs) that the SWML <code>join\_conference</code> action expects on its <code>status\_callback\_method</code> / <code>recording\_status\_callback\_method</code> keys. + Maps <xref href="SignalWire.SWAIG.CallbackMethod" data-throw-if-not-resolved="false"></xref> members to the canonical wire values (uppercase HTTP verbs) that the SWML `join_conference` action expects on its `status_callback_method` / `recording_status_callback_method` keys. - Maps <xref href="SignalWire.SWAIG.Codec" data-throw-if-not-resolved="false"></xref> members to the canonical wire values that the SWML <code>tap</code> action expects. + Maps <xref href="SignalWire.SWAIG.Codec" data-throw-if-not-resolved="false"></xref> members to the canonical wire values that the SWML `tap` action expects. - Maps <xref href="SignalWire.SWAIG.ConferenceBeep" data-throw-if-not-resolved="false"></xref> members to the canonical wire values that the SWML <code>join\_conference</code> action expects on its <code>beep</code> key. + Maps <xref href="SignalWire.SWAIG.ConferenceBeep" data-throw-if-not-resolved="false"></xref> members to the canonical wire values that the SWML `join_conference` action expects on its `beep` key. - Maps <xref href="SignalWire.SWAIG.ConferenceRecord" data-throw-if-not-resolved="false"></xref> members to the canonical wire values that the SWML <code>join\_conference</code> action expects on its <code>record</code> key. + Maps <xref href="SignalWire.SWAIG.ConferenceRecord" data-throw-if-not-resolved="false"></xref> members to the canonical wire values that the SWML `join_conference` action expects on its `record` key. - Maps <xref href="SignalWire.SWAIG.ConferenceTrim" data-throw-if-not-resolved="false"></xref> members to the canonical wire values that the SWML <code>join\_conference</code> action expects on its <code>trim</code> key. + Maps <xref href="SignalWire.SWAIG.ConferenceTrim" data-throw-if-not-resolved="false"></xref> members to the canonical wire values that the SWML `join_conference` action expects on its `trim` key. - Builds a SWAIG function result with an optional response, actions, and post-processing flag. All action methods return <code>this</code> for fluent chaining. + Builds a SWAIG function result with an optional response, actions, and post-processing flag. All action methods return `this` for fluent chaining. @@ -43,19 +43,19 @@ lustri: - Fluent, type-safe builder for a SWAIG tool's <code>parameters</code> — the JSON-Schema <code>properties</code> map passed as the third argument to <xref href="SignalWire.SWML.Service.DefineTool(System.String%2cSystem.String%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%2cSystem.Func%7bSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%2cSignalWire.SWAIG.FunctionResult%7d%2cSystem.Boolean)" data-throw-if-not-resolved="false"></xref> / SignalWire.Agent.AgentBase.DefineTool. + Fluent, type-safe builder for a SWAIG tool's `parameters` — the JSON-Schema `properties` map passed as the third argument to <xref href="SignalWire.SWML.Service.DefineTool(System.String%2cSystem.String%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%2cSystem.Func%7bSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%2cSignalWire.SWAIG.FunctionResult%7d%2cSystem.Boolean)" data-throw-if-not-resolved="false"></xref> / SignalWire.Agent.AgentBase.DefineTool. - Maps <xref href="SignalWire.SWAIG.RecordDirection" data-throw-if-not-resolved="false"></xref> members to the canonical wire values that the SWML <code>record\_call</code> action expects. + Maps <xref href="SignalWire.SWAIG.RecordDirection" data-throw-if-not-resolved="false"></xref> members to the canonical wire values that the SWML `record_call` action expects. - Maps <xref href="SignalWire.SWAIG.RecordFormat" data-throw-if-not-resolved="false"></xref> members to the canonical wire values that the SWML <code>record\_call</code> action expects. + Maps <xref href="SignalWire.SWAIG.RecordFormat" data-throw-if-not-resolved="false"></xref> members to the canonical wire values that the SWML `record_call` action expects. - Maps <xref href="SignalWire.SWAIG.TapDirection" data-throw-if-not-resolved="false"></xref> members to the canonical wire values that the SWML <code>tap</code> action expects. + Maps <xref href="SignalWire.SWAIG.TapDirection" data-throw-if-not-resolved="false"></xref> members to the canonical wire values that the SWML `tap` action expects. @@ -63,14 +63,14 @@ lustri: ### CallbackMethod -HTTP method for the <code>status\_callback</code> / <code>recording\_status\_callback</code> +HTTP method for the `status_callback` / `recording_status_callback` URLs on <xref href="SignalWire.SWAIG.FunctionResult.JoinConference(System.String%2cSignalWire.SWAIG.JoinConferenceOptions)" data-throw-if-not-resolved="false"></xref>, as a typed, compile-time-checked closed set. **Remarks:** <p> The Python reference validates these arguments explicitly -(<code>join\_conference(... status\_callback\_method ... recording\_status\_callback\_method ...)</code> -raises <code>ValueError</code> unless the value is <code>"GET"</code> or <code>"POST"</code>), +(`join_conference(... status_callback_method ... recording_status_callback_method ...)` +raises `ValueError` unless the value is `"GET"` or `"POST"`), so it is a genuine closed set rather than a free-form string. </p> @@ -112,20 +112,21 @@ compile-time-checked closed set. **Remarks:** <p> The Python reference validates this argument explicitly -(<code>tap(... codec ...)</code> raises <code>ValueError</code> unless the value is <code>"PCMU"</code> or <code>"PCMA"</code>), so it is a genuine closed set rather than a -free-form string. The wire strings are upper-case (<code>"PCMU"</code> / <code>"PCMA"</code>). +(`tap(... codec ...)` raises `ValueError` unless the value is +`"PCMU"` or `"PCMA"`), so it is a genuine closed set rather than a +free-form string. The wire strings are upper-case (`"PCMU"` / `"PCMA"`). </p> <p> -This is the two-value SWAIG <code>tap</code> codec set and is deliberately -<strong>distinct</strong> from the larger RELAY <code>connect</code>/<code>stream</code> -codec superset (<code>{PCMU, PCMA, OPUS, G729, G722, VP8, H264}</code>, optionally -comma-joined): only <code>PCMU</code>/<code>PCMA</code> are valid here, so this type must +This is the two-value SWAIG `tap` codec set and is deliberately +<strong>distinct</strong> from the larger RELAY `connect`/`stream` +codec superset (`{PCMU, PCMA, OPUS, G729, G722, VP8, H264}`, optionally +comma-joined): only `PCMU`/`PCMA` are valid here, so this type must not be reused for those RELAY params (which stay strings). FunctionResult.Tap(string, TapDirection, Codec, string, int, string?) accepts this enum OR a string: the enum gives editor autocompletion and turns a typo into a compile error, while the string overload preserves parity with -the Python reference (which takes a bare <code>str</code>). +the Python reference (which takes a bare `str`). </p> <p> Each member maps to its canonical wire value via @@ -169,11 +170,12 @@ as a typed, compile-time-checked closed set. **Remarks:** <p> The Python reference validates this argument explicitly -(<code>join\_conference(... beep ...)</code> raises <code>ValueError</code> unless the -value is <code>"true"</code>, <code>"false"</code>, <code>"onEnter"</code>, or <code>"onExit"</code>), -so it is a genuine closed set rather than a free-form string. The typed <code>JoinConference(string, JoinConferenceOptions?)</code> overload accepts this +(`join_conference(... beep ...)` raises `ValueError` unless the +value is `"true"`, `"false"`, `"onEnter"`, or `"onExit"`), +so it is a genuine closed set rather than a free-form string. The typed +`JoinConference(string, JoinConferenceOptions?)` overload accepts this enum; the flat string overload preserves parity with the Python reference -(which takes a bare <code>str</code> validated to the same closed set). +(which takes a bare `str` validated to the same closed set). </p> <p> @@ -222,10 +224,10 @@ as a typed, compile-time-checked closed set. **Remarks:** <p> The Python reference validates this argument explicitly -(<code>join\_conference(... record ...)</code> raises <code>ValueError</code> unless the -value is <code>"do-not-record"</code> or <code>"record-from-start"</code>), so it is a +(`join_conference(... record ...)` raises `ValueError` unless the +value is `"do-not-record"` or `"record-from-start"`), so it is a genuine closed set rather than a free-form string. It is distinct from the <xref href="SignalWire.SWAIG.RecordFormat" data-throw-if-not-resolved="false"></xref>/<xref href="SignalWire.SWAIG.RecordDirection" data-throw-if-not-resolved="false"></xref> closed sets that -describe <code>record\_call</code> output; this one toggles whether the conference +describe `record_call` output; this one toggles whether the conference itself records. </p> @@ -267,8 +269,8 @@ as a typed, compile-time-checked closed set. **Remarks:** <p> The Python reference validates this argument explicitly -(<code>join\_conference(... trim ...)</code> raises <code>ValueError</code> unless the -value is <code>"trim-silence"</code> or <code>"do-not-trim"</code>), so it is a genuine +(`join_conference(... trim ...)` raises `ValueError` unless the +value is `"trim-silence"` or `"do-not-trim"`), so it is a genuine closed set rather than a free-form string. </p> @@ -310,16 +312,16 @@ compile-time-checked closed set. **Remarks:** <p> The Python reference validates this argument explicitly -(<code>record\_call(... direction ...)</code> raises <code>ValueError</code> unless the -value is <code>"speak"</code>, <code>"listen"</code>, or <code>"both"</code>), so it is a +(`record_call(... direction ...)` raises `ValueError` unless the +value is `"speak"`, `"listen"`, or `"both"`), so it is a genuine closed set rather than a free-form string. It is the user-facing <em>recording</em> direction — which side(s) of the call to capture — and is -distinct from the read-only inbound/outbound <code>direction</code> field carried -on a RELAY <code>Call</code> event (that one stays a plain string, as it is server +distinct from the read-only inbound/outbound `direction` field carried +on a RELAY `Call` event (that one stays a plain string, as it is server state, not a caller choice). FunctionResult.RecordCall(RecordFormat, RecordDirection, string, bool) accepts this enum OR a string: the enum gives editor autocompletion and turns a typo into a compile error, while the string overload preserves parity with -the Python reference (which takes a bare <code>str</code>). +the Python reference (which takes a bare `str`). </p> <p> @@ -368,12 +370,12 @@ typed, compile-time-checked closed set. **Remarks:** <p> The Python reference validates this argument explicitly -(<code>record\_call(... format ...)</code> raises <code>ValueError</code> unless the value -is <code>"wav"</code>, <code>"mp3"</code>, or <code>"mp4"</code>), so it is a genuine closed set rather than a +(`record_call(... format ...)` raises `ValueError` unless the value +is `"wav"`, `"mp3"`, or `"mp4"`), so it is a genuine closed set rather than a free-form string. FunctionResult.RecordCall(RecordFormat, RecordDirection, string, bool) accepts this enum OR a string: the enum gives editor autocompletion and turns a typo into a compile error, while the string overload preserves parity with -the Python reference (which takes a bare <code>str</code>). +the Python reference (which takes a bare `str`). </p> <p> @@ -422,21 +424,22 @@ compile-time-checked closed set. **Remarks:** <p> The Python reference validates this argument explicitly -(<code>tap(... direction ...)</code> raises <code>ValueError</code> unless the value is <code>"speak"</code>, <code>"hear"</code>, or <code>"both"</code>), so it is a genuine closed +(`tap(... direction ...)` raises `ValueError` unless the value is +`"speak"`, `"hear"`, or `"both"`), so it is a genuine closed set rather than a free-form string. </p> <p> This is the <em>tap</em> direction and is deliberately <strong>distinct</strong> -from <xref href="SignalWire.SWAIG.RecordDirection" data-throw-if-not-resolved="false"></xref>: <code>tap</code> uses <code>"hear"</code> where -<code>record_call</code> uses <code>"listen"</code>. The Python reference validates the two +from <xref href="SignalWire.SWAIG.RecordDirection" data-throw-if-not-resolved="false"></xref>: `tap` uses `"hear"` where +`record_call` uses `"listen"`. The Python reference validates the two against separate lists, so they are modelled as two separate enums rather than a single shared one — sharing one would silently accept the wrong vocabulary on one of the two verbs. FunctionResult.Tap(string, TapDirection, Codec, string, int, string?) accepts this enum OR a string: the enum gives editor autocompletion and turns a typo into a compile error, while the string overload preserves parity with -the Python reference (which takes a bare <code>str</code>). +the Python reference (which takes a bare `str`). </p> <p> Each member maps to its canonical wire value via diff --git a/fern/products/sdk-reference/dotnet/signal-wire.swaig/join-conference-options/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.swaig/join-conference-options/index.mdx index 60f5960523..6c440e97bc 100644 --- a/fern/products/sdk-reference/dotnet/signal-wire.swaig/join-conference-options/index.mdx +++ b/fern/products/sdk-reference/dotnet/signal-wire.swaig/join-conference-options/index.mdx @@ -18,8 +18,9 @@ lustri: Typed options bag for the convenience overload <xref href="SignalWire.SWAIG.FunctionResult.JoinConference(System.String%2cSignalWire.SWAIG.JoinConferenceOptions)" data-throw-if-not-resolved="false"></xref>. **Remarks:** <p> -Mirrors the 18 optional parameters of the Python reference <code>join\_conference(name, muted=False, beep="true", ...)</code> one-for-one, with -the four closed-set arguments (<code>beep</code>, <code>record</code>, <code>trim</code>, the two +Mirrors the 18 optional parameters of the Python reference +`join_conference(name, muted=False, beep="true", ...)` one-for-one, with +the four closed-set arguments (`beep`, `record`, `trim`, the two callback methods) surfaced as the typed enums <xref href="SignalWire.SWAIG.ConferenceBeep" data-throw-if-not-resolved="false"></xref>, <xref href="SignalWire.SWAIG.ConferenceRecord" data-throw-if-not-resolved="false"></xref>, <xref href="SignalWire.SWAIG.ConferenceTrim" data-throw-if-not-resolved="false"></xref>, and <xref href="SignalWire.SWAIG.CallbackMethod" data-throw-if-not-resolved="false"></xref> for editor autocompletion and compile-time checking. @@ -30,7 +31,7 @@ of 18 positional arguments). The flat, all-string <xref href="SignalWire.SWAIG.FunctionResult.JoinConference(System.String%2cSystem.Boolean%2cSystem.String%2cSystem.Boolean%2cSystem.Boolean%2cSystem.String%2cSystem.Int32%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.Object)" data-throw-if-not-resolved="false"></xref> overload remains the parity-bearing signature against the Python reference; the convenience overload delegates straight to it via each enum's -<code>ToWireName()</code>, so the emitted <code>join_conference</code> action is identical. +`ToWireName()`, so the emitted `join_conference` action is identical. </p> <p> Every default matches the Python reference exactly, so an unset options object @@ -53,71 +54,71 @@ public sealed record JoinConferenceOptions : IEquatable ## Properties - Beep behaviour. Python default: <code>"true"</code>. + Beep behaviour. Python default: `"true"`. - SWML Call ID / CXML CallSid for coaching. Python default: <code>None</code>. + SWML Call ID / CXML CallSid for coaching. Python default: `None`. - Whether the conference ends when this participant exits. Python default: <code>False</code>. + Whether the conference ends when this participant exits. Python default: `False`. - Maximum participants (1..=250). Python default: <code>250</code>. + Maximum participants (1..=250). Python default: `250`. - Whether to join muted. Python default: <code>False</code>. + Whether to join muted. Python default: `False`. - Recording mode. Python default: <code>"do-not-record"</code>. + Recording mode. Python default: `"do-not-record"`. - URL for recording status callbacks. Python default: <code>None</code>. + URL for recording status callbacks. Python default: `None`. - Recording events to report. Python default: <code>"completed"</code>. + Recording events to report. Python default: `"completed"`. - HTTP method for recording status callbacks. Python default: <code>"POST"</code>. + HTTP method for recording status callbacks. Python default: `"POST"`. - Conference region. Python default: <code>None</code>. + Conference region. Python default: `None`. - Switch payload (object \{\} or array \[]). Python default: <code>None</code>. + Switch payload (object \{\} or array \[]). Python default: `None`. - Whether the conference starts when this participant enters. Python default: <code>True</code>. + Whether the conference starts when this participant enters. Python default: `True`. - URL for status callbacks. Python default: <code>None</code>. + URL for status callbacks. Python default: `None`. - Events to report. Python default: <code>None</code>. + Events to report. Python default: `None`. - HTTP method for status callbacks. Python default: <code>"POST"</code>. + HTTP method for status callbacks. Python default: `"POST"`. - Silence-trim mode. Python default: <code>"trim-silence"</code>. + Silence-trim mode. Python default: `"trim-silence"`. - SWML URL for hold music. Python default: <code>None</code>. + SWML URL for hold music. Python default: `None`. ## Source diff --git a/fern/products/sdk-reference/dotnet/signal-wire.swaig/parameter-schema/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.swaig/parameter-schema/index.mdx index b2915d9e8b..0a4695227d 100644 --- a/fern/products/sdk-reference/dotnet/signal-wire.swaig/parameter-schema/index.mdx +++ b/fern/products/sdk-reference/dotnet/signal-wire.swaig/parameter-schema/index.mdx @@ -15,13 +15,14 @@ lustri: --- # `ParameterSchema` -Fluent, type-safe builder for a SWAIG tool's <code>parameters</code> — the -JSON-Schema <code>properties</code> map passed as the third argument to <xref href="SignalWire.SWML.Service.DefineTool(System.String%2cSystem.String%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%2cSystem.Func%7bSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%2cSignalWire.SWAIG.FunctionResult%7d%2cSystem.Boolean)" data-throw-if-not-resolved="false"></xref> / +Fluent, type-safe builder for a SWAIG tool's `parameters` — the +JSON-Schema `properties` map passed as the third argument to <xref href="SignalWire.SWML.Service.DefineTool(System.String%2cSystem.String%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%2cSystem.Func%7bSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%2cSignalWire.SWAIG.FunctionResult%7d%2cSystem.Boolean)" data-throw-if-not-resolved="false"></xref> / SignalWire.Agent.AgentBase.DefineTool. **Remarks:** <p> Defining a SWAIG tool's parameters in the Python reference (and, until -now, in this port) means hand-writing an untyped <code>Dictionary\</code> of nested dictionaries — a raw +now, in this port) means hand-writing an untyped +`Dictionary<string, object>` of nested dictionaries — a raw JSON-Schema blob: </p> @@ -36,7 +37,7 @@ JSON-Schema blob: };</code></pre> <p> <xref href="SignalWire.SWAIG.ParameterSchema" data-throw-if-not-resolved="false"></xref> produces the <strong>byte-identical</strong> -<code>properties</code> map type-safely: +`properties` map type-safely: </p> <pre><code class="lang-csharp">ParameterSchema.Create() .String("service", "The service") @@ -48,26 +49,26 @@ JSON-Schema blob: This is a <strong>typed convenience over the same wire output, not a new format</strong>. <xref href="SignalWire.SWAIG.ParameterSchema.Build" data-throw-if-not-resolved="false"></xref> returns exactly the dictionary you would have hand-written, so it drops straight into the existing untyped -<code>DefineTool</code> path — which keeps working unchanged. There is no Python +`DefineTool` path — which keeps working unchanged. There is no Python reference counterpart (Python builds the dict by hand); this is a .NET-only additive ergonomics layer. </p> <p> <strong>Required.</strong> <xref href="SignalWire.SWAIG.ParameterSchema.Required(System.String%5b%5d)" data-throw-if-not-resolved="false"></xref> marks properties -with the inline <code>["required"] = true</code> flag this port's hand-written -tool params already use (e.g. <code>MathSkill</code>, <code>SpiderSkill</code>, -<code>InfoGathererSkill</code>). For callers that prefer the top-level JSON-Schema -<code>required: [...]</code> array instead (the shape <code>DataMap</code> and the Python -<code>SWAIGFunction</code> emit), <xref href="SignalWire.SWAIG.ParameterSchema.RequiredNames" data-throw-if-not-resolved="false"></xref> exposes the same -names as an ordered <code>List<string></code>. +with the inline `["required"] = true` flag this port's hand-written +tool params already use (e.g. `MathSkill`, `SpiderSkill`, +`InfoGathererSkill`). For callers that prefer the top-level JSON-Schema +`required: [...]` array instead (the shape `DataMap` and the Python +`SWAIGFunction` emit), <xref href="SignalWire.SWAIG.ParameterSchema.RequiredNames" data-throw-if-not-resolved="false"></xref> exposes the same +names as an ordered `List<string>`. </p> <p> <strong>Closed sets.</strong> Enum(string, Type, string?) integrates the Tier-1 typed enums (<xref href="SignalWire.SWAIG.RecordFormat" data-throw-if-not-resolved="false"></xref>, <xref href="SignalWire.SWAIG.RecordDirection" data-throw-if-not-resolved="false"></xref>, <xref href="SignalWire.SWAIG.TapDirection" data-throw-if-not-resolved="false"></xref>, <xref href="SignalWire.SWAIG.Codec" data-throw-if-not-resolved="false"></xref>, …) by reflecting over the enum's members and emitting -each member's canonical wire string (its <code>ToWireName</code>) into the schema -<code>enum: [...]</code> list — so the closed set is defined once, in the enum, +each member's canonical wire string (its `ToWireName`) into the schema +`enum: [...]` list — so the closed set is defined once, in the enum, rather than re-typed as a string list at every call site. An explicit Enum(string, IEnumerable<string>, string?) overload remains for genuinely-open or ad-hoc value sets. @@ -84,16 +85,16 @@ public sealed class ParameterSchema ## Properties - The required-property names in declaration order — the source for a top-level JSON-Schema <code>required: \[...]</code> array (the shape <code>DataMap</code> and Python's <code>SWAIGFunction</code> emit). The inline <code>\["required"] = true</code> flags are already set by <xref href="SignalWire.SWAIG.ParameterSchema.Required(System.String%5b%5d)" data-throw-if-not-resolved="false"></xref>; this is for callers that additionally want the array form. + The required-property names in declaration order — the source for a top-level JSON-Schema `required: [...]` array (the shape `DataMap` and Python's `SWAIGFunction` emit). The inline `["required"] = true` flags are already set by <xref href="SignalWire.SWAIG.ParameterSchema.Required(System.String%5b%5d)" data-throw-if-not-resolved="false"></xref>; this is for callers that additionally want the array form. ## Methods ### Array -Add an <code>array</code> property whose elements are a scalar kind -(<code>"string"</code>, <code>"number"</code>, <code>"integer"</code>, <code>"boolean"</code>). -Emits <code>\{"type":"array","items":\{"type":itemType\}\}</code>. +Add an `array` property whose elements are a scalar kind +(`"string"`, `"number"`, `"integer"`, `"boolean"`). +Emits `{"type":"array","items":{"type":itemType}}`. #### Signature @@ -151,7 +152,7 @@ Line 164. ### Boolean(string, string?, bool, object?) -Add a <code>boolean</code> property. +Add a `boolean` property. #### Signature @@ -183,8 +184,9 @@ Line 117. ### Build() -Build the JSON-Schema <code>properties</code> map — the exact <code>Dictionary\</code> to pass as the <code>parameters</code> -argument to <code>DefineTool</code>. A fresh dictionary is returned on each +Build the JSON-Schema `properties` map — the exact +`Dictionary<string, object>` to pass as the `parameters` +argument to `DefineTool`. A fresh dictionary is returned on each call (mutating it does not affect the builder), with properties in declaration order. @@ -232,8 +234,9 @@ Line 80. ### Enum -Add a <code>string</code> property constrained to a closed set, sourced from a -Tier-1 typed enum. Each enum member is rendered via its <code>ToWireName</code> extension into the schema <code>enum: \[...]</code> list, so +Add a `string` property constrained to a closed set, sourced from a +Tier-1 typed enum. Each enum member is rendered via its +`ToWireName` extension into the schema `enum: [...]` list, so the wire vocabulary is defined once in the enum. #### Signature @@ -259,7 +262,7 @@ the wire vocabulary is defined once in the enum. - A SignalWire closed-set enum (e.g. <xref href="SignalWire.SWAIG.RecordFormat" data-throw-if-not-resolved="false"></xref>) whose members carry a <code>ToWireName</code> extension in a sibling <code>\Extensions</code> class. + A SignalWire closed-set enum (e.g. <xref href="SignalWire.SWAIG.RecordFormat" data-throw-if-not-resolved="false"></xref>) whose members carry a `ToWireName` extension in a sibling `<EnumName>Extensions` class. @@ -267,11 +270,11 @@ the wire vocabulary is defined once in the enum. - Mark required inline (<code>\["required"] = true</code>). + Mark required inline (`["required"] = true`). - Optional JSON-Schema <code>default</code>. + Optional JSON-Schema `default`. #### Parameters (Overload 2) @@ -304,7 +307,7 @@ Line 137. ### Integer(string, string?, bool, object?, string?) -Add an <code>integer</code> property. +Add an `integer` property. #### Signature @@ -338,7 +341,7 @@ Line 108. ### Number(string, string?, bool, object?, string?) -Add a <code>number</code> (floating-point) property. +Add a `number` (floating-point) property. #### Signature @@ -372,7 +375,8 @@ Line 99. ### Object(string, ParameterSchema, string?, bool) -Add a nested <code>object</code> property described by a child <xref href="SignalWire.SWAIG.ParameterSchema" data-throw-if-not-resolved="false"></xref>. Emits <code>\{"type":"object","properties":\{…\}\}</code>. +Add a nested `object` property described by a child <xref href="SignalWire.SWAIG.ParameterSchema" data-throw-if-not-resolved="false"></xref>. Emits +`{"type":"object","properties":{…}}`. #### Signature @@ -405,7 +409,7 @@ Line 204. ### Required(params string\[]) Mark one or more already-declared properties required by setting the -inline <code>\["required"] = true</code> flag on each (this port's hand-written +inline `["required"] = true` flag on each (this port's hand-written convention). Also records the names for <xref href="SignalWire.SWAIG.ParameterSchema.RequiredNames" data-throw-if-not-resolved="false"></xref>. #### Signature @@ -436,7 +440,7 @@ Line 218. ### String(string, string?, bool, object?, string?, IEnumerable\?) -Add a <code>string</code> property. +Add a `string` property. #### Signature @@ -455,15 +459,15 @@ public ParameterSchema String(string name, string? description = null, bool requ - Mark required inline (<code>\["required"] = true</code>). + Mark required inline (`["required"] = true`). - Optional JSON-Schema <code>default</code>. + Optional JSON-Schema `default`. - Optional JSON-Schema <code>format</code> hint (e.g. <code>"date"</code>). + Optional JSON-Schema `format` hint (e.g. `"date"`). diff --git a/fern/products/sdk-reference/dotnet/signal-wire.swaig/record-direction-extensions/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.swaig/record-direction-extensions/index.mdx index eaeb164fa2..e7712ec2eb 100644 --- a/fern/products/sdk-reference/dotnet/signal-wire.swaig/record-direction-extensions/index.mdx +++ b/fern/products/sdk-reference/dotnet/signal-wire.swaig/record-direction-extensions/index.mdx @@ -16,7 +16,7 @@ lustri: # `RecordDirectionExtensions` Maps <xref href="SignalWire.SWAIG.RecordDirection" data-throw-if-not-resolved="false"></xref> members to the canonical wire values that -the SWML <code>record\_call</code> action expects. +the SWML `record_call` action expects. **Modifiers:** `static` @@ -30,7 +30,8 @@ public static class RecordDirectionExtensions ### ToWireName(RecordDirection) -The canonical recording-direction string (the value placed on the <code>record\_call.direction</code> key in the emitted SWML). +The canonical recording-direction string (the value placed on the +`record_call.direction` key in the emitted SWML). **Modifiers:** `static` diff --git a/fern/products/sdk-reference/dotnet/signal-wire.swaig/record-format-extensions/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.swaig/record-format-extensions/index.mdx index 4b4cdd422c..46a96803f9 100644 --- a/fern/products/sdk-reference/dotnet/signal-wire.swaig/record-format-extensions/index.mdx +++ b/fern/products/sdk-reference/dotnet/signal-wire.swaig/record-format-extensions/index.mdx @@ -16,7 +16,7 @@ lustri: # `RecordFormatExtensions` Maps <xref href="SignalWire.SWAIG.RecordFormat" data-throw-if-not-resolved="false"></xref> members to the canonical wire values that the -SWML <code>record\_call</code> action expects. +SWML `record_call` action expects. **Modifiers:** `static` @@ -30,7 +30,8 @@ public static class RecordFormatExtensions ### ToWireName(RecordFormat) -The canonical recording-format string (the value placed on the <code>record\_call.format</code> key in the emitted SWML). +The canonical recording-format string (the value placed on the +`record_call.format` key in the emitted SWML). **Modifiers:** `static` diff --git a/fern/products/sdk-reference/dotnet/signal-wire.swaig/tap-direction-extensions/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.swaig/tap-direction-extensions/index.mdx index 38ca07d1c7..cf9c34e77d 100644 --- a/fern/products/sdk-reference/dotnet/signal-wire.swaig/tap-direction-extensions/index.mdx +++ b/fern/products/sdk-reference/dotnet/signal-wire.swaig/tap-direction-extensions/index.mdx @@ -16,7 +16,7 @@ lustri: # `TapDirectionExtensions` Maps <xref href="SignalWire.SWAIG.TapDirection" data-throw-if-not-resolved="false"></xref> members to the canonical wire values that the -SWML <code>tap</code> action expects. +SWML `tap` action expects. **Modifiers:** `static` @@ -30,7 +30,8 @@ public static class TapDirectionExtensions ### ToWireName(TapDirection) -The canonical tap-direction string (the value placed on the <code>tap.direction</code> key in the emitted SWML). +The canonical tap-direction string (the value placed on the +`tap.direction` key in the emitted SWML). **Modifiers:** `static` diff --git a/fern/products/sdk-reference/dotnet/signal-wire.swml/service/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.swml/service/index.mdx index 54db5f969a..b22b2da812 100644 --- a/fern/products/sdk-reference/dotnet/signal-wire.swml/service/index.mdx +++ b/fern/products/sdk-reference/dotnet/signal-wire.swml/service/index.mdx @@ -697,11 +697,11 @@ the response status / headers / body are written back to the client. Mirrors Python's SWMLService.run() — examples and the porting-sdk audit harness call this directly. -Transport selection mirrors Python's <code>SecurityConfig</code> / -uvicorn <code>ssl\_certfile</code>/<code>ssl\_keyfile</code> path: +Transport selection mirrors Python's `SecurityConfig` / +uvicorn `ssl_certfile`/`ssl_keyfile` path: -<ul><li>Plain HTTP uses System.Net.HttpListener (BCL, no extra deps).</li><li>HTTPS (when <code>SWML_SSL_ENABLED</code> is truthy and - <code>SWML_SSL_CERT_PATH</code>/<code>SWML_SSL_KEY_PATH</code> point at a valid +<ul><li>Plain HTTP uses System.Net.HttpListener (BCL, no extra deps).</li><li>HTTPS (when `SWML_SSL_ENABLED` is truthy and + `SWML_SSL_CERT_PATH`/`SWML_SSL_KEY_PATH` point at a valid PEM cert+key) uses Kestrel, because HttpListener cannot terminate TLS on Linux (cert binding requires http.sys / netsh, Windows-only).</li></ul> diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/service/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/service/index.mdx index ff77044009..44def7441e 100644 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/service/index.mdx +++ b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/service/index.mdx @@ -573,7 +573,7 @@ Base URL resolution order: 1. SWML\_PROXY\_URL\_BASE (explicit proxy override — always wins) 2. Platform-specific base derived from GetExecutionMode() when running inside a serverless runtime (currently AWS Lambda) -3. Local http://host:port base (default server mode) +3. Local `http://host:port` base (default server mode) In every branch the agent's Route is appended to the base. Callers that need to serve SWAIG / post\_prompt endpoints then append further path segments onto the result. This invariant is load-bearing: a Lambda-hosted agent at route "/my-agent" must emit SWAIG URLs like "https://xxx.lambda-url.us-east-1.on.aws/my-agent/swaig" — NOT "https://xxx.lambda-url.us-east-1.on.aws/swaig". See buildWebhookURL in pkg/agent/agent.go for the defensive HasSuffix re-check that enforces the same property downstream. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/utils/utils/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/utils/utils/index.mdx index 7713de94e8..753dd6b84f 100644 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/utils/utils/index.mdx +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/utils/utils/index.mdx @@ -22,6 +22,6 @@ package com.signalwire.sdk.utils - SSRF-prevention guard for user-supplied URLs. <p> Mirrors Python's <code>signalwire.utils.url\_validator.validate\_url</code>: rejects non-http(s) schemes, missing hostnames, and any URL whose hostname resolves to a private / loopback / link-local / cloud-metadata IP. + SSRF-prevention guard for user-supplied URLs. <p> Mirrors Python's `signalwire.utils.url_validator.validate_url`: rejects non-http(s) schemes, missing hostnames, and any URL whose hostname resolves to a private / loopback / link-local / cloud-metadata IP. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/utils/utils/url-validator/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/utils/utils/url-validator/index.mdx index 7f41b12319..65c3f377c3 100644 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/utils/utils/url-validator/index.mdx +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/utils/utils/url-validator/index.mdx @@ -18,7 +18,7 @@ lustri: SSRF-prevention guard for user-supplied URLs. <p> -Mirrors Python's <code>signalwire.utils.url_validator.validate_url</code>: +Mirrors Python's `signalwire.utils.url_validator.validate_url`: rejects non-http(s) schemes, missing hostnames, and any URL whose hostname resolves to a private / loopback / link-local / cloud-metadata IP. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/http-client/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/http-client/index.mdx index a238bbf8c4..d71edf9eaa 100644 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/http-client/index.mdx +++ b/fern/products/sdk-reference/ruby/signal-wire/rest/http-client/index.mdx @@ -94,7 +94,7 @@ Line 56. +base\_url+ overrides the derived +https://\{space\}+ value when set, which is how the audit fixture and tests point the client at a loopback server. Pass either +space+ ("acme") / a host -("acme.signalwire.com") OR an explicit +base\_url+ ("http://127.0.0.1:NNNN"). +("acme.signalwire.com") OR an explicit +base\_url+ ("`http://127.0.0.1:NNNN`"). +ca\_file+ (optional) names a PEM CA bundle to trust for HTTPS, for private-CA / pinned-CA deployments. When set, requests verify the peer From 6be3b8ed0816b34ab2c5ffaab5061fb2ca5f4c52 Mon Sep 17 00:00:00 2001 From: Devon-White Date: Fri, 12 Jun 2026 08:50:51 -0400 Subject: [PATCH 3/8] SDK Reference: reshape every SDK into Agents/Relay/REST/Core namespaces MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Apply the namespace_shape editorial overlay so all 10 SDKs share the four conceptual areas of the manual server-SDK reference: - agents — the AI/agent surface (the bulk: agent-base, swml, swaig, skills, prefabs, pom, livewire, contexts, datamap, server, …) - relay — the RELAY client subtree (call, message, actions, events) - rest — the REST client + resource namespaces - core — foundational surface (logging, webhook-signature security, utils) Replay-safe (only modulePath/parentId change). SDKs that keep loose top-level members (root factory functions / version constants) retain a small root-namespace page for them. fern check: 0 broken links. --- fern/products/sdk-reference/cpp/_meta.json | 2 +- .../cpp/agents/agent/agent-base/index.mdx | 2791 +++++++++++ .../sdk-reference/cpp/agents/agent/index.mdx | 159 + .../agents/agent/language-config/index.mdx | 68 + .../cpp/agents/agent/pronunciation/index.mdx | 60 + .../agents/agent/swaig-query-param/index.mdx | 36 + .../agents/contexts/context-builder/index.mdx | 229 + .../cpp/agents/contexts/context/index.mdx | 836 ++++ .../cpp/agents/contexts/gather-info/index.mdx | 185 + .../agents/contexts/gather-question/index.mdx | 109 + .../cpp/agents/contexts/index.mdx | 89 + .../cpp/agents/contexts/step/index.mdx | 657 +++ .../cpp/agents/datamap/index.mdx | 475 ++ .../sdk-reference/cpp/agents/index.mdx | 40 + .../sdk-reference/cpp/agents/pom/index.mdx | 131 + .../agents/pom/prompt-object-model/index.mdx | 391 ++ .../cpp/agents/pom/section/index.mdx | 301 ++ .../agents/prefabs/concierge-agent/index.mdx | 139 + .../agents/prefabs/faq-bot-agent/index.mdx | 139 + .../cpp/agents/prefabs/index.mdx | 67 + .../prefabs/info-gatherer-agent/index.mdx | 139 + .../prefabs/receptionist-agent/index.mdx | 139 + .../cpp/agents/prefabs/survey-agent/index.mdx | 139 + .../cpp/agents/server/agent-server/index.mdx | 270 ++ .../sdk-reference/cpp/agents/server/index.mdx | 107 + .../agents/server/tls-server-config/index.mdx | 62 + .../api-ninjas-trivia-skill-r/index.mdx | 174 + .../skills/api-ninjas-trivia-skill/index.mdx | 174 + .../skills/claude-skills-skill-r/index.mdx | 150 + .../skills/claude-skills-skill/index.mdx | 174 + .../skills/custom-skills-skill-r/index.mdx | 150 + .../skills/custom-skills-skill/index.mdx | 150 + .../datasphere-serverless-skill-r/index.mdx | 174 + .../datasphere-serverless-skill/index.mdx | 222 + .../skills/datasphere-skill-r/index.mdx | 174 + .../agents/skills/datasphere-skill/index.mdx | 201 + .../agents/skills/date-time-skill/index.mdx | 174 + .../skills/google-maps-skill-r/index.mdx | 152 + .../agents/skills/google-maps-skill/index.mdx | 176 + .../sdk-reference/cpp/agents/skills/index.mdx | 413 ++ .../skills/info-gatherer-skill-r/index.mdx | 174 + .../skills/info-gatherer-skill/index.mdx | 222 + .../cpp/agents/skills/joke-skill-r/index.mdx | 200 + .../cpp/agents/skills/joke-skill/index.mdx | 200 + .../cpp/agents/skills/math-skill-r/index.mdx | 152 + .../cpp/agents/skills/math-skill/index.mdx | 174 + .../skills/mcp-gateway-skill-r/index.mdx | 152 + .../agents/skills/mcp-gateway-skill/index.mdx | 200 + .../native-vector-search-skill-r/index.mdx | 174 + .../native-vector-search-skill/index.mdx | 174 + .../play-background-file-skill-r/index.mdx | 174 + .../play-background-file-skill/index.mdx | 174 + .../cpp/agents/skills/skill-base/index.mdx | 518 +++ .../skills/skill-http-response/index.mdx | 38 + .../cpp/agents/skills/skill-manager/index.mdx | 172 + .../skills/skill-prompt-section/index.mdx | 38 + .../agents/skills/skill-registry/index.mdx | 207 + .../agents/skills/spider-skill-r/index.mdx | 174 + .../cpp/agents/skills/spider-skill/index.mdx | 177 + .../skills/swml-transfer-skill-r/index.mdx | 198 + .../skills/swml-transfer-skill/index.mdx | 222 + .../skills/weather-api-skill-r/index.mdx | 152 + .../agents/skills/weather-api-skill/index.mdx | 152 + .../web-search-core/candidate/index.mdx | 42 + .../agents/skills/web-search-core/index.mdx | 318 ++ .../web-search-core/latency-params/index.mdx | 40 + .../skills/web-search-skill-r/index.mdx | 244 + .../agents/skills/web-search-skill/index.mdx | 252 + .../skills/wikipedia-search-skill-r/index.mdx | 152 + .../skills/wikipedia-search-skill/index.mdx | 155 + .../cpp/agents/swaig/enum-or-string/index.mdx | 110 + .../agents/swaig/function-result/index.mdx | 1632 +++++++ .../sdk-reference/cpp/agents/swaig/index.mdx | 721 +++ .../swaig/join-conference-options/index.mdx | 67 + .../agents/swaig/parameter-schema/index.mdx | 492 ++ .../agents/swaig/tool-definition/index.mdx | 70 + .../cpp/agents/swml/document/index.mdx | 274 ++ .../sdk-reference/cpp/agents/swml/index.mdx | 97 + .../cpp/agents/swml/schema/index.mdx | 220 + .../cpp/agents/swml/section/index.mdx | 126 + .../cpp/agents/swml/service/index.mdx | 2134 +++++++++ .../cpp/agents/swml/verb-definition/index.mdx | 40 + .../cpp/agents/swml/verb/index.mdx | 90 + .../cpp/c-tool-context/index.mdx | 32 - .../sdk-reference/cpp/core/core/index.mdx | 33 + .../cpp/core/core/logging-config/index.mdx | 58 + .../products/sdk-reference/cpp/core/index.mdx | 24 + .../sdk-reference/cpp/core/logging/index.mdx | 109 + .../cpp/core/logging/logger/index.mdx | 138 + .../sdk-reference/cpp/core/security/index.mdx | 283 ++ .../core/security/session-manager/index.mdx | 207 + .../webhook-validator-options/index.mdx | 40 + .../sdk-reference/cpp/core/utils/index.mdx | 89 + .../cpp/core/utils/schema-utils/index.mdx | 332 ++ .../utils/schema-validation-error/index.mdx | 105 + .../cpp/core/utils/url-validator/index.mdx | 117 + .../cpp/core/utils/verb-info/index.mdx | 38 + .../sdk-reference/cpp/httplib/index.mdx | 25 - fern/products/sdk-reference/cpp/index.mdx | 7 +- fern/products/sdk-reference/cpp/ix/index.mdx | 25 - .../sdk-reference/cpp/relay/action/index.mdx | 640 +++ .../cpp/relay/call-event/index.mdx | 72 + .../sdk-reference/cpp/relay/call/index.mdx | 1761 +++++++ .../cpp/relay/component-event/index.mdx | 68 + .../sdk-reference/cpp/relay/device/index.mdx | 94 + .../cpp/relay/dial-event/index.mdx | 90 + .../sdk-reference/cpp/relay/index.mdx | 690 +++ .../cpp/relay/message-event/index.mdx | 72 + .../sdk-reference/cpp/relay/message/index.mdx | 404 ++ .../cpp/relay/relay-client/index.mdx | 581 +++ .../cpp/relay/relay-config/index.mdx | 46 + .../cpp/relay/relay-event/index.mdx | 98 + .../cpp/relay/web-socket-client/index.mdx | 352 ++ .../cpp/rest/crud-resource/index.mdx | 184 + .../cpp/rest/http-client/index.mdx | 299 ++ .../products/sdk-reference/cpp/rest/index.mdx | 262 ++ .../cpp/rest/paginated-iterator/index.mdx | 261 ++ .../rest-client/addresses-namespace/index.mdx | 54 + .../rest-client/calling-namespace/index.mdx | 1413 ++++++ .../rest/rest-client/chat-namespace/index.mdx | 106 + .../rest-client/compat-accounts/index.mdx | 162 + .../rest-client/compat-applications/index.mdx | 84 + .../rest/rest-client/compat-calls/index.mdx | 208 + .../rest-client/compat-conferences/index.mdx | 454 ++ .../rest/rest-client/compat-faxes/index.mdx | 174 + .../rest-client/compat-laml-bins/index.mdx | 84 + .../rest-client/compat-messages/index.mdx | 177 + .../rest-client/compat-namespace/index.mdx | 186 + .../compat-phone-numbers/index.mdx | 284 ++ .../rest/rest-client/compat-queues/index.mdx | 180 + .../rest-client/compat-recordings/index.mdx | 110 + .../rest/rest-client/compat-tokens/index.mdx | 112 + .../compat-transcriptions/index.mdx | 110 + .../datasphere-documents/index.mdx | 173 + .../datasphere-namespace/index.mdx | 82 + .../rest-client/fabric-addresses/index.mdx | 108 + .../rest-client/fabric-call-flows/index.mdx | 166 + .../fabric-conference-rooms/index.mdx | 107 + .../fabric-cxml-applications/index.mdx | 80 + .../fabric-generic-resources/index.mdx | 201 + .../rest-client/fabric-namespace/index.mdx | 96 + .../rest-client/fabric-resource-put/index.mdx | 84 + .../rest-client/fabric-resource/index.mdx | 87 + .../rest-client/fabric-subscribers/index.mdx | 212 + .../rest/rest-client/fabric-tokens/index.mdx | 186 + .../imported-numbers-namespace/index.mdx | 80 + .../cpp/rest/rest-client/index.mdx | 628 +++ .../cpp/rest/rest-client/index__2.mdx | 142 + .../rest-client/logs-conferences/index.mdx | 82 + .../cpp/rest/rest-client/logs-fax/index.mdx | 108 + .../rest/rest-client/logs-messages/index.mdx | 108 + .../rest/rest-client/logs-namespace/index.mdx | 60 + .../cpp/rest/rest-client/logs-voice/index.mdx | 139 + .../rest-client/lookup-namespace/index.mdx | 80 + .../rest/rest-client/mfa-namespace/index.mdx | 186 + .../number-groups-namespace/index.mdx | 193 + .../call-flow-options/index.mdx | 36 + .../cxml-webhook-options/index.mdx | 36 + .../phone-numbers-namespace/index.mdx | 569 +++ .../phone-numbers-namespace/index__2.mdx | 30 + .../relay-topic-options/index.mdx | 34 + .../rest-client/project-namespace/index.mdx | 104 + .../rest/rest-client/project-tokens/index.mdx | 110 + .../rest-client/pub-sub-namespace/index.mdx | 80 + .../rest-client/queues-namespace/index.mdx | 170 + .../recordings-namespace/index.mdx | 54 + .../rest-client/registry-brands/index.mdx | 193 + .../rest-client/registry-campaigns/index.mdx | 200 + .../rest-client/registry-namespace/index.mdx | 60 + .../rest-client/registry-numbers/index.mdx | 56 + .../rest-client/registry-orders/index.mdx | 82 + .../short-codes-namespace/index.mdx | 82 + .../sip-profile-namespace/index.mdx | 102 + .../verified-callers-namespace/index.mdx | 54 + .../video-conference-tokens/index.mdx | 108 + .../rest-client/video-conferences/index.mdx | 172 + .../rest-client/video-namespace/index.mdx | 68 + .../video-room-recordings/index.mdx | 139 + .../rest-client/video-room-sessions/index.mdx | 201 + .../rest-client/video-room-tokens/index.mdx | 82 + .../rest/rest-client/video-rooms/index.mdx | 141 + .../rest/rest-client/video-streams/index.mdx | 110 + .../cpp/rest/signal-wire-rest-error/index.mdx | 108 + .../cpp/signalwire/agent/agent-base/index.mdx | 2791 ----------- .../cpp/signalwire/agent/index.mdx | 159 - .../agent/language-config/index.mdx | 68 - .../signalwire/agent/pronunciation/index.mdx | 60 - .../agent/swaig-query-param/index.mdx | 36 - .../contexts/context-builder/index.mdx | 229 - .../cpp/signalwire/contexts/context/index.mdx | 836 ---- .../signalwire/contexts/gather-info/index.mdx | 185 - .../contexts/gather-question/index.mdx | 109 - .../cpp/signalwire/contexts/index.mdx | 89 - .../cpp/signalwire/contexts/step/index.mdx | 657 --- .../cpp/signalwire/core/index.mdx | 33 - .../signalwire/core/logging-config/index.mdx | 58 - .../cpp/signalwire/datamap/index.mdx | 475 -- .../sdk-reference/cpp/signalwire/index.mdx | 36 - .../cpp/signalwire/logging/index.mdx | 109 - .../cpp/signalwire/logging/logger/index.mdx | 138 - .../cpp/signalwire/pom/index.mdx | 131 - .../pom/prompt-object-model/index.mdx | 391 -- .../cpp/signalwire/pom/section/index.mdx | 301 -- .../prefabs/concierge-agent/index.mdx | 139 - .../prefabs/faq-bot-agent/index.mdx | 139 - .../cpp/signalwire/prefabs/index.mdx | 67 - .../prefabs/info-gatherer-agent/index.mdx | 139 - .../prefabs/receptionist-agent/index.mdx | 139 - .../signalwire/prefabs/survey-agent/index.mdx | 139 - .../cpp/signalwire/relay/action/index.mdx | 640 --- .../cpp/signalwire/relay/call-event/index.mdx | 72 - .../cpp/signalwire/relay/call/index.mdx | 1761 ------- .../relay/component-event/index.mdx | 68 - .../cpp/signalwire/relay/device/index.mdx | 94 - .../cpp/signalwire/relay/dial-event/index.mdx | 90 - .../cpp/signalwire/relay/index.mdx | 692 --- .../signalwire/relay/message-event/index.mdx | 72 - .../cpp/signalwire/relay/message/index.mdx | 404 -- .../signalwire/relay/relay-client/index.mdx | 581 --- .../signalwire/relay/relay-config/index.mdx | 46 - .../signalwire/relay/relay-event/index.mdx | 98 - .../relay/web-socket-client/index.mdx | 352 -- .../signalwire/rest/crud-resource/index.mdx | 184 - .../cpp/signalwire/rest/http-client/index.mdx | 299 -- .../cpp/signalwire/rest/index.mdx | 258 -- .../rest/paginated-iterator/index.mdx | 261 -- .../rest-client/addresses-namespace/index.mdx | 54 - .../rest-client/calling-namespace/index.mdx | 1413 ------ .../rest/rest-client/chat-namespace/index.mdx | 106 - .../rest-client/compat-accounts/index.mdx | 162 - .../rest-client/compat-applications/index.mdx | 84 - .../rest/rest-client/compat-calls/index.mdx | 208 - .../rest-client/compat-conferences/index.mdx | 454 -- .../rest/rest-client/compat-faxes/index.mdx | 174 - .../rest-client/compat-laml-bins/index.mdx | 84 - .../rest-client/compat-messages/index.mdx | 177 - .../rest-client/compat-namespace/index.mdx | 186 - .../compat-phone-numbers/index.mdx | 284 -- .../rest/rest-client/compat-queues/index.mdx | 180 - .../rest-client/compat-recordings/index.mdx | 110 - .../rest/rest-client/compat-tokens/index.mdx | 112 - .../compat-transcriptions/index.mdx | 110 - .../datasphere-documents/index.mdx | 173 - .../datasphere-namespace/index.mdx | 82 - .../rest-client/fabric-addresses/index.mdx | 108 - .../rest-client/fabric-call-flows/index.mdx | 166 - .../fabric-conference-rooms/index.mdx | 107 - .../fabric-cxml-applications/index.mdx | 80 - .../fabric-generic-resources/index.mdx | 201 - .../rest-client/fabric-namespace/index.mdx | 96 - .../rest-client/fabric-resource-put/index.mdx | 84 - .../rest-client/fabric-resource/index.mdx | 87 - .../rest-client/fabric-subscribers/index.mdx | 212 - .../rest/rest-client/fabric-tokens/index.mdx | 186 - .../imported-numbers-namespace/index.mdx | 80 - .../cpp/signalwire/rest/rest-client/index.mdx | 750 --- .../rest-client/logs-conferences/index.mdx | 82 - .../rest/rest-client/logs-fax/index.mdx | 108 - .../rest/rest-client/logs-messages/index.mdx | 108 - .../rest/rest-client/logs-namespace/index.mdx | 60 - .../rest/rest-client/logs-voice/index.mdx | 139 - .../rest-client/lookup-namespace/index.mdx | 80 - .../rest/rest-client/mfa-namespace/index.mdx | 186 - .../number-groups-namespace/index.mdx | 193 - .../call-flow-options/index.mdx | 36 - .../cxml-webhook-options/index.mdx | 36 - .../phone-numbers-namespace/index.mdx | 585 --- .../relay-topic-options/index.mdx | 34 - .../rest-client/project-namespace/index.mdx | 104 - .../rest/rest-client/project-tokens/index.mdx | 110 - .../rest-client/pub-sub-namespace/index.mdx | 80 - .../rest-client/queues-namespace/index.mdx | 170 - .../recordings-namespace/index.mdx | 54 - .../rest-client/registry-brands/index.mdx | 193 - .../rest-client/registry-campaigns/index.mdx | 200 - .../rest-client/registry-namespace/index.mdx | 60 - .../rest-client/registry-numbers/index.mdx | 56 - .../rest-client/registry-orders/index.mdx | 82 - .../short-codes-namespace/index.mdx | 82 - .../sip-profile-namespace/index.mdx | 102 - .../verified-callers-namespace/index.mdx | 54 - .../video-conference-tokens/index.mdx | 108 - .../rest-client/video-conferences/index.mdx | 172 - .../rest-client/video-namespace/index.mdx | 68 - .../video-room-recordings/index.mdx | 139 - .../rest-client/video-room-sessions/index.mdx | 201 - .../rest-client/video-room-tokens/index.mdx | 82 - .../rest/rest-client/video-rooms/index.mdx | 141 - .../rest/rest-client/video-streams/index.mdx | 110 - .../rest/signal-wire-rest-error/index.mdx | 108 - .../cpp/signalwire/security/index.mdx | 283 -- .../security/session-manager/index.mdx | 207 - .../webhook-validator-options/index.mdx | 40 - .../signalwire/server/agent-server/index.mdx | 270 -- .../cpp/signalwire/server/index.mdx | 107 - .../server/tls-server-config/index.mdx | 62 - .../api-ninjas-trivia-skill-r/index.mdx | 174 - .../skills/api-ninjas-trivia-skill/index.mdx | 174 - .../skills/claude-skills-skill-r/index.mdx | 150 - .../skills/claude-skills-skill/index.mdx | 174 - .../skills/custom-skills-skill-r/index.mdx | 150 - .../skills/custom-skills-skill/index.mdx | 150 - .../datasphere-serverless-skill-r/index.mdx | 174 - .../datasphere-serverless-skill/index.mdx | 222 - .../skills/datasphere-skill-r/index.mdx | 174 - .../skills/datasphere-skill/index.mdx | 201 - .../skills/date-time-skill/index.mdx | 174 - .../skills/google-maps-skill-r/index.mdx | 152 - .../skills/google-maps-skill/index.mdx | 176 - .../cpp/signalwire/skills/index.mdx | 413 -- .../skills/info-gatherer-skill-r/index.mdx | 174 - .../skills/info-gatherer-skill/index.mdx | 222 - .../signalwire/skills/joke-skill-r/index.mdx | 200 - .../signalwire/skills/joke-skill/index.mdx | 200 - .../signalwire/skills/math-skill-r/index.mdx | 152 - .../signalwire/skills/math-skill/index.mdx | 174 - .../skills/mcp-gateway-skill-r/index.mdx | 152 - .../skills/mcp-gateway-skill/index.mdx | 200 - .../native-vector-search-skill-r/index.mdx | 174 - .../native-vector-search-skill/index.mdx | 174 - .../play-background-file-skill-r/index.mdx | 174 - .../play-background-file-skill/index.mdx | 174 - .../signalwire/skills/skill-base/index.mdx | 518 --- .../skills/skill-http-response/index.mdx | 38 - .../signalwire/skills/skill-manager/index.mdx | 172 - .../skills/skill-prompt-section/index.mdx | 38 - .../skills/skill-registry/index.mdx | 207 - .../skills/spider-skill-r/index.mdx | 174 - .../signalwire/skills/spider-skill/index.mdx | 177 - .../skills/swml-transfer-skill-r/index.mdx | 198 - .../skills/swml-transfer-skill/index.mdx | 222 - .../skills/weather-api-skill-r/index.mdx | 152 - .../skills/weather-api-skill/index.mdx | 152 - .../web-search-core/candidate/index.mdx | 42 - .../skills/web-search-core/index.mdx | 318 -- .../web-search-core/latency-params/index.mdx | 40 - .../skills/web-search-skill-r/index.mdx | 244 - .../skills/web-search-skill/index.mdx | 252 - .../skills/wikipedia-search-skill-r/index.mdx | 152 - .../skills/wikipedia-search-skill/index.mdx | 155 - .../signalwire/swaig/enum-or-string/index.mdx | 110 - .../swaig/function-result/index.mdx | 1632 ------- .../cpp/signalwire/swaig/index.mdx | 721 --- .../swaig/join-conference-options/index.mdx | 67 - .../swaig/parameter-schema/index.mdx | 492 -- .../swaig/tool-definition/index.mdx | 70 - .../cpp/signalwire/swml/document/index.mdx | 274 -- .../cpp/signalwire/swml/index.mdx | 97 - .../cpp/signalwire/swml/schema/index.mdx | 220 - .../cpp/signalwire/swml/section/index.mdx | 126 - .../cpp/signalwire/swml/service/index.mdx | 2134 --------- .../signalwire/swml/verb-definition/index.mdx | 40 - .../cpp/signalwire/swml/verb/index.mdx | 90 - .../cpp/signalwire/utils/index.mdx | 89 - .../signalwire/utils/schema-utils/index.mdx | 332 -- .../utils/schema-validation-error/index.mdx | 105 - .../signalwire/utils/url-validator/index.mdx | 117 - .../cpp/signalwire/utils/verb-info/index.mdx | 38 - fern/products/sdk-reference/cpp/std/index.mdx | 25 - fern/products/sdk-reference/dotnet/_meta.json | 2 +- .../dotnet/agents/agent/agent-base/index.mdx | 2064 +++++++++ .../agents/agent/agent-options/index.mdx | 64 + .../dotnet/agents/agent/index.mdx | 26 + .../agents/contexts/context-builder/index.mdx | 236 + .../dotnet/agents/contexts/context/index.mdx | 724 +++ .../agents/contexts/gather-info/index.mdx | 102 + .../agents/contexts/gather-question/index.mdx | 72 + .../dotnet/agents/contexts/index.mdx | 34 + .../contexts/reserved-tool-names/index.mdx | 45 + .../dotnet/agents/contexts/step/index.mdx | 548 +++ .../dotnet/agents/data-map/index.mdx | 516 +++ .../dotnet/agents/data-map/index__2.mdx | 14 + .../sdk-reference/dotnet/agents/index.mdx | 46 + .../sdk-reference/dotnet/agents/pom/index.mdx | 24 + .../dotnet/agents/pom/pom-builder/index.mdx | 323 ++ .../agents/pom/prompt-object-model/index.mdx | 330 ++ .../dotnet/agents/pom/section/index.mdx | 244 + .../agents/prefabs/concierge-agent/index.mdx | 177 + .../agents/prefabs/faq-bot-agent/index.mdx | 129 + .../dotnet/agents/prefabs/index.mdx | 38 + .../prefabs/info-gatherer-agent/index.mdx | 143 + .../prefabs/receptionist-agent/index.mdx | 99 + .../agents/prefabs/survey-agent/index.mdx | 157 + .../agents/server/agent-server/index.mdx | 304 ++ .../dotnet/agents/server/index.mdx | 22 + .../agents/serverless/adapter/index.mdx | 156 + .../dotnet/agents/serverless/index.mdx | 22 + .../api-ninjas-trivia-skill/index.mdx | 94 + .../claude-skills-skill/index.mdx | 179 + .../custom-skills-skill/index.mdx | 94 + .../datasphere-serverless-skill/index.mdx | 138 + .../skills-builtin/datasphere-skill/index.mdx | 150 + .../skills-builtin/datetime-skill/index.mdx | 114 + .../google-maps-skill/index.mdx | 136 + .../dotnet/agents/skills-builtin/index.mdx | 90 + .../info-gatherer-skill/index.mdx | 138 + .../skills-builtin/joke-skill/index.mdx | 136 + .../skills-builtin/math-skill/index.mdx | 114 + .../mcp-gateway-skill/index.mdx | 171 + .../native-vector-search-skill/index.mdx | 128 + .../play-background-file-skill/index.mdx | 94 + .../skills-builtin/spider-skill/index.mdx | 128 + .../swml-transfer-skill/index.mdx | 138 + .../weather-api-skill/index.mdx | 92 + .../skills-builtin/web-search-skill/index.mdx | 191 + .../wikipedia-search-skill/index.mdx | 125 + .../dotnet/agents/skills/index.mdx | 147 + .../dotnet/agents/skills/skill-base/index.mdx | 329 ++ .../agents/skills/skill-manager/index.mdx | 180 + .../skills/skill-name-extensions/index.mdx | 62 + .../agents/skills/skill-registry/index.mdx | 189 + .../callback-method-extensions/index.mdx | 62 + .../agents/swaig/codec-extensions/index.mdx | 63 + .../conference-beep-extensions/index.mdx | 61 + .../conference-record-extensions/index.mdx | 61 + .../conference-trim-extensions/index.mdx | 61 + .../agents/swaig/function-result/index.mdx | 1797 ++++++++ .../dotnet/agents/swaig/index.mdx | 481 ++ .../swaig/join-conference-options/index.mdx | 128 + .../agents/swaig/parameter-schema/index.mdx | 491 ++ .../record-direction-extensions/index.mdx | 62 + .../swaig/record-format-extensions/index.mdx | 62 + .../swaig/tap-direction-extensions/index.mdx | 62 + .../dotnet/agents/swml/document/index.mdx | 312 ++ .../dotnet/agents/swml/index.mdx | 46 + .../swml/schema-validation-error/index.mdx | 66 + .../dotnet/agents/swml/schema/index.mdx | 245 + .../agents/swml/service-options/index.mdx | 46 + .../dotnet/agents/swml/service/index.mdx | 895 ++++ .../dotnet/agents/swml/swml-builder/index.mdx | 309 ++ .../agents/swml/swml-renderer/index.mdx | 123 + .../dotnet/agents/swml/verb-info/index.mdx | 82 + .../sdk-reference/dotnet/core/index.mdx | 22 + .../dotnet/core/logging/index.mdx | 46 + .../dotnet/core/logging/logger/index.mdx | 188 + .../dotnet/core/security/index.mdx | 30 + .../core/security/session-manager/index.mdx | 158 + .../webhook-validation-middleware/index.mdx | 195 + .../core/security/webhook-validator/index.mdx | 128 + .../core/utils/execution-mode/index.mdx | 84 + .../sdk-reference/dotnet/core/utils/index.mdx | 22 + .../dotnet/core/utils/url-validator/index.mdx | 97 + fern/products/sdk-reference/dotnet/index.mdx | 21 +- .../dotnet/relay/action/index.mdx | 367 ++ .../dotnet/relay/ai-action/index.mdx | 85 + .../relay/call-state-extensions/index.mdx | 121 + .../sdk-reference/dotnet/relay/call/index.mdx | 1462 ++++++ .../dotnet/relay/client/index.mdx | 651 +++ .../dotnet/relay/collect-action/index.mdx | 193 + .../dotnet/relay/constants/index.mdx | 74 + .../dotnet/relay/detect-action/index.mdx | 116 + .../dotnet/relay/device/index.mdx | 152 + .../relay/dial-state-extensions/index.mdx | 121 + .../dotnet/relay/event/index.mdx | 126 + .../dotnet/relay/fax-action/index.mdx | 91 + .../sdk-reference/dotnet/relay/index.mdx | 281 ++ .../relay/message-state-extensions/index.mdx | 122 + .../dotnet/relay/message/index.mdx | 256 ++ .../dotnet/relay/pay-action/index.mdx | 85 + .../dotnet/relay/play-action/index.mdx | 139 + .../dotnet/relay/record-action/index.mdx | 129 + .../dotnet/relay/stream-action/index.mdx | 85 + .../dotnet/relay/tap-action/index.mdx | 85 + .../dotnet/relay/transcribe-action/index.mdx | 85 + .../dotnet/rest/crud-resource/index.mdx | 239 + .../dotnet/rest/crud-with-addresses/index.mdx | 86 + .../dotnet/rest/http-client/index.mdx | 315 ++ .../sdk-reference/dotnet/rest/index.mdx | 44 + .../rest/namespaces/addresses/index.mdx | 57 + .../namespaces/call-flows-helper/index.mdx | 135 + .../dotnet/rest/namespaces/calling/index.mdx | 1067 +++++ .../rest/namespaces/compat-accounts/index.mdx | 149 + .../namespaces/compat-applications/index.mdx | 88 + .../rest/namespaces/compat-calls/index.mdx | 197 + .../namespaces/compat-conferences/index.mdx | 396 ++ .../rest/namespaces/compat-faxes/index.mdx | 166 + .../namespaces/compat-laml-bins/index.mdx | 88 + .../rest/namespaces/compat-messages/index.mdx | 166 + .../namespaces/compat-phone-numbers/index.mdx | 278 ++ .../rest/namespaces/compat-queues/index.mdx | 168 + .../namespaces/compat-recordings/index.mdx | 128 + .../rest/namespaces/compat-tokens/index.mdx | 130 + .../compat-transcriptions/index.mdx | 128 + .../dotnet/rest/namespaces/compat/index.mdx | 94 + .../rest/namespaces/conference-logs/index.mdx | 80 + .../conference-rooms-helper/index.mdx | 83 + .../cxml-applications-helper/index.mdx | 56 + .../namespaces/datasphere-documents/index.mdx | 156 + .../rest/namespaces/datasphere-ns/index.mdx | 63 + .../namespaces/fabric-addresses/index.mdx | 107 + .../namespaces/fabric-resources/index.mdx | 184 + .../rest/namespaces/fabric-tokens/index.mdx | 174 + .../dotnet/rest/namespaces/fabric/index.mdx | 133 + .../dotnet/rest/namespaces/fax-logs/index.mdx | 104 + .../namespaces/imported-numbers/index.mdx | 59 + .../dotnet/rest/namespaces/index.mdx | 226 + .../dotnet/rest/namespaces/logs/index.mdx | 72 + .../rest/namespaces/message-logs/index.mdx | 104 + .../dotnet/rest/namespaces/mfa/index.mdx | 132 + .../rest/namespaces/number-groups/index.mdx | 191 + .../rest/namespaces/project-tokens/index.mdx | 124 + .../dotnet/rest/namespaces/project/index.mdx | 61 + .../dotnet/rest/namespaces/queues/index.mdx | 166 + .../rest/namespaces/recordings/index.mdx | 57 + .../rest/namespaces/registry-brands/index.mdx | 180 + .../namespaces/registry-campaigns/index.mdx | 184 + .../namespaces/registry-numbers/index.mdx | 80 + .../rest/namespaces/registry-orders/index.mdx | 80 + .../dotnet/rest/namespaces/registry/index.mdx | 72 + .../rest/namespaces/short-codes/index.mdx | 90 + .../rest/namespaces/sip-profile/index.mdx | 111 + .../namespaces/subscribers-helper/index.mdx | 190 + .../video-conference-tokens/index.mdx | 104 + .../namespaces/video-conferences/index.mdx | 166 + .../video-room-recordings/index.mdx | 154 + .../namespaces/video-room-sessions/index.mdx | 182 + .../namespaces/video-room-tokens/index.mdx | 80 + .../rest/namespaces/video-rooms/index.mdx | 140 + .../rest/namespaces/video-streams/index.mdx | 130 + .../dotnet/rest/namespaces/video/index.mdx | 78 + .../rest/namespaces/voice-logs/index.mdx | 130 + .../dotnet/rest/paginated-iterator/index.mdx | 131 + .../dotnet/rest/rest-client/index.mdx | 199 + .../rest/signal-wire-rest-error/index.mdx | 117 + .../signal-wire.agent/agent-base/index.mdx | 2064 --------- .../signal-wire.agent/agent-options/index.mdx | 64 - .../dotnet/signal-wire.agent/index.mdx | 24 - .../context-builder/index.mdx | 236 - .../signal-wire.contexts/context/index.mdx | 724 --- .../gather-info/index.mdx | 102 - .../gather-question/index.mdx | 72 - .../dotnet/signal-wire.contexts/index.mdx | 32 - .../reserved-tool-names/index.mdx | 45 - .../signal-wire.contexts/step/index.mdx | 548 --- .../signal-wire.data-map/data-map/index.mdx | 516 --- .../dotnet/signal-wire.data-map/index.mdx | 20 - .../dotnet/signal-wire.logging/index.mdx | 44 - .../signal-wire.logging/logger/index.mdx | 188 - .../dotnet/signal-wire.pom/index.mdx | 22 - .../signal-wire.pom/pom-builder/index.mdx | 323 -- .../prompt-object-model/index.mdx | 330 -- .../dotnet/signal-wire.pom/section/index.mdx | 244 - .../concierge-agent/index.mdx | 177 - .../faq-bot-agent/index.mdx | 129 - .../dotnet/signal-wire.prefabs/index.mdx | 36 - .../info-gatherer-agent/index.mdx | 143 - .../receptionist-agent/index.mdx | 99 - .../survey-agent/index.mdx | 157 - .../dotnet/signal-wire.relay/action/index.mdx | 367 -- .../signal-wire.relay/ai-action/index.mdx | 85 - .../call-state-extensions/index.mdx | 121 - .../dotnet/signal-wire.relay/call/index.mdx | 1462 ------ .../dotnet/signal-wire.relay/client/index.mdx | 651 --- .../collect-action/index.mdx | 193 - .../signal-wire.relay/constants/index.mdx | 74 - .../signal-wire.relay/detect-action/index.mdx | 116 - .../dotnet/signal-wire.relay/device/index.mdx | 152 - .../dial-state-extensions/index.mdx | 121 - .../dotnet/signal-wire.relay/event/index.mdx | 126 - .../signal-wire.relay/fax-action/index.mdx | 91 - .../dotnet/signal-wire.relay/index.mdx | 281 -- .../message-state-extensions/index.mdx | 122 - .../signal-wire.relay/message/index.mdx | 256 -- .../signal-wire.relay/pay-action/index.mdx | 85 - .../signal-wire.relay/play-action/index.mdx | 139 - .../signal-wire.relay/record-action/index.mdx | 129 - .../signal-wire.relay/stream-action/index.mdx | 85 - .../signal-wire.relay/tap-action/index.mdx | 85 - .../transcribe-action/index.mdx | 85 - .../addresses/index.mdx | 57 - .../call-flows-helper/index.mdx | 135 - .../calling/index.mdx | 1067 ----- .../compat-accounts/index.mdx | 149 - .../compat-applications/index.mdx | 88 - .../compat-calls/index.mdx | 197 - .../compat-conferences/index.mdx | 396 -- .../compat-faxes/index.mdx | 166 - .../compat-laml-bins/index.mdx | 88 - .../compat-messages/index.mdx | 166 - .../compat-phone-numbers/index.mdx | 278 -- .../compat-queues/index.mdx | 168 - .../compat-recordings/index.mdx | 128 - .../compat-tokens/index.mdx | 130 - .../compat-transcriptions/index.mdx | 128 - .../compat/index.mdx | 94 - .../conference-logs/index.mdx | 80 - .../conference-rooms-helper/index.mdx | 83 - .../cxml-applications-helper/index.mdx | 56 - .../datasphere-documents/index.mdx | 156 - .../datasphere-ns/index.mdx | 63 - .../fabric-addresses/index.mdx | 107 - .../fabric-resources/index.mdx | 184 - .../fabric-tokens/index.mdx | 174 - .../fabric/index.mdx | 133 - .../fax-logs/index.mdx | 104 - .../imported-numbers/index.mdx | 59 - .../signal-wire.rest.namespaces/index.mdx | 224 - .../logs/index.mdx | 72 - .../message-logs/index.mdx | 104 - .../signal-wire.rest.namespaces/mfa/index.mdx | 132 - .../number-groups/index.mdx | 191 - .../project-tokens/index.mdx | 124 - .../project/index.mdx | 61 - .../queues/index.mdx | 166 - .../recordings/index.mdx | 57 - .../registry-brands/index.mdx | 180 - .../registry-campaigns/index.mdx | 184 - .../registry-numbers/index.mdx | 80 - .../registry-orders/index.mdx | 80 - .../registry/index.mdx | 72 - .../short-codes/index.mdx | 90 - .../sip-profile/index.mdx | 111 - .../subscribers-helper/index.mdx | 190 - .../video-conference-tokens/index.mdx | 104 - .../video-conferences/index.mdx | 166 - .../video-room-recordings/index.mdx | 154 - .../video-room-sessions/index.mdx | 182 - .../video-room-tokens/index.mdx | 80 - .../video-rooms/index.mdx | 140 - .../video-streams/index.mdx | 130 - .../video/index.mdx | 78 - .../voice-logs/index.mdx | 130 - .../signal-wire.rest/crud-resource/index.mdx | 239 - .../crud-with-addresses/index.mdx | 86 - .../signal-wire.rest/http-client/index.mdx | 315 -- .../dotnet/signal-wire.rest/index.mdx | 38 - .../paginated-iterator/index.mdx | 131 - .../signal-wire.rest/rest-client/index.mdx | 199 - .../signal-wire-rest-error/index.mdx | 117 - .../dotnet/signal-wire.security/index.mdx | 28 - .../session-manager/index.mdx | 158 - .../webhook-validation-middleware/index.mdx | 195 - .../webhook-validator/index.mdx | 128 - .../signal-wire.server/agent-server/index.mdx | 304 -- .../dotnet/signal-wire.server/index.mdx | 20 - .../signal-wire.serverless/adapter/index.mdx | 156 - .../dotnet/signal-wire.serverless/index.mdx | 20 - .../api-ninjas-trivia-skill/index.mdx | 94 - .../claude-skills-skill/index.mdx | 179 - .../custom-skills-skill/index.mdx | 94 - .../datasphere-serverless-skill/index.mdx | 138 - .../datasphere-skill/index.mdx | 150 - .../datetime-skill/index.mdx | 114 - .../google-maps-skill/index.mdx | 136 - .../signal-wire.skills.builtin/index.mdx | 88 - .../info-gatherer-skill/index.mdx | 138 - .../joke-skill/index.mdx | 136 - .../math-skill/index.mdx | 114 - .../mcp-gateway-skill/index.mdx | 171 - .../native-vector-search-skill/index.mdx | 128 - .../play-background-file-skill/index.mdx | 94 - .../spider-skill/index.mdx | 128 - .../swml-transfer-skill/index.mdx | 138 - .../weather-api-skill/index.mdx | 92 - .../web-search-skill/index.mdx | 191 - .../wikipedia-search-skill/index.mdx | 125 - .../dotnet/signal-wire.skills/index.mdx | 145 - .../signal-wire.skills/skill-base/index.mdx | 329 -- .../skill-manager/index.mdx | 180 - .../skill-name-extensions/index.mdx | 62 - .../skill-registry/index.mdx | 189 - .../callback-method-extensions/index.mdx | 62 - .../codec-extensions/index.mdx | 63 - .../conference-beep-extensions/index.mdx | 61 - .../conference-record-extensions/index.mdx | 61 - .../conference-trim-extensions/index.mdx | 61 - .../function-result/index.mdx | 1797 -------- .../dotnet/signal-wire.swaig/index.mdx | 479 -- .../join-conference-options/index.mdx | 128 - .../parameter-schema/index.mdx | 491 -- .../record-direction-extensions/index.mdx | 62 - .../record-format-extensions/index.mdx | 62 - .../tap-direction-extensions/index.mdx | 62 - .../signal-wire.swml/document/index.mdx | 312 -- .../dotnet/signal-wire.swml/index.mdx | 44 - .../schema-validation-error/index.mdx | 66 - .../dotnet/signal-wire.swml/schema/index.mdx | 245 - .../service-options/index.mdx | 46 - .../dotnet/signal-wire.swml/service/index.mdx | 895 ---- .../signal-wire.swml/swml-builder/index.mdx | 309 -- .../signal-wire.swml/swml-renderer/index.mdx | 123 - .../signal-wire.swml/verb-info/index.mdx | 82 - .../execution-mode/index.mdx | 84 - .../dotnet/signal-wire.utils/index.mdx | 20 - .../signal-wire.utils/url-validator/index.mdx | 97 - fern/products/sdk-reference/go/_meta.json | 2 +- .../agents/agent/agent/agent-base/index.mdx | 2701 +++++++++++ .../go/agents/agent/agent/index.mdx | 30 + .../agent/agent/mcp-server-config/index.mdx | 39 + .../agent/agent/tool-definition/index.mdx | 108 + .../sdk-reference/go/agents/agent/index.mdx | 967 ++++ .../contexts/context-builder/index.mdx | 199 + .../contexts/contexts/context/index.mdx | 671 +++ .../contexts/contexts/gather-info/index.mdx | 113 + .../contexts/gather-question/index.mdx | 71 + .../go/agents/contexts/contexts/index.mdx | 74 + .../agents/contexts/contexts/step/index.mdx | 550 +++ .../go/agents/contexts/index.mdx | 219 + .../datamap/expression-pattern/index.mdx | 35 + .../go/agents/datamap/datamap/index.mdx | 22 + .../sdk-reference/go/agents/datamap/index.mdx | 706 +++ .../go/agents/datamap/index__2.mdx | 20 + .../sdk-reference/go/agents/index.mdx | 68 + .../sdk-reference/go/agents/lambda/index.mdx | 131 + .../go/agents/lambda/lambda/handler/index.mdx | 85 + .../go/agents/lambda/lambda/index.mdx | 22 + .../go/agents/livewire/index.mdx | 1275 ++++++ .../livewire/livewire/agent-handoff/index.mdx | 35 + .../livewire/livewire/agent-session/index.mdx | 255 ++ .../agents/livewire/livewire/agent/index.mdx | 247 + .../livewire/livewire/cartesia-tts/index.mdx | 33 + .../livewire/livewire/chat-context/index.mdx | 61 + .../livewire/livewire/chat-message/index.mdx | 35 + .../livewire/livewire/deepgram-stt/index.mdx | 33 + .../livewire/eleven-labs-tts/index.mdx | 33 + .../livewire/livewire/google-stt/index.mdx | 33 + .../go/agents/livewire/livewire/index.mdx | 106 + .../livewire/livewire/inference-llm/index.mdx | 33 + .../livewire/livewire/inference-stt/index.mdx | 33 + .../livewire/livewire/inference-tts/index.mdx | 33 + .../livewire/livewire/job-context/index.mdx | 83 + .../livewire/livewire/job-process/index.mdx | 33 + .../livewire/livewire/live-server/index.mdx | 75 + .../livewire/livewire/open-aillm/index.mdx | 33 + .../livewire/livewire/open-aitts/index.mdx | 33 + .../agents/livewire/livewire/room/index.mdx | 33 + .../livewire/livewire/run-context/index.mdx | 41 + .../livewire/livewire/silero-vad/index.mdx | 51 + .../livewire/livewire/stop-response/index.mdx | 29 + .../livewire/livewire/tool-error/index.mdx | 55 + .../sdk-reference/go/agents/pom/index.mdx | 298 ++ .../sdk-reference/go/agents/pom/pom/index.mdx | 26 + .../pom/pom/prompt-object-model/index.mdx | 271 ++ .../go/agents/pom/pom/section/index.mdx | 246 + .../sdk-reference/go/agents/prefabs/index.mdx | 363 ++ .../agents/prefabs/prefabs/amenity/index.mdx | 37 + .../prefabs/prefabs/bedrock-agent/index.mdx | 183 + .../prefabs/prefabs/bedrock-options/index.mdx | 65 + .../prefabs/prefabs/concierge-agent/index.mdx | 33 + .../prefabs/concierge-options/index.mdx | 53 + .../prefabs/prefabs/department/index.mdx | 47 + .../prefabs/prefabs/faq-bot-agent/index.mdx | 33 + .../prefabs/prefabs/faq-bot-options/index.mdx | 47 + .../go/agents/prefabs/prefabs/faq/index.mdx | 37 + .../go/agents/prefabs/prefabs/index.mdx | 86 + .../prefabs/info-gatherer-agent/index.mdx | 96 + .../prefabs/info-gatherer-options/index.mdx | 39 + .../agents/prefabs/prefabs/question/index.mdx | 43 + .../prefabs/receptionist-agent/index.mdx | 33 + .../prefabs/receptionist-options/index.mdx | 43 + .../prefabs/prefabs/survey-agent/index.mdx | 33 + .../prefabs/prefabs/survey-options/index.mdx | 47 + .../prefabs/prefabs/survey-question/index.mdx | 57 + .../sdk-reference/go/agents/server/index.mdx | 233 + .../server/server/agent-entry/index.mdx | 35 + .../server/server/agent-server/index.mdx | 342 ++ .../go/agents/server/server/index.mdx | 26 + .../builtin/api-ninjas-trivia-skill/index.mdx | 193 + .../builtin/claude-skills-skill/index.mdx | 211 + .../builtin/custom-skills-skill/index.mdx | 153 + .../data-sphere-serverless-skill/index.mdx | 197 + .../builtin/data-sphere-skill/index.mdx | 193 + .../builtin/builtin/date-time-skill/index.mdx | 113 + .../builtin/google-maps-skill/index.mdx | 153 + .../agents/skills/builtin/builtin/index.mdx | 591 +++ .../builtin/info-gatherer-skill/index.mdx | 173 + .../builtin/builtin/joke-skill/index.mdx | 133 + .../builtin/builtin/math-skill/index.mdx | 93 + .../builtin/mcp-gateway-skill/index.mdx | 155 + .../native-vector-search-skill/index.mdx | 193 + .../play-background-file-skill/index.mdx | 133 + .../builtin/builtin/spider-skill/index.mdx | 173 + .../builtin/swml-transfer-skill/index.mdx | 173 + .../builtin/weather-api-skill/index.mdx | 153 + .../builtin/web-search-skill/index.mdx | 197 + .../builtin/wikipedia-search-skill/index.mdx | 113 + .../go/agents/skills/builtin/index.mdx | 20 + .../sdk-reference/go/agents/skills/index.mdx | 275 ++ .../agents/skills/skills/base-skill/index.mdx | 519 +++ .../go/agents/skills/skills/index.mdx | 339 ++ .../skills/skills/skill-manager/index.mdx | 160 + .../skills/skills/skill-registry/index.mdx | 77 + .../skills/skills/tool-registration/index.mdx | 45 + .../go/agents/swaig-test/index.mdx | 22 + .../swaig-test/main/basic-auth/index.mdx | 35 + .../go/agents/swaig-test/main/index.mdx | 250 + .../main/lambda-sim-result/index.mdx | 37 + .../main/simulate-lambda-options/index.mdx | 47 + .../sdk-reference/go/agents/swaig/index.mdx | 646 +++ .../swaig/swaig/function-result/index.mdx | 1451 ++++++ .../go/agents/swaig/swaig/index.mdx | 228 + .../swaig/join-conference-options/index.mdx | 99 + .../go/agents/swaig/swaig/params/index.mdx | 369 ++ .../agents/swaig/swaig/pay-options/index.mdx | 107 + .../go/agents/swaig/swaig/prop/index.mdx | 29 + .../swaig/swaig/record-call-options/index.mdx | 71 + .../sdk-reference/go/agents/swml/index.mdx | 854 ++++ .../swml/swml/ai-verb-handler/index.mdx | 132 + .../go/agents/swml/swml/document/index.mdx | 277 ++ .../go/agents/swml/swml/index.mdx | 166 + .../agents/swml/swml/schema-utils/index.mdx | 289 ++ .../swml/schema-validation-error/index.mdx | 57 + .../go/agents/swml/swml/schema/index.mdx | 125 + .../swml/swml/security-config/index.mdx | 52 + .../go/agents/swml/swml/service/index.mdx | 2010 ++++++++ .../swml/swml/tool-definition/index.mdx | 41 + .../swml/swml/validation-result/index.mdx | 37 + .../go/agents/swml/swml/verb-info/index.mdx | 43 + fern/products/sdk-reference/go/core/index.mdx | 28 + .../sdk-reference/go/core/logging/index.mdx | 243 + .../go/core/logging/logging/index.mdx | 85 + .../go/core/logging/logging/logger/index.mdx | 125 + .../sdk-reference/go/core/security/index.mdx | 362 ++ .../go/core/security/security/index.mdx | 26 + .../security/session-manager/index.mdx | 139 + .../security/security/webhook-opts/index.mdx | 43 + .../sdk-reference/go/core/util/index.mdx | 120 + .../cmd/swaig-test/main/basic-auth/index.mdx | 35 - .../cmd/swaig-test/main/index.mdx | 249 - .../main/lambda-sim-result/index.mdx | 37 - .../main/simulate-lambda-options/index.mdx | 47 - .../pkg/agent/agent/agent-base/index.mdx | 2701 ----------- .../signalwire-go/pkg/agent/agent/index.mdx | 976 ---- .../agent/agent/mcp-server-config/index.mdx | 39 - .../pkg/agent/agent/tool-definition/index.mdx | 108 - .../contexts/context-builder/index.mdx | 199 - .../pkg/contexts/contexts/context/index.mdx | 671 --- .../contexts/contexts/gather-info/index.mdx | 113 - .../contexts/gather-question/index.mdx | 71 - .../pkg/contexts/contexts/index.mdx | 272 -- .../pkg/contexts/contexts/step/index.mdx | 550 --- .../datamap/expression-pattern/index.mdx | 35 - .../pkg/datamap/datamap/index.mdx | 713 --- .../pkg/lambda/lambda/handler/index.mdx | 85 - .../signalwire-go/pkg/lambda/lambda/index.mdx | 132 - .../livewire/livewire/agent-handoff/index.mdx | 35 - .../livewire/livewire/agent-session/index.mdx | 255 -- .../pkg/livewire/livewire/agent/index.mdx | 247 - .../livewire/livewire/cartesia-tts/index.mdx | 33 - .../livewire/livewire/chat-context/index.mdx | 61 - .../livewire/livewire/chat-message/index.mdx | 35 - .../livewire/livewire/deepgram-stt/index.mdx | 33 - .../livewire/eleven-labs-tts/index.mdx | 33 - .../livewire/livewire/google-stt/index.mdx | 33 - .../pkg/livewire/livewire/index.mdx | 1360 ------ .../livewire/livewire/inference-llm/index.mdx | 33 - .../livewire/livewire/inference-stt/index.mdx | 33 - .../livewire/livewire/inference-tts/index.mdx | 33 - .../livewire/livewire/job-context/index.mdx | 83 - .../livewire/livewire/job-process/index.mdx | 33 - .../livewire/livewire/live-server/index.mdx | 75 - .../livewire/livewire/open-aillm/index.mdx | 33 - .../livewire/livewire/open-aitts/index.mdx | 33 - .../pkg/livewire/livewire/room/index.mdx | 33 - .../livewire/livewire/run-context/index.mdx | 41 - .../livewire/livewire/silero-vad/index.mdx | 51 - .../livewire/livewire/stop-response/index.mdx | 29 - .../livewire/livewire/tool-error/index.mdx | 55 - .../pkg/logging/logging/index.mdx | 307 -- .../pkg/logging/logging/logger/index.mdx | 125 - .../signalwire-go/pkg/pom/pom/index.mdx | 303 -- .../pkg/pom/pom/prompt-object-model/index.mdx | 271 -- .../pkg/pom/pom/section/index.mdx | 246 - .../pkg/prefabs/prefabs/amenity/index.mdx | 37 - .../prefabs/prefabs/bedrock-agent/index.mdx | 183 - .../prefabs/prefabs/bedrock-options/index.mdx | 65 - .../prefabs/prefabs/concierge-agent/index.mdx | 33 - .../prefabs/concierge-options/index.mdx | 53 - .../pkg/prefabs/prefabs/department/index.mdx | 47 - .../prefabs/prefabs/faq-bot-agent/index.mdx | 33 - .../prefabs/prefabs/faq-bot-options/index.mdx | 47 - .../pkg/prefabs/prefabs/faq/index.mdx | 37 - .../pkg/prefabs/prefabs/index.mdx | 428 -- .../prefabs/info-gatherer-agent/index.mdx | 96 - .../prefabs/info-gatherer-options/index.mdx | 39 - .../pkg/prefabs/prefabs/question/index.mdx | 43 - .../prefabs/receptionist-agent/index.mdx | 33 - .../prefabs/receptionist-options/index.mdx | 43 - .../prefabs/prefabs/survey-agent/index.mdx | 33 - .../prefabs/prefabs/survey-options/index.mdx | 47 - .../prefabs/prefabs/survey-question/index.mdx | 57 - .../pkg/relay/relay/action/index.mdx | 165 - .../pkg/relay/relay/ai-action/index.mdx | 55 - .../pkg/relay/relay/ai-event/index.mdx | 39 - .../relay/relay/call-receive-event/index.mdx | 51 - .../relay/relay/call-state-event/index.mdx | 47 - .../pkg/relay/relay/call/index.mdx | 1819 -------- .../relay/relay/calling-error-event/index.mdx | 39 - .../pkg/relay/relay/client/index.mdx | 613 --- .../pkg/relay/relay/collect-action/index.mdx | 103 - .../pkg/relay/relay/collect-event/index.mdx | 43 - .../pkg/relay/relay/collect-params/index.mdx | 67 - .../relay/relay/conference-event/index.mdx | 43 - .../pkg/relay/relay/connect-event/index.mdx | 37 - .../pkg/relay/relay/denoise-event/index.mdx | 41 - .../pkg/relay/relay/detect-action/index.mdx | 55 - .../pkg/relay/relay/detect-event/index.mdx | 37 - .../pkg/relay/relay/device/index.mdx | 85 - .../pkg/relay/relay/dial-event/index.mdx | 69 - .../pkg/relay/relay/echo-event/index.mdx | 37 - .../pkg/relay/relay/fax-action/index.mdx | 55 - .../pkg/relay/relay/fax-event/index.mdx | 37 - .../pkg/relay/relay/hold-event/index.mdx | 37 - .../signalwire-go/pkg/relay/relay/index.mdx | 4073 ----------------- .../relay/message-receive-event/index.mdx | 55 - .../relay/relay/message-state-event/index.mdx | 67 - .../pkg/relay/relay/message/index.mdx | 385 -- .../pkg/relay/relay/pay-action/index.mdx | 55 - .../pkg/relay/relay/pay-event/index.mdx | 39 - .../pkg/relay/relay/play-action/index.mdx | 125 - .../pkg/relay/relay/play-event/index.mdx | 37 - .../pkg/relay/relay/queue-event/index.mdx | 51 - .../pkg/relay/relay/record-action/index.mdx | 103 - .../pkg/relay/relay/record-event/index.mdx | 49 - .../pkg/relay/relay/refer-event/index.mdx | 43 - .../pkg/relay/relay/relay-error/index.mdx | 83 - .../pkg/relay/relay/relay-event/index.mdx | 225 - .../relay/relay/send-digits-event/index.mdx | 37 - .../relay/standalone-collect-action/index.mdx | 77 - .../pkg/relay/relay/stream-action/index.mdx | 55 - .../pkg/relay/relay/stream-event/index.mdx | 45 - .../pkg/relay/relay/tap-action/index.mdx | 55 - .../pkg/relay/relay/tap-event/index.mdx | 43 - .../relay/relay/transcribe-action/index.mdx | 55 - .../relay/relay/transcribe-event/index.mdx | 55 - .../namespaces/addresses-namespace/index.mdx | 137 - .../index.mdx | 63 - .../namespaces/call-flow-options/index.mdx | 39 - .../namespaces/call-flows-resource/index.mdx | 117 - .../namespaces/calling-namespace/index.mdx | 1065 ----- .../namespaces/chat-namespace/index.mdx | 59 - .../namespaces/compat-accounts/index.mdx | 139 - .../namespaces/compat-applications/index.mdx | 61 - .../namespaces/compat-calls/index.mdx | 177 - .../namespaces/compat-conferences/index.mdx | 399 -- .../namespaces/compat-faxes/index.mdx | 145 - .../namespaces/compat-laml-bins/index.mdx | 61 - .../namespaces/compat-messages/index.mdx | 145 - .../namespaces/compat-namespace/index.mdx | 55 - .../namespaces/compat-phone-numbers/index.mdx | 273 -- .../namespaces/compat-queues/index.mdx | 147 - .../namespaces/compat-recordings/index.mdx | 111 - .../namespaces/compat-tokens/index.mdx | 113 - .../compat-transcriptions/index.mdx | 111 - .../namespaces/conference-logs/index.mdx | 59 - .../conference-rooms-resource/index.mdx | 61 - .../namespaces/crud-resource/index.mdx | 169 - .../namespaces/crud-with-addresses/index.mdx | 61 - .../cxml-applications-resource/index.mdx | 89 - .../namespaces/cxml-webhook-options/index.mdx | 43 - .../namespaces/datasphere-documents/index.mdx | 143 - .../namespaces/datasphere-namespace/index.mdx | 33 - .../namespaces/fabric-addresses/index.mdx | 85 - .../namespaces/fabric-namespace/index.mdx | 69 - .../namespaces/fabric-tokens/index.mdx | 163 - .../namespaces/namespaces/fax-logs/index.mdx | 85 - .../namespaces/generic-resources/index.mdx | 199 - .../imported-numbers-namespace/index.mdx | 59 - .../pkg/rest/namespaces/namespaces/index.mdx | 1467 ------ .../namespaces/logs-namespace/index.mdx | 39 - .../namespaces/lookup-namespace/index.mdx | 61 - .../namespaces/message-logs/index.mdx | 85 - .../namespaces/mfa-namespace/index.mdx | 113 - .../number-groups-namespace/index.mdx | 141 - .../phone-numbers-namespace/index.mdx | 277 -- .../namespaces/project-namespace/index.mdx | 33 - .../namespaces/project-tokens/index.mdx | 113 - .../namespaces/pub-sub-namespace/index.mdx | 59 - .../namespaces/queues-namespace/index.mdx | 115 - .../namespaces/recordings-namespace/index.mdx | 111 - .../namespaces/registry-brands/index.mdx | 167 - .../namespaces/registry-campaigns/index.mdx | 171 - .../namespaces/registry-namespace/index.mdx | 39 - .../namespaces/registry-numbers/index.mdx | 59 - .../namespaces/registry-orders/index.mdx | 59 - .../namespaces/relay-topic-options/index.mdx | 39 - .../namespaces/namespaces/resource/index.mdx | 61 - .../short-codes-namespace/index.mdx | 113 - .../sip-profile-namespace/index.mdx | 81 - .../namespaces/subscribers-resource/index.mdx | 175 - .../verified-callers-namespace/index.mdx | 87 - .../video-conference-tokens/index.mdx | 85 - .../namespaces/video-conferences/index.mdx | 117 - .../namespaces/video-namespace/index.mdx | 45 - .../video-room-recordings/index.mdx | 139 - .../namespaces/video-room-sessions/index.mdx | 169 - .../namespaces/video-room-tokens/index.mdx | 59 - .../namespaces/video-rooms/index.mdx | 89 - .../namespaces/video-streams/index.mdx | 113 - .../namespaces/voice-logs/index.mdx | 113 - .../pkg/rest/rest/crud-resource/index.mdx | 171 - .../pkg/rest/rest/http-client/index.mdx | 213 - .../signalwire-go/pkg/rest/rest/index.mdx | 265 -- .../rest/rest/paginated-iterator/index.mdx | 77 - .../pkg/rest/rest/rest-client/index.mdx | 174 - .../rest/signal-wire-rest-error/index.mdx | 61 - .../pkg/security/security/index.mdx | 367 -- .../security/session-manager/index.mdx | 139 - .../security/security/webhook-opts/index.mdx | 43 - .../pkg/server/server/agent-entry/index.mdx | 35 - .../pkg/server/server/agent-server/index.mdx | 342 -- .../signalwire-go/pkg/server/server/index.mdx | 238 - .../builtin/api-ninjas-trivia-skill/index.mdx | 193 - .../builtin/claude-skills-skill/index.mdx | 211 - .../builtin/custom-skills-skill/index.mdx | 153 - .../data-sphere-serverless-skill/index.mdx | 197 - .../builtin/data-sphere-skill/index.mdx | 193 - .../builtin/builtin/date-time-skill/index.mdx | 113 - .../builtin/google-maps-skill/index.mdx | 153 - .../pkg/skills/builtin/builtin/index.mdx | 590 --- .../builtin/info-gatherer-skill/index.mdx | 173 - .../builtin/builtin/joke-skill/index.mdx | 133 - .../builtin/builtin/math-skill/index.mdx | 93 - .../builtin/mcp-gateway-skill/index.mdx | 155 - .../native-vector-search-skill/index.mdx | 193 - .../play-background-file-skill/index.mdx | 133 - .../builtin/builtin/spider-skill/index.mdx | 173 - .../builtin/swml-transfer-skill/index.mdx | 173 - .../builtin/weather-api-skill/index.mdx | 153 - .../builtin/web-search-skill/index.mdx | 197 - .../builtin/wikipedia-search-skill/index.mdx | 113 - .../pkg/skills/skills/base-skill/index.mdx | 519 --- .../signalwire-go/pkg/skills/skills/index.mdx | 591 --- .../pkg/skills/skills/skill-manager/index.mdx | 160 - .../skills/skills/skill-registry/index.mdx | 77 - .../skills/skills/tool-registration/index.mdx | 45 - .../pkg/swaig/swaig/function-result/index.mdx | 1451 ------ .../signalwire-go/pkg/swaig/swaig/index.mdx | 853 ---- .../swaig/join-conference-options/index.mdx | 99 - .../pkg/swaig/swaig/params/index.mdx | 369 -- .../pkg/swaig/swaig/pay-options/index.mdx | 107 - .../pkg/swaig/swaig/prop/index.mdx | 29 - .../swaig/swaig/record-call-options/index.mdx | 71 - .../pkg/swml/swml/ai-verb-handler/index.mdx | 132 - .../pkg/swml/swml/document/index.mdx | 277 -- .../signalwire-go/pkg/swml/swml/index.mdx | 999 ---- .../pkg/swml/swml/schema-utils/index.mdx | 289 -- .../swml/schema-validation-error/index.mdx | 57 - .../pkg/swml/swml/schema/index.mdx | 125 - .../pkg/swml/swml/security-config/index.mdx | 52 - .../pkg/swml/swml/service/index.mdx | 2010 -------- .../pkg/swml/swml/tool-definition/index.mdx | 41 - .../pkg/swml/swml/validation-result/index.mdx | 37 - .../pkg/swml/swml/verb-info/index.mdx | 43 - .../signalwire-go/pkg/util/util/index.mdx | 119 - fern/products/sdk-reference/go/index.mdx | 22 +- .../products/sdk-reference/go/relay/index.mdx | 3597 +++++++++++++++ .../go/relay/relay/action/index.mdx | 165 + .../go/relay/relay/ai-action/index.mdx | 55 + .../go/relay/relay/ai-event/index.mdx | 39 + .../relay/relay/call-receive-event/index.mdx | 51 + .../go/relay/relay/call-state-event/index.mdx | 47 + .../go/relay/relay/call/index.mdx | 1819 ++++++++ .../relay/relay/calling-error-event/index.mdx | 39 + .../go/relay/relay/client/index.mdx | 613 +++ .../go/relay/relay/collect-action/index.mdx | 103 + .../go/relay/relay/collect-event/index.mdx | 43 + .../go/relay/relay/collect-params/index.mdx | 67 + .../go/relay/relay/conference-event/index.mdx | 43 + .../go/relay/relay/connect-event/index.mdx | 37 + .../go/relay/relay/denoise-event/index.mdx | 41 + .../go/relay/relay/detect-action/index.mdx | 55 + .../go/relay/relay/detect-event/index.mdx | 37 + .../go/relay/relay/device/index.mdx | 85 + .../go/relay/relay/dial-event/index.mdx | 69 + .../go/relay/relay/echo-event/index.mdx | 37 + .../go/relay/relay/fax-action/index.mdx | 55 + .../go/relay/relay/fax-event/index.mdx | 37 + .../go/relay/relay/hold-event/index.mdx | 37 + .../sdk-reference/go/relay/relay/index.mdx | 495 ++ .../relay/message-receive-event/index.mdx | 55 + .../relay/relay/message-state-event/index.mdx | 67 + .../go/relay/relay/message/index.mdx | 385 ++ .../go/relay/relay/pay-action/index.mdx | 55 + .../go/relay/relay/pay-event/index.mdx | 39 + .../go/relay/relay/play-action/index.mdx | 125 + .../go/relay/relay/play-event/index.mdx | 37 + .../go/relay/relay/queue-event/index.mdx | 51 + .../go/relay/relay/record-action/index.mdx | 103 + .../go/relay/relay/record-event/index.mdx | 49 + .../go/relay/relay/refer-event/index.mdx | 43 + .../go/relay/relay/relay-error/index.mdx | 83 + .../go/relay/relay/relay-event/index.mdx | 225 + .../relay/relay/send-digits-event/index.mdx | 37 + .../relay/standalone-collect-action/index.mdx | 77 + .../go/relay/relay/stream-action/index.mdx | 55 + .../go/relay/relay/stream-event/index.mdx | 45 + .../go/relay/relay/tap-action/index.mdx | 55 + .../go/relay/relay/tap-event/index.mdx | 43 + .../relay/relay/transcribe-action/index.mdx | 55 + .../go/relay/relay/transcribe-event/index.mdx | 55 + fern/products/sdk-reference/go/rest/index.mdx | 248 + .../go/rest/namespaces/index.mdx | 22 + .../namespaces/addresses-namespace/index.mdx | 137 + .../index.mdx | 63 + .../namespaces/call-flow-options/index.mdx | 39 + .../namespaces/call-flows-resource/index.mdx | 117 + .../namespaces/calling-namespace/index.mdx | 1065 +++++ .../namespaces/chat-namespace/index.mdx | 59 + .../namespaces/compat-accounts/index.mdx | 139 + .../namespaces/compat-applications/index.mdx | 61 + .../namespaces/compat-calls/index.mdx | 177 + .../namespaces/compat-conferences/index.mdx | 399 ++ .../namespaces/compat-faxes/index.mdx | 145 + .../namespaces/compat-laml-bins/index.mdx | 61 + .../namespaces/compat-messages/index.mdx | 145 + .../namespaces/compat-namespace/index.mdx | 55 + .../namespaces/compat-phone-numbers/index.mdx | 273 ++ .../namespaces/compat-queues/index.mdx | 147 + .../namespaces/compat-recordings/index.mdx | 111 + .../namespaces/compat-tokens/index.mdx | 113 + .../compat-transcriptions/index.mdx | 111 + .../namespaces/conference-logs/index.mdx | 59 + .../conference-rooms-resource/index.mdx | 61 + .../namespaces/crud-resource/index.mdx | 169 + .../namespaces/crud-with-addresses/index.mdx | 61 + .../cxml-applications-resource/index.mdx | 89 + .../namespaces/cxml-webhook-options/index.mdx | 43 + .../namespaces/datasphere-documents/index.mdx | 143 + .../namespaces/datasphere-namespace/index.mdx | 33 + .../namespaces/fabric-addresses/index.mdx | 85 + .../namespaces/fabric-namespace/index.mdx | 69 + .../namespaces/fabric-tokens/index.mdx | 163 + .../namespaces/namespaces/fax-logs/index.mdx | 85 + .../namespaces/generic-resources/index.mdx | 199 + .../imported-numbers-namespace/index.mdx | 59 + .../go/rest/namespaces/namespaces/index.mdx | 1468 ++++++ .../namespaces/logs-namespace/index.mdx | 39 + .../namespaces/lookup-namespace/index.mdx | 61 + .../namespaces/message-logs/index.mdx | 85 + .../namespaces/mfa-namespace/index.mdx | 113 + .../number-groups-namespace/index.mdx | 141 + .../phone-numbers-namespace/index.mdx | 277 ++ .../namespaces/project-namespace/index.mdx | 33 + .../namespaces/project-tokens/index.mdx | 113 + .../namespaces/pub-sub-namespace/index.mdx | 59 + .../namespaces/queues-namespace/index.mdx | 115 + .../namespaces/recordings-namespace/index.mdx | 111 + .../namespaces/registry-brands/index.mdx | 167 + .../namespaces/registry-campaigns/index.mdx | 171 + .../namespaces/registry-namespace/index.mdx | 39 + .../namespaces/registry-numbers/index.mdx | 59 + .../namespaces/registry-orders/index.mdx | 59 + .../namespaces/relay-topic-options/index.mdx | 39 + .../namespaces/namespaces/resource/index.mdx | 61 + .../short-codes-namespace/index.mdx | 113 + .../sip-profile-namespace/index.mdx | 81 + .../namespaces/subscribers-resource/index.mdx | 175 + .../verified-callers-namespace/index.mdx | 87 + .../video-conference-tokens/index.mdx | 85 + .../namespaces/video-conferences/index.mdx | 117 + .../namespaces/video-namespace/index.mdx | 45 + .../video-room-recordings/index.mdx | 139 + .../namespaces/video-room-sessions/index.mdx | 169 + .../namespaces/video-room-tokens/index.mdx | 59 + .../namespaces/video-rooms/index.mdx | 89 + .../namespaces/video-streams/index.mdx | 113 + .../namespaces/voice-logs/index.mdx | 113 + .../go/rest/rest/crud-resource/index.mdx | 171 + .../go/rest/rest/http-client/index.mdx | 213 + .../sdk-reference/go/rest/rest/index.mdx | 38 + .../go/rest/rest/paginated-iterator/index.mdx | 77 + .../go/rest/rest/rest-client/index.mdx | 174 + .../rest/signal-wire-rest-error/index.mdx | 61 + fern/products/sdk-reference/java/_meta.json | 2 +- .../agent/agent/agent-base/builder/index.mdx | 466 ++ .../agents/agent/agent/agent-base/index.mdx | 2940 ++++++++++++ .../agent/agent/agent-base/index__2.mdx | 67 + .../java/agents/agent/agent/index.mdx | 28 + .../sdk-reference/java/agents/agent/index.mdx | 26 + .../java/agents/cli/cli/index.mdx | 22 + .../java/agents/cli/cli/swaig-test/index.mdx | 136 + .../sdk-reference/java/agents/cli/index.mdx | 28 + .../java/agents/cli/simulation/index.mdx | 20 + .../cli/simulation/simulation/index.mdx | 34 + .../simulation/serverless-simulator/index.mdx | 288 ++ .../serverless-simulator/index__2.mdx | 82 + .../contexts/context-builder/index.mdx | 257 ++ .../contexts/contexts/context/index.mdx | 650 +++ .../contexts/contexts/gather-info/index.mdx | 191 + .../contexts/gather-question/index.mdx | 123 + .../java/agents/contexts/contexts/index.mdx | 38 + .../agents/contexts/contexts/step/index.mdx | 629 +++ .../java/agents/contexts/index.mdx | 26 + .../java/agents/datamap/index.mdx | 571 +++ .../sdk-reference/java/agents/index.mdx | 46 + .../sdk-reference/java/agents/pom/index.mdx | 26 + .../java/agents/pom/pom/index.mdx | 26 + .../pom/pom/prompt-object-model/index.mdx | 536 +++ .../java/agents/pom/pom/section/index.mdx | 532 +++ .../java/agents/prefabs/index.mdx | 26 + .../prefabs/prefabs/concierge-agent/index.mdx | 186 + .../prefabs/prefabs/faq-bot-agent/index.mdx | 171 + .../java/agents/prefabs/prefabs/index.mdx | 38 + .../prefabs/info-gatherer-agent/index.mdx | 197 + .../prefabs/receptionist-agent/index.mdx | 213 + .../prefabs/prefabs/survey-agent/index.mdx | 258 ++ .../java/agents/runtime/index.mdx | 28 + .../java/agents/runtime/lambda/index.mdx | 20 + .../agents/runtime/lambda/lambda/index.mdx | 32 + .../lambda/lambda-agent-handler/index.mdx | 150 + .../lambda/lambda/lambda-response/index.mdx | 241 + .../java/agents/runtime/runtime/index.mdx | 346 ++ .../runtime/lambda-url-resolver/index.mdx | 117 + .../java/agents/server/index.mdx | 26 + .../server/server/agent-server/index.mdx | 459 ++ .../java/agents/server/server/index.mdx | 22 + .../builtin/api-ninja-trivia-skill/index.mdx | 182 + .../builtin/claude-skills-skill/index.mdx | 207 + .../builtin/custom-skills-skill/index.mdx | 162 + .../datasphere-serverless-skill/index.mdx | 226 + .../builtin/datasphere-skill/index.mdx | 204 + .../builtin/builtin/datetime-skill/index.mdx | 182 + .../builtin/google-maps-skill/index.mdx | 182 + .../agents/skills/builtin/builtin/index.mdx | 68 + .../builtin/info-gatherer-skill/index.mdx | 204 + .../builtin/builtin/joke-skill/index.mdx | 204 + .../builtin/builtin/math-skill/index.mdx | 182 + .../builtin/mcp-gateway-skill/index.mdx | 206 + .../native-vector-search-skill/index.mdx | 185 + .../play-background-file-skill/index.mdx | 182 + .../builtin/builtin/spider-skill/index.mdx | 182 + .../builtin/swml-transfer-skill/index.mdx | 226 + .../builtin/weather-api-skill/index.mdx | 160 + .../builtin/web-search-skill/index.mdx | 254 + .../builtin/wikipedia-search-skill/index.mdx | 160 + .../java/agents/skills/builtin/index.mdx | 20 + .../java/agents/skills/index.mdx | 28 + .../java/agents/skills/skills/index.mdx | 569 +++ .../skills/skills/skill-manager/index.mdx | 173 + .../skills/skills/skill-registry/index.mdx | 288 ++ .../sdk-reference/java/agents/swaig/index.mdx | 26 + .../swaig/swaig/function-result/index.mdx | 2454 ++++++++++ .../java/agents/swaig/swaig/index.mdx | 87 + .../swaig/parameter-schema/builder/index.mdx | 547 +++ .../swaig/swaig/parameter-schema/index.mdx | 105 + .../swaig/swaig/parameter-schema/index__2.mdx | 22 + .../swaig/swaig/tool-definition/index.mdx | 282 ++ .../sdk-reference/java/agents/swml/index.mdx | 26 + .../java/agents/swml/swml/document/index.mdx | 290 ++ .../java/agents/swml/swml/index.mdx | 697 +++ .../agents/swml/swml/schema-utils/index.mdx | 349 ++ .../swml/swml/schema-utils/index__2.mdx | 22 + .../swml/schema-utils/verb-info/index.mdx | 40 + .../swml/schema-validation-error/index.mdx | 108 + .../java/agents/swml/swml/schema/index.mdx | 159 + .../java/agents/swml/swml/service/index.mdx | 2073 +++++++++ .../sdk-reference/java/agents/tools/index.mdx | 20 + .../agent/agent/agent-base/builder/index.mdx | 466 -- .../sdk/agent/agent/agent-base/index.mdx | 2993 ------------ .../com/signalwire/sdk/agent/agent/index.mdx | 27 - .../java/com/signalwire/sdk/cli/cli/index.mdx | 27 - .../sdk/cli/cli/swaig-test/index.mdx | 136 - .../sdk/cli/simulation/simulation/index.mdx | 27 - .../simulation/serverless-simulator/index.mdx | 356 -- .../contexts/context-builder/index.mdx | 257 -- .../sdk/contexts/contexts/context/index.mdx | 650 --- .../contexts/contexts/gather-info/index.mdx | 191 - .../contexts/gather-question/index.mdx | 123 - .../sdk/contexts/contexts/index.mdx | 43 - .../sdk/contexts/contexts/step/index.mdx | 629 --- .../signalwire/sdk/datamap/datamap/index.mdx | 570 --- .../signalwire/sdk/logging/logging/index.mdx | 27 - .../sdk/logging/logging/logger/index.mdx | 421 -- .../java/com/signalwire/sdk/pom/pom/index.mdx | 31 - .../sdk/pom/pom/prompt-object-model/index.mdx | 536 --- .../signalwire/sdk/pom/pom/section/index.mdx | 532 --- .../prefabs/prefabs/concierge-agent/index.mdx | 186 - .../prefabs/prefabs/faq-bot-agent/index.mdx | 171 - .../signalwire/sdk/prefabs/prefabs/index.mdx | 43 - .../prefabs/info-gatherer-agent/index.mdx | 197 - .../prefabs/receptionist-agent/index.mdx | 213 - .../prefabs/prefabs/survey-agent/index.mdx | 258 -- .../relay/relay/action/ai-action/index.mdx | 102 - .../relay/action/collect-action/index.mdx | 92 - .../relay/action/detect-action/index.mdx | 76 - .../sdk/relay/relay/action/index.mdx | 392 -- .../relay/relay/action/pay-action/index.mdx | 76 - .../relay/relay/action/play-action/index.mdx | 128 - .../action/play-and-collect-action/index.mdx | 101 - .../relay/action/receive-fax-action/index.mdx | 76 - .../relay/action/record-action/index.mdx | 128 - .../relay/action/send-fax-action/index.mdx | 76 - .../relay/action/stream-action/index.mdx | 102 - .../relay/relay/action/tap-action/index.mdx | 102 - .../relay/action/transcribe-action/index.mdx | 102 - .../signalwire/sdk/relay/relay/call/index.mdx | 2561 ----------- .../sdk/relay/relay/constants/index.mdx | 424 -- .../sdk/relay/relay/device/index.mdx | 358 -- .../com/signalwire/sdk/relay/relay/index.mdx | 704 --- .../sdk/relay/relay/message/index.mdx | 699 --- .../relay/relay-client/builder/index.mdx | 208 - .../sdk/relay/relay/relay-client/index.mdx | 694 --- .../sdk/relay/relay/relay-error/index.mdx | 73 - .../authorization-state-event/index.mdx | 80 - .../relay-event/call-collect-event/index.mdx | 140 - .../relay-event/call-connect-event/index.mdx | 100 - .../relay-event/call-detect-event/index.mdx | 142 - .../relay-event/call-dial-event/index.mdx | 194 - .../relay-event/call-fax-event/index.mdx | 120 - .../relay-event/call-pay-event/index.mdx | 120 - .../relay-event/call-play-event/index.mdx | 120 - .../relay-event/call-receive-event/index.mdx | 160 - .../relay-event/call-record-event/index.mdx | 180 - .../relay-event/call-refer-event/index.mdx | 100 - .../call-send-digits-event/index.mdx | 100 - .../relay-event/call-state-event/index.mdx | 200 - .../relay-event/call-stream-event/index.mdx | 120 - .../relay-event/call-tap-event/index.mdx | 120 - .../call-transcribe-event/index.mdx | 120 - .../relay-event/conference-event/index.mdx | 100 - .../sdk/relay/relay/relay-event/index.mdx | 305 -- .../messaging-receive-event/index.mdx | 260 -- .../messaging-state-event/index.mdx | 280 -- .../relay/relay-event/queue-event/index.mdx | 100 - .../namespaces/addresses-namespace/index.mdx | 184 - .../namespaces/billing-namespace/index.mdx | 90 - .../namespaces/calling-namespace/index.mdx | 1050 ----- .../namespaces/campaign-namespace/index.mdx | 130 - .../namespaces/chat-namespace/index.mdx | 110 - .../compat-accounts/index.mdx | 191 - .../compat-applications/index.mdx | 88 - .../compat-namespace/compat-calls/index.mdx | 203 - .../compat-conferences/index.mdx | 495 -- .../compat-namespace/compat-faxes/index.mdx | 183 - .../compat-laml-bins/index.mdx | 88 - .../compat-messages/index.mdx | 183 - .../compat-phone-numbers/index.mdx | 366 -- .../compat-namespace/compat-queues/index.mdx | 191 - .../compat-recordings/index.mdx | 160 - .../compat-namespace/compat-tokens/index.mdx | 151 - .../compat-transcriptions/index.mdx | 160 - .../namespaces/compat-namespace/index.mdx | 411 -- .../namespaces/compliance-namespace/index.mdx | 90 - .../namespaces/conference-namespace/index.mdx | 90 - .../datasphere-documents/index.mdx | 181 - .../namespaces/datasphere-namespace/index.mdx | 109 - .../call-flows-resource/index.mdx | 211 - .../conference-rooms-resource/index.mdx | 133 - .../cxml-applications-resource/index.mdx | 113 - .../fabric-addresses/index.mdx | 136 - .../fabric-subscribers/index.mdx | 298 -- .../fabric-namespace/fabric-tokens/index.mdx | 172 - .../generic-resources/index.mdx | 237 - .../namespaces/fabric-namespace/index.mdx | 411 -- .../namespaces/fax-namespace/index.mdx | 70 - .../imported-numbers-namespace/index.mdx | 97 - .../sdk/rest/namespaces/namespaces/index.mdx | 143 - .../logs-namespace/conference-logs/index.mdx | 112 - .../logs-namespace/fax-logs/index.mdx | 136 - .../namespaces/logs-namespace/index.mdx | 154 - .../logs-namespace/message-logs/index.mdx | 136 - .../logs-namespace/voice-logs/index.mdx | 183 - .../namespaces/messaging-namespace/index.mdx | 96 - .../namespaces/mfa-namespace/index.mdx | 147 - .../number-groups-namespace/index.mdx | 333 -- .../number-lookup-namespace/index.mdx | 76 - .../phone-numbers-namespace/index.mdx | 614 --- .../namespaces/project-namespace/index.mdx | 178 - .../project-tokens/index.mdx | 149 - .../namespaces/pub-sub-namespace/index.mdx | 98 - .../namespaces/queue-namespace/index.mdx | 340 -- .../namespaces/recording-namespace/index.mdx | 191 - .../namespaces/registry-namespace/index.mdx | 153 - .../registry-brands/index.mdx | 237 - .../registry-campaigns/index.mdx | 248 - .../registry-numbers/index.mdx | 98 - .../registry-orders/index.mdx | 98 - .../short-codes-namespace/index.mdx | 162 - .../namespaces/sip-namespace/index.mdx | 90 - .../sip-profile-namespace/index.mdx | 117 - .../namespaces/stream-namespace/index.mdx | 70 - .../namespaces/swml-namespace/index.mdx | 70 - .../transcription-namespace/index.mdx | 70 - .../namespaces/video-namespace/index.mdx | 251 - .../video-conference-tokens/index.mdx | 122 - .../video-conferences/index.mdx | 211 - .../video-room-recordings/index.mdx | 208 - .../video-room-sessions/index.mdx | 278 -- .../video-namespace/video-rooms/index.mdx | 161 - .../video-namespace/video-streams/index.mdx | 148 - .../sdk/rest/rest/crud-resource/index.mdx | 259 -- .../sdk/rest/rest/http-client/index.mdx | 317 -- .../com/signalwire/sdk/rest/rest/index.mdx | 210 - .../rest/rest/paginated-iterator/index.mdx | 176 - .../rest/rest/rest-client/builder/index.mdx | 136 - .../sdk/rest/rest/rest-client/index.mdx | 781 ---- .../sdk/rest/rest/rest-error/index.mdx | 259 -- .../sdk/runtime/lambda/lambda/index.mdx | 31 - .../lambda/lambda-agent-handler/index.mdx | 150 - .../lambda/lambda/lambda-response/index.mdx | 241 - .../signalwire/sdk/runtime/runtime/index.mdx | 351 -- .../runtime/lambda-url-resolver/index.mdx | 117 - .../sdk/security/security/index.mdx | 35 - .../security/session-manager/index.mdx | 141 - .../index.mdx | 152 - .../security/webhook-filter/index.mdx | 196 - .../security/webhook-validator/index.mdx | 181 - .../sdk/server/server/agent-server/index.mdx | 459 -- .../signalwire/sdk/server/server/index.mdx | 27 - .../builtin/api-ninja-trivia-skill/index.mdx | 182 - .../builtin/claude-skills-skill/index.mdx | 207 - .../builtin/custom-skills-skill/index.mdx | 162 - .../datasphere-serverless-skill/index.mdx | 226 - .../builtin/datasphere-skill/index.mdx | 204 - .../builtin/builtin/datetime-skill/index.mdx | 182 - .../builtin/google-maps-skill/index.mdx | 182 - .../sdk/skills/builtin/builtin/index.mdx | 67 - .../builtin/info-gatherer-skill/index.mdx | 204 - .../builtin/builtin/joke-skill/index.mdx | 204 - .../builtin/builtin/math-skill/index.mdx | 182 - .../builtin/mcp-gateway-skill/index.mdx | 206 - .../native-vector-search-skill/index.mdx | 185 - .../play-background-file-skill/index.mdx | 182 - .../builtin/builtin/spider-skill/index.mdx | 182 - .../builtin/swml-transfer-skill/index.mdx | 226 - .../builtin/weather-api-skill/index.mdx | 160 - .../builtin/web-search-skill/index.mdx | 254 - .../builtin/wikipedia-search-skill/index.mdx | 160 - .../signalwire/sdk/skills/skills/index.mdx | 574 --- .../sdk/skills/skills/skill-manager/index.mdx | 173 - .../skills/skills/skill-registry/index.mdx | 288 -- .../sdk/swaig/swaig/function-result/index.mdx | 2454 ---------- .../com/signalwire/sdk/swaig/swaig/index.mdx | 86 - .../swaig/parameter-schema/builder/index.mdx | 547 --- .../swaig/swaig/parameter-schema/index.mdx | 113 - .../sdk/swaig/swaig/tool-definition/index.mdx | 282 -- .../sdk/swml/swml/document/index.mdx | 290 -- .../com/signalwire/sdk/swml/swml/index.mdx | 696 --- .../sdk/swml/swml/schema-utils/index.mdx | 357 -- .../swml/schema-utils/verb-info/index.mdx | 40 - .../swml/schema-validation-error/index.mdx | 108 - .../signalwire/sdk/swml/swml/schema/index.mdx | 159 - .../sdk/swml/swml/service/index.mdx | 2073 --------- .../com/signalwire/sdk/tools/tools/index.mdx | 19 - .../com/signalwire/sdk/utils/utils/index.mdx | 27 - .../sdk/utils/utils/url-validator/index.mdx | 80 - .../sdk-reference/java/core/index.mdx | 22 + .../sdk-reference/java/core/logging/index.mdx | 26 + .../java/core/logging/logging/index.mdx | 28 + .../core/logging/logging/logger/index.mdx | 329 ++ .../core/logging/logging/logger/index__2.mdx | 106 + .../java/core/security/index.mdx | 26 + .../java/core/security/security/index.mdx | 36 + .../security/session-manager/index.mdx | 141 + .../index.mdx | 152 + .../security/webhook-filter/index.mdx | 188 + .../security/webhook-filter/index__2.mdx | 22 + .../security/webhook-validator/index.mdx | 181 + .../sdk-reference/java/core/utils/index.mdx | 26 + .../java/core/utils/utils/index.mdx | 22 + .../core/utils/utils/url-validator/index.mdx | 80 + fern/products/sdk-reference/java/index.mdx | 24 +- .../sdk-reference/java/relay/index.mdx | 24 + .../relay/relay/action/ai-action/index.mdx | 102 + .../relay/action/collect-action/index.mdx | 92 + .../relay/action/detect-action/index.mdx | 76 + .../java/relay/relay/action/index.mdx | 340 ++ .../java/relay/relay/action/index__2.mdx | 66 + .../relay/relay/action/pay-action/index.mdx | 76 + .../relay/relay/action/play-action/index.mdx | 128 + .../action/play-and-collect-action/index.mdx | 101 + .../relay/action/receive-fax-action/index.mdx | 76 + .../relay/action/record-action/index.mdx | 128 + .../relay/action/send-fax-action/index.mdx | 76 + .../relay/action/stream-action/index.mdx | 102 + .../relay/relay/action/tap-action/index.mdx | 102 + .../relay/action/transcribe-action/index.mdx | 102 + .../java/relay/relay/call/index.mdx | 2561 +++++++++++ .../java/relay/relay/constants/index.mdx | 424 ++ .../java/relay/relay/device/index.mdx | 358 ++ .../sdk-reference/java/relay/relay/index.mdx | 709 +++ .../java/relay/relay/message/index.mdx | 699 +++ .../relay/relay-client/builder/index.mdx | 208 + .../java/relay/relay/relay-client/index.mdx | 688 +++ .../relay/relay/relay-client/index__2.mdx | 20 + .../java/relay/relay/relay-error/index.mdx | 73 + .../authorization-state-event/index.mdx | 80 + .../relay-event/call-collect-event/index.mdx | 140 + .../relay-event/call-connect-event/index.mdx | 100 + .../relay-event/call-detect-event/index.mdx | 142 + .../relay-event/call-dial-event/index.mdx | 194 + .../relay-event/call-fax-event/index.mdx | 120 + .../relay-event/call-pay-event/index.mdx | 120 + .../relay-event/call-play-event/index.mdx | 120 + .../relay-event/call-receive-event/index.mdx | 160 + .../relay-event/call-record-event/index.mdx | 180 + .../relay-event/call-refer-event/index.mdx | 100 + .../call-send-digits-event/index.mdx | 100 + .../relay-event/call-state-event/index.mdx | 200 + .../relay-event/call-stream-event/index.mdx | 120 + .../relay-event/call-tap-event/index.mdx | 120 + .../call-transcribe-event/index.mdx | 120 + .../relay-event/conference-event/index.mdx | 100 + .../java/relay/relay/relay-event/index.mdx | 221 + .../java/relay/relay/relay-event/index__2.mdx | 98 + .../messaging-receive-event/index.mdx | 260 ++ .../messaging-state-event/index.mdx | 280 ++ .../relay/relay-event/queue-event/index.mdx | 100 + .../sdk-reference/java/rest/index.mdx | 26 + .../java/rest/namespaces/index.mdx | 20 + .../namespaces/addresses-namespace/index.mdx | 184 + .../namespaces/billing-namespace/index.mdx | 90 + .../namespaces/calling-namespace/index.mdx | 1050 +++++ .../namespaces/campaign-namespace/index.mdx | 130 + .../namespaces/chat-namespace/index.mdx | 110 + .../compat-accounts/index.mdx | 191 + .../compat-applications/index.mdx | 88 + .../compat-namespace/compat-calls/index.mdx | 203 + .../compat-conferences/index.mdx | 495 ++ .../compat-namespace/compat-faxes/index.mdx | 183 + .../compat-laml-bins/index.mdx | 88 + .../compat-messages/index.mdx | 183 + .../compat-phone-numbers/index.mdx | 366 ++ .../compat-namespace/compat-queues/index.mdx | 191 + .../compat-recordings/index.mdx | 160 + .../compat-namespace/compat-tokens/index.mdx | 151 + .../compat-transcriptions/index.mdx | 160 + .../namespaces/compat-namespace/index.mdx | 359 ++ .../namespaces/compat-namespace/index__2.mdx | 66 + .../namespaces/compliance-namespace/index.mdx | 90 + .../namespaces/conference-namespace/index.mdx | 90 + .../datasphere-documents/index.mdx | 181 + .../namespaces/datasphere-namespace/index.mdx | 101 + .../datasphere-namespace/index__2.mdx | 22 + .../call-flows-resource/index.mdx | 211 + .../conference-rooms-resource/index.mdx | 133 + .../cxml-applications-resource/index.mdx | 113 + .../fabric-addresses/index.mdx | 136 + .../fabric-subscribers/index.mdx | 298 ++ .../fabric-namespace/fabric-tokens/index.mdx | 172 + .../generic-resources/index.mdx | 237 + .../namespaces/fabric-namespace/index.mdx | 379 ++ .../namespaces/fabric-namespace/index__2.mdx | 46 + .../namespaces/fax-namespace/index.mdx | 70 + .../imported-numbers-namespace/index.mdx | 97 + .../java/rest/namespaces/namespaces/index.mdx | 162 + .../logs-namespace/conference-logs/index.mdx | 112 + .../logs-namespace/fax-logs/index.mdx | 136 + .../namespaces/logs-namespace/index.mdx | 134 + .../namespaces/logs-namespace/index__2.mdx | 34 + .../logs-namespace/message-logs/index.mdx | 136 + .../logs-namespace/voice-logs/index.mdx | 183 + .../namespaces/messaging-namespace/index.mdx | 96 + .../namespaces/mfa-namespace/index.mdx | 147 + .../number-groups-namespace/index.mdx | 333 ++ .../number-lookup-namespace/index.mdx | 76 + .../phone-numbers-namespace/index.mdx | 614 +++ .../namespaces/project-namespace/index.mdx | 170 + .../namespaces/project-namespace/index__2.mdx | 22 + .../project-tokens/index.mdx | 149 + .../namespaces/pub-sub-namespace/index.mdx | 98 + .../namespaces/queue-namespace/index.mdx | 340 ++ .../namespaces/recording-namespace/index.mdx | 191 + .../namespaces/registry-namespace/index.mdx | 133 + .../registry-namespace/index__2.mdx | 34 + .../registry-brands/index.mdx | 237 + .../registry-campaigns/index.mdx | 248 + .../registry-numbers/index.mdx | 98 + .../registry-orders/index.mdx | 98 + .../short-codes-namespace/index.mdx | 162 + .../namespaces/sip-namespace/index.mdx | 90 + .../sip-profile-namespace/index.mdx | 117 + .../namespaces/stream-namespace/index.mdx | 70 + .../namespaces/swml-namespace/index.mdx | 70 + .../transcription-namespace/index.mdx | 70 + .../namespaces/video-namespace/index.mdx | 223 + .../namespaces/video-namespace/index__2.mdx | 42 + .../video-conference-tokens/index.mdx | 122 + .../video-conferences/index.mdx | 211 + .../video-room-recordings/index.mdx | 208 + .../video-room-sessions/index.mdx | 278 ++ .../video-namespace/video-rooms/index.mdx | 161 + .../video-namespace/video-streams/index.mdx | 148 + .../java/rest/rest/crud-resource/index.mdx | 259 ++ .../java/rest/rest/http-client/index.mdx | 317 ++ .../sdk-reference/java/rest/rest/index.mdx | 211 + .../rest/rest/paginated-iterator/index.mdx | 176 + .../rest/rest/rest-client/builder/index.mdx | 136 + .../java/rest/rest/rest-client/index.mdx | 775 ++++ .../java/rest/rest/rest-client/index__2.mdx | 20 + .../java/rest/rest/rest-error/index.mdx | 259 ++ fern/products/sdk-reference/perl/_meta.json | 2 +- .../agent/agent-base/agent-base/index.mdx | 1343 ++++++ .../perl/agents/agent/agent-base/index.mdx | 20 + .../sdk-reference/perl/agents/agent/index.mdx | 20 + .../sdk-reference/perl/agents/index.mdx | 30 + .../sdk-reference/perl/agents/pom/index.mdx | 22 + .../agents/pom/prompt-object-model/index.mdx | 22 + .../prompt-object-model/index.mdx | 249 + .../perl/agents/pom/section/index.mdx | 22 + .../perl/agents/pom/section/section/index.mdx | 171 + .../prefabs/concierge/concierge/index.mdx | 51 + .../perl/agents/prefabs/concierge/index.mdx | 20 + .../agents/prefabs/faq-bot/faq-bot/index.mdx | 51 + .../perl/agents/prefabs/faq-bot/index.mdx | 20 + .../perl/agents/prefabs/index.mdx | 28 + .../agents/prefabs/info-gatherer/index.mdx | 20 + .../info-gatherer/info-gatherer/index.mdx | 51 + .../agents/prefabs/receptionist/index.mdx | 20 + .../receptionist/receptionist/index.mdx | 51 + .../perl/agents/prefabs/survey/index.mdx | 20 + .../agents/prefabs/survey/survey/index.mdx | 51 + .../agent-server/agent-server/index.mdx | 163 + .../perl/agents/server/agent-server/index.mdx | 20 + .../perl/agents/server/index.mdx | 20 + .../api-ninjas-trivia/index.mdx | 79 + .../builtin/api-ninjas-trivia/index.mdx | 20 + .../claude-skills/claude-skills/index.mdx | 95 + .../skills/builtin/claude-skills/index.mdx | 20 + .../custom-skills/custom-skills/index.mdx | 79 + .../skills/builtin/custom-skills/index.mdx | 20 + .../datasphere-serverless/index.mdx | 111 + .../builtin/datasphere-serverless/index.mdx | 20 + .../builtin/datasphere/datasphere/index.mdx | 131 + .../skills/builtin/datasphere/index.mdx | 20 + .../builtin/datetime/datetime/index.mdx | 79 + .../agents/skills/builtin/datetime/index.mdx | 20 + .../builtin/google-maps/google-maps/index.mdx | 95 + .../skills/builtin/google-maps/index.mdx | 20 + .../perl/agents/skills/builtin/index.mdx | 54 + .../skills/builtin/info-gatherer/index.mdx | 20 + .../info-gatherer/info-gatherer/index.mdx | 95 + .../perl/agents/skills/builtin/joke/index.mdx | 20 + .../agents/skills/builtin/joke/joke/index.mdx | 95 + .../perl/agents/skills/builtin/math/index.mdx | 20 + .../agents/skills/builtin/math/math/index.mdx | 79 + .../skills/builtin/mcp-gateway/index.mdx | 20 + .../builtin/mcp-gateway/mcp-gateway/index.mdx | 111 + .../builtin/native-vector-search/index.mdx | 20 + .../native-vector-search/index.mdx | 95 + .../builtin/play-background-file/index.mdx | 20 + .../play-background-file/index.mdx | 79 + .../agents/skills/builtin/spider/index.mdx | 20 + .../skills/builtin/spider/spider/index.mdx | 115 + .../skills/builtin/swml-transfer/index.mdx | 20 + .../swml-transfer/swml-transfer/index.mdx | 95 + .../skills/builtin/weather-api/index.mdx | 20 + .../builtin/weather-api/weather-api/index.mdx | 79 + .../skills/builtin/web-search/index.mdx | 20 + .../builtin/web-search/web-search/index.mdx | 115 + .../skills/builtin/wikipedia-search/index.mdx | 20 + .../wikipedia-search/index.mdx | 99 + .../perl/agents/skills/index.mdx | 28 + .../perl/agents/skills/skill-base/index.mdx | 22 + .../skills/skill-base/skill-base/index.mdx | 255 ++ .../agents/skills/skill-manager/index.mdx | 20 + .../skill-manager/skill-manager/index.mdx | 107 + .../perl/agents/skills/skill-name/index.mdx | 22 + .../skills/skill-name/skill-name/index.mdx | 152 + .../agents/skills/skill-registry/index.mdx | 20 + .../skill-registry/skill-registry/index.mdx | 147 + .../function-result/function-result/index.mdx | 896 ++++ .../agents/swaig/function-result/index.mdx | 22 + .../sdk-reference/perl/agents/swaig/index.mdx | 28 + .../agents/swaig/join-conference/index.mdx | 22 + .../join-conference/join-conference/index.mdx | 280 ++ .../agents/swaig/parameter-schema/index.mdx | 22 + .../parameter-schema/index.mdx | 289 ++ .../perl/agents/swaig/record-call/index.mdx | 22 + .../swaig/record-call/record-call/index.mdx | 193 + .../perl/agents/swaig/tap/index.mdx | 22 + .../perl/agents/swaig/tap/tap/index.mdx | 191 + .../agents/swml/document/document/index.mdx | 201 + .../perl/agents/swml/document/index.mdx | 20 + .../sdk-reference/perl/agents/swml/index.mdx | 24 + .../perl/agents/swml/schema/index.mdx | 20 + .../perl/agents/swml/schema/schema/index.mdx | 135 + .../perl/agents/swml/service/index.mdx | 20 + .../agents/swml/service/service/index.mdx | 475 ++ .../sdk-reference/perl/core/core/index.mdx | 20 + .../perl/core/core/logging-config/index.mdx | 20 + .../logging-config/logging-config/index.mdx | 63 + .../sdk-reference/perl/core/index.mdx | 20 + .../perl/core/security/index.mdx | 24 + .../core/security/session-manager/index.mdx | 20 + .../session-manager/session-manager/index.mdx | 243 + .../security/webhook-middleware/index.mdx | 22 + .../webhook-middleware/index.mdx | 68 + .../core/security/webhook-validator/index.mdx | 22 + .../webhook-validator/index.mdx | 125 + fern/products/sdk-reference/perl/index.mdx | 5 +- .../perl/relay/action/action/index.mdx | 357 ++ .../sdk-reference/perl/relay/action/index.mdx | 22 + .../relay/call-state/call-state/index.mdx | 168 + .../perl/relay/call-state/index.mdx | 22 + .../perl/relay/call/call/index.mdx | 932 ++++ .../sdk-reference/perl/relay/call/index.mdx | 22 + .../perl/relay/client/client/index.mdx | 359 ++ .../sdk-reference/perl/relay/client/index.mdx | 22 + .../perl/relay/constants/constants/index.mdx | 77 + .../perl/relay/constants/index.mdx | 20 + .../perl/relay/device/device/index.mdx | 106 + .../sdk-reference/perl/relay/device/index.mdx | 22 + .../relay/dial-state/dial-state/index.mdx | 162 + .../perl/relay/dial-state/index.mdx | 22 + .../perl/relay/event/event/index.mdx | 87 + .../sdk-reference/perl/relay/event/index.mdx | 22 + .../sdk-reference/perl/relay/index.mdx | 36 + .../perl/relay/message-state/index.mdx | 22 + .../message-state/message-state/index.mdx | 171 + .../perl/relay/message/index.mdx | 22 + .../perl/relay/message/message/index.mdx | 213 + .../rest/http-client/http-client/index.mdx | 135 + .../perl/rest/http-client/index.mdx | 20 + .../sdk-reference/perl/rest/index.mdx | 26 + .../perl/rest/namespaces/base/base/index.mdx | 133 + .../perl/rest/namespaces/base/index.mdx | 20 + .../rest/namespaces/calling/calling/index.mdx | 953 ++++ .../perl/rest/namespaces/calling/index.mdx | 20 + .../perl/rest/namespaces/chat/chat/index.mdx | 51 + .../perl/rest/namespaces/chat/index.mdx | 20 + .../rest/namespaces/compat/compat/index.mdx | 1273 ++++++ .../perl/rest/namespaces/compat/index.mdx | 20 + .../datasphere/datasphere/index.mdx | 117 + .../perl/rest/namespaces/datasphere/index.mdx | 20 + .../rest/namespaces/fabric/fabric/index.mdx | 579 +++ .../perl/rest/namespaces/fabric/index.mdx | 20 + .../perl/rest/namespaces/index.mdx | 44 + .../perl/rest/namespaces/logs/index.mdx | 20 + .../perl/rest/namespaces/logs/logs/index.mdx | 193 + .../rest/namespaces/phone-numbers/index.mdx | 22 + .../phone-numbers/phone-numbers/index.mdx | 237 + .../perl/rest/namespaces/project/index.mdx | 20 + .../rest/namespaces/project/project/index.mdx | 113 + .../perl/rest/namespaces/pub-sub/index.mdx | 20 + .../rest/namespaces/pub-sub/pub-sub/index.mdx | 51 + .../perl/rest/namespaces/registry/index.mdx | 20 + .../namespaces/registry/registry/index.mdx | 303 ++ .../perl/rest/namespaces/resources/index.mdx | 20 + .../namespaces/resources/resources/index.mdx | 583 +++ .../perl/rest/namespaces/video/index.mdx | 20 + .../rest/namespaces/video/video/index.mdx | 491 ++ .../perl/rest/pagination/index.mdx | 22 + .../perl/rest/pagination/pagination/index.mdx | 79 + .../perl/rest/phone-call-handler/index.mdx | 20 + .../phone-call-handler/index.mdx | 67 + .../perl/rest/rest-client/index.mdx | 20 + .../rest/rest-client/rest-client/index.mdx | 27 + .../agent/agent-base/agent-base/index.mdx | 1342 ------ .../logging-config/logging-config/index.mdx | 62 - .../prompt-object-model/index.mdx | 248 - .../signal-wire/pom/section/section/index.mdx | 170 - .../prefabs/concierge/concierge/index.mdx | 50 - .../prefabs/faq-bot/faq-bot/index.mdx | 50 - .../info-gatherer/info-gatherer/index.mdx | 50 - .../receptionist/receptionist/index.mdx | 50 - .../prefabs/survey/survey/index.mdx | 50 - .../signal-wire/relay/action/action/index.mdx | 356 -- .../relay/call-state/call-state/index.mdx | 167 - .../signal-wire/relay/call/call/index.mdx | 931 ---- .../signal-wire/relay/client/client/index.mdx | 358 -- .../relay/constants/constants/index.mdx | 76 - .../signal-wire/relay/device/device/index.mdx | 105 - .../relay/dial-state/dial-state/index.mdx | 161 - .../signal-wire/relay/event/event/index.mdx | 86 - .../message-state/message-state/index.mdx | 170 - .../relay/message/message/index.mdx | 212 - .../rest/http-client/http-client/index.mdx | 134 - .../rest/namespaces/base/base/index.mdx | 132 - .../rest/namespaces/calling/calling/index.mdx | 952 ---- .../rest/namespaces/chat/chat/index.mdx | 50 - .../rest/namespaces/compat/compat/index.mdx | 1272 ----- .../datasphere/datasphere/index.mdx | 116 - .../rest/namespaces/fabric/fabric/index.mdx | 578 --- .../rest/namespaces/logs/logs/index.mdx | 192 - .../phone-numbers/phone-numbers/index.mdx | 236 - .../rest/namespaces/project/project/index.mdx | 112 - .../rest/namespaces/pub-sub/pub-sub/index.mdx | 50 - .../namespaces/registry/registry/index.mdx | 302 -- .../namespaces/resources/resources/index.mdx | 582 --- .../rest/namespaces/video/video/index.mdx | 490 -- .../rest/pagination/pagination/index.mdx | 78 - .../phone-call-handler/index.mdx | 66 - .../rest/rest-client/rest-client/index.mdx | 26 - .../session-manager/session-manager/index.mdx | 242 - .../webhook-middleware/index.mdx | 67 - .../webhook-validator/index.mdx | 124 - .../agent-server/agent-server/index.mdx | 162 - .../api-ninjas-trivia/index.mdx | 78 - .../claude-skills/claude-skills/index.mdx | 94 - .../custom-skills/custom-skills/index.mdx | 78 - .../datasphere-serverless/index.mdx | 110 - .../builtin/datasphere/datasphere/index.mdx | 130 - .../builtin/datetime/datetime/index.mdx | 78 - .../builtin/google-maps/google-maps/index.mdx | 94 - .../info-gatherer/info-gatherer/index.mdx | 94 - .../skills/builtin/joke/joke/index.mdx | 94 - .../skills/builtin/math/math/index.mdx | 78 - .../builtin/mcp-gateway/mcp-gateway/index.mdx | 110 - .../native-vector-search/index.mdx | 94 - .../play-background-file/index.mdx | 78 - .../skills/builtin/spider/spider/index.mdx | 114 - .../swml-transfer/swml-transfer/index.mdx | 94 - .../builtin/weather-api/weather-api/index.mdx | 78 - .../builtin/web-search/web-search/index.mdx | 114 - .../wikipedia-search/index.mdx | 98 - .../skills/skill-base/skill-base/index.mdx | 254 - .../skill-manager/skill-manager/index.mdx | 106 - .../skills/skill-name/skill-name/index.mdx | 151 - .../skill-registry/skill-registry/index.mdx | 146 - .../function-result/function-result/index.mdx | 895 ---- .../join-conference/join-conference/index.mdx | 279 -- .../parameter-schema/index.mdx | 288 -- .../swaig/record-call/record-call/index.mdx | 192 - .../perl/signal-wire/swaig/tap/tap/index.mdx | 190 - .../swml/document/document/index.mdx | 200 - .../signal-wire/swml/schema/schema/index.mdx | 134 - .../swml/service/service/index.mdx | 474 -- fern/products/sdk-reference/php/_meta.json | 2 +- .../contexts/context-builder/index.mdx | 287 ++ .../contexts/contexts/context/index.mdx | 809 ++++ .../contexts/contexts/gather-info/index.mdx | 161 + .../contexts/gather-question/index.mdx | 116 + .../php/agents/contexts/contexts/index.mdx | 30 + .../agents/contexts/contexts/step/index.mdx | 668 +++ .../php/agents/contexts/index.mdx | 26 + .../php/agents/data-map/index.mdx | 601 +++ .../sdk-reference/php/agents/index.mdx | 36 + .../sdk-reference/php/agents/pom/index.mdx | 26 + .../php/agents/pom/pom/index.mdx | 26 + .../pom/pom/prompt-object-model/index.mdx | 331 ++ .../php/agents/pom/pom/section/index.mdx | 261 ++ .../sdk-reference/php/agents/server/index.mdx | 26 + .../server/server/agent-server/index.mdx | 477 ++ .../php/agents/server/server/index.mdx | 20 + .../php/agents/serverless/index.mdx | 26 + .../serverless/serverless/adapter/index.mdx | 259 ++ .../agents/serverless/serverless/index.mdx | 242 + .../builtin/api-ninjas-trivia/index.mdx | 331 ++ .../builtin/builtin/claude-skills/index.mdx | 365 ++ .../builtin/builtin/custom-skills/index.mdx | 331 ++ .../builtin/datasphere-serverless/index.mdx | 331 ++ .../builtin/builtin/datasphere/index.mdx | 346 ++ .../skills/builtin/builtin/datetime/index.mdx | 331 ++ .../builtin/builtin/google-maps/index.mdx | 331 ++ .../agents/skills/builtin/builtin/index.mdx | 74 + .../builtin/builtin/info-gatherer/index.mdx | 331 ++ .../skills/builtin/builtin/joke/index.mdx | 331 ++ .../skills/builtin/builtin/math/index.mdx | 331 ++ .../builtin/builtin/mcp-gateway/index.mdx | 351 ++ .../builtin/native-vector-search/index.mdx | 347 ++ .../builtin/play-background-file/index.mdx | 331 ++ .../skills/builtin/builtin/spider/index.mdx | 346 ++ .../builtin/builtin/swml-transfer/index.mdx | 331 ++ .../builtin/builtin/weather-api/index.mdx | 331 ++ .../builtin/builtin/web-search/index.mdx | 368 ++ .../builtin/wikipedia-search/index.mdx | 343 ++ .../php/agents/skills/builtin/index.mdx | 20 + .../sdk-reference/php/agents/skills/index.mdx | 28 + .../skills/skills/http-helper/index.mdx | 232 + .../php/agents/skills/skills/index.mdx | 200 + .../agents/skills/skills/skill-base/index.mdx | 337 ++ .../skills/skills/skill-manager/index.mdx | 177 + .../skills/skills/skill-registry/index.mdx | 220 + .../sdk-reference/php/agents/swaig/index.mdx | 26 + .../swaig/swaig/function-result/index.mdx | 1674 +++++++ .../php/agents/swaig/swaig/index.mdx | 507 ++ .../swaig/swaig/parameter-schema/index.mdx | 535 +++ .../sdk-reference/php/agents/swml/index.mdx | 26 + .../php/agents/swml/swml/document/index.mdx | 323 ++ .../php/agents/swml/swml/index.mdx | 24 + .../php/agents/swml/swml/schema/index.mdx | 165 + .../php/agents/swml/swml/service/index.mdx | 958 ++++ .../products/sdk-reference/php/core/index.mdx | 22 + .../sdk-reference/php/core/logging/index.mdx | 26 + .../php/core/logging/logging/index.mdx | 142 + .../php/core/logging/logging/logger/index.mdx | 281 ++ .../logging/logging/logging-config/index.mdx | 97 + .../sdk-reference/php/core/security/index.mdx | 26 + .../php/core/security/security/index.mdx | 28 + .../security/session-manager/index.mdx | 249 + .../security/webhook-middleware/index.mdx | 130 + .../security/webhook-validator/index.mdx | 154 + .../sdk-reference/php/core/utils/index.mdx | 26 + .../php/core/utils/utils/index.mdx | 30 + .../core/utils/utils/schema-utils/index.mdx | 345 ++ .../utils/schema-validation-error/index.mdx | 109 + .../core/utils/utils/url-validator/index.mdx | 100 + fern/products/sdk-reference/php/index.mdx | 20 +- .../sdk-reference/php/relay/index.mdx | 18 + .../sdk-reference/php/relay/index__2.mdx | 18 + .../php/relay/relay/action/index.mdx | 409 ++ .../php/relay/relay/ai-action/index.mdx | 404 ++ .../php/relay/relay/call/index.mdx | 1813 ++++++++ .../php/relay/relay/client/index.mdx | 607 +++ .../php/relay/relay/collect-action/index.mdx | 472 ++ .../php/relay/relay/constants/index.mdx | 140 + .../php/relay/relay/detect-action/index.mdx | 424 ++ .../php/relay/relay/device/index.mdx | 211 + .../php/relay/relay/event/index.mdx | 307 ++ .../php/relay/relay/fax-action/index.mdx | 429 ++ .../sdk-reference/php/relay/relay/index.mdx | 782 ++++ .../php/relay/relay/message/index.mdx | 499 ++ .../php/relay/relay/pay-action/index.mdx | 404 ++ .../php/relay/relay/play-action/index.mdx | 460 ++ .../php/relay/relay/record-action/index.mdx | 508 ++ .../php/relay/relay/relay-error/index.mdx | 43 + .../php/relay/relay/stream-action/index.mdx | 404 ++ .../php/relay/relay/tap-action/index.mdx | 404 ++ .../relay/relay/transcribe-action/index.mdx | 404 ++ .../php/relay/relay/web-socket/index.mdx | 240 + .../products/sdk-reference/php/rest/index.mdx | 18 + .../sdk-reference/php/rest/index__2.mdx | 20 + .../php/rest/namespaces/index.mdx | 20 + .../namespaces/namespaces/addresses/index.mdx | 175 + .../namespaces/namespaces/calling/index.mdx | 1303 ++++++ .../namespaces/compat-accounts/index.mdx | 176 + .../namespaces/compat-conferences/index.mdx | 460 ++ .../namespaces/compat-phone-numbers/index.mdx | 376 ++ .../namespaces/compat-recordings/index.mdx | 154 + .../namespaces/compat-tokens/index.mdx | 151 + .../compat-transcriptions/index.mdx | 153 + .../namespaces/namespaces/compat/index.mdx | 357 ++ .../namespaces/conference-logs/index.mdx | 103 + .../namespaces/datasphere/index.mdx | 89 + .../namespaces/fabric-addresses/index.mdx | 127 + .../fabric-generic-resources/index.mdx | 217 + .../namespaces/fabric-tokens/index.mdx | 210 + .../namespaces/namespaces/fabric/index.mdx | 535 +++ .../namespaces/namespaces/fax-logs/index.mdx | 127 + .../namespaces/imported-numbers/index.mdx | 97 + .../php/rest/namespaces/namespaces/index.mdx | 172 + .../rest/namespaces/namespaces/logs/index.mdx | 153 + .../namespaces/message-logs/index.mdx | 127 + .../rest/namespaces/namespaces/mfa/index.mdx | 149 + .../namespaces/project-tokens/index.mdx | 147 + .../namespaces/namespaces/project/index.mdx | 89 + .../namespaces/recordings/index.mdx | 149 + .../namespaces/registry-brands/index.mdx | 215 + .../namespaces/registry-campaigns/index.mdx | 221 + .../namespaces/registry-numbers/index.mdx | 95 + .../namespaces/registry-orders/index.mdx | 95 + .../namespaces/namespaces/registry/index.mdx | 152 + .../namespaces/short-codes/index.mdx | 153 + .../namespaces/sip-profile/index.mdx | 115 + .../video-conference-tokens/index.mdx | 119 + .../video-room-recordings/index.mdx | 187 + .../namespaces/video-room-sessions/index.mdx | 231 + .../namespaces/video-room-tokens/index.mdx | 97 + .../namespaces/video-streams/index.mdx | 147 + .../namespaces/namespaces/video/index.mdx | 213 + .../namespaces/voice-logs/index.mdx | 161 + .../php/rest/rest/base-resource/index.mdx | 97 + .../php/rest/rest/crud-resource/index.mdx | 262 ++ .../rest/rest/crud-with-addresses/index.mdx | 298 ++ .../php/rest/rest/http-client/index.mdx | 344 ++ .../sdk-reference/php/rest/rest/index.mdx | 46 + .../rest/rest/paginated-iterator/index.mdx | 307 ++ .../php/rest/rest/rest-client/index.mdx | 637 +++ .../rest/signal-wire-rest-error/index.mdx | 123 + .../contexts/context-builder/index.mdx | 287 -- .../contexts/contexts/context/index.mdx | 809 ---- .../contexts/contexts/gather-info/index.mdx | 161 - .../contexts/gather-question/index.mdx | 116 - .../signal-wire/contexts/contexts/index.mdx | 35 - .../contexts/contexts/step/index.mdx | 668 --- .../signal-wire/data-map/data-map/index.mdx | 600 --- .../php/signal-wire/logging/logging/index.mdx | 147 - .../logging/logging/logger/index.mdx | 281 -- .../logging/logging/logging-config/index.mdx | 97 - .../php/signal-wire/pom/pom/index.mdx | 31 - .../pom/pom/prompt-object-model/index.mdx | 331 -- .../php/signal-wire/pom/pom/section/index.mdx | 261 -- .../signal-wire/relay/relay/action/index.mdx | 409 -- .../relay/relay/ai-action/index.mdx | 404 -- .../signal-wire/relay/relay/call/index.mdx | 1813 -------- .../signal-wire/relay/relay/client/index.mdx | 607 --- .../relay/relay/collect-action/index.mdx | 472 -- .../relay/relay/constants/index.mdx | 140 - .../relay/relay/detect-action/index.mdx | 424 -- .../signal-wire/relay/relay/device/index.mdx | 211 - .../signal-wire/relay/relay/event/index.mdx | 307 -- .../relay/relay/fax-action/index.mdx | 429 -- .../php/signal-wire/relay/relay/index.mdx | 787 ---- .../signal-wire/relay/relay/message/index.mdx | 499 -- .../relay/relay/pay-action/index.mdx | 404 -- .../relay/relay/play-action/index.mdx | 460 -- .../relay/relay/record-action/index.mdx | 508 -- .../relay/relay/relay-error/index.mdx | 43 - .../relay/relay/stream-action/index.mdx | 404 -- .../relay/relay/tap-action/index.mdx | 404 -- .../relay/relay/transcribe-action/index.mdx | 404 -- .../relay/relay/web-socket/index.mdx | 240 - .../namespaces/namespaces/addresses/index.mdx | 175 - .../namespaces/namespaces/calling/index.mdx | 1303 ------ .../namespaces/compat-accounts/index.mdx | 176 - .../namespaces/compat-conferences/index.mdx | 460 -- .../namespaces/compat-phone-numbers/index.mdx | 376 -- .../namespaces/compat-recordings/index.mdx | 154 - .../namespaces/compat-tokens/index.mdx | 151 - .../compat-transcriptions/index.mdx | 153 - .../namespaces/namespaces/compat/index.mdx | 357 -- .../namespaces/conference-logs/index.mdx | 103 - .../namespaces/datasphere/index.mdx | 89 - .../namespaces/fabric-addresses/index.mdx | 127 - .../fabric-generic-resources/index.mdx | 217 - .../namespaces/fabric-tokens/index.mdx | 210 - .../namespaces/namespaces/fabric/index.mdx | 535 --- .../namespaces/namespaces/fax-logs/index.mdx | 127 - .../namespaces/imported-numbers/index.mdx | 97 - .../rest/namespaces/namespaces/index.mdx | 171 - .../rest/namespaces/namespaces/logs/index.mdx | 153 - .../namespaces/message-logs/index.mdx | 127 - .../rest/namespaces/namespaces/mfa/index.mdx | 149 - .../namespaces/project-tokens/index.mdx | 147 - .../namespaces/namespaces/project/index.mdx | 89 - .../namespaces/recordings/index.mdx | 149 - .../namespaces/registry-brands/index.mdx | 215 - .../namespaces/registry-campaigns/index.mdx | 221 - .../namespaces/registry-numbers/index.mdx | 95 - .../namespaces/registry-orders/index.mdx | 95 - .../namespaces/namespaces/registry/index.mdx | 152 - .../namespaces/short-codes/index.mdx | 153 - .../namespaces/sip-profile/index.mdx | 115 - .../video-conference-tokens/index.mdx | 119 - .../video-room-recordings/index.mdx | 187 - .../namespaces/video-room-sessions/index.mdx | 231 - .../namespaces/video-room-tokens/index.mdx | 97 - .../namespaces/video-streams/index.mdx | 147 - .../namespaces/namespaces/video/index.mdx | 213 - .../namespaces/voice-logs/index.mdx | 161 - .../rest/rest/base-resource/index.mdx | 97 - .../rest/rest/crud-resource/index.mdx | 262 -- .../rest/rest/crud-with-addresses/index.mdx | 298 -- .../rest/rest/http-client/index.mdx | 344 -- .../php/signal-wire/rest/rest/index.mdx | 51 - .../rest/rest/paginated-iterator/index.mdx | 307 -- .../rest/rest/rest-client/index.mdx | 637 --- .../rest/signal-wire-rest-error/index.mdx | 123 - .../signal-wire/security/security/index.mdx | 33 - .../security/session-manager/index.mdx | 249 - .../security/webhook-middleware/index.mdx | 130 - .../security/webhook-validator/index.mdx | 154 - .../server/server/agent-server/index.mdx | 477 -- .../php/signal-wire/server/server/index.mdx | 25 - .../serverless/serverless/adapter/index.mdx | 259 -- .../serverless/serverless/index.mdx | 247 - .../builtin/api-ninjas-trivia/index.mdx | 331 -- .../builtin/builtin/claude-skills/index.mdx | 365 -- .../builtin/builtin/custom-skills/index.mdx | 331 -- .../builtin/datasphere-serverless/index.mdx | 331 -- .../builtin/builtin/datasphere/index.mdx | 346 -- .../skills/builtin/builtin/datetime/index.mdx | 331 -- .../builtin/builtin/google-maps/index.mdx | 331 -- .../skills/builtin/builtin/index.mdx | 73 - .../builtin/builtin/info-gatherer/index.mdx | 331 -- .../skills/builtin/builtin/joke/index.mdx | 331 -- .../skills/builtin/builtin/math/index.mdx | 331 -- .../builtin/builtin/mcp-gateway/index.mdx | 351 -- .../builtin/native-vector-search/index.mdx | 347 -- .../builtin/play-background-file/index.mdx | 331 -- .../skills/builtin/builtin/spider/index.mdx | 346 -- .../builtin/builtin/swml-transfer/index.mdx | 331 -- .../builtin/builtin/weather-api/index.mdx | 331 -- .../builtin/builtin/web-search/index.mdx | 368 -- .../builtin/wikipedia-search/index.mdx | 343 -- .../skills/skills/http-helper/index.mdx | 232 - .../php/signal-wire/skills/skills/index.mdx | 205 - .../skills/skills/skill-base/index.mdx | 337 -- .../skills/skills/skill-manager/index.mdx | 177 - .../skills/skills/skill-registry/index.mdx | 220 - .../swaig/swaig/function-result/index.mdx | 1674 ------- .../php/signal-wire/swaig/swaig/index.mdx | 512 --- .../swaig/swaig/parameter-schema/index.mdx | 535 --- .../signal-wire/swml/swml/document/index.mdx | 323 -- .../php/signal-wire/swml/swml/index.mdx | 29 - .../signal-wire/swml/swml/schema/index.mdx | 165 - .../signal-wire/swml/swml/service/index.mdx | 958 ---- .../php/signal-wire/utils/utils/index.mdx | 35 - .../utils/utils/schema-utils/index.mdx | 345 -- .../utils/schema-validation-error/index.mdx | 109 - .../utils/utils/url-validator/index.mdx | 100 - fern/products/sdk-reference/python/_meta.json | 2 +- .../python/agents/agent-base/index.mdx | 36 + .../python/agents/agent-base/index__2.mdx | 779 ++++ .../agent-server/add-security-headers.mdx | 4 +- .../python/agents/agent-server/index.mdx | 32 + .../python/agents/agent-server/index__2.mdx | 403 ++ .../python/agents/agent/config/index.mdx | 36 + .../agent/deployment/handlers/index.mdx | 32 + .../python/agents/agent/deployment/index.mdx | 40 + .../python/agents/agent/index.mdx | 68 + .../python/agents/agent/prompt/index.mdx | 44 + .../agents/agent/prompt/manager/index.mdx | 44 + .../prompt/manager/prompt-manager/index.mdx | 434 ++ .../python/agents/agent/routing/index.mdx | 32 + .../python/agents/agent/security/index.mdx | 32 + .../python/agents/agent/swml/index.mdx | 32 + .../agents/agent/tools/decorator/index.mdx | 44 + .../tools/decorator/tool-decorator/index.mdx | 85 + .../python/agents/agent/tools/index.mdx | 52 + .../agents/agent/tools/registry/index.mdx | 44 + .../tools/registry/tool-registry/index.mdx | 309 ++ .../agent/tools/type-inference/index.mdx | 99 + .../python/agents/auth-handler/index.mdx | 36 + .../python/agents/auth-handler/index__2.mdx | 220 + .../python/agents/cli/build-search/index.mdx | 140 + .../python/agents/cli/config/index.mdx | 80 + .../agents/cli/core/agent-loader/index.mdx | 186 + .../custom-argument-parser/index.mdx | 123 + .../cli/core/argparse-helpers/index.mdx | 75 + .../agents/cli/core/dynamic-config/index.mdx | 72 + .../python/agents/cli/core/index.mdx | 52 + .../agents/cli/core/service-loader/index.mdx | 218 + .../service-loader/service-capture/index.mdx | 83 + .../python/agents/cli/dokku/colors/index.mdx | 47 + .../dokku/dokku-project-generator/index.mdx | 85 + .../python/agents/cli/dokku/index.mdx | 390 ++ .../cli/execution/datamap-exec/index.mdx | 111 + .../python/agents/cli/execution/index.mdx | 44 + .../cli/execution/webhook-exec/index.mdx | 83 + .../sdk-reference/python/agents/cli/index.mdx | 84 + .../agents/cli/init-project/colors/index.mdx | 45 + .../python/agents/cli/init-project/index.mdx | 558 +++ .../init-project/project-generator/index.mdx | 87 + .../python/agents/cli/output/index.mdx | 44 + .../cli/output/output-formatter/index.mdx | 92 + .../agents/cli/output/swml-dump/index.mdx | 86 + .../cli/simulation/data-generation/index.mdx | 275 ++ .../cli/simulation/data-overrides/index.mdx | 171 + .../python/agents/cli/simulation/index.mdx | 48 + .../agents/cli/simulation/mock-env/index.mdx | 122 + .../mock-env/mock-headers/index.mdx | 171 + .../mock-env/mock-query-params/index.mdx | 171 + .../mock-env/mock-request/index.mdx | 141 + .../simulation/mock-env/mock-url/index.mdx | 75 + .../mock-env/serverless-simulator/index.mdx | 155 + .../agents/cli/swaig-test-wrapper/index.mdx | 50 + .../python/agents/cli/test-swaig/index.mdx | 104 + .../agents/cli/types/agent-info/index.mdx | 43 + .../agents/cli/types/call-data/index.mdx | 65 + .../cli/types/data-map-config/index.mdx | 43 + .../agents/cli/types/function-info/index.mdx | 45 + .../python/agents/cli/types/index.mdx | 60 + .../agents/cli/types/post-data/index.mdx | 57 + .../agents/cli/types/vars-data/index.mdx | 41 + .../python/agents/config-loader/index.mdx | 36 + .../python/agents/config-loader/index__2.mdx | 293 ++ .../agents/contexts/context-builder/index.mdx | 240 + .../python/agents/contexts/context/index.mdx | 816 ++++ .../agents/contexts/gather-info/index.mdx | 117 + .../agents/contexts/gather-question/index.mdx | 102 + .../python/agents/contexts/index.mdx | 92 + .../python/agents/contexts/step/index.mdx | 714 +++ .../python/agents/data-map/index.mdx | 137 + .../python/agents/data-map/index__2.mdx | 660 +++ .../python/agents/function-result/index.mdx | 36 + .../agents/function-result/index__2.mdx | 2253 +++++++++ .../python/agents/gateway-service/index.mdx | 22 + .../gateway-service/mcp-gateway/index.mdx | 105 + .../mcp-gateway/set-security-headers.mdx | 4 +- .../sdk-reference/python/agents/index.mdx | 176 + .../agents/livewire/agent-handoff/index.mdx | 57 + .../agents/livewire/agent-server/index.mdx | 90 + .../agents/livewire/agent-session/index.mdx | 211 + .../python/agents/livewire/agent/index.mdx | 285 ++ .../agents/livewire/chat-context/index.mdx | 71 + .../python/agents/livewire/index.mdx | 179 + .../agents/livewire/inference-llm/index.mdx | 55 + .../agents/livewire/inference-stt/index.mdx | 55 + .../agents/livewire/inference-tts/index.mdx | 55 + .../agents/livewire/job-context/index.mdx | 96 + .../agents/livewire/job-process/index.mdx | 49 + .../livewire/plugins/cartesia-tts/index.mdx | 49 + .../livewire/plugins/deepgram-stt/index.mdx | 49 + .../plugins/eleven-labs-tts/index.mdx | 49 + .../python/agents/livewire/plugins/index.mdx | 56 + .../livewire/plugins/open-aillm/index.mdx | 53 + .../livewire/plugins/silero-vad/index.mdx | 70 + .../python/agents/livewire/room/index.mdx | 33 + .../agents/livewire/run-context/index.mdx | 63 + .../agents/livewire/stop-response/index.mdx | 33 + .../agents/livewire/tool-error/index.mdx | 33 + .../mcp-gateway/gateway-service/index.mdx | 54 + .../python/agents/mcp-gateway/index.mdx | 52 + .../agents/mcp-gateway/mcp-manager/index.mdx | 52 + .../mcp-manager/mcp-client/index.mdx | 191 + .../mcp-manager/mcp-manager/index.mdx | 199 + .../mcp-manager/mcp-service/index.mdx | 113 + .../mcp-gateway/session-manager/index.mdx | 48 + .../session-manager/session-manager/index.mdx | 227 + .../session-manager/session/index.mdx | 117 + .../ai-config-mixin/ai-config-mixin/index.mdx | 963 ++++ .../agents/mixins/ai-config-mixin/index.mdx | 40 + .../mixins/auth-mixin/auth-mixin/index.mdx | 93 + .../python/agents/mixins/auth-mixin/index.mdx | 40 + .../python/agents/mixins/index.mdx | 76 + .../agents/mixins/mcp-server-mixin/index.mdx | 44 + .../mcp-server-mixin/index.mdx | 29 + .../agents/mixins/prompt-mixin/index.mdx | 40 + .../prompt-mixin/prompt-mixin/index.mdx | 414 ++ .../agents/mixins/serverless-mixin/index.mdx | 44 + .../serverless-mixin/index.mdx | 65 + .../agents/mixins/skill-mixin/index.mdx | 40 + .../mixins/skill-mixin/skill-mixin/index.mdx | 139 + .../agents/mixins/state-mixin/index.mdx | 40 + .../mixins/state-mixin/state-mixin/index.mdx | 65 + .../python/agents/mixins/tool-mixin/index.mdx | 40 + .../mixins/tool-mixin/tool-mixin/index.mdx | 309 ++ .../python/agents/mixins/web-mixin/index.mdx | 44 + .../mixins/web-mixin/web-mixin/index.mdx | 405 ++ .../python/agents/pom-builder/index.mdx | 32 + .../python/agents/pom-builder/index__2.mdx | 381 ++ .../sdk-reference/python/agents/pom/index.mdx | 46 + .../python/agents/pom/index__2.mdx | 25 + .../python/agents/pom/pom-tool/index.mdx | 123 + .../python/agents/pom/pom/index.mdx | 26 + .../pom/pom/prompt-object-model/index.mdx | 364 ++ .../python/agents/pom/pom/section/index.mdx | 277 ++ .../concierge/concierge-agent/index.mdx | 210 + .../python/agents/prefabs/concierge/index.mdx | 40 + .../prefabs/faq-bot/faq-bot-agent/index.mdx | 168 + .../python/agents/prefabs/faq-bot/index.mdx | 40 + .../python/agents/prefabs/index.mdx | 60 + .../agents/prefabs/info-gatherer/index.mdx | 40 + .../info-gatherer-agent/index.mdx | 222 + .../agents/prefabs/receptionist/index.mdx | 40 + .../receptionist/receptionist-agent/index.mdx | 122 + .../python/agents/prefabs/survey/index.mdx | 40 + .../prefabs/survey/survey-agent/index.mdx | 225 + .../document-processor/index.mdx | 151 + .../search/document-processor/index.mdx | 49 + .../search/document-processor/index__2.mdx | 44 + .../index-builder/index-builder/index.mdx | 271 ++ .../agents/search/index-builder/index.mdx | 49 + .../agents/search/index-builder/index__2.mdx | 44 + .../python/agents/search/index.mdx | 128 + .../python/agents/search/migration/index.mdx | 44 + .../migration/search-index-migrator/index.mdx | 180 + .../python/agents/search/models/index.mdx | 66 + .../agents/search/pgvector-backend/index.mdx | 52 + .../pg-vector-backend/index.mdx | 211 + .../pg-vector-search-backend/index.mdx | 230 + .../agents/search/query-processor/index.mdx | 362 ++ .../agents/search/search-engine/index.mdx | 49 + .../agents/search/search-engine/index__2.mdx | 46 + .../search-engine/search-engine/index.mdx | 180 + .../agents/search/search-service/index.mdx | 49 + .../agents/search/search-service/index__2.mdx | 50 + .../search-service/search-request/index.mdx | 78 + .../search-service/search-response/index.mdx | 58 + .../search-service/search-result/index.mdx | 59 + .../search-service/search-service/index.mdx | 186 + .../python/agents/skill-base/index.mdx | 32 + .../python/agents/skill-base/index__2.mdx | 436 ++ .../python/agents/skill-manager/index.mdx | 32 + .../python/agents/skill-manager/index__2.mdx | 203 + .../agents/skills/api-ninjas-trivia/index.mdx | 44 + .../skill/api-ninjas-trivia-skill/index.mdx | 227 + .../skills/api-ninjas-trivia/skill/index.mdx | 40 + .../agents/skills/claude-skills/index.mdx | 40 + .../skill/claude-skills-skill/index.mdx | 182 + .../skills/claude-skills/skill/index.mdx | 44 + .../skills/datasphere-serverless/index.mdx | 40 + .../data-sphere-serverless-skill/index.mdx | 206 + .../datasphere-serverless/skill/index.mdx | 40 + .../python/agents/skills/datasphere/index.mdx | 44 + .../skill/data-sphere-skill/index.mdx | 228 + .../agents/skills/datasphere/skill/index.mdx | 40 + .../python/agents/skills/datetime/index.mdx | 40 + .../datetime/skill/date-time-skill/index.mdx | 161 + .../agents/skills/datetime/skill/index.mdx | 40 + .../agents/skills/google-maps/index.mdx | 35 + .../skill/google-maps-client/index.mdx | 118 + .../skill/google-maps-skill/index.mdx | 158 + .../agents/skills/google-maps/skill/index.mdx | 46 + .../python/agents/skills/index.mdx | 112 + .../agents/skills/info-gatherer/index.mdx | 40 + .../skills/info-gatherer/skill/index.mdx | 40 + .../skill/info-gatherer-skill/index.mdx | 155 + .../python/agents/skills/joke/index.mdx | 40 + .../python/agents/skills/joke/skill/index.mdx | 40 + .../skills/joke/skill/joke-skill/index.mdx | 180 + .../python/agents/skills/math/index.mdx | 40 + .../python/agents/skills/math/skill/index.mdx | 40 + .../skills/math/skill/math-skill/index.mdx | 161 + .../agents/skills/mcp-gateway/index.mdx | 40 + .../agents/skills/mcp-gateway/skill/index.mdx | 44 + .../skill/mcp-gateway-skill/index.mdx | 183 + .../skills/native-vector-search/index.mdx | 40 + .../native-vector-search/skill/index.mdx | 40 + .../native-vector-search-skill/index.mdx | 234 + .../skills/play-background-file/index.mdx | 44 + .../play-background-file/skill/index.mdx | 40 + .../play-background-file-skill/index.mdx | 207 + .../python/agents/skills/registry/index.mdx | 44 + .../skills/registry/skill-registry/index.mdx | 276 ++ .../python/agents/skills/spider/index.mdx | 44 + .../agents/skills/spider/skill/index.mdx | 40 + .../spider/skill/spider-skill/index.mdx | 238 + .../agents/skills/swml-transfer/index.mdx | 40 + .../skills/swml-transfer/skill/index.mdx | 40 + .../skill/swml-transfer-skill/index.mdx | 184 + .../agents/skills/weather-api/index.mdx | 44 + .../agents/skills/weather-api/skill/index.mdx | 40 + .../skill/weather-api-skill/index.mdx | 184 + .../python/agents/skills/web-search/index.mdx | 48 + .../google-search-scraper/index.mdx | 205 + .../web-search/skill-improved/index.mdx | 44 + .../skill-improved/web-search-skill/index.mdx | 204 + .../google-search-scraper/index.mdx | 164 + .../web-search/skill-original/index.mdx | 44 + .../skill-original/web-search-skill/index.mdx | 209 + .../skill/google-search-scraper/index.mdx | 319 ++ .../agents/skills/web-search/skill/index.mdx | 44 + .../skill/web-search-skill/index.mdx | 204 + .../agents/skills/wikipedia-search/index.mdx | 44 + .../skills/wikipedia-search/skill/index.mdx | 40 + .../skill/wikipedia-search-skill/index.mdx | 191 + .../python/agents/swaig-function/index.mdx | 32 + .../python/agents/swaig-function/index__2.mdx | 302 ++ .../python/agents/swml-builder/index.mdx | 36 + .../python/agents/swml-builder/index__2.mdx | 414 ++ .../swml-handler/ai-verb-handler/index.mdx | 144 + .../python/agents/swml-handler/index.mdx | 48 + .../swml-handler/swml-verb-handler/index.mdx | 119 + .../verb-handler-registry/index.mdx | 134 + .../python/agents/swml-renderer/index.mdx | 32 + .../python/agents/swml-renderer/index__2.mdx | 182 + .../python/agents/swml-service/index.mdx | 40 + .../python/agents/swml-service/index__2.mdx | 639 +++ .../sdk-reference/python/agents/web/index.mdx | 44 + .../python/agents/web/web-service/index.mdx | 44 + .../web/web-service/web-service/index.mdx | 234 + .../sdk-reference/python/core/index.mdx | 40 + .../python/core/logging-config/index.mdx | 154 + .../python/core/security-config/index.mdx | 38 + .../python/core/security-config/index__2.mdx | 310 ++ .../python/core/security/index.mdx | 52 + .../core/security/session-manager/index.mdx | 40 + .../session-manager/session-manager/index.mdx | 370 ++ .../security/webhook-middleware/index.mdx | 140 + .../core/security/webhook-validator/index.mdx | 154 + .../sdk-reference/python/core/utils/index.mdx | 82 + .../python/core/utils/pom-utils/index.mdx | 32 + .../python/core/utils/schema-utils/index.mdx | 48 + .../utils/schema-utils/schema-utils/index.mdx | 321 ++ .../schema-validation-error/index.mdx | 61 + .../core/utils/token-generators/index.mdx | 32 + .../python/core/utils/url-validator/index.mdx | 68 + .../python/core/utils/validators/index.mdx | 32 + fern/products/sdk-reference/python/index.mdx | 4 + .../python/relay/call/action/index.mdx | 103 + .../python/relay/call/ai-action/index.mdx | 77 + .../relay/call/collect-action/index.mdx | 127 + .../python/relay/call/detect-action/index.mdx | 77 + .../python/relay/call/fax-action/index.mdx | 79 + .../sdk-reference/python/relay/call/index.mdx | 2292 ++++++++++ .../python/relay/call/index__2.mdx | 66 + .../python/relay/call/pay-action/index.mdx | 77 + .../python/relay/call/play-action/index.mdx | 147 + .../python/relay/call/record-action/index.mdx | 125 + .../call/standalone-collect-action/index.mdx | 101 + .../python/relay/call/stream-action/index.mdx | 77 + .../python/relay/call/tap-action/index.mdx | 77 + .../relay/call/transcribe-action/index.mdx | 77 + .../python/relay/client/index.mdx | 65 + .../relay/client/relay-client/index.mdx | 526 +++ .../python/relay/client/relay-error/index.mdx | 61 + .../python/relay/constants/index.mdx | 183 + .../relay/event/call-receive-event/index.mdx | 139 + .../relay/event/call-state-event/index.mdx | 119 + .../relay/event/calling-error-event/index.mdx | 109 + .../relay/event/collect-event/index.mdx | 119 + .../relay/event/conference-event/index.mdx | 114 + .../relay/event/connect-event/index.mdx | 109 + .../relay/event/denoise-event/index.mdx | 104 + .../python/relay/event/detect-event/index.mdx | 109 + .../python/relay/event/dial-event/index.mdx | 114 + .../python/relay/event/echo-event/index.mdx | 104 + .../python/relay/event/fax-event/index.mdx | 109 + .../python/relay/event/hold-event/index.mdx | 104 + .../python/relay/event/index.mdx | 160 + .../event/message-receive-event/index.mdx | 149 + .../relay/event/message-state-event/index.mdx | 154 + .../python/relay/event/pay-event/index.mdx | 109 + .../python/relay/event/play-event/index.mdx | 109 + .../python/relay/event/queue-event/index.mdx | 129 + .../python/relay/event/record-event/index.mdx | 129 + .../python/relay/event/refer-event/index.mdx | 119 + .../python/relay/event/relay-event/index.mdx | 103 + .../relay/event/send-digits-event/index.mdx | 109 + .../python/relay/event/stream-event/index.mdx | 119 + .../python/relay/event/tap-event/index.mdx | 119 + .../relay/event/transcribe-event/index.mdx | 129 + .../sdk-reference/python/relay/index.mdx | 59 + .../python/relay/message/index.mdx | 196 + .../python/rest/call-handler/index.mdx | 40 + .../call-handler/phone-call-handler/index.mdx | 80 + .../python/rest/client/index.mdx | 40 + .../python/rest/client/rest-client/index.mdx | 133 + .../sdk-reference/python/rest/index.mdx | 50 + .../addresses/addresses-resource/index.mdx | 133 + .../rest/namespaces/addresses/index.mdx | 40 + .../calling/calling-namespace/index.mdx | 863 ++++ .../python/rest/namespaces/calling/index.mdx | 40 + .../namespaces/chat/chat-resource/index.mdx | 73 + .../python/rest/namespaces/chat/index.mdx | 40 + .../compat/compat-accounts/index.mdx | 135 + .../compat/compat-applications/index.mdx | 55 + .../namespaces/compat/compat-calls/index.mdx | 147 + .../compat/compat-conferences/index.mdx | 321 ++ .../namespaces/compat/compat-faxes/index.mdx | 121 + .../compat/compat-laml-bins/index.mdx | 55 + .../compat/compat-messages/index.mdx | 121 + .../compat/compat-namespace/index.mdx | 77 + .../compat/compat-phone-numbers/index.mdx | 241 + .../namespaces/compat/compat-queues/index.mdx | 123 + .../compat/compat-recordings/index.mdx | 93 + .../namespaces/compat/compat-tokens/index.mdx | 95 + .../compat/compat-transcriptions/index.mdx | 93 + .../python/rest/namespaces/compat/index.mdx | 88 + .../datasphere/datasphere-documents/index.mdx | 139 + .../datasphere/datasphere-namespace/index.mdx | 53 + .../rest/namespaces/datasphere/index.mdx | 44 + .../auto-materialized-webhook/index.mdx | 59 + .../fabric/call-flows-resource/index.mdx | 101 + .../conference-rooms-resource/index.mdx | 55 + .../cxml-applications-resource/index.mdx | 53 + .../fabric/cxml-webhooks-resource/index.mdx | 31 + .../fabric/fabric-addresses/index.mdx | 73 + .../fabric/fabric-namespace/index.mdx | 83 + .../fabric/fabric-resource-put/index.mdx | 33 + .../fabric/fabric-resource/index.mdx | 33 + .../namespaces/fabric/fabric-tokens/index.mdx | 153 + .../fabric/generic-resources/index.mdx | 169 + .../python/rest/namespaces/fabric/index.mdx | 84 + .../fabric/subscribers-resource/index.mdx | 145 + .../fabric/swml-webhooks-resource/index.mdx | 31 + .../imported-numbers-resource/index.mdx | 73 + .../namespaces/imported-numbers/index.mdx | 40 + .../python/rest/namespaces/index.mdx | 120 + .../namespaces/logs/conference-logs/index.mdx | 53 + .../rest/namespaces/logs/fax-logs/index.mdx | 73 + .../python/rest/namespaces/logs/index.mdx | 56 + .../namespaces/logs/logs-namespace/index.mdx | 59 + .../namespaces/logs/message-logs/index.mdx | 73 + .../rest/namespaces/logs/voice-logs/index.mdx | 95 + .../python/rest/namespaces/lookup/index.mdx | 40 + .../lookup/lookup-resource/index.mdx | 75 + .../python/rest/namespaces/mfa/index.mdx | 40 + .../namespaces/mfa/mfa-resource/index.mdx | 115 + .../rest/namespaces/number-groups/index.mdx | 40 + .../number-groups-resource/index.mdx | 137 + .../rest/namespaces/phone-numbers/index.mdx | 40 + .../phone-numbers-resource/index.mdx | 330 ++ .../python/rest/namespaces/project/index.mdx | 44 + .../project/project-namespace/index.mdx | 53 + .../project/project-tokens/index.mdx | 115 + .../python/rest/namespaces/pubsub/index.mdx | 40 + .../pubsub/pub-sub-resource/index.mdx | 73 + .../python/rest/namespaces/queues/index.mdx | 40 + .../queues/queues-resource/index.mdx | 117 + .../rest/namespaces/recordings/index.mdx | 40 + .../recordings/recordings-resource/index.mdx | 113 + .../python/rest/namespaces/registry/index.mdx | 56 + .../registry/registry-brands/index.mdx | 137 + .../registry/registry-campaigns/index.mdx | 141 + .../registry/registry-namespace/index.mdx | 59 + .../registry/registry-numbers/index.mdx | 53 + .../registry/registry-orders/index.mdx | 53 + .../rest/namespaces/short-codes/index.mdx | 40 + .../short-codes-resource/index.mdx | 115 + .../rest/namespaces/sip-profile/index.mdx | 40 + .../sip-profile-resource/index.mdx | 89 + .../namespaces/verified-callers/index.mdx | 40 + .../verified-callers-resource/index.mdx | 95 + .../python/rest/namespaces/video/index.mdx | 68 + .../video/video-conference-tokens/index.mdx | 73 + .../video/video-conferences/index.mdx | 99 + .../video/video-namespace/index.mdx | 65 + .../video/video-room-recordings/index.mdx | 115 + .../video/video-room-sessions/index.mdx | 139 + .../video/video-room-tokens/index.mdx | 53 + .../namespaces/video/video-rooms/index.mdx | 77 + .../namespaces/video/video-streams/index.mdx | 95 + .../agent-server/agent-server/index.mdx | 403 -- .../python/signalwire/agent-server/index.mdx | 40 - .../signalwire/cli/build-search/index.mdx | 140 - .../python/signalwire/cli/config/index.mdx | 80 - .../cli/core/agent-loader/index.mdx | 186 - .../custom-argument-parser/index.mdx | 123 - .../cli/core/argparse-helpers/index.mdx | 75 - .../cli/core/dynamic-config/index.mdx | 72 - .../python/signalwire/cli/core/index.mdx | 52 - .../cli/core/service-loader/index.mdx | 218 - .../service-loader/service-capture/index.mdx | 83 - .../signalwire/cli/dokku/colors/index.mdx | 47 - .../dokku/dokku-project-generator/index.mdx | 85 - .../python/signalwire/cli/dokku/index.mdx | 390 -- .../cli/execution/datamap-exec/index.mdx | 111 - .../python/signalwire/cli/execution/index.mdx | 44 - .../cli/execution/webhook-exec/index.mdx | 83 - .../python/signalwire/cli/index.mdx | 84 - .../cli/init-project/colors/index.mdx | 45 - .../signalwire/cli/init-project/index.mdx | 558 --- .../init-project/project-generator/index.mdx | 87 - .../python/signalwire/cli/output/index.mdx | 44 - .../cli/output/output-formatter/index.mdx | 92 - .../signalwire/cli/output/swml-dump/index.mdx | 86 - .../cli/simulation/data-generation/index.mdx | 275 -- .../cli/simulation/data-overrides/index.mdx | 171 - .../signalwire/cli/simulation/index.mdx | 48 - .../cli/simulation/mock-env/index.mdx | 122 - .../mock-env/mock-headers/index.mdx | 171 - .../mock-env/mock-query-params/index.mdx | 171 - .../mock-env/mock-request/index.mdx | 141 - .../simulation/mock-env/mock-url/index.mdx | 75 - .../mock-env/serverless-simulator/index.mdx | 155 - .../cli/swaig-test-wrapper/index.mdx | 50 - .../signalwire/cli/test-swaig/index.mdx | 104 - .../signalwire/cli/types/agent-info/index.mdx | 43 - .../signalwire/cli/types/call-data/index.mdx | 65 - .../cli/types/data-map-config/index.mdx | 43 - .../cli/types/function-info/index.mdx | 45 - .../python/signalwire/cli/types/index.mdx | 60 - .../signalwire/cli/types/post-data/index.mdx | 57 - .../signalwire/cli/types/vars-data/index.mdx | 41 - .../core/agent-base/agent-base/index.mdx | 779 ---- .../signalwire/core/agent-base/index.mdx | 44 - .../signalwire/core/agent/config/index.mdx | 36 - .../core/agent/deployment/handlers/index.mdx | 32 - .../core/agent/deployment/index.mdx | 40 - .../python/signalwire/core/agent/index.mdx | 68 - .../signalwire/core/agent/prompt/index.mdx | 44 - .../core/agent/prompt/manager/index.mdx | 44 - .../prompt/manager/prompt-manager/index.mdx | 434 -- .../signalwire/core/agent/routing/index.mdx | 32 - .../signalwire/core/agent/security/index.mdx | 32 - .../signalwire/core/agent/swml/index.mdx | 32 - .../core/agent/tools/decorator/index.mdx | 44 - .../tools/decorator/tool-decorator/index.mdx | 85 - .../signalwire/core/agent/tools/index.mdx | 52 - .../core/agent/tools/registry/index.mdx | 44 - .../tools/registry/tool-registry/index.mdx | 309 -- .../core/agent/tools/type-inference/index.mdx | 99 - .../core/auth-handler/auth-handler/index.mdx | 220 - .../signalwire/core/auth-handler/index.mdx | 44 - .../config-loader/config-loader/index.mdx | 293 -- .../signalwire/core/config-loader/index.mdx | 44 - .../core/contexts/context-builder/index.mdx | 240 - .../core/contexts/context/index.mdx | 816 ---- .../core/contexts/gather-info/index.mdx | 117 - .../core/contexts/gather-question/index.mdx | 102 - .../python/signalwire/core/contexts/index.mdx | 92 - .../signalwire/core/contexts/step/index.mdx | 714 --- .../core/data-map/data-map/index.mdx | 660 --- .../python/signalwire/core/data-map/index.mdx | 145 - .../function-result/function-result/index.mdx | 2253 --------- .../signalwire/core/function-result/index.mdx | 44 - .../python/signalwire/core/index.mdx | 80 - .../signalwire/core/logging-config/index.mdx | 154 - .../ai-config-mixin/ai-config-mixin/index.mdx | 963 ---- .../core/mixins/ai-config-mixin/index.mdx | 40 - .../mixins/auth-mixin/auth-mixin/index.mdx | 93 - .../core/mixins/auth-mixin/index.mdx | 40 - .../python/signalwire/core/mixins/index.mdx | 76 - .../core/mixins/mcp-server-mixin/index.mdx | 44 - .../mcp-server-mixin/index.mdx | 29 - .../core/mixins/prompt-mixin/index.mdx | 40 - .../prompt-mixin/prompt-mixin/index.mdx | 414 -- .../core/mixins/serverless-mixin/index.mdx | 44 - .../serverless-mixin/index.mdx | 65 - .../core/mixins/skill-mixin/index.mdx | 40 - .../mixins/skill-mixin/skill-mixin/index.mdx | 139 - .../core/mixins/state-mixin/index.mdx | 40 - .../mixins/state-mixin/state-mixin/index.mdx | 65 - .../core/mixins/tool-mixin/index.mdx | 40 - .../mixins/tool-mixin/tool-mixin/index.mdx | 309 -- .../core/mixins/web-mixin/index.mdx | 44 - .../core/mixins/web-mixin/web-mixin/index.mdx | 405 -- .../signalwire/core/pom-builder/index.mdx | 40 - .../core/pom-builder/pom-builder/index.mdx | 381 -- .../signalwire/core/security-config/index.mdx | 46 - .../security-config/security-config/index.mdx | 310 -- .../python/signalwire/core/security/index.mdx | 52 - .../core/security/session-manager/index.mdx | 40 - .../session-manager/session-manager/index.mdx | 370 -- .../security/webhook-middleware/index.mdx | 140 - .../core/security/webhook-validator/index.mdx | 154 - .../signalwire/core/skill-base/index.mdx | 40 - .../core/skill-base/skill-base/index.mdx | 436 -- .../signalwire/core/skill-manager/index.mdx | 40 - .../skill-manager/skill-manager/index.mdx | 203 - .../signalwire/core/swaig-function/index.mdx | 40 - .../swaig-function/swaig-function/index.mdx | 302 -- .../signalwire/core/swml-builder/index.mdx | 44 - .../core/swml-builder/swml-builder/index.mdx | 414 -- .../swml-handler/ai-verb-handler/index.mdx | 144 - .../signalwire/core/swml-handler/index.mdx | 48 - .../swml-handler/swml-verb-handler/index.mdx | 119 - .../verb-handler-registry/index.mdx | 134 - .../signalwire/core/swml-renderer/index.mdx | 40 - .../swml-renderer/swml-renderer/index.mdx | 182 - .../signalwire/core/swml-service/index.mdx | 48 - .../core/swml-service/swml-service/index.mdx | 639 --- .../sdk-reference/python/signalwire/index.mdx | 48 - .../livewire/agent-handoff/index.mdx | 57 - .../livewire/agent-server/index.mdx | 90 - .../livewire/agent-session/index.mdx | 211 - .../signalwire/livewire/agent/index.mdx | 285 -- .../livewire/chat-context/index.mdx | 71 - .../python/signalwire/livewire/index.mdx | 179 - .../livewire/inference-llm/index.mdx | 55 - .../livewire/inference-stt/index.mdx | 55 - .../livewire/inference-tts/index.mdx | 55 - .../signalwire/livewire/job-context/index.mdx | 96 - .../signalwire/livewire/job-process/index.mdx | 49 - .../livewire/plugins/cartesia-tts/index.mdx | 49 - .../livewire/plugins/deepgram-stt/index.mdx | 49 - .../plugins/eleven-labs-tts/index.mdx | 49 - .../signalwire/livewire/plugins/index.mdx | 56 - .../livewire/plugins/open-aillm/index.mdx | 53 - .../livewire/plugins/silero-vad/index.mdx | 70 - .../python/signalwire/livewire/room/index.mdx | 33 - .../signalwire/livewire/run-context/index.mdx | 63 - .../livewire/stop-response/index.mdx | 33 - .../signalwire/livewire/tool-error/index.mdx | 33 - .../mcp-gateway/gateway-service/index.mdx | 62 - .../gateway-service/mcp-gateway/index.mdx | 105 - .../python/signalwire/mcp-gateway/index.mdx | 52 - .../mcp-gateway/mcp-manager/index.mdx | 52 - .../mcp-manager/mcp-client/index.mdx | 191 - .../mcp-manager/mcp-manager/index.mdx | 199 - .../mcp-manager/mcp-service/index.mdx | 113 - .../mcp-gateway/session-manager/index.mdx | 48 - .../session-manager/session-manager/index.mdx | 227 - .../session-manager/session/index.mdx | 117 - .../python/signalwire/pom/index.mdx | 46 - .../python/signalwire/pom/pom-tool/index.mdx | 123 - .../python/signalwire/pom/pom/index.mdx | 37 - .../pom/pom/prompt-object-model/index.mdx | 364 -- .../signalwire/pom/pom/section/index.mdx | 277 -- .../concierge/concierge-agent/index.mdx | 210 - .../signalwire/prefabs/concierge/index.mdx | 40 - .../prefabs/faq-bot/faq-bot-agent/index.mdx | 168 - .../signalwire/prefabs/faq-bot/index.mdx | 40 - .../python/signalwire/prefabs/index.mdx | 60 - .../prefabs/info-gatherer/index.mdx | 40 - .../info-gatherer-agent/index.mdx | 222 - .../signalwire/prefabs/receptionist/index.mdx | 40 - .../receptionist/receptionist-agent/index.mdx | 122 - .../signalwire/prefabs/survey/index.mdx | 40 - .../prefabs/survey/survey-agent/index.mdx | 225 - .../signalwire/relay/call/action/index.mdx | 103 - .../signalwire/relay/call/ai-action/index.mdx | 77 - .../relay/call/collect-action/index.mdx | 127 - .../relay/call/detect-action/index.mdx | 77 - .../relay/call/fax-action/index.mdx | 79 - .../python/signalwire/relay/call/index.mdx | 2344 ---------- .../relay/call/pay-action/index.mdx | 77 - .../relay/call/play-action/index.mdx | 147 - .../relay/call/record-action/index.mdx | 125 - .../call/standalone-collect-action/index.mdx | 101 - .../relay/call/stream-action/index.mdx | 77 - .../relay/call/tap-action/index.mdx | 77 - .../relay/call/transcribe-action/index.mdx | 77 - .../python/signalwire/relay/client/index.mdx | 65 - .../relay/client/relay-client/index.mdx | 526 --- .../relay/client/relay-error/index.mdx | 61 - .../signalwire/relay/constants/index.mdx | 183 - .../relay/event/call-receive-event/index.mdx | 139 - .../relay/event/call-state-event/index.mdx | 119 - .../relay/event/calling-error-event/index.mdx | 109 - .../relay/event/collect-event/index.mdx | 119 - .../relay/event/conference-event/index.mdx | 114 - .../relay/event/connect-event/index.mdx | 109 - .../relay/event/denoise-event/index.mdx | 104 - .../relay/event/detect-event/index.mdx | 109 - .../relay/event/dial-event/index.mdx | 114 - .../relay/event/echo-event/index.mdx | 104 - .../relay/event/fax-event/index.mdx | 109 - .../relay/event/hold-event/index.mdx | 104 - .../python/signalwire/relay/event/index.mdx | 160 - .../event/message-receive-event/index.mdx | 149 - .../relay/event/message-state-event/index.mdx | 154 - .../relay/event/pay-event/index.mdx | 109 - .../relay/event/play-event/index.mdx | 109 - .../relay/event/queue-event/index.mdx | 129 - .../relay/event/record-event/index.mdx | 129 - .../relay/event/refer-event/index.mdx | 119 - .../relay/event/relay-event/index.mdx | 103 - .../relay/event/send-digits-event/index.mdx | 109 - .../relay/event/stream-event/index.mdx | 119 - .../relay/event/tap-event/index.mdx | 119 - .../relay/event/transcribe-event/index.mdx | 129 - .../python/signalwire/relay/index.mdx | 59 - .../python/signalwire/relay/message/index.mdx | 196 - .../signalwire/rest/call-handler/index.mdx | 40 - .../call-handler/phone-call-handler/index.mdx | 80 - .../python/signalwire/rest/client/index.mdx | 40 - .../rest/client/rest-client/index.mdx | 133 - .../python/signalwire/rest/index.mdx | 52 - .../addresses/addresses-resource/index.mdx | 133 - .../rest/namespaces/addresses/index.mdx | 40 - .../calling/calling-namespace/index.mdx | 863 ---- .../rest/namespaces/calling/index.mdx | 40 - .../namespaces/chat/chat-resource/index.mdx | 73 - .../signalwire/rest/namespaces/chat/index.mdx | 40 - .../compat/compat-accounts/index.mdx | 135 - .../compat/compat-applications/index.mdx | 55 - .../namespaces/compat/compat-calls/index.mdx | 147 - .../compat/compat-conferences/index.mdx | 321 -- .../namespaces/compat/compat-faxes/index.mdx | 121 - .../compat/compat-laml-bins/index.mdx | 55 - .../compat/compat-messages/index.mdx | 121 - .../compat/compat-namespace/index.mdx | 77 - .../compat/compat-phone-numbers/index.mdx | 241 - .../namespaces/compat/compat-queues/index.mdx | 123 - .../compat/compat-recordings/index.mdx | 93 - .../namespaces/compat/compat-tokens/index.mdx | 95 - .../compat/compat-transcriptions/index.mdx | 93 - .../rest/namespaces/compat/index.mdx | 88 - .../datasphere/datasphere-documents/index.mdx | 139 - .../datasphere/datasphere-namespace/index.mdx | 53 - .../rest/namespaces/datasphere/index.mdx | 44 - .../auto-materialized-webhook/index.mdx | 59 - .../fabric/call-flows-resource/index.mdx | 101 - .../conference-rooms-resource/index.mdx | 55 - .../cxml-applications-resource/index.mdx | 53 - .../fabric/cxml-webhooks-resource/index.mdx | 31 - .../fabric/fabric-addresses/index.mdx | 73 - .../fabric/fabric-namespace/index.mdx | 83 - .../fabric/fabric-resource-put/index.mdx | 33 - .../fabric/fabric-resource/index.mdx | 33 - .../namespaces/fabric/fabric-tokens/index.mdx | 153 - .../fabric/generic-resources/index.mdx | 169 - .../rest/namespaces/fabric/index.mdx | 84 - .../fabric/subscribers-resource/index.mdx | 145 - .../fabric/swml-webhooks-resource/index.mdx | 31 - .../imported-numbers-resource/index.mdx | 73 - .../namespaces/imported-numbers/index.mdx | 40 - .../signalwire/rest/namespaces/index.mdx | 120 - .../namespaces/logs/conference-logs/index.mdx | 53 - .../rest/namespaces/logs/fax-logs/index.mdx | 73 - .../signalwire/rest/namespaces/logs/index.mdx | 56 - .../namespaces/logs/logs-namespace/index.mdx | 59 - .../namespaces/logs/message-logs/index.mdx | 73 - .../rest/namespaces/logs/voice-logs/index.mdx | 95 - .../rest/namespaces/lookup/index.mdx | 40 - .../lookup/lookup-resource/index.mdx | 75 - .../signalwire/rest/namespaces/mfa/index.mdx | 40 - .../namespaces/mfa/mfa-resource/index.mdx | 115 - .../rest/namespaces/number-groups/index.mdx | 40 - .../number-groups-resource/index.mdx | 137 - .../rest/namespaces/phone-numbers/index.mdx | 40 - .../phone-numbers-resource/index.mdx | 330 -- .../rest/namespaces/project/index.mdx | 44 - .../project/project-namespace/index.mdx | 53 - .../project/project-tokens/index.mdx | 115 - .../rest/namespaces/pubsub/index.mdx | 40 - .../pubsub/pub-sub-resource/index.mdx | 73 - .../rest/namespaces/queues/index.mdx | 40 - .../queues/queues-resource/index.mdx | 117 - .../rest/namespaces/recordings/index.mdx | 40 - .../recordings/recordings-resource/index.mdx | 113 - .../rest/namespaces/registry/index.mdx | 56 - .../registry/registry-brands/index.mdx | 137 - .../registry/registry-campaigns/index.mdx | 141 - .../registry/registry-namespace/index.mdx | 59 - .../registry/registry-numbers/index.mdx | 53 - .../registry/registry-orders/index.mdx | 53 - .../rest/namespaces/short-codes/index.mdx | 40 - .../short-codes-resource/index.mdx | 115 - .../rest/namespaces/sip-profile/index.mdx | 40 - .../sip-profile-resource/index.mdx | 89 - .../namespaces/verified-callers/index.mdx | 40 - .../verified-callers-resource/index.mdx | 95 - .../rest/namespaces/video/index.mdx | 68 - .../video/video-conference-tokens/index.mdx | 73 - .../video/video-conferences/index.mdx | 99 - .../video/video-namespace/index.mdx | 65 - .../video/video-room-recordings/index.mdx | 115 - .../video/video-room-sessions/index.mdx | 139 - .../video/video-room-tokens/index.mdx | 53 - .../namespaces/video/video-rooms/index.mdx | 77 - .../namespaces/video/video-streams/index.mdx | 95 - .../document-processor/index.mdx | 151 - .../search/document-processor/index.mdx | 49 - .../search/document-processor/index__2.mdx | 44 - .../index-builder/index-builder/index.mdx | 271 -- .../signalwire/search/index-builder/index.mdx | 49 - .../search/index-builder/index__2.mdx | 44 - .../python/signalwire/search/index.mdx | 128 - .../signalwire/search/migration/index.mdx | 44 - .../migration/search-index-migrator/index.mdx | 180 - .../python/signalwire/search/models/index.mdx | 66 - .../search/pgvector-backend/index.mdx | 52 - .../pg-vector-backend/index.mdx | 211 - .../pg-vector-search-backend/index.mdx | 230 - .../search/query-processor/index.mdx | 362 -- .../signalwire/search/search-engine/index.mdx | 49 - .../search/search-engine/index__2.mdx | 46 - .../search-engine/search-engine/index.mdx | 180 - .../search/search-service/index.mdx | 49 - .../search/search-service/index__2.mdx | 50 - .../search-service/search-request/index.mdx | 78 - .../search-service/search-response/index.mdx | 58 - .../search-service/search-result/index.mdx | 59 - .../search-service/search-service/index.mdx | 186 - .../skills/api-ninjas-trivia/index.mdx | 44 - .../skill/api-ninjas-trivia-skill/index.mdx | 227 - .../skills/api-ninjas-trivia/skill/index.mdx | 40 - .../signalwire/skills/claude-skills/index.mdx | 40 - .../skill/claude-skills-skill/index.mdx | 182 - .../skills/claude-skills/skill/index.mdx | 44 - .../skills/datasphere-serverless/index.mdx | 40 - .../data-sphere-serverless-skill/index.mdx | 206 - .../datasphere-serverless/skill/index.mdx | 40 - .../signalwire/skills/datasphere/index.mdx | 44 - .../skill/data-sphere-skill/index.mdx | 228 - .../skills/datasphere/skill/index.mdx | 40 - .../signalwire/skills/datetime/index.mdx | 40 - .../datetime/skill/date-time-skill/index.mdx | 161 - .../skills/datetime/skill/index.mdx | 40 - .../signalwire/skills/google-maps/index.mdx | 35 - .../skill/google-maps-client/index.mdx | 118 - .../skill/google-maps-skill/index.mdx | 158 - .../skills/google-maps/skill/index.mdx | 46 - .../python/signalwire/skills/index.mdx | 112 - .../signalwire/skills/info-gatherer/index.mdx | 40 - .../skills/info-gatherer/skill/index.mdx | 40 - .../skill/info-gatherer-skill/index.mdx | 155 - .../python/signalwire/skills/joke/index.mdx | 40 - .../signalwire/skills/joke/skill/index.mdx | 40 - .../skills/joke/skill/joke-skill/index.mdx | 180 - .../python/signalwire/skills/math/index.mdx | 40 - .../signalwire/skills/math/skill/index.mdx | 40 - .../skills/math/skill/math-skill/index.mdx | 161 - .../signalwire/skills/mcp-gateway/index.mdx | 40 - .../skills/mcp-gateway/skill/index.mdx | 44 - .../skill/mcp-gateway-skill/index.mdx | 183 - .../skills/native-vector-search/index.mdx | 40 - .../native-vector-search/skill/index.mdx | 40 - .../native-vector-search-skill/index.mdx | 234 - .../skills/play-background-file/index.mdx | 44 - .../play-background-file/skill/index.mdx | 40 - .../play-background-file-skill/index.mdx | 207 - .../signalwire/skills/registry/index.mdx | 44 - .../skills/registry/skill-registry/index.mdx | 276 -- .../python/signalwire/skills/spider/index.mdx | 44 - .../signalwire/skills/spider/skill/index.mdx | 40 - .../spider/skill/spider-skill/index.mdx | 238 - .../signalwire/skills/swml-transfer/index.mdx | 40 - .../skills/swml-transfer/skill/index.mdx | 40 - .../skill/swml-transfer-skill/index.mdx | 184 - .../signalwire/skills/weather-api/index.mdx | 44 - .../skills/weather-api/skill/index.mdx | 40 - .../skill/weather-api-skill/index.mdx | 184 - .../signalwire/skills/web-search/index.mdx | 48 - .../google-search-scraper/index.mdx | 205 - .../web-search/skill-improved/index.mdx | 44 - .../skill-improved/web-search-skill/index.mdx | 204 - .../google-search-scraper/index.mdx | 164 - .../web-search/skill-original/index.mdx | 44 - .../skill-original/web-search-skill/index.mdx | 209 - .../skill/google-search-scraper/index.mdx | 319 -- .../skills/web-search/skill/index.mdx | 44 - .../skill/web-search-skill/index.mdx | 204 - .../skills/wikipedia-search/index.mdx | 44 - .../skills/wikipedia-search/skill/index.mdx | 40 - .../skill/wikipedia-search-skill/index.mdx | 191 - .../python/signalwire/utils/index.mdx | 82 - .../signalwire/utils/pom-utils/index.mdx | 32 - .../signalwire/utils/schema-utils/index.mdx | 48 - .../utils/schema-utils/schema-utils/index.mdx | 321 -- .../schema-validation-error/index.mdx | 61 - .../utils/token-generators/index.mdx | 32 - .../signalwire/utils/url-validator/index.mdx | 68 - .../signalwire/utils/validators/index.mdx | 32 - .../python/signalwire/web/index.mdx | 44 - .../signalwire/web/web-service/index.mdx | 44 - .../web/web-service/web-service/index.mdx | 234 - fern/products/sdk-reference/ruby/_meta.json | 2 +- .../agent-body-limit-middleware/index.mdx | 78 + .../index.mdx | 90 + .../agent-timing-safe-basic-auth/index.mdx | 78 + .../ruby/agents/agent-base/index.mdx | 2578 +++++++++++ .../ruby/agents/agent-base/index__2.mdx | 26 + .../ruby/agents/agent-server/index.mdx | 487 ++ .../agents/contexts/context-builder/index.mdx | 231 + .../ruby/agents/contexts/context/index.mdx | 929 ++++ .../agents/contexts/gather-info/index.mdx | 252 + .../agents/contexts/gather-question/index.mdx | 336 ++ .../ruby/agents/contexts/index.mdx | 84 + .../ruby/agents/contexts/step/index.mdx | 772 ++++ .../ruby/agents/data-map/index.mdx | 561 +++ .../sdk-reference/ruby/agents/index.mdx | 52 + .../sdk-reference/ruby/agents/pom/index.mdx | 40 + .../agents/pom/prompt-object-model/index.mdx | 446 ++ .../ruby/agents/pom/section/index.mdx | 499 ++ .../ruby/agents/prefabs/concierge/index.mdx | 368 ++ .../ruby/agents/prefabs/faq-bot/index.mdx | 238 + .../ruby/agents/prefabs/index.mdx | 52 + .../agents/prefabs/info-gatherer/index.mdx | 306 ++ .../agents/prefabs/receptionist/index.mdx | 256 ++ .../ruby/agents/prefabs/survey/index.mdx | 373 ++ .../ruby/agents/runtime/index.mdx | 148 + .../ruby/agents/serverless/index.mdx | 36 + .../serverless/lambda-handler/index.mdx | 151 + .../builtin/api-ninjas-trivia-skill/index.mdx | 158 + .../builtin/claude-skills-skill/index.mdx | 182 + .../builtin/custom-skills-skill/index.mdx | 150 + .../datasphere-serverless-skill/index.mdx | 180 + .../skills/builtin/datasphere-skill/index.mdx | 180 + .../skills/builtin/date-time-skill/index.mdx | 137 + .../builtin/google-maps-skill/index.mdx | 144 + .../ruby/agents/skills/builtin/index.mdx | 76 + .../builtin/info-gatherer-skill/index.mdx | 180 + .../skills/builtin/joke-skill/index.mdx | 144 + .../skills/builtin/math-skill/index.mdx | 135 + .../builtin/mcp-gateway-skill/index.mdx | 162 + .../native-vector-search-skill/index.mdx | 166 + .../play-background-file-skill/index.mdx | 148 + .../skills/builtin/spider-skill/index.mdx | 186 + .../builtin/swml-transfer-skill/index.mdx | 180 + .../builtin/weather-api-skill/index.mdx | 112 + .../skills/builtin/web-search-skill/index.mdx | 196 + .../builtin/wikipedia-search-skill/index.mdx | 156 + .../ruby/agents/skills/index.mdx | 54 + .../ruby/agents/skills/skill-base/index.mdx | 548 +++ .../agents/skills/skill-manager/index.mdx | 276 ++ .../ruby/agents/skills/skill-name/index.mdx | 130 + .../agents/skills/skill-registry/index.mdx | 587 +++ .../ruby/agents/swaig/codec/index.mdx | 44 + .../agents/swaig/function-result/index.mdx | 1760 +++++++ .../sdk-reference/ruby/agents/swaig/index.mdx | 60 + .../agents/swaig/parameter-schema/index.mdx | 614 +++ .../agents/swaig/record-direction/index.mdx | 46 + .../ruby/agents/swaig/record-format/index.mdx | 42 + .../ruby/agents/swaig/tap-direction/index.mdx | 46 + .../ruby/agents/swml/document/index.mdx | 283 ++ .../sdk-reference/ruby/agents/swml/index.mdx | 80 + .../ruby/agents/swml/schema/index.mdx | 154 + .../ruby/agents/swml/service/index.mdx | 993 ++++ .../ruby/agents/swml/service/index__2.mdx | 26 + .../security-headers-middleware/index.mdx | 90 + .../service/timing-safe-basic-auth/index.mdx | 82 + .../sdk-reference/ruby/core/core/index.mdx | 34 + .../ruby/core/core/logging-config/index.mdx | 51 + .../sdk-reference/ruby/core/index.mdx | 24 + .../sdk-reference/ruby/core/logging/index.mdx | 144 + .../ruby/core/logging/logger/index.mdx | 156 + .../ruby/core/security/index.mdx | 48 + .../core/security/session-manager/index.mdx | 350 ++ .../security/webhook-middleware/index.mdx | 86 + .../core/security/webhook-validator/index.mdx | 129 + .../sdk-reference/ruby/core/utils/index.mdx | 66 + .../ruby/core/utils/schema-utils/index.mdx | 352 ++ .../utils/schema-validation-error/index.mdx | 102 + .../ruby/core/utils/url-validator/index.mdx | 131 + fern/products/sdk-reference/ruby/index.mdx | 6 + .../ruby/relay/action-timeout-error/index.mdx | 34 + .../sdk-reference/ruby/relay/action/index.mdx | 292 ++ .../ruby/relay/ai-action/index.mdx | 76 + .../ruby/relay/call-receive-event/index.mdx | 238 + .../ruby/relay/call-state-event/index.mdx | 182 + .../ruby/relay/call-state/index.mdx | 107 + .../sdk-reference/ruby/relay/call/index.mdx | 1873 ++++++++ .../ruby/relay/calling-error-event/index.mdx | 118 + .../sdk-reference/ruby/relay/client/index.mdx | 522 +++ .../ruby/relay/collect-action/index.mdx | 135 + .../ruby/relay/collect-config/index.mdx | 430 ++ .../ruby/relay/collect-event/index.mdx | 158 + .../ruby/relay/conference-event/index.mdx | 138 + .../ruby/relay/connect-event/index.mdx | 118 + .../ruby/relay/denoise-event/index.mdx | 98 + .../ruby/relay/detect-action/index.mdx | 99 + .../ruby/relay/detect-event/index.mdx | 118 + .../sdk-reference/ruby/relay/device/index.mdx | 400 ++ .../ruby/relay/dial-event/index.mdx | 202 + .../ruby/relay/dial-state/index.mdx | 117 + .../ruby/relay/echo-event/index.mdx | 98 + .../ruby/relay/fax-action/index.mdx | 78 + .../ruby/relay/fax-event/index.mdx | 118 + .../ruby/relay/hold-event/index.mdx | 98 + .../sdk-reference/ruby/relay/index.mdx | 267 ++ .../sdk-reference/ruby/relay/index__2.mdx | 204 + .../relay/message-receive-event/index.mdx | 278 ++ .../ruby/relay/message-state-event/index.mdx | 322 ++ .../ruby/relay/message-state/index.mdx | 116 + .../ruby/relay/message/index.mdx | 677 +++ .../ruby/relay/pay-action/index.mdx | 76 + .../ruby/relay/pay-event/index.mdx | 118 + .../ruby/relay/play-action/index.mdx | 128 + .../ruby/relay/play-event/index.mdx | 118 + .../ruby/relay/queue-event/index.mdx | 198 + .../ruby/relay/record-action/index.mdx | 112 + .../ruby/relay/record-event/index.mdx | 198 + .../ruby/relay/refer-event/index.mdx | 158 + .../ruby/relay/relay-error/index.mdx | 96 + .../ruby/relay/relay-event/index.mdx | 344 ++ .../ruby/relay/send-digits-event/index.mdx | 118 + .../relay/standalone-collect-action/index.mdx | 112 + .../ruby/relay/stream-action/index.mdx | 76 + .../ruby/relay/stream-event/index.mdx | 158 + .../ruby/relay/tap-action/index.mdx | 76 + .../ruby/relay/tap-event/index.mdx | 158 + .../ruby/relay/transcribe-action/index.mdx | 76 + .../ruby/relay/transcribe-event/index.mdx | 198 + .../ruby/rest/base-resource/index.mdx | 60 + .../ruby/rest/crud-resource/index.mdx | 172 + .../ruby/rest/crud-with-addresses/index.mdx | 60 + .../ruby/rest/http-client/index.mdx | 222 + .../sdk-reference/ruby/rest/index.mdx | 26 + .../sdk-reference/ruby/rest/index__2.mdx | 54 + .../namespaces/addresses-resource/index.mdx | 138 + .../auto-materialized-webhook/index.mdx | 71 + .../namespaces/call-flows-resource/index.mdx | 100 + .../namespaces/calling-namespace/index.mdx | 896 ++++ .../rest/namespaces/chat-resource/index.mdx | 78 + .../rest/namespaces/compat-accounts/index.mdx | 140 + .../namespaces/compat-applications/index.mdx | 56 + .../rest/namespaces/compat-calls/index.mdx | 148 + .../namespaces/compat-conferences/index.mdx | 328 ++ .../rest/namespaces/compat-faxes/index.mdx | 122 + .../namespaces/compat-laml-bins/index.mdx | 56 + .../rest/namespaces/compat-messages/index.mdx | 122 + .../namespaces/compat-namespace/index.mdx | 276 ++ .../namespaces/compat-phone-numbers/index.mdx | 246 + .../rest/namespaces/compat-queues/index.mdx | 124 + .../namespaces/compat-recordings/index.mdx | 94 + .../rest/namespaces/compat-tokens/index.mdx | 96 + .../compat-transcriptions/index.mdx | 94 + .../rest/namespaces/conference-logs/index.mdx | 54 + .../conference-rooms-resource/index.mdx | 56 + .../cxml-applications-resource/index.mdx | 58 + .../cxml-webhooks-resource/index.mdx | 38 + .../namespaces/datasphere-documents/index.mdx | 144 + .../namespaces/datasphere-namespace/index.mdx | 76 + .../namespaces/fabric-addresses/index.mdx | 74 + .../namespaces/fabric-namespace/index.mdx | 346 ++ .../namespaces/fabric-resource-put/index.mdx | 34 + .../rest/namespaces/fabric-resource/index.mdx | 37 + .../rest/namespaces/fabric-tokens/index.mdx | 158 + .../ruby/rest/namespaces/fax-logs/index.mdx | 74 + .../namespaces/generic-resources/index.mdx | 172 + .../imported-numbers-resource/index.mdx | 78 + .../ruby/rest/namespaces/index.mdx | 280 ++ .../rest/namespaces/logs-namespace/index.mdx | 130 + .../rest/namespaces/lookup-resource/index.mdx | 80 + .../rest/namespaces/message-logs/index.mdx | 74 + .../rest/namespaces/mfa-resource/index.mdx | 120 + .../number-groups-resource/index.mdx | 142 + .../phone-numbers-resource/index.mdx | 295 ++ .../namespaces/project-namespace/index.mdx | 76 + .../rest/namespaces/project-tokens/index.mdx | 120 + .../namespaces/pub-sub-resource/index.mdx | 78 + .../rest/namespaces/queues-resource/index.mdx | 122 + .../namespaces/recordings-resource/index.mdx | 118 + .../rest/namespaces/registry-brands/index.mdx | 138 + .../namespaces/registry-campaigns/index.mdx | 142 + .../namespaces/registry-namespace/index.mdx | 130 + .../namespaces/registry-numbers/index.mdx | 54 + .../rest/namespaces/registry-orders/index.mdx | 54 + .../namespaces/short-codes-resource/index.mdx | 120 + .../namespaces/sip-profile-resource/index.mdx | 94 + .../namespaces/subscribers-resource/index.mdx | 146 + .../swml-webhooks-resource/index.mdx | 38 + .../verified-callers-resource/index.mdx | 100 + .../video-conference-tokens/index.mdx | 74 + .../namespaces/video-conferences/index.mdx | 100 + .../rest/namespaces/video-namespace/index.mdx | 184 + .../video-room-recordings/index.mdx | 116 + .../namespaces/video-room-sessions/index.mdx | 140 + .../namespaces/video-room-tokens/index.mdx | 54 + .../rest/namespaces/video-rooms/index.mdx | 78 + .../rest/namespaces/video-streams/index.mdx | 96 + .../ruby/rest/namespaces/voice-logs/index.mdx | 96 + .../ruby/rest/paginated-iterator/index.mdx | 283 ++ .../ruby/rest/phone-call-handler/index.mdx | 93 + .../ruby/rest/rest-client/index.mdx | 507 ++ .../rest/signal-wire-rest-error/index.mdx | 136 + .../agent-body-limit-middleware/index.mdx | 78 - .../index.mdx | 90 - .../agent-timing-safe-basic-auth/index.mdx | 78 - .../ruby/signal-wire/agent-base/index.mdx | 2590 ----------- .../ruby/signal-wire/agent-server/index.mdx | 487 -- .../contexts/context-builder/index.mdx | 231 - .../signal-wire/contexts/context/index.mdx | 929 ---- .../contexts/gather-info/index.mdx | 252 - .../contexts/gather-question/index.mdx | 336 -- .../ruby/signal-wire/contexts/index.mdx | 84 - .../ruby/signal-wire/contexts/step/index.mdx | 772 ---- .../ruby/signal-wire/core/index.mdx | 34 - .../signal-wire/core/logging-config/index.mdx | 51 - .../ruby/signal-wire/data-map/index.mdx | 561 --- .../sdk-reference/ruby/signal-wire/index.mdx | 50 - .../ruby/signal-wire/logging/index.mdx | 144 - .../ruby/signal-wire/logging/logger/index.mdx | 156 - .../ruby/signal-wire/pom/index.mdx | 40 - .../pom/prompt-object-model/index.mdx | 446 -- .../ruby/signal-wire/pom/section/index.mdx | 499 -- .../signal-wire/prefabs/concierge/index.mdx | 368 -- .../signal-wire/prefabs/faq-bot/index.mdx | 238 - .../ruby/signal-wire/prefabs/index.mdx | 52 - .../prefabs/info-gatherer/index.mdx | 306 -- .../prefabs/receptionist/index.mdx | 256 -- .../ruby/signal-wire/prefabs/survey/index.mdx | 373 -- .../relay/action-timeout-error/index.mdx | 34 - .../ruby/signal-wire/relay/action/index.mdx | 292 -- .../signal-wire/relay/ai-action/index.mdx | 76 - .../relay/call-receive-event/index.mdx | 238 - .../relay/call-state-event/index.mdx | 182 - .../signal-wire/relay/call-state/index.mdx | 107 - .../ruby/signal-wire/relay/call/index.mdx | 1873 -------- .../relay/calling-error-event/index.mdx | 118 - .../ruby/signal-wire/relay/client/index.mdx | 522 --- .../relay/collect-action/index.mdx | 135 - .../relay/collect-config/index.mdx | 430 -- .../signal-wire/relay/collect-event/index.mdx | 158 - .../relay/conference-event/index.mdx | 138 - .../signal-wire/relay/connect-event/index.mdx | 118 - .../signal-wire/relay/denoise-event/index.mdx | 98 - .../signal-wire/relay/detect-action/index.mdx | 99 - .../signal-wire/relay/detect-event/index.mdx | 118 - .../ruby/signal-wire/relay/device/index.mdx | 400 -- .../signal-wire/relay/dial-event/index.mdx | 202 - .../signal-wire/relay/dial-state/index.mdx | 117 - .../signal-wire/relay/echo-event/index.mdx | 98 - .../signal-wire/relay/fax-action/index.mdx | 78 - .../signal-wire/relay/fax-event/index.mdx | 118 - .../signal-wire/relay/hold-event/index.mdx | 98 - .../ruby/signal-wire/relay/index.mdx | 461 -- .../relay/message-receive-event/index.mdx | 278 -- .../relay/message-state-event/index.mdx | 322 -- .../signal-wire/relay/message-state/index.mdx | 116 - .../ruby/signal-wire/relay/message/index.mdx | 677 --- .../signal-wire/relay/pay-action/index.mdx | 76 - .../signal-wire/relay/pay-event/index.mdx | 118 - .../signal-wire/relay/play-action/index.mdx | 128 - .../signal-wire/relay/play-event/index.mdx | 118 - .../signal-wire/relay/queue-event/index.mdx | 198 - .../signal-wire/relay/record-action/index.mdx | 112 - .../signal-wire/relay/record-event/index.mdx | 198 - .../signal-wire/relay/refer-event/index.mdx | 158 - .../signal-wire/relay/relay-error/index.mdx | 96 - .../signal-wire/relay/relay-event/index.mdx | 344 -- .../relay/send-digits-event/index.mdx | 118 - .../relay/standalone-collect-action/index.mdx | 112 - .../signal-wire/relay/stream-action/index.mdx | 76 - .../signal-wire/relay/stream-event/index.mdx | 158 - .../signal-wire/relay/tap-action/index.mdx | 76 - .../signal-wire/relay/tap-event/index.mdx | 158 - .../relay/transcribe-action/index.mdx | 76 - .../relay/transcribe-event/index.mdx | 198 - .../signal-wire/rest/base-resource/index.mdx | 60 - .../signal-wire/rest/crud-resource/index.mdx | 172 - .../rest/crud-with-addresses/index.mdx | 60 - .../signal-wire/rest/http-client/index.mdx | 222 - .../ruby/signal-wire/rest/index.mdx | 70 - .../namespaces/addresses-resource/index.mdx | 138 - .../auto-materialized-webhook/index.mdx | 71 - .../namespaces/call-flows-resource/index.mdx | 100 - .../namespaces/calling-namespace/index.mdx | 896 ---- .../rest/namespaces/chat-resource/index.mdx | 78 - .../rest/namespaces/compat-accounts/index.mdx | 140 - .../namespaces/compat-applications/index.mdx | 56 - .../rest/namespaces/compat-calls/index.mdx | 148 - .../namespaces/compat-conferences/index.mdx | 328 -- .../rest/namespaces/compat-faxes/index.mdx | 122 - .../namespaces/compat-laml-bins/index.mdx | 56 - .../rest/namespaces/compat-messages/index.mdx | 122 - .../namespaces/compat-namespace/index.mdx | 276 -- .../namespaces/compat-phone-numbers/index.mdx | 246 - .../rest/namespaces/compat-queues/index.mdx | 124 - .../namespaces/compat-recordings/index.mdx | 94 - .../rest/namespaces/compat-tokens/index.mdx | 96 - .../compat-transcriptions/index.mdx | 94 - .../rest/namespaces/conference-logs/index.mdx | 54 - .../conference-rooms-resource/index.mdx | 56 - .../cxml-applications-resource/index.mdx | 58 - .../cxml-webhooks-resource/index.mdx | 38 - .../namespaces/datasphere-documents/index.mdx | 144 - .../namespaces/datasphere-namespace/index.mdx | 76 - .../namespaces/fabric-addresses/index.mdx | 74 - .../namespaces/fabric-namespace/index.mdx | 346 -- .../namespaces/fabric-resource-put/index.mdx | 34 - .../rest/namespaces/fabric-resource/index.mdx | 37 - .../rest/namespaces/fabric-tokens/index.mdx | 158 - .../rest/namespaces/fax-logs/index.mdx | 74 - .../namespaces/generic-resources/index.mdx | 172 - .../imported-numbers-resource/index.mdx | 78 - .../signal-wire/rest/namespaces/index.mdx | 280 -- .../rest/namespaces/logs-namespace/index.mdx | 130 - .../rest/namespaces/lookup-resource/index.mdx | 80 - .../rest/namespaces/message-logs/index.mdx | 74 - .../rest/namespaces/mfa-resource/index.mdx | 120 - .../number-groups-resource/index.mdx | 142 - .../phone-numbers-resource/index.mdx | 295 -- .../namespaces/project-namespace/index.mdx | 76 - .../rest/namespaces/project-tokens/index.mdx | 120 - .../namespaces/pub-sub-resource/index.mdx | 78 - .../rest/namespaces/queues-resource/index.mdx | 122 - .../namespaces/recordings-resource/index.mdx | 118 - .../rest/namespaces/registry-brands/index.mdx | 138 - .../namespaces/registry-campaigns/index.mdx | 142 - .../namespaces/registry-namespace/index.mdx | 130 - .../namespaces/registry-numbers/index.mdx | 54 - .../rest/namespaces/registry-orders/index.mdx | 54 - .../namespaces/short-codes-resource/index.mdx | 120 - .../namespaces/sip-profile-resource/index.mdx | 94 - .../namespaces/subscribers-resource/index.mdx | 146 - .../swml-webhooks-resource/index.mdx | 38 - .../verified-callers-resource/index.mdx | 100 - .../video-conference-tokens/index.mdx | 74 - .../namespaces/video-conferences/index.mdx | 100 - .../rest/namespaces/video-namespace/index.mdx | 184 - .../video-room-recordings/index.mdx | 116 - .../namespaces/video-room-sessions/index.mdx | 140 - .../namespaces/video-room-tokens/index.mdx | 54 - .../rest/namespaces/video-rooms/index.mdx | 78 - .../rest/namespaces/video-streams/index.mdx | 96 - .../rest/namespaces/voice-logs/index.mdx | 96 - .../rest/paginated-iterator/index.mdx | 283 -- .../rest/phone-call-handler/index.mdx | 93 - .../signal-wire/rest/rest-client/index.mdx | 507 -- .../rest/signal-wire-rest-error/index.mdx | 136 - .../ruby/signal-wire/runtime/index.mdx | 148 - .../ruby/signal-wire/security/index.mdx | 48 - .../security/session-manager/index.mdx | 350 -- .../security/webhook-middleware/index.mdx | 86 - .../security/webhook-validator/index.mdx | 129 - .../ruby/signal-wire/serverless/index.mdx | 36 - .../serverless/lambda-handler/index.mdx | 151 - .../builtin/api-ninjas-trivia-skill/index.mdx | 158 - .../builtin/claude-skills-skill/index.mdx | 182 - .../builtin/custom-skills-skill/index.mdx | 150 - .../datasphere-serverless-skill/index.mdx | 180 - .../skills/builtin/datasphere-skill/index.mdx | 180 - .../skills/builtin/date-time-skill/index.mdx | 137 - .../builtin/google-maps-skill/index.mdx | 144 - .../ruby/signal-wire/skills/builtin/index.mdx | 76 - .../builtin/info-gatherer-skill/index.mdx | 180 - .../skills/builtin/joke-skill/index.mdx | 144 - .../skills/builtin/math-skill/index.mdx | 135 - .../builtin/mcp-gateway-skill/index.mdx | 162 - .../native-vector-search-skill/index.mdx | 166 - .../play-background-file-skill/index.mdx | 148 - .../skills/builtin/spider-skill/index.mdx | 186 - .../builtin/swml-transfer-skill/index.mdx | 180 - .../builtin/weather-api-skill/index.mdx | 112 - .../skills/builtin/web-search-skill/index.mdx | 196 - .../builtin/wikipedia-search-skill/index.mdx | 156 - .../ruby/signal-wire/skills/index.mdx | 54 - .../signal-wire/skills/skill-base/index.mdx | 548 --- .../skills/skill-manager/index.mdx | 276 -- .../signal-wire/skills/skill-name/index.mdx | 130 - .../skills/skill-registry/index.mdx | 587 --- .../ruby/signal-wire/swaig/codec/index.mdx | 44 - .../swaig/function-result/index.mdx | 1760 ------- .../ruby/signal-wire/swaig/index.mdx | 60 - .../swaig/parameter-schema/index.mdx | 614 --- .../swaig/record-direction/index.mdx | 46 - .../signal-wire/swaig/record-format/index.mdx | 42 - .../signal-wire/swaig/tap-direction/index.mdx | 46 - .../ruby/signal-wire/swml/document/index.mdx | 283 -- .../ruby/signal-wire/swml/index.mdx | 74 - .../ruby/signal-wire/swml/schema/index.mdx | 154 - .../ruby/signal-wire/swml/service/index.mdx | 1005 ---- .../security-headers-middleware/index.mdx | 90 - .../service/timing-safe-basic-auth/index.mdx | 82 - .../ruby/signal-wire/utils/index.mdx | 66 - .../signal-wire/utils/schema-utils/index.mdx | 352 -- .../utils/schema-validation-error/index.mdx | 102 - .../signal-wire/utils/url-validator/index.mdx | 131 - fern/products/sdk-reference/rust/_meta.json | 2 +- .../agent/agent-base/agent-base/index.mdx | 2140 +++++++++ .../agent/agent-base/agent-options/index.mdx | 349 ++ .../rust/agents/agent/agent-base/index.mdx | 34 + .../sdk-reference/rust/agents/agent/index.mdx | 28 + .../context-builder/context-builder/index.mdx | 342 ++ .../context-builder/context/index.mdx | 429 ++ .../context-builder/gather-info/index.mdx | 208 + .../context-builder/gather-question/index.mdx | 159 + .../agents/contexts/context-builder/index.mdx | 78 + .../contexts/context-builder/step/index.mdx | 539 +++ .../rust/agents/contexts/index.mdx | 28 + .../rust/agents/datamap/index.mdx | 22 + .../rust/agents/datamap/index__2.mdx | 653 +++ .../sdk-reference/rust/agents/index.mdx | 50 + .../sdk-reference/rust/agents/pom/index.mdx | 49 + .../rust/agents/pom/index__2.mdx | 36 + .../rust/agents/pom/pom/index.mdx | 22 + .../pom/pom/prompt-object-model/index.mdx | 547 +++ .../rust/agents/pom/section/index.mdx | 417 ++ .../prefabs/bedrock/bedrock-agent/index.mdx | 504 ++ .../prefabs/bedrock/bedrock-options/index.mdx | 129 + .../rust/agents/prefabs/bedrock/index.mdx | 44 + .../concierge/concierge-agent/index.mdx | 161 + .../rust/agents/prefabs/concierge/index.mdx | 30 + .../prefabs/faq-bot/faq-bot-agent/index.mdx | 150 + .../rust/agents/prefabs/faq-bot/index.mdx | 30 + .../rust/agents/prefabs/index.mdx | 40 + .../agents/prefabs/info-gatherer/index.mdx | 30 + .../info-gatherer-agent/index.mdx | 126 + .../agents/prefabs/receptionist/index.mdx | 30 + .../receptionist/receptionist-agent/index.mdx | 142 + .../rust/agents/prefabs/survey/index.mdx | 30 + .../prefabs/survey/survey-agent/index.mdx | 140 + .../agent-server/agent-server/index.mdx | 507 ++ .../rust/agents/server/agent-server/index.mdx | 58 + .../rust/agents/server/error/index.mdx | 168 + .../rust/agents/server/index.mdx | 32 + .../rust/agents/serverless/adapter/index.mdx | 162 + .../agents/serverless/adapter/index__2.mdx | 198 + .../rust/agents/serverless/index.mdx | 36 + .../api-ninjas-trivia/index.mdx | 178 + .../builtin/api-ninjas-trivia/index.mdx | 30 + .../claude-skills/claude-skills/index.mdx | 218 + .../skills/builtin/claude-skills/index.mdx | 30 + .../custom-skills/custom-skills/index.mdx | 178 + .../skills/builtin/custom-skills/index.mdx | 30 + .../datasphere-serverless/index.mdx | 218 + .../builtin/datasphere-serverless/index.mdx | 30 + .../skills/builtin/datasphere/index.mdx | 227 + .../agents/skills/builtin/datetime/index.mdx | 178 + .../builtin/google-maps/google-maps/index.mdx | 198 + .../skills/builtin/google-maps/index.mdx | 30 + .../rust/agents/skills/builtin/index.mdx | 76 + .../skills/builtin/info-gatherer/index.mdx | 30 + .../info-gatherer/info-gatherer/index.mdx | 218 + .../rust/agents/skills/builtin/joke/index.mdx | 198 + .../rust/agents/skills/builtin/math/index.mdx | 178 + .../skills/builtin/mcp-gateway/index.mdx | 30 + .../builtin/mcp-gateway/mcp-gateway/index.mdx | 218 + .../builtin/native-vector-search/index.mdx | 30 + .../native-vector-search/index.mdx | 198 + .../builtin/play-background-file/index.mdx | 30 + .../play-background-file/index.mdx | 178 + .../agents/skills/builtin/spider/index.mdx | 198 + .../skills/builtin/swml-transfer/index.mdx | 30 + .../swml-transfer/swml-transfer/index.mdx | 218 + .../skills/builtin/weather-api/index.mdx | 30 + .../builtin/weather-api/weather-api/index.mdx | 158 + .../skills/builtin/web-search/index.mdx | 30 + .../builtin/web-search/web-search/index.mdx | 271 ++ .../skills/builtin/wikipedia-search/index.mdx | 30 + .../wikipedia-search/index.mdx | 183 + .../rust/agents/skills/index.mdx | 38 + .../rust/agents/skills/skill-base/index.mdx | 455 ++ .../skills/skill-base/skill-params/index.mdx | 330 ++ .../agents/skills/skill-manager/index.mdx | 30 + .../skill-manager/skill-manager/index.mdx | 244 + .../rust/agents/skills/skill-name/index.mdx | 516 +++ .../parse-skill-name-error/index.mdx | 155 + .../agents/skills/skill-registry/index.mdx | 48 + .../skill-registry/skill-registry/index.mdx | 166 + .../function-result/function-result/index.mdx | 1899 ++++++++ .../agents/swaig/function-result/index.mdx | 330 ++ .../sdk-reference/rust/agents/swaig/index.mdx | 36 + .../rust/agents/swaig/media-enums/index.mdx | 1939 ++++++++ .../parse-media-enum-error/index.mdx | 155 + .../agents/swaig/params-builder/index.mdx | 398 ++ .../params-builder/params-builder/index.mdx | 531 +++ .../params-builder/property-builder/index.mdx | 358 ++ .../rust/agents/swml/document/index.mdx | 360 ++ .../sdk-reference/rust/agents/swml/index.mdx | 42 + .../rust/agents/swml/schema/index.mdx | 126 + .../agents/swml/schema/verb-info/index.mdx | 84 + .../rust/agents/swml/service/index.mdx | 946 ++++ .../rust/agents/swml/service/index__2.mdx | 26 + .../swml/service/service-options/index.mdx | 212 + .../agents/swml/service/tool-def/index.mdx | 65 + .../sdk-reference/rust/core/core/index.mdx | 28 + .../rust/core/core/logging-config/index.mdx | 48 + .../sdk-reference/rust/core/index.mdx | 24 + .../sdk-reference/rust/core/logging/index.mdx | 350 ++ .../rust/core/logging/logger/index.mdx | 191 + .../core/logging/parse-level-error/index.mdx | 149 + .../rust/core/security/index.mdx | 36 + .../core/security/session-manager/index.mdx | 30 + .../session-manager/session-manager/index.mdx | 221 + .../core/security/webhook-layer/index.mdx | 56 + .../webhook-layer/webhook-layer/index.mdx | 160 + .../webhook-layer/webhook-validate/index.mdx | 135 + .../rust/core/security/webhook/index.mdx | 356 ++ .../sdk-reference/rust/core/utils/index.mdx | 61 + .../rust/core/utils/schema-utils/index.mdx | 38 + .../utils/schema-utils/schema-utils/index.mdx | 323 ++ .../schema-validation-error/index.mdx | 138 + .../schema-utils/verb-definition/index.mdx | 86 + .../rust/core/utils/url-validator/index.mdx | 89 + fern/products/sdk-reference/rust/index.mdx | 4 + .../rust/relay/action/ai-action/index.mdx | 114 + .../relay/action/collect-action/index.mdx | 172 + .../rust/relay/action/detect-action/index.mdx | 134 + .../rust/relay/action/fax-action/index.mdx | 138 + .../sdk-reference/rust/relay/action/index.mdx | 432 ++ .../rust/relay/action/index__2.mdx | 38 + .../rust/relay/action/pay-action/index.mdx | 114 + .../rust/relay/action/play-action/index.mdx | 166 + .../rust/relay/action/record-action/index.mdx | 206 + .../rust/relay/action/stream-action/index.mdx | 114 + .../rust/relay/action/tap-action/index.mdx | 114 + .../relay/action/transcribe-action/index.mdx | 114 + .../sdk-reference/rust/relay/call/index.mdx | 1436 ++++++ .../sdk-reference/rust/relay/client/index.mdx | 932 ++++ .../rust/relay/constants/index.mdx | 148 + .../sdk-reference/rust/relay/device/index.mdx | 321 ++ .../sdk-reference/rust/relay/error/index.mdx | 261 ++ .../sdk-reference/rust/relay/event/index.mdx | 321 ++ .../sdk-reference/rust/relay/index.mdx | 66 + .../rust/relay/message/index.mdx | 471 ++ .../rust/relay/state-enums/index.mdx | 928 ++++ .../sdk-reference/rust/rest/client/index.mdx | 30 + .../rust/rest/client/rest-client/index.mdx | 726 +++ .../crud-resource/crud-resource/index.mdx | 231 + .../rust/rest/crud-resource/index.mdx | 30 + .../sdk-reference/rust/rest/error/index.mdx | 33 + .../error/signal-wire-rest-error/index.mdx | 190 + .../rest/http-client/http-client/index.mdx | 334 ++ .../rust/rest/http-client/index.mdx | 99 + .../rest/http-client/stub-transport/index.mdx | 129 + .../rest/http-client/ureq-transport/index.mdx | 116 + .../sdk-reference/rust/rest/index.mdx | 40 + .../rust/rest/namespaces/calling/index.mdx | 1082 +++++ .../compat/compat-accounts/index.mdx | 172 + .../compat/compat-applications/index.mdx | 196 + .../namespaces/compat/compat-calls/index.mdx | 221 + .../compat/compat-conferences/index.mdx | 429 ++ .../namespaces/compat/compat-faxes/index.mdx | 274 ++ .../compat/compat-laml-bins/index.mdx | 196 + .../compat/compat-messages/index.mdx | 274 ++ .../compat/compat-phone-numbers/index.mdx | 318 ++ .../namespaces/compat/compat-queues/index.mdx | 276 ++ .../compat/compat-recordings/index.mdx | 146 + .../namespaces/compat/compat-tokens/index.mdx | 148 + .../compat/compat-transcriptions/index.mdx | 146 + .../rust/rest/namespaces/compat/index.mdx | 341 ++ .../rust/rest/namespaces/compat/index__2.mdx | 42 + .../datasphere/datasphere-documents/index.mdx | 301 ++ .../datasphere/datasphere-namespace/index.mdx | 76 + .../rust/rest/namespaces/datasphere/index.mdx | 34 + .../fabric/call-flows-resource/index.mdx | 276 ++ .../conference-rooms-resource/index.mdx | 222 + .../cxml-applications-resource/index.mdx | 202 + .../fabric/fabric-addresses/index.mdx | 122 + .../namespaces/fabric/fabric-tokens/index.mdx | 174 + .../fabric/generic-resources/index.mdx | 198 + .../rust/rest/namespaces/fabric/index.mdx | 413 ++ .../rust/rest/namespaces/fabric/index__2.mdx | 32 + .../fabric/subscribers-resource/index.mdx | 359 ++ .../rust/rest/namespaces/index.mdx | 84 + .../namespaces/logs/conference-logs/index.mdx | 98 + .../rest/namespaces/logs/fax-logs/index.mdx | 122 + .../rust/rest/namespaces/logs/index.mdx | 158 + .../rust/rest/namespaces/logs/index__2.mdx | 26 + .../namespaces/logs/message-logs/index.mdx | 122 + .../rest/namespaces/logs/voice-logs/index.mdx | 148 + .../rust/rest/namespaces/mfa/index.mdx | 158 + .../rest/namespaces/number-groups/index.mdx | 30 + .../number-groups/number-groups/index.mdx | 303 ++ .../rust/rest/namespaces/project/index.mdx | 76 + .../rust/rest/namespaces/project/index__2.mdx | 22 + .../project/project-tokens/index.mdx | 151 + .../rust/rest/namespaces/queues/index.mdx | 275 ++ .../rust/rest/namespaces/registry/index.mdx | 157 + .../rest/namespaces/registry/index__2.mdx | 26 + .../registry/registry-brands/index.mdx | 198 + .../registry/registry-campaigns/index.mdx | 202 + .../registry/registry-numbers/index.mdx | 98 + .../registry/registry-orders/index.mdx | 98 + .../rest/namespaces/sip-profile/index.mdx | 30 + .../sip-profile/sip-profile/index.mdx | 126 + .../rust/rest/namespaces/video/index.mdx | 219 + .../rust/rest/namespaces/video/index__2.mdx | 32 + .../video/video-conference-tokens/index.mdx | 124 + .../video/video-conferences/index.mdx | 274 ++ .../video/video-room-recordings/index.mdx | 172 + .../video/video-room-sessions/index.mdx | 200 + .../video/video-room-tokens/index.mdx | 98 + .../namespaces/video/video-rooms/index.mdx | 250 + .../namespaces/video/video-streams/index.mdx | 148 + .../rust/rest/pagination/index.mdx | 37 + .../pagination/paginated-iterator/index.mdx | 267 ++ .../agent/agent-base/agent-base/index.mdx | 2140 --------- .../agent/agent-base/agent-options/index.mdx | 349 -- .../signalwire/agent/agent-base/index.mdx | 34 - .../rust/signalwire/agent/index.mdx | 27 - .../context-builder/context-builder/index.mdx | 342 -- .../context-builder/context/index.mdx | 429 -- .../context-builder/gather-info/index.mdx | 208 - .../context-builder/gather-question/index.mdx | 159 - .../contexts/context-builder/index.mdx | 78 - .../contexts/context-builder/step/index.mdx | 539 --- .../rust/signalwire/contexts/index.mdx | 27 - .../rust/signalwire/core/index.mdx | 27 - .../signalwire/core/logging-config/index.mdx | 48 - .../rust/signalwire/datamap/datamap/index.mdx | 653 --- .../rust/signalwire/datamap/index.mdx | 29 - .../sdk-reference/rust/signalwire/index.mdx | 38 - .../rust/signalwire/logging/index.mdx | 349 -- .../rust/signalwire/logging/logger/index.mdx | 191 - .../logging/parse-level-error/index.mdx | 149 - .../rust/signalwire/pom/index.mdx | 50 - .../rust/signalwire/pom/pom/index.mdx | 44 - .../pom/pom/prompt-object-model/index.mdx | 547 --- .../rust/signalwire/pom/section/index.mdx | 417 -- .../prefabs/bedrock/bedrock-agent/index.mdx | 504 -- .../prefabs/bedrock/bedrock-options/index.mdx | 129 - .../rust/signalwire/prefabs/bedrock/index.mdx | 44 - .../concierge/concierge-agent/index.mdx | 161 - .../signalwire/prefabs/concierge/index.mdx | 30 - .../prefabs/faq-bot/faq-bot-agent/index.mdx | 150 - .../rust/signalwire/prefabs/faq-bot/index.mdx | 30 - .../rust/signalwire/prefabs/index.mdx | 39 - .../prefabs/info-gatherer/index.mdx | 30 - .../info-gatherer-agent/index.mdx | 126 - .../signalwire/prefabs/receptionist/index.mdx | 30 - .../receptionist/receptionist-agent/index.mdx | 142 - .../rust/signalwire/prefabs/survey/index.mdx | 30 - .../prefabs/survey/survey-agent/index.mdx | 140 - .../relay/action/ai-action/index.mdx | 114 - .../relay/action/collect-action/index.mdx | 172 - .../relay/action/detect-action/index.mdx | 134 - .../relay/action/fax-action/index.mdx | 138 - .../rust/signalwire/relay/action/index.mdx | 456 -- .../relay/action/pay-action/index.mdx | 114 - .../relay/action/play-action/index.mdx | 166 - .../relay/action/record-action/index.mdx | 206 - .../relay/action/stream-action/index.mdx | 114 - .../relay/action/tap-action/index.mdx | 114 - .../relay/action/transcribe-action/index.mdx | 114 - .../rust/signalwire/relay/call/index.mdx | 1436 ------ .../rust/signalwire/relay/client/index.mdx | 932 ---- .../rust/signalwire/relay/constants/index.mdx | 148 - .../rust/signalwire/relay/device/index.mdx | 321 -- .../rust/signalwire/relay/error/index.mdx | 261 -- .../rust/signalwire/relay/event/index.mdx | 321 -- .../rust/signalwire/relay/index.mdx | 65 - .../rust/signalwire/relay/message/index.mdx | 471 -- .../signalwire/relay/state-enums/index.mdx | 928 ---- .../rust/signalwire/rest/client/index.mdx | 30 - .../rest/client/rest-client/index.mdx | 726 --- .../crud-resource/crud-resource/index.mdx | 231 - .../signalwire/rest/crud-resource/index.mdx | 30 - .../rust/signalwire/rest/error/index.mdx | 33 - .../error/signal-wire-rest-error/index.mdx | 190 - .../rest/http-client/http-client/index.mdx | 334 -- .../signalwire/rest/http-client/index.mdx | 99 - .../rest/http-client/stub-transport/index.mdx | 129 - .../rest/http-client/ureq-transport/index.mdx | 116 - .../rust/signalwire/rest/index.mdx | 41 - .../rest/namespaces/calling/index.mdx | 1082 ----- .../compat/compat-accounts/index.mdx | 172 - .../compat/compat-applications/index.mdx | 196 - .../namespaces/compat/compat-calls/index.mdx | 221 - .../compat/compat-conferences/index.mdx | 429 -- .../namespaces/compat/compat-faxes/index.mdx | 274 -- .../compat/compat-laml-bins/index.mdx | 196 - .../compat/compat-messages/index.mdx | 274 -- .../compat/compat-phone-numbers/index.mdx | 318 -- .../namespaces/compat/compat-queues/index.mdx | 276 -- .../compat/compat-recordings/index.mdx | 146 - .../namespaces/compat/compat-tokens/index.mdx | 148 - .../compat/compat-transcriptions/index.mdx | 146 - .../rest/namespaces/compat/index.mdx | 369 -- .../datasphere/datasphere-documents/index.mdx | 301 -- .../datasphere/datasphere-namespace/index.mdx | 76 - .../rest/namespaces/datasphere/index.mdx | 34 - .../fabric/call-flows-resource/index.mdx | 276 -- .../conference-rooms-resource/index.mdx | 222 - .../cxml-applications-resource/index.mdx | 202 - .../fabric/fabric-addresses/index.mdx | 122 - .../namespaces/fabric/fabric-tokens/index.mdx | 174 - .../fabric/generic-resources/index.mdx | 198 - .../rest/namespaces/fabric/index.mdx | 431 -- .../fabric/subscribers-resource/index.mdx | 359 -- .../rust/signalwire/rest/namespaces/index.mdx | 72 - .../namespaces/logs/conference-logs/index.mdx | 98 - .../rest/namespaces/logs/fax-logs/index.mdx | 122 - .../signalwire/rest/namespaces/logs/index.mdx | 170 - .../namespaces/logs/message-logs/index.mdx | 122 - .../rest/namespaces/logs/voice-logs/index.mdx | 148 - .../signalwire/rest/namespaces/mfa/index.mdx | 158 - .../rest/namespaces/number-groups/index.mdx | 30 - .../number-groups/number-groups/index.mdx | 303 -- .../rest/namespaces/project/index.mdx | 84 - .../project/project-tokens/index.mdx | 151 - .../rest/namespaces/queues/index.mdx | 275 -- .../rest/namespaces/registry/index.mdx | 169 - .../registry/registry-brands/index.mdx | 198 - .../registry/registry-campaigns/index.mdx | 202 - .../registry/registry-numbers/index.mdx | 98 - .../registry/registry-orders/index.mdx | 98 - .../rest/namespaces/sip-profile/index.mdx | 30 - .../sip-profile/sip-profile/index.mdx | 126 - .../rest/namespaces/video/index.mdx | 237 - .../video/video-conference-tokens/index.mdx | 124 - .../video/video-conferences/index.mdx | 274 -- .../video/video-room-recordings/index.mdx | 172 - .../video/video-room-sessions/index.mdx | 200 - .../video/video-room-tokens/index.mdx | 98 - .../namespaces/video/video-rooms/index.mdx | 250 - .../namespaces/video/video-streams/index.mdx | 148 - .../rust/signalwire/rest/pagination/index.mdx | 37 - .../pagination/paginated-iterator/index.mdx | 267 -- .../rust/signalwire/security/index.mdx | 35 - .../security/session-manager/index.mdx | 30 - .../session-manager/session-manager/index.mdx | 221 - .../security/webhook-layer/index.mdx | 56 - .../webhook-layer/webhook-layer/index.mdx | 160 - .../webhook-layer/webhook-validate/index.mdx | 135 - .../signalwire/security/webhook/index.mdx | 356 -- .../agent-server/agent-server/index.mdx | 507 -- .../signalwire/server/agent-server/index.mdx | 58 - .../rust/signalwire/server/error/index.mdx | 168 - .../rust/signalwire/server/index.mdx | 31 - .../signalwire/serverless/adapter/index.mdx | 346 -- .../rust/signalwire/serverless/index.mdx | 29 - .../api-ninjas-trivia/index.mdx | 178 - .../builtin/api-ninjas-trivia/index.mdx | 30 - .../claude-skills/claude-skills/index.mdx | 218 - .../skills/builtin/claude-skills/index.mdx | 30 - .../custom-skills/custom-skills/index.mdx | 178 - .../skills/builtin/custom-skills/index.mdx | 30 - .../datasphere-serverless/index.mdx | 218 - .../builtin/datasphere-serverless/index.mdx | 30 - .../skills/builtin/datasphere/index.mdx | 227 - .../skills/builtin/datetime/index.mdx | 178 - .../builtin/google-maps/google-maps/index.mdx | 198 - .../skills/builtin/google-maps/index.mdx | 30 - .../rust/signalwire/skills/builtin/index.mdx | 76 - .../skills/builtin/info-gatherer/index.mdx | 30 - .../info-gatherer/info-gatherer/index.mdx | 218 - .../signalwire/skills/builtin/joke/index.mdx | 198 - .../signalwire/skills/builtin/math/index.mdx | 178 - .../skills/builtin/mcp-gateway/index.mdx | 30 - .../builtin/mcp-gateway/mcp-gateway/index.mdx | 218 - .../builtin/native-vector-search/index.mdx | 30 - .../native-vector-search/index.mdx | 198 - .../builtin/play-background-file/index.mdx | 30 - .../play-background-file/index.mdx | 178 - .../skills/builtin/spider/index.mdx | 198 - .../skills/builtin/swml-transfer/index.mdx | 30 - .../swml-transfer/swml-transfer/index.mdx | 218 - .../skills/builtin/weather-api/index.mdx | 30 - .../builtin/weather-api/weather-api/index.mdx | 158 - .../skills/builtin/web-search/index.mdx | 30 - .../builtin/web-search/web-search/index.mdx | 271 -- .../skills/builtin/wikipedia-search/index.mdx | 30 - .../wikipedia-search/index.mdx | 183 - .../rust/signalwire/skills/index.mdx | 37 - .../signalwire/skills/skill-base/index.mdx | 455 -- .../skills/skill-base/skill-params/index.mdx | 330 -- .../signalwire/skills/skill-manager/index.mdx | 30 - .../skill-manager/skill-manager/index.mdx | 244 - .../signalwire/skills/skill-name/index.mdx | 516 --- .../parse-skill-name-error/index.mdx | 155 - .../skills/skill-registry/index.mdx | 48 - .../skill-registry/skill-registry/index.mdx | 166 - .../function-result/function-result/index.mdx | 1899 -------- .../swaig/function-result/index.mdx | 330 -- .../rust/signalwire/swaig/index.mdx | 35 - .../signalwire/swaig/media-enums/index.mdx | 1939 -------- .../parse-media-enum-error/index.mdx | 155 - .../signalwire/swaig/params-builder/index.mdx | 398 -- .../params-builder/params-builder/index.mdx | 531 --- .../params-builder/property-builder/index.mdx | 358 -- .../rust/signalwire/swml/document/index.mdx | 360 -- .../rust/signalwire/swml/index.mdx | 39 - .../rust/signalwire/swml/schema/index.mdx | 126 - .../swml/schema/verb-info/index.mdx | 84 - .../rust/signalwire/swml/service/index.mdx | 958 ---- .../swml/service/service-options/index.mdx | 212 - .../swml/service/tool-def/index.mdx | 65 - .../rust/signalwire/utils/index.mdx | 60 - .../signalwire/utils/schema-utils/index.mdx | 38 - .../utils/schema-utils/schema-utils/index.mdx | 323 -- .../schema-validation-error/index.mdx | 138 - .../schema-utils/verb-definition/index.mdx | 86 - .../signalwire/utils/url-validator/index.mdx | 89 - .../sdk-reference/typescript/_meta.json | 2 +- .../typescript/agent-base/index.mdx | 3741 --------------- .../typescript/agent-server/index.mdx | 416 -- .../typescript/agents/agent-base/index.mdx | 3743 +++++++++++++++ .../typescript/agents/agent-server/index.mdx | 418 ++ .../typescript/agents/auth-handler/index.mdx | 343 ++ .../agents/auth-handler/index__2.mdx | 58 + .../agents/cli/agent-loader/index.mdx | 87 + .../typescript/agents/cli/index.mdx | 24 + .../typescript/agents/cli/mock-data/index.mdx | 147 + .../agents/cli/swaig-test/index.mdx | 27 + .../typescript/agents/config-loader/index.mdx | 545 +++ .../agents/context-builder/context/index.mdx | 764 ++++ .../context-builder/gather-info/index.mdx | 147 + .../context-builder/gather-question/index.mdx | 117 + .../agents/context-builder/index.mdx | 284 ++ .../agents/context-builder/index__2.mdx | 34 + .../agents/context-builder/step/index.mdx | 637 +++ .../typescript/agents/data-map/index.mdx | 803 ++++ .../agents/function-result/index.mdx | 1698 +++++++ .../agents/function-result/index__2.mdx | 106 + .../agents/generate-verb-types/index.mdx | 27 + .../sdk-reference/typescript/agents/index.mdx | 132 + .../agents/livewire/agent-handoff/index.mdx | 53 + .../agents/livewire/agent-server/index.mdx | 117 + .../agents/livewire/agent-session/index.mdx | 289 ++ .../agents/livewire/agent/index.mdx | 376 ++ .../agents/livewire/chat-context/index.mdx | 85 + .../typescript/agents/livewire/index.mdx | 396 ++ .../agents/livewire/inference/index.mdx | 49 + .../agents/livewire/inference/llm/index.mdx | 65 + .../agents/livewire/inference/stt/index.mdx | 65 + .../agents/livewire/inference/tts/index.mdx | 65 + .../agents/livewire/job-context/index.mdx | 116 + .../agents/livewire/job-process/index.mdx | 52 + .../agents/livewire/noop-tracker/index.mdx | 124 + .../livewire/plugins/cartesia-tts/index.mdx | 55 + .../livewire/plugins/deepgram-stt/index.mdx | 55 + .../plugins/eleven-labs-tts/index.mdx | 55 + .../agents/livewire/plugins/index.mdx | 57 + .../livewire/plugins/open-aillm/index.mdx | 64 + .../livewire/plugins/silero-vad/index.mdx | 82 + .../typescript/agents/livewire/room/index.mdx | 52 + .../agents/livewire/run-context/index.mdx | 97 + .../agents/livewire/server-options/index.mdx | 58 + .../agents/livewire/stop-response/index.mdx | 59 + .../agents/livewire/tool-error/index.mdx | 59 + .../agents/livewire/worker-options/index.mdx | 58 + .../agents/parameter-schema/index.mdx | 664 +++ .../agents/parameter-schema/index__2.mdx | 73 + .../typescript/agents/pom-builder/index.mdx | 458 ++ .../agents/pom-builder/index__2.mdx | 66 + .../agents/pom-builder/pom-section/index.mdx | 217 + .../typescript/agents/pom/index.mdx | 28 + .../agents/pom/prompt-object-model/index.mdx | 333 ++ .../pom/prompt-object-model/index__2.mdx | 54 + .../pom/prompt-object-model/section/index.mdx | 274 ++ .../agents/prefabs/concierge-agent/index.mdx | 3701 +++++++++++++++ .../prefabs/concierge-agent/index__2.mdx | 70 + .../agents/prefabs/faq-bot-agent/index.mdx | 3698 +++++++++++++++ .../agents/prefabs/faq-bot-agent/index__2.mdx | 106 + .../typescript/agents/prefabs/index.mdx | 65 + .../prefabs/info-gatherer-agent/index.mdx | 3754 +++++++++++++++ .../prefabs/info-gatherer-agent/index__2.mdx | 86 + .../prefabs/receptionist-agent/index.mdx | 3687 +++++++++++++++ .../prefabs/receptionist-agent/index__2.mdx | 102 + .../agents/prefabs/survey-agent/index.mdx | 3712 +++++++++++++++ .../agents/prefabs/survey-agent/index__2.mdx | 126 + .../agents/prompt-manager/index.mdx | 351 ++ .../typescript/agents/schema-utils/index.mdx | 304 ++ .../agents/schema-utils/index__2.mdx | 74 + .../agents/serverless-adapter/index.mdx | 312 ++ .../agents/serverless-adapter/index__2.mdx | 98 + .../agents/session-manager/index.mdx | 482 ++ .../agents/session-manager/index__2.mdx | 46 + .../api-ninjas-trivia-skill/index.mdx | 709 +++ .../builtin/api-ninjas-trivia/index.mdx | 63 + .../ask-claude/ask-claude-skill/index.mdx | 716 +++ .../skills/builtin/ask-claude/index.mdx | 63 + .../claude-skills-skill/index.mdx | 731 +++ .../skills/builtin/claude-skills/index.mdx | 63 + .../custom-skills-skill/index.mdx | 746 +++ .../skills/builtin/custom-skills/index.mdx | 63 + .../data-sphere-serverless-skill/index.mdx | 716 +++ .../builtin/datasphere-serverless/index.mdx | 63 + .../datasphere/data-sphere-skill/index.mdx | 721 +++ .../skills/builtin/datasphere/index.mdx | 63 + .../datetime/date-time-skill/index.mdx | 717 +++ .../agents/skills/builtin/datetime/index.mdx | 63 + .../google-maps/google-maps-skill/index.mdx | 715 +++ .../skills/builtin/google-maps/index.mdx | 63 + .../agents/skills/builtin/index.mdx | 94 + .../skills/builtin/info-gatherer/index.mdx | 63 + .../info-gatherer-skill/index.mdx | 731 +++ .../agents/skills/builtin/joke/index.mdx | 63 + .../skills/builtin/joke/joke-skill/index.mdx | 716 +++ .../agents/skills/builtin/math/index.mdx | 63 + .../skills/builtin/math/math-skill/index.mdx | 717 +++ .../skills/builtin/mcp-gateway/index.mdx | 63 + .../mcp-gateway/mcp-gateway-skill/index.mdx | 720 +++ .../builtin/native-vector-search/index.mdx | 93 + .../native-vector-search-skill/index.mdx | 718 +++ .../builtin/play-background-file/index.mdx | 63 + .../play-background-file-skill/index.mdx | 719 +++ .../agents/skills/builtin/spider/index.mdx | 63 + .../builtin/spider/spider-skill/index.mdx | 718 +++ .../skills/builtin/swml-transfer/index.mdx | 63 + .../swml-transfer-skill/index.mdx | 721 +++ .../skills/builtin/weather-api/index.mdx | 63 + .../weather-api/weather-api-skill/index.mdx | 732 +++ .../skills/builtin/web-search/index.mdx | 63 + .../web-search/web-search-skill/index.mdx | 736 +++ .../skills/builtin/wikipedia-search/index.mdx | 63 + .../wikipedia-search-skill/index.mdx | 758 +++ .../typescript/agents/skills/index.mdx | 55 + .../agents/skills/skill-base/index.mdx | 757 +++ .../agents/skills/skill-base/index__2.mdx | 188 + .../agents/skills/skill-manager/index.mdx | 532 +++ .../agents/skills/skill-name/index.mdx | 94 + .../agents/skills/skill-registry/index.mdx | 599 +++ .../agents/skills/skill-registry/index__2.mdx | 68 + .../typescript/agents/ssl-config/index.mdx | 215 + .../typescript/agents/ssl-config/index__2.mdx | 58 + .../agents/swaig-function/index.mdx | 262 ++ .../agents/swaig-function/index__2.mdx | 82 + .../typescript/agents/swml-builder/index.mdx | 1609 +++++++ .../agents/swml-builder/index__2.mdx | 46 + .../swml-handler/ai-verb-handler/index.mdx | 140 + .../typescript/agents/swml-handler/index.mdx | 87 + .../swml-handler/swml-verb-handler/index.mdx | 150 + .../verb-handler-registry/index.mdx | 157 + .../typescript/agents/swml-service/index.mdx | 1225 +++++ .../agents/swml-service/index__2.mdx | 171 + .../swml-service/security-config/index.mdx | 128 + .../verb-handler-registry/index.mdx | 122 + .../typescript/agents/web-service/index.mdx | 272 ++ .../agents/web-service/index__2.mdx | 74 + .../typescript/auth-handler/index.mdx | 385 -- .../typescript/cli/agent-loader/index.mdx | 86 - .../typescript/cli/mock-data/index.mdx | 146 - .../typescript/cli/swaig-test/index.mdx | 26 - .../typescript/config-loader/index.mdx | 543 --- .../context-builder/context/index.mdx | 764 ---- .../context-builder/gather-info/index.mdx | 147 - .../context-builder/gather-question/index.mdx | 117 - .../typescript/context-builder/index.mdx | 302 -- .../typescript/context-builder/step/index.mdx | 637 --- .../sdk-reference/typescript/core/index.mdx | 34 + .../typescript/core/logger/index.mdx | 494 ++ .../typescript/core/security-utils/index.mdx | 280 ++ .../typescript/core/type-inference/index.mdx | 257 ++ .../typescript/core/types/index.mdx | 292 ++ .../core/webhook-middleware/index.mdx | 108 + .../core/webhook-validator/index.mdx | 175 + .../typescript/data-map/index.mdx | 801 ---- .../typescript/function-result/index.mdx | 1788 -------- .../typescript/generate-verb-types/index.mdx | 25 - .../sdk-reference/typescript/index.mdx | 65 +- .../sdk-reference/typescript/list-skills.mdx | 2 +- .../livewire/agent-handoff/index.mdx | 53 - .../livewire/agent-server/index.mdx | 117 - .../livewire/agent-session/index.mdx | 289 -- .../typescript/livewire/agent/index.mdx | 376 -- .../livewire/chat-context/index.mdx | 85 - .../typescript/livewire/index.mdx | 394 -- .../typescript/livewire/inference/index.mdx | 49 - .../livewire/inference/llm/index.mdx | 65 - .../livewire/inference/stt/index.mdx | 65 - .../livewire/inference/tts/index.mdx | 65 - .../typescript/livewire/job-context/index.mdx | 116 - .../typescript/livewire/job-process/index.mdx | 52 - .../livewire/noop-tracker/index.mdx | 124 - .../livewire/plugins/cartesia-tts/index.mdx | 55 - .../livewire/plugins/deepgram-stt/index.mdx | 55 - .../plugins/eleven-labs-tts/index.mdx | 55 - .../typescript/livewire/plugins/index.mdx | 57 - .../livewire/plugins/open-aillm/index.mdx | 64 - .../livewire/plugins/silero-vad/index.mdx | 82 - .../typescript/livewire/room/index.mdx | 52 - .../typescript/livewire/run-context/index.mdx | 97 - .../livewire/server-options/index.mdx | 58 - .../livewire/stop-response/index.mdx | 59 - .../typescript/livewire/tool-error/index.mdx | 59 - .../livewire/worker-options/index.mdx | 58 - .../sdk-reference/typescript/logger/index.mdx | 492 -- .../typescript/parameter-schema/index.mdx | 721 --- .../typescript/pom-builder/index.mdx | 508 -- .../pom-builder/pom-section/index.mdx | 217 - .../pom/prompt-object-model/index.mdx | 372 -- .../pom/prompt-object-model/section/index.mdx | 274 -- .../prefabs/concierge-agent/index.mdx | 3756 --------------- .../prefabs/faq-bot-agent/index.mdx | 3789 --------------- .../typescript/prefabs/index.mdx | 25 - .../prefabs/info-gatherer-agent/index.mdx | 3825 ---------------- .../prefabs/receptionist-agent/index.mdx | 3774 --------------- .../typescript/prefabs/survey-agent/index.mdx | 3823 ---------------- .../typescript/prompt-manager/index.mdx | 349 -- .../typescript/register-skill.mdx | 4 +- .../relay/action/ai-action/index.mdx | 4 +- .../relay/action/collect-action/index.mdx | 4 +- .../relay/action/detect-action/index.mdx | 4 +- .../relay/action/fax-action/index.mdx | 4 +- .../typescript/relay/action/index.mdx | 103 +- .../typescript/relay/action/index__2.mdx | 110 + .../relay/action/pay-action/index.mdx | 4 +- .../relay/action/play-action/index.mdx | 4 +- .../relay/action/record-action/index.mdx | 4 +- .../standalone-collect-action/index.mdx | 4 +- .../relay/action/stream-action/index.mdx | 4 +- .../relay/action/tap-action/index.mdx | 4 +- .../relay/action/transcribe-action/index.mdx | 4 +- .../typescript/relay/call/index.mdx | 62 +- .../typescript/relay/call/index__2.mdx | 61 + .../typescript/relay/closed-sets/index.mdx | 1 + .../typescript/relay/constants/index.mdx | 1 + .../typescript/relay/deferred/index.mdx | 131 - .../sdk-reference/typescript/relay/index.mdx | 163 + .../typescript/relay/message/index.mdx | 3 +- .../typescript/relay/normalize/index.mdx | 1 + .../typescript/relay/relay-client/index.mdx | 9 +- .../typescript/relay/relay-error/index.mdx | 1 + .../relay-event/call-receive-event/index.mdx | 2 +- .../relay-event/call-state-event/index.mdx | 2 +- .../relay-event/calling-error-event/index.mdx | 2 +- .../relay/relay-event/collect-event/index.mdx | 2 +- .../relay-event/conference-event/index.mdx | 2 +- .../relay/relay-event/connect-event/index.mdx | 2 +- .../relay/relay-event/denoise-event/index.mdx | 2 +- .../relay/relay-event/detect-event/index.mdx | 2 +- .../relay/relay-event/dial-event/index.mdx | 2 +- .../relay/relay-event/echo-event/index.mdx | 2 +- .../relay/relay-event/fax-event/index.mdx | 2 +- .../relay/relay-event/hold-event/index.mdx | 2 +- .../typescript/relay/relay-event/index.mdx | 97 +- .../typescript/relay/relay-event/index__2.mdx | 110 + .../message-receive-event/index.mdx | 2 +- .../relay-event/message-state-event/index.mdx | 2 +- .../relay/relay-event/pay-event/index.mdx | 2 +- .../relay/relay-event/play-event/index.mdx | 2 +- .../relay/relay-event/queue-event/index.mdx | 2 +- .../relay/relay-event/record-event/index.mdx | 2 +- .../relay/relay-event/refer-event/index.mdx | 2 +- .../relay-event/send-digits-event/index.mdx | 2 +- .../relay/relay-event/stream-event/index.mdx | 2 +- .../relay/relay-event/tap-event/index.mdx | 2 +- .../relay-event/transcribe-event/index.mdx | 2 +- .../typescript/relay/types/index.mdx | 1 + .../rest/base/base-resource/index.mdx | 1 + .../rest/base/crud-resource/index.mdx | 1 + .../rest/base/crud-with-addresses/index.mdx | 1 + .../typescript/rest/base/index.mdx | 30 + .../typescript/rest/call-handler/index.mdx | 1 + .../typescript/rest/http-client/index.mdx | 1 + .../sdk-reference/typescript/rest/index.mdx | 22 + .../rest/namespaces/addresses/index.mdx | 1 + .../rest/namespaces/calling/index.mdx | 1 + .../typescript/rest/namespaces/chat/index.mdx | 1 + .../rest/namespaces/compat/index.mdx | 1 + .../rest/namespaces/datasphere/index.mdx | 1 + .../rest/namespaces/fabric/index.mdx | 1 + .../namespaces/imported-numbers/index.mdx | 1 + .../typescript/rest/namespaces/index.mdx | 60 + .../typescript/rest/namespaces/logs/index.mdx | 1 + .../rest/namespaces/lookup/index.mdx | 1 + .../typescript/rest/namespaces/mfa/index.mdx | 1 + .../rest/namespaces/number-groups/index.mdx | 1 + .../rest/namespaces/phone-numbers/index.mdx | 1 + .../rest/namespaces/project/index.mdx | 1 + .../rest/namespaces/pubsub/index.mdx | 1 + .../rest/namespaces/queues/index.mdx | 1 + .../rest/namespaces/recordings/index.mdx | 1 + .../rest/namespaces/registry/index.mdx | 1 + .../rest/namespaces/short-codes/index.mdx | 1 + .../rest/namespaces/sip-profile/index.mdx | 1 + .../namespaces/verified-callers/index.mdx | 1 + .../rest/namespaces/video/index.mdx | 1 + .../typescript/rest/pagination/index.mdx | 1 + .../typescript/rest/rest-error/index.mdx | 1 + .../typescript/rest/types/index.mdx | 1 + .../typescript/schema-utils/index.mdx | 362 -- .../typescript/security-utils/index.mdx | 278 -- .../typescript/serverless-adapter/index.mdx | 394 -- .../typescript/session-manager/index.mdx | 512 --- .../api-ninjas-trivia-skill/index.mdx | 709 --- .../builtin/api-ninjas-trivia/index.mdx | 62 - .../ask-claude/ask-claude-skill/index.mdx | 716 --- .../skills/builtin/ask-claude/index.mdx | 62 - .../claude-skills-skill/index.mdx | 731 --- .../skills/builtin/claude-skills/index.mdx | 62 - .../custom-skills-skill/index.mdx | 746 --- .../skills/builtin/custom-skills/index.mdx | 62 - .../data-sphere-serverless-skill/index.mdx | 716 --- .../builtin/datasphere-serverless/index.mdx | 62 - .../datasphere/data-sphere-skill/index.mdx | 721 --- .../skills/builtin/datasphere/index.mdx | 62 - .../datetime/date-time-skill/index.mdx | 717 --- .../skills/builtin/datetime/index.mdx | 62 - .../google-maps/google-maps-skill/index.mdx | 715 --- .../skills/builtin/google-maps/index.mdx | 62 - .../typescript/skills/builtin/index.mdx | 51 - .../skills/builtin/info-gatherer/index.mdx | 62 - .../info-gatherer-skill/index.mdx | 731 --- .../typescript/skills/builtin/joke/index.mdx | 62 - .../skills/builtin/joke/joke-skill/index.mdx | 716 --- .../typescript/skills/builtin/math/index.mdx | 62 - .../skills/builtin/math/math-skill/index.mdx | 717 --- .../skills/builtin/mcp-gateway/index.mdx | 62 - .../mcp-gateway/mcp-gateway-skill/index.mdx | 720 --- .../builtin/native-vector-search/index.mdx | 92 - .../native-vector-search-skill/index.mdx | 718 --- .../builtin/play-background-file/index.mdx | 62 - .../play-background-file-skill/index.mdx | 719 --- .../skills/builtin/spider/index.mdx | 62 - .../builtin/spider/spider-skill/index.mdx | 718 --- .../skills/builtin/swml-transfer/index.mdx | 62 - .../swml-transfer-skill/index.mdx | 721 --- .../skills/builtin/weather-api/index.mdx | 62 - .../weather-api/weather-api-skill/index.mdx | 732 --- .../skills/builtin/web-search/index.mdx | 62 - .../web-search/web-search-skill/index.mdx | 736 --- .../skills/builtin/wikipedia-search/index.mdx | 62 - .../wikipedia-search-skill/index.mdx | 758 --- .../sdk-reference/typescript/skills/index.mdx | 25 - .../typescript/skills/skill-base/index.mdx | 930 ---- .../typescript/skills/skill-manager/index.mdx | 531 --- .../typescript/skills/skill-name/index.mdx | 93 - .../skills/skill-registry/index.mdx | 652 --- .../typescript/ssl-config/index.mdx | 257 -- .../typescript/swaig-function/index.mdx | 328 -- .../typescript/swml-builder/index.mdx | 1639 ------- .../swml-handler/ai-verb-handler/index.mdx | 140 - .../typescript/swml-handler/index.mdx | 85 - .../swml-handler/swml-verb-handler/index.mdx | 150 - .../verb-handler-registry/index.mdx | 157 - .../typescript/swml-service/index.mdx | 1380 ------ .../swml-service/security-config/index.mdx | 128 - .../verb-handler-registry/index.mdx | 122 - .../swml-verb-methods.generated/index.mdx | 111 - .../typescript/type-inference/index.mdx | 255 -- .../sdk-reference/typescript/types/index.mdx | 290 -- .../typescript/web-service/index.mdx | 330 -- .../typescript/webhook-middleware/index.mdx | 106 - .../typescript/webhook-validator/index.mdx | 173 - 4017 files changed, 416957 insertions(+), 412288 deletions(-) create mode 100644 fern/products/sdk-reference/cpp/agents/agent/agent-base/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/agent/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/agent/language-config/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/agent/pronunciation/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/agent/swaig-query-param/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/contexts/context-builder/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/contexts/context/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/contexts/gather-info/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/contexts/gather-question/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/contexts/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/contexts/step/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/datamap/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/pom/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/pom/prompt-object-model/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/pom/section/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/prefabs/concierge-agent/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/prefabs/faq-bot-agent/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/prefabs/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/prefabs/info-gatherer-agent/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/prefabs/receptionist-agent/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/prefabs/survey-agent/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/server/agent-server/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/server/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/server/tls-server-config/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/skills/api-ninjas-trivia-skill-r/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/skills/api-ninjas-trivia-skill/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/skills/claude-skills-skill-r/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/skills/claude-skills-skill/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/skills/custom-skills-skill-r/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/skills/custom-skills-skill/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/skills/datasphere-serverless-skill-r/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/skills/datasphere-serverless-skill/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/skills/datasphere-skill-r/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/skills/datasphere-skill/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/skills/date-time-skill/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/skills/google-maps-skill-r/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/skills/google-maps-skill/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/skills/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/skills/info-gatherer-skill-r/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/skills/info-gatherer-skill/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/skills/joke-skill-r/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/skills/joke-skill/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/skills/math-skill-r/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/skills/math-skill/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/skills/mcp-gateway-skill-r/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/skills/mcp-gateway-skill/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/skills/native-vector-search-skill-r/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/skills/native-vector-search-skill/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/skills/play-background-file-skill-r/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/skills/play-background-file-skill/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/skills/skill-base/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/skills/skill-http-response/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/skills/skill-manager/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/skills/skill-prompt-section/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/skills/skill-registry/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/skills/spider-skill-r/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/skills/spider-skill/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/skills/swml-transfer-skill-r/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/skills/swml-transfer-skill/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/skills/weather-api-skill-r/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/skills/weather-api-skill/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/skills/web-search-core/candidate/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/skills/web-search-core/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/skills/web-search-core/latency-params/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/skills/web-search-skill-r/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/skills/web-search-skill/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/skills/wikipedia-search-skill-r/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/skills/wikipedia-search-skill/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/swaig/enum-or-string/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/swaig/function-result/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/swaig/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/swaig/join-conference-options/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/swaig/parameter-schema/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/swaig/tool-definition/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/swml/document/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/swml/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/swml/schema/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/swml/section/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/swml/service/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/swml/verb-definition/index.mdx create mode 100644 fern/products/sdk-reference/cpp/agents/swml/verb/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/c-tool-context/index.mdx create mode 100644 fern/products/sdk-reference/cpp/core/core/index.mdx create mode 100644 fern/products/sdk-reference/cpp/core/core/logging-config/index.mdx create mode 100644 fern/products/sdk-reference/cpp/core/index.mdx create mode 100644 fern/products/sdk-reference/cpp/core/logging/index.mdx create mode 100644 fern/products/sdk-reference/cpp/core/logging/logger/index.mdx create mode 100644 fern/products/sdk-reference/cpp/core/security/index.mdx create mode 100644 fern/products/sdk-reference/cpp/core/security/session-manager/index.mdx create mode 100644 fern/products/sdk-reference/cpp/core/security/webhook-validator-options/index.mdx create mode 100644 fern/products/sdk-reference/cpp/core/utils/index.mdx create mode 100644 fern/products/sdk-reference/cpp/core/utils/schema-utils/index.mdx create mode 100644 fern/products/sdk-reference/cpp/core/utils/schema-validation-error/index.mdx create mode 100644 fern/products/sdk-reference/cpp/core/utils/url-validator/index.mdx create mode 100644 fern/products/sdk-reference/cpp/core/utils/verb-info/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/httplib/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/ix/index.mdx create mode 100644 fern/products/sdk-reference/cpp/relay/action/index.mdx create mode 100644 fern/products/sdk-reference/cpp/relay/call-event/index.mdx create mode 100644 fern/products/sdk-reference/cpp/relay/call/index.mdx create mode 100644 fern/products/sdk-reference/cpp/relay/component-event/index.mdx create mode 100644 fern/products/sdk-reference/cpp/relay/device/index.mdx create mode 100644 fern/products/sdk-reference/cpp/relay/dial-event/index.mdx create mode 100644 fern/products/sdk-reference/cpp/relay/index.mdx create mode 100644 fern/products/sdk-reference/cpp/relay/message-event/index.mdx create mode 100644 fern/products/sdk-reference/cpp/relay/message/index.mdx create mode 100644 fern/products/sdk-reference/cpp/relay/relay-client/index.mdx create mode 100644 fern/products/sdk-reference/cpp/relay/relay-config/index.mdx create mode 100644 fern/products/sdk-reference/cpp/relay/relay-event/index.mdx create mode 100644 fern/products/sdk-reference/cpp/relay/web-socket-client/index.mdx create mode 100644 fern/products/sdk-reference/cpp/rest/crud-resource/index.mdx create mode 100644 fern/products/sdk-reference/cpp/rest/http-client/index.mdx create mode 100644 fern/products/sdk-reference/cpp/rest/index.mdx create mode 100644 fern/products/sdk-reference/cpp/rest/paginated-iterator/index.mdx create mode 100644 fern/products/sdk-reference/cpp/rest/rest-client/addresses-namespace/index.mdx create mode 100644 fern/products/sdk-reference/cpp/rest/rest-client/calling-namespace/index.mdx create mode 100644 fern/products/sdk-reference/cpp/rest/rest-client/chat-namespace/index.mdx create mode 100644 fern/products/sdk-reference/cpp/rest/rest-client/compat-accounts/index.mdx create mode 100644 fern/products/sdk-reference/cpp/rest/rest-client/compat-applications/index.mdx create mode 100644 fern/products/sdk-reference/cpp/rest/rest-client/compat-calls/index.mdx create mode 100644 fern/products/sdk-reference/cpp/rest/rest-client/compat-conferences/index.mdx create mode 100644 fern/products/sdk-reference/cpp/rest/rest-client/compat-faxes/index.mdx create mode 100644 fern/products/sdk-reference/cpp/rest/rest-client/compat-laml-bins/index.mdx create mode 100644 fern/products/sdk-reference/cpp/rest/rest-client/compat-messages/index.mdx create mode 100644 fern/products/sdk-reference/cpp/rest/rest-client/compat-namespace/index.mdx create mode 100644 fern/products/sdk-reference/cpp/rest/rest-client/compat-phone-numbers/index.mdx create mode 100644 fern/products/sdk-reference/cpp/rest/rest-client/compat-queues/index.mdx create mode 100644 fern/products/sdk-reference/cpp/rest/rest-client/compat-recordings/index.mdx create mode 100644 fern/products/sdk-reference/cpp/rest/rest-client/compat-tokens/index.mdx create mode 100644 fern/products/sdk-reference/cpp/rest/rest-client/compat-transcriptions/index.mdx create mode 100644 fern/products/sdk-reference/cpp/rest/rest-client/datasphere-documents/index.mdx create mode 100644 fern/products/sdk-reference/cpp/rest/rest-client/datasphere-namespace/index.mdx create mode 100644 fern/products/sdk-reference/cpp/rest/rest-client/fabric-addresses/index.mdx create mode 100644 fern/products/sdk-reference/cpp/rest/rest-client/fabric-call-flows/index.mdx create mode 100644 fern/products/sdk-reference/cpp/rest/rest-client/fabric-conference-rooms/index.mdx create mode 100644 fern/products/sdk-reference/cpp/rest/rest-client/fabric-cxml-applications/index.mdx create mode 100644 fern/products/sdk-reference/cpp/rest/rest-client/fabric-generic-resources/index.mdx create mode 100644 fern/products/sdk-reference/cpp/rest/rest-client/fabric-namespace/index.mdx create mode 100644 fern/products/sdk-reference/cpp/rest/rest-client/fabric-resource-put/index.mdx create mode 100644 fern/products/sdk-reference/cpp/rest/rest-client/fabric-resource/index.mdx create mode 100644 fern/products/sdk-reference/cpp/rest/rest-client/fabric-subscribers/index.mdx create mode 100644 fern/products/sdk-reference/cpp/rest/rest-client/fabric-tokens/index.mdx create mode 100644 fern/products/sdk-reference/cpp/rest/rest-client/imported-numbers-namespace/index.mdx create mode 100644 fern/products/sdk-reference/cpp/rest/rest-client/index.mdx create mode 100644 fern/products/sdk-reference/cpp/rest/rest-client/index__2.mdx create mode 100644 fern/products/sdk-reference/cpp/rest/rest-client/logs-conferences/index.mdx create mode 100644 fern/products/sdk-reference/cpp/rest/rest-client/logs-fax/index.mdx create mode 100644 fern/products/sdk-reference/cpp/rest/rest-client/logs-messages/index.mdx create mode 100644 fern/products/sdk-reference/cpp/rest/rest-client/logs-namespace/index.mdx create mode 100644 fern/products/sdk-reference/cpp/rest/rest-client/logs-voice/index.mdx create mode 100644 fern/products/sdk-reference/cpp/rest/rest-client/lookup-namespace/index.mdx create mode 100644 fern/products/sdk-reference/cpp/rest/rest-client/mfa-namespace/index.mdx create mode 100644 fern/products/sdk-reference/cpp/rest/rest-client/number-groups-namespace/index.mdx create mode 100644 fern/products/sdk-reference/cpp/rest/rest-client/phone-numbers-namespace/call-flow-options/index.mdx create mode 100644 fern/products/sdk-reference/cpp/rest/rest-client/phone-numbers-namespace/cxml-webhook-options/index.mdx create mode 100644 fern/products/sdk-reference/cpp/rest/rest-client/phone-numbers-namespace/index.mdx create mode 100644 fern/products/sdk-reference/cpp/rest/rest-client/phone-numbers-namespace/index__2.mdx create mode 100644 fern/products/sdk-reference/cpp/rest/rest-client/phone-numbers-namespace/relay-topic-options/index.mdx create mode 100644 fern/products/sdk-reference/cpp/rest/rest-client/project-namespace/index.mdx create mode 100644 fern/products/sdk-reference/cpp/rest/rest-client/project-tokens/index.mdx create mode 100644 fern/products/sdk-reference/cpp/rest/rest-client/pub-sub-namespace/index.mdx create mode 100644 fern/products/sdk-reference/cpp/rest/rest-client/queues-namespace/index.mdx create mode 100644 fern/products/sdk-reference/cpp/rest/rest-client/recordings-namespace/index.mdx create mode 100644 fern/products/sdk-reference/cpp/rest/rest-client/registry-brands/index.mdx create mode 100644 fern/products/sdk-reference/cpp/rest/rest-client/registry-campaigns/index.mdx create mode 100644 fern/products/sdk-reference/cpp/rest/rest-client/registry-namespace/index.mdx create mode 100644 fern/products/sdk-reference/cpp/rest/rest-client/registry-numbers/index.mdx create mode 100644 fern/products/sdk-reference/cpp/rest/rest-client/registry-orders/index.mdx create mode 100644 fern/products/sdk-reference/cpp/rest/rest-client/short-codes-namespace/index.mdx create mode 100644 fern/products/sdk-reference/cpp/rest/rest-client/sip-profile-namespace/index.mdx create mode 100644 fern/products/sdk-reference/cpp/rest/rest-client/verified-callers-namespace/index.mdx create mode 100644 fern/products/sdk-reference/cpp/rest/rest-client/video-conference-tokens/index.mdx create mode 100644 fern/products/sdk-reference/cpp/rest/rest-client/video-conferences/index.mdx create mode 100644 fern/products/sdk-reference/cpp/rest/rest-client/video-namespace/index.mdx create mode 100644 fern/products/sdk-reference/cpp/rest/rest-client/video-room-recordings/index.mdx create mode 100644 fern/products/sdk-reference/cpp/rest/rest-client/video-room-sessions/index.mdx create mode 100644 fern/products/sdk-reference/cpp/rest/rest-client/video-room-tokens/index.mdx create mode 100644 fern/products/sdk-reference/cpp/rest/rest-client/video-rooms/index.mdx create mode 100644 fern/products/sdk-reference/cpp/rest/rest-client/video-streams/index.mdx create mode 100644 fern/products/sdk-reference/cpp/rest/signal-wire-rest-error/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/agent/agent-base/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/agent/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/agent/language-config/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/agent/pronunciation/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/agent/swaig-query-param/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/contexts/context-builder/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/contexts/context/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/contexts/gather-info/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/contexts/gather-question/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/contexts/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/contexts/step/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/core/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/core/logging-config/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/datamap/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/logging/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/logging/logger/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/pom/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/pom/prompt-object-model/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/pom/section/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/prefabs/concierge-agent/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/prefabs/faq-bot-agent/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/prefabs/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/prefabs/info-gatherer-agent/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/prefabs/receptionist-agent/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/prefabs/survey-agent/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/relay/action/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/relay/call-event/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/relay/call/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/relay/component-event/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/relay/device/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/relay/dial-event/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/relay/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/relay/message-event/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/relay/message/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/relay/relay-client/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/relay/relay-config/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/relay/relay-event/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/relay/web-socket-client/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/crud-resource/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/http-client/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/paginated-iterator/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/addresses-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/calling-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/chat-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-accounts/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-applications/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-calls/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-conferences/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-faxes/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-laml-bins/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-messages/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-phone-numbers/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-queues/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-recordings/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-tokens/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-transcriptions/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/datasphere-documents/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/datasphere-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-addresses/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-call-flows/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-conference-rooms/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-cxml-applications/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-generic-resources/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-resource-put/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-resource/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-subscribers/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-tokens/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/imported-numbers-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/logs-conferences/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/logs-fax/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/logs-messages/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/logs-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/logs-voice/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/lookup-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/mfa-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/number-groups-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/phone-numbers-namespace/call-flow-options/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/phone-numbers-namespace/cxml-webhook-options/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/phone-numbers-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/phone-numbers-namespace/relay-topic-options/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/project-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/project-tokens/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/pub-sub-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/queues-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/recordings-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/registry-brands/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/registry-campaigns/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/registry-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/registry-numbers/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/registry-orders/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/short-codes-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/sip-profile-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/verified-callers-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/video-conference-tokens/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/video-conferences/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/video-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/video-room-recordings/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/video-room-sessions/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/video-room-tokens/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/video-rooms/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/rest-client/video-streams/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/rest/signal-wire-rest-error/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/security/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/security/session-manager/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/security/webhook-validator-options/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/server/agent-server/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/server/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/server/tls-server-config/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/api-ninjas-trivia-skill-r/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/api-ninjas-trivia-skill/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/claude-skills-skill-r/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/claude-skills-skill/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/custom-skills-skill-r/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/custom-skills-skill/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/datasphere-serverless-skill-r/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/datasphere-serverless-skill/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/datasphere-skill-r/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/datasphere-skill/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/date-time-skill/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/google-maps-skill-r/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/google-maps-skill/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/info-gatherer-skill-r/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/info-gatherer-skill/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/joke-skill-r/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/joke-skill/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/math-skill-r/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/math-skill/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/mcp-gateway-skill-r/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/mcp-gateway-skill/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/native-vector-search-skill-r/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/native-vector-search-skill/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/play-background-file-skill-r/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/play-background-file-skill/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/skill-base/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/skill-http-response/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/skill-manager/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/skill-prompt-section/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/skill-registry/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/spider-skill-r/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/spider-skill/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/swml-transfer-skill-r/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/swml-transfer-skill/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/weather-api-skill-r/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/weather-api-skill/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/web-search-core/candidate/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/web-search-core/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/web-search-core/latency-params/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/web-search-skill-r/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/web-search-skill/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/wikipedia-search-skill-r/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/skills/wikipedia-search-skill/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/swaig/enum-or-string/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/swaig/function-result/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/swaig/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/swaig/join-conference-options/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/swaig/parameter-schema/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/swaig/tool-definition/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/swml/document/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/swml/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/swml/schema/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/swml/section/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/swml/service/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/swml/verb-definition/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/swml/verb/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/utils/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/utils/schema-utils/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/utils/schema-validation-error/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/utils/url-validator/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/utils/verb-info/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/std/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/agent/agent-base/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/agent/agent-options/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/agent/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/contexts/context-builder/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/contexts/context/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/contexts/gather-info/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/contexts/gather-question/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/contexts/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/contexts/reserved-tool-names/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/contexts/step/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/data-map/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/data-map/index__2.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/pom/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/pom/pom-builder/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/pom/prompt-object-model/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/pom/section/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/prefabs/concierge-agent/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/prefabs/faq-bot-agent/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/prefabs/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/prefabs/info-gatherer-agent/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/prefabs/receptionist-agent/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/prefabs/survey-agent/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/server/agent-server/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/server/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/serverless/adapter/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/serverless/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/skills-builtin/api-ninjas-trivia-skill/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/skills-builtin/claude-skills-skill/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/skills-builtin/custom-skills-skill/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/skills-builtin/datasphere-serverless-skill/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/skills-builtin/datasphere-skill/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/skills-builtin/datetime-skill/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/skills-builtin/google-maps-skill/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/skills-builtin/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/skills-builtin/info-gatherer-skill/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/skills-builtin/joke-skill/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/skills-builtin/math-skill/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/skills-builtin/mcp-gateway-skill/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/skills-builtin/native-vector-search-skill/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/skills-builtin/play-background-file-skill/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/skills-builtin/spider-skill/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/skills-builtin/swml-transfer-skill/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/skills-builtin/weather-api-skill/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/skills-builtin/web-search-skill/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/skills-builtin/wikipedia-search-skill/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/skills/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/skills/skill-base/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/skills/skill-manager/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/skills/skill-name-extensions/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/skills/skill-registry/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/swaig/callback-method-extensions/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/swaig/codec-extensions/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/swaig/conference-beep-extensions/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/swaig/conference-record-extensions/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/swaig/conference-trim-extensions/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/swaig/function-result/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/swaig/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/swaig/join-conference-options/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/swaig/parameter-schema/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/swaig/record-direction-extensions/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/swaig/record-format-extensions/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/swaig/tap-direction-extensions/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/swml/document/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/swml/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/swml/schema-validation-error/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/swml/schema/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/swml/service-options/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/swml/service/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/swml/swml-builder/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/swml/swml-renderer/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/swml/verb-info/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/core/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/core/logging/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/core/logging/logger/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/core/security/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/core/security/session-manager/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/core/security/webhook-validation-middleware/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/core/security/webhook-validator/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/core/utils/execution-mode/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/core/utils/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/core/utils/url-validator/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/relay/action/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/relay/ai-action/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/relay/call-state-extensions/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/relay/call/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/relay/client/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/relay/collect-action/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/relay/constants/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/relay/detect-action/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/relay/device/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/relay/dial-state-extensions/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/relay/event/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/relay/fax-action/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/relay/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/relay/message-state-extensions/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/relay/message/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/relay/pay-action/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/relay/play-action/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/relay/record-action/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/relay/stream-action/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/relay/tap-action/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/relay/transcribe-action/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/rest/crud-resource/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/rest/crud-with-addresses/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/rest/http-client/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/rest/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/rest/namespaces/addresses/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/rest/namespaces/call-flows-helper/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/rest/namespaces/calling/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/rest/namespaces/compat-accounts/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/rest/namespaces/compat-applications/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/rest/namespaces/compat-calls/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/rest/namespaces/compat-conferences/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/rest/namespaces/compat-faxes/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/rest/namespaces/compat-laml-bins/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/rest/namespaces/compat-messages/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/rest/namespaces/compat-phone-numbers/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/rest/namespaces/compat-queues/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/rest/namespaces/compat-recordings/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/rest/namespaces/compat-tokens/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/rest/namespaces/compat-transcriptions/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/rest/namespaces/compat/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/rest/namespaces/conference-logs/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/rest/namespaces/conference-rooms-helper/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/rest/namespaces/cxml-applications-helper/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/rest/namespaces/datasphere-documents/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/rest/namespaces/datasphere-ns/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/rest/namespaces/fabric-addresses/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/rest/namespaces/fabric-resources/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/rest/namespaces/fabric-tokens/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/rest/namespaces/fabric/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/rest/namespaces/fax-logs/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/rest/namespaces/imported-numbers/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/rest/namespaces/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/rest/namespaces/logs/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/rest/namespaces/message-logs/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/rest/namespaces/mfa/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/rest/namespaces/number-groups/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/rest/namespaces/project-tokens/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/rest/namespaces/project/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/rest/namespaces/queues/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/rest/namespaces/recordings/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/rest/namespaces/registry-brands/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/rest/namespaces/registry-campaigns/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/rest/namespaces/registry-numbers/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/rest/namespaces/registry-orders/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/rest/namespaces/registry/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/rest/namespaces/short-codes/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/rest/namespaces/sip-profile/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/rest/namespaces/subscribers-helper/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/rest/namespaces/video-conference-tokens/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/rest/namespaces/video-conferences/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/rest/namespaces/video-room-recordings/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/rest/namespaces/video-room-sessions/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/rest/namespaces/video-room-tokens/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/rest/namespaces/video-rooms/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/rest/namespaces/video-streams/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/rest/namespaces/video/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/rest/namespaces/voice-logs/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/rest/paginated-iterator/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/rest/rest-client/index.mdx create mode 100644 fern/products/sdk-reference/dotnet/rest/signal-wire-rest-error/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.agent/agent-base/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.agent/agent-options/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.agent/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.contexts/context-builder/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.contexts/context/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.contexts/gather-info/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.contexts/gather-question/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.contexts/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.contexts/reserved-tool-names/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.contexts/step/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.data-map/data-map/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.data-map/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.logging/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.logging/logger/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.pom/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.pom/pom-builder/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.pom/prompt-object-model/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.pom/section/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.prefabs/concierge-agent/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.prefabs/faq-bot-agent/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.prefabs/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.prefabs/info-gatherer-agent/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.prefabs/receptionist-agent/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.prefabs/survey-agent/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.relay/action/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.relay/ai-action/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.relay/call-state-extensions/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.relay/call/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.relay/client/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.relay/collect-action/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.relay/constants/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.relay/detect-action/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.relay/device/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.relay/dial-state-extensions/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.relay/event/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.relay/fax-action/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.relay/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.relay/message-state-extensions/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.relay/message/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.relay/pay-action/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.relay/play-action/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.relay/record-action/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.relay/stream-action/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.relay/tap-action/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.relay/transcribe-action/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/addresses/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/call-flows-helper/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/calling/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-accounts/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-applications/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-calls/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-conferences/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-faxes/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-laml-bins/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-messages/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-phone-numbers/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-queues/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-recordings/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-tokens/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-transcriptions/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/conference-logs/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/conference-rooms-helper/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/cxml-applications-helper/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/datasphere-documents/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/datasphere-ns/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/fabric-addresses/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/fabric-resources/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/fabric-tokens/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/fabric/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/fax-logs/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/imported-numbers/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/logs/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/message-logs/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/mfa/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/number-groups/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/project-tokens/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/project/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/queues/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/recordings/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/registry-brands/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/registry-campaigns/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/registry-numbers/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/registry-orders/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/registry/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/short-codes/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/sip-profile/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/subscribers-helper/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/video-conference-tokens/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/video-conferences/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/video-room-recordings/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/video-room-sessions/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/video-room-tokens/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/video-rooms/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/video-streams/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/video/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/voice-logs/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest/crud-resource/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest/crud-with-addresses/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest/http-client/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest/paginated-iterator/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest/rest-client/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.rest/signal-wire-rest-error/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.security/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.security/session-manager/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.security/webhook-validation-middleware/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.security/webhook-validator/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.server/agent-server/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.server/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.serverless/adapter/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.serverless/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/api-ninjas-trivia-skill/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/claude-skills-skill/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/custom-skills-skill/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/datasphere-serverless-skill/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/datasphere-skill/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/datetime-skill/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/google-maps-skill/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/info-gatherer-skill/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/joke-skill/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/math-skill/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/mcp-gateway-skill/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/native-vector-search-skill/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/play-background-file-skill/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/spider-skill/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/swml-transfer-skill/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/weather-api-skill/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/web-search-skill/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/wikipedia-search-skill/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.skills/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.skills/skill-base/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.skills/skill-manager/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.skills/skill-name-extensions/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.skills/skill-registry/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.swaig/callback-method-extensions/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.swaig/codec-extensions/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.swaig/conference-beep-extensions/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.swaig/conference-record-extensions/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.swaig/conference-trim-extensions/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.swaig/function-result/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.swaig/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.swaig/join-conference-options/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.swaig/parameter-schema/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.swaig/record-direction-extensions/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.swaig/record-format-extensions/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.swaig/tap-direction-extensions/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.swml/document/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.swml/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.swml/schema-validation-error/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.swml/schema/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.swml/service-options/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.swml/service/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.swml/swml-builder/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.swml/swml-renderer/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.swml/verb-info/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.utils/execution-mode/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.utils/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/signal-wire.utils/url-validator/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/agent/agent/agent-base/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/agent/agent/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/agent/agent/mcp-server-config/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/agent/agent/tool-definition/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/agent/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/contexts/contexts/context-builder/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/contexts/contexts/context/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/contexts/contexts/gather-info/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/contexts/contexts/gather-question/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/contexts/contexts/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/contexts/contexts/step/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/contexts/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/datamap/datamap/expression-pattern/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/datamap/datamap/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/datamap/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/datamap/index__2.mdx create mode 100644 fern/products/sdk-reference/go/agents/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/lambda/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/lambda/lambda/handler/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/lambda/lambda/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/livewire/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/livewire/livewire/agent-handoff/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/livewire/livewire/agent-session/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/livewire/livewire/agent/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/livewire/livewire/cartesia-tts/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/livewire/livewire/chat-context/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/livewire/livewire/chat-message/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/livewire/livewire/deepgram-stt/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/livewire/livewire/eleven-labs-tts/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/livewire/livewire/google-stt/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/livewire/livewire/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/livewire/livewire/inference-llm/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/livewire/livewire/inference-stt/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/livewire/livewire/inference-tts/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/livewire/livewire/job-context/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/livewire/livewire/job-process/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/livewire/livewire/live-server/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/livewire/livewire/open-aillm/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/livewire/livewire/open-aitts/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/livewire/livewire/room/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/livewire/livewire/run-context/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/livewire/livewire/silero-vad/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/livewire/livewire/stop-response/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/livewire/livewire/tool-error/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/pom/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/pom/pom/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/pom/pom/prompt-object-model/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/pom/pom/section/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/prefabs/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/prefabs/prefabs/amenity/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/prefabs/prefabs/bedrock-agent/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/prefabs/prefabs/bedrock-options/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/prefabs/prefabs/concierge-agent/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/prefabs/prefabs/concierge-options/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/prefabs/prefabs/department/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/prefabs/prefabs/faq-bot-agent/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/prefabs/prefabs/faq-bot-options/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/prefabs/prefabs/faq/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/prefabs/prefabs/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/prefabs/prefabs/info-gatherer-agent/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/prefabs/prefabs/info-gatherer-options/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/prefabs/prefabs/question/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/prefabs/prefabs/receptionist-agent/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/prefabs/prefabs/receptionist-options/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/prefabs/prefabs/survey-agent/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/prefabs/prefabs/survey-options/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/prefabs/prefabs/survey-question/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/server/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/server/server/agent-entry/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/server/server/agent-server/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/server/server/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/skills/builtin/builtin/api-ninjas-trivia-skill/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/skills/builtin/builtin/claude-skills-skill/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/skills/builtin/builtin/custom-skills-skill/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/skills/builtin/builtin/data-sphere-serverless-skill/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/skills/builtin/builtin/data-sphere-skill/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/skills/builtin/builtin/date-time-skill/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/skills/builtin/builtin/google-maps-skill/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/skills/builtin/builtin/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/skills/builtin/builtin/info-gatherer-skill/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/skills/builtin/builtin/joke-skill/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/skills/builtin/builtin/math-skill/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/skills/builtin/builtin/mcp-gateway-skill/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/skills/builtin/builtin/native-vector-search-skill/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/skills/builtin/builtin/play-background-file-skill/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/skills/builtin/builtin/spider-skill/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/skills/builtin/builtin/swml-transfer-skill/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/skills/builtin/builtin/weather-api-skill/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/skills/builtin/builtin/web-search-skill/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/skills/builtin/builtin/wikipedia-search-skill/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/skills/builtin/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/skills/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/skills/skills/base-skill/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/skills/skills/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/skills/skills/skill-manager/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/skills/skills/skill-registry/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/skills/skills/tool-registration/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/swaig-test/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/swaig-test/main/basic-auth/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/swaig-test/main/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/swaig-test/main/lambda-sim-result/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/swaig-test/main/simulate-lambda-options/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/swaig/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/swaig/swaig/function-result/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/swaig/swaig/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/swaig/swaig/join-conference-options/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/swaig/swaig/params/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/swaig/swaig/pay-options/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/swaig/swaig/prop/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/swaig/swaig/record-call-options/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/swml/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/swml/swml/ai-verb-handler/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/swml/swml/document/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/swml/swml/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/swml/swml/schema-utils/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/swml/swml/schema-validation-error/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/swml/swml/schema/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/swml/swml/security-config/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/swml/swml/service/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/swml/swml/tool-definition/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/swml/swml/validation-result/index.mdx create mode 100644 fern/products/sdk-reference/go/agents/swml/swml/verb-info/index.mdx create mode 100644 fern/products/sdk-reference/go/core/index.mdx create mode 100644 fern/products/sdk-reference/go/core/logging/index.mdx create mode 100644 fern/products/sdk-reference/go/core/logging/logging/index.mdx create mode 100644 fern/products/sdk-reference/go/core/logging/logging/logger/index.mdx create mode 100644 fern/products/sdk-reference/go/core/security/index.mdx create mode 100644 fern/products/sdk-reference/go/core/security/security/index.mdx create mode 100644 fern/products/sdk-reference/go/core/security/security/session-manager/index.mdx create mode 100644 fern/products/sdk-reference/go/core/security/security/webhook-opts/index.mdx create mode 100644 fern/products/sdk-reference/go/core/util/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/cmd/swaig-test/main/basic-auth/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/cmd/swaig-test/main/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/cmd/swaig-test/main/lambda-sim-result/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/cmd/swaig-test/main/simulate-lambda-options/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/agent/agent/agent-base/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/agent/agent/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/agent/agent/mcp-server-config/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/agent/agent/tool-definition/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/contexts/contexts/context-builder/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/contexts/contexts/context/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/contexts/contexts/gather-info/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/contexts/contexts/gather-question/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/contexts/contexts/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/contexts/contexts/step/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/datamap/datamap/expression-pattern/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/datamap/datamap/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/lambda/lambda/handler/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/lambda/lambda/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/agent-handoff/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/agent-session/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/agent/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/cartesia-tts/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/chat-context/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/chat-message/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/deepgram-stt/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/eleven-labs-tts/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/google-stt/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/inference-llm/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/inference-stt/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/inference-tts/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/job-context/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/job-process/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/live-server/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/open-aillm/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/open-aitts/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/room/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/run-context/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/silero-vad/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/stop-response/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/tool-error/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/logging/logging/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/logging/logging/logger/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/pom/pom/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/pom/pom/prompt-object-model/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/pom/pom/section/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/amenity/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/bedrock-agent/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/bedrock-options/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/concierge-agent/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/concierge-options/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/department/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/faq-bot-agent/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/faq-bot-options/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/faq/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/info-gatherer-agent/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/info-gatherer-options/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/question/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/receptionist-agent/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/receptionist-options/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/survey-agent/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/survey-options/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/survey-question/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/action/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/ai-action/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/ai-event/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/call-receive-event/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/call-state-event/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/call/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/calling-error-event/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/client/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/collect-action/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/collect-event/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/collect-params/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/conference-event/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/connect-event/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/denoise-event/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/detect-action/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/detect-event/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/device/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/dial-event/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/echo-event/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/fax-action/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/fax-event/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/hold-event/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/message-receive-event/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/message-state-event/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/message/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/pay-action/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/pay-event/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/play-action/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/play-event/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/queue-event/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/record-action/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/record-event/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/refer-event/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/relay-error/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/relay-event/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/send-digits-event/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/standalone-collect-action/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/stream-action/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/stream-event/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/tap-action/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/tap-event/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/transcribe-action/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/transcribe-event/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/addresses-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/auto-materialized-webhook-resource/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/call-flow-options/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/call-flows-resource/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/calling-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/chat-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-accounts/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-applications/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-calls/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-conferences/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-faxes/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-laml-bins/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-messages/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-phone-numbers/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-queues/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-recordings/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-tokens/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-transcriptions/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/conference-logs/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/conference-rooms-resource/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/crud-resource/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/crud-with-addresses/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/cxml-applications-resource/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/cxml-webhook-options/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/datasphere-documents/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/datasphere-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/fabric-addresses/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/fabric-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/fabric-tokens/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/fax-logs/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/generic-resources/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/imported-numbers-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/logs-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/lookup-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/message-logs/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/mfa-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/number-groups-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/phone-numbers-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/project-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/project-tokens/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/pub-sub-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/queues-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/recordings-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/registry-brands/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/registry-campaigns/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/registry-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/registry-numbers/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/registry-orders/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/relay-topic-options/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/resource/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/short-codes-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/sip-profile-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/subscribers-resource/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/verified-callers-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-conference-tokens/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-conferences/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-room-recordings/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-room-sessions/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-room-tokens/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-rooms/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-streams/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/voice-logs/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/rest/crud-resource/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/rest/http-client/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/rest/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/rest/paginated-iterator/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/rest/rest-client/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/rest/signal-wire-rest-error/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/security/security/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/security/security/session-manager/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/security/security/webhook-opts/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/server/server/agent-entry/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/server/server/agent-server/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/server/server/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/api-ninjas-trivia-skill/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/claude-skills-skill/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/custom-skills-skill/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/data-sphere-serverless-skill/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/data-sphere-skill/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/date-time-skill/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/google-maps-skill/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/info-gatherer-skill/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/joke-skill/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/math-skill/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/mcp-gateway-skill/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/native-vector-search-skill/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/play-background-file-skill/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/spider-skill/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/swml-transfer-skill/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/weather-api-skill/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/web-search-skill/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/wikipedia-search-skill/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/skills/base-skill/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/skills/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/skills/skill-manager/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/skills/skill-registry/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/skills/tool-registration/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig/function-result/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig/join-conference-options/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig/params/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig/pay-options/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig/prop/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig/record-call-options/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/ai-verb-handler/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/document/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/schema-utils/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/schema-validation-error/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/schema/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/security-config/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/service/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/tool-definition/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/validation-result/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/verb-info/index.mdx delete mode 100644 fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/util/util/index.mdx create mode 100644 fern/products/sdk-reference/go/relay/index.mdx create mode 100644 fern/products/sdk-reference/go/relay/relay/action/index.mdx create mode 100644 fern/products/sdk-reference/go/relay/relay/ai-action/index.mdx create mode 100644 fern/products/sdk-reference/go/relay/relay/ai-event/index.mdx create mode 100644 fern/products/sdk-reference/go/relay/relay/call-receive-event/index.mdx create mode 100644 fern/products/sdk-reference/go/relay/relay/call-state-event/index.mdx create mode 100644 fern/products/sdk-reference/go/relay/relay/call/index.mdx create mode 100644 fern/products/sdk-reference/go/relay/relay/calling-error-event/index.mdx create mode 100644 fern/products/sdk-reference/go/relay/relay/client/index.mdx create mode 100644 fern/products/sdk-reference/go/relay/relay/collect-action/index.mdx create mode 100644 fern/products/sdk-reference/go/relay/relay/collect-event/index.mdx create mode 100644 fern/products/sdk-reference/go/relay/relay/collect-params/index.mdx create mode 100644 fern/products/sdk-reference/go/relay/relay/conference-event/index.mdx create mode 100644 fern/products/sdk-reference/go/relay/relay/connect-event/index.mdx create mode 100644 fern/products/sdk-reference/go/relay/relay/denoise-event/index.mdx create mode 100644 fern/products/sdk-reference/go/relay/relay/detect-action/index.mdx create mode 100644 fern/products/sdk-reference/go/relay/relay/detect-event/index.mdx create mode 100644 fern/products/sdk-reference/go/relay/relay/device/index.mdx create mode 100644 fern/products/sdk-reference/go/relay/relay/dial-event/index.mdx create mode 100644 fern/products/sdk-reference/go/relay/relay/echo-event/index.mdx create mode 100644 fern/products/sdk-reference/go/relay/relay/fax-action/index.mdx create mode 100644 fern/products/sdk-reference/go/relay/relay/fax-event/index.mdx create mode 100644 fern/products/sdk-reference/go/relay/relay/hold-event/index.mdx create mode 100644 fern/products/sdk-reference/go/relay/relay/index.mdx create mode 100644 fern/products/sdk-reference/go/relay/relay/message-receive-event/index.mdx create mode 100644 fern/products/sdk-reference/go/relay/relay/message-state-event/index.mdx create mode 100644 fern/products/sdk-reference/go/relay/relay/message/index.mdx create mode 100644 fern/products/sdk-reference/go/relay/relay/pay-action/index.mdx create mode 100644 fern/products/sdk-reference/go/relay/relay/pay-event/index.mdx create mode 100644 fern/products/sdk-reference/go/relay/relay/play-action/index.mdx create mode 100644 fern/products/sdk-reference/go/relay/relay/play-event/index.mdx create mode 100644 fern/products/sdk-reference/go/relay/relay/queue-event/index.mdx create mode 100644 fern/products/sdk-reference/go/relay/relay/record-action/index.mdx create mode 100644 fern/products/sdk-reference/go/relay/relay/record-event/index.mdx create mode 100644 fern/products/sdk-reference/go/relay/relay/refer-event/index.mdx create mode 100644 fern/products/sdk-reference/go/relay/relay/relay-error/index.mdx create mode 100644 fern/products/sdk-reference/go/relay/relay/relay-event/index.mdx create mode 100644 fern/products/sdk-reference/go/relay/relay/send-digits-event/index.mdx create mode 100644 fern/products/sdk-reference/go/relay/relay/standalone-collect-action/index.mdx create mode 100644 fern/products/sdk-reference/go/relay/relay/stream-action/index.mdx create mode 100644 fern/products/sdk-reference/go/relay/relay/stream-event/index.mdx create mode 100644 fern/products/sdk-reference/go/relay/relay/tap-action/index.mdx create mode 100644 fern/products/sdk-reference/go/relay/relay/tap-event/index.mdx create mode 100644 fern/products/sdk-reference/go/relay/relay/transcribe-action/index.mdx create mode 100644 fern/products/sdk-reference/go/relay/relay/transcribe-event/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/namespaces/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/namespaces/namespaces/addresses-namespace/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/namespaces/namespaces/auto-materialized-webhook-resource/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/namespaces/namespaces/call-flow-options/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/namespaces/namespaces/call-flows-resource/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/namespaces/namespaces/calling-namespace/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/namespaces/namespaces/chat-namespace/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/namespaces/namespaces/compat-accounts/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/namespaces/namespaces/compat-applications/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/namespaces/namespaces/compat-calls/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/namespaces/namespaces/compat-conferences/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/namespaces/namespaces/compat-faxes/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/namespaces/namespaces/compat-laml-bins/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/namespaces/namespaces/compat-messages/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/namespaces/namespaces/compat-namespace/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/namespaces/namespaces/compat-phone-numbers/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/namespaces/namespaces/compat-queues/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/namespaces/namespaces/compat-recordings/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/namespaces/namespaces/compat-tokens/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/namespaces/namespaces/compat-transcriptions/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/namespaces/namespaces/conference-logs/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/namespaces/namespaces/conference-rooms-resource/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/namespaces/namespaces/crud-resource/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/namespaces/namespaces/crud-with-addresses/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/namespaces/namespaces/cxml-applications-resource/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/namespaces/namespaces/cxml-webhook-options/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/namespaces/namespaces/datasphere-documents/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/namespaces/namespaces/datasphere-namespace/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/namespaces/namespaces/fabric-addresses/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/namespaces/namespaces/fabric-namespace/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/namespaces/namespaces/fabric-tokens/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/namespaces/namespaces/fax-logs/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/namespaces/namespaces/generic-resources/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/namespaces/namespaces/imported-numbers-namespace/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/namespaces/namespaces/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/namespaces/namespaces/logs-namespace/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/namespaces/namespaces/lookup-namespace/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/namespaces/namespaces/message-logs/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/namespaces/namespaces/mfa-namespace/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/namespaces/namespaces/number-groups-namespace/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/namespaces/namespaces/phone-numbers-namespace/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/namespaces/namespaces/project-namespace/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/namespaces/namespaces/project-tokens/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/namespaces/namespaces/pub-sub-namespace/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/namespaces/namespaces/queues-namespace/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/namespaces/namespaces/recordings-namespace/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/namespaces/namespaces/registry-brands/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/namespaces/namespaces/registry-campaigns/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/namespaces/namespaces/registry-namespace/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/namespaces/namespaces/registry-numbers/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/namespaces/namespaces/registry-orders/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/namespaces/namespaces/relay-topic-options/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/namespaces/namespaces/resource/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/namespaces/namespaces/short-codes-namespace/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/namespaces/namespaces/sip-profile-namespace/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/namespaces/namespaces/subscribers-resource/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/namespaces/namespaces/verified-callers-namespace/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/namespaces/namespaces/video-conference-tokens/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/namespaces/namespaces/video-conferences/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/namespaces/namespaces/video-namespace/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/namespaces/namespaces/video-room-recordings/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/namespaces/namespaces/video-room-sessions/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/namespaces/namespaces/video-room-tokens/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/namespaces/namespaces/video-rooms/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/namespaces/namespaces/video-streams/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/namespaces/namespaces/voice-logs/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/rest/crud-resource/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/rest/http-client/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/rest/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/rest/paginated-iterator/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/rest/rest-client/index.mdx create mode 100644 fern/products/sdk-reference/go/rest/rest/signal-wire-rest-error/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/agent/agent/agent-base/builder/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/agent/agent/agent-base/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/agent/agent/agent-base/index__2.mdx create mode 100644 fern/products/sdk-reference/java/agents/agent/agent/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/agent/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/cli/cli/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/cli/cli/swaig-test/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/cli/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/cli/simulation/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/cli/simulation/simulation/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/cli/simulation/simulation/serverless-simulator/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/cli/simulation/simulation/serverless-simulator/index__2.mdx create mode 100644 fern/products/sdk-reference/java/agents/contexts/contexts/context-builder/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/contexts/contexts/context/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/contexts/contexts/gather-info/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/contexts/contexts/gather-question/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/contexts/contexts/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/contexts/contexts/step/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/contexts/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/datamap/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/pom/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/pom/pom/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/pom/pom/prompt-object-model/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/pom/pom/section/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/prefabs/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/prefabs/prefabs/concierge-agent/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/prefabs/prefabs/faq-bot-agent/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/prefabs/prefabs/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/prefabs/prefabs/info-gatherer-agent/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/prefabs/prefabs/receptionist-agent/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/prefabs/prefabs/survey-agent/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/runtime/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/runtime/lambda/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/runtime/lambda/lambda/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/runtime/lambda/lambda/lambda-agent-handler/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/runtime/lambda/lambda/lambda-response/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/runtime/runtime/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/runtime/runtime/lambda-url-resolver/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/server/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/server/server/agent-server/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/server/server/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/skills/builtin/builtin/api-ninja-trivia-skill/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/skills/builtin/builtin/claude-skills-skill/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/skills/builtin/builtin/custom-skills-skill/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/skills/builtin/builtin/datasphere-serverless-skill/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/skills/builtin/builtin/datasphere-skill/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/skills/builtin/builtin/datetime-skill/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/skills/builtin/builtin/google-maps-skill/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/skills/builtin/builtin/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/skills/builtin/builtin/info-gatherer-skill/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/skills/builtin/builtin/joke-skill/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/skills/builtin/builtin/math-skill/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/skills/builtin/builtin/mcp-gateway-skill/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/skills/builtin/builtin/native-vector-search-skill/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/skills/builtin/builtin/play-background-file-skill/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/skills/builtin/builtin/spider-skill/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/skills/builtin/builtin/swml-transfer-skill/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/skills/builtin/builtin/weather-api-skill/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/skills/builtin/builtin/web-search-skill/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/skills/builtin/builtin/wikipedia-search-skill/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/skills/builtin/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/skills/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/skills/skills/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/skills/skills/skill-manager/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/skills/skills/skill-registry/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/swaig/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/swaig/swaig/function-result/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/swaig/swaig/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/swaig/swaig/parameter-schema/builder/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/swaig/swaig/parameter-schema/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/swaig/swaig/parameter-schema/index__2.mdx create mode 100644 fern/products/sdk-reference/java/agents/swaig/swaig/tool-definition/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/swml/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/swml/swml/document/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/swml/swml/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/swml/swml/schema-utils/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/swml/swml/schema-utils/index__2.mdx create mode 100644 fern/products/sdk-reference/java/agents/swml/swml/schema-utils/verb-info/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/swml/swml/schema-validation-error/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/swml/swml/schema/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/swml/swml/service/index.mdx create mode 100644 fern/products/sdk-reference/java/agents/tools/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/agent/agent/agent-base/builder/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/agent/agent/agent-base/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/agent/agent/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/cli/cli/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/cli/cli/swaig-test/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/cli/simulation/simulation/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/cli/simulation/simulation/serverless-simulator/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/contexts/contexts/context-builder/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/contexts/contexts/context/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/contexts/contexts/gather-info/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/contexts/contexts/gather-question/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/contexts/contexts/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/contexts/contexts/step/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/datamap/datamap/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/logging/logging/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/logging/logging/logger/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/pom/pom/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/pom/pom/prompt-object-model/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/pom/pom/section/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/prefabs/prefabs/concierge-agent/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/prefabs/prefabs/faq-bot-agent/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/prefabs/prefabs/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/prefabs/prefabs/info-gatherer-agent/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/prefabs/prefabs/receptionist-agent/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/prefabs/prefabs/survey-agent/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/ai-action/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/collect-action/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/detect-action/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/pay-action/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/play-action/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/play-and-collect-action/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/receive-fax-action/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/record-action/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/send-fax-action/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/stream-action/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/tap-action/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/transcribe-action/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/call/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/constants/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/device/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/message/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-client/builder/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-client/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-error/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/authorization-state-event/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-collect-event/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-connect-event/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-detect-event/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-dial-event/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-fax-event/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-pay-event/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-play-event/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-receive-event/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-record-event/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-refer-event/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-send-digits-event/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-state-event/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-stream-event/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-tap-event/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-transcribe-event/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/conference-event/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/messaging-receive-event/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/messaging-state-event/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/queue-event/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/addresses-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/billing-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/calling-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/campaign-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/chat-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-accounts/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-applications/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-calls/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-conferences/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-faxes/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-laml-bins/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-messages/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-phone-numbers/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-queues/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-recordings/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-tokens/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-transcriptions/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compliance-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/conference-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/datasphere-namespace/datasphere-documents/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/datasphere-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/call-flows-resource/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/conference-rooms-resource/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/cxml-applications-resource/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/fabric-addresses/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/fabric-subscribers/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/fabric-tokens/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/generic-resources/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fax-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/imported-numbers-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/logs-namespace/conference-logs/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/logs-namespace/fax-logs/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/logs-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/logs-namespace/message-logs/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/logs-namespace/voice-logs/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/messaging-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/mfa-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/number-groups-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/number-lookup-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/phone-numbers-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/project-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/project-namespace/project-tokens/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/pub-sub-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/queue-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/recording-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/registry-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/registry-namespace/registry-brands/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/registry-namespace/registry-campaigns/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/registry-namespace/registry-numbers/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/registry-namespace/registry-orders/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/short-codes-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/sip-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/sip-profile-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/stream-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/swml-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/transcription-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/video-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/video-namespace/video-conference-tokens/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/video-namespace/video-conferences/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/video-namespace/video-room-recordings/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/video-namespace/video-room-sessions/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/video-namespace/video-rooms/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/video-namespace/video-streams/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/rest/crud-resource/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/rest/http-client/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/rest/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/rest/paginated-iterator/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/rest/rest-client/builder/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/rest/rest-client/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/rest/rest/rest-error/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/runtime/lambda/lambda/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/runtime/lambda/lambda/lambda-agent-handler/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/runtime/lambda/lambda/lambda-response/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/runtime/runtime/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/runtime/runtime/lambda-url-resolver/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/security/security/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/security/security/session-manager/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/security/security/webhook-filter/cached-body-http-servlet-request/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/security/security/webhook-filter/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/security/security/webhook-validator/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/server/server/agent-server/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/server/server/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/api-ninja-trivia-skill/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/claude-skills-skill/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/custom-skills-skill/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/datasphere-serverless-skill/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/datasphere-skill/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/datetime-skill/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/google-maps-skill/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/info-gatherer-skill/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/joke-skill/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/math-skill/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/mcp-gateway-skill/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/native-vector-search-skill/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/play-background-file-skill/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/spider-skill/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/swml-transfer-skill/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/weather-api-skill/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/web-search-skill/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/wikipedia-search-skill/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/skills/skills/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/skills/skills/skill-manager/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/skills/skills/skill-registry/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/swaig/swaig/function-result/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/swaig/swaig/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/swaig/swaig/parameter-schema/builder/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/swaig/swaig/parameter-schema/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/swaig/swaig/tool-definition/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/swml/swml/document/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/swml/swml/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/swml/swml/schema-utils/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/swml/swml/schema-utils/verb-info/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/swml/swml/schema-validation-error/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/swml/swml/schema/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/swml/swml/service/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/tools/tools/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/utils/utils/index.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/utils/utils/url-validator/index.mdx create mode 100644 fern/products/sdk-reference/java/core/index.mdx create mode 100644 fern/products/sdk-reference/java/core/logging/index.mdx create mode 100644 fern/products/sdk-reference/java/core/logging/logging/index.mdx create mode 100644 fern/products/sdk-reference/java/core/logging/logging/logger/index.mdx create mode 100644 fern/products/sdk-reference/java/core/logging/logging/logger/index__2.mdx create mode 100644 fern/products/sdk-reference/java/core/security/index.mdx create mode 100644 fern/products/sdk-reference/java/core/security/security/index.mdx create mode 100644 fern/products/sdk-reference/java/core/security/security/session-manager/index.mdx create mode 100644 fern/products/sdk-reference/java/core/security/security/webhook-filter/cached-body-http-servlet-request/index.mdx create mode 100644 fern/products/sdk-reference/java/core/security/security/webhook-filter/index.mdx create mode 100644 fern/products/sdk-reference/java/core/security/security/webhook-filter/index__2.mdx create mode 100644 fern/products/sdk-reference/java/core/security/security/webhook-validator/index.mdx create mode 100644 fern/products/sdk-reference/java/core/utils/index.mdx create mode 100644 fern/products/sdk-reference/java/core/utils/utils/index.mdx create mode 100644 fern/products/sdk-reference/java/core/utils/utils/url-validator/index.mdx create mode 100644 fern/products/sdk-reference/java/relay/index.mdx create mode 100644 fern/products/sdk-reference/java/relay/relay/action/ai-action/index.mdx create mode 100644 fern/products/sdk-reference/java/relay/relay/action/collect-action/index.mdx create mode 100644 fern/products/sdk-reference/java/relay/relay/action/detect-action/index.mdx create mode 100644 fern/products/sdk-reference/java/relay/relay/action/index.mdx create mode 100644 fern/products/sdk-reference/java/relay/relay/action/index__2.mdx create mode 100644 fern/products/sdk-reference/java/relay/relay/action/pay-action/index.mdx create mode 100644 fern/products/sdk-reference/java/relay/relay/action/play-action/index.mdx create mode 100644 fern/products/sdk-reference/java/relay/relay/action/play-and-collect-action/index.mdx create mode 100644 fern/products/sdk-reference/java/relay/relay/action/receive-fax-action/index.mdx create mode 100644 fern/products/sdk-reference/java/relay/relay/action/record-action/index.mdx create mode 100644 fern/products/sdk-reference/java/relay/relay/action/send-fax-action/index.mdx create mode 100644 fern/products/sdk-reference/java/relay/relay/action/stream-action/index.mdx create mode 100644 fern/products/sdk-reference/java/relay/relay/action/tap-action/index.mdx create mode 100644 fern/products/sdk-reference/java/relay/relay/action/transcribe-action/index.mdx create mode 100644 fern/products/sdk-reference/java/relay/relay/call/index.mdx create mode 100644 fern/products/sdk-reference/java/relay/relay/constants/index.mdx create mode 100644 fern/products/sdk-reference/java/relay/relay/device/index.mdx create mode 100644 fern/products/sdk-reference/java/relay/relay/index.mdx create mode 100644 fern/products/sdk-reference/java/relay/relay/message/index.mdx create mode 100644 fern/products/sdk-reference/java/relay/relay/relay-client/builder/index.mdx create mode 100644 fern/products/sdk-reference/java/relay/relay/relay-client/index.mdx create mode 100644 fern/products/sdk-reference/java/relay/relay/relay-client/index__2.mdx create mode 100644 fern/products/sdk-reference/java/relay/relay/relay-error/index.mdx create mode 100644 fern/products/sdk-reference/java/relay/relay/relay-event/authorization-state-event/index.mdx create mode 100644 fern/products/sdk-reference/java/relay/relay/relay-event/call-collect-event/index.mdx create mode 100644 fern/products/sdk-reference/java/relay/relay/relay-event/call-connect-event/index.mdx create mode 100644 fern/products/sdk-reference/java/relay/relay/relay-event/call-detect-event/index.mdx create mode 100644 fern/products/sdk-reference/java/relay/relay/relay-event/call-dial-event/index.mdx create mode 100644 fern/products/sdk-reference/java/relay/relay/relay-event/call-fax-event/index.mdx create mode 100644 fern/products/sdk-reference/java/relay/relay/relay-event/call-pay-event/index.mdx create mode 100644 fern/products/sdk-reference/java/relay/relay/relay-event/call-play-event/index.mdx create mode 100644 fern/products/sdk-reference/java/relay/relay/relay-event/call-receive-event/index.mdx create mode 100644 fern/products/sdk-reference/java/relay/relay/relay-event/call-record-event/index.mdx create mode 100644 fern/products/sdk-reference/java/relay/relay/relay-event/call-refer-event/index.mdx create mode 100644 fern/products/sdk-reference/java/relay/relay/relay-event/call-send-digits-event/index.mdx create mode 100644 fern/products/sdk-reference/java/relay/relay/relay-event/call-state-event/index.mdx create mode 100644 fern/products/sdk-reference/java/relay/relay/relay-event/call-stream-event/index.mdx create mode 100644 fern/products/sdk-reference/java/relay/relay/relay-event/call-tap-event/index.mdx create mode 100644 fern/products/sdk-reference/java/relay/relay/relay-event/call-transcribe-event/index.mdx create mode 100644 fern/products/sdk-reference/java/relay/relay/relay-event/conference-event/index.mdx create mode 100644 fern/products/sdk-reference/java/relay/relay/relay-event/index.mdx create mode 100644 fern/products/sdk-reference/java/relay/relay/relay-event/index__2.mdx create mode 100644 fern/products/sdk-reference/java/relay/relay/relay-event/messaging-receive-event/index.mdx create mode 100644 fern/products/sdk-reference/java/relay/relay/relay-event/messaging-state-event/index.mdx create mode 100644 fern/products/sdk-reference/java/relay/relay/relay-event/queue-event/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/addresses-namespace/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/billing-namespace/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/calling-namespace/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/campaign-namespace/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/chat-namespace/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-accounts/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-applications/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-calls/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-conferences/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-faxes/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-laml-bins/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-messages/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-phone-numbers/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-queues/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-recordings/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-tokens/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-transcriptions/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/index__2.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/compliance-namespace/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/conference-namespace/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/datasphere-namespace/datasphere-documents/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/datasphere-namespace/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/datasphere-namespace/index__2.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/call-flows-resource/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/conference-rooms-resource/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/cxml-applications-resource/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/fabric-addresses/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/fabric-subscribers/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/fabric-tokens/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/generic-resources/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/index__2.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/fax-namespace/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/imported-numbers-namespace/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/logs-namespace/conference-logs/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/logs-namespace/fax-logs/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/logs-namespace/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/logs-namespace/index__2.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/logs-namespace/message-logs/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/logs-namespace/voice-logs/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/messaging-namespace/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/mfa-namespace/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/number-groups-namespace/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/number-lookup-namespace/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/phone-numbers-namespace/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/project-namespace/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/project-namespace/index__2.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/project-namespace/project-tokens/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/pub-sub-namespace/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/queue-namespace/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/recording-namespace/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/registry-namespace/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/registry-namespace/index__2.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/registry-namespace/registry-brands/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/registry-namespace/registry-campaigns/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/registry-namespace/registry-numbers/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/registry-namespace/registry-orders/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/short-codes-namespace/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/sip-namespace/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/sip-profile-namespace/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/stream-namespace/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/swml-namespace/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/transcription-namespace/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/index__2.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/video-conference-tokens/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/video-conferences/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/video-room-recordings/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/video-room-sessions/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/video-rooms/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/video-streams/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/rest/crud-resource/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/rest/http-client/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/rest/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/rest/paginated-iterator/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/rest/rest-client/builder/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/rest/rest-client/index.mdx create mode 100644 fern/products/sdk-reference/java/rest/rest/rest-client/index__2.mdx create mode 100644 fern/products/sdk-reference/java/rest/rest/rest-error/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/agent/agent-base/agent-base/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/agent/agent-base/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/agent/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/pom/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/pom/prompt-object-model/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/pom/prompt-object-model/prompt-object-model/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/pom/section/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/pom/section/section/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/prefabs/concierge/concierge/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/prefabs/concierge/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/prefabs/faq-bot/faq-bot/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/prefabs/faq-bot/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/prefabs/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/prefabs/info-gatherer/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/prefabs/info-gatherer/info-gatherer/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/prefabs/receptionist/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/prefabs/receptionist/receptionist/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/prefabs/survey/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/prefabs/survey/survey/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/server/agent-server/agent-server/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/server/agent-server/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/server/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/skills/builtin/api-ninjas-trivia/api-ninjas-trivia/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/skills/builtin/api-ninjas-trivia/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/skills/builtin/claude-skills/claude-skills/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/skills/builtin/claude-skills/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/skills/builtin/custom-skills/custom-skills/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/skills/builtin/custom-skills/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/skills/builtin/datasphere-serverless/datasphere-serverless/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/skills/builtin/datasphere-serverless/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/skills/builtin/datasphere/datasphere/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/skills/builtin/datasphere/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/skills/builtin/datetime/datetime/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/skills/builtin/datetime/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/skills/builtin/google-maps/google-maps/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/skills/builtin/google-maps/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/skills/builtin/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/skills/builtin/info-gatherer/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/skills/builtin/info-gatherer/info-gatherer/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/skills/builtin/joke/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/skills/builtin/joke/joke/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/skills/builtin/math/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/skills/builtin/math/math/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/skills/builtin/mcp-gateway/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/skills/builtin/mcp-gateway/mcp-gateway/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/skills/builtin/native-vector-search/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/skills/builtin/native-vector-search/native-vector-search/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/skills/builtin/play-background-file/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/skills/builtin/play-background-file/play-background-file/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/skills/builtin/spider/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/skills/builtin/spider/spider/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/skills/builtin/swml-transfer/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/skills/builtin/swml-transfer/swml-transfer/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/skills/builtin/weather-api/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/skills/builtin/weather-api/weather-api/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/skills/builtin/web-search/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/skills/builtin/web-search/web-search/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/skills/builtin/wikipedia-search/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/skills/builtin/wikipedia-search/wikipedia-search/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/skills/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/skills/skill-base/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/skills/skill-base/skill-base/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/skills/skill-manager/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/skills/skill-manager/skill-manager/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/skills/skill-name/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/skills/skill-name/skill-name/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/skills/skill-registry/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/skills/skill-registry/skill-registry/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/swaig/function-result/function-result/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/swaig/function-result/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/swaig/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/swaig/join-conference/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/swaig/join-conference/join-conference/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/swaig/parameter-schema/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/swaig/parameter-schema/parameter-schema/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/swaig/record-call/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/swaig/record-call/record-call/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/swaig/tap/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/swaig/tap/tap/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/swml/document/document/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/swml/document/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/swml/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/swml/schema/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/swml/schema/schema/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/swml/service/index.mdx create mode 100644 fern/products/sdk-reference/perl/agents/swml/service/service/index.mdx create mode 100644 fern/products/sdk-reference/perl/core/core/index.mdx create mode 100644 fern/products/sdk-reference/perl/core/core/logging-config/index.mdx create mode 100644 fern/products/sdk-reference/perl/core/core/logging-config/logging-config/index.mdx create mode 100644 fern/products/sdk-reference/perl/core/index.mdx create mode 100644 fern/products/sdk-reference/perl/core/security/index.mdx create mode 100644 fern/products/sdk-reference/perl/core/security/session-manager/index.mdx create mode 100644 fern/products/sdk-reference/perl/core/security/session-manager/session-manager/index.mdx create mode 100644 fern/products/sdk-reference/perl/core/security/webhook-middleware/index.mdx create mode 100644 fern/products/sdk-reference/perl/core/security/webhook-middleware/webhook-middleware/index.mdx create mode 100644 fern/products/sdk-reference/perl/core/security/webhook-validator/index.mdx create mode 100644 fern/products/sdk-reference/perl/core/security/webhook-validator/webhook-validator/index.mdx create mode 100644 fern/products/sdk-reference/perl/relay/action/action/index.mdx create mode 100644 fern/products/sdk-reference/perl/relay/action/index.mdx create mode 100644 fern/products/sdk-reference/perl/relay/call-state/call-state/index.mdx create mode 100644 fern/products/sdk-reference/perl/relay/call-state/index.mdx create mode 100644 fern/products/sdk-reference/perl/relay/call/call/index.mdx create mode 100644 fern/products/sdk-reference/perl/relay/call/index.mdx create mode 100644 fern/products/sdk-reference/perl/relay/client/client/index.mdx create mode 100644 fern/products/sdk-reference/perl/relay/client/index.mdx create mode 100644 fern/products/sdk-reference/perl/relay/constants/constants/index.mdx create mode 100644 fern/products/sdk-reference/perl/relay/constants/index.mdx create mode 100644 fern/products/sdk-reference/perl/relay/device/device/index.mdx create mode 100644 fern/products/sdk-reference/perl/relay/device/index.mdx create mode 100644 fern/products/sdk-reference/perl/relay/dial-state/dial-state/index.mdx create mode 100644 fern/products/sdk-reference/perl/relay/dial-state/index.mdx create mode 100644 fern/products/sdk-reference/perl/relay/event/event/index.mdx create mode 100644 fern/products/sdk-reference/perl/relay/event/index.mdx create mode 100644 fern/products/sdk-reference/perl/relay/index.mdx create mode 100644 fern/products/sdk-reference/perl/relay/message-state/index.mdx create mode 100644 fern/products/sdk-reference/perl/relay/message-state/message-state/index.mdx create mode 100644 fern/products/sdk-reference/perl/relay/message/index.mdx create mode 100644 fern/products/sdk-reference/perl/relay/message/message/index.mdx create mode 100644 fern/products/sdk-reference/perl/rest/http-client/http-client/index.mdx create mode 100644 fern/products/sdk-reference/perl/rest/http-client/index.mdx create mode 100644 fern/products/sdk-reference/perl/rest/index.mdx create mode 100644 fern/products/sdk-reference/perl/rest/namespaces/base/base/index.mdx create mode 100644 fern/products/sdk-reference/perl/rest/namespaces/base/index.mdx create mode 100644 fern/products/sdk-reference/perl/rest/namespaces/calling/calling/index.mdx create mode 100644 fern/products/sdk-reference/perl/rest/namespaces/calling/index.mdx create mode 100644 fern/products/sdk-reference/perl/rest/namespaces/chat/chat/index.mdx create mode 100644 fern/products/sdk-reference/perl/rest/namespaces/chat/index.mdx create mode 100644 fern/products/sdk-reference/perl/rest/namespaces/compat/compat/index.mdx create mode 100644 fern/products/sdk-reference/perl/rest/namespaces/compat/index.mdx create mode 100644 fern/products/sdk-reference/perl/rest/namespaces/datasphere/datasphere/index.mdx create mode 100644 fern/products/sdk-reference/perl/rest/namespaces/datasphere/index.mdx create mode 100644 fern/products/sdk-reference/perl/rest/namespaces/fabric/fabric/index.mdx create mode 100644 fern/products/sdk-reference/perl/rest/namespaces/fabric/index.mdx create mode 100644 fern/products/sdk-reference/perl/rest/namespaces/index.mdx create mode 100644 fern/products/sdk-reference/perl/rest/namespaces/logs/index.mdx create mode 100644 fern/products/sdk-reference/perl/rest/namespaces/logs/logs/index.mdx create mode 100644 fern/products/sdk-reference/perl/rest/namespaces/phone-numbers/index.mdx create mode 100644 fern/products/sdk-reference/perl/rest/namespaces/phone-numbers/phone-numbers/index.mdx create mode 100644 fern/products/sdk-reference/perl/rest/namespaces/project/index.mdx create mode 100644 fern/products/sdk-reference/perl/rest/namespaces/project/project/index.mdx create mode 100644 fern/products/sdk-reference/perl/rest/namespaces/pub-sub/index.mdx create mode 100644 fern/products/sdk-reference/perl/rest/namespaces/pub-sub/pub-sub/index.mdx create mode 100644 fern/products/sdk-reference/perl/rest/namespaces/registry/index.mdx create mode 100644 fern/products/sdk-reference/perl/rest/namespaces/registry/registry/index.mdx create mode 100644 fern/products/sdk-reference/perl/rest/namespaces/resources/index.mdx create mode 100644 fern/products/sdk-reference/perl/rest/namespaces/resources/resources/index.mdx create mode 100644 fern/products/sdk-reference/perl/rest/namespaces/video/index.mdx create mode 100644 fern/products/sdk-reference/perl/rest/namespaces/video/video/index.mdx create mode 100644 fern/products/sdk-reference/perl/rest/pagination/index.mdx create mode 100644 fern/products/sdk-reference/perl/rest/pagination/pagination/index.mdx create mode 100644 fern/products/sdk-reference/perl/rest/phone-call-handler/index.mdx create mode 100644 fern/products/sdk-reference/perl/rest/phone-call-handler/phone-call-handler/index.mdx create mode 100644 fern/products/sdk-reference/perl/rest/rest-client/index.mdx create mode 100644 fern/products/sdk-reference/perl/rest/rest-client/rest-client/index.mdx delete mode 100644 fern/products/sdk-reference/perl/signal-wire/agent/agent-base/agent-base/index.mdx delete mode 100644 fern/products/sdk-reference/perl/signal-wire/core/logging-config/logging-config/index.mdx delete mode 100644 fern/products/sdk-reference/perl/signal-wire/pom/prompt-object-model/prompt-object-model/index.mdx delete mode 100644 fern/products/sdk-reference/perl/signal-wire/pom/section/section/index.mdx delete mode 100644 fern/products/sdk-reference/perl/signal-wire/prefabs/concierge/concierge/index.mdx delete mode 100644 fern/products/sdk-reference/perl/signal-wire/prefabs/faq-bot/faq-bot/index.mdx delete mode 100644 fern/products/sdk-reference/perl/signal-wire/prefabs/info-gatherer/info-gatherer/index.mdx delete mode 100644 fern/products/sdk-reference/perl/signal-wire/prefabs/receptionist/receptionist/index.mdx delete mode 100644 fern/products/sdk-reference/perl/signal-wire/prefabs/survey/survey/index.mdx delete mode 100644 fern/products/sdk-reference/perl/signal-wire/relay/action/action/index.mdx delete mode 100644 fern/products/sdk-reference/perl/signal-wire/relay/call-state/call-state/index.mdx delete mode 100644 fern/products/sdk-reference/perl/signal-wire/relay/call/call/index.mdx delete mode 100644 fern/products/sdk-reference/perl/signal-wire/relay/client/client/index.mdx delete mode 100644 fern/products/sdk-reference/perl/signal-wire/relay/constants/constants/index.mdx delete mode 100644 fern/products/sdk-reference/perl/signal-wire/relay/device/device/index.mdx delete mode 100644 fern/products/sdk-reference/perl/signal-wire/relay/dial-state/dial-state/index.mdx delete mode 100644 fern/products/sdk-reference/perl/signal-wire/relay/event/event/index.mdx delete mode 100644 fern/products/sdk-reference/perl/signal-wire/relay/message-state/message-state/index.mdx delete mode 100644 fern/products/sdk-reference/perl/signal-wire/relay/message/message/index.mdx delete mode 100644 fern/products/sdk-reference/perl/signal-wire/rest/http-client/http-client/index.mdx delete mode 100644 fern/products/sdk-reference/perl/signal-wire/rest/namespaces/base/base/index.mdx delete mode 100644 fern/products/sdk-reference/perl/signal-wire/rest/namespaces/calling/calling/index.mdx delete mode 100644 fern/products/sdk-reference/perl/signal-wire/rest/namespaces/chat/chat/index.mdx delete mode 100644 fern/products/sdk-reference/perl/signal-wire/rest/namespaces/compat/compat/index.mdx delete mode 100644 fern/products/sdk-reference/perl/signal-wire/rest/namespaces/datasphere/datasphere/index.mdx delete mode 100644 fern/products/sdk-reference/perl/signal-wire/rest/namespaces/fabric/fabric/index.mdx delete mode 100644 fern/products/sdk-reference/perl/signal-wire/rest/namespaces/logs/logs/index.mdx delete mode 100644 fern/products/sdk-reference/perl/signal-wire/rest/namespaces/phone-numbers/phone-numbers/index.mdx delete mode 100644 fern/products/sdk-reference/perl/signal-wire/rest/namespaces/project/project/index.mdx delete mode 100644 fern/products/sdk-reference/perl/signal-wire/rest/namespaces/pub-sub/pub-sub/index.mdx delete mode 100644 fern/products/sdk-reference/perl/signal-wire/rest/namespaces/registry/registry/index.mdx delete mode 100644 fern/products/sdk-reference/perl/signal-wire/rest/namespaces/resources/resources/index.mdx delete mode 100644 fern/products/sdk-reference/perl/signal-wire/rest/namespaces/video/video/index.mdx delete mode 100644 fern/products/sdk-reference/perl/signal-wire/rest/pagination/pagination/index.mdx delete mode 100644 fern/products/sdk-reference/perl/signal-wire/rest/phone-call-handler/phone-call-handler/index.mdx delete mode 100644 fern/products/sdk-reference/perl/signal-wire/rest/rest-client/rest-client/index.mdx delete mode 100644 fern/products/sdk-reference/perl/signal-wire/security/session-manager/session-manager/index.mdx delete mode 100644 fern/products/sdk-reference/perl/signal-wire/security/webhook-middleware/webhook-middleware/index.mdx delete mode 100644 fern/products/sdk-reference/perl/signal-wire/security/webhook-validator/webhook-validator/index.mdx delete mode 100644 fern/products/sdk-reference/perl/signal-wire/server/agent-server/agent-server/index.mdx delete mode 100644 fern/products/sdk-reference/perl/signal-wire/skills/builtin/api-ninjas-trivia/api-ninjas-trivia/index.mdx delete mode 100644 fern/products/sdk-reference/perl/signal-wire/skills/builtin/claude-skills/claude-skills/index.mdx delete mode 100644 fern/products/sdk-reference/perl/signal-wire/skills/builtin/custom-skills/custom-skills/index.mdx delete mode 100644 fern/products/sdk-reference/perl/signal-wire/skills/builtin/datasphere-serverless/datasphere-serverless/index.mdx delete mode 100644 fern/products/sdk-reference/perl/signal-wire/skills/builtin/datasphere/datasphere/index.mdx delete mode 100644 fern/products/sdk-reference/perl/signal-wire/skills/builtin/datetime/datetime/index.mdx delete mode 100644 fern/products/sdk-reference/perl/signal-wire/skills/builtin/google-maps/google-maps/index.mdx delete mode 100644 fern/products/sdk-reference/perl/signal-wire/skills/builtin/info-gatherer/info-gatherer/index.mdx delete mode 100644 fern/products/sdk-reference/perl/signal-wire/skills/builtin/joke/joke/index.mdx delete mode 100644 fern/products/sdk-reference/perl/signal-wire/skills/builtin/math/math/index.mdx delete mode 100644 fern/products/sdk-reference/perl/signal-wire/skills/builtin/mcp-gateway/mcp-gateway/index.mdx delete mode 100644 fern/products/sdk-reference/perl/signal-wire/skills/builtin/native-vector-search/native-vector-search/index.mdx delete mode 100644 fern/products/sdk-reference/perl/signal-wire/skills/builtin/play-background-file/play-background-file/index.mdx delete mode 100644 fern/products/sdk-reference/perl/signal-wire/skills/builtin/spider/spider/index.mdx delete mode 100644 fern/products/sdk-reference/perl/signal-wire/skills/builtin/swml-transfer/swml-transfer/index.mdx delete mode 100644 fern/products/sdk-reference/perl/signal-wire/skills/builtin/weather-api/weather-api/index.mdx delete mode 100644 fern/products/sdk-reference/perl/signal-wire/skills/builtin/web-search/web-search/index.mdx delete mode 100644 fern/products/sdk-reference/perl/signal-wire/skills/builtin/wikipedia-search/wikipedia-search/index.mdx delete mode 100644 fern/products/sdk-reference/perl/signal-wire/skills/skill-base/skill-base/index.mdx delete mode 100644 fern/products/sdk-reference/perl/signal-wire/skills/skill-manager/skill-manager/index.mdx delete mode 100644 fern/products/sdk-reference/perl/signal-wire/skills/skill-name/skill-name/index.mdx delete mode 100644 fern/products/sdk-reference/perl/signal-wire/skills/skill-registry/skill-registry/index.mdx delete mode 100644 fern/products/sdk-reference/perl/signal-wire/swaig/function-result/function-result/index.mdx delete mode 100644 fern/products/sdk-reference/perl/signal-wire/swaig/join-conference/join-conference/index.mdx delete mode 100644 fern/products/sdk-reference/perl/signal-wire/swaig/parameter-schema/parameter-schema/index.mdx delete mode 100644 fern/products/sdk-reference/perl/signal-wire/swaig/record-call/record-call/index.mdx delete mode 100644 fern/products/sdk-reference/perl/signal-wire/swaig/tap/tap/index.mdx delete mode 100644 fern/products/sdk-reference/perl/signal-wire/swml/document/document/index.mdx delete mode 100644 fern/products/sdk-reference/perl/signal-wire/swml/schema/schema/index.mdx delete mode 100644 fern/products/sdk-reference/perl/signal-wire/swml/service/service/index.mdx create mode 100644 fern/products/sdk-reference/php/agents/contexts/contexts/context-builder/index.mdx create mode 100644 fern/products/sdk-reference/php/agents/contexts/contexts/context/index.mdx create mode 100644 fern/products/sdk-reference/php/agents/contexts/contexts/gather-info/index.mdx create mode 100644 fern/products/sdk-reference/php/agents/contexts/contexts/gather-question/index.mdx create mode 100644 fern/products/sdk-reference/php/agents/contexts/contexts/index.mdx create mode 100644 fern/products/sdk-reference/php/agents/contexts/contexts/step/index.mdx create mode 100644 fern/products/sdk-reference/php/agents/contexts/index.mdx create mode 100644 fern/products/sdk-reference/php/agents/data-map/index.mdx create mode 100644 fern/products/sdk-reference/php/agents/index.mdx create mode 100644 fern/products/sdk-reference/php/agents/pom/index.mdx create mode 100644 fern/products/sdk-reference/php/agents/pom/pom/index.mdx create mode 100644 fern/products/sdk-reference/php/agents/pom/pom/prompt-object-model/index.mdx create mode 100644 fern/products/sdk-reference/php/agents/pom/pom/section/index.mdx create mode 100644 fern/products/sdk-reference/php/agents/server/index.mdx create mode 100644 fern/products/sdk-reference/php/agents/server/server/agent-server/index.mdx create mode 100644 fern/products/sdk-reference/php/agents/server/server/index.mdx create mode 100644 fern/products/sdk-reference/php/agents/serverless/index.mdx create mode 100644 fern/products/sdk-reference/php/agents/serverless/serverless/adapter/index.mdx create mode 100644 fern/products/sdk-reference/php/agents/serverless/serverless/index.mdx create mode 100644 fern/products/sdk-reference/php/agents/skills/builtin/builtin/api-ninjas-trivia/index.mdx create mode 100644 fern/products/sdk-reference/php/agents/skills/builtin/builtin/claude-skills/index.mdx create mode 100644 fern/products/sdk-reference/php/agents/skills/builtin/builtin/custom-skills/index.mdx create mode 100644 fern/products/sdk-reference/php/agents/skills/builtin/builtin/datasphere-serverless/index.mdx create mode 100644 fern/products/sdk-reference/php/agents/skills/builtin/builtin/datasphere/index.mdx create mode 100644 fern/products/sdk-reference/php/agents/skills/builtin/builtin/datetime/index.mdx create mode 100644 fern/products/sdk-reference/php/agents/skills/builtin/builtin/google-maps/index.mdx create mode 100644 fern/products/sdk-reference/php/agents/skills/builtin/builtin/index.mdx create mode 100644 fern/products/sdk-reference/php/agents/skills/builtin/builtin/info-gatherer/index.mdx create mode 100644 fern/products/sdk-reference/php/agents/skills/builtin/builtin/joke/index.mdx create mode 100644 fern/products/sdk-reference/php/agents/skills/builtin/builtin/math/index.mdx create mode 100644 fern/products/sdk-reference/php/agents/skills/builtin/builtin/mcp-gateway/index.mdx create mode 100644 fern/products/sdk-reference/php/agents/skills/builtin/builtin/native-vector-search/index.mdx create mode 100644 fern/products/sdk-reference/php/agents/skills/builtin/builtin/play-background-file/index.mdx create mode 100644 fern/products/sdk-reference/php/agents/skills/builtin/builtin/spider/index.mdx create mode 100644 fern/products/sdk-reference/php/agents/skills/builtin/builtin/swml-transfer/index.mdx create mode 100644 fern/products/sdk-reference/php/agents/skills/builtin/builtin/weather-api/index.mdx create mode 100644 fern/products/sdk-reference/php/agents/skills/builtin/builtin/web-search/index.mdx create mode 100644 fern/products/sdk-reference/php/agents/skills/builtin/builtin/wikipedia-search/index.mdx create mode 100644 fern/products/sdk-reference/php/agents/skills/builtin/index.mdx create mode 100644 fern/products/sdk-reference/php/agents/skills/index.mdx create mode 100644 fern/products/sdk-reference/php/agents/skills/skills/http-helper/index.mdx create mode 100644 fern/products/sdk-reference/php/agents/skills/skills/index.mdx create mode 100644 fern/products/sdk-reference/php/agents/skills/skills/skill-base/index.mdx create mode 100644 fern/products/sdk-reference/php/agents/skills/skills/skill-manager/index.mdx create mode 100644 fern/products/sdk-reference/php/agents/skills/skills/skill-registry/index.mdx create mode 100644 fern/products/sdk-reference/php/agents/swaig/index.mdx create mode 100644 fern/products/sdk-reference/php/agents/swaig/swaig/function-result/index.mdx create mode 100644 fern/products/sdk-reference/php/agents/swaig/swaig/index.mdx create mode 100644 fern/products/sdk-reference/php/agents/swaig/swaig/parameter-schema/index.mdx create mode 100644 fern/products/sdk-reference/php/agents/swml/index.mdx create mode 100644 fern/products/sdk-reference/php/agents/swml/swml/document/index.mdx create mode 100644 fern/products/sdk-reference/php/agents/swml/swml/index.mdx create mode 100644 fern/products/sdk-reference/php/agents/swml/swml/schema/index.mdx create mode 100644 fern/products/sdk-reference/php/agents/swml/swml/service/index.mdx create mode 100644 fern/products/sdk-reference/php/core/index.mdx create mode 100644 fern/products/sdk-reference/php/core/logging/index.mdx create mode 100644 fern/products/sdk-reference/php/core/logging/logging/index.mdx create mode 100644 fern/products/sdk-reference/php/core/logging/logging/logger/index.mdx create mode 100644 fern/products/sdk-reference/php/core/logging/logging/logging-config/index.mdx create mode 100644 fern/products/sdk-reference/php/core/security/index.mdx create mode 100644 fern/products/sdk-reference/php/core/security/security/index.mdx create mode 100644 fern/products/sdk-reference/php/core/security/security/session-manager/index.mdx create mode 100644 fern/products/sdk-reference/php/core/security/security/webhook-middleware/index.mdx create mode 100644 fern/products/sdk-reference/php/core/security/security/webhook-validator/index.mdx create mode 100644 fern/products/sdk-reference/php/core/utils/index.mdx create mode 100644 fern/products/sdk-reference/php/core/utils/utils/index.mdx create mode 100644 fern/products/sdk-reference/php/core/utils/utils/schema-utils/index.mdx create mode 100644 fern/products/sdk-reference/php/core/utils/utils/schema-validation-error/index.mdx create mode 100644 fern/products/sdk-reference/php/core/utils/utils/url-validator/index.mdx create mode 100644 fern/products/sdk-reference/php/relay/index.mdx create mode 100644 fern/products/sdk-reference/php/relay/index__2.mdx create mode 100644 fern/products/sdk-reference/php/relay/relay/action/index.mdx create mode 100644 fern/products/sdk-reference/php/relay/relay/ai-action/index.mdx create mode 100644 fern/products/sdk-reference/php/relay/relay/call/index.mdx create mode 100644 fern/products/sdk-reference/php/relay/relay/client/index.mdx create mode 100644 fern/products/sdk-reference/php/relay/relay/collect-action/index.mdx create mode 100644 fern/products/sdk-reference/php/relay/relay/constants/index.mdx create mode 100644 fern/products/sdk-reference/php/relay/relay/detect-action/index.mdx create mode 100644 fern/products/sdk-reference/php/relay/relay/device/index.mdx create mode 100644 fern/products/sdk-reference/php/relay/relay/event/index.mdx create mode 100644 fern/products/sdk-reference/php/relay/relay/fax-action/index.mdx create mode 100644 fern/products/sdk-reference/php/relay/relay/index.mdx create mode 100644 fern/products/sdk-reference/php/relay/relay/message/index.mdx create mode 100644 fern/products/sdk-reference/php/relay/relay/pay-action/index.mdx create mode 100644 fern/products/sdk-reference/php/relay/relay/play-action/index.mdx create mode 100644 fern/products/sdk-reference/php/relay/relay/record-action/index.mdx create mode 100644 fern/products/sdk-reference/php/relay/relay/relay-error/index.mdx create mode 100644 fern/products/sdk-reference/php/relay/relay/stream-action/index.mdx create mode 100644 fern/products/sdk-reference/php/relay/relay/tap-action/index.mdx create mode 100644 fern/products/sdk-reference/php/relay/relay/transcribe-action/index.mdx create mode 100644 fern/products/sdk-reference/php/relay/relay/web-socket/index.mdx create mode 100644 fern/products/sdk-reference/php/rest/index.mdx create mode 100644 fern/products/sdk-reference/php/rest/index__2.mdx create mode 100644 fern/products/sdk-reference/php/rest/namespaces/index.mdx create mode 100644 fern/products/sdk-reference/php/rest/namespaces/namespaces/addresses/index.mdx create mode 100644 fern/products/sdk-reference/php/rest/namespaces/namespaces/calling/index.mdx create mode 100644 fern/products/sdk-reference/php/rest/namespaces/namespaces/compat-accounts/index.mdx create mode 100644 fern/products/sdk-reference/php/rest/namespaces/namespaces/compat-conferences/index.mdx create mode 100644 fern/products/sdk-reference/php/rest/namespaces/namespaces/compat-phone-numbers/index.mdx create mode 100644 fern/products/sdk-reference/php/rest/namespaces/namespaces/compat-recordings/index.mdx create mode 100644 fern/products/sdk-reference/php/rest/namespaces/namespaces/compat-tokens/index.mdx create mode 100644 fern/products/sdk-reference/php/rest/namespaces/namespaces/compat-transcriptions/index.mdx create mode 100644 fern/products/sdk-reference/php/rest/namespaces/namespaces/compat/index.mdx create mode 100644 fern/products/sdk-reference/php/rest/namespaces/namespaces/conference-logs/index.mdx create mode 100644 fern/products/sdk-reference/php/rest/namespaces/namespaces/datasphere/index.mdx create mode 100644 fern/products/sdk-reference/php/rest/namespaces/namespaces/fabric-addresses/index.mdx create mode 100644 fern/products/sdk-reference/php/rest/namespaces/namespaces/fabric-generic-resources/index.mdx create mode 100644 fern/products/sdk-reference/php/rest/namespaces/namespaces/fabric-tokens/index.mdx create mode 100644 fern/products/sdk-reference/php/rest/namespaces/namespaces/fabric/index.mdx create mode 100644 fern/products/sdk-reference/php/rest/namespaces/namespaces/fax-logs/index.mdx create mode 100644 fern/products/sdk-reference/php/rest/namespaces/namespaces/imported-numbers/index.mdx create mode 100644 fern/products/sdk-reference/php/rest/namespaces/namespaces/index.mdx create mode 100644 fern/products/sdk-reference/php/rest/namespaces/namespaces/logs/index.mdx create mode 100644 fern/products/sdk-reference/php/rest/namespaces/namespaces/message-logs/index.mdx create mode 100644 fern/products/sdk-reference/php/rest/namespaces/namespaces/mfa/index.mdx create mode 100644 fern/products/sdk-reference/php/rest/namespaces/namespaces/project-tokens/index.mdx create mode 100644 fern/products/sdk-reference/php/rest/namespaces/namespaces/project/index.mdx create mode 100644 fern/products/sdk-reference/php/rest/namespaces/namespaces/recordings/index.mdx create mode 100644 fern/products/sdk-reference/php/rest/namespaces/namespaces/registry-brands/index.mdx create mode 100644 fern/products/sdk-reference/php/rest/namespaces/namespaces/registry-campaigns/index.mdx create mode 100644 fern/products/sdk-reference/php/rest/namespaces/namespaces/registry-numbers/index.mdx create mode 100644 fern/products/sdk-reference/php/rest/namespaces/namespaces/registry-orders/index.mdx create mode 100644 fern/products/sdk-reference/php/rest/namespaces/namespaces/registry/index.mdx create mode 100644 fern/products/sdk-reference/php/rest/namespaces/namespaces/short-codes/index.mdx create mode 100644 fern/products/sdk-reference/php/rest/namespaces/namespaces/sip-profile/index.mdx create mode 100644 fern/products/sdk-reference/php/rest/namespaces/namespaces/video-conference-tokens/index.mdx create mode 100644 fern/products/sdk-reference/php/rest/namespaces/namespaces/video-room-recordings/index.mdx create mode 100644 fern/products/sdk-reference/php/rest/namespaces/namespaces/video-room-sessions/index.mdx create mode 100644 fern/products/sdk-reference/php/rest/namespaces/namespaces/video-room-tokens/index.mdx create mode 100644 fern/products/sdk-reference/php/rest/namespaces/namespaces/video-streams/index.mdx create mode 100644 fern/products/sdk-reference/php/rest/namespaces/namespaces/video/index.mdx create mode 100644 fern/products/sdk-reference/php/rest/namespaces/namespaces/voice-logs/index.mdx create mode 100644 fern/products/sdk-reference/php/rest/rest/base-resource/index.mdx create mode 100644 fern/products/sdk-reference/php/rest/rest/crud-resource/index.mdx create mode 100644 fern/products/sdk-reference/php/rest/rest/crud-with-addresses/index.mdx create mode 100644 fern/products/sdk-reference/php/rest/rest/http-client/index.mdx create mode 100644 fern/products/sdk-reference/php/rest/rest/index.mdx create mode 100644 fern/products/sdk-reference/php/rest/rest/paginated-iterator/index.mdx create mode 100644 fern/products/sdk-reference/php/rest/rest/rest-client/index.mdx create mode 100644 fern/products/sdk-reference/php/rest/rest/signal-wire-rest-error/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/contexts/contexts/context-builder/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/contexts/contexts/context/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/contexts/contexts/gather-info/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/contexts/contexts/gather-question/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/contexts/contexts/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/contexts/contexts/step/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/data-map/data-map/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/logging/logging/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/logging/logging/logger/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/logging/logging/logging-config/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/pom/pom/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/pom/pom/prompt-object-model/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/pom/pom/section/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/relay/relay/action/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/relay/relay/ai-action/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/relay/relay/call/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/relay/relay/client/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/relay/relay/collect-action/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/relay/relay/constants/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/relay/relay/detect-action/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/relay/relay/device/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/relay/relay/event/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/relay/relay/fax-action/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/relay/relay/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/relay/relay/message/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/relay/relay/pay-action/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/relay/relay/play-action/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/relay/relay/record-action/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/relay/relay/relay-error/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/relay/relay/stream-action/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/relay/relay/tap-action/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/relay/relay/transcribe-action/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/relay/relay/web-socket/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/addresses/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/calling/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/compat-accounts/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/compat-conferences/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/compat-phone-numbers/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/compat-recordings/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/compat-tokens/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/compat-transcriptions/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/compat/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/conference-logs/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/datasphere/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/fabric-addresses/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/fabric-generic-resources/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/fabric-tokens/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/fabric/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/fax-logs/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/imported-numbers/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/logs/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/message-logs/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/mfa/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/project-tokens/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/project/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/recordings/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/registry-brands/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/registry-campaigns/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/registry-numbers/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/registry-orders/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/registry/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/short-codes/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/sip-profile/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/video-conference-tokens/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/video-room-recordings/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/video-room-sessions/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/video-room-tokens/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/video-streams/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/video/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/voice-logs/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/rest/rest/base-resource/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/rest/rest/crud-resource/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/rest/rest/crud-with-addresses/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/rest/rest/http-client/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/rest/rest/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/rest/rest/paginated-iterator/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/rest/rest/rest-client/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/rest/rest/signal-wire-rest-error/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/security/security/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/security/security/session-manager/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/security/security/webhook-middleware/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/security/security/webhook-validator/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/server/server/agent-server/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/server/server/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/serverless/serverless/adapter/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/serverless/serverless/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/api-ninjas-trivia/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/claude-skills/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/custom-skills/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/datasphere-serverless/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/datasphere/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/datetime/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/google-maps/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/info-gatherer/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/joke/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/math/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/mcp-gateway/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/native-vector-search/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/play-background-file/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/spider/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/swml-transfer/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/weather-api/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/web-search/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/wikipedia-search/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/skills/skills/http-helper/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/skills/skills/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/skills/skills/skill-base/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/skills/skills/skill-manager/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/skills/skills/skill-registry/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/swaig/swaig/function-result/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/swaig/swaig/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/swaig/swaig/parameter-schema/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/swml/swml/document/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/swml/swml/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/swml/swml/schema/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/swml/swml/service/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/utils/utils/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/utils/utils/schema-utils/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/utils/utils/schema-validation-error/index.mdx delete mode 100644 fern/products/sdk-reference/php/signal-wire/utils/utils/url-validator/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/agent-base/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/agent-base/index__2.mdx rename fern/products/sdk-reference/python/{signalwire/agent-server => agents}/agent-server/add-security-headers.mdx (87%) create mode 100644 fern/products/sdk-reference/python/agents/agent-server/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/agent-server/index__2.mdx create mode 100644 fern/products/sdk-reference/python/agents/agent/config/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/agent/deployment/handlers/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/agent/deployment/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/agent/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/agent/prompt/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/agent/prompt/manager/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/agent/prompt/manager/prompt-manager/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/agent/routing/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/agent/security/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/agent/swml/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/agent/tools/decorator/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/agent/tools/decorator/tool-decorator/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/agent/tools/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/agent/tools/registry/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/agent/tools/registry/tool-registry/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/agent/tools/type-inference/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/auth-handler/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/auth-handler/index__2.mdx create mode 100644 fern/products/sdk-reference/python/agents/cli/build-search/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/cli/config/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/cli/core/agent-loader/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/cli/core/argparse-helpers/custom-argument-parser/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/cli/core/argparse-helpers/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/cli/core/dynamic-config/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/cli/core/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/cli/core/service-loader/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/cli/core/service-loader/service-capture/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/cli/dokku/colors/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/cli/dokku/dokku-project-generator/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/cli/dokku/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/cli/execution/datamap-exec/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/cli/execution/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/cli/execution/webhook-exec/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/cli/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/cli/init-project/colors/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/cli/init-project/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/cli/init-project/project-generator/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/cli/output/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/cli/output/output-formatter/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/cli/output/swml-dump/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/cli/simulation/data-generation/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/cli/simulation/data-overrides/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/cli/simulation/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/cli/simulation/mock-env/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/cli/simulation/mock-env/mock-headers/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/cli/simulation/mock-env/mock-query-params/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/cli/simulation/mock-env/mock-request/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/cli/simulation/mock-env/mock-url/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/cli/simulation/mock-env/serverless-simulator/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/cli/swaig-test-wrapper/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/cli/test-swaig/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/cli/types/agent-info/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/cli/types/call-data/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/cli/types/data-map-config/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/cli/types/function-info/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/cli/types/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/cli/types/post-data/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/cli/types/vars-data/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/config-loader/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/config-loader/index__2.mdx create mode 100644 fern/products/sdk-reference/python/agents/contexts/context-builder/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/contexts/context/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/contexts/gather-info/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/contexts/gather-question/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/contexts/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/contexts/step/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/data-map/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/data-map/index__2.mdx create mode 100644 fern/products/sdk-reference/python/agents/function-result/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/function-result/index__2.mdx create mode 100644 fern/products/sdk-reference/python/agents/gateway-service/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/gateway-service/mcp-gateway/index.mdx rename fern/products/sdk-reference/python/{signalwire/mcp-gateway => agents}/gateway-service/mcp-gateway/set-security-headers.mdx (84%) create mode 100644 fern/products/sdk-reference/python/agents/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/livewire/agent-handoff/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/livewire/agent-server/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/livewire/agent-session/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/livewire/agent/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/livewire/chat-context/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/livewire/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/livewire/inference-llm/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/livewire/inference-stt/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/livewire/inference-tts/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/livewire/job-context/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/livewire/job-process/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/livewire/plugins/cartesia-tts/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/livewire/plugins/deepgram-stt/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/livewire/plugins/eleven-labs-tts/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/livewire/plugins/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/livewire/plugins/open-aillm/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/livewire/plugins/silero-vad/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/livewire/room/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/livewire/run-context/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/livewire/stop-response/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/livewire/tool-error/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/mcp-gateway/gateway-service/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/mcp-gateway/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/mcp-gateway/mcp-manager/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/mcp-gateway/mcp-manager/mcp-client/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/mcp-gateway/mcp-manager/mcp-manager/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/mcp-gateway/mcp-manager/mcp-service/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/mcp-gateway/session-manager/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/mcp-gateway/session-manager/session-manager/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/mcp-gateway/session-manager/session/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/mixins/ai-config-mixin/ai-config-mixin/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/mixins/ai-config-mixin/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/mixins/auth-mixin/auth-mixin/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/mixins/auth-mixin/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/mixins/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/mixins/mcp-server-mixin/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/mixins/mcp-server-mixin/mcp-server-mixin/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/mixins/prompt-mixin/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/mixins/prompt-mixin/prompt-mixin/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/mixins/serverless-mixin/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/mixins/serverless-mixin/serverless-mixin/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/mixins/skill-mixin/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/mixins/skill-mixin/skill-mixin/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/mixins/state-mixin/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/mixins/state-mixin/state-mixin/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/mixins/tool-mixin/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/mixins/tool-mixin/tool-mixin/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/mixins/web-mixin/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/mixins/web-mixin/web-mixin/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/pom-builder/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/pom-builder/index__2.mdx create mode 100644 fern/products/sdk-reference/python/agents/pom/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/pom/index__2.mdx create mode 100644 fern/products/sdk-reference/python/agents/pom/pom-tool/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/pom/pom/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/pom/pom/prompt-object-model/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/pom/pom/section/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/prefabs/concierge/concierge-agent/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/prefabs/concierge/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/prefabs/faq-bot/faq-bot-agent/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/prefabs/faq-bot/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/prefabs/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/prefabs/info-gatherer/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/prefabs/info-gatherer/info-gatherer-agent/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/prefabs/receptionist/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/prefabs/receptionist/receptionist-agent/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/prefabs/survey/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/prefabs/survey/survey-agent/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/search/document-processor/document-processor/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/search/document-processor/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/search/document-processor/index__2.mdx create mode 100644 fern/products/sdk-reference/python/agents/search/index-builder/index-builder/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/search/index-builder/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/search/index-builder/index__2.mdx create mode 100644 fern/products/sdk-reference/python/agents/search/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/search/migration/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/search/migration/search-index-migrator/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/search/models/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/search/pgvector-backend/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/search/pgvector-backend/pg-vector-backend/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/search/pgvector-backend/pg-vector-search-backend/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/search/query-processor/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/search/search-engine/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/search/search-engine/index__2.mdx create mode 100644 fern/products/sdk-reference/python/agents/search/search-engine/search-engine/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/search/search-service/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/search/search-service/index__2.mdx create mode 100644 fern/products/sdk-reference/python/agents/search/search-service/search-request/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/search/search-service/search-response/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/search/search-service/search-result/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/search/search-service/search-service/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/skill-base/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/skill-base/index__2.mdx create mode 100644 fern/products/sdk-reference/python/agents/skill-manager/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/skill-manager/index__2.mdx create mode 100644 fern/products/sdk-reference/python/agents/skills/api-ninjas-trivia/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/skills/api-ninjas-trivia/skill/api-ninjas-trivia-skill/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/skills/api-ninjas-trivia/skill/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/skills/claude-skills/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/skills/claude-skills/skill/claude-skills-skill/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/skills/claude-skills/skill/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/skills/datasphere-serverless/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/skills/datasphere-serverless/skill/data-sphere-serverless-skill/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/skills/datasphere-serverless/skill/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/skills/datasphere/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/skills/datasphere/skill/data-sphere-skill/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/skills/datasphere/skill/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/skills/datetime/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/skills/datetime/skill/date-time-skill/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/skills/datetime/skill/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/skills/google-maps/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/skills/google-maps/skill/google-maps-client/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/skills/google-maps/skill/google-maps-skill/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/skills/google-maps/skill/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/skills/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/skills/info-gatherer/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/skills/info-gatherer/skill/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/skills/info-gatherer/skill/info-gatherer-skill/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/skills/joke/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/skills/joke/skill/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/skills/joke/skill/joke-skill/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/skills/math/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/skills/math/skill/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/skills/math/skill/math-skill/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/skills/mcp-gateway/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/skills/mcp-gateway/skill/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/skills/mcp-gateway/skill/mcp-gateway-skill/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/skills/native-vector-search/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/skills/native-vector-search/skill/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/skills/native-vector-search/skill/native-vector-search-skill/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/skills/play-background-file/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/skills/play-background-file/skill/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/skills/play-background-file/skill/play-background-file-skill/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/skills/registry/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/skills/registry/skill-registry/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/skills/spider/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/skills/spider/skill/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/skills/spider/skill/spider-skill/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/skills/swml-transfer/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/skills/swml-transfer/skill/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/skills/swml-transfer/skill/swml-transfer-skill/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/skills/weather-api/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/skills/weather-api/skill/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/skills/weather-api/skill/weather-api-skill/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/skills/web-search/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/skills/web-search/skill-improved/google-search-scraper/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/skills/web-search/skill-improved/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/skills/web-search/skill-improved/web-search-skill/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/skills/web-search/skill-original/google-search-scraper/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/skills/web-search/skill-original/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/skills/web-search/skill-original/web-search-skill/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/skills/web-search/skill/google-search-scraper/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/skills/web-search/skill/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/skills/web-search/skill/web-search-skill/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/skills/wikipedia-search/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/skills/wikipedia-search/skill/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/skills/wikipedia-search/skill/wikipedia-search-skill/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/swaig-function/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/swaig-function/index__2.mdx create mode 100644 fern/products/sdk-reference/python/agents/swml-builder/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/swml-builder/index__2.mdx create mode 100644 fern/products/sdk-reference/python/agents/swml-handler/ai-verb-handler/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/swml-handler/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/swml-handler/swml-verb-handler/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/swml-handler/verb-handler-registry/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/swml-renderer/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/swml-renderer/index__2.mdx create mode 100644 fern/products/sdk-reference/python/agents/swml-service/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/swml-service/index__2.mdx create mode 100644 fern/products/sdk-reference/python/agents/web/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/web/web-service/index.mdx create mode 100644 fern/products/sdk-reference/python/agents/web/web-service/web-service/index.mdx create mode 100644 fern/products/sdk-reference/python/core/index.mdx create mode 100644 fern/products/sdk-reference/python/core/logging-config/index.mdx create mode 100644 fern/products/sdk-reference/python/core/security-config/index.mdx create mode 100644 fern/products/sdk-reference/python/core/security-config/index__2.mdx create mode 100644 fern/products/sdk-reference/python/core/security/index.mdx create mode 100644 fern/products/sdk-reference/python/core/security/session-manager/index.mdx create mode 100644 fern/products/sdk-reference/python/core/security/session-manager/session-manager/index.mdx create mode 100644 fern/products/sdk-reference/python/core/security/webhook-middleware/index.mdx create mode 100644 fern/products/sdk-reference/python/core/security/webhook-validator/index.mdx create mode 100644 fern/products/sdk-reference/python/core/utils/index.mdx create mode 100644 fern/products/sdk-reference/python/core/utils/pom-utils/index.mdx create mode 100644 fern/products/sdk-reference/python/core/utils/schema-utils/index.mdx create mode 100644 fern/products/sdk-reference/python/core/utils/schema-utils/schema-utils/index.mdx create mode 100644 fern/products/sdk-reference/python/core/utils/schema-utils/schema-validation-error/index.mdx create mode 100644 fern/products/sdk-reference/python/core/utils/token-generators/index.mdx create mode 100644 fern/products/sdk-reference/python/core/utils/url-validator/index.mdx create mode 100644 fern/products/sdk-reference/python/core/utils/validators/index.mdx create mode 100644 fern/products/sdk-reference/python/relay/call/action/index.mdx create mode 100644 fern/products/sdk-reference/python/relay/call/ai-action/index.mdx create mode 100644 fern/products/sdk-reference/python/relay/call/collect-action/index.mdx create mode 100644 fern/products/sdk-reference/python/relay/call/detect-action/index.mdx create mode 100644 fern/products/sdk-reference/python/relay/call/fax-action/index.mdx create mode 100644 fern/products/sdk-reference/python/relay/call/index.mdx create mode 100644 fern/products/sdk-reference/python/relay/call/index__2.mdx create mode 100644 fern/products/sdk-reference/python/relay/call/pay-action/index.mdx create mode 100644 fern/products/sdk-reference/python/relay/call/play-action/index.mdx create mode 100644 fern/products/sdk-reference/python/relay/call/record-action/index.mdx create mode 100644 fern/products/sdk-reference/python/relay/call/standalone-collect-action/index.mdx create mode 100644 fern/products/sdk-reference/python/relay/call/stream-action/index.mdx create mode 100644 fern/products/sdk-reference/python/relay/call/tap-action/index.mdx create mode 100644 fern/products/sdk-reference/python/relay/call/transcribe-action/index.mdx create mode 100644 fern/products/sdk-reference/python/relay/client/index.mdx create mode 100644 fern/products/sdk-reference/python/relay/client/relay-client/index.mdx create mode 100644 fern/products/sdk-reference/python/relay/client/relay-error/index.mdx create mode 100644 fern/products/sdk-reference/python/relay/constants/index.mdx create mode 100644 fern/products/sdk-reference/python/relay/event/call-receive-event/index.mdx create mode 100644 fern/products/sdk-reference/python/relay/event/call-state-event/index.mdx create mode 100644 fern/products/sdk-reference/python/relay/event/calling-error-event/index.mdx create mode 100644 fern/products/sdk-reference/python/relay/event/collect-event/index.mdx create mode 100644 fern/products/sdk-reference/python/relay/event/conference-event/index.mdx create mode 100644 fern/products/sdk-reference/python/relay/event/connect-event/index.mdx create mode 100644 fern/products/sdk-reference/python/relay/event/denoise-event/index.mdx create mode 100644 fern/products/sdk-reference/python/relay/event/detect-event/index.mdx create mode 100644 fern/products/sdk-reference/python/relay/event/dial-event/index.mdx create mode 100644 fern/products/sdk-reference/python/relay/event/echo-event/index.mdx create mode 100644 fern/products/sdk-reference/python/relay/event/fax-event/index.mdx create mode 100644 fern/products/sdk-reference/python/relay/event/hold-event/index.mdx create mode 100644 fern/products/sdk-reference/python/relay/event/index.mdx create mode 100644 fern/products/sdk-reference/python/relay/event/message-receive-event/index.mdx create mode 100644 fern/products/sdk-reference/python/relay/event/message-state-event/index.mdx create mode 100644 fern/products/sdk-reference/python/relay/event/pay-event/index.mdx create mode 100644 fern/products/sdk-reference/python/relay/event/play-event/index.mdx create mode 100644 fern/products/sdk-reference/python/relay/event/queue-event/index.mdx create mode 100644 fern/products/sdk-reference/python/relay/event/record-event/index.mdx create mode 100644 fern/products/sdk-reference/python/relay/event/refer-event/index.mdx create mode 100644 fern/products/sdk-reference/python/relay/event/relay-event/index.mdx create mode 100644 fern/products/sdk-reference/python/relay/event/send-digits-event/index.mdx create mode 100644 fern/products/sdk-reference/python/relay/event/stream-event/index.mdx create mode 100644 fern/products/sdk-reference/python/relay/event/tap-event/index.mdx create mode 100644 fern/products/sdk-reference/python/relay/event/transcribe-event/index.mdx create mode 100644 fern/products/sdk-reference/python/relay/index.mdx create mode 100644 fern/products/sdk-reference/python/relay/message/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/call-handler/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/call-handler/phone-call-handler/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/client/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/client/rest-client/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/addresses/addresses-resource/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/addresses/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/calling/calling-namespace/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/calling/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/chat/chat-resource/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/chat/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/compat/compat-accounts/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/compat/compat-applications/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/compat/compat-calls/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/compat/compat-conferences/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/compat/compat-faxes/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/compat/compat-laml-bins/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/compat/compat-messages/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/compat/compat-namespace/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/compat/compat-phone-numbers/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/compat/compat-queues/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/compat/compat-recordings/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/compat/compat-tokens/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/compat/compat-transcriptions/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/compat/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/datasphere/datasphere-documents/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/datasphere/datasphere-namespace/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/datasphere/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/fabric/auto-materialized-webhook/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/fabric/call-flows-resource/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/fabric/conference-rooms-resource/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/fabric/cxml-applications-resource/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/fabric/cxml-webhooks-resource/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/fabric/fabric-addresses/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/fabric/fabric-namespace/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/fabric/fabric-resource-put/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/fabric/fabric-resource/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/fabric/fabric-tokens/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/fabric/generic-resources/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/fabric/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/fabric/subscribers-resource/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/fabric/swml-webhooks-resource/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/imported-numbers/imported-numbers-resource/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/imported-numbers/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/logs/conference-logs/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/logs/fax-logs/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/logs/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/logs/logs-namespace/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/logs/message-logs/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/logs/voice-logs/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/lookup/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/lookup/lookup-resource/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/mfa/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/mfa/mfa-resource/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/number-groups/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/number-groups/number-groups-resource/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/phone-numbers/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/phone-numbers/phone-numbers-resource/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/project/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/project/project-namespace/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/project/project-tokens/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/pubsub/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/pubsub/pub-sub-resource/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/queues/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/queues/queues-resource/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/recordings/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/recordings/recordings-resource/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/registry/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/registry/registry-brands/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/registry/registry-campaigns/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/registry/registry-namespace/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/registry/registry-numbers/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/registry/registry-orders/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/short-codes/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/short-codes/short-codes-resource/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/sip-profile/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/sip-profile/sip-profile-resource/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/verified-callers/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/verified-callers/verified-callers-resource/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/video/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/video/video-conference-tokens/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/video/video-conferences/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/video/video-namespace/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/video/video-room-recordings/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/video/video-room-sessions/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/video/video-room-tokens/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/video/video-rooms/index.mdx create mode 100644 fern/products/sdk-reference/python/rest/namespaces/video/video-streams/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/agent-server/agent-server/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/agent-server/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/cli/build-search/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/cli/config/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/cli/core/agent-loader/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/cli/core/argparse-helpers/custom-argument-parser/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/cli/core/argparse-helpers/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/cli/core/dynamic-config/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/cli/core/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/cli/core/service-loader/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/cli/core/service-loader/service-capture/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/cli/dokku/colors/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/cli/dokku/dokku-project-generator/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/cli/dokku/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/cli/execution/datamap-exec/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/cli/execution/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/cli/execution/webhook-exec/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/cli/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/cli/init-project/colors/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/cli/init-project/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/cli/init-project/project-generator/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/cli/output/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/cli/output/output-formatter/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/cli/output/swml-dump/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/cli/simulation/data-generation/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/cli/simulation/data-overrides/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/cli/simulation/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/cli/simulation/mock-env/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/cli/simulation/mock-env/mock-headers/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/cli/simulation/mock-env/mock-query-params/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/cli/simulation/mock-env/mock-request/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/cli/simulation/mock-env/mock-url/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/cli/simulation/mock-env/serverless-simulator/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/cli/swaig-test-wrapper/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/cli/test-swaig/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/cli/types/agent-info/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/cli/types/call-data/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/cli/types/data-map-config/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/cli/types/function-info/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/cli/types/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/cli/types/post-data/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/cli/types/vars-data/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/agent-base/agent-base/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/agent-base/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/agent/config/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/agent/deployment/handlers/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/agent/deployment/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/agent/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/agent/prompt/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/agent/prompt/manager/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/agent/prompt/manager/prompt-manager/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/agent/routing/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/agent/security/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/agent/swml/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/agent/tools/decorator/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/agent/tools/decorator/tool-decorator/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/agent/tools/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/agent/tools/registry/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/agent/tools/registry/tool-registry/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/agent/tools/type-inference/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/auth-handler/auth-handler/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/auth-handler/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/config-loader/config-loader/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/config-loader/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/contexts/context-builder/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/contexts/context/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/contexts/gather-info/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/contexts/gather-question/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/contexts/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/contexts/step/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/data-map/data-map/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/data-map/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/function-result/function-result/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/function-result/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/logging-config/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/mixins/ai-config-mixin/ai-config-mixin/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/mixins/ai-config-mixin/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/mixins/auth-mixin/auth-mixin/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/mixins/auth-mixin/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/mixins/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/mixins/mcp-server-mixin/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/mixins/mcp-server-mixin/mcp-server-mixin/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/mixins/prompt-mixin/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/mixins/prompt-mixin/prompt-mixin/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/mixins/serverless-mixin/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/mixins/serverless-mixin/serverless-mixin/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/mixins/skill-mixin/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/mixins/skill-mixin/skill-mixin/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/mixins/state-mixin/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/mixins/state-mixin/state-mixin/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/mixins/tool-mixin/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/mixins/tool-mixin/tool-mixin/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/mixins/web-mixin/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/mixins/web-mixin/web-mixin/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/pom-builder/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/pom-builder/pom-builder/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/security-config/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/security-config/security-config/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/security/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/security/session-manager/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/security/session-manager/session-manager/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/security/webhook-middleware/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/security/webhook-validator/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/skill-base/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/skill-base/skill-base/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/skill-manager/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/skill-manager/skill-manager/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/swaig-function/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/swaig-function/swaig-function/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/swml-builder/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/swml-builder/swml-builder/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/swml-handler/ai-verb-handler/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/swml-handler/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/swml-handler/swml-verb-handler/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/swml-handler/verb-handler-registry/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/swml-renderer/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/swml-renderer/swml-renderer/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/swml-service/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/swml-service/swml-service/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/livewire/agent-handoff/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/livewire/agent-server/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/livewire/agent-session/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/livewire/agent/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/livewire/chat-context/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/livewire/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/livewire/inference-llm/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/livewire/inference-stt/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/livewire/inference-tts/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/livewire/job-context/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/livewire/job-process/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/livewire/plugins/cartesia-tts/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/livewire/plugins/deepgram-stt/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/livewire/plugins/eleven-labs-tts/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/livewire/plugins/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/livewire/plugins/open-aillm/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/livewire/plugins/silero-vad/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/livewire/room/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/livewire/run-context/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/livewire/stop-response/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/livewire/tool-error/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/mcp-gateway/gateway-service/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/mcp-gateway/gateway-service/mcp-gateway/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/mcp-gateway/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/mcp-gateway/mcp-manager/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/mcp-gateway/mcp-manager/mcp-client/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/mcp-gateway/mcp-manager/mcp-manager/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/mcp-gateway/mcp-manager/mcp-service/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/mcp-gateway/session-manager/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/mcp-gateway/session-manager/session-manager/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/mcp-gateway/session-manager/session/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/pom/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/pom/pom-tool/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/pom/pom/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/pom/pom/prompt-object-model/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/pom/pom/section/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/prefabs/concierge/concierge-agent/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/prefabs/concierge/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/prefabs/faq-bot/faq-bot-agent/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/prefabs/faq-bot/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/prefabs/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/prefabs/info-gatherer/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/prefabs/info-gatherer/info-gatherer-agent/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/prefabs/receptionist/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/prefabs/receptionist/receptionist-agent/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/prefabs/survey/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/prefabs/survey/survey-agent/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/relay/call/action/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/relay/call/ai-action/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/relay/call/collect-action/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/relay/call/detect-action/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/relay/call/fax-action/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/relay/call/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/relay/call/pay-action/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/relay/call/play-action/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/relay/call/record-action/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/relay/call/standalone-collect-action/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/relay/call/stream-action/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/relay/call/tap-action/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/relay/call/transcribe-action/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/relay/client/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/relay/client/relay-client/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/relay/client/relay-error/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/relay/constants/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/relay/event/call-receive-event/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/relay/event/call-state-event/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/relay/event/calling-error-event/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/relay/event/collect-event/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/relay/event/conference-event/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/relay/event/connect-event/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/relay/event/denoise-event/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/relay/event/detect-event/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/relay/event/dial-event/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/relay/event/echo-event/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/relay/event/fax-event/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/relay/event/hold-event/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/relay/event/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/relay/event/message-receive-event/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/relay/event/message-state-event/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/relay/event/pay-event/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/relay/event/play-event/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/relay/event/queue-event/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/relay/event/record-event/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/relay/event/refer-event/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/relay/event/relay-event/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/relay/event/send-digits-event/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/relay/event/stream-event/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/relay/event/tap-event/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/relay/event/transcribe-event/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/relay/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/relay/message/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/call-handler/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/call-handler/phone-call-handler/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/client/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/client/rest-client/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/addresses/addresses-resource/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/addresses/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/calling/calling-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/calling/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/chat/chat-resource/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/chat/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-accounts/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-applications/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-calls/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-conferences/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-faxes/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-laml-bins/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-messages/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-phone-numbers/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-queues/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-recordings/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-tokens/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-transcriptions/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/datasphere/datasphere-documents/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/datasphere/datasphere-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/datasphere/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/auto-materialized-webhook/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/call-flows-resource/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/conference-rooms-resource/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/cxml-applications-resource/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/cxml-webhooks-resource/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/fabric-addresses/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/fabric-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/fabric-resource-put/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/fabric-resource/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/fabric-tokens/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/generic-resources/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/subscribers-resource/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/swml-webhooks-resource/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/imported-numbers/imported-numbers-resource/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/imported-numbers/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/logs/conference-logs/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/logs/fax-logs/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/logs/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/logs/logs-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/logs/message-logs/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/logs/voice-logs/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/lookup/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/lookup/lookup-resource/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/mfa/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/mfa/mfa-resource/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/number-groups/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/number-groups/number-groups-resource/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/phone-numbers/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/phone-numbers/phone-numbers-resource/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/project/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/project/project-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/project/project-tokens/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/pubsub/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/pubsub/pub-sub-resource/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/queues/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/queues/queues-resource/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/recordings/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/recordings/recordings-resource/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/registry/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/registry/registry-brands/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/registry/registry-campaigns/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/registry/registry-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/registry/registry-numbers/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/registry/registry-orders/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/short-codes/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/short-codes/short-codes-resource/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/sip-profile/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/sip-profile/sip-profile-resource/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/verified-callers/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/verified-callers/verified-callers-resource/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/video/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/video/video-conference-tokens/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/video/video-conferences/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/video/video-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/video/video-room-recordings/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/video/video-room-sessions/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/video/video-room-tokens/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/video/video-rooms/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/rest/namespaces/video/video-streams/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/search/document-processor/document-processor/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/search/document-processor/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/search/document-processor/index__2.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/search/index-builder/index-builder/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/search/index-builder/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/search/index-builder/index__2.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/search/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/search/migration/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/search/migration/search-index-migrator/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/search/models/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/search/pgvector-backend/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/search/pgvector-backend/pg-vector-backend/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/search/pgvector-backend/pg-vector-search-backend/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/search/query-processor/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/search/search-engine/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/search/search-engine/index__2.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/search/search-engine/search-engine/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/search/search-service/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/search/search-service/index__2.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/search/search-service/search-request/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/search/search-service/search-response/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/search/search-service/search-result/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/search/search-service/search-service/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/skills/api-ninjas-trivia/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/skills/api-ninjas-trivia/skill/api-ninjas-trivia-skill/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/skills/api-ninjas-trivia/skill/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/skills/claude-skills/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/skills/claude-skills/skill/claude-skills-skill/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/skills/claude-skills/skill/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/skills/datasphere-serverless/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/skills/datasphere-serverless/skill/data-sphere-serverless-skill/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/skills/datasphere-serverless/skill/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/skills/datasphere/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/skills/datasphere/skill/data-sphere-skill/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/skills/datasphere/skill/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/skills/datetime/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/skills/datetime/skill/date-time-skill/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/skills/datetime/skill/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/skills/google-maps/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/skills/google-maps/skill/google-maps-client/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/skills/google-maps/skill/google-maps-skill/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/skills/google-maps/skill/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/skills/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/skills/info-gatherer/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/skills/info-gatherer/skill/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/skills/info-gatherer/skill/info-gatherer-skill/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/skills/joke/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/skills/joke/skill/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/skills/joke/skill/joke-skill/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/skills/math/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/skills/math/skill/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/skills/math/skill/math-skill/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/skills/mcp-gateway/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/skills/mcp-gateway/skill/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/skills/mcp-gateway/skill/mcp-gateway-skill/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/skills/native-vector-search/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/skills/native-vector-search/skill/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/skills/native-vector-search/skill/native-vector-search-skill/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/skills/play-background-file/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/skills/play-background-file/skill/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/skills/play-background-file/skill/play-background-file-skill/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/skills/registry/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/skills/registry/skill-registry/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/skills/spider/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/skills/spider/skill/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/skills/spider/skill/spider-skill/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/skills/swml-transfer/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/skills/swml-transfer/skill/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/skills/swml-transfer/skill/swml-transfer-skill/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/skills/weather-api/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/skills/weather-api/skill/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/skills/weather-api/skill/weather-api-skill/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/skills/web-search/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/skills/web-search/skill-improved/google-search-scraper/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/skills/web-search/skill-improved/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/skills/web-search/skill-improved/web-search-skill/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/skills/web-search/skill-original/google-search-scraper/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/skills/web-search/skill-original/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/skills/web-search/skill-original/web-search-skill/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/skills/web-search/skill/google-search-scraper/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/skills/web-search/skill/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/skills/web-search/skill/web-search-skill/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/skills/wikipedia-search/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/skills/wikipedia-search/skill/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/skills/wikipedia-search/skill/wikipedia-search-skill/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/utils/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/utils/pom-utils/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/utils/schema-utils/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/utils/schema-utils/schema-utils/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/utils/schema-utils/schema-validation-error/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/utils/token-generators/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/utils/url-validator/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/utils/validators/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/web/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/web/web-service/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/web/web-service/web-service/index.mdx create mode 100644 fern/products/sdk-reference/ruby/agents/agent-base/agent-body-limit-middleware/index.mdx create mode 100644 fern/products/sdk-reference/ruby/agents/agent-base/agent-security-headers-middleware/index.mdx create mode 100644 fern/products/sdk-reference/ruby/agents/agent-base/agent-timing-safe-basic-auth/index.mdx create mode 100644 fern/products/sdk-reference/ruby/agents/agent-base/index.mdx create mode 100644 fern/products/sdk-reference/ruby/agents/agent-base/index__2.mdx create mode 100644 fern/products/sdk-reference/ruby/agents/agent-server/index.mdx create mode 100644 fern/products/sdk-reference/ruby/agents/contexts/context-builder/index.mdx create mode 100644 fern/products/sdk-reference/ruby/agents/contexts/context/index.mdx create mode 100644 fern/products/sdk-reference/ruby/agents/contexts/gather-info/index.mdx create mode 100644 fern/products/sdk-reference/ruby/agents/contexts/gather-question/index.mdx create mode 100644 fern/products/sdk-reference/ruby/agents/contexts/index.mdx create mode 100644 fern/products/sdk-reference/ruby/agents/contexts/step/index.mdx create mode 100644 fern/products/sdk-reference/ruby/agents/data-map/index.mdx create mode 100644 fern/products/sdk-reference/ruby/agents/index.mdx create mode 100644 fern/products/sdk-reference/ruby/agents/pom/index.mdx create mode 100644 fern/products/sdk-reference/ruby/agents/pom/prompt-object-model/index.mdx create mode 100644 fern/products/sdk-reference/ruby/agents/pom/section/index.mdx create mode 100644 fern/products/sdk-reference/ruby/agents/prefabs/concierge/index.mdx create mode 100644 fern/products/sdk-reference/ruby/agents/prefabs/faq-bot/index.mdx create mode 100644 fern/products/sdk-reference/ruby/agents/prefabs/index.mdx create mode 100644 fern/products/sdk-reference/ruby/agents/prefabs/info-gatherer/index.mdx create mode 100644 fern/products/sdk-reference/ruby/agents/prefabs/receptionist/index.mdx create mode 100644 fern/products/sdk-reference/ruby/agents/prefabs/survey/index.mdx create mode 100644 fern/products/sdk-reference/ruby/agents/runtime/index.mdx create mode 100644 fern/products/sdk-reference/ruby/agents/serverless/index.mdx create mode 100644 fern/products/sdk-reference/ruby/agents/serverless/lambda-handler/index.mdx create mode 100644 fern/products/sdk-reference/ruby/agents/skills/builtin/api-ninjas-trivia-skill/index.mdx create mode 100644 fern/products/sdk-reference/ruby/agents/skills/builtin/claude-skills-skill/index.mdx create mode 100644 fern/products/sdk-reference/ruby/agents/skills/builtin/custom-skills-skill/index.mdx create mode 100644 fern/products/sdk-reference/ruby/agents/skills/builtin/datasphere-serverless-skill/index.mdx create mode 100644 fern/products/sdk-reference/ruby/agents/skills/builtin/datasphere-skill/index.mdx create mode 100644 fern/products/sdk-reference/ruby/agents/skills/builtin/date-time-skill/index.mdx create mode 100644 fern/products/sdk-reference/ruby/agents/skills/builtin/google-maps-skill/index.mdx create mode 100644 fern/products/sdk-reference/ruby/agents/skills/builtin/index.mdx create mode 100644 fern/products/sdk-reference/ruby/agents/skills/builtin/info-gatherer-skill/index.mdx create mode 100644 fern/products/sdk-reference/ruby/agents/skills/builtin/joke-skill/index.mdx create mode 100644 fern/products/sdk-reference/ruby/agents/skills/builtin/math-skill/index.mdx create mode 100644 fern/products/sdk-reference/ruby/agents/skills/builtin/mcp-gateway-skill/index.mdx create mode 100644 fern/products/sdk-reference/ruby/agents/skills/builtin/native-vector-search-skill/index.mdx create mode 100644 fern/products/sdk-reference/ruby/agents/skills/builtin/play-background-file-skill/index.mdx create mode 100644 fern/products/sdk-reference/ruby/agents/skills/builtin/spider-skill/index.mdx create mode 100644 fern/products/sdk-reference/ruby/agents/skills/builtin/swml-transfer-skill/index.mdx create mode 100644 fern/products/sdk-reference/ruby/agents/skills/builtin/weather-api-skill/index.mdx create mode 100644 fern/products/sdk-reference/ruby/agents/skills/builtin/web-search-skill/index.mdx create mode 100644 fern/products/sdk-reference/ruby/agents/skills/builtin/wikipedia-search-skill/index.mdx create mode 100644 fern/products/sdk-reference/ruby/agents/skills/index.mdx create mode 100644 fern/products/sdk-reference/ruby/agents/skills/skill-base/index.mdx create mode 100644 fern/products/sdk-reference/ruby/agents/skills/skill-manager/index.mdx create mode 100644 fern/products/sdk-reference/ruby/agents/skills/skill-name/index.mdx create mode 100644 fern/products/sdk-reference/ruby/agents/skills/skill-registry/index.mdx create mode 100644 fern/products/sdk-reference/ruby/agents/swaig/codec/index.mdx create mode 100644 fern/products/sdk-reference/ruby/agents/swaig/function-result/index.mdx create mode 100644 fern/products/sdk-reference/ruby/agents/swaig/index.mdx create mode 100644 fern/products/sdk-reference/ruby/agents/swaig/parameter-schema/index.mdx create mode 100644 fern/products/sdk-reference/ruby/agents/swaig/record-direction/index.mdx create mode 100644 fern/products/sdk-reference/ruby/agents/swaig/record-format/index.mdx create mode 100644 fern/products/sdk-reference/ruby/agents/swaig/tap-direction/index.mdx create mode 100644 fern/products/sdk-reference/ruby/agents/swml/document/index.mdx create mode 100644 fern/products/sdk-reference/ruby/agents/swml/index.mdx create mode 100644 fern/products/sdk-reference/ruby/agents/swml/schema/index.mdx create mode 100644 fern/products/sdk-reference/ruby/agents/swml/service/index.mdx create mode 100644 fern/products/sdk-reference/ruby/agents/swml/service/index__2.mdx create mode 100644 fern/products/sdk-reference/ruby/agents/swml/service/security-headers-middleware/index.mdx create mode 100644 fern/products/sdk-reference/ruby/agents/swml/service/timing-safe-basic-auth/index.mdx create mode 100644 fern/products/sdk-reference/ruby/core/core/index.mdx create mode 100644 fern/products/sdk-reference/ruby/core/core/logging-config/index.mdx create mode 100644 fern/products/sdk-reference/ruby/core/index.mdx create mode 100644 fern/products/sdk-reference/ruby/core/logging/index.mdx create mode 100644 fern/products/sdk-reference/ruby/core/logging/logger/index.mdx create mode 100644 fern/products/sdk-reference/ruby/core/security/index.mdx create mode 100644 fern/products/sdk-reference/ruby/core/security/session-manager/index.mdx create mode 100644 fern/products/sdk-reference/ruby/core/security/webhook-middleware/index.mdx create mode 100644 fern/products/sdk-reference/ruby/core/security/webhook-validator/index.mdx create mode 100644 fern/products/sdk-reference/ruby/core/utils/index.mdx create mode 100644 fern/products/sdk-reference/ruby/core/utils/schema-utils/index.mdx create mode 100644 fern/products/sdk-reference/ruby/core/utils/schema-validation-error/index.mdx create mode 100644 fern/products/sdk-reference/ruby/core/utils/url-validator/index.mdx create mode 100644 fern/products/sdk-reference/ruby/relay/action-timeout-error/index.mdx create mode 100644 fern/products/sdk-reference/ruby/relay/action/index.mdx create mode 100644 fern/products/sdk-reference/ruby/relay/ai-action/index.mdx create mode 100644 fern/products/sdk-reference/ruby/relay/call-receive-event/index.mdx create mode 100644 fern/products/sdk-reference/ruby/relay/call-state-event/index.mdx create mode 100644 fern/products/sdk-reference/ruby/relay/call-state/index.mdx create mode 100644 fern/products/sdk-reference/ruby/relay/call/index.mdx create mode 100644 fern/products/sdk-reference/ruby/relay/calling-error-event/index.mdx create mode 100644 fern/products/sdk-reference/ruby/relay/client/index.mdx create mode 100644 fern/products/sdk-reference/ruby/relay/collect-action/index.mdx create mode 100644 fern/products/sdk-reference/ruby/relay/collect-config/index.mdx create mode 100644 fern/products/sdk-reference/ruby/relay/collect-event/index.mdx create mode 100644 fern/products/sdk-reference/ruby/relay/conference-event/index.mdx create mode 100644 fern/products/sdk-reference/ruby/relay/connect-event/index.mdx create mode 100644 fern/products/sdk-reference/ruby/relay/denoise-event/index.mdx create mode 100644 fern/products/sdk-reference/ruby/relay/detect-action/index.mdx create mode 100644 fern/products/sdk-reference/ruby/relay/detect-event/index.mdx create mode 100644 fern/products/sdk-reference/ruby/relay/device/index.mdx create mode 100644 fern/products/sdk-reference/ruby/relay/dial-event/index.mdx create mode 100644 fern/products/sdk-reference/ruby/relay/dial-state/index.mdx create mode 100644 fern/products/sdk-reference/ruby/relay/echo-event/index.mdx create mode 100644 fern/products/sdk-reference/ruby/relay/fax-action/index.mdx create mode 100644 fern/products/sdk-reference/ruby/relay/fax-event/index.mdx create mode 100644 fern/products/sdk-reference/ruby/relay/hold-event/index.mdx create mode 100644 fern/products/sdk-reference/ruby/relay/index.mdx create mode 100644 fern/products/sdk-reference/ruby/relay/index__2.mdx create mode 100644 fern/products/sdk-reference/ruby/relay/message-receive-event/index.mdx create mode 100644 fern/products/sdk-reference/ruby/relay/message-state-event/index.mdx create mode 100644 fern/products/sdk-reference/ruby/relay/message-state/index.mdx create mode 100644 fern/products/sdk-reference/ruby/relay/message/index.mdx create mode 100644 fern/products/sdk-reference/ruby/relay/pay-action/index.mdx create mode 100644 fern/products/sdk-reference/ruby/relay/pay-event/index.mdx create mode 100644 fern/products/sdk-reference/ruby/relay/play-action/index.mdx create mode 100644 fern/products/sdk-reference/ruby/relay/play-event/index.mdx create mode 100644 fern/products/sdk-reference/ruby/relay/queue-event/index.mdx create mode 100644 fern/products/sdk-reference/ruby/relay/record-action/index.mdx create mode 100644 fern/products/sdk-reference/ruby/relay/record-event/index.mdx create mode 100644 fern/products/sdk-reference/ruby/relay/refer-event/index.mdx create mode 100644 fern/products/sdk-reference/ruby/relay/relay-error/index.mdx create mode 100644 fern/products/sdk-reference/ruby/relay/relay-event/index.mdx create mode 100644 fern/products/sdk-reference/ruby/relay/send-digits-event/index.mdx create mode 100644 fern/products/sdk-reference/ruby/relay/standalone-collect-action/index.mdx create mode 100644 fern/products/sdk-reference/ruby/relay/stream-action/index.mdx create mode 100644 fern/products/sdk-reference/ruby/relay/stream-event/index.mdx create mode 100644 fern/products/sdk-reference/ruby/relay/tap-action/index.mdx create mode 100644 fern/products/sdk-reference/ruby/relay/tap-event/index.mdx create mode 100644 fern/products/sdk-reference/ruby/relay/transcribe-action/index.mdx create mode 100644 fern/products/sdk-reference/ruby/relay/transcribe-event/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/base-resource/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/crud-resource/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/crud-with-addresses/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/http-client/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/index__2.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/namespaces/addresses-resource/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/namespaces/auto-materialized-webhook/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/namespaces/call-flows-resource/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/namespaces/calling-namespace/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/namespaces/chat-resource/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/namespaces/compat-accounts/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/namespaces/compat-applications/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/namespaces/compat-calls/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/namespaces/compat-conferences/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/namespaces/compat-faxes/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/namespaces/compat-laml-bins/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/namespaces/compat-messages/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/namespaces/compat-namespace/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/namespaces/compat-phone-numbers/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/namespaces/compat-queues/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/namespaces/compat-recordings/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/namespaces/compat-tokens/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/namespaces/compat-transcriptions/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/namespaces/conference-logs/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/namespaces/conference-rooms-resource/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/namespaces/cxml-applications-resource/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/namespaces/cxml-webhooks-resource/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/namespaces/datasphere-documents/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/namespaces/datasphere-namespace/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/namespaces/fabric-addresses/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/namespaces/fabric-namespace/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/namespaces/fabric-resource-put/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/namespaces/fabric-resource/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/namespaces/fabric-tokens/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/namespaces/fax-logs/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/namespaces/generic-resources/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/namespaces/imported-numbers-resource/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/namespaces/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/namespaces/logs-namespace/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/namespaces/lookup-resource/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/namespaces/message-logs/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/namespaces/mfa-resource/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/namespaces/number-groups-resource/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/namespaces/phone-numbers-resource/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/namespaces/project-namespace/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/namespaces/project-tokens/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/namespaces/pub-sub-resource/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/namespaces/queues-resource/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/namespaces/recordings-resource/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/namespaces/registry-brands/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/namespaces/registry-campaigns/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/namespaces/registry-namespace/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/namespaces/registry-numbers/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/namespaces/registry-orders/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/namespaces/short-codes-resource/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/namespaces/sip-profile-resource/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/namespaces/subscribers-resource/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/namespaces/swml-webhooks-resource/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/namespaces/verified-callers-resource/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/namespaces/video-conference-tokens/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/namespaces/video-conferences/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/namespaces/video-namespace/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/namespaces/video-room-recordings/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/namespaces/video-room-sessions/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/namespaces/video-room-tokens/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/namespaces/video-rooms/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/namespaces/video-streams/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/namespaces/voice-logs/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/paginated-iterator/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/phone-call-handler/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/rest-client/index.mdx create mode 100644 fern/products/sdk-reference/ruby/rest/signal-wire-rest-error/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/agent-base/agent-body-limit-middleware/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/agent-base/agent-security-headers-middleware/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/agent-base/agent-timing-safe-basic-auth/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/agent-base/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/agent-server/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/contexts/context-builder/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/contexts/context/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/contexts/gather-info/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/contexts/gather-question/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/contexts/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/contexts/step/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/core/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/core/logging-config/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/data-map/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/logging/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/logging/logger/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/pom/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/pom/prompt-object-model/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/pom/section/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/prefabs/concierge/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/prefabs/faq-bot/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/prefabs/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/prefabs/info-gatherer/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/prefabs/receptionist/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/prefabs/survey/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/action-timeout-error/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/action/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/ai-action/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/call-receive-event/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/call-state-event/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/call-state/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/call/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/calling-error-event/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/client/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/collect-action/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/collect-config/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/collect-event/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/conference-event/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/connect-event/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/denoise-event/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/detect-action/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/detect-event/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/device/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/dial-event/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/dial-state/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/echo-event/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/fax-action/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/fax-event/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/hold-event/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/message-receive-event/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/message-state-event/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/message-state/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/message/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/pay-action/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/pay-event/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/play-action/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/play-event/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/queue-event/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/record-action/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/record-event/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/refer-event/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/relay-error/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/relay-event/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/send-digits-event/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/standalone-collect-action/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/stream-action/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/stream-event/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/tap-action/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/tap-event/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/transcribe-action/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/relay/transcribe-event/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/base-resource/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/crud-resource/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/crud-with-addresses/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/http-client/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/addresses-resource/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/auto-materialized-webhook/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/call-flows-resource/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/calling-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/chat-resource/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-accounts/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-applications/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-calls/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-conferences/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-faxes/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-laml-bins/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-messages/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-phone-numbers/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-queues/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-recordings/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-tokens/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-transcriptions/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/conference-logs/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/conference-rooms-resource/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/cxml-applications-resource/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/cxml-webhooks-resource/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/datasphere-documents/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/datasphere-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/fabric-addresses/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/fabric-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/fabric-resource-put/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/fabric-resource/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/fabric-tokens/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/fax-logs/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/generic-resources/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/imported-numbers-resource/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/logs-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/lookup-resource/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/message-logs/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/mfa-resource/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/number-groups-resource/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/phone-numbers-resource/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/project-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/project-tokens/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/pub-sub-resource/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/queues-resource/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/recordings-resource/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/registry-brands/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/registry-campaigns/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/registry-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/registry-numbers/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/registry-orders/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/short-codes-resource/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/sip-profile-resource/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/subscribers-resource/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/swml-webhooks-resource/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/verified-callers-resource/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/video-conference-tokens/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/video-conferences/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/video-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/video-room-recordings/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/video-room-sessions/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/video-room-tokens/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/video-rooms/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/video-streams/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/voice-logs/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/paginated-iterator/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/phone-call-handler/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/rest-client/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/rest/signal-wire-rest-error/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/runtime/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/security/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/security/session-manager/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/security/webhook-middleware/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/security/webhook-validator/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/serverless/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/serverless/lambda-handler/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/skills/builtin/api-ninjas-trivia-skill/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/skills/builtin/claude-skills-skill/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/skills/builtin/custom-skills-skill/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/skills/builtin/datasphere-serverless-skill/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/skills/builtin/datasphere-skill/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/skills/builtin/date-time-skill/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/skills/builtin/google-maps-skill/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/skills/builtin/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/skills/builtin/info-gatherer-skill/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/skills/builtin/joke-skill/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/skills/builtin/math-skill/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/skills/builtin/mcp-gateway-skill/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/skills/builtin/native-vector-search-skill/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/skills/builtin/play-background-file-skill/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/skills/builtin/spider-skill/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/skills/builtin/swml-transfer-skill/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/skills/builtin/weather-api-skill/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/skills/builtin/web-search-skill/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/skills/builtin/wikipedia-search-skill/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/skills/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/skills/skill-base/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/skills/skill-manager/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/skills/skill-name/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/skills/skill-registry/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/swaig/codec/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/swaig/function-result/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/swaig/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/swaig/parameter-schema/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/swaig/record-direction/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/swaig/record-format/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/swaig/tap-direction/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/swml/document/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/swml/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/swml/schema/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/swml/service/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/swml/service/security-headers-middleware/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/swml/service/timing-safe-basic-auth/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/utils/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/utils/schema-utils/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/utils/schema-validation-error/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/utils/url-validator/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/agent/agent-base/agent-base/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/agent/agent-base/agent-options/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/agent/agent-base/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/agent/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/contexts/context-builder/context-builder/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/contexts/context-builder/context/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/contexts/context-builder/gather-info/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/contexts/context-builder/gather-question/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/contexts/context-builder/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/contexts/context-builder/step/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/contexts/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/datamap/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/datamap/index__2.mdx create mode 100644 fern/products/sdk-reference/rust/agents/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/pom/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/pom/index__2.mdx create mode 100644 fern/products/sdk-reference/rust/agents/pom/pom/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/pom/pom/prompt-object-model/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/pom/section/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/prefabs/bedrock/bedrock-agent/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/prefabs/bedrock/bedrock-options/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/prefabs/bedrock/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/prefabs/concierge/concierge-agent/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/prefabs/concierge/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/prefabs/faq-bot/faq-bot-agent/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/prefabs/faq-bot/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/prefabs/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/prefabs/info-gatherer/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/prefabs/info-gatherer/info-gatherer-agent/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/prefabs/receptionist/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/prefabs/receptionist/receptionist-agent/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/prefabs/survey/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/prefabs/survey/survey-agent/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/server/agent-server/agent-server/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/server/agent-server/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/server/error/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/server/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/serverless/adapter/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/serverless/adapter/index__2.mdx create mode 100644 fern/products/sdk-reference/rust/agents/serverless/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/skills/builtin/api-ninjas-trivia/api-ninjas-trivia/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/skills/builtin/api-ninjas-trivia/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/skills/builtin/claude-skills/claude-skills/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/skills/builtin/claude-skills/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/skills/builtin/custom-skills/custom-skills/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/skills/builtin/custom-skills/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/skills/builtin/datasphere-serverless/datasphere-serverless/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/skills/builtin/datasphere-serverless/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/skills/builtin/datasphere/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/skills/builtin/datetime/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/skills/builtin/google-maps/google-maps/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/skills/builtin/google-maps/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/skills/builtin/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/skills/builtin/info-gatherer/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/skills/builtin/info-gatherer/info-gatherer/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/skills/builtin/joke/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/skills/builtin/math/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/skills/builtin/mcp-gateway/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/skills/builtin/mcp-gateway/mcp-gateway/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/skills/builtin/native-vector-search/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/skills/builtin/native-vector-search/native-vector-search/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/skills/builtin/play-background-file/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/skills/builtin/play-background-file/play-background-file/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/skills/builtin/spider/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/skills/builtin/swml-transfer/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/skills/builtin/swml-transfer/swml-transfer/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/skills/builtin/weather-api/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/skills/builtin/weather-api/weather-api/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/skills/builtin/web-search/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/skills/builtin/web-search/web-search/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/skills/builtin/wikipedia-search/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/skills/builtin/wikipedia-search/wikipedia-search/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/skills/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/skills/skill-base/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/skills/skill-base/skill-params/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/skills/skill-manager/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/skills/skill-manager/skill-manager/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/skills/skill-name/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/skills/skill-name/parse-skill-name-error/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/skills/skill-registry/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/skills/skill-registry/skill-registry/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/swaig/function-result/function-result/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/swaig/function-result/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/swaig/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/swaig/media-enums/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/swaig/media-enums/parse-media-enum-error/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/swaig/params-builder/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/swaig/params-builder/params-builder/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/swaig/params-builder/property-builder/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/swml/document/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/swml/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/swml/schema/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/swml/schema/verb-info/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/swml/service/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/swml/service/index__2.mdx create mode 100644 fern/products/sdk-reference/rust/agents/swml/service/service-options/index.mdx create mode 100644 fern/products/sdk-reference/rust/agents/swml/service/tool-def/index.mdx create mode 100644 fern/products/sdk-reference/rust/core/core/index.mdx create mode 100644 fern/products/sdk-reference/rust/core/core/logging-config/index.mdx create mode 100644 fern/products/sdk-reference/rust/core/index.mdx create mode 100644 fern/products/sdk-reference/rust/core/logging/index.mdx create mode 100644 fern/products/sdk-reference/rust/core/logging/logger/index.mdx create mode 100644 fern/products/sdk-reference/rust/core/logging/parse-level-error/index.mdx create mode 100644 fern/products/sdk-reference/rust/core/security/index.mdx create mode 100644 fern/products/sdk-reference/rust/core/security/session-manager/index.mdx create mode 100644 fern/products/sdk-reference/rust/core/security/session-manager/session-manager/index.mdx create mode 100644 fern/products/sdk-reference/rust/core/security/webhook-layer/index.mdx create mode 100644 fern/products/sdk-reference/rust/core/security/webhook-layer/webhook-layer/index.mdx create mode 100644 fern/products/sdk-reference/rust/core/security/webhook-layer/webhook-validate/index.mdx create mode 100644 fern/products/sdk-reference/rust/core/security/webhook/index.mdx create mode 100644 fern/products/sdk-reference/rust/core/utils/index.mdx create mode 100644 fern/products/sdk-reference/rust/core/utils/schema-utils/index.mdx create mode 100644 fern/products/sdk-reference/rust/core/utils/schema-utils/schema-utils/index.mdx create mode 100644 fern/products/sdk-reference/rust/core/utils/schema-utils/schema-validation-error/index.mdx create mode 100644 fern/products/sdk-reference/rust/core/utils/schema-utils/verb-definition/index.mdx create mode 100644 fern/products/sdk-reference/rust/core/utils/url-validator/index.mdx create mode 100644 fern/products/sdk-reference/rust/relay/action/ai-action/index.mdx create mode 100644 fern/products/sdk-reference/rust/relay/action/collect-action/index.mdx create mode 100644 fern/products/sdk-reference/rust/relay/action/detect-action/index.mdx create mode 100644 fern/products/sdk-reference/rust/relay/action/fax-action/index.mdx create mode 100644 fern/products/sdk-reference/rust/relay/action/index.mdx create mode 100644 fern/products/sdk-reference/rust/relay/action/index__2.mdx create mode 100644 fern/products/sdk-reference/rust/relay/action/pay-action/index.mdx create mode 100644 fern/products/sdk-reference/rust/relay/action/play-action/index.mdx create mode 100644 fern/products/sdk-reference/rust/relay/action/record-action/index.mdx create mode 100644 fern/products/sdk-reference/rust/relay/action/stream-action/index.mdx create mode 100644 fern/products/sdk-reference/rust/relay/action/tap-action/index.mdx create mode 100644 fern/products/sdk-reference/rust/relay/action/transcribe-action/index.mdx create mode 100644 fern/products/sdk-reference/rust/relay/call/index.mdx create mode 100644 fern/products/sdk-reference/rust/relay/client/index.mdx create mode 100644 fern/products/sdk-reference/rust/relay/constants/index.mdx create mode 100644 fern/products/sdk-reference/rust/relay/device/index.mdx create mode 100644 fern/products/sdk-reference/rust/relay/error/index.mdx create mode 100644 fern/products/sdk-reference/rust/relay/event/index.mdx create mode 100644 fern/products/sdk-reference/rust/relay/index.mdx create mode 100644 fern/products/sdk-reference/rust/relay/message/index.mdx create mode 100644 fern/products/sdk-reference/rust/relay/state-enums/index.mdx create mode 100644 fern/products/sdk-reference/rust/rest/client/index.mdx create mode 100644 fern/products/sdk-reference/rust/rest/client/rest-client/index.mdx create mode 100644 fern/products/sdk-reference/rust/rest/crud-resource/crud-resource/index.mdx create mode 100644 fern/products/sdk-reference/rust/rest/crud-resource/index.mdx create mode 100644 fern/products/sdk-reference/rust/rest/error/index.mdx create mode 100644 fern/products/sdk-reference/rust/rest/error/signal-wire-rest-error/index.mdx create mode 100644 fern/products/sdk-reference/rust/rest/http-client/http-client/index.mdx create mode 100644 fern/products/sdk-reference/rust/rest/http-client/index.mdx create mode 100644 fern/products/sdk-reference/rust/rest/http-client/stub-transport/index.mdx create mode 100644 fern/products/sdk-reference/rust/rest/http-client/ureq-transport/index.mdx create mode 100644 fern/products/sdk-reference/rust/rest/index.mdx create mode 100644 fern/products/sdk-reference/rust/rest/namespaces/calling/index.mdx create mode 100644 fern/products/sdk-reference/rust/rest/namespaces/compat/compat-accounts/index.mdx create mode 100644 fern/products/sdk-reference/rust/rest/namespaces/compat/compat-applications/index.mdx create mode 100644 fern/products/sdk-reference/rust/rest/namespaces/compat/compat-calls/index.mdx create mode 100644 fern/products/sdk-reference/rust/rest/namespaces/compat/compat-conferences/index.mdx create mode 100644 fern/products/sdk-reference/rust/rest/namespaces/compat/compat-faxes/index.mdx create mode 100644 fern/products/sdk-reference/rust/rest/namespaces/compat/compat-laml-bins/index.mdx create mode 100644 fern/products/sdk-reference/rust/rest/namespaces/compat/compat-messages/index.mdx create mode 100644 fern/products/sdk-reference/rust/rest/namespaces/compat/compat-phone-numbers/index.mdx create mode 100644 fern/products/sdk-reference/rust/rest/namespaces/compat/compat-queues/index.mdx create mode 100644 fern/products/sdk-reference/rust/rest/namespaces/compat/compat-recordings/index.mdx create mode 100644 fern/products/sdk-reference/rust/rest/namespaces/compat/compat-tokens/index.mdx create mode 100644 fern/products/sdk-reference/rust/rest/namespaces/compat/compat-transcriptions/index.mdx create mode 100644 fern/products/sdk-reference/rust/rest/namespaces/compat/index.mdx create mode 100644 fern/products/sdk-reference/rust/rest/namespaces/compat/index__2.mdx create mode 100644 fern/products/sdk-reference/rust/rest/namespaces/datasphere/datasphere-documents/index.mdx create mode 100644 fern/products/sdk-reference/rust/rest/namespaces/datasphere/datasphere-namespace/index.mdx create mode 100644 fern/products/sdk-reference/rust/rest/namespaces/datasphere/index.mdx create mode 100644 fern/products/sdk-reference/rust/rest/namespaces/fabric/call-flows-resource/index.mdx create mode 100644 fern/products/sdk-reference/rust/rest/namespaces/fabric/conference-rooms-resource/index.mdx create mode 100644 fern/products/sdk-reference/rust/rest/namespaces/fabric/cxml-applications-resource/index.mdx create mode 100644 fern/products/sdk-reference/rust/rest/namespaces/fabric/fabric-addresses/index.mdx create mode 100644 fern/products/sdk-reference/rust/rest/namespaces/fabric/fabric-tokens/index.mdx create mode 100644 fern/products/sdk-reference/rust/rest/namespaces/fabric/generic-resources/index.mdx create mode 100644 fern/products/sdk-reference/rust/rest/namespaces/fabric/index.mdx create mode 100644 fern/products/sdk-reference/rust/rest/namespaces/fabric/index__2.mdx create mode 100644 fern/products/sdk-reference/rust/rest/namespaces/fabric/subscribers-resource/index.mdx create mode 100644 fern/products/sdk-reference/rust/rest/namespaces/index.mdx create mode 100644 fern/products/sdk-reference/rust/rest/namespaces/logs/conference-logs/index.mdx create mode 100644 fern/products/sdk-reference/rust/rest/namespaces/logs/fax-logs/index.mdx create mode 100644 fern/products/sdk-reference/rust/rest/namespaces/logs/index.mdx create mode 100644 fern/products/sdk-reference/rust/rest/namespaces/logs/index__2.mdx create mode 100644 fern/products/sdk-reference/rust/rest/namespaces/logs/message-logs/index.mdx create mode 100644 fern/products/sdk-reference/rust/rest/namespaces/logs/voice-logs/index.mdx create mode 100644 fern/products/sdk-reference/rust/rest/namespaces/mfa/index.mdx create mode 100644 fern/products/sdk-reference/rust/rest/namespaces/number-groups/index.mdx create mode 100644 fern/products/sdk-reference/rust/rest/namespaces/number-groups/number-groups/index.mdx create mode 100644 fern/products/sdk-reference/rust/rest/namespaces/project/index.mdx create mode 100644 fern/products/sdk-reference/rust/rest/namespaces/project/index__2.mdx create mode 100644 fern/products/sdk-reference/rust/rest/namespaces/project/project-tokens/index.mdx create mode 100644 fern/products/sdk-reference/rust/rest/namespaces/queues/index.mdx create mode 100644 fern/products/sdk-reference/rust/rest/namespaces/registry/index.mdx create mode 100644 fern/products/sdk-reference/rust/rest/namespaces/registry/index__2.mdx create mode 100644 fern/products/sdk-reference/rust/rest/namespaces/registry/registry-brands/index.mdx create mode 100644 fern/products/sdk-reference/rust/rest/namespaces/registry/registry-campaigns/index.mdx create mode 100644 fern/products/sdk-reference/rust/rest/namespaces/registry/registry-numbers/index.mdx create mode 100644 fern/products/sdk-reference/rust/rest/namespaces/registry/registry-orders/index.mdx create mode 100644 fern/products/sdk-reference/rust/rest/namespaces/sip-profile/index.mdx create mode 100644 fern/products/sdk-reference/rust/rest/namespaces/sip-profile/sip-profile/index.mdx create mode 100644 fern/products/sdk-reference/rust/rest/namespaces/video/index.mdx create mode 100644 fern/products/sdk-reference/rust/rest/namespaces/video/index__2.mdx create mode 100644 fern/products/sdk-reference/rust/rest/namespaces/video/video-conference-tokens/index.mdx create mode 100644 fern/products/sdk-reference/rust/rest/namespaces/video/video-conferences/index.mdx create mode 100644 fern/products/sdk-reference/rust/rest/namespaces/video/video-room-recordings/index.mdx create mode 100644 fern/products/sdk-reference/rust/rest/namespaces/video/video-room-sessions/index.mdx create mode 100644 fern/products/sdk-reference/rust/rest/namespaces/video/video-room-tokens/index.mdx create mode 100644 fern/products/sdk-reference/rust/rest/namespaces/video/video-rooms/index.mdx create mode 100644 fern/products/sdk-reference/rust/rest/namespaces/video/video-streams/index.mdx create mode 100644 fern/products/sdk-reference/rust/rest/pagination/index.mdx create mode 100644 fern/products/sdk-reference/rust/rest/pagination/paginated-iterator/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/agent/agent-base/agent-base/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/agent/agent-base/agent-options/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/agent/agent-base/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/agent/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/contexts/context-builder/context-builder/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/contexts/context-builder/context/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/contexts/context-builder/gather-info/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/contexts/context-builder/gather-question/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/contexts/context-builder/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/contexts/context-builder/step/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/contexts/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/core/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/core/logging-config/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/datamap/datamap/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/datamap/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/logging/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/logging/logger/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/logging/parse-level-error/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/pom/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/pom/pom/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/pom/pom/prompt-object-model/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/pom/section/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/prefabs/bedrock/bedrock-agent/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/prefabs/bedrock/bedrock-options/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/prefabs/bedrock/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/prefabs/concierge/concierge-agent/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/prefabs/concierge/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/prefabs/faq-bot/faq-bot-agent/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/prefabs/faq-bot/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/prefabs/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/prefabs/info-gatherer/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/prefabs/info-gatherer/info-gatherer-agent/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/prefabs/receptionist/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/prefabs/receptionist/receptionist-agent/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/prefabs/survey/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/prefabs/survey/survey-agent/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/relay/action/ai-action/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/relay/action/collect-action/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/relay/action/detect-action/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/relay/action/fax-action/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/relay/action/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/relay/action/pay-action/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/relay/action/play-action/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/relay/action/record-action/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/relay/action/stream-action/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/relay/action/tap-action/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/relay/action/transcribe-action/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/relay/call/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/relay/client/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/relay/constants/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/relay/device/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/relay/error/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/relay/event/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/relay/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/relay/message/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/relay/state-enums/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/rest/client/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/rest/client/rest-client/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/rest/crud-resource/crud-resource/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/rest/crud-resource/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/rest/error/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/rest/error/signal-wire-rest-error/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/rest/http-client/http-client/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/rest/http-client/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/rest/http-client/stub-transport/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/rest/http-client/ureq-transport/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/rest/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/calling/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-accounts/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-applications/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-calls/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-conferences/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-faxes/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-laml-bins/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-messages/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-phone-numbers/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-queues/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-recordings/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-tokens/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-transcriptions/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/datasphere/datasphere-documents/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/datasphere/datasphere-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/datasphere/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/fabric/call-flows-resource/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/fabric/conference-rooms-resource/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/fabric/cxml-applications-resource/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/fabric/fabric-addresses/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/fabric/fabric-tokens/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/fabric/generic-resources/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/fabric/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/fabric/subscribers-resource/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/logs/conference-logs/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/logs/fax-logs/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/logs/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/logs/message-logs/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/logs/voice-logs/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/mfa/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/number-groups/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/number-groups/number-groups/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/project/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/project/project-tokens/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/queues/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/registry/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/registry/registry-brands/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/registry/registry-campaigns/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/registry/registry-numbers/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/registry/registry-orders/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/sip-profile/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/sip-profile/sip-profile/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/video/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/video/video-conference-tokens/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/video/video-conferences/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/video/video-room-recordings/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/video/video-room-sessions/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/video/video-room-tokens/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/video/video-rooms/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/rest/namespaces/video/video-streams/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/rest/pagination/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/rest/pagination/paginated-iterator/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/security/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/security/session-manager/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/security/session-manager/session-manager/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/security/webhook-layer/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/security/webhook-layer/webhook-layer/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/security/webhook-layer/webhook-validate/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/security/webhook/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/server/agent-server/agent-server/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/server/agent-server/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/server/error/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/server/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/serverless/adapter/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/serverless/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/skills/builtin/api-ninjas-trivia/api-ninjas-trivia/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/skills/builtin/api-ninjas-trivia/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/skills/builtin/claude-skills/claude-skills/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/skills/builtin/claude-skills/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/skills/builtin/custom-skills/custom-skills/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/skills/builtin/custom-skills/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/skills/builtin/datasphere-serverless/datasphere-serverless/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/skills/builtin/datasphere-serverless/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/skills/builtin/datasphere/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/skills/builtin/datetime/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/skills/builtin/google-maps/google-maps/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/skills/builtin/google-maps/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/skills/builtin/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/skills/builtin/info-gatherer/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/skills/builtin/info-gatherer/info-gatherer/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/skills/builtin/joke/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/skills/builtin/math/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/skills/builtin/mcp-gateway/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/skills/builtin/mcp-gateway/mcp-gateway/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/skills/builtin/native-vector-search/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/skills/builtin/native-vector-search/native-vector-search/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/skills/builtin/play-background-file/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/skills/builtin/play-background-file/play-background-file/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/skills/builtin/spider/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/skills/builtin/swml-transfer/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/skills/builtin/swml-transfer/swml-transfer/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/skills/builtin/weather-api/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/skills/builtin/weather-api/weather-api/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/skills/builtin/web-search/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/skills/builtin/web-search/web-search/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/skills/builtin/wikipedia-search/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/skills/builtin/wikipedia-search/wikipedia-search/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/skills/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/skills/skill-base/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/skills/skill-base/skill-params/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/skills/skill-manager/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/skills/skill-manager/skill-manager/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/skills/skill-name/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/skills/skill-name/parse-skill-name-error/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/skills/skill-registry/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/skills/skill-registry/skill-registry/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/swaig/function-result/function-result/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/swaig/function-result/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/swaig/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/swaig/media-enums/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/swaig/media-enums/parse-media-enum-error/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/swaig/params-builder/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/swaig/params-builder/params-builder/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/swaig/params-builder/property-builder/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/swml/document/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/swml/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/swml/schema/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/swml/schema/verb-info/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/swml/service/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/swml/service/service-options/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/swml/service/tool-def/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/utils/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/utils/schema-utils/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/utils/schema-utils/schema-utils/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/utils/schema-utils/schema-validation-error/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/utils/schema-utils/verb-definition/index.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/utils/url-validator/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/agent-base/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/agent-server/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/agent-base/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/agent-server/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/auth-handler/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/auth-handler/index__2.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/cli/agent-loader/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/cli/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/cli/mock-data/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/cli/swaig-test/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/config-loader/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/context-builder/context/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/context-builder/gather-info/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/context-builder/gather-question/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/context-builder/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/context-builder/index__2.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/context-builder/step/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/data-map/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/function-result/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/function-result/index__2.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/generate-verb-types/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/livewire/agent-handoff/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/livewire/agent-server/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/livewire/agent-session/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/livewire/agent/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/livewire/chat-context/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/livewire/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/livewire/inference/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/livewire/inference/llm/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/livewire/inference/stt/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/livewire/inference/tts/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/livewire/job-context/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/livewire/job-process/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/livewire/noop-tracker/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/livewire/plugins/cartesia-tts/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/livewire/plugins/deepgram-stt/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/livewire/plugins/eleven-labs-tts/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/livewire/plugins/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/livewire/plugins/open-aillm/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/livewire/plugins/silero-vad/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/livewire/room/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/livewire/run-context/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/livewire/server-options/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/livewire/stop-response/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/livewire/tool-error/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/livewire/worker-options/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/parameter-schema/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/parameter-schema/index__2.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/pom-builder/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/pom-builder/index__2.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/pom-builder/pom-section/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/pom/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/pom/prompt-object-model/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/pom/prompt-object-model/index__2.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/pom/prompt-object-model/section/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/prefabs/concierge-agent/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/prefabs/concierge-agent/index__2.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/prefabs/faq-bot-agent/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/prefabs/faq-bot-agent/index__2.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/prefabs/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/prefabs/info-gatherer-agent/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/prefabs/info-gatherer-agent/index__2.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/prefabs/receptionist-agent/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/prefabs/receptionist-agent/index__2.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/prefabs/survey-agent/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/prefabs/survey-agent/index__2.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/prompt-manager/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/schema-utils/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/schema-utils/index__2.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/serverless-adapter/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/serverless-adapter/index__2.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/session-manager/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/session-manager/index__2.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/skills/builtin/api-ninjas-trivia/api-ninjas-trivia-skill/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/skills/builtin/api-ninjas-trivia/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/skills/builtin/ask-claude/ask-claude-skill/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/skills/builtin/ask-claude/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/skills/builtin/claude-skills/claude-skills-skill/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/skills/builtin/claude-skills/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/skills/builtin/custom-skills/custom-skills-skill/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/skills/builtin/custom-skills/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/skills/builtin/datasphere-serverless/data-sphere-serverless-skill/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/skills/builtin/datasphere-serverless/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/skills/builtin/datasphere/data-sphere-skill/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/skills/builtin/datasphere/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/skills/builtin/datetime/date-time-skill/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/skills/builtin/datetime/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/skills/builtin/google-maps/google-maps-skill/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/skills/builtin/google-maps/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/skills/builtin/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/skills/builtin/info-gatherer/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/skills/builtin/info-gatherer/info-gatherer-skill/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/skills/builtin/joke/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/skills/builtin/joke/joke-skill/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/skills/builtin/math/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/skills/builtin/math/math-skill/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/skills/builtin/mcp-gateway/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/skills/builtin/mcp-gateway/mcp-gateway-skill/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/skills/builtin/native-vector-search/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/skills/builtin/native-vector-search/native-vector-search-skill/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/skills/builtin/play-background-file/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/skills/builtin/play-background-file/play-background-file-skill/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/skills/builtin/spider/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/skills/builtin/spider/spider-skill/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/skills/builtin/swml-transfer/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/skills/builtin/swml-transfer/swml-transfer-skill/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/skills/builtin/weather-api/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/skills/builtin/weather-api/weather-api-skill/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/skills/builtin/web-search/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/skills/builtin/web-search/web-search-skill/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/skills/builtin/wikipedia-search/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/skills/builtin/wikipedia-search/wikipedia-search-skill/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/skills/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/skills/skill-base/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/skills/skill-base/index__2.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/skills/skill-manager/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/skills/skill-name/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/skills/skill-registry/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/skills/skill-registry/index__2.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/ssl-config/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/ssl-config/index__2.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/swaig-function/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/swaig-function/index__2.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/swml-builder/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/swml-builder/index__2.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/swml-handler/ai-verb-handler/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/swml-handler/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/swml-handler/swml-verb-handler/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/swml-handler/verb-handler-registry/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/swml-service/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/swml-service/index__2.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/swml-service/security-config/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/swml-service/verb-handler-registry/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/web-service/index.mdx create mode 100644 fern/products/sdk-reference/typescript/agents/web-service/index__2.mdx delete mode 100644 fern/products/sdk-reference/typescript/auth-handler/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/cli/agent-loader/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/cli/mock-data/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/cli/swaig-test/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/config-loader/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/context-builder/context/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/context-builder/gather-info/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/context-builder/gather-question/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/context-builder/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/context-builder/step/index.mdx create mode 100644 fern/products/sdk-reference/typescript/core/index.mdx create mode 100644 fern/products/sdk-reference/typescript/core/logger/index.mdx create mode 100644 fern/products/sdk-reference/typescript/core/security-utils/index.mdx create mode 100644 fern/products/sdk-reference/typescript/core/type-inference/index.mdx create mode 100644 fern/products/sdk-reference/typescript/core/types/index.mdx create mode 100644 fern/products/sdk-reference/typescript/core/webhook-middleware/index.mdx create mode 100644 fern/products/sdk-reference/typescript/core/webhook-validator/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/data-map/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/function-result/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/generate-verb-types/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/livewire/agent-handoff/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/livewire/agent-server/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/livewire/agent-session/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/livewire/agent/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/livewire/chat-context/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/livewire/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/livewire/inference/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/livewire/inference/llm/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/livewire/inference/stt/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/livewire/inference/tts/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/livewire/job-context/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/livewire/job-process/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/livewire/noop-tracker/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/livewire/plugins/cartesia-tts/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/livewire/plugins/deepgram-stt/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/livewire/plugins/eleven-labs-tts/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/livewire/plugins/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/livewire/plugins/open-aillm/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/livewire/plugins/silero-vad/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/livewire/room/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/livewire/run-context/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/livewire/server-options/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/livewire/stop-response/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/livewire/tool-error/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/livewire/worker-options/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/logger/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/parameter-schema/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/pom-builder/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/pom-builder/pom-section/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/pom/prompt-object-model/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/pom/prompt-object-model/section/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/prefabs/concierge-agent/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/prefabs/faq-bot-agent/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/prefabs/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/prefabs/info-gatherer-agent/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/prefabs/receptionist-agent/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/prefabs/survey-agent/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/prompt-manager/index.mdx create mode 100644 fern/products/sdk-reference/typescript/relay/action/index__2.mdx create mode 100644 fern/products/sdk-reference/typescript/relay/call/index__2.mdx delete mode 100644 fern/products/sdk-reference/typescript/relay/deferred/index.mdx create mode 100644 fern/products/sdk-reference/typescript/relay/relay-event/index__2.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/base/index.mdx create mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/schema-utils/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/security-utils/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/serverless-adapter/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/session-manager/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/skills/builtin/api-ninjas-trivia/api-ninjas-trivia-skill/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/skills/builtin/api-ninjas-trivia/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/skills/builtin/ask-claude/ask-claude-skill/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/skills/builtin/ask-claude/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/skills/builtin/claude-skills/claude-skills-skill/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/skills/builtin/claude-skills/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/skills/builtin/custom-skills/custom-skills-skill/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/skills/builtin/custom-skills/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/skills/builtin/datasphere-serverless/data-sphere-serverless-skill/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/skills/builtin/datasphere-serverless/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/skills/builtin/datasphere/data-sphere-skill/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/skills/builtin/datasphere/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/skills/builtin/datetime/date-time-skill/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/skills/builtin/datetime/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/skills/builtin/google-maps/google-maps-skill/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/skills/builtin/google-maps/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/skills/builtin/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/skills/builtin/info-gatherer/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/skills/builtin/info-gatherer/info-gatherer-skill/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/skills/builtin/joke/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/skills/builtin/joke/joke-skill/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/skills/builtin/math/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/skills/builtin/math/math-skill/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/skills/builtin/mcp-gateway/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/skills/builtin/mcp-gateway/mcp-gateway-skill/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/skills/builtin/native-vector-search/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/skills/builtin/native-vector-search/native-vector-search-skill/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/skills/builtin/play-background-file/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/skills/builtin/play-background-file/play-background-file-skill/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/skills/builtin/spider/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/skills/builtin/spider/spider-skill/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/skills/builtin/swml-transfer/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/skills/builtin/swml-transfer/swml-transfer-skill/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/skills/builtin/weather-api/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/skills/builtin/weather-api/weather-api-skill/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/skills/builtin/web-search/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/skills/builtin/web-search/web-search-skill/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/skills/builtin/wikipedia-search/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/skills/builtin/wikipedia-search/wikipedia-search-skill/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/skills/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/skills/skill-base/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/skills/skill-manager/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/skills/skill-name/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/skills/skill-registry/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/ssl-config/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/swaig-function/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/swml-builder/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/swml-handler/ai-verb-handler/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/swml-handler/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/swml-handler/swml-verb-handler/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/swml-handler/verb-handler-registry/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/swml-service/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/swml-service/security-config/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/swml-service/verb-handler-registry/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/swml-verb-methods.generated/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/type-inference/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/types/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/web-service/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/webhook-middleware/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/webhook-validator/index.mdx diff --git a/fern/products/sdk-reference/cpp/_meta.json b/fern/products/sdk-reference/cpp/_meta.json index a14e633858..2227cce79b 100644 --- a/fern/products/sdk-reference/cpp/_meta.json +++ b/fern/products/sdk-reference/cpp/_meta.json @@ -6,5 +6,5 @@ "format": "mdx", "platform": "fern", "base_slug": "/reference/cpp", - "item_count": 1825 + "item_count": 1823 } \ No newline at end of file diff --git a/fern/products/sdk-reference/cpp/agents/agent/agent-base/index.mdx b/fern/products/sdk-reference/cpp/agents/agent/agent-base/index.mdx new file mode 100644 index 0000000000..a5cc8b49ca --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/agent/agent-base/index.mdx @@ -0,0 +1,2791 @@ +--- +slug: "/reference/cpp/agents/agent/agent-base" +title: "AgentBase" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::agent::AgentBase" + parent: "signalwire::agent" + module: "agents.agent" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp" + visibility: "public" +--- +# `AgentBase` + +## Signature + +```cpp +class signalwire::agent::AgentBase : signalwire::swml::Service +``` + +## Inheritance + +**Extends:** [signalwire::swml::Service](/docs/sdk-reference/reference/cpp/agents/swml/service) + +## Methods + +### ~AgentBase + +**Modifiers:** `virtual` + +#### Signature + +```cpp +void ~AgentBase() +``` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 120. + +*** + +### add\_answer\_verb + +#### Signature + +```cpp +AgentBase & add_answer_verb(const std::string & verb_name, const json & params) +``` + +#### Parameters + + + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 380. + +*** + +### add\_context + +#### Signature + +```cpp +contexts::Context & add_context(const std::string & name) +``` + +#### Parameters + + + +#### Returns + +`contexts::Context &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 392. + +*** + +### add\_function\_include + +#### Signature + +```cpp +AgentBase & add_function_include(const json & include) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 370. + +*** + +### add\_hint + +#### Signature + +```cpp +AgentBase & add_hint(const std::string & hint) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 291. + +*** + +### add\_hints + +#### Signature + +```cpp +AgentBase & add_hints(const std::vector< std::string > & hints) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 292. + +*** + +### add\_internal\_filler + +Add internal fillers for a single language (legacy overload; stored under the given language key at the top level). + +#### Signature + + + + ```cpp + AgentBase & add_internal_filler( + const std::string & lang, + const std::vector< std::string > & fillers + ) + ``` + + + + ```cpp + AgentBase & add_internal_filler( + const std::string & function_name, + const std::string & language_code, + const std::vector< std::string > & fillers + ) + ``` + + + +#### Parameters (Overload 1) + + + + + +#### Parameters (Overload 2) + + + + + + + +#### Returns (Overload 1) + +`AgentBase &` + +#### Returns (Overload 2) + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 359. + +*** + +### add\_language + +#### Signature + +```cpp +AgentBase & add_language(const LanguageConfig & lang) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 294. + +*** + +### add\_mcp\_server + +#### Signature + +```cpp +AgentBase & add_mcp_server( + const std::string & url, + const std::map< std::string, std::string > & headers = {}, + bool resources = false, + const std::map< std::string, std::string > & resource_vars = {} +) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 422. + +*** + +### add\_pattern\_hint + +#### Signature + +```cpp +AgentBase & add_pattern_hint(const std::string & pattern) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 293. + +*** + +### add\_post\_ai\_verb + +#### Signature + +```cpp +AgentBase & add_post_ai_verb(const std::string & verb_name, const json & params) +``` + +#### Parameters + + + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 382. + +*** + +### add\_post\_answer\_verb + +#### Signature + +```cpp +AgentBase & add_post_answer_verb( + const std::string & verb_name, + const json & params +) +``` + +#### Parameters + + + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 381. + +*** + +### add\_pre\_answer\_verb + +#### Signature + +```cpp +AgentBase & add_pre_answer_verb( + const std::string & verb_name, + const json & params +) +``` + +#### Parameters + + + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 379. + +*** + +### add\_pronunciation + +#### Signature + +```cpp +AgentBase & add_pronunciation( + const std::string & replace_val, + const std::string & with_val, + bool ignore_case = false +) +``` + +#### Parameters + + + + + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 314. + +*** + +### add\_security\_headers + +**Modifiers:** `static` + +#### Signature + +```cpp +void add_security_headers(httplib::Response & res) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 554. + +*** + +### add\_skill + +#### Signature + + + + ```cpp + AgentBase & add_skill( + const std::string & skill_name, + const json & params = json::object() + ) + ``` + + + + ```cpp + AgentBase & add_skill( + skills::SkillName skill_name, + const json & params = json::object() + ) + ``` + + + +#### Parameters (Overload 1) + + + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`AgentBase &` + +#### Returns (Overload 2) + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 403. + +*** + +### add\_swaig\_query\_param + +#### Signature + +```cpp +AgentBase & add_swaig_query_param( + const std::string & key, + const std::string & value +) +``` + +#### Parameters + + + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 440. + +*** + +### AgentBase + +**Modifiers:** `explicit` + +#### Signature + + + + ```cpp + void AgentBase( + const std::string & name = "agent", + const std::string & route = "/", + const std::string & host = "0.0.0.0", + int port = 3000 + ) + ``` + + + + ```cpp + void AgentBase(const AgentBase & other) + ``` + + + +#### Parameters (Overload 1) + + + + + + + + + +#### Parameters (Overload 2) + + + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 116. + +*** + +### auth\_password + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::string & auth_password() const +``` + +#### Returns + +`const std::string &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 458. + +*** + +### auth\_username + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::string & auth_username() const +``` + +#### Returns + +`const std::string &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 457. + +*** + +### auto\_map\_sip\_usernames + +#### Signature + +```cpp +AgentBase & auto_map_sip_usernames(bool enable = true) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 450. + +*** + +### build\_ai\_verb + +**Modifiers:** `const` + +#### Signature + +```cpp +json build_ai_verb(const std::string & webhook_url) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 527. + +*** + +### build\_mcp\_tool\_list + +**Modifiers:** `const` + +#### Signature + +```cpp +std::vector< json > build_mcp_tool_list() const +``` + +#### Returns + +`std::vector< json >` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 429. + +*** + +### build\_prompt + +**Modifiers:** `const` + +#### Signature + +```cpp +json build_prompt() const +``` + +#### Returns + +`json` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 533. + +*** + +### build\_swaig\_functions + +**Modifiers:** `const` + +#### Signature + +```cpp +json build_swaig_functions(const std::string & webhook_url) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 530. + +*** + +### build\_webhook\_url + +**Modifiers:** `const` + +#### Signature + +```cpp +std::string build_webhook_url(const std::string & base_url) const +``` + +#### Parameters + + + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 521. + +*** + +### clear\_post\_ai\_verbs + +#### Signature + +```cpp +AgentBase & clear_post_ai_verbs() +``` + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 385. + +*** + +### clear\_post\_answer\_verbs + +#### Signature + +```cpp +AgentBase & clear_post_answer_verbs() +``` + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 384. + +*** + +### clear\_pre\_answer\_verbs + +#### Signature + +```cpp +AgentBase & clear_pre_answer_verbs() +``` + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 383. + +*** + +### clear\_swaig\_query\_params + +#### Signature + +```cpp +AgentBase & clear_swaig_query_params() +``` + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 441. + +*** + +### clone + +**Modifiers:** `const` + +#### Signature + +```cpp +std::unique_ptr< AgentBase > clone() const +``` + +#### Returns + +`std::unique_ptr< AgentBase >` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 518. + +*** + +### create\_tool\_token + +Mint a per-call SWAIG-function token via the agent's SessionManager. +Python parity: state\_mixin.StateMixin.\_create\_tool\_token — delegates to SessionManager::create\_token and returns an empty string on any thrown exception (Python catches all exceptions and returns "" on error). + +**Modifiers:** `const` + +#### Signature + +```cpp +std::string create_tool_token( + const std::string & tool_name, + const std::string & call_id +) const +``` + +#### Parameters + + + + + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 274. + +*** + +### define\_contexts + +#### Signature + +```cpp +contexts::ContextBuilder & define_contexts() +``` + +#### Returns + +`contexts::ContextBuilder &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 391. + +*** + +### define\_tool + +Register a SWAIG tool (function) that the AI can invoke during a call. + +How this becomes a tool the model seesA SWAIG function is exactly the same concept as a "tool" in native OpenAI / Anthropic tool calling. On every LLM turn, the SDK renders each registered SWAIG function into the OpenAI tool schema: +\{ "type": "function", "function": \{ "name": "your\_name\_here", "description": "your description text", "parameters": \{ ... your JSON schema ... \} \} \} +That schema is sent to the model as part of the same API call that produces the next assistant message. The model reads: +the function description to decide WHEN to call this tool +each parameter description (inside parameters) to decide HOW to fill in that argument from the user's utterance + +This means descriptions are prompt engineering, not developer comments. A vague description is the #1 cause of "the model has +the right tool but doesn't call it" failures. + +Bad vs good descriptionsBAD : description: "Lookup function" GOOD: description: "Look up a customer's account details by " "account number. Use this BEFORE quoting " "any account-specific info (balance, plan, " "status). Do not use for general product " "questions." +BAD : parameters: \{"id": \{"type": "string", "description": "the id"\}\} GOOD: parameters: \{"account\_number": \{"type": "string", "description": "The customer's 8-digit account " "number, no dashes or spaces. Ask the user if they " "don't provide it."\}\} + +Tool count mattersLLM tool selection accuracy degrades past ~7-8 simultaneously-active tools per call. Use contexts::Step::set\_functions to partition tools across steps so only the relevant subset is active at any moment. + +#### Signature + + + + ```cpp + AgentBase & define_tool(const swaig::ToolDefinition & tool) + ``` + + + + ```cpp + AgentBase & define_tool( + const std::string & name, + const std::string & description, + const json & parameters, + swaig::ToolHandler handler, + bool secure = false + ) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + + + + + + + +#### Returns (Overload 1) + +`AgentBase &` + +#### Returns (Overload 2) + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 258. + +*** + +### detect\_proxy\_url + +**Modifiers:** `const` + +#### Signature + +```cpp +std::string detect_proxy_url( + const std::map< std::string, std::string > & headers +) const +``` + +#### Parameters + + + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 524. + +*** + +### enable\_debug\_events + +#### Signature + +```cpp +AgentBase & enable_debug_events(bool enable = true) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 369. + +*** + +### enable\_debug\_routes + +#### Signature + +```cpp +AgentBase & enable_debug_routes(bool enable = true) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 442. + +*** + +### enable\_mcp\_server + +#### Signature + +```cpp +AgentBase & enable_mcp_server(bool enable = true) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 426. + +*** + +### enable\_sip\_routing + +#### Signature + +```cpp +AgentBase & enable_sip_routing(bool enable = true) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 448. + +*** + +### get\_contexts + +Returns the contexts dictionary as a serialised JSON object, or std::nullopt when no contexts have been defined yet. +Mirrors Python's PromptManager.get\_contexts which returns the contexts dict or None. + +**Modifiers:** `const` + +#### Signature + +```cpp +std::optional< json > get_contexts() const +``` + +#### Returns + +`std::optional< json >` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 196. + +*** + +### get\_language\_params + +Read the per-language params dict for a previously-added language. Returns std::nullopt when the code is unknown or when params were never set on that language — no exception path, mirroring Python's None return. +Python parity: AIConfigMixin.get\_language\_params (029ca6f). + +**Modifiers:** `const` + +#### Signature + +```cpp +std::optional< json > get_language_params(const std::string & code) const +``` + +#### Parameters + + + +#### Returns + +`std::optional< json >` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 313. + +*** + +### get\_post\_prompt + +Returns the post-prompt text whatever set\_post\_prompt stored, or std::nullopt when no post-prompt has been set. +Mirrors Python's PromptManager.get\_post\_prompt / PromptMixin.get\_post\_prompt — used by SWML rendering when a post-prompt is configured. + +**Modifiers:** `const` + +#### Signature + +```cpp +std::optional< std::string > get_post_prompt() const +``` + +#### Returns + +`std::optional< std::string >` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 173. + +*** + +### get\_prompt + +**Modifiers:** `const` + +#### Signature + +```cpp +std::string get_prompt() const +``` + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 154. + +*** + +### get\_raw\_prompt + +Returns the raw prompt text whatever set\_prompt\_text stored, or std::nullopt when no raw prompt has been set. Distinct from get\_prompt which renders the POM array when use\_pom is true. +Mirrors Python's PromptManager.get\_raw\_prompt. + +**Modifiers:** `const` + +#### Signature + +```cpp +std::optional< std::string > get_raw_prompt() const +``` + +#### Returns + +`std::optional< std::string >` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 181. + +*** + +### handle\_mcp\_request + +#### Signature + +```cpp +json handle_mcp_request(const json & body) +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 430. + +*** + +### handle\_post\_prompt\_request + +#### Signature + +```cpp +void handle_post_prompt_request( + const httplib::Request & req, + httplib::Response & res +) +``` + +#### Parameters + + + + + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 548. + +*** + +### handle\_swaig\_request + +#### Signature + +```cpp +void handle_swaig_request(const httplib::Request & req, httplib::Response & res) +``` + +#### Parameters + + + + + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 545. + +*** + +### handle\_swml\_request + +#### Signature + +```cpp +void handle_swml_request(const httplib::Request & req, httplib::Response & res) +``` + +#### Parameters + + + + + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 542. + +*** + +### has\_contexts + +**Modifiers:** `const` + +#### Signature + +```cpp +bool has_contexts() const +``` + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 393. + +*** + +### has\_skill + +**Modifiers:** `const` + +#### Signature + + + + ```cpp + bool has_skill(const std::string & skill_name) const + ``` + + + + ```cpp + bool has_skill(skills::SkillName skill_name) const + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`bool` + +#### Returns (Overload 2) + +`bool` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 405. + +*** + +### init\_auth + +#### Signature + +```cpp +void init_auth() +``` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 536. + +*** + +### is\_mcp\_server\_enabled + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +bool is_mcp_server_enabled() const +``` + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 427. + +*** + +### list\_skills + +**Modifiers:** `const` + +#### Signature + +```cpp +std::vector< std::string > list_skills() const +``` + +#### Returns + +`std::vector< std::string >` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 406. + +*** + +### list\_tools + +**Modifiers:** `const` + +#### Signature + +```cpp +std::vector< std::string > list_tools() const +``` + +#### Returns + +`std::vector< std::string >` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 266. + +*** + +### manual\_set\_proxy\_url + +#### Signature + +```cpp +AgentBase & manual_set_proxy_url(const std::string & url) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 437. + +*** + +### mcp\_servers + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::vector< json > & mcp_servers() const +``` + +#### Returns + +`const std::vector< json > &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 428. + +*** + +### on\_debug\_event + +#### Signature + +```cpp +AgentBase & on_debug_event(DebugEventCallback cb) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 494. + +*** + +### on\_function\_call + +Dispatch a function call to the registered handler. Returns a FunctionResult; if the function isn't registered, returns a FunctionResult with a "Function not found" response. + +**Modifiers:** `virtual` + +#### Signature + +```cpp +swaig::FunctionResult on_function_call( + const std::string & name, + const json & args, + const json & raw_data +) +``` + +#### Parameters + + + + + + + +#### Returns + +`swaig::FunctionResult` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 263. + +*** + +### on\_summary + +#### Signature + +```cpp +AgentBase & on_summary(SummaryCallback cb) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 493. + +*** + +### operator= + +#### Signature + +```cpp +AgentBase & operator=(const AgentBase &) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 124. + +*** + +### pom + +Read-only snapshot of the agent's POM as a PromptObjectModel. +Python parity: agent.pom instance attribute (agent\_base.py line 209). Returns std::nullopt when use\_pom is false (mirroring Python's self.pom = None); otherwise returns a freshly built signalwire::pom::PromptObjectModel whose sections are deep-copied from the agent's internal section/ subsection structures so callers cannot mutate them in-place. + +**Modifiers:** `const` + +#### Signature + +```cpp +std::optional< signalwire::pom::PromptObjectModel > pom() const +``` + +#### Returns + +`std::optional< signalwire::pom::PromptObjectModel >` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 165. + +*** + +### prompt\_add\_section + +#### Signature + +```cpp +AgentBase & prompt_add_section( + const std::string & title, + const std::string & body = "", + const std::vector< std::string > & bullets = {} +) +``` + +#### Parameters + + + + + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 143. + +*** + +### prompt\_add\_subsection + +#### Signature + +```cpp +AgentBase & prompt_add_subsection( + const std::string & parent_title, + const std::string & title, + const std::string & body = "", + const std::vector< std::string > & bullets = {} +) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 146. + +*** + +### prompt\_add\_to\_section + +#### Signature + +```cpp +AgentBase & prompt_add_to_section( + const std::string & title, + const std::string & body = "", + const std::vector< std::string > & bullets = {} +) +``` + +#### Parameters + + + + + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 150. + +*** + +### prompt\_has\_section + +**Modifiers:** `const` + +#### Signature + +```cpp +bool prompt_has_section(const std::string & title) const +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 153. + +*** + +### register\_sip\_username + +#### Signature + +```cpp +AgentBase & register_sip_username(const std::string & username) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 449. + +*** + +### register\_swaig\_function + +#### Signature + +```cpp +AgentBase & register_swaig_function(const json & func_def) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 262. + +*** + +### remove\_skill + +#### Signature + + + + ```cpp + AgentBase & remove_skill(const std::string & skill_name) + ``` + + + + ```cpp + AgentBase & remove_skill(skills::SkillName skill_name) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`AgentBase &` + +#### Returns (Overload 2) + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 404. + +*** + +### render\_swml + +**Modifiers:** `const` + +#### Signature + +```cpp +json render_swml() const +``` + +#### Returns + +`json` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 500. + +*** + +### render\_swml\_for\_request + +**Modifiers:** `const` + +#### Signature + +```cpp +json render_swml_for_request( + const std::map< std::string, std::string > & query_params, + const json & body_params, + const std::map< std::string, std::string > & headers +) const +``` + +#### Parameters + + + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 501. + +*** + +### render\_swml\_internal + +**Modifiers:** `const` + +#### Signature + +```cpp +json render_swml_internal( + const std::map< std::string, std::string > & headers +) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 557. + +*** + +### reset\_contexts + +Remove all contexts, returning the agent to a no-contexts state. Convenience wrapper around define\_contexts().reset(). + +#### Signature + +```cpp +AgentBase & reset_contexts() +``` + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 397. + +*** + +### run + +#### Signature + +```cpp +void run() +``` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 509. + +*** + +### serve + +#### Signature + +```cpp +void serve() +``` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 510. + +*** + +### session\_manager + +**Modifiers:** `inline` + +#### Signature + +```cpp +security::SessionManager & session_manager() +``` + +#### Returns + +`security::SessionManager &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 514. + +*** + +### set\_auth + +#### Signature + +```cpp +AgentBase & set_auth(const std::string & username, const std::string & password) +``` + +#### Parameters + + + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 456. + +*** + +### set\_dynamic\_config\_callback + +#### Signature + +```cpp +AgentBase & set_dynamic_config_callback(DynamicConfigCallback cb) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 436. + +*** + +### set\_function\_includes + +#### Signature + +```cpp +AgentBase & set_function_includes(const std::vector< json > & includes) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 371. + +*** + +### set\_global\_data + +#### Signature + +```cpp +AgentBase & set_global_data(const json & data) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 320. + +*** + +### set\_internal\_fillers + +Set internal fillers for native SWAIG functions. +Internal fillers are short phrases the AI agent speaks (via TTS) while an internal/native function is running, so the caller doesn't hear dead air during transitions or background work. +Supported function names (match the SWAIGInternalFiller schema): hangup, check\_time, wait\_for\_user, wait\_seconds, adjust\_response\_latency, next\_step, change\_context, get\_visual\_input, get\_ideal\_strategy. See supported\_internal\_filler\_names(). +Notably NOT supported: change\_step, gather\_submit, or arbitrary user-defined SWAIG function names. The runtime only honors fillers for the names listed above; everything else is silently ignored at the SWML level. This method warns at registration time if you pass an unknown name so you catch the typo early. +Expected JSON shape: \{"function\_name": \{"language\_code": \["phrase1", ...]\}, ...\} + +#### Signature + +```cpp +AgentBase & set_internal_fillers(const json & fillers) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 355. + +*** + +### set\_language\_params + +Set (or replace) the per-language params dict on an already-added language. Useful when language entries are built via add\_language() first and engine-specific tuning is added later (e.g. from a config loader). Passing an empty object removes the params key (treated as unset). No-op if code isn't found among previously-added languages. +Python parity: AIConfigMixin.set\_language\_params (029ca6f). + +#### Signature + +```cpp +AgentBase & set_language_params(const std::string & code, const json & params) +``` + +#### Parameters + + + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 305. + +*** + +### set\_languages + +#### Signature + +```cpp +AgentBase & set_languages(const std::vector< LanguageConfig > & langs) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 295. + +*** + +### set\_name + +**Modifiers:** `inline` + +#### Signature + +```cpp +AgentBase & set_name(const std::string & n) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 131. + +*** + +### set\_native\_functions + +#### Signature + +```cpp +AgentBase & set_native_functions(const std::vector< std::string > & funcs) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 322. + +*** + +### set\_param + +#### Signature + +```cpp +AgentBase & set_param(const std::string & key, const json & value) +``` + +#### Parameters + + + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 318. + +*** + +### set\_params + +#### Signature + +```cpp +AgentBase & set_params(const json & params) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 319. + +*** + +### set\_post\_prompt + +#### Signature + +```cpp +AgentBase & set_post_prompt(const std::string & text) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 141. + +*** + +### set\_post\_prompt\_llm\_params + +#### Signature + +```cpp +AgentBase & set_post_prompt_llm_params(const json & params) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 373. + +*** + +### set\_post\_prompt\_url + +#### Signature + +```cpp +AgentBase & set_post_prompt_url(const std::string & url) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 142. + +*** + +### set\_post\_prompt\_url\_direct + +#### Signature + +```cpp +AgentBase & set_post_prompt_url_direct(const std::string & url) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 439. + +*** + +### set\_prompt\_llm\_params + +#### Signature + +```cpp +AgentBase & set_prompt_llm_params(const json & params) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 372. + +*** + +### set\_prompt\_pom + +Sets the prompt as a list of POM section JSON objects. Each section supports keys "title", "body", "bullets", "numbered", "numbered\_bullets", and "subsections". Switches the agent to POM mode. +Mirrors Python's PromptManager.set\_prompt\_pom. + +#### Signature + +```cpp +AgentBase & set_prompt_pom(const std::vector< json > & pom) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 189. + +*** + +### set\_prompt\_text + +#### Signature + +```cpp +AgentBase & set_prompt_text(const std::string & text) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 140. + +*** + +### set\_pronunciations + +#### Signature + +```cpp +AgentBase & set_pronunciations(const std::vector< Pronunciation > & pronuns) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 317. + +*** + +### set\_signing\_key + +Set the SignalWire Signing Key (Dashboard → API Credentials). Pass the empty string to clear and revert to env-fallback behavior. + +#### Signature + +```cpp +AgentBase & set_signing_key(const std::string & key) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 476. + +*** + +### set\_use\_pom + +#### Signature + +```cpp +AgentBase & set_use_pom(bool use_pom) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 155. + +*** + +### set\_webhook\_url + +#### Signature + +```cpp +AgentBase & set_webhook_url(const std::string & url) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 438. + +*** + +### setup\_routes + +#### Signature + +```cpp +void setup_routes(httplib::Server & server) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 539. + +*** + +### signing\_key + +Read the resolved signing key (constructor / set\_signing\_key / SIGNALWIRE\_SIGNING\_KEY env), or std::nullopt when unset. The returned value is the secret — never log it. + +**Modifiers:** `const` + +#### Signature + +```cpp +std::optional< std::string > signing_key() const +``` + +#### Returns + +`std::optional< std::string >` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 481. + +*** + +### stop + +#### Signature + +```cpp +void stop() +``` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 511. + +*** + +### supported\_internal\_filler\_names + +The complete set of internal SWAIG function names that accept fillers, matching the SWAIGInternalFiller schema definition. Any name outside this set is silently ignored by the runtime — set\_internal\_fillers and add\_internal\_filler warn if you pass an unknown name. +Notable absences: change\_step, gather\_submit, and arbitrary user-defined SWAIG function names are NOT supported. + +**Modifiers:** `static` + +#### Signature + +```cpp +const std::set< std::string > & supported_internal_filler_names() +``` + +#### Returns + +`const std::set< std::string > &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 331. + +*** + +### trust\_proxy\_for\_signature + +If true, X-Forwarded-Proto / X-Forwarded-Host are honored by the webhook middleware when reconstructing the URL. Default false — proxy headers are spoofable so opt in only when the reverse-proxy is trusted. + +#### Signature + +```cpp +AgentBase & trust_proxy_for_signature(bool trust) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 487. + +*** + +### update\_global\_data + +#### Signature + +```cpp +AgentBase & update_global_data(const json & data) +``` + +#### Parameters + + + +#### Returns + +`AgentBase &` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 321. + +*** + +### validate\_auth + +**Modifiers:** `const` + +#### Signature + +```cpp +bool validate_auth(const httplib::Request & req, httplib::Response & res) const +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 551. + +*** + +### validate\_tool\_token + +Validate a per-call SWAIG-function token. Returns false when the function is not registered, when the SessionManager rejects the token, or on any underlying exception. +Python parity: state\_mixin.StateMixin.validate\_tool\_token — rejects unknown function names up-front and swallows exceptions. + +**Modifiers:** `const` + +#### Signature + +```cpp +bool validate_tool_token( + const std::string & function_name, + const std::string & token, + const std::string & call_id +) const +``` + +#### Parameters + + + + + + + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 283. + +## Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 113. diff --git a/fern/products/sdk-reference/cpp/agents/agent/index.mdx b/fern/products/sdk-reference/cpp/agents/agent/index.mdx new file mode 100644 index 0000000000..bc1e5e2009 --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/agent/index.mdx @@ -0,0 +1,159 @@ +--- +slug: "/reference/cpp/agents/agent" +title: "agent" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "module" + language: "cpp" + qualified_name: "signalwire::agent" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp" +--- +# `agent` + +## Signature + +```cpp +namespace signalwire::agent +``` + +## Classes + + + + + + Language configuration. + + + + Pronunciation rule. + + + + SWAIG query parameters. + + + +## Functions + +### sorted\_list\_str + +**Modifiers:** `static` + +#### Signature + +```cpp +std::string sorted_list_str(const std::set< std::string > & s) +``` + +#### Parameters + + + +#### Returns + +`std::string` + +#### Source + +[`src/agent/agent_base.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/agent/agent_base.cpp) + +Line 458. + +## Type Aliases + +### DebugEventCallback + +Debug event callback type. + +#### Signature + +```cpp +typedef std::function< void(const json &event)> DebugEventCallback +``` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 101. + +*** + +### DynamicConfigCallback + +Dynamic config callback type. + +#### Signature + +```cpp +typedef std::function< void( const std::map< std::string, std::string > &query_params, const json &body_params, const std::map< std::string, std::string > &headers, class AgentBase &agent_copy)> DynamicConfigCallback +``` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 90. + +*** + +### json + +#### Signature + +```cpp +typedef nlohmann::json json +``` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 34. + +*** + +### PomSection + +Back-compat alias for the original signalwire::agent::PomSection type. The implementation now lives in signalwire::pom::Section — see signalwire/pom/pom.hpp for the full API (render\_markdown, render\_xml, numbered/numberedBullets fields, etc.). New code should use signalwire::pom::Section directly. + +#### Signature + +```cpp +typedef signalwire::pom::Section PomSection +``` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 41. + +*** + +### SummaryCallback + +Summary callback type. + +#### Signature + +```cpp +typedef std::function< void(const json &summary, const json &raw_data)> SummaryCallback +``` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 98. + +## Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 32. diff --git a/fern/products/sdk-reference/cpp/agents/agent/language-config/index.mdx b/fern/products/sdk-reference/cpp/agents/agent/language-config/index.mdx new file mode 100644 index 0000000000..24efedd7dd --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/agent/language-config/index.mdx @@ -0,0 +1,68 @@ +--- +slug: "/reference/cpp/agents/agent/language-config" +title: "LanguageConfig" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::agent::LanguageConfig" + parent: "signalwire::agent" + module: "agents.agent" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp" + visibility: "public" +--- +# `LanguageConfig` + +Language configuration. + +## Signature + +```cpp +struct signalwire::agent::LanguageConfig +``` + +## Properties + + + + + + + + + + + Per-language params dict (engine-specific tuning, voice settings, etc.). Emitted as the language object's params key in SWML only when non-empty — matches Python reference commit 029ca6f. Treated as "unset" when null OR when an empty object. + + + + +## Methods + +### to\_json + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json to_json() const +``` + +#### Returns + +`json` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 57. + +## Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 44. diff --git a/fern/products/sdk-reference/cpp/agents/agent/pronunciation/index.mdx b/fern/products/sdk-reference/cpp/agents/agent/pronunciation/index.mdx new file mode 100644 index 0000000000..bf224daf55 --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/agent/pronunciation/index.mdx @@ -0,0 +1,60 @@ +--- +slug: "/reference/cpp/agents/agent/pronunciation" +title: "Pronunciation" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::agent::Pronunciation" + parent: "signalwire::agent" + module: "agents.agent" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp" + visibility: "public" +--- +# `Pronunciation` + +Pronunciation rule. + +## Signature + +```cpp +struct signalwire::agent::Pronunciation +``` + +## Properties + + + + + + + +## Methods + +### to\_json + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json to_json() const +``` + +#### Returns + +`json` + +#### Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 80. + +## Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 75. diff --git a/fern/products/sdk-reference/cpp/agents/agent/swaig-query-param/index.mdx b/fern/products/sdk-reference/cpp/agents/agent/swaig-query-param/index.mdx new file mode 100644 index 0000000000..793c08ff93 --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/agent/swaig-query-param/index.mdx @@ -0,0 +1,36 @@ +--- +slug: "/reference/cpp/agents/agent/swaig-query-param" +title: "SwaigQueryParam" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::agent::SwaigQueryParam" + parent: "signalwire::agent" + module: "agents.agent" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp" + visibility: "public" +--- +# `SwaigQueryParam` + +SWAIG query parameters. + +## Signature + +```cpp +struct signalwire::agent::SwaigQueryParam +``` + +## Properties + + + + + +## Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 104. diff --git a/fern/products/sdk-reference/cpp/agents/contexts/context-builder/index.mdx b/fern/products/sdk-reference/cpp/agents/contexts/context-builder/index.mdx new file mode 100644 index 0000000000..9848baae58 --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/contexts/context-builder/index.mdx @@ -0,0 +1,229 @@ +--- +slug: "/reference/cpp/agents/contexts/context-builder" +title: "ContextBuilder" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::contexts::ContextBuilder" + parent: "signalwire::contexts" + module: "agents.contexts" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp" + visibility: "public" +--- +# `ContextBuilder` + +Builder for multi-step, multi-context AI agent workflows. +A ContextBuilder owns one or more Contexts; each Context owns an ordered list of Steps. Only one context and one step is active at a time. Per chat turn, the runtime injects the current step's instructions as a system message, then asks the LLM for a response. + +Native tools auto-injected by the runtimeWhen a step (or its enclosing context) declares valid\_steps or valid\_contexts, the runtime auto-injects two native tools so the model can navigate the flow: + +next\_step(step: enum) — present when valid\_steps is set +change\_context(context: enum) — present when valid\_contexts is set + +A third native tool — gather\_submit — is injected during gather\_info questioning. These three names are reserved: validate() rejects any agent that defines a SWAIG tool with one of them. See reserved\_native\_tool\_names(). + +Function whitelisting (Step::set\_functions)Each step may declare a functions whitelist. The whitelist is applied in-memory at the start of each LLM turn. CRITICALLY: if a step does NOT declare a functions field, it INHERITS the previous step's active set. See Step::set\_functions for details and examples. + +## Signature + +```cpp +class signalwire::contexts::ContextBuilder +``` + +## Methods + +### add\_context + +Add a new context. + +#### Signature + +```cpp +Context & add_context(const std::string & name) +``` + +#### Parameters + + + +#### Returns + +`Context &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 405. + +*** + +### attach\_tool\_name\_supplier + +Attach a tool-name supplier so validate() can check user-defined SWAIG tool names against reserved\_native\_tool\_names(). AgentBase::define\_contexts() wires this up automatically. + +#### Signature + +```cpp +ContextBuilder & attach_tool_name_supplier( + std::function< std::vector< std::string >()> supplier +) +``` + +#### Parameters + + + +#### Returns + +`ContextBuilder &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 414. + +*** + +### ContextBuilder + +#### Signature + +```cpp +void ContextBuilder() +``` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 399. + +*** + +### get\_context + +Get an existing context. + +#### Signature + +```cpp +Context * get_context(const std::string & name) +``` + +#### Parameters + + + +#### Returns + +`Context *` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 408. + +*** + +### has\_contexts + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +bool has_contexts() const +``` + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 429. + +*** + +### reset + +Remove all contexts, returning the builder to its initial state. + +#### Signature + +```cpp +ContextBuilder & reset() +``` + +#### Returns + +`ContextBuilder &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 402. + +*** + +### to\_json + +Serialize all contexts to JSON. + +**Modifiers:** `const` + +#### Signature + +```cpp +json to_json() const +``` + +#### Returns + +`json` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 427. + +*** + +### validate + +Validate all contexts. Checks: +At least one context is defined +A single context must be named "default" +Every context has at least one step +gather\_info completion\_action targets an existing step +No user-defined SWAIG tool collides with a reserved native name (via the attached tool-name supplier) + +**Modifiers:** `const` + +#### Signature + +```cpp +void validate() const +``` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 424. + +## Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 397. diff --git a/fern/products/sdk-reference/cpp/agents/contexts/context/index.mdx b/fern/products/sdk-reference/cpp/agents/contexts/context/index.mdx new file mode 100644 index 0000000000..0710443c3f --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/contexts/context/index.mdx @@ -0,0 +1,836 @@ +--- +slug: "/reference/cpp/agents/contexts/context" +title: "Context" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::contexts::Context" + parent: "signalwire::contexts" + module: "agents.contexts" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp" + visibility: "public" +--- +# `Context` + +## Signature + +```cpp +class signalwire::contexts::Context +``` + +## Methods + +### add\_bullets + +Add a POM section with bullets to the context prompt. + +#### Signature + +```cpp +Context & add_bullets( + const std::string & title, + const std::vector< std::string > & bullets +) +``` + +#### Parameters + + + + + +#### Returns + +`Context &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 310. + +*** + +### add\_enter\_filler + +Add enter filler for a specific language. + +#### Signature + +```cpp +Context & add_enter_filler( + const std::string & lang, + const std::vector< std::string > & fillers +) +``` + +#### Parameters + + + + + +#### Returns + +`Context &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 325. + +*** + +### add\_exit\_filler + +Add exit filler for a specific language. + +#### Signature + +```cpp +Context & add_exit_filler( + const std::string & lang, + const std::vector< std::string > & fillers +) +``` + +#### Parameters + + + + + +#### Returns + +`Context &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 328. + +*** + +### add\_section + +Add a POM section to the context prompt. + +#### Signature + +```cpp +Context & add_section(const std::string & title, const std::string & body) +``` + +#### Parameters + + + + + +#### Returns + +`Context &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 307. + +*** + +### add\_step + +Add a new step to this context (returns reference for chaining). + +#### Signature + +```cpp +Step & add_step( + const std::string & name, + const std::string & task = "", + const std::vector< std::string > & bullets = {}, + const std::string & criteria = "", + const std::optional< std::variant< std::string, std::vector< std::string > > > & functions = std::nullopt, + const std::vector< std::string > & valid_steps = {} +) +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`Step &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 240. + +*** + +### add\_system\_bullets + +Add a POM section with bullets to the system prompt. + +#### Signature + +```cpp +Context & add_system_bullets( + const std::string & title, + const std::vector< std::string > & bullets +) +``` + +#### Parameters + + + + + +#### Returns + +`Context &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 316. + +*** + +### add\_system\_section + +Add a POM section to the system prompt. + +#### Signature + +```cpp +Context & add_system_section( + const std::string & title, + const std::string & body +) +``` + +#### Parameters + + + + + +#### Returns + +`Context &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 313. + +*** + +### Context + +#### Signature + + + + ```cpp + void Context() + ``` + + + + ```cpp + void Context(const std::string & name) + ``` + + + +#### Parameters (Overload 2) + + + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 236. + +*** + +### get\_step + +Get an existing step by name. + +#### Signature + +```cpp +Step * get_step(const std::string & name) +``` + +#### Parameters + + + +#### Returns + +`Step *` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 248. + +*** + +### has\_steps + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +bool has_steps() const +``` + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 334. + +*** + +### initial\_step + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::optional< std::string > & initial_step() const +``` + +#### Returns + +`const std::optional< std::string > &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 337. + +*** + +### move\_step + +Move a step to a specific position. + +#### Signature + +```cpp +Context & move_step(const std::string & name, int position) +``` + +#### Parameters + + + + + +#### Returns + +`Context &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 254. + +*** + +### name + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::string & name() const +``` + +#### Returns + +`const std::string &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 333. + +*** + +### remove\_step + +Remove a step. + +#### Signature + +```cpp +Context & remove_step(const std::string & name) +``` + +#### Parameters + + + +#### Returns + +`Context &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 251. + +*** + +### set\_consolidate + +Set consolidate. + +#### Signature + +```cpp +Context & set_consolidate(bool c) +``` + +#### Parameters + + + +#### Returns + +`Context &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 275. + +*** + +### set\_enter\_fillers + +Set enter fillers. + +#### Signature + +```cpp +Context & set_enter_fillers(const json & fillers) +``` + +#### Parameters + + + +#### Returns + +`Context &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 319. + +*** + +### set\_exit\_fillers + +Set exit fillers. + +#### Signature + +```cpp +Context & set_exit_fillers(const json & fillers) +``` + +#### Parameters + + + +#### Returns + +`Context &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 322. + +*** + +### set\_full\_reset + +Set full reset. + +#### Signature + +```cpp +Context & set_full_reset(bool fr) +``` + +#### Parameters + + + +#### Returns + +`Context &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 278. + +*** + +### set\_initial\_step + +Set which step the context starts on when entered. +By default, a context starts on its first step (index 0). Use this to skip a preamble step on re-entry via change\_context. + +#### Signature + +```cpp +Context & set_initial_step(const std::string & step_name) +``` + +#### Parameters + + + +#### Returns + +`Context &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 260. + +*** + +### set\_isolated + +Mark this context as isolated — entering it wipes conversation history. +When isolated=true and the context is entered via change\_context, the runtime wipes the conversation array. The model starts fresh with only the new context's system\_prompt + step instructions, with no memory of prior turns. +EXCEPTION — reset overrides the wipe: If the context also has a reset configuration (via set\_consolidate or set\_full\_reset), the wipe is skipped in favor of the reset behavior. Use reset with consolidate=true to summarize prior history into a single message instead of dropping it entirely. +Use cases: switching to a sensitive billing flow that should not see prior small-talk; handing off to a different agent persona; resetting after a long off-topic detour. + +#### Signature + +```cpp +Context & set_isolated(bool isolated) +``` + +#### Parameters + + + +#### Returns + +`Context &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 301. + +*** + +### set\_post\_prompt + +Set post prompt override. + +#### Signature + +```cpp +Context & set_post_prompt(const std::string & pp) +``` + +#### Parameters + + + +#### Returns + +`Context &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 269. + +*** + +### set\_prompt + +Set prompt text directly. + +#### Signature + +```cpp +Context & set_prompt(const std::string & prompt) +``` + +#### Parameters + + + +#### Returns + +`Context &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 304. + +*** + +### set\_system\_prompt + +Set system prompt (for context switching). + +#### Signature + +```cpp +Context & set_system_prompt(const std::string & sp) +``` + +#### Parameters + + + +#### Returns + +`Context &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 272. + +*** + +### set\_user\_prompt + +Set user prompt. + +#### Signature + +```cpp +Context & set_user_prompt(const std::string & up) +``` + +#### Parameters + + + +#### Returns + +`Context &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 281. + +*** + +### set\_valid\_contexts + +Set valid contexts for navigation. + +#### Signature + +```cpp +Context & set_valid_contexts(const std::vector< std::string > & ctxs) +``` + +#### Parameters + + + +#### Returns + +`Context &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 263. + +*** + +### set\_valid\_steps + +Set valid steps for all steps in this context. + +#### Signature + +```cpp +Context & set_valid_steps(const std::vector< std::string > & steps) +``` + +#### Parameters + + + +#### Returns + +`Context &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 266. + +*** + +### step\_order + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::vector< std::string > & step_order() const +``` + +#### Returns + +`const std::vector< std::string > &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 336. + +*** + +### steps + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::map< std::string, Step > & steps() const +``` + +#### Returns + +`const std::map< std::string, Step > &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 335. + +*** + +### to\_json + +Serialize to JSON. + +**Modifiers:** `const` + +#### Signature + +```cpp +json to_json() const +``` + +#### Returns + +`json` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 331. + +*** + +### valid\_contexts + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::optional< std::vector< std::string > > & valid_contexts() const +``` + +#### Returns + +`const std::optional< std::vector< std::string > > &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 338. + +## Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 234. diff --git a/fern/products/sdk-reference/cpp/agents/contexts/gather-info/index.mdx b/fern/products/sdk-reference/cpp/agents/contexts/gather-info/index.mdx new file mode 100644 index 0000000000..d0f93bc6c1 --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/contexts/gather-info/index.mdx @@ -0,0 +1,185 @@ +--- +slug: "/reference/cpp/agents/contexts/gather-info" +title: "GatherInfo" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::contexts::GatherInfo" + parent: "signalwire::contexts" + module: "agents.contexts" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp" + visibility: "public" +--- +# `GatherInfo` + +## Signature + +```cpp +class signalwire::contexts::GatherInfo +``` + +## Methods + +### add\_question + +#### Signature + +```cpp +GatherInfo & add_question( + const std::string & key, + const std::string & question, + const std::string & type = "string", + bool confirm = false, + const std::string & prompt = "", + const std::vector< std::string > & functions = {} +) +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`GatherInfo &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 65. + +*** + +### completion\_action + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::string & completion_action() const +``` + +#### Returns + +`const std::string &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 74. + +*** + +### GatherInfo + +#### Signature + +```cpp +void GatherInfo( + const std::string & output_key = "", + const std::string & completion_action = "", + const std::string & prompt = "" +) +``` + +#### Parameters + + + + + + + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 61. + +*** + +### has\_questions + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +bool has_questions() const +``` + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 72. + +*** + +### questions + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::vector< GatherQuestion > & questions() const +``` + +#### Returns + +`const std::vector< GatherQuestion > &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 73. + +*** + +### to\_json + +**Modifiers:** `const` + +#### Signature + +```cpp +json to_json() const +``` + +#### Returns + +`json` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 70. + +## Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 59. diff --git a/fern/products/sdk-reference/cpp/agents/contexts/gather-question/index.mdx b/fern/products/sdk-reference/cpp/agents/contexts/gather-question/index.mdx new file mode 100644 index 0000000000..4d20fba004 --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/contexts/gather-question/index.mdx @@ -0,0 +1,109 @@ +--- +slug: "/reference/cpp/agents/contexts/gather-question" +title: "GatherQuestion" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::contexts::GatherQuestion" + parent: "signalwire::contexts" + module: "agents.contexts" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp" + visibility: "public" +--- +# `GatherQuestion` + +## Signature + +```cpp +class signalwire::contexts::GatherQuestion +``` + +## Methods + +### GatherQuestion + +#### Signature + +```cpp +void GatherQuestion( + const std::string & key, + const std::string & question, + const std::string & type = "string", + bool confirm = false, + const std::string & prompt = "", + const std::vector< std::string > & functions = {} +) +``` + +#### Parameters + + + + + + + + + + + + + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 37. + +*** + +### key + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::string & key() const +``` + +#### Returns + +`const std::string &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 44. + +*** + +### to\_json + +**Modifiers:** `const` + +#### Signature + +```cpp +json to_json() const +``` + +#### Returns + +`json` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 42. + +## Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 35. diff --git a/fern/products/sdk-reference/cpp/agents/contexts/index.mdx b/fern/products/sdk-reference/cpp/agents/contexts/index.mdx new file mode 100644 index 0000000000..f765896921 --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/contexts/index.mdx @@ -0,0 +1,89 @@ +--- +slug: "/reference/cpp/agents/contexts" +title: "contexts" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "module" + language: "cpp" + qualified_name: "signalwire::contexts" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp" +--- +# `contexts` + +## Signature + +```cpp +namespace signalwire::contexts +``` + +## Constants + + + + + +## Classes + + + + + + Builder for multi-step, multi-context AI agent workflows. A ContextBuilder owns one or more Contexts; each Context owns an ordered list of Steps. Only one context and one step is active at a time. Per chat turn, the runtime injects the current step's instructions as a system message, then asks the LLM for a response. + + + + + + + + + +## Functions + +### reserved\_native\_tool\_names + +Reserved tool names auto-injected by the runtime when contexts/steps are present. User-defined SWAIG tools must not collide with these names: +next\_step / change\_context are injected when valid\_steps or valid\_contexts is set so the model can navigate the flow. +gather\_submit is injected while a step's gather\_info is collecting answers. ContextBuilder::validate() rejects any agent that registers a user tool sharing one of these names. + +#### Signature + +```cpp +const std::set< std::string > & reserved_native_tool_names() +``` + +#### Returns + +`const std::set< std::string > &` + +#### Source + +[`src/contexts/contexts.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/contexts/contexts.cpp) + +Line 10. + +## Type Aliases + +### json + +#### Signature + +```cpp +typedef nlohmann::json json +``` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 16. + +## Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 14. diff --git a/fern/products/sdk-reference/cpp/agents/contexts/step/index.mdx b/fern/products/sdk-reference/cpp/agents/contexts/step/index.mdx new file mode 100644 index 0000000000..b1dd82cc39 --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/contexts/step/index.mdx @@ -0,0 +1,657 @@ +--- +slug: "/reference/cpp/agents/contexts/step" +title: "Step" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::contexts::Step" + parent: "signalwire::contexts" + module: "agents.contexts" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp" + visibility: "public" +--- +# `Step` + +## Signature + +```cpp +class signalwire::contexts::Step +``` + +## Methods + +### add\_bullets + +Add a POM section with bullet points. + +#### Signature + +```cpp +Step & add_bullets( + const std::string & title, + const std::vector< std::string > & bullets +) +``` + +#### Parameters + + + + + +#### Returns + +`Step &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 99. + +*** + +### add\_gather\_question + +Add a gather question (set\_gather\_info must be called first). +IMPORTANT — gather mode locks function access: While the model is asking gather questions, the runtime forcibly deactivates ALL of the step's other functions. The only callable tools during a gather question are: + +gather\_submit (the native answer-submission tool) +Whatever names you pass in this question's functions argument + +next\_step and change\_context are also filtered out — the model cannot navigate away until the gather completes. This is by design: it forces a tight ask → submit → next-question loop. +If a question needs to call out to a tool (e.g. validate an email, geocode a ZIP), list that tool name in this question's functions argument. Functions listed here are active ONLY for this question. + +#### Signature + +```cpp +Step & add_gather_question( + const std::string & key, + const std::string & question, + const std::string & type = "string", + bool confirm = false, + const std::string & prompt = "", + const std::vector< std::string > & functions = {} +) +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`Step &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 186. + +*** + +### add\_section + +Add a POM section to the step. + +#### Signature + +```cpp +Step & add_section(const std::string & title, const std::string & body) +``` + +#### Parameters + + + + + +#### Returns + +`Step &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 96. + +*** + +### clear\_sections + +Clear all sections and text. + +#### Signature + +```cpp +Step & clear_sections() +``` + +#### Returns + +`Step &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 192. + +*** + +### gather\_info + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::optional< GatherInfo > & gather_info() const +``` + +#### Returns + +`const std::optional< GatherInfo > &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 206. + +*** + +### name + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::string & name() const +``` + +#### Returns + +`const std::string &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 203. + +*** + +### set\_end + +Mark this step as terminal for the step flow. +IMPORTANT: end=true does NOT end the conversation or hang up the call. It exits step mode entirely after this step executes — clearing the steps list, current step index, valid\_steps, and valid\_contexts. The agent keeps running, but operates only under the base system prompt and the context-level prompt; no more step instructions are injected and no more next\_step tool is offered. +To actually end the call, call a hangup tool or define a hangup hook. + +#### Signature + +```cpp +Step & set_end(bool end) +``` + +#### Parameters + + + +#### Returns + +`Step &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 153. + +*** + +### set\_functions + +Set which non-internal functions are callable while this step is active. +IMPORTANT — inheritance behavior: If you do NOT call this method, the step inherits whichever function set was active on the previous step (or the previous context's last step). The server-side runtime only resets the active set when a step explicitly declares its functions field. This is the most common source of bugs in multi-step agents: forgetting set\_functions on a later step lets the previous step's tools leak through. Best practice is to call set\_functions explicitly on every step that should differ from the previous one. +Keep the per-step active set small: LLM tool selection accuracy degrades noticeably past ~7-8 simultaneously-active tools per call. Use per-step whitelisting to partition large tool collections. +Internal functions (e.g. gather\_submit, hangup hook) are ALWAYS protected and cannot be deactivated by this whitelist. The native navigation tools next\_step and change\_context are injected automatically when set\_valid\_steps / set\_valid\_contexts is used; they are not affected by this list. + +functions + +One of: +std::vectorstd::string — whitelist of allowed names +empty std::vector — disable all user functions +std::string "none" — synonym for the empty vector + +#### Signature + +```cpp +Step & set_functions( + const std::variant< std::string, std::vector< std::string > > & functions +) +``` + +#### Parameters + + + One of: std::vectorstd::string — whitelist of allowed names empty std::vector — disable all user functions std::string "none" — synonym for the empty vector + + +#### Returns + +`Step &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 133. + +*** + +### set\_gather\_info + +Enable info gathering on this step. + +#### Signature + +```cpp +Step & set_gather_info( + const std::string & output_key = "", + const std::string & completion_action = "", + const std::string & prompt = "" +) +``` + +#### Parameters + + + + + + + +#### Returns + +`Step &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 162. + +*** + +### set\_reset\_consolidate + +#### Signature + +```cpp +Step & set_reset_consolidate(bool c) +``` + +#### Parameters + + + +#### Returns + +`Step &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 197. + +*** + +### set\_reset\_full\_reset + +#### Signature + +```cpp +Step & set_reset_full_reset(bool fr) +``` + +#### Parameters + + + +#### Returns + +`Step &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 198. + +*** + +### set\_reset\_system\_prompt + +Set reset parameters for context switching. + +#### Signature + +```cpp +Step & set_reset_system_prompt(const std::string & sp) +``` + +#### Parameters + + + +#### Returns + +`Step &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 195. + +*** + +### set\_reset\_user\_prompt + +#### Signature + +```cpp +Step & set_reset_user_prompt(const std::string & up) +``` + +#### Parameters + + + +#### Returns + +`Step &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 196. + +*** + +### set\_skip\_to\_next\_step + +Set whether to auto-advance to the next step. + +#### Signature + +```cpp +Step & set_skip_to_next_step(bool skip) +``` + +#### Parameters + + + +#### Returns + +`Step &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 159. + +*** + +### set\_skip\_user\_turn + +Set whether to skip waiting for user input. + +#### Signature + +```cpp +Step & set_skip_user_turn(bool skip) +``` + +#### Parameters + + + +#### Returns + +`Step &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 156. + +*** + +### set\_step\_criteria + +Set step completion criteria. + +#### Signature + +```cpp +Step & set_step_criteria(const std::string & criteria) +``` + +#### Parameters + + + +#### Returns + +`Step &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 102. + +*** + +### set\_text + +Set the step's prompt text directly. + +#### Signature + +```cpp +Step & set_text(const std::string & text) +``` + +#### Parameters + + + +#### Returns + +`Step &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 93. + +*** + +### set\_valid\_contexts + +Set which contexts can be navigated to from this step. + +#### Signature + +```cpp +Step & set_valid_contexts(const std::vector< std::string > & ctxs) +``` + +#### Parameters + + + +#### Returns + +`Step &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 139. + +*** + +### set\_valid\_steps + +Set which steps can be navigated to from this step. + +#### Signature + +```cpp +Step & set_valid_steps(const std::vector< std::string > & steps) +``` + +#### Parameters + + + +#### Returns + +`Step &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 136. + +*** + +### Step + +#### Signature + + + + ```cpp + void Step() + ``` + + + + ```cpp + void Step(const std::string & name) + ``` + + + +#### Parameters (Overload 2) + + + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 89. + +*** + +### to\_json + +Serialize to JSON. + +**Modifiers:** `const` + +#### Signature + +```cpp +json to_json() const +``` + +#### Returns + +`json` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 201. + +*** + +### valid\_contexts + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::optional< std::vector< std::string > > & valid_contexts() const +``` + +#### Returns + +`const std::optional< std::vector< std::string > > &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 205. + +*** + +### valid\_steps + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::optional< std::vector< std::string > > & valid_steps() const +``` + +#### Returns + +`const std::optional< std::vector< std::string > > &` + +#### Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 204. + +## Source + +[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) + +Line 87. diff --git a/fern/products/sdk-reference/cpp/agents/datamap/index.mdx b/fern/products/sdk-reference/cpp/agents/datamap/index.mdx new file mode 100644 index 0000000000..6d81a515be --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/datamap/index.mdx @@ -0,0 +1,475 @@ +--- +slug: "/reference/cpp/agents/datamap" +title: "datamap" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::datamap" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/datamap/datamap.hpp" +--- +# `datamap` + +Fluent builder for SWAIG data\_map tools (server-side, no webhook needed). Every setter returns \*this for chaining. + +## Signature + +```cpp +class signalwire::datamap::DataMap +``` + +## Methods + +### body + +Set request body for the last added webhook. + +#### Signature + +```cpp +DataMap & body(const json & data) +``` + +#### Parameters + + + +#### Returns + +`DataMap &` + +#### Source + +[`include/signalwire/datamap/datamap.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/datamap/datamap.hpp) + +Line 81. + +*** + +### DataMap + +**Modifiers:** `explicit` + +#### Signature + +```cpp +void DataMap(const std::string & function_name) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/datamap/datamap.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/datamap/datamap.hpp) + +Line 20. + +*** + +### description + +Alias for purpose(). Sets the LLM-facing tool description. This string is read by the model to decide WHEN to call this tool. See purpose() for bad-vs-good examples. + +#### Signature + +```cpp +DataMap & description(const std::string & desc) +``` + +#### Parameters + + + +#### Returns + +`DataMap &` + +#### Source + +[`include/signalwire/datamap/datamap.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/datamap/datamap.hpp) + +Line 43. + +*** + +### error\_keys + +Set error keys for the most recent webhook or top-level. + +#### Signature + +```cpp +DataMap & error_keys(const std::vector< std::string > & keys) +``` + +#### Parameters + + + +#### Returns + +`DataMap &` + +#### Source + +[`include/signalwire/datamap/datamap.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/datamap/datamap.hpp) + +Line 96. + +*** + +### expression + +Add an expression pattern for pattern-based responses. + +#### Signature + +```cpp +DataMap & expression( + const std::string & test_value, + const std::string & pattern, + const swaig::FunctionResult & output, + const swaig::FunctionResult * nomatch_output = nullptr +) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`DataMap &` + +#### Source + +[`include/signalwire/datamap/datamap.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/datamap/datamap.hpp) + +Line 66. + +*** + +### fallback\_output + +Set a fallback output at the top level. + +#### Signature + +```cpp +DataMap & fallback_output(const swaig::FunctionResult & result) +``` + +#### Parameters + + + +#### Returns + +`DataMap &` + +#### Source + +[`include/signalwire/datamap/datamap.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/datamap/datamap.hpp) + +Line 93. + +*** + +### foreach + +Set foreach configuration for the last webhook. + +#### Signature + +```cpp +DataMap & foreach(const json & foreach_config) +``` + +#### Parameters + + + +#### Returns + +`DataMap &` + +#### Source + +[`include/signalwire/datamap/datamap.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/datamap/datamap.hpp) + +Line 87. + +*** + +### global\_error\_keys + +Set top-level error keys. + +#### Signature + +```cpp +DataMap & global_error_keys(const std::vector< std::string > & keys) +``` + +#### Parameters + + + +#### Returns + +`DataMap &` + +#### Source + +[`include/signalwire/datamap/datamap.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/datamap/datamap.hpp) + +Line 99. + +*** + +### output + +Set output for the most recent webhook. + +#### Signature + +```cpp +DataMap & output(const swaig::FunctionResult & result) +``` + +#### Parameters + + + +#### Returns + +`DataMap &` + +#### Source + +[`include/signalwire/datamap/datamap.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/datamap/datamap.hpp) + +Line 90. + +*** + +### parameter + +Add a parameter to this data-map tool — the desc is LLM-FACING. +Each parameter description is rendered into the OpenAI tool schema under parameters.properties.<name>.description and sent to the model. The model uses it to decide HOW to fill in the argument from user speech. It is prompt engineering, not developer FYI. +Bad vs good: BAD : .parameter("city", "string", "the city") GOOD: .parameter("city", "string", "The name of the city to get weather for, e.g. " "'San Francisco'. Ask the user if they did not " "provide one. Include the state or country if the " "city name is ambiguous.") + +#### Signature + +```cpp +DataMap & parameter( + const std::string & name, + const std::string & param_type, + const std::string & desc, + bool required = false, + const std::vector< std::string > & enum_values = {} +) +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`DataMap &` + +#### Source + +[`include/signalwire/datamap/datamap.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/datamap/datamap.hpp) + +Line 61. + +*** + +### params + +Set request params for the last added webhook (alias for body). + +#### Signature + +```cpp +DataMap & params(const json & data) +``` + +#### Parameters + + + +#### Returns + +`DataMap &` + +#### Source + +[`include/signalwire/datamap/datamap.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/datamap/datamap.hpp) + +Line 84. + +*** + +### purpose + +Set the LLM-facing tool description (the "purpose"). PROMPT ENGINEERING, not developer documentation. +The description string is rendered into the OpenAI tool schema description field on every LLM turn. The model reads it to decide WHEN to call this tool. A vague purpose() is the #1 cause of "the model has the right tool but doesn't call it" failures with data-map tools. +Bad vs good: BAD : .purpose("weather api") GOOD: .purpose("Get the current weather conditions and " "forecast for a specific city. Use this " "whenever the user asks about weather, " "temperature, rain, or similar conditions in " "a named location.") + +#### Signature + +```cpp +DataMap & purpose(const std::string & desc) +``` + +#### Parameters + + + +#### Returns + +`DataMap &` + +#### Source + +[`include/signalwire/datamap/datamap.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/datamap/datamap.hpp) + +Line 38. + +*** + +### to\_swaig\_function + +Convert to a SWAIG function definition JSON \[\[nodiscard]]: the built tool definition is the output of the builder; dropping it discards the whole DataMap. (The fluent DataMap& setters above are intentionally NOT nodiscard.) + +**Modifiers:** `const` + +#### Signature + +```cpp +json to_swaig_function() const +``` + +#### Returns + +`json` + +#### Source + +[`include/signalwire/datamap/datamap.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/datamap/datamap.hpp) + +Line 105. + +*** + +### webhook + +Add a webhook API call. + +#### Signature + +```cpp +DataMap & webhook( + const std::string & method, + const std::string & url, + const json & headers = json::object(), + const std::string & form_param = "", + bool input_args_as_params = false, + const std::vector< std::string > & require_args = {} +) +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`DataMap &` + +#### Source + +[`include/signalwire/datamap/datamap.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/datamap/datamap.hpp) + +Line 71. + +*** + +### webhook\_expressions + +Add expressions that run after the most recent webhook. + +#### Signature + +```cpp +DataMap & webhook_expressions(const std::vector< json > & expressions) +``` + +#### Parameters + + + +#### Returns + +`DataMap &` + +#### Source + +[`include/signalwire/datamap/datamap.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/datamap/datamap.hpp) + +Line 78. + +## Type Aliases + +### json + +#### Signature + +```cpp +typedef nlohmann::json json +``` + +#### Source + +[`include/signalwire/datamap/datamap.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/datamap/datamap.hpp) + +Line 14. + +## Source + +[`include/signalwire/datamap/datamap.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/datamap/datamap.hpp) + +Line 18. diff --git a/fern/products/sdk-reference/cpp/agents/index.mdx b/fern/products/sdk-reference/cpp/agents/index.mdx new file mode 100644 index 0000000000..959c59e187 --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/cpp/agents" +title: "agents" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "module" + language: "cpp" + qualified_name: "agents" +--- +# `agents` + +## Classes + + + + Fluent builder for SWAIG data\_map tools (server-side, no webhook needed). Every setter returns \*this for chaining. + + + +## Modules + + + + + + + + + + + + + + + + + + diff --git a/fern/products/sdk-reference/cpp/agents/pom/index.mdx b/fern/products/sdk-reference/cpp/agents/pom/index.mdx new file mode 100644 index 0000000000..52d3d4de17 --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/pom/index.mdx @@ -0,0 +1,131 @@ +--- +slug: "/reference/cpp/agents/pom" +title: "pom" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "module" + language: "cpp" + qualified_name: "signalwire::pom" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp" +--- +# `pom` + +## Signature + +```cpp +namespace signalwire::pom +``` + +## Classes + + + + Top-level container of an ordered list of sections. + + + + One section in the Prompt Object Model tree. Mirrors Python's signalwire.pom.pom.Section. Fields are public to match the Python attribute access pattern section.body, section.bullets, section.subsections. + + + +## Functions + +### yaml\_dump + +Emit a json value as YAML. Inverse of yaml\_parse. Pretty output matches the shape PyYAML's yaml.dump(..., default\_flow\_style=False, sort\_keys=False) produces for the POM shape. + +#### Signature + +```cpp +std::string yaml_dump(const json & value) +``` + +#### Parameters + + + +#### Returns + +`std::string` + +#### Source + +[`src/pom/pom.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/pom/pom.cpp) + +Line 1121. + +*** + +### yaml\_dump\_ordered + +#### Signature + +```cpp +std::string yaml_dump_ordered(const nlohmann::ordered_json & value) +``` + +#### Parameters + + + +#### Returns + +`std::string` + +#### Source + +[`src/pom/pom.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/pom/pom.cpp) + +Line 1129. + +*** + +### yaml\_parse + +Parse a YAML document (POM-shaped subset only) into a json value. Supports list-of-dicts at top level; values may be strings, booleans, or lists of either. Throws std::invalid\_argument on malformed input. + +#### Signature + +```cpp +json yaml_parse(const std::string & yaml_text) +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`src/pom/pom.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/pom/pom.cpp) + +Line 1110. + +## Type Aliases + +### json + +#### Signature + +```cpp +typedef nlohmann::json json +``` + +#### Source + +[`include/signalwire/pom/pom.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp) + +Line 39. + +## Source + +[`include/signalwire/pom/pom.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp) + +Line 37. diff --git a/fern/products/sdk-reference/cpp/agents/pom/prompt-object-model/index.mdx b/fern/products/sdk-reference/cpp/agents/pom/prompt-object-model/index.mdx new file mode 100644 index 0000000000..60c71480f4 --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/pom/prompt-object-model/index.mdx @@ -0,0 +1,391 @@ +--- +slug: "/reference/cpp/agents/pom/prompt-object-model" +title: "PromptObjectModel" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::pom::PromptObjectModel" + parent: "signalwire::pom" + module: "agents.pom" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp" + visibility: "public" +--- +# `PromptObjectModel` + +Top-level container of an ordered list of sections. + +## Signature + +```cpp +class signalwire::pom::PromptObjectModel +``` + +## Properties + + + + + +## Methods + +### add\_pom\_as\_subsection + +Add every top-level section of pom\_to\_add as a subsection of the section identified by target\_title. Throws std::invalid\_argument when no matching section exists. + +#### Signature + + + + ```cpp + void add_pom_as_subsection( + const std::string & target_title, + const PromptObjectModel & pom_to_add + ) + ``` + + + + ```cpp + void add_pom_as_subsection( + Section & target, + const PromptObjectModel & pom_to_add + ) + ``` + + + +#### Parameters (Overload 1) + + + + + +#### Parameters (Overload 2) + + + + + +#### Source + +[`include/signalwire/pom/pom.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp) + +Line 188. + +*** + +### add\_section + +Append a new top-level section. title may be empty only for the very first section (Python enforces "Only the first section can +have no title"); subsequent calls without a title throw std::invalid\_argument. + +#### Signature + +```cpp +Section & add_section( + const std::string & title = "", + const std::string & body = "", + const std::vector< std::string > & bullets = {}, + std::optional< bool > numbered = std::nullopt, + bool numbered_bullets = false +) +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`Section &` + +#### Source + +[`include/signalwire/pom/pom.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp) + +Line 152. + +*** + +### find\_section + +Recursively search for a section by title. Returns a pointer to the owned section so callers can mutate it; returns nullptr when nothing matches. Pointer is invalidated by any subsequent mutation of the POM that grows sections or subsections (caller's responsibility — same contract as std::vector::data()). + +#### Signature + + + + ```cpp + Section * find_section(const std::string & title) + ``` + + + + ```cpp + const Section * find_section(const std::string & title) const + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`Section *` + +#### Returns (Overload 2) + +`const Section *` + +#### Source + +[`include/signalwire/pom/pom.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp) + +Line 163. + +*** + +### from\_json + +Build a POM from a JSON string. Throws nlohmann::json::parse\_error on malformed JSON, and std::invalid\_argument on shape violations (missing required fields, wrong types, etc.). + +**Modifiers:** `static` + +#### Signature + + + + ```cpp + PromptObjectModel from_json(const std::string & json_text) + ``` + + + + ```cpp + PromptObjectModel from_json(const json & data) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`PromptObjectModel` + +#### Returns (Overload 2) + +`PromptObjectModel` + +#### Source + +[`include/signalwire/pom/pom.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp) + +Line 142. + +*** + +### from\_yaml + +Build a POM from a YAML string (minimal POM-shaped subset only). + +**Modifiers:** `static` + +#### Signature + +```cpp +PromptObjectModel from_yaml(const std::string & yaml_text) +``` + +#### Parameters + + + +#### Returns + +`PromptObjectModel` + +#### Source + +[`include/signalwire/pom/pom.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp) + +Line 146. + +*** + +### PromptObjectModel + +#### Signature + + + + ```cpp + void PromptObjectModel() + ``` + + + + ```cpp + void PromptObjectModel(bool debug_flag) + ``` + + + +#### Parameters (Overload 2) + + + +#### Source + +[`include/signalwire/pom/pom.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp) + +Line 135. + +*** + +### render\_markdown + +Render entire POM as Markdown. + +**Modifiers:** `const` + +#### Signature + +```cpp +std::string render_markdown() const +``` + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/pom/pom.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp) + +Line 179. + +*** + +### render\_xml + +Render entire POM as XML (with <?xml ... ?> prolog and a <prompt> root element). + +**Modifiers:** `const` + +#### Signature + +```cpp +std::string render_xml() const +``` + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/pom/pom.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp) + +Line 183. + +*** + +### to\_dict + +Whole-tree dict view (a json array). Identical content to to\_json, returned as a parsed json value. + +**Modifiers:** `const` + +#### Signature + +```cpp +json to_dict() const +``` + +#### Returns + +`json` + +#### Source + +[`include/signalwire/pom/pom.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp) + +Line 176. + +*** + +### to\_json + +Whole-tree JSON serializer. Returns a pretty-printed (indent=2) JSON array string, matching Python's json.dumps(..., indent=2). + +**Modifiers:** `const` + +#### Signature + +```cpp +std::string to_json() const +``` + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/pom/pom.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp) + +Line 168. + +*** + +### to\_yaml + +Whole-tree YAML serializer. Returns a YAML document representing the JSON-equivalent list-of-dicts structure. + +**Modifiers:** `const` + +#### Signature + +```cpp +std::string to_yaml() const +``` + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/pom/pom.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp) + +Line 172. + +## Source + +[`include/signalwire/pom/pom.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp) + +Line 130. diff --git a/fern/products/sdk-reference/cpp/agents/pom/section/index.mdx b/fern/products/sdk-reference/cpp/agents/pom/section/index.mdx new file mode 100644 index 0000000000..da8d1fa95a --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/pom/section/index.mdx @@ -0,0 +1,301 @@ +--- +slug: "/reference/cpp/agents/pom/section" +title: "Section" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::pom::Section" + parent: "signalwire::pom" + module: "agents.pom" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp" + visibility: "public" +--- +# `Section` + +One section in the Prompt Object Model tree. +Mirrors Python's signalwire.pom.pom.Section. Fields are public to match the Python attribute access pattern section.body, section.bullets, section.subsections. + +## Signature + +```cpp +class signalwire::pom::Section +``` + +## Properties + + + Optional paragraph of body text. + + + + Optional bullet list. + + + + Whether this section participates in section numbering. Three-state: std::nullopt — not specified (Python None); inherits. true — explicitly numbered. false — explicitly opted out of numbering. Numbering is "all-or-none per sibling group": if any sibling has numbered == true, every sibling gets numbered unless it explicitly opts out with false. + + + + When true, bullets are rendered as a numbered list (1. 2. 3.) in markdown and as <bullet id="1"> in XML, instead of dash bullets. + + + + Nested sections (recursively the same shape). + + + + Section title. Optional only on the very first top-level section (Python enforces "only the first section can have no title"); for subsections a title is always required. + + +## Methods + +### add\_body + +Replace (NOT append) the body text. Mirrors Python's documented "Add OR REPLACE the body text" contract. + +#### Signature + +```cpp +void add_body(const std::string & b) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/pom/pom.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp) + +Line 90. + +*** + +### add\_bullets + +Append bullets to the existing list. + +#### Signature + +```cpp +void add_bullets(const std::vector< std::string > & bs) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/pom/pom.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp) + +Line 93. + +*** + +### add\_subsection + +Add a child subsection. Returns a reference to the newly-created subsection so callers can chain further mutations. Throws std::invalid\_argument if title is empty (Python raises ValueError("Subsections must have a title")). + +#### Signature + +```cpp +Section & add_subsection( + const std::string & title, + const std::string & body = "", + const std::vector< std::string > & bullets = {}, + std::optional< bool > numbered = std::nullopt, + bool numbered_bullets = false +) +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`Section &` + +#### Source + +[`include/signalwire/pom/pom.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp) + +Line 99. + +*** + +### render\_markdown + +Render this section + subtree as Markdown. level is the heading level for this section (default 2 = ## ); section\_number is the parent path that will prefix this section's title (e.g. \{1, 2\} -> "1.2. "); empty means "no numbering". + +**Modifiers:** `const` + +#### Signature + +```cpp +std::string render_markdown( + int level = 2, + const std::vector< int > & section_number = {} +) const +``` + +#### Parameters + + + + + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/pom/pom.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp) + +Line 118. + +*** + +### render\_xml + +Render this section + subtree as XML. indent is the number of 2-space indents to use; section\_number follows the same rule as render\_markdown. + +**Modifiers:** `const` + +#### Signature + +```cpp +std::string render_xml( + int indent = 0, + const std::vector< int > & section_number = {} +) const +``` + +#### Parameters + + + + + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/pom/pom.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp) + +Line 124. + +*** + +### Section + +Build a Section. title is optional; everything else has sensible defaults so empty Sections can be created and populated incrementally via add\_body / add\_bullets / add\_subsection. + +#### Signature + + + + ```cpp + void Section() + ``` + + + + ```cpp + void Section( + std::optional< std::string > t, + std::string b = "", + std::vector< std::string > bs = {}, + std::optional< bool > num = std::nullopt, + bool numbered_bullets = false + ) + ``` + + + +#### Parameters (Overload 2) + + + + + + + + + + + +#### Source + +[`include/signalwire/pom/pom.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp) + +Line 77. + +*** + +### to\_dict + +Python-compatible alias for to\_json — Python exposes to\_dict. Returns the same JSON object. + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json to_dict() const +``` + +#### Returns + +`json` + +#### Source + +[`include/signalwire/pom/pom.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp) + +Line 112. + +*** + +### to\_json + +Convert the section (and its subtree) to a JSON object. Matches the Python key order: title, body, bullets, subsections, numbered, numberedBullets. + +**Modifiers:** `const` + +#### Signature + +```cpp +json to_json() const +``` + +#### Returns + +`json` + +#### Source + +[`include/signalwire/pom/pom.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp) + +Line 108. + +## Source + +[`include/signalwire/pom/pom.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp) + +Line 48. diff --git a/fern/products/sdk-reference/cpp/agents/prefabs/concierge-agent/index.mdx b/fern/products/sdk-reference/cpp/agents/prefabs/concierge-agent/index.mdx new file mode 100644 index 0000000000..aedf1f7f33 --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/prefabs/concierge-agent/index.mdx @@ -0,0 +1,139 @@ +--- +slug: "/reference/cpp/agents/prefabs/concierge-agent" +title: "ConciergeAgent" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::prefabs::ConciergeAgent" + parent: "signalwire::prefabs" + module: "agents.prefabs" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp" + visibility: "public" +--- +# `ConciergeAgent` + +Venue concierge with amenity info. + +## Signature + +```cpp +class signalwire::prefabs::ConciergeAgent : signalwire::agent::AgentBase +``` + +## Inheritance + +**Extends:** [signalwire::agent::AgentBase](/docs/sdk-reference/reference/cpp/agents/agent/agent-base) + +## Methods + +### ConciergeAgent + +**Modifiers:** `explicit` + +#### Signature + +```cpp +void ConciergeAgent( + const std::string & name = "concierge", + const std::string & route = "/", + const std::string & host = "0.0.0.0", + int port = 3000 +) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) + +Line 67. + +*** + +### set\_amenities + +#### Signature + +```cpp +ConciergeAgent & set_amenities(const std::vector< json > & amenities) +``` + +#### Parameters + + + +#### Returns + +`ConciergeAgent &` + +#### Source + +[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) + +Line 73. + +*** + +### set\_hours + +#### Signature + +```cpp +ConciergeAgent & set_hours(const json & hours) +``` + +#### Parameters + + + +#### Returns + +`ConciergeAgent &` + +#### Source + +[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) + +Line 74. + +*** + +### set\_venue\_name + +#### Signature + +```cpp +ConciergeAgent & set_venue_name(const std::string & name) +``` + +#### Parameters + + + +#### Returns + +`ConciergeAgent &` + +#### Source + +[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) + +Line 72. + +## Source + +[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) + +Line 65. diff --git a/fern/products/sdk-reference/cpp/agents/prefabs/faq-bot-agent/index.mdx b/fern/products/sdk-reference/cpp/agents/prefabs/faq-bot-agent/index.mdx new file mode 100644 index 0000000000..1f6dcfd937 --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/prefabs/faq-bot-agent/index.mdx @@ -0,0 +1,139 @@ +--- +slug: "/reference/cpp/agents/prefabs/faq-bot-agent" +title: "FAQBotAgent" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::prefabs::FAQBotAgent" + parent: "signalwire::prefabs" + module: "agents.prefabs" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp" + visibility: "public" +--- +# `FAQBotAgent` + +Keyword-based FAQ matching. + +## Signature + +```cpp +class signalwire::prefabs::FAQBotAgent : signalwire::agent::AgentBase +``` + +## Inheritance + +**Extends:** [signalwire::agent::AgentBase](/docs/sdk-reference/reference/cpp/agents/agent/agent-base) + +## Methods + +### FAQBotAgent + +**Modifiers:** `explicit` + +#### Signature + +```cpp +void FAQBotAgent( + const std::string & name = "faq_bot", + const std::string & route = "/", + const std::string & host = "0.0.0.0", + int port = 3000 +) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) + +Line 54. + +*** + +### set\_faqs + +#### Signature + +```cpp +FAQBotAgent & set_faqs(const std::vector< json > & faqs) +``` + +#### Parameters + + + +#### Returns + +`FAQBotAgent &` + +#### Source + +[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) + +Line 59. + +*** + +### set\_no\_match\_message + +#### Signature + +```cpp +FAQBotAgent & set_no_match_message(const std::string & msg) +``` + +#### Parameters + + + +#### Returns + +`FAQBotAgent &` + +#### Source + +[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) + +Line 60. + +*** + +### set\_suggest\_related + +#### Signature + +```cpp +FAQBotAgent & set_suggest_related(bool suggest) +``` + +#### Parameters + + + +#### Returns + +`FAQBotAgent &` + +#### Source + +[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) + +Line 61. + +## Source + +[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) + +Line 52. diff --git a/fern/products/sdk-reference/cpp/agents/prefabs/index.mdx b/fern/products/sdk-reference/cpp/agents/prefabs/index.mdx new file mode 100644 index 0000000000..eb305c11d2 --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/prefabs/index.mdx @@ -0,0 +1,67 @@ +--- +slug: "/reference/cpp/agents/prefabs" +title: "prefabs" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "module" + language: "cpp" + qualified_name: "signalwire::prefabs" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp" +--- +# `prefabs` + +## Signature + +```cpp +namespace signalwire::prefabs +``` + +## Classes + + + + Venue concierge with amenity info. + + + + Keyword-based FAQ matching. + + + + Sequential question collection with key/value answers. + + + + Department routing with call transfer. + + + + Typed surveys with validation. + + + +## Type Aliases + +### json + +#### Signature + +```cpp +typedef nlohmann::json json +``` + +#### Source + +[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) + +Line 10. + +## Source + +[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) + +Line 8. diff --git a/fern/products/sdk-reference/cpp/agents/prefabs/info-gatherer-agent/index.mdx b/fern/products/sdk-reference/cpp/agents/prefabs/info-gatherer-agent/index.mdx new file mode 100644 index 0000000000..b3b61654cb --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/prefabs/info-gatherer-agent/index.mdx @@ -0,0 +1,139 @@ +--- +slug: "/reference/cpp/agents/prefabs/info-gatherer-agent" +title: "InfoGathererAgent" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::prefabs::InfoGathererAgent" + parent: "signalwire::prefabs" + module: "agents.prefabs" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp" + visibility: "public" +--- +# `InfoGathererAgent` + +Sequential question collection with key/value answers. + +## Signature + +```cpp +class signalwire::prefabs::InfoGathererAgent : signalwire::agent::AgentBase +``` + +## Inheritance + +**Extends:** [signalwire::agent::AgentBase](/docs/sdk-reference/reference/cpp/agents/agent/agent-base) + +## Methods + +### InfoGathererAgent + +**Modifiers:** `explicit` + +#### Signature + +```cpp +void InfoGathererAgent( + const std::string & name = "info_gatherer", + const std::string & route = "/", + const std::string & host = "0.0.0.0", + int port = 3000 +) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) + +Line 15. + +*** + +### set\_completion\_message + +#### Signature + +```cpp +InfoGathererAgent & set_completion_message(const std::string & msg) +``` + +#### Parameters + + + +#### Returns + +`InfoGathererAgent &` + +#### Source + +[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) + +Line 21. + +*** + +### set\_prefix + +#### Signature + +```cpp +InfoGathererAgent & set_prefix(const std::string & prefix) +``` + +#### Parameters + + + +#### Returns + +`InfoGathererAgent &` + +#### Source + +[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) + +Line 22. + +*** + +### set\_questions + +#### Signature + +```cpp +InfoGathererAgent & set_questions(const std::vector< json > & questions) +``` + +#### Parameters + + + +#### Returns + +`InfoGathererAgent &` + +#### Source + +[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) + +Line 20. + +## Source + +[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) + +Line 13. diff --git a/fern/products/sdk-reference/cpp/agents/prefabs/receptionist-agent/index.mdx b/fern/products/sdk-reference/cpp/agents/prefabs/receptionist-agent/index.mdx new file mode 100644 index 0000000000..02d6a8449b --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/prefabs/receptionist-agent/index.mdx @@ -0,0 +1,139 @@ +--- +slug: "/reference/cpp/agents/prefabs/receptionist-agent" +title: "ReceptionistAgent" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::prefabs::ReceptionistAgent" + parent: "signalwire::prefabs" + module: "agents.prefabs" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp" + visibility: "public" +--- +# `ReceptionistAgent` + +Department routing with call transfer. + +## Signature + +```cpp +class signalwire::prefabs::ReceptionistAgent : signalwire::agent::AgentBase +``` + +## Inheritance + +**Extends:** [signalwire::agent::AgentBase](/docs/sdk-reference/reference/cpp/agents/agent/agent-base) + +## Methods + +### ReceptionistAgent + +**Modifiers:** `explicit` + +#### Signature + +```cpp +void ReceptionistAgent( + const std::string & name = "receptionist", + const std::string & route = "/", + const std::string & host = "0.0.0.0", + int port = 3000 +) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) + +Line 41. + +*** + +### set\_departments + +#### Signature + +```cpp +ReceptionistAgent & set_departments(const json & departments) +``` + +#### Parameters + + + +#### Returns + +`ReceptionistAgent &` + +#### Source + +[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) + +Line 46. + +*** + +### set\_greeting + +#### Signature + +```cpp +ReceptionistAgent & set_greeting(const std::string & greeting) +``` + +#### Parameters + + + +#### Returns + +`ReceptionistAgent &` + +#### Source + +[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) + +Line 47. + +*** + +### set\_transfer\_message + +#### Signature + +```cpp +ReceptionistAgent & set_transfer_message(const std::string & msg) +``` + +#### Parameters + + + +#### Returns + +`ReceptionistAgent &` + +#### Source + +[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) + +Line 48. + +## Source + +[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) + +Line 39. diff --git a/fern/products/sdk-reference/cpp/agents/prefabs/survey-agent/index.mdx b/fern/products/sdk-reference/cpp/agents/prefabs/survey-agent/index.mdx new file mode 100644 index 0000000000..469ee85b24 --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/prefabs/survey-agent/index.mdx @@ -0,0 +1,139 @@ +--- +slug: "/reference/cpp/agents/prefabs/survey-agent" +title: "SurveyAgent" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::prefabs::SurveyAgent" + parent: "signalwire::prefabs" + module: "agents.prefabs" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp" + visibility: "public" +--- +# `SurveyAgent` + +Typed surveys with validation. + +## Signature + +```cpp +class signalwire::prefabs::SurveyAgent : signalwire::agent::AgentBase +``` + +## Inheritance + +**Extends:** [signalwire::agent::AgentBase](/docs/sdk-reference/reference/cpp/agents/agent/agent-base) + +## Methods + +### set\_completion\_message + +#### Signature + +```cpp +SurveyAgent & set_completion_message(const std::string & msg) +``` + +#### Parameters + + + +#### Returns + +`SurveyAgent &` + +#### Source + +[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) + +Line 34. + +*** + +### set\_intro\_message + +#### Signature + +```cpp +SurveyAgent & set_intro_message(const std::string & msg) +``` + +#### Parameters + + + +#### Returns + +`SurveyAgent &` + +#### Source + +[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) + +Line 35. + +*** + +### set\_questions + +#### Signature + +```cpp +SurveyAgent & set_questions(const std::vector< json > & questions) +``` + +#### Parameters + + + +#### Returns + +`SurveyAgent &` + +#### Source + +[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) + +Line 33. + +*** + +### SurveyAgent + +**Modifiers:** `explicit` + +#### Signature + +```cpp +void SurveyAgent( + const std::string & name = "survey", + const std::string & route = "/", + const std::string & host = "0.0.0.0", + int port = 3000 +) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) + +Line 28. + +## Source + +[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) + +Line 26. diff --git a/fern/products/sdk-reference/cpp/agents/server/agent-server/index.mdx b/fern/products/sdk-reference/cpp/agents/server/agent-server/index.mdx new file mode 100644 index 0000000000..2a3d799c40 --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/server/agent-server/index.mdx @@ -0,0 +1,270 @@ +--- +slug: "/reference/cpp/agents/server/agent-server" +title: "AgentServer" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::server::AgentServer" + parent: "signalwire::server" + module: "agents.server" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/server/agent_server.hpp" + visibility: "public" +--- +# `AgentServer` + +Multi-agent hosting server. + +## Signature + +```cpp +class signalwire::server::AgentServer +``` + +## Methods + +### ~AgentServer + +#### Signature + +```cpp +void ~AgentServer() +``` + +#### Source + +[`include/signalwire/server/agent_server.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/server/agent_server.hpp) + +Line 25. + +*** + +### AgentServer + +**Modifiers:** `explicit` + +#### Signature + +```cpp +void AgentServer(const std::string & host = "0.0.0.0", int port = 3000) +``` + +#### Parameters + + + + + +#### Source + +[`include/signalwire/server/agent_server.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/server/agent_server.hpp) + +Line 24. + +*** + +### enable\_sip\_routing + +Enable SIP routing. + +#### Signature + +```cpp +AgentServer & enable_sip_routing(bool enable = true) +``` + +#### Parameters + + + +#### Returns + +`AgentServer &` + +#### Source + +[`include/signalwire/server/agent_server.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/server/agent_server.hpp) + +Line 37. + +*** + +### list\_routes + +List registered routes. + +**Modifiers:** `const` + +#### Signature + +```cpp +std::vector< std::string > list_routes() const +``` + +#### Returns + +`std::vector< std::string >` + +#### Source + +[`include/signalwire/server/agent_server.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/server/agent_server.hpp) + +Line 34. + +*** + +### map\_sip\_username + +Map a SIP username to an agent route. + +#### Signature + +```cpp +AgentServer & map_sip_username( + const std::string & username, + const std::string & route +) +``` + +#### Parameters + + + + + +#### Returns + +`AgentServer &` + +#### Source + +[`include/signalwire/server/agent_server.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/server/agent_server.hpp) + +Line 40. + +*** + +### register\_agent + +Register an agent at a specific route. + +#### Signature + +```cpp +AgentServer & register_agent( + std::shared_ptr< agent::AgentBase > agent, + const std::string & route +) +``` + +#### Parameters + + + + + +#### Returns + +`AgentServer &` + +#### Source + +[`include/signalwire/server/agent_server.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/server/agent_server.hpp) + +Line 28. + +*** + +### run + +Start the server (blocking). + +#### Signature + +```cpp +void run() +``` + +#### Source + +[`include/signalwire/server/agent_server.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/server/agent_server.hpp) + +Line 46. + +*** + +### set\_static\_dir + +Enable static file serving from a directory. + +#### Signature + +```cpp +AgentServer & set_static_dir(const std::string & dir) +``` + +#### Parameters + + + +#### Returns + +`AgentServer &` + +#### Source + +[`include/signalwire/server/agent_server.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/server/agent_server.hpp) + +Line 43. + +*** + +### stop + +Stop the server. + +#### Signature + +```cpp +void stop() +``` + +#### Source + +[`include/signalwire/server/agent_server.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/server/agent_server.hpp) + +Line 49. + +*** + +### unregister\_agent + +Unregister an agent by route. + +#### Signature + +```cpp +AgentServer & unregister_agent(const std::string & route) +``` + +#### Parameters + + + +#### Returns + +`AgentServer &` + +#### Source + +[`include/signalwire/server/agent_server.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/server/agent_server.hpp) + +Line 31. + +## Source + +[`include/signalwire/server/agent_server.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/server/agent_server.hpp) + +Line 22. diff --git a/fern/products/sdk-reference/cpp/agents/server/index.mdx b/fern/products/sdk-reference/cpp/agents/server/index.mdx new file mode 100644 index 0000000000..9d6cc8a585 --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/server/index.mdx @@ -0,0 +1,107 @@ +--- +slug: "/reference/cpp/agents/server" +title: "server" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "module" + language: "cpp" + qualified_name: "signalwire::server" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp" +--- +# `server` + +## Signature + +```cpp +namespace signalwire::server +``` + +## Classes + + + + Multi-agent hosting server. + + + + Resolved TLS configuration for an in-process HTTP server. + + + +## Functions + +### make\_http\_server + +Construct the httplib server for the given config. When cfg.usable(), an SSLServer (TLS termination in-process) is returned upcast to Server\*; otherwise a plain Server. Returns nullptr only on allocation failure. When an SSLServer is requested but its cert/key fail to load, the returned server's is\_valid() is false — callers log and refuse to listen, the same failure mode as a bad bind. + +**Modifiers:** `inline` + +#### Signature + +```cpp +std::unique_ptr< httplib::Server > make_http_server(const TlsServerConfig & cfg) +``` + +#### Parameters + + + +#### Returns + +`std::unique_ptr< httplib::Server >` + +#### Source + +[`src/server/tls_server.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/server/tls_server.hpp) + +Line 60. + +*** + +### resolve\_tls\_config\_from\_env + +Resolve TLS config from the SWML\_SSL\_\* environment variables, mirroring signalwire-python's SecurityConfig.load\_from\_env(). Returns enabled=false when SWML\_SSL\_ENABLED is unset/false. + +**Modifiers:** `inline` + +#### Signature + +```cpp +TlsServerConfig resolve_tls_config_from_env() +``` + +#### Returns + +`TlsServerConfig` + +#### Source + +[`src/server/tls_server.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/server/tls_server.hpp) + +Line 44. + +## Type Aliases + +### json + +#### Signature + +```cpp +typedef nlohmann::json json +``` + +#### Source + +[`include/signalwire/server/agent_server.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/server/agent_server.hpp) + +Line 19. + +## Source + +[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) + +Line 29. diff --git a/fern/products/sdk-reference/cpp/agents/server/tls-server-config/index.mdx b/fern/products/sdk-reference/cpp/agents/server/tls-server-config/index.mdx new file mode 100644 index 0000000000..26663cb9f2 --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/server/tls-server-config/index.mdx @@ -0,0 +1,62 @@ +--- +slug: "/reference/cpp/agents/server/tls-server-config" +title: "TlsServerConfig" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::server::TlsServerConfig" + parent: "signalwire::server" + module: "agents.server" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/server/tls_server.hpp" + visibility: "public" +--- +# `TlsServerConfig` + +Resolved TLS configuration for an in-process HTTP server. + +## Signature + +```cpp +struct signalwire::server::TlsServerConfig +``` + +## Properties + + + + + + + +## Methods + +### usable + +True only when TLS is enabled AND both cert + key paths are present. + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +bool usable() const +``` + +#### Returns + +`bool` + +#### Source + +[`src/server/tls_server.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/server/tls_server.hpp) + +Line 36. + +## Source + +[`src/server/tls_server.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/server/tls_server.hpp) + +Line 30. diff --git a/fern/products/sdk-reference/cpp/agents/skills/api-ninjas-trivia-skill-r/index.mdx b/fern/products/sdk-reference/cpp/agents/skills/api-ninjas-trivia-skill-r/index.mdx new file mode 100644 index 0000000000..ee4c79446c --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/skills/api-ninjas-trivia-skill-r/index.mdx @@ -0,0 +1,174 @@ +--- +slug: "/reference/cpp/agents/skills/api-ninjas-trivia-skill-r" +title: "ApiNinjasTriviaSkillR" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::ApiNinjasTriviaSkillR" + parent: "signalwire::skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp" + visibility: "public" +--- +# `ApiNinjasTriviaSkillR` + +## Signature + +```cpp +class signalwire::skills::ApiNinjasTriviaSkillR : signalwire::skills::SkillBase +``` + +## Inheritance + +**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/agents/skills/skill-base) + +## Methods + +### get\_datamap\_functions + +Get SWAIG DataMap functions (for DataMap-based skills). + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< json > get_datamap_functions() const +``` + +#### Returns + +`std::vector< json >` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 400. + +*** + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 400. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +bool setup(const json & params) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 400. + +*** + +### skill\_description + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_description() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 400. + +*** + +### skill\_name + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_name() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 400. + +*** + +### supports\_multiple\_instances + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +bool supports_multiple_instances() const +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 400. + +## Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 400. diff --git a/fern/products/sdk-reference/cpp/agents/skills/api-ninjas-trivia-skill/index.mdx b/fern/products/sdk-reference/cpp/agents/skills/api-ninjas-trivia-skill/index.mdx new file mode 100644 index 0000000000..a37f21ebac --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/skills/api-ninjas-trivia-skill/index.mdx @@ -0,0 +1,174 @@ +--- +slug: "/reference/cpp/agents/skills/api-ninjas-trivia-skill" +title: "ApiNinjasTriviaSkill" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::ApiNinjasTriviaSkill" + parent: "signalwire::skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/api_ninjas_trivia.cpp" + visibility: "public" +--- +# `ApiNinjasTriviaSkill` + +## Signature + +```cpp +class signalwire::skills::ApiNinjasTriviaSkill : signalwire::skills::SkillBase +``` + +## Inheritance + +**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/agents/skills/skill-base) + +## Methods + +### get\_datamap\_functions + +Get SWAIG DataMap functions (for DataMap-based skills). + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< json > get_datamap_functions() const +``` + +#### Returns + +`std::vector< json >` + +#### Source + +[`src/skills/builtin/api_ninjas_trivia.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/api_ninjas_trivia.cpp) + +Line 25. + +*** + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`src/skills/builtin/api_ninjas_trivia.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/api_ninjas_trivia.cpp) + +Line 23. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +bool setup(const json & params) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/api_ninjas_trivia.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/api_ninjas_trivia.cpp) + +Line 16. + +*** + +### skill\_description + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_description() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/api_ninjas_trivia.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/api_ninjas_trivia.cpp) + +Line 13. + +*** + +### skill\_name + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_name() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/api_ninjas_trivia.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/api_ninjas_trivia.cpp) + +Line 12. + +*** + +### supports\_multiple\_instances + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +bool supports_multiple_instances() const +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/api_ninjas_trivia.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/api_ninjas_trivia.cpp) + +Line 14. + +## Source + +[`src/skills/builtin/api_ninjas_trivia.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/api_ninjas_trivia.cpp) + +Line 10. diff --git a/fern/products/sdk-reference/cpp/agents/skills/claude-skills-skill-r/index.mdx b/fern/products/sdk-reference/cpp/agents/skills/claude-skills-skill-r/index.mdx new file mode 100644 index 0000000000..c36fbaed4e --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/skills/claude-skills-skill-r/index.mdx @@ -0,0 +1,150 @@ +--- +slug: "/reference/cpp/agents/skills/claude-skills-skill-r" +title: "ClaudeSkillsSkillR" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::ClaudeSkillsSkillR" + parent: "signalwire::skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp" + visibility: "public" +--- +# `ClaudeSkillsSkillR` + +## Signature + +```cpp +class signalwire::skills::ClaudeSkillsSkillR : signalwire::skills::SkillBase +``` + +## Inheritance + +**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/agents/skills/skill-base) + +## Methods + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 406. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +bool setup(const json & params) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 406. + +*** + +### skill\_description + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_description() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 406. + +*** + +### skill\_name + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_name() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 406. + +*** + +### supports\_multiple\_instances + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +bool supports_multiple_instances() const +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 406. + +## Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 406. diff --git a/fern/products/sdk-reference/cpp/agents/skills/claude-skills-skill/index.mdx b/fern/products/sdk-reference/cpp/agents/skills/claude-skills-skill/index.mdx new file mode 100644 index 0000000000..dc22d80617 --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/skills/claude-skills-skill/index.mdx @@ -0,0 +1,174 @@ +--- +slug: "/reference/cpp/agents/skills/claude-skills-skill" +title: "ClaudeSkillsSkill" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::ClaudeSkillsSkill" + parent: "signalwire::skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/claude_skills.cpp" + visibility: "public" +--- +# `ClaudeSkillsSkill` + +## Signature + +```cpp +class signalwire::skills::ClaudeSkillsSkill : signalwire::skills::SkillBase +``` + +## Inheritance + +**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/agents/skills/skill-base) + +## Methods + +### get\_hints + +Get speech recognition hints to merge into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< std::string > get_hints() const +``` + +#### Returns + +`std::vector< std::string >` + +#### Source + +[`src/skills/builtin/claude_skills.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/claude_skills.cpp) + +Line 37. + +*** + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`src/skills/builtin/claude_skills.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/claude_skills.cpp) + +Line 22. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +bool setup(const json & params) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/claude_skills.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/claude_skills.cpp) + +Line 15. + +*** + +### skill\_description + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_description() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/claude_skills.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/claude_skills.cpp) + +Line 12. + +*** + +### skill\_name + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_name() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/claude_skills.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/claude_skills.cpp) + +Line 11. + +*** + +### supports\_multiple\_instances + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +bool supports_multiple_instances() const +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/claude_skills.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/claude_skills.cpp) + +Line 13. + +## Source + +[`src/skills/builtin/claude_skills.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/claude_skills.cpp) + +Line 9. diff --git a/fern/products/sdk-reference/cpp/agents/skills/custom-skills-skill-r/index.mdx b/fern/products/sdk-reference/cpp/agents/skills/custom-skills-skill-r/index.mdx new file mode 100644 index 0000000000..f495ce0edf --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/skills/custom-skills-skill-r/index.mdx @@ -0,0 +1,150 @@ +--- +slug: "/reference/cpp/agents/skills/custom-skills-skill-r" +title: "CustomSkillsSkillR" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::CustomSkillsSkillR" + parent: "signalwire::skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp" + visibility: "public" +--- +# `CustomSkillsSkillR` + +## Signature + +```cpp +class signalwire::skills::CustomSkillsSkillR : signalwire::skills::SkillBase +``` + +## Inheritance + +**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/agents/skills/skill-base) + +## Methods + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 410. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +bool setup(const json & params) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 410. + +*** + +### skill\_description + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_description() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 410. + +*** + +### skill\_name + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_name() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 410. + +*** + +### supports\_multiple\_instances + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +bool supports_multiple_instances() const +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 410. + +## Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 410. diff --git a/fern/products/sdk-reference/cpp/agents/skills/custom-skills-skill/index.mdx b/fern/products/sdk-reference/cpp/agents/skills/custom-skills-skill/index.mdx new file mode 100644 index 0000000000..07dab87c6f --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/skills/custom-skills-skill/index.mdx @@ -0,0 +1,150 @@ +--- +slug: "/reference/cpp/agents/skills/custom-skills-skill" +title: "CustomSkillsSkill" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::CustomSkillsSkill" + parent: "signalwire::skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/custom_skills.cpp" + visibility: "public" +--- +# `CustomSkillsSkill` + +## Signature + +```cpp +class signalwire::skills::CustomSkillsSkill : signalwire::skills::SkillBase +``` + +## Inheritance + +**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/agents/skills/skill-base) + +## Methods + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`src/skills/builtin/custom_skills.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/custom_skills.cpp) + +Line 20. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +bool setup(const json & params) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/custom_skills.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/custom_skills.cpp) + +Line 15. + +*** + +### skill\_description + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_description() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/custom_skills.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/custom_skills.cpp) + +Line 12. + +*** + +### skill\_name + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_name() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/custom_skills.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/custom_skills.cpp) + +Line 11. + +*** + +### supports\_multiple\_instances + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +bool supports_multiple_instances() const +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/custom_skills.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/custom_skills.cpp) + +Line 13. + +## Source + +[`src/skills/builtin/custom_skills.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/custom_skills.cpp) + +Line 9. diff --git a/fern/products/sdk-reference/cpp/agents/skills/datasphere-serverless-skill-r/index.mdx b/fern/products/sdk-reference/cpp/agents/skills/datasphere-serverless-skill-r/index.mdx new file mode 100644 index 0000000000..1007c6754a --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/skills/datasphere-serverless-skill-r/index.mdx @@ -0,0 +1,174 @@ +--- +slug: "/reference/cpp/agents/skills/datasphere-serverless-skill-r" +title: "DatasphereServerlessSkillR" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::DatasphereServerlessSkillR" + parent: "signalwire::skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp" + visibility: "public" +--- +# `DatasphereServerlessSkillR` + +## Signature + +```cpp +class signalwire::skills::DatasphereServerlessSkillR : signalwire::skills::SkillBase +``` + +## Inheritance + +**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/agents/skills/skill-base) + +## Methods + +### get\_datamap\_functions + +Get SWAIG DataMap functions (for DataMap-based skills). + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< json > get_datamap_functions() const +``` + +#### Returns + +`std::vector< json >` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 394. + +*** + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 394. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +bool setup(const json & params) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 394. + +*** + +### skill\_description + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_description() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 394. + +*** + +### skill\_name + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_name() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 394. + +*** + +### supports\_multiple\_instances + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +bool supports_multiple_instances() const +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 394. + +## Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 394. diff --git a/fern/products/sdk-reference/cpp/agents/skills/datasphere-serverless-skill/index.mdx b/fern/products/sdk-reference/cpp/agents/skills/datasphere-serverless-skill/index.mdx new file mode 100644 index 0000000000..26a05f4288 --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/skills/datasphere-serverless-skill/index.mdx @@ -0,0 +1,222 @@ +--- +slug: "/reference/cpp/agents/skills/datasphere-serverless-skill" +title: "DatasphereServerlessSkill" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::DatasphereServerlessSkill" + parent: "signalwire::skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datasphere_serverless.cpp" + visibility: "public" +--- +# `DatasphereServerlessSkill` + +## Signature + +```cpp +class signalwire::skills::DatasphereServerlessSkill : signalwire::skills::SkillBase +``` + +## Inheritance + +**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/agents/skills/skill-base) + +## Methods + +### get\_datamap\_functions + +Get SWAIG DataMap functions (for DataMap-based skills). + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< json > get_datamap_functions() const +``` + +#### Returns + +`std::vector< json >` + +#### Source + +[`src/skills/builtin/datasphere_serverless.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datasphere_serverless.cpp) + +Line 31. + +*** + +### get\_global\_data + +Get global data to merge into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +json get_global_data() const +``` + +#### Returns + +`json` + +#### Source + +[`src/skills/builtin/datasphere_serverless.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datasphere_serverless.cpp) + +Line 58. + +*** + +### get\_prompt\_sections + +Get prompt sections to inject into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< SkillPromptSection > get_prompt_sections() const +``` + +#### Returns + +`std::vector< SkillPromptSection >` + +#### Source + +[`src/skills/builtin/datasphere_serverless.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datasphere_serverless.cpp) + +Line 52. + +*** + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`src/skills/builtin/datasphere_serverless.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datasphere_serverless.cpp) + +Line 29. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +bool setup(const json & params) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/datasphere_serverless.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datasphere_serverless.cpp) + +Line 19. + +*** + +### skill\_description + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_description() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/datasphere_serverless.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datasphere_serverless.cpp) + +Line 14. + +*** + +### skill\_name + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_name() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/datasphere_serverless.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datasphere_serverless.cpp) + +Line 13. + +*** + +### supports\_multiple\_instances + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +bool supports_multiple_instances() const +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/datasphere_serverless.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datasphere_serverless.cpp) + +Line 17. + +## Source + +[`src/skills/builtin/datasphere_serverless.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datasphere_serverless.cpp) + +Line 11. diff --git a/fern/products/sdk-reference/cpp/agents/skills/datasphere-skill-r/index.mdx b/fern/products/sdk-reference/cpp/agents/skills/datasphere-skill-r/index.mdx new file mode 100644 index 0000000000..65031994fb --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/skills/datasphere-skill-r/index.mdx @@ -0,0 +1,174 @@ +--- +slug: "/reference/cpp/agents/skills/datasphere-skill-r" +title: "DatasphereSkillR" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::DatasphereSkillR" + parent: "signalwire::skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp" + visibility: "public" +--- +# `DatasphereSkillR` + +## Signature + +```cpp +class signalwire::skills::DatasphereSkillR : signalwire::skills::SkillBase +``` + +## Inheritance + +**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/agents/skills/skill-base) + +## Methods + +### get\_global\_data + +Get global data to merge into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +json get_global_data() const +``` + +#### Returns + +`json` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 391. + +*** + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 333. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +bool setup(const json & params) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 321. + +*** + +### skill\_description + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_description() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 319. + +*** + +### skill\_name + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_name() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 318. + +*** + +### supports\_multiple\_instances + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +bool supports_multiple_instances() const +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 320. + +## Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 313. diff --git a/fern/products/sdk-reference/cpp/agents/skills/datasphere-skill/index.mdx b/fern/products/sdk-reference/cpp/agents/skills/datasphere-skill/index.mdx new file mode 100644 index 0000000000..6a7f1e724b --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/skills/datasphere-skill/index.mdx @@ -0,0 +1,201 @@ +--- +slug: "/reference/cpp/agents/skills/datasphere-skill" +title: "DatasphereSkill" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::DatasphereSkill" + parent: "signalwire::skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datasphere.cpp" + visibility: "public" +--- +# `DatasphereSkill` + +SignalWire DataSphere RAG search skill — issues a real POST against the DataSphere /api/datasphere/documents/\{document\_id\}/search endpoint with the user query in the JSON body, parses the results\[] array, and returns a flattened text summary. Matches the Python DatasphereSkill upstream-call shape. +DATASPHERE\_BASE\_URL env var overrides the upstream URL (used by audit\_skills\_dispatch.py); when unset, the real upstream is built from space\_name (https://\{space\}.signalwire.com). + +## Signature + +```cpp +class signalwire::skills::DatasphereSkill : signalwire::skills::SkillBase +``` + +## Inheritance + +**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/agents/skills/skill-base) + +## Methods + +### get\_global\_data + +Get global data to merge into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +json get_global_data() const +``` + +#### Returns + +`json` + +#### Source + +[`src/skills/builtin/datasphere.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datasphere.cpp) + +Line 106. + +*** + +### get\_prompt\_sections + +Get prompt sections to inject into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< SkillPromptSection > get_prompt_sections() const +``` + +#### Returns + +`std::vector< SkillPromptSection >` + +#### Source + +[`src/skills/builtin/datasphere.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datasphere.cpp) + +Line 99. + +*** + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`src/skills/builtin/datasphere.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datasphere.cpp) + +Line 42. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +bool setup(const json & params) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/datasphere.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datasphere.cpp) + +Line 30. + +*** + +### skill\_description + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_description() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/datasphere.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datasphere.cpp) + +Line 25. + +*** + +### skill\_name + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_name() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/datasphere.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datasphere.cpp) + +Line 24. + +*** + +### supports\_multiple\_instances + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +bool supports_multiple_instances() const +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/datasphere.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datasphere.cpp) + +Line 28. + +## Source + +[`src/skills/builtin/datasphere.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datasphere.cpp) + +Line 22. diff --git a/fern/products/sdk-reference/cpp/agents/skills/date-time-skill/index.mdx b/fern/products/sdk-reference/cpp/agents/skills/date-time-skill/index.mdx new file mode 100644 index 0000000000..4568ff9ec3 --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/skills/date-time-skill/index.mdx @@ -0,0 +1,174 @@ +--- +slug: "/reference/cpp/agents/skills/date-time-skill" +title: "DateTimeSkill" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::DateTimeSkill" + parent: "signalwire::skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datetime.cpp" + visibility: "public" +--- +# `DateTimeSkill` + +## Signature + +```cpp +class signalwire::skills::DateTimeSkill : signalwire::skills::SkillBase, signalwire::skills::SkillBase +``` + +## Inheritance + +**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/agents/skills/skill-base), [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/agents/skills/skill-base) + +## Methods + +### get\_prompt\_sections + +Get prompt sections to inject into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< SkillPromptSection > get_prompt_sections() const +``` + +#### Returns + +`std::vector< SkillPromptSection >` + +#### Source + +[`src/skills/builtin/datetime.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datetime.cpp) + +Line 74. + +*** + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`src/skills/builtin/datetime.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datetime.cpp) + +Line 24. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +bool setup(const json & params) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/datetime.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datetime.cpp) + +Line 19. + +*** + +### skill\_description + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_description() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/datetime.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datetime.cpp) + +Line 16. + +*** + +### skill\_name + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_name() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/datetime.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datetime.cpp) + +Line 15. + +*** + +### supports\_multiple\_instances + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +bool supports_multiple_instances() const +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/datetime.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datetime.cpp) + +Line 17. + +## Source + +[`src/skills/builtin/datetime.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datetime.cpp) + +Line 13. diff --git a/fern/products/sdk-reference/cpp/agents/skills/google-maps-skill-r/index.mdx b/fern/products/sdk-reference/cpp/agents/skills/google-maps-skill-r/index.mdx new file mode 100644 index 0000000000..26d6a9ecea --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/skills/google-maps-skill-r/index.mdx @@ -0,0 +1,152 @@ +--- +slug: "/reference/cpp/agents/skills/google-maps-skill-r" +title: "GoogleMapsSkillR" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::GoogleMapsSkillR" + parent: "signalwire::skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp" + visibility: "public" +--- +# `GoogleMapsSkillR` + +## Signature + +```cpp +class signalwire::skills::GoogleMapsSkillR : signalwire::skills::SkillBase +``` + +## Inheritance + +**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/agents/skills/skill-base) + +## Methods + +### get\_hints + +Get speech recognition hints to merge into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< std::string > get_hints() const +``` + +#### Returns + +`std::vector< std::string >` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 243. + +*** + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 243. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +bool setup(const json & params) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 243. + +*** + +### skill\_description + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_description() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 243. + +*** + +### skill\_name + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_name() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 243. + +## Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 243. diff --git a/fern/products/sdk-reference/cpp/agents/skills/google-maps-skill/index.mdx b/fern/products/sdk-reference/cpp/agents/skills/google-maps-skill/index.mdx new file mode 100644 index 0000000000..90bf1d4ac1 --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/skills/google-maps-skill/index.mdx @@ -0,0 +1,176 @@ +--- +slug: "/reference/cpp/agents/skills/google-maps-skill" +title: "GoogleMapsSkill" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::GoogleMapsSkill" + parent: "signalwire::skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/google_maps.cpp" + visibility: "public" +--- +# `GoogleMapsSkill` + +## Signature + +```cpp +class signalwire::skills::GoogleMapsSkill : signalwire::skills::SkillBase +``` + +## Inheritance + +**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/agents/skills/skill-base) + +## Methods + +### get\_hints + +Get speech recognition hints to merge into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< std::string > get_hints() const +``` + +#### Returns + +`std::vector< std::string >` + +#### Source + +[`src/skills/builtin/google_maps.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/google_maps.cpp) + +Line 53. + +*** + +### get\_prompt\_sections + +Get prompt sections to inject into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< SkillPromptSection > get_prompt_sections() const +``` + +#### Returns + +`std::vector< SkillPromptSection >` + +#### Source + +[`src/skills/builtin/google_maps.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/google_maps.cpp) + +Line 57. + +*** + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`src/skills/builtin/google_maps.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/google_maps.cpp) + +Line 24. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +bool setup(const json & params) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/google_maps.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/google_maps.cpp) + +Line 16. + +*** + +### skill\_description + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_description() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/google_maps.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/google_maps.cpp) + +Line 12. + +*** + +### skill\_name + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_name() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/google_maps.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/google_maps.cpp) + +Line 11. + +## Source + +[`src/skills/builtin/google_maps.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/google_maps.cpp) + +Line 9. diff --git a/fern/products/sdk-reference/cpp/agents/skills/index.mdx b/fern/products/sdk-reference/cpp/agents/skills/index.mdx new file mode 100644 index 0000000000..662457700a --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/skills/index.mdx @@ -0,0 +1,413 @@ +--- +slug: "/reference/cpp/agents/skills" +title: "skills" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "module" + language: "cpp" + qualified_name: "signalwire::skills" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp" +--- +# `skills` + +## Signature + +```cpp +namespace signalwire::skills +``` + +## Classes + + + + + + + + + + + + + + + + + + + + SignalWire DataSphere RAG search skill — issues a real POST against the DataSphere /api/datasphere/documents/\{document\_id\}/search endpoint with the user query in the JSON body, parses the results\[] array, and returns a flattened text summary. Matches the Python DatasphereSkill upstream-call shape. DATASPHERE\_BASE\_URL env var overrides the upstream URL (used by audit\_skills\_dispatch.py); when unset, the real upstream is built from space\_name (https://\{space\}.signalwire.com). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Abstract base class for all skills. + + + + Result of a skill HTTP request. status is the HTTP status code (0 indicates a transport-level error — connection refused, DNS, etc.). body is the raw response body. error is non-empty when status is 0. + + + + Manages skill lifecycle: creation, setup, registration with agents. + + + + POM section for skill prompts. + + + + Global registry of skill factories. + + + + Spider scrape skill — issues a real GET against the URL the LLM passes in. Strips HTML tags from the response and returns the text payload. Matches Python SpiderSkill's scrape\_url behavior. SPIDER\_BASE\_URL env var overrides the host portion of the URL the caller passes in (used by audit\_skills\_dispatch.py to redirect scrape requests at a loopback fixture). + + + + + + + + + + + + + + Google Custom Search API skill — issues a real GET against Google's customsearch/v1 endpoint, parses the items\[] results, and returns a human-readable summary. Matches Python's WebSearchSkill behavior. Configuration: api\_key (or env GOOGLE\_SEARCH\_API\_KEY / GOOGLE\_API\_KEY) search\_engine\_id (or env GOOGLE\_SEARCH\_ENGINE\_ID / GOOGLE\_CSE\_ID) num\_results (default 3) tool\_name (default "web\_search") WEB\_SEARCH\_BASE\_URL env var overrides the upstream URL (used by audit\_skills\_dispatch.py to point the skill at a fixture) + + + + + + Wikipedia search skill — issues a real GET against the Wikipedia API /w/api.php endpoint with action=query\&list=search, parses the query.search\[] results, and returns titles + snippets. Matches the Python WikipediaSearchSkill upstream call shape. WIKIPEDIA\_BASE\_URL env var overrides the API root (used by audit\_skills\_dispatch.py to point the skill at its loopback fixture). + + + + + +## Modules + + + + + +## Functions + +### ensure\_builtin\_skills\_registered + +Ensure all built-in skills are registered. Called automatically but can be called explicitly to force linkage. + +#### Signature + +```cpp +void ensure_builtin_skills_registered() +``` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 443. + +*** + +### http\_get + +Issue a real HTTP GET. Implementation uses cpp-httplib so it works against any plain-HTTP host (including loopback fixtures used by the audit\_skills\_dispatch.py audit). Skills that need TLS to reach production upstreams set the appropriate base-URL env var (e.g. WEB\_SEARCH\_BASE\_URL) — production deployments point at TLS proxies or a dev-side rewriter; the SDK keeps its transport stack OpenSSL-3 independent until the wider port adopts it. + +#### Signature + +```cpp +SkillHttpResponse http_get( + const std::string & url, + const std::map< std::string, std::string > & headers = {}, + int timeout_seconds = 10 +) +``` + +#### Parameters + + + + + + + +#### Returns + +`SkillHttpResponse` + +#### Source + +[`src/skills/skills_http.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skills_http.cpp) + +Line 55. + +*** + +### http\_get\_ms + +Millisecond-precision variant of http\_get. The connection and read timeouts are both bound to timeout\_ms. Needed by web\_search's per\_page\_timeout, which is a sub-second float in the common case (default 2.0s, but configurable below 1s) — the integer-second http\_get truncates a 0.3s budget to 0 and httplib treats a zero timeout as "no +wait", which would defeat the bound. A non-positive timeout\_ms falls back to a 10s default so a misconfiguration can never produce an unbounded fetch. + +#### Signature + +```cpp +SkillHttpResponse http_get_ms( + const std::string & url, + const std::map< std::string, std::string > & headers, + long timeout_ms +) +``` + +#### Parameters + + + + + + + +#### Returns + +`SkillHttpResponse` + +#### Source + +[`src/skills/skills_http.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skills_http.cpp) + +Line 87. + +*** + +### http\_post + +Issue a real HTTP POST with body as the request body and content\_type for Content-Type. Same semantics as http\_get for status / error / body. + +#### Signature + +```cpp +SkillHttpResponse http_post( + const std::string & url, + const std::string & body, + const std::string & content_type = "application/json", + const std::map< std::string, std::string > & headers = {}, + int timeout_seconds = 10 +) +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`SkillHttpResponse` + +#### Source + +[`src/skills/skills_http.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skills_http.cpp) + +Line 123. + +*** + +### skill\_name\_value + +Map a SkillName to its canonical wire string (the value a built-in skill reports from skill\_name()). This is the single normalization point shared by the typed add\_skill/remove\_skill/has\_skill overloads, so their behavior is identical to passing the bare string. + +**Modifiers:** `inline` + +#### Signature + +```cpp +std::string skill_name_value(SkillName name) +``` + +#### Parameters + + + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/skills/skill_name.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_name.hpp) + +Line 51. + +*** + +### to\_string + +to\_string overload so SkillName interoperates with ADL-based stringification the same way skill\_name\_value() does. + +**Modifiers:** `inline` + +#### Signature + +```cpp +std::string to_string(SkillName name) +``` + +#### Parameters + + + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/skills/skill_name.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_name.hpp) + +Line 77. + +## Type Aliases + +### json + +#### Signature + +```cpp +typedef nlohmann::json json +``` + +#### Source + +[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) + +Line 16. + +*** + +### SkillFactory + +Factory function type for creating skill instances. + +#### Signature + +```cpp +typedef std::function< std::unique_ptr< SkillBase >()> SkillFactory +``` + +#### Source + +[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) + +Line 118. + +## Enums + +### SkillName + +Built-in skill names as a typed, compile-time-checked closed set. +AgentBase::add\_skill() (and remove\_skill() / has\_skill()) accept this enum class OR a std::string. The enum gives editor autocompletion and makes a typo fail at the call site — a bare string like "datetiem" only fails at runtime, on the server. The string overload keeps parity with the Python reference (which uses a bare str) and still allows custom / third-party skills that aren't built in. agent.add\_skill(SkillName::Datetime); // typed, autocompleted +agent.add\_skill("datetime"); // string still works (parity) +agent.add\_skill("my\_custom\_skill"); // open set: custom skills ok + +Members mirror the 18 built-in skills' registered skill\_name() values (the canonical wire strings). skill\_name\_value() maps each member to that wire string, so the enum and string overloads load the identical skill. + +#### Signature + +```cpp +enum class SkillName +``` + +#### Variants + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#### Source + +[`include/signalwire/skills/skill_name.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_name.hpp) + +Line 26. + +## Source + +[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) + +Line 14. diff --git a/fern/products/sdk-reference/cpp/agents/skills/info-gatherer-skill-r/index.mdx b/fern/products/sdk-reference/cpp/agents/skills/info-gatherer-skill-r/index.mdx new file mode 100644 index 0000000000..3679464382 --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/skills/info-gatherer-skill-r/index.mdx @@ -0,0 +1,174 @@ +--- +slug: "/reference/cpp/agents/skills/info-gatherer-skill-r" +title: "InfoGathererSkillR" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::InfoGathererSkillR" + parent: "signalwire::skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp" + visibility: "public" +--- +# `InfoGathererSkillR` + +## Signature + +```cpp +class signalwire::skills::InfoGathererSkillR : signalwire::skills::SkillBase +``` + +## Inheritance + +**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/agents/skills/skill-base) + +## Methods + +### get\_instance\_key + +Get instance key for multi-instance skills. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string get_instance_key() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 404. + +*** + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 404. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +bool setup(const json & params) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 404. + +*** + +### skill\_description + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_description() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 404. + +*** + +### skill\_name + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_name() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 404. + +*** + +### supports\_multiple\_instances + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +bool supports_multiple_instances() const +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 404. + +## Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 404. diff --git a/fern/products/sdk-reference/cpp/agents/skills/info-gatherer-skill/index.mdx b/fern/products/sdk-reference/cpp/agents/skills/info-gatherer-skill/index.mdx new file mode 100644 index 0000000000..8c1f800c68 --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/skills/info-gatherer-skill/index.mdx @@ -0,0 +1,222 @@ +--- +slug: "/reference/cpp/agents/skills/info-gatherer-skill" +title: "InfoGathererSkill" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::InfoGathererSkill" + parent: "signalwire::skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/info_gatherer.cpp" + visibility: "public" +--- +# `InfoGathererSkill` + +## Signature + +```cpp +class signalwire::skills::InfoGathererSkill : signalwire::skills::SkillBase +``` + +## Inheritance + +**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/agents/skills/skill-base) + +## Methods + +### get\_global\_data + +Get global data to merge into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +json get_global_data() const +``` + +#### Returns + +`json` + +#### Source + +[`src/skills/builtin/info_gatherer.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/info_gatherer.cpp) + +Line 110. + +*** + +### get\_instance\_key + +Get instance key for multi-instance skills. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string get_instance_key() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/info_gatherer.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/info_gatherer.cpp) + +Line 131. + +*** + +### get\_prompt\_sections + +Get prompt sections to inject into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< SkillPromptSection > get_prompt_sections() const +``` + +#### Returns + +`std::vector< SkillPromptSection >` + +#### Source + +[`src/skills/builtin/info_gatherer.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/info_gatherer.cpp) + +Line 122. + +*** + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`src/skills/builtin/info_gatherer.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/info_gatherer.cpp) + +Line 25. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +bool setup(const json & params) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/info_gatherer.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/info_gatherer.cpp) + +Line 17. + +*** + +### skill\_description + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_description() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/info_gatherer.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/info_gatherer.cpp) + +Line 12. + +*** + +### skill\_name + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_name() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/info_gatherer.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/info_gatherer.cpp) + +Line 11. + +*** + +### supports\_multiple\_instances + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +bool supports_multiple_instances() const +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/info_gatherer.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/info_gatherer.cpp) + +Line 15. + +## Source + +[`src/skills/builtin/info_gatherer.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/info_gatherer.cpp) + +Line 9. diff --git a/fern/products/sdk-reference/cpp/agents/skills/joke-skill-r/index.mdx b/fern/products/sdk-reference/cpp/agents/skills/joke-skill-r/index.mdx new file mode 100644 index 0000000000..bfc62ae78a --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/skills/joke-skill-r/index.mdx @@ -0,0 +1,200 @@ +--- +slug: "/reference/cpp/agents/skills/joke-skill-r" +title: "JokeSkillR" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::JokeSkillR" + parent: "signalwire::skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp" + visibility: "public" +--- +# `JokeSkillR` + +## Signature + +```cpp +class signalwire::skills::JokeSkillR : signalwire::skills::SkillBase +``` + +## Inheritance + +**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/agents/skills/skill-base) + +## Methods + +### get\_datamap\_functions + +Get SWAIG DataMap functions (for DataMap-based skills). + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< json > get_datamap_functions() const +``` + +#### Returns + +`std::vector< json >` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 73. + +*** + +### get\_global\_data + +Get global data to merge into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +json get_global_data() const +``` + +#### Returns + +`json` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 75. + +*** + +### get\_prompt\_sections + +Get prompt sections to inject into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< SkillPromptSection > get_prompt_sections() const +``` + +#### Returns + +`std::vector< SkillPromptSection >` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 74. + +*** + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 72. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +bool setup(const json & params) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 71. + +*** + +### skill\_description + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_description() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 70. + +*** + +### skill\_name + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_name() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 69. + +## Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 66. diff --git a/fern/products/sdk-reference/cpp/agents/skills/joke-skill/index.mdx b/fern/products/sdk-reference/cpp/agents/skills/joke-skill/index.mdx new file mode 100644 index 0000000000..e7e0b196b7 --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/skills/joke-skill/index.mdx @@ -0,0 +1,200 @@ +--- +slug: "/reference/cpp/agents/skills/joke-skill" +title: "JokeSkill" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::JokeSkill" + parent: "signalwire::skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/joke.cpp" + visibility: "public" +--- +# `JokeSkill` + +## Signature + +```cpp +class signalwire::skills::JokeSkill : signalwire::skills::SkillBase +``` + +## Inheritance + +**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/agents/skills/skill-base) + +## Methods + +### get\_datamap\_functions + +Get SWAIG DataMap functions (for DataMap-based skills). + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< json > get_datamap_functions() const +``` + +#### Returns + +`std::vector< json >` + +#### Source + +[`src/skills/builtin/joke.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/joke.cpp) + +Line 24. + +*** + +### get\_global\_data + +Get global data to merge into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +json get_global_data() const +``` + +#### Returns + +`json` + +#### Source + +[`src/skills/builtin/joke.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/joke.cpp) + +Line 41. + +*** + +### get\_prompt\_sections + +Get prompt sections to inject into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< SkillPromptSection > get_prompt_sections() const +``` + +#### Returns + +`std::vector< SkillPromptSection >` + +#### Source + +[`src/skills/builtin/joke.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/joke.cpp) + +Line 36. + +*** + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`src/skills/builtin/joke.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/joke.cpp) + +Line 22. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +bool setup(const json & params) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/joke.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/joke.cpp) + +Line 15. + +*** + +### skill\_description + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_description() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/joke.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/joke.cpp) + +Line 13. + +*** + +### skill\_name + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_name() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/joke.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/joke.cpp) + +Line 12. + +## Source + +[`src/skills/builtin/joke.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/joke.cpp) + +Line 10. diff --git a/fern/products/sdk-reference/cpp/agents/skills/math-skill-r/index.mdx b/fern/products/sdk-reference/cpp/agents/skills/math-skill-r/index.mdx new file mode 100644 index 0000000000..0d490eb0d8 --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/skills/math-skill-r/index.mdx @@ -0,0 +1,152 @@ +--- +slug: "/reference/cpp/agents/skills/math-skill-r" +title: "MathSkillR" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::MathSkillR" + parent: "signalwire::skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp" + visibility: "public" +--- +# `MathSkillR` + +## Signature + +```cpp +class signalwire::skills::MathSkillR : signalwire::skills::SkillBase +``` + +## Inheritance + +**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/agents/skills/skill-base) + +## Methods + +### get\_prompt\_sections + +Get prompt sections to inject into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< SkillPromptSection > get_prompt_sections() const +``` + +#### Returns + +`std::vector< SkillPromptSection >` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 62. + +*** + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 58. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +bool setup(const json & params) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 57. + +*** + +### skill\_description + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_description() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 56. + +*** + +### skill\_name + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_name() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 55. + +## Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 41. diff --git a/fern/products/sdk-reference/cpp/agents/skills/math-skill/index.mdx b/fern/products/sdk-reference/cpp/agents/skills/math-skill/index.mdx new file mode 100644 index 0000000000..47ae4745e8 --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/skills/math-skill/index.mdx @@ -0,0 +1,174 @@ +--- +slug: "/reference/cpp/agents/skills/math-skill" +title: "MathSkill" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::MathSkill" + parent: "signalwire::skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/math.cpp" + visibility: "public" +--- +# `MathSkill` + +## Signature + +```cpp +class signalwire::skills::MathSkill : signalwire::skills::SkillBase +``` + +## Inheritance + +**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/agents/skills/skill-base) + +## Methods + +### get\_prompt\_sections + +Get prompt sections to inject into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< SkillPromptSection > get_prompt_sections() const +``` + +#### Returns + +`std::vector< SkillPromptSection >` + +#### Source + +[`src/skills/builtin/math.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/math.cpp) + +Line 139. + +*** + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`src/skills/builtin/math.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/math.cpp) + +Line 108. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +bool setup(const json & params) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/math.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/math.cpp) + +Line 106. + +*** + +### skill\_description + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_description() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/math.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/math.cpp) + +Line 103. + +*** + +### skill\_name + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_name() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/math.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/math.cpp) + +Line 102. + +*** + +### supports\_multiple\_instances + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +bool supports_multiple_instances() const +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/math.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/math.cpp) + +Line 104. + +## Source + +[`src/skills/builtin/math.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/math.cpp) + +Line 100. diff --git a/fern/products/sdk-reference/cpp/agents/skills/mcp-gateway-skill-r/index.mdx b/fern/products/sdk-reference/cpp/agents/skills/mcp-gateway-skill-r/index.mdx new file mode 100644 index 0000000000..b31ddf7f7c --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/skills/mcp-gateway-skill-r/index.mdx @@ -0,0 +1,152 @@ +--- +slug: "/reference/cpp/agents/skills/mcp-gateway-skill-r" +title: "McpGatewaySkillR" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::McpGatewaySkillR" + parent: "signalwire::skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp" + visibility: "public" +--- +# `McpGatewaySkillR` + +## Signature + +```cpp +class signalwire::skills::McpGatewaySkillR : signalwire::skills::SkillBase +``` + +## Inheritance + +**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/agents/skills/skill-base) + +## Methods + +### get\_hints + +Get speech recognition hints to merge into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< std::string > get_hints() const +``` + +#### Returns + +`std::vector< std::string >` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 408. + +*** + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 408. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +bool setup(const json & params) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 408. + +*** + +### skill\_description + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_description() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 408. + +*** + +### skill\_name + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_name() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 408. + +## Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 408. diff --git a/fern/products/sdk-reference/cpp/agents/skills/mcp-gateway-skill/index.mdx b/fern/products/sdk-reference/cpp/agents/skills/mcp-gateway-skill/index.mdx new file mode 100644 index 0000000000..4409852194 --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/skills/mcp-gateway-skill/index.mdx @@ -0,0 +1,200 @@ +--- +slug: "/reference/cpp/agents/skills/mcp-gateway-skill" +title: "McpGatewaySkill" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::McpGatewaySkill" + parent: "signalwire::skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/mcp_gateway.cpp" + visibility: "public" +--- +# `McpGatewaySkill` + +## Signature + +```cpp +class signalwire::skills::McpGatewaySkill : signalwire::skills::SkillBase +``` + +## Inheritance + +**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/agents/skills/skill-base) + +## Methods + +### get\_global\_data + +Get global data to merge into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +json get_global_data() const +``` + +#### Returns + +`json` + +#### Source + +[`src/skills/builtin/mcp_gateway.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/mcp_gateway.cpp) + +Line 55. + +*** + +### get\_hints + +Get speech recognition hints to merge into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< std::string > get_hints() const +``` + +#### Returns + +`std::vector< std::string >` + +#### Source + +[`src/skills/builtin/mcp_gateway.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/mcp_gateway.cpp) + +Line 45. + +*** + +### get\_prompt\_sections + +Get prompt sections to inject into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< SkillPromptSection > get_prompt_sections() const +``` + +#### Returns + +`std::vector< SkillPromptSection >` + +#### Source + +[`src/skills/builtin/mcp_gateway.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/mcp_gateway.cpp) + +Line 69. + +*** + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`src/skills/builtin/mcp_gateway.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/mcp_gateway.cpp) + +Line 21. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +bool setup(const json & params) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/mcp_gateway.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/mcp_gateway.cpp) + +Line 14. + +*** + +### skill\_description + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_description() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/mcp_gateway.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/mcp_gateway.cpp) + +Line 12. + +*** + +### skill\_name + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_name() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/mcp_gateway.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/mcp_gateway.cpp) + +Line 11. + +## Source + +[`src/skills/builtin/mcp_gateway.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/mcp_gateway.cpp) + +Line 9. diff --git a/fern/products/sdk-reference/cpp/agents/skills/native-vector-search-skill-r/index.mdx b/fern/products/sdk-reference/cpp/agents/skills/native-vector-search-skill-r/index.mdx new file mode 100644 index 0000000000..ae3e3823b8 --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/skills/native-vector-search-skill-r/index.mdx @@ -0,0 +1,174 @@ +--- +slug: "/reference/cpp/agents/skills/native-vector-search-skill-r" +title: "NativeVectorSearchSkillR" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::NativeVectorSearchSkillR" + parent: "signalwire::skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp" + visibility: "public" +--- +# `NativeVectorSearchSkillR` + +## Signature + +```cpp +class signalwire::skills::NativeVectorSearchSkillR : signalwire::skills::SkillBase +``` + +## Inheritance + +**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/agents/skills/skill-base) + +## Methods + +### get\_hints + +Get speech recognition hints to merge into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< std::string > get_hints() const +``` + +#### Returns + +`std::vector< std::string >` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 402. + +*** + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 402. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +bool setup(const json & params) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 402. + +*** + +### skill\_description + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_description() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 402. + +*** + +### skill\_name + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_name() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 402. + +*** + +### supports\_multiple\_instances + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +bool supports_multiple_instances() const +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 402. + +## Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 402. diff --git a/fern/products/sdk-reference/cpp/agents/skills/native-vector-search-skill/index.mdx b/fern/products/sdk-reference/cpp/agents/skills/native-vector-search-skill/index.mdx new file mode 100644 index 0000000000..e8fab8888f --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/skills/native-vector-search-skill/index.mdx @@ -0,0 +1,174 @@ +--- +slug: "/reference/cpp/agents/skills/native-vector-search-skill" +title: "NativeVectorSearchSkill" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::NativeVectorSearchSkill" + parent: "signalwire::skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/native_vector_search.cpp" + visibility: "public" +--- +# `NativeVectorSearchSkill` + +## Signature + +```cpp +class signalwire::skills::NativeVectorSearchSkill : signalwire::skills::SkillBase +``` + +## Inheritance + +**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/agents/skills/skill-base) + +## Methods + +### get\_hints + +Get speech recognition hints to merge into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< std::string > get_hints() const +``` + +#### Returns + +`std::vector< std::string >` + +#### Source + +[`src/skills/builtin/native_vector_search.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/native_vector_search.cpp) + +Line 44. + +*** + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`src/skills/builtin/native_vector_search.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/native_vector_search.cpp) + +Line 27. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +bool setup(const json & params) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/native_vector_search.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/native_vector_search.cpp) + +Line 17. + +*** + +### skill\_description + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_description() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/native_vector_search.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/native_vector_search.cpp) + +Line 12. + +*** + +### skill\_name + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_name() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/native_vector_search.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/native_vector_search.cpp) + +Line 11. + +*** + +### supports\_multiple\_instances + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +bool supports_multiple_instances() const +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/native_vector_search.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/native_vector_search.cpp) + +Line 15. + +## Source + +[`src/skills/builtin/native_vector_search.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/native_vector_search.cpp) + +Line 9. diff --git a/fern/products/sdk-reference/cpp/agents/skills/play-background-file-skill-r/index.mdx b/fern/products/sdk-reference/cpp/agents/skills/play-background-file-skill-r/index.mdx new file mode 100644 index 0000000000..18617a717e --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/skills/play-background-file-skill-r/index.mdx @@ -0,0 +1,174 @@ +--- +slug: "/reference/cpp/agents/skills/play-background-file-skill-r" +title: "PlayBackgroundFileSkillR" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::PlayBackgroundFileSkillR" + parent: "signalwire::skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp" + visibility: "public" +--- +# `PlayBackgroundFileSkillR` + +## Signature + +```cpp +class signalwire::skills::PlayBackgroundFileSkillR : signalwire::skills::SkillBase +``` + +## Inheritance + +**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/agents/skills/skill-base) + +## Methods + +### get\_datamap\_functions + +Get SWAIG DataMap functions (for DataMap-based skills). + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< json > get_datamap_functions() const +``` + +#### Returns + +`std::vector< json >` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 398. + +*** + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 398. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +bool setup(const json & params) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 398. + +*** + +### skill\_description + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_description() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 398. + +*** + +### skill\_name + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_name() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 398. + +*** + +### supports\_multiple\_instances + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +bool supports_multiple_instances() const +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 398. + +## Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 398. diff --git a/fern/products/sdk-reference/cpp/agents/skills/play-background-file-skill/index.mdx b/fern/products/sdk-reference/cpp/agents/skills/play-background-file-skill/index.mdx new file mode 100644 index 0000000000..0b4db72a01 --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/skills/play-background-file-skill/index.mdx @@ -0,0 +1,174 @@ +--- +slug: "/reference/cpp/agents/skills/play-background-file-skill" +title: "PlayBackgroundFileSkill" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::PlayBackgroundFileSkill" + parent: "signalwire::skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/play_background_file.cpp" + visibility: "public" +--- +# `PlayBackgroundFileSkill` + +## Signature + +```cpp +class signalwire::skills::PlayBackgroundFileSkill : signalwire::skills::SkillBase +``` + +## Inheritance + +**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/agents/skills/skill-base) + +## Methods + +### get\_datamap\_functions + +Get SWAIG DataMap functions (for DataMap-based skills). + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< json > get_datamap_functions() const +``` + +#### Returns + +`std::vector< json >` + +#### Source + +[`src/skills/builtin/play_background_file.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/play_background_file.cpp) + +Line 24. + +*** + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`src/skills/builtin/play_background_file.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/play_background_file.cpp) + +Line 22. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +bool setup(const json & params) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/play_background_file.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/play_background_file.cpp) + +Line 16. + +*** + +### skill\_description + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_description() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/play_background_file.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/play_background_file.cpp) + +Line 13. + +*** + +### skill\_name + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_name() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/play_background_file.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/play_background_file.cpp) + +Line 12. + +*** + +### supports\_multiple\_instances + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +bool supports_multiple_instances() const +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/play_background_file.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/play_background_file.cpp) + +Line 14. + +## Source + +[`src/skills/builtin/play_background_file.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/play_background_file.cpp) + +Line 10. diff --git a/fern/products/sdk-reference/cpp/agents/skills/skill-base/index.mdx b/fern/products/sdk-reference/cpp/agents/skills/skill-base/index.mdx new file mode 100644 index 0000000000..de01df541b --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/skills/skill-base/index.mdx @@ -0,0 +1,518 @@ +--- +slug: "/reference/cpp/agents/skills/skill-base" +title: "SkillBase" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::SkillBase" + parent: "signalwire::skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp" + visibility: "public" +--- +# `SkillBase` + +Abstract base class for all skills. + +## Signature + +```cpp +class signalwire::skills::SkillBase +``` + +## Methods + +### ~SkillBase + +**Modifiers:** `virtual` + +#### Signature + +```cpp +void ~SkillBase() +``` + +#### Source + +[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) + +Line 28. + +*** + +### cleanup + +Cleanup resources. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +void cleanup() +``` + +#### Source + +[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) + +Line 70. + +*** + +### define\_tool + +Define a tool (convenience for register\_tools implementations). + +**Modifiers:** `inline` + +#### Signature + +```cpp +swaig::ToolDefinition define_tool( + const std::string & name, + const std::string & description, + const json & parameters, + swaig::ToolHandler handler, + bool secure = false +) +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`swaig::ToolDefinition` + +#### Source + +[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) + +Line 77. + +*** + +### get\_datamap\_functions + +Get SWAIG DataMap functions (for DataMap-based skills). + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< json > get_datamap_functions() const +``` + +#### Returns + +`std::vector< json >` + +#### Source + +[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) + +Line 61. + +*** + +### get\_global\_data + +Get global data to merge into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +json get_global_data() const +``` + +#### Returns + +`json` + +#### Source + +[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) + +Line 55. + +*** + +### get\_hints + +Get speech recognition hints to merge into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< std::string > get_hints() const +``` + +#### Returns + +`std::vector< std::string >` + +#### Source + +[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) + +Line 52. + +*** + +### get\_instance\_key + +Get instance key for multi-instance skills. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string get_instance_key() const +``` + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) + +Line 67. + +*** + +### get\_param + +Get a parameter value with a default. + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +template +T get_param( + const json & params, + const std::string & key, + const T & default_val +) const +``` + +#### Type Parameters + + + +#### Parameters + + + + + + + +#### Returns + +`T` + +#### Source + +[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) + +Line 94. + +*** + +### get\_param\_or\_env + +Get a string parameter with env var fallback. + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +std::string get_param_or_env( + const json & params, + const std::string & key, + const std::string & env_var, + const std::string & default_val = "" +) const +``` + +#### Parameters + + + + + + + + + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) + +Line 102. + +*** + +### get\_parameter\_schema + +Get parameter schema for GUI tools. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +json get_parameter_schema() const +``` + +#### Returns + +`json` + +#### Source + +[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) + +Line 64. + +*** + +### get\_prompt\_sections + +Get prompt sections to inject into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< SkillPromptSection > get_prompt_sections() const +``` + +#### Returns + +`std::vector< SkillPromptSection >` + +#### Source + +[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) + +Line 58. + +*** + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `virtual` `pure` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() = 0 +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) + +Line 45. + +*** + +### required\_env\_vars + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< std::string > required_env_vars() const +``` + +#### Returns + +`std::vector< std::string >` + +#### Source + +[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) + +Line 38. + +*** + +### required\_packages + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< std::string > required_packages() const +``` + +#### Returns + +`std::vector< std::string >` + +#### Source + +[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) + +Line 39. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `virtual` `pure` + +#### Signature + +```cpp +bool setup(const json & params) = 0 +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) + +Line 42. + +*** + +### skill\_description + +**Modifiers:** `const` `virtual` `pure` + +#### Signature + +```cpp +std::string skill_description() const = 0 +``` + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) + +Line 35. + +*** + +### skill\_name + +**Modifiers:** `const` `virtual` `pure` + +#### Signature + +```cpp +std::string skill_name() const = 0 +``` + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) + +Line 34. + +*** + +### skill\_version + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_version() const +``` + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) + +Line 36. + +*** + +### supports\_multiple\_instances + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +bool supports_multiple_instances() const +``` + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) + +Line 37. + +## Source + +[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) + +Line 26. diff --git a/fern/products/sdk-reference/cpp/agents/skills/skill-http-response/index.mdx b/fern/products/sdk-reference/cpp/agents/skills/skill-http-response/index.mdx new file mode 100644 index 0000000000..11470b6692 --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/skills/skill-http-response/index.mdx @@ -0,0 +1,38 @@ +--- +slug: "/reference/cpp/agents/skills/skill-http-response" +title: "SkillHttpResponse" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::SkillHttpResponse" + parent: "signalwire::skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skills_http.hpp" + visibility: "public" +--- +# `SkillHttpResponse` + +Result of a skill HTTP request. status is the HTTP status code (0 indicates a transport-level error — connection refused, DNS, etc.). body is the raw response body. error is non-empty when status is 0. + +## Signature + +```cpp +struct signalwire::skills::SkillHttpResponse +``` + +## Properties + + + + + + + +## Source + +[`include/signalwire/skills/skills_http.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skills_http.hpp) + +Line 14. diff --git a/fern/products/sdk-reference/cpp/agents/skills/skill-manager/index.mdx b/fern/products/sdk-reference/cpp/agents/skills/skill-manager/index.mdx new file mode 100644 index 0000000000..3e68bf3614 --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/skills/skill-manager/index.mdx @@ -0,0 +1,172 @@ +--- +slug: "/reference/cpp/agents/skills/skill-manager" +title: "SkillManager" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::SkillManager" + parent: "signalwire::skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_manager.hpp" + visibility: "public" +--- +# `SkillManager` + +Manages skill lifecycle: creation, setup, registration with agents. + +## Signature + +```cpp +class signalwire::skills::SkillManager +``` + +## Methods + +### cleanup\_all + +Cleanup all skills. + +#### Signature + +```cpp +void cleanup_all() +``` + +#### Source + +[`include/signalwire/skills/skill_manager.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_manager.hpp) + +Line 40. + +*** + +### is\_loaded + +Check if a skill is loaded. + +**Modifiers:** `const` + +#### Signature + +```cpp +bool is_loaded(const std::string & skill_name) const +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/skills/skill_manager.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_manager.hpp) + +Line 34. + +*** + +### list\_loaded + +List loaded skills. + +**Modifiers:** `const` + +#### Signature + +```cpp +std::vector< std::string > list_loaded() const +``` + +#### Returns + +`std::vector< std::string >` + +#### Source + +[`include/signalwire/skills/skill_manager.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_manager.hpp) + +Line 37. + +*** + +### load\_skill + +Load a skill by name with params and register it with the agent. + +#### Signature + +```cpp +bool load_skill( + const std::string & skill_name, + const json & params, + agent::AgentBase & agent +) +``` + +#### Parameters + + + + + + + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/skills/skill_manager.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_manager.hpp) + +Line 27. + +*** + +### SkillManager + +#### Signature + +```cpp +void SkillManager() +``` + +#### Source + +[`include/signalwire/skills/skill_manager.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_manager.hpp) + +Line 24. + +*** + +### unload\_skill + +Unload a skill. + +#### Signature + +```cpp +void unload_skill(const std::string & skill_name) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/skills/skill_manager.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_manager.hpp) + +Line 31. + +## Source + +[`include/signalwire/skills/skill_manager.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_manager.hpp) + +Line 22. diff --git a/fern/products/sdk-reference/cpp/agents/skills/skill-prompt-section/index.mdx b/fern/products/sdk-reference/cpp/agents/skills/skill-prompt-section/index.mdx new file mode 100644 index 0000000000..db2fa84e5a --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/skills/skill-prompt-section/index.mdx @@ -0,0 +1,38 @@ +--- +slug: "/reference/cpp/agents/skills/skill-prompt-section" +title: "SkillPromptSection" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::SkillPromptSection" + parent: "signalwire::skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp" + visibility: "public" +--- +# `SkillPromptSection` + +POM section for skill prompts. + +## Signature + +```cpp +struct signalwire::skills::SkillPromptSection +``` + +## Properties + + + + + + + +## Source + +[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) + +Line 19. diff --git a/fern/products/sdk-reference/cpp/agents/skills/skill-registry/index.mdx b/fern/products/sdk-reference/cpp/agents/skills/skill-registry/index.mdx new file mode 100644 index 0000000000..6ab4fff6f5 --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/skills/skill-registry/index.mdx @@ -0,0 +1,207 @@ +--- +slug: "/reference/cpp/agents/skills/skill-registry" +title: "SkillRegistry" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::SkillRegistry" + parent: "signalwire::skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_registry.hpp" + visibility: "public" +--- +# `SkillRegistry` + +Global registry of skill factories. + +## Signature + +```cpp +class signalwire::skills::SkillRegistry +``` + +## Methods + +### add\_skill\_directory + +Add a directory to search for skills. +Mirrors Python's signalwire.skills.registry.SkillRegistry.add\_skill\_directory: validate that the path exists and is a directory, then append it (de-duplicated) to external\_paths\_. Throws std::invalid\_argument (the C++ analog of Python's ValueError) for invalid input — the path doesn't exist or isn't a directory. + +**Modifiers:** `inline` + +#### Signature + +```cpp +void add_skill_directory(const std::string & path) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/skills/skill_registry.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_registry.hpp) + +Line 65. + +*** + +### create + +Create a skill instance by name. + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +std::unique_ptr< SkillBase > create(const std::string & name) const +``` + +#### Parameters + + + +#### Returns + +`std::unique_ptr< SkillBase >` + +#### Source + +[`include/signalwire/skills/skill_registry.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_registry.hpp) + +Line 32. + +*** + +### external\_paths + +Returns the registered external skill directories. Mirrors Python's SkillRegistry.\_external\_paths (private list, exposed here as a public accessor for parity-test inspection — C++ has no convention for protected attributes that tests can poke). + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +std::vector< std::string > external_paths() const +``` + +#### Returns + +`std::vector< std::string >` + +#### Source + +[`include/signalwire/skills/skill_registry.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_registry.hpp) + +Line 84. + +*** + +### has\_skill + +Check if a skill is registered. + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +bool has_skill(const std::string & name) const +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/skills/skill_registry.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_registry.hpp) + +Line 42. + +*** + +### instance + +**Modifiers:** `static` `inline` + +#### Signature + +```cpp +SkillRegistry & instance() +``` + +#### Returns + +`SkillRegistry &` + +#### Source + +[`include/signalwire/skills/skill_registry.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_registry.hpp) + +Line 20. + +*** + +### list\_skills + +List all registered skill names. + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +std::vector< std::string > list_skills() const +``` + +#### Returns + +`std::vector< std::string >` + +#### Source + +[`include/signalwire/skills/skill_registry.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_registry.hpp) + +Line 48. + +*** + +### register\_skill + +Register a skill factory. + +**Modifiers:** `inline` + +#### Signature + +```cpp +void register_skill(const std::string & name, SkillFactory factory) +``` + +#### Parameters + + + + + +#### Source + +[`include/signalwire/skills/skill_registry.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_registry.hpp) + +Line 26. + +## Source + +[`include/signalwire/skills/skill_registry.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_registry.hpp) + +Line 18. diff --git a/fern/products/sdk-reference/cpp/agents/skills/spider-skill-r/index.mdx b/fern/products/sdk-reference/cpp/agents/skills/spider-skill-r/index.mdx new file mode 100644 index 0000000000..6412c75947 --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/skills/spider-skill-r/index.mdx @@ -0,0 +1,174 @@ +--- +slug: "/reference/cpp/agents/skills/spider-skill-r" +title: "SpiderSkillR" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::SpiderSkillR" + parent: "signalwire::skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp" + visibility: "public" +--- +# `SpiderSkillR` + +## Signature + +```cpp +class signalwire::skills::SpiderSkillR : signalwire::skills::SkillBase +``` + +## Inheritance + +**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/agents/skills/skill-base) + +## Methods + +### get\_hints + +Get speech recognition hints to merge into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< std::string > get_hints() const +``` + +#### Returns + +`std::vector< std::string >` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 301. + +*** + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 271. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +bool setup(const json & params) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 270. + +*** + +### skill\_description + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_description() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 268. + +*** + +### skill\_name + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_name() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 267. + +*** + +### supports\_multiple\_instances + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +bool supports_multiple_instances() const +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 269. + +## Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 249. diff --git a/fern/products/sdk-reference/cpp/agents/skills/spider-skill/index.mdx b/fern/products/sdk-reference/cpp/agents/skills/spider-skill/index.mdx new file mode 100644 index 0000000000..2f5cb56225 --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/skills/spider-skill/index.mdx @@ -0,0 +1,177 @@ +--- +slug: "/reference/cpp/agents/skills/spider-skill" +title: "SpiderSkill" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::SpiderSkill" + parent: "signalwire::skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/spider.cpp" + visibility: "public" +--- +# `SpiderSkill` + +Spider scrape skill — issues a real GET against the URL the LLM passes in. Strips HTML tags from the response and returns the text payload. Matches Python SpiderSkill's scrape\_url behavior. +SPIDER\_BASE\_URL env var overrides the host portion of the URL the caller passes in (used by audit\_skills\_dispatch.py to redirect scrape requests at a loopback fixture). + +## Signature + +```cpp +class signalwire::skills::SpiderSkill : signalwire::skills::SkillBase +``` + +## Inheritance + +**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/agents/skills/skill-base) + +## Methods + +### get\_hints + +Get speech recognition hints to merge into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< std::string > get_hints() const +``` + +#### Returns + +`std::vector< std::string >` + +#### Source + +[`src/skills/builtin/spider.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/spider.cpp) + +Line 153. + +*** + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`src/skills/builtin/spider.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/spider.cpp) + +Line 62. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +bool setup(const json & params) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/spider.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/spider.cpp) + +Line 60. + +*** + +### skill\_description + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_description() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/spider.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/spider.cpp) + +Line 57. + +*** + +### skill\_name + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_name() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/spider.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/spider.cpp) + +Line 56. + +*** + +### supports\_multiple\_instances + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +bool supports_multiple_instances() const +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/spider.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/spider.cpp) + +Line 58. + +## Source + +[`src/skills/builtin/spider.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/spider.cpp) + +Line 54. diff --git a/fern/products/sdk-reference/cpp/agents/skills/swml-transfer-skill-r/index.mdx b/fern/products/sdk-reference/cpp/agents/skills/swml-transfer-skill-r/index.mdx new file mode 100644 index 0000000000..e66ccc06b9 --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/skills/swml-transfer-skill-r/index.mdx @@ -0,0 +1,198 @@ +--- +slug: "/reference/cpp/agents/skills/swml-transfer-skill-r" +title: "SwmlTransferSkillR" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::SwmlTransferSkillR" + parent: "signalwire::skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp" + visibility: "public" +--- +# `SwmlTransferSkillR` + +## Signature + +```cpp +class signalwire::skills::SwmlTransferSkillR : signalwire::skills::SkillBase +``` + +## Inheritance + +**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/agents/skills/skill-base) + +## Methods + +### get\_datamap\_functions + +Get SWAIG DataMap functions (for DataMap-based skills). + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< json > get_datamap_functions() const +``` + +#### Returns + +`std::vector< json >` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 396. + +*** + +### get\_hints + +Get speech recognition hints to merge into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< std::string > get_hints() const +``` + +#### Returns + +`std::vector< std::string >` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 396. + +*** + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 396. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +bool setup(const json & params) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 396. + +*** + +### skill\_description + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_description() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 396. + +*** + +### skill\_name + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_name() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 396. + +*** + +### supports\_multiple\_instances + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +bool supports_multiple_instances() const +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 396. + +## Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 396. diff --git a/fern/products/sdk-reference/cpp/agents/skills/swml-transfer-skill/index.mdx b/fern/products/sdk-reference/cpp/agents/skills/swml-transfer-skill/index.mdx new file mode 100644 index 0000000000..12129f8f9d --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/skills/swml-transfer-skill/index.mdx @@ -0,0 +1,222 @@ +--- +slug: "/reference/cpp/agents/skills/swml-transfer-skill" +title: "SwmlTransferSkill" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::SwmlTransferSkill" + parent: "signalwire::skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/swml_transfer.cpp" + visibility: "public" +--- +# `SwmlTransferSkill` + +## Signature + +```cpp +class signalwire::skills::SwmlTransferSkill : signalwire::skills::SkillBase +``` + +## Inheritance + +**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/agents/skills/skill-base) + +## Methods + +### get\_datamap\_functions + +Get SWAIG DataMap functions (for DataMap-based skills). + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< json > get_datamap_functions() const +``` + +#### Returns + +`std::vector< json >` + +#### Source + +[`src/skills/builtin/swml_transfer.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/swml_transfer.cpp) + +Line 26. + +*** + +### get\_hints + +Get speech recognition hints to merge into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< std::string > get_hints() const +``` + +#### Returns + +`std::vector< std::string >` + +#### Source + +[`src/skills/builtin/swml_transfer.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/swml_transfer.cpp) + +Line 62. + +*** + +### get\_prompt\_sections + +Get prompt sections to inject into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< SkillPromptSection > get_prompt_sections() const +``` + +#### Returns + +`std::vector< SkillPromptSection >` + +#### Source + +[`src/skills/builtin/swml_transfer.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/swml_transfer.cpp) + +Line 81. + +*** + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`src/skills/builtin/swml_transfer.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/swml_transfer.cpp) + +Line 24. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +bool setup(const json & params) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/swml_transfer.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/swml_transfer.cpp) + +Line 18. + +*** + +### skill\_description + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_description() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/swml_transfer.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/swml_transfer.cpp) + +Line 13. + +*** + +### skill\_name + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_name() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/swml_transfer.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/swml_transfer.cpp) + +Line 12. + +*** + +### supports\_multiple\_instances + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +bool supports_multiple_instances() const +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/swml_transfer.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/swml_transfer.cpp) + +Line 16. + +## Source + +[`src/skills/builtin/swml_transfer.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/swml_transfer.cpp) + +Line 10. diff --git a/fern/products/sdk-reference/cpp/agents/skills/weather-api-skill-r/index.mdx b/fern/products/sdk-reference/cpp/agents/skills/weather-api-skill-r/index.mdx new file mode 100644 index 0000000000..11225014b3 --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/skills/weather-api-skill-r/index.mdx @@ -0,0 +1,152 @@ +--- +slug: "/reference/cpp/agents/skills/weather-api-skill-r" +title: "WeatherApiSkillR" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::WeatherApiSkillR" + parent: "signalwire::skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp" + visibility: "public" +--- +# `WeatherApiSkillR` + +## Signature + +```cpp +class signalwire::skills::WeatherApiSkillR : signalwire::skills::SkillBase +``` + +## Inheritance + +**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/agents/skills/skill-base) + +## Methods + +### get\_datamap\_functions + +Get SWAIG DataMap functions (for DataMap-based skills). + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< json > get_datamap_functions() const +``` + +#### Returns + +`std::vector< json >` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 86. + +*** + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 85. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +bool setup(const json & params) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 84. + +*** + +### skill\_description + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_description() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 83. + +*** + +### skill\_name + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_name() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 82. + +## Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 79. diff --git a/fern/products/sdk-reference/cpp/agents/skills/weather-api-skill/index.mdx b/fern/products/sdk-reference/cpp/agents/skills/weather-api-skill/index.mdx new file mode 100644 index 0000000000..b7945bfdb8 --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/skills/weather-api-skill/index.mdx @@ -0,0 +1,152 @@ +--- +slug: "/reference/cpp/agents/skills/weather-api-skill" +title: "WeatherApiSkill" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::WeatherApiSkill" + parent: "signalwire::skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/weather_api.cpp" + visibility: "public" +--- +# `WeatherApiSkill` + +## Signature + +```cpp +class signalwire::skills::WeatherApiSkill : signalwire::skills::SkillBase +``` + +## Inheritance + +**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/agents/skills/skill-base) + +## Methods + +### get\_datamap\_functions + +Get SWAIG DataMap functions (for DataMap-based skills). + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< json > get_datamap_functions() const +``` + +#### Returns + +`std::vector< json >` + +#### Source + +[`src/skills/builtin/weather_api.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/weather_api.cpp) + +Line 25. + +*** + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`src/skills/builtin/weather_api.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/weather_api.cpp) + +Line 23. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +bool setup(const json & params) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/weather_api.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/weather_api.cpp) + +Line 15. + +*** + +### skill\_description + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_description() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/weather_api.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/weather_api.cpp) + +Line 13. + +*** + +### skill\_name + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_name() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/weather_api.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/weather_api.cpp) + +Line 12. + +## Source + +[`src/skills/builtin/weather_api.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/weather_api.cpp) + +Line 10. diff --git a/fern/products/sdk-reference/cpp/agents/skills/web-search-core/candidate/index.mdx b/fern/products/sdk-reference/cpp/agents/skills/web-search-core/candidate/index.mdx new file mode 100644 index 0000000000..779874ff83 --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/skills/web-search-core/candidate/index.mdx @@ -0,0 +1,42 @@ +--- +slug: "/reference/cpp/agents/skills/web-search-core/candidate" +title: "Candidate" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::web_search_core::Candidate" + parent: "signalwire::skills::web_search_core" + module: "agents.skills.web_search_core" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/web_search_core.hpp" + visibility: "public" +--- +# `Candidate` + +One Google CSE hit: title / link / snippet, plus the page text once a scrape succeeds. + +## Signature + +```cpp +struct signalwire::skills::web_search_core::Candidate +``` + +## Properties + + + + + + + + + + + +## Source + +[`include/signalwire/skills/web_search_core.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/web_search_core.hpp) + +Line 55. diff --git a/fern/products/sdk-reference/cpp/agents/skills/web-search-core/index.mdx b/fern/products/sdk-reference/cpp/agents/skills/web-search-core/index.mdx new file mode 100644 index 0000000000..7288e9c5ef --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/skills/web-search-core/index.mdx @@ -0,0 +1,318 @@ +--- +slug: "/reference/cpp/agents/skills/web-search-core" +title: "web_search_core" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "module" + language: "cpp" + qualified_name: "signalwire::skills::web_search_core" + parent: "signalwire::skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/web_search_core.hpp" +--- +# `web_search_core` + +## Signature + +```cpp +namespace signalwire::skills::web_search_core +``` + +## Classes + + + + One Google CSE hit: title / link / snippet, plus the page text once a scrape succeeds. + + + + Latency-control configuration read from the skill params. + + + +## Functions + +### format\_scraped\_results + +Format the successfully-scraped results. Returned when at least one page was fetched within budget. Keeps the historical "Web search results for '<q>'" header shape so existing parse-assertions still see it, but enriches each entry with the fetched page content (truncated to per\_result\_limit). + +**Modifiers:** `inline` + +#### Signature + +```cpp +std::string format_scraped_results( + const std::string & query, + const std::vector< Candidate > & scraped, + std::size_t total_candidates, + std::size_t per_result_limit +) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/skills/web_search_core.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/web_search_core.hpp) + +Line 122. + +*** + +### format\_snippet\_results + +Format Google CSE snippets without fetching the underlying pages. Used for the snippets\_only fast path AND as the graceful fallback when scraping is abandoned by the overall\_deadline. Always non-empty when there is at least one candidate. Mirrors Python's \_format\_snippet\_results. + +**Modifiers:** `inline` + +#### Signature + +```cpp +std::string format_snippet_results( + const std::string & query, + const std::vector< Candidate > & cands, + int num_results +) +``` + +#### Parameters + + + + + + + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/skills/web_search_core.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/web_search_core.hpp) + +Line 91. + +*** + +### parse\_cse\_items + +Parse a Google CSE \{ "items": \[ \{title, link, snippet\}, ... ] \} body into candidate hits. Unknown / missing fields default to empty strings. + +**Modifiers:** `inline` + +#### Signature + +```cpp +std::vector< Candidate > parse_cse_items(const json & parsed) +``` + +#### Parameters + + + +#### Returns + +`std::vector< Candidate >` + +#### Source + +[`include/signalwire/skills/web_search_core.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/web_search_core.hpp) + +Line 73. + +*** + +### run + +Run the full latency-controlled web\_search flow given an already-fetched and parsed CSE candidate list. Returns the response body (UNWRAPPED — the caller applies response\_prefix/response\_postfix). had\_items distinguishes "CSE +returned zero items" (return empty\_no\_items\_message) from "CSE returned +items but none scraped" (snippet fallback). +Steps mirror Python's search\_and\_scrape\_best: +snippets\_only -> format CSE snippets directly. +scrape under deadline. +no scraped survivors -> snippet fallback (non-empty). +else -> format scraped results. + +**Modifiers:** `inline` + +#### Signature + +```cpp +std::string run( + const std::string & query, + std::vector< Candidate > candidates, + const LatencyParams & lp, + int num_results, + std::size_t max_content_length, + const std::string & empty_no_items_message +) +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/skills/web_search_core.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/web_search_core.hpp) + +Line 254. + +*** + +### schema\_fragment + +Build the parameter-schema fragment advertising the 6 latency / response params. Merged into each skill's get\_parameter\_schema(). Mirrors Python's get\_parameter\_schema entries (295745b) and the Go reference port. + +**Modifiers:** `inline` + +#### Signature + +```cpp +json schema_fragment() +``` + +#### Returns + +`json` + +#### Source + +[`include/signalwire/skills/web_search_core.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/web_search_core.hpp) + +Line 302. + +*** + +### scrape\_candidates + +Scrape the candidate result links under the overall\_deadline budget, returning only the ones that produced usable page content before time ran out. The overall\_deadline is enforced in BOTH parallel and sequential modes via std::chrono::steady\_clock — that is the contract. +Parallel mode (best-effort): dispatch every scrape via std::async, then future::wait\_until(deadline) each. Whatever has not finished by the deadline is abandoned — its future is moved into a detached reaper so the abandoned fetch (already bounded by per\_page\_timeout) is cleaned up off the hot path and never blocks the response. std::async's own future destructor would otherwise JOIN the task, defeating the deadline; the reaper sidesteps that. +Sequential mode: scrape one link at a time, breaking out the instant the deadline has passed. + +**Modifiers:** `inline` + +#### Signature + +```cpp +std::vector< Candidate > scrape_candidates( + const std::vector< Candidate > & cands, + const LatencyParams & lp, + steady_clock::time_point deadline_at +) +``` + +#### Parameters + + + + + + + +#### Returns + +`std::vector< Candidate >` + +#### Source + +[`include/signalwire/skills/web_search_core.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/web_search_core.hpp) + +Line 186. + +*** + +### scrape\_one + +Fetch one candidate's page under the per\_page\_timeout bound. A 2xx response with a non-empty body is a usable scrape; everything else (transport error, non-2xx, empty body) yields an unscraped candidate. The per\_page\_timeout is converted to milliseconds so a sub-second budget is honored exactly. + +**Modifiers:** `inline` + +#### Signature + +```cpp +Candidate scrape_one(const Candidate & in, double per_page_timeout) +``` + +#### Parameters + + + + + +#### Returns + +`Candidate` + +#### Source + +[`include/signalwire/skills/web_search_core.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/web_search_core.hpp) + +Line 153. + +## Type Aliases + +### json + +#### Signature + +```cpp +typedef nlohmann::json json +``` + +#### Source + +[`include/signalwire/skills/web_search_core.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/web_search_core.hpp) + +Line 50. + +*** + +### steady\_clock + +#### Signature + +```cpp +typedef std::chrono::steady_clock steady_clock +``` + +#### Source + +[`include/signalwire/skills/web_search_core.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/web_search_core.hpp) + +Line 51. + +## Source + +[`include/signalwire/skills/web_search_core.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/web_search_core.hpp) + +Line 48. diff --git a/fern/products/sdk-reference/cpp/agents/skills/web-search-core/latency-params/index.mdx b/fern/products/sdk-reference/cpp/agents/skills/web-search-core/latency-params/index.mdx new file mode 100644 index 0000000000..c15dc25d7f --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/skills/web-search-core/latency-params/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/cpp/agents/skills/web-search-core/latency-params" +title: "LatencyParams" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::web_search_core::LatencyParams" + parent: "signalwire::skills::web_search_core" + module: "agents.skills.web_search_core" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/web_search_core.hpp" + visibility: "public" +--- +# `LatencyParams` + +Latency-control configuration read from the skill params. + +## Signature + +```cpp +struct signalwire::skills::web_search_core::LatencyParams +``` + +## Properties + + + + + + + + + +## Source + +[`include/signalwire/skills/web_search_core.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/web_search_core.hpp) + +Line 64. diff --git a/fern/products/sdk-reference/cpp/agents/skills/web-search-skill-r/index.mdx b/fern/products/sdk-reference/cpp/agents/skills/web-search-skill-r/index.mdx new file mode 100644 index 0000000000..991869de7c --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/skills/web-search-skill-r/index.mdx @@ -0,0 +1,244 @@ +--- +slug: "/reference/cpp/agents/skills/web-search-skill-r" +title: "WebSearchSkillR" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::WebSearchSkillR" + parent: "signalwire::skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp" + visibility: "public" +--- +# `WebSearchSkillR` + +## Signature + +```cpp +class signalwire::skills::WebSearchSkillR : signalwire::skills::SkillBase +``` + +## Inheritance + +**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/agents/skills/skill-base) + +## Methods + +### get\_global\_data + +Get global data to merge into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +json get_global_data() const +``` + +#### Returns + +`json` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 176. + +*** + +### get\_parameter\_schema + +Get parameter schema for GUI tools. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +json get_parameter_schema() const +``` + +#### Returns + +`json` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 177. + +*** + +### get\_prompt\_sections + +Get prompt sections to inject into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< SkillPromptSection > get_prompt_sections() const +``` + +#### Returns + +`std::vector< SkillPromptSection >` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 175. + +*** + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 131. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +bool setup(const json & params) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 112. + +*** + +### skill\_description + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_description() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 109. + +*** + +### skill\_name + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_name() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 108. + +*** + +### skill\_version + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_version() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 110. + +*** + +### supports\_multiple\_instances + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +bool supports_multiple_instances() const +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 111. + +## Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 96. diff --git a/fern/products/sdk-reference/cpp/agents/skills/web-search-skill/index.mdx b/fern/products/sdk-reference/cpp/agents/skills/web-search-skill/index.mdx new file mode 100644 index 0000000000..f05b8b3ea6 --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/skills/web-search-skill/index.mdx @@ -0,0 +1,252 @@ +--- +slug: "/reference/cpp/agents/skills/web-search-skill" +title: "WebSearchSkill" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::WebSearchSkill" + parent: "signalwire::skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/web_search.cpp" + visibility: "public" +--- +# `WebSearchSkill` + +Google Custom Search API skill — issues a real GET against Google's customsearch/v1 endpoint, parses the items\[] results, and returns a human-readable summary. Matches Python's WebSearchSkill behavior. +Configuration: +api\_key (or env GOOGLE\_SEARCH\_API\_KEY / GOOGLE\_API\_KEY) +search\_engine\_id (or env GOOGLE\_SEARCH\_ENGINE\_ID / GOOGLE\_CSE\_ID) +num\_results (default 3) +tool\_name (default "web\_search") +WEB\_SEARCH\_BASE\_URL env var overrides the upstream URL (used by audit\_skills\_dispatch.py to point the skill at a fixture) + +## Signature + +```cpp +class signalwire::skills::WebSearchSkill : signalwire::skills::SkillBase +``` + +## Inheritance + +**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/agents/skills/skill-base) + +## Methods + +### get\_global\_data + +Get global data to merge into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +json get_global_data() const +``` + +#### Returns + +`json` + +#### Source + +[`src/skills/builtin/web_search.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/web_search.cpp) + +Line 142. + +*** + +### get\_parameter\_schema + +Get parameter schema for GUI tools. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +json get_parameter_schema() const +``` + +#### Returns + +`json` + +#### Source + +[`src/skills/builtin/web_search.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/web_search.cpp) + +Line 150. + +*** + +### get\_prompt\_sections + +Get prompt sections to inject into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< SkillPromptSection > get_prompt_sections() const +``` + +#### Returns + +`std::vector< SkillPromptSection >` + +#### Source + +[`src/skills/builtin/web_search.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/web_search.cpp) + +Line 135. + +*** + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`src/skills/builtin/web_search.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/web_search.cpp) + +Line 59. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +bool setup(const json & params) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/web_search.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/web_search.cpp) + +Line 32. + +*** + +### skill\_description + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_description() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/web_search.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/web_search.cpp) + +Line 28. + +*** + +### skill\_name + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_name() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/web_search.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/web_search.cpp) + +Line 27. + +*** + +### skill\_version + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_version() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/web_search.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/web_search.cpp) + +Line 29. + +*** + +### supports\_multiple\_instances + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +bool supports_multiple_instances() const +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/web_search.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/web_search.cpp) + +Line 30. + +## Source + +[`src/skills/builtin/web_search.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/web_search.cpp) + +Line 25. diff --git a/fern/products/sdk-reference/cpp/agents/skills/wikipedia-search-skill-r/index.mdx b/fern/products/sdk-reference/cpp/agents/skills/wikipedia-search-skill-r/index.mdx new file mode 100644 index 0000000000..13157b9f4a --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/skills/wikipedia-search-skill-r/index.mdx @@ -0,0 +1,152 @@ +--- +slug: "/reference/cpp/agents/skills/wikipedia-search-skill-r" +title: "WikipediaSearchSkillR" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::WikipediaSearchSkillR" + parent: "signalwire::skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp" + visibility: "public" +--- +# `WikipediaSearchSkillR` + +## Signature + +```cpp +class signalwire::skills::WikipediaSearchSkillR : signalwire::skills::SkillBase +``` + +## Inheritance + +**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/agents/skills/skill-base) + +## Methods + +### get\_prompt\_sections + +Get prompt sections to inject into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< SkillPromptSection > get_prompt_sections() const +``` + +#### Returns + +`std::vector< SkillPromptSection >` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 238. + +*** + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 198. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +bool setup(const json & params) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 192. + +*** + +### skill\_description + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_description() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 191. + +*** + +### skill\_name + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_name() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 190. + +## Source + +[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) + +Line 186. diff --git a/fern/products/sdk-reference/cpp/agents/skills/wikipedia-search-skill/index.mdx b/fern/products/sdk-reference/cpp/agents/skills/wikipedia-search-skill/index.mdx new file mode 100644 index 0000000000..81217a818c --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/skills/wikipedia-search-skill/index.mdx @@ -0,0 +1,155 @@ +--- +slug: "/reference/cpp/agents/skills/wikipedia-search-skill" +title: "WikipediaSearchSkill" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::skills::WikipediaSearchSkill" + parent: "signalwire::skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/wikipedia_search.cpp" + visibility: "public" +--- +# `WikipediaSearchSkill` + +Wikipedia search skill — issues a real GET against the Wikipedia API /w/api.php endpoint with action=query\&list=search, parses the query.search\[] results, and returns titles + snippets. Matches the Python WikipediaSearchSkill upstream call shape. +WIKIPEDIA\_BASE\_URL env var overrides the API root (used by audit\_skills\_dispatch.py to point the skill at its loopback fixture). + +## Signature + +```cpp +class signalwire::skills::WikipediaSearchSkill : signalwire::skills::SkillBase +``` + +## Inheritance + +**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/agents/skills/skill-base) + +## Methods + +### get\_prompt\_sections + +Get prompt sections to inject into agent. + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::vector< SkillPromptSection > get_prompt_sections() const +``` + +#### Returns + +`std::vector< SkillPromptSection >` + +#### Source + +[`src/skills/builtin/wikipedia_search.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/wikipedia_search.cpp) + +Line 102. + +*** + +### register\_tools + +Register tools with the agent. Returns tool definitions. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +std::vector< swaig::ToolDefinition > register_tools() +``` + +#### Returns + +`std::vector< swaig::ToolDefinition >` + +#### Source + +[`src/skills/builtin/wikipedia_search.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/wikipedia_search.cpp) + +Line 35. + +*** + +### setup + +Initialize the skill with given params. Return true on success. + +**Modifiers:** `inline` `virtual` + +#### Signature + +```cpp +bool setup(const json & params) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/wikipedia_search.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/wikipedia_search.cpp) + +Line 27. + +*** + +### skill\_description + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_description() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/wikipedia_search.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/wikipedia_search.cpp) + +Line 23. + +*** + +### skill\_name + +**Modifiers:** `const` `inline` `virtual` + +#### Signature + +```cpp +std::string skill_name() const +``` + +#### Returns + +`std::string` + +#### Source + +[`src/skills/builtin/wikipedia_search.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/wikipedia_search.cpp) + +Line 22. + +## Source + +[`src/skills/builtin/wikipedia_search.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/wikipedia_search.cpp) + +Line 20. diff --git a/fern/products/sdk-reference/cpp/agents/swaig/enum-or-string/index.mdx b/fern/products/sdk-reference/cpp/agents/swaig/enum-or-string/index.mdx new file mode 100644 index 0000000000..4a2ca08740 --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/swaig/enum-or-string/index.mdx @@ -0,0 +1,110 @@ +--- +slug: "/reference/cpp/agents/swaig/enum-or-string" +title: "EnumOrString" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::swaig::EnumOrString" + parent: "signalwire::swaig" + module: "agents.swaig" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp" + visibility: "public" +--- +# `EnumOrString` + +A closed-set field that accepts EITHER the typed enum OR a bare string. +JoinConferenceOptions::beep = ConferenceBeep::OnEnter; and ... = "onEnter"; both compile and resolve to the same wire string; the open-string path keeps parity with Python's bare str (the validation in join\_conference then rejects out-of-set strings exactly as Python does). Templated on the enum type plus its \*\_value() mapper so one definition covers all four sets. + +## Signature + +```cpp +template +struct signalwire::swaig::EnumOrString +``` + +## Type Parameters + + + + + +## Properties + + + +## Methods + +### EnumOrString + +**Modifiers:** `inline` + +#### Signature + + + + ```cpp + void EnumOrString(E e) + ``` + + + + ```cpp + void EnumOrString(const std::string & s) + ``` + + + + ```cpp + void EnumOrString(const char * s) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + +#### Parameters (Overload 3) + + + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 157. + +*** + +### str + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::string & str() const +``` + +#### Returns + +`const std::string &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 160. + +## Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 155. diff --git a/fern/products/sdk-reference/cpp/agents/swaig/function-result/index.mdx b/fern/products/sdk-reference/cpp/agents/swaig/function-result/index.mdx new file mode 100644 index 0000000000..df7d462f14 --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/swaig/function-result/index.mdx @@ -0,0 +1,1632 @@ +--- +slug: "/reference/cpp/agents/swaig/function-result" +title: "FunctionResult" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::swaig::FunctionResult" + parent: "signalwire::swaig" + module: "agents.swaig" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp" + visibility: "public" +--- +# `FunctionResult` + +Builder for SWAIG function results with 40+ action methods. Every method returns \*this for chaining. + +## Signature + +```cpp +class signalwire::swaig::FunctionResult +``` + +## Methods + +### add\_action + +#### Signature + +```cpp +FunctionResult & add_action(const std::string & name, const json & data) +``` + +#### Parameters + + + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 207. + +*** + +### add\_actions + +#### Signature + +```cpp +FunctionResult & add_actions(const std::vector< json > & actions) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 208. + +*** + +### add\_dynamic\_hints + +#### Signature + +```cpp +FunctionResult & add_dynamic_hints(const json & hints) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 284. + +*** + +### clear\_dynamic\_hints + +#### Signature + +```cpp +FunctionResult & clear_dynamic_hints() +``` + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 285. + +*** + +### connect + +#### Signature + +```cpp +FunctionResult & connect( + const std::string & destination, + bool final = true, + const std::string & from_addr = "" +) +``` + +#### Parameters + + + + + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 214. + +*** + +### create\_payment\_action + +**Modifiers:** `static` + +#### Signature + +```cpp +json create_payment_action( + const std::string & action_type, + const std::string & phrase +) +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 405. + +*** + +### create\_payment\_parameter + +**Modifiers:** `static` + +#### Signature + +```cpp +json create_payment_parameter( + const std::string & name, + const std::string & value +) +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 407. + +*** + +### create\_payment\_prompt + +**Modifiers:** `static` + +#### Signature + +```cpp +json create_payment_prompt( + const std::string & for_situation, + const std::vector< json > & actions, + const std::string & card_type = "", + const std::string & error_type = "" +) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 401. + +*** + +### enable\_extensive\_data + +#### Signature + +```cpp +FunctionResult & enable_extensive_data(bool enabled = true) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 290. + +*** + +### enable\_functions\_on\_timeout + +#### Signature + +```cpp +FunctionResult & enable_functions_on_timeout(bool enabled = true) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 289. + +*** + +### execute\_rpc + +#### Signature + +```cpp +FunctionResult & execute_rpc( + const std::string & method, + const json & params = json::object(), + const std::string & call_id = "", + const std::string & node_id = "" +) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 385. + +*** + +### execute\_swml + +#### Signature + +```cpp +FunctionResult & execute_swml(const json & swml_content, bool transfer = false) +``` + +#### Parameters + + + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 298. + +*** + +### FunctionResult + +**Modifiers:** `explicit` + +#### Signature + +```cpp +void FunctionResult( + const std::string & response = "", + bool post_process = false +) +``` + +#### Parameters + + + + + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 199. + +*** + +### hangup + +#### Signature + +```cpp +FunctionResult & hangup() +``` + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 218. + +*** + +### hold + +#### Signature + +```cpp +FunctionResult & hold(int timeout = 300) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 219. + +*** + +### join\_conference + +Join an ad-hoc audio conference (SWML join\_conference). Full parity with Python core/function\_result.py: 18 optional params past name, 7 validations, and simple (bare-name) vs full-object emission. +Flat positional overload — mirrors the Python signature 1:1 so the cross-language audit lines up on parameter count/types. The closed-set params are bare std::string (Python uses bare str); the options-struct overload below adds the typed enum class affordance. + +#### Signature + + + + ```cpp + FunctionResult & join_conference( + const std::string & name, + bool muted = false, + const std::string & beep = "true", + bool start_on_enter = true, + bool end_on_exit = false, + std::optional< std::string > wait_url = std::nullopt, + int max_participants = 250, + const std::string & record = "do-not-record", + std::optional< std::string > region = std::nullopt, + const std::string & trim = "trim-silence", + std::optional< std::string > coach = std::nullopt, + std::optional< std::string > status_callback_event = std::nullopt, + std::optional< std::string > status_callback = std::nullopt, + const std::string & status_callback_method = "POST", + std::optional< std::string > recording_status_callback = std::nullopt, + const std::string & recording_status_callback_method = "POST", + const std::string & recording_status_callback_event = "completed", + std::optional< json > result = std::nullopt + ) + ``` + + + + ```cpp + FunctionResult & join_conference( + const std::string & name, + const JoinConferenceOptions & opts + ) + ``` + + + +#### Parameters (Overload 1) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`FunctionResult &` + +#### Returns (Overload 2) + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 308. + +*** + +### join\_room + +#### Signature + +```cpp +FunctionResult & join_room(const std::string & name) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 333. + +*** + +### pay + +#### Signature + +```cpp +FunctionResult & pay( + const std::string & payment_connector_url, + const std::string & input_method = "dtmf", + const std::string & status_url = "", + const std::string & payment_method = "credit-card", + int timeout = 5, + int max_attempts = 1, + bool security_code = true, + const std::string & postal_code = "true", + int min_postal_code_length = 0, + const std::string & token_type = "reusable", + const std::string & charge_amount = "", + const std::string & currency = "usd", + const std::string & language = "en-US", + const std::string & voice = "woman", + const std::string & description = "", + const std::string & valid_card_types = "visa mastercard amex", + const std::vector< json > & parameters = {}, + const std::vector< json > & prompts = {}, + const std::string & ai_response = "The payment status is ${pay_result}, do not mention anything else about collecting payment if successful." +) +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 360. + +*** + +### play\_background\_file + +#### Signature + +```cpp +FunctionResult & play_background_file( + const std::string & filename, + bool wait = false +) +``` + +#### Parameters + + + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 247. + +*** + +### record\_call + +Typed overload — format/direction as the RecordFormat / RecordDirection closed-set enums for call-site typo checking. Declared after the std::string overload (equal arity) so the enumerator's dedup keeps the string signature canonical; normalizes the enums to their wire strings via record\_format\_value/record\_direction\_value and delegates to the std::string record\_call, so the emitted SWML is byte-identical. + +#### Signature + + + + ```cpp + FunctionResult & record_call( + const std::string & control_id = "", + bool stereo = false, + const std::string & format = "wav", + const std::string & direction = "both", + const std::string & terminators = "", + bool beep = false, + double input_sensitivity = 44.0, + std::optional< double > initial_timeout = std::nullopt, + std::optional< double > end_silence_timeout = std::nullopt, + std::optional< double > max_length = std::nullopt, + const std::string & status_url = "" + ) + ``` + + + + ```cpp + FunctionResult & record_call( + const std::string & control_id, + bool stereo, + RecordFormat format, + RecordDirection direction, + const std::string & terminators = "", + bool beep = false, + double input_sensitivity = 44.0, + std::optional< double > initial_timeout = std::nullopt, + std::optional< double > end_silence_timeout = std::nullopt, + std::optional< double > max_length = std::nullopt, + const std::string & status_url = "" + ) + ``` + + + +#### Parameters (Overload 1) + + + + + + + + + + + + + + + + + + + + + + + +#### Parameters (Overload 2) + + + + + + + + + + + + + + + + + + + + + + + +#### Returns (Overload 1) + +`FunctionResult &` + +#### Returns (Overload 2) + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 249. + +*** + +### remove\_global\_data + +#### Signature + +```cpp +FunctionResult & remove_global_data(const json & keys) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 230. + +*** + +### remove\_metadata + +#### Signature + +```cpp +FunctionResult & remove_metadata(const json & keys) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 232. + +*** + +### replace\_in\_history + +#### Signature + +```cpp +FunctionResult & replace_in_history(const json & text) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 240. + +*** + +### rpc\_ai\_message + +#### Signature + +```cpp +FunctionResult & rpc_ai_message( + const std::string & call_id, + const std::string & message_text, + const std::string & role = "system" +) +``` + +#### Parameters + + + + + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 391. + +*** + +### rpc\_ai\_unhold + +#### Signature + +```cpp +FunctionResult & rpc_ai_unhold(const std::string & call_id) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 393. + +*** + +### rpc\_dial + +#### Signature + +```cpp +FunctionResult & rpc_dial( + const std::string & to_number, + const std::string & from_number, + const std::string & dest_swml, + const std::string & device_type = "phone" +) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 388. + +*** + +### say + +#### Signature + +```cpp +FunctionResult & say(const std::string & text) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 246. + +*** + +### send\_sms + +#### Signature + +```cpp +FunctionResult & send_sms( + const std::string & to, + const std::string & from, + const std::string & body = "", + const std::vector< std::string > & media = {}, + const std::vector< std::string > & tags = {}, + const std::string & region = "" +) +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 355. + +*** + +### set\_end\_of\_speech\_timeout + +#### Signature + +```cpp +FunctionResult & set_end_of_speech_timeout(int milliseconds) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 286. + +*** + +### set\_metadata + +#### Signature + +```cpp +FunctionResult & set_metadata(const json & data) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 231. + +*** + +### set\_post\_process + +#### Signature + +```cpp +FunctionResult & set_post_process(bool pp) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 206. + +*** + +### set\_response + +#### Signature + +```cpp +FunctionResult & set_response(const std::string & response) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 205. + +*** + +### set\_speech\_event\_timeout + +#### Signature + +```cpp +FunctionResult & set_speech_event_timeout(int milliseconds) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 287. + +*** + +### simulate\_user\_input + +#### Signature + +```cpp +FunctionResult & simulate_user_input(const std::string & text) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 292. + +*** + +### sip\_refer + +#### Signature + +```cpp +FunctionResult & sip_refer(const std::string & to_uri) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 334. + +*** + +### stop + +#### Signature + +```cpp +FunctionResult & stop() +``` + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 223. + +*** + +### stop\_background\_file + +#### Signature + +```cpp +FunctionResult & stop_background_file() +``` + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 248. + +*** + +### stop\_record\_call + +#### Signature + +```cpp +FunctionResult & stop_record_call(const std::string & control_id = "") +``` + +#### Parameters + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 278. + +*** + +### stop\_tap + +#### Signature + +```cpp +FunctionResult & stop_tap(const std::string & control_id = "") +``` + +#### Parameters + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 354. + +*** + +### switch\_context + +#### Signature + +```cpp +FunctionResult & switch_context( + const std::string & system_prompt = "", + const std::string & user_prompt = "", + bool consolidate = false, + bool full_reset = false +) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 236. + +*** + +### swml\_change\_context + +#### Signature + +```cpp +FunctionResult & swml_change_context(const std::string & context_name) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 235. + +*** + +### swml\_change\_step + +#### Signature + +```cpp +FunctionResult & swml_change_step(const std::string & step_name) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 234. + +*** + +### swml\_transfer + +#### Signature + +```cpp +FunctionResult & swml_transfer( + const std::string & dest, + const std::string & ai_response, + bool final = true +) +``` + +#### Parameters + + + + + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 216. + +*** + +### swml\_user\_event + +#### Signature + +```cpp +FunctionResult & swml_user_event(const json & event_data) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 233. + +*** + +### tap + +Typed overload — direction/codec as the TapDirection / Codec closed-set enums for call-site typo checking. Declared after the std::string overload (equal arity) so the enumerator's dedup keeps the string signature canonical; normalizes the enums via tap\_direction\_value/codec\_value and delegates to the std::string tap, so the emitted SWML is byte-identical. NOTE the tap direction set is \{speak,hear,both\} (hear, not record\_call's listen). + +#### Signature + + + + ```cpp + FunctionResult & tap( + const std::string & uri, + const std::string & control_id = "", + const std::string & direction = "both", + const std::string & codec = "PCMU", + int rtp_ptime = 20, + const std::string & status_url = "" + ) + ``` + + + + ```cpp + FunctionResult & tap( + const std::string & uri, + const std::string & control_id, + TapDirection direction, + Codec codec, + int rtp_ptime = 20, + const std::string & status_url = "" + ) + ``` + + + +#### Parameters (Overload 1) + + + + + + + + + + + + + +#### Parameters (Overload 2) + + + + + + + + + + + + + +#### Returns (Overload 1) + +`FunctionResult &` + +#### Returns (Overload 2) + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 335. + +*** + +### to\_json + +**Modifiers:** `const` + +#### Signature + +```cpp +json to_json() const +``` + +#### Returns + +`json` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 418. + +*** + +### to\_string + +**Modifiers:** `const` + +#### Signature + +```cpp +std::string to_string(int indent = -1) const +``` + +#### Parameters + + + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 419. + +*** + +### toggle\_functions + +#### Signature + +```cpp +FunctionResult & toggle_functions(const json & function_toggles) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 288. + +*** + +### update\_global\_data + +#### Signature + +```cpp +FunctionResult & update_global_data(const json & data) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 229. + +*** + +### update\_settings + +#### Signature + +```cpp +FunctionResult & update_settings(const json & settings) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 291. + +*** + +### wait\_for\_user + +#### Signature + +```cpp +FunctionResult & wait_for_user( + std::optional< bool > enabled = std::nullopt, + std::optional< int > timeout = std::nullopt, + bool answer_first = false +) +``` + +#### Parameters + + + + + + + +#### Returns + +`FunctionResult &` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 220. + +## Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 197. diff --git a/fern/products/sdk-reference/cpp/agents/swaig/index.mdx b/fern/products/sdk-reference/cpp/agents/swaig/index.mdx new file mode 100644 index 0000000000..9859812ae3 --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/swaig/index.mdx @@ -0,0 +1,721 @@ +--- +slug: "/reference/cpp/agents/swaig" +title: "swaig" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "module" + language: "cpp" + qualified_name: "signalwire::swaig" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp" +--- +# `swaig` + +## Signature + +```cpp +namespace signalwire::swaig +``` + +## Classes + + + + A closed-set field that accepts EITHER the typed enum OR a bare string. JoinConferenceOptions::beep = ConferenceBeep::OnEnter; and ... = "onEnter"; both compile and resolve to the same wire string; the open-string path keeps parity with Python's bare str (the validation in join\_conference then rejects out-of-set strings exactly as Python does). Templated on the enum type plus its \*\_value() mapper so one definition covers all four sets. + + + + Builder for SWAIG function results with 40+ action methods. Every method returns \*this for chaining. + + + + Options bag for FunctionResult::join\_conference. Every field is std::optional and unset means "Python default" — so a default-constructed JoinConferenceOptions collapses to the bare conference-name string form, matching the reference's simple case. Closed sets use the enum-or-string wrapper above; open fields are plain std::optional. result is a free-form json (Python's Optional\[Any]). + + + + A typed, fluent builder for a SWAIG tool's parameters JSON-Schema object. Construct, chain property declarations, optionally mark some required, then call to\_json() to get the wire json. The result is byte-identical to the equivalent hand-written json::object(...) blob. + + + + Definition of a SWAIG tool (function). + + + +## Functions + +### callback\_method\_value + +**Modifiers:** `inline` + +#### Signature + +```cpp +std::string callback_method_value(CallbackMethod v) +``` + +#### Parameters + + + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 60. + +*** + +### codec\_value + +**Modifiers:** `inline` + +#### Signature + +```cpp +std::string codec_value(Codec v) +``` + +#### Parameters + + + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 131. + +*** + +### codec\_values + +**Modifiers:** `inline` + +#### Signature + +```cpp +std::vector< std::string > codec_values() +``` + +#### Returns + +`std::vector< std::string >` + +#### Source + +[`include/signalwire/swaig/parameter_schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/parameter_schema.hpp) + +Line 79. + +*** + +### conference\_beep\_value + +**Modifiers:** `inline` + +#### Signature + +```cpp +std::string conference_beep_value(ConferenceBeep v) +``` + +#### Parameters + + + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 37. + +*** + +### conference\_record\_value + +**Modifiers:** `inline` + +#### Signature + +```cpp +std::string conference_record_value(ConferenceRecord v) +``` + +#### Parameters + + + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 46. + +*** + +### conference\_trim\_value + +**Modifiers:** `inline` + +#### Signature + +```cpp +std::string conference_trim_value(ConferenceTrim v) +``` + +#### Parameters + + + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 53. + +*** + +### record\_direction\_value + +**Modifiers:** `inline` + +#### Signature + +```cpp +std::string record_direction_value(RecordDirection v) +``` + +#### Parameters + + + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 115. + +*** + +### record\_direction\_values + +**Modifiers:** `inline` + +#### Signature + +```cpp +std::vector< std::string > record_direction_values() +``` + +#### Returns + +`std::vector< std::string >` + +#### Source + +[`include/signalwire/swaig/parameter_schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/parameter_schema.hpp) + +Line 69. + +*** + +### record\_format\_value + +**Modifiers:** `inline` + +#### Signature + +```cpp +std::string record_format_value(RecordFormat v) +``` + +#### Parameters + + + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 107. + +*** + +### record\_format\_values + +Helper: the closed-set values for the Tier-1 SWAIG enums, as the exact wire strings, ready to hand to enum\_of(...). These reuse the SAME \*\_value() normalization point as the typed FunctionResult overloads, so a schema built with record\_format\_values() lists precisely the strings FunctionResult::record\_call accepts — one source of truth for each set. + +**Modifiers:** `inline` + +#### Signature + +```cpp +std::vector< std::string > record_format_values() +``` + +#### Returns + +`std::vector< std::string >` + +#### Source + +[`include/signalwire/swaig/parameter_schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/parameter_schema.hpp) + +Line 64. + +*** + +### tap\_direction\_value + +**Modifiers:** `inline` + +#### Signature + +```cpp +std::string tap_direction_value(TapDirection v) +``` + +#### Parameters + + + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 123. + +*** + +### tap\_direction\_values + +**Modifiers:** `inline` + +#### Signature + +```cpp +std::vector< std::string > tap_direction_values() +``` + +#### Returns + +`std::vector< std::string >` + +#### Source + +[`include/signalwire/swaig/parameter_schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/parameter_schema.hpp) + +Line 74. + +*** + +### to\_string + +ADL to\_string overloads so these enums stringify the same way the \*\_value() mappers do (the single wire-string normalization point). + +**Modifiers:** `inline` + +#### Signature + + + + ```cpp + std::string to_string(RecordFormat v) + ``` + + + + ```cpp + std::string to_string(RecordDirection v) + ``` + + + + ```cpp + std::string to_string(TapDirection v) + ``` + + + + ```cpp + std::string to_string(Codec v) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + +#### Parameters (Overload 3) + + + +#### Parameters (Overload 4) + + + +#### Returns (Overload 1) + +`std::string` + +#### Returns (Overload 2) + +`std::string` + +#### Returns (Overload 3) + +`std::string` + +#### Returns (Overload 4) + +`std::string` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 141. + +## Type Aliases + +### BeepField + +#### Signature + +```cpp +typedef EnumOrString< ConferenceBeep, &conference_beep_value > BeepField +``` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 163. + +*** + +### json + +#### Signature + +```cpp +typedef nlohmann::json json +``` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 11. + +*** + +### MethodField + +#### Signature + +```cpp +typedef EnumOrString< CallbackMethod, &callback_method_value > MethodField +``` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 166. + +*** + +### RecordField + +#### Signature + +```cpp +typedef EnumOrString< ConferenceRecord, &conference_record_value > RecordField +``` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 164. + +*** + +### ToolHandler + +#### Signature + +```cpp +typedef std::function< FunctionResult(const json &args, const json &raw_data)> ToolHandler +``` + +#### Source + +[`include/signalwire/swaig/tool_definition.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/tool_definition.hpp) + +Line 12. + +*** + +### TrimField + +#### Signature + +```cpp +typedef EnumOrString< ConferenceTrim, &conference_trim_value > TrimField +``` + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 165. + +## Enums + +### CallbackMethod + +status\_callback\_method / recording\_status\_callback\_method — HTTP verb. + +#### Signature + +```cpp +enum class CallbackMethod +``` + +#### Variants + + + + + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 32. + +*** + +### Codec + +Media codec for FunctionResult::tap (SWAIG tap only). Mirrors the reference's codec in \{"PCMU","PCMA"\} validation. The wire strings are upper-case. Distinct from the wider RELAY codec set — do not unify. + +#### Signature + +```cpp +enum class Codec +``` + +#### Variants + + + + + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 105. + +*** + +### ConferenceBeep + +beep — when the conference plays an enter/leave tone. + +#### Signature + +```cpp +enum class ConferenceBeep +``` + +#### Variants + + + + + + + + + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 26. + +*** + +### ConferenceRecord + +record — conference recording mode. + +#### Signature + +```cpp +enum class ConferenceRecord +``` + +#### Variants + + + + + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 28. + +*** + +### ConferenceTrim + +trim — leading/trailing silence handling on recordings. + +#### Signature + +```cpp +enum class ConferenceTrim +``` + +#### Variants + + + + + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 30. + +*** + +### RecordDirection + +Audio direction for FunctionResult::record\_call. Mirrors the reference's direction in \{"speak","listen","both"\} validation. NOTE: differs from TapDirection — record\_call uses listen, tap uses hear. + +#### Signature + +```cpp +enum class RecordDirection +``` + +#### Variants + + + + + + + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 95. + +*** + +### RecordFormat + +Recording container format for FunctionResult::record\_call. Mirrors the reference's format in \{"wav","mp3","mp4"\} validation. + +#### Signature + +```cpp +enum class RecordFormat +``` + +#### Variants + + + + + + + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 90. + +*** + +### TapDirection + +Audio direction for FunctionResult::tap. Mirrors the reference's direction in \{"speak","hear","both"\} validation. NOTE: differs from RecordDirection — tap uses hear, record\_call uses listen. + +#### Signature + +```cpp +enum class TapDirection +``` + +#### Variants + + + + + + + +#### Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 100. + +## Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 9. diff --git a/fern/products/sdk-reference/cpp/agents/swaig/join-conference-options/index.mdx b/fern/products/sdk-reference/cpp/agents/swaig/join-conference-options/index.mdx new file mode 100644 index 0000000000..16d018e17f --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/swaig/join-conference-options/index.mdx @@ -0,0 +1,67 @@ +--- +slug: "/reference/cpp/agents/swaig/join-conference-options" +title: "JoinConferenceOptions" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::swaig::JoinConferenceOptions" + parent: "signalwire::swaig" + module: "agents.swaig" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp" + visibility: "public" +--- +# `JoinConferenceOptions` + +Options bag for FunctionResult::join\_conference. +Every field is std::optional and unset means "Python default" — so a default-constructed JoinConferenceOptions collapses to the bare conference-name string form, matching the reference's simple case. Closed sets use the enum-or-string wrapper above; open fields are plain std::optional. result is a free-form json (Python's Optional\[Any]). + +## Signature + +```cpp +struct signalwire::swaig::JoinConferenceOptions +``` + +## Properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## Source + +[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) + +Line 175. diff --git a/fern/products/sdk-reference/cpp/agents/swaig/parameter-schema/index.mdx b/fern/products/sdk-reference/cpp/agents/swaig/parameter-schema/index.mdx new file mode 100644 index 0000000000..e46434af75 --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/swaig/parameter-schema/index.mdx @@ -0,0 +1,492 @@ +--- +slug: "/reference/cpp/agents/swaig/parameter-schema" +title: "ParameterSchema" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::swaig::ParameterSchema" + parent: "signalwire::swaig" + module: "agents.swaig" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/parameter_schema.hpp" + visibility: "public" +--- +# `ParameterSchema` + +A typed, fluent builder for a SWAIG tool's parameters JSON-Schema object. +Construct, chain property declarations, optionally mark some required, then call to\_json() to get the wire json. The result is byte-identical to the equivalent hand-written json::object(...) blob. + +## Signature + +```cpp +class signalwire::swaig::ParameterSchema +``` + +## Methods + +### array\_of + +Add a "type":"array" property whose items are the given scalar JSON kind (e.g. array\_of("tags", "string", "...") → \{"type":"array", "items":\{"type":"string"\}\}). + +**Modifiers:** `inline` + +#### Signature + + + + ```cpp + ParameterSchema & array_of( + const std::string & name, + const std::string & item_type, + const std::string & description = "" + ) + ``` + + + + ```cpp + ParameterSchema & array_of( + const std::string & name, + const ParameterSchema & item_schema, + const std::string & description = "" + ) + ``` + + + +#### Parameters (Overload 1) + + + + + + + +#### Parameters (Overload 2) + + + + + + + +#### Returns (Overload 1) + +`ParameterSchema &` + +#### Returns (Overload 2) + +`ParameterSchema &` + +#### Source + +[`include/signalwire/swaig/parameter_schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/parameter_schema.hpp) + +Line 147. + +*** + +### boolean + +Add a "type":"boolean" property. + +**Modifiers:** `inline` + +#### Signature + +```cpp +ParameterSchema & boolean( + const std::string & name, + const std::string & description = "" +) +``` + +#### Parameters + + + + + +#### Returns + +`ParameterSchema &` + +#### Source + +[`include/signalwire/swaig/parameter_schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/parameter_schema.hpp) + +Line 116. + +*** + +### empty + +True if no properties have been declared yet. + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +bool empty() const +``` + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/swaig/parameter_schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/parameter_schema.hpp) + +Line 246. + +*** + +### enum\_of + +Add a "type":"string" property constrained to a closed set of values ("enum":\[...]). Pass the values explicitly, or feed one of the Tier-1 helpers (record\_format\_values(), codec\_values(), …) so the schema's accepted set matches the typed FunctionResult overloads exactly — INTEGRATING the RecordFormat/RecordDirection/TapDirection/ Codec enums via their \*\_value() wire strings. + +**Modifiers:** `inline` + +#### Signature + +```cpp +ParameterSchema & enum_of( + const std::string & name, + const std::vector< std::string > & values, + const std::string & description = "" +) +``` + +#### Parameters + + + + + + + +#### Returns + +`ParameterSchema &` + +#### Source + +[`include/signalwire/swaig/parameter_schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/parameter_schema.hpp) + +Line 129. + +*** + +### integer + +Add a "type":"integer" property. + +**Modifiers:** `inline` + +#### Signature + +```cpp +ParameterSchema & integer( + const std::string & name, + const std::string & description = "" +) +``` + +#### Parameters + + + + + +#### Returns + +`ParameterSchema &` + +#### Source + +[`include/signalwire/swaig/parameter_schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/parameter_schema.hpp) + +Line 110. + +*** + +### number + +Add a "type":"number" property (JSON number — floating point). + +**Modifiers:** `inline` + +#### Signature + +```cpp +ParameterSchema & number( + const std::string & name, + const std::string & description = "" +) +``` + +#### Parameters + + + + + +#### Returns + +`ParameterSchema &` + +#### Source + +[`include/signalwire/swaig/parameter_schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/parameter_schema.hpp) + +Line 104. + +*** + +### object\_of + +Add a nested "type":"object" property, whose properties/required come from another ParameterSchema. The nested schema is rendered via to\_json() and merged with this property's description, producing the same \{"type":"object","properties":\{...\},"required":\[...]\} a hand-written nested blob would. + +**Modifiers:** `inline` + +#### Signature + +```cpp +ParameterSchema & object_of( + const std::string & name, + const ParameterSchema & nested, + const std::string & description = "" +) +``` + +#### Parameters + + + + + + + +#### Returns + +`ParameterSchema &` + +#### Source + +[`include/signalwire/swaig/parameter_schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/parameter_schema.hpp) + +Line 179. + +*** + +### operator json + +Implicit conversion so a ParameterSchema can be passed straight to define\_tool(name, desc, schema, handler) (which takes const json&) without an explicit .to\_json(). Keeps the typed builder a drop-in for the raw-json parameter. + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +void operator json() const +``` + +#### Source + +[`include/signalwire/swaig/parameter_schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/parameter_schema.hpp) + +Line 241. + +*** + +### ParameterSchema + +#### Signature + +```cpp +void ParameterSchema() +``` + +#### Source + +[`include/signalwire/swaig/parameter_schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/parameter_schema.hpp) + +Line 91. + +*** + +### property + +Add a property from a raw, pre-built JSON-Schema fragment, for shapes the typed kinds above don't cover (custom format, minimum, oneOf, …). Keeps the builder a strict superset of the hand-written path: you can always drop down to raw json for one property without abandoning the builder for the rest. + +**Modifiers:** `inline` + +#### Signature + +```cpp +ParameterSchema & property(const std::string & name, const json & schema) +``` + +#### Parameters + + + + + +#### Returns + +`ParameterSchema &` + +#### Source + +[`include/signalwire/swaig/parameter_schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/parameter_schema.hpp) + +Line 195. + +*** + +### require + +Append a single name to the required list (additive variant). + +**Modifiers:** `inline` + +#### Signature + +```cpp +ParameterSchema & require(const std::string & name) +``` + +#### Parameters + + + +#### Returns + +`ParameterSchema &` + +#### Source + +[`include/signalwire/swaig/parameter_schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/parameter_schema.hpp) + +Line 211. + +*** + +### required + +Mark one or more declared properties as required. Replaces any previously-set required list (call once with the full set, mirroring the single "required":\[...] array in the hand-written form). + +**Modifiers:** `inline` + +#### Signature + +```cpp +ParameterSchema & required(const std::vector< std::string > & names) +``` + +#### Parameters + + + +#### Returns + +`ParameterSchema &` + +#### Source + +[`include/signalwire/swaig/parameter_schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/parameter_schema.hpp) + +Line 205. + +*** + +### size + +Number of declared properties. + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +std::size_t size() const +``` + +#### Returns + +`std::size_t` + +#### Source + +[`include/signalwire/swaig/parameter_schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/parameter_schema.hpp) + +Line 249. + +*** + +### string + +Add a "type":"string" property. + +**Modifiers:** `inline` + +#### Signature + +```cpp +ParameterSchema & string( + const std::string & name, + const std::string & description = "" +) +``` + +#### Parameters + + + + + +#### Returns + +`ParameterSchema &` + +#### Source + +[`include/signalwire/swaig/parameter_schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/parameter_schema.hpp) + +Line 98. + +*** + +### to\_json + +Render to the wire json: a JSON-Schema object with properties and (when any were marked) required. BYTE-IDENTICAL to the equivalent hand-written json::object(\{\{"type","object"\},\{"properties",\{...\}\}, \{"required",\[...]\}\}). +\[\[nodiscard]]: the rendered schema is the builder's whole output; discarding it discards the build. + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json to_json() const +``` + +#### Returns + +`json` + +#### Source + +[`include/signalwire/swaig/parameter_schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/parameter_schema.hpp) + +Line 225. + +## Source + +[`include/signalwire/swaig/parameter_schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/parameter_schema.hpp) + +Line 89. diff --git a/fern/products/sdk-reference/cpp/agents/swaig/tool-definition/index.mdx b/fern/products/sdk-reference/cpp/agents/swaig/tool-definition/index.mdx new file mode 100644 index 0000000000..d2df9cb468 --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/swaig/tool-definition/index.mdx @@ -0,0 +1,70 @@ +--- +slug: "/reference/cpp/agents/swaig/tool-definition" +title: "ToolDefinition" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::swaig::ToolDefinition" + parent: "signalwire::swaig" + module: "agents.swaig" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/tool_definition.hpp" + visibility: "public" +--- +# `ToolDefinition` + +Definition of a SWAIG tool (function). + +## Signature + +```cpp +struct signalwire::swaig::ToolDefinition +``` + +## Properties + + + + + + + + + + + +## Methods + +### to\_swaig\_json + +Render to the SWAIG function JSON format (for inclusion in SWML) \[\[nodiscard]]: the rendered JSON is the output; discarding it is a bug. + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json to_swaig_json(const std::string & web_hook_url = "") const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/swaig/tool_definition.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/tool_definition.hpp) + +Line 24. + +## Source + +[`include/signalwire/swaig/tool_definition.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/tool_definition.hpp) + +Line 15. diff --git a/fern/products/sdk-reference/cpp/agents/swml/document/index.mdx b/fern/products/sdk-reference/cpp/agents/swml/document/index.mdx new file mode 100644 index 0000000000..e542985701 --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/swml/document/index.mdx @@ -0,0 +1,274 @@ +--- +slug: "/reference/cpp/agents/swml/document" +title: "Document" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::swml::Document" + parent: "signalwire::swml" + module: "agents.swml" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/document.hpp" + visibility: "public" +--- +# `Document` + +A complete SWML document with version and sections. + +## Signature + +```cpp +class signalwire::swml::Document +``` + +## Methods + +### add\_verb + +Add a verb to the main section. + +**Modifiers:** `inline` + +#### Signature + +```cpp +Document & add_verb(const std::string & verb_name, const json & params) +``` + +#### Parameters + + + + + +#### Returns + +`Document &` + +#### Source + +[`include/signalwire/swml/document.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/document.hpp) + +Line 81. + +*** + +### add\_verb\_to\_section + +Add a verb to a specific section. + +**Modifiers:** `inline` + +#### Signature + +```cpp +Document & add_verb_to_section( + const std::string & section_name, + const std::string & verb_name, + const json & params +) +``` + +#### Parameters + + + + + + + +#### Returns + +`Document &` + +#### Source + +[`include/signalwire/swml/document.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/document.hpp) + +Line 87. + +*** + +### Document + +**Modifiers:** `inline` + +#### Signature + +```cpp +void Document() +``` + +#### Source + +[`include/signalwire/swml/document.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/document.hpp) + +Line 55. + +*** + +### has\_section + +Check if a section exists. + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +bool has_section(const std::string & name) const +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/swml/document.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/document.hpp) + +Line 95. + +*** + +### main + +Get the main section. + +**Modifiers:** `inline` + +#### Signature + +```cpp +Section & main() +``` + +#### Returns + +`Section &` + +#### Source + +[`include/signalwire/swml/document.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/document.hpp) + +Line 76. + +*** + +### section + +Get or create a section by name. + +**Modifiers:** `inline` + +#### Signature + +```cpp +Section & section(const std::string & name) +``` + +#### Parameters + + + +#### Returns + +`Section &` + +#### Source + +[`include/signalwire/swml/document.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/document.hpp) + +Line 66. + +*** + +### set\_version + +Set the document version. + +**Modifiers:** `inline` + +#### Signature + +```cpp +Document & set_version(const std::string & version) +``` + +#### Parameters + + + +#### Returns + +`Document &` + +#### Source + +[`include/signalwire/swml/document.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/document.hpp) + +Line 60. + +*** + +### to\_json + +Render to JSON. + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json to_json() const +``` + +#### Returns + +`json` + +#### Source + +[`include/signalwire/swml/document.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/document.hpp) + +Line 100. + +*** + +### to\_string + +Render to JSON string. + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +std::string to_string(int indent = -1) const +``` + +#### Parameters + + + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/swml/document.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/document.hpp) + +Line 124. + +## Source + +[`include/signalwire/swml/document.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/document.hpp) + +Line 53. diff --git a/fern/products/sdk-reference/cpp/agents/swml/index.mdx b/fern/products/sdk-reference/cpp/agents/swml/index.mdx new file mode 100644 index 0000000000..e8c1f84a09 --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/swml/index.mdx @@ -0,0 +1,97 @@ +--- +slug: "/reference/cpp/agents/swml" +title: "swml" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "module" + language: "cpp" + qualified_name: "signalwire::swml" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/document.hpp" +--- +# `swml` + +## Signature + +```cpp +namespace signalwire::swml +``` + +## Constants + + + +## Classes + + + + A complete SWML document with version and sections. + + + + Schema loader that extracts verb definitions from schema.json. + + + + A named section containing an ordered list of verbs. + + + + Base SWML service providing HTTP server, auth, and verb methods. Also hosts SWAIG functions: any Service (sidecar, non-agent verb host) can register tools and serve them on /swaig without subclassing AgentBase. + + + + Represents a single SWML verb instance, e.g. \{"answer": \{"max\_duration": 3600\}\}. + + + + Represents a verb definition extracted from the SWML schema. + + + +## Functions + +### get\_embedded\_schema + +Get the embedded schema JSON string. + +#### Signature + +```cpp +const std::string & get_embedded_schema() +``` + +#### Returns + +`const std::string &` + +#### Source + +[`src/swml/schema.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/swml/schema.cpp) + +Line 52. + +## Type Aliases + +### json + +#### Signature + +```cpp +typedef nlohmann::json json +``` + +#### Source + +[`include/signalwire/swml/document.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/document.hpp) + +Line 12. + +## Source + +[`include/signalwire/swml/document.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/document.hpp) + +Line 10. diff --git a/fern/products/sdk-reference/cpp/agents/swml/schema/index.mdx b/fern/products/sdk-reference/cpp/agents/swml/schema/index.mdx new file mode 100644 index 0000000000..712d29ae12 --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/swml/schema/index.mdx @@ -0,0 +1,220 @@ +--- +slug: "/reference/cpp/agents/swml/schema" +title: "Schema" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::swml::Schema" + parent: "signalwire::swml" + module: "agents.swml" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/schema.hpp" + visibility: "public" +--- +# `Schema` + +Schema loader that extracts verb definitions from schema.json. + +## Signature + +```cpp +class signalwire::swml::Schema +``` + +## Methods + +### find\_verb + +Get a specific verb definition by verb name. + +**Modifiers:** `const` + +#### Signature + +```cpp +const VerbDefinition * find_verb(const std::string & verb_name) const +``` + +#### Parameters + + + +#### Returns + +`const VerbDefinition *` + +#### Source + +[`include/signalwire/swml/schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/schema.hpp) + +Line 41. + +*** + +### load\_embedded + +Load the embedded schema. + +#### Signature + +```cpp +bool load_embedded() +``` + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/swml/schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/schema.hpp) + +Line 35. + +*** + +### load\_from\_file + +Load schema from a file path. + +#### Signature + +```cpp +bool load_from_file(const std::string & path) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/swml/schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/schema.hpp) + +Line 32. + +*** + +### load\_from\_string + +Load schema from a JSON string. + +#### Signature + +```cpp +bool load_from_string(const std::string & schema_json) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/swml/schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/schema.hpp) + +Line 29. + +*** + +### raw + +Get the raw schema JSON. + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const json & raw() const +``` + +#### Returns + +`const json &` + +#### Source + +[`include/signalwire/swml/schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/schema.hpp) + +Line 47. + +*** + +### Schema + +#### Signature + +```cpp +void Schema() +``` + +#### Source + +[`include/signalwire/swml/schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/schema.hpp) + +Line 24. + +*** + +### verb\_definitions + +Get all verb definitions. + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::vector< VerbDefinition > & verb_definitions() const +``` + +#### Returns + +`const std::vector< VerbDefinition > &` + +#### Source + +[`include/signalwire/swml/schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/schema.hpp) + +Line 38. + +*** + +### verb\_names + +Get all verb names. + +**Modifiers:** `const` + +#### Signature + +```cpp +std::vector< std::string > verb_names() const +``` + +#### Returns + +`std::vector< std::string >` + +#### Source + +[`include/signalwire/swml/schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/schema.hpp) + +Line 44. + +## Source + +[`include/signalwire/swml/schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/schema.hpp) + +Line 22. diff --git a/fern/products/sdk-reference/cpp/agents/swml/section/index.mdx b/fern/products/sdk-reference/cpp/agents/swml/section/index.mdx new file mode 100644 index 0000000000..271793a8cc --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/swml/section/index.mdx @@ -0,0 +1,126 @@ +--- +slug: "/reference/cpp/agents/swml/section" +title: "Section" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::swml::Section" + parent: "signalwire::swml" + module: "agents.swml" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/document.hpp" + visibility: "public" +--- +# `Section` + +A named section containing an ordered list of verbs. + +## Signature + +```cpp +struct signalwire::swml::Section +``` + +## Properties + + + + + +## Methods + +### add\_verb + +**Modifiers:** `inline` + +#### Signature + + + + ```cpp + void add_verb(const Verb & verb) + ``` + + + + ```cpp + void add_verb(const std::string & verb_name, const json & params) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Source + +[`include/signalwire/swml/document.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/document.hpp) + +Line 35. + +*** + +### Section + +#### Signature + + + + ```cpp + void Section() + ``` + + + + ```cpp + void Section(std::string n) + ``` + + + +#### Parameters (Overload 2) + + + +#### Source + +[`include/signalwire/swml/document.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/document.hpp) + +Line 32. + +*** + +### to\_json + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json to_json() const +``` + +#### Returns + +`json` + +#### Source + +[`include/signalwire/swml/document.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/document.hpp) + +Line 43. + +## Source + +[`include/signalwire/swml/document.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/document.hpp) + +Line 28. diff --git a/fern/products/sdk-reference/cpp/agents/swml/service/index.mdx b/fern/products/sdk-reference/cpp/agents/swml/service/index.mdx new file mode 100644 index 0000000000..7fb5961bb6 --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/swml/service/index.mdx @@ -0,0 +1,2134 @@ +--- +slug: "/reference/cpp/agents/swml/service" +title: "Service" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::swml::Service" + parent: "signalwire::swml" + module: "agents.swml" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp" + visibility: "public" +--- +# `Service` + +Base SWML service providing HTTP server, auth, and verb methods. Also hosts SWAIG functions: any Service (sidecar, non-agent verb host) can register tools and serve them on /swaig without subclassing AgentBase. + +## Signature + +```cpp +class signalwire::swml::Service +``` + +## Methods + +### ~Service + +**Modifiers:** `virtual` + +#### Signature + +```cpp +void ~Service() +``` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 36. + +*** + +### add\_security\_headers + +Add security headers to response. + +**Modifiers:** `static` + +#### Signature + +```cpp +void add_security_headers(httplib::Response & res) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 275. + +*** + +### add\_verb + +#### Signature + +```cpp +Service & add_verb( + const std::string & section, + const std::string & verb_name, + const json & params +) +``` + +#### Parameters + + + + + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 131. + +*** + +### ai + +#### Signature + +```cpp +Service & ai(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 89. + +*** + +### amazon\_bedrock + +#### Signature + +```cpp +Service & amazon_bedrock(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 90. + +*** + +### answer + +#### Signature + +```cpp +Service & answer(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 88. + +*** + +### auth\_password + +Get the password for basic auth. + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::string & auth_password() const +``` + +#### Returns + +`const std::string &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 63. + +*** + +### auth\_username + +Get the username for basic auth. + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::string & auth_username() const +``` + +#### Returns + +`const std::string &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 60. + +*** + +### build\_tool\_registry\_json + +Build the introspect payload for the registered tools as a JSON string shaped like \{"tools":\[\]\}. Iterates tool\_order\_ first, falling back to map order for entries registered only via register\_swaig\_function. Stable across SDKs so the swaig-test --example CLI can parse output uniformly. Used by the SWAIG\_LIST\_TOOLS env-var path; pulled out as a separate helper so tests can assert content without invoking exit(). + +**Modifiers:** `const` + +#### Signature + +```cpp +std::string build_tool_registry_json() const +``` + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 204. + +*** + +### cond + +#### Signature + +```cpp +Service & cond(const json & params = json::array()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 91. + +*** + +### connect + +#### Signature + +```cpp +Service & connect(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 92. + +*** + +### define\_tool + +Define a SWAIG function the AI can call. + +#### Signature + + + + ```cpp + Service & define_tool( + const std::string & name, + const std::string & description, + const json & parameters, + swaig::ToolHandler handler, + bool secure = false + ) + ``` + + + + ```cpp + Service & define_tool(const swaig::ToolDefinition & tool) + ``` + + + +#### Parameters (Overload 1) + + + + + + + + + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`Service &` + +#### Returns (Overload 2) + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 156. + +*** + +### denoise + +#### Signature + +```cpp +Service & denoise(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 93. + +*** + +### detect\_machine + +#### Signature + +```cpp +Service & detect_machine(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 94. + +*** + +### document + +Get the underlying SWML document. + +**Modifiers:** `inline` + +#### Signature + + + + ```cpp + Document & document() + ``` + + + + ```cpp + const Document & document() const + ``` + + + +#### Returns (Overload 1) + +`Document &` + +#### Returns (Overload 2) + +`const Document &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 138. + +*** + +### enter\_queue + +#### Signature + +```cpp +Service & enter_queue(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 95. + +*** + +### execute + +#### Signature + +```cpp +Service & execute(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 96. + +*** + +### extract\_introspect\_payload + +Pure-string extractor: slice the JSON payload between **SWAIG\_TOOLS\_BEGIN** and **SWAIG\_TOOLS\_END** sentinels in a captured stdout. Returns empty string if either marker is missing or the order is wrong. Static so the swaig-test CLI / tests can reuse it. + +**Modifiers:** `static` + +#### Signature + +```cpp +std::string extract_introspect_payload(const std::string & stdout_capture) +``` + +#### Parameters + + + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 209. + +*** + +### generate\_random\_hex + +Generate a random hex string of given byte length. + +**Modifiers:** `static` + +#### Signature + +```cpp +std::string generate_random_hex(size_t bytes) +``` + +#### Parameters + + + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 228. + +*** + +### get\_all\_functions + +Snapshot of all registered SWAIG functions keyed by name. Returned by value so subsequent registrations don't mutate the snapshot. Python parity: ToolRegistry.get\_all\_functions. + +**Modifiers:** `const` + +#### Signature + +```cpp +std::map< std::string, swaig::ToolDefinition > get_all_functions() const +``` + +#### Returns + +`std::map< std::string, swaig::ToolDefinition >` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 190. + +*** + +### get\_basic\_auth\_credentials + +Get (user, password) — Python-canonical name. Python parity: AuthMixin.get\_basic\_auth\_credentials. + +**Modifiers:** `const` + +#### Signature + +```cpp +std::pair< std::string, std::string > get_basic_auth_credentials() const +``` + +#### Returns + +`std::pair< std::string, std::string >` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 76. + +*** + +### get\_basic\_auth\_credentials\_with\_source + +Get (user, password, source) where source is one of "provided", "environment", or "generated". Python parity: AuthMixin.get\_basic\_auth\_credentials(include\_source=True). + +**Modifiers:** `const` + +#### Signature + +```cpp +std::tuple< std::string, std::string, std::string > get_basic_auth_credentials_with_source() const +``` + +#### Returns + +`std::tuple< std::string, std::string, std::string >` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 82. + +*** + +### get\_function + +Get a registered SWAIG function definition by name. Returns nullptr when no such function is registered. Python parity: ToolRegistry.get\_function. + +**Modifiers:** `const` + +#### Signature + +```cpp +const swaig::ToolDefinition * get_function(const std::string & name) const +``` + +#### Parameters + + + +#### Returns + +`const swaig::ToolDefinition *` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 185. + +*** + +### goto\_section + +#### Signature + +```cpp +Service & goto_section(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 97. + +*** + +### handle\_swaig\_endpoint + +Handle GET/POST /swaig (lifted from AgentBase). + +#### Signature + +```cpp +void handle_swaig_endpoint( + const httplib::Request & req, + httplib::Response & res +) +``` + +#### Parameters + + + + + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 281. + +*** + +### hangup + +#### Signature + +```cpp +Service & hangup(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 98. + +*** + +### has\_function + +Whether a SWAIG function with the given name is registered. Python parity: ToolRegistry.has\_function. + +**Modifiers:** `const` + +#### Signature + +```cpp +bool has_function(const std::string & name) const +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 180. + +*** + +### has\_tool + +**Modifiers:** `const` + +#### Signature + +```cpp +bool has_tool(const std::string & name) const +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 171. + +*** + +### join\_conference + +#### Signature + +```cpp +Service & join_conference(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 99. + +*** + +### join\_room + +#### Signature + +```cpp +Service & join_room(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 100. + +*** + +### label + +#### Signature + +```cpp +Service & label(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 101. + +*** + +### list\_tool\_names + +**Modifiers:** `const` + +#### Signature + +```cpp +std::vector< std::string > list_tool_names() const +``` + +#### Returns + +`std::vector< std::string >` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 172. + +*** + +### live\_transcribe + +#### Signature + +```cpp +Service & live_transcribe(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 102. + +*** + +### live\_translate + +#### Signature + +```cpp +Service & live_translate(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 103. + +*** + +### name + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::string & name() const +``` + +#### Returns + +`const std::string &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 44. + +*** + +### on\_function\_call + +Dispatch a function call to the registered handler. Returns a FunctionResult; if the function isn't registered, returns a FunctionResult with a "Function not found" response. + +**Modifiers:** `virtual` + +#### Signature + +```cpp +swaig::FunctionResult on_function_call( + const std::string & name, + const json & args, + const json & raw_data +) +``` + +#### Parameters + + + + + + + +#### Returns + +`swaig::FunctionResult` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 167. + +*** + +### on\_render\_swml + +Override to customize SWML rendering. + +**Modifiers:** `const` `virtual` + +#### Signature + +```cpp +json on_render_swml() const +``` + +#### Returns + +`json` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 255. + +*** + +### on\_request + +Customization hook called when SWML is requested. Default delegates to on\_swml\_request and returns its result. Subclasses typically override on\_swml\_request rather than this method. +Returns std::nullopt to use the default SWML rendering, or a non-null JSON with modifications to merge into the rendered document. +Python parity: WebMixin.on\_request(request\_data, callback\_path). The Python third request argument is FastAPI-specific and intentionally not mirrored on the cross-language API. + +**Modifiers:** `virtual` + +#### Signature + +```cpp +std::optional< json > on_request( + const std::optional< json > & request_data = std::nullopt, + const std::optional< std::string > & callback_path = std::nullopt +) +``` + +#### Parameters + + + + + +#### Returns + +`std::optional< json >` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 241. + +*** + +### on\_swml\_request + +Customization point for subclasses to modify SWML based on request data. Default returns std::nullopt (no modification). +Python parity: WebMixin.on\_swml\_request(request\_data, callback\_path). + +**Modifiers:** `virtual` + +#### Signature + +```cpp +std::optional< json > on_swml_request( + const std::optional< json > & request_data = std::nullopt, + const std::optional< std::string > & callback_path = std::nullopt +) +``` + +#### Parameters + + + + + +#### Returns + +`std::optional< json >` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 249. + +*** + +### pay + +#### Signature + +```cpp +Service & pay(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 104. + +*** + +### play + +#### Signature + +```cpp +Service & play(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 105. + +*** + +### port + +Get the effective port. + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +int port() const +``` + +#### Returns + +`int` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 222. + +*** + +### prompt + +#### Signature + +```cpp +Service & prompt(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 106. + +*** + +### receive\_fax + +#### Signature + +```cpp +Service & receive_fax(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 107. + +*** + +### record + +#### Signature + +```cpp +Service & record(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 108. + +*** + +### record\_call + +#### Signature + +```cpp +Service & record_call(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 109. + +*** + +### register\_additional\_routes + +Extension point: register additional HTTP routes. AgentBase uses this to add /post\_prompt, /mcp, etc. + +**Modifiers:** `virtual` + +#### Signature + +```cpp +void register_additional_routes(httplib::Server & server) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 272. + +*** + +### register\_swaig\_function + +Register a raw SWAIG function definition (e.g. DataMap tools). + +#### Signature + +```cpp +Service & register_swaig_function(const json & func_def) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 162. + +*** + +### remove\_function + +Remove a registered SWAIG function. Returns true when the function was found and removed; false when it wasn't registered. Python parity: ToolRegistry.remove\_function. + +#### Signature + +```cpp +bool remove_function(const std::string & name) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 195. + +*** + +### render\_main\_swml + +Extension point: render the SWML document for the main path or for GET /swaig. Default returns the currently-built Document. AgentBase overrides to emit prompt + AI verb at request time. + +**Modifiers:** `const` `virtual` + +#### Signature + +```cpp +json render_main_swml(const httplib::Request & req) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 260. + +*** + +### render\_swml + +Render the SWML document to JSON. + +**Modifiers:** `const` + +#### Signature + +```cpp +json render_swml() const +``` + +#### Returns + +`json` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 149. + +*** + +### request + +#### Signature + +```cpp +Service & request(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 110. + +*** + +### return\_section + +#### Signature + +```cpp +Service & return_section(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 111. + +*** + +### route + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::string & route() const +``` + +#### Returns + +`const std::string &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 48. + +*** + +### schema\_utils + +SchemaUtils helper bound to this Service. Mirrors Python's self.schema\_utils instance attribute on SWMLService. Built lazily on first access; the underlying schema is cached so the helper is cheap to build. + +#### Signature + + + + ```cpp + signalwire::utils::SchemaUtils & schema_utils() + ``` + + + + ```cpp + const signalwire::utils::SchemaUtils & schema_utils() const + ``` + + + +#### Returns (Overload 1) + +`signalwire::utils::SchemaUtils &` + +#### Returns (Overload 2) + +`const signalwire::utils::SchemaUtils &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 145. + +*** + +### send\_digits + +#### Signature + +```cpp +Service & send_digits(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 112. + +*** + +### send\_fax + +#### Signature + +```cpp +Service & send_fax(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 113. + +*** + +### send\_sms + +#### Signature + +```cpp +Service & send_sms(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 114. + +*** + +### serve + +Start the HTTP server (blocking). + +#### Signature + +```cpp +void serve() +``` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 216. + +*** + +### Service + +#### Signature + +```cpp +void Service() +``` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 35. + +*** + +### set + +#### Signature + +```cpp +Service & set(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 115. + +*** + +### set\_auth + +Set basic auth credentials (auto-generated if not set). + +#### Signature + +```cpp +Service & set_auth(const std::string & username, const std::string & password) +``` + +#### Parameters + + + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 57. + +*** + +### set\_host + +Set the host to bind to. + +#### Signature + +```cpp +Service & set_host(const std::string & host) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 51. + +*** + +### set\_name + +Set the service name (default: "service"). + +#### Signature + +```cpp +Service & set_name(const std::string & name) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 43. + +*** + +### set\_port + +Set the port to listen on. + +#### Signature + +```cpp +Service & set_port(int port) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 54. + +*** + +### set\_route + +Set the route path for this service (default: "/"). + +#### Signature + +```cpp +Service & set_route(const std::string & route) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 47. + +*** + +### setup\_routes + +#### Signature + +```cpp +void setup_routes(httplib::Server & server) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 304. + +*** + +### sip\_refer + +#### Signature + +```cpp +Service & sip_refer(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 117. + +*** + +### sleep + +#### Signature + +```cpp +Service & sleep(int milliseconds) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 116. + +*** + +### stop + +Stop the HTTP server. + +#### Signature + +```cpp +void stop() +``` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 219. + +*** + +### stop\_denoise + +#### Signature + +```cpp +Service & stop_denoise(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 118. + +*** + +### stop\_record\_call + +#### Signature + +```cpp +Service & stop_record_call(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 119. + +*** + +### stop\_tap + +#### Signature + +```cpp +Service & stop_tap(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 120. + +*** + +### swaig\_pre\_dispatch + +Extension point: invoked between argument parsing and function dispatch on POST /swaig. Returns a target Service\* (defaults to this) and an optional short-circuit JSON. If short\_circuit is non-null, it's returned as the SWAIG response without calling on\_function\_call. AgentBase overrides for token validation. + +**Modifiers:** `virtual` + +#### Signature + +```cpp +std::pair< Service *, std::optional< json > > swaig_pre_dispatch( + const json & request_data, + const std::string & func_name +) +``` + +#### Parameters + + + + + +#### Returns + +`std::pair< Service *, std::optional< json > >` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 268. + +*** + +### switch\_section + +#### Signature + +```cpp +Service & switch_section(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 121. + +*** + +### tap + +#### Signature + +```cpp +Service & tap(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 122. + +*** + +### timing\_safe\_compare + +Timing-safe string comparison using CRYPTO\_memcmp. + +**Modifiers:** `static` + +#### Signature + +```cpp +bool timing_safe_compare(const std::string & a, const std::string & b) +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 225. + +*** + +### transfer + +#### Signature + +```cpp +Service & transfer(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 123. + +*** + +### unset + +#### Signature + +```cpp +Service & unset(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 124. + +*** + +### user\_event + +#### Signature + +```cpp +Service & user_event(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Service &` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 125. + +*** + +### validate\_auth + +Validate basic auth from a request; returns true if valid. + +**Modifiers:** `const` + +#### Signature + +```cpp +bool validate_auth(const httplib::Request & req, httplib::Response & res) const +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 278. + +*** + +### validate\_basic\_auth + +Validate provided basic-auth credentials against the configured ones using a constant-time comparison. Python parity: AuthMixin.validate\_basic\_auth(username, password). + +**Modifiers:** `const` + +#### Signature + +```cpp +bool validate_basic_auth( + const std::string & username, + const std::string & password +) const +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 72. + +## Source + +[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) + +Line 33. diff --git a/fern/products/sdk-reference/cpp/agents/swml/verb-definition/index.mdx b/fern/products/sdk-reference/cpp/agents/swml/verb-definition/index.mdx new file mode 100644 index 0000000000..e89ba06ba9 --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/swml/verb-definition/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/cpp/agents/swml/verb-definition" +title: "VerbDefinition" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::swml::VerbDefinition" + parent: "signalwire::swml" + module: "agents.swml" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/schema.hpp" + visibility: "public" +--- +# `VerbDefinition` + +Represents a verb definition extracted from the SWML schema. + +## Signature + +```cpp +struct signalwire::swml::VerbDefinition +``` + +## Properties + + + + + + + + + +## Source + +[`include/signalwire/swml/schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/schema.hpp) + +Line 14. diff --git a/fern/products/sdk-reference/cpp/agents/swml/verb/index.mdx b/fern/products/sdk-reference/cpp/agents/swml/verb/index.mdx new file mode 100644 index 0000000000..cabb3bb8b0 --- /dev/null +++ b/fern/products/sdk-reference/cpp/agents/swml/verb/index.mdx @@ -0,0 +1,90 @@ +--- +slug: "/reference/cpp/agents/swml/verb" +title: "Verb" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::swml::Verb" + parent: "signalwire::swml" + module: "agents.swml" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/document.hpp" + visibility: "public" +--- +# `Verb` + +Represents a single SWML verb instance, e.g. \{"answer": \{"max\_duration": 3600\}\}. + +## Signature + +```cpp +struct signalwire::swml::Verb +``` + +## Properties + + + + + +## Methods + +### to\_json + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json to_json() const +``` + +#### Returns + +`json` + +#### Source + +[`include/signalwire/swml/document.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/document.hpp) + +Line 22. + +*** + +### Verb + +#### Signature + + + + ```cpp + void Verb() + ``` + + + + ```cpp + void Verb(std::string n, json p) + ``` + + + +#### Parameters (Overload 2) + + + + + +#### Source + +[`include/signalwire/swml/document.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/document.hpp) + +Line 19. + +## Source + +[`include/signalwire/swml/document.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/document.hpp) + +Line 15. diff --git a/fern/products/sdk-reference/cpp/c-tool-context/index.mdx b/fern/products/sdk-reference/cpp/c-tool-context/index.mdx deleted file mode 100644 index 6fdedff726..0000000000 --- a/fern/products/sdk-reference/cpp/c-tool-context/index.mdx +++ /dev/null @@ -1,32 +0,0 @@ ---- -slug: "/reference/cpp/c-tool-context" -title: "CToolContext" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "CToolContext" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/c_api/signalwire_c.cpp" - visibility: "public" ---- -# `CToolContext` - -## Signature - -```cpp -struct CToolContext -``` - -## Properties - - - - - -## Source - -[`src/c_api/signalwire_c.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/c_api/signalwire_c.cpp) - -Line 83. diff --git a/fern/products/sdk-reference/cpp/core/core/index.mdx b/fern/products/sdk-reference/cpp/core/core/index.mdx new file mode 100644 index 0000000000..6337f0394b --- /dev/null +++ b/fern/products/sdk-reference/cpp/core/core/index.mdx @@ -0,0 +1,33 @@ +--- +slug: "/reference/cpp/core/core" +title: "core" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "module" + language: "cpp" + qualified_name: "signalwire::core" + parent: "core" + module: "core" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/core/logging_config.hpp" +--- +# `core` + +## Signature + +```cpp +namespace signalwire::core +``` + +## Modules + + + + + +## Source + +[`include/signalwire/core/logging_config.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/core/logging_config.hpp) + +Line 11. diff --git a/fern/products/sdk-reference/cpp/core/core/logging-config/index.mdx b/fern/products/sdk-reference/cpp/core/core/logging-config/index.mdx new file mode 100644 index 0000000000..e695ba751d --- /dev/null +++ b/fern/products/sdk-reference/cpp/core/core/logging-config/index.mdx @@ -0,0 +1,58 @@ +--- +slug: "/reference/cpp/core/core/logging-config" +title: "logging_config" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "module" + language: "cpp" + qualified_name: "signalwire::core::logging_config" + parent: "signalwire::core" + module: "core.core" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/core/logging_config.hpp" +--- +# `logging_config` + +## Signature + +```cpp +namespace signalwire::core::logging_config +``` + +## Functions + +### get\_execution\_mode + +Cross-language SDK contract for serverless / deployment-mode detection. +Mirrors signalwire.core.logging\_config.get\_execution\_mode in the Python reference. Order of precedence (FIRST match wins): + +GATEWAY\_INTERFACE -> "cgi" +AWS\_LAMBDA\_FUNCTION\_NAME or LAMBDA\_TASK\_ROOT -> "lambda" +FUNCTION\_TARGET, K\_SERVICE, or GOOGLE\_CLOUD\_PROJECT -> "google\_cloud\_function" +AZURE\_FUNCTIONS\_ENVIRONMENT, FUNCTIONS\_WORKER\_RUNTIME, or AzureWebJobsStorage -> "azure\_function" +otherwise -> "server" + +The detected mode as a canonical lower-case string. One of "cgi", "lambda", "google\_cloud\_function", "azure\_function", or "server". + +#### Signature + +```cpp +std::string get_execution_mode() +``` + +#### Returns + +`std::string` — The detected mode as a canonical lower-case string. One of "cgi", "lambda", "google\_cloud\_function", "azure\_function", or "server". + +#### Source + +[`src/core/logging_config.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/core/logging_config.cpp) + +Line 24. + +## Source + +[`include/signalwire/core/logging_config.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/core/logging_config.hpp) + +Line 12. diff --git a/fern/products/sdk-reference/cpp/core/index.mdx b/fern/products/sdk-reference/cpp/core/index.mdx new file mode 100644 index 0000000000..a0ff2e28d1 --- /dev/null +++ b/fern/products/sdk-reference/cpp/core/index.mdx @@ -0,0 +1,24 @@ +--- +slug: "/reference/cpp/core" +title: "core" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "module" + language: "cpp" + qualified_name: "core" +--- +# `core` + +## Modules + + + + + + + + + + diff --git a/fern/products/sdk-reference/cpp/core/logging/index.mdx b/fern/products/sdk-reference/cpp/core/logging/index.mdx new file mode 100644 index 0000000000..888cb0ee0b --- /dev/null +++ b/fern/products/sdk-reference/cpp/core/logging/index.mdx @@ -0,0 +1,109 @@ +--- +slug: "/reference/cpp/core/logging" +title: "logging" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "module" + language: "cpp" + qualified_name: "signalwire::logging" + parent: "core" + module: "core" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging/logger.hpp" +--- +# `logging` + +## Signature + +```cpp +namespace signalwire::logging +``` + +## Classes + + + + + +## Functions + +### get\_log\_level + +**Modifiers:** `inline` + +#### Signature + +```cpp +LogLevel get_log_level() +``` + +#### Returns + +`LogLevel` + +#### Source + +[`include/signalwire/logging/logger.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging/logger.hpp) + +Line 15. + +*** + +### get\_logger + +**Modifiers:** `inline` + +#### Signature + +```cpp +Logger get_logger(const std::string & name) +``` + +#### Parameters + + + +#### Returns + +`Logger` + +#### Source + +[`include/signalwire/logging/logger.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging/logger.hpp) + +Line 56. + +## Enums + +### LogLevel + +#### Signature + +```cpp +enum class LogLevel +``` + +#### Variants + + + + + + + + + + + +#### Source + +[`include/signalwire/logging/logger.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging/logger.hpp) + +Line 13. + +## Source + +[`include/signalwire/logging/logger.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging/logger.hpp) + +Line 11. diff --git a/fern/products/sdk-reference/cpp/core/logging/logger/index.mdx b/fern/products/sdk-reference/cpp/core/logging/logger/index.mdx new file mode 100644 index 0000000000..6515520653 --- /dev/null +++ b/fern/products/sdk-reference/cpp/core/logging/logger/index.mdx @@ -0,0 +1,138 @@ +--- +slug: "/reference/cpp/core/logging/logger" +title: "Logger" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::logging::Logger" + parent: "signalwire::logging" + module: "core.logging" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging/logger.hpp" + visibility: "public" +--- +# `Logger` + +## Signature + +```cpp +class signalwire::logging::Logger +``` + +## Methods + +### debug + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +void debug(std::string_view msg) const +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/logging/logger.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging/logger.hpp) + +Line 35. + +*** + +### error + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +void error(std::string_view msg) const +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/logging/logger.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging/logger.hpp) + +Line 47. + +*** + +### info + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +void info(std::string_view msg) const +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/logging/logger.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging/logger.hpp) + +Line 39. + +*** + +### Logger + +**Modifiers:** `explicit` `inline` + +#### Signature + +```cpp +void Logger(const std::string & name) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/logging/logger.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging/logger.hpp) + +Line 29. + +*** + +### warn + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +void warn(std::string_view msg) const +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/logging/logger.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging/logger.hpp) + +Line 43. + +## Source + +[`include/signalwire/logging/logger.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging/logger.hpp) + +Line 27. diff --git a/fern/products/sdk-reference/cpp/core/security/index.mdx b/fern/products/sdk-reference/cpp/core/security/index.mdx new file mode 100644 index 0000000000..193e8ecb05 --- /dev/null +++ b/fern/products/sdk-reference/cpp/core/security/index.mdx @@ -0,0 +1,283 @@ +--- +slug: "/reference/cpp/core/security" +title: "security" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "module" + language: "cpp" + qualified_name: "signalwire::security" + parent: "core" + module: "core" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/security/session_manager.hpp" +--- +# `security` + +## Signature + +```cpp +namespace signalwire::security +``` + +## Classes + + + + Manages HMAC-SHA256 based session tokens for secure SWAIG tool calls. Token format: base64(functionName:callID:expiryTimestamp) + "." + hex(hmac\_signature) + + + + Optional knobs for WrapWithSignatureValidation. trust\_proxy controls whether X-Forwarded-Proto / X-Forwarded-Host headers are honored when reconstructing the public URL — opt-in because proxy headers are spoofable. proxy\_url\_base is consulted before the proxy headers and is meant for SWML\_PROXY\_URL\_BASE callers. + + + +## Functions + +### ValidateRequest + +Legacy @signalwire/compatibility-api drop-in entry point. +If params\_or\_raw\_body holds a std::string, delegates to ValidateWebhookSignature (Scheme A then Scheme B with parsed form). +If it holds a FormParams, treats it as pre-parsed form params and runs Scheme B directly (with URL port normalization). + +std::invalid\_argument + +when signing\_key is empty. + +#### Signature + +```cpp +bool ValidateRequest( + std::string_view signing_key, + std::string_view signature, + std::string_view url, + const ParamsOrBody & params_or_raw_body +) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`bool` + +#### Throws + +- `std::invalid_argument` — when signing\_key is empty. + +#### Source + +[`src/security/webhook_validator.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/security/webhook_validator.cpp) + +Line 457. + +*** + +### ValidateWebhookSignature + +Validate a SignalWire webhook signature against both schemes. +Tries Scheme A (hex JSON) first; on miss falls back to Scheme B (base64 form) with URL port normalization, repeated-key handling, and optional ?bodySHA256= body-hash check for JSON bodies on the compat surface. + +signing\_key + +The customer's Signing Key. UTF-8 string. MUST NOT be empty — empty throws std::invalid\_argument, that's a programming error not a validation failure. + +signature + +The X-SignalWire-Signature header value (or the legacy X-Twilio-Signature alias). Empty returns false without throwing. + +url + +Full URL SignalWire POSTed to (scheme, host, optional port, path, query) — must match what the platform saw, see the URL-reconstruction section of porting-sdk/webhooks.md. + +raw\_body + +Raw request body bytes as a UTF-8 string, BEFORE any JSON / form parsing. Re-serialized JSON breaks Scheme A. + +true if either scheme matches; false otherwise. + +std::invalid\_argument + +when signing\_key is empty. + +#### Signature + +```cpp +bool ValidateWebhookSignature( + std::string_view signing_key, + std::string_view signature, + std::string_view url, + std::string_view raw_body +) +``` + +#### Parameters + + + The customer's Signing Key. UTF-8 string. MUST NOT be empty — empty throws std::invalid\_argument, that's a programming error not a validation failure. + + + + The X-SignalWire-Signature header value (or the legacy X-Twilio-Signature alias). Empty returns false without throwing. + + + + Full URL SignalWire POSTed to (scheme, host, optional port, path, query) — must match what the platform saw, see the URL-reconstruction section of porting-sdk/webhooks.md. + + + + Raw request body bytes as a UTF-8 string, BEFORE any JSON / form parsing. Re-serialized JSON breaks Scheme A. + + +#### Returns + +`bool` — true if either scheme matches; false otherwise. + +#### Throws + +- `std::invalid_argument` — when signing\_key is empty. + +#### Source + +[`src/security/webhook_validator.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/security/webhook_validator.cpp) + +Line 406. + +*** + +### WrapWithSignatureValidation + +Wrap a downstream cpp-httplib POST handler with SignalWire webhook signature validation. +Behavior: + +Read req.body (cpp-httplib has already buffered it). +Pull X-SignalWire-Signature (or the X-Twilio-Signature legacy alias) from headers. +Reconstruct the public URL the platform POSTed to (proxy-aware). +Call ValidateWebhookSignature. +On invalid / missing signature: respond 403 Forbidden with no body detail. The downstream handler is NOT called. Per the porting-sdk spec, the validator MUST NOT log which branch failed or the expected signature. +On valid: call downstream(req, res). The handler can read req.body directly — cpp-httplib buffers it for repeat reads. + +signing\_key + +Customer's Signing Key (SignalWire Dashboard → API Credentials). MUST NOT be empty — empty throws std::invalid\_argument at wrap time, that's a programming error not a runtime failure. + +downstream + +Handler to invoke on a valid signature. + +opts + +Optional URL reconstruction knobs. + +A handler suitable for server.Post(path, handler). + +std::invalid\_argument + +if signing\_key is empty. + +#### Signature + +```cpp +HttpHandler WrapWithSignatureValidation( + std::string_view signing_key, + HttpHandler downstream, + WebhookValidatorOptions opts = {} +) +``` + +#### Parameters + + + Customer's Signing Key (SignalWire Dashboard → API Credentials). MUST NOT be empty — empty throws std::invalid\_argument at wrap time, that's a programming error not a runtime failure. + + + + Handler to invoke on a valid signature. + + + + Optional URL reconstruction knobs. + + +#### Returns + +`HttpHandler` — A handler suitable for server.Post(path, handler). + +#### Throws + +- `std::invalid_argument` — if signing\_key is empty. + +#### Source + +[`src/security/webhook_middleware.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/security/webhook_middleware.cpp) + +Line 107. + +## Type Aliases + +### FormParams + +Pre-parsed form parameters for ValidateRequest: ordered list of (key, list-of-values) tuples. Repeated keys are represented as one entry whose values vector holds each occurrence in submission order. +Used as one alternative in ParamsOrBody; the other alternative is the raw body string. + +#### Signature + +```cpp +typedef std::vector< std::pair< std::string, std::vector< std::string > > > FormParams +``` + +#### Source + +[`include/signalwire/security/webhook_validator.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/security/webhook_validator.hpp) + +Line 32. + +*** + +### HttpHandler + +A cpp-httplib handler signature, lifted into a typedef so the adapter stays framework-agnostic at the call site (the only deps needed by this header are a forward declaration of httplib::Request/Response). + +#### Signature + +```cpp +typedef std::function< void(const httplib::Request &, httplib::Response &)> HttpHandler +``` + +#### Source + +[`include/signalwire/security/webhook_middleware.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/security/webhook_middleware.hpp) + +Line 19. + +*** + +### ParamsOrBody + +Drop-in shape for ValidateRequest mirroring @signalwire/compatibility-api's RestClient.validateRequest: either a raw body string (delegates to the combined validator) or a pre-parsed form-params list (runs Scheme B directly). + +#### Signature + +```cpp +typedef std::variant< std::string, FormParams > ParamsOrBody +``` + +#### Source + +[`include/signalwire/security/webhook_validator.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/security/webhook_validator.hpp) + +Line 38. + +## Source + +[`include/signalwire/security/session_manager.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/security/session_manager.hpp) + +Line 10. diff --git a/fern/products/sdk-reference/cpp/core/security/session-manager/index.mdx b/fern/products/sdk-reference/cpp/core/security/session-manager/index.mdx new file mode 100644 index 0000000000..70f1ef28ed --- /dev/null +++ b/fern/products/sdk-reference/cpp/core/security/session-manager/index.mdx @@ -0,0 +1,207 @@ +--- +slug: "/reference/cpp/core/security/session-manager" +title: "SessionManager" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::security::SessionManager" + parent: "signalwire::security" + module: "core.security" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/security/session_manager.hpp" + visibility: "public" +--- +# `SessionManager` + +Manages HMAC-SHA256 based session tokens for secure SWAIG tool calls. +Token format: base64(functionName:callID:expiryTimestamp) + "." + hex(hmac\_signature) + +## Signature + +```cpp +class signalwire::security::SessionManager +``` + +## Methods + +### create\_token + +Create a signed token for a function call + +function\_name + +The SWAIG function name + +call\_id + +The call identifier + +expiry\_seconds + +Seconds until expiry (default 3600) + +The signed token string + +**Modifiers:** `const` + +#### Signature + +```cpp +std::string create_token( + const std::string & function_name, + const std::string & call_id, + int expiry_seconds = 3600 +) const +``` + +#### Parameters + + + The SWAIG function name + + + + The call identifier + + + + Seconds until expiry (default 3600) + + +#### Returns + +`std::string` — The signed token string + +#### Source + +[`include/signalwire/security/session_manager.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/security/session_manager.hpp) + +Line 28. + +*** + +### SessionManager + +Construct with a random 32-byte secret. + +#### Signature + + + + ```cpp + void SessionManager() + ``` + + + + ```cpp + void SessionManager(const std::vector< uint8_t > & secret) + ``` + + + +#### Parameters (Overload 2) + + + +#### Source + +[`include/signalwire/security/session_manager.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/security/session_manager.hpp) + +Line 18. + +*** + +### timing\_safe\_compare + +Timing-safe comparison of two byte sequences. + +**Modifiers:** `static` + +#### Signature + +```cpp +bool timing_safe_compare(const std::string & a, const std::string & b) +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/security/session_manager.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/security/session_manager.hpp) + +Line 47. + +*** + +### validate\_token + +Validate a token + +token + +The token to validate + +function\_name + +Expected function name + +call\_id + +Expected call ID + +true if token is valid and not expired + +All three params are consumed read-only (parsed/compared, never stored), so they take std::string\_view — consistent with the webhook\_validator entry points in this module. \[\[nodiscard]]: the validity result is the reason to call it. + +**Modifiers:** `const` + +#### Signature + +```cpp +bool validate_token( + std::string_view token, + std::string_view function_name, + std::string_view call_id +) const +``` + +#### Parameters + + + The token to validate + + + + Expected function name + + + + Expected call ID + + +#### Returns + +`bool` — true if token is valid and not expired + +#### Source + +[`include/signalwire/security/session_manager.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/security/session_manager.hpp) + +Line 42. + +## Source + +[`include/signalwire/security/session_manager.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/security/session_manager.hpp) + +Line 15. diff --git a/fern/products/sdk-reference/cpp/core/security/webhook-validator-options/index.mdx b/fern/products/sdk-reference/cpp/core/security/webhook-validator-options/index.mdx new file mode 100644 index 0000000000..5a277c2f1b --- /dev/null +++ b/fern/products/sdk-reference/cpp/core/security/webhook-validator-options/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/cpp/core/security/webhook-validator-options" +title: "WebhookValidatorOptions" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::security::WebhookValidatorOptions" + parent: "signalwire::security" + module: "core.security" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/security/webhook_middleware.hpp" + visibility: "public" +--- +# `WebhookValidatorOptions` + +Optional knobs for WrapWithSignatureValidation. trust\_proxy controls whether X-Forwarded-Proto / X-Forwarded-Host headers are honored when reconstructing the public URL — opt-in because proxy headers are spoofable. proxy\_url\_base is consulted before the proxy headers and is meant for SWML\_PROXY\_URL\_BASE callers. + +## Signature + +```cpp +struct signalwire::security::WebhookValidatorOptions +``` + +## Properties + + + Optional base URL (e.g. https://abcd.ngrok.io) joined with the request path + query when reconstructing the URL. Wins over proxy headers and request.host. + + + + If true, honor X-Forwarded-Proto / X-Forwarded-Host when reconstructing the URL. Default false. + + +## Source + +[`include/signalwire/security/webhook_middleware.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/security/webhook_middleware.hpp) + +Line 26. diff --git a/fern/products/sdk-reference/cpp/core/utils/index.mdx b/fern/products/sdk-reference/cpp/core/utils/index.mdx new file mode 100644 index 0000000000..88d97482fe --- /dev/null +++ b/fern/products/sdk-reference/cpp/core/utils/index.mdx @@ -0,0 +1,89 @@ +--- +slug: "/reference/cpp/core/utils" +title: "utils" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "module" + language: "cpp" + qualified_name: "signalwire::utils" + parent: "core" + module: "core" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/schema_utils.hpp" +--- +# `utils` + +## Signature + +```cpp +namespace signalwire::utils +``` + +## Classes + + + + SchemaUtils — C++ port of signalwire.utils.schema\_utils.SchemaUtils. + + + + SchemaValidationError — C++ port of signalwire.utils.schema\_utils.SchemaValidationError. + + + + Verb metadata extracted from the schema. + + + +## Modules + + + + + +## Functions + +### is\_serverless\_mode + +Cross-language SDK contract: signalwire.utils.is\_serverless\_mode returns true whenever the SDK is running inside any short-lived / event-driven invocation environment (anything other than "server"). +Mirrors signalwire.utils.is\_serverless\_mode in the Python reference. +true unless the detected mode is "server". + +#### Signature + +```cpp +bool is_serverless_mode() +``` + +#### Returns + +`bool` — true unless the detected mode is "server". + +#### Source + +[`src/utils/serverless.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/utils/serverless.cpp) + +Line 13. + +## Type Aliases + +### json + +#### Signature + +```cpp +typedef nlohmann::json json +``` + +#### Source + +[`include/signalwire/utils/schema_utils.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/schema_utils.hpp) + +Line 30. + +## Source + +[`include/signalwire/utils/schema_utils.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/schema_utils.hpp) + +Line 28. diff --git a/fern/products/sdk-reference/cpp/core/utils/schema-utils/index.mdx b/fern/products/sdk-reference/cpp/core/utils/schema-utils/index.mdx new file mode 100644 index 0000000000..c589c6df0b --- /dev/null +++ b/fern/products/sdk-reference/cpp/core/utils/schema-utils/index.mdx @@ -0,0 +1,332 @@ +--- +slug: "/reference/cpp/core/utils/schema-utils" +title: "SchemaUtils" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::utils::SchemaUtils" + parent: "signalwire::utils" + module: "core.utils" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/schema_utils.hpp" + visibility: "public" +--- +# `SchemaUtils` + +SchemaUtils — C++ port of signalwire.utils.schema\_utils.SchemaUtils. + +## Signature + +```cpp +class signalwire::utils::SchemaUtils +``` + +## Methods + +### full\_validation\_available + +Whether full JSON Schema validation is wired up. Mirrors Python's full\_validation\_available property. + +**Modifiers:** `const` + +#### Signature + +```cpp +bool full_validation_available() const +``` + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/utils/schema_utils.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/schema_utils.hpp) + +Line 69. + +*** + +### generate\_method\_body + +Generate a Python-style method body string for a verb. Mirrors Python's generate\_method\_body(verb\_name). + +**Modifiers:** `const` + +#### Signature + +```cpp +std::string generate_method_body(const std::string & verb_name) const +``` + +#### Parameters + + + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/utils/schema_utils.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/schema_utils.hpp) + +Line 109. + +*** + +### generate\_method\_signature + +Generate a Python-style method signature string for a verb. Mirrors Python's generate\_method\_signature(verb\_name). + +**Modifiers:** `const` + +#### Signature + +```cpp +std::string generate_method_signature(const std::string & verb_name) const +``` + +#### Parameters + + + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/utils/schema_utils.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/schema_utils.hpp) + +Line 105. + +*** + +### get\_all\_verb\_names + +Sorted list of all known verb names. Mirrors Python's get\_all\_verb\_names(). + +**Modifiers:** `const` + +#### Signature + +```cpp +std::vector< std::string > get_all_verb_names() const +``` + +#### Returns + +`std::vector< std::string >` + +#### Source + +[`include/signalwire/utils/schema_utils.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/schema_utils.hpp) + +Line 76. + +*** + +### get\_verb\_parameters + +Parameter-definition block used by code-gen tooling. Mirrors Python's get\_verb\_parameters(verb\_name). + +**Modifiers:** `const` + +#### Signature + +```cpp +json get_verb_parameters(const std::string & verb_name) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/utils/schema_utils.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/schema_utils.hpp) + +Line 88. + +*** + +### get\_verb\_properties + +The properties\[verb\_name] block for a verb, or empty when unknown. Mirrors Python's get\_verb\_properties(verb\_name). + +**Modifiers:** `const` + +#### Signature + +```cpp +json get_verb_properties(const std::string & verb_name) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/utils/schema_utils.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/schema_utils.hpp) + +Line 80. + +*** + +### get\_verb\_required\_properties + +The required list for a verb, or empty when unknown / not specified. Mirrors Python's get\_verb\_required\_properties(verb\_name). + +**Modifiers:** `const` + +#### Signature + +```cpp +std::vector< std::string > get_verb_required_properties( + const std::string & verb_name +) const +``` + +#### Parameters + + + +#### Returns + +`std::vector< std::string >` + +#### Source + +[`include/signalwire/utils/schema_utils.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/schema_utils.hpp) + +Line 84. + +*** + +### load\_schema + +Read and parse the JSON Schema. Mirrors Python's load\_schema(). + +#### Signature + +```cpp +json load_schema() +``` + +#### Returns + +`json` + +#### Source + +[`include/signalwire/utils/schema_utils.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/schema_utils.hpp) + +Line 72. + +*** + +### SchemaUtils + +Construct a SchemaUtils. Mirrors Python's SchemaUtils(schema\_path=None, schema\_validation=True). Pass schema\_path = "" to use the embedded schema. + +#### Signature + +```cpp +void SchemaUtils( + const std::string & schema_path = "", + bool schema_validation = true +) +``` + +#### Parameters + + + + + +#### Source + +[`include/signalwire/utils/schema_utils.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/schema_utils.hpp) + +Line 65. + +*** + +### validate\_document + +Validate a complete SWML document. Mirrors Python's validate\_document(document). Returns (false, \["Schema validator not initialized"]) when no full validator is wired in. + +**Modifiers:** `const` + +#### Signature + +```cpp +std::pair< bool, std::vector< std::string > > validate_document( + const json & document +) const +``` + +#### Parameters + + + +#### Returns + +`std::pair< bool, std::vector< std::string > >` + +#### Source + +[`include/signalwire/utils/schema_utils.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/schema_utils.hpp) + +Line 101. + +*** + +### validate\_verb + +Validate a verb config against the schema. Mirrors Python's validate\_verb(verb\_name, verb\_config). Returns (valid, errors) — Python's Tuple\[bool, List\[str]]. + +**Modifiers:** `const` + +#### Signature + +```cpp +std::pair< bool, std::vector< std::string > > validate_verb( + const std::string & verb_name, + const json & verb_config +) const +``` + +#### Parameters + + + + + +#### Returns + +`std::pair< bool, std::vector< std::string > >` + +#### Source + +[`include/signalwire/utils/schema_utils.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/schema_utils.hpp) + +Line 94. + +## Source + +[`include/signalwire/utils/schema_utils.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/schema_utils.hpp) + +Line 60. diff --git a/fern/products/sdk-reference/cpp/core/utils/schema-validation-error/index.mdx b/fern/products/sdk-reference/cpp/core/utils/schema-validation-error/index.mdx new file mode 100644 index 0000000000..12fbb4654a --- /dev/null +++ b/fern/products/sdk-reference/cpp/core/utils/schema-validation-error/index.mdx @@ -0,0 +1,105 @@ +--- +slug: "/reference/cpp/core/utils/schema-validation-error" +title: "SchemaValidationError" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::utils::SchemaValidationError" + parent: "signalwire::utils" + module: "core.utils" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/schema_utils.hpp" + visibility: "public" +--- +# `SchemaValidationError` + +SchemaValidationError — C++ port of signalwire.utils.schema\_utils.SchemaValidationError. + +## Signature + +```cpp +class signalwire::utils::SchemaValidationError : std::runtime_error +``` + +## Inheritance + +**Extends:** `std::runtime_error` + +## Methods + +### errors + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::vector< std::string > & errors() const +``` + +#### Returns + +`const std::vector< std::string > &` + +#### Source + +[`include/signalwire/utils/schema_utils.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/schema_utils.hpp) + +Line 42. + +*** + +### SchemaValidationError + +**Modifiers:** `inline` + +#### Signature + +```cpp +void SchemaValidationError( + std::string verb_name, + std::vector< std::string > errors +) +``` + +#### Parameters + + + + + +#### Source + +[`include/signalwire/utils/schema_utils.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/schema_utils.hpp) + +Line 36. + +*** + +### verb\_name + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::string & verb_name() const +``` + +#### Returns + +`const std::string &` + +#### Source + +[`include/signalwire/utils/schema_utils.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/schema_utils.hpp) + +Line 41. + +## Source + +[`include/signalwire/utils/schema_utils.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/schema_utils.hpp) + +Line 34. diff --git a/fern/products/sdk-reference/cpp/core/utils/url-validator/index.mdx b/fern/products/sdk-reference/cpp/core/utils/url-validator/index.mdx new file mode 100644 index 0000000000..56434106c6 --- /dev/null +++ b/fern/products/sdk-reference/cpp/core/utils/url-validator/index.mdx @@ -0,0 +1,117 @@ +--- +slug: "/reference/cpp/core/utils/url-validator" +title: "url_validator" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "module" + language: "cpp" + qualified_name: "signalwire::utils::url_validator" + parent: "signalwire::utils" + module: "core.utils" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/url_validator.hpp" +--- +# `url_validator` + +## Signature + +```cpp +namespace signalwire::utils::url_validator +``` + +## Constants + + + Cross-port SSRF block list. Order matches the Python reference for ease of cross-language review. + + +## Functions + +### \_set\_resolver + +Install a custom resolver (for tests). Pass nullptr to clear. + +#### Signature + +```cpp +void _set_resolver(ResolverFn resolver) +``` + +#### Parameters + + + +#### Source + +[`src/utils/url_validator.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/utils/url_validator.cpp) + +Line 185. + +*** + +### validate\_url + +Validate that a URL is safe to fetch. +Mirrors Python's signalwire.utils.url\_validator.validate\_url(url, allow\_private=False) -> bool. + +url + +URL to validate. + +allow\_private + +When true, bypass the IP-blocklist check. + +True iff the URL is safe to fetch. + +#### Signature + +```cpp +bool validate_url(const std::string & url, bool allow_private = false) +``` + +#### Parameters + + + URL to validate. + + + + When true, bypass the IP-blocklist check. + + +#### Returns + +`bool` — True iff the URL is safe to fetch. + +#### Source + +[`src/utils/url_validator.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/utils/url_validator.cpp) + +Line 189. + +## Type Aliases + +### ResolverFn + +Pluggable resolver. Tests inject a callable to keep the suite hermetic; production resolves via getaddrinfo. Returns nullopt on resolution failure. +The signature: function(hostname) -> optional\> of IP-string addresses. + +#### Signature + +```cpp +typedef std::function< std::optional< std::vector< std::string > >(const std::string &)> ResolverFn +``` + +#### Source + +[`include/signalwire/utils/url_validator.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/url_validator.hpp) + +Line 32. + +## Source + +[`include/signalwire/utils/url_validator.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/url_validator.hpp) + +Line 16. diff --git a/fern/products/sdk-reference/cpp/core/utils/verb-info/index.mdx b/fern/products/sdk-reference/cpp/core/utils/verb-info/index.mdx new file mode 100644 index 0000000000..c37e17c299 --- /dev/null +++ b/fern/products/sdk-reference/cpp/core/utils/verb-info/index.mdx @@ -0,0 +1,38 @@ +--- +slug: "/reference/cpp/core/utils/verb-info" +title: "VerbInfo" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::utils::VerbInfo" + parent: "signalwire::utils" + module: "core.utils" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/schema_utils.hpp" + visibility: "public" +--- +# `VerbInfo` + +Verb metadata extracted from the schema. + +## Signature + +```cpp +struct signalwire::utils::VerbInfo +``` + +## Properties + + + + + + + +## Source + +[`include/signalwire/utils/schema_utils.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/schema_utils.hpp) + +Line 52. diff --git a/fern/products/sdk-reference/cpp/httplib/index.mdx b/fern/products/sdk-reference/cpp/httplib/index.mdx deleted file mode 100644 index 4c296aa8b8..0000000000 --- a/fern/products/sdk-reference/cpp/httplib/index.mdx +++ /dev/null @@ -1,25 +0,0 @@ ---- -slug: "/reference/cpp/httplib" -title: "httplib" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "module" - language: "cpp" - qualified_name: "httplib" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp" ---- -# `httplib` - -## Signature - -```cpp -namespace httplib -``` - -## Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 27. diff --git a/fern/products/sdk-reference/cpp/index.mdx b/fern/products/sdk-reference/cpp/index.mdx index 22a0855cc4..65d6e494d6 100644 --- a/fern/products/sdk-reference/cpp/index.mdx +++ b/fern/products/sdk-reference/cpp/index.mdx @@ -10,8 +10,9 @@ lustri: ## Modules -- [`httplib`](/docs/sdk-reference/reference/cpp/httplib) -- [`ix`](/docs/sdk-reference/reference/cpp/ix) +- [`agents`](/docs/sdk-reference/reference/cpp/agents) +- [`core`](/docs/sdk-reference/reference/cpp/core) +- [`relay`](/docs/sdk-reference/reference/cpp/relay) +- [`rest`](/docs/sdk-reference/reference/cpp/rest) - [`signalwire`](/docs/sdk-reference/reference/cpp/signalwire) -- [`std`](/docs/sdk-reference/reference/cpp/std) diff --git a/fern/products/sdk-reference/cpp/ix/index.mdx b/fern/products/sdk-reference/cpp/ix/index.mdx deleted file mode 100644 index 3c39a0c71b..0000000000 --- a/fern/products/sdk-reference/cpp/ix/index.mdx +++ /dev/null @@ -1,25 +0,0 @@ ---- -slug: "/reference/cpp/ix" -title: "ix" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "module" - language: "cpp" - qualified_name: "ix" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/websocket.hpp" ---- -# `ix` - -## Signature - -```cpp -namespace ix -``` - -## Source - -[`include/signalwire/relay/websocket.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/websocket.hpp) - -Line 15. diff --git a/fern/products/sdk-reference/cpp/relay/action/index.mdx b/fern/products/sdk-reference/cpp/relay/action/index.mdx new file mode 100644 index 0000000000..96b6155efc --- /dev/null +++ b/fern/products/sdk-reference/cpp/relay/action/index.mdx @@ -0,0 +1,640 @@ +--- +slug: "/reference/cpp/relay/action" +title: "Action" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::relay::Action" + parent: "signalwire::relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp" + visibility: "public" +--- +# `Action` + +Represents a controllable in-progress operation (play, record, collect, etc.) Uses shared internal state so the object can be copied/moved freely while maintaining a single underlying condition\_variable for synchronization. + +## Signature + +```cpp +class signalwire::relay::Action +``` + +## Methods + +### Action + +#### Signature + + + + ```cpp + void Action() + ``` + + + + ```cpp + void Action(const std::string & control_id) + ``` + + + + ```cpp + void Action( + const std::string & control_id, + RelayClient * client, + const std::string & call_id, + const std::string & node_id + ) + ``` + + + +#### Parameters (Overload 2) + + + +#### Parameters (Overload 3) + + + + + + + + + +#### Source + +[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) + +Line 27. + +*** + +### call\_id + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::string & call_id() const +``` + +#### Returns + +`const std::string &` + +#### Source + +[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) + +Line 36. + +*** + +### completed + +**Modifiers:** `const` + +#### Signature + +```cpp +bool completed() const +``` + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) + +Line 34. + +*** + +### control\_id + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::string & control_id() const +``` + +#### Returns + +`const std::string &` + +#### Source + +[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) + +Line 32. + +*** + +### event\_type\_filter + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::vector< std::string > & event_type_filter() const +``` + +#### Returns + +`const std::vector< std::string > &` + +#### Source + +[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) + +Line 56. + +*** + +### event\_type\_matches + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +bool event_type_matches(const std::string & event_type) const +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) + +Line 59. + +*** + +### method\_prefix + +Method prefix used for sub-command frames (stop/pause/resume/...). Defaults to "calling.play"; set explicitly when an Action is built for a different verb (record, collect, detect, ...). The Call::execute\_action factory plumbs this through. + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::string & method_prefix() const +``` + +#### Returns + +`const std::string &` + +#### Source + +[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) + +Line 43. + +*** + +### node\_id + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::string & node_id() const +``` + +#### Returns + +`const std::string &` + +#### Source + +[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) + +Line 37. + +*** + +### on\_completed + +Set a callback to fire when the action completes. + +#### Signature + +```cpp +void on_completed(CompletedCallback cb) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) + +Line 112. + +*** + +### pause + +Request the server to pause this action. extra\_params may carry e.g. \{"behavior": "continuous"\} for record-side pause. + +#### Signature + +```cpp +void pause(const json & extra_params = json::object()) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) + +Line 98. + +*** + +### resolve + +Resolve the action immediately (used for call-gone scenarios). + +#### Signature + +```cpp +void resolve( + const std::string & final_state = "finished", + const json & result = json::object() +) +``` + +#### Parameters + + + + + +#### Source + +[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) + +Line 118. + +*** + +### resolve\_on\_detect + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +bool resolve_on_detect() const +``` + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) + +Line 74. + +*** + +### resolve\_on\_result + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +bool resolve_on_result() const +``` + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) + +Line 82. + +*** + +### result + +**Modifiers:** `const` + +#### Signature + +```cpp +const json & result() const +``` + +#### Returns + +`const json &` + +#### Source + +[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) + +Line 35. + +*** + +### resume + +Request the server to resume this action. + +#### Signature + +```cpp +void resume() +``` + +#### Source + +[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) + +Line 101. + +*** + +### set\_event\_type\_filter + +Set the wire-event types the Action should accept state updates from. Empty (the default) means "match any component event whose +control\_id matches this Action". Used by play\_and\_collect to listen on calling.call.collect only — a calling.call.play(finished) must NOT resolve a play\_and\_collect action. + +**Modifiers:** `inline` + +#### Signature + +```cpp +void set_event_type_filter(const std::vector< std::string > & types) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) + +Line 53. + +*** + +### set\_method\_prefix + +**Modifiers:** `inline` + +#### Signature + +```cpp +void set_method_prefix(const std::string & prefix) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) + +Line 44. + +*** + +### set\_resolve\_on\_detect + +Detect actions resolve on the first event carrying a detect payload, not on a state(finished) — see Python's DetectAction. When this flag is set the action's update\_state path resolves only when params.detect is present. + +**Modifiers:** `inline` + +#### Signature + +```cpp +void set_resolve_on_detect(bool flag) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) + +Line 71. + +*** + +### set\_resolve\_on\_result + +Collect actions resolve when an event carries a result payload. A play(finished) earlier in the timeline does NOT resolve a CollectAction — see Python's CollectAction terminal-event logic. + +**Modifiers:** `inline` + +#### Signature + +```cpp +void set_resolve_on_result(bool flag) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) + +Line 79. + +*** + +### start\_input\_timers + +Start the inter-digit / final-digit timers on a collect. The matching Python method is StandaloneCollectAction.start\_input\_timers. + +#### Signature + +```cpp +void start_input_timers() +``` + +#### Source + +[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) + +Line 109. + +*** + +### state + +**Modifiers:** `const` + +#### Signature + +```cpp +const std::string & state() const +``` + +#### Returns + +`const std::string &` + +#### Source + +[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) + +Line 33. + +*** + +### stop + +Request the server to stop this action. Routes to \.stop so an Action returned by record() sends calling.record.stop rather than calling.play.stop. + +#### Signature + +```cpp +void stop() +``` + +#### Source + +[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) + +Line 93. + +*** + +### update\_state + +Update internal state (called by Call/Client when events arrive). + +#### Signature + +```cpp +void update_state( + const std::string & new_state, + const json & result = json::object() +) +``` + +#### Parameters + + + + + +#### Source + +[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) + +Line 115. + +*** + +### volume + +Adjust playback volume (play only). The frame body carries the supplied amount in dB; positive boosts, negative attenuates. + +#### Signature + +```cpp +void volume(double amount) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) + +Line 105. + +*** + +### wait + +Block until the action completes or times out. \[\[nodiscard]]: the bool tells you whether the action actually completed vs. timed out — dropping it (then treating the action as done) is a bug. + +#### Signature + +```cpp +bool wait(int timeout_ms = 0) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) + +Line 88. + +## Type Aliases + +### CompletedCallback + +#### Signature + +```cpp +typedef std::function< void(const Action &)> CompletedCallback +``` + +#### Source + +[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) + +Line 25. + +## Source + +[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) + +Line 23. diff --git a/fern/products/sdk-reference/cpp/relay/call-event/index.mdx b/fern/products/sdk-reference/cpp/relay/call-event/index.mdx new file mode 100644 index 0000000000..fc2d40eb63 --- /dev/null +++ b/fern/products/sdk-reference/cpp/relay/call-event/index.mdx @@ -0,0 +1,72 @@ +--- +slug: "/reference/cpp/relay/call-event" +title: "CallEvent" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::relay::CallEvent" + parent: "signalwire::relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/relay_event.hpp" + visibility: "public" +--- +# `CallEvent` + +Call-specific event parsed from calling.call.state and other call events. + +## Signature + +```cpp +struct signalwire::relay::CallEvent : signalwire::relay::RelayEvent +``` + +## Inheritance + +**Extends:** [signalwire::relay::RelayEvent](/docs/sdk-reference/reference/cpp/relay/relay-event) + +## Properties + + + + + + + + + + + +## Methods + +### from\_relay\_event + +**Modifiers:** `static` `inline` + +#### Signature + +```cpp +CallEvent from_relay_event(const RelayEvent & ev) +``` + +#### Parameters + + + +#### Returns + +`CallEvent` + +#### Source + +[`include/signalwire/relay/relay_event.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/relay_event.hpp) + +Line 46. + +## Source + +[`include/signalwire/relay/relay_event.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/relay_event.hpp) + +Line 39. diff --git a/fern/products/sdk-reference/cpp/relay/call/index.mdx b/fern/products/sdk-reference/cpp/relay/call/index.mdx new file mode 100644 index 0000000000..ecddc91a40 --- /dev/null +++ b/fern/products/sdk-reference/cpp/relay/call/index.mdx @@ -0,0 +1,1761 @@ +--- +slug: "/reference/cpp/relay/call" +title: "Call" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::relay::Call" + parent: "signalwire::relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp" + visibility: "public" +--- +# `Call` + +Represents a live call with methods for call control. Uses shared internal state so the object can be copied/returned by value. All command methods send JSON-RPC requests through the RelayClient. + +## Signature + +```cpp +class signalwire::relay::Call +``` + +## Methods + +### ai + +#### Signature + +```cpp +Action ai(const json & params, const std::string & control_id = "") +``` + +#### Parameters + + + + + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 144. + +*** + +### answer + +#### Signature + +```cpp +Action answer() +``` + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 60. + +*** + +### Call + +#### Signature + + + + ```cpp + void Call() + ``` + + + + ```cpp + void Call(const std::string & call_id, const std::string & node_id) + ``` + + + + ```cpp + void Call( + const std::string & call_id, + const std::string & node_id, + RelayClient * client + ) + ``` + + + +#### Parameters (Overload 2) + + + + + +#### Parameters (Overload 3) + + + + + + + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 35. + +*** + +### call\_id + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::string & call_id() const +``` + +#### Returns + +`const std::string &` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 40. + +*** + +### call\_state + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +std::optional< CallState > call_state() const +``` + +#### Returns + +`std::optional< CallState >` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 48. + +*** + +### collect + +#### Signature + +```cpp +Action collect(const json & params, const std::string & control_id = "") +``` + +#### Parameters + + + + + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 116. + +*** + +### connect + +#### Signature + +```cpp +Action connect(const json & devices) +``` + +#### Parameters + + + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 118. + +*** + +### detect + +#### Signature + +```cpp +Action detect(const json & params, const std::string & control_id = "") +``` + +#### Parameters + + + + + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 120. + +*** + +### detect\_answering\_machine + +#### Signature + +```cpp +Action detect_answering_machine( + const json & amd_params = json::object(), + double timeout = -1.0 +) +``` + +#### Parameters + + + + + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 130. + +*** + +### detect\_digit + +#### Signature + +```cpp +Action detect_digit(const std::string & digits = "", double timeout = -1.0) +``` + +#### Parameters + + + + + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 129. + +*** + +### detect\_fax + +#### Signature + +```cpp +Action detect_fax(const std::string & tone = "", double timeout = -1.0) +``` + +#### Parameters + + + + + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 132. + +*** + +### direction + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::string & direction() const +``` + +#### Returns + +`const std::string &` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 51. + +*** + +### disconnect + +#### Signature + +```cpp +Action disconnect() +``` + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 119. + +*** + +### dispatch\_event + +#### Signature + +```cpp +void dispatch_event(const CallEvent & ev) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 190. + +*** + +### execute\_swml + +#### Signature + +```cpp +Action execute_swml(const json & swml) +``` + +#### Parameters + + + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 159. + +*** + +### find\_action + +#### Signature + +```cpp +Action * find_action(const std::string & control_id) +``` + +#### Parameters + + + +#### Returns + +`Action *` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 195. + +*** + +### from + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::string & from() const +``` + +#### Returns + +`const std::string &` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 52. + +*** + +### hangup + +#### Signature + +```cpp +Action hangup(const std::string & reason = "hangup") +``` + +#### Parameters + + + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 61. + +*** + +### hold + +#### Signature + +```cpp +Action hold() +``` + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 154. + +*** + +### is\_answered + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +bool is_answered() const +``` + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 56. + +*** + +### is\_ended + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +bool is_ended() const +``` + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 57. + +*** + +### join\_conference + +#### Signature + +```cpp +Action join_conference( + const std::string & name, + const json & params = json::object() +) +``` + +#### Parameters + + + + + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 157. + +*** + +### join\_room + +#### Signature + +```cpp +Action join_room(const std::string & name) +``` + +#### Parameters + + + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 158. + +*** + +### live\_transcribe + +#### Signature + +```cpp +Action live_transcribe(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 140. + +*** + +### live\_translate + +#### Signature + +```cpp +Action live_translate(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 143. + +*** + +### node\_id + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::string & node_id() const +``` + +#### Returns + +`const std::string &` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 41. + +*** + +### on\_event + +#### Signature + +```cpp +void on_event(CallEventHandler handler) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 162. + +*** + +### pay + +#### Signature + +```cpp +Action pay(const json & params, const std::string & control_id = "") +``` + +#### Parameters + + + + + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 146. + +*** + +### play + +#### Signature + +```cpp +Action play( + const json & media, + double volume = 0.0, + const std::string & control_id = "" +) +``` + +#### Parameters + + + + + + + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 62. + +*** + +### play\_and\_collect + +#### Signature + +```cpp +Action play_and_collect( + const json & play_media, + const json & collect_params, + const std::string & control_id = "" +) +``` + +#### Parameters + + + + + + + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 95. + +*** + +### play\_audio + +#### Signature + +```cpp +Action play_audio(const std::string & url, double volume = 0.0) +``` + +#### Parameters + + + + + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 85. + +*** + +### play\_ringtone + +#### Signature + +```cpp +Action play_ringtone( + const std::string & name, + double duration = -1.0, + double volume = 0.0 +) +``` + +#### Parameters + + + + + + + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 87. + +*** + +### play\_silence + +#### Signature + +```cpp +Action play_silence(double duration) +``` + +#### Parameters + + + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 86. + +*** + +### play\_tts + +#### Signature + + + + ```cpp + Action play_tts( + const std::string & text, + const std::string & language = "", + const std::string & gender = "", + const std::string & voice = "", + double volume = 0.0 + ) + ``` + + + + ```cpp + Action play_tts( + const std::string & text, + const std::string & language, + Gender gender, + const std::string & voice = "", + double volume = 0.0 + ) + ``` + + + +#### Parameters (Overload 1) + + + + + + + + + + + +#### Parameters (Overload 2) + + + + + + + + + + + +#### Returns (Overload 1) + +`Action` + +#### Returns (Overload 2) + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 69. + +*** + +### prompt + +#### Signature + +```cpp +Action prompt( + const json & play_media, + const json & collect_params, + const std::string & control_id = "" +) +``` + +#### Parameters + + + + + + + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 93. + +*** + +### prompt\_audio + +#### Signature + +```cpp +Action prompt_audio( + const std::string & url, + const json & collect, + double volume = 0.0 +) +``` + +#### Parameters + + + + + + + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 114. + +*** + +### prompt\_tts + +#### Signature + + + + ```cpp + Action prompt_tts( + const std::string & text, + const json & collect, + const std::string & language = "", + const std::string & gender = "", + const std::string & voice = "", + double volume = 0.0 + ) + ``` + + + + ```cpp + Action prompt_tts( + const std::string & text, + const json & collect, + const std::string & language, + Gender gender, + const std::string & voice = "", + double volume = 0.0 + ) + ``` + + + +#### Parameters (Overload 1) + + + + + + + + + + + + + +#### Parameters (Overload 2) + + + + + + + + + + + + + +#### Returns (Overload 1) + +`Action` + +#### Returns (Overload 2) + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 100. + +*** + +### receive\_fax + +#### Signature + +```cpp +Action receive_fax(const std::string & control_id = "") +``` + +#### Parameters + + + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 151. + +*** + +### record + +#### Signature + +```cpp +Action record( + const json & params = json::object(), + const std::string & control_id = "" +) +``` + +#### Parameters + + + + + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 90. + +*** + +### record\_call + +#### Signature + +```cpp +Action record_call(const json & params = json::object()) +``` + +#### Parameters + + + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 92. + +*** + +### register\_action + +#### Signature + +```cpp +void register_action(const std::string & control_id, Action * action) +``` + +#### Parameters + + + + + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 193. + +*** + +### resolve\_all\_actions + +#### Signature + +```cpp +void resolve_all_actions(const std::string & final_state = "finished") +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 198. + +*** + +### send\_digits + +#### Signature + +```cpp +Action send_digits(const std::string & digits) +``` + +#### Parameters + + + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 138. + +*** + +### send\_fax + +#### Signature + +```cpp +Action send_fax( + const std::string & document_url, + const std::string & header = "", + const std::string & identity = "", + const std::string & control_id = "" +) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 148. + +*** + +### set\_client + +**Modifiers:** `inline` + +#### Signature + +```cpp +void set_client(RelayClient * c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 188. + +*** + +### set\_direction + +**Modifiers:** `inline` + +#### Signature + +```cpp +void set_direction(const std::string & dir) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 184. + +*** + +### set\_from + +**Modifiers:** `inline` + +#### Signature + +```cpp +void set_from(const std::string & f) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 185. + +*** + +### set\_tag + +**Modifiers:** `inline` + +#### Signature + +```cpp +void set_tag(const std::string & t) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 187. + +*** + +### set\_to + +**Modifiers:** `inline` + +#### Signature + +```cpp +void set_to(const std::string & t) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 186. + +*** + +### sip\_refer + +#### Signature + +```cpp +Action sip_refer(const std::string & to_uri) +``` + +#### Parameters + + + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 156. + +*** + +### state + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::string & state() const +``` + +#### Returns + +`const std::string &` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 42. + +*** + +### stop\_tap + +#### Signature + +```cpp +Action stop_tap(const std::string & control_id) +``` + +#### Parameters + + + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 137. + +*** + +### stream + +#### Signature + +```cpp +Action stream(const json & params, const std::string & control_id = "") +``` + +#### Parameters + + + + + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 152. + +*** + +### tag + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::string & tag() const +``` + +#### Returns + +`const std::string &` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 54. + +*** + +### tap + +#### Signature + +```cpp +Action tap(const json & params, const std::string & control_id = "") +``` + +#### Parameters + + + + + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 135. + +*** + +### tap\_audio + +#### Signature + +```cpp +Action tap_audio(const json & params, const std::string & control_id = "") +``` + +#### Parameters + + + + + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 133. + +*** + +### to + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::string & to() const +``` + +#### Returns + +`const std::string &` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 53. + +*** + +### transcribe + +#### Signature + +```cpp +Action transcribe( + const json & params = json::object(), + const std::string & control_id = "" +) +``` + +#### Parameters + + + + + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 141. + +*** + +### transfer + +#### Signature + +```cpp +Action transfer(const json & params) +``` + +#### Parameters + + + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 139. + +*** + +### unhold + +#### Signature + +```cpp +Action unhold() +``` + +#### Returns + +`Action` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 155. + +*** + +### unregister\_action + +#### Signature + +```cpp +void unregister_action(const std::string & control_id) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 194. + +*** + +### update\_state + +#### Signature + +```cpp +void update_state(const std::string & new_state) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 183. + +*** + +### wait\_for\_answered + +#### Signature + +```cpp +bool wait_for_answered(int timeout_ms = 0) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 178. + +*** + +### wait\_for\_ended + +#### Signature + +```cpp +bool wait_for_ended(int timeout_ms = 0) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 166. + +*** + +### wait\_for\_ending + +#### Signature + +```cpp +bool wait_for_ending(int timeout_ms = 0) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 180. + +*** + +### wait\_for\_ringing + +#### Signature + +```cpp +bool wait_for_ringing(int timeout_ms = 0) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 179. + +## Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 33. diff --git a/fern/products/sdk-reference/cpp/relay/component-event/index.mdx b/fern/products/sdk-reference/cpp/relay/component-event/index.mdx new file mode 100644 index 0000000000..ad6349d129 --- /dev/null +++ b/fern/products/sdk-reference/cpp/relay/component-event/index.mdx @@ -0,0 +1,68 @@ +--- +slug: "/reference/cpp/relay/component-event" +title: "ComponentEvent" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::relay::ComponentEvent" + parent: "signalwire::relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/relay_event.hpp" + visibility: "public" +--- +# `ComponentEvent` + +Play/Record/Collect component event with control\_id for action routing. + +## Signature + +```cpp +struct signalwire::relay::ComponentEvent : signalwire::relay::RelayEvent +``` + +## Inheritance + +**Extends:** [signalwire::relay::RelayEvent](/docs/sdk-reference/reference/cpp/relay/relay-event) + +## Properties + + + + + + + +## Methods + +### from\_relay\_event + +**Modifiers:** `static` `inline` + +#### Signature + +```cpp +ComponentEvent from_relay_event(const RelayEvent & ev) +``` + +#### Parameters + + + +#### Returns + +`ComponentEvent` + +#### Source + +[`include/signalwire/relay/relay_event.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/relay_event.hpp) + +Line 72. + +## Source + +[`include/signalwire/relay/relay_event.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/relay_event.hpp) + +Line 67. diff --git a/fern/products/sdk-reference/cpp/relay/device/index.mdx b/fern/products/sdk-reference/cpp/relay/device/index.mdx new file mode 100644 index 0000000000..8015d6671d --- /dev/null +++ b/fern/products/sdk-reference/cpp/relay/device/index.mdx @@ -0,0 +1,94 @@ +--- +slug: "/reference/cpp/relay/device" +title: "Device" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::relay::Device" + parent: "signalwire::relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/device.hpp" + visibility: "public" +--- +# `Device` + +## Signature + +```cpp +struct signalwire::relay::Device +``` + +## Properties + + + Type-specific parameters (e.g. \{"to\_number","from\_number"\} for "phone"). Free json map — the wire schema is additionalProperties:true. + + + + REQUIRED endpoint-type discriminant. Open set (not schema-enumerated) → kept a std::string. Common values: "phone", "sip", "webrtc". + + +## Methods + +### Device + +#### Signature + + + + ```cpp + void Device() + ``` + + + + ```cpp + void Device(std::string type_, json params_ = json::object()) + ``` + + + +#### Parameters (Overload 2) + + + + + +#### Source + +[`include/signalwire/relay/device.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/device.hpp) + +Line 40. + +*** + +### to\_json + +Serialize to the exact RELAY device wire shape: \{"type":..,"params":..\}. Byte-identical to the hand-written map the raw-json call sites build. + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json to_json() const +``` + +#### Returns + +`json` + +#### Source + +[`include/signalwire/relay/device.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/device.hpp) + +Line 46. + +## Source + +[`include/signalwire/relay/device.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/device.hpp) + +Line 32. diff --git a/fern/products/sdk-reference/cpp/relay/dial-event/index.mdx b/fern/products/sdk-reference/cpp/relay/dial-event/index.mdx new file mode 100644 index 0000000000..8e18431289 --- /dev/null +++ b/fern/products/sdk-reference/cpp/relay/dial-event/index.mdx @@ -0,0 +1,90 @@ +--- +slug: "/reference/cpp/relay/dial-event" +title: "DialEvent" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::relay::DialEvent" + parent: "signalwire::relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/relay_event.hpp" + visibility: "public" +--- +# `DialEvent` + +Dial-specific event with nested call info and tag-based correlation. + +## Signature + +```cpp +struct signalwire::relay::DialEvent : signalwire::relay::RelayEvent +``` + +## Inheritance + +**Extends:** [signalwire::relay::RelayEvent](/docs/sdk-reference/reference/cpp/relay/relay-event) + +## Properties + + + + + + + +## Methods + +### dial\_state\_enum + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +std::optional< DialState > dial_state_enum() const +``` + +#### Returns + +`std::optional< DialState >` + +#### Source + +[`include/signalwire/relay/relay_event.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/relay_event.hpp) + +Line 119. + +*** + +### from\_relay\_event + +**Modifiers:** `static` `inline` + +#### Signature + +```cpp +DialEvent from_relay_event(const RelayEvent & ev) +``` + +#### Parameters + + + +#### Returns + +`DialEvent` + +#### Source + +[`include/signalwire/relay/relay_event.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/relay_event.hpp) + +Line 123. + +## Source + +[`include/signalwire/relay/relay_event.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/relay_event.hpp) + +Line 109. diff --git a/fern/products/sdk-reference/cpp/relay/index.mdx b/fern/products/sdk-reference/cpp/relay/index.mdx new file mode 100644 index 0000000000..4ad55ae62c --- /dev/null +++ b/fern/products/sdk-reference/cpp/relay/index.mdx @@ -0,0 +1,690 @@ +--- +slug: "/reference/cpp/relay" +title: "relay" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "module" + language: "cpp" + qualified_name: "signalwire::relay" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp" +--- +# `relay` + +## Signature + +```cpp +namespace signalwire::relay +``` + +## Constants + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## Classes + + + + Represents a controllable in-progress operation (play, record, collect, etc.) Uses shared internal state so the object can be copied/moved freely while maintaining a single underlying condition\_variable for synchronization. + + + + Represents a live call with methods for call control. Uses shared internal state so the object can be copied/returned by value. All command methods send JSON-RPC requests through the RelayClient. + + + + Call-specific event parsed from calling.call.state and other call events. + + + + Play/Record/Collect component event with control\_id for action routing. + + + + + + Dial-specific event with nested call info and tag-based correlation. + + + + Represents an SMS/MMS message tracked through delivery states. States: "queued", "initiated", "sent", "delivered", "undelivered", "failed" Uses shared internal state so the object can be copied/returned by value — copies of a Message observe the same state updates as the underlying instance the registry tracks. + + + + Messaging event for SMS/MMS state changes and inbound messages. + + + + Real-time call control and messaging client over WebSocket. Implements the full JSON-RPC 2.0 protocol with four correlation mechanisms: JSON-RPC id -> pending map for RPC response matching call\_id -> Call object map for event routing control\_id -> Action per Call for action event routing tag -> pending dials map for dial event matching + + + + Configuration for the RELAY client. + + + + Base class for all RELAY events parsed from signalwire.event JSON-RPC messages. + + + + WebSocket client for the RELAY JSON-RPC transport. Wraps IXWebSocket (cross-platform, OpenSSL-backed TLS) while preserving a minimal synchronous interface: connect() blocks until the handshake completes (or fails/times out), send() pushes a text frame, and the on\_message / on\_close / on\_error callbacks are invoked from IXWebSocket's background event thread. RFC 6455 framing, ping/pong, and TLS are handled by IXWebSocket — this class only adapts its async event model to the synchronous connect() contract relay::RelayClient depends on. TLS certificate verification is ALWAYS on for the connect() (wss://) path. To trust a private/self-signed CA (e.g. the porting-sdk test CA), set the SSL\_CERT\_FILE environment variable to the CA bundle — the same cross-port idiom the other ports honor; it is wired into ix::SocketTLSOptions::caFile. When unset, the system trust store is used (production / public CAs). + + + +## Functions + +### call\_state\_from\_string + +Parse a wire string into a CallState. Returns std::nullopt for any value not in the known set (server may introduce new states) — NEVER throws. + +**Modifiers:** `inline` + +#### Signature + +```cpp +std::optional< CallState > call_state_from_string(const std::string & s) +``` + +#### Parameters + + + +#### Returns + +`std::optional< CallState >` + +#### Source + +[`include/signalwire/relay/states.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/states.hpp) + +Line 83. + +*** + +### call\_state\_value + +**Modifiers:** `inline` + +#### Signature + +```cpp +std::string call_state_value(CallState v) +``` + +#### Parameters + + + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/relay/states.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/states.hpp) + +Line 67. + +*** + +### dial\_state\_from\_string + +**Modifiers:** `inline` + +#### Signature + +```cpp +std::optional< DialState > dial_state_from_string(const std::string & s) +``` + +#### Parameters + + + +#### Returns + +`std::optional< DialState >` + +#### Source + +[`include/signalwire/relay/states.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/states.hpp) + +Line 121. + +*** + +### dial\_state\_value + +**Modifiers:** `inline` + +#### Signature + +```cpp +std::string dial_state_value(DialState v) +``` + +#### Parameters + + + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/relay/states.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/states.hpp) + +Line 110. + +*** + +### is\_terminal + +Terminal == no further transitions. For a call that is ended. + +**Modifiers:** `inline` + +#### Signature + + + + ```cpp + bool is_terminal(CallState v) + ``` + + + + ```cpp + bool is_terminal(DialState v) + ``` + + + + ```cpp + bool is_terminal(MessageState v) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + +#### Parameters (Overload 3) + + + +#### Returns (Overload 1) + +`bool` + +#### Returns (Overload 2) + +`bool` + +#### Returns (Overload 3) + +`bool` + +#### Source + +[`include/signalwire/relay/states.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/states.hpp) + +Line 93. + +*** + +### message\_state\_from\_string + +**Modifiers:** `inline` + +#### Signature + +```cpp +std::optional< MessageState > message_state_from_string(const std::string & s) +``` + +#### Parameters + + + +#### Returns + +`std::optional< MessageState >` + +#### Source + +[`include/signalwire/relay/states.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/states.hpp) + +Line 168. + +*** + +### message\_state\_value + +**Modifiers:** `inline` + +#### Signature + +```cpp +std::string message_state_value(MessageState v) +``` + +#### Parameters + + + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/relay/states.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/states.hpp) + +Line 153. + +*** + +### to\_string + +to\_string ADL overload — same wire string as call\_state\_value. + +**Modifiers:** `inline` + +#### Signature + + + + ```cpp + std::string to_string(CallState v) + ``` + + + + ```cpp + std::string to_string(DialState v) + ``` + + + + ```cpp + std::string to_string(MessageState v) + ``` + + + + ```cpp + std::string to_string(Gender gender) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + +#### Parameters (Overload 3) + + + +#### Parameters (Overload 4) + + + +#### Returns (Overload 1) + +`std::string` + +#### Returns (Overload 2) + +`std::string` + +#### Returns (Overload 3) + +`std::string` + +#### Returns (Overload 4) + +`std::string` + +#### Source + +[`include/signalwire/relay/states.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/states.hpp) + +Line 79. + +*** + +### tts\_gender\_value + +Map a Gender to its canonical wire string (the value emitted under the TTS media params' gender key). This is the single normalization point shared by the typed play\_tts / prompt\_tts overloads, so their behavior is identical to passing the bare string. + +**Modifiers:** `inline` + +#### Signature + +```cpp +std::string tts_gender_value(Gender gender) +``` + +#### Parameters + + + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/relay/tts_gender.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/tts_gender.hpp) + +Line 37. + +## Type Aliases + +### CallEventHandler + +Callback for call events. + +#### Signature + +```cpp +typedef std::function< void(const CallEvent &)> CallEventHandler +``` + +#### Source + +[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) + +Line 28. + +*** + +### EventHandler + +Generic callback for any inbound signalwire.event. Fired in addition to the typed handlers (on\_call, on\_message, action callbacks). Useful for tracing and for tests/audits that need to assert event delivery. + +#### Signature + +```cpp +typedef std::function< void(const RelayEvent &)> EventHandler +``` + +#### Source + +[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) + +Line 37. + +*** + +### InboundCallHandler + +Callback for inbound calls. + +#### Signature + +```cpp +typedef std::function< void(Call &)> InboundCallHandler +``` + +#### Source + +[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) + +Line 29. + +*** + +### InboundMessageHandler + +Callback for inbound messages. + +#### Signature + +```cpp +typedef std::function< void(const Message &)> InboundMessageHandler +``` + +#### Source + +[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) + +Line 32. + +*** + +### json + +#### Signature + +```cpp +typedef nlohmann::json json +``` + +#### Source + +[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) + +Line 16. + +## Enums + +### CallState + +Call lifecycle state. Mirrors CALL\_STATE\_\* / CALL\_STATES in relay/constants.py. Server-emitted and may grow → call\_state\_from\_string returns an optional on an unknown value. + +#### Signature + +```cpp +enum class CallState +``` + +#### Variants + + + + + + + + + + + +#### Source + +[`include/signalwire/relay/states.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/states.hpp) + +Line 59. + +*** + +### DialState + +Outbound-dial outcome state on the calling.call.dial event's dial\_state field. Grounded in RELAY\_IMPLEMENTATION\_GUIDE.md line 193: dialing (progress), answered (success), failed (all legs failed). DISTINCT from CallState — failed is dial-only; the dial RPC resolves on answered/failed. Server-emitted → dial\_state\_from\_string is optional. + +#### Signature + +```cpp +enum class DialState +``` + +#### Variants + + + + + + + +#### Source + +[`include/signalwire/relay/states.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/states.hpp) + +Line 104. + +*** + +### Gender + +TTS speaker gender as a typed, compile-time-checked closed set. +Call::play\_tts() / Call::prompt\_tts() accept this enum class OR a std::string for their gender argument. The enum gives editor autocompletion and makes a typo fail at the call site — a bare string like "femaie" only fails at runtime, on the TTS engine. The string overload keeps parity with the Python reference (which uses a bare Optional\[str]) and still allows engine-/voice-specific values that aren't one of the two canonical genders. call.play\_tts("hi", "en-US", Gender::Female); // typed, autocompleted +call.play\_tts("hi", "en-US", "female"); // string still works +call.play\_tts("hi", "en-US", "neutral"); // open set: engine value + +Members are the two canonical say\_gender values the calling/fabric OpenAPI documents (female is the default; male is the only other documented value). tts\_gender\_value() maps each member to that wire string, so the enum and string overloads emit the identical TTS frame. + +#### Signature + +```cpp +enum class Gender +``` + +#### Variants + + + + + +#### Source + +[`include/signalwire/relay/tts_gender.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/tts_gender.hpp) + +Line 28. + +*** + +### MessageState + +SMS/MMS delivery state. Mirrors MESSAGE\_STATE\_\* in relay/constants.py. Terminal set == MESSAGE\_TERMINAL\_STATES \{delivered, undelivered, failed\}. NOTE failed here is the MESSAGE failure state — NOT DialState::Failed; the two vocabularies are separate and must not be unified. Server-emitted → message\_state\_from\_string is optional. + +#### Signature + +```cpp +enum class MessageState +``` + +#### Variants + + + + + + + + + + + + + + + +#### Source + +[`include/signalwire/relay/states.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/states.hpp) + +Line 143. + +## Source + +[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) + +Line 14. diff --git a/fern/products/sdk-reference/cpp/relay/message-event/index.mdx b/fern/products/sdk-reference/cpp/relay/message-event/index.mdx new file mode 100644 index 0000000000..30f42091b4 --- /dev/null +++ b/fern/products/sdk-reference/cpp/relay/message-event/index.mdx @@ -0,0 +1,72 @@ +--- +slug: "/reference/cpp/relay/message-event" +title: "MessageEvent" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::relay::MessageEvent" + parent: "signalwire::relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/relay_event.hpp" + visibility: "public" +--- +# `MessageEvent` + +Messaging event for SMS/MMS state changes and inbound messages. + +## Signature + +```cpp +struct signalwire::relay::MessageEvent : signalwire::relay::RelayEvent +``` + +## Inheritance + +**Extends:** [signalwire::relay::RelayEvent](/docs/sdk-reference/reference/cpp/relay/relay-event) + +## Properties + + + + + + + + + + + +## Methods + +### from\_relay\_event + +**Modifiers:** `static` `inline` + +#### Signature + +```cpp +MessageEvent from_relay_event(const RelayEvent & ev) +``` + +#### Parameters + + + +#### Returns + +`MessageEvent` + +#### Source + +[`include/signalwire/relay/relay_event.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/relay_event.hpp) + +Line 93. + +## Source + +[`include/signalwire/relay/relay_event.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/relay_event.hpp) + +Line 86. diff --git a/fern/products/sdk-reference/cpp/relay/message/index.mdx b/fern/products/sdk-reference/cpp/relay/message/index.mdx new file mode 100644 index 0000000000..c2023c44f6 --- /dev/null +++ b/fern/products/sdk-reference/cpp/relay/message/index.mdx @@ -0,0 +1,404 @@ +--- +slug: "/reference/cpp/relay/message" +title: "Message" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::relay::Message" + parent: "signalwire::relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/message.hpp" + visibility: "public" +--- +# `Message` + +Represents an SMS/MMS message tracked through delivery states. States: "queued", "initiated", "sent", "delivered", "undelivered", "failed" Uses shared internal state so the object can be copied/returned by value — copies of a Message observe the same state updates as the underlying instance the registry tracks. + +## Signature + +```cpp +struct signalwire::relay::Message +``` + +## Properties + + + + + + + + + + + + + + + + + +## Methods + +### ~Message + +#### Signature + +```cpp +void ~Message() +``` + +#### Source + +[`include/signalwire/relay/message.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/message.hpp) + +Line 31. + +*** + +### from\_params + +Parse from a RELAY event params object. + +**Modifiers:** `static` + +#### Signature + +```cpp +Message from_params(const json & params) +``` + +#### Parameters + + + +#### Returns + +`Message` + +#### Source + +[`include/signalwire/relay/message.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/message.hpp) + +Line 34. + +*** + +### is\_delivered + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +bool is_delivered() const +``` + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/relay/message.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/message.hpp) + +Line 61. + +*** + +### is\_failed + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +bool is_failed() const +``` + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/relay/message.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/message.hpp) + +Line 62. + +*** + +### is\_terminal + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +bool is_terminal() const +``` + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/relay/message.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/message.hpp) + +Line 66. + +*** + +### Message + +#### Signature + + + + ```cpp + void Message() + ``` + + + + ```cpp + void Message(const Message &) + ``` + + + +#### Parameters (Overload 2) + + + +#### Source + +[`include/signalwire/relay/message.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/message.hpp) + +Line 28. + +*** + +### message\_state + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +std::optional< MessageState > message_state() const +``` + +#### Returns + +`std::optional< MessageState >` + +#### Source + +[`include/signalwire/relay/message.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/message.hpp) + +Line 54. + +*** + +### on\_completed + +Set callback for when message reaches terminal state. If the message is already terminal the callback fires immediately. + +#### Signature + +```cpp +void on_completed(CompletedCallback cb) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/relay/message.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/message.hpp) + +Line 80. + +*** + +### operator= + +#### Signature + +```cpp +Message & operator=(const Message &) +``` + +#### Parameters + + + +#### Returns + +`Message &` + +#### Source + +[`include/signalwire/relay/message.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/message.hpp) + +Line 30. + +*** + +### reason + +**Modifiers:** `const` + +#### Signature + +```cpp +const std::string & reason() const +``` + +#### Returns + +`const std::string &` + +#### Source + +[`include/signalwire/relay/message.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/message.hpp) + +Line 57. + +*** + +### set\_reason + +#### Signature + +```cpp +void set_reason(const std::string & r) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/relay/message.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/message.hpp) + +Line 59. + +*** + +### set\_state + +#### Signature + +```cpp +void set_state(const std::string & s) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/relay/message.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/message.hpp) + +Line 58. + +*** + +### state + +**Modifiers:** `const` + +#### Signature + +```cpp +const std::string & state() const +``` + +#### Returns + +`const std::string &` + +#### Source + +[`include/signalwire/relay/message.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/message.hpp) + +Line 49. + +*** + +### update\_state + +Update state from a messaging.state event. Notifies waiters / callbacks when the state is terminal. + +#### Signature + +```cpp +void update_state(const std::string & new_state) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/relay/message.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/message.hpp) + +Line 70. + +*** + +### wait + +Block until message reaches a terminal state. Returns true if terminal, false on timeout. \[\[nodiscard]]: the delivered-vs-timed-out result is the reason you called wait() — dropping it is a bug. + +#### Signature + +```cpp +bool wait(int timeout_ms = 0) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/relay/message.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/message.hpp) + +Line 76. + +## Type Aliases + +### CompletedCallback + +#### Signature + +```cpp +typedef std::function< void(const Message &)> CompletedCallback +``` + +#### Source + +[`include/signalwire/relay/message.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/message.hpp) + +Line 26. + +## Source + +[`include/signalwire/relay/message.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/message.hpp) + +Line 25. diff --git a/fern/products/sdk-reference/cpp/relay/relay-client/index.mdx b/fern/products/sdk-reference/cpp/relay/relay-client/index.mdx new file mode 100644 index 0000000000..1bfc3a4760 --- /dev/null +++ b/fern/products/sdk-reference/cpp/relay/relay-client/index.mdx @@ -0,0 +1,581 @@ +--- +slug: "/reference/cpp/relay/relay-client" +title: "RelayClient" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::relay::RelayClient" + parent: "signalwire::relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp" + visibility: "public" +--- +# `RelayClient` + +Real-time call control and messaging client over WebSocket. Implements the full JSON-RPC 2.0 protocol with four correlation mechanisms: +JSON-RPC id -> pending map for RPC response matching +call\_id -> Call object map for event routing +control\_id -> Action per Call for action event routing +tag -> pending dials map for dial event matching + +## Signature + +```cpp +class signalwire::relay::RelayClient +``` + +## Methods + +### ~RelayClient + +#### Signature + +```cpp +void ~RelayClient() +``` + +#### Source + +[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) + +Line 67. + +*** + +### config + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const RelayConfig & config() const +``` + +#### Returns + +`const RelayConfig &` + +#### Source + +[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) + +Line 132. + +*** + +### connect + +#### Signature + +```cpp +bool connect() +``` + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) + +Line 77. + +*** + +### dial + +Dial outbound. The devices argument is the nested "device-of-leg-of-leg" array used by the Python SDK (\[\[\{type:phone,...\}]]). Returns a Call once the server emits calling.call.dial(answered) for the dial's tag, or an empty Call on timeout / failure. +tag lets callers pin an explicit dial tag for journal-based assertions; if blank, a UUID is generated. dial\_timeout\_ms caps how long dial() blocks waiting for the server's terminal dial event. max\_duration (seconds) is forwarded into the calling.dial frame when non-zero. + +#### Signature + +```cpp +Call dial( + const json & devices, + const std::string & tag = "", + int dial_timeout_ms = 120000, + int max_duration = 0 +) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`Call` + +#### Source + +[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) + +Line 97. + +*** + +### disconnect + +#### Signature + +```cpp +void disconnect() +``` + +#### Source + +[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) + +Line 78. + +*** + +### execute + +#### Signature + +```cpp +json execute(const std::string & method, const json & params) +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) + +Line 136. + +*** + +### find\_call + +#### Signature + +```cpp +Call * find_call(const std::string & call_id) +``` + +#### Parameters + + + +#### Returns + +`Call *` + +#### Source + +[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) + +Line 141. + +*** + +### from\_env + +Construct from environment variables: SIGNALWIRE\_PROJECT\_ID, SIGNALWIRE\_API\_TOKEN, SIGNALWIRE\_SPACE + +**Modifiers:** `static` + +#### Signature + +```cpp +RelayClient from_env() +``` + +#### Returns + +`RelayClient` + +#### Source + +[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) + +Line 74. + +*** + +### is\_connected + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +bool is_connected() const +``` + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) + +Line 80. + +*** + +### on\_call + +#### Signature + +```cpp +void on_call(InboundCallHandler handler) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) + +Line 83. + +*** + +### on\_event + +Register a generic event observer. Called for every dispatched signalwire.event after typed routing (on\_call/on\_message/action callbacks) has run. Multiple registrations are NOT supported — the most-recent registration wins. + +#### Signature + +```cpp +void on_event(EventHandler handler) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) + +Line 106. + +*** + +### on\_message + +#### Signature + +```cpp +void on_message(InboundMessageHandler handler) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) + +Line 114. + +*** + +### operator= + +#### Signature + +```cpp +RelayClient & operator=(const RelayClient &) +``` + +#### Parameters + + + +#### Returns + +`RelayClient &` + +#### Source + +[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) + +Line 70. + +*** + +### register\_call + +#### Signature + +```cpp +void register_call(const std::string & call_id, Call * call) +``` + +#### Parameters + + + + + +#### Source + +[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) + +Line 139. + +*** + +### relay\_protocol + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::string & relay_protocol() const +``` + +#### Returns + +`const std::string &` + +#### Source + +[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) + +Line 133. + +*** + +### RelayClient + +Construct from explicit configuration. + +**Modifiers:** `explicit` + +#### Signature + + + + ```cpp + void RelayClient(const RelayConfig & config = RelayConfig{}) + ``` + + + + ```cpp + void RelayClient( + const std::string & project, + const std::string & token, + const std::string & host = DEFAULT_HOST, + const std::vector< std::string > & contexts = {"default"} + ) + ``` + + + + ```cpp + void RelayClient(const RelayClient &) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + + + + + +#### Parameters (Overload 3) + + + +#### Source + +[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) + +Line 59. + +*** + +### run + +#### Signature + +```cpp +void run() +``` + +#### Source + +[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) + +Line 79. + +*** + +### send\_message + +Send an SMS/MMS message via messaging.send. Returns a Message tracker whose state advances as the server pushes messaging.state events. Use Message::wait() to block until the terminal state (delivered / undelivered / failed). + +#### Signature + +```cpp +Message send_message( + const std::string & from, + const std::string & to, + const std::string & body, + const std::vector< std::string > & media = {}, + const std::vector< std::string > & tags = {}, + const std::string & region = "", + const std::string & context = "" +) +``` + +#### Parameters + + + + + + + + + + + + + + + +#### Returns + +`Message` + +#### Source + +[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) + +Line 120. + +*** + +### send\_raw\_request + +Send a JSON-RPC request to the server. Public so harnesses and tests can drive arbitrary methods (e.g. an explicit signalwire.subscribe ack frame for the audit fixture). + +#### Signature + +```cpp +json send_raw_request(const std::string & method, const json & params) +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) + +Line 111. + +*** + +### subscribe + +#### Signature + +```cpp +void subscribe(const std::vector< std::string > & contexts) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) + +Line 128. + +*** + +### unregister\_call + +#### Signature + +```cpp +void unregister_call(const std::string & call_id) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) + +Line 140. + +*** + +### unsubscribe + +#### Signature + +```cpp +void unsubscribe(const std::vector< std::string > & contexts) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) + +Line 129. + +## Source + +[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) + +Line 56. diff --git a/fern/products/sdk-reference/cpp/relay/relay-config/index.mdx b/fern/products/sdk-reference/cpp/relay/relay-config/index.mdx new file mode 100644 index 0000000000..4f15cda87b --- /dev/null +++ b/fern/products/sdk-reference/cpp/relay/relay-config/index.mdx @@ -0,0 +1,46 @@ +--- +slug: "/reference/cpp/relay/relay-config" +title: "RelayConfig" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::relay::RelayConfig" + parent: "signalwire::relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp" + visibility: "public" +--- +# `RelayConfig` + +Configuration for the RELAY client. + +## Signature + +```cpp +struct signalwire::relay::RelayConfig +``` + +## Properties + + + + + + + + + + + + + + + +## Source + +[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) + +Line 40. diff --git a/fern/products/sdk-reference/cpp/relay/relay-event/index.mdx b/fern/products/sdk-reference/cpp/relay/relay-event/index.mdx new file mode 100644 index 0000000000..81b3045691 --- /dev/null +++ b/fern/products/sdk-reference/cpp/relay/relay-event/index.mdx @@ -0,0 +1,98 @@ +--- +slug: "/reference/cpp/relay/relay-event" +title: "RelayEvent" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::relay::RelayEvent" + parent: "signalwire::relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/relay_event.hpp" + visibility: "public" +--- +# `RelayEvent` + +Base class for all RELAY events parsed from signalwire.event JSON-RPC messages. + +## Signature + +```cpp +struct signalwire::relay::RelayEvent +``` + +## Properties + + + + + + + + + +## Methods + +### from\_json + +Parse from a signalwire.event params JSON. The outer params contains event\_type and the inner params with event-specific data. + +**Modifiers:** `static` `inline` + +#### Signature + +```cpp +RelayEvent from_json(const json & j) +``` + +#### Parameters + + + +#### Returns + +`RelayEvent` + +#### Source + +[`include/signalwire/relay/relay_event.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/relay_event.hpp) + +Line 29. + +*** + +### RelayEvent + +#### Signature + + + + ```cpp + void RelayEvent() + ``` + + + + ```cpp + void RelayEvent(const std::string & type) + ``` + + + +#### Parameters (Overload 2) + + + +#### Source + +[`include/signalwire/relay/relay_event.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/relay_event.hpp) + +Line 24. + +## Source + +[`include/signalwire/relay/relay_event.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/relay_event.hpp) + +Line 17. diff --git a/fern/products/sdk-reference/cpp/relay/web-socket-client/index.mdx b/fern/products/sdk-reference/cpp/relay/web-socket-client/index.mdx new file mode 100644 index 0000000000..227824c055 --- /dev/null +++ b/fern/products/sdk-reference/cpp/relay/web-socket-client/index.mdx @@ -0,0 +1,352 @@ +--- +slug: "/reference/cpp/relay/web-socket-client" +title: "WebSocketClient" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::relay::WebSocketClient" + parent: "signalwire::relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/websocket.hpp" + visibility: "public" +--- +# `WebSocketClient` + +WebSocket client for the RELAY JSON-RPC transport. +Wraps IXWebSocket (cross-platform, OpenSSL-backed TLS) while preserving a minimal synchronous interface: connect() blocks until the handshake completes (or fails/times out), send() pushes a text frame, and the on\_message / on\_close / on\_error callbacks are invoked from IXWebSocket's background event thread. RFC 6455 framing, ping/pong, and TLS are handled by IXWebSocket — this class only adapts its async event model to the synchronous connect() contract relay::RelayClient depends on. +TLS certificate verification is ALWAYS on for the connect() (wss://) path. To trust a private/self-signed CA (e.g. the porting-sdk test CA), set the SSL\_CERT\_FILE environment variable to the CA bundle — the same cross-port idiom the other ports honor; it is wired into ix::SocketTLSOptions::caFile. When unset, the system trust store is used (production / public CAs). + +## Signature + +```cpp +class signalwire::relay::WebSocketClient +``` + +## Methods + +### ~WebSocketClient + +#### Signature + +```cpp +void ~WebSocketClient() +``` + +#### Source + +[`include/signalwire/relay/websocket.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/websocket.hpp) + +Line 42. + +*** + +### close + +Close the WebSocket connection gracefully. + +#### Signature + +```cpp +void close(int code = 1000, const std::string & reason = "") +``` + +#### Parameters + + + + + +#### Source + +[`include/signalwire/relay/websocket.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/websocket.hpp) + +Line 58. + +*** + +### connect + +Connect to wss://host:port/ with TLS. Blocks until the WebSocket is open or the attempt fails/times out. Verifies the server certificate against the system store (or SSL\_CERT\_FILE when set). + +#### Signature + +```cpp +bool connect(const std::string & host, int port = 443) +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/relay/websocket.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/websocket.hpp) + +Line 50. + +*** + +### connect\_plain + +Connect to ws://host:port/ without TLS (plain TCP). Used by audit fixtures and local dev servers that don't speak TLS. Production always uses TLS via the connect() overload above. + +#### Signature + +```cpp +bool connect_plain(const std::string & host, int port) +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/relay/websocket.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/websocket.hpp) + +Line 55. + +*** + +### is\_connected + +Check if connected. + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +bool is_connected() const +``` + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/relay/websocket.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/websocket.hpp) + +Line 64. + +*** + +### on\_close + +Set callback for connection close. + +**Modifiers:** `inline` + +#### Signature + +```cpp +void on_close(CloseCallback cb) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/relay/websocket.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/websocket.hpp) + +Line 70. + +*** + +### on\_error + +Set callback for errors. + +**Modifiers:** `inline` + +#### Signature + +```cpp +void on_error(ErrorCallback cb) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/relay/websocket.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/websocket.hpp) + +Line 73. + +*** + +### on\_message + +Set callback for received text messages. + +**Modifiers:** `inline` + +#### Signature + +```cpp +void on_message(MessageCallback cb) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/relay/websocket.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/websocket.hpp) + +Line 67. + +*** + +### operator= + +#### Signature + +```cpp +WebSocketClient & operator=(const WebSocketClient &) +``` + +#### Parameters + + + +#### Returns + +`WebSocketClient &` + +#### Source + +[`include/signalwire/relay/websocket.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/websocket.hpp) + +Line 45. + +*** + +### send + +Send a text frame. + +#### Signature + +```cpp +bool send(const std::string & message) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/relay/websocket.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/websocket.hpp) + +Line 61. + +*** + +### WebSocketClient + +#### Signature + + + + ```cpp + void WebSocketClient() + ``` + + + + ```cpp + void WebSocketClient(const WebSocketClient &) + ``` + + + +#### Parameters (Overload 2) + + + +#### Source + +[`include/signalwire/relay/websocket.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/websocket.hpp) + +Line 41. + +## Type Aliases + +### CloseCallback + +#### Signature + +```cpp +typedef std::function< void(int code, const std::string &reason)> CloseCallback +``` + +#### Source + +[`include/signalwire/relay/websocket.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/websocket.hpp) + +Line 38. + +*** + +### ErrorCallback + +#### Signature + +```cpp +typedef std::function< void(const std::string &error)> ErrorCallback +``` + +#### Source + +[`include/signalwire/relay/websocket.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/websocket.hpp) + +Line 39. + +*** + +### MessageCallback + +#### Signature + +```cpp +typedef std::function< void(const std::string &)> MessageCallback +``` + +#### Source + +[`include/signalwire/relay/websocket.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/websocket.hpp) + +Line 37. + +## Source + +[`include/signalwire/relay/websocket.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/websocket.hpp) + +Line 35. diff --git a/fern/products/sdk-reference/cpp/rest/crud-resource/index.mdx b/fern/products/sdk-reference/cpp/rest/crud-resource/index.mdx new file mode 100644 index 0000000000..af46670525 --- /dev/null +++ b/fern/products/sdk-reference/cpp/rest/crud-resource/index.mdx @@ -0,0 +1,184 @@ +--- +slug: "/reference/cpp/rest/crud-resource" +title: "CrudResource" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::CrudResource" + parent: "signalwire::rest" + module: "rest" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp" + visibility: "public" +--- +# `CrudResource` + +Generic CRUD resource for REST API namespaces. + +## Signature + +```cpp +class signalwire::rest::CrudResource +``` + +## Methods + +### create + +**Modifiers:** `const` + +#### Signature + +```cpp +json create(const json & data) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) + +Line 96. + +*** + +### CrudResource + +#### Signature + +```cpp +void CrudResource(const HttpClient & client, const std::string & base_path) +``` + +#### Parameters + + + + + +#### Source + +[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) + +Line 91. + +*** + +### del + +**Modifiers:** `const` + +#### Signature + +```cpp +json del(const std::string & id) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) + +Line 99. + +*** + +### get + +**Modifiers:** `const` + +#### Signature + +```cpp +json get(const std::string & id) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) + +Line 97. + +*** + +### list + +**Modifiers:** `const` + +#### Signature + +```cpp +json list(const std::map< std::string, std::string > & params = {}) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) + +Line 95. + +*** + +### update + +**Modifiers:** `const` + +#### Signature + +```cpp +json update(const std::string & id, const json & data) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) + +Line 98. + +## Source + +[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) + +Line 89. diff --git a/fern/products/sdk-reference/cpp/rest/http-client/index.mdx b/fern/products/sdk-reference/cpp/rest/http-client/index.mdx new file mode 100644 index 0000000000..dd36b599e0 --- /dev/null +++ b/fern/products/sdk-reference/cpp/rest/http-client/index.mdx @@ -0,0 +1,299 @@ +--- +slug: "/reference/cpp/rest/http-client" +title: "HttpClient" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::HttpClient" + parent: "signalwire::rest" + module: "rest" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp" + visibility: "public" +--- +# `HttpClient` + +HTTP client with Basic Auth support using cpp-httplib. + +## Signature + +```cpp +class signalwire::rest::HttpClient +``` + +## Methods + +### base\_url + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::string & base_url() const +``` + +#### Returns + +`const std::string &` + +#### Source + +[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) + +Line 74. + +*** + +### del + +DELETE request. + +**Modifiers:** `const` + +#### Signature + +```cpp +json del(const std::string & path) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) + +Line 58. + +*** + +### get + +GET request. + +**Modifiers:** `const` + +#### Signature + +```cpp +json get( + const std::string & path, + const std::map< std::string, std::string > & params = {} +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) + +Line 42. + +*** + +### HttpClient + +#### Signature + +```cpp +void HttpClient( + const std::string & base_url, + const std::string & username, + const std::string & password +) +``` + +#### Parameters + + + + + + + +#### Source + +[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) + +Line 33. + +*** + +### patch + +PATCH request. + +**Modifiers:** `const` + +#### Signature + +```cpp +json patch(const std::string & path, const json & body = json::object()) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) + +Line 54. + +*** + +### post + +POST request. + +**Modifiers:** `const` + +#### Signature + +```cpp +json post(const std::string & path, const json & body = json::object()) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) + +Line 46. + +*** + +### put + +PUT request. + +**Modifiers:** `const` + +#### Signature + +```cpp +json put(const std::string & path, const json & body = json::object()) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) + +Line 50. + +*** + +### set\_ca\_cert\_path + +Trust a private/self-signed CA bundle (PEM) for https:// requests. Sets the underlying SSLClient's CA path and keeps server-certificate verification ON. Production (public CAs) needs no call — the system trust store is used, and SSL\_CERT\_FILE is also honored automatically. C++-only ergonomic hook (Python's requests-based client trusts a custom CA via the SSL\_CERT\_FILE / REQUESTS\_CA\_BUNDLE env vars instead). + +#### Signature + +```cpp +void set_ca_cert_path(const std::string & path) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) + +Line 72. + +*** + +### set\_header + +Set additional default headers. + +#### Signature + +```cpp +void set_header(const std::string & key, const std::string & value) +``` + +#### Parameters + + + + + +#### Source + +[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) + +Line 61. + +*** + +### set\_timeout + +Set request timeout in seconds. + +#### Signature + +```cpp +void set_timeout(int seconds) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) + +Line 64. + +## Source + +[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) + +Line 31. diff --git a/fern/products/sdk-reference/cpp/rest/index.mdx b/fern/products/sdk-reference/cpp/rest/index.mdx new file mode 100644 index 0000000000..48250fc9fe --- /dev/null +++ b/fern/products/sdk-reference/cpp/rest/index.mdx @@ -0,0 +1,262 @@ +--- +slug: "/reference/cpp/rest" +title: "rest" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "module" + language: "cpp" + qualified_name: "signalwire::rest" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp" +--- +# `rest` + +## Signature + +```cpp +namespace signalwire::rest +``` + +## Classes + + + + Generic CRUD resource for REST API namespaces. + + + + HTTP client with Basic Auth support using cpp-httplib. + + + + Iterates items across paginated API responses. Mirrors signalwire-python's signalwire.rest.\_pagination.PaginatedIterator: fetches the configured path with the configured params, walks the data\_key array, then follows links.next (parsing its query string for the next page's params) until the response carries no links.next. Iteration is lazy the constructor records inputs but performs no HTTP. The first has\_next() / next() call performs the first fetch. Cursor query params are extracted by parsing links.next like Python's urllib.parse.urlparse + parse\_qs. + + + + Top-level SignalWire REST client with all API namespaces. + + + + Error thrown on non-2xx REST API responses. + + + +## Modules + + + + + +## Functions + +### make\_headers + +**Modifiers:** `static` + +#### Signature + +```cpp +httplib::Headers make_headers( + const std::string & auth, + const std::map< std::string, std::string > & extra +) +``` + +#### Parameters + + + + + +#### Returns + +`httplib::Headers` + +#### Source + +[`src/rest/http_client.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/rest/http_client.cpp) + +Line 103. + +*** + +### parse\_url + +**Modifiers:** `static` + +#### Signature + +```cpp +std::pair< std::string, std::string > parse_url(const std::string & base_url) +``` + +#### Parameters + + + +#### Returns + +`std::pair< std::string, std::string >` + +#### Source + +[`src/rest/http_client.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/rest/http_client.cpp) + +Line 91. + +*** + +### to\_wire\_string + +Serialize a PhoneCallHandler to its wire string. + +**Modifiers:** `inline` + +#### Signature + +```cpp +std::string to_wire_string(PhoneCallHandler h) +``` + +#### Parameters + + + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/rest/phone_call_handler.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/phone_call_handler.hpp) + +Line 54. + +## Type Aliases + +### json + +#### Signature + +```cpp +typedef nlohmann::json json +``` + +#### Source + +[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) + +Line 16. + +## Enums + +### PhoneCallHandler + +Enumeration of call\_handler values accepted by phone\_numbers.update. +Setting a phone number's call\_handler + the handler-specific companion field routes inbound calls and auto-materializes the matching Fabric resource on the server. The typed set\_\* helpers on PhoneNumbersNamespace wrap the low-level update call with the right combination — prefer those over constructing the wire body by hand. +Named PhoneCallHandler (not CallHandler) to avoid colliding with signalwire::relay::InboundCallHandler — the callback type used by the RELAY client for inbound-call events. + +Enum value\ +Wire value\ +Companion field\ +Auto-materializes + +RelayScript\ +relay\_script\ +call\_relay\_script\_url\ +swml\_webhook + +LamlWebhooks\ +laml\_webhooks\ +call\_request\_url\ +cxml\_webhook + +LamlApplication\ +laml\_application\ +call\_laml\_application\_id\ +cxml\_application + +AiAgent\ +ai\_agent\ +call\_ai\_agent\_id\ +ai\_agent + +CallFlow\ +call\_flow\ +call\_flow\_id\ +call\_flow + +RelayApplication\ +relay\_application\ +call\_relay\_application\ +relay\_application + +RelayTopic\ +relay\_topic\ +call\_relay\_topic\ +(RELAY routing) + +RelayContext\ +relay\_context\ +call\_relay\_context\ +(legacy) + +RelayConnector\ +relay\_connector\ +(connector config)\ +(internal) + +VideoRoom\ +video\_room\ +call\_video\_room\_id\ +(Video API) + +Dialogflow\ +dialogflow\ +call\_dialogflow\_agent\_id\ +(none) + +Note: LamlWebhooks (wire value laml\_webhooks) produces a cXML handler despite the plural name. For SWML, use RelayScript. + +#### Signature + +```cpp +enum class PhoneCallHandler +``` + +#### Variants + + + + + + + + + + + + + + + + + + + + + + + +#### Source + +[`include/signalwire/rest/phone_call_handler.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/phone_call_handler.hpp) + +Line 39. + +## Source + +[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) + +Line 14. diff --git a/fern/products/sdk-reference/cpp/rest/paginated-iterator/index.mdx b/fern/products/sdk-reference/cpp/rest/paginated-iterator/index.mdx new file mode 100644 index 0000000000..044499e2d1 --- /dev/null +++ b/fern/products/sdk-reference/cpp/rest/paginated-iterator/index.mdx @@ -0,0 +1,261 @@ +--- +slug: "/reference/cpp/rest/paginated-iterator" +title: "PaginatedIterator" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::PaginatedIterator" + parent: "signalwire::rest" + module: "rest" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp" + visibility: "public" +--- +# `PaginatedIterator` + +Iterates items across paginated API responses. +Mirrors signalwire-python's signalwire.rest.\_pagination.PaginatedIterator: fetches the configured path with the configured params, walks the data\_key array, then follows links.next (parsing its query string for the next page's params) until the response carries no links.next. +Iteration is lazy the constructor records inputs but performs no HTTP. The first has\_next() / next() call performs the first fetch. Cursor query params are extracted by parsing links.next like Python's urllib.parse.urlparse + parse\_qs. + +## Signature + +```cpp +class signalwire::rest::PaginatedIterator +``` + +## Methods + +### data\_key + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::string & data_key() const +``` + +#### Returns + +`const std::string &` + +#### Source + +[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) + +Line 140. + +*** + +### done + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +bool done() const +``` + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) + +Line 143. + +*** + +### has\_next + +Returns true if another item can be fetched. Performs HTTP if the in-memory buffer is exhausted but more pages remain. \[\[nodiscard]]: this is the loop condition — discarding it loses the "more items?" answer (and the side-effecting page fetch is not why you'd call it). + +#### Signature + +```cpp +bool has_next() +``` + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) + +Line 129. + +*** + +### http + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const HttpClient & http() const +``` + +#### Returns + +`const HttpClient &` + +#### Source + +[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) + +Line 137. + +*** + +### index + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +size_t index() const +``` + +#### Returns + +`size_t` + +#### Source + +[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) + +Line 141. + +*** + +### items + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::vector< json > & items() const +``` + +#### Returns + +`const std::vector< json > &` + +#### Source + +[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) + +Line 142. + +*** + +### next + +Returns the next item; throws std::out\_of\_range when the iterator is exhausted (mirrors Python's StopIteration). \[\[nodiscard]]: dropping the returned item silently consumes it. + +#### Signature + +```cpp +json next() +``` + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) + +Line 134. + +*** + +### PaginatedIterator + +#### Signature + +```cpp +void PaginatedIterator( + const HttpClient & http, + const std::string & path, + const std::map< std::string, std::string > & params = {}, + const std::string & data_key = "data" +) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) + +Line 119. + +*** + +### params + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::map< std::string, std::string > & params() const +``` + +#### Returns + +`const std::map< std::string, std::string > &` + +#### Source + +[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) + +Line 139. + +*** + +### path + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::string & path() const +``` + +#### Returns + +`const std::string &` + +#### Source + +[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) + +Line 138. + +## Source + +[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) + +Line 117. diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/addresses-namespace/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/addresses-namespace/index.mdx new file mode 100644 index 0000000000..067e185429 --- /dev/null +++ b/fern/products/sdk-reference/cpp/rest/rest-client/addresses-namespace/index.mdx @@ -0,0 +1,54 @@ +--- +slug: "/reference/cpp/rest/rest-client/addresses-namespace" +title: "AddressesNamespace" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::AddressesNamespace" + parent: "rest.RestClient" + module: "rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `AddressesNamespace` + +## Signature + +```cpp +struct signalwire::rest::RestClient::AddressesNamespace : signalwire::rest::CrudResource +``` + +## Inheritance + +**Extends:** [signalwire::rest::CrudResource](/docs/sdk-reference/reference/cpp/rest/crud-resource) + +## Methods + +### AddressesNamespace + +**Modifiers:** `inline` + +#### Signature + +```cpp +void AddressesNamespace(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1146. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1145. diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/calling-namespace/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/calling-namespace/index.mdx new file mode 100644 index 0000000000..1c78ffe307 --- /dev/null +++ b/fern/products/sdk-reference/cpp/rest/rest-client/calling-namespace/index.mdx @@ -0,0 +1,1413 @@ +--- +slug: "/reference/cpp/rest/rest-client/calling-namespace" +title: "CallingNamespace" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::CallingNamespace" + parent: "rest.RestClient" + module: "rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `CallingNamespace` + +## Signature + +```cpp +struct signalwire::rest::RestClient::CallingNamespace +``` + +## Properties + + + +## Methods + +### ai\_hold + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json ai_hold( + const std::string & call_id, + const json & params = json::object() +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 394. + +*** + +### ai\_message + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json ai_message(const std::string & call_id, const json & params) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 391. + +*** + +### ai\_stop + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json ai_stop( + const std::string & call_id, + const json & params = json::object() +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 402. + +*** + +### ai\_unhold + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json ai_unhold( + const std::string & call_id, + const json & params = json::object() +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 398. + +*** + +### answer + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json answer(const std::string & id) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 446. + +*** + +### CallingNamespace + +**Modifiers:** `inline` + +#### Signature + +```cpp +void CallingNamespace(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 275. + +*** + +### collect + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json collect(const std::string & call_id, const json & params) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 338. + +*** + +### collect\_start\_input\_timers + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json collect_start_input_timers( + const std::string & call_id, + const json & params +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 344. + +*** + +### collect\_stop + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json collect_stop(const std::string & call_id, const json & params) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 341. + +*** + +### connect + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json connect(const std::string & id, const json & data) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 444. + +*** + +### denoise + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json denoise( + const std::string & call_id, + const json & params = json::object() +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 374. + +*** + +### denoise\_stop + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json denoise_stop(const std::string & call_id, const json & params) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 378. + +*** + +### detect + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json detect(const std::string & call_id, const json & params) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 350. + +*** + +### detect\_stop + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json detect_stop(const std::string & call_id, const json & params) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 353. + +*** + +### dial + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json dial(const json & params) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 294. + +*** + +### disconnect + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json disconnect( + const std::string & call_id, + const json & params = json::object() +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 302. + +*** + +### end + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json end( + const std::string & call_id, + const json & params = json::object() +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 296. + +*** + +### end\_call + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json end_call(const std::string & id) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 443. + +*** + +### execute + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json execute( + const std::string & command, + const json & params, + const std::optional< std::string > & call_id = std::nullopt +) const +``` + +#### Parameters + + + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 285. + +*** + +### get\_call + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json get_call(const std::string & id) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 441. + +*** + +### hangup + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json hangup(const std::string & id) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 447. + +*** + +### hold + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json hold(const std::string & id) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 448. + +*** + +### list\_calls + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list_calls(const std::map< std::string, std::string > & p = {}) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 440. + +*** + +### live\_transcribe + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json live_transcribe(const std::string & call_id, const json & params) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 408. + +*** + +### live\_translate + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json live_translate(const std::string & call_id, const json & params) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 411. + +*** + +### play + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json play(const std::string & call_id, const json & params) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 307. + +*** + +### play\_pause + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json play_pause(const std::string & call_id, const json & params) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 310. + +*** + +### play\_resume + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json play_resume(const std::string & call_id, const json & params) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 313. + +*** + +### play\_stop + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json play_stop(const std::string & call_id, const json & params) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 316. + +*** + +### play\_volume + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json play_volume(const std::string & call_id, const json & params) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 319. + +*** + +### receive\_fax\_stop + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json receive_fax_stop( + const std::string & call_id, + const json & params = json::object() +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 420. + +*** + +### record + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json record(const std::string & call_id, const json & params) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 324. + +*** + +### record\_pause + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json record_pause(const std::string & call_id, const json & params) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 327. + +*** + +### record\_resume + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json record_resume(const std::string & call_id, const json & params) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 330. + +*** + +### record\_stop + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json record_stop(const std::string & call_id, const json & params) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 333. + +*** + +### refer + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json refer(const std::string & call_id, const json & params) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 426. + +*** + +### send\_digits + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json send_digits(const std::string & id, const json & data) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 445. + +*** + +### send\_fax\_stop + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json send_fax_stop( + const std::string & call_id, + const json & params = json::object() +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 416. + +*** + +### stream + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json stream(const std::string & call_id, const json & params) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 366. + +*** + +### stream\_stop + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json stream_stop(const std::string & call_id, const json & params) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 369. + +*** + +### tap + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json tap(const std::string & call_id, const json & params) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 358. + +*** + +### tap\_stop + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json tap_stop(const std::string & call_id, const json & params) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 361. + +*** + +### transcribe + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json transcribe(const std::string & call_id, const json & params) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 383. + +*** + +### transcribe\_stop + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json transcribe_stop(const std::string & call_id, const json & params) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 386. + +*** + +### transfer + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json transfer(const std::string & call_id, const json & params) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 299. + +*** + +### unhold + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json unhold(const std::string & id) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 449. + +*** + +### update + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json update(const json & params) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 295. + +*** + +### update\_call + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json update_call(const std::string & id, const json & data) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 442. + +*** + +### user\_event + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json user_event(const std::string & call_id, const json & params) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 431. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 272. diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/chat-namespace/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/chat-namespace/index.mdx new file mode 100644 index 0000000000..1a19af3c23 --- /dev/null +++ b/fern/products/sdk-reference/cpp/rest/rest-client/chat-namespace/index.mdx @@ -0,0 +1,106 @@ +--- +slug: "/reference/cpp/rest/rest-client/chat-namespace" +title: "ChatNamespace" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::ChatNamespace" + parent: "rest.RestClient" + module: "rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `ChatNamespace` + +## Signature + +```cpp +struct signalwire::rest::RestClient::ChatNamespace +``` + +## Properties + + + +## Methods + +### ChatNamespace + +**Modifiers:** `inline` + +#### Signature + +```cpp +void ChatNamespace(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1423. + +*** + +### list\_messages + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list_messages(const std::map< std::string, std::string > & p = {}) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1425. + +*** + +### send\_message + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json send_message(const json & data) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1424. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1421. diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/compat-accounts/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/compat-accounts/index.mdx new file mode 100644 index 0000000000..44d612dc3c --- /dev/null +++ b/fern/products/sdk-reference/cpp/rest/rest-client/compat-accounts/index.mdx @@ -0,0 +1,162 @@ +--- +slug: "/reference/cpp/rest/rest-client/compat-accounts" +title: "CompatAccounts" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::CompatAccounts" + parent: "rest.RestClient" + module: "rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `CompatAccounts` + +## Signature + +```cpp +struct signalwire::rest::RestClient::CompatAccounts +``` + +## Properties + + + + + +## Methods + +### CompatAccounts + +**Modifiers:** `inline` + +#### Signature + +```cpp +void CompatAccounts(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 930. + +*** + +### create + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json create(const json & data) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 934. + +*** + +### get + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json get(const std::string & sid) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 935. + +*** + +### list + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list(const std::map< std::string, std::string > & params = {}) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 931. + +*** + +### update + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json update(const std::string & sid, const json & data) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 939. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 927. diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/compat-applications/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/compat-applications/index.mdx new file mode 100644 index 0000000000..a528875cd8 --- /dev/null +++ b/fern/products/sdk-reference/cpp/rest/rest-client/compat-applications/index.mdx @@ -0,0 +1,84 @@ +--- +slug: "/reference/cpp/rest/rest-client/compat-applications" +title: "CompatApplications" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::CompatApplications" + parent: "rest.RestClient" + module: "rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `CompatApplications` + +## Signature + +```cpp +struct signalwire::rest::RestClient::CompatApplications : signalwire::rest::CrudResource +``` + +## Inheritance + +**Extends:** [signalwire::rest::CrudResource](/docs/sdk-reference/reference/cpp/rest/crud-resource) + +## Methods + +### CompatApplications + +**Modifiers:** `inline` + +#### Signature + +```cpp +void CompatApplications(const HttpClient & c, const std::string & base) +``` + +#### Parameters + + + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 945. + +*** + +### update + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json update(const std::string & sid, const json & data) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 947. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 944. diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/compat-calls/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/compat-calls/index.mdx new file mode 100644 index 0000000000..73a6f31e5b --- /dev/null +++ b/fern/products/sdk-reference/cpp/rest/rest-client/compat-calls/index.mdx @@ -0,0 +1,208 @@ +--- +slug: "/reference/cpp/rest/rest-client/compat-calls" +title: "CompatCalls" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::CompatCalls" + parent: "rest.RestClient" + module: "rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `CompatCalls` + +## Signature + +```cpp +struct signalwire::rest::RestClient::CompatCalls : signalwire::rest::CrudResource +``` + +## Inheritance + +**Extends:** [signalwire::rest::CrudResource](/docs/sdk-reference/reference/cpp/rest/crud-resource) + +## Methods + +### CompatCalls + +**Modifiers:** `inline` + +#### Signature + +```cpp +void CompatCalls(const HttpClient & c, const std::string & base) +``` + +#### Parameters + + + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 803. + +*** + +### start\_recording + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json start_recording(const std::string & call_sid, const json & data) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 812. + +*** + +### start\_stream + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json start_stream(const std::string & call_sid, const json & data) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 822. + +*** + +### stop\_stream + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json stop_stream( + const std::string & call_sid, + const std::string & stream_sid, + const json & data +) const +``` + +#### Parameters + + + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 825. + +*** + +### update + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json update(const std::string & sid, const json & data) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 807. + +*** + +### update\_recording + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json update_recording( + const std::string & call_sid, + const std::string & recording_sid, + const json & data +) const +``` + +#### Parameters + + + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 815. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 802. diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/compat-conferences/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/compat-conferences/index.mdx new file mode 100644 index 0000000000..09755a8f4a --- /dev/null +++ b/fern/products/sdk-reference/cpp/rest/rest-client/compat-conferences/index.mdx @@ -0,0 +1,454 @@ +--- +slug: "/reference/cpp/rest/rest-client/compat-conferences" +title: "CompatConferences" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::CompatConferences" + parent: "rest.RestClient" + module: "rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `CompatConferences` + +## Signature + +```cpp +struct signalwire::rest::RestClient::CompatConferences +``` + +## Properties + + + + + +## Methods + +### CompatConferences + +**Modifiers:** `inline` + +#### Signature + +```cpp +void CompatConferences(const HttpClient & c, const std::string & base) +``` + +#### Parameters + + + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 963. + +*** + +### delete\_recording + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json delete_recording( + const std::string & conference_sid, + const std::string & recording_sid +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1009. + +*** + +### get + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json get(const std::string & sid) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 969. + +*** + +### get\_participant + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json get_participant( + const std::string & conference_sid, + const std::string & call_sid +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 981. + +*** + +### get\_recording + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json get_recording( + const std::string & conference_sid, + const std::string & recording_sid +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1000. + +*** + +### list + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list(const std::map< std::string, std::string > & params = {}) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 966. + +*** + +### list\_participants + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list_participants( + const std::string & conference_sid, + const std::map< std::string, std::string > & params = {} +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 977. + +*** + +### list\_recordings + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list_recordings( + const std::string & conference_sid, + const std::map< std::string, std::string > & params = {} +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 996. + +*** + +### remove\_participant + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json remove_participant( + const std::string & conference_sid, + const std::string & call_sid +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 990. + +*** + +### start\_stream + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json start_stream(const std::string & conference_sid, const json & data) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1015. + +*** + +### stop\_stream + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json stop_stream( + const std::string & conference_sid, + const std::string & stream_sid, + const json & data +) const +``` + +#### Parameters + + + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1018. + +*** + +### update + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json update(const std::string & sid, const json & data) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 972. + +*** + +### update\_participant + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json update_participant( + const std::string & conference_sid, + const std::string & call_sid, + const json & data +) const +``` + +#### Parameters + + + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 985. + +*** + +### update\_recording + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json update_recording( + const std::string & conference_sid, + const std::string & recording_sid, + const json & data +) const +``` + +#### Parameters + + + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1004. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 960. diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/compat-faxes/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/compat-faxes/index.mdx new file mode 100644 index 0000000000..668239c201 --- /dev/null +++ b/fern/products/sdk-reference/cpp/rest/rest-client/compat-faxes/index.mdx @@ -0,0 +1,174 @@ +--- +slug: "/reference/cpp/rest/rest-client/compat-faxes" +title: "CompatFaxes" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::CompatFaxes" + parent: "rest.RestClient" + module: "rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `CompatFaxes` + +## Signature + +```cpp +struct signalwire::rest::RestClient::CompatFaxes : signalwire::rest::CrudResource +``` + +## Inheritance + +**Extends:** [signalwire::rest::CrudResource](/docs/sdk-reference/reference/cpp/rest/crud-resource) + +## Methods + +### CompatFaxes + +**Modifiers:** `inline` + +#### Signature + +```cpp +void CompatFaxes(const HttpClient & c, const std::string & base) +``` + +#### Parameters + + + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 855. + +*** + +### delete\_media + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json delete_media( + const std::string & fax_sid, + const std::string & media_sid +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 870. + +*** + +### get\_media + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json get_media(const std::string & fax_sid, const std::string & media_sid) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 866. + +*** + +### list\_media + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list_media( + const std::string & fax_sid, + const std::map< std::string, std::string > & params = {} +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 862. + +*** + +### update + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json update(const std::string & sid, const json & data) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 858. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 854. diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/compat-laml-bins/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/compat-laml-bins/index.mdx new file mode 100644 index 0000000000..a391238dd2 --- /dev/null +++ b/fern/products/sdk-reference/cpp/rest/rest-client/compat-laml-bins/index.mdx @@ -0,0 +1,84 @@ +--- +slug: "/reference/cpp/rest/rest-client/compat-laml-bins" +title: "CompatLamlBins" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::CompatLamlBins" + parent: "rest.RestClient" + module: "rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `CompatLamlBins` + +## Signature + +```cpp +struct signalwire::rest::RestClient::CompatLamlBins : signalwire::rest::CrudResource +``` + +## Inheritance + +**Extends:** [signalwire::rest::CrudResource](/docs/sdk-reference/reference/cpp/rest/crud-resource) + +## Methods + +### CompatLamlBins + +**Modifiers:** `inline` + +#### Signature + +```cpp +void CompatLamlBins(const HttpClient & c, const std::string & base) +``` + +#### Parameters + + + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 953. + +*** + +### update + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json update(const std::string & sid, const json & data) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 955. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 952. diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/compat-messages/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/compat-messages/index.mdx new file mode 100644 index 0000000000..ff32d8fc5e --- /dev/null +++ b/fern/products/sdk-reference/cpp/rest/rest-client/compat-messages/index.mdx @@ -0,0 +1,177 @@ +--- +slug: "/reference/cpp/rest/rest-client/compat-messages" +title: "CompatMessages" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::CompatMessages" + parent: "rest.RestClient" + module: "rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `CompatMessages` + +## Signature + +```cpp +struct signalwire::rest::RestClient::CompatMessages : signalwire::rest::CrudResource +``` + +## Inheritance + +**Extends:** [signalwire::rest::CrudResource](/docs/sdk-reference/reference/cpp/rest/crud-resource) + +## Methods + +### CompatMessages + +**Modifiers:** `inline` + +#### Signature + +```cpp +void CompatMessages(const HttpClient & c, const std::string & base) +``` + +#### Parameters + + + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 833. + +*** + +### delete\_media + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json delete_media( + const std::string & message_sid, + const std::string & media_sid +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 848. + +*** + +### get\_media + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json get_media( + const std::string & message_sid, + const std::string & media_sid +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 844. + +*** + +### list\_media + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list_media( + const std::string & message_sid, + const std::map< std::string, std::string > & params = {} +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 840. + +*** + +### update + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json update(const std::string & sid, const json & data) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 836. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 832. diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/compat-namespace/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/compat-namespace/index.mdx new file mode 100644 index 0000000000..9999cd99ff --- /dev/null +++ b/fern/products/sdk-reference/cpp/rest/rest-client/compat-namespace/index.mdx @@ -0,0 +1,186 @@ +--- +slug: "/reference/cpp/rest/rest-client/compat-namespace" +title: "CompatNamespace" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::CompatNamespace" + parent: "rest.RestClient" + module: "rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `CompatNamespace` + +## Signature + +```cpp +struct signalwire::rest::RestClient::CompatNamespace +``` + +## Properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## Methods + +### CompatNamespace + +**Modifiers:** `inline` + +#### Signature + +```cpp +void CompatNamespace(const HttpClient & c, const std::string & account_sid) +``` + +#### Parameters + + + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1111. + +*** + +### create\_call + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json create_call(const json & data) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1131. + +*** + +### list\_calls + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list_calls(const std::map< std::string, std::string > & p = {}) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1133. + +*** + +### list\_messages + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list_messages(const std::map< std::string, std::string > & p = {}) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1134. + +*** + +### send\_message + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json send_message(const json & data) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1132. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1093. diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/compat-phone-numbers/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/compat-phone-numbers/index.mdx new file mode 100644 index 0000000000..cda3836a7a --- /dev/null +++ b/fern/products/sdk-reference/cpp/rest/rest-client/compat-phone-numbers/index.mdx @@ -0,0 +1,284 @@ +--- +slug: "/reference/cpp/rest/rest-client/compat-phone-numbers" +title: "CompatPhoneNumbers" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::CompatPhoneNumbers" + parent: "rest.RestClient" + module: "rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `CompatPhoneNumbers` + +## Signature + +```cpp +struct signalwire::rest::RestClient::CompatPhoneNumbers +``` + +## Properties + + + + + + + + + +## Methods + +### CompatPhoneNumbers + +**Modifiers:** `inline` + +#### Signature + +```cpp +void CompatPhoneNumbers(const HttpClient & c, const std::string & account_base) +``` + +#### Parameters + + + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 882. + +*** + +### get + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json get(const std::string & sid) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 891. + +*** + +### import\_number + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json import_number(const json & data) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 903. + +*** + +### list + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list(const std::map< std::string, std::string > & params = {}) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 888. + +*** + +### list\_available\_countries + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list_available_countries( + const std::map< std::string, std::string > & params = {} +) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 906. + +*** + +### purchase + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json purchase(const json & data) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 900. + +*** + +### search\_local + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json search_local( + const std::string & country, + const std::map< std::string, std::string > & params = {} +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 909. + +*** + +### search\_toll\_free + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json search_toll_free( + const std::string & country, + const std::map< std::string, std::string > & params = {} +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 913. + +*** + +### update + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json update(const std::string & sid, const json & data) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 894. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 876. diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/compat-queues/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/compat-queues/index.mdx new file mode 100644 index 0000000000..28ce786596 --- /dev/null +++ b/fern/products/sdk-reference/cpp/rest/rest-client/compat-queues/index.mdx @@ -0,0 +1,180 @@ +--- +slug: "/reference/cpp/rest/rest-client/compat-queues" +title: "CompatQueues" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::CompatQueues" + parent: "rest.RestClient" + module: "rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `CompatQueues` + +## Signature + +```cpp +struct signalwire::rest::RestClient::CompatQueues : signalwire::rest::CrudResource +``` + +## Inheritance + +**Extends:** [signalwire::rest::CrudResource](/docs/sdk-reference/reference/cpp/rest/crud-resource) + +## Methods + +### CompatQueues + +**Modifiers:** `inline` + +#### Signature + +```cpp +void CompatQueues(const HttpClient & c, const std::string & base) +``` + +#### Parameters + + + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1026. + +*** + +### dequeue\_member + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json dequeue_member( + const std::string & queue_sid, + const std::string & call_sid, + const json & data +) const +``` + +#### Parameters + + + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1039. + +*** + +### get\_member + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json get_member( + const std::string & queue_sid, + const std::string & call_sid +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1035. + +*** + +### list\_members + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list_members( + const std::string & queue_sid, + const std::map< std::string, std::string > & params = {} +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1031. + +*** + +### update + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json update(const std::string & sid, const json & data) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1028. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1025. diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/compat-recordings/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/compat-recordings/index.mdx new file mode 100644 index 0000000000..6d455c86b7 --- /dev/null +++ b/fern/products/sdk-reference/cpp/rest/rest-client/compat-recordings/index.mdx @@ -0,0 +1,110 @@ +--- +slug: "/reference/cpp/rest/rest-client/compat-recordings" +title: "CompatRecordings" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::CompatRecordings" + parent: "rest.RestClient" + module: "rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `CompatRecordings` + +## Signature + +```cpp +struct signalwire::rest::RestClient::CompatRecordings +``` + +## Properties + + + + + +## Methods + +### CompatRecordings + +**Modifiers:** `inline` + +#### Signature + +```cpp +void CompatRecordings(const HttpClient & c, const std::string & base) +``` + +#### Parameters + + + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1049. + +*** + +### get + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json get(const std::string & sid) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1054. + +*** + +### list + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list(const std::map< std::string, std::string > & params = {}) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1051. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1046. diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/compat-tokens/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/compat-tokens/index.mdx new file mode 100644 index 0000000000..b1efcf2199 --- /dev/null +++ b/fern/products/sdk-reference/cpp/rest/rest-client/compat-tokens/index.mdx @@ -0,0 +1,112 @@ +--- +slug: "/reference/cpp/rest/rest-client/compat-tokens" +title: "CompatTokens" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::CompatTokens" + parent: "rest.RestClient" + module: "rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `CompatTokens` + +## Signature + +```cpp +struct signalwire::rest::RestClient::CompatTokens +``` + +## Properties + + + + + +## Methods + +### CompatTokens + +**Modifiers:** `inline` + +#### Signature + +```cpp +void CompatTokens(const HttpClient & c, const std::string & base) +``` + +#### Parameters + + + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1081. + +*** + +### create + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json create(const json & data) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1083. + +*** + +### update + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json update(const std::string & token_id, const json & data) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1085. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1078. diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/compat-transcriptions/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/compat-transcriptions/index.mdx new file mode 100644 index 0000000000..d194c04992 --- /dev/null +++ b/fern/products/sdk-reference/cpp/rest/rest-client/compat-transcriptions/index.mdx @@ -0,0 +1,110 @@ +--- +slug: "/reference/cpp/rest/rest-client/compat-transcriptions" +title: "CompatTranscriptions" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::CompatTranscriptions" + parent: "rest.RestClient" + module: "rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `CompatTranscriptions` + +## Signature + +```cpp +struct signalwire::rest::RestClient::CompatTranscriptions +``` + +## Properties + + + + + +## Methods + +### CompatTranscriptions + +**Modifiers:** `inline` + +#### Signature + +```cpp +void CompatTranscriptions(const HttpClient & c, const std::string & base) +``` + +#### Parameters + + + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1065. + +*** + +### get + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json get(const std::string & sid) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1070. + +*** + +### list + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list(const std::map< std::string, std::string > & params = {}) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1067. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1062. diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/datasphere-documents/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/datasphere-documents/index.mdx new file mode 100644 index 0000000000..2d4e68c084 --- /dev/null +++ b/fern/products/sdk-reference/cpp/rest/rest-client/datasphere-documents/index.mdx @@ -0,0 +1,173 @@ +--- +slug: "/reference/cpp/rest/rest-client/datasphere-documents" +title: "DatasphereDocuments" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::DatasphereDocuments" + parent: "rest.RestClient" + module: "rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `DatasphereDocuments` + +## Signature + +```cpp +struct signalwire::rest::RestClient::DatasphereDocuments : signalwire::rest::CrudResource +``` + +## Inheritance + +**Extends:** [signalwire::rest::CrudResource](/docs/sdk-reference/reference/cpp/rest/crud-resource) + +## Methods + +### DatasphereDocuments + +**Modifiers:** `inline` + +#### Signature + +```cpp +void DatasphereDocuments(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 612. + +*** + +### delete\_chunk + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json delete_chunk( + const std::string & document_id, + const std::string & chunk_id +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 625. + +*** + +### get\_chunk + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json get_chunk( + const std::string & document_id, + const std::string & chunk_id +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 621. + +*** + +### list\_chunks + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list_chunks( + const std::string & document_id, + const std::map< std::string, std::string > & params = {} +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 617. + +*** + +### search + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json search(const json & data) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 614. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 611. diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/datasphere-namespace/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/datasphere-namespace/index.mdx new file mode 100644 index 0000000000..ff2153e943 --- /dev/null +++ b/fern/products/sdk-reference/cpp/rest/rest-client/datasphere-namespace/index.mdx @@ -0,0 +1,82 @@ +--- +slug: "/reference/cpp/rest/rest-client/datasphere-namespace" +title: "DatasphereNamespace" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::DatasphereNamespace" + parent: "rest.RestClient" + module: "rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `DatasphereNamespace` + +## Signature + +```cpp +struct signalwire::rest::RestClient::DatasphereNamespace +``` + +## Properties + + + + + +## Methods + +### DatasphereNamespace + +**Modifiers:** `inline` + +#### Signature + +```cpp +void DatasphereNamespace(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 635. + +*** + +### search + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json search(const json & data) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 641. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 631. diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/fabric-addresses/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/fabric-addresses/index.mdx new file mode 100644 index 0000000000..7b8d9be757 --- /dev/null +++ b/fern/products/sdk-reference/cpp/rest/rest-client/fabric-addresses/index.mdx @@ -0,0 +1,108 @@ +--- +slug: "/reference/cpp/rest/rest-client/fabric-addresses" +title: "FabricAddresses" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::FabricAddresses" + parent: "rest.RestClient" + module: "rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `FabricAddresses` + +## Signature + +```cpp +struct signalwire::rest::RestClient::FabricAddresses +``` + +## Properties + + + + + +## Methods + +### FabricAddresses + +**Modifiers:** `inline` + +#### Signature + +```cpp +void FabricAddresses(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 151. + +*** + +### get + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json get(const std::string & address_id) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 155. + +*** + +### list + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list(const std::map< std::string, std::string > & params = {}) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 152. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 148. diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/fabric-call-flows/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/fabric-call-flows/index.mdx new file mode 100644 index 0000000000..3d424da525 --- /dev/null +++ b/fern/products/sdk-reference/cpp/rest/rest-client/fabric-call-flows/index.mdx @@ -0,0 +1,166 @@ +--- +slug: "/reference/cpp/rest/rest-client/fabric-call-flows" +title: "FabricCallFlows" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::FabricCallFlows" + parent: "rest.RestClient" + module: "rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `FabricCallFlows` + +## Signature + +```cpp +struct signalwire::rest::RestClient::FabricCallFlows : signalwire::rest::RestClient::FabricResourcePUT +``` + +## Inheritance + +**Extends:** [signalwire::rest::RestClient::FabricResourcePUT](/docs/sdk-reference/reference/cpp/rest/rest-client/fabric-resource-put) + +## Methods + +### deploy\_version + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json deploy_version(const std::string & flow_id, const json & data) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 92. + +*** + +### FabricCallFlows + +**Modifiers:** `inline` + +#### Signature + +```cpp +void FabricCallFlows(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 76. + +*** + +### list\_addresses + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list_addresses( + const std::string & flow_id, + const std::map< std::string, std::string > & params = {} +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 84. + +*** + +### list\_versions + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list_versions( + const std::string & flow_id, + const std::map< std::string, std::string > & params = {} +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 88. + +*** + +### singular\_base + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +std::string singular_base() const +``` + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 81. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 75. diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/fabric-conference-rooms/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/fabric-conference-rooms/index.mdx new file mode 100644 index 0000000000..820de65ecd --- /dev/null +++ b/fern/products/sdk-reference/cpp/rest/rest-client/fabric-conference-rooms/index.mdx @@ -0,0 +1,107 @@ +--- +slug: "/reference/cpp/rest/rest-client/fabric-conference-rooms" +title: "FabricConferenceRooms" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::FabricConferenceRooms" + parent: "rest.RestClient" + module: "rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `FabricConferenceRooms` + +## Signature + +```cpp +struct signalwire::rest::RestClient::FabricConferenceRooms : signalwire::rest::RestClient::FabricResourcePUT +``` + +## Inheritance + +**Extends:** [signalwire::rest::RestClient::FabricResourcePUT](/docs/sdk-reference/reference/cpp/rest/rest-client/fabric-resource-put) + +## Methods + +### FabricConferenceRooms + +**Modifiers:** `inline` + +#### Signature + +```cpp +void FabricConferenceRooms(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 98. + +*** + +### list\_addresses + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list_addresses( + const std::string & room_id, + const std::map< std::string, std::string > & params = {} +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 105. + +*** + +### singular\_base + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +std::string singular_base() const +``` + +#### Returns + +`std::string` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 102. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 97. diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/fabric-cxml-applications/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/fabric-cxml-applications/index.mdx new file mode 100644 index 0000000000..49ffbe312d --- /dev/null +++ b/fern/products/sdk-reference/cpp/rest/rest-client/fabric-cxml-applications/index.mdx @@ -0,0 +1,80 @@ +--- +slug: "/reference/cpp/rest/rest-client/fabric-cxml-applications" +title: "FabricCxmlApplications" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::FabricCxmlApplications" + parent: "rest.RestClient" + module: "rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `FabricCxmlApplications` + +## Signature + +```cpp +struct signalwire::rest::RestClient::FabricCxmlApplications : signalwire::rest::RestClient::FabricResourcePUT +``` + +## Inheritance + +**Extends:** [signalwire::rest::RestClient::FabricResourcePUT](/docs/sdk-reference/reference/cpp/rest/rest-client/fabric-resource-put) + +## Methods + +### create + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json create(const json &) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 142. + +*** + +### FabricCxmlApplications + +**Modifiers:** `inline` + +#### Signature + +```cpp +void FabricCxmlApplications(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 139. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 138. diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/fabric-generic-resources/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/fabric-generic-resources/index.mdx new file mode 100644 index 0000000000..d1ba745ab3 --- /dev/null +++ b/fern/products/sdk-reference/cpp/rest/rest-client/fabric-generic-resources/index.mdx @@ -0,0 +1,201 @@ +--- +slug: "/reference/cpp/rest/rest-client/fabric-generic-resources" +title: "FabricGenericResources" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::FabricGenericResources" + parent: "rest.RestClient" + module: "rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `FabricGenericResources` + +## Signature + +```cpp +struct signalwire::rest::RestClient::FabricGenericResources +``` + +## Properties + + + + + +## Methods + +### assign\_domain\_application + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json assign_domain_application( + const std::string & resource_id, + const json & data +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 177. + +*** + +### assign\_phone\_route + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json assign_phone_route( + const std::string & resource_id, + const json & data +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 182. + +*** + +### FabricGenericResources + +**Modifiers:** `inline` + +#### Signature + +```cpp +void FabricGenericResources(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 163. + +*** + +### get + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json get(const std::string & resource_id) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 167. + +*** + +### list + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list(const std::map< std::string, std::string > & params = {}) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 164. + +*** + +### list\_addresses + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list_addresses( + const std::string & resource_id, + const std::map< std::string, std::string > & params = {} +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 173. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 160. diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/fabric-namespace/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/fabric-namespace/index.mdx new file mode 100644 index 0000000000..4ecf18b6f8 --- /dev/null +++ b/fern/products/sdk-reference/cpp/rest/rest-client/fabric-namespace/index.mdx @@ -0,0 +1,96 @@ +--- +slug: "/reference/cpp/rest/rest-client/fabric-namespace" +title: "FabricNamespace" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::FabricNamespace" + parent: "rest.RestClient" + module: "rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `FabricNamespace` + +## Signature + +```cpp +struct signalwire::rest::RestClient::FabricNamespace +``` + +## Properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## Methods + +### FabricNamespace + +**Modifiers:** `inline` + +#### Signature + +```cpp +void FabricNamespace(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 247. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 209. diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/fabric-resource-put/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/fabric-resource-put/index.mdx new file mode 100644 index 0000000000..26b562eb48 --- /dev/null +++ b/fern/products/sdk-reference/cpp/rest/rest-client/fabric-resource-put/index.mdx @@ -0,0 +1,84 @@ +--- +slug: "/reference/cpp/rest/rest-client/fabric-resource-put" +title: "FabricResourcePUT" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::FabricResourcePUT" + parent: "rest.RestClient" + module: "rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `FabricResourcePUT` + +## Signature + +```cpp +struct signalwire::rest::RestClient::FabricResourcePUT : signalwire::rest::RestClient::FabricResource +``` + +## Inheritance + +**Extends:** [signalwire::rest::RestClient::FabricResource](/docs/sdk-reference/reference/cpp/rest/rest-client/fabric-resource) + +## Methods + +### FabricResourcePUT + +**Modifiers:** `inline` + +#### Signature + +```cpp +void FabricResourcePUT(const HttpClient & c, const std::string & base) +``` + +#### Parameters + + + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 67. + +*** + +### update + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json update(const std::string & resource_id, const json & data) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 70. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 66. diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/fabric-resource/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/fabric-resource/index.mdx new file mode 100644 index 0000000000..751ff73b04 --- /dev/null +++ b/fern/products/sdk-reference/cpp/rest/rest-client/fabric-resource/index.mdx @@ -0,0 +1,87 @@ +--- +slug: "/reference/cpp/rest/rest-client/fabric-resource" +title: "FabricResource" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::FabricResource" + parent: "rest.RestClient" + module: "rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `FabricResource` + +## Signature + +```cpp +struct signalwire::rest::RestClient::FabricResource : signalwire::rest::CrudResource +``` + +## Inheritance + +**Extends:** [signalwire::rest::CrudResource](/docs/sdk-reference/reference/cpp/rest/crud-resource) + +## Methods + +### FabricResource + +**Modifiers:** `inline` + +#### Signature + +```cpp +void FabricResource(const HttpClient & c, const std::string & base) +``` + +#### Parameters + + + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 57. + +*** + +### list\_addresses + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list_addresses( + const std::string & resource_id, + const std::map< std::string, std::string > & params = {} +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 60. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 56. diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/fabric-subscribers/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/fabric-subscribers/index.mdx new file mode 100644 index 0000000000..8d4e9a9279 --- /dev/null +++ b/fern/products/sdk-reference/cpp/rest/rest-client/fabric-subscribers/index.mdx @@ -0,0 +1,212 @@ +--- +slug: "/reference/cpp/rest/rest-client/fabric-subscribers" +title: "FabricSubscribers" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::FabricSubscribers" + parent: "rest.RestClient" + module: "rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `FabricSubscribers` + +## Signature + +```cpp +struct signalwire::rest::RestClient::FabricSubscribers : signalwire::rest::RestClient::FabricResourcePUT +``` + +## Inheritance + +**Extends:** [signalwire::rest::RestClient::FabricResourcePUT](/docs/sdk-reference/reference/cpp/rest/rest-client/fabric-resource-put) + +## Methods + +### create\_sip\_endpoint + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json create_sip_endpoint( + const std::string & subscriber_id, + const json & data +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 119. + +*** + +### delete\_sip\_endpoint + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json delete_sip_endpoint( + const std::string & subscriber_id, + const std::string & endpoint_id +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 132. + +*** + +### FabricSubscribers + +**Modifiers:** `inline` + +#### Signature + +```cpp +void FabricSubscribers(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 112. + +*** + +### get\_sip\_endpoint + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json get_sip_endpoint( + const std::string & subscriber_id, + const std::string & endpoint_id +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 122. + +*** + +### list\_sip\_endpoints + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list_sip_endpoints( + const std::string & subscriber_id, + const std::map< std::string, std::string > & params = {} +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 115. + +*** + +### update\_sip\_endpoint + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json update_sip_endpoint( + const std::string & subscriber_id, + const std::string & endpoint_id, + const json & data +) const +``` + +#### Parameters + + + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 127. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 111. diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/fabric-tokens/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/fabric-tokens/index.mdx new file mode 100644 index 0000000000..9214f64b11 --- /dev/null +++ b/fern/products/sdk-reference/cpp/rest/rest-client/fabric-tokens/index.mdx @@ -0,0 +1,186 @@ +--- +slug: "/reference/cpp/rest/rest-client/fabric-tokens" +title: "FabricTokens" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::FabricTokens" + parent: "rest.RestClient" + module: "rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `FabricTokens` + +## Signature + +```cpp +struct signalwire::rest::RestClient::FabricTokens +``` + +## Properties + + + + + +## Methods + +### create\_embed\_token + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json create_embed_token(const json & data) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 204. + +*** + +### create\_guest\_token + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json create_guest_token(const json & data) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 201. + +*** + +### create\_invite\_token + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json create_invite_token(const json & data) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 198. + +*** + +### create\_subscriber\_token + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json create_subscriber_token(const json & data) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 192. + +*** + +### FabricTokens + +**Modifiers:** `inline` + +#### Signature + +```cpp +void FabricTokens(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 190. + +*** + +### refresh\_subscriber\_token + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json refresh_subscriber_token(const json & data) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 195. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 187. diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/imported-numbers-namespace/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/imported-numbers-namespace/index.mdx new file mode 100644 index 0000000000..ac6ff10100 --- /dev/null +++ b/fern/products/sdk-reference/cpp/rest/rest-client/imported-numbers-namespace/index.mdx @@ -0,0 +1,80 @@ +--- +slug: "/reference/cpp/rest/rest-client/imported-numbers-namespace" +title: "ImportedNumbersNamespace" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::ImportedNumbersNamespace" + parent: "rest.RestClient" + module: "rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `ImportedNumbersNamespace` + +## Signature + +```cpp +struct signalwire::rest::RestClient::ImportedNumbersNamespace : signalwire::rest::CrudResource +``` + +## Inheritance + +**Extends:** [signalwire::rest::CrudResource](/docs/sdk-reference/reference/cpp/rest/crud-resource) + +## Methods + +### create + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json create(const json & data) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1231. + +*** + +### ImportedNumbersNamespace + +**Modifiers:** `inline` + +#### Signature + +```cpp +void ImportedNumbersNamespace(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1229. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1228. diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/index.mdx new file mode 100644 index 0000000000..d7116a97c7 --- /dev/null +++ b/fern/products/sdk-reference/cpp/rest/rest-client/index.mdx @@ -0,0 +1,628 @@ +--- +slug: "/reference/cpp/rest/rest-client" +title: "RestClient" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient" + parent: "signalwire::rest" + module: "rest" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `RestClient` + +Top-level SignalWire REST client with all API namespaces. + +## Signature + +```cpp +class signalwire::rest::RestClient +``` + +## Methods + +### addresses + +**Modifiers:** `inline` + +#### Signature + +```cpp +AddressesNamespace & addresses() +``` + +#### Returns + +`AddressesNamespace &` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1438. + +*** + +### calling + +**Modifiers:** `inline` + +#### Signature + +```cpp +CallingNamespace & calling() +``` + +#### Returns + +`CallingNamespace &` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1433. + +*** + +### chat + +**Modifiers:** `inline` + +#### Signature + +```cpp +ChatNamespace & chat() +``` + +#### Returns + +`ChatNamespace &` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1452. + +*** + +### compat + +**Modifiers:** `inline` + +#### Signature + +```cpp +CompatNamespace & compat() +``` + +#### Returns + +`CompatNamespace &` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1437. + +*** + +### datasphere + +**Modifiers:** `inline` + +#### Signature + +```cpp +DatasphereNamespace & datasphere() +``` + +#### Returns + +`DatasphereNamespace &` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1435. + +*** + +### fabric + +**Modifiers:** `inline` + +#### Signature + +```cpp +FabricNamespace & fabric() +``` + +#### Returns + +`FabricNamespace &` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1432. + +*** + +### from\_env + +Initialize from environment variables. + +**Modifiers:** `static` + +#### Signature + +```cpp +RestClient from_env() +``` + +#### Returns + +`RestClient` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 25. + +*** + +### http\_client + +Get the underlying HTTP client. + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const HttpClient & http_client() const +``` + +#### Returns + +`const HttpClient &` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1455. + +*** + +### imported\_numbers + +**Modifiers:** `inline` + +#### Signature + +```cpp +ImportedNumbersNamespace & imported_numbers() +``` + +#### Returns + +`ImportedNumbersNamespace &` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1446. + +*** + +### logs + +**Modifiers:** `inline` + +#### Signature + +```cpp +LogsNamespace & logs() +``` + +#### Returns + +`LogsNamespace &` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1449. + +*** + +### lookup + +**Modifiers:** `inline` + +#### Signature + +```cpp +LookupNamespace & lookup() +``` + +#### Returns + +`LookupNamespace &` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1444. + +*** + +### mfa + +**Modifiers:** `inline` + +#### Signature + +```cpp +MFANamespace & mfa() +``` + +#### Returns + +`MFANamespace &` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1447. + +*** + +### number\_groups + +**Modifiers:** `inline` + +#### Signature + +```cpp +NumberGroupsNamespace & number_groups() +``` + +#### Returns + +`NumberGroupsNamespace &` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1441. + +*** + +### phone\_numbers + +**Modifiers:** `inline` + +#### Signature + +```cpp +PhoneNumbersNamespace & phone_numbers() +``` + +#### Returns + +`PhoneNumbersNamespace &` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1434. + +*** + +### project + +**Modifiers:** `inline` + +#### Signature + +```cpp +ProjectNamespace & project() +``` + +#### Returns + +`ProjectNamespace &` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1450. + +*** + +### project\_id + +Project ID accessor (read-only). + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::string & project_id() const +``` + +#### Returns + +`const std::string &` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 37. + +*** + +### pubsub + +**Modifiers:** `inline` + +#### Signature + +```cpp +PubSubNamespace & pubsub() +``` + +#### Returns + +`PubSubNamespace &` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1451. + +*** + +### queues + +**Modifiers:** `inline` + +#### Signature + +```cpp +QueuesNamespace & queues() +``` + +#### Returns + +`QueuesNamespace &` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1439. + +*** + +### recordings + +**Modifiers:** `inline` + +#### Signature + +```cpp +RecordingsNamespace & recordings() +``` + +#### Returns + +`RecordingsNamespace &` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1440. + +*** + +### registry + +**Modifiers:** `inline` + +#### Signature + +```cpp +RegistryNamespace & registry() +``` + +#### Returns + +`RegistryNamespace &` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1448. + +*** + +### RestClient + +#### Signature + +```cpp +void RestClient( + const std::string & space, + const std::string & project_id, + const std::string & token +) +``` + +#### Parameters + + + + + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 20. + +*** + +### short\_codes + +**Modifiers:** `inline` + +#### Signature + +```cpp +ShortCodesNamespace & short_codes() +``` + +#### Returns + +`ShortCodesNamespace &` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1445. + +*** + +### sip\_profile + +**Modifiers:** `inline` + +#### Signature + +```cpp +SipProfileNamespace & sip_profile() +``` + +#### Returns + +`SipProfileNamespace &` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1443. + +*** + +### verified\_callers + +**Modifiers:** `inline` + +#### Signature + +```cpp +VerifiedCallersNamespace & verified_callers() +``` + +#### Returns + +`VerifiedCallersNamespace &` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1442. + +*** + +### video + +**Modifiers:** `inline` + +#### Signature + +```cpp +VideoNamespace & video() +``` + +#### Returns + +`VideoNamespace &` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1436. + +*** + +### with\_base\_url + +Construct with an explicit pre-built base URL (http://... or https://...) instead of synthesizing one from the SignalWire space hostname. Used by audit harnesses pointing the client at loopback fixtures. The space-based constructor remains the production path. + +**Modifiers:** `static` + +#### Signature + +```cpp +RestClient with_base_url( + const std::string & base_url, + const std::string & project_id, + const std::string & token +) +``` + +#### Parameters + + + + + + + +#### Returns + +`RestClient` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 32. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 18. diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/index__2.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/index__2.mdx new file mode 100644 index 0000000000..f3d7d60836 --- /dev/null +++ b/fern/products/sdk-reference/cpp/rest/rest-client/index__2.mdx @@ -0,0 +1,142 @@ +--- +slug: "/reference/cpp/rest/rest-client/index__2" +title: "RestClient" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "module" + language: "cpp" + qualified_name: "rest.RestClient" + parent: "signalwire::rest" + module: "rest" +--- +# `RestClient` + +## Classes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## Modules + + + + diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/logs-conferences/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/logs-conferences/index.mdx new file mode 100644 index 0000000000..5fb91ae76a --- /dev/null +++ b/fern/products/sdk-reference/cpp/rest/rest-client/logs-conferences/index.mdx @@ -0,0 +1,82 @@ +--- +slug: "/reference/cpp/rest/rest-client/logs-conferences" +title: "LogsConferences" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::LogsConferences" + parent: "rest.RestClient" + module: "rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `LogsConferences` + +## Signature + +```cpp +struct signalwire::rest::RestClient::LogsConferences +``` + +## Properties + + + + + +## Methods + +### list + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list(const std::map< std::string, std::string > & params = {}) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1377. + +*** + +### LogsConferences + +**Modifiers:** `inline` + +#### Signature + +```cpp +void LogsConferences(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1376. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1373. diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/logs-fax/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/logs-fax/index.mdx new file mode 100644 index 0000000000..cb578a9812 --- /dev/null +++ b/fern/products/sdk-reference/cpp/rest/rest-client/logs-fax/index.mdx @@ -0,0 +1,108 @@ +--- +slug: "/reference/cpp/rest/rest-client/logs-fax" +title: "LogsFax" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::LogsFax" + parent: "rest.RestClient" + module: "rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `LogsFax` + +## Signature + +```cpp +struct signalwire::rest::RestClient::LogsFax +``` + +## Properties + + + + + +## Methods + +### get + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json get(const std::string & log_id) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1368. + +*** + +### list + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list(const std::map< std::string, std::string > & params = {}) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1365. + +*** + +### LogsFax + +**Modifiers:** `inline` + +#### Signature + +```cpp +void LogsFax(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1364. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1361. diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/logs-messages/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/logs-messages/index.mdx new file mode 100644 index 0000000000..a35f1eeabf --- /dev/null +++ b/fern/products/sdk-reference/cpp/rest/rest-client/logs-messages/index.mdx @@ -0,0 +1,108 @@ +--- +slug: "/reference/cpp/rest/rest-client/logs-messages" +title: "LogsMessages" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::LogsMessages" + parent: "rest.RestClient" + module: "rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `LogsMessages` + +## Signature + +```cpp +struct signalwire::rest::RestClient::LogsMessages +``` + +## Properties + + + + + +## Methods + +### get + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json get(const std::string & log_id) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1340. + +*** + +### list + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list(const std::map< std::string, std::string > & params = {}) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1337. + +*** + +### LogsMessages + +**Modifiers:** `inline` + +#### Signature + +```cpp +void LogsMessages(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1336. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1333. diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/logs-namespace/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/logs-namespace/index.mdx new file mode 100644 index 0000000000..7127783bb9 --- /dev/null +++ b/fern/products/sdk-reference/cpp/rest/rest-client/logs-namespace/index.mdx @@ -0,0 +1,60 @@ +--- +slug: "/reference/cpp/rest/rest-client/logs-namespace" +title: "LogsNamespace" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::LogsNamespace" + parent: "rest.RestClient" + module: "rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `LogsNamespace` + +## Signature + +```cpp +struct signalwire::rest::RestClient::LogsNamespace +``` + +## Properties + + + + + + + + + +## Methods + +### LogsNamespace + +**Modifiers:** `inline` + +#### Signature + +```cpp +void LogsNamespace(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1387. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1382. diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/logs-voice/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/logs-voice/index.mdx new file mode 100644 index 0000000000..1a2c5cb09d --- /dev/null +++ b/fern/products/sdk-reference/cpp/rest/rest-client/logs-voice/index.mdx @@ -0,0 +1,139 @@ +--- +slug: "/reference/cpp/rest/rest-client/logs-voice" +title: "LogsVoice" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::LogsVoice" + parent: "rest.RestClient" + module: "rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `LogsVoice` + +## Signature + +```cpp +struct signalwire::rest::RestClient::LogsVoice +``` + +## Properties + + + + + +## Methods + +### get + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json get(const std::string & log_id) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1352. + +*** + +### list + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list(const std::map< std::string, std::string > & params = {}) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1349. + +*** + +### list\_events + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list_events( + const std::string & log_id, + const std::map< std::string, std::string > & params = {} +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1355. + +*** + +### LogsVoice + +**Modifiers:** `inline` + +#### Signature + +```cpp +void LogsVoice(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1348. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1345. diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/lookup-namespace/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/lookup-namespace/index.mdx new file mode 100644 index 0000000000..c01be60503 --- /dev/null +++ b/fern/products/sdk-reference/cpp/rest/rest-client/lookup-namespace/index.mdx @@ -0,0 +1,80 @@ +--- +slug: "/reference/cpp/rest/rest-client/lookup-namespace" +title: "LookupNamespace" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::LookupNamespace" + parent: "rest.RestClient" + module: "rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `LookupNamespace` + +## Signature + +```cpp +struct signalwire::rest::RestClient::LookupNamespace +``` + +## Properties + + + +## Methods + +### lookup + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json lookup(const std::string & number) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1212. + +*** + +### LookupNamespace + +**Modifiers:** `inline` + +#### Signature + +```cpp +void LookupNamespace(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1211. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1209. diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/mfa-namespace/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/mfa-namespace/index.mdx new file mode 100644 index 0000000000..40132d50df --- /dev/null +++ b/fern/products/sdk-reference/cpp/rest/rest-client/mfa-namespace/index.mdx @@ -0,0 +1,186 @@ +--- +slug: "/reference/cpp/rest/rest-client/mfa-namespace" +title: "MFANamespace" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::MFANamespace" + parent: "rest.RestClient" + module: "rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `MFANamespace` + +## Signature + +```cpp +struct signalwire::rest::RestClient::MFANamespace +``` + +## Properties + + + +## Methods + +### call + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json call(const json & data) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1241. + +*** + +### MFANamespace + +**Modifiers:** `inline` + +#### Signature + +```cpp +void MFANamespace(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1238. + +*** + +### request\_code + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json request_code(const json & data) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1246. + +*** + +### sms + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json sms(const json & data) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1240. + +*** + +### verify + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json verify(const std::string & request_id, const json & data) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1242. + +*** + +### verify\_code + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json verify_code(const json & data) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1247. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1236. diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/number-groups-namespace/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/number-groups-namespace/index.mdx new file mode 100644 index 0000000000..4e56f432f6 --- /dev/null +++ b/fern/products/sdk-reference/cpp/rest/rest-client/number-groups-namespace/index.mdx @@ -0,0 +1,193 @@ +--- +slug: "/reference/cpp/rest/rest-client/number-groups-namespace" +title: "NumberGroupsNamespace" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::NumberGroupsNamespace" + parent: "rest.RestClient" + module: "rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `NumberGroupsNamespace` + +## Signature + +```cpp +struct signalwire::rest::RestClient::NumberGroupsNamespace : signalwire::rest::CrudResource +``` + +## Inheritance + +**Extends:** [signalwire::rest::CrudResource](/docs/sdk-reference/reference/cpp/rest/crud-resource) + +## Methods + +### add\_membership + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json add_membership(const std::string & group_id, const json & data) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1186. + +*** + +### delete\_membership + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json delete_membership(const std::string & membership_id) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1192. + +*** + +### get\_membership + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json get_membership(const std::string & membership_id) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1189. + +*** + +### list\_memberships + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list_memberships( + const std::string & group_id, + const std::map< std::string, std::string > & params = {} +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1182. + +*** + +### NumberGroupsNamespace + +**Modifiers:** `inline` + +#### Signature + +```cpp +void NumberGroupsNamespace(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1176. + +*** + +### update + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json update(const std::string & id, const json & data) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1178. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1175. diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/phone-numbers-namespace/call-flow-options/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/phone-numbers-namespace/call-flow-options/index.mdx new file mode 100644 index 0000000000..7a13c75ff5 --- /dev/null +++ b/fern/products/sdk-reference/cpp/rest/rest-client/phone-numbers-namespace/call-flow-options/index.mdx @@ -0,0 +1,36 @@ +--- +slug: "/reference/cpp/rest/rest-client/phone-numbers-namespace/call-flow-options" +title: "CallFlowOptions" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::PhoneNumbersNamespace::CallFlowOptions" + parent: "rest.RestClient.PhoneNumbersNamespace" + module: "rest.RestClient.PhoneNumbersNamespace" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `CallFlowOptions` + +Options for binding a phone number to a call flow. + +## Signature + +```cpp +struct signalwire::rest::RestClient::PhoneNumbersNamespace::CallFlowOptions +``` + +## Properties + + + Accepts "working\_copy" or "current\_deployed" (server default when omitted). + + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 479. diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/phone-numbers-namespace/cxml-webhook-options/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/phone-numbers-namespace/cxml-webhook-options/index.mdx new file mode 100644 index 0000000000..56a6233ca5 --- /dev/null +++ b/fern/products/sdk-reference/cpp/rest/rest-client/phone-numbers-namespace/cxml-webhook-options/index.mdx @@ -0,0 +1,36 @@ +--- +slug: "/reference/cpp/rest/rest-client/phone-numbers-namespace/cxml-webhook-options" +title: "CxmlWebhookOptions" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::PhoneNumbersNamespace::CxmlWebhookOptions" + parent: "rest.RestClient.PhoneNumbersNamespace" + module: "rest.RestClient.PhoneNumbersNamespace" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `CxmlWebhookOptions` + +Options for binding a phone number to a cXML (Twilio-compat) webhook. + +## Signature + +```cpp +struct signalwire::rest::RestClient::PhoneNumbersNamespace::CxmlWebhookOptions +``` + +## Properties + + + + + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 473. diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/phone-numbers-namespace/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/phone-numbers-namespace/index.mdx new file mode 100644 index 0000000000..a7d42977fc --- /dev/null +++ b/fern/products/sdk-reference/cpp/rest/rest-client/phone-numbers-namespace/index.mdx @@ -0,0 +1,569 @@ +--- +slug: "/reference/cpp/rest/rest-client/phone-numbers-namespace" +title: "PhoneNumbersNamespace" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::PhoneNumbersNamespace" + parent: "rest.RestClient" + module: "rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `PhoneNumbersNamespace` + +## Signature + +```cpp +struct signalwire::rest::RestClient::PhoneNumbersNamespace : signalwire::rest::CrudResource +``` + +## Inheritance + +**Extends:** [signalwire::rest::CrudResource](/docs/sdk-reference/reference/cpp/rest/crud-resource) + +## Methods + +### buy + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json buy(const json & data) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 455. + +*** + +### make\_ai\_agent\_body + +**Modifiers:** `static` `inline` + +#### Signature + +```cpp +json make_ai_agent_body(const std::string & agent_id) +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 517. + +*** + +### make\_call\_flow\_body + +**Modifiers:** `static` `inline` + +#### Signature + +```cpp +json make_call_flow_body( + const std::string & flow_id, + const CallFlowOptions & opts = {} +) +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 524. + +*** + +### make\_cxml\_application\_body + +**Modifiers:** `static` `inline` + +#### Signature + +```cpp +json make_cxml_application_body(const std::string & application_id) +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 510. + +*** + +### make\_cxml\_webhook\_body + +**Modifiers:** `static` `inline` + +#### Signature + +```cpp +json make_cxml_webhook_body( + const std::string & url, + const CxmlWebhookOptions & opts = {} +) +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 499. + +*** + +### make\_relay\_application\_body + +**Modifiers:** `static` `inline` + +#### Signature + +```cpp +json make_relay_application_body(const std::string & name) +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 534. + +*** + +### make\_relay\_topic\_body + +**Modifiers:** `static` `inline` + +#### Signature + +```cpp +json make_relay_topic_body( + const std::string & topic, + const RelayTopicOptions & opts = {} +) +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 541. + +*** + +### make\_swml\_webhook\_body + +**Modifiers:** `static` `inline` + +#### Signature + +```cpp +json make_swml_webhook_body(const std::string & url) +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 492. + +*** + +### PhoneNumbersNamespace + +**Modifiers:** `inline` + +#### Signature + +```cpp +void PhoneNumbersNamespace(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 453. + +*** + +### release + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json release(const std::string & id) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 456. + +*** + +### search + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json search(const std::map< std::string, std::string > & p) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 454. + +*** + +### set\_ai\_agent + +Route inbound calls to an AI Agent Fabric resource by ID. + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json set_ai_agent( + const std::string & resource_id, + const std::string & agent_id +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 577. + +*** + +### set\_call\_flow + +Route inbound calls to a Call Flow by ID. opts.version accepts "working\_copy" or "current\_deployed". + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json set_call_flow( + const std::string & resource_id, + const std::string & flow_id, + const CallFlowOptions & opts = {} +) const +``` + +#### Parameters + + + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 584. + +*** + +### set\_cxml\_application + +Route inbound calls to an existing cXML application by ID. + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json set_cxml_application( + const std::string & resource_id, + const std::string & application_id +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 571. + +*** + +### set\_cxml\_webhook + +Route inbound calls to a cXML (Twilio-compat / LAML) webhook. Despite the wire value laml\_webhooks being plural, this creates a single cxml\_webhook Fabric resource. Extra options populate fallback and status-callback fields. + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json set_cxml_webhook( + const std::string & resource_id, + const std::string & url, + const CxmlWebhookOptions & opts = {} +) const +``` + +#### Parameters + + + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 564. + +*** + +### set\_relay\_application + +Route inbound calls to a named RELAY application. + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json set_relay_application( + const std::string & resource_id, + const std::string & name +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 591. + +*** + +### set\_relay\_topic + +Route inbound calls to a RELAY topic (client subscription). + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json set_relay_topic( + const std::string & resource_id, + const std::string & topic, + const RelayTopicOptions & opts = {} +) const +``` + +#### Parameters + + + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 597. + +*** + +### set\_swml\_webhook + +Route inbound calls to an SWML webhook URL. Server auto-creates a swml\_webhook Fabric resource keyed off this URL. + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json set_swml_webhook( + const std::string & resource_id, + const std::string & url +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 556. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 452. diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/phone-numbers-namespace/index__2.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/phone-numbers-namespace/index__2.mdx new file mode 100644 index 0000000000..aab2f7aa06 --- /dev/null +++ b/fern/products/sdk-reference/cpp/rest/rest-client/phone-numbers-namespace/index__2.mdx @@ -0,0 +1,30 @@ +--- +slug: "/reference/cpp/rest/rest-client/phone-numbers-namespace/index__2" +title: "PhoneNumbersNamespace" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "module" + language: "cpp" + qualified_name: "rest.RestClient.PhoneNumbersNamespace" + parent: "rest.RestClient" + module: "rest.RestClient" +--- +# `PhoneNumbersNamespace` + +## Classes + + + + Options for binding a phone number to a call flow. + + + + Options for binding a phone number to a cXML (Twilio-compat) webhook. + + + + Options for binding a phone number to a RELAY topic. + + diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/phone-numbers-namespace/relay-topic-options/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/phone-numbers-namespace/relay-topic-options/index.mdx new file mode 100644 index 0000000000..1d866624d4 --- /dev/null +++ b/fern/products/sdk-reference/cpp/rest/rest-client/phone-numbers-namespace/relay-topic-options/index.mdx @@ -0,0 +1,34 @@ +--- +slug: "/reference/cpp/rest/rest-client/phone-numbers-namespace/relay-topic-options" +title: "RelayTopicOptions" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::PhoneNumbersNamespace::RelayTopicOptions" + parent: "rest.RestClient.PhoneNumbersNamespace" + module: "rest.RestClient.PhoneNumbersNamespace" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `RelayTopicOptions` + +Options for binding a phone number to a RELAY topic. + +## Signature + +```cpp +struct signalwire::rest::RestClient::PhoneNumbersNamespace::RelayTopicOptions +``` + +## Properties + + + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 486. diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/project-namespace/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/project-namespace/index.mdx new file mode 100644 index 0000000000..d04bab895d --- /dev/null +++ b/fern/products/sdk-reference/cpp/rest/rest-client/project-namespace/index.mdx @@ -0,0 +1,104 @@ +--- +slug: "/reference/cpp/rest/rest-client/project-namespace" +title: "ProjectNamespace" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::ProjectNamespace" + parent: "rest.RestClient" + module: "rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `ProjectNamespace` + +## Signature + +```cpp +struct signalwire::rest::RestClient::ProjectNamespace +``` + +## Properties + + + + + +## Methods + +### get\_project + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json get_project() const +``` + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1411. + +*** + +### ProjectNamespace + +**Modifiers:** `inline` + +#### Signature + +```cpp +void ProjectNamespace(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1408. + +*** + +### update\_project + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json update_project(const json & data) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1412. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1405. diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/project-tokens/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/project-tokens/index.mdx new file mode 100644 index 0000000000..1af0c80d7a --- /dev/null +++ b/fern/products/sdk-reference/cpp/rest/rest-client/project-tokens/index.mdx @@ -0,0 +1,110 @@ +--- +slug: "/reference/cpp/rest/rest-client/project-tokens" +title: "ProjectTokens" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::ProjectTokens" + parent: "rest.RestClient" + module: "rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `ProjectTokens` + +## Signature + +```cpp +struct signalwire::rest::RestClient::ProjectTokens +``` + +## Properties + + + + + +## Methods + +### create + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json create(const json & data) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1396. + +*** + +### ProjectTokens + +**Modifiers:** `inline` + +#### Signature + +```cpp +void ProjectTokens(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1395. + +*** + +### update + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json update(const std::string & token_id, const json & data) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1397. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1392. diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/pub-sub-namespace/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/pub-sub-namespace/index.mdx new file mode 100644 index 0000000000..da635743dc --- /dev/null +++ b/fern/products/sdk-reference/cpp/rest/rest-client/pub-sub-namespace/index.mdx @@ -0,0 +1,80 @@ +--- +slug: "/reference/cpp/rest/rest-client/pub-sub-namespace" +title: "PubSubNamespace" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::PubSubNamespace" + parent: "rest.RestClient" + module: "rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `PubSubNamespace` + +## Signature + +```cpp +struct signalwire::rest::RestClient::PubSubNamespace +``` + +## Properties + + + +## Methods + +### publish + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json publish(const json & data) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1418. + +*** + +### PubSubNamespace + +**Modifiers:** `inline` + +#### Signature + +```cpp +void PubSubNamespace(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1417. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1415. diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/queues-namespace/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/queues-namespace/index.mdx new file mode 100644 index 0000000000..39f4d47fb9 --- /dev/null +++ b/fern/products/sdk-reference/cpp/rest/rest-client/queues-namespace/index.mdx @@ -0,0 +1,170 @@ +--- +slug: "/reference/cpp/rest/rest-client/queues-namespace" +title: "QueuesNamespace" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::QueuesNamespace" + parent: "rest.RestClient" + module: "rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `QueuesNamespace` + +## Signature + +```cpp +struct signalwire::rest::RestClient::QueuesNamespace : signalwire::rest::CrudResource +``` + +## Inheritance + +**Extends:** [signalwire::rest::CrudResource](/docs/sdk-reference/reference/cpp/rest/crud-resource) + +## Methods + +### get\_member + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json get_member( + const std::string & queue_id, + const std::string & member_id +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1164. + +*** + +### get\_next\_member + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json get_next_member(const std::string & queue_id) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1161. + +*** + +### list\_members + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list_members( + const std::string & queue_id, + const std::map< std::string, std::string > & params = {} +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1157. + +*** + +### QueuesNamespace + +**Modifiers:** `inline` + +#### Signature + +```cpp +void QueuesNamespace(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1152. + +*** + +### update + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json update(const std::string & id, const json & data) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1154. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1151. diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/recordings-namespace/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/recordings-namespace/index.mdx new file mode 100644 index 0000000000..fbe9333b6f --- /dev/null +++ b/fern/products/sdk-reference/cpp/rest/rest-client/recordings-namespace/index.mdx @@ -0,0 +1,54 @@ +--- +slug: "/reference/cpp/rest/rest-client/recordings-namespace" +title: "RecordingsNamespace" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::RecordingsNamespace" + parent: "rest.RestClient" + module: "rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `RecordingsNamespace` + +## Signature + +```cpp +struct signalwire::rest::RestClient::RecordingsNamespace : signalwire::rest::CrudResource +``` + +## Inheritance + +**Extends:** [signalwire::rest::CrudResource](/docs/sdk-reference/reference/cpp/rest/crud-resource) + +## Methods + +### RecordingsNamespace + +**Modifiers:** `inline` + +#### Signature + +```cpp +void RecordingsNamespace(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1170. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1169. diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/registry-brands/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/registry-brands/index.mdx new file mode 100644 index 0000000000..176853ce6d --- /dev/null +++ b/fern/products/sdk-reference/cpp/rest/rest-client/registry-brands/index.mdx @@ -0,0 +1,193 @@ +--- +slug: "/reference/cpp/rest/rest-client/registry-brands" +title: "RegistryBrands" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::RegistryBrands" + parent: "rest.RestClient" + module: "rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `RegistryBrands` + +## Signature + +```cpp +struct signalwire::rest::RestClient::RegistryBrands +``` + +## Properties + + + + + +## Methods + +### create + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json create(const json & data) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1261. + +*** + +### create\_campaign + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json create_campaign(const std::string & brand_id, const json & data) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1269. + +*** + +### get + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json get(const std::string & brand_id) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1262. + +*** + +### list + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list(const std::map< std::string, std::string > & params = {}) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1258. + +*** + +### list\_campaigns + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list_campaigns( + const std::string & brand_id, + const std::map< std::string, std::string > & params = {} +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1265. + +*** + +### RegistryBrands + +**Modifiers:** `inline` + +#### Signature + +```cpp +void RegistryBrands(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1257. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1254. diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/registry-campaigns/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/registry-campaigns/index.mdx new file mode 100644 index 0000000000..3d1adeda44 --- /dev/null +++ b/fern/products/sdk-reference/cpp/rest/rest-client/registry-campaigns/index.mdx @@ -0,0 +1,200 @@ +--- +slug: "/reference/cpp/rest/rest-client/registry-campaigns" +title: "RegistryCampaigns" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::RegistryCampaigns" + parent: "rest.RestClient" + module: "rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `RegistryCampaigns` + +## Signature + +```cpp +struct signalwire::rest::RestClient::RegistryCampaigns +``` + +## Properties + + + + + +## Methods + +### create\_order + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json create_order(const std::string & campaign_id, const json & data) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1293. + +*** + +### get + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json get(const std::string & campaign_id) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1278. + +*** + +### list\_numbers + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list_numbers( + const std::string & campaign_id, + const std::map< std::string, std::string > & params = {} +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1285. + +*** + +### list\_orders + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list_orders( + const std::string & campaign_id, + const std::map< std::string, std::string > & params = {} +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1289. + +*** + +### RegistryCampaigns + +**Modifiers:** `inline` + +#### Signature + +```cpp +void RegistryCampaigns(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1277. + +*** + +### update + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json update(const std::string & campaign_id, const json & data) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1282. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1274. diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/registry-namespace/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/registry-namespace/index.mdx new file mode 100644 index 0000000000..d1376e2de9 --- /dev/null +++ b/fern/products/sdk-reference/cpp/rest/rest-client/registry-namespace/index.mdx @@ -0,0 +1,60 @@ +--- +slug: "/reference/cpp/rest/rest-client/registry-namespace" +title: "RegistryNamespace" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::RegistryNamespace" + parent: "rest.RestClient" + module: "rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `RegistryNamespace` + +## Signature + +```cpp +struct signalwire::rest::RestClient::RegistryNamespace +``` + +## Properties + + + + + + + + + +## Methods + +### RegistryNamespace + +**Modifiers:** `inline` + +#### Signature + +```cpp +void RegistryNamespace(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1321. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1316. diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/registry-numbers/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/registry-numbers/index.mdx new file mode 100644 index 0000000000..835e9a1115 --- /dev/null +++ b/fern/products/sdk-reference/cpp/rest/rest-client/registry-numbers/index.mdx @@ -0,0 +1,56 @@ +--- +slug: "/reference/cpp/rest/rest-client/registry-numbers" +title: "RegistryNumbers" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::RegistryNumbers" + parent: "rest.RestClient" + module: "rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `RegistryNumbers` + +## Signature + +```cpp +struct signalwire::rest::RestClient::RegistryNumbers +``` + +## Properties + + + + + +## Methods + +### RegistryNumbers + +**Modifiers:** `inline` + +#### Signature + +```cpp +void RegistryNumbers(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1310. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1307. diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/registry-orders/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/registry-orders/index.mdx new file mode 100644 index 0000000000..5432fd4b07 --- /dev/null +++ b/fern/products/sdk-reference/cpp/rest/rest-client/registry-orders/index.mdx @@ -0,0 +1,82 @@ +--- +slug: "/reference/cpp/rest/rest-client/registry-orders" +title: "RegistryOrders" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::RegistryOrders" + parent: "rest.RestClient" + module: "rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `RegistryOrders` + +## Signature + +```cpp +struct signalwire::rest::RestClient::RegistryOrders +``` + +## Properties + + + + + +## Methods + +### get + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json get(const std::string & order_id) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1302. + +*** + +### RegistryOrders + +**Modifiers:** `inline` + +#### Signature + +```cpp +void RegistryOrders(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1301. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1298. diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/short-codes-namespace/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/short-codes-namespace/index.mdx new file mode 100644 index 0000000000..0a98b9a20e --- /dev/null +++ b/fern/products/sdk-reference/cpp/rest/rest-client/short-codes-namespace/index.mdx @@ -0,0 +1,82 @@ +--- +slug: "/reference/cpp/rest/rest-client/short-codes-namespace" +title: "ShortCodesNamespace" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::ShortCodesNamespace" + parent: "rest.RestClient" + module: "rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `ShortCodesNamespace` + +## Signature + +```cpp +struct signalwire::rest::RestClient::ShortCodesNamespace : signalwire::rest::CrudResource +``` + +## Inheritance + +**Extends:** [signalwire::rest::CrudResource](/docs/sdk-reference/reference/cpp/rest/crud-resource) + +## Methods + +### ShortCodesNamespace + +**Modifiers:** `inline` + +#### Signature + +```cpp +void ShortCodesNamespace(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1216. + +*** + +### update + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json update(const std::string & id, const json & data) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1218. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1215. diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/sip-profile-namespace/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/sip-profile-namespace/index.mdx new file mode 100644 index 0000000000..fcbe48c46f --- /dev/null +++ b/fern/products/sdk-reference/cpp/rest/rest-client/sip-profile-namespace/index.mdx @@ -0,0 +1,102 @@ +--- +slug: "/reference/cpp/rest/rest-client/sip-profile-namespace" +title: "SipProfileNamespace" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::SipProfileNamespace" + parent: "rest.RestClient" + module: "rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `SipProfileNamespace` + +## Signature + +```cpp +struct signalwire::rest::RestClient::SipProfileNamespace : signalwire::rest::CrudResource +``` + +## Inheritance + +**Extends:** [signalwire::rest::CrudResource](/docs/sdk-reference/reference/cpp/rest/crud-resource) + +## Methods + +### get + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json get() const +``` + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1205. + +*** + +### SipProfileNamespace + +**Modifiers:** `inline` + +#### Signature + +```cpp +void SipProfileNamespace(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1204. + +*** + +### update + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json update(const json & data) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1206. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1203. diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/verified-callers-namespace/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/verified-callers-namespace/index.mdx new file mode 100644 index 0000000000..76669e4b75 --- /dev/null +++ b/fern/products/sdk-reference/cpp/rest/rest-client/verified-callers-namespace/index.mdx @@ -0,0 +1,54 @@ +--- +slug: "/reference/cpp/rest/rest-client/verified-callers-namespace" +title: "VerifiedCallersNamespace" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::VerifiedCallersNamespace" + parent: "rest.RestClient" + module: "rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `VerifiedCallersNamespace` + +## Signature + +```cpp +struct signalwire::rest::RestClient::VerifiedCallersNamespace : signalwire::rest::CrudResource +``` + +## Inheritance + +**Extends:** [signalwire::rest::CrudResource](/docs/sdk-reference/reference/cpp/rest/crud-resource) + +## Methods + +### VerifiedCallersNamespace + +**Modifiers:** `inline` + +#### Signature + +```cpp +void VerifiedCallersNamespace(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1198. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 1197. diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/video-conference-tokens/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/video-conference-tokens/index.mdx new file mode 100644 index 0000000000..f1b7ca894e --- /dev/null +++ b/fern/products/sdk-reference/cpp/rest/rest-client/video-conference-tokens/index.mdx @@ -0,0 +1,108 @@ +--- +slug: "/reference/cpp/rest/rest-client/video-conference-tokens" +title: "VideoConferenceTokens" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::VideoConferenceTokens" + parent: "rest.RestClient" + module: "rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `VideoConferenceTokens` + +## Signature + +```cpp +struct signalwire::rest::RestClient::VideoConferenceTokens +``` + +## Properties + + + + + +## Methods + +### get + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json get(const std::string & token_id) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 747. + +*** + +### reset + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json reset(const std::string & token_id) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 750. + +*** + +### VideoConferenceTokens + +**Modifiers:** `inline` + +#### Signature + +```cpp +void VideoConferenceTokens(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 746. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 743. diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/video-conferences/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/video-conferences/index.mdx new file mode 100644 index 0000000000..eddbe47ed5 --- /dev/null +++ b/fern/products/sdk-reference/cpp/rest/rest-client/video-conferences/index.mdx @@ -0,0 +1,172 @@ +--- +slug: "/reference/cpp/rest/rest-client/video-conferences" +title: "VideoConferences" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::VideoConferences" + parent: "rest.RestClient" + module: "rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `VideoConferences` + +## Signature + +```cpp +struct signalwire::rest::RestClient::VideoConferences : signalwire::rest::CrudResource +``` + +## Inheritance + +**Extends:** [signalwire::rest::CrudResource](/docs/sdk-reference/reference/cpp/rest/crud-resource) + +## Methods + +### create\_stream + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json create_stream(const std::string & conf_id, const json & data) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 738. + +*** + +### list\_conference\_tokens + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list_conference_tokens( + const std::string & conf_id, + const std::map< std::string, std::string > & params = {} +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 730. + +*** + +### list\_streams + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list_streams( + const std::string & conf_id, + const std::map< std::string, std::string > & params = {} +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 734. + +*** + +### update + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json update(const std::string & conf_id, const json & data) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 727. + +*** + +### VideoConferences + +**Modifiers:** `inline` + +#### Signature + +```cpp +void VideoConferences(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 724. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 723. diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/video-namespace/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/video-namespace/index.mdx new file mode 100644 index 0000000000..e8870b1887 --- /dev/null +++ b/fern/products/sdk-reference/cpp/rest/rest-client/video-namespace/index.mdx @@ -0,0 +1,68 @@ +--- +slug: "/reference/cpp/rest/rest-client/video-namespace" +title: "VideoNamespace" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::VideoNamespace" + parent: "rest.RestClient" + module: "rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `VideoNamespace` + +## Signature + +```cpp +struct signalwire::rest::RestClient::VideoNamespace +``` + +## Properties + + + + + + + + + + + + + + + + + +## Methods + +### VideoNamespace + +**Modifiers:** `inline` + +#### Signature + +```cpp +void VideoNamespace(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 785. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 771. diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/video-room-recordings/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/video-room-recordings/index.mdx new file mode 100644 index 0000000000..4940ba70d8 --- /dev/null +++ b/fern/products/sdk-reference/cpp/rest/rest-client/video-room-recordings/index.mdx @@ -0,0 +1,139 @@ +--- +slug: "/reference/cpp/rest/rest-client/video-room-recordings" +title: "VideoRoomRecordings" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::VideoRoomRecordings" + parent: "rest.RestClient" + module: "rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `VideoRoomRecordings` + +## Signature + +```cpp +struct signalwire::rest::RestClient::VideoRoomRecordings +``` + +## Properties + + + + + +## Methods + +### get + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json get(const std::string & recording_id) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 711. + +*** + +### list + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list(const std::map< std::string, std::string > & params = {}) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 708. + +*** + +### list\_events + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list_events( + const std::string & recording_id, + const std::map< std::string, std::string > & params = {} +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 717. + +*** + +### VideoRoomRecordings + +**Modifiers:** `inline` + +#### Signature + +```cpp +void VideoRoomRecordings(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 707. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 704. diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/video-room-sessions/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/video-room-sessions/index.mdx new file mode 100644 index 0000000000..db93baeed7 --- /dev/null +++ b/fern/products/sdk-reference/cpp/rest/rest-client/video-room-sessions/index.mdx @@ -0,0 +1,201 @@ +--- +slug: "/reference/cpp/rest/rest-client/video-room-sessions" +title: "VideoRoomSessions" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::VideoRoomSessions" + parent: "rest.RestClient" + module: "rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `VideoRoomSessions` + +## Signature + +```cpp +struct signalwire::rest::RestClient::VideoRoomSessions +``` + +## Properties + + + + + +## Methods + +### get + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json get(const std::string & session_id) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 687. + +*** + +### list + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list(const std::map< std::string, std::string > & params = {}) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 684. + +*** + +### list\_events + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list_events( + const std::string & session_id, + const std::map< std::string, std::string > & params = {} +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 690. + +*** + +### list\_members + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list_members( + const std::string & session_id, + const std::map< std::string, std::string > & params = {} +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 694. + +*** + +### list\_recordings + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list_recordings( + const std::string & session_id, + const std::map< std::string, std::string > & params = {} +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 698. + +*** + +### VideoRoomSessions + +**Modifiers:** `inline` + +#### Signature + +```cpp +void VideoRoomSessions(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 683. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 680. diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/video-room-tokens/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/video-room-tokens/index.mdx new file mode 100644 index 0000000000..da10a1f4b3 --- /dev/null +++ b/fern/products/sdk-reference/cpp/rest/rest-client/video-room-tokens/index.mdx @@ -0,0 +1,82 @@ +--- +slug: "/reference/cpp/rest/rest-client/video-room-tokens" +title: "VideoRoomTokens" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::VideoRoomTokens" + parent: "rest.RestClient" + module: "rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `VideoRoomTokens` + +## Signature + +```cpp +struct signalwire::rest::RestClient::VideoRoomTokens +``` + +## Properties + + + + + +## Methods + +### create + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json create(const json & data) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 677. + +*** + +### VideoRoomTokens + +**Modifiers:** `inline` + +#### Signature + +```cpp +void VideoRoomTokens(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 676. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 673. diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/video-rooms/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/video-rooms/index.mdx new file mode 100644 index 0000000000..eda3e68101 --- /dev/null +++ b/fern/products/sdk-reference/cpp/rest/rest-client/video-rooms/index.mdx @@ -0,0 +1,141 @@ +--- +slug: "/reference/cpp/rest/rest-client/video-rooms" +title: "VideoRooms" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::VideoRooms" + parent: "rest.RestClient" + module: "rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `VideoRooms` + +## Signature + +```cpp +struct signalwire::rest::RestClient::VideoRooms : signalwire::rest::CrudResource +``` + +## Inheritance + +**Extends:** [signalwire::rest::CrudResource](/docs/sdk-reference/reference/cpp/rest/crud-resource) + +## Methods + +### create\_stream + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json create_stream(const std::string & room_id, const json & data) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 668. + +*** + +### list\_streams + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json list_streams( + const std::string & room_id, + const std::map< std::string, std::string > & params = {} +) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 664. + +*** + +### update + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json update(const std::string & room_id, const json & data) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 661. + +*** + +### VideoRooms + +**Modifiers:** `inline` + +#### Signature + +```cpp +void VideoRooms(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 659. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 658. diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/video-streams/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/video-streams/index.mdx new file mode 100644 index 0000000000..d5d29a6639 --- /dev/null +++ b/fern/products/sdk-reference/cpp/rest/rest-client/video-streams/index.mdx @@ -0,0 +1,110 @@ +--- +slug: "/reference/cpp/rest/rest-client/video-streams" +title: "VideoStreams" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::RestClient::VideoStreams" + parent: "rest.RestClient" + module: "rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" + visibility: "public" +--- +# `VideoStreams` + +## Signature + +```cpp +struct signalwire::rest::RestClient::VideoStreams +``` + +## Properties + + + + + +## Methods + +### get + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json get(const std::string & stream_id) const +``` + +#### Parameters + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 759. + +*** + +### update + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +json update(const std::string & stream_id, const json & data) const +``` + +#### Parameters + + + + + +#### Returns + +`json` + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 763. + +*** + +### VideoStreams + +**Modifiers:** `inline` + +#### Signature + +```cpp +void VideoStreams(const HttpClient & c) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 758. + +## Source + +[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) + +Line 755. diff --git a/fern/products/sdk-reference/cpp/rest/signal-wire-rest-error/index.mdx b/fern/products/sdk-reference/cpp/rest/signal-wire-rest-error/index.mdx new file mode 100644 index 0000000000..72f248263d --- /dev/null +++ b/fern/products/sdk-reference/cpp/rest/signal-wire-rest-error/index.mdx @@ -0,0 +1,108 @@ +--- +slug: "/reference/cpp/rest/signal-wire-rest-error" +title: "SignalWireRestError" +sdk_label: "C++ SDK" +icon: "cpp" +lustri: + auto_generated: true + kind: "class" + language: "cpp" + qualified_name: "signalwire::rest::SignalWireRestError" + parent: "signalwire::rest" + module: "rest" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp" + visibility: "public" +--- +# `SignalWireRestError` + +Error thrown on non-2xx REST API responses. + +## Signature + +```cpp +class signalwire::rest::SignalWireRestError : std::runtime_error +``` + +## Inheritance + +**Extends:** `std::runtime_error` + +## Methods + +### body + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +const std::string & body() const +``` + +#### Returns + +`const std::string &` + +#### Source + +[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) + +Line 24. + +*** + +### SignalWireRestError + +**Modifiers:** `inline` + +#### Signature + +```cpp +void SignalWireRestError( + int status, + const std::string & message, + const std::string & body = "" +) +``` + +#### Parameters + + + + + + + +#### Source + +[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) + +Line 21. + +*** + +### status + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +int status() const +``` + +#### Returns + +`int` + +#### Source + +[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) + +Line 23. + +## Source + +[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) + +Line 19. diff --git a/fern/products/sdk-reference/cpp/signalwire/agent/agent-base/index.mdx b/fern/products/sdk-reference/cpp/signalwire/agent/agent-base/index.mdx deleted file mode 100644 index 6e96f25003..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/agent/agent-base/index.mdx +++ /dev/null @@ -1,2791 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/agent/agent-base" -title: "AgentBase" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::agent::AgentBase" - parent: "signalwire::agent" - module: "signalwire.agent" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp" - visibility: "public" ---- -# `AgentBase` - -## Signature - -```cpp -class signalwire::agent::AgentBase : signalwire::swml::Service -``` - -## Inheritance - -**Extends:** [signalwire::swml::Service](/docs/sdk-reference/reference/cpp/signalwire/swml/service) - -## Methods - -### ~AgentBase - -**Modifiers:** `virtual` - -#### Signature - -```cpp -void ~AgentBase() -``` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 120. - -*** - -### add\_answer\_verb - -#### Signature - -```cpp -AgentBase & add_answer_verb(const std::string & verb_name, const json & params) -``` - -#### Parameters - - - - - -#### Returns - -`AgentBase &` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 380. - -*** - -### add\_context - -#### Signature - -```cpp -contexts::Context & add_context(const std::string & name) -``` - -#### Parameters - - - -#### Returns - -`contexts::Context &` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 392. - -*** - -### add\_function\_include - -#### Signature - -```cpp -AgentBase & add_function_include(const json & include) -``` - -#### Parameters - - - -#### Returns - -`AgentBase &` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 370. - -*** - -### add\_hint - -#### Signature - -```cpp -AgentBase & add_hint(const std::string & hint) -``` - -#### Parameters - - - -#### Returns - -`AgentBase &` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 291. - -*** - -### add\_hints - -#### Signature - -```cpp -AgentBase & add_hints(const std::vector< std::string > & hints) -``` - -#### Parameters - - - -#### Returns - -`AgentBase &` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 292. - -*** - -### add\_internal\_filler - -Add internal fillers for a single language (legacy overload; stored under the given language key at the top level). - -#### Signature - - - - ```cpp - AgentBase & add_internal_filler( - const std::string & lang, - const std::vector< std::string > & fillers - ) - ``` - - - - ```cpp - AgentBase & add_internal_filler( - const std::string & function_name, - const std::string & language_code, - const std::vector< std::string > & fillers - ) - ``` - - - -#### Parameters (Overload 1) - - - - - -#### Parameters (Overload 2) - - - - - - - -#### Returns (Overload 1) - -`AgentBase &` - -#### Returns (Overload 2) - -`AgentBase &` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 359. - -*** - -### add\_language - -#### Signature - -```cpp -AgentBase & add_language(const LanguageConfig & lang) -``` - -#### Parameters - - - -#### Returns - -`AgentBase &` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 294. - -*** - -### add\_mcp\_server - -#### Signature - -```cpp -AgentBase & add_mcp_server( - const std::string & url, - const std::map< std::string, std::string > & headers = {}, - bool resources = false, - const std::map< std::string, std::string > & resource_vars = {} -) -``` - -#### Parameters - - - - - - - - - -#### Returns - -`AgentBase &` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 422. - -*** - -### add\_pattern\_hint - -#### Signature - -```cpp -AgentBase & add_pattern_hint(const std::string & pattern) -``` - -#### Parameters - - - -#### Returns - -`AgentBase &` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 293. - -*** - -### add\_post\_ai\_verb - -#### Signature - -```cpp -AgentBase & add_post_ai_verb(const std::string & verb_name, const json & params) -``` - -#### Parameters - - - - - -#### Returns - -`AgentBase &` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 382. - -*** - -### add\_post\_answer\_verb - -#### Signature - -```cpp -AgentBase & add_post_answer_verb( - const std::string & verb_name, - const json & params -) -``` - -#### Parameters - - - - - -#### Returns - -`AgentBase &` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 381. - -*** - -### add\_pre\_answer\_verb - -#### Signature - -```cpp -AgentBase & add_pre_answer_verb( - const std::string & verb_name, - const json & params -) -``` - -#### Parameters - - - - - -#### Returns - -`AgentBase &` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 379. - -*** - -### add\_pronunciation - -#### Signature - -```cpp -AgentBase & add_pronunciation( - const std::string & replace_val, - const std::string & with_val, - bool ignore_case = false -) -``` - -#### Parameters - - - - - - - -#### Returns - -`AgentBase &` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 314. - -*** - -### add\_security\_headers - -**Modifiers:** `static` - -#### Signature - -```cpp -void add_security_headers(httplib::Response & res) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 554. - -*** - -### add\_skill - -#### Signature - - - - ```cpp - AgentBase & add_skill( - const std::string & skill_name, - const json & params = json::object() - ) - ``` - - - - ```cpp - AgentBase & add_skill( - skills::SkillName skill_name, - const json & params = json::object() - ) - ``` - - - -#### Parameters (Overload 1) - - - - - -#### Parameters (Overload 2) - - - - - -#### Returns (Overload 1) - -`AgentBase &` - -#### Returns (Overload 2) - -`AgentBase &` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 403. - -*** - -### add\_swaig\_query\_param - -#### Signature - -```cpp -AgentBase & add_swaig_query_param( - const std::string & key, - const std::string & value -) -``` - -#### Parameters - - - - - -#### Returns - -`AgentBase &` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 440. - -*** - -### AgentBase - -**Modifiers:** `explicit` - -#### Signature - - - - ```cpp - void AgentBase( - const std::string & name = "agent", - const std::string & route = "/", - const std::string & host = "0.0.0.0", - int port = 3000 - ) - ``` - - - - ```cpp - void AgentBase(const AgentBase & other) - ``` - - - -#### Parameters (Overload 1) - - - - - - - - - -#### Parameters (Overload 2) - - - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 116. - -*** - -### auth\_password - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -const std::string & auth_password() const -``` - -#### Returns - -`const std::string &` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 458. - -*** - -### auth\_username - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -const std::string & auth_username() const -``` - -#### Returns - -`const std::string &` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 457. - -*** - -### auto\_map\_sip\_usernames - -#### Signature - -```cpp -AgentBase & auto_map_sip_usernames(bool enable = true) -``` - -#### Parameters - - - -#### Returns - -`AgentBase &` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 450. - -*** - -### build\_ai\_verb - -**Modifiers:** `const` - -#### Signature - -```cpp -json build_ai_verb(const std::string & webhook_url) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 527. - -*** - -### build\_mcp\_tool\_list - -**Modifiers:** `const` - -#### Signature - -```cpp -std::vector< json > build_mcp_tool_list() const -``` - -#### Returns - -`std::vector< json >` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 429. - -*** - -### build\_prompt - -**Modifiers:** `const` - -#### Signature - -```cpp -json build_prompt() const -``` - -#### Returns - -`json` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 533. - -*** - -### build\_swaig\_functions - -**Modifiers:** `const` - -#### Signature - -```cpp -json build_swaig_functions(const std::string & webhook_url) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 530. - -*** - -### build\_webhook\_url - -**Modifiers:** `const` - -#### Signature - -```cpp -std::string build_webhook_url(const std::string & base_url) const -``` - -#### Parameters - - - -#### Returns - -`std::string` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 521. - -*** - -### clear\_post\_ai\_verbs - -#### Signature - -```cpp -AgentBase & clear_post_ai_verbs() -``` - -#### Returns - -`AgentBase &` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 385. - -*** - -### clear\_post\_answer\_verbs - -#### Signature - -```cpp -AgentBase & clear_post_answer_verbs() -``` - -#### Returns - -`AgentBase &` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 384. - -*** - -### clear\_pre\_answer\_verbs - -#### Signature - -```cpp -AgentBase & clear_pre_answer_verbs() -``` - -#### Returns - -`AgentBase &` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 383. - -*** - -### clear\_swaig\_query\_params - -#### Signature - -```cpp -AgentBase & clear_swaig_query_params() -``` - -#### Returns - -`AgentBase &` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 441. - -*** - -### clone - -**Modifiers:** `const` - -#### Signature - -```cpp -std::unique_ptr< AgentBase > clone() const -``` - -#### Returns - -`std::unique_ptr< AgentBase >` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 518. - -*** - -### create\_tool\_token - -Mint a per-call SWAIG-function token via the agent's SessionManager. -Python parity: state\_mixin.StateMixin.\_create\_tool\_token — delegates to SessionManager::create\_token and returns an empty string on any thrown exception (Python catches all exceptions and returns "" on error). - -**Modifiers:** `const` - -#### Signature - -```cpp -std::string create_tool_token( - const std::string & tool_name, - const std::string & call_id -) const -``` - -#### Parameters - - - - - -#### Returns - -`std::string` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 274. - -*** - -### define\_contexts - -#### Signature - -```cpp -contexts::ContextBuilder & define_contexts() -``` - -#### Returns - -`contexts::ContextBuilder &` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 391. - -*** - -### define\_tool - -Register a SWAIG tool (function) that the AI can invoke during a call. - -How this becomes a tool the model seesA SWAIG function is exactly the same concept as a "tool" in native OpenAI / Anthropic tool calling. On every LLM turn, the SDK renders each registered SWAIG function into the OpenAI tool schema: -\{ "type": "function", "function": \{ "name": "your\_name\_here", "description": "your description text", "parameters": \{ ... your JSON schema ... \} \} \} -That schema is sent to the model as part of the same API call that produces the next assistant message. The model reads: -the function description to decide WHEN to call this tool -each parameter description (inside parameters) to decide HOW to fill in that argument from the user's utterance - -This means descriptions are prompt engineering, not developer comments. A vague description is the #1 cause of "the model has -the right tool but doesn't call it" failures. - -Bad vs good descriptionsBAD : description: "Lookup function" GOOD: description: "Look up a customer's account details by " "account number. Use this BEFORE quoting " "any account-specific info (balance, plan, " "status). Do not use for general product " "questions." -BAD : parameters: \{"id": \{"type": "string", "description": "the id"\}\} GOOD: parameters: \{"account\_number": \{"type": "string", "description": "The customer's 8-digit account " "number, no dashes or spaces. Ask the user if they " "don't provide it."\}\} - -Tool count mattersLLM tool selection accuracy degrades past ~7-8 simultaneously-active tools per call. Use contexts::Step::set\_functions to partition tools across steps so only the relevant subset is active at any moment. - -#### Signature - - - - ```cpp - AgentBase & define_tool(const swaig::ToolDefinition & tool) - ``` - - - - ```cpp - AgentBase & define_tool( - const std::string & name, - const std::string & description, - const json & parameters, - swaig::ToolHandler handler, - bool secure = false - ) - ``` - - - -#### Parameters (Overload 1) - - - -#### Parameters (Overload 2) - - - - - - - - - - - -#### Returns (Overload 1) - -`AgentBase &` - -#### Returns (Overload 2) - -`AgentBase &` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 258. - -*** - -### detect\_proxy\_url - -**Modifiers:** `const` - -#### Signature - -```cpp -std::string detect_proxy_url( - const std::map< std::string, std::string > & headers -) const -``` - -#### Parameters - - - -#### Returns - -`std::string` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 524. - -*** - -### enable\_debug\_events - -#### Signature - -```cpp -AgentBase & enable_debug_events(bool enable = true) -``` - -#### Parameters - - - -#### Returns - -`AgentBase &` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 369. - -*** - -### enable\_debug\_routes - -#### Signature - -```cpp -AgentBase & enable_debug_routes(bool enable = true) -``` - -#### Parameters - - - -#### Returns - -`AgentBase &` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 442. - -*** - -### enable\_mcp\_server - -#### Signature - -```cpp -AgentBase & enable_mcp_server(bool enable = true) -``` - -#### Parameters - - - -#### Returns - -`AgentBase &` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 426. - -*** - -### enable\_sip\_routing - -#### Signature - -```cpp -AgentBase & enable_sip_routing(bool enable = true) -``` - -#### Parameters - - - -#### Returns - -`AgentBase &` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 448. - -*** - -### get\_contexts - -Returns the contexts dictionary as a serialised JSON object, or std::nullopt when no contexts have been defined yet. -Mirrors Python's PromptManager.get\_contexts which returns the contexts dict or None. - -**Modifiers:** `const` - -#### Signature - -```cpp -std::optional< json > get_contexts() const -``` - -#### Returns - -`std::optional< json >` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 196. - -*** - -### get\_language\_params - -Read the per-language params dict for a previously-added language. Returns std::nullopt when the code is unknown or when params were never set on that language — no exception path, mirroring Python's None return. -Python parity: AIConfigMixin.get\_language\_params (029ca6f). - -**Modifiers:** `const` - -#### Signature - -```cpp -std::optional< json > get_language_params(const std::string & code) const -``` - -#### Parameters - - - -#### Returns - -`std::optional< json >` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 313. - -*** - -### get\_post\_prompt - -Returns the post-prompt text whatever set\_post\_prompt stored, or std::nullopt when no post-prompt has been set. -Mirrors Python's PromptManager.get\_post\_prompt / PromptMixin.get\_post\_prompt — used by SWML rendering when a post-prompt is configured. - -**Modifiers:** `const` - -#### Signature - -```cpp -std::optional< std::string > get_post_prompt() const -``` - -#### Returns - -`std::optional< std::string >` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 173. - -*** - -### get\_prompt - -**Modifiers:** `const` - -#### Signature - -```cpp -std::string get_prompt() const -``` - -#### Returns - -`std::string` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 154. - -*** - -### get\_raw\_prompt - -Returns the raw prompt text whatever set\_prompt\_text stored, or std::nullopt when no raw prompt has been set. Distinct from get\_prompt which renders the POM array when use\_pom is true. -Mirrors Python's PromptManager.get\_raw\_prompt. - -**Modifiers:** `const` - -#### Signature - -```cpp -std::optional< std::string > get_raw_prompt() const -``` - -#### Returns - -`std::optional< std::string >` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 181. - -*** - -### handle\_mcp\_request - -#### Signature - -```cpp -json handle_mcp_request(const json & body) -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 430. - -*** - -### handle\_post\_prompt\_request - -#### Signature - -```cpp -void handle_post_prompt_request( - const httplib::Request & req, - httplib::Response & res -) -``` - -#### Parameters - - - - - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 548. - -*** - -### handle\_swaig\_request - -#### Signature - -```cpp -void handle_swaig_request(const httplib::Request & req, httplib::Response & res) -``` - -#### Parameters - - - - - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 545. - -*** - -### handle\_swml\_request - -#### Signature - -```cpp -void handle_swml_request(const httplib::Request & req, httplib::Response & res) -``` - -#### Parameters - - - - - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 542. - -*** - -### has\_contexts - -**Modifiers:** `const` - -#### Signature - -```cpp -bool has_contexts() const -``` - -#### Returns - -`bool` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 393. - -*** - -### has\_skill - -**Modifiers:** `const` - -#### Signature - - - - ```cpp - bool has_skill(const std::string & skill_name) const - ``` - - - - ```cpp - bool has_skill(skills::SkillName skill_name) const - ``` - - - -#### Parameters (Overload 1) - - - -#### Parameters (Overload 2) - - - -#### Returns (Overload 1) - -`bool` - -#### Returns (Overload 2) - -`bool` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 405. - -*** - -### init\_auth - -#### Signature - -```cpp -void init_auth() -``` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 536. - -*** - -### is\_mcp\_server\_enabled - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -bool is_mcp_server_enabled() const -``` - -#### Returns - -`bool` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 427. - -*** - -### list\_skills - -**Modifiers:** `const` - -#### Signature - -```cpp -std::vector< std::string > list_skills() const -``` - -#### Returns - -`std::vector< std::string >` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 406. - -*** - -### list\_tools - -**Modifiers:** `const` - -#### Signature - -```cpp -std::vector< std::string > list_tools() const -``` - -#### Returns - -`std::vector< std::string >` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 266. - -*** - -### manual\_set\_proxy\_url - -#### Signature - -```cpp -AgentBase & manual_set_proxy_url(const std::string & url) -``` - -#### Parameters - - - -#### Returns - -`AgentBase &` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 437. - -*** - -### mcp\_servers - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -const std::vector< json > & mcp_servers() const -``` - -#### Returns - -`const std::vector< json > &` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 428. - -*** - -### on\_debug\_event - -#### Signature - -```cpp -AgentBase & on_debug_event(DebugEventCallback cb) -``` - -#### Parameters - - - -#### Returns - -`AgentBase &` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 494. - -*** - -### on\_function\_call - -Dispatch a function call to the registered handler. Returns a FunctionResult; if the function isn't registered, returns a FunctionResult with a "Function not found" response. - -**Modifiers:** `virtual` - -#### Signature - -```cpp -swaig::FunctionResult on_function_call( - const std::string & name, - const json & args, - const json & raw_data -) -``` - -#### Parameters - - - - - - - -#### Returns - -`swaig::FunctionResult` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 263. - -*** - -### on\_summary - -#### Signature - -```cpp -AgentBase & on_summary(SummaryCallback cb) -``` - -#### Parameters - - - -#### Returns - -`AgentBase &` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 493. - -*** - -### operator= - -#### Signature - -```cpp -AgentBase & operator=(const AgentBase &) -``` - -#### Parameters - - - -#### Returns - -`AgentBase &` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 124. - -*** - -### pom - -Read-only snapshot of the agent's POM as a PromptObjectModel. -Python parity: agent.pom instance attribute (agent\_base.py line 209). Returns std::nullopt when use\_pom is false (mirroring Python's self.pom = None); otherwise returns a freshly built signalwire::pom::PromptObjectModel whose sections are deep-copied from the agent's internal section/ subsection structures so callers cannot mutate them in-place. - -**Modifiers:** `const` - -#### Signature - -```cpp -std::optional< signalwire::pom::PromptObjectModel > pom() const -``` - -#### Returns - -`std::optional< signalwire::pom::PromptObjectModel >` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 165. - -*** - -### prompt\_add\_section - -#### Signature - -```cpp -AgentBase & prompt_add_section( - const std::string & title, - const std::string & body = "", - const std::vector< std::string > & bullets = {} -) -``` - -#### Parameters - - - - - - - -#### Returns - -`AgentBase &` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 143. - -*** - -### prompt\_add\_subsection - -#### Signature - -```cpp -AgentBase & prompt_add_subsection( - const std::string & parent_title, - const std::string & title, - const std::string & body = "", - const std::vector< std::string > & bullets = {} -) -``` - -#### Parameters - - - - - - - - - -#### Returns - -`AgentBase &` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 146. - -*** - -### prompt\_add\_to\_section - -#### Signature - -```cpp -AgentBase & prompt_add_to_section( - const std::string & title, - const std::string & body = "", - const std::vector< std::string > & bullets = {} -) -``` - -#### Parameters - - - - - - - -#### Returns - -`AgentBase &` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 150. - -*** - -### prompt\_has\_section - -**Modifiers:** `const` - -#### Signature - -```cpp -bool prompt_has_section(const std::string & title) const -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 153. - -*** - -### register\_sip\_username - -#### Signature - -```cpp -AgentBase & register_sip_username(const std::string & username) -``` - -#### Parameters - - - -#### Returns - -`AgentBase &` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 449. - -*** - -### register\_swaig\_function - -#### Signature - -```cpp -AgentBase & register_swaig_function(const json & func_def) -``` - -#### Parameters - - - -#### Returns - -`AgentBase &` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 262. - -*** - -### remove\_skill - -#### Signature - - - - ```cpp - AgentBase & remove_skill(const std::string & skill_name) - ``` - - - - ```cpp - AgentBase & remove_skill(skills::SkillName skill_name) - ``` - - - -#### Parameters (Overload 1) - - - -#### Parameters (Overload 2) - - - -#### Returns (Overload 1) - -`AgentBase &` - -#### Returns (Overload 2) - -`AgentBase &` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 404. - -*** - -### render\_swml - -**Modifiers:** `const` - -#### Signature - -```cpp -json render_swml() const -``` - -#### Returns - -`json` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 500. - -*** - -### render\_swml\_for\_request - -**Modifiers:** `const` - -#### Signature - -```cpp -json render_swml_for_request( - const std::map< std::string, std::string > & query_params, - const json & body_params, - const std::map< std::string, std::string > & headers -) const -``` - -#### Parameters - - - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 501. - -*** - -### render\_swml\_internal - -**Modifiers:** `const` - -#### Signature - -```cpp -json render_swml_internal( - const std::map< std::string, std::string > & headers -) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 557. - -*** - -### reset\_contexts - -Remove all contexts, returning the agent to a no-contexts state. Convenience wrapper around define\_contexts().reset(). - -#### Signature - -```cpp -AgentBase & reset_contexts() -``` - -#### Returns - -`AgentBase &` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 397. - -*** - -### run - -#### Signature - -```cpp -void run() -``` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 509. - -*** - -### serve - -#### Signature - -```cpp -void serve() -``` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 510. - -*** - -### session\_manager - -**Modifiers:** `inline` - -#### Signature - -```cpp -security::SessionManager & session_manager() -``` - -#### Returns - -`security::SessionManager &` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 514. - -*** - -### set\_auth - -#### Signature - -```cpp -AgentBase & set_auth(const std::string & username, const std::string & password) -``` - -#### Parameters - - - - - -#### Returns - -`AgentBase &` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 456. - -*** - -### set\_dynamic\_config\_callback - -#### Signature - -```cpp -AgentBase & set_dynamic_config_callback(DynamicConfigCallback cb) -``` - -#### Parameters - - - -#### Returns - -`AgentBase &` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 436. - -*** - -### set\_function\_includes - -#### Signature - -```cpp -AgentBase & set_function_includes(const std::vector< json > & includes) -``` - -#### Parameters - - - -#### Returns - -`AgentBase &` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 371. - -*** - -### set\_global\_data - -#### Signature - -```cpp -AgentBase & set_global_data(const json & data) -``` - -#### Parameters - - - -#### Returns - -`AgentBase &` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 320. - -*** - -### set\_internal\_fillers - -Set internal fillers for native SWAIG functions. -Internal fillers are short phrases the AI agent speaks (via TTS) while an internal/native function is running, so the caller doesn't hear dead air during transitions or background work. -Supported function names (match the SWAIGInternalFiller schema): hangup, check\_time, wait\_for\_user, wait\_seconds, adjust\_response\_latency, next\_step, change\_context, get\_visual\_input, get\_ideal\_strategy. See supported\_internal\_filler\_names(). -Notably NOT supported: change\_step, gather\_submit, or arbitrary user-defined SWAIG function names. The runtime only honors fillers for the names listed above; everything else is silently ignored at the SWML level. This method warns at registration time if you pass an unknown name so you catch the typo early. -Expected JSON shape: \{"function\_name": \{"language\_code": \["phrase1", ...]\}, ...\} - -#### Signature - -```cpp -AgentBase & set_internal_fillers(const json & fillers) -``` - -#### Parameters - - - -#### Returns - -`AgentBase &` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 355. - -*** - -### set\_language\_params - -Set (or replace) the per-language params dict on an already-added language. Useful when language entries are built via add\_language() first and engine-specific tuning is added later (e.g. from a config loader). Passing an empty object removes the params key (treated as unset). No-op if code isn't found among previously-added languages. -Python parity: AIConfigMixin.set\_language\_params (029ca6f). - -#### Signature - -```cpp -AgentBase & set_language_params(const std::string & code, const json & params) -``` - -#### Parameters - - - - - -#### Returns - -`AgentBase &` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 305. - -*** - -### set\_languages - -#### Signature - -```cpp -AgentBase & set_languages(const std::vector< LanguageConfig > & langs) -``` - -#### Parameters - - - -#### Returns - -`AgentBase &` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 295. - -*** - -### set\_name - -**Modifiers:** `inline` - -#### Signature - -```cpp -AgentBase & set_name(const std::string & n) -``` - -#### Parameters - - - -#### Returns - -`AgentBase &` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 131. - -*** - -### set\_native\_functions - -#### Signature - -```cpp -AgentBase & set_native_functions(const std::vector< std::string > & funcs) -``` - -#### Parameters - - - -#### Returns - -`AgentBase &` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 322. - -*** - -### set\_param - -#### Signature - -```cpp -AgentBase & set_param(const std::string & key, const json & value) -``` - -#### Parameters - - - - - -#### Returns - -`AgentBase &` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 318. - -*** - -### set\_params - -#### Signature - -```cpp -AgentBase & set_params(const json & params) -``` - -#### Parameters - - - -#### Returns - -`AgentBase &` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 319. - -*** - -### set\_post\_prompt - -#### Signature - -```cpp -AgentBase & set_post_prompt(const std::string & text) -``` - -#### Parameters - - - -#### Returns - -`AgentBase &` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 141. - -*** - -### set\_post\_prompt\_llm\_params - -#### Signature - -```cpp -AgentBase & set_post_prompt_llm_params(const json & params) -``` - -#### Parameters - - - -#### Returns - -`AgentBase &` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 373. - -*** - -### set\_post\_prompt\_url - -#### Signature - -```cpp -AgentBase & set_post_prompt_url(const std::string & url) -``` - -#### Parameters - - - -#### Returns - -`AgentBase &` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 142. - -*** - -### set\_post\_prompt\_url\_direct - -#### Signature - -```cpp -AgentBase & set_post_prompt_url_direct(const std::string & url) -``` - -#### Parameters - - - -#### Returns - -`AgentBase &` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 439. - -*** - -### set\_prompt\_llm\_params - -#### Signature - -```cpp -AgentBase & set_prompt_llm_params(const json & params) -``` - -#### Parameters - - - -#### Returns - -`AgentBase &` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 372. - -*** - -### set\_prompt\_pom - -Sets the prompt as a list of POM section JSON objects. Each section supports keys "title", "body", "bullets", "numbered", "numbered\_bullets", and "subsections". Switches the agent to POM mode. -Mirrors Python's PromptManager.set\_prompt\_pom. - -#### Signature - -```cpp -AgentBase & set_prompt_pom(const std::vector< json > & pom) -``` - -#### Parameters - - - -#### Returns - -`AgentBase &` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 189. - -*** - -### set\_prompt\_text - -#### Signature - -```cpp -AgentBase & set_prompt_text(const std::string & text) -``` - -#### Parameters - - - -#### Returns - -`AgentBase &` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 140. - -*** - -### set\_pronunciations - -#### Signature - -```cpp -AgentBase & set_pronunciations(const std::vector< Pronunciation > & pronuns) -``` - -#### Parameters - - - -#### Returns - -`AgentBase &` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 317. - -*** - -### set\_signing\_key - -Set the SignalWire Signing Key (Dashboard → API Credentials). Pass the empty string to clear and revert to env-fallback behavior. - -#### Signature - -```cpp -AgentBase & set_signing_key(const std::string & key) -``` - -#### Parameters - - - -#### Returns - -`AgentBase &` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 476. - -*** - -### set\_use\_pom - -#### Signature - -```cpp -AgentBase & set_use_pom(bool use_pom) -``` - -#### Parameters - - - -#### Returns - -`AgentBase &` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 155. - -*** - -### set\_webhook\_url - -#### Signature - -```cpp -AgentBase & set_webhook_url(const std::string & url) -``` - -#### Parameters - - - -#### Returns - -`AgentBase &` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 438. - -*** - -### setup\_routes - -#### Signature - -```cpp -void setup_routes(httplib::Server & server) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 539. - -*** - -### signing\_key - -Read the resolved signing key (constructor / set\_signing\_key / SIGNALWIRE\_SIGNING\_KEY env), or std::nullopt when unset. The returned value is the secret — never log it. - -**Modifiers:** `const` - -#### Signature - -```cpp -std::optional< std::string > signing_key() const -``` - -#### Returns - -`std::optional< std::string >` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 481. - -*** - -### stop - -#### Signature - -```cpp -void stop() -``` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 511. - -*** - -### supported\_internal\_filler\_names - -The complete set of internal SWAIG function names that accept fillers, matching the SWAIGInternalFiller schema definition. Any name outside this set is silently ignored by the runtime — set\_internal\_fillers and add\_internal\_filler warn if you pass an unknown name. -Notable absences: change\_step, gather\_submit, and arbitrary user-defined SWAIG function names are NOT supported. - -**Modifiers:** `static` - -#### Signature - -```cpp -const std::set< std::string > & supported_internal_filler_names() -``` - -#### Returns - -`const std::set< std::string > &` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 331. - -*** - -### trust\_proxy\_for\_signature - -If true, X-Forwarded-Proto / X-Forwarded-Host are honored by the webhook middleware when reconstructing the URL. Default false — proxy headers are spoofable so opt in only when the reverse-proxy is trusted. - -#### Signature - -```cpp -AgentBase & trust_proxy_for_signature(bool trust) -``` - -#### Parameters - - - -#### Returns - -`AgentBase &` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 487. - -*** - -### update\_global\_data - -#### Signature - -```cpp -AgentBase & update_global_data(const json & data) -``` - -#### Parameters - - - -#### Returns - -`AgentBase &` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 321. - -*** - -### validate\_auth - -**Modifiers:** `const` - -#### Signature - -```cpp -bool validate_auth(const httplib::Request & req, httplib::Response & res) const -``` - -#### Parameters - - - - - -#### Returns - -`bool` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 551. - -*** - -### validate\_tool\_token - -Validate a per-call SWAIG-function token. Returns false when the function is not registered, when the SessionManager rejects the token, or on any underlying exception. -Python parity: state\_mixin.StateMixin.validate\_tool\_token — rejects unknown function names up-front and swallows exceptions. - -**Modifiers:** `const` - -#### Signature - -```cpp -bool validate_tool_token( - const std::string & function_name, - const std::string & token, - const std::string & call_id -) const -``` - -#### Parameters - - - - - - - -#### Returns - -`bool` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 283. - -## Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 113. diff --git a/fern/products/sdk-reference/cpp/signalwire/agent/index.mdx b/fern/products/sdk-reference/cpp/signalwire/agent/index.mdx deleted file mode 100644 index 92a9400aff..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/agent/index.mdx +++ /dev/null @@ -1,159 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/agent" -title: "agent" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "module" - language: "cpp" - qualified_name: "signalwire::agent" - parent: "signalwire" - module: "signalwire" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp" ---- -# `agent` - -## Signature - -```cpp -namespace signalwire::agent -``` - -## Classes - - - - - - Language configuration. - - - - Pronunciation rule. - - - - SWAIG query parameters. - - - -## Functions - -### sorted\_list\_str - -**Modifiers:** `static` - -#### Signature - -```cpp -std::string sorted_list_str(const std::set< std::string > & s) -``` - -#### Parameters - - - -#### Returns - -`std::string` - -#### Source - -[`src/agent/agent_base.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/agent/agent_base.cpp) - -Line 458. - -## Type Aliases - -### DebugEventCallback - -Debug event callback type. - -#### Signature - -```cpp -typedef std::function< void(const json &event)> DebugEventCallback -``` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 101. - -*** - -### DynamicConfigCallback - -Dynamic config callback type. - -#### Signature - -```cpp -typedef std::function< void( const std::map< std::string, std::string > &query_params, const json &body_params, const std::map< std::string, std::string > &headers, class AgentBase &agent_copy)> DynamicConfigCallback -``` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 90. - -*** - -### json - -#### Signature - -```cpp -typedef nlohmann::json json -``` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 34. - -*** - -### PomSection - -Back-compat alias for the original signalwire::agent::PomSection type. The implementation now lives in signalwire::pom::Section — see signalwire/pom/pom.hpp for the full API (render\_markdown, render\_xml, numbered/numberedBullets fields, etc.). New code should use signalwire::pom::Section directly. - -#### Signature - -```cpp -typedef signalwire::pom::Section PomSection -``` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 41. - -*** - -### SummaryCallback - -Summary callback type. - -#### Signature - -```cpp -typedef std::function< void(const json &summary, const json &raw_data)> SummaryCallback -``` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 98. - -## Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 32. diff --git a/fern/products/sdk-reference/cpp/signalwire/agent/language-config/index.mdx b/fern/products/sdk-reference/cpp/signalwire/agent/language-config/index.mdx deleted file mode 100644 index f5008b44c5..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/agent/language-config/index.mdx +++ /dev/null @@ -1,68 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/agent/language-config" -title: "LanguageConfig" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::agent::LanguageConfig" - parent: "signalwire::agent" - module: "signalwire.agent" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp" - visibility: "public" ---- -# `LanguageConfig` - -Language configuration. - -## Signature - -```cpp -struct signalwire::agent::LanguageConfig -``` - -## Properties - - - - - - - - - - - Per-language params dict (engine-specific tuning, voice settings, etc.). Emitted as the language object's params key in SWML only when non-empty — matches Python reference commit 029ca6f. Treated as "unset" when null OR when an empty object. - - - - -## Methods - -### to\_json - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json to_json() const -``` - -#### Returns - -`json` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 57. - -## Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 44. diff --git a/fern/products/sdk-reference/cpp/signalwire/agent/pronunciation/index.mdx b/fern/products/sdk-reference/cpp/signalwire/agent/pronunciation/index.mdx deleted file mode 100644 index 3f6bc338c4..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/agent/pronunciation/index.mdx +++ /dev/null @@ -1,60 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/agent/pronunciation" -title: "Pronunciation" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::agent::Pronunciation" - parent: "signalwire::agent" - module: "signalwire.agent" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp" - visibility: "public" ---- -# `Pronunciation` - -Pronunciation rule. - -## Signature - -```cpp -struct signalwire::agent::Pronunciation -``` - -## Properties - - - - - - - -## Methods - -### to\_json - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json to_json() const -``` - -#### Returns - -`json` - -#### Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 80. - -## Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 75. diff --git a/fern/products/sdk-reference/cpp/signalwire/agent/swaig-query-param/index.mdx b/fern/products/sdk-reference/cpp/signalwire/agent/swaig-query-param/index.mdx deleted file mode 100644 index 059169e4f7..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/agent/swaig-query-param/index.mdx +++ /dev/null @@ -1,36 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/agent/swaig-query-param" -title: "SwaigQueryParam" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::agent::SwaigQueryParam" - parent: "signalwire::agent" - module: "signalwire.agent" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp" - visibility: "public" ---- -# `SwaigQueryParam` - -SWAIG query parameters. - -## Signature - -```cpp -struct signalwire::agent::SwaigQueryParam -``` - -## Properties - - - - - -## Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 104. diff --git a/fern/products/sdk-reference/cpp/signalwire/contexts/context-builder/index.mdx b/fern/products/sdk-reference/cpp/signalwire/contexts/context-builder/index.mdx deleted file mode 100644 index 8a6ad4d257..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/contexts/context-builder/index.mdx +++ /dev/null @@ -1,229 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/contexts/context-builder" -title: "ContextBuilder" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::contexts::ContextBuilder" - parent: "signalwire::contexts" - module: "signalwire.contexts" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp" - visibility: "public" ---- -# `ContextBuilder` - -Builder for multi-step, multi-context AI agent workflows. -A ContextBuilder owns one or more Contexts; each Context owns an ordered list of Steps. Only one context and one step is active at a time. Per chat turn, the runtime injects the current step's instructions as a system message, then asks the LLM for a response. - -Native tools auto-injected by the runtimeWhen a step (or its enclosing context) declares valid\_steps or valid\_contexts, the runtime auto-injects two native tools so the model can navigate the flow: - -next\_step(step: enum) — present when valid\_steps is set -change\_context(context: enum) — present when valid\_contexts is set - -A third native tool — gather\_submit — is injected during gather\_info questioning. These three names are reserved: validate() rejects any agent that defines a SWAIG tool with one of them. See reserved\_native\_tool\_names(). - -Function whitelisting (Step::set\_functions)Each step may declare a functions whitelist. The whitelist is applied in-memory at the start of each LLM turn. CRITICALLY: if a step does NOT declare a functions field, it INHERITS the previous step's active set. See Step::set\_functions for details and examples. - -## Signature - -```cpp -class signalwire::contexts::ContextBuilder -``` - -## Methods - -### add\_context - -Add a new context. - -#### Signature - -```cpp -Context & add_context(const std::string & name) -``` - -#### Parameters - - - -#### Returns - -`Context &` - -#### Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 405. - -*** - -### attach\_tool\_name\_supplier - -Attach a tool-name supplier so validate() can check user-defined SWAIG tool names against reserved\_native\_tool\_names(). AgentBase::define\_contexts() wires this up automatically. - -#### Signature - -```cpp -ContextBuilder & attach_tool_name_supplier( - std::function< std::vector< std::string >()> supplier -) -``` - -#### Parameters - - - -#### Returns - -`ContextBuilder &` - -#### Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 414. - -*** - -### ContextBuilder - -#### Signature - -```cpp -void ContextBuilder() -``` - -#### Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 399. - -*** - -### get\_context - -Get an existing context. - -#### Signature - -```cpp -Context * get_context(const std::string & name) -``` - -#### Parameters - - - -#### Returns - -`Context *` - -#### Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 408. - -*** - -### has\_contexts - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -bool has_contexts() const -``` - -#### Returns - -`bool` - -#### Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 429. - -*** - -### reset - -Remove all contexts, returning the builder to its initial state. - -#### Signature - -```cpp -ContextBuilder & reset() -``` - -#### Returns - -`ContextBuilder &` - -#### Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 402. - -*** - -### to\_json - -Serialize all contexts to JSON. - -**Modifiers:** `const` - -#### Signature - -```cpp -json to_json() const -``` - -#### Returns - -`json` - -#### Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 427. - -*** - -### validate - -Validate all contexts. Checks: -At least one context is defined -A single context must be named "default" -Every context has at least one step -gather\_info completion\_action targets an existing step -No user-defined SWAIG tool collides with a reserved native name (via the attached tool-name supplier) - -**Modifiers:** `const` - -#### Signature - -```cpp -void validate() const -``` - -#### Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 424. - -## Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 397. diff --git a/fern/products/sdk-reference/cpp/signalwire/contexts/context/index.mdx b/fern/products/sdk-reference/cpp/signalwire/contexts/context/index.mdx deleted file mode 100644 index 4dbb8be411..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/contexts/context/index.mdx +++ /dev/null @@ -1,836 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/contexts/context" -title: "Context" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::contexts::Context" - parent: "signalwire::contexts" - module: "signalwire.contexts" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp" - visibility: "public" ---- -# `Context` - -## Signature - -```cpp -class signalwire::contexts::Context -``` - -## Methods - -### add\_bullets - -Add a POM section with bullets to the context prompt. - -#### Signature - -```cpp -Context & add_bullets( - const std::string & title, - const std::vector< std::string > & bullets -) -``` - -#### Parameters - - - - - -#### Returns - -`Context &` - -#### Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 310. - -*** - -### add\_enter\_filler - -Add enter filler for a specific language. - -#### Signature - -```cpp -Context & add_enter_filler( - const std::string & lang, - const std::vector< std::string > & fillers -) -``` - -#### Parameters - - - - - -#### Returns - -`Context &` - -#### Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 325. - -*** - -### add\_exit\_filler - -Add exit filler for a specific language. - -#### Signature - -```cpp -Context & add_exit_filler( - const std::string & lang, - const std::vector< std::string > & fillers -) -``` - -#### Parameters - - - - - -#### Returns - -`Context &` - -#### Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 328. - -*** - -### add\_section - -Add a POM section to the context prompt. - -#### Signature - -```cpp -Context & add_section(const std::string & title, const std::string & body) -``` - -#### Parameters - - - - - -#### Returns - -`Context &` - -#### Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 307. - -*** - -### add\_step - -Add a new step to this context (returns reference for chaining). - -#### Signature - -```cpp -Step & add_step( - const std::string & name, - const std::string & task = "", - const std::vector< std::string > & bullets = {}, - const std::string & criteria = "", - const std::optional< std::variant< std::string, std::vector< std::string > > > & functions = std::nullopt, - const std::vector< std::string > & valid_steps = {} -) -``` - -#### Parameters - - - - - - - - - - - - - -#### Returns - -`Step &` - -#### Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 240. - -*** - -### add\_system\_bullets - -Add a POM section with bullets to the system prompt. - -#### Signature - -```cpp -Context & add_system_bullets( - const std::string & title, - const std::vector< std::string > & bullets -) -``` - -#### Parameters - - - - - -#### Returns - -`Context &` - -#### Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 316. - -*** - -### add\_system\_section - -Add a POM section to the system prompt. - -#### Signature - -```cpp -Context & add_system_section( - const std::string & title, - const std::string & body -) -``` - -#### Parameters - - - - - -#### Returns - -`Context &` - -#### Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 313. - -*** - -### Context - -#### Signature - - - - ```cpp - void Context() - ``` - - - - ```cpp - void Context(const std::string & name) - ``` - - - -#### Parameters (Overload 2) - - - -#### Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 236. - -*** - -### get\_step - -Get an existing step by name. - -#### Signature - -```cpp -Step * get_step(const std::string & name) -``` - -#### Parameters - - - -#### Returns - -`Step *` - -#### Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 248. - -*** - -### has\_steps - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -bool has_steps() const -``` - -#### Returns - -`bool` - -#### Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 334. - -*** - -### initial\_step - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -const std::optional< std::string > & initial_step() const -``` - -#### Returns - -`const std::optional< std::string > &` - -#### Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 337. - -*** - -### move\_step - -Move a step to a specific position. - -#### Signature - -```cpp -Context & move_step(const std::string & name, int position) -``` - -#### Parameters - - - - - -#### Returns - -`Context &` - -#### Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 254. - -*** - -### name - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -const std::string & name() const -``` - -#### Returns - -`const std::string &` - -#### Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 333. - -*** - -### remove\_step - -Remove a step. - -#### Signature - -```cpp -Context & remove_step(const std::string & name) -``` - -#### Parameters - - - -#### Returns - -`Context &` - -#### Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 251. - -*** - -### set\_consolidate - -Set consolidate. - -#### Signature - -```cpp -Context & set_consolidate(bool c) -``` - -#### Parameters - - - -#### Returns - -`Context &` - -#### Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 275. - -*** - -### set\_enter\_fillers - -Set enter fillers. - -#### Signature - -```cpp -Context & set_enter_fillers(const json & fillers) -``` - -#### Parameters - - - -#### Returns - -`Context &` - -#### Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 319. - -*** - -### set\_exit\_fillers - -Set exit fillers. - -#### Signature - -```cpp -Context & set_exit_fillers(const json & fillers) -``` - -#### Parameters - - - -#### Returns - -`Context &` - -#### Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 322. - -*** - -### set\_full\_reset - -Set full reset. - -#### Signature - -```cpp -Context & set_full_reset(bool fr) -``` - -#### Parameters - - - -#### Returns - -`Context &` - -#### Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 278. - -*** - -### set\_initial\_step - -Set which step the context starts on when entered. -By default, a context starts on its first step (index 0). Use this to skip a preamble step on re-entry via change\_context. - -#### Signature - -```cpp -Context & set_initial_step(const std::string & step_name) -``` - -#### Parameters - - - -#### Returns - -`Context &` - -#### Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 260. - -*** - -### set\_isolated - -Mark this context as isolated — entering it wipes conversation history. -When isolated=true and the context is entered via change\_context, the runtime wipes the conversation array. The model starts fresh with only the new context's system\_prompt + step instructions, with no memory of prior turns. -EXCEPTION — reset overrides the wipe: If the context also has a reset configuration (via set\_consolidate or set\_full\_reset), the wipe is skipped in favor of the reset behavior. Use reset with consolidate=true to summarize prior history into a single message instead of dropping it entirely. -Use cases: switching to a sensitive billing flow that should not see prior small-talk; handing off to a different agent persona; resetting after a long off-topic detour. - -#### Signature - -```cpp -Context & set_isolated(bool isolated) -``` - -#### Parameters - - - -#### Returns - -`Context &` - -#### Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 301. - -*** - -### set\_post\_prompt - -Set post prompt override. - -#### Signature - -```cpp -Context & set_post_prompt(const std::string & pp) -``` - -#### Parameters - - - -#### Returns - -`Context &` - -#### Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 269. - -*** - -### set\_prompt - -Set prompt text directly. - -#### Signature - -```cpp -Context & set_prompt(const std::string & prompt) -``` - -#### Parameters - - - -#### Returns - -`Context &` - -#### Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 304. - -*** - -### set\_system\_prompt - -Set system prompt (for context switching). - -#### Signature - -```cpp -Context & set_system_prompt(const std::string & sp) -``` - -#### Parameters - - - -#### Returns - -`Context &` - -#### Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 272. - -*** - -### set\_user\_prompt - -Set user prompt. - -#### Signature - -```cpp -Context & set_user_prompt(const std::string & up) -``` - -#### Parameters - - - -#### Returns - -`Context &` - -#### Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 281. - -*** - -### set\_valid\_contexts - -Set valid contexts for navigation. - -#### Signature - -```cpp -Context & set_valid_contexts(const std::vector< std::string > & ctxs) -``` - -#### Parameters - - - -#### Returns - -`Context &` - -#### Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 263. - -*** - -### set\_valid\_steps - -Set valid steps for all steps in this context. - -#### Signature - -```cpp -Context & set_valid_steps(const std::vector< std::string > & steps) -``` - -#### Parameters - - - -#### Returns - -`Context &` - -#### Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 266. - -*** - -### step\_order - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -const std::vector< std::string > & step_order() const -``` - -#### Returns - -`const std::vector< std::string > &` - -#### Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 336. - -*** - -### steps - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -const std::map< std::string, Step > & steps() const -``` - -#### Returns - -`const std::map< std::string, Step > &` - -#### Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 335. - -*** - -### to\_json - -Serialize to JSON. - -**Modifiers:** `const` - -#### Signature - -```cpp -json to_json() const -``` - -#### Returns - -`json` - -#### Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 331. - -*** - -### valid\_contexts - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -const std::optional< std::vector< std::string > > & valid_contexts() const -``` - -#### Returns - -`const std::optional< std::vector< std::string > > &` - -#### Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 338. - -## Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 234. diff --git a/fern/products/sdk-reference/cpp/signalwire/contexts/gather-info/index.mdx b/fern/products/sdk-reference/cpp/signalwire/contexts/gather-info/index.mdx deleted file mode 100644 index b47e6ae6a4..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/contexts/gather-info/index.mdx +++ /dev/null @@ -1,185 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/contexts/gather-info" -title: "GatherInfo" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::contexts::GatherInfo" - parent: "signalwire::contexts" - module: "signalwire.contexts" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp" - visibility: "public" ---- -# `GatherInfo` - -## Signature - -```cpp -class signalwire::contexts::GatherInfo -``` - -## Methods - -### add\_question - -#### Signature - -```cpp -GatherInfo & add_question( - const std::string & key, - const std::string & question, - const std::string & type = "string", - bool confirm = false, - const std::string & prompt = "", - const std::vector< std::string > & functions = {} -) -``` - -#### Parameters - - - - - - - - - - - - - -#### Returns - -`GatherInfo &` - -#### Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 65. - -*** - -### completion\_action - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -const std::string & completion_action() const -``` - -#### Returns - -`const std::string &` - -#### Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 74. - -*** - -### GatherInfo - -#### Signature - -```cpp -void GatherInfo( - const std::string & output_key = "", - const std::string & completion_action = "", - const std::string & prompt = "" -) -``` - -#### Parameters - - - - - - - -#### Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 61. - -*** - -### has\_questions - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -bool has_questions() const -``` - -#### Returns - -`bool` - -#### Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 72. - -*** - -### questions - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -const std::vector< GatherQuestion > & questions() const -``` - -#### Returns - -`const std::vector< GatherQuestion > &` - -#### Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 73. - -*** - -### to\_json - -**Modifiers:** `const` - -#### Signature - -```cpp -json to_json() const -``` - -#### Returns - -`json` - -#### Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 70. - -## Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 59. diff --git a/fern/products/sdk-reference/cpp/signalwire/contexts/gather-question/index.mdx b/fern/products/sdk-reference/cpp/signalwire/contexts/gather-question/index.mdx deleted file mode 100644 index 5abd6d0fec..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/contexts/gather-question/index.mdx +++ /dev/null @@ -1,109 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/contexts/gather-question" -title: "GatherQuestion" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::contexts::GatherQuestion" - parent: "signalwire::contexts" - module: "signalwire.contexts" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp" - visibility: "public" ---- -# `GatherQuestion` - -## Signature - -```cpp -class signalwire::contexts::GatherQuestion -``` - -## Methods - -### GatherQuestion - -#### Signature - -```cpp -void GatherQuestion( - const std::string & key, - const std::string & question, - const std::string & type = "string", - bool confirm = false, - const std::string & prompt = "", - const std::vector< std::string > & functions = {} -) -``` - -#### Parameters - - - - - - - - - - - - - -#### Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 37. - -*** - -### key - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -const std::string & key() const -``` - -#### Returns - -`const std::string &` - -#### Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 44. - -*** - -### to\_json - -**Modifiers:** `const` - -#### Signature - -```cpp -json to_json() const -``` - -#### Returns - -`json` - -#### Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 42. - -## Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 35. diff --git a/fern/products/sdk-reference/cpp/signalwire/contexts/index.mdx b/fern/products/sdk-reference/cpp/signalwire/contexts/index.mdx deleted file mode 100644 index 6051c712cf..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/contexts/index.mdx +++ /dev/null @@ -1,89 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/contexts" -title: "contexts" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "module" - language: "cpp" - qualified_name: "signalwire::contexts" - parent: "signalwire" - module: "signalwire" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp" ---- -# `contexts` - -## Signature - -```cpp -namespace signalwire::contexts -``` - -## Constants - - - - - -## Classes - - - - - - Builder for multi-step, multi-context AI agent workflows. A ContextBuilder owns one or more Contexts; each Context owns an ordered list of Steps. Only one context and one step is active at a time. Per chat turn, the runtime injects the current step's instructions as a system message, then asks the LLM for a response. - - - - - - - - - -## Functions - -### reserved\_native\_tool\_names - -Reserved tool names auto-injected by the runtime when contexts/steps are present. User-defined SWAIG tools must not collide with these names: -next\_step / change\_context are injected when valid\_steps or valid\_contexts is set so the model can navigate the flow. -gather\_submit is injected while a step's gather\_info is collecting answers. ContextBuilder::validate() rejects any agent that registers a user tool sharing one of these names. - -#### Signature - -```cpp -const std::set< std::string > & reserved_native_tool_names() -``` - -#### Returns - -`const std::set< std::string > &` - -#### Source - -[`src/contexts/contexts.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/contexts/contexts.cpp) - -Line 10. - -## Type Aliases - -### json - -#### Signature - -```cpp -typedef nlohmann::json json -``` - -#### Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 16. - -## Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 14. diff --git a/fern/products/sdk-reference/cpp/signalwire/contexts/step/index.mdx b/fern/products/sdk-reference/cpp/signalwire/contexts/step/index.mdx deleted file mode 100644 index f48ad3a775..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/contexts/step/index.mdx +++ /dev/null @@ -1,657 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/contexts/step" -title: "Step" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::contexts::Step" - parent: "signalwire::contexts" - module: "signalwire.contexts" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp" - visibility: "public" ---- -# `Step` - -## Signature - -```cpp -class signalwire::contexts::Step -``` - -## Methods - -### add\_bullets - -Add a POM section with bullet points. - -#### Signature - -```cpp -Step & add_bullets( - const std::string & title, - const std::vector< std::string > & bullets -) -``` - -#### Parameters - - - - - -#### Returns - -`Step &` - -#### Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 99. - -*** - -### add\_gather\_question - -Add a gather question (set\_gather\_info must be called first). -IMPORTANT — gather mode locks function access: While the model is asking gather questions, the runtime forcibly deactivates ALL of the step's other functions. The only callable tools during a gather question are: - -gather\_submit (the native answer-submission tool) -Whatever names you pass in this question's functions argument - -next\_step and change\_context are also filtered out — the model cannot navigate away until the gather completes. This is by design: it forces a tight ask → submit → next-question loop. -If a question needs to call out to a tool (e.g. validate an email, geocode a ZIP), list that tool name in this question's functions argument. Functions listed here are active ONLY for this question. - -#### Signature - -```cpp -Step & add_gather_question( - const std::string & key, - const std::string & question, - const std::string & type = "string", - bool confirm = false, - const std::string & prompt = "", - const std::vector< std::string > & functions = {} -) -``` - -#### Parameters - - - - - - - - - - - - - -#### Returns - -`Step &` - -#### Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 186. - -*** - -### add\_section - -Add a POM section to the step. - -#### Signature - -```cpp -Step & add_section(const std::string & title, const std::string & body) -``` - -#### Parameters - - - - - -#### Returns - -`Step &` - -#### Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 96. - -*** - -### clear\_sections - -Clear all sections and text. - -#### Signature - -```cpp -Step & clear_sections() -``` - -#### Returns - -`Step &` - -#### Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 192. - -*** - -### gather\_info - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -const std::optional< GatherInfo > & gather_info() const -``` - -#### Returns - -`const std::optional< GatherInfo > &` - -#### Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 206. - -*** - -### name - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -const std::string & name() const -``` - -#### Returns - -`const std::string &` - -#### Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 203. - -*** - -### set\_end - -Mark this step as terminal for the step flow. -IMPORTANT: end=true does NOT end the conversation or hang up the call. It exits step mode entirely after this step executes — clearing the steps list, current step index, valid\_steps, and valid\_contexts. The agent keeps running, but operates only under the base system prompt and the context-level prompt; no more step instructions are injected and no more next\_step tool is offered. -To actually end the call, call a hangup tool or define a hangup hook. - -#### Signature - -```cpp -Step & set_end(bool end) -``` - -#### Parameters - - - -#### Returns - -`Step &` - -#### Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 153. - -*** - -### set\_functions - -Set which non-internal functions are callable while this step is active. -IMPORTANT — inheritance behavior: If you do NOT call this method, the step inherits whichever function set was active on the previous step (or the previous context's last step). The server-side runtime only resets the active set when a step explicitly declares its functions field. This is the most common source of bugs in multi-step agents: forgetting set\_functions on a later step lets the previous step's tools leak through. Best practice is to call set\_functions explicitly on every step that should differ from the previous one. -Keep the per-step active set small: LLM tool selection accuracy degrades noticeably past ~7-8 simultaneously-active tools per call. Use per-step whitelisting to partition large tool collections. -Internal functions (e.g. gather\_submit, hangup hook) are ALWAYS protected and cannot be deactivated by this whitelist. The native navigation tools next\_step and change\_context are injected automatically when set\_valid\_steps / set\_valid\_contexts is used; they are not affected by this list. - -functions - -One of: -std::vectorstd::string — whitelist of allowed names -empty std::vector — disable all user functions -std::string "none" — synonym for the empty vector - -#### Signature - -```cpp -Step & set_functions( - const std::variant< std::string, std::vector< std::string > > & functions -) -``` - -#### Parameters - - - One of: std::vectorstd::string — whitelist of allowed names empty std::vector — disable all user functions std::string "none" — synonym for the empty vector - - -#### Returns - -`Step &` - -#### Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 133. - -*** - -### set\_gather\_info - -Enable info gathering on this step. - -#### Signature - -```cpp -Step & set_gather_info( - const std::string & output_key = "", - const std::string & completion_action = "", - const std::string & prompt = "" -) -``` - -#### Parameters - - - - - - - -#### Returns - -`Step &` - -#### Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 162. - -*** - -### set\_reset\_consolidate - -#### Signature - -```cpp -Step & set_reset_consolidate(bool c) -``` - -#### Parameters - - - -#### Returns - -`Step &` - -#### Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 197. - -*** - -### set\_reset\_full\_reset - -#### Signature - -```cpp -Step & set_reset_full_reset(bool fr) -``` - -#### Parameters - - - -#### Returns - -`Step &` - -#### Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 198. - -*** - -### set\_reset\_system\_prompt - -Set reset parameters for context switching. - -#### Signature - -```cpp -Step & set_reset_system_prompt(const std::string & sp) -``` - -#### Parameters - - - -#### Returns - -`Step &` - -#### Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 195. - -*** - -### set\_reset\_user\_prompt - -#### Signature - -```cpp -Step & set_reset_user_prompt(const std::string & up) -``` - -#### Parameters - - - -#### Returns - -`Step &` - -#### Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 196. - -*** - -### set\_skip\_to\_next\_step - -Set whether to auto-advance to the next step. - -#### Signature - -```cpp -Step & set_skip_to_next_step(bool skip) -``` - -#### Parameters - - - -#### Returns - -`Step &` - -#### Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 159. - -*** - -### set\_skip\_user\_turn - -Set whether to skip waiting for user input. - -#### Signature - -```cpp -Step & set_skip_user_turn(bool skip) -``` - -#### Parameters - - - -#### Returns - -`Step &` - -#### Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 156. - -*** - -### set\_step\_criteria - -Set step completion criteria. - -#### Signature - -```cpp -Step & set_step_criteria(const std::string & criteria) -``` - -#### Parameters - - - -#### Returns - -`Step &` - -#### Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 102. - -*** - -### set\_text - -Set the step's prompt text directly. - -#### Signature - -```cpp -Step & set_text(const std::string & text) -``` - -#### Parameters - - - -#### Returns - -`Step &` - -#### Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 93. - -*** - -### set\_valid\_contexts - -Set which contexts can be navigated to from this step. - -#### Signature - -```cpp -Step & set_valid_contexts(const std::vector< std::string > & ctxs) -``` - -#### Parameters - - - -#### Returns - -`Step &` - -#### Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 139. - -*** - -### set\_valid\_steps - -Set which steps can be navigated to from this step. - -#### Signature - -```cpp -Step & set_valid_steps(const std::vector< std::string > & steps) -``` - -#### Parameters - - - -#### Returns - -`Step &` - -#### Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 136. - -*** - -### Step - -#### Signature - - - - ```cpp - void Step() - ``` - - - - ```cpp - void Step(const std::string & name) - ``` - - - -#### Parameters (Overload 2) - - - -#### Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 89. - -*** - -### to\_json - -Serialize to JSON. - -**Modifiers:** `const` - -#### Signature - -```cpp -json to_json() const -``` - -#### Returns - -`json` - -#### Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 201. - -*** - -### valid\_contexts - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -const std::optional< std::vector< std::string > > & valid_contexts() const -``` - -#### Returns - -`const std::optional< std::vector< std::string > > &` - -#### Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 205. - -*** - -### valid\_steps - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -const std::optional< std::vector< std::string > > & valid_steps() const -``` - -#### Returns - -`const std::optional< std::vector< std::string > > &` - -#### Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 204. - -## Source - -[`include/signalwire/contexts/contexts.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/contexts/contexts.hpp) - -Line 87. diff --git a/fern/products/sdk-reference/cpp/signalwire/core/index.mdx b/fern/products/sdk-reference/cpp/signalwire/core/index.mdx deleted file mode 100644 index a6ee013e28..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/core/index.mdx +++ /dev/null @@ -1,33 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/core" -title: "core" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "module" - language: "cpp" - qualified_name: "signalwire::core" - parent: "signalwire" - module: "signalwire" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/core/logging_config.hpp" ---- -# `core` - -## Signature - -```cpp -namespace signalwire::core -``` - -## Modules - - - - - -## Source - -[`include/signalwire/core/logging_config.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/core/logging_config.hpp) - -Line 11. diff --git a/fern/products/sdk-reference/cpp/signalwire/core/logging-config/index.mdx b/fern/products/sdk-reference/cpp/signalwire/core/logging-config/index.mdx deleted file mode 100644 index a63473225f..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/core/logging-config/index.mdx +++ /dev/null @@ -1,58 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/core/logging-config" -title: "logging_config" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "module" - language: "cpp" - qualified_name: "signalwire::core::logging_config" - parent: "signalwire::core" - module: "signalwire.core" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/core/logging_config.hpp" ---- -# `logging_config` - -## Signature - -```cpp -namespace signalwire::core::logging_config -``` - -## Functions - -### get\_execution\_mode - -Cross-language SDK contract for serverless / deployment-mode detection. -Mirrors signalwire.core.logging\_config.get\_execution\_mode in the Python reference. Order of precedence (FIRST match wins): - -GATEWAY\_INTERFACE -> "cgi" -AWS\_LAMBDA\_FUNCTION\_NAME or LAMBDA\_TASK\_ROOT -> "lambda" -FUNCTION\_TARGET, K\_SERVICE, or GOOGLE\_CLOUD\_PROJECT -> "google\_cloud\_function" -AZURE\_FUNCTIONS\_ENVIRONMENT, FUNCTIONS\_WORKER\_RUNTIME, or AzureWebJobsStorage -> "azure\_function" -otherwise -> "server" - -The detected mode as a canonical lower-case string. One of "cgi", "lambda", "google\_cloud\_function", "azure\_function", or "server". - -#### Signature - -```cpp -std::string get_execution_mode() -``` - -#### Returns - -`std::string` — The detected mode as a canonical lower-case string. One of "cgi", "lambda", "google\_cloud\_function", "azure\_function", or "server". - -#### Source - -[`src/core/logging_config.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/core/logging_config.cpp) - -Line 24. - -## Source - -[`include/signalwire/core/logging_config.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/core/logging_config.hpp) - -Line 12. diff --git a/fern/products/sdk-reference/cpp/signalwire/datamap/index.mdx b/fern/products/sdk-reference/cpp/signalwire/datamap/index.mdx deleted file mode 100644 index d92ef8e916..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/datamap/index.mdx +++ /dev/null @@ -1,475 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/datamap" -title: "datamap" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::datamap" - parent: "signalwire" - module: "signalwire" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/datamap/datamap.hpp" ---- -# `datamap` - -Fluent builder for SWAIG data\_map tools (server-side, no webhook needed). Every setter returns \*this for chaining. - -## Signature - -```cpp -class signalwire::datamap::DataMap -``` - -## Methods - -### body - -Set request body for the last added webhook. - -#### Signature - -```cpp -DataMap & body(const json & data) -``` - -#### Parameters - - - -#### Returns - -`DataMap &` - -#### Source - -[`include/signalwire/datamap/datamap.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/datamap/datamap.hpp) - -Line 81. - -*** - -### DataMap - -**Modifiers:** `explicit` - -#### Signature - -```cpp -void DataMap(const std::string & function_name) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/datamap/datamap.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/datamap/datamap.hpp) - -Line 20. - -*** - -### description - -Alias for purpose(). Sets the LLM-facing tool description. This string is read by the model to decide WHEN to call this tool. See purpose() for bad-vs-good examples. - -#### Signature - -```cpp -DataMap & description(const std::string & desc) -``` - -#### Parameters - - - -#### Returns - -`DataMap &` - -#### Source - -[`include/signalwire/datamap/datamap.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/datamap/datamap.hpp) - -Line 43. - -*** - -### error\_keys - -Set error keys for the most recent webhook or top-level. - -#### Signature - -```cpp -DataMap & error_keys(const std::vector< std::string > & keys) -``` - -#### Parameters - - - -#### Returns - -`DataMap &` - -#### Source - -[`include/signalwire/datamap/datamap.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/datamap/datamap.hpp) - -Line 96. - -*** - -### expression - -Add an expression pattern for pattern-based responses. - -#### Signature - -```cpp -DataMap & expression( - const std::string & test_value, - const std::string & pattern, - const swaig::FunctionResult & output, - const swaig::FunctionResult * nomatch_output = nullptr -) -``` - -#### Parameters - - - - - - - - - -#### Returns - -`DataMap &` - -#### Source - -[`include/signalwire/datamap/datamap.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/datamap/datamap.hpp) - -Line 66. - -*** - -### fallback\_output - -Set a fallback output at the top level. - -#### Signature - -```cpp -DataMap & fallback_output(const swaig::FunctionResult & result) -``` - -#### Parameters - - - -#### Returns - -`DataMap &` - -#### Source - -[`include/signalwire/datamap/datamap.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/datamap/datamap.hpp) - -Line 93. - -*** - -### foreach - -Set foreach configuration for the last webhook. - -#### Signature - -```cpp -DataMap & foreach(const json & foreach_config) -``` - -#### Parameters - - - -#### Returns - -`DataMap &` - -#### Source - -[`include/signalwire/datamap/datamap.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/datamap/datamap.hpp) - -Line 87. - -*** - -### global\_error\_keys - -Set top-level error keys. - -#### Signature - -```cpp -DataMap & global_error_keys(const std::vector< std::string > & keys) -``` - -#### Parameters - - - -#### Returns - -`DataMap &` - -#### Source - -[`include/signalwire/datamap/datamap.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/datamap/datamap.hpp) - -Line 99. - -*** - -### output - -Set output for the most recent webhook. - -#### Signature - -```cpp -DataMap & output(const swaig::FunctionResult & result) -``` - -#### Parameters - - - -#### Returns - -`DataMap &` - -#### Source - -[`include/signalwire/datamap/datamap.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/datamap/datamap.hpp) - -Line 90. - -*** - -### parameter - -Add a parameter to this data-map tool — the desc is LLM-FACING. -Each parameter description is rendered into the OpenAI tool schema under parameters.properties.<name>.description and sent to the model. The model uses it to decide HOW to fill in the argument from user speech. It is prompt engineering, not developer FYI. -Bad vs good: BAD : .parameter("city", "string", "the city") GOOD: .parameter("city", "string", "The name of the city to get weather for, e.g. " "'San Francisco'. Ask the user if they did not " "provide one. Include the state or country if the " "city name is ambiguous.") - -#### Signature - -```cpp -DataMap & parameter( - const std::string & name, - const std::string & param_type, - const std::string & desc, - bool required = false, - const std::vector< std::string > & enum_values = {} -) -``` - -#### Parameters - - - - - - - - - - - -#### Returns - -`DataMap &` - -#### Source - -[`include/signalwire/datamap/datamap.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/datamap/datamap.hpp) - -Line 61. - -*** - -### params - -Set request params for the last added webhook (alias for body). - -#### Signature - -```cpp -DataMap & params(const json & data) -``` - -#### Parameters - - - -#### Returns - -`DataMap &` - -#### Source - -[`include/signalwire/datamap/datamap.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/datamap/datamap.hpp) - -Line 84. - -*** - -### purpose - -Set the LLM-facing tool description (the "purpose"). PROMPT ENGINEERING, not developer documentation. -The description string is rendered into the OpenAI tool schema description field on every LLM turn. The model reads it to decide WHEN to call this tool. A vague purpose() is the #1 cause of "the model has the right tool but doesn't call it" failures with data-map tools. -Bad vs good: BAD : .purpose("weather api") GOOD: .purpose("Get the current weather conditions and " "forecast for a specific city. Use this " "whenever the user asks about weather, " "temperature, rain, or similar conditions in " "a named location.") - -#### Signature - -```cpp -DataMap & purpose(const std::string & desc) -``` - -#### Parameters - - - -#### Returns - -`DataMap &` - -#### Source - -[`include/signalwire/datamap/datamap.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/datamap/datamap.hpp) - -Line 38. - -*** - -### to\_swaig\_function - -Convert to a SWAIG function definition JSON \[\[nodiscard]]: the built tool definition is the output of the builder; dropping it discards the whole DataMap. (The fluent DataMap& setters above are intentionally NOT nodiscard.) - -**Modifiers:** `const` - -#### Signature - -```cpp -json to_swaig_function() const -``` - -#### Returns - -`json` - -#### Source - -[`include/signalwire/datamap/datamap.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/datamap/datamap.hpp) - -Line 105. - -*** - -### webhook - -Add a webhook API call. - -#### Signature - -```cpp -DataMap & webhook( - const std::string & method, - const std::string & url, - const json & headers = json::object(), - const std::string & form_param = "", - bool input_args_as_params = false, - const std::vector< std::string > & require_args = {} -) -``` - -#### Parameters - - - - - - - - - - - - - -#### Returns - -`DataMap &` - -#### Source - -[`include/signalwire/datamap/datamap.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/datamap/datamap.hpp) - -Line 71. - -*** - -### webhook\_expressions - -Add expressions that run after the most recent webhook. - -#### Signature - -```cpp -DataMap & webhook_expressions(const std::vector< json > & expressions) -``` - -#### Parameters - - - -#### Returns - -`DataMap &` - -#### Source - -[`include/signalwire/datamap/datamap.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/datamap/datamap.hpp) - -Line 78. - -## Type Aliases - -### json - -#### Signature - -```cpp -typedef nlohmann::json json -``` - -#### Source - -[`include/signalwire/datamap/datamap.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/datamap/datamap.hpp) - -Line 14. - -## Source - -[`include/signalwire/datamap/datamap.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/datamap/datamap.hpp) - -Line 18. diff --git a/fern/products/sdk-reference/cpp/signalwire/index.mdx b/fern/products/sdk-reference/cpp/signalwire/index.mdx index dc81d95980..ec40519795 100644 --- a/fern/products/sdk-reference/cpp/signalwire/index.mdx +++ b/fern/products/sdk-reference/cpp/signalwire/index.mdx @@ -29,45 +29,9 @@ namespace signalwire ## Classes - - Fluent builder for SWAIG data\_map tools (server-side, no webhook needed). Every setter returns \*this for chaining. - - -## Modules - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ## Functions ### add\_skill\_directory diff --git a/fern/products/sdk-reference/cpp/signalwire/logging/index.mdx b/fern/products/sdk-reference/cpp/signalwire/logging/index.mdx deleted file mode 100644 index c0b0df026b..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/logging/index.mdx +++ /dev/null @@ -1,109 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/logging" -title: "logging" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "module" - language: "cpp" - qualified_name: "signalwire::logging" - parent: "signalwire" - module: "signalwire" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging/logger.hpp" ---- -# `logging` - -## Signature - -```cpp -namespace signalwire::logging -``` - -## Classes - - - - - -## Functions - -### get\_log\_level - -**Modifiers:** `inline` - -#### Signature - -```cpp -LogLevel get_log_level() -``` - -#### Returns - -`LogLevel` - -#### Source - -[`include/signalwire/logging/logger.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging/logger.hpp) - -Line 15. - -*** - -### get\_logger - -**Modifiers:** `inline` - -#### Signature - -```cpp -Logger get_logger(const std::string & name) -``` - -#### Parameters - - - -#### Returns - -`Logger` - -#### Source - -[`include/signalwire/logging/logger.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging/logger.hpp) - -Line 56. - -## Enums - -### LogLevel - -#### Signature - -```cpp -enum class LogLevel -``` - -#### Variants - - - - - - - - - - - -#### Source - -[`include/signalwire/logging/logger.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging/logger.hpp) - -Line 13. - -## Source - -[`include/signalwire/logging/logger.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging/logger.hpp) - -Line 11. diff --git a/fern/products/sdk-reference/cpp/signalwire/logging/logger/index.mdx b/fern/products/sdk-reference/cpp/signalwire/logging/logger/index.mdx deleted file mode 100644 index 18c1bb9d80..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/logging/logger/index.mdx +++ /dev/null @@ -1,138 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/logging/logger" -title: "Logger" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::logging::Logger" - parent: "signalwire::logging" - module: "signalwire.logging" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging/logger.hpp" - visibility: "public" ---- -# `Logger` - -## Signature - -```cpp -class signalwire::logging::Logger -``` - -## Methods - -### debug - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -void debug(std::string_view msg) const -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/logging/logger.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging/logger.hpp) - -Line 35. - -*** - -### error - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -void error(std::string_view msg) const -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/logging/logger.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging/logger.hpp) - -Line 47. - -*** - -### info - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -void info(std::string_view msg) const -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/logging/logger.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging/logger.hpp) - -Line 39. - -*** - -### Logger - -**Modifiers:** `explicit` `inline` - -#### Signature - -```cpp -void Logger(const std::string & name) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/logging/logger.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging/logger.hpp) - -Line 29. - -*** - -### warn - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -void warn(std::string_view msg) const -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/logging/logger.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging/logger.hpp) - -Line 43. - -## Source - -[`include/signalwire/logging/logger.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging/logger.hpp) - -Line 27. diff --git a/fern/products/sdk-reference/cpp/signalwire/pom/index.mdx b/fern/products/sdk-reference/cpp/signalwire/pom/index.mdx deleted file mode 100644 index 434a1b84fe..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/pom/index.mdx +++ /dev/null @@ -1,131 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/pom" -title: "pom" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "module" - language: "cpp" - qualified_name: "signalwire::pom" - parent: "signalwire" - module: "signalwire" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp" ---- -# `pom` - -## Signature - -```cpp -namespace signalwire::pom -``` - -## Classes - - - - Top-level container of an ordered list of sections. - - - - One section in the Prompt Object Model tree. Mirrors Python's signalwire.pom.pom.Section. Fields are public to match the Python attribute access pattern section.body, section.bullets, section.subsections. - - - -## Functions - -### yaml\_dump - -Emit a json value as YAML. Inverse of yaml\_parse. Pretty output matches the shape PyYAML's yaml.dump(..., default\_flow\_style=False, sort\_keys=False) produces for the POM shape. - -#### Signature - -```cpp -std::string yaml_dump(const json & value) -``` - -#### Parameters - - - -#### Returns - -`std::string` - -#### Source - -[`src/pom/pom.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/pom/pom.cpp) - -Line 1121. - -*** - -### yaml\_dump\_ordered - -#### Signature - -```cpp -std::string yaml_dump_ordered(const nlohmann::ordered_json & value) -``` - -#### Parameters - - - -#### Returns - -`std::string` - -#### Source - -[`src/pom/pom.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/pom/pom.cpp) - -Line 1129. - -*** - -### yaml\_parse - -Parse a YAML document (POM-shaped subset only) into a json value. Supports list-of-dicts at top level; values may be strings, booleans, or lists of either. Throws std::invalid\_argument on malformed input. - -#### Signature - -```cpp -json yaml_parse(const std::string & yaml_text) -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`src/pom/pom.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/pom/pom.cpp) - -Line 1110. - -## Type Aliases - -### json - -#### Signature - -```cpp -typedef nlohmann::json json -``` - -#### Source - -[`include/signalwire/pom/pom.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp) - -Line 39. - -## Source - -[`include/signalwire/pom/pom.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp) - -Line 37. diff --git a/fern/products/sdk-reference/cpp/signalwire/pom/prompt-object-model/index.mdx b/fern/products/sdk-reference/cpp/signalwire/pom/prompt-object-model/index.mdx deleted file mode 100644 index b2468fce2a..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/pom/prompt-object-model/index.mdx +++ /dev/null @@ -1,391 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/pom/prompt-object-model" -title: "PromptObjectModel" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::pom::PromptObjectModel" - parent: "signalwire::pom" - module: "signalwire.pom" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp" - visibility: "public" ---- -# `PromptObjectModel` - -Top-level container of an ordered list of sections. - -## Signature - -```cpp -class signalwire::pom::PromptObjectModel -``` - -## Properties - - - - - -## Methods - -### add\_pom\_as\_subsection - -Add every top-level section of pom\_to\_add as a subsection of the section identified by target\_title. Throws std::invalid\_argument when no matching section exists. - -#### Signature - - - - ```cpp - void add_pom_as_subsection( - const std::string & target_title, - const PromptObjectModel & pom_to_add - ) - ``` - - - - ```cpp - void add_pom_as_subsection( - Section & target, - const PromptObjectModel & pom_to_add - ) - ``` - - - -#### Parameters (Overload 1) - - - - - -#### Parameters (Overload 2) - - - - - -#### Source - -[`include/signalwire/pom/pom.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp) - -Line 188. - -*** - -### add\_section - -Append a new top-level section. title may be empty only for the very first section (Python enforces "Only the first section can -have no title"); subsequent calls without a title throw std::invalid\_argument. - -#### Signature - -```cpp -Section & add_section( - const std::string & title = "", - const std::string & body = "", - const std::vector< std::string > & bullets = {}, - std::optional< bool > numbered = std::nullopt, - bool numbered_bullets = false -) -``` - -#### Parameters - - - - - - - - - - - -#### Returns - -`Section &` - -#### Source - -[`include/signalwire/pom/pom.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp) - -Line 152. - -*** - -### find\_section - -Recursively search for a section by title. Returns a pointer to the owned section so callers can mutate it; returns nullptr when nothing matches. Pointer is invalidated by any subsequent mutation of the POM that grows sections or subsections (caller's responsibility — same contract as std::vector::data()). - -#### Signature - - - - ```cpp - Section * find_section(const std::string & title) - ``` - - - - ```cpp - const Section * find_section(const std::string & title) const - ``` - - - -#### Parameters (Overload 1) - - - -#### Parameters (Overload 2) - - - -#### Returns (Overload 1) - -`Section *` - -#### Returns (Overload 2) - -`const Section *` - -#### Source - -[`include/signalwire/pom/pom.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp) - -Line 163. - -*** - -### from\_json - -Build a POM from a JSON string. Throws nlohmann::json::parse\_error on malformed JSON, and std::invalid\_argument on shape violations (missing required fields, wrong types, etc.). - -**Modifiers:** `static` - -#### Signature - - - - ```cpp - PromptObjectModel from_json(const std::string & json_text) - ``` - - - - ```cpp - PromptObjectModel from_json(const json & data) - ``` - - - -#### Parameters (Overload 1) - - - -#### Parameters (Overload 2) - - - -#### Returns (Overload 1) - -`PromptObjectModel` - -#### Returns (Overload 2) - -`PromptObjectModel` - -#### Source - -[`include/signalwire/pom/pom.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp) - -Line 142. - -*** - -### from\_yaml - -Build a POM from a YAML string (minimal POM-shaped subset only). - -**Modifiers:** `static` - -#### Signature - -```cpp -PromptObjectModel from_yaml(const std::string & yaml_text) -``` - -#### Parameters - - - -#### Returns - -`PromptObjectModel` - -#### Source - -[`include/signalwire/pom/pom.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp) - -Line 146. - -*** - -### PromptObjectModel - -#### Signature - - - - ```cpp - void PromptObjectModel() - ``` - - - - ```cpp - void PromptObjectModel(bool debug_flag) - ``` - - - -#### Parameters (Overload 2) - - - -#### Source - -[`include/signalwire/pom/pom.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp) - -Line 135. - -*** - -### render\_markdown - -Render entire POM as Markdown. - -**Modifiers:** `const` - -#### Signature - -```cpp -std::string render_markdown() const -``` - -#### Returns - -`std::string` - -#### Source - -[`include/signalwire/pom/pom.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp) - -Line 179. - -*** - -### render\_xml - -Render entire POM as XML (with <?xml ... ?> prolog and a <prompt> root element). - -**Modifiers:** `const` - -#### Signature - -```cpp -std::string render_xml() const -``` - -#### Returns - -`std::string` - -#### Source - -[`include/signalwire/pom/pom.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp) - -Line 183. - -*** - -### to\_dict - -Whole-tree dict view (a json array). Identical content to to\_json, returned as a parsed json value. - -**Modifiers:** `const` - -#### Signature - -```cpp -json to_dict() const -``` - -#### Returns - -`json` - -#### Source - -[`include/signalwire/pom/pom.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp) - -Line 176. - -*** - -### to\_json - -Whole-tree JSON serializer. Returns a pretty-printed (indent=2) JSON array string, matching Python's json.dumps(..., indent=2). - -**Modifiers:** `const` - -#### Signature - -```cpp -std::string to_json() const -``` - -#### Returns - -`std::string` - -#### Source - -[`include/signalwire/pom/pom.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp) - -Line 168. - -*** - -### to\_yaml - -Whole-tree YAML serializer. Returns a YAML document representing the JSON-equivalent list-of-dicts structure. - -**Modifiers:** `const` - -#### Signature - -```cpp -std::string to_yaml() const -``` - -#### Returns - -`std::string` - -#### Source - -[`include/signalwire/pom/pom.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp) - -Line 172. - -## Source - -[`include/signalwire/pom/pom.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp) - -Line 130. diff --git a/fern/products/sdk-reference/cpp/signalwire/pom/section/index.mdx b/fern/products/sdk-reference/cpp/signalwire/pom/section/index.mdx deleted file mode 100644 index 596cc63b7b..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/pom/section/index.mdx +++ /dev/null @@ -1,301 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/pom/section" -title: "Section" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::pom::Section" - parent: "signalwire::pom" - module: "signalwire.pom" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp" - visibility: "public" ---- -# `Section` - -One section in the Prompt Object Model tree. -Mirrors Python's signalwire.pom.pom.Section. Fields are public to match the Python attribute access pattern section.body, section.bullets, section.subsections. - -## Signature - -```cpp -class signalwire::pom::Section -``` - -## Properties - - - Optional paragraph of body text. - - - - Optional bullet list. - - - - Whether this section participates in section numbering. Three-state: std::nullopt — not specified (Python None); inherits. true — explicitly numbered. false — explicitly opted out of numbering. Numbering is "all-or-none per sibling group": if any sibling has numbered == true, every sibling gets numbered unless it explicitly opts out with false. - - - - When true, bullets are rendered as a numbered list (1. 2. 3.) in markdown and as <bullet id="1"> in XML, instead of dash bullets. - - - - Nested sections (recursively the same shape). - - - - Section title. Optional only on the very first top-level section (Python enforces "only the first section can have no title"); for subsections a title is always required. - - -## Methods - -### add\_body - -Replace (NOT append) the body text. Mirrors Python's documented "Add OR REPLACE the body text" contract. - -#### Signature - -```cpp -void add_body(const std::string & b) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/pom/pom.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp) - -Line 90. - -*** - -### add\_bullets - -Append bullets to the existing list. - -#### Signature - -```cpp -void add_bullets(const std::vector< std::string > & bs) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/pom/pom.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp) - -Line 93. - -*** - -### add\_subsection - -Add a child subsection. Returns a reference to the newly-created subsection so callers can chain further mutations. Throws std::invalid\_argument if title is empty (Python raises ValueError("Subsections must have a title")). - -#### Signature - -```cpp -Section & add_subsection( - const std::string & title, - const std::string & body = "", - const std::vector< std::string > & bullets = {}, - std::optional< bool > numbered = std::nullopt, - bool numbered_bullets = false -) -``` - -#### Parameters - - - - - - - - - - - -#### Returns - -`Section &` - -#### Source - -[`include/signalwire/pom/pom.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp) - -Line 99. - -*** - -### render\_markdown - -Render this section + subtree as Markdown. level is the heading level for this section (default 2 = ## ); section\_number is the parent path that will prefix this section's title (e.g. \{1, 2\} -> "1.2. "); empty means "no numbering". - -**Modifiers:** `const` - -#### Signature - -```cpp -std::string render_markdown( - int level = 2, - const std::vector< int > & section_number = {} -) const -``` - -#### Parameters - - - - - -#### Returns - -`std::string` - -#### Source - -[`include/signalwire/pom/pom.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp) - -Line 118. - -*** - -### render\_xml - -Render this section + subtree as XML. indent is the number of 2-space indents to use; section\_number follows the same rule as render\_markdown. - -**Modifiers:** `const` - -#### Signature - -```cpp -std::string render_xml( - int indent = 0, - const std::vector< int > & section_number = {} -) const -``` - -#### Parameters - - - - - -#### Returns - -`std::string` - -#### Source - -[`include/signalwire/pom/pom.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp) - -Line 124. - -*** - -### Section - -Build a Section. title is optional; everything else has sensible defaults so empty Sections can be created and populated incrementally via add\_body / add\_bullets / add\_subsection. - -#### Signature - - - - ```cpp - void Section() - ``` - - - - ```cpp - void Section( - std::optional< std::string > t, - std::string b = "", - std::vector< std::string > bs = {}, - std::optional< bool > num = std::nullopt, - bool numbered_bullets = false - ) - ``` - - - -#### Parameters (Overload 2) - - - - - - - - - - - -#### Source - -[`include/signalwire/pom/pom.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp) - -Line 77. - -*** - -### to\_dict - -Python-compatible alias for to\_json — Python exposes to\_dict. Returns the same JSON object. - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json to_dict() const -``` - -#### Returns - -`json` - -#### Source - -[`include/signalwire/pom/pom.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp) - -Line 112. - -*** - -### to\_json - -Convert the section (and its subtree) to a JSON object. Matches the Python key order: title, body, bullets, subsections, numbered, numberedBullets. - -**Modifiers:** `const` - -#### Signature - -```cpp -json to_json() const -``` - -#### Returns - -`json` - -#### Source - -[`include/signalwire/pom/pom.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp) - -Line 108. - -## Source - -[`include/signalwire/pom/pom.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/pom/pom.hpp) - -Line 48. diff --git a/fern/products/sdk-reference/cpp/signalwire/prefabs/concierge-agent/index.mdx b/fern/products/sdk-reference/cpp/signalwire/prefabs/concierge-agent/index.mdx deleted file mode 100644 index 0209e20258..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/prefabs/concierge-agent/index.mdx +++ /dev/null @@ -1,139 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/prefabs/concierge-agent" -title: "ConciergeAgent" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::prefabs::ConciergeAgent" - parent: "signalwire::prefabs" - module: "signalwire.prefabs" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp" - visibility: "public" ---- -# `ConciergeAgent` - -Venue concierge with amenity info. - -## Signature - -```cpp -class signalwire::prefabs::ConciergeAgent : signalwire::agent::AgentBase -``` - -## Inheritance - -**Extends:** [signalwire::agent::AgentBase](/docs/sdk-reference/reference/cpp/signalwire/agent/agent-base) - -## Methods - -### ConciergeAgent - -**Modifiers:** `explicit` - -#### Signature - -```cpp -void ConciergeAgent( - const std::string & name = "concierge", - const std::string & route = "/", - const std::string & host = "0.0.0.0", - int port = 3000 -) -``` - -#### Parameters - - - - - - - - - -#### Source - -[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) - -Line 67. - -*** - -### set\_amenities - -#### Signature - -```cpp -ConciergeAgent & set_amenities(const std::vector< json > & amenities) -``` - -#### Parameters - - - -#### Returns - -`ConciergeAgent &` - -#### Source - -[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) - -Line 73. - -*** - -### set\_hours - -#### Signature - -```cpp -ConciergeAgent & set_hours(const json & hours) -``` - -#### Parameters - - - -#### Returns - -`ConciergeAgent &` - -#### Source - -[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) - -Line 74. - -*** - -### set\_venue\_name - -#### Signature - -```cpp -ConciergeAgent & set_venue_name(const std::string & name) -``` - -#### Parameters - - - -#### Returns - -`ConciergeAgent &` - -#### Source - -[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) - -Line 72. - -## Source - -[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) - -Line 65. diff --git a/fern/products/sdk-reference/cpp/signalwire/prefabs/faq-bot-agent/index.mdx b/fern/products/sdk-reference/cpp/signalwire/prefabs/faq-bot-agent/index.mdx deleted file mode 100644 index 2fdba2e871..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/prefabs/faq-bot-agent/index.mdx +++ /dev/null @@ -1,139 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/prefabs/faq-bot-agent" -title: "FAQBotAgent" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::prefabs::FAQBotAgent" - parent: "signalwire::prefabs" - module: "signalwire.prefabs" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp" - visibility: "public" ---- -# `FAQBotAgent` - -Keyword-based FAQ matching. - -## Signature - -```cpp -class signalwire::prefabs::FAQBotAgent : signalwire::agent::AgentBase -``` - -## Inheritance - -**Extends:** [signalwire::agent::AgentBase](/docs/sdk-reference/reference/cpp/signalwire/agent/agent-base) - -## Methods - -### FAQBotAgent - -**Modifiers:** `explicit` - -#### Signature - -```cpp -void FAQBotAgent( - const std::string & name = "faq_bot", - const std::string & route = "/", - const std::string & host = "0.0.0.0", - int port = 3000 -) -``` - -#### Parameters - - - - - - - - - -#### Source - -[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) - -Line 54. - -*** - -### set\_faqs - -#### Signature - -```cpp -FAQBotAgent & set_faqs(const std::vector< json > & faqs) -``` - -#### Parameters - - - -#### Returns - -`FAQBotAgent &` - -#### Source - -[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) - -Line 59. - -*** - -### set\_no\_match\_message - -#### Signature - -```cpp -FAQBotAgent & set_no_match_message(const std::string & msg) -``` - -#### Parameters - - - -#### Returns - -`FAQBotAgent &` - -#### Source - -[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) - -Line 60. - -*** - -### set\_suggest\_related - -#### Signature - -```cpp -FAQBotAgent & set_suggest_related(bool suggest) -``` - -#### Parameters - - - -#### Returns - -`FAQBotAgent &` - -#### Source - -[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) - -Line 61. - -## Source - -[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) - -Line 52. diff --git a/fern/products/sdk-reference/cpp/signalwire/prefabs/index.mdx b/fern/products/sdk-reference/cpp/signalwire/prefabs/index.mdx deleted file mode 100644 index 3ebfe3b2ea..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/prefabs/index.mdx +++ /dev/null @@ -1,67 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/prefabs" -title: "prefabs" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "module" - language: "cpp" - qualified_name: "signalwire::prefabs" - parent: "signalwire" - module: "signalwire" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp" ---- -# `prefabs` - -## Signature - -```cpp -namespace signalwire::prefabs -``` - -## Classes - - - - Venue concierge with amenity info. - - - - Keyword-based FAQ matching. - - - - Sequential question collection with key/value answers. - - - - Department routing with call transfer. - - - - Typed surveys with validation. - - - -## Type Aliases - -### json - -#### Signature - -```cpp -typedef nlohmann::json json -``` - -#### Source - -[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) - -Line 10. - -## Source - -[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) - -Line 8. diff --git a/fern/products/sdk-reference/cpp/signalwire/prefabs/info-gatherer-agent/index.mdx b/fern/products/sdk-reference/cpp/signalwire/prefabs/info-gatherer-agent/index.mdx deleted file mode 100644 index 8906e2e6b4..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/prefabs/info-gatherer-agent/index.mdx +++ /dev/null @@ -1,139 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/prefabs/info-gatherer-agent" -title: "InfoGathererAgent" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::prefabs::InfoGathererAgent" - parent: "signalwire::prefabs" - module: "signalwire.prefabs" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp" - visibility: "public" ---- -# `InfoGathererAgent` - -Sequential question collection with key/value answers. - -## Signature - -```cpp -class signalwire::prefabs::InfoGathererAgent : signalwire::agent::AgentBase -``` - -## Inheritance - -**Extends:** [signalwire::agent::AgentBase](/docs/sdk-reference/reference/cpp/signalwire/agent/agent-base) - -## Methods - -### InfoGathererAgent - -**Modifiers:** `explicit` - -#### Signature - -```cpp -void InfoGathererAgent( - const std::string & name = "info_gatherer", - const std::string & route = "/", - const std::string & host = "0.0.0.0", - int port = 3000 -) -``` - -#### Parameters - - - - - - - - - -#### Source - -[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) - -Line 15. - -*** - -### set\_completion\_message - -#### Signature - -```cpp -InfoGathererAgent & set_completion_message(const std::string & msg) -``` - -#### Parameters - - - -#### Returns - -`InfoGathererAgent &` - -#### Source - -[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) - -Line 21. - -*** - -### set\_prefix - -#### Signature - -```cpp -InfoGathererAgent & set_prefix(const std::string & prefix) -``` - -#### Parameters - - - -#### Returns - -`InfoGathererAgent &` - -#### Source - -[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) - -Line 22. - -*** - -### set\_questions - -#### Signature - -```cpp -InfoGathererAgent & set_questions(const std::vector< json > & questions) -``` - -#### Parameters - - - -#### Returns - -`InfoGathererAgent &` - -#### Source - -[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) - -Line 20. - -## Source - -[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) - -Line 13. diff --git a/fern/products/sdk-reference/cpp/signalwire/prefabs/receptionist-agent/index.mdx b/fern/products/sdk-reference/cpp/signalwire/prefabs/receptionist-agent/index.mdx deleted file mode 100644 index 219d5a14f9..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/prefabs/receptionist-agent/index.mdx +++ /dev/null @@ -1,139 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/prefabs/receptionist-agent" -title: "ReceptionistAgent" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::prefabs::ReceptionistAgent" - parent: "signalwire::prefabs" - module: "signalwire.prefabs" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp" - visibility: "public" ---- -# `ReceptionistAgent` - -Department routing with call transfer. - -## Signature - -```cpp -class signalwire::prefabs::ReceptionistAgent : signalwire::agent::AgentBase -``` - -## Inheritance - -**Extends:** [signalwire::agent::AgentBase](/docs/sdk-reference/reference/cpp/signalwire/agent/agent-base) - -## Methods - -### ReceptionistAgent - -**Modifiers:** `explicit` - -#### Signature - -```cpp -void ReceptionistAgent( - const std::string & name = "receptionist", - const std::string & route = "/", - const std::string & host = "0.0.0.0", - int port = 3000 -) -``` - -#### Parameters - - - - - - - - - -#### Source - -[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) - -Line 41. - -*** - -### set\_departments - -#### Signature - -```cpp -ReceptionistAgent & set_departments(const json & departments) -``` - -#### Parameters - - - -#### Returns - -`ReceptionistAgent &` - -#### Source - -[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) - -Line 46. - -*** - -### set\_greeting - -#### Signature - -```cpp -ReceptionistAgent & set_greeting(const std::string & greeting) -``` - -#### Parameters - - - -#### Returns - -`ReceptionistAgent &` - -#### Source - -[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) - -Line 47. - -*** - -### set\_transfer\_message - -#### Signature - -```cpp -ReceptionistAgent & set_transfer_message(const std::string & msg) -``` - -#### Parameters - - - -#### Returns - -`ReceptionistAgent &` - -#### Source - -[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) - -Line 48. - -## Source - -[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) - -Line 39. diff --git a/fern/products/sdk-reference/cpp/signalwire/prefabs/survey-agent/index.mdx b/fern/products/sdk-reference/cpp/signalwire/prefabs/survey-agent/index.mdx deleted file mode 100644 index 35531b059e..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/prefabs/survey-agent/index.mdx +++ /dev/null @@ -1,139 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/prefabs/survey-agent" -title: "SurveyAgent" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::prefabs::SurveyAgent" - parent: "signalwire::prefabs" - module: "signalwire.prefabs" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp" - visibility: "public" ---- -# `SurveyAgent` - -Typed surveys with validation. - -## Signature - -```cpp -class signalwire::prefabs::SurveyAgent : signalwire::agent::AgentBase -``` - -## Inheritance - -**Extends:** [signalwire::agent::AgentBase](/docs/sdk-reference/reference/cpp/signalwire/agent/agent-base) - -## Methods - -### set\_completion\_message - -#### Signature - -```cpp -SurveyAgent & set_completion_message(const std::string & msg) -``` - -#### Parameters - - - -#### Returns - -`SurveyAgent &` - -#### Source - -[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) - -Line 34. - -*** - -### set\_intro\_message - -#### Signature - -```cpp -SurveyAgent & set_intro_message(const std::string & msg) -``` - -#### Parameters - - - -#### Returns - -`SurveyAgent &` - -#### Source - -[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) - -Line 35. - -*** - -### set\_questions - -#### Signature - -```cpp -SurveyAgent & set_questions(const std::vector< json > & questions) -``` - -#### Parameters - - - -#### Returns - -`SurveyAgent &` - -#### Source - -[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) - -Line 33. - -*** - -### SurveyAgent - -**Modifiers:** `explicit` - -#### Signature - -```cpp -void SurveyAgent( - const std::string & name = "survey", - const std::string & route = "/", - const std::string & host = "0.0.0.0", - int port = 3000 -) -``` - -#### Parameters - - - - - - - - - -#### Source - -[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) - -Line 28. - -## Source - -[`include/signalwire/prefabs/prefabs.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/prefabs/prefabs.hpp) - -Line 26. diff --git a/fern/products/sdk-reference/cpp/signalwire/relay/action/index.mdx b/fern/products/sdk-reference/cpp/signalwire/relay/action/index.mdx deleted file mode 100644 index c7cf045d7f..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/relay/action/index.mdx +++ /dev/null @@ -1,640 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/relay/action" -title: "Action" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::relay::Action" - parent: "signalwire::relay" - module: "signalwire.relay" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp" - visibility: "public" ---- -# `Action` - -Represents a controllable in-progress operation (play, record, collect, etc.) Uses shared internal state so the object can be copied/moved freely while maintaining a single underlying condition\_variable for synchronization. - -## Signature - -```cpp -class signalwire::relay::Action -``` - -## Methods - -### Action - -#### Signature - - - - ```cpp - void Action() - ``` - - - - ```cpp - void Action(const std::string & control_id) - ``` - - - - ```cpp - void Action( - const std::string & control_id, - RelayClient * client, - const std::string & call_id, - const std::string & node_id - ) - ``` - - - -#### Parameters (Overload 2) - - - -#### Parameters (Overload 3) - - - - - - - - - -#### Source - -[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) - -Line 27. - -*** - -### call\_id - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -const std::string & call_id() const -``` - -#### Returns - -`const std::string &` - -#### Source - -[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) - -Line 36. - -*** - -### completed - -**Modifiers:** `const` - -#### Signature - -```cpp -bool completed() const -``` - -#### Returns - -`bool` - -#### Source - -[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) - -Line 34. - -*** - -### control\_id - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -const std::string & control_id() const -``` - -#### Returns - -`const std::string &` - -#### Source - -[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) - -Line 32. - -*** - -### event\_type\_filter - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -const std::vector< std::string > & event_type_filter() const -``` - -#### Returns - -`const std::vector< std::string > &` - -#### Source - -[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) - -Line 56. - -*** - -### event\_type\_matches - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -bool event_type_matches(const std::string & event_type) const -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) - -Line 59. - -*** - -### method\_prefix - -Method prefix used for sub-command frames (stop/pause/resume/...). Defaults to "calling.play"; set explicitly when an Action is built for a different verb (record, collect, detect, ...). The Call::execute\_action factory plumbs this through. - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -const std::string & method_prefix() const -``` - -#### Returns - -`const std::string &` - -#### Source - -[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) - -Line 43. - -*** - -### node\_id - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -const std::string & node_id() const -``` - -#### Returns - -`const std::string &` - -#### Source - -[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) - -Line 37. - -*** - -### on\_completed - -Set a callback to fire when the action completes. - -#### Signature - -```cpp -void on_completed(CompletedCallback cb) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) - -Line 112. - -*** - -### pause - -Request the server to pause this action. extra\_params may carry e.g. \{"behavior": "continuous"\} for record-side pause. - -#### Signature - -```cpp -void pause(const json & extra_params = json::object()) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) - -Line 98. - -*** - -### resolve - -Resolve the action immediately (used for call-gone scenarios). - -#### Signature - -```cpp -void resolve( - const std::string & final_state = "finished", - const json & result = json::object() -) -``` - -#### Parameters - - - - - -#### Source - -[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) - -Line 118. - -*** - -### resolve\_on\_detect - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -bool resolve_on_detect() const -``` - -#### Returns - -`bool` - -#### Source - -[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) - -Line 74. - -*** - -### resolve\_on\_result - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -bool resolve_on_result() const -``` - -#### Returns - -`bool` - -#### Source - -[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) - -Line 82. - -*** - -### result - -**Modifiers:** `const` - -#### Signature - -```cpp -const json & result() const -``` - -#### Returns - -`const json &` - -#### Source - -[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) - -Line 35. - -*** - -### resume - -Request the server to resume this action. - -#### Signature - -```cpp -void resume() -``` - -#### Source - -[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) - -Line 101. - -*** - -### set\_event\_type\_filter - -Set the wire-event types the Action should accept state updates from. Empty (the default) means "match any component event whose -control\_id matches this Action". Used by play\_and\_collect to listen on calling.call.collect only — a calling.call.play(finished) must NOT resolve a play\_and\_collect action. - -**Modifiers:** `inline` - -#### Signature - -```cpp -void set_event_type_filter(const std::vector< std::string > & types) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) - -Line 53. - -*** - -### set\_method\_prefix - -**Modifiers:** `inline` - -#### Signature - -```cpp -void set_method_prefix(const std::string & prefix) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) - -Line 44. - -*** - -### set\_resolve\_on\_detect - -Detect actions resolve on the first event carrying a detect payload, not on a state(finished) — see Python's DetectAction. When this flag is set the action's update\_state path resolves only when params.detect is present. - -**Modifiers:** `inline` - -#### Signature - -```cpp -void set_resolve_on_detect(bool flag) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) - -Line 71. - -*** - -### set\_resolve\_on\_result - -Collect actions resolve when an event carries a result payload. A play(finished) earlier in the timeline does NOT resolve a CollectAction — see Python's CollectAction terminal-event logic. - -**Modifiers:** `inline` - -#### Signature - -```cpp -void set_resolve_on_result(bool flag) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) - -Line 79. - -*** - -### start\_input\_timers - -Start the inter-digit / final-digit timers on a collect. The matching Python method is StandaloneCollectAction.start\_input\_timers. - -#### Signature - -```cpp -void start_input_timers() -``` - -#### Source - -[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) - -Line 109. - -*** - -### state - -**Modifiers:** `const` - -#### Signature - -```cpp -const std::string & state() const -``` - -#### Returns - -`const std::string &` - -#### Source - -[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) - -Line 33. - -*** - -### stop - -Request the server to stop this action. Routes to \.stop so an Action returned by record() sends calling.record.stop rather than calling.play.stop. - -#### Signature - -```cpp -void stop() -``` - -#### Source - -[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) - -Line 93. - -*** - -### update\_state - -Update internal state (called by Call/Client when events arrive). - -#### Signature - -```cpp -void update_state( - const std::string & new_state, - const json & result = json::object() -) -``` - -#### Parameters - - - - - -#### Source - -[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) - -Line 115. - -*** - -### volume - -Adjust playback volume (play only). The frame body carries the supplied amount in dB; positive boosts, negative attenuates. - -#### Signature - -```cpp -void volume(double amount) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) - -Line 105. - -*** - -### wait - -Block until the action completes or times out. \[\[nodiscard]]: the bool tells you whether the action actually completed vs. timed out — dropping it (then treating the action as done) is a bug. - -#### Signature - -```cpp -bool wait(int timeout_ms = 0) -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) - -Line 88. - -## Type Aliases - -### CompletedCallback - -#### Signature - -```cpp -typedef std::function< void(const Action &)> CompletedCallback -``` - -#### Source - -[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) - -Line 25. - -## Source - -[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) - -Line 23. diff --git a/fern/products/sdk-reference/cpp/signalwire/relay/call-event/index.mdx b/fern/products/sdk-reference/cpp/signalwire/relay/call-event/index.mdx deleted file mode 100644 index f40affad48..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/relay/call-event/index.mdx +++ /dev/null @@ -1,72 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/relay/call-event" -title: "CallEvent" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::relay::CallEvent" - parent: "signalwire::relay" - module: "signalwire.relay" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/relay_event.hpp" - visibility: "public" ---- -# `CallEvent` - -Call-specific event parsed from calling.call.state and other call events. - -## Signature - -```cpp -struct signalwire::relay::CallEvent : signalwire::relay::RelayEvent -``` - -## Inheritance - -**Extends:** [signalwire::relay::RelayEvent](/docs/sdk-reference/reference/cpp/signalwire/relay/relay-event) - -## Properties - - - - - - - - - - - -## Methods - -### from\_relay\_event - -**Modifiers:** `static` `inline` - -#### Signature - -```cpp -CallEvent from_relay_event(const RelayEvent & ev) -``` - -#### Parameters - - - -#### Returns - -`CallEvent` - -#### Source - -[`include/signalwire/relay/relay_event.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/relay_event.hpp) - -Line 46. - -## Source - -[`include/signalwire/relay/relay_event.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/relay_event.hpp) - -Line 39. diff --git a/fern/products/sdk-reference/cpp/signalwire/relay/call/index.mdx b/fern/products/sdk-reference/cpp/signalwire/relay/call/index.mdx deleted file mode 100644 index 716178526c..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/relay/call/index.mdx +++ /dev/null @@ -1,1761 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/relay/call" -title: "Call" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::relay::Call" - parent: "signalwire::relay" - module: "signalwire.relay" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp" - visibility: "public" ---- -# `Call` - -Represents a live call with methods for call control. Uses shared internal state so the object can be copied/returned by value. All command methods send JSON-RPC requests through the RelayClient. - -## Signature - -```cpp -class signalwire::relay::Call -``` - -## Methods - -### ai - -#### Signature - -```cpp -Action ai(const json & params, const std::string & control_id = "") -``` - -#### Parameters - - - - - -#### Returns - -`Action` - -#### Source - -[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) - -Line 144. - -*** - -### answer - -#### Signature - -```cpp -Action answer() -``` - -#### Returns - -`Action` - -#### Source - -[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) - -Line 60. - -*** - -### Call - -#### Signature - - - - ```cpp - void Call() - ``` - - - - ```cpp - void Call(const std::string & call_id, const std::string & node_id) - ``` - - - - ```cpp - void Call( - const std::string & call_id, - const std::string & node_id, - RelayClient * client - ) - ``` - - - -#### Parameters (Overload 2) - - - - - -#### Parameters (Overload 3) - - - - - - - -#### Source - -[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) - -Line 35. - -*** - -### call\_id - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -const std::string & call_id() const -``` - -#### Returns - -`const std::string &` - -#### Source - -[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) - -Line 40. - -*** - -### call\_state - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -std::optional< CallState > call_state() const -``` - -#### Returns - -`std::optional< CallState >` - -#### Source - -[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) - -Line 48. - -*** - -### collect - -#### Signature - -```cpp -Action collect(const json & params, const std::string & control_id = "") -``` - -#### Parameters - - - - - -#### Returns - -`Action` - -#### Source - -[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) - -Line 116. - -*** - -### connect - -#### Signature - -```cpp -Action connect(const json & devices) -``` - -#### Parameters - - - -#### Returns - -`Action` - -#### Source - -[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) - -Line 118. - -*** - -### detect - -#### Signature - -```cpp -Action detect(const json & params, const std::string & control_id = "") -``` - -#### Parameters - - - - - -#### Returns - -`Action` - -#### Source - -[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) - -Line 120. - -*** - -### detect\_answering\_machine - -#### Signature - -```cpp -Action detect_answering_machine( - const json & amd_params = json::object(), - double timeout = -1.0 -) -``` - -#### Parameters - - - - - -#### Returns - -`Action` - -#### Source - -[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) - -Line 130. - -*** - -### detect\_digit - -#### Signature - -```cpp -Action detect_digit(const std::string & digits = "", double timeout = -1.0) -``` - -#### Parameters - - - - - -#### Returns - -`Action` - -#### Source - -[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) - -Line 129. - -*** - -### detect\_fax - -#### Signature - -```cpp -Action detect_fax(const std::string & tone = "", double timeout = -1.0) -``` - -#### Parameters - - - - - -#### Returns - -`Action` - -#### Source - -[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) - -Line 132. - -*** - -### direction - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -const std::string & direction() const -``` - -#### Returns - -`const std::string &` - -#### Source - -[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) - -Line 51. - -*** - -### disconnect - -#### Signature - -```cpp -Action disconnect() -``` - -#### Returns - -`Action` - -#### Source - -[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) - -Line 119. - -*** - -### dispatch\_event - -#### Signature - -```cpp -void dispatch_event(const CallEvent & ev) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) - -Line 190. - -*** - -### execute\_swml - -#### Signature - -```cpp -Action execute_swml(const json & swml) -``` - -#### Parameters - - - -#### Returns - -`Action` - -#### Source - -[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) - -Line 159. - -*** - -### find\_action - -#### Signature - -```cpp -Action * find_action(const std::string & control_id) -``` - -#### Parameters - - - -#### Returns - -`Action *` - -#### Source - -[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) - -Line 195. - -*** - -### from - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -const std::string & from() const -``` - -#### Returns - -`const std::string &` - -#### Source - -[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) - -Line 52. - -*** - -### hangup - -#### Signature - -```cpp -Action hangup(const std::string & reason = "hangup") -``` - -#### Parameters - - - -#### Returns - -`Action` - -#### Source - -[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) - -Line 61. - -*** - -### hold - -#### Signature - -```cpp -Action hold() -``` - -#### Returns - -`Action` - -#### Source - -[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) - -Line 154. - -*** - -### is\_answered - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -bool is_answered() const -``` - -#### Returns - -`bool` - -#### Source - -[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) - -Line 56. - -*** - -### is\_ended - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -bool is_ended() const -``` - -#### Returns - -`bool` - -#### Source - -[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) - -Line 57. - -*** - -### join\_conference - -#### Signature - -```cpp -Action join_conference( - const std::string & name, - const json & params = json::object() -) -``` - -#### Parameters - - - - - -#### Returns - -`Action` - -#### Source - -[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) - -Line 157. - -*** - -### join\_room - -#### Signature - -```cpp -Action join_room(const std::string & name) -``` - -#### Parameters - - - -#### Returns - -`Action` - -#### Source - -[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) - -Line 158. - -*** - -### live\_transcribe - -#### Signature - -```cpp -Action live_transcribe(const json & params = json::object()) -``` - -#### Parameters - - - -#### Returns - -`Action` - -#### Source - -[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) - -Line 140. - -*** - -### live\_translate - -#### Signature - -```cpp -Action live_translate(const json & params = json::object()) -``` - -#### Parameters - - - -#### Returns - -`Action` - -#### Source - -[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) - -Line 143. - -*** - -### node\_id - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -const std::string & node_id() const -``` - -#### Returns - -`const std::string &` - -#### Source - -[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) - -Line 41. - -*** - -### on\_event - -#### Signature - -```cpp -void on_event(CallEventHandler handler) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) - -Line 162. - -*** - -### pay - -#### Signature - -```cpp -Action pay(const json & params, const std::string & control_id = "") -``` - -#### Parameters - - - - - -#### Returns - -`Action` - -#### Source - -[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) - -Line 146. - -*** - -### play - -#### Signature - -```cpp -Action play( - const json & media, - double volume = 0.0, - const std::string & control_id = "" -) -``` - -#### Parameters - - - - - - - -#### Returns - -`Action` - -#### Source - -[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) - -Line 62. - -*** - -### play\_and\_collect - -#### Signature - -```cpp -Action play_and_collect( - const json & play_media, - const json & collect_params, - const std::string & control_id = "" -) -``` - -#### Parameters - - - - - - - -#### Returns - -`Action` - -#### Source - -[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) - -Line 95. - -*** - -### play\_audio - -#### Signature - -```cpp -Action play_audio(const std::string & url, double volume = 0.0) -``` - -#### Parameters - - - - - -#### Returns - -`Action` - -#### Source - -[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) - -Line 85. - -*** - -### play\_ringtone - -#### Signature - -```cpp -Action play_ringtone( - const std::string & name, - double duration = -1.0, - double volume = 0.0 -) -``` - -#### Parameters - - - - - - - -#### Returns - -`Action` - -#### Source - -[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) - -Line 87. - -*** - -### play\_silence - -#### Signature - -```cpp -Action play_silence(double duration) -``` - -#### Parameters - - - -#### Returns - -`Action` - -#### Source - -[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) - -Line 86. - -*** - -### play\_tts - -#### Signature - - - - ```cpp - Action play_tts( - const std::string & text, - const std::string & language = "", - const std::string & gender = "", - const std::string & voice = "", - double volume = 0.0 - ) - ``` - - - - ```cpp - Action play_tts( - const std::string & text, - const std::string & language, - Gender gender, - const std::string & voice = "", - double volume = 0.0 - ) - ``` - - - -#### Parameters (Overload 1) - - - - - - - - - - - -#### Parameters (Overload 2) - - - - - - - - - - - -#### Returns (Overload 1) - -`Action` - -#### Returns (Overload 2) - -`Action` - -#### Source - -[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) - -Line 69. - -*** - -### prompt - -#### Signature - -```cpp -Action prompt( - const json & play_media, - const json & collect_params, - const std::string & control_id = "" -) -``` - -#### Parameters - - - - - - - -#### Returns - -`Action` - -#### Source - -[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) - -Line 93. - -*** - -### prompt\_audio - -#### Signature - -```cpp -Action prompt_audio( - const std::string & url, - const json & collect, - double volume = 0.0 -) -``` - -#### Parameters - - - - - - - -#### Returns - -`Action` - -#### Source - -[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) - -Line 114. - -*** - -### prompt\_tts - -#### Signature - - - - ```cpp - Action prompt_tts( - const std::string & text, - const json & collect, - const std::string & language = "", - const std::string & gender = "", - const std::string & voice = "", - double volume = 0.0 - ) - ``` - - - - ```cpp - Action prompt_tts( - const std::string & text, - const json & collect, - const std::string & language, - Gender gender, - const std::string & voice = "", - double volume = 0.0 - ) - ``` - - - -#### Parameters (Overload 1) - - - - - - - - - - - - - -#### Parameters (Overload 2) - - - - - - - - - - - - - -#### Returns (Overload 1) - -`Action` - -#### Returns (Overload 2) - -`Action` - -#### Source - -[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) - -Line 100. - -*** - -### receive\_fax - -#### Signature - -```cpp -Action receive_fax(const std::string & control_id = "") -``` - -#### Parameters - - - -#### Returns - -`Action` - -#### Source - -[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) - -Line 151. - -*** - -### record - -#### Signature - -```cpp -Action record( - const json & params = json::object(), - const std::string & control_id = "" -) -``` - -#### Parameters - - - - - -#### Returns - -`Action` - -#### Source - -[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) - -Line 90. - -*** - -### record\_call - -#### Signature - -```cpp -Action record_call(const json & params = json::object()) -``` - -#### Parameters - - - -#### Returns - -`Action` - -#### Source - -[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) - -Line 92. - -*** - -### register\_action - -#### Signature - -```cpp -void register_action(const std::string & control_id, Action * action) -``` - -#### Parameters - - - - - -#### Source - -[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) - -Line 193. - -*** - -### resolve\_all\_actions - -#### Signature - -```cpp -void resolve_all_actions(const std::string & final_state = "finished") -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) - -Line 198. - -*** - -### send\_digits - -#### Signature - -```cpp -Action send_digits(const std::string & digits) -``` - -#### Parameters - - - -#### Returns - -`Action` - -#### Source - -[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) - -Line 138. - -*** - -### send\_fax - -#### Signature - -```cpp -Action send_fax( - const std::string & document_url, - const std::string & header = "", - const std::string & identity = "", - const std::string & control_id = "" -) -``` - -#### Parameters - - - - - - - - - -#### Returns - -`Action` - -#### Source - -[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) - -Line 148. - -*** - -### set\_client - -**Modifiers:** `inline` - -#### Signature - -```cpp -void set_client(RelayClient * c) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) - -Line 188. - -*** - -### set\_direction - -**Modifiers:** `inline` - -#### Signature - -```cpp -void set_direction(const std::string & dir) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) - -Line 184. - -*** - -### set\_from - -**Modifiers:** `inline` - -#### Signature - -```cpp -void set_from(const std::string & f) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) - -Line 185. - -*** - -### set\_tag - -**Modifiers:** `inline` - -#### Signature - -```cpp -void set_tag(const std::string & t) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) - -Line 187. - -*** - -### set\_to - -**Modifiers:** `inline` - -#### Signature - -```cpp -void set_to(const std::string & t) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) - -Line 186. - -*** - -### sip\_refer - -#### Signature - -```cpp -Action sip_refer(const std::string & to_uri) -``` - -#### Parameters - - - -#### Returns - -`Action` - -#### Source - -[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) - -Line 156. - -*** - -### state - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -const std::string & state() const -``` - -#### Returns - -`const std::string &` - -#### Source - -[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) - -Line 42. - -*** - -### stop\_tap - -#### Signature - -```cpp -Action stop_tap(const std::string & control_id) -``` - -#### Parameters - - - -#### Returns - -`Action` - -#### Source - -[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) - -Line 137. - -*** - -### stream - -#### Signature - -```cpp -Action stream(const json & params, const std::string & control_id = "") -``` - -#### Parameters - - - - - -#### Returns - -`Action` - -#### Source - -[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) - -Line 152. - -*** - -### tag - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -const std::string & tag() const -``` - -#### Returns - -`const std::string &` - -#### Source - -[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) - -Line 54. - -*** - -### tap - -#### Signature - -```cpp -Action tap(const json & params, const std::string & control_id = "") -``` - -#### Parameters - - - - - -#### Returns - -`Action` - -#### Source - -[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) - -Line 135. - -*** - -### tap\_audio - -#### Signature - -```cpp -Action tap_audio(const json & params, const std::string & control_id = "") -``` - -#### Parameters - - - - - -#### Returns - -`Action` - -#### Source - -[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) - -Line 133. - -*** - -### to - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -const std::string & to() const -``` - -#### Returns - -`const std::string &` - -#### Source - -[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) - -Line 53. - -*** - -### transcribe - -#### Signature - -```cpp -Action transcribe( - const json & params = json::object(), - const std::string & control_id = "" -) -``` - -#### Parameters - - - - - -#### Returns - -`Action` - -#### Source - -[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) - -Line 141. - -*** - -### transfer - -#### Signature - -```cpp -Action transfer(const json & params) -``` - -#### Parameters - - - -#### Returns - -`Action` - -#### Source - -[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) - -Line 139. - -*** - -### unhold - -#### Signature - -```cpp -Action unhold() -``` - -#### Returns - -`Action` - -#### Source - -[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) - -Line 155. - -*** - -### unregister\_action - -#### Signature - -```cpp -void unregister_action(const std::string & control_id) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) - -Line 194. - -*** - -### update\_state - -#### Signature - -```cpp -void update_state(const std::string & new_state) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) - -Line 183. - -*** - -### wait\_for\_answered - -#### Signature - -```cpp -bool wait_for_answered(int timeout_ms = 0) -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) - -Line 178. - -*** - -### wait\_for\_ended - -#### Signature - -```cpp -bool wait_for_ended(int timeout_ms = 0) -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) - -Line 166. - -*** - -### wait\_for\_ending - -#### Signature - -```cpp -bool wait_for_ending(int timeout_ms = 0) -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) - -Line 180. - -*** - -### wait\_for\_ringing - -#### Signature - -```cpp -bool wait_for_ringing(int timeout_ms = 0) -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) - -Line 179. - -## Source - -[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) - -Line 33. diff --git a/fern/products/sdk-reference/cpp/signalwire/relay/component-event/index.mdx b/fern/products/sdk-reference/cpp/signalwire/relay/component-event/index.mdx deleted file mode 100644 index 6ad05324eb..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/relay/component-event/index.mdx +++ /dev/null @@ -1,68 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/relay/component-event" -title: "ComponentEvent" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::relay::ComponentEvent" - parent: "signalwire::relay" - module: "signalwire.relay" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/relay_event.hpp" - visibility: "public" ---- -# `ComponentEvent` - -Play/Record/Collect component event with control\_id for action routing. - -## Signature - -```cpp -struct signalwire::relay::ComponentEvent : signalwire::relay::RelayEvent -``` - -## Inheritance - -**Extends:** [signalwire::relay::RelayEvent](/docs/sdk-reference/reference/cpp/signalwire/relay/relay-event) - -## Properties - - - - - - - -## Methods - -### from\_relay\_event - -**Modifiers:** `static` `inline` - -#### Signature - -```cpp -ComponentEvent from_relay_event(const RelayEvent & ev) -``` - -#### Parameters - - - -#### Returns - -`ComponentEvent` - -#### Source - -[`include/signalwire/relay/relay_event.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/relay_event.hpp) - -Line 72. - -## Source - -[`include/signalwire/relay/relay_event.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/relay_event.hpp) - -Line 67. diff --git a/fern/products/sdk-reference/cpp/signalwire/relay/device/index.mdx b/fern/products/sdk-reference/cpp/signalwire/relay/device/index.mdx deleted file mode 100644 index 7272459e68..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/relay/device/index.mdx +++ /dev/null @@ -1,94 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/relay/device" -title: "Device" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::relay::Device" - parent: "signalwire::relay" - module: "signalwire.relay" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/device.hpp" - visibility: "public" ---- -# `Device` - -## Signature - -```cpp -struct signalwire::relay::Device -``` - -## Properties - - - Type-specific parameters (e.g. \{"to\_number","from\_number"\} for "phone"). Free json map — the wire schema is additionalProperties:true. - - - - REQUIRED endpoint-type discriminant. Open set (not schema-enumerated) → kept a std::string. Common values: "phone", "sip", "webrtc". - - -## Methods - -### Device - -#### Signature - - - - ```cpp - void Device() - ``` - - - - ```cpp - void Device(std::string type_, json params_ = json::object()) - ``` - - - -#### Parameters (Overload 2) - - - - - -#### Source - -[`include/signalwire/relay/device.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/device.hpp) - -Line 40. - -*** - -### to\_json - -Serialize to the exact RELAY device wire shape: \{"type":..,"params":..\}. Byte-identical to the hand-written map the raw-json call sites build. - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json to_json() const -``` - -#### Returns - -`json` - -#### Source - -[`include/signalwire/relay/device.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/device.hpp) - -Line 46. - -## Source - -[`include/signalwire/relay/device.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/device.hpp) - -Line 32. diff --git a/fern/products/sdk-reference/cpp/signalwire/relay/dial-event/index.mdx b/fern/products/sdk-reference/cpp/signalwire/relay/dial-event/index.mdx deleted file mode 100644 index ff81c037be..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/relay/dial-event/index.mdx +++ /dev/null @@ -1,90 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/relay/dial-event" -title: "DialEvent" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::relay::DialEvent" - parent: "signalwire::relay" - module: "signalwire.relay" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/relay_event.hpp" - visibility: "public" ---- -# `DialEvent` - -Dial-specific event with nested call info and tag-based correlation. - -## Signature - -```cpp -struct signalwire::relay::DialEvent : signalwire::relay::RelayEvent -``` - -## Inheritance - -**Extends:** [signalwire::relay::RelayEvent](/docs/sdk-reference/reference/cpp/signalwire/relay/relay-event) - -## Properties - - - - - - - -## Methods - -### dial\_state\_enum - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -std::optional< DialState > dial_state_enum() const -``` - -#### Returns - -`std::optional< DialState >` - -#### Source - -[`include/signalwire/relay/relay_event.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/relay_event.hpp) - -Line 119. - -*** - -### from\_relay\_event - -**Modifiers:** `static` `inline` - -#### Signature - -```cpp -DialEvent from_relay_event(const RelayEvent & ev) -``` - -#### Parameters - - - -#### Returns - -`DialEvent` - -#### Source - -[`include/signalwire/relay/relay_event.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/relay_event.hpp) - -Line 123. - -## Source - -[`include/signalwire/relay/relay_event.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/relay_event.hpp) - -Line 109. diff --git a/fern/products/sdk-reference/cpp/signalwire/relay/index.mdx b/fern/products/sdk-reference/cpp/signalwire/relay/index.mdx deleted file mode 100644 index cedf9e74cb..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/relay/index.mdx +++ /dev/null @@ -1,692 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/relay" -title: "relay" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "module" - language: "cpp" - qualified_name: "signalwire::relay" - parent: "signalwire" - module: "signalwire" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp" ---- -# `relay` - -## Signature - -```cpp -namespace signalwire::relay -``` - -## Constants - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -## Classes - - - - Represents a controllable in-progress operation (play, record, collect, etc.) Uses shared internal state so the object can be copied/moved freely while maintaining a single underlying condition\_variable for synchronization. - - - - Represents a live call with methods for call control. Uses shared internal state so the object can be copied/returned by value. All command methods send JSON-RPC requests through the RelayClient. - - - - Call-specific event parsed from calling.call.state and other call events. - - - - Play/Record/Collect component event with control\_id for action routing. - - - - - - Dial-specific event with nested call info and tag-based correlation. - - - - Represents an SMS/MMS message tracked through delivery states. States: "queued", "initiated", "sent", "delivered", "undelivered", "failed" Uses shared internal state so the object can be copied/returned by value — copies of a Message observe the same state updates as the underlying instance the registry tracks. - - - - Messaging event for SMS/MMS state changes and inbound messages. - - - - Real-time call control and messaging client over WebSocket. Implements the full JSON-RPC 2.0 protocol with four correlation mechanisms: JSON-RPC id -> pending map for RPC response matching call\_id -> Call object map for event routing control\_id -> Action per Call for action event routing tag -> pending dials map for dial event matching - - - - Configuration for the RELAY client. - - - - Base class for all RELAY events parsed from signalwire.event JSON-RPC messages. - - - - WebSocket client for the RELAY JSON-RPC transport. Wraps IXWebSocket (cross-platform, OpenSSL-backed TLS) while preserving a minimal synchronous interface: connect() blocks until the handshake completes (or fails/times out), send() pushes a text frame, and the on\_message / on\_close / on\_error callbacks are invoked from IXWebSocket's background event thread. RFC 6455 framing, ping/pong, and TLS are handled by IXWebSocket — this class only adapts its async event model to the synchronous connect() contract relay::RelayClient depends on. TLS certificate verification is ALWAYS on for the connect() (wss://) path. To trust a private/self-signed CA (e.g. the porting-sdk test CA), set the SSL\_CERT\_FILE environment variable to the CA bundle — the same cross-port idiom the other ports honor; it is wired into ix::SocketTLSOptions::caFile. When unset, the system trust store is used (production / public CAs). - - - -## Functions - -### call\_state\_from\_string - -Parse a wire string into a CallState. Returns std::nullopt for any value not in the known set (server may introduce new states) — NEVER throws. - -**Modifiers:** `inline` - -#### Signature - -```cpp -std::optional< CallState > call_state_from_string(const std::string & s) -``` - -#### Parameters - - - -#### Returns - -`std::optional< CallState >` - -#### Source - -[`include/signalwire/relay/states.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/states.hpp) - -Line 83. - -*** - -### call\_state\_value - -**Modifiers:** `inline` - -#### Signature - -```cpp -std::string call_state_value(CallState v) -``` - -#### Parameters - - - -#### Returns - -`std::string` - -#### Source - -[`include/signalwire/relay/states.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/states.hpp) - -Line 67. - -*** - -### dial\_state\_from\_string - -**Modifiers:** `inline` - -#### Signature - -```cpp -std::optional< DialState > dial_state_from_string(const std::string & s) -``` - -#### Parameters - - - -#### Returns - -`std::optional< DialState >` - -#### Source - -[`include/signalwire/relay/states.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/states.hpp) - -Line 121. - -*** - -### dial\_state\_value - -**Modifiers:** `inline` - -#### Signature - -```cpp -std::string dial_state_value(DialState v) -``` - -#### Parameters - - - -#### Returns - -`std::string` - -#### Source - -[`include/signalwire/relay/states.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/states.hpp) - -Line 110. - -*** - -### is\_terminal - -Terminal == no further transitions. For a call that is ended. - -**Modifiers:** `inline` - -#### Signature - - - - ```cpp - bool is_terminal(CallState v) - ``` - - - - ```cpp - bool is_terminal(DialState v) - ``` - - - - ```cpp - bool is_terminal(MessageState v) - ``` - - - -#### Parameters (Overload 1) - - - -#### Parameters (Overload 2) - - - -#### Parameters (Overload 3) - - - -#### Returns (Overload 1) - -`bool` - -#### Returns (Overload 2) - -`bool` - -#### Returns (Overload 3) - -`bool` - -#### Source - -[`include/signalwire/relay/states.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/states.hpp) - -Line 93. - -*** - -### message\_state\_from\_string - -**Modifiers:** `inline` - -#### Signature - -```cpp -std::optional< MessageState > message_state_from_string(const std::string & s) -``` - -#### Parameters - - - -#### Returns - -`std::optional< MessageState >` - -#### Source - -[`include/signalwire/relay/states.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/states.hpp) - -Line 168. - -*** - -### message\_state\_value - -**Modifiers:** `inline` - -#### Signature - -```cpp -std::string message_state_value(MessageState v) -``` - -#### Parameters - - - -#### Returns - -`std::string` - -#### Source - -[`include/signalwire/relay/states.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/states.hpp) - -Line 153. - -*** - -### to\_string - -to\_string ADL overload — same wire string as call\_state\_value. - -**Modifiers:** `inline` - -#### Signature - - - - ```cpp - std::string to_string(CallState v) - ``` - - - - ```cpp - std::string to_string(DialState v) - ``` - - - - ```cpp - std::string to_string(MessageState v) - ``` - - - - ```cpp - std::string to_string(Gender gender) - ``` - - - -#### Parameters (Overload 1) - - - -#### Parameters (Overload 2) - - - -#### Parameters (Overload 3) - - - -#### Parameters (Overload 4) - - - -#### Returns (Overload 1) - -`std::string` - -#### Returns (Overload 2) - -`std::string` - -#### Returns (Overload 3) - -`std::string` - -#### Returns (Overload 4) - -`std::string` - -#### Source - -[`include/signalwire/relay/states.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/states.hpp) - -Line 79. - -*** - -### tts\_gender\_value - -Map a Gender to its canonical wire string (the value emitted under the TTS media params' gender key). This is the single normalization point shared by the typed play\_tts / prompt\_tts overloads, so their behavior is identical to passing the bare string. - -**Modifiers:** `inline` - -#### Signature - -```cpp -std::string tts_gender_value(Gender gender) -``` - -#### Parameters - - - -#### Returns - -`std::string` - -#### Source - -[`include/signalwire/relay/tts_gender.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/tts_gender.hpp) - -Line 37. - -## Type Aliases - -### CallEventHandler - -Callback for call events. - -#### Signature - -```cpp -typedef std::function< void(const CallEvent &)> CallEventHandler -``` - -#### Source - -[`include/signalwire/relay/call.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/call.hpp) - -Line 28. - -*** - -### EventHandler - -Generic callback for any inbound signalwire.event. Fired in addition to the typed handlers (on\_call, on\_message, action callbacks). Useful for tracing and for tests/audits that need to assert event delivery. - -#### Signature - -```cpp -typedef std::function< void(const RelayEvent &)> EventHandler -``` - -#### Source - -[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) - -Line 37. - -*** - -### InboundCallHandler - -Callback for inbound calls. - -#### Signature - -```cpp -typedef std::function< void(Call &)> InboundCallHandler -``` - -#### Source - -[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) - -Line 29. - -*** - -### InboundMessageHandler - -Callback for inbound messages. - -#### Signature - -```cpp -typedef std::function< void(const Message &)> InboundMessageHandler -``` - -#### Source - -[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) - -Line 32. - -*** - -### json - -#### Signature - -```cpp -typedef nlohmann::json json -``` - -#### Source - -[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) - -Line 16. - -## Enums - -### CallState - -Call lifecycle state. Mirrors CALL\_STATE\_\* / CALL\_STATES in relay/constants.py. Server-emitted and may grow → call\_state\_from\_string returns an optional on an unknown value. - -#### Signature - -```cpp -enum class CallState -``` - -#### Variants - - - - - - - - - - - -#### Source - -[`include/signalwire/relay/states.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/states.hpp) - -Line 59. - -*** - -### DialState - -Outbound-dial outcome state on the calling.call.dial event's dial\_state field. Grounded in RELAY\_IMPLEMENTATION\_GUIDE.md line 193: dialing (progress), answered (success), failed (all legs failed). DISTINCT from CallState — failed is dial-only; the dial RPC resolves on answered/failed. Server-emitted → dial\_state\_from\_string is optional. - -#### Signature - -```cpp -enum class DialState -``` - -#### Variants - - - - - - - -#### Source - -[`include/signalwire/relay/states.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/states.hpp) - -Line 104. - -*** - -### Gender - -TTS speaker gender as a typed, compile-time-checked closed set. -Call::play\_tts() / Call::prompt\_tts() accept this enum class OR a std::string for their gender argument. The enum gives editor autocompletion and makes a typo fail at the call site — a bare string like "femaie" only fails at runtime, on the TTS engine. The string overload keeps parity with the Python reference (which uses a bare Optional\[str]) and still allows engine-/voice-specific values that aren't one of the two canonical genders. call.play\_tts("hi", "en-US", Gender::Female); // typed, autocompleted -call.play\_tts("hi", "en-US", "female"); // string still works -call.play\_tts("hi", "en-US", "neutral"); // open set: engine value - -Members are the two canonical say\_gender values the calling/fabric OpenAPI documents (female is the default; male is the only other documented value). tts\_gender\_value() maps each member to that wire string, so the enum and string overloads emit the identical TTS frame. - -#### Signature - -```cpp -enum class Gender -``` - -#### Variants - - - - - -#### Source - -[`include/signalwire/relay/tts_gender.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/tts_gender.hpp) - -Line 28. - -*** - -### MessageState - -SMS/MMS delivery state. Mirrors MESSAGE\_STATE\_\* in relay/constants.py. Terminal set == MESSAGE\_TERMINAL\_STATES \{delivered, undelivered, failed\}. NOTE failed here is the MESSAGE failure state — NOT DialState::Failed; the two vocabularies are separate and must not be unified. Server-emitted → message\_state\_from\_string is optional. - -#### Signature - -```cpp -enum class MessageState -``` - -#### Variants - - - - - - - - - - - - - - - -#### Source - -[`include/signalwire/relay/states.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/states.hpp) - -Line 143. - -## Source - -[`include/signalwire/relay/action.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/action.hpp) - -Line 14. diff --git a/fern/products/sdk-reference/cpp/signalwire/relay/message-event/index.mdx b/fern/products/sdk-reference/cpp/signalwire/relay/message-event/index.mdx deleted file mode 100644 index 21c33e6ed2..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/relay/message-event/index.mdx +++ /dev/null @@ -1,72 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/relay/message-event" -title: "MessageEvent" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::relay::MessageEvent" - parent: "signalwire::relay" - module: "signalwire.relay" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/relay_event.hpp" - visibility: "public" ---- -# `MessageEvent` - -Messaging event for SMS/MMS state changes and inbound messages. - -## Signature - -```cpp -struct signalwire::relay::MessageEvent : signalwire::relay::RelayEvent -``` - -## Inheritance - -**Extends:** [signalwire::relay::RelayEvent](/docs/sdk-reference/reference/cpp/signalwire/relay/relay-event) - -## Properties - - - - - - - - - - - -## Methods - -### from\_relay\_event - -**Modifiers:** `static` `inline` - -#### Signature - -```cpp -MessageEvent from_relay_event(const RelayEvent & ev) -``` - -#### Parameters - - - -#### Returns - -`MessageEvent` - -#### Source - -[`include/signalwire/relay/relay_event.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/relay_event.hpp) - -Line 93. - -## Source - -[`include/signalwire/relay/relay_event.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/relay_event.hpp) - -Line 86. diff --git a/fern/products/sdk-reference/cpp/signalwire/relay/message/index.mdx b/fern/products/sdk-reference/cpp/signalwire/relay/message/index.mdx deleted file mode 100644 index 98d2d09eed..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/relay/message/index.mdx +++ /dev/null @@ -1,404 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/relay/message" -title: "Message" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::relay::Message" - parent: "signalwire::relay" - module: "signalwire.relay" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/message.hpp" - visibility: "public" ---- -# `Message` - -Represents an SMS/MMS message tracked through delivery states. States: "queued", "initiated", "sent", "delivered", "undelivered", "failed" Uses shared internal state so the object can be copied/returned by value — copies of a Message observe the same state updates as the underlying instance the registry tracks. - -## Signature - -```cpp -struct signalwire::relay::Message -``` - -## Properties - - - - - - - - - - - - - - - - - -## Methods - -### ~Message - -#### Signature - -```cpp -void ~Message() -``` - -#### Source - -[`include/signalwire/relay/message.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/message.hpp) - -Line 31. - -*** - -### from\_params - -Parse from a RELAY event params object. - -**Modifiers:** `static` - -#### Signature - -```cpp -Message from_params(const json & params) -``` - -#### Parameters - - - -#### Returns - -`Message` - -#### Source - -[`include/signalwire/relay/message.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/message.hpp) - -Line 34. - -*** - -### is\_delivered - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -bool is_delivered() const -``` - -#### Returns - -`bool` - -#### Source - -[`include/signalwire/relay/message.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/message.hpp) - -Line 61. - -*** - -### is\_failed - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -bool is_failed() const -``` - -#### Returns - -`bool` - -#### Source - -[`include/signalwire/relay/message.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/message.hpp) - -Line 62. - -*** - -### is\_terminal - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -bool is_terminal() const -``` - -#### Returns - -`bool` - -#### Source - -[`include/signalwire/relay/message.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/message.hpp) - -Line 66. - -*** - -### Message - -#### Signature - - - - ```cpp - void Message() - ``` - - - - ```cpp - void Message(const Message &) - ``` - - - -#### Parameters (Overload 2) - - - -#### Source - -[`include/signalwire/relay/message.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/message.hpp) - -Line 28. - -*** - -### message\_state - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -std::optional< MessageState > message_state() const -``` - -#### Returns - -`std::optional< MessageState >` - -#### Source - -[`include/signalwire/relay/message.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/message.hpp) - -Line 54. - -*** - -### on\_completed - -Set callback for when message reaches terminal state. If the message is already terminal the callback fires immediately. - -#### Signature - -```cpp -void on_completed(CompletedCallback cb) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/relay/message.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/message.hpp) - -Line 80. - -*** - -### operator= - -#### Signature - -```cpp -Message & operator=(const Message &) -``` - -#### Parameters - - - -#### Returns - -`Message &` - -#### Source - -[`include/signalwire/relay/message.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/message.hpp) - -Line 30. - -*** - -### reason - -**Modifiers:** `const` - -#### Signature - -```cpp -const std::string & reason() const -``` - -#### Returns - -`const std::string &` - -#### Source - -[`include/signalwire/relay/message.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/message.hpp) - -Line 57. - -*** - -### set\_reason - -#### Signature - -```cpp -void set_reason(const std::string & r) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/relay/message.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/message.hpp) - -Line 59. - -*** - -### set\_state - -#### Signature - -```cpp -void set_state(const std::string & s) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/relay/message.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/message.hpp) - -Line 58. - -*** - -### state - -**Modifiers:** `const` - -#### Signature - -```cpp -const std::string & state() const -``` - -#### Returns - -`const std::string &` - -#### Source - -[`include/signalwire/relay/message.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/message.hpp) - -Line 49. - -*** - -### update\_state - -Update state from a messaging.state event. Notifies waiters / callbacks when the state is terminal. - -#### Signature - -```cpp -void update_state(const std::string & new_state) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/relay/message.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/message.hpp) - -Line 70. - -*** - -### wait - -Block until message reaches a terminal state. Returns true if terminal, false on timeout. \[\[nodiscard]]: the delivered-vs-timed-out result is the reason you called wait() — dropping it is a bug. - -#### Signature - -```cpp -bool wait(int timeout_ms = 0) -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`include/signalwire/relay/message.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/message.hpp) - -Line 76. - -## Type Aliases - -### CompletedCallback - -#### Signature - -```cpp -typedef std::function< void(const Message &)> CompletedCallback -``` - -#### Source - -[`include/signalwire/relay/message.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/message.hpp) - -Line 26. - -## Source - -[`include/signalwire/relay/message.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/message.hpp) - -Line 25. diff --git a/fern/products/sdk-reference/cpp/signalwire/relay/relay-client/index.mdx b/fern/products/sdk-reference/cpp/signalwire/relay/relay-client/index.mdx deleted file mode 100644 index 077da9a56b..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/relay/relay-client/index.mdx +++ /dev/null @@ -1,581 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/relay/relay-client" -title: "RelayClient" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::relay::RelayClient" - parent: "signalwire::relay" - module: "signalwire.relay" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp" - visibility: "public" ---- -# `RelayClient` - -Real-time call control and messaging client over WebSocket. Implements the full JSON-RPC 2.0 protocol with four correlation mechanisms: -JSON-RPC id -> pending map for RPC response matching -call\_id -> Call object map for event routing -control\_id -> Action per Call for action event routing -tag -> pending dials map for dial event matching - -## Signature - -```cpp -class signalwire::relay::RelayClient -``` - -## Methods - -### ~RelayClient - -#### Signature - -```cpp -void ~RelayClient() -``` - -#### Source - -[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) - -Line 67. - -*** - -### config - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -const RelayConfig & config() const -``` - -#### Returns - -`const RelayConfig &` - -#### Source - -[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) - -Line 132. - -*** - -### connect - -#### Signature - -```cpp -bool connect() -``` - -#### Returns - -`bool` - -#### Source - -[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) - -Line 77. - -*** - -### dial - -Dial outbound. The devices argument is the nested "device-of-leg-of-leg" array used by the Python SDK (\[\[\{type:phone,...\}]]). Returns a Call once the server emits calling.call.dial(answered) for the dial's tag, or an empty Call on timeout / failure. -tag lets callers pin an explicit dial tag for journal-based assertions; if blank, a UUID is generated. dial\_timeout\_ms caps how long dial() blocks waiting for the server's terminal dial event. max\_duration (seconds) is forwarded into the calling.dial frame when non-zero. - -#### Signature - -```cpp -Call dial( - const json & devices, - const std::string & tag = "", - int dial_timeout_ms = 120000, - int max_duration = 0 -) -``` - -#### Parameters - - - - - - - - - -#### Returns - -`Call` - -#### Source - -[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) - -Line 97. - -*** - -### disconnect - -#### Signature - -```cpp -void disconnect() -``` - -#### Source - -[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) - -Line 78. - -*** - -### execute - -#### Signature - -```cpp -json execute(const std::string & method, const json & params) -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) - -Line 136. - -*** - -### find\_call - -#### Signature - -```cpp -Call * find_call(const std::string & call_id) -``` - -#### Parameters - - - -#### Returns - -`Call *` - -#### Source - -[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) - -Line 141. - -*** - -### from\_env - -Construct from environment variables: SIGNALWIRE\_PROJECT\_ID, SIGNALWIRE\_API\_TOKEN, SIGNALWIRE\_SPACE - -**Modifiers:** `static` - -#### Signature - -```cpp -RelayClient from_env() -``` - -#### Returns - -`RelayClient` - -#### Source - -[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) - -Line 74. - -*** - -### is\_connected - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -bool is_connected() const -``` - -#### Returns - -`bool` - -#### Source - -[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) - -Line 80. - -*** - -### on\_call - -#### Signature - -```cpp -void on_call(InboundCallHandler handler) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) - -Line 83. - -*** - -### on\_event - -Register a generic event observer. Called for every dispatched signalwire.event after typed routing (on\_call/on\_message/action callbacks) has run. Multiple registrations are NOT supported — the most-recent registration wins. - -#### Signature - -```cpp -void on_event(EventHandler handler) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) - -Line 106. - -*** - -### on\_message - -#### Signature - -```cpp -void on_message(InboundMessageHandler handler) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) - -Line 114. - -*** - -### operator= - -#### Signature - -```cpp -RelayClient & operator=(const RelayClient &) -``` - -#### Parameters - - - -#### Returns - -`RelayClient &` - -#### Source - -[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) - -Line 70. - -*** - -### register\_call - -#### Signature - -```cpp -void register_call(const std::string & call_id, Call * call) -``` - -#### Parameters - - - - - -#### Source - -[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) - -Line 139. - -*** - -### relay\_protocol - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -const std::string & relay_protocol() const -``` - -#### Returns - -`const std::string &` - -#### Source - -[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) - -Line 133. - -*** - -### RelayClient - -Construct from explicit configuration. - -**Modifiers:** `explicit` - -#### Signature - - - - ```cpp - void RelayClient(const RelayConfig & config = RelayConfig{}) - ``` - - - - ```cpp - void RelayClient( - const std::string & project, - const std::string & token, - const std::string & host = DEFAULT_HOST, - const std::vector< std::string > & contexts = {"default"} - ) - ``` - - - - ```cpp - void RelayClient(const RelayClient &) - ``` - - - -#### Parameters (Overload 1) - - - -#### Parameters (Overload 2) - - - - - - - - - -#### Parameters (Overload 3) - - - -#### Source - -[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) - -Line 59. - -*** - -### run - -#### Signature - -```cpp -void run() -``` - -#### Source - -[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) - -Line 79. - -*** - -### send\_message - -Send an SMS/MMS message via messaging.send. Returns a Message tracker whose state advances as the server pushes messaging.state events. Use Message::wait() to block until the terminal state (delivered / undelivered / failed). - -#### Signature - -```cpp -Message send_message( - const std::string & from, - const std::string & to, - const std::string & body, - const std::vector< std::string > & media = {}, - const std::vector< std::string > & tags = {}, - const std::string & region = "", - const std::string & context = "" -) -``` - -#### Parameters - - - - - - - - - - - - - - - -#### Returns - -`Message` - -#### Source - -[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) - -Line 120. - -*** - -### send\_raw\_request - -Send a JSON-RPC request to the server. Public so harnesses and tests can drive arbitrary methods (e.g. an explicit signalwire.subscribe ack frame for the audit fixture). - -#### Signature - -```cpp -json send_raw_request(const std::string & method, const json & params) -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) - -Line 111. - -*** - -### subscribe - -#### Signature - -```cpp -void subscribe(const std::vector< std::string > & contexts) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) - -Line 128. - -*** - -### unregister\_call - -#### Signature - -```cpp -void unregister_call(const std::string & call_id) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) - -Line 140. - -*** - -### unsubscribe - -#### Signature - -```cpp -void unsubscribe(const std::vector< std::string > & contexts) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) - -Line 129. - -## Source - -[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) - -Line 56. diff --git a/fern/products/sdk-reference/cpp/signalwire/relay/relay-config/index.mdx b/fern/products/sdk-reference/cpp/signalwire/relay/relay-config/index.mdx deleted file mode 100644 index e662208502..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/relay/relay-config/index.mdx +++ /dev/null @@ -1,46 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/relay/relay-config" -title: "RelayConfig" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::relay::RelayConfig" - parent: "signalwire::relay" - module: "signalwire.relay" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp" - visibility: "public" ---- -# `RelayConfig` - -Configuration for the RELAY client. - -## Signature - -```cpp -struct signalwire::relay::RelayConfig -``` - -## Properties - - - - - - - - - - - - - - - -## Source - -[`include/signalwire/relay/client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/client.hpp) - -Line 40. diff --git a/fern/products/sdk-reference/cpp/signalwire/relay/relay-event/index.mdx b/fern/products/sdk-reference/cpp/signalwire/relay/relay-event/index.mdx deleted file mode 100644 index 526d538c6e..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/relay/relay-event/index.mdx +++ /dev/null @@ -1,98 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/relay/relay-event" -title: "RelayEvent" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::relay::RelayEvent" - parent: "signalwire::relay" - module: "signalwire.relay" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/relay_event.hpp" - visibility: "public" ---- -# `RelayEvent` - -Base class for all RELAY events parsed from signalwire.event JSON-RPC messages. - -## Signature - -```cpp -struct signalwire::relay::RelayEvent -``` - -## Properties - - - - - - - - - -## Methods - -### from\_json - -Parse from a signalwire.event params JSON. The outer params contains event\_type and the inner params with event-specific data. - -**Modifiers:** `static` `inline` - -#### Signature - -```cpp -RelayEvent from_json(const json & j) -``` - -#### Parameters - - - -#### Returns - -`RelayEvent` - -#### Source - -[`include/signalwire/relay/relay_event.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/relay_event.hpp) - -Line 29. - -*** - -### RelayEvent - -#### Signature - - - - ```cpp - void RelayEvent() - ``` - - - - ```cpp - void RelayEvent(const std::string & type) - ``` - - - -#### Parameters (Overload 2) - - - -#### Source - -[`include/signalwire/relay/relay_event.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/relay_event.hpp) - -Line 24. - -## Source - -[`include/signalwire/relay/relay_event.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/relay_event.hpp) - -Line 17. diff --git a/fern/products/sdk-reference/cpp/signalwire/relay/web-socket-client/index.mdx b/fern/products/sdk-reference/cpp/signalwire/relay/web-socket-client/index.mdx deleted file mode 100644 index 23c6e127c6..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/relay/web-socket-client/index.mdx +++ /dev/null @@ -1,352 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/relay/web-socket-client" -title: "WebSocketClient" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::relay::WebSocketClient" - parent: "signalwire::relay" - module: "signalwire.relay" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/websocket.hpp" - visibility: "public" ---- -# `WebSocketClient` - -WebSocket client for the RELAY JSON-RPC transport. -Wraps IXWebSocket (cross-platform, OpenSSL-backed TLS) while preserving a minimal synchronous interface: connect() blocks until the handshake completes (or fails/times out), send() pushes a text frame, and the on\_message / on\_close / on\_error callbacks are invoked from IXWebSocket's background event thread. RFC 6455 framing, ping/pong, and TLS are handled by IXWebSocket — this class only adapts its async event model to the synchronous connect() contract relay::RelayClient depends on. -TLS certificate verification is ALWAYS on for the connect() (wss://) path. To trust a private/self-signed CA (e.g. the porting-sdk test CA), set the SSL\_CERT\_FILE environment variable to the CA bundle — the same cross-port idiom the other ports honor; it is wired into ix::SocketTLSOptions::caFile. When unset, the system trust store is used (production / public CAs). - -## Signature - -```cpp -class signalwire::relay::WebSocketClient -``` - -## Methods - -### ~WebSocketClient - -#### Signature - -```cpp -void ~WebSocketClient() -``` - -#### Source - -[`include/signalwire/relay/websocket.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/websocket.hpp) - -Line 42. - -*** - -### close - -Close the WebSocket connection gracefully. - -#### Signature - -```cpp -void close(int code = 1000, const std::string & reason = "") -``` - -#### Parameters - - - - - -#### Source - -[`include/signalwire/relay/websocket.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/websocket.hpp) - -Line 58. - -*** - -### connect - -Connect to wss://host:port/ with TLS. Blocks until the WebSocket is open or the attempt fails/times out. Verifies the server certificate against the system store (or SSL\_CERT\_FILE when set). - -#### Signature - -```cpp -bool connect(const std::string & host, int port = 443) -``` - -#### Parameters - - - - - -#### Returns - -`bool` - -#### Source - -[`include/signalwire/relay/websocket.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/websocket.hpp) - -Line 50. - -*** - -### connect\_plain - -Connect to ws://host:port/ without TLS (plain TCP). Used by audit fixtures and local dev servers that don't speak TLS. Production always uses TLS via the connect() overload above. - -#### Signature - -```cpp -bool connect_plain(const std::string & host, int port) -``` - -#### Parameters - - - - - -#### Returns - -`bool` - -#### Source - -[`include/signalwire/relay/websocket.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/websocket.hpp) - -Line 55. - -*** - -### is\_connected - -Check if connected. - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -bool is_connected() const -``` - -#### Returns - -`bool` - -#### Source - -[`include/signalwire/relay/websocket.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/websocket.hpp) - -Line 64. - -*** - -### on\_close - -Set callback for connection close. - -**Modifiers:** `inline` - -#### Signature - -```cpp -void on_close(CloseCallback cb) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/relay/websocket.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/websocket.hpp) - -Line 70. - -*** - -### on\_error - -Set callback for errors. - -**Modifiers:** `inline` - -#### Signature - -```cpp -void on_error(ErrorCallback cb) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/relay/websocket.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/websocket.hpp) - -Line 73. - -*** - -### on\_message - -Set callback for received text messages. - -**Modifiers:** `inline` - -#### Signature - -```cpp -void on_message(MessageCallback cb) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/relay/websocket.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/websocket.hpp) - -Line 67. - -*** - -### operator= - -#### Signature - -```cpp -WebSocketClient & operator=(const WebSocketClient &) -``` - -#### Parameters - - - -#### Returns - -`WebSocketClient &` - -#### Source - -[`include/signalwire/relay/websocket.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/websocket.hpp) - -Line 45. - -*** - -### send - -Send a text frame. - -#### Signature - -```cpp -bool send(const std::string & message) -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`include/signalwire/relay/websocket.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/websocket.hpp) - -Line 61. - -*** - -### WebSocketClient - -#### Signature - - - - ```cpp - void WebSocketClient() - ``` - - - - ```cpp - void WebSocketClient(const WebSocketClient &) - ``` - - - -#### Parameters (Overload 2) - - - -#### Source - -[`include/signalwire/relay/websocket.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/websocket.hpp) - -Line 41. - -## Type Aliases - -### CloseCallback - -#### Signature - -```cpp -typedef std::function< void(int code, const std::string &reason)> CloseCallback -``` - -#### Source - -[`include/signalwire/relay/websocket.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/websocket.hpp) - -Line 38. - -*** - -### ErrorCallback - -#### Signature - -```cpp -typedef std::function< void(const std::string &error)> ErrorCallback -``` - -#### Source - -[`include/signalwire/relay/websocket.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/websocket.hpp) - -Line 39. - -*** - -### MessageCallback - -#### Signature - -```cpp -typedef std::function< void(const std::string &)> MessageCallback -``` - -#### Source - -[`include/signalwire/relay/websocket.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/websocket.hpp) - -Line 37. - -## Source - -[`include/signalwire/relay/websocket.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/relay/websocket.hpp) - -Line 35. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/crud-resource/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/crud-resource/index.mdx deleted file mode 100644 index 5eee9f861a..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/rest/crud-resource/index.mdx +++ /dev/null @@ -1,184 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/rest/crud-resource" -title: "CrudResource" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::rest::CrudResource" - parent: "signalwire::rest" - module: "signalwire.rest" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp" - visibility: "public" ---- -# `CrudResource` - -Generic CRUD resource for REST API namespaces. - -## Signature - -```cpp -class signalwire::rest::CrudResource -``` - -## Methods - -### create - -**Modifiers:** `const` - -#### Signature - -```cpp -json create(const json & data) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) - -Line 96. - -*** - -### CrudResource - -#### Signature - -```cpp -void CrudResource(const HttpClient & client, const std::string & base_path) -``` - -#### Parameters - - - - - -#### Source - -[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) - -Line 91. - -*** - -### del - -**Modifiers:** `const` - -#### Signature - -```cpp -json del(const std::string & id) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) - -Line 99. - -*** - -### get - -**Modifiers:** `const` - -#### Signature - -```cpp -json get(const std::string & id) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) - -Line 97. - -*** - -### list - -**Modifiers:** `const` - -#### Signature - -```cpp -json list(const std::map< std::string, std::string > & params = {}) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) - -Line 95. - -*** - -### update - -**Modifiers:** `const` - -#### Signature - -```cpp -json update(const std::string & id, const json & data) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) - -Line 98. - -## Source - -[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) - -Line 89. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/http-client/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/http-client/index.mdx deleted file mode 100644 index d08500a403..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/rest/http-client/index.mdx +++ /dev/null @@ -1,299 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/rest/http-client" -title: "HttpClient" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::rest::HttpClient" - parent: "signalwire::rest" - module: "signalwire.rest" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp" - visibility: "public" ---- -# `HttpClient` - -HTTP client with Basic Auth support using cpp-httplib. - -## Signature - -```cpp -class signalwire::rest::HttpClient -``` - -## Methods - -### base\_url - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -const std::string & base_url() const -``` - -#### Returns - -`const std::string &` - -#### Source - -[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) - -Line 74. - -*** - -### del - -DELETE request. - -**Modifiers:** `const` - -#### Signature - -```cpp -json del(const std::string & path) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) - -Line 58. - -*** - -### get - -GET request. - -**Modifiers:** `const` - -#### Signature - -```cpp -json get( - const std::string & path, - const std::map< std::string, std::string > & params = {} -) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) - -Line 42. - -*** - -### HttpClient - -#### Signature - -```cpp -void HttpClient( - const std::string & base_url, - const std::string & username, - const std::string & password -) -``` - -#### Parameters - - - - - - - -#### Source - -[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) - -Line 33. - -*** - -### patch - -PATCH request. - -**Modifiers:** `const` - -#### Signature - -```cpp -json patch(const std::string & path, const json & body = json::object()) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) - -Line 54. - -*** - -### post - -POST request. - -**Modifiers:** `const` - -#### Signature - -```cpp -json post(const std::string & path, const json & body = json::object()) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) - -Line 46. - -*** - -### put - -PUT request. - -**Modifiers:** `const` - -#### Signature - -```cpp -json put(const std::string & path, const json & body = json::object()) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) - -Line 50. - -*** - -### set\_ca\_cert\_path - -Trust a private/self-signed CA bundle (PEM) for https:// requests. Sets the underlying SSLClient's CA path and keeps server-certificate verification ON. Production (public CAs) needs no call — the system trust store is used, and SSL\_CERT\_FILE is also honored automatically. C++-only ergonomic hook (Python's requests-based client trusts a custom CA via the SSL\_CERT\_FILE / REQUESTS\_CA\_BUNDLE env vars instead). - -#### Signature - -```cpp -void set_ca_cert_path(const std::string & path) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) - -Line 72. - -*** - -### set\_header - -Set additional default headers. - -#### Signature - -```cpp -void set_header(const std::string & key, const std::string & value) -``` - -#### Parameters - - - - - -#### Source - -[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) - -Line 61. - -*** - -### set\_timeout - -Set request timeout in seconds. - -#### Signature - -```cpp -void set_timeout(int seconds) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) - -Line 64. - -## Source - -[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) - -Line 31. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/index.mdx deleted file mode 100644 index 01e93a6c35..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/rest/index.mdx +++ /dev/null @@ -1,258 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/rest" -title: "rest" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "module" - language: "cpp" - qualified_name: "signalwire::rest" - parent: "signalwire" - module: "signalwire" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp" ---- -# `rest` - -## Signature - -```cpp -namespace signalwire::rest -``` - -## Classes - - - - Generic CRUD resource for REST API namespaces. - - - - HTTP client with Basic Auth support using cpp-httplib. - - - - Iterates items across paginated API responses. Mirrors signalwire-python's signalwire.rest.\_pagination.PaginatedIterator: fetches the configured path with the configured params, walks the data\_key array, then follows links.next (parsing its query string for the next page's params) until the response carries no links.next. Iteration is lazy the constructor records inputs but performs no HTTP. The first has\_next() / next() call performs the first fetch. Cursor query params are extracted by parsing links.next like Python's urllib.parse.urlparse + parse\_qs. - - - - Top-level SignalWire REST client with all API namespaces. - - - - Error thrown on non-2xx REST API responses. - - - -## Functions - -### make\_headers - -**Modifiers:** `static` - -#### Signature - -```cpp -httplib::Headers make_headers( - const std::string & auth, - const std::map< std::string, std::string > & extra -) -``` - -#### Parameters - - - - - -#### Returns - -`httplib::Headers` - -#### Source - -[`src/rest/http_client.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/rest/http_client.cpp) - -Line 103. - -*** - -### parse\_url - -**Modifiers:** `static` - -#### Signature - -```cpp -std::pair< std::string, std::string > parse_url(const std::string & base_url) -``` - -#### Parameters - - - -#### Returns - -`std::pair< std::string, std::string >` - -#### Source - -[`src/rest/http_client.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/rest/http_client.cpp) - -Line 91. - -*** - -### to\_wire\_string - -Serialize a PhoneCallHandler to its wire string. - -**Modifiers:** `inline` - -#### Signature - -```cpp -std::string to_wire_string(PhoneCallHandler h) -``` - -#### Parameters - - - -#### Returns - -`std::string` - -#### Source - -[`include/signalwire/rest/phone_call_handler.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/phone_call_handler.hpp) - -Line 54. - -## Type Aliases - -### json - -#### Signature - -```cpp -typedef nlohmann::json json -``` - -#### Source - -[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) - -Line 16. - -## Enums - -### PhoneCallHandler - -Enumeration of call\_handler values accepted by phone\_numbers.update. -Setting a phone number's call\_handler + the handler-specific companion field routes inbound calls and auto-materializes the matching Fabric resource on the server. The typed set\_\* helpers on PhoneNumbersNamespace wrap the low-level update call with the right combination — prefer those over constructing the wire body by hand. -Named PhoneCallHandler (not CallHandler) to avoid colliding with signalwire::relay::InboundCallHandler — the callback type used by the RELAY client for inbound-call events. - -Enum value\ -Wire value\ -Companion field\ -Auto-materializes - -RelayScript\ -relay\_script\ -call\_relay\_script\_url\ -swml\_webhook - -LamlWebhooks\ -laml\_webhooks\ -call\_request\_url\ -cxml\_webhook - -LamlApplication\ -laml\_application\ -call\_laml\_application\_id\ -cxml\_application - -AiAgent\ -ai\_agent\ -call\_ai\_agent\_id\ -ai\_agent - -CallFlow\ -call\_flow\ -call\_flow\_id\ -call\_flow - -RelayApplication\ -relay\_application\ -call\_relay\_application\ -relay\_application - -RelayTopic\ -relay\_topic\ -call\_relay\_topic\ -(RELAY routing) - -RelayContext\ -relay\_context\ -call\_relay\_context\ -(legacy) - -RelayConnector\ -relay\_connector\ -(connector config)\ -(internal) - -VideoRoom\ -video\_room\ -call\_video\_room\_id\ -(Video API) - -Dialogflow\ -dialogflow\ -call\_dialogflow\_agent\_id\ -(none) - -Note: LamlWebhooks (wire value laml\_webhooks) produces a cXML handler despite the plural name. For SWML, use RelayScript. - -#### Signature - -```cpp -enum class PhoneCallHandler -``` - -#### Variants - - - - - - - - - - - - - - - - - - - - - - - -#### Source - -[`include/signalwire/rest/phone_call_handler.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/phone_call_handler.hpp) - -Line 39. - -## Source - -[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) - -Line 14. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/paginated-iterator/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/paginated-iterator/index.mdx deleted file mode 100644 index a952ddd836..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/rest/paginated-iterator/index.mdx +++ /dev/null @@ -1,261 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/rest/paginated-iterator" -title: "PaginatedIterator" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::rest::PaginatedIterator" - parent: "signalwire::rest" - module: "signalwire.rest" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp" - visibility: "public" ---- -# `PaginatedIterator` - -Iterates items across paginated API responses. -Mirrors signalwire-python's signalwire.rest.\_pagination.PaginatedIterator: fetches the configured path with the configured params, walks the data\_key array, then follows links.next (parsing its query string for the next page's params) until the response carries no links.next. -Iteration is lazy the constructor records inputs but performs no HTTP. The first has\_next() / next() call performs the first fetch. Cursor query params are extracted by parsing links.next like Python's urllib.parse.urlparse + parse\_qs. - -## Signature - -```cpp -class signalwire::rest::PaginatedIterator -``` - -## Methods - -### data\_key - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -const std::string & data_key() const -``` - -#### Returns - -`const std::string &` - -#### Source - -[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) - -Line 140. - -*** - -### done - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -bool done() const -``` - -#### Returns - -`bool` - -#### Source - -[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) - -Line 143. - -*** - -### has\_next - -Returns true if another item can be fetched. Performs HTTP if the in-memory buffer is exhausted but more pages remain. \[\[nodiscard]]: this is the loop condition — discarding it loses the "more items?" answer (and the side-effecting page fetch is not why you'd call it). - -#### Signature - -```cpp -bool has_next() -``` - -#### Returns - -`bool` - -#### Source - -[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) - -Line 129. - -*** - -### http - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -const HttpClient & http() const -``` - -#### Returns - -`const HttpClient &` - -#### Source - -[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) - -Line 137. - -*** - -### index - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -size_t index() const -``` - -#### Returns - -`size_t` - -#### Source - -[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) - -Line 141. - -*** - -### items - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -const std::vector< json > & items() const -``` - -#### Returns - -`const std::vector< json > &` - -#### Source - -[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) - -Line 142. - -*** - -### next - -Returns the next item; throws std::out\_of\_range when the iterator is exhausted (mirrors Python's StopIteration). \[\[nodiscard]]: dropping the returned item silently consumes it. - -#### Signature - -```cpp -json next() -``` - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) - -Line 134. - -*** - -### PaginatedIterator - -#### Signature - -```cpp -void PaginatedIterator( - const HttpClient & http, - const std::string & path, - const std::map< std::string, std::string > & params = {}, - const std::string & data_key = "data" -) -``` - -#### Parameters - - - - - - - - - -#### Source - -[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) - -Line 119. - -*** - -### params - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -const std::map< std::string, std::string > & params() const -``` - -#### Returns - -`const std::map< std::string, std::string > &` - -#### Source - -[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) - -Line 139. - -*** - -### path - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -const std::string & path() const -``` - -#### Returns - -`const std::string &` - -#### Source - -[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) - -Line 138. - -## Source - -[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) - -Line 117. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/addresses-namespace/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/addresses-namespace/index.mdx deleted file mode 100644 index 1c5dfc9703..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/addresses-namespace/index.mdx +++ /dev/null @@ -1,54 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/rest/rest-client/addresses-namespace" -title: "AddressesNamespace" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::rest::RestClient::AddressesNamespace" - parent: "signalwire::rest::RestClient" - module: "signalwire.rest.RestClient" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" - visibility: "public" ---- -# `AddressesNamespace` - -## Signature - -```cpp -struct signalwire::rest::RestClient::AddressesNamespace : signalwire::rest::CrudResource -``` - -## Inheritance - -**Extends:** [signalwire::rest::CrudResource](/docs/sdk-reference/reference/cpp/signalwire/rest/crud-resource) - -## Methods - -### AddressesNamespace - -**Modifiers:** `inline` - -#### Signature - -```cpp -void AddressesNamespace(const HttpClient & c) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1146. - -## Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1145. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/calling-namespace/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/calling-namespace/index.mdx deleted file mode 100644 index 66814390e4..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/calling-namespace/index.mdx +++ /dev/null @@ -1,1413 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/rest/rest-client/calling-namespace" -title: "CallingNamespace" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::rest::RestClient::CallingNamespace" - parent: "signalwire::rest::RestClient" - module: "signalwire.rest.RestClient" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" - visibility: "public" ---- -# `CallingNamespace` - -## Signature - -```cpp -struct signalwire::rest::RestClient::CallingNamespace -``` - -## Properties - - - -## Methods - -### ai\_hold - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json ai_hold( - const std::string & call_id, - const json & params = json::object() -) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 394. - -*** - -### ai\_message - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json ai_message(const std::string & call_id, const json & params) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 391. - -*** - -### ai\_stop - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json ai_stop( - const std::string & call_id, - const json & params = json::object() -) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 402. - -*** - -### ai\_unhold - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json ai_unhold( - const std::string & call_id, - const json & params = json::object() -) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 398. - -*** - -### answer - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json answer(const std::string & id) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 446. - -*** - -### CallingNamespace - -**Modifiers:** `inline` - -#### Signature - -```cpp -void CallingNamespace(const HttpClient & c) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 275. - -*** - -### collect - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json collect(const std::string & call_id, const json & params) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 338. - -*** - -### collect\_start\_input\_timers - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json collect_start_input_timers( - const std::string & call_id, - const json & params -) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 344. - -*** - -### collect\_stop - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json collect_stop(const std::string & call_id, const json & params) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 341. - -*** - -### connect - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json connect(const std::string & id, const json & data) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 444. - -*** - -### denoise - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json denoise( - const std::string & call_id, - const json & params = json::object() -) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 374. - -*** - -### denoise\_stop - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json denoise_stop(const std::string & call_id, const json & params) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 378. - -*** - -### detect - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json detect(const std::string & call_id, const json & params) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 350. - -*** - -### detect\_stop - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json detect_stop(const std::string & call_id, const json & params) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 353. - -*** - -### dial - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json dial(const json & params) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 294. - -*** - -### disconnect - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json disconnect( - const std::string & call_id, - const json & params = json::object() -) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 302. - -*** - -### end - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json end( - const std::string & call_id, - const json & params = json::object() -) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 296. - -*** - -### end\_call - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json end_call(const std::string & id) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 443. - -*** - -### execute - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json execute( - const std::string & command, - const json & params, - const std::optional< std::string > & call_id = std::nullopt -) const -``` - -#### Parameters - - - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 285. - -*** - -### get\_call - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json get_call(const std::string & id) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 441. - -*** - -### hangup - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json hangup(const std::string & id) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 447. - -*** - -### hold - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json hold(const std::string & id) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 448. - -*** - -### list\_calls - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json list_calls(const std::map< std::string, std::string > & p = {}) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 440. - -*** - -### live\_transcribe - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json live_transcribe(const std::string & call_id, const json & params) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 408. - -*** - -### live\_translate - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json live_translate(const std::string & call_id, const json & params) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 411. - -*** - -### play - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json play(const std::string & call_id, const json & params) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 307. - -*** - -### play\_pause - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json play_pause(const std::string & call_id, const json & params) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 310. - -*** - -### play\_resume - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json play_resume(const std::string & call_id, const json & params) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 313. - -*** - -### play\_stop - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json play_stop(const std::string & call_id, const json & params) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 316. - -*** - -### play\_volume - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json play_volume(const std::string & call_id, const json & params) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 319. - -*** - -### receive\_fax\_stop - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json receive_fax_stop( - const std::string & call_id, - const json & params = json::object() -) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 420. - -*** - -### record - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json record(const std::string & call_id, const json & params) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 324. - -*** - -### record\_pause - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json record_pause(const std::string & call_id, const json & params) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 327. - -*** - -### record\_resume - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json record_resume(const std::string & call_id, const json & params) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 330. - -*** - -### record\_stop - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json record_stop(const std::string & call_id, const json & params) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 333. - -*** - -### refer - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json refer(const std::string & call_id, const json & params) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 426. - -*** - -### send\_digits - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json send_digits(const std::string & id, const json & data) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 445. - -*** - -### send\_fax\_stop - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json send_fax_stop( - const std::string & call_id, - const json & params = json::object() -) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 416. - -*** - -### stream - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json stream(const std::string & call_id, const json & params) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 366. - -*** - -### stream\_stop - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json stream_stop(const std::string & call_id, const json & params) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 369. - -*** - -### tap - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json tap(const std::string & call_id, const json & params) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 358. - -*** - -### tap\_stop - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json tap_stop(const std::string & call_id, const json & params) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 361. - -*** - -### transcribe - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json transcribe(const std::string & call_id, const json & params) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 383. - -*** - -### transcribe\_stop - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json transcribe_stop(const std::string & call_id, const json & params) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 386. - -*** - -### transfer - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json transfer(const std::string & call_id, const json & params) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 299. - -*** - -### unhold - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json unhold(const std::string & id) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 449. - -*** - -### update - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json update(const json & params) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 295. - -*** - -### update\_call - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json update_call(const std::string & id, const json & data) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 442. - -*** - -### user\_event - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json user_event(const std::string & call_id, const json & params) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 431. - -## Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 272. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/chat-namespace/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/chat-namespace/index.mdx deleted file mode 100644 index b69a2f2cff..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/chat-namespace/index.mdx +++ /dev/null @@ -1,106 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/rest/rest-client/chat-namespace" -title: "ChatNamespace" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::rest::RestClient::ChatNamespace" - parent: "signalwire::rest::RestClient" - module: "signalwire.rest.RestClient" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" - visibility: "public" ---- -# `ChatNamespace` - -## Signature - -```cpp -struct signalwire::rest::RestClient::ChatNamespace -``` - -## Properties - - - -## Methods - -### ChatNamespace - -**Modifiers:** `inline` - -#### Signature - -```cpp -void ChatNamespace(const HttpClient & c) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1423. - -*** - -### list\_messages - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json list_messages(const std::map< std::string, std::string > & p = {}) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1425. - -*** - -### send\_message - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json send_message(const json & data) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1424. - -## Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1421. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-accounts/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-accounts/index.mdx deleted file mode 100644 index 8278edde46..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-accounts/index.mdx +++ /dev/null @@ -1,162 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/rest/rest-client/compat-accounts" -title: "CompatAccounts" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::rest::RestClient::CompatAccounts" - parent: "signalwire::rest::RestClient" - module: "signalwire.rest.RestClient" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" - visibility: "public" ---- -# `CompatAccounts` - -## Signature - -```cpp -struct signalwire::rest::RestClient::CompatAccounts -``` - -## Properties - - - - - -## Methods - -### CompatAccounts - -**Modifiers:** `inline` - -#### Signature - -```cpp -void CompatAccounts(const HttpClient & c) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 930. - -*** - -### create - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json create(const json & data) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 934. - -*** - -### get - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json get(const std::string & sid) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 935. - -*** - -### list - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json list(const std::map< std::string, std::string > & params = {}) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 931. - -*** - -### update - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json update(const std::string & sid, const json & data) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 939. - -## Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 927. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-applications/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-applications/index.mdx deleted file mode 100644 index 5ac0e442e3..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-applications/index.mdx +++ /dev/null @@ -1,84 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/rest/rest-client/compat-applications" -title: "CompatApplications" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::rest::RestClient::CompatApplications" - parent: "signalwire::rest::RestClient" - module: "signalwire.rest.RestClient" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" - visibility: "public" ---- -# `CompatApplications` - -## Signature - -```cpp -struct signalwire::rest::RestClient::CompatApplications : signalwire::rest::CrudResource -``` - -## Inheritance - -**Extends:** [signalwire::rest::CrudResource](/docs/sdk-reference/reference/cpp/signalwire/rest/crud-resource) - -## Methods - -### CompatApplications - -**Modifiers:** `inline` - -#### Signature - -```cpp -void CompatApplications(const HttpClient & c, const std::string & base) -``` - -#### Parameters - - - - - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 945. - -*** - -### update - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json update(const std::string & sid, const json & data) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 947. - -## Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 944. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-calls/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-calls/index.mdx deleted file mode 100644 index a5fe5d8040..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-calls/index.mdx +++ /dev/null @@ -1,208 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/rest/rest-client/compat-calls" -title: "CompatCalls" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::rest::RestClient::CompatCalls" - parent: "signalwire::rest::RestClient" - module: "signalwire.rest.RestClient" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" - visibility: "public" ---- -# `CompatCalls` - -## Signature - -```cpp -struct signalwire::rest::RestClient::CompatCalls : signalwire::rest::CrudResource -``` - -## Inheritance - -**Extends:** [signalwire::rest::CrudResource](/docs/sdk-reference/reference/cpp/signalwire/rest/crud-resource) - -## Methods - -### CompatCalls - -**Modifiers:** `inline` - -#### Signature - -```cpp -void CompatCalls(const HttpClient & c, const std::string & base) -``` - -#### Parameters - - - - - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 803. - -*** - -### start\_recording - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json start_recording(const std::string & call_sid, const json & data) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 812. - -*** - -### start\_stream - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json start_stream(const std::string & call_sid, const json & data) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 822. - -*** - -### stop\_stream - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json stop_stream( - const std::string & call_sid, - const std::string & stream_sid, - const json & data -) const -``` - -#### Parameters - - - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 825. - -*** - -### update - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json update(const std::string & sid, const json & data) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 807. - -*** - -### update\_recording - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json update_recording( - const std::string & call_sid, - const std::string & recording_sid, - const json & data -) const -``` - -#### Parameters - - - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 815. - -## Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 802. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-conferences/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-conferences/index.mdx deleted file mode 100644 index be455df172..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-conferences/index.mdx +++ /dev/null @@ -1,454 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/rest/rest-client/compat-conferences" -title: "CompatConferences" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::rest::RestClient::CompatConferences" - parent: "signalwire::rest::RestClient" - module: "signalwire.rest.RestClient" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" - visibility: "public" ---- -# `CompatConferences` - -## Signature - -```cpp -struct signalwire::rest::RestClient::CompatConferences -``` - -## Properties - - - - - -## Methods - -### CompatConferences - -**Modifiers:** `inline` - -#### Signature - -```cpp -void CompatConferences(const HttpClient & c, const std::string & base) -``` - -#### Parameters - - - - - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 963. - -*** - -### delete\_recording - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json delete_recording( - const std::string & conference_sid, - const std::string & recording_sid -) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1009. - -*** - -### get - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json get(const std::string & sid) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 969. - -*** - -### get\_participant - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json get_participant( - const std::string & conference_sid, - const std::string & call_sid -) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 981. - -*** - -### get\_recording - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json get_recording( - const std::string & conference_sid, - const std::string & recording_sid -) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1000. - -*** - -### list - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json list(const std::map< std::string, std::string > & params = {}) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 966. - -*** - -### list\_participants - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json list_participants( - const std::string & conference_sid, - const std::map< std::string, std::string > & params = {} -) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 977. - -*** - -### list\_recordings - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json list_recordings( - const std::string & conference_sid, - const std::map< std::string, std::string > & params = {} -) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 996. - -*** - -### remove\_participant - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json remove_participant( - const std::string & conference_sid, - const std::string & call_sid -) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 990. - -*** - -### start\_stream - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json start_stream(const std::string & conference_sid, const json & data) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1015. - -*** - -### stop\_stream - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json stop_stream( - const std::string & conference_sid, - const std::string & stream_sid, - const json & data -) const -``` - -#### Parameters - - - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1018. - -*** - -### update - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json update(const std::string & sid, const json & data) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 972. - -*** - -### update\_participant - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json update_participant( - const std::string & conference_sid, - const std::string & call_sid, - const json & data -) const -``` - -#### Parameters - - - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 985. - -*** - -### update\_recording - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json update_recording( - const std::string & conference_sid, - const std::string & recording_sid, - const json & data -) const -``` - -#### Parameters - - - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1004. - -## Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 960. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-faxes/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-faxes/index.mdx deleted file mode 100644 index 9d7ce2fea4..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-faxes/index.mdx +++ /dev/null @@ -1,174 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/rest/rest-client/compat-faxes" -title: "CompatFaxes" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::rest::RestClient::CompatFaxes" - parent: "signalwire::rest::RestClient" - module: "signalwire.rest.RestClient" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" - visibility: "public" ---- -# `CompatFaxes` - -## Signature - -```cpp -struct signalwire::rest::RestClient::CompatFaxes : signalwire::rest::CrudResource -``` - -## Inheritance - -**Extends:** [signalwire::rest::CrudResource](/docs/sdk-reference/reference/cpp/signalwire/rest/crud-resource) - -## Methods - -### CompatFaxes - -**Modifiers:** `inline` - -#### Signature - -```cpp -void CompatFaxes(const HttpClient & c, const std::string & base) -``` - -#### Parameters - - - - - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 855. - -*** - -### delete\_media - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json delete_media( - const std::string & fax_sid, - const std::string & media_sid -) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 870. - -*** - -### get\_media - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json get_media(const std::string & fax_sid, const std::string & media_sid) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 866. - -*** - -### list\_media - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json list_media( - const std::string & fax_sid, - const std::map< std::string, std::string > & params = {} -) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 862. - -*** - -### update - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json update(const std::string & sid, const json & data) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 858. - -## Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 854. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-laml-bins/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-laml-bins/index.mdx deleted file mode 100644 index 0d60ab8bdb..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-laml-bins/index.mdx +++ /dev/null @@ -1,84 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/rest/rest-client/compat-laml-bins" -title: "CompatLamlBins" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::rest::RestClient::CompatLamlBins" - parent: "signalwire::rest::RestClient" - module: "signalwire.rest.RestClient" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" - visibility: "public" ---- -# `CompatLamlBins` - -## Signature - -```cpp -struct signalwire::rest::RestClient::CompatLamlBins : signalwire::rest::CrudResource -``` - -## Inheritance - -**Extends:** [signalwire::rest::CrudResource](/docs/sdk-reference/reference/cpp/signalwire/rest/crud-resource) - -## Methods - -### CompatLamlBins - -**Modifiers:** `inline` - -#### Signature - -```cpp -void CompatLamlBins(const HttpClient & c, const std::string & base) -``` - -#### Parameters - - - - - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 953. - -*** - -### update - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json update(const std::string & sid, const json & data) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 955. - -## Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 952. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-messages/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-messages/index.mdx deleted file mode 100644 index 7dd358281e..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-messages/index.mdx +++ /dev/null @@ -1,177 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/rest/rest-client/compat-messages" -title: "CompatMessages" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::rest::RestClient::CompatMessages" - parent: "signalwire::rest::RestClient" - module: "signalwire.rest.RestClient" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" - visibility: "public" ---- -# `CompatMessages` - -## Signature - -```cpp -struct signalwire::rest::RestClient::CompatMessages : signalwire::rest::CrudResource -``` - -## Inheritance - -**Extends:** [signalwire::rest::CrudResource](/docs/sdk-reference/reference/cpp/signalwire/rest/crud-resource) - -## Methods - -### CompatMessages - -**Modifiers:** `inline` - -#### Signature - -```cpp -void CompatMessages(const HttpClient & c, const std::string & base) -``` - -#### Parameters - - - - - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 833. - -*** - -### delete\_media - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json delete_media( - const std::string & message_sid, - const std::string & media_sid -) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 848. - -*** - -### get\_media - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json get_media( - const std::string & message_sid, - const std::string & media_sid -) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 844. - -*** - -### list\_media - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json list_media( - const std::string & message_sid, - const std::map< std::string, std::string > & params = {} -) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 840. - -*** - -### update - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json update(const std::string & sid, const json & data) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 836. - -## Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 832. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-namespace/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-namespace/index.mdx deleted file mode 100644 index dc3998103d..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-namespace/index.mdx +++ /dev/null @@ -1,186 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/rest/rest-client/compat-namespace" -title: "CompatNamespace" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::rest::RestClient::CompatNamespace" - parent: "signalwire::rest::RestClient" - module: "signalwire.rest.RestClient" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" - visibility: "public" ---- -# `CompatNamespace` - -## Signature - -```cpp -struct signalwire::rest::RestClient::CompatNamespace -``` - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -## Methods - -### CompatNamespace - -**Modifiers:** `inline` - -#### Signature - -```cpp -void CompatNamespace(const HttpClient & c, const std::string & account_sid) -``` - -#### Parameters - - - - - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1111. - -*** - -### create\_call - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json create_call(const json & data) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1131. - -*** - -### list\_calls - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json list_calls(const std::map< std::string, std::string > & p = {}) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1133. - -*** - -### list\_messages - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json list_messages(const std::map< std::string, std::string > & p = {}) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1134. - -*** - -### send\_message - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json send_message(const json & data) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1132. - -## Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1093. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-phone-numbers/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-phone-numbers/index.mdx deleted file mode 100644 index 84ef98033d..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-phone-numbers/index.mdx +++ /dev/null @@ -1,284 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/rest/rest-client/compat-phone-numbers" -title: "CompatPhoneNumbers" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::rest::RestClient::CompatPhoneNumbers" - parent: "signalwire::rest::RestClient" - module: "signalwire.rest.RestClient" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" - visibility: "public" ---- -# `CompatPhoneNumbers` - -## Signature - -```cpp -struct signalwire::rest::RestClient::CompatPhoneNumbers -``` - -## Properties - - - - - - - - - -## Methods - -### CompatPhoneNumbers - -**Modifiers:** `inline` - -#### Signature - -```cpp -void CompatPhoneNumbers(const HttpClient & c, const std::string & account_base) -``` - -#### Parameters - - - - - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 882. - -*** - -### get - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json get(const std::string & sid) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 891. - -*** - -### import\_number - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json import_number(const json & data) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 903. - -*** - -### list - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json list(const std::map< std::string, std::string > & params = {}) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 888. - -*** - -### list\_available\_countries - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json list_available_countries( - const std::map< std::string, std::string > & params = {} -) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 906. - -*** - -### purchase - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json purchase(const json & data) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 900. - -*** - -### search\_local - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json search_local( - const std::string & country, - const std::map< std::string, std::string > & params = {} -) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 909. - -*** - -### search\_toll\_free - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json search_toll_free( - const std::string & country, - const std::map< std::string, std::string > & params = {} -) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 913. - -*** - -### update - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json update(const std::string & sid, const json & data) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 894. - -## Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 876. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-queues/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-queues/index.mdx deleted file mode 100644 index c284eb15cd..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-queues/index.mdx +++ /dev/null @@ -1,180 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/rest/rest-client/compat-queues" -title: "CompatQueues" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::rest::RestClient::CompatQueues" - parent: "signalwire::rest::RestClient" - module: "signalwire.rest.RestClient" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" - visibility: "public" ---- -# `CompatQueues` - -## Signature - -```cpp -struct signalwire::rest::RestClient::CompatQueues : signalwire::rest::CrudResource -``` - -## Inheritance - -**Extends:** [signalwire::rest::CrudResource](/docs/sdk-reference/reference/cpp/signalwire/rest/crud-resource) - -## Methods - -### CompatQueues - -**Modifiers:** `inline` - -#### Signature - -```cpp -void CompatQueues(const HttpClient & c, const std::string & base) -``` - -#### Parameters - - - - - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1026. - -*** - -### dequeue\_member - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json dequeue_member( - const std::string & queue_sid, - const std::string & call_sid, - const json & data -) const -``` - -#### Parameters - - - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1039. - -*** - -### get\_member - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json get_member( - const std::string & queue_sid, - const std::string & call_sid -) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1035. - -*** - -### list\_members - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json list_members( - const std::string & queue_sid, - const std::map< std::string, std::string > & params = {} -) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1031. - -*** - -### update - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json update(const std::string & sid, const json & data) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1028. - -## Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1025. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-recordings/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-recordings/index.mdx deleted file mode 100644 index ddaa0d22f8..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-recordings/index.mdx +++ /dev/null @@ -1,110 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/rest/rest-client/compat-recordings" -title: "CompatRecordings" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::rest::RestClient::CompatRecordings" - parent: "signalwire::rest::RestClient" - module: "signalwire.rest.RestClient" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" - visibility: "public" ---- -# `CompatRecordings` - -## Signature - -```cpp -struct signalwire::rest::RestClient::CompatRecordings -``` - -## Properties - - - - - -## Methods - -### CompatRecordings - -**Modifiers:** `inline` - -#### Signature - -```cpp -void CompatRecordings(const HttpClient & c, const std::string & base) -``` - -#### Parameters - - - - - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1049. - -*** - -### get - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json get(const std::string & sid) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1054. - -*** - -### list - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json list(const std::map< std::string, std::string > & params = {}) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1051. - -## Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1046. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-tokens/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-tokens/index.mdx deleted file mode 100644 index 1430f7fe3a..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-tokens/index.mdx +++ /dev/null @@ -1,112 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/rest/rest-client/compat-tokens" -title: "CompatTokens" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::rest::RestClient::CompatTokens" - parent: "signalwire::rest::RestClient" - module: "signalwire.rest.RestClient" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" - visibility: "public" ---- -# `CompatTokens` - -## Signature - -```cpp -struct signalwire::rest::RestClient::CompatTokens -``` - -## Properties - - - - - -## Methods - -### CompatTokens - -**Modifiers:** `inline` - -#### Signature - -```cpp -void CompatTokens(const HttpClient & c, const std::string & base) -``` - -#### Parameters - - - - - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1081. - -*** - -### create - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json create(const json & data) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1083. - -*** - -### update - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json update(const std::string & token_id, const json & data) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1085. - -## Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1078. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-transcriptions/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-transcriptions/index.mdx deleted file mode 100644 index 1d21569b9e..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/compat-transcriptions/index.mdx +++ /dev/null @@ -1,110 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/rest/rest-client/compat-transcriptions" -title: "CompatTranscriptions" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::rest::RestClient::CompatTranscriptions" - parent: "signalwire::rest::RestClient" - module: "signalwire.rest.RestClient" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" - visibility: "public" ---- -# `CompatTranscriptions` - -## Signature - -```cpp -struct signalwire::rest::RestClient::CompatTranscriptions -``` - -## Properties - - - - - -## Methods - -### CompatTranscriptions - -**Modifiers:** `inline` - -#### Signature - -```cpp -void CompatTranscriptions(const HttpClient & c, const std::string & base) -``` - -#### Parameters - - - - - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1065. - -*** - -### get - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json get(const std::string & sid) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1070. - -*** - -### list - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json list(const std::map< std::string, std::string > & params = {}) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1067. - -## Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1062. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/datasphere-documents/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/datasphere-documents/index.mdx deleted file mode 100644 index 2a200bf38e..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/datasphere-documents/index.mdx +++ /dev/null @@ -1,173 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/rest/rest-client/datasphere-documents" -title: "DatasphereDocuments" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::rest::RestClient::DatasphereDocuments" - parent: "signalwire::rest::RestClient" - module: "signalwire.rest.RestClient" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" - visibility: "public" ---- -# `DatasphereDocuments` - -## Signature - -```cpp -struct signalwire::rest::RestClient::DatasphereDocuments : signalwire::rest::CrudResource -``` - -## Inheritance - -**Extends:** [signalwire::rest::CrudResource](/docs/sdk-reference/reference/cpp/signalwire/rest/crud-resource) - -## Methods - -### DatasphereDocuments - -**Modifiers:** `inline` - -#### Signature - -```cpp -void DatasphereDocuments(const HttpClient & c) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 612. - -*** - -### delete\_chunk - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json delete_chunk( - const std::string & document_id, - const std::string & chunk_id -) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 625. - -*** - -### get\_chunk - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json get_chunk( - const std::string & document_id, - const std::string & chunk_id -) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 621. - -*** - -### list\_chunks - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json list_chunks( - const std::string & document_id, - const std::map< std::string, std::string > & params = {} -) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 617. - -*** - -### search - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json search(const json & data) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 614. - -## Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 611. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/datasphere-namespace/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/datasphere-namespace/index.mdx deleted file mode 100644 index 48e0ad6c00..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/datasphere-namespace/index.mdx +++ /dev/null @@ -1,82 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/rest/rest-client/datasphere-namespace" -title: "DatasphereNamespace" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::rest::RestClient::DatasphereNamespace" - parent: "signalwire::rest::RestClient" - module: "signalwire.rest.RestClient" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" - visibility: "public" ---- -# `DatasphereNamespace` - -## Signature - -```cpp -struct signalwire::rest::RestClient::DatasphereNamespace -``` - -## Properties - - - - - -## Methods - -### DatasphereNamespace - -**Modifiers:** `inline` - -#### Signature - -```cpp -void DatasphereNamespace(const HttpClient & c) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 635. - -*** - -### search - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json search(const json & data) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 641. - -## Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 631. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-addresses/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-addresses/index.mdx deleted file mode 100644 index 94b647b2ee..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-addresses/index.mdx +++ /dev/null @@ -1,108 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/rest/rest-client/fabric-addresses" -title: "FabricAddresses" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::rest::RestClient::FabricAddresses" - parent: "signalwire::rest::RestClient" - module: "signalwire.rest.RestClient" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" - visibility: "public" ---- -# `FabricAddresses` - -## Signature - -```cpp -struct signalwire::rest::RestClient::FabricAddresses -``` - -## Properties - - - - - -## Methods - -### FabricAddresses - -**Modifiers:** `inline` - -#### Signature - -```cpp -void FabricAddresses(const HttpClient & c) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 151. - -*** - -### get - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json get(const std::string & address_id) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 155. - -*** - -### list - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json list(const std::map< std::string, std::string > & params = {}) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 152. - -## Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 148. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-call-flows/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-call-flows/index.mdx deleted file mode 100644 index 6bd58b64ab..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-call-flows/index.mdx +++ /dev/null @@ -1,166 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/rest/rest-client/fabric-call-flows" -title: "FabricCallFlows" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::rest::RestClient::FabricCallFlows" - parent: "signalwire::rest::RestClient" - module: "signalwire.rest.RestClient" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" - visibility: "public" ---- -# `FabricCallFlows` - -## Signature - -```cpp -struct signalwire::rest::RestClient::FabricCallFlows : signalwire::rest::RestClient::FabricResourcePUT -``` - -## Inheritance - -**Extends:** [signalwire::rest::RestClient::FabricResourcePUT](/docs/sdk-reference/reference/cpp/signalwire/rest/rest-client/fabric-resource-put) - -## Methods - -### deploy\_version - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json deploy_version(const std::string & flow_id, const json & data) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 92. - -*** - -### FabricCallFlows - -**Modifiers:** `inline` - -#### Signature - -```cpp -void FabricCallFlows(const HttpClient & c) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 76. - -*** - -### list\_addresses - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json list_addresses( - const std::string & flow_id, - const std::map< std::string, std::string > & params = {} -) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 84. - -*** - -### list\_versions - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json list_versions( - const std::string & flow_id, - const std::map< std::string, std::string > & params = {} -) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 88. - -*** - -### singular\_base - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -std::string singular_base() const -``` - -#### Returns - -`std::string` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 81. - -## Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 75. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-conference-rooms/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-conference-rooms/index.mdx deleted file mode 100644 index 39e0740667..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-conference-rooms/index.mdx +++ /dev/null @@ -1,107 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/rest/rest-client/fabric-conference-rooms" -title: "FabricConferenceRooms" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::rest::RestClient::FabricConferenceRooms" - parent: "signalwire::rest::RestClient" - module: "signalwire.rest.RestClient" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" - visibility: "public" ---- -# `FabricConferenceRooms` - -## Signature - -```cpp -struct signalwire::rest::RestClient::FabricConferenceRooms : signalwire::rest::RestClient::FabricResourcePUT -``` - -## Inheritance - -**Extends:** [signalwire::rest::RestClient::FabricResourcePUT](/docs/sdk-reference/reference/cpp/signalwire/rest/rest-client/fabric-resource-put) - -## Methods - -### FabricConferenceRooms - -**Modifiers:** `inline` - -#### Signature - -```cpp -void FabricConferenceRooms(const HttpClient & c) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 98. - -*** - -### list\_addresses - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json list_addresses( - const std::string & room_id, - const std::map< std::string, std::string > & params = {} -) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 105. - -*** - -### singular\_base - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -std::string singular_base() const -``` - -#### Returns - -`std::string` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 102. - -## Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 97. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-cxml-applications/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-cxml-applications/index.mdx deleted file mode 100644 index 2087e26160..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-cxml-applications/index.mdx +++ /dev/null @@ -1,80 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/rest/rest-client/fabric-cxml-applications" -title: "FabricCxmlApplications" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::rest::RestClient::FabricCxmlApplications" - parent: "signalwire::rest::RestClient" - module: "signalwire.rest.RestClient" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" - visibility: "public" ---- -# `FabricCxmlApplications` - -## Signature - -```cpp -struct signalwire::rest::RestClient::FabricCxmlApplications : signalwire::rest::RestClient::FabricResourcePUT -``` - -## Inheritance - -**Extends:** [signalwire::rest::RestClient::FabricResourcePUT](/docs/sdk-reference/reference/cpp/signalwire/rest/rest-client/fabric-resource-put) - -## Methods - -### create - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json create(const json &) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 142. - -*** - -### FabricCxmlApplications - -**Modifiers:** `inline` - -#### Signature - -```cpp -void FabricCxmlApplications(const HttpClient & c) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 139. - -## Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 138. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-generic-resources/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-generic-resources/index.mdx deleted file mode 100644 index 5dbc508bfd..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-generic-resources/index.mdx +++ /dev/null @@ -1,201 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/rest/rest-client/fabric-generic-resources" -title: "FabricGenericResources" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::rest::RestClient::FabricGenericResources" - parent: "signalwire::rest::RestClient" - module: "signalwire.rest.RestClient" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" - visibility: "public" ---- -# `FabricGenericResources` - -## Signature - -```cpp -struct signalwire::rest::RestClient::FabricGenericResources -``` - -## Properties - - - - - -## Methods - -### assign\_domain\_application - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json assign_domain_application( - const std::string & resource_id, - const json & data -) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 177. - -*** - -### assign\_phone\_route - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json assign_phone_route( - const std::string & resource_id, - const json & data -) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 182. - -*** - -### FabricGenericResources - -**Modifiers:** `inline` - -#### Signature - -```cpp -void FabricGenericResources(const HttpClient & c) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 163. - -*** - -### get - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json get(const std::string & resource_id) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 167. - -*** - -### list - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json list(const std::map< std::string, std::string > & params = {}) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 164. - -*** - -### list\_addresses - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json list_addresses( - const std::string & resource_id, - const std::map< std::string, std::string > & params = {} -) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 173. - -## Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 160. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-namespace/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-namespace/index.mdx deleted file mode 100644 index 8cb2c2320a..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-namespace/index.mdx +++ /dev/null @@ -1,96 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/rest/rest-client/fabric-namespace" -title: "FabricNamespace" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::rest::RestClient::FabricNamespace" - parent: "signalwire::rest::RestClient" - module: "signalwire.rest.RestClient" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" - visibility: "public" ---- -# `FabricNamespace` - -## Signature - -```cpp -struct signalwire::rest::RestClient::FabricNamespace -``` - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -## Methods - -### FabricNamespace - -**Modifiers:** `inline` - -#### Signature - -```cpp -void FabricNamespace(const HttpClient & c) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 247. - -## Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 209. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-resource-put/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-resource-put/index.mdx deleted file mode 100644 index 3121cd8fdc..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-resource-put/index.mdx +++ /dev/null @@ -1,84 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/rest/rest-client/fabric-resource-put" -title: "FabricResourcePUT" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::rest::RestClient::FabricResourcePUT" - parent: "signalwire::rest::RestClient" - module: "signalwire.rest.RestClient" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" - visibility: "public" ---- -# `FabricResourcePUT` - -## Signature - -```cpp -struct signalwire::rest::RestClient::FabricResourcePUT : signalwire::rest::RestClient::FabricResource -``` - -## Inheritance - -**Extends:** [signalwire::rest::RestClient::FabricResource](/docs/sdk-reference/reference/cpp/signalwire/rest/rest-client/fabric-resource) - -## Methods - -### FabricResourcePUT - -**Modifiers:** `inline` - -#### Signature - -```cpp -void FabricResourcePUT(const HttpClient & c, const std::string & base) -``` - -#### Parameters - - - - - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 67. - -*** - -### update - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json update(const std::string & resource_id, const json & data) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 70. - -## Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 66. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-resource/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-resource/index.mdx deleted file mode 100644 index 4e6d721ebb..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-resource/index.mdx +++ /dev/null @@ -1,87 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/rest/rest-client/fabric-resource" -title: "FabricResource" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::rest::RestClient::FabricResource" - parent: "signalwire::rest::RestClient" - module: "signalwire.rest.RestClient" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" - visibility: "public" ---- -# `FabricResource` - -## Signature - -```cpp -struct signalwire::rest::RestClient::FabricResource : signalwire::rest::CrudResource -``` - -## Inheritance - -**Extends:** [signalwire::rest::CrudResource](/docs/sdk-reference/reference/cpp/signalwire/rest/crud-resource) - -## Methods - -### FabricResource - -**Modifiers:** `inline` - -#### Signature - -```cpp -void FabricResource(const HttpClient & c, const std::string & base) -``` - -#### Parameters - - - - - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 57. - -*** - -### list\_addresses - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json list_addresses( - const std::string & resource_id, - const std::map< std::string, std::string > & params = {} -) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 60. - -## Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 56. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-subscribers/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-subscribers/index.mdx deleted file mode 100644 index 331530a1eb..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-subscribers/index.mdx +++ /dev/null @@ -1,212 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/rest/rest-client/fabric-subscribers" -title: "FabricSubscribers" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::rest::RestClient::FabricSubscribers" - parent: "signalwire::rest::RestClient" - module: "signalwire.rest.RestClient" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" - visibility: "public" ---- -# `FabricSubscribers` - -## Signature - -```cpp -struct signalwire::rest::RestClient::FabricSubscribers : signalwire::rest::RestClient::FabricResourcePUT -``` - -## Inheritance - -**Extends:** [signalwire::rest::RestClient::FabricResourcePUT](/docs/sdk-reference/reference/cpp/signalwire/rest/rest-client/fabric-resource-put) - -## Methods - -### create\_sip\_endpoint - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json create_sip_endpoint( - const std::string & subscriber_id, - const json & data -) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 119. - -*** - -### delete\_sip\_endpoint - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json delete_sip_endpoint( - const std::string & subscriber_id, - const std::string & endpoint_id -) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 132. - -*** - -### FabricSubscribers - -**Modifiers:** `inline` - -#### Signature - -```cpp -void FabricSubscribers(const HttpClient & c) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 112. - -*** - -### get\_sip\_endpoint - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json get_sip_endpoint( - const std::string & subscriber_id, - const std::string & endpoint_id -) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 122. - -*** - -### list\_sip\_endpoints - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json list_sip_endpoints( - const std::string & subscriber_id, - const std::map< std::string, std::string > & params = {} -) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 115. - -*** - -### update\_sip\_endpoint - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json update_sip_endpoint( - const std::string & subscriber_id, - const std::string & endpoint_id, - const json & data -) const -``` - -#### Parameters - - - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 127. - -## Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 111. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-tokens/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-tokens/index.mdx deleted file mode 100644 index 483928c59c..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/fabric-tokens/index.mdx +++ /dev/null @@ -1,186 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/rest/rest-client/fabric-tokens" -title: "FabricTokens" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::rest::RestClient::FabricTokens" - parent: "signalwire::rest::RestClient" - module: "signalwire.rest.RestClient" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" - visibility: "public" ---- -# `FabricTokens` - -## Signature - -```cpp -struct signalwire::rest::RestClient::FabricTokens -``` - -## Properties - - - - - -## Methods - -### create\_embed\_token - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json create_embed_token(const json & data) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 204. - -*** - -### create\_guest\_token - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json create_guest_token(const json & data) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 201. - -*** - -### create\_invite\_token - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json create_invite_token(const json & data) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 198. - -*** - -### create\_subscriber\_token - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json create_subscriber_token(const json & data) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 192. - -*** - -### FabricTokens - -**Modifiers:** `inline` - -#### Signature - -```cpp -void FabricTokens(const HttpClient & c) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 190. - -*** - -### refresh\_subscriber\_token - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json refresh_subscriber_token(const json & data) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 195. - -## Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 187. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/imported-numbers-namespace/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/imported-numbers-namespace/index.mdx deleted file mode 100644 index 7f28f73069..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/imported-numbers-namespace/index.mdx +++ /dev/null @@ -1,80 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/rest/rest-client/imported-numbers-namespace" -title: "ImportedNumbersNamespace" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::rest::RestClient::ImportedNumbersNamespace" - parent: "signalwire::rest::RestClient" - module: "signalwire.rest.RestClient" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" - visibility: "public" ---- -# `ImportedNumbersNamespace` - -## Signature - -```cpp -struct signalwire::rest::RestClient::ImportedNumbersNamespace : signalwire::rest::CrudResource -``` - -## Inheritance - -**Extends:** [signalwire::rest::CrudResource](/docs/sdk-reference/reference/cpp/signalwire/rest/crud-resource) - -## Methods - -### create - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json create(const json & data) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1231. - -*** - -### ImportedNumbersNamespace - -**Modifiers:** `inline` - -#### Signature - -```cpp -void ImportedNumbersNamespace(const HttpClient & c) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1229. - -## Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1228. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/index.mdx deleted file mode 100644 index 05b052667c..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/index.mdx +++ /dev/null @@ -1,750 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/rest/rest-client" -title: "RestClient" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::rest::RestClient" - parent: "signalwire::rest" - module: "signalwire.rest" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" - visibility: "public" ---- -# `RestClient` - -Top-level SignalWire REST client with all API namespaces. - -## Signature - -```cpp -class signalwire::rest::RestClient -``` - -## Classes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -## Methods - -### addresses - -**Modifiers:** `inline` - -#### Signature - -```cpp -AddressesNamespace & addresses() -``` - -#### Returns - -`AddressesNamespace &` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1438. - -*** - -### calling - -**Modifiers:** `inline` - -#### Signature - -```cpp -CallingNamespace & calling() -``` - -#### Returns - -`CallingNamespace &` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1433. - -*** - -### chat - -**Modifiers:** `inline` - -#### Signature - -```cpp -ChatNamespace & chat() -``` - -#### Returns - -`ChatNamespace &` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1452. - -*** - -### compat - -**Modifiers:** `inline` - -#### Signature - -```cpp -CompatNamespace & compat() -``` - -#### Returns - -`CompatNamespace &` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1437. - -*** - -### datasphere - -**Modifiers:** `inline` - -#### Signature - -```cpp -DatasphereNamespace & datasphere() -``` - -#### Returns - -`DatasphereNamespace &` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1435. - -*** - -### fabric - -**Modifiers:** `inline` - -#### Signature - -```cpp -FabricNamespace & fabric() -``` - -#### Returns - -`FabricNamespace &` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1432. - -*** - -### from\_env - -Initialize from environment variables. - -**Modifiers:** `static` - -#### Signature - -```cpp -RestClient from_env() -``` - -#### Returns - -`RestClient` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 25. - -*** - -### http\_client - -Get the underlying HTTP client. - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -const HttpClient & http_client() const -``` - -#### Returns - -`const HttpClient &` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1455. - -*** - -### imported\_numbers - -**Modifiers:** `inline` - -#### Signature - -```cpp -ImportedNumbersNamespace & imported_numbers() -``` - -#### Returns - -`ImportedNumbersNamespace &` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1446. - -*** - -### logs - -**Modifiers:** `inline` - -#### Signature - -```cpp -LogsNamespace & logs() -``` - -#### Returns - -`LogsNamespace &` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1449. - -*** - -### lookup - -**Modifiers:** `inline` - -#### Signature - -```cpp -LookupNamespace & lookup() -``` - -#### Returns - -`LookupNamespace &` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1444. - -*** - -### mfa - -**Modifiers:** `inline` - -#### Signature - -```cpp -MFANamespace & mfa() -``` - -#### Returns - -`MFANamespace &` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1447. - -*** - -### number\_groups - -**Modifiers:** `inline` - -#### Signature - -```cpp -NumberGroupsNamespace & number_groups() -``` - -#### Returns - -`NumberGroupsNamespace &` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1441. - -*** - -### phone\_numbers - -**Modifiers:** `inline` - -#### Signature - -```cpp -PhoneNumbersNamespace & phone_numbers() -``` - -#### Returns - -`PhoneNumbersNamespace &` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1434. - -*** - -### project - -**Modifiers:** `inline` - -#### Signature - -```cpp -ProjectNamespace & project() -``` - -#### Returns - -`ProjectNamespace &` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1450. - -*** - -### project\_id - -Project ID accessor (read-only). - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -const std::string & project_id() const -``` - -#### Returns - -`const std::string &` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 37. - -*** - -### pubsub - -**Modifiers:** `inline` - -#### Signature - -```cpp -PubSubNamespace & pubsub() -``` - -#### Returns - -`PubSubNamespace &` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1451. - -*** - -### queues - -**Modifiers:** `inline` - -#### Signature - -```cpp -QueuesNamespace & queues() -``` - -#### Returns - -`QueuesNamespace &` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1439. - -*** - -### recordings - -**Modifiers:** `inline` - -#### Signature - -```cpp -RecordingsNamespace & recordings() -``` - -#### Returns - -`RecordingsNamespace &` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1440. - -*** - -### registry - -**Modifiers:** `inline` - -#### Signature - -```cpp -RegistryNamespace & registry() -``` - -#### Returns - -`RegistryNamespace &` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1448. - -*** - -### RestClient - -#### Signature - -```cpp -void RestClient( - const std::string & space, - const std::string & project_id, - const std::string & token -) -``` - -#### Parameters - - - - - - - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 20. - -*** - -### short\_codes - -**Modifiers:** `inline` - -#### Signature - -```cpp -ShortCodesNamespace & short_codes() -``` - -#### Returns - -`ShortCodesNamespace &` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1445. - -*** - -### sip\_profile - -**Modifiers:** `inline` - -#### Signature - -```cpp -SipProfileNamespace & sip_profile() -``` - -#### Returns - -`SipProfileNamespace &` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1443. - -*** - -### verified\_callers - -**Modifiers:** `inline` - -#### Signature - -```cpp -VerifiedCallersNamespace & verified_callers() -``` - -#### Returns - -`VerifiedCallersNamespace &` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1442. - -*** - -### video - -**Modifiers:** `inline` - -#### Signature - -```cpp -VideoNamespace & video() -``` - -#### Returns - -`VideoNamespace &` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1436. - -*** - -### with\_base\_url - -Construct with an explicit pre-built base URL (http://... or https://...) instead of synthesizing one from the SignalWire space hostname. Used by audit harnesses pointing the client at loopback fixtures. The space-based constructor remains the production path. - -**Modifiers:** `static` - -#### Signature - -```cpp -RestClient with_base_url( - const std::string & base_url, - const std::string & project_id, - const std::string & token -) -``` - -#### Parameters - - - - - - - -#### Returns - -`RestClient` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 32. - -## Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 18. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/logs-conferences/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/logs-conferences/index.mdx deleted file mode 100644 index 9807b20b39..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/logs-conferences/index.mdx +++ /dev/null @@ -1,82 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/rest/rest-client/logs-conferences" -title: "LogsConferences" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::rest::RestClient::LogsConferences" - parent: "signalwire::rest::RestClient" - module: "signalwire.rest.RestClient" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" - visibility: "public" ---- -# `LogsConferences` - -## Signature - -```cpp -struct signalwire::rest::RestClient::LogsConferences -``` - -## Properties - - - - - -## Methods - -### list - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json list(const std::map< std::string, std::string > & params = {}) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1377. - -*** - -### LogsConferences - -**Modifiers:** `inline` - -#### Signature - -```cpp -void LogsConferences(const HttpClient & c) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1376. - -## Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1373. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/logs-fax/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/logs-fax/index.mdx deleted file mode 100644 index 77ed172926..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/logs-fax/index.mdx +++ /dev/null @@ -1,108 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/rest/rest-client/logs-fax" -title: "LogsFax" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::rest::RestClient::LogsFax" - parent: "signalwire::rest::RestClient" - module: "signalwire.rest.RestClient" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" - visibility: "public" ---- -# `LogsFax` - -## Signature - -```cpp -struct signalwire::rest::RestClient::LogsFax -``` - -## Properties - - - - - -## Methods - -### get - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json get(const std::string & log_id) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1368. - -*** - -### list - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json list(const std::map< std::string, std::string > & params = {}) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1365. - -*** - -### LogsFax - -**Modifiers:** `inline` - -#### Signature - -```cpp -void LogsFax(const HttpClient & c) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1364. - -## Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1361. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/logs-messages/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/logs-messages/index.mdx deleted file mode 100644 index 8c018e3a92..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/logs-messages/index.mdx +++ /dev/null @@ -1,108 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/rest/rest-client/logs-messages" -title: "LogsMessages" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::rest::RestClient::LogsMessages" - parent: "signalwire::rest::RestClient" - module: "signalwire.rest.RestClient" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" - visibility: "public" ---- -# `LogsMessages` - -## Signature - -```cpp -struct signalwire::rest::RestClient::LogsMessages -``` - -## Properties - - - - - -## Methods - -### get - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json get(const std::string & log_id) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1340. - -*** - -### list - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json list(const std::map< std::string, std::string > & params = {}) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1337. - -*** - -### LogsMessages - -**Modifiers:** `inline` - -#### Signature - -```cpp -void LogsMessages(const HttpClient & c) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1336. - -## Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1333. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/logs-namespace/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/logs-namespace/index.mdx deleted file mode 100644 index c5f54c84f1..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/logs-namespace/index.mdx +++ /dev/null @@ -1,60 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/rest/rest-client/logs-namespace" -title: "LogsNamespace" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::rest::RestClient::LogsNamespace" - parent: "signalwire::rest::RestClient" - module: "signalwire.rest.RestClient" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" - visibility: "public" ---- -# `LogsNamespace` - -## Signature - -```cpp -struct signalwire::rest::RestClient::LogsNamespace -``` - -## Properties - - - - - - - - - -## Methods - -### LogsNamespace - -**Modifiers:** `inline` - -#### Signature - -```cpp -void LogsNamespace(const HttpClient & c) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1387. - -## Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1382. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/logs-voice/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/logs-voice/index.mdx deleted file mode 100644 index 4dcb5de5fd..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/logs-voice/index.mdx +++ /dev/null @@ -1,139 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/rest/rest-client/logs-voice" -title: "LogsVoice" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::rest::RestClient::LogsVoice" - parent: "signalwire::rest::RestClient" - module: "signalwire.rest.RestClient" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" - visibility: "public" ---- -# `LogsVoice` - -## Signature - -```cpp -struct signalwire::rest::RestClient::LogsVoice -``` - -## Properties - - - - - -## Methods - -### get - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json get(const std::string & log_id) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1352. - -*** - -### list - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json list(const std::map< std::string, std::string > & params = {}) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1349. - -*** - -### list\_events - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json list_events( - const std::string & log_id, - const std::map< std::string, std::string > & params = {} -) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1355. - -*** - -### LogsVoice - -**Modifiers:** `inline` - -#### Signature - -```cpp -void LogsVoice(const HttpClient & c) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1348. - -## Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1345. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/lookup-namespace/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/lookup-namespace/index.mdx deleted file mode 100644 index 70c36b2bb1..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/lookup-namespace/index.mdx +++ /dev/null @@ -1,80 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/rest/rest-client/lookup-namespace" -title: "LookupNamespace" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::rest::RestClient::LookupNamespace" - parent: "signalwire::rest::RestClient" - module: "signalwire.rest.RestClient" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" - visibility: "public" ---- -# `LookupNamespace` - -## Signature - -```cpp -struct signalwire::rest::RestClient::LookupNamespace -``` - -## Properties - - - -## Methods - -### lookup - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json lookup(const std::string & number) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1212. - -*** - -### LookupNamespace - -**Modifiers:** `inline` - -#### Signature - -```cpp -void LookupNamespace(const HttpClient & c) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1211. - -## Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1209. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/mfa-namespace/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/mfa-namespace/index.mdx deleted file mode 100644 index b9c47cf1a3..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/mfa-namespace/index.mdx +++ /dev/null @@ -1,186 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/rest/rest-client/mfa-namespace" -title: "MFANamespace" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::rest::RestClient::MFANamespace" - parent: "signalwire::rest::RestClient" - module: "signalwire.rest.RestClient" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" - visibility: "public" ---- -# `MFANamespace` - -## Signature - -```cpp -struct signalwire::rest::RestClient::MFANamespace -``` - -## Properties - - - -## Methods - -### call - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json call(const json & data) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1241. - -*** - -### MFANamespace - -**Modifiers:** `inline` - -#### Signature - -```cpp -void MFANamespace(const HttpClient & c) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1238. - -*** - -### request\_code - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json request_code(const json & data) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1246. - -*** - -### sms - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json sms(const json & data) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1240. - -*** - -### verify - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json verify(const std::string & request_id, const json & data) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1242. - -*** - -### verify\_code - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json verify_code(const json & data) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1247. - -## Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1236. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/number-groups-namespace/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/number-groups-namespace/index.mdx deleted file mode 100644 index 8db0bb1435..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/number-groups-namespace/index.mdx +++ /dev/null @@ -1,193 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/rest/rest-client/number-groups-namespace" -title: "NumberGroupsNamespace" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::rest::RestClient::NumberGroupsNamespace" - parent: "signalwire::rest::RestClient" - module: "signalwire.rest.RestClient" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" - visibility: "public" ---- -# `NumberGroupsNamespace` - -## Signature - -```cpp -struct signalwire::rest::RestClient::NumberGroupsNamespace : signalwire::rest::CrudResource -``` - -## Inheritance - -**Extends:** [signalwire::rest::CrudResource](/docs/sdk-reference/reference/cpp/signalwire/rest/crud-resource) - -## Methods - -### add\_membership - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json add_membership(const std::string & group_id, const json & data) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1186. - -*** - -### delete\_membership - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json delete_membership(const std::string & membership_id) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1192. - -*** - -### get\_membership - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json get_membership(const std::string & membership_id) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1189. - -*** - -### list\_memberships - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json list_memberships( - const std::string & group_id, - const std::map< std::string, std::string > & params = {} -) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1182. - -*** - -### NumberGroupsNamespace - -**Modifiers:** `inline` - -#### Signature - -```cpp -void NumberGroupsNamespace(const HttpClient & c) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1176. - -*** - -### update - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json update(const std::string & id, const json & data) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1178. - -## Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1175. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/phone-numbers-namespace/call-flow-options/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/phone-numbers-namespace/call-flow-options/index.mdx deleted file mode 100644 index 16cd4a4fa9..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/phone-numbers-namespace/call-flow-options/index.mdx +++ /dev/null @@ -1,36 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/rest/rest-client/phone-numbers-namespace/call-flow-options" -title: "CallFlowOptions" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::rest::RestClient::PhoneNumbersNamespace::CallFlowOptions" - parent: "signalwire::rest::RestClient::PhoneNumbersNamespace" - module: "signalwire.rest.RestClient.PhoneNumbersNamespace" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" - visibility: "public" ---- -# `CallFlowOptions` - -Options for binding a phone number to a call flow. - -## Signature - -```cpp -struct signalwire::rest::RestClient::PhoneNumbersNamespace::CallFlowOptions -``` - -## Properties - - - Accepts "working\_copy" or "current\_deployed" (server default when omitted). - - -## Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 479. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/phone-numbers-namespace/cxml-webhook-options/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/phone-numbers-namespace/cxml-webhook-options/index.mdx deleted file mode 100644 index 4a76b98960..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/phone-numbers-namespace/cxml-webhook-options/index.mdx +++ /dev/null @@ -1,36 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/rest/rest-client/phone-numbers-namespace/cxml-webhook-options" -title: "CxmlWebhookOptions" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::rest::RestClient::PhoneNumbersNamespace::CxmlWebhookOptions" - parent: "signalwire::rest::RestClient::PhoneNumbersNamespace" - module: "signalwire.rest.RestClient.PhoneNumbersNamespace" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" - visibility: "public" ---- -# `CxmlWebhookOptions` - -Options for binding a phone number to a cXML (Twilio-compat) webhook. - -## Signature - -```cpp -struct signalwire::rest::RestClient::PhoneNumbersNamespace::CxmlWebhookOptions -``` - -## Properties - - - - - -## Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 473. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/phone-numbers-namespace/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/phone-numbers-namespace/index.mdx deleted file mode 100644 index d248f42a66..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/phone-numbers-namespace/index.mdx +++ /dev/null @@ -1,585 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/rest/rest-client/phone-numbers-namespace" -title: "PhoneNumbersNamespace" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::rest::RestClient::PhoneNumbersNamespace" - parent: "signalwire::rest::RestClient" - module: "signalwire.rest.RestClient" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" - visibility: "public" ---- -# `PhoneNumbersNamespace` - -## Signature - -```cpp -struct signalwire::rest::RestClient::PhoneNumbersNamespace : signalwire::rest::CrudResource -``` - -## Inheritance - -**Extends:** [signalwire::rest::CrudResource](/docs/sdk-reference/reference/cpp/signalwire/rest/crud-resource) - -## Classes - - - - Options for binding a phone number to a call flow. - - - - Options for binding a phone number to a cXML (Twilio-compat) webhook. - - - - Options for binding a phone number to a RELAY topic. - - - -## Methods - -### buy - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json buy(const json & data) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 455. - -*** - -### make\_ai\_agent\_body - -**Modifiers:** `static` `inline` - -#### Signature - -```cpp -json make_ai_agent_body(const std::string & agent_id) -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 517. - -*** - -### make\_call\_flow\_body - -**Modifiers:** `static` `inline` - -#### Signature - -```cpp -json make_call_flow_body( - const std::string & flow_id, - const CallFlowOptions & opts = {} -) -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 524. - -*** - -### make\_cxml\_application\_body - -**Modifiers:** `static` `inline` - -#### Signature - -```cpp -json make_cxml_application_body(const std::string & application_id) -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 510. - -*** - -### make\_cxml\_webhook\_body - -**Modifiers:** `static` `inline` - -#### Signature - -```cpp -json make_cxml_webhook_body( - const std::string & url, - const CxmlWebhookOptions & opts = {} -) -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 499. - -*** - -### make\_relay\_application\_body - -**Modifiers:** `static` `inline` - -#### Signature - -```cpp -json make_relay_application_body(const std::string & name) -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 534. - -*** - -### make\_relay\_topic\_body - -**Modifiers:** `static` `inline` - -#### Signature - -```cpp -json make_relay_topic_body( - const std::string & topic, - const RelayTopicOptions & opts = {} -) -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 541. - -*** - -### make\_swml\_webhook\_body - -**Modifiers:** `static` `inline` - -#### Signature - -```cpp -json make_swml_webhook_body(const std::string & url) -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 492. - -*** - -### PhoneNumbersNamespace - -**Modifiers:** `inline` - -#### Signature - -```cpp -void PhoneNumbersNamespace(const HttpClient & c) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 453. - -*** - -### release - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json release(const std::string & id) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 456. - -*** - -### search - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json search(const std::map< std::string, std::string > & p) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 454. - -*** - -### set\_ai\_agent - -Route inbound calls to an AI Agent Fabric resource by ID. - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json set_ai_agent( - const std::string & resource_id, - const std::string & agent_id -) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 577. - -*** - -### set\_call\_flow - -Route inbound calls to a Call Flow by ID. opts.version accepts "working\_copy" or "current\_deployed". - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json set_call_flow( - const std::string & resource_id, - const std::string & flow_id, - const CallFlowOptions & opts = {} -) const -``` - -#### Parameters - - - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 584. - -*** - -### set\_cxml\_application - -Route inbound calls to an existing cXML application by ID. - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json set_cxml_application( - const std::string & resource_id, - const std::string & application_id -) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 571. - -*** - -### set\_cxml\_webhook - -Route inbound calls to a cXML (Twilio-compat / LAML) webhook. Despite the wire value laml\_webhooks being plural, this creates a single cxml\_webhook Fabric resource. Extra options populate fallback and status-callback fields. - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json set_cxml_webhook( - const std::string & resource_id, - const std::string & url, - const CxmlWebhookOptions & opts = {} -) const -``` - -#### Parameters - - - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 564. - -*** - -### set\_relay\_application - -Route inbound calls to a named RELAY application. - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json set_relay_application( - const std::string & resource_id, - const std::string & name -) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 591. - -*** - -### set\_relay\_topic - -Route inbound calls to a RELAY topic (client subscription). - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json set_relay_topic( - const std::string & resource_id, - const std::string & topic, - const RelayTopicOptions & opts = {} -) const -``` - -#### Parameters - - - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 597. - -*** - -### set\_swml\_webhook - -Route inbound calls to an SWML webhook URL. Server auto-creates a swml\_webhook Fabric resource keyed off this URL. - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json set_swml_webhook( - const std::string & resource_id, - const std::string & url -) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 556. - -## Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 452. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/phone-numbers-namespace/relay-topic-options/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/phone-numbers-namespace/relay-topic-options/index.mdx deleted file mode 100644 index 31476d58f1..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/phone-numbers-namespace/relay-topic-options/index.mdx +++ /dev/null @@ -1,34 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/rest/rest-client/phone-numbers-namespace/relay-topic-options" -title: "RelayTopicOptions" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::rest::RestClient::PhoneNumbersNamespace::RelayTopicOptions" - parent: "signalwire::rest::RestClient::PhoneNumbersNamespace" - module: "signalwire.rest.RestClient.PhoneNumbersNamespace" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" - visibility: "public" ---- -# `RelayTopicOptions` - -Options for binding a phone number to a RELAY topic. - -## Signature - -```cpp -struct signalwire::rest::RestClient::PhoneNumbersNamespace::RelayTopicOptions -``` - -## Properties - - - -## Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 486. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/project-namespace/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/project-namespace/index.mdx deleted file mode 100644 index 44cc912705..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/project-namespace/index.mdx +++ /dev/null @@ -1,104 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/rest/rest-client/project-namespace" -title: "ProjectNamespace" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::rest::RestClient::ProjectNamespace" - parent: "signalwire::rest::RestClient" - module: "signalwire.rest.RestClient" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" - visibility: "public" ---- -# `ProjectNamespace` - -## Signature - -```cpp -struct signalwire::rest::RestClient::ProjectNamespace -``` - -## Properties - - - - - -## Methods - -### get\_project - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json get_project() const -``` - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1411. - -*** - -### ProjectNamespace - -**Modifiers:** `inline` - -#### Signature - -```cpp -void ProjectNamespace(const HttpClient & c) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1408. - -*** - -### update\_project - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json update_project(const json & data) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1412. - -## Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1405. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/project-tokens/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/project-tokens/index.mdx deleted file mode 100644 index 669b6511cf..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/project-tokens/index.mdx +++ /dev/null @@ -1,110 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/rest/rest-client/project-tokens" -title: "ProjectTokens" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::rest::RestClient::ProjectTokens" - parent: "signalwire::rest::RestClient" - module: "signalwire.rest.RestClient" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" - visibility: "public" ---- -# `ProjectTokens` - -## Signature - -```cpp -struct signalwire::rest::RestClient::ProjectTokens -``` - -## Properties - - - - - -## Methods - -### create - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json create(const json & data) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1396. - -*** - -### ProjectTokens - -**Modifiers:** `inline` - -#### Signature - -```cpp -void ProjectTokens(const HttpClient & c) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1395. - -*** - -### update - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json update(const std::string & token_id, const json & data) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1397. - -## Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1392. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/pub-sub-namespace/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/pub-sub-namespace/index.mdx deleted file mode 100644 index ea2176a8bf..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/pub-sub-namespace/index.mdx +++ /dev/null @@ -1,80 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/rest/rest-client/pub-sub-namespace" -title: "PubSubNamespace" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::rest::RestClient::PubSubNamespace" - parent: "signalwire::rest::RestClient" - module: "signalwire.rest.RestClient" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" - visibility: "public" ---- -# `PubSubNamespace` - -## Signature - -```cpp -struct signalwire::rest::RestClient::PubSubNamespace -``` - -## Properties - - - -## Methods - -### publish - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json publish(const json & data) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1418. - -*** - -### PubSubNamespace - -**Modifiers:** `inline` - -#### Signature - -```cpp -void PubSubNamespace(const HttpClient & c) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1417. - -## Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1415. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/queues-namespace/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/queues-namespace/index.mdx deleted file mode 100644 index b335b36143..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/queues-namespace/index.mdx +++ /dev/null @@ -1,170 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/rest/rest-client/queues-namespace" -title: "QueuesNamespace" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::rest::RestClient::QueuesNamespace" - parent: "signalwire::rest::RestClient" - module: "signalwire.rest.RestClient" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" - visibility: "public" ---- -# `QueuesNamespace` - -## Signature - -```cpp -struct signalwire::rest::RestClient::QueuesNamespace : signalwire::rest::CrudResource -``` - -## Inheritance - -**Extends:** [signalwire::rest::CrudResource](/docs/sdk-reference/reference/cpp/signalwire/rest/crud-resource) - -## Methods - -### get\_member - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json get_member( - const std::string & queue_id, - const std::string & member_id -) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1164. - -*** - -### get\_next\_member - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json get_next_member(const std::string & queue_id) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1161. - -*** - -### list\_members - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json list_members( - const std::string & queue_id, - const std::map< std::string, std::string > & params = {} -) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1157. - -*** - -### QueuesNamespace - -**Modifiers:** `inline` - -#### Signature - -```cpp -void QueuesNamespace(const HttpClient & c) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1152. - -*** - -### update - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json update(const std::string & id, const json & data) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1154. - -## Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1151. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/recordings-namespace/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/recordings-namespace/index.mdx deleted file mode 100644 index 988c974b66..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/recordings-namespace/index.mdx +++ /dev/null @@ -1,54 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/rest/rest-client/recordings-namespace" -title: "RecordingsNamespace" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::rest::RestClient::RecordingsNamespace" - parent: "signalwire::rest::RestClient" - module: "signalwire.rest.RestClient" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" - visibility: "public" ---- -# `RecordingsNamespace` - -## Signature - -```cpp -struct signalwire::rest::RestClient::RecordingsNamespace : signalwire::rest::CrudResource -``` - -## Inheritance - -**Extends:** [signalwire::rest::CrudResource](/docs/sdk-reference/reference/cpp/signalwire/rest/crud-resource) - -## Methods - -### RecordingsNamespace - -**Modifiers:** `inline` - -#### Signature - -```cpp -void RecordingsNamespace(const HttpClient & c) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1170. - -## Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1169. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/registry-brands/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/registry-brands/index.mdx deleted file mode 100644 index 28b92f632e..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/registry-brands/index.mdx +++ /dev/null @@ -1,193 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/rest/rest-client/registry-brands" -title: "RegistryBrands" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::rest::RestClient::RegistryBrands" - parent: "signalwire::rest::RestClient" - module: "signalwire.rest.RestClient" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" - visibility: "public" ---- -# `RegistryBrands` - -## Signature - -```cpp -struct signalwire::rest::RestClient::RegistryBrands -``` - -## Properties - - - - - -## Methods - -### create - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json create(const json & data) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1261. - -*** - -### create\_campaign - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json create_campaign(const std::string & brand_id, const json & data) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1269. - -*** - -### get - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json get(const std::string & brand_id) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1262. - -*** - -### list - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json list(const std::map< std::string, std::string > & params = {}) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1258. - -*** - -### list\_campaigns - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json list_campaigns( - const std::string & brand_id, - const std::map< std::string, std::string > & params = {} -) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1265. - -*** - -### RegistryBrands - -**Modifiers:** `inline` - -#### Signature - -```cpp -void RegistryBrands(const HttpClient & c) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1257. - -## Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1254. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/registry-campaigns/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/registry-campaigns/index.mdx deleted file mode 100644 index 74d5d425c3..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/registry-campaigns/index.mdx +++ /dev/null @@ -1,200 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/rest/rest-client/registry-campaigns" -title: "RegistryCampaigns" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::rest::RestClient::RegistryCampaigns" - parent: "signalwire::rest::RestClient" - module: "signalwire.rest.RestClient" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" - visibility: "public" ---- -# `RegistryCampaigns` - -## Signature - -```cpp -struct signalwire::rest::RestClient::RegistryCampaigns -``` - -## Properties - - - - - -## Methods - -### create\_order - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json create_order(const std::string & campaign_id, const json & data) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1293. - -*** - -### get - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json get(const std::string & campaign_id) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1278. - -*** - -### list\_numbers - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json list_numbers( - const std::string & campaign_id, - const std::map< std::string, std::string > & params = {} -) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1285. - -*** - -### list\_orders - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json list_orders( - const std::string & campaign_id, - const std::map< std::string, std::string > & params = {} -) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1289. - -*** - -### RegistryCampaigns - -**Modifiers:** `inline` - -#### Signature - -```cpp -void RegistryCampaigns(const HttpClient & c) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1277. - -*** - -### update - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json update(const std::string & campaign_id, const json & data) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1282. - -## Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1274. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/registry-namespace/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/registry-namespace/index.mdx deleted file mode 100644 index 1ef3100cbf..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/registry-namespace/index.mdx +++ /dev/null @@ -1,60 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/rest/rest-client/registry-namespace" -title: "RegistryNamespace" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::rest::RestClient::RegistryNamespace" - parent: "signalwire::rest::RestClient" - module: "signalwire.rest.RestClient" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" - visibility: "public" ---- -# `RegistryNamespace` - -## Signature - -```cpp -struct signalwire::rest::RestClient::RegistryNamespace -``` - -## Properties - - - - - - - - - -## Methods - -### RegistryNamespace - -**Modifiers:** `inline` - -#### Signature - -```cpp -void RegistryNamespace(const HttpClient & c) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1321. - -## Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1316. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/registry-numbers/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/registry-numbers/index.mdx deleted file mode 100644 index e37ef1bad0..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/registry-numbers/index.mdx +++ /dev/null @@ -1,56 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/rest/rest-client/registry-numbers" -title: "RegistryNumbers" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::rest::RestClient::RegistryNumbers" - parent: "signalwire::rest::RestClient" - module: "signalwire.rest.RestClient" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" - visibility: "public" ---- -# `RegistryNumbers` - -## Signature - -```cpp -struct signalwire::rest::RestClient::RegistryNumbers -``` - -## Properties - - - - - -## Methods - -### RegistryNumbers - -**Modifiers:** `inline` - -#### Signature - -```cpp -void RegistryNumbers(const HttpClient & c) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1310. - -## Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1307. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/registry-orders/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/registry-orders/index.mdx deleted file mode 100644 index 87b2a683f0..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/registry-orders/index.mdx +++ /dev/null @@ -1,82 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/rest/rest-client/registry-orders" -title: "RegistryOrders" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::rest::RestClient::RegistryOrders" - parent: "signalwire::rest::RestClient" - module: "signalwire.rest.RestClient" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" - visibility: "public" ---- -# `RegistryOrders` - -## Signature - -```cpp -struct signalwire::rest::RestClient::RegistryOrders -``` - -## Properties - - - - - -## Methods - -### get - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json get(const std::string & order_id) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1302. - -*** - -### RegistryOrders - -**Modifiers:** `inline` - -#### Signature - -```cpp -void RegistryOrders(const HttpClient & c) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1301. - -## Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1298. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/short-codes-namespace/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/short-codes-namespace/index.mdx deleted file mode 100644 index b3457e01c5..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/short-codes-namespace/index.mdx +++ /dev/null @@ -1,82 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/rest/rest-client/short-codes-namespace" -title: "ShortCodesNamespace" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::rest::RestClient::ShortCodesNamespace" - parent: "signalwire::rest::RestClient" - module: "signalwire.rest.RestClient" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" - visibility: "public" ---- -# `ShortCodesNamespace` - -## Signature - -```cpp -struct signalwire::rest::RestClient::ShortCodesNamespace : signalwire::rest::CrudResource -``` - -## Inheritance - -**Extends:** [signalwire::rest::CrudResource](/docs/sdk-reference/reference/cpp/signalwire/rest/crud-resource) - -## Methods - -### ShortCodesNamespace - -**Modifiers:** `inline` - -#### Signature - -```cpp -void ShortCodesNamespace(const HttpClient & c) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1216. - -*** - -### update - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json update(const std::string & id, const json & data) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1218. - -## Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1215. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/sip-profile-namespace/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/sip-profile-namespace/index.mdx deleted file mode 100644 index a91705dfcd..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/sip-profile-namespace/index.mdx +++ /dev/null @@ -1,102 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/rest/rest-client/sip-profile-namespace" -title: "SipProfileNamespace" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::rest::RestClient::SipProfileNamespace" - parent: "signalwire::rest::RestClient" - module: "signalwire.rest.RestClient" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" - visibility: "public" ---- -# `SipProfileNamespace` - -## Signature - -```cpp -struct signalwire::rest::RestClient::SipProfileNamespace : signalwire::rest::CrudResource -``` - -## Inheritance - -**Extends:** [signalwire::rest::CrudResource](/docs/sdk-reference/reference/cpp/signalwire/rest/crud-resource) - -## Methods - -### get - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json get() const -``` - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1205. - -*** - -### SipProfileNamespace - -**Modifiers:** `inline` - -#### Signature - -```cpp -void SipProfileNamespace(const HttpClient & c) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1204. - -*** - -### update - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json update(const json & data) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1206. - -## Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1203. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/verified-callers-namespace/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/verified-callers-namespace/index.mdx deleted file mode 100644 index 362339b426..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/verified-callers-namespace/index.mdx +++ /dev/null @@ -1,54 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/rest/rest-client/verified-callers-namespace" -title: "VerifiedCallersNamespace" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::rest::RestClient::VerifiedCallersNamespace" - parent: "signalwire::rest::RestClient" - module: "signalwire.rest.RestClient" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" - visibility: "public" ---- -# `VerifiedCallersNamespace` - -## Signature - -```cpp -struct signalwire::rest::RestClient::VerifiedCallersNamespace : signalwire::rest::CrudResource -``` - -## Inheritance - -**Extends:** [signalwire::rest::CrudResource](/docs/sdk-reference/reference/cpp/signalwire/rest/crud-resource) - -## Methods - -### VerifiedCallersNamespace - -**Modifiers:** `inline` - -#### Signature - -```cpp -void VerifiedCallersNamespace(const HttpClient & c) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1198. - -## Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 1197. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/video-conference-tokens/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/video-conference-tokens/index.mdx deleted file mode 100644 index a10c1dd1b4..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/video-conference-tokens/index.mdx +++ /dev/null @@ -1,108 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/rest/rest-client/video-conference-tokens" -title: "VideoConferenceTokens" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::rest::RestClient::VideoConferenceTokens" - parent: "signalwire::rest::RestClient" - module: "signalwire.rest.RestClient" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" - visibility: "public" ---- -# `VideoConferenceTokens` - -## Signature - -```cpp -struct signalwire::rest::RestClient::VideoConferenceTokens -``` - -## Properties - - - - - -## Methods - -### get - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json get(const std::string & token_id) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 747. - -*** - -### reset - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json reset(const std::string & token_id) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 750. - -*** - -### VideoConferenceTokens - -**Modifiers:** `inline` - -#### Signature - -```cpp -void VideoConferenceTokens(const HttpClient & c) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 746. - -## Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 743. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/video-conferences/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/video-conferences/index.mdx deleted file mode 100644 index 4642b180c8..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/video-conferences/index.mdx +++ /dev/null @@ -1,172 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/rest/rest-client/video-conferences" -title: "VideoConferences" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::rest::RestClient::VideoConferences" - parent: "signalwire::rest::RestClient" - module: "signalwire.rest.RestClient" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" - visibility: "public" ---- -# `VideoConferences` - -## Signature - -```cpp -struct signalwire::rest::RestClient::VideoConferences : signalwire::rest::CrudResource -``` - -## Inheritance - -**Extends:** [signalwire::rest::CrudResource](/docs/sdk-reference/reference/cpp/signalwire/rest/crud-resource) - -## Methods - -### create\_stream - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json create_stream(const std::string & conf_id, const json & data) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 738. - -*** - -### list\_conference\_tokens - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json list_conference_tokens( - const std::string & conf_id, - const std::map< std::string, std::string > & params = {} -) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 730. - -*** - -### list\_streams - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json list_streams( - const std::string & conf_id, - const std::map< std::string, std::string > & params = {} -) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 734. - -*** - -### update - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json update(const std::string & conf_id, const json & data) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 727. - -*** - -### VideoConferences - -**Modifiers:** `inline` - -#### Signature - -```cpp -void VideoConferences(const HttpClient & c) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 724. - -## Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 723. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/video-namespace/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/video-namespace/index.mdx deleted file mode 100644 index 3145ecfe6f..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/video-namespace/index.mdx +++ /dev/null @@ -1,68 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/rest/rest-client/video-namespace" -title: "VideoNamespace" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::rest::RestClient::VideoNamespace" - parent: "signalwire::rest::RestClient" - module: "signalwire.rest.RestClient" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" - visibility: "public" ---- -# `VideoNamespace` - -## Signature - -```cpp -struct signalwire::rest::RestClient::VideoNamespace -``` - -## Properties - - - - - - - - - - - - - - - - - -## Methods - -### VideoNamespace - -**Modifiers:** `inline` - -#### Signature - -```cpp -void VideoNamespace(const HttpClient & c) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 785. - -## Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 771. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/video-room-recordings/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/video-room-recordings/index.mdx deleted file mode 100644 index d6e03eecac..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/video-room-recordings/index.mdx +++ /dev/null @@ -1,139 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/rest/rest-client/video-room-recordings" -title: "VideoRoomRecordings" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::rest::RestClient::VideoRoomRecordings" - parent: "signalwire::rest::RestClient" - module: "signalwire.rest.RestClient" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" - visibility: "public" ---- -# `VideoRoomRecordings` - -## Signature - -```cpp -struct signalwire::rest::RestClient::VideoRoomRecordings -``` - -## Properties - - - - - -## Methods - -### get - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json get(const std::string & recording_id) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 711. - -*** - -### list - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json list(const std::map< std::string, std::string > & params = {}) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 708. - -*** - -### list\_events - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json list_events( - const std::string & recording_id, - const std::map< std::string, std::string > & params = {} -) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 717. - -*** - -### VideoRoomRecordings - -**Modifiers:** `inline` - -#### Signature - -```cpp -void VideoRoomRecordings(const HttpClient & c) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 707. - -## Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 704. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/video-room-sessions/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/video-room-sessions/index.mdx deleted file mode 100644 index beb8c65a02..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/video-room-sessions/index.mdx +++ /dev/null @@ -1,201 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/rest/rest-client/video-room-sessions" -title: "VideoRoomSessions" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::rest::RestClient::VideoRoomSessions" - parent: "signalwire::rest::RestClient" - module: "signalwire.rest.RestClient" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" - visibility: "public" ---- -# `VideoRoomSessions` - -## Signature - -```cpp -struct signalwire::rest::RestClient::VideoRoomSessions -``` - -## Properties - - - - - -## Methods - -### get - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json get(const std::string & session_id) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 687. - -*** - -### list - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json list(const std::map< std::string, std::string > & params = {}) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 684. - -*** - -### list\_events - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json list_events( - const std::string & session_id, - const std::map< std::string, std::string > & params = {} -) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 690. - -*** - -### list\_members - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json list_members( - const std::string & session_id, - const std::map< std::string, std::string > & params = {} -) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 694. - -*** - -### list\_recordings - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json list_recordings( - const std::string & session_id, - const std::map< std::string, std::string > & params = {} -) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 698. - -*** - -### VideoRoomSessions - -**Modifiers:** `inline` - -#### Signature - -```cpp -void VideoRoomSessions(const HttpClient & c) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 683. - -## Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 680. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/video-room-tokens/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/video-room-tokens/index.mdx deleted file mode 100644 index bbf329c49e..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/video-room-tokens/index.mdx +++ /dev/null @@ -1,82 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/rest/rest-client/video-room-tokens" -title: "VideoRoomTokens" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::rest::RestClient::VideoRoomTokens" - parent: "signalwire::rest::RestClient" - module: "signalwire.rest.RestClient" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" - visibility: "public" ---- -# `VideoRoomTokens` - -## Signature - -```cpp -struct signalwire::rest::RestClient::VideoRoomTokens -``` - -## Properties - - - - - -## Methods - -### create - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json create(const json & data) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 677. - -*** - -### VideoRoomTokens - -**Modifiers:** `inline` - -#### Signature - -```cpp -void VideoRoomTokens(const HttpClient & c) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 676. - -## Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 673. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/video-rooms/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/video-rooms/index.mdx deleted file mode 100644 index b7bc6bf5ce..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/video-rooms/index.mdx +++ /dev/null @@ -1,141 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/rest/rest-client/video-rooms" -title: "VideoRooms" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::rest::RestClient::VideoRooms" - parent: "signalwire::rest::RestClient" - module: "signalwire.rest.RestClient" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" - visibility: "public" ---- -# `VideoRooms` - -## Signature - -```cpp -struct signalwire::rest::RestClient::VideoRooms : signalwire::rest::CrudResource -``` - -## Inheritance - -**Extends:** [signalwire::rest::CrudResource](/docs/sdk-reference/reference/cpp/signalwire/rest/crud-resource) - -## Methods - -### create\_stream - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json create_stream(const std::string & room_id, const json & data) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 668. - -*** - -### list\_streams - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json list_streams( - const std::string & room_id, - const std::map< std::string, std::string > & params = {} -) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 664. - -*** - -### update - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json update(const std::string & room_id, const json & data) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 661. - -*** - -### VideoRooms - -**Modifiers:** `inline` - -#### Signature - -```cpp -void VideoRooms(const HttpClient & c) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 659. - -## Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 658. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/video-streams/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/video-streams/index.mdx deleted file mode 100644 index 096b9f0330..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/rest/rest-client/video-streams/index.mdx +++ /dev/null @@ -1,110 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/rest/rest-client/video-streams" -title: "VideoStreams" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::rest::RestClient::VideoStreams" - parent: "signalwire::rest::RestClient" - module: "signalwire.rest.RestClient" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" - visibility: "public" ---- -# `VideoStreams` - -## Signature - -```cpp -struct signalwire::rest::RestClient::VideoStreams -``` - -## Properties - - - - - -## Methods - -### get - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json get(const std::string & stream_id) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 759. - -*** - -### update - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json update(const std::string & stream_id, const json & data) const -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 763. - -*** - -### VideoStreams - -**Modifiers:** `inline` - -#### Signature - -```cpp -void VideoStreams(const HttpClient & c) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 758. - -## Source - -[`include/signalwire/rest/rest_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp) - -Line 755. diff --git a/fern/products/sdk-reference/cpp/signalwire/rest/signal-wire-rest-error/index.mdx b/fern/products/sdk-reference/cpp/signalwire/rest/signal-wire-rest-error/index.mdx deleted file mode 100644 index 5530d3da75..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/rest/signal-wire-rest-error/index.mdx +++ /dev/null @@ -1,108 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/rest/signal-wire-rest-error" -title: "SignalWireRestError" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::rest::SignalWireRestError" - parent: "signalwire::rest" - module: "signalwire.rest" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp" - visibility: "public" ---- -# `SignalWireRestError` - -Error thrown on non-2xx REST API responses. - -## Signature - -```cpp -class signalwire::rest::SignalWireRestError : std::runtime_error -``` - -## Inheritance - -**Extends:** `std::runtime_error` - -## Methods - -### body - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -const std::string & body() const -``` - -#### Returns - -`const std::string &` - -#### Source - -[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) - -Line 24. - -*** - -### SignalWireRestError - -**Modifiers:** `inline` - -#### Signature - -```cpp -void SignalWireRestError( - int status, - const std::string & message, - const std::string & body = "" -) -``` - -#### Parameters - - - - - - - -#### Source - -[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) - -Line 21. - -*** - -### status - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -int status() const -``` - -#### Returns - -`int` - -#### Source - -[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) - -Line 23. - -## Source - -[`include/signalwire/rest/http_client.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/http_client.hpp) - -Line 19. diff --git a/fern/products/sdk-reference/cpp/signalwire/security/index.mdx b/fern/products/sdk-reference/cpp/signalwire/security/index.mdx deleted file mode 100644 index 1278fe7dab..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/security/index.mdx +++ /dev/null @@ -1,283 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/security" -title: "security" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "module" - language: "cpp" - qualified_name: "signalwire::security" - parent: "signalwire" - module: "signalwire" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/security/session_manager.hpp" ---- -# `security` - -## Signature - -```cpp -namespace signalwire::security -``` - -## Classes - - - - Manages HMAC-SHA256 based session tokens for secure SWAIG tool calls. Token format: base64(functionName:callID:expiryTimestamp) + "." + hex(hmac\_signature) - - - - Optional knobs for WrapWithSignatureValidation. trust\_proxy controls whether X-Forwarded-Proto / X-Forwarded-Host headers are honored when reconstructing the public URL — opt-in because proxy headers are spoofable. proxy\_url\_base is consulted before the proxy headers and is meant for SWML\_PROXY\_URL\_BASE callers. - - - -## Functions - -### ValidateRequest - -Legacy @signalwire/compatibility-api drop-in entry point. -If params\_or\_raw\_body holds a std::string, delegates to ValidateWebhookSignature (Scheme A then Scheme B with parsed form). -If it holds a FormParams, treats it as pre-parsed form params and runs Scheme B directly (with URL port normalization). - -std::invalid\_argument - -when signing\_key is empty. - -#### Signature - -```cpp -bool ValidateRequest( - std::string_view signing_key, - std::string_view signature, - std::string_view url, - const ParamsOrBody & params_or_raw_body -) -``` - -#### Parameters - - - - - - - - - -#### Returns - -`bool` - -#### Throws - -- `std::invalid_argument` — when signing\_key is empty. - -#### Source - -[`src/security/webhook_validator.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/security/webhook_validator.cpp) - -Line 457. - -*** - -### ValidateWebhookSignature - -Validate a SignalWire webhook signature against both schemes. -Tries Scheme A (hex JSON) first; on miss falls back to Scheme B (base64 form) with URL port normalization, repeated-key handling, and optional ?bodySHA256= body-hash check for JSON bodies on the compat surface. - -signing\_key - -The customer's Signing Key. UTF-8 string. MUST NOT be empty — empty throws std::invalid\_argument, that's a programming error not a validation failure. - -signature - -The X-SignalWire-Signature header value (or the legacy X-Twilio-Signature alias). Empty returns false without throwing. - -url - -Full URL SignalWire POSTed to (scheme, host, optional port, path, query) — must match what the platform saw, see the URL-reconstruction section of porting-sdk/webhooks.md. - -raw\_body - -Raw request body bytes as a UTF-8 string, BEFORE any JSON / form parsing. Re-serialized JSON breaks Scheme A. - -true if either scheme matches; false otherwise. - -std::invalid\_argument - -when signing\_key is empty. - -#### Signature - -```cpp -bool ValidateWebhookSignature( - std::string_view signing_key, - std::string_view signature, - std::string_view url, - std::string_view raw_body -) -``` - -#### Parameters - - - The customer's Signing Key. UTF-8 string. MUST NOT be empty — empty throws std::invalid\_argument, that's a programming error not a validation failure. - - - - The X-SignalWire-Signature header value (or the legacy X-Twilio-Signature alias). Empty returns false without throwing. - - - - Full URL SignalWire POSTed to (scheme, host, optional port, path, query) — must match what the platform saw, see the URL-reconstruction section of porting-sdk/webhooks.md. - - - - Raw request body bytes as a UTF-8 string, BEFORE any JSON / form parsing. Re-serialized JSON breaks Scheme A. - - -#### Returns - -`bool` — true if either scheme matches; false otherwise. - -#### Throws - -- `std::invalid_argument` — when signing\_key is empty. - -#### Source - -[`src/security/webhook_validator.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/security/webhook_validator.cpp) - -Line 406. - -*** - -### WrapWithSignatureValidation - -Wrap a downstream cpp-httplib POST handler with SignalWire webhook signature validation. -Behavior: - -Read req.body (cpp-httplib has already buffered it). -Pull X-SignalWire-Signature (or the X-Twilio-Signature legacy alias) from headers. -Reconstruct the public URL the platform POSTed to (proxy-aware). -Call ValidateWebhookSignature. -On invalid / missing signature: respond 403 Forbidden with no body detail. The downstream handler is NOT called. Per the porting-sdk spec, the validator MUST NOT log which branch failed or the expected signature. -On valid: call downstream(req, res). The handler can read req.body directly — cpp-httplib buffers it for repeat reads. - -signing\_key - -Customer's Signing Key (SignalWire Dashboard → API Credentials). MUST NOT be empty — empty throws std::invalid\_argument at wrap time, that's a programming error not a runtime failure. - -downstream - -Handler to invoke on a valid signature. - -opts - -Optional URL reconstruction knobs. - -A handler suitable for server.Post(path, handler). - -std::invalid\_argument - -if signing\_key is empty. - -#### Signature - -```cpp -HttpHandler WrapWithSignatureValidation( - std::string_view signing_key, - HttpHandler downstream, - WebhookValidatorOptions opts = {} -) -``` - -#### Parameters - - - Customer's Signing Key (SignalWire Dashboard → API Credentials). MUST NOT be empty — empty throws std::invalid\_argument at wrap time, that's a programming error not a runtime failure. - - - - Handler to invoke on a valid signature. - - - - Optional URL reconstruction knobs. - - -#### Returns - -`HttpHandler` — A handler suitable for server.Post(path, handler). - -#### Throws - -- `std::invalid_argument` — if signing\_key is empty. - -#### Source - -[`src/security/webhook_middleware.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/security/webhook_middleware.cpp) - -Line 107. - -## Type Aliases - -### FormParams - -Pre-parsed form parameters for ValidateRequest: ordered list of (key, list-of-values) tuples. Repeated keys are represented as one entry whose values vector holds each occurrence in submission order. -Used as one alternative in ParamsOrBody; the other alternative is the raw body string. - -#### Signature - -```cpp -typedef std::vector< std::pair< std::string, std::vector< std::string > > > FormParams -``` - -#### Source - -[`include/signalwire/security/webhook_validator.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/security/webhook_validator.hpp) - -Line 32. - -*** - -### HttpHandler - -A cpp-httplib handler signature, lifted into a typedef so the adapter stays framework-agnostic at the call site (the only deps needed by this header are a forward declaration of httplib::Request/Response). - -#### Signature - -```cpp -typedef std::function< void(const httplib::Request &, httplib::Response &)> HttpHandler -``` - -#### Source - -[`include/signalwire/security/webhook_middleware.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/security/webhook_middleware.hpp) - -Line 19. - -*** - -### ParamsOrBody - -Drop-in shape for ValidateRequest mirroring @signalwire/compatibility-api's RestClient.validateRequest: either a raw body string (delegates to the combined validator) or a pre-parsed form-params list (runs Scheme B directly). - -#### Signature - -```cpp -typedef std::variant< std::string, FormParams > ParamsOrBody -``` - -#### Source - -[`include/signalwire/security/webhook_validator.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/security/webhook_validator.hpp) - -Line 38. - -## Source - -[`include/signalwire/security/session_manager.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/security/session_manager.hpp) - -Line 10. diff --git a/fern/products/sdk-reference/cpp/signalwire/security/session-manager/index.mdx b/fern/products/sdk-reference/cpp/signalwire/security/session-manager/index.mdx deleted file mode 100644 index 34297167e2..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/security/session-manager/index.mdx +++ /dev/null @@ -1,207 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/security/session-manager" -title: "SessionManager" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::security::SessionManager" - parent: "signalwire::security" - module: "signalwire.security" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/security/session_manager.hpp" - visibility: "public" ---- -# `SessionManager` - -Manages HMAC-SHA256 based session tokens for secure SWAIG tool calls. -Token format: base64(functionName:callID:expiryTimestamp) + "." + hex(hmac\_signature) - -## Signature - -```cpp -class signalwire::security::SessionManager -``` - -## Methods - -### create\_token - -Create a signed token for a function call - -function\_name - -The SWAIG function name - -call\_id - -The call identifier - -expiry\_seconds - -Seconds until expiry (default 3600) - -The signed token string - -**Modifiers:** `const` - -#### Signature - -```cpp -std::string create_token( - const std::string & function_name, - const std::string & call_id, - int expiry_seconds = 3600 -) const -``` - -#### Parameters - - - The SWAIG function name - - - - The call identifier - - - - Seconds until expiry (default 3600) - - -#### Returns - -`std::string` — The signed token string - -#### Source - -[`include/signalwire/security/session_manager.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/security/session_manager.hpp) - -Line 28. - -*** - -### SessionManager - -Construct with a random 32-byte secret. - -#### Signature - - - - ```cpp - void SessionManager() - ``` - - - - ```cpp - void SessionManager(const std::vector< uint8_t > & secret) - ``` - - - -#### Parameters (Overload 2) - - - -#### Source - -[`include/signalwire/security/session_manager.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/security/session_manager.hpp) - -Line 18. - -*** - -### timing\_safe\_compare - -Timing-safe comparison of two byte sequences. - -**Modifiers:** `static` - -#### Signature - -```cpp -bool timing_safe_compare(const std::string & a, const std::string & b) -``` - -#### Parameters - - - - - -#### Returns - -`bool` - -#### Source - -[`include/signalwire/security/session_manager.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/security/session_manager.hpp) - -Line 47. - -*** - -### validate\_token - -Validate a token - -token - -The token to validate - -function\_name - -Expected function name - -call\_id - -Expected call ID - -true if token is valid and not expired - -All three params are consumed read-only (parsed/compared, never stored), so they take std::string\_view — consistent with the webhook\_validator entry points in this module. \[\[nodiscard]]: the validity result is the reason to call it. - -**Modifiers:** `const` - -#### Signature - -```cpp -bool validate_token( - std::string_view token, - std::string_view function_name, - std::string_view call_id -) const -``` - -#### Parameters - - - The token to validate - - - - Expected function name - - - - Expected call ID - - -#### Returns - -`bool` — true if token is valid and not expired - -#### Source - -[`include/signalwire/security/session_manager.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/security/session_manager.hpp) - -Line 42. - -## Source - -[`include/signalwire/security/session_manager.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/security/session_manager.hpp) - -Line 15. diff --git a/fern/products/sdk-reference/cpp/signalwire/security/webhook-validator-options/index.mdx b/fern/products/sdk-reference/cpp/signalwire/security/webhook-validator-options/index.mdx deleted file mode 100644 index c26f57be45..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/security/webhook-validator-options/index.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/security/webhook-validator-options" -title: "WebhookValidatorOptions" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::security::WebhookValidatorOptions" - parent: "signalwire::security" - module: "signalwire.security" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/security/webhook_middleware.hpp" - visibility: "public" ---- -# `WebhookValidatorOptions` - -Optional knobs for WrapWithSignatureValidation. trust\_proxy controls whether X-Forwarded-Proto / X-Forwarded-Host headers are honored when reconstructing the public URL — opt-in because proxy headers are spoofable. proxy\_url\_base is consulted before the proxy headers and is meant for SWML\_PROXY\_URL\_BASE callers. - -## Signature - -```cpp -struct signalwire::security::WebhookValidatorOptions -``` - -## Properties - - - Optional base URL (e.g. https://abcd.ngrok.io) joined with the request path + query when reconstructing the URL. Wins over proxy headers and request.host. - - - - If true, honor X-Forwarded-Proto / X-Forwarded-Host when reconstructing the URL. Default false. - - -## Source - -[`include/signalwire/security/webhook_middleware.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/security/webhook_middleware.hpp) - -Line 26. diff --git a/fern/products/sdk-reference/cpp/signalwire/server/agent-server/index.mdx b/fern/products/sdk-reference/cpp/signalwire/server/agent-server/index.mdx deleted file mode 100644 index ad793e4d5a..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/server/agent-server/index.mdx +++ /dev/null @@ -1,270 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/server/agent-server" -title: "AgentServer" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::server::AgentServer" - parent: "signalwire::server" - module: "signalwire.server" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/server/agent_server.hpp" - visibility: "public" ---- -# `AgentServer` - -Multi-agent hosting server. - -## Signature - -```cpp -class signalwire::server::AgentServer -``` - -## Methods - -### ~AgentServer - -#### Signature - -```cpp -void ~AgentServer() -``` - -#### Source - -[`include/signalwire/server/agent_server.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/server/agent_server.hpp) - -Line 25. - -*** - -### AgentServer - -**Modifiers:** `explicit` - -#### Signature - -```cpp -void AgentServer(const std::string & host = "0.0.0.0", int port = 3000) -``` - -#### Parameters - - - - - -#### Source - -[`include/signalwire/server/agent_server.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/server/agent_server.hpp) - -Line 24. - -*** - -### enable\_sip\_routing - -Enable SIP routing. - -#### Signature - -```cpp -AgentServer & enable_sip_routing(bool enable = true) -``` - -#### Parameters - - - -#### Returns - -`AgentServer &` - -#### Source - -[`include/signalwire/server/agent_server.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/server/agent_server.hpp) - -Line 37. - -*** - -### list\_routes - -List registered routes. - -**Modifiers:** `const` - -#### Signature - -```cpp -std::vector< std::string > list_routes() const -``` - -#### Returns - -`std::vector< std::string >` - -#### Source - -[`include/signalwire/server/agent_server.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/server/agent_server.hpp) - -Line 34. - -*** - -### map\_sip\_username - -Map a SIP username to an agent route. - -#### Signature - -```cpp -AgentServer & map_sip_username( - const std::string & username, - const std::string & route -) -``` - -#### Parameters - - - - - -#### Returns - -`AgentServer &` - -#### Source - -[`include/signalwire/server/agent_server.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/server/agent_server.hpp) - -Line 40. - -*** - -### register\_agent - -Register an agent at a specific route. - -#### Signature - -```cpp -AgentServer & register_agent( - std::shared_ptr< agent::AgentBase > agent, - const std::string & route -) -``` - -#### Parameters - - - - - -#### Returns - -`AgentServer &` - -#### Source - -[`include/signalwire/server/agent_server.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/server/agent_server.hpp) - -Line 28. - -*** - -### run - -Start the server (blocking). - -#### Signature - -```cpp -void run() -``` - -#### Source - -[`include/signalwire/server/agent_server.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/server/agent_server.hpp) - -Line 46. - -*** - -### set\_static\_dir - -Enable static file serving from a directory. - -#### Signature - -```cpp -AgentServer & set_static_dir(const std::string & dir) -``` - -#### Parameters - - - -#### Returns - -`AgentServer &` - -#### Source - -[`include/signalwire/server/agent_server.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/server/agent_server.hpp) - -Line 43. - -*** - -### stop - -Stop the server. - -#### Signature - -```cpp -void stop() -``` - -#### Source - -[`include/signalwire/server/agent_server.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/server/agent_server.hpp) - -Line 49. - -*** - -### unregister\_agent - -Unregister an agent by route. - -#### Signature - -```cpp -AgentServer & unregister_agent(const std::string & route) -``` - -#### Parameters - - - -#### Returns - -`AgentServer &` - -#### Source - -[`include/signalwire/server/agent_server.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/server/agent_server.hpp) - -Line 31. - -## Source - -[`include/signalwire/server/agent_server.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/server/agent_server.hpp) - -Line 22. diff --git a/fern/products/sdk-reference/cpp/signalwire/server/index.mdx b/fern/products/sdk-reference/cpp/signalwire/server/index.mdx deleted file mode 100644 index 093499ab74..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/server/index.mdx +++ /dev/null @@ -1,107 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/server" -title: "server" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "module" - language: "cpp" - qualified_name: "signalwire::server" - parent: "signalwire" - module: "signalwire" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp" ---- -# `server` - -## Signature - -```cpp -namespace signalwire::server -``` - -## Classes - - - - Multi-agent hosting server. - - - - Resolved TLS configuration for an in-process HTTP server. - - - -## Functions - -### make\_http\_server - -Construct the httplib server for the given config. When cfg.usable(), an SSLServer (TLS termination in-process) is returned upcast to Server\*; otherwise a plain Server. Returns nullptr only on allocation failure. When an SSLServer is requested but its cert/key fail to load, the returned server's is\_valid() is false — callers log and refuse to listen, the same failure mode as a bad bind. - -**Modifiers:** `inline` - -#### Signature - -```cpp -std::unique_ptr< httplib::Server > make_http_server(const TlsServerConfig & cfg) -``` - -#### Parameters - - - -#### Returns - -`std::unique_ptr< httplib::Server >` - -#### Source - -[`src/server/tls_server.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/server/tls_server.hpp) - -Line 60. - -*** - -### resolve\_tls\_config\_from\_env - -Resolve TLS config from the SWML\_SSL\_\* environment variables, mirroring signalwire-python's SecurityConfig.load\_from\_env(). Returns enabled=false when SWML\_SSL\_ENABLED is unset/false. - -**Modifiers:** `inline` - -#### Signature - -```cpp -TlsServerConfig resolve_tls_config_from_env() -``` - -#### Returns - -`TlsServerConfig` - -#### Source - -[`src/server/tls_server.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/server/tls_server.hpp) - -Line 44. - -## Type Aliases - -### json - -#### Signature - -```cpp -typedef nlohmann::json json -``` - -#### Source - -[`include/signalwire/server/agent_server.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/server/agent_server.hpp) - -Line 19. - -## Source - -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) - -Line 29. diff --git a/fern/products/sdk-reference/cpp/signalwire/server/tls-server-config/index.mdx b/fern/products/sdk-reference/cpp/signalwire/server/tls-server-config/index.mdx deleted file mode 100644 index 0b83721637..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/server/tls-server-config/index.mdx +++ /dev/null @@ -1,62 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/server/tls-server-config" -title: "TlsServerConfig" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::server::TlsServerConfig" - parent: "signalwire::server" - module: "signalwire.server" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/server/tls_server.hpp" - visibility: "public" ---- -# `TlsServerConfig` - -Resolved TLS configuration for an in-process HTTP server. - -## Signature - -```cpp -struct signalwire::server::TlsServerConfig -``` - -## Properties - - - - - - - -## Methods - -### usable - -True only when TLS is enabled AND both cert + key paths are present. - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -bool usable() const -``` - -#### Returns - -`bool` - -#### Source - -[`src/server/tls_server.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/server/tls_server.hpp) - -Line 36. - -## Source - -[`src/server/tls_server.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/server/tls_server.hpp) - -Line 30. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/api-ninjas-trivia-skill-r/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/api-ninjas-trivia-skill-r/index.mdx deleted file mode 100644 index ce2c63fe12..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/skills/api-ninjas-trivia-skill-r/index.mdx +++ /dev/null @@ -1,174 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/skills/api-ninjas-trivia-skill-r" -title: "ApiNinjasTriviaSkillR" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::skills::ApiNinjasTriviaSkillR" - parent: "signalwire::skills" - module: "signalwire.skills" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp" - visibility: "public" ---- -# `ApiNinjasTriviaSkillR` - -## Signature - -```cpp -class signalwire::skills::ApiNinjasTriviaSkillR : signalwire::skills::SkillBase -``` - -## Inheritance - -**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base) - -## Methods - -### get\_datamap\_functions - -Get SWAIG DataMap functions (for DataMap-based skills). - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::vector< json > get_datamap_functions() const -``` - -#### Returns - -`std::vector< json >` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 400. - -*** - -### register\_tools - -Register tools with the agent. Returns tool definitions. - -**Modifiers:** `inline` `virtual` - -#### Signature - -```cpp -std::vector< swaig::ToolDefinition > register_tools() -``` - -#### Returns - -`std::vector< swaig::ToolDefinition >` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 400. - -*** - -### setup - -Initialize the skill with given params. Return true on success. - -**Modifiers:** `inline` `virtual` - -#### Signature - -```cpp -bool setup(const json & params) -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 400. - -*** - -### skill\_description - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_description() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 400. - -*** - -### skill\_name - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_name() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 400. - -*** - -### supports\_multiple\_instances - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -bool supports_multiple_instances() const -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 400. - -## Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 400. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/api-ninjas-trivia-skill/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/api-ninjas-trivia-skill/index.mdx deleted file mode 100644 index 152654eb39..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/skills/api-ninjas-trivia-skill/index.mdx +++ /dev/null @@ -1,174 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/skills/api-ninjas-trivia-skill" -title: "ApiNinjasTriviaSkill" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::skills::ApiNinjasTriviaSkill" - parent: "signalwire::skills" - module: "signalwire.skills" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/api_ninjas_trivia.cpp" - visibility: "public" ---- -# `ApiNinjasTriviaSkill` - -## Signature - -```cpp -class signalwire::skills::ApiNinjasTriviaSkill : signalwire::skills::SkillBase -``` - -## Inheritance - -**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base) - -## Methods - -### get\_datamap\_functions - -Get SWAIG DataMap functions (for DataMap-based skills). - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::vector< json > get_datamap_functions() const -``` - -#### Returns - -`std::vector< json >` - -#### Source - -[`src/skills/builtin/api_ninjas_trivia.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/api_ninjas_trivia.cpp) - -Line 25. - -*** - -### register\_tools - -Register tools with the agent. Returns tool definitions. - -**Modifiers:** `inline` `virtual` - -#### Signature - -```cpp -std::vector< swaig::ToolDefinition > register_tools() -``` - -#### Returns - -`std::vector< swaig::ToolDefinition >` - -#### Source - -[`src/skills/builtin/api_ninjas_trivia.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/api_ninjas_trivia.cpp) - -Line 23. - -*** - -### setup - -Initialize the skill with given params. Return true on success. - -**Modifiers:** `inline` `virtual` - -#### Signature - -```cpp -bool setup(const json & params) -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/api_ninjas_trivia.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/api_ninjas_trivia.cpp) - -Line 16. - -*** - -### skill\_description - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_description() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/builtin/api_ninjas_trivia.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/api_ninjas_trivia.cpp) - -Line 13. - -*** - -### skill\_name - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_name() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/builtin/api_ninjas_trivia.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/api_ninjas_trivia.cpp) - -Line 12. - -*** - -### supports\_multiple\_instances - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -bool supports_multiple_instances() const -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/api_ninjas_trivia.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/api_ninjas_trivia.cpp) - -Line 14. - -## Source - -[`src/skills/builtin/api_ninjas_trivia.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/api_ninjas_trivia.cpp) - -Line 10. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/claude-skills-skill-r/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/claude-skills-skill-r/index.mdx deleted file mode 100644 index b9786b8a71..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/skills/claude-skills-skill-r/index.mdx +++ /dev/null @@ -1,150 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/skills/claude-skills-skill-r" -title: "ClaudeSkillsSkillR" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::skills::ClaudeSkillsSkillR" - parent: "signalwire::skills" - module: "signalwire.skills" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp" - visibility: "public" ---- -# `ClaudeSkillsSkillR` - -## Signature - -```cpp -class signalwire::skills::ClaudeSkillsSkillR : signalwire::skills::SkillBase -``` - -## Inheritance - -**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base) - -## Methods - -### register\_tools - -Register tools with the agent. Returns tool definitions. - -**Modifiers:** `inline` `virtual` - -#### Signature - -```cpp -std::vector< swaig::ToolDefinition > register_tools() -``` - -#### Returns - -`std::vector< swaig::ToolDefinition >` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 406. - -*** - -### setup - -Initialize the skill with given params. Return true on success. - -**Modifiers:** `inline` `virtual` - -#### Signature - -```cpp -bool setup(const json & params) -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 406. - -*** - -### skill\_description - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_description() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 406. - -*** - -### skill\_name - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_name() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 406. - -*** - -### supports\_multiple\_instances - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -bool supports_multiple_instances() const -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 406. - -## Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 406. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/claude-skills-skill/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/claude-skills-skill/index.mdx deleted file mode 100644 index 2db1d111ac..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/skills/claude-skills-skill/index.mdx +++ /dev/null @@ -1,174 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/skills/claude-skills-skill" -title: "ClaudeSkillsSkill" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::skills::ClaudeSkillsSkill" - parent: "signalwire::skills" - module: "signalwire.skills" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/claude_skills.cpp" - visibility: "public" ---- -# `ClaudeSkillsSkill` - -## Signature - -```cpp -class signalwire::skills::ClaudeSkillsSkill : signalwire::skills::SkillBase -``` - -## Inheritance - -**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base) - -## Methods - -### get\_hints - -Get speech recognition hints to merge into agent. - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::vector< std::string > get_hints() const -``` - -#### Returns - -`std::vector< std::string >` - -#### Source - -[`src/skills/builtin/claude_skills.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/claude_skills.cpp) - -Line 37. - -*** - -### register\_tools - -Register tools with the agent. Returns tool definitions. - -**Modifiers:** `inline` `virtual` - -#### Signature - -```cpp -std::vector< swaig::ToolDefinition > register_tools() -``` - -#### Returns - -`std::vector< swaig::ToolDefinition >` - -#### Source - -[`src/skills/builtin/claude_skills.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/claude_skills.cpp) - -Line 22. - -*** - -### setup - -Initialize the skill with given params. Return true on success. - -**Modifiers:** `inline` `virtual` - -#### Signature - -```cpp -bool setup(const json & params) -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/claude_skills.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/claude_skills.cpp) - -Line 15. - -*** - -### skill\_description - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_description() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/builtin/claude_skills.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/claude_skills.cpp) - -Line 12. - -*** - -### skill\_name - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_name() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/builtin/claude_skills.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/claude_skills.cpp) - -Line 11. - -*** - -### supports\_multiple\_instances - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -bool supports_multiple_instances() const -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/claude_skills.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/claude_skills.cpp) - -Line 13. - -## Source - -[`src/skills/builtin/claude_skills.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/claude_skills.cpp) - -Line 9. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/custom-skills-skill-r/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/custom-skills-skill-r/index.mdx deleted file mode 100644 index 4a3cbe9b10..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/skills/custom-skills-skill-r/index.mdx +++ /dev/null @@ -1,150 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/skills/custom-skills-skill-r" -title: "CustomSkillsSkillR" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::skills::CustomSkillsSkillR" - parent: "signalwire::skills" - module: "signalwire.skills" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp" - visibility: "public" ---- -# `CustomSkillsSkillR` - -## Signature - -```cpp -class signalwire::skills::CustomSkillsSkillR : signalwire::skills::SkillBase -``` - -## Inheritance - -**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base) - -## Methods - -### register\_tools - -Register tools with the agent. Returns tool definitions. - -**Modifiers:** `inline` `virtual` - -#### Signature - -```cpp -std::vector< swaig::ToolDefinition > register_tools() -``` - -#### Returns - -`std::vector< swaig::ToolDefinition >` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 410. - -*** - -### setup - -Initialize the skill with given params. Return true on success. - -**Modifiers:** `inline` `virtual` - -#### Signature - -```cpp -bool setup(const json & params) -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 410. - -*** - -### skill\_description - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_description() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 410. - -*** - -### skill\_name - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_name() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 410. - -*** - -### supports\_multiple\_instances - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -bool supports_multiple_instances() const -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 410. - -## Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 410. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/custom-skills-skill/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/custom-skills-skill/index.mdx deleted file mode 100644 index 0d262ab848..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/skills/custom-skills-skill/index.mdx +++ /dev/null @@ -1,150 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/skills/custom-skills-skill" -title: "CustomSkillsSkill" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::skills::CustomSkillsSkill" - parent: "signalwire::skills" - module: "signalwire.skills" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/custom_skills.cpp" - visibility: "public" ---- -# `CustomSkillsSkill` - -## Signature - -```cpp -class signalwire::skills::CustomSkillsSkill : signalwire::skills::SkillBase -``` - -## Inheritance - -**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base) - -## Methods - -### register\_tools - -Register tools with the agent. Returns tool definitions. - -**Modifiers:** `inline` `virtual` - -#### Signature - -```cpp -std::vector< swaig::ToolDefinition > register_tools() -``` - -#### Returns - -`std::vector< swaig::ToolDefinition >` - -#### Source - -[`src/skills/builtin/custom_skills.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/custom_skills.cpp) - -Line 20. - -*** - -### setup - -Initialize the skill with given params. Return true on success. - -**Modifiers:** `inline` `virtual` - -#### Signature - -```cpp -bool setup(const json & params) -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/custom_skills.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/custom_skills.cpp) - -Line 15. - -*** - -### skill\_description - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_description() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/builtin/custom_skills.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/custom_skills.cpp) - -Line 12. - -*** - -### skill\_name - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_name() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/builtin/custom_skills.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/custom_skills.cpp) - -Line 11. - -*** - -### supports\_multiple\_instances - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -bool supports_multiple_instances() const -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/custom_skills.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/custom_skills.cpp) - -Line 13. - -## Source - -[`src/skills/builtin/custom_skills.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/custom_skills.cpp) - -Line 9. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/datasphere-serverless-skill-r/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/datasphere-serverless-skill-r/index.mdx deleted file mode 100644 index 140f2bd9a2..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/skills/datasphere-serverless-skill-r/index.mdx +++ /dev/null @@ -1,174 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/skills/datasphere-serverless-skill-r" -title: "DatasphereServerlessSkillR" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::skills::DatasphereServerlessSkillR" - parent: "signalwire::skills" - module: "signalwire.skills" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp" - visibility: "public" ---- -# `DatasphereServerlessSkillR` - -## Signature - -```cpp -class signalwire::skills::DatasphereServerlessSkillR : signalwire::skills::SkillBase -``` - -## Inheritance - -**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base) - -## Methods - -### get\_datamap\_functions - -Get SWAIG DataMap functions (for DataMap-based skills). - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::vector< json > get_datamap_functions() const -``` - -#### Returns - -`std::vector< json >` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 394. - -*** - -### register\_tools - -Register tools with the agent. Returns tool definitions. - -**Modifiers:** `inline` `virtual` - -#### Signature - -```cpp -std::vector< swaig::ToolDefinition > register_tools() -``` - -#### Returns - -`std::vector< swaig::ToolDefinition >` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 394. - -*** - -### setup - -Initialize the skill with given params. Return true on success. - -**Modifiers:** `inline` `virtual` - -#### Signature - -```cpp -bool setup(const json & params) -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 394. - -*** - -### skill\_description - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_description() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 394. - -*** - -### skill\_name - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_name() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 394. - -*** - -### supports\_multiple\_instances - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -bool supports_multiple_instances() const -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 394. - -## Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 394. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/datasphere-serverless-skill/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/datasphere-serverless-skill/index.mdx deleted file mode 100644 index 5bb1d564a4..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/skills/datasphere-serverless-skill/index.mdx +++ /dev/null @@ -1,222 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/skills/datasphere-serverless-skill" -title: "DatasphereServerlessSkill" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::skills::DatasphereServerlessSkill" - parent: "signalwire::skills" - module: "signalwire.skills" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datasphere_serverless.cpp" - visibility: "public" ---- -# `DatasphereServerlessSkill` - -## Signature - -```cpp -class signalwire::skills::DatasphereServerlessSkill : signalwire::skills::SkillBase -``` - -## Inheritance - -**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base) - -## Methods - -### get\_datamap\_functions - -Get SWAIG DataMap functions (for DataMap-based skills). - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::vector< json > get_datamap_functions() const -``` - -#### Returns - -`std::vector< json >` - -#### Source - -[`src/skills/builtin/datasphere_serverless.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datasphere_serverless.cpp) - -Line 31. - -*** - -### get\_global\_data - -Get global data to merge into agent. - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -json get_global_data() const -``` - -#### Returns - -`json` - -#### Source - -[`src/skills/builtin/datasphere_serverless.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datasphere_serverless.cpp) - -Line 58. - -*** - -### get\_prompt\_sections - -Get prompt sections to inject into agent. - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::vector< SkillPromptSection > get_prompt_sections() const -``` - -#### Returns - -`std::vector< SkillPromptSection >` - -#### Source - -[`src/skills/builtin/datasphere_serverless.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datasphere_serverless.cpp) - -Line 52. - -*** - -### register\_tools - -Register tools with the agent. Returns tool definitions. - -**Modifiers:** `inline` `virtual` - -#### Signature - -```cpp -std::vector< swaig::ToolDefinition > register_tools() -``` - -#### Returns - -`std::vector< swaig::ToolDefinition >` - -#### Source - -[`src/skills/builtin/datasphere_serverless.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datasphere_serverless.cpp) - -Line 29. - -*** - -### setup - -Initialize the skill with given params. Return true on success. - -**Modifiers:** `inline` `virtual` - -#### Signature - -```cpp -bool setup(const json & params) -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/datasphere_serverless.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datasphere_serverless.cpp) - -Line 19. - -*** - -### skill\_description - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_description() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/builtin/datasphere_serverless.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datasphere_serverless.cpp) - -Line 14. - -*** - -### skill\_name - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_name() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/builtin/datasphere_serverless.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datasphere_serverless.cpp) - -Line 13. - -*** - -### supports\_multiple\_instances - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -bool supports_multiple_instances() const -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/datasphere_serverless.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datasphere_serverless.cpp) - -Line 17. - -## Source - -[`src/skills/builtin/datasphere_serverless.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datasphere_serverless.cpp) - -Line 11. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/datasphere-skill-r/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/datasphere-skill-r/index.mdx deleted file mode 100644 index 316baf75c5..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/skills/datasphere-skill-r/index.mdx +++ /dev/null @@ -1,174 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/skills/datasphere-skill-r" -title: "DatasphereSkillR" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::skills::DatasphereSkillR" - parent: "signalwire::skills" - module: "signalwire.skills" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp" - visibility: "public" ---- -# `DatasphereSkillR` - -## Signature - -```cpp -class signalwire::skills::DatasphereSkillR : signalwire::skills::SkillBase -``` - -## Inheritance - -**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base) - -## Methods - -### get\_global\_data - -Get global data to merge into agent. - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -json get_global_data() const -``` - -#### Returns - -`json` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 391. - -*** - -### register\_tools - -Register tools with the agent. Returns tool definitions. - -**Modifiers:** `inline` `virtual` - -#### Signature - -```cpp -std::vector< swaig::ToolDefinition > register_tools() -``` - -#### Returns - -`std::vector< swaig::ToolDefinition >` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 333. - -*** - -### setup - -Initialize the skill with given params. Return true on success. - -**Modifiers:** `inline` `virtual` - -#### Signature - -```cpp -bool setup(const json & params) -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 321. - -*** - -### skill\_description - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_description() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 319. - -*** - -### skill\_name - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_name() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 318. - -*** - -### supports\_multiple\_instances - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -bool supports_multiple_instances() const -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 320. - -## Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 313. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/datasphere-skill/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/datasphere-skill/index.mdx deleted file mode 100644 index 652e364789..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/skills/datasphere-skill/index.mdx +++ /dev/null @@ -1,201 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/skills/datasphere-skill" -title: "DatasphereSkill" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::skills::DatasphereSkill" - parent: "signalwire::skills" - module: "signalwire.skills" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datasphere.cpp" - visibility: "public" ---- -# `DatasphereSkill` - -SignalWire DataSphere RAG search skill — issues a real POST against the DataSphere /api/datasphere/documents/\{document\_id\}/search endpoint with the user query in the JSON body, parses the results\[] array, and returns a flattened text summary. Matches the Python DatasphereSkill upstream-call shape. -DATASPHERE\_BASE\_URL env var overrides the upstream URL (used by audit\_skills\_dispatch.py); when unset, the real upstream is built from space\_name (https://\{space\}.signalwire.com). - -## Signature - -```cpp -class signalwire::skills::DatasphereSkill : signalwire::skills::SkillBase -``` - -## Inheritance - -**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base) - -## Methods - -### get\_global\_data - -Get global data to merge into agent. - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -json get_global_data() const -``` - -#### Returns - -`json` - -#### Source - -[`src/skills/builtin/datasphere.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datasphere.cpp) - -Line 106. - -*** - -### get\_prompt\_sections - -Get prompt sections to inject into agent. - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::vector< SkillPromptSection > get_prompt_sections() const -``` - -#### Returns - -`std::vector< SkillPromptSection >` - -#### Source - -[`src/skills/builtin/datasphere.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datasphere.cpp) - -Line 99. - -*** - -### register\_tools - -Register tools with the agent. Returns tool definitions. - -**Modifiers:** `inline` `virtual` - -#### Signature - -```cpp -std::vector< swaig::ToolDefinition > register_tools() -``` - -#### Returns - -`std::vector< swaig::ToolDefinition >` - -#### Source - -[`src/skills/builtin/datasphere.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datasphere.cpp) - -Line 42. - -*** - -### setup - -Initialize the skill with given params. Return true on success. - -**Modifiers:** `inline` `virtual` - -#### Signature - -```cpp -bool setup(const json & params) -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/datasphere.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datasphere.cpp) - -Line 30. - -*** - -### skill\_description - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_description() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/builtin/datasphere.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datasphere.cpp) - -Line 25. - -*** - -### skill\_name - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_name() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/builtin/datasphere.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datasphere.cpp) - -Line 24. - -*** - -### supports\_multiple\_instances - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -bool supports_multiple_instances() const -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/datasphere.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datasphere.cpp) - -Line 28. - -## Source - -[`src/skills/builtin/datasphere.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datasphere.cpp) - -Line 22. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/date-time-skill/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/date-time-skill/index.mdx deleted file mode 100644 index d48cad68e5..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/skills/date-time-skill/index.mdx +++ /dev/null @@ -1,174 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/skills/date-time-skill" -title: "DateTimeSkill" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::skills::DateTimeSkill" - parent: "signalwire::skills" - module: "signalwire.skills" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datetime.cpp" - visibility: "public" ---- -# `DateTimeSkill` - -## Signature - -```cpp -class signalwire::skills::DateTimeSkill : signalwire::skills::SkillBase, signalwire::skills::SkillBase -``` - -## Inheritance - -**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base), [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base) - -## Methods - -### get\_prompt\_sections - -Get prompt sections to inject into agent. - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::vector< SkillPromptSection > get_prompt_sections() const -``` - -#### Returns - -`std::vector< SkillPromptSection >` - -#### Source - -[`src/skills/builtin/datetime.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datetime.cpp) - -Line 74. - -*** - -### register\_tools - -Register tools with the agent. Returns tool definitions. - -**Modifiers:** `inline` `virtual` - -#### Signature - -```cpp -std::vector< swaig::ToolDefinition > register_tools() -``` - -#### Returns - -`std::vector< swaig::ToolDefinition >` - -#### Source - -[`src/skills/builtin/datetime.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datetime.cpp) - -Line 24. - -*** - -### setup - -Initialize the skill with given params. Return true on success. - -**Modifiers:** `inline` `virtual` - -#### Signature - -```cpp -bool setup(const json & params) -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/datetime.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datetime.cpp) - -Line 19. - -*** - -### skill\_description - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_description() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/builtin/datetime.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datetime.cpp) - -Line 16. - -*** - -### skill\_name - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_name() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/builtin/datetime.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datetime.cpp) - -Line 15. - -*** - -### supports\_multiple\_instances - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -bool supports_multiple_instances() const -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/datetime.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datetime.cpp) - -Line 17. - -## Source - -[`src/skills/builtin/datetime.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/datetime.cpp) - -Line 13. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/google-maps-skill-r/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/google-maps-skill-r/index.mdx deleted file mode 100644 index 4daa7a8952..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/skills/google-maps-skill-r/index.mdx +++ /dev/null @@ -1,152 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/skills/google-maps-skill-r" -title: "GoogleMapsSkillR" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::skills::GoogleMapsSkillR" - parent: "signalwire::skills" - module: "signalwire.skills" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp" - visibility: "public" ---- -# `GoogleMapsSkillR` - -## Signature - -```cpp -class signalwire::skills::GoogleMapsSkillR : signalwire::skills::SkillBase -``` - -## Inheritance - -**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base) - -## Methods - -### get\_hints - -Get speech recognition hints to merge into agent. - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::vector< std::string > get_hints() const -``` - -#### Returns - -`std::vector< std::string >` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 243. - -*** - -### register\_tools - -Register tools with the agent. Returns tool definitions. - -**Modifiers:** `inline` `virtual` - -#### Signature - -```cpp -std::vector< swaig::ToolDefinition > register_tools() -``` - -#### Returns - -`std::vector< swaig::ToolDefinition >` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 243. - -*** - -### setup - -Initialize the skill with given params. Return true on success. - -**Modifiers:** `inline` `virtual` - -#### Signature - -```cpp -bool setup(const json & params) -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 243. - -*** - -### skill\_description - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_description() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 243. - -*** - -### skill\_name - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_name() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 243. - -## Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 243. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/google-maps-skill/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/google-maps-skill/index.mdx deleted file mode 100644 index b30b2a8871..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/skills/google-maps-skill/index.mdx +++ /dev/null @@ -1,176 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/skills/google-maps-skill" -title: "GoogleMapsSkill" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::skills::GoogleMapsSkill" - parent: "signalwire::skills" - module: "signalwire.skills" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/google_maps.cpp" - visibility: "public" ---- -# `GoogleMapsSkill` - -## Signature - -```cpp -class signalwire::skills::GoogleMapsSkill : signalwire::skills::SkillBase -``` - -## Inheritance - -**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base) - -## Methods - -### get\_hints - -Get speech recognition hints to merge into agent. - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::vector< std::string > get_hints() const -``` - -#### Returns - -`std::vector< std::string >` - -#### Source - -[`src/skills/builtin/google_maps.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/google_maps.cpp) - -Line 53. - -*** - -### get\_prompt\_sections - -Get prompt sections to inject into agent. - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::vector< SkillPromptSection > get_prompt_sections() const -``` - -#### Returns - -`std::vector< SkillPromptSection >` - -#### Source - -[`src/skills/builtin/google_maps.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/google_maps.cpp) - -Line 57. - -*** - -### register\_tools - -Register tools with the agent. Returns tool definitions. - -**Modifiers:** `inline` `virtual` - -#### Signature - -```cpp -std::vector< swaig::ToolDefinition > register_tools() -``` - -#### Returns - -`std::vector< swaig::ToolDefinition >` - -#### Source - -[`src/skills/builtin/google_maps.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/google_maps.cpp) - -Line 24. - -*** - -### setup - -Initialize the skill with given params. Return true on success. - -**Modifiers:** `inline` `virtual` - -#### Signature - -```cpp -bool setup(const json & params) -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/google_maps.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/google_maps.cpp) - -Line 16. - -*** - -### skill\_description - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_description() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/builtin/google_maps.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/google_maps.cpp) - -Line 12. - -*** - -### skill\_name - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_name() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/builtin/google_maps.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/google_maps.cpp) - -Line 11. - -## Source - -[`src/skills/builtin/google_maps.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/google_maps.cpp) - -Line 9. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/index.mdx deleted file mode 100644 index fc1e4c2be2..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/skills/index.mdx +++ /dev/null @@ -1,413 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/skills" -title: "skills" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "module" - language: "cpp" - qualified_name: "signalwire::skills" - parent: "signalwire" - module: "signalwire" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp" ---- -# `skills` - -## Signature - -```cpp -namespace signalwire::skills -``` - -## Classes - - - - - - - - - - - - - - - - - - - - SignalWire DataSphere RAG search skill — issues a real POST against the DataSphere /api/datasphere/documents/\{document\_id\}/search endpoint with the user query in the JSON body, parses the results\[] array, and returns a flattened text summary. Matches the Python DatasphereSkill upstream-call shape. DATASPHERE\_BASE\_URL env var overrides the upstream URL (used by audit\_skills\_dispatch.py); when unset, the real upstream is built from space\_name (https://\{space\}.signalwire.com). - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Abstract base class for all skills. - - - - Result of a skill HTTP request. status is the HTTP status code (0 indicates a transport-level error — connection refused, DNS, etc.). body is the raw response body. error is non-empty when status is 0. - - - - Manages skill lifecycle: creation, setup, registration with agents. - - - - POM section for skill prompts. - - - - Global registry of skill factories. - - - - Spider scrape skill — issues a real GET against the URL the LLM passes in. Strips HTML tags from the response and returns the text payload. Matches Python SpiderSkill's scrape\_url behavior. SPIDER\_BASE\_URL env var overrides the host portion of the URL the caller passes in (used by audit\_skills\_dispatch.py to redirect scrape requests at a loopback fixture). - - - - - - - - - - - - - - Google Custom Search API skill — issues a real GET against Google's customsearch/v1 endpoint, parses the items\[] results, and returns a human-readable summary. Matches Python's WebSearchSkill behavior. Configuration: api\_key (or env GOOGLE\_SEARCH\_API\_KEY / GOOGLE\_API\_KEY) search\_engine\_id (or env GOOGLE\_SEARCH\_ENGINE\_ID / GOOGLE\_CSE\_ID) num\_results (default 3) tool\_name (default "web\_search") WEB\_SEARCH\_BASE\_URL env var overrides the upstream URL (used by audit\_skills\_dispatch.py to point the skill at a fixture) - - - - - - Wikipedia search skill — issues a real GET against the Wikipedia API /w/api.php endpoint with action=query\&list=search, parses the query.search\[] results, and returns titles + snippets. Matches the Python WikipediaSearchSkill upstream call shape. WIKIPEDIA\_BASE\_URL env var overrides the API root (used by audit\_skills\_dispatch.py to point the skill at its loopback fixture). - - - - - -## Modules - - - - - -## Functions - -### ensure\_builtin\_skills\_registered - -Ensure all built-in skills are registered. Called automatically but can be called explicitly to force linkage. - -#### Signature - -```cpp -void ensure_builtin_skills_registered() -``` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 443. - -*** - -### http\_get - -Issue a real HTTP GET. Implementation uses cpp-httplib so it works against any plain-HTTP host (including loopback fixtures used by the audit\_skills\_dispatch.py audit). Skills that need TLS to reach production upstreams set the appropriate base-URL env var (e.g. WEB\_SEARCH\_BASE\_URL) — production deployments point at TLS proxies or a dev-side rewriter; the SDK keeps its transport stack OpenSSL-3 independent until the wider port adopts it. - -#### Signature - -```cpp -SkillHttpResponse http_get( - const std::string & url, - const std::map< std::string, std::string > & headers = {}, - int timeout_seconds = 10 -) -``` - -#### Parameters - - - - - - - -#### Returns - -`SkillHttpResponse` - -#### Source - -[`src/skills/skills_http.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skills_http.cpp) - -Line 55. - -*** - -### http\_get\_ms - -Millisecond-precision variant of http\_get. The connection and read timeouts are both bound to timeout\_ms. Needed by web\_search's per\_page\_timeout, which is a sub-second float in the common case (default 2.0s, but configurable below 1s) — the integer-second http\_get truncates a 0.3s budget to 0 and httplib treats a zero timeout as "no -wait", which would defeat the bound. A non-positive timeout\_ms falls back to a 10s default so a misconfiguration can never produce an unbounded fetch. - -#### Signature - -```cpp -SkillHttpResponse http_get_ms( - const std::string & url, - const std::map< std::string, std::string > & headers, - long timeout_ms -) -``` - -#### Parameters - - - - - - - -#### Returns - -`SkillHttpResponse` - -#### Source - -[`src/skills/skills_http.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skills_http.cpp) - -Line 87. - -*** - -### http\_post - -Issue a real HTTP POST with body as the request body and content\_type for Content-Type. Same semantics as http\_get for status / error / body. - -#### Signature - -```cpp -SkillHttpResponse http_post( - const std::string & url, - const std::string & body, - const std::string & content_type = "application/json", - const std::map< std::string, std::string > & headers = {}, - int timeout_seconds = 10 -) -``` - -#### Parameters - - - - - - - - - - - -#### Returns - -`SkillHttpResponse` - -#### Source - -[`src/skills/skills_http.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skills_http.cpp) - -Line 123. - -*** - -### skill\_name\_value - -Map a SkillName to its canonical wire string (the value a built-in skill reports from skill\_name()). This is the single normalization point shared by the typed add\_skill/remove\_skill/has\_skill overloads, so their behavior is identical to passing the bare string. - -**Modifiers:** `inline` - -#### Signature - -```cpp -std::string skill_name_value(SkillName name) -``` - -#### Parameters - - - -#### Returns - -`std::string` - -#### Source - -[`include/signalwire/skills/skill_name.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_name.hpp) - -Line 51. - -*** - -### to\_string - -to\_string overload so SkillName interoperates with ADL-based stringification the same way skill\_name\_value() does. - -**Modifiers:** `inline` - -#### Signature - -```cpp -std::string to_string(SkillName name) -``` - -#### Parameters - - - -#### Returns - -`std::string` - -#### Source - -[`include/signalwire/skills/skill_name.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_name.hpp) - -Line 77. - -## Type Aliases - -### json - -#### Signature - -```cpp -typedef nlohmann::json json -``` - -#### Source - -[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) - -Line 16. - -*** - -### SkillFactory - -Factory function type for creating skill instances. - -#### Signature - -```cpp -typedef std::function< std::unique_ptr< SkillBase >()> SkillFactory -``` - -#### Source - -[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) - -Line 118. - -## Enums - -### SkillName - -Built-in skill names as a typed, compile-time-checked closed set. -AgentBase::add\_skill() (and remove\_skill() / has\_skill()) accept this enum class OR a std::string. The enum gives editor autocompletion and makes a typo fail at the call site — a bare string like "datetiem" only fails at runtime, on the server. The string overload keeps parity with the Python reference (which uses a bare str) and still allows custom / third-party skills that aren't built in. agent.add\_skill(SkillName::Datetime); // typed, autocompleted -agent.add\_skill("datetime"); // string still works (parity) -agent.add\_skill("my\_custom\_skill"); // open set: custom skills ok - -Members mirror the 18 built-in skills' registered skill\_name() values (the canonical wire strings). skill\_name\_value() maps each member to that wire string, so the enum and string overloads load the identical skill. - -#### Signature - -```cpp -enum class SkillName -``` - -#### Variants - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -#### Source - -[`include/signalwire/skills/skill_name.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_name.hpp) - -Line 26. - -## Source - -[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) - -Line 14. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/info-gatherer-skill-r/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/info-gatherer-skill-r/index.mdx deleted file mode 100644 index a4acad69cb..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/skills/info-gatherer-skill-r/index.mdx +++ /dev/null @@ -1,174 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/skills/info-gatherer-skill-r" -title: "InfoGathererSkillR" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::skills::InfoGathererSkillR" - parent: "signalwire::skills" - module: "signalwire.skills" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp" - visibility: "public" ---- -# `InfoGathererSkillR` - -## Signature - -```cpp -class signalwire::skills::InfoGathererSkillR : signalwire::skills::SkillBase -``` - -## Inheritance - -**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base) - -## Methods - -### get\_instance\_key - -Get instance key for multi-instance skills. - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string get_instance_key() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 404. - -*** - -### register\_tools - -Register tools with the agent. Returns tool definitions. - -**Modifiers:** `inline` `virtual` - -#### Signature - -```cpp -std::vector< swaig::ToolDefinition > register_tools() -``` - -#### Returns - -`std::vector< swaig::ToolDefinition >` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 404. - -*** - -### setup - -Initialize the skill with given params. Return true on success. - -**Modifiers:** `inline` `virtual` - -#### Signature - -```cpp -bool setup(const json & params) -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 404. - -*** - -### skill\_description - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_description() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 404. - -*** - -### skill\_name - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_name() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 404. - -*** - -### supports\_multiple\_instances - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -bool supports_multiple_instances() const -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 404. - -## Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 404. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/info-gatherer-skill/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/info-gatherer-skill/index.mdx deleted file mode 100644 index 4e447c5676..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/skills/info-gatherer-skill/index.mdx +++ /dev/null @@ -1,222 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/skills/info-gatherer-skill" -title: "InfoGathererSkill" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::skills::InfoGathererSkill" - parent: "signalwire::skills" - module: "signalwire.skills" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/info_gatherer.cpp" - visibility: "public" ---- -# `InfoGathererSkill` - -## Signature - -```cpp -class signalwire::skills::InfoGathererSkill : signalwire::skills::SkillBase -``` - -## Inheritance - -**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base) - -## Methods - -### get\_global\_data - -Get global data to merge into agent. - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -json get_global_data() const -``` - -#### Returns - -`json` - -#### Source - -[`src/skills/builtin/info_gatherer.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/info_gatherer.cpp) - -Line 110. - -*** - -### get\_instance\_key - -Get instance key for multi-instance skills. - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string get_instance_key() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/builtin/info_gatherer.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/info_gatherer.cpp) - -Line 131. - -*** - -### get\_prompt\_sections - -Get prompt sections to inject into agent. - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::vector< SkillPromptSection > get_prompt_sections() const -``` - -#### Returns - -`std::vector< SkillPromptSection >` - -#### Source - -[`src/skills/builtin/info_gatherer.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/info_gatherer.cpp) - -Line 122. - -*** - -### register\_tools - -Register tools with the agent. Returns tool definitions. - -**Modifiers:** `inline` `virtual` - -#### Signature - -```cpp -std::vector< swaig::ToolDefinition > register_tools() -``` - -#### Returns - -`std::vector< swaig::ToolDefinition >` - -#### Source - -[`src/skills/builtin/info_gatherer.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/info_gatherer.cpp) - -Line 25. - -*** - -### setup - -Initialize the skill with given params. Return true on success. - -**Modifiers:** `inline` `virtual` - -#### Signature - -```cpp -bool setup(const json & params) -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/info_gatherer.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/info_gatherer.cpp) - -Line 17. - -*** - -### skill\_description - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_description() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/builtin/info_gatherer.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/info_gatherer.cpp) - -Line 12. - -*** - -### skill\_name - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_name() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/builtin/info_gatherer.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/info_gatherer.cpp) - -Line 11. - -*** - -### supports\_multiple\_instances - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -bool supports_multiple_instances() const -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/info_gatherer.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/info_gatherer.cpp) - -Line 15. - -## Source - -[`src/skills/builtin/info_gatherer.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/info_gatherer.cpp) - -Line 9. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/joke-skill-r/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/joke-skill-r/index.mdx deleted file mode 100644 index fe0b678076..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/skills/joke-skill-r/index.mdx +++ /dev/null @@ -1,200 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/skills/joke-skill-r" -title: "JokeSkillR" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::skills::JokeSkillR" - parent: "signalwire::skills" - module: "signalwire.skills" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp" - visibility: "public" ---- -# `JokeSkillR` - -## Signature - -```cpp -class signalwire::skills::JokeSkillR : signalwire::skills::SkillBase -``` - -## Inheritance - -**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base) - -## Methods - -### get\_datamap\_functions - -Get SWAIG DataMap functions (for DataMap-based skills). - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::vector< json > get_datamap_functions() const -``` - -#### Returns - -`std::vector< json >` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 73. - -*** - -### get\_global\_data - -Get global data to merge into agent. - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -json get_global_data() const -``` - -#### Returns - -`json` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 75. - -*** - -### get\_prompt\_sections - -Get prompt sections to inject into agent. - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::vector< SkillPromptSection > get_prompt_sections() const -``` - -#### Returns - -`std::vector< SkillPromptSection >` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 74. - -*** - -### register\_tools - -Register tools with the agent. Returns tool definitions. - -**Modifiers:** `inline` `virtual` - -#### Signature - -```cpp -std::vector< swaig::ToolDefinition > register_tools() -``` - -#### Returns - -`std::vector< swaig::ToolDefinition >` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 72. - -*** - -### setup - -Initialize the skill with given params. Return true on success. - -**Modifiers:** `inline` `virtual` - -#### Signature - -```cpp -bool setup(const json & params) -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 71. - -*** - -### skill\_description - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_description() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 70. - -*** - -### skill\_name - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_name() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 69. - -## Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 66. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/joke-skill/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/joke-skill/index.mdx deleted file mode 100644 index e49bfe374c..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/skills/joke-skill/index.mdx +++ /dev/null @@ -1,200 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/skills/joke-skill" -title: "JokeSkill" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::skills::JokeSkill" - parent: "signalwire::skills" - module: "signalwire.skills" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/joke.cpp" - visibility: "public" ---- -# `JokeSkill` - -## Signature - -```cpp -class signalwire::skills::JokeSkill : signalwire::skills::SkillBase -``` - -## Inheritance - -**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base) - -## Methods - -### get\_datamap\_functions - -Get SWAIG DataMap functions (for DataMap-based skills). - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::vector< json > get_datamap_functions() const -``` - -#### Returns - -`std::vector< json >` - -#### Source - -[`src/skills/builtin/joke.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/joke.cpp) - -Line 24. - -*** - -### get\_global\_data - -Get global data to merge into agent. - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -json get_global_data() const -``` - -#### Returns - -`json` - -#### Source - -[`src/skills/builtin/joke.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/joke.cpp) - -Line 41. - -*** - -### get\_prompt\_sections - -Get prompt sections to inject into agent. - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::vector< SkillPromptSection > get_prompt_sections() const -``` - -#### Returns - -`std::vector< SkillPromptSection >` - -#### Source - -[`src/skills/builtin/joke.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/joke.cpp) - -Line 36. - -*** - -### register\_tools - -Register tools with the agent. Returns tool definitions. - -**Modifiers:** `inline` `virtual` - -#### Signature - -```cpp -std::vector< swaig::ToolDefinition > register_tools() -``` - -#### Returns - -`std::vector< swaig::ToolDefinition >` - -#### Source - -[`src/skills/builtin/joke.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/joke.cpp) - -Line 22. - -*** - -### setup - -Initialize the skill with given params. Return true on success. - -**Modifiers:** `inline` `virtual` - -#### Signature - -```cpp -bool setup(const json & params) -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/joke.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/joke.cpp) - -Line 15. - -*** - -### skill\_description - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_description() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/builtin/joke.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/joke.cpp) - -Line 13. - -*** - -### skill\_name - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_name() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/builtin/joke.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/joke.cpp) - -Line 12. - -## Source - -[`src/skills/builtin/joke.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/joke.cpp) - -Line 10. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/math-skill-r/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/math-skill-r/index.mdx deleted file mode 100644 index 3155823be8..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/skills/math-skill-r/index.mdx +++ /dev/null @@ -1,152 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/skills/math-skill-r" -title: "MathSkillR" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::skills::MathSkillR" - parent: "signalwire::skills" - module: "signalwire.skills" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp" - visibility: "public" ---- -# `MathSkillR` - -## Signature - -```cpp -class signalwire::skills::MathSkillR : signalwire::skills::SkillBase -``` - -## Inheritance - -**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base) - -## Methods - -### get\_prompt\_sections - -Get prompt sections to inject into agent. - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::vector< SkillPromptSection > get_prompt_sections() const -``` - -#### Returns - -`std::vector< SkillPromptSection >` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 62. - -*** - -### register\_tools - -Register tools with the agent. Returns tool definitions. - -**Modifiers:** `inline` `virtual` - -#### Signature - -```cpp -std::vector< swaig::ToolDefinition > register_tools() -``` - -#### Returns - -`std::vector< swaig::ToolDefinition >` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 58. - -*** - -### setup - -Initialize the skill with given params. Return true on success. - -**Modifiers:** `inline` `virtual` - -#### Signature - -```cpp -bool setup(const json & params) -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 57. - -*** - -### skill\_description - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_description() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 56. - -*** - -### skill\_name - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_name() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 55. - -## Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 41. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/math-skill/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/math-skill/index.mdx deleted file mode 100644 index a74e58b0bd..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/skills/math-skill/index.mdx +++ /dev/null @@ -1,174 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/skills/math-skill" -title: "MathSkill" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::skills::MathSkill" - parent: "signalwire::skills" - module: "signalwire.skills" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/math.cpp" - visibility: "public" ---- -# `MathSkill` - -## Signature - -```cpp -class signalwire::skills::MathSkill : signalwire::skills::SkillBase -``` - -## Inheritance - -**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base) - -## Methods - -### get\_prompt\_sections - -Get prompt sections to inject into agent. - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::vector< SkillPromptSection > get_prompt_sections() const -``` - -#### Returns - -`std::vector< SkillPromptSection >` - -#### Source - -[`src/skills/builtin/math.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/math.cpp) - -Line 139. - -*** - -### register\_tools - -Register tools with the agent. Returns tool definitions. - -**Modifiers:** `inline` `virtual` - -#### Signature - -```cpp -std::vector< swaig::ToolDefinition > register_tools() -``` - -#### Returns - -`std::vector< swaig::ToolDefinition >` - -#### Source - -[`src/skills/builtin/math.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/math.cpp) - -Line 108. - -*** - -### setup - -Initialize the skill with given params. Return true on success. - -**Modifiers:** `inline` `virtual` - -#### Signature - -```cpp -bool setup(const json & params) -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/math.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/math.cpp) - -Line 106. - -*** - -### skill\_description - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_description() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/builtin/math.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/math.cpp) - -Line 103. - -*** - -### skill\_name - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_name() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/builtin/math.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/math.cpp) - -Line 102. - -*** - -### supports\_multiple\_instances - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -bool supports_multiple_instances() const -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/math.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/math.cpp) - -Line 104. - -## Source - -[`src/skills/builtin/math.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/math.cpp) - -Line 100. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/mcp-gateway-skill-r/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/mcp-gateway-skill-r/index.mdx deleted file mode 100644 index f194bb1765..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/skills/mcp-gateway-skill-r/index.mdx +++ /dev/null @@ -1,152 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/skills/mcp-gateway-skill-r" -title: "McpGatewaySkillR" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::skills::McpGatewaySkillR" - parent: "signalwire::skills" - module: "signalwire.skills" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp" - visibility: "public" ---- -# `McpGatewaySkillR` - -## Signature - -```cpp -class signalwire::skills::McpGatewaySkillR : signalwire::skills::SkillBase -``` - -## Inheritance - -**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base) - -## Methods - -### get\_hints - -Get speech recognition hints to merge into agent. - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::vector< std::string > get_hints() const -``` - -#### Returns - -`std::vector< std::string >` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 408. - -*** - -### register\_tools - -Register tools with the agent. Returns tool definitions. - -**Modifiers:** `inline` `virtual` - -#### Signature - -```cpp -std::vector< swaig::ToolDefinition > register_tools() -``` - -#### Returns - -`std::vector< swaig::ToolDefinition >` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 408. - -*** - -### setup - -Initialize the skill with given params. Return true on success. - -**Modifiers:** `inline` `virtual` - -#### Signature - -```cpp -bool setup(const json & params) -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 408. - -*** - -### skill\_description - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_description() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 408. - -*** - -### skill\_name - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_name() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 408. - -## Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 408. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/mcp-gateway-skill/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/mcp-gateway-skill/index.mdx deleted file mode 100644 index b52047d7b0..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/skills/mcp-gateway-skill/index.mdx +++ /dev/null @@ -1,200 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/skills/mcp-gateway-skill" -title: "McpGatewaySkill" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::skills::McpGatewaySkill" - parent: "signalwire::skills" - module: "signalwire.skills" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/mcp_gateway.cpp" - visibility: "public" ---- -# `McpGatewaySkill` - -## Signature - -```cpp -class signalwire::skills::McpGatewaySkill : signalwire::skills::SkillBase -``` - -## Inheritance - -**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base) - -## Methods - -### get\_global\_data - -Get global data to merge into agent. - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -json get_global_data() const -``` - -#### Returns - -`json` - -#### Source - -[`src/skills/builtin/mcp_gateway.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/mcp_gateway.cpp) - -Line 55. - -*** - -### get\_hints - -Get speech recognition hints to merge into agent. - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::vector< std::string > get_hints() const -``` - -#### Returns - -`std::vector< std::string >` - -#### Source - -[`src/skills/builtin/mcp_gateway.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/mcp_gateway.cpp) - -Line 45. - -*** - -### get\_prompt\_sections - -Get prompt sections to inject into agent. - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::vector< SkillPromptSection > get_prompt_sections() const -``` - -#### Returns - -`std::vector< SkillPromptSection >` - -#### Source - -[`src/skills/builtin/mcp_gateway.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/mcp_gateway.cpp) - -Line 69. - -*** - -### register\_tools - -Register tools with the agent. Returns tool definitions. - -**Modifiers:** `inline` `virtual` - -#### Signature - -```cpp -std::vector< swaig::ToolDefinition > register_tools() -``` - -#### Returns - -`std::vector< swaig::ToolDefinition >` - -#### Source - -[`src/skills/builtin/mcp_gateway.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/mcp_gateway.cpp) - -Line 21. - -*** - -### setup - -Initialize the skill with given params. Return true on success. - -**Modifiers:** `inline` `virtual` - -#### Signature - -```cpp -bool setup(const json & params) -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/mcp_gateway.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/mcp_gateway.cpp) - -Line 14. - -*** - -### skill\_description - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_description() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/builtin/mcp_gateway.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/mcp_gateway.cpp) - -Line 12. - -*** - -### skill\_name - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_name() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/builtin/mcp_gateway.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/mcp_gateway.cpp) - -Line 11. - -## Source - -[`src/skills/builtin/mcp_gateway.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/mcp_gateway.cpp) - -Line 9. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/native-vector-search-skill-r/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/native-vector-search-skill-r/index.mdx deleted file mode 100644 index 20bd7743b7..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/skills/native-vector-search-skill-r/index.mdx +++ /dev/null @@ -1,174 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/skills/native-vector-search-skill-r" -title: "NativeVectorSearchSkillR" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::skills::NativeVectorSearchSkillR" - parent: "signalwire::skills" - module: "signalwire.skills" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp" - visibility: "public" ---- -# `NativeVectorSearchSkillR` - -## Signature - -```cpp -class signalwire::skills::NativeVectorSearchSkillR : signalwire::skills::SkillBase -``` - -## Inheritance - -**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base) - -## Methods - -### get\_hints - -Get speech recognition hints to merge into agent. - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::vector< std::string > get_hints() const -``` - -#### Returns - -`std::vector< std::string >` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 402. - -*** - -### register\_tools - -Register tools with the agent. Returns tool definitions. - -**Modifiers:** `inline` `virtual` - -#### Signature - -```cpp -std::vector< swaig::ToolDefinition > register_tools() -``` - -#### Returns - -`std::vector< swaig::ToolDefinition >` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 402. - -*** - -### setup - -Initialize the skill with given params. Return true on success. - -**Modifiers:** `inline` `virtual` - -#### Signature - -```cpp -bool setup(const json & params) -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 402. - -*** - -### skill\_description - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_description() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 402. - -*** - -### skill\_name - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_name() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 402. - -*** - -### supports\_multiple\_instances - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -bool supports_multiple_instances() const -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 402. - -## Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 402. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/native-vector-search-skill/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/native-vector-search-skill/index.mdx deleted file mode 100644 index 57493844ad..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/skills/native-vector-search-skill/index.mdx +++ /dev/null @@ -1,174 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/skills/native-vector-search-skill" -title: "NativeVectorSearchSkill" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::skills::NativeVectorSearchSkill" - parent: "signalwire::skills" - module: "signalwire.skills" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/native_vector_search.cpp" - visibility: "public" ---- -# `NativeVectorSearchSkill` - -## Signature - -```cpp -class signalwire::skills::NativeVectorSearchSkill : signalwire::skills::SkillBase -``` - -## Inheritance - -**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base) - -## Methods - -### get\_hints - -Get speech recognition hints to merge into agent. - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::vector< std::string > get_hints() const -``` - -#### Returns - -`std::vector< std::string >` - -#### Source - -[`src/skills/builtin/native_vector_search.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/native_vector_search.cpp) - -Line 44. - -*** - -### register\_tools - -Register tools with the agent. Returns tool definitions. - -**Modifiers:** `inline` `virtual` - -#### Signature - -```cpp -std::vector< swaig::ToolDefinition > register_tools() -``` - -#### Returns - -`std::vector< swaig::ToolDefinition >` - -#### Source - -[`src/skills/builtin/native_vector_search.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/native_vector_search.cpp) - -Line 27. - -*** - -### setup - -Initialize the skill with given params. Return true on success. - -**Modifiers:** `inline` `virtual` - -#### Signature - -```cpp -bool setup(const json & params) -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/native_vector_search.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/native_vector_search.cpp) - -Line 17. - -*** - -### skill\_description - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_description() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/builtin/native_vector_search.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/native_vector_search.cpp) - -Line 12. - -*** - -### skill\_name - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_name() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/builtin/native_vector_search.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/native_vector_search.cpp) - -Line 11. - -*** - -### supports\_multiple\_instances - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -bool supports_multiple_instances() const -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/native_vector_search.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/native_vector_search.cpp) - -Line 15. - -## Source - -[`src/skills/builtin/native_vector_search.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/native_vector_search.cpp) - -Line 9. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/play-background-file-skill-r/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/play-background-file-skill-r/index.mdx deleted file mode 100644 index 888a68ddd0..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/skills/play-background-file-skill-r/index.mdx +++ /dev/null @@ -1,174 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/skills/play-background-file-skill-r" -title: "PlayBackgroundFileSkillR" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::skills::PlayBackgroundFileSkillR" - parent: "signalwire::skills" - module: "signalwire.skills" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp" - visibility: "public" ---- -# `PlayBackgroundFileSkillR` - -## Signature - -```cpp -class signalwire::skills::PlayBackgroundFileSkillR : signalwire::skills::SkillBase -``` - -## Inheritance - -**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base) - -## Methods - -### get\_datamap\_functions - -Get SWAIG DataMap functions (for DataMap-based skills). - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::vector< json > get_datamap_functions() const -``` - -#### Returns - -`std::vector< json >` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 398. - -*** - -### register\_tools - -Register tools with the agent. Returns tool definitions. - -**Modifiers:** `inline` `virtual` - -#### Signature - -```cpp -std::vector< swaig::ToolDefinition > register_tools() -``` - -#### Returns - -`std::vector< swaig::ToolDefinition >` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 398. - -*** - -### setup - -Initialize the skill with given params. Return true on success. - -**Modifiers:** `inline` `virtual` - -#### Signature - -```cpp -bool setup(const json & params) -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 398. - -*** - -### skill\_description - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_description() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 398. - -*** - -### skill\_name - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_name() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 398. - -*** - -### supports\_multiple\_instances - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -bool supports_multiple_instances() const -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 398. - -## Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 398. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/play-background-file-skill/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/play-background-file-skill/index.mdx deleted file mode 100644 index edef76cd8d..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/skills/play-background-file-skill/index.mdx +++ /dev/null @@ -1,174 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/skills/play-background-file-skill" -title: "PlayBackgroundFileSkill" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::skills::PlayBackgroundFileSkill" - parent: "signalwire::skills" - module: "signalwire.skills" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/play_background_file.cpp" - visibility: "public" ---- -# `PlayBackgroundFileSkill` - -## Signature - -```cpp -class signalwire::skills::PlayBackgroundFileSkill : signalwire::skills::SkillBase -``` - -## Inheritance - -**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base) - -## Methods - -### get\_datamap\_functions - -Get SWAIG DataMap functions (for DataMap-based skills). - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::vector< json > get_datamap_functions() const -``` - -#### Returns - -`std::vector< json >` - -#### Source - -[`src/skills/builtin/play_background_file.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/play_background_file.cpp) - -Line 24. - -*** - -### register\_tools - -Register tools with the agent. Returns tool definitions. - -**Modifiers:** `inline` `virtual` - -#### Signature - -```cpp -std::vector< swaig::ToolDefinition > register_tools() -``` - -#### Returns - -`std::vector< swaig::ToolDefinition >` - -#### Source - -[`src/skills/builtin/play_background_file.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/play_background_file.cpp) - -Line 22. - -*** - -### setup - -Initialize the skill with given params. Return true on success. - -**Modifiers:** `inline` `virtual` - -#### Signature - -```cpp -bool setup(const json & params) -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/play_background_file.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/play_background_file.cpp) - -Line 16. - -*** - -### skill\_description - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_description() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/builtin/play_background_file.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/play_background_file.cpp) - -Line 13. - -*** - -### skill\_name - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_name() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/builtin/play_background_file.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/play_background_file.cpp) - -Line 12. - -*** - -### supports\_multiple\_instances - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -bool supports_multiple_instances() const -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/play_background_file.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/play_background_file.cpp) - -Line 14. - -## Source - -[`src/skills/builtin/play_background_file.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/play_background_file.cpp) - -Line 10. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/skill-base/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/skill-base/index.mdx deleted file mode 100644 index a6f08181ec..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/skills/skill-base/index.mdx +++ /dev/null @@ -1,518 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/skills/skill-base" -title: "SkillBase" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::skills::SkillBase" - parent: "signalwire::skills" - module: "signalwire.skills" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp" - visibility: "public" ---- -# `SkillBase` - -Abstract base class for all skills. - -## Signature - -```cpp -class signalwire::skills::SkillBase -``` - -## Methods - -### ~SkillBase - -**Modifiers:** `virtual` - -#### Signature - -```cpp -void ~SkillBase() -``` - -#### Source - -[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) - -Line 28. - -*** - -### cleanup - -Cleanup resources. - -**Modifiers:** `inline` `virtual` - -#### Signature - -```cpp -void cleanup() -``` - -#### Source - -[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) - -Line 70. - -*** - -### define\_tool - -Define a tool (convenience for register\_tools implementations). - -**Modifiers:** `inline` - -#### Signature - -```cpp -swaig::ToolDefinition define_tool( - const std::string & name, - const std::string & description, - const json & parameters, - swaig::ToolHandler handler, - bool secure = false -) -``` - -#### Parameters - - - - - - - - - - - -#### Returns - -`swaig::ToolDefinition` - -#### Source - -[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) - -Line 77. - -*** - -### get\_datamap\_functions - -Get SWAIG DataMap functions (for DataMap-based skills). - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::vector< json > get_datamap_functions() const -``` - -#### Returns - -`std::vector< json >` - -#### Source - -[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) - -Line 61. - -*** - -### get\_global\_data - -Get global data to merge into agent. - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -json get_global_data() const -``` - -#### Returns - -`json` - -#### Source - -[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) - -Line 55. - -*** - -### get\_hints - -Get speech recognition hints to merge into agent. - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::vector< std::string > get_hints() const -``` - -#### Returns - -`std::vector< std::string >` - -#### Source - -[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) - -Line 52. - -*** - -### get\_instance\_key - -Get instance key for multi-instance skills. - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string get_instance_key() const -``` - -#### Returns - -`std::string` - -#### Source - -[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) - -Line 67. - -*** - -### get\_param - -Get a parameter value with a default. - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -template -T get_param( - const json & params, - const std::string & key, - const T & default_val -) const -``` - -#### Type Parameters - - - -#### Parameters - - - - - - - -#### Returns - -`T` - -#### Source - -[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) - -Line 94. - -*** - -### get\_param\_or\_env - -Get a string parameter with env var fallback. - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -std::string get_param_or_env( - const json & params, - const std::string & key, - const std::string & env_var, - const std::string & default_val = "" -) const -``` - -#### Parameters - - - - - - - - - -#### Returns - -`std::string` - -#### Source - -[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) - -Line 102. - -*** - -### get\_parameter\_schema - -Get parameter schema for GUI tools. - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -json get_parameter_schema() const -``` - -#### Returns - -`json` - -#### Source - -[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) - -Line 64. - -*** - -### get\_prompt\_sections - -Get prompt sections to inject into agent. - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::vector< SkillPromptSection > get_prompt_sections() const -``` - -#### Returns - -`std::vector< SkillPromptSection >` - -#### Source - -[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) - -Line 58. - -*** - -### register\_tools - -Register tools with the agent. Returns tool definitions. - -**Modifiers:** `virtual` `pure` - -#### Signature - -```cpp -std::vector< swaig::ToolDefinition > register_tools() = 0 -``` - -#### Returns - -`std::vector< swaig::ToolDefinition >` - -#### Source - -[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) - -Line 45. - -*** - -### required\_env\_vars - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::vector< std::string > required_env_vars() const -``` - -#### Returns - -`std::vector< std::string >` - -#### Source - -[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) - -Line 38. - -*** - -### required\_packages - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::vector< std::string > required_packages() const -``` - -#### Returns - -`std::vector< std::string >` - -#### Source - -[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) - -Line 39. - -*** - -### setup - -Initialize the skill with given params. Return true on success. - -**Modifiers:** `virtual` `pure` - -#### Signature - -```cpp -bool setup(const json & params) = 0 -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) - -Line 42. - -*** - -### skill\_description - -**Modifiers:** `const` `virtual` `pure` - -#### Signature - -```cpp -std::string skill_description() const = 0 -``` - -#### Returns - -`std::string` - -#### Source - -[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) - -Line 35. - -*** - -### skill\_name - -**Modifiers:** `const` `virtual` `pure` - -#### Signature - -```cpp -std::string skill_name() const = 0 -``` - -#### Returns - -`std::string` - -#### Source - -[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) - -Line 34. - -*** - -### skill\_version - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_version() const -``` - -#### Returns - -`std::string` - -#### Source - -[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) - -Line 36. - -*** - -### supports\_multiple\_instances - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -bool supports_multiple_instances() const -``` - -#### Returns - -`bool` - -#### Source - -[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) - -Line 37. - -## Source - -[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) - -Line 26. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/skill-http-response/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/skill-http-response/index.mdx deleted file mode 100644 index 3392daecc7..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/skills/skill-http-response/index.mdx +++ /dev/null @@ -1,38 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/skills/skill-http-response" -title: "SkillHttpResponse" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::skills::SkillHttpResponse" - parent: "signalwire::skills" - module: "signalwire.skills" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skills_http.hpp" - visibility: "public" ---- -# `SkillHttpResponse` - -Result of a skill HTTP request. status is the HTTP status code (0 indicates a transport-level error — connection refused, DNS, etc.). body is the raw response body. error is non-empty when status is 0. - -## Signature - -```cpp -struct signalwire::skills::SkillHttpResponse -``` - -## Properties - - - - - - - -## Source - -[`include/signalwire/skills/skills_http.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skills_http.hpp) - -Line 14. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/skill-manager/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/skill-manager/index.mdx deleted file mode 100644 index 4329930584..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/skills/skill-manager/index.mdx +++ /dev/null @@ -1,172 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/skills/skill-manager" -title: "SkillManager" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::skills::SkillManager" - parent: "signalwire::skills" - module: "signalwire.skills" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_manager.hpp" - visibility: "public" ---- -# `SkillManager` - -Manages skill lifecycle: creation, setup, registration with agents. - -## Signature - -```cpp -class signalwire::skills::SkillManager -``` - -## Methods - -### cleanup\_all - -Cleanup all skills. - -#### Signature - -```cpp -void cleanup_all() -``` - -#### Source - -[`include/signalwire/skills/skill_manager.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_manager.hpp) - -Line 40. - -*** - -### is\_loaded - -Check if a skill is loaded. - -**Modifiers:** `const` - -#### Signature - -```cpp -bool is_loaded(const std::string & skill_name) const -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`include/signalwire/skills/skill_manager.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_manager.hpp) - -Line 34. - -*** - -### list\_loaded - -List loaded skills. - -**Modifiers:** `const` - -#### Signature - -```cpp -std::vector< std::string > list_loaded() const -``` - -#### Returns - -`std::vector< std::string >` - -#### Source - -[`include/signalwire/skills/skill_manager.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_manager.hpp) - -Line 37. - -*** - -### load\_skill - -Load a skill by name with params and register it with the agent. - -#### Signature - -```cpp -bool load_skill( - const std::string & skill_name, - const json & params, - agent::AgentBase & agent -) -``` - -#### Parameters - - - - - - - -#### Returns - -`bool` - -#### Source - -[`include/signalwire/skills/skill_manager.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_manager.hpp) - -Line 27. - -*** - -### SkillManager - -#### Signature - -```cpp -void SkillManager() -``` - -#### Source - -[`include/signalwire/skills/skill_manager.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_manager.hpp) - -Line 24. - -*** - -### unload\_skill - -Unload a skill. - -#### Signature - -```cpp -void unload_skill(const std::string & skill_name) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/skills/skill_manager.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_manager.hpp) - -Line 31. - -## Source - -[`include/signalwire/skills/skill_manager.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_manager.hpp) - -Line 22. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/skill-prompt-section/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/skill-prompt-section/index.mdx deleted file mode 100644 index 0f4116a1ef..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/skills/skill-prompt-section/index.mdx +++ /dev/null @@ -1,38 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/skills/skill-prompt-section" -title: "SkillPromptSection" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::skills::SkillPromptSection" - parent: "signalwire::skills" - module: "signalwire.skills" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp" - visibility: "public" ---- -# `SkillPromptSection` - -POM section for skill prompts. - -## Signature - -```cpp -struct signalwire::skills::SkillPromptSection -``` - -## Properties - - - - - - - -## Source - -[`include/signalwire/skills/skill_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_base.hpp) - -Line 19. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/skill-registry/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/skill-registry/index.mdx deleted file mode 100644 index 385984f384..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/skills/skill-registry/index.mdx +++ /dev/null @@ -1,207 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/skills/skill-registry" -title: "SkillRegistry" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::skills::SkillRegistry" - parent: "signalwire::skills" - module: "signalwire.skills" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_registry.hpp" - visibility: "public" ---- -# `SkillRegistry` - -Global registry of skill factories. - -## Signature - -```cpp -class signalwire::skills::SkillRegistry -``` - -## Methods - -### add\_skill\_directory - -Add a directory to search for skills. -Mirrors Python's signalwire.skills.registry.SkillRegistry.add\_skill\_directory: validate that the path exists and is a directory, then append it (de-duplicated) to external\_paths\_. Throws std::invalid\_argument (the C++ analog of Python's ValueError) for invalid input — the path doesn't exist or isn't a directory. - -**Modifiers:** `inline` - -#### Signature - -```cpp -void add_skill_directory(const std::string & path) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/skills/skill_registry.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_registry.hpp) - -Line 65. - -*** - -### create - -Create a skill instance by name. - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -std::unique_ptr< SkillBase > create(const std::string & name) const -``` - -#### Parameters - - - -#### Returns - -`std::unique_ptr< SkillBase >` - -#### Source - -[`include/signalwire/skills/skill_registry.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_registry.hpp) - -Line 32. - -*** - -### external\_paths - -Returns the registered external skill directories. Mirrors Python's SkillRegistry.\_external\_paths (private list, exposed here as a public accessor for parity-test inspection — C++ has no convention for protected attributes that tests can poke). - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -std::vector< std::string > external_paths() const -``` - -#### Returns - -`std::vector< std::string >` - -#### Source - -[`include/signalwire/skills/skill_registry.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_registry.hpp) - -Line 84. - -*** - -### has\_skill - -Check if a skill is registered. - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -bool has_skill(const std::string & name) const -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`include/signalwire/skills/skill_registry.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_registry.hpp) - -Line 42. - -*** - -### instance - -**Modifiers:** `static` `inline` - -#### Signature - -```cpp -SkillRegistry & instance() -``` - -#### Returns - -`SkillRegistry &` - -#### Source - -[`include/signalwire/skills/skill_registry.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_registry.hpp) - -Line 20. - -*** - -### list\_skills - -List all registered skill names. - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -std::vector< std::string > list_skills() const -``` - -#### Returns - -`std::vector< std::string >` - -#### Source - -[`include/signalwire/skills/skill_registry.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_registry.hpp) - -Line 48. - -*** - -### register\_skill - -Register a skill factory. - -**Modifiers:** `inline` - -#### Signature - -```cpp -void register_skill(const std::string & name, SkillFactory factory) -``` - -#### Parameters - - - - - -#### Source - -[`include/signalwire/skills/skill_registry.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_registry.hpp) - -Line 26. - -## Source - -[`include/signalwire/skills/skill_registry.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/skill_registry.hpp) - -Line 18. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/spider-skill-r/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/spider-skill-r/index.mdx deleted file mode 100644 index 26720d5156..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/skills/spider-skill-r/index.mdx +++ /dev/null @@ -1,174 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/skills/spider-skill-r" -title: "SpiderSkillR" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::skills::SpiderSkillR" - parent: "signalwire::skills" - module: "signalwire.skills" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp" - visibility: "public" ---- -# `SpiderSkillR` - -## Signature - -```cpp -class signalwire::skills::SpiderSkillR : signalwire::skills::SkillBase -``` - -## Inheritance - -**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base) - -## Methods - -### get\_hints - -Get speech recognition hints to merge into agent. - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::vector< std::string > get_hints() const -``` - -#### Returns - -`std::vector< std::string >` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 301. - -*** - -### register\_tools - -Register tools with the agent. Returns tool definitions. - -**Modifiers:** `inline` `virtual` - -#### Signature - -```cpp -std::vector< swaig::ToolDefinition > register_tools() -``` - -#### Returns - -`std::vector< swaig::ToolDefinition >` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 271. - -*** - -### setup - -Initialize the skill with given params. Return true on success. - -**Modifiers:** `inline` `virtual` - -#### Signature - -```cpp -bool setup(const json & params) -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 270. - -*** - -### skill\_description - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_description() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 268. - -*** - -### skill\_name - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_name() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 267. - -*** - -### supports\_multiple\_instances - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -bool supports_multiple_instances() const -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 269. - -## Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 249. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/spider-skill/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/spider-skill/index.mdx deleted file mode 100644 index bd28597a4e..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/skills/spider-skill/index.mdx +++ /dev/null @@ -1,177 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/skills/spider-skill" -title: "SpiderSkill" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::skills::SpiderSkill" - parent: "signalwire::skills" - module: "signalwire.skills" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/spider.cpp" - visibility: "public" ---- -# `SpiderSkill` - -Spider scrape skill — issues a real GET against the URL the LLM passes in. Strips HTML tags from the response and returns the text payload. Matches Python SpiderSkill's scrape\_url behavior. -SPIDER\_BASE\_URL env var overrides the host portion of the URL the caller passes in (used by audit\_skills\_dispatch.py to redirect scrape requests at a loopback fixture). - -## Signature - -```cpp -class signalwire::skills::SpiderSkill : signalwire::skills::SkillBase -``` - -## Inheritance - -**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base) - -## Methods - -### get\_hints - -Get speech recognition hints to merge into agent. - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::vector< std::string > get_hints() const -``` - -#### Returns - -`std::vector< std::string >` - -#### Source - -[`src/skills/builtin/spider.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/spider.cpp) - -Line 153. - -*** - -### register\_tools - -Register tools with the agent. Returns tool definitions. - -**Modifiers:** `inline` `virtual` - -#### Signature - -```cpp -std::vector< swaig::ToolDefinition > register_tools() -``` - -#### Returns - -`std::vector< swaig::ToolDefinition >` - -#### Source - -[`src/skills/builtin/spider.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/spider.cpp) - -Line 62. - -*** - -### setup - -Initialize the skill with given params. Return true on success. - -**Modifiers:** `inline` `virtual` - -#### Signature - -```cpp -bool setup(const json & params) -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/spider.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/spider.cpp) - -Line 60. - -*** - -### skill\_description - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_description() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/builtin/spider.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/spider.cpp) - -Line 57. - -*** - -### skill\_name - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_name() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/builtin/spider.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/spider.cpp) - -Line 56. - -*** - -### supports\_multiple\_instances - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -bool supports_multiple_instances() const -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/spider.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/spider.cpp) - -Line 58. - -## Source - -[`src/skills/builtin/spider.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/spider.cpp) - -Line 54. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/swml-transfer-skill-r/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/swml-transfer-skill-r/index.mdx deleted file mode 100644 index 7b0986fb47..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/skills/swml-transfer-skill-r/index.mdx +++ /dev/null @@ -1,198 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/skills/swml-transfer-skill-r" -title: "SwmlTransferSkillR" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::skills::SwmlTransferSkillR" - parent: "signalwire::skills" - module: "signalwire.skills" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp" - visibility: "public" ---- -# `SwmlTransferSkillR` - -## Signature - -```cpp -class signalwire::skills::SwmlTransferSkillR : signalwire::skills::SkillBase -``` - -## Inheritance - -**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base) - -## Methods - -### get\_datamap\_functions - -Get SWAIG DataMap functions (for DataMap-based skills). - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::vector< json > get_datamap_functions() const -``` - -#### Returns - -`std::vector< json >` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 396. - -*** - -### get\_hints - -Get speech recognition hints to merge into agent. - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::vector< std::string > get_hints() const -``` - -#### Returns - -`std::vector< std::string >` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 396. - -*** - -### register\_tools - -Register tools with the agent. Returns tool definitions. - -**Modifiers:** `inline` `virtual` - -#### Signature - -```cpp -std::vector< swaig::ToolDefinition > register_tools() -``` - -#### Returns - -`std::vector< swaig::ToolDefinition >` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 396. - -*** - -### setup - -Initialize the skill with given params. Return true on success. - -**Modifiers:** `inline` `virtual` - -#### Signature - -```cpp -bool setup(const json & params) -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 396. - -*** - -### skill\_description - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_description() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 396. - -*** - -### skill\_name - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_name() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 396. - -*** - -### supports\_multiple\_instances - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -bool supports_multiple_instances() const -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 396. - -## Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 396. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/swml-transfer-skill/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/swml-transfer-skill/index.mdx deleted file mode 100644 index b70190e0d1..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/skills/swml-transfer-skill/index.mdx +++ /dev/null @@ -1,222 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/skills/swml-transfer-skill" -title: "SwmlTransferSkill" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::skills::SwmlTransferSkill" - parent: "signalwire::skills" - module: "signalwire.skills" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/swml_transfer.cpp" - visibility: "public" ---- -# `SwmlTransferSkill` - -## Signature - -```cpp -class signalwire::skills::SwmlTransferSkill : signalwire::skills::SkillBase -``` - -## Inheritance - -**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base) - -## Methods - -### get\_datamap\_functions - -Get SWAIG DataMap functions (for DataMap-based skills). - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::vector< json > get_datamap_functions() const -``` - -#### Returns - -`std::vector< json >` - -#### Source - -[`src/skills/builtin/swml_transfer.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/swml_transfer.cpp) - -Line 26. - -*** - -### get\_hints - -Get speech recognition hints to merge into agent. - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::vector< std::string > get_hints() const -``` - -#### Returns - -`std::vector< std::string >` - -#### Source - -[`src/skills/builtin/swml_transfer.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/swml_transfer.cpp) - -Line 62. - -*** - -### get\_prompt\_sections - -Get prompt sections to inject into agent. - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::vector< SkillPromptSection > get_prompt_sections() const -``` - -#### Returns - -`std::vector< SkillPromptSection >` - -#### Source - -[`src/skills/builtin/swml_transfer.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/swml_transfer.cpp) - -Line 81. - -*** - -### register\_tools - -Register tools with the agent. Returns tool definitions. - -**Modifiers:** `inline` `virtual` - -#### Signature - -```cpp -std::vector< swaig::ToolDefinition > register_tools() -``` - -#### Returns - -`std::vector< swaig::ToolDefinition >` - -#### Source - -[`src/skills/builtin/swml_transfer.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/swml_transfer.cpp) - -Line 24. - -*** - -### setup - -Initialize the skill with given params. Return true on success. - -**Modifiers:** `inline` `virtual` - -#### Signature - -```cpp -bool setup(const json & params) -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/swml_transfer.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/swml_transfer.cpp) - -Line 18. - -*** - -### skill\_description - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_description() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/builtin/swml_transfer.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/swml_transfer.cpp) - -Line 13. - -*** - -### skill\_name - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_name() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/builtin/swml_transfer.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/swml_transfer.cpp) - -Line 12. - -*** - -### supports\_multiple\_instances - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -bool supports_multiple_instances() const -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/swml_transfer.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/swml_transfer.cpp) - -Line 16. - -## Source - -[`src/skills/builtin/swml_transfer.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/swml_transfer.cpp) - -Line 10. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/weather-api-skill-r/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/weather-api-skill-r/index.mdx deleted file mode 100644 index 79afb00d5c..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/skills/weather-api-skill-r/index.mdx +++ /dev/null @@ -1,152 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/skills/weather-api-skill-r" -title: "WeatherApiSkillR" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::skills::WeatherApiSkillR" - parent: "signalwire::skills" - module: "signalwire.skills" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp" - visibility: "public" ---- -# `WeatherApiSkillR` - -## Signature - -```cpp -class signalwire::skills::WeatherApiSkillR : signalwire::skills::SkillBase -``` - -## Inheritance - -**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base) - -## Methods - -### get\_datamap\_functions - -Get SWAIG DataMap functions (for DataMap-based skills). - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::vector< json > get_datamap_functions() const -``` - -#### Returns - -`std::vector< json >` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 86. - -*** - -### register\_tools - -Register tools with the agent. Returns tool definitions. - -**Modifiers:** `inline` `virtual` - -#### Signature - -```cpp -std::vector< swaig::ToolDefinition > register_tools() -``` - -#### Returns - -`std::vector< swaig::ToolDefinition >` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 85. - -*** - -### setup - -Initialize the skill with given params. Return true on success. - -**Modifiers:** `inline` `virtual` - -#### Signature - -```cpp -bool setup(const json & params) -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 84. - -*** - -### skill\_description - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_description() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 83. - -*** - -### skill\_name - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_name() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 82. - -## Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 79. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/weather-api-skill/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/weather-api-skill/index.mdx deleted file mode 100644 index 81791f3f2f..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/skills/weather-api-skill/index.mdx +++ /dev/null @@ -1,152 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/skills/weather-api-skill" -title: "WeatherApiSkill" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::skills::WeatherApiSkill" - parent: "signalwire::skills" - module: "signalwire.skills" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/weather_api.cpp" - visibility: "public" ---- -# `WeatherApiSkill` - -## Signature - -```cpp -class signalwire::skills::WeatherApiSkill : signalwire::skills::SkillBase -``` - -## Inheritance - -**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base) - -## Methods - -### get\_datamap\_functions - -Get SWAIG DataMap functions (for DataMap-based skills). - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::vector< json > get_datamap_functions() const -``` - -#### Returns - -`std::vector< json >` - -#### Source - -[`src/skills/builtin/weather_api.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/weather_api.cpp) - -Line 25. - -*** - -### register\_tools - -Register tools with the agent. Returns tool definitions. - -**Modifiers:** `inline` `virtual` - -#### Signature - -```cpp -std::vector< swaig::ToolDefinition > register_tools() -``` - -#### Returns - -`std::vector< swaig::ToolDefinition >` - -#### Source - -[`src/skills/builtin/weather_api.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/weather_api.cpp) - -Line 23. - -*** - -### setup - -Initialize the skill with given params. Return true on success. - -**Modifiers:** `inline` `virtual` - -#### Signature - -```cpp -bool setup(const json & params) -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/weather_api.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/weather_api.cpp) - -Line 15. - -*** - -### skill\_description - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_description() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/builtin/weather_api.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/weather_api.cpp) - -Line 13. - -*** - -### skill\_name - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_name() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/builtin/weather_api.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/weather_api.cpp) - -Line 12. - -## Source - -[`src/skills/builtin/weather_api.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/weather_api.cpp) - -Line 10. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/web-search-core/candidate/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/web-search-core/candidate/index.mdx deleted file mode 100644 index 1a074c82e2..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/skills/web-search-core/candidate/index.mdx +++ /dev/null @@ -1,42 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/skills/web-search-core/candidate" -title: "Candidate" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::skills::web_search_core::Candidate" - parent: "signalwire::skills::web_search_core" - module: "signalwire.skills.web_search_core" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/web_search_core.hpp" - visibility: "public" ---- -# `Candidate` - -One Google CSE hit: title / link / snippet, plus the page text once a scrape succeeds. - -## Signature - -```cpp -struct signalwire::skills::web_search_core::Candidate -``` - -## Properties - - - - - - - - - - - -## Source - -[`include/signalwire/skills/web_search_core.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/web_search_core.hpp) - -Line 55. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/web-search-core/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/web-search-core/index.mdx deleted file mode 100644 index 9a6b21e712..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/skills/web-search-core/index.mdx +++ /dev/null @@ -1,318 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/skills/web-search-core" -title: "web_search_core" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "module" - language: "cpp" - qualified_name: "signalwire::skills::web_search_core" - parent: "signalwire::skills" - module: "signalwire.skills" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/web_search_core.hpp" ---- -# `web_search_core` - -## Signature - -```cpp -namespace signalwire::skills::web_search_core -``` - -## Classes - - - - One Google CSE hit: title / link / snippet, plus the page text once a scrape succeeds. - - - - Latency-control configuration read from the skill params. - - - -## Functions - -### format\_scraped\_results - -Format the successfully-scraped results. Returned when at least one page was fetched within budget. Keeps the historical "Web search results for '<q>'" header shape so existing parse-assertions still see it, but enriches each entry with the fetched page content (truncated to per\_result\_limit). - -**Modifiers:** `inline` - -#### Signature - -```cpp -std::string format_scraped_results( - const std::string & query, - const std::vector< Candidate > & scraped, - std::size_t total_candidates, - std::size_t per_result_limit -) -``` - -#### Parameters - - - - - - - - - -#### Returns - -`std::string` - -#### Source - -[`include/signalwire/skills/web_search_core.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/web_search_core.hpp) - -Line 122. - -*** - -### format\_snippet\_results - -Format Google CSE snippets without fetching the underlying pages. Used for the snippets\_only fast path AND as the graceful fallback when scraping is abandoned by the overall\_deadline. Always non-empty when there is at least one candidate. Mirrors Python's \_format\_snippet\_results. - -**Modifiers:** `inline` - -#### Signature - -```cpp -std::string format_snippet_results( - const std::string & query, - const std::vector< Candidate > & cands, - int num_results -) -``` - -#### Parameters - - - - - - - -#### Returns - -`std::string` - -#### Source - -[`include/signalwire/skills/web_search_core.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/web_search_core.hpp) - -Line 91. - -*** - -### parse\_cse\_items - -Parse a Google CSE \{ "items": \[ \{title, link, snippet\}, ... ] \} body into candidate hits. Unknown / missing fields default to empty strings. - -**Modifiers:** `inline` - -#### Signature - -```cpp -std::vector< Candidate > parse_cse_items(const json & parsed) -``` - -#### Parameters - - - -#### Returns - -`std::vector< Candidate >` - -#### Source - -[`include/signalwire/skills/web_search_core.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/web_search_core.hpp) - -Line 73. - -*** - -### run - -Run the full latency-controlled web\_search flow given an already-fetched and parsed CSE candidate list. Returns the response body (UNWRAPPED — the caller applies response\_prefix/response\_postfix). had\_items distinguishes "CSE -returned zero items" (return empty\_no\_items\_message) from "CSE returned -items but none scraped" (snippet fallback). -Steps mirror Python's search\_and\_scrape\_best: -snippets\_only -> format CSE snippets directly. -scrape under deadline. -no scraped survivors -> snippet fallback (non-empty). -else -> format scraped results. - -**Modifiers:** `inline` - -#### Signature - -```cpp -std::string run( - const std::string & query, - std::vector< Candidate > candidates, - const LatencyParams & lp, - int num_results, - std::size_t max_content_length, - const std::string & empty_no_items_message -) -``` - -#### Parameters - - - - - - - - - - - - - -#### Returns - -`std::string` - -#### Source - -[`include/signalwire/skills/web_search_core.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/web_search_core.hpp) - -Line 254. - -*** - -### schema\_fragment - -Build the parameter-schema fragment advertising the 6 latency / response params. Merged into each skill's get\_parameter\_schema(). Mirrors Python's get\_parameter\_schema entries (295745b) and the Go reference port. - -**Modifiers:** `inline` - -#### Signature - -```cpp -json schema_fragment() -``` - -#### Returns - -`json` - -#### Source - -[`include/signalwire/skills/web_search_core.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/web_search_core.hpp) - -Line 302. - -*** - -### scrape\_candidates - -Scrape the candidate result links under the overall\_deadline budget, returning only the ones that produced usable page content before time ran out. The overall\_deadline is enforced in BOTH parallel and sequential modes via std::chrono::steady\_clock — that is the contract. -Parallel mode (best-effort): dispatch every scrape via std::async, then future::wait\_until(deadline) each. Whatever has not finished by the deadline is abandoned — its future is moved into a detached reaper so the abandoned fetch (already bounded by per\_page\_timeout) is cleaned up off the hot path and never blocks the response. std::async's own future destructor would otherwise JOIN the task, defeating the deadline; the reaper sidesteps that. -Sequential mode: scrape one link at a time, breaking out the instant the deadline has passed. - -**Modifiers:** `inline` - -#### Signature - -```cpp -std::vector< Candidate > scrape_candidates( - const std::vector< Candidate > & cands, - const LatencyParams & lp, - steady_clock::time_point deadline_at -) -``` - -#### Parameters - - - - - - - -#### Returns - -`std::vector< Candidate >` - -#### Source - -[`include/signalwire/skills/web_search_core.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/web_search_core.hpp) - -Line 186. - -*** - -### scrape\_one - -Fetch one candidate's page under the per\_page\_timeout bound. A 2xx response with a non-empty body is a usable scrape; everything else (transport error, non-2xx, empty body) yields an unscraped candidate. The per\_page\_timeout is converted to milliseconds so a sub-second budget is honored exactly. - -**Modifiers:** `inline` - -#### Signature - -```cpp -Candidate scrape_one(const Candidate & in, double per_page_timeout) -``` - -#### Parameters - - - - - -#### Returns - -`Candidate` - -#### Source - -[`include/signalwire/skills/web_search_core.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/web_search_core.hpp) - -Line 153. - -## Type Aliases - -### json - -#### Signature - -```cpp -typedef nlohmann::json json -``` - -#### Source - -[`include/signalwire/skills/web_search_core.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/web_search_core.hpp) - -Line 50. - -*** - -### steady\_clock - -#### Signature - -```cpp -typedef std::chrono::steady_clock steady_clock -``` - -#### Source - -[`include/signalwire/skills/web_search_core.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/web_search_core.hpp) - -Line 51. - -## Source - -[`include/signalwire/skills/web_search_core.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/web_search_core.hpp) - -Line 48. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/web-search-core/latency-params/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/web-search-core/latency-params/index.mdx deleted file mode 100644 index 30e082fd8c..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/skills/web-search-core/latency-params/index.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/skills/web-search-core/latency-params" -title: "LatencyParams" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::skills::web_search_core::LatencyParams" - parent: "signalwire::skills::web_search_core" - module: "signalwire.skills.web_search_core" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/web_search_core.hpp" - visibility: "public" ---- -# `LatencyParams` - -Latency-control configuration read from the skill params. - -## Signature - -```cpp -struct signalwire::skills::web_search_core::LatencyParams -``` - -## Properties - - - - - - - - - -## Source - -[`include/signalwire/skills/web_search_core.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/skills/web_search_core.hpp) - -Line 64. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/web-search-skill-r/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/web-search-skill-r/index.mdx deleted file mode 100644 index 3350786160..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/skills/web-search-skill-r/index.mdx +++ /dev/null @@ -1,244 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/skills/web-search-skill-r" -title: "WebSearchSkillR" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::skills::WebSearchSkillR" - parent: "signalwire::skills" - module: "signalwire.skills" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp" - visibility: "public" ---- -# `WebSearchSkillR` - -## Signature - -```cpp -class signalwire::skills::WebSearchSkillR : signalwire::skills::SkillBase -``` - -## Inheritance - -**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base) - -## Methods - -### get\_global\_data - -Get global data to merge into agent. - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -json get_global_data() const -``` - -#### Returns - -`json` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 176. - -*** - -### get\_parameter\_schema - -Get parameter schema for GUI tools. - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -json get_parameter_schema() const -``` - -#### Returns - -`json` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 177. - -*** - -### get\_prompt\_sections - -Get prompt sections to inject into agent. - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::vector< SkillPromptSection > get_prompt_sections() const -``` - -#### Returns - -`std::vector< SkillPromptSection >` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 175. - -*** - -### register\_tools - -Register tools with the agent. Returns tool definitions. - -**Modifiers:** `inline` `virtual` - -#### Signature - -```cpp -std::vector< swaig::ToolDefinition > register_tools() -``` - -#### Returns - -`std::vector< swaig::ToolDefinition >` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 131. - -*** - -### setup - -Initialize the skill with given params. Return true on success. - -**Modifiers:** `inline` `virtual` - -#### Signature - -```cpp -bool setup(const json & params) -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 112. - -*** - -### skill\_description - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_description() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 109. - -*** - -### skill\_name - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_name() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 108. - -*** - -### skill\_version - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_version() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 110. - -*** - -### supports\_multiple\_instances - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -bool supports_multiple_instances() const -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 111. - -## Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 96. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/web-search-skill/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/web-search-skill/index.mdx deleted file mode 100644 index da27b1c065..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/skills/web-search-skill/index.mdx +++ /dev/null @@ -1,252 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/skills/web-search-skill" -title: "WebSearchSkill" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::skills::WebSearchSkill" - parent: "signalwire::skills" - module: "signalwire.skills" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/web_search.cpp" - visibility: "public" ---- -# `WebSearchSkill` - -Google Custom Search API skill — issues a real GET against Google's customsearch/v1 endpoint, parses the items\[] results, and returns a human-readable summary. Matches Python's WebSearchSkill behavior. -Configuration: -api\_key (or env GOOGLE\_SEARCH\_API\_KEY / GOOGLE\_API\_KEY) -search\_engine\_id (or env GOOGLE\_SEARCH\_ENGINE\_ID / GOOGLE\_CSE\_ID) -num\_results (default 3) -tool\_name (default "web\_search") -WEB\_SEARCH\_BASE\_URL env var overrides the upstream URL (used by audit\_skills\_dispatch.py to point the skill at a fixture) - -## Signature - -```cpp -class signalwire::skills::WebSearchSkill : signalwire::skills::SkillBase -``` - -## Inheritance - -**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base) - -## Methods - -### get\_global\_data - -Get global data to merge into agent. - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -json get_global_data() const -``` - -#### Returns - -`json` - -#### Source - -[`src/skills/builtin/web_search.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/web_search.cpp) - -Line 142. - -*** - -### get\_parameter\_schema - -Get parameter schema for GUI tools. - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -json get_parameter_schema() const -``` - -#### Returns - -`json` - -#### Source - -[`src/skills/builtin/web_search.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/web_search.cpp) - -Line 150. - -*** - -### get\_prompt\_sections - -Get prompt sections to inject into agent. - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::vector< SkillPromptSection > get_prompt_sections() const -``` - -#### Returns - -`std::vector< SkillPromptSection >` - -#### Source - -[`src/skills/builtin/web_search.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/web_search.cpp) - -Line 135. - -*** - -### register\_tools - -Register tools with the agent. Returns tool definitions. - -**Modifiers:** `inline` `virtual` - -#### Signature - -```cpp -std::vector< swaig::ToolDefinition > register_tools() -``` - -#### Returns - -`std::vector< swaig::ToolDefinition >` - -#### Source - -[`src/skills/builtin/web_search.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/web_search.cpp) - -Line 59. - -*** - -### setup - -Initialize the skill with given params. Return true on success. - -**Modifiers:** `inline` `virtual` - -#### Signature - -```cpp -bool setup(const json & params) -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/web_search.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/web_search.cpp) - -Line 32. - -*** - -### skill\_description - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_description() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/builtin/web_search.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/web_search.cpp) - -Line 28. - -*** - -### skill\_name - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_name() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/builtin/web_search.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/web_search.cpp) - -Line 27. - -*** - -### skill\_version - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_version() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/builtin/web_search.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/web_search.cpp) - -Line 29. - -*** - -### supports\_multiple\_instances - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -bool supports_multiple_instances() const -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/web_search.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/web_search.cpp) - -Line 30. - -## Source - -[`src/skills/builtin/web_search.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/web_search.cpp) - -Line 25. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/wikipedia-search-skill-r/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/wikipedia-search-skill-r/index.mdx deleted file mode 100644 index cb7b22b34e..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/skills/wikipedia-search-skill-r/index.mdx +++ /dev/null @@ -1,152 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/skills/wikipedia-search-skill-r" -title: "WikipediaSearchSkillR" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::skills::WikipediaSearchSkillR" - parent: "signalwire::skills" - module: "signalwire.skills" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp" - visibility: "public" ---- -# `WikipediaSearchSkillR` - -## Signature - -```cpp -class signalwire::skills::WikipediaSearchSkillR : signalwire::skills::SkillBase -``` - -## Inheritance - -**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base) - -## Methods - -### get\_prompt\_sections - -Get prompt sections to inject into agent. - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::vector< SkillPromptSection > get_prompt_sections() const -``` - -#### Returns - -`std::vector< SkillPromptSection >` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 238. - -*** - -### register\_tools - -Register tools with the agent. Returns tool definitions. - -**Modifiers:** `inline` `virtual` - -#### Signature - -```cpp -std::vector< swaig::ToolDefinition > register_tools() -``` - -#### Returns - -`std::vector< swaig::ToolDefinition >` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 198. - -*** - -### setup - -Initialize the skill with given params. Return true on success. - -**Modifiers:** `inline` `virtual` - -#### Signature - -```cpp -bool setup(const json & params) -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 192. - -*** - -### skill\_description - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_description() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 191. - -*** - -### skill\_name - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_name() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 190. - -## Source - -[`src/skills/skill_registry.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/skill_registry.cpp) - -Line 186. diff --git a/fern/products/sdk-reference/cpp/signalwire/skills/wikipedia-search-skill/index.mdx b/fern/products/sdk-reference/cpp/signalwire/skills/wikipedia-search-skill/index.mdx deleted file mode 100644 index 6a85b25ddc..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/skills/wikipedia-search-skill/index.mdx +++ /dev/null @@ -1,155 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/skills/wikipedia-search-skill" -title: "WikipediaSearchSkill" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::skills::WikipediaSearchSkill" - parent: "signalwire::skills" - module: "signalwire.skills" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/wikipedia_search.cpp" - visibility: "public" ---- -# `WikipediaSearchSkill` - -Wikipedia search skill — issues a real GET against the Wikipedia API /w/api.php endpoint with action=query\&list=search, parses the query.search\[] results, and returns titles + snippets. Matches the Python WikipediaSearchSkill upstream call shape. -WIKIPEDIA\_BASE\_URL env var overrides the API root (used by audit\_skills\_dispatch.py to point the skill at its loopback fixture). - -## Signature - -```cpp -class signalwire::skills::WikipediaSearchSkill : signalwire::skills::SkillBase -``` - -## Inheritance - -**Extends:** [signalwire::skills::SkillBase](/docs/sdk-reference/reference/cpp/signalwire/skills/skill-base) - -## Methods - -### get\_prompt\_sections - -Get prompt sections to inject into agent. - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::vector< SkillPromptSection > get_prompt_sections() const -``` - -#### Returns - -`std::vector< SkillPromptSection >` - -#### Source - -[`src/skills/builtin/wikipedia_search.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/wikipedia_search.cpp) - -Line 102. - -*** - -### register\_tools - -Register tools with the agent. Returns tool definitions. - -**Modifiers:** `inline` `virtual` - -#### Signature - -```cpp -std::vector< swaig::ToolDefinition > register_tools() -``` - -#### Returns - -`std::vector< swaig::ToolDefinition >` - -#### Source - -[`src/skills/builtin/wikipedia_search.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/wikipedia_search.cpp) - -Line 35. - -*** - -### setup - -Initialize the skill with given params. Return true on success. - -**Modifiers:** `inline` `virtual` - -#### Signature - -```cpp -bool setup(const json & params) -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/wikipedia_search.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/wikipedia_search.cpp) - -Line 27. - -*** - -### skill\_description - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_description() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/builtin/wikipedia_search.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/wikipedia_search.cpp) - -Line 23. - -*** - -### skill\_name - -**Modifiers:** `const` `inline` `virtual` - -#### Signature - -```cpp -std::string skill_name() const -``` - -#### Returns - -`std::string` - -#### Source - -[`src/skills/builtin/wikipedia_search.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/wikipedia_search.cpp) - -Line 22. - -## Source - -[`src/skills/builtin/wikipedia_search.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/skills/builtin/wikipedia_search.cpp) - -Line 20. diff --git a/fern/products/sdk-reference/cpp/signalwire/swaig/enum-or-string/index.mdx b/fern/products/sdk-reference/cpp/signalwire/swaig/enum-or-string/index.mdx deleted file mode 100644 index 198a4998b5..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/swaig/enum-or-string/index.mdx +++ /dev/null @@ -1,110 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/swaig/enum-or-string" -title: "EnumOrString" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::swaig::EnumOrString" - parent: "signalwire::swaig" - module: "signalwire.swaig" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp" - visibility: "public" ---- -# `EnumOrString` - -A closed-set field that accepts EITHER the typed enum OR a bare string. -JoinConferenceOptions::beep = ConferenceBeep::OnEnter; and ... = "onEnter"; both compile and resolve to the same wire string; the open-string path keeps parity with Python's bare str (the validation in join\_conference then rejects out-of-set strings exactly as Python does). Templated on the enum type plus its \*\_value() mapper so one definition covers all four sets. - -## Signature - -```cpp -template -struct signalwire::swaig::EnumOrString -``` - -## Type Parameters - - - - - -## Properties - - - -## Methods - -### EnumOrString - -**Modifiers:** `inline` - -#### Signature - - - - ```cpp - void EnumOrString(E e) - ``` - - - - ```cpp - void EnumOrString(const std::string & s) - ``` - - - - ```cpp - void EnumOrString(const char * s) - ``` - - - -#### Parameters (Overload 1) - - - -#### Parameters (Overload 2) - - - -#### Parameters (Overload 3) - - - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 157. - -*** - -### str - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -const std::string & str() const -``` - -#### Returns - -`const std::string &` - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 160. - -## Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 155. diff --git a/fern/products/sdk-reference/cpp/signalwire/swaig/function-result/index.mdx b/fern/products/sdk-reference/cpp/signalwire/swaig/function-result/index.mdx deleted file mode 100644 index 1503b21a82..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/swaig/function-result/index.mdx +++ /dev/null @@ -1,1632 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/swaig/function-result" -title: "FunctionResult" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::swaig::FunctionResult" - parent: "signalwire::swaig" - module: "signalwire.swaig" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp" - visibility: "public" ---- -# `FunctionResult` - -Builder for SWAIG function results with 40+ action methods. Every method returns \*this for chaining. - -## Signature - -```cpp -class signalwire::swaig::FunctionResult -``` - -## Methods - -### add\_action - -#### Signature - -```cpp -FunctionResult & add_action(const std::string & name, const json & data) -``` - -#### Parameters - - - - - -#### Returns - -`FunctionResult &` - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 207. - -*** - -### add\_actions - -#### Signature - -```cpp -FunctionResult & add_actions(const std::vector< json > & actions) -``` - -#### Parameters - - - -#### Returns - -`FunctionResult &` - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 208. - -*** - -### add\_dynamic\_hints - -#### Signature - -```cpp -FunctionResult & add_dynamic_hints(const json & hints) -``` - -#### Parameters - - - -#### Returns - -`FunctionResult &` - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 284. - -*** - -### clear\_dynamic\_hints - -#### Signature - -```cpp -FunctionResult & clear_dynamic_hints() -``` - -#### Returns - -`FunctionResult &` - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 285. - -*** - -### connect - -#### Signature - -```cpp -FunctionResult & connect( - const std::string & destination, - bool final = true, - const std::string & from_addr = "" -) -``` - -#### Parameters - - - - - - - -#### Returns - -`FunctionResult &` - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 214. - -*** - -### create\_payment\_action - -**Modifiers:** `static` - -#### Signature - -```cpp -json create_payment_action( - const std::string & action_type, - const std::string & phrase -) -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 405. - -*** - -### create\_payment\_parameter - -**Modifiers:** `static` - -#### Signature - -```cpp -json create_payment_parameter( - const std::string & name, - const std::string & value -) -``` - -#### Parameters - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 407. - -*** - -### create\_payment\_prompt - -**Modifiers:** `static` - -#### Signature - -```cpp -json create_payment_prompt( - const std::string & for_situation, - const std::vector< json > & actions, - const std::string & card_type = "", - const std::string & error_type = "" -) -``` - -#### Parameters - - - - - - - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 401. - -*** - -### enable\_extensive\_data - -#### Signature - -```cpp -FunctionResult & enable_extensive_data(bool enabled = true) -``` - -#### Parameters - - - -#### Returns - -`FunctionResult &` - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 290. - -*** - -### enable\_functions\_on\_timeout - -#### Signature - -```cpp -FunctionResult & enable_functions_on_timeout(bool enabled = true) -``` - -#### Parameters - - - -#### Returns - -`FunctionResult &` - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 289. - -*** - -### execute\_rpc - -#### Signature - -```cpp -FunctionResult & execute_rpc( - const std::string & method, - const json & params = json::object(), - const std::string & call_id = "", - const std::string & node_id = "" -) -``` - -#### Parameters - - - - - - - - - -#### Returns - -`FunctionResult &` - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 385. - -*** - -### execute\_swml - -#### Signature - -```cpp -FunctionResult & execute_swml(const json & swml_content, bool transfer = false) -``` - -#### Parameters - - - - - -#### Returns - -`FunctionResult &` - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 298. - -*** - -### FunctionResult - -**Modifiers:** `explicit` - -#### Signature - -```cpp -void FunctionResult( - const std::string & response = "", - bool post_process = false -) -``` - -#### Parameters - - - - - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 199. - -*** - -### hangup - -#### Signature - -```cpp -FunctionResult & hangup() -``` - -#### Returns - -`FunctionResult &` - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 218. - -*** - -### hold - -#### Signature - -```cpp -FunctionResult & hold(int timeout = 300) -``` - -#### Parameters - - - -#### Returns - -`FunctionResult &` - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 219. - -*** - -### join\_conference - -Join an ad-hoc audio conference (SWML join\_conference). Full parity with Python core/function\_result.py: 18 optional params past name, 7 validations, and simple (bare-name) vs full-object emission. -Flat positional overload — mirrors the Python signature 1:1 so the cross-language audit lines up on parameter count/types. The closed-set params are bare std::string (Python uses bare str); the options-struct overload below adds the typed enum class affordance. - -#### Signature - - - - ```cpp - FunctionResult & join_conference( - const std::string & name, - bool muted = false, - const std::string & beep = "true", - bool start_on_enter = true, - bool end_on_exit = false, - std::optional< std::string > wait_url = std::nullopt, - int max_participants = 250, - const std::string & record = "do-not-record", - std::optional< std::string > region = std::nullopt, - const std::string & trim = "trim-silence", - std::optional< std::string > coach = std::nullopt, - std::optional< std::string > status_callback_event = std::nullopt, - std::optional< std::string > status_callback = std::nullopt, - const std::string & status_callback_method = "POST", - std::optional< std::string > recording_status_callback = std::nullopt, - const std::string & recording_status_callback_method = "POST", - const std::string & recording_status_callback_event = "completed", - std::optional< json > result = std::nullopt - ) - ``` - - - - ```cpp - FunctionResult & join_conference( - const std::string & name, - const JoinConferenceOptions & opts - ) - ``` - - - -#### Parameters (Overload 1) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -#### Parameters (Overload 2) - - - - - -#### Returns (Overload 1) - -`FunctionResult &` - -#### Returns (Overload 2) - -`FunctionResult &` - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 308. - -*** - -### join\_room - -#### Signature - -```cpp -FunctionResult & join_room(const std::string & name) -``` - -#### Parameters - - - -#### Returns - -`FunctionResult &` - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 333. - -*** - -### pay - -#### Signature - -```cpp -FunctionResult & pay( - const std::string & payment_connector_url, - const std::string & input_method = "dtmf", - const std::string & status_url = "", - const std::string & payment_method = "credit-card", - int timeout = 5, - int max_attempts = 1, - bool security_code = true, - const std::string & postal_code = "true", - int min_postal_code_length = 0, - const std::string & token_type = "reusable", - const std::string & charge_amount = "", - const std::string & currency = "usd", - const std::string & language = "en-US", - const std::string & voice = "woman", - const std::string & description = "", - const std::string & valid_card_types = "visa mastercard amex", - const std::vector< json > & parameters = {}, - const std::vector< json > & prompts = {}, - const std::string & ai_response = "The payment status is ${pay_result}, do not mention anything else about collecting payment if successful." -) -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -#### Returns - -`FunctionResult &` - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 360. - -*** - -### play\_background\_file - -#### Signature - -```cpp -FunctionResult & play_background_file( - const std::string & filename, - bool wait = false -) -``` - -#### Parameters - - - - - -#### Returns - -`FunctionResult &` - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 247. - -*** - -### record\_call - -Typed overload — format/direction as the RecordFormat / RecordDirection closed-set enums for call-site typo checking. Declared after the std::string overload (equal arity) so the enumerator's dedup keeps the string signature canonical; normalizes the enums to their wire strings via record\_format\_value/record\_direction\_value and delegates to the std::string record\_call, so the emitted SWML is byte-identical. - -#### Signature - - - - ```cpp - FunctionResult & record_call( - const std::string & control_id = "", - bool stereo = false, - const std::string & format = "wav", - const std::string & direction = "both", - const std::string & terminators = "", - bool beep = false, - double input_sensitivity = 44.0, - std::optional< double > initial_timeout = std::nullopt, - std::optional< double > end_silence_timeout = std::nullopt, - std::optional< double > max_length = std::nullopt, - const std::string & status_url = "" - ) - ``` - - - - ```cpp - FunctionResult & record_call( - const std::string & control_id, - bool stereo, - RecordFormat format, - RecordDirection direction, - const std::string & terminators = "", - bool beep = false, - double input_sensitivity = 44.0, - std::optional< double > initial_timeout = std::nullopt, - std::optional< double > end_silence_timeout = std::nullopt, - std::optional< double > max_length = std::nullopt, - const std::string & status_url = "" - ) - ``` - - - -#### Parameters (Overload 1) - - - - - - - - - - - - - - - - - - - - - - - -#### Parameters (Overload 2) - - - - - - - - - - - - - - - - - - - - - - - -#### Returns (Overload 1) - -`FunctionResult &` - -#### Returns (Overload 2) - -`FunctionResult &` - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 249. - -*** - -### remove\_global\_data - -#### Signature - -```cpp -FunctionResult & remove_global_data(const json & keys) -``` - -#### Parameters - - - -#### Returns - -`FunctionResult &` - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 230. - -*** - -### remove\_metadata - -#### Signature - -```cpp -FunctionResult & remove_metadata(const json & keys) -``` - -#### Parameters - - - -#### Returns - -`FunctionResult &` - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 232. - -*** - -### replace\_in\_history - -#### Signature - -```cpp -FunctionResult & replace_in_history(const json & text) -``` - -#### Parameters - - - -#### Returns - -`FunctionResult &` - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 240. - -*** - -### rpc\_ai\_message - -#### Signature - -```cpp -FunctionResult & rpc_ai_message( - const std::string & call_id, - const std::string & message_text, - const std::string & role = "system" -) -``` - -#### Parameters - - - - - - - -#### Returns - -`FunctionResult &` - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 391. - -*** - -### rpc\_ai\_unhold - -#### Signature - -```cpp -FunctionResult & rpc_ai_unhold(const std::string & call_id) -``` - -#### Parameters - - - -#### Returns - -`FunctionResult &` - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 393. - -*** - -### rpc\_dial - -#### Signature - -```cpp -FunctionResult & rpc_dial( - const std::string & to_number, - const std::string & from_number, - const std::string & dest_swml, - const std::string & device_type = "phone" -) -``` - -#### Parameters - - - - - - - - - -#### Returns - -`FunctionResult &` - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 388. - -*** - -### say - -#### Signature - -```cpp -FunctionResult & say(const std::string & text) -``` - -#### Parameters - - - -#### Returns - -`FunctionResult &` - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 246. - -*** - -### send\_sms - -#### Signature - -```cpp -FunctionResult & send_sms( - const std::string & to, - const std::string & from, - const std::string & body = "", - const std::vector< std::string > & media = {}, - const std::vector< std::string > & tags = {}, - const std::string & region = "" -) -``` - -#### Parameters - - - - - - - - - - - - - -#### Returns - -`FunctionResult &` - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 355. - -*** - -### set\_end\_of\_speech\_timeout - -#### Signature - -```cpp -FunctionResult & set_end_of_speech_timeout(int milliseconds) -``` - -#### Parameters - - - -#### Returns - -`FunctionResult &` - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 286. - -*** - -### set\_metadata - -#### Signature - -```cpp -FunctionResult & set_metadata(const json & data) -``` - -#### Parameters - - - -#### Returns - -`FunctionResult &` - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 231. - -*** - -### set\_post\_process - -#### Signature - -```cpp -FunctionResult & set_post_process(bool pp) -``` - -#### Parameters - - - -#### Returns - -`FunctionResult &` - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 206. - -*** - -### set\_response - -#### Signature - -```cpp -FunctionResult & set_response(const std::string & response) -``` - -#### Parameters - - - -#### Returns - -`FunctionResult &` - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 205. - -*** - -### set\_speech\_event\_timeout - -#### Signature - -```cpp -FunctionResult & set_speech_event_timeout(int milliseconds) -``` - -#### Parameters - - - -#### Returns - -`FunctionResult &` - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 287. - -*** - -### simulate\_user\_input - -#### Signature - -```cpp -FunctionResult & simulate_user_input(const std::string & text) -``` - -#### Parameters - - - -#### Returns - -`FunctionResult &` - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 292. - -*** - -### sip\_refer - -#### Signature - -```cpp -FunctionResult & sip_refer(const std::string & to_uri) -``` - -#### Parameters - - - -#### Returns - -`FunctionResult &` - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 334. - -*** - -### stop - -#### Signature - -```cpp -FunctionResult & stop() -``` - -#### Returns - -`FunctionResult &` - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 223. - -*** - -### stop\_background\_file - -#### Signature - -```cpp -FunctionResult & stop_background_file() -``` - -#### Returns - -`FunctionResult &` - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 248. - -*** - -### stop\_record\_call - -#### Signature - -```cpp -FunctionResult & stop_record_call(const std::string & control_id = "") -``` - -#### Parameters - - - -#### Returns - -`FunctionResult &` - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 278. - -*** - -### stop\_tap - -#### Signature - -```cpp -FunctionResult & stop_tap(const std::string & control_id = "") -``` - -#### Parameters - - - -#### Returns - -`FunctionResult &` - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 354. - -*** - -### switch\_context - -#### Signature - -```cpp -FunctionResult & switch_context( - const std::string & system_prompt = "", - const std::string & user_prompt = "", - bool consolidate = false, - bool full_reset = false -) -``` - -#### Parameters - - - - - - - - - -#### Returns - -`FunctionResult &` - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 236. - -*** - -### swml\_change\_context - -#### Signature - -```cpp -FunctionResult & swml_change_context(const std::string & context_name) -``` - -#### Parameters - - - -#### Returns - -`FunctionResult &` - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 235. - -*** - -### swml\_change\_step - -#### Signature - -```cpp -FunctionResult & swml_change_step(const std::string & step_name) -``` - -#### Parameters - - - -#### Returns - -`FunctionResult &` - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 234. - -*** - -### swml\_transfer - -#### Signature - -```cpp -FunctionResult & swml_transfer( - const std::string & dest, - const std::string & ai_response, - bool final = true -) -``` - -#### Parameters - - - - - - - -#### Returns - -`FunctionResult &` - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 216. - -*** - -### swml\_user\_event - -#### Signature - -```cpp -FunctionResult & swml_user_event(const json & event_data) -``` - -#### Parameters - - - -#### Returns - -`FunctionResult &` - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 233. - -*** - -### tap - -Typed overload — direction/codec as the TapDirection / Codec closed-set enums for call-site typo checking. Declared after the std::string overload (equal arity) so the enumerator's dedup keeps the string signature canonical; normalizes the enums via tap\_direction\_value/codec\_value and delegates to the std::string tap, so the emitted SWML is byte-identical. NOTE the tap direction set is \{speak,hear,both\} (hear, not record\_call's listen). - -#### Signature - - - - ```cpp - FunctionResult & tap( - const std::string & uri, - const std::string & control_id = "", - const std::string & direction = "both", - const std::string & codec = "PCMU", - int rtp_ptime = 20, - const std::string & status_url = "" - ) - ``` - - - - ```cpp - FunctionResult & tap( - const std::string & uri, - const std::string & control_id, - TapDirection direction, - Codec codec, - int rtp_ptime = 20, - const std::string & status_url = "" - ) - ``` - - - -#### Parameters (Overload 1) - - - - - - - - - - - - - -#### Parameters (Overload 2) - - - - - - - - - - - - - -#### Returns (Overload 1) - -`FunctionResult &` - -#### Returns (Overload 2) - -`FunctionResult &` - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 335. - -*** - -### to\_json - -**Modifiers:** `const` - -#### Signature - -```cpp -json to_json() const -``` - -#### Returns - -`json` - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 418. - -*** - -### to\_string - -**Modifiers:** `const` - -#### Signature - -```cpp -std::string to_string(int indent = -1) const -``` - -#### Parameters - - - -#### Returns - -`std::string` - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 419. - -*** - -### toggle\_functions - -#### Signature - -```cpp -FunctionResult & toggle_functions(const json & function_toggles) -``` - -#### Parameters - - - -#### Returns - -`FunctionResult &` - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 288. - -*** - -### update\_global\_data - -#### Signature - -```cpp -FunctionResult & update_global_data(const json & data) -``` - -#### Parameters - - - -#### Returns - -`FunctionResult &` - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 229. - -*** - -### update\_settings - -#### Signature - -```cpp -FunctionResult & update_settings(const json & settings) -``` - -#### Parameters - - - -#### Returns - -`FunctionResult &` - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 291. - -*** - -### wait\_for\_user - -#### Signature - -```cpp -FunctionResult & wait_for_user( - std::optional< bool > enabled = std::nullopt, - std::optional< int > timeout = std::nullopt, - bool answer_first = false -) -``` - -#### Parameters - - - - - - - -#### Returns - -`FunctionResult &` - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 220. - -## Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 197. diff --git a/fern/products/sdk-reference/cpp/signalwire/swaig/index.mdx b/fern/products/sdk-reference/cpp/signalwire/swaig/index.mdx deleted file mode 100644 index a77a5a88c0..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/swaig/index.mdx +++ /dev/null @@ -1,721 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/swaig" -title: "swaig" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "module" - language: "cpp" - qualified_name: "signalwire::swaig" - parent: "signalwire" - module: "signalwire" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp" ---- -# `swaig` - -## Signature - -```cpp -namespace signalwire::swaig -``` - -## Classes - - - - A closed-set field that accepts EITHER the typed enum OR a bare string. JoinConferenceOptions::beep = ConferenceBeep::OnEnter; and ... = "onEnter"; both compile and resolve to the same wire string; the open-string path keeps parity with Python's bare str (the validation in join\_conference then rejects out-of-set strings exactly as Python does). Templated on the enum type plus its \*\_value() mapper so one definition covers all four sets. - - - - Builder for SWAIG function results with 40+ action methods. Every method returns \*this for chaining. - - - - Options bag for FunctionResult::join\_conference. Every field is std::optional and unset means "Python default" — so a default-constructed JoinConferenceOptions collapses to the bare conference-name string form, matching the reference's simple case. Closed sets use the enum-or-string wrapper above; open fields are plain std::optional. result is a free-form json (Python's Optional\[Any]). - - - - A typed, fluent builder for a SWAIG tool's parameters JSON-Schema object. Construct, chain property declarations, optionally mark some required, then call to\_json() to get the wire json. The result is byte-identical to the equivalent hand-written json::object(...) blob. - - - - Definition of a SWAIG tool (function). - - - -## Functions - -### callback\_method\_value - -**Modifiers:** `inline` - -#### Signature - -```cpp -std::string callback_method_value(CallbackMethod v) -``` - -#### Parameters - - - -#### Returns - -`std::string` - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 60. - -*** - -### codec\_value - -**Modifiers:** `inline` - -#### Signature - -```cpp -std::string codec_value(Codec v) -``` - -#### Parameters - - - -#### Returns - -`std::string` - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 131. - -*** - -### codec\_values - -**Modifiers:** `inline` - -#### Signature - -```cpp -std::vector< std::string > codec_values() -``` - -#### Returns - -`std::vector< std::string >` - -#### Source - -[`include/signalwire/swaig/parameter_schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/parameter_schema.hpp) - -Line 79. - -*** - -### conference\_beep\_value - -**Modifiers:** `inline` - -#### Signature - -```cpp -std::string conference_beep_value(ConferenceBeep v) -``` - -#### Parameters - - - -#### Returns - -`std::string` - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 37. - -*** - -### conference\_record\_value - -**Modifiers:** `inline` - -#### Signature - -```cpp -std::string conference_record_value(ConferenceRecord v) -``` - -#### Parameters - - - -#### Returns - -`std::string` - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 46. - -*** - -### conference\_trim\_value - -**Modifiers:** `inline` - -#### Signature - -```cpp -std::string conference_trim_value(ConferenceTrim v) -``` - -#### Parameters - - - -#### Returns - -`std::string` - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 53. - -*** - -### record\_direction\_value - -**Modifiers:** `inline` - -#### Signature - -```cpp -std::string record_direction_value(RecordDirection v) -``` - -#### Parameters - - - -#### Returns - -`std::string` - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 115. - -*** - -### record\_direction\_values - -**Modifiers:** `inline` - -#### Signature - -```cpp -std::vector< std::string > record_direction_values() -``` - -#### Returns - -`std::vector< std::string >` - -#### Source - -[`include/signalwire/swaig/parameter_schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/parameter_schema.hpp) - -Line 69. - -*** - -### record\_format\_value - -**Modifiers:** `inline` - -#### Signature - -```cpp -std::string record_format_value(RecordFormat v) -``` - -#### Parameters - - - -#### Returns - -`std::string` - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 107. - -*** - -### record\_format\_values - -Helper: the closed-set values for the Tier-1 SWAIG enums, as the exact wire strings, ready to hand to enum\_of(...). These reuse the SAME \*\_value() normalization point as the typed FunctionResult overloads, so a schema built with record\_format\_values() lists precisely the strings FunctionResult::record\_call accepts — one source of truth for each set. - -**Modifiers:** `inline` - -#### Signature - -```cpp -std::vector< std::string > record_format_values() -``` - -#### Returns - -`std::vector< std::string >` - -#### Source - -[`include/signalwire/swaig/parameter_schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/parameter_schema.hpp) - -Line 64. - -*** - -### tap\_direction\_value - -**Modifiers:** `inline` - -#### Signature - -```cpp -std::string tap_direction_value(TapDirection v) -``` - -#### Parameters - - - -#### Returns - -`std::string` - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 123. - -*** - -### tap\_direction\_values - -**Modifiers:** `inline` - -#### Signature - -```cpp -std::vector< std::string > tap_direction_values() -``` - -#### Returns - -`std::vector< std::string >` - -#### Source - -[`include/signalwire/swaig/parameter_schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/parameter_schema.hpp) - -Line 74. - -*** - -### to\_string - -ADL to\_string overloads so these enums stringify the same way the \*\_value() mappers do (the single wire-string normalization point). - -**Modifiers:** `inline` - -#### Signature - - - - ```cpp - std::string to_string(RecordFormat v) - ``` - - - - ```cpp - std::string to_string(RecordDirection v) - ``` - - - - ```cpp - std::string to_string(TapDirection v) - ``` - - - - ```cpp - std::string to_string(Codec v) - ``` - - - -#### Parameters (Overload 1) - - - -#### Parameters (Overload 2) - - - -#### Parameters (Overload 3) - - - -#### Parameters (Overload 4) - - - -#### Returns (Overload 1) - -`std::string` - -#### Returns (Overload 2) - -`std::string` - -#### Returns (Overload 3) - -`std::string` - -#### Returns (Overload 4) - -`std::string` - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 141. - -## Type Aliases - -### BeepField - -#### Signature - -```cpp -typedef EnumOrString< ConferenceBeep, &conference_beep_value > BeepField -``` - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 163. - -*** - -### json - -#### Signature - -```cpp -typedef nlohmann::json json -``` - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 11. - -*** - -### MethodField - -#### Signature - -```cpp -typedef EnumOrString< CallbackMethod, &callback_method_value > MethodField -``` - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 166. - -*** - -### RecordField - -#### Signature - -```cpp -typedef EnumOrString< ConferenceRecord, &conference_record_value > RecordField -``` - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 164. - -*** - -### ToolHandler - -#### Signature - -```cpp -typedef std::function< FunctionResult(const json &args, const json &raw_data)> ToolHandler -``` - -#### Source - -[`include/signalwire/swaig/tool_definition.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/tool_definition.hpp) - -Line 12. - -*** - -### TrimField - -#### Signature - -```cpp -typedef EnumOrString< ConferenceTrim, &conference_trim_value > TrimField -``` - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 165. - -## Enums - -### CallbackMethod - -status\_callback\_method / recording\_status\_callback\_method — HTTP verb. - -#### Signature - -```cpp -enum class CallbackMethod -``` - -#### Variants - - - - - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 32. - -*** - -### Codec - -Media codec for FunctionResult::tap (SWAIG tap only). Mirrors the reference's codec in \{"PCMU","PCMA"\} validation. The wire strings are upper-case. Distinct from the wider RELAY codec set — do not unify. - -#### Signature - -```cpp -enum class Codec -``` - -#### Variants - - - - - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 105. - -*** - -### ConferenceBeep - -beep — when the conference plays an enter/leave tone. - -#### Signature - -```cpp -enum class ConferenceBeep -``` - -#### Variants - - - - - - - - - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 26. - -*** - -### ConferenceRecord - -record — conference recording mode. - -#### Signature - -```cpp -enum class ConferenceRecord -``` - -#### Variants - - - - - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 28. - -*** - -### ConferenceTrim - -trim — leading/trailing silence handling on recordings. - -#### Signature - -```cpp -enum class ConferenceTrim -``` - -#### Variants - - - - - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 30. - -*** - -### RecordDirection - -Audio direction for FunctionResult::record\_call. Mirrors the reference's direction in \{"speak","listen","both"\} validation. NOTE: differs from TapDirection — record\_call uses listen, tap uses hear. - -#### Signature - -```cpp -enum class RecordDirection -``` - -#### Variants - - - - - - - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 95. - -*** - -### RecordFormat - -Recording container format for FunctionResult::record\_call. Mirrors the reference's format in \{"wav","mp3","mp4"\} validation. - -#### Signature - -```cpp -enum class RecordFormat -``` - -#### Variants - - - - - - - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 90. - -*** - -### TapDirection - -Audio direction for FunctionResult::tap. Mirrors the reference's direction in \{"speak","hear","both"\} validation. NOTE: differs from RecordDirection — tap uses hear, record\_call uses listen. - -#### Signature - -```cpp -enum class TapDirection -``` - -#### Variants - - - - - - - -#### Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 100. - -## Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 9. diff --git a/fern/products/sdk-reference/cpp/signalwire/swaig/join-conference-options/index.mdx b/fern/products/sdk-reference/cpp/signalwire/swaig/join-conference-options/index.mdx deleted file mode 100644 index 5a746c2981..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/swaig/join-conference-options/index.mdx +++ /dev/null @@ -1,67 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/swaig/join-conference-options" -title: "JoinConferenceOptions" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::swaig::JoinConferenceOptions" - parent: "signalwire::swaig" - module: "signalwire.swaig" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp" - visibility: "public" ---- -# `JoinConferenceOptions` - -Options bag for FunctionResult::join\_conference. -Every field is std::optional and unset means "Python default" — so a default-constructed JoinConferenceOptions collapses to the bare conference-name string form, matching the reference's simple case. Closed sets use the enum-or-string wrapper above; open fields are plain std::optional. result is a free-form json (Python's Optional\[Any]). - -## Signature - -```cpp -struct signalwire::swaig::JoinConferenceOptions -``` - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -## Source - -[`include/signalwire/swaig/function_result.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/function_result.hpp) - -Line 175. diff --git a/fern/products/sdk-reference/cpp/signalwire/swaig/parameter-schema/index.mdx b/fern/products/sdk-reference/cpp/signalwire/swaig/parameter-schema/index.mdx deleted file mode 100644 index 30f557fece..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/swaig/parameter-schema/index.mdx +++ /dev/null @@ -1,492 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/swaig/parameter-schema" -title: "ParameterSchema" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::swaig::ParameterSchema" - parent: "signalwire::swaig" - module: "signalwire.swaig" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/parameter_schema.hpp" - visibility: "public" ---- -# `ParameterSchema` - -A typed, fluent builder for a SWAIG tool's parameters JSON-Schema object. -Construct, chain property declarations, optionally mark some required, then call to\_json() to get the wire json. The result is byte-identical to the equivalent hand-written json::object(...) blob. - -## Signature - -```cpp -class signalwire::swaig::ParameterSchema -``` - -## Methods - -### array\_of - -Add a "type":"array" property whose items are the given scalar JSON kind (e.g. array\_of("tags", "string", "...") → \{"type":"array", "items":\{"type":"string"\}\}). - -**Modifiers:** `inline` - -#### Signature - - - - ```cpp - ParameterSchema & array_of( - const std::string & name, - const std::string & item_type, - const std::string & description = "" - ) - ``` - - - - ```cpp - ParameterSchema & array_of( - const std::string & name, - const ParameterSchema & item_schema, - const std::string & description = "" - ) - ``` - - - -#### Parameters (Overload 1) - - - - - - - -#### Parameters (Overload 2) - - - - - - - -#### Returns (Overload 1) - -`ParameterSchema &` - -#### Returns (Overload 2) - -`ParameterSchema &` - -#### Source - -[`include/signalwire/swaig/parameter_schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/parameter_schema.hpp) - -Line 147. - -*** - -### boolean - -Add a "type":"boolean" property. - -**Modifiers:** `inline` - -#### Signature - -```cpp -ParameterSchema & boolean( - const std::string & name, - const std::string & description = "" -) -``` - -#### Parameters - - - - - -#### Returns - -`ParameterSchema &` - -#### Source - -[`include/signalwire/swaig/parameter_schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/parameter_schema.hpp) - -Line 116. - -*** - -### empty - -True if no properties have been declared yet. - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -bool empty() const -``` - -#### Returns - -`bool` - -#### Source - -[`include/signalwire/swaig/parameter_schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/parameter_schema.hpp) - -Line 246. - -*** - -### enum\_of - -Add a "type":"string" property constrained to a closed set of values ("enum":\[...]). Pass the values explicitly, or feed one of the Tier-1 helpers (record\_format\_values(), codec\_values(), …) so the schema's accepted set matches the typed FunctionResult overloads exactly — INTEGRATING the RecordFormat/RecordDirection/TapDirection/ Codec enums via their \*\_value() wire strings. - -**Modifiers:** `inline` - -#### Signature - -```cpp -ParameterSchema & enum_of( - const std::string & name, - const std::vector< std::string > & values, - const std::string & description = "" -) -``` - -#### Parameters - - - - - - - -#### Returns - -`ParameterSchema &` - -#### Source - -[`include/signalwire/swaig/parameter_schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/parameter_schema.hpp) - -Line 129. - -*** - -### integer - -Add a "type":"integer" property. - -**Modifiers:** `inline` - -#### Signature - -```cpp -ParameterSchema & integer( - const std::string & name, - const std::string & description = "" -) -``` - -#### Parameters - - - - - -#### Returns - -`ParameterSchema &` - -#### Source - -[`include/signalwire/swaig/parameter_schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/parameter_schema.hpp) - -Line 110. - -*** - -### number - -Add a "type":"number" property (JSON number — floating point). - -**Modifiers:** `inline` - -#### Signature - -```cpp -ParameterSchema & number( - const std::string & name, - const std::string & description = "" -) -``` - -#### Parameters - - - - - -#### Returns - -`ParameterSchema &` - -#### Source - -[`include/signalwire/swaig/parameter_schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/parameter_schema.hpp) - -Line 104. - -*** - -### object\_of - -Add a nested "type":"object" property, whose properties/required come from another ParameterSchema. The nested schema is rendered via to\_json() and merged with this property's description, producing the same \{"type":"object","properties":\{...\},"required":\[...]\} a hand-written nested blob would. - -**Modifiers:** `inline` - -#### Signature - -```cpp -ParameterSchema & object_of( - const std::string & name, - const ParameterSchema & nested, - const std::string & description = "" -) -``` - -#### Parameters - - - - - - - -#### Returns - -`ParameterSchema &` - -#### Source - -[`include/signalwire/swaig/parameter_schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/parameter_schema.hpp) - -Line 179. - -*** - -### operator json - -Implicit conversion so a ParameterSchema can be passed straight to define\_tool(name, desc, schema, handler) (which takes const json&) without an explicit .to\_json(). Keeps the typed builder a drop-in for the raw-json parameter. - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -void operator json() const -``` - -#### Source - -[`include/signalwire/swaig/parameter_schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/parameter_schema.hpp) - -Line 241. - -*** - -### ParameterSchema - -#### Signature - -```cpp -void ParameterSchema() -``` - -#### Source - -[`include/signalwire/swaig/parameter_schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/parameter_schema.hpp) - -Line 91. - -*** - -### property - -Add a property from a raw, pre-built JSON-Schema fragment, for shapes the typed kinds above don't cover (custom format, minimum, oneOf, …). Keeps the builder a strict superset of the hand-written path: you can always drop down to raw json for one property without abandoning the builder for the rest. - -**Modifiers:** `inline` - -#### Signature - -```cpp -ParameterSchema & property(const std::string & name, const json & schema) -``` - -#### Parameters - - - - - -#### Returns - -`ParameterSchema &` - -#### Source - -[`include/signalwire/swaig/parameter_schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/parameter_schema.hpp) - -Line 195. - -*** - -### require - -Append a single name to the required list (additive variant). - -**Modifiers:** `inline` - -#### Signature - -```cpp -ParameterSchema & require(const std::string & name) -``` - -#### Parameters - - - -#### Returns - -`ParameterSchema &` - -#### Source - -[`include/signalwire/swaig/parameter_schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/parameter_schema.hpp) - -Line 211. - -*** - -### required - -Mark one or more declared properties as required. Replaces any previously-set required list (call once with the full set, mirroring the single "required":\[...] array in the hand-written form). - -**Modifiers:** `inline` - -#### Signature - -```cpp -ParameterSchema & required(const std::vector< std::string > & names) -``` - -#### Parameters - - - -#### Returns - -`ParameterSchema &` - -#### Source - -[`include/signalwire/swaig/parameter_schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/parameter_schema.hpp) - -Line 205. - -*** - -### size - -Number of declared properties. - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -std::size_t size() const -``` - -#### Returns - -`std::size_t` - -#### Source - -[`include/signalwire/swaig/parameter_schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/parameter_schema.hpp) - -Line 249. - -*** - -### string - -Add a "type":"string" property. - -**Modifiers:** `inline` - -#### Signature - -```cpp -ParameterSchema & string( - const std::string & name, - const std::string & description = "" -) -``` - -#### Parameters - - - - - -#### Returns - -`ParameterSchema &` - -#### Source - -[`include/signalwire/swaig/parameter_schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/parameter_schema.hpp) - -Line 98. - -*** - -### to\_json - -Render to the wire json: a JSON-Schema object with properties and (when any were marked) required. BYTE-IDENTICAL to the equivalent hand-written json::object(\{\{"type","object"\},\{"properties",\{...\}\}, \{"required",\[...]\}\}). -\[\[nodiscard]]: the rendered schema is the builder's whole output; discarding it discards the build. - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json to_json() const -``` - -#### Returns - -`json` - -#### Source - -[`include/signalwire/swaig/parameter_schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/parameter_schema.hpp) - -Line 225. - -## Source - -[`include/signalwire/swaig/parameter_schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/parameter_schema.hpp) - -Line 89. diff --git a/fern/products/sdk-reference/cpp/signalwire/swaig/tool-definition/index.mdx b/fern/products/sdk-reference/cpp/signalwire/swaig/tool-definition/index.mdx deleted file mode 100644 index f3def33e41..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/swaig/tool-definition/index.mdx +++ /dev/null @@ -1,70 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/swaig/tool-definition" -title: "ToolDefinition" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::swaig::ToolDefinition" - parent: "signalwire::swaig" - module: "signalwire.swaig" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/tool_definition.hpp" - visibility: "public" ---- -# `ToolDefinition` - -Definition of a SWAIG tool (function). - -## Signature - -```cpp -struct signalwire::swaig::ToolDefinition -``` - -## Properties - - - - - - - - - - - -## Methods - -### to\_swaig\_json - -Render to the SWAIG function JSON format (for inclusion in SWML) \[\[nodiscard]]: the rendered JSON is the output; discarding it is a bug. - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json to_swaig_json(const std::string & web_hook_url = "") const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/swaig/tool_definition.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/tool_definition.hpp) - -Line 24. - -## Source - -[`include/signalwire/swaig/tool_definition.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swaig/tool_definition.hpp) - -Line 15. diff --git a/fern/products/sdk-reference/cpp/signalwire/swml/document/index.mdx b/fern/products/sdk-reference/cpp/signalwire/swml/document/index.mdx deleted file mode 100644 index 5b820ba4f7..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/swml/document/index.mdx +++ /dev/null @@ -1,274 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/swml/document" -title: "Document" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::swml::Document" - parent: "signalwire::swml" - module: "signalwire.swml" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/document.hpp" - visibility: "public" ---- -# `Document` - -A complete SWML document with version and sections. - -## Signature - -```cpp -class signalwire::swml::Document -``` - -## Methods - -### add\_verb - -Add a verb to the main section. - -**Modifiers:** `inline` - -#### Signature - -```cpp -Document & add_verb(const std::string & verb_name, const json & params) -``` - -#### Parameters - - - - - -#### Returns - -`Document &` - -#### Source - -[`include/signalwire/swml/document.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/document.hpp) - -Line 81. - -*** - -### add\_verb\_to\_section - -Add a verb to a specific section. - -**Modifiers:** `inline` - -#### Signature - -```cpp -Document & add_verb_to_section( - const std::string & section_name, - const std::string & verb_name, - const json & params -) -``` - -#### Parameters - - - - - - - -#### Returns - -`Document &` - -#### Source - -[`include/signalwire/swml/document.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/document.hpp) - -Line 87. - -*** - -### Document - -**Modifiers:** `inline` - -#### Signature - -```cpp -void Document() -``` - -#### Source - -[`include/signalwire/swml/document.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/document.hpp) - -Line 55. - -*** - -### has\_section - -Check if a section exists. - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -bool has_section(const std::string & name) const -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`include/signalwire/swml/document.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/document.hpp) - -Line 95. - -*** - -### main - -Get the main section. - -**Modifiers:** `inline` - -#### Signature - -```cpp -Section & main() -``` - -#### Returns - -`Section &` - -#### Source - -[`include/signalwire/swml/document.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/document.hpp) - -Line 76. - -*** - -### section - -Get or create a section by name. - -**Modifiers:** `inline` - -#### Signature - -```cpp -Section & section(const std::string & name) -``` - -#### Parameters - - - -#### Returns - -`Section &` - -#### Source - -[`include/signalwire/swml/document.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/document.hpp) - -Line 66. - -*** - -### set\_version - -Set the document version. - -**Modifiers:** `inline` - -#### Signature - -```cpp -Document & set_version(const std::string & version) -``` - -#### Parameters - - - -#### Returns - -`Document &` - -#### Source - -[`include/signalwire/swml/document.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/document.hpp) - -Line 60. - -*** - -### to\_json - -Render to JSON. - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json to_json() const -``` - -#### Returns - -`json` - -#### Source - -[`include/signalwire/swml/document.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/document.hpp) - -Line 100. - -*** - -### to\_string - -Render to JSON string. - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -std::string to_string(int indent = -1) const -``` - -#### Parameters - - - -#### Returns - -`std::string` - -#### Source - -[`include/signalwire/swml/document.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/document.hpp) - -Line 124. - -## Source - -[`include/signalwire/swml/document.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/document.hpp) - -Line 53. diff --git a/fern/products/sdk-reference/cpp/signalwire/swml/index.mdx b/fern/products/sdk-reference/cpp/signalwire/swml/index.mdx deleted file mode 100644 index 30f406ac5c..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/swml/index.mdx +++ /dev/null @@ -1,97 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/swml" -title: "swml" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "module" - language: "cpp" - qualified_name: "signalwire::swml" - parent: "signalwire" - module: "signalwire" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/document.hpp" ---- -# `swml` - -## Signature - -```cpp -namespace signalwire::swml -``` - -## Constants - - - -## Classes - - - - A complete SWML document with version and sections. - - - - Schema loader that extracts verb definitions from schema.json. - - - - A named section containing an ordered list of verbs. - - - - Base SWML service providing HTTP server, auth, and verb methods. Also hosts SWAIG functions: any Service (sidecar, non-agent verb host) can register tools and serve them on /swaig without subclassing AgentBase. - - - - Represents a single SWML verb instance, e.g. \{"answer": \{"max\_duration": 3600\}\}. - - - - Represents a verb definition extracted from the SWML schema. - - - -## Functions - -### get\_embedded\_schema - -Get the embedded schema JSON string. - -#### Signature - -```cpp -const std::string & get_embedded_schema() -``` - -#### Returns - -`const std::string &` - -#### Source - -[`src/swml/schema.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/swml/schema.cpp) - -Line 52. - -## Type Aliases - -### json - -#### Signature - -```cpp -typedef nlohmann::json json -``` - -#### Source - -[`include/signalwire/swml/document.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/document.hpp) - -Line 12. - -## Source - -[`include/signalwire/swml/document.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/document.hpp) - -Line 10. diff --git a/fern/products/sdk-reference/cpp/signalwire/swml/schema/index.mdx b/fern/products/sdk-reference/cpp/signalwire/swml/schema/index.mdx deleted file mode 100644 index f1db43aee7..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/swml/schema/index.mdx +++ /dev/null @@ -1,220 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/swml/schema" -title: "Schema" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::swml::Schema" - parent: "signalwire::swml" - module: "signalwire.swml" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/schema.hpp" - visibility: "public" ---- -# `Schema` - -Schema loader that extracts verb definitions from schema.json. - -## Signature - -```cpp -class signalwire::swml::Schema -``` - -## Methods - -### find\_verb - -Get a specific verb definition by verb name. - -**Modifiers:** `const` - -#### Signature - -```cpp -const VerbDefinition * find_verb(const std::string & verb_name) const -``` - -#### Parameters - - - -#### Returns - -`const VerbDefinition *` - -#### Source - -[`include/signalwire/swml/schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/schema.hpp) - -Line 41. - -*** - -### load\_embedded - -Load the embedded schema. - -#### Signature - -```cpp -bool load_embedded() -``` - -#### Returns - -`bool` - -#### Source - -[`include/signalwire/swml/schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/schema.hpp) - -Line 35. - -*** - -### load\_from\_file - -Load schema from a file path. - -#### Signature - -```cpp -bool load_from_file(const std::string & path) -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`include/signalwire/swml/schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/schema.hpp) - -Line 32. - -*** - -### load\_from\_string - -Load schema from a JSON string. - -#### Signature - -```cpp -bool load_from_string(const std::string & schema_json) -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`include/signalwire/swml/schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/schema.hpp) - -Line 29. - -*** - -### raw - -Get the raw schema JSON. - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -const json & raw() const -``` - -#### Returns - -`const json &` - -#### Source - -[`include/signalwire/swml/schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/schema.hpp) - -Line 47. - -*** - -### Schema - -#### Signature - -```cpp -void Schema() -``` - -#### Source - -[`include/signalwire/swml/schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/schema.hpp) - -Line 24. - -*** - -### verb\_definitions - -Get all verb definitions. - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -const std::vector< VerbDefinition > & verb_definitions() const -``` - -#### Returns - -`const std::vector< VerbDefinition > &` - -#### Source - -[`include/signalwire/swml/schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/schema.hpp) - -Line 38. - -*** - -### verb\_names - -Get all verb names. - -**Modifiers:** `const` - -#### Signature - -```cpp -std::vector< std::string > verb_names() const -``` - -#### Returns - -`std::vector< std::string >` - -#### Source - -[`include/signalwire/swml/schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/schema.hpp) - -Line 44. - -## Source - -[`include/signalwire/swml/schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/schema.hpp) - -Line 22. diff --git a/fern/products/sdk-reference/cpp/signalwire/swml/section/index.mdx b/fern/products/sdk-reference/cpp/signalwire/swml/section/index.mdx deleted file mode 100644 index df52e4dbe0..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/swml/section/index.mdx +++ /dev/null @@ -1,126 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/swml/section" -title: "Section" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::swml::Section" - parent: "signalwire::swml" - module: "signalwire.swml" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/document.hpp" - visibility: "public" ---- -# `Section` - -A named section containing an ordered list of verbs. - -## Signature - -```cpp -struct signalwire::swml::Section -``` - -## Properties - - - - - -## Methods - -### add\_verb - -**Modifiers:** `inline` - -#### Signature - - - - ```cpp - void add_verb(const Verb & verb) - ``` - - - - ```cpp - void add_verb(const std::string & verb_name, const json & params) - ``` - - - -#### Parameters (Overload 1) - - - -#### Parameters (Overload 2) - - - - - -#### Source - -[`include/signalwire/swml/document.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/document.hpp) - -Line 35. - -*** - -### Section - -#### Signature - - - - ```cpp - void Section() - ``` - - - - ```cpp - void Section(std::string n) - ``` - - - -#### Parameters (Overload 2) - - - -#### Source - -[`include/signalwire/swml/document.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/document.hpp) - -Line 32. - -*** - -### to\_json - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json to_json() const -``` - -#### Returns - -`json` - -#### Source - -[`include/signalwire/swml/document.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/document.hpp) - -Line 43. - -## Source - -[`include/signalwire/swml/document.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/document.hpp) - -Line 28. diff --git a/fern/products/sdk-reference/cpp/signalwire/swml/service/index.mdx b/fern/products/sdk-reference/cpp/signalwire/swml/service/index.mdx deleted file mode 100644 index 58ba7e9a67..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/swml/service/index.mdx +++ /dev/null @@ -1,2134 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/swml/service" -title: "Service" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::swml::Service" - parent: "signalwire::swml" - module: "signalwire.swml" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp" - visibility: "public" ---- -# `Service` - -Base SWML service providing HTTP server, auth, and verb methods. Also hosts SWAIG functions: any Service (sidecar, non-agent verb host) can register tools and serve them on /swaig without subclassing AgentBase. - -## Signature - -```cpp -class signalwire::swml::Service -``` - -## Methods - -### ~Service - -**Modifiers:** `virtual` - -#### Signature - -```cpp -void ~Service() -``` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 36. - -*** - -### add\_security\_headers - -Add security headers to response. - -**Modifiers:** `static` - -#### Signature - -```cpp -void add_security_headers(httplib::Response & res) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 275. - -*** - -### add\_verb - -#### Signature - -```cpp -Service & add_verb( - const std::string & section, - const std::string & verb_name, - const json & params -) -``` - -#### Parameters - - - - - - - -#### Returns - -`Service &` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 131. - -*** - -### ai - -#### Signature - -```cpp -Service & ai(const json & params = json::object()) -``` - -#### Parameters - - - -#### Returns - -`Service &` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 89. - -*** - -### amazon\_bedrock - -#### Signature - -```cpp -Service & amazon_bedrock(const json & params = json::object()) -``` - -#### Parameters - - - -#### Returns - -`Service &` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 90. - -*** - -### answer - -#### Signature - -```cpp -Service & answer(const json & params = json::object()) -``` - -#### Parameters - - - -#### Returns - -`Service &` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 88. - -*** - -### auth\_password - -Get the password for basic auth. - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -const std::string & auth_password() const -``` - -#### Returns - -`const std::string &` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 63. - -*** - -### auth\_username - -Get the username for basic auth. - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -const std::string & auth_username() const -``` - -#### Returns - -`const std::string &` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 60. - -*** - -### build\_tool\_registry\_json - -Build the introspect payload for the registered tools as a JSON string shaped like \{"tools":\[\]\}. Iterates tool\_order\_ first, falling back to map order for entries registered only via register\_swaig\_function. Stable across SDKs so the swaig-test --example CLI can parse output uniformly. Used by the SWAIG\_LIST\_TOOLS env-var path; pulled out as a separate helper so tests can assert content without invoking exit(). - -**Modifiers:** `const` - -#### Signature - -```cpp -std::string build_tool_registry_json() const -``` - -#### Returns - -`std::string` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 204. - -*** - -### cond - -#### Signature - -```cpp -Service & cond(const json & params = json::array()) -``` - -#### Parameters - - - -#### Returns - -`Service &` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 91. - -*** - -### connect - -#### Signature - -```cpp -Service & connect(const json & params = json::object()) -``` - -#### Parameters - - - -#### Returns - -`Service &` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 92. - -*** - -### define\_tool - -Define a SWAIG function the AI can call. - -#### Signature - - - - ```cpp - Service & define_tool( - const std::string & name, - const std::string & description, - const json & parameters, - swaig::ToolHandler handler, - bool secure = false - ) - ``` - - - - ```cpp - Service & define_tool(const swaig::ToolDefinition & tool) - ``` - - - -#### Parameters (Overload 1) - - - - - - - - - - - -#### Parameters (Overload 2) - - - -#### Returns (Overload 1) - -`Service &` - -#### Returns (Overload 2) - -`Service &` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 156. - -*** - -### denoise - -#### Signature - -```cpp -Service & denoise(const json & params = json::object()) -``` - -#### Parameters - - - -#### Returns - -`Service &` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 93. - -*** - -### detect\_machine - -#### Signature - -```cpp -Service & detect_machine(const json & params = json::object()) -``` - -#### Parameters - - - -#### Returns - -`Service &` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 94. - -*** - -### document - -Get the underlying SWML document. - -**Modifiers:** `inline` - -#### Signature - - - - ```cpp - Document & document() - ``` - - - - ```cpp - const Document & document() const - ``` - - - -#### Returns (Overload 1) - -`Document &` - -#### Returns (Overload 2) - -`const Document &` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 138. - -*** - -### enter\_queue - -#### Signature - -```cpp -Service & enter_queue(const json & params = json::object()) -``` - -#### Parameters - - - -#### Returns - -`Service &` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 95. - -*** - -### execute - -#### Signature - -```cpp -Service & execute(const json & params = json::object()) -``` - -#### Parameters - - - -#### Returns - -`Service &` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 96. - -*** - -### extract\_introspect\_payload - -Pure-string extractor: slice the JSON payload between **SWAIG\_TOOLS\_BEGIN** and **SWAIG\_TOOLS\_END** sentinels in a captured stdout. Returns empty string if either marker is missing or the order is wrong. Static so the swaig-test CLI / tests can reuse it. - -**Modifiers:** `static` - -#### Signature - -```cpp -std::string extract_introspect_payload(const std::string & stdout_capture) -``` - -#### Parameters - - - -#### Returns - -`std::string` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 209. - -*** - -### generate\_random\_hex - -Generate a random hex string of given byte length. - -**Modifiers:** `static` - -#### Signature - -```cpp -std::string generate_random_hex(size_t bytes) -``` - -#### Parameters - - - -#### Returns - -`std::string` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 228. - -*** - -### get\_all\_functions - -Snapshot of all registered SWAIG functions keyed by name. Returned by value so subsequent registrations don't mutate the snapshot. Python parity: ToolRegistry.get\_all\_functions. - -**Modifiers:** `const` - -#### Signature - -```cpp -std::map< std::string, swaig::ToolDefinition > get_all_functions() const -``` - -#### Returns - -`std::map< std::string, swaig::ToolDefinition >` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 190. - -*** - -### get\_basic\_auth\_credentials - -Get (user, password) — Python-canonical name. Python parity: AuthMixin.get\_basic\_auth\_credentials. - -**Modifiers:** `const` - -#### Signature - -```cpp -std::pair< std::string, std::string > get_basic_auth_credentials() const -``` - -#### Returns - -`std::pair< std::string, std::string >` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 76. - -*** - -### get\_basic\_auth\_credentials\_with\_source - -Get (user, password, source) where source is one of "provided", "environment", or "generated". Python parity: AuthMixin.get\_basic\_auth\_credentials(include\_source=True). - -**Modifiers:** `const` - -#### Signature - -```cpp -std::tuple< std::string, std::string, std::string > get_basic_auth_credentials_with_source() const -``` - -#### Returns - -`std::tuple< std::string, std::string, std::string >` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 82. - -*** - -### get\_function - -Get a registered SWAIG function definition by name. Returns nullptr when no such function is registered. Python parity: ToolRegistry.get\_function. - -**Modifiers:** `const` - -#### Signature - -```cpp -const swaig::ToolDefinition * get_function(const std::string & name) const -``` - -#### Parameters - - - -#### Returns - -`const swaig::ToolDefinition *` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 185. - -*** - -### goto\_section - -#### Signature - -```cpp -Service & goto_section(const json & params = json::object()) -``` - -#### Parameters - - - -#### Returns - -`Service &` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 97. - -*** - -### handle\_swaig\_endpoint - -Handle GET/POST /swaig (lifted from AgentBase). - -#### Signature - -```cpp -void handle_swaig_endpoint( - const httplib::Request & req, - httplib::Response & res -) -``` - -#### Parameters - - - - - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 281. - -*** - -### hangup - -#### Signature - -```cpp -Service & hangup(const json & params = json::object()) -``` - -#### Parameters - - - -#### Returns - -`Service &` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 98. - -*** - -### has\_function - -Whether a SWAIG function with the given name is registered. Python parity: ToolRegistry.has\_function. - -**Modifiers:** `const` - -#### Signature - -```cpp -bool has_function(const std::string & name) const -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 180. - -*** - -### has\_tool - -**Modifiers:** `const` - -#### Signature - -```cpp -bool has_tool(const std::string & name) const -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 171. - -*** - -### join\_conference - -#### Signature - -```cpp -Service & join_conference(const json & params = json::object()) -``` - -#### Parameters - - - -#### Returns - -`Service &` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 99. - -*** - -### join\_room - -#### Signature - -```cpp -Service & join_room(const json & params = json::object()) -``` - -#### Parameters - - - -#### Returns - -`Service &` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 100. - -*** - -### label - -#### Signature - -```cpp -Service & label(const json & params = json::object()) -``` - -#### Parameters - - - -#### Returns - -`Service &` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 101. - -*** - -### list\_tool\_names - -**Modifiers:** `const` - -#### Signature - -```cpp -std::vector< std::string > list_tool_names() const -``` - -#### Returns - -`std::vector< std::string >` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 172. - -*** - -### live\_transcribe - -#### Signature - -```cpp -Service & live_transcribe(const json & params = json::object()) -``` - -#### Parameters - - - -#### Returns - -`Service &` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 102. - -*** - -### live\_translate - -#### Signature - -```cpp -Service & live_translate(const json & params = json::object()) -``` - -#### Parameters - - - -#### Returns - -`Service &` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 103. - -*** - -### name - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -const std::string & name() const -``` - -#### Returns - -`const std::string &` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 44. - -*** - -### on\_function\_call - -Dispatch a function call to the registered handler. Returns a FunctionResult; if the function isn't registered, returns a FunctionResult with a "Function not found" response. - -**Modifiers:** `virtual` - -#### Signature - -```cpp -swaig::FunctionResult on_function_call( - const std::string & name, - const json & args, - const json & raw_data -) -``` - -#### Parameters - - - - - - - -#### Returns - -`swaig::FunctionResult` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 167. - -*** - -### on\_render\_swml - -Override to customize SWML rendering. - -**Modifiers:** `const` `virtual` - -#### Signature - -```cpp -json on_render_swml() const -``` - -#### Returns - -`json` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 255. - -*** - -### on\_request - -Customization hook called when SWML is requested. Default delegates to on\_swml\_request and returns its result. Subclasses typically override on\_swml\_request rather than this method. -Returns std::nullopt to use the default SWML rendering, or a non-null JSON with modifications to merge into the rendered document. -Python parity: WebMixin.on\_request(request\_data, callback\_path). The Python third request argument is FastAPI-specific and intentionally not mirrored on the cross-language API. - -**Modifiers:** `virtual` - -#### Signature - -```cpp -std::optional< json > on_request( - const std::optional< json > & request_data = std::nullopt, - const std::optional< std::string > & callback_path = std::nullopt -) -``` - -#### Parameters - - - - - -#### Returns - -`std::optional< json >` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 241. - -*** - -### on\_swml\_request - -Customization point for subclasses to modify SWML based on request data. Default returns std::nullopt (no modification). -Python parity: WebMixin.on\_swml\_request(request\_data, callback\_path). - -**Modifiers:** `virtual` - -#### Signature - -```cpp -std::optional< json > on_swml_request( - const std::optional< json > & request_data = std::nullopt, - const std::optional< std::string > & callback_path = std::nullopt -) -``` - -#### Parameters - - - - - -#### Returns - -`std::optional< json >` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 249. - -*** - -### pay - -#### Signature - -```cpp -Service & pay(const json & params = json::object()) -``` - -#### Parameters - - - -#### Returns - -`Service &` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 104. - -*** - -### play - -#### Signature - -```cpp -Service & play(const json & params = json::object()) -``` - -#### Parameters - - - -#### Returns - -`Service &` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 105. - -*** - -### port - -Get the effective port. - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -int port() const -``` - -#### Returns - -`int` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 222. - -*** - -### prompt - -#### Signature - -```cpp -Service & prompt(const json & params = json::object()) -``` - -#### Parameters - - - -#### Returns - -`Service &` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 106. - -*** - -### receive\_fax - -#### Signature - -```cpp -Service & receive_fax(const json & params = json::object()) -``` - -#### Parameters - - - -#### Returns - -`Service &` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 107. - -*** - -### record - -#### Signature - -```cpp -Service & record(const json & params = json::object()) -``` - -#### Parameters - - - -#### Returns - -`Service &` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 108. - -*** - -### record\_call - -#### Signature - -```cpp -Service & record_call(const json & params = json::object()) -``` - -#### Parameters - - - -#### Returns - -`Service &` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 109. - -*** - -### register\_additional\_routes - -Extension point: register additional HTTP routes. AgentBase uses this to add /post\_prompt, /mcp, etc. - -**Modifiers:** `virtual` - -#### Signature - -```cpp -void register_additional_routes(httplib::Server & server) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 272. - -*** - -### register\_swaig\_function - -Register a raw SWAIG function definition (e.g. DataMap tools). - -#### Signature - -```cpp -Service & register_swaig_function(const json & func_def) -``` - -#### Parameters - - - -#### Returns - -`Service &` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 162. - -*** - -### remove\_function - -Remove a registered SWAIG function. Returns true when the function was found and removed; false when it wasn't registered. Python parity: ToolRegistry.remove\_function. - -#### Signature - -```cpp -bool remove_function(const std::string & name) -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 195. - -*** - -### render\_main\_swml - -Extension point: render the SWML document for the main path or for GET /swaig. Default returns the currently-built Document. AgentBase overrides to emit prompt + AI verb at request time. - -**Modifiers:** `const` `virtual` - -#### Signature - -```cpp -json render_main_swml(const httplib::Request & req) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 260. - -*** - -### render\_swml - -Render the SWML document to JSON. - -**Modifiers:** `const` - -#### Signature - -```cpp -json render_swml() const -``` - -#### Returns - -`json` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 149. - -*** - -### request - -#### Signature - -```cpp -Service & request(const json & params = json::object()) -``` - -#### Parameters - - - -#### Returns - -`Service &` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 110. - -*** - -### return\_section - -#### Signature - -```cpp -Service & return_section(const json & params = json::object()) -``` - -#### Parameters - - - -#### Returns - -`Service &` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 111. - -*** - -### route - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -const std::string & route() const -``` - -#### Returns - -`const std::string &` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 48. - -*** - -### schema\_utils - -SchemaUtils helper bound to this Service. Mirrors Python's self.schema\_utils instance attribute on SWMLService. Built lazily on first access; the underlying schema is cached so the helper is cheap to build. - -#### Signature - - - - ```cpp - signalwire::utils::SchemaUtils & schema_utils() - ``` - - - - ```cpp - const signalwire::utils::SchemaUtils & schema_utils() const - ``` - - - -#### Returns (Overload 1) - -`signalwire::utils::SchemaUtils &` - -#### Returns (Overload 2) - -`const signalwire::utils::SchemaUtils &` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 145. - -*** - -### send\_digits - -#### Signature - -```cpp -Service & send_digits(const json & params = json::object()) -``` - -#### Parameters - - - -#### Returns - -`Service &` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 112. - -*** - -### send\_fax - -#### Signature - -```cpp -Service & send_fax(const json & params = json::object()) -``` - -#### Parameters - - - -#### Returns - -`Service &` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 113. - -*** - -### send\_sms - -#### Signature - -```cpp -Service & send_sms(const json & params = json::object()) -``` - -#### Parameters - - - -#### Returns - -`Service &` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 114. - -*** - -### serve - -Start the HTTP server (blocking). - -#### Signature - -```cpp -void serve() -``` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 216. - -*** - -### Service - -#### Signature - -```cpp -void Service() -``` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 35. - -*** - -### set - -#### Signature - -```cpp -Service & set(const json & params = json::object()) -``` - -#### Parameters - - - -#### Returns - -`Service &` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 115. - -*** - -### set\_auth - -Set basic auth credentials (auto-generated if not set). - -#### Signature - -```cpp -Service & set_auth(const std::string & username, const std::string & password) -``` - -#### Parameters - - - - - -#### Returns - -`Service &` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 57. - -*** - -### set\_host - -Set the host to bind to. - -#### Signature - -```cpp -Service & set_host(const std::string & host) -``` - -#### Parameters - - - -#### Returns - -`Service &` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 51. - -*** - -### set\_name - -Set the service name (default: "service"). - -#### Signature - -```cpp -Service & set_name(const std::string & name) -``` - -#### Parameters - - - -#### Returns - -`Service &` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 43. - -*** - -### set\_port - -Set the port to listen on. - -#### Signature - -```cpp -Service & set_port(int port) -``` - -#### Parameters - - - -#### Returns - -`Service &` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 54. - -*** - -### set\_route - -Set the route path for this service (default: "/"). - -#### Signature - -```cpp -Service & set_route(const std::string & route) -``` - -#### Parameters - - - -#### Returns - -`Service &` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 47. - -*** - -### setup\_routes - -#### Signature - -```cpp -void setup_routes(httplib::Server & server) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 304. - -*** - -### sip\_refer - -#### Signature - -```cpp -Service & sip_refer(const json & params = json::object()) -``` - -#### Parameters - - - -#### Returns - -`Service &` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 117. - -*** - -### sleep - -#### Signature - -```cpp -Service & sleep(int milliseconds) -``` - -#### Parameters - - - -#### Returns - -`Service &` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 116. - -*** - -### stop - -Stop the HTTP server. - -#### Signature - -```cpp -void stop() -``` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 219. - -*** - -### stop\_denoise - -#### Signature - -```cpp -Service & stop_denoise(const json & params = json::object()) -``` - -#### Parameters - - - -#### Returns - -`Service &` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 118. - -*** - -### stop\_record\_call - -#### Signature - -```cpp -Service & stop_record_call(const json & params = json::object()) -``` - -#### Parameters - - - -#### Returns - -`Service &` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 119. - -*** - -### stop\_tap - -#### Signature - -```cpp -Service & stop_tap(const json & params = json::object()) -``` - -#### Parameters - - - -#### Returns - -`Service &` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 120. - -*** - -### swaig\_pre\_dispatch - -Extension point: invoked between argument parsing and function dispatch on POST /swaig. Returns a target Service\* (defaults to this) and an optional short-circuit JSON. If short\_circuit is non-null, it's returned as the SWAIG response without calling on\_function\_call. AgentBase overrides for token validation. - -**Modifiers:** `virtual` - -#### Signature - -```cpp -std::pair< Service *, std::optional< json > > swaig_pre_dispatch( - const json & request_data, - const std::string & func_name -) -``` - -#### Parameters - - - - - -#### Returns - -`std::pair< Service *, std::optional< json > >` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 268. - -*** - -### switch\_section - -#### Signature - -```cpp -Service & switch_section(const json & params = json::object()) -``` - -#### Parameters - - - -#### Returns - -`Service &` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 121. - -*** - -### tap - -#### Signature - -```cpp -Service & tap(const json & params = json::object()) -``` - -#### Parameters - - - -#### Returns - -`Service &` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 122. - -*** - -### timing\_safe\_compare - -Timing-safe string comparison using CRYPTO\_memcmp. - -**Modifiers:** `static` - -#### Signature - -```cpp -bool timing_safe_compare(const std::string & a, const std::string & b) -``` - -#### Parameters - - - - - -#### Returns - -`bool` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 225. - -*** - -### transfer - -#### Signature - -```cpp -Service & transfer(const json & params = json::object()) -``` - -#### Parameters - - - -#### Returns - -`Service &` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 123. - -*** - -### unset - -#### Signature - -```cpp -Service & unset(const json & params = json::object()) -``` - -#### Parameters - - - -#### Returns - -`Service &` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 124. - -*** - -### user\_event - -#### Signature - -```cpp -Service & user_event(const json & params = json::object()) -``` - -#### Parameters - - - -#### Returns - -`Service &` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 125. - -*** - -### validate\_auth - -Validate basic auth from a request; returns true if valid. - -**Modifiers:** `const` - -#### Signature - -```cpp -bool validate_auth(const httplib::Request & req, httplib::Response & res) const -``` - -#### Parameters - - - - - -#### Returns - -`bool` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 278. - -*** - -### validate\_basic\_auth - -Validate provided basic-auth credentials against the configured ones using a constant-time comparison. Python parity: AuthMixin.validate\_basic\_auth(username, password). - -**Modifiers:** `const` - -#### Signature - -```cpp -bool validate_basic_auth( - const std::string & username, - const std::string & password -) const -``` - -#### Parameters - - - - - -#### Returns - -`bool` - -#### Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 72. - -## Source - -[`include/signalwire/swml/service.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/service.hpp) - -Line 33. diff --git a/fern/products/sdk-reference/cpp/signalwire/swml/verb-definition/index.mdx b/fern/products/sdk-reference/cpp/signalwire/swml/verb-definition/index.mdx deleted file mode 100644 index 830236649e..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/swml/verb-definition/index.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/swml/verb-definition" -title: "VerbDefinition" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::swml::VerbDefinition" - parent: "signalwire::swml" - module: "signalwire.swml" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/schema.hpp" - visibility: "public" ---- -# `VerbDefinition` - -Represents a verb definition extracted from the SWML schema. - -## Signature - -```cpp -struct signalwire::swml::VerbDefinition -``` - -## Properties - - - - - - - - - -## Source - -[`include/signalwire/swml/schema.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/schema.hpp) - -Line 14. diff --git a/fern/products/sdk-reference/cpp/signalwire/swml/verb/index.mdx b/fern/products/sdk-reference/cpp/signalwire/swml/verb/index.mdx deleted file mode 100644 index 6cd34b84af..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/swml/verb/index.mdx +++ /dev/null @@ -1,90 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/swml/verb" -title: "Verb" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::swml::Verb" - parent: "signalwire::swml" - module: "signalwire.swml" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/document.hpp" - visibility: "public" ---- -# `Verb` - -Represents a single SWML verb instance, e.g. \{"answer": \{"max\_duration": 3600\}\}. - -## Signature - -```cpp -struct signalwire::swml::Verb -``` - -## Properties - - - - - -## Methods - -### to\_json - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -json to_json() const -``` - -#### Returns - -`json` - -#### Source - -[`include/signalwire/swml/document.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/document.hpp) - -Line 22. - -*** - -### Verb - -#### Signature - - - - ```cpp - void Verb() - ``` - - - - ```cpp - void Verb(std::string n, json p) - ``` - - - -#### Parameters (Overload 2) - - - - - -#### Source - -[`include/signalwire/swml/document.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/document.hpp) - -Line 19. - -## Source - -[`include/signalwire/swml/document.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/swml/document.hpp) - -Line 15. diff --git a/fern/products/sdk-reference/cpp/signalwire/utils/index.mdx b/fern/products/sdk-reference/cpp/signalwire/utils/index.mdx deleted file mode 100644 index 606001665c..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/utils/index.mdx +++ /dev/null @@ -1,89 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/utils" -title: "utils" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "module" - language: "cpp" - qualified_name: "signalwire::utils" - parent: "signalwire" - module: "signalwire" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/schema_utils.hpp" ---- -# `utils` - -## Signature - -```cpp -namespace signalwire::utils -``` - -## Classes - - - - SchemaUtils — C++ port of signalwire.utils.schema\_utils.SchemaUtils. - - - - SchemaValidationError — C++ port of signalwire.utils.schema\_utils.SchemaValidationError. - - - - Verb metadata extracted from the schema. - - - -## Modules - - - - - -## Functions - -### is\_serverless\_mode - -Cross-language SDK contract: signalwire.utils.is\_serverless\_mode returns true whenever the SDK is running inside any short-lived / event-driven invocation environment (anything other than "server"). -Mirrors signalwire.utils.is\_serverless\_mode in the Python reference. -true unless the detected mode is "server". - -#### Signature - -```cpp -bool is_serverless_mode() -``` - -#### Returns - -`bool` — true unless the detected mode is "server". - -#### Source - -[`src/utils/serverless.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/utils/serverless.cpp) - -Line 13. - -## Type Aliases - -### json - -#### Signature - -```cpp -typedef nlohmann::json json -``` - -#### Source - -[`include/signalwire/utils/schema_utils.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/schema_utils.hpp) - -Line 30. - -## Source - -[`include/signalwire/utils/schema_utils.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/schema_utils.hpp) - -Line 28. diff --git a/fern/products/sdk-reference/cpp/signalwire/utils/schema-utils/index.mdx b/fern/products/sdk-reference/cpp/signalwire/utils/schema-utils/index.mdx deleted file mode 100644 index d9aeb8d4fa..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/utils/schema-utils/index.mdx +++ /dev/null @@ -1,332 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/utils/schema-utils" -title: "SchemaUtils" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::utils::SchemaUtils" - parent: "signalwire::utils" - module: "signalwire.utils" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/schema_utils.hpp" - visibility: "public" ---- -# `SchemaUtils` - -SchemaUtils — C++ port of signalwire.utils.schema\_utils.SchemaUtils. - -## Signature - -```cpp -class signalwire::utils::SchemaUtils -``` - -## Methods - -### full\_validation\_available - -Whether full JSON Schema validation is wired up. Mirrors Python's full\_validation\_available property. - -**Modifiers:** `const` - -#### Signature - -```cpp -bool full_validation_available() const -``` - -#### Returns - -`bool` - -#### Source - -[`include/signalwire/utils/schema_utils.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/schema_utils.hpp) - -Line 69. - -*** - -### generate\_method\_body - -Generate a Python-style method body string for a verb. Mirrors Python's generate\_method\_body(verb\_name). - -**Modifiers:** `const` - -#### Signature - -```cpp -std::string generate_method_body(const std::string & verb_name) const -``` - -#### Parameters - - - -#### Returns - -`std::string` - -#### Source - -[`include/signalwire/utils/schema_utils.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/schema_utils.hpp) - -Line 109. - -*** - -### generate\_method\_signature - -Generate a Python-style method signature string for a verb. Mirrors Python's generate\_method\_signature(verb\_name). - -**Modifiers:** `const` - -#### Signature - -```cpp -std::string generate_method_signature(const std::string & verb_name) const -``` - -#### Parameters - - - -#### Returns - -`std::string` - -#### Source - -[`include/signalwire/utils/schema_utils.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/schema_utils.hpp) - -Line 105. - -*** - -### get\_all\_verb\_names - -Sorted list of all known verb names. Mirrors Python's get\_all\_verb\_names(). - -**Modifiers:** `const` - -#### Signature - -```cpp -std::vector< std::string > get_all_verb_names() const -``` - -#### Returns - -`std::vector< std::string >` - -#### Source - -[`include/signalwire/utils/schema_utils.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/schema_utils.hpp) - -Line 76. - -*** - -### get\_verb\_parameters - -Parameter-definition block used by code-gen tooling. Mirrors Python's get\_verb\_parameters(verb\_name). - -**Modifiers:** `const` - -#### Signature - -```cpp -json get_verb_parameters(const std::string & verb_name) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/utils/schema_utils.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/schema_utils.hpp) - -Line 88. - -*** - -### get\_verb\_properties - -The properties\[verb\_name] block for a verb, or empty when unknown. Mirrors Python's get\_verb\_properties(verb\_name). - -**Modifiers:** `const` - -#### Signature - -```cpp -json get_verb_properties(const std::string & verb_name) const -``` - -#### Parameters - - - -#### Returns - -`json` - -#### Source - -[`include/signalwire/utils/schema_utils.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/schema_utils.hpp) - -Line 80. - -*** - -### get\_verb\_required\_properties - -The required list for a verb, or empty when unknown / not specified. Mirrors Python's get\_verb\_required\_properties(verb\_name). - -**Modifiers:** `const` - -#### Signature - -```cpp -std::vector< std::string > get_verb_required_properties( - const std::string & verb_name -) const -``` - -#### Parameters - - - -#### Returns - -`std::vector< std::string >` - -#### Source - -[`include/signalwire/utils/schema_utils.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/schema_utils.hpp) - -Line 84. - -*** - -### load\_schema - -Read and parse the JSON Schema. Mirrors Python's load\_schema(). - -#### Signature - -```cpp -json load_schema() -``` - -#### Returns - -`json` - -#### Source - -[`include/signalwire/utils/schema_utils.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/schema_utils.hpp) - -Line 72. - -*** - -### SchemaUtils - -Construct a SchemaUtils. Mirrors Python's SchemaUtils(schema\_path=None, schema\_validation=True). Pass schema\_path = "" to use the embedded schema. - -#### Signature - -```cpp -void SchemaUtils( - const std::string & schema_path = "", - bool schema_validation = true -) -``` - -#### Parameters - - - - - -#### Source - -[`include/signalwire/utils/schema_utils.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/schema_utils.hpp) - -Line 65. - -*** - -### validate\_document - -Validate a complete SWML document. Mirrors Python's validate\_document(document). Returns (false, \["Schema validator not initialized"]) when no full validator is wired in. - -**Modifiers:** `const` - -#### Signature - -```cpp -std::pair< bool, std::vector< std::string > > validate_document( - const json & document -) const -``` - -#### Parameters - - - -#### Returns - -`std::pair< bool, std::vector< std::string > >` - -#### Source - -[`include/signalwire/utils/schema_utils.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/schema_utils.hpp) - -Line 101. - -*** - -### validate\_verb - -Validate a verb config against the schema. Mirrors Python's validate\_verb(verb\_name, verb\_config). Returns (valid, errors) — Python's Tuple\[bool, List\[str]]. - -**Modifiers:** `const` - -#### Signature - -```cpp -std::pair< bool, std::vector< std::string > > validate_verb( - const std::string & verb_name, - const json & verb_config -) const -``` - -#### Parameters - - - - - -#### Returns - -`std::pair< bool, std::vector< std::string > >` - -#### Source - -[`include/signalwire/utils/schema_utils.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/schema_utils.hpp) - -Line 94. - -## Source - -[`include/signalwire/utils/schema_utils.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/schema_utils.hpp) - -Line 60. diff --git a/fern/products/sdk-reference/cpp/signalwire/utils/schema-validation-error/index.mdx b/fern/products/sdk-reference/cpp/signalwire/utils/schema-validation-error/index.mdx deleted file mode 100644 index 76084dfee4..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/utils/schema-validation-error/index.mdx +++ /dev/null @@ -1,105 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/utils/schema-validation-error" -title: "SchemaValidationError" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::utils::SchemaValidationError" - parent: "signalwire::utils" - module: "signalwire.utils" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/schema_utils.hpp" - visibility: "public" ---- -# `SchemaValidationError` - -SchemaValidationError — C++ port of signalwire.utils.schema\_utils.SchemaValidationError. - -## Signature - -```cpp -class signalwire::utils::SchemaValidationError : std::runtime_error -``` - -## Inheritance - -**Extends:** `std::runtime_error` - -## Methods - -### errors - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -const std::vector< std::string > & errors() const -``` - -#### Returns - -`const std::vector< std::string > &` - -#### Source - -[`include/signalwire/utils/schema_utils.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/schema_utils.hpp) - -Line 42. - -*** - -### SchemaValidationError - -**Modifiers:** `inline` - -#### Signature - -```cpp -void SchemaValidationError( - std::string verb_name, - std::vector< std::string > errors -) -``` - -#### Parameters - - - - - -#### Source - -[`include/signalwire/utils/schema_utils.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/schema_utils.hpp) - -Line 36. - -*** - -### verb\_name - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -const std::string & verb_name() const -``` - -#### Returns - -`const std::string &` - -#### Source - -[`include/signalwire/utils/schema_utils.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/schema_utils.hpp) - -Line 41. - -## Source - -[`include/signalwire/utils/schema_utils.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/schema_utils.hpp) - -Line 34. diff --git a/fern/products/sdk-reference/cpp/signalwire/utils/url-validator/index.mdx b/fern/products/sdk-reference/cpp/signalwire/utils/url-validator/index.mdx deleted file mode 100644 index d4554c285e..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/utils/url-validator/index.mdx +++ /dev/null @@ -1,117 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/utils/url-validator" -title: "url_validator" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "module" - language: "cpp" - qualified_name: "signalwire::utils::url_validator" - parent: "signalwire::utils" - module: "signalwire.utils" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/url_validator.hpp" ---- -# `url_validator` - -## Signature - -```cpp -namespace signalwire::utils::url_validator -``` - -## Constants - - - Cross-port SSRF block list. Order matches the Python reference for ease of cross-language review. - - -## Functions - -### \_set\_resolver - -Install a custom resolver (for tests). Pass nullptr to clear. - -#### Signature - -```cpp -void _set_resolver(ResolverFn resolver) -``` - -#### Parameters - - - -#### Source - -[`src/utils/url_validator.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/utils/url_validator.cpp) - -Line 185. - -*** - -### validate\_url - -Validate that a URL is safe to fetch. -Mirrors Python's signalwire.utils.url\_validator.validate\_url(url, allow\_private=False) -> bool. - -url - -URL to validate. - -allow\_private - -When true, bypass the IP-blocklist check. - -True iff the URL is safe to fetch. - -#### Signature - -```cpp -bool validate_url(const std::string & url, bool allow_private = false) -``` - -#### Parameters - - - URL to validate. - - - - When true, bypass the IP-blocklist check. - - -#### Returns - -`bool` — True iff the URL is safe to fetch. - -#### Source - -[`src/utils/url_validator.cpp`](https://github.com/signalwire/signalwire-cpp/blob/main/src/utils/url_validator.cpp) - -Line 189. - -## Type Aliases - -### ResolverFn - -Pluggable resolver. Tests inject a callable to keep the suite hermetic; production resolves via getaddrinfo. Returns nullopt on resolution failure. -The signature: function(hostname) -> optional\> of IP-string addresses. - -#### Signature - -```cpp -typedef std::function< std::optional< std::vector< std::string > >(const std::string &)> ResolverFn -``` - -#### Source - -[`include/signalwire/utils/url_validator.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/url_validator.hpp) - -Line 32. - -## Source - -[`include/signalwire/utils/url_validator.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/url_validator.hpp) - -Line 16. diff --git a/fern/products/sdk-reference/cpp/signalwire/utils/verb-info/index.mdx b/fern/products/sdk-reference/cpp/signalwire/utils/verb-info/index.mdx deleted file mode 100644 index e285cfb12e..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/utils/verb-info/index.mdx +++ /dev/null @@ -1,38 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/utils/verb-info" -title: "VerbInfo" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::utils::VerbInfo" - parent: "signalwire::utils" - module: "signalwire.utils" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/schema_utils.hpp" - visibility: "public" ---- -# `VerbInfo` - -Verb metadata extracted from the schema. - -## Signature - -```cpp -struct signalwire::utils::VerbInfo -``` - -## Properties - - - - - - - -## Source - -[`include/signalwire/utils/schema_utils.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/utils/schema_utils.hpp) - -Line 52. diff --git a/fern/products/sdk-reference/cpp/std/index.mdx b/fern/products/sdk-reference/cpp/std/index.mdx deleted file mode 100644 index 34b84a663c..0000000000 --- a/fern/products/sdk-reference/cpp/std/index.mdx +++ /dev/null @@ -1,25 +0,0 @@ ---- -slug: "/reference/cpp/std" -title: "std" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "module" - language: "cpp" - qualified_name: "std" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/[generated]" ---- -# `std` - -## Signature - -```cpp -namespace std -``` - -## Source - -[`[generated]`](https://github.com/signalwire/signalwire-cpp/blob/main/[generated]) - -Line 1. diff --git a/fern/products/sdk-reference/dotnet/_meta.json b/fern/products/sdk-reference/dotnet/_meta.json index 08ed3512f9..0385dd0a32 100644 --- a/fern/products/sdk-reference/dotnet/_meta.json +++ b/fern/products/sdk-reference/dotnet/_meta.json @@ -6,5 +6,5 @@ "format": "mdx", "platform": "fern", "base_slug": "/reference/dotnet", - "item_count": 1445 + "item_count": 1447 } \ No newline at end of file diff --git a/fern/products/sdk-reference/dotnet/agents/agent/agent-base/index.mdx b/fern/products/sdk-reference/dotnet/agents/agent/agent-base/index.mdx new file mode 100644 index 0000000000..7879254993 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/agent/agent-base/index.mdx @@ -0,0 +1,2064 @@ +--- +slug: "/reference/dotnet/agents/agent/agent-base" +title: "AgentBase" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Agent.AgentBase" + parent: "agents.agent" + module: "agents.agent" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs" + visibility: "public" +--- +# `AgentBase` + +AI agent built on <xref href="SignalWire.SWML.Service" data-throw-if-not-resolved="false"></xref>. Provides prompt management, SWAIG tool dispatch, +context switching, skill stubs, and a 5-phase SWML rendering pipeline. +All configuration methods return `this` for fluent chaining. + +## Signature + +```dotnet +public class AgentBase : Service +``` + +## Inheritance + +**Extends:** [SignalWire.SWML.Service](/docs/sdk-reference/reference/dotnet/agents/swml/service) + +## Properties + + + + + True iff signature validation is enabled — i.e. either the `SigningKey` option or `SIGNALWIRE_SIGNING_KEY` env var was set at construction time. (Python parity: `bool(agent.signing_key)`.) + + + + The prompt as a <xref href="SignalWire.POM.PromptObjectModel" data-throw-if-not-resolved="false"></xref> instance (Python parity: `agent.pom`). Returns null when `UsePom` is false. Materialised on each access from the internal list-of-dicts so mutations stay round-trip-safe. To inspect raw section dicts, use <xref href="SignalWire.Agent.AgentBase.GetPromptSections" data-throw-if-not-resolved="false"></xref>. + + + + The configured Signing Key, or null when validation is disabled. Read-only — the resolution order (constructor arg → `SIGNALWIRE_SIGNING_KEY` env) is fixed at construction time. (Python parity: `agent.signing_key`.) + + + + Skill manager (Python parity: `agent.skill_manager`). + + + + The complete set of internal SWAIG function names that accept fillers, matching the SWAIGInternalFiller schema definition. Any name outside this set is silently ignored by the runtime — <xref href="SignalWire.Agent.AgentBase.SetInternalFillers(System.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Collections.Generic.List%7bSystem.String%7d%7d%7d)" data-throw-if-not-resolved="false"></xref> and <xref href="SignalWire.Agent.AgentBase.AddInternalFiller(System.String%2cSystem.String%2cSystem.Collections.Generic.List%7bSystem.String%7d)" data-throw-if-not-resolved="false"></xref> warn if you pass an unknown name. Notable absences: `change_step`, `gather_submit`, or arbitrary user-defined SWAIG function names are NOT supported. + + +## Methods + +### AddAnswerVerb + +Alias for <xref href="SignalWire.Agent.AgentBase.AddPostAnswerVerb(System.String%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d)" data-throw-if-not-resolved="false"></xref>. + +#### Signature + + + + ```dotnet + public AgentBase AddAnswerVerb(string verb, Dictionary config) + ``` + + + + ```dotnet + public AgentBase AddAnswerVerb(Dictionary config) + ``` + + + +#### Parameters (Overload 1) + + + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`SignalWire.Agent.AgentBase` + +#### Returns (Overload 2) + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 812. + +*** + +### AddFunctionInclude(Dictionary\) + +#### Signature + +```dotnet +public AgentBase AddFunctionInclude(Dictionary include) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 771. + +*** + +### AddHint(string) + +#### Signature + +```dotnet +public AgentBase AddHint(string hint) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 480. + +*** + +### AddHints(List\) + +#### Signature + +```dotnet +public AgentBase AddHints(List hints) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 486. + +*** + +### AddInternalFiller + +Add internal fillers for a single internal function and language. + +<p>See +<xref href="SignalWire.Agent.AgentBase.SetInternalFillers(System.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Collections.Generic.List%7bSystem.String%7d%7d%7d)" data-throw-if-not-resolved="false"></xref> +for the complete list of supported function names and what fillers +do. Names outside the supported set log a warning.</p> + +#### Signature + + + + ```dotnet + public AgentBase AddInternalFiller(string filler) + ``` + + + + ```dotnet + public AgentBase AddInternalFiller(string functionName, string languageCode, List fillers) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + + + +#### Returns (Overload 1) + +`SignalWire.Agent.AgentBase` + +#### Returns (Overload 2) + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 730. + +*** + +### AddLanguage + +Add a language configuration with optional per-language engine-specific +params (e.g. voice stability/similarity for ElevenLabs, model knobs). +The `params` key is only emitted into SWML when non-empty, so +existing language entries stay byte-identical when no params are passed. +Mirrors signalwire-python's `AIConfigMixin.add_language(params=...)`. + +#### Signature + + + + ```dotnet + public AgentBase AddLanguage(string name, string code, string voice) + ``` + + + + ```dotnet + public AgentBase AddLanguage(string name, string code, string voice, Dictionary? languageParams) + ``` + + + +#### Parameters (Overload 1) + + + + + + + +#### Parameters (Overload 2) + + + Language name (e.g. "English"). + + + + Language code (e.g. "en-US"). + + + + TTS voice name or combined "engine.voice:model". + + + + Optional engine-specific params dict. `null` or empty omits the SWML `params` key. + + +#### Returns (Overload 1) + +`SignalWire.Agent.AgentBase` + +#### Returns (Overload 2) + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 498. + +*** + +### AddPatternHint(string) + +#### Signature + +```dotnet +public AgentBase AddPatternHint(string pattern) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 492. + +*** + +### AddPostAiVerb(string, Dictionary\) + +#### Signature + +```dotnet +public AgentBase AddPostAiVerb(string verb, Dictionary config) +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 825. + +*** + +### AddPostAnswerVerb(string, Dictionary\) + +#### Signature + +```dotnet +public AgentBase AddPostAnswerVerb(string verb, Dictionary config) +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 805. + +*** + +### AddPreAnswerVerb(string, Dictionary\) + +#### Signature + +```dotnet +public AgentBase AddPreAnswerVerb(string verb, Dictionary config) +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 799. + +*** + +### AddPronunciation(string, string, string) + +#### Signature + +```dotnet +public AgentBase AddPronunciation(string replace, string with, string ignore = "") +``` + +#### Parameters + + + + + + + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 594. + +*** + +### AddSkill + +Load and activate a skill by name. Resolves through <xref href="SignalWire.Skills.SkillRegistry" data-throw-if-not-resolved="false"></xref>, +validates env vars, calls Setup/RegisterTools, and merges hints/globalData/prompts. + +#### Signature + + + + ```dotnet + public AgentBase AddSkill(string name, Dictionary? parameters = null) + ``` + + + + ```dotnet + public AgentBase AddSkill(SkillName name, Dictionary? parameters = null) + ``` + + + +#### Parameters (Overload 1) + + + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`SignalWire.Agent.AgentBase` + +#### Returns (Overload 2) + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 927. + +*** + +### AddSwaigQueryParams(Dictionary\) + +#### Signature + +```dotnet +public AgentBase AddSwaigQueryParams(Dictionary parameters) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 1027. + +*** + +### AgentBase(AgentOptions) + +#### Signature + +```dotnet +public AgentBase(AgentOptions options) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 145. + +*** + +### AutoMapSipUsernames() + +Enable auto-mapping of SIP usernames to this agent's +route (Python parity: `agent.auto_map_sip_usernames()`). +Chainable. + +#### Signature + +```dotnet +public AgentBase AutoMapSipUsernames() +``` + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 914. + +*** + +### BuildAiVerb(Dictionary\?) + +Build the AI verb configuration block. + +#### Signature + +```dotnet +public Dictionary BuildAiVerb(Dictionary? headers = null) +``` + +#### Parameters + + + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 1165. + +*** + +### ClearPostAiVerbs() + +#### Signature + +```dotnet +public AgentBase ClearPostAiVerbs() +``` + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 843. + +*** + +### ClearPostAnswerVerbs() + +#### Signature + +```dotnet +public AgentBase ClearPostAnswerVerbs() +``` + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 837. + +*** + +### ClearPreAnswerVerbs() + +#### Signature + +```dotnet +public AgentBase ClearPreAnswerVerbs() +``` + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 831. + +*** + +### ClearSwaigQueryParams() + +#### Signature + +```dotnet +public AgentBase ClearSwaigQueryParams() +``` + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 1036. + +*** + +### CloneForRequest() + +Create a deep copy of this agent for per-request customisation. +Collections are deeply copied; callbacks are preserved by reference. + +#### Signature + +```dotnet +public AgentBase CloneForRequest() +``` + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 1448. + +*** + +### Contexts() + +Alias for <xref href="SignalWire.Agent.AgentBase.DefineContexts" data-throw-if-not-resolved="false"></xref>. + +#### Signature + +```dotnet +public ContextBuilder Contexts() +``` + +#### Returns + +`SignalWire.Contexts.ContextBuilder` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 871. + +*** + +### CreateToolToken(string, string) + +Create a per-call SWAIG-function token. Returns empty +string on failure. (Python parity: `StateMixin._create_tool_token`.) + +#### Signature + +```dotnet +public string CreateToolToken(string toolName, string callId) +``` + +#### Parameters + + + + + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 441. + +*** + +### DefineContexts() + +Return the ContextBuilder, creating it lazily on first access. +The builder is wired to report registered SWAIG tool names back +so its <xref href="SignalWire.Contexts.ContextBuilder.Validate" data-throw-if-not-resolved="false"></xref> can check for +collisions with reserved native tool names (`next_step`, +`change_context`, `gather_submit`). + +#### Signature + +```dotnet +public ContextBuilder DefineContexts() +``` + +#### Returns + +`SignalWire.Contexts.ContextBuilder` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 860. + +*** + +### EnableDebugEvents(string) + +#### Signature + +```dotnet +public AgentBase EnableDebugEvents(string level = "all") +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 765. + +*** + +### EnableSipRouting(bool, string) + +Enable SIP routing on this agent. `autoMap` opts into Python's +auto-mapping behaviour (sip\_username = agent name); `path` lets +the caller pin a specific SIP route prefix. + +#### Signature + +```dotnet +public AgentBase EnableSipRouting(bool autoMap = false, string path = "") +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 1065. + +*** + +### GetContexts() + +Return the contexts configuration if defined, else null. +(Python parity: `PromptManager.get_contexts`.) + +#### Signature + +```dotnet +public Dictionary? GetContexts() +``` + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 392. + +*** + +### GetLanguageParams(string) + +Read the per-language `params` dict for a previously-added +language. Returns `null` when the params were never set or +when the code is unknown — no exception path, matching Python. + +#### Signature + +```dotnet +public Dictionary? GetLanguageParams(string code) +``` + +#### Parameters + + + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 571. + +*** + +### GetName() + +Return the agent name (Python parity: `agent.get_name()`). + +#### Signature + +```dotnet +public string GetName() +``` + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 905. + +*** + +### GetPostPrompt() + +Return the post-prompt text if set, else null. +(Python parity: `PromptManager.get_post_prompt`.) + +#### Signature + +```dotnet +public string? GetPostPrompt() +``` + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 388. + +*** + +### GetPrompt() + +Return the prompt payload: POM array if enabled and populated, otherwise raw text. + +#### Signature + +```dotnet +public object GetPrompt() +``` + +#### Returns + +`object` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 373. + +*** + +### GetPromptSections() + +The raw POM section dicts. Mirrors how the dotnet +agent has historically stored its prompt-object data and how +SWML rendering consumes it. Read-only snapshot. + +#### Signature + +```dotnet +public IReadOnlyList> GetPromptSections() +``` + +#### Returns + +`IReadOnlyList>` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 437. + +*** + +### GetRawPrompt() + +Return the raw prompt text if set, else null. +(Python parity: `PromptManager.get_raw_prompt`.) + +#### Signature + +```dotnet +public string? GetRawPrompt() +``` + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 384. + +*** + +### GetSkillManager() + +Return the skill manager, creating it lazily on first access. + +#### Signature + +```dotnet +public SkillManager GetSkillManager() +``` + +#### Returns + +`SignalWire.Skills.SkillManager` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 895. + +*** + +### HandlePostPrompt(Dictionary\?, Dictionary\) + +Handle the post-prompt callback. + +**Modifiers:** `override` + +#### Signature + +```dotnet +protected override (int, Dictionary, string) HandlePostPrompt(Dictionary? requestData, Dictionary headers) +``` + +#### Parameters + + + + + +#### Returns + +`System.ValueTuple,string>` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 1403. + +*** + +### HandleRequest(string, string, Dictionary\, string?) + +Override the base dispatch to enforce webhook signature validation on +POST requests targeting the signed routes (`/`, `/swaig`, +`/post_prompt`) when <xref href="SignalWire.Agent.AgentBase.SigningKey" data-throw-if-not-resolved="false"></xref> is configured. + +<p>Validation is gated behind Basic Auth: callers must already +satisfy the SWMLService basic-auth check (it always runs first in +<xref href="SignalWire.SWML.Service.HandleRequest(System.String%2cSystem.String%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.String%7d%2cSystem.String)" data-throw-if-not-resolved="false"></xref>) before we even look at +signatures, matching Python where `signing_key` is layered on +top of `basic_auth`.</p> + +<p>On invalid signature: returns 403 directly without dispatching +to the agent's POST handler. On valid signature (or non-POST, or +non-signed route): delegates to <xref href="SignalWire.SWML.Service.HandleRequest(System.String%2cSystem.String%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.String%7d%2cSystem.String)" data-throw-if-not-resolved="false"></xref>. +</p> + +<p>(Python parity: `web_mixin._register_routes` wraps the +signed POST routes in a FastAPI `Depends(sig_dep)` dependency +when `signing_key` is set; this is the .NET equivalent.)</p> + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override (int Status, Dictionary Headers, string Body) HandleRequest(string method, string path, Dictionary headers, string? body) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`System.ValueTuple,string>` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 1294. + +*** + +### HandleSwmlRequest(string, Dictionary\?, Dictionary\) + +Handle the SWML document request. If a dynamic-config callback is registered, +clone the agent, pass the clone to the callback, and render from the clone. + +**Modifiers:** `override` + +#### Signature + +```dotnet +protected override (int, Dictionary, string) HandleSwmlRequest(string method, Dictionary? requestData, Dictionary headers) +``` + +#### Parameters + + + + + + + +#### Returns + +`System.ValueTuple,string>` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 1369. + +*** + +### HasSkill + +Check if a skill is loaded by instance key. + +#### Signature + + + + ```dotnet + public bool HasSkill(string name) + ``` + + + + ```dotnet + public bool HasSkill(SkillName name) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`bool` + +#### Returns (Overload 2) + +`bool` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 983. + +*** + +### ListSkills() + +List all loaded skill instance keys. + +#### Signature + +```dotnet +public List ListSkills() +``` + +#### Returns + +`List` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 973. + +*** + +### ManualSetProxyUrl(string) + +Manually override the proxy URL used for SWAIG webhook construction. + +#### Signature + +```dotnet +public AgentBase ManualSetProxyUrl(string url) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 1021. + +*** + +### OnDebugEvent(Action\?, Dictionary\>) + +#### Signature + +```dotnet +public AgentBase OnDebugEvent(Action?, Dictionary> callback) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 1049. + +*** + +### OnSummary(Action\?, Dictionary\>) + +#### Signature + +```dotnet +public AgentBase OnSummary(Action?, Dictionary> callback) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 1042. + +*** + +### PromptAddSection(string, string, List\?, bool, bool, List\>?) + +Add a top-level POM section with an optional body, bullets, +numbering, and subsections. (Python parity: `prompt_add_section`.) + +#### Signature + +```dotnet +public AgentBase PromptAddSection(string title, string body = "", List? bullets = null, bool numbered = false, bool numberedBullets = false, List>? subsections = null) +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 263. + +*** + +### PromptAddSubsection(string, string, string, List\?) + +Add a subsection nested under an existing parent section. +(Python parity: `prompt_add_subsection(parent_title, title, body, bullets)`.) + +#### Signature + +```dotnet +public AgentBase PromptAddSubsection(string parentTitle, string title, string body = "", List? bullets = null) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 293. + +*** + +### PromptAddToSection(string, string?, string?, List\?) + +Append body text, a single bullet, and/or bullets list to an +existing section. (Python parity: +`prompt_add_to_section(title, body, bullet, bullets)`.) + +#### Signature + +```dotnet +public AgentBase PromptAddToSection(string title, string? body = null, string? bullet = null, List? bullets = null) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 327. + +*** + +### PromptHasSection(string) + +Check whether a POM section with the given title exists. + +#### Signature + +```dotnet +public bool PromptHasSection(string title) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 365. + +*** + +### RegisterSipUsername + +Register a SIP username under this agent's own route — Python +equivalent of `register_sip_username(self, sip_username)`. + +#### Signature + + + + ```dotnet + public AgentBase RegisterSipUsername(string username, string route = "") + ``` + + + + ```dotnet + public AgentBase RegisterSipUsername(string username) + ``` + + + +#### Parameters (Overload 1) + + + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`SignalWire.Agent.AgentBase` + +#### Returns (Overload 2) + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 1073. + +*** + +### RemoveSkill + +Remove a loaded skill by its instance key. + +#### Signature + + + + ```dotnet + public AgentBase RemoveSkill(string name) + ``` + + + + ```dotnet + public AgentBase RemoveSkill(SkillName name) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`SignalWire.Agent.AgentBase` + +#### Returns (Overload 2) + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 959. + +*** + +### RenderSwml() + +Build the complete SWML document. + +<p>Phases: 1) Pre-answer verbs 2) Answer 3) Record call +4) Post-answer verbs 5) AI verb 6) Post-AI verbs</p> + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override Dictionary RenderSwml() +``` + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 1097. + +*** + +### RenderSwmlWithContext(Dictionary\?, Dictionary\) + +Render with request body and headers context. + +#### Signature + +```dotnet +public Dictionary RenderSwmlWithContext(Dictionary? requestBody, Dictionary headers) +``` + +#### Parameters + + + + + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 1103. + +*** + +### ResetContexts() + +Remove all contexts, returning the agent to a no-contexts state. +This is a convenience wrapper around `DefineContexts().Reset()`. +Use it in a dynamic config callback when you need to rebuild +contexts from scratch for a specific request. + +#### Signature + +```dotnet +public AgentBase ResetContexts() +``` + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 882. + +*** + +### SetDynamicConfigCallback(Action\?, Dictionary\?, Dictionary\, AgentBase>) + +#### Signature + +```dotnet +public AgentBase SetDynamicConfigCallback(Action?, Dictionary?, Dictionary, AgentBase> callback) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 1001. + +*** + +### SetFunctionIncludes(List\>) + +#### Signature + +```dotnet +public AgentBase SetFunctionIncludes(List> includes) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 777. + +*** + +### SetGlobalData(Dictionary\) + +#### Signature + +```dotnet +public AgentBase SetGlobalData(Dictionary data) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 627. + +*** + +### SetInternalFillers + +Set internal fillers for native SWAIG functions. + +<p>Internal fillers are short phrases the AI agent speaks (via +TTS) while an internal/native function is running, so the caller +doesn't hear dead air during transitions or background work.</p> + +<p>Supported function names (match the SWAIGInternalFiller +schema): `hangup`, `check_time`, `wait_for_user`, +`wait_seconds`, `adjust_response_latency`, +`next_step`, `change_context`, `get_visual_input`, +`get_ideal_strategy`. See +<xref href="SignalWire.Agent.AgentBase.SupportedInternalFillerNames" data-throw-if-not-resolved="false"></xref>.</p> + +<p>Notably NOT supported: `change_step`, +`gather_submit`, or arbitrary user-defined SWAIG function +names. The runtime only honors fillers for the names listed above; +everything else is silently ignored at the SWML level. This method +warns at registration time if you pass an unknown name so you +catch the typo early.</p> + +#### Signature + + + + ```dotnet + public AgentBase SetInternalFillers(List fillers) + ``` + + + + ```dotnet + public AgentBase SetInternalFillers(Dictionary>> fillers) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`SignalWire.Agent.AgentBase` + +#### Returns (Overload 2) + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 672. + +*** + +### SetLanguageParams(string, Dictionary\) + +Set (or replace) the per-language `params` dict on an +already-added language. Useful when language entries are built +up via <xref href="SignalWire.Agent.AgentBase.AddLanguage(System.String%2cSystem.String%2cSystem.String)" data-throw-if-not-resolved="false"></xref> first and +engine-specific tuning is added later (e.g., from a config loader). +Empty dict removes the key. No-op if <code class="paramref">code</code> isn't +found — matches Python's silent-skip behavior. + +#### Signature + +```dotnet +public AgentBase SetLanguageParams(string code, Dictionary languageParams) +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 546. + +*** + +### SetLanguages(List\>) + +#### Signature + +```dotnet +public AgentBase SetLanguages(List> languages) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 588. + +*** + +### SetNativeFunctions(List\) + +#### Signature + +```dotnet +public AgentBase SetNativeFunctions(List functions) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 642. + +*** + +### SetParam(string, object) + +#### Signature + +```dotnet +public AgentBase SetParam(string key, object value) +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 615. + +*** + +### SetParams(Dictionary\) + +#### Signature + +```dotnet +public AgentBase SetParams(Dictionary parameters) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 621. + +*** + +### SetPostPrompt(string) + +#### Signature + +```dotnet +public AgentBase SetPostPrompt(string text) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 255. + +*** + +### SetPostPromptLlmParams(Dictionary\) + +#### Signature + +```dotnet +public AgentBase SetPostPromptLlmParams(Dictionary parameters) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 789. + +*** + +### SetPostPromptUrl(string) + +#### Signature + +```dotnet +public AgentBase SetPostPromptUrl(string url) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 1014. + +*** + +### SetPromptLlmParams(Dictionary\) + +#### Signature + +```dotnet +public AgentBase SetPromptLlmParams(Dictionary parameters) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 783. + +*** + +### SetPromptPom(List\>) + +Set the prompt as a list-of-section dicts (POM form). +Throws when `UsePom` is false. (Python parity: +`PromptManager.set_prompt_pom`.) + +#### Signature + +```dotnet +public AgentBase SetPromptPom(List> pom) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 398. + +*** + +### SetPromptText(string) + +#### Signature + +```dotnet +public AgentBase SetPromptText(string text) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 249. + +*** + +### SetPronunciations(List\>) + +#### Signature + +```dotnet +public AgentBase SetPronunciations(List> pronunciations) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 609. + +*** + +### SetWebHookUrl(string) + +#### Signature + +```dotnet +public AgentBase SetWebHookUrl(string url) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 1008. + +*** + +### UpdateGlobalData(Dictionary\) + +#### Signature + +```dotnet +public AgentBase UpdateGlobalData(Dictionary data) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 633. + +*** + +### ValidateToolToken(string, string, string) + +Validate a per-call SWAIG-function token. Rejects +when the function is not registered, when the SessionManager +rejects the token, or on any error. (Python parity: +`StateMixin.validate_tool_token`.) + +#### Signature + +```dotnet +public bool ValidateToolToken(string functionName, string token, string callId) +``` + +#### Parameters + + + + + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 457. + +## Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 51. diff --git a/fern/products/sdk-reference/dotnet/agents/agent/agent-options/index.mdx b/fern/products/sdk-reference/dotnet/agents/agent/agent-options/index.mdx new file mode 100644 index 0000000000..9da79f6ab7 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/agent/agent-options/index.mdx @@ -0,0 +1,64 @@ +--- +slug: "/reference/dotnet/agents/agent/agent-options" +title: "AgentOptions" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Agent.AgentOptions" + parent: "agents.agent" + module: "agents.agent" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs" + visibility: "public" +--- +# `AgentOptions` + +Configuration options for an AI agent, extending the base SWML service options. + +**Modifiers:** `sealed` + +## Signature + +```dotnet +public sealed class AgentOptions +``` + +## Properties + + + + + + + + + + + + + + + + + + + + + + + Optional SignalWire Signing Key (from Dashboard → API Credentials). When set, webhook signature validation is enforced on POST /, /swaig, /post\_prompt — unsigned or invalidly-signed requests get a 403. Falls back to the `SIGNALWIRE_SIGNING_KEY` env var if not passed. See `porting-sdk/webhooks.md` for the contract. (Python parity: `AgentBase.__init__(signing_key=...)`.) + + + + If true, honor `X-Forwarded-Proto` / `X-Forwarded-Host` headers when reconstructing the URL for signature validation. Default false because proxy headers are spoofable; opt in only when you control the proxy chain. (Python parity: `AgentBase.__init__(trust_proxy_for_signature=...)`.) + + + + +## Source + +[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) + +Line 12. diff --git a/fern/products/sdk-reference/dotnet/agents/agent/index.mdx b/fern/products/sdk-reference/dotnet/agents/agent/index.mdx new file mode 100644 index 0000000000..4da25dbd1f --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/agent/index.mdx @@ -0,0 +1,26 @@ +--- +slug: "/reference/dotnet/agents/agent" +title: "agent" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "module" + language: "dotnet" + qualified_name: "agents.agent" + parent: "agents" + module: "agents" +--- +# `agent` + +## Classes + + + + AI agent built on <xref href="SignalWire.SWML.Service" data-throw-if-not-resolved="false"></xref>. Provides prompt management, SWAIG tool dispatch, context switching, skill stubs, and a 5-phase SWML rendering pipeline. All configuration methods return `this` for fluent chaining. + + + + Configuration options for an AI agent, extending the base SWML service options. + + diff --git a/fern/products/sdk-reference/dotnet/agents/contexts/context-builder/index.mdx b/fern/products/sdk-reference/dotnet/agents/contexts/context-builder/index.mdx new file mode 100644 index 0000000000..8701fdf917 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/contexts/context-builder/index.mdx @@ -0,0 +1,236 @@ +--- +slug: "/reference/dotnet/agents/contexts/context-builder" +title: "ContextBuilder" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Contexts.ContextBuilder" + parent: "agents.contexts" + module: "agents.contexts" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs" + visibility: "public" +--- +# `ContextBuilder` + +Builder for multi-step, multi-context AI agent workflows. + +<p>A ContextBuilder owns one or more <xref href="SignalWire.Contexts.Context" data-throw-if-not-resolved="false"></xref>s; each +context owns an ordered list of <xref href="SignalWire.Contexts.Step" data-throw-if-not-resolved="false"></xref>s. Only one context +and one step is active at a time. Per chat turn, the runtime injects +the current step's instructions as a system message, then asks the LLM +for a response.</p> + +<p><b>Native tools auto-injected by the runtime:</b> When a step +(or its enclosing context) declares valid_steps or valid_contexts, the +runtime auto-injects two native tools so the model can navigate the +flow: `next_step` and `change_context`. A third native tool, +`gather_submit`, is injected during gather_info questioning. +These three names are reserved: <xref href="SignalWire.Contexts.ContextBuilder.Validate" data-throw-if-not-resolved="false"></xref> rejects any +agent that defines a SWAIG tool with one of them. See +<xref href="SignalWire.Contexts.ReservedToolNames.Reserved" data-throw-if-not-resolved="false"></xref>.</p> + +<p><b>Function whitelisting (<xref href="SignalWire.Contexts.Step.SetFunctions(System.Object)" data-throw-if-not-resolved="false"></xref>):</b> +Each step may declare a functions whitelist. The whitelist is applied +in-memory at the start of each LLM turn. CRITICALLY: if a step does +NOT declare a functions field, it INHERITS the previous step's active +set. See <xref href="SignalWire.Contexts.Step.SetFunctions(System.Object)" data-throw-if-not-resolved="false"></xref> for details and examples.</p> + +## Signature + +```dotnet +public class ContextBuilder +``` + +## Methods + +### AddContext(string) + +#### Signature + +```dotnet +public Context AddContext(string name) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Contexts.Context` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 622. + +*** + +### AttachToolNameSupplier(Func\>) + +Attach a supplier that returns registered SWAIG tool names so <xref href="SignalWire.Contexts.ContextBuilder.Validate" data-throw-if-not-resolved="false"></xref> can check them against <xref href="SignalWire.Contexts.ReservedToolNames.Reserved" data-throw-if-not-resolved="false"></xref>. Called internally by +`AgentBase.DefineContexts()`. + +#### Signature + +```dotnet +public ContextBuilder AttachToolNameSupplier(Func> supplier) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Contexts.ContextBuilder` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 604. + +*** + +### CreateSimpleContext(string) + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static ContextBuilder CreateSimpleContext(string name) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Contexts.ContextBuilder` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 807. + +*** + +### GetContext(string) + +#### Signature + +```dotnet +public Context? GetContext(string name) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Contexts.Context` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 635. + +*** + +### HasContexts() + +#### Signature + +```dotnet +public bool HasContexts() +``` + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 636. + +*** + +### Reset() + +Remove all contexts, returning the builder to its initial state. +Use this in a dynamic config callback when you need to rebuild +contexts from scratch for a specific request. + +#### Signature + +```dotnet +public ContextBuilder Reset() +``` + +#### Returns + +`SignalWire.Contexts.ContextBuilder` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 615. + +*** + +### ToDict() + +#### Signature + +```dotnet +public Dictionary ToDict() +``` + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 793. + +*** + +### Validate() + +#### Signature + +```dotnet +public List Validate() +``` + +#### Returns + +`List` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 638. + +## Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 591. diff --git a/fern/products/sdk-reference/dotnet/agents/contexts/context/index.mdx b/fern/products/sdk-reference/dotnet/agents/contexts/context/index.mdx new file mode 100644 index 0000000000..5d034568f5 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/contexts/context/index.mdx @@ -0,0 +1,724 @@ +--- +slug: "/reference/dotnet/agents/contexts/context" +title: "Context" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Contexts.Context" + parent: "agents.contexts" + module: "agents.contexts" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs" + visibility: "public" +--- +# `Context` + +## Signature + +```dotnet +public class Context +``` + +## Properties + + + +## Methods + +### AddBullets(string, List\) + +#### Signature + +```dotnet +public Context AddBullets(string title, List bullets) +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire.Contexts.Context` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 413. + +*** + +### AddEnterFiller(string, params string\[]) + +#### Signature + +```dotnet +public Context AddEnterFiller(string lang, params string[] fillers) +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire.Contexts.Context` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 495. + +*** + +### AddExitFiller(string, params string\[]) + +#### Signature + +```dotnet +public Context AddExitFiller(string lang, params string[] fillers) +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire.Contexts.Context` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 503. + +*** + +### AddSection(string, string) + +#### Signature + +```dotnet +public Context AddSection(string title, string body) +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire.Contexts.Context` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 405. + +*** + +### AddStep(string, Dictionary\?) + +#### Signature + +```dotnet +public Step AddStep(string name, Dictionary? opts = null) +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire.Contexts.Step` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 350. + +*** + +### AddSystemBullets(string, List\) + +#### Signature + +```dotnet +public Context AddSystemBullets(string title, List bullets) +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire.Contexts.Context` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 439. + +*** + +### AddSystemSection(string, string) + +#### Signature + +```dotnet +public Context AddSystemSection(string title, string body) +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire.Contexts.Context` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 431. + +*** + +### Context(string) + +#### Signature + +```dotnet +public Context(string name) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 345. + +*** + +### GetInitialStep() + +#### Signature + +```dotnet +public string? GetInitialStep() +``` + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 459. + +*** + +### GetStep(string) + +#### Signature + +```dotnet +public Step? GetStep(string name) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Contexts.Step` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 372. + +*** + +### GetStepOrder() + +#### Signature + +```dotnet +public List GetStepOrder() +``` + +#### Returns + +`List` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 393. + +*** + +### GetSteps() + +#### Signature + +```dotnet +public Dictionary GetSteps() +``` + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 392. + +*** + +### GetValidContexts() + +#### Signature + +```dotnet +public List? GetValidContexts() +``` + +#### Returns + +`List` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 511. + +*** + +### MoveStep(string, int) + +#### Signature + +```dotnet +public Context MoveStep(string name, int position) +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire.Contexts.Context` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 383. + +*** + +### RemoveStep(string) + +#### Signature + +```dotnet +public Context RemoveStep(string name) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Contexts.Context` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 374. + +*** + +### SetConsolidate(bool) + +#### Signature + +```dotnet +public Context SetConsolidate(bool consolidate) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Contexts.Context` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 464. + +*** + +### SetEnterFillers(Dictionary\>) + +#### Signature + +```dotnet +public Context SetEnterFillers(Dictionary> fillers) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Contexts.Context` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 492. + +*** + +### SetExitFillers(Dictionary\>) + +#### Signature + +```dotnet +public Context SetExitFillers(Dictionary> fillers) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Contexts.Context` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 493. + +*** + +### SetFullReset(bool) + +#### Signature + +```dotnet +public Context SetFullReset(bool fullReset) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Contexts.Context` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 465. + +*** + +### SetInitialStep(string) + +Set which step the context starts on when entered. + +<p>By default, a context starts on its first step (index 0). Use +this to skip a preamble step on re-entry via +`change_context`.</p> + +#### Signature + +```dotnet +public Context SetInitialStep(string stepName) +``` + +#### Parameters + + + Name of the step to start on (must exist in this context). + + +#### Returns + +`SignalWire.Contexts.Context` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 457. + +*** + +### SetIsolated(bool) + +Mark this context as isolated — entering it wipes conversation +history. + +<p>When <code class="paramref">isolated</code> = true and the context is +entered via change_context, the runtime wipes the conversation +array. The model starts fresh with only the new context's +system_prompt + step instructions, with no memory of prior +turns.</p> + +<p><b>EXCEPTION — reset overrides the wipe:</b> If the context +also has a reset configuration (via <xref href="SignalWire.Contexts.Context.SetConsolidate(System.Boolean)" data-throw-if-not-resolved="false"></xref> +or <xref href="SignalWire.Contexts.Context.SetFullReset(System.Boolean)" data-throw-if-not-resolved="false"></xref>), the wipe is skipped in favor of +the reset behavior. Use reset with consolidate=true to summarize +prior history into a single message instead of dropping it +entirely.</p> + +<p>Use cases: switching to a sensitive billing flow that +should not see prior small-talk; handing off to a different agent +persona; resetting after a long off-topic detour.</p> + +#### Signature + +```dotnet +public Context SetIsolated(bool isolated) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Contexts.Context` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 488. + +*** + +### SetPostPrompt(string) + +#### Signature + +```dotnet +public Context SetPostPrompt(string postPrompt) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Contexts.Context` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 463. + +*** + +### SetPrompt(string) + +#### Signature + +```dotnet +public Context SetPrompt(string prompt) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Contexts.Context` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 397. + +*** + +### SetSystemPrompt(string) + +#### Signature + +```dotnet +public Context SetSystemPrompt(string systemPrompt) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Contexts.Context` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 423. + +*** + +### SetUserPrompt(string) + +#### Signature + +```dotnet +public Context SetUserPrompt(string userPrompt) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Contexts.Context` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 466. + +*** + +### SetValidContexts(List\) + +#### Signature + +```dotnet +public Context SetValidContexts(List contexts) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Contexts.Context` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 461. + +*** + +### SetValidSteps(List\) + +#### Signature + +```dotnet +public Context SetValidSteps(List steps) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Contexts.Context` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 462. + +*** + +### ToDict() + +#### Signature + +```dotnet +public Dictionary ToDict() +``` + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 535. + +## Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 324. diff --git a/fern/products/sdk-reference/dotnet/agents/contexts/gather-info/index.mdx b/fern/products/sdk-reference/dotnet/agents/contexts/gather-info/index.mdx new file mode 100644 index 0000000000..f956282a83 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/contexts/gather-info/index.mdx @@ -0,0 +1,102 @@ +--- +slug: "/reference/dotnet/agents/contexts/gather-info" +title: "GatherInfo" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Contexts.GatherInfo" + parent: "agents.contexts" + module: "agents.contexts" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs" + visibility: "public" +--- +# `GatherInfo` + +## Signature + +```dotnet +public class GatherInfo +``` + +## Properties + + + + + +## Methods + +### AddQuestion(Dictionary\) + +#### Signature + +```dotnet +public GatherInfo AddQuestion(Dictionary opts) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Contexts.GatherInfo` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 81. + +*** + +### GatherInfo(string?, string?, string?) + +#### Signature + +```dotnet +public GatherInfo(string? outputKey = null, string? completionAction = null, string? prompt = null) +``` + +#### Parameters + + + + + + + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 74. + +*** + +### ToDict() + +#### Signature + +```dotnet +public Dictionary ToDict() +``` + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 90. + +## Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 67. diff --git a/fern/products/sdk-reference/dotnet/agents/contexts/gather-question/index.mdx b/fern/products/sdk-reference/dotnet/agents/contexts/gather-question/index.mdx new file mode 100644 index 0000000000..fbb876ecce --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/contexts/gather-question/index.mdx @@ -0,0 +1,72 @@ +--- +slug: "/reference/dotnet/agents/contexts/gather-question" +title: "GatherQuestion" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Contexts.GatherQuestion" + parent: "agents.contexts" + module: "agents.contexts" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs" + visibility: "public" +--- +# `GatherQuestion` + +## Signature + +```dotnet +public class GatherQuestion +``` + +## Properties + + + +## Methods + +### GatherQuestion(Dictionary\) + +#### Signature + +```dotnet +public GatherQuestion(Dictionary opts) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 38. + +*** + +### ToDict() + +#### Signature + +```dotnet +public Dictionary ToDict() +``` + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 50. + +## Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 29. diff --git a/fern/products/sdk-reference/dotnet/agents/contexts/index.mdx b/fern/products/sdk-reference/dotnet/agents/contexts/index.mdx new file mode 100644 index 0000000000..02a7de713c --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/contexts/index.mdx @@ -0,0 +1,34 @@ +--- +slug: "/reference/dotnet/agents/contexts" +title: "contexts" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "module" + language: "dotnet" + qualified_name: "agents.contexts" + parent: "agents" + module: "agents" +--- +# `contexts` + +## Classes + + + + + + Builder for multi-step, multi-context AI agent workflows. <p>A ContextBuilder owns one or more <xref href="SignalWire.Contexts.Context" data-throw-if-not-resolved="false"></xref>s; each context owns an ordered list of <xref href="SignalWire.Contexts.Step" data-throw-if-not-resolved="false"></xref>s. Only one context and one step is active at a time. Per chat turn, the runtime injects the current step's instructions as a system message, then asks the LLM for a response.</p> <p><b>Native tools auto-injected by the runtime:</b> When a step (or its enclosing context) declares valid\_steps or valid\_contexts, the runtime auto-injects two native tools so the model can navigate the flow: `next_step` and `change_context`. A third native tool, `gather_submit`, is injected during gather\_info questioning. These three names are reserved: <xref href="SignalWire.Contexts.ContextBuilder.Validate" data-throw-if-not-resolved="false"></xref> rejects any agent that defines a SWAIG tool with one of them. See <xref href="SignalWire.Contexts.ReservedToolNames.Reserved" data-throw-if-not-resolved="false"></xref>.</p> <p><b>Function whitelisting (<xref href="SignalWire.Contexts.Step.SetFunctions(System.Object)" data-throw-if-not-resolved="false"></xref>):</b> Each step may declare a functions whitelist. The whitelist is applied in-memory at the start of each LLM turn. CRITICALLY: if a step does NOT declare a functions field, it INHERITS the previous step's active set. See <xref href="SignalWire.Contexts.Step.SetFunctions(System.Object)" data-throw-if-not-resolved="false"></xref> for details and examples.</p> + + + + + + + + Reserved tool names auto-injected by the runtime when contexts/steps are present. User-defined SWAIG tools must not collide with these names. <ul><li>`next_step` / `change_context` are injected when valid\_steps or valid\_contexts is set so the model can navigate the flow.</li><li>`gather_submit` is injected while a step's gather\_info is collecting answers.</li></ul> <xref href="SignalWire.Contexts.ContextBuilder.Validate" data-throw-if-not-resolved="false"></xref> rejects any agent that registers a user tool sharing one of these names — the runtime would never call the user tool because the native one wins. + + + + diff --git a/fern/products/sdk-reference/dotnet/agents/contexts/reserved-tool-names/index.mdx b/fern/products/sdk-reference/dotnet/agents/contexts/reserved-tool-names/index.mdx new file mode 100644 index 0000000000..fd26cabde6 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/contexts/reserved-tool-names/index.mdx @@ -0,0 +1,45 @@ +--- +slug: "/reference/dotnet/agents/contexts/reserved-tool-names" +title: "ReservedToolNames" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Contexts.ReservedToolNames" + parent: "agents.contexts" + module: "agents.contexts" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs" + visibility: "public" +--- +# `ReservedToolNames` + +Reserved tool names auto-injected by the runtime when contexts/steps are +present. User-defined SWAIG tools must not collide with these names. + +<ul><li>`next_step` / `change_context` are injected when +valid_steps or valid_contexts is set so the model can navigate the flow.</li><li>`gather_submit` is injected while a step's gather_info is +collecting answers.</li></ul> + +<xref href="SignalWire.Contexts.ContextBuilder.Validate" data-throw-if-not-resolved="false"></xref> rejects any agent that registers a +user tool sharing one of these names — the runtime would never call the +user tool because the native one wins. + +**Modifiers:** `static` + +## Signature + +```dotnet +public static class ReservedToolNames +``` + +## Properties + + + +## Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 17. diff --git a/fern/products/sdk-reference/dotnet/agents/contexts/step/index.mdx b/fern/products/sdk-reference/dotnet/agents/contexts/step/index.mdx new file mode 100644 index 0000000000..ad7d0ceb14 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/contexts/step/index.mdx @@ -0,0 +1,548 @@ +--- +slug: "/reference/dotnet/agents/contexts/step" +title: "Step" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Contexts.Step" + parent: "agents.contexts" + module: "agents.contexts" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs" + visibility: "public" +--- +# `Step` + +## Signature + +```dotnet +public class Step +``` + +## Properties + + + + + + + + + +## Methods + +### AddBullets(string, List\) + +#### Signature + +```dotnet +public Step AddBullets(string title, List bullets) +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire.Contexts.Step` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 143. + +*** + +### AddGatherQuestion(Dictionary\) + +Add a question to this step's gather\_info. Initializes gather\_info +if not yet set. + +<p><b>IMPORTANT — gather mode locks function access:</b> While +the model is asking gather questions, the runtime forcibly +deactivates ALL of the step's other functions. The only callable +tools during a gather question are:</p> + +<ul><li>`gather_submit` (the native answer-submission tool)</li><li>Whatever names you pass in this question's `"functions"` +option</li></ul> + +<p>`next_step` and `change_context` are also filtered +out — the model cannot navigate away until the gather completes. +This is by design: it forces a tight ask → submit → next-question +loop.</p> + +<p>If a question needs to call out to a tool (e.g. validate an +email, geocode a ZIP), list that tool name in this question's +`"functions"` option. Functions listed here are active ONLY +for this question.</p> + +#### Signature + +```dotnet +public Step AddGatherQuestion(Dictionary opts) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Contexts.Step` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 255. + +*** + +### AddSection(string, string) + +#### Signature + +```dotnet +public Step AddSection(string title, string body) +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire.Contexts.Step` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 135. + +*** + +### ClearSections() + +#### Signature + +```dotnet +public Step ClearSections() +``` + +#### Returns + +`SignalWire.Contexts.Step` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 151. + +*** + +### SetEnd(bool) + +Mark this step as terminal for the step flow. + +<p><b>IMPORTANT:</b> <code class="paramref">end</code> = true does NOT end +the conversation or hang up the call. It exits step mode entirely +after this step executes — clearing the steps list, current step +index, valid_steps, and valid_contexts. The agent keeps running, +but operates only under the base system prompt and the +context-level prompt; no more step instructions are injected and +no more `next_step` tool is offered.</p> + +<p>To actually end the call, call a hangup tool or define a +hangup hook.</p> + +#### Signature + +```dotnet +public Step SetEnd(bool end) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Contexts.Step` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 216. + +*** + +### SetFunctions(object) + +Set which non-internal functions are callable while this step is +active. + +<p><b>IMPORTANT — inheritance behavior:</b> If you do NOT call +this method, the step inherits whichever function set was active on +the previous step (or the previous context's last step). The +server-side runtime only resets the active set when a step +explicitly declares its `functions` field. This is the most +common source of bugs in multi-step agents: forgetting +<xref href="SignalWire.Contexts.Step.SetFunctions(System.Object)" data-throw-if-not-resolved="false"></xref> on a later step lets the previous step's +tools leak through. Best practice is to call +<xref href="SignalWire.Contexts.Step.SetFunctions(System.Object)" data-throw-if-not-resolved="false"></xref> explicitly on every step that should +differ from the previous one.</p> + +<p>Keep the per-step active set small: LLM tool selection +accuracy degrades noticeably past ~7-8 simultaneously-active tools +per call. Use per-step whitelisting to partition large tool +collections.</p> + +<p>Internal functions (e.g. `gather_submit`, hangup hook) +are ALWAYS protected and cannot be deactivated by this whitelist. +The native navigation tools `next_step` and +`change_context` are injected automatically when +<xref href="SignalWire.Contexts.Step.SetValidSteps(System.Collections.Generic.List%7bSystem.String%7d)" data-throw-if-not-resolved="false"></xref> / <xref href="SignalWire.Contexts.Step.SetValidContexts(System.Collections.Generic.List%7bSystem.String%7d)" data-throw-if-not-resolved="false"></xref> is +used; they are not affected by this list.</p> + +#### Signature + +```dotnet +public Step SetFunctions(object functions) +``` + +#### Parameters + + + One of: \
    \
  • \`List\\` — whitelist of function names allowed in this step.\
  • \
  • An empty list — explicit disable-all (no user functions callable).\
  • \
  • The string \`"none"\` — synonym for the empty list.\
  • \
+
+ +#### Returns + +`SignalWire.Contexts.Step` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 197. + +*** + +### SetGatherInfo(Dictionary\) + +#### Signature + +```dotnet +public Step SetGatherInfo(Dictionary opts) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Contexts.Step` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 221. + +*** + +### SetResetConsolidate(bool) + +#### Signature + +```dotnet +public Step SetResetConsolidate(bool consolidate) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Contexts.Step` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 264. + +*** + +### SetResetFullReset(bool) + +#### Signature + +```dotnet +public Step SetResetFullReset(bool fullReset) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Contexts.Step` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 265. + +*** + +### SetResetSystemPrompt(string) + +#### Signature + +```dotnet +public Step SetResetSystemPrompt(string systemPrompt) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Contexts.Step` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 262. + +*** + +### SetResetUserPrompt(string) + +#### Signature + +```dotnet +public Step SetResetUserPrompt(string userPrompt) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Contexts.Step` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 263. + +*** + +### SetSkipToNextStep(bool) + +#### Signature + +```dotnet +public Step SetSkipToNextStep(bool skip) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Contexts.Step` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 219. + +*** + +### SetSkipUserTurn(bool) + +#### Signature + +```dotnet +public Step SetSkipUserTurn(bool skip) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Contexts.Step` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 218. + +*** + +### SetStepCriteria(string) + +#### Signature + +```dotnet +public Step SetStepCriteria(string criteria) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Contexts.Step` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 158. + +*** + +### SetText(string) + +#### Signature + +```dotnet +public Step SetText(string text) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Contexts.Step` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 127. + +*** + +### SetValidContexts(List\) + +#### Signature + +```dotnet +public Step SetValidContexts(List contexts) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Contexts.Step` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 200. + +*** + +### SetValidSteps(List\) + +#### Signature + +```dotnet +public Step SetValidSteps(List steps) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Contexts.Step` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 199. + +*** + +### Step(string) + +#### Signature + +```dotnet +public Step(string name) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 123. + +*** + +### ToDict() + +#### Signature + +```dotnet +public Dictionary ToDict() +``` + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 295. + +## Source + +[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) + +Line 105. diff --git a/fern/products/sdk-reference/dotnet/agents/data-map/index.mdx b/fern/products/sdk-reference/dotnet/agents/data-map/index.mdx new file mode 100644 index 0000000000..9c6b13c348 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/data-map/index.mdx @@ -0,0 +1,516 @@ +--- +slug: "/reference/dotnet/agents/data-map" +title: "DataMap" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.DataMap.DataMap" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs" + visibility: "public" +--- +# `DataMap` + +Builds a SWAIG data-map function definition with parameters, expressions, webhooks, +and output configuration. All builder methods return `this` for fluent chaining. + +## Signature + +```dotnet +public class DataMap +``` + +## Methods + +### Body(Dictionary\) + +#### Signature + +```dotnet +public DataMap Body(Dictionary data) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.DataMap.DataMap` + +#### Source + +[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) + +Line 172. + +*** + +### CreateExpressionTool(string, string, List\>, List\>) + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static Dictionary CreateExpressionTool(string name, string purpose, List> parameters, List> expressions) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) + +Line 263. + +*** + +### CreateSimpleApiTool(string, string, List\>, string, string, object, Dictionary\?) + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static Dictionary CreateSimpleApiTool(string name, string purpose, List> parameters, string method, string url, object output, Dictionary? headers = null) +``` + +#### Parameters + + + + + + + + + + + + + + + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) + +Line 244. + +*** + +### DataMap(string) + +#### Signature + +```dotnet +public DataMap(string functionName) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) + +Line 22. + +*** + +### Description(string) + +Alias for <xref href="SignalWire.DataMap.DataMap.Purpose(System.String)" data-throw-if-not-resolved="false"></xref>. Sets the LLM-facing tool +description. This string is read by the model to decide WHEN +to call this tool. See <xref href="SignalWire.DataMap.DataMap.Purpose(System.String)" data-throw-if-not-resolved="false"></xref> for bad-vs-good +examples. + +#### Signature + +```dotnet +public DataMap Description(string desc) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.DataMap.DataMap` + +#### Source + +[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) + +Line 59. + +*** + +### ErrorKeys(List\) + +#### Signature + +```dotnet +public DataMap ErrorKeys(List keys) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.DataMap.DataMap` + +#### Source + +[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) + +Line 203. + +*** + +### Expression(string, string, object, object?) + +#### Signature + +```dotnet +public DataMap Expression(string testValue, string pattern, object output, object? nomatchOutput = null) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`SignalWire.DataMap.DataMap` + +#### Source + +[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) + +Line 109. + +*** + +### FallbackOutput(object) + +#### Signature + +```dotnet +public DataMap FallbackOutput(object result) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.DataMap.DataMap` + +#### Source + +[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) + +Line 196. + +*** + +### ForEach(Dictionary\) + +#### Signature + +```dotnet +public DataMap ForEach(Dictionary config) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.DataMap.DataMap` + +#### Source + +[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) + +Line 184. + +*** + +### GlobalErrorKeys(List\) + +#### Signature + +```dotnet +public DataMap GlobalErrorKeys(List keys) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.DataMap.DataMap` + +#### Source + +[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) + +Line 209. + +*** + +### Output(object) + +#### Signature + +```dotnet +public DataMap Output(object result) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.DataMap.DataMap` + +#### Source + +[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) + +Line 190. + +*** + +### Parameter(string, string, string, bool, List\?) + +Add a parameter to this data-map tool — the <code class="paramref">description</code> +is LLM-FACING. + +<p>Each parameter description is rendered into the OpenAI +tool schema under `parameters.properties.<name>.description` +and sent to the model. The model uses it to decide HOW to fill +in the argument from user speech. It is prompt engineering, not +developer FYI.</p> + +<p><b>Bad vs good:</b></p> +<pre><code class="lang-csharp">BAD : .Parameter("city", "string", "the city") +GOOD: .Parameter("city", "string", + "The name of the city to get weather for, e.g. " + + "'San Francisco'. Ask the user if they did not " + + "provide one. Include the state or country if the " + + "city name is ambiguous.")</code></pre> + +#### Signature + +```dotnet +public DataMap Parameter(string name, string type, string description, bool required = false, List? enumValues = null) +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`SignalWire.DataMap.DataMap` + +#### Source + +[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) + +Line 81. + +*** + +### Params(Dictionary\) + +#### Signature + +```dotnet +public DataMap Params(Dictionary data) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.DataMap.DataMap` + +#### Source + +[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) + +Line 178. + +*** + +### Purpose(string) + +Set the LLM-facing tool description (the "purpose"). PROMPT +ENGINEERING, not developer documentation. + +<p>The description string is rendered into the OpenAI tool +schema `description` field on every LLM turn. The model +reads it to decide WHEN to call this tool. A vague +<xref href="SignalWire.DataMap.DataMap.Purpose(System.String)" data-throw-if-not-resolved="false"></xref> is the #1 cause of "the model has the +right tool but doesn't call it" failures with data-map tools.</p> + +<p><b>Bad vs good:</b></p> +<pre><code class="lang-csharp">BAD : .Purpose("weather api") +GOOD: .Purpose("Get the current weather conditions and " + + "forecast for a specific city. Use this " + + "whenever the user asks about weather, " + + "temperature, rain, or similar conditions in a " + + "named location.")</code></pre> + +#### Signature + +```dotnet +public DataMap Purpose(string desc) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.DataMap.DataMap` + +#### Source + +[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) + +Line 47. + +*** + +### ToSwaigFunction() + +#### Signature + +```dotnet +public Dictionary ToSwaigFunction() +``` + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) + +Line 215. + +*** + +### Webhook(string, string, Dictionary\?, string, bool, List\?) + +#### Signature + +```dotnet +public DataMap Webhook(string method, string url, Dictionary? headers = null, string formParam = "", bool inputArgsAsParams = false, List? requireArgs = null) +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`SignalWire.DataMap.DataMap` + +#### Source + +[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) + +Line 131. + +*** + +### WebhookExpressions(List\>) + +#### Signature + +```dotnet +public DataMap WebhookExpressions(List> expressions) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.DataMap.DataMap` + +#### Source + +[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) + +Line 166. + +## Source + +[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) + +Line 8. diff --git a/fern/products/sdk-reference/dotnet/agents/data-map/index__2.mdx b/fern/products/sdk-reference/dotnet/agents/data-map/index__2.mdx new file mode 100644 index 0000000000..d3dbce0e96 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/data-map/index__2.mdx @@ -0,0 +1,14 @@ +--- +slug: "/reference/dotnet/agents/data-map/index__2" +title: "data-map" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "module" + language: "dotnet" + qualified_name: "agents.data-map" + parent: "agents" + module: "agents" +--- +# `data-map` diff --git a/fern/products/sdk-reference/dotnet/agents/index.mdx b/fern/products/sdk-reference/dotnet/agents/index.mdx new file mode 100644 index 0000000000..4b28bc4d9a --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/index.mdx @@ -0,0 +1,46 @@ +--- +slug: "/reference/dotnet/agents" +title: "agents" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "module" + language: "dotnet" + qualified_name: "agents" +--- +# `agents` + +## Classes + + + + Builds a SWAIG data-map function definition with parameters, expressions, webhooks, and output configuration. All builder methods return `this` for fluent chaining. + + + +## Modules + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/fern/products/sdk-reference/dotnet/agents/pom/index.mdx b/fern/products/sdk-reference/dotnet/agents/pom/index.mdx new file mode 100644 index 0000000000..da6e0ce86b --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/pom/index.mdx @@ -0,0 +1,24 @@ +--- +slug: "/reference/dotnet/agents/pom" +title: "pom" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "module" + language: "dotnet" + qualified_name: "agents.pom" + parent: "agents" + module: "agents" +--- +# `pom` + +## Classes + + + + + + + + diff --git a/fern/products/sdk-reference/dotnet/agents/pom/pom-builder/index.mdx b/fern/products/sdk-reference/dotnet/agents/pom/pom-builder/index.mdx new file mode 100644 index 0000000000..2c3357fdf1 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/pom/pom-builder/index.mdx @@ -0,0 +1,323 @@ +--- +slug: "/reference/dotnet/agents/pom/pom-builder" +title: "PomBuilder" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.POM.PomBuilder" + parent: "agents.pom" + module: "agents.pom" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PomBuilder.cs" + visibility: "public" +--- +# `PomBuilder` + +## Signature + +```dotnet +public class PomBuilder +``` + +## Properties + + + +## Methods + +### AddSection(string, string, List\?, bool, bool, List\>?) + +Add a new section. (Python parity: +`PomBuilder.add_section`.) + +#### Signature + +```dotnet +public PomBuilder AddSection(string title, string body = "", List? bullets = null, bool numbered = false, bool numberedBullets = false, List>? subsections = null) +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`SignalWire.POM.PomBuilder` + +#### Source + +[`src/SignalWire/POM/PomBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PomBuilder.cs) + +Line 25. + +*** + +### AddSubsection(string, string, string, List\?) + +Add a subsection under an existing section +(auto-vivifies parent if missing). (Python parity: +`PomBuilder.add_subsection`.) + +#### Signature + +```dotnet +public PomBuilder AddSubsection(string parentTitle, string title, string body = "", List? bullets = null) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`SignalWire.POM.PomBuilder` + +#### Source + +[`src/SignalWire/POM/PomBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PomBuilder.cs) + +Line 83. + +*** + +### AddToSection(string, string?, string?, List\?) + +Add content to an existing section (auto-vivifies if +missing). (Python parity: `PomBuilder.add_to_section`.) + +#### Signature + +```dotnet +public PomBuilder AddToSection(string title, string? body = null, string? bullet = null, List? bullets = null) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`SignalWire.POM.PomBuilder` + +#### Source + +[`src/SignalWire/POM/PomBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PomBuilder.cs) + +Line 52. + +*** + +### FromSections(List\>) + +Build a PomBuilder from a list of section dicts. +(Python parity: `PomBuilder.from_sections` classmethod.) + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static PomBuilder FromSections(List> sections) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.POM.PomBuilder` + +#### Source + +[`src/SignalWire/POM/PomBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PomBuilder.cs) + +Line 120. + +*** + +### GetSection(string) + +Get a section by title, or null if absent. +(Python parity: `PomBuilder.get_section`.) + +#### Signature + +```dotnet +public Section? GetSection(string title) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.POM.Section` + +#### Source + +[`src/SignalWire/POM/PomBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PomBuilder.cs) + +Line 103. + +*** + +### HasSection(string) + +Check if a section with the given title exists. +(Python parity: `PomBuilder.has_section`.) + +#### Signature + +```dotnet +public bool HasSection(string title) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/POM/PomBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PomBuilder.cs) + +Line 99. + +*** + +### PomBuilder() + +#### Signature + +```dotnet +public PomBuilder() +``` + +#### Source + +[`src/SignalWire/POM/PomBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PomBuilder.cs) + +Line 17. + +*** + +### RenderMarkdown() + +Render the POM as markdown. + +#### Signature + +```dotnet +public string RenderMarkdown() +``` + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/POM/PomBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PomBuilder.cs) + +Line 107. + +*** + +### RenderXml() + +Render the POM as XML. + +#### Signature + +```dotnet +public string RenderXml() +``` + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/POM/PomBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PomBuilder.cs) + +Line 110. + +*** + +### ToDict() + +Serialize the POM to a list of section dicts. + +#### Signature + +```dotnet +public List> ToDict() +``` + +#### Returns + +`List>` + +#### Source + +[`src/SignalWire/POM/PomBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PomBuilder.cs) + +Line 113. + +*** + +### ToJson() + +Serialize the POM to a JSON string. + +#### Signature + +```dotnet +public string ToJson() +``` + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/POM/PomBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PomBuilder.cs) + +Line 116. + +## Source + +[`src/SignalWire/POM/PomBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PomBuilder.cs) + +Line 12. diff --git a/fern/products/sdk-reference/dotnet/agents/pom/prompt-object-model/index.mdx b/fern/products/sdk-reference/dotnet/agents/pom/prompt-object-model/index.mdx new file mode 100644 index 0000000000..a00272a937 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/pom/prompt-object-model/index.mdx @@ -0,0 +1,330 @@ +--- +slug: "/reference/dotnet/agents/pom/prompt-object-model" +title: "PromptObjectModel" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.POM.PromptObjectModel" + parent: "agents.pom" + module: "agents.pom" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PromptObjectModel.cs" + visibility: "public" +--- +# `PromptObjectModel` + +## Signature + +```dotnet +public class PromptObjectModel +``` + +## Properties + + + + + +## Methods + +### AddPomAsSubsection + +Add a PromptObjectModel as a subsection of an existing +section in this model, identified by title. +(Python parity: `PromptObjectModel.add_pom_as_subsection`.) + +#### Signature + + + + ```dotnet + public void AddPomAsSubsection(string targetTitle, PromptObjectModel pomToAdd) + ``` + + + + ```dotnet + public void AddPomAsSubsection(Section target, PromptObjectModel pomToAdd) + ``` + + + +#### Parameters (Overload 1) + + + + + +#### Parameters (Overload 2) + + + + + +#### Source + +[`src/SignalWire/POM/PromptObjectModel.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PromptObjectModel.cs) + +Line 514. + +*** + +### AddSection(string?, string, List\?, bool?, bool) + +Add a top-level section to the model, returning the new +Section. Only the first added section may have a null title. +(Python parity: `PromptObjectModel.add_section`.) + +#### Signature + +```dotnet +public Section AddSection(string? title = null, string body = "", List? bullets = null, bool? numbered = null, bool numberedBullets = false) +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`SignalWire.POM.Section` + +#### Source + +[`src/SignalWire/POM/PromptObjectModel.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PromptObjectModel.cs) + +Line 266. + +*** + +### FindSection(string) + +Recursively find a section by title. Returns null if not +found. (Python parity: `PromptObjectModel.find_section`.) + +#### Signature + +```dotnet +public Section? FindSection(string title) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.POM.Section` + +#### Source + +[`src/SignalWire/POM/PromptObjectModel.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PromptObjectModel.cs) + +Line 283. + +*** + +### FromJson(string) + +Construct a PromptObjectModel from JSON. +(Python parity: `PromptObjectModel.from_json`.) + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static PromptObjectModel FromJson(string json) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.POM.PromptObjectModel` + +#### Source + +[`src/SignalWire/POM/PromptObjectModel.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PromptObjectModel.cs) + +Line 439. + +*** + +### FromYaml(string) + +Construct a PromptObjectModel from YAML string. +(Python parity: `PromptObjectModel.from_yaml`.) + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static PromptObjectModel FromYaml(string yaml) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.POM.PromptObjectModel` + +#### Source + +[`src/SignalWire/POM/PromptObjectModel.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PromptObjectModel.cs) + +Line 406. + +*** + +### PromptObjectModel(bool) + +#### Signature + +```dotnet +public PromptObjectModel(bool debug = false) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/POM/PromptObjectModel.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PromptObjectModel.cs) + +Line 257. + +*** + +### RenderMarkdown() + +Render the model as markdown. Mirrors Python's +`PromptObjectModel.render_markdown` exactly. + +#### Signature + +```dotnet +public string RenderMarkdown() +``` + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/POM/PromptObjectModel.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PromptObjectModel.cs) + +Line 306. + +*** + +### RenderXml() + +#### Signature + +```dotnet +public string RenderXml() +``` + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/POM/PromptObjectModel.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PromptObjectModel.cs) + +Line 337. + +*** + +### ToDict() + +Serialize to a list of dicts (matches Python's to\_dict +which returns a List rather than a Dict). + +#### Signature + +```dotnet +public List> ToDict() +``` + +#### Returns + +`List>` + +#### Source + +[`src/SignalWire/POM/PromptObjectModel.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PromptObjectModel.cs) + +Line 372. + +*** + +### ToJson() + +Serialize to JSON string with 2-space indent and Python +dict-style formatting. Empty model emits `"[]"`. + +#### Signature + +```dotnet +public string ToJson() +``` + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/POM/PromptObjectModel.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PromptObjectModel.cs) + +Line 377. + +*** + +### ToYaml() + +Serialize to YAML string. Matches PyYAML's +`yaml.dump(data, default_flow_style=False, sort_keys=False)` +exactly. Empty model emits `"[]\n"`. + +#### Signature + +```dotnet +public string ToYaml() +``` + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/POM/PromptObjectModel.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PromptObjectModel.cs) + +Line 393. + +## Source + +[`src/SignalWire/POM/PromptObjectModel.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PromptObjectModel.cs) + +Line 250. diff --git a/fern/products/sdk-reference/dotnet/agents/pom/section/index.mdx b/fern/products/sdk-reference/dotnet/agents/pom/section/index.mdx new file mode 100644 index 0000000000..0deca3a84e --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/pom/section/index.mdx @@ -0,0 +1,244 @@ +--- +slug: "/reference/dotnet/agents/pom/section" +title: "Section" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.POM.Section" + parent: "agents.pom" + module: "agents.pom" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PromptObjectModel.cs" + visibility: "public" +--- +# `Section` + +## Signature + +```dotnet +public class Section +``` + +## Properties + + + + + + + Three-state numbering: null = inherit, true = force on, false = force off. (Python parity: `numbered` is `Optional[bool]`.) Sibling propagation: if any sibling at the same level has Numbered==true, all siblings get numbered unless they have Numbered==false. + + + + + + + + Section title. Null for the (allowed) first untitled top-level section. (Python parity: `Section.title` is `Optional[str]`.) + + +## Methods + +### AddBody(string) + +Set or replace this section's body text. +(Python parity: `Section.add_body`.) + +#### Signature + +```dotnet +public Section AddBody(string body) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.POM.Section` + +#### Source + +[`src/SignalWire/POM/PromptObjectModel.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PromptObjectModel.cs) + +Line 66. + +*** + +### AddBullets(List\) + +Append bullets to this section. +(Python parity: `Section.add_bullets`.) + +#### Signature + +```dotnet +public Section AddBullets(List bullets) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.POM.Section` + +#### Source + +[`src/SignalWire/POM/PromptObjectModel.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PromptObjectModel.cs) + +Line 74. + +*** + +### AddSubsection(string?, string, List\?, bool?, bool) + +Add a subsection under this section, returning the new +Section. (Python parity: `Section.add_subsection`.) + +#### Signature + +```dotnet +public Section AddSubsection(string? title = null, string body = "", List? bullets = null, bool? numbered = null, bool numberedBullets = false) +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`SignalWire.POM.Section` + +#### Source + +[`src/SignalWire/POM/PromptObjectModel.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PromptObjectModel.cs) + +Line 82. + +*** + +### RenderMarkdown(int, List\?) + +Render this section as a markdown fragment, indented at +the given header level (default 2). Mirrors Python's +`Section.render_markdown` exactly. + +#### Signature + +```dotnet +public string RenderMarkdown(int level = 2, List? sectionNumber = null) +``` + +#### Parameters + + + + + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/POM/PromptObjectModel.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PromptObjectModel.cs) + +Line 99. + +*** + +### RenderXml(int, List\?) + +#### Signature + +```dotnet +public string RenderXml(int indent = 0, List? sectionNumber = null) +``` + +#### Parameters + + + + + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/POM/PromptObjectModel.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PromptObjectModel.cs) + +Line 164. + +*** + +### Section(string?, string, List\?, bool?, bool) + +#### Signature + +```dotnet +public Section(string? title = null, string body = "", List? bullets = null, bool? numbered = null, bool numberedBullets = false) +``` + +#### Parameters + + + + + + + + + + + +#### Source + +[`src/SignalWire/POM/PromptObjectModel.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PromptObjectModel.cs) + +Line 49. + +*** + +### ToDict() + +Serialize to a Dictionary suitable for JSON. Emits +keys in this exact order: title, body, bullets, subsections, +numbered, numberedBullets — and only when non-empty / non-null / +non-default. Mirrors Python's `Section.to_dict`. + +#### Signature + +```dotnet +public Dictionary ToDict() +``` + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/POM/PromptObjectModel.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PromptObjectModel.cs) + +Line 229. + +## Source + +[`src/SignalWire/POM/PromptObjectModel.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PromptObjectModel.cs) + +Line 27. diff --git a/fern/products/sdk-reference/dotnet/agents/prefabs/concierge-agent/index.mdx b/fern/products/sdk-reference/dotnet/agents/prefabs/concierge-agent/index.mdx new file mode 100644 index 0000000000..55a58b54b1 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/prefabs/concierge-agent/index.mdx @@ -0,0 +1,177 @@ +--- +slug: "/reference/dotnet/agents/prefabs/concierge-agent" +title: "ConciergeAgent" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Prefabs.ConciergeAgent" + parent: "agents.prefabs" + module: "agents.prefabs" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/ConciergeAgent.cs" + visibility: "public" +--- +# `ConciergeAgent` + +Prefab concierge agent for venue/hotel style interactions. +Registers `check_availability` and `get_directions` tools. + +## Signature + +```dotnet +public class ConciergeAgent : AgentBase +``` + +## Inheritance + +**Extends:** [SignalWire.SWML.Service](/docs/sdk-reference/reference/dotnet/agents/swml/service) + +## Methods + +### CheckAvailability(Dictionary\, Dictionary\) + +SWAIG tool handler for the `check_availability` tool. +(Python parity: `ConciergeAgent.check_availability(args, raw_data)`.) + +#### Signature + +```dotnet +public FunctionResult CheckAvailability(Dictionary args, Dictionary rawData) +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/Prefabs/ConciergeAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/ConciergeAgent.cs) + +Line 91. + +*** + +### ConciergeAgent(string, Dictionary\, Dictionary\?) + +#### Signature + +```dotnet +public ConciergeAgent(string name, Dictionary venueInfo, Dictionary? options = null) +``` + +#### Parameters + + + + + + + +#### Source + +[`src/SignalWire/Prefabs/ConciergeAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/ConciergeAgent.cs) + +Line 15. + +*** + +### GetAmenities() + +#### Signature + +```dotnet +public Dictionary> GetAmenities() +``` + +#### Returns + +`Dictionary>` + +#### Source + +[`src/SignalWire/Prefabs/ConciergeAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/ConciergeAgent.cs) + +Line 121. + +*** + +### GetDirections(Dictionary\, Dictionary\) + +SWAIG tool handler for the `get_directions` tool. +(Python parity: `ConciergeAgent.get_directions(args, raw_data)`.) + +#### Signature + +```dotnet +public FunctionResult GetDirections(Dictionary args, Dictionary rawData) +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/Prefabs/ConciergeAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/ConciergeAgent.cs) + +Line 102. + +*** + +### GetServices() + +#### Signature + +```dotnet +public List GetServices() +``` + +#### Returns + +`List` + +#### Source + +[`src/SignalWire/Prefabs/ConciergeAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/ConciergeAgent.cs) + +Line 120. + +*** + +### GetVenueName() + +#### Signature + +```dotnet +public string GetVenueName() +``` + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/Prefabs/ConciergeAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/ConciergeAgent.cs) + +Line 119. + +## Source + +[`src/SignalWire/Prefabs/ConciergeAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/ConciergeAgent.cs) + +Line 9. diff --git a/fern/products/sdk-reference/dotnet/agents/prefabs/faq-bot-agent/index.mdx b/fern/products/sdk-reference/dotnet/agents/prefabs/faq-bot-agent/index.mdx new file mode 100644 index 0000000000..8e00dfa168 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/prefabs/faq-bot-agent/index.mdx @@ -0,0 +1,129 @@ +--- +slug: "/reference/dotnet/agents/prefabs/faq-bot-agent" +title: "FAQBotAgent" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Prefabs.FAQBotAgent" + parent: "agents.prefabs" + module: "agents.prefabs" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/FAQBotAgent.cs" + visibility: "public" +--- +# `FAQBotAgent` + +Prefab FAQ bot agent with keyword-scored search. +Registers a `search_faqs` tool. + +## Signature + +```dotnet +public class FAQBotAgent : AgentBase +``` + +## Inheritance + +**Extends:** [SignalWire.SWML.Service](/docs/sdk-reference/reference/dotnet/agents/swml/service) + +## Methods + +### FAQBotAgent(string, List\>, Dictionary\?) + +#### Signature + +```dotnet +public FAQBotAgent(string name, List> faqs, Dictionary? options = null) +``` + +#### Parameters + + + + + + + +#### Source + +[`src/SignalWire/Prefabs/FAQBotAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/FAQBotAgent.cs) + +Line 14. + +*** + +### GetFaqs() + +#### Signature + +```dotnet +public List> GetFaqs() +``` + +#### Returns + +`List>` + +#### Source + +[`src/SignalWire/Prefabs/FAQBotAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/FAQBotAgent.cs) + +Line 98. + +*** + +### GetSuggestRelated() + +#### Signature + +```dotnet +public bool GetSuggestRelated() +``` + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Prefabs/FAQBotAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/FAQBotAgent.cs) + +Line 99. + +*** + +### SearchFaqs(Dictionary\, Dictionary\) + +SWAIG tool handler that searches the configured FAQ +knowledge base for the best keyword-scored answer. +(Python parity: `FAQBotAgent.search_faqs(args, raw_data)`.) + +#### Signature + +```dotnet +public FunctionResult SearchFaqs(Dictionary args, Dictionary rawData) +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/Prefabs/FAQBotAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/FAQBotAgent.cs) + +Line 63. + +## Source + +[`src/SignalWire/Prefabs/FAQBotAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/FAQBotAgent.cs) + +Line 9. diff --git a/fern/products/sdk-reference/dotnet/agents/prefabs/index.mdx b/fern/products/sdk-reference/dotnet/agents/prefabs/index.mdx new file mode 100644 index 0000000000..062dcaccd1 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/prefabs/index.mdx @@ -0,0 +1,38 @@ +--- +slug: "/reference/dotnet/agents/prefabs" +title: "prefabs" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "module" + language: "dotnet" + qualified_name: "agents.prefabs" + parent: "agents" + module: "agents" +--- +# `prefabs` + +## Classes + + + + Prefab concierge agent for venue/hotel style interactions. Registers `check_availability` and `get_directions` tools. + + + + Prefab FAQ bot agent with keyword-scored search. Registers a `search_faqs` tool. + + + + Prefab agent that gathers information by asking a series of questions. Registers `start_questions` and `submit_answer` tools. + + + + Prefab agent that greets callers and transfers them to departments. Registers `collect_caller_info` and `transfer_call` tools. + + + + Prefab agent that conducts surveys with typed question validation. Registers `validate_response` and `log_response` tools. + + diff --git a/fern/products/sdk-reference/dotnet/agents/prefabs/info-gatherer-agent/index.mdx b/fern/products/sdk-reference/dotnet/agents/prefabs/info-gatherer-agent/index.mdx new file mode 100644 index 0000000000..9d1a75c627 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/prefabs/info-gatherer-agent/index.mdx @@ -0,0 +1,143 @@ +--- +slug: "/reference/dotnet/agents/prefabs/info-gatherer-agent" +title: "InfoGathererAgent" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Prefabs.InfoGathererAgent" + parent: "agents.prefabs" + module: "agents.prefabs" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/InfoGathererAgent.cs" + visibility: "public" +--- +# `InfoGathererAgent` + +Prefab agent that gathers information by asking a series of questions. +Registers `start_questions` and `submit_answer` tools. + +## Signature + +```dotnet +public class InfoGathererAgent : AgentBase +``` + +## Inheritance + +**Extends:** [SignalWire.SWML.Service](/docs/sdk-reference/reference/dotnet/agents/swml/service) + +## Methods + +### GetQuestions() + +#### Signature + +```dotnet +public List> GetQuestions() +``` + +#### Returns + +`List>` + +#### Source + +[`src/SignalWire/Prefabs/InfoGathererAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/InfoGathererAgent.cs) + +Line 77. + +*** + +### InfoGathererAgent(string, List\>, AgentOptions?) + +#### Signature + +```dotnet +public InfoGathererAgent(string name, List> questions, AgentOptions? options = null) +``` + +#### Parameters + + + Agent name (defaults to "info\_gatherer"). + + + + List of question dicts with key\_name, question\_text, and optional confirm. + + + + Additional <xref href="SignalWire.Agent.AgentOptions" data-throw-if-not-resolved="false"></xref> overrides. + + +#### Source + +[`src/SignalWire/Prefabs/InfoGathererAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/InfoGathererAgent.cs) + +Line 16. + +*** + +### StartQuestions(Dictionary\, Dictionary\) + +SWAIG tool handler for the `start_questions` tool. +(Python parity: `InfoGathererAgent.start_questions`.) + +#### Signature + +```dotnet +public FunctionResult StartQuestions(Dictionary args, Dictionary rawData) +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/Prefabs/InfoGathererAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/InfoGathererAgent.cs) + +Line 60. + +*** + +### SubmitAnswer(Dictionary\, Dictionary\) + +SWAIG tool handler for the `submit_answer` tool. +(Python parity: `InfoGathererAgent.submit_answer`.) + +#### Signature + +```dotnet +public FunctionResult SubmitAnswer(Dictionary args, Dictionary rawData) +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/Prefabs/InfoGathererAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/InfoGathererAgent.cs) + +Line 71. + +## Source + +[`src/SignalWire/Prefabs/InfoGathererAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/InfoGathererAgent.cs) + +Line 9. diff --git a/fern/products/sdk-reference/dotnet/agents/prefabs/receptionist-agent/index.mdx b/fern/products/sdk-reference/dotnet/agents/prefabs/receptionist-agent/index.mdx new file mode 100644 index 0000000000..1888694c7d --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/prefabs/receptionist-agent/index.mdx @@ -0,0 +1,99 @@ +--- +slug: "/reference/dotnet/agents/prefabs/receptionist-agent" +title: "ReceptionistAgent" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Prefabs.ReceptionistAgent" + parent: "agents.prefabs" + module: "agents.prefabs" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/ReceptionistAgent.cs" + visibility: "public" +--- +# `ReceptionistAgent` + +Prefab agent that greets callers and transfers them to departments. +Registers `collect_caller_info` and `transfer_call` tools. + +## Signature + +```dotnet +public class ReceptionistAgent : AgentBase +``` + +## Inheritance + +**Extends:** [SignalWire.SWML.Service](/docs/sdk-reference/reference/dotnet/agents/swml/service) + +## Methods + +### GetDepartments() + +#### Signature + +```dotnet +public List> GetDepartments() +``` + +#### Returns + +`List>` + +#### Source + +[`src/SignalWire/Prefabs/ReceptionistAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/ReceptionistAgent.cs) + +Line 94. + +*** + +### GetGreeting() + +#### Signature + +```dotnet +public string GetGreeting() +``` + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/Prefabs/ReceptionistAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/ReceptionistAgent.cs) + +Line 95. + +*** + +### ReceptionistAgent(string, List\>, Dictionary\?) + +#### Signature + +```dotnet +public ReceptionistAgent(string name, List> departments, Dictionary? options = null) +``` + +#### Parameters + + + + + + + +#### Source + +[`src/SignalWire/Prefabs/ReceptionistAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/ReceptionistAgent.cs) + +Line 14. + +## Source + +[`src/SignalWire/Prefabs/ReceptionistAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/ReceptionistAgent.cs) + +Line 9. diff --git a/fern/products/sdk-reference/dotnet/agents/prefabs/survey-agent/index.mdx b/fern/products/sdk-reference/dotnet/agents/prefabs/survey-agent/index.mdx new file mode 100644 index 0000000000..258067c3c0 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/prefabs/survey-agent/index.mdx @@ -0,0 +1,157 @@ +--- +slug: "/reference/dotnet/agents/prefabs/survey-agent" +title: "SurveyAgent" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Prefabs.SurveyAgent" + parent: "agents.prefabs" + module: "agents.prefabs" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/SurveyAgent.cs" + visibility: "public" +--- +# `SurveyAgent` + +Prefab agent that conducts surveys with typed question validation. +Registers `validate_response` and `log_response` tools. + +## Signature + +```dotnet +public class SurveyAgent : AgentBase +``` + +## Inheritance + +**Extends:** [SignalWire.SWML.Service](/docs/sdk-reference/reference/dotnet/agents/swml/service) + +## Methods + +### GetSurveyName() + +#### Signature + +```dotnet +public string GetSurveyName() +``` + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/Prefabs/SurveyAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/SurveyAgent.cs) + +Line 141. + +*** + +### GetSurveyQuestions() + +#### Signature + +```dotnet +public List> GetSurveyQuestions() +``` + +#### Returns + +`List>` + +#### Source + +[`src/SignalWire/Prefabs/SurveyAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/SurveyAgent.cs) + +Line 140. + +*** + +### LogResponse(Dictionary\, Dictionary\) + +SWAIG tool handler for the `log_response` tool. +(Python parity: `SurveyAgent.log_response`.) + +#### Signature + +```dotnet +public FunctionResult LogResponse(Dictionary args, Dictionary rawData) +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/Prefabs/SurveyAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/SurveyAgent.cs) + +Line 133. + +*** + +### SurveyAgent(string, List\>, Dictionary\?) + +#### Signature + +```dotnet +public SurveyAgent(string name, List> questions, Dictionary? options = null) +``` + +#### Parameters + + + + + + + +#### Source + +[`src/SignalWire/Prefabs/SurveyAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/SurveyAgent.cs) + +Line 16. + +*** + +### ValidateResponse(Dictionary\, Dictionary\) + +SWAIG tool handler for the `validate_response` tool. +(Python parity: `SurveyAgent.validate_response`.) + +#### Signature + +```dotnet +public FunctionResult ValidateResponse(Dictionary args, Dictionary rawData) +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/Prefabs/SurveyAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/SurveyAgent.cs) + +Line 81. + +## Source + +[`src/SignalWire/Prefabs/SurveyAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/SurveyAgent.cs) + +Line 9. diff --git a/fern/products/sdk-reference/dotnet/agents/server/agent-server/index.mdx b/fern/products/sdk-reference/dotnet/agents/server/agent-server/index.mdx new file mode 100644 index 0000000000..fe248ca384 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/server/agent-server/index.mdx @@ -0,0 +1,304 @@ +--- +slug: "/reference/dotnet/agents/server/agent-server" +title: "AgentServer" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Server.AgentServer" + parent: "agents.server" + module: "agents.server" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/obj/Release/net8.0/System.Text.RegularExpressions.Generator/System.Text.RegularExpressions.Generator.RegexGenerator/RegexGenerator.g.cs" + visibility: "public" +--- +# `AgentServer` + +Multi-agent HTTP server. Registers agents at routes, dispatches requests by +longest prefix match, serves static files with path-traversal protection, +handles health/ready/root-index, and supports SIP routing. + +## Signature + +```dotnet +public class AgentServer +``` + +## Properties + + + + + + + The agent\_server logger. (Python parity: `AgentServer.logger` instance attribute.) + + + + +## Methods + +### AgentServer(string, int?, string) + +#### Signature + +```dotnet +public AgentServer(string host = "0.0.0.0", int? port = null, string logLevel = "info") +``` + +#### Parameters + + + + + + + +#### Source + +[`src/SignalWire/Server/AgentServer.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Server/AgentServer.cs) + +Line 46. + +*** + +### GetAgent(string) + +#### Signature + +```dotnet +public AgentBase? GetAgent(string route) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Agent.AgentBase` + +#### Source + +[`src/SignalWire/Server/AgentServer.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Server/AgentServer.cs) + +Line 88. + +*** + +### GetAgents() + +Return all registered routes (sorted). + +#### Signature + +```dotnet +public List GetAgents() +``` + +#### Returns + +`List` + +#### Source + +[`src/SignalWire/Server/AgentServer.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Server/AgentServer.cs) + +Line 81. + +*** + +### GetSipUsernameMapping() + +#### Signature + +```dotnet +public Dictionary GetSipUsernameMapping() +``` + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/Server/AgentServer.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Server/AgentServer.cs) + +Line 120. + +*** + +### HandleRequest(string, string, Dictionary\?, string?) + +Handle an HTTP request. Returns (status, headers, body). + +#### Signature + +```dotnet +public (int Status, Dictionary Headers, string Body) HandleRequest(string method, string path, Dictionary? headers = null, string? body = null) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`System.ValueTuple,string>` + +#### Source + +[`src/SignalWire/Server/AgentServer.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Server/AgentServer.cs) + +Line 146. + +*** + +### Register(AgentBase, string?) + +Register an agent at a route. Throws if the route is already taken. + +#### Signature + +```dotnet +public AgentServer Register(AgentBase agent, string? route = null) +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire.Server.AgentServer` + +#### Source + +[`src/SignalWire/Server/AgentServer.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Server/AgentServer.cs) + +Line 62. + +*** + +### RegisterSipUsername(string, string) + +#### Signature + +```dotnet +public AgentServer RegisterSipUsername(string username, string route) +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire.Server.AgentServer` + +#### Source + +[`src/SignalWire/Server/AgentServer.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Server/AgentServer.cs) + +Line 112. + +*** + +### ServeStatic(string, string) + +Serve static files from <code class="paramref">directory</code> under <code class="paramref">urlPrefix</code>. +Throws if the directory does not exist. + +#### Signature + +```dotnet +public AgentServer ServeStatic(string directory, string urlPrefix) +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire.Server.AgentServer` + +#### Source + +[`src/SignalWire/Server/AgentServer.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Server/AgentServer.cs) + +Line 130. + +*** + +### SetupSipRouting(string, bool) + +Enable SIP routing on this server. `route` lets the caller pin +a non-default SIP route prefix; `autoMap` opts agents into +auto-mapped sip\_username = agent name. Matches Python's +`setup_sip_routing(self, route='/sip', auto_map=True)`. + +#### Signature + +```dotnet +public AgentServer SetupSipRouting(string route = "/sip", bool autoMap = true) +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire.Server.AgentServer` + +#### Source + +[`src/SignalWire/Server/AgentServer.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Server/AgentServer.cs) + +Line 104. + +*** + +### Unregister(string) + +#### Signature + +```dotnet +public AgentServer Unregister(string route) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Server.AgentServer` + +#### Source + +[`src/SignalWire/Server/AgentServer.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Server/AgentServer.cs) + +Line 73. + +## Source + +[`src/SignalWire/obj/Release/net8.0/System.Text.RegularExpressions.Generator/System.Text.RegularExpressions.Generator.RegexGenerator/RegexGenerator.g.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/obj/Release/net8.0/System.Text.RegularExpressions.Generator/System.Text.RegularExpressions.Generator.RegexGenerator/RegexGenerator.g.cs) + +Line 8. diff --git a/fern/products/sdk-reference/dotnet/agents/server/index.mdx b/fern/products/sdk-reference/dotnet/agents/server/index.mdx new file mode 100644 index 0000000000..fd90ce86c2 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/server/index.mdx @@ -0,0 +1,22 @@ +--- +slug: "/reference/dotnet/agents/server" +title: "server" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "module" + language: "dotnet" + qualified_name: "agents.server" + parent: "agents" + module: "agents" +--- +# `server` + +## Classes + + + + Multi-agent HTTP server. Registers agents at routes, dispatches requests by longest prefix match, serves static files with path-traversal protection, handles health/ready/root-index, and supports SIP routing. + + diff --git a/fern/products/sdk-reference/dotnet/agents/serverless/adapter/index.mdx b/fern/products/sdk-reference/dotnet/agents/serverless/adapter/index.mdx new file mode 100644 index 0000000000..f4313af970 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/serverless/adapter/index.mdx @@ -0,0 +1,156 @@ +--- +slug: "/reference/dotnet/agents/serverless/adapter" +title: "Adapter" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Serverless.Adapter" + parent: "agents.serverless" + module: "agents.serverless" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Serverless/Adapter.cs" + visibility: "public" +--- +# `Adapter` + +Auto-detect and handle serverless environments (Lambda, Azure, GCF, CGI) +or fall back to the built-in ASP.NET server. + +**Modifiers:** `static` + +## Signature + +```dotnet +public static class Adapter +``` + +## Methods + +### Detect() + +Detect the current runtime environment. + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static string Detect() +``` + +#### Returns + +`string` — One of "lambda", "gcf", "azure", "cgi", or "server". + +#### Source + +[`src/SignalWire/Serverless/Adapter.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Serverless/Adapter.cs) + +Line 21. + +*** + +### HandleAzure(Service, Dictionary\) + +Handle an Azure Functions invocation. + +Extracts method, path, headers, and body from the Azure request +dictionary, calls agent.HandleRequest(), and returns an Azure-compatible +response dictionary. + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static Dictionary HandleAzure(Service agent, Dictionary request) +``` + +#### Parameters + + + + + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/Serverless/Adapter.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Serverless/Adapter.cs) + +Line 104. + +*** + +### HandleLambda(Service, Dictionary\) + +Handle an AWS Lambda (API Gateway) invocation. + +Extracts method, path, headers, and body from the API Gateway event +format, calls agent.HandleRequest(), and returns an API Gateway +compatible response. + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static Dictionary HandleLambda(Service agent, Dictionary lambdaEvent) +``` + +#### Parameters + + + An object with a HandleRequest method (AgentBase or Service). + + + + The API Gateway event payload as a dictionary. + + +#### Returns + +`Dictionary` — API Gateway response: statusCode, headers, body. + +#### Source + +[`src/SignalWire/Serverless/Adapter.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Serverless/Adapter.cs) + +Line 53. + +*** + +### Serve(dynamic) + +Auto-detect the runtime environment and serve the agent. + +For serverless environments, reads from stdin and dispatches +to the appropriate handler. For "server", calls agent.Run(). + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static void Serve(dynamic agent) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Serverless/Adapter.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Serverless/Adapter.cs) + +Line 160. + +## Source + +[`src/SignalWire/Serverless/Adapter.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Serverless/Adapter.cs) + +Line 9. diff --git a/fern/products/sdk-reference/dotnet/agents/serverless/index.mdx b/fern/products/sdk-reference/dotnet/agents/serverless/index.mdx new file mode 100644 index 0000000000..fff9f259fc --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/serverless/index.mdx @@ -0,0 +1,22 @@ +--- +slug: "/reference/dotnet/agents/serverless" +title: "serverless" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "module" + language: "dotnet" + qualified_name: "agents.serverless" + parent: "agents" + module: "agents" +--- +# `serverless` + +## Classes + + + + Auto-detect and handle serverless environments (Lambda, Azure, GCF, CGI) or fall back to the built-in ASP.NET server. + + diff --git a/fern/products/sdk-reference/dotnet/agents/skills-builtin/api-ninjas-trivia-skill/index.mdx b/fern/products/sdk-reference/dotnet/agents/skills-builtin/api-ninjas-trivia-skill/index.mdx new file mode 100644 index 0000000000..1e226ad443 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/skills-builtin/api-ninjas-trivia-skill/index.mdx @@ -0,0 +1,94 @@ +--- +slug: "/reference/dotnet/agents/skills-builtin/api-ninjas-trivia-skill" +title: "ApiNinjasTriviaSkill" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Skills.Builtin.ApiNinjasTriviaSkill" + parent: "agents.skills-builtin" + module: "agents.skills-builtin" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/ApiNinjasTriviaSkill.cs" + visibility: "public" +--- +# `ApiNinjasTriviaSkill` + +Get trivia questions from API Ninjas (DataMap). + +**Modifiers:** `sealed` + +## Signature + +```dotnet +public sealed class ApiNinjasTriviaSkill : SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire.Skills.SkillBase](/docs/sdk-reference/reference/dotnet/agents/skills/skill-base) + +## Properties + + + + + + + +## Methods + +### RegisterTools(AgentBase) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override void RegisterTools(AgentBase agent) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Skills/Builtin/ApiNinjasTriviaSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/ApiNinjasTriviaSkill.cs) + +Line 24. + +*** + +### Setup(AgentBase, Dictionary\) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override bool Setup(AgentBase agent, Dictionary parameters) +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Skills/Builtin/ApiNinjasTriviaSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/ApiNinjasTriviaSkill.cs) + +Line 19. + +## Source + +[`src/SignalWire/Skills/Builtin/ApiNinjasTriviaSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/ApiNinjasTriviaSkill.cs) + +Line 6. diff --git a/fern/products/sdk-reference/dotnet/agents/skills-builtin/claude-skills-skill/index.mdx b/fern/products/sdk-reference/dotnet/agents/skills-builtin/claude-skills-skill/index.mdx new file mode 100644 index 0000000000..dacb57b6b0 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/skills-builtin/claude-skills-skill/index.mdx @@ -0,0 +1,179 @@ +--- +slug: "/reference/dotnet/agents/skills-builtin/claude-skills-skill" +title: "ClaudeSkillsSkill" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Skills.Builtin.ClaudeSkillsSkill" + parent: "agents.skills-builtin" + module: "agents.skills-builtin" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/ClaudeSkillsSkill.cs" + visibility: "public" +--- +# `ClaudeSkillsSkill` + +Load Claude SKILL.md files as agent tools. + +Mirrors signalwire-python's `signalwire.skills.claude_skills.skill`. +At setup time, the skill walks `skills_path` for child directories +containing `SKILL.md`; each such file is parsed for YAML +frontmatter (the bit between two `---` lines) plus a markdown +body. Each loaded skill becomes one SWAIG tool whose handler returns +the body with three substitutions: + +<ul><li>`$ARGUMENTS` / `$ARGUMENTS[N]` / `$N` — the + `arguments` string passed to the tool, optionally split into + positional pieces by whitespace.</li><li>`${CLAUDE_SKILL_DIR}` — absolute path to the skill's + directory.</li><li>`${CLAUDE_SESSION_ID}` — call id from raw_data.</li></ul> + +The full Python implementation also runs a frontmatter-driven invocation +gate (skip-tool / skip-prompt), tolerates supporting reference sections, +and offers an opt-in shell-injection preprocessor (`` !`cmd` ``). The +.NET port ships the discovery/parse/handler core; the optional shell +preprocessor is left out by design (set `allow_shell_injection` +to a no-op — the surface is preserved for future expansion). + +**Modifiers:** `sealed` + +## Signature + +```dotnet +public sealed class ClaudeSkillsSkill : SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire.Skills.SkillBase](/docs/sdk-reference/reference/dotnet/agents/skills/skill-base) + +## Properties + + + + + + + +## Methods + +### GetHints() + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override List GetHints() +``` + +#### Returns + +`List` + +#### Source + +[`src/SignalWire/Skills/Builtin/ClaudeSkillsSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/ClaudeSkillsSkill.cs) + +Line 318. + +*** + +### GetInstanceKey() + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override string GetInstanceKey() +``` + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/Skills/Builtin/ClaudeSkillsSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/ClaudeSkillsSkill.cs) + +Line 355. + +*** + +### GetPromptSections() + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override List> GetPromptSections() +``` + +#### Returns + +`List>` + +#### Source + +[`src/SignalWire/Skills/Builtin/ClaudeSkillsSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/ClaudeSkillsSkill.cs) + +Line 332. + +*** + +### RegisterTools(AgentBase) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override void RegisterTools(AgentBase agent) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Skills/Builtin/ClaudeSkillsSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/ClaudeSkillsSkill.cs) + +Line 82. + +*** + +### Setup(AgentBase, Dictionary\) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override bool Setup(AgentBase agent, Dictionary parameters) +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Skills/Builtin/ClaudeSkillsSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/ClaudeSkillsSkill.cs) + +Line 51. + +## Source + +[`src/SignalWire/Skills/Builtin/ClaudeSkillsSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/ClaudeSkillsSkill.cs) + +Line 33. diff --git a/fern/products/sdk-reference/dotnet/agents/skills-builtin/custom-skills-skill/index.mdx b/fern/products/sdk-reference/dotnet/agents/skills-builtin/custom-skills-skill/index.mdx new file mode 100644 index 0000000000..a3ebbe11ca --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/skills-builtin/custom-skills-skill/index.mdx @@ -0,0 +1,94 @@ +--- +slug: "/reference/dotnet/agents/skills-builtin/custom-skills-skill" +title: "CustomSkillsSkill" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Skills.Builtin.CustomSkillsSkill" + parent: "agents.skills-builtin" + module: "agents.skills-builtin" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/CustomSkillsSkill.cs" + visibility: "public" +--- +# `CustomSkillsSkill` + +Register user-defined custom tools. + +**Modifiers:** `sealed` + +## Signature + +```dotnet +public sealed class CustomSkillsSkill : SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire.Skills.SkillBase](/docs/sdk-reference/reference/dotnet/agents/skills/skill-base) + +## Properties + + + + + + + +## Methods + +### RegisterTools(AgentBase) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override void RegisterTools(AgentBase agent) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Skills/Builtin/CustomSkillsSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/CustomSkillsSkill.cs) + +Line 14. + +*** + +### Setup(AgentBase, Dictionary\) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override bool Setup(AgentBase agent, Dictionary parameters) +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Skills/Builtin/CustomSkillsSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/CustomSkillsSkill.cs) + +Line 12. + +## Source + +[`src/SignalWire/Skills/Builtin/CustomSkillsSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/CustomSkillsSkill.cs) + +Line 6. diff --git a/fern/products/sdk-reference/dotnet/agents/skills-builtin/datasphere-serverless-skill/index.mdx b/fern/products/sdk-reference/dotnet/agents/skills-builtin/datasphere-serverless-skill/index.mdx new file mode 100644 index 0000000000..406ebdc9b0 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/skills-builtin/datasphere-serverless-skill/index.mdx @@ -0,0 +1,138 @@ +--- +slug: "/reference/dotnet/agents/skills-builtin/datasphere-serverless-skill" +title: "DatasphereServerlessSkill" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Skills.Builtin.DatasphereServerlessSkill" + parent: "agents.skills-builtin" + module: "agents.skills-builtin" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/DatasphereServerlessSkill.cs" + visibility: "public" +--- +# `DatasphereServerlessSkill` + +Search knowledge using SignalWire DataSphere with serverless DataMap execution. + +**Modifiers:** `sealed` + +## Signature + +```dotnet +public sealed class DatasphereServerlessSkill : SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire.Skills.SkillBase](/docs/sdk-reference/reference/dotnet/agents/skills/skill-base) + +## Properties + + + + + + + +## Methods + +### GetGlobalData() + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override Dictionary GetGlobalData() +``` + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/Skills/Builtin/DatasphereServerlessSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/DatasphereServerlessSkill.cs) + +Line 105. + +*** + +### GetPromptSections() + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override List> GetPromptSections() +``` + +#### Returns + +`List>` + +#### Source + +[`src/SignalWire/Skills/Builtin/DatasphereServerlessSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/DatasphereServerlessSkill.cs) + +Line 112. + +*** + +### RegisterTools(AgentBase) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override void RegisterTools(AgentBase agent) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Skills/Builtin/DatasphereServerlessSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/DatasphereServerlessSkill.cs) + +Line 24. + +*** + +### Setup(AgentBase, Dictionary\) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override bool Setup(AgentBase agent, Dictionary parameters) +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Skills/Builtin/DatasphereServerlessSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/DatasphereServerlessSkill.cs) + +Line 13. + +## Source + +[`src/SignalWire/Skills/Builtin/DatasphereServerlessSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/DatasphereServerlessSkill.cs) + +Line 7. diff --git a/fern/products/sdk-reference/dotnet/agents/skills-builtin/datasphere-skill/index.mdx b/fern/products/sdk-reference/dotnet/agents/skills-builtin/datasphere-skill/index.mdx new file mode 100644 index 0000000000..c4e573fc5b --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/skills-builtin/datasphere-skill/index.mdx @@ -0,0 +1,150 @@ +--- +slug: "/reference/dotnet/agents/skills-builtin/datasphere-skill" +title: "DatasphereSkill" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Skills.Builtin.DatasphereSkill" + parent: "agents.skills-builtin" + module: "agents.skills-builtin" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/DatasphereSkill.cs" + visibility: "public" +--- +# `DatasphereSkill` + +SignalWire DataSphere knowledge-base search skill. + +Mirrors signalwire-python's `signalwire.skills.datasphere.skill`. +POSTs a JSON body to <code>https://\.signalwire.com +/api/datasphere/documents/search</code> with HTTP Basic auth +(project\_id : token). Real DataSphere returns matches under +`chunks`; the porting-sdk audit fixture uses `results`; +accept either so the skill round-trips against the live API and the +offline audit alike (matching the precedent already in Java/PHP/Perl/ +Rust). + +Upstream URL override: `DATASPHERE_BASE_URL`. Path +`/api/datasphere/documents/search` is preserved. + +**Modifiers:** `sealed` + +## Signature + +```dotnet +public sealed class DatasphereSkill : SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire.Skills.SkillBase](/docs/sdk-reference/reference/dotnet/agents/skills/skill-base) + +## Properties + + + + + + + +## Methods + +### GetGlobalData() + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override Dictionary GetGlobalData() +``` + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/Skills/Builtin/DatasphereSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/DatasphereSkill.cs) + +Line 174. + +*** + +### GetPromptSections() + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override List> GetPromptSections() +``` + +#### Returns + +`List>` + +#### Source + +[`src/SignalWire/Skills/Builtin/DatasphereSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/DatasphereSkill.cs) + +Line 181. + +*** + +### RegisterTools(AgentBase) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override void RegisterTools(AgentBase agent) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Skills/Builtin/DatasphereSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/DatasphereSkill.cs) + +Line 41. + +*** + +### Setup(AgentBase, Dictionary\) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override bool Setup(AgentBase agent, Dictionary parameters) +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Skills/Builtin/DatasphereSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/DatasphereSkill.cs) + +Line 30. + +## Source + +[`src/SignalWire/Skills/Builtin/DatasphereSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/DatasphereSkill.cs) + +Line 22. diff --git a/fern/products/sdk-reference/dotnet/agents/skills-builtin/datetime-skill/index.mdx b/fern/products/sdk-reference/dotnet/agents/skills-builtin/datetime-skill/index.mdx new file mode 100644 index 0000000000..fceeaedda0 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/skills-builtin/datetime-skill/index.mdx @@ -0,0 +1,114 @@ +--- +slug: "/reference/dotnet/agents/skills-builtin/datetime-skill" +title: "DatetimeSkill" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Skills.Builtin.DatetimeSkill" + parent: "agents.skills-builtin" + module: "agents.skills-builtin" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/DatetimeSkill.cs" + visibility: "public" +--- +# `DatetimeSkill` + +Get current date, time, and timezone information. + +**Modifiers:** `sealed` + +## Signature + +```dotnet +public sealed class DatetimeSkill : SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire.Skills.SkillBase](/docs/sdk-reference/reference/dotnet/agents/skills/skill-base) + +## Properties + + + + + +## Methods + +### GetPromptSections() + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override List> GetPromptSections() +``` + +#### Returns + +`List>` + +#### Source + +[`src/SignalWire/Skills/Builtin/DatetimeSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/DatetimeSkill.cs) + +Line 76. + +*** + +### RegisterTools(AgentBase) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override void RegisterTools(AgentBase agent) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Skills/Builtin/DatetimeSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/DatetimeSkill.cs) + +Line 13. + +*** + +### Setup(AgentBase, Dictionary\) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override bool Setup(AgentBase agent, Dictionary parameters) +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Skills/Builtin/DatetimeSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/DatetimeSkill.cs) + +Line 11. + +## Source + +[`src/SignalWire/Skills/Builtin/DatetimeSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/DatetimeSkill.cs) + +Line 6. diff --git a/fern/products/sdk-reference/dotnet/agents/skills-builtin/google-maps-skill/index.mdx b/fern/products/sdk-reference/dotnet/agents/skills-builtin/google-maps-skill/index.mdx new file mode 100644 index 0000000000..0cef6e0a12 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/skills-builtin/google-maps-skill/index.mdx @@ -0,0 +1,136 @@ +--- +slug: "/reference/dotnet/agents/skills-builtin/google-maps-skill" +title: "GoogleMapsSkill" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Skills.Builtin.GoogleMapsSkill" + parent: "agents.skills-builtin" + module: "agents.skills-builtin" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/GoogleMapsSkill.cs" + visibility: "public" +--- +# `GoogleMapsSkill` + +Validate addresses and compute driving routes using Google Maps (DataMap). + +**Modifiers:** `sealed` + +## Signature + +```dotnet +public sealed class GoogleMapsSkill : SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire.Skills.SkillBase](/docs/sdk-reference/reference/dotnet/agents/skills/skill-base) + +## Properties + + + + + +## Methods + +### GetHints() + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override List GetHints() +``` + +#### Returns + +`List` + +#### Source + +[`src/SignalWire/Skills/Builtin/GoogleMapsSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/GoogleMapsSkill.cs) + +Line 115. + +*** + +### GetPromptSections() + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override List> GetPromptSections() +``` + +#### Returns + +`List>` + +#### Source + +[`src/SignalWire/Skills/Builtin/GoogleMapsSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/GoogleMapsSkill.cs) + +Line 118. + +*** + +### RegisterTools(AgentBase) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override void RegisterTools(AgentBase agent) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Skills/Builtin/GoogleMapsSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/GoogleMapsSkill.cs) + +Line 16. + +*** + +### Setup(AgentBase, Dictionary\) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override bool Setup(AgentBase agent, Dictionary parameters) +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Skills/Builtin/GoogleMapsSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/GoogleMapsSkill.cs) + +Line 11. + +## Source + +[`src/SignalWire/Skills/Builtin/GoogleMapsSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/GoogleMapsSkill.cs) + +Line 6. diff --git a/fern/products/sdk-reference/dotnet/agents/skills-builtin/index.mdx b/fern/products/sdk-reference/dotnet/agents/skills-builtin/index.mdx new file mode 100644 index 0000000000..9c7d1600f6 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/skills-builtin/index.mdx @@ -0,0 +1,90 @@ +--- +slug: "/reference/dotnet/agents/skills-builtin" +title: "skills-builtin" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "module" + language: "dotnet" + qualified_name: "agents.skills-builtin" + parent: "agents" + module: "agents" +--- +# `skills-builtin` + +## Classes + + + + Get trivia questions from API Ninjas (DataMap). + + + + Load Claude SKILL.md files as agent tools. Mirrors signalwire-python's `signalwire.skills.claude_skills.skill`. At setup time, the skill walks `skills_path` for child directories containing `SKILL.md`; each such file is parsed for YAML frontmatter (the bit between two `---` lines) plus a markdown body. Each loaded skill becomes one SWAIG tool whose handler returns the body with three substitutions: <ul><li>`$ARGUMENTS` / `$ARGUMENTS[N]` / `$N` — the `arguments` string passed to the tool, optionally split into positional pieces by whitespace.</li><li>`${CLAUDE_SKILL_DIR}` — absolute path to the skill's directory.</li><li>`${CLAUDE_SESSION_ID}` — call id from raw\_data.</li></ul> The full Python implementation also runs a frontmatter-driven invocation gate (skip-tool / skip-prompt), tolerates supporting reference sections, and offers an opt-in shell-injection preprocessor (`` !`cmd` ``). The .NET port ships the discovery/parse/handler core; the optional shell preprocessor is left out by design (set `allow_shell_injection` to a no-op — the surface is preserved for future expansion). + + + + Register user-defined custom tools. + + + + Search knowledge using SignalWire DataSphere with serverless DataMap execution. + + + + SignalWire DataSphere knowledge-base search skill. Mirrors signalwire-python's `signalwire.skills.datasphere.skill`. POSTs a JSON body to `https://<space_name>.signalwire.com /api/datasphere/documents/search` with HTTP Basic auth (project\_id : token). Real DataSphere returns matches under `chunks`; the porting-sdk audit fixture uses `results`; accept either so the skill round-trips against the live API and the offline audit alike (matching the precedent already in Java/PHP/Perl/ Rust). Upstream URL override: `DATASPHERE_BASE_URL`. Path `/api/datasphere/documents/search` is preserved. + + + + Get current date, time, and timezone information. + + + + Validate addresses and compute driving routes using Google Maps (DataMap). + + + + Gather answers to a configurable list of questions. + + + + Tell jokes using the API Ninjas joke API (DataMap). + + + + Perform basic mathematical calculations. + + + + Bridge MCP (Model Context Protocol) servers with SWAIG functions. Mirrors signalwire-python's `signalwire.skills.mcp_gateway.skill`. Each configured service gets one or more SWAIG tools whose handler POSTs to the gateway with the tool name, arguments, and per-call session id (derived from `raw_data.global_data.mcp_call_id` if present, else `raw_data.call_id`). Auth: `auth_token` (Bearer) or `auth_user`/`auth_password` (Basic). The skill prefers Bearer when both are configured. Endpoint shape: `POST <gateway_url>/services/<service>/call` per the Python implementation. Audit fixtures point `gateway_url` at a loopback URL via the per-skill convention. + + + + Vector / keyword similarity search. Mirrors signalwire-python's `signalwire.skills.native_vector_search.skill` in <strong>remote mode only</strong>. Local-mode SQLite/pgvector indexing relies on Python-only deps (sentence-transformers, FAISS, pgvector) and is not portable to the .NET BCL — recorded in `PORT_OMISSIONS.md`. The remote mode POSTs the query to the configured search server, which returns a real-shape response the audit verifies on the wire. The handler reads `remote_url` from skill params; the audit fixture sets it to a loopback URL so the SDK exercises the real transport against canned bytes. + + + + Control background file playback (DataMap). + + + + Web scraping / crawling skill. Mirrors signalwire-python's `signalwire.skills.spider.skill`. The Python implementation uses lxml + BeautifulSoup for selector-based extraction; the .NET port ships a faithful HTTP fetch + regex-based HTML stripping (script/style removal, tag removal, whitespace collapse, smart truncation). That covers the canonical `fast_text` / `clean_text` path the audit exercises; selector-driven structured extraction can be layered on later. Upstream URL override: `SPIDER_BASE_URL`. The skill rewrites the fetch host while preserving the requested URL's path + query so the audit fixture sees the documented page on the wire. + + + + Transfer calls between agents based on pattern matching (DataMap). + + + + Get current weather information from WeatherAPI.com (DataMap). + + + + Web search skill backed by Google Custom Search. Mirrors signalwire-python's `signalwire.skills.web_search.skill` (the `WebSearchSkill.search_and_scrape_best` path). The CSE call is issued faithfully, then each result URL is scraped and a header line + per-result title/url/snippet (plus scraped content) is formatted. Latency control (Python skill.py commits 51101da + 295745b) bounds the whole tool call so a single slow site can never blow past the SignalWire kernel's ~55s webhook timeout: `per_page_timeout` (2.0s) caps each page scrape (a per-request linked <xref href="System.Threading.CancellationTokenSource" data-throw-if-not-resolved="false"></xref> with `CancelAfter`). `overall_deadline` (10.0s) is the wall-clock budget for the whole call; once it fires, in-flight scrapes are abandoned and we return what we have (a <xref href="System.Threading.CancellationTokenSource" data-throw-if-not-resolved="false"></xref> with `CancelAfter(overall_deadline)`). THIS IS THE CONTRACT. `parallel_scrape` (true) dispatches each scrape as a Task and awaits <xref href="System.Threading.Tasks.Task.WhenAll(System.Threading.Tasks.Task%5b%5d)" data-throw-if-not-resolved="false"></xref>, harvesting whatever completed when the deadline cancels (best-effort). `snippets_only` (false) skips scraping entirely and formats the CSE snippets directly. Sub-second response. When the deadline fires OR no scraped page meets the quality threshold, the handler falls back to formatting the CSE snippets into a NON-empty response rather than the empty no-results message, so the kernel never sees a webhook timeout. Upstream URL override: `WEB_SEARCH_BASE_URL` (used by audit\_skills\_dispatch.py to point at a local fixture). When set, the URL is rewritten to the override host while the path `/customsearch/v1` is preserved. + + + + Wikipedia search skill backed by the public Wikipedia REST API. Mirrors signalwire-python's `signalwire.skills.wikipedia_search.skill`. The Python skill makes two API calls per query — first `action=query&list=search` to find article titles, then `action=query&prop=extracts` to fetch each article's intro extract. Returns the article(s) as `**Title**\n\nExtract` joined by separators. Upstream URL override: `WIKIPEDIA_BASE_URL`. Path `/w/api.php` is preserved when the env var is set so the audit fixture sees the documented Wikipedia API path on the wire. + + diff --git a/fern/products/sdk-reference/dotnet/agents/skills-builtin/info-gatherer-skill/index.mdx b/fern/products/sdk-reference/dotnet/agents/skills-builtin/info-gatherer-skill/index.mdx new file mode 100644 index 0000000000..2c703764af --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/skills-builtin/info-gatherer-skill/index.mdx @@ -0,0 +1,138 @@ +--- +slug: "/reference/dotnet/agents/skills-builtin/info-gatherer-skill" +title: "InfoGathererSkill" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Skills.Builtin.InfoGathererSkill" + parent: "agents.skills-builtin" + module: "agents.skills-builtin" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/InfoGathererSkill.cs" + visibility: "public" +--- +# `InfoGathererSkill` + +Gather answers to a configurable list of questions. + +**Modifiers:** `sealed` + +## Signature + +```dotnet +public sealed class InfoGathererSkill : SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire.Skills.SkillBase](/docs/sdk-reference/reference/dotnet/agents/skills/skill-base) + +## Properties + + + + + + + +## Methods + +### GetGlobalData() + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override Dictionary GetGlobalData() +``` + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/Skills/Builtin/InfoGathererSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/InfoGathererSkill.cs) + +Line 101. + +*** + +### GetPromptSections() + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override List> GetPromptSections() +``` + +#### Returns + +`List>` + +#### Source + +[`src/SignalWire/Skills/Builtin/InfoGathererSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/InfoGathererSkill.cs) + +Line 117. + +*** + +### RegisterTools(AgentBase) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override void RegisterTools(AgentBase agent) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Skills/Builtin/InfoGathererSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/InfoGathererSkill.cs) + +Line 17. + +*** + +### Setup(AgentBase, Dictionary\) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override bool Setup(AgentBase agent, Dictionary parameters) +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Skills/Builtin/InfoGathererSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/InfoGathererSkill.cs) + +Line 12. + +## Source + +[`src/SignalWire/Skills/Builtin/InfoGathererSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/InfoGathererSkill.cs) + +Line 6. diff --git a/fern/products/sdk-reference/dotnet/agents/skills-builtin/joke-skill/index.mdx b/fern/products/sdk-reference/dotnet/agents/skills-builtin/joke-skill/index.mdx new file mode 100644 index 0000000000..e97d1791ec --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/skills-builtin/joke-skill/index.mdx @@ -0,0 +1,136 @@ +--- +slug: "/reference/dotnet/agents/skills-builtin/joke-skill" +title: "JokeSkill" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Skills.Builtin.JokeSkill" + parent: "agents.skills-builtin" + module: "agents.skills-builtin" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/JokeSkill.cs" + visibility: "public" +--- +# `JokeSkill` + +Tell jokes using the API Ninjas joke API (DataMap). + +**Modifiers:** `sealed` + +## Signature + +```dotnet +public sealed class JokeSkill : SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire.Skills.SkillBase](/docs/sdk-reference/reference/dotnet/agents/skills/skill-base) + +## Properties + + + + + +## Methods + +### GetGlobalData() + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override Dictionary GetGlobalData() +``` + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/Skills/Builtin/JokeSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/JokeSkill.cs) + +Line 66. + +*** + +### GetPromptSections() + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override List> GetPromptSections() +``` + +#### Returns + +`List>` + +#### Source + +[`src/SignalWire/Skills/Builtin/JokeSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/JokeSkill.cs) + +Line 69. + +*** + +### RegisterTools(AgentBase) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override void RegisterTools(AgentBase agent) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Skills/Builtin/JokeSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/JokeSkill.cs) + +Line 16. + +*** + +### Setup(AgentBase, Dictionary\) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override bool Setup(AgentBase agent, Dictionary parameters) +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Skills/Builtin/JokeSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/JokeSkill.cs) + +Line 11. + +## Source + +[`src/SignalWire/Skills/Builtin/JokeSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/JokeSkill.cs) + +Line 6. diff --git a/fern/products/sdk-reference/dotnet/agents/skills-builtin/math-skill/index.mdx b/fern/products/sdk-reference/dotnet/agents/skills-builtin/math-skill/index.mdx new file mode 100644 index 0000000000..ad4e935c80 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/skills-builtin/math-skill/index.mdx @@ -0,0 +1,114 @@ +--- +slug: "/reference/dotnet/agents/skills-builtin/math-skill" +title: "MathSkill" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Skills.Builtin.MathSkill" + parent: "agents.skills-builtin" + module: "agents.skills-builtin" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/obj/Release/net8.0/System.Text.RegularExpressions.Generator/System.Text.RegularExpressions.Generator.RegexGenerator/RegexGenerator.g.cs" + visibility: "public" +--- +# `MathSkill` + +Perform basic mathematical calculations. + +**Modifiers:** `sealed` + +## Signature + +```dotnet +public sealed class MathSkill : SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire.Skills.SkillBase](/docs/sdk-reference/reference/dotnet/agents/skills/skill-base) + +## Properties + + + + + +## Methods + +### GetPromptSections() + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override List> GetPromptSections() +``` + +#### Returns + +`List>` + +#### Source + +[`src/SignalWire/Skills/Builtin/MathSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/MathSkill.cs) + +Line 86. + +*** + +### RegisterTools(AgentBase) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override void RegisterTools(AgentBase agent) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Skills/Builtin/MathSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/MathSkill.cs) + +Line 17. + +*** + +### Setup(AgentBase, Dictionary\) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override bool Setup(AgentBase agent, Dictionary parameters) +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Skills/Builtin/MathSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/MathSkill.cs) + +Line 15. + +## Source + +[`src/SignalWire/obj/Release/net8.0/System.Text.RegularExpressions.Generator/System.Text.RegularExpressions.Generator.RegexGenerator/RegexGenerator.g.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/obj/Release/net8.0/System.Text.RegularExpressions.Generator/System.Text.RegularExpressions.Generator.RegexGenerator/RegexGenerator.g.cs) + +Line 31. diff --git a/fern/products/sdk-reference/dotnet/agents/skills-builtin/mcp-gateway-skill/index.mdx b/fern/products/sdk-reference/dotnet/agents/skills-builtin/mcp-gateway-skill/index.mdx new file mode 100644 index 0000000000..ac18ff2368 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/skills-builtin/mcp-gateway-skill/index.mdx @@ -0,0 +1,171 @@ +--- +slug: "/reference/dotnet/agents/skills-builtin/mcp-gateway-skill" +title: "McpGatewaySkill" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Skills.Builtin.McpGatewaySkill" + parent: "agents.skills-builtin" + module: "agents.skills-builtin" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/McpGatewaySkill.cs" + visibility: "public" +--- +# `McpGatewaySkill` + +Bridge MCP (Model Context Protocol) servers with SWAIG functions. + +Mirrors signalwire-python's `signalwire.skills.mcp_gateway.skill`. +Each configured service gets one or more SWAIG tools whose handler +POSTs to the gateway with the tool name, arguments, and per-call +session id (derived from `raw_data.global_data.mcp_call_id` if +present, else `raw_data.call_id`). + +Auth: `auth_token` (Bearer) or `auth_user`/`auth_password` +(Basic). The skill prefers Bearer when both are configured. + +Endpoint shape: `POST <gateway_url>/services/<service>/call` +per the Python implementation. Audit fixtures point `gateway_url` +at a loopback URL via the per-skill convention. + +**Modifiers:** `sealed` + +## Signature + +```dotnet +public sealed class McpGatewaySkill : SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire.Skills.SkillBase](/docs/sdk-reference/reference/dotnet/agents/skills/skill-base) + +## Properties + + + + + +## Methods + +### GetGlobalData() + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override Dictionary GetGlobalData() +``` + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/Skills/Builtin/McpGatewaySkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/McpGatewaySkill.cs) + +Line 249. + +*** + +### GetHints() + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override List GetHints() +``` + +#### Returns + +`List` + +#### Source + +[`src/SignalWire/Skills/Builtin/McpGatewaySkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/McpGatewaySkill.cs) + +Line 234. + +*** + +### GetPromptSections() + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override List> GetPromptSections() +``` + +#### Returns + +`List>` + +#### Source + +[`src/SignalWire/Skills/Builtin/McpGatewaySkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/McpGatewaySkill.cs) + +Line 268. + +*** + +### RegisterTools(AgentBase) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override void RegisterTools(AgentBase agent) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Skills/Builtin/McpGatewaySkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/McpGatewaySkill.cs) + +Line 32. + +*** + +### Setup(AgentBase, Dictionary\) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override bool Setup(AgentBase agent, Dictionary parameters) +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Skills/Builtin/McpGatewaySkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/McpGatewaySkill.cs) + +Line 27. + +## Source + +[`src/SignalWire/Skills/Builtin/McpGatewaySkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/McpGatewaySkill.cs) + +Line 22. diff --git a/fern/products/sdk-reference/dotnet/agents/skills-builtin/native-vector-search-skill/index.mdx b/fern/products/sdk-reference/dotnet/agents/skills-builtin/native-vector-search-skill/index.mdx new file mode 100644 index 0000000000..0c4346f6d1 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/skills-builtin/native-vector-search-skill/index.mdx @@ -0,0 +1,128 @@ +--- +slug: "/reference/dotnet/agents/skills-builtin/native-vector-search-skill" +title: "NativeVectorSearchSkill" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Skills.Builtin.NativeVectorSearchSkill" + parent: "agents.skills-builtin" + module: "agents.skills-builtin" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/NativeVectorSearchSkill.cs" + visibility: "public" +--- +# `NativeVectorSearchSkill` + +Vector / keyword similarity search. + +Mirrors signalwire-python's `signalwire.skills.native_vector_search.skill` +in <strong>remote mode only</strong>. Local-mode SQLite/pgvector +indexing relies on Python-only deps (sentence-transformers, FAISS, +pgvector) and is not portable to the .NET BCL — recorded in +`PORT_OMISSIONS.md`. The remote mode POSTs the query to the +configured search server, which returns a real-shape response the +audit verifies on the wire. + +The handler reads `remote_url` from skill params; the audit +fixture sets it to a loopback URL so the SDK exercises the real +transport against canned bytes. + +**Modifiers:** `sealed` + +## Signature + +```dotnet +public sealed class NativeVectorSearchSkill : SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire.Skills.SkillBase](/docs/sdk-reference/reference/dotnet/agents/skills/skill-base) + +## Properties + + + + + + + +## Methods + +### GetHints() + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override List GetHints() +``` + +#### Returns + +`List` + +#### Source + +[`src/SignalWire/Skills/Builtin/NativeVectorSearchSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/NativeVectorSearchSkill.cs) + +Line 194. + +*** + +### RegisterTools(AgentBase) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override void RegisterTools(AgentBase agent) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Skills/Builtin/NativeVectorSearchSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/NativeVectorSearchSkill.cs) + +Line 30. + +*** + +### Setup(AgentBase, Dictionary\) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override bool Setup(AgentBase agent, Dictionary parameters) +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Skills/Builtin/NativeVectorSearchSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/NativeVectorSearchSkill.cs) + +Line 28. + +## Source + +[`src/SignalWire/Skills/Builtin/NativeVectorSearchSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/NativeVectorSearchSkill.cs) + +Line 22. diff --git a/fern/products/sdk-reference/dotnet/agents/skills-builtin/play-background-file-skill/index.mdx b/fern/products/sdk-reference/dotnet/agents/skills-builtin/play-background-file-skill/index.mdx new file mode 100644 index 0000000000..8e16554594 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/skills-builtin/play-background-file-skill/index.mdx @@ -0,0 +1,94 @@ +--- +slug: "/reference/dotnet/agents/skills-builtin/play-background-file-skill" +title: "PlayBackgroundFileSkill" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Skills.Builtin.PlayBackgroundFileSkill" + parent: "agents.skills-builtin" + module: "agents.skills-builtin" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/PlayBackgroundFileSkill.cs" + visibility: "public" +--- +# `PlayBackgroundFileSkill` + +Control background file playback (DataMap). + +**Modifiers:** `sealed` + +## Signature + +```dotnet +public sealed class PlayBackgroundFileSkill : SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire.Skills.SkillBase](/docs/sdk-reference/reference/dotnet/agents/skills/skill-base) + +## Properties + + + + + + + +## Methods + +### RegisterTools(AgentBase) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override void RegisterTools(AgentBase agent) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Skills/Builtin/PlayBackgroundFileSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/PlayBackgroundFileSkill.cs) + +Line 17. + +*** + +### Setup(AgentBase, Dictionary\) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override bool Setup(AgentBase agent, Dictionary parameters) +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Skills/Builtin/PlayBackgroundFileSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/PlayBackgroundFileSkill.cs) + +Line 12. + +## Source + +[`src/SignalWire/Skills/Builtin/PlayBackgroundFileSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/PlayBackgroundFileSkill.cs) + +Line 6. diff --git a/fern/products/sdk-reference/dotnet/agents/skills-builtin/spider-skill/index.mdx b/fern/products/sdk-reference/dotnet/agents/skills-builtin/spider-skill/index.mdx new file mode 100644 index 0000000000..49ec22dafe --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/skills-builtin/spider-skill/index.mdx @@ -0,0 +1,128 @@ +--- +slug: "/reference/dotnet/agents/skills-builtin/spider-skill" +title: "SpiderSkill" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Skills.Builtin.SpiderSkill" + parent: "agents.skills-builtin" + module: "agents.skills-builtin" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/SpiderSkill.cs" + visibility: "public" +--- +# `SpiderSkill` + +Web scraping / crawling skill. + +Mirrors signalwire-python's `signalwire.skills.spider.skill`. The +Python implementation uses lxml + BeautifulSoup for selector-based +extraction; the .NET port ships a faithful HTTP fetch + regex-based +HTML stripping (script/style removal, tag removal, whitespace +collapse, smart truncation). That covers the canonical +`fast_text` / `clean_text` path the audit exercises; +selector-driven structured extraction can be layered on later. + +Upstream URL override: `SPIDER_BASE_URL`. The skill rewrites the +fetch host while preserving the requested URL's path + query so the +audit fixture sees the documented page on the wire. + +**Modifiers:** `sealed` + +## Signature + +```dotnet +public sealed class SpiderSkill : SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire.Skills.SkillBase](/docs/sdk-reference/reference/dotnet/agents/skills/skill-base) + +## Properties + + + + + + + +## Methods + +### GetHints() + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override List GetHints() +``` + +#### Returns + +`List` + +#### Source + +[`src/SignalWire/Skills/Builtin/SpiderSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/SpiderSkill.cs) + +Line 245. + +*** + +### RegisterTools(AgentBase) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override void RegisterTools(AgentBase agent) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Skills/Builtin/SpiderSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/SpiderSkill.cs) + +Line 38. + +*** + +### Setup(AgentBase, Dictionary\) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override bool Setup(AgentBase agent, Dictionary parameters) +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Skills/Builtin/SpiderSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/SpiderSkill.cs) + +Line 36. + +## Source + +[`src/SignalWire/Skills/Builtin/SpiderSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/SpiderSkill.cs) + +Line 22. diff --git a/fern/products/sdk-reference/dotnet/agents/skills-builtin/swml-transfer-skill/index.mdx b/fern/products/sdk-reference/dotnet/agents/skills-builtin/swml-transfer-skill/index.mdx new file mode 100644 index 0000000000..a1a5f7a30d --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/skills-builtin/swml-transfer-skill/index.mdx @@ -0,0 +1,138 @@ +--- +slug: "/reference/dotnet/agents/skills-builtin/swml-transfer-skill" +title: "SwmlTransferSkill" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Skills.Builtin.SwmlTransferSkill" + parent: "agents.skills-builtin" + module: "agents.skills-builtin" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/SwmlTransferSkill.cs" + visibility: "public" +--- +# `SwmlTransferSkill` + +Transfer calls between agents based on pattern matching (DataMap). + +**Modifiers:** `sealed` + +## Signature + +```dotnet +public sealed class SwmlTransferSkill : SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire.Skills.SkillBase](/docs/sdk-reference/reference/dotnet/agents/skills/skill-base) + +## Properties + + + + + + + +## Methods + +### GetHints() + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override List GetHints() +``` + +#### Returns + +`List` + +#### Source + +[`src/SignalWire/Skills/Builtin/SwmlTransferSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/SwmlTransferSkill.cs) + +Line 108. + +*** + +### GetPromptSections() + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override List> GetPromptSections() +``` + +#### Returns + +`List>` + +#### Source + +[`src/SignalWire/Skills/Builtin/SwmlTransferSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/SwmlTransferSkill.cs) + +Line 126. + +*** + +### RegisterTools(AgentBase) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override void RegisterTools(AgentBase agent) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Skills/Builtin/SwmlTransferSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/SwmlTransferSkill.cs) + +Line 18. + +*** + +### Setup(AgentBase, Dictionary\) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override bool Setup(AgentBase agent, Dictionary parameters) +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Skills/Builtin/SwmlTransferSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/SwmlTransferSkill.cs) + +Line 13. + +## Source + +[`src/SignalWire/Skills/Builtin/SwmlTransferSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/SwmlTransferSkill.cs) + +Line 7. diff --git a/fern/products/sdk-reference/dotnet/agents/skills-builtin/weather-api-skill/index.mdx b/fern/products/sdk-reference/dotnet/agents/skills-builtin/weather-api-skill/index.mdx new file mode 100644 index 0000000000..8a16829a0e --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/skills-builtin/weather-api-skill/index.mdx @@ -0,0 +1,92 @@ +--- +slug: "/reference/dotnet/agents/skills-builtin/weather-api-skill" +title: "WeatherApiSkill" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Skills.Builtin.WeatherApiSkill" + parent: "agents.skills-builtin" + module: "agents.skills-builtin" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/WeatherApiSkill.cs" + visibility: "public" +--- +# `WeatherApiSkill` + +Get current weather information from WeatherAPI.com (DataMap). + +**Modifiers:** `sealed` + +## Signature + +```dotnet +public sealed class WeatherApiSkill : SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire.Skills.SkillBase](/docs/sdk-reference/reference/dotnet/agents/skills/skill-base) + +## Properties + + + + + +## Methods + +### RegisterTools(AgentBase) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override void RegisterTools(AgentBase agent) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Skills/Builtin/WeatherApiSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/WeatherApiSkill.cs) + +Line 16. + +*** + +### Setup(AgentBase, Dictionary\) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override bool Setup(AgentBase agent, Dictionary parameters) +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Skills/Builtin/WeatherApiSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/WeatherApiSkill.cs) + +Line 11. + +## Source + +[`src/SignalWire/Skills/Builtin/WeatherApiSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/WeatherApiSkill.cs) + +Line 6. diff --git a/fern/products/sdk-reference/dotnet/agents/skills-builtin/web-search-skill/index.mdx b/fern/products/sdk-reference/dotnet/agents/skills-builtin/web-search-skill/index.mdx new file mode 100644 index 0000000000..c7053ae16a --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/skills-builtin/web-search-skill/index.mdx @@ -0,0 +1,191 @@ +--- +slug: "/reference/dotnet/agents/skills-builtin/web-search-skill" +title: "WebSearchSkill" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Skills.Builtin.WebSearchSkill" + parent: "agents.skills-builtin" + module: "agents.skills-builtin" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/WebSearchSkill.cs" + visibility: "public" +--- +# `WebSearchSkill` + +Web search skill backed by Google Custom Search. + +Mirrors signalwire-python's `signalwire.skills.web_search.skill` +(the `WebSearchSkill.search_and_scrape_best` path). The CSE call is +issued faithfully, then each result URL is scraped and a header line + +per-result title/url/snippet (plus scraped content) is formatted. + +Latency control (Python skill.py commits 51101da + 295745b) bounds the +whole tool call so a single slow site can never blow past the SignalWire +kernel's ~55s webhook timeout: +`per_page_timeout` (2.0s) caps each page scrape (a per-request +linked <xref href="System.Threading.CancellationTokenSource" data-throw-if-not-resolved="false"></xref> with +`CancelAfter`). +`overall_deadline` (10.0s) is the wall-clock budget for the whole +call; once it fires, in-flight scrapes are abandoned and we return +what we have (a <xref href="System.Threading.CancellationTokenSource" data-throw-if-not-resolved="false"></xref> +with `CancelAfter(overall_deadline)`). THIS IS THE CONTRACT. +`parallel_scrape` (true) dispatches each scrape as a Task and awaits <xref href="System.Threading.Tasks.Task.WhenAll(System.Threading.Tasks.Task%5b%5d)" data-throw-if-not-resolved="false"></xref>, +harvesting whatever completed when the deadline cancels (best-effort). +`snippets_only` (false) skips scraping entirely and formats the CSE +snippets directly. Sub-second response. +When the deadline fires OR no scraped page meets the quality threshold, the +handler falls back to formatting the CSE snippets into a NON-empty response +rather than the empty no-results message, so the kernel never sees a +webhook timeout. + +Upstream URL override: `WEB_SEARCH_BASE_URL` (used by +audit\_skills\_dispatch.py to point at a local fixture). When set, the +URL is rewritten to the override host while the path +`/customsearch/v1` is preserved. + +**Modifiers:** `sealed` + +## Signature + +```dotnet +public sealed class WebSearchSkill : SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire.Skills.SkillBase](/docs/sdk-reference/reference/dotnet/agents/skills/skill-base) + +## Properties + + + + + + + + + +## Methods + +### GetGlobalData() + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override Dictionary GetGlobalData() +``` + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/Skills/Builtin/WebSearchSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/WebSearchSkill.cs) + +Line 546. + +*** + +### GetParameterSchema() + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override Dictionary GetParameterSchema() +``` + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/Skills/Builtin/WebSearchSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/WebSearchSkill.cs) + +Line 493. + +*** + +### GetPromptSections() + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override List> GetPromptSections() +``` + +#### Returns + +`List>` + +#### Source + +[`src/SignalWire/Skills/Builtin/WebSearchSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/WebSearchSkill.cs) + +Line 553. + +*** + +### RegisterTools(AgentBase) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override void RegisterTools(AgentBase agent) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Skills/Builtin/WebSearchSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/WebSearchSkill.cs) + +Line 65. + +*** + +### Setup(AgentBase, Dictionary\) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override bool Setup(AgentBase agent, Dictionary parameters) +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Skills/Builtin/WebSearchSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/WebSearchSkill.cs) + +Line 59. + +## Source + +[`src/SignalWire/Skills/Builtin/WebSearchSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/WebSearchSkill.cs) + +Line 41. diff --git a/fern/products/sdk-reference/dotnet/agents/skills-builtin/wikipedia-search-skill/index.mdx b/fern/products/sdk-reference/dotnet/agents/skills-builtin/wikipedia-search-skill/index.mdx new file mode 100644 index 0000000000..238e7382e0 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/skills-builtin/wikipedia-search-skill/index.mdx @@ -0,0 +1,125 @@ +--- +slug: "/reference/dotnet/agents/skills-builtin/wikipedia-search-skill" +title: "WikipediaSearchSkill" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Skills.Builtin.WikipediaSearchSkill" + parent: "agents.skills-builtin" + module: "agents.skills-builtin" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/WikipediaSearchSkill.cs" + visibility: "public" +--- +# `WikipediaSearchSkill` + +Wikipedia search skill backed by the public Wikipedia REST API. + +Mirrors signalwire-python's `signalwire.skills.wikipedia_search.skill`. +The Python skill makes two API calls per query — first +`action=query&list=search` to find article titles, then +`action=query&prop=extracts` to fetch each article's intro +extract. Returns the article(s) as `**Title**\n\nExtract` joined +by separators. + +Upstream URL override: `WIKIPEDIA_BASE_URL`. Path +`/w/api.php` is preserved when the env var is set so the audit +fixture sees the documented Wikipedia API path on the wire. + +**Modifiers:** `sealed` + +## Signature + +```dotnet +public sealed class WikipediaSearchSkill : SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire.Skills.SkillBase](/docs/sdk-reference/reference/dotnet/agents/skills/skill-base) + +## Properties + + + + + +## Methods + +### GetPromptSections() + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override List> GetPromptSections() +``` + +#### Returns + +`List>` + +#### Source + +[`src/SignalWire/Skills/Builtin/WikipediaSearchSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/WikipediaSearchSkill.cs) + +Line 161. + +*** + +### RegisterTools(AgentBase) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override void RegisterTools(AgentBase agent) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Skills/Builtin/WikipediaSearchSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/WikipediaSearchSkill.cs) + +Line 31. + +*** + +### Setup(AgentBase, Dictionary\) + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override bool Setup(AgentBase agent, Dictionary parameters) +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Skills/Builtin/WikipediaSearchSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/WikipediaSearchSkill.cs) + +Line 29. + +## Source + +[`src/SignalWire/Skills/Builtin/WikipediaSearchSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/WikipediaSearchSkill.cs) + +Line 21. diff --git a/fern/products/sdk-reference/dotnet/agents/skills/index.mdx b/fern/products/sdk-reference/dotnet/agents/skills/index.mdx new file mode 100644 index 0000000000..e3a9e9e896 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/skills/index.mdx @@ -0,0 +1,147 @@ +--- +slug: "/reference/dotnet/agents/skills" +title: "skills" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "module" + language: "dotnet" + qualified_name: "agents.skills" + parent: "agents" + module: "agents" +--- +# `skills` + +## Classes + + + + Abstract base class for all skills. Provides lifecycle hooks, tool registration, hint/globalData/prompt merging, and a <xref href="SignalWire.Skills.SkillBase.DefineTool(System.String%2cSystem.String%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%2cSystem.Func%7bSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%2cSignalWire.SWAIG.FunctionResult%7d)" data-throw-if-not-resolved="false"></xref> helper that delegates to the owning agent. + + + + Loads, unloads, and queries skills on behalf of an <xref href="SignalWire.Agent.AgentBase" data-throw-if-not-resolved="false"></xref>. Validates env vars, calls Setup/RegisterTools, and merges hints/globalData/prompts. + + + + Maps <xref href="SignalWire.Skills.SkillName" data-throw-if-not-resolved="false"></xref> members to the canonical snake\_case wire names that <xref href="SignalWire.Skills.SkillRegistry" data-throw-if-not-resolved="false"></xref> registers. + + + + Thread-safe singleton that maps snake\_case skill names to factory delegates. All 18 built-in skills are registered lazily on first access. + + + +## Enums + +### SkillName + +Built-in skill names as a typed, compile-time-checked closed set. + +**Remarks:** <p> <xref href="SignalWire.Agent.AgentBase.AddSkill(SignalWire.Skills.SkillName%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d)" data-throw-if-not-resolved="false"></xref> +(and the matching `RemoveSkill` / `HasSkill` overloads) accept this +enum OR a string. The enum gives editor autocompletion and makes a typo fail +at the call site — a bare string like `"datetiem"` only fails at runtime, +on the server. Strings keep parity with the Python reference (which uses a +bare `str`) and still allow custom / third-party skills that aren't +built in. + +</p> +<p> +Each member maps to its canonical snake_case wire name via +<xref href="SignalWire.Skills.SkillNameExtensions.ToWireName(SignalWire.Skills.SkillName)" data-throw-if-not-resolved="false"></xref>; the enum is purely a +typed alias over those strings, so wire behavior is identical to passing the +string directly. +</p> +<example> +<pre><code class="lang-csharp">agent.AddSkill(SkillName.Datetime); // typed, autocompleted +agent.AddSkill("datetime"); // string still works (parity) +agent.AddSkill("my_custom_skill"); // open set: custom skills ok</code></pre> +</example> + +#### Signature + +```dotnet +public enum SkillName +``` + +#### Properties + + + api\_ninjas\_trivia + + + + claude\_skills + + + + custom\_skills + + + + datasphere + + + + datasphere\_serverless + + + + datetime + + + + google\_maps + + + + info\_gatherer + + + + joke + + + + math + + + + mcp\_gateway + + + + native\_vector\_search + + + + play\_background\_file + + + + spider + + + + swml\_transfer + + + + weather\_api + + + + web\_search + + + + wikipedia\_search + + +#### Source + +[`src/SignalWire/Skills/SkillName.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillName.cs) + +Line 29. diff --git a/fern/products/sdk-reference/dotnet/agents/skills/skill-base/index.mdx b/fern/products/sdk-reference/dotnet/agents/skills/skill-base/index.mdx new file mode 100644 index 0000000000..708d19b3c5 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/skills/skill-base/index.mdx @@ -0,0 +1,329 @@ +--- +slug: "/reference/dotnet/agents/skills/skill-base" +title: "SkillBase" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Skills.SkillBase" + parent: "agents.skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillBase.cs" + visibility: "public" +--- +# `SkillBase` + +Abstract base class for all skills. Provides lifecycle hooks, tool registration, +hint/globalData/prompt merging, and a <xref href="SignalWire.Skills.SkillBase.DefineTool(System.String%2cSystem.String%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%2cSystem.Func%7bSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%2cSignalWire.SWAIG.FunctionResult%7d)" data-throw-if-not-resolved="false"></xref> helper that +delegates to the owning agent. + +**Modifiers:** `abstract` + +## Signature + +```dotnet +public abstract class SkillBase +``` + +## Properties + + + + + + + + + + + + + Check whether prompt sections should be skipped. + + + + + + +## Methods + +### Cleanup() + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual void Cleanup() +``` + +#### Source + +[`src/SignalWire/Skills/SkillBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillBase.cs) + +Line 84. + +*** + +### DefineTool(string, string, Dictionary\, Func\, Dictionary\, FunctionResult>) + +Convenience wrapper that merges swaig\_fields and delegates to +AgentBase.DefineTool. + +#### Signature + +```dotnet +protected void DefineTool(string name, string description, Dictionary parameters, Func, Dictionary, FunctionResult> handler) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`src/SignalWire/Skills/SkillBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillBase.cs) + +Line 127. + +*** + +### GetGlobalData() + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual Dictionary GetGlobalData() +``` + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/Skills/SkillBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillBase.cs) + +Line 45. + +*** + +### GetHints() + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual List GetHints() +``` + +#### Returns + +`List` + +#### Source + +[`src/SignalWire/Skills/SkillBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillBase.cs) + +Line 43. + +*** + +### GetInstanceKey() + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual string GetInstanceKey() +``` + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/Skills/SkillBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillBase.cs) + +Line 33. + +*** + +### GetParameterSchema() + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual Dictionary GetParameterSchema() +``` + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/Skills/SkillBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillBase.cs) + +Line 56. + +*** + +### GetPromptSections() + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual List> GetPromptSections() +``` + +#### Returns + +`List>` + +#### Source + +[`src/SignalWire/Skills/SkillBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillBase.cs) + +Line 47. + +*** + +### GetToolName(string) + +Return the tool name override from params, or <code class="paramref">defaultName</code>. + +#### Signature + +```dotnet +protected string GetToolName(string defaultName) +``` + +#### Parameters + + + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/Skills/SkillBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillBase.cs) + +Line 147. + +*** + +### RegisterTools(AgentBase) + +**Modifiers:** `abstract` + +#### Signature + +```dotnet +public abstract void RegisterTools(AgentBase agent) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Skills/SkillBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillBase.cs) + +Line 23. + +*** + +### Setup(AgentBase, Dictionary\) + +**Modifiers:** `abstract` + +#### Signature + +```dotnet +public abstract bool Setup(AgentBase agent, Dictionary parameters) +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Skills/SkillBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillBase.cs) + +Line 22. + +*** + +### ValidateEnvVars() + +#### Signature + +```dotnet +public List ValidateEnvVars() +``` + +#### Returns + +`List` + +#### Source + +[`src/SignalWire/Skills/SkillBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillBase.cs) + +Line 106. + +*** + +### Wire(AgentBase, Dictionary\) + +#### Signature + +```dotnet +public void Wire(AgentBase agent, Dictionary parameters) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/Skills/SkillBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillBase.cs) + +Line 164. + +## Source + +[`src/SignalWire/Skills/SkillBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillBase.cs) + +Line 10. diff --git a/fern/products/sdk-reference/dotnet/agents/skills/skill-manager/index.mdx b/fern/products/sdk-reference/dotnet/agents/skills/skill-manager/index.mdx new file mode 100644 index 0000000000..43c05f96d1 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/skills/skill-manager/index.mdx @@ -0,0 +1,180 @@ +--- +slug: "/reference/dotnet/agents/skills/skill-manager" +title: "SkillManager" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Skills.SkillManager" + parent: "agents.skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillManager.cs" + visibility: "public" +--- +# `SkillManager` + +Loads, unloads, and queries skills on behalf of an <xref href="SignalWire.Agent.AgentBase" data-throw-if-not-resolved="false"></xref>. +Validates env vars, calls Setup/RegisterTools, and merges hints/globalData/prompts. + +**Modifiers:** `sealed` + +## Signature + +```dotnet +public sealed class SkillManager +``` + +## Properties + + + The skill\_manager logger (Python parity: `SkillManager.logger` instance attribute). + + +## Methods + +### GetSkill(string) + +#### Signature + +```dotnet +public SkillBase? GetSkill(string key) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Skills.SkillBase` + +#### Source + +[`src/SignalWire/Skills/SkillManager.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillManager.cs) + +Line 127. + +*** + +### HasSkill(string) + +#### Signature + +```dotnet +public bool HasSkill(string key) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Skills/SkillManager.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillManager.cs) + +Line 125. + +*** + +### ListSkills() + +#### Signature + +```dotnet +public List ListSkills() +``` + +#### Returns + +`List` + +#### Source + +[`src/SignalWire/Skills/SkillManager.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillManager.cs) + +Line 118. + +*** + +### LoadSkill(string, Dictionary\?) + +Load a skill by name (resolved via registry) or by explicit type. +Returns (success, errorMessage). + +#### Signature + +```dotnet +public (bool Success, string Error) LoadSkill(string skillName, Dictionary? parameters = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.ValueTuple` + +#### Source + +[`src/SignalWire/Skills/SkillManager.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillManager.cs) + +Line 31. + +*** + +### SkillManager(AgentBase) + +#### Signature + +```dotnet +public SkillManager(AgentBase agent) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Skills/SkillManager.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillManager.cs) + +Line 16. + +*** + +### UnloadSkill(string) + +#### Signature + +```dotnet +public bool UnloadSkill(string key) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Skills/SkillManager.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillManager.cs) + +Line 105. + +## Source + +[`src/SignalWire/Skills/SkillManager.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillManager.cs) + +Line 9. diff --git a/fern/products/sdk-reference/dotnet/agents/skills/skill-name-extensions/index.mdx b/fern/products/sdk-reference/dotnet/agents/skills/skill-name-extensions/index.mdx new file mode 100644 index 0000000000..3cf50336f8 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/skills/skill-name-extensions/index.mdx @@ -0,0 +1,62 @@ +--- +slug: "/reference/dotnet/agents/skills/skill-name-extensions" +title: "SkillNameExtensions" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Skills.SkillNameExtensions" + parent: "agents.skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillName.cs" + visibility: "public" +--- +# `SkillNameExtensions` + +Maps <xref href="SignalWire.Skills.SkillName" data-throw-if-not-resolved="false"></xref> members to the canonical snake\_case wire names +that <xref href="SignalWire.Skills.SkillRegistry" data-throw-if-not-resolved="false"></xref> registers. + +**Modifiers:** `static` + +## Signature + +```dotnet +public static class SkillNameExtensions +``` + +## Methods + +### ToWireName(SkillName) + +The canonical snake\_case skill name (the string a skill's +`Name` property returns and that <xref href="SignalWire.Skills.SkillRegistry" data-throw-if-not-resolved="false"></xref> keys on). + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static string ToWireName(this SkillName name) +``` + +#### Parameters + + + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/Skills/SkillName.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillName.cs) + +Line 118. + +## Source + +[`src/SignalWire/Skills/SkillName.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillName.cs) + +Line 90. diff --git a/fern/products/sdk-reference/dotnet/agents/skills/skill-registry/index.mdx b/fern/products/sdk-reference/dotnet/agents/skills/skill-registry/index.mdx new file mode 100644 index 0000000000..f98f6a4cd1 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/skills/skill-registry/index.mdx @@ -0,0 +1,189 @@ +--- +slug: "/reference/dotnet/agents/skills/skill-registry" +title: "SkillRegistry" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Skills.SkillRegistry" + parent: "agents.skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillRegistry.cs" + visibility: "public" +--- +# `SkillRegistry` + +Thread-safe singleton that maps snake\_case skill names to factory delegates. +All 18 built-in skills are registered lazily on first access. + +**Modifiers:** `sealed` + +## Signature + +```dotnet +public sealed class SkillRegistry +``` + +## Properties + + + External skill-source paths added via <xref href="SignalWire.Skills.SkillRegistry.AddSkillDirectory(System.String)" data-throw-if-not-resolved="false"></xref>. + + + + + + The skill\_registry logger. (Python parity: `SkillRegistry.logger` instance attribute.) + + +## Methods + +### AddSkillDirectory(string) + +Add a directory to the external skill-source path list. +.NET ports loading skills from disk SHOULD consult this list. +Throws when the path does not exist or is not a directory. +(Python parity: `SkillRegistry.add_skill_directory(path)`.) + +#### Signature + +```dotnet +public void AddSkillDirectory(string path) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Skills/SkillRegistry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillRegistry.cs) + +Line 119. + +*** + +### DiscoverSkills() + +Discover and return all available skills. +Skills resolve on-demand, so there is nothing to eagerly register; +this returns the discoverable inventory (mirrors <xref href="SignalWire.Skills.SkillRegistry.ListSkills" data-throw-if-not-resolved="false"></xref>). +(Python parity: `SkillRegistry.discover_skills` now returns +`list_skills()` — it was a no-op until the reference stub was fixed.) + +#### Signature + +```dotnet +public List DiscoverSkills() +``` + +#### Returns + +`List` + +#### Source + +[`src/SignalWire/Skills/SkillRegistry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillRegistry.cs) + +Line 100. + +*** + +### GetFactory(string) + +Get the factory for a skill name. Checks custom registrations first, +then falls back to built-in factories. + +#### Signature + +```dotnet +public Func? GetFactory(string name) +``` + +#### Parameters + + + +#### Returns + +`System.Func` + +#### Source + +[`src/SignalWire/Skills/SkillRegistry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillRegistry.cs) + +Line 138. + +*** + +### ListSkills() + +Return all known skill names (builtins + custom), sorted. + +#### Signature + +```dotnet +public List ListSkills() +``` + +#### Returns + +`List` + +#### Source + +[`src/SignalWire/Skills/SkillRegistry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillRegistry.cs) + +Line 161. + +*** + +### RegisterSkill(string, Func\) + +Register a custom skill factory. + +#### Signature + +```dotnet +public void RegisterSkill(string name, Func factory) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/Skills/SkillRegistry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillRegistry.cs) + +Line 87. + +*** + +### Reset() + +Reset the singleton (for testing). + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static void Reset() +``` + +#### Source + +[`src/SignalWire/Skills/SkillRegistry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillRegistry.cs) + +Line 78. + +## Source + +[`src/SignalWire/Skills/SkillRegistry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillRegistry.cs) + +Line 9. diff --git a/fern/products/sdk-reference/dotnet/agents/swaig/callback-method-extensions/index.mdx b/fern/products/sdk-reference/dotnet/agents/swaig/callback-method-extensions/index.mdx new file mode 100644 index 0000000000..63460cb826 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/swaig/callback-method-extensions/index.mdx @@ -0,0 +1,62 @@ +--- +slug: "/reference/dotnet/agents/swaig/callback-method-extensions" +title: "CallbackMethodExtensions" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.SWAIG.CallbackMethodExtensions" + parent: "agents.swaig" + module: "agents.swaig" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/CallbackMethod.cs" + visibility: "public" +--- +# `CallbackMethodExtensions` + +Maps <xref href="SignalWire.SWAIG.CallbackMethod" data-throw-if-not-resolved="false"></xref> members to the canonical wire values +(uppercase HTTP verbs) that the SWML `join_conference` action expects on +its `status_callback_method` / `recording_status_callback_method` keys. + +**Modifiers:** `static` + +## Signature + +```dotnet +public static class CallbackMethodExtensions +``` + +## Methods + +### ToWireName(CallbackMethod) + +The canonical HTTP-verb string for the callback-method keys. + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static string ToWireName(this CallbackMethod method) +``` + +#### Parameters + + + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/SWAIG/CallbackMethod.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/CallbackMethod.cs) + +Line 44. + +## Source + +[`src/SignalWire/SWAIG/CallbackMethod.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/CallbackMethod.cs) + +Line 35. diff --git a/fern/products/sdk-reference/dotnet/agents/swaig/codec-extensions/index.mdx b/fern/products/sdk-reference/dotnet/agents/swaig/codec-extensions/index.mdx new file mode 100644 index 0000000000..1be29028cc --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/swaig/codec-extensions/index.mdx @@ -0,0 +1,63 @@ +--- +slug: "/reference/dotnet/agents/swaig/codec-extensions" +title: "CodecExtensions" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.SWAIG.CodecExtensions" + parent: "agents.swaig" + module: "agents.swaig" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/Codec.cs" + visibility: "public" +--- +# `CodecExtensions` + +Maps <xref href="SignalWire.SWAIG.Codec" data-throw-if-not-resolved="false"></xref> members to the canonical wire values that the SWML +`tap` action expects. + +**Modifiers:** `static` + +## Signature + +```dotnet +public static class CodecExtensions +``` + +## Methods + +### ToWireName(Codec) + +The canonical codec string (the value placed on the `tap.codec` key +in the emitted SWML). The strings are upper-case and matched exactly, +mirroring the Python reference's literal `["PCMU", "PCMA"]` check. + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static string ToWireName(this Codec codec) +``` + +#### Parameters + + + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/SWAIG/Codec.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/Codec.cs) + +Line 63. + +## Source + +[`src/SignalWire/SWAIG/Codec.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/Codec.cs) + +Line 50. diff --git a/fern/products/sdk-reference/dotnet/agents/swaig/conference-beep-extensions/index.mdx b/fern/products/sdk-reference/dotnet/agents/swaig/conference-beep-extensions/index.mdx new file mode 100644 index 0000000000..caef18de90 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/swaig/conference-beep-extensions/index.mdx @@ -0,0 +1,61 @@ +--- +slug: "/reference/dotnet/agents/swaig/conference-beep-extensions" +title: "ConferenceBeepExtensions" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.SWAIG.ConferenceBeepExtensions" + parent: "agents.swaig" + module: "agents.swaig" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ConferenceBeep.cs" + visibility: "public" +--- +# `ConferenceBeepExtensions` + +Maps <xref href="SignalWire.SWAIG.ConferenceBeep" data-throw-if-not-resolved="false"></xref> members to the canonical wire values that +the SWML `join_conference` action expects on its `beep` key. + +**Modifiers:** `static` + +## Signature + +```dotnet +public static class ConferenceBeepExtensions +``` + +## Methods + +### ToWireName(ConferenceBeep) + +The canonical beep string placed on the `join_conference.beep` key. + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static string ToWireName(this ConferenceBeep beep) +``` + +#### Parameters + + + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/SWAIG/ConferenceBeep.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ConferenceBeep.cs) + +Line 53. + +## Source + +[`src/SignalWire/SWAIG/ConferenceBeep.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ConferenceBeep.cs) + +Line 42. diff --git a/fern/products/sdk-reference/dotnet/agents/swaig/conference-record-extensions/index.mdx b/fern/products/sdk-reference/dotnet/agents/swaig/conference-record-extensions/index.mdx new file mode 100644 index 0000000000..9157e3b755 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/swaig/conference-record-extensions/index.mdx @@ -0,0 +1,61 @@ +--- +slug: "/reference/dotnet/agents/swaig/conference-record-extensions" +title: "ConferenceRecordExtensions" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.SWAIG.ConferenceRecordExtensions" + parent: "agents.swaig" + module: "agents.swaig" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ConferenceRecord.cs" + visibility: "public" +--- +# `ConferenceRecordExtensions` + +Maps <xref href="SignalWire.SWAIG.ConferenceRecord" data-throw-if-not-resolved="false"></xref> members to the canonical wire values that +the SWML `join_conference` action expects on its `record` key. + +**Modifiers:** `static` + +## Signature + +```dotnet +public static class ConferenceRecordExtensions +``` + +## Methods + +### ToWireName(ConferenceRecord) + +The canonical record string placed on the `join_conference.record` key. + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static string ToWireName(this ConferenceRecord record) +``` + +#### Parameters + + + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/SWAIG/ConferenceRecord.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ConferenceRecord.cs) + +Line 45. + +## Source + +[`src/SignalWire/SWAIG/ConferenceRecord.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ConferenceRecord.cs) + +Line 36. diff --git a/fern/products/sdk-reference/dotnet/agents/swaig/conference-trim-extensions/index.mdx b/fern/products/sdk-reference/dotnet/agents/swaig/conference-trim-extensions/index.mdx new file mode 100644 index 0000000000..fc0546e32b --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/swaig/conference-trim-extensions/index.mdx @@ -0,0 +1,61 @@ +--- +slug: "/reference/dotnet/agents/swaig/conference-trim-extensions" +title: "ConferenceTrimExtensions" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.SWAIG.ConferenceTrimExtensions" + parent: "agents.swaig" + module: "agents.swaig" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ConferenceTrim.cs" + visibility: "public" +--- +# `ConferenceTrimExtensions` + +Maps <xref href="SignalWire.SWAIG.ConferenceTrim" data-throw-if-not-resolved="false"></xref> members to the canonical wire values that +the SWML `join_conference` action expects on its `trim` key. + +**Modifiers:** `static` + +## Signature + +```dotnet +public static class ConferenceTrimExtensions +``` + +## Methods + +### ToWireName(ConferenceTrim) + +The canonical trim string placed on the `join_conference.trim` key. + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static string ToWireName(this ConferenceTrim trim) +``` + +#### Parameters + + + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/SWAIG/ConferenceTrim.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ConferenceTrim.cs) + +Line 42. + +## Source + +[`src/SignalWire/SWAIG/ConferenceTrim.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ConferenceTrim.cs) + +Line 33. diff --git a/fern/products/sdk-reference/dotnet/agents/swaig/function-result/index.mdx b/fern/products/sdk-reference/dotnet/agents/swaig/function-result/index.mdx new file mode 100644 index 0000000000..e0b3d2a632 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/swaig/function-result/index.mdx @@ -0,0 +1,1797 @@ +--- +slug: "/reference/dotnet/agents/swaig/function-result" +title: "FunctionResult" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.SWAIG.FunctionResult" + parent: "agents.swaig" + module: "agents.swaig" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs" + visibility: "public" +--- +# `FunctionResult` + +Builds a SWAIG function result with an optional response, actions, and post-processing flag. +All action methods return `this` for fluent chaining. + +## Signature + +```dotnet +public class FunctionResult +``` + +## Methods + +### AddAction + +Append an action with the given name and arbitrary data +payload. Matches Python's `add_action(name, data)`. + +#### Signature + + + + ```dotnet + public FunctionResult AddAction(string name, object data) + ``` + + + + ```dotnet + public FunctionResult AddAction(Dictionary action) + ``` + + + +#### Parameters (Overload 1) + + + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`SignalWire.SWAIG.FunctionResult` + +#### Returns (Overload 2) + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 38. + +*** + +### AddActions(IEnumerable\>) + +#### Signature + +```dotnet +public FunctionResult AddActions(IEnumerable> actions) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 52. + +*** + +### AddDynamicHints(List\) + +#### Signature + +```dotnet +public FunctionResult AddDynamicHints(List hints) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 615. + +*** + +### ClearDynamicHints() + +#### Signature + +```dotnet +public FunctionResult ClearDynamicHints() +``` + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 621. + +*** + +### Connect(string, bool, string?) + +#### Signature + +```dotnet +public FunctionResult Connect(string destination, bool final = true, string? fromAddr = null) +``` + +#### Parameters + + + + + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 108. + +*** + +### CreatePaymentAction(string, string) + +Create a payment action for use in payment prompts. + +**Remarks:** Parity with the Python reference `create_payment_action(action_type, phrase)`: +returns `{"type": actionType, "phrase": phrase}`. <code class="paramref">actionType</code> +is `"Say"` (text-to-speech) or `"Play"` (audio file URL). + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static Dictionary CreatePaymentAction(string actionType, string phrase) +``` + +#### Parameters + + + + + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 1376. + +*** + +### CreatePaymentParameter(string, string) + +Create a payment parameter (name/value pair) for use with <xref href="SignalWire.SWAIG.FunctionResult.Pay(System.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.Int32%2cSystem.Int32%2cSystem.Boolean%2cSystem.Object%2cSystem.Int32%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.Collections.Generic.List%7bSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.String%7d%7d%2cSystem.Collections.Generic.List%7bSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%7d%2cSystem.String)" data-throw-if-not-resolved="false"></xref>. + +**Remarks:** Parity with the Python reference `create_payment_parameter(name, value)`: +returns `{"name": name, "value": value}`. + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static Dictionary CreatePaymentParameter(string name, string value) +``` + +#### Parameters + + + + + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 1392. + +*** + +### CreatePaymentPrompt(string, List\>, string?, string?) + +Create a payment-prompt structure for use with <xref href="SignalWire.SWAIG.FunctionResult.Pay(System.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.Int32%2cSystem.Int32%2cSystem.Boolean%2cSystem.Object%2cSystem.Int32%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.Collections.Generic.List%7bSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.String%7d%7d%2cSystem.Collections.Generic.List%7bSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%7d%2cSystem.String)" data-throw-if-not-resolved="false"></xref>. + +**Remarks:** Parity with the Python reference +`create_payment_prompt(for_situation, actions, card_type=None, error_type=None)`: +returns `{"for": forSituation, "actions": actions, "card_type"?, "error_type"?}`. +The situation string is keyed `for` (a C# keyword, hence the parameter +is <code class="paramref">forSituation</code>); `card_type`/`error_type` are +included only when supplied. + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static Dictionary CreatePaymentPrompt(string forSituation, List> actions, string? cardType = null, string? errorType = null) +``` + +#### Parameters + + + + + Actions with `type`/`phrase` keys (see <xref href="SignalWire.SWAIG.FunctionResult.CreatePaymentAction(System.String%2cSystem.String)" data-throw-if-not-resolved="false"></xref>). + + + + + + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 1350. + +*** + +### EnableExtensiveData(bool) + +#### Signature + +```dotnet +public FunctionResult EnableExtensiveData(bool enabled = true) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 667. + +*** + +### EnableFunctionsOnTimeout(bool) + +#### Signature + +```dotnet +public FunctionResult EnableFunctionsOnTimeout(bool enabled = true) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 660. + +*** + +### ExecuteRpc(string, Dictionary\?, string?, string?) + +Execute an RPC method on a call using SWML. + +**Remarks:** Parity with the Python reference +`execute_rpc(method, params=None, call_id=None, node_id=None)`: the +rpc params dict is keyed `{method, call_id?, node_id?, params?}` — +`call_id`/`node_id` are TOP-LEVEL siblings of `method`/`params`, +NOT nested inside `params` — and the `{execute_rpc: …}` verb is +wrapped in a full SWML document under the `SWML` action key. There is +no `jsonrpc` envelope, and method strings are bare (e.g. `"dial"`, +not `"calling.dial"`). `params` is omitted when empty. + +#### Signature + +```dotnet +public FunctionResult ExecuteRpc(string method, Dictionary? @params = null, string? callId = null, string? nodeId = null) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 1241. + +*** + +### ExecuteSwml(object, bool) + +Execute SWML content with optional transfer behavior. + +**Remarks:** Mirrors the Python reference `execute_swml(swml_content, transfer=False)`: +the content (a dict, or a JSON string parsed to a dict) is emitted verbatim +under the `SWML` action key. When <code class="paramref">transfer</code> is true, +a `"transfer": "true"` entry is added INSIDE that SWML dict (Python does +`action["transfer"] = "true"` on the SWML payload itself — there is no +separate `transfer_swml` action name). A JSON string that fails to parse +is wrapped as `{ "raw_swml": <text> }`, matching the reference. + +#### Signature + +```dotnet +public FunctionResult ExecuteSwml(object swmlContent, bool transfer = false) +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Throws + +- `System.ArgumentException` — If <code class="paramref">swmlContent</code> is neither a string nor a dictionary (parity with Python's `TypeError`). + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 701. + +*** + +### FunctionResult(string?, bool) + +#### Signature + +```dotnet +public FunctionResult(string? response = null, bool postProcess = false) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 14. + +*** + +### Hangup() + +#### Signature + +```dotnet +public FunctionResult Hangup() +``` + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 172. + +*** + +### Hold(int) + +#### Signature + +```dotnet +public FunctionResult Hold(int timeout = 300) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 180. + +*** + +### JoinConference + +Join an ad-hoc audio conference (RELAY + CXML calls) using SWML. +Full parity with the Python reference +`signalwire/core/function_result.py::join_conference`: the conference <code class="paramref">name</code> plus 18 optional parameters, each validated to the +same closed sets / bounds as Python, and emitted under its snake\_case wire +key only when it differs from its default. When every parameter is at its +default the action value is the bare conference-name string (simple form); +otherwise it is a `{ "name": ..., ... }` object (full form). + +**Remarks:** This flat, all-string overload is the parity-bearing signature against the +Python reference (which takes bare `str` arguments for the closed sets). +For an idiomatic, compile-time-checked alternative see <xref href="SignalWire.SWAIG.FunctionResult.JoinConference(System.String%2cSignalWire.SWAIG.JoinConferenceOptions)" data-throw-if-not-resolved="false"></xref>, which accepts +the typed <xref href="SignalWire.SWAIG.ConferenceBeep" data-throw-if-not-resolved="false"></xref> / <xref href="SignalWire.SWAIG.ConferenceRecord" data-throw-if-not-resolved="false"></xref> / <xref href="SignalWire.SWAIG.ConferenceTrim" data-throw-if-not-resolved="false"></xref> / <xref href="SignalWire.SWAIG.CallbackMethod" data-throw-if-not-resolved="false"></xref> enums and +delegates straight here so the emitted SWML is identical. + +#### Signature + + + + ```dotnet + public FunctionResult JoinConference(string name, bool muted = false, string beep = "true", bool startOnEnter = true, bool endOnExit = false, string? waitUrl = null, int maxParticipants = 250, string record = "do-not-record", string? region = null, string trim = "trim-silence", string? coach = null, string? statusCallbackEvent = null, string? statusCallback = null, string statusCallbackMethod = "POST", string? recordingStatusCallback = null, string recordingStatusCallbackMethod = "POST", string recordingStatusCallbackEvent = "completed", object? result = null) + ``` + + + + ```dotnet + public FunctionResult JoinConference(string name, JoinConferenceOptions? options) + ``` + + + +#### Parameters (Overload 1) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`SignalWire.SWAIG.FunctionResult` + +#### Returns (Overload 2) + +`SignalWire.SWAIG.FunctionResult` + +#### Throws + +- `System.ArgumentException` — If <code class="paramref">beep</code>, <code class="paramref">record</code>, <code class="paramref">trim</code>, <code class="paramref">statusCallbackMethod</code>, or <code class="paramref">recordingStatusCallbackMethod</code> is outside its closed set, if <code class="paramref">maxParticipants</code> is not in 1..=250, or if <code class="paramref">name</code> is empty/whitespace. + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 786. + +*** + +### JoinRoom(string) + +Join a RELAY room using SWML. + +**Remarks:** Parity with the Python reference `join_room(name)`: the +`join_room` verb (params `{name}`) is wrapped in a SWML document +and emitted under the `SWML` action key. + +#### Signature + +```dotnet +public FunctionResult JoinRoom(string name) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 931. + +*** + +### Pay(string, string, string?, string, int, int, bool, object?, int, string, string?, string, string, string, string?, string, List\>?, List\>?, string?) + +Process a payment using the SWML `pay` verb. + +**Remarks:** Full parity with the Python reference <code>pay(payment\_connector\_url, input\_method="dtmf", status\_url=None, +payment\_method="credit-card", timeout=5, max\_attempts=1, security\_code=True, +postal\_code=True, min\_postal\_code\_length=0, token\_type="reusable", +charge\_amount=None, currency="usd", language="en-US", voice="woman", +description=None, valid\_card\_types="visa mastercard amex", parameters=None, +prompts=None, ai\_response=…)</code>. The SWML document is a two-verb main +section — a leading `{set: {ai_response: …}}` followed by +`{pay: …}` — routed through <xref href="SignalWire.SWAIG.FunctionResult.ExecuteSwml(System.Object%2cSystem.Boolean)" data-throw-if-not-resolved="false"></xref> under the +`SWML` action key (NOT a bare top-level `pay`). + +<p> +Wire-shape details matching Python: the collection-method key is +`input` (NOT `input_method`); numeric and boolean fields are +emitted as STRINGS (`"5"`/`"true"`); <code class="paramref">postalCode</code> +is a lowercased bool-string when boolean, or verbatim when a string. The +optional fields (status_url/charge_amount/description/parameters/prompts) +are emitted only when supplied. +</p> + +#### Signature + +```dotnet +public FunctionResult Pay(string paymentConnectorUrl, string inputMethod = "dtmf", string? statusUrl = null, string paymentMethod = "credit-card", int timeout = 5, int maxAttempts = 1, bool securityCode = true, object? postalCode = null, int minPostalCodeLength = 0, string tokenType = "reusable", string? chargeAmount = null, string currency = "usd", string language = "en-US", string voice = "woman", string? description = null, string validCardTypes = "visa mastercard amex", List>? parameters = null, List>? prompts = null, string? aiResponse = "The payment status is ${pay_result}, do not mention anything else about collecting payment if successful.") +``` + +#### Parameters + + + + + + + + + + + + + + + + + Prompt-for-postal flag (`bool`) or an actual postcode (`string`); pass a <xref href="System.Boolean" data-throw-if-not-resolved="false"></xref> or a <xref href="System.String" data-throw-if-not-resolved="false"></xref>. + + + + + + + + + + + + + + + + + + + + Name/value pairs forwarded to the payment connector. + + + + Custom prompt configurations (see <xref href="SignalWire.SWAIG.FunctionResult.CreatePaymentPrompt(System.String%2cSystem.Collections.Generic.List%7bSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.String%7d%7d%2cSystem.String%2cSystem.String)" data-throw-if-not-resolved="false"></xref>). + + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 1154. + +*** + +### PlayBackgroundFile(string, bool) + +Play an audio or video file in the background. + +**Remarks:** Parity with the Python reference `play_background_file(filename, wait=False)`: +the action key is "playback\_bg". When <code class="paramref">wait</code> is false the +value is the bare filename string; when true it is a +`{file: filename, wait: true}` object. + +#### Signature + +```dotnet +public FunctionResult PlayBackgroundFile(string filename, bool wait = false) +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 427. + +*** + +### RecordCall + +Start background call recording using SWML — canonical, full-arity +overload with the two closed-set arguments (<code class="paramref">format</code> / <code class="paramref">direction</code>) as the typed <xref href="SignalWire.SWAIG.RecordFormat" data-throw-if-not-resolved="false"></xref> / <xref href="SignalWire.SWAIG.RecordDirection" data-throw-if-not-resolved="false"></xref> enums. + +**Remarks:** Full parity with the Python reference <code>record\_call(control\_id, stereo, format, direction, terminators, beep, +input\_sensitivity, initial\_timeout, end\_silence\_timeout, max\_length, +status\_url)</code>, in the same parameter order. The Python reference +validates the bare-string `format`/`direction` against the closed +sets \{wav,mp3,mp4\} / \{speak,listen,both\}; this overload surfaces those +knowable sets as enums so a bad value is a compile error rather than a +runtime `ValueError` (a same-arity bare-string overload preserves the +Python `str` path — see <xref href="SignalWire.SWAIG.FunctionResult.RecordCall(System.String%2cSystem.Boolean%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.Boolean%2cSystem.Double%2cSystem.Nullable%7bSystem.Double%7d%2cSystem.Nullable%7bSystem.Double%7d%2cSystem.Nullable%7bSystem.Double%7d%2cSystem.String)" data-throw-if-not-resolved="false"></xref>). +The `record_call` verb is wrapped in a SWML document +(`{version, sections: {main: [{record_call: ...}]}}`) and emitted under +the `SWML` action key — there is no bare top-level `record_call` +action and no invented `initiator` key. `stereo`, `format`, +`direction`, `beep`, and `input_sensitivity` are ALWAYS +emitted (Python emits them unconditionally); the remaining parameters are +emitted only when set. + +#### Signature + + + + ```dotnet + public FunctionResult RecordCall(string controlId = "", bool stereo = false, RecordFormat format = RecordFormat.Wav, RecordDirection direction = RecordDirection.Both, string? terminators = null, bool beep = false, double inputSensitivity = 44, double? initialTimeout = null, double? endSilenceTimeout = null, double? maxLength = null, string? statusUrl = null) + ``` + + + + ```dotnet + public FunctionResult RecordCall(string controlId = "", bool stereo = false, string format = "wav", string direction = "both", string? terminators = null, bool beep = false, double inputSensitivity = 44, double? initialTimeout = null, double? endSilenceTimeout = null, double? maxLength = null, string? statusUrl = null) + ``` + + + +#### Parameters (Overload 1) + + + + + + + + + + + + + + + + + + + + + + + +#### Parameters (Overload 2) + + + + + + + + + + + + + + + + + + + + + + + +#### Returns (Overload 1) + +`SignalWire.SWAIG.FunctionResult` + +#### Returns (Overload 2) + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 478. + +*** + +### RemoveGlobalData + +Single-key overload of <xref href="SignalWire.SWAIG.FunctionResult.RemoveGlobalData(System.Collections.Generic.List%7bSystem.String%7d)" data-throw-if-not-resolved="false"></xref>. + +**Remarks:** Python's `remove_global_data(keys: Union[str, List[str]])` accepts a +bare string AND a list; the bare-string call emits the action value as the +bare string (`{"unset_global_data": "plan"}`), NOT a one-element list. +This overload surfaces that arm so the emission is byte-identical to the +reference for a single key. + +#### Signature + + + + ```dotnet + public FunctionResult RemoveGlobalData(List keys) + ``` + + + + ```dotnet + public FunctionResult RemoveGlobalData(string key) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`SignalWire.SWAIG.FunctionResult` + +#### Returns (Overload 2) + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 231. + +*** + +### RemoveMetadata + +Single-key overload of <xref href="SignalWire.SWAIG.FunctionResult.RemoveMetadata(System.Collections.Generic.List%7bSystem.String%7d)" data-throw-if-not-resolved="false"></xref>. + +**Remarks:** Python's `remove_metadata(keys: Union[str, List[str]])` accepts a bare +string AND a list; the bare-string call emits the action value as the bare +string (`{"unset_meta_data": "token"}`), NOT a one-element list. This +overload surfaces that arm so the emission is byte-identical to the +reference for a single key. + +#### Signature + + + + ```dotnet + public FunctionResult RemoveMetadata(List keys) + ``` + + + + ```dotnet + public FunctionResult RemoveMetadata(string key) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`SignalWire.SWAIG.FunctionResult` + +#### Returns (Overload 2) + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 262. + +*** + +### ReplaceInHistory(object?) + +Replace conversation history. Accepts `true` (default) for the +summary placeholder or a string for custom replacement text. +Matches Python's `replace_in_history(text: Union[bool, str] = True)`. + +#### Signature + +```dotnet +public FunctionResult ReplaceInHistory(object? text = null) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 398. + +*** + +### RpcAiMessage(string, string, string) + +Inject a message into an AI agent on another call using <xref href="SignalWire.SWAIG.FunctionResult.ExecuteRpc(System.String%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%2cSystem.String%2cSystem.String)" data-throw-if-not-resolved="false"></xref>. + +**Remarks:** Parity with the Python reference +`rpc_ai_message(call_id, message_text, role="system")`: emits +`method="ai_message"`, `call_id` as a top-level sibling, and +`params={role, message_text}`. <code class="paramref">role</code> remains +caller-overridable (defaults to `"system"`), not hard-coded. + +#### Signature + +```dotnet +public FunctionResult RpcAiMessage(string callId, string messageText, string role = "system") +``` + +#### Parameters + + + + + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 1298. + +*** + +### RpcAiUnhold(string) + +Unhold another call using <xref href="SignalWire.SWAIG.FunctionResult.ExecuteRpc(System.String%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%2cSystem.String%2cSystem.String)" data-throw-if-not-resolved="false"></xref>. + +**Remarks:** Parity with the Python reference `rpc_ai_unhold(call_id)`: emits +`method="ai_unhold"`, `call_id` as a top-level sibling, and +`params={}` (empty → omitted by <xref href="SignalWire.SWAIG.FunctionResult.ExecuteRpc(System.String%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%2cSystem.String%2cSystem.String)" data-throw-if-not-resolved="false"></xref>). + +#### Signature + +```dotnet +public FunctionResult RpcAiUnhold(string callId) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 1315. + +*** + +### RpcDial(string, string, string, string) + +Dial out to a number with a destination SWML URL using <xref href="SignalWire.SWAIG.FunctionResult.ExecuteRpc(System.String%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%2cSystem.String%2cSystem.String)" data-throw-if-not-resolved="false"></xref>. + +**Remarks:** Parity with the Python reference +`rpc_dial(to_number, from_number, dest_swml, device_type="phone")`: +emits `method="dial"` with +`params={devices: {type: device_type, params: {to_number, from_number}}, dest_swml}`. <code class="paramref">deviceType</code> remains caller-overridable (defaults to +`"phone"`), not hard-coded. + +#### Signature + +```dotnet +public FunctionResult RpcDial(string toNumber, string fromNumber, string destSwml, string deviceType = "phone") +``` + +#### Parameters + + + + + + + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 1267. + +*** + +### Say(string) + +#### Signature + +```dotnet +public FunctionResult Say(string text) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 412. + +*** + +### SendSms(string, string, string?, List\?, List\?, string?) + +Send a text message to a PSTN phone number using SWML. + +**Remarks:** Full parity with the Python reference +`send_sms(to_number, from_number, body=None, media=None, tags=None, region=None)`. +Either <code class="paramref">body</code> or <code class="paramref">media</code> (or both) must be +provided. The `send_sms` verb is wrapped in a SWML document and emitted +under the `SWML` action key. `to_number`/`from_number` are +always present; `body`, `media`, `tags`, `region` are +added only when set. + +#### Signature + +```dotnet +public FunctionResult SendSms(string toNumber, string fromNumber, string? body = null, List? media = null, List? tags = null, string? region = null) +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Throws + +- `System.ArgumentException` — If neither <code class="paramref">body</code> nor <code class="paramref">media</code> is provided (parity with Python's `ValueError("Either body or media must be provided")`). + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 1099. + +*** + +### SetEndOfSpeechTimeout(int) + +#### Signature + +```dotnet +public FunctionResult SetEndOfSpeechTimeout(int ms) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 632. + +*** + +### SetMetadata(Dictionary\) + +#### Signature + +```dotnet +public FunctionResult SetMetadata(Dictionary data) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 256. + +*** + +### SetPostProcess(bool) + +#### Signature + +```dotnet +public FunctionResult SetPostProcess(bool value) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 30. + +*** + +### SetResponse(string) + +#### Signature + +```dotnet +public FunctionResult SetResponse(string text) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 24. + +*** + +### SetSpeechEventTimeout(int) + +#### Signature + +```dotnet +public FunctionResult SetSpeechEventTimeout(int ms) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 638. + +*** + +### SimulateUserInput(string) + +Queue simulated user input. + +**Remarks:** Parity with the Python reference `simulate_user_input(text)`: the +action key is `user_input` (NOT `simulate_user_input`), with the +bare text string as its value. + +#### Signature + +```dotnet +public FunctionResult SimulateUserInput(string text) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 1328. + +*** + +### SipRefer(string) + +Send a SIP REFER to a SIP call using SWML. + +**Remarks:** Parity with the Python reference `sip_refer(to_uri)`: the +`sip_refer` verb (params `{to_uri}`) is wrapped in a SWML document +and emitted under the `SWML` action key. + +#### Signature + +```dotnet +public FunctionResult SipRefer(string toUri) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 942. + +*** + +### Stop() + +#### Signature + +```dotnet +public FunctionResult Stop() +``` + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 215. + +*** + +### StopBackgroundFile() + +#### Signature + +```dotnet +public FunctionResult StopBackgroundFile() +``` + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 447. + +*** + +### StopRecordCall(string?) + +Stop an active background call recording using SWML. + +**Remarks:** Parity with the Python reference `stop_record_call(control_id=None)`: +the `stop_record_call` verb (params `{}`, plus `control_id` +when set) is wrapped in a SWML document and emitted under the `SWML` +action key. + +#### Signature + +```dotnet +public FunctionResult StopRecordCall(string? controlId = null) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 604. + +*** + +### StopTap(string?) + +Stop an active tap stream using SWML. + +**Remarks:** Parity with the Python reference `stop_tap(control_id=None)`: the +`stop_tap` verb (params `{}`, plus `control_id` when set) is +wrapped in a SWML document and emitted under the `SWML` action key. + +#### Signature + +```dotnet +public FunctionResult StopTap(string? controlId = null) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 1076. + +*** + +### SwitchContext(string?, string?, bool, bool) + +Change the agent's context/prompt during a conversation. + +**Remarks:** Parity with the Python reference +`switch_context(system_prompt=None, user_prompt=None, consolidate=False, full_reset=False)`: +when ONLY <code class="paramref">systemPrompt</code> is set (and the other three are +at their defaults) the `context_switch` value is the bare +system-prompt string (simple form); any other combination emits the object +form with each supplied field under its snake\_case key. There is no +`isolated` parameter (the Python reference does not define one). + +#### Signature + +```dotnet +public FunctionResult SwitchContext(string? systemPrompt = null, string? userPrompt = null, bool consolidate = false, bool fullReset = false) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 353. + +*** + +### SwmlChangeContext(string) + +Force the conversation into a different context. + +**Remarks:** Parity with the Python reference `swml_change_context(context_name)`: +add\_action("change\_context", context\_name) — the action key is +"change\_context" and its value is the bare context-name string. + +#### Signature + +```dotnet +public FunctionResult SwmlChangeContext(string contextName) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 335. + +*** + +### SwmlChangeStep(string) + +Force the conversation into a specific step in the current context. + +**Remarks:** Parity with the Python reference `swml_change_step(step_name)`: +add\_action("change\_step", step\_name) — the action key is "change\_step" and +its value is the bare step-name string (not a context\_switch dict). + +#### Signature + +```dotnet +public FunctionResult SwmlChangeStep(string stepName) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 321. + +*** + +### SwmlTransfer(string, string, bool) + +Add a SWML transfer action with an AI response set up for when the transfer +completes and control returns to the agent. + +**Remarks:** Parity with the Python reference `swml_transfer(dest, ai_response, final=True)`: +emits a two-verb SWML document — `{set: {ai_response: ...}}` then +`{transfer: {dest: ...}}` — under the `SWML` action key, plus a +top-level `"transfer": str(final).lower()` sibling marking the call +(non-)final. <code class="paramref">final</code> defaults to `true` (permanent +transfer), same as <xref href="SignalWire.SWAIG.FunctionResult.Connect(System.String%2cSystem.Boolean%2cSystem.String)" data-throw-if-not-resolved="false"></xref>. + +#### Signature + +```dotnet +public FunctionResult SwmlTransfer(string dest, string aiResponse, bool final = true) +``` + +#### Parameters + + + + + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 149. + +*** + +### SwmlUserEvent(Dictionary\) + +Send a user event through SWML to update the client UI. + +**Remarks:** Parity with the Python reference `swml_user_event(event_data)`: emits a +SWML document `{sections: {main: [{user_event: {event: <data>}}]}, version: "1.0.0"}` +under the `SWML` action key (NOT a bare top-level `user_event`). + +#### Signature + +```dotnet +public FunctionResult SwmlUserEvent(Dictionary eventData) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 294. + +*** + +### Tap + +Start a background call tap using SWML — canonical, full-arity overload +with the two closed-set arguments (<code class="paramref">direction</code> / <code class="paramref">codec</code>) as the typed <xref href="SignalWire.SWAIG.TapDirection" data-throw-if-not-resolved="false"></xref> / <xref href="SignalWire.SWAIG.Codec" data-throw-if-not-resolved="false"></xref> enums. + +**Remarks:** Full parity with the Python reference +`tap(uri, control_id, direction, codec, rtp_ptime, status_url)`, in the +same parameter order. The Python reference validates the bare-string +`direction`/`codec` against the closed sets \{speak,hear,both\} / +\{PCMU,PCMA\}; this overload surfaces those knowable sets as enums so a bad +value is a compile error rather than a runtime `ValueError` (a +same-arity bare-string overload preserves the Python `str` path — see <xref href="SignalWire.SWAIG.FunctionResult.Tap(System.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.Int32%2cSystem.String)" data-throw-if-not-resolved="false"></xref>). The +`tap` verb is wrapped in a SWML document and emitted under the +`SWML` action key. Only `uri` is always present; `control_id`, +`direction`, `codec`, `rtp_ptime`, and `status_url` are +emitted only when they differ from their defaults (mirrors Python's per-key +guards). + +#### Signature + + + + ```dotnet + public FunctionResult Tap(string uri, string controlId = "", TapDirection direction = TapDirection.Both, Codec codec = Codec.Pcmu, int rtpPtime = 20, string? statusUrl = null) + ``` + + + + ```dotnet + public FunctionResult Tap(string uri, string controlId = "", string direction = "both", string codec = "PCMU", int rtpPtime = 20, string? statusUrl = null) + ``` + + + +#### Parameters (Overload 1) + + + + + + + + + + + + + +#### Parameters (Overload 2) + + + + + + + + + + + + + +#### Returns (Overload 1) + +`SignalWire.SWAIG.FunctionResult` + +#### Returns (Overload 2) + +`SignalWire.SWAIG.FunctionResult` + +#### Throws + +- `System.ArgumentException` — If <code class="paramref">rtpPtime</code> is not a positive integer (parity with Python's `ValueError`); <code class="paramref">direction</code>/<code class="paramref">codec</code> are closed-set enums and so cannot be invalid. + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 971. + +*** + +### ToDict() + +Serialize to the JSON structure expected by SWAIG. + +**Remarks:** Byte-parity with the Python reference `to_dict()`: + +<ul><li>`response` is included ONLY when non-empty (an empty string is omitted).</li><li>`action` is included only when there is at least one action.</li><li>`post_process` is included only when it is `true` AND there are +actions to execute (it is meaningless without actions).</li><li>When neither `response` nor `action` would be present, a default +`response` of `"Action completed."` is emitted so the result is never empty.</li></ul> + +#### Signature + +```dotnet +public Dictionary ToDict() +``` + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 75. + +*** + +### ToggleFunctions(List\>) + +Enable/disable specific SWAIG functions. + +**Remarks:** Parity with the Python reference `toggle_functions(function_toggles)`: +takes a list of toggle records (each a `{function, active}` dict) and +passes it through verbatim under the `toggle_functions` action key — no +reshaping. (The previous `Dictionary<string,bool>` shape both +changed the signature AND lost caller-controlled key ordering / extra keys.) + +#### Signature + +```dotnet +public FunctionResult ToggleFunctions(List> functionToggles) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 654. + +*** + +### UpdateGlobalData(Dictionary\) + +#### Signature + +```dotnet +public FunctionResult UpdateGlobalData(Dictionary data) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 225. + +*** + +### UpdateSettings(Dictionary\) + +#### Signature + +```dotnet +public FunctionResult UpdateSettings(Dictionary settings) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 673. + +*** + +### WaitForUser(bool?, int?, bool) + +#### Signature + +```dotnet +public FunctionResult WaitForUser(bool? enabled = null, int? timeout = null, bool answerFirst = false) +``` + +#### Parameters + + + + + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 189. + +## Source + +[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) + +Line 8. diff --git a/fern/products/sdk-reference/dotnet/agents/swaig/index.mdx b/fern/products/sdk-reference/dotnet/agents/swaig/index.mdx new file mode 100644 index 0000000000..2433ba4bc6 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/swaig/index.mdx @@ -0,0 +1,481 @@ +--- +slug: "/reference/dotnet/agents/swaig" +title: "swaig" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "module" + language: "dotnet" + qualified_name: "agents.swaig" + parent: "agents" + module: "agents" +--- +# `swaig` + +## Classes + + + + Maps <xref href="SignalWire.SWAIG.CallbackMethod" data-throw-if-not-resolved="false"></xref> members to the canonical wire values (uppercase HTTP verbs) that the SWML `join_conference` action expects on its `status_callback_method` / `recording_status_callback_method` keys. + + + + Maps <xref href="SignalWire.SWAIG.Codec" data-throw-if-not-resolved="false"></xref> members to the canonical wire values that the SWML `tap` action expects. + + + + Maps <xref href="SignalWire.SWAIG.ConferenceBeep" data-throw-if-not-resolved="false"></xref> members to the canonical wire values that the SWML `join_conference` action expects on its `beep` key. + + + + Maps <xref href="SignalWire.SWAIG.ConferenceRecord" data-throw-if-not-resolved="false"></xref> members to the canonical wire values that the SWML `join_conference` action expects on its `record` key. + + + + Maps <xref href="SignalWire.SWAIG.ConferenceTrim" data-throw-if-not-resolved="false"></xref> members to the canonical wire values that the SWML `join_conference` action expects on its `trim` key. + + + + Builds a SWAIG function result with an optional response, actions, and post-processing flag. All action methods return `this` for fluent chaining. + + + + Typed options bag for the convenience overload <xref href="SignalWire.SWAIG.FunctionResult.JoinConference(System.String%2cSignalWire.SWAIG.JoinConferenceOptions)" data-throw-if-not-resolved="false"></xref>. + + + + Fluent, type-safe builder for a SWAIG tool's `parameters` — the JSON-Schema `properties` map passed as the third argument to <xref href="SignalWire.SWML.Service.DefineTool(System.String%2cSystem.String%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%2cSystem.Func%7bSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%2cSignalWire.SWAIG.FunctionResult%7d%2cSystem.Boolean)" data-throw-if-not-resolved="false"></xref> / SignalWire.Agent.AgentBase.DefineTool. + + + + Maps <xref href="SignalWire.SWAIG.RecordDirection" data-throw-if-not-resolved="false"></xref> members to the canonical wire values that the SWML `record_call` action expects. + + + + Maps <xref href="SignalWire.SWAIG.RecordFormat" data-throw-if-not-resolved="false"></xref> members to the canonical wire values that the SWML `record_call` action expects. + + + + Maps <xref href="SignalWire.SWAIG.TapDirection" data-throw-if-not-resolved="false"></xref> members to the canonical wire values that the SWML `tap` action expects. + + + +## Enums + +### CallbackMethod + +HTTP method for the `status_callback` / `recording_status_callback` +URLs on <xref href="SignalWire.SWAIG.FunctionResult.JoinConference(System.String%2cSignalWire.SWAIG.JoinConferenceOptions)" data-throw-if-not-resolved="false"></xref>, +as a typed, compile-time-checked closed set. + +**Remarks:** <p> +The Python reference validates these arguments explicitly +(`join_conference(... status_callback_method ... recording_status_callback_method ...)` +raises `ValueError` unless the value is `"GET"` or `"POST"`), +so it is a genuine closed set rather than a free-form string. + +</p> +<p> +Each member maps to its canonical wire value via +<xref href="SignalWire.SWAIG.CallbackMethodExtensions.ToWireName(SignalWire.SWAIG.CallbackMethod)" data-throw-if-not-resolved="false"></xref>; the enum is +purely a typed alias over those strings, so the emitted SWML is identical to +passing the string directly. +</p> + +#### Signature + +```dotnet +public enum CallbackMethod +``` + +#### Properties + + + GET + + + + POST + + +#### Source + +[`src/SignalWire/SWAIG/CallbackMethod.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/CallbackMethod.cs) + +Line 21. + +*** + +### Codec + +Media codec for <xref href="SignalWire.SWAIG.FunctionResult.Tap(System.String%2cSystem.String%2cSignalWire.SWAIG.TapDirection%2cSignalWire.SWAIG.Codec%2cSystem.Int32%2cSystem.String)" data-throw-if-not-resolved="false"></xref>, as a typed, +compile-time-checked closed set. + +**Remarks:** <p> +The Python reference validates this argument explicitly +(`tap(... codec ...)` raises `ValueError` unless the value is +`"PCMU"` or `"PCMA"`), so it is a genuine closed set rather than a +free-form string. The wire strings are upper-case (`"PCMU"` / `"PCMA"`). + +</p> +<p> +This is the two-value SWAIG `tap` codec set and is deliberately +<strong>distinct</strong> from the larger RELAY `connect`/`stream` +codec superset (`{PCMU, PCMA, OPUS, G729, G722, VP8, H264}`, optionally +comma-joined): only `PCMU`/`PCMA` are valid here, so this type must +not be reused for those RELAY params (which stay strings). +FunctionResult.Tap(string, TapDirection, Codec, string, int, string?) +accepts this enum OR a string: the enum gives editor autocompletion and turns +a typo into a compile error, while the string overload preserves parity with +the Python reference (which takes a bare `str`). +</p> +<p> +Each member maps to its canonical wire value via +<xref href="SignalWire.SWAIG.CodecExtensions.ToWireName(SignalWire.SWAIG.Codec)" data-throw-if-not-resolved="false"></xref>; the enum is purely a typed +alias over those strings, so the emitted SWML is identical to passing the +string directly. +</p> +<example> +<pre><code class="lang-csharp">result.Tap("rtp://1.2.3.4:5000", TapDirection.Both, Codec.Pcma); // typed, autocompleted +result.Tap("rtp://1.2.3.4:5000", codec: "PCMA"); // string still works (parity)</code></pre> +</example> + +#### Signature + +```dotnet +public enum Codec +``` + +#### Properties + + + PCMA (G.711 A-law) + + + + PCMU (G.711 µ-law, the reference default) + + +#### Source + +[`src/SignalWire/SWAIG/Codec.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/Codec.cs) + +Line 37. + +*** + +### ConferenceBeep + +Beep behaviour for <xref href="SignalWire.SWAIG.FunctionResult.JoinConference(System.String%2cSignalWire.SWAIG.JoinConferenceOptions)" data-throw-if-not-resolved="false"></xref>, +as a typed, compile-time-checked closed set. + +**Remarks:** <p> +The Python reference validates this argument explicitly +(`join_conference(... beep ...)` raises `ValueError` unless the +value is `"true"`, `"false"`, `"onEnter"`, or `"onExit"`), +so it is a genuine closed set rather than a free-form string. The typed +`JoinConference(string, JoinConferenceOptions?)` overload accepts this +enum; the flat string overload preserves parity with the Python reference +(which takes a bare `str` validated to the same closed set). + +</p> +<p> +Each member maps to its canonical wire value via +<xref href="SignalWire.SWAIG.ConferenceBeepExtensions.ToWireName(SignalWire.SWAIG.ConferenceBeep)" data-throw-if-not-resolved="false"></xref>; the enum is +purely a typed alias over those strings, so the emitted SWML is identical to +passing the string directly. +</p> + +#### Signature + +```dotnet +public enum ConferenceBeep +``` + +#### Properties + + + false + + + + onEnter + + + + onExit + + + + true + + +#### Source + +[`src/SignalWire/SWAIG/ConferenceBeep.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ConferenceBeep.cs) + +Line 23. + +*** + +### ConferenceRecord + +Recording mode for <xref href="SignalWire.SWAIG.FunctionResult.JoinConference(System.String%2cSignalWire.SWAIG.JoinConferenceOptions)" data-throw-if-not-resolved="false"></xref>, +as a typed, compile-time-checked closed set. + +**Remarks:** <p> +The Python reference validates this argument explicitly +(`join_conference(... record ...)` raises `ValueError` unless the +value is `"do-not-record"` or `"record-from-start"`), so it is a +genuine closed set rather than a free-form string. It is distinct from the <xref href="SignalWire.SWAIG.RecordFormat" data-throw-if-not-resolved="false"></xref>/<xref href="SignalWire.SWAIG.RecordDirection" data-throw-if-not-resolved="false"></xref> closed sets that +describe `record_call` output; this one toggles whether the conference +itself records. + +</p> +<p> +Each member maps to its canonical wire value via +<xref href="SignalWire.SWAIG.ConferenceRecordExtensions.ToWireName(SignalWire.SWAIG.ConferenceRecord)" data-throw-if-not-resolved="false"></xref>; the +enum is purely a typed alias over those strings, so the emitted SWML is +identical to passing the string directly. +</p> + +#### Signature + +```dotnet +public enum ConferenceRecord +``` + +#### Properties + + + do-not-record + + + + record-from-start + + +#### Source + +[`src/SignalWire/SWAIG/ConferenceRecord.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ConferenceRecord.cs) + +Line 23. + +*** + +### ConferenceTrim + +Silence-trim mode for <xref href="SignalWire.SWAIG.FunctionResult.JoinConference(System.String%2cSignalWire.SWAIG.JoinConferenceOptions)" data-throw-if-not-resolved="false"></xref>, +as a typed, compile-time-checked closed set. + +**Remarks:** <p> +The Python reference validates this argument explicitly +(`join_conference(... trim ...)` raises `ValueError` unless the +value is `"trim-silence"` or `"do-not-trim"`), so it is a genuine +closed set rather than a free-form string. + +</p> +<p> +Each member maps to its canonical wire value via +<xref href="SignalWire.SWAIG.ConferenceTrimExtensions.ToWireName(SignalWire.SWAIG.ConferenceTrim)" data-throw-if-not-resolved="false"></xref>; the enum is +purely a typed alias over those strings, so the emitted SWML is identical to +passing the string directly. +</p> + +#### Signature + +```dotnet +public enum ConferenceTrim +``` + +#### Properties + + + do-not-trim + + + + trim-silence + + +#### Source + +[`src/SignalWire/SWAIG/ConferenceTrim.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ConferenceTrim.cs) + +Line 20. + +*** + +### RecordDirection + +Audio direction for <xref href="SignalWire.SWAIG.FunctionResult.RecordCall(System.String%2cSystem.Boolean%2cSignalWire.SWAIG.RecordFormat%2cSignalWire.SWAIG.RecordDirection%2cSystem.String%2cSystem.Boolean%2cSystem.Double%2cSystem.Nullable%7bSystem.Double%7d%2cSystem.Nullable%7bSystem.Double%7d%2cSystem.Nullable%7bSystem.Double%7d%2cSystem.String)" data-throw-if-not-resolved="false"></xref>, as a typed, +compile-time-checked closed set. + +**Remarks:** <p> +The Python reference validates this argument explicitly +(`record_call(... direction ...)` raises `ValueError` unless the +value is `"speak"`, `"listen"`, or `"both"`), so it is a +genuine closed set rather than a free-form string. It is the user-facing <em>recording</em> direction — which side(s) of the call to capture — and is +distinct from the read-only inbound/outbound `direction` field carried +on a RELAY `Call` event (that one stays a plain string, as it is server +state, not a caller choice). +FunctionResult.RecordCall(RecordFormat, RecordDirection, string, bool) +accepts this enum OR a string: the enum gives editor autocompletion and turns +a typo into a compile error, while the string overload preserves parity with +the Python reference (which takes a bare `str`). + +</p> +<p> +Each member maps to its canonical wire value via +<xref href="SignalWire.SWAIG.RecordDirectionExtensions.ToWireName(SignalWire.SWAIG.RecordDirection)" data-throw-if-not-resolved="false"></xref>; the enum +is purely a typed alias over those strings, so the emitted SWML is identical +to passing the string directly. +</p> +<example> +<pre><code class="lang-csharp">result.RecordCall(direction: RecordDirection.Listen); // typed, autocompleted +result.RecordCall("rec-1", false, "wav", "listen"); // string still works (parity)</code></pre> +</example> + +#### Signature + +```dotnet +public enum RecordDirection +``` + +#### Properties + + + both + + + + listen + + + + speak + + +#### Source + +[`src/SignalWire/SWAIG/RecordDirection.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/RecordDirection.cs) + +Line 34. + +*** + +### RecordFormat + +Recording container format for <xref href="SignalWire.SWAIG.FunctionResult.RecordCall(System.String%2cSystem.Boolean%2cSignalWire.SWAIG.RecordFormat%2cSignalWire.SWAIG.RecordDirection%2cSystem.String%2cSystem.Boolean%2cSystem.Double%2cSystem.Nullable%7bSystem.Double%7d%2cSystem.Nullable%7bSystem.Double%7d%2cSystem.Nullable%7bSystem.Double%7d%2cSystem.String)" data-throw-if-not-resolved="false"></xref>, as a +typed, compile-time-checked closed set. + +**Remarks:** <p> +The Python reference validates this argument explicitly +(`record_call(... format ...)` raises `ValueError` unless the value +is `"wav"`, `"mp3"`, or `"mp4"`), so it is a genuine closed set rather than a +free-form string. FunctionResult.RecordCall(RecordFormat, RecordDirection, string, bool) +accepts this enum OR a string: the enum gives editor autocompletion and turns +a typo into a compile error, while the string overload preserves parity with +the Python reference (which takes a bare `str`). + +</p> +<p> +Each member maps to its canonical wire value via +<xref href="SignalWire.SWAIG.RecordFormatExtensions.ToWireName(SignalWire.SWAIG.RecordFormat)" data-throw-if-not-resolved="false"></xref>; the enum is +purely a typed alias over those strings, so the emitted SWML is identical to +passing the string directly. +</p> +<example> +<pre><code class="lang-csharp">result.RecordCall(format: RecordFormat.Mp3); // typed, autocompleted +result.RecordCall("rec-1", false, "mp3"); // string still works (parity)</code></pre> +</example> + +#### Signature + +```dotnet +public enum RecordFormat +``` + +#### Properties + + + mp3 + + + + mp4 + + + + wav + + +#### Source + +[`src/SignalWire/SWAIG/RecordFormat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/RecordFormat.cs) + +Line 29. + +*** + +### TapDirection + +Audio direction for <xref href="SignalWire.SWAIG.FunctionResult.Tap(System.String%2cSystem.String%2cSignalWire.SWAIG.TapDirection%2cSignalWire.SWAIG.Codec%2cSystem.Int32%2cSystem.String)" data-throw-if-not-resolved="false"></xref>, as a typed, +compile-time-checked closed set. + +**Remarks:** <p> +The Python reference validates this argument explicitly +(`tap(... direction ...)` raises `ValueError` unless the value is +`"speak"`, `"hear"`, or `"both"`), so it is a genuine closed +set rather than a free-form string. + +</p> +<p> +This is the <em>tap</em> direction and is deliberately <strong>distinct</strong> +from <xref href="SignalWire.SWAIG.RecordDirection" data-throw-if-not-resolved="false"></xref>: `tap` uses `"hear"` where +`record_call` uses `"listen"`. The Python reference validates the two +against separate lists, so they are modelled as two separate enums rather than +a single shared one — sharing one would silently accept the wrong vocabulary on +one of the two verbs. +FunctionResult.Tap(string, TapDirection, Codec, string, int, string?) +accepts this enum OR a string: the enum gives editor autocompletion and turns +a typo into a compile error, while the string overload preserves parity with +the Python reference (which takes a bare `str`). +</p> +<p> +Each member maps to its canonical wire value via +<xref href="SignalWire.SWAIG.TapDirectionExtensions.ToWireName(SignalWire.SWAIG.TapDirection)" data-throw-if-not-resolved="false"></xref>; the enum is +purely a typed alias over those strings, so the emitted SWML is identical to +passing the string directly. +</p> +<example> +<pre><code class="lang-csharp">result.Tap("rtp://1.2.3.4:5000", TapDirection.Hear, Codec.Pcmu); // typed, autocompleted +result.Tap("rtp://1.2.3.4:5000", direction: "hear", codec: "PCMU"); // string still works (parity)</code></pre> +</example> + +#### Signature + +```dotnet +public enum TapDirection +``` + +#### Properties + + + both + + + + hear + + + + speak + + +#### Source + +[`src/SignalWire/SWAIG/TapDirection.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/TapDirection.cs) + +Line 38. diff --git a/fern/products/sdk-reference/dotnet/agents/swaig/join-conference-options/index.mdx b/fern/products/sdk-reference/dotnet/agents/swaig/join-conference-options/index.mdx new file mode 100644 index 0000000000..7d6c1d906d --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/swaig/join-conference-options/index.mdx @@ -0,0 +1,128 @@ +--- +slug: "/reference/dotnet/agents/swaig/join-conference-options" +title: "JoinConferenceOptions" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.SWAIG.JoinConferenceOptions" + parent: "agents.swaig" + module: "agents.swaig" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/JoinConferenceOptions.cs" + visibility: "public" +--- +# `JoinConferenceOptions` + +Typed options bag for the convenience overload <xref href="SignalWire.SWAIG.FunctionResult.JoinConference(System.String%2cSignalWire.SWAIG.JoinConferenceOptions)" data-throw-if-not-resolved="false"></xref>. + +**Remarks:** <p> +Mirrors the 18 optional parameters of the Python reference +`join_conference(name, muted=False, beep="true", ...)` one-for-one, with +the four closed-set arguments (`beep`, `record`, `trim`, the two +callback methods) surfaced as the typed enums <xref href="SignalWire.SWAIG.ConferenceBeep" data-throw-if-not-resolved="false"></xref>, <xref href="SignalWire.SWAIG.ConferenceRecord" data-throw-if-not-resolved="false"></xref>, <xref href="SignalWire.SWAIG.ConferenceTrim" data-throw-if-not-resolved="false"></xref>, and <xref href="SignalWire.SWAIG.CallbackMethod" data-throw-if-not-resolved="false"></xref> for +editor autocompletion and compile-time checking. + +</p> +<p> +This record is a .NET-idiomatic convenience (a single options object instead +of 18 positional arguments). The flat, all-string +<xref href="SignalWire.SWAIG.FunctionResult.JoinConference(System.String%2cSystem.Boolean%2cSystem.String%2cSystem.Boolean%2cSystem.Boolean%2cSystem.String%2cSystem.Int32%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.Object)" data-throw-if-not-resolved="false"></xref> +overload remains the parity-bearing signature against the Python reference; +the convenience overload delegates straight to it via each enum's +`ToWireName()`, so the emitted `join_conference` action is identical. +</p> +<p> +Every default matches the Python reference exactly, so an unset options object +collapses to the simple-form bare conference-name string just like the flat +overload with no arguments. +</p> + +**Modifiers:** `sealed` + +## Signature + +```dotnet +public sealed record JoinConferenceOptions : IEquatable +``` + +## Inheritance + +**Implements:** `System.IEquatable` + +## Properties + + + Beep behaviour. Python default: `"true"`. + + + + SWML Call ID / CXML CallSid for coaching. Python default: `None`. + + + + Whether the conference ends when this participant exits. Python default: `False`. + + + + Maximum participants (1..=250). Python default: `250`. + + + + Whether to join muted. Python default: `False`. + + + + Recording mode. Python default: `"do-not-record"`. + + + + URL for recording status callbacks. Python default: `None`. + + + + Recording events to report. Python default: `"completed"`. + + + + HTTP method for recording status callbacks. Python default: `"POST"`. + + + + Conference region. Python default: `None`. + + + + Switch payload (object \{\} or array \[]). Python default: `None`. + + + + Whether the conference starts when this participant enters. Python default: `True`. + + + + URL for status callbacks. Python default: `None`. + + + + Events to report. Python default: `None`. + + + + HTTP method for status callbacks. Python default: `"POST"`. + + + + Silence-trim mode. Python default: `"trim-silence"`. + + + + SWML URL for hold music. Python default: `None`. + + +## Source + +[`src/SignalWire/SWAIG/JoinConferenceOptions.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/JoinConferenceOptions.cs) + +Line 30. diff --git a/fern/products/sdk-reference/dotnet/agents/swaig/parameter-schema/index.mdx b/fern/products/sdk-reference/dotnet/agents/swaig/parameter-schema/index.mdx new file mode 100644 index 0000000000..a08d526ac2 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/swaig/parameter-schema/index.mdx @@ -0,0 +1,491 @@ +--- +slug: "/reference/dotnet/agents/swaig/parameter-schema" +title: "ParameterSchema" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.SWAIG.ParameterSchema" + parent: "agents.swaig" + module: "agents.swaig" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ParameterSchema.cs" + visibility: "public" +--- +# `ParameterSchema` + +Fluent, type-safe builder for a SWAIG tool's `parameters` — the +JSON-Schema `properties` map passed as the third argument to <xref href="SignalWire.SWML.Service.DefineTool(System.String%2cSystem.String%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%2cSystem.Func%7bSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%2cSignalWire.SWAIG.FunctionResult%7d%2cSystem.Boolean)" data-throw-if-not-resolved="false"></xref> / +SignalWire.Agent.AgentBase.DefineTool. + +**Remarks:** <p> +Defining a SWAIG tool's parameters in the Python reference (and, until +now, in this port) means hand-writing an untyped +`Dictionary<string, object>` of nested dictionaries — a raw +JSON-Schema blob: + +</p> +<pre><code class="lang-csharp">new Dictionary<string, object> +{ + ["service"] = new Dictionary<string, object> + { + ["type"] = "string", + ["description"] = "The service", + ["required"] = true, + }, +};</code></pre> +<p> +<xref href="SignalWire.SWAIG.ParameterSchema" data-throw-if-not-resolved="false"></xref> produces the <strong>byte-identical</strong> +`properties` map type-safely: +</p> +<pre><code class="lang-csharp">ParameterSchema.Create() + .String("service", "The service") + .String("date", "YYYY-MM-DD") + .Enum("fmt", typeof(RecordFormat), "format") // → enum: ["wav","mp3","mp4"] + .Required("service", "date") + .Build();</code></pre> +<p> +This is a <strong>typed convenience over the same wire output, not a new +format</strong>. <xref href="SignalWire.SWAIG.ParameterSchema.Build" data-throw-if-not-resolved="false"></xref> returns exactly the dictionary you +would have hand-written, so it drops straight into the existing untyped +`DefineTool` path — which keeps working unchanged. There is no Python +reference counterpart (Python builds the dict by hand); this is a .NET-only +additive ergonomics layer. +</p> +<p> +<strong>Required.</strong> <xref href="SignalWire.SWAIG.ParameterSchema.Required(System.String%5b%5d)" data-throw-if-not-resolved="false"></xref> marks properties +with the inline `["required"] = true` flag this port's hand-written +tool params already use (e.g. `MathSkill`, `SpiderSkill`, +`InfoGathererSkill`). For callers that prefer the top-level JSON-Schema +`required: [...]` array instead (the shape `DataMap` and the Python +`SWAIGFunction` emit), <xref href="SignalWire.SWAIG.ParameterSchema.RequiredNames" data-throw-if-not-resolved="false"></xref> exposes the same +names as an ordered `List<string>`. +</p> +<p> +<strong>Closed sets.</strong> Enum(string, Type, string?) +integrates the Tier-1 typed enums (<xref href="SignalWire.SWAIG.RecordFormat" data-throw-if-not-resolved="false"></xref>, +<xref href="SignalWire.SWAIG.RecordDirection" data-throw-if-not-resolved="false"></xref>, <xref href="SignalWire.SWAIG.TapDirection" data-throw-if-not-resolved="false"></xref>, +<xref href="SignalWire.SWAIG.Codec" data-throw-if-not-resolved="false"></xref>, …) by reflecting over the enum's members and emitting +each member's canonical wire string (its `ToWireName`) into the schema +`enum: [...]` list — so the closed set is defined once, in the enum, +rather than re-typed as a string list at every call site. An explicit +Enum(string, IEnumerable<string>, string?) overload remains +for genuinely-open or ad-hoc value sets. +</p> + +**Modifiers:** `sealed` + +## Signature + +```dotnet +public sealed class ParameterSchema +``` + +## Properties + + + The required-property names in declaration order — the source for a top-level JSON-Schema `required: [...]` array (the shape `DataMap` and Python's `SWAIGFunction` emit). The inline `["required"] = true` flags are already set by <xref href="SignalWire.SWAIG.ParameterSchema.Required(System.String%5b%5d)" data-throw-if-not-resolved="false"></xref>; this is for callers that additionally want the array form. + + +## Methods + +### Array + +Add an `array` property whose elements are a scalar kind +(`"string"`, `"number"`, `"integer"`, `"boolean"`). +Emits `{"type":"array","items":{"type":itemType}}`. + +#### Signature + + + + ```dotnet + public ParameterSchema Array(string name, string itemType, string? description = null, bool required = false, IEnumerable? itemEnumValues = null) + ``` + + + + ```dotnet + public ParameterSchema Array(string name, ParameterSchema itemSchema, string? description = null, bool required = false) + ``` + + + +#### Parameters (Overload 1) + + + + + + + + + + + +#### Parameters (Overload 2) + + + + + + + + + +#### Returns (Overload 1) + +`SignalWire.SWAIG.ParameterSchema` + +#### Returns (Overload 2) + +`SignalWire.SWAIG.ParameterSchema` + +#### Source + +[`src/SignalWire/SWAIG/ParameterSchema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ParameterSchema.cs) + +Line 164. + +*** + +### Boolean(string, string?, bool, object?) + +Add a `boolean` property. + +#### Signature + +```dotnet +public ParameterSchema Boolean(string name, string? description = null, bool required = false, object? defaultValue = null) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`SignalWire.SWAIG.ParameterSchema` + +#### Source + +[`src/SignalWire/SWAIG/ParameterSchema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ParameterSchema.cs) + +Line 117. + +*** + +### Build() + +Build the JSON-Schema `properties` map — the exact +`Dictionary<string, object>` to pass as the `parameters` +argument to `DefineTool`. A fresh dictionary is returned on each +call (mutating it does not affect the builder), with properties in +declaration order. + +#### Signature + +```dotnet +public Dictionary Build() +``` + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/SWAIG/ParameterSchema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ParameterSchema.cs) + +Line 251. + +*** + +### Create() + +Start a new, empty parameter-schema builder. + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static ParameterSchema Create() +``` + +#### Returns + +`SignalWire.SWAIG.ParameterSchema` + +#### Source + +[`src/SignalWire/SWAIG/ParameterSchema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ParameterSchema.cs) + +Line 80. + +*** + +### Enum + +Add a `string` property constrained to a closed set, sourced from a +Tier-1 typed enum. Each enum member is rendered via its +`ToWireName` extension into the schema `enum: [...]` list, so +the wire vocabulary is defined once in the enum. + +#### Signature + + + + ```dotnet + public ParameterSchema Enum(string name, Type enumType, string? description = null, bool required = false, object? defaultValue = null) + ``` + + + + ```dotnet + public ParameterSchema Enum(string name, IEnumerable values, string? description = null, bool required = false, object? defaultValue = null) + ``` + + + +#### Parameters (Overload 1) + + + Property (argument) name. + + + + A SignalWire closed-set enum (e.g. <xref href="SignalWire.SWAIG.RecordFormat" data-throw-if-not-resolved="false"></xref>) whose members carry a `ToWireName` extension in a sibling `<EnumName>Extensions` class. + + + + LLM-facing description of the argument. + + + + Mark required inline (`["required"] = true`). + + + + Optional JSON-Schema `default`. + + +#### Parameters (Overload 2) + + + + + + + + + + + +#### Returns (Overload 1) + +`SignalWire.SWAIG.ParameterSchema` + +#### Returns (Overload 2) + +`SignalWire.SWAIG.ParameterSchema` + +#### Source + +[`src/SignalWire/SWAIG/ParameterSchema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ParameterSchema.cs) + +Line 137. + +*** + +### Integer(string, string?, bool, object?, string?) + +Add an `integer` property. + +#### Signature + +```dotnet +public ParameterSchema Integer(string name, string? description = null, bool required = false, object? defaultValue = null, string? format = null) +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`SignalWire.SWAIG.ParameterSchema` + +#### Source + +[`src/SignalWire/SWAIG/ParameterSchema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ParameterSchema.cs) + +Line 108. + +*** + +### Number(string, string?, bool, object?, string?) + +Add a `number` (floating-point) property. + +#### Signature + +```dotnet +public ParameterSchema Number(string name, string? description = null, bool required = false, object? defaultValue = null, string? format = null) +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`SignalWire.SWAIG.ParameterSchema` + +#### Source + +[`src/SignalWire/SWAIG/ParameterSchema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ParameterSchema.cs) + +Line 99. + +*** + +### Object(string, ParameterSchema, string?, bool) + +Add a nested `object` property described by a child <xref href="SignalWire.SWAIG.ParameterSchema" data-throw-if-not-resolved="false"></xref>. Emits +`{"type":"object","properties":{…}}`. + +#### Signature + +```dotnet +public ParameterSchema Object(string name, ParameterSchema schema, string? description = null, bool required = false) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`SignalWire.SWAIG.ParameterSchema` + +#### Source + +[`src/SignalWire/SWAIG/ParameterSchema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ParameterSchema.cs) + +Line 204. + +*** + +### Required(params string\[]) + +Mark one or more already-declared properties required by setting the +inline `["required"] = true` flag on each (this port's hand-written +convention). Also records the names for <xref href="SignalWire.SWAIG.ParameterSchema.RequiredNames" data-throw-if-not-resolved="false"></xref>. + +#### Signature + +```dotnet +public ParameterSchema Required(params string[] names) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.SWAIG.ParameterSchema` + +#### Throws + +- `System.ArgumentException` — If a named property was not declared. + +#### Source + +[`src/SignalWire/SWAIG/ParameterSchema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ParameterSchema.cs) + +Line 218. + +*** + +### String(string, string?, bool, object?, string?, IEnumerable\?) + +Add a `string` property. + +#### Signature + +```dotnet +public ParameterSchema String(string name, string? description = null, bool required = false, object? defaultValue = null, string? format = null, IEnumerable? enumValues = null) +``` + +#### Parameters + + + Property (argument) name. + + + + LLM-facing description of the argument. + + + + Mark required inline (`["required"] = true`). + + + + Optional JSON-Schema `default`. + + + + Optional JSON-Schema `format` hint (e.g. `"date"`). + + + + Optional closed set of allowed string values. + + +#### Returns + +`SignalWire.SWAIG.ParameterSchema` + +#### Source + +[`src/SignalWire/SWAIG/ParameterSchema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ParameterSchema.cs) + +Line 89. + +## Source + +[`src/SignalWire/SWAIG/ParameterSchema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ParameterSchema.cs) + +Line 69. diff --git a/fern/products/sdk-reference/dotnet/agents/swaig/record-direction-extensions/index.mdx b/fern/products/sdk-reference/dotnet/agents/swaig/record-direction-extensions/index.mdx new file mode 100644 index 0000000000..d813fbc411 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/swaig/record-direction-extensions/index.mdx @@ -0,0 +1,62 @@ +--- +slug: "/reference/dotnet/agents/swaig/record-direction-extensions" +title: "RecordDirectionExtensions" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.SWAIG.RecordDirectionExtensions" + parent: "agents.swaig" + module: "agents.swaig" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/RecordDirection.cs" + visibility: "public" +--- +# `RecordDirectionExtensions` + +Maps <xref href="SignalWire.SWAIG.RecordDirection" data-throw-if-not-resolved="false"></xref> members to the canonical wire values that +the SWML `record_call` action expects. + +**Modifiers:** `static` + +## Signature + +```dotnet +public static class RecordDirectionExtensions +``` + +## Methods + +### ToWireName(RecordDirection) + +The canonical recording-direction string (the value placed on the +`record_call.direction` key in the emitted SWML). + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static string ToWireName(this RecordDirection direction) +``` + +#### Parameters + + + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/SWAIG/RecordDirection.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/RecordDirection.cs) + +Line 63. + +## Source + +[`src/SignalWire/SWAIG/RecordDirection.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/RecordDirection.cs) + +Line 50. diff --git a/fern/products/sdk-reference/dotnet/agents/swaig/record-format-extensions/index.mdx b/fern/products/sdk-reference/dotnet/agents/swaig/record-format-extensions/index.mdx new file mode 100644 index 0000000000..2a1f21a115 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/swaig/record-format-extensions/index.mdx @@ -0,0 +1,62 @@ +--- +slug: "/reference/dotnet/agents/swaig/record-format-extensions" +title: "RecordFormatExtensions" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.SWAIG.RecordFormatExtensions" + parent: "agents.swaig" + module: "agents.swaig" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/RecordFormat.cs" + visibility: "public" +--- +# `RecordFormatExtensions` + +Maps <xref href="SignalWire.SWAIG.RecordFormat" data-throw-if-not-resolved="false"></xref> members to the canonical wire values that the +SWML `record_call` action expects. + +**Modifiers:** `static` + +## Signature + +```dotnet +public static class RecordFormatExtensions +``` + +## Methods + +### ToWireName(RecordFormat) + +The canonical recording-format string (the value placed on the +`record_call.format` key in the emitted SWML). + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static string ToWireName(this RecordFormat format) +``` + +#### Parameters + + + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/SWAIG/RecordFormat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/RecordFormat.cs) + +Line 58. + +## Source + +[`src/SignalWire/SWAIG/RecordFormat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/RecordFormat.cs) + +Line 45. diff --git a/fern/products/sdk-reference/dotnet/agents/swaig/tap-direction-extensions/index.mdx b/fern/products/sdk-reference/dotnet/agents/swaig/tap-direction-extensions/index.mdx new file mode 100644 index 0000000000..eb44b00e49 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/swaig/tap-direction-extensions/index.mdx @@ -0,0 +1,62 @@ +--- +slug: "/reference/dotnet/agents/swaig/tap-direction-extensions" +title: "TapDirectionExtensions" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.SWAIG.TapDirectionExtensions" + parent: "agents.swaig" + module: "agents.swaig" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/TapDirection.cs" + visibility: "public" +--- +# `TapDirectionExtensions` + +Maps <xref href="SignalWire.SWAIG.TapDirection" data-throw-if-not-resolved="false"></xref> members to the canonical wire values that the +SWML `tap` action expects. + +**Modifiers:** `static` + +## Signature + +```dotnet +public static class TapDirectionExtensions +``` + +## Methods + +### ToWireName(TapDirection) + +The canonical tap-direction string (the value placed on the +`tap.direction` key in the emitted SWML). + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static string ToWireName(this TapDirection direction) +``` + +#### Parameters + + + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/SWAIG/TapDirection.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/TapDirection.cs) + +Line 67. + +## Source + +[`src/SignalWire/SWAIG/TapDirection.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/TapDirection.cs) + +Line 54. diff --git a/fern/products/sdk-reference/dotnet/agents/swml/document/index.mdx b/fern/products/sdk-reference/dotnet/agents/swml/document/index.mdx new file mode 100644 index 0000000000..7fa5caf79b --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/swml/document/index.mdx @@ -0,0 +1,312 @@ +--- +slug: "/reference/dotnet/agents/swml/document" +title: "Document" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.SWML.Document" + parent: "agents.swml" + module: "agents.swml" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Document.cs" + visibility: "public" +--- +# `Document` + +Represents a SWML document containing versioned sections of verb instructions. +Each section holds an ordered list of verb dictionaries that define call-flow logic. + +## Signature + +```dotnet +public class Document +``` + +## Properties + + + SWML document version. + + +## Methods + +### AddRawVerb(string, Dictionary\) + +Append a pre-formatted verb hash to a section. + +#### Signature + +```dotnet +public void AddRawVerb(string section, Dictionary verbHash) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/SWML/Document.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Document.cs) + +Line 80. + +*** + +### AddSection(string) + +Add a new named section. Returns true if created, false if it already existed. + +#### Signature + +```dotnet +public bool AddSection(string name) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/SWML/Document.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Document.cs) + +Line 37. + +*** + +### AddVerb(string, object?) + +Append a verb to the main section. + +#### Signature + +```dotnet +public void AddVerb(string verbName, object? config) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/SWML/Document.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Document.cs) + +Line 64. + +*** + +### AddVerbToSection(string, string, object?) + +Append a verb to a named section. + +#### Signature + +```dotnet +public void AddVerbToSection(string section, string verbName, object? config) +``` + +#### Parameters + + + + + + + +#### Source + +[`src/SignalWire/SWML/Document.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Document.cs) + +Line 70. + +*** + +### ClearSection(string) + +Clear all verbs in a section (keeps the section itself). + +#### Signature + +```dotnet +public void ClearSection(string section) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/SWML/Document.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Document.cs) + +Line 90. + +*** + +### Document() + +#### Signature + +```dotnet +public Document() +``` + +#### Source + +[`src/SignalWire/SWML/Document.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Document.cs) + +Line 29. + +*** + +### GetVerbs(string) + +Get a copy of the verbs for a section. +Returns an empty list if the section does not exist. + +#### Signature + +```dotnet +public List> GetVerbs(string section = "main") +``` + +#### Parameters + + + +#### Returns + +`List>` + +#### Source + +[`src/SignalWire/SWML/Document.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Document.cs) + +Line 54. + +*** + +### HasSection(string) + +Check whether a named section exists. + +#### Signature + +```dotnet +public bool HasSection(string name) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/SWML/Document.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Document.cs) + +Line 48. + +*** + +### Render() + +Compact JSON string. + +#### Signature + +```dotnet +public string Render() +``` + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/SWML/Document.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Document.cs) + +Line 120. + +*** + +### RenderPretty() + +Pretty-printed JSON string. + +#### Signature + +```dotnet +public string RenderPretty() +``` + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/SWML/Document.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Document.cs) + +Line 123. + +*** + +### Reset() + +Reset document to initial state with an empty main section. + +#### Signature + +```dotnet +public void Reset() +``` + +#### Source + +[`src/SignalWire/SWML/Document.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Document.cs) + +Line 99. + +*** + +### ToDict() + +Return document as a dictionary suitable for serialization. + +#### Signature + +```dotnet +public Dictionary ToDict() +``` + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/SWML/Document.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Document.cs) + +Line 110. + +## Source + +[`src/SignalWire/SWML/Document.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Document.cs) + +Line 9. diff --git a/fern/products/sdk-reference/dotnet/agents/swml/index.mdx b/fern/products/sdk-reference/dotnet/agents/swml/index.mdx new file mode 100644 index 0000000000..23279205df --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/swml/index.mdx @@ -0,0 +1,46 @@ +--- +slug: "/reference/dotnet/agents/swml" +title: "swml" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "module" + language: "dotnet" + qualified_name: "agents.swml" + parent: "agents" + module: "agents" +--- +# `swml` + +## Classes + + + + Represents a SWML document containing versioned sections of verb instructions. Each section holds an ordered list of verb dictionaries that define call-flow logic. + + + + Thread-safe singleton that loads the SWML JSON schema from an embedded resource and exposes verb definitions parsed from $defs.SWMLMethod.anyOf. + + + + Validation error raised by SchemaUtils.ValidateVerb when a verb config violates its schema. (Python parity: `signalwire.utils.schema_utils.SchemaValidationError`.) + + + + A SWML service that manages a Document, provides schema-driven verb methods, handles HTTP requests with Basic authentication, and supports routing callbacks. + + + + Configuration options for a SWML service. + + + + + + + + Metadata about a single SWML verb parsed from the schema. + + diff --git a/fern/products/sdk-reference/dotnet/agents/swml/schema-validation-error/index.mdx b/fern/products/sdk-reference/dotnet/agents/swml/schema-validation-error/index.mdx new file mode 100644 index 0000000000..c61ca7da3a --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/swml/schema-validation-error/index.mdx @@ -0,0 +1,66 @@ +--- +slug: "/reference/dotnet/agents/swml/schema-validation-error" +title: "SchemaValidationError" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.SWML.SchemaValidationError" + parent: "agents.swml" + module: "agents.swml" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Schema.cs" + visibility: "public" +--- +# `SchemaValidationError` + +Validation error raised by SchemaUtils.ValidateVerb when a +verb config violates its schema. (Python parity: +`signalwire.utils.schema_utils.SchemaValidationError`.) + +## Signature + +```dotnet +public class SchemaValidationError : Exception, ISerializable +``` + +## Inheritance + +**Extends:** `System.Exception` + +**Implements:** `System.Runtime.Serialization.ISerializable` + +## Properties + + + + + +## Methods + +### SchemaValidationError(string, List\) + +#### Signature + +```dotnet +public SchemaValidationError(string verbName, List errors) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/SWML/Schema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Schema.cs) + +Line 21. + +## Source + +[`src/SignalWire/SWML/Schema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Schema.cs) + +Line 16. diff --git a/fern/products/sdk-reference/dotnet/agents/swml/schema/index.mdx b/fern/products/sdk-reference/dotnet/agents/swml/schema/index.mdx new file mode 100644 index 0000000000..b7b01b482c --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/swml/schema/index.mdx @@ -0,0 +1,245 @@ +--- +slug: "/reference/dotnet/agents/swml/schema" +title: "Schema" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.SWML.Schema" + parent: "agents.swml" + module: "agents.swml" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Schema.cs" + visibility: "public" +--- +# `Schema` + +Thread-safe singleton that loads the SWML JSON schema from an embedded resource +and exposes verb definitions parsed from $defs.SWMLMethod.anyOf. + +**Modifiers:** `sealed` + +## Signature + +```dotnet +public sealed class Schema +``` + +## Properties + + + Thread-safe singleton accessor. + + + + Number of verbs defined in the schema. + + +## Methods + +### GetAllVerbNames() + +Alias of <xref href="SignalWire.SWML.Schema.GetVerbNames" data-throw-if-not-resolved="false"></xref>. (Python parity: +`SchemaUtils.get_all_verb_names`.) + +#### Signature + +```dotnet +public List GetAllVerbNames() +``` + +#### Returns + +`List` + +#### Source + +[`src/SignalWire/SWML/Schema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Schema.cs) + +Line 90. + +*** + +### GetVerb(string) + +Get verb metadata, or null if not found. + +#### Signature + +```dotnet +public VerbInfo? GetVerb(string name) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.SWML.VerbInfo` + +#### Source + +[`src/SignalWire/SWML/Schema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Schema.cs) + +Line 80. + +*** + +### GetVerbNames() + +Get a sorted list of all verb names. + +#### Signature + +```dotnet +public List GetVerbNames() +``` + +#### Returns + +`List` + +#### Source + +[`src/SignalWire/SWML/Schema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Schema.cs) + +Line 72. + +*** + +### GetVerbParameters(string) + +Get the parameter (property) definitions for a verb. +Returns an empty dict when the verb is unknown or has no +`properties`. (Python parity: +`SchemaUtils.get_verb_parameters(verb_name)`.) + +#### Signature + +```dotnet +public Dictionary GetVerbParameters(string verbName) +``` + +#### Parameters + + + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/SWML/Schema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Schema.cs) + +Line 114. + +*** + +### IsValidVerb(string) + +Check whether a verb name is valid. + +#### Signature + +```dotnet +public bool IsValidVerb(string name) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/SWML/Schema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Schema.cs) + +Line 69. + +*** + +### LoadSchemaPublic() + +Public load-schema accessor. Returns the embedded SWML +schema as a Dictionary\. Empty dict +when the schema can't be loaded. (Python parity: +`SchemaUtils.load_schema`.) + +#### Signature + +```dotnet +public Dictionary LoadSchemaPublic() +``` + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/SWML/Schema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Schema.cs) + +Line 96. + +*** + +### Reset() + +Reset the singleton (for testing). + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static void Reset() +``` + +#### Source + +[`src/SignalWire/SWML/Schema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Schema.cs) + +Line 60. + +*** + +### ValidateDocument(Dictionary\) + +Validate a SWML document against the loaded schema. +Returns `(true, [])` on success or `(false, [errors...])` on +failure. Lightweight verb-presence check — full JSON-Schema +validation is out of scope for the bundled SDK. +(Python parity: +`SchemaUtils.validate_document(document) -> (bool, list)`.) + +#### Signature + +```dotnet +public (bool Valid, List Errors) ValidateDocument(Dictionary document) +``` + +#### Parameters + + + +#### Returns + +`System.ValueTuple>` + +#### Source + +[`src/SignalWire/SWML/Schema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Schema.cs) + +Line 137. + +## Source + +[`src/SignalWire/SWML/Schema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Schema.cs) + +Line 33. diff --git a/fern/products/sdk-reference/dotnet/agents/swml/service-options/index.mdx b/fern/products/sdk-reference/dotnet/agents/swml/service-options/index.mdx new file mode 100644 index 0000000000..acb21ad0b4 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/swml/service-options/index.mdx @@ -0,0 +1,46 @@ +--- +slug: "/reference/dotnet/agents/swml/service-options" +title: "ServiceOptions" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.SWML.ServiceOptions" + parent: "agents.swml" + module: "agents.swml" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs" + visibility: "public" +--- +# `ServiceOptions` + +Configuration options for a SWML service. + +**Modifiers:** `sealed` + +## Signature + +```dotnet +public sealed class ServiceOptions +``` + +## Properties + + + + + + + + + + + + + +## Source + +[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) + +Line 18. diff --git a/fern/products/sdk-reference/dotnet/agents/swml/service/index.mdx b/fern/products/sdk-reference/dotnet/agents/swml/service/index.mdx new file mode 100644 index 0000000000..a4c47ed25c --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/swml/service/index.mdx @@ -0,0 +1,895 @@ +--- +slug: "/reference/dotnet/agents/swml/service" +title: "Service" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.SWML.Service" + parent: "agents.swml" + module: "agents.swml" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs" + visibility: "public" +--- +# `Service` + +A SWML service that manages a Document, provides schema-driven verb methods, +handles HTTP requests with Basic authentication, and supports routing callbacks. + +## Signature + +```dotnet +public class Service +``` + +## Properties + + + + + + + + + + + + + + + + + Public read-only view of the SWAIG tool registry — the same data served by /swaig get\_signature, but reachable in-process for introspection (e.g. swaig-test --list-tools against an assembly loaded via reflection). The internal "\_handler" callable is stripped because it isn't meaningful outside this process. This is an SDK accessor, not a new endpoint. Order matches registration order (mirrors ListToolNames). + + +## Methods + +### DefineTool(string, string, Dictionary\, Func\, Dictionary\, FunctionResult>, bool) + +Define a SWAIG function the AI can call. Tool descriptions and +parameter descriptions are LLM-facing prompt engineering — see +PORTING\_GUIDE for guidance on writing them. + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual Service DefineTool(string name, string description, Dictionary parameters, Func, Dictionary, FunctionResult> handler, bool secure = false) +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`SignalWire.SWML.Service` + +#### Source + +[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) + +Line 388. + +*** + +### DefineTools(List\>) + +Register multiple tool definitions at once. + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual Service DefineTools(List> toolDefs) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.SWML.Service` + +#### Source + +[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) + +Line 457. + +*** + +### ExtractSipUsername(Dictionary\?) + +Extract SIP username from a request body. +Validates format: only \[a-zA-Z0-9.\_-], max 64 chars. + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static string? ExtractSipUsername(Dictionary? body) +``` + +#### Parameters + + + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) + +Line 661. + +*** + +### GetAllFunctions() + +Get a snapshot of all registered SWAIG functions +(Python parity: `tool_registry.get_all_functions()` — returns +a copy so subsequent registrations don't mutate the snapshot). + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual Dictionary> GetAllFunctions() +``` + +#### Returns + +`Dictionary>` + +#### Source + +[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) + +Line 442. + +*** + +### GetBasicAuthCredentials() + +Get the Basic Auth credentials as a tuple. + +#### Signature + +```dotnet +public (string User, string Password) GetBasicAuthCredentials() +``` + +#### Returns + +`System.ValueTuple` + +#### Source + +[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) + +Line 173. + +*** + +### GetBasicAuthCredentialsWithSource() + +Get the Basic Auth credentials plus the SOURCE of the +credentials (Python parity: +`get_basic_auth_credentials(include_source=True)`). +Source is one of "provided", "environment", or "generated". + +#### Signature + +```dotnet +public (string User, string Password, string Source) GetBasicAuthCredentialsWithSource() +``` + +#### Returns + +`System.ValueTuple` + +#### Source + +[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) + +Line 182. + +*** + +### GetFullUrl(bool) + +Build the full URL for this service. + +#### Signature + +```dotnet +public string GetFullUrl(bool includeAuth = false) +``` + +#### Parameters + + + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) + +Line 218. + +*** + +### GetFunction(string) + +Get a registered SWAIG function by name, or null +(Python parity: `tool_registry.get_function(name)`). + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual Dictionary? GetFunction(string name) +``` + +#### Parameters + + + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) + +Line 436. + +*** + +### GetProxyUrlBase(Dictionary\?) + +Detect or construct the proxy URL base from request headers. +Priority: SWML\_PROXY\_URL\_BASE env > X-Forwarded-Proto+Host > X-Original-URL > fallback. + +#### Signature + +```dotnet +public string GetProxyUrlBase(Dictionary? headers = null) +``` + +#### Parameters + + + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) + +Line 729. + +*** + +### HandlePostPrompt(Dictionary\?, Dictionary\) + +Handle post-prompt callback. Override in AgentBase. + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +protected virtual (int, Dictionary, string) HandlePostPrompt(Dictionary? requestData, Dictionary headers) +``` + +#### Parameters + + + + + +#### Returns + +`System.ValueTuple,string>` + +#### Source + +[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) + +Line 646. + +*** + +### HandleRequest(string, string, Dictionary\, string?) + +Handle an HTTP request. Returns a tuple of (status, headers, body). + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual (int Status, Dictionary Headers, string Body) HandleRequest(string method, string path, Dictionary headers, string? body) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`System.ValueTuple,string>` + +#### Source + +[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) + +Line 281. + +*** + +### HandleSwaigRequest(string, Dictionary\?, Dictionary\) + +Handle SWAIG function dispatch. + +GET: returns the rendered SWML document (parallel to root /). +POST: parses \{function, argument, call\_id\}, validates, runs the +SwaigPreDispatch hook, calls OnFunctionCall on the chosen target. + +Lifted from AgentBase so non-agent SWMLServices (e.g. ai\_sidecar +host) can serve /swaig without subclassing AgentBase. + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +protected virtual (int, Dictionary, string) HandleSwaigRequest(string method, Dictionary? requestData, Dictionary headers) +``` + +#### Parameters + + + + + + + +#### Returns + +`System.ValueTuple,string>` + +#### Source + +[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) + +Line 551. + +*** + +### HandleSwmlRequest(string, Dictionary\?, Dictionary\) + +Handle SWML document request. + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +protected virtual (int, Dictionary, string) HandleSwmlRequest(string method, Dictionary? requestData, Dictionary headers) +``` + +#### Parameters + + + + + + + +#### Returns + +`System.ValueTuple,string>` + +#### Source + +[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) + +Line 370. + +*** + +### HasFunction(string) + +Check if a SWAIG function is registered +(Python parity: `tool_registry.has_function(name)`). + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual bool HasFunction(string name) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) + +Line 432. + +*** + +### ListToolNames() + +List registered tool names in registration order. + +#### Signature + +```dotnet +public IEnumerable ListToolNames() +``` + +#### Returns + +`IEnumerable` + +#### Source + +[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) + +Line 488. + +*** + +### OnFunctionCall(string, Dictionary\, Dictionary\) + +Dispatch a function call to the registered handler. + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual FunctionResult? OnFunctionCall(string name, Dictionary args, Dictionary rawData) +``` + +#### Parameters + + + + + + + +#### Returns + +`SignalWire.SWAIG.FunctionResult` + +#### Source + +[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) + +Line 467. + +*** + +### OnRequest(Dictionary\?, string?) + +Customization hook called when SWML is requested. +Default delegates to <xref href="SignalWire.SWML.Service.OnSwmlRequest(System.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%2cSystem.String)" data-throw-if-not-resolved="false"></xref>; subclasses +typically override <xref href="SignalWire.SWML.Service.OnSwmlRequest(System.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%2cSystem.String)" data-throw-if-not-resolved="false"></xref> instead of this +method. Return null to use the default SWML rendering, or a +dictionary of modifications to merge in. +(Python parity: `WebMixin.on_request`.) + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual Dictionary? OnRequest(Dictionary? requestData = null, string? callbackPath = null) +``` + +#### Parameters + + + + + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) + +Line 256. + +*** + +### OnSwmlRequest(Dictionary\?, string?) + +Customization hook for subclasses to modify SWML based +on request data. Return null to use default rendering, or a +dictionary of modifications. (Python parity: +`WebMixin.on_swml_request`.) + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual Dictionary? OnSwmlRequest(Dictionary? requestData = null, string? callbackPath = null) +``` + +#### Parameters + + + + + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) + +Line 267. + +*** + +### RegisterRoutingCallback(string, Func\?, Dictionary\, object>) + +Register a callback for a sub-path under the service route. + +#### Signature + +```dotnet +public void RegisterRoutingCallback(string path, Func?, Dictionary, object> callback) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) + +Line 231. + +*** + +### RegisterSwaigFunction(Dictionary\) + +Register a raw SWAIG function definition (e.g. DataMap tools). + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual Service RegisterSwaigFunction(Dictionary funcDef) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.SWML.Service` + +#### Source + +[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) + +Line 415. + +*** + +### RemoveFunction(string) + +Remove a registered SWAIG function. Returns true if +removed, false if not found (Python parity: +`tool_registry.remove_function(name)`). + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual bool RemoveFunction(string name) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) + +Line 448. + +*** + +### RenderSwml() + +Render the SWML document for a request. Override in subclasses to customise. + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual Dictionary RenderSwml() +``` + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) + +Line 245. + +*** + +### Run() + +Start a blocking HTTP(S) server bound to <xref href="SignalWire.SWML.Service.Host" data-throw-if-not-resolved="false"></xref>:<xref href="SignalWire.SWML.Service.Port" data-throw-if-not-resolved="false"></xref>. +Each incoming request is dispatched through <xref href="SignalWire.SWML.Service.HandleRequest(System.String%2cSystem.String%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.String%7d%2cSystem.String)" data-throw-if-not-resolved="false"></xref>; +the response status / headers / body are written back to the client. + +Mirrors Python's SWMLService.run() — examples and the porting-sdk +audit harness call this directly. + +Transport selection mirrors Python's `SecurityConfig` / +uvicorn `ssl_certfile`/`ssl_keyfile` path: + +<ul><li>Plain HTTP uses System.Net.HttpListener (BCL, no extra deps).</li><li>HTTPS (when `SWML_SSL_ENABLED` is truthy and + `SWML_SSL_CERT_PATH`/`SWML_SSL_KEY_PATH` point at a valid + PEM cert+key) uses Kestrel, because HttpListener cannot terminate TLS + on Linux (cert binding requires http.sys / netsh, Windows-only).</li></ul> + +Server stops on Ctrl-C or when the process is killed. + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual void Run() +``` + +#### Source + +[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) + +Line 882. + +*** + +### Service(ServiceOptions) + +#### Signature + +```dotnet +public Service(ServiceOptions options) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) + +Line 66. + +*** + +### Sleep(int, string) + +Add a sleep verb with a duration in milliseconds to the specified section. + +#### Signature + +```dotnet +public Service Sleep(int milliseconds, string section = "main") +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire.SWML.Service` + +#### Source + +[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) + +Line 156. + +*** + +### SwaigPreDispatch(Dictionary\, Dictionary\, string) + +Extension point: invoked between argument parsing and function +dispatch. Returns (target, shortCircuit). When shortCircuit is +non-null, it's returned directly without calling OnFunctionCall. +AgentBase may override to add session-token validation or ephemeral +dynamic-config copies. + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +protected virtual (Service Target, Dictionary? ShortCircuit) SwaigPreDispatch(Dictionary requestData, Dictionary headers, string functionName) +``` + +#### Parameters + + + + + + + +#### Returns + +`System.ValueTuple>` + +#### Source + +[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) + +Line 533. + +*** + +### ValidateBasicAuth(string, string) + +Validate provided basic-auth credentials against the +configured ones (constant-time comparison) +(Python parity: `validate_basic_auth(username, password)`). + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual bool ValidateBasicAuth(string username, string password) +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) + +Line 206. + +*** + +### Verb + +Add a verb to the specified section. Validates the verb name against the schema. +Returns this service for fluent chaining. + +#### Signature + + + + ```dotnet + public Service Verb(string verbName, string section, object? config) + ``` + + + + ```dotnet + public Service Verb(string verbName, object? config) + ``` + + + +#### Parameters (Overload 1) + + + + + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`SignalWire.SWML.Service` + +#### Returns (Overload 2) + +`SignalWire.SWML.Service` + +#### Source + +[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) + +Line 132. + +## Source + +[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) + +Line 32. diff --git a/fern/products/sdk-reference/dotnet/agents/swml/swml-builder/index.mdx b/fern/products/sdk-reference/dotnet/agents/swml/swml-builder/index.mdx new file mode 100644 index 0000000000..4404e08e04 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/swml/swml-builder/index.mdx @@ -0,0 +1,309 @@ +--- +slug: "/reference/dotnet/agents/swml/swml-builder" +title: "SWMLBuilder" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.SWML.SWMLBuilder" + parent: "agents.swml" + module: "agents.swml" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/SWMLBuilder.cs" + visibility: "public" +--- +# `SWMLBuilder` + +## Signature + +```dotnet +public class SWMLBuilder +``` + +## Properties + + + +## Methods + +### AddSection(string) + +Add a section to the underlying document. +(Python parity: `SWMLBuilder.add_section`.) + +#### Signature + +```dotnet +public SWMLBuilder AddSection(string sectionName) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.SWML.SWMLBuilder` + +#### Source + +[`src/SignalWire/SWML/SWMLBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/SWMLBuilder.cs) + +Line 107. + +*** + +### Ai(string?, List\>?, string?, string?, Dictionary\?, Dictionary\?) + +Add an `ai` verb. (Python parity: +`SWMLBuilder.ai(prompt_text, prompt_pom, post_prompt, post_prompt_url, swaig, ...)`.) + +#### Signature + +```dotnet +public SWMLBuilder Ai(string? promptText = null, List>? promptPom = null, string? postPrompt = null, string? postPromptUrl = null, Dictionary? swaig = null, Dictionary? extraParams = null) +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`SignalWire.SWML.SWMLBuilder` + +#### Source + +[`src/SignalWire/SWML/SWMLBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/SWMLBuilder.cs) + +Line 45. + +*** + +### Answer(int?, string?) + +Add an `answer` verb. (Python parity: +`SWMLBuilder.answer(max_duration, codecs)`.) + +#### Signature + +```dotnet +public SWMLBuilder Answer(int? maxDuration = null, string? codecs = null) +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire.SWML.SWMLBuilder` + +#### Source + +[`src/SignalWire/SWML/SWMLBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/SWMLBuilder.cs) + +Line 24. + +*** + +### Build() + +Build the SWML document as a dict. +(Python parity: `SWMLBuilder.build`.) + +#### Signature + +```dotnet +public Dictionary Build() +``` + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/SWML/SWMLBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/SWMLBuilder.cs) + +Line 115. + +*** + +### Hangup(string?) + +Add a `hangup` verb. (Python parity: +`SWMLBuilder.hangup(reason)`.) + +#### Signature + +```dotnet +public SWMLBuilder Hangup(string? reason = null) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.SWML.SWMLBuilder` + +#### Source + +[`src/SignalWire/SWML/SWMLBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/SWMLBuilder.cs) + +Line 35. + +*** + +### Play(string?, List\?, double?, string?, string?, string?) + +Add a `play` verb. (Python parity: +`SWMLBuilder.play(url, urls, volume, say_text, say_voice, say_language)`.) + +#### Signature + +```dotnet +public SWMLBuilder Play(string? url = null, List? urls = null, double? volume = null, string? sayText = null, string? sayVoice = null, string? sayLanguage = null) +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`SignalWire.SWML.SWMLBuilder` + +#### Source + +[`src/SignalWire/SWML/SWMLBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/SWMLBuilder.cs) + +Line 75. + +*** + +### Render() + +Render the SWML document as a JSON string. +(Python parity: `SWMLBuilder.render`.) + +#### Signature + +```dotnet +public string Render() +``` + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/SWML/SWMLBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/SWMLBuilder.cs) + +Line 119. + +*** + +### Reset() + +Reset the underlying document. +(Python parity: `SWMLBuilder.reset`.) + +#### Signature + +```dotnet +public SWMLBuilder Reset() +``` + +#### Returns + +`SignalWire.SWML.SWMLBuilder` + +#### Source + +[`src/SignalWire/SWML/SWMLBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/SWMLBuilder.cs) + +Line 123. + +*** + +### Say(string, string?, string?) + +Add a `say` verb (synthesized speech). +(Python parity: `SWMLBuilder.say(text, voice, language)`.) + +#### Signature + +```dotnet +public SWMLBuilder Say(string text, string? voice = null, string? language = null) +``` + +#### Parameters + + + + + + + +#### Returns + +`SignalWire.SWML.SWMLBuilder` + +#### Source + +[`src/SignalWire/SWML/SWMLBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/SWMLBuilder.cs) + +Line 96. + +*** + +### SWMLBuilder(Service) + +#### Signature + +```dotnet +public SWMLBuilder(Service service) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/SWML/SWMLBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/SWMLBuilder.cs) + +Line 17. + +## Source + +[`src/SignalWire/SWML/SWMLBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/SWMLBuilder.cs) + +Line 13. diff --git a/fern/products/sdk-reference/dotnet/agents/swml/swml-renderer/index.mdx b/fern/products/sdk-reference/dotnet/agents/swml/swml-renderer/index.mdx new file mode 100644 index 0000000000..39d1d5f692 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/swml/swml-renderer/index.mdx @@ -0,0 +1,123 @@ +--- +slug: "/reference/dotnet/agents/swml/swml-renderer" +title: "SwmlRenderer" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.SWML.SwmlRenderer" + parent: "agents.swml" + module: "agents.swml" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/SwmlRenderer.cs" + visibility: "public" +--- +# `SwmlRenderer` + +**Modifiers:** `static` + +## Signature + +```dotnet +public static class SwmlRenderer +``` + +## Methods + +### RenderFunctionResponseSwml(string, Service, List\>?, string) + +Generate a SWML document for a SWAIG function response — +plays the response text and queues any follow-up actions. +(Python parity: `SwmlRenderer.render_function_response_swml`.) + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static string RenderFunctionResponseSwml(string responseText, Service service, List>? actions = null, string format = "json") +``` + +#### Parameters + + + + + + + + + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/SWML/SwmlRenderer.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/SwmlRenderer.cs) + +Line 100. + +*** + +### RenderSwml(object, Service, string?, string?, List\>?, string?, string?, bool, Dictionary\?, bool, bool, string, bool, string, string?) + +Generate a complete SWML document with AI configuration. +(Python parity: `SwmlRenderer.render_swml`.) + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static string RenderSwml(object prompt, Service service, string? postPrompt = null, string? postPromptUrl = null, List>? swaigFunctions = null, string? startupHookUrl = null, string? hangupHookUrl = null, bool promptIsPom = false, Dictionary? @params = null, bool addAnswer = false, bool recordCall = false, string recordFormat = "mp4", bool recordStereo = true, string format = "json", string? defaultWebhookUrl = null) +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/SWML/SwmlRenderer.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/SwmlRenderer.cs) + +Line 21. + +## Source + +[`src/SignalWire/SWML/SwmlRenderer.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/SwmlRenderer.cs) + +Line 17. diff --git a/fern/products/sdk-reference/dotnet/agents/swml/verb-info/index.mdx b/fern/products/sdk-reference/dotnet/agents/swml/verb-info/index.mdx new file mode 100644 index 0000000000..e65383f2c0 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/swml/verb-info/index.mdx @@ -0,0 +1,82 @@ +--- +slug: "/reference/dotnet/agents/swml/verb-info" +title: "VerbInfo" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.SWML.VerbInfo" + parent: "agents.swml" + module: "agents.swml" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Schema.cs" + visibility: "public" +--- +# `VerbInfo` + +Metadata about a single SWML verb parsed from the schema. + +**Modifiers:** `sealed` + +## Signature + +```dotnet +public sealed record VerbInfo : IEquatable +``` + +## Inheritance + +**Implements:** `System.IEquatable` + +## Properties + + + The full JSON schema definition for this verb. + + + + The actual verb name used in SWML documents (e.g. "answer"). + + + + The definition key in the JSON schema (e.g. "Answer"). + + +## Methods + +### VerbInfo(string, string, JsonElement) + +Metadata about a single SWML verb parsed from the schema. + +#### Signature + +```dotnet +public VerbInfo(string Name, string SchemaName, JsonElement Definition) +``` + +#### Parameters + + + The actual verb name used in SWML documents (e.g. "answer"). + + + + The definition key in the JSON schema (e.g. "Answer"). + + + + The full JSON schema definition for this verb. + + +#### Source + +[`src/SignalWire/SWML/Schema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Schema.cs) + +Line 11. + +## Source + +[`src/SignalWire/SWML/Schema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Schema.cs) + +Line 11. diff --git a/fern/products/sdk-reference/dotnet/core/index.mdx b/fern/products/sdk-reference/dotnet/core/index.mdx new file mode 100644 index 0000000000..d7d5108a00 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/core/index.mdx @@ -0,0 +1,22 @@ +--- +slug: "/reference/dotnet/core" +title: "core" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "module" + language: "dotnet" + qualified_name: "core" +--- +# `core` + +## Modules + + + + + + + + diff --git a/fern/products/sdk-reference/dotnet/core/logging/index.mdx b/fern/products/sdk-reference/dotnet/core/logging/index.mdx new file mode 100644 index 0000000000..13c74e6539 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/core/logging/index.mdx @@ -0,0 +1,46 @@ +--- +slug: "/reference/dotnet/core/logging" +title: "logging" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "module" + language: "dotnet" + qualified_name: "core.logging" + parent: "core" + module: "core" +--- +# `logging` + +## Classes + + + + + +## Enums + +### LogLevel + +#### Signature + +```dotnet +public enum LogLevel +``` + +#### Properties + + + + + + + + + +#### Source + +[`src/SignalWire/Logging/Logger.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Logging/Logger.cs) + +Line 2. diff --git a/fern/products/sdk-reference/dotnet/core/logging/logger/index.mdx b/fern/products/sdk-reference/dotnet/core/logging/logger/index.mdx new file mode 100644 index 0000000000..a05f9a9eae --- /dev/null +++ b/fern/products/sdk-reference/dotnet/core/logging/logger/index.mdx @@ -0,0 +1,188 @@ +--- +slug: "/reference/dotnet/core/logging/logger" +title: "Logger" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Logging.Logger" + parent: "core.logging" + module: "core.logging" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Logging/Logger.cs" + visibility: "public" +--- +# `Logger` + +**Modifiers:** `sealed` + +## Signature + +```dotnet +public sealed class Logger +``` + +## Properties + + + + + + + +## Methods + +### Debug(string) + +#### Signature + +```dotnet +public void Debug(string message) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Logging/Logger.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Logging/Logger.cs) + +Line 51. + +*** + +### Error(string) + +#### Signature + +```dotnet +public void Error(string message) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Logging/Logger.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Logging/Logger.cs) + +Line 54. + +*** + +### GetLogger(string) + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static Logger GetLogger(string name = "signalwire") +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Logging.Logger` + +#### Source + +[`src/SignalWire/Logging/Logger.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Logging/Logger.cs) + +Line 30. + +*** + +### Info(string) + +#### Signature + +```dotnet +public void Info(string message) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Logging/Logger.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Logging/Logger.cs) + +Line 52. + +*** + +### Reset() + +Reset all logger instances (for testing). + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static void Reset() +``` + +#### Source + +[`src/SignalWire/Logging/Logger.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Logging/Logger.cs) + +Line 44. + +*** + +### ShouldLog(LogLevel) + +#### Signature + +```dotnet +public bool ShouldLog(LogLevel level) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Logging/Logger.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Logging/Logger.cs) + +Line 49. + +*** + +### Warn(string) + +#### Signature + +```dotnet +public void Warn(string message) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Logging/Logger.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Logging/Logger.cs) + +Line 53. + +## Source + +[`src/SignalWire/Logging/Logger.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Logging/Logger.cs) + +Line 10. diff --git a/fern/products/sdk-reference/dotnet/core/security/index.mdx b/fern/products/sdk-reference/dotnet/core/security/index.mdx new file mode 100644 index 0000000000..881fa19e0c --- /dev/null +++ b/fern/products/sdk-reference/dotnet/core/security/index.mdx @@ -0,0 +1,30 @@ +--- +slug: "/reference/dotnet/core/security" +title: "security" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "module" + language: "dotnet" + qualified_name: "core.security" + parent: "core" + module: "core" +--- +# `security` + +## Classes + + + + Generates and validates HMAC-SHA256 signed session tokens for SWAIG function calls. Each instance holds an independent 32-byte random secret. + + + + HTTP middleware that validates the `X-SignalWire-Signature` header on incoming requests using <xref href="SignalWire.Security.WebhookValidator" data-throw-if-not-resolved="false"></xref>. Designed for the .NET port's HttpListener-based dispatch surface; adapts the same contract Python's FastAPI dependency provides. <p>Use <xref href="SignalWire.Security.WebhookValidationMiddleware.Validate(System.String%2cSystem.String%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.String%7d%2cSystem.String%2cSystem.String%2cSystem.Int32)" data-throw-if-not-resolved="false"></xref> to short-circuit invalid requests with 403 before they reach an agent's POST handler. Returns null on success so the caller continues to dispatch.</p> <p>This is intentionally a non-async type: the underlying validator is pure CPU work and the dispatch surface uses synchronous strings.</p> + + + + Validates SignalWire webhook signatures for both Scheme A (RELAY/JSON, hex HMAC-SHA1 over `url + rawBody`) and Scheme B (Compat/cXML form, base64 HMAC-SHA1 over `url + sortedFormParams`) per `porting-sdk/webhooks.md`. The contract is byte-identical across all SignalWire SDK ports — see the cross-port test vectors in the spec. + + diff --git a/fern/products/sdk-reference/dotnet/core/security/session-manager/index.mdx b/fern/products/sdk-reference/dotnet/core/security/session-manager/index.mdx new file mode 100644 index 0000000000..9b35fca529 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/core/security/session-manager/index.mdx @@ -0,0 +1,158 @@ +--- +slug: "/reference/dotnet/core/security/session-manager" +title: "SessionManager" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Security.SessionManager" + parent: "core.security" + module: "core.security" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Security/SessionManager.cs" + visibility: "public" +--- +# `SessionManager` + +Generates and validates HMAC-SHA256 signed session tokens for SWAIG function calls. +Each instance holds an independent 32-byte random secret. + +**Modifiers:** `sealed` + +## Signature + +```dotnet +public sealed class SessionManager +``` + +## Properties + + + Default token lifetime in seconds. + + + + Get the configured token expiry duration in seconds. + + +## Methods + +### CreateSession(string?) + +Create or confirm a session, returning the call ID. + +#### Signature + +```dotnet +public string CreateSession(string? callId = null) +``` + +#### Parameters + + + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/Security/SessionManager.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Security/SessionManager.cs) + +Line 30. + +*** + +### CreateToken(string, string) + +Generate an HMAC-SHA256 signed token bound to a function name and call ID. + +#### Signature + +```dotnet +public string CreateToken(string functionName, string callId) +``` + +#### Parameters + + + The function name to bind into the token. + + + + The call ID to bind into the token. + + +#### Returns + +`string` — A base64url-encoded token string. + +#### Source + +[`src/SignalWire/Security/SessionManager.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Security/SessionManager.cs) + +Line 41. + +*** + +### SessionManager(int) + +#### Signature + +```dotnet +public SessionManager(int tokenExpirySecs = 3600) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Security/SessionManager.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Security/SessionManager.cs) + +Line 17. + +*** + +### ValidateToken(string, string, string) + +Validate a token against the expected function name and call ID. +All comparisons use timing-safe equality checks to prevent side-channel attacks. + +#### Signature + +```dotnet +public bool ValidateToken(string functionName, string callId, string token) +``` + +#### Parameters + + + The expected function name. + + + + The expected call ID. + + + + The base64url-encoded token to validate. + + +#### Returns + +`bool` — `true` if the token is valid and not expired. + +#### Source + +[`src/SignalWire/Security/SessionManager.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Security/SessionManager.cs) + +Line 61. + +## Source + +[`src/SignalWire/Security/SessionManager.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Security/SessionManager.cs) + +Line 9. diff --git a/fern/products/sdk-reference/dotnet/core/security/webhook-validation-middleware/index.mdx b/fern/products/sdk-reference/dotnet/core/security/webhook-validation-middleware/index.mdx new file mode 100644 index 0000000000..8d618705e1 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/core/security/webhook-validation-middleware/index.mdx @@ -0,0 +1,195 @@ +--- +slug: "/reference/dotnet/core/security/webhook-validation-middleware" +title: "WebhookValidationMiddleware" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Security.WebhookValidationMiddleware" + parent: "core.security" + module: "core.security" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Security/WebhookValidationMiddleware.cs" + visibility: "public" +--- +# `WebhookValidationMiddleware` + +HTTP middleware that validates the `X-SignalWire-Signature` header +on incoming requests using <xref href="SignalWire.Security.WebhookValidator" data-throw-if-not-resolved="false"></xref>. Designed for +the .NET port's HttpListener-based dispatch surface; adapts the same +contract Python's FastAPI dependency provides. + +<p>Use <xref href="SignalWire.Security.WebhookValidationMiddleware.Validate(System.String%2cSystem.String%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.String%7d%2cSystem.String%2cSystem.String%2cSystem.Int32)" data-throw-if-not-resolved="false"></xref> to short-circuit invalid requests with +403 before they reach an agent's POST handler. Returns null on success +so the caller continues to dispatch.</p> + +<p>This is intentionally a non-async type: the underlying validator +is pure CPU work and the dispatch surface uses synchronous strings.</p> + +**Modifiers:** `sealed` + +## Signature + +```dotnet +public sealed class WebhookValidationMiddleware +``` + +## Properties + + + The canonical SignalWire signature header name. + + + + Legacy alias for cXML/Twilio-compat callers. + + +## Methods + +### ExtractSignatureHeader(Dictionary\) + +Pull `X-SignalWire-Signature` from request headers, or the +`X-Twilio-Signature` alias for cXML/Compat callers. Header +lookups are case-insensitive (proxies / browsers vary). + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static string? ExtractSignatureHeader(Dictionary headers) +``` + +#### Parameters + + + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/Security/WebhookValidationMiddleware.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Security/WebhookValidationMiddleware.cs) + +Line 134. + +*** + +### ReconstructUrl(Dictionary\, string, string?, int) + +Reconstruct the public URL SignalWire POSTed to. Resolution order: + +<ol><li>`SWML_PROXY_URL_BASE` env var (joined with path + query).</li><li>`X-Forwarded-Proto` / `X-Forwarded-Host` headers + when `trustProxy=true`.</li><li>`http://hostFallback:portFallback{path}` as a last-resort + local construction.</li></ol> + +#### Signature + +```dotnet +public string ReconstructUrl(Dictionary headers, string path, string? hostFallback = null, int portFallback = 0) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/Security/WebhookValidationMiddleware.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Security/WebhookValidationMiddleware.cs) + +Line 154. + +*** + +### Validate(string, string, Dictionary\, string?, string?, int) + +Validate the incoming request and return a 403 short-circuit +response if the signature is missing / invalid. Returns null when +the request passed validation — caller proceeds to the real handler. + +**Remarks:** The raw body is the caller's <code class="paramref">body</code> string verbatim; +the caller is expected to capture the body once (before any JSON / +form parser consumes the stream) and pass it here. The +HttpListenerContext dispatcher in +`SignalWire.SWML.Service.Run` already does this, so AgentBase +and standalone HttpListener integrations can wire it in directly. + +#### Signature + +```dotnet +public (int Status, Dictionary Headers, string Body)? Validate(string method, string path, Dictionary headers, string? body, string? hostFallback = null, int portFallback = 0) +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`System.Nullable,string>>` + +#### Source + +[`src/SignalWire/Security/WebhookValidationMiddleware.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Security/WebhookValidationMiddleware.cs) + +Line 96. + +*** + +### WebhookValidationMiddleware(string, bool) + +Construct a middleware bound to a single signing key. + +#### Signature + +```dotnet +public WebhookValidationMiddleware(string signingKey, bool trustProxy = false) +``` + +#### Parameters + + + The customer's Signing Key from the SignalWire Dashboard. Required, non-empty. Treated as a secret — never logged or echoed. + + + + When true, honor `X-Forwarded-Proto` / `X-Forwarded-Host` when reconstructing the URL. Default false because proxy headers are spoofable; opt in only when you control the proxy chain. + + +#### Throws + +- `System.ArgumentException` — Thrown when <code class="paramref">signingKey</code> is null or empty. + +#### Source + +[`src/SignalWire/Security/WebhookValidationMiddleware.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Security/WebhookValidationMiddleware.cs) + +Line 73. + +## Source + +[`src/SignalWire/Security/WebhookValidationMiddleware.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Security/WebhookValidationMiddleware.cs) + +Line 47. diff --git a/fern/products/sdk-reference/dotnet/core/security/webhook-validator/index.mdx b/fern/products/sdk-reference/dotnet/core/security/webhook-validator/index.mdx new file mode 100644 index 0000000000..4c462a4874 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/core/security/webhook-validator/index.mdx @@ -0,0 +1,128 @@ +--- +slug: "/reference/dotnet/core/security/webhook-validator" +title: "WebhookValidator" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Security.WebhookValidator" + parent: "core.security" + module: "core.security" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Security/WebhookValidator.cs" + visibility: "public" +--- +# `WebhookValidator` + +Validates SignalWire webhook signatures for both Scheme A (RELAY/JSON, +hex HMAC-SHA1 over `url + rawBody`) and Scheme B (Compat/cXML form, +base64 HMAC-SHA1 over `url + sortedFormParams`) per +`porting-sdk/webhooks.md`. The contract is byte-identical across all +SignalWire SDK ports — see the cross-port test vectors in the spec. + +**Modifiers:** `static` + +## Signature + +```dotnet +public static class WebhookValidator +``` + +## Methods + +### ValidateRequest(string, string?, string, object?) + +Legacy `@signalwire/compatibility-api` drop-in entry point. + +<p>If <code class="paramref">paramsOrRawBody</code> is a <xref href="System.String" data-throw-if-not-resolved="false"></xref>, +delegates to <xref href="SignalWire.Security.WebhookValidator.ValidateWebhookSignature(System.String%2cSystem.String%2cSystem.String%2cSystem.String)" data-throw-if-not-resolved="false"></xref> (Scheme A then +Scheme B with parsed form).</p> + +<p>If it's an <xref href="System.Collections.IDictionary" data-throw-if-not-resolved="false"></xref> or list of key/value pairs, +treats it as pre-parsed form params and runs Scheme B directly (with +URL port normalization).</p> + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static bool ValidateRequest(string signingKey, string? signature, string url, object? paramsOrRawBody) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`bool` + +#### Throws + +- `System.ArgumentException` — Thrown when <code class="paramref">signingKey</code> is null or empty, or when <code class="paramref">paramsOrRawBody</code> is neither a string nor a dictionary/list of params. + +#### Source + +[`src/SignalWire/Security/WebhookValidator.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Security/WebhookValidator.cs) + +Line 147. + +*** + +### ValidateWebhookSignature(string, string?, string, string?) + +Validate a SignalWire webhook signature against both schemes. + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static bool ValidateWebhookSignature(string signingKey, string? signature, string url, string? rawBody) +``` + +#### Parameters + + + Customer's Signing Key from the Dashboard. UTF-8 string, secret. Empty or null raises <xref href="System.ArgumentException" data-throw-if-not-resolved="false"></xref> — that's a programming error, not a validation failure. + + + + The `X-SignalWire-Signature` header value (or `X-Twilio-Signature` for cXML compat). Missing / empty returns `false` without throwing. + + + + The full URL SignalWire POSTed to (scheme, host, optional port, path, query). Must match what the platform saw — see the `URL reconstruction` section of `porting-sdk/webhooks.md`. + + + + The raw request body bytes as a UTF-8 string, BEFORE any JSON / form parsing. Re-serialization breaks the Scheme A digest. + + +#### Returns + +`bool` — `true` if the signature matches either Scheme A (hex JSON) or Scheme B (base64 form, with port-normalization variants and optional bodySHA256 fallback). `false` otherwise. + +#### Throws + +- `System.ArgumentException` — Thrown when <code class="paramref">signingKey</code> is null or empty. + +#### Source + +[`src/SignalWire/Security/WebhookValidator.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Security/WebhookValidator.cs) + +Line 69. + +## Source + +[`src/SignalWire/Security/WebhookValidator.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Security/WebhookValidator.cs) + +Line 34. diff --git a/fern/products/sdk-reference/dotnet/core/utils/execution-mode/index.mdx b/fern/products/sdk-reference/dotnet/core/utils/execution-mode/index.mdx new file mode 100644 index 0000000000..244b3bef3e --- /dev/null +++ b/fern/products/sdk-reference/dotnet/core/utils/execution-mode/index.mdx @@ -0,0 +1,84 @@ +--- +slug: "/reference/dotnet/core/utils/execution-mode" +title: "ExecutionMode" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Utils.ExecutionMode" + parent: "core.utils" + module: "core.utils" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Utils/ExecutionMode.cs" + visibility: "public" +--- +# `ExecutionMode` + +**Modifiers:** `static` + +## Signature + +```dotnet +public static class ExecutionMode +``` + +## Methods + +### GetExecutionMode() + +Returns the execution-mode string — +`"server"` (default), `"cgi"`, `"lambda"`, +`"google_cloud_function"`, `"azure_function"`. +(Python parity: +`signalwire.core.logging_config.get_execution_mode`.) + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static string GetExecutionMode() +``` + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/Utils/ExecutionMode.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Utils/ExecutionMode.cs) + +Line 19. + +*** + +### IsServerlessMode() + +True when running in any serverless environment +(anything other than `"server"`). (Python parity: +`signalwire.utils.is_serverless_mode`.) + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static bool IsServerlessMode() +``` + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Utils/ExecutionMode.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Utils/ExecutionMode.cs) + +Line 44. + +## Source + +[`src/SignalWire/Utils/ExecutionMode.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Utils/ExecutionMode.cs) + +Line 12. diff --git a/fern/products/sdk-reference/dotnet/core/utils/index.mdx b/fern/products/sdk-reference/dotnet/core/utils/index.mdx new file mode 100644 index 0000000000..28f8757df1 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/core/utils/index.mdx @@ -0,0 +1,22 @@ +--- +slug: "/reference/dotnet/core/utils" +title: "utils" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "module" + language: "dotnet" + qualified_name: "core.utils" + parent: "core" + module: "core" +--- +# `utils` + +## Classes + + + + + + diff --git a/fern/products/sdk-reference/dotnet/core/utils/url-validator/index.mdx b/fern/products/sdk-reference/dotnet/core/utils/url-validator/index.mdx new file mode 100644 index 0000000000..07b1aff46d --- /dev/null +++ b/fern/products/sdk-reference/dotnet/core/utils/url-validator/index.mdx @@ -0,0 +1,97 @@ +--- +slug: "/reference/dotnet/core/utils/url-validator" +title: "UrlValidator" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Utils.UrlValidator" + parent: "core.utils" + module: "core.utils" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Utils/UrlValidator.cs" + visibility: "public" +--- +# `UrlValidator` + +**Modifiers:** `static` + +## Signature + +```dotnet +public static class UrlValidator +``` + +## Methods + +### ValidateUrl(string, bool) + +Validate that a URL is safe to fetch (not pointing to +private/internal resources). Returns true when safe, false when +rejected. (Python parity: +`signalwire.utils.url_validator.validate_url(url, allow_private)`.) + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static bool ValidateUrl(string url, bool allowPrivate = false) +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Utils/UrlValidator.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Utils/UrlValidator.cs) + +Line 20. + +*** + +### ValidateUrlWithResolvedAddresses(string, IPAddress\[], bool) + +Test-friendly overload that accepts already-resolved IPs +instead of doing a live DNS lookup. Cross-language audit / unit +tests use this to exercise the blocked-range logic deterministically. + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static bool ValidateUrlWithResolvedAddresses(string url, IPAddress[] resolvedAddresses, bool allowPrivate = false) +``` + +#### Parameters + + + + + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Utils/UrlValidator.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Utils/UrlValidator.cs) + +Line 79. + +## Source + +[`src/SignalWire/Utils/UrlValidator.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Utils/UrlValidator.cs) + +Line 14. diff --git a/fern/products/sdk-reference/dotnet/index.mdx b/fern/products/sdk-reference/dotnet/index.mdx index 67841e84c8..67cd9dd263 100644 --- a/fern/products/sdk-reference/dotnet/index.mdx +++ b/fern/products/sdk-reference/dotnet/index.mdx @@ -10,21 +10,8 @@ lustri: ## Modules -- [`SignalWire.Agent`](/docs/sdk-reference/reference/dotnet/signal-wire.agent) -- [`SignalWire.Contexts`](/docs/sdk-reference/reference/dotnet/signal-wire.contexts) -- [`SignalWire.DataMap`](/docs/sdk-reference/reference/dotnet/signal-wire.data-map) -- [`SignalWire.Logging`](/docs/sdk-reference/reference/dotnet/signal-wire.logging) -- [`SignalWire.POM`](/docs/sdk-reference/reference/dotnet/signal-wire.pom) -- [`SignalWire.Prefabs`](/docs/sdk-reference/reference/dotnet/signal-wire.prefabs) -- [`SignalWire.Relay`](/docs/sdk-reference/reference/dotnet/signal-wire.relay) -- [`SignalWire.REST`](/docs/sdk-reference/reference/dotnet/signal-wire.rest) -- [`SignalWire.REST.Namespaces`](/docs/sdk-reference/reference/dotnet/signal-wire.rest.namespaces) -- [`SignalWire.Security`](/docs/sdk-reference/reference/dotnet/signal-wire.security) -- [`SignalWire.Server`](/docs/sdk-reference/reference/dotnet/signal-wire.server) -- [`SignalWire.Serverless`](/docs/sdk-reference/reference/dotnet/signal-wire.serverless) -- [`SignalWire.Skills`](/docs/sdk-reference/reference/dotnet/signal-wire.skills) -- [`SignalWire.Skills.Builtin`](/docs/sdk-reference/reference/dotnet/signal-wire.skills.builtin) -- [`SignalWire.SWAIG`](/docs/sdk-reference/reference/dotnet/signal-wire.swaig) -- [`SignalWire.SWML`](/docs/sdk-reference/reference/dotnet/signal-wire.swml) -- [`SignalWire.Utils`](/docs/sdk-reference/reference/dotnet/signal-wire.utils) +- [`agents`](/docs/sdk-reference/reference/dotnet/agents) +- [`core`](/docs/sdk-reference/reference/dotnet/core) +- [`relay`](/docs/sdk-reference/reference/dotnet/relay) +- [`rest`](/docs/sdk-reference/reference/dotnet/rest) diff --git a/fern/products/sdk-reference/dotnet/relay/action/index.mdx b/fern/products/sdk-reference/dotnet/relay/action/index.mdx new file mode 100644 index 0000000000..6ccdf78e00 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/relay/action/index.mdx @@ -0,0 +1,367 @@ +--- +slug: "/reference/dotnet/relay/action" +title: "Action" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Relay.Action" + parent: "relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs" + visibility: "public" +--- +# `Action` + +Base class for all RELAY call actions (play, record, collect, etc.). + +An Action is the client-side handle returned when you start an +asynchronous operation on a call. It accumulates events, tracks +state, and resolves once the operation reaches a terminal state. + +Uses <xref href="System.Threading.Tasks.TaskCompletionSource" data-throw-if-not-resolved="false"></xref> for native async/await support. + +## Signature + +```dotnet +public class Action +``` + +## Properties + + + + + + + + + + + + + + + + + + + + + +## Methods + +### AcceptsTerminalEvent(string) + +Subclasses may filter which event types can resolve this action via +the standard terminal-state path. Default: any event type registered +in <xref href="SignalWire.Relay.Constants.ActionTerminalStates" data-throw-if-not-resolved="false"></xref> may resolve. + +Override returns false to block resolution for a specific event type +(e.g. CollectAction blocks `calling.call.play` so the play +phase of `play_and_collect` doesn't resolve the collect side). + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual bool AcceptsTerminalEvent(string eventType) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 126. + +*** + +### Action(string, string, string, object) + +#### Signature + +```dotnet +public Action(string controlId, string callId, string nodeId, object client) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 30. + +*** + +### ExecuteSubcommand(string, Dictionary\?) + +Send a sub-command RPC through the client. +The payload always includes control\_id, call\_id, and node\_id. + +#### Signature + +```dotnet +public void ExecuteSubcommand(string method, Dictionary? extraParams = null) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 171. + +*** + +### GetCallId() + +#### Signature + +```dotnet +public string GetCallId() +``` + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 66. + +*** + +### GetControlId() + +#### Signature + +```dotnet +public string GetControlId() +``` + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 65. + +*** + +### GetNodeId() + +#### Signature + +```dotnet +public string GetNodeId() +``` + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 67. + +*** + +### GetStopMethod() + +Return the RELAY RPC method that stops this action. +Subclasses MUST override to return the correct method name. + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual string GetStopMethod() +``` + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 165. + +*** + +### HandleEvent(Event) + +Append an incoming event and update local state / payload. + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual void HandleEvent(Event evt) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 102. + +*** + +### OnCompleted + +Register a callback to fire when the action completes. +If the action is already done the callback fires immediately. + +#### Signature + + + + ```dotnet + public Action OnCompleted(Func callback) + ``` + + + + ```dotnet + public Action OnCompleted(Action callback) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`SignalWire.Relay.Action` + +#### Returns (Overload 2) + +`SignalWire.Relay.Action` + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 77. + +*** + +### Resolve(object?) + +Mark this action as completed. The optional result is stored and the +onCompleted callback fires exactly once. + +#### Signature + +```dotnet +public void Resolve(object? result = null) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 136. + +*** + +### Stop() + +Stop the running action by sending its stop sub-command. + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual void Stop() +``` + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 152. + +*** + +### WaitAsync(int) + +Await until the action completes or the timeout elapses. +Returns the resolved result, or null on timeout. + +#### Signature + +```dotnet +public Task WaitAsync(int timeoutSeconds = 30) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task` + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 46. + +## Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 13. diff --git a/fern/products/sdk-reference/dotnet/relay/ai-action/index.mdx b/fern/products/sdk-reference/dotnet/relay/ai-action/index.mdx new file mode 100644 index 0000000000..f71334d0d7 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/relay/ai-action/index.mdx @@ -0,0 +1,85 @@ +--- +slug: "/reference/dotnet/relay/ai-action" +title: "AIAction" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Relay.AIAction" + parent: "relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs" + visibility: "public" +--- +# `AIAction` + +Handle for calling.ai operations. + +## Signature + +```dotnet +public class AIAction : Action +``` + +## Inheritance + +**Extends:** [SignalWire.Relay.Action](/docs/sdk-reference/reference/dotnet/relay/action) + +## Methods + +### AIAction(string, string, string, object) + +#### Signature + +```dotnet +public AIAction(string controlId, string callId, string nodeId, object client) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 402. + +*** + +### GetStopMethod() + +Return the RELAY RPC method that stops this action. +Subclasses MUST override to return the correct method name. + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override string GetStopMethod() +``` + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 405. + +## Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 400. diff --git a/fern/products/sdk-reference/dotnet/relay/call-state-extensions/index.mdx b/fern/products/sdk-reference/dotnet/relay/call-state-extensions/index.mdx new file mode 100644 index 0000000000..76b086cf7b --- /dev/null +++ b/fern/products/sdk-reference/dotnet/relay/call-state-extensions/index.mdx @@ -0,0 +1,121 @@ +--- +slug: "/reference/dotnet/relay/call-state-extensions" +title: "CallStateExtensions" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Relay.CallStateExtensions" + parent: "relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/CallState.cs" + visibility: "public" +--- +# `CallStateExtensions` + +Wire-string mapping, parsing, and terminal-state predicate for <xref href="SignalWire.Relay.CallState" data-throw-if-not-resolved="false"></xref>. + +**Modifiers:** `static` + +## Signature + +```dotnet +public static class CallStateExtensions +``` + +## Methods + +### IsTerminal(CallState) + +True when this state is terminal (the call has fully ended). Mirrors <xref href="SignalWire.Relay.Constants.CallTerminalStates" data-throw-if-not-resolved="false"></xref> — terminal = `ended`. + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static bool IsTerminal(this CallState state) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Relay/CallState.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/CallState.cs) + +Line 78. + +*** + +### ToWireName(CallState) + +The canonical wire string for this call state (e.g. "answered"). + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static string ToWireName(this CallState state) +``` + +#### Parameters + + + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/Relay/CallState.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/CallState.cs) + +Line 69. + +*** + +### TryParse(string?, out CallState) + +Parse a wire string into a <xref href="SignalWire.Relay.CallState" data-throw-if-not-resolved="false"></xref>. Returns +`false` (and `default`) for an unrecognised value — the +server may introduce new states, so callers fall back to the raw +string on <xref href="SignalWire.Relay.Call.State" data-throw-if-not-resolved="false"></xref> rather than crashing. + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static bool TryParse(string? wire, out CallState state) +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Relay/CallState.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/CallState.cs) + +Line 87. + +## Source + +[`src/SignalWire/Relay/CallState.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/CallState.cs) + +Line 54. diff --git a/fern/products/sdk-reference/dotnet/relay/call/index.mdx b/fern/products/sdk-reference/dotnet/relay/call/index.mdx new file mode 100644 index 0000000000..b39609a55f --- /dev/null +++ b/fern/products/sdk-reference/dotnet/relay/call/index.mdx @@ -0,0 +1,1462 @@ +--- +slug: "/reference/dotnet/relay/call" +title: "Call" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Relay.Call" + parent: "relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs" + visibility: "public" +--- +# `Call` + +Represents a RELAY voice call. + +Holds call-level state, dispatches server events to registered listeners +and to in-flight Action objects, and exposes every calling.\* RPC method +as a first-class C# method. + +## Signature + +```dotnet +public class Call +``` + +## Properties + + + controlId => Action + + + + + + The current call lifecycle state as the typed <xref href="SignalWire.Relay.CallState" data-throw-if-not-resolved="false"></xref> enum, parsed from <xref href="SignalWire.Relay.Call.State" data-throw-if-not-resolved="false"></xref>. Returns `null` when <xref href="SignalWire.Relay.Call.State" data-throw-if-not-resolved="false"></xref> is an unrecognised (e.g. newly-introduced server) value — read <xref href="SignalWire.Relay.Call.State" data-throw-if-not-resolved="false"></xref> for the raw string in that case. This is a typed convenience alongside the parity-bearing string <xref href="SignalWire.Relay.Call.State" data-throw-if-not-resolved="false"></xref>; it always agrees with it for known states. + + + + + + + + + + + + + + + + + + User-registered event callbacks (catch-all). + + + + + + + + + + Per-event-type listeners registered via <xref href="SignalWire.Relay.Call.On(System.String%2cSystem.Action%7bSignalWire.Relay.Event%7d)" data-throw-if-not-resolved="false"></xref>. + + +## Methods + +### AI(Dictionary\?) + +#### Signature + +```dotnet +public AIAction AI(Dictionary? extra = null) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Relay.AIAction` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 329. + +*** + +### AiHoldAsync() + +#### Signature + +```dotnet +public Task> AiHoldAsync() +``` + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 271. + +*** + +### AiMessageAsync(Dictionary\?) + +#### Signature + +```dotnet +public Task> AiMessageAsync(Dictionary? extra = null) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 268. + +*** + +### AiUnholdAsync() + +#### Signature + +```dotnet +public Task> AiUnholdAsync() +``` + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 274. + +*** + +### AmazonBedrockAsync(Dictionary\?) + +#### Signature + +```dotnet +public Task> AmazonBedrockAsync(Dictionary? extra = null) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 265. + +*** + +### AnswerAsync() + +#### Signature + +```dotnet +public Task> AnswerAsync() +``` + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 208. + +*** + +### BindDigitAsync(Dictionary\?) + +#### Signature + +```dotnet +public Task> BindDigitAsync(Dictionary? extra = null) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 247. + +*** + +### Call(Dictionary\, Client) + +#### Signature + +```dotnet +public Call(Dictionary params_, Client client) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 57. + +*** + +### ClearDigitBindingsAsync() + +#### Signature + +```dotnet +public Task> ClearDigitBindingsAsync() +``` + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 250. + +*** + +### Collect(Dictionary\?) + +#### Signature + +```dotnet +public CollectAction Collect(Dictionary? extra = null) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Relay.CollectAction` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 302. + +*** + +### ConnectAsync(Dictionary\?) + +#### Signature + +```dotnet +public Task> ConnectAsync(Dictionary? extra = null) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 217. + +*** + +### DenoiseAsync() + +#### Signature + +```dotnet +public Task> DenoiseAsync() +``` + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 229. + +*** + +### DenoiseStopAsync() + +#### Signature + +```dotnet +public Task> DenoiseStopAsync() +``` + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 232. + +*** + +### Detect(Dictionary\?) + +#### Signature + +```dotnet +public DetectAction Detect(Dictionary? extra = null) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Relay.DetectAction` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 308. + +*** + +### DetectAnsweringMachine(double?, double?, double?, int?, bool?, bool?, double?, Action\?) + +Detect human vs answering machine (AMD). Typed convenience over <xref href="SignalWire.Relay.Call.Detect(System.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d)" data-throw-if-not-resolved="false"></xref>. + +#### Signature + +```dotnet +public DetectAction DetectAnsweringMachine(double? initialTimeout = null, double? endSilenceTimeout = null, double? machineVoiceThreshold = null, int? machineWordsThreshold = null, bool? detectInterruptions = null, bool? detectMessageEnd = null, double? timeout = null, Action? onCompleted = null) +``` + +#### Parameters + + + + + + + + + + + + + + + + + +#### Returns + +`SignalWire.Relay.DetectAction` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 454. + +*** + +### DetectDigit(string?, double?, Action\?) + +Detect DTMF digits. Typed convenience over <xref href="SignalWire.Relay.Call.Detect(System.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d)" data-throw-if-not-resolved="false"></xref>. + +#### Signature + +```dotnet +public DetectAction DetectDigit(string? digits = null, double? timeout = null, Action? onCompleted = null) +``` + +#### Parameters + + + + + + + +#### Returns + +`SignalWire.Relay.DetectAction` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 434. + +*** + +### DetectFax(string?, double?, Action\?) + +Detect a fax tone (CED/CNG). Typed convenience over <xref href="SignalWire.Relay.Call.Detect(System.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d)" data-throw-if-not-resolved="false"></xref>. + +#### Signature + +```dotnet +public DetectAction DetectFax(string? tone = null, double? timeout = null, Action? onCompleted = null) +``` + +#### Parameters + + + + + + + +#### Returns + +`SignalWire.Relay.DetectAction` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 484. + +*** + +### DisconnectAsync() + +#### Signature + +```dotnet +public Task> DisconnectAsync() +``` + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 220. + +*** + +### DispatchEvent(Event) + +Central event router invoked by the Client whenever a server event +targets this call. + +#### Signature + +```dotnet +public void DispatchEvent(Event evt) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 84. + +*** + +### EchoAsync() + +#### Signature + +```dotnet +public Task> EchoAsync() +``` + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 244. + +*** + +### HangupAsync(string) + +#### Signature + +```dotnet +public Task> HangupAsync(string reason = "hangup") +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 211. + +*** + +### HoldAsync() + +#### Signature + +```dotnet +public Task> HoldAsync() +``` + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 223. + +*** + +### JoinConferenceAsync(Dictionary\?) + +#### Signature + +```dotnet +public Task> JoinConferenceAsync(Dictionary? extra = null) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 238. + +*** + +### JoinRoomAsync(Dictionary\?) + +#### Signature + +```dotnet +public Task> JoinRoomAsync(Dictionary? extra = null) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 259. + +*** + +### LeaveConferenceAsync() + +#### Signature + +```dotnet +public Task> LeaveConferenceAsync() +``` + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 241. + +*** + +### LeaveRoomAsync() + +#### Signature + +```dotnet +public Task> LeaveRoomAsync() +``` + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 262. + +*** + +### LiveTranscribeAsync(Dictionary\?) + +#### Signature + +```dotnet +public Task> LiveTranscribeAsync(Dictionary? extra = null) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 253. + +*** + +### LiveTranslateAsync(Dictionary\?) + +#### Signature + +```dotnet +public Task> LiveTranslateAsync(Dictionary? extra = null) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 256. + +*** + +### On + +Register a generic event listener on this call. + +#### Signature + + + + ```dotnet + public Call On(Action callback) + ``` + + + + ```dotnet + public Call On(string eventType, Action callback) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`SignalWire.Relay.Call` + +#### Returns (Overload 2) + +`SignalWire.Relay.Call` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 173. + +*** + +### PassAsync() + +#### Signature + +```dotnet +public Task> PassAsync() +``` + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 214. + +*** + +### Pay(Dictionary\?) + +#### Signature + +```dotnet +public PayAction Pay(Dictionary? extra = null) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Relay.PayAction` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 323. + +*** + +### Play(Dictionary\?) + +#### Signature + +```dotnet +public PlayAction Play(Dictionary? extra = null) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Relay.PlayAction` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 296. + +*** + +### PlayAndCollect(Dictionary\?) + +#### Signature + +```dotnet +public CollectAction PlayAndCollect(Dictionary? extra = null) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Relay.CollectAction` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 305. + +*** + +### PlayAudio(string, double?, Action\?) + +Play an audio file from a URL. Typed convenience over <xref href="SignalWire.Relay.Call.Play(System.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d)" data-throw-if-not-resolved="false"></xref>. + +#### Signature + +```dotnet +public PlayAction PlayAudio(string url, double? volume = null, Action? onCompleted = null) +``` + +#### Parameters + + + + + + + +#### Returns + +`SignalWire.Relay.PlayAction` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 366. + +*** + +### PlayRingtone(string, double?, double?, Action\?) + +Play a named ringtone by country code. Typed convenience over <xref href="SignalWire.Relay.Call.Play(System.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d)" data-throw-if-not-resolved="false"></xref>. + +#### Signature + +```dotnet +public PlayAction PlayRingtone(string name, double? duration = null, double? volume = null, Action? onCompleted = null) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`SignalWire.Relay.PlayAction` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 406. + +*** + +### PlaySilence(double, Action\?) + +Play silence for <code class="paramref">duration</code> seconds. Typed convenience over <xref href="SignalWire.Relay.Call.Play(System.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d)" data-throw-if-not-resolved="false"></xref>. + +#### Signature + +```dotnet +public PlayAction PlaySilence(double duration, Action? onCompleted = null) +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire.Relay.PlayAction` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 387. + +*** + +### PlayTts(string, string?, string?, string?, double?, Action\?) + +Play text-to-speech. Typed convenience over <xref href="SignalWire.Relay.Call.Play(System.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d)" data-throw-if-not-resolved="false"></xref>. + +#### Signature + +```dotnet +public PlayAction PlayTts(string text, string? language = null, string? gender = null, string? voice = null, double? volume = null, Action? onCompleted = null) +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`SignalWire.Relay.PlayAction` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 342. + +*** + +### PromptAudio(string, Dictionary\, double?, Action\?) + +Play an audio file then collect input. Typed media over <xref href="SignalWire.Relay.Call.PlayAndCollect(System.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d)" data-throw-if-not-resolved="false"></xref>. + +#### Signature + +```dotnet +public CollectAction PromptAudio(string url, Dictionary collect, double? volume = null, Action? onCompleted = null) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`SignalWire.Relay.CollectAction` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 537. + +*** + +### PromptTts(string, Dictionary\, string?, string?, string?, double?, Action\?) + +Play TTS then collect input. Typed media over <xref href="SignalWire.Relay.Call.PlayAndCollect(System.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d)" data-throw-if-not-resolved="false"></xref>. + +#### Signature + +```dotnet +public CollectAction PromptTts(string text, Dictionary collect, string? language = null, string? gender = null, string? voice = null, double? volume = null, Action? onCompleted = null) +``` + +#### Parameters + + + + + + + + + + + + + + + +#### Returns + +`SignalWire.Relay.CollectAction` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 511. + +*** + +### QueueEnterAsync(Dictionary\?) + +#### Signature + +```dotnet +public Task> QueueEnterAsync(Dictionary? extra = null) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 280. + +*** + +### QueueLeaveAsync() + +#### Signature + +```dotnet +public Task> QueueLeaveAsync() +``` + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 283. + +*** + +### ReceiveFax(Dictionary\?) + +#### Signature + +```dotnet +public FaxAction ReceiveFax(Dictionary? extra = null) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Relay.FaxAction` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 314. + +*** + +### Record(Dictionary\?) + +#### Signature + +```dotnet +public RecordAction Record(Dictionary? extra = null) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Relay.RecordAction` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 299. + +*** + +### ReferAsync(Dictionary\?) + +#### Signature + +```dotnet +public Task> ReferAsync(Dictionary? extra = null) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 286. + +*** + +### ResolveAllActions() + +Mark every outstanding action as completed. +Called when the call enters a terminal state (ended). + +#### Signature + +```dotnet +public void ResolveAllActions() +``` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 195. + +*** + +### SendDigitsAsync(Dictionary\?) + +#### Signature + +```dotnet +public Task> SendDigitsAsync(Dictionary? extra = null) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 289. + +*** + +### SendFax(Dictionary\?) + +#### Signature + +```dotnet +public FaxAction SendFax(Dictionary? extra = null) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Relay.FaxAction` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 311. + +*** + +### Stream(Dictionary\?) + +#### Signature + +```dotnet +public StreamAction Stream(Dictionary? extra = null) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Relay.StreamAction` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 320. + +*** + +### Tap(Dictionary\?) + +#### Signature + +```dotnet +public TapAction Tap(Dictionary? extra = null) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Relay.TapAction` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 317. + +*** + +### Transcribe(Dictionary\?) + +#### Signature + +```dotnet +public TranscribeAction Transcribe(Dictionary? extra = null) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Relay.TranscribeAction` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 326. + +*** + +### TransferAsync(Dictionary\?) + +#### Signature + +```dotnet +public Task> TransferAsync(Dictionary? extra = null) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 235. + +*** + +### UnholdAsync() + +#### Signature + +```dotnet +public Task> UnholdAsync() +``` + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 226. + +*** + +### UserEventAsync(Dictionary\?) + +#### Signature + +```dotnet +public Task> UserEventAsync(Dictionary? extra = null) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 277. + +*** + +### WaitForAnsweredAsync(double?) + +Wait until the call is answered (immediate if already answered or past it). + +#### Signature + +```dotnet +public Task WaitForAnsweredAsync(double? timeout = null) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 645. + +*** + +### WaitForEndingAsync(double?) + +Wait until the call is ending (immediate if already ending or past it). + +#### Signature + +```dotnet +public Task WaitForEndingAsync(double? timeout = null) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 653. + +*** + +### WaitForRingingAsync(double?) + +Wait until the call is ringing (immediate if already ringing or past it). + +#### Signature + +```dotnet +public Task WaitForRingingAsync(double? timeout = null) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task` + +#### Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 649. + +## Source + +[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) + +Line 11. diff --git a/fern/products/sdk-reference/dotnet/relay/client/index.mdx b/fern/products/sdk-reference/dotnet/relay/client/index.mdx new file mode 100644 index 0000000000..c04d7b464f --- /dev/null +++ b/fern/products/sdk-reference/dotnet/relay/client/index.mdx @@ -0,0 +1,651 @@ +--- +slug: "/reference/dotnet/relay/client" +title: "Client" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Relay.Client" + parent: "relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs" + visibility: "public" +--- +# `Client` + +RELAY Client -- manages the WebSocket connection to SignalWire, sends +JSON-RPC 2.0 requests, and dispatches inbound events to the correct +Call or Message objects. + +Uses async/await with <xref href="System.Threading.Tasks.TaskCompletionSource" data-throw-if-not-resolved="false"></xref> for the +native C# async pattern instead of polling loops. + +## Signature + +```dotnet +public class Client : IAsyncDisposable +``` + +## Inheritance + +**Implements:** `System.IAsyncDisposable` + +## Properties + + + + + + + callId => Call. + + + + + + + + + + Messages received from the transport layer. Test code can enqueue here. + + + + messageId => Message. + + + + + + + + Inbound message handler. Mirrors Python's `@client.on_message`: fires with a fully-formed <xref href="SignalWire.Relay.Message" data-throw-if-not-resolved="false"></xref> for every `messaging.receive` event. + + + + JSON-RPC id => pending request TCS. + + + + tag => pending dial TCS. + + + + + + + + + + + + +## Methods + +### AuthenticateAsync(CancellationToken) + +Send the signalwire.connect RPC to authenticate. + +#### Signature + +```dotnet +public Task AuthenticateAsync(CancellationToken cancellationToken = default) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task` + +#### Source + +[`src/SignalWire/Relay/Client.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs) + +Line 173. + +*** + +### BuildWebSocketUri() + +Build the full WebSocket URL: <xref href="SignalWire.Relay.Client.Scheme" data-throw-if-not-resolved="false"></xref>://<xref href="SignalWire.Relay.Client.Host" data-throw-if-not-resolved="false"></xref>/api/relay/ws. + +#### Signature + +```dotnet +public Uri BuildWebSocketUri() +``` + +#### Returns + +`System.Uri` + +#### Source + +[`src/SignalWire/Relay/Client.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs) + +Line 121. + +*** + +### Client(Dictionary\?) + +#### Signature + +```dotnet +public Client(Dictionary? options = null) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Relay/Client.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs) + +Line 90. + +*** + +### ConnectAsync(CancellationToken) + +Establish the WebSocket connection and authenticate. Opens a real +WSS connection to the configured host, runs the JSON-RPC +`signalwire.connect` handshake, and starts the reader loop +that pumps inbound frames into <xref href="SignalWire.Relay.Client.HandleMessage(System.String)" data-throw-if-not-resolved="false"></xref>. + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual Task ConnectAsync(CancellationToken cancellationToken = default) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task` + +#### Source + +[`src/SignalWire/Relay/Client.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs) + +Line 137. + +*** + +### DialAsync(Dictionary\, CancellationToken) + +Originate an outbound call, awaiting until the dial resolves. +Honours `params_["tag"]` when provided; otherwise a UUID is +generated. Honours `params_["dial_timeout"]` (seconds) for the +resolve-or-throw deadline. + +#### Signature + +```dotnet +public Task DialAsync(Dictionary params_, CancellationToken cancellationToken = default) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task` + +#### Source + +[`src/SignalWire/Relay/Client.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs) + +Line 769. + +*** + +### Disconnect() + +Gracefully close the connection. + +#### Signature + +```dotnet +public void Disconnect() +``` + +#### Source + +[`src/SignalWire/Relay/Client.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs) + +Line 229. + +*** + +### DisposeAsync() + +Asynchronously release the connection and all owned IDisposables — +the WebSocket (`_ws`), the lifetime token source (`_cts`), +and the send lock (`_sendLock`). This is the .NET analogue of +Python's `__aexit__`: `await using var client = ...;` closes +the socket and frees the handles deterministically instead of leaking +them until finalization. Idempotent. + +<p>Closes gracefully when the socket is still open (best-effort +close handshake), cancels the reader loop, waits briefly for it to +unwind, then disposes every owned resource.</p> + +#### Signature + +```dotnet +public ValueTask DisposeAsync() +``` + +#### Returns + +`System.Threading.Tasks.ValueTask` + +#### Source + +[`src/SignalWire/Relay/Client.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs) + +Line 276. + +*** + +### ExecuteAsync(string, Dictionary\?, CancellationToken) + +Send a JSON-RPC request and await the matching response. +Returns the "result" portion of the response. + +#### Signature + +```dotnet +public Task> ExecuteAsync(string method, Dictionary? params_ = null, CancellationToken cancellationToken = default) +``` + +#### Parameters + + + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/Relay/Client.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs) + +Line 475. + +*** + +### GetCall(string) + +#### Signature + +```dotnet +public Call? GetCall(string callId) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Relay.Call` + +#### Source + +[`src/SignalWire/Relay/Client.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs) + +Line 910. + +*** + +### HandleEvent(Dictionary\) + +Route a signalwire.event payload to the appropriate handler. + +#### Signature + +```dotnet +public void HandleEvent(Dictionary outerParams) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Relay/Client.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs) + +Line 644. + +*** + +### HandleMessage(string) + +Parse a raw JSON string from the server and route it. + +#### Signature + +```dotnet +public void HandleMessage(string raw) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Relay/Client.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs) + +Line 582. + +*** + +### OnCall(Func\) + +Register a handler for inbound calls. + +#### Signature + +```dotnet +public Client OnCall(Func callback) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Relay.Client` + +#### Source + +[`src/SignalWire/Relay/Client.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs) + +Line 895. + +*** + +### OnMessage(Func\) + +Register a handler for inbound messages. + +#### Signature + +```dotnet +public Client OnMessage(Func callback) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Relay.Client` + +#### Source + +[`src/SignalWire/Relay/Client.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs) + +Line 902. + +*** + +### ReadLoopAsync(CancellationToken) + +Reader loop that pulls UTF-8 text frames off the socket and routes +each completed message into <xref href="SignalWire.Relay.Client.HandleMessage(System.String)" data-throw-if-not-resolved="false"></xref>. Handles +fragmented frames by accumulating them until <xref href="System.Net.WebSockets.ValueWebSocketReceiveResult.EndOfMessage" data-throw-if-not-resolved="false"></xref>. + +#### Signature + +```dotnet +public Task ReadLoopAsync(CancellationToken cancellation) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task` + +#### Source + +[`src/SignalWire/Relay/Client.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs) + +Line 401. + +*** + +### ReadOnce() + +Read one queued message synchronously (test helper for harness use). + +#### Signature + +```dotnet +public void ReadOnce() +``` + +#### Source + +[`src/SignalWire/Relay/Client.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs) + +Line 459. + +*** + +### ReceiveAsync(IEnumerable\, CancellationToken) + +Subscribe to one or more inbound contexts. + +#### Signature + +```dotnet +public Task ReceiveAsync(IEnumerable contexts, CancellationToken cancellationToken = default) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task` + +#### Source + +[`src/SignalWire/Relay/Client.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs) + +Line 859. + +*** + +### ReconnectAsync(CancellationToken) + +Reconnect with exponential back-off (1s to 30s cap). + +#### Signature + +```dotnet +public Task ReconnectAsync(CancellationToken cancellationToken = default) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task` + +#### Source + +[`src/SignalWire/Relay/Client.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs) + +Line 333. + +*** + +### RunAsync(CancellationToken) + +Main event loop -- drains the inbound queue and processes messages +until disconnect. Used by the test path that pushes JSON strings +into <xref href="SignalWire.Relay.Client.InboundQueue" data-throw-if-not-resolved="false"></xref>; production reads come from the +WebSocket reader started in <xref href="SignalWire.Relay.Client.ConnectAsync(System.Threading.CancellationToken)" data-throw-if-not-resolved="false"></xref>. + +#### Signature + +```dotnet +public Task RunAsync(CancellationToken cancellationToken = default) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task` + +#### Source + +[`src/SignalWire/Relay/Client.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs) + +Line 358. + +*** + +### Send(Dictionary\) + +Encode and send a JSON message. Real production path writes to the +WebSocket; tests override this to capture payloads in memory. + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual void Send(Dictionary msg) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Relay/Client.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs) + +Line 528. + +*** + +### SendAck(string) + +Send an acknowledgement (empty result) for a server-initiated request. + +#### Signature + +```dotnet +public void SendAck(string id) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Relay/Client.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs) + +Line 567. + +*** + +### SendMessageAsync(Dictionary\, CancellationToken) + +Send an outbound message. + +#### Signature + +```dotnet +public Task SendMessageAsync(Dictionary params_, CancellationToken cancellationToken = default) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task` + +#### Source + +[`src/SignalWire/Relay/Client.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs) + +Line 828. + +*** + +### UnreceiveAsync(IEnumerable\, CancellationToken) + +Unsubscribe from one or more contexts. + +#### Signature + +```dotnet +public Task UnreceiveAsync(IEnumerable contexts, CancellationToken cancellationToken = default) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task` + +#### Source + +[`src/SignalWire/Relay/Client.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs) + +Line 880. + +## Source + +[`src/SignalWire/Relay/Client.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs) + +Line 16. diff --git a/fern/products/sdk-reference/dotnet/relay/collect-action/index.mdx b/fern/products/sdk-reference/dotnet/relay/collect-action/index.mdx new file mode 100644 index 0000000000..cc24bdce57 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/relay/collect-action/index.mdx @@ -0,0 +1,193 @@ +--- +slug: "/reference/dotnet/relay/collect-action" +title: "CollectAction" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Relay.CollectAction" + parent: "relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs" + visibility: "public" +--- +# `CollectAction` + +Handle for calling.collect (and play\_and\_collect) operations. + +Note: play\_and\_collect emits intermediate calling.call.play events +that must be silently ignored so they do not pollute the collect +action's state. + +## Signature + +```dotnet +public class CollectAction : Action +``` + +## Inheritance + +**Extends:** [SignalWire.Relay.Action](/docs/sdk-reference/reference/dotnet/relay/action) + +## Properties + + + Return the structured collect result from the payload. + + +## Methods + +### AcceptsTerminalEvent(string) + +Block `calling.call.play` events from triggering the standard +terminal-state resolution path: only `calling.call.collect` +may resolve a CollectAction. + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override bool AcceptsTerminalEvent(string eventType) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 315. + +*** + +### CollectAction(string, string, string, object, bool) + +#### Signature + +```dotnet +public CollectAction(string controlId, string callId, string nodeId, object client, bool isPlayAndCollect = false) +``` + +#### Parameters + + + + + + + + + + + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 272. + +*** + +### GetStopMethod() + +Return the RELAY RPC method that stops this action. +Subclasses MUST override to return the correct method name. + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override string GetStopMethod() +``` + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 279. + +*** + +### HandleEvent(Event) + +Override: silently ignore intermediate play events that arrive +during a play\_and\_collect operation. + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override void HandleEvent(Event evt) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 304. + +*** + +### StartInputTimers() + +Notify the server to start input timers now rather than waiting +for the initial-timeout to expire naturally. + +#### Signature + +```dotnet +public void StartInputTimers() +``` + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 286. + +*** + +### Volume(double) + +play\_and\_collect-only: change playback volume mid-prompt. + +#### Signature + +```dotnet +public void Volume(double db) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 292. + +## Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 268. diff --git a/fern/products/sdk-reference/dotnet/relay/constants/index.mdx b/fern/products/sdk-reference/dotnet/relay/constants/index.mdx new file mode 100644 index 0000000000..ef6b8fbbc0 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/relay/constants/index.mdx @@ -0,0 +1,74 @@ +--- +slug: "/reference/dotnet/relay/constants" +title: "Constants" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Relay.Constants" + parent: "relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Constants.cs" + visibility: "public" +--- +# `Constants` + +Protocol constants for the RELAY WebSocket interface. +Defines protocol version, call/dial/message states, terminal states, +and per-event-type action terminal states. + +**Modifiers:** `static` + +## Signature + +```dotnet +public static class Constants +``` + +## Properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## Source + +[`src/SignalWire/Relay/Constants.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Constants.cs) + +Line 9. diff --git a/fern/products/sdk-reference/dotnet/relay/detect-action/index.mdx b/fern/products/sdk-reference/dotnet/relay/detect-action/index.mdx new file mode 100644 index 0000000000..be3c827035 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/relay/detect-action/index.mdx @@ -0,0 +1,116 @@ +--- +slug: "/reference/dotnet/relay/detect-action" +title: "DetectAction" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Relay.DetectAction" + parent: "relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs" + visibility: "public" +--- +# `DetectAction` + +Handle for calling.detect operations. + +## Signature + +```dotnet +public class DetectAction : Action +``` + +## Inheritance + +**Extends:** [SignalWire.Relay.Action](/docs/sdk-reference/reference/dotnet/relay/action) + +## Properties + + + +## Methods + +### DetectAction(string, string, string, object) + +#### Signature + +```dotnet +public DetectAction(string controlId, string callId, string nodeId, object client) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 322. + +*** + +### GetStopMethod() + +Return the RELAY RPC method that stops this action. +Subclasses MUST override to return the correct method name. + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override string GetStopMethod() +``` + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 325. + +*** + +### HandleEvent(Event) + +Per RELAY\_IMPLEMENTATION\_GUIDE.md "detect gotcha": detect events +continuously stream a `detect` object — resolve on the FIRST +meaningful detect payload (or on terminal state if it arrives first +with no detect data). + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override void HandleEvent(Event evt) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 337. + +## Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 320. diff --git a/fern/products/sdk-reference/dotnet/relay/device/index.mdx b/fern/products/sdk-reference/dotnet/relay/device/index.mdx new file mode 100644 index 0000000000..59ebe45d1c --- /dev/null +++ b/fern/products/sdk-reference/dotnet/relay/device/index.mdx @@ -0,0 +1,152 @@ +--- +slug: "/reference/dotnet/relay/device" +title: "Device" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Relay.Device" + parent: "relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Device.cs" + visibility: "public" +--- +# `Device` + +A typed RELAY device object — the `{type, params}` shape that recurs +across `connect` / `refer` / `dial` / `tap` and the +ringback list. + +**Remarks:** <p> +Grounded in the RELAY wire schema +`relay-protocol/calling.connect.params.json`, where each device is an +object with a required `type` (string) and a free-form `params` +payload. This class types the <em>shape</em> only: <xref href="SignalWire.Relay.Device.Type" data-throw-if-not-resolved="false"></xref> stays +a `string` because the discriminant set (`phone`, `sip`, +`webrtc`, …) is <strong>not</strong> enumerated in any schema, so an +enum would risk rejecting a valid value. + +</p> +<p> +The reference and the rest of this port pass devices as raw +`Dictionary<string, object?>` (e.g. <xref href="SignalWire.Relay.Call.Device" data-throw-if-not-resolved="false"></xref>); +this is an additive typed convenience. <xref href="SignalWire.Relay.Device.ToDict" data-throw-if-not-resolved="false"></xref> yields the +identical wire dictionary, so a <xref href="SignalWire.Relay.Device" data-throw-if-not-resolved="false"></xref> can be used anywhere a +hand-built device dict is accepted with no change in emitted bytes. +</p> +<example> +<pre><code class="lang-csharp">var d = new Device("phone", new Dictionary<string, object?> +{ + ["to_number"] = "+15551112222", + ["from_number"] = "+15553334444", +}); +// d.ToDict() is byte-identical to the hand-written +// { ["type"] = "phone", ["params"] = { ... } }</code></pre> +</example> + +**Modifiers:** `sealed` + +## Signature + +```dotnet +public sealed class Device +``` + +## Properties + + + The device-type-specific parameters (e.g. `to_number` / `from_number` for a phone device). Free-form by the wire schema. + + + + The device discriminant (e.g. `"phone"`, `"sip"`). Kept a string: the valid set is not schema-enumerated. + + +## Methods + +### Device(string, Dictionary\?) + +Build a device from its discriminant and (optional) params payload. + +#### Signature + +```dotnet +public Device(string type, Dictionary? params_ = null) +``` + +#### Parameters + + + The device type discriminant (required). + + + + The device params; an empty map when omitted. + + +#### Source + +[`src/SignalWire/Relay/Device.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Device.cs) + +Line 55. + +*** + +### FromDict(Dictionary\?) + +Build a <xref href="SignalWire.Relay.Device" data-throw-if-not-resolved="false"></xref> from a raw `{type, params}` dictionary +(e.g. <xref href="SignalWire.Relay.Call.Device" data-throw-if-not-resolved="false"></xref> or a wire frame). Returns `null` +when the dict has no `type` string — the discriminant is required. + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static Device? FromDict(Dictionary? dict) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.Relay.Device` + +#### Source + +[`src/SignalWire/Relay/Device.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Device.cs) + +Line 76. + +*** + +### ToDict() + +Project to the raw `{type, params}` wire dictionary — byte-identical +to the hand-written device dict the RELAY methods already accept. + +#### Signature + +```dotnet +public Dictionary ToDict() +``` + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/Relay/Device.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Device.cs) + +Line 65. + +## Source + +[`src/SignalWire/Relay/Device.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Device.cs) + +Line 36. diff --git a/fern/products/sdk-reference/dotnet/relay/dial-state-extensions/index.mdx b/fern/products/sdk-reference/dotnet/relay/dial-state-extensions/index.mdx new file mode 100644 index 0000000000..c90c045516 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/relay/dial-state-extensions/index.mdx @@ -0,0 +1,121 @@ +--- +slug: "/reference/dotnet/relay/dial-state-extensions" +title: "DialStateExtensions" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Relay.DialStateExtensions" + parent: "relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/DialState.cs" + visibility: "public" +--- +# `DialStateExtensions` + +Wire-string mapping, parsing, and terminal-outcome predicate for <xref href="SignalWire.Relay.DialState" data-throw-if-not-resolved="false"></xref>. + +**Modifiers:** `static` + +## Signature + +```dotnet +public static class DialStateExtensions +``` + +## Methods + +### IsTerminal(DialState) + +True when this dial outcome is terminal (the dial has resolved): <xref href="SignalWire.Relay.DialState.Answered" data-throw-if-not-resolved="false"></xref> or <xref href="SignalWire.Relay.DialState.Failed" data-throw-if-not-resolved="false"></xref>. <xref href="SignalWire.Relay.DialState.Dialing" data-throw-if-not-resolved="false"></xref> is still in progress. + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static bool IsTerminal(this DialState state) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Relay/DialState.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/DialState.cs) + +Line 65. + +*** + +### ToWireName(DialState) + +The canonical wire string for this dial state (e.g. "answered"). + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static string ToWireName(this DialState state) +``` + +#### Parameters + + + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/Relay/DialState.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/DialState.cs) + +Line 55. + +*** + +### TryParse(string?, out DialState) + +Parse a wire string into a <xref href="SignalWire.Relay.DialState" data-throw-if-not-resolved="false"></xref>. Returns +`false` (and `default`) for an unrecognised value so callers +can fall back to the raw string rather than crashing on a new +server-emitted state. + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static bool TryParse(string? wire, out DialState state) +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Relay/DialState.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/DialState.cs) + +Line 74. + +## Source + +[`src/SignalWire/Relay/DialState.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/DialState.cs) + +Line 42. diff --git a/fern/products/sdk-reference/dotnet/relay/event/index.mdx b/fern/products/sdk-reference/dotnet/relay/event/index.mdx new file mode 100644 index 0000000000..71757e1550 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/relay/event/index.mdx @@ -0,0 +1,126 @@ +--- +slug: "/reference/dotnet/relay/event" +title: "Event" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Relay.Event" + parent: "relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Event.cs" + visibility: "public" +--- +# `Event` + +Represents a single RELAY event received from the server. +Carries the event type, a timestamp, and the params dictionary +from which call\_id, node\_id, control\_id, tag, and state are extracted. + +**Modifiers:** `sealed` + +## Signature + +```dotnet +public sealed class Event +``` + +## Properties + + + + + + + + + + + + + + + + + +## Methods + +### Event(string, Dictionary\, double) + +#### Signature + +```dotnet +public Event(string eventType, Dictionary params_, double timestamp = 0) +``` + +#### Parameters + + + + + + + +#### Source + +[`src/SignalWire/Relay/Event.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Event.cs) + +Line 13. + +*** + +### Parse(string, Dictionary\) + +Factory: parse an event from its type and params. + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static Event Parse(string eventType, Dictionary params_) +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire.Relay.Event` + +#### Source + +[`src/SignalWire/Relay/Event.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Event.cs) + +Line 42. + +*** + +### ToDict() + +#### Signature + +```dotnet +public Dictionary ToDict() +``` + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/Relay/Event.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Event.cs) + +Line 34. + +## Source + +[`src/SignalWire/Relay/Event.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Event.cs) + +Line 7. diff --git a/fern/products/sdk-reference/dotnet/relay/fax-action/index.mdx b/fern/products/sdk-reference/dotnet/relay/fax-action/index.mdx new file mode 100644 index 0000000000..e2515ee3b4 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/relay/fax-action/index.mdx @@ -0,0 +1,91 @@ +--- +slug: "/reference/dotnet/relay/fax-action" +title: "FaxAction" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Relay.FaxAction" + parent: "relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs" + visibility: "public" +--- +# `FaxAction` + +Handle for calling.fax operations (send or receive). + +## Signature + +```dotnet +public class FaxAction : Action +``` + +## Inheritance + +**Extends:** [SignalWire.Relay.Action](/docs/sdk-reference/reference/dotnet/relay/action) + +## Properties + + + +## Methods + +### FaxAction(string, string, string, object, string) + +#### Signature + +```dotnet +public FaxAction(string controlId, string callId, string nodeId, object client, string faxType = "send") +``` + +#### Parameters + + + + + + + + + + + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 353. + +*** + +### GetStopMethod() + +Return the RELAY RPC method that stops this action. +Subclasses MUST override to return the correct method name. + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override string GetStopMethod() +``` + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 359. + +## Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 349. diff --git a/fern/products/sdk-reference/dotnet/relay/index.mdx b/fern/products/sdk-reference/dotnet/relay/index.mdx new file mode 100644 index 0000000000..bd36a3ad49 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/relay/index.mdx @@ -0,0 +1,281 @@ +--- +slug: "/reference/dotnet/relay" +title: "relay" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "module" + language: "dotnet" + qualified_name: "relay" +--- +# `relay` + +## Classes + + + + Base class for all RELAY call actions (play, record, collect, etc.). An Action is the client-side handle returned when you start an asynchronous operation on a call. It accumulates events, tracks state, and resolves once the operation reaches a terminal state. Uses <xref href="System.Threading.Tasks.TaskCompletionSource" data-throw-if-not-resolved="false"></xref> for native async/await support. + + + + Handle for calling.ai operations. + + + + Represents a RELAY voice call. Holds call-level state, dispatches server events to registered listeners and to in-flight Action objects, and exposes every calling.\* RPC method as a first-class C# method. + + + + Wire-string mapping, parsing, and terminal-state predicate for <xref href="SignalWire.Relay.CallState" data-throw-if-not-resolved="false"></xref>. + + + + RELAY Client -- manages the WebSocket connection to SignalWire, sends JSON-RPC 2.0 requests, and dispatches inbound events to the correct Call or Message objects. Uses async/await with <xref href="System.Threading.Tasks.TaskCompletionSource" data-throw-if-not-resolved="false"></xref> for the native C# async pattern instead of polling loops. + + + + Handle for calling.collect (and play\_and\_collect) operations. Note: play\_and\_collect emits intermediate calling.call.play events that must be silently ignored so they do not pollute the collect action's state. + + + + Protocol constants for the RELAY WebSocket interface. Defines protocol version, call/dial/message states, terminal states, and per-event-type action terminal states. + + + + Handle for calling.detect operations. + + + + A typed RELAY device object — the `{type, params}` shape that recurs across `connect` / `refer` / `dial` / `tap` and the ringback list. + + + + Wire-string mapping, parsing, and terminal-outcome predicate for <xref href="SignalWire.Relay.DialState" data-throw-if-not-resolved="false"></xref>. + + + + Represents a single RELAY event received from the server. Carries the event type, a timestamp, and the params dictionary from which call\_id, node\_id, control\_id, tag, and state are extracted. + + + + Handle for calling.fax operations (send or receive). + + + + Represents a RELAY messaging message (SMS / MMS). A Message is created when you send or receive a message through the RELAY messaging namespace. It accumulates state-change events and resolves once the message reaches a terminal state (delivered, undelivered, or failed). Uses <xref href="System.Threading.Tasks.TaskCompletionSource" data-throw-if-not-resolved="false"></xref> for native async/await support. + + + + Wire-string mapping, parsing, and terminal-state predicate for <xref href="SignalWire.Relay.MessageState" data-throw-if-not-resolved="false"></xref>. + + + + Handle for calling.pay operations. + + + + Handle for calling.play operations. + + + + Handle for calling.record operations. + + + + Handle for calling.stream operations. + + + + Handle for calling.tap operations. + + + + Handle for calling.transcribe operations. + + + +## Enums + +### CallState + +Lifecycle state of a RELAY <xref href="SignalWire.Relay.Call" data-throw-if-not-resolved="false"></xref>, as a typed, compile-time +closed set. + +**Remarks:** <p> +The RELAY `calling.call.state` event carries one of a known set of +call-state strings (`created`, `ringing`, `answered`, +`ending`, `ended`) — grounded in the Python reference's +`signalwire/relay/constants.py` (`CALL_STATES`) and mirrored by <xref href="SignalWire.Relay.Constants.CallStateCreated" data-throw-if-not-resolved="false"></xref> .. <xref href="SignalWire.Relay.Constants.CallStateEnded" data-throw-if-not-resolved="false"></xref>. +The reference exposes the state as a bare `str`; this enum is a typed +alias over those strings so callers get autocompletion and a compile error +on a typo, while <xref href="SignalWire.Relay.Call.State" data-throw-if-not-resolved="false"></xref> stays a string for parity and +forward-compatibility. + +</p> +<p> +This is the <em>call</em> vocabulary and is deliberately +<strong>distinct</strong> from <xref href="SignalWire.Relay.DialState" data-throw-if-not-resolved="false"></xref> (the dial-outcome +vocabulary) and <xref href="SignalWire.Relay.MessageState" data-throw-if-not-resolved="false"></xref> (the messaging-delivery +vocabulary). The three are never conflated — they index different wire +fields (`call_state` vs `dial_state` vs `message_state`). +</p> +<p> +Because the server emits these values and the set can grow, parse via +<xref href="SignalWire.Relay.CallStateExtensions.TryParse(System.String%2cSignalWire.Relay.CallState%40)" data-throw-if-not-resolved="false"></xref>, which +returns `false` for an unknown value rather than throwing — the string +arm on <xref href="SignalWire.Relay.Call.State" data-throw-if-not-resolved="false"></xref> preserves any future server value. +</p> + +#### Signature + +```dotnet +public enum CallState +``` + +#### Properties + + + answered + + + + created + + + + ended (terminal) + + + + ending + + + + ringing + + +#### Source + +[`src/SignalWire/Relay/CallState.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/CallState.cs) + +Line 32. + +*** + +### DialState + +Outcome state of a RELAY dial attempt (`calling.call.dial`), as a +typed, compile-time closed set. + +**Remarks:** <p> +The RELAY `calling.call.dial` event carries a `dial_state` of +`dialing`, `answered`, or `failed` (see <xref href="SignalWire.Relay.Client.HandleDialEvent(SignalWire.Relay.Event%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d)" data-throw-if-not-resolved="false"></xref> and <xref href="SignalWire.Relay.Constants.DialStateDialing" data-throw-if-not-resolved="false"></xref> .. <xref href="SignalWire.Relay.Constants.DialStateFailed" data-throw-if-not-resolved="false"></xref>). It is the dial-<em>outcome</em> +vocabulary and is deliberately <strong>distinct</strong> from <xref href="SignalWire.Relay.CallState" data-throw-if-not-resolved="false"></xref> (the per-call lifecycle) — a dial that resolves +`answered` transitions the winning <xref href="SignalWire.Relay.Call" data-throw-if-not-resolved="false"></xref> to <xref href="SignalWire.Relay.CallState.Answered" data-throw-if-not-resolved="false"></xref>, but the two fields are separate on the +wire. + +</p> +<p> +Both `answered` and `failed` are terminal dial outcomes (the dial +is resolved); `dialing` is in-progress. Parse via +<xref href="SignalWire.Relay.DialStateExtensions.TryParse(System.String%2cSignalWire.Relay.DialState%40)" data-throw-if-not-resolved="false"></xref>, which +tolerates an unknown server value. +</p> + +#### Signature + +```dotnet +public enum DialState +``` + +#### Properties + + + answered (terminal — dial succeeded) + + + + dialing (in progress) + + + + failed (terminal — dial failed) + + +#### Source + +[`src/SignalWire/Relay/DialState.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/DialState.cs) + +Line 26. + +*** + +### MessageState + +Delivery state of a RELAY <xref href="SignalWire.Relay.Message" data-throw-if-not-resolved="false"></xref> (SMS / MMS), as a typed, +compile-time closed set. + +**Remarks:** <p> +The RELAY `messaging.state` event carries a `message_state` of +`queued`, `initiated`, `sent`, `delivered`, +`undelivered`, or `failed` — grounded in the Python reference's +`signalwire/relay/constants.py` (`MESSAGE_STATE_*`) and the wire +schema `relay-protocol/messaging.state.event.json`; `received` is +the additional inbound state (<xref href="SignalWire.Relay.Constants.MessageStateReceived" data-throw-if-not-resolved="false"></xref>). +The reference exposes the state as a bare `str`; this enum is a typed +alias so callers get autocompletion and a compile-time check, while <xref href="SignalWire.Relay.Message.State" data-throw-if-not-resolved="false"></xref> stays a string for parity and forward-compat. + +</p> +<p> +This is the <em>messaging</em> vocabulary and is deliberately +<strong>distinct</strong> from <xref href="SignalWire.Relay.CallState" data-throw-if-not-resolved="false"></xref> and +<xref href="SignalWire.Relay.DialState" data-throw-if-not-resolved="false"></xref> (the voice vocabularies) — it indexes the +`message_state` wire field, never `call_state`/`dial_state`. +</p> +<p> +Parse via <xref href="SignalWire.Relay.MessageStateExtensions.TryParse(System.String%2cSignalWire.Relay.MessageState%40)" data-throw-if-not-resolved="false"></xref>, +which tolerates an unknown server value. +</p> + +#### Signature + +```dotnet +public enum MessageState +``` + +#### Properties + + + delivered (terminal) + + + + failed (terminal) + + + + initiated + + + + queued + + + + received (inbound) + + + + sent + + + + undelivered (terminal) + + +#### Source + +[`src/SignalWire/Relay/MessageState.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/MessageState.cs) + +Line 29. diff --git a/fern/products/sdk-reference/dotnet/relay/message-state-extensions/index.mdx b/fern/products/sdk-reference/dotnet/relay/message-state-extensions/index.mdx new file mode 100644 index 0000000000..c24c63fb54 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/relay/message-state-extensions/index.mdx @@ -0,0 +1,122 @@ +--- +slug: "/reference/dotnet/relay/message-state-extensions" +title: "MessageStateExtensions" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Relay.MessageStateExtensions" + parent: "relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/MessageState.cs" + visibility: "public" +--- +# `MessageStateExtensions` + +Wire-string mapping, parsing, and terminal-state predicate for <xref href="SignalWire.Relay.MessageState" data-throw-if-not-resolved="false"></xref>. + +**Modifiers:** `static` + +## Signature + +```dotnet +public static class MessageStateExtensions +``` + +## Methods + +### IsTerminal(MessageState) + +True when this state is terminal (delivery resolved). Mirrors <xref href="SignalWire.Relay.Constants.MessageTerminalStates" data-throw-if-not-resolved="false"></xref> — terminal = +`delivered` / `undelivered` / `failed`. + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static bool IsTerminal(this MessageState state) +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Relay/MessageState.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/MessageState.cs) + +Line 84. + +*** + +### ToWireName(MessageState) + +The canonical wire string for this message state (e.g. "delivered"). + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static string ToWireName(this MessageState state) +``` + +#### Parameters + + + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/Relay/MessageState.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/MessageState.cs) + +Line 74. + +*** + +### TryParse(string?, out MessageState) + +Parse a wire string into a <xref href="SignalWire.Relay.MessageState" data-throw-if-not-resolved="false"></xref>. Returns +`false` (and `default`) for an unrecognised value so callers +can fall back to the raw string rather than crashing on a new +server-emitted state. + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static bool TryParse(string? wire, out MessageState state) +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`src/SignalWire/Relay/MessageState.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/MessageState.cs) + +Line 93. + +## Source + +[`src/SignalWire/Relay/MessageState.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/MessageState.cs) + +Line 57. diff --git a/fern/products/sdk-reference/dotnet/relay/message/index.mdx b/fern/products/sdk-reference/dotnet/relay/message/index.mdx new file mode 100644 index 0000000000..c559f68e52 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/relay/message/index.mdx @@ -0,0 +1,256 @@ +--- +slug: "/reference/dotnet/relay/message" +title: "Message" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Relay.Message" + parent: "relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Message.cs" + visibility: "public" +--- +# `Message` + +Represents a RELAY messaging message (SMS / MMS). + +A Message is created when you send or receive a message through the +RELAY messaging namespace. It accumulates state-change events and +resolves once the message reaches a terminal state (delivered, +undelivered, or failed). + +Uses <xref href="System.Threading.Tasks.TaskCompletionSource" data-throw-if-not-resolved="false"></xref> for native async/await support. + +**Modifiers:** `sealed` + +## Signature + +```dotnet +public sealed class Message +``` + +## Properties + + + + + + + + + + + + + + + + + + + The current delivery state as the typed <xref href="SignalWire.Relay.MessageState" data-throw-if-not-resolved="false"></xref> enum, parsed from <xref href="SignalWire.Relay.Message.State" data-throw-if-not-resolved="false"></xref>. Returns `null` when <xref href="SignalWire.Relay.Message.State" data-throw-if-not-resolved="false"></xref> is unset or an unrecognised (e.g. newly-introduced server) value — read <xref href="SignalWire.Relay.Message.State" data-throw-if-not-resolved="false"></xref> for the raw string in that case. Typed convenience alongside the parity-bearing string <xref href="SignalWire.Relay.Message.State" data-throw-if-not-resolved="false"></xref>; agrees with it for known states. + + + + + + + + + + + + +## Methods + +### DispatchEvent(Event) + +Process an inbound event for this message. +Updates state/reason, fires registered event listeners, and +auto-resolves when a terminal state is reached. + +#### Signature + +```dotnet +public void DispatchEvent(Event evt) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Relay/Message.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Message.cs) + +Line 73. + +*** + +### Message(Dictionary\?) + +Build a Message from a params dictionary (as returned by the server). + +#### Signature + +```dotnet +public Message(Dictionary? params_ = null) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Relay/Message.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Message.cs) + +Line 47. + +*** + +### On + +Register a listener that fires on every state-change event. + +#### Signature + + + + ```dotnet + public Message On(Func callback) + ``` + + + + ```dotnet + public Message On(Action callback) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`SignalWire.Relay.Message` + +#### Returns (Overload 2) + +`SignalWire.Relay.Message` + +#### Source + +[`src/SignalWire/Relay/Message.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Message.cs) + +Line 132. + +*** + +### OnCompleted + +Register a callback to fire when the message reaches a terminal state. +If the message is already complete the callback fires immediately. + +#### Signature + + + + ```dotnet + public Message OnCompleted(Func callback) + ``` + + + + ```dotnet + public Message OnCompleted(Action callback) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`SignalWire.Relay.Message` + +#### Returns (Overload 2) + +`SignalWire.Relay.Message` + +#### Source + +[`src/SignalWire/Relay/Message.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Message.cs) + +Line 148. + +*** + +### Resolve(string?) + +Mark this message as completed. The optional result is stored and +the onCompleted callback fires exactly once. + +#### Signature + +```dotnet +public void Resolve(string? result = null) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Relay/Message.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Message.cs) + +Line 180. + +*** + +### WaitAsync(int) + +Await until the message completes or the timeout elapses. +Returns the resolved result, or null on timeout. + +#### Signature + +```dotnet +public Task WaitAsync(int timeoutSeconds = 30) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task` + +#### Source + +[`src/SignalWire/Relay/Message.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Message.cs) + +Line 113. + +## Source + +[`src/SignalWire/Relay/Message.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Message.cs) + +Line 12. diff --git a/fern/products/sdk-reference/dotnet/relay/pay-action/index.mdx b/fern/products/sdk-reference/dotnet/relay/pay-action/index.mdx new file mode 100644 index 0000000000..abb25f3892 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/relay/pay-action/index.mdx @@ -0,0 +1,85 @@ +--- +slug: "/reference/dotnet/relay/pay-action" +title: "PayAction" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Relay.PayAction" + parent: "relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs" + visibility: "public" +--- +# `PayAction` + +Handle for calling.pay operations. + +## Signature + +```dotnet +public class PayAction : Action +``` + +## Inheritance + +**Extends:** [SignalWire.Relay.Action](/docs/sdk-reference/reference/dotnet/relay/action) + +## Methods + +### GetStopMethod() + +Return the RELAY RPC method that stops this action. +Subclasses MUST override to return the correct method name. + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override string GetStopMethod() +``` + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 387. + +*** + +### PayAction(string, string, string, object) + +#### Signature + +```dotnet +public PayAction(string controlId, string callId, string nodeId, object client) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 384. + +## Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 382. diff --git a/fern/products/sdk-reference/dotnet/relay/play-action/index.mdx b/fern/products/sdk-reference/dotnet/relay/play-action/index.mdx new file mode 100644 index 0000000000..63a1f53508 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/relay/play-action/index.mdx @@ -0,0 +1,139 @@ +--- +slug: "/reference/dotnet/relay/play-action" +title: "PlayAction" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Relay.PlayAction" + parent: "relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs" + visibility: "public" +--- +# `PlayAction` + +Handle for calling.play operations. + +## Signature + +```dotnet +public class PlayAction : Action +``` + +## Inheritance + +**Extends:** [SignalWire.Relay.Action](/docs/sdk-reference/reference/dotnet/relay/action) + +## Methods + +### GetStopMethod() + +Return the RELAY RPC method that stops this action. +Subclasses MUST override to return the correct method name. + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override string GetStopMethod() +``` + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 221. + +*** + +### Pause() + +#### Signature + +```dotnet +public void Pause() +``` + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 223. + +*** + +### PlayAction(string, string, string, object) + +#### Signature + +```dotnet +public PlayAction(string controlId, string callId, string nodeId, object client) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 218. + +*** + +### Resume() + +#### Signature + +```dotnet +public void Resume() +``` + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 225. + +*** + +### Volume(double) + +Adjust playback volume in dB. + +#### Signature + +```dotnet +public void Volume(double db) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 228. + +## Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 216. diff --git a/fern/products/sdk-reference/dotnet/relay/record-action/index.mdx b/fern/products/sdk-reference/dotnet/relay/record-action/index.mdx new file mode 100644 index 0000000000..d0ed962a33 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/relay/record-action/index.mdx @@ -0,0 +1,129 @@ +--- +slug: "/reference/dotnet/relay/record-action" +title: "RecordAction" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Relay.RecordAction" + parent: "relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs" + visibility: "public" +--- +# `RecordAction` + +Handle for calling.record operations. + +## Signature + +```dotnet +public class RecordAction : Action +``` + +## Inheritance + +**Extends:** [SignalWire.Relay.Action](/docs/sdk-reference/reference/dotnet/relay/action) + +## Properties + + + + + + + +## Methods + +### GetStopMethod() + +Return the RELAY RPC method that stops this action. +Subclasses MUST override to return the correct method name. + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override string GetStopMethod() +``` + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 238. + +*** + +### Pause(string?) + +#### Signature + +```dotnet +public void Pause(string? behavior = null) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 240. + +*** + +### RecordAction(string, string, string, object) + +#### Signature + +```dotnet +public RecordAction(string controlId, string callId, string nodeId, object client) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 235. + +*** + +### Resume() + +#### Signature + +```dotnet +public void Resume() +``` + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 248. + +## Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 233. diff --git a/fern/products/sdk-reference/dotnet/relay/stream-action/index.mdx b/fern/products/sdk-reference/dotnet/relay/stream-action/index.mdx new file mode 100644 index 0000000000..c028127865 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/relay/stream-action/index.mdx @@ -0,0 +1,85 @@ +--- +slug: "/reference/dotnet/relay/stream-action" +title: "StreamAction" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Relay.StreamAction" + parent: "relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs" + visibility: "public" +--- +# `StreamAction` + +Handle for calling.stream operations. + +## Signature + +```dotnet +public class StreamAction : Action +``` + +## Inheritance + +**Extends:** [SignalWire.Relay.Action](/docs/sdk-reference/reference/dotnet/relay/action) + +## Methods + +### GetStopMethod() + +Return the RELAY RPC method that stops this action. +Subclasses MUST override to return the correct method name. + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override string GetStopMethod() +``` + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 378. + +*** + +### StreamAction(string, string, string, object) + +#### Signature + +```dotnet +public StreamAction(string controlId, string callId, string nodeId, object client) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 375. + +## Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 373. diff --git a/fern/products/sdk-reference/dotnet/relay/tap-action/index.mdx b/fern/products/sdk-reference/dotnet/relay/tap-action/index.mdx new file mode 100644 index 0000000000..84e6a1a55f --- /dev/null +++ b/fern/products/sdk-reference/dotnet/relay/tap-action/index.mdx @@ -0,0 +1,85 @@ +--- +slug: "/reference/dotnet/relay/tap-action" +title: "TapAction" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Relay.TapAction" + parent: "relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs" + visibility: "public" +--- +# `TapAction` + +Handle for calling.tap operations. + +## Signature + +```dotnet +public class TapAction : Action +``` + +## Inheritance + +**Extends:** [SignalWire.Relay.Action](/docs/sdk-reference/reference/dotnet/relay/action) + +## Methods + +### GetStopMethod() + +Return the RELAY RPC method that stops this action. +Subclasses MUST override to return the correct method name. + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override string GetStopMethod() +``` + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 369. + +*** + +### TapAction(string, string, string, object) + +#### Signature + +```dotnet +public TapAction(string controlId, string callId, string nodeId, object client) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 366. + +## Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 364. diff --git a/fern/products/sdk-reference/dotnet/relay/transcribe-action/index.mdx b/fern/products/sdk-reference/dotnet/relay/transcribe-action/index.mdx new file mode 100644 index 0000000000..ecb07af7cc --- /dev/null +++ b/fern/products/sdk-reference/dotnet/relay/transcribe-action/index.mdx @@ -0,0 +1,85 @@ +--- +slug: "/reference/dotnet/relay/transcribe-action" +title: "TranscribeAction" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.Relay.TranscribeAction" + parent: "relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs" + visibility: "public" +--- +# `TranscribeAction` + +Handle for calling.transcribe operations. + +## Signature + +```dotnet +public class TranscribeAction : Action +``` + +## Inheritance + +**Extends:** [SignalWire.Relay.Action](/docs/sdk-reference/reference/dotnet/relay/action) + +## Methods + +### GetStopMethod() + +Return the RELAY RPC method that stops this action. +Subclasses MUST override to return the correct method name. + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override string GetStopMethod() +``` + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 396. + +*** + +### TranscribeAction(string, string, string, object) + +#### Signature + +```dotnet +public TranscribeAction(string controlId, string callId, string nodeId, object client) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 393. + +## Source + +[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) + +Line 391. diff --git a/fern/products/sdk-reference/dotnet/rest/crud-resource/index.mdx b/fern/products/sdk-reference/dotnet/rest/crud-resource/index.mdx new file mode 100644 index 0000000000..34627e3356 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/rest/crud-resource/index.mdx @@ -0,0 +1,239 @@ +--- +slug: "/reference/dotnet/rest/crud-resource" +title: "CrudResource" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.CrudResource" + parent: "rest" + module: "rest" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/CrudResource.cs" + visibility: "public" +--- +# `CrudResource` + +Generic CRUD wrapper around an <xref href="SignalWire.REST.HttpClient" data-throw-if-not-resolved="false"></xref> and a base API path. + +Provides List / Create / Get / Update / Delete for any REST resource that +follows the standard SignalWire collection+item URL pattern. + +## Signature + +```dotnet +public class CrudResource +``` + +## Properties + + + + + +## Methods + +### CreateAsync(Dictionary\, CancellationToken) + +Create a new resource (POST basePath). + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual Task> CreateAsync(Dictionary data, CancellationToken cancellationToken = default) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/CrudResource.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/CrudResource.cs) + +Line 35. + +*** + +### CrudResource(HttpClient, string) + +#### Signature + +```dotnet +public CrudResource(HttpClient client, string basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/REST/CrudResource.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/CrudResource.cs) + +Line 13. + +*** + +### DeleteAsync(string, CancellationToken) + +Delete a resource by ID (DELETE basePath/\{id\}). + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual Task> DeleteAsync(string id, CancellationToken cancellationToken = default) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/CrudResource.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/CrudResource.cs) + +Line 58. + +*** + +### GetAsync(string, CancellationToken) + +Retrieve a single resource by ID (GET basePath/\{id\}). + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual Task> GetAsync(string id, CancellationToken cancellationToken = default) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/CrudResource.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/CrudResource.cs) + +Line 43. + +*** + +### ListAsync(Dictionary\?, CancellationToken) + +List resources (GET basePath). + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual Task> ListAsync(Dictionary? queryParams = null, CancellationToken cancellationToken = default) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/CrudResource.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/CrudResource.cs) + +Line 27. + +*** + +### Path(params string\[]) + +Build a full path by appending segments to the base path. + +#### Signature + +```dotnet +protected string Path(params string[] parts) +``` + +#### Parameters + + + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/REST/CrudResource.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/CrudResource.cs) + +Line 20. + +*** + +### UpdateAsync(string, Dictionary\, CancellationToken) + +Update a resource by ID (PUT basePath/\{id\}). + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual Task> UpdateAsync(string id, Dictionary data, CancellationToken cancellationToken = default) +``` + +#### Parameters + + + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/CrudResource.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/CrudResource.cs) + +Line 50. + +## Source + +[`src/SignalWire/REST/CrudResource.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/CrudResource.cs) + +Line 8. diff --git a/fern/products/sdk-reference/dotnet/rest/crud-with-addresses/index.mdx b/fern/products/sdk-reference/dotnet/rest/crud-with-addresses/index.mdx new file mode 100644 index 0000000000..cdc44b5737 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/rest/crud-with-addresses/index.mdx @@ -0,0 +1,86 @@ +--- +slug: "/reference/dotnet/rest/crud-with-addresses" +title: "CrudWithAddresses" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.CrudWithAddresses" + parent: "rest" + module: "rest" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/CrudWithAddresses.cs" + visibility: "public" +--- +# `CrudWithAddresses` + +## Signature + +```dotnet +public class CrudWithAddresses : CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/rest/crud-resource) + +## Methods + +### CrudWithAddresses(HttpClient, string) + +#### Signature + +```dotnet +public CrudWithAddresses(HttpClient client, string basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/REST/CrudWithAddresses.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/CrudWithAddresses.cs) + +Line 13. + +*** + +### ListAddressesAsync(string, Dictionary\?) + +List the addresses sub-collection for a given resource. +(Python parity: +`CrudWithAddresses.list_addresses(resource_id, **params)`.) + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual Task> ListAddressesAsync(string resourceId, Dictionary? queryParams = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/CrudWithAddresses.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/CrudWithAddresses.cs) + +Line 19. + +## Source + +[`src/SignalWire/REST/CrudWithAddresses.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/CrudWithAddresses.cs) + +Line 11. diff --git a/fern/products/sdk-reference/dotnet/rest/http-client/index.mdx b/fern/products/sdk-reference/dotnet/rest/http-client/index.mdx new file mode 100644 index 0000000000..7dba8c02df --- /dev/null +++ b/fern/products/sdk-reference/dotnet/rest/http-client/index.mdx @@ -0,0 +1,315 @@ +--- +slug: "/reference/dotnet/rest/http-client" +title: "HttpClient" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.HttpClient" + parent: "rest" + module: "rest" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/HttpClient.cs" + visibility: "public" +--- +# `HttpClient` + +Low-level HTTP client for SignalWire REST APIs. + +Uses <xref href="System.Net.Http.HttpClient" data-throw-if-not-resolved="false"></xref> with Basic Auth, +and returns parsed JSON responses as dictionaries. + +## Signature + +```dotnet +public class HttpClient : IDisposable +``` + +## Inheritance + +**Implements:** `System.IDisposable` + +## Properties + + + + + + + + + +## Methods + +### DeleteAsync(string, CancellationToken) + +DELETE. + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual Task> DeleteAsync(string path, CancellationToken cancellationToken = default) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/HttpClient.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/HttpClient.cs) + +Line 91. + +*** + +### Dispose + +Release the underlying <xref href="System.Net.Http.HttpClient" data-throw-if-not-resolved="false"></xref> — but +ONLY when this object created it (`_ownsHttp`). A caller-injected +HttpClient is left untouched: its lifetime belongs to whoever passed it +in. Idempotent. + +#### Signature + + + + ```dotnet + public void Dispose() + ``` + + + + ```dotnet + protected virtual void Dispose(bool disposing) + ``` + + + +#### Parameters (Overload 2) + + + +#### Source + +[`src/SignalWire/REST/HttpClient.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/HttpClient.cs) + +Line 280. + +*** + +### GetAsync(string, Dictionary\?, CancellationToken) + +GET with optional query-string parameters. + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual Task> GetAsync(string path, Dictionary? queryParams = null, CancellationToken cancellationToken = default) +``` + +#### Parameters + + + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/HttpClient.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/HttpClient.cs) + +Line 55. + +*** + +### HttpClient + +#### Signature + + + + ```dotnet + public HttpClient(string projectId, string token, string baseUrl) + ``` + + + + ```dotnet + public HttpClient(string projectId, string token, string baseUrl, HttpClient? httpClient) + ``` + + + +#### Parameters (Overload 1) + + + + + + + +#### Parameters (Overload 2) + + + + + + + + + +#### Source + +[`src/SignalWire/REST/HttpClient.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/HttpClient.cs) + +Line 23. + +*** + +### ListAllAsync(string, Dictionary\?, CancellationToken) + +Return pages by following "next" links automatically. +Expects \{ "data": \[...], "links": \{ "next": "..." \} \}. + +#### Signature + +```dotnet +public IAsyncEnumerable>> ListAllAsync(string path, Dictionary? queryParams = null, CancellationToken cancellationToken = default) +``` + +#### Parameters + + + + + + + +#### Returns + +`IAsyncEnumerable>>` + +#### Source + +[`src/SignalWire/REST/HttpClient.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/HttpClient.cs) + +Line 106. + +*** + +### PatchAsync(string, Dictionary\?, CancellationToken) + +PATCH with JSON body. + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual Task> PatchAsync(string path, Dictionary? data = null, CancellationToken cancellationToken = default) +``` + +#### Parameters + + + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/HttpClient.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/HttpClient.cs) + +Line 82. + +*** + +### PostAsync(string, Dictionary\?, CancellationToken) + +POST with JSON body. + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual Task> PostAsync(string path, Dictionary? data = null, CancellationToken cancellationToken = default) +``` + +#### Parameters + + + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/HttpClient.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/HttpClient.cs) + +Line 64. + +*** + +### PutAsync(string, Dictionary\?, CancellationToken) + +PUT with JSON body. + +**Modifiers:** `virtual` + +#### Signature + +```dotnet +public virtual Task> PutAsync(string path, Dictionary? data = null, CancellationToken cancellationToken = default) +``` + +#### Parameters + + + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/HttpClient.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/HttpClient.cs) + +Line 73. + +## Source + +[`src/SignalWire/REST/HttpClient.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/HttpClient.cs) + +Line 12. diff --git a/fern/products/sdk-reference/dotnet/rest/index.mdx b/fern/products/sdk-reference/dotnet/rest/index.mdx new file mode 100644 index 0000000000..8ea6b7b88a --- /dev/null +++ b/fern/products/sdk-reference/dotnet/rest/index.mdx @@ -0,0 +1,44 @@ +--- +slug: "/reference/dotnet/rest" +title: "rest" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "module" + language: "dotnet" + qualified_name: "rest" +--- +# `rest` + +## Classes + + + + Generic CRUD wrapper around an <xref href="SignalWire.REST.HttpClient" data-throw-if-not-resolved="false"></xref> and a base API path. Provides List / Create / Get / Update / Delete for any REST resource that follows the standard SignalWire collection+item URL pattern. + + + + + + Low-level HTTP client for SignalWire REST APIs. Uses <xref href="System.Net.Http.HttpClient" data-throw-if-not-resolved="false"></xref> with Basic Auth, and returns parsed JSON responses as dictionaries. + + + + Walks paged HTTP responses by following `links.next` cursors. Mirrors Python `signalwire.rest._pagination.PaginatedIterator` — constructor records inputs without fetching; iteration triggers the first fetch and continues until a page is returned without a `links.next` cursor. + + + + Top-level SignalWire REST client. Provides lazy access to every API namespace (fabric, calling, phone\_numbers, datasphere, video, compat, etc.). Credentials can be supplied explicitly or pulled from environment variables. + + + + Exception thrown when a SignalWire REST API call returns a non-2xx status or encounters a transport-level error. + + + +## Modules + + + + diff --git a/fern/products/sdk-reference/dotnet/rest/namespaces/addresses/index.mdx b/fern/products/sdk-reference/dotnet/rest/namespaces/addresses/index.mdx new file mode 100644 index 0000000000..2a86aa676b --- /dev/null +++ b/fern/products/sdk-reference/dotnet/rest/namespaces/addresses/index.mdx @@ -0,0 +1,57 @@ +--- +slug: "/reference/dotnet/rest/namespaces/addresses" +title: "Addresses" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.Addresses" + parent: "rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs" + visibility: "public" +--- +# `Addresses` + +Addresses namespace (Relay top-level addresses, no update). + +Mirrors Python `signalwire.rest.namespaces.addresses.AddressesResource`. +Inherits CrudResource for the standard list/create/get/delete surface. + +## Signature + +```dotnet +public class Addresses : CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/rest/crud-resource) + +## Methods + +### Addresses(HttpClient) + +#### Signature + +```dotnet +public Addresses(HttpClient client) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 190. + +## Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 188. diff --git a/fern/products/sdk-reference/dotnet/rest/namespaces/call-flows-helper/index.mdx b/fern/products/sdk-reference/dotnet/rest/namespaces/call-flows-helper/index.mdx new file mode 100644 index 0000000000..94f56c719f --- /dev/null +++ b/fern/products/sdk-reference/dotnet/rest/namespaces/call-flows-helper/index.mdx @@ -0,0 +1,135 @@ +--- +slug: "/reference/dotnet/rest/namespaces/call-flows-helper" +title: "CallFlowsHelper" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.CallFlowsHelper" + parent: "rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs" + visibility: "public" +--- +# `CallFlowsHelper` + +CallFlows helper providing the singular-path variants +(`/api/fabric/resources/call_flow/{id}/{addresses,versions}`). + +## Signature + +```dotnet +public class CallFlowsHelper +``` + +## Properties + + + +## Methods + +### CallFlowsHelper(HttpClient, string) + +#### Signature + +```dotnet +public CallFlowsHelper(HttpClient client, string basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) + +Line 153. + +*** + +### DeployVersionAsync(string, Dictionary\) + +#### Signature + +```dotnet +public Task> DeployVersionAsync(string resourceId, Dictionary kwargs) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) + +Line 169. + +*** + +### ListAddressesAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> ListAddressesAsync(string resourceId, Dictionary? queryParams = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) + +Line 163. + +*** + +### ListVersionsAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> ListVersionsAsync(string resourceId, Dictionary? queryParams = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) + +Line 166. + +## Source + +[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) + +Line 147. diff --git a/fern/products/sdk-reference/dotnet/rest/namespaces/calling/index.mdx b/fern/products/sdk-reference/dotnet/rest/namespaces/calling/index.mdx new file mode 100644 index 0000000000..368bb73de0 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/rest/namespaces/calling/index.mdx @@ -0,0 +1,1067 @@ +--- +slug: "/reference/dotnet/rest/namespaces/calling" +title: "Calling" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.Calling" + parent: "rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs" + visibility: "public" +--- +# `Calling` + +Calling API namespace. + +Provides 37 call-control command methods that each POST to +/api/calling/calls with a JSON body containing the command name, +an optional call ID, and parameters. + +## Signature + +```dotnet +public class Calling +``` + +## Properties + + + + + +## Methods + +### AiHoldAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> AiHoldAsync(string callId, Dictionary? parms = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 176. + +*** + +### AiMessageAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> AiMessageAsync(string callId, Dictionary? parms = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 173. + +*** + +### AiStopAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> AiStopAsync(string callId, Dictionary? parms = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 182. + +*** + +### AiUnholdAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> AiUnholdAsync(string callId, Dictionary? parms = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 179. + +*** + +### Calling(HttpClient, string) + +#### Signature + +```dotnet +public Calling(HttpClient client, string projectId) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 16. + +*** + +### CollectAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> CollectAsync(string callId, Dictionary? parms = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 110. + +*** + +### CollectStartInputTimersAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> CollectStartInputTimersAsync(string callId, Dictionary? parms = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 116. + +*** + +### CollectStopAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> CollectStopAsync(string callId, Dictionary? parms = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 113. + +*** + +### DenoiseAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> DenoiseAsync(string callId, Dictionary? parms = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 153. + +*** + +### DenoiseStopAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> DenoiseStopAsync(string callId, Dictionary? parms = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 156. + +*** + +### DetectAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> DetectAsync(string callId, Dictionary? parms = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 123. + +*** + +### DetectStopAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> DetectStopAsync(string callId, Dictionary? parms = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 126. + +*** + +### DialAsync(Dictionary\?) + +#### Signature + +```dotnet +public Task> DialAsync(Dictionary? parms = null) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 51. + +*** + +### DisconnectAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> DisconnectAsync(string callId, Dictionary? parms = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 68. + +*** + +### EndAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> EndAsync(string callId, Dictionary? parms = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 62. + +*** + +### GetBasePath() + +#### Signature + +```dotnet +public string GetBasePath() +``` + +#### Returns + +`string` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 24. + +*** + +### LiveTranscribeAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> LiveTranscribeAsync(string callId, Dictionary? parms = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 189. + +*** + +### LiveTranslateAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> LiveTranslateAsync(string callId, Dictionary? parms = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 192. + +*** + +### PlayAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> PlayAsync(string callId, Dictionary? parms = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 75. + +*** + +### PlayPauseAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> PlayPauseAsync(string callId, Dictionary? parms = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 78. + +*** + +### PlayResumeAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> PlayResumeAsync(string callId, Dictionary? parms = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 81. + +*** + +### PlayStopAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> PlayStopAsync(string callId, Dictionary? parms = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 84. + +*** + +### PlayVolumeAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> PlayVolumeAsync(string callId, Dictionary? parms = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 87. + +*** + +### ReceiveFaxStopAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> ReceiveFaxStopAsync(string callId, Dictionary? parms = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 202. + +*** + +### RecordAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> RecordAsync(string callId, Dictionary? parms = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 94. + +*** + +### RecordPauseAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> RecordPauseAsync(string callId, Dictionary? parms = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 97. + +*** + +### RecordResumeAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> RecordResumeAsync(string callId, Dictionary? parms = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 100. + +*** + +### RecordStopAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> RecordStopAsync(string callId, Dictionary? parms = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 103. + +*** + +### ReferAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> ReferAsync(string callId, Dictionary? parms = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 209. + +*** + +### SendFaxStopAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> SendFaxStopAsync(string callId, Dictionary? parms = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 199. + +*** + +### StreamAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> StreamAsync(string callId, Dictionary? parms = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 143. + +*** + +### StreamStopAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> StreamStopAsync(string callId, Dictionary? parms = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 146. + +*** + +### TapAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> TapAsync(string callId, Dictionary? parms = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 133. + +*** + +### TapStopAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> TapStopAsync(string callId, Dictionary? parms = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 136. + +*** + +### TranscribeAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> TranscribeAsync(string callId, Dictionary? parms = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 163. + +*** + +### TranscribeStopAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> TranscribeStopAsync(string callId, Dictionary? parms = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 166. + +*** + +### TransferAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> TransferAsync(string callId, Dictionary? parms = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 65. + +*** + +### UpdateAsync(Dictionary\?) + +Python-parity alias for <xref href="SignalWire.REST.Namespaces.Calling.UpdateCallAsync(System.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d)" data-throw-if-not-resolved="false"></xref>. +Mirrors `CallingNamespace.update`. + +#### Signature + +```dotnet +public Task> UpdateAsync(Dictionary? parms = null) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 59. + +*** + +### UpdateCallAsync(Dictionary\?) + +#### Signature + +```dotnet +public Task> UpdateCallAsync(Dictionary? parms = null) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 54. + +*** + +### UserEventAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> UserEventAsync(string callId, Dictionary? parms = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 216. + +## Source + +[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) + +Line 9. diff --git a/fern/products/sdk-reference/dotnet/rest/namespaces/compat-accounts/index.mdx b/fern/products/sdk-reference/dotnet/rest/namespaces/compat-accounts/index.mdx new file mode 100644 index 0000000000..d68427aac5 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/rest/namespaces/compat-accounts/index.mdx @@ -0,0 +1,149 @@ +--- +slug: "/reference/dotnet/rest/namespaces/compat-accounts" +title: "CompatAccounts" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.CompatAccounts" + parent: "rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs" + visibility: "public" +--- +# `CompatAccounts` + +Compat account/subproject management. Lives at the top-level +/api/laml/2010-04-01/Accounts collection (no AccountSid prefix). + +## Signature + +```dotnet +public class CompatAccounts +``` + +## Methods + +### CompatAccounts(HttpClient) + +#### Signature + +```dotnet +public CompatAccounts(HttpClient client) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 69. + +*** + +### CreateAsync(Dictionary\) + +#### Signature + +```dotnet +public Task> CreateAsync(Dictionary kwargs) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 74. + +*** + +### GetAsync(string) + +#### Signature + +```dotnet +public Task> GetAsync(string sid) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 77. + +*** + +### ListAsync(Dictionary\?) + +#### Signature + +```dotnet +public Task> ListAsync(Dictionary? queryParams = null) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 71. + +*** + +### UpdateAsync(string, Dictionary\) + +#### Signature + +```dotnet +public Task> UpdateAsync(string sid, Dictionary kwargs) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 80. + +## Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 65. diff --git a/fern/products/sdk-reference/dotnet/rest/namespaces/compat-applications/index.mdx b/fern/products/sdk-reference/dotnet/rest/namespaces/compat-applications/index.mdx new file mode 100644 index 0000000000..83efaf2e23 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/rest/namespaces/compat-applications/index.mdx @@ -0,0 +1,88 @@ +--- +slug: "/reference/dotnet/rest/namespaces/compat-applications" +title: "CompatApplications" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.CompatApplications" + parent: "rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs" + visibility: "public" +--- +# `CompatApplications` + +Compat applications (Twilio LaML voice/SMS apps). + +## Signature + +```dotnet +public class CompatApplications : CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/rest/crud-resource) + +## Methods + +### CompatApplications(HttpClient, string) + +#### Signature + +```dotnet +public CompatApplications(HttpClient client, string basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 255. + +*** + +### UpdateAsync(string, Dictionary\, CancellationToken) + +Update a resource by ID (PUT basePath/\{id\}). + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override Task> UpdateAsync(string sid, Dictionary kwargs, CancellationToken cancellationToken = default) +``` + +#### Parameters + + + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 257. + +## Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 253. diff --git a/fern/products/sdk-reference/dotnet/rest/namespaces/compat-calls/index.mdx b/fern/products/sdk-reference/dotnet/rest/namespaces/compat-calls/index.mdx new file mode 100644 index 0000000000..faf09aa7bd --- /dev/null +++ b/fern/products/sdk-reference/dotnet/rest/namespaces/compat-calls/index.mdx @@ -0,0 +1,197 @@ +--- +slug: "/reference/dotnet/rest/namespaces/compat-calls" +title: "CompatCalls" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.CompatCalls" + parent: "rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs" + visibility: "public" +--- +# `CompatCalls` + +Compat calls with recording + stream sub-resources. +Inherits standard CRUD; adds Twilio-style compat extensions. + +## Signature + +```dotnet +public class CompatCalls : CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/rest/crud-resource) + +## Methods + +### CompatCalls(HttpClient, string) + +#### Signature + +```dotnet +public CompatCalls(HttpClient client, string basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 88. + +*** + +### StartRecordingAsync(string, Dictionary\) + +#### Signature + +```dotnet +public Task> StartRecordingAsync(string callSid, Dictionary kwargs) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 95. + +*** + +### StartStreamAsync(string, Dictionary\) + +#### Signature + +```dotnet +public Task> StartStreamAsync(string callSid, Dictionary kwargs) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 101. + +*** + +### StopStreamAsync(string, string, Dictionary\) + +#### Signature + +```dotnet +public Task> StopStreamAsync(string callSid, string streamSid, Dictionary kwargs) +``` + +#### Parameters + + + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 104. + +*** + +### UpdateAsync(string, Dictionary\, CancellationToken) + +UPDATE uses POST (Twilio compat) — overrides the generic CrudResource PUT. + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override Task> UpdateAsync(string sid, Dictionary kwargs, CancellationToken cancellationToken = default) +``` + +#### Parameters + + + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 91. + +*** + +### UpdateRecordingAsync(string, string, Dictionary\) + +#### Signature + +```dotnet +public Task> UpdateRecordingAsync(string callSid, string recordingSid, Dictionary kwargs) +``` + +#### Parameters + + + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 98. + +## Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 86. diff --git a/fern/products/sdk-reference/dotnet/rest/namespaces/compat-conferences/index.mdx b/fern/products/sdk-reference/dotnet/rest/namespaces/compat-conferences/index.mdx new file mode 100644 index 0000000000..25d554e8f4 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/rest/namespaces/compat-conferences/index.mdx @@ -0,0 +1,396 @@ +--- +slug: "/reference/dotnet/rest/namespaces/compat-conferences" +title: "CompatConferences" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.CompatConferences" + parent: "rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs" + visibility: "public" +--- +# `CompatConferences` + +Compat conferences with participant, recording, and stream sub-resources. + +## Signature + +```dotnet +public class CompatConferences +``` + +## Properties + + + +## Methods + +### CompatConferences(HttpClient, string) + +#### Signature + +```dotnet +public CompatConferences(HttpClient client, string basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 152. + +*** + +### DeleteRecordingAsync(string, string) + +#### Signature + +```dotnet +public Task> DeleteRecordingAsync(string conferenceSid, string recordingSid) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 193. + +*** + +### GetAsync(string) + +#### Signature + +```dotnet +public Task> GetAsync(string sid) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 166. + +*** + +### GetParticipantAsync(string, string) + +#### Signature + +```dotnet +public Task> GetParticipantAsync(string conferenceSid, string callSid) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 175. + +*** + +### GetRecordingAsync(string, string) + +#### Signature + +```dotnet +public Task> GetRecordingAsync(string conferenceSid, string recordingSid) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 187. + +*** + +### ListAsync(Dictionary\?) + +#### Signature + +```dotnet +public Task> ListAsync(Dictionary? queryParams = null) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 163. + +*** + +### ListParticipantsAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> ListParticipantsAsync(string conferenceSid, Dictionary? queryParams = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 172. + +*** + +### ListRecordingsAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> ListRecordingsAsync(string conferenceSid, Dictionary? queryParams = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 184. + +*** + +### RemoveParticipantAsync(string, string) + +#### Signature + +```dotnet +public Task> RemoveParticipantAsync(string conferenceSid, string callSid) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 181. + +*** + +### StartStreamAsync(string, Dictionary\) + +#### Signature + +```dotnet +public Task> StartStreamAsync(string conferenceSid, Dictionary kwargs) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 196. + +*** + +### StopStreamAsync(string, string, Dictionary\) + +#### Signature + +```dotnet +public Task> StopStreamAsync(string conferenceSid, string streamSid, Dictionary kwargs) +``` + +#### Parameters + + + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 199. + +*** + +### UpdateAsync(string, Dictionary\) + +#### Signature + +```dotnet +public Task> UpdateAsync(string sid, Dictionary kwargs) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 169. + +*** + +### UpdateParticipantAsync(string, string, Dictionary\) + +#### Signature + +```dotnet +public Task> UpdateParticipantAsync(string conferenceSid, string callSid, Dictionary kwargs) +``` + +#### Parameters + + + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 178. + +*** + +### UpdateRecordingAsync(string, string, Dictionary\) + +#### Signature + +```dotnet +public Task> UpdateRecordingAsync(string conferenceSid, string recordingSid, Dictionary kwargs) +``` + +#### Parameters + + + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 190. + +## Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 147. diff --git a/fern/products/sdk-reference/dotnet/rest/namespaces/compat-faxes/index.mdx b/fern/products/sdk-reference/dotnet/rest/namespaces/compat-faxes/index.mdx new file mode 100644 index 0000000000..eacb213a8c --- /dev/null +++ b/fern/products/sdk-reference/dotnet/rest/namespaces/compat-faxes/index.mdx @@ -0,0 +1,166 @@ +--- +slug: "/reference/dotnet/rest/namespaces/compat-faxes" +title: "CompatFaxes" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.CompatFaxes" + parent: "rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs" + visibility: "public" +--- +# `CompatFaxes` + +Compat faxes with media sub-resources. + +## Signature + +```dotnet +public class CompatFaxes : CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/rest/crud-resource) + +## Methods + +### CompatFaxes(HttpClient, string) + +#### Signature + +```dotnet +public CompatFaxes(HttpClient client, string basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 130. + +*** + +### DeleteMediaAsync(string, string) + +#### Signature + +```dotnet +public Task> DeleteMediaAsync(string faxSid, string mediaSid) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 142. + +*** + +### GetMediaAsync(string, string) + +#### Signature + +```dotnet +public Task> GetMediaAsync(string faxSid, string mediaSid) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 139. + +*** + +### ListMediaAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> ListMediaAsync(string faxSid, Dictionary? queryParams = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 136. + +*** + +### UpdateAsync(string, Dictionary\, CancellationToken) + +Update a resource by ID (PUT basePath/\{id\}). + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override Task> UpdateAsync(string sid, Dictionary kwargs, CancellationToken cancellationToken = default) +``` + +#### Parameters + + + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 132. + +## Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 128. diff --git a/fern/products/sdk-reference/dotnet/rest/namespaces/compat-laml-bins/index.mdx b/fern/products/sdk-reference/dotnet/rest/namespaces/compat-laml-bins/index.mdx new file mode 100644 index 0000000000..29eab19b14 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/rest/namespaces/compat-laml-bins/index.mdx @@ -0,0 +1,88 @@ +--- +slug: "/reference/dotnet/rest/namespaces/compat-laml-bins" +title: "CompatLamlBins" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.CompatLamlBins" + parent: "rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs" + visibility: "public" +--- +# `CompatLamlBins` + +Compat cXML / LaML script bins. + +## Signature + +```dotnet +public class CompatLamlBins : CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/rest/crud-resource) + +## Methods + +### CompatLamlBins(HttpClient, string) + +#### Signature + +```dotnet +public CompatLamlBins(HttpClient client, string basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 265. + +*** + +### UpdateAsync(string, Dictionary\, CancellationToken) + +Update a resource by ID (PUT basePath/\{id\}). + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override Task> UpdateAsync(string sid, Dictionary kwargs, CancellationToken cancellationToken = default) +``` + +#### Parameters + + + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 267. + +## Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 263. diff --git a/fern/products/sdk-reference/dotnet/rest/namespaces/compat-messages/index.mdx b/fern/products/sdk-reference/dotnet/rest/namespaces/compat-messages/index.mdx new file mode 100644 index 0000000000..8e21cbcd85 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/rest/namespaces/compat-messages/index.mdx @@ -0,0 +1,166 @@ +--- +slug: "/reference/dotnet/rest/namespaces/compat-messages" +title: "CompatMessages" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.CompatMessages" + parent: "rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs" + visibility: "public" +--- +# `CompatMessages` + +Compat messages with media sub-resources. + +## Signature + +```dotnet +public class CompatMessages : CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/rest/crud-resource) + +## Methods + +### CompatMessages(HttpClient, string) + +#### Signature + +```dotnet +public CompatMessages(HttpClient client, string basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 111. + +*** + +### DeleteMediaAsync(string, string) + +#### Signature + +```dotnet +public Task> DeleteMediaAsync(string messageSid, string mediaSid) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 123. + +*** + +### GetMediaAsync(string, string) + +#### Signature + +```dotnet +public Task> GetMediaAsync(string messageSid, string mediaSid) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 120. + +*** + +### ListMediaAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> ListMediaAsync(string messageSid, Dictionary? queryParams = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 117. + +*** + +### UpdateAsync(string, Dictionary\, CancellationToken) + +Update a resource by ID (PUT basePath/\{id\}). + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override Task> UpdateAsync(string sid, Dictionary kwargs, CancellationToken cancellationToken = default) +``` + +#### Parameters + + + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 113. + +## Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 109. diff --git a/fern/products/sdk-reference/dotnet/rest/namespaces/compat-phone-numbers/index.mdx b/fern/products/sdk-reference/dotnet/rest/namespaces/compat-phone-numbers/index.mdx new file mode 100644 index 0000000000..46a2ce63bd --- /dev/null +++ b/fern/products/sdk-reference/dotnet/rest/namespaces/compat-phone-numbers/index.mdx @@ -0,0 +1,278 @@ +--- +slug: "/reference/dotnet/rest/namespaces/compat-phone-numbers" +title: "CompatPhoneNumbers" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.CompatPhoneNumbers" + parent: "rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs" + visibility: "public" +--- +# `CompatPhoneNumbers` + +Compat phone-number management with purchase, import, and search. + +## Signature + +```dotnet +public class CompatPhoneNumbers +``` + +## Properties + + + +## Methods + +### CompatPhoneNumbers(HttpClient, string) + +#### Signature + +```dotnet +public CompatPhoneNumbers(HttpClient client, string basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 211. + +*** + +### DeleteAsync(string) + +#### Signature + +```dotnet +public Task> DeleteAsync(string sid) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 236. + +*** + +### GetAsync(string) + +#### Signature + +```dotnet +public Task> GetAsync(string sid) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 230. + +*** + +### ImportNumberAsync(Dictionary\) + +#### Signature + +```dotnet +public Task> ImportNumberAsync(Dictionary kwargs) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 239. + +*** + +### ListAsync(Dictionary\?) + +#### Signature + +```dotnet +public Task> ListAsync(Dictionary? queryParams = null) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 224. + +*** + +### ListAvailableCountriesAsync(Dictionary\?) + +#### Signature + +```dotnet +public Task> ListAvailableCountriesAsync(Dictionary? queryParams = null) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 242. + +*** + +### PurchaseAsync(Dictionary\) + +#### Signature + +```dotnet +public Task> PurchaseAsync(Dictionary kwargs) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 227. + +*** + +### SearchLocalAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> SearchLocalAsync(string country, Dictionary? queryParams = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 245. + +*** + +### SearchTollFreeAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> SearchTollFreeAsync(string country, Dictionary? queryParams = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 248. + +*** + +### UpdateAsync(string, Dictionary\) + +#### Signature + +```dotnet +public Task> UpdateAsync(string sid, Dictionary kwargs) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 233. + +## Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 204. diff --git a/fern/products/sdk-reference/dotnet/rest/namespaces/compat-queues/index.mdx b/fern/products/sdk-reference/dotnet/rest/namespaces/compat-queues/index.mdx new file mode 100644 index 0000000000..9ea676e5d1 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/rest/namespaces/compat-queues/index.mdx @@ -0,0 +1,168 @@ +--- +slug: "/reference/dotnet/rest/namespaces/compat-queues" +title: "CompatQueues" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.CompatQueues" + parent: "rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs" + visibility: "public" +--- +# `CompatQueues` + +Compat queues with member management. + +## Signature + +```dotnet +public class CompatQueues : CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/rest/crud-resource) + +## Methods + +### CompatQueues(HttpClient, string) + +#### Signature + +```dotnet +public CompatQueues(HttpClient client, string basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 275. + +*** + +### DequeueMemberAsync(string, string, Dictionary\) + +#### Signature + +```dotnet +public Task> DequeueMemberAsync(string queueSid, string callSid, Dictionary kwargs) +``` + +#### Parameters + + + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 287. + +*** + +### GetMemberAsync(string, string) + +#### Signature + +```dotnet +public Task> GetMemberAsync(string queueSid, string callSid) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 284. + +*** + +### ListMembersAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> ListMembersAsync(string queueSid, Dictionary? queryParams = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 281. + +*** + +### UpdateAsync(string, Dictionary\, CancellationToken) + +Update a resource by ID (PUT basePath/\{id\}). + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override Task> UpdateAsync(string sid, Dictionary kwargs, CancellationToken cancellationToken = default) +``` + +#### Parameters + + + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 277. + +## Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 273. diff --git a/fern/products/sdk-reference/dotnet/rest/namespaces/compat-recordings/index.mdx b/fern/products/sdk-reference/dotnet/rest/namespaces/compat-recordings/index.mdx new file mode 100644 index 0000000000..a1d17dc335 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/rest/namespaces/compat-recordings/index.mdx @@ -0,0 +1,128 @@ +--- +slug: "/reference/dotnet/rest/namespaces/compat-recordings" +title: "CompatRecordings" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.CompatRecordings" + parent: "rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs" + visibility: "public" +--- +# `CompatRecordings` + +Compat recordings (read-only top-level resource). + +## Signature + +```dotnet +public class CompatRecordings +``` + +## Properties + + + +## Methods + +### CompatRecordings(HttpClient, string) + +#### Signature + +```dotnet +public CompatRecordings(HttpClient client, string basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 297. + +*** + +### DeleteAsync(string) + +#### Signature + +```dotnet +public Task> DeleteAsync(string sid) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 313. + +*** + +### GetAsync(string) + +#### Signature + +```dotnet +public Task> GetAsync(string sid) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 310. + +*** + +### ListAsync(Dictionary\?) + +#### Signature + +```dotnet +public Task> ListAsync(Dictionary? queryParams = null) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 307. + +## Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 292. diff --git a/fern/products/sdk-reference/dotnet/rest/namespaces/compat-tokens/index.mdx b/fern/products/sdk-reference/dotnet/rest/namespaces/compat-tokens/index.mdx new file mode 100644 index 0000000000..0f8b101191 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/rest/namespaces/compat-tokens/index.mdx @@ -0,0 +1,130 @@ +--- +slug: "/reference/dotnet/rest/namespaces/compat-tokens" +title: "CompatTokens" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.CompatTokens" + parent: "rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs" + visibility: "public" +--- +# `CompatTokens` + +Compat API tokens — UPDATE uses PATCH (BaseResource style). + +## Signature + +```dotnet +public class CompatTokens +``` + +## Properties + + + +## Methods + +### CompatTokens(HttpClient, string) + +#### Signature + +```dotnet +public CompatTokens(HttpClient client, string basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 349. + +*** + +### CreateAsync(Dictionary\) + +#### Signature + +```dotnet +public Task> CreateAsync(Dictionary kwargs) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 359. + +*** + +### DeleteAsync(string) + +#### Signature + +```dotnet +public Task> DeleteAsync(string tokenId) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 365. + +*** + +### UpdateAsync(string, Dictionary\) + +#### Signature + +```dotnet +public Task> UpdateAsync(string tokenId, Dictionary kwargs) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 362. + +## Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 344. diff --git a/fern/products/sdk-reference/dotnet/rest/namespaces/compat-transcriptions/index.mdx b/fern/products/sdk-reference/dotnet/rest/namespaces/compat-transcriptions/index.mdx new file mode 100644 index 0000000000..7cc5638c17 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/rest/namespaces/compat-transcriptions/index.mdx @@ -0,0 +1,128 @@ +--- +slug: "/reference/dotnet/rest/namespaces/compat-transcriptions" +title: "CompatTranscriptions" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.CompatTranscriptions" + parent: "rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs" + visibility: "public" +--- +# `CompatTranscriptions` + +Compat transcriptions (read-only top-level resource). + +## Signature + +```dotnet +public class CompatTranscriptions +``` + +## Properties + + + +## Methods + +### CompatTranscriptions(HttpClient, string) + +#### Signature + +```dotnet +public CompatTranscriptions(HttpClient client, string basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 323. + +*** + +### DeleteAsync(string) + +#### Signature + +```dotnet +public Task> DeleteAsync(string sid) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 339. + +*** + +### GetAsync(string) + +#### Signature + +```dotnet +public Task> GetAsync(string sid) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 336. + +*** + +### ListAsync(Dictionary\?) + +#### Signature + +```dotnet +public Task> ListAsync(Dictionary? queryParams = null) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 333. + +## Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 318. diff --git a/fern/products/sdk-reference/dotnet/rest/namespaces/compat/index.mdx b/fern/products/sdk-reference/dotnet/rest/namespaces/compat/index.mdx new file mode 100644 index 0000000000..0e3e07f316 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/rest/namespaces/compat/index.mdx @@ -0,0 +1,94 @@ +--- +slug: "/reference/dotnet/rest/namespaces/compat" +title: "Compat" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.Compat" + parent: "rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs" + visibility: "public" +--- +# `Compat` + +Twilio-compatible (LaML) API namespace with AccountSid scoping. + +Mirrors Python `signalwire.rest.namespaces.compat.CompatNamespace`: +the entry-point exposes 12 sub-resources (accounts, calls, messages, +faxes, conferences, phone\_numbers, applications, laml\_bins, queues, +recordings, transcriptions, tokens) under a shared per-account prefix. + +<p>Inherits from <xref href="SignalWire.REST.CrudResource" data-throw-if-not-resolved="false"></xref> so the historical +``client.Compat.List()`` / ``Create`` / ``Get`` / ``Update`` / ``Delete`` +surface continues to work; the per-account collection accessors are +added on top.</p> + +## Signature + +```dotnet +public class Compat : CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/rest/crud-resource) + +## Properties + + + + + + + + + + + + + + + + + + + + + + + + + + + +## Methods + +### Compat(HttpClient, string) + +#### Signature + +```dotnet +public Compat(HttpClient client, string accountSid) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 40. + +## Source + +[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) + +Line 22. diff --git a/fern/products/sdk-reference/dotnet/rest/namespaces/conference-logs/index.mdx b/fern/products/sdk-reference/dotnet/rest/namespaces/conference-logs/index.mdx new file mode 100644 index 0000000000..7c4668594e --- /dev/null +++ b/fern/products/sdk-reference/dotnet/rest/namespaces/conference-logs/index.mdx @@ -0,0 +1,80 @@ +--- +slug: "/reference/dotnet/rest/namespaces/conference-logs" +title: "ConferenceLogs" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.ConferenceLogs" + parent: "rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Logs.cs" + visibility: "public" +--- +# `ConferenceLogs` + +Conference log queries (list-only). + +## Signature + +```dotnet +public class ConferenceLogs +``` + +## Properties + + + +## Methods + +### ConferenceLogs(HttpClient, string) + +#### Signature + +```dotnet +public ConferenceLogs(HttpClient client, string basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/REST/Namespaces/Logs.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Logs.cs) + +Line 114. + +*** + +### ListAsync(Dictionary\?) + +#### Signature + +```dotnet +public Task> ListAsync(Dictionary? queryParams = null) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Logs.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Logs.cs) + +Line 122. + +## Source + +[`src/SignalWire/REST/Namespaces/Logs.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Logs.cs) + +Line 109. diff --git a/fern/products/sdk-reference/dotnet/rest/namespaces/conference-rooms-helper/index.mdx b/fern/products/sdk-reference/dotnet/rest/namespaces/conference-rooms-helper/index.mdx new file mode 100644 index 0000000000..90a0f39c6f --- /dev/null +++ b/fern/products/sdk-reference/dotnet/rest/namespaces/conference-rooms-helper/index.mdx @@ -0,0 +1,83 @@ +--- +slug: "/reference/dotnet/rest/namespaces/conference-rooms-helper" +title: "ConferenceRoomsHelper" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.ConferenceRoomsHelper" + parent: "rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs" + visibility: "public" +--- +# `ConferenceRoomsHelper` + +ConferenceRooms helper providing the singular-path variant +(`/api/fabric/resources/conference_room/{id}/addresses`). + +## Signature + +```dotnet +public class ConferenceRoomsHelper +``` + +## Properties + + + +## Methods + +### ConferenceRoomsHelper(HttpClient, string) + +#### Signature + +```dotnet +public ConferenceRoomsHelper(HttpClient client, string basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) + +Line 183. + +*** + +### ListAddressesAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> ListAddressesAsync(string resourceId, Dictionary? queryParams = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) + +Line 192. + +## Source + +[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) + +Line 177. diff --git a/fern/products/sdk-reference/dotnet/rest/namespaces/cxml-applications-helper/index.mdx b/fern/products/sdk-reference/dotnet/rest/namespaces/cxml-applications-helper/index.mdx new file mode 100644 index 0000000000..3f46c65ca0 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/rest/namespaces/cxml-applications-helper/index.mdx @@ -0,0 +1,56 @@ +--- +slug: "/reference/dotnet/rest/namespaces/cxml-applications-helper" +title: "CxmlApplicationsHelper" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.CxmlApplicationsHelper" + parent: "rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs" + visibility: "public" +--- +# `CxmlApplicationsHelper` + +cXML applications helper. The API has no CREATE endpoint for cXML +applications (POST is rejected); calling Create here throws +NotImplementedException to mirror Python's deliberate behaviour. + +## Signature + +```dotnet +public class CxmlApplicationsHelper +``` + +## Methods + +### CreateAsync(Dictionary\?) + +#### Signature + +```dotnet +public Task> CreateAsync(Dictionary? kwargs = null) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) + +Line 203. + +## Source + +[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) + +Line 201. diff --git a/fern/products/sdk-reference/dotnet/rest/namespaces/datasphere-documents/index.mdx b/fern/products/sdk-reference/dotnet/rest/namespaces/datasphere-documents/index.mdx new file mode 100644 index 0000000000..e272a897bc --- /dev/null +++ b/fern/products/sdk-reference/dotnet/rest/namespaces/datasphere-documents/index.mdx @@ -0,0 +1,156 @@ +--- +slug: "/reference/dotnet/rest/namespaces/datasphere-documents" +title: "DatasphereDocuments" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.DatasphereDocuments" + parent: "rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs" + visibility: "public" +--- +# `DatasphereDocuments` + +Datasphere documents (CRUD + search + chunk methods). + +## Signature + +```dotnet +public class DatasphereDocuments : CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/rest/crud-resource) + +## Methods + +### DatasphereDocuments(HttpClient) + +#### Signature + +```dotnet +public DatasphereDocuments(HttpClient client) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 166. + +*** + +### DeleteChunkAsync(string, string) + +#### Signature + +```dotnet +public Task> DeleteChunkAsync(string documentId, string chunkId) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 178. + +*** + +### GetChunkAsync(string, string) + +#### Signature + +```dotnet +public Task> GetChunkAsync(string documentId, string chunkId) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 175. + +*** + +### ListChunksAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> ListChunksAsync(string documentId, Dictionary? queryParams = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 172. + +*** + +### SearchAsync(Dictionary\) + +#### Signature + +```dotnet +public Task> SearchAsync(Dictionary kwargs) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 169. + +## Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 164. diff --git a/fern/products/sdk-reference/dotnet/rest/namespaces/datasphere-ns/index.mdx b/fern/products/sdk-reference/dotnet/rest/namespaces/datasphere-ns/index.mdx new file mode 100644 index 0000000000..903debe1d7 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/rest/namespaces/datasphere-ns/index.mdx @@ -0,0 +1,63 @@ +--- +slug: "/reference/dotnet/rest/namespaces/datasphere-ns" +title: "DatasphereNs" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.DatasphereNs" + parent: "rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs" + visibility: "public" +--- +# `DatasphereNs` + +Datasphere namespace — documents with chunks/search. + +Mirrors Python `signalwire.rest.namespaces.datasphere.DatasphereNamespace`. +Extends CrudResource — the legacy `client.Datasphere.List` etc went +to /api/datasphere/documents directly; we preserve that surface and +add `Documents` accessor for chunk/search per Python parity. + +## Signature + +```dotnet +public class DatasphereNs : CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/rest/crud-resource) + +## Properties + + + +## Methods + +### DatasphereNs(HttpClient) + +#### Signature + +```dotnet +public DatasphereNs(HttpClient client) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 158. + +## Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 154. diff --git a/fern/products/sdk-reference/dotnet/rest/namespaces/fabric-addresses/index.mdx b/fern/products/sdk-reference/dotnet/rest/namespaces/fabric-addresses/index.mdx new file mode 100644 index 0000000000..c92623f432 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/rest/namespaces/fabric-addresses/index.mdx @@ -0,0 +1,107 @@ +--- +slug: "/reference/dotnet/rest/namespaces/fabric-addresses" +title: "FabricAddresses" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.FabricAddresses" + parent: "rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs" + visibility: "public" +--- +# `FabricAddresses` + +Read-only top-level Fabric addresses resource (lives at +/api/fabric/addresses, NOT under /api/fabric/resources). + +Mirrors Python `signalwire.rest.namespaces.fabric.FabricAddresses`. + +## Signature + +```dotnet +public class FabricAddresses +``` + +## Properties + + + +## Methods + +### FabricAddresses(HttpClient, string) + +#### Signature + +```dotnet +public FabricAddresses(HttpClient client, string basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) + +Line 20. + +*** + +### GetAsync(string) + +#### Signature + +```dotnet +public Task> GetAsync(string addressId) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) + +Line 33. + +*** + +### ListAsync(Dictionary\?) + +#### Signature + +```dotnet +public Task> ListAsync(Dictionary? queryParams = null) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) + +Line 30. + +## Source + +[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) + +Line 15. diff --git a/fern/products/sdk-reference/dotnet/rest/namespaces/fabric-resources/index.mdx b/fern/products/sdk-reference/dotnet/rest/namespaces/fabric-resources/index.mdx new file mode 100644 index 0000000000..9644da6ef5 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/rest/namespaces/fabric-resources/index.mdx @@ -0,0 +1,184 @@ +--- +slug: "/reference/dotnet/rest/namespaces/fabric-resources" +title: "FabricResources" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.FabricResources" + parent: "rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs" + visibility: "public" +--- +# `FabricResources` + +Generic resource operations across all Fabric resource types. + +Lives at /api/fabric/resources (the base) and dispatches to per-type +sub-paths. Mirrors Python's +`signalwire.rest.namespaces.fabric.GenericResources`. + +## Signature + +```dotnet +public class FabricResources +``` + +## Properties + + + +## Methods + +### AssignDomainApplicationAsync(string, Dictionary\) + +#### Signature + +```dotnet +public Task> AssignDomainApplicationAsync(string resourceId, Dictionary kwargs) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) + +Line 72. + +*** + +### DeleteAsync(string) + +#### Signature + +```dotnet +public Task> DeleteAsync(string resourceId) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) + +Line 66. + +*** + +### FabricResources(HttpClient, string) + +#### Signature + +```dotnet +public FabricResources(HttpClient client, string basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) + +Line 49. + +*** + +### GetAsync(string) + +#### Signature + +```dotnet +public Task> GetAsync(string resourceId) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) + +Line 63. + +*** + +### ListAddressesAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> ListAddressesAsync(string resourceId, Dictionary? queryParams = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) + +Line 69. + +*** + +### ListAsync(Dictionary\?) + +#### Signature + +```dotnet +public Task> ListAsync(Dictionary? queryParams = null) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) + +Line 60. + +## Source + +[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) + +Line 44. diff --git a/fern/products/sdk-reference/dotnet/rest/namespaces/fabric-tokens/index.mdx b/fern/products/sdk-reference/dotnet/rest/namespaces/fabric-tokens/index.mdx new file mode 100644 index 0000000000..28410b7b71 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/rest/namespaces/fabric-tokens/index.mdx @@ -0,0 +1,174 @@ +--- +slug: "/reference/dotnet/rest/namespaces/fabric-tokens" +title: "FabricTokens" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.FabricTokens" + parent: "rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs" + visibility: "public" +--- +# `FabricTokens` + +Fabric tokens — subscriber/guest/invite/embed token creation. + +All endpoints sit under /api/fabric (NOT /api/fabric/resources or +/api/fabric/tokens). Mirrors Python's +`signalwire.rest.namespaces.fabric.FabricTokens`. + +## Signature + +```dotnet +public class FabricTokens +``` + +## Methods + +### CreateEmbedTokenAsync(Dictionary\) + +#### Signature + +```dotnet +public Task> CreateEmbedTokenAsync(Dictionary kwargs) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) + +Line 102. + +*** + +### CreateGuestTokenAsync(Dictionary\) + +#### Signature + +```dotnet +public Task> CreateGuestTokenAsync(Dictionary kwargs) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) + +Line 99. + +*** + +### CreateInviteTokenAsync(Dictionary\) + +#### Signature + +```dotnet +public Task> CreateInviteTokenAsync(Dictionary kwargs) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) + +Line 96. + +*** + +### CreateSubscriberTokenAsync(Dictionary\) + +#### Signature + +```dotnet +public Task> CreateSubscriberTokenAsync(Dictionary kwargs) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) + +Line 90. + +*** + +### FabricTokens(HttpClient) + +#### Signature + +```dotnet +public FabricTokens(HttpClient client) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) + +Line 88. + +*** + +### RefreshSubscriberTokenAsync(Dictionary\) + +#### Signature + +```dotnet +public Task> RefreshSubscriberTokenAsync(Dictionary kwargs) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) + +Line 93. + +## Source + +[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) + +Line 83. diff --git a/fern/products/sdk-reference/dotnet/rest/namespaces/fabric/index.mdx b/fern/products/sdk-reference/dotnet/rest/namespaces/fabric/index.mdx new file mode 100644 index 0000000000..ecbc455ba8 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/rest/namespaces/fabric/index.mdx @@ -0,0 +1,133 @@ +--- +slug: "/reference/dotnet/rest/namespaces/fabric" +title: "Fabric" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.Fabric" + parent: "rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Fabric.cs" + visibility: "public" +--- +# `Fabric` + +Fabric API namespace. + +Groups all Fabric sub-resources (subscribers, SIP endpoints, call flows, +SWML scripts, conference rooms, AI agents, etc.) under a single object. +Each sub-resource is lazily initialised as a <xref href="SignalWire.REST.CrudResource" data-throw-if-not-resolved="false"></xref> +pointing at the correct API path under /api/fabric/resources. + +## Signature + +```dotnet +public class Fabric +``` + +## Properties + + + + + Top-level Fabric addresses (read-only — list/get) that lives at /api/fabric/addresses (NOT under /api/fabric/resources). + + + + + + + + CallFlows singular-path operations (list\_addresses, list\_versions, deploy\_version). + + + + + + + + + + ConferenceRooms singular-path operations (list\_addresses). + + + + + + + + cXML applications helper that exposes the deliberate NotImplementedException on Create (matching Python's `CxmlApplicationsResource.create`). + + + + + + + + + + + + + + + + + + + + Generic resources operations (list/get/delete/list\_addresses/ assign\_domain\_application) at /api/fabric/resources. + + + + + + + + + + + + Subscriber-scoped SIP-endpoint operations (get/update/delete) under /api/fabric/resources/subscribers. + + + + + + + + Fabric tokens resource — note this lives at the top-level `/api/fabric/tokens` path, NOT under `/api/fabric/resources`. + + + + Subscriber/guest/invite/embed token endpoints under /api/fabric. Distinct from the per-account `Tokens` accessor which hits /api/fabric/tokens. + + +## Methods + +### Fabric(HttpClient) + +#### Signature + +```dotnet +public Fabric(HttpClient client) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/REST/Namespaces/Fabric.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Fabric.cs) + +Line 50. + +## Source + +[`src/SignalWire/REST/Namespaces/Fabric.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Fabric.cs) + +Line 10. diff --git a/fern/products/sdk-reference/dotnet/rest/namespaces/fax-logs/index.mdx b/fern/products/sdk-reference/dotnet/rest/namespaces/fax-logs/index.mdx new file mode 100644 index 0000000000..a1cc59f7b3 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/rest/namespaces/fax-logs/index.mdx @@ -0,0 +1,104 @@ +--- +slug: "/reference/dotnet/rest/namespaces/fax-logs" +title: "FaxLogs" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.FaxLogs" + parent: "rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Logs.cs" + visibility: "public" +--- +# `FaxLogs` + +Fax log queries. + +## Signature + +```dotnet +public class FaxLogs +``` + +## Properties + + + +## Methods + +### FaxLogs(HttpClient, string) + +#### Signature + +```dotnet +public FaxLogs(HttpClient client, string basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/REST/Namespaces/Logs.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Logs.cs) + +Line 91. + +*** + +### GetAsync(string) + +#### Signature + +```dotnet +public Task> GetAsync(string logId) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Logs.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Logs.cs) + +Line 104. + +*** + +### ListAsync(Dictionary\?) + +#### Signature + +```dotnet +public Task> ListAsync(Dictionary? queryParams = null) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Logs.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Logs.cs) + +Line 101. + +## Source + +[`src/SignalWire/REST/Namespaces/Logs.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Logs.cs) + +Line 86. diff --git a/fern/products/sdk-reference/dotnet/rest/namespaces/imported-numbers/index.mdx b/fern/products/sdk-reference/dotnet/rest/namespaces/imported-numbers/index.mdx new file mode 100644 index 0000000000..c7c20b9d37 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/rest/namespaces/imported-numbers/index.mdx @@ -0,0 +1,59 @@ +--- +slug: "/reference/dotnet/rest/namespaces/imported-numbers" +title: "ImportedNumbers" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.ImportedNumbers" + parent: "rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs" + visibility: "public" +--- +# `ImportedNumbers` + +Imported phone numbers (create only). + +Mirrors Python `signalwire.rest.namespaces.imported_numbers.ImportedNumbersResource`. +Extends CrudResource so the legacy `client.ImportedNumbers.BasePath` +surface keeps working; `CreateAsync` is the only method Python +exposes. + +## Signature + +```dotnet +public class ImportedNumbers : CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/rest/crud-resource) + +## Methods + +### ImportedNumbers(HttpClient) + +#### Signature + +```dotnet +public ImportedNumbers(HttpClient client) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 110. + +## Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 108. diff --git a/fern/products/sdk-reference/dotnet/rest/namespaces/index.mdx b/fern/products/sdk-reference/dotnet/rest/namespaces/index.mdx new file mode 100644 index 0000000000..70a20c9d81 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/rest/namespaces/index.mdx @@ -0,0 +1,226 @@ +--- +slug: "/reference/dotnet/rest/namespaces" +title: "namespaces" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "module" + language: "dotnet" + qualified_name: "rest.namespaces" + parent: "rest" + module: "rest" +--- +# `namespaces` + +## Classes + + + + Addresses namespace (Relay top-level addresses, no update). Mirrors Python `signalwire.rest.namespaces.addresses.AddressesResource`. Inherits CrudResource for the standard list/create/get/delete surface. + + + + CallFlows helper providing the singular-path variants (`/api/fabric/resources/call_flow/{id}/{addresses,versions}`). + + + + Calling API namespace. Provides 37 call-control command methods that each POST to /api/calling/calls with a JSON body containing the command name, an optional call ID, and parameters. + + + + Twilio-compatible (LaML) API namespace with AccountSid scoping. Mirrors Python `signalwire.rest.namespaces.compat.CompatNamespace`: the entry-point exposes 12 sub-resources (accounts, calls, messages, faxes, conferences, phone\_numbers, applications, laml\_bins, queues, recordings, transcriptions, tokens) under a shared per-account prefix. <p>Inherits from <xref href="SignalWire.REST.CrudResource" data-throw-if-not-resolved="false"></xref> so the historical `client.Compat.List()` / `Create` / `Get` / `Update` / `Delete` surface continues to work; the per-account collection accessors are added on top.</p> + + + + Compat account/subproject management. Lives at the top-level /api/laml/2010-04-01/Accounts collection (no AccountSid prefix). + + + + Compat applications (Twilio LaML voice/SMS apps). + + + + Compat calls with recording + stream sub-resources. Inherits standard CRUD; adds Twilio-style compat extensions. + + + + Compat conferences with participant, recording, and stream sub-resources. + + + + Compat faxes with media sub-resources. + + + + Compat cXML / LaML script bins. + + + + Compat messages with media sub-resources. + + + + Compat phone-number management with purchase, import, and search. + + + + Compat queues with member management. + + + + Compat recordings (read-only top-level resource). + + + + Compat API tokens — UPDATE uses PATCH (BaseResource style). + + + + Compat transcriptions (read-only top-level resource). + + + + Conference log queries (list-only). + + + + ConferenceRooms helper providing the singular-path variant (`/api/fabric/resources/conference_room/{id}/addresses`). + + + + cXML applications helper. The API has no CREATE endpoint for cXML applications (POST is rejected); calling Create here throws NotImplementedException to mirror Python's deliberate behaviour. + + + + Datasphere documents (CRUD + search + chunk methods). + + + + Datasphere namespace — documents with chunks/search. Mirrors Python `signalwire.rest.namespaces.datasphere.DatasphereNamespace`. Extends CrudResource — the legacy `client.Datasphere.List` etc went to /api/datasphere/documents directly; we preserve that surface and add `Documents` accessor for chunk/search per Python parity. + + + + Fabric API namespace. Groups all Fabric sub-resources (subscribers, SIP endpoints, call flows, SWML scripts, conference rooms, AI agents, etc.) under a single object. Each sub-resource is lazily initialised as a <xref href="SignalWire.REST.CrudResource" data-throw-if-not-resolved="false"></xref> pointing at the correct API path under /api/fabric/resources. + + + + Read-only top-level Fabric addresses resource (lives at /api/fabric/addresses, NOT under /api/fabric/resources). Mirrors Python `signalwire.rest.namespaces.fabric.FabricAddresses`. + + + + Generic resource operations across all Fabric resource types. Lives at /api/fabric/resources (the base) and dispatches to per-type sub-paths. Mirrors Python's `signalwire.rest.namespaces.fabric.GenericResources`. + + + + Fabric tokens — subscriber/guest/invite/embed token creation. All endpoints sit under /api/fabric (NOT /api/fabric/resources or /api/fabric/tokens). Mirrors Python's `signalwire.rest.namespaces.fabric.FabricTokens`. + + + + Fax log queries. + + + + Imported phone numbers (create only). Mirrors Python `signalwire.rest.namespaces.imported_numbers.ImportedNumbersResource`. Extends CrudResource so the legacy `client.ImportedNumbers.BasePath` surface keeps working; `CreateAsync` is the only method Python exposes. + + + + Logs API namespace — message, voice, fax, and conference logs (read-only). Mirrors Python `signalwire.rest.namespaces.logs.LogsNamespace`. Each kind of log lives at a different sub-API path. <p>Inherits from <xref href="SignalWire.REST.CrudResource" data-throw-if-not-resolved="false"></xref> so the legacy `client.Logs.BasePath` accessor still resolves; the new Messages/Voice/Fax/Conferences accessors point at the actual per-API log endpoints.</p> + + + + Message log queries. + + + + Multi-Factor Authentication namespace (sms / call / verify dispatch). Mirrors Python `signalwire.rest.namespaces.mfa.MfaResource`. Extends CrudResource so the legacy `client.Mfa.BasePath` / `client.Mfa.Create` surface keeps working. + + + + Number Groups (CRUD + membership operations; update via PUT). Mirrors Python `signalwire.rest.namespaces.number_groups.NumberGroupsResource`. Note delete\_membership / get\_membership target the top-level `/api/relay/rest/number_group_memberships/{id}` path, NOT the nested per-group sub-collection. + + + + Project namespace — exposes ProjectTokens (PATCH update). Mirrors Python `signalwire.rest.namespaces.project.ProjectNamespace`. Extends CrudResource for the legacy `client.Project.BasePath` test. + + + + Project API tokens — PATCH for update. + + + + Queues namespace (Relay queues with member operations). Mirrors Python `signalwire.rest.namespaces.queues.QueuesResource`. Note: per-port adapter mismatches with the legacy CrudResource at /api/fabric/resources/queues — this lives at /api/relay/rest/queues. + + + + Recordings namespace (Relay top-level recordings, list/get/delete). Mirrors Python `signalwire.rest.namespaces.recordings.RecordingsResource`. Inherits CrudResource for the standard list/get/delete surface. + + + + 10DLC Campaign Registry namespace — brands, campaigns, orders, numbers. Mirrors Python `signalwire.rest.namespaces.registry.RegistryNamespace` (everything under /api/relay/rest/registry/beta). <p>Inherits from <xref href="SignalWire.REST.CrudResource" data-throw-if-not-resolved="false"></xref> so the legacy `client.Registry.BasePath` accessor still resolves; the new Brands/Campaigns/Orders/Numbers accessors target the per-resource endpoints under /api/relay/rest/registry/beta.</p> + + + + 10DLC brand management. + + + + 10DLC campaign management — update via PUT. + + + + 10DLC number assignment management. + + + + 10DLC assignment order management (read-only). + + + + Short codes (list/get/update — no create/delete; update via PUT). Mirrors Python `signalwire.rest.namespaces.short_codes.ShortCodesResource`. Extends CrudResource — overrides UpdateAsync to use PUT (matching Python's \_update\_method = "PUT" on this resource). + + + + Project SIP profile (singleton resource — get/update only, update via PUT). Mirrors Python `signalwire.rest.namespaces.sip_profile.SipProfileResource`. Extends CrudResource for the legacy `client.SipProfile.BasePath` test — the Python-parity singleton path is /api/relay/rest/sip\_profile; the legacy .NET path was /api/relay/rest/sip\_profiles. The legacy accessor target is preserved while `GetAsync()/UpdateAsync(kwargs)` hit the singleton path. + + + + Subscribers helper exposing per-subscriber SIP-endpoint operations. Mirrors Python's `SubscribersResource` SIP endpoint methods. + + + + Video API namespace. Mirrors Python `signalwire.rest.namespaces.video.VideoNamespace` — rooms, room sessions, room recordings, conferences, conference tokens, streams. <p>The legacy `client.Video.List() / Create / Get / Delete` surface (which targeted `/api/video/rooms`) is preserved by inheriting from <xref href="SignalWire.REST.CrudResource" data-throw-if-not-resolved="false"></xref>.</p> + + + + Video conferences (CRUD with PUT update + tokens/streams subresources). + + + + Video conference tokens: get + reset. + + + + Video room recordings: list, get, delete, list\_events. + + + + Video rooms (CRUD + streams sub-resource). + + + + Video room sessions: list, get, list\_events/\_members/\_recordings. + + + + Video room tokens (create-only). + + + + Video streams: get, update (PUT), delete. + + + + Voice log queries with events sub-collection. + + diff --git a/fern/products/sdk-reference/dotnet/rest/namespaces/logs/index.mdx b/fern/products/sdk-reference/dotnet/rest/namespaces/logs/index.mdx new file mode 100644 index 0000000000..08b0e7eb0b --- /dev/null +++ b/fern/products/sdk-reference/dotnet/rest/namespaces/logs/index.mdx @@ -0,0 +1,72 @@ +--- +slug: "/reference/dotnet/rest/namespaces/logs" +title: "Logs" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.Logs" + parent: "rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Logs.cs" + visibility: "public" +--- +# `Logs` + +Logs API namespace — message, voice, fax, and conference logs (read-only). + +Mirrors Python `signalwire.rest.namespaces.logs.LogsNamespace`. +Each kind of log lives at a different sub-API path. + +<p>Inherits from <xref href="SignalWire.REST.CrudResource" data-throw-if-not-resolved="false"></xref> so the legacy +``client.Logs.BasePath`` accessor still resolves; the new +Messages/Voice/Fax/Conferences accessors point at the actual per-API +log endpoints.</p> + +## Signature + +```dotnet +public class Logs : CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/rest/crud-resource) + +## Properties + + + + + + + + + +## Methods + +### Logs(HttpClient) + +#### Signature + +```dotnet +public Logs(HttpClient client) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/REST/Namespaces/Logs.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Logs.cs) + +Line 27. + +## Source + +[`src/SignalWire/REST/Namespaces/Logs.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Logs.cs) + +Line 20. diff --git a/fern/products/sdk-reference/dotnet/rest/namespaces/message-logs/index.mdx b/fern/products/sdk-reference/dotnet/rest/namespaces/message-logs/index.mdx new file mode 100644 index 0000000000..a6bec35741 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/rest/namespaces/message-logs/index.mdx @@ -0,0 +1,104 @@ +--- +slug: "/reference/dotnet/rest/namespaces/message-logs" +title: "MessageLogs" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.MessageLogs" + parent: "rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Logs.cs" + visibility: "public" +--- +# `MessageLogs` + +Message log queries. + +## Signature + +```dotnet +public class MessageLogs +``` + +## Properties + + + +## Methods + +### GetAsync(string) + +#### Signature + +```dotnet +public Task> GetAsync(string logId) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Logs.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Logs.cs) + +Line 54. + +*** + +### ListAsync(Dictionary\?) + +#### Signature + +```dotnet +public Task> ListAsync(Dictionary? queryParams = null) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Logs.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Logs.cs) + +Line 51. + +*** + +### MessageLogs(HttpClient, string) + +#### Signature + +```dotnet +public MessageLogs(HttpClient client, string basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/REST/Namespaces/Logs.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Logs.cs) + +Line 41. + +## Source + +[`src/SignalWire/REST/Namespaces/Logs.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Logs.cs) + +Line 36. diff --git a/fern/products/sdk-reference/dotnet/rest/namespaces/mfa/index.mdx b/fern/products/sdk-reference/dotnet/rest/namespaces/mfa/index.mdx new file mode 100644 index 0000000000..8aebd63962 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/rest/namespaces/mfa/index.mdx @@ -0,0 +1,132 @@ +--- +slug: "/reference/dotnet/rest/namespaces/mfa" +title: "Mfa" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.Mfa" + parent: "rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs" + visibility: "public" +--- +# `Mfa` + +Multi-Factor Authentication namespace (sms / call / verify dispatch). + +Mirrors Python `signalwire.rest.namespaces.mfa.MfaResource`. +Extends CrudResource so the legacy `client.Mfa.BasePath` / +`client.Mfa.Create` surface keeps working. + +## Signature + +```dotnet +public class Mfa : CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/rest/crud-resource) + +## Methods + +### CallAsync(Dictionary\) + +#### Signature + +```dotnet +public Task> CallAsync(Dictionary kwargs) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 23. + +*** + +### Mfa(HttpClient) + +#### Signature + +```dotnet +public Mfa(HttpClient client) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 18. + +*** + +### SmsAsync(Dictionary\) + +#### Signature + +```dotnet +public Task> SmsAsync(Dictionary kwargs) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 20. + +*** + +### VerifyAsync(string, Dictionary\) + +#### Signature + +```dotnet +public Task> VerifyAsync(string requestId, Dictionary kwargs) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 26. + +## Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 16. diff --git a/fern/products/sdk-reference/dotnet/rest/namespaces/number-groups/index.mdx b/fern/products/sdk-reference/dotnet/rest/namespaces/number-groups/index.mdx new file mode 100644 index 0000000000..b0041a2a0b --- /dev/null +++ b/fern/products/sdk-reference/dotnet/rest/namespaces/number-groups/index.mdx @@ -0,0 +1,191 @@ +--- +slug: "/reference/dotnet/rest/namespaces/number-groups" +title: "NumberGroups" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.NumberGroups" + parent: "rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs" + visibility: "public" +--- +# `NumberGroups` + +Number Groups (CRUD + membership operations; update via PUT). + +Mirrors Python `signalwire.rest.namespaces.number_groups.NumberGroupsResource`. +Note delete\_membership / get\_membership target the top-level +`/api/relay/rest/number_group_memberships/{id}` path, NOT the +nested per-group sub-collection. + +## Signature + +```dotnet +public class NumberGroups : CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/rest/crud-resource) + +## Methods + +### AddMembershipAsync(string, Dictionary\) + +#### Signature + +```dotnet +public Task> AddMembershipAsync(string groupId, Dictionary kwargs) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 90. + +*** + +### DeleteMembershipAsync(string) + +#### Signature + +```dotnet +public Task> DeleteMembershipAsync(string membershipId) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 96. + +*** + +### GetMembershipAsync(string) + +#### Signature + +```dotnet +public Task> GetMembershipAsync(string membershipId) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 93. + +*** + +### ListMembershipsAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> ListMembershipsAsync(string groupId, Dictionary? queryParams = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 87. + +*** + +### NumberGroups(HttpClient) + +#### Signature + +```dotnet +public NumberGroups(HttpClient client) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 80. + +*** + +### UpdateAsync(string, Dictionary\, CancellationToken) + +Update a resource by ID (PUT basePath/\{id\}). + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override Task> UpdateAsync(string id, Dictionary kwargs, CancellationToken cancellationToken = default) +``` + +#### Parameters + + + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 83. + +## Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 78. diff --git a/fern/products/sdk-reference/dotnet/rest/namespaces/project-tokens/index.mdx b/fern/products/sdk-reference/dotnet/rest/namespaces/project-tokens/index.mdx new file mode 100644 index 0000000000..4ce5368fbd --- /dev/null +++ b/fern/products/sdk-reference/dotnet/rest/namespaces/project-tokens/index.mdx @@ -0,0 +1,124 @@ +--- +slug: "/reference/dotnet/rest/namespaces/project-tokens" +title: "ProjectTokens" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.ProjectTokens" + parent: "rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs" + visibility: "public" +--- +# `ProjectTokens` + +Project API tokens — PATCH for update. + +## Signature + +```dotnet +public class ProjectTokens +``` + +## Methods + +### CreateAsync(Dictionary\) + +#### Signature + +```dotnet +public Task> CreateAsync(Dictionary kwargs) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 136. + +*** + +### DeleteAsync(string) + +#### Signature + +```dotnet +public Task> DeleteAsync(string tokenId) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 142. + +*** + +### ProjectTokens(HttpClient) + +#### Signature + +```dotnet +public ProjectTokens(HttpClient client) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 134. + +*** + +### UpdateAsync(string, Dictionary\) + +#### Signature + +```dotnet +public Task> UpdateAsync(string tokenId, Dictionary kwargs) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 139. + +## Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 130. diff --git a/fern/products/sdk-reference/dotnet/rest/namespaces/project/index.mdx b/fern/products/sdk-reference/dotnet/rest/namespaces/project/index.mdx new file mode 100644 index 0000000000..7eaf3d6428 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/rest/namespaces/project/index.mdx @@ -0,0 +1,61 @@ +--- +slug: "/reference/dotnet/rest/namespaces/project" +title: "Project" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.Project" + parent: "rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs" + visibility: "public" +--- +# `Project` + +Project namespace — exposes ProjectTokens (PATCH update). + +Mirrors Python `signalwire.rest.namespaces.project.ProjectNamespace`. +Extends CrudResource for the legacy `client.Project.BasePath` test. + +## Signature + +```dotnet +public class Project : CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/rest/crud-resource) + +## Properties + + + +## Methods + +### Project(HttpClient) + +#### Signature + +```dotnet +public Project(HttpClient client) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 124. + +## Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 120. diff --git a/fern/products/sdk-reference/dotnet/rest/namespaces/queues/index.mdx b/fern/products/sdk-reference/dotnet/rest/namespaces/queues/index.mdx new file mode 100644 index 0000000000..d8e11533f4 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/rest/namespaces/queues/index.mdx @@ -0,0 +1,166 @@ +--- +slug: "/reference/dotnet/rest/namespaces/queues" +title: "Queues" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.Queues" + parent: "rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs" + visibility: "public" +--- +# `Queues` + +Queues namespace (Relay queues with member operations). + +Mirrors Python `signalwire.rest.namespaces.queues.QueuesResource`. +Note: per-port adapter mismatches with the legacy CrudResource at +/api/fabric/resources/queues — this lives at /api/relay/rest/queues. + +## Signature + +```dotnet +public class Queues : CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/rest/crud-resource) + +## Methods + +### GetMemberAsync(string, string) + +#### Signature + +```dotnet +public Task> GetMemberAsync(string queueId, string memberId) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 228. + +*** + +### GetNextMemberAsync(string) + +#### Signature + +```dotnet +public Task> GetNextMemberAsync(string queueId) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 225. + +*** + +### ListMembersAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> ListMembersAsync(string queueId, Dictionary? queryParams = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 222. + +*** + +### Queues(HttpClient) + +#### Signature + +```dotnet +public Queues(HttpClient client) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 215. + +*** + +### UpdateAsync(string, Dictionary\, CancellationToken) + +Update a resource by ID (PUT basePath/\{id\}). + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override Task> UpdateAsync(string id, Dictionary kwargs, CancellationToken cancellationToken = default) +``` + +#### Parameters + + + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 218. + +## Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 213. diff --git a/fern/products/sdk-reference/dotnet/rest/namespaces/recordings/index.mdx b/fern/products/sdk-reference/dotnet/rest/namespaces/recordings/index.mdx new file mode 100644 index 0000000000..25a3f28e05 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/rest/namespaces/recordings/index.mdx @@ -0,0 +1,57 @@ +--- +slug: "/reference/dotnet/rest/namespaces/recordings" +title: "Recordings" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.Recordings" + parent: "rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs" + visibility: "public" +--- +# `Recordings` + +Recordings namespace (Relay top-level recordings, list/get/delete). + +Mirrors Python `signalwire.rest.namespaces.recordings.RecordingsResource`. +Inherits CrudResource for the standard list/get/delete surface. + +## Signature + +```dotnet +public class Recordings : CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/rest/crud-resource) + +## Methods + +### Recordings(HttpClient) + +#### Signature + +```dotnet +public Recordings(HttpClient client) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 202. + +## Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 200. diff --git a/fern/products/sdk-reference/dotnet/rest/namespaces/registry-brands/index.mdx b/fern/products/sdk-reference/dotnet/rest/namespaces/registry-brands/index.mdx new file mode 100644 index 0000000000..d96efa3cdc --- /dev/null +++ b/fern/products/sdk-reference/dotnet/rest/namespaces/registry-brands/index.mdx @@ -0,0 +1,180 @@ +--- +slug: "/reference/dotnet/rest/namespaces/registry-brands" +title: "RegistryBrands" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.RegistryBrands" + parent: "rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs" + visibility: "public" +--- +# `RegistryBrands` + +10DLC brand management. + +## Signature + +```dotnet +public class RegistryBrands +``` + +## Properties + + + +## Methods + +### CreateAsync(Dictionary\) + +#### Signature + +```dotnet +public Task> CreateAsync(Dictionary kwargs) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Registry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs) + +Line 57. + +*** + +### CreateCampaignAsync(string, Dictionary\) + +#### Signature + +```dotnet +public Task> CreateCampaignAsync(string brandId, Dictionary kwargs) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Registry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs) + +Line 66. + +*** + +### GetAsync(string) + +#### Signature + +```dotnet +public Task> GetAsync(string brandId) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Registry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs) + +Line 60. + +*** + +### ListAsync(Dictionary\?) + +#### Signature + +```dotnet +public Task> ListAsync(Dictionary? queryParams = null) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Registry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs) + +Line 54. + +*** + +### ListCampaignsAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> ListCampaignsAsync(string brandId, Dictionary? queryParams = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Registry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs) + +Line 63. + +*** + +### RegistryBrands(HttpClient, string) + +#### Signature + +```dotnet +public RegistryBrands(HttpClient client, string basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/REST/Namespaces/Registry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs) + +Line 43. + +## Source + +[`src/SignalWire/REST/Namespaces/Registry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs) + +Line 38. diff --git a/fern/products/sdk-reference/dotnet/rest/namespaces/registry-campaigns/index.mdx b/fern/products/sdk-reference/dotnet/rest/namespaces/registry-campaigns/index.mdx new file mode 100644 index 0000000000..2dd6895f4b --- /dev/null +++ b/fern/products/sdk-reference/dotnet/rest/namespaces/registry-campaigns/index.mdx @@ -0,0 +1,184 @@ +--- +slug: "/reference/dotnet/rest/namespaces/registry-campaigns" +title: "RegistryCampaigns" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.RegistryCampaigns" + parent: "rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs" + visibility: "public" +--- +# `RegistryCampaigns` + +10DLC campaign management — update via PUT. + +## Signature + +```dotnet +public class RegistryCampaigns +``` + +## Properties + + + +## Methods + +### CreateOrderAsync(string, Dictionary\) + +#### Signature + +```dotnet +public Task> CreateOrderAsync(string campaignId, Dictionary kwargs) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Registry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs) + +Line 99. + +*** + +### GetAsync(string) + +#### Signature + +```dotnet +public Task> GetAsync(string campaignId) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Registry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs) + +Line 87. + +*** + +### ListNumbersAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> ListNumbersAsync(string campaignId, Dictionary? queryParams = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Registry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs) + +Line 93. + +*** + +### ListOrdersAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> ListOrdersAsync(string campaignId, Dictionary? queryParams = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Registry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs) + +Line 96. + +*** + +### RegistryCampaigns(HttpClient, string) + +#### Signature + +```dotnet +public RegistryCampaigns(HttpClient client, string basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/REST/Namespaces/Registry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs) + +Line 76. + +*** + +### UpdateAsync(string, Dictionary\) + +#### Signature + +```dotnet +public Task> UpdateAsync(string campaignId, Dictionary kwargs) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Registry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs) + +Line 90. + +## Source + +[`src/SignalWire/REST/Namespaces/Registry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs) + +Line 71. diff --git a/fern/products/sdk-reference/dotnet/rest/namespaces/registry-numbers/index.mdx b/fern/products/sdk-reference/dotnet/rest/namespaces/registry-numbers/index.mdx new file mode 100644 index 0000000000..77d8137d84 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/rest/namespaces/registry-numbers/index.mdx @@ -0,0 +1,80 @@ +--- +slug: "/reference/dotnet/rest/namespaces/registry-numbers" +title: "RegistryNumbers" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.RegistryNumbers" + parent: "rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs" + visibility: "public" +--- +# `RegistryNumbers` + +10DLC number assignment management. + +## Signature + +```dotnet +public class RegistryNumbers +``` + +## Properties + + + +## Methods + +### DeleteAsync(string) + +#### Signature + +```dotnet +public Task> DeleteAsync(string numberId) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Registry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs) + +Line 139. + +*** + +### RegistryNumbers(HttpClient, string) + +#### Signature + +```dotnet +public RegistryNumbers(HttpClient client, string basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/REST/Namespaces/Registry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs) + +Line 129. + +## Source + +[`src/SignalWire/REST/Namespaces/Registry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs) + +Line 124. diff --git a/fern/products/sdk-reference/dotnet/rest/namespaces/registry-orders/index.mdx b/fern/products/sdk-reference/dotnet/rest/namespaces/registry-orders/index.mdx new file mode 100644 index 0000000000..87ae0cc587 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/rest/namespaces/registry-orders/index.mdx @@ -0,0 +1,80 @@ +--- +slug: "/reference/dotnet/rest/namespaces/registry-orders" +title: "RegistryOrders" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.RegistryOrders" + parent: "rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs" + visibility: "public" +--- +# `RegistryOrders` + +10DLC assignment order management (read-only). + +## Signature + +```dotnet +public class RegistryOrders +``` + +## Properties + + + +## Methods + +### GetAsync(string) + +#### Signature + +```dotnet +public Task> GetAsync(string orderId) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Registry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs) + +Line 119. + +*** + +### RegistryOrders(HttpClient, string) + +#### Signature + +```dotnet +public RegistryOrders(HttpClient client, string basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/REST/Namespaces/Registry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs) + +Line 109. + +## Source + +[`src/SignalWire/REST/Namespaces/Registry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs) + +Line 104. diff --git a/fern/products/sdk-reference/dotnet/rest/namespaces/registry/index.mdx b/fern/products/sdk-reference/dotnet/rest/namespaces/registry/index.mdx new file mode 100644 index 0000000000..994894de55 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/rest/namespaces/registry/index.mdx @@ -0,0 +1,72 @@ +--- +slug: "/reference/dotnet/rest/namespaces/registry" +title: "Registry" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.Registry" + parent: "rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs" + visibility: "public" +--- +# `Registry` + +10DLC Campaign Registry namespace — brands, campaigns, orders, numbers. + +Mirrors Python `signalwire.rest.namespaces.registry.RegistryNamespace` +(everything under /api/relay/rest/registry/beta). + +<p>Inherits from <xref href="SignalWire.REST.CrudResource" data-throw-if-not-resolved="false"></xref> so the legacy +``client.Registry.BasePath`` accessor still resolves; the new +Brands/Campaigns/Orders/Numbers accessors target the per-resource +endpoints under /api/relay/rest/registry/beta.</p> + +## Signature + +```dotnet +public class Registry : CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/rest/crud-resource) + +## Properties + + + + + + + + + +## Methods + +### Registry(HttpClient) + +#### Signature + +```dotnet +public Registry(HttpClient client) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/REST/Namespaces/Registry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs) + +Line 29. + +## Source + +[`src/SignalWire/REST/Namespaces/Registry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs) + +Line 20. diff --git a/fern/products/sdk-reference/dotnet/rest/namespaces/short-codes/index.mdx b/fern/products/sdk-reference/dotnet/rest/namespaces/short-codes/index.mdx new file mode 100644 index 0000000000..aec91901bd --- /dev/null +++ b/fern/products/sdk-reference/dotnet/rest/namespaces/short-codes/index.mdx @@ -0,0 +1,90 @@ +--- +slug: "/reference/dotnet/rest/namespaces/short-codes" +title: "ShortCodes" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.ShortCodes" + parent: "rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs" + visibility: "public" +--- +# `ShortCodes` + +Short codes (list/get/update — no create/delete; update via PUT). + +Mirrors Python `signalwire.rest.namespaces.short_codes.ShortCodesResource`. +Extends CrudResource — overrides UpdateAsync to use PUT (matching +Python's \_update\_method = "PUT" on this resource). + +## Signature + +```dotnet +public class ShortCodes : CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/rest/crud-resource) + +## Methods + +### ShortCodes(HttpClient) + +#### Signature + +```dotnet +public ShortCodes(HttpClient client) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 63. + +*** + +### UpdateAsync(string, Dictionary\, CancellationToken) + +Update a resource by ID (PUT basePath/\{id\}). + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override Task> UpdateAsync(string id, Dictionary kwargs, CancellationToken cancellationToken = default) +``` + +#### Parameters + + + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 65. + +## Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 61. diff --git a/fern/products/sdk-reference/dotnet/rest/namespaces/sip-profile/index.mdx b/fern/products/sdk-reference/dotnet/rest/namespaces/sip-profile/index.mdx new file mode 100644 index 0000000000..a9b867291f --- /dev/null +++ b/fern/products/sdk-reference/dotnet/rest/namespaces/sip-profile/index.mdx @@ -0,0 +1,111 @@ +--- +slug: "/reference/dotnet/rest/namespaces/sip-profile" +title: "SipProfile" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.SipProfile" + parent: "rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs" + visibility: "public" +--- +# `SipProfile` + +Project SIP profile (singleton resource — get/update only, update via PUT). + +Mirrors Python `signalwire.rest.namespaces.sip_profile.SipProfileResource`. +Extends CrudResource for the legacy `client.SipProfile.BasePath` test +— the Python-parity singleton path is /api/relay/rest/sip\_profile; +the legacy .NET path was /api/relay/rest/sip\_profiles. The legacy +accessor target is preserved while `GetAsync()/UpdateAsync(kwargs)` +hit the singleton path. + +## Signature + +```dotnet +public class SipProfile : CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/rest/crud-resource) + +## Properties + + + Singleton resource path (Python parity). + + +## Methods + +### GetAsync() + +#### Signature + +```dotnet +public Task> GetAsync() +``` + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 47. + +*** + +### SipProfile(HttpClient) + +#### Signature + +```dotnet +public SipProfile(HttpClient client) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 45. + +*** + +### UpdateAsync(Dictionary\) + +#### Signature + +```dotnet +public Task> UpdateAsync(Dictionary kwargs) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 50. + +## Source + +[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) + +Line 40. diff --git a/fern/products/sdk-reference/dotnet/rest/namespaces/subscribers-helper/index.mdx b/fern/products/sdk-reference/dotnet/rest/namespaces/subscribers-helper/index.mdx new file mode 100644 index 0000000000..ab95b05f5c --- /dev/null +++ b/fern/products/sdk-reference/dotnet/rest/namespaces/subscribers-helper/index.mdx @@ -0,0 +1,190 @@ +--- +slug: "/reference/dotnet/rest/namespaces/subscribers-helper" +title: "SubscribersHelper" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.SubscribersHelper" + parent: "rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs" + visibility: "public" +--- +# `SubscribersHelper` + +Subscribers helper exposing per-subscriber SIP-endpoint operations. + +Mirrors Python's `SubscribersResource` SIP endpoint methods. + +## Signature + +```dotnet +public class SubscribersHelper +``` + +## Properties + + + +## Methods + +### CreateSipEndpointAsync(string, Dictionary\) + +#### Signature + +```dotnet +public Task> CreateSipEndpointAsync(string subscriberId, Dictionary kwargs) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) + +Line 130. + +*** + +### DeleteSipEndpointAsync(string, string) + +#### Signature + +```dotnet +public Task> DeleteSipEndpointAsync(string subscriberId, string endpointId) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) + +Line 139. + +*** + +### GetSipEndpointAsync(string, string) + +#### Signature + +```dotnet +public Task> GetSipEndpointAsync(string subscriberId, string endpointId) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) + +Line 133. + +*** + +### ListSipEndpointsAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> ListSipEndpointsAsync(string subscriberId, Dictionary? queryParams = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) + +Line 127. + +*** + +### SubscribersHelper(HttpClient, string) + +#### Signature + +```dotnet +public SubscribersHelper(HttpClient client, string basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) + +Line 116. + +*** + +### UpdateSipEndpointAsync(string, string, Dictionary\) + +#### Signature + +```dotnet +public Task> UpdateSipEndpointAsync(string subscriberId, string endpointId, Dictionary kwargs) +``` + +#### Parameters + + + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) + +Line 136. + +## Source + +[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) + +Line 111. diff --git a/fern/products/sdk-reference/dotnet/rest/namespaces/video-conference-tokens/index.mdx b/fern/products/sdk-reference/dotnet/rest/namespaces/video-conference-tokens/index.mdx new file mode 100644 index 0000000000..6c799ed7a4 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/rest/namespaces/video-conference-tokens/index.mdx @@ -0,0 +1,104 @@ +--- +slug: "/reference/dotnet/rest/namespaces/video-conference-tokens" +title: "VideoConferenceTokens" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.VideoConferenceTokens" + parent: "rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs" + visibility: "public" +--- +# `VideoConferenceTokens` + +Video conference tokens: get + reset. + +## Signature + +```dotnet +public class VideoConferenceTokens +``` + +## Properties + + + +## Methods + +### GetAsync(string) + +#### Signature + +```dotnet +public Task> GetAsync(string tokenId) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 177. + +*** + +### ResetAsync(string) + +#### Signature + +```dotnet +public Task> ResetAsync(string tokenId) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 180. + +*** + +### VideoConferenceTokens(HttpClient, string) + +#### Signature + +```dotnet +public VideoConferenceTokens(HttpClient client, string basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 166. + +## Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 161. diff --git a/fern/products/sdk-reference/dotnet/rest/namespaces/video-conferences/index.mdx b/fern/products/sdk-reference/dotnet/rest/namespaces/video-conferences/index.mdx new file mode 100644 index 0000000000..f69588b5cf --- /dev/null +++ b/fern/products/sdk-reference/dotnet/rest/namespaces/video-conferences/index.mdx @@ -0,0 +1,166 @@ +--- +slug: "/reference/dotnet/rest/namespaces/video-conferences" +title: "VideoConferences" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.VideoConferences" + parent: "rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs" + visibility: "public" +--- +# `VideoConferences` + +Video conferences (CRUD with PUT update + tokens/streams subresources). + +## Signature + +```dotnet +public class VideoConferences : CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/rest/crud-resource) + +## Methods + +### CreateStreamAsync(string, Dictionary\) + +#### Signature + +```dotnet +public Task> CreateStreamAsync(string conferenceId, Dictionary kwargs) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 156. + +*** + +### ListConferenceTokensAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> ListConferenceTokensAsync(string conferenceId, Dictionary? queryParams = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 150. + +*** + +### ListStreamsAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> ListStreamsAsync(string conferenceId, Dictionary? queryParams = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 153. + +*** + +### UpdateAsync(string, Dictionary\, CancellationToken) + +Update a resource by ID (PUT basePath/\{id\}). + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override Task> UpdateAsync(string id, Dictionary kwargs, CancellationToken cancellationToken = default) +``` + +#### Parameters + + + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 146. + +*** + +### VideoConferences(HttpClient, string) + +#### Signature + +```dotnet +public VideoConferences(HttpClient client, string basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 144. + +## Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 142. diff --git a/fern/products/sdk-reference/dotnet/rest/namespaces/video-room-recordings/index.mdx b/fern/products/sdk-reference/dotnet/rest/namespaces/video-room-recordings/index.mdx new file mode 100644 index 0000000000..93c0d8e8f7 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/rest/namespaces/video-room-recordings/index.mdx @@ -0,0 +1,154 @@ +--- +slug: "/reference/dotnet/rest/namespaces/video-room-recordings" +title: "VideoRoomRecordings" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.VideoRoomRecordings" + parent: "rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs" + visibility: "public" +--- +# `VideoRoomRecordings` + +Video room recordings: list, get, delete, list\_events. + +## Signature + +```dotnet +public class VideoRoomRecordings +``` + +## Properties + + + +## Methods + +### DeleteAsync(string) + +#### Signature + +```dotnet +public Task> DeleteAsync(string recordingId) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 134. + +*** + +### GetAsync(string) + +#### Signature + +```dotnet +public Task> GetAsync(string recordingId) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 131. + +*** + +### ListAsync(Dictionary\?) + +#### Signature + +```dotnet +public Task> ListAsync(Dictionary? queryParams = null) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 128. + +*** + +### ListEventsAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> ListEventsAsync(string recordingId, Dictionary? queryParams = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 137. + +*** + +### VideoRoomRecordings(HttpClient, string) + +#### Signature + +```dotnet +public VideoRoomRecordings(HttpClient client, string basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 117. + +## Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 112. diff --git a/fern/products/sdk-reference/dotnet/rest/namespaces/video-room-sessions/index.mdx b/fern/products/sdk-reference/dotnet/rest/namespaces/video-room-sessions/index.mdx new file mode 100644 index 0000000000..e1d52c6399 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/rest/namespaces/video-room-sessions/index.mdx @@ -0,0 +1,182 @@ +--- +slug: "/reference/dotnet/rest/namespaces/video-room-sessions" +title: "VideoRoomSessions" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.VideoRoomSessions" + parent: "rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs" + visibility: "public" +--- +# `VideoRoomSessions` + +Video room sessions: list, get, list\_events/\_members/\_recordings. + +## Signature + +```dotnet +public class VideoRoomSessions +``` + +## Properties + + + +## Methods + +### GetAsync(string) + +#### Signature + +```dotnet +public Task> GetAsync(string sessionId) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 98. + +*** + +### ListAsync(Dictionary\?) + +#### Signature + +```dotnet +public Task> ListAsync(Dictionary? queryParams = null) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 95. + +*** + +### ListEventsAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> ListEventsAsync(string sessionId, Dictionary? queryParams = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 101. + +*** + +### ListMembersAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> ListMembersAsync(string sessionId, Dictionary? queryParams = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 104. + +*** + +### ListRecordingsAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> ListRecordingsAsync(string sessionId, Dictionary? queryParams = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 107. + +*** + +### VideoRoomSessions(HttpClient, string) + +#### Signature + +```dotnet +public VideoRoomSessions(HttpClient client, string basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 84. + +## Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 79. diff --git a/fern/products/sdk-reference/dotnet/rest/namespaces/video-room-tokens/index.mdx b/fern/products/sdk-reference/dotnet/rest/namespaces/video-room-tokens/index.mdx new file mode 100644 index 0000000000..0fafaf3dd1 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/rest/namespaces/video-room-tokens/index.mdx @@ -0,0 +1,80 @@ +--- +slug: "/reference/dotnet/rest/namespaces/video-room-tokens" +title: "VideoRoomTokens" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.VideoRoomTokens" + parent: "rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs" + visibility: "public" +--- +# `VideoRoomTokens` + +Video room tokens (create-only). + +## Signature + +```dotnet +public class VideoRoomTokens +``` + +## Properties + + + +## Methods + +### CreateAsync(Dictionary\) + +#### Signature + +```dotnet +public Task> CreateAsync(Dictionary kwargs) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 74. + +*** + +### VideoRoomTokens(HttpClient, string) + +#### Signature + +```dotnet +public VideoRoomTokens(HttpClient client, string basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 66. + +## Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 61. diff --git a/fern/products/sdk-reference/dotnet/rest/namespaces/video-rooms/index.mdx b/fern/products/sdk-reference/dotnet/rest/namespaces/video-rooms/index.mdx new file mode 100644 index 0000000000..8d39defe56 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/rest/namespaces/video-rooms/index.mdx @@ -0,0 +1,140 @@ +--- +slug: "/reference/dotnet/rest/namespaces/video-rooms" +title: "VideoRooms" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.VideoRooms" + parent: "rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs" + visibility: "public" +--- +# `VideoRooms` + +Video rooms (CRUD + streams sub-resource). + +## Signature + +```dotnet +public class VideoRooms : CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/rest/crud-resource) + +## Methods + +### CreateStreamAsync(string, Dictionary\) + +#### Signature + +```dotnet +public Task> CreateStreamAsync(string roomId, Dictionary kwargs) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 56. + +*** + +### ListStreamsAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> ListStreamsAsync(string roomId, Dictionary? queryParams = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 53. + +*** + +### UpdateAsync(string, Dictionary\, CancellationToken) + +Update via PUT (matching Python's \_update\_method = "PUT"). + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override Task> UpdateAsync(string id, Dictionary kwargs, CancellationToken cancellationToken = default) +``` + +#### Parameters + + + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 49. + +*** + +### VideoRooms(HttpClient, string) + +#### Signature + +```dotnet +public VideoRooms(HttpClient client, string basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 46. + +## Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 44. diff --git a/fern/products/sdk-reference/dotnet/rest/namespaces/video-streams/index.mdx b/fern/products/sdk-reference/dotnet/rest/namespaces/video-streams/index.mdx new file mode 100644 index 0000000000..234156e33c --- /dev/null +++ b/fern/products/sdk-reference/dotnet/rest/namespaces/video-streams/index.mdx @@ -0,0 +1,130 @@ +--- +slug: "/reference/dotnet/rest/namespaces/video-streams" +title: "VideoStreams" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.VideoStreams" + parent: "rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs" + visibility: "public" +--- +# `VideoStreams` + +Video streams: get, update (PUT), delete. + +## Signature + +```dotnet +public class VideoStreams +``` + +## Properties + + + +## Methods + +### DeleteAsync(string) + +#### Signature + +```dotnet +public Task> DeleteAsync(string streamId) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 206. + +*** + +### GetAsync(string) + +#### Signature + +```dotnet +public Task> GetAsync(string streamId) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 200. + +*** + +### UpdateAsync(string, Dictionary\) + +#### Signature + +```dotnet +public Task> UpdateAsync(string streamId, Dictionary kwargs) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 203. + +*** + +### VideoStreams(HttpClient, string) + +#### Signature + +```dotnet +public VideoStreams(HttpClient client, string basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 190. + +## Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 185. diff --git a/fern/products/sdk-reference/dotnet/rest/namespaces/video/index.mdx b/fern/products/sdk-reference/dotnet/rest/namespaces/video/index.mdx new file mode 100644 index 0000000000..a72d67943b --- /dev/null +++ b/fern/products/sdk-reference/dotnet/rest/namespaces/video/index.mdx @@ -0,0 +1,78 @@ +--- +slug: "/reference/dotnet/rest/namespaces/video" +title: "Video" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.Video" + parent: "rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs" + visibility: "public" +--- +# `Video` + +Video API namespace. + +Mirrors Python `signalwire.rest.namespaces.video.VideoNamespace` — +rooms, room sessions, room recordings, conferences, conference tokens, +streams. + +<p>The legacy ``client.Video.List() / Create / Get / Delete`` surface +(which targeted ``/api/video/rooms``) is preserved by inheriting from +<xref href="SignalWire.REST.CrudResource" data-throw-if-not-resolved="false"></xref>.</p> + +## Signature + +```dotnet +public class Video : CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/rest/crud-resource) + +## Properties + + + + + + + + + + + + + + + +## Methods + +### Video(HttpClient) + +#### Signature + +```dotnet +public Video(HttpClient client) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 32. + +## Source + +[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) + +Line 20. diff --git a/fern/products/sdk-reference/dotnet/rest/namespaces/voice-logs/index.mdx b/fern/products/sdk-reference/dotnet/rest/namespaces/voice-logs/index.mdx new file mode 100644 index 0000000000..6605ba2c40 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/rest/namespaces/voice-logs/index.mdx @@ -0,0 +1,130 @@ +--- +slug: "/reference/dotnet/rest/namespaces/voice-logs" +title: "VoiceLogs" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.Namespaces.VoiceLogs" + parent: "rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Logs.cs" + visibility: "public" +--- +# `VoiceLogs` + +Voice log queries with events sub-collection. + +## Signature + +```dotnet +public class VoiceLogs +``` + +## Properties + + + +## Methods + +### GetAsync(string) + +#### Signature + +```dotnet +public Task> GetAsync(string logId) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Logs.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Logs.cs) + +Line 78. + +*** + +### ListAsync(Dictionary\?) + +#### Signature + +```dotnet +public Task> ListAsync(Dictionary? queryParams = null) +``` + +#### Parameters + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Logs.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Logs.cs) + +Line 75. + +*** + +### ListEventsAsync(string, Dictionary\?) + +#### Signature + +```dotnet +public Task> ListEventsAsync(string logId, Dictionary? queryParams = null) +``` + +#### Parameters + + + + + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/Namespaces/Logs.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Logs.cs) + +Line 81. + +*** + +### VoiceLogs(HttpClient, string) + +#### Signature + +```dotnet +public VoiceLogs(HttpClient client, string basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/SignalWire/REST/Namespaces/Logs.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Logs.cs) + +Line 64. + +## Source + +[`src/SignalWire/REST/Namespaces/Logs.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Logs.cs) + +Line 59. diff --git a/fern/products/sdk-reference/dotnet/rest/paginated-iterator/index.mdx b/fern/products/sdk-reference/dotnet/rest/paginated-iterator/index.mdx new file mode 100644 index 0000000000..57cee941f5 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/rest/paginated-iterator/index.mdx @@ -0,0 +1,131 @@ +--- +slug: "/reference/dotnet/rest/paginated-iterator" +title: "PaginatedIterator" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.PaginatedIterator" + parent: "rest" + module: "rest" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/PaginatedIterator.cs" + visibility: "public" +--- +# `PaginatedIterator` + +Walks paged HTTP responses by following `links.next` cursors. + +Mirrors Python `signalwire.rest._pagination.PaginatedIterator` — +constructor records inputs without fetching; iteration triggers +the first fetch and continues until a page is returned without a +`links.next` cursor. + +## Signature + +```dotnet +public class PaginatedIterator : IAsyncEnumerable> +``` + +## Inheritance + +**Implements:** `IAsyncEnumerable>` + +## Properties + + + + + + + + + + + + + + + +## Methods + +### GetAsyncEnumerator(CancellationToken) + +Async-enumerable adapter so callers can write +`await foreach (var item in iterator)`. + +#### Signature + +```dotnet +public IAsyncEnumerator> GetAsyncEnumerator(CancellationToken cancellationToken = default) +``` + +#### Parameters + + + +#### Returns + +`IAsyncEnumerator>` + +#### Source + +[`src/SignalWire/REST/PaginatedIterator.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/PaginatedIterator.cs) + +Line 131. + +*** + +### NextAsync() + +Returns the next item, or throws InvalidOperationException +when exhausted (mirroring Python's StopIteration). + +#### Signature + +```dotnet +public Task> NextAsync() +``` + +#### Returns + +`System.Threading.Tasks.Task>` + +#### Source + +[`src/SignalWire/REST/PaginatedIterator.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/PaginatedIterator.cs) + +Line 55. + +*** + +### PaginatedIterator(HttpClient, string, Dictionary\?, string) + +#### Signature + +```dotnet +public PaginatedIterator(HttpClient http, string path, Dictionary? @params = null, string dataKey = "data") +``` + +#### Parameters + + + + + + + + + +#### Source + +[`src/SignalWire/REST/PaginatedIterator.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/PaginatedIterator.cs) + +Line 33. + +## Source + +[`src/SignalWire/REST/PaginatedIterator.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/PaginatedIterator.cs) + +Line 17. diff --git a/fern/products/sdk-reference/dotnet/rest/rest-client/index.mdx b/fern/products/sdk-reference/dotnet/rest/rest-client/index.mdx new file mode 100644 index 0000000000..15d1972a10 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/rest/rest-client/index.mdx @@ -0,0 +1,199 @@ +--- +slug: "/reference/dotnet/rest/rest-client" +title: "RestClient" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.RestClient" + parent: "rest" + module: "rest" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/RestClient.cs" + visibility: "public" +--- +# `RestClient` + +Top-level SignalWire REST client. + +Provides lazy access to every API namespace (fabric, calling, +phone\_numbers, datasphere, video, compat, etc.). Credentials can be +supplied explicitly or pulled from environment variables. + +## Signature + +```dotnet +public class RestClient : IDisposable +``` + +## Inheritance + +**Implements:** `System.IDisposable` + +## Properties + + + Addresses. + + + + + + Calling API (37 call-control commands). + + + + Chat tokens. + + + + Compatibility (Twilio-compatible LaML) API. + + + + Datasphere documents. + + + + Fabric API (sub-resources: subscribers, sip\_endpoints, call\_flows, ...). + + + + + + Imported phone numbers (create only). + + + + Logs (messages, voice, fax, conferences). + + + + Phone number lookup. + + + + Multi-factor authentication (sms/call/verify dispatch). + + + + Number groups (with membership operations). + + + + Phone numbers. + + + + Project management. + + + + + + PubSub tokens. + + + + Queues (Relay queues at /api/relay/rest/queues with member ops). + + + + Recordings (Relay recordings at /api/relay/rest/recordings). + + + + Registry (10DLC brands, campaigns, orders, numbers). + + + + Short codes (PUT for update). + + + + SIP profile (singleton at /api/relay/rest/sip\_profile; legacy plural-path /api/relay/rest/sip\_profiles preserved for existing tests via BasePath). + + + + + + + + Verified callers. + + + + Video rooms (Python-parity entry-point with sub-namespaces). + + +## Methods + +### Dispose + +Dispose the owned REST <xref href="SignalWire.REST.HttpClient" data-throw-if-not-resolved="false"></xref> (which, in turn, only +disposes its inner <xref href="System.Net.Http.HttpClient" data-throw-if-not-resolved="false"></xref> because it +created it). `RestClient` always constructs its own transport, so +it always owns it. Idempotent. + +#### Signature + + + + ```dotnet + public void Dispose() + ``` + + + + ```dotnet + protected virtual void Dispose(bool disposing) + ``` + + + +#### Parameters (Overload 2) + + + +#### Source + +[`src/SignalWire/REST/RestClient.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/RestClient.cs) + +Line 176. + +*** + +### RestClient(string, string, string) + +#### Signature + +```dotnet +public RestClient(string projectId = "", string token = "", string space = "") +``` + +#### Parameters + + + Project ID (falls back to SIGNALWIRE\_PROJECT\_ID env var). + + + + API token (falls back to SIGNALWIRE\_API\_TOKEN env var). + + + + Space host (falls back to SIGNALWIRE\_SPACE env var). + + +#### Source + +[`src/SignalWire/REST/RestClient.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/RestClient.cs) + +Line 48. + +## Source + +[`src/SignalWire/REST/RestClient.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/RestClient.cs) + +Line 11. diff --git a/fern/products/sdk-reference/dotnet/rest/signal-wire-rest-error/index.mdx b/fern/products/sdk-reference/dotnet/rest/signal-wire-rest-error/index.mdx new file mode 100644 index 0000000000..bbc09ec6e3 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/rest/signal-wire-rest-error/index.mdx @@ -0,0 +1,117 @@ +--- +slug: "/reference/dotnet/rest/signal-wire-rest-error" +title: "SignalWireRestError" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.REST.SignalWireRestError" + parent: "rest" + module: "rest" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/SignalWireRestError.cs" + visibility: "public" +--- +# `SignalWireRestError` + +Exception thrown when a SignalWire REST API call returns a non-2xx status +or encounters a transport-level error. + +**Modifiers:** `sealed` + +## Signature + +```dotnet +public sealed class SignalWireRestError : Exception, ISerializable +``` + +## Inheritance + +**Extends:** `System.Exception` + +**Implements:** `System.Runtime.Serialization.ISerializable` + +## Properties + + + Raw response body from the server. + + + + HTTP status code from the response (0 for transport errors). + + +## Methods + +### SignalWireRestError + +#### Signature + + + + ```dotnet + public SignalWireRestError(string message, int statusCode, string responseBody) + ``` + + + + ```dotnet + public SignalWireRestError(string message, int statusCode, string responseBody, Exception innerException) + ``` + + + +#### Parameters (Overload 1) + + + + + + + +#### Parameters (Overload 2) + + + + + + + + + +#### Source + +[`src/SignalWire/REST/SignalWireRestError.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/SignalWireRestError.cs) + +Line 14. + +*** + +### ToString() + +Creates and returns a string representation of the current exception. + +**Modifiers:** `override` + +#### Signature + +```dotnet +public override string ToString() +``` + +#### Returns + +`string` — A string representation of the current exception. + +#### Source + +[`src/SignalWire/REST/SignalWireRestError.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/SignalWireRestError.cs) + +Line 28. + +## Source + +[`src/SignalWire/REST/SignalWireRestError.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/SignalWireRestError.cs) + +Line 6. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.agent/agent-base/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.agent/agent-base/index.mdx deleted file mode 100644 index 114b3dece9..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.agent/agent-base/index.mdx +++ /dev/null @@ -1,2064 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.agent/agent-base" -title: "AgentBase" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.Agent.AgentBase" - parent: "SignalWire.Agent" - module: "SignalWire.Agent" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs" - visibility: "public" ---- -# `AgentBase` - -AI agent built on <xref href="SignalWire.SWML.Service" data-throw-if-not-resolved="false"></xref>. Provides prompt management, SWAIG tool dispatch, -context switching, skill stubs, and a 5-phase SWML rendering pipeline. -All configuration methods return `this` for fluent chaining. - -## Signature - -```dotnet -public class AgentBase : Service -``` - -## Inheritance - -**Extends:** [SignalWire.SWML.Service](/docs/sdk-reference/reference/dotnet/signal-wire.swml/service) - -## Properties - - - - - True iff signature validation is enabled — i.e. either the `SigningKey` option or `SIGNALWIRE_SIGNING_KEY` env var was set at construction time. (Python parity: `bool(agent.signing_key)`.) - - - - The prompt as a <xref href="SignalWire.POM.PromptObjectModel" data-throw-if-not-resolved="false"></xref> instance (Python parity: `agent.pom`). Returns null when `UsePom` is false. Materialised on each access from the internal list-of-dicts so mutations stay round-trip-safe. To inspect raw section dicts, use <xref href="SignalWire.Agent.AgentBase.GetPromptSections" data-throw-if-not-resolved="false"></xref>. - - - - The configured Signing Key, or null when validation is disabled. Read-only — the resolution order (constructor arg → `SIGNALWIRE_SIGNING_KEY` env) is fixed at construction time. (Python parity: `agent.signing_key`.) - - - - Skill manager (Python parity: `agent.skill_manager`). - - - - The complete set of internal SWAIG function names that accept fillers, matching the SWAIGInternalFiller schema definition. Any name outside this set is silently ignored by the runtime — <xref href="SignalWire.Agent.AgentBase.SetInternalFillers(System.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Collections.Generic.List%7bSystem.String%7d%7d%7d)" data-throw-if-not-resolved="false"></xref> and <xref href="SignalWire.Agent.AgentBase.AddInternalFiller(System.String%2cSystem.String%2cSystem.Collections.Generic.List%7bSystem.String%7d)" data-throw-if-not-resolved="false"></xref> warn if you pass an unknown name. Notable absences: `change_step`, `gather_submit`, or arbitrary user-defined SWAIG function names are NOT supported. - - -## Methods - -### AddAnswerVerb - -Alias for <xref href="SignalWire.Agent.AgentBase.AddPostAnswerVerb(System.String%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d)" data-throw-if-not-resolved="false"></xref>. - -#### Signature - - - - ```dotnet - public AgentBase AddAnswerVerb(string verb, Dictionary config) - ``` - - - - ```dotnet - public AgentBase AddAnswerVerb(Dictionary config) - ``` - - - -#### Parameters (Overload 1) - - - - - -#### Parameters (Overload 2) - - - -#### Returns (Overload 1) - -`SignalWire.Agent.AgentBase` - -#### Returns (Overload 2) - -`SignalWire.Agent.AgentBase` - -#### Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 812. - -*** - -### AddFunctionInclude(Dictionary\) - -#### Signature - -```dotnet -public AgentBase AddFunctionInclude(Dictionary include) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Agent.AgentBase` - -#### Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 771. - -*** - -### AddHint(string) - -#### Signature - -```dotnet -public AgentBase AddHint(string hint) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Agent.AgentBase` - -#### Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 480. - -*** - -### AddHints(List\) - -#### Signature - -```dotnet -public AgentBase AddHints(List hints) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Agent.AgentBase` - -#### Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 486. - -*** - -### AddInternalFiller - -Add internal fillers for a single internal function and language. - -<p>See -<xref href="SignalWire.Agent.AgentBase.SetInternalFillers(System.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Collections.Generic.List%7bSystem.String%7d%7d%7d)" data-throw-if-not-resolved="false"></xref> -for the complete list of supported function names and what fillers -do. Names outside the supported set log a warning.</p> - -#### Signature - - - - ```dotnet - public AgentBase AddInternalFiller(string filler) - ``` - - - - ```dotnet - public AgentBase AddInternalFiller(string functionName, string languageCode, List fillers) - ``` - - - -#### Parameters (Overload 1) - - - -#### Parameters (Overload 2) - - - - - - - -#### Returns (Overload 1) - -`SignalWire.Agent.AgentBase` - -#### Returns (Overload 2) - -`SignalWire.Agent.AgentBase` - -#### Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 730. - -*** - -### AddLanguage - -Add a language configuration with optional per-language engine-specific -params (e.g. voice stability/similarity for ElevenLabs, model knobs). -The `params` key is only emitted into SWML when non-empty, so -existing language entries stay byte-identical when no params are passed. -Mirrors signalwire-python's `AIConfigMixin.add_language(params=...)`. - -#### Signature - - - - ```dotnet - public AgentBase AddLanguage(string name, string code, string voice) - ``` - - - - ```dotnet - public AgentBase AddLanguage(string name, string code, string voice, Dictionary? languageParams) - ``` - - - -#### Parameters (Overload 1) - - - - - - - -#### Parameters (Overload 2) - - - Language name (e.g. "English"). - - - - Language code (e.g. "en-US"). - - - - TTS voice name or combined "engine.voice:model". - - - - Optional engine-specific params dict. `null` or empty omits the SWML `params` key. - - -#### Returns (Overload 1) - -`SignalWire.Agent.AgentBase` - -#### Returns (Overload 2) - -`SignalWire.Agent.AgentBase` - -#### Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 498. - -*** - -### AddPatternHint(string) - -#### Signature - -```dotnet -public AgentBase AddPatternHint(string pattern) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Agent.AgentBase` - -#### Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 492. - -*** - -### AddPostAiVerb(string, Dictionary\) - -#### Signature - -```dotnet -public AgentBase AddPostAiVerb(string verb, Dictionary config) -``` - -#### Parameters - - - - - -#### Returns - -`SignalWire.Agent.AgentBase` - -#### Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 825. - -*** - -### AddPostAnswerVerb(string, Dictionary\) - -#### Signature - -```dotnet -public AgentBase AddPostAnswerVerb(string verb, Dictionary config) -``` - -#### Parameters - - - - - -#### Returns - -`SignalWire.Agent.AgentBase` - -#### Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 805. - -*** - -### AddPreAnswerVerb(string, Dictionary\) - -#### Signature - -```dotnet -public AgentBase AddPreAnswerVerb(string verb, Dictionary config) -``` - -#### Parameters - - - - - -#### Returns - -`SignalWire.Agent.AgentBase` - -#### Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 799. - -*** - -### AddPronunciation(string, string, string) - -#### Signature - -```dotnet -public AgentBase AddPronunciation(string replace, string with, string ignore = "") -``` - -#### Parameters - - - - - - - -#### Returns - -`SignalWire.Agent.AgentBase` - -#### Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 594. - -*** - -### AddSkill - -Load and activate a skill by name. Resolves through <xref href="SignalWire.Skills.SkillRegistry" data-throw-if-not-resolved="false"></xref>, -validates env vars, calls Setup/RegisterTools, and merges hints/globalData/prompts. - -#### Signature - - - - ```dotnet - public AgentBase AddSkill(string name, Dictionary? parameters = null) - ``` - - - - ```dotnet - public AgentBase AddSkill(SkillName name, Dictionary? parameters = null) - ``` - - - -#### Parameters (Overload 1) - - - - - -#### Parameters (Overload 2) - - - - - -#### Returns (Overload 1) - -`SignalWire.Agent.AgentBase` - -#### Returns (Overload 2) - -`SignalWire.Agent.AgentBase` - -#### Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 927. - -*** - -### AddSwaigQueryParams(Dictionary\) - -#### Signature - -```dotnet -public AgentBase AddSwaigQueryParams(Dictionary parameters) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Agent.AgentBase` - -#### Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 1027. - -*** - -### AgentBase(AgentOptions) - -#### Signature - -```dotnet -public AgentBase(AgentOptions options) -``` - -#### Parameters - - - -#### Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 145. - -*** - -### AutoMapSipUsernames() - -Enable auto-mapping of SIP usernames to this agent's -route (Python parity: `agent.auto_map_sip_usernames()`). -Chainable. - -#### Signature - -```dotnet -public AgentBase AutoMapSipUsernames() -``` - -#### Returns - -`SignalWire.Agent.AgentBase` - -#### Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 914. - -*** - -### BuildAiVerb(Dictionary\?) - -Build the AI verb configuration block. - -#### Signature - -```dotnet -public Dictionary BuildAiVerb(Dictionary? headers = null) -``` - -#### Parameters - - - -#### Returns - -`Dictionary` - -#### Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 1165. - -*** - -### ClearPostAiVerbs() - -#### Signature - -```dotnet -public AgentBase ClearPostAiVerbs() -``` - -#### Returns - -`SignalWire.Agent.AgentBase` - -#### Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 843. - -*** - -### ClearPostAnswerVerbs() - -#### Signature - -```dotnet -public AgentBase ClearPostAnswerVerbs() -``` - -#### Returns - -`SignalWire.Agent.AgentBase` - -#### Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 837. - -*** - -### ClearPreAnswerVerbs() - -#### Signature - -```dotnet -public AgentBase ClearPreAnswerVerbs() -``` - -#### Returns - -`SignalWire.Agent.AgentBase` - -#### Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 831. - -*** - -### ClearSwaigQueryParams() - -#### Signature - -```dotnet -public AgentBase ClearSwaigQueryParams() -``` - -#### Returns - -`SignalWire.Agent.AgentBase` - -#### Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 1036. - -*** - -### CloneForRequest() - -Create a deep copy of this agent for per-request customisation. -Collections are deeply copied; callbacks are preserved by reference. - -#### Signature - -```dotnet -public AgentBase CloneForRequest() -``` - -#### Returns - -`SignalWire.Agent.AgentBase` - -#### Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 1448. - -*** - -### Contexts() - -Alias for <xref href="SignalWire.Agent.AgentBase.DefineContexts" data-throw-if-not-resolved="false"></xref>. - -#### Signature - -```dotnet -public ContextBuilder Contexts() -``` - -#### Returns - -`SignalWire.Contexts.ContextBuilder` - -#### Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 871. - -*** - -### CreateToolToken(string, string) - -Create a per-call SWAIG-function token. Returns empty -string on failure. (Python parity: `StateMixin._create_tool_token`.) - -#### Signature - -```dotnet -public string CreateToolToken(string toolName, string callId) -``` - -#### Parameters - - - - - -#### Returns - -`string` - -#### Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 441. - -*** - -### DefineContexts() - -Return the ContextBuilder, creating it lazily on first access. -The builder is wired to report registered SWAIG tool names back -so its <xref href="SignalWire.Contexts.ContextBuilder.Validate" data-throw-if-not-resolved="false"></xref> can check for -collisions with reserved native tool names (`next_step`, -`change_context`, `gather_submit`). - -#### Signature - -```dotnet -public ContextBuilder DefineContexts() -``` - -#### Returns - -`SignalWire.Contexts.ContextBuilder` - -#### Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 860. - -*** - -### EnableDebugEvents(string) - -#### Signature - -```dotnet -public AgentBase EnableDebugEvents(string level = "all") -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Agent.AgentBase` - -#### Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 765. - -*** - -### EnableSipRouting(bool, string) - -Enable SIP routing on this agent. `autoMap` opts into Python's -auto-mapping behaviour (sip\_username = agent name); `path` lets -the caller pin a specific SIP route prefix. - -#### Signature - -```dotnet -public AgentBase EnableSipRouting(bool autoMap = false, string path = "") -``` - -#### Parameters - - - - - -#### Returns - -`SignalWire.Agent.AgentBase` - -#### Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 1065. - -*** - -### GetContexts() - -Return the contexts configuration if defined, else null. -(Python parity: `PromptManager.get_contexts`.) - -#### Signature - -```dotnet -public Dictionary? GetContexts() -``` - -#### Returns - -`Dictionary` - -#### Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 392. - -*** - -### GetLanguageParams(string) - -Read the per-language `params` dict for a previously-added -language. Returns `null` when the params were never set or -when the code is unknown — no exception path, matching Python. - -#### Signature - -```dotnet -public Dictionary? GetLanguageParams(string code) -``` - -#### Parameters - - - -#### Returns - -`Dictionary` - -#### Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 571. - -*** - -### GetName() - -Return the agent name (Python parity: `agent.get_name()`). - -#### Signature - -```dotnet -public string GetName() -``` - -#### Returns - -`string` - -#### Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 905. - -*** - -### GetPostPrompt() - -Return the post-prompt text if set, else null. -(Python parity: `PromptManager.get_post_prompt`.) - -#### Signature - -```dotnet -public string? GetPostPrompt() -``` - -#### Returns - -`string` - -#### Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 388. - -*** - -### GetPrompt() - -Return the prompt payload: POM array if enabled and populated, otherwise raw text. - -#### Signature - -```dotnet -public object GetPrompt() -``` - -#### Returns - -`object` - -#### Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 373. - -*** - -### GetPromptSections() - -The raw POM section dicts. Mirrors how the dotnet -agent has historically stored its prompt-object data and how -SWML rendering consumes it. Read-only snapshot. - -#### Signature - -```dotnet -public IReadOnlyList> GetPromptSections() -``` - -#### Returns - -`IReadOnlyList>` - -#### Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 437. - -*** - -### GetRawPrompt() - -Return the raw prompt text if set, else null. -(Python parity: `PromptManager.get_raw_prompt`.) - -#### Signature - -```dotnet -public string? GetRawPrompt() -``` - -#### Returns - -`string` - -#### Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 384. - -*** - -### GetSkillManager() - -Return the skill manager, creating it lazily on first access. - -#### Signature - -```dotnet -public SkillManager GetSkillManager() -``` - -#### Returns - -`SignalWire.Skills.SkillManager` - -#### Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 895. - -*** - -### HandlePostPrompt(Dictionary\?, Dictionary\) - -Handle the post-prompt callback. - -**Modifiers:** `override` - -#### Signature - -```dotnet -protected override (int, Dictionary, string) HandlePostPrompt(Dictionary? requestData, Dictionary headers) -``` - -#### Parameters - - - - - -#### Returns - -`System.ValueTuple,string>` - -#### Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 1403. - -*** - -### HandleRequest(string, string, Dictionary\, string?) - -Override the base dispatch to enforce webhook signature validation on -POST requests targeting the signed routes (`/`, `/swaig`, -`/post_prompt`) when <xref href="SignalWire.Agent.AgentBase.SigningKey" data-throw-if-not-resolved="false"></xref> is configured. - -<p>Validation is gated behind Basic Auth: callers must already -satisfy the SWMLService basic-auth check (it always runs first in -<xref href="SignalWire.SWML.Service.HandleRequest(System.String%2cSystem.String%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.String%7d%2cSystem.String)" data-throw-if-not-resolved="false"></xref>) before we even look at -signatures, matching Python where `signing_key` is layered on -top of `basic_auth`.</p> - -<p>On invalid signature: returns 403 directly without dispatching -to the agent's POST handler. On valid signature (or non-POST, or -non-signed route): delegates to <xref href="SignalWire.SWML.Service.HandleRequest(System.String%2cSystem.String%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.String%7d%2cSystem.String)" data-throw-if-not-resolved="false"></xref>. -</p> - -<p>(Python parity: `web_mixin._register_routes` wraps the -signed POST routes in a FastAPI `Depends(sig_dep)` dependency -when `signing_key` is set; this is the .NET equivalent.)</p> - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override (int Status, Dictionary Headers, string Body) HandleRequest(string method, string path, Dictionary headers, string? body) -``` - -#### Parameters - - - - - - - - - -#### Returns - -`System.ValueTuple,string>` - -#### Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 1294. - -*** - -### HandleSwmlRequest(string, Dictionary\?, Dictionary\) - -Handle the SWML document request. If a dynamic-config callback is registered, -clone the agent, pass the clone to the callback, and render from the clone. - -**Modifiers:** `override` - -#### Signature - -```dotnet -protected override (int, Dictionary, string) HandleSwmlRequest(string method, Dictionary? requestData, Dictionary headers) -``` - -#### Parameters - - - - - - - -#### Returns - -`System.ValueTuple,string>` - -#### Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 1369. - -*** - -### HasSkill - -Check if a skill is loaded by instance key. - -#### Signature - - - - ```dotnet - public bool HasSkill(string name) - ``` - - - - ```dotnet - public bool HasSkill(SkillName name) - ``` - - - -#### Parameters (Overload 1) - - - -#### Parameters (Overload 2) - - - -#### Returns (Overload 1) - -`bool` - -#### Returns (Overload 2) - -`bool` - -#### Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 983. - -*** - -### ListSkills() - -List all loaded skill instance keys. - -#### Signature - -```dotnet -public List ListSkills() -``` - -#### Returns - -`List` - -#### Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 973. - -*** - -### ManualSetProxyUrl(string) - -Manually override the proxy URL used for SWAIG webhook construction. - -#### Signature - -```dotnet -public AgentBase ManualSetProxyUrl(string url) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Agent.AgentBase` - -#### Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 1021. - -*** - -### OnDebugEvent(Action\?, Dictionary\>) - -#### Signature - -```dotnet -public AgentBase OnDebugEvent(Action?, Dictionary> callback) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Agent.AgentBase` - -#### Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 1049. - -*** - -### OnSummary(Action\?, Dictionary\>) - -#### Signature - -```dotnet -public AgentBase OnSummary(Action?, Dictionary> callback) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Agent.AgentBase` - -#### Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 1042. - -*** - -### PromptAddSection(string, string, List\?, bool, bool, List\>?) - -Add a top-level POM section with an optional body, bullets, -numbering, and subsections. (Python parity: `prompt_add_section`.) - -#### Signature - -```dotnet -public AgentBase PromptAddSection(string title, string body = "", List? bullets = null, bool numbered = false, bool numberedBullets = false, List>? subsections = null) -``` - -#### Parameters - - - - - - - - - - - - - -#### Returns - -`SignalWire.Agent.AgentBase` - -#### Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 263. - -*** - -### PromptAddSubsection(string, string, string, List\?) - -Add a subsection nested under an existing parent section. -(Python parity: `prompt_add_subsection(parent_title, title, body, bullets)`.) - -#### Signature - -```dotnet -public AgentBase PromptAddSubsection(string parentTitle, string title, string body = "", List? bullets = null) -``` - -#### Parameters - - - - - - - - - -#### Returns - -`SignalWire.Agent.AgentBase` - -#### Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 293. - -*** - -### PromptAddToSection(string, string?, string?, List\?) - -Append body text, a single bullet, and/or bullets list to an -existing section. (Python parity: -`prompt_add_to_section(title, body, bullet, bullets)`.) - -#### Signature - -```dotnet -public AgentBase PromptAddToSection(string title, string? body = null, string? bullet = null, List? bullets = null) -``` - -#### Parameters - - - - - - - - - -#### Returns - -`SignalWire.Agent.AgentBase` - -#### Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 327. - -*** - -### PromptHasSection(string) - -Check whether a POM section with the given title exists. - -#### Signature - -```dotnet -public bool PromptHasSection(string title) -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 365. - -*** - -### RegisterSipUsername - -Register a SIP username under this agent's own route — Python -equivalent of `register_sip_username(self, sip_username)`. - -#### Signature - - - - ```dotnet - public AgentBase RegisterSipUsername(string username, string route = "") - ``` - - - - ```dotnet - public AgentBase RegisterSipUsername(string username) - ``` - - - -#### Parameters (Overload 1) - - - - - -#### Parameters (Overload 2) - - - -#### Returns (Overload 1) - -`SignalWire.Agent.AgentBase` - -#### Returns (Overload 2) - -`SignalWire.Agent.AgentBase` - -#### Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 1073. - -*** - -### RemoveSkill - -Remove a loaded skill by its instance key. - -#### Signature - - - - ```dotnet - public AgentBase RemoveSkill(string name) - ``` - - - - ```dotnet - public AgentBase RemoveSkill(SkillName name) - ``` - - - -#### Parameters (Overload 1) - - - -#### Parameters (Overload 2) - - - -#### Returns (Overload 1) - -`SignalWire.Agent.AgentBase` - -#### Returns (Overload 2) - -`SignalWire.Agent.AgentBase` - -#### Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 959. - -*** - -### RenderSwml() - -Build the complete SWML document. - -<p>Phases: 1) Pre-answer verbs 2) Answer 3) Record call -4) Post-answer verbs 5) AI verb 6) Post-AI verbs</p> - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override Dictionary RenderSwml() -``` - -#### Returns - -`Dictionary` - -#### Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 1097. - -*** - -### RenderSwmlWithContext(Dictionary\?, Dictionary\) - -Render with request body and headers context. - -#### Signature - -```dotnet -public Dictionary RenderSwmlWithContext(Dictionary? requestBody, Dictionary headers) -``` - -#### Parameters - - - - - -#### Returns - -`Dictionary` - -#### Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 1103. - -*** - -### ResetContexts() - -Remove all contexts, returning the agent to a no-contexts state. -This is a convenience wrapper around `DefineContexts().Reset()`. -Use it in a dynamic config callback when you need to rebuild -contexts from scratch for a specific request. - -#### Signature - -```dotnet -public AgentBase ResetContexts() -``` - -#### Returns - -`SignalWire.Agent.AgentBase` - -#### Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 882. - -*** - -### SetDynamicConfigCallback(Action\?, Dictionary\?, Dictionary\, AgentBase>) - -#### Signature - -```dotnet -public AgentBase SetDynamicConfigCallback(Action?, Dictionary?, Dictionary, AgentBase> callback) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Agent.AgentBase` - -#### Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 1001. - -*** - -### SetFunctionIncludes(List\>) - -#### Signature - -```dotnet -public AgentBase SetFunctionIncludes(List> includes) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Agent.AgentBase` - -#### Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 777. - -*** - -### SetGlobalData(Dictionary\) - -#### Signature - -```dotnet -public AgentBase SetGlobalData(Dictionary data) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Agent.AgentBase` - -#### Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 627. - -*** - -### SetInternalFillers - -Set internal fillers for native SWAIG functions. - -<p>Internal fillers are short phrases the AI agent speaks (via -TTS) while an internal/native function is running, so the caller -doesn't hear dead air during transitions or background work.</p> - -<p>Supported function names (match the SWAIGInternalFiller -schema): `hangup`, `check_time`, `wait_for_user`, -`wait_seconds`, `adjust_response_latency`, -`next_step`, `change_context`, `get_visual_input`, -`get_ideal_strategy`. See -<xref href="SignalWire.Agent.AgentBase.SupportedInternalFillerNames" data-throw-if-not-resolved="false"></xref>.</p> - -<p>Notably NOT supported: `change_step`, -`gather_submit`, or arbitrary user-defined SWAIG function -names. The runtime only honors fillers for the names listed above; -everything else is silently ignored at the SWML level. This method -warns at registration time if you pass an unknown name so you -catch the typo early.</p> - -#### Signature - - - - ```dotnet - public AgentBase SetInternalFillers(List fillers) - ``` - - - - ```dotnet - public AgentBase SetInternalFillers(Dictionary>> fillers) - ``` - - - -#### Parameters (Overload 1) - - - -#### Parameters (Overload 2) - - - -#### Returns (Overload 1) - -`SignalWire.Agent.AgentBase` - -#### Returns (Overload 2) - -`SignalWire.Agent.AgentBase` - -#### Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 672. - -*** - -### SetLanguageParams(string, Dictionary\) - -Set (or replace) the per-language `params` dict on an -already-added language. Useful when language entries are built -up via <xref href="SignalWire.Agent.AgentBase.AddLanguage(System.String%2cSystem.String%2cSystem.String)" data-throw-if-not-resolved="false"></xref> first and -engine-specific tuning is added later (e.g., from a config loader). -Empty dict removes the key. No-op if <code class="paramref">code</code> isn't -found — matches Python's silent-skip behavior. - -#### Signature - -```dotnet -public AgentBase SetLanguageParams(string code, Dictionary languageParams) -``` - -#### Parameters - - - - - -#### Returns - -`SignalWire.Agent.AgentBase` - -#### Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 546. - -*** - -### SetLanguages(List\>) - -#### Signature - -```dotnet -public AgentBase SetLanguages(List> languages) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Agent.AgentBase` - -#### Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 588. - -*** - -### SetNativeFunctions(List\) - -#### Signature - -```dotnet -public AgentBase SetNativeFunctions(List functions) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Agent.AgentBase` - -#### Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 642. - -*** - -### SetParam(string, object) - -#### Signature - -```dotnet -public AgentBase SetParam(string key, object value) -``` - -#### Parameters - - - - - -#### Returns - -`SignalWire.Agent.AgentBase` - -#### Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 615. - -*** - -### SetParams(Dictionary\) - -#### Signature - -```dotnet -public AgentBase SetParams(Dictionary parameters) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Agent.AgentBase` - -#### Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 621. - -*** - -### SetPostPrompt(string) - -#### Signature - -```dotnet -public AgentBase SetPostPrompt(string text) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Agent.AgentBase` - -#### Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 255. - -*** - -### SetPostPromptLlmParams(Dictionary\) - -#### Signature - -```dotnet -public AgentBase SetPostPromptLlmParams(Dictionary parameters) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Agent.AgentBase` - -#### Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 789. - -*** - -### SetPostPromptUrl(string) - -#### Signature - -```dotnet -public AgentBase SetPostPromptUrl(string url) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Agent.AgentBase` - -#### Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 1014. - -*** - -### SetPromptLlmParams(Dictionary\) - -#### Signature - -```dotnet -public AgentBase SetPromptLlmParams(Dictionary parameters) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Agent.AgentBase` - -#### Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 783. - -*** - -### SetPromptPom(List\>) - -Set the prompt as a list-of-section dicts (POM form). -Throws when `UsePom` is false. (Python parity: -`PromptManager.set_prompt_pom`.) - -#### Signature - -```dotnet -public AgentBase SetPromptPom(List> pom) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Agent.AgentBase` - -#### Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 398. - -*** - -### SetPromptText(string) - -#### Signature - -```dotnet -public AgentBase SetPromptText(string text) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Agent.AgentBase` - -#### Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 249. - -*** - -### SetPronunciations(List\>) - -#### Signature - -```dotnet -public AgentBase SetPronunciations(List> pronunciations) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Agent.AgentBase` - -#### Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 609. - -*** - -### SetWebHookUrl(string) - -#### Signature - -```dotnet -public AgentBase SetWebHookUrl(string url) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Agent.AgentBase` - -#### Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 1008. - -*** - -### UpdateGlobalData(Dictionary\) - -#### Signature - -```dotnet -public AgentBase UpdateGlobalData(Dictionary data) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Agent.AgentBase` - -#### Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 633. - -*** - -### ValidateToolToken(string, string, string) - -Validate a per-call SWAIG-function token. Rejects -when the function is not registered, when the SessionManager -rejects the token, or on any error. (Python parity: -`StateMixin.validate_tool_token`.) - -#### Signature - -```dotnet -public bool ValidateToolToken(string functionName, string token, string callId) -``` - -#### Parameters - - - - - - - -#### Returns - -`bool` - -#### Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 457. - -## Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 51. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.agent/agent-options/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.agent/agent-options/index.mdx deleted file mode 100644 index dca39bd9cd..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.agent/agent-options/index.mdx +++ /dev/null @@ -1,64 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.agent/agent-options" -title: "AgentOptions" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.Agent.AgentOptions" - parent: "SignalWire.Agent" - module: "SignalWire.Agent" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs" - visibility: "public" ---- -# `AgentOptions` - -Configuration options for an AI agent, extending the base SWML service options. - -**Modifiers:** `sealed` - -## Signature - -```dotnet -public sealed class AgentOptions -``` - -## Properties - - - - - - - - - - - - - - - - - - - - - - - Optional SignalWire Signing Key (from Dashboard → API Credentials). When set, webhook signature validation is enforced on POST /, /swaig, /post\_prompt — unsigned or invalidly-signed requests get a 403. Falls back to the `SIGNALWIRE_SIGNING_KEY` env var if not passed. See `porting-sdk/webhooks.md` for the contract. (Python parity: `AgentBase.__init__(signing_key=...)`.) - - - - If true, honor `X-Forwarded-Proto` / `X-Forwarded-Host` headers when reconstructing the URL for signature validation. Default false because proxy headers are spoofable; opt in only when you control the proxy chain. (Python parity: `AgentBase.__init__(trust_proxy_for_signature=...)`.) - - - - -## Source - -[`src/SignalWire/Agent/AgentBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Agent/AgentBase.cs) - -Line 12. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.agent/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.agent/index.mdx deleted file mode 100644 index 20310c1186..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.agent/index.mdx +++ /dev/null @@ -1,24 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.agent" -title: "SignalWire.Agent" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "module" - language: "dotnet" - qualified_name: "SignalWire.Agent" ---- -# `SignalWire.Agent` - -## Classes - - - - AI agent built on <xref href="SignalWire.SWML.Service" data-throw-if-not-resolved="false"></xref>. Provides prompt management, SWAIG tool dispatch, context switching, skill stubs, and a 5-phase SWML rendering pipeline. All configuration methods return `this` for fluent chaining. - - - - Configuration options for an AI agent, extending the base SWML service options. - - diff --git a/fern/products/sdk-reference/dotnet/signal-wire.contexts/context-builder/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.contexts/context-builder/index.mdx deleted file mode 100644 index 45542aa38e..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.contexts/context-builder/index.mdx +++ /dev/null @@ -1,236 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.contexts/context-builder" -title: "ContextBuilder" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.Contexts.ContextBuilder" - parent: "SignalWire.Contexts" - module: "SignalWire.Contexts" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs" - visibility: "public" ---- -# `ContextBuilder` - -Builder for multi-step, multi-context AI agent workflows. - -<p>A ContextBuilder owns one or more <xref href="SignalWire.Contexts.Context" data-throw-if-not-resolved="false"></xref>s; each -context owns an ordered list of <xref href="SignalWire.Contexts.Step" data-throw-if-not-resolved="false"></xref>s. Only one context -and one step is active at a time. Per chat turn, the runtime injects -the current step's instructions as a system message, then asks the LLM -for a response.</p> - -<p><b>Native tools auto-injected by the runtime:</b> When a step -(or its enclosing context) declares valid_steps or valid_contexts, the -runtime auto-injects two native tools so the model can navigate the -flow: `next_step` and `change_context`. A third native tool, -`gather_submit`, is injected during gather_info questioning. -These three names are reserved: <xref href="SignalWire.Contexts.ContextBuilder.Validate" data-throw-if-not-resolved="false"></xref> rejects any -agent that defines a SWAIG tool with one of them. See -<xref href="SignalWire.Contexts.ReservedToolNames.Reserved" data-throw-if-not-resolved="false"></xref>.</p> - -<p><b>Function whitelisting (<xref href="SignalWire.Contexts.Step.SetFunctions(System.Object)" data-throw-if-not-resolved="false"></xref>):</b> -Each step may declare a functions whitelist. The whitelist is applied -in-memory at the start of each LLM turn. CRITICALLY: if a step does -NOT declare a functions field, it INHERITS the previous step's active -set. See <xref href="SignalWire.Contexts.Step.SetFunctions(System.Object)" data-throw-if-not-resolved="false"></xref> for details and examples.</p> - -## Signature - -```dotnet -public class ContextBuilder -``` - -## Methods - -### AddContext(string) - -#### Signature - -```dotnet -public Context AddContext(string name) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Contexts.Context` - -#### Source - -[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) - -Line 622. - -*** - -### AttachToolNameSupplier(Func\>) - -Attach a supplier that returns registered SWAIG tool names so <xref href="SignalWire.Contexts.ContextBuilder.Validate" data-throw-if-not-resolved="false"></xref> can check them against <xref href="SignalWire.Contexts.ReservedToolNames.Reserved" data-throw-if-not-resolved="false"></xref>. Called internally by -`AgentBase.DefineContexts()`. - -#### Signature - -```dotnet -public ContextBuilder AttachToolNameSupplier(Func> supplier) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Contexts.ContextBuilder` - -#### Source - -[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) - -Line 604. - -*** - -### CreateSimpleContext(string) - -**Modifiers:** `static` - -#### Signature - -```dotnet -public static ContextBuilder CreateSimpleContext(string name) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Contexts.ContextBuilder` - -#### Source - -[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) - -Line 807. - -*** - -### GetContext(string) - -#### Signature - -```dotnet -public Context? GetContext(string name) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Contexts.Context` - -#### Source - -[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) - -Line 635. - -*** - -### HasContexts() - -#### Signature - -```dotnet -public bool HasContexts() -``` - -#### Returns - -`bool` - -#### Source - -[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) - -Line 636. - -*** - -### Reset() - -Remove all contexts, returning the builder to its initial state. -Use this in a dynamic config callback when you need to rebuild -contexts from scratch for a specific request. - -#### Signature - -```dotnet -public ContextBuilder Reset() -``` - -#### Returns - -`SignalWire.Contexts.ContextBuilder` - -#### Source - -[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) - -Line 615. - -*** - -### ToDict() - -#### Signature - -```dotnet -public Dictionary ToDict() -``` - -#### Returns - -`Dictionary` - -#### Source - -[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) - -Line 793. - -*** - -### Validate() - -#### Signature - -```dotnet -public List Validate() -``` - -#### Returns - -`List` - -#### Source - -[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) - -Line 638. - -## Source - -[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) - -Line 591. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.contexts/context/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.contexts/context/index.mdx deleted file mode 100644 index cc85ab2418..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.contexts/context/index.mdx +++ /dev/null @@ -1,724 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.contexts/context" -title: "Context" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.Contexts.Context" - parent: "SignalWire.Contexts" - module: "SignalWire.Contexts" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs" - visibility: "public" ---- -# `Context` - -## Signature - -```dotnet -public class Context -``` - -## Properties - - - -## Methods - -### AddBullets(string, List\) - -#### Signature - -```dotnet -public Context AddBullets(string title, List bullets) -``` - -#### Parameters - - - - - -#### Returns - -`SignalWire.Contexts.Context` - -#### Source - -[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) - -Line 413. - -*** - -### AddEnterFiller(string, params string\[]) - -#### Signature - -```dotnet -public Context AddEnterFiller(string lang, params string[] fillers) -``` - -#### Parameters - - - - - -#### Returns - -`SignalWire.Contexts.Context` - -#### Source - -[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) - -Line 495. - -*** - -### AddExitFiller(string, params string\[]) - -#### Signature - -```dotnet -public Context AddExitFiller(string lang, params string[] fillers) -``` - -#### Parameters - - - - - -#### Returns - -`SignalWire.Contexts.Context` - -#### Source - -[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) - -Line 503. - -*** - -### AddSection(string, string) - -#### Signature - -```dotnet -public Context AddSection(string title, string body) -``` - -#### Parameters - - - - - -#### Returns - -`SignalWire.Contexts.Context` - -#### Source - -[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) - -Line 405. - -*** - -### AddStep(string, Dictionary\?) - -#### Signature - -```dotnet -public Step AddStep(string name, Dictionary? opts = null) -``` - -#### Parameters - - - - - -#### Returns - -`SignalWire.Contexts.Step` - -#### Source - -[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) - -Line 350. - -*** - -### AddSystemBullets(string, List\) - -#### Signature - -```dotnet -public Context AddSystemBullets(string title, List bullets) -``` - -#### Parameters - - - - - -#### Returns - -`SignalWire.Contexts.Context` - -#### Source - -[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) - -Line 439. - -*** - -### AddSystemSection(string, string) - -#### Signature - -```dotnet -public Context AddSystemSection(string title, string body) -``` - -#### Parameters - - - - - -#### Returns - -`SignalWire.Contexts.Context` - -#### Source - -[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) - -Line 431. - -*** - -### Context(string) - -#### Signature - -```dotnet -public Context(string name) -``` - -#### Parameters - - - -#### Source - -[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) - -Line 345. - -*** - -### GetInitialStep() - -#### Signature - -```dotnet -public string? GetInitialStep() -``` - -#### Returns - -`string` - -#### Source - -[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) - -Line 459. - -*** - -### GetStep(string) - -#### Signature - -```dotnet -public Step? GetStep(string name) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Contexts.Step` - -#### Source - -[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) - -Line 372. - -*** - -### GetStepOrder() - -#### Signature - -```dotnet -public List GetStepOrder() -``` - -#### Returns - -`List` - -#### Source - -[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) - -Line 393. - -*** - -### GetSteps() - -#### Signature - -```dotnet -public Dictionary GetSteps() -``` - -#### Returns - -`Dictionary` - -#### Source - -[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) - -Line 392. - -*** - -### GetValidContexts() - -#### Signature - -```dotnet -public List? GetValidContexts() -``` - -#### Returns - -`List` - -#### Source - -[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) - -Line 511. - -*** - -### MoveStep(string, int) - -#### Signature - -```dotnet -public Context MoveStep(string name, int position) -``` - -#### Parameters - - - - - -#### Returns - -`SignalWire.Contexts.Context` - -#### Source - -[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) - -Line 383. - -*** - -### RemoveStep(string) - -#### Signature - -```dotnet -public Context RemoveStep(string name) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Contexts.Context` - -#### Source - -[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) - -Line 374. - -*** - -### SetConsolidate(bool) - -#### Signature - -```dotnet -public Context SetConsolidate(bool consolidate) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Contexts.Context` - -#### Source - -[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) - -Line 464. - -*** - -### SetEnterFillers(Dictionary\>) - -#### Signature - -```dotnet -public Context SetEnterFillers(Dictionary> fillers) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Contexts.Context` - -#### Source - -[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) - -Line 492. - -*** - -### SetExitFillers(Dictionary\>) - -#### Signature - -```dotnet -public Context SetExitFillers(Dictionary> fillers) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Contexts.Context` - -#### Source - -[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) - -Line 493. - -*** - -### SetFullReset(bool) - -#### Signature - -```dotnet -public Context SetFullReset(bool fullReset) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Contexts.Context` - -#### Source - -[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) - -Line 465. - -*** - -### SetInitialStep(string) - -Set which step the context starts on when entered. - -<p>By default, a context starts on its first step (index 0). Use -this to skip a preamble step on re-entry via -`change_context`.</p> - -#### Signature - -```dotnet -public Context SetInitialStep(string stepName) -``` - -#### Parameters - - - Name of the step to start on (must exist in this context). - - -#### Returns - -`SignalWire.Contexts.Context` - -#### Source - -[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) - -Line 457. - -*** - -### SetIsolated(bool) - -Mark this context as isolated — entering it wipes conversation -history. - -<p>When <code class="paramref">isolated</code> = true and the context is -entered via change_context, the runtime wipes the conversation -array. The model starts fresh with only the new context's -system_prompt + step instructions, with no memory of prior -turns.</p> - -<p><b>EXCEPTION — reset overrides the wipe:</b> If the context -also has a reset configuration (via <xref href="SignalWire.Contexts.Context.SetConsolidate(System.Boolean)" data-throw-if-not-resolved="false"></xref> -or <xref href="SignalWire.Contexts.Context.SetFullReset(System.Boolean)" data-throw-if-not-resolved="false"></xref>), the wipe is skipped in favor of -the reset behavior. Use reset with consolidate=true to summarize -prior history into a single message instead of dropping it -entirely.</p> - -<p>Use cases: switching to a sensitive billing flow that -should not see prior small-talk; handing off to a different agent -persona; resetting after a long off-topic detour.</p> - -#### Signature - -```dotnet -public Context SetIsolated(bool isolated) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Contexts.Context` - -#### Source - -[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) - -Line 488. - -*** - -### SetPostPrompt(string) - -#### Signature - -```dotnet -public Context SetPostPrompt(string postPrompt) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Contexts.Context` - -#### Source - -[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) - -Line 463. - -*** - -### SetPrompt(string) - -#### Signature - -```dotnet -public Context SetPrompt(string prompt) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Contexts.Context` - -#### Source - -[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) - -Line 397. - -*** - -### SetSystemPrompt(string) - -#### Signature - -```dotnet -public Context SetSystemPrompt(string systemPrompt) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Contexts.Context` - -#### Source - -[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) - -Line 423. - -*** - -### SetUserPrompt(string) - -#### Signature - -```dotnet -public Context SetUserPrompt(string userPrompt) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Contexts.Context` - -#### Source - -[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) - -Line 466. - -*** - -### SetValidContexts(List\) - -#### Signature - -```dotnet -public Context SetValidContexts(List contexts) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Contexts.Context` - -#### Source - -[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) - -Line 461. - -*** - -### SetValidSteps(List\) - -#### Signature - -```dotnet -public Context SetValidSteps(List steps) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Contexts.Context` - -#### Source - -[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) - -Line 462. - -*** - -### ToDict() - -#### Signature - -```dotnet -public Dictionary ToDict() -``` - -#### Returns - -`Dictionary` - -#### Source - -[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) - -Line 535. - -## Source - -[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) - -Line 324. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.contexts/gather-info/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.contexts/gather-info/index.mdx deleted file mode 100644 index 6cd395b169..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.contexts/gather-info/index.mdx +++ /dev/null @@ -1,102 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.contexts/gather-info" -title: "GatherInfo" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.Contexts.GatherInfo" - parent: "SignalWire.Contexts" - module: "SignalWire.Contexts" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs" - visibility: "public" ---- -# `GatherInfo` - -## Signature - -```dotnet -public class GatherInfo -``` - -## Properties - - - - - -## Methods - -### AddQuestion(Dictionary\) - -#### Signature - -```dotnet -public GatherInfo AddQuestion(Dictionary opts) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Contexts.GatherInfo` - -#### Source - -[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) - -Line 81. - -*** - -### GatherInfo(string?, string?, string?) - -#### Signature - -```dotnet -public GatherInfo(string? outputKey = null, string? completionAction = null, string? prompt = null) -``` - -#### Parameters - - - - - - - -#### Source - -[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) - -Line 74. - -*** - -### ToDict() - -#### Signature - -```dotnet -public Dictionary ToDict() -``` - -#### Returns - -`Dictionary` - -#### Source - -[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) - -Line 90. - -## Source - -[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) - -Line 67. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.contexts/gather-question/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.contexts/gather-question/index.mdx deleted file mode 100644 index e01e2f2828..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.contexts/gather-question/index.mdx +++ /dev/null @@ -1,72 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.contexts/gather-question" -title: "GatherQuestion" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.Contexts.GatherQuestion" - parent: "SignalWire.Contexts" - module: "SignalWire.Contexts" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs" - visibility: "public" ---- -# `GatherQuestion` - -## Signature - -```dotnet -public class GatherQuestion -``` - -## Properties - - - -## Methods - -### GatherQuestion(Dictionary\) - -#### Signature - -```dotnet -public GatherQuestion(Dictionary opts) -``` - -#### Parameters - - - -#### Source - -[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) - -Line 38. - -*** - -### ToDict() - -#### Signature - -```dotnet -public Dictionary ToDict() -``` - -#### Returns - -`Dictionary` - -#### Source - -[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) - -Line 50. - -## Source - -[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) - -Line 29. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.contexts/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.contexts/index.mdx deleted file mode 100644 index 3d47be0105..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.contexts/index.mdx +++ /dev/null @@ -1,32 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.contexts" -title: "SignalWire.Contexts" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "module" - language: "dotnet" - qualified_name: "SignalWire.Contexts" ---- -# `SignalWire.Contexts` - -## Classes - - - - - - Builder for multi-step, multi-context AI agent workflows. <p>A ContextBuilder owns one or more <xref href="SignalWire.Contexts.Context" data-throw-if-not-resolved="false"></xref>s; each context owns an ordered list of <xref href="SignalWire.Contexts.Step" data-throw-if-not-resolved="false"></xref>s. Only one context and one step is active at a time. Per chat turn, the runtime injects the current step's instructions as a system message, then asks the LLM for a response.</p> <p><b>Native tools auto-injected by the runtime:</b> When a step (or its enclosing context) declares valid\_steps or valid\_contexts, the runtime auto-injects two native tools so the model can navigate the flow: `next_step` and `change_context`. A third native tool, `gather_submit`, is injected during gather\_info questioning. These three names are reserved: <xref href="SignalWire.Contexts.ContextBuilder.Validate" data-throw-if-not-resolved="false"></xref> rejects any agent that defines a SWAIG tool with one of them. See <xref href="SignalWire.Contexts.ReservedToolNames.Reserved" data-throw-if-not-resolved="false"></xref>.</p> <p><b>Function whitelisting (<xref href="SignalWire.Contexts.Step.SetFunctions(System.Object)" data-throw-if-not-resolved="false"></xref>):</b> Each step may declare a functions whitelist. The whitelist is applied in-memory at the start of each LLM turn. CRITICALLY: if a step does NOT declare a functions field, it INHERITS the previous step's active set. See <xref href="SignalWire.Contexts.Step.SetFunctions(System.Object)" data-throw-if-not-resolved="false"></xref> for details and examples.</p> - - - - - - - - Reserved tool names auto-injected by the runtime when contexts/steps are present. User-defined SWAIG tools must not collide with these names. <ul><li>`next_step` / `change_context` are injected when valid\_steps or valid\_contexts is set so the model can navigate the flow.</li><li>`gather_submit` is injected while a step's gather\_info is collecting answers.</li></ul> <xref href="SignalWire.Contexts.ContextBuilder.Validate" data-throw-if-not-resolved="false"></xref> rejects any agent that registers a user tool sharing one of these names — the runtime would never call the user tool because the native one wins. - - - - diff --git a/fern/products/sdk-reference/dotnet/signal-wire.contexts/reserved-tool-names/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.contexts/reserved-tool-names/index.mdx deleted file mode 100644 index 140e0b2697..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.contexts/reserved-tool-names/index.mdx +++ /dev/null @@ -1,45 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.contexts/reserved-tool-names" -title: "ReservedToolNames" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.Contexts.ReservedToolNames" - parent: "SignalWire.Contexts" - module: "SignalWire.Contexts" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs" - visibility: "public" ---- -# `ReservedToolNames` - -Reserved tool names auto-injected by the runtime when contexts/steps are -present. User-defined SWAIG tools must not collide with these names. - -<ul><li>`next_step` / `change_context` are injected when -valid_steps or valid_contexts is set so the model can navigate the flow.</li><li>`gather_submit` is injected while a step's gather_info is -collecting answers.</li></ul> - -<xref href="SignalWire.Contexts.ContextBuilder.Validate" data-throw-if-not-resolved="false"></xref> rejects any agent that registers a -user tool sharing one of these names — the runtime would never call the -user tool because the native one wins. - -**Modifiers:** `static` - -## Signature - -```dotnet -public static class ReservedToolNames -``` - -## Properties - - - -## Source - -[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) - -Line 17. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.contexts/step/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.contexts/step/index.mdx deleted file mode 100644 index b67f9428cb..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.contexts/step/index.mdx +++ /dev/null @@ -1,548 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.contexts/step" -title: "Step" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.Contexts.Step" - parent: "SignalWire.Contexts" - module: "SignalWire.Contexts" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs" - visibility: "public" ---- -# `Step` - -## Signature - -```dotnet -public class Step -``` - -## Properties - - - - - - - - - -## Methods - -### AddBullets(string, List\) - -#### Signature - -```dotnet -public Step AddBullets(string title, List bullets) -``` - -#### Parameters - - - - - -#### Returns - -`SignalWire.Contexts.Step` - -#### Source - -[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) - -Line 143. - -*** - -### AddGatherQuestion(Dictionary\) - -Add a question to this step's gather\_info. Initializes gather\_info -if not yet set. - -<p><b>IMPORTANT — gather mode locks function access:</b> While -the model is asking gather questions, the runtime forcibly -deactivates ALL of the step's other functions. The only callable -tools during a gather question are:</p> - -<ul><li>`gather_submit` (the native answer-submission tool)</li><li>Whatever names you pass in this question's `"functions"` -option</li></ul> - -<p>`next_step` and `change_context` are also filtered -out — the model cannot navigate away until the gather completes. -This is by design: it forces a tight ask → submit → next-question -loop.</p> - -<p>If a question needs to call out to a tool (e.g. validate an -email, geocode a ZIP), list that tool name in this question's -`"functions"` option. Functions listed here are active ONLY -for this question.</p> - -#### Signature - -```dotnet -public Step AddGatherQuestion(Dictionary opts) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Contexts.Step` - -#### Source - -[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) - -Line 255. - -*** - -### AddSection(string, string) - -#### Signature - -```dotnet -public Step AddSection(string title, string body) -``` - -#### Parameters - - - - - -#### Returns - -`SignalWire.Contexts.Step` - -#### Source - -[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) - -Line 135. - -*** - -### ClearSections() - -#### Signature - -```dotnet -public Step ClearSections() -``` - -#### Returns - -`SignalWire.Contexts.Step` - -#### Source - -[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) - -Line 151. - -*** - -### SetEnd(bool) - -Mark this step as terminal for the step flow. - -<p><b>IMPORTANT:</b> <code class="paramref">end</code> = true does NOT end -the conversation or hang up the call. It exits step mode entirely -after this step executes — clearing the steps list, current step -index, valid_steps, and valid_contexts. The agent keeps running, -but operates only under the base system prompt and the -context-level prompt; no more step instructions are injected and -no more `next_step` tool is offered.</p> - -<p>To actually end the call, call a hangup tool or define a -hangup hook.</p> - -#### Signature - -```dotnet -public Step SetEnd(bool end) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Contexts.Step` - -#### Source - -[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) - -Line 216. - -*** - -### SetFunctions(object) - -Set which non-internal functions are callable while this step is -active. - -<p><b>IMPORTANT — inheritance behavior:</b> If you do NOT call -this method, the step inherits whichever function set was active on -the previous step (or the previous context's last step). The -server-side runtime only resets the active set when a step -explicitly declares its `functions` field. This is the most -common source of bugs in multi-step agents: forgetting -<xref href="SignalWire.Contexts.Step.SetFunctions(System.Object)" data-throw-if-not-resolved="false"></xref> on a later step lets the previous step's -tools leak through. Best practice is to call -<xref href="SignalWire.Contexts.Step.SetFunctions(System.Object)" data-throw-if-not-resolved="false"></xref> explicitly on every step that should -differ from the previous one.</p> - -<p>Keep the per-step active set small: LLM tool selection -accuracy degrades noticeably past ~7-8 simultaneously-active tools -per call. Use per-step whitelisting to partition large tool -collections.</p> - -<p>Internal functions (e.g. `gather_submit`, hangup hook) -are ALWAYS protected and cannot be deactivated by this whitelist. -The native navigation tools `next_step` and -`change_context` are injected automatically when -<xref href="SignalWire.Contexts.Step.SetValidSteps(System.Collections.Generic.List%7bSystem.String%7d)" data-throw-if-not-resolved="false"></xref> / <xref href="SignalWire.Contexts.Step.SetValidContexts(System.Collections.Generic.List%7bSystem.String%7d)" data-throw-if-not-resolved="false"></xref> is -used; they are not affected by this list.</p> - -#### Signature - -```dotnet -public Step SetFunctions(object functions) -``` - -#### Parameters - - - One of: \
    \
  • \`List\\` — whitelist of function names allowed in this step.\
  • \
  • An empty list — explicit disable-all (no user functions callable).\
  • \
  • The string \`"none"\` — synonym for the empty list.\
  • \
-
- -#### Returns - -`SignalWire.Contexts.Step` - -#### Source - -[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) - -Line 197. - -*** - -### SetGatherInfo(Dictionary\) - -#### Signature - -```dotnet -public Step SetGatherInfo(Dictionary opts) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Contexts.Step` - -#### Source - -[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) - -Line 221. - -*** - -### SetResetConsolidate(bool) - -#### Signature - -```dotnet -public Step SetResetConsolidate(bool consolidate) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Contexts.Step` - -#### Source - -[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) - -Line 264. - -*** - -### SetResetFullReset(bool) - -#### Signature - -```dotnet -public Step SetResetFullReset(bool fullReset) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Contexts.Step` - -#### Source - -[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) - -Line 265. - -*** - -### SetResetSystemPrompt(string) - -#### Signature - -```dotnet -public Step SetResetSystemPrompt(string systemPrompt) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Contexts.Step` - -#### Source - -[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) - -Line 262. - -*** - -### SetResetUserPrompt(string) - -#### Signature - -```dotnet -public Step SetResetUserPrompt(string userPrompt) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Contexts.Step` - -#### Source - -[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) - -Line 263. - -*** - -### SetSkipToNextStep(bool) - -#### Signature - -```dotnet -public Step SetSkipToNextStep(bool skip) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Contexts.Step` - -#### Source - -[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) - -Line 219. - -*** - -### SetSkipUserTurn(bool) - -#### Signature - -```dotnet -public Step SetSkipUserTurn(bool skip) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Contexts.Step` - -#### Source - -[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) - -Line 218. - -*** - -### SetStepCriteria(string) - -#### Signature - -```dotnet -public Step SetStepCriteria(string criteria) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Contexts.Step` - -#### Source - -[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) - -Line 158. - -*** - -### SetText(string) - -#### Signature - -```dotnet -public Step SetText(string text) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Contexts.Step` - -#### Source - -[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) - -Line 127. - -*** - -### SetValidContexts(List\) - -#### Signature - -```dotnet -public Step SetValidContexts(List contexts) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Contexts.Step` - -#### Source - -[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) - -Line 200. - -*** - -### SetValidSteps(List\) - -#### Signature - -```dotnet -public Step SetValidSteps(List steps) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Contexts.Step` - -#### Source - -[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) - -Line 199. - -*** - -### Step(string) - -#### Signature - -```dotnet -public Step(string name) -``` - -#### Parameters - - - -#### Source - -[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) - -Line 123. - -*** - -### ToDict() - -#### Signature - -```dotnet -public Dictionary ToDict() -``` - -#### Returns - -`Dictionary` - -#### Source - -[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) - -Line 295. - -## Source - -[`src/SignalWire/Contexts/ContextBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Contexts/ContextBuilder.cs) - -Line 105. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.data-map/data-map/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.data-map/data-map/index.mdx deleted file mode 100644 index f3681802ac..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.data-map/data-map/index.mdx +++ /dev/null @@ -1,516 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.data-map/data-map" -title: "DataMap" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.DataMap.DataMap" - parent: "SignalWire.DataMap" - module: "SignalWire.DataMap" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs" - visibility: "public" ---- -# `DataMap` - -Builds a SWAIG data-map function definition with parameters, expressions, webhooks, -and output configuration. All builder methods return `this` for fluent chaining. - -## Signature - -```dotnet -public class DataMap -``` - -## Methods - -### Body(Dictionary\) - -#### Signature - -```dotnet -public DataMap Body(Dictionary data) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.DataMap.DataMap` - -#### Source - -[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) - -Line 172. - -*** - -### CreateExpressionTool(string, string, List\>, List\>) - -**Modifiers:** `static` - -#### Signature - -```dotnet -public static Dictionary CreateExpressionTool(string name, string purpose, List> parameters, List> expressions) -``` - -#### Parameters - - - - - - - - - -#### Returns - -`Dictionary` - -#### Source - -[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) - -Line 263. - -*** - -### CreateSimpleApiTool(string, string, List\>, string, string, object, Dictionary\?) - -**Modifiers:** `static` - -#### Signature - -```dotnet -public static Dictionary CreateSimpleApiTool(string name, string purpose, List> parameters, string method, string url, object output, Dictionary? headers = null) -``` - -#### Parameters - - - - - - - - - - - - - - - -#### Returns - -`Dictionary` - -#### Source - -[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) - -Line 244. - -*** - -### DataMap(string) - -#### Signature - -```dotnet -public DataMap(string functionName) -``` - -#### Parameters - - - -#### Source - -[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) - -Line 22. - -*** - -### Description(string) - -Alias for <xref href="SignalWire.DataMap.DataMap.Purpose(System.String)" data-throw-if-not-resolved="false"></xref>. Sets the LLM-facing tool -description. This string is read by the model to decide WHEN -to call this tool. See <xref href="SignalWire.DataMap.DataMap.Purpose(System.String)" data-throw-if-not-resolved="false"></xref> for bad-vs-good -examples. - -#### Signature - -```dotnet -public DataMap Description(string desc) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.DataMap.DataMap` - -#### Source - -[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) - -Line 59. - -*** - -### ErrorKeys(List\) - -#### Signature - -```dotnet -public DataMap ErrorKeys(List keys) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.DataMap.DataMap` - -#### Source - -[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) - -Line 203. - -*** - -### Expression(string, string, object, object?) - -#### Signature - -```dotnet -public DataMap Expression(string testValue, string pattern, object output, object? nomatchOutput = null) -``` - -#### Parameters - - - - - - - - - -#### Returns - -`SignalWire.DataMap.DataMap` - -#### Source - -[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) - -Line 109. - -*** - -### FallbackOutput(object) - -#### Signature - -```dotnet -public DataMap FallbackOutput(object result) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.DataMap.DataMap` - -#### Source - -[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) - -Line 196. - -*** - -### ForEach(Dictionary\) - -#### Signature - -```dotnet -public DataMap ForEach(Dictionary config) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.DataMap.DataMap` - -#### Source - -[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) - -Line 184. - -*** - -### GlobalErrorKeys(List\) - -#### Signature - -```dotnet -public DataMap GlobalErrorKeys(List keys) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.DataMap.DataMap` - -#### Source - -[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) - -Line 209. - -*** - -### Output(object) - -#### Signature - -```dotnet -public DataMap Output(object result) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.DataMap.DataMap` - -#### Source - -[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) - -Line 190. - -*** - -### Parameter(string, string, string, bool, List\?) - -Add a parameter to this data-map tool — the <code class="paramref">description</code> -is LLM-FACING. - -<p>Each parameter description is rendered into the OpenAI -tool schema under `parameters.properties.<name>.description` -and sent to the model. The model uses it to decide HOW to fill -in the argument from user speech. It is prompt engineering, not -developer FYI.</p> - -<p><b>Bad vs good:</b></p> -<pre><code class="lang-csharp">BAD : .Parameter("city", "string", "the city") -GOOD: .Parameter("city", "string", - "The name of the city to get weather for, e.g. " - + "'San Francisco'. Ask the user if they did not " - + "provide one. Include the state or country if the " - + "city name is ambiguous.")</code></pre> - -#### Signature - -```dotnet -public DataMap Parameter(string name, string type, string description, bool required = false, List? enumValues = null) -``` - -#### Parameters - - - - - - - - - - - -#### Returns - -`SignalWire.DataMap.DataMap` - -#### Source - -[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) - -Line 81. - -*** - -### Params(Dictionary\) - -#### Signature - -```dotnet -public DataMap Params(Dictionary data) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.DataMap.DataMap` - -#### Source - -[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) - -Line 178. - -*** - -### Purpose(string) - -Set the LLM-facing tool description (the "purpose"). PROMPT -ENGINEERING, not developer documentation. - -<p>The description string is rendered into the OpenAI tool -schema `description` field on every LLM turn. The model -reads it to decide WHEN to call this tool. A vague -<xref href="SignalWire.DataMap.DataMap.Purpose(System.String)" data-throw-if-not-resolved="false"></xref> is the #1 cause of "the model has the -right tool but doesn't call it" failures with data-map tools.</p> - -<p><b>Bad vs good:</b></p> -<pre><code class="lang-csharp">BAD : .Purpose("weather api") -GOOD: .Purpose("Get the current weather conditions and " - + "forecast for a specific city. Use this " - + "whenever the user asks about weather, " - + "temperature, rain, or similar conditions in a " - + "named location.")</code></pre> - -#### Signature - -```dotnet -public DataMap Purpose(string desc) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.DataMap.DataMap` - -#### Source - -[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) - -Line 47. - -*** - -### ToSwaigFunction() - -#### Signature - -```dotnet -public Dictionary ToSwaigFunction() -``` - -#### Returns - -`Dictionary` - -#### Source - -[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) - -Line 215. - -*** - -### Webhook(string, string, Dictionary\?, string, bool, List\?) - -#### Signature - -```dotnet -public DataMap Webhook(string method, string url, Dictionary? headers = null, string formParam = "", bool inputArgsAsParams = false, List? requireArgs = null) -``` - -#### Parameters - - - - - - - - - - - - - -#### Returns - -`SignalWire.DataMap.DataMap` - -#### Source - -[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) - -Line 131. - -*** - -### WebhookExpressions(List\>) - -#### Signature - -```dotnet -public DataMap WebhookExpressions(List> expressions) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.DataMap.DataMap` - -#### Source - -[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) - -Line 166. - -## Source - -[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) - -Line 8. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.data-map/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.data-map/index.mdx deleted file mode 100644 index 2e0be2a0f9..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.data-map/index.mdx +++ /dev/null @@ -1,20 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.data-map" -title: "SignalWire.DataMap" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "module" - language: "dotnet" - qualified_name: "SignalWire.DataMap" ---- -# `SignalWire.DataMap` - -## Classes - - - - Builds a SWAIG data-map function definition with parameters, expressions, webhooks, and output configuration. All builder methods return `this` for fluent chaining. - - diff --git a/fern/products/sdk-reference/dotnet/signal-wire.logging/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.logging/index.mdx deleted file mode 100644 index 290a7cfcc1..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.logging/index.mdx +++ /dev/null @@ -1,44 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.logging" -title: "SignalWire.Logging" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "module" - language: "dotnet" - qualified_name: "SignalWire.Logging" ---- -# `SignalWire.Logging` - -## Classes - - - - - -## Enums - -### LogLevel - -#### Signature - -```dotnet -public enum LogLevel -``` - -#### Properties - - - - - - - - - -#### Source - -[`src/SignalWire/Logging/Logger.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Logging/Logger.cs) - -Line 2. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.logging/logger/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.logging/logger/index.mdx deleted file mode 100644 index 6d4ac40f2c..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.logging/logger/index.mdx +++ /dev/null @@ -1,188 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.logging/logger" -title: "Logger" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.Logging.Logger" - parent: "SignalWire.Logging" - module: "SignalWire.Logging" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Logging/Logger.cs" - visibility: "public" ---- -# `Logger` - -**Modifiers:** `sealed` - -## Signature - -```dotnet -public sealed class Logger -``` - -## Properties - - - - - - - -## Methods - -### Debug(string) - -#### Signature - -```dotnet -public void Debug(string message) -``` - -#### Parameters - - - -#### Source - -[`src/SignalWire/Logging/Logger.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Logging/Logger.cs) - -Line 51. - -*** - -### Error(string) - -#### Signature - -```dotnet -public void Error(string message) -``` - -#### Parameters - - - -#### Source - -[`src/SignalWire/Logging/Logger.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Logging/Logger.cs) - -Line 54. - -*** - -### GetLogger(string) - -**Modifiers:** `static` - -#### Signature - -```dotnet -public static Logger GetLogger(string name = "signalwire") -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Logging.Logger` - -#### Source - -[`src/SignalWire/Logging/Logger.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Logging/Logger.cs) - -Line 30. - -*** - -### Info(string) - -#### Signature - -```dotnet -public void Info(string message) -``` - -#### Parameters - - - -#### Source - -[`src/SignalWire/Logging/Logger.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Logging/Logger.cs) - -Line 52. - -*** - -### Reset() - -Reset all logger instances (for testing). - -**Modifiers:** `static` - -#### Signature - -```dotnet -public static void Reset() -``` - -#### Source - -[`src/SignalWire/Logging/Logger.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Logging/Logger.cs) - -Line 44. - -*** - -### ShouldLog(LogLevel) - -#### Signature - -```dotnet -public bool ShouldLog(LogLevel level) -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/SignalWire/Logging/Logger.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Logging/Logger.cs) - -Line 49. - -*** - -### Warn(string) - -#### Signature - -```dotnet -public void Warn(string message) -``` - -#### Parameters - - - -#### Source - -[`src/SignalWire/Logging/Logger.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Logging/Logger.cs) - -Line 53. - -## Source - -[`src/SignalWire/Logging/Logger.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Logging/Logger.cs) - -Line 10. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.pom/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.pom/index.mdx deleted file mode 100644 index 69f18dc06c..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.pom/index.mdx +++ /dev/null @@ -1,22 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.pom" -title: "SignalWire.POM" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "module" - language: "dotnet" - qualified_name: "SignalWire.POM" ---- -# `SignalWire.POM` - -## Classes - - - - - - - - diff --git a/fern/products/sdk-reference/dotnet/signal-wire.pom/pom-builder/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.pom/pom-builder/index.mdx deleted file mode 100644 index 40c49b4fe1..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.pom/pom-builder/index.mdx +++ /dev/null @@ -1,323 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.pom/pom-builder" -title: "PomBuilder" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.POM.PomBuilder" - parent: "SignalWire.POM" - module: "SignalWire.POM" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PomBuilder.cs" - visibility: "public" ---- -# `PomBuilder` - -## Signature - -```dotnet -public class PomBuilder -``` - -## Properties - - - -## Methods - -### AddSection(string, string, List\?, bool, bool, List\>?) - -Add a new section. (Python parity: -`PomBuilder.add_section`.) - -#### Signature - -```dotnet -public PomBuilder AddSection(string title, string body = "", List? bullets = null, bool numbered = false, bool numberedBullets = false, List>? subsections = null) -``` - -#### Parameters - - - - - - - - - - - - - -#### Returns - -`SignalWire.POM.PomBuilder` - -#### Source - -[`src/SignalWire/POM/PomBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PomBuilder.cs) - -Line 25. - -*** - -### AddSubsection(string, string, string, List\?) - -Add a subsection under an existing section -(auto-vivifies parent if missing). (Python parity: -`PomBuilder.add_subsection`.) - -#### Signature - -```dotnet -public PomBuilder AddSubsection(string parentTitle, string title, string body = "", List? bullets = null) -``` - -#### Parameters - - - - - - - - - -#### Returns - -`SignalWire.POM.PomBuilder` - -#### Source - -[`src/SignalWire/POM/PomBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PomBuilder.cs) - -Line 83. - -*** - -### AddToSection(string, string?, string?, List\?) - -Add content to an existing section (auto-vivifies if -missing). (Python parity: `PomBuilder.add_to_section`.) - -#### Signature - -```dotnet -public PomBuilder AddToSection(string title, string? body = null, string? bullet = null, List? bullets = null) -``` - -#### Parameters - - - - - - - - - -#### Returns - -`SignalWire.POM.PomBuilder` - -#### Source - -[`src/SignalWire/POM/PomBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PomBuilder.cs) - -Line 52. - -*** - -### FromSections(List\>) - -Build a PomBuilder from a list of section dicts. -(Python parity: `PomBuilder.from_sections` classmethod.) - -**Modifiers:** `static` - -#### Signature - -```dotnet -public static PomBuilder FromSections(List> sections) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.POM.PomBuilder` - -#### Source - -[`src/SignalWire/POM/PomBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PomBuilder.cs) - -Line 120. - -*** - -### GetSection(string) - -Get a section by title, or null if absent. -(Python parity: `PomBuilder.get_section`.) - -#### Signature - -```dotnet -public Section? GetSection(string title) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.POM.Section` - -#### Source - -[`src/SignalWire/POM/PomBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PomBuilder.cs) - -Line 103. - -*** - -### HasSection(string) - -Check if a section with the given title exists. -(Python parity: `PomBuilder.has_section`.) - -#### Signature - -```dotnet -public bool HasSection(string title) -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/SignalWire/POM/PomBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PomBuilder.cs) - -Line 99. - -*** - -### PomBuilder() - -#### Signature - -```dotnet -public PomBuilder() -``` - -#### Source - -[`src/SignalWire/POM/PomBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PomBuilder.cs) - -Line 17. - -*** - -### RenderMarkdown() - -Render the POM as markdown. - -#### Signature - -```dotnet -public string RenderMarkdown() -``` - -#### Returns - -`string` - -#### Source - -[`src/SignalWire/POM/PomBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PomBuilder.cs) - -Line 107. - -*** - -### RenderXml() - -Render the POM as XML. - -#### Signature - -```dotnet -public string RenderXml() -``` - -#### Returns - -`string` - -#### Source - -[`src/SignalWire/POM/PomBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PomBuilder.cs) - -Line 110. - -*** - -### ToDict() - -Serialize the POM to a list of section dicts. - -#### Signature - -```dotnet -public List> ToDict() -``` - -#### Returns - -`List>` - -#### Source - -[`src/SignalWire/POM/PomBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PomBuilder.cs) - -Line 113. - -*** - -### ToJson() - -Serialize the POM to a JSON string. - -#### Signature - -```dotnet -public string ToJson() -``` - -#### Returns - -`string` - -#### Source - -[`src/SignalWire/POM/PomBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PomBuilder.cs) - -Line 116. - -## Source - -[`src/SignalWire/POM/PomBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PomBuilder.cs) - -Line 12. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.pom/prompt-object-model/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.pom/prompt-object-model/index.mdx deleted file mode 100644 index b95018a6bb..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.pom/prompt-object-model/index.mdx +++ /dev/null @@ -1,330 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.pom/prompt-object-model" -title: "PromptObjectModel" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.POM.PromptObjectModel" - parent: "SignalWire.POM" - module: "SignalWire.POM" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PromptObjectModel.cs" - visibility: "public" ---- -# `PromptObjectModel` - -## Signature - -```dotnet -public class PromptObjectModel -``` - -## Properties - - - - - -## Methods - -### AddPomAsSubsection - -Add a PromptObjectModel as a subsection of an existing -section in this model, identified by title. -(Python parity: `PromptObjectModel.add_pom_as_subsection`.) - -#### Signature - - - - ```dotnet - public void AddPomAsSubsection(string targetTitle, PromptObjectModel pomToAdd) - ``` - - - - ```dotnet - public void AddPomAsSubsection(Section target, PromptObjectModel pomToAdd) - ``` - - - -#### Parameters (Overload 1) - - - - - -#### Parameters (Overload 2) - - - - - -#### Source - -[`src/SignalWire/POM/PromptObjectModel.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PromptObjectModel.cs) - -Line 514. - -*** - -### AddSection(string?, string, List\?, bool?, bool) - -Add a top-level section to the model, returning the new -Section. Only the first added section may have a null title. -(Python parity: `PromptObjectModel.add_section`.) - -#### Signature - -```dotnet -public Section AddSection(string? title = null, string body = "", List? bullets = null, bool? numbered = null, bool numberedBullets = false) -``` - -#### Parameters - - - - - - - - - - - -#### Returns - -`SignalWire.POM.Section` - -#### Source - -[`src/SignalWire/POM/PromptObjectModel.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PromptObjectModel.cs) - -Line 266. - -*** - -### FindSection(string) - -Recursively find a section by title. Returns null if not -found. (Python parity: `PromptObjectModel.find_section`.) - -#### Signature - -```dotnet -public Section? FindSection(string title) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.POM.Section` - -#### Source - -[`src/SignalWire/POM/PromptObjectModel.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PromptObjectModel.cs) - -Line 283. - -*** - -### FromJson(string) - -Construct a PromptObjectModel from JSON. -(Python parity: `PromptObjectModel.from_json`.) - -**Modifiers:** `static` - -#### Signature - -```dotnet -public static PromptObjectModel FromJson(string json) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.POM.PromptObjectModel` - -#### Source - -[`src/SignalWire/POM/PromptObjectModel.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PromptObjectModel.cs) - -Line 439. - -*** - -### FromYaml(string) - -Construct a PromptObjectModel from YAML string. -(Python parity: `PromptObjectModel.from_yaml`.) - -**Modifiers:** `static` - -#### Signature - -```dotnet -public static PromptObjectModel FromYaml(string yaml) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.POM.PromptObjectModel` - -#### Source - -[`src/SignalWire/POM/PromptObjectModel.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PromptObjectModel.cs) - -Line 406. - -*** - -### PromptObjectModel(bool) - -#### Signature - -```dotnet -public PromptObjectModel(bool debug = false) -``` - -#### Parameters - - - -#### Source - -[`src/SignalWire/POM/PromptObjectModel.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PromptObjectModel.cs) - -Line 257. - -*** - -### RenderMarkdown() - -Render the model as markdown. Mirrors Python's -`PromptObjectModel.render_markdown` exactly. - -#### Signature - -```dotnet -public string RenderMarkdown() -``` - -#### Returns - -`string` - -#### Source - -[`src/SignalWire/POM/PromptObjectModel.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PromptObjectModel.cs) - -Line 306. - -*** - -### RenderXml() - -#### Signature - -```dotnet -public string RenderXml() -``` - -#### Returns - -`string` - -#### Source - -[`src/SignalWire/POM/PromptObjectModel.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PromptObjectModel.cs) - -Line 337. - -*** - -### ToDict() - -Serialize to a list of dicts (matches Python's to\_dict -which returns a List rather than a Dict). - -#### Signature - -```dotnet -public List> ToDict() -``` - -#### Returns - -`List>` - -#### Source - -[`src/SignalWire/POM/PromptObjectModel.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PromptObjectModel.cs) - -Line 372. - -*** - -### ToJson() - -Serialize to JSON string with 2-space indent and Python -dict-style formatting. Empty model emits `"[]"`. - -#### Signature - -```dotnet -public string ToJson() -``` - -#### Returns - -`string` - -#### Source - -[`src/SignalWire/POM/PromptObjectModel.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PromptObjectModel.cs) - -Line 377. - -*** - -### ToYaml() - -Serialize to YAML string. Matches PyYAML's -`yaml.dump(data, default_flow_style=False, sort_keys=False)` -exactly. Empty model emits `"[]\n"`. - -#### Signature - -```dotnet -public string ToYaml() -``` - -#### Returns - -`string` - -#### Source - -[`src/SignalWire/POM/PromptObjectModel.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PromptObjectModel.cs) - -Line 393. - -## Source - -[`src/SignalWire/POM/PromptObjectModel.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PromptObjectModel.cs) - -Line 250. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.pom/section/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.pom/section/index.mdx deleted file mode 100644 index 261b81ebb3..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.pom/section/index.mdx +++ /dev/null @@ -1,244 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.pom/section" -title: "Section" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.POM.Section" - parent: "SignalWire.POM" - module: "SignalWire.POM" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PromptObjectModel.cs" - visibility: "public" ---- -# `Section` - -## Signature - -```dotnet -public class Section -``` - -## Properties - - - - - - - Three-state numbering: null = inherit, true = force on, false = force off. (Python parity: `numbered` is `Optional[bool]`.) Sibling propagation: if any sibling at the same level has Numbered==true, all siblings get numbered unless they have Numbered==false. - - - - - - - - Section title. Null for the (allowed) first untitled top-level section. (Python parity: `Section.title` is `Optional[str]`.) - - -## Methods - -### AddBody(string) - -Set or replace this section's body text. -(Python parity: `Section.add_body`.) - -#### Signature - -```dotnet -public Section AddBody(string body) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.POM.Section` - -#### Source - -[`src/SignalWire/POM/PromptObjectModel.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PromptObjectModel.cs) - -Line 66. - -*** - -### AddBullets(List\) - -Append bullets to this section. -(Python parity: `Section.add_bullets`.) - -#### Signature - -```dotnet -public Section AddBullets(List bullets) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.POM.Section` - -#### Source - -[`src/SignalWire/POM/PromptObjectModel.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PromptObjectModel.cs) - -Line 74. - -*** - -### AddSubsection(string?, string, List\?, bool?, bool) - -Add a subsection under this section, returning the new -Section. (Python parity: `Section.add_subsection`.) - -#### Signature - -```dotnet -public Section AddSubsection(string? title = null, string body = "", List? bullets = null, bool? numbered = null, bool numberedBullets = false) -``` - -#### Parameters - - - - - - - - - - - -#### Returns - -`SignalWire.POM.Section` - -#### Source - -[`src/SignalWire/POM/PromptObjectModel.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PromptObjectModel.cs) - -Line 82. - -*** - -### RenderMarkdown(int, List\?) - -Render this section as a markdown fragment, indented at -the given header level (default 2). Mirrors Python's -`Section.render_markdown` exactly. - -#### Signature - -```dotnet -public string RenderMarkdown(int level = 2, List? sectionNumber = null) -``` - -#### Parameters - - - - - -#### Returns - -`string` - -#### Source - -[`src/SignalWire/POM/PromptObjectModel.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PromptObjectModel.cs) - -Line 99. - -*** - -### RenderXml(int, List\?) - -#### Signature - -```dotnet -public string RenderXml(int indent = 0, List? sectionNumber = null) -``` - -#### Parameters - - - - - -#### Returns - -`string` - -#### Source - -[`src/SignalWire/POM/PromptObjectModel.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PromptObjectModel.cs) - -Line 164. - -*** - -### Section(string?, string, List\?, bool?, bool) - -#### Signature - -```dotnet -public Section(string? title = null, string body = "", List? bullets = null, bool? numbered = null, bool numberedBullets = false) -``` - -#### Parameters - - - - - - - - - - - -#### Source - -[`src/SignalWire/POM/PromptObjectModel.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PromptObjectModel.cs) - -Line 49. - -*** - -### ToDict() - -Serialize to a Dictionary suitable for JSON. Emits -keys in this exact order: title, body, bullets, subsections, -numbered, numberedBullets — and only when non-empty / non-null / -non-default. Mirrors Python's `Section.to_dict`. - -#### Signature - -```dotnet -public Dictionary ToDict() -``` - -#### Returns - -`Dictionary` - -#### Source - -[`src/SignalWire/POM/PromptObjectModel.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PromptObjectModel.cs) - -Line 229. - -## Source - -[`src/SignalWire/POM/PromptObjectModel.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/POM/PromptObjectModel.cs) - -Line 27. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.prefabs/concierge-agent/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.prefabs/concierge-agent/index.mdx deleted file mode 100644 index c5b7662c71..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.prefabs/concierge-agent/index.mdx +++ /dev/null @@ -1,177 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.prefabs/concierge-agent" -title: "ConciergeAgent" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.Prefabs.ConciergeAgent" - parent: "SignalWire.Prefabs" - module: "SignalWire.Prefabs" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/ConciergeAgent.cs" - visibility: "public" ---- -# `ConciergeAgent` - -Prefab concierge agent for venue/hotel style interactions. -Registers `check_availability` and `get_directions` tools. - -## Signature - -```dotnet -public class ConciergeAgent : AgentBase -``` - -## Inheritance - -**Extends:** [SignalWire.SWML.Service](/docs/sdk-reference/reference/dotnet/signal-wire.swml/service) - -## Methods - -### CheckAvailability(Dictionary\, Dictionary\) - -SWAIG tool handler for the `check_availability` tool. -(Python parity: `ConciergeAgent.check_availability(args, raw_data)`.) - -#### Signature - -```dotnet -public FunctionResult CheckAvailability(Dictionary args, Dictionary rawData) -``` - -#### Parameters - - - - - -#### Returns - -`SignalWire.SWAIG.FunctionResult` - -#### Source - -[`src/SignalWire/Prefabs/ConciergeAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/ConciergeAgent.cs) - -Line 91. - -*** - -### ConciergeAgent(string, Dictionary\, Dictionary\?) - -#### Signature - -```dotnet -public ConciergeAgent(string name, Dictionary venueInfo, Dictionary? options = null) -``` - -#### Parameters - - - - - - - -#### Source - -[`src/SignalWire/Prefabs/ConciergeAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/ConciergeAgent.cs) - -Line 15. - -*** - -### GetAmenities() - -#### Signature - -```dotnet -public Dictionary> GetAmenities() -``` - -#### Returns - -`Dictionary>` - -#### Source - -[`src/SignalWire/Prefabs/ConciergeAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/ConciergeAgent.cs) - -Line 121. - -*** - -### GetDirections(Dictionary\, Dictionary\) - -SWAIG tool handler for the `get_directions` tool. -(Python parity: `ConciergeAgent.get_directions(args, raw_data)`.) - -#### Signature - -```dotnet -public FunctionResult GetDirections(Dictionary args, Dictionary rawData) -``` - -#### Parameters - - - - - -#### Returns - -`SignalWire.SWAIG.FunctionResult` - -#### Source - -[`src/SignalWire/Prefabs/ConciergeAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/ConciergeAgent.cs) - -Line 102. - -*** - -### GetServices() - -#### Signature - -```dotnet -public List GetServices() -``` - -#### Returns - -`List` - -#### Source - -[`src/SignalWire/Prefabs/ConciergeAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/ConciergeAgent.cs) - -Line 120. - -*** - -### GetVenueName() - -#### Signature - -```dotnet -public string GetVenueName() -``` - -#### Returns - -`string` - -#### Source - -[`src/SignalWire/Prefabs/ConciergeAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/ConciergeAgent.cs) - -Line 119. - -## Source - -[`src/SignalWire/Prefabs/ConciergeAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/ConciergeAgent.cs) - -Line 9. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.prefabs/faq-bot-agent/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.prefabs/faq-bot-agent/index.mdx deleted file mode 100644 index 0e4d03c118..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.prefabs/faq-bot-agent/index.mdx +++ /dev/null @@ -1,129 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.prefabs/faq-bot-agent" -title: "FAQBotAgent" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.Prefabs.FAQBotAgent" - parent: "SignalWire.Prefabs" - module: "SignalWire.Prefabs" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/FAQBotAgent.cs" - visibility: "public" ---- -# `FAQBotAgent` - -Prefab FAQ bot agent with keyword-scored search. -Registers a `search_faqs` tool. - -## Signature - -```dotnet -public class FAQBotAgent : AgentBase -``` - -## Inheritance - -**Extends:** [SignalWire.SWML.Service](/docs/sdk-reference/reference/dotnet/signal-wire.swml/service) - -## Methods - -### FAQBotAgent(string, List\>, Dictionary\?) - -#### Signature - -```dotnet -public FAQBotAgent(string name, List> faqs, Dictionary? options = null) -``` - -#### Parameters - - - - - - - -#### Source - -[`src/SignalWire/Prefabs/FAQBotAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/FAQBotAgent.cs) - -Line 14. - -*** - -### GetFaqs() - -#### Signature - -```dotnet -public List> GetFaqs() -``` - -#### Returns - -`List>` - -#### Source - -[`src/SignalWire/Prefabs/FAQBotAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/FAQBotAgent.cs) - -Line 98. - -*** - -### GetSuggestRelated() - -#### Signature - -```dotnet -public bool GetSuggestRelated() -``` - -#### Returns - -`bool` - -#### Source - -[`src/SignalWire/Prefabs/FAQBotAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/FAQBotAgent.cs) - -Line 99. - -*** - -### SearchFaqs(Dictionary\, Dictionary\) - -SWAIG tool handler that searches the configured FAQ -knowledge base for the best keyword-scored answer. -(Python parity: `FAQBotAgent.search_faqs(args, raw_data)`.) - -#### Signature - -```dotnet -public FunctionResult SearchFaqs(Dictionary args, Dictionary rawData) -``` - -#### Parameters - - - - - -#### Returns - -`SignalWire.SWAIG.FunctionResult` - -#### Source - -[`src/SignalWire/Prefabs/FAQBotAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/FAQBotAgent.cs) - -Line 63. - -## Source - -[`src/SignalWire/Prefabs/FAQBotAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/FAQBotAgent.cs) - -Line 9. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.prefabs/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.prefabs/index.mdx deleted file mode 100644 index 902e58c7ab..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.prefabs/index.mdx +++ /dev/null @@ -1,36 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.prefabs" -title: "SignalWire.Prefabs" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "module" - language: "dotnet" - qualified_name: "SignalWire.Prefabs" ---- -# `SignalWire.Prefabs` - -## Classes - - - - Prefab concierge agent for venue/hotel style interactions. Registers `check_availability` and `get_directions` tools. - - - - Prefab FAQ bot agent with keyword-scored search. Registers a `search_faqs` tool. - - - - Prefab agent that gathers information by asking a series of questions. Registers `start_questions` and `submit_answer` tools. - - - - Prefab agent that greets callers and transfers them to departments. Registers `collect_caller_info` and `transfer_call` tools. - - - - Prefab agent that conducts surveys with typed question validation. Registers `validate_response` and `log_response` tools. - - diff --git a/fern/products/sdk-reference/dotnet/signal-wire.prefabs/info-gatherer-agent/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.prefabs/info-gatherer-agent/index.mdx deleted file mode 100644 index fd65299ed9..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.prefabs/info-gatherer-agent/index.mdx +++ /dev/null @@ -1,143 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.prefabs/info-gatherer-agent" -title: "InfoGathererAgent" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.Prefabs.InfoGathererAgent" - parent: "SignalWire.Prefabs" - module: "SignalWire.Prefabs" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/InfoGathererAgent.cs" - visibility: "public" ---- -# `InfoGathererAgent` - -Prefab agent that gathers information by asking a series of questions. -Registers `start_questions` and `submit_answer` tools. - -## Signature - -```dotnet -public class InfoGathererAgent : AgentBase -``` - -## Inheritance - -**Extends:** [SignalWire.SWML.Service](/docs/sdk-reference/reference/dotnet/signal-wire.swml/service) - -## Methods - -### GetQuestions() - -#### Signature - -```dotnet -public List> GetQuestions() -``` - -#### Returns - -`List>` - -#### Source - -[`src/SignalWire/Prefabs/InfoGathererAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/InfoGathererAgent.cs) - -Line 77. - -*** - -### InfoGathererAgent(string, List\>, AgentOptions?) - -#### Signature - -```dotnet -public InfoGathererAgent(string name, List> questions, AgentOptions? options = null) -``` - -#### Parameters - - - Agent name (defaults to "info\_gatherer"). - - - - List of question dicts with key\_name, question\_text, and optional confirm. - - - - Additional <xref href="SignalWire.Agent.AgentOptions" data-throw-if-not-resolved="false"></xref> overrides. - - -#### Source - -[`src/SignalWire/Prefabs/InfoGathererAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/InfoGathererAgent.cs) - -Line 16. - -*** - -### StartQuestions(Dictionary\, Dictionary\) - -SWAIG tool handler for the `start_questions` tool. -(Python parity: `InfoGathererAgent.start_questions`.) - -#### Signature - -```dotnet -public FunctionResult StartQuestions(Dictionary args, Dictionary rawData) -``` - -#### Parameters - - - - - -#### Returns - -`SignalWire.SWAIG.FunctionResult` - -#### Source - -[`src/SignalWire/Prefabs/InfoGathererAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/InfoGathererAgent.cs) - -Line 60. - -*** - -### SubmitAnswer(Dictionary\, Dictionary\) - -SWAIG tool handler for the `submit_answer` tool. -(Python parity: `InfoGathererAgent.submit_answer`.) - -#### Signature - -```dotnet -public FunctionResult SubmitAnswer(Dictionary args, Dictionary rawData) -``` - -#### Parameters - - - - - -#### Returns - -`SignalWire.SWAIG.FunctionResult` - -#### Source - -[`src/SignalWire/Prefabs/InfoGathererAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/InfoGathererAgent.cs) - -Line 71. - -## Source - -[`src/SignalWire/Prefabs/InfoGathererAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/InfoGathererAgent.cs) - -Line 9. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.prefabs/receptionist-agent/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.prefabs/receptionist-agent/index.mdx deleted file mode 100644 index 97e04a5994..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.prefabs/receptionist-agent/index.mdx +++ /dev/null @@ -1,99 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.prefabs/receptionist-agent" -title: "ReceptionistAgent" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.Prefabs.ReceptionistAgent" - parent: "SignalWire.Prefabs" - module: "SignalWire.Prefabs" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/ReceptionistAgent.cs" - visibility: "public" ---- -# `ReceptionistAgent` - -Prefab agent that greets callers and transfers them to departments. -Registers `collect_caller_info` and `transfer_call` tools. - -## Signature - -```dotnet -public class ReceptionistAgent : AgentBase -``` - -## Inheritance - -**Extends:** [SignalWire.SWML.Service](/docs/sdk-reference/reference/dotnet/signal-wire.swml/service) - -## Methods - -### GetDepartments() - -#### Signature - -```dotnet -public List> GetDepartments() -``` - -#### Returns - -`List>` - -#### Source - -[`src/SignalWire/Prefabs/ReceptionistAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/ReceptionistAgent.cs) - -Line 94. - -*** - -### GetGreeting() - -#### Signature - -```dotnet -public string GetGreeting() -``` - -#### Returns - -`string` - -#### Source - -[`src/SignalWire/Prefabs/ReceptionistAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/ReceptionistAgent.cs) - -Line 95. - -*** - -### ReceptionistAgent(string, List\>, Dictionary\?) - -#### Signature - -```dotnet -public ReceptionistAgent(string name, List> departments, Dictionary? options = null) -``` - -#### Parameters - - - - - - - -#### Source - -[`src/SignalWire/Prefabs/ReceptionistAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/ReceptionistAgent.cs) - -Line 14. - -## Source - -[`src/SignalWire/Prefabs/ReceptionistAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/ReceptionistAgent.cs) - -Line 9. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.prefabs/survey-agent/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.prefabs/survey-agent/index.mdx deleted file mode 100644 index 5b450fa3f4..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.prefabs/survey-agent/index.mdx +++ /dev/null @@ -1,157 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.prefabs/survey-agent" -title: "SurveyAgent" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.Prefabs.SurveyAgent" - parent: "SignalWire.Prefabs" - module: "SignalWire.Prefabs" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/SurveyAgent.cs" - visibility: "public" ---- -# `SurveyAgent` - -Prefab agent that conducts surveys with typed question validation. -Registers `validate_response` and `log_response` tools. - -## Signature - -```dotnet -public class SurveyAgent : AgentBase -``` - -## Inheritance - -**Extends:** [SignalWire.SWML.Service](/docs/sdk-reference/reference/dotnet/signal-wire.swml/service) - -## Methods - -### GetSurveyName() - -#### Signature - -```dotnet -public string GetSurveyName() -``` - -#### Returns - -`string` - -#### Source - -[`src/SignalWire/Prefabs/SurveyAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/SurveyAgent.cs) - -Line 141. - -*** - -### GetSurveyQuestions() - -#### Signature - -```dotnet -public List> GetSurveyQuestions() -``` - -#### Returns - -`List>` - -#### Source - -[`src/SignalWire/Prefabs/SurveyAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/SurveyAgent.cs) - -Line 140. - -*** - -### LogResponse(Dictionary\, Dictionary\) - -SWAIG tool handler for the `log_response` tool. -(Python parity: `SurveyAgent.log_response`.) - -#### Signature - -```dotnet -public FunctionResult LogResponse(Dictionary args, Dictionary rawData) -``` - -#### Parameters - - - - - -#### Returns - -`SignalWire.SWAIG.FunctionResult` - -#### Source - -[`src/SignalWire/Prefabs/SurveyAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/SurveyAgent.cs) - -Line 133. - -*** - -### SurveyAgent(string, List\>, Dictionary\?) - -#### Signature - -```dotnet -public SurveyAgent(string name, List> questions, Dictionary? options = null) -``` - -#### Parameters - - - - - - - -#### Source - -[`src/SignalWire/Prefabs/SurveyAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/SurveyAgent.cs) - -Line 16. - -*** - -### ValidateResponse(Dictionary\, Dictionary\) - -SWAIG tool handler for the `validate_response` tool. -(Python parity: `SurveyAgent.validate_response`.) - -#### Signature - -```dotnet -public FunctionResult ValidateResponse(Dictionary args, Dictionary rawData) -``` - -#### Parameters - - - - - -#### Returns - -`SignalWire.SWAIG.FunctionResult` - -#### Source - -[`src/SignalWire/Prefabs/SurveyAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/SurveyAgent.cs) - -Line 81. - -## Source - -[`src/SignalWire/Prefabs/SurveyAgent.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Prefabs/SurveyAgent.cs) - -Line 9. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.relay/action/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.relay/action/index.mdx deleted file mode 100644 index 097a9b30dd..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.relay/action/index.mdx +++ /dev/null @@ -1,367 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.relay/action" -title: "Action" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.Relay.Action" - parent: "SignalWire.Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs" - visibility: "public" ---- -# `Action` - -Base class for all RELAY call actions (play, record, collect, etc.). - -An Action is the client-side handle returned when you start an -asynchronous operation on a call. It accumulates events, tracks -state, and resolves once the operation reaches a terminal state. - -Uses <xref href="System.Threading.Tasks.TaskCompletionSource" data-throw-if-not-resolved="false"></xref> for native async/await support. - -## Signature - -```dotnet -public class Action -``` - -## Properties - - - - - - - - - - - - - - - - - - - - - -## Methods - -### AcceptsTerminalEvent(string) - -Subclasses may filter which event types can resolve this action via -the standard terminal-state path. Default: any event type registered -in <xref href="SignalWire.Relay.Constants.ActionTerminalStates" data-throw-if-not-resolved="false"></xref> may resolve. - -Override returns false to block resolution for a specific event type -(e.g. CollectAction blocks `calling.call.play` so the play -phase of `play_and_collect` doesn't resolve the collect side). - -**Modifiers:** `virtual` - -#### Signature - -```dotnet -public virtual bool AcceptsTerminalEvent(string eventType) -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) - -Line 126. - -*** - -### Action(string, string, string, object) - -#### Signature - -```dotnet -public Action(string controlId, string callId, string nodeId, object client) -``` - -#### Parameters - - - - - - - - - -#### Source - -[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) - -Line 30. - -*** - -### ExecuteSubcommand(string, Dictionary\?) - -Send a sub-command RPC through the client. -The payload always includes control\_id, call\_id, and node\_id. - -#### Signature - -```dotnet -public void ExecuteSubcommand(string method, Dictionary? extraParams = null) -``` - -#### Parameters - - - - - -#### Source - -[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) - -Line 171. - -*** - -### GetCallId() - -#### Signature - -```dotnet -public string GetCallId() -``` - -#### Returns - -`string` - -#### Source - -[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) - -Line 66. - -*** - -### GetControlId() - -#### Signature - -```dotnet -public string GetControlId() -``` - -#### Returns - -`string` - -#### Source - -[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) - -Line 65. - -*** - -### GetNodeId() - -#### Signature - -```dotnet -public string GetNodeId() -``` - -#### Returns - -`string` - -#### Source - -[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) - -Line 67. - -*** - -### GetStopMethod() - -Return the RELAY RPC method that stops this action. -Subclasses MUST override to return the correct method name. - -**Modifiers:** `virtual` - -#### Signature - -```dotnet -public virtual string GetStopMethod() -``` - -#### Returns - -`string` - -#### Source - -[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) - -Line 165. - -*** - -### HandleEvent(Event) - -Append an incoming event and update local state / payload. - -**Modifiers:** `virtual` - -#### Signature - -```dotnet -public virtual void HandleEvent(Event evt) -``` - -#### Parameters - - - -#### Source - -[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) - -Line 102. - -*** - -### OnCompleted - -Register a callback to fire when the action completes. -If the action is already done the callback fires immediately. - -#### Signature - - - - ```dotnet - public Action OnCompleted(Func callback) - ``` - - - - ```dotnet - public Action OnCompleted(Action callback) - ``` - - - -#### Parameters (Overload 1) - - - -#### Parameters (Overload 2) - - - -#### Returns (Overload 1) - -`SignalWire.Relay.Action` - -#### Returns (Overload 2) - -`SignalWire.Relay.Action` - -#### Source - -[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) - -Line 77. - -*** - -### Resolve(object?) - -Mark this action as completed. The optional result is stored and the -onCompleted callback fires exactly once. - -#### Signature - -```dotnet -public void Resolve(object? result = null) -``` - -#### Parameters - - - -#### Source - -[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) - -Line 136. - -*** - -### Stop() - -Stop the running action by sending its stop sub-command. - -**Modifiers:** `virtual` - -#### Signature - -```dotnet -public virtual void Stop() -``` - -#### Source - -[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) - -Line 152. - -*** - -### WaitAsync(int) - -Await until the action completes or the timeout elapses. -Returns the resolved result, or null on timeout. - -#### Signature - -```dotnet -public Task WaitAsync(int timeoutSeconds = 30) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task` - -#### Source - -[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) - -Line 46. - -## Source - -[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) - -Line 13. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.relay/ai-action/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.relay/ai-action/index.mdx deleted file mode 100644 index 949fd413e6..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.relay/ai-action/index.mdx +++ /dev/null @@ -1,85 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.relay/ai-action" -title: "AIAction" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.Relay.AIAction" - parent: "SignalWire.Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs" - visibility: "public" ---- -# `AIAction` - -Handle for calling.ai operations. - -## Signature - -```dotnet -public class AIAction : Action -``` - -## Inheritance - -**Extends:** [SignalWire.Relay.Action](/docs/sdk-reference/reference/dotnet/signal-wire.relay/action) - -## Methods - -### AIAction(string, string, string, object) - -#### Signature - -```dotnet -public AIAction(string controlId, string callId, string nodeId, object client) -``` - -#### Parameters - - - - - - - - - -#### Source - -[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) - -Line 402. - -*** - -### GetStopMethod() - -Return the RELAY RPC method that stops this action. -Subclasses MUST override to return the correct method name. - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override string GetStopMethod() -``` - -#### Returns - -`string` - -#### Source - -[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) - -Line 405. - -## Source - -[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) - -Line 400. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.relay/call-state-extensions/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.relay/call-state-extensions/index.mdx deleted file mode 100644 index 2184d86264..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.relay/call-state-extensions/index.mdx +++ /dev/null @@ -1,121 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.relay/call-state-extensions" -title: "CallStateExtensions" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.Relay.CallStateExtensions" - parent: "SignalWire.Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/CallState.cs" - visibility: "public" ---- -# `CallStateExtensions` - -Wire-string mapping, parsing, and terminal-state predicate for <xref href="SignalWire.Relay.CallState" data-throw-if-not-resolved="false"></xref>. - -**Modifiers:** `static` - -## Signature - -```dotnet -public static class CallStateExtensions -``` - -## Methods - -### IsTerminal(CallState) - -True when this state is terminal (the call has fully ended). Mirrors <xref href="SignalWire.Relay.Constants.CallTerminalStates" data-throw-if-not-resolved="false"></xref> — terminal = `ended`. - -**Modifiers:** `static` - -#### Signature - -```dotnet -public static bool IsTerminal(this CallState state) -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/SignalWire/Relay/CallState.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/CallState.cs) - -Line 78. - -*** - -### ToWireName(CallState) - -The canonical wire string for this call state (e.g. "answered"). - -**Modifiers:** `static` - -#### Signature - -```dotnet -public static string ToWireName(this CallState state) -``` - -#### Parameters - - - -#### Returns - -`string` - -#### Source - -[`src/SignalWire/Relay/CallState.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/CallState.cs) - -Line 69. - -*** - -### TryParse(string?, out CallState) - -Parse a wire string into a <xref href="SignalWire.Relay.CallState" data-throw-if-not-resolved="false"></xref>. Returns -`false` (and `default`) for an unrecognised value — the -server may introduce new states, so callers fall back to the raw -string on <xref href="SignalWire.Relay.Call.State" data-throw-if-not-resolved="false"></xref> rather than crashing. - -**Modifiers:** `static` - -#### Signature - -```dotnet -public static bool TryParse(string? wire, out CallState state) -``` - -#### Parameters - - - - - -#### Returns - -`bool` - -#### Source - -[`src/SignalWire/Relay/CallState.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/CallState.cs) - -Line 87. - -## Source - -[`src/SignalWire/Relay/CallState.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/CallState.cs) - -Line 54. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.relay/call/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.relay/call/index.mdx deleted file mode 100644 index b855f63795..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.relay/call/index.mdx +++ /dev/null @@ -1,1462 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.relay/call" -title: "Call" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.Relay.Call" - parent: "SignalWire.Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs" - visibility: "public" ---- -# `Call` - -Represents a RELAY voice call. - -Holds call-level state, dispatches server events to registered listeners -and to in-flight Action objects, and exposes every calling.\* RPC method -as a first-class C# method. - -## Signature - -```dotnet -public class Call -``` - -## Properties - - - controlId => Action - - - - - - The current call lifecycle state as the typed <xref href="SignalWire.Relay.CallState" data-throw-if-not-resolved="false"></xref> enum, parsed from <xref href="SignalWire.Relay.Call.State" data-throw-if-not-resolved="false"></xref>. Returns `null` when <xref href="SignalWire.Relay.Call.State" data-throw-if-not-resolved="false"></xref> is an unrecognised (e.g. newly-introduced server) value — read <xref href="SignalWire.Relay.Call.State" data-throw-if-not-resolved="false"></xref> for the raw string in that case. This is a typed convenience alongside the parity-bearing string <xref href="SignalWire.Relay.Call.State" data-throw-if-not-resolved="false"></xref>; it always agrees with it for known states. - - - - - - - - - - - - - - - - - - User-registered event callbacks (catch-all). - - - - - - - - - - Per-event-type listeners registered via <xref href="SignalWire.Relay.Call.On(System.String%2cSystem.Action%7bSignalWire.Relay.Event%7d)" data-throw-if-not-resolved="false"></xref>. - - -## Methods - -### AI(Dictionary\?) - -#### Signature - -```dotnet -public AIAction AI(Dictionary? extra = null) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Relay.AIAction` - -#### Source - -[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) - -Line 329. - -*** - -### AiHoldAsync() - -#### Signature - -```dotnet -public Task> AiHoldAsync() -``` - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) - -Line 271. - -*** - -### AiMessageAsync(Dictionary\?) - -#### Signature - -```dotnet -public Task> AiMessageAsync(Dictionary? extra = null) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) - -Line 268. - -*** - -### AiUnholdAsync() - -#### Signature - -```dotnet -public Task> AiUnholdAsync() -``` - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) - -Line 274. - -*** - -### AmazonBedrockAsync(Dictionary\?) - -#### Signature - -```dotnet -public Task> AmazonBedrockAsync(Dictionary? extra = null) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) - -Line 265. - -*** - -### AnswerAsync() - -#### Signature - -```dotnet -public Task> AnswerAsync() -``` - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) - -Line 208. - -*** - -### BindDigitAsync(Dictionary\?) - -#### Signature - -```dotnet -public Task> BindDigitAsync(Dictionary? extra = null) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) - -Line 247. - -*** - -### Call(Dictionary\, Client) - -#### Signature - -```dotnet -public Call(Dictionary params_, Client client) -``` - -#### Parameters - - - - - -#### Source - -[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) - -Line 57. - -*** - -### ClearDigitBindingsAsync() - -#### Signature - -```dotnet -public Task> ClearDigitBindingsAsync() -``` - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) - -Line 250. - -*** - -### Collect(Dictionary\?) - -#### Signature - -```dotnet -public CollectAction Collect(Dictionary? extra = null) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Relay.CollectAction` - -#### Source - -[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) - -Line 302. - -*** - -### ConnectAsync(Dictionary\?) - -#### Signature - -```dotnet -public Task> ConnectAsync(Dictionary? extra = null) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) - -Line 217. - -*** - -### DenoiseAsync() - -#### Signature - -```dotnet -public Task> DenoiseAsync() -``` - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) - -Line 229. - -*** - -### DenoiseStopAsync() - -#### Signature - -```dotnet -public Task> DenoiseStopAsync() -``` - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) - -Line 232. - -*** - -### Detect(Dictionary\?) - -#### Signature - -```dotnet -public DetectAction Detect(Dictionary? extra = null) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Relay.DetectAction` - -#### Source - -[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) - -Line 308. - -*** - -### DetectAnsweringMachine(double?, double?, double?, int?, bool?, bool?, double?, Action\?) - -Detect human vs answering machine (AMD). Typed convenience over <xref href="SignalWire.Relay.Call.Detect(System.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d)" data-throw-if-not-resolved="false"></xref>. - -#### Signature - -```dotnet -public DetectAction DetectAnsweringMachine(double? initialTimeout = null, double? endSilenceTimeout = null, double? machineVoiceThreshold = null, int? machineWordsThreshold = null, bool? detectInterruptions = null, bool? detectMessageEnd = null, double? timeout = null, Action? onCompleted = null) -``` - -#### Parameters - - - - - - - - - - - - - - - - - -#### Returns - -`SignalWire.Relay.DetectAction` - -#### Source - -[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) - -Line 454. - -*** - -### DetectDigit(string?, double?, Action\?) - -Detect DTMF digits. Typed convenience over <xref href="SignalWire.Relay.Call.Detect(System.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d)" data-throw-if-not-resolved="false"></xref>. - -#### Signature - -```dotnet -public DetectAction DetectDigit(string? digits = null, double? timeout = null, Action? onCompleted = null) -``` - -#### Parameters - - - - - - - -#### Returns - -`SignalWire.Relay.DetectAction` - -#### Source - -[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) - -Line 434. - -*** - -### DetectFax(string?, double?, Action\?) - -Detect a fax tone (CED/CNG). Typed convenience over <xref href="SignalWire.Relay.Call.Detect(System.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d)" data-throw-if-not-resolved="false"></xref>. - -#### Signature - -```dotnet -public DetectAction DetectFax(string? tone = null, double? timeout = null, Action? onCompleted = null) -``` - -#### Parameters - - - - - - - -#### Returns - -`SignalWire.Relay.DetectAction` - -#### Source - -[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) - -Line 484. - -*** - -### DisconnectAsync() - -#### Signature - -```dotnet -public Task> DisconnectAsync() -``` - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) - -Line 220. - -*** - -### DispatchEvent(Event) - -Central event router invoked by the Client whenever a server event -targets this call. - -#### Signature - -```dotnet -public void DispatchEvent(Event evt) -``` - -#### Parameters - - - -#### Source - -[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) - -Line 84. - -*** - -### EchoAsync() - -#### Signature - -```dotnet -public Task> EchoAsync() -``` - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) - -Line 244. - -*** - -### HangupAsync(string) - -#### Signature - -```dotnet -public Task> HangupAsync(string reason = "hangup") -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) - -Line 211. - -*** - -### HoldAsync() - -#### Signature - -```dotnet -public Task> HoldAsync() -``` - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) - -Line 223. - -*** - -### JoinConferenceAsync(Dictionary\?) - -#### Signature - -```dotnet -public Task> JoinConferenceAsync(Dictionary? extra = null) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) - -Line 238. - -*** - -### JoinRoomAsync(Dictionary\?) - -#### Signature - -```dotnet -public Task> JoinRoomAsync(Dictionary? extra = null) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) - -Line 259. - -*** - -### LeaveConferenceAsync() - -#### Signature - -```dotnet -public Task> LeaveConferenceAsync() -``` - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) - -Line 241. - -*** - -### LeaveRoomAsync() - -#### Signature - -```dotnet -public Task> LeaveRoomAsync() -``` - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) - -Line 262. - -*** - -### LiveTranscribeAsync(Dictionary\?) - -#### Signature - -```dotnet -public Task> LiveTranscribeAsync(Dictionary? extra = null) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) - -Line 253. - -*** - -### LiveTranslateAsync(Dictionary\?) - -#### Signature - -```dotnet -public Task> LiveTranslateAsync(Dictionary? extra = null) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) - -Line 256. - -*** - -### On - -Register a generic event listener on this call. - -#### Signature - - - - ```dotnet - public Call On(Action callback) - ``` - - - - ```dotnet - public Call On(string eventType, Action callback) - ``` - - - -#### Parameters (Overload 1) - - - -#### Parameters (Overload 2) - - - - - -#### Returns (Overload 1) - -`SignalWire.Relay.Call` - -#### Returns (Overload 2) - -`SignalWire.Relay.Call` - -#### Source - -[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) - -Line 173. - -*** - -### PassAsync() - -#### Signature - -```dotnet -public Task> PassAsync() -``` - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) - -Line 214. - -*** - -### Pay(Dictionary\?) - -#### Signature - -```dotnet -public PayAction Pay(Dictionary? extra = null) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Relay.PayAction` - -#### Source - -[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) - -Line 323. - -*** - -### Play(Dictionary\?) - -#### Signature - -```dotnet -public PlayAction Play(Dictionary? extra = null) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Relay.PlayAction` - -#### Source - -[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) - -Line 296. - -*** - -### PlayAndCollect(Dictionary\?) - -#### Signature - -```dotnet -public CollectAction PlayAndCollect(Dictionary? extra = null) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Relay.CollectAction` - -#### Source - -[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) - -Line 305. - -*** - -### PlayAudio(string, double?, Action\?) - -Play an audio file from a URL. Typed convenience over <xref href="SignalWire.Relay.Call.Play(System.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d)" data-throw-if-not-resolved="false"></xref>. - -#### Signature - -```dotnet -public PlayAction PlayAudio(string url, double? volume = null, Action? onCompleted = null) -``` - -#### Parameters - - - - - - - -#### Returns - -`SignalWire.Relay.PlayAction` - -#### Source - -[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) - -Line 366. - -*** - -### PlayRingtone(string, double?, double?, Action\?) - -Play a named ringtone by country code. Typed convenience over <xref href="SignalWire.Relay.Call.Play(System.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d)" data-throw-if-not-resolved="false"></xref>. - -#### Signature - -```dotnet -public PlayAction PlayRingtone(string name, double? duration = null, double? volume = null, Action? onCompleted = null) -``` - -#### Parameters - - - - - - - - - -#### Returns - -`SignalWire.Relay.PlayAction` - -#### Source - -[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) - -Line 406. - -*** - -### PlaySilence(double, Action\?) - -Play silence for <code class="paramref">duration</code> seconds. Typed convenience over <xref href="SignalWire.Relay.Call.Play(System.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d)" data-throw-if-not-resolved="false"></xref>. - -#### Signature - -```dotnet -public PlayAction PlaySilence(double duration, Action? onCompleted = null) -``` - -#### Parameters - - - - - -#### Returns - -`SignalWire.Relay.PlayAction` - -#### Source - -[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) - -Line 387. - -*** - -### PlayTts(string, string?, string?, string?, double?, Action\?) - -Play text-to-speech. Typed convenience over <xref href="SignalWire.Relay.Call.Play(System.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d)" data-throw-if-not-resolved="false"></xref>. - -#### Signature - -```dotnet -public PlayAction PlayTts(string text, string? language = null, string? gender = null, string? voice = null, double? volume = null, Action? onCompleted = null) -``` - -#### Parameters - - - - - - - - - - - - - -#### Returns - -`SignalWire.Relay.PlayAction` - -#### Source - -[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) - -Line 342. - -*** - -### PromptAudio(string, Dictionary\, double?, Action\?) - -Play an audio file then collect input. Typed media over <xref href="SignalWire.Relay.Call.PlayAndCollect(System.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d)" data-throw-if-not-resolved="false"></xref>. - -#### Signature - -```dotnet -public CollectAction PromptAudio(string url, Dictionary collect, double? volume = null, Action? onCompleted = null) -``` - -#### Parameters - - - - - - - - - -#### Returns - -`SignalWire.Relay.CollectAction` - -#### Source - -[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) - -Line 537. - -*** - -### PromptTts(string, Dictionary\, string?, string?, string?, double?, Action\?) - -Play TTS then collect input. Typed media over <xref href="SignalWire.Relay.Call.PlayAndCollect(System.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d)" data-throw-if-not-resolved="false"></xref>. - -#### Signature - -```dotnet -public CollectAction PromptTts(string text, Dictionary collect, string? language = null, string? gender = null, string? voice = null, double? volume = null, Action? onCompleted = null) -``` - -#### Parameters - - - - - - - - - - - - - - - -#### Returns - -`SignalWire.Relay.CollectAction` - -#### Source - -[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) - -Line 511. - -*** - -### QueueEnterAsync(Dictionary\?) - -#### Signature - -```dotnet -public Task> QueueEnterAsync(Dictionary? extra = null) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) - -Line 280. - -*** - -### QueueLeaveAsync() - -#### Signature - -```dotnet -public Task> QueueLeaveAsync() -``` - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) - -Line 283. - -*** - -### ReceiveFax(Dictionary\?) - -#### Signature - -```dotnet -public FaxAction ReceiveFax(Dictionary? extra = null) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Relay.FaxAction` - -#### Source - -[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) - -Line 314. - -*** - -### Record(Dictionary\?) - -#### Signature - -```dotnet -public RecordAction Record(Dictionary? extra = null) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Relay.RecordAction` - -#### Source - -[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) - -Line 299. - -*** - -### ReferAsync(Dictionary\?) - -#### Signature - -```dotnet -public Task> ReferAsync(Dictionary? extra = null) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) - -Line 286. - -*** - -### ResolveAllActions() - -Mark every outstanding action as completed. -Called when the call enters a terminal state (ended). - -#### Signature - -```dotnet -public void ResolveAllActions() -``` - -#### Source - -[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) - -Line 195. - -*** - -### SendDigitsAsync(Dictionary\?) - -#### Signature - -```dotnet -public Task> SendDigitsAsync(Dictionary? extra = null) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) - -Line 289. - -*** - -### SendFax(Dictionary\?) - -#### Signature - -```dotnet -public FaxAction SendFax(Dictionary? extra = null) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Relay.FaxAction` - -#### Source - -[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) - -Line 311. - -*** - -### Stream(Dictionary\?) - -#### Signature - -```dotnet -public StreamAction Stream(Dictionary? extra = null) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Relay.StreamAction` - -#### Source - -[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) - -Line 320. - -*** - -### Tap(Dictionary\?) - -#### Signature - -```dotnet -public TapAction Tap(Dictionary? extra = null) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Relay.TapAction` - -#### Source - -[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) - -Line 317. - -*** - -### Transcribe(Dictionary\?) - -#### Signature - -```dotnet -public TranscribeAction Transcribe(Dictionary? extra = null) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Relay.TranscribeAction` - -#### Source - -[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) - -Line 326. - -*** - -### TransferAsync(Dictionary\?) - -#### Signature - -```dotnet -public Task> TransferAsync(Dictionary? extra = null) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) - -Line 235. - -*** - -### UnholdAsync() - -#### Signature - -```dotnet -public Task> UnholdAsync() -``` - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) - -Line 226. - -*** - -### UserEventAsync(Dictionary\?) - -#### Signature - -```dotnet -public Task> UserEventAsync(Dictionary? extra = null) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) - -Line 277. - -*** - -### WaitForAnsweredAsync(double?) - -Wait until the call is answered (immediate if already answered or past it). - -#### Signature - -```dotnet -public Task WaitForAnsweredAsync(double? timeout = null) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task` - -#### Source - -[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) - -Line 645. - -*** - -### WaitForEndingAsync(double?) - -Wait until the call is ending (immediate if already ending or past it). - -#### Signature - -```dotnet -public Task WaitForEndingAsync(double? timeout = null) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task` - -#### Source - -[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) - -Line 653. - -*** - -### WaitForRingingAsync(double?) - -Wait until the call is ringing (immediate if already ringing or past it). - -#### Signature - -```dotnet -public Task WaitForRingingAsync(double? timeout = null) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task` - -#### Source - -[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) - -Line 649. - -## Source - -[`src/SignalWire/Relay/Call.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Call.cs) - -Line 11. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.relay/client/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.relay/client/index.mdx deleted file mode 100644 index 5b4434daea..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.relay/client/index.mdx +++ /dev/null @@ -1,651 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.relay/client" -title: "Client" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.Relay.Client" - parent: "SignalWire.Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs" - visibility: "public" ---- -# `Client` - -RELAY Client -- manages the WebSocket connection to SignalWire, sends -JSON-RPC 2.0 requests, and dispatches inbound events to the correct -Call or Message objects. - -Uses async/await with <xref href="System.Threading.Tasks.TaskCompletionSource" data-throw-if-not-resolved="false"></xref> for the -native C# async pattern instead of polling loops. - -## Signature - -```dotnet -public class Client : IAsyncDisposable -``` - -## Inheritance - -**Implements:** `System.IAsyncDisposable` - -## Properties - - - - - - - callId => Call. - - - - - - - - - - Messages received from the transport layer. Test code can enqueue here. - - - - messageId => Message. - - - - - - - - Inbound message handler. Mirrors Python's `@client.on_message`: fires with a fully-formed <xref href="SignalWire.Relay.Message" data-throw-if-not-resolved="false"></xref> for every `messaging.receive` event. - - - - JSON-RPC id => pending request TCS. - - - - tag => pending dial TCS. - - - - - - - - - - - - -## Methods - -### AuthenticateAsync(CancellationToken) - -Send the signalwire.connect RPC to authenticate. - -#### Signature - -```dotnet -public Task AuthenticateAsync(CancellationToken cancellationToken = default) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task` - -#### Source - -[`src/SignalWire/Relay/Client.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs) - -Line 173. - -*** - -### BuildWebSocketUri() - -Build the full WebSocket URL: <xref href="SignalWire.Relay.Client.Scheme" data-throw-if-not-resolved="false"></xref>://<xref href="SignalWire.Relay.Client.Host" data-throw-if-not-resolved="false"></xref>/api/relay/ws. - -#### Signature - -```dotnet -public Uri BuildWebSocketUri() -``` - -#### Returns - -`System.Uri` - -#### Source - -[`src/SignalWire/Relay/Client.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs) - -Line 121. - -*** - -### Client(Dictionary\?) - -#### Signature - -```dotnet -public Client(Dictionary? options = null) -``` - -#### Parameters - - - -#### Source - -[`src/SignalWire/Relay/Client.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs) - -Line 90. - -*** - -### ConnectAsync(CancellationToken) - -Establish the WebSocket connection and authenticate. Opens a real -WSS connection to the configured host, runs the JSON-RPC -`signalwire.connect` handshake, and starts the reader loop -that pumps inbound frames into <xref href="SignalWire.Relay.Client.HandleMessage(System.String)" data-throw-if-not-resolved="false"></xref>. - -**Modifiers:** `virtual` - -#### Signature - -```dotnet -public virtual Task ConnectAsync(CancellationToken cancellationToken = default) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task` - -#### Source - -[`src/SignalWire/Relay/Client.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs) - -Line 137. - -*** - -### DialAsync(Dictionary\, CancellationToken) - -Originate an outbound call, awaiting until the dial resolves. -Honours `params_["tag"]` when provided; otherwise a UUID is -generated. Honours `params_["dial_timeout"]` (seconds) for the -resolve-or-throw deadline. - -#### Signature - -```dotnet -public Task DialAsync(Dictionary params_, CancellationToken cancellationToken = default) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task` - -#### Source - -[`src/SignalWire/Relay/Client.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs) - -Line 769. - -*** - -### Disconnect() - -Gracefully close the connection. - -#### Signature - -```dotnet -public void Disconnect() -``` - -#### Source - -[`src/SignalWire/Relay/Client.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs) - -Line 229. - -*** - -### DisposeAsync() - -Asynchronously release the connection and all owned IDisposables — -the WebSocket (`_ws`), the lifetime token source (`_cts`), -and the send lock (`_sendLock`). This is the .NET analogue of -Python's `__aexit__`: `await using var client = ...;` closes -the socket and frees the handles deterministically instead of leaking -them until finalization. Idempotent. - -<p>Closes gracefully when the socket is still open (best-effort -close handshake), cancels the reader loop, waits briefly for it to -unwind, then disposes every owned resource.</p> - -#### Signature - -```dotnet -public ValueTask DisposeAsync() -``` - -#### Returns - -`System.Threading.Tasks.ValueTask` - -#### Source - -[`src/SignalWire/Relay/Client.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs) - -Line 276. - -*** - -### ExecuteAsync(string, Dictionary\?, CancellationToken) - -Send a JSON-RPC request and await the matching response. -Returns the "result" portion of the response. - -#### Signature - -```dotnet -public Task> ExecuteAsync(string method, Dictionary? params_ = null, CancellationToken cancellationToken = default) -``` - -#### Parameters - - - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/Relay/Client.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs) - -Line 475. - -*** - -### GetCall(string) - -#### Signature - -```dotnet -public Call? GetCall(string callId) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Relay.Call` - -#### Source - -[`src/SignalWire/Relay/Client.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs) - -Line 910. - -*** - -### HandleEvent(Dictionary\) - -Route a signalwire.event payload to the appropriate handler. - -#### Signature - -```dotnet -public void HandleEvent(Dictionary outerParams) -``` - -#### Parameters - - - -#### Source - -[`src/SignalWire/Relay/Client.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs) - -Line 644. - -*** - -### HandleMessage(string) - -Parse a raw JSON string from the server and route it. - -#### Signature - -```dotnet -public void HandleMessage(string raw) -``` - -#### Parameters - - - -#### Source - -[`src/SignalWire/Relay/Client.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs) - -Line 582. - -*** - -### OnCall(Func\) - -Register a handler for inbound calls. - -#### Signature - -```dotnet -public Client OnCall(Func callback) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Relay.Client` - -#### Source - -[`src/SignalWire/Relay/Client.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs) - -Line 895. - -*** - -### OnMessage(Func\) - -Register a handler for inbound messages. - -#### Signature - -```dotnet -public Client OnMessage(Func callback) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Relay.Client` - -#### Source - -[`src/SignalWire/Relay/Client.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs) - -Line 902. - -*** - -### ReadLoopAsync(CancellationToken) - -Reader loop that pulls UTF-8 text frames off the socket and routes -each completed message into <xref href="SignalWire.Relay.Client.HandleMessage(System.String)" data-throw-if-not-resolved="false"></xref>. Handles -fragmented frames by accumulating them until <xref href="System.Net.WebSockets.ValueWebSocketReceiveResult.EndOfMessage" data-throw-if-not-resolved="false"></xref>. - -#### Signature - -```dotnet -public Task ReadLoopAsync(CancellationToken cancellation) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task` - -#### Source - -[`src/SignalWire/Relay/Client.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs) - -Line 401. - -*** - -### ReadOnce() - -Read one queued message synchronously (test helper for harness use). - -#### Signature - -```dotnet -public void ReadOnce() -``` - -#### Source - -[`src/SignalWire/Relay/Client.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs) - -Line 459. - -*** - -### ReceiveAsync(IEnumerable\, CancellationToken) - -Subscribe to one or more inbound contexts. - -#### Signature - -```dotnet -public Task ReceiveAsync(IEnumerable contexts, CancellationToken cancellationToken = default) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task` - -#### Source - -[`src/SignalWire/Relay/Client.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs) - -Line 859. - -*** - -### ReconnectAsync(CancellationToken) - -Reconnect with exponential back-off (1s to 30s cap). - -#### Signature - -```dotnet -public Task ReconnectAsync(CancellationToken cancellationToken = default) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task` - -#### Source - -[`src/SignalWire/Relay/Client.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs) - -Line 333. - -*** - -### RunAsync(CancellationToken) - -Main event loop -- drains the inbound queue and processes messages -until disconnect. Used by the test path that pushes JSON strings -into <xref href="SignalWire.Relay.Client.InboundQueue" data-throw-if-not-resolved="false"></xref>; production reads come from the -WebSocket reader started in <xref href="SignalWire.Relay.Client.ConnectAsync(System.Threading.CancellationToken)" data-throw-if-not-resolved="false"></xref>. - -#### Signature - -```dotnet -public Task RunAsync(CancellationToken cancellationToken = default) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task` - -#### Source - -[`src/SignalWire/Relay/Client.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs) - -Line 358. - -*** - -### Send(Dictionary\) - -Encode and send a JSON message. Real production path writes to the -WebSocket; tests override this to capture payloads in memory. - -**Modifiers:** `virtual` - -#### Signature - -```dotnet -public virtual void Send(Dictionary msg) -``` - -#### Parameters - - - -#### Source - -[`src/SignalWire/Relay/Client.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs) - -Line 528. - -*** - -### SendAck(string) - -Send an acknowledgement (empty result) for a server-initiated request. - -#### Signature - -```dotnet -public void SendAck(string id) -``` - -#### Parameters - - - -#### Source - -[`src/SignalWire/Relay/Client.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs) - -Line 567. - -*** - -### SendMessageAsync(Dictionary\, CancellationToken) - -Send an outbound message. - -#### Signature - -```dotnet -public Task SendMessageAsync(Dictionary params_, CancellationToken cancellationToken = default) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task` - -#### Source - -[`src/SignalWire/Relay/Client.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs) - -Line 828. - -*** - -### UnreceiveAsync(IEnumerable\, CancellationToken) - -Unsubscribe from one or more contexts. - -#### Signature - -```dotnet -public Task UnreceiveAsync(IEnumerable contexts, CancellationToken cancellationToken = default) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task` - -#### Source - -[`src/SignalWire/Relay/Client.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs) - -Line 880. - -## Source - -[`src/SignalWire/Relay/Client.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Client.cs) - -Line 16. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.relay/collect-action/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.relay/collect-action/index.mdx deleted file mode 100644 index 46480d1d28..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.relay/collect-action/index.mdx +++ /dev/null @@ -1,193 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.relay/collect-action" -title: "CollectAction" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.Relay.CollectAction" - parent: "SignalWire.Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs" - visibility: "public" ---- -# `CollectAction` - -Handle for calling.collect (and play\_and\_collect) operations. - -Note: play\_and\_collect emits intermediate calling.call.play events -that must be silently ignored so they do not pollute the collect -action's state. - -## Signature - -```dotnet -public class CollectAction : Action -``` - -## Inheritance - -**Extends:** [SignalWire.Relay.Action](/docs/sdk-reference/reference/dotnet/signal-wire.relay/action) - -## Properties - - - Return the structured collect result from the payload. - - -## Methods - -### AcceptsTerminalEvent(string) - -Block `calling.call.play` events from triggering the standard -terminal-state resolution path: only `calling.call.collect` -may resolve a CollectAction. - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override bool AcceptsTerminalEvent(string eventType) -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) - -Line 315. - -*** - -### CollectAction(string, string, string, object, bool) - -#### Signature - -```dotnet -public CollectAction(string controlId, string callId, string nodeId, object client, bool isPlayAndCollect = false) -``` - -#### Parameters - - - - - - - - - - - -#### Source - -[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) - -Line 272. - -*** - -### GetStopMethod() - -Return the RELAY RPC method that stops this action. -Subclasses MUST override to return the correct method name. - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override string GetStopMethod() -``` - -#### Returns - -`string` - -#### Source - -[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) - -Line 279. - -*** - -### HandleEvent(Event) - -Override: silently ignore intermediate play events that arrive -during a play\_and\_collect operation. - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override void HandleEvent(Event evt) -``` - -#### Parameters - - - -#### Source - -[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) - -Line 304. - -*** - -### StartInputTimers() - -Notify the server to start input timers now rather than waiting -for the initial-timeout to expire naturally. - -#### Signature - -```dotnet -public void StartInputTimers() -``` - -#### Source - -[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) - -Line 286. - -*** - -### Volume(double) - -play\_and\_collect-only: change playback volume mid-prompt. - -#### Signature - -```dotnet -public void Volume(double db) -``` - -#### Parameters - - - -#### Source - -[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) - -Line 292. - -## Source - -[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) - -Line 268. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.relay/constants/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.relay/constants/index.mdx deleted file mode 100644 index 4aa5f3d935..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.relay/constants/index.mdx +++ /dev/null @@ -1,74 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.relay/constants" -title: "Constants" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.Relay.Constants" - parent: "SignalWire.Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Constants.cs" - visibility: "public" ---- -# `Constants` - -Protocol constants for the RELAY WebSocket interface. -Defines protocol version, call/dial/message states, terminal states, -and per-event-type action terminal states. - -**Modifiers:** `static` - -## Signature - -```dotnet -public static class Constants -``` - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -## Source - -[`src/SignalWire/Relay/Constants.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Constants.cs) - -Line 9. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.relay/detect-action/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.relay/detect-action/index.mdx deleted file mode 100644 index 2f58b72133..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.relay/detect-action/index.mdx +++ /dev/null @@ -1,116 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.relay/detect-action" -title: "DetectAction" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.Relay.DetectAction" - parent: "SignalWire.Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs" - visibility: "public" ---- -# `DetectAction` - -Handle for calling.detect operations. - -## Signature - -```dotnet -public class DetectAction : Action -``` - -## Inheritance - -**Extends:** [SignalWire.Relay.Action](/docs/sdk-reference/reference/dotnet/signal-wire.relay/action) - -## Properties - - - -## Methods - -### DetectAction(string, string, string, object) - -#### Signature - -```dotnet -public DetectAction(string controlId, string callId, string nodeId, object client) -``` - -#### Parameters - - - - - - - - - -#### Source - -[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) - -Line 322. - -*** - -### GetStopMethod() - -Return the RELAY RPC method that stops this action. -Subclasses MUST override to return the correct method name. - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override string GetStopMethod() -``` - -#### Returns - -`string` - -#### Source - -[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) - -Line 325. - -*** - -### HandleEvent(Event) - -Per RELAY\_IMPLEMENTATION\_GUIDE.md "detect gotcha": detect events -continuously stream a `detect` object — resolve on the FIRST -meaningful detect payload (or on terminal state if it arrives first -with no detect data). - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override void HandleEvent(Event evt) -``` - -#### Parameters - - - -#### Source - -[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) - -Line 337. - -## Source - -[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) - -Line 320. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.relay/device/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.relay/device/index.mdx deleted file mode 100644 index c78937cd42..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.relay/device/index.mdx +++ /dev/null @@ -1,152 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.relay/device" -title: "Device" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.Relay.Device" - parent: "SignalWire.Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Device.cs" - visibility: "public" ---- -# `Device` - -A typed RELAY device object — the `{type, params}` shape that recurs -across `connect` / `refer` / `dial` / `tap` and the -ringback list. - -**Remarks:** <p> -Grounded in the RELAY wire schema -`relay-protocol/calling.connect.params.json`, where each device is an -object with a required `type` (string) and a free-form `params` -payload. This class types the <em>shape</em> only: <xref href="SignalWire.Relay.Device.Type" data-throw-if-not-resolved="false"></xref> stays -a `string` because the discriminant set (`phone`, `sip`, -`webrtc`, …) is <strong>not</strong> enumerated in any schema, so an -enum would risk rejecting a valid value. - -</p> -<p> -The reference and the rest of this port pass devices as raw -`Dictionary<string, object?>` (e.g. <xref href="SignalWire.Relay.Call.Device" data-throw-if-not-resolved="false"></xref>); -this is an additive typed convenience. <xref href="SignalWire.Relay.Device.ToDict" data-throw-if-not-resolved="false"></xref> yields the -identical wire dictionary, so a <xref href="SignalWire.Relay.Device" data-throw-if-not-resolved="false"></xref> can be used anywhere a -hand-built device dict is accepted with no change in emitted bytes. -</p> -<example> -<pre><code class="lang-csharp">var d = new Device("phone", new Dictionary<string, object?> -{ - ["to_number"] = "+15551112222", - ["from_number"] = "+15553334444", -}); -// d.ToDict() is byte-identical to the hand-written -// { ["type"] = "phone", ["params"] = { ... } }</code></pre> -</example> - -**Modifiers:** `sealed` - -## Signature - -```dotnet -public sealed class Device -``` - -## Properties - - - The device-type-specific parameters (e.g. `to_number` / `from_number` for a phone device). Free-form by the wire schema. - - - - The device discriminant (e.g. `"phone"`, `"sip"`). Kept a string: the valid set is not schema-enumerated. - - -## Methods - -### Device(string, Dictionary\?) - -Build a device from its discriminant and (optional) params payload. - -#### Signature - -```dotnet -public Device(string type, Dictionary? params_ = null) -``` - -#### Parameters - - - The device type discriminant (required). - - - - The device params; an empty map when omitted. - - -#### Source - -[`src/SignalWire/Relay/Device.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Device.cs) - -Line 55. - -*** - -### FromDict(Dictionary\?) - -Build a <xref href="SignalWire.Relay.Device" data-throw-if-not-resolved="false"></xref> from a raw `{type, params}` dictionary -(e.g. <xref href="SignalWire.Relay.Call.Device" data-throw-if-not-resolved="false"></xref> or a wire frame). Returns `null` -when the dict has no `type` string — the discriminant is required. - -**Modifiers:** `static` - -#### Signature - -```dotnet -public static Device? FromDict(Dictionary? dict) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Relay.Device` - -#### Source - -[`src/SignalWire/Relay/Device.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Device.cs) - -Line 76. - -*** - -### ToDict() - -Project to the raw `{type, params}` wire dictionary — byte-identical -to the hand-written device dict the RELAY methods already accept. - -#### Signature - -```dotnet -public Dictionary ToDict() -``` - -#### Returns - -`Dictionary` - -#### Source - -[`src/SignalWire/Relay/Device.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Device.cs) - -Line 65. - -## Source - -[`src/SignalWire/Relay/Device.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Device.cs) - -Line 36. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.relay/dial-state-extensions/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.relay/dial-state-extensions/index.mdx deleted file mode 100644 index 56e12767cc..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.relay/dial-state-extensions/index.mdx +++ /dev/null @@ -1,121 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.relay/dial-state-extensions" -title: "DialStateExtensions" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.Relay.DialStateExtensions" - parent: "SignalWire.Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/DialState.cs" - visibility: "public" ---- -# `DialStateExtensions` - -Wire-string mapping, parsing, and terminal-outcome predicate for <xref href="SignalWire.Relay.DialState" data-throw-if-not-resolved="false"></xref>. - -**Modifiers:** `static` - -## Signature - -```dotnet -public static class DialStateExtensions -``` - -## Methods - -### IsTerminal(DialState) - -True when this dial outcome is terminal (the dial has resolved): <xref href="SignalWire.Relay.DialState.Answered" data-throw-if-not-resolved="false"></xref> or <xref href="SignalWire.Relay.DialState.Failed" data-throw-if-not-resolved="false"></xref>. <xref href="SignalWire.Relay.DialState.Dialing" data-throw-if-not-resolved="false"></xref> is still in progress. - -**Modifiers:** `static` - -#### Signature - -```dotnet -public static bool IsTerminal(this DialState state) -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/SignalWire/Relay/DialState.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/DialState.cs) - -Line 65. - -*** - -### ToWireName(DialState) - -The canonical wire string for this dial state (e.g. "answered"). - -**Modifiers:** `static` - -#### Signature - -```dotnet -public static string ToWireName(this DialState state) -``` - -#### Parameters - - - -#### Returns - -`string` - -#### Source - -[`src/SignalWire/Relay/DialState.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/DialState.cs) - -Line 55. - -*** - -### TryParse(string?, out DialState) - -Parse a wire string into a <xref href="SignalWire.Relay.DialState" data-throw-if-not-resolved="false"></xref>. Returns -`false` (and `default`) for an unrecognised value so callers -can fall back to the raw string rather than crashing on a new -server-emitted state. - -**Modifiers:** `static` - -#### Signature - -```dotnet -public static bool TryParse(string? wire, out DialState state) -``` - -#### Parameters - - - - - -#### Returns - -`bool` - -#### Source - -[`src/SignalWire/Relay/DialState.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/DialState.cs) - -Line 74. - -## Source - -[`src/SignalWire/Relay/DialState.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/DialState.cs) - -Line 42. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.relay/event/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.relay/event/index.mdx deleted file mode 100644 index a29edb8d31..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.relay/event/index.mdx +++ /dev/null @@ -1,126 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.relay/event" -title: "Event" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.Relay.Event" - parent: "SignalWire.Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Event.cs" - visibility: "public" ---- -# `Event` - -Represents a single RELAY event received from the server. -Carries the event type, a timestamp, and the params dictionary -from which call\_id, node\_id, control\_id, tag, and state are extracted. - -**Modifiers:** `sealed` - -## Signature - -```dotnet -public sealed class Event -``` - -## Properties - - - - - - - - - - - - - - - - - -## Methods - -### Event(string, Dictionary\, double) - -#### Signature - -```dotnet -public Event(string eventType, Dictionary params_, double timestamp = 0) -``` - -#### Parameters - - - - - - - -#### Source - -[`src/SignalWire/Relay/Event.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Event.cs) - -Line 13. - -*** - -### Parse(string, Dictionary\) - -Factory: parse an event from its type and params. - -**Modifiers:** `static` - -#### Signature - -```dotnet -public static Event Parse(string eventType, Dictionary params_) -``` - -#### Parameters - - - - - -#### Returns - -`SignalWire.Relay.Event` - -#### Source - -[`src/SignalWire/Relay/Event.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Event.cs) - -Line 42. - -*** - -### ToDict() - -#### Signature - -```dotnet -public Dictionary ToDict() -``` - -#### Returns - -`Dictionary` - -#### Source - -[`src/SignalWire/Relay/Event.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Event.cs) - -Line 34. - -## Source - -[`src/SignalWire/Relay/Event.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Event.cs) - -Line 7. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.relay/fax-action/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.relay/fax-action/index.mdx deleted file mode 100644 index 12d9678622..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.relay/fax-action/index.mdx +++ /dev/null @@ -1,91 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.relay/fax-action" -title: "FaxAction" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.Relay.FaxAction" - parent: "SignalWire.Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs" - visibility: "public" ---- -# `FaxAction` - -Handle for calling.fax operations (send or receive). - -## Signature - -```dotnet -public class FaxAction : Action -``` - -## Inheritance - -**Extends:** [SignalWire.Relay.Action](/docs/sdk-reference/reference/dotnet/signal-wire.relay/action) - -## Properties - - - -## Methods - -### FaxAction(string, string, string, object, string) - -#### Signature - -```dotnet -public FaxAction(string controlId, string callId, string nodeId, object client, string faxType = "send") -``` - -#### Parameters - - - - - - - - - - - -#### Source - -[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) - -Line 353. - -*** - -### GetStopMethod() - -Return the RELAY RPC method that stops this action. -Subclasses MUST override to return the correct method name. - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override string GetStopMethod() -``` - -#### Returns - -`string` - -#### Source - -[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) - -Line 359. - -## Source - -[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) - -Line 349. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.relay/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.relay/index.mdx deleted file mode 100644 index 49a2cbb345..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.relay/index.mdx +++ /dev/null @@ -1,281 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.relay" -title: "SignalWire.Relay" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "module" - language: "dotnet" - qualified_name: "SignalWire.Relay" ---- -# `SignalWire.Relay` - -## Classes - - - - Base class for all RELAY call actions (play, record, collect, etc.). An Action is the client-side handle returned when you start an asynchronous operation on a call. It accumulates events, tracks state, and resolves once the operation reaches a terminal state. Uses <xref href="System.Threading.Tasks.TaskCompletionSource" data-throw-if-not-resolved="false"></xref> for native async/await support. - - - - Handle for calling.ai operations. - - - - Represents a RELAY voice call. Holds call-level state, dispatches server events to registered listeners and to in-flight Action objects, and exposes every calling.\* RPC method as a first-class C# method. - - - - Wire-string mapping, parsing, and terminal-state predicate for <xref href="SignalWire.Relay.CallState" data-throw-if-not-resolved="false"></xref>. - - - - RELAY Client -- manages the WebSocket connection to SignalWire, sends JSON-RPC 2.0 requests, and dispatches inbound events to the correct Call or Message objects. Uses async/await with <xref href="System.Threading.Tasks.TaskCompletionSource" data-throw-if-not-resolved="false"></xref> for the native C# async pattern instead of polling loops. - - - - Handle for calling.collect (and play\_and\_collect) operations. Note: play\_and\_collect emits intermediate calling.call.play events that must be silently ignored so they do not pollute the collect action's state. - - - - Protocol constants for the RELAY WebSocket interface. Defines protocol version, call/dial/message states, terminal states, and per-event-type action terminal states. - - - - Handle for calling.detect operations. - - - - A typed RELAY device object — the `{type, params}` shape that recurs across `connect` / `refer` / `dial` / `tap` and the ringback list. - - - - Wire-string mapping, parsing, and terminal-outcome predicate for <xref href="SignalWire.Relay.DialState" data-throw-if-not-resolved="false"></xref>. - - - - Represents a single RELAY event received from the server. Carries the event type, a timestamp, and the params dictionary from which call\_id, node\_id, control\_id, tag, and state are extracted. - - - - Handle for calling.fax operations (send or receive). - - - - Represents a RELAY messaging message (SMS / MMS). A Message is created when you send or receive a message through the RELAY messaging namespace. It accumulates state-change events and resolves once the message reaches a terminal state (delivered, undelivered, or failed). Uses <xref href="System.Threading.Tasks.TaskCompletionSource" data-throw-if-not-resolved="false"></xref> for native async/await support. - - - - Wire-string mapping, parsing, and terminal-state predicate for <xref href="SignalWire.Relay.MessageState" data-throw-if-not-resolved="false"></xref>. - - - - Handle for calling.pay operations. - - - - Handle for calling.play operations. - - - - Handle for calling.record operations. - - - - Handle for calling.stream operations. - - - - Handle for calling.tap operations. - - - - Handle for calling.transcribe operations. - - - -## Enums - -### CallState - -Lifecycle state of a RELAY <xref href="SignalWire.Relay.Call" data-throw-if-not-resolved="false"></xref>, as a typed, compile-time -closed set. - -**Remarks:** <p> -The RELAY `calling.call.state` event carries one of a known set of -call-state strings (`created`, `ringing`, `answered`, -`ending`, `ended`) — grounded in the Python reference's -`signalwire/relay/constants.py` (`CALL_STATES`) and mirrored by <xref href="SignalWire.Relay.Constants.CallStateCreated" data-throw-if-not-resolved="false"></xref> .. <xref href="SignalWire.Relay.Constants.CallStateEnded" data-throw-if-not-resolved="false"></xref>. -The reference exposes the state as a bare `str`; this enum is a typed -alias over those strings so callers get autocompletion and a compile error -on a typo, while <xref href="SignalWire.Relay.Call.State" data-throw-if-not-resolved="false"></xref> stays a string for parity and -forward-compatibility. - -</p> -<p> -This is the <em>call</em> vocabulary and is deliberately -<strong>distinct</strong> from <xref href="SignalWire.Relay.DialState" data-throw-if-not-resolved="false"></xref> (the dial-outcome -vocabulary) and <xref href="SignalWire.Relay.MessageState" data-throw-if-not-resolved="false"></xref> (the messaging-delivery -vocabulary). The three are never conflated — they index different wire -fields (`call_state` vs `dial_state` vs `message_state`). -</p> -<p> -Because the server emits these values and the set can grow, parse via -<xref href="SignalWire.Relay.CallStateExtensions.TryParse(System.String%2cSignalWire.Relay.CallState%40)" data-throw-if-not-resolved="false"></xref>, which -returns `false` for an unknown value rather than throwing — the string -arm on <xref href="SignalWire.Relay.Call.State" data-throw-if-not-resolved="false"></xref> preserves any future server value. -</p> - -#### Signature - -```dotnet -public enum CallState -``` - -#### Properties - - - answered - - - - created - - - - ended (terminal) - - - - ending - - - - ringing - - -#### Source - -[`src/SignalWire/Relay/CallState.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/CallState.cs) - -Line 32. - -*** - -### DialState - -Outcome state of a RELAY dial attempt (`calling.call.dial`), as a -typed, compile-time closed set. - -**Remarks:** <p> -The RELAY `calling.call.dial` event carries a `dial_state` of -`dialing`, `answered`, or `failed` (see <xref href="SignalWire.Relay.Client.HandleDialEvent(SignalWire.Relay.Event%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d)" data-throw-if-not-resolved="false"></xref> and <xref href="SignalWire.Relay.Constants.DialStateDialing" data-throw-if-not-resolved="false"></xref> .. <xref href="SignalWire.Relay.Constants.DialStateFailed" data-throw-if-not-resolved="false"></xref>). It is the dial-<em>outcome</em> -vocabulary and is deliberately <strong>distinct</strong> from <xref href="SignalWire.Relay.CallState" data-throw-if-not-resolved="false"></xref> (the per-call lifecycle) — a dial that resolves -`answered` transitions the winning <xref href="SignalWire.Relay.Call" data-throw-if-not-resolved="false"></xref> to <xref href="SignalWire.Relay.CallState.Answered" data-throw-if-not-resolved="false"></xref>, but the two fields are separate on the -wire. - -</p> -<p> -Both `answered` and `failed` are terminal dial outcomes (the dial -is resolved); `dialing` is in-progress. Parse via -<xref href="SignalWire.Relay.DialStateExtensions.TryParse(System.String%2cSignalWire.Relay.DialState%40)" data-throw-if-not-resolved="false"></xref>, which -tolerates an unknown server value. -</p> - -#### Signature - -```dotnet -public enum DialState -``` - -#### Properties - - - answered (terminal — dial succeeded) - - - - dialing (in progress) - - - - failed (terminal — dial failed) - - -#### Source - -[`src/SignalWire/Relay/DialState.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/DialState.cs) - -Line 26. - -*** - -### MessageState - -Delivery state of a RELAY <xref href="SignalWire.Relay.Message" data-throw-if-not-resolved="false"></xref> (SMS / MMS), as a typed, -compile-time closed set. - -**Remarks:** <p> -The RELAY `messaging.state` event carries a `message_state` of -`queued`, `initiated`, `sent`, `delivered`, -`undelivered`, or `failed` — grounded in the Python reference's -`signalwire/relay/constants.py` (`MESSAGE_STATE_*`) and the wire -schema `relay-protocol/messaging.state.event.json`; `received` is -the additional inbound state (<xref href="SignalWire.Relay.Constants.MessageStateReceived" data-throw-if-not-resolved="false"></xref>). -The reference exposes the state as a bare `str`; this enum is a typed -alias so callers get autocompletion and a compile-time check, while <xref href="SignalWire.Relay.Message.State" data-throw-if-not-resolved="false"></xref> stays a string for parity and forward-compat. - -</p> -<p> -This is the <em>messaging</em> vocabulary and is deliberately -<strong>distinct</strong> from <xref href="SignalWire.Relay.CallState" data-throw-if-not-resolved="false"></xref> and -<xref href="SignalWire.Relay.DialState" data-throw-if-not-resolved="false"></xref> (the voice vocabularies) — it indexes the -`message_state` wire field, never `call_state`/`dial_state`. -</p> -<p> -Parse via <xref href="SignalWire.Relay.MessageStateExtensions.TryParse(System.String%2cSignalWire.Relay.MessageState%40)" data-throw-if-not-resolved="false"></xref>, -which tolerates an unknown server value. -</p> - -#### Signature - -```dotnet -public enum MessageState -``` - -#### Properties - - - delivered (terminal) - - - - failed (terminal) - - - - initiated - - - - queued - - - - received (inbound) - - - - sent - - - - undelivered (terminal) - - -#### Source - -[`src/SignalWire/Relay/MessageState.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/MessageState.cs) - -Line 29. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.relay/message-state-extensions/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.relay/message-state-extensions/index.mdx deleted file mode 100644 index 391d4fafbc..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.relay/message-state-extensions/index.mdx +++ /dev/null @@ -1,122 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.relay/message-state-extensions" -title: "MessageStateExtensions" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.Relay.MessageStateExtensions" - parent: "SignalWire.Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/MessageState.cs" - visibility: "public" ---- -# `MessageStateExtensions` - -Wire-string mapping, parsing, and terminal-state predicate for <xref href="SignalWire.Relay.MessageState" data-throw-if-not-resolved="false"></xref>. - -**Modifiers:** `static` - -## Signature - -```dotnet -public static class MessageStateExtensions -``` - -## Methods - -### IsTerminal(MessageState) - -True when this state is terminal (delivery resolved). Mirrors <xref href="SignalWire.Relay.Constants.MessageTerminalStates" data-throw-if-not-resolved="false"></xref> — terminal = -`delivered` / `undelivered` / `failed`. - -**Modifiers:** `static` - -#### Signature - -```dotnet -public static bool IsTerminal(this MessageState state) -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/SignalWire/Relay/MessageState.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/MessageState.cs) - -Line 84. - -*** - -### ToWireName(MessageState) - -The canonical wire string for this message state (e.g. "delivered"). - -**Modifiers:** `static` - -#### Signature - -```dotnet -public static string ToWireName(this MessageState state) -``` - -#### Parameters - - - -#### Returns - -`string` - -#### Source - -[`src/SignalWire/Relay/MessageState.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/MessageState.cs) - -Line 74. - -*** - -### TryParse(string?, out MessageState) - -Parse a wire string into a <xref href="SignalWire.Relay.MessageState" data-throw-if-not-resolved="false"></xref>. Returns -`false` (and `default`) for an unrecognised value so callers -can fall back to the raw string rather than crashing on a new -server-emitted state. - -**Modifiers:** `static` - -#### Signature - -```dotnet -public static bool TryParse(string? wire, out MessageState state) -``` - -#### Parameters - - - - - -#### Returns - -`bool` - -#### Source - -[`src/SignalWire/Relay/MessageState.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/MessageState.cs) - -Line 93. - -## Source - -[`src/SignalWire/Relay/MessageState.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/MessageState.cs) - -Line 57. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.relay/message/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.relay/message/index.mdx deleted file mode 100644 index 16a75af95f..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.relay/message/index.mdx +++ /dev/null @@ -1,256 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.relay/message" -title: "Message" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.Relay.Message" - parent: "SignalWire.Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Message.cs" - visibility: "public" ---- -# `Message` - -Represents a RELAY messaging message (SMS / MMS). - -A Message is created when you send or receive a message through the -RELAY messaging namespace. It accumulates state-change events and -resolves once the message reaches a terminal state (delivered, -undelivered, or failed). - -Uses <xref href="System.Threading.Tasks.TaskCompletionSource" data-throw-if-not-resolved="false"></xref> for native async/await support. - -**Modifiers:** `sealed` - -## Signature - -```dotnet -public sealed class Message -``` - -## Properties - - - - - - - - - - - - - - - - - - - The current delivery state as the typed <xref href="SignalWire.Relay.MessageState" data-throw-if-not-resolved="false"></xref> enum, parsed from <xref href="SignalWire.Relay.Message.State" data-throw-if-not-resolved="false"></xref>. Returns `null` when <xref href="SignalWire.Relay.Message.State" data-throw-if-not-resolved="false"></xref> is unset or an unrecognised (e.g. newly-introduced server) value — read <xref href="SignalWire.Relay.Message.State" data-throw-if-not-resolved="false"></xref> for the raw string in that case. Typed convenience alongside the parity-bearing string <xref href="SignalWire.Relay.Message.State" data-throw-if-not-resolved="false"></xref>; agrees with it for known states. - - - - - - - - - - - - -## Methods - -### DispatchEvent(Event) - -Process an inbound event for this message. -Updates state/reason, fires registered event listeners, and -auto-resolves when a terminal state is reached. - -#### Signature - -```dotnet -public void DispatchEvent(Event evt) -``` - -#### Parameters - - - -#### Source - -[`src/SignalWire/Relay/Message.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Message.cs) - -Line 73. - -*** - -### Message(Dictionary\?) - -Build a Message from a params dictionary (as returned by the server). - -#### Signature - -```dotnet -public Message(Dictionary? params_ = null) -``` - -#### Parameters - - - -#### Source - -[`src/SignalWire/Relay/Message.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Message.cs) - -Line 47. - -*** - -### On - -Register a listener that fires on every state-change event. - -#### Signature - - - - ```dotnet - public Message On(Func callback) - ``` - - - - ```dotnet - public Message On(Action callback) - ``` - - - -#### Parameters (Overload 1) - - - -#### Parameters (Overload 2) - - - -#### Returns (Overload 1) - -`SignalWire.Relay.Message` - -#### Returns (Overload 2) - -`SignalWire.Relay.Message` - -#### Source - -[`src/SignalWire/Relay/Message.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Message.cs) - -Line 132. - -*** - -### OnCompleted - -Register a callback to fire when the message reaches a terminal state. -If the message is already complete the callback fires immediately. - -#### Signature - - - - ```dotnet - public Message OnCompleted(Func callback) - ``` - - - - ```dotnet - public Message OnCompleted(Action callback) - ``` - - - -#### Parameters (Overload 1) - - - -#### Parameters (Overload 2) - - - -#### Returns (Overload 1) - -`SignalWire.Relay.Message` - -#### Returns (Overload 2) - -`SignalWire.Relay.Message` - -#### Source - -[`src/SignalWire/Relay/Message.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Message.cs) - -Line 148. - -*** - -### Resolve(string?) - -Mark this message as completed. The optional result is stored and -the onCompleted callback fires exactly once. - -#### Signature - -```dotnet -public void Resolve(string? result = null) -``` - -#### Parameters - - - -#### Source - -[`src/SignalWire/Relay/Message.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Message.cs) - -Line 180. - -*** - -### WaitAsync(int) - -Await until the message completes or the timeout elapses. -Returns the resolved result, or null on timeout. - -#### Signature - -```dotnet -public Task WaitAsync(int timeoutSeconds = 30) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task` - -#### Source - -[`src/SignalWire/Relay/Message.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Message.cs) - -Line 113. - -## Source - -[`src/SignalWire/Relay/Message.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Message.cs) - -Line 12. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.relay/pay-action/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.relay/pay-action/index.mdx deleted file mode 100644 index c9d630c1d3..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.relay/pay-action/index.mdx +++ /dev/null @@ -1,85 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.relay/pay-action" -title: "PayAction" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.Relay.PayAction" - parent: "SignalWire.Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs" - visibility: "public" ---- -# `PayAction` - -Handle for calling.pay operations. - -## Signature - -```dotnet -public class PayAction : Action -``` - -## Inheritance - -**Extends:** [SignalWire.Relay.Action](/docs/sdk-reference/reference/dotnet/signal-wire.relay/action) - -## Methods - -### GetStopMethod() - -Return the RELAY RPC method that stops this action. -Subclasses MUST override to return the correct method name. - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override string GetStopMethod() -``` - -#### Returns - -`string` - -#### Source - -[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) - -Line 387. - -*** - -### PayAction(string, string, string, object) - -#### Signature - -```dotnet -public PayAction(string controlId, string callId, string nodeId, object client) -``` - -#### Parameters - - - - - - - - - -#### Source - -[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) - -Line 384. - -## Source - -[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) - -Line 382. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.relay/play-action/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.relay/play-action/index.mdx deleted file mode 100644 index 1ba04c8eb5..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.relay/play-action/index.mdx +++ /dev/null @@ -1,139 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.relay/play-action" -title: "PlayAction" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.Relay.PlayAction" - parent: "SignalWire.Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs" - visibility: "public" ---- -# `PlayAction` - -Handle for calling.play operations. - -## Signature - -```dotnet -public class PlayAction : Action -``` - -## Inheritance - -**Extends:** [SignalWire.Relay.Action](/docs/sdk-reference/reference/dotnet/signal-wire.relay/action) - -## Methods - -### GetStopMethod() - -Return the RELAY RPC method that stops this action. -Subclasses MUST override to return the correct method name. - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override string GetStopMethod() -``` - -#### Returns - -`string` - -#### Source - -[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) - -Line 221. - -*** - -### Pause() - -#### Signature - -```dotnet -public void Pause() -``` - -#### Source - -[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) - -Line 223. - -*** - -### PlayAction(string, string, string, object) - -#### Signature - -```dotnet -public PlayAction(string controlId, string callId, string nodeId, object client) -``` - -#### Parameters - - - - - - - - - -#### Source - -[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) - -Line 218. - -*** - -### Resume() - -#### Signature - -```dotnet -public void Resume() -``` - -#### Source - -[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) - -Line 225. - -*** - -### Volume(double) - -Adjust playback volume in dB. - -#### Signature - -```dotnet -public void Volume(double db) -``` - -#### Parameters - - - -#### Source - -[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) - -Line 228. - -## Source - -[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) - -Line 216. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.relay/record-action/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.relay/record-action/index.mdx deleted file mode 100644 index 2977e8a94f..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.relay/record-action/index.mdx +++ /dev/null @@ -1,129 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.relay/record-action" -title: "RecordAction" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.Relay.RecordAction" - parent: "SignalWire.Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs" - visibility: "public" ---- -# `RecordAction` - -Handle for calling.record operations. - -## Signature - -```dotnet -public class RecordAction : Action -``` - -## Inheritance - -**Extends:** [SignalWire.Relay.Action](/docs/sdk-reference/reference/dotnet/signal-wire.relay/action) - -## Properties - - - - - - - -## Methods - -### GetStopMethod() - -Return the RELAY RPC method that stops this action. -Subclasses MUST override to return the correct method name. - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override string GetStopMethod() -``` - -#### Returns - -`string` - -#### Source - -[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) - -Line 238. - -*** - -### Pause(string?) - -#### Signature - -```dotnet -public void Pause(string? behavior = null) -``` - -#### Parameters - - - -#### Source - -[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) - -Line 240. - -*** - -### RecordAction(string, string, string, object) - -#### Signature - -```dotnet -public RecordAction(string controlId, string callId, string nodeId, object client) -``` - -#### Parameters - - - - - - - - - -#### Source - -[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) - -Line 235. - -*** - -### Resume() - -#### Signature - -```dotnet -public void Resume() -``` - -#### Source - -[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) - -Line 248. - -## Source - -[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) - -Line 233. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.relay/stream-action/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.relay/stream-action/index.mdx deleted file mode 100644 index 818f692129..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.relay/stream-action/index.mdx +++ /dev/null @@ -1,85 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.relay/stream-action" -title: "StreamAction" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.Relay.StreamAction" - parent: "SignalWire.Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs" - visibility: "public" ---- -# `StreamAction` - -Handle for calling.stream operations. - -## Signature - -```dotnet -public class StreamAction : Action -``` - -## Inheritance - -**Extends:** [SignalWire.Relay.Action](/docs/sdk-reference/reference/dotnet/signal-wire.relay/action) - -## Methods - -### GetStopMethod() - -Return the RELAY RPC method that stops this action. -Subclasses MUST override to return the correct method name. - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override string GetStopMethod() -``` - -#### Returns - -`string` - -#### Source - -[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) - -Line 378. - -*** - -### StreamAction(string, string, string, object) - -#### Signature - -```dotnet -public StreamAction(string controlId, string callId, string nodeId, object client) -``` - -#### Parameters - - - - - - - - - -#### Source - -[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) - -Line 375. - -## Source - -[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) - -Line 373. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.relay/tap-action/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.relay/tap-action/index.mdx deleted file mode 100644 index 953c3453af..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.relay/tap-action/index.mdx +++ /dev/null @@ -1,85 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.relay/tap-action" -title: "TapAction" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.Relay.TapAction" - parent: "SignalWire.Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs" - visibility: "public" ---- -# `TapAction` - -Handle for calling.tap operations. - -## Signature - -```dotnet -public class TapAction : Action -``` - -## Inheritance - -**Extends:** [SignalWire.Relay.Action](/docs/sdk-reference/reference/dotnet/signal-wire.relay/action) - -## Methods - -### GetStopMethod() - -Return the RELAY RPC method that stops this action. -Subclasses MUST override to return the correct method name. - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override string GetStopMethod() -``` - -#### Returns - -`string` - -#### Source - -[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) - -Line 369. - -*** - -### TapAction(string, string, string, object) - -#### Signature - -```dotnet -public TapAction(string controlId, string callId, string nodeId, object client) -``` - -#### Parameters - - - - - - - - - -#### Source - -[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) - -Line 366. - -## Source - -[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) - -Line 364. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.relay/transcribe-action/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.relay/transcribe-action/index.mdx deleted file mode 100644 index 6ece9a4ab2..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.relay/transcribe-action/index.mdx +++ /dev/null @@ -1,85 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.relay/transcribe-action" -title: "TranscribeAction" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.Relay.TranscribeAction" - parent: "SignalWire.Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs" - visibility: "public" ---- -# `TranscribeAction` - -Handle for calling.transcribe operations. - -## Signature - -```dotnet -public class TranscribeAction : Action -``` - -## Inheritance - -**Extends:** [SignalWire.Relay.Action](/docs/sdk-reference/reference/dotnet/signal-wire.relay/action) - -## Methods - -### GetStopMethod() - -Return the RELAY RPC method that stops this action. -Subclasses MUST override to return the correct method name. - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override string GetStopMethod() -``` - -#### Returns - -`string` - -#### Source - -[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) - -Line 396. - -*** - -### TranscribeAction(string, string, string, object) - -#### Signature - -```dotnet -public TranscribeAction(string controlId, string callId, string nodeId, object client) -``` - -#### Parameters - - - - - - - - - -#### Source - -[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) - -Line 393. - -## Source - -[`src/SignalWire/Relay/Action.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs) - -Line 391. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/addresses/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/addresses/index.mdx deleted file mode 100644 index f9e5df6d20..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/addresses/index.mdx +++ /dev/null @@ -1,57 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.rest.namespaces/addresses" -title: "Addresses" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.REST.Namespaces.Addresses" - parent: "SignalWire.REST.Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs" - visibility: "public" ---- -# `Addresses` - -Addresses namespace (Relay top-level addresses, no update). - -Mirrors Python `signalwire.rest.namespaces.addresses.AddressesResource`. -Inherits CrudResource for the standard list/create/get/delete surface. - -## Signature - -```dotnet -public class Addresses : CrudResource -``` - -## Inheritance - -**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/signal-wire.rest/crud-resource) - -## Methods - -### Addresses(HttpClient) - -#### Signature - -```dotnet -public Addresses(HttpClient client) -``` - -#### Parameters - - - -#### Source - -[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) - -Line 190. - -## Source - -[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) - -Line 188. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/call-flows-helper/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/call-flows-helper/index.mdx deleted file mode 100644 index 0870a0ff56..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/call-flows-helper/index.mdx +++ /dev/null @@ -1,135 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.rest.namespaces/call-flows-helper" -title: "CallFlowsHelper" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.REST.Namespaces.CallFlowsHelper" - parent: "SignalWire.REST.Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs" - visibility: "public" ---- -# `CallFlowsHelper` - -CallFlows helper providing the singular-path variants -(`/api/fabric/resources/call_flow/{id}/{addresses,versions}`). - -## Signature - -```dotnet -public class CallFlowsHelper -``` - -## Properties - - - -## Methods - -### CallFlowsHelper(HttpClient, string) - -#### Signature - -```dotnet -public CallFlowsHelper(HttpClient client, string basePath) -``` - -#### Parameters - - - - - -#### Source - -[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) - -Line 153. - -*** - -### DeployVersionAsync(string, Dictionary\) - -#### Signature - -```dotnet -public Task> DeployVersionAsync(string resourceId, Dictionary kwargs) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) - -Line 169. - -*** - -### ListAddressesAsync(string, Dictionary\?) - -#### Signature - -```dotnet -public Task> ListAddressesAsync(string resourceId, Dictionary? queryParams = null) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) - -Line 163. - -*** - -### ListVersionsAsync(string, Dictionary\?) - -#### Signature - -```dotnet -public Task> ListVersionsAsync(string resourceId, Dictionary? queryParams = null) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) - -Line 166. - -## Source - -[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) - -Line 147. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/calling/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/calling/index.mdx deleted file mode 100644 index bec7e14482..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/calling/index.mdx +++ /dev/null @@ -1,1067 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.rest.namespaces/calling" -title: "Calling" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.REST.Namespaces.Calling" - parent: "SignalWire.REST.Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs" - visibility: "public" ---- -# `Calling` - -Calling API namespace. - -Provides 37 call-control command methods that each POST to -/api/calling/calls with a JSON body containing the command name, -an optional call ID, and parameters. - -## Signature - -```dotnet -public class Calling -``` - -## Properties - - - - - -## Methods - -### AiHoldAsync(string, Dictionary\?) - -#### Signature - -```dotnet -public Task> AiHoldAsync(string callId, Dictionary? parms = null) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) - -Line 176. - -*** - -### AiMessageAsync(string, Dictionary\?) - -#### Signature - -```dotnet -public Task> AiMessageAsync(string callId, Dictionary? parms = null) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) - -Line 173. - -*** - -### AiStopAsync(string, Dictionary\?) - -#### Signature - -```dotnet -public Task> AiStopAsync(string callId, Dictionary? parms = null) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) - -Line 182. - -*** - -### AiUnholdAsync(string, Dictionary\?) - -#### Signature - -```dotnet -public Task> AiUnholdAsync(string callId, Dictionary? parms = null) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) - -Line 179. - -*** - -### Calling(HttpClient, string) - -#### Signature - -```dotnet -public Calling(HttpClient client, string projectId) -``` - -#### Parameters - - - - - -#### Source - -[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) - -Line 16. - -*** - -### CollectAsync(string, Dictionary\?) - -#### Signature - -```dotnet -public Task> CollectAsync(string callId, Dictionary? parms = null) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) - -Line 110. - -*** - -### CollectStartInputTimersAsync(string, Dictionary\?) - -#### Signature - -```dotnet -public Task> CollectStartInputTimersAsync(string callId, Dictionary? parms = null) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) - -Line 116. - -*** - -### CollectStopAsync(string, Dictionary\?) - -#### Signature - -```dotnet -public Task> CollectStopAsync(string callId, Dictionary? parms = null) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) - -Line 113. - -*** - -### DenoiseAsync(string, Dictionary\?) - -#### Signature - -```dotnet -public Task> DenoiseAsync(string callId, Dictionary? parms = null) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) - -Line 153. - -*** - -### DenoiseStopAsync(string, Dictionary\?) - -#### Signature - -```dotnet -public Task> DenoiseStopAsync(string callId, Dictionary? parms = null) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) - -Line 156. - -*** - -### DetectAsync(string, Dictionary\?) - -#### Signature - -```dotnet -public Task> DetectAsync(string callId, Dictionary? parms = null) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) - -Line 123. - -*** - -### DetectStopAsync(string, Dictionary\?) - -#### Signature - -```dotnet -public Task> DetectStopAsync(string callId, Dictionary? parms = null) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) - -Line 126. - -*** - -### DialAsync(Dictionary\?) - -#### Signature - -```dotnet -public Task> DialAsync(Dictionary? parms = null) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) - -Line 51. - -*** - -### DisconnectAsync(string, Dictionary\?) - -#### Signature - -```dotnet -public Task> DisconnectAsync(string callId, Dictionary? parms = null) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) - -Line 68. - -*** - -### EndAsync(string, Dictionary\?) - -#### Signature - -```dotnet -public Task> EndAsync(string callId, Dictionary? parms = null) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) - -Line 62. - -*** - -### GetBasePath() - -#### Signature - -```dotnet -public string GetBasePath() -``` - -#### Returns - -`string` - -#### Source - -[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) - -Line 24. - -*** - -### LiveTranscribeAsync(string, Dictionary\?) - -#### Signature - -```dotnet -public Task> LiveTranscribeAsync(string callId, Dictionary? parms = null) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) - -Line 189. - -*** - -### LiveTranslateAsync(string, Dictionary\?) - -#### Signature - -```dotnet -public Task> LiveTranslateAsync(string callId, Dictionary? parms = null) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) - -Line 192. - -*** - -### PlayAsync(string, Dictionary\?) - -#### Signature - -```dotnet -public Task> PlayAsync(string callId, Dictionary? parms = null) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) - -Line 75. - -*** - -### PlayPauseAsync(string, Dictionary\?) - -#### Signature - -```dotnet -public Task> PlayPauseAsync(string callId, Dictionary? parms = null) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) - -Line 78. - -*** - -### PlayResumeAsync(string, Dictionary\?) - -#### Signature - -```dotnet -public Task> PlayResumeAsync(string callId, Dictionary? parms = null) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) - -Line 81. - -*** - -### PlayStopAsync(string, Dictionary\?) - -#### Signature - -```dotnet -public Task> PlayStopAsync(string callId, Dictionary? parms = null) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) - -Line 84. - -*** - -### PlayVolumeAsync(string, Dictionary\?) - -#### Signature - -```dotnet -public Task> PlayVolumeAsync(string callId, Dictionary? parms = null) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) - -Line 87. - -*** - -### ReceiveFaxStopAsync(string, Dictionary\?) - -#### Signature - -```dotnet -public Task> ReceiveFaxStopAsync(string callId, Dictionary? parms = null) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) - -Line 202. - -*** - -### RecordAsync(string, Dictionary\?) - -#### Signature - -```dotnet -public Task> RecordAsync(string callId, Dictionary? parms = null) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) - -Line 94. - -*** - -### RecordPauseAsync(string, Dictionary\?) - -#### Signature - -```dotnet -public Task> RecordPauseAsync(string callId, Dictionary? parms = null) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) - -Line 97. - -*** - -### RecordResumeAsync(string, Dictionary\?) - -#### Signature - -```dotnet -public Task> RecordResumeAsync(string callId, Dictionary? parms = null) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) - -Line 100. - -*** - -### RecordStopAsync(string, Dictionary\?) - -#### Signature - -```dotnet -public Task> RecordStopAsync(string callId, Dictionary? parms = null) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) - -Line 103. - -*** - -### ReferAsync(string, Dictionary\?) - -#### Signature - -```dotnet -public Task> ReferAsync(string callId, Dictionary? parms = null) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) - -Line 209. - -*** - -### SendFaxStopAsync(string, Dictionary\?) - -#### Signature - -```dotnet -public Task> SendFaxStopAsync(string callId, Dictionary? parms = null) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) - -Line 199. - -*** - -### StreamAsync(string, Dictionary\?) - -#### Signature - -```dotnet -public Task> StreamAsync(string callId, Dictionary? parms = null) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) - -Line 143. - -*** - -### StreamStopAsync(string, Dictionary\?) - -#### Signature - -```dotnet -public Task> StreamStopAsync(string callId, Dictionary? parms = null) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) - -Line 146. - -*** - -### TapAsync(string, Dictionary\?) - -#### Signature - -```dotnet -public Task> TapAsync(string callId, Dictionary? parms = null) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) - -Line 133. - -*** - -### TapStopAsync(string, Dictionary\?) - -#### Signature - -```dotnet -public Task> TapStopAsync(string callId, Dictionary? parms = null) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) - -Line 136. - -*** - -### TranscribeAsync(string, Dictionary\?) - -#### Signature - -```dotnet -public Task> TranscribeAsync(string callId, Dictionary? parms = null) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) - -Line 163. - -*** - -### TranscribeStopAsync(string, Dictionary\?) - -#### Signature - -```dotnet -public Task> TranscribeStopAsync(string callId, Dictionary? parms = null) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) - -Line 166. - -*** - -### TransferAsync(string, Dictionary\?) - -#### Signature - -```dotnet -public Task> TransferAsync(string callId, Dictionary? parms = null) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) - -Line 65. - -*** - -### UpdateAsync(Dictionary\?) - -Python-parity alias for <xref href="SignalWire.REST.Namespaces.Calling.UpdateCallAsync(System.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d)" data-throw-if-not-resolved="false"></xref>. -Mirrors `CallingNamespace.update`. - -#### Signature - -```dotnet -public Task> UpdateAsync(Dictionary? parms = null) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) - -Line 59. - -*** - -### UpdateCallAsync(Dictionary\?) - -#### Signature - -```dotnet -public Task> UpdateCallAsync(Dictionary? parms = null) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) - -Line 54. - -*** - -### UserEventAsync(string, Dictionary\?) - -#### Signature - -```dotnet -public Task> UserEventAsync(string callId, Dictionary? parms = null) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) - -Line 216. - -## Source - -[`src/SignalWire/REST/Namespaces/Calling.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Calling.cs) - -Line 9. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-accounts/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-accounts/index.mdx deleted file mode 100644 index 676ee12455..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-accounts/index.mdx +++ /dev/null @@ -1,149 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.rest.namespaces/compat-accounts" -title: "CompatAccounts" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.REST.Namespaces.CompatAccounts" - parent: "SignalWire.REST.Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs" - visibility: "public" ---- -# `CompatAccounts` - -Compat account/subproject management. Lives at the top-level -/api/laml/2010-04-01/Accounts collection (no AccountSid prefix). - -## Signature - -```dotnet -public class CompatAccounts -``` - -## Methods - -### CompatAccounts(HttpClient) - -#### Signature - -```dotnet -public CompatAccounts(HttpClient client) -``` - -#### Parameters - - - -#### Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 69. - -*** - -### CreateAsync(Dictionary\) - -#### Signature - -```dotnet -public Task> CreateAsync(Dictionary kwargs) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 74. - -*** - -### GetAsync(string) - -#### Signature - -```dotnet -public Task> GetAsync(string sid) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 77. - -*** - -### ListAsync(Dictionary\?) - -#### Signature - -```dotnet -public Task> ListAsync(Dictionary? queryParams = null) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 71. - -*** - -### UpdateAsync(string, Dictionary\) - -#### Signature - -```dotnet -public Task> UpdateAsync(string sid, Dictionary kwargs) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 80. - -## Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 65. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-applications/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-applications/index.mdx deleted file mode 100644 index 4ed534d8e5..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-applications/index.mdx +++ /dev/null @@ -1,88 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.rest.namespaces/compat-applications" -title: "CompatApplications" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.REST.Namespaces.CompatApplications" - parent: "SignalWire.REST.Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs" - visibility: "public" ---- -# `CompatApplications` - -Compat applications (Twilio LaML voice/SMS apps). - -## Signature - -```dotnet -public class CompatApplications : CrudResource -``` - -## Inheritance - -**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/signal-wire.rest/crud-resource) - -## Methods - -### CompatApplications(HttpClient, string) - -#### Signature - -```dotnet -public CompatApplications(HttpClient client, string basePath) -``` - -#### Parameters - - - - - -#### Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 255. - -*** - -### UpdateAsync(string, Dictionary\, CancellationToken) - -Update a resource by ID (PUT basePath/\{id\}). - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override Task> UpdateAsync(string sid, Dictionary kwargs, CancellationToken cancellationToken = default) -``` - -#### Parameters - - - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 257. - -## Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 253. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-calls/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-calls/index.mdx deleted file mode 100644 index ff76965da7..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-calls/index.mdx +++ /dev/null @@ -1,197 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.rest.namespaces/compat-calls" -title: "CompatCalls" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.REST.Namespaces.CompatCalls" - parent: "SignalWire.REST.Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs" - visibility: "public" ---- -# `CompatCalls` - -Compat calls with recording + stream sub-resources. -Inherits standard CRUD; adds Twilio-style compat extensions. - -## Signature - -```dotnet -public class CompatCalls : CrudResource -``` - -## Inheritance - -**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/signal-wire.rest/crud-resource) - -## Methods - -### CompatCalls(HttpClient, string) - -#### Signature - -```dotnet -public CompatCalls(HttpClient client, string basePath) -``` - -#### Parameters - - - - - -#### Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 88. - -*** - -### StartRecordingAsync(string, Dictionary\) - -#### Signature - -```dotnet -public Task> StartRecordingAsync(string callSid, Dictionary kwargs) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 95. - -*** - -### StartStreamAsync(string, Dictionary\) - -#### Signature - -```dotnet -public Task> StartStreamAsync(string callSid, Dictionary kwargs) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 101. - -*** - -### StopStreamAsync(string, string, Dictionary\) - -#### Signature - -```dotnet -public Task> StopStreamAsync(string callSid, string streamSid, Dictionary kwargs) -``` - -#### Parameters - - - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 104. - -*** - -### UpdateAsync(string, Dictionary\, CancellationToken) - -UPDATE uses POST (Twilio compat) — overrides the generic CrudResource PUT. - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override Task> UpdateAsync(string sid, Dictionary kwargs, CancellationToken cancellationToken = default) -``` - -#### Parameters - - - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 91. - -*** - -### UpdateRecordingAsync(string, string, Dictionary\) - -#### Signature - -```dotnet -public Task> UpdateRecordingAsync(string callSid, string recordingSid, Dictionary kwargs) -``` - -#### Parameters - - - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 98. - -## Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 86. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-conferences/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-conferences/index.mdx deleted file mode 100644 index 446a6cb33a..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-conferences/index.mdx +++ /dev/null @@ -1,396 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.rest.namespaces/compat-conferences" -title: "CompatConferences" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.REST.Namespaces.CompatConferences" - parent: "SignalWire.REST.Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs" - visibility: "public" ---- -# `CompatConferences` - -Compat conferences with participant, recording, and stream sub-resources. - -## Signature - -```dotnet -public class CompatConferences -``` - -## Properties - - - -## Methods - -### CompatConferences(HttpClient, string) - -#### Signature - -```dotnet -public CompatConferences(HttpClient client, string basePath) -``` - -#### Parameters - - - - - -#### Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 152. - -*** - -### DeleteRecordingAsync(string, string) - -#### Signature - -```dotnet -public Task> DeleteRecordingAsync(string conferenceSid, string recordingSid) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 193. - -*** - -### GetAsync(string) - -#### Signature - -```dotnet -public Task> GetAsync(string sid) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 166. - -*** - -### GetParticipantAsync(string, string) - -#### Signature - -```dotnet -public Task> GetParticipantAsync(string conferenceSid, string callSid) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 175. - -*** - -### GetRecordingAsync(string, string) - -#### Signature - -```dotnet -public Task> GetRecordingAsync(string conferenceSid, string recordingSid) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 187. - -*** - -### ListAsync(Dictionary\?) - -#### Signature - -```dotnet -public Task> ListAsync(Dictionary? queryParams = null) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 163. - -*** - -### ListParticipantsAsync(string, Dictionary\?) - -#### Signature - -```dotnet -public Task> ListParticipantsAsync(string conferenceSid, Dictionary? queryParams = null) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 172. - -*** - -### ListRecordingsAsync(string, Dictionary\?) - -#### Signature - -```dotnet -public Task> ListRecordingsAsync(string conferenceSid, Dictionary? queryParams = null) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 184. - -*** - -### RemoveParticipantAsync(string, string) - -#### Signature - -```dotnet -public Task> RemoveParticipantAsync(string conferenceSid, string callSid) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 181. - -*** - -### StartStreamAsync(string, Dictionary\) - -#### Signature - -```dotnet -public Task> StartStreamAsync(string conferenceSid, Dictionary kwargs) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 196. - -*** - -### StopStreamAsync(string, string, Dictionary\) - -#### Signature - -```dotnet -public Task> StopStreamAsync(string conferenceSid, string streamSid, Dictionary kwargs) -``` - -#### Parameters - - - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 199. - -*** - -### UpdateAsync(string, Dictionary\) - -#### Signature - -```dotnet -public Task> UpdateAsync(string sid, Dictionary kwargs) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 169. - -*** - -### UpdateParticipantAsync(string, string, Dictionary\) - -#### Signature - -```dotnet -public Task> UpdateParticipantAsync(string conferenceSid, string callSid, Dictionary kwargs) -``` - -#### Parameters - - - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 178. - -*** - -### UpdateRecordingAsync(string, string, Dictionary\) - -#### Signature - -```dotnet -public Task> UpdateRecordingAsync(string conferenceSid, string recordingSid, Dictionary kwargs) -``` - -#### Parameters - - - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 190. - -## Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 147. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-faxes/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-faxes/index.mdx deleted file mode 100644 index 392aa6c67c..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-faxes/index.mdx +++ /dev/null @@ -1,166 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.rest.namespaces/compat-faxes" -title: "CompatFaxes" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.REST.Namespaces.CompatFaxes" - parent: "SignalWire.REST.Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs" - visibility: "public" ---- -# `CompatFaxes` - -Compat faxes with media sub-resources. - -## Signature - -```dotnet -public class CompatFaxes : CrudResource -``` - -## Inheritance - -**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/signal-wire.rest/crud-resource) - -## Methods - -### CompatFaxes(HttpClient, string) - -#### Signature - -```dotnet -public CompatFaxes(HttpClient client, string basePath) -``` - -#### Parameters - - - - - -#### Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 130. - -*** - -### DeleteMediaAsync(string, string) - -#### Signature - -```dotnet -public Task> DeleteMediaAsync(string faxSid, string mediaSid) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 142. - -*** - -### GetMediaAsync(string, string) - -#### Signature - -```dotnet -public Task> GetMediaAsync(string faxSid, string mediaSid) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 139. - -*** - -### ListMediaAsync(string, Dictionary\?) - -#### Signature - -```dotnet -public Task> ListMediaAsync(string faxSid, Dictionary? queryParams = null) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 136. - -*** - -### UpdateAsync(string, Dictionary\, CancellationToken) - -Update a resource by ID (PUT basePath/\{id\}). - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override Task> UpdateAsync(string sid, Dictionary kwargs, CancellationToken cancellationToken = default) -``` - -#### Parameters - - - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 132. - -## Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 128. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-laml-bins/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-laml-bins/index.mdx deleted file mode 100644 index 386502ac22..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-laml-bins/index.mdx +++ /dev/null @@ -1,88 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.rest.namespaces/compat-laml-bins" -title: "CompatLamlBins" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.REST.Namespaces.CompatLamlBins" - parent: "SignalWire.REST.Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs" - visibility: "public" ---- -# `CompatLamlBins` - -Compat cXML / LaML script bins. - -## Signature - -```dotnet -public class CompatLamlBins : CrudResource -``` - -## Inheritance - -**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/signal-wire.rest/crud-resource) - -## Methods - -### CompatLamlBins(HttpClient, string) - -#### Signature - -```dotnet -public CompatLamlBins(HttpClient client, string basePath) -``` - -#### Parameters - - - - - -#### Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 265. - -*** - -### UpdateAsync(string, Dictionary\, CancellationToken) - -Update a resource by ID (PUT basePath/\{id\}). - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override Task> UpdateAsync(string sid, Dictionary kwargs, CancellationToken cancellationToken = default) -``` - -#### Parameters - - - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 267. - -## Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 263. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-messages/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-messages/index.mdx deleted file mode 100644 index 0bfc50962d..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-messages/index.mdx +++ /dev/null @@ -1,166 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.rest.namespaces/compat-messages" -title: "CompatMessages" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.REST.Namespaces.CompatMessages" - parent: "SignalWire.REST.Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs" - visibility: "public" ---- -# `CompatMessages` - -Compat messages with media sub-resources. - -## Signature - -```dotnet -public class CompatMessages : CrudResource -``` - -## Inheritance - -**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/signal-wire.rest/crud-resource) - -## Methods - -### CompatMessages(HttpClient, string) - -#### Signature - -```dotnet -public CompatMessages(HttpClient client, string basePath) -``` - -#### Parameters - - - - - -#### Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 111. - -*** - -### DeleteMediaAsync(string, string) - -#### Signature - -```dotnet -public Task> DeleteMediaAsync(string messageSid, string mediaSid) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 123. - -*** - -### GetMediaAsync(string, string) - -#### Signature - -```dotnet -public Task> GetMediaAsync(string messageSid, string mediaSid) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 120. - -*** - -### ListMediaAsync(string, Dictionary\?) - -#### Signature - -```dotnet -public Task> ListMediaAsync(string messageSid, Dictionary? queryParams = null) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 117. - -*** - -### UpdateAsync(string, Dictionary\, CancellationToken) - -Update a resource by ID (PUT basePath/\{id\}). - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override Task> UpdateAsync(string sid, Dictionary kwargs, CancellationToken cancellationToken = default) -``` - -#### Parameters - - - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 113. - -## Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 109. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-phone-numbers/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-phone-numbers/index.mdx deleted file mode 100644 index 505ce20b67..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-phone-numbers/index.mdx +++ /dev/null @@ -1,278 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.rest.namespaces/compat-phone-numbers" -title: "CompatPhoneNumbers" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.REST.Namespaces.CompatPhoneNumbers" - parent: "SignalWire.REST.Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs" - visibility: "public" ---- -# `CompatPhoneNumbers` - -Compat phone-number management with purchase, import, and search. - -## Signature - -```dotnet -public class CompatPhoneNumbers -``` - -## Properties - - - -## Methods - -### CompatPhoneNumbers(HttpClient, string) - -#### Signature - -```dotnet -public CompatPhoneNumbers(HttpClient client, string basePath) -``` - -#### Parameters - - - - - -#### Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 211. - -*** - -### DeleteAsync(string) - -#### Signature - -```dotnet -public Task> DeleteAsync(string sid) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 236. - -*** - -### GetAsync(string) - -#### Signature - -```dotnet -public Task> GetAsync(string sid) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 230. - -*** - -### ImportNumberAsync(Dictionary\) - -#### Signature - -```dotnet -public Task> ImportNumberAsync(Dictionary kwargs) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 239. - -*** - -### ListAsync(Dictionary\?) - -#### Signature - -```dotnet -public Task> ListAsync(Dictionary? queryParams = null) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 224. - -*** - -### ListAvailableCountriesAsync(Dictionary\?) - -#### Signature - -```dotnet -public Task> ListAvailableCountriesAsync(Dictionary? queryParams = null) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 242. - -*** - -### PurchaseAsync(Dictionary\) - -#### Signature - -```dotnet -public Task> PurchaseAsync(Dictionary kwargs) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 227. - -*** - -### SearchLocalAsync(string, Dictionary\?) - -#### Signature - -```dotnet -public Task> SearchLocalAsync(string country, Dictionary? queryParams = null) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 245. - -*** - -### SearchTollFreeAsync(string, Dictionary\?) - -#### Signature - -```dotnet -public Task> SearchTollFreeAsync(string country, Dictionary? queryParams = null) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 248. - -*** - -### UpdateAsync(string, Dictionary\) - -#### Signature - -```dotnet -public Task> UpdateAsync(string sid, Dictionary kwargs) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 233. - -## Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 204. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-queues/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-queues/index.mdx deleted file mode 100644 index d3db9bc1b4..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-queues/index.mdx +++ /dev/null @@ -1,168 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.rest.namespaces/compat-queues" -title: "CompatQueues" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.REST.Namespaces.CompatQueues" - parent: "SignalWire.REST.Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs" - visibility: "public" ---- -# `CompatQueues` - -Compat queues with member management. - -## Signature - -```dotnet -public class CompatQueues : CrudResource -``` - -## Inheritance - -**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/signal-wire.rest/crud-resource) - -## Methods - -### CompatQueues(HttpClient, string) - -#### Signature - -```dotnet -public CompatQueues(HttpClient client, string basePath) -``` - -#### Parameters - - - - - -#### Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 275. - -*** - -### DequeueMemberAsync(string, string, Dictionary\) - -#### Signature - -```dotnet -public Task> DequeueMemberAsync(string queueSid, string callSid, Dictionary kwargs) -``` - -#### Parameters - - - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 287. - -*** - -### GetMemberAsync(string, string) - -#### Signature - -```dotnet -public Task> GetMemberAsync(string queueSid, string callSid) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 284. - -*** - -### ListMembersAsync(string, Dictionary\?) - -#### Signature - -```dotnet -public Task> ListMembersAsync(string queueSid, Dictionary? queryParams = null) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 281. - -*** - -### UpdateAsync(string, Dictionary\, CancellationToken) - -Update a resource by ID (PUT basePath/\{id\}). - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override Task> UpdateAsync(string sid, Dictionary kwargs, CancellationToken cancellationToken = default) -``` - -#### Parameters - - - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 277. - -## Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 273. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-recordings/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-recordings/index.mdx deleted file mode 100644 index a814ed649b..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-recordings/index.mdx +++ /dev/null @@ -1,128 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.rest.namespaces/compat-recordings" -title: "CompatRecordings" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.REST.Namespaces.CompatRecordings" - parent: "SignalWire.REST.Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs" - visibility: "public" ---- -# `CompatRecordings` - -Compat recordings (read-only top-level resource). - -## Signature - -```dotnet -public class CompatRecordings -``` - -## Properties - - - -## Methods - -### CompatRecordings(HttpClient, string) - -#### Signature - -```dotnet -public CompatRecordings(HttpClient client, string basePath) -``` - -#### Parameters - - - - - -#### Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 297. - -*** - -### DeleteAsync(string) - -#### Signature - -```dotnet -public Task> DeleteAsync(string sid) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 313. - -*** - -### GetAsync(string) - -#### Signature - -```dotnet -public Task> GetAsync(string sid) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 310. - -*** - -### ListAsync(Dictionary\?) - -#### Signature - -```dotnet -public Task> ListAsync(Dictionary? queryParams = null) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 307. - -## Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 292. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-tokens/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-tokens/index.mdx deleted file mode 100644 index 313b384d77..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-tokens/index.mdx +++ /dev/null @@ -1,130 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.rest.namespaces/compat-tokens" -title: "CompatTokens" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.REST.Namespaces.CompatTokens" - parent: "SignalWire.REST.Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs" - visibility: "public" ---- -# `CompatTokens` - -Compat API tokens — UPDATE uses PATCH (BaseResource style). - -## Signature - -```dotnet -public class CompatTokens -``` - -## Properties - - - -## Methods - -### CompatTokens(HttpClient, string) - -#### Signature - -```dotnet -public CompatTokens(HttpClient client, string basePath) -``` - -#### Parameters - - - - - -#### Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 349. - -*** - -### CreateAsync(Dictionary\) - -#### Signature - -```dotnet -public Task> CreateAsync(Dictionary kwargs) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 359. - -*** - -### DeleteAsync(string) - -#### Signature - -```dotnet -public Task> DeleteAsync(string tokenId) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 365. - -*** - -### UpdateAsync(string, Dictionary\) - -#### Signature - -```dotnet -public Task> UpdateAsync(string tokenId, Dictionary kwargs) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 362. - -## Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 344. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-transcriptions/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-transcriptions/index.mdx deleted file mode 100644 index 04669609fb..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat-transcriptions/index.mdx +++ /dev/null @@ -1,128 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.rest.namespaces/compat-transcriptions" -title: "CompatTranscriptions" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.REST.Namespaces.CompatTranscriptions" - parent: "SignalWire.REST.Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs" - visibility: "public" ---- -# `CompatTranscriptions` - -Compat transcriptions (read-only top-level resource). - -## Signature - -```dotnet -public class CompatTranscriptions -``` - -## Properties - - - -## Methods - -### CompatTranscriptions(HttpClient, string) - -#### Signature - -```dotnet -public CompatTranscriptions(HttpClient client, string basePath) -``` - -#### Parameters - - - - - -#### Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 323. - -*** - -### DeleteAsync(string) - -#### Signature - -```dotnet -public Task> DeleteAsync(string sid) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 339. - -*** - -### GetAsync(string) - -#### Signature - -```dotnet -public Task> GetAsync(string sid) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 336. - -*** - -### ListAsync(Dictionary\?) - -#### Signature - -```dotnet -public Task> ListAsync(Dictionary? queryParams = null) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 333. - -## Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 318. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat/index.mdx deleted file mode 100644 index acd15acb30..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/compat/index.mdx +++ /dev/null @@ -1,94 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.rest.namespaces/compat" -title: "Compat" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.REST.Namespaces.Compat" - parent: "SignalWire.REST.Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs" - visibility: "public" ---- -# `Compat` - -Twilio-compatible (LaML) API namespace with AccountSid scoping. - -Mirrors Python `signalwire.rest.namespaces.compat.CompatNamespace`: -the entry-point exposes 12 sub-resources (accounts, calls, messages, -faxes, conferences, phone\_numbers, applications, laml\_bins, queues, -recordings, transcriptions, tokens) under a shared per-account prefix. - -<p>Inherits from <xref href="SignalWire.REST.CrudResource" data-throw-if-not-resolved="false"></xref> so the historical -``client.Compat.List()`` / ``Create`` / ``Get`` / ``Update`` / ``Delete`` -surface continues to work; the per-account collection accessors are -added on top.</p> - -## Signature - -```dotnet -public class Compat : CrudResource -``` - -## Inheritance - -**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/signal-wire.rest/crud-resource) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - -## Methods - -### Compat(HttpClient, string) - -#### Signature - -```dotnet -public Compat(HttpClient client, string accountSid) -``` - -#### Parameters - - - - - -#### Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 40. - -## Source - -[`src/SignalWire/REST/Namespaces/Compat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Compat.cs) - -Line 22. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/conference-logs/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/conference-logs/index.mdx deleted file mode 100644 index fa9cfdfcb6..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/conference-logs/index.mdx +++ /dev/null @@ -1,80 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.rest.namespaces/conference-logs" -title: "ConferenceLogs" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.REST.Namespaces.ConferenceLogs" - parent: "SignalWire.REST.Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Logs.cs" - visibility: "public" ---- -# `ConferenceLogs` - -Conference log queries (list-only). - -## Signature - -```dotnet -public class ConferenceLogs -``` - -## Properties - - - -## Methods - -### ConferenceLogs(HttpClient, string) - -#### Signature - -```dotnet -public ConferenceLogs(HttpClient client, string basePath) -``` - -#### Parameters - - - - - -#### Source - -[`src/SignalWire/REST/Namespaces/Logs.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Logs.cs) - -Line 114. - -*** - -### ListAsync(Dictionary\?) - -#### Signature - -```dotnet -public Task> ListAsync(Dictionary? queryParams = null) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Logs.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Logs.cs) - -Line 122. - -## Source - -[`src/SignalWire/REST/Namespaces/Logs.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Logs.cs) - -Line 109. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/conference-rooms-helper/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/conference-rooms-helper/index.mdx deleted file mode 100644 index 2f8c07e3c7..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/conference-rooms-helper/index.mdx +++ /dev/null @@ -1,83 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.rest.namespaces/conference-rooms-helper" -title: "ConferenceRoomsHelper" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.REST.Namespaces.ConferenceRoomsHelper" - parent: "SignalWire.REST.Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs" - visibility: "public" ---- -# `ConferenceRoomsHelper` - -ConferenceRooms helper providing the singular-path variant -(`/api/fabric/resources/conference_room/{id}/addresses`). - -## Signature - -```dotnet -public class ConferenceRoomsHelper -``` - -## Properties - - - -## Methods - -### ConferenceRoomsHelper(HttpClient, string) - -#### Signature - -```dotnet -public ConferenceRoomsHelper(HttpClient client, string basePath) -``` - -#### Parameters - - - - - -#### Source - -[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) - -Line 183. - -*** - -### ListAddressesAsync(string, Dictionary\?) - -#### Signature - -```dotnet -public Task> ListAddressesAsync(string resourceId, Dictionary? queryParams = null) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) - -Line 192. - -## Source - -[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) - -Line 177. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/cxml-applications-helper/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/cxml-applications-helper/index.mdx deleted file mode 100644 index 374c304101..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/cxml-applications-helper/index.mdx +++ /dev/null @@ -1,56 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.rest.namespaces/cxml-applications-helper" -title: "CxmlApplicationsHelper" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.REST.Namespaces.CxmlApplicationsHelper" - parent: "SignalWire.REST.Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs" - visibility: "public" ---- -# `CxmlApplicationsHelper` - -cXML applications helper. The API has no CREATE endpoint for cXML -applications (POST is rejected); calling Create here throws -NotImplementedException to mirror Python's deliberate behaviour. - -## Signature - -```dotnet -public class CxmlApplicationsHelper -``` - -## Methods - -### CreateAsync(Dictionary\?) - -#### Signature - -```dotnet -public Task> CreateAsync(Dictionary? kwargs = null) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) - -Line 203. - -## Source - -[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) - -Line 201. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/datasphere-documents/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/datasphere-documents/index.mdx deleted file mode 100644 index 9e143973be..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/datasphere-documents/index.mdx +++ /dev/null @@ -1,156 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.rest.namespaces/datasphere-documents" -title: "DatasphereDocuments" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.REST.Namespaces.DatasphereDocuments" - parent: "SignalWire.REST.Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs" - visibility: "public" ---- -# `DatasphereDocuments` - -Datasphere documents (CRUD + search + chunk methods). - -## Signature - -```dotnet -public class DatasphereDocuments : CrudResource -``` - -## Inheritance - -**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/signal-wire.rest/crud-resource) - -## Methods - -### DatasphereDocuments(HttpClient) - -#### Signature - -```dotnet -public DatasphereDocuments(HttpClient client) -``` - -#### Parameters - - - -#### Source - -[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) - -Line 166. - -*** - -### DeleteChunkAsync(string, string) - -#### Signature - -```dotnet -public Task> DeleteChunkAsync(string documentId, string chunkId) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) - -Line 178. - -*** - -### GetChunkAsync(string, string) - -#### Signature - -```dotnet -public Task> GetChunkAsync(string documentId, string chunkId) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) - -Line 175. - -*** - -### ListChunksAsync(string, Dictionary\?) - -#### Signature - -```dotnet -public Task> ListChunksAsync(string documentId, Dictionary? queryParams = null) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) - -Line 172. - -*** - -### SearchAsync(Dictionary\) - -#### Signature - -```dotnet -public Task> SearchAsync(Dictionary kwargs) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) - -Line 169. - -## Source - -[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) - -Line 164. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/datasphere-ns/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/datasphere-ns/index.mdx deleted file mode 100644 index bd4bfc8679..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/datasphere-ns/index.mdx +++ /dev/null @@ -1,63 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.rest.namespaces/datasphere-ns" -title: "DatasphereNs" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.REST.Namespaces.DatasphereNs" - parent: "SignalWire.REST.Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs" - visibility: "public" ---- -# `DatasphereNs` - -Datasphere namespace — documents with chunks/search. - -Mirrors Python `signalwire.rest.namespaces.datasphere.DatasphereNamespace`. -Extends CrudResource — the legacy `client.Datasphere.List` etc went -to /api/datasphere/documents directly; we preserve that surface and -add `Documents` accessor for chunk/search per Python parity. - -## Signature - -```dotnet -public class DatasphereNs : CrudResource -``` - -## Inheritance - -**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/signal-wire.rest/crud-resource) - -## Properties - - - -## Methods - -### DatasphereNs(HttpClient) - -#### Signature - -```dotnet -public DatasphereNs(HttpClient client) -``` - -#### Parameters - - - -#### Source - -[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) - -Line 158. - -## Source - -[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) - -Line 154. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/fabric-addresses/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/fabric-addresses/index.mdx deleted file mode 100644 index 16d9a18824..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/fabric-addresses/index.mdx +++ /dev/null @@ -1,107 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.rest.namespaces/fabric-addresses" -title: "FabricAddresses" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.REST.Namespaces.FabricAddresses" - parent: "SignalWire.REST.Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs" - visibility: "public" ---- -# `FabricAddresses` - -Read-only top-level Fabric addresses resource (lives at -/api/fabric/addresses, NOT under /api/fabric/resources). - -Mirrors Python `signalwire.rest.namespaces.fabric.FabricAddresses`. - -## Signature - -```dotnet -public class FabricAddresses -``` - -## Properties - - - -## Methods - -### FabricAddresses(HttpClient, string) - -#### Signature - -```dotnet -public FabricAddresses(HttpClient client, string basePath) -``` - -#### Parameters - - - - - -#### Source - -[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) - -Line 20. - -*** - -### GetAsync(string) - -#### Signature - -```dotnet -public Task> GetAsync(string addressId) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) - -Line 33. - -*** - -### ListAsync(Dictionary\?) - -#### Signature - -```dotnet -public Task> ListAsync(Dictionary? queryParams = null) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) - -Line 30. - -## Source - -[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) - -Line 15. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/fabric-resources/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/fabric-resources/index.mdx deleted file mode 100644 index 2f5814c9dd..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/fabric-resources/index.mdx +++ /dev/null @@ -1,184 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.rest.namespaces/fabric-resources" -title: "FabricResources" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.REST.Namespaces.FabricResources" - parent: "SignalWire.REST.Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs" - visibility: "public" ---- -# `FabricResources` - -Generic resource operations across all Fabric resource types. - -Lives at /api/fabric/resources (the base) and dispatches to per-type -sub-paths. Mirrors Python's -`signalwire.rest.namespaces.fabric.GenericResources`. - -## Signature - -```dotnet -public class FabricResources -``` - -## Properties - - - -## Methods - -### AssignDomainApplicationAsync(string, Dictionary\) - -#### Signature - -```dotnet -public Task> AssignDomainApplicationAsync(string resourceId, Dictionary kwargs) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) - -Line 72. - -*** - -### DeleteAsync(string) - -#### Signature - -```dotnet -public Task> DeleteAsync(string resourceId) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) - -Line 66. - -*** - -### FabricResources(HttpClient, string) - -#### Signature - -```dotnet -public FabricResources(HttpClient client, string basePath) -``` - -#### Parameters - - - - - -#### Source - -[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) - -Line 49. - -*** - -### GetAsync(string) - -#### Signature - -```dotnet -public Task> GetAsync(string resourceId) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) - -Line 63. - -*** - -### ListAddressesAsync(string, Dictionary\?) - -#### Signature - -```dotnet -public Task> ListAddressesAsync(string resourceId, Dictionary? queryParams = null) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) - -Line 69. - -*** - -### ListAsync(Dictionary\?) - -#### Signature - -```dotnet -public Task> ListAsync(Dictionary? queryParams = null) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) - -Line 60. - -## Source - -[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) - -Line 44. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/fabric-tokens/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/fabric-tokens/index.mdx deleted file mode 100644 index 60999cf325..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/fabric-tokens/index.mdx +++ /dev/null @@ -1,174 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.rest.namespaces/fabric-tokens" -title: "FabricTokens" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.REST.Namespaces.FabricTokens" - parent: "SignalWire.REST.Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs" - visibility: "public" ---- -# `FabricTokens` - -Fabric tokens — subscriber/guest/invite/embed token creation. - -All endpoints sit under /api/fabric (NOT /api/fabric/resources or -/api/fabric/tokens). Mirrors Python's -`signalwire.rest.namespaces.fabric.FabricTokens`. - -## Signature - -```dotnet -public class FabricTokens -``` - -## Methods - -### CreateEmbedTokenAsync(Dictionary\) - -#### Signature - -```dotnet -public Task> CreateEmbedTokenAsync(Dictionary kwargs) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) - -Line 102. - -*** - -### CreateGuestTokenAsync(Dictionary\) - -#### Signature - -```dotnet -public Task> CreateGuestTokenAsync(Dictionary kwargs) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) - -Line 99. - -*** - -### CreateInviteTokenAsync(Dictionary\) - -#### Signature - -```dotnet -public Task> CreateInviteTokenAsync(Dictionary kwargs) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) - -Line 96. - -*** - -### CreateSubscriberTokenAsync(Dictionary\) - -#### Signature - -```dotnet -public Task> CreateSubscriberTokenAsync(Dictionary kwargs) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) - -Line 90. - -*** - -### FabricTokens(HttpClient) - -#### Signature - -```dotnet -public FabricTokens(HttpClient client) -``` - -#### Parameters - - - -#### Source - -[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) - -Line 88. - -*** - -### RefreshSubscriberTokenAsync(Dictionary\) - -#### Signature - -```dotnet -public Task> RefreshSubscriberTokenAsync(Dictionary kwargs) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) - -Line 93. - -## Source - -[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) - -Line 83. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/fabric/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/fabric/index.mdx deleted file mode 100644 index 59047630ab..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/fabric/index.mdx +++ /dev/null @@ -1,133 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.rest.namespaces/fabric" -title: "Fabric" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.REST.Namespaces.Fabric" - parent: "SignalWire.REST.Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Fabric.cs" - visibility: "public" ---- -# `Fabric` - -Fabric API namespace. - -Groups all Fabric sub-resources (subscribers, SIP endpoints, call flows, -SWML scripts, conference rooms, AI agents, etc.) under a single object. -Each sub-resource is lazily initialised as a <xref href="SignalWire.REST.CrudResource" data-throw-if-not-resolved="false"></xref> -pointing at the correct API path under /api/fabric/resources. - -## Signature - -```dotnet -public class Fabric -``` - -## Properties - - - - - Top-level Fabric addresses (read-only — list/get) that lives at /api/fabric/addresses (NOT under /api/fabric/resources). - - - - - - - - CallFlows singular-path operations (list\_addresses, list\_versions, deploy\_version). - - - - - - - - - - ConferenceRooms singular-path operations (list\_addresses). - - - - - - - - cXML applications helper that exposes the deliberate NotImplementedException on Create (matching Python's `CxmlApplicationsResource.create`). - - - - - - - - - - - - - - - - - - - - Generic resources operations (list/get/delete/list\_addresses/ assign\_domain\_application) at /api/fabric/resources. - - - - - - - - - - - - Subscriber-scoped SIP-endpoint operations (get/update/delete) under /api/fabric/resources/subscribers. - - - - - - - - Fabric tokens resource — note this lives at the top-level `/api/fabric/tokens` path, NOT under `/api/fabric/resources`. - - - - Subscriber/guest/invite/embed token endpoints under /api/fabric. Distinct from the per-account `Tokens` accessor which hits /api/fabric/tokens. - - -## Methods - -### Fabric(HttpClient) - -#### Signature - -```dotnet -public Fabric(HttpClient client) -``` - -#### Parameters - - - -#### Source - -[`src/SignalWire/REST/Namespaces/Fabric.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Fabric.cs) - -Line 50. - -## Source - -[`src/SignalWire/REST/Namespaces/Fabric.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Fabric.cs) - -Line 10. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/fax-logs/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/fax-logs/index.mdx deleted file mode 100644 index 06c8c254bc..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/fax-logs/index.mdx +++ /dev/null @@ -1,104 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.rest.namespaces/fax-logs" -title: "FaxLogs" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.REST.Namespaces.FaxLogs" - parent: "SignalWire.REST.Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Logs.cs" - visibility: "public" ---- -# `FaxLogs` - -Fax log queries. - -## Signature - -```dotnet -public class FaxLogs -``` - -## Properties - - - -## Methods - -### FaxLogs(HttpClient, string) - -#### Signature - -```dotnet -public FaxLogs(HttpClient client, string basePath) -``` - -#### Parameters - - - - - -#### Source - -[`src/SignalWire/REST/Namespaces/Logs.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Logs.cs) - -Line 91. - -*** - -### GetAsync(string) - -#### Signature - -```dotnet -public Task> GetAsync(string logId) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Logs.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Logs.cs) - -Line 104. - -*** - -### ListAsync(Dictionary\?) - -#### Signature - -```dotnet -public Task> ListAsync(Dictionary? queryParams = null) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Logs.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Logs.cs) - -Line 101. - -## Source - -[`src/SignalWire/REST/Namespaces/Logs.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Logs.cs) - -Line 86. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/imported-numbers/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/imported-numbers/index.mdx deleted file mode 100644 index 3c66f55923..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/imported-numbers/index.mdx +++ /dev/null @@ -1,59 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.rest.namespaces/imported-numbers" -title: "ImportedNumbers" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.REST.Namespaces.ImportedNumbers" - parent: "SignalWire.REST.Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs" - visibility: "public" ---- -# `ImportedNumbers` - -Imported phone numbers (create only). - -Mirrors Python `signalwire.rest.namespaces.imported_numbers.ImportedNumbersResource`. -Extends CrudResource so the legacy `client.ImportedNumbers.BasePath` -surface keeps working; `CreateAsync` is the only method Python -exposes. - -## Signature - -```dotnet -public class ImportedNumbers : CrudResource -``` - -## Inheritance - -**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/signal-wire.rest/crud-resource) - -## Methods - -### ImportedNumbers(HttpClient) - -#### Signature - -```dotnet -public ImportedNumbers(HttpClient client) -``` - -#### Parameters - - - -#### Source - -[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) - -Line 110. - -## Source - -[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) - -Line 108. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/index.mdx deleted file mode 100644 index c594670a42..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/index.mdx +++ /dev/null @@ -1,224 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.rest.namespaces" -title: "SignalWire.REST.Namespaces" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "module" - language: "dotnet" - qualified_name: "SignalWire.REST.Namespaces" ---- -# `SignalWire.REST.Namespaces` - -## Classes - - - - Addresses namespace (Relay top-level addresses, no update). Mirrors Python `signalwire.rest.namespaces.addresses.AddressesResource`. Inherits CrudResource for the standard list/create/get/delete surface. - - - - CallFlows helper providing the singular-path variants (`/api/fabric/resources/call_flow/{id}/{addresses,versions}`). - - - - Calling API namespace. Provides 37 call-control command methods that each POST to /api/calling/calls with a JSON body containing the command name, an optional call ID, and parameters. - - - - Twilio-compatible (LaML) API namespace with AccountSid scoping. Mirrors Python `signalwire.rest.namespaces.compat.CompatNamespace`: the entry-point exposes 12 sub-resources (accounts, calls, messages, faxes, conferences, phone\_numbers, applications, laml\_bins, queues, recordings, transcriptions, tokens) under a shared per-account prefix. <p>Inherits from <xref href="SignalWire.REST.CrudResource" data-throw-if-not-resolved="false"></xref> so the historical `client.Compat.List()` / `Create` / `Get` / `Update` / `Delete` surface continues to work; the per-account collection accessors are added on top.</p> - - - - Compat account/subproject management. Lives at the top-level /api/laml/2010-04-01/Accounts collection (no AccountSid prefix). - - - - Compat applications (Twilio LaML voice/SMS apps). - - - - Compat calls with recording + stream sub-resources. Inherits standard CRUD; adds Twilio-style compat extensions. - - - - Compat conferences with participant, recording, and stream sub-resources. - - - - Compat faxes with media sub-resources. - - - - Compat cXML / LaML script bins. - - - - Compat messages with media sub-resources. - - - - Compat phone-number management with purchase, import, and search. - - - - Compat queues with member management. - - - - Compat recordings (read-only top-level resource). - - - - Compat API tokens — UPDATE uses PATCH (BaseResource style). - - - - Compat transcriptions (read-only top-level resource). - - - - Conference log queries (list-only). - - - - ConferenceRooms helper providing the singular-path variant (`/api/fabric/resources/conference_room/{id}/addresses`). - - - - cXML applications helper. The API has no CREATE endpoint for cXML applications (POST is rejected); calling Create here throws NotImplementedException to mirror Python's deliberate behaviour. - - - - Datasphere documents (CRUD + search + chunk methods). - - - - Datasphere namespace — documents with chunks/search. Mirrors Python `signalwire.rest.namespaces.datasphere.DatasphereNamespace`. Extends CrudResource — the legacy `client.Datasphere.List` etc went to /api/datasphere/documents directly; we preserve that surface and add `Documents` accessor for chunk/search per Python parity. - - - - Fabric API namespace. Groups all Fabric sub-resources (subscribers, SIP endpoints, call flows, SWML scripts, conference rooms, AI agents, etc.) under a single object. Each sub-resource is lazily initialised as a <xref href="SignalWire.REST.CrudResource" data-throw-if-not-resolved="false"></xref> pointing at the correct API path under /api/fabric/resources. - - - - Read-only top-level Fabric addresses resource (lives at /api/fabric/addresses, NOT under /api/fabric/resources). Mirrors Python `signalwire.rest.namespaces.fabric.FabricAddresses`. - - - - Generic resource operations across all Fabric resource types. Lives at /api/fabric/resources (the base) and dispatches to per-type sub-paths. Mirrors Python's `signalwire.rest.namespaces.fabric.GenericResources`. - - - - Fabric tokens — subscriber/guest/invite/embed token creation. All endpoints sit under /api/fabric (NOT /api/fabric/resources or /api/fabric/tokens). Mirrors Python's `signalwire.rest.namespaces.fabric.FabricTokens`. - - - - Fax log queries. - - - - Imported phone numbers (create only). Mirrors Python `signalwire.rest.namespaces.imported_numbers.ImportedNumbersResource`. Extends CrudResource so the legacy `client.ImportedNumbers.BasePath` surface keeps working; `CreateAsync` is the only method Python exposes. - - - - Logs API namespace — message, voice, fax, and conference logs (read-only). Mirrors Python `signalwire.rest.namespaces.logs.LogsNamespace`. Each kind of log lives at a different sub-API path. <p>Inherits from <xref href="SignalWire.REST.CrudResource" data-throw-if-not-resolved="false"></xref> so the legacy `client.Logs.BasePath` accessor still resolves; the new Messages/Voice/Fax/Conferences accessors point at the actual per-API log endpoints.</p> - - - - Message log queries. - - - - Multi-Factor Authentication namespace (sms / call / verify dispatch). Mirrors Python `signalwire.rest.namespaces.mfa.MfaResource`. Extends CrudResource so the legacy `client.Mfa.BasePath` / `client.Mfa.Create` surface keeps working. - - - - Number Groups (CRUD + membership operations; update via PUT). Mirrors Python `signalwire.rest.namespaces.number_groups.NumberGroupsResource`. Note delete\_membership / get\_membership target the top-level `/api/relay/rest/number_group_memberships/{id}` path, NOT the nested per-group sub-collection. - - - - Project namespace — exposes ProjectTokens (PATCH update). Mirrors Python `signalwire.rest.namespaces.project.ProjectNamespace`. Extends CrudResource for the legacy `client.Project.BasePath` test. - - - - Project API tokens — PATCH for update. - - - - Queues namespace (Relay queues with member operations). Mirrors Python `signalwire.rest.namespaces.queues.QueuesResource`. Note: per-port adapter mismatches with the legacy CrudResource at /api/fabric/resources/queues — this lives at /api/relay/rest/queues. - - - - Recordings namespace (Relay top-level recordings, list/get/delete). Mirrors Python `signalwire.rest.namespaces.recordings.RecordingsResource`. Inherits CrudResource for the standard list/get/delete surface. - - - - 10DLC Campaign Registry namespace — brands, campaigns, orders, numbers. Mirrors Python `signalwire.rest.namespaces.registry.RegistryNamespace` (everything under /api/relay/rest/registry/beta). <p>Inherits from <xref href="SignalWire.REST.CrudResource" data-throw-if-not-resolved="false"></xref> so the legacy `client.Registry.BasePath` accessor still resolves; the new Brands/Campaigns/Orders/Numbers accessors target the per-resource endpoints under /api/relay/rest/registry/beta.</p> - - - - 10DLC brand management. - - - - 10DLC campaign management — update via PUT. - - - - 10DLC number assignment management. - - - - 10DLC assignment order management (read-only). - - - - Short codes (list/get/update — no create/delete; update via PUT). Mirrors Python `signalwire.rest.namespaces.short_codes.ShortCodesResource`. Extends CrudResource — overrides UpdateAsync to use PUT (matching Python's \_update\_method = "PUT" on this resource). - - - - Project SIP profile (singleton resource — get/update only, update via PUT). Mirrors Python `signalwire.rest.namespaces.sip_profile.SipProfileResource`. Extends CrudResource for the legacy `client.SipProfile.BasePath` test — the Python-parity singleton path is /api/relay/rest/sip\_profile; the legacy .NET path was /api/relay/rest/sip\_profiles. The legacy accessor target is preserved while `GetAsync()/UpdateAsync(kwargs)` hit the singleton path. - - - - Subscribers helper exposing per-subscriber SIP-endpoint operations. Mirrors Python's `SubscribersResource` SIP endpoint methods. - - - - Video API namespace. Mirrors Python `signalwire.rest.namespaces.video.VideoNamespace` — rooms, room sessions, room recordings, conferences, conference tokens, streams. <p>The legacy `client.Video.List() / Create / Get / Delete` surface (which targeted `/api/video/rooms`) is preserved by inheriting from <xref href="SignalWire.REST.CrudResource" data-throw-if-not-resolved="false"></xref>.</p> - - - - Video conferences (CRUD with PUT update + tokens/streams subresources). - - - - Video conference tokens: get + reset. - - - - Video room recordings: list, get, delete, list\_events. - - - - Video rooms (CRUD + streams sub-resource). - - - - Video room sessions: list, get, list\_events/\_members/\_recordings. - - - - Video room tokens (create-only). - - - - Video streams: get, update (PUT), delete. - - - - Voice log queries with events sub-collection. - - diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/logs/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/logs/index.mdx deleted file mode 100644 index 278728a2d8..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/logs/index.mdx +++ /dev/null @@ -1,72 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.rest.namespaces/logs" -title: "Logs" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.REST.Namespaces.Logs" - parent: "SignalWire.REST.Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Logs.cs" - visibility: "public" ---- -# `Logs` - -Logs API namespace — message, voice, fax, and conference logs (read-only). - -Mirrors Python `signalwire.rest.namespaces.logs.LogsNamespace`. -Each kind of log lives at a different sub-API path. - -<p>Inherits from <xref href="SignalWire.REST.CrudResource" data-throw-if-not-resolved="false"></xref> so the legacy -``client.Logs.BasePath`` accessor still resolves; the new -Messages/Voice/Fax/Conferences accessors point at the actual per-API -log endpoints.</p> - -## Signature - -```dotnet -public class Logs : CrudResource -``` - -## Inheritance - -**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/signal-wire.rest/crud-resource) - -## Properties - - - - - - - - - -## Methods - -### Logs(HttpClient) - -#### Signature - -```dotnet -public Logs(HttpClient client) -``` - -#### Parameters - - - -#### Source - -[`src/SignalWire/REST/Namespaces/Logs.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Logs.cs) - -Line 27. - -## Source - -[`src/SignalWire/REST/Namespaces/Logs.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Logs.cs) - -Line 20. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/message-logs/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/message-logs/index.mdx deleted file mode 100644 index 3b4aa08557..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/message-logs/index.mdx +++ /dev/null @@ -1,104 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.rest.namespaces/message-logs" -title: "MessageLogs" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.REST.Namespaces.MessageLogs" - parent: "SignalWire.REST.Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Logs.cs" - visibility: "public" ---- -# `MessageLogs` - -Message log queries. - -## Signature - -```dotnet -public class MessageLogs -``` - -## Properties - - - -## Methods - -### GetAsync(string) - -#### Signature - -```dotnet -public Task> GetAsync(string logId) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Logs.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Logs.cs) - -Line 54. - -*** - -### ListAsync(Dictionary\?) - -#### Signature - -```dotnet -public Task> ListAsync(Dictionary? queryParams = null) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Logs.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Logs.cs) - -Line 51. - -*** - -### MessageLogs(HttpClient, string) - -#### Signature - -```dotnet -public MessageLogs(HttpClient client, string basePath) -``` - -#### Parameters - - - - - -#### Source - -[`src/SignalWire/REST/Namespaces/Logs.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Logs.cs) - -Line 41. - -## Source - -[`src/SignalWire/REST/Namespaces/Logs.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Logs.cs) - -Line 36. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/mfa/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/mfa/index.mdx deleted file mode 100644 index d79e7ed9ed..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/mfa/index.mdx +++ /dev/null @@ -1,132 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.rest.namespaces/mfa" -title: "Mfa" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.REST.Namespaces.Mfa" - parent: "SignalWire.REST.Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs" - visibility: "public" ---- -# `Mfa` - -Multi-Factor Authentication namespace (sms / call / verify dispatch). - -Mirrors Python `signalwire.rest.namespaces.mfa.MfaResource`. -Extends CrudResource so the legacy `client.Mfa.BasePath` / -`client.Mfa.Create` surface keeps working. - -## Signature - -```dotnet -public class Mfa : CrudResource -``` - -## Inheritance - -**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/signal-wire.rest/crud-resource) - -## Methods - -### CallAsync(Dictionary\) - -#### Signature - -```dotnet -public Task> CallAsync(Dictionary kwargs) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) - -Line 23. - -*** - -### Mfa(HttpClient) - -#### Signature - -```dotnet -public Mfa(HttpClient client) -``` - -#### Parameters - - - -#### Source - -[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) - -Line 18. - -*** - -### SmsAsync(Dictionary\) - -#### Signature - -```dotnet -public Task> SmsAsync(Dictionary kwargs) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) - -Line 20. - -*** - -### VerifyAsync(string, Dictionary\) - -#### Signature - -```dotnet -public Task> VerifyAsync(string requestId, Dictionary kwargs) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) - -Line 26. - -## Source - -[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) - -Line 16. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/number-groups/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/number-groups/index.mdx deleted file mode 100644 index 01b28da672..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/number-groups/index.mdx +++ /dev/null @@ -1,191 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.rest.namespaces/number-groups" -title: "NumberGroups" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.REST.Namespaces.NumberGroups" - parent: "SignalWire.REST.Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs" - visibility: "public" ---- -# `NumberGroups` - -Number Groups (CRUD + membership operations; update via PUT). - -Mirrors Python `signalwire.rest.namespaces.number_groups.NumberGroupsResource`. -Note delete\_membership / get\_membership target the top-level -`/api/relay/rest/number_group_memberships/{id}` path, NOT the -nested per-group sub-collection. - -## Signature - -```dotnet -public class NumberGroups : CrudResource -``` - -## Inheritance - -**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/signal-wire.rest/crud-resource) - -## Methods - -### AddMembershipAsync(string, Dictionary\) - -#### Signature - -```dotnet -public Task> AddMembershipAsync(string groupId, Dictionary kwargs) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) - -Line 90. - -*** - -### DeleteMembershipAsync(string) - -#### Signature - -```dotnet -public Task> DeleteMembershipAsync(string membershipId) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) - -Line 96. - -*** - -### GetMembershipAsync(string) - -#### Signature - -```dotnet -public Task> GetMembershipAsync(string membershipId) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) - -Line 93. - -*** - -### ListMembershipsAsync(string, Dictionary\?) - -#### Signature - -```dotnet -public Task> ListMembershipsAsync(string groupId, Dictionary? queryParams = null) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) - -Line 87. - -*** - -### NumberGroups(HttpClient) - -#### Signature - -```dotnet -public NumberGroups(HttpClient client) -``` - -#### Parameters - - - -#### Source - -[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) - -Line 80. - -*** - -### UpdateAsync(string, Dictionary\, CancellationToken) - -Update a resource by ID (PUT basePath/\{id\}). - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override Task> UpdateAsync(string id, Dictionary kwargs, CancellationToken cancellationToken = default) -``` - -#### Parameters - - - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) - -Line 83. - -## Source - -[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) - -Line 78. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/project-tokens/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/project-tokens/index.mdx deleted file mode 100644 index ab12a3fdc6..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/project-tokens/index.mdx +++ /dev/null @@ -1,124 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.rest.namespaces/project-tokens" -title: "ProjectTokens" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.REST.Namespaces.ProjectTokens" - parent: "SignalWire.REST.Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs" - visibility: "public" ---- -# `ProjectTokens` - -Project API tokens — PATCH for update. - -## Signature - -```dotnet -public class ProjectTokens -``` - -## Methods - -### CreateAsync(Dictionary\) - -#### Signature - -```dotnet -public Task> CreateAsync(Dictionary kwargs) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) - -Line 136. - -*** - -### DeleteAsync(string) - -#### Signature - -```dotnet -public Task> DeleteAsync(string tokenId) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) - -Line 142. - -*** - -### ProjectTokens(HttpClient) - -#### Signature - -```dotnet -public ProjectTokens(HttpClient client) -``` - -#### Parameters - - - -#### Source - -[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) - -Line 134. - -*** - -### UpdateAsync(string, Dictionary\) - -#### Signature - -```dotnet -public Task> UpdateAsync(string tokenId, Dictionary kwargs) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) - -Line 139. - -## Source - -[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) - -Line 130. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/project/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/project/index.mdx deleted file mode 100644 index 7e27a7634e..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/project/index.mdx +++ /dev/null @@ -1,61 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.rest.namespaces/project" -title: "Project" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.REST.Namespaces.Project" - parent: "SignalWire.REST.Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs" - visibility: "public" ---- -# `Project` - -Project namespace — exposes ProjectTokens (PATCH update). - -Mirrors Python `signalwire.rest.namespaces.project.ProjectNamespace`. -Extends CrudResource for the legacy `client.Project.BasePath` test. - -## Signature - -```dotnet -public class Project : CrudResource -``` - -## Inheritance - -**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/signal-wire.rest/crud-resource) - -## Properties - - - -## Methods - -### Project(HttpClient) - -#### Signature - -```dotnet -public Project(HttpClient client) -``` - -#### Parameters - - - -#### Source - -[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) - -Line 124. - -## Source - -[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) - -Line 120. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/queues/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/queues/index.mdx deleted file mode 100644 index 5473a96636..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/queues/index.mdx +++ /dev/null @@ -1,166 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.rest.namespaces/queues" -title: "Queues" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.REST.Namespaces.Queues" - parent: "SignalWire.REST.Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs" - visibility: "public" ---- -# `Queues` - -Queues namespace (Relay queues with member operations). - -Mirrors Python `signalwire.rest.namespaces.queues.QueuesResource`. -Note: per-port adapter mismatches with the legacy CrudResource at -/api/fabric/resources/queues — this lives at /api/relay/rest/queues. - -## Signature - -```dotnet -public class Queues : CrudResource -``` - -## Inheritance - -**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/signal-wire.rest/crud-resource) - -## Methods - -### GetMemberAsync(string, string) - -#### Signature - -```dotnet -public Task> GetMemberAsync(string queueId, string memberId) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) - -Line 228. - -*** - -### GetNextMemberAsync(string) - -#### Signature - -```dotnet -public Task> GetNextMemberAsync(string queueId) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) - -Line 225. - -*** - -### ListMembersAsync(string, Dictionary\?) - -#### Signature - -```dotnet -public Task> ListMembersAsync(string queueId, Dictionary? queryParams = null) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) - -Line 222. - -*** - -### Queues(HttpClient) - -#### Signature - -```dotnet -public Queues(HttpClient client) -``` - -#### Parameters - - - -#### Source - -[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) - -Line 215. - -*** - -### UpdateAsync(string, Dictionary\, CancellationToken) - -Update a resource by ID (PUT basePath/\{id\}). - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override Task> UpdateAsync(string id, Dictionary kwargs, CancellationToken cancellationToken = default) -``` - -#### Parameters - - - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) - -Line 218. - -## Source - -[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) - -Line 213. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/recordings/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/recordings/index.mdx deleted file mode 100644 index afbf3ed292..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/recordings/index.mdx +++ /dev/null @@ -1,57 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.rest.namespaces/recordings" -title: "Recordings" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.REST.Namespaces.Recordings" - parent: "SignalWire.REST.Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs" - visibility: "public" ---- -# `Recordings` - -Recordings namespace (Relay top-level recordings, list/get/delete). - -Mirrors Python `signalwire.rest.namespaces.recordings.RecordingsResource`. -Inherits CrudResource for the standard list/get/delete surface. - -## Signature - -```dotnet -public class Recordings : CrudResource -``` - -## Inheritance - -**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/signal-wire.rest/crud-resource) - -## Methods - -### Recordings(HttpClient) - -#### Signature - -```dotnet -public Recordings(HttpClient client) -``` - -#### Parameters - - - -#### Source - -[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) - -Line 202. - -## Source - -[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) - -Line 200. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/registry-brands/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/registry-brands/index.mdx deleted file mode 100644 index d3d7d5a5b9..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/registry-brands/index.mdx +++ /dev/null @@ -1,180 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.rest.namespaces/registry-brands" -title: "RegistryBrands" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.REST.Namespaces.RegistryBrands" - parent: "SignalWire.REST.Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs" - visibility: "public" ---- -# `RegistryBrands` - -10DLC brand management. - -## Signature - -```dotnet -public class RegistryBrands -``` - -## Properties - - - -## Methods - -### CreateAsync(Dictionary\) - -#### Signature - -```dotnet -public Task> CreateAsync(Dictionary kwargs) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Registry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs) - -Line 57. - -*** - -### CreateCampaignAsync(string, Dictionary\) - -#### Signature - -```dotnet -public Task> CreateCampaignAsync(string brandId, Dictionary kwargs) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Registry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs) - -Line 66. - -*** - -### GetAsync(string) - -#### Signature - -```dotnet -public Task> GetAsync(string brandId) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Registry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs) - -Line 60. - -*** - -### ListAsync(Dictionary\?) - -#### Signature - -```dotnet -public Task> ListAsync(Dictionary? queryParams = null) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Registry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs) - -Line 54. - -*** - -### ListCampaignsAsync(string, Dictionary\?) - -#### Signature - -```dotnet -public Task> ListCampaignsAsync(string brandId, Dictionary? queryParams = null) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Registry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs) - -Line 63. - -*** - -### RegistryBrands(HttpClient, string) - -#### Signature - -```dotnet -public RegistryBrands(HttpClient client, string basePath) -``` - -#### Parameters - - - - - -#### Source - -[`src/SignalWire/REST/Namespaces/Registry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs) - -Line 43. - -## Source - -[`src/SignalWire/REST/Namespaces/Registry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs) - -Line 38. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/registry-campaigns/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/registry-campaigns/index.mdx deleted file mode 100644 index c25dbc5b5e..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/registry-campaigns/index.mdx +++ /dev/null @@ -1,184 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.rest.namespaces/registry-campaigns" -title: "RegistryCampaigns" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.REST.Namespaces.RegistryCampaigns" - parent: "SignalWire.REST.Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs" - visibility: "public" ---- -# `RegistryCampaigns` - -10DLC campaign management — update via PUT. - -## Signature - -```dotnet -public class RegistryCampaigns -``` - -## Properties - - - -## Methods - -### CreateOrderAsync(string, Dictionary\) - -#### Signature - -```dotnet -public Task> CreateOrderAsync(string campaignId, Dictionary kwargs) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Registry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs) - -Line 99. - -*** - -### GetAsync(string) - -#### Signature - -```dotnet -public Task> GetAsync(string campaignId) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Registry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs) - -Line 87. - -*** - -### ListNumbersAsync(string, Dictionary\?) - -#### Signature - -```dotnet -public Task> ListNumbersAsync(string campaignId, Dictionary? queryParams = null) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Registry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs) - -Line 93. - -*** - -### ListOrdersAsync(string, Dictionary\?) - -#### Signature - -```dotnet -public Task> ListOrdersAsync(string campaignId, Dictionary? queryParams = null) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Registry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs) - -Line 96. - -*** - -### RegistryCampaigns(HttpClient, string) - -#### Signature - -```dotnet -public RegistryCampaigns(HttpClient client, string basePath) -``` - -#### Parameters - - - - - -#### Source - -[`src/SignalWire/REST/Namespaces/Registry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs) - -Line 76. - -*** - -### UpdateAsync(string, Dictionary\) - -#### Signature - -```dotnet -public Task> UpdateAsync(string campaignId, Dictionary kwargs) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Registry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs) - -Line 90. - -## Source - -[`src/SignalWire/REST/Namespaces/Registry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs) - -Line 71. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/registry-numbers/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/registry-numbers/index.mdx deleted file mode 100644 index e15910d7c4..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/registry-numbers/index.mdx +++ /dev/null @@ -1,80 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.rest.namespaces/registry-numbers" -title: "RegistryNumbers" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.REST.Namespaces.RegistryNumbers" - parent: "SignalWire.REST.Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs" - visibility: "public" ---- -# `RegistryNumbers` - -10DLC number assignment management. - -## Signature - -```dotnet -public class RegistryNumbers -``` - -## Properties - - - -## Methods - -### DeleteAsync(string) - -#### Signature - -```dotnet -public Task> DeleteAsync(string numberId) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Registry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs) - -Line 139. - -*** - -### RegistryNumbers(HttpClient, string) - -#### Signature - -```dotnet -public RegistryNumbers(HttpClient client, string basePath) -``` - -#### Parameters - - - - - -#### Source - -[`src/SignalWire/REST/Namespaces/Registry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs) - -Line 129. - -## Source - -[`src/SignalWire/REST/Namespaces/Registry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs) - -Line 124. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/registry-orders/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/registry-orders/index.mdx deleted file mode 100644 index 9619246d30..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/registry-orders/index.mdx +++ /dev/null @@ -1,80 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.rest.namespaces/registry-orders" -title: "RegistryOrders" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.REST.Namespaces.RegistryOrders" - parent: "SignalWire.REST.Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs" - visibility: "public" ---- -# `RegistryOrders` - -10DLC assignment order management (read-only). - -## Signature - -```dotnet -public class RegistryOrders -``` - -## Properties - - - -## Methods - -### GetAsync(string) - -#### Signature - -```dotnet -public Task> GetAsync(string orderId) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Registry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs) - -Line 119. - -*** - -### RegistryOrders(HttpClient, string) - -#### Signature - -```dotnet -public RegistryOrders(HttpClient client, string basePath) -``` - -#### Parameters - - - - - -#### Source - -[`src/SignalWire/REST/Namespaces/Registry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs) - -Line 109. - -## Source - -[`src/SignalWire/REST/Namespaces/Registry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs) - -Line 104. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/registry/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/registry/index.mdx deleted file mode 100644 index 59e0708fc8..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/registry/index.mdx +++ /dev/null @@ -1,72 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.rest.namespaces/registry" -title: "Registry" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.REST.Namespaces.Registry" - parent: "SignalWire.REST.Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs" - visibility: "public" ---- -# `Registry` - -10DLC Campaign Registry namespace — brands, campaigns, orders, numbers. - -Mirrors Python `signalwire.rest.namespaces.registry.RegistryNamespace` -(everything under /api/relay/rest/registry/beta). - -<p>Inherits from <xref href="SignalWire.REST.CrudResource" data-throw-if-not-resolved="false"></xref> so the legacy -``client.Registry.BasePath`` accessor still resolves; the new -Brands/Campaigns/Orders/Numbers accessors target the per-resource -endpoints under /api/relay/rest/registry/beta.</p> - -## Signature - -```dotnet -public class Registry : CrudResource -``` - -## Inheritance - -**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/signal-wire.rest/crud-resource) - -## Properties - - - - - - - - - -## Methods - -### Registry(HttpClient) - -#### Signature - -```dotnet -public Registry(HttpClient client) -``` - -#### Parameters - - - -#### Source - -[`src/SignalWire/REST/Namespaces/Registry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs) - -Line 29. - -## Source - -[`src/SignalWire/REST/Namespaces/Registry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Registry.cs) - -Line 20. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/short-codes/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/short-codes/index.mdx deleted file mode 100644 index fda2fafb09..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/short-codes/index.mdx +++ /dev/null @@ -1,90 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.rest.namespaces/short-codes" -title: "ShortCodes" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.REST.Namespaces.ShortCodes" - parent: "SignalWire.REST.Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs" - visibility: "public" ---- -# `ShortCodes` - -Short codes (list/get/update — no create/delete; update via PUT). - -Mirrors Python `signalwire.rest.namespaces.short_codes.ShortCodesResource`. -Extends CrudResource — overrides UpdateAsync to use PUT (matching -Python's \_update\_method = "PUT" on this resource). - -## Signature - -```dotnet -public class ShortCodes : CrudResource -``` - -## Inheritance - -**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/signal-wire.rest/crud-resource) - -## Methods - -### ShortCodes(HttpClient) - -#### Signature - -```dotnet -public ShortCodes(HttpClient client) -``` - -#### Parameters - - - -#### Source - -[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) - -Line 63. - -*** - -### UpdateAsync(string, Dictionary\, CancellationToken) - -Update a resource by ID (PUT basePath/\{id\}). - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override Task> UpdateAsync(string id, Dictionary kwargs, CancellationToken cancellationToken = default) -``` - -#### Parameters - - - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) - -Line 65. - -## Source - -[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) - -Line 61. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/sip-profile/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/sip-profile/index.mdx deleted file mode 100644 index b79d9de973..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/sip-profile/index.mdx +++ /dev/null @@ -1,111 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.rest.namespaces/sip-profile" -title: "SipProfile" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.REST.Namespaces.SipProfile" - parent: "SignalWire.REST.Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs" - visibility: "public" ---- -# `SipProfile` - -Project SIP profile (singleton resource — get/update only, update via PUT). - -Mirrors Python `signalwire.rest.namespaces.sip_profile.SipProfileResource`. -Extends CrudResource for the legacy `client.SipProfile.BasePath` test -— the Python-parity singleton path is /api/relay/rest/sip\_profile; -the legacy .NET path was /api/relay/rest/sip\_profiles. The legacy -accessor target is preserved while `GetAsync()/UpdateAsync(kwargs)` -hit the singleton path. - -## Signature - -```dotnet -public class SipProfile : CrudResource -``` - -## Inheritance - -**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/signal-wire.rest/crud-resource) - -## Properties - - - Singleton resource path (Python parity). - - -## Methods - -### GetAsync() - -#### Signature - -```dotnet -public Task> GetAsync() -``` - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) - -Line 47. - -*** - -### SipProfile(HttpClient) - -#### Signature - -```dotnet -public SipProfile(HttpClient client) -``` - -#### Parameters - - - -#### Source - -[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) - -Line 45. - -*** - -### UpdateAsync(Dictionary\) - -#### Signature - -```dotnet -public Task> UpdateAsync(Dictionary kwargs) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) - -Line 50. - -## Source - -[`src/SignalWire/REST/Namespaces/SmallNamespaces.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/SmallNamespaces.cs) - -Line 40. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/subscribers-helper/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/subscribers-helper/index.mdx deleted file mode 100644 index 9fd4444c16..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/subscribers-helper/index.mdx +++ /dev/null @@ -1,190 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.rest.namespaces/subscribers-helper" -title: "SubscribersHelper" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.REST.Namespaces.SubscribersHelper" - parent: "SignalWire.REST.Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs" - visibility: "public" ---- -# `SubscribersHelper` - -Subscribers helper exposing per-subscriber SIP-endpoint operations. - -Mirrors Python's `SubscribersResource` SIP endpoint methods. - -## Signature - -```dotnet -public class SubscribersHelper -``` - -## Properties - - - -## Methods - -### CreateSipEndpointAsync(string, Dictionary\) - -#### Signature - -```dotnet -public Task> CreateSipEndpointAsync(string subscriberId, Dictionary kwargs) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) - -Line 130. - -*** - -### DeleteSipEndpointAsync(string, string) - -#### Signature - -```dotnet -public Task> DeleteSipEndpointAsync(string subscriberId, string endpointId) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) - -Line 139. - -*** - -### GetSipEndpointAsync(string, string) - -#### Signature - -```dotnet -public Task> GetSipEndpointAsync(string subscriberId, string endpointId) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) - -Line 133. - -*** - -### ListSipEndpointsAsync(string, Dictionary\?) - -#### Signature - -```dotnet -public Task> ListSipEndpointsAsync(string subscriberId, Dictionary? queryParams = null) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) - -Line 127. - -*** - -### SubscribersHelper(HttpClient, string) - -#### Signature - -```dotnet -public SubscribersHelper(HttpClient client, string basePath) -``` - -#### Parameters - - - - - -#### Source - -[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) - -Line 116. - -*** - -### UpdateSipEndpointAsync(string, string, Dictionary\) - -#### Signature - -```dotnet -public Task> UpdateSipEndpointAsync(string subscriberId, string endpointId, Dictionary kwargs) -``` - -#### Parameters - - - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) - -Line 136. - -## Source - -[`src/SignalWire/REST/Namespaces/FabricExtras.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/FabricExtras.cs) - -Line 111. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/video-conference-tokens/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/video-conference-tokens/index.mdx deleted file mode 100644 index 9b0eaf7d4f..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/video-conference-tokens/index.mdx +++ /dev/null @@ -1,104 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.rest.namespaces/video-conference-tokens" -title: "VideoConferenceTokens" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.REST.Namespaces.VideoConferenceTokens" - parent: "SignalWire.REST.Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs" - visibility: "public" ---- -# `VideoConferenceTokens` - -Video conference tokens: get + reset. - -## Signature - -```dotnet -public class VideoConferenceTokens -``` - -## Properties - - - -## Methods - -### GetAsync(string) - -#### Signature - -```dotnet -public Task> GetAsync(string tokenId) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) - -Line 177. - -*** - -### ResetAsync(string) - -#### Signature - -```dotnet -public Task> ResetAsync(string tokenId) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) - -Line 180. - -*** - -### VideoConferenceTokens(HttpClient, string) - -#### Signature - -```dotnet -public VideoConferenceTokens(HttpClient client, string basePath) -``` - -#### Parameters - - - - - -#### Source - -[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) - -Line 166. - -## Source - -[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) - -Line 161. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/video-conferences/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/video-conferences/index.mdx deleted file mode 100644 index b9b09fa7dd..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/video-conferences/index.mdx +++ /dev/null @@ -1,166 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.rest.namespaces/video-conferences" -title: "VideoConferences" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.REST.Namespaces.VideoConferences" - parent: "SignalWire.REST.Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs" - visibility: "public" ---- -# `VideoConferences` - -Video conferences (CRUD with PUT update + tokens/streams subresources). - -## Signature - -```dotnet -public class VideoConferences : CrudResource -``` - -## Inheritance - -**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/signal-wire.rest/crud-resource) - -## Methods - -### CreateStreamAsync(string, Dictionary\) - -#### Signature - -```dotnet -public Task> CreateStreamAsync(string conferenceId, Dictionary kwargs) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) - -Line 156. - -*** - -### ListConferenceTokensAsync(string, Dictionary\?) - -#### Signature - -```dotnet -public Task> ListConferenceTokensAsync(string conferenceId, Dictionary? queryParams = null) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) - -Line 150. - -*** - -### ListStreamsAsync(string, Dictionary\?) - -#### Signature - -```dotnet -public Task> ListStreamsAsync(string conferenceId, Dictionary? queryParams = null) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) - -Line 153. - -*** - -### UpdateAsync(string, Dictionary\, CancellationToken) - -Update a resource by ID (PUT basePath/\{id\}). - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override Task> UpdateAsync(string id, Dictionary kwargs, CancellationToken cancellationToken = default) -``` - -#### Parameters - - - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) - -Line 146. - -*** - -### VideoConferences(HttpClient, string) - -#### Signature - -```dotnet -public VideoConferences(HttpClient client, string basePath) -``` - -#### Parameters - - - - - -#### Source - -[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) - -Line 144. - -## Source - -[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) - -Line 142. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/video-room-recordings/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/video-room-recordings/index.mdx deleted file mode 100644 index e5ac24f8a1..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/video-room-recordings/index.mdx +++ /dev/null @@ -1,154 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.rest.namespaces/video-room-recordings" -title: "VideoRoomRecordings" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.REST.Namespaces.VideoRoomRecordings" - parent: "SignalWire.REST.Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs" - visibility: "public" ---- -# `VideoRoomRecordings` - -Video room recordings: list, get, delete, list\_events. - -## Signature - -```dotnet -public class VideoRoomRecordings -``` - -## Properties - - - -## Methods - -### DeleteAsync(string) - -#### Signature - -```dotnet -public Task> DeleteAsync(string recordingId) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) - -Line 134. - -*** - -### GetAsync(string) - -#### Signature - -```dotnet -public Task> GetAsync(string recordingId) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) - -Line 131. - -*** - -### ListAsync(Dictionary\?) - -#### Signature - -```dotnet -public Task> ListAsync(Dictionary? queryParams = null) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) - -Line 128. - -*** - -### ListEventsAsync(string, Dictionary\?) - -#### Signature - -```dotnet -public Task> ListEventsAsync(string recordingId, Dictionary? queryParams = null) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) - -Line 137. - -*** - -### VideoRoomRecordings(HttpClient, string) - -#### Signature - -```dotnet -public VideoRoomRecordings(HttpClient client, string basePath) -``` - -#### Parameters - - - - - -#### Source - -[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) - -Line 117. - -## Source - -[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) - -Line 112. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/video-room-sessions/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/video-room-sessions/index.mdx deleted file mode 100644 index cf04517a2e..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/video-room-sessions/index.mdx +++ /dev/null @@ -1,182 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.rest.namespaces/video-room-sessions" -title: "VideoRoomSessions" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.REST.Namespaces.VideoRoomSessions" - parent: "SignalWire.REST.Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs" - visibility: "public" ---- -# `VideoRoomSessions` - -Video room sessions: list, get, list\_events/\_members/\_recordings. - -## Signature - -```dotnet -public class VideoRoomSessions -``` - -## Properties - - - -## Methods - -### GetAsync(string) - -#### Signature - -```dotnet -public Task> GetAsync(string sessionId) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) - -Line 98. - -*** - -### ListAsync(Dictionary\?) - -#### Signature - -```dotnet -public Task> ListAsync(Dictionary? queryParams = null) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) - -Line 95. - -*** - -### ListEventsAsync(string, Dictionary\?) - -#### Signature - -```dotnet -public Task> ListEventsAsync(string sessionId, Dictionary? queryParams = null) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) - -Line 101. - -*** - -### ListMembersAsync(string, Dictionary\?) - -#### Signature - -```dotnet -public Task> ListMembersAsync(string sessionId, Dictionary? queryParams = null) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) - -Line 104. - -*** - -### ListRecordingsAsync(string, Dictionary\?) - -#### Signature - -```dotnet -public Task> ListRecordingsAsync(string sessionId, Dictionary? queryParams = null) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) - -Line 107. - -*** - -### VideoRoomSessions(HttpClient, string) - -#### Signature - -```dotnet -public VideoRoomSessions(HttpClient client, string basePath) -``` - -#### Parameters - - - - - -#### Source - -[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) - -Line 84. - -## Source - -[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) - -Line 79. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/video-room-tokens/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/video-room-tokens/index.mdx deleted file mode 100644 index f09a75fc78..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/video-room-tokens/index.mdx +++ /dev/null @@ -1,80 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.rest.namespaces/video-room-tokens" -title: "VideoRoomTokens" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.REST.Namespaces.VideoRoomTokens" - parent: "SignalWire.REST.Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs" - visibility: "public" ---- -# `VideoRoomTokens` - -Video room tokens (create-only). - -## Signature - -```dotnet -public class VideoRoomTokens -``` - -## Properties - - - -## Methods - -### CreateAsync(Dictionary\) - -#### Signature - -```dotnet -public Task> CreateAsync(Dictionary kwargs) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) - -Line 74. - -*** - -### VideoRoomTokens(HttpClient, string) - -#### Signature - -```dotnet -public VideoRoomTokens(HttpClient client, string basePath) -``` - -#### Parameters - - - - - -#### Source - -[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) - -Line 66. - -## Source - -[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) - -Line 61. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/video-rooms/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/video-rooms/index.mdx deleted file mode 100644 index bf3ee02bba..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/video-rooms/index.mdx +++ /dev/null @@ -1,140 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.rest.namespaces/video-rooms" -title: "VideoRooms" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.REST.Namespaces.VideoRooms" - parent: "SignalWire.REST.Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs" - visibility: "public" ---- -# `VideoRooms` - -Video rooms (CRUD + streams sub-resource). - -## Signature - -```dotnet -public class VideoRooms : CrudResource -``` - -## Inheritance - -**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/signal-wire.rest/crud-resource) - -## Methods - -### CreateStreamAsync(string, Dictionary\) - -#### Signature - -```dotnet -public Task> CreateStreamAsync(string roomId, Dictionary kwargs) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) - -Line 56. - -*** - -### ListStreamsAsync(string, Dictionary\?) - -#### Signature - -```dotnet -public Task> ListStreamsAsync(string roomId, Dictionary? queryParams = null) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) - -Line 53. - -*** - -### UpdateAsync(string, Dictionary\, CancellationToken) - -Update via PUT (matching Python's \_update\_method = "PUT"). - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override Task> UpdateAsync(string id, Dictionary kwargs, CancellationToken cancellationToken = default) -``` - -#### Parameters - - - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) - -Line 49. - -*** - -### VideoRooms(HttpClient, string) - -#### Signature - -```dotnet -public VideoRooms(HttpClient client, string basePath) -``` - -#### Parameters - - - - - -#### Source - -[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) - -Line 46. - -## Source - -[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) - -Line 44. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/video-streams/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/video-streams/index.mdx deleted file mode 100644 index b31adf13aa..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/video-streams/index.mdx +++ /dev/null @@ -1,130 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.rest.namespaces/video-streams" -title: "VideoStreams" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.REST.Namespaces.VideoStreams" - parent: "SignalWire.REST.Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs" - visibility: "public" ---- -# `VideoStreams` - -Video streams: get, update (PUT), delete. - -## Signature - -```dotnet -public class VideoStreams -``` - -## Properties - - - -## Methods - -### DeleteAsync(string) - -#### Signature - -```dotnet -public Task> DeleteAsync(string streamId) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) - -Line 206. - -*** - -### GetAsync(string) - -#### Signature - -```dotnet -public Task> GetAsync(string streamId) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) - -Line 200. - -*** - -### UpdateAsync(string, Dictionary\) - -#### Signature - -```dotnet -public Task> UpdateAsync(string streamId, Dictionary kwargs) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) - -Line 203. - -*** - -### VideoStreams(HttpClient, string) - -#### Signature - -```dotnet -public VideoStreams(HttpClient client, string basePath) -``` - -#### Parameters - - - - - -#### Source - -[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) - -Line 190. - -## Source - -[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) - -Line 185. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/video/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/video/index.mdx deleted file mode 100644 index 0cc7ae60e7..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/video/index.mdx +++ /dev/null @@ -1,78 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.rest.namespaces/video" -title: "Video" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.REST.Namespaces.Video" - parent: "SignalWire.REST.Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs" - visibility: "public" ---- -# `Video` - -Video API namespace. - -Mirrors Python `signalwire.rest.namespaces.video.VideoNamespace` — -rooms, room sessions, room recordings, conferences, conference tokens, -streams. - -<p>The legacy ``client.Video.List() / Create / Get / Delete`` surface -(which targeted ``/api/video/rooms``) is preserved by inheriting from -<xref href="SignalWire.REST.CrudResource" data-throw-if-not-resolved="false"></xref>.</p> - -## Signature - -```dotnet -public class Video : CrudResource -``` - -## Inheritance - -**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/signal-wire.rest/crud-resource) - -## Properties - - - - - - - - - - - - - - - -## Methods - -### Video(HttpClient) - -#### Signature - -```dotnet -public Video(HttpClient client) -``` - -#### Parameters - - - -#### Source - -[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) - -Line 32. - -## Source - -[`src/SignalWire/REST/Namespaces/Video.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Video.cs) - -Line 20. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/voice-logs/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/voice-logs/index.mdx deleted file mode 100644 index 6d92359dff..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.rest.namespaces/voice-logs/index.mdx +++ /dev/null @@ -1,130 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.rest.namespaces/voice-logs" -title: "VoiceLogs" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.REST.Namespaces.VoiceLogs" - parent: "SignalWire.REST.Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Logs.cs" - visibility: "public" ---- -# `VoiceLogs` - -Voice log queries with events sub-collection. - -## Signature - -```dotnet -public class VoiceLogs -``` - -## Properties - - - -## Methods - -### GetAsync(string) - -#### Signature - -```dotnet -public Task> GetAsync(string logId) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Logs.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Logs.cs) - -Line 78. - -*** - -### ListAsync(Dictionary\?) - -#### Signature - -```dotnet -public Task> ListAsync(Dictionary? queryParams = null) -``` - -#### Parameters - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Logs.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Logs.cs) - -Line 75. - -*** - -### ListEventsAsync(string, Dictionary\?) - -#### Signature - -```dotnet -public Task> ListEventsAsync(string logId, Dictionary? queryParams = null) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/Namespaces/Logs.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Logs.cs) - -Line 81. - -*** - -### VoiceLogs(HttpClient, string) - -#### Signature - -```dotnet -public VoiceLogs(HttpClient client, string basePath) -``` - -#### Parameters - - - - - -#### Source - -[`src/SignalWire/REST/Namespaces/Logs.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Logs.cs) - -Line 64. - -## Source - -[`src/SignalWire/REST/Namespaces/Logs.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/Namespaces/Logs.cs) - -Line 59. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest/crud-resource/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest/crud-resource/index.mdx deleted file mode 100644 index 1fcd8d3e42..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.rest/crud-resource/index.mdx +++ /dev/null @@ -1,239 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.rest/crud-resource" -title: "CrudResource" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.REST.CrudResource" - parent: "SignalWire.REST" - module: "SignalWire.REST" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/CrudResource.cs" - visibility: "public" ---- -# `CrudResource` - -Generic CRUD wrapper around an <xref href="SignalWire.REST.HttpClient" data-throw-if-not-resolved="false"></xref> and a base API path. - -Provides List / Create / Get / Update / Delete for any REST resource that -follows the standard SignalWire collection+item URL pattern. - -## Signature - -```dotnet -public class CrudResource -``` - -## Properties - - - - - -## Methods - -### CreateAsync(Dictionary\, CancellationToken) - -Create a new resource (POST basePath). - -**Modifiers:** `virtual` - -#### Signature - -```dotnet -public virtual Task> CreateAsync(Dictionary data, CancellationToken cancellationToken = default) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/CrudResource.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/CrudResource.cs) - -Line 35. - -*** - -### CrudResource(HttpClient, string) - -#### Signature - -```dotnet -public CrudResource(HttpClient client, string basePath) -``` - -#### Parameters - - - - - -#### Source - -[`src/SignalWire/REST/CrudResource.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/CrudResource.cs) - -Line 13. - -*** - -### DeleteAsync(string, CancellationToken) - -Delete a resource by ID (DELETE basePath/\{id\}). - -**Modifiers:** `virtual` - -#### Signature - -```dotnet -public virtual Task> DeleteAsync(string id, CancellationToken cancellationToken = default) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/CrudResource.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/CrudResource.cs) - -Line 58. - -*** - -### GetAsync(string, CancellationToken) - -Retrieve a single resource by ID (GET basePath/\{id\}). - -**Modifiers:** `virtual` - -#### Signature - -```dotnet -public virtual Task> GetAsync(string id, CancellationToken cancellationToken = default) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/CrudResource.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/CrudResource.cs) - -Line 43. - -*** - -### ListAsync(Dictionary\?, CancellationToken) - -List resources (GET basePath). - -**Modifiers:** `virtual` - -#### Signature - -```dotnet -public virtual Task> ListAsync(Dictionary? queryParams = null, CancellationToken cancellationToken = default) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/CrudResource.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/CrudResource.cs) - -Line 27. - -*** - -### Path(params string\[]) - -Build a full path by appending segments to the base path. - -#### Signature - -```dotnet -protected string Path(params string[] parts) -``` - -#### Parameters - - - -#### Returns - -`string` - -#### Source - -[`src/SignalWire/REST/CrudResource.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/CrudResource.cs) - -Line 20. - -*** - -### UpdateAsync(string, Dictionary\, CancellationToken) - -Update a resource by ID (PUT basePath/\{id\}). - -**Modifiers:** `virtual` - -#### Signature - -```dotnet -public virtual Task> UpdateAsync(string id, Dictionary data, CancellationToken cancellationToken = default) -``` - -#### Parameters - - - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/CrudResource.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/CrudResource.cs) - -Line 50. - -## Source - -[`src/SignalWire/REST/CrudResource.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/CrudResource.cs) - -Line 8. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest/crud-with-addresses/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest/crud-with-addresses/index.mdx deleted file mode 100644 index d2755b311c..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.rest/crud-with-addresses/index.mdx +++ /dev/null @@ -1,86 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.rest/crud-with-addresses" -title: "CrudWithAddresses" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.REST.CrudWithAddresses" - parent: "SignalWire.REST" - module: "SignalWire.REST" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/CrudWithAddresses.cs" - visibility: "public" ---- -# `CrudWithAddresses` - -## Signature - -```dotnet -public class CrudWithAddresses : CrudResource -``` - -## Inheritance - -**Extends:** [SignalWire.REST.CrudResource](/docs/sdk-reference/reference/dotnet/signal-wire.rest/crud-resource) - -## Methods - -### CrudWithAddresses(HttpClient, string) - -#### Signature - -```dotnet -public CrudWithAddresses(HttpClient client, string basePath) -``` - -#### Parameters - - - - - -#### Source - -[`src/SignalWire/REST/CrudWithAddresses.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/CrudWithAddresses.cs) - -Line 13. - -*** - -### ListAddressesAsync(string, Dictionary\?) - -List the addresses sub-collection for a given resource. -(Python parity: -`CrudWithAddresses.list_addresses(resource_id, **params)`.) - -**Modifiers:** `virtual` - -#### Signature - -```dotnet -public virtual Task> ListAddressesAsync(string resourceId, Dictionary? queryParams = null) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/CrudWithAddresses.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/CrudWithAddresses.cs) - -Line 19. - -## Source - -[`src/SignalWire/REST/CrudWithAddresses.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/CrudWithAddresses.cs) - -Line 11. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest/http-client/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest/http-client/index.mdx deleted file mode 100644 index 52c4a5a59c..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.rest/http-client/index.mdx +++ /dev/null @@ -1,315 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.rest/http-client" -title: "HttpClient" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.REST.HttpClient" - parent: "SignalWire.REST" - module: "SignalWire.REST" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/HttpClient.cs" - visibility: "public" ---- -# `HttpClient` - -Low-level HTTP client for SignalWire REST APIs. - -Uses <xref href="System.Net.Http.HttpClient" data-throw-if-not-resolved="false"></xref> with Basic Auth, -and returns parsed JSON responses as dictionaries. - -## Signature - -```dotnet -public class HttpClient : IDisposable -``` - -## Inheritance - -**Implements:** `System.IDisposable` - -## Properties - - - - - - - - - -## Methods - -### DeleteAsync(string, CancellationToken) - -DELETE. - -**Modifiers:** `virtual` - -#### Signature - -```dotnet -public virtual Task> DeleteAsync(string path, CancellationToken cancellationToken = default) -``` - -#### Parameters - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/HttpClient.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/HttpClient.cs) - -Line 91. - -*** - -### Dispose - -Release the underlying <xref href="System.Net.Http.HttpClient" data-throw-if-not-resolved="false"></xref> — but -ONLY when this object created it (`_ownsHttp`). A caller-injected -HttpClient is left untouched: its lifetime belongs to whoever passed it -in. Idempotent. - -#### Signature - - - - ```dotnet - public void Dispose() - ``` - - - - ```dotnet - protected virtual void Dispose(bool disposing) - ``` - - - -#### Parameters (Overload 2) - - - -#### Source - -[`src/SignalWire/REST/HttpClient.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/HttpClient.cs) - -Line 280. - -*** - -### GetAsync(string, Dictionary\?, CancellationToken) - -GET with optional query-string parameters. - -**Modifiers:** `virtual` - -#### Signature - -```dotnet -public virtual Task> GetAsync(string path, Dictionary? queryParams = null, CancellationToken cancellationToken = default) -``` - -#### Parameters - - - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/HttpClient.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/HttpClient.cs) - -Line 55. - -*** - -### HttpClient - -#### Signature - - - - ```dotnet - public HttpClient(string projectId, string token, string baseUrl) - ``` - - - - ```dotnet - public HttpClient(string projectId, string token, string baseUrl, HttpClient? httpClient) - ``` - - - -#### Parameters (Overload 1) - - - - - - - -#### Parameters (Overload 2) - - - - - - - - - -#### Source - -[`src/SignalWire/REST/HttpClient.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/HttpClient.cs) - -Line 23. - -*** - -### ListAllAsync(string, Dictionary\?, CancellationToken) - -Return pages by following "next" links automatically. -Expects \{ "data": \[...], "links": \{ "next": "..." \} \}. - -#### Signature - -```dotnet -public IAsyncEnumerable>> ListAllAsync(string path, Dictionary? queryParams = null, CancellationToken cancellationToken = default) -``` - -#### Parameters - - - - - - - -#### Returns - -`IAsyncEnumerable>>` - -#### Source - -[`src/SignalWire/REST/HttpClient.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/HttpClient.cs) - -Line 106. - -*** - -### PatchAsync(string, Dictionary\?, CancellationToken) - -PATCH with JSON body. - -**Modifiers:** `virtual` - -#### Signature - -```dotnet -public virtual Task> PatchAsync(string path, Dictionary? data = null, CancellationToken cancellationToken = default) -``` - -#### Parameters - - - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/HttpClient.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/HttpClient.cs) - -Line 82. - -*** - -### PostAsync(string, Dictionary\?, CancellationToken) - -POST with JSON body. - -**Modifiers:** `virtual` - -#### Signature - -```dotnet -public virtual Task> PostAsync(string path, Dictionary? data = null, CancellationToken cancellationToken = default) -``` - -#### Parameters - - - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/HttpClient.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/HttpClient.cs) - -Line 64. - -*** - -### PutAsync(string, Dictionary\?, CancellationToken) - -PUT with JSON body. - -**Modifiers:** `virtual` - -#### Signature - -```dotnet -public virtual Task> PutAsync(string path, Dictionary? data = null, CancellationToken cancellationToken = default) -``` - -#### Parameters - - - - - - - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/HttpClient.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/HttpClient.cs) - -Line 73. - -## Source - -[`src/SignalWire/REST/HttpClient.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/HttpClient.cs) - -Line 12. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest/index.mdx deleted file mode 100644 index 7077094d91..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.rest/index.mdx +++ /dev/null @@ -1,38 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.rest" -title: "SignalWire.REST" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "module" - language: "dotnet" - qualified_name: "SignalWire.REST" ---- -# `SignalWire.REST` - -## Classes - - - - Generic CRUD wrapper around an <xref href="SignalWire.REST.HttpClient" data-throw-if-not-resolved="false"></xref> and a base API path. Provides List / Create / Get / Update / Delete for any REST resource that follows the standard SignalWire collection+item URL pattern. - - - - - - Low-level HTTP client for SignalWire REST APIs. Uses <xref href="System.Net.Http.HttpClient" data-throw-if-not-resolved="false"></xref> with Basic Auth, and returns parsed JSON responses as dictionaries. - - - - Walks paged HTTP responses by following `links.next` cursors. Mirrors Python `signalwire.rest._pagination.PaginatedIterator` — constructor records inputs without fetching; iteration triggers the first fetch and continues until a page is returned without a `links.next` cursor. - - - - Top-level SignalWire REST client. Provides lazy access to every API namespace (fabric, calling, phone\_numbers, datasphere, video, compat, etc.). Credentials can be supplied explicitly or pulled from environment variables. - - - - Exception thrown when a SignalWire REST API call returns a non-2xx status or encounters a transport-level error. - - diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest/paginated-iterator/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest/paginated-iterator/index.mdx deleted file mode 100644 index d718d3fba0..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.rest/paginated-iterator/index.mdx +++ /dev/null @@ -1,131 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.rest/paginated-iterator" -title: "PaginatedIterator" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.REST.PaginatedIterator" - parent: "SignalWire.REST" - module: "SignalWire.REST" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/PaginatedIterator.cs" - visibility: "public" ---- -# `PaginatedIterator` - -Walks paged HTTP responses by following `links.next` cursors. - -Mirrors Python `signalwire.rest._pagination.PaginatedIterator` — -constructor records inputs without fetching; iteration triggers -the first fetch and continues until a page is returned without a -`links.next` cursor. - -## Signature - -```dotnet -public class PaginatedIterator : IAsyncEnumerable> -``` - -## Inheritance - -**Implements:** `IAsyncEnumerable>` - -## Properties - - - - - - - - - - - - - - - -## Methods - -### GetAsyncEnumerator(CancellationToken) - -Async-enumerable adapter so callers can write -`await foreach (var item in iterator)`. - -#### Signature - -```dotnet -public IAsyncEnumerator> GetAsyncEnumerator(CancellationToken cancellationToken = default) -``` - -#### Parameters - - - -#### Returns - -`IAsyncEnumerator>` - -#### Source - -[`src/SignalWire/REST/PaginatedIterator.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/PaginatedIterator.cs) - -Line 131. - -*** - -### NextAsync() - -Returns the next item, or throws InvalidOperationException -when exhausted (mirroring Python's StopIteration). - -#### Signature - -```dotnet -public Task> NextAsync() -``` - -#### Returns - -`System.Threading.Tasks.Task>` - -#### Source - -[`src/SignalWire/REST/PaginatedIterator.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/PaginatedIterator.cs) - -Line 55. - -*** - -### PaginatedIterator(HttpClient, string, Dictionary\?, string) - -#### Signature - -```dotnet -public PaginatedIterator(HttpClient http, string path, Dictionary? @params = null, string dataKey = "data") -``` - -#### Parameters - - - - - - - - - -#### Source - -[`src/SignalWire/REST/PaginatedIterator.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/PaginatedIterator.cs) - -Line 33. - -## Source - -[`src/SignalWire/REST/PaginatedIterator.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/PaginatedIterator.cs) - -Line 17. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest/rest-client/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest/rest-client/index.mdx deleted file mode 100644 index 118e5dfa4d..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.rest/rest-client/index.mdx +++ /dev/null @@ -1,199 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.rest/rest-client" -title: "RestClient" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.REST.RestClient" - parent: "SignalWire.REST" - module: "SignalWire.REST" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/RestClient.cs" - visibility: "public" ---- -# `RestClient` - -Top-level SignalWire REST client. - -Provides lazy access to every API namespace (fabric, calling, -phone\_numbers, datasphere, video, compat, etc.). Credentials can be -supplied explicitly or pulled from environment variables. - -## Signature - -```dotnet -public class RestClient : IDisposable -``` - -## Inheritance - -**Implements:** `System.IDisposable` - -## Properties - - - Addresses. - - - - - - Calling API (37 call-control commands). - - - - Chat tokens. - - - - Compatibility (Twilio-compatible LaML) API. - - - - Datasphere documents. - - - - Fabric API (sub-resources: subscribers, sip\_endpoints, call\_flows, ...). - - - - - - Imported phone numbers (create only). - - - - Logs (messages, voice, fax, conferences). - - - - Phone number lookup. - - - - Multi-factor authentication (sms/call/verify dispatch). - - - - Number groups (with membership operations). - - - - Phone numbers. - - - - Project management. - - - - - - PubSub tokens. - - - - Queues (Relay queues at /api/relay/rest/queues with member ops). - - - - Recordings (Relay recordings at /api/relay/rest/recordings). - - - - Registry (10DLC brands, campaigns, orders, numbers). - - - - Short codes (PUT for update). - - - - SIP profile (singleton at /api/relay/rest/sip\_profile; legacy plural-path /api/relay/rest/sip\_profiles preserved for existing tests via BasePath). - - - - - - - - Verified callers. - - - - Video rooms (Python-parity entry-point with sub-namespaces). - - -## Methods - -### Dispose - -Dispose the owned REST <xref href="SignalWire.REST.HttpClient" data-throw-if-not-resolved="false"></xref> (which, in turn, only -disposes its inner <xref href="System.Net.Http.HttpClient" data-throw-if-not-resolved="false"></xref> because it -created it). `RestClient` always constructs its own transport, so -it always owns it. Idempotent. - -#### Signature - - - - ```dotnet - public void Dispose() - ``` - - - - ```dotnet - protected virtual void Dispose(bool disposing) - ``` - - - -#### Parameters (Overload 2) - - - -#### Source - -[`src/SignalWire/REST/RestClient.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/RestClient.cs) - -Line 176. - -*** - -### RestClient(string, string, string) - -#### Signature - -```dotnet -public RestClient(string projectId = "", string token = "", string space = "") -``` - -#### Parameters - - - Project ID (falls back to SIGNALWIRE\_PROJECT\_ID env var). - - - - API token (falls back to SIGNALWIRE\_API\_TOKEN env var). - - - - Space host (falls back to SIGNALWIRE\_SPACE env var). - - -#### Source - -[`src/SignalWire/REST/RestClient.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/RestClient.cs) - -Line 48. - -## Source - -[`src/SignalWire/REST/RestClient.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/RestClient.cs) - -Line 11. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.rest/signal-wire-rest-error/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.rest/signal-wire-rest-error/index.mdx deleted file mode 100644 index fe48a9628e..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.rest/signal-wire-rest-error/index.mdx +++ /dev/null @@ -1,117 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.rest/signal-wire-rest-error" -title: "SignalWireRestError" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.REST.SignalWireRestError" - parent: "SignalWire.REST" - module: "SignalWire.REST" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/SignalWireRestError.cs" - visibility: "public" ---- -# `SignalWireRestError` - -Exception thrown when a SignalWire REST API call returns a non-2xx status -or encounters a transport-level error. - -**Modifiers:** `sealed` - -## Signature - -```dotnet -public sealed class SignalWireRestError : Exception, ISerializable -``` - -## Inheritance - -**Extends:** `System.Exception` - -**Implements:** `System.Runtime.Serialization.ISerializable` - -## Properties - - - Raw response body from the server. - - - - HTTP status code from the response (0 for transport errors). - - -## Methods - -### SignalWireRestError - -#### Signature - - - - ```dotnet - public SignalWireRestError(string message, int statusCode, string responseBody) - ``` - - - - ```dotnet - public SignalWireRestError(string message, int statusCode, string responseBody, Exception innerException) - ``` - - - -#### Parameters (Overload 1) - - - - - - - -#### Parameters (Overload 2) - - - - - - - - - -#### Source - -[`src/SignalWire/REST/SignalWireRestError.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/SignalWireRestError.cs) - -Line 14. - -*** - -### ToString() - -Creates and returns a string representation of the current exception. - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override string ToString() -``` - -#### Returns - -`string` — A string representation of the current exception. - -#### Source - -[`src/SignalWire/REST/SignalWireRestError.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/SignalWireRestError.cs) - -Line 28. - -## Source - -[`src/SignalWire/REST/SignalWireRestError.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/REST/SignalWireRestError.cs) - -Line 6. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.security/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.security/index.mdx deleted file mode 100644 index 487d795290..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.security/index.mdx +++ /dev/null @@ -1,28 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.security" -title: "SignalWire.Security" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "module" - language: "dotnet" - qualified_name: "SignalWire.Security" ---- -# `SignalWire.Security` - -## Classes - - - - Generates and validates HMAC-SHA256 signed session tokens for SWAIG function calls. Each instance holds an independent 32-byte random secret. - - - - HTTP middleware that validates the `X-SignalWire-Signature` header on incoming requests using <xref href="SignalWire.Security.WebhookValidator" data-throw-if-not-resolved="false"></xref>. Designed for the .NET port's HttpListener-based dispatch surface; adapts the same contract Python's FastAPI dependency provides. <p>Use <xref href="SignalWire.Security.WebhookValidationMiddleware.Validate(System.String%2cSystem.String%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.String%7d%2cSystem.String%2cSystem.String%2cSystem.Int32)" data-throw-if-not-resolved="false"></xref> to short-circuit invalid requests with 403 before they reach an agent's POST handler. Returns null on success so the caller continues to dispatch.</p> <p>This is intentionally a non-async type: the underlying validator is pure CPU work and the dispatch surface uses synchronous strings.</p> - - - - Validates SignalWire webhook signatures for both Scheme A (RELAY/JSON, hex HMAC-SHA1 over `url + rawBody`) and Scheme B (Compat/cXML form, base64 HMAC-SHA1 over `url + sortedFormParams`) per `porting-sdk/webhooks.md`. The contract is byte-identical across all SignalWire SDK ports — see the cross-port test vectors in the spec. - - diff --git a/fern/products/sdk-reference/dotnet/signal-wire.security/session-manager/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.security/session-manager/index.mdx deleted file mode 100644 index 15f61344d3..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.security/session-manager/index.mdx +++ /dev/null @@ -1,158 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.security/session-manager" -title: "SessionManager" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.Security.SessionManager" - parent: "SignalWire.Security" - module: "SignalWire.Security" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Security/SessionManager.cs" - visibility: "public" ---- -# `SessionManager` - -Generates and validates HMAC-SHA256 signed session tokens for SWAIG function calls. -Each instance holds an independent 32-byte random secret. - -**Modifiers:** `sealed` - -## Signature - -```dotnet -public sealed class SessionManager -``` - -## Properties - - - Default token lifetime in seconds. - - - - Get the configured token expiry duration in seconds. - - -## Methods - -### CreateSession(string?) - -Create or confirm a session, returning the call ID. - -#### Signature - -```dotnet -public string CreateSession(string? callId = null) -``` - -#### Parameters - - - -#### Returns - -`string` - -#### Source - -[`src/SignalWire/Security/SessionManager.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Security/SessionManager.cs) - -Line 30. - -*** - -### CreateToken(string, string) - -Generate an HMAC-SHA256 signed token bound to a function name and call ID. - -#### Signature - -```dotnet -public string CreateToken(string functionName, string callId) -``` - -#### Parameters - - - The function name to bind into the token. - - - - The call ID to bind into the token. - - -#### Returns - -`string` — A base64url-encoded token string. - -#### Source - -[`src/SignalWire/Security/SessionManager.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Security/SessionManager.cs) - -Line 41. - -*** - -### SessionManager(int) - -#### Signature - -```dotnet -public SessionManager(int tokenExpirySecs = 3600) -``` - -#### Parameters - - - -#### Source - -[`src/SignalWire/Security/SessionManager.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Security/SessionManager.cs) - -Line 17. - -*** - -### ValidateToken(string, string, string) - -Validate a token against the expected function name and call ID. -All comparisons use timing-safe equality checks to prevent side-channel attacks. - -#### Signature - -```dotnet -public bool ValidateToken(string functionName, string callId, string token) -``` - -#### Parameters - - - The expected function name. - - - - The expected call ID. - - - - The base64url-encoded token to validate. - - -#### Returns - -`bool` — `true` if the token is valid and not expired. - -#### Source - -[`src/SignalWire/Security/SessionManager.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Security/SessionManager.cs) - -Line 61. - -## Source - -[`src/SignalWire/Security/SessionManager.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Security/SessionManager.cs) - -Line 9. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.security/webhook-validation-middleware/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.security/webhook-validation-middleware/index.mdx deleted file mode 100644 index b523810cbf..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.security/webhook-validation-middleware/index.mdx +++ /dev/null @@ -1,195 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.security/webhook-validation-middleware" -title: "WebhookValidationMiddleware" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.Security.WebhookValidationMiddleware" - parent: "SignalWire.Security" - module: "SignalWire.Security" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Security/WebhookValidationMiddleware.cs" - visibility: "public" ---- -# `WebhookValidationMiddleware` - -HTTP middleware that validates the `X-SignalWire-Signature` header -on incoming requests using <xref href="SignalWire.Security.WebhookValidator" data-throw-if-not-resolved="false"></xref>. Designed for -the .NET port's HttpListener-based dispatch surface; adapts the same -contract Python's FastAPI dependency provides. - -<p>Use <xref href="SignalWire.Security.WebhookValidationMiddleware.Validate(System.String%2cSystem.String%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.String%7d%2cSystem.String%2cSystem.String%2cSystem.Int32)" data-throw-if-not-resolved="false"></xref> to short-circuit invalid requests with -403 before they reach an agent's POST handler. Returns null on success -so the caller continues to dispatch.</p> - -<p>This is intentionally a non-async type: the underlying validator -is pure CPU work and the dispatch surface uses synchronous strings.</p> - -**Modifiers:** `sealed` - -## Signature - -```dotnet -public sealed class WebhookValidationMiddleware -``` - -## Properties - - - The canonical SignalWire signature header name. - - - - Legacy alias for cXML/Twilio-compat callers. - - -## Methods - -### ExtractSignatureHeader(Dictionary\) - -Pull `X-SignalWire-Signature` from request headers, or the -`X-Twilio-Signature` alias for cXML/Compat callers. Header -lookups are case-insensitive (proxies / browsers vary). - -**Modifiers:** `static` - -#### Signature - -```dotnet -public static string? ExtractSignatureHeader(Dictionary headers) -``` - -#### Parameters - - - -#### Returns - -`string` - -#### Source - -[`src/SignalWire/Security/WebhookValidationMiddleware.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Security/WebhookValidationMiddleware.cs) - -Line 134. - -*** - -### ReconstructUrl(Dictionary\, string, string?, int) - -Reconstruct the public URL SignalWire POSTed to. Resolution order: - -<ol><li>`SWML_PROXY_URL_BASE` env var (joined with path + query).</li><li>`X-Forwarded-Proto` / `X-Forwarded-Host` headers - when `trustProxy=true`.</li><li>`http://hostFallback:portFallback{path}` as a last-resort - local construction.</li></ol> - -#### Signature - -```dotnet -public string ReconstructUrl(Dictionary headers, string path, string? hostFallback = null, int portFallback = 0) -``` - -#### Parameters - - - - - - - - - -#### Returns - -`string` - -#### Source - -[`src/SignalWire/Security/WebhookValidationMiddleware.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Security/WebhookValidationMiddleware.cs) - -Line 154. - -*** - -### Validate(string, string, Dictionary\, string?, string?, int) - -Validate the incoming request and return a 403 short-circuit -response if the signature is missing / invalid. Returns null when -the request passed validation — caller proceeds to the real handler. - -**Remarks:** The raw body is the caller's <code class="paramref">body</code> string verbatim; -the caller is expected to capture the body once (before any JSON / -form parser consumes the stream) and pass it here. The -HttpListenerContext dispatcher in -`SignalWire.SWML.Service.Run` already does this, so AgentBase -and standalone HttpListener integrations can wire it in directly. - -#### Signature - -```dotnet -public (int Status, Dictionary Headers, string Body)? Validate(string method, string path, Dictionary headers, string? body, string? hostFallback = null, int portFallback = 0) -``` - -#### Parameters - - - - - - - - - - - - - -#### Returns - -`System.Nullable,string>>` - -#### Source - -[`src/SignalWire/Security/WebhookValidationMiddleware.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Security/WebhookValidationMiddleware.cs) - -Line 96. - -*** - -### WebhookValidationMiddleware(string, bool) - -Construct a middleware bound to a single signing key. - -#### Signature - -```dotnet -public WebhookValidationMiddleware(string signingKey, bool trustProxy = false) -``` - -#### Parameters - - - The customer's Signing Key from the SignalWire Dashboard. Required, non-empty. Treated as a secret — never logged or echoed. - - - - When true, honor `X-Forwarded-Proto` / `X-Forwarded-Host` when reconstructing the URL. Default false because proxy headers are spoofable; opt in only when you control the proxy chain. - - -#### Throws - -- `System.ArgumentException` — Thrown when <code class="paramref">signingKey</code> is null or empty. - -#### Source - -[`src/SignalWire/Security/WebhookValidationMiddleware.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Security/WebhookValidationMiddleware.cs) - -Line 73. - -## Source - -[`src/SignalWire/Security/WebhookValidationMiddleware.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Security/WebhookValidationMiddleware.cs) - -Line 47. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.security/webhook-validator/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.security/webhook-validator/index.mdx deleted file mode 100644 index 6154af674c..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.security/webhook-validator/index.mdx +++ /dev/null @@ -1,128 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.security/webhook-validator" -title: "WebhookValidator" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.Security.WebhookValidator" - parent: "SignalWire.Security" - module: "SignalWire.Security" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Security/WebhookValidator.cs" - visibility: "public" ---- -# `WebhookValidator` - -Validates SignalWire webhook signatures for both Scheme A (RELAY/JSON, -hex HMAC-SHA1 over `url + rawBody`) and Scheme B (Compat/cXML form, -base64 HMAC-SHA1 over `url + sortedFormParams`) per -`porting-sdk/webhooks.md`. The contract is byte-identical across all -SignalWire SDK ports — see the cross-port test vectors in the spec. - -**Modifiers:** `static` - -## Signature - -```dotnet -public static class WebhookValidator -``` - -## Methods - -### ValidateRequest(string, string?, string, object?) - -Legacy `@signalwire/compatibility-api` drop-in entry point. - -<p>If <code class="paramref">paramsOrRawBody</code> is a <xref href="System.String" data-throw-if-not-resolved="false"></xref>, -delegates to <xref href="SignalWire.Security.WebhookValidator.ValidateWebhookSignature(System.String%2cSystem.String%2cSystem.String%2cSystem.String)" data-throw-if-not-resolved="false"></xref> (Scheme A then -Scheme B with parsed form).</p> - -<p>If it's an <xref href="System.Collections.IDictionary" data-throw-if-not-resolved="false"></xref> or list of key/value pairs, -treats it as pre-parsed form params and runs Scheme B directly (with -URL port normalization).</p> - -**Modifiers:** `static` - -#### Signature - -```dotnet -public static bool ValidateRequest(string signingKey, string? signature, string url, object? paramsOrRawBody) -``` - -#### Parameters - - - - - - - - - -#### Returns - -`bool` - -#### Throws - -- `System.ArgumentException` — Thrown when <code class="paramref">signingKey</code> is null or empty, or when <code class="paramref">paramsOrRawBody</code> is neither a string nor a dictionary/list of params. - -#### Source - -[`src/SignalWire/Security/WebhookValidator.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Security/WebhookValidator.cs) - -Line 147. - -*** - -### ValidateWebhookSignature(string, string?, string, string?) - -Validate a SignalWire webhook signature against both schemes. - -**Modifiers:** `static` - -#### Signature - -```dotnet -public static bool ValidateWebhookSignature(string signingKey, string? signature, string url, string? rawBody) -``` - -#### Parameters - - - Customer's Signing Key from the Dashboard. UTF-8 string, secret. Empty or null raises <xref href="System.ArgumentException" data-throw-if-not-resolved="false"></xref> — that's a programming error, not a validation failure. - - - - The `X-SignalWire-Signature` header value (or `X-Twilio-Signature` for cXML compat). Missing / empty returns `false` without throwing. - - - - The full URL SignalWire POSTed to (scheme, host, optional port, path, query). Must match what the platform saw — see the `URL reconstruction` section of `porting-sdk/webhooks.md`. - - - - The raw request body bytes as a UTF-8 string, BEFORE any JSON / form parsing. Re-serialization breaks the Scheme A digest. - - -#### Returns - -`bool` — `true` if the signature matches either Scheme A (hex JSON) or Scheme B (base64 form, with port-normalization variants and optional bodySHA256 fallback). `false` otherwise. - -#### Throws - -- `System.ArgumentException` — Thrown when <code class="paramref">signingKey</code> is null or empty. - -#### Source - -[`src/SignalWire/Security/WebhookValidator.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Security/WebhookValidator.cs) - -Line 69. - -## Source - -[`src/SignalWire/Security/WebhookValidator.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Security/WebhookValidator.cs) - -Line 34. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.server/agent-server/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.server/agent-server/index.mdx deleted file mode 100644 index 18a28d6575..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.server/agent-server/index.mdx +++ /dev/null @@ -1,304 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.server/agent-server" -title: "AgentServer" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.Server.AgentServer" - parent: "SignalWire.Server" - module: "SignalWire.Server" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/obj/Release/net8.0/System.Text.RegularExpressions.Generator/System.Text.RegularExpressions.Generator.RegexGenerator/RegexGenerator.g.cs" - visibility: "public" ---- -# `AgentServer` - -Multi-agent HTTP server. Registers agents at routes, dispatches requests by -longest prefix match, serves static files with path-traversal protection, -handles health/ready/root-index, and supports SIP routing. - -## Signature - -```dotnet -public class AgentServer -``` - -## Properties - - - - - - - The agent\_server logger. (Python parity: `AgentServer.logger` instance attribute.) - - - - -## Methods - -### AgentServer(string, int?, string) - -#### Signature - -```dotnet -public AgentServer(string host = "0.0.0.0", int? port = null, string logLevel = "info") -``` - -#### Parameters - - - - - - - -#### Source - -[`src/SignalWire/Server/AgentServer.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Server/AgentServer.cs) - -Line 46. - -*** - -### GetAgent(string) - -#### Signature - -```dotnet -public AgentBase? GetAgent(string route) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Agent.AgentBase` - -#### Source - -[`src/SignalWire/Server/AgentServer.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Server/AgentServer.cs) - -Line 88. - -*** - -### GetAgents() - -Return all registered routes (sorted). - -#### Signature - -```dotnet -public List GetAgents() -``` - -#### Returns - -`List` - -#### Source - -[`src/SignalWire/Server/AgentServer.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Server/AgentServer.cs) - -Line 81. - -*** - -### GetSipUsernameMapping() - -#### Signature - -```dotnet -public Dictionary GetSipUsernameMapping() -``` - -#### Returns - -`Dictionary` - -#### Source - -[`src/SignalWire/Server/AgentServer.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Server/AgentServer.cs) - -Line 120. - -*** - -### HandleRequest(string, string, Dictionary\?, string?) - -Handle an HTTP request. Returns (status, headers, body). - -#### Signature - -```dotnet -public (int Status, Dictionary Headers, string Body) HandleRequest(string method, string path, Dictionary? headers = null, string? body = null) -``` - -#### Parameters - - - - - - - - - -#### Returns - -`System.ValueTuple,string>` - -#### Source - -[`src/SignalWire/Server/AgentServer.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Server/AgentServer.cs) - -Line 146. - -*** - -### Register(AgentBase, string?) - -Register an agent at a route. Throws if the route is already taken. - -#### Signature - -```dotnet -public AgentServer Register(AgentBase agent, string? route = null) -``` - -#### Parameters - - - - - -#### Returns - -`SignalWire.Server.AgentServer` - -#### Source - -[`src/SignalWire/Server/AgentServer.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Server/AgentServer.cs) - -Line 62. - -*** - -### RegisterSipUsername(string, string) - -#### Signature - -```dotnet -public AgentServer RegisterSipUsername(string username, string route) -``` - -#### Parameters - - - - - -#### Returns - -`SignalWire.Server.AgentServer` - -#### Source - -[`src/SignalWire/Server/AgentServer.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Server/AgentServer.cs) - -Line 112. - -*** - -### ServeStatic(string, string) - -Serve static files from <code class="paramref">directory</code> under <code class="paramref">urlPrefix</code>. -Throws if the directory does not exist. - -#### Signature - -```dotnet -public AgentServer ServeStatic(string directory, string urlPrefix) -``` - -#### Parameters - - - - - -#### Returns - -`SignalWire.Server.AgentServer` - -#### Source - -[`src/SignalWire/Server/AgentServer.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Server/AgentServer.cs) - -Line 130. - -*** - -### SetupSipRouting(string, bool) - -Enable SIP routing on this server. `route` lets the caller pin -a non-default SIP route prefix; `autoMap` opts agents into -auto-mapped sip\_username = agent name. Matches Python's -`setup_sip_routing(self, route='/sip', auto_map=True)`. - -#### Signature - -```dotnet -public AgentServer SetupSipRouting(string route = "/sip", bool autoMap = true) -``` - -#### Parameters - - - - - -#### Returns - -`SignalWire.Server.AgentServer` - -#### Source - -[`src/SignalWire/Server/AgentServer.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Server/AgentServer.cs) - -Line 104. - -*** - -### Unregister(string) - -#### Signature - -```dotnet -public AgentServer Unregister(string route) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Server.AgentServer` - -#### Source - -[`src/SignalWire/Server/AgentServer.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Server/AgentServer.cs) - -Line 73. - -## Source - -[`src/SignalWire/obj/Release/net8.0/System.Text.RegularExpressions.Generator/System.Text.RegularExpressions.Generator.RegexGenerator/RegexGenerator.g.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/obj/Release/net8.0/System.Text.RegularExpressions.Generator/System.Text.RegularExpressions.Generator.RegexGenerator/RegexGenerator.g.cs) - -Line 8. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.server/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.server/index.mdx deleted file mode 100644 index 4a25b14c0e..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.server/index.mdx +++ /dev/null @@ -1,20 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.server" -title: "SignalWire.Server" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "module" - language: "dotnet" - qualified_name: "SignalWire.Server" ---- -# `SignalWire.Server` - -## Classes - - - - Multi-agent HTTP server. Registers agents at routes, dispatches requests by longest prefix match, serves static files with path-traversal protection, handles health/ready/root-index, and supports SIP routing. - - diff --git a/fern/products/sdk-reference/dotnet/signal-wire.serverless/adapter/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.serverless/adapter/index.mdx deleted file mode 100644 index ffce3b477f..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.serverless/adapter/index.mdx +++ /dev/null @@ -1,156 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.serverless/adapter" -title: "Adapter" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.Serverless.Adapter" - parent: "SignalWire.Serverless" - module: "SignalWire.Serverless" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Serverless/Adapter.cs" - visibility: "public" ---- -# `Adapter` - -Auto-detect and handle serverless environments (Lambda, Azure, GCF, CGI) -or fall back to the built-in ASP.NET server. - -**Modifiers:** `static` - -## Signature - -```dotnet -public static class Adapter -``` - -## Methods - -### Detect() - -Detect the current runtime environment. - -**Modifiers:** `static` - -#### Signature - -```dotnet -public static string Detect() -``` - -#### Returns - -`string` — One of "lambda", "gcf", "azure", "cgi", or "server". - -#### Source - -[`src/SignalWire/Serverless/Adapter.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Serverless/Adapter.cs) - -Line 21. - -*** - -### HandleAzure(Service, Dictionary\) - -Handle an Azure Functions invocation. - -Extracts method, path, headers, and body from the Azure request -dictionary, calls agent.HandleRequest(), and returns an Azure-compatible -response dictionary. - -**Modifiers:** `static` - -#### Signature - -```dotnet -public static Dictionary HandleAzure(Service agent, Dictionary request) -``` - -#### Parameters - - - - - -#### Returns - -`Dictionary` - -#### Source - -[`src/SignalWire/Serverless/Adapter.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Serverless/Adapter.cs) - -Line 104. - -*** - -### HandleLambda(Service, Dictionary\) - -Handle an AWS Lambda (API Gateway) invocation. - -Extracts method, path, headers, and body from the API Gateway event -format, calls agent.HandleRequest(), and returns an API Gateway -compatible response. - -**Modifiers:** `static` - -#### Signature - -```dotnet -public static Dictionary HandleLambda(Service agent, Dictionary lambdaEvent) -``` - -#### Parameters - - - An object with a HandleRequest method (AgentBase or Service). - - - - The API Gateway event payload as a dictionary. - - -#### Returns - -`Dictionary` — API Gateway response: statusCode, headers, body. - -#### Source - -[`src/SignalWire/Serverless/Adapter.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Serverless/Adapter.cs) - -Line 53. - -*** - -### Serve(dynamic) - -Auto-detect the runtime environment and serve the agent. - -For serverless environments, reads from stdin and dispatches -to the appropriate handler. For "server", calls agent.Run(). - -**Modifiers:** `static` - -#### Signature - -```dotnet -public static void Serve(dynamic agent) -``` - -#### Parameters - - - -#### Source - -[`src/SignalWire/Serverless/Adapter.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Serverless/Adapter.cs) - -Line 160. - -## Source - -[`src/SignalWire/Serverless/Adapter.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Serverless/Adapter.cs) - -Line 9. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.serverless/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.serverless/index.mdx deleted file mode 100644 index 6b8dea36b0..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.serverless/index.mdx +++ /dev/null @@ -1,20 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.serverless" -title: "SignalWire.Serverless" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "module" - language: "dotnet" - qualified_name: "SignalWire.Serverless" ---- -# `SignalWire.Serverless` - -## Classes - - - - Auto-detect and handle serverless environments (Lambda, Azure, GCF, CGI) or fall back to the built-in ASP.NET server. - - diff --git a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/api-ninjas-trivia-skill/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/api-ninjas-trivia-skill/index.mdx deleted file mode 100644 index 91eddfc544..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/api-ninjas-trivia-skill/index.mdx +++ /dev/null @@ -1,94 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.skills.builtin/api-ninjas-trivia-skill" -title: "ApiNinjasTriviaSkill" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.Skills.Builtin.ApiNinjasTriviaSkill" - parent: "SignalWire.Skills.Builtin" - module: "SignalWire.Skills.Builtin" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/ApiNinjasTriviaSkill.cs" - visibility: "public" ---- -# `ApiNinjasTriviaSkill` - -Get trivia questions from API Ninjas (DataMap). - -**Modifiers:** `sealed` - -## Signature - -```dotnet -public sealed class ApiNinjasTriviaSkill : SkillBase -``` - -## Inheritance - -**Extends:** [SignalWire.Skills.SkillBase](/docs/sdk-reference/reference/dotnet/signal-wire.skills/skill-base) - -## Properties - - - - - - - -## Methods - -### RegisterTools(AgentBase) - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override void RegisterTools(AgentBase agent) -``` - -#### Parameters - - - -#### Source - -[`src/SignalWire/Skills/Builtin/ApiNinjasTriviaSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/ApiNinjasTriviaSkill.cs) - -Line 24. - -*** - -### Setup(AgentBase, Dictionary\) - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override bool Setup(AgentBase agent, Dictionary parameters) -``` - -#### Parameters - - - - - -#### Returns - -`bool` - -#### Source - -[`src/SignalWire/Skills/Builtin/ApiNinjasTriviaSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/ApiNinjasTriviaSkill.cs) - -Line 19. - -## Source - -[`src/SignalWire/Skills/Builtin/ApiNinjasTriviaSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/ApiNinjasTriviaSkill.cs) - -Line 6. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/claude-skills-skill/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/claude-skills-skill/index.mdx deleted file mode 100644 index a952f2b27f..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/claude-skills-skill/index.mdx +++ /dev/null @@ -1,179 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.skills.builtin/claude-skills-skill" -title: "ClaudeSkillsSkill" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.Skills.Builtin.ClaudeSkillsSkill" - parent: "SignalWire.Skills.Builtin" - module: "SignalWire.Skills.Builtin" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/ClaudeSkillsSkill.cs" - visibility: "public" ---- -# `ClaudeSkillsSkill` - -Load Claude SKILL.md files as agent tools. - -Mirrors signalwire-python's `signalwire.skills.claude_skills.skill`. -At setup time, the skill walks `skills_path` for child directories -containing `SKILL.md`; each such file is parsed for YAML -frontmatter (the bit between two `---` lines) plus a markdown -body. Each loaded skill becomes one SWAIG tool whose handler returns -the body with three substitutions: - -<ul><li>`$ARGUMENTS` / `$ARGUMENTS[N]` / `$N` — the - `arguments` string passed to the tool, optionally split into - positional pieces by whitespace.</li><li>`${CLAUDE_SKILL_DIR}` — absolute path to the skill's - directory.</li><li>`${CLAUDE_SESSION_ID}` — call id from raw_data.</li></ul> - -The full Python implementation also runs a frontmatter-driven invocation -gate (skip-tool / skip-prompt), tolerates supporting reference sections, -and offers an opt-in shell-injection preprocessor (`` !`cmd` ``). The -.NET port ships the discovery/parse/handler core; the optional shell -preprocessor is left out by design (set `allow_shell_injection` -to a no-op — the surface is preserved for future expansion). - -**Modifiers:** `sealed` - -## Signature - -```dotnet -public sealed class ClaudeSkillsSkill : SkillBase -``` - -## Inheritance - -**Extends:** [SignalWire.Skills.SkillBase](/docs/sdk-reference/reference/dotnet/signal-wire.skills/skill-base) - -## Properties - - - - - - - -## Methods - -### GetHints() - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override List GetHints() -``` - -#### Returns - -`List` - -#### Source - -[`src/SignalWire/Skills/Builtin/ClaudeSkillsSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/ClaudeSkillsSkill.cs) - -Line 318. - -*** - -### GetInstanceKey() - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override string GetInstanceKey() -``` - -#### Returns - -`string` - -#### Source - -[`src/SignalWire/Skills/Builtin/ClaudeSkillsSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/ClaudeSkillsSkill.cs) - -Line 355. - -*** - -### GetPromptSections() - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override List> GetPromptSections() -``` - -#### Returns - -`List>` - -#### Source - -[`src/SignalWire/Skills/Builtin/ClaudeSkillsSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/ClaudeSkillsSkill.cs) - -Line 332. - -*** - -### RegisterTools(AgentBase) - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override void RegisterTools(AgentBase agent) -``` - -#### Parameters - - - -#### Source - -[`src/SignalWire/Skills/Builtin/ClaudeSkillsSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/ClaudeSkillsSkill.cs) - -Line 82. - -*** - -### Setup(AgentBase, Dictionary\) - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override bool Setup(AgentBase agent, Dictionary parameters) -``` - -#### Parameters - - - - - -#### Returns - -`bool` - -#### Source - -[`src/SignalWire/Skills/Builtin/ClaudeSkillsSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/ClaudeSkillsSkill.cs) - -Line 51. - -## Source - -[`src/SignalWire/Skills/Builtin/ClaudeSkillsSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/ClaudeSkillsSkill.cs) - -Line 33. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/custom-skills-skill/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/custom-skills-skill/index.mdx deleted file mode 100644 index c4776c43dd..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/custom-skills-skill/index.mdx +++ /dev/null @@ -1,94 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.skills.builtin/custom-skills-skill" -title: "CustomSkillsSkill" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.Skills.Builtin.CustomSkillsSkill" - parent: "SignalWire.Skills.Builtin" - module: "SignalWire.Skills.Builtin" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/CustomSkillsSkill.cs" - visibility: "public" ---- -# `CustomSkillsSkill` - -Register user-defined custom tools. - -**Modifiers:** `sealed` - -## Signature - -```dotnet -public sealed class CustomSkillsSkill : SkillBase -``` - -## Inheritance - -**Extends:** [SignalWire.Skills.SkillBase](/docs/sdk-reference/reference/dotnet/signal-wire.skills/skill-base) - -## Properties - - - - - - - -## Methods - -### RegisterTools(AgentBase) - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override void RegisterTools(AgentBase agent) -``` - -#### Parameters - - - -#### Source - -[`src/SignalWire/Skills/Builtin/CustomSkillsSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/CustomSkillsSkill.cs) - -Line 14. - -*** - -### Setup(AgentBase, Dictionary\) - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override bool Setup(AgentBase agent, Dictionary parameters) -``` - -#### Parameters - - - - - -#### Returns - -`bool` - -#### Source - -[`src/SignalWire/Skills/Builtin/CustomSkillsSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/CustomSkillsSkill.cs) - -Line 12. - -## Source - -[`src/SignalWire/Skills/Builtin/CustomSkillsSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/CustomSkillsSkill.cs) - -Line 6. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/datasphere-serverless-skill/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/datasphere-serverless-skill/index.mdx deleted file mode 100644 index 109f1b3f56..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/datasphere-serverless-skill/index.mdx +++ /dev/null @@ -1,138 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.skills.builtin/datasphere-serverless-skill" -title: "DatasphereServerlessSkill" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.Skills.Builtin.DatasphereServerlessSkill" - parent: "SignalWire.Skills.Builtin" - module: "SignalWire.Skills.Builtin" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/DatasphereServerlessSkill.cs" - visibility: "public" ---- -# `DatasphereServerlessSkill` - -Search knowledge using SignalWire DataSphere with serverless DataMap execution. - -**Modifiers:** `sealed` - -## Signature - -```dotnet -public sealed class DatasphereServerlessSkill : SkillBase -``` - -## Inheritance - -**Extends:** [SignalWire.Skills.SkillBase](/docs/sdk-reference/reference/dotnet/signal-wire.skills/skill-base) - -## Properties - - - - - - - -## Methods - -### GetGlobalData() - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override Dictionary GetGlobalData() -``` - -#### Returns - -`Dictionary` - -#### Source - -[`src/SignalWire/Skills/Builtin/DatasphereServerlessSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/DatasphereServerlessSkill.cs) - -Line 105. - -*** - -### GetPromptSections() - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override List> GetPromptSections() -``` - -#### Returns - -`List>` - -#### Source - -[`src/SignalWire/Skills/Builtin/DatasphereServerlessSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/DatasphereServerlessSkill.cs) - -Line 112. - -*** - -### RegisterTools(AgentBase) - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override void RegisterTools(AgentBase agent) -``` - -#### Parameters - - - -#### Source - -[`src/SignalWire/Skills/Builtin/DatasphereServerlessSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/DatasphereServerlessSkill.cs) - -Line 24. - -*** - -### Setup(AgentBase, Dictionary\) - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override bool Setup(AgentBase agent, Dictionary parameters) -``` - -#### Parameters - - - - - -#### Returns - -`bool` - -#### Source - -[`src/SignalWire/Skills/Builtin/DatasphereServerlessSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/DatasphereServerlessSkill.cs) - -Line 13. - -## Source - -[`src/SignalWire/Skills/Builtin/DatasphereServerlessSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/DatasphereServerlessSkill.cs) - -Line 7. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/datasphere-skill/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/datasphere-skill/index.mdx deleted file mode 100644 index d22acc415a..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/datasphere-skill/index.mdx +++ /dev/null @@ -1,150 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.skills.builtin/datasphere-skill" -title: "DatasphereSkill" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.Skills.Builtin.DatasphereSkill" - parent: "SignalWire.Skills.Builtin" - module: "SignalWire.Skills.Builtin" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/DatasphereSkill.cs" - visibility: "public" ---- -# `DatasphereSkill` - -SignalWire DataSphere knowledge-base search skill. - -Mirrors signalwire-python's `signalwire.skills.datasphere.skill`. -POSTs a JSON body to <code>https://\.signalwire.com -/api/datasphere/documents/search</code> with HTTP Basic auth -(project\_id : token). Real DataSphere returns matches under -`chunks`; the porting-sdk audit fixture uses `results`; -accept either so the skill round-trips against the live API and the -offline audit alike (matching the precedent already in Java/PHP/Perl/ -Rust). - -Upstream URL override: `DATASPHERE_BASE_URL`. Path -`/api/datasphere/documents/search` is preserved. - -**Modifiers:** `sealed` - -## Signature - -```dotnet -public sealed class DatasphereSkill : SkillBase -``` - -## Inheritance - -**Extends:** [SignalWire.Skills.SkillBase](/docs/sdk-reference/reference/dotnet/signal-wire.skills/skill-base) - -## Properties - - - - - - - -## Methods - -### GetGlobalData() - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override Dictionary GetGlobalData() -``` - -#### Returns - -`Dictionary` - -#### Source - -[`src/SignalWire/Skills/Builtin/DatasphereSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/DatasphereSkill.cs) - -Line 174. - -*** - -### GetPromptSections() - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override List> GetPromptSections() -``` - -#### Returns - -`List>` - -#### Source - -[`src/SignalWire/Skills/Builtin/DatasphereSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/DatasphereSkill.cs) - -Line 181. - -*** - -### RegisterTools(AgentBase) - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override void RegisterTools(AgentBase agent) -``` - -#### Parameters - - - -#### Source - -[`src/SignalWire/Skills/Builtin/DatasphereSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/DatasphereSkill.cs) - -Line 41. - -*** - -### Setup(AgentBase, Dictionary\) - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override bool Setup(AgentBase agent, Dictionary parameters) -``` - -#### Parameters - - - - - -#### Returns - -`bool` - -#### Source - -[`src/SignalWire/Skills/Builtin/DatasphereSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/DatasphereSkill.cs) - -Line 30. - -## Source - -[`src/SignalWire/Skills/Builtin/DatasphereSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/DatasphereSkill.cs) - -Line 22. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/datetime-skill/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/datetime-skill/index.mdx deleted file mode 100644 index d9e73733a0..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/datetime-skill/index.mdx +++ /dev/null @@ -1,114 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.skills.builtin/datetime-skill" -title: "DatetimeSkill" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.Skills.Builtin.DatetimeSkill" - parent: "SignalWire.Skills.Builtin" - module: "SignalWire.Skills.Builtin" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/DatetimeSkill.cs" - visibility: "public" ---- -# `DatetimeSkill` - -Get current date, time, and timezone information. - -**Modifiers:** `sealed` - -## Signature - -```dotnet -public sealed class DatetimeSkill : SkillBase -``` - -## Inheritance - -**Extends:** [SignalWire.Skills.SkillBase](/docs/sdk-reference/reference/dotnet/signal-wire.skills/skill-base) - -## Properties - - - - - -## Methods - -### GetPromptSections() - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override List> GetPromptSections() -``` - -#### Returns - -`List>` - -#### Source - -[`src/SignalWire/Skills/Builtin/DatetimeSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/DatetimeSkill.cs) - -Line 76. - -*** - -### RegisterTools(AgentBase) - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override void RegisterTools(AgentBase agent) -``` - -#### Parameters - - - -#### Source - -[`src/SignalWire/Skills/Builtin/DatetimeSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/DatetimeSkill.cs) - -Line 13. - -*** - -### Setup(AgentBase, Dictionary\) - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override bool Setup(AgentBase agent, Dictionary parameters) -``` - -#### Parameters - - - - - -#### Returns - -`bool` - -#### Source - -[`src/SignalWire/Skills/Builtin/DatetimeSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/DatetimeSkill.cs) - -Line 11. - -## Source - -[`src/SignalWire/Skills/Builtin/DatetimeSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/DatetimeSkill.cs) - -Line 6. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/google-maps-skill/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/google-maps-skill/index.mdx deleted file mode 100644 index 46e2d9b61c..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/google-maps-skill/index.mdx +++ /dev/null @@ -1,136 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.skills.builtin/google-maps-skill" -title: "GoogleMapsSkill" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.Skills.Builtin.GoogleMapsSkill" - parent: "SignalWire.Skills.Builtin" - module: "SignalWire.Skills.Builtin" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/GoogleMapsSkill.cs" - visibility: "public" ---- -# `GoogleMapsSkill` - -Validate addresses and compute driving routes using Google Maps (DataMap). - -**Modifiers:** `sealed` - -## Signature - -```dotnet -public sealed class GoogleMapsSkill : SkillBase -``` - -## Inheritance - -**Extends:** [SignalWire.Skills.SkillBase](/docs/sdk-reference/reference/dotnet/signal-wire.skills/skill-base) - -## Properties - - - - - -## Methods - -### GetHints() - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override List GetHints() -``` - -#### Returns - -`List` - -#### Source - -[`src/SignalWire/Skills/Builtin/GoogleMapsSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/GoogleMapsSkill.cs) - -Line 115. - -*** - -### GetPromptSections() - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override List> GetPromptSections() -``` - -#### Returns - -`List>` - -#### Source - -[`src/SignalWire/Skills/Builtin/GoogleMapsSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/GoogleMapsSkill.cs) - -Line 118. - -*** - -### RegisterTools(AgentBase) - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override void RegisterTools(AgentBase agent) -``` - -#### Parameters - - - -#### Source - -[`src/SignalWire/Skills/Builtin/GoogleMapsSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/GoogleMapsSkill.cs) - -Line 16. - -*** - -### Setup(AgentBase, Dictionary\) - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override bool Setup(AgentBase agent, Dictionary parameters) -``` - -#### Parameters - - - - - -#### Returns - -`bool` - -#### Source - -[`src/SignalWire/Skills/Builtin/GoogleMapsSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/GoogleMapsSkill.cs) - -Line 11. - -## Source - -[`src/SignalWire/Skills/Builtin/GoogleMapsSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/GoogleMapsSkill.cs) - -Line 6. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/index.mdx deleted file mode 100644 index 36fcffa6c6..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/index.mdx +++ /dev/null @@ -1,88 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.skills.builtin" -title: "SignalWire.Skills.Builtin" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "module" - language: "dotnet" - qualified_name: "SignalWire.Skills.Builtin" ---- -# `SignalWire.Skills.Builtin` - -## Classes - - - - Get trivia questions from API Ninjas (DataMap). - - - - Load Claude SKILL.md files as agent tools. Mirrors signalwire-python's `signalwire.skills.claude_skills.skill`. At setup time, the skill walks `skills_path` for child directories containing `SKILL.md`; each such file is parsed for YAML frontmatter (the bit between two `---` lines) plus a markdown body. Each loaded skill becomes one SWAIG tool whose handler returns the body with three substitutions: <ul><li>`$ARGUMENTS` / `$ARGUMENTS[N]` / `$N` — the `arguments` string passed to the tool, optionally split into positional pieces by whitespace.</li><li>`${CLAUDE_SKILL_DIR}` — absolute path to the skill's directory.</li><li>`${CLAUDE_SESSION_ID}` — call id from raw\_data.</li></ul> The full Python implementation also runs a frontmatter-driven invocation gate (skip-tool / skip-prompt), tolerates supporting reference sections, and offers an opt-in shell-injection preprocessor (`` !`cmd` ``). The .NET port ships the discovery/parse/handler core; the optional shell preprocessor is left out by design (set `allow_shell_injection` to a no-op — the surface is preserved for future expansion). - - - - Register user-defined custom tools. - - - - Search knowledge using SignalWire DataSphere with serverless DataMap execution. - - - - SignalWire DataSphere knowledge-base search skill. Mirrors signalwire-python's `signalwire.skills.datasphere.skill`. POSTs a JSON body to `https://<space_name>.signalwire.com /api/datasphere/documents/search` with HTTP Basic auth (project\_id : token). Real DataSphere returns matches under `chunks`; the porting-sdk audit fixture uses `results`; accept either so the skill round-trips against the live API and the offline audit alike (matching the precedent already in Java/PHP/Perl/ Rust). Upstream URL override: `DATASPHERE_BASE_URL`. Path `/api/datasphere/documents/search` is preserved. - - - - Get current date, time, and timezone information. - - - - Validate addresses and compute driving routes using Google Maps (DataMap). - - - - Gather answers to a configurable list of questions. - - - - Tell jokes using the API Ninjas joke API (DataMap). - - - - Perform basic mathematical calculations. - - - - Bridge MCP (Model Context Protocol) servers with SWAIG functions. Mirrors signalwire-python's `signalwire.skills.mcp_gateway.skill`. Each configured service gets one or more SWAIG tools whose handler POSTs to the gateway with the tool name, arguments, and per-call session id (derived from `raw_data.global_data.mcp_call_id` if present, else `raw_data.call_id`). Auth: `auth_token` (Bearer) or `auth_user`/`auth_password` (Basic). The skill prefers Bearer when both are configured. Endpoint shape: `POST <gateway_url>/services/<service>/call` per the Python implementation. Audit fixtures point `gateway_url` at a loopback URL via the per-skill convention. - - - - Vector / keyword similarity search. Mirrors signalwire-python's `signalwire.skills.native_vector_search.skill` in <strong>remote mode only</strong>. Local-mode SQLite/pgvector indexing relies on Python-only deps (sentence-transformers, FAISS, pgvector) and is not portable to the .NET BCL — recorded in `PORT_OMISSIONS.md`. The remote mode POSTs the query to the configured search server, which returns a real-shape response the audit verifies on the wire. The handler reads `remote_url` from skill params; the audit fixture sets it to a loopback URL so the SDK exercises the real transport against canned bytes. - - - - Control background file playback (DataMap). - - - - Web scraping / crawling skill. Mirrors signalwire-python's `signalwire.skills.spider.skill`. The Python implementation uses lxml + BeautifulSoup for selector-based extraction; the .NET port ships a faithful HTTP fetch + regex-based HTML stripping (script/style removal, tag removal, whitespace collapse, smart truncation). That covers the canonical `fast_text` / `clean_text` path the audit exercises; selector-driven structured extraction can be layered on later. Upstream URL override: `SPIDER_BASE_URL`. The skill rewrites the fetch host while preserving the requested URL's path + query so the audit fixture sees the documented page on the wire. - - - - Transfer calls between agents based on pattern matching (DataMap). - - - - Get current weather information from WeatherAPI.com (DataMap). - - - - Web search skill backed by Google Custom Search. Mirrors signalwire-python's `signalwire.skills.web_search.skill` (the `WebSearchSkill.search_and_scrape_best` path). The CSE call is issued faithfully, then each result URL is scraped and a header line + per-result title/url/snippet (plus scraped content) is formatted. Latency control (Python skill.py commits 51101da + 295745b) bounds the whole tool call so a single slow site can never blow past the SignalWire kernel's ~55s webhook timeout: `per_page_timeout` (2.0s) caps each page scrape (a per-request linked <xref href="System.Threading.CancellationTokenSource" data-throw-if-not-resolved="false"></xref> with `CancelAfter`). `overall_deadline` (10.0s) is the wall-clock budget for the whole call; once it fires, in-flight scrapes are abandoned and we return what we have (a <xref href="System.Threading.CancellationTokenSource" data-throw-if-not-resolved="false"></xref> with `CancelAfter(overall_deadline)`). THIS IS THE CONTRACT. `parallel_scrape` (true) dispatches each scrape as a Task and awaits <xref href="System.Threading.Tasks.Task.WhenAll(System.Threading.Tasks.Task%5b%5d)" data-throw-if-not-resolved="false"></xref>, harvesting whatever completed when the deadline cancels (best-effort). `snippets_only` (false) skips scraping entirely and formats the CSE snippets directly. Sub-second response. When the deadline fires OR no scraped page meets the quality threshold, the handler falls back to formatting the CSE snippets into a NON-empty response rather than the empty no-results message, so the kernel never sees a webhook timeout. Upstream URL override: `WEB_SEARCH_BASE_URL` (used by audit\_skills\_dispatch.py to point at a local fixture). When set, the URL is rewritten to the override host while the path `/customsearch/v1` is preserved. - - - - Wikipedia search skill backed by the public Wikipedia REST API. Mirrors signalwire-python's `signalwire.skills.wikipedia_search.skill`. The Python skill makes two API calls per query — first `action=query&list=search` to find article titles, then `action=query&prop=extracts` to fetch each article's intro extract. Returns the article(s) as `**Title**\n\nExtract` joined by separators. Upstream URL override: `WIKIPEDIA_BASE_URL`. Path `/w/api.php` is preserved when the env var is set so the audit fixture sees the documented Wikipedia API path on the wire. - - diff --git a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/info-gatherer-skill/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/info-gatherer-skill/index.mdx deleted file mode 100644 index 7cf5ae19ae..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/info-gatherer-skill/index.mdx +++ /dev/null @@ -1,138 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.skills.builtin/info-gatherer-skill" -title: "InfoGathererSkill" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.Skills.Builtin.InfoGathererSkill" - parent: "SignalWire.Skills.Builtin" - module: "SignalWire.Skills.Builtin" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/InfoGathererSkill.cs" - visibility: "public" ---- -# `InfoGathererSkill` - -Gather answers to a configurable list of questions. - -**Modifiers:** `sealed` - -## Signature - -```dotnet -public sealed class InfoGathererSkill : SkillBase -``` - -## Inheritance - -**Extends:** [SignalWire.Skills.SkillBase](/docs/sdk-reference/reference/dotnet/signal-wire.skills/skill-base) - -## Properties - - - - - - - -## Methods - -### GetGlobalData() - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override Dictionary GetGlobalData() -``` - -#### Returns - -`Dictionary` - -#### Source - -[`src/SignalWire/Skills/Builtin/InfoGathererSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/InfoGathererSkill.cs) - -Line 101. - -*** - -### GetPromptSections() - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override List> GetPromptSections() -``` - -#### Returns - -`List>` - -#### Source - -[`src/SignalWire/Skills/Builtin/InfoGathererSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/InfoGathererSkill.cs) - -Line 117. - -*** - -### RegisterTools(AgentBase) - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override void RegisterTools(AgentBase agent) -``` - -#### Parameters - - - -#### Source - -[`src/SignalWire/Skills/Builtin/InfoGathererSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/InfoGathererSkill.cs) - -Line 17. - -*** - -### Setup(AgentBase, Dictionary\) - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override bool Setup(AgentBase agent, Dictionary parameters) -``` - -#### Parameters - - - - - -#### Returns - -`bool` - -#### Source - -[`src/SignalWire/Skills/Builtin/InfoGathererSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/InfoGathererSkill.cs) - -Line 12. - -## Source - -[`src/SignalWire/Skills/Builtin/InfoGathererSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/InfoGathererSkill.cs) - -Line 6. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/joke-skill/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/joke-skill/index.mdx deleted file mode 100644 index 300b840d36..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/joke-skill/index.mdx +++ /dev/null @@ -1,136 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.skills.builtin/joke-skill" -title: "JokeSkill" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.Skills.Builtin.JokeSkill" - parent: "SignalWire.Skills.Builtin" - module: "SignalWire.Skills.Builtin" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/JokeSkill.cs" - visibility: "public" ---- -# `JokeSkill` - -Tell jokes using the API Ninjas joke API (DataMap). - -**Modifiers:** `sealed` - -## Signature - -```dotnet -public sealed class JokeSkill : SkillBase -``` - -## Inheritance - -**Extends:** [SignalWire.Skills.SkillBase](/docs/sdk-reference/reference/dotnet/signal-wire.skills/skill-base) - -## Properties - - - - - -## Methods - -### GetGlobalData() - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override Dictionary GetGlobalData() -``` - -#### Returns - -`Dictionary` - -#### Source - -[`src/SignalWire/Skills/Builtin/JokeSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/JokeSkill.cs) - -Line 66. - -*** - -### GetPromptSections() - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override List> GetPromptSections() -``` - -#### Returns - -`List>` - -#### Source - -[`src/SignalWire/Skills/Builtin/JokeSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/JokeSkill.cs) - -Line 69. - -*** - -### RegisterTools(AgentBase) - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override void RegisterTools(AgentBase agent) -``` - -#### Parameters - - - -#### Source - -[`src/SignalWire/Skills/Builtin/JokeSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/JokeSkill.cs) - -Line 16. - -*** - -### Setup(AgentBase, Dictionary\) - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override bool Setup(AgentBase agent, Dictionary parameters) -``` - -#### Parameters - - - - - -#### Returns - -`bool` - -#### Source - -[`src/SignalWire/Skills/Builtin/JokeSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/JokeSkill.cs) - -Line 11. - -## Source - -[`src/SignalWire/Skills/Builtin/JokeSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/JokeSkill.cs) - -Line 6. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/math-skill/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/math-skill/index.mdx deleted file mode 100644 index 43a8849ec2..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/math-skill/index.mdx +++ /dev/null @@ -1,114 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.skills.builtin/math-skill" -title: "MathSkill" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.Skills.Builtin.MathSkill" - parent: "SignalWire.Skills.Builtin" - module: "SignalWire.Skills.Builtin" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/obj/Release/net8.0/System.Text.RegularExpressions.Generator/System.Text.RegularExpressions.Generator.RegexGenerator/RegexGenerator.g.cs" - visibility: "public" ---- -# `MathSkill` - -Perform basic mathematical calculations. - -**Modifiers:** `sealed` - -## Signature - -```dotnet -public sealed class MathSkill : SkillBase -``` - -## Inheritance - -**Extends:** [SignalWire.Skills.SkillBase](/docs/sdk-reference/reference/dotnet/signal-wire.skills/skill-base) - -## Properties - - - - - -## Methods - -### GetPromptSections() - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override List> GetPromptSections() -``` - -#### Returns - -`List>` - -#### Source - -[`src/SignalWire/Skills/Builtin/MathSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/MathSkill.cs) - -Line 86. - -*** - -### RegisterTools(AgentBase) - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override void RegisterTools(AgentBase agent) -``` - -#### Parameters - - - -#### Source - -[`src/SignalWire/Skills/Builtin/MathSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/MathSkill.cs) - -Line 17. - -*** - -### Setup(AgentBase, Dictionary\) - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override bool Setup(AgentBase agent, Dictionary parameters) -``` - -#### Parameters - - - - - -#### Returns - -`bool` - -#### Source - -[`src/SignalWire/Skills/Builtin/MathSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/MathSkill.cs) - -Line 15. - -## Source - -[`src/SignalWire/obj/Release/net8.0/System.Text.RegularExpressions.Generator/System.Text.RegularExpressions.Generator.RegexGenerator/RegexGenerator.g.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/obj/Release/net8.0/System.Text.RegularExpressions.Generator/System.Text.RegularExpressions.Generator.RegexGenerator/RegexGenerator.g.cs) - -Line 31. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/mcp-gateway-skill/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/mcp-gateway-skill/index.mdx deleted file mode 100644 index 42cc30890d..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/mcp-gateway-skill/index.mdx +++ /dev/null @@ -1,171 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.skills.builtin/mcp-gateway-skill" -title: "McpGatewaySkill" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.Skills.Builtin.McpGatewaySkill" - parent: "SignalWire.Skills.Builtin" - module: "SignalWire.Skills.Builtin" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/McpGatewaySkill.cs" - visibility: "public" ---- -# `McpGatewaySkill` - -Bridge MCP (Model Context Protocol) servers with SWAIG functions. - -Mirrors signalwire-python's `signalwire.skills.mcp_gateway.skill`. -Each configured service gets one or more SWAIG tools whose handler -POSTs to the gateway with the tool name, arguments, and per-call -session id (derived from `raw_data.global_data.mcp_call_id` if -present, else `raw_data.call_id`). - -Auth: `auth_token` (Bearer) or `auth_user`/`auth_password` -(Basic). The skill prefers Bearer when both are configured. - -Endpoint shape: `POST <gateway_url>/services/<service>/call` -per the Python implementation. Audit fixtures point `gateway_url` -at a loopback URL via the per-skill convention. - -**Modifiers:** `sealed` - -## Signature - -```dotnet -public sealed class McpGatewaySkill : SkillBase -``` - -## Inheritance - -**Extends:** [SignalWire.Skills.SkillBase](/docs/sdk-reference/reference/dotnet/signal-wire.skills/skill-base) - -## Properties - - - - - -## Methods - -### GetGlobalData() - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override Dictionary GetGlobalData() -``` - -#### Returns - -`Dictionary` - -#### Source - -[`src/SignalWire/Skills/Builtin/McpGatewaySkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/McpGatewaySkill.cs) - -Line 249. - -*** - -### GetHints() - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override List GetHints() -``` - -#### Returns - -`List` - -#### Source - -[`src/SignalWire/Skills/Builtin/McpGatewaySkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/McpGatewaySkill.cs) - -Line 234. - -*** - -### GetPromptSections() - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override List> GetPromptSections() -``` - -#### Returns - -`List>` - -#### Source - -[`src/SignalWire/Skills/Builtin/McpGatewaySkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/McpGatewaySkill.cs) - -Line 268. - -*** - -### RegisterTools(AgentBase) - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override void RegisterTools(AgentBase agent) -``` - -#### Parameters - - - -#### Source - -[`src/SignalWire/Skills/Builtin/McpGatewaySkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/McpGatewaySkill.cs) - -Line 32. - -*** - -### Setup(AgentBase, Dictionary\) - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override bool Setup(AgentBase agent, Dictionary parameters) -``` - -#### Parameters - - - - - -#### Returns - -`bool` - -#### Source - -[`src/SignalWire/Skills/Builtin/McpGatewaySkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/McpGatewaySkill.cs) - -Line 27. - -## Source - -[`src/SignalWire/Skills/Builtin/McpGatewaySkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/McpGatewaySkill.cs) - -Line 22. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/native-vector-search-skill/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/native-vector-search-skill/index.mdx deleted file mode 100644 index f80bc75936..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/native-vector-search-skill/index.mdx +++ /dev/null @@ -1,128 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.skills.builtin/native-vector-search-skill" -title: "NativeVectorSearchSkill" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.Skills.Builtin.NativeVectorSearchSkill" - parent: "SignalWire.Skills.Builtin" - module: "SignalWire.Skills.Builtin" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/NativeVectorSearchSkill.cs" - visibility: "public" ---- -# `NativeVectorSearchSkill` - -Vector / keyword similarity search. - -Mirrors signalwire-python's `signalwire.skills.native_vector_search.skill` -in <strong>remote mode only</strong>. Local-mode SQLite/pgvector -indexing relies on Python-only deps (sentence-transformers, FAISS, -pgvector) and is not portable to the .NET BCL — recorded in -`PORT_OMISSIONS.md`. The remote mode POSTs the query to the -configured search server, which returns a real-shape response the -audit verifies on the wire. - -The handler reads `remote_url` from skill params; the audit -fixture sets it to a loopback URL so the SDK exercises the real -transport against canned bytes. - -**Modifiers:** `sealed` - -## Signature - -```dotnet -public sealed class NativeVectorSearchSkill : SkillBase -``` - -## Inheritance - -**Extends:** [SignalWire.Skills.SkillBase](/docs/sdk-reference/reference/dotnet/signal-wire.skills/skill-base) - -## Properties - - - - - - - -## Methods - -### GetHints() - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override List GetHints() -``` - -#### Returns - -`List` - -#### Source - -[`src/SignalWire/Skills/Builtin/NativeVectorSearchSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/NativeVectorSearchSkill.cs) - -Line 194. - -*** - -### RegisterTools(AgentBase) - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override void RegisterTools(AgentBase agent) -``` - -#### Parameters - - - -#### Source - -[`src/SignalWire/Skills/Builtin/NativeVectorSearchSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/NativeVectorSearchSkill.cs) - -Line 30. - -*** - -### Setup(AgentBase, Dictionary\) - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override bool Setup(AgentBase agent, Dictionary parameters) -``` - -#### Parameters - - - - - -#### Returns - -`bool` - -#### Source - -[`src/SignalWire/Skills/Builtin/NativeVectorSearchSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/NativeVectorSearchSkill.cs) - -Line 28. - -## Source - -[`src/SignalWire/Skills/Builtin/NativeVectorSearchSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/NativeVectorSearchSkill.cs) - -Line 22. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/play-background-file-skill/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/play-background-file-skill/index.mdx deleted file mode 100644 index 395b61e413..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/play-background-file-skill/index.mdx +++ /dev/null @@ -1,94 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.skills.builtin/play-background-file-skill" -title: "PlayBackgroundFileSkill" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.Skills.Builtin.PlayBackgroundFileSkill" - parent: "SignalWire.Skills.Builtin" - module: "SignalWire.Skills.Builtin" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/PlayBackgroundFileSkill.cs" - visibility: "public" ---- -# `PlayBackgroundFileSkill` - -Control background file playback (DataMap). - -**Modifiers:** `sealed` - -## Signature - -```dotnet -public sealed class PlayBackgroundFileSkill : SkillBase -``` - -## Inheritance - -**Extends:** [SignalWire.Skills.SkillBase](/docs/sdk-reference/reference/dotnet/signal-wire.skills/skill-base) - -## Properties - - - - - - - -## Methods - -### RegisterTools(AgentBase) - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override void RegisterTools(AgentBase agent) -``` - -#### Parameters - - - -#### Source - -[`src/SignalWire/Skills/Builtin/PlayBackgroundFileSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/PlayBackgroundFileSkill.cs) - -Line 17. - -*** - -### Setup(AgentBase, Dictionary\) - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override bool Setup(AgentBase agent, Dictionary parameters) -``` - -#### Parameters - - - - - -#### Returns - -`bool` - -#### Source - -[`src/SignalWire/Skills/Builtin/PlayBackgroundFileSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/PlayBackgroundFileSkill.cs) - -Line 12. - -## Source - -[`src/SignalWire/Skills/Builtin/PlayBackgroundFileSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/PlayBackgroundFileSkill.cs) - -Line 6. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/spider-skill/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/spider-skill/index.mdx deleted file mode 100644 index e5d9b3f7b3..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/spider-skill/index.mdx +++ /dev/null @@ -1,128 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.skills.builtin/spider-skill" -title: "SpiderSkill" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.Skills.Builtin.SpiderSkill" - parent: "SignalWire.Skills.Builtin" - module: "SignalWire.Skills.Builtin" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/SpiderSkill.cs" - visibility: "public" ---- -# `SpiderSkill` - -Web scraping / crawling skill. - -Mirrors signalwire-python's `signalwire.skills.spider.skill`. The -Python implementation uses lxml + BeautifulSoup for selector-based -extraction; the .NET port ships a faithful HTTP fetch + regex-based -HTML stripping (script/style removal, tag removal, whitespace -collapse, smart truncation). That covers the canonical -`fast_text` / `clean_text` path the audit exercises; -selector-driven structured extraction can be layered on later. - -Upstream URL override: `SPIDER_BASE_URL`. The skill rewrites the -fetch host while preserving the requested URL's path + query so the -audit fixture sees the documented page on the wire. - -**Modifiers:** `sealed` - -## Signature - -```dotnet -public sealed class SpiderSkill : SkillBase -``` - -## Inheritance - -**Extends:** [SignalWire.Skills.SkillBase](/docs/sdk-reference/reference/dotnet/signal-wire.skills/skill-base) - -## Properties - - - - - - - -## Methods - -### GetHints() - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override List GetHints() -``` - -#### Returns - -`List` - -#### Source - -[`src/SignalWire/Skills/Builtin/SpiderSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/SpiderSkill.cs) - -Line 245. - -*** - -### RegisterTools(AgentBase) - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override void RegisterTools(AgentBase agent) -``` - -#### Parameters - - - -#### Source - -[`src/SignalWire/Skills/Builtin/SpiderSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/SpiderSkill.cs) - -Line 38. - -*** - -### Setup(AgentBase, Dictionary\) - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override bool Setup(AgentBase agent, Dictionary parameters) -``` - -#### Parameters - - - - - -#### Returns - -`bool` - -#### Source - -[`src/SignalWire/Skills/Builtin/SpiderSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/SpiderSkill.cs) - -Line 36. - -## Source - -[`src/SignalWire/Skills/Builtin/SpiderSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/SpiderSkill.cs) - -Line 22. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/swml-transfer-skill/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/swml-transfer-skill/index.mdx deleted file mode 100644 index 304737d288..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/swml-transfer-skill/index.mdx +++ /dev/null @@ -1,138 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.skills.builtin/swml-transfer-skill" -title: "SwmlTransferSkill" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.Skills.Builtin.SwmlTransferSkill" - parent: "SignalWire.Skills.Builtin" - module: "SignalWire.Skills.Builtin" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/SwmlTransferSkill.cs" - visibility: "public" ---- -# `SwmlTransferSkill` - -Transfer calls between agents based on pattern matching (DataMap). - -**Modifiers:** `sealed` - -## Signature - -```dotnet -public sealed class SwmlTransferSkill : SkillBase -``` - -## Inheritance - -**Extends:** [SignalWire.Skills.SkillBase](/docs/sdk-reference/reference/dotnet/signal-wire.skills/skill-base) - -## Properties - - - - - - - -## Methods - -### GetHints() - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override List GetHints() -``` - -#### Returns - -`List` - -#### Source - -[`src/SignalWire/Skills/Builtin/SwmlTransferSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/SwmlTransferSkill.cs) - -Line 108. - -*** - -### GetPromptSections() - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override List> GetPromptSections() -``` - -#### Returns - -`List>` - -#### Source - -[`src/SignalWire/Skills/Builtin/SwmlTransferSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/SwmlTransferSkill.cs) - -Line 126. - -*** - -### RegisterTools(AgentBase) - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override void RegisterTools(AgentBase agent) -``` - -#### Parameters - - - -#### Source - -[`src/SignalWire/Skills/Builtin/SwmlTransferSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/SwmlTransferSkill.cs) - -Line 18. - -*** - -### Setup(AgentBase, Dictionary\) - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override bool Setup(AgentBase agent, Dictionary parameters) -``` - -#### Parameters - - - - - -#### Returns - -`bool` - -#### Source - -[`src/SignalWire/Skills/Builtin/SwmlTransferSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/SwmlTransferSkill.cs) - -Line 13. - -## Source - -[`src/SignalWire/Skills/Builtin/SwmlTransferSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/SwmlTransferSkill.cs) - -Line 7. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/weather-api-skill/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/weather-api-skill/index.mdx deleted file mode 100644 index cca55af8b8..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/weather-api-skill/index.mdx +++ /dev/null @@ -1,92 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.skills.builtin/weather-api-skill" -title: "WeatherApiSkill" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.Skills.Builtin.WeatherApiSkill" - parent: "SignalWire.Skills.Builtin" - module: "SignalWire.Skills.Builtin" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/WeatherApiSkill.cs" - visibility: "public" ---- -# `WeatherApiSkill` - -Get current weather information from WeatherAPI.com (DataMap). - -**Modifiers:** `sealed` - -## Signature - -```dotnet -public sealed class WeatherApiSkill : SkillBase -``` - -## Inheritance - -**Extends:** [SignalWire.Skills.SkillBase](/docs/sdk-reference/reference/dotnet/signal-wire.skills/skill-base) - -## Properties - - - - - -## Methods - -### RegisterTools(AgentBase) - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override void RegisterTools(AgentBase agent) -``` - -#### Parameters - - - -#### Source - -[`src/SignalWire/Skills/Builtin/WeatherApiSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/WeatherApiSkill.cs) - -Line 16. - -*** - -### Setup(AgentBase, Dictionary\) - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override bool Setup(AgentBase agent, Dictionary parameters) -``` - -#### Parameters - - - - - -#### Returns - -`bool` - -#### Source - -[`src/SignalWire/Skills/Builtin/WeatherApiSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/WeatherApiSkill.cs) - -Line 11. - -## Source - -[`src/SignalWire/Skills/Builtin/WeatherApiSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/WeatherApiSkill.cs) - -Line 6. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/web-search-skill/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/web-search-skill/index.mdx deleted file mode 100644 index 59fae569d8..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/web-search-skill/index.mdx +++ /dev/null @@ -1,191 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.skills.builtin/web-search-skill" -title: "WebSearchSkill" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.Skills.Builtin.WebSearchSkill" - parent: "SignalWire.Skills.Builtin" - module: "SignalWire.Skills.Builtin" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/WebSearchSkill.cs" - visibility: "public" ---- -# `WebSearchSkill` - -Web search skill backed by Google Custom Search. - -Mirrors signalwire-python's `signalwire.skills.web_search.skill` -(the `WebSearchSkill.search_and_scrape_best` path). The CSE call is -issued faithfully, then each result URL is scraped and a header line + -per-result title/url/snippet (plus scraped content) is formatted. - -Latency control (Python skill.py commits 51101da + 295745b) bounds the -whole tool call so a single slow site can never blow past the SignalWire -kernel's ~55s webhook timeout: -`per_page_timeout` (2.0s) caps each page scrape (a per-request -linked <xref href="System.Threading.CancellationTokenSource" data-throw-if-not-resolved="false"></xref> with -`CancelAfter`). -`overall_deadline` (10.0s) is the wall-clock budget for the whole -call; once it fires, in-flight scrapes are abandoned and we return -what we have (a <xref href="System.Threading.CancellationTokenSource" data-throw-if-not-resolved="false"></xref> -with `CancelAfter(overall_deadline)`). THIS IS THE CONTRACT. -`parallel_scrape` (true) dispatches each scrape as a Task and awaits <xref href="System.Threading.Tasks.Task.WhenAll(System.Threading.Tasks.Task%5b%5d)" data-throw-if-not-resolved="false"></xref>, -harvesting whatever completed when the deadline cancels (best-effort). -`snippets_only` (false) skips scraping entirely and formats the CSE -snippets directly. Sub-second response. -When the deadline fires OR no scraped page meets the quality threshold, the -handler falls back to formatting the CSE snippets into a NON-empty response -rather than the empty no-results message, so the kernel never sees a -webhook timeout. - -Upstream URL override: `WEB_SEARCH_BASE_URL` (used by -audit\_skills\_dispatch.py to point at a local fixture). When set, the -URL is rewritten to the override host while the path -`/customsearch/v1` is preserved. - -**Modifiers:** `sealed` - -## Signature - -```dotnet -public sealed class WebSearchSkill : SkillBase -``` - -## Inheritance - -**Extends:** [SignalWire.Skills.SkillBase](/docs/sdk-reference/reference/dotnet/signal-wire.skills/skill-base) - -## Properties - - - - - - - - - -## Methods - -### GetGlobalData() - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override Dictionary GetGlobalData() -``` - -#### Returns - -`Dictionary` - -#### Source - -[`src/SignalWire/Skills/Builtin/WebSearchSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/WebSearchSkill.cs) - -Line 546. - -*** - -### GetParameterSchema() - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override Dictionary GetParameterSchema() -``` - -#### Returns - -`Dictionary` - -#### Source - -[`src/SignalWire/Skills/Builtin/WebSearchSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/WebSearchSkill.cs) - -Line 493. - -*** - -### GetPromptSections() - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override List> GetPromptSections() -``` - -#### Returns - -`List>` - -#### Source - -[`src/SignalWire/Skills/Builtin/WebSearchSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/WebSearchSkill.cs) - -Line 553. - -*** - -### RegisterTools(AgentBase) - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override void RegisterTools(AgentBase agent) -``` - -#### Parameters - - - -#### Source - -[`src/SignalWire/Skills/Builtin/WebSearchSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/WebSearchSkill.cs) - -Line 65. - -*** - -### Setup(AgentBase, Dictionary\) - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override bool Setup(AgentBase agent, Dictionary parameters) -``` - -#### Parameters - - - - - -#### Returns - -`bool` - -#### Source - -[`src/SignalWire/Skills/Builtin/WebSearchSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/WebSearchSkill.cs) - -Line 59. - -## Source - -[`src/SignalWire/Skills/Builtin/WebSearchSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/WebSearchSkill.cs) - -Line 41. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/wikipedia-search-skill/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/wikipedia-search-skill/index.mdx deleted file mode 100644 index 1ede2b3ee0..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.skills.builtin/wikipedia-search-skill/index.mdx +++ /dev/null @@ -1,125 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.skills.builtin/wikipedia-search-skill" -title: "WikipediaSearchSkill" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.Skills.Builtin.WikipediaSearchSkill" - parent: "SignalWire.Skills.Builtin" - module: "SignalWire.Skills.Builtin" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/WikipediaSearchSkill.cs" - visibility: "public" ---- -# `WikipediaSearchSkill` - -Wikipedia search skill backed by the public Wikipedia REST API. - -Mirrors signalwire-python's `signalwire.skills.wikipedia_search.skill`. -The Python skill makes two API calls per query — first -`action=query&list=search` to find article titles, then -`action=query&prop=extracts` to fetch each article's intro -extract. Returns the article(s) as `**Title**\n\nExtract` joined -by separators. - -Upstream URL override: `WIKIPEDIA_BASE_URL`. Path -`/w/api.php` is preserved when the env var is set so the audit -fixture sees the documented Wikipedia API path on the wire. - -**Modifiers:** `sealed` - -## Signature - -```dotnet -public sealed class WikipediaSearchSkill : SkillBase -``` - -## Inheritance - -**Extends:** [SignalWire.Skills.SkillBase](/docs/sdk-reference/reference/dotnet/signal-wire.skills/skill-base) - -## Properties - - - - - -## Methods - -### GetPromptSections() - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override List> GetPromptSections() -``` - -#### Returns - -`List>` - -#### Source - -[`src/SignalWire/Skills/Builtin/WikipediaSearchSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/WikipediaSearchSkill.cs) - -Line 161. - -*** - -### RegisterTools(AgentBase) - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override void RegisterTools(AgentBase agent) -``` - -#### Parameters - - - -#### Source - -[`src/SignalWire/Skills/Builtin/WikipediaSearchSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/WikipediaSearchSkill.cs) - -Line 31. - -*** - -### Setup(AgentBase, Dictionary\) - -**Modifiers:** `override` - -#### Signature - -```dotnet -public override bool Setup(AgentBase agent, Dictionary parameters) -``` - -#### Parameters - - - - - -#### Returns - -`bool` - -#### Source - -[`src/SignalWire/Skills/Builtin/WikipediaSearchSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/WikipediaSearchSkill.cs) - -Line 29. - -## Source - -[`src/SignalWire/Skills/Builtin/WikipediaSearchSkill.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/Builtin/WikipediaSearchSkill.cs) - -Line 21. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.skills/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.skills/index.mdx deleted file mode 100644 index aa3f415de8..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.skills/index.mdx +++ /dev/null @@ -1,145 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.skills" -title: "SignalWire.Skills" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "module" - language: "dotnet" - qualified_name: "SignalWire.Skills" ---- -# `SignalWire.Skills` - -## Classes - - - - Abstract base class for all skills. Provides lifecycle hooks, tool registration, hint/globalData/prompt merging, and a <xref href="SignalWire.Skills.SkillBase.DefineTool(System.String%2cSystem.String%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%2cSystem.Func%7bSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%2cSignalWire.SWAIG.FunctionResult%7d)" data-throw-if-not-resolved="false"></xref> helper that delegates to the owning agent. - - - - Loads, unloads, and queries skills on behalf of an <xref href="SignalWire.Agent.AgentBase" data-throw-if-not-resolved="false"></xref>. Validates env vars, calls Setup/RegisterTools, and merges hints/globalData/prompts. - - - - Maps <xref href="SignalWire.Skills.SkillName" data-throw-if-not-resolved="false"></xref> members to the canonical snake\_case wire names that <xref href="SignalWire.Skills.SkillRegistry" data-throw-if-not-resolved="false"></xref> registers. - - - - Thread-safe singleton that maps snake\_case skill names to factory delegates. All 18 built-in skills are registered lazily on first access. - - - -## Enums - -### SkillName - -Built-in skill names as a typed, compile-time-checked closed set. - -**Remarks:** <p> <xref href="SignalWire.Agent.AgentBase.AddSkill(SignalWire.Skills.SkillName%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d)" data-throw-if-not-resolved="false"></xref> -(and the matching `RemoveSkill` / `HasSkill` overloads) accept this -enum OR a string. The enum gives editor autocompletion and makes a typo fail -at the call site — a bare string like `"datetiem"` only fails at runtime, -on the server. Strings keep parity with the Python reference (which uses a -bare `str`) and still allow custom / third-party skills that aren't -built in. - -</p> -<p> -Each member maps to its canonical snake_case wire name via -<xref href="SignalWire.Skills.SkillNameExtensions.ToWireName(SignalWire.Skills.SkillName)" data-throw-if-not-resolved="false"></xref>; the enum is purely a -typed alias over those strings, so wire behavior is identical to passing the -string directly. -</p> -<example> -<pre><code class="lang-csharp">agent.AddSkill(SkillName.Datetime); // typed, autocompleted -agent.AddSkill("datetime"); // string still works (parity) -agent.AddSkill("my_custom_skill"); // open set: custom skills ok</code></pre> -</example> - -#### Signature - -```dotnet -public enum SkillName -``` - -#### Properties - - - api\_ninjas\_trivia - - - - claude\_skills - - - - custom\_skills - - - - datasphere - - - - datasphere\_serverless - - - - datetime - - - - google\_maps - - - - info\_gatherer - - - - joke - - - - math - - - - mcp\_gateway - - - - native\_vector\_search - - - - play\_background\_file - - - - spider - - - - swml\_transfer - - - - weather\_api - - - - web\_search - - - - wikipedia\_search - - -#### Source - -[`src/SignalWire/Skills/SkillName.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillName.cs) - -Line 29. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.skills/skill-base/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.skills/skill-base/index.mdx deleted file mode 100644 index f721ff8f16..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.skills/skill-base/index.mdx +++ /dev/null @@ -1,329 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.skills/skill-base" -title: "SkillBase" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.Skills.SkillBase" - parent: "SignalWire.Skills" - module: "SignalWire.Skills" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillBase.cs" - visibility: "public" ---- -# `SkillBase` - -Abstract base class for all skills. Provides lifecycle hooks, tool registration, -hint/globalData/prompt merging, and a <xref href="SignalWire.Skills.SkillBase.DefineTool(System.String%2cSystem.String%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%2cSystem.Func%7bSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%2cSignalWire.SWAIG.FunctionResult%7d)" data-throw-if-not-resolved="false"></xref> helper that -delegates to the owning agent. - -**Modifiers:** `abstract` - -## Signature - -```dotnet -public abstract class SkillBase -``` - -## Properties - - - - - - - - - - - - - Check whether prompt sections should be skipped. - - - - - - -## Methods - -### Cleanup() - -**Modifiers:** `virtual` - -#### Signature - -```dotnet -public virtual void Cleanup() -``` - -#### Source - -[`src/SignalWire/Skills/SkillBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillBase.cs) - -Line 84. - -*** - -### DefineTool(string, string, Dictionary\, Func\, Dictionary\, FunctionResult>) - -Convenience wrapper that merges swaig\_fields and delegates to -AgentBase.DefineTool. - -#### Signature - -```dotnet -protected void DefineTool(string name, string description, Dictionary parameters, Func, Dictionary, FunctionResult> handler) -``` - -#### Parameters - - - - - - - - - -#### Source - -[`src/SignalWire/Skills/SkillBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillBase.cs) - -Line 127. - -*** - -### GetGlobalData() - -**Modifiers:** `virtual` - -#### Signature - -```dotnet -public virtual Dictionary GetGlobalData() -``` - -#### Returns - -`Dictionary` - -#### Source - -[`src/SignalWire/Skills/SkillBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillBase.cs) - -Line 45. - -*** - -### GetHints() - -**Modifiers:** `virtual` - -#### Signature - -```dotnet -public virtual List GetHints() -``` - -#### Returns - -`List` - -#### Source - -[`src/SignalWire/Skills/SkillBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillBase.cs) - -Line 43. - -*** - -### GetInstanceKey() - -**Modifiers:** `virtual` - -#### Signature - -```dotnet -public virtual string GetInstanceKey() -``` - -#### Returns - -`string` - -#### Source - -[`src/SignalWire/Skills/SkillBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillBase.cs) - -Line 33. - -*** - -### GetParameterSchema() - -**Modifiers:** `virtual` - -#### Signature - -```dotnet -public virtual Dictionary GetParameterSchema() -``` - -#### Returns - -`Dictionary` - -#### Source - -[`src/SignalWire/Skills/SkillBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillBase.cs) - -Line 56. - -*** - -### GetPromptSections() - -**Modifiers:** `virtual` - -#### Signature - -```dotnet -public virtual List> GetPromptSections() -``` - -#### Returns - -`List>` - -#### Source - -[`src/SignalWire/Skills/SkillBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillBase.cs) - -Line 47. - -*** - -### GetToolName(string) - -Return the tool name override from params, or <code class="paramref">defaultName</code>. - -#### Signature - -```dotnet -protected string GetToolName(string defaultName) -``` - -#### Parameters - - - -#### Returns - -`string` - -#### Source - -[`src/SignalWire/Skills/SkillBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillBase.cs) - -Line 147. - -*** - -### RegisterTools(AgentBase) - -**Modifiers:** `abstract` - -#### Signature - -```dotnet -public abstract void RegisterTools(AgentBase agent) -``` - -#### Parameters - - - -#### Source - -[`src/SignalWire/Skills/SkillBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillBase.cs) - -Line 23. - -*** - -### Setup(AgentBase, Dictionary\) - -**Modifiers:** `abstract` - -#### Signature - -```dotnet -public abstract bool Setup(AgentBase agent, Dictionary parameters) -``` - -#### Parameters - - - - - -#### Returns - -`bool` - -#### Source - -[`src/SignalWire/Skills/SkillBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillBase.cs) - -Line 22. - -*** - -### ValidateEnvVars() - -#### Signature - -```dotnet -public List ValidateEnvVars() -``` - -#### Returns - -`List` - -#### Source - -[`src/SignalWire/Skills/SkillBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillBase.cs) - -Line 106. - -*** - -### Wire(AgentBase, Dictionary\) - -#### Signature - -```dotnet -public void Wire(AgentBase agent, Dictionary parameters) -``` - -#### Parameters - - - - - -#### Source - -[`src/SignalWire/Skills/SkillBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillBase.cs) - -Line 164. - -## Source - -[`src/SignalWire/Skills/SkillBase.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillBase.cs) - -Line 10. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.skills/skill-manager/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.skills/skill-manager/index.mdx deleted file mode 100644 index 66925e6cdd..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.skills/skill-manager/index.mdx +++ /dev/null @@ -1,180 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.skills/skill-manager" -title: "SkillManager" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.Skills.SkillManager" - parent: "SignalWire.Skills" - module: "SignalWire.Skills" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillManager.cs" - visibility: "public" ---- -# `SkillManager` - -Loads, unloads, and queries skills on behalf of an <xref href="SignalWire.Agent.AgentBase" data-throw-if-not-resolved="false"></xref>. -Validates env vars, calls Setup/RegisterTools, and merges hints/globalData/prompts. - -**Modifiers:** `sealed` - -## Signature - -```dotnet -public sealed class SkillManager -``` - -## Properties - - - The skill\_manager logger (Python parity: `SkillManager.logger` instance attribute). - - -## Methods - -### GetSkill(string) - -#### Signature - -```dotnet -public SkillBase? GetSkill(string key) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.Skills.SkillBase` - -#### Source - -[`src/SignalWire/Skills/SkillManager.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillManager.cs) - -Line 127. - -*** - -### HasSkill(string) - -#### Signature - -```dotnet -public bool HasSkill(string key) -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/SignalWire/Skills/SkillManager.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillManager.cs) - -Line 125. - -*** - -### ListSkills() - -#### Signature - -```dotnet -public List ListSkills() -``` - -#### Returns - -`List` - -#### Source - -[`src/SignalWire/Skills/SkillManager.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillManager.cs) - -Line 118. - -*** - -### LoadSkill(string, Dictionary\?) - -Load a skill by name (resolved via registry) or by explicit type. -Returns (success, errorMessage). - -#### Signature - -```dotnet -public (bool Success, string Error) LoadSkill(string skillName, Dictionary? parameters = null) -``` - -#### Parameters - - - - - -#### Returns - -`System.ValueTuple` - -#### Source - -[`src/SignalWire/Skills/SkillManager.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillManager.cs) - -Line 31. - -*** - -### SkillManager(AgentBase) - -#### Signature - -```dotnet -public SkillManager(AgentBase agent) -``` - -#### Parameters - - - -#### Source - -[`src/SignalWire/Skills/SkillManager.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillManager.cs) - -Line 16. - -*** - -### UnloadSkill(string) - -#### Signature - -```dotnet -public bool UnloadSkill(string key) -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/SignalWire/Skills/SkillManager.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillManager.cs) - -Line 105. - -## Source - -[`src/SignalWire/Skills/SkillManager.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillManager.cs) - -Line 9. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.skills/skill-name-extensions/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.skills/skill-name-extensions/index.mdx deleted file mode 100644 index 8c9dec8659..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.skills/skill-name-extensions/index.mdx +++ /dev/null @@ -1,62 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.skills/skill-name-extensions" -title: "SkillNameExtensions" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.Skills.SkillNameExtensions" - parent: "SignalWire.Skills" - module: "SignalWire.Skills" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillName.cs" - visibility: "public" ---- -# `SkillNameExtensions` - -Maps <xref href="SignalWire.Skills.SkillName" data-throw-if-not-resolved="false"></xref> members to the canonical snake\_case wire names -that <xref href="SignalWire.Skills.SkillRegistry" data-throw-if-not-resolved="false"></xref> registers. - -**Modifiers:** `static` - -## Signature - -```dotnet -public static class SkillNameExtensions -``` - -## Methods - -### ToWireName(SkillName) - -The canonical snake\_case skill name (the string a skill's -`Name` property returns and that <xref href="SignalWire.Skills.SkillRegistry" data-throw-if-not-resolved="false"></xref> keys on). - -**Modifiers:** `static` - -#### Signature - -```dotnet -public static string ToWireName(this SkillName name) -``` - -#### Parameters - - - -#### Returns - -`string` - -#### Source - -[`src/SignalWire/Skills/SkillName.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillName.cs) - -Line 118. - -## Source - -[`src/SignalWire/Skills/SkillName.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillName.cs) - -Line 90. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.skills/skill-registry/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.skills/skill-registry/index.mdx deleted file mode 100644 index e308f90fef..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.skills/skill-registry/index.mdx +++ /dev/null @@ -1,189 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.skills/skill-registry" -title: "SkillRegistry" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.Skills.SkillRegistry" - parent: "SignalWire.Skills" - module: "SignalWire.Skills" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillRegistry.cs" - visibility: "public" ---- -# `SkillRegistry` - -Thread-safe singleton that maps snake\_case skill names to factory delegates. -All 18 built-in skills are registered lazily on first access. - -**Modifiers:** `sealed` - -## Signature - -```dotnet -public sealed class SkillRegistry -``` - -## Properties - - - External skill-source paths added via <xref href="SignalWire.Skills.SkillRegistry.AddSkillDirectory(System.String)" data-throw-if-not-resolved="false"></xref>. - - - - - - The skill\_registry logger. (Python parity: `SkillRegistry.logger` instance attribute.) - - -## Methods - -### AddSkillDirectory(string) - -Add a directory to the external skill-source path list. -.NET ports loading skills from disk SHOULD consult this list. -Throws when the path does not exist or is not a directory. -(Python parity: `SkillRegistry.add_skill_directory(path)`.) - -#### Signature - -```dotnet -public void AddSkillDirectory(string path) -``` - -#### Parameters - - - -#### Source - -[`src/SignalWire/Skills/SkillRegistry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillRegistry.cs) - -Line 119. - -*** - -### DiscoverSkills() - -Discover and return all available skills. -Skills resolve on-demand, so there is nothing to eagerly register; -this returns the discoverable inventory (mirrors <xref href="SignalWire.Skills.SkillRegistry.ListSkills" data-throw-if-not-resolved="false"></xref>). -(Python parity: `SkillRegistry.discover_skills` now returns -`list_skills()` — it was a no-op until the reference stub was fixed.) - -#### Signature - -```dotnet -public List DiscoverSkills() -``` - -#### Returns - -`List` - -#### Source - -[`src/SignalWire/Skills/SkillRegistry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillRegistry.cs) - -Line 100. - -*** - -### GetFactory(string) - -Get the factory for a skill name. Checks custom registrations first, -then falls back to built-in factories. - -#### Signature - -```dotnet -public Func? GetFactory(string name) -``` - -#### Parameters - - - -#### Returns - -`System.Func` - -#### Source - -[`src/SignalWire/Skills/SkillRegistry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillRegistry.cs) - -Line 138. - -*** - -### ListSkills() - -Return all known skill names (builtins + custom), sorted. - -#### Signature - -```dotnet -public List ListSkills() -``` - -#### Returns - -`List` - -#### Source - -[`src/SignalWire/Skills/SkillRegistry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillRegistry.cs) - -Line 161. - -*** - -### RegisterSkill(string, Func\) - -Register a custom skill factory. - -#### Signature - -```dotnet -public void RegisterSkill(string name, Func factory) -``` - -#### Parameters - - - - - -#### Source - -[`src/SignalWire/Skills/SkillRegistry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillRegistry.cs) - -Line 87. - -*** - -### Reset() - -Reset the singleton (for testing). - -**Modifiers:** `static` - -#### Signature - -```dotnet -public static void Reset() -``` - -#### Source - -[`src/SignalWire/Skills/SkillRegistry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillRegistry.cs) - -Line 78. - -## Source - -[`src/SignalWire/Skills/SkillRegistry.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Skills/SkillRegistry.cs) - -Line 9. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.swaig/callback-method-extensions/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.swaig/callback-method-extensions/index.mdx deleted file mode 100644 index 445e397f06..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.swaig/callback-method-extensions/index.mdx +++ /dev/null @@ -1,62 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.swaig/callback-method-extensions" -title: "CallbackMethodExtensions" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.SWAIG.CallbackMethodExtensions" - parent: "SignalWire.SWAIG" - module: "SignalWire.SWAIG" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/CallbackMethod.cs" - visibility: "public" ---- -# `CallbackMethodExtensions` - -Maps <xref href="SignalWire.SWAIG.CallbackMethod" data-throw-if-not-resolved="false"></xref> members to the canonical wire values -(uppercase HTTP verbs) that the SWML `join_conference` action expects on -its `status_callback_method` / `recording_status_callback_method` keys. - -**Modifiers:** `static` - -## Signature - -```dotnet -public static class CallbackMethodExtensions -``` - -## Methods - -### ToWireName(CallbackMethod) - -The canonical HTTP-verb string for the callback-method keys. - -**Modifiers:** `static` - -#### Signature - -```dotnet -public static string ToWireName(this CallbackMethod method) -``` - -#### Parameters - - - -#### Returns - -`string` - -#### Source - -[`src/SignalWire/SWAIG/CallbackMethod.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/CallbackMethod.cs) - -Line 44. - -## Source - -[`src/SignalWire/SWAIG/CallbackMethod.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/CallbackMethod.cs) - -Line 35. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.swaig/codec-extensions/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.swaig/codec-extensions/index.mdx deleted file mode 100644 index 9dcd81e1dd..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.swaig/codec-extensions/index.mdx +++ /dev/null @@ -1,63 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.swaig/codec-extensions" -title: "CodecExtensions" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.SWAIG.CodecExtensions" - parent: "SignalWire.SWAIG" - module: "SignalWire.SWAIG" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/Codec.cs" - visibility: "public" ---- -# `CodecExtensions` - -Maps <xref href="SignalWire.SWAIG.Codec" data-throw-if-not-resolved="false"></xref> members to the canonical wire values that the SWML -`tap` action expects. - -**Modifiers:** `static` - -## Signature - -```dotnet -public static class CodecExtensions -``` - -## Methods - -### ToWireName(Codec) - -The canonical codec string (the value placed on the `tap.codec` key -in the emitted SWML). The strings are upper-case and matched exactly, -mirroring the Python reference's literal `["PCMU", "PCMA"]` check. - -**Modifiers:** `static` - -#### Signature - -```dotnet -public static string ToWireName(this Codec codec) -``` - -#### Parameters - - - -#### Returns - -`string` - -#### Source - -[`src/SignalWire/SWAIG/Codec.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/Codec.cs) - -Line 63. - -## Source - -[`src/SignalWire/SWAIG/Codec.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/Codec.cs) - -Line 50. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.swaig/conference-beep-extensions/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.swaig/conference-beep-extensions/index.mdx deleted file mode 100644 index 2c8d705cec..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.swaig/conference-beep-extensions/index.mdx +++ /dev/null @@ -1,61 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.swaig/conference-beep-extensions" -title: "ConferenceBeepExtensions" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.SWAIG.ConferenceBeepExtensions" - parent: "SignalWire.SWAIG" - module: "SignalWire.SWAIG" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ConferenceBeep.cs" - visibility: "public" ---- -# `ConferenceBeepExtensions` - -Maps <xref href="SignalWire.SWAIG.ConferenceBeep" data-throw-if-not-resolved="false"></xref> members to the canonical wire values that -the SWML `join_conference` action expects on its `beep` key. - -**Modifiers:** `static` - -## Signature - -```dotnet -public static class ConferenceBeepExtensions -``` - -## Methods - -### ToWireName(ConferenceBeep) - -The canonical beep string placed on the `join_conference.beep` key. - -**Modifiers:** `static` - -#### Signature - -```dotnet -public static string ToWireName(this ConferenceBeep beep) -``` - -#### Parameters - - - -#### Returns - -`string` - -#### Source - -[`src/SignalWire/SWAIG/ConferenceBeep.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ConferenceBeep.cs) - -Line 53. - -## Source - -[`src/SignalWire/SWAIG/ConferenceBeep.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ConferenceBeep.cs) - -Line 42. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.swaig/conference-record-extensions/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.swaig/conference-record-extensions/index.mdx deleted file mode 100644 index 743d857bc9..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.swaig/conference-record-extensions/index.mdx +++ /dev/null @@ -1,61 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.swaig/conference-record-extensions" -title: "ConferenceRecordExtensions" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.SWAIG.ConferenceRecordExtensions" - parent: "SignalWire.SWAIG" - module: "SignalWire.SWAIG" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ConferenceRecord.cs" - visibility: "public" ---- -# `ConferenceRecordExtensions` - -Maps <xref href="SignalWire.SWAIG.ConferenceRecord" data-throw-if-not-resolved="false"></xref> members to the canonical wire values that -the SWML `join_conference` action expects on its `record` key. - -**Modifiers:** `static` - -## Signature - -```dotnet -public static class ConferenceRecordExtensions -``` - -## Methods - -### ToWireName(ConferenceRecord) - -The canonical record string placed on the `join_conference.record` key. - -**Modifiers:** `static` - -#### Signature - -```dotnet -public static string ToWireName(this ConferenceRecord record) -``` - -#### Parameters - - - -#### Returns - -`string` - -#### Source - -[`src/SignalWire/SWAIG/ConferenceRecord.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ConferenceRecord.cs) - -Line 45. - -## Source - -[`src/SignalWire/SWAIG/ConferenceRecord.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ConferenceRecord.cs) - -Line 36. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.swaig/conference-trim-extensions/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.swaig/conference-trim-extensions/index.mdx deleted file mode 100644 index f1085b590e..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.swaig/conference-trim-extensions/index.mdx +++ /dev/null @@ -1,61 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.swaig/conference-trim-extensions" -title: "ConferenceTrimExtensions" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.SWAIG.ConferenceTrimExtensions" - parent: "SignalWire.SWAIG" - module: "SignalWire.SWAIG" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ConferenceTrim.cs" - visibility: "public" ---- -# `ConferenceTrimExtensions` - -Maps <xref href="SignalWire.SWAIG.ConferenceTrim" data-throw-if-not-resolved="false"></xref> members to the canonical wire values that -the SWML `join_conference` action expects on its `trim` key. - -**Modifiers:** `static` - -## Signature - -```dotnet -public static class ConferenceTrimExtensions -``` - -## Methods - -### ToWireName(ConferenceTrim) - -The canonical trim string placed on the `join_conference.trim` key. - -**Modifiers:** `static` - -#### Signature - -```dotnet -public static string ToWireName(this ConferenceTrim trim) -``` - -#### Parameters - - - -#### Returns - -`string` - -#### Source - -[`src/SignalWire/SWAIG/ConferenceTrim.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ConferenceTrim.cs) - -Line 42. - -## Source - -[`src/SignalWire/SWAIG/ConferenceTrim.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ConferenceTrim.cs) - -Line 33. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.swaig/function-result/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.swaig/function-result/index.mdx deleted file mode 100644 index d9ada236f6..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.swaig/function-result/index.mdx +++ /dev/null @@ -1,1797 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.swaig/function-result" -title: "FunctionResult" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.SWAIG.FunctionResult" - parent: "SignalWire.SWAIG" - module: "SignalWire.SWAIG" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs" - visibility: "public" ---- -# `FunctionResult` - -Builds a SWAIG function result with an optional response, actions, and post-processing flag. -All action methods return `this` for fluent chaining. - -## Signature - -```dotnet -public class FunctionResult -``` - -## Methods - -### AddAction - -Append an action with the given name and arbitrary data -payload. Matches Python's `add_action(name, data)`. - -#### Signature - - - - ```dotnet - public FunctionResult AddAction(string name, object data) - ``` - - - - ```dotnet - public FunctionResult AddAction(Dictionary action) - ``` - - - -#### Parameters (Overload 1) - - - - - -#### Parameters (Overload 2) - - - -#### Returns (Overload 1) - -`SignalWire.SWAIG.FunctionResult` - -#### Returns (Overload 2) - -`SignalWire.SWAIG.FunctionResult` - -#### Source - -[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) - -Line 38. - -*** - -### AddActions(IEnumerable\>) - -#### Signature - -```dotnet -public FunctionResult AddActions(IEnumerable> actions) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.SWAIG.FunctionResult` - -#### Source - -[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) - -Line 52. - -*** - -### AddDynamicHints(List\) - -#### Signature - -```dotnet -public FunctionResult AddDynamicHints(List hints) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.SWAIG.FunctionResult` - -#### Source - -[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) - -Line 615. - -*** - -### ClearDynamicHints() - -#### Signature - -```dotnet -public FunctionResult ClearDynamicHints() -``` - -#### Returns - -`SignalWire.SWAIG.FunctionResult` - -#### Source - -[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) - -Line 621. - -*** - -### Connect(string, bool, string?) - -#### Signature - -```dotnet -public FunctionResult Connect(string destination, bool final = true, string? fromAddr = null) -``` - -#### Parameters - - - - - - - -#### Returns - -`SignalWire.SWAIG.FunctionResult` - -#### Source - -[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) - -Line 108. - -*** - -### CreatePaymentAction(string, string) - -Create a payment action for use in payment prompts. - -**Remarks:** Parity with the Python reference `create_payment_action(action_type, phrase)`: -returns `{"type": actionType, "phrase": phrase}`. <code class="paramref">actionType</code> -is `"Say"` (text-to-speech) or `"Play"` (audio file URL). - -**Modifiers:** `static` - -#### Signature - -```dotnet -public static Dictionary CreatePaymentAction(string actionType, string phrase) -``` - -#### Parameters - - - - - -#### Returns - -`Dictionary` - -#### Source - -[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) - -Line 1376. - -*** - -### CreatePaymentParameter(string, string) - -Create a payment parameter (name/value pair) for use with <xref href="SignalWire.SWAIG.FunctionResult.Pay(System.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.Int32%2cSystem.Int32%2cSystem.Boolean%2cSystem.Object%2cSystem.Int32%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.Collections.Generic.List%7bSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.String%7d%7d%2cSystem.Collections.Generic.List%7bSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%7d%2cSystem.String)" data-throw-if-not-resolved="false"></xref>. - -**Remarks:** Parity with the Python reference `create_payment_parameter(name, value)`: -returns `{"name": name, "value": value}`. - -**Modifiers:** `static` - -#### Signature - -```dotnet -public static Dictionary CreatePaymentParameter(string name, string value) -``` - -#### Parameters - - - - - -#### Returns - -`Dictionary` - -#### Source - -[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) - -Line 1392. - -*** - -### CreatePaymentPrompt(string, List\>, string?, string?) - -Create a payment-prompt structure for use with <xref href="SignalWire.SWAIG.FunctionResult.Pay(System.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.Int32%2cSystem.Int32%2cSystem.Boolean%2cSystem.Object%2cSystem.Int32%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.Collections.Generic.List%7bSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.String%7d%7d%2cSystem.Collections.Generic.List%7bSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%7d%2cSystem.String)" data-throw-if-not-resolved="false"></xref>. - -**Remarks:** Parity with the Python reference -`create_payment_prompt(for_situation, actions, card_type=None, error_type=None)`: -returns `{"for": forSituation, "actions": actions, "card_type"?, "error_type"?}`. -The situation string is keyed `for` (a C# keyword, hence the parameter -is <code class="paramref">forSituation</code>); `card_type`/`error_type` are -included only when supplied. - -**Modifiers:** `static` - -#### Signature - -```dotnet -public static Dictionary CreatePaymentPrompt(string forSituation, List> actions, string? cardType = null, string? errorType = null) -``` - -#### Parameters - - - - - Actions with `type`/`phrase` keys (see <xref href="SignalWire.SWAIG.FunctionResult.CreatePaymentAction(System.String%2cSystem.String)" data-throw-if-not-resolved="false"></xref>). - - - - - - -#### Returns - -`Dictionary` - -#### Source - -[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) - -Line 1350. - -*** - -### EnableExtensiveData(bool) - -#### Signature - -```dotnet -public FunctionResult EnableExtensiveData(bool enabled = true) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.SWAIG.FunctionResult` - -#### Source - -[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) - -Line 667. - -*** - -### EnableFunctionsOnTimeout(bool) - -#### Signature - -```dotnet -public FunctionResult EnableFunctionsOnTimeout(bool enabled = true) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.SWAIG.FunctionResult` - -#### Source - -[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) - -Line 660. - -*** - -### ExecuteRpc(string, Dictionary\?, string?, string?) - -Execute an RPC method on a call using SWML. - -**Remarks:** Parity with the Python reference -`execute_rpc(method, params=None, call_id=None, node_id=None)`: the -rpc params dict is keyed `{method, call_id?, node_id?, params?}` — -`call_id`/`node_id` are TOP-LEVEL siblings of `method`/`params`, -NOT nested inside `params` — and the `{execute_rpc: …}` verb is -wrapped in a full SWML document under the `SWML` action key. There is -no `jsonrpc` envelope, and method strings are bare (e.g. `"dial"`, -not `"calling.dial"`). `params` is omitted when empty. - -#### Signature - -```dotnet -public FunctionResult ExecuteRpc(string method, Dictionary? @params = null, string? callId = null, string? nodeId = null) -``` - -#### Parameters - - - - - - - - - -#### Returns - -`SignalWire.SWAIG.FunctionResult` - -#### Source - -[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) - -Line 1241. - -*** - -### ExecuteSwml(object, bool) - -Execute SWML content with optional transfer behavior. - -**Remarks:** Mirrors the Python reference `execute_swml(swml_content, transfer=False)`: -the content (a dict, or a JSON string parsed to a dict) is emitted verbatim -under the `SWML` action key. When <code class="paramref">transfer</code> is true, -a `"transfer": "true"` entry is added INSIDE that SWML dict (Python does -`action["transfer"] = "true"` on the SWML payload itself — there is no -separate `transfer_swml` action name). A JSON string that fails to parse -is wrapped as `{ "raw_swml": <text> }`, matching the reference. - -#### Signature - -```dotnet -public FunctionResult ExecuteSwml(object swmlContent, bool transfer = false) -``` - -#### Parameters - - - - - -#### Returns - -`SignalWire.SWAIG.FunctionResult` - -#### Throws - -- `System.ArgumentException` — If <code class="paramref">swmlContent</code> is neither a string nor a dictionary (parity with Python's `TypeError`). - -#### Source - -[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) - -Line 701. - -*** - -### FunctionResult(string?, bool) - -#### Signature - -```dotnet -public FunctionResult(string? response = null, bool postProcess = false) -``` - -#### Parameters - - - - - -#### Source - -[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) - -Line 14. - -*** - -### Hangup() - -#### Signature - -```dotnet -public FunctionResult Hangup() -``` - -#### Returns - -`SignalWire.SWAIG.FunctionResult` - -#### Source - -[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) - -Line 172. - -*** - -### Hold(int) - -#### Signature - -```dotnet -public FunctionResult Hold(int timeout = 300) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.SWAIG.FunctionResult` - -#### Source - -[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) - -Line 180. - -*** - -### JoinConference - -Join an ad-hoc audio conference (RELAY + CXML calls) using SWML. -Full parity with the Python reference -`signalwire/core/function_result.py::join_conference`: the conference <code class="paramref">name</code> plus 18 optional parameters, each validated to the -same closed sets / bounds as Python, and emitted under its snake\_case wire -key only when it differs from its default. When every parameter is at its -default the action value is the bare conference-name string (simple form); -otherwise it is a `{ "name": ..., ... }` object (full form). - -**Remarks:** This flat, all-string overload is the parity-bearing signature against the -Python reference (which takes bare `str` arguments for the closed sets). -For an idiomatic, compile-time-checked alternative see <xref href="SignalWire.SWAIG.FunctionResult.JoinConference(System.String%2cSignalWire.SWAIG.JoinConferenceOptions)" data-throw-if-not-resolved="false"></xref>, which accepts -the typed <xref href="SignalWire.SWAIG.ConferenceBeep" data-throw-if-not-resolved="false"></xref> / <xref href="SignalWire.SWAIG.ConferenceRecord" data-throw-if-not-resolved="false"></xref> / <xref href="SignalWire.SWAIG.ConferenceTrim" data-throw-if-not-resolved="false"></xref> / <xref href="SignalWire.SWAIG.CallbackMethod" data-throw-if-not-resolved="false"></xref> enums and -delegates straight here so the emitted SWML is identical. - -#### Signature - - - - ```dotnet - public FunctionResult JoinConference(string name, bool muted = false, string beep = "true", bool startOnEnter = true, bool endOnExit = false, string? waitUrl = null, int maxParticipants = 250, string record = "do-not-record", string? region = null, string trim = "trim-silence", string? coach = null, string? statusCallbackEvent = null, string? statusCallback = null, string statusCallbackMethod = "POST", string? recordingStatusCallback = null, string recordingStatusCallbackMethod = "POST", string recordingStatusCallbackEvent = "completed", object? result = null) - ``` - - - - ```dotnet - public FunctionResult JoinConference(string name, JoinConferenceOptions? options) - ``` - - - -#### Parameters (Overload 1) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -#### Parameters (Overload 2) - - - - - -#### Returns (Overload 1) - -`SignalWire.SWAIG.FunctionResult` - -#### Returns (Overload 2) - -`SignalWire.SWAIG.FunctionResult` - -#### Throws - -- `System.ArgumentException` — If <code class="paramref">beep</code>, <code class="paramref">record</code>, <code class="paramref">trim</code>, <code class="paramref">statusCallbackMethod</code>, or <code class="paramref">recordingStatusCallbackMethod</code> is outside its closed set, if <code class="paramref">maxParticipants</code> is not in 1..=250, or if <code class="paramref">name</code> is empty/whitespace. - -#### Source - -[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) - -Line 786. - -*** - -### JoinRoom(string) - -Join a RELAY room using SWML. - -**Remarks:** Parity with the Python reference `join_room(name)`: the -`join_room` verb (params `{name}`) is wrapped in a SWML document -and emitted under the `SWML` action key. - -#### Signature - -```dotnet -public FunctionResult JoinRoom(string name) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.SWAIG.FunctionResult` - -#### Source - -[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) - -Line 931. - -*** - -### Pay(string, string, string?, string, int, int, bool, object?, int, string, string?, string, string, string, string?, string, List\>?, List\>?, string?) - -Process a payment using the SWML `pay` verb. - -**Remarks:** Full parity with the Python reference <code>pay(payment\_connector\_url, input\_method="dtmf", status\_url=None, -payment\_method="credit-card", timeout=5, max\_attempts=1, security\_code=True, -postal\_code=True, min\_postal\_code\_length=0, token\_type="reusable", -charge\_amount=None, currency="usd", language="en-US", voice="woman", -description=None, valid\_card\_types="visa mastercard amex", parameters=None, -prompts=None, ai\_response=…)</code>. The SWML document is a two-verb main -section — a leading `{set: {ai_response: …}}` followed by -`{pay: …}` — routed through <xref href="SignalWire.SWAIG.FunctionResult.ExecuteSwml(System.Object%2cSystem.Boolean)" data-throw-if-not-resolved="false"></xref> under the -`SWML` action key (NOT a bare top-level `pay`). - -<p> -Wire-shape details matching Python: the collection-method key is -`input` (NOT `input_method`); numeric and boolean fields are -emitted as STRINGS (`"5"`/`"true"`); <code class="paramref">postalCode</code> -is a lowercased bool-string when boolean, or verbatim when a string. The -optional fields (status_url/charge_amount/description/parameters/prompts) -are emitted only when supplied. -</p> - -#### Signature - -```dotnet -public FunctionResult Pay(string paymentConnectorUrl, string inputMethod = "dtmf", string? statusUrl = null, string paymentMethod = "credit-card", int timeout = 5, int maxAttempts = 1, bool securityCode = true, object? postalCode = null, int minPostalCodeLength = 0, string tokenType = "reusable", string? chargeAmount = null, string currency = "usd", string language = "en-US", string voice = "woman", string? description = null, string validCardTypes = "visa mastercard amex", List>? parameters = null, List>? prompts = null, string? aiResponse = "The payment status is ${pay_result}, do not mention anything else about collecting payment if successful.") -``` - -#### Parameters - - - - - - - - - - - - - - - - - Prompt-for-postal flag (`bool`) or an actual postcode (`string`); pass a <xref href="System.Boolean" data-throw-if-not-resolved="false"></xref> or a <xref href="System.String" data-throw-if-not-resolved="false"></xref>. - - - - - - - - - - - - - - - - - - - - Name/value pairs forwarded to the payment connector. - - - - Custom prompt configurations (see <xref href="SignalWire.SWAIG.FunctionResult.CreatePaymentPrompt(System.String%2cSystem.Collections.Generic.List%7bSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.String%7d%7d%2cSystem.String%2cSystem.String)" data-throw-if-not-resolved="false"></xref>). - - - - -#### Returns - -`SignalWire.SWAIG.FunctionResult` - -#### Source - -[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) - -Line 1154. - -*** - -### PlayBackgroundFile(string, bool) - -Play an audio or video file in the background. - -**Remarks:** Parity with the Python reference `play_background_file(filename, wait=False)`: -the action key is "playback\_bg". When <code class="paramref">wait</code> is false the -value is the bare filename string; when true it is a -`{file: filename, wait: true}` object. - -#### Signature - -```dotnet -public FunctionResult PlayBackgroundFile(string filename, bool wait = false) -``` - -#### Parameters - - - - - -#### Returns - -`SignalWire.SWAIG.FunctionResult` - -#### Source - -[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) - -Line 427. - -*** - -### RecordCall - -Start background call recording using SWML — canonical, full-arity -overload with the two closed-set arguments (<code class="paramref">format</code> / <code class="paramref">direction</code>) as the typed <xref href="SignalWire.SWAIG.RecordFormat" data-throw-if-not-resolved="false"></xref> / <xref href="SignalWire.SWAIG.RecordDirection" data-throw-if-not-resolved="false"></xref> enums. - -**Remarks:** Full parity with the Python reference <code>record\_call(control\_id, stereo, format, direction, terminators, beep, -input\_sensitivity, initial\_timeout, end\_silence\_timeout, max\_length, -status\_url)</code>, in the same parameter order. The Python reference -validates the bare-string `format`/`direction` against the closed -sets \{wav,mp3,mp4\} / \{speak,listen,both\}; this overload surfaces those -knowable sets as enums so a bad value is a compile error rather than a -runtime `ValueError` (a same-arity bare-string overload preserves the -Python `str` path — see <xref href="SignalWire.SWAIG.FunctionResult.RecordCall(System.String%2cSystem.Boolean%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.Boolean%2cSystem.Double%2cSystem.Nullable%7bSystem.Double%7d%2cSystem.Nullable%7bSystem.Double%7d%2cSystem.Nullable%7bSystem.Double%7d%2cSystem.String)" data-throw-if-not-resolved="false"></xref>). -The `record_call` verb is wrapped in a SWML document -(`{version, sections: {main: [{record_call: ...}]}}`) and emitted under -the `SWML` action key — there is no bare top-level `record_call` -action and no invented `initiator` key. `stereo`, `format`, -`direction`, `beep`, and `input_sensitivity` are ALWAYS -emitted (Python emits them unconditionally); the remaining parameters are -emitted only when set. - -#### Signature - - - - ```dotnet - public FunctionResult RecordCall(string controlId = "", bool stereo = false, RecordFormat format = RecordFormat.Wav, RecordDirection direction = RecordDirection.Both, string? terminators = null, bool beep = false, double inputSensitivity = 44, double? initialTimeout = null, double? endSilenceTimeout = null, double? maxLength = null, string? statusUrl = null) - ``` - - - - ```dotnet - public FunctionResult RecordCall(string controlId = "", bool stereo = false, string format = "wav", string direction = "both", string? terminators = null, bool beep = false, double inputSensitivity = 44, double? initialTimeout = null, double? endSilenceTimeout = null, double? maxLength = null, string? statusUrl = null) - ``` - - - -#### Parameters (Overload 1) - - - - - - - - - - - - - - - - - - - - - - - -#### Parameters (Overload 2) - - - - - - - - - - - - - - - - - - - - - - - -#### Returns (Overload 1) - -`SignalWire.SWAIG.FunctionResult` - -#### Returns (Overload 2) - -`SignalWire.SWAIG.FunctionResult` - -#### Source - -[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) - -Line 478. - -*** - -### RemoveGlobalData - -Single-key overload of <xref href="SignalWire.SWAIG.FunctionResult.RemoveGlobalData(System.Collections.Generic.List%7bSystem.String%7d)" data-throw-if-not-resolved="false"></xref>. - -**Remarks:** Python's `remove_global_data(keys: Union[str, List[str]])` accepts a -bare string AND a list; the bare-string call emits the action value as the -bare string (`{"unset_global_data": "plan"}`), NOT a one-element list. -This overload surfaces that arm so the emission is byte-identical to the -reference for a single key. - -#### Signature - - - - ```dotnet - public FunctionResult RemoveGlobalData(List keys) - ``` - - - - ```dotnet - public FunctionResult RemoveGlobalData(string key) - ``` - - - -#### Parameters (Overload 1) - - - -#### Parameters (Overload 2) - - - -#### Returns (Overload 1) - -`SignalWire.SWAIG.FunctionResult` - -#### Returns (Overload 2) - -`SignalWire.SWAIG.FunctionResult` - -#### Source - -[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) - -Line 231. - -*** - -### RemoveMetadata - -Single-key overload of <xref href="SignalWire.SWAIG.FunctionResult.RemoveMetadata(System.Collections.Generic.List%7bSystem.String%7d)" data-throw-if-not-resolved="false"></xref>. - -**Remarks:** Python's `remove_metadata(keys: Union[str, List[str]])` accepts a bare -string AND a list; the bare-string call emits the action value as the bare -string (`{"unset_meta_data": "token"}`), NOT a one-element list. This -overload surfaces that arm so the emission is byte-identical to the -reference for a single key. - -#### Signature - - - - ```dotnet - public FunctionResult RemoveMetadata(List keys) - ``` - - - - ```dotnet - public FunctionResult RemoveMetadata(string key) - ``` - - - -#### Parameters (Overload 1) - - - -#### Parameters (Overload 2) - - - -#### Returns (Overload 1) - -`SignalWire.SWAIG.FunctionResult` - -#### Returns (Overload 2) - -`SignalWire.SWAIG.FunctionResult` - -#### Source - -[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) - -Line 262. - -*** - -### ReplaceInHistory(object?) - -Replace conversation history. Accepts `true` (default) for the -summary placeholder or a string for custom replacement text. -Matches Python's `replace_in_history(text: Union[bool, str] = True)`. - -#### Signature - -```dotnet -public FunctionResult ReplaceInHistory(object? text = null) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.SWAIG.FunctionResult` - -#### Source - -[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) - -Line 398. - -*** - -### RpcAiMessage(string, string, string) - -Inject a message into an AI agent on another call using <xref href="SignalWire.SWAIG.FunctionResult.ExecuteRpc(System.String%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%2cSystem.String%2cSystem.String)" data-throw-if-not-resolved="false"></xref>. - -**Remarks:** Parity with the Python reference -`rpc_ai_message(call_id, message_text, role="system")`: emits -`method="ai_message"`, `call_id` as a top-level sibling, and -`params={role, message_text}`. <code class="paramref">role</code> remains -caller-overridable (defaults to `"system"`), not hard-coded. - -#### Signature - -```dotnet -public FunctionResult RpcAiMessage(string callId, string messageText, string role = "system") -``` - -#### Parameters - - - - - - - -#### Returns - -`SignalWire.SWAIG.FunctionResult` - -#### Source - -[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) - -Line 1298. - -*** - -### RpcAiUnhold(string) - -Unhold another call using <xref href="SignalWire.SWAIG.FunctionResult.ExecuteRpc(System.String%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%2cSystem.String%2cSystem.String)" data-throw-if-not-resolved="false"></xref>. - -**Remarks:** Parity with the Python reference `rpc_ai_unhold(call_id)`: emits -`method="ai_unhold"`, `call_id` as a top-level sibling, and -`params={}` (empty → omitted by <xref href="SignalWire.SWAIG.FunctionResult.ExecuteRpc(System.String%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%2cSystem.String%2cSystem.String)" data-throw-if-not-resolved="false"></xref>). - -#### Signature - -```dotnet -public FunctionResult RpcAiUnhold(string callId) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.SWAIG.FunctionResult` - -#### Source - -[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) - -Line 1315. - -*** - -### RpcDial(string, string, string, string) - -Dial out to a number with a destination SWML URL using <xref href="SignalWire.SWAIG.FunctionResult.ExecuteRpc(System.String%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%2cSystem.String%2cSystem.String)" data-throw-if-not-resolved="false"></xref>. - -**Remarks:** Parity with the Python reference -`rpc_dial(to_number, from_number, dest_swml, device_type="phone")`: -emits `method="dial"` with -`params={devices: {type: device_type, params: {to_number, from_number}}, dest_swml}`. <code class="paramref">deviceType</code> remains caller-overridable (defaults to -`"phone"`), not hard-coded. - -#### Signature - -```dotnet -public FunctionResult RpcDial(string toNumber, string fromNumber, string destSwml, string deviceType = "phone") -``` - -#### Parameters - - - - - - - - - -#### Returns - -`SignalWire.SWAIG.FunctionResult` - -#### Source - -[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) - -Line 1267. - -*** - -### Say(string) - -#### Signature - -```dotnet -public FunctionResult Say(string text) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.SWAIG.FunctionResult` - -#### Source - -[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) - -Line 412. - -*** - -### SendSms(string, string, string?, List\?, List\?, string?) - -Send a text message to a PSTN phone number using SWML. - -**Remarks:** Full parity with the Python reference -`send_sms(to_number, from_number, body=None, media=None, tags=None, region=None)`. -Either <code class="paramref">body</code> or <code class="paramref">media</code> (or both) must be -provided. The `send_sms` verb is wrapped in a SWML document and emitted -under the `SWML` action key. `to_number`/`from_number` are -always present; `body`, `media`, `tags`, `region` are -added only when set. - -#### Signature - -```dotnet -public FunctionResult SendSms(string toNumber, string fromNumber, string? body = null, List? media = null, List? tags = null, string? region = null) -``` - -#### Parameters - - - - - - - - - - - - - -#### Returns - -`SignalWire.SWAIG.FunctionResult` - -#### Throws - -- `System.ArgumentException` — If neither <code class="paramref">body</code> nor <code class="paramref">media</code> is provided (parity with Python's `ValueError("Either body or media must be provided")`). - -#### Source - -[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) - -Line 1099. - -*** - -### SetEndOfSpeechTimeout(int) - -#### Signature - -```dotnet -public FunctionResult SetEndOfSpeechTimeout(int ms) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.SWAIG.FunctionResult` - -#### Source - -[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) - -Line 632. - -*** - -### SetMetadata(Dictionary\) - -#### Signature - -```dotnet -public FunctionResult SetMetadata(Dictionary data) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.SWAIG.FunctionResult` - -#### Source - -[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) - -Line 256. - -*** - -### SetPostProcess(bool) - -#### Signature - -```dotnet -public FunctionResult SetPostProcess(bool value) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.SWAIG.FunctionResult` - -#### Source - -[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) - -Line 30. - -*** - -### SetResponse(string) - -#### Signature - -```dotnet -public FunctionResult SetResponse(string text) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.SWAIG.FunctionResult` - -#### Source - -[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) - -Line 24. - -*** - -### SetSpeechEventTimeout(int) - -#### Signature - -```dotnet -public FunctionResult SetSpeechEventTimeout(int ms) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.SWAIG.FunctionResult` - -#### Source - -[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) - -Line 638. - -*** - -### SimulateUserInput(string) - -Queue simulated user input. - -**Remarks:** Parity with the Python reference `simulate_user_input(text)`: the -action key is `user_input` (NOT `simulate_user_input`), with the -bare text string as its value. - -#### Signature - -```dotnet -public FunctionResult SimulateUserInput(string text) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.SWAIG.FunctionResult` - -#### Source - -[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) - -Line 1328. - -*** - -### SipRefer(string) - -Send a SIP REFER to a SIP call using SWML. - -**Remarks:** Parity with the Python reference `sip_refer(to_uri)`: the -`sip_refer` verb (params `{to_uri}`) is wrapped in a SWML document -and emitted under the `SWML` action key. - -#### Signature - -```dotnet -public FunctionResult SipRefer(string toUri) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.SWAIG.FunctionResult` - -#### Source - -[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) - -Line 942. - -*** - -### Stop() - -#### Signature - -```dotnet -public FunctionResult Stop() -``` - -#### Returns - -`SignalWire.SWAIG.FunctionResult` - -#### Source - -[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) - -Line 215. - -*** - -### StopBackgroundFile() - -#### Signature - -```dotnet -public FunctionResult StopBackgroundFile() -``` - -#### Returns - -`SignalWire.SWAIG.FunctionResult` - -#### Source - -[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) - -Line 447. - -*** - -### StopRecordCall(string?) - -Stop an active background call recording using SWML. - -**Remarks:** Parity with the Python reference `stop_record_call(control_id=None)`: -the `stop_record_call` verb (params `{}`, plus `control_id` -when set) is wrapped in a SWML document and emitted under the `SWML` -action key. - -#### Signature - -```dotnet -public FunctionResult StopRecordCall(string? controlId = null) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.SWAIG.FunctionResult` - -#### Source - -[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) - -Line 604. - -*** - -### StopTap(string?) - -Stop an active tap stream using SWML. - -**Remarks:** Parity with the Python reference `stop_tap(control_id=None)`: the -`stop_tap` verb (params `{}`, plus `control_id` when set) is -wrapped in a SWML document and emitted under the `SWML` action key. - -#### Signature - -```dotnet -public FunctionResult StopTap(string? controlId = null) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.SWAIG.FunctionResult` - -#### Source - -[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) - -Line 1076. - -*** - -### SwitchContext(string?, string?, bool, bool) - -Change the agent's context/prompt during a conversation. - -**Remarks:** Parity with the Python reference -`switch_context(system_prompt=None, user_prompt=None, consolidate=False, full_reset=False)`: -when ONLY <code class="paramref">systemPrompt</code> is set (and the other three are -at their defaults) the `context_switch` value is the bare -system-prompt string (simple form); any other combination emits the object -form with each supplied field under its snake\_case key. There is no -`isolated` parameter (the Python reference does not define one). - -#### Signature - -```dotnet -public FunctionResult SwitchContext(string? systemPrompt = null, string? userPrompt = null, bool consolidate = false, bool fullReset = false) -``` - -#### Parameters - - - - - - - - - -#### Returns - -`SignalWire.SWAIG.FunctionResult` - -#### Source - -[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) - -Line 353. - -*** - -### SwmlChangeContext(string) - -Force the conversation into a different context. - -**Remarks:** Parity with the Python reference `swml_change_context(context_name)`: -add\_action("change\_context", context\_name) — the action key is -"change\_context" and its value is the bare context-name string. - -#### Signature - -```dotnet -public FunctionResult SwmlChangeContext(string contextName) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.SWAIG.FunctionResult` - -#### Source - -[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) - -Line 335. - -*** - -### SwmlChangeStep(string) - -Force the conversation into a specific step in the current context. - -**Remarks:** Parity with the Python reference `swml_change_step(step_name)`: -add\_action("change\_step", step\_name) — the action key is "change\_step" and -its value is the bare step-name string (not a context\_switch dict). - -#### Signature - -```dotnet -public FunctionResult SwmlChangeStep(string stepName) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.SWAIG.FunctionResult` - -#### Source - -[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) - -Line 321. - -*** - -### SwmlTransfer(string, string, bool) - -Add a SWML transfer action with an AI response set up for when the transfer -completes and control returns to the agent. - -**Remarks:** Parity with the Python reference `swml_transfer(dest, ai_response, final=True)`: -emits a two-verb SWML document — `{set: {ai_response: ...}}` then -`{transfer: {dest: ...}}` — under the `SWML` action key, plus a -top-level `"transfer": str(final).lower()` sibling marking the call -(non-)final. <code class="paramref">final</code> defaults to `true` (permanent -transfer), same as <xref href="SignalWire.SWAIG.FunctionResult.Connect(System.String%2cSystem.Boolean%2cSystem.String)" data-throw-if-not-resolved="false"></xref>. - -#### Signature - -```dotnet -public FunctionResult SwmlTransfer(string dest, string aiResponse, bool final = true) -``` - -#### Parameters - - - - - - - -#### Returns - -`SignalWire.SWAIG.FunctionResult` - -#### Source - -[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) - -Line 149. - -*** - -### SwmlUserEvent(Dictionary\) - -Send a user event through SWML to update the client UI. - -**Remarks:** Parity with the Python reference `swml_user_event(event_data)`: emits a -SWML document `{sections: {main: [{user_event: {event: <data>}}]}, version: "1.0.0"}` -under the `SWML` action key (NOT a bare top-level `user_event`). - -#### Signature - -```dotnet -public FunctionResult SwmlUserEvent(Dictionary eventData) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.SWAIG.FunctionResult` - -#### Source - -[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) - -Line 294. - -*** - -### Tap - -Start a background call tap using SWML — canonical, full-arity overload -with the two closed-set arguments (<code class="paramref">direction</code> / <code class="paramref">codec</code>) as the typed <xref href="SignalWire.SWAIG.TapDirection" data-throw-if-not-resolved="false"></xref> / <xref href="SignalWire.SWAIG.Codec" data-throw-if-not-resolved="false"></xref> enums. - -**Remarks:** Full parity with the Python reference -`tap(uri, control_id, direction, codec, rtp_ptime, status_url)`, in the -same parameter order. The Python reference validates the bare-string -`direction`/`codec` against the closed sets \{speak,hear,both\} / -\{PCMU,PCMA\}; this overload surfaces those knowable sets as enums so a bad -value is a compile error rather than a runtime `ValueError` (a -same-arity bare-string overload preserves the Python `str` path — see <xref href="SignalWire.SWAIG.FunctionResult.Tap(System.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.Int32%2cSystem.String)" data-throw-if-not-resolved="false"></xref>). The -`tap` verb is wrapped in a SWML document and emitted under the -`SWML` action key. Only `uri` is always present; `control_id`, -`direction`, `codec`, `rtp_ptime`, and `status_url` are -emitted only when they differ from their defaults (mirrors Python's per-key -guards). - -#### Signature - - - - ```dotnet - public FunctionResult Tap(string uri, string controlId = "", TapDirection direction = TapDirection.Both, Codec codec = Codec.Pcmu, int rtpPtime = 20, string? statusUrl = null) - ``` - - - - ```dotnet - public FunctionResult Tap(string uri, string controlId = "", string direction = "both", string codec = "PCMU", int rtpPtime = 20, string? statusUrl = null) - ``` - - - -#### Parameters (Overload 1) - - - - - - - - - - - - - -#### Parameters (Overload 2) - - - - - - - - - - - - - -#### Returns (Overload 1) - -`SignalWire.SWAIG.FunctionResult` - -#### Returns (Overload 2) - -`SignalWire.SWAIG.FunctionResult` - -#### Throws - -- `System.ArgumentException` — If <code class="paramref">rtpPtime</code> is not a positive integer (parity with Python's `ValueError`); <code class="paramref">direction</code>/<code class="paramref">codec</code> are closed-set enums and so cannot be invalid. - -#### Source - -[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) - -Line 971. - -*** - -### ToDict() - -Serialize to the JSON structure expected by SWAIG. - -**Remarks:** Byte-parity with the Python reference `to_dict()`: - -<ul><li>`response` is included ONLY when non-empty (an empty string is omitted).</li><li>`action` is included only when there is at least one action.</li><li>`post_process` is included only when it is `true` AND there are -actions to execute (it is meaningless without actions).</li><li>When neither `response` nor `action` would be present, a default -`response` of `"Action completed."` is emitted so the result is never empty.</li></ul> - -#### Signature - -```dotnet -public Dictionary ToDict() -``` - -#### Returns - -`Dictionary` - -#### Source - -[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) - -Line 75. - -*** - -### ToggleFunctions(List\>) - -Enable/disable specific SWAIG functions. - -**Remarks:** Parity with the Python reference `toggle_functions(function_toggles)`: -takes a list of toggle records (each a `{function, active}` dict) and -passes it through verbatim under the `toggle_functions` action key — no -reshaping. (The previous `Dictionary<string,bool>` shape both -changed the signature AND lost caller-controlled key ordering / extra keys.) - -#### Signature - -```dotnet -public FunctionResult ToggleFunctions(List> functionToggles) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.SWAIG.FunctionResult` - -#### Source - -[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) - -Line 654. - -*** - -### UpdateGlobalData(Dictionary\) - -#### Signature - -```dotnet -public FunctionResult UpdateGlobalData(Dictionary data) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.SWAIG.FunctionResult` - -#### Source - -[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) - -Line 225. - -*** - -### UpdateSettings(Dictionary\) - -#### Signature - -```dotnet -public FunctionResult UpdateSettings(Dictionary settings) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.SWAIG.FunctionResult` - -#### Source - -[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) - -Line 673. - -*** - -### WaitForUser(bool?, int?, bool) - -#### Signature - -```dotnet -public FunctionResult WaitForUser(bool? enabled = null, int? timeout = null, bool answerFirst = false) -``` - -#### Parameters - - - - - - - -#### Returns - -`SignalWire.SWAIG.FunctionResult` - -#### Source - -[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) - -Line 189. - -## Source - -[`src/SignalWire/SWAIG/FunctionResult.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/FunctionResult.cs) - -Line 8. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.swaig/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.swaig/index.mdx deleted file mode 100644 index 5e4bd98b57..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.swaig/index.mdx +++ /dev/null @@ -1,479 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.swaig" -title: "SignalWire.SWAIG" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "module" - language: "dotnet" - qualified_name: "SignalWire.SWAIG" ---- -# `SignalWire.SWAIG` - -## Classes - - - - Maps <xref href="SignalWire.SWAIG.CallbackMethod" data-throw-if-not-resolved="false"></xref> members to the canonical wire values (uppercase HTTP verbs) that the SWML `join_conference` action expects on its `status_callback_method` / `recording_status_callback_method` keys. - - - - Maps <xref href="SignalWire.SWAIG.Codec" data-throw-if-not-resolved="false"></xref> members to the canonical wire values that the SWML `tap` action expects. - - - - Maps <xref href="SignalWire.SWAIG.ConferenceBeep" data-throw-if-not-resolved="false"></xref> members to the canonical wire values that the SWML `join_conference` action expects on its `beep` key. - - - - Maps <xref href="SignalWire.SWAIG.ConferenceRecord" data-throw-if-not-resolved="false"></xref> members to the canonical wire values that the SWML `join_conference` action expects on its `record` key. - - - - Maps <xref href="SignalWire.SWAIG.ConferenceTrim" data-throw-if-not-resolved="false"></xref> members to the canonical wire values that the SWML `join_conference` action expects on its `trim` key. - - - - Builds a SWAIG function result with an optional response, actions, and post-processing flag. All action methods return `this` for fluent chaining. - - - - Typed options bag for the convenience overload <xref href="SignalWire.SWAIG.FunctionResult.JoinConference(System.String%2cSignalWire.SWAIG.JoinConferenceOptions)" data-throw-if-not-resolved="false"></xref>. - - - - Fluent, type-safe builder for a SWAIG tool's `parameters` — the JSON-Schema `properties` map passed as the third argument to <xref href="SignalWire.SWML.Service.DefineTool(System.String%2cSystem.String%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%2cSystem.Func%7bSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%2cSignalWire.SWAIG.FunctionResult%7d%2cSystem.Boolean)" data-throw-if-not-resolved="false"></xref> / SignalWire.Agent.AgentBase.DefineTool. - - - - Maps <xref href="SignalWire.SWAIG.RecordDirection" data-throw-if-not-resolved="false"></xref> members to the canonical wire values that the SWML `record_call` action expects. - - - - Maps <xref href="SignalWire.SWAIG.RecordFormat" data-throw-if-not-resolved="false"></xref> members to the canonical wire values that the SWML `record_call` action expects. - - - - Maps <xref href="SignalWire.SWAIG.TapDirection" data-throw-if-not-resolved="false"></xref> members to the canonical wire values that the SWML `tap` action expects. - - - -## Enums - -### CallbackMethod - -HTTP method for the `status_callback` / `recording_status_callback` -URLs on <xref href="SignalWire.SWAIG.FunctionResult.JoinConference(System.String%2cSignalWire.SWAIG.JoinConferenceOptions)" data-throw-if-not-resolved="false"></xref>, -as a typed, compile-time-checked closed set. - -**Remarks:** <p> -The Python reference validates these arguments explicitly -(`join_conference(... status_callback_method ... recording_status_callback_method ...)` -raises `ValueError` unless the value is `"GET"` or `"POST"`), -so it is a genuine closed set rather than a free-form string. - -</p> -<p> -Each member maps to its canonical wire value via -<xref href="SignalWire.SWAIG.CallbackMethodExtensions.ToWireName(SignalWire.SWAIG.CallbackMethod)" data-throw-if-not-resolved="false"></xref>; the enum is -purely a typed alias over those strings, so the emitted SWML is identical to -passing the string directly. -</p> - -#### Signature - -```dotnet -public enum CallbackMethod -``` - -#### Properties - - - GET - - - - POST - - -#### Source - -[`src/SignalWire/SWAIG/CallbackMethod.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/CallbackMethod.cs) - -Line 21. - -*** - -### Codec - -Media codec for <xref href="SignalWire.SWAIG.FunctionResult.Tap(System.String%2cSystem.String%2cSignalWire.SWAIG.TapDirection%2cSignalWire.SWAIG.Codec%2cSystem.Int32%2cSystem.String)" data-throw-if-not-resolved="false"></xref>, as a typed, -compile-time-checked closed set. - -**Remarks:** <p> -The Python reference validates this argument explicitly -(`tap(... codec ...)` raises `ValueError` unless the value is -`"PCMU"` or `"PCMA"`), so it is a genuine closed set rather than a -free-form string. The wire strings are upper-case (`"PCMU"` / `"PCMA"`). - -</p> -<p> -This is the two-value SWAIG `tap` codec set and is deliberately -<strong>distinct</strong> from the larger RELAY `connect`/`stream` -codec superset (`{PCMU, PCMA, OPUS, G729, G722, VP8, H264}`, optionally -comma-joined): only `PCMU`/`PCMA` are valid here, so this type must -not be reused for those RELAY params (which stay strings). -FunctionResult.Tap(string, TapDirection, Codec, string, int, string?) -accepts this enum OR a string: the enum gives editor autocompletion and turns -a typo into a compile error, while the string overload preserves parity with -the Python reference (which takes a bare `str`). -</p> -<p> -Each member maps to its canonical wire value via -<xref href="SignalWire.SWAIG.CodecExtensions.ToWireName(SignalWire.SWAIG.Codec)" data-throw-if-not-resolved="false"></xref>; the enum is purely a typed -alias over those strings, so the emitted SWML is identical to passing the -string directly. -</p> -<example> -<pre><code class="lang-csharp">result.Tap("rtp://1.2.3.4:5000", TapDirection.Both, Codec.Pcma); // typed, autocompleted -result.Tap("rtp://1.2.3.4:5000", codec: "PCMA"); // string still works (parity)</code></pre> -</example> - -#### Signature - -```dotnet -public enum Codec -``` - -#### Properties - - - PCMA (G.711 A-law) - - - - PCMU (G.711 µ-law, the reference default) - - -#### Source - -[`src/SignalWire/SWAIG/Codec.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/Codec.cs) - -Line 37. - -*** - -### ConferenceBeep - -Beep behaviour for <xref href="SignalWire.SWAIG.FunctionResult.JoinConference(System.String%2cSignalWire.SWAIG.JoinConferenceOptions)" data-throw-if-not-resolved="false"></xref>, -as a typed, compile-time-checked closed set. - -**Remarks:** <p> -The Python reference validates this argument explicitly -(`join_conference(... beep ...)` raises `ValueError` unless the -value is `"true"`, `"false"`, `"onEnter"`, or `"onExit"`), -so it is a genuine closed set rather than a free-form string. The typed -`JoinConference(string, JoinConferenceOptions?)` overload accepts this -enum; the flat string overload preserves parity with the Python reference -(which takes a bare `str` validated to the same closed set). - -</p> -<p> -Each member maps to its canonical wire value via -<xref href="SignalWire.SWAIG.ConferenceBeepExtensions.ToWireName(SignalWire.SWAIG.ConferenceBeep)" data-throw-if-not-resolved="false"></xref>; the enum is -purely a typed alias over those strings, so the emitted SWML is identical to -passing the string directly. -</p> - -#### Signature - -```dotnet -public enum ConferenceBeep -``` - -#### Properties - - - false - - - - onEnter - - - - onExit - - - - true - - -#### Source - -[`src/SignalWire/SWAIG/ConferenceBeep.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ConferenceBeep.cs) - -Line 23. - -*** - -### ConferenceRecord - -Recording mode for <xref href="SignalWire.SWAIG.FunctionResult.JoinConference(System.String%2cSignalWire.SWAIG.JoinConferenceOptions)" data-throw-if-not-resolved="false"></xref>, -as a typed, compile-time-checked closed set. - -**Remarks:** <p> -The Python reference validates this argument explicitly -(`join_conference(... record ...)` raises `ValueError` unless the -value is `"do-not-record"` or `"record-from-start"`), so it is a -genuine closed set rather than a free-form string. It is distinct from the <xref href="SignalWire.SWAIG.RecordFormat" data-throw-if-not-resolved="false"></xref>/<xref href="SignalWire.SWAIG.RecordDirection" data-throw-if-not-resolved="false"></xref> closed sets that -describe `record_call` output; this one toggles whether the conference -itself records. - -</p> -<p> -Each member maps to its canonical wire value via -<xref href="SignalWire.SWAIG.ConferenceRecordExtensions.ToWireName(SignalWire.SWAIG.ConferenceRecord)" data-throw-if-not-resolved="false"></xref>; the -enum is purely a typed alias over those strings, so the emitted SWML is -identical to passing the string directly. -</p> - -#### Signature - -```dotnet -public enum ConferenceRecord -``` - -#### Properties - - - do-not-record - - - - record-from-start - - -#### Source - -[`src/SignalWire/SWAIG/ConferenceRecord.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ConferenceRecord.cs) - -Line 23. - -*** - -### ConferenceTrim - -Silence-trim mode for <xref href="SignalWire.SWAIG.FunctionResult.JoinConference(System.String%2cSignalWire.SWAIG.JoinConferenceOptions)" data-throw-if-not-resolved="false"></xref>, -as a typed, compile-time-checked closed set. - -**Remarks:** <p> -The Python reference validates this argument explicitly -(`join_conference(... trim ...)` raises `ValueError` unless the -value is `"trim-silence"` or `"do-not-trim"`), so it is a genuine -closed set rather than a free-form string. - -</p> -<p> -Each member maps to its canonical wire value via -<xref href="SignalWire.SWAIG.ConferenceTrimExtensions.ToWireName(SignalWire.SWAIG.ConferenceTrim)" data-throw-if-not-resolved="false"></xref>; the enum is -purely a typed alias over those strings, so the emitted SWML is identical to -passing the string directly. -</p> - -#### Signature - -```dotnet -public enum ConferenceTrim -``` - -#### Properties - - - do-not-trim - - - - trim-silence - - -#### Source - -[`src/SignalWire/SWAIG/ConferenceTrim.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ConferenceTrim.cs) - -Line 20. - -*** - -### RecordDirection - -Audio direction for <xref href="SignalWire.SWAIG.FunctionResult.RecordCall(System.String%2cSystem.Boolean%2cSignalWire.SWAIG.RecordFormat%2cSignalWire.SWAIG.RecordDirection%2cSystem.String%2cSystem.Boolean%2cSystem.Double%2cSystem.Nullable%7bSystem.Double%7d%2cSystem.Nullable%7bSystem.Double%7d%2cSystem.Nullable%7bSystem.Double%7d%2cSystem.String)" data-throw-if-not-resolved="false"></xref>, as a typed, -compile-time-checked closed set. - -**Remarks:** <p> -The Python reference validates this argument explicitly -(`record_call(... direction ...)` raises `ValueError` unless the -value is `"speak"`, `"listen"`, or `"both"`), so it is a -genuine closed set rather than a free-form string. It is the user-facing <em>recording</em> direction — which side(s) of the call to capture — and is -distinct from the read-only inbound/outbound `direction` field carried -on a RELAY `Call` event (that one stays a plain string, as it is server -state, not a caller choice). -FunctionResult.RecordCall(RecordFormat, RecordDirection, string, bool) -accepts this enum OR a string: the enum gives editor autocompletion and turns -a typo into a compile error, while the string overload preserves parity with -the Python reference (which takes a bare `str`). - -</p> -<p> -Each member maps to its canonical wire value via -<xref href="SignalWire.SWAIG.RecordDirectionExtensions.ToWireName(SignalWire.SWAIG.RecordDirection)" data-throw-if-not-resolved="false"></xref>; the enum -is purely a typed alias over those strings, so the emitted SWML is identical -to passing the string directly. -</p> -<example> -<pre><code class="lang-csharp">result.RecordCall(direction: RecordDirection.Listen); // typed, autocompleted -result.RecordCall("rec-1", false, "wav", "listen"); // string still works (parity)</code></pre> -</example> - -#### Signature - -```dotnet -public enum RecordDirection -``` - -#### Properties - - - both - - - - listen - - - - speak - - -#### Source - -[`src/SignalWire/SWAIG/RecordDirection.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/RecordDirection.cs) - -Line 34. - -*** - -### RecordFormat - -Recording container format for <xref href="SignalWire.SWAIG.FunctionResult.RecordCall(System.String%2cSystem.Boolean%2cSignalWire.SWAIG.RecordFormat%2cSignalWire.SWAIG.RecordDirection%2cSystem.String%2cSystem.Boolean%2cSystem.Double%2cSystem.Nullable%7bSystem.Double%7d%2cSystem.Nullable%7bSystem.Double%7d%2cSystem.Nullable%7bSystem.Double%7d%2cSystem.String)" data-throw-if-not-resolved="false"></xref>, as a -typed, compile-time-checked closed set. - -**Remarks:** <p> -The Python reference validates this argument explicitly -(`record_call(... format ...)` raises `ValueError` unless the value -is `"wav"`, `"mp3"`, or `"mp4"`), so it is a genuine closed set rather than a -free-form string. FunctionResult.RecordCall(RecordFormat, RecordDirection, string, bool) -accepts this enum OR a string: the enum gives editor autocompletion and turns -a typo into a compile error, while the string overload preserves parity with -the Python reference (which takes a bare `str`). - -</p> -<p> -Each member maps to its canonical wire value via -<xref href="SignalWire.SWAIG.RecordFormatExtensions.ToWireName(SignalWire.SWAIG.RecordFormat)" data-throw-if-not-resolved="false"></xref>; the enum is -purely a typed alias over those strings, so the emitted SWML is identical to -passing the string directly. -</p> -<example> -<pre><code class="lang-csharp">result.RecordCall(format: RecordFormat.Mp3); // typed, autocompleted -result.RecordCall("rec-1", false, "mp3"); // string still works (parity)</code></pre> -</example> - -#### Signature - -```dotnet -public enum RecordFormat -``` - -#### Properties - - - mp3 - - - - mp4 - - - - wav - - -#### Source - -[`src/SignalWire/SWAIG/RecordFormat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/RecordFormat.cs) - -Line 29. - -*** - -### TapDirection - -Audio direction for <xref href="SignalWire.SWAIG.FunctionResult.Tap(System.String%2cSystem.String%2cSignalWire.SWAIG.TapDirection%2cSignalWire.SWAIG.Codec%2cSystem.Int32%2cSystem.String)" data-throw-if-not-resolved="false"></xref>, as a typed, -compile-time-checked closed set. - -**Remarks:** <p> -The Python reference validates this argument explicitly -(`tap(... direction ...)` raises `ValueError` unless the value is -`"speak"`, `"hear"`, or `"both"`), so it is a genuine closed -set rather than a free-form string. - -</p> -<p> -This is the <em>tap</em> direction and is deliberately <strong>distinct</strong> -from <xref href="SignalWire.SWAIG.RecordDirection" data-throw-if-not-resolved="false"></xref>: `tap` uses `"hear"` where -`record_call` uses `"listen"`. The Python reference validates the two -against separate lists, so they are modelled as two separate enums rather than -a single shared one — sharing one would silently accept the wrong vocabulary on -one of the two verbs. -FunctionResult.Tap(string, TapDirection, Codec, string, int, string?) -accepts this enum OR a string: the enum gives editor autocompletion and turns -a typo into a compile error, while the string overload preserves parity with -the Python reference (which takes a bare `str`). -</p> -<p> -Each member maps to its canonical wire value via -<xref href="SignalWire.SWAIG.TapDirectionExtensions.ToWireName(SignalWire.SWAIG.TapDirection)" data-throw-if-not-resolved="false"></xref>; the enum is -purely a typed alias over those strings, so the emitted SWML is identical to -passing the string directly. -</p> -<example> -<pre><code class="lang-csharp">result.Tap("rtp://1.2.3.4:5000", TapDirection.Hear, Codec.Pcmu); // typed, autocompleted -result.Tap("rtp://1.2.3.4:5000", direction: "hear", codec: "PCMU"); // string still works (parity)</code></pre> -</example> - -#### Signature - -```dotnet -public enum TapDirection -``` - -#### Properties - - - both - - - - hear - - - - speak - - -#### Source - -[`src/SignalWire/SWAIG/TapDirection.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/TapDirection.cs) - -Line 38. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.swaig/join-conference-options/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.swaig/join-conference-options/index.mdx deleted file mode 100644 index 6c440e97bc..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.swaig/join-conference-options/index.mdx +++ /dev/null @@ -1,128 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.swaig/join-conference-options" -title: "JoinConferenceOptions" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.SWAIG.JoinConferenceOptions" - parent: "SignalWire.SWAIG" - module: "SignalWire.SWAIG" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/JoinConferenceOptions.cs" - visibility: "public" ---- -# `JoinConferenceOptions` - -Typed options bag for the convenience overload <xref href="SignalWire.SWAIG.FunctionResult.JoinConference(System.String%2cSignalWire.SWAIG.JoinConferenceOptions)" data-throw-if-not-resolved="false"></xref>. - -**Remarks:** <p> -Mirrors the 18 optional parameters of the Python reference -`join_conference(name, muted=False, beep="true", ...)` one-for-one, with -the four closed-set arguments (`beep`, `record`, `trim`, the two -callback methods) surfaced as the typed enums <xref href="SignalWire.SWAIG.ConferenceBeep" data-throw-if-not-resolved="false"></xref>, <xref href="SignalWire.SWAIG.ConferenceRecord" data-throw-if-not-resolved="false"></xref>, <xref href="SignalWire.SWAIG.ConferenceTrim" data-throw-if-not-resolved="false"></xref>, and <xref href="SignalWire.SWAIG.CallbackMethod" data-throw-if-not-resolved="false"></xref> for -editor autocompletion and compile-time checking. - -</p> -<p> -This record is a .NET-idiomatic convenience (a single options object instead -of 18 positional arguments). The flat, all-string -<xref href="SignalWire.SWAIG.FunctionResult.JoinConference(System.String%2cSystem.Boolean%2cSystem.String%2cSystem.Boolean%2cSystem.Boolean%2cSystem.String%2cSystem.Int32%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.Object)" data-throw-if-not-resolved="false"></xref> -overload remains the parity-bearing signature against the Python reference; -the convenience overload delegates straight to it via each enum's -`ToWireName()`, so the emitted `join_conference` action is identical. -</p> -<p> -Every default matches the Python reference exactly, so an unset options object -collapses to the simple-form bare conference-name string just like the flat -overload with no arguments. -</p> - -**Modifiers:** `sealed` - -## Signature - -```dotnet -public sealed record JoinConferenceOptions : IEquatable -``` - -## Inheritance - -**Implements:** `System.IEquatable` - -## Properties - - - Beep behaviour. Python default: `"true"`. - - - - SWML Call ID / CXML CallSid for coaching. Python default: `None`. - - - - Whether the conference ends when this participant exits. Python default: `False`. - - - - Maximum participants (1..=250). Python default: `250`. - - - - Whether to join muted. Python default: `False`. - - - - Recording mode. Python default: `"do-not-record"`. - - - - URL for recording status callbacks. Python default: `None`. - - - - Recording events to report. Python default: `"completed"`. - - - - HTTP method for recording status callbacks. Python default: `"POST"`. - - - - Conference region. Python default: `None`. - - - - Switch payload (object \{\} or array \[]). Python default: `None`. - - - - Whether the conference starts when this participant enters. Python default: `True`. - - - - URL for status callbacks. Python default: `None`. - - - - Events to report. Python default: `None`. - - - - HTTP method for status callbacks. Python default: `"POST"`. - - - - Silence-trim mode. Python default: `"trim-silence"`. - - - - SWML URL for hold music. Python default: `None`. - - -## Source - -[`src/SignalWire/SWAIG/JoinConferenceOptions.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/JoinConferenceOptions.cs) - -Line 30. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.swaig/parameter-schema/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.swaig/parameter-schema/index.mdx deleted file mode 100644 index 0a4695227d..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.swaig/parameter-schema/index.mdx +++ /dev/null @@ -1,491 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.swaig/parameter-schema" -title: "ParameterSchema" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.SWAIG.ParameterSchema" - parent: "SignalWire.SWAIG" - module: "SignalWire.SWAIG" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ParameterSchema.cs" - visibility: "public" ---- -# `ParameterSchema` - -Fluent, type-safe builder for a SWAIG tool's `parameters` — the -JSON-Schema `properties` map passed as the third argument to <xref href="SignalWire.SWML.Service.DefineTool(System.String%2cSystem.String%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%2cSystem.Func%7bSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%2cSignalWire.SWAIG.FunctionResult%7d%2cSystem.Boolean)" data-throw-if-not-resolved="false"></xref> / -SignalWire.Agent.AgentBase.DefineTool. - -**Remarks:** <p> -Defining a SWAIG tool's parameters in the Python reference (and, until -now, in this port) means hand-writing an untyped -`Dictionary<string, object>` of nested dictionaries — a raw -JSON-Schema blob: - -</p> -<pre><code class="lang-csharp">new Dictionary<string, object> -{ - ["service"] = new Dictionary<string, object> - { - ["type"] = "string", - ["description"] = "The service", - ["required"] = true, - }, -};</code></pre> -<p> -<xref href="SignalWire.SWAIG.ParameterSchema" data-throw-if-not-resolved="false"></xref> produces the <strong>byte-identical</strong> -`properties` map type-safely: -</p> -<pre><code class="lang-csharp">ParameterSchema.Create() - .String("service", "The service") - .String("date", "YYYY-MM-DD") - .Enum("fmt", typeof(RecordFormat), "format") // → enum: ["wav","mp3","mp4"] - .Required("service", "date") - .Build();</code></pre> -<p> -This is a <strong>typed convenience over the same wire output, not a new -format</strong>. <xref href="SignalWire.SWAIG.ParameterSchema.Build" data-throw-if-not-resolved="false"></xref> returns exactly the dictionary you -would have hand-written, so it drops straight into the existing untyped -`DefineTool` path — which keeps working unchanged. There is no Python -reference counterpart (Python builds the dict by hand); this is a .NET-only -additive ergonomics layer. -</p> -<p> -<strong>Required.</strong> <xref href="SignalWire.SWAIG.ParameterSchema.Required(System.String%5b%5d)" data-throw-if-not-resolved="false"></xref> marks properties -with the inline `["required"] = true` flag this port's hand-written -tool params already use (e.g. `MathSkill`, `SpiderSkill`, -`InfoGathererSkill`). For callers that prefer the top-level JSON-Schema -`required: [...]` array instead (the shape `DataMap` and the Python -`SWAIGFunction` emit), <xref href="SignalWire.SWAIG.ParameterSchema.RequiredNames" data-throw-if-not-resolved="false"></xref> exposes the same -names as an ordered `List<string>`. -</p> -<p> -<strong>Closed sets.</strong> Enum(string, Type, string?) -integrates the Tier-1 typed enums (<xref href="SignalWire.SWAIG.RecordFormat" data-throw-if-not-resolved="false"></xref>, -<xref href="SignalWire.SWAIG.RecordDirection" data-throw-if-not-resolved="false"></xref>, <xref href="SignalWire.SWAIG.TapDirection" data-throw-if-not-resolved="false"></xref>, -<xref href="SignalWire.SWAIG.Codec" data-throw-if-not-resolved="false"></xref>, …) by reflecting over the enum's members and emitting -each member's canonical wire string (its `ToWireName`) into the schema -`enum: [...]` list — so the closed set is defined once, in the enum, -rather than re-typed as a string list at every call site. An explicit -Enum(string, IEnumerable<string>, string?) overload remains -for genuinely-open or ad-hoc value sets. -</p> - -**Modifiers:** `sealed` - -## Signature - -```dotnet -public sealed class ParameterSchema -``` - -## Properties - - - The required-property names in declaration order — the source for a top-level JSON-Schema `required: [...]` array (the shape `DataMap` and Python's `SWAIGFunction` emit). The inline `["required"] = true` flags are already set by <xref href="SignalWire.SWAIG.ParameterSchema.Required(System.String%5b%5d)" data-throw-if-not-resolved="false"></xref>; this is for callers that additionally want the array form. - - -## Methods - -### Array - -Add an `array` property whose elements are a scalar kind -(`"string"`, `"number"`, `"integer"`, `"boolean"`). -Emits `{"type":"array","items":{"type":itemType}}`. - -#### Signature - - - - ```dotnet - public ParameterSchema Array(string name, string itemType, string? description = null, bool required = false, IEnumerable? itemEnumValues = null) - ``` - - - - ```dotnet - public ParameterSchema Array(string name, ParameterSchema itemSchema, string? description = null, bool required = false) - ``` - - - -#### Parameters (Overload 1) - - - - - - - - - - - -#### Parameters (Overload 2) - - - - - - - - - -#### Returns (Overload 1) - -`SignalWire.SWAIG.ParameterSchema` - -#### Returns (Overload 2) - -`SignalWire.SWAIG.ParameterSchema` - -#### Source - -[`src/SignalWire/SWAIG/ParameterSchema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ParameterSchema.cs) - -Line 164. - -*** - -### Boolean(string, string?, bool, object?) - -Add a `boolean` property. - -#### Signature - -```dotnet -public ParameterSchema Boolean(string name, string? description = null, bool required = false, object? defaultValue = null) -``` - -#### Parameters - - - - - - - - - -#### Returns - -`SignalWire.SWAIG.ParameterSchema` - -#### Source - -[`src/SignalWire/SWAIG/ParameterSchema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ParameterSchema.cs) - -Line 117. - -*** - -### Build() - -Build the JSON-Schema `properties` map — the exact -`Dictionary<string, object>` to pass as the `parameters` -argument to `DefineTool`. A fresh dictionary is returned on each -call (mutating it does not affect the builder), with properties in -declaration order. - -#### Signature - -```dotnet -public Dictionary Build() -``` - -#### Returns - -`Dictionary` - -#### Source - -[`src/SignalWire/SWAIG/ParameterSchema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ParameterSchema.cs) - -Line 251. - -*** - -### Create() - -Start a new, empty parameter-schema builder. - -**Modifiers:** `static` - -#### Signature - -```dotnet -public static ParameterSchema Create() -``` - -#### Returns - -`SignalWire.SWAIG.ParameterSchema` - -#### Source - -[`src/SignalWire/SWAIG/ParameterSchema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ParameterSchema.cs) - -Line 80. - -*** - -### Enum - -Add a `string` property constrained to a closed set, sourced from a -Tier-1 typed enum. Each enum member is rendered via its -`ToWireName` extension into the schema `enum: [...]` list, so -the wire vocabulary is defined once in the enum. - -#### Signature - - - - ```dotnet - public ParameterSchema Enum(string name, Type enumType, string? description = null, bool required = false, object? defaultValue = null) - ``` - - - - ```dotnet - public ParameterSchema Enum(string name, IEnumerable values, string? description = null, bool required = false, object? defaultValue = null) - ``` - - - -#### Parameters (Overload 1) - - - Property (argument) name. - - - - A SignalWire closed-set enum (e.g. <xref href="SignalWire.SWAIG.RecordFormat" data-throw-if-not-resolved="false"></xref>) whose members carry a `ToWireName` extension in a sibling `<EnumName>Extensions` class. - - - - LLM-facing description of the argument. - - - - Mark required inline (`["required"] = true`). - - - - Optional JSON-Schema `default`. - - -#### Parameters (Overload 2) - - - - - - - - - - - -#### Returns (Overload 1) - -`SignalWire.SWAIG.ParameterSchema` - -#### Returns (Overload 2) - -`SignalWire.SWAIG.ParameterSchema` - -#### Source - -[`src/SignalWire/SWAIG/ParameterSchema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ParameterSchema.cs) - -Line 137. - -*** - -### Integer(string, string?, bool, object?, string?) - -Add an `integer` property. - -#### Signature - -```dotnet -public ParameterSchema Integer(string name, string? description = null, bool required = false, object? defaultValue = null, string? format = null) -``` - -#### Parameters - - - - - - - - - - - -#### Returns - -`SignalWire.SWAIG.ParameterSchema` - -#### Source - -[`src/SignalWire/SWAIG/ParameterSchema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ParameterSchema.cs) - -Line 108. - -*** - -### Number(string, string?, bool, object?, string?) - -Add a `number` (floating-point) property. - -#### Signature - -```dotnet -public ParameterSchema Number(string name, string? description = null, bool required = false, object? defaultValue = null, string? format = null) -``` - -#### Parameters - - - - - - - - - - - -#### Returns - -`SignalWire.SWAIG.ParameterSchema` - -#### Source - -[`src/SignalWire/SWAIG/ParameterSchema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ParameterSchema.cs) - -Line 99. - -*** - -### Object(string, ParameterSchema, string?, bool) - -Add a nested `object` property described by a child <xref href="SignalWire.SWAIG.ParameterSchema" data-throw-if-not-resolved="false"></xref>. Emits -`{"type":"object","properties":{…}}`. - -#### Signature - -```dotnet -public ParameterSchema Object(string name, ParameterSchema schema, string? description = null, bool required = false) -``` - -#### Parameters - - - - - - - - - -#### Returns - -`SignalWire.SWAIG.ParameterSchema` - -#### Source - -[`src/SignalWire/SWAIG/ParameterSchema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ParameterSchema.cs) - -Line 204. - -*** - -### Required(params string\[]) - -Mark one or more already-declared properties required by setting the -inline `["required"] = true` flag on each (this port's hand-written -convention). Also records the names for <xref href="SignalWire.SWAIG.ParameterSchema.RequiredNames" data-throw-if-not-resolved="false"></xref>. - -#### Signature - -```dotnet -public ParameterSchema Required(params string[] names) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.SWAIG.ParameterSchema` - -#### Throws - -- `System.ArgumentException` — If a named property was not declared. - -#### Source - -[`src/SignalWire/SWAIG/ParameterSchema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ParameterSchema.cs) - -Line 218. - -*** - -### String(string, string?, bool, object?, string?, IEnumerable\?) - -Add a `string` property. - -#### Signature - -```dotnet -public ParameterSchema String(string name, string? description = null, bool required = false, object? defaultValue = null, string? format = null, IEnumerable? enumValues = null) -``` - -#### Parameters - - - Property (argument) name. - - - - LLM-facing description of the argument. - - - - Mark required inline (`["required"] = true`). - - - - Optional JSON-Schema `default`. - - - - Optional JSON-Schema `format` hint (e.g. `"date"`). - - - - Optional closed set of allowed string values. - - -#### Returns - -`SignalWire.SWAIG.ParameterSchema` - -#### Source - -[`src/SignalWire/SWAIG/ParameterSchema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ParameterSchema.cs) - -Line 89. - -## Source - -[`src/SignalWire/SWAIG/ParameterSchema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/ParameterSchema.cs) - -Line 69. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.swaig/record-direction-extensions/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.swaig/record-direction-extensions/index.mdx deleted file mode 100644 index e7712ec2eb..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.swaig/record-direction-extensions/index.mdx +++ /dev/null @@ -1,62 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.swaig/record-direction-extensions" -title: "RecordDirectionExtensions" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.SWAIG.RecordDirectionExtensions" - parent: "SignalWire.SWAIG" - module: "SignalWire.SWAIG" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/RecordDirection.cs" - visibility: "public" ---- -# `RecordDirectionExtensions` - -Maps <xref href="SignalWire.SWAIG.RecordDirection" data-throw-if-not-resolved="false"></xref> members to the canonical wire values that -the SWML `record_call` action expects. - -**Modifiers:** `static` - -## Signature - -```dotnet -public static class RecordDirectionExtensions -``` - -## Methods - -### ToWireName(RecordDirection) - -The canonical recording-direction string (the value placed on the -`record_call.direction` key in the emitted SWML). - -**Modifiers:** `static` - -#### Signature - -```dotnet -public static string ToWireName(this RecordDirection direction) -``` - -#### Parameters - - - -#### Returns - -`string` - -#### Source - -[`src/SignalWire/SWAIG/RecordDirection.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/RecordDirection.cs) - -Line 63. - -## Source - -[`src/SignalWire/SWAIG/RecordDirection.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/RecordDirection.cs) - -Line 50. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.swaig/record-format-extensions/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.swaig/record-format-extensions/index.mdx deleted file mode 100644 index 46a96803f9..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.swaig/record-format-extensions/index.mdx +++ /dev/null @@ -1,62 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.swaig/record-format-extensions" -title: "RecordFormatExtensions" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.SWAIG.RecordFormatExtensions" - parent: "SignalWire.SWAIG" - module: "SignalWire.SWAIG" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/RecordFormat.cs" - visibility: "public" ---- -# `RecordFormatExtensions` - -Maps <xref href="SignalWire.SWAIG.RecordFormat" data-throw-if-not-resolved="false"></xref> members to the canonical wire values that the -SWML `record_call` action expects. - -**Modifiers:** `static` - -## Signature - -```dotnet -public static class RecordFormatExtensions -``` - -## Methods - -### ToWireName(RecordFormat) - -The canonical recording-format string (the value placed on the -`record_call.format` key in the emitted SWML). - -**Modifiers:** `static` - -#### Signature - -```dotnet -public static string ToWireName(this RecordFormat format) -``` - -#### Parameters - - - -#### Returns - -`string` - -#### Source - -[`src/SignalWire/SWAIG/RecordFormat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/RecordFormat.cs) - -Line 58. - -## Source - -[`src/SignalWire/SWAIG/RecordFormat.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/RecordFormat.cs) - -Line 45. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.swaig/tap-direction-extensions/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.swaig/tap-direction-extensions/index.mdx deleted file mode 100644 index cf9c34e77d..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.swaig/tap-direction-extensions/index.mdx +++ /dev/null @@ -1,62 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.swaig/tap-direction-extensions" -title: "TapDirectionExtensions" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.SWAIG.TapDirectionExtensions" - parent: "SignalWire.SWAIG" - module: "SignalWire.SWAIG" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/TapDirection.cs" - visibility: "public" ---- -# `TapDirectionExtensions` - -Maps <xref href="SignalWire.SWAIG.TapDirection" data-throw-if-not-resolved="false"></xref> members to the canonical wire values that the -SWML `tap` action expects. - -**Modifiers:** `static` - -## Signature - -```dotnet -public static class TapDirectionExtensions -``` - -## Methods - -### ToWireName(TapDirection) - -The canonical tap-direction string (the value placed on the -`tap.direction` key in the emitted SWML). - -**Modifiers:** `static` - -#### Signature - -```dotnet -public static string ToWireName(this TapDirection direction) -``` - -#### Parameters - - - -#### Returns - -`string` - -#### Source - -[`src/SignalWire/SWAIG/TapDirection.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/TapDirection.cs) - -Line 67. - -## Source - -[`src/SignalWire/SWAIG/TapDirection.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWAIG/TapDirection.cs) - -Line 54. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.swml/document/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.swml/document/index.mdx deleted file mode 100644 index cf72fd080c..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.swml/document/index.mdx +++ /dev/null @@ -1,312 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.swml/document" -title: "Document" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.SWML.Document" - parent: "SignalWire.SWML" - module: "SignalWire.SWML" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Document.cs" - visibility: "public" ---- -# `Document` - -Represents a SWML document containing versioned sections of verb instructions. -Each section holds an ordered list of verb dictionaries that define call-flow logic. - -## Signature - -```dotnet -public class Document -``` - -## Properties - - - SWML document version. - - -## Methods - -### AddRawVerb(string, Dictionary\) - -Append a pre-formatted verb hash to a section. - -#### Signature - -```dotnet -public void AddRawVerb(string section, Dictionary verbHash) -``` - -#### Parameters - - - - - -#### Source - -[`src/SignalWire/SWML/Document.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Document.cs) - -Line 80. - -*** - -### AddSection(string) - -Add a new named section. Returns true if created, false if it already existed. - -#### Signature - -```dotnet -public bool AddSection(string name) -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/SignalWire/SWML/Document.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Document.cs) - -Line 37. - -*** - -### AddVerb(string, object?) - -Append a verb to the main section. - -#### Signature - -```dotnet -public void AddVerb(string verbName, object? config) -``` - -#### Parameters - - - - - -#### Source - -[`src/SignalWire/SWML/Document.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Document.cs) - -Line 64. - -*** - -### AddVerbToSection(string, string, object?) - -Append a verb to a named section. - -#### Signature - -```dotnet -public void AddVerbToSection(string section, string verbName, object? config) -``` - -#### Parameters - - - - - - - -#### Source - -[`src/SignalWire/SWML/Document.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Document.cs) - -Line 70. - -*** - -### ClearSection(string) - -Clear all verbs in a section (keeps the section itself). - -#### Signature - -```dotnet -public void ClearSection(string section) -``` - -#### Parameters - - - -#### Source - -[`src/SignalWire/SWML/Document.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Document.cs) - -Line 90. - -*** - -### Document() - -#### Signature - -```dotnet -public Document() -``` - -#### Source - -[`src/SignalWire/SWML/Document.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Document.cs) - -Line 29. - -*** - -### GetVerbs(string) - -Get a copy of the verbs for a section. -Returns an empty list if the section does not exist. - -#### Signature - -```dotnet -public List> GetVerbs(string section = "main") -``` - -#### Parameters - - - -#### Returns - -`List>` - -#### Source - -[`src/SignalWire/SWML/Document.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Document.cs) - -Line 54. - -*** - -### HasSection(string) - -Check whether a named section exists. - -#### Signature - -```dotnet -public bool HasSection(string name) -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/SignalWire/SWML/Document.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Document.cs) - -Line 48. - -*** - -### Render() - -Compact JSON string. - -#### Signature - -```dotnet -public string Render() -``` - -#### Returns - -`string` - -#### Source - -[`src/SignalWire/SWML/Document.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Document.cs) - -Line 120. - -*** - -### RenderPretty() - -Pretty-printed JSON string. - -#### Signature - -```dotnet -public string RenderPretty() -``` - -#### Returns - -`string` - -#### Source - -[`src/SignalWire/SWML/Document.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Document.cs) - -Line 123. - -*** - -### Reset() - -Reset document to initial state with an empty main section. - -#### Signature - -```dotnet -public void Reset() -``` - -#### Source - -[`src/SignalWire/SWML/Document.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Document.cs) - -Line 99. - -*** - -### ToDict() - -Return document as a dictionary suitable for serialization. - -#### Signature - -```dotnet -public Dictionary ToDict() -``` - -#### Returns - -`Dictionary` - -#### Source - -[`src/SignalWire/SWML/Document.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Document.cs) - -Line 110. - -## Source - -[`src/SignalWire/SWML/Document.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Document.cs) - -Line 9. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.swml/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.swml/index.mdx deleted file mode 100644 index 88234ef380..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.swml/index.mdx +++ /dev/null @@ -1,44 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.swml" -title: "SignalWire.SWML" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "module" - language: "dotnet" - qualified_name: "SignalWire.SWML" ---- -# `SignalWire.SWML` - -## Classes - - - - Represents a SWML document containing versioned sections of verb instructions. Each section holds an ordered list of verb dictionaries that define call-flow logic. - - - - Thread-safe singleton that loads the SWML JSON schema from an embedded resource and exposes verb definitions parsed from $defs.SWMLMethod.anyOf. - - - - Validation error raised by SchemaUtils.ValidateVerb when a verb config violates its schema. (Python parity: `signalwire.utils.schema_utils.SchemaValidationError`.) - - - - A SWML service that manages a Document, provides schema-driven verb methods, handles HTTP requests with Basic authentication, and supports routing callbacks. - - - - Configuration options for a SWML service. - - - - - - - - Metadata about a single SWML verb parsed from the schema. - - diff --git a/fern/products/sdk-reference/dotnet/signal-wire.swml/schema-validation-error/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.swml/schema-validation-error/index.mdx deleted file mode 100644 index eac2f94cb0..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.swml/schema-validation-error/index.mdx +++ /dev/null @@ -1,66 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.swml/schema-validation-error" -title: "SchemaValidationError" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.SWML.SchemaValidationError" - parent: "SignalWire.SWML" - module: "SignalWire.SWML" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Schema.cs" - visibility: "public" ---- -# `SchemaValidationError` - -Validation error raised by SchemaUtils.ValidateVerb when a -verb config violates its schema. (Python parity: -`signalwire.utils.schema_utils.SchemaValidationError`.) - -## Signature - -```dotnet -public class SchemaValidationError : Exception, ISerializable -``` - -## Inheritance - -**Extends:** `System.Exception` - -**Implements:** `System.Runtime.Serialization.ISerializable` - -## Properties - - - - - -## Methods - -### SchemaValidationError(string, List\) - -#### Signature - -```dotnet -public SchemaValidationError(string verbName, List errors) -``` - -#### Parameters - - - - - -#### Source - -[`src/SignalWire/SWML/Schema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Schema.cs) - -Line 21. - -## Source - -[`src/SignalWire/SWML/Schema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Schema.cs) - -Line 16. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.swml/schema/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.swml/schema/index.mdx deleted file mode 100644 index 574642f4ba..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.swml/schema/index.mdx +++ /dev/null @@ -1,245 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.swml/schema" -title: "Schema" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.SWML.Schema" - parent: "SignalWire.SWML" - module: "SignalWire.SWML" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Schema.cs" - visibility: "public" ---- -# `Schema` - -Thread-safe singleton that loads the SWML JSON schema from an embedded resource -and exposes verb definitions parsed from $defs.SWMLMethod.anyOf. - -**Modifiers:** `sealed` - -## Signature - -```dotnet -public sealed class Schema -``` - -## Properties - - - Thread-safe singleton accessor. - - - - Number of verbs defined in the schema. - - -## Methods - -### GetAllVerbNames() - -Alias of <xref href="SignalWire.SWML.Schema.GetVerbNames" data-throw-if-not-resolved="false"></xref>. (Python parity: -`SchemaUtils.get_all_verb_names`.) - -#### Signature - -```dotnet -public List GetAllVerbNames() -``` - -#### Returns - -`List` - -#### Source - -[`src/SignalWire/SWML/Schema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Schema.cs) - -Line 90. - -*** - -### GetVerb(string) - -Get verb metadata, or null if not found. - -#### Signature - -```dotnet -public VerbInfo? GetVerb(string name) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.SWML.VerbInfo` - -#### Source - -[`src/SignalWire/SWML/Schema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Schema.cs) - -Line 80. - -*** - -### GetVerbNames() - -Get a sorted list of all verb names. - -#### Signature - -```dotnet -public List GetVerbNames() -``` - -#### Returns - -`List` - -#### Source - -[`src/SignalWire/SWML/Schema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Schema.cs) - -Line 72. - -*** - -### GetVerbParameters(string) - -Get the parameter (property) definitions for a verb. -Returns an empty dict when the verb is unknown or has no -`properties`. (Python parity: -`SchemaUtils.get_verb_parameters(verb_name)`.) - -#### Signature - -```dotnet -public Dictionary GetVerbParameters(string verbName) -``` - -#### Parameters - - - -#### Returns - -`Dictionary` - -#### Source - -[`src/SignalWire/SWML/Schema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Schema.cs) - -Line 114. - -*** - -### IsValidVerb(string) - -Check whether a verb name is valid. - -#### Signature - -```dotnet -public bool IsValidVerb(string name) -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/SignalWire/SWML/Schema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Schema.cs) - -Line 69. - -*** - -### LoadSchemaPublic() - -Public load-schema accessor. Returns the embedded SWML -schema as a Dictionary\. Empty dict -when the schema can't be loaded. (Python parity: -`SchemaUtils.load_schema`.) - -#### Signature - -```dotnet -public Dictionary LoadSchemaPublic() -``` - -#### Returns - -`Dictionary` - -#### Source - -[`src/SignalWire/SWML/Schema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Schema.cs) - -Line 96. - -*** - -### Reset() - -Reset the singleton (for testing). - -**Modifiers:** `static` - -#### Signature - -```dotnet -public static void Reset() -``` - -#### Source - -[`src/SignalWire/SWML/Schema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Schema.cs) - -Line 60. - -*** - -### ValidateDocument(Dictionary\) - -Validate a SWML document against the loaded schema. -Returns `(true, [])` on success or `(false, [errors...])` on -failure. Lightweight verb-presence check — full JSON-Schema -validation is out of scope for the bundled SDK. -(Python parity: -`SchemaUtils.validate_document(document) -> (bool, list)`.) - -#### Signature - -```dotnet -public (bool Valid, List Errors) ValidateDocument(Dictionary document) -``` - -#### Parameters - - - -#### Returns - -`System.ValueTuple>` - -#### Source - -[`src/SignalWire/SWML/Schema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Schema.cs) - -Line 137. - -## Source - -[`src/SignalWire/SWML/Schema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Schema.cs) - -Line 33. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.swml/service-options/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.swml/service-options/index.mdx deleted file mode 100644 index 141f0d2471..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.swml/service-options/index.mdx +++ /dev/null @@ -1,46 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.swml/service-options" -title: "ServiceOptions" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.SWML.ServiceOptions" - parent: "SignalWire.SWML" - module: "SignalWire.SWML" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs" - visibility: "public" ---- -# `ServiceOptions` - -Configuration options for a SWML service. - -**Modifiers:** `sealed` - -## Signature - -```dotnet -public sealed class ServiceOptions -``` - -## Properties - - - - - - - - - - - - - -## Source - -[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) - -Line 18. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.swml/service/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.swml/service/index.mdx deleted file mode 100644 index b22b2da812..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.swml/service/index.mdx +++ /dev/null @@ -1,895 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.swml/service" -title: "Service" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.SWML.Service" - parent: "SignalWire.SWML" - module: "SignalWire.SWML" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs" - visibility: "public" ---- -# `Service` - -A SWML service that manages a Document, provides schema-driven verb methods, -handles HTTP requests with Basic authentication, and supports routing callbacks. - -## Signature - -```dotnet -public class Service -``` - -## Properties - - - - - - - - - - - - - - - - - Public read-only view of the SWAIG tool registry — the same data served by /swaig get\_signature, but reachable in-process for introspection (e.g. swaig-test --list-tools against an assembly loaded via reflection). The internal "\_handler" callable is stripped because it isn't meaningful outside this process. This is an SDK accessor, not a new endpoint. Order matches registration order (mirrors ListToolNames). - - -## Methods - -### DefineTool(string, string, Dictionary\, Func\, Dictionary\, FunctionResult>, bool) - -Define a SWAIG function the AI can call. Tool descriptions and -parameter descriptions are LLM-facing prompt engineering — see -PORTING\_GUIDE for guidance on writing them. - -**Modifiers:** `virtual` - -#### Signature - -```dotnet -public virtual Service DefineTool(string name, string description, Dictionary parameters, Func, Dictionary, FunctionResult> handler, bool secure = false) -``` - -#### Parameters - - - - - - - - - - - -#### Returns - -`SignalWire.SWML.Service` - -#### Source - -[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) - -Line 388. - -*** - -### DefineTools(List\>) - -Register multiple tool definitions at once. - -**Modifiers:** `virtual` - -#### Signature - -```dotnet -public virtual Service DefineTools(List> toolDefs) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.SWML.Service` - -#### Source - -[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) - -Line 457. - -*** - -### ExtractSipUsername(Dictionary\?) - -Extract SIP username from a request body. -Validates format: only \[a-zA-Z0-9.\_-], max 64 chars. - -**Modifiers:** `static` - -#### Signature - -```dotnet -public static string? ExtractSipUsername(Dictionary? body) -``` - -#### Parameters - - - -#### Returns - -`string` - -#### Source - -[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) - -Line 661. - -*** - -### GetAllFunctions() - -Get a snapshot of all registered SWAIG functions -(Python parity: `tool_registry.get_all_functions()` — returns -a copy so subsequent registrations don't mutate the snapshot). - -**Modifiers:** `virtual` - -#### Signature - -```dotnet -public virtual Dictionary> GetAllFunctions() -``` - -#### Returns - -`Dictionary>` - -#### Source - -[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) - -Line 442. - -*** - -### GetBasicAuthCredentials() - -Get the Basic Auth credentials as a tuple. - -#### Signature - -```dotnet -public (string User, string Password) GetBasicAuthCredentials() -``` - -#### Returns - -`System.ValueTuple` - -#### Source - -[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) - -Line 173. - -*** - -### GetBasicAuthCredentialsWithSource() - -Get the Basic Auth credentials plus the SOURCE of the -credentials (Python parity: -`get_basic_auth_credentials(include_source=True)`). -Source is one of "provided", "environment", or "generated". - -#### Signature - -```dotnet -public (string User, string Password, string Source) GetBasicAuthCredentialsWithSource() -``` - -#### Returns - -`System.ValueTuple` - -#### Source - -[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) - -Line 182. - -*** - -### GetFullUrl(bool) - -Build the full URL for this service. - -#### Signature - -```dotnet -public string GetFullUrl(bool includeAuth = false) -``` - -#### Parameters - - - -#### Returns - -`string` - -#### Source - -[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) - -Line 218. - -*** - -### GetFunction(string) - -Get a registered SWAIG function by name, or null -(Python parity: `tool_registry.get_function(name)`). - -**Modifiers:** `virtual` - -#### Signature - -```dotnet -public virtual Dictionary? GetFunction(string name) -``` - -#### Parameters - - - -#### Returns - -`Dictionary` - -#### Source - -[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) - -Line 436. - -*** - -### GetProxyUrlBase(Dictionary\?) - -Detect or construct the proxy URL base from request headers. -Priority: SWML\_PROXY\_URL\_BASE env > X-Forwarded-Proto+Host > X-Original-URL > fallback. - -#### Signature - -```dotnet -public string GetProxyUrlBase(Dictionary? headers = null) -``` - -#### Parameters - - - -#### Returns - -`string` - -#### Source - -[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) - -Line 729. - -*** - -### HandlePostPrompt(Dictionary\?, Dictionary\) - -Handle post-prompt callback. Override in AgentBase. - -**Modifiers:** `virtual` - -#### Signature - -```dotnet -protected virtual (int, Dictionary, string) HandlePostPrompt(Dictionary? requestData, Dictionary headers) -``` - -#### Parameters - - - - - -#### Returns - -`System.ValueTuple,string>` - -#### Source - -[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) - -Line 646. - -*** - -### HandleRequest(string, string, Dictionary\, string?) - -Handle an HTTP request. Returns a tuple of (status, headers, body). - -**Modifiers:** `virtual` - -#### Signature - -```dotnet -public virtual (int Status, Dictionary Headers, string Body) HandleRequest(string method, string path, Dictionary headers, string? body) -``` - -#### Parameters - - - - - - - - - -#### Returns - -`System.ValueTuple,string>` - -#### Source - -[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) - -Line 281. - -*** - -### HandleSwaigRequest(string, Dictionary\?, Dictionary\) - -Handle SWAIG function dispatch. - -GET: returns the rendered SWML document (parallel to root /). -POST: parses \{function, argument, call\_id\}, validates, runs the -SwaigPreDispatch hook, calls OnFunctionCall on the chosen target. - -Lifted from AgentBase so non-agent SWMLServices (e.g. ai\_sidecar -host) can serve /swaig without subclassing AgentBase. - -**Modifiers:** `virtual` - -#### Signature - -```dotnet -protected virtual (int, Dictionary, string) HandleSwaigRequest(string method, Dictionary? requestData, Dictionary headers) -``` - -#### Parameters - - - - - - - -#### Returns - -`System.ValueTuple,string>` - -#### Source - -[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) - -Line 551. - -*** - -### HandleSwmlRequest(string, Dictionary\?, Dictionary\) - -Handle SWML document request. - -**Modifiers:** `virtual` - -#### Signature - -```dotnet -protected virtual (int, Dictionary, string) HandleSwmlRequest(string method, Dictionary? requestData, Dictionary headers) -``` - -#### Parameters - - - - - - - -#### Returns - -`System.ValueTuple,string>` - -#### Source - -[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) - -Line 370. - -*** - -### HasFunction(string) - -Check if a SWAIG function is registered -(Python parity: `tool_registry.has_function(name)`). - -**Modifiers:** `virtual` - -#### Signature - -```dotnet -public virtual bool HasFunction(string name) -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) - -Line 432. - -*** - -### ListToolNames() - -List registered tool names in registration order. - -#### Signature - -```dotnet -public IEnumerable ListToolNames() -``` - -#### Returns - -`IEnumerable` - -#### Source - -[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) - -Line 488. - -*** - -### OnFunctionCall(string, Dictionary\, Dictionary\) - -Dispatch a function call to the registered handler. - -**Modifiers:** `virtual` - -#### Signature - -```dotnet -public virtual FunctionResult? OnFunctionCall(string name, Dictionary args, Dictionary rawData) -``` - -#### Parameters - - - - - - - -#### Returns - -`SignalWire.SWAIG.FunctionResult` - -#### Source - -[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) - -Line 467. - -*** - -### OnRequest(Dictionary\?, string?) - -Customization hook called when SWML is requested. -Default delegates to <xref href="SignalWire.SWML.Service.OnSwmlRequest(System.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%2cSystem.String)" data-throw-if-not-resolved="false"></xref>; subclasses -typically override <xref href="SignalWire.SWML.Service.OnSwmlRequest(System.Collections.Generic.Dictionary%7bSystem.String%2cSystem.Object%7d%2cSystem.String)" data-throw-if-not-resolved="false"></xref> instead of this -method. Return null to use the default SWML rendering, or a -dictionary of modifications to merge in. -(Python parity: `WebMixin.on_request`.) - -**Modifiers:** `virtual` - -#### Signature - -```dotnet -public virtual Dictionary? OnRequest(Dictionary? requestData = null, string? callbackPath = null) -``` - -#### Parameters - - - - - -#### Returns - -`Dictionary` - -#### Source - -[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) - -Line 256. - -*** - -### OnSwmlRequest(Dictionary\?, string?) - -Customization hook for subclasses to modify SWML based -on request data. Return null to use default rendering, or a -dictionary of modifications. (Python parity: -`WebMixin.on_swml_request`.) - -**Modifiers:** `virtual` - -#### Signature - -```dotnet -public virtual Dictionary? OnSwmlRequest(Dictionary? requestData = null, string? callbackPath = null) -``` - -#### Parameters - - - - - -#### Returns - -`Dictionary` - -#### Source - -[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) - -Line 267. - -*** - -### RegisterRoutingCallback(string, Func\?, Dictionary\, object>) - -Register a callback for a sub-path under the service route. - -#### Signature - -```dotnet -public void RegisterRoutingCallback(string path, Func?, Dictionary, object> callback) -``` - -#### Parameters - - - - - -#### Source - -[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) - -Line 231. - -*** - -### RegisterSwaigFunction(Dictionary\) - -Register a raw SWAIG function definition (e.g. DataMap tools). - -**Modifiers:** `virtual` - -#### Signature - -```dotnet -public virtual Service RegisterSwaigFunction(Dictionary funcDef) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.SWML.Service` - -#### Source - -[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) - -Line 415. - -*** - -### RemoveFunction(string) - -Remove a registered SWAIG function. Returns true if -removed, false if not found (Python parity: -`tool_registry.remove_function(name)`). - -**Modifiers:** `virtual` - -#### Signature - -```dotnet -public virtual bool RemoveFunction(string name) -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) - -Line 448. - -*** - -### RenderSwml() - -Render the SWML document for a request. Override in subclasses to customise. - -**Modifiers:** `virtual` - -#### Signature - -```dotnet -public virtual Dictionary RenderSwml() -``` - -#### Returns - -`Dictionary` - -#### Source - -[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) - -Line 245. - -*** - -### Run() - -Start a blocking HTTP(S) server bound to <xref href="SignalWire.SWML.Service.Host" data-throw-if-not-resolved="false"></xref>:<xref href="SignalWire.SWML.Service.Port" data-throw-if-not-resolved="false"></xref>. -Each incoming request is dispatched through <xref href="SignalWire.SWML.Service.HandleRequest(System.String%2cSystem.String%2cSystem.Collections.Generic.Dictionary%7bSystem.String%2cSystem.String%7d%2cSystem.String)" data-throw-if-not-resolved="false"></xref>; -the response status / headers / body are written back to the client. - -Mirrors Python's SWMLService.run() — examples and the porting-sdk -audit harness call this directly. - -Transport selection mirrors Python's `SecurityConfig` / -uvicorn `ssl_certfile`/`ssl_keyfile` path: - -<ul><li>Plain HTTP uses System.Net.HttpListener (BCL, no extra deps).</li><li>HTTPS (when `SWML_SSL_ENABLED` is truthy and - `SWML_SSL_CERT_PATH`/`SWML_SSL_KEY_PATH` point at a valid - PEM cert+key) uses Kestrel, because HttpListener cannot terminate TLS - on Linux (cert binding requires http.sys / netsh, Windows-only).</li></ul> - -Server stops on Ctrl-C or when the process is killed. - -**Modifiers:** `virtual` - -#### Signature - -```dotnet -public virtual void Run() -``` - -#### Source - -[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) - -Line 882. - -*** - -### Service(ServiceOptions) - -#### Signature - -```dotnet -public Service(ServiceOptions options) -``` - -#### Parameters - - - -#### Source - -[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) - -Line 66. - -*** - -### Sleep(int, string) - -Add a sleep verb with a duration in milliseconds to the specified section. - -#### Signature - -```dotnet -public Service Sleep(int milliseconds, string section = "main") -``` - -#### Parameters - - - - - -#### Returns - -`SignalWire.SWML.Service` - -#### Source - -[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) - -Line 156. - -*** - -### SwaigPreDispatch(Dictionary\, Dictionary\, string) - -Extension point: invoked between argument parsing and function -dispatch. Returns (target, shortCircuit). When shortCircuit is -non-null, it's returned directly without calling OnFunctionCall. -AgentBase may override to add session-token validation or ephemeral -dynamic-config copies. - -**Modifiers:** `virtual` - -#### Signature - -```dotnet -protected virtual (Service Target, Dictionary? ShortCircuit) SwaigPreDispatch(Dictionary requestData, Dictionary headers, string functionName) -``` - -#### Parameters - - - - - - - -#### Returns - -`System.ValueTuple>` - -#### Source - -[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) - -Line 533. - -*** - -### ValidateBasicAuth(string, string) - -Validate provided basic-auth credentials against the -configured ones (constant-time comparison) -(Python parity: `validate_basic_auth(username, password)`). - -**Modifiers:** `virtual` - -#### Signature - -```dotnet -public virtual bool ValidateBasicAuth(string username, string password) -``` - -#### Parameters - - - - - -#### Returns - -`bool` - -#### Source - -[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) - -Line 206. - -*** - -### Verb - -Add a verb to the specified section. Validates the verb name against the schema. -Returns this service for fluent chaining. - -#### Signature - - - - ```dotnet - public Service Verb(string verbName, string section, object? config) - ``` - - - - ```dotnet - public Service Verb(string verbName, object? config) - ``` - - - -#### Parameters (Overload 1) - - - - - - - -#### Parameters (Overload 2) - - - - - -#### Returns (Overload 1) - -`SignalWire.SWML.Service` - -#### Returns (Overload 2) - -`SignalWire.SWML.Service` - -#### Source - -[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) - -Line 132. - -## Source - -[`src/SignalWire/SWML/Service.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Service.cs) - -Line 32. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.swml/swml-builder/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.swml/swml-builder/index.mdx deleted file mode 100644 index f8154c727a..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.swml/swml-builder/index.mdx +++ /dev/null @@ -1,309 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.swml/swml-builder" -title: "SWMLBuilder" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.SWML.SWMLBuilder" - parent: "SignalWire.SWML" - module: "SignalWire.SWML" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/SWMLBuilder.cs" - visibility: "public" ---- -# `SWMLBuilder` - -## Signature - -```dotnet -public class SWMLBuilder -``` - -## Properties - - - -## Methods - -### AddSection(string) - -Add a section to the underlying document. -(Python parity: `SWMLBuilder.add_section`.) - -#### Signature - -```dotnet -public SWMLBuilder AddSection(string sectionName) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.SWML.SWMLBuilder` - -#### Source - -[`src/SignalWire/SWML/SWMLBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/SWMLBuilder.cs) - -Line 107. - -*** - -### Ai(string?, List\>?, string?, string?, Dictionary\?, Dictionary\?) - -Add an `ai` verb. (Python parity: -`SWMLBuilder.ai(prompt_text, prompt_pom, post_prompt, post_prompt_url, swaig, ...)`.) - -#### Signature - -```dotnet -public SWMLBuilder Ai(string? promptText = null, List>? promptPom = null, string? postPrompt = null, string? postPromptUrl = null, Dictionary? swaig = null, Dictionary? extraParams = null) -``` - -#### Parameters - - - - - - - - - - - - - -#### Returns - -`SignalWire.SWML.SWMLBuilder` - -#### Source - -[`src/SignalWire/SWML/SWMLBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/SWMLBuilder.cs) - -Line 45. - -*** - -### Answer(int?, string?) - -Add an `answer` verb. (Python parity: -`SWMLBuilder.answer(max_duration, codecs)`.) - -#### Signature - -```dotnet -public SWMLBuilder Answer(int? maxDuration = null, string? codecs = null) -``` - -#### Parameters - - - - - -#### Returns - -`SignalWire.SWML.SWMLBuilder` - -#### Source - -[`src/SignalWire/SWML/SWMLBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/SWMLBuilder.cs) - -Line 24. - -*** - -### Build() - -Build the SWML document as a dict. -(Python parity: `SWMLBuilder.build`.) - -#### Signature - -```dotnet -public Dictionary Build() -``` - -#### Returns - -`Dictionary` - -#### Source - -[`src/SignalWire/SWML/SWMLBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/SWMLBuilder.cs) - -Line 115. - -*** - -### Hangup(string?) - -Add a `hangup` verb. (Python parity: -`SWMLBuilder.hangup(reason)`.) - -#### Signature - -```dotnet -public SWMLBuilder Hangup(string? reason = null) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.SWML.SWMLBuilder` - -#### Source - -[`src/SignalWire/SWML/SWMLBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/SWMLBuilder.cs) - -Line 35. - -*** - -### Play(string?, List\?, double?, string?, string?, string?) - -Add a `play` verb. (Python parity: -`SWMLBuilder.play(url, urls, volume, say_text, say_voice, say_language)`.) - -#### Signature - -```dotnet -public SWMLBuilder Play(string? url = null, List? urls = null, double? volume = null, string? sayText = null, string? sayVoice = null, string? sayLanguage = null) -``` - -#### Parameters - - - - - - - - - - - - - -#### Returns - -`SignalWire.SWML.SWMLBuilder` - -#### Source - -[`src/SignalWire/SWML/SWMLBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/SWMLBuilder.cs) - -Line 75. - -*** - -### Render() - -Render the SWML document as a JSON string. -(Python parity: `SWMLBuilder.render`.) - -#### Signature - -```dotnet -public string Render() -``` - -#### Returns - -`string` - -#### Source - -[`src/SignalWire/SWML/SWMLBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/SWMLBuilder.cs) - -Line 119. - -*** - -### Reset() - -Reset the underlying document. -(Python parity: `SWMLBuilder.reset`.) - -#### Signature - -```dotnet -public SWMLBuilder Reset() -``` - -#### Returns - -`SignalWire.SWML.SWMLBuilder` - -#### Source - -[`src/SignalWire/SWML/SWMLBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/SWMLBuilder.cs) - -Line 123. - -*** - -### Say(string, string?, string?) - -Add a `say` verb (synthesized speech). -(Python parity: `SWMLBuilder.say(text, voice, language)`.) - -#### Signature - -```dotnet -public SWMLBuilder Say(string text, string? voice = null, string? language = null) -``` - -#### Parameters - - - - - - - -#### Returns - -`SignalWire.SWML.SWMLBuilder` - -#### Source - -[`src/SignalWire/SWML/SWMLBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/SWMLBuilder.cs) - -Line 96. - -*** - -### SWMLBuilder(Service) - -#### Signature - -```dotnet -public SWMLBuilder(Service service) -``` - -#### Parameters - - - -#### Source - -[`src/SignalWire/SWML/SWMLBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/SWMLBuilder.cs) - -Line 17. - -## Source - -[`src/SignalWire/SWML/SWMLBuilder.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/SWMLBuilder.cs) - -Line 13. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.swml/swml-renderer/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.swml/swml-renderer/index.mdx deleted file mode 100644 index 3331441875..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.swml/swml-renderer/index.mdx +++ /dev/null @@ -1,123 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.swml/swml-renderer" -title: "SwmlRenderer" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.SWML.SwmlRenderer" - parent: "SignalWire.SWML" - module: "SignalWire.SWML" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/SwmlRenderer.cs" - visibility: "public" ---- -# `SwmlRenderer` - -**Modifiers:** `static` - -## Signature - -```dotnet -public static class SwmlRenderer -``` - -## Methods - -### RenderFunctionResponseSwml(string, Service, List\>?, string) - -Generate a SWML document for a SWAIG function response — -plays the response text and queues any follow-up actions. -(Python parity: `SwmlRenderer.render_function_response_swml`.) - -**Modifiers:** `static` - -#### Signature - -```dotnet -public static string RenderFunctionResponseSwml(string responseText, Service service, List>? actions = null, string format = "json") -``` - -#### Parameters - - - - - - - - - -#### Returns - -`string` - -#### Source - -[`src/SignalWire/SWML/SwmlRenderer.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/SwmlRenderer.cs) - -Line 100. - -*** - -### RenderSwml(object, Service, string?, string?, List\>?, string?, string?, bool, Dictionary\?, bool, bool, string, bool, string, string?) - -Generate a complete SWML document with AI configuration. -(Python parity: `SwmlRenderer.render_swml`.) - -**Modifiers:** `static` - -#### Signature - -```dotnet -public static string RenderSwml(object prompt, Service service, string? postPrompt = null, string? postPromptUrl = null, List>? swaigFunctions = null, string? startupHookUrl = null, string? hangupHookUrl = null, bool promptIsPom = false, Dictionary? @params = null, bool addAnswer = false, bool recordCall = false, string recordFormat = "mp4", bool recordStereo = true, string format = "json", string? defaultWebhookUrl = null) -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -#### Returns - -`string` - -#### Source - -[`src/SignalWire/SWML/SwmlRenderer.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/SwmlRenderer.cs) - -Line 21. - -## Source - -[`src/SignalWire/SWML/SwmlRenderer.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/SwmlRenderer.cs) - -Line 17. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.swml/verb-info/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.swml/verb-info/index.mdx deleted file mode 100644 index 4b0a0ec81d..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.swml/verb-info/index.mdx +++ /dev/null @@ -1,82 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.swml/verb-info" -title: "VerbInfo" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.SWML.VerbInfo" - parent: "SignalWire.SWML" - module: "SignalWire.SWML" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Schema.cs" - visibility: "public" ---- -# `VerbInfo` - -Metadata about a single SWML verb parsed from the schema. - -**Modifiers:** `sealed` - -## Signature - -```dotnet -public sealed record VerbInfo : IEquatable -``` - -## Inheritance - -**Implements:** `System.IEquatable` - -## Properties - - - The full JSON schema definition for this verb. - - - - The actual verb name used in SWML documents (e.g. "answer"). - - - - The definition key in the JSON schema (e.g. "Answer"). - - -## Methods - -### VerbInfo(string, string, JsonElement) - -Metadata about a single SWML verb parsed from the schema. - -#### Signature - -```dotnet -public VerbInfo(string Name, string SchemaName, JsonElement Definition) -``` - -#### Parameters - - - The actual verb name used in SWML documents (e.g. "answer"). - - - - The definition key in the JSON schema (e.g. "Answer"). - - - - The full JSON schema definition for this verb. - - -#### Source - -[`src/SignalWire/SWML/Schema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Schema.cs) - -Line 11. - -## Source - -[`src/SignalWire/SWML/Schema.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/SWML/Schema.cs) - -Line 11. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.utils/execution-mode/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.utils/execution-mode/index.mdx deleted file mode 100644 index 57d46d3195..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.utils/execution-mode/index.mdx +++ /dev/null @@ -1,84 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.utils/execution-mode" -title: "ExecutionMode" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.Utils.ExecutionMode" - parent: "SignalWire.Utils" - module: "SignalWire.Utils" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Utils/ExecutionMode.cs" - visibility: "public" ---- -# `ExecutionMode` - -**Modifiers:** `static` - -## Signature - -```dotnet -public static class ExecutionMode -``` - -## Methods - -### GetExecutionMode() - -Returns the execution-mode string — -`"server"` (default), `"cgi"`, `"lambda"`, -`"google_cloud_function"`, `"azure_function"`. -(Python parity: -`signalwire.core.logging_config.get_execution_mode`.) - -**Modifiers:** `static` - -#### Signature - -```dotnet -public static string GetExecutionMode() -``` - -#### Returns - -`string` - -#### Source - -[`src/SignalWire/Utils/ExecutionMode.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Utils/ExecutionMode.cs) - -Line 19. - -*** - -### IsServerlessMode() - -True when running in any serverless environment -(anything other than `"server"`). (Python parity: -`signalwire.utils.is_serverless_mode`.) - -**Modifiers:** `static` - -#### Signature - -```dotnet -public static bool IsServerlessMode() -``` - -#### Returns - -`bool` - -#### Source - -[`src/SignalWire/Utils/ExecutionMode.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Utils/ExecutionMode.cs) - -Line 44. - -## Source - -[`src/SignalWire/Utils/ExecutionMode.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Utils/ExecutionMode.cs) - -Line 12. diff --git a/fern/products/sdk-reference/dotnet/signal-wire.utils/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.utils/index.mdx deleted file mode 100644 index 1709863302..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.utils/index.mdx +++ /dev/null @@ -1,20 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.utils" -title: "SignalWire.Utils" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "module" - language: "dotnet" - qualified_name: "SignalWire.Utils" ---- -# `SignalWire.Utils` - -## Classes - - - - - - diff --git a/fern/products/sdk-reference/dotnet/signal-wire.utils/url-validator/index.mdx b/fern/products/sdk-reference/dotnet/signal-wire.utils/url-validator/index.mdx deleted file mode 100644 index aa8b6604d2..0000000000 --- a/fern/products/sdk-reference/dotnet/signal-wire.utils/url-validator/index.mdx +++ /dev/null @@ -1,97 +0,0 @@ ---- -slug: "/reference/dotnet/signal-wire.utils/url-validator" -title: "UrlValidator" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "class" - language: "dotnet" - qualified_name: "SignalWire.Utils.UrlValidator" - parent: "SignalWire.Utils" - module: "SignalWire.Utils" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Utils/UrlValidator.cs" - visibility: "public" ---- -# `UrlValidator` - -**Modifiers:** `static` - -## Signature - -```dotnet -public static class UrlValidator -``` - -## Methods - -### ValidateUrl(string, bool) - -Validate that a URL is safe to fetch (not pointing to -private/internal resources). Returns true when safe, false when -rejected. (Python parity: -`signalwire.utils.url_validator.validate_url(url, allow_private)`.) - -**Modifiers:** `static` - -#### Signature - -```dotnet -public static bool ValidateUrl(string url, bool allowPrivate = false) -``` - -#### Parameters - - - - - -#### Returns - -`bool` - -#### Source - -[`src/SignalWire/Utils/UrlValidator.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Utils/UrlValidator.cs) - -Line 20. - -*** - -### ValidateUrlWithResolvedAddresses(string, IPAddress\[], bool) - -Test-friendly overload that accepts already-resolved IPs -instead of doing a live DNS lookup. Cross-language audit / unit -tests use this to exercise the blocked-range logic deterministically. - -**Modifiers:** `static` - -#### Signature - -```dotnet -public static bool ValidateUrlWithResolvedAddresses(string url, IPAddress[] resolvedAddresses, bool allowPrivate = false) -``` - -#### Parameters - - - - - - - -#### Returns - -`bool` - -#### Source - -[`src/SignalWire/Utils/UrlValidator.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Utils/UrlValidator.cs) - -Line 79. - -## Source - -[`src/SignalWire/Utils/UrlValidator.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Utils/UrlValidator.cs) - -Line 14. diff --git a/fern/products/sdk-reference/go/_meta.json b/fern/products/sdk-reference/go/_meta.json index dbb3942676..ba8f71ad92 100644 --- a/fern/products/sdk-reference/go/_meta.json +++ b/fern/products/sdk-reference/go/_meta.json @@ -6,5 +6,5 @@ "format": "mdx", "platform": "fern", "base_slug": "/reference/go", - "item_count": 2268 + "item_count": 2289 } \ No newline at end of file diff --git a/fern/products/sdk-reference/go/agents/agent/agent/agent-base/index.mdx b/fern/products/sdk-reference/go/agents/agent/agent/agent-base/index.mdx new file mode 100644 index 0000000000..0e89d7521d --- /dev/null +++ b/fern/products/sdk-reference/go/agents/agent/agent/agent-base/index.mdx @@ -0,0 +1,2701 @@ +--- +slug: "/reference/go/agents/agent/agent/agent-base" +title: "AgentBase" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/agent.AgentBase" + parent: "agents.agent.agent" + module: "agents.agent.agent" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go" +--- +# `AgentBase` + +AgentBase is the central agent struct. It embeds \*swml.Service so that Service's fields and methods (Name, Route, Host, Port, basic auth, the HTTP server, the tool registry, etc.) are promoted onto AgentBase. The agent-specific state below is layered on top. + +## Signature + +```go +type AgentBase struct +``` + +## Properties + + + Agent identity — matches Python: self.agent\_id = agent\_id or str(uuid.uuid4()) Exported so callers can read the assigned ID without a getter. + + + + + + +## Methods + +### AddAnswerVerb + +AddAnswerVerb configures the answer verb. Merged with defaults at render time. + +#### Signature + +```go +func (*AgentBase) AddAnswerVerb(config map[string]any) *AgentBase +``` + +#### Parameters + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1537. + +*** + +### AddFunctionInclude + +AddFunctionInclude adds a remote SWAIG function include. + +#### Signature + +```go +func (*AgentBase) AddFunctionInclude(url string, functions []string, metaData map[string]any) *AgentBase +``` + +#### Parameters + + + + + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1472. + +*** + +### AddHint + +AddHint adds a single speech-recognition hint. + +#### Signature + +```go +func (*AgentBase) AddHint(hint string) *AgentBase +``` + +#### Parameters + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1086. + +*** + +### AddHints + +AddHints adds multiple speech-recognition hints. + +#### Signature + +```go +func (*AgentBase) AddHints(hints []string) *AgentBase +``` + +#### Parameters + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1094. + +*** + +### AddInternalFiller + +AddInternalFiller adds fillers for a specific function and language. + +See SetInternalFillers for the complete list of supported funcName values (SupportedInternalFillerNames) and what fillers do. Names outside the supported set log a warning and are stored but will not play at runtime. + +#### Signature + +```go +func (*AgentBase) AddInternalFiller(funcName string, langCode string, fillers []string) *AgentBase +``` + +#### Parameters + + + + + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1444. + +*** + +### AddLanguage + +AddLanguage adds a language configuration as a raw map. + +#### Signature + +```go +func (*AgentBase) AddLanguage(config map[string]any) *AgentBase +``` + +#### Parameters + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1133. + +*** + +### AddLanguageTyped + +AddLanguageTyped adds a language configuration using typed named parameters, matching the Python SDK's add\_language method signature exactly. + +Python equivalent: ai\_config\_mixin.AIConfigMixin.add\_language Python signature: add\_language(name, code, voice, speech\_fillers=None, + +``` +function_fillers=None, engine=None, model=None, params=None) +``` + +Parameters: + +- name: display name (e.g. "English") +- code: BCP-47 language code (e.g. "en-US") +- voice: TTS voice name; may use "engine.voice:model" combined format +- speechFillers: filler phrases for natural speech pauses +- functionFillers: filler phrases played during SWAIG function calls +- engine: explicit TTS engine name (e.g. "elevenlabs") +- model: explicit TTS model name (e.g. "eleven\_turbo\_v2\_5") +- params: optional per-language params dict (engine-specific tuning, voice settings, etc.). Variadic — passing a single non-empty map\[string]any emits the SWML language object's "params" key. Empty or omitted → key not emitted. + +#### Signature + +```go +func (*AgentBase) AddLanguageTyped( + name string, + code string, + voice string, + speechFillers []string, + functionFillers []string, + engine string, + model string, + params ...map[string]any +) *AgentBase +``` + +#### Parameters + + + + + + + + + + + + + + + + + +#### Returns + +`*AgentBase` + +#### Examples + + + + ```go + function_fillers=None, engine=None, model=None, params=None) + ``` + + + + ```go + function_fillers=None, engine=None, model=None, params=None) + ``` + + + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1160. + +*** + +### AddMcpServer + +AddMcpServer adds an external MCP server for tool discovery and invocation. Tools are discovered via the MCP protocol at session start and registered as SWAIG functions. Returns self for method chaining. + +#### Signature + +```go +func (*AgentBase) AddMcpServer(cfg MCPServerConfig) *AgentBase +``` + +#### Parameters + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1867. + +*** + +### AddPatternHint + +AddPatternHint adds a pattern-based speech-recognition hint with regex replacement semantics. + +Python equivalent: ai\_config\_mixin.AIConfigMixin.add\_pattern\_hint Python signature: add\_pattern\_hint(hint, pattern, replace, ignore\_case=False) + +The Python implementation appends to self.\_hints (not a separate patternHints list) as a dict with keys "hint", "pattern", "replace", "ignore\_case". The Go implementation stores in patternHints and merges into the rendered "hints" array at render time. + +Parameters: + +- hint: the hint text the model receives +- pattern: regex pattern for the spoken word/phrase +- replace: replacement string for the matched pattern +- ignoreCase: when true, matching is case-insensitive + +#### Signature + +```go +func (*AgentBase) AddPatternHint(hint string, pattern string, replace string, ignoreCase ...bool) *AgentBase +``` + +#### Parameters + + + + + + + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1117. + +*** + +### AddPostAiVerb + +AddPostAiVerb adds a SWML verb to execute after the AI verb. + +#### Signature + +```go +func (*AgentBase) AddPostAiVerb(verbName string, config map[string]any) *AgentBase +``` + +#### Parameters + + + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1555. + +*** + +### AddPostAnswerVerb + +AddPostAnswerVerb adds a SWML verb to execute after the answer. + +#### Signature + +```go +func (*AgentBase) AddPostAnswerVerb(verbName string, config map[string]any) *AgentBase +``` + +#### Parameters + + + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1547. + +*** + +### AddPreAnswerVerb + +AddPreAnswerVerb adds a SWML verb to execute before the answer. + +#### Signature + +```go +func (*AgentBase) AddPreAnswerVerb(verbName string, config map[string]any) *AgentBase +``` + +#### Parameters + + + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1529. + +*** + +### AddPronunciation + +AddPronunciation adds a pronunciation override rule. + +Python equivalent: ai\_config\_mixin.AIConfigMixin.add\_pronunciation Python signature: add\_pronunciation(replace, with\_text, ignore\_case=False) + +Parameters: + +- replace: the word or expression to match +- withText: the phonetic spelling to substitute +- ignoreCase: when true, matching ignores case (Python: ignore\_case) + +#### Signature + +```go +func (*AgentBase) AddPronunciation(replace string, withText string, ignoreCase ...bool) *AgentBase +``` + +#### Parameters + + + + + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1289. + +*** + +### AddSkill + +AddSkill loads a skill by name with optional params and registers its tools. + +skillName is a skills.SkillName (a defined string type). The built-in skills.Skill\* constants give autocomplete + call-site typo checking; because Go auto-converts untyped string-constant literals, a bare "datetime" literal or skills.SkillName("custom") for a third-party skill compiles identically — parity with the Python reference's str parameter. + +#### Signature + +```go +func (*AgentBase) AddSkill(skillName skills.SkillName, params map[string]any) *AgentBase +``` + +#### Parameters + + + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 2244. + +*** + +### AddSwaigQueryParams + +AddSwaigQueryParams adds query parameters that will be appended to SWAIG webhook URLs. + +#### Signature + +```go +func (*AgentBase) AddSwaigQueryParams(params map[string]string) *AgentBase +``` + +#### Parameters + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1671. + +*** + +### AsRouter + +AsRouter returns an http.Handler for embedding in a custom server. + +#### Signature + +```go +func (*AgentBase) AsRouter() http.Handler +``` + +#### Returns + +`http.Handler` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 2729. + +*** + +### AutoMapSipUsernames + +AutoMapSipUsernames automatically registers common SIP usernames derived from this agent's name and route. + +Python equivalent: AgentBase.auto\_map\_sip\_usernames (agent\_base.py line 674) + +Derives usernames by: + +1. Stripping non-alphanumeric/underscore chars from the agent name (lowercased) +2. Stripping non-alphanumeric/underscore chars from the route (lowercased) +3. If the cleaned name is longer than 3 chars, also registers a vowel-stripped variant + +#### Signature + +```go +func (*AgentBase) AutoMapSipUsernames() *AgentBase +``` + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 2195. + +*** + +### ClearPostAiVerbs + +ClearPostAiVerbs removes all post-AI verbs. + +#### Signature + +```go +func (*AgentBase) ClearPostAiVerbs() *AgentBase +``` + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1579. + +*** + +### ClearPostAnswerVerbs + +ClearPostAnswerVerbs removes all post-answer verbs. + +#### Signature + +```go +func (*AgentBase) ClearPostAnswerVerbs() *AgentBase +``` + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1571. + +*** + +### ClearPreAnswerVerbs + +ClearPreAnswerVerbs removes all pre-answer verbs. + +#### Signature + +```go +func (*AgentBase) ClearPreAnswerVerbs() *AgentBase +``` + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1563. + +*** + +### ClearSwaigQueryParams + +ClearSwaigQueryParams removes all SWAIG query parameters. + +#### Signature + +```go +func (*AgentBase) ClearSwaigQueryParams() *AgentBase +``` + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1681. + +*** + +### Contexts + +Contexts is an alias for DefineContexts. + +#### Signature + +```go +func (*AgentBase) Contexts() *contexts.ContextBuilder +``` + +#### Returns + +`*contexts.ContextBuilder` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1615. + +*** + +### CreateToolToken + +CreateToolToken mints a per-call SWAIG-function token via the agent's SessionManager. Returns an empty string when minting fails (Python parity: state\_mixin.StateMixin.\_create\_tool\_token, which catches all exceptions and returns "" on error). + +#### Signature + +```go +func (*AgentBase) CreateToolToken(toolName string, callID string) (token string) +``` + +#### Parameters + + + + + +#### Returns + +`string` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1843. + +*** + +### DefineContexts + +DefineContexts returns the context builder, creating it if needed. The builder is attached to this agent so Validate() can check user-defined tool names against reserved native tool names (next\_step, change\_context, gather\_submit). + +#### Signature + +```go +func (*AgentBase) DefineContexts() *contexts.ContextBuilder +``` + +#### Returns + +`*contexts.ContextBuilder` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1594. + +*** + +### DefineTool + +DefineTool registers a tool (SWAIG function) with the agent. + +A SWAIG function is exactly the same concept as a "tool" in native OpenAI / Anthropic tool calling. On every LLM turn, the SDK renders each registered SWAIG function into the OpenAI tool schema: + +``` +{ + "type": "function", + "function": { + "name": "your_name_here", + "description": "your description text", + "parameters": { /* your JSON schema */ } + } +} +``` + +That schema is sent to the model as part of the same API call that produces the next assistant message. The model reads: + +- the function Description to decide WHEN to call this tool +- each parameter "description" (inside Parameters) to decide HOW to fill in that argument from the user's utterance + +This means descriptions are prompt engineering, not developer comments. A vague Description is the #1 cause of "the model has the right tool but doesn't call it" failures. + +BAD: + +``` +Description: "Lookup function" +Parameters: {"id": {"type": "string", "description": "the id"}} +``` + +GOOD: + +``` +Description: "Look up a customer's account details by account number. "+ + "Use this BEFORE quoting any account-specific info (balance, "+ + "plan, status). Do not use for general product questions.", +Parameters: map[string]any{ + "account_number": map[string]any{ + "type": "string", + "description": "The customer's 8-digit account number, no "+ + "dashes or spaces. Ask the user if they don't provide it.", + }, +}, +``` + +LLM tool selection accuracy degrades past ~7-8 simultaneously-active tools per call. Use Step.SetFunctions() to partition tools across steps so only the relevant subset is active at any moment. + +#### Signature + +```go +func (*AgentBase) DefineTool(def ToolDefinition) *AgentBase +``` + +#### Parameters + + + +#### Returns + +`*AgentBase` + +#### Examples + + + + ```go + { + "type": "function", + "function": { + "name": "your_name_here", + "description": "your description text", + "parameters": { /* your JSON schema */ } + } + } + ``` + + + + ```go + Description: "Lookup function" + Parameters: {"id": {"type": "string", "description": "the id"}} + ``` + + + + ```go + Description: "Look up a customer's account details by account number. "+ + "Use this BEFORE quoting any account-specific info (balance, "+ + "plan, status). Do not use for general product questions.", + Parameters: map[string]any{ + "account_number": map[string]any{ + "type": "string", + "description": "The customer's 8-digit account number, no "+ + "dashes or spaces. Ask the user if they don't provide it.", + }, + }, + ``` + + + + ```go + { + "type": "function", + "function": { + "name": "your_name_here", + "description": "your description text", + "parameters": { /* your JSON schema */ } + } + } + ``` + + + + ```go + Description: "Lookup function" + Parameters: {"id": {"type": "string", "description": "the id"}} + ``` + + + + ```go + Description: "Look up a customer's account details by account number. "+ + "Use this BEFORE quoting any account-specific info (balance, "+ + "plan, status). Do not use for general product questions.", + Parameters: map[string]any{ + "account_number": map[string]any{ + "type": "string", + "description": "The customer's 8-digit account number, no "+ + "dashes or spaces. Ask the user if they don't provide it.", + }, + }, + ``` + + + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 964. + +*** + +### DefineTools + +DefineTools returns all registered tool definitions in insertion order. + +#### Signature + +```go +func (*AgentBase) DefineTools() []*ToolDefinition +``` + +#### Returns + +`[]*ToolDefinition` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1050. + +*** + +### EnableDebugEvents + +EnableDebugEvents sets the debug events level (0 = off). + +#### Signature + +```go +func (*AgentBase) EnableDebugEvents(level int) *AgentBase +``` + +#### Parameters + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1464. + +*** + +### EnableDebugRoutes + +EnableDebugRoutes is a placeholder for adding debug HTTP routes. + +#### Signature + +```go +func (*AgentBase) EnableDebugRoutes() *AgentBase +``` + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1689. + +*** + +### EnableMcpServer + +EnableMcpServer exposes this agent's tools as an MCP server endpoint at /mcp. The endpoint speaks JSON-RPC 2.0 (MCP protocol) and supports initialize, tools/list, tools/call, and ping. Returns self for method chaining. + +#### Signature + +```go +func (*AgentBase) EnableMcpServer() *AgentBase +``` + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1888. + +*** + +### EnableSipRouting + +EnableSipRouting enables SIP-based routing for this agent. + +Python equivalent: AgentBase.enable\_sip\_routing(auto\_map=True, path="/sip") + +This registers a routing callback at the given path that checks incoming SIP usernames against the agent's registered username set. When autoMap is true, AutoMapSipUsernames is called to derive common usernames from the agent name and route. + +The Python implementation (agent\_base.py line 612) creates a sip\_routing\_callback that extracts the SIP username from the body, checks it against \_sip\_usernames, and returns None in both the matched and unmatched case — letting the normal routing continue. It then calls register\_routing\_callback to register the callback, and optionally calls auto\_map\_sip\_usernames. + +#### Signature + +```go +func (*AgentBase) EnableSipRouting(autoMap bool, path string) *AgentBase +``` + +#### Parameters + + + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 2084. + +*** + +### GetAllFunctions + +GetAllFunctions returns a snapshot of all registered SWAIG functions keyed by name. The returned map is a copy — subsequent registrations do not mutate it. (Python parity: “ToolRegistry.get\_all\_functions“.) + +#### Signature + +```go +func (*AgentBase) GetAllFunctions() map[string]*ToolDefinition +``` + +#### Returns + +`map[string]*ToolDefinition` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1020. + +*** + +### GetBasicAuthCredentials + +GetBasicAuthCredentials returns the (username, password) configured for this agent's HTTP basic auth. + +Python equivalent: auth\_mixin.AuthMixin.get\_basic\_auth\_credentials (auth\_mixin.py line 42) Python behavior: returns (username, password) tuple from self.\_basic\_auth + +#### Signature + +```go +func (*AgentBase) GetBasicAuthCredentials() (string, string) +``` + +#### Returns + +`(string, string)` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1796. + +*** + +### GetBasicAuthCredentialsWithSource + +GetBasicAuthCredentialsWithSource returns the basic-auth credentials plus a string indicating their SOURCE — one of "provided", "environment", or "generated". Mirrors Python's “auth\_mixin.AuthMixin.get\_basic\_auth\_credentials(include\_source=True)“ (auth\_mixin.py line 42-73). + +#### Signature + +```go +func (*AgentBase) GetBasicAuthCredentialsWithSource() (user string, pass string, source string) +``` + +#### Returns + +`(string, string, string)` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1805. + +*** + +### GetContexts + +GetContexts returns the contexts as a serialised map (the same shape SWML expects), or nil when no contexts have been defined yet. This mirrors Python's “PromptManager.get\_contexts“ which returns the contexts dict or “None“. + +Python equivalent: prompt\_manager.PromptManager.get\_contexts + +#### Signature + +```go +func (*AgentBase) GetContexts() map[string]any +``` + +#### Returns + +`map[string]any` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 893. + +*** + +### GetFullURL + +GetFullURL returns the full URL for this agent's endpoint, optionally embedding basic-auth credentials. + +Python equivalent: AgentBase.get\_full\_url(include\_auth=False) (agent\_base.py:325) + +The Python implementation handles serverless URL construction (CGI / Lambda / Cloud Functions / Azure) inline. In the Go SDK, serverless URL construction lives in pkg/lambda; this method delegates server-mode URL building to the embedded swml.Service and matches Python's server-mode behavior. + +#### Signature + +```go +func (*AgentBase) GetFullURL(includeAuth bool) string +``` + +#### Parameters + + + +#### Returns + +`string` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 574. + +*** + +### GetFunction + +GetFunction returns the registered tool definition for the given name, or nil when no such function is registered. (Python parity: “ToolRegistry.get\_function“.) + +#### Signature + +```go +func (*AgentBase) GetFunction(name string) *ToolDefinition +``` + +#### Parameters + + + +#### Returns + +`*ToolDefinition` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1008. + +*** + +### GetLanguageParams + +GetLanguageParams reads the per-language params dict for a previously-added language. + +Python equivalent: ai\_config\_mixin.AIConfigMixin.get\_language\_params Python signature: get\_language\_params(code) -> Optional\[Dict\[str, Any]] + +Returns the params map if set, or nil otherwise (including when the code is unknown). Callers can distinguish "no params set" from "empty params set" by the fact that empty maps are never stored (SetLanguageParams with an empty dict removes the key). + +#### Signature + +```go +func (*AgentBase) GetLanguageParams(code string) map[string]any +``` + +#### Parameters + + + +#### Returns + +`map[string]any` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1258. + +*** + +### GetName + +GetName returns the agent's name. + +#### Signature + +```go +func (*AgentBase) GetName() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 559. + +*** + +### GetPostPrompt + +GetPostPrompt returns the current post-prompt text. Returns an empty string if no post-prompt has been set. + +Python equivalent: prompt\_mixin.PromptMixin.get\_post\_prompt (prompt\_mixin.py line 374) + +#### Signature + +```go +func (*AgentBase) GetPostPrompt() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 870. + +*** + +### GetPrompt + +GetPrompt returns the current prompt. If POM mode is active, it returns \[]map\[string]any; otherwise it returns the raw string. + +#### Signature + +```go +func (*AgentBase) GetPrompt() any +``` + +#### Returns + +`any` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 776. + +*** + +### GetRawPrompt + +GetRawPrompt returns the raw prompt text whatever “SetPromptText“ stored, regardless of POM mode. Returns an empty string when no raw prompt has been set. + +Python equivalent: prompt\_manager.PromptManager.get\_raw\_prompt + +#### Signature + +```go +func (*AgentBase) GetRawPrompt() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 881. + +*** + +### GetRoute + +GetRoute returns the agent's configured route path. + +#### Signature + +```go +func (*AgentBase) GetRoute() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 552. + +*** + +### HasFunction + +HasFunction reports whether a SWAIG function with the given name is registered. (Python parity: “ToolRegistry.has\_function“.) + +#### Signature + +```go +func (*AgentBase) HasFunction(name string) bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 998. + +*** + +### HasSkill + +HasSkill returns whether a skill is loaded. Accepts a skills.SkillName constant or any string literal (Go auto-converts), mirroring AddSkill. + +#### Signature + +```go +func (*AgentBase) HasSkill(skillName skills.SkillName) bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 2320. + +*** + +### ListSkills + +ListSkills returns the names of loaded skills. + +#### Signature + +```go +func (*AgentBase) ListSkills() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 2314. + +*** + +### ListToolNames + +ListToolNames returns the names of every registered SWAIG tool in insertion order. Implements contexts.ToolLister. + +#### Signature + +```go +func (*AgentBase) ListToolNames() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1606. + +*** + +### ManualSetProxyUrl + +ManualSetProxyUrl overrides the proxy URL base used for webhook URL generation. + +#### Signature + +```go +func (*AgentBase) ManualSetProxyUrl(url string) *AgentBase +``` + +#### Parameters + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1646. + +*** + +### OnDebugEvent + +OnDebugEvent registers a callback for debug events. + +#### Signature + +```go +func (*AgentBase) OnDebugEvent(cb DebugEventHandler) *AgentBase +``` + +#### Parameters + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 2337. + +*** + +### OnFunctionCall + +OnFunctionCall dispatches a SWAIG function call to the registered handler. + +#### Signature + +```go +func (*AgentBase) OnFunctionCall(name string, args map[string]any, rawData map[string]any) (any, error) +``` + +#### Parameters + + + + + + + +#### Returns + +`(any, error)` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1063. + +*** + +### OnRequest + +OnRequest is called on every SWML request before rendering. Subclasses can override this method to inspect or transform the request data. It delegates to OnSwmlRequest. + +Python equivalent: web\_mixin.WebMixin.on\_request (web\_mixin.py line 1266) Python signature: on\_request(request\_data, callback\_path) -> Optional\[dict] + +Returns nil to proceed with default rendering, or a non-nil map containing SWML document overrides. + +#### Signature + +```go +func (*AgentBase) OnRequest(requestData map[string]any, callbackPath string) map[string]any +``` + +#### Parameters + + + + + +#### Returns + +`map[string]any` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1703. + +*** + +### OnSummary + +OnSummary registers a callback for post-prompt summaries. + +#### Signature + +```go +func (*AgentBase) OnSummary(cb SummaryCallback) *AgentBase +``` + +#### Parameters + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 2329. + +*** + +### OnSwmlRequest + +OnSwmlRequest is the primary customization point for the user to modify the SWML document based on request data. If a hook has been registered via SetOnSwmlRequestHook the hook is invoked; otherwise this returns nil (no modification). + +Python equivalent: web\_mixin.WebMixin.on\_swml\_request (web\_mixin.py line 1287) Python signature: on\_swml\_request(request\_data, callback\_path, request) -> Optional\[dict] + +Go has no method overriding via embedded structs alone — the hook field is the idiomatic Go equivalent of Python's overridable on\_swml\_request. The third \*http.Request argument is preserved on the Go-native signature (the cross-language audit projects only the first two args). Returning a non-nil map applies modifications to the rendered SWML; returning nil uses the default rendering unchanged. + +#### Signature + +```go +func (*AgentBase) OnSwmlRequest(requestData map[string]any, callbackPath string, r *http.Request) map[string]any +``` + +#### Parameters + + + + + + + +#### Returns + +`map[string]any` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1721. + +*** + +### Pom + +Pom returns a typed PromptObjectModel built from the agent's current POM sections. Returns nil when use\_pom is false (Python parity: “self.pom“ is “None“ when “use\_pom=False“). The returned value is a deep copy / fresh build — mutations don't affect the agent's internal state. + +Python equivalent: “agent.pom“ instance attribute (agent\_base.py line 209), which is a “PromptObjectModel“ instance. + +#### Signature + +```go +func (*AgentBase) Pom() *pom.PromptObjectModel +``` + +#### Returns + +`*pom.PromptObjectModel` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 795. + +*** + +### PromptAddSection + +PromptAddSection appends a new section to the POM prompt. + +Python equivalent: prompt\_mixin.PromptMixin.prompt\_add\_section Added params to match Python signature: numbered, numberedBullets, subsections. - numbered: if true the section itself is rendered with a numeric marker - numberedBullets: if true the bullet list is rendered with numbers - subsections: optional list of child section maps (each with "title", "body", "bullets") + +#### Signature + +```go +func (*AgentBase) PromptAddSection( + title string, + body string, + bullets []string, + opts ...PromptSectionOption +) *AgentBase +``` + +#### Parameters + + + + + + + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 615. + +*** + +### PromptAddSubsection + +PromptAddSubsection adds a subsection under an existing parent section. + +#### Signature + +```go +func (*AgentBase) PromptAddSubsection( + parentTitle string, + title string, + body string, + bullets []string +) *AgentBase +``` + +#### Parameters + + + + + + + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 739. + +*** + +### PromptAddToSection + +PromptAddToSection finds an existing POM section by title and appends text and/or bullets. If the section does not exist, it is a no-op. + +Python equivalent: prompt\_mixin.PromptMixin.prompt\_add\_to\_section Added params to match Python signature: bullet (single bullet string) and bullets (\[]string list). When body is non-empty it is appended to the section body. When bullet is non-empty it is added to the bullets list. When bullets is non-nil its elements are appended to the bullets list. + +#### Signature + +```go +func (*AgentBase) PromptAddToSection(title string, body string, opts ...PromptAddToSectionOption) *AgentBase +``` + +#### Parameters + + + + + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 681. + +*** + +### PromptHasSection + +PromptHasSection returns true if a POM section with the given title exists. + +#### Signature + +```go +func (*AgentBase) PromptHasSection(title string) bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 763. + +*** + +### RegisterRoutingCallback + +RegisterRoutingCallback registers a callback function that is invoked for incoming requests at the given path to determine routing. + +Python equivalent: web\_mixin.WebMixin.register\_routing\_callback Python signature: register\_routing\_callback(callback\_fn, path="/sip") + +The callback receives the HTTP request and the parsed body. It should return a non-nil map to override the response, or nil to let normal processing continue. This method delegates to swml.Service.RegisterRoutingCallback. + +For Python-aligned redirect semantics (callback returns a route string and the framework issues an HTTP 307 redirect), use RegisterSipRoutingCallback. + +#### Signature + +```go +func (*AgentBase) RegisterRoutingCallback( + callbackFn func(r *http.Request, body map[string]any) map[string]any, + path string +) +``` + +#### Parameters + + + + + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 2132. + +*** + +### RegisterSipRoutingCallback + +RegisterSipRoutingCallback registers a callback whose string return value triggers an HTTP 307 Temporary Redirect to that route. An empty return value (or a GET / non-POST request) lets normal SWML processing continue. + +Python equivalent: web\_mixin.WebMixin.register\_routing\_callback Python signature: register\_routing\_callback(callback\_fn, path="/sip") + +The Python callback returns Optional\[str]; on a non-None return the framework responds with HTTP 307 + Location: route (web\_mixin.py:628-635). This method preserves that behavior, in contrast to RegisterRoutingCallback which returns a response document override (a richer Go-only mechanism). + +Use this form when porting Python code that relies on redirect-based SIP or route-dispatch patterns. + +#### Signature + +```go +func (*AgentBase) RegisterSipRoutingCallback( + callbackFn func(r *http.Request, body map[string]any) string, + path string +) +``` + +#### Parameters + + + + + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 2153. + +*** + +### RegisterSipUsername + +RegisterSipUsername registers a SIP username that this agent handles. + +#### Signature + +```go +func (*AgentBase) RegisterSipUsername(username string) *AgentBase +``` + +#### Parameters + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 2226. + +*** + +### RegisterSwaigFunction + +RegisterSwaigFunction registers a raw SWAIG function definition (e.g. for DataMap tools that don't have a Go handler). + +#### Signature + +```go +func (*AgentBase) RegisterSwaigFunction(funcDef map[string]any) *AgentBase +``` + +#### Parameters + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 976. + +*** + +### RemoveFunction + +RemoveFunction removes a registered SWAIG function. Returns true when the function was found and removed; false when it wasn't registered. (Python parity: “ToolRegistry.remove\_function“.) + +#### Signature + +```go +func (*AgentBase) RemoveFunction(name string) bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1033. + +*** + +### RemoveSkill + +RemoveSkill unloads a skill by name. Accepts a skills.SkillName constant or any string literal (Go auto-converts), mirroring AddSkill. + +#### Signature + +```go +func (*AgentBase) RemoveSkill(skillName skills.SkillName) *AgentBase +``` + +#### Parameters + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 2308. + +*** + +### RenderSWML + +RenderSWML builds the complete SWML document for a request. + +#### Signature + +```go +func (*AgentBase) RenderSWML(requestData map[string]any, request *http.Request) map[string]any +``` + +#### Parameters + + + + + +#### Returns + +`map[string]any` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 2488. + +*** + +### ResetContexts + +ResetContexts removes all contexts, returning the agent to a no-contexts state. This is a convenience wrapper around DefineContexts().Reset(). Use it in a dynamic config callback when you need to rebuild contexts from scratch for a specific request. + +#### Signature + +```go +func (*AgentBase) ResetContexts() *AgentBase +``` + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1623. + +*** + +### Run + +Run starts the HTTP server for the agent. This is a blocking call. + +Run delegates to RunContext with context.Background(); use RunContext to drive a graceful shutdown from a context (cancellation or deadline). + +#### Signature + +```go +func (*AgentBase) Run() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 2666. + +*** + +### RunContext + +RunContext is the context-aware form of Run. It blocks serving HTTP exactly like Run, but when ctx is cancelled (or its deadline passes) it triggers the same graceful HTTP shutdown that SetupGracefulShutdown performs on a signal — draining in-flight requests — then returns nil. It composes with SetupGracefulShutdown: whichever of (ctx, SIGTERM/SIGINT) fires first wins. + +This is a Go-port addition (the Python reference's run()/serve loop has no caller-supplied cancellation token); documented in PORT\_ADDITIONS.md. + +#### Signature + +```go +func (*AgentBase) RunContext(ctx context.Context) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 2678. + +*** + +### Serve + +Serve is an alias for Run. + +#### Signature + +```go +func (*AgentBase) Serve() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 2724. + +*** + +### SetDynamicConfigCallback + +SetDynamicConfigCallback sets a callback invoked on each request to allow per-request agent customisation. + +#### Signature + +```go +func (*AgentBase) SetDynamicConfigCallback(cb DynamicConfigCallback) *AgentBase +``` + +#### Parameters + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1638. + +*** + +### SetFunctionIncludes + +SetFunctionIncludes replaces all function includes. + +#### Signature + +```go +func (*AgentBase) SetFunctionIncludes(includes []map[string]any) *AgentBase +``` + +#### Parameters + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1487. + +*** + +### SetGlobalData + +SetGlobalData replaces all global data. + +#### Signature + +```go +func (*AgentBase) SetGlobalData(data map[string]any) *AgentBase +``` + +#### Parameters + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1328. + +*** + +### SetInternalFillers + +SetInternalFillers replaces all internal fillers. + +Internal fillers are short phrases the AI agent speaks (via TTS) while an internal/native function is running, so the caller doesn't hear dead air during transitions or background work. + +Supported function names (match the SWAIGInternalFiller schema): + +``` +hangup — when the agent is hanging up +check_time — when checking the time +wait_for_user — when waiting for user input +wait_seconds — during deliberate pauses +adjust_response_latency — when adjusting response timing +next_step — transitioning between steps in prompt.contexts +change_context — switching between contexts in prompt.contexts +get_visual_input — processing visual input (enable_vision) +get_ideal_strategy — thinking (enable_thinking) +``` + +Notably NOT supported: change\_step, gather\_submit, or arbitrary user-defined SWAIG function names. The runtime only honors fillers for the names listed above; everything else is silently ignored at the SWML level. This method warns at registration time if you pass an unknown name so you catch the typo early. + +#### Signature + +```go +func (*AgentBase) SetInternalFillers(fillers map[string]map[string][]string) *AgentBase +``` + +#### Parameters + + + +#### Returns + +`*AgentBase` + +#### Examples + + + + ```go + hangup — when the agent is hanging up + check_time — when checking the time + wait_for_user — when waiting for user input + wait_seconds — during deliberate pauses + adjust_response_latency — when adjusting response timing + next_step — transitioning between steps in prompt.contexts + change_context — switching between contexts in prompt.contexts + get_visual_input — processing visual input (enable_vision) + get_ideal_strategy — thinking (enable_thinking) + ``` + + + + ```go + hangup — when the agent is hanging up + check_time — when checking the time + wait_for_user — when waiting for user input + wait_seconds — during deliberate pauses + adjust_response_latency — when adjusting response timing + next_step — transitioning between steps in prompt.contexts + change_context — switching between contexts in prompt.contexts + get_visual_input — processing visual input (enable_vision) + get_ideal_strategy — thinking (enable_thinking) + ``` + + + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1411. + +*** + +### SetLanguageParams + +SetLanguageParams sets (or replaces) the per-language params dict on an already-added language. Useful when language entries are built up via AddLanguage/AddLanguageTyped first and engine-specific tuning is added later (e.g., from a config loader). + +Python equivalent: ai\_config\_mixin.AIConfigMixin.set\_language\_params Python signature: set\_language\_params(code, params) + +Parameters: + +- code: language code as previously passed to AddLanguage (e.g. "en-US") +- params: engine-specific params dict to attach. Empty/nil removes the key. + +Returns the AgentBase for chaining. No-op if the code isn't found. + +#### Signature + +```go +func (*AgentBase) SetLanguageParams(code string, params map[string]any) *AgentBase +``` + +#### Parameters + + + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1232. + +*** + +### SetLanguages + +SetLanguages replaces all language configurations. + +#### Signature + +```go +func (*AgentBase) SetLanguages(languages []map[string]any) *AgentBase +``` + +#### Parameters + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1273. + +*** + +### SetNativeFunctions + +SetNativeFunctions sets the list of native function names. + +#### Signature + +```go +func (*AgentBase) SetNativeFunctions(names []string) *AgentBase +``` + +#### Parameters + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1346. + +*** + +### SetOnSwmlRequestHook + +SetOnSwmlRequestHook registers a function that customizes the SWML response on a per-request basis. The hook receives the parsed body, the callback path (for routing-callback dispatch), and the raw \*http.Request for header / query inspection. Returning a non-nil map applies modifications to the rendered SWML; returning nil falls through to the default rendering. + +Python parity: this is the Go-idiomatic way of "overriding" on\_swml\_request — Go has no method inheritance. + +#### Signature + +```go +func (*AgentBase) SetOnSwmlRequestHook(hook OnSwmlRequestHook) *AgentBase +``` + +#### Parameters + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1740. + +*** + +### SetParam + +SetParam sets a single AI parameter (e.g. temperature, top\_p). + +#### Signature + +```go +func (*AgentBase) SetParam(key string, value any) *AgentBase +``` + +#### Parameters + + + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1312. + +*** + +### SetParams + +SetParams replaces all AI parameters. + +#### Signature + +```go +func (*AgentBase) SetParams(params map[string]any) *AgentBase +``` + +#### Parameters + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1320. + +*** + +### SetPostPrompt + +SetPostPrompt sets the post-prompt text used for conversation summary. + +#### Signature + +```go +func (*AgentBase) SetPostPrompt(text string) *AgentBase +``` + +#### Parameters + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 592. + +*** + +### SetPostPromptLlmParams + +SetPostPromptLlmParams sets LLM parameters for the post-prompt. + +#### Signature + +```go +func (*AgentBase) SetPostPromptLlmParams(params map[string]any) *AgentBase +``` + +#### Parameters + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1503. + +*** + +### SetPostPromptUrl + +SetPostPromptUrl sets the URL for post-prompt summary delivery. + +#### Signature + +```go +func (*AgentBase) SetPostPromptUrl(url string) *AgentBase +``` + +#### Parameters + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1662. + +*** + +### SetPromptLlmParams + +SetPromptLlmParams sets LLM parameters for the main prompt. + +#### Signature + +```go +func (*AgentBase) SetPromptLlmParams(params map[string]any) *AgentBase +``` + +#### Parameters + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1495. + +*** + +### SetPromptPom + +SetPromptPom sets the POM sections directly and enables POM mode. + +#### Signature + +```go +func (*AgentBase) SetPromptPom(pom []map[string]any) *AgentBase +``` + +#### Parameters + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 600. + +*** + +### SetPromptText + +SetPromptText sets the agent prompt to raw text, disabling POM mode. + +#### Signature + +```go +func (*AgentBase) SetPromptText(text string) *AgentBase +``` + +#### Parameters + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 583. + +*** + +### SetPromptTransformer + +SetPromptTransformer installs a hook that is called with the assembled prompt map before it is placed into the AI verb config. The function may return a new map or mutate and return the same map. Set to nil to remove a previously installed transformer. + +This is used by specialised agents (e.g. BedrockAgent) that need to add or filter prompt-level keys without reimplementing all of RenderSWML. + +#### Signature + +```go +func (*AgentBase) SetPromptTransformer(fn func(map[string]any) map[string]any) *AgentBase +``` + +#### Parameters + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1517. + +*** + +### SetPronunciations + +SetPronunciations replaces all pronunciation overrides. + +#### Signature + +```go +func (*AgentBase) SetPronunciations(p []map[string]any) *AgentBase +``` + +#### Parameters + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1304. + +*** + +### SetupGracefulShutdown + +SetupGracefulShutdown registers OS signal handlers for SIGTERM and SIGINT that initiate a graceful HTTP server shutdown. This is useful for Kubernetes deployments where the pod receives SIGTERM before termination. + +Python equivalent: web\_mixin.WebMixin.setup\_graceful\_shutdown (web\_mixin.py line 1405) Python behavior: registers signal.SIGTERM and signal.SIGINT handlers that call sys.exit(0) after optional cleanup. + +The Go implementation uses signal.NotifyContext so that the active HTTP server (if started via Run/Serve) can shut down cleanly. Call this before Run(). + +#### Signature + +```go +func (*AgentBase) SetupGracefulShutdown() +``` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1758. + +*** + +### SetWebHookUrl + +SetWebHookUrl explicitly sets the webhook URL used in SWAIG function defs. + +#### Signature + +```go +func (*AgentBase) SetWebHookUrl(url string) *AgentBase +``` + +#### Parameters + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1654. + +*** + +### UpdateGlobalData + +UpdateGlobalData merges data into existing global data. + +#### Signature + +```go +func (*AgentBase) UpdateGlobalData(data map[string]any) *AgentBase +``` + +#### Parameters + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1336. + +*** + +### ValidateBasicAuth + +ValidateBasicAuth validates the provided username and password against the agent's configured basic auth credentials using a constant-time comparison. + +Python equivalent: auth\_mixin.AuthMixin.validate\_basic\_auth (auth\_mixin.py line 24) Python behavior: hmac.compare\_digest(username, exp\_user) and compare\_digest(password, exp\_pass) + +#### Signature + +```go +func (*AgentBase) ValidateBasicAuth(username string, password string) bool +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1784. + +*** + +### ValidateToolToken + +ValidateToolToken verifies that a SWAIG tool security token is authentic, unexpired, and matches the given function name and call ID. Returns false when the function is not registered, the SessionManager rejects the token, or the validation panics for any reason. + +Python parity: state\_mixin.StateMixin.validate\_tool\_token. Python rejects unknown function names up-front and swallows exceptions, returning false. + +#### Signature + +```go +func (*AgentBase) ValidateToolToken(functionName string, token string, callID string) (ok bool) +``` + +#### Parameters + + + + + + + +#### Returns + +`bool` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1827. + +## Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 326. diff --git a/fern/products/sdk-reference/go/agents/agent/agent/index.mdx b/fern/products/sdk-reference/go/agents/agent/agent/index.mdx new file mode 100644 index 0000000000..c0acea575a --- /dev/null +++ b/fern/products/sdk-reference/go/agents/agent/agent/index.mdx @@ -0,0 +1,30 @@ +--- +slug: "/reference/go/agents/agent/agent" +title: "agent" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "module" + language: "go" + qualified_name: "agents.agent.agent" + parent: "github.com/signalwire/signalwire-go/pkg/agent" + module: "agents.agent" +--- +# `agent` + +## Classes + + + + AgentBase is the central agent struct. It embeds \*swml.Service so that Service's fields and methods (Name, Route, Host, Port, basic auth, the HTTP server, the tool registry, etc.) are promoted onto AgentBase. The agent-specific state below is layered on top. + + + + MCPServerConfig holds configuration for an external MCP server connection. + + + + ToolDefinition describes a single SWAIG tool including its JSON Schema parameters and a Go handler function. + + diff --git a/fern/products/sdk-reference/go/agents/agent/agent/mcp-server-config/index.mdx b/fern/products/sdk-reference/go/agents/agent/agent/mcp-server-config/index.mdx new file mode 100644 index 0000000000..8110b625d2 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/agent/agent/mcp-server-config/index.mdx @@ -0,0 +1,39 @@ +--- +slug: "/reference/go/agents/agent/agent/mcp-server-config" +title: "MCPServerConfig" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/agent.MCPServerConfig" + parent: "agents.agent.agent" + module: "agents.agent.agent" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go" +--- +# `MCPServerConfig` + +MCPServerConfig holds configuration for an external MCP server connection. + +## Signature + +```go +type MCPServerConfig struct +``` + +## Properties + + + + + + + + + +## Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 1857. diff --git a/fern/products/sdk-reference/go/agents/agent/agent/tool-definition/index.mdx b/fern/products/sdk-reference/go/agents/agent/agent/tool-definition/index.mdx new file mode 100644 index 0000000000..143111c36b --- /dev/null +++ b/fern/products/sdk-reference/go/agents/agent/agent/tool-definition/index.mdx @@ -0,0 +1,108 @@ +--- +slug: "/reference/go/agents/agent/agent/tool-definition" +title: "ToolDefinition" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/agent.ToolDefinition" + parent: "agents.agent.agent" + module: "agents.agent.agent" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go" +--- +# `ToolDefinition` + +ToolDefinition describes a single SWAIG tool including its JSON Schema parameters and a Go handler function. + +Python equivalent: signalwire.core.mixins.tool\_mixin.ToolMixin.define\_tool Added fields to match Python: WebhookURL (webhook\_url param), Required (required param for required argument names), IsTypedHandler (is\_typed\_handler). + +## Signature + +```go +type ToolDefinition struct +``` + +## Properties + + + + + + + + + whether handler uses typed structs (Python: is\_typed\_handler) + + + + + + + + JSON Schema for arguments (properties map) + + + + Required parameter names included in the JSON Schema envelope + + + + + + extra per-function SWAIG fields + + + + URL to audio file to play while the function executes + + + + Number of times to loop WaitFile (0 = no loop) + + + + Per-tool webhook URL; overrides the agent-level webhook when non-empty + + +## Methods + +### ValidateArgs + +ValidateArgs validates the provided args map against the tool's parameter schema. + +It constructs a JSON Schema envelope from Parameters and Required (matching the shape emitted by buildSwaigFunctions) and validates args against that schema using encoding/json round-trip comparison. When Parameters is nil or empty the function returns (true, nil) immediately, mirroring the Python SDK's behaviour of skipping validation when no schema is declared. + +Go's standard library does not include a JSON Schema validator, so this implementation performs a best-effort structural check: + +- Every key listed in Required must be present in args. +- No third-party dependency is introduced; the check is intentionally lightweight. + +A full JSON Schema validator (e.g. github.com/xeipuuv/gojsonschema) can be swapped in by replacing the body of this method. + +#### Signature + +```go +func (*ToolDefinition) ValidateArgs(args map[string]any) (bool, []string) +``` + +#### Parameters + + + +#### Returns + +`(bool, []string)` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 98. + +## Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 67. diff --git a/fern/products/sdk-reference/go/agents/agent/index.mdx b/fern/products/sdk-reference/go/agents/agent/index.mdx new file mode 100644 index 0000000000..635a860ced --- /dev/null +++ b/fern/products/sdk-reference/go/agents/agent/index.mdx @@ -0,0 +1,967 @@ +--- +slug: "/reference/go/agents/agent" +title: "agent" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "module" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/agent" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go" +--- +# `agent` + +Package agent provides the core AgentBase type that wires together SWML rendering, tool dispatch, prompt management, AI configuration, and HTTP serving into a single self-contained AI agent. + +## Signature + +```go +package agent +``` + +## Constants + + + SupportedInternalFillerNames is the complete set of internal SWAIG function names that accept fillers, matching the SWAIGInternalFiller schema definition. Any name outside this set is silently ignored by the runtime — SetInternalFillers / AddInternalFiller warn if you pass an unknown name. Notable absences: change\_step, gather\_submit, and arbitrary user-defined SWAIG function names are NOT supported. + + +## Modules + + + + + +## Functions + +### NewAgentBase + +NewAgentBase creates a new AgentBase with default values and applies the provided functional options. + +#### Signature + +```go +func NewAgentBase(opts ...AgentOption) *AgentBase +``` + +#### Parameters + + + +#### Returns + +`*AgentBase` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 449. + +*** + +### WithAgentID + +WithAgentID sets a fixed agent ID. If not provided, a UUID is generated automatically in NewAgentBase. + +Python equivalent: agent\_id parameter in AgentBase.**init** Python behavior: self.agent\_id = agent\_id or str(uuid.uuid4()) + +#### Signature + +```go +func WithAgentID(id string) AgentOption +``` + +#### Parameters + + + +#### Returns + +`AgentOption` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 221. + +*** + +### WithAIVerbName + +WithAIVerbName overrides the SWML verb name used for the AI section. The default is "ai". Set to "amazon\_bedrock" for BedrockAgent. + +#### Signature + +```go +func WithAIVerbName(name string) AgentOption +``` + +#### Parameters + + + +#### Returns + +`AgentOption` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 194. + +*** + +### WithAutoAnswer + +WithAutoAnswer controls whether the answer verb is emitted automatically. + +#### Signature + +```go +func WithAutoAnswer(autoAnswer bool) AgentOption +``` + +#### Parameters + + + +#### Returns + +`AgentOption` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 164. + +*** + +### WithBasicAuth + +WithBasicAuth sets explicit basic-auth credentials. + +#### Signature + +```go +func WithBasicAuth(user string, password string) AgentOption +``` + +#### Parameters + + + + + +#### Returns + +`AgentOption` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 156. + +*** + +### WithBullet + +WithBullet adds a single bullet point to an existing section. Python equivalent: bullet= param in prompt\_add\_to\_section + +#### Signature + +```go +func WithBullet(b string) PromptAddToSectionOption +``` + +#### Parameters + + + +#### Returns + +`PromptAddToSectionOption` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 728. + +*** + +### WithBullets + +WithBullets adds multiple bullet points to an existing section. Python equivalent: bullets= param in prompt\_add\_to\_section + +#### Signature + +```go +func WithBullets(bs []string) PromptAddToSectionOption +``` + +#### Parameters + + + +#### Returns + +`PromptAddToSectionOption` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 734. + +*** + +### WithCheckForInputOverride + +WithCheckForInputOverride enables the /check\_for\_input endpoint, which allows external systems to inject input into an active AI session. + +Python equivalent: check\_for\_input\_override parameter in AgentBase.**init** + +#### Signature + +```go +func WithCheckForInputOverride(enable bool) AgentOption +``` + +#### Parameters + + + +#### Returns + +`AgentOption` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 266. + +*** + +### WithConfigFile + +WithConfigFile sets the path to an optional YAML/JSON service configuration file. When provided, the file is loaded at startup and its values are merged with (but do not override) explicit constructor parameters. + +Python equivalent: config\_file parameter in AgentBase.**init** + +#### Signature + +```go +func WithConfigFile(path string) AgentOption +``` + +#### Parameters + + + +#### Returns + +`AgentOption` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 275. + +*** + +### WithDefaultWebhookURL + +WithDefaultWebhookURL sets the default webhook URL for all SWAIG functions. When set, this URL is used as the fallback for all tools that do not specify their own WebhookURL. + +Python equivalent: default\_webhook\_url parameter in AgentBase.**init** + +#### Signature + +```go +func WithDefaultWebhookURL(url string) AgentOption +``` + +#### Parameters + + + +#### Returns + +`AgentOption` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 212. + +*** + +### WithEnablePostPromptOverride + +WithEnablePostPromptOverride allows subclasses to override the post-prompt URL with a custom handler. When enabled, the agent registers a /post\_prompt\_override endpoint and routes summary callbacks through it. + +Python equivalent: enable\_post\_prompt\_override parameter in AgentBase.**init** + +#### Signature + +```go +func WithEnablePostPromptOverride(enable bool) AgentOption +``` + +#### Parameters + + + +#### Returns + +`AgentOption` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 258. + +*** + +### WithHost + +WithHost sets the HTTP listen address. + +#### Signature + +```go +func WithHost(host string) AgentOption +``` + +#### Parameters + + + +#### Returns + +`AgentOption` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 146. + +*** + +### WithName + +WithName sets the agent (and service) name. + +#### Signature + +```go +func WithName(name string) AgentOption +``` + +#### Parameters + + + +#### Returns + +`AgentOption` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 136. + +*** + +### WithNativeFunctions + +WithNativeFunctions sets the initial list of native (built-in) SWAIG function names to include in the SWAIG object on every rendered document. + +Python equivalent: native\_functions parameter in AgentBase.**init** + +#### Signature + +```go +func WithNativeFunctions(names []string) AgentOption +``` + +#### Parameters + + + +#### Returns + +`AgentOption` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 229. + +*** + +### WithNumbered + +WithNumbered marks the section as numbered. Python equivalent: numbered=True in prompt\_add\_section + +#### Signature + +```go +func WithNumbered(v bool) PromptSectionOption +``` + +#### Parameters + + + +#### Returns + +`PromptSectionOption` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 657. + +*** + +### WithNumberedBullets + +WithNumberedBullets marks the bullets list as numbered. Python equivalent: numbered\_bullets=True in prompt\_add\_section + +#### Signature + +```go +func WithNumberedBullets(v bool) PromptSectionOption +``` + +#### Parameters + + + +#### Returns + +`PromptSectionOption` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 663. + +*** + +### WithPort + +WithPort sets the HTTP listen port. + +#### Signature + +```go +func WithPort(port int) AgentOption +``` + +#### Parameters + + + +#### Returns + +`AgentOption` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 151. + +*** + +### WithRecordCall + +WithRecordCall enables or disables automatic call recording. + +#### Signature + +```go +func WithRecordCall(record bool) AgentOption +``` + +#### Parameters + + + +#### Returns + +`AgentOption` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 169. + +*** + +### WithRecordFormat + +WithRecordFormat sets the recording format (e.g. "mp4", "wav"). The parameter is the defined string type swaig.RecordFormat: the Format\* constants give autocomplete + a compile-time typo check, while Go's untyped-constant auto-conversion keeps a bare "wav" literal compiling. It is stored as a plain string so the emitted SWML is unchanged. + +#### Signature + +```go +func WithRecordFormat(format swaig.RecordFormat) AgentOption +``` + +#### Parameters + + + +#### Returns + +`AgentOption` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 178. + +*** + +### WithRecordStereo + +WithRecordStereo enables or disables stereo recording. + +#### Signature + +```go +func WithRecordStereo(stereo bool) AgentOption +``` + +#### Parameters + + + +#### Returns + +`AgentOption` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 183. + +*** + +### WithRoute + +WithRoute sets the HTTP route path the agent listens on. + +#### Signature + +```go +func WithRoute(route string) AgentOption +``` + +#### Parameters + + + +#### Returns + +`AgentOption` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 141. + +*** + +### WithSchemaPath + +WithSchemaPath sets the path to an optional SWML schema file used for validation. If empty, no schema validation is performed. + +Python equivalent: schema\_path parameter in AgentBase.**init** + +#### Signature + +```go +func WithSchemaPath(path string) AgentOption +``` + +#### Parameters + + + +#### Returns + +`AgentOption` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 241. + +*** + +### WithSchemaValidation + +WithSchemaValidation controls whether the rendered SWML document is validated against the SWML schema before serving. Defaults to true. Can also be disabled via the SWML\_SKIP\_SCHEMA\_VALIDATION=1 environment variable. + +Python equivalent: schema\_validation parameter in AgentBase.**init** + +#### Signature + +```go +func WithSchemaValidation(validate bool) AgentOption +``` + +#### Parameters + + + +#### Returns + +`AgentOption` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 285. + +*** + +### WithSigningKey + +WithSigningKey sets the SignalWire Signing Key used to validate inbound webhook signatures. When non-empty, signed routes (POST /, /swaig, /post\_prompt, and any registered routing callbacks) are wrapped with security.WebhookMiddleware — unsigned or mis-signed requests are rejected with HTTP 403 before reaching the handler. + +When this option is unset, AgentBase falls back to the SIGNALWIRE\_SIGNING\_KEY environment variable. When neither is set, the agent accepts unsigned requests and emits a one-time WARN log on startup, per porting-sdk/webhooks.md §"AgentBase integration". + +Python equivalent: AgentBase(signing\_key="...") parameter. + +#### Signature + +```go +func WithSigningKey(key string) AgentOption +``` + +#### Parameters + + + +#### Returns + +`AgentOption` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 301. + +*** + +### WithSigningKeyTrustProxy + +WithSigningKeyTrustProxy enables X-Forwarded-Proto / X-Forwarded-Host honoring during URL reconstruction. Set true when AgentBase runs behind a reverse proxy / ngrok / load balancer that terminates TLS upstream; without it the validator sees the internal scheme/host and the signature will mismatch. + +No Python parity flag — Python's web\_mixin reads X-Forwarded-\* headers unconditionally; in Go we make it explicit because forging these headers is a real attack on naive deployments. + +#### Signature + +```go +func WithSigningKeyTrustProxy(trust bool) AgentOption +``` + +#### Parameters + + + +#### Returns + +`AgentOption` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 314. + +*** + +### WithSubsections + +WithSubsections attaches child sections to the parent section. Python equivalent: subsections=\[...] in prompt\_add\_section + +#### Signature + +```go +func WithSubsections(subs []map[string]any) PromptSectionOption +``` + +#### Parameters + + + +#### Returns + +`PromptSectionOption` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 669. + +*** + +### WithSuppressLogs + +WithSuppressLogs disables verbose structured logging from the agent. When true, info-level agent lifecycle logs are suppressed. + +Python equivalent: suppress\_logs parameter in AgentBase.**init** + +#### Signature + +```go +func WithSuppressLogs(suppress bool) AgentOption +``` + +#### Parameters + + + +#### Returns + +`AgentOption` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 249. + +*** + +### WithTokenExpiry + +WithTokenExpiry sets the token expiry time in seconds for secure tools. + +#### Signature + +```go +func WithTokenExpiry(secs int) AgentOption +``` + +#### Parameters + + + +#### Returns + +`AgentOption` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 188. + +*** + +### WithUsePom + +WithUsePom controls whether Prompt Object Model (POM) mode is active. When true (default), structured prompt sections are used; when false, raw text from SetPromptText is used. + +Python equivalent: use\_pom parameter in AgentBase.**init** + +#### Signature + +```go +func WithUsePom(usePom bool) AgentOption +``` + +#### Parameters + + + +#### Returns + +`AgentOption` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 203. + +## Type Aliases + +### AgentOption + +AgentOption configures an AgentBase during construction. + +#### Signature + +```go +type AgentOption alias +``` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 133. + +*** + +### DebugEventHandler + +DebugEventHandler is called for debug events if enabled. + +#### Signature + +```go +type DebugEventHandler alias +``` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 46. + +*** + +### DynamicConfigCallback + +DynamicConfigCallback is invoked on each request to mutate an ephemeral agent copy before rendering. Headers and body params give the callback full context about the inbound request. + +#### Signature + +```go +type DynamicConfigCallback alias +``` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 40. + +*** + +### OnSwmlRequestHook + +OnSwmlRequestHook is the function-field hook that user code can set to override the default SWML-request customization behavior. Returning a non-nil map applies modifications to the rendered SWML; returning nil uses the default rendering unchanged. + +Python parity: web\_mixin.WebMixin.on\_swml\_request — Go has no method inheritance, so we expose the override as a settable function field. + +#### Signature + +```go +type OnSwmlRequestHook alias +``` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 55. + +*** + +### PromptAddToSectionOption + +PromptAddToSectionOption is a functional option for PromptAddToSection. + +#### Signature + +```go +type PromptAddToSectionOption alias +``` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 724. + +*** + +### PromptSectionOption + +PromptSectionOption is a functional option for PromptAddSection. + +#### Signature + +```go +type PromptSectionOption alias +``` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 653. + +*** + +### SummaryCallback + +SummaryCallback is called when a post-prompt summary arrives. + +#### Signature + +```go +type SummaryCallback alias +``` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 43. + +*** + +### ToolHandler + +ToolHandler is the signature for SWAIG function handlers. + +#### Signature + +```go +type ToolHandler alias +``` + +#### Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) + +Line 35. + +## Source + +[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) diff --git a/fern/products/sdk-reference/go/agents/contexts/contexts/context-builder/index.mdx b/fern/products/sdk-reference/go/agents/contexts/contexts/context-builder/index.mdx new file mode 100644 index 0000000000..45352af2c0 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/contexts/contexts/context-builder/index.mdx @@ -0,0 +1,199 @@ +--- +slug: "/reference/go/agents/contexts/contexts/context-builder" +title: "ContextBuilder" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/contexts.ContextBuilder" + parent: "agents.contexts.contexts" + module: "agents.contexts.contexts" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go" +--- +# `ContextBuilder` + +ContextBuilder is the top-level builder for multi-step, multi-context AI agent workflows. + +A ContextBuilder owns one or more Contexts; each Context owns an ordered list of Steps. Only one context and one step is active at a time. Per chat turn, the runtime injects the current step's instructions as a system message, then asks the LLM for a response. + +When a step (or its enclosing context) declares valid\_steps or valid\_contexts, the runtime auto-injects two native tools so the model can navigate the flow: + +- next\_step(step: enum) — present when valid\_steps is set +- change\_context(context: enum) — present when valid\_contexts is set + +Their enum schemas are rewritten on every turn to match whatever valid\_steps / valid\_contexts apply to the current step. You do NOT need to define these tools yourself; they appear automatically. + +A third native tool — gather\_submit — is injected during gather\_info questioning (see Step.SetGatherInfo / Step.AddGatherQuestion). + +These three names — next\_step, change\_context, gather\_submit — are reserved. ContextBuilder.Validate() rejects any agent that defines a SWAIG tool with one of these names. See ReservedNativeToolNames. + +Each step may declare a functions whitelist. The whitelist is applied in-memory at the start of each LLM turn. CRITICALLY: if a step does NOT declare a functions field, it INHERITS the previous step's active set. See Step.SetFunctions for details and examples. + +## Signature + +```go +type ContextBuilder struct +``` + +## Methods + +### AddContext + +AddContext creates a new context with the given name and returns it. + +#### Signature + +```go +func (*ContextBuilder) AddContext(name string) *Context +``` + +#### Parameters + + + +#### Returns + +`*Context` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 831. + +*** + +### AttachAgent + +AttachAgent wires an agent into the builder so Validate() can check user-defined tool names against ReservedNativeToolNames. AgentBase calls this internally when you invoke DefineContexts(). + +#### Signature + +```go +func (*ContextBuilder) AttachAgent(a ToolLister) *ContextBuilder +``` + +#### Parameters + + + +#### Returns + +`*ContextBuilder` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 809. + +*** + +### GetContext + +GetContext returns the context with the given name, or nil if not found. + +#### Signature + +```go +func (*ContextBuilder) GetContext(name string) *Context +``` + +#### Parameters + + + +#### Returns + +`*Context` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 839. + +*** + +### Reset + +Reset removes all contexts, returning the builder to its initial state. Use this in a dynamic config callback when you need to rebuild contexts from scratch for a specific request. + +#### Signature + +```go +func (*ContextBuilder) Reset() *ContextBuilder +``` + +#### Returns + +`*ContextBuilder` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 824. + +*** + +### ToMap + +ToMap serialises all contexts to the SWML map format. It calls Validate first and returns an error if validation fails. + +#### Signature + +```go +func (*ContextBuilder) ToMap() (map[string]any, error) +``` + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 1057. + +*** + +### Validate + +Validate checks the builder configuration for common errors: + +- At least one context must be defined. +- A single context must be named "default". +- Every context must contain at least one step. +- Every step must have a name. +- valid\_steps entries (except "next") must name existing steps in the same context. +- valid\_contexts entries (context-level) must name existing contexts. +- valid\_contexts entries (step-level) must name existing contexts. +- gather\_info questions must be non-empty and have unique keys. +- gather\_info completion\_action (if set) targets an existing step. +- No user-defined SWAIG tool collides with a reserved native name. + +#### Signature + +```go +func (*ContextBuilder) Validate() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 854. + +## Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 800. diff --git a/fern/products/sdk-reference/go/agents/contexts/contexts/context/index.mdx b/fern/products/sdk-reference/go/agents/contexts/contexts/context/index.mdx new file mode 100644 index 0000000000..8159e374db --- /dev/null +++ b/fern/products/sdk-reference/go/agents/contexts/contexts/context/index.mdx @@ -0,0 +1,671 @@ +--- +slug: "/reference/go/agents/contexts/contexts/context" +title: "Context" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/contexts.Context" + parent: "agents.contexts.contexts" + module: "agents.contexts.contexts" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go" +--- +# `Context` + +Context represents a single context containing ordered steps. All setter methods return \*Context for chaining. + +## Signature + +```go +type Context struct +``` + +## Methods + +### AddBullets + +AddBullets adds a POM section with bullet points to the context prompt. + +#### Signature + +```go +func (*Context) AddBullets(title string, bullets []string) *Context +``` + +#### Parameters + + + + + +#### Returns + +`*Context` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 622. + +*** + +### AddEnterFiller + +AddEnterFiller adds enter fillers for a specific language code. + +#### Signature + +```go +func (*Context) AddEnterFiller(langCode string, fillers []string) *Context +``` + +#### Parameters + + + + + +#### Returns + +`*Context` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 652. + +*** + +### AddExitFiller + +AddExitFiller adds exit fillers for a specific language code. + +#### Signature + +```go +func (*Context) AddExitFiller(langCode string, fillers []string) *Context +``` + +#### Parameters + + + + + +#### Returns + +`*Context` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 661. + +*** + +### AddSection + +AddSection adds a POM section to the context prompt. + +#### Signature + +```go +func (*Context) AddSection(title string, body string) *Context +``` + +#### Parameters + + + + + +#### Returns + +`*Context` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 616. + +*** + +### AddStep + +AddStep creates a new step, appends it to the ordered list, stores it in the lookup map, and returns the Step for further configuration. + +#### Signature + +```go +func (*Context) AddStep(name string) *Step +``` + +#### Parameters + + + +#### Returns + +`*Step` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 478. + +*** + +### AddSystemBullets + +AddSystemBullets adds a POM section with bullet points to the system prompt. + +#### Signature + +```go +func (*Context) AddSystemBullets(title string, bullets []string) *Context +``` + +#### Parameters + + + + + +#### Returns + +`*Context` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 634. + +*** + +### AddSystemSection + +AddSystemSection adds a POM section to the system prompt. + +#### Signature + +```go +func (*Context) AddSystemSection(title string, body string) *Context +``` + +#### Parameters + + + + + +#### Returns + +`*Context` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 628. + +*** + +### GetStep + +GetStep returns the step with the given name, or nil if not found. + +#### Signature + +```go +func (*Context) GetStep(name string) *Step +``` + +#### Parameters + + + +#### Returns + +`*Step` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 486. + +*** + +### MoveStep + +MoveStep moves an existing step to the given position (0-based index). Returns the receiver for method chaining. + +#### Signature + +```go +func (*Context) MoveStep(name string, position int) *Context +``` + +#### Parameters + + + + + +#### Returns + +`*Context` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 507. + +*** + +### Name + +Name returns the context's name. + +#### Signature + +```go +func (*Context) Name() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 474. + +*** + +### RemoveStep + +RemoveStep removes a step by name. Returns the receiver for method chaining. + +#### Signature + +```go +func (*Context) RemoveStep(name string) *Context +``` + +#### Parameters + + + +#### Returns + +`*Context` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 491. + +*** + +### SetConsolidate + +SetConsolidate sets whether to consolidate conversation history on entry. + +#### Signature + +```go +func (*Context) SetConsolidate(consolidate bool) *Context +``` + +#### Parameters + + + +#### Returns + +`*Context` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 573. + +*** + +### SetEnterFillers + +SetEnterFillers sets all enter fillers at once. + +#### Signature + +```go +func (*Context) SetEnterFillers(fillers map[string][]string) *Context +``` + +#### Parameters + + + +#### Returns + +`*Context` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 640. + +*** + +### SetExitFillers + +SetExitFillers sets all exit fillers at once. + +#### Signature + +```go +func (*Context) SetExitFillers(fillers map[string][]string) *Context +``` + +#### Parameters + + + +#### Returns + +`*Context` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 646. + +*** + +### SetFullReset + +SetFullReset sets whether to do a full reset when entering this context. + +#### Signature + +```go +func (*Context) SetFullReset(fullReset bool) *Context +``` + +#### Parameters + + + +#### Returns + +`*Context` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 579. + +*** + +### SetInitialStep + +SetInitialStep sets which step the context starts on when entered. + +By default, a context starts on its first step (index 0). Use this to skip a preamble step on re-entry via change\_context. + +#### Signature + +```go +func (*Context) SetInitialStep(stepName string) *Context +``` + +#### Parameters + + + +#### Returns + +`*Context` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 537. + +*** + +### SetIsolated + +SetIsolated marks this context as isolated — entering it wipes conversation history. + +When isolated=true and the context is entered via change\_context, the runtime wipes the conversation array. The model starts fresh with only the new context's system\_prompt + step instructions, with no memory of prior turns. + +EXCEPTION — reset overrides the wipe: If the context also has a reset configuration (via SetConsolidate or SetFullReset), the wipe is skipped in favor of the reset behavior. Use reset with consolidate=true to summarize prior history into a single message instead of dropping it entirely. + +Use cases: + +- Switching to a sensitive billing flow that should not see prior small-talk +- Handing off to a different agent persona +- Resetting after a long off-topic detour + +#### Signature + +```go +func (*Context) SetIsolated(isolated bool) *Context +``` + +#### Parameters + + + +#### Returns + +`*Context` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 610. + +*** + +### SetPostPrompt + +SetPostPrompt sets the post-prompt override for this context. + +#### Signature + +```go +func (*Context) SetPostPrompt(prompt string) *Context +``` + +#### Parameters + + + +#### Returns + +`*Context` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 555. + +*** + +### SetPrompt + +SetPrompt sets the context's prompt text directly. + +#### Signature + +```go +func (*Context) SetPrompt(prompt string) *Context +``` + +#### Parameters + + + +#### Returns + +`*Context` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 567. + +*** + +### SetSystemPrompt + +SetSystemPrompt sets the system prompt for context switching. + +#### Signature + +```go +func (*Context) SetSystemPrompt(prompt string) *Context +``` + +#### Parameters + + + +#### Returns + +`*Context` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 561. + +*** + +### SetUserPrompt + +SetUserPrompt sets the user prompt to inject when entering this context. + +#### Signature + +```go +func (*Context) SetUserPrompt(prompt string) *Context +``` + +#### Parameters + + + +#### Returns + +`*Context` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 585. + +*** + +### SetValidContexts + +SetValidContexts sets which contexts can be navigated to from this context. + +#### Signature + +```go +func (*Context) SetValidContexts(ctxs []string) *Context +``` + +#### Parameters + + + +#### Returns + +`*Context` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 543. + +*** + +### SetValidSteps + +SetValidSteps sets which steps can be navigated to from any step in this context. + +#### Signature + +```go +func (*Context) SetValidSteps(steps []string) *Context +``` + +#### Parameters + + + +#### Returns + +`*Context` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 549. + +*** + +### ToMap + +ToMap serialises the context to the SWML map format. + +#### Signature + +```go +func (*Context) ToMap() map[string]any +``` + +#### Returns + +`map[string]any` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 693. + +## Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 445. diff --git a/fern/products/sdk-reference/go/agents/contexts/contexts/gather-info/index.mdx b/fern/products/sdk-reference/go/agents/contexts/contexts/gather-info/index.mdx new file mode 100644 index 0000000000..783c37a61e --- /dev/null +++ b/fern/products/sdk-reference/go/agents/contexts/contexts/gather-info/index.mdx @@ -0,0 +1,113 @@ +--- +slug: "/reference/go/agents/contexts/contexts/gather-info" +title: "GatherInfo" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/contexts.GatherInfo" + parent: "agents.contexts.contexts" + module: "agents.contexts.contexts" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go" +--- +# `GatherInfo` + +GatherInfo configures information gathering for a step. + +## Signature + +```go +type GatherInfo struct +``` + +## Properties + + + + + + + + + +## Methods + +### AddQuestion + +AddQuestion appends a question and returns the GatherInfo for chaining. + +#### Signature + +```go +func (*GatherInfo) AddQuestion(key string, question string, opts ...GatherQuestionOption) *GatherInfo +``` + +#### Parameters + + + + + + + +#### Returns + +`*GatherInfo` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 112. + +*** + +### ToMap + +ToMap serialises to the SWML map format. Callers that construct GatherInfo directly should call Validate() first to ensure the result is valid SWML. Step.ToMap() enforces this automatically by only calling ToMap() when len(Questions) > 0. + +#### Signature + +```go +func (*GatherInfo) ToMap() map[string]any +``` + +#### Returns + +`map[string]any` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 140. + +*** + +### Validate + +Validate returns an error if the GatherInfo is not ready for serialisation. Specifically, it rejects a GatherInfo with no questions, which would produce invalid SWML. This matches the Python SDK's ValueError raised by to\_dict() when \_questions is empty. + +#### Signature + +```go +func (*GatherInfo) Validate() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 129. + +## Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 104. diff --git a/fern/products/sdk-reference/go/agents/contexts/contexts/gather-question/index.mdx b/fern/products/sdk-reference/go/agents/contexts/contexts/gather-question/index.mdx new file mode 100644 index 0000000000..29b5f95b93 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/contexts/contexts/gather-question/index.mdx @@ -0,0 +1,71 @@ +--- +slug: "/reference/go/agents/contexts/contexts/gather-question" +title: "GatherQuestion" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/contexts.GatherQuestion" + parent: "agents.contexts.contexts" + module: "agents.contexts.contexts" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go" +--- +# `GatherQuestion` + +GatherQuestion represents a single question in a gather\_info configuration. + +## Signature + +```go +type GatherQuestion struct +``` + +## Properties + + + + + optional + + + + + + optional + + + + + + default "string" + + +## Methods + +### ToMap + +ToMap serialises the question to the SWML map format. + +#### Signature + +```go +func (*GatherQuestion) ToMap() map[string]any +``` + +#### Returns + +`map[string]any` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 79. + +## Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 69. diff --git a/fern/products/sdk-reference/go/agents/contexts/contexts/index.mdx b/fern/products/sdk-reference/go/agents/contexts/contexts/index.mdx new file mode 100644 index 0000000000..f59e35a78f --- /dev/null +++ b/fern/products/sdk-reference/go/agents/contexts/contexts/index.mdx @@ -0,0 +1,74 @@ +--- +slug: "/reference/go/agents/contexts/contexts" +title: "contexts" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "module" + language: "go" + qualified_name: "agents.contexts.contexts" + parent: "github.com/signalwire/signalwire-go/pkg/contexts" + module: "agents.contexts" +--- +# `contexts` + +## Classes + + + + Context represents a single context containing ordered steps. All setter methods return \*Context for chaining. + + + + ContextBuilder is the top-level builder for multi-step, multi-context AI agent workflows. + + + + GatherInfo configures information gathering for a step. + + + + GatherQuestion represents a single question in a gather\_info configuration. + + + + Step represents a single step within a context. All setter methods return \*Step so they can be chained. + + + +## Interfaces + +### ToolLister + +ToolLister is implemented by an agent so ContextBuilder.Validate() can check registered SWAIG tool names against ReservedNativeToolNames. AgentBase implements this by returning the insertion-ordered list of registered tool names. + +#### Signature + +```go +type ToolLister interface { ListToolNames } +``` + +#### Methods + +##### ListToolNames + +ListToolNames returns the names of every registered SWAIG tool. + +###### Signature + +```go +ListToolNames() []string +``` + +###### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 763. + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 761. diff --git a/fern/products/sdk-reference/go/agents/contexts/contexts/step/index.mdx b/fern/products/sdk-reference/go/agents/contexts/contexts/step/index.mdx new file mode 100644 index 0000000000..111e4fbf53 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/contexts/contexts/step/index.mdx @@ -0,0 +1,550 @@ +--- +slug: "/reference/go/agents/contexts/contexts/step" +title: "Step" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/contexts.Step" + parent: "agents.contexts.contexts" + module: "agents.contexts.contexts" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go" +--- +# `Step` + +Step represents a single step within a context. All setter methods return \*Step so they can be chained. + +## Signature + +```go +type Step struct +``` + +## Methods + +### AddBullets + +AddBullets adds a POM section with bullet points. + +#### Signature + +```go +func (*Step) AddBullets(title string, bullets []string) *Step +``` + +#### Parameters + + + + + +#### Returns + +`*Step` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 200. + +*** + +### AddGatherQuestion + +AddGatherQuestion adds a question to this step's gather\_info. SetGatherInfo should be called first (this method silently initialises the struct if not, to keep callers from having to worry about ordering). Returns the Step for chaining. + +IMPORTANT — gather mode locks function access: While the model is asking gather questions, the runtime forcibly deactivates ALL of the step's other functions. The only callable tools during a gather question are: + +- gather\_submit (the native answer-submission tool) +- Whatever names you list with WithFunctions in this question's opts + +next\_step and change\_context are also filtered out — the model cannot navigate away until the gather completes. This is by design: it forces a tight ask → submit → next-question loop. + +If a question needs to call out to a tool (e.g. validate an email, geocode a ZIP), pass that tool name via WithFunctions on this question. Functions listed here are active ONLY for this question. + +#### Signature + +```go +func (*Step) AddGatherQuestion(key string, question string, opts ...GatherQuestionOption) *Step +``` + +#### Parameters + + + + + + + +#### Returns + +`*Step` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 319. + +*** + +### AddSection + +AddSection adds a POM section to the step. + +#### Signature + +```go +func (*Step) AddSection(title string, body string) *Step +``` + +#### Parameters + + + + + +#### Returns + +`*Step` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 194. + +*** + +### ClearSections + +ClearSections removes all POM sections and direct text from this step. + +#### Signature + +```go +func (*Step) ClearSections() *Step +``` + +#### Returns + +`*Step` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 329. + +*** + +### Name + +Name returns the step's name. + +#### Signature + +```go +func (*Step) Name() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 185. + +*** + +### SetEnd + +SetEnd marks this step as terminal for the step flow. + +IMPORTANT: end=true does NOT end the conversation or hang up the call. It exits step mode entirely after this step executes — clearing the steps list, current step index, valid\_steps, and valid\_contexts. The agent keeps running, but operates only under the base system prompt and the context-level prompt; no more step instructions are injected and no more next\_step tool is offered. + +To actually end the call, call a hangup tool or define a hangup\_hook. + +#### Signature + +```go +func (*Step) SetEnd(end bool) *Step +``` + +#### Parameters + + + +#### Returns + +`*Step` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 266. + +*** + +### SetFunctions + +SetFunctions sets which non-internal functions are callable while this step is active. + +IMPORTANT — inheritance behavior: If you do NOT call this method, the step inherits whichever function set was active on the previous step (or the previous context's last step). The server-side runtime only resets the active set when a step explicitly declares its `functions` field. This is the most common source of bugs in multi-step agents: forgetting SetFunctions on a later step lets the previous step's tools leak through. Best practice is to call SetFunctions explicitly on every step that should differ from the previous one. + +Keep the per-step active set small: LLM tool selection accuracy degrades noticeably past ~7-8 simultaneously-active tools per call. Use per-step whitelisting to partition large tool collections. + +Accepts: + +- \[]string\{"a", "b"\} — whitelist of function names allowed in this step +- \[]string\{\} — explicit disable-all +- "none" — synonym for the empty slice + +Internal functions (e.g. gather\_submit, hangup\_hook) are ALWAYS protected and cannot be deactivated by this whitelist. The native navigation tools next\_step and change\_context are injected automatically when SetValidSteps / SetValidContexts is used; they are not affected by this list and do not need to appear in it. + +#### Signature + +```go +func (*Step) SetFunctions(functions any) *Step +``` + +#### Parameters + + + +#### Returns + +`*Step` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 239. + +*** + +### SetGatherInfo + +SetGatherInfo enables info gathering for this step and returns the Step for fluent chaining. This matches the Python SDK's set\_gather\_info, which returns self so that step-level setters (SetFunctions, SetValidSteps, etc.) can be chained after configuring gather info. + +To add questions to the gather info, use AddGatherQuestion on the same \*Step receiver. + +#### Signature + +```go +func (*Step) SetGatherInfo(outputKey string, completionAction string, prompt string) *Step +``` + +#### Parameters + + + + + + + +#### Returns + +`*Step` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 290. + +*** + +### SetResetConsolidate + +SetResetConsolidate sets whether to consolidate conversation on context switch. + +#### Signature + +```go +func (*Step) SetResetConsolidate(consolidate bool) *Step +``` + +#### Parameters + + + +#### Returns + +`*Step` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 348. + +*** + +### SetResetFullReset + +SetResetFullReset sets whether to do a full reset on context switch. + +#### Signature + +```go +func (*Step) SetResetFullReset(fullReset bool) *Step +``` + +#### Parameters + + + +#### Returns + +`*Step` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 354. + +*** + +### SetResetSystemPrompt + +SetResetSystemPrompt sets the system prompt for context switching. + +#### Signature + +```go +func (*Step) SetResetSystemPrompt(prompt string) *Step +``` + +#### Parameters + + + +#### Returns + +`*Step` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 336. + +*** + +### SetResetUserPrompt + +SetResetUserPrompt sets the user prompt for context switching. + +#### Signature + +```go +func (*Step) SetResetUserPrompt(prompt string) *Step +``` + +#### Parameters + + + +#### Returns + +`*Step` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 342. + +*** + +### SetSkipToNextStep + +SetSkipToNextStep sets whether to automatically advance to the next step. + +#### Signature + +```go +func (*Step) SetSkipToNextStep(skip bool) *Step +``` + +#### Parameters + + + +#### Returns + +`*Step` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 278. + +*** + +### SetSkipUserTurn + +SetSkipUserTurn sets whether to skip waiting for user input after this step. + +#### Signature + +```go +func (*Step) SetSkipUserTurn(skip bool) *Step +``` + +#### Parameters + + + +#### Returns + +`*Step` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 272. + +*** + +### SetStepCriteria + +SetStepCriteria sets the criteria for determining when this step is complete. + +#### Signature + +```go +func (*Step) SetStepCriteria(criteria string) *Step +``` + +#### Parameters + + + +#### Returns + +`*Step` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 206. + +*** + +### SetText + +SetText sets the step's prompt text directly. + +#### Signature + +```go +func (*Step) SetText(text string) *Step +``` + +#### Parameters + + + +#### Returns + +`*Step` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 188. + +*** + +### SetValidContexts + +SetValidContexts sets which contexts can be navigated to from this step. + +#### Signature + +```go +func (*Step) SetValidContexts(contexts []string) *Step +``` + +#### Parameters + + + +#### Returns + +`*Step` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 251. + +*** + +### SetValidSteps + +SetValidSteps sets which steps can be navigated to from this step. + +#### Signature + +```go +func (*Step) SetValidSteps(steps []string) *Step +``` + +#### Parameters + + + +#### Returns + +`*Step` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 245. + +*** + +### ToMap + +ToMap serialises the step to the SWML map format. + +#### Signature + +```go +func (*Step) ToMap() map[string]any +``` + +#### Returns + +`map[string]any` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 386. + +## Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 166. diff --git a/fern/products/sdk-reference/go/agents/contexts/index.mdx b/fern/products/sdk-reference/go/agents/contexts/index.mdx new file mode 100644 index 0000000000..52cdf97646 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/contexts/index.mdx @@ -0,0 +1,219 @@ +--- +slug: "/reference/go/agents/contexts" +title: "contexts" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "module" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/contexts" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go" +--- +# `contexts` + +Package contexts provides the Contexts & Steps workflow system for SignalWire AI agents. + +Instead of a single flat prompt, agents can define structured Contexts (conversation flows) containing ordered Steps (sequential stages). Each step carries its own prompt, completion criteria, function restrictions, and navigation rules. The builder serialises the whole tree into the map\[string]any format expected by the SWML AI verb. + +## Signature + +```go +package contexts +``` + +## Constants + + + Limits guard against unreasonable configurations. + + + + Limits guard against unreasonable configurations. + + + + ReservedNativeToolNames is the set of tool names the runtime auto-injects when contexts/steps are present. User-defined SWAIG tools must not collide with these names. ContextBuilder.Validate() rejects any agent that registers a user tool sharing one of these names — the runtime would never call the user tool because the native one wins. + + +## Modules + + + + + +## Functions + +### CreateSimpleContext + +CreateSimpleContext creates a standalone Context. If name is empty it defaults to "default". + +#### Signature + +```go +func CreateSimpleContext(name string) *Context +``` + +#### Parameters + + + +#### Returns + +`*Context` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 1074. + +*** + +### NewContextBuilder + +NewContextBuilder creates a new empty ContextBuilder. + +#### Signature + +```go +func NewContextBuilder() *ContextBuilder +``` + +#### Returns + +`*ContextBuilder` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 815. + +*** + +### WithConfirm + +WithConfirm sets whether the model must confirm the answer with the user. + +#### Signature + +```go +func WithConfirm(c bool) GatherQuestionOption +``` + +#### Parameters + + + +#### Returns + +`GatherQuestionOption` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 54. + +*** + +### WithFunctions + +WithFunctions sets additional function names visible for this question. + +#### Signature + +```go +func WithFunctions(f []string) GatherQuestionOption +``` + +#### Parameters + + + +#### Returns + +`GatherQuestionOption` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 64. + +*** + +### WithPrompt + +WithPrompt sets extra instruction text appended for this question. + +#### Signature + +```go +func WithPrompt(p string) GatherQuestionOption +``` + +#### Parameters + + + +#### Returns + +`GatherQuestionOption` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 59. + +*** + +### WithType + +WithType sets the JSON-schema type for the answer (default "string"). + +#### Signature + +```go +func WithType(t string) GatherQuestionOption +``` + +#### Parameters + + + +#### Returns + +`GatherQuestionOption` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 49. + +## Type Aliases + +### GatherQuestionOption + +GatherQuestionOption is a functional option applied to a GatherQuestion. + +#### Signature + +```go +type GatherQuestionOption alias +``` + +#### Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) + +Line 46. + +## Source + +[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) diff --git a/fern/products/sdk-reference/go/agents/datamap/datamap/expression-pattern/index.mdx b/fern/products/sdk-reference/go/agents/datamap/datamap/expression-pattern/index.mdx new file mode 100644 index 0000000000..d8742d2858 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/datamap/datamap/expression-pattern/index.mdx @@ -0,0 +1,35 @@ +--- +slug: "/reference/go/agents/datamap/datamap/expression-pattern" +title: "ExpressionPattern" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/datamap.ExpressionPattern" + parent: "agents.datamap.datamap" + module: "agents.datamap.datamap" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/datamap/datamap.go" +--- +# `ExpressionPattern` + +ExpressionPattern pairs a regex pattern string with a FunctionResult to execute when test\_value matches the pattern. Go equivalent of Python's Tuple\[str, FunctionResult] entry in create\_expression\_tool patterns. + +## Signature + +```go +type ExpressionPattern struct +``` + +## Properties + + + + + +## Source + +[`pkg/datamap/datamap.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/datamap/datamap.go) + +Line 431. diff --git a/fern/products/sdk-reference/go/agents/datamap/datamap/index.mdx b/fern/products/sdk-reference/go/agents/datamap/datamap/index.mdx new file mode 100644 index 0000000000..b0a4df66ac --- /dev/null +++ b/fern/products/sdk-reference/go/agents/datamap/datamap/index.mdx @@ -0,0 +1,22 @@ +--- +slug: "/reference/go/agents/datamap/datamap" +title: "datamap" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "module" + language: "go" + qualified_name: "agents.datamap.datamap" + parent: "agents.datamap" + module: "agents.datamap" +--- +# `datamap` + +## Classes + + + + ExpressionPattern pairs a regex pattern string with a FunctionResult to execute when test\_value matches the pattern. Go equivalent of Python's Tuple\[str, FunctionResult] entry in create\_expression\_tool patterns. + + diff --git a/fern/products/sdk-reference/go/agents/datamap/index.mdx b/fern/products/sdk-reference/go/agents/datamap/index.mdx new file mode 100644 index 0000000000..2b77e63395 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/datamap/index.mdx @@ -0,0 +1,706 @@ +--- +slug: "/reference/go/agents/datamap" +title: "datamap" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/datamap" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/datamap/datamap.go" +--- +# `datamap` + +DataMap is a fluent builder for SWAIG data\_map function definitions. Data map tools execute on SignalWire servers without needing a webhook endpoint. + +## Signature + +```go +type DataMap struct +``` + +## Examples + + + + ```go + dm := datamap.New("get_weather"). + Purpose("Get current weather information"). + Parameter("location", "string", "City name", true, nil). + Webhook("GET", "https://api.weather.com/v1/current?q=${location}", nil, "", false, nil). + Output(swaig.NewFunctionResult("Weather: ${response.current.condition.text}")) + ``` + + + + ```go + dm := datamap.New("get_weather"). + Purpose("Get current weather information"). + Parameter("location", "string", "City name", true, nil). + Webhook("GET", "https://api.weather.com/v1/current?q=${location}", nil, "", false, nil). + Output(swaig.NewFunctionResult("Weather: ${response.current.condition.text}")) + ``` + + + +## Methods + +### Body + +Body sets the request body for the current webhook (for POST/PUT requests). + +#### Signature + +```go +func (*DataMap) Body(data map[string]any) *DataMap +``` + +#### Parameters + + + +#### Returns + +`*DataMap` + +#### Source + +[`pkg/datamap/datamap.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/datamap/datamap.go) + +Line 259. + +*** + +### Description + +Description sets the LLM-facing tool description. + +This string is read by the model to decide WHEN to call this tool. See Purpose for bad-vs-good examples. Alias for Purpose. + +#### Signature + +```go +func (*DataMap) Description(description string) *DataMap +``` + +#### Parameters + + + +#### Returns + +`*DataMap` + +#### Source + +[`pkg/datamap/datamap.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/datamap/datamap.go) + +Line 114. + +*** + +### ErrorKeys + +ErrorKeys sets error indicator keys for the current webhook. + +#### Signature + +```go +func (*DataMap) ErrorKeys(keys []string) *DataMap +``` + +#### Parameters + + + +#### Returns + +`*DataMap` + +#### Source + +[`pkg/datamap/datamap.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/datamap/datamap.go) + +Line 289. + +*** + +### Expression + +Expression adds a pattern-matching expression for expression-based responses. testValue is the template string to test (e.g., "$\{args.command\}"). pattern is the regex pattern to match against. output is the FunctionResult returned when the pattern matches. nomatchOutput is an optional FunctionResult returned when the pattern does not match (can be nil). + +#### Signature + +```go +func (*DataMap) Expression( + testValue string, + pattern string, + output *swaig.FunctionResult, + nomatchOutput *swaig.FunctionResult +) *DataMap +``` + +#### Parameters + + + + + + + + + +#### Returns + +`*DataMap` + +#### Source + +[`pkg/datamap/datamap.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/datamap/datamap.go) + +Line 152. + +*** + +### ExpressionRegexp + +ExpressionRegexp adds a pattern-matching expression using a compiled \*regexp.Regexp. This mirrors Python's expression() which accepts either a plain string or a compiled re.Pattern object — when a compiled pattern is passed, Python extracts pattern.pattern (the raw string). Here, pattern.String() serves the same role. + +testValue is the template string to test (e.g., "$\{args.command\}"). pattern is a compiled regexp whose string representation is used as the match pattern. output is the FunctionResult returned when the pattern matches. nomatchOutput is an optional FunctionResult returned when the pattern does not match (can be nil). + +#### Signature + +```go +func (*DataMap) ExpressionRegexp( + testValue string, + pattern *regexp.Regexp, + output *swaig.FunctionResult, + nomatchOutput *swaig.FunctionResult +) *DataMap +``` + +#### Parameters + + + + + + + + + +#### Returns + +`*DataMap` + +#### Source + +[`pkg/datamap/datamap.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/datamap/datamap.go) + +Line 171. + +*** + +### FallbackOutput + +FallbackOutput sets the fallback output result used when all webhooks fail. + +#### Signature + +```go +func (*DataMap) FallbackOutput(result *swaig.FunctionResult) *DataMap +``` + +#### Parameters + + + +#### Returns + +`*DataMap` + +#### Source + +[`pkg/datamap/datamap.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/datamap/datamap.go) + +Line 283. + +*** + +### Foreach + +Foreach configures array processing for the current webhook response. + +#### Signature + +```go +func (*DataMap) Foreach(config map[string]any) *DataMap +``` + +#### Parameters + + + +#### Returns + +`*DataMap` + +#### Source + +[`pkg/datamap/datamap.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/datamap/datamap.go) + +Line 271. + +*** + +### FunctionName + +FunctionName returns the function name this DataMap was built for. Useful for logging, deduplication checks, and introspection by callers that hold a \*DataMap reference but need to identify which tool it represents. + +#### Signature + +```go +func (*DataMap) FunctionName() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/datamap/datamap.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/datamap/datamap.go) + +Line 83. + +*** + +### GlobalErrorKeys + +GlobalErrorKeys sets top-level error keys that apply to all webhooks. + +#### Signature + +```go +func (*DataMap) GlobalErrorKeys(keys []string) *DataMap +``` + +#### Parameters + + + +#### Returns + +`*DataMap` + +#### Source + +[`pkg/datamap/datamap.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/datamap/datamap.go) + +Line 295. + +*** + +### Output + +Output sets the output result for the current webhook. + +#### Signature + +```go +func (*DataMap) Output(result *swaig.FunctionResult) *DataMap +``` + +#### Parameters + + + +#### Returns + +`*DataMap` + +#### Source + +[`pkg/datamap/datamap.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/datamap/datamap.go) + +Line 277. + +*** + +### Parameter + +Parameter adds a parameter definition — the `desc` is LLM-FACING. + +Each parameter description is rendered into the OpenAI tool schema under parameters.properties.\.description and sent to the model. The model uses it to decide HOW to fill in the argument from user speech. It is prompt engineering, not developer FYI. + +Bad vs good: + +``` +BAD: dm.Parameter("city", "string", "the city", true, nil) +GOOD: dm.Parameter("city", "string", + "The name of the city to get weather for, e.g. 'San Francisco'. "+ + "Ask the user if they did not provide one. Include the state "+ + "or country if the city name is ambiguous.", + true, nil) +``` + +The enum parameter can be nil if no enumeration constraint is needed. + +#### Signature + +```go +func (*DataMap) Parameter( + name string, + paramType string, + desc string, + required bool, + enum []string +) *DataMap +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`*DataMap` + +#### Examples + + + + ```go + BAD: dm.Parameter("city", "string", "the city", true, nil) + GOOD: dm.Parameter("city", "string", + "The name of the city to get weather for, e.g. 'San Francisco'. "+ + "Ask the user if they did not provide one. Include the state "+ + "or country if the city name is ambiguous.", + true, nil) + ``` + + + + ```go + BAD: dm.Parameter("city", "string", "the city", true, nil) + GOOD: dm.Parameter("city", "string", + "The name of the city to get weather for, e.g. 'San Francisco'. "+ + "Ask the user if they did not provide one. Include the state "+ + "or country if the city name is ambiguous.", + true, nil) + ``` + + + +#### Source + +[`pkg/datamap/datamap.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/datamap/datamap.go) + +Line 136. + +*** + +### Params + +Params sets the request params for the current webhook. + +#### Signature + +```go +func (*DataMap) Params(data map[string]any) *DataMap +``` + +#### Parameters + + + +#### Returns + +`*DataMap` + +#### Source + +[`pkg/datamap/datamap.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/datamap/datamap.go) + +Line 265. + +*** + +### Purpose + +Purpose sets the LLM-facing tool description — this is an alias for Description. + +The description string is rendered into the OpenAI tool schema "description" field on every LLM turn. The model reads it to decide WHEN to call this tool. It is PROMPT ENGINEERING, not developer documentation. + +A vague Purpose is the #1 cause of "the model has the right tool but doesn't call it" failures with data-map tools. + +Bad vs good: + +``` +BAD: dm.Purpose("weather api") +GOOD: dm.Purpose("Get the current weather conditions and forecast " + + "for a specific city. Use this whenever the user asks about " + + "weather, temperature, rain, or similar conditions in a " + + "named location.") +``` + +#### Signature + +```go +func (*DataMap) Purpose(description string) *DataMap +``` + +#### Parameters + + + +#### Returns + +`*DataMap` + +#### Examples + + + + ```go + BAD: dm.Purpose("weather api") + GOOD: dm.Purpose("Get the current weather conditions and forecast " + + "for a specific city. Use this whenever the user asks about " + + "weather, temperature, rain, or similar conditions in a " + + "named location.") + ``` + + + + ```go + BAD: dm.Purpose("weather api") + GOOD: dm.Purpose("Get the current weather conditions and forecast " + + "for a specific city. Use this whenever the user asks about " + + "weather, temperature, rain, or similar conditions in a " + + "named location.") + ``` + + + +#### Source + +[`pkg/datamap/datamap.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/datamap/datamap.go) + +Line 105. + +*** + +### ToSwaigFunction + +ToSwaigFunction converts the DataMap to a complete SWAIG function definition map. The returned map contains "function", "description", "parameters", and "data\_map" keys, matching the canonical SWML/SWAIG schema consumed by the SignalWire AI platform. + +#### Signature + +```go +func (*DataMap) ToSwaigFunction() map[string]any +``` + +#### Returns + +`map[string]any` + +#### Source + +[`pkg/datamap/datamap.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/datamap/datamap.go) + +Line 303. + +*** + +### Webhook + +Webhook adds a webhook API call configuration. If a previous webhook was configured, it is finalized first. method is the HTTP method (GET, POST, etc.). url is the API endpoint URL (can include $\{variable\} substitutions). headers are optional HTTP headers (can be nil). formParam sends JSON body as a single form parameter with this name (empty string to skip). inputArgsAsParams merges function arguments into params. requireArgs lists arguments that must be present to execute (can be nil). + +#### Signature + +```go +func (*DataMap) Webhook( + method string, + url string, + headers map[string]string, + formParam string, + inputArgsAsParams bool, + requireArgs []string +) *DataMap +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`*DataMap` + +#### Source + +[`pkg/datamap/datamap.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/datamap/datamap.go) + +Line 237. + +*** + +### WebhookExpressions + +WebhookExpressions sets expressions to evaluate after the current webhook completes. + +#### Signature + +```go +func (*DataMap) WebhookExpressions(expressions []map[string]any) *DataMap +``` + +#### Parameters + + + +#### Returns + +`*DataMap` + +#### Source + +[`pkg/datamap/datamap.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/datamap/datamap.go) + +Line 253. + +## Functions + +### CreateExpressionTool + +CreateExpressionTool creates a DataMap configured for expression-based pattern matching. name is the function name. patterns maps test values to an ExpressionPattern where Pattern is the regex string and Result is the \*swaig.FunctionResult to return on match. parameters maps parameter names to their definitions (each with "type", "description", "required" keys). + +#### Signature + +```go +func CreateExpressionTool( + name string, + patterns map[string]ExpressionPattern, + parameters map[string]map[string]any +) *DataMap +``` + +#### Parameters + + + + + + + +#### Returns + +`*DataMap` + +#### Source + +[`pkg/datamap/datamap.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/datamap/datamap.go) + +Line 441. + +*** + +### CreateSimpleApiTool + +CreateSimpleApiTool creates a DataMap configured for a simple API call. name is the function name. url is the API endpoint URL. responseTemplate is the template for formatting the response. parameters maps parameter names to their definitions (each with "type", "description", "required" keys). method is the HTTP method (e.g., "GET", "POST"). headers are optional HTTP headers (can be nil). body is an optional request body for POST/PUT (can be nil). errorKeys are optional error indicator keys (can be nil). + +#### Signature + +```go +func CreateSimpleApiTool( + name string, + url string, + responseTemplate string, + parameters map[string]map[string]any, + method string, + headers map[string]string, + body map[string]any, + errorKeys []string +) *DataMap +``` + +#### Parameters + + + + + + + + + + + + + + + + + +#### Returns + +`*DataMap` + +#### Source + +[`pkg/datamap/datamap.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/datamap/datamap.go) + +Line 391. + +*** + +### New + +New creates a new DataMap builder for a function with the given name. + +#### Signature + +```go +func New(functionName string) *DataMap +``` + +#### Parameters + + + +#### Returns + +`*DataMap` + +#### Source + +[`pkg/datamap/datamap.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/datamap/datamap.go) + +Line 74. + +## Source + +[`pkg/datamap/datamap.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/datamap/datamap.go) + +Line 52. diff --git a/fern/products/sdk-reference/go/agents/datamap/index__2.mdx b/fern/products/sdk-reference/go/agents/datamap/index__2.mdx new file mode 100644 index 0000000000..a6e92394e9 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/datamap/index__2.mdx @@ -0,0 +1,20 @@ +--- +slug: "/reference/go/agents/datamap/index__2" +title: "datamap" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "module" + language: "go" + qualified_name: "agents.datamap" + parent: "agents" + module: "agents" +--- +# `datamap` + +## Modules + + + + diff --git a/fern/products/sdk-reference/go/agents/index.mdx b/fern/products/sdk-reference/go/agents/index.mdx new file mode 100644 index 0000000000..9c45bda825 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/index.mdx @@ -0,0 +1,68 @@ +--- +slug: "/reference/go/agents" +title: "agents" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "module" + language: "go" + qualified_name: "agents" +--- +# `agents` + +## Classes + + + + DataMap is a fluent builder for SWAIG data\_map function definitions. Data map tools execute on SignalWire servers without needing a webhook endpoint. + + + +## Modules + + + + Package agent provides the core AgentBase type that wires together SWML rendering, tool dispatch, prompt management, AI configuration, and HTTP serving into a single self-contained AI agent. + + + + Package contexts provides the Contexts & Steps workflow system for SignalWire AI agents. + + + + + + Package lambda adapts a net/http handler produced by the SignalWire Agents SDK (typically agent.AsRouter()) so it can run inside AWS Lambda. + + + + Package livewire provides a LiveKit-compatible API surface that runs on SignalWire's platform. Developers can use familiar LiveKit struct and function names — just change the import path to get SignalWire's infrastructure handling STT, TTS, VAD, LLM, and call control. + + + + Package pom provides a typed Prompt Object Model — a structured tree of sections that can be rendered to Markdown, XML, JSON, or YAML. The rendered output matches the Python reference at signalwire/signalwire/pom/pom.py byte-for-byte for the canonical scenarios covered by the cross-port parity tests in tests/unit/pom/test\_pom\_render\_parity.py. + + + + Package prefabs provides pre-built agent patterns that extend AgentBase with common conversational workflows such as information gathering, surveys, reception/routing, FAQ answering, and virtual concierge services. + + + + Package server provides AgentServer for hosting multiple AI agents on a single HTTP server with route-based dispatch. + + + + Package skills provides the skills system for SignalWire AI agents. Skills are modular capabilities that can be loaded into agents to provide tools, prompt sections, speech hints, and global data. + + + + Package swaig provides SWAIG (SignalWire AI Gateway) function result handling for building AI agent tool responses with actions and call control. + + + + + + Package swml provides the SWML (SignalWire Markup Language) document model, builder, and rendering for the SignalWire AI platform. + + diff --git a/fern/products/sdk-reference/go/agents/lambda/index.mdx b/fern/products/sdk-reference/go/agents/lambda/index.mdx new file mode 100644 index 0000000000..57d66acba5 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/lambda/index.mdx @@ -0,0 +1,131 @@ +--- +slug: "/reference/go/agents/lambda" +title: "lambda" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "module" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/lambda" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/lambda/lambda.go" +--- +# `lambda` + +Package lambda adapts a net/http handler produced by the SignalWire Agents SDK (typically agent.AsRouter()) so it can run inside AWS Lambda. + +The adapter translates a Lambda invocation event into a synthetic \*http.Request, runs the underlying handler against an in-memory response recorder, and marshals the recorder's result back into the Lambda response type that matches the invoking event. + +Two event shapes are supported, because they are the two ways an AI agent is realistically exposed over HTTP on Lambda: + +- Lambda Function URLs (events.LambdaFunctionURLRequest / LambdaFunctionURLResponse). This is the simplest deployment and the one we recommend; no API Gateway is required. +- API Gateway HTTP API v2 (events.APIGatewayV2HTTPRequest / APIGatewayV2HTTPResponse). Identical payload shape in practice, but consumers with an API Gateway layer want the exact response type rather than an assignable alias. + +The classic REST API (v1) payload is intentionally not supported as a first-class path to keep this package small. Users who need v1 can wrap it via github.com/awslabs/aws-lambda-go-api-proxy. + +``` +package main + +import ( + "github.com/aws/aws-lambda-go/lambda" + swlambda "github.com/signalwire/signalwire-go/pkg/lambda" + "github.com/signalwire/signalwire-go/pkg/agent" +) + +var a = agent.NewAgentBase(agent.WithName("MyAgent"), agent.WithRoute("/my-agent")) +var handler = swlambda.NewHandler(a.AsRouter()) + +func main() { + lambda.Start(handler.HandleFunctionURL) +} +``` + +Because agent.AsRouter() installs routes relative to the agent's Route (e.g. /my-agent, /my-agent/swaig), the Lambda event's RawPath must line up with that Route. Lambda Function URLs preserve the full request path unchanged, so no rewriting is needed in the common case. + +## Signature + +```go +package lambda +``` + +## Examples + + + + ```go + package main + + import ( + "github.com/aws/aws-lambda-go/lambda" + swlambda "github.com/signalwire/signalwire-go/pkg/lambda" + "github.com/signalwire/signalwire-go/pkg/agent" + ) + + var a = agent.NewAgentBase(agent.WithName("MyAgent"), agent.WithRoute("/my-agent")) + var handler = swlambda.NewHandler(a.AsRouter()) + + func main() { + lambda.Start(handler.HandleFunctionURL) + } + ``` + + + + ```go + package main + + import ( + "github.com/aws/aws-lambda-go/lambda" + swlambda "github.com/signalwire/signalwire-go/pkg/lambda" + "github.com/signalwire/signalwire-go/pkg/agent" + ) + + var a = agent.NewAgentBase(agent.WithName("MyAgent"), agent.WithRoute("/my-agent")) + var handler = swlambda.NewHandler(a.AsRouter()) + + func main() { + lambda.Start(handler.HandleFunctionURL) + } + ``` + + + +## Modules + + + + + +## Functions + +### NewHandler + +NewHandler returns a Handler that dispatches Lambda events to the given http.Handler. The handler is usually agent.AsRouter() but any http.Handler works. + +Panics if h is nil to fail loudly at cold-start rather than silently returning 500 on every invocation. + +#### Signature + +```go +func NewHandler(h http.Handler) *Handler +``` + +#### Parameters + + + +#### Returns + +`*Handler` + +#### Source + +[`pkg/lambda/lambda.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/lambda/lambda.go) + +Line 75. + +## Source + +[`pkg/lambda/lambda.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/lambda/lambda.go) diff --git a/fern/products/sdk-reference/go/agents/lambda/lambda/handler/index.mdx b/fern/products/sdk-reference/go/agents/lambda/lambda/handler/index.mdx new file mode 100644 index 0000000000..3ca22f0f20 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/lambda/lambda/handler/index.mdx @@ -0,0 +1,85 @@ +--- +slug: "/reference/go/agents/lambda/lambda/handler" +title: "Handler" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/lambda.Handler" + parent: "agents.lambda.lambda" + module: "agents.lambda.lambda" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/lambda/lambda.go" +--- +# `Handler` + +Handler wraps an http.Handler so it can service AWS Lambda invocations. Construct one with NewHandler. + +## Signature + +```go +type Handler struct +``` + +## Methods + +### HandleAPIGatewayV2 + +HandleAPIGatewayV2 processes an API Gateway HTTP API v2 invocation. The payload shape is virtually identical to Function URLs, but the response type differs, so we provide a dedicated entry point. + +#### Signature + +```go +func (*Handler) HandleAPIGatewayV2(ctx context.Context, req events.APIGatewayV2HTTPRequest) (events.APIGatewayV2HTTPResponse, error) +``` + +#### Parameters + + + + + +#### Returns + +`(events.APIGatewayV2HTTPResponse, error)` + +#### Source + +[`pkg/lambda/lambda.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/lambda/lambda.go) + +Line 107. + +*** + +### HandleFunctionURL + +HandleFunctionURL processes a Lambda Function URL invocation. It is intended to be passed to github.com/aws/aws-lambda-go/lambda.Start. + +#### Signature + +```go +func (*Handler) HandleFunctionURL(ctx context.Context, req events.LambdaFunctionURLRequest) (events.LambdaFunctionURLResponse, error) +``` + +#### Parameters + + + + + +#### Returns + +`(events.LambdaFunctionURLResponse, error)` + +#### Source + +[`pkg/lambda/lambda.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/lambda/lambda.go) + +Line 84. + +## Source + +[`pkg/lambda/lambda.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/lambda/lambda.go) + +Line 65. diff --git a/fern/products/sdk-reference/go/agents/lambda/lambda/index.mdx b/fern/products/sdk-reference/go/agents/lambda/lambda/index.mdx new file mode 100644 index 0000000000..3ed754caaf --- /dev/null +++ b/fern/products/sdk-reference/go/agents/lambda/lambda/index.mdx @@ -0,0 +1,22 @@ +--- +slug: "/reference/go/agents/lambda/lambda" +title: "lambda" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "module" + language: "go" + qualified_name: "agents.lambda.lambda" + parent: "github.com/signalwire/signalwire-go/pkg/lambda" + module: "agents.lambda" +--- +# `lambda` + +## Classes + + + + Handler wraps an http.Handler so it can service AWS Lambda invocations. Construct one with NewHandler. + + diff --git a/fern/products/sdk-reference/go/agents/livewire/index.mdx b/fern/products/sdk-reference/go/agents/livewire/index.mdx new file mode 100644 index 0000000000..c7132b8f90 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/livewire/index.mdx @@ -0,0 +1,1275 @@ +--- +slug: "/reference/go/agents/livewire" +title: "livewire" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "module" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/livewire" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go" +--- +# `livewire` + +Package livewire provides a LiveKit-compatible API surface that runs on SignalWire's platform. Developers can use familiar LiveKit struct and function names — just change the import path to get SignalWire's infrastructure handling STT, TTS, VAD, LLM, and call control. + +## Signature + +```go +package livewire +``` + +## Modules + + + + + +## Functions + +### NewAgent + +NewAgent creates a new Agent with the given instructions and options. + +#### Signature + +```go +func NewAgent(instructions string, opts ...AgentOption) *Agent +``` + +#### Parameters + + + + + +#### Returns + +`*Agent` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 163. + +*** + +### NewAgentServer + +NewAgentServer creates a new LiveServer. + +#### Signature + +```go +func NewAgentServer() *LiveServer +``` + +#### Returns + +`*LiveServer` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 754. + +*** + +### NewAgentSession + +NewAgentSession creates a new AgentSession with the given options. Mirrors Python AgentSession.**init** which initializes \_history to \[] (line 480) and \_userdata to \{\} when not provided (line 460). + +#### Signature + +```go +func NewAgentSession(opts ...SessionOption) *AgentSession +``` + +#### Parameters + + + +#### Returns + +`*AgentSession` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 495. + +*** + +### NewCartesiaTTS + +NewCartesiaTTS creates a CartesiaTTS stub. + +#### Signature + +```go +func NewCartesiaTTS(opts ...func(*CartesiaTTS)) *CartesiaTTS +``` + +#### Parameters + + + +#### Returns + +`*CartesiaTTS` + +#### Source + +[`pkg/livewire/plugins.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go) + +Line 84. + +*** + +### NewChatContext + +NewChatContext returns an empty ChatContext ready for use. + +#### Signature + +```go +func NewChatContext() *ChatContext +``` + +#### Returns + +`*ChatContext` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 923. + +*** + +### NewDeepgramSTT + +NewDeepgramSTT creates a DeepgramSTT stub. + +#### Signature + +```go +func NewDeepgramSTT(opts ...func(*DeepgramSTT)) *DeepgramSTT +``` + +#### Parameters + + + +#### Returns + +`*DeepgramSTT` + +#### Source + +[`pkg/livewire/plugins.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go) + +Line 14. + +*** + +### NewElevenLabsTTS + +NewElevenLabsTTS creates an ElevenLabsTTS stub. + +#### Signature + +```go +func NewElevenLabsTTS(opts ...func(*ElevenLabsTTS)) *ElevenLabsTTS +``` + +#### Parameters + + + +#### Returns + +`*ElevenLabsTTS` + +#### Source + +[`pkg/livewire/plugins.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go) + +Line 70. + +*** + +### NewGoogleSTT + +NewGoogleSTT creates a GoogleSTT stub. + +#### Signature + +```go +func NewGoogleSTT(opts ...func(*GoogleSTT)) *GoogleSTT +``` + +#### Parameters + + + +#### Returns + +`*GoogleSTT` + +#### Source + +[`pkg/livewire/plugins.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go) + +Line 29. + +*** + +### NewInferenceLLM + +NewInferenceLLM creates an InferenceLLM stub with the given options. + +#### Signature + +```go +func NewInferenceLLM(opts ...func(*InferenceLLM)) *InferenceLLM +``` + +#### Parameters + + + +#### Returns + +`*InferenceLLM` + +#### Source + +[`pkg/livewire/plugins.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go) + +Line 134. + +*** + +### NewInferenceSTT + +NewInferenceSTT creates an InferenceSTT stub with the given options. + +#### Signature + +```go +func NewInferenceSTT(opts ...func(*InferenceSTT)) *InferenceSTT +``` + +#### Parameters + + + +#### Returns + +`*InferenceSTT` + +#### Source + +[`pkg/livewire/plugins.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go) + +Line 46. + +*** + +### NewInferenceTTS + +NewInferenceTTS creates an InferenceTTS stub with the given model hint. The model value is stored for compatibility but is otherwise unused. + +#### Signature + +```go +func NewInferenceTTS(model string) *InferenceTTS +``` + +#### Parameters + + + +#### Returns + +`*InferenceTTS` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 950. + +*** + +### NewOpenAILLM + +NewOpenAILLM creates an OpenAILLM stub. + +#### Signature + +```go +func NewOpenAILLM(opts ...func(*OpenAILLM)) *OpenAILLM +``` + +#### Parameters + + + +#### Returns + +`*OpenAILLM` + +#### Source + +[`pkg/livewire/plugins.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go) + +Line 116. + +*** + +### NewOpenAITTS + +NewOpenAITTS creates an OpenAITTS stub. + +#### Signature + +```go +func NewOpenAITTS(opts ...func(*OpenAITTS)) *OpenAITTS +``` + +#### Parameters + + + +#### Returns + +`*OpenAITTS` + +#### Source + +[`pkg/livewire/plugins.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go) + +Line 98. + +*** + +### NewSileroVAD + +NewSileroVAD creates a SileroVAD stub. Mirrors Python SileroVAD(\*\*kwargs) — accepts functional options for LiveKit portability, matching the in-file convention for all other stubs. + +#### Signature + +```go +func NewSileroVAD(opts ...func(*SileroVAD)) *SileroVAD +``` + +#### Parameters + + + +#### Returns + +`*SileroVAD` + +#### Source + +[`pkg/livewire/plugins.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go) + +Line 157. + +*** + +### NewToolError + +NewToolError constructs a ToolError with the given message. + +#### Signature + +```go +func NewToolError(message string) *ToolError +``` + +#### Parameters + + + +#### Returns + +`*ToolError` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 901. + +*** + +### RunApp + +RunApp starts the LiveWire agent — prints the banner, a random tip, invokes the setup function (if any), calls the entrypoint, and starts the underlying SignalWire agent server. + +#### Signature + +```go +func RunApp(server *LiveServer) +``` + +#### Parameters + + + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 834. + +*** + +### WithAgentName + +WithAgentName sets the agent name for the RTC session. + +#### Signature + +```go +func WithAgentName(name string) RTCOption +``` + +#### Parameters + + + +#### Returns + +`RTCOption` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 770. + +*** + +### WithAllowInterruptions + +WithAllowInterruptions maps to barge configuration on SignalWire. + +#### Signature + +```go +func WithAllowInterruptions(allow bool) SessionOption +``` + +#### Parameters + + + +#### Returns + +`SessionOption` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 418. + +*** + +### WithDescription + +WithDescription sets the tool description. + +#### Signature + +```go +func WithDescription(desc string) ToolOption +``` + +#### Parameters + + + +#### Returns + +`ToolOption` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 177. + +*** + +### WithInferenceLLMModel + +WithInferenceLLMModel returns a functional option that sets the model string. + +#### Signature + +```go +func WithInferenceLLMModel(model string) func(*InferenceLLM) +``` + +#### Parameters + + + +#### Returns + +`func(*InferenceLLM)` + +#### Source + +[`pkg/livewire/plugins.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go) + +Line 143. + +*** + +### WithInferenceSTTModel + +WithInferenceSTTModel returns a functional option that sets the model string. + +#### Signature + +```go +func WithInferenceSTTModel(model string) func(*InferenceSTT) +``` + +#### Parameters + + + +#### Returns + +`func(*InferenceSTT)` + +#### Source + +[`pkg/livewire/plugins.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go) + +Line 56. + +*** + +### WithLLM + +WithLLM sets the LLM model — this maps to SignalWire AI params. + +#### Signature + +```go +func WithLLM(model string) SessionOption +``` + +#### Parameters + + + +#### Returns + +`SessionOption` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 395. + +*** + +### WithMaxEndpointingDelay + +WithMaxEndpointingDelay maps to AI params on SignalWire. + +#### Signature + +```go +func WithMaxEndpointingDelay(d float64) SessionOption +``` + +#### Parameters + + + +#### Returns + +`SessionOption` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 432. + +*** + +### WithMaxToolSteps + +WithMaxToolSteps sets the maximum tool call chain depth — noop on SignalWire. + +#### Signature + +```go +func WithMaxToolSteps(n int) SessionOption +``` + +#### Parameters + + + +#### Returns + +`SessionOption` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 439. + +*** + +### WithMCPServers + +WithMCPServers is a LiveKit-compatible noop — MCP servers are not yet supported in LiveWire. Tools should be registered via FunctionTool. Mirrors Python Agent(mcp\_servers=...) which emits a one-time noop warning. + +#### Signature + +```go +func WithMCPServers(servers ...any) AgentOption +``` + +#### Parameters + + + +#### Returns + +`AgentOption` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 156. + +*** + +### WithMinEndpointingDelay + +WithMinEndpointingDelay maps to end\_of\_speech\_timeout on SignalWire. + +#### Signature + +```go +func WithMinEndpointingDelay(d float64) SessionOption +``` + +#### Parameters + + + +#### Returns + +`SessionOption` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 425. + +*** + +### WithMinInterruptionDuration + +WithMinInterruptionDuration sets the minimum interruption duration — noop on SignalWire where barge-in timing is handled automatically. Mirrors Python AgentSession(min\_interruption\_duration=0.5) (line 419). + +#### Signature + +```go +func WithMinInterruptionDuration(d float64) SessionOption +``` + +#### Parameters + + + +#### Returns + +`SessionOption` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 476. + +*** + +### WithOnRequest + +WithOnRequest accepts a request callback — noop on SignalWire. Mirrors Python AgentServer.rtc\_session(on\_request=...) which silently ignores the parameter for LiveKit portability. + +#### Signature + +```go +func WithOnRequest(fn func()) RTCOption +``` + +#### Parameters + + + +#### Returns + +`RTCOption` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 785. + +*** + +### WithOnSessionEnd + +WithOnSessionEnd accepts a session-end callback — noop on SignalWire. Mirrors Python AgentServer.rtc\_session(on\_session\_end=...) which silently ignores the parameter for LiveKit portability. + +#### Signature + +```go +func WithOnSessionEnd(fn func()) RTCOption +``` + +#### Parameters + + + +#### Returns + +`RTCOption` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 794. + +*** + +### WithParameters + +WithParameters sets explicit JSON-Schema parameters for a tool. + +#### Signature + +```go +func WithParameters(params map[string]any) ToolOption +``` + +#### Parameters + + + +#### Returns + +`ToolOption` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 182. + +*** + +### WithPreemptiveGeneration + +WithPreemptiveGeneration enables or disables preemptive generation — noop on SignalWire. Mirrors Python AgentSession(preemptive\_generation=False) (line 423). + +#### Signature + +```go +func WithPreemptiveGeneration(enabled bool) SessionOption +``` + +#### Parameters + + + +#### Returns + +`SessionOption` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 485. + +*** + +### WithRecord + +WithRecord enables call recording for the session. Mirrors Python AgentSession.start(record=False) keyword-only param (line 504). + +#### Signature + +```go +func WithRecord(record bool) StartOption +``` + +#### Parameters + + + +#### Returns + +`StartOption` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 561. + +*** + +### WithReplyInstructions + +WithReplyInstructions sets the instructions for the generated reply. + +#### Signature + +```go +func WithReplyInstructions(inst string) ReplyOption +``` + +#### Parameters + + + +#### Returns + +`ReplyOption` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 668. + +*** + +### WithRoom + +WithRoom sets the room for the session start. Mirrors Python AgentSession.start(room=...) keyword-only param (line 504). + +#### Signature + +```go +func WithRoom(room *Room) StartOption +``` + +#### Parameters + + + +#### Returns + +`StartOption` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 555. + +*** + +### WithServerType + +WithServerType sets the server type ("room" or "publisher") — noop on SignalWire. + +#### Signature + +```go +func WithServerType(t string) RTCOption +``` + +#### Parameters + + + +#### Returns + +`RTCOption` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 775. + +*** + +### WithSessionMCPServers + +WithSessionMCPServers stores the MCP servers value on the session — noop on SignalWire. Mirrors Python AgentSession(mcp\_servers=...) which emits a one-time noop warning (lines 450–456). + +#### Signature + +```go +func WithSessionMCPServers(servers any) SessionOption +``` + +#### Parameters + + + +#### Returns + +`SessionOption` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 459. + +*** + +### WithSessionTools + +WithSessionTools appends session-level tools to the AgentSession. These are merged with the bound Agent's tools in Start(). Mirrors Python AgentSession(tools=...) which stores list(tools or \[]) on self.\_tools (line 459) and merges them in \_build\_sw\_agent() (line 591). + +#### Signature + +```go +func WithSessionTools(tools ...any) SessionOption +``` + +#### Parameters + + + +#### Returns + +`SessionOption` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 450. + +*** + +### WithSessionUserdata + +WithSessionUserdata attaches arbitrary user data to the session. Mirrors Python AgentSession(userdata=...) which stores the value as self.\_userdata (line 460). + +#### Signature + +```go +func WithSessionUserdata(data any) SessionOption +``` + +#### Parameters + + + +#### Returns + +`SessionOption` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 469. + +*** + +### WithSTT + +WithSTT sets the STT provider — noop on SignalWire (handled by the control plane). + +#### Signature + +```go +func WithSTT(provider string) SessionOption +``` + +#### Parameters + + + +#### Returns + +`SessionOption` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 379. + +*** + +### WithTools + +WithTools is a LiveKit-compatible noop — use FunctionTool to register tools. + +#### Signature + +```go +func WithTools(tools ...any) AgentOption +``` + +#### Parameters + + + +#### Returns + +`AgentOption` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 142. + +*** + +### WithTTS + +WithTTS sets the TTS provider — noop on SignalWire (voice can be configured via languages). + +#### Signature + +```go +func WithTTS(provider string) SessionOption +``` + +#### Parameters + + + +#### Returns + +`SessionOption` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 387. + +*** + +### WithTurnDetection + +WithTurnDetection sets the turn detection mode — noop on SignalWire. + +#### Signature + +```go +func WithTurnDetection(mode string) SessionOption +``` + +#### Parameters + + + +#### Returns + +`SessionOption` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 410. + +*** + +### WithUserdata + +WithUserdata attaches arbitrary user data to the agent. + +#### Signature + +```go +func WithUserdata(data any) AgentOption +``` + +#### Parameters + + + +#### Returns + +`AgentOption` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 149. + +*** + +### WithVAD + +WithVAD sets the VAD provider — noop on SignalWire (handled by the control plane). + +#### Signature + +```go +func WithVAD(vad any) SessionOption +``` + +#### Parameters + + + +#### Returns + +`SessionOption` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 402. + +## Type Aliases + +### AgentOption + +AgentOption configures an Agent during construction. + +#### Signature + +```go +type AgentOption alias +``` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 139. + +*** + +### ReplyOption + +ReplyOption configures a GenerateReply call. + +#### Signature + +```go +type ReplyOption alias +``` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 665. + +*** + +### RTCOption + +RTCOption configures an RTC session. + +#### Signature + +```go +type RTCOption alias +``` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 767. + +*** + +### SessionOption + +SessionOption configures an AgentSession. + +#### Signature + +```go +type SessionOption alias +``` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 376. + +*** + +### StartOption + +StartOption configures a Start() call. + +#### Signature + +```go +type StartOption alias +``` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 551. + +*** + +### ToolOption + +ToolOption configures a tool definition. + +#### Signature + +```go +type ToolOption alias +``` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 174. + +## Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) diff --git a/fern/products/sdk-reference/go/agents/livewire/livewire/agent-handoff/index.mdx b/fern/products/sdk-reference/go/agents/livewire/livewire/agent-handoff/index.mdx new file mode 100644 index 0000000000..afe23270b2 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/livewire/livewire/agent-handoff/index.mdx @@ -0,0 +1,35 @@ +--- +slug: "/reference/go/agents/livewire/livewire/agent-handoff" +title: "AgentHandoff" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/livewire.AgentHandoff" + parent: "agents.livewire.livewire" + module: "agents.livewire.livewire" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go" +--- +# `AgentHandoff` + +AgentHandoff signals a handoff to another agent in multi-agent scenarios. Mirrors Python AgentHandoff(agent, \*, returns=None) (line 153). + +## Signature + +```go +type AgentHandoff struct +``` + +## Properties + + + + + +## Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 873. diff --git a/fern/products/sdk-reference/go/agents/livewire/livewire/agent-session/index.mdx b/fern/products/sdk-reference/go/agents/livewire/livewire/agent-session/index.mdx new file mode 100644 index 0000000000..c665fcf3d1 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/livewire/livewire/agent-session/index.mdx @@ -0,0 +1,255 @@ +--- +slug: "/reference/go/agents/livewire/livewire/agent-session" +title: "AgentSession" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/livewire.AgentSession" + parent: "agents.livewire.livewire" + module: "agents.livewire.livewire" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go" +--- +# `AgentSession` + +AgentSession mirrors a LiveKit AgentSession — it binds an Agent to the SignalWire platform and manages the call lifecycle. + +## Signature + +```go +type AgentSession struct +``` + +## Methods + +### GenerateReply + +GenerateReply triggers the agent to speak. On SignalWire this is handled by the prompt; reply instructions are appended to the prompt. + +#### Signature + +```go +func (*AgentSession) GenerateReply(opts ...ReplyOption) +``` + +#### Parameters + + + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 674. + +*** + +### GetSwAgent + +GetSwAgent returns the underlying SignalWire AgentBase (for testing/advanced use). + +#### Signature + +```go +func (*AgentSession) GetSwAgent() *agent.AgentBase +``` + +#### Returns + +`*agent.AgentBase` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 701. + +*** + +### History + +History returns the conversation turn history (read-only). Mirrors Python AgentSession.history property (line 497). + +#### Signature + +```go +func (*AgentSession) History() []map[string]string +``` + +#### Returns + +`[]map[string]string` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 532. + +*** + +### Interrupt + +Interrupt interrupts current speech — noop on SignalWire (barge-in is automatic). + +#### Signature + +```go +func (*AgentSession) Interrupt() +``` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 686. + +*** + +### Say + +Say queues text to be spoken by the agent. + +#### Signature + +```go +func (*AgentSession) Say(text string) +``` + +#### Parameters + + + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 655. + +*** + +### SetUserdata + +SetUserdata sets the session-level userdata. Mirrors Python AgentSession.userdata property setter (line 493). + +#### Signature + +```go +func (*AgentSession) SetUserdata(val any) +``` + +#### Parameters + + + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 526. + +*** + +### Start + +Start binds the session to an agent and prepares the underlying SignalWire AgentBase for serving. + +Mirrors Python AgentSession.start(agent, \*, room=None, record=False) (line 504). The room and record parameters are accepted via StartOption functional options (WithRoom and WithRecord) following Go idioms. + +#### Signature + +```go +func (*AgentSession) Start(ctx *JobContext, ag *Agent, opts ...StartOption) error +``` + +#### Parameters + + + + + + + +#### Returns + +`error` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 571. + +*** + +### UpdateAgent + +UpdateAgent swaps in a new Agent mid-session. Mirrors Python AgentSession.update\_agent (line 528) which sets self.\_agent = agent and agent.session = self. + +#### Signature + +```go +func (*AgentSession) UpdateAgent(ag *Agent) +``` + +#### Parameters + + + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 539. + +*** + +### UpdateInstructions + +UpdateInstructions changes the agent's prompt mid-session. + +#### Signature + +```go +func (*AgentSession) UpdateInstructions(instructions string) +``` + +#### Parameters + + + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 691. + +*** + +### Userdata + +Userdata returns the session-level userdata. Mirrors Python AgentSession.userdata property getter (line 489). + +#### Signature + +```go +func (*AgentSession) Userdata() any +``` + +#### Returns + +`any` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 520. + +## Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 330. diff --git a/fern/products/sdk-reference/go/agents/livewire/livewire/agent/index.mdx b/fern/products/sdk-reference/go/agents/livewire/livewire/agent/index.mdx new file mode 100644 index 0000000000..dc1d50153f --- /dev/null +++ b/fern/products/sdk-reference/go/agents/livewire/livewire/agent/index.mdx @@ -0,0 +1,247 @@ +--- +slug: "/reference/go/agents/livewire/livewire/agent" +title: "Agent" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/livewire.Agent" + parent: "agents.livewire.livewire" + module: "agents.livewire.livewire" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go" +--- +# `Agent` + +Agent mirrors a LiveKit Agent — it holds instructions and tool definitions. + +## Signature + +```go +type Agent struct +``` + +## Methods + +### FunctionTool + +FunctionTool registers a named tool on the agent. The handler must be + +``` +func(args map[string]any, rawData map[string]any) *swaig.FunctionResult +``` + +or a LiveKit-style handler that will be wrapped: + +``` +func(ctx *RunContext, location string) string +``` + +In the LiveKit-style case the function's string parameters are inferred and the return string is wrapped into a FunctionResult automatically. + +#### Signature + +```go +func (*Agent) FunctionTool(name string, handler any, opts ...ToolOption) *Agent +``` + +#### Parameters + + + + + + + +#### Returns + +`*Agent` + +#### Examples + + + + ```go + func(args map[string]any, rawData map[string]any) *swaig.FunctionResult + ``` + + + + ```go + func(ctx *RunContext, location string) string + ``` + + + + ```go + func(args map[string]any, rawData map[string]any) *swaig.FunctionResult + ``` + + + + ```go + func(ctx *RunContext, location string) string + ``` + + + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 196. + +*** + +### Instructions + +Instructions returns the agent's current instructions string. Mirrors Python Agent.instructions (public read/write attribute, line 290). + +#### Signature + +```go +func (*Agent) Instructions() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 242. + +*** + +### OnEnter + +OnEnter registers a callback to be invoked when the agent enters a session. Mirrors Python Agent.on\_enter lifecycle hook (line 346). Returns the Agent for method chaining. + +#### Signature + +```go +func (*Agent) OnEnter(fn func()) *Agent +``` + +#### Parameters + + + +#### Returns + +`*Agent` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 256. + +*** + +### OnExit + +OnExit registers a callback to be invoked when the agent exits a session. Mirrors Python Agent.on\_exit lifecycle hook (line 350). Returns the Agent for method chaining. + +#### Signature + +```go +func (*Agent) OnExit(fn func()) *Agent +``` + +#### Parameters + + + +#### Returns + +`*Agent` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 264. + +*** + +### OnUserTurnCompleted + +OnUserTurnCompleted registers a callback invoked when the user finishes speaking. The two arguments mirror Python's turn\_ctx and new\_message parameters (line 354), typed as any to avoid a LiveKit dependency. Returns the Agent for method chaining. + +#### Signature + +```go +func (*Agent) OnUserTurnCompleted(fn func(turnCtx any, newMessage any)) *Agent +``` + +#### Parameters + + + +#### Returns + +`*Agent` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 273. + +*** + +### Session + +Session returns the AgentSession currently bound to this agent, or nil if the agent has not been started. Mirrors Python Agent.session property (lines 334–340). + +#### Signature + +```go +func (*Agent) Session() *AgentSession +``` + +#### Returns + +`*AgentSession` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 249. + +*** + +### UpdateTools + +UpdateTools replaces the agent's tool list. Mirrors Python Agent.update\_tools (livewire/**init**.py:394) which accepts List\[Any] and stores self.\_tools = list(tools). In Go, the parameter is \[]any to keep the unexported toolDef out of the public signature (the original typed \[]toolDef made the method uncallable from external packages). Elements that aren't recognized tools are silently skipped, matching Python's permissive storage semantics. Returns the Agent for method chaining. + +#### Signature + +```go +func (*Agent) UpdateTools(tools []any) *Agent +``` + +#### Parameters + + + +#### Returns + +`*Agent` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 286. + +## Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 124. diff --git a/fern/products/sdk-reference/go/agents/livewire/livewire/cartesia-tts/index.mdx b/fern/products/sdk-reference/go/agents/livewire/livewire/cartesia-tts/index.mdx new file mode 100644 index 0000000000..bc03bd8c15 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/livewire/livewire/cartesia-tts/index.mdx @@ -0,0 +1,33 @@ +--- +slug: "/reference/go/agents/livewire/livewire/cartesia-tts" +title: "CartesiaTTS" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/livewire.CartesiaTTS" + parent: "agents.livewire.livewire" + module: "agents.livewire.livewire" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go" +--- +# `CartesiaTTS` + +CartesiaTTS is a stub for the Cartesia TTS provider. + +## Signature + +```go +type CartesiaTTS struct +``` + +## Properties + + + +## Source + +[`pkg/livewire/plugins.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go) + +Line 79. diff --git a/fern/products/sdk-reference/go/agents/livewire/livewire/chat-context/index.mdx b/fern/products/sdk-reference/go/agents/livewire/livewire/chat-context/index.mdx new file mode 100644 index 0000000000..8fb200b11a --- /dev/null +++ b/fern/products/sdk-reference/go/agents/livewire/livewire/chat-context/index.mdx @@ -0,0 +1,61 @@ +--- +slug: "/reference/go/agents/livewire/livewire/chat-context" +title: "ChatContext" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/livewire.ChatContext" + parent: "agents.livewire.livewire" + module: "agents.livewire.livewire" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go" +--- +# `ChatContext` + +ChatContext buffers a conversation as an ordered list of role/content messages. It mirrors the Python livewire.ChatContext stub which is API-compatible with the livekit-agents ChatContext shape. + +## Signature + +```go +type ChatContext struct +``` + +## Properties + + + +## Methods + +### Append + +Append adds a role/content message to the context and returns the receiver for method chaining. If role is empty it defaults to "user"; if content is empty it defaults to "" (empty string), matching the Python defaults role="user", text="". + +#### Signature + +```go +func (*ChatContext) Append(role string, content string) *ChatContext +``` + +#### Parameters + + + + + +#### Returns + +`*ChatContext` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 929. + +## Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 918. diff --git a/fern/products/sdk-reference/go/agents/livewire/livewire/chat-message/index.mdx b/fern/products/sdk-reference/go/agents/livewire/livewire/chat-message/index.mdx new file mode 100644 index 0000000000..918263cdfe --- /dev/null +++ b/fern/products/sdk-reference/go/agents/livewire/livewire/chat-message/index.mdx @@ -0,0 +1,35 @@ +--- +slug: "/reference/go/agents/livewire/livewire/chat-message" +title: "ChatMessage" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/livewire.ChatMessage" + parent: "agents.livewire.livewire" + module: "agents.livewire.livewire" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go" +--- +# `ChatMessage` + +ChatMessage holds a single role/content pair in a conversation history. The JSON tags match the dict keys produced by the Python ChatContext.append() implementation: \{"role": ..., "content": ...\}. + +## Signature + +```go +type ChatMessage struct +``` + +## Properties + + + + + +## Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 910. diff --git a/fern/products/sdk-reference/go/agents/livewire/livewire/deepgram-stt/index.mdx b/fern/products/sdk-reference/go/agents/livewire/livewire/deepgram-stt/index.mdx new file mode 100644 index 0000000000..794b580505 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/livewire/livewire/deepgram-stt/index.mdx @@ -0,0 +1,33 @@ +--- +slug: "/reference/go/agents/livewire/livewire/deepgram-stt" +title: "DeepgramSTT" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/livewire.DeepgramSTT" + parent: "agents.livewire.livewire" + module: "agents.livewire.livewire" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go" +--- +# `DeepgramSTT` + +DeepgramSTT is a stub for the Deepgram STT provider. On SignalWire, speech recognition is handled by the control plane. + +## Signature + +```go +type DeepgramSTT struct +``` + +## Properties + + + +## Source + +[`pkg/livewire/plugins.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go) + +Line 9. diff --git a/fern/products/sdk-reference/go/agents/livewire/livewire/eleven-labs-tts/index.mdx b/fern/products/sdk-reference/go/agents/livewire/livewire/eleven-labs-tts/index.mdx new file mode 100644 index 0000000000..f3530dfa17 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/livewire/livewire/eleven-labs-tts/index.mdx @@ -0,0 +1,33 @@ +--- +slug: "/reference/go/agents/livewire/livewire/eleven-labs-tts" +title: "ElevenLabsTTS" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/livewire.ElevenLabsTTS" + parent: "agents.livewire.livewire" + module: "agents.livewire.livewire" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go" +--- +# `ElevenLabsTTS` + +ElevenLabsTTS is a stub for the ElevenLabs TTS provider. + +## Signature + +```go +type ElevenLabsTTS struct +``` + +## Properties + + + +## Source + +[`pkg/livewire/plugins.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go) + +Line 65. diff --git a/fern/products/sdk-reference/go/agents/livewire/livewire/google-stt/index.mdx b/fern/products/sdk-reference/go/agents/livewire/livewire/google-stt/index.mdx new file mode 100644 index 0000000000..df5281c400 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/livewire/livewire/google-stt/index.mdx @@ -0,0 +1,33 @@ +--- +slug: "/reference/go/agents/livewire/livewire/google-stt" +title: "GoogleSTT" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/livewire.GoogleSTT" + parent: "agents.livewire.livewire" + module: "agents.livewire.livewire" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go" +--- +# `GoogleSTT` + +GoogleSTT is a stub for the Google STT provider. + +## Signature + +```go +type GoogleSTT struct +``` + +## Properties + + + +## Source + +[`pkg/livewire/plugins.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go) + +Line 24. diff --git a/fern/products/sdk-reference/go/agents/livewire/livewire/index.mdx b/fern/products/sdk-reference/go/agents/livewire/livewire/index.mdx new file mode 100644 index 0000000000..3cea453a52 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/livewire/livewire/index.mdx @@ -0,0 +1,106 @@ +--- +slug: "/reference/go/agents/livewire/livewire" +title: "livewire" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "module" + language: "go" + qualified_name: "agents.livewire.livewire" + parent: "github.com/signalwire/signalwire-go/pkg/livewire" + module: "agents.livewire" +--- +# `livewire` + +## Classes + + + + Agent mirrors a LiveKit Agent — it holds instructions and tool definitions. + + + + AgentHandoff signals a handoff to another agent in multi-agent scenarios. Mirrors Python AgentHandoff(agent, \*, returns=None) (line 153). + + + + AgentSession mirrors a LiveKit AgentSession — it binds an Agent to the SignalWire platform and manages the call lifecycle. + + + + CartesiaTTS is a stub for the Cartesia TTS provider. + + + + ChatContext buffers a conversation as an ordered list of role/content messages. It mirrors the Python livewire.ChatContext stub which is API-compatible with the livekit-agents ChatContext shape. + + + + ChatMessage holds a single role/content pair in a conversation history. The JSON tags match the dict keys produced by the Python ChatContext.append() implementation: \{"role": ..., "content": ...\}. + + + + DeepgramSTT is a stub for the Deepgram STT provider. On SignalWire, speech recognition is handled by the control plane. + + + + ElevenLabsTTS is a stub for the ElevenLabs TTS provider. + + + + GoogleSTT is a stub for the Google STT provider. + + + + InferenceLLM is a stub for the SignalWire-hosted inference LLM. On SignalWire, the LLM pipeline is handled by the control plane; the Model field is forwarded to SignalWire AI parameters. Mirrors Python InferenceLLM(model="") (livewire/**init**.py:751). + + + + InferenceSTT is a stub for the SignalWire-hosted inference STT provider. On SignalWire, speech recognition is handled by the control plane. Mirrors Python InferenceSTT(model="") (livewire/**init**.py:736). + + + + InferenceTTS is a no-op stub providing LiveKit import compatibility. SignalWire's control plane handles text-to-speech; this type exists so code written for livekit/agents inference.TTS can be dropped in unchanged. + + + + JobContext mirrors a LiveKit JobContext — provides room and connection info. + + + + JobProcess mirrors a LiveKit JobProcess — used for prewarm/setup. + + + + LiveServer mirrors a LiveKit AgentServer — it registers entrypoints and starts the agent. + + + + OpenAILLM is a stub for the OpenAI LLM provider. + + + + OpenAITTS is a stub for the OpenAI TTS provider. + + + + Room is a stub — SignalWire doesn't use the LiveKit room abstraction. + + + + RunContext mirrors a LiveKit RunContext — available inside tool handlers. + + + + SileroVAD is a stub for the Silero VAD provider. + + + + StopResponse signals that a tool should not trigger another LLM reply. + + + + ToolError signals a tool execution error. Return a \*ToolError from a tool handler to tell the framework the tool failed; the error message is forwarded to the LLM as a tool-failure notification rather than triggering a normal LLM reply. Parallel to StopResponse in this file. + + diff --git a/fern/products/sdk-reference/go/agents/livewire/livewire/inference-llm/index.mdx b/fern/products/sdk-reference/go/agents/livewire/livewire/inference-llm/index.mdx new file mode 100644 index 0000000000..f5cbea03ac --- /dev/null +++ b/fern/products/sdk-reference/go/agents/livewire/livewire/inference-llm/index.mdx @@ -0,0 +1,33 @@ +--- +slug: "/reference/go/agents/livewire/livewire/inference-llm" +title: "InferenceLLM" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/livewire.InferenceLLM" + parent: "agents.livewire.livewire" + module: "agents.livewire.livewire" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go" +--- +# `InferenceLLM` + +InferenceLLM is a stub for the SignalWire-hosted inference LLM. On SignalWire, the LLM pipeline is handled by the control plane; the Model field is forwarded to SignalWire AI parameters. Mirrors Python InferenceLLM(model="") (livewire/**init**.py:751). + +## Signature + +```go +type InferenceLLM struct +``` + +## Properties + + + +## Source + +[`pkg/livewire/plugins.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go) + +Line 129. diff --git a/fern/products/sdk-reference/go/agents/livewire/livewire/inference-stt/index.mdx b/fern/products/sdk-reference/go/agents/livewire/livewire/inference-stt/index.mdx new file mode 100644 index 0000000000..eb0bd54414 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/livewire/livewire/inference-stt/index.mdx @@ -0,0 +1,33 @@ +--- +slug: "/reference/go/agents/livewire/livewire/inference-stt" +title: "InferenceSTT" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/livewire.InferenceSTT" + parent: "agents.livewire.livewire" + module: "agents.livewire.livewire" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go" +--- +# `InferenceSTT` + +InferenceSTT is a stub for the SignalWire-hosted inference STT provider. On SignalWire, speech recognition is handled by the control plane. Mirrors Python InferenceSTT(model="") (livewire/**init**.py:736). + +## Signature + +```go +type InferenceSTT struct +``` + +## Properties + + + +## Source + +[`pkg/livewire/plugins.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go) + +Line 41. diff --git a/fern/products/sdk-reference/go/agents/livewire/livewire/inference-tts/index.mdx b/fern/products/sdk-reference/go/agents/livewire/livewire/inference-tts/index.mdx new file mode 100644 index 0000000000..c803c86ede --- /dev/null +++ b/fern/products/sdk-reference/go/agents/livewire/livewire/inference-tts/index.mdx @@ -0,0 +1,33 @@ +--- +slug: "/reference/go/agents/livewire/livewire/inference-tts" +title: "InferenceTTS" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/livewire.InferenceTTS" + parent: "agents.livewire.livewire" + module: "agents.livewire.livewire" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go" +--- +# `InferenceTTS` + +InferenceTTS is a no-op stub providing LiveKit import compatibility. SignalWire's control plane handles text-to-speech; this type exists so code written for livekit/agents inference.TTS can be dropped in unchanged. + +## Signature + +```go +type InferenceTTS struct +``` + +## Properties + + + +## Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 944. diff --git a/fern/products/sdk-reference/go/agents/livewire/livewire/job-context/index.mdx b/fern/products/sdk-reference/go/agents/livewire/livewire/job-context/index.mdx new file mode 100644 index 0000000000..7f92d56754 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/livewire/livewire/job-context/index.mdx @@ -0,0 +1,83 @@ +--- +slug: "/reference/go/agents/livewire/livewire/job-context" +title: "JobContext" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/livewire.JobContext" + parent: "agents.livewire.livewire" + module: "agents.livewire.livewire" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go" +--- +# `JobContext` + +JobContext mirrors a LiveKit JobContext — provides room and connection info. + +## Signature + +```go +type JobContext struct +``` + +## Properties + + + + + +## Methods + +### Connect + +Connect is a LiveKit compatibility noop — SignalWire agents connect automatically when the platform invokes the SWML endpoint. + +#### Signature + +```go +func (*JobContext) Connect() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 718. + +*** + +### WaitForParticipant + +WaitForParticipant is a LiveKit compatibility noop — SignalWire handles participant management automatically. Mirrors Python JobContext.wait\_for\_participant(\*, identity=None) (line 670). + +#### Signature + +```go +func (*JobContext) WaitForParticipant(identity string) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 726. + +## Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 710. diff --git a/fern/products/sdk-reference/go/agents/livewire/livewire/job-process/index.mdx b/fern/products/sdk-reference/go/agents/livewire/livewire/job-process/index.mdx new file mode 100644 index 0000000000..e6bdfbd505 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/livewire/livewire/job-process/index.mdx @@ -0,0 +1,33 @@ +--- +slug: "/reference/go/agents/livewire/livewire/job-process" +title: "JobProcess" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/livewire.JobProcess" + parent: "agents.livewire.livewire" + module: "agents.livewire.livewire" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go" +--- +# `JobProcess` + +JobProcess mirrors a LiveKit JobProcess — used for prewarm/setup. + +## Signature + +```go +type JobProcess struct +``` + +## Properties + + + +## Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 823. diff --git a/fern/products/sdk-reference/go/agents/livewire/livewire/live-server/index.mdx b/fern/products/sdk-reference/go/agents/livewire/livewire/live-server/index.mdx new file mode 100644 index 0000000000..f99e3c15fc --- /dev/null +++ b/fern/products/sdk-reference/go/agents/livewire/livewire/live-server/index.mdx @@ -0,0 +1,75 @@ +--- +slug: "/reference/go/agents/livewire/livewire/live-server" +title: "LiveServer" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/livewire.LiveServer" + parent: "agents.livewire.livewire" + module: "agents.livewire.livewire" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go" +--- +# `LiveServer` + +LiveServer mirrors a LiveKit AgentServer — it registers entrypoints and starts the agent. + +## Signature + +```go +type LiveServer struct +``` + +## Methods + +### RTCSession + +RTCSession registers the session entrypoint function. + +#### Signature + +```go +func (*LiveServer) RTCSession(fn func(*JobContext), opts ...RTCOption) +``` + +#### Parameters + + + + + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 807. + +*** + +### SetSetupFunc + +SetSetupFunc sets the prewarm/setup function — noop on SignalWire. + +#### Signature + +```go +func (*LiveServer) SetSetupFunc(fn func(*JobProcess)) +``` + +#### Parameters + + + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 801. + +## Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 746. diff --git a/fern/products/sdk-reference/go/agents/livewire/livewire/open-aillm/index.mdx b/fern/products/sdk-reference/go/agents/livewire/livewire/open-aillm/index.mdx new file mode 100644 index 0000000000..5709a7b07e --- /dev/null +++ b/fern/products/sdk-reference/go/agents/livewire/livewire/open-aillm/index.mdx @@ -0,0 +1,33 @@ +--- +slug: "/reference/go/agents/livewire/livewire/open-aillm" +title: "OpenAILLM" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/livewire.OpenAILLM" + parent: "agents.livewire.livewire" + module: "agents.livewire.livewire" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go" +--- +# `OpenAILLM` + +OpenAILLM is a stub for the OpenAI LLM provider. + +## Signature + +```go +type OpenAILLM struct +``` + +## Properties + + + +## Source + +[`pkg/livewire/plugins.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go) + +Line 111. diff --git a/fern/products/sdk-reference/go/agents/livewire/livewire/open-aitts/index.mdx b/fern/products/sdk-reference/go/agents/livewire/livewire/open-aitts/index.mdx new file mode 100644 index 0000000000..099c14518e --- /dev/null +++ b/fern/products/sdk-reference/go/agents/livewire/livewire/open-aitts/index.mdx @@ -0,0 +1,33 @@ +--- +slug: "/reference/go/agents/livewire/livewire/open-aitts" +title: "OpenAITTS" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/livewire.OpenAITTS" + parent: "agents.livewire.livewire" + module: "agents.livewire.livewire" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go" +--- +# `OpenAITTS` + +OpenAITTS is a stub for the OpenAI TTS provider. + +## Signature + +```go +type OpenAITTS struct +``` + +## Properties + + + +## Source + +[`pkg/livewire/plugins.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go) + +Line 93. diff --git a/fern/products/sdk-reference/go/agents/livewire/livewire/room/index.mdx b/fern/products/sdk-reference/go/agents/livewire/livewire/room/index.mdx new file mode 100644 index 0000000000..ce296edc8b --- /dev/null +++ b/fern/products/sdk-reference/go/agents/livewire/livewire/room/index.mdx @@ -0,0 +1,33 @@ +--- +slug: "/reference/go/agents/livewire/livewire/room" +title: "Room" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/livewire.Room" + parent: "agents.livewire.livewire" + module: "agents.livewire.livewire" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go" +--- +# `Room` + +Room is a stub — SignalWire doesn't use the LiveKit room abstraction. + +## Signature + +```go +type Room struct +``` + +## Properties + + + +## Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 736. diff --git a/fern/products/sdk-reference/go/agents/livewire/livewire/run-context/index.mdx b/fern/products/sdk-reference/go/agents/livewire/livewire/run-context/index.mdx new file mode 100644 index 0000000000..f0739fabe4 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/livewire/livewire/run-context/index.mdx @@ -0,0 +1,41 @@ +--- +slug: "/reference/go/agents/livewire/livewire/run-context" +title: "RunContext" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/livewire.RunContext" + parent: "agents.livewire.livewire" + module: "agents.livewire.livewire" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go" +--- +# `RunContext` + +RunContext mirrors a LiveKit RunContext — available inside tool handlers. + +## Signature + +```go +type RunContext struct +``` + +## Properties + + + + + + + + + + + +## Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 316. diff --git a/fern/products/sdk-reference/go/agents/livewire/livewire/silero-vad/index.mdx b/fern/products/sdk-reference/go/agents/livewire/livewire/silero-vad/index.mdx new file mode 100644 index 0000000000..d197ed1bd3 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/livewire/livewire/silero-vad/index.mdx @@ -0,0 +1,51 @@ +--- +slug: "/reference/go/agents/livewire/livewire/silero-vad" +title: "SileroVAD" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/livewire.SileroVAD" + parent: "agents.livewire.livewire" + module: "agents.livewire.livewire" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go" +--- +# `SileroVAD` + +SileroVAD is a stub for the Silero VAD provider. + +## Signature + +```go +type SileroVAD struct +``` + +## Methods + +### Load + +Load is a noop — Silero VAD model loading is not needed on SignalWire. + +#### Signature + +```go +func (*SileroVAD) Load() *SileroVAD +``` + +#### Returns + +`*SileroVAD` + +#### Source + +[`pkg/livewire/plugins.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go) + +Line 166. + +## Source + +[`pkg/livewire/plugins.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go) + +Line 152. diff --git a/fern/products/sdk-reference/go/agents/livewire/livewire/stop-response/index.mdx b/fern/products/sdk-reference/go/agents/livewire/livewire/stop-response/index.mdx new file mode 100644 index 0000000000..589e4d7e89 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/livewire/livewire/stop-response/index.mdx @@ -0,0 +1,29 @@ +--- +slug: "/reference/go/agents/livewire/livewire/stop-response" +title: "StopResponse" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/livewire.StopResponse" + parent: "agents.livewire.livewire" + module: "agents.livewire.livewire" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go" +--- +# `StopResponse` + +StopResponse signals that a tool should not trigger another LLM reply. + +## Signature + +```go +type StopResponse struct +``` + +## Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 883. diff --git a/fern/products/sdk-reference/go/agents/livewire/livewire/tool-error/index.mdx b/fern/products/sdk-reference/go/agents/livewire/livewire/tool-error/index.mdx new file mode 100644 index 0000000000..c22614fb32 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/livewire/livewire/tool-error/index.mdx @@ -0,0 +1,55 @@ +--- +slug: "/reference/go/agents/livewire/livewire/tool-error" +title: "ToolError" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/livewire.ToolError" + parent: "agents.livewire.livewire" + module: "agents.livewire.livewire" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go" +--- +# `ToolError` + +ToolError signals a tool execution error. Return a \*ToolError from a tool handler to tell the framework the tool failed; the error message is forwarded to the LLM as a tool-failure notification rather than triggering a normal LLM reply. Parallel to StopResponse in this file. + +## Signature + +```go +type ToolError struct +``` + +## Properties + + + +## Methods + +### Error + +Error implements the built-in error interface. + +#### Signature + +```go +func (*ToolError) Error() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 898. + +## Source + +[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) + +Line 893. diff --git a/fern/products/sdk-reference/go/agents/pom/index.mdx b/fern/products/sdk-reference/go/agents/pom/index.mdx new file mode 100644 index 0000000000..19978f1628 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/pom/index.mdx @@ -0,0 +1,298 @@ +--- +slug: "/reference/go/agents/pom" +title: "pom" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "module" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/pom" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go" +--- +# `pom` + +Package pom provides a typed Prompt Object Model — a structured tree of sections that can be rendered to Markdown, XML, JSON, or YAML. The rendered output matches the Python reference at signalwire/signalwire/pom/pom.py byte-for-byte for the canonical scenarios covered by the cross-port parity tests in tests/unit/pom/test\_pom\_render\_parity.py. + +Two types make up the API: + +- Section: one node in the tree (title, body, bullets, subsections, numbered, numberedBullets). +- PromptObjectModel: the root container that holds the top-level sections and provides JSON / YAML round-trip helpers plus the Markdown / XML renderers. + +Both types are exported so callers can build a POM imperatively (NewPromptObjectModel + AddSection + AddSubsection) or by parsing a JSON/YAML document (FromJSON / FromYAML). The rendered output is the canonical wire format; user-facing helpers like AgentBase.Pom() return a \*PromptObjectModel value to keep mutations off the agent's internal state. + +## Signature + +```go +package pom +``` + +## Modules + + + + + +## Functions + +### FromJSON + +FromJSON parses a JSON string (an array of section maps) and returns a populated \*PromptObjectModel. Subsections are validated to require a title; any section without body/bullets/subsections is rejected. + +Python equivalent: PromptObjectModel.from\_json + +#### Signature + +```go +func FromJSON(jsonStr string) (*PromptObjectModel, error) +``` + +#### Parameters + + + +#### Returns + +`(*PromptObjectModel, error)` + +#### Source + +[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) + +Line 577. + +*** + +### FromList + +FromList builds a POM from a pre-parsed \[]map\[string]any (callers can use this when they already have the dict form, e.g. from a database row or another config source). + +Python equivalent: PromptObjectModel.\_from\_dict (the internal helper shared by from\_json / from\_yaml). + +#### Signature + +```go +func FromList(data []map[string]any) (*PromptObjectModel, error) +``` + +#### Parameters + + + +#### Returns + +`(*PromptObjectModel, error)` + +#### Source + +[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) + +Line 603. + +*** + +### FromYAML + +FromYAML parses a YAML string (an array of section maps) and returns a populated \*PromptObjectModel. + +Python equivalent: PromptObjectModel.from\_yaml + +#### Signature + +```go +func FromYAML(yamlStr string) (*PromptObjectModel, error) +``` + +#### Parameters + + + +#### Returns + +`(*PromptObjectModel, error)` + +#### Source + +[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) + +Line 589. + +*** + +### NewPromptObjectModel + +NewPromptObjectModel returns an empty POM ready for AddSection calls. + +Python equivalent: PromptObjectModel.**init** + +#### Signature + +```go +func NewPromptObjectModel() *PromptObjectModel +``` + +#### Returns + +`*PromptObjectModel` + +#### Source + +[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) + +Line 341. + +*** + +### NewSection + +NewSection returns a new Section with the supplied title (which may be empty to indicate untitled). Body, bullets, and subsections start empty; populate them via AddBody / AddBullets / AddSubsection. + +Python equivalent: Section.**init** + +#### Signature + +```go +func NewSection(title string) *Section +``` + +#### Parameters + + + +#### Returns + +`*Section` + +#### Source + +[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) + +Line 69. + +*** + +### WithBody + +WithBody sets the section body. + +#### Signature + +```go +func WithBody(body string) SectionOption +``` + +#### Parameters + + + +#### Returns + +`SectionOption` + +#### Source + +[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) + +Line 112. + +*** + +### WithBullets + +WithBullets sets the section bullets (replaces, not appends). + +#### Signature + +```go +func WithBullets(bullets []string) SectionOption +``` + +#### Parameters + + + +#### Returns + +`SectionOption` + +#### Source + +[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) + +Line 115. + +*** + +### WithNumbered + +WithNumbered marks the section as numbered (or explicitly un-numbered). + +#### Signature + +```go +func WithNumbered(v bool) SectionOption +``` + +#### Parameters + + + +#### Returns + +`SectionOption` + +#### Source + +[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) + +Line 120. + +*** + +### WithNumberedBullets + +WithNumberedBullets switches bullet rendering to numbered form. + +#### Signature + +```go +func WithNumberedBullets(v bool) SectionOption +``` + +#### Parameters + + + +#### Returns + +`SectionOption` + +#### Source + +[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) + +Line 123. + +## Type Aliases + +### SectionOption + +SectionOption configures a Section at construction (used by AddSubsection and PromptObjectModel.AddSection). + +#### Signature + +```go +type SectionOption alias +``` + +#### Source + +[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) + +Line 109. + +## Source + +[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) diff --git a/fern/products/sdk-reference/go/agents/pom/pom/index.mdx b/fern/products/sdk-reference/go/agents/pom/pom/index.mdx new file mode 100644 index 0000000000..779b41ba14 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/pom/pom/index.mdx @@ -0,0 +1,26 @@ +--- +slug: "/reference/go/agents/pom/pom" +title: "pom" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "module" + language: "go" + qualified_name: "agents.pom.pom" + parent: "github.com/signalwire/signalwire-go/pkg/pom" + module: "agents.pom" +--- +# `pom` + +## Classes + + + + PromptObjectModel is the root container — a list of top-level Sections plus serialization / rendering helpers. Use NewPromptObjectModel() to construct one, or FromJSON / FromYAML to parse one. + + + + Section is one node in the POM tree. + + diff --git a/fern/products/sdk-reference/go/agents/pom/pom/prompt-object-model/index.mdx b/fern/products/sdk-reference/go/agents/pom/pom/prompt-object-model/index.mdx new file mode 100644 index 0000000000..72e7937c61 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/pom/pom/prompt-object-model/index.mdx @@ -0,0 +1,271 @@ +--- +slug: "/reference/go/agents/pom/pom/prompt-object-model" +title: "PromptObjectModel" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/pom.PromptObjectModel" + parent: "agents.pom.pom" + module: "agents.pom.pom" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go" +--- +# `PromptObjectModel` + +PromptObjectModel is the root container — a list of top-level Sections plus serialization / rendering helpers. Use NewPromptObjectModel() to construct one, or FromJSON / FromYAML to parse one. + +Python equivalent: signalwire.pom.pom.PromptObjectModel + +## Signature + +```go +type PromptObjectModel struct +``` + +## Properties + + + Debug, when true, prints rendering decisions to stderr (matches the Python flag). Off by default. + + + + Sections is the ordered list of top-level sections. Only the first section may have a nil Title. + + +## Methods + +### AddPomAsSubsection + +AddPomAsSubsection attaches every top-level section of pomToAdd underneath the section identified by target — either the title of an existing section in this POM, or a \*Section pointer. + +Python equivalent: PromptObjectModel.add\_pom\_as\_subsection + +#### Signature + +```go +func (*PromptObjectModel) AddPomAsSubsection(target any, pomToAdd *PromptObjectModel) error +``` + +#### Parameters + + + + + +#### Returns + +`error` + +#### Source + +[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) + +Line 828. + +*** + +### AddSection + +AddSection appends a top-level section. title may be empty only for the first section (Python contract: "Only the first section can have no title"). The returned \*Section can be configured further (for example, by calling AddSubsection on it). + +Python equivalent: PromptObjectModel.add\_section + +#### Signature + +```go +func (*PromptObjectModel) AddSection(title string, opts ...SectionOption) (*Section, error) +``` + +#### Parameters + + + + + +#### Returns + +`(*Section, error)` + +#### Source + +[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) + +Line 351. + +*** + +### Clone + +Clone returns a deep copy of the POM. Useful when an agent wants to hand callers a snapshot without exposing internal mutable state. + +#### Signature + +```go +func (*PromptObjectModel) Clone() *PromptObjectModel +``` + +#### Returns + +`*PromptObjectModel` + +#### Source + +[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) + +Line 849. + +*** + +### FindSection + +FindSection performs a recursive depth-first search for a section whose Title matches. Returns nil if no match is found. + +Python equivalent: PromptObjectModel.find\_section + +#### Signature + +```go +func (*PromptObjectModel) FindSection(title string) *Section +``` + +#### Parameters + + + +#### Returns + +`*Section` + +#### Source + +[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) + +Line 372. + +*** + +### RenderMarkdown + +RenderMarkdown renders the entire POM as a Markdown document. + +Python equivalent: PromptObjectModel.render\_markdown + +#### Signature + +```go +func (*PromptObjectModel) RenderMarkdown() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) + +Line 770. + +*** + +### RenderXML + +RenderXML renders the entire POM as an XML document with the canonical “<?xml ...?>\ ... </prompt>“ envelope. + +Python equivalent: PromptObjectModel.render\_xml + +#### Signature + +```go +func (*PromptObjectModel) RenderXML() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) + +Line 797. + +*** + +### ToJSON + +ToJSON serializes the POM to a JSON string. Matches Python's json.dumps(..., indent=2) byte-for-byte for the canonical fixtures. + +Python equivalent: PromptObjectModel.to\_json + +#### Signature + +```go +func (*PromptObjectModel) ToJSON() (string, error) +``` + +#### Returns + +`(string, error)` + +#### Source + +[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) + +Line 404. + +*** + +### ToList + +ToList returns the POM as \[]map\[string]any (one entry per top-level section), matching Python's to\_dict. + +Python equivalent: PromptObjectModel.to\_dict + +#### Signature + +```go +func (*PromptObjectModel) ToList() []map[string]any +``` + +#### Returns + +`[]map[string]any` + +#### Source + +[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) + +Line 392. + +*** + +### ToYAML + +ToYAML serializes the POM to a YAML string in the same shape as Python's yaml.dump(..., default\_flow\_style=False, sort\_keys=False). PyYAML uses block-sequence-with-indent-0 by default (the leading "-" of each list item aligns with the parent's mapping key, not after it); gopkg.in/yaml.v3 cannot be configured to do the same, so this renderer writes the YAML structure manually for byte-for-byte parity. + +Python equivalent: PromptObjectModel.to\_yaml + +#### Signature + +```go +func (*PromptObjectModel) ToYAML() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) + +Line 500. + +## Source + +[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) + +Line 329. diff --git a/fern/products/sdk-reference/go/agents/pom/pom/section/index.mdx b/fern/products/sdk-reference/go/agents/pom/pom/section/index.mdx new file mode 100644 index 0000000000..5c5d969602 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/pom/pom/section/index.mdx @@ -0,0 +1,246 @@ +--- +slug: "/reference/go/agents/pom/pom/section" +title: "Section" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/pom.Section" + parent: "agents.pom.pom" + module: "agents.pom.pom" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go" +--- +# `Section` + +Section is one node in the POM tree. + +Python equivalent: signalwire.pom.pom.Section. The exported field names match the JSON / YAML schema: + +``` +{"title": "...", "body": "...", "bullets": [...], + "subsections": [...], "numbered": true, "numberedBullets": true} +``` + +Title is a \*string (not string) to faithfully model Python's "title may be None" semantics for the optional first top-level section. All other fields use zero values to mean "absent". + +## Signature + +```go +type Section struct +``` + +## Examples + + + + ```go + {"title": "...", "body": "...", "bullets": [...], + "subsections": [...], "numbered": true, "numberedBullets": true} + ``` + + + + ```go + {"title": "...", "body": "...", "bullets": [...], + "subsections": [...], "numbered": true, "numberedBullets": true} + ``` + + + +## Properties + + + Body is a paragraph of free text (rendered before any bullets). + + + + Bullets is the list of bullet points. Empty means no bullet list. + + + + Numbered, when non-nil, opts the section into (or out of) numeric section numbering. nil means "default" (inherit sibling behavior). + + + + NumberedBullets renders bullets as "1." "2." instead of "-". + + + + Subsections is the list of nested child sections. + + + + Title is the section heading. nil means untitled (only legal for the first top-level section in a PromptObjectModel). + + +## Methods + +### AddBody + +AddBody sets (or replaces) the section body text. + +Python equivalent: Section.add\_body — the docstring says "Add OR REPLACE the body text"; this is a setter, not an appender. + +#### Signature + +```go +func (*Section) AddBody(body string) +``` + +#### Parameters + + + +#### Source + +[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) + +Line 78. + +*** + +### AddBullets + +AddBullets appends bullet points to the section. + +Python equivalent: Section.add\_bullets — the Python contract is to extend (not replace) the existing bullet list. + +#### Signature + +```go +func (*Section) AddBullets(bullets []string) +``` + +#### Parameters + + + +#### Source + +[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) + +Line 86. + +*** + +### AddSubsection + +AddSubsection creates and appends a subsection under this section. title must be non-empty (subsections always require a title). Returns the new \*Section so callers can keep building. + +Python equivalent: Section.add\_subsection + +#### Signature + +```go +func (*Section) AddSubsection(title string, opts ...SectionOption) (*Section, error) +``` + +#### Parameters + + + + + +#### Returns + +`(*Section, error)` + +#### Source + +[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) + +Line 95. + +*** + +### RenderMarkdown + +RenderMarkdown returns this section (and its subsections) as a Markdown string. level controls the starting heading level (default 2 == "##"); sectionNumber is the optional dotted prefix the section inherits when its parent is numbered. + +Python equivalent: Section.render\_markdown + +#### Signature + +```go +func (*Section) RenderMarkdown(level int, sectionNumber []int) string +``` + +#### Parameters + + + + + +#### Returns + +`string` + +#### Source + +[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) + +Line 196. + +*** + +### RenderXML + +RenderXML returns this section (and its subsections) as a chunk of XML. indent is the starting indent level (each level == 2 spaces). + +Python equivalent: Section.render\_xml + +#### Signature + +```go +func (*Section) RenderXML(indent int, sectionNumber []int) string +``` + +#### Parameters + + + + + +#### Returns + +`string` + +#### Source + +[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) + +Line 261. + +*** + +### ToMap + +ToMap returns the section as a map\[string]any with keys in canonical order (title, body, bullets, subsections, numbered, numberedBullets). Empty-or-zero fields are omitted to match Python's to\_dict behavior. + +The returned value is intended for JSON / YAML serialization; callers that need a plain Go map (and don't care about key order) can type-assert each value. + +Python equivalent: Section.to\_dict + +#### Signature + +```go +func (*Section) ToMap() map[string]any +``` + +#### Returns + +`map[string]any` + +#### Source + +[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) + +Line 136. + +## Source + +[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) + +Line 47. diff --git a/fern/products/sdk-reference/go/agents/prefabs/index.mdx b/fern/products/sdk-reference/go/agents/prefabs/index.mdx new file mode 100644 index 0000000000..e81f96feeb --- /dev/null +++ b/fern/products/sdk-reference/go/agents/prefabs/index.mdx @@ -0,0 +1,363 @@ +--- +slug: "/reference/go/agents/prefabs" +title: "prefabs" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "module" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/prefabs" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/bedrock.go" +--- +# `prefabs` + +Package prefabs provides pre-built agent patterns that extend AgentBase with common conversational workflows such as information gathering, surveys, reception/routing, FAQ answering, and virtual concierge services. + +## Signature + +```go +package prefabs +``` + +## Modules + + + + + +## Functions + +### NewBedrockAgent + +NewBedrockAgent creates a BedrockAgent with Bedrock-specific SWML rendering. + +Python equivalent: BedrockAgent.**init** + +#### Signature + +```go +func NewBedrockAgent(opts BedrockOptions) *BedrockAgent +``` + +#### Parameters + + + +#### Returns + +`*BedrockAgent` + +#### Source + +[`pkg/prefabs/bedrock.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/bedrock.go) + +Line 75. + +*** + +### NewConciergeAgent + +NewConciergeAgent creates an agent that provides concierge services for a venue. + +#### Signature + +```go +func NewConciergeAgent(opts ConciergeOptions) *ConciergeAgent +``` + +#### Parameters + + + +#### Returns + +`*ConciergeAgent` + +#### Source + +[`pkg/prefabs/concierge.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/concierge.go) + +Line 49. + +*** + +### NewFAQBotAgent + +NewFAQBotAgent creates an agent that answers frequently asked questions. + +#### Signature + +```go +func NewFAQBotAgent(opts FAQBotOptions) *FAQBotAgent +``` + +#### Parameters + + + +#### Returns + +`*FAQBotAgent` + +#### Source + +[`pkg/prefabs/faq_bot.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/faq_bot.go) + +Line 49. + +*** + +### NewInfoGathererAgent + +NewInfoGathererAgent creates an agent that asks a series of questions and stores the answers in global data. Pass nil Questions to enable dynamic mode; call SetQuestionCallback on the returned agent to supply per-request questions. + +#### Signature + +```go +func NewInfoGathererAgent(opts InfoGathererOptions) *InfoGathererAgent +``` + +#### Parameters + + + +#### Returns + +`*InfoGathererAgent` + +#### Source + +[`pkg/prefabs/info_gatherer.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/info_gatherer.go) + +Line 49. + +*** + +### NewReceptionistAgent + +NewReceptionistAgent creates an agent that greets callers and transfers them to the appropriate department. + +#### Signature + +```go +func NewReceptionistAgent(opts ReceptionistOptions) *ReceptionistAgent +``` + +#### Parameters + + + +#### Returns + +`*ReceptionistAgent` + +#### Source + +[`pkg/prefabs/receptionist.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/receptionist.go) + +Line 43. + +*** + +### NewSurveyAgent + +NewSurveyAgent creates an agent that conducts a structured survey. + +#### Signature + +```go +func NewSurveyAgent(opts SurveyOptions) *SurveyAgent +``` + +#### Parameters + + + +#### Returns + +`*SurveyAgent` + +#### Source + +[`pkg/prefabs/survey.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/survey.go) + +Line 104. + +*** + +### NewSurveyQuestion + +NewSurveyQuestion constructs a SurveyQuestion with Required:true, matching Python SurveyAgent.\_validate\_questions which defaults required=True when unspecified. Callers opt out with WithOptional(). + +#### Signature + +```go +func NewSurveyQuestion(text string, opts ...SurveyQuestionOption) SurveyQuestion +``` + +#### Parameters + + + + + +#### Returns + +`SurveyQuestion` + +#### Source + +[`pkg/prefabs/survey.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/survey.go) + +Line 65. + +*** + +### WithOptional + +WithOptional marks a question as not required. Matches Python's required=False escape hatch on SurveyAgent questions. + +#### Signature + +```go +func WithOptional() SurveyQuestionOption +``` + +#### Returns + +`SurveyQuestionOption` + +#### Source + +[`pkg/prefabs/survey.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/survey.go) + +Line 58. + +*** + +### WithQuestionChoices + +WithQuestionChoices sets the choice list for multiple\_choice questions. + +#### Signature + +```go +func WithQuestionChoices(choices ...string) SurveyQuestionOption +``` + +#### Parameters + + + +#### Returns + +`SurveyQuestionOption` + +#### Source + +[`pkg/prefabs/survey.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/survey.go) + +Line 52. + +*** + +### WithQuestionID + +WithQuestionID sets the question ID. + +#### Signature + +```go +func WithQuestionID(id string) SurveyQuestionOption +``` + +#### Parameters + + + +#### Returns + +`SurveyQuestionOption` + +#### Source + +[`pkg/prefabs/survey.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/survey.go) + +Line 36. + +*** + +### WithQuestionScale + +WithQuestionScale sets the scale for rating questions (answers run 1..n). + +#### Signature + +```go +func WithQuestionScale(n int) SurveyQuestionOption +``` + +#### Parameters + + + +#### Returns + +`SurveyQuestionOption` + +#### Source + +[`pkg/prefabs/survey.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/survey.go) + +Line 47. + +*** + +### WithQuestionType + +WithQuestionType sets the question type ("rating", "multiple\_choice", "yes\_no", "open\_ended"). + +#### Signature + +```go +func WithQuestionType(t string) SurveyQuestionOption +``` + +#### Parameters + + + +#### Returns + +`SurveyQuestionOption` + +#### Source + +[`pkg/prefabs/survey.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/survey.go) + +Line 42. + +## Type Aliases + +### SurveyQuestionOption + +SurveyQuestionOption configures a question during construction. + +#### Signature + +```go +type SurveyQuestionOption alias +``` + +#### Source + +[`pkg/prefabs/survey.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/survey.go) + +Line 33. + +## Source + +[`pkg/prefabs/bedrock.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/bedrock.go) diff --git a/fern/products/sdk-reference/go/agents/prefabs/prefabs/amenity/index.mdx b/fern/products/sdk-reference/go/agents/prefabs/prefabs/amenity/index.mdx new file mode 100644 index 0000000000..a8d0679a4a --- /dev/null +++ b/fern/products/sdk-reference/go/agents/prefabs/prefabs/amenity/index.mdx @@ -0,0 +1,37 @@ +--- +slug: "/reference/go/agents/prefabs/prefabs/amenity" +title: "Amenity" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/prefabs.Amenity" + parent: "agents.prefabs.prefabs" + module: "agents.prefabs.prefabs" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/concierge.go" +--- +# `Amenity` + +Amenity describes a venue amenity with its hours, location, and extra details. + +## Signature + +```go +type Amenity struct +``` + +## Properties + + + + + + + +## Source + +[`pkg/prefabs/concierge.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/concierge.go) + +Line 16. diff --git a/fern/products/sdk-reference/go/agents/prefabs/prefabs/bedrock-agent/index.mdx b/fern/products/sdk-reference/go/agents/prefabs/prefabs/bedrock-agent/index.mdx new file mode 100644 index 0000000000..bac11ccfb3 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/prefabs/prefabs/bedrock-agent/index.mdx @@ -0,0 +1,183 @@ +--- +slug: "/reference/go/agents/prefabs/prefabs/bedrock-agent" +title: "BedrockAgent" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/prefabs.BedrockAgent" + parent: "agents.prefabs.prefabs" + module: "agents.prefabs.prefabs" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/bedrock.go" +--- +# `BedrockAgent` + +BedrockAgent wraps AgentBase and configures it to emit the "amazon\_bedrock" SWML verb instead of the standard "ai" verb. + +The voice\_id, temperature, and top\_p values are injected into the rendered prompt config (matching Python's \_add\_voice\_to\_prompt). Keys that are text-model-specific (barge\_confidence, presence\_penalty, frequency\_penalty) are removed from the prompt config because they do not apply to Bedrock's voice-to-voice model. + +## Signature + +```go +type BedrockAgent struct +``` + +## Properties + + + +## Methods + +### SetInferenceParams + +SetInferenceParams updates one or more Bedrock inference parameters. Pass zero-value pointers to leave a parameter unchanged. + +Python equivalent: BedrockAgent.set\_inference\_params + +#### Signature + +```go +func (*BedrockAgent) SetInferenceParams(temperature float64, topP float64, maxTokens int) +``` + +#### Parameters + + + + + + + +#### Source + +[`pkg/prefabs/bedrock.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/bedrock.go) + +Line 183. + +*** + +### SetLLMModel + +SetLLMModel logs a warning and does nothing. Bedrock uses a fixed voice-to-voice model, so overriding the model name is not meaningful. + +Python equivalent: BedrockAgent.set\_llm\_model + +#### Signature + +```go +func (*BedrockAgent) SetLLMModel(model string) +``` + +#### Parameters + + + +#### Source + +[`pkg/prefabs/bedrock.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/bedrock.go) + +Line 201. + +*** + +### SetLLMTemperature + +SetLLMTemperature is a convenience wrapper that delegates to SetInferenceParams. + +Python equivalent: BedrockAgent.set\_llm\_temperature + +#### Signature + +```go +func (*BedrockAgent) SetLLMTemperature(temperature float64) +``` + +#### Parameters + + + +#### Source + +[`pkg/prefabs/bedrock.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/bedrock.go) + +Line 209. + +*** + +### SetPostPromptLLMParams + +SetPostPromptLLMParams logs a warning and ignores the parameters. Bedrock's post-prompt summarisation uses OpenAI configured at the platform level (in the C code), so SDK-level overrides have no effect. The keys of params are listed in the warning so the caller can see what was ignored. + +Python equivalent: BedrockAgent.set\_post\_prompt\_llm\_params + +#### Signature + +```go +func (*BedrockAgent) SetPostPromptLLMParams(params map[string]any) +``` + +#### Parameters + + + +#### Source + +[`pkg/prefabs/bedrock.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/bedrock.go) + +Line 220. + +*** + +### SetPromptLLMParams + +SetPromptLLMParams logs a warning directing the caller to SetInferenceParams instead. The keys of params are listed in the warning so the caller can see what was ignored. + +Python equivalent: BedrockAgent.set\_prompt\_llm\_params + +#### Signature + +```go +func (*BedrockAgent) SetPromptLLMParams(params map[string]any) +``` + +#### Parameters + + + +#### Source + +[`pkg/prefabs/bedrock.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/bedrock.go) + +Line 237. + +*** + +### SetVoice + +SetVoice sets the Bedrock voice ID. + +Python equivalent: BedrockAgent.set\_voice + +#### Signature + +```go +func (*BedrockAgent) SetVoice(voiceID string) +``` + +#### Parameters + + + +#### Source + +[`pkg/prefabs/bedrock.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/bedrock.go) + +Line 174. + +## Source + +[`pkg/prefabs/bedrock.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/bedrock.go) + +Line 58. diff --git a/fern/products/sdk-reference/go/agents/prefabs/prefabs/bedrock-options/index.mdx b/fern/products/sdk-reference/go/agents/prefabs/prefabs/bedrock-options/index.mdx new file mode 100644 index 0000000000..8c026b4ea3 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/prefabs/prefabs/bedrock-options/index.mdx @@ -0,0 +1,65 @@ +--- +slug: "/reference/go/agents/prefabs/prefabs/bedrock-options" +title: "BedrockOptions" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/prefabs.BedrockOptions" + parent: "agents.prefabs.prefabs" + module: "agents.prefabs.prefabs" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/bedrock.go" +--- +# `BedrockOptions` + +BedrockOptions configures a new BedrockAgent. + +BedrockAgent is the Go equivalent of the Python BedrockAgent class. It extends the standard agent infrastructure but renders the SWML document with the "amazon\_bedrock" verb instead of the default "ai" verb. All standard AgentBase capabilities (prompt, SWAIG tools, skills, post-prompt, dynamic config, etc.) work unchanged. + +## Signature + +```go +type BedrockOptions struct +``` + +## Properties + + + AgentOptions are functional options forwarded to NewAgentBase. Use them to set host, port, auth credentials, etc. + + + + MaxTokens is the maximum number of tokens to generate. Defaults to 1024. + + + + Name is the agent name. Defaults to "bedrock\_agent". + + + + Route is the HTTP route for the agent. Defaults to "/bedrock". + + + + SystemPrompt is an optional initial system prompt. It can be overridden later via SetPromptText. + + + + Temperature is the generation temperature (0–1). Defaults to 0.7. + + + + TopP is the nucleus-sampling parameter (0–1). Defaults to 0.9. + + + + VoiceID is the Bedrock voice identifier. Defaults to "matthew". + + +## Source + +[`pkg/prefabs/bedrock.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/bedrock.go) + +Line 21. diff --git a/fern/products/sdk-reference/go/agents/prefabs/prefabs/concierge-agent/index.mdx b/fern/products/sdk-reference/go/agents/prefabs/prefabs/concierge-agent/index.mdx new file mode 100644 index 0000000000..3c9bedacdc --- /dev/null +++ b/fern/products/sdk-reference/go/agents/prefabs/prefabs/concierge-agent/index.mdx @@ -0,0 +1,33 @@ +--- +slug: "/reference/go/agents/prefabs/prefabs/concierge-agent" +title: "ConciergeAgent" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/prefabs.ConciergeAgent" + parent: "agents.prefabs.prefabs" + module: "agents.prefabs.prefabs" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/concierge.go" +--- +# `ConciergeAgent` + +ConciergeAgent acts as a virtual concierge for a venue, answering questions about amenities, services, hours, and directions. + +## Signature + +```go +type ConciergeAgent struct +``` + +## Properties + + + +## Source + +[`pkg/prefabs/concierge.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/concierge.go) + +Line 36. diff --git a/fern/products/sdk-reference/go/agents/prefabs/prefabs/concierge-options/index.mdx b/fern/products/sdk-reference/go/agents/prefabs/prefabs/concierge-options/index.mdx new file mode 100644 index 0000000000..a342485691 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/prefabs/prefabs/concierge-options/index.mdx @@ -0,0 +1,53 @@ +--- +slug: "/reference/go/agents/prefabs/prefabs/concierge-options" +title: "ConciergeOptions" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/prefabs.ConciergeOptions" + parent: "agents.prefabs.prefabs" + module: "agents.prefabs.prefabs" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/concierge.go" +--- +# `ConciergeOptions` + +ConciergeOptions configures a new ConciergeAgent. + +## Signature + +```go +type ConciergeOptions struct +``` + +## Properties + + + + + general hours of operation + + + + + + + + + + optional additional instructions appended to the default list + + + + + + optional static greeting spoken at the start of the call + + +## Source + +[`pkg/prefabs/concierge.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/concierge.go) + +Line 23. diff --git a/fern/products/sdk-reference/go/agents/prefabs/prefabs/department/index.mdx b/fern/products/sdk-reference/go/agents/prefabs/prefabs/department/index.mdx new file mode 100644 index 0000000000..a7cb3c4a89 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/prefabs/prefabs/department/index.mdx @@ -0,0 +1,47 @@ +--- +slug: "/reference/go/agents/prefabs/prefabs/department" +title: "Department" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/prefabs.Department" + parent: "agents.prefabs.prefabs" + module: "agents.prefabs.prefabs" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/receptionist.go" +--- +# `Department` + +Department describes a destination the receptionist can transfer to. + +## Signature + +```go +type Department struct +``` + +## Properties + + + what the department handles + + + + e.g. "sales" + + + + phone number or SWML transfer destination + + + + true if Number is a SWML destination (uses SwmlTransfer) + + +## Source + +[`pkg/prefabs/receptionist.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/receptionist.go) + +Line 15. diff --git a/fern/products/sdk-reference/go/agents/prefabs/prefabs/faq-bot-agent/index.mdx b/fern/products/sdk-reference/go/agents/prefabs/prefabs/faq-bot-agent/index.mdx new file mode 100644 index 0000000000..5bb78ce759 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/prefabs/prefabs/faq-bot-agent/index.mdx @@ -0,0 +1,33 @@ +--- +slug: "/reference/go/agents/prefabs/prefabs/faq-bot-agent" +title: "FAQBotAgent" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/prefabs.FAQBotAgent" + parent: "agents.prefabs.prefabs" + module: "agents.prefabs.prefabs" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/faq_bot.go" +--- +# `FAQBotAgent` + +FAQBotAgent answers frequently asked questions by matching user queries against a provided FAQ database. + +## Signature + +```go +type FAQBotAgent struct +``` + +## Properties + + + +## Source + +[`pkg/prefabs/faq_bot.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/faq_bot.go) + +Line 38. diff --git a/fern/products/sdk-reference/go/agents/prefabs/prefabs/faq-bot-options/index.mdx b/fern/products/sdk-reference/go/agents/prefabs/prefabs/faq-bot-options/index.mdx new file mode 100644 index 0000000000..53799fb9e2 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/prefabs/prefabs/faq-bot-options/index.mdx @@ -0,0 +1,47 @@ +--- +slug: "/reference/go/agents/prefabs/prefabs/faq-bot-options" +title: "FAQBotOptions" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/prefabs.FAQBotOptions" + parent: "agents.prefabs.prefabs" + module: "agents.prefabs.prefabs" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/faq_bot.go" +--- +# `FAQBotOptions` + +FAQBotOptions configures a new FAQBotAgent. + +## Signature + +```go +type FAQBotOptions struct +``` + +## Properties + + + AgentOptions holds additional functional options forwarded to NewAgentBase, matching the \*\*kwargs pass-through in the Python SDK. + + + + + + + + + + + + SuggestRelated controls whether the agent suggests related questions. Defaults to true when nil, matching the Python SDK default. + + +## Source + +[`pkg/prefabs/faq_bot.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/faq_bot.go) + +Line 23. diff --git a/fern/products/sdk-reference/go/agents/prefabs/prefabs/faq/index.mdx b/fern/products/sdk-reference/go/agents/prefabs/prefabs/faq/index.mdx new file mode 100644 index 0000000000..ea83e7060d --- /dev/null +++ b/fern/products/sdk-reference/go/agents/prefabs/prefabs/faq/index.mdx @@ -0,0 +1,37 @@ +--- +slug: "/reference/go/agents/prefabs/prefabs/faq" +title: "FAQ" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/prefabs.FAQ" + parent: "agents.prefabs.prefabs" + module: "agents.prefabs.prefabs" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/faq_bot.go" +--- +# `FAQ` + +FAQ represents a single frequently asked question and its answer. + +## Signature + +```go +type FAQ struct +``` + +## Properties + + + + + + + +## Source + +[`pkg/prefabs/faq_bot.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/faq_bot.go) + +Line 16. diff --git a/fern/products/sdk-reference/go/agents/prefabs/prefabs/index.mdx b/fern/products/sdk-reference/go/agents/prefabs/prefabs/index.mdx new file mode 100644 index 0000000000..515f993ec1 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/prefabs/prefabs/index.mdx @@ -0,0 +1,86 @@ +--- +slug: "/reference/go/agents/prefabs/prefabs" +title: "prefabs" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "module" + language: "go" + qualified_name: "agents.prefabs.prefabs" + parent: "github.com/signalwire/signalwire-go/pkg/prefabs" + module: "agents.prefabs" +--- +# `prefabs` + +## Classes + + + + Amenity describes a venue amenity with its hours, location, and extra details. + + + + BedrockAgent wraps AgentBase and configures it to emit the "amazon\_bedrock" SWML verb instead of the standard "ai" verb. + + + + BedrockOptions configures a new BedrockAgent. + + + + ConciergeAgent acts as a virtual concierge for a venue, answering questions about amenities, services, hours, and directions. + + + + ConciergeOptions configures a new ConciergeAgent. + + + + Department describes a destination the receptionist can transfer to. + + + + FAQ represents a single frequently asked question and its answer. + + + + FAQBotAgent answers frequently asked questions by matching user queries against a provided FAQ database. + + + + FAQBotOptions configures a new FAQBotAgent. + + + + InfoGathererAgent collects answers to a series of questions sequentially. Supports both static (questions provided at construction) and dynamic (questions determined per-request via SetQuestionCallback) modes. + + + + InfoGathererOptions configures a new InfoGathererAgent. Set Questions to nil to enable dynamic callback mode via SetQuestionCallback. + + + + Question describes a single question in an InfoGatherer sequence. + + + + ReceptionistAgent greets callers and routes them to the appropriate department. + + + + ReceptionistOptions configures a new ReceptionistAgent. + + + + SurveyAgent conducts structured surveys with typed questions. + + + + SurveyOptions configures a new SurveyAgent. + + + + SurveyQuestion describes a single question in a survey. + + diff --git a/fern/products/sdk-reference/go/agents/prefabs/prefabs/info-gatherer-agent/index.mdx b/fern/products/sdk-reference/go/agents/prefabs/prefabs/info-gatherer-agent/index.mdx new file mode 100644 index 0000000000..00ab9d46b8 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/prefabs/prefabs/info-gatherer-agent/index.mdx @@ -0,0 +1,96 @@ +--- +slug: "/reference/go/agents/prefabs/prefabs/info-gatherer-agent" +title: "InfoGathererAgent" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/prefabs.InfoGathererAgent" + parent: "agents.prefabs.prefabs" + module: "agents.prefabs.prefabs" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/info_gatherer.go" +--- +# `InfoGathererAgent` + +InfoGathererAgent collects answers to a series of questions sequentially. Supports both static (questions provided at construction) and dynamic (questions determined per-request via SetQuestionCallback) modes. + +## Signature + +```go +type InfoGathererAgent struct +``` + +## Properties + + + +## Methods + +### SetQuestionCallback + +SetQuestionCallback registers a per-request callback that returns the list of questions to ask. Calling this method enables dynamic mode: on each SWML request the callback is invoked with the request's query parameters, body parameters, and headers; the returned \[]Question becomes the session's question list. This mirrors Python's InfoGathererAgent.set\_question\_callback. + +If Questions was set to nil in InfoGathererOptions (dynamic mode), a fallback question set is used when no callback is registered. + +Example: + +``` +ig.SetQuestionCallback(func(query, body map[string]any, headers map[string]string) []Question { + if body["department"] == "support" { + return []Question{{KeyName: "issue", QuestionText: "What is the issue?"}} + } + return []Question{{KeyName: "name", QuestionText: "What is your name?"}} +}) +``` + +#### Signature + +```go +func (*InfoGathererAgent) SetQuestionCallback( + cb func(queryParams map[string]string, bodyParams map[string]any, headers map[string]string) []Question +) +``` + +#### Parameters + + + +#### Examples + + + + ```go + ig.SetQuestionCallback(func(query, body map[string]any, headers map[string]string) []Question { + if body["department"] == "support" { + return []Question{{KeyName: "issue", QuestionText: "What is the issue?"}} + } + return []Question{{KeyName: "name", QuestionText: "What is your name?"}} + }) + ``` + + + + ```go + ig.SetQuestionCallback(func(query, body map[string]any, headers map[string]string) []Question { + if body["department"] == "support" { + return []Question{{KeyName: "issue", QuestionText: "What is the issue?"}} + } + return []Question{{KeyName: "name", QuestionText: "What is your name?"}} + }) + ``` + + + +#### Source + +[`pkg/prefabs/info_gatherer.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/info_gatherer.go) + +Line 135. + +## Source + +[`pkg/prefabs/info_gatherer.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/info_gatherer.go) + +Line 36. diff --git a/fern/products/sdk-reference/go/agents/prefabs/prefabs/info-gatherer-options/index.mdx b/fern/products/sdk-reference/go/agents/prefabs/prefabs/info-gatherer-options/index.mdx new file mode 100644 index 0000000000..a492e10578 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/prefabs/prefabs/info-gatherer-options/index.mdx @@ -0,0 +1,39 @@ +--- +slug: "/reference/go/agents/prefabs/prefabs/info-gatherer-options" +title: "InfoGathererOptions" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/prefabs.InfoGathererOptions" + parent: "agents.prefabs.prefabs" + module: "agents.prefabs.prefabs" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/info_gatherer.go" +--- +# `InfoGathererOptions` + +InfoGathererOptions configures a new InfoGathererAgent. Set Questions to nil to enable dynamic callback mode via SetQuestionCallback. + +## Signature + +```go +type InfoGathererOptions struct +``` + +## Properties + + + + + nil enables dynamic callback mode; non-nil is static mode + + + + +## Source + +[`pkg/prefabs/info_gatherer.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/info_gatherer.go) + +Line 27. diff --git a/fern/products/sdk-reference/go/agents/prefabs/prefabs/question/index.mdx b/fern/products/sdk-reference/go/agents/prefabs/prefabs/question/index.mdx new file mode 100644 index 0000000000..ab625996ad --- /dev/null +++ b/fern/products/sdk-reference/go/agents/prefabs/prefabs/question/index.mdx @@ -0,0 +1,43 @@ +--- +slug: "/reference/go/agents/prefabs/prefabs/question" +title: "Question" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/prefabs.Question" + parent: "agents.prefabs.prefabs" + module: "agents.prefabs.prefabs" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/info_gatherer.go" +--- +# `Question` + +Question describes a single question in an InfoGatherer sequence. + +## Signature + +```go +type Question struct +``` + +## Properties + + + if true the agent will confirm before accepting + + + + identifier used to store the answer + + + + the question to ask the user + + +## Source + +[`pkg/prefabs/info_gatherer.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/info_gatherer.go) + +Line 19. diff --git a/fern/products/sdk-reference/go/agents/prefabs/prefabs/receptionist-agent/index.mdx b/fern/products/sdk-reference/go/agents/prefabs/prefabs/receptionist-agent/index.mdx new file mode 100644 index 0000000000..94f29b071b --- /dev/null +++ b/fern/products/sdk-reference/go/agents/prefabs/prefabs/receptionist-agent/index.mdx @@ -0,0 +1,33 @@ +--- +slug: "/reference/go/agents/prefabs/prefabs/receptionist-agent" +title: "ReceptionistAgent" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/prefabs.ReceptionistAgent" + parent: "agents.prefabs.prefabs" + module: "agents.prefabs.prefabs" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/receptionist.go" +--- +# `ReceptionistAgent` + +ReceptionistAgent greets callers and routes them to the appropriate department. + +## Signature + +```go +type ReceptionistAgent struct +``` + +## Properties + + + +## Source + +[`pkg/prefabs/receptionist.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/receptionist.go) + +Line 32. diff --git a/fern/products/sdk-reference/go/agents/prefabs/prefabs/receptionist-options/index.mdx b/fern/products/sdk-reference/go/agents/prefabs/prefabs/receptionist-options/index.mdx new file mode 100644 index 0000000000..45148dc7aa --- /dev/null +++ b/fern/products/sdk-reference/go/agents/prefabs/prefabs/receptionist-options/index.mdx @@ -0,0 +1,43 @@ +--- +slug: "/reference/go/agents/prefabs/prefabs/receptionist-options" +title: "ReceptionistOptions" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/prefabs.ReceptionistOptions" + parent: "agents.prefabs.prefabs" + module: "agents.prefabs.prefabs" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/receptionist.go" +--- +# `ReceptionistOptions` + +ReceptionistOptions configures a new ReceptionistAgent. + +## Signature + +```go +type ReceptionistOptions struct +``` + +## Properties + + + + + + + + + + + Voice ID for TTS (default: "rime.spore") + + +## Source + +[`pkg/prefabs/receptionist.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/receptionist.go) + +Line 23. diff --git a/fern/products/sdk-reference/go/agents/prefabs/prefabs/survey-agent/index.mdx b/fern/products/sdk-reference/go/agents/prefabs/prefabs/survey-agent/index.mdx new file mode 100644 index 0000000000..5f79748f44 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/prefabs/prefabs/survey-agent/index.mdx @@ -0,0 +1,33 @@ +--- +slug: "/reference/go/agents/prefabs/prefabs/survey-agent" +title: "SurveyAgent" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/prefabs.SurveyAgent" + parent: "agents.prefabs.prefabs" + module: "agents.prefabs.prefabs" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/survey.go" +--- +# `SurveyAgent` + +SurveyAgent conducts structured surveys with typed questions. + +## Signature + +```go +type SurveyAgent struct +``` + +## Properties + + + +## Source + +[`pkg/prefabs/survey.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/survey.go) + +Line 89. diff --git a/fern/products/sdk-reference/go/agents/prefabs/prefabs/survey-options/index.mdx b/fern/products/sdk-reference/go/agents/prefabs/prefabs/survey-options/index.mdx new file mode 100644 index 0000000000..1024a66d2c --- /dev/null +++ b/fern/products/sdk-reference/go/agents/prefabs/prefabs/survey-options/index.mdx @@ -0,0 +1,47 @@ +--- +slug: "/reference/go/agents/prefabs/prefabs/survey-options" +title: "SurveyOptions" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/prefabs.SurveyOptions" + parent: "agents.prefabs.prefabs" + module: "agents.prefabs.prefabs" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/survey.go" +--- +# `SurveyOptions` + +SurveyOptions configures a new SurveyAgent. + +## Signature + +```go +type SurveyOptions struct +``` + +## Properties + + + + + + + + + + + + + + + + + +## Source + +[`pkg/prefabs/survey.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/survey.go) + +Line 77. diff --git a/fern/products/sdk-reference/go/agents/prefabs/prefabs/survey-question/index.mdx b/fern/products/sdk-reference/go/agents/prefabs/prefabs/survey-question/index.mdx new file mode 100644 index 0000000000..35305e8390 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/prefabs/prefabs/survey-question/index.mdx @@ -0,0 +1,57 @@ +--- +slug: "/reference/go/agents/prefabs/prefabs/survey-question" +title: "SurveyQuestion" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/prefabs.SurveyQuestion" + parent: "agents.prefabs.prefabs" + module: "agents.prefabs.prefabs" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/survey.go" +--- +# `SurveyQuestion` + +SurveyQuestion describes a single question in a survey. + +Prefer NewSurveyQuestion for construction — it defaults Required:true to match Python SurveyAgent behavior (signalwire/prefabs/survey.py \_validate\_questions sets required=True when unspecified). Struct literals are still supported, but the Go zero value for Required is false, which diverges from Python. + +## Signature + +```go +type SurveyQuestion struct +``` + +## Properties + + + options for multiple\_choice questions + + + + unique question identifier + + + + whether a non-empty answer is required — Python default true + + + + 1..Scale for rating questions (default 5) + + + + the question to ask + + + + "rating", "multiple\_choice", "yes\_no", "open\_ended" + + +## Source + +[`pkg/prefabs/survey.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/survey.go) + +Line 23. diff --git a/fern/products/sdk-reference/go/agents/server/index.mdx b/fern/products/sdk-reference/go/agents/server/index.mdx new file mode 100644 index 0000000000..56dcbb75f8 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/server/index.mdx @@ -0,0 +1,233 @@ +--- +slug: "/reference/go/agents/server" +title: "server" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "module" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/server" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go" +--- +# `server` + +Package server provides AgentServer for hosting multiple AI agents on a single HTTP server with route-based dispatch. + +## Signature + +```go +package server +``` + +## Constants + + + ErrServerNotRunning is returned (wrapped) by Shutdown when no HTTP server is currently active — i.e. Shutdown was called before Run, or after the server already stopped. It is errors.Is-able. This is a Go-port addition (the Python reference's AgentServer has no graceful-shutdown surface); documented in PORT\_ADDITIONS.md. + + +## Modules + + + + + +## Functions + +### NewAgentServer + +NewAgentServer creates a new AgentServer with the given options. Default host is "0.0.0.0" and default port is 3000. + +#### Signature + +```go +func NewAgentServer(opts ...ServerOption) *AgentServer +``` + +#### Parameters + + + +#### Returns + +`*AgentServer` + +#### Source + +[`pkg/server/server.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go) + +Line 113. + +*** + +### WithLogLevel + +WithLogLevel sets the global log level for the server. Accepted values (case-insensitive): "debug", "info", "warn", "warning", "error", "off" — see the logging.LevelName\* typed constants. Mirrors Python AgentServer(log\_level=...) behavior: the level is applied globally via logging.SetGlobalLevel so all loggers in the process are affected. The default level is "info". + +The parameter is the defined string type logging.LogLevel: the typed constants give autocomplete + a compile-time typo check, while Go's untyped-constant auto-conversion keeps a bare "debug" literal compiling — parity with the Python reference's plain str log\_level. + +#### Signature + +```go +func WithLogLevel(level logging.LogLevel) ServerOption +``` + +#### Parameters + + + +#### Returns + +`ServerOption` + +#### Source + +[`pkg/server/server.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go) + +Line 84. + +*** + +### WithRunHost + +WithRunHost overrides the listen address when calling Run. + +#### Signature + +```go +func WithRunHost(host string) RunOption +``` + +#### Parameters + + + +#### Returns + +`RunOption` + +#### Source + +[`pkg/server/server.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go) + +Line 98. + +*** + +### WithRunPort + +WithRunPort overrides the listen port when calling Run. + +#### Signature + +```go +func WithRunPort(port int) RunOption +``` + +#### Parameters + + + +#### Returns + +`RunOption` + +#### Source + +[`pkg/server/server.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go) + +Line 103. + +*** + +### WithServerHost + +WithServerHost sets the listen address for the server. + +#### Signature + +```go +func WithServerHost(host string) ServerOption +``` + +#### Parameters + + + +#### Returns + +`ServerOption` + +#### Source + +[`pkg/server/server.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go) + +Line 64. + +*** + +### WithServerPort + +WithServerPort sets the listen port for the server. + +#### Signature + +```go +func WithServerPort(port int) ServerOption +``` + +#### Parameters + + + +#### Returns + +`ServerOption` + +#### Source + +[`pkg/server/server.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go) + +Line 69. + +## Type Aliases + +### RunOption + +RunOption overrides server settings at run time. + +#### Signature + +```go +type RunOption alias +``` + +#### Source + +[`pkg/server/server.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go) + +Line 95. + +*** + +### ServerOption + +ServerOption configures an AgentServer during construction. + +#### Signature + +```go +type ServerOption alias +``` + +#### Source + +[`pkg/server/server.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go) + +Line 61. + +## Source + +[`pkg/server/server.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go) diff --git a/fern/products/sdk-reference/go/agents/server/server/agent-entry/index.mdx b/fern/products/sdk-reference/go/agents/server/server/agent-entry/index.mdx new file mode 100644 index 0000000000..437c2ec13f --- /dev/null +++ b/fern/products/sdk-reference/go/agents/server/server/agent-entry/index.mdx @@ -0,0 +1,35 @@ +--- +slug: "/reference/go/agents/server/server/agent-entry" +title: "AgentEntry" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/server.AgentEntry" + parent: "agents.server.server" + module: "agents.server.server" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go" +--- +# `AgentEntry` + +AgentEntry pairs a route with its agent for listing purposes. + +## Signature + +```go +type AgentEntry struct +``` + +## Properties + + + + + +## Source + +[`pkg/server/server.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go) + +Line 187. diff --git a/fern/products/sdk-reference/go/agents/server/server/agent-server/index.mdx b/fern/products/sdk-reference/go/agents/server/server/agent-server/index.mdx new file mode 100644 index 0000000000..d4026f1c6c --- /dev/null +++ b/fern/products/sdk-reference/go/agents/server/server/agent-server/index.mdx @@ -0,0 +1,342 @@ +--- +slug: "/reference/go/agents/server/server/agent-server" +title: "AgentServer" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/server.AgentServer" + parent: "agents.server.server" + module: "agents.server.server" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go" +--- +# `AgentServer` + +AgentServer hosts multiple agents on a single HTTP server with route-based dispatch. Each registered agent is mounted at its own route prefix and exposed via the agent's AsRouter() handler. + +## Signature + +```go +type AgentServer struct +``` + +## Methods + +### GetAgent + +GetAgent returns the agent registered at the given route, or nil if none. + +#### Signature + +```go +func (*AgentServer) GetAgent(route string) *agent.AgentBase +``` + +#### Parameters + + + +#### Returns + +`*agent.AgentBase` + +#### Source + +[`pkg/server/server.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go) + +Line 207. + +*** + +### GetAgents + +GetAgents returns all registered agents in insertion order. + +#### Signature + +```go +func (*AgentServer) GetAgents() []AgentEntry +``` + +#### Returns + +`[]AgentEntry` + +#### Source + +[`pkg/server/server.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go) + +Line 193. + +*** + +### Register + +Register adds an agent to the server at the given route. If route is empty the agent's configured route (via WithRoute) is used instead. The route is normalised to always start with "/". + +#### Signature + +```go +func (*AgentServer) Register(a *agent.AgentBase, route string) +``` + +#### Parameters + + + + + +#### Source + +[`pkg/server/server.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go) + +Line 139. + +*** + +### RegisterGlobalRoutingCallback + +RegisterGlobalRoutingCallback registers a routing callback across all currently-registered agents at the given path. The callback fires on every incoming request to that path and can return an SWML document override (or nil to fall through to the agent's default response). + +This is the Go equivalent of Python's AgentServer.register\_global\_routing\_callback(callback\_fn, path). + +#### Signature + +```go +func (*AgentServer) RegisterGlobalRoutingCallback(path string, cb swml.RoutingCallback) +``` + +#### Parameters + + + + + +#### Source + +[`pkg/server/server.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go) + +Line 276. + +*** + +### RegisterGlobalSipRoutingCallback + +RegisterGlobalSipRoutingCallback registers a SIP redirect-routing callback across all currently-registered agents at the given path. The callback returns a route string; on a non-empty return the framework responds with HTTP 307 Temporary Redirect (matching Python register\_routing\_callback semantics — see AgentBase.RegisterSipRoutingCallback for details). + +Use this form when porting Python AgentServer code that registers a redirect-style global routing callback. For a global response-document override (the richer Go-only mechanism), use RegisterGlobalRoutingCallback. + +#### Signature + +```go +func (*AgentServer) RegisterGlobalSipRoutingCallback( + path string, + cb func(r *http.Request, body map[string]any) string +) +``` + +#### Parameters + + + + + +#### Source + +[`pkg/server/server.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go) + +Line 305. + +*** + +### RegisterSipUsername + +RegisterSipUsername maps a SIP username to an agent route so that inbound SIP calls for that username are routed to the correct agent. + +#### Signature + +```go +func (*AgentServer) RegisterSipUsername(username string, route string) +``` + +#### Parameters + + + + + +#### Source + +[`pkg/server/server.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go) + +Line 246. + +*** + +### Run + +Run starts the HTTP server. This is a blocking call. Optional RunOption values can override host and port at start time. + +Serverless dispatch: unlike Python's AgentServer.run() which auto-detects CGI and Lambda environments, Run() is HTTP-server-only. For AWS Lambda deployments use the pkg/lambda package instead. CGI mode has no Go equivalent; deploy as a standard HTTP service behind a reverse proxy. + +Run delegates to RunContext with context.Background(); use RunContext to drive shutdown from a context, or call Shutdown from another goroutine. + +#### Signature + +```go +func (*AgentServer) Run(opts ...RunOption) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/server/server.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go) + +Line 338. + +*** + +### RunContext + +RunContext is the context-aware form of Run. It blocks serving HTTP exactly like Run, but when ctx is cancelled (or its deadline passes) it performs a graceful Shutdown — stopping new connections and draining in-flight requests — then returns nil. A concurrent Shutdown call has the same effect. Any other listen error is returned as-is. + +This is a Go-port addition (the Python reference's AgentServer.run() has no caller-supplied cancellation token); documented in PORT\_ADDITIONS.md. + +#### Signature + +```go +func (*AgentServer) RunContext(ctx context.Context, opts ...RunOption) error +``` + +#### Parameters + + + + + +#### Returns + +`error` + +#### Source + +[`pkg/server/server.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go) + +Line 350. + +*** + +### ServeStaticFiles + +ServeStaticFiles registers a directory to be served at the given route. + +#### Signature + +```go +func (*AgentServer) ServeStaticFiles(directory string, route string) +``` + +#### Parameters + + + + + +#### Source + +[`pkg/server/server.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go) + +Line 258. + +*** + +### SetupSipRouting + +SetupSipRouting enables a central SIP routing endpoint. When autoMap is true, all currently registered agents are automatically mapped using their route as the SIP username. + +#### Signature + +```go +func (*AgentServer) SetupSipRouting(route string, autoMap bool) +``` + +#### Parameters + + + + + +#### Source + +[`pkg/server/server.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go) + +Line 220. + +*** + +### Shutdown + +Shutdown gracefully stops the running HTTP server: it stops accepting new connections and waits for in-flight requests to complete, bounded by ctx's deadline (a passed deadline returns ctx.Err() and closes idle connections, per net/http.Server.Shutdown). It returns ErrServerNotRunning (wrapped) when no server is currently serving. + +After Shutdown returns, the in-flight Run/RunContext call unblocks and returns nil. This is a Go-port addition (no Python-reference equivalent); documented in PORT\_ADDITIONS.md. + +#### Signature + +```go +func (*AgentServer) Shutdown(ctx context.Context) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/server/server.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go) + +Line 426. + +*** + +### Unregister + +Unregister removes the agent at the given route. Returns true if an agent was found and removed. + +#### Signature + +```go +func (*AgentServer) Unregister(route string) bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`pkg/server/server.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go) + +Line 164. + +## Source + +[`pkg/server/server.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go) + +Line 33. diff --git a/fern/products/sdk-reference/go/agents/server/server/index.mdx b/fern/products/sdk-reference/go/agents/server/server/index.mdx new file mode 100644 index 0000000000..cb2ea8f9bb --- /dev/null +++ b/fern/products/sdk-reference/go/agents/server/server/index.mdx @@ -0,0 +1,26 @@ +--- +slug: "/reference/go/agents/server/server" +title: "server" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "module" + language: "go" + qualified_name: "agents.server.server" + parent: "github.com/signalwire/signalwire-go/pkg/server" + module: "agents.server" +--- +# `server` + +## Classes + + + + AgentEntry pairs a route with its agent for listing purposes. + + + + AgentServer hosts multiple agents on a single HTTP server with route-based dispatch. Each registered agent is mounted at its own route prefix and exposed via the agent's AsRouter() handler. + + diff --git a/fern/products/sdk-reference/go/agents/skills/builtin/builtin/api-ninjas-trivia-skill/index.mdx b/fern/products/sdk-reference/go/agents/skills/builtin/builtin/api-ninjas-trivia-skill/index.mdx new file mode 100644 index 0000000000..fca6adac60 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/skills/builtin/builtin/api-ninjas-trivia-skill/index.mdx @@ -0,0 +1,193 @@ +--- +slug: "/reference/go/agents/skills/builtin/builtin/api-ninjas-trivia-skill" +title: "APINinjasTriviaSkill" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/skills/builtin.APINinjasTriviaSkill" + parent: "github.com/signalwire/signalwire-go/pkg/skills/builtin" + module: "agents.skills.builtin.builtin" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/api_ninjas_trivia.go" +--- +# `APINinjasTriviaSkill` + +APINinjasTriviaSkill gets trivia questions from API Ninjas. + +## Signature + +```go +type APINinjasTriviaSkill struct +``` + +## Properties + + + +## Methods + +### GetHints + +#### Signature + +```go +func (*APINinjasTriviaSkill) GetHints() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/skills/builtin/api_ninjas_trivia.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/api_ninjas_trivia.go) + +Line 225. + +*** + +### GetInstanceKey + +#### Signature + +```go +func (*APINinjasTriviaSkill) GetInstanceKey() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/skills/builtin/api_ninjas_trivia.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/api_ninjas_trivia.go) + +Line 64. + +*** + +### GetParameterSchema + +#### Signature + +```go +func (*APINinjasTriviaSkill) GetParameterSchema() map[string]map[string]any +``` + +#### Returns + +`map[string]map[string]any` + +#### Source + +[`pkg/skills/builtin/api_ninjas_trivia.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/api_ninjas_trivia.go) + +Line 242. + +*** + +### GetPromptSections + +#### Signature + +```go +func (*APINinjasTriviaSkill) GetPromptSections() []map[string]any +``` + +#### Returns + +`[]map[string]any` + +#### Source + +[`pkg/skills/builtin/api_ninjas_trivia.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/api_ninjas_trivia.go) + +Line 229. + +*** + +### RegisterTools + +#### Signature + +```go +func (*APINinjasTriviaSkill) RegisterTools() []skills.ToolRegistration +``` + +#### Returns + +`[]skills.ToolRegistration` + +#### Source + +[`pkg/skills/builtin/api_ninjas_trivia.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/api_ninjas_trivia.go) + +Line 116. + +*** + +### RequiredEnvVars + +#### Signature + +```go +func (*APINinjasTriviaSkill) RequiredEnvVars() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/skills/builtin/api_ninjas_trivia.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/api_ninjas_trivia.go) + +Line 53. + +*** + +### Setup + +#### Signature + +```go +func (*APINinjasTriviaSkill) Setup() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/skills/builtin/api_ninjas_trivia.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/api_ninjas_trivia.go) + +Line 69. + +*** + +### SupportsMultipleInstances + +#### Signature + +```go +func (*APINinjasTriviaSkill) SupportsMultipleInstances() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/skills/builtin/api_ninjas_trivia.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/api_ninjas_trivia.go) + +Line 62. + +## Source + +[`pkg/skills/builtin/api_ninjas_trivia.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/api_ninjas_trivia.go) + +Line 34. diff --git a/fern/products/sdk-reference/go/agents/skills/builtin/builtin/claude-skills-skill/index.mdx b/fern/products/sdk-reference/go/agents/skills/builtin/builtin/claude-skills-skill/index.mdx new file mode 100644 index 0000000000..08fd1d65f6 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/skills/builtin/builtin/claude-skills-skill/index.mdx @@ -0,0 +1,211 @@ +--- +slug: "/reference/go/agents/skills/builtin/builtin/claude-skills-skill" +title: "ClaudeSkillsSkill" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/skills/builtin.ClaudeSkillsSkill" + parent: "github.com/signalwire/signalwire-go/pkg/skills/builtin" + module: "agents.skills.builtin.builtin" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/claude_skills.go" +--- +# `ClaudeSkillsSkill` + +ClaudeSkillsSkill loads Claude-style SKILL.md files as SignalWire agent tools. + +Each directory under skills\_path that contains a SKILL.md becomes a SWAIG tool. The SKILL.md frontmatter provides the tool name and description; the body becomes the tool's response content when invoked. + +## Signature + +```go +type ClaudeSkillsSkill struct +``` + +## Properties + + + +## Methods + +### GetHints + +GetHints returns speech recognition hints derived from loaded skill names. + +#### Signature + +```go +func (*ClaudeSkillsSkill) GetHints() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/skills/builtin/claude_skills.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/claude_skills.go) + +Line 728. + +*** + +### GetInstanceKey + +GetInstanceKey returns a unique key based on skills\_path for multi-instance support. + +#### Signature + +```go +func (*ClaudeSkillsSkill) GetInstanceKey() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/skills/builtin/claude_skills.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/claude_skills.go) + +Line 797. + +*** + +### GetParameterSchema + +GetParameterSchema returns the full parameter schema for the SKILL.md loader. + +#### Signature + +```go +func (*ClaudeSkillsSkill) GetParameterSchema() map[string]map[string]any +``` + +#### Returns + +`map[string]map[string]any` + +#### Source + +[`pkg/skills/builtin/claude_skills.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/claude_skills.go) + +Line 804. + +*** + +### GetPromptSections + +GetPromptSections returns one prompt section per loaded skill (excluding skipped ones). + +#### Signature + +```go +func (*ClaudeSkillsSkill) GetPromptSections() []map[string]any +``` + +#### Returns + +`[]map[string]any` + +#### Source + +[`pkg/skills/builtin/claude_skills.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/claude_skills.go) + +Line 744. + +*** + +### RegisterTools + +RegisterTools returns one ToolRegistration per discovered SKILL.md that is not flagged to skip. + +#### Signature + +```go +func (*ClaudeSkillsSkill) RegisterTools() []skills.ToolRegistration +``` + +#### Returns + +`[]skills.ToolRegistration` + +#### Source + +[`pkg/skills/builtin/claude_skills.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/claude_skills.go) + +Line 612. + +*** + +### RequiredEnvVars + +RequiredEnvVars returns nil — no env vars required (skills\_path is a param). + +#### Signature + +```go +func (*ClaudeSkillsSkill) RequiredEnvVars() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/skills/builtin/claude_skills.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/claude_skills.go) + +Line 118. + +*** + +### Setup + +Setup validates configuration and discovers SKILL.md files. + +#### Signature + +```go +func (*ClaudeSkillsSkill) Setup() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/skills/builtin/claude_skills.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/claude_skills.go) + +Line 121. + +*** + +### SupportsMultipleInstances + +SupportsMultipleInstances returns true — different skills\_path values create distinct instances. + +#### Signature + +```go +func (*ClaudeSkillsSkill) SupportsMultipleInstances() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/skills/builtin/claude_skills.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/claude_skills.go) + +Line 115. + +## Source + +[`pkg/skills/builtin/claude_skills.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/claude_skills.go) + +Line 82. diff --git a/fern/products/sdk-reference/go/agents/skills/builtin/builtin/custom-skills-skill/index.mdx b/fern/products/sdk-reference/go/agents/skills/builtin/builtin/custom-skills-skill/index.mdx new file mode 100644 index 0000000000..7f3074555e --- /dev/null +++ b/fern/products/sdk-reference/go/agents/skills/builtin/builtin/custom-skills-skill/index.mdx @@ -0,0 +1,153 @@ +--- +slug: "/reference/go/agents/skills/builtin/builtin/custom-skills-skill" +title: "CustomSkillsSkill" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/skills/builtin.CustomSkillsSkill" + parent: "github.com/signalwire/signalwire-go/pkg/skills/builtin" + module: "agents.skills.builtin.builtin" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/custom_skills.go" +--- +# `CustomSkillsSkill` + +CustomSkillsSkill is a meta-skill that registers user-defined tools. + +## Signature + +```go +type CustomSkillsSkill struct +``` + +## Properties + + + +## Methods + +### GetInstanceKey + +#### Signature + +```go +func (*CustomSkillsSkill) GetInstanceKey() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/skills/builtin/custom_skills.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/custom_skills.go) + +Line 28. + +*** + +### GetParameterSchema + +#### Signature + +```go +func (*CustomSkillsSkill) GetParameterSchema() map[string]map[string]any +``` + +#### Returns + +`map[string]map[string]any` + +#### Source + +[`pkg/skills/builtin/custom_skills.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/custom_skills.go) + +Line 134. + +*** + +### GetPromptSections + +#### Signature + +```go +func (*CustomSkillsSkill) GetPromptSections() []map[string]any +``` + +#### Returns + +`[]map[string]any` + +#### Source + +[`pkg/skills/builtin/custom_skills.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/custom_skills.go) + +Line 110. + +*** + +### RegisterTools + +#### Signature + +```go +func (*CustomSkillsSkill) RegisterTools() []skills.ToolRegistration +``` + +#### Returns + +`[]skills.ToolRegistration` + +#### Source + +[`pkg/skills/builtin/custom_skills.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/custom_skills.go) + +Line 60. + +*** + +### Setup + +#### Signature + +```go +func (*CustomSkillsSkill) Setup() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/skills/builtin/custom_skills.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/custom_skills.go) + +Line 33. + +*** + +### SupportsMultipleInstances + +#### Signature + +```go +func (*CustomSkillsSkill) SupportsMultipleInstances() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/skills/builtin/custom_skills.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/custom_skills.go) + +Line 26. + +## Source + +[`pkg/skills/builtin/custom_skills.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/custom_skills.go) + +Line 9. diff --git a/fern/products/sdk-reference/go/agents/skills/builtin/builtin/data-sphere-serverless-skill/index.mdx b/fern/products/sdk-reference/go/agents/skills/builtin/builtin/data-sphere-serverless-skill/index.mdx new file mode 100644 index 0000000000..e691bd59ef --- /dev/null +++ b/fern/products/sdk-reference/go/agents/skills/builtin/builtin/data-sphere-serverless-skill/index.mdx @@ -0,0 +1,197 @@ +--- +slug: "/reference/go/agents/skills/builtin/builtin/data-sphere-serverless-skill" +title: "DataSphereServerlessSkill" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/skills/builtin.DataSphereServerlessSkill" + parent: "github.com/signalwire/signalwire-go/pkg/skills/builtin" + module: "agents.skills.builtin.builtin" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datasphere_serverless.go" +--- +# `DataSphereServerlessSkill` + +DataSphereServerlessSkill provides DataSphere search using DataMap (serverless execution). + +## Signature + +```go +type DataSphereServerlessSkill struct +``` + +## Properties + + + +## Methods + +### GetGlobalData + +GetGlobalData returns global data for agent context. + +#### Signature + +```go +func (*DataSphereServerlessSkill) GetGlobalData() map[string]any +``` + +#### Returns + +`map[string]any` + +#### Source + +[`pkg/skills/builtin/datasphere_serverless.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datasphere_serverless.go) + +Line 176. + +*** + +### GetInstanceKey + +#### Signature + +```go +func (*DataSphereServerlessSkill) GetInstanceKey() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/skills/builtin/datasphere_serverless.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datasphere_serverless.go) + +Line 58. + +*** + +### GetParameterSchema + +#### Signature + +```go +func (*DataSphereServerlessSkill) GetParameterSchema() map[string]map[string]any +``` + +#### Returns + +`map[string]map[string]any` + +#### Source + +[`pkg/skills/builtin/datasphere_serverless.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datasphere_serverless.go) + +Line 200. + +*** + +### GetPromptSections + +#### Signature + +```go +func (*DataSphereServerlessSkill) GetPromptSections() []map[string]any +``` + +#### Returns + +`[]map[string]any` + +#### Source + +[`pkg/skills/builtin/datasphere_serverless.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datasphere_serverless.go) + +Line 184. + +*** + +### RegisterTools + +RegisterTools returns DataMap-style tool registration for serverless execution. The actual tool is registered as a DataMap function that runs on SignalWire servers. + +#### Signature + +```go +func (*DataSphereServerlessSkill) RegisterTools() []skills.ToolRegistration +``` + +#### Returns + +`[]skills.ToolRegistration` + +#### Source + +[`pkg/skills/builtin/datasphere_serverless.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datasphere_serverless.go) + +Line 100. + +*** + +### RequiredEnvVars + +#### Signature + +```go +func (*DataSphereServerlessSkill) RequiredEnvVars() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/skills/builtin/datasphere_serverless.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datasphere_serverless.go) + +Line 44. + +*** + +### Setup + +#### Signature + +```go +func (*DataSphereServerlessSkill) Setup() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/skills/builtin/datasphere_serverless.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datasphere_serverless.go) + +Line 63. + +*** + +### SupportsMultipleInstances + +#### Signature + +```go +func (*DataSphereServerlessSkill) SupportsMultipleInstances() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/skills/builtin/datasphere_serverless.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datasphere_serverless.go) + +Line 56. + +## Source + +[`pkg/skills/builtin/datasphere_serverless.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datasphere_serverless.go) + +Line 14. diff --git a/fern/products/sdk-reference/go/agents/skills/builtin/builtin/data-sphere-skill/index.mdx b/fern/products/sdk-reference/go/agents/skills/builtin/builtin/data-sphere-skill/index.mdx new file mode 100644 index 0000000000..2e5bb9875f --- /dev/null +++ b/fern/products/sdk-reference/go/agents/skills/builtin/builtin/data-sphere-skill/index.mdx @@ -0,0 +1,193 @@ +--- +slug: "/reference/go/agents/skills/builtin/builtin/data-sphere-skill" +title: "DataSphereSkill" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/skills/builtin.DataSphereSkill" + parent: "github.com/signalwire/signalwire-go/pkg/skills/builtin" + module: "agents.skills.builtin.builtin" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datasphere.go" +--- +# `DataSphereSkill` + +DataSphereSkill searches knowledge using SignalWire DataSphere RAG stack. + +## Signature + +```go +type DataSphereSkill struct +``` + +## Properties + + + +## Methods + +### GetGlobalData + +#### Signature + +```go +func (*DataSphereSkill) GetGlobalData() map[string]any +``` + +#### Returns + +`map[string]any` + +#### Source + +[`pkg/skills/builtin/datasphere.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datasphere.go) + +Line 221. + +*** + +### GetInstanceKey + +#### Signature + +```go +func (*DataSphereSkill) GetInstanceKey() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/skills/builtin/datasphere.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datasphere.go) + +Line 60. + +*** + +### GetParameterSchema + +#### Signature + +```go +func (*DataSphereSkill) GetParameterSchema() map[string]map[string]any +``` + +#### Returns + +`map[string]map[string]any` + +#### Source + +[`pkg/skills/builtin/datasphere.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datasphere.go) + +Line 244. + +*** + +### GetPromptSections + +#### Signature + +```go +func (*DataSphereSkill) GetPromptSections() []map[string]any +``` + +#### Returns + +`[]map[string]any` + +#### Source + +[`pkg/skills/builtin/datasphere.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datasphere.go) + +Line 229. + +*** + +### RegisterTools + +#### Signature + +```go +func (*DataSphereSkill) RegisterTools() []skills.ToolRegistration +``` + +#### Returns + +`[]skills.ToolRegistration` + +#### Source + +[`pkg/skills/builtin/datasphere.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datasphere.go) + +Line 124. + +*** + +### RequiredEnvVars + +#### Signature + +```go +func (*DataSphereSkill) RequiredEnvVars() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/skills/builtin/datasphere.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datasphere.go) + +Line 46. + +*** + +### Setup + +#### Signature + +```go +func (*DataSphereSkill) Setup() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/skills/builtin/datasphere.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datasphere.go) + +Line 65. + +*** + +### SupportsMultipleInstances + +#### Signature + +```go +func (*DataSphereSkill) SupportsMultipleInstances() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/skills/builtin/datasphere.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datasphere.go) + +Line 58. + +## Source + +[`pkg/skills/builtin/datasphere.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datasphere.go) + +Line 16. diff --git a/fern/products/sdk-reference/go/agents/skills/builtin/builtin/date-time-skill/index.mdx b/fern/products/sdk-reference/go/agents/skills/builtin/builtin/date-time-skill/index.mdx new file mode 100644 index 0000000000..7205ecb916 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/skills/builtin/builtin/date-time-skill/index.mdx @@ -0,0 +1,113 @@ +--- +slug: "/reference/go/agents/skills/builtin/builtin/date-time-skill" +title: "DateTimeSkill" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/skills/builtin.DateTimeSkill" + parent: "github.com/signalwire/signalwire-go/pkg/skills/builtin" + module: "agents.skills.builtin.builtin" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datetime.go" +--- +# `DateTimeSkill` + +DateTimeSkill provides current date and time information. + +## Signature + +```go +type DateTimeSkill struct +``` + +## Properties + + + +## Methods + +### GetHints + +#### Signature + +```go +func (*DateTimeSkill) GetHints() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/skills/builtin/datetime.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datetime.go) + +Line 128. + +*** + +### GetPromptSections + +#### Signature + +```go +func (*DateTimeSkill) GetPromptSections() []map[string]any +``` + +#### Returns + +`[]map[string]any` + +#### Source + +[`pkg/skills/builtin/datetime.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datetime.go) + +Line 132. + +*** + +### RegisterTools + +#### Signature + +```go +func (*DateTimeSkill) RegisterTools() []skills.ToolRegistration +``` + +#### Returns + +`[]skills.ToolRegistration` + +#### Source + +[`pkg/skills/builtin/datetime.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datetime.go) + +Line 35. + +*** + +### Setup + +#### Signature + +```go +func (*DateTimeSkill) Setup() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/skills/builtin/datetime.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datetime.go) + +Line 30. + +## Source + +[`pkg/skills/builtin/datetime.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datetime.go) + +Line 12. diff --git a/fern/products/sdk-reference/go/agents/skills/builtin/builtin/google-maps-skill/index.mdx b/fern/products/sdk-reference/go/agents/skills/builtin/builtin/google-maps-skill/index.mdx new file mode 100644 index 0000000000..43f8edbcc8 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/skills/builtin/builtin/google-maps-skill/index.mdx @@ -0,0 +1,153 @@ +--- +slug: "/reference/go/agents/skills/builtin/builtin/google-maps-skill" +title: "GoogleMapsSkill" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/skills/builtin.GoogleMapsSkill" + parent: "github.com/signalwire/signalwire-go/pkg/skills/builtin" + module: "agents.skills.builtin.builtin" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/google_maps.go" +--- +# `GoogleMapsSkill` + +GoogleMapsSkill validates addresses and computes routes using Google Maps. + +## Signature + +```go +type GoogleMapsSkill struct +``` + +## Properties + + + +## Methods + +### GetHints + +#### Signature + +```go +func (*GoogleMapsSkill) GetHints() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/skills/builtin/google_maps.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/google_maps.go) + +Line 293. + +*** + +### GetParameterSchema + +#### Signature + +```go +func (*GoogleMapsSkill) GetParameterSchema() map[string]map[string]any +``` + +#### Returns + +`map[string]map[string]any` + +#### Source + +[`pkg/skills/builtin/google_maps.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/google_maps.go) + +Line 312. + +*** + +### GetPromptSections + +#### Signature + +```go +func (*GoogleMapsSkill) GetPromptSections() []map[string]any +``` + +#### Returns + +`[]map[string]any` + +#### Source + +[`pkg/skills/builtin/google_maps.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/google_maps.go) + +Line 297. + +*** + +### RegisterTools + +#### Signature + +```go +func (*GoogleMapsSkill) RegisterTools() []skills.ToolRegistration +``` + +#### Returns + +`[]skills.ToolRegistration` + +#### Source + +[`pkg/skills/builtin/google_maps.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/google_maps.go) + +Line 53. + +*** + +### RequiredEnvVars + +#### Signature + +```go +func (*GoogleMapsSkill) RequiredEnvVars() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/skills/builtin/google_maps.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/google_maps.go) + +Line 37. + +*** + +### Setup + +#### Signature + +```go +func (*GoogleMapsSkill) Setup() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/skills/builtin/google_maps.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/google_maps.go) + +Line 46. + +## Source + +[`pkg/skills/builtin/google_maps.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/google_maps.go) + +Line 18. diff --git a/fern/products/sdk-reference/go/agents/skills/builtin/builtin/index.mdx b/fern/products/sdk-reference/go/agents/skills/builtin/builtin/index.mdx new file mode 100644 index 0000000000..4c8ddc89ac --- /dev/null +++ b/fern/products/sdk-reference/go/agents/skills/builtin/builtin/index.mdx @@ -0,0 +1,591 @@ +--- +slug: "/reference/go/agents/skills/builtin/builtin" +title: "builtin" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "module" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/skills/builtin" + parent: "agents.skills.builtin" + module: "agents.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/api_ninjas_trivia.go" +--- +# `builtin` + +## Signature + +```go +package builtin +``` + +## Constants + + + \_digitStartRE checks if a string starts with a digit. + + + + \_hyphenSpaceRE matches hyphens and spaces for sanitization. + + + + \_sanitizeRE matches characters invalid in SWAIG tool names. + + + + \_shellInjectionRE matches !`command` patterns in skill bodies. + + + + \_unsupportedFields maps SKILL.md frontmatter field names to warning message templates. + + +## Classes + + + + APINinjasTriviaSkill gets trivia questions from API Ninjas. + + + + ClaudeSkillsSkill loads Claude-style SKILL.md files as SignalWire agent tools. + + + + CustomSkillsSkill is a meta-skill that registers user-defined tools. + + + + DataSphereServerlessSkill provides DataSphere search using DataMap (serverless execution). + + + + DataSphereSkill searches knowledge using SignalWire DataSphere RAG stack. + + + + DateTimeSkill provides current date and time information. + + + + GoogleMapsSkill validates addresses and computes routes using Google Maps. + + + + InfoGathererSkill guides an AI agent through a series of questions, collecting and storing answers in global\_data. + + + + JokeSkill tells random jokes from a built-in list. + + + + MathSkill provides basic mathematical calculation capabilities. + + + + MCPGatewaySkill connects to MCP gateway servers and registers their tools. + + + + NativeVectorSearchSkill searches knowledge using a remote search server. + + + + PlayBackgroundFileSkill plays audio files in the background. + + + + SpiderSkill fetches and extracts text content from URLs. + + + + SWMLTransferSkill transfers calls between agents using DataMap pattern matching. + + + + WeatherAPISkill gets current weather from WeatherAPI.com. + + + + WebSearchSkill searches the web using Google Custom Search API. + + + + WikipediaSearchSkill searches Wikipedia for information. + + + +## Functions + +### NewAPINinjasTrivia + +NewAPINinjasTrivia creates a new APINinjasTriviaSkill. + +#### Signature + +```go +func NewAPINinjasTrivia(params map[string]any) skills.SkillBase +``` + +#### Parameters + + + +#### Returns + +`skills.SkillBase` + +#### Source + +[`pkg/skills/builtin/api_ninjas_trivia.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/api_ninjas_trivia.go) + +Line 42. + +*** + +### NewClaudeSkills + +NewClaudeSkills creates a new ClaudeSkillsSkill. + +#### Signature + +```go +func NewClaudeSkills(params map[string]any) skills.SkillBase +``` + +#### Parameters + + + +#### Returns + +`skills.SkillBase` + +#### Source + +[`pkg/skills/builtin/claude_skills.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/claude_skills.go) + +Line 103. + +*** + +### NewCustomSkills + +NewCustomSkills creates a new CustomSkillsSkill. + +#### Signature + +```go +func NewCustomSkills(params map[string]any) skills.SkillBase +``` + +#### Parameters + + + +#### Returns + +`skills.SkillBase` + +#### Source + +[`pkg/skills/builtin/custom_skills.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/custom_skills.go) + +Line 15. + +*** + +### NewDataSphere + +NewDataSphere creates a new DataSphereSkill. + +#### Signature + +```go +func NewDataSphere(params map[string]any) skills.SkillBase +``` + +#### Parameters + + + +#### Returns + +`skills.SkillBase` + +#### Source + +[`pkg/skills/builtin/datasphere.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datasphere.go) + +Line 34. + +*** + +### NewDataSphereServerless + +NewDataSphereServerless creates a new DataSphereServerlessSkill. + +#### Signature + +```go +func NewDataSphereServerless(params map[string]any) skills.SkillBase +``` + +#### Parameters + + + +#### Returns + +`skills.SkillBase` + +#### Source + +[`pkg/skills/builtin/datasphere_serverless.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datasphere_serverless.go) + +Line 33. + +*** + +### NewDateTime + +NewDateTime creates a new DateTimeSkill. + +#### Signature + +```go +func NewDateTime(params map[string]any) skills.SkillBase +``` + +#### Parameters + + + +#### Returns + +`skills.SkillBase` + +#### Source + +[`pkg/skills/builtin/datetime.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datetime.go) + +Line 18. + +*** + +### NewGoogleMaps + +NewGoogleMaps creates a new GoogleMapsSkill. + +#### Signature + +```go +func NewGoogleMaps(params map[string]any) skills.SkillBase +``` + +#### Parameters + + + +#### Returns + +`skills.SkillBase` + +#### Source + +[`pkg/skills/builtin/google_maps.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/google_maps.go) + +Line 26. + +*** + +### NewInfoGatherer + +NewInfoGatherer creates a new InfoGathererSkill. + +#### Signature + +```go +func NewInfoGatherer(params map[string]any) skills.SkillBase +``` + +#### Parameters + + + +#### Returns + +`skills.SkillBase` + +#### Source + +[`pkg/skills/builtin/info_gatherer.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/info_gatherer.go) + +Line 22. + +*** + +### NewJoke + +NewJoke creates a new JokeSkill. + +#### Signature + +```go +func NewJoke(params map[string]any) skills.SkillBase +``` + +#### Parameters + + + +#### Returns + +`skills.SkillBase` + +#### Source + +[`pkg/skills/builtin/joke.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/joke.go) + +Line 36. + +*** + +### NewMath + +NewMath creates a new MathSkill. + +#### Signature + +```go +func NewMath(params map[string]any) skills.SkillBase +``` + +#### Parameters + + + +#### Returns + +`skills.SkillBase` + +#### Source + +[`pkg/skills/builtin/math.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/math.go) + +Line 21. + +*** + +### NewMCPGateway + +NewMCPGateway creates a new MCPGatewaySkill. + +#### Signature + +```go +func NewMCPGateway(params map[string]any) skills.SkillBase +``` + +#### Parameters + + + +#### Returns + +`skills.SkillBase` + +#### Source + +[`pkg/skills/builtin/mcp_gateway.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/mcp_gateway.go) + +Line 34. + +*** + +### NewNativeVectorSearch + +NewNativeVectorSearch creates a new NativeVectorSearchSkill. + +#### Signature + +```go +func NewNativeVectorSearch(params map[string]any) skills.SkillBase +``` + +#### Parameters + + + +#### Returns + +`skills.SkillBase` + +#### Source + +[`pkg/skills/builtin/native_vector_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/native_vector_search.go) + +Line 38. + +*** + +### NewPlayBackgroundFile + +NewPlayBackgroundFile creates a new PlayBackgroundFileSkill. + +#### Signature + +```go +func NewPlayBackgroundFile(params map[string]any) skills.SkillBase +``` + +#### Parameters + + + +#### Returns + +`skills.SkillBase` + +#### Source + +[`pkg/skills/builtin/play_background_file.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/play_background_file.go) + +Line 22. + +*** + +### NewSpider + +NewSpider creates a new SpiderSkill. + +#### Signature + +```go +func NewSpider(params map[string]any) skills.SkillBase +``` + +#### Parameters + + + +#### Returns + +`skills.SkillBase` + +#### Source + +[`pkg/skills/builtin/spider.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/spider.go) + +Line 72. + +*** + +### NewSWMLTransfer + +NewSWMLTransfer creates a new SWMLTransferSkill. + +#### Signature + +```go +func NewSWMLTransfer(params map[string]any) skills.SkillBase +``` + +#### Parameters + + + +#### Returns + +`skills.SkillBase` + +#### Source + +[`pkg/skills/builtin/swml_transfer.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/swml_transfer.go) + +Line 25. + +*** + +### NewWeatherAPI + +NewWeatherAPI creates a new WeatherAPISkill. + +#### Signature + +```go +func NewWeatherAPI(params map[string]any) skills.SkillBase +``` + +#### Parameters + + + +#### Returns + +`skills.SkillBase` + +#### Source + +[`pkg/skills/builtin/weather_api.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/weather_api.go) + +Line 25. + +*** + +### NewWebSearch + +NewWebSearch creates a new WebSearchSkill. + +#### Signature + +```go +func NewWebSearch(params map[string]any) skills.SkillBase +``` + +#### Parameters + + + +#### Returns + +`skills.SkillBase` + +#### Source + +[`pkg/skills/builtin/web_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/web_search.go) + +Line 60. + +*** + +### NewWikipediaSearch + +NewWikipediaSearch creates a new WikipediaSearchSkill. + +#### Signature + +```go +func NewWikipediaSearch(params map[string]any) skills.SkillBase +``` + +#### Parameters + + + +#### Returns + +`skills.SkillBase` + +#### Source + +[`pkg/skills/builtin/wikipedia_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/wikipedia_search.go) + +Line 24. + +## Source + +[`pkg/skills/builtin/api_ninjas_trivia.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/api_ninjas_trivia.go) diff --git a/fern/products/sdk-reference/go/agents/skills/builtin/builtin/info-gatherer-skill/index.mdx b/fern/products/sdk-reference/go/agents/skills/builtin/builtin/info-gatherer-skill/index.mdx new file mode 100644 index 0000000000..218c1d6ee5 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/skills/builtin/builtin/info-gatherer-skill/index.mdx @@ -0,0 +1,173 @@ +--- +slug: "/reference/go/agents/skills/builtin/builtin/info-gatherer-skill" +title: "InfoGathererSkill" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/skills/builtin.InfoGathererSkill" + parent: "github.com/signalwire/signalwire-go/pkg/skills/builtin" + module: "agents.skills.builtin.builtin" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/info_gatherer.go" +--- +# `InfoGathererSkill` + +InfoGathererSkill guides an AI agent through a series of questions, collecting and storing answers in global\_data. + +## Signature + +```go +type InfoGathererSkill struct +``` + +## Properties + + + +## Methods + +### GetGlobalData + +#### Signature + +```go +func (*InfoGathererSkill) GetGlobalData() map[string]any +``` + +#### Returns + +`map[string]any` + +#### Source + +[`pkg/skills/builtin/info_gatherer.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/info_gatherer.go) + +Line 249. + +*** + +### GetInstanceKey + +#### Signature + +```go +func (*InfoGathererSkill) GetInstanceKey() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/skills/builtin/info_gatherer.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/info_gatherer.go) + +Line 35. + +*** + +### GetParameterSchema + +#### Signature + +```go +func (*InfoGathererSkill) GetParameterSchema() map[string]map[string]any +``` + +#### Returns + +`map[string]map[string]any` + +#### Source + +[`pkg/skills/builtin/info_gatherer.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/info_gatherer.go) + +Line 282. + +*** + +### GetPromptSections + +#### Signature + +```go +func (*InfoGathererSkill) GetPromptSections() []map[string]any +``` + +#### Returns + +`[]map[string]any` + +#### Source + +[`pkg/skills/builtin/info_gatherer.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/info_gatherer.go) + +Line 259. + +*** + +### RegisterTools + +#### Signature + +```go +func (*InfoGathererSkill) RegisterTools() []skills.ToolRegistration +``` + +#### Returns + +`[]skills.ToolRegistration` + +#### Source + +[`pkg/skills/builtin/info_gatherer.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/info_gatherer.go) + +Line 84. + +*** + +### Setup + +#### Signature + +```go +func (*InfoGathererSkill) Setup() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/skills/builtin/info_gatherer.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/info_gatherer.go) + +Line 42. + +*** + +### SupportsMultipleInstances + +#### Signature + +```go +func (*InfoGathererSkill) SupportsMultipleInstances() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/skills/builtin/info_gatherer.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/info_gatherer.go) + +Line 33. + +## Source + +[`pkg/skills/builtin/info_gatherer.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/info_gatherer.go) + +Line 12. diff --git a/fern/products/sdk-reference/go/agents/skills/builtin/builtin/joke-skill/index.mdx b/fern/products/sdk-reference/go/agents/skills/builtin/builtin/joke-skill/index.mdx new file mode 100644 index 0000000000..63869cc14b --- /dev/null +++ b/fern/products/sdk-reference/go/agents/skills/builtin/builtin/joke-skill/index.mdx @@ -0,0 +1,133 @@ +--- +slug: "/reference/go/agents/skills/builtin/builtin/joke-skill" +title: "JokeSkill" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/skills/builtin.JokeSkill" + parent: "github.com/signalwire/signalwire-go/pkg/skills/builtin" + module: "agents.skills.builtin.builtin" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/joke.go" +--- +# `JokeSkill` + +JokeSkill tells random jokes from a built-in list. + +## Signature + +```go +type JokeSkill struct +``` + +## Properties + + + +## Methods + +### GetGlobalData + +#### Signature + +```go +func (*JokeSkill) GetGlobalData() map[string]any +``` + +#### Returns + +`map[string]any` + +#### Source + +[`pkg/skills/builtin/joke.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/joke.go) + +Line 79. + +*** + +### GetHints + +#### Signature + +```go +func (*JokeSkill) GetHints() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/skills/builtin/joke.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/joke.go) + +Line 85. + +*** + +### GetPromptSections + +#### Signature + +```go +func (*JokeSkill) GetPromptSections() []map[string]any +``` + +#### Returns + +`[]map[string]any` + +#### Source + +[`pkg/skills/builtin/joke.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/joke.go) + +Line 89. + +*** + +### RegisterTools + +#### Signature + +```go +func (*JokeSkill) RegisterTools() []skills.ToolRegistration +``` + +#### Returns + +`[]skills.ToolRegistration` + +#### Source + +[`pkg/skills/builtin/joke.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/joke.go) + +Line 53. + +*** + +### Setup + +#### Signature + +```go +func (*JokeSkill) Setup() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/skills/builtin/joke.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/joke.go) + +Line 47. + +## Source + +[`pkg/skills/builtin/joke.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/joke.go) + +Line 29. diff --git a/fern/products/sdk-reference/go/agents/skills/builtin/builtin/math-skill/index.mdx b/fern/products/sdk-reference/go/agents/skills/builtin/builtin/math-skill/index.mdx new file mode 100644 index 0000000000..3002b116d3 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/skills/builtin/builtin/math-skill/index.mdx @@ -0,0 +1,93 @@ +--- +slug: "/reference/go/agents/skills/builtin/builtin/math-skill" +title: "MathSkill" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/skills/builtin.MathSkill" + parent: "github.com/signalwire/signalwire-go/pkg/skills/builtin" + module: "agents.skills.builtin.builtin" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/math.go" +--- +# `MathSkill` + +MathSkill provides basic mathematical calculation capabilities. + +## Signature + +```go +type MathSkill struct +``` + +## Properties + + + +## Methods + +### GetPromptSections + +#### Signature + +```go +func (*MathSkill) GetPromptSections() []map[string]any +``` + +#### Returns + +`[]map[string]any` + +#### Source + +[`pkg/skills/builtin/math.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/math.go) + +Line 143. + +*** + +### RegisterTools + +#### Signature + +```go +func (*MathSkill) RegisterTools() []skills.ToolRegistration +``` + +#### Returns + +`[]skills.ToolRegistration` + +#### Source + +[`pkg/skills/builtin/math.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/math.go) + +Line 34. + +*** + +### Setup + +#### Signature + +```go +func (*MathSkill) Setup() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/skills/builtin/math.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/math.go) + +Line 32. + +## Source + +[`pkg/skills/builtin/math.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/math.go) + +Line 16. diff --git a/fern/products/sdk-reference/go/agents/skills/builtin/builtin/mcp-gateway-skill/index.mdx b/fern/products/sdk-reference/go/agents/skills/builtin/builtin/mcp-gateway-skill/index.mdx new file mode 100644 index 0000000000..0239596648 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/skills/builtin/builtin/mcp-gateway-skill/index.mdx @@ -0,0 +1,155 @@ +--- +slug: "/reference/go/agents/skills/builtin/builtin/mcp-gateway-skill" +title: "MCPGatewaySkill" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/skills/builtin.MCPGatewaySkill" + parent: "github.com/signalwire/signalwire-go/pkg/skills/builtin" + module: "agents.skills.builtin.builtin" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/mcp_gateway.go" +--- +# `MCPGatewaySkill` + +MCPGatewaySkill connects to MCP gateway servers and registers their tools. + +## Signature + +```go +type MCPGatewaySkill struct +``` + +## Properties + + + +## Methods + +### GetGlobalData + +GetGlobalData returns MCP gateway state for DataMap variable expansion. Mirrors Python get\_global\_data: mcp\_gateway\_url, mcp\_session\_id, mcp\_services. + +#### Signature + +```go +func (*MCPGatewaySkill) GetGlobalData() map[string]any +``` + +#### Returns + +`map[string]any` + +#### Source + +[`pkg/skills/builtin/mcp_gateway.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/mcp_gateway.go) + +Line 353. + +*** + +### GetHints + +#### Signature + +```go +func (*MCPGatewaySkill) GetHints() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/skills/builtin/mcp_gateway.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/mcp_gateway.go) + +Line 367. + +*** + +### GetParameterSchema + +#### Signature + +```go +func (*MCPGatewaySkill) GetParameterSchema() map[string]map[string]any +``` + +#### Returns + +`map[string]map[string]any` + +#### Source + +[`pkg/skills/builtin/mcp_gateway.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/mcp_gateway.go) + +Line 398. + +*** + +### GetPromptSections + +#### Signature + +```go +func (*MCPGatewaySkill) GetPromptSections() []map[string]any +``` + +#### Returns + +`[]map[string]any` + +#### Source + +[`pkg/skills/builtin/mcp_gateway.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/mcp_gateway.go) + +Line 377. + +*** + +### RegisterTools + +#### Signature + +```go +func (*MCPGatewaySkill) RegisterTools() []skills.ToolRegistration +``` + +#### Returns + +`[]skills.ToolRegistration` + +#### Source + +[`pkg/skills/builtin/mcp_gateway.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/mcp_gateway.go) + +Line 110. + +*** + +### Setup + +#### Signature + +```go +func (*MCPGatewaySkill) Setup() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/skills/builtin/mcp_gateway.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/mcp_gateway.go) + +Line 45. + +## Source + +[`pkg/skills/builtin/mcp_gateway.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/mcp_gateway.go) + +Line 17. diff --git a/fern/products/sdk-reference/go/agents/skills/builtin/builtin/native-vector-search-skill/index.mdx b/fern/products/sdk-reference/go/agents/skills/builtin/builtin/native-vector-search-skill/index.mdx new file mode 100644 index 0000000000..d4df106300 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/skills/builtin/builtin/native-vector-search-skill/index.mdx @@ -0,0 +1,193 @@ +--- +slug: "/reference/go/agents/skills/builtin/builtin/native-vector-search-skill" +title: "NativeVectorSearchSkill" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/skills/builtin.NativeVectorSearchSkill" + parent: "github.com/signalwire/signalwire-go/pkg/skills/builtin" + module: "agents.skills.builtin.builtin" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/native_vector_search.go" +--- +# `NativeVectorSearchSkill` + +NativeVectorSearchSkill searches knowledge using a remote search server. + +## Signature + +```go +type NativeVectorSearchSkill struct +``` + +## Properties + + + +## Methods + +### GetGlobalData + +#### Signature + +```go +func (*NativeVectorSearchSkill) GetGlobalData() map[string]any +``` + +#### Returns + +`map[string]any` + +#### Source + +[`pkg/skills/builtin/native_vector_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/native_vector_search.go) + +Line 380. + +*** + +### GetHints + +#### Signature + +```go +func (*NativeVectorSearchSkill) GetHints() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/skills/builtin/native_vector_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/native_vector_search.go) + +Line 350. + +*** + +### GetInstanceKey + +#### Signature + +```go +func (*NativeVectorSearchSkill) GetInstanceKey() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/skills/builtin/native_vector_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/native_vector_search.go) + +Line 52. + +*** + +### GetParameterSchema + +#### Signature + +```go +func (*NativeVectorSearchSkill) GetParameterSchema() map[string]map[string]any +``` + +#### Returns + +`map[string]map[string]any` + +#### Source + +[`pkg/skills/builtin/native_vector_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/native_vector_search.go) + +Line 386. + +*** + +### GetPromptSections + +#### Signature + +```go +func (*NativeVectorSearchSkill) GetPromptSections() []map[string]any +``` + +#### Returns + +`[]map[string]any` + +#### Source + +[`pkg/skills/builtin/native_vector_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/native_vector_search.go) + +Line 362. + +*** + +### RegisterTools + +#### Signature + +```go +func (*NativeVectorSearchSkill) RegisterTools() []skills.ToolRegistration +``` + +#### Returns + +`[]skills.ToolRegistration` + +#### Source + +[`pkg/skills/builtin/native_vector_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/native_vector_search.go) + +Line 200. + +*** + +### Setup + +#### Signature + +```go +func (*NativeVectorSearchSkill) Setup() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/skills/builtin/native_vector_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/native_vector_search.go) + +Line 116. + +*** + +### SupportsMultipleInstances + +#### Signature + +```go +func (*NativeVectorSearchSkill) SupportsMultipleInstances() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/skills/builtin/native_vector_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/native_vector_search.go) + +Line 50. + +## Source + +[`pkg/skills/builtin/native_vector_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/native_vector_search.go) + +Line 20. diff --git a/fern/products/sdk-reference/go/agents/skills/builtin/builtin/play-background-file-skill/index.mdx b/fern/products/sdk-reference/go/agents/skills/builtin/builtin/play-background-file-skill/index.mdx new file mode 100644 index 0000000000..d8abb01b69 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/skills/builtin/builtin/play-background-file-skill/index.mdx @@ -0,0 +1,133 @@ +--- +slug: "/reference/go/agents/skills/builtin/builtin/play-background-file-skill" +title: "PlayBackgroundFileSkill" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/skills/builtin.PlayBackgroundFileSkill" + parent: "github.com/signalwire/signalwire-go/pkg/skills/builtin" + module: "agents.skills.builtin.builtin" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/play_background_file.go" +--- +# `PlayBackgroundFileSkill` + +PlayBackgroundFileSkill plays audio files in the background. + +## Signature + +```go +type PlayBackgroundFileSkill struct +``` + +## Properties + + + +## Methods + +### GetInstanceKey + +#### Signature + +```go +func (*PlayBackgroundFileSkill) GetInstanceKey() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/skills/builtin/play_background_file.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/play_background_file.go) + +Line 35. + +*** + +### GetParameterSchema + +#### Signature + +```go +func (*PlayBackgroundFileSkill) GetParameterSchema() map[string]map[string]any +``` + +#### Returns + +`map[string]map[string]any` + +#### Source + +[`pkg/skills/builtin/play_background_file.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/play_background_file.go) + +Line 158. + +*** + +### RegisterTools + +#### Signature + +```go +func (*PlayBackgroundFileSkill) RegisterTools() []skills.ToolRegistration +``` + +#### Returns + +`[]skills.ToolRegistration` + +#### Source + +[`pkg/skills/builtin/play_background_file.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/play_background_file.go) + +Line 84. + +*** + +### Setup + +#### Signature + +```go +func (*PlayBackgroundFileSkill) Setup() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/skills/builtin/play_background_file.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/play_background_file.go) + +Line 40. + +*** + +### SupportsMultipleInstances + +#### Signature + +```go +func (*PlayBackgroundFileSkill) SupportsMultipleInstances() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/skills/builtin/play_background_file.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/play_background_file.go) + +Line 33. + +## Source + +[`pkg/skills/builtin/play_background_file.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/play_background_file.go) + +Line 15. diff --git a/fern/products/sdk-reference/go/agents/skills/builtin/builtin/spider-skill/index.mdx b/fern/products/sdk-reference/go/agents/skills/builtin/builtin/spider-skill/index.mdx new file mode 100644 index 0000000000..d72de4a51c --- /dev/null +++ b/fern/products/sdk-reference/go/agents/skills/builtin/builtin/spider-skill/index.mdx @@ -0,0 +1,173 @@ +--- +slug: "/reference/go/agents/skills/builtin/builtin/spider-skill" +title: "SpiderSkill" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/skills/builtin.SpiderSkill" + parent: "github.com/signalwire/signalwire-go/pkg/skills/builtin" + module: "agents.skills.builtin.builtin" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/spider.go" +--- +# `SpiderSkill` + +SpiderSkill fetches and extracts text content from URLs. + +## Signature + +```go +type SpiderSkill struct +``` + +## Properties + + + +## Methods + +### Cleanup + +Cleanup releases resources when the skill is unloaded. + +#### Signature + +```go +func (*SpiderSkill) Cleanup() +``` + +#### Source + +[`pkg/skills/builtin/spider.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/spider.go) + +Line 720. + +*** + +### GetHints + +#### Signature + +```go +func (*SpiderSkill) GetHints() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/skills/builtin/spider.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/spider.go) + +Line 715. + +*** + +### GetInstanceKey + +#### Signature + +```go +func (*SpiderSkill) GetInstanceKey() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/skills/builtin/spider.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/spider.go) + +Line 85. + +*** + +### GetParameterSchema + +GetParameterSchema returns the full parameter schema extending the base schema. + +#### Signature + +```go +func (*SpiderSkill) GetParameterSchema() map[string]map[string]any +``` + +#### Returns + +`map[string]map[string]any` + +#### Source + +[`pkg/skills/builtin/spider.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/spider.go) + +Line 149. + +*** + +### RegisterTools + +#### Signature + +```go +func (*SpiderSkill) RegisterTools() []skills.ToolRegistration +``` + +#### Returns + +`[]skills.ToolRegistration` + +#### Source + +[`pkg/skills/builtin/spider.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/spider.go) + +Line 253. + +*** + +### Setup + +#### Signature + +```go +func (*SpiderSkill) Setup() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/skills/builtin/spider.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/spider.go) + +Line 90. + +*** + +### SupportsMultipleInstances + +#### Signature + +```go +func (*SpiderSkill) SupportsMultipleInstances() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/skills/builtin/spider.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/spider.go) + +Line 83. + +## Source + +[`pkg/skills/builtin/spider.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/spider.go) + +Line 47. diff --git a/fern/products/sdk-reference/go/agents/skills/builtin/builtin/swml-transfer-skill/index.mdx b/fern/products/sdk-reference/go/agents/skills/builtin/builtin/swml-transfer-skill/index.mdx new file mode 100644 index 0000000000..d3602a61a2 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/skills/builtin/builtin/swml-transfer-skill/index.mdx @@ -0,0 +1,173 @@ +--- +slug: "/reference/go/agents/skills/builtin/builtin/swml-transfer-skill" +title: "SWMLTransferSkill" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/skills/builtin.SWMLTransferSkill" + parent: "github.com/signalwire/signalwire-go/pkg/skills/builtin" + module: "agents.skills.builtin.builtin" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/swml_transfer.go" +--- +# `SWMLTransferSkill` + +SWMLTransferSkill transfers calls between agents using DataMap pattern matching. + +## Signature + +```go +type SWMLTransferSkill struct +``` + +## Properties + + + +## Methods + +### GetHints + +#### Signature + +```go +func (*SWMLTransferSkill) GetHints() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/skills/builtin/swml_transfer.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/swml_transfer.go) + +Line 221. + +*** + +### GetInstanceKey + +#### Signature + +```go +func (*SWMLTransferSkill) GetInstanceKey() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/skills/builtin/swml_transfer.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/swml_transfer.go) + +Line 38. + +*** + +### GetParameterSchema + +#### Signature + +```go +func (*SWMLTransferSkill) GetParameterSchema() map[string]map[string]any +``` + +#### Returns + +`map[string]map[string]any` + +#### Source + +[`pkg/skills/builtin/swml_transfer.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/swml_transfer.go) + +Line 305. + +*** + +### GetPromptSections + +#### Signature + +```go +func (*SWMLTransferSkill) GetPromptSections() []map[string]any +``` + +#### Returns + +`[]map[string]any` + +#### Source + +[`pkg/skills/builtin/swml_transfer.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/swml_transfer.go) + +Line 247. + +*** + +### RegisterTools + +#### Signature + +```go +func (*SWMLTransferSkill) RegisterTools() []skills.ToolRegistration +``` + +#### Returns + +`[]skills.ToolRegistration` + +#### Source + +[`pkg/skills/builtin/swml_transfer.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/swml_transfer.go) + +Line 75. + +*** + +### Setup + +#### Signature + +```go +func (*SWMLTransferSkill) Setup() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/skills/builtin/swml_transfer.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/swml_transfer.go) + +Line 43. + +*** + +### SupportsMultipleInstances + +#### Signature + +```go +func (*SWMLTransferSkill) SupportsMultipleInstances() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/skills/builtin/swml_transfer.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/swml_transfer.go) + +Line 36. + +## Source + +[`pkg/skills/builtin/swml_transfer.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/swml_transfer.go) + +Line 12. diff --git a/fern/products/sdk-reference/go/agents/skills/builtin/builtin/weather-api-skill/index.mdx b/fern/products/sdk-reference/go/agents/skills/builtin/builtin/weather-api-skill/index.mdx new file mode 100644 index 0000000000..afb7f4e21a --- /dev/null +++ b/fern/products/sdk-reference/go/agents/skills/builtin/builtin/weather-api-skill/index.mdx @@ -0,0 +1,153 @@ +--- +slug: "/reference/go/agents/skills/builtin/builtin/weather-api-skill" +title: "WeatherAPISkill" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/skills/builtin.WeatherAPISkill" + parent: "github.com/signalwire/signalwire-go/pkg/skills/builtin" + module: "agents.skills.builtin.builtin" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/weather_api.go" +--- +# `WeatherAPISkill` + +WeatherAPISkill gets current weather from WeatherAPI.com. + +## Signature + +```go +type WeatherAPISkill struct +``` + +## Properties + + + +## Methods + +### GetHints + +#### Signature + +```go +func (*WeatherAPISkill) GetHints() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/skills/builtin/weather_api.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/weather_api.go) + +Line 217. + +*** + +### GetParameterSchema + +#### Signature + +```go +func (*WeatherAPISkill) GetParameterSchema() map[string]map[string]any +``` + +#### Returns + +`map[string]map[string]any` + +#### Source + +[`pkg/skills/builtin/weather_api.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/weather_api.go) + +Line 234. + +*** + +### GetPromptSections + +#### Signature + +```go +func (*WeatherAPISkill) GetPromptSections() []map[string]any +``` + +#### Returns + +`[]map[string]any` + +#### Source + +[`pkg/skills/builtin/weather_api.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/weather_api.go) + +Line 221. + +*** + +### RegisterTools + +#### Signature + +```go +func (*WeatherAPISkill) RegisterTools() []skills.ToolRegistration +``` + +#### Returns + +`[]skills.ToolRegistration` + +#### Source + +[`pkg/skills/builtin/weather_api.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/weather_api.go) + +Line 61. + +*** + +### RequiredEnvVars + +#### Signature + +```go +func (*WeatherAPISkill) RequiredEnvVars() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/skills/builtin/weather_api.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/weather_api.go) + +Line 36. + +*** + +### Setup + +#### Signature + +```go +func (*WeatherAPISkill) Setup() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/skills/builtin/weather_api.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/weather_api.go) + +Line 46. + +## Source + +[`pkg/skills/builtin/weather_api.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/weather_api.go) + +Line 17. diff --git a/fern/products/sdk-reference/go/agents/skills/builtin/builtin/web-search-skill/index.mdx b/fern/products/sdk-reference/go/agents/skills/builtin/builtin/web-search-skill/index.mdx new file mode 100644 index 0000000000..f462ce9de1 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/skills/builtin/builtin/web-search-skill/index.mdx @@ -0,0 +1,197 @@ +--- +slug: "/reference/go/agents/skills/builtin/builtin/web-search-skill" +title: "WebSearchSkill" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/skills/builtin.WebSearchSkill" + parent: "github.com/signalwire/signalwire-go/pkg/skills/builtin" + module: "agents.skills.builtin.builtin" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/web_search.go" +--- +# `WebSearchSkill` + +WebSearchSkill searches the web using Google Custom Search API. + +## Signature + +```go +type WebSearchSkill struct +``` + +## Properties + + + +## Methods + +### GetGlobalData + +GetGlobalData returns global context data signalling that quality-filtered web search is available. Mirrors Python's get\_global\_data return value. + +#### Signature + +```go +func (*WebSearchSkill) GetGlobalData() map[string]any +``` + +#### Returns + +`map[string]any` + +#### Source + +[`pkg/skills/builtin/web_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/web_search.go) + +Line 898. + +*** + +### GetInstanceKey + +GetInstanceKey returns a unique key incorporating both searchEngineID and toolName, matching Python's f"\{SKILL\_NAME\}_\{search\_engine\_id\}_\{tool\_name\}" pattern. + +#### Signature + +```go +func (*WebSearchSkill) GetInstanceKey() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/skills/builtin/web_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/web_search.go) + +Line 86. + +*** + +### GetParameterSchema + +#### Signature + +```go +func (*WebSearchSkill) GetParameterSchema() map[string]map[string]any +``` + +#### Returns + +`map[string]map[string]any` + +#### Source + +[`pkg/skills/builtin/web_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/web_search.go) + +Line 921. + +*** + +### GetPromptSections + +#### Signature + +```go +func (*WebSearchSkill) GetPromptSections() []map[string]any +``` + +#### Returns + +`[]map[string]any` + +#### Source + +[`pkg/skills/builtin/web_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/web_search.go) + +Line 906. + +*** + +### RegisterTools + +#### Signature + +```go +func (*WebSearchSkill) RegisterTools() []skills.ToolRegistration +``` + +#### Returns + +`[]skills.ToolRegistration` + +#### Source + +[`pkg/skills/builtin/web_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/web_search.go) + +Line 118. + +*** + +### RequiredEnvVars + +#### Signature + +```go +func (*WebSearchSkill) RequiredEnvVars() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/skills/builtin/web_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/web_search.go) + +Line 71. + +*** + +### Setup + +#### Signature + +```go +func (*WebSearchSkill) Setup() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/skills/builtin/web_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/web_search.go) + +Line 90. + +*** + +### SupportsMultipleInstances + +#### Signature + +```go +func (*WebSearchSkill) SupportsMultipleInstances() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/skills/builtin/web_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/web_search.go) + +Line 82. + +## Source + +[`pkg/skills/builtin/web_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/web_search.go) + +Line 24. diff --git a/fern/products/sdk-reference/go/agents/skills/builtin/builtin/wikipedia-search-skill/index.mdx b/fern/products/sdk-reference/go/agents/skills/builtin/builtin/wikipedia-search-skill/index.mdx new file mode 100644 index 0000000000..01be2d383a --- /dev/null +++ b/fern/products/sdk-reference/go/agents/skills/builtin/builtin/wikipedia-search-skill/index.mdx @@ -0,0 +1,113 @@ +--- +slug: "/reference/go/agents/skills/builtin/builtin/wikipedia-search-skill" +title: "WikipediaSearchSkill" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/skills/builtin.WikipediaSearchSkill" + parent: "github.com/signalwire/signalwire-go/pkg/skills/builtin" + module: "agents.skills.builtin.builtin" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/wikipedia_search.go" +--- +# `WikipediaSearchSkill` + +WikipediaSearchSkill searches Wikipedia for information. + +## Signature + +```go +type WikipediaSearchSkill struct +``` + +## Properties + + + +## Methods + +### GetParameterSchema + +#### Signature + +```go +func (*WikipediaSearchSkill) GetParameterSchema() map[string]map[string]any +``` + +#### Returns + +`map[string]map[string]any` + +#### Source + +[`pkg/skills/builtin/wikipedia_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/wikipedia_search.go) + +Line 46. + +*** + +### GetPromptSections + +#### Signature + +```go +func (*WikipediaSearchSkill) GetPromptSections() []map[string]any +``` + +#### Returns + +`[]map[string]any` + +#### Source + +[`pkg/skills/builtin/wikipedia_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/wikipedia_search.go) + +Line 182. + +*** + +### RegisterTools + +#### Signature + +```go +func (*WikipediaSearchSkill) RegisterTools() []skills.ToolRegistration +``` + +#### Returns + +`[]skills.ToolRegistration` + +#### Source + +[`pkg/skills/builtin/wikipedia_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/wikipedia_search.go) + +Line 65. + +*** + +### Setup + +#### Signature + +```go +func (*WikipediaSearchSkill) Setup() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/skills/builtin/wikipedia_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/wikipedia_search.go) + +Line 35. + +## Source + +[`pkg/skills/builtin/wikipedia_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/wikipedia_search.go) + +Line 17. diff --git a/fern/products/sdk-reference/go/agents/skills/builtin/index.mdx b/fern/products/sdk-reference/go/agents/skills/builtin/index.mdx new file mode 100644 index 0000000000..4687c6720b --- /dev/null +++ b/fern/products/sdk-reference/go/agents/skills/builtin/index.mdx @@ -0,0 +1,20 @@ +--- +slug: "/reference/go/agents/skills/builtin" +title: "builtin" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "module" + language: "go" + qualified_name: "agents.skills.builtin" + parent: "github.com/signalwire/signalwire-go/pkg/skills" + module: "agents.skills" +--- +# `builtin` + +## Modules + + + + diff --git a/fern/products/sdk-reference/go/agents/skills/index.mdx b/fern/products/sdk-reference/go/agents/skills/index.mdx new file mode 100644 index 0000000000..a1cd91d2c3 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/skills/index.mdx @@ -0,0 +1,275 @@ +--- +slug: "/reference/go/agents/skills" +title: "skills" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "module" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/skills" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/manager.go" +--- +# `skills` + +Package skills provides the skills system for SignalWire AI agents. Skills are modular capabilities that can be loaded into agents to provide tools, prompt sections, speech hints, and global data. + +## Signature + +```go +package skills +``` + +## Constants + + + Built-in skill names. These are the canonical keys the builtin packages register via RegisterSkill(); the constant values must stay in lockstep with those registrations (see pkg/skills/builtin/\*.go). + + + + Built-in skill names. These are the canonical keys the builtin packages register via RegisterSkill(); the constant values must stay in lockstep with those registrations (see pkg/skills/builtin/\*.go). + + + + Built-in skill names. These are the canonical keys the builtin packages register via RegisterSkill(); the constant values must stay in lockstep with those registrations (see pkg/skills/builtin/\*.go). + + + + Built-in skill names. These are the canonical keys the builtin packages register via RegisterSkill(); the constant values must stay in lockstep with those registrations (see pkg/skills/builtin/\*.go). + + + + Built-in skill names. These are the canonical keys the builtin packages register via RegisterSkill(); the constant values must stay in lockstep with those registrations (see pkg/skills/builtin/\*.go). + + + + Built-in skill names. These are the canonical keys the builtin packages register via RegisterSkill(); the constant values must stay in lockstep with those registrations (see pkg/skills/builtin/\*.go). + + + + Built-in skill names. These are the canonical keys the builtin packages register via RegisterSkill(); the constant values must stay in lockstep with those registrations (see pkg/skills/builtin/\*.go). + + + + Built-in skill names. These are the canonical keys the builtin packages register via RegisterSkill(); the constant values must stay in lockstep with those registrations (see pkg/skills/builtin/\*.go). + + + + Built-in skill names. These are the canonical keys the builtin packages register via RegisterSkill(); the constant values must stay in lockstep with those registrations (see pkg/skills/builtin/\*.go). + + + + Built-in skill names. These are the canonical keys the builtin packages register via RegisterSkill(); the constant values must stay in lockstep with those registrations (see pkg/skills/builtin/\*.go). + + + + Built-in skill names. These are the canonical keys the builtin packages register via RegisterSkill(); the constant values must stay in lockstep with those registrations (see pkg/skills/builtin/\*.go). + + + + Built-in skill names. These are the canonical keys the builtin packages register via RegisterSkill(); the constant values must stay in lockstep with those registrations (see pkg/skills/builtin/\*.go). + + + + Built-in skill names. These are the canonical keys the builtin packages register via RegisterSkill(); the constant values must stay in lockstep with those registrations (see pkg/skills/builtin/\*.go). + + + + Built-in skill names. These are the canonical keys the builtin packages register via RegisterSkill(); the constant values must stay in lockstep with those registrations (see pkg/skills/builtin/\*.go). + + + + Built-in skill names. These are the canonical keys the builtin packages register via RegisterSkill(); the constant values must stay in lockstep with those registrations (see pkg/skills/builtin/\*.go). + + + + Built-in skill names. These are the canonical keys the builtin packages register via RegisterSkill(); the constant values must stay in lockstep with those registrations (see pkg/skills/builtin/\*.go). + + + + Built-in skill names. These are the canonical keys the builtin packages register via RegisterSkill(); the constant values must stay in lockstep with those registrations (see pkg/skills/builtin/\*.go). + + + + Built-in skill names. These are the canonical keys the builtin packages register via RegisterSkill(); the constant values must stay in lockstep with those registrations (see pkg/skills/builtin/\*.go). + + +## Modules + + + + + + + +## Functions + +### AddSkillDirectory + +AddSkillDirectory is a package-level shim that delegates to the shared `globalRegistry.AddSkillDirectory`. It mirrors Python's `signalwire.add_skill_directory` (which delegates to the module singleton `signalwire.skills.registry.skill_registry`). + +The path is validated (must exist and be a directory) and added (de-duplicated) to the global registry's external-paths list. Note that Go compiles to a static binary; dynamic on-disk skill loading is not implemented here, but the path-tracking surface is — so tools that introspect "what external directories has this agent registered?" get the same answer they'd get on the Python side. + +#### Signature + +```go +func AddSkillDirectory(path string) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/skills/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/registry.go) + +Line 135. + +*** + +### GetSkillFactory + +GetSkillFactory returns the factory function for a registered skill name. Returns nil if the skill is not registered. + +#### Signature + +```go +func GetSkillFactory(name string) func(params map[string]any) SkillBase +``` + +#### Parameters + + + +#### Returns + +`func(params map[string]any) SkillBase` + +#### Source + +[`pkg/skills/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/registry.go) + +Line 91. + +*** + +### ListSkills + +ListSkills returns sorted names of all registered skills. + +#### Signature + +```go +func ListSkills() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/skills/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/registry.go) + +Line 98. + +*** + +### ListSkillsWithParams + +ListSkillsWithParams returns the complete parameter schema for all registered skills. It instantiates each skill with nil params to obtain its GetParameterSchema output. This mirrors Python's skill\_registry.get\_all\_skills\_schema(). The returned map has skill names as keys and their parameter schemas as values. + +#### Signature + +```go +func ListSkillsWithParams() map[string]map[string]map[string]any +``` + +#### Returns + +`map[string]map[string]map[string]any` + +#### Source + +[`pkg/skills/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/registry.go) + +Line 113. + +*** + +### NewSkillManager + +NewSkillManager creates a new SkillManager. + +#### Signature + +```go +func NewSkillManager() *SkillManager +``` + +#### Returns + +`*SkillManager` + +#### Source + +[`pkg/skills/manager.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/manager.go) + +Line 16. + +*** + +### NewSkillRegistry + +NewSkillRegistry constructs a new SkillRegistry. The Python reference uses a singleton-per-module (`skill_registry`); Go callers can either construct their own via NewSkillRegistry() or use the global `globalRegistry` accessed through the package-level helpers. + +#### Signature + +```go +func NewSkillRegistry() *SkillRegistry +``` + +#### Returns + +`*SkillRegistry` + +#### Source + +[`pkg/skills/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/registry.go) + +Line 34. + +*** + +### RegisterSkill + +RegisterSkill registers a skill factory function by name. This is typically called from init() functions in builtin skill packages. + +#### Signature + +```go +func RegisterSkill(name string, factory func(params map[string]any) SkillBase) +``` + +#### Parameters + + + + + +#### Source + +[`pkg/skills/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/registry.go) + +Line 83. + +## Source + +[`pkg/skills/manager.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/manager.go) diff --git a/fern/products/sdk-reference/go/agents/skills/skills/base-skill/index.mdx b/fern/products/sdk-reference/go/agents/skills/skills/base-skill/index.mdx new file mode 100644 index 0000000000..49117d74f2 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/skills/skills/base-skill/index.mdx @@ -0,0 +1,519 @@ +--- +slug: "/reference/go/agents/skills/skills/base-skill" +title: "BaseSkill" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/skills.BaseSkill" + parent: "agents.skills.skills" + module: "agents.skills.skills" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go" +--- +# `BaseSkill` + +BaseSkill provides default implementations for the SkillBase interface. Concrete skills should embed this struct and override methods as needed. + +## Signature + +```go +type BaseSkill struct +``` + +## Properties + + + Logger is a named logger for this skill instance. It is initialized automatically when Name() is first called via NewBaseSkill, or can be set explicitly. Mirrors Python SkillBase.logger. + + + + + + + + + + +## Methods + +### Cleanup + +Cleanup is a no-op by default. + +#### Signature + +```go +func (*BaseSkill) Cleanup() +``` + +#### Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 111. + +*** + +### Description + +Description returns the skill description. + +#### Signature + +```go +func (*BaseSkill) Description() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 70. + +*** + +### GetGlobalData + +GetGlobalData returns nil (no global data by default). + +#### Signature + +```go +func (*BaseSkill) GetGlobalData() map[string]any +``` + +#### Returns + +`map[string]any` + +#### Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 90. + +*** + +### GetHints + +GetHints returns nil (no hints by default). + +#### Signature + +```go +func (*BaseSkill) GetHints() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 87. + +*** + +### GetInstanceKey + +GetInstanceKey returns a unique key for tracking this skill instance. When SupportsMultipleInstances() returns true, the key is composed of the skill name and the "tool\_name" parameter (defaulting to the skill name), matching Python's get\_instance\_key() behavior for multi-instance skills. When SupportsMultipleInstances() returns false, returns the skill name. + +#### Signature + +```go +func (*BaseSkill) GetInstanceKey() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 118. + +*** + +### GetParam + +GetParam retrieves a parameter value from the skill's Params map. Returns the value and true if found, or nil and false otherwise. + +#### Signature + +```go +func (*BaseSkill) GetParam(key string) (any, bool) +``` + +#### Parameters + + + +#### Returns + +`(any, bool)` + +#### Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 195. + +*** + +### GetParamBool + +GetParamBool retrieves a boolean parameter, returning the default if not found. + +#### Signature + +```go +func (*BaseSkill) GetParamBool(key string, defaultVal bool) bool +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 262. + +*** + +### GetParameterSchema + +GetParameterSchema returns the common parameters available to all skills. The "tool\_name" parameter is only included when SupportsMultipleInstances() returns true, matching Python's conditional inclusion in get\_parameter\_schema(). + +#### Signature + +```go +func (*BaseSkill) GetParameterSchema() map[string]map[string]any +``` + +#### Returns + +`map[string]map[string]any` + +#### Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 129. + +*** + +### GetParamFloat + +GetParamFloat retrieves a float parameter, returning the default if not found. + +#### Signature + +```go +func (*BaseSkill) GetParamFloat(key string, defaultVal float64) float64 +``` + +#### Parameters + + + + + +#### Returns + +`float64` + +#### Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 241. + +*** + +### GetParamInt + +GetParamInt retrieves an integer parameter, returning the default if not found. + +#### Signature + +```go +func (*BaseSkill) GetParamInt(key string, defaultVal int) int +``` + +#### Parameters + + + + + +#### Returns + +`int` + +#### Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 220. + +*** + +### GetParamString + +GetParamString retrieves a string parameter, returning the default if not found. + +#### Signature + +```go +func (*BaseSkill) GetParamString(key string, defaultVal string) string +``` + +#### Parameters + + + + + +#### Returns + +`string` + +#### Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 204. + +*** + +### GetPromptSections + +GetPromptSections returns nil (no prompt sections by default). When skip\_prompt is set to true in Params, returns nil even for concrete overrides — concrete overrides that inject prompt sections MUST call ShouldSkipPrompt() and return nil (or an empty slice) when it is true. + +#### Signature + +```go +func (*BaseSkill) GetPromptSections() []map[string]any +``` + +#### Returns + +`[]map[string]any` + +#### Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 103. + +*** + +### GetSkillData + +GetSkillData reads this skill instance's namespaced state from rawData. rawData is the raw\_data map passed to SWAIG function handlers, expected to contain a "global\_data" key. Returns an empty map when not found. Mirrors Python's get\_skill\_data(raw\_data). + +#### Signature + +```go +func (*BaseSkill) GetSkillData(rawData map[string]any) map[string]any +``` + +#### Parameters + + + +#### Returns + +`map[string]any` + +#### Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 172. + +*** + +### GetSkillNamespace + +GetSkillNamespace returns the namespaced key used to store this skill instance's state in agent global\_data. Uses the "prefix" parameter if set, otherwise falls back to the instance key. Mirrors Python's \_get\_skill\_namespace(). + +Example: a skill named "datasphere" with no prefix returns "skill:datasphere". With prefix "kb" it returns "skill:kb". + +#### Signature + +```go +func (*BaseSkill) GetSkillNamespace() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 161. + +*** + +### Name + +Name returns the skill name. + +#### Signature + +```go +func (*BaseSkill) Name() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 67. + +*** + +### RequiredEnvVars + +RequiredEnvVars returns nil (no required env vars by default). + +#### Signature + +```go +func (*BaseSkill) RequiredEnvVars() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 81. + +*** + +### ShouldSkipPrompt + +ShouldSkipPrompt returns true if the "skip\_prompt" parameter is set to true. Concrete skill overrides of GetPromptSections should call this helper before returning prompt content, mirroring Python's get\_prompt\_sections() guard. + +#### Signature + +```go +func (*BaseSkill) ShouldSkipPrompt() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 95. + +*** + +### SupportsMultipleInstances + +SupportsMultipleInstances returns false by default. + +#### Signature + +```go +func (*BaseSkill) SupportsMultipleInstances() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 84. + +*** + +### UpdateSkillData + +UpdateSkillData writes this skill instance's namespaced state into result's global\_data via result.UpdateGlobalData(). Returns result for method chaining. Mirrors Python's update\_skill\_data(result, data). + +#### Signature + +```go +func (*BaseSkill) UpdateSkillData(result *swaig.FunctionResult, data map[string]any) *swaig.FunctionResult +``` + +#### Parameters + + + + + +#### Returns + +`*swaig.FunctionResult` + +#### Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 187. + +*** + +### Version + +Version returns the skill version, defaulting to "1.0.0". + +#### Signature + +```go +func (*BaseSkill) Version() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 73. + +## Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 55. diff --git a/fern/products/sdk-reference/go/agents/skills/skills/index.mdx b/fern/products/sdk-reference/go/agents/skills/skills/index.mdx new file mode 100644 index 0000000000..f668ea15b7 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/skills/skills/index.mdx @@ -0,0 +1,339 @@ +--- +slug: "/reference/go/agents/skills/skills" +title: "skills" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "module" + language: "go" + qualified_name: "agents.skills.skills" + parent: "github.com/signalwire/signalwire-go/pkg/skills" + module: "agents.skills" +--- +# `skills` + +## Classes + + + + BaseSkill provides default implementations for the SkillBase interface. Concrete skills should embed this struct and override methods as needed. + + + + SkillManager manages the lifecycle of loaded skill instances. + + + + SkillRegistry is the per-instance Python-parity surface mirroring `signalwire.skills.registry.SkillRegistry`. Each instance owns its own list of external skill directories, validated and de-duplicated on insert. The package-level `RegisterSkill` / `GetSkillFactory` / `ListSkills` functions remain the canonical Go API for static compile-time skill registration; `SkillRegistry` exists so the `add_skill_directory` parity case has a real owning object the audit and downstream callers can hold. + + + + ToolRegistration describes a tool that a skill wants to register with the agent. + + + +## Interfaces + +### SkillBase + +SkillBase defines the interface that all skills must implement. + +#### Signature + +```go +type SkillBase interface { Name; Description; Version; RequiredEnvVars; SupportsMultipleInstances; Setup; RegisterTools; GetHints; GetGlobalData; GetPromptSections; Cleanup; GetInstanceKey; GetParameterSchema } +``` + +#### Methods + +##### Cleanup + +Cleanup releases resources when the skill is unloaded. + +###### Signature + +```go +Cleanup() +``` + +###### Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 35. + +*** + +##### Description + +Description returns a human-readable description of the skill. + +###### Signature + +```go +Description() string +``` + +###### Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 16. + +*** + +##### GetGlobalData + +GetGlobalData returns data to add to the agent's global context. + +###### Signature + +```go +GetGlobalData() map[string]any +``` + +###### Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 31. + +*** + +##### GetHints + +GetHints returns speech recognition hints for this skill. + +###### Signature + +```go +GetHints() []string +``` + +###### Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 29. + +*** + +##### GetInstanceKey + +GetInstanceKey returns a unique key for tracking this skill instance. + +###### Signature + +```go +GetInstanceKey() string +``` + +###### Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 37. + +*** + +##### GetParameterSchema + +GetParameterSchema returns metadata about all parameters the skill accepts. + +###### Signature + +```go +GetParameterSchema() map[string]map[string]any +``` + +###### Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 39. + +*** + +##### GetPromptSections + +GetPromptSections returns prompt sections to inject into the agent. + +###### Signature + +```go +GetPromptSections() []map[string]any +``` + +###### Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 33. + +*** + +##### Name + +Name returns the unique skill identifier. + +###### Signature + +```go +Name() string +``` + +###### Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 14. + +*** + +##### RegisterTools + +RegisterTools returns tool registrations for this skill. + +###### Signature + +```go +RegisterTools() []ToolRegistration +``` + +###### Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 27. + +*** + +##### RequiredEnvVars + +RequiredEnvVars returns environment variable names that must be set. + +###### Signature + +```go +RequiredEnvVars() []string +``` + +###### Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 20. + +*** + +##### Setup + +Setup validates configuration and initializes the skill. + +Returns true if setup was successful. + +###### Signature + +```go +Setup() bool +``` + +###### Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 25. + +*** + +##### SupportsMultipleInstances + +SupportsMultipleInstances returns whether multiple instances are allowed. + +###### Signature + +```go +SupportsMultipleInstances() bool +``` + +###### Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 22. + +*** + +##### Version + +Version returns the semantic version of the skill. + +###### Signature + +```go +Version() string +``` + +###### Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 18. + +#### Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 12. + +## Enums + +### SkillName + +SkillName is the closed set of built-in skill names as a defined string type with typed constants. It mirrors the PHP `SkillName` backed enum and gives Go callers editor autocompletion plus call-site typo checking: a bare string like "datetiem" only fails at runtime (on the server), whereas a mistyped constant fails to compile. + +AgentBase.AddSkill / RemoveSkill / HasSkill take SkillName. Because Go auto-converts untyped string-constant literals to a defined string type, every call site keeps working three ways: + +``` +agent.AddSkill(skills.SkillDatetime, nil) // typed const — autocompleted +agent.AddSkill("datetime", nil) // bare string literal still compiles +agent.AddSkill(skills.SkillName("custom"), // open set: custom / 3rd-party skills + map[string]any{...}) +``` + +SkillName is a string subtype, so its wire/JSON value is identical to the reference's bare `str` parameter — parity with the Python reference (which uses `str`) and with custom skills that aren't built in. + +#### Signature + +```go +type SkillName alias +``` + +#### Examples + + + + ```go + agent.AddSkill(skills.SkillDatetime, nil) // typed const — autocompleted + agent.AddSkill("datetime", nil) // bare string literal still compiles + agent.AddSkill(skills.SkillName("custom"), // open set: custom / 3rd-party skills + map[string]any{...}) + ``` + + + + ```go + agent.AddSkill(skills.SkillDatetime, nil) // typed const — autocompleted + agent.AddSkill("datetime", nil) // bare string literal still compiles + agent.AddSkill(skills.SkillName("custom"), // open set: custom / 3rd-party skills + map[string]any{...}) + ``` + + + +#### Source + +[`pkg/skills/skill_name.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_name.go) + +Line 21. diff --git a/fern/products/sdk-reference/go/agents/skills/skills/skill-manager/index.mdx b/fern/products/sdk-reference/go/agents/skills/skills/skill-manager/index.mdx new file mode 100644 index 0000000000..086fc5a032 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/skills/skills/skill-manager/index.mdx @@ -0,0 +1,160 @@ +--- +slug: "/reference/go/agents/skills/skills/skill-manager" +title: "SkillManager" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/skills.SkillManager" + parent: "agents.skills.skills" + module: "agents.skills.skills" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/manager.go" +--- +# `SkillManager` + +SkillManager manages the lifecycle of loaded skill instances. + +## Signature + +```go +type SkillManager struct +``` + +## Methods + +### GetSkill + +GetSkill returns the skill with the given instance key, or nil if not found. + +#### Signature + +```go +func (*SkillManager) GetSkill(key string) SkillBase +``` + +#### Parameters + + + +#### Returns + +`SkillBase` + +#### Source + +[`pkg/skills/manager.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/manager.go) + +Line 98. + +*** + +### HasSkill + +HasSkill returns true if a skill with the given instance key is loaded. + +#### Signature + +```go +func (*SkillManager) HasSkill(key string) bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`pkg/skills/manager.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/manager.go) + +Line 90. + +*** + +### ListLoadedSkills + +ListLoadedSkills returns the instance keys of all loaded skills. + +#### Signature + +```go +func (*SkillManager) ListLoadedSkills() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/skills/manager.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/manager.go) + +Line 78. + +*** + +### LoadSkill + +LoadSkill validates environment variables, calls Setup, and registers the skill. Returns (success bool, errorMessage string). + +When a skill with the same instance key is already loaded, the behavior depends on SupportsMultipleInstances(): + +- false (default): returns (false, error) — duplicate is an error. +- true: returns (true, "") — duplicate instance is silently accepted, matching Python's SkillManager.load\_skill() warning-and-continue behavior. + +#### Signature + +```go +func (*SkillManager) LoadSkill(skill SkillBase) (bool, string) +``` + +#### Parameters + + + +#### Returns + +`(bool, string)` + +#### Source + +[`pkg/skills/manager.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/manager.go) + +Line 30. + +*** + +### UnloadSkill + +UnloadSkill removes a skill by its instance key. Returns true if found and removed. + +#### Signature + +```go +func (*SkillManager) UnloadSkill(key string) bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`pkg/skills/manager.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/manager.go) + +Line 63. + +## Source + +[`pkg/skills/manager.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/manager.go) + +Line 10. diff --git a/fern/products/sdk-reference/go/agents/skills/skills/skill-registry/index.mdx b/fern/products/sdk-reference/go/agents/skills/skills/skill-registry/index.mdx new file mode 100644 index 0000000000..5a06cc412d --- /dev/null +++ b/fern/products/sdk-reference/go/agents/skills/skills/skill-registry/index.mdx @@ -0,0 +1,77 @@ +--- +slug: "/reference/go/agents/skills/skills/skill-registry" +title: "SkillRegistry" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/skills.SkillRegistry" + parent: "agents.skills.skills" + module: "agents.skills.skills" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/registry.go" +--- +# `SkillRegistry` + +SkillRegistry is the per-instance Python-parity surface mirroring `signalwire.skills.registry.SkillRegistry`. Each instance owns its own list of external skill directories, validated and de-duplicated on insert. The package-level `RegisterSkill` / `GetSkillFactory` / `ListSkills` functions remain the canonical Go API for static compile-time skill registration; `SkillRegistry` exists so the `add_skill_directory` parity case has a real owning object the audit and downstream callers can hold. + +## Signature + +```go +type SkillRegistry struct +``` + +## Methods + +### AddSkillDirectory + +AddSkillDirectory adds a directory to search for skills. Mirrors Python's `SkillRegistry.add_skill_directory`: validates that the path exists and is a directory, then appends it (de-duplicated) to the registry's external paths list. Returns an error (the Go analog of Python's `ValueError`) for non-existent paths or non-directories. + +#### Signature + +```go +func (*SkillRegistry) AddSkillDirectory(path string) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/skills/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/registry.go) + +Line 49. + +*** + +### ExternalPaths + +ExternalPaths returns a copy of the registered external skill directories. Parity surface for Python's `_external_paths`. + +#### Signature + +```go +func (*SkillRegistry) ExternalPaths() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/skills/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/registry.go) + +Line 73. + +## Source + +[`pkg/skills/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/registry.go) + +Line 25. diff --git a/fern/products/sdk-reference/go/agents/skills/skills/tool-registration/index.mdx b/fern/products/sdk-reference/go/agents/skills/skills/tool-registration/index.mdx new file mode 100644 index 0000000000..52376d482d --- /dev/null +++ b/fern/products/sdk-reference/go/agents/skills/skills/tool-registration/index.mdx @@ -0,0 +1,45 @@ +--- +slug: "/reference/go/agents/skills/skills/tool-registration" +title: "ToolRegistration" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/skills.ToolRegistration" + parent: "agents.skills.skills" + module: "agents.skills.skills" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go" +--- +# `ToolRegistration` + +ToolRegistration describes a tool that a skill wants to register with the agent. + +## Signature + +```go +type ToolRegistration struct +``` + +## Properties + + + + + + + + + + + + + + + +## Source + +[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) + +Line 43. diff --git a/fern/products/sdk-reference/go/agents/swaig-test/index.mdx b/fern/products/sdk-reference/go/agents/swaig-test/index.mdx new file mode 100644 index 0000000000..aa01c6bfb9 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/swaig-test/index.mdx @@ -0,0 +1,22 @@ +--- +slug: "/reference/go/agents/swaig-test" +title: "swaig-test" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "module" + language: "go" + qualified_name: "agents.swaig-test" + parent: "agents" + module: "agents" +--- +# `swaig-test` + +## Modules + + + + Command swaig-test is a CLI tool for testing SWAIG agents by exercising their HTTP endpoints. Unlike the Python SDK's swaig-test which loads agent files dynamically, this tool operates against a running agent server. + + diff --git a/fern/products/sdk-reference/go/agents/swaig-test/main/basic-auth/index.mdx b/fern/products/sdk-reference/go/agents/swaig-test/main/basic-auth/index.mdx new file mode 100644 index 0000000000..127b13ee88 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/swaig-test/main/basic-auth/index.mdx @@ -0,0 +1,35 @@ +--- +slug: "/reference/go/agents/swaig-test/main/basic-auth" +title: "BasicAuth" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/cmd/swaig-test.BasicAuth" + parent: "github.com/signalwire/signalwire-go/cmd/swaig-test" + module: "agents.swaig-test.main" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/cmd/swaig-test/simulate.go" +--- +# `BasicAuth` + +BasicAuth bundles a username/password pair for convenience. + +## Signature + +```go +type BasicAuth struct +``` + +## Properties + + + + + +## Source + +[`cmd/swaig-test/simulate.go`](https://github.com/signalwire/signalwire-go/blob/main/cmd/swaig-test/simulate.go) + +Line 507. diff --git a/fern/products/sdk-reference/go/agents/swaig-test/main/index.mdx b/fern/products/sdk-reference/go/agents/swaig-test/main/index.mdx new file mode 100644 index 0000000000..d2cb91ceff --- /dev/null +++ b/fern/products/sdk-reference/go/agents/swaig-test/main/index.mdx @@ -0,0 +1,250 @@ +--- +slug: "/reference/go/agents/swaig-test/main" +title: "main" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "module" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/cmd/swaig-test" + parent: "agents.swaig-test" + module: "agents.swaig-test" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/cmd/swaig-test/main.go" +--- +# `main` + +Command swaig-test is a CLI tool for testing SWAIG agents by exercising their HTTP endpoints. Unlike the Python SDK's swaig-test which loads agent files dynamically, this tool operates against a running agent server. + +Usage: + +``` +swaig-test --url http://user:pass@localhost:3000/ --dump-swml +swaig-test --url http://user:pass@localhost:3000/ --list-tools +swaig-test --url http://user:pass@localhost:3000/ --exec get_weather --param location=London +``` + +Binary-introspection mode (no HTTP): + +``` +swaig-test --example swmlservice_swaig_standalone --list-tools +``` + +In `--example` mode the CLI runs `go run ./examples/` with SWAIG\_LIST\_TOOLS=1 set in the subprocess environment. The SDK's Service.Serve() honors that env var by printing the registered tool registry between **SWAIG\_TOOLS\_BEGIN** / **SWAIG\_TOOLS\_END** sentinels and exiting 0 BEFORE binding any port. The CLI captures stdout, slices between the sentinels, parses the JSON, and pretty-prints — no HTTP, no /swaig endpoint, no rendered-SWML walk required. + +Simulator support for `--simulate-serverless` mode. + +In the Python SDK, `swaig-test` can load an agent from a source file and dispatch invocations through the chosen serverless adapter in-process. Go has no equivalent dynamic-loader for compiled binaries, so the simulator is split in two: + +1. A library API (this file) that sets/clears the mode-detection env vars, dispatches a synthetic Lambda Function URL event through pkg/lambda, and restores the outer environment on exit. Tests and in-process callers (e.g. users who embed `swaig-test` in their own test suites) drive the simulator through this API. +2. A flag on the `swaig-test` CLI (see main.go) that validates the requested platform against what the port actually implements and surfaces a clear error for unsupported platforms (Phase 9 of the porting guide). The flag also works with --url: it sets the mode-detection env vars for the duration of the invocation so the server-side URL generation goes through the platform branch. + +The simulator mirrors the behaviour of Python's `signalwire/cli/simulation/mock_env.py`: + +- Platform preset env vars are applied (AWS\_LAMBDA\_FUNCTION\_NAME etc). +- Conflicting env vars — most importantly SWML\_PROXY\_URL\_BASE — are cleared so platform-specific URL generation is actually exercised. +- The original env is restored on exit, whether the simulated call succeeded, errored, or panicked. Leaking env across simulations would corrupt later tests in the same process. + +## Signature + +```go +package main +``` + +## Examples + + + + ```go + swaig-test --url http://user:pass@localhost:3000/ --dump-swml + swaig-test --url http://user:pass@localhost:3000/ --list-tools + swaig-test --url http://user:pass@localhost:3000/ --exec get_weather --param location=London + ``` + + + + ```go + swaig-test --example swmlservice_swaig_standalone --list-tools + ``` + + + + ```go + swaig-test --url http://user:pass@localhost:3000/ --dump-swml + swaig-test --url http://user:pass@localhost:3000/ --list-tools + swaig-test --url http://user:pass@localhost:3000/ --exec get_weather --param location=London + ``` + + + + ```go + swaig-test --example swmlservice_swaig_standalone --list-tools + ``` + + + +## Classes + + + + BasicAuth bundles a username/password pair for convenience. + + + + LambdaSimResult is the decoded result of one synthetic Lambda invocation. Status is the HTTP status returned by the handler, Body is the response body (already base64-decoded if the adapter marked it so), and Headers mirrors the Lambda response envelope's flattened single-value map. + + + + SimulateLambdaOptions tunes an in-process Lambda simulation. + + + +## Functions + +### SimulateDumpSWMLViaLambda + +SimulateDumpSWMLViaLambda activates the Lambda environment, calls the factory to construct the agent (so any env-captured state reflects the simulated Lambda environment), issues a POST to the agent's route through the Lambda adapter, and returns the response body (the SWML document JSON). It's the library-side equivalent of `swaig-test --simulate-serverless lambda --dump-swml`, usable from in-process tests. + +The factory-based API is load-bearing: constructing the agent BEFORE activation would let SWML\_PROXY\_URL\_BASE from the outer shell leak into the agent's own proxyURLBase field, and the rendered webhook URLs would point at the outer proxy instead of the simulated Lambda function. Use SimulateDumpSWMLViaLambdaHandler only when you've already verified the handler doesn't capture env state — it skips the activation-ordering guarantee. + +basicAuth, if non-empty in both fields, adds a basic-auth header to the synthetic event so authed agents don't 401. + +#### Signature + +```go +func SimulateDumpSWMLViaLambda( + factory HandlerFactory, + agentRoute string, + opts SimulateLambdaOptions, + basicAuth BasicAuth +) ([]byte, error) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`([]byte, error)` + +#### Source + +[`cmd/swaig-test/simulate.go`](https://github.com/signalwire/signalwire-go/blob/main/cmd/swaig-test/simulate.go) + +Line 396. + +*** + +### SimulateExecToolViaLambda + +SimulateExecToolViaLambda activates the Lambda environment, calls the factory to construct the agent (so any env-captured state reflects the simulated Lambda environment), and dispatches a SWAIG tool invocation through the Lambda adapter at `/swaig`. Returns the raw response body. + +#### Signature + +```go +func SimulateExecToolViaLambda( + factory HandlerFactory, + agentRoute string, + toolName string, + args map[string]any, + opts SimulateLambdaOptions, + basicAuth BasicAuth +) ([]byte, error) +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`([]byte, error)` + +#### Source + +[`cmd/swaig-test/simulate.go`](https://github.com/signalwire/signalwire-go/blob/main/cmd/swaig-test/simulate.go) + +Line 445. + +*** + +### SimulateLambdaInvocation + +SimulateLambdaInvocation runs a single synthetic Lambda Function URL event against the given handler with the Lambda environment active. It does NOT touch env vars itself — call activateLambdaEnv first and defer restore() so the env change has the right scope. + +The split exists so one activation can host multiple invocations (dump-SWML then exec-tool, say) without paying the env save/restore cost per call. + +#### Signature + +```go +func SimulateLambdaInvocation( + handler http.Handler, + method string, + path string, + headers map[string]string, + body io.Reader +) (LambdaSimResult, error) +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`(LambdaSimResult, error)` + +#### Source + +[`cmd/swaig-test/simulate.go`](https://github.com/signalwire/signalwire-go/blob/main/cmd/swaig-test/simulate.go) + +Line 287. + +## Type Aliases + +### HandlerFactory + +HandlerFactory is a zero-arg function that constructs the http.Handler under test. The factory is called AFTER the simulator has activated the platform env vars, so any env-var-driven state the agent captures at construction (notably SWML\_PROXY\_URL\_BASE, which pkg/swml.Service reads in its constructor) reflects the simulated environment rather than the outer shell. + +This mirrors the Python SDK's mock\_env.py flow: env vars are set first, then the agent module is imported/loaded, then invocations run against that freshly-loaded agent. + +#### Signature + +```go +type HandlerFactory alias +``` + +#### Source + +[`cmd/swaig-test/simulate.go`](https://github.com/signalwire/signalwire-go/blob/main/cmd/swaig-test/simulate.go) + +Line 376. + +## Source + +[`cmd/swaig-test/main.go`](https://github.com/signalwire/signalwire-go/blob/main/cmd/swaig-test/main.go) diff --git a/fern/products/sdk-reference/go/agents/swaig-test/main/lambda-sim-result/index.mdx b/fern/products/sdk-reference/go/agents/swaig-test/main/lambda-sim-result/index.mdx new file mode 100644 index 0000000000..8b3ca6f301 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/swaig-test/main/lambda-sim-result/index.mdx @@ -0,0 +1,37 @@ +--- +slug: "/reference/go/agents/swaig-test/main/lambda-sim-result" +title: "LambdaSimResult" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/cmd/swaig-test.LambdaSimResult" + parent: "github.com/signalwire/signalwire-go/cmd/swaig-test" + module: "agents.swaig-test.main" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/cmd/swaig-test/simulate.go" +--- +# `LambdaSimResult` + +LambdaSimResult is the decoded result of one synthetic Lambda invocation. Status is the HTTP status returned by the handler, Body is the response body (already base64-decoded if the adapter marked it so), and Headers mirrors the Lambda response envelope's flattened single-value map. + +## Signature + +```go +type LambdaSimResult struct +``` + +## Properties + + + + + + + +## Source + +[`cmd/swaig-test/simulate.go`](https://github.com/signalwire/signalwire-go/blob/main/cmd/swaig-test/simulate.go) + +Line 273. diff --git a/fern/products/sdk-reference/go/agents/swaig-test/main/simulate-lambda-options/index.mdx b/fern/products/sdk-reference/go/agents/swaig-test/main/simulate-lambda-options/index.mdx new file mode 100644 index 0000000000..74dccf776b --- /dev/null +++ b/fern/products/sdk-reference/go/agents/swaig-test/main/simulate-lambda-options/index.mdx @@ -0,0 +1,47 @@ +--- +slug: "/reference/go/agents/swaig-test/main/simulate-lambda-options" +title: "SimulateLambdaOptions" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/cmd/swaig-test.SimulateLambdaOptions" + parent: "github.com/signalwire/signalwire-go/cmd/swaig-test" + module: "agents.swaig-test.main" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/cmd/swaig-test/simulate.go" +--- +# `SimulateLambdaOptions` + +SimulateLambdaOptions tunes an in-process Lambda simulation. + +## Signature + +```go +type SimulateLambdaOptions struct +``` + +## Properties + + + FunctionName overrides AWS\_LAMBDA\_FUNCTION\_NAME. Empty means use the preset default ("test-agent-function"). + + + + FunctionURLOverride, if non-empty, is assigned to AWS\_LAMBDA\_FUNCTION\_URL during the simulation. The default (empty) lets GetFullURL fall back to constructing the URL from AWS\_LAMBDA\_FUNCTION\_NAME + AWS\_REGION, which is the more interesting code path to exercise in tests. + + + + Logger receives warnings about env state — notably if SWML\_PROXY\_URL\_BASE is still set after the clear attempt. A nil Logger sends warnings to os.Stderr. + + + + Region overrides AWS\_REGION. Empty means use the preset default ("us-east-1"). + + +## Source + +[`cmd/swaig-test/simulate.go`](https://github.com/signalwire/signalwire-go/blob/main/cmd/swaig-test/simulate.go) + +Line 195. diff --git a/fern/products/sdk-reference/go/agents/swaig/index.mdx b/fern/products/sdk-reference/go/agents/swaig/index.mdx new file mode 100644 index 0000000000..f706c34227 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/swaig/index.mdx @@ -0,0 +1,646 @@ +--- +slug: "/reference/go/agents/swaig" +title: "swaig" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "module" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/swaig" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/codec.go" +--- +# `swaig` + +Package swaig provides SWAIG (SignalWire AI Gateway) function result handling for building AI agent tool responses with actions and call control. + +## Signature + +```go +package swaig +``` + +## Constants + + + Audio codecs for Tap. These are exactly the strings the SWML tap verb accepts for codec; the values are emitted verbatim into the tap params (matching the Python reference's valid\_codecs = \["PCMU", "PCMA"], default "PCMU"). + + + + Audio codecs for Tap. These are exactly the strings the SWML tap verb accepts for codec; the values are emitted verbatim into the tap params (matching the Python reference's valid\_codecs = \["PCMU", "PCMA"], default "PCMU"). + + + + Recording container formats. These are the canonical format tokens the SWML record verb accepts; the values are the exact strings emitted in the record params (matching the Python reference's record\_call format examples: mp3, wav, mp4). + + + + Recording container formats. These are the canonical format tokens the SWML record verb accepts; the values are the exact strings emitted in the record params (matching the Python reference's record\_call format examples: mp3, wav, mp4). + + + + Recording container formats. These are the canonical format tokens the SWML record verb accepts; the values are the exact strings emitted in the record params (matching the Python reference's record\_call format examples: mp3, wav, mp4). + + + + Audio directions for RecordCall. These are exactly the strings the SWML record\_call verb accepts for direction; the values are emitted verbatim into the record\_call params (matching the Python reference's valid\_directions = \["speak", "listen", "both"]). + + + + Audio directions for RecordCall. These are exactly the strings the SWML record\_call verb accepts for direction; the values are emitted verbatim into the record\_call params (matching the Python reference's valid\_directions = \["speak", "listen", "both"]). + + + + Audio directions for RecordCall. These are exactly the strings the SWML record\_call verb accepts for direction; the values are emitted verbatim into the record\_call params (matching the Python reference's valid\_directions = \["speak", "listen", "both"]). + + + + Audio directions for Tap. These are exactly the strings the SWML tap verb accepts for direction; the values are emitted verbatim into the tap params (matching the Python reference's valid\_directions = \["speak", "hear", "both"]). + + + + Audio directions for Tap. These are exactly the strings the SWML tap verb accepts for direction; the values are emitted verbatim into the tap params (matching the Python reference's valid\_directions = \["speak", "hear", "both"]). + + + + Audio directions for Tap. These are exactly the strings the SWML tap verb accepts for direction; the values are emitted verbatim into the tap params (matching the Python reference's valid\_directions = \["speak", "hear", "both"]). + + +## Modules + + + + + +## Functions + +### CodecValues + +CodecValues returns the Codec closed set as wire strings (PCMU, PCMA), suitable for Params.Enum / PropEnum / WithEnum. + +#### Signature + +```go +func CodecValues() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) + +Line 319. + +*** + +### CreatePaymentAction + +CreatePaymentAction creates a single payment action entry. + +#### Signature + +```go +func CreatePaymentAction(actionType string, phrase string) map[string]string +``` + +#### Parameters + + + + + +#### Returns + +`map[string]string` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 1037. + +*** + +### CreatePaymentParameter + +CreatePaymentParameter creates a payment parameter entry. + +#### Signature + +```go +func CreatePaymentParameter(name string, value string) map[string]string +``` + +#### Parameters + + + + + +#### Returns + +`map[string]string` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 1045. + +*** + +### CreatePaymentPrompt + +CreatePaymentPrompt creates a payment prompt configuration. cardType and errorType are optional; pass empty strings to omit them. This matches the Python SDK's create\_payment\_prompt() static method signature. + +#### Signature + +```go +func CreatePaymentPrompt( + forSituation string, + actions []map[string]string, + cardType string, + errorType string +) map[string]any +``` + +#### Parameters + + + + + + + + + +#### Returns + +`map[string]any` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 1022. + +*** + +### Default + +Default sets the property's JSON-Schema "default" keyword to v (emitted verbatim — pass the wire value). + +#### Signature + +```go +func Default(v any) PropOption +``` + +#### Parameters + + + +#### Returns + +`PropOption` + +#### Source + +[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) + +Line 103. + +*** + +### Format + +Format sets the property's JSON-Schema "format" keyword (e.g. "date", "date-time", "email"). + +#### Signature + +```go +func Format(format string) PropOption +``` + +#### Parameters + + + +#### Returns + +`PropOption` + +#### Source + +[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) + +Line 109. + +*** + +### NewFunctionResult + +NewFunctionResult creates a new FunctionResult with the given response text. + +#### Signature + +```go +func NewFunctionResult(response string) *FunctionResult +``` + +#### Parameters + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 25. + +*** + +### NewParams + +NewParams returns an empty parameter builder ready to accept property declarations. + +#### Signature + +```go +func NewParams() *Params +``` + +#### Returns + +`*Params` + +#### Source + +[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) + +Line 73. + +*** + +### PropArray + +PropArray returns an array-typed property whose elements match items. + +#### Signature + +```go +func PropArray(items *Prop, description string, opts ...PropOption) *Prop +``` + +#### Parameters + + + + + + + +#### Returns + +`*Prop` + +#### Source + +[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) + +Line 164. + +*** + +### PropBoolean + +PropBoolean returns a boolean-typed property. + +#### Signature + +```go +func PropBoolean(description string, opts ...PropOption) *Prop +``` + +#### Parameters + + + + + +#### Returns + +`*Prop` + +#### Source + +[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) + +Line 148. + +*** + +### PropEnum + +PropEnum returns a string-typed property constrained to the given closed set (JSON-Schema "enum"). values is typically one of RecordFormatValues(), RecordDirectionValues(), TapDirectionValues(), CodecValues(), or any caller list. + +#### Signature + +```go +func PropEnum(values []string, description string, opts ...PropOption) *Prop +``` + +#### Parameters + + + + + + + +#### Returns + +`*Prop` + +#### Source + +[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) + +Line 156. + +*** + +### PropInteger + +PropInteger returns an integer-typed property. + +#### Signature + +```go +func PropInteger(description string, opts ...PropOption) *Prop +``` + +#### Parameters + + + + + +#### Returns + +`*Prop` + +#### Source + +[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) + +Line 143. + +*** + +### PropNumber + +PropNumber returns a number-typed (floating-point) property. + +#### Signature + +```go +func PropNumber(description string, opts ...PropOption) *Prop +``` + +#### Parameters + + + + + +#### Returns + +`*Prop` + +#### Source + +[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) + +Line 138. + +*** + +### PropObject + +PropObject returns an object-typed property whose nested properties (and nested required list) come from nested. + +#### Signature + +```go +func PropObject(nested *Params, description string, opts ...PropOption) *Prop +``` + +#### Parameters + + + + + + + +#### Returns + +`*Prop` + +#### Source + +[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) + +Line 175. + +*** + +### PropString + +PropString returns a string-typed property with the given description. + +#### Signature + +```go +func PropString(description string, opts ...PropOption) *Prop +``` + +#### Parameters + + + + + +#### Returns + +`*Prop` + +#### Source + +[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) + +Line 133. + +*** + +### RecordDirectionValues + +RecordDirectionValues returns the RecordDirection closed set as wire strings (speak, listen, both), suitable for Params.Enum / PropEnum / WithEnum. + +#### Signature + +```go +func RecordDirectionValues() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) + +Line 307. + +*** + +### RecordFormatValues + +RecordFormatValues returns the RecordFormat closed set as wire strings (mp3, wav, mp4), suitable for Params.Enum / PropEnum / WithEnum. The values are derived from the typed constants, so adding a constant updates the list. + +#### Signature + +```go +func RecordFormatValues() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) + +Line 301. + +*** + +### Required + +Required marks the enclosing property as required. On a top-level Params property it adds the name to the schema's top-level required array; inside an Object it adds to that object's required array. This is the per-property alternative to Params.Required(names...). + +#### Signature + +```go +func Required() PropOption +``` + +#### Returns + +`PropOption` + +#### Source + +[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) + +Line 124. + +*** + +### TapDirectionValues + +TapDirectionValues returns the TapDirection closed set as wire strings (speak, hear, both), suitable for Params.Enum / PropEnum / WithEnum. + +#### Signature + +```go +func TapDirectionValues() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) + +Line 313. + +*** + +### WithEnum + +WithEnum constrains the property to the given closed set, setting the JSON-Schema "enum" keyword. Use it to attach an enum to a String/Integer/… property; the Enum kind constructor is the shorthand for a string enum. + +#### Signature + +```go +func WithEnum(values ...string) PropOption +``` + +#### Parameters + + + +#### Returns + +`PropOption` + +#### Source + +[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) + +Line 116. + +## Type Aliases + +### PropOption + +PropOption mutates a property's JSON-Schema object. Options are applied left to right after the kind and description are set, so a later option overrides an earlier one writing the same key. + +#### Signature + +```go +type PropOption alias +``` + +#### Source + +[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) + +Line 99. + +*** + +### ToolHandler + +ToolHandler is the function signature for SWAIG tool handlers. args contains the parsed function arguments, rawData contains the full request payload including global\_data, call\_id, etc. + +#### Signature + +```go +type ToolHandler alias +``` + +#### Source + +[`pkg/swaig/handler.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/handler.go) + +Line 6. + +## Source + +[`pkg/swaig/codec.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/codec.go) diff --git a/fern/products/sdk-reference/go/agents/swaig/swaig/function-result/index.mdx b/fern/products/sdk-reference/go/agents/swaig/swaig/function-result/index.mdx new file mode 100644 index 0000000000..c7781757e9 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/swaig/swaig/function-result/index.mdx @@ -0,0 +1,1451 @@ +--- +slug: "/reference/go/agents/swaig/swaig/function-result" +title: "FunctionResult" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/swaig.FunctionResult" + parent: "agents.swaig.swaig" + module: "agents.swaig.swaig" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go" +--- +# `FunctionResult` + +FunctionResult represents the response from a SWAIG tool handler. It contains a text response, optional actions, and post-processing control. All mutating methods return \*FunctionResult for method chaining. + +## Signature + +```go +type FunctionResult struct +``` + +## Methods + +### Actions + +Actions returns the list of actions added to this result. + +#### Signature + +```go +func (*FunctionResult) Actions() []map[string]any +``` + +#### Returns + +`[]map[string]any` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 40. + +*** + +### AddAction + +AddAction appends a single named action to the result. + +#### Signature + +```go +func (*FunctionResult) AddAction(name string, data any) *FunctionResult +``` + +#### Parameters + + + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 64. + +*** + +### AddActions + +AddActions appends multiple actions to the result. + +#### Signature + +```go +func (*FunctionResult) AddActions(actions []map[string]any) *FunctionResult +``` + +#### Parameters + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 70. + +*** + +### AddDynamicHints + +AddDynamicHints adds dynamic speech recognition hints during a call. + +#### Signature + +```go +func (*FunctionResult) AddDynamicHints(hints []any) *FunctionResult +``` + +#### Parameters + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 429. + +*** + +### ClearDynamicHints + +ClearDynamicHints removes all dynamic speech recognition hints. + +#### Signature + +```go +func (*FunctionResult) ClearDynamicHints() *FunctionResult +``` + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 434. + +*** + +### Connect + +Connect adds a connect action to transfer/connect the call to another destination. If final is true, the call permanently transfers (exits the agent). If final is false, the call returns to the agent when the far end hangs up. The from parameter sets the caller ID; pass empty string to use the call's default. + +#### Signature + +```go +func (*FunctionResult) Connect(destination string, final bool, from string) *FunctionResult +``` + +#### Parameters + + + + + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 104. + +*** + +### EnableExtensiveData + +EnableExtensiveData sends full data to LLM for this turn only. + +#### Signature + +```go +func (*FunctionResult) EnableExtensiveData(enabled bool) *FunctionResult +``` + +#### Parameters + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 461. + +*** + +### EnableFunctionsOnTimeout + +EnableFunctionsOnTimeout enables or disables function calls on speaker timeout. + +#### Signature + +```go +func (*FunctionResult) EnableFunctionsOnTimeout(enabled bool) *FunctionResult +``` + +#### Parameters + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 456. + +*** + +### ExecuteRpc + +ExecuteRpc executes an RPC method on a call. Pass empty strings for callID and nodeID to omit them from the payload. + +#### Signature + +```go +func (*FunctionResult) ExecuteRpc(method string, params map[string]any, callID string, nodeID string) *FunctionResult +``` + +#### Parameters + + + + + + + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 943. + +*** + +### ExecuteSwml + +ExecuteSwml executes SWML content. If transfer is true, the call exits the agent after execution. swmlContent can be a map\[string]any or a string (raw SWML JSON). + +#### Signature + +```go +func (*FunctionResult) ExecuteSwml(swmlContent any, transfer bool) *FunctionResult +``` + +#### Parameters + + + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 474. + +*** + +### Hangup + +Hangup terminates the call. + +#### Signature + +```go +func (*FunctionResult) Hangup() *FunctionResult +``` + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 146. + +*** + +### Hold + +Hold puts the call on hold with the given timeout in seconds. Timeout is clamped to the range \[0, 900]. + +#### Signature + +```go +func (*FunctionResult) Hold(timeout int) *FunctionResult +``` + +#### Parameters + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 152. + +*** + +### JoinConference + +JoinConference joins an ad-hoc audio conference. Pass nil for opts to use default behavior (muted=false, beep="true", no holdAudio). + +#### Signature + +```go +func (*FunctionResult) JoinConference(name string, opts *JoinConferenceOptions) *FunctionResult +``` + +#### Parameters + + + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 547. + +*** + +### JoinRoom + +JoinRoom joins a RELAY room for multi-party communication. + +#### Signature + +```go +func (*FunctionResult) JoinRoom(name string) *FunctionResult +``` + +#### Parameters + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 653. + +*** + +### Pay + +Pay processes a payment using SWML pay action. connectorURL is the only required parameter. opts may be nil to use Python SDK defaults for all optional parameters. + +#### Signature + +```go +func (*FunctionResult) Pay(connectorURL string, opts *PayOptions) *FunctionResult +``` + +#### Parameters + + + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 817. + +*** + +### PlayBackgroundFile + +PlayBackgroundFile plays an audio or video file in the background. If wait is true, attention-getting behavior is suppressed during playback. + +#### Signature + +```go +func (*FunctionResult) PlayBackgroundFile(filename string, wait bool) *FunctionResult +``` + +#### Parameters + + + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 301. + +*** + +### PostProcess + +PostProcess returns whether post-processing is enabled. + +#### Signature + +```go +func (*FunctionResult) PostProcess() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 45. + +*** + +### RecordCall + +RecordCall starts background call recording using SWML. controlID, stereo, format, and direction are the primary parameters. Use opts to specify additional optional parameters (pass nil to use defaults). + +format is the defined string type RecordFormat: the Format\* constants give autocomplete + a compile-time typo check, while Go's untyped-constant auto-conversion keeps a bare "wav" literal compiling — parity with the Python reference's str format. It is written to the wire as a plain string. + +direction is the defined string type RecordDirection (\{speak, listen, both\} — the RecordDirection\* constants); like format it autocompletes + typo-checks at compile time while a bare "both" literal still compiles, and is written to the wire as a plain string. Note this set differs from TapDirection (\{speak, hear, both\}) — record\_call uses "listen", tap uses "hear". + +#### Signature + +```go +func (*FunctionResult) RecordCall( + controlID string, + stereo bool, + format RecordFormat, + direction RecordDirection, + opts *RecordCallOptions +) *FunctionResult +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 356. + +*** + +### RemoveGlobalData + +RemoveGlobalData removes global agent data variables by key slice. + +#### Signature + +```go +func (*FunctionResult) RemoveGlobalData(keys []string) *FunctionResult +``` + +#### Parameters + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 191. + +*** + +### RemoveGlobalDataKey + +RemoveGlobalDataKey removes a single global agent data variable by key. This matches the Python SDK's Union\[str, List\[str]] behavior for a bare string argument, which emits the key as a string (not a one-element array) in the action payload. + +#### Signature + +```go +func (*FunctionResult) RemoveGlobalDataKey(key string) *FunctionResult +``` + +#### Parameters + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 198. + +*** + +### RemoveMetadata + +RemoveMetadata removes metadata keys from the current function's scope. + +#### Signature + +```go +func (*FunctionResult) RemoveMetadata(keys []string) *FunctionResult +``` + +#### Parameters + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 208. + +*** + +### RemoveMetadataKey + +RemoveMetadataKey removes a single metadata key from the current function's scope. This matches the Python SDK's Union\[str, List\[str]] behavior for a bare string argument, which emits the key as a string (not a one-element array) in the action payload. + +#### Signature + +```go +func (*FunctionResult) RemoveMetadataKey(key string) *FunctionResult +``` + +#### Parameters + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 215. + +*** + +### ReplaceInHistory + +ReplaceInHistory replaces the tool call and result pair in conversation history. If text is a string, the tool call is replaced with an assistant message containing that text. If text is a bool and true, the pair is removed from history entirely. + +#### Signature + +```go +func (*FunctionResult) ReplaceInHistory(text any) *FunctionResult +``` + +#### Parameters + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 280. + +*** + +### Response + +Response returns the natural language response text. + +#### Signature + +```go +func (*FunctionResult) Response() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 35. + +*** + +### RpcAiMessage + +RpcAiMessage injects a message into an AI agent on another call. role defaults to "system" when empty, matching the Python SDK default. This matches the Python SDK's rpc\_ai\_message() which calls execute\_rpc(method="ai\_message", ...). + +#### Signature + +```go +func (*FunctionResult) RpcAiMessage(callID string, messageText string, role string) *FunctionResult +``` + +#### Parameters + + + + + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 995. + +*** + +### RpcAiUnhold + +RpcAiUnhold unholds another call. This matches the Python SDK's rpc\_ai\_unhold() which calls execute\_rpc(method="ai\_unhold", ...). + +#### Signature + +```go +func (*FunctionResult) RpcAiUnhold(callID string) *FunctionResult +``` + +#### Parameters + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 1007. + +*** + +### RpcDial + +RpcDial dials out to a number with a destination SWML URL using execute\_rpc. deviceType defaults to "phone" when empty. This matches the Python SDK's rpc\_dial() which calls execute\_rpc(method="dial", ...). + +#### Signature + +```go +func (*FunctionResult) RpcDial(toNumber string, fromNumber string, destSwml string, deviceType string) *FunctionResult +``` + +#### Parameters + + + + + + + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 974. + +*** + +### Say + +Say makes the agent speak specific text. + +#### Signature + +```go +func (*FunctionResult) Say(text string) *FunctionResult +``` + +#### Parameters + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 295. + +*** + +### SendSms + +SendSms sends a text message to a PSTN phone number. Pass empty string for body if only sending media, nil for optional slices, and empty string for region to omit it. + +#### Signature + +```go +func (*FunctionResult) SendSms( + toNumber string, + fromNumber string, + body string, + media []string, + tags []string, + region string +) *FunctionResult +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 739. + +*** + +### SetEndOfSpeechTimeout + +SetEndOfSpeechTimeout adjusts the end-of-speech timeout in milliseconds. + +#### Signature + +```go +func (*FunctionResult) SetEndOfSpeechTimeout(ms int) *FunctionResult +``` + +#### Parameters + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 440. + +*** + +### SetMetadata + +SetMetadata sets metadata scoped to the current function's meta\_data\_token. + +#### Signature + +```go +func (*FunctionResult) SetMetadata(data map[string]any) *FunctionResult +``` + +#### Parameters + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 203. + +*** + +### SetPostProcess + +SetPostProcess controls whether the AI takes another turn before executing actions. + +#### Signature + +```go +func (*FunctionResult) SetPostProcess(postProcess bool) *FunctionResult +``` + +#### Parameters + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 58. + +*** + +### SetResponse + +SetResponse sets the natural language response text. + +#### Signature + +```go +func (*FunctionResult) SetResponse(response string) *FunctionResult +``` + +#### Parameters + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 52. + +*** + +### SetSpeechEventTimeout + +SetSpeechEventTimeout adjusts the speech event timeout in milliseconds. + +#### Signature + +```go +func (*FunctionResult) SetSpeechEventTimeout(ms int) *FunctionResult +``` + +#### Parameters + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 445. + +*** + +### SimulateUserInput + +SimulateUserInput queues simulated user input text. Emits action key "user\_input" matching the Python SDK's add\_action("user\_input", text). + +#### Signature + +```go +func (*FunctionResult) SimulateUserInput(text string) *FunctionResult +``` + +#### Parameters + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 1013. + +*** + +### SipRefer + +SipRefer sends a SIP REFER for call transfer in SIP environments. + +#### Signature + +```go +func (*FunctionResult) SipRefer(toURI string) *FunctionResult +``` + +#### Parameters + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 666. + +*** + +### Stop + +Stop stops the agent execution. + +#### Signature + +```go +func (*FunctionResult) Stop() *FunctionResult +``` + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 179. + +*** + +### StopBackgroundFile + +StopBackgroundFile stops the currently playing background file. + +#### Signature + +```go +func (*FunctionResult) StopBackgroundFile() *FunctionResult +``` + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 309. + +*** + +### StopRecordCall + +StopRecordCall stops an active background call recording. + +#### Signature + +```go +func (*FunctionResult) StopRecordCall(controlID string) *FunctionResult +``` + +#### Parameters + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 409. + +*** + +### StopTap + +StopTap stops an active tap stream. + +#### Signature + +```go +func (*FunctionResult) StopTap(controlID string) *FunctionResult +``` + +#### Parameters + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 719. + +*** + +### String + +String returns a human-readable representation including the response and action count. + +#### Signature + +```go +func (*FunctionResult) String() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 1053. + +*** + +### SwitchContext + +SwitchContext changes the agent context/prompt during conversation. Only non-empty/true fields are included in the action. + +#### Signature + +```go +func (*FunctionResult) SwitchContext( + systemPrompt string, + userPrompt string, + consolidate bool, + fullReset bool, + isolated bool +) *FunctionResult +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 252. + +*** + +### SwmlChangeContext + +SwmlChangeContext transitions to a different conversation context. Emits action key "change\_context" with the context name as a plain string value, matching the Python SDK's add\_action("change\_context", context\_name). + +#### Signature + +```go +func (*FunctionResult) SwmlChangeContext(contextName string) *FunctionResult +``` + +#### Parameters + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 246. + +*** + +### SwmlChangeStep + +SwmlChangeStep transitions to a different conversation step. Emits action key "change\_step" with the step name as a plain string value, matching the Python SDK's add\_action("change\_step", step\_name). + +#### Signature + +```go +func (*FunctionResult) SwmlChangeStep(stepName string) *FunctionResult +``` + +#### Parameters + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 239. + +*** + +### SwmlTransfer + +SwmlTransfer adds a SWML transfer action with an AI response for when control returns. + +#### Signature + +```go +func (*FunctionResult) SwmlTransfer(dest string, aiResponse string, final bool) *FunctionResult +``` + +#### Parameters + + + + + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 127. + +*** + +### SwmlUserEvent + +SwmlUserEvent sends a user event through SWML for real-time UI updates. + +#### Signature + +```go +func (*FunctionResult) SwmlUserEvent(eventData map[string]any) *FunctionResult +``` + +#### Parameters + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 220. + +*** + +### Tap + +Tap starts background call tapping, streaming media to the given URI. rtpPtime sets the packetization time in milliseconds for RTP streams (0 = use default of 20ms). Pass empty string for statusURL to omit it. + +direction is the defined string type TapDirection (\{speak, hear, both\} — the TapDirection\* constants) and codec is the defined string type Codec (\{PCMU, PCMA\} — the Codec\* constants); both autocomplete + typo-check at compile time while bare "both"/"PCMU" literals still compile, and are written to the wire as plain strings. Note TapDirection (\{speak, hear, both\}) differs from RecordDirection (\{speak, listen, both\}), and this 2-value tap Codec is distinct from the larger RELAY connect/stream codec superset (left a bare string). + +#### Signature + +```go +func (*FunctionResult) Tap( + uri string, + controlID string, + direction TapDirection, + codec Codec, + rtpPtime int, + statusURL string +) *FunctionResult +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 689. + +*** + +### ToggleFunctions + +ToggleFunctions enables or disables specific SWAIG functions. Each toggle should have "function" and "active" keys. + +#### Signature + +```go +func (*FunctionResult) ToggleFunctions(toggles []map[string]any) *FunctionResult +``` + +#### Parameters + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 451. + +*** + +### ToMap + +ToMap serializes the FunctionResult to a map suitable for JSON encoding. The "action" key is only included if there are actions. The "post\_process" key is only included if true. + +#### Signature + +```go +func (*FunctionResult) ToMap() map[string]any +``` + +#### Returns + +`map[string]any` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 78. + +*** + +### UpdateGlobalData + +UpdateGlobalData sets or updates global agent data variables. + +#### Signature + +```go +func (*FunctionResult) UpdateGlobalData(data map[string]any) *FunctionResult +``` + +#### Parameters + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 186. + +*** + +### UpdateSettings + +UpdateSettings updates agent runtime settings such as temperature, top\_p, etc. + +#### Signature + +```go +func (*FunctionResult) UpdateSettings(settings map[string]any) *FunctionResult +``` + +#### Parameters + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 466. + +*** + +### WaitForUser + +WaitForUser controls how the agent waits for user input. Pass nil for enabled/timeout to omit those fields. If answerFirst is true, the value is set to "answer\_first" regardless of other parameters. + +#### Signature + +```go +func (*FunctionResult) WaitForUser(enabled *bool, timeout *int, answerFirst bool) *FunctionResult +``` + +#### Parameters + + + + + + + +#### Returns + +`*FunctionResult` + +#### Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 165. + +## Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 18. diff --git a/fern/products/sdk-reference/go/agents/swaig/swaig/index.mdx b/fern/products/sdk-reference/go/agents/swaig/swaig/index.mdx new file mode 100644 index 0000000000..93fba22c12 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/swaig/swaig/index.mdx @@ -0,0 +1,228 @@ +--- +slug: "/reference/go/agents/swaig/swaig" +title: "swaig" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "module" + language: "go" + qualified_name: "agents.swaig.swaig" + parent: "github.com/signalwire/signalwire-go/pkg/swaig" + module: "agents.swaig" +--- +# `swaig` + +## Classes + + + + FunctionResult represents the response from a SWAIG tool handler. It contains a text response, optional actions, and post-processing control. All mutating methods return \*FunctionResult for method chaining. + + + + JoinConferenceOptions holds optional parameters for JoinConference beyond the required name. + + + + Params accumulates SWAIG tool-parameter properties and the top-level required list, then renders them into the exact map\[string]any / \[]string pair that agent.ToolDefinition.Parameters and .Required expect. + + + + PayOptions holds all optional parameters for the Pay method. + + + + Prop is a single JSON-Schema property under construction. It is produced by the kind constructors (PropString, PropArray, PropObject, …) for use as the item schema of Array, and is otherwise an internal detail of Params. Build it via the Prop\* constructors; the zero value is not usable. + + + + RecordCallOptions holds optional parameters for RecordCall beyond the required fields. + + + +## Enums + +### Codec + +Codec is the closed set of audio codecs accepted by FunctionResult.Tap's codec argument (the SWAIG tap media stream), as a defined string type with typed constants. It gives Go callers editor autocompletion plus call-site typo checking — a bare string like "PCUM" only fails downstream (the server rejects it), whereas a mistyped constant fails to compile. + +Because Go auto-converts untyped string-constant literals to a defined string type, every call site keeps working both ways: + +``` +fr.Tap("rtp://h:1", "id", swaig.TapDirectionBoth, swaig.CodecPCMA, 0, "") // typed const +fr.Tap("rtp://h:1", "id", "both", "PCMA", 0, "") // bare string still compiles +``` + +Codec is a string subtype, so the value written into the SWML tap params is byte-identical to the bare string the reference uses — parity with Python's tap(codec=...) keyword (a plain str). The enumerator emits the codec param as union\, so signature drift stays 0 against the reference's str (the string member absorbs). + +IMPORTANT: this 2-value SWAIG-tap set (\{PCMU, PCMA\}, validated at function\_result.py:1217) is DISTINCT from the larger RELAY connect/stream device codec superset (\{PCMU, PCMA, OPUS, G729, G722, VP8, H264, ...\}, comma-joinable). The relay codec is genuinely open/multi-value and is deliberately left a bare string (see PORT\_ADDITIONS / the journal §3) — this type must never be reused there. + +#### Signature + +```go +type Codec alias +``` + +#### Examples + + + + ```go + fr.Tap("rtp://h:1", "id", swaig.TapDirectionBoth, swaig.CodecPCMA, 0, "") // typed const + fr.Tap("rtp://h:1", "id", "both", "PCMA", 0, "") // bare string still compiles + ``` + + + + ```go + fr.Tap("rtp://h:1", "id", swaig.TapDirectionBoth, swaig.CodecPCMA, 0, "") // typed const + fr.Tap("rtp://h:1", "id", "both", "PCMA", 0, "") // bare string still compiles + ``` + + + +#### Source + +[`pkg/swaig/codec.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/codec.go) + +Line 27. + +*** + +### RecordDirection + +RecordDirection is the closed set of audio directions accepted by FunctionResult.RecordCall's direction argument, as a defined string type with typed constants. It gives Go callers editor autocompletion plus call-site typo checking — a bare string like "lisetn" only fails downstream (the server rejects it), whereas a mistyped constant fails to compile. + +Because Go auto-converts untyped string-constant literals to a defined string type, every call site keeps working both ways: + +``` +fr.RecordCall("id", true, swaig.FormatWAV, swaig.RecordDirectionListen, nil) // typed const +fr.RecordCall("id", true, swaig.FormatWAV, "listen", nil) // bare string still compiles +``` + +RecordDirection is a string subtype, so the value written into the SWML record\_call params is byte-identical to the bare string the reference uses — parity with Python's record\_call(direction=...) keyword (a plain str). The enumerator emits the direction param as union\, so signature drift stays 0 against the reference's str (the string member absorbs). + +IMPORTANT: this set (\{speak, listen, both\}) is DISTINCT from TapDirection (\{speak, hear, both\}) — record\_call uses "listen" where tap uses "hear". The Python reference validates the two with two different lists (function\_result.py:917 vs :1212), so they are modelled as two separate types and must never be unified. (And both differ again from the RELAY play/record/ tap direction vocabulary — three distinct vocabularies in all.) + +#### Signature + +```go +type RecordDirection alias +``` + +#### Examples + + + + ```go + fr.RecordCall("id", true, swaig.FormatWAV, swaig.RecordDirectionListen, nil) // typed const + fr.RecordCall("id", true, swaig.FormatWAV, "listen", nil) // bare string still compiles + ``` + + + + ```go + fr.RecordCall("id", true, swaig.FormatWAV, swaig.RecordDirectionListen, nil) // typed const + fr.RecordCall("id", true, swaig.FormatWAV, "listen", nil) // bare string still compiles + ``` + + + +#### Source + +[`pkg/swaig/record_direction.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/record_direction.go) + +Line 28. + +*** + +### RecordFormat + +RecordFormat is the closed set of call-recording container formats as a defined string type with typed constants. FunctionResult.RecordCall takes it for the format argument, giving Go callers editor autocompletion plus call-site typo checking — a bare string like "wvv" only fails downstream, whereas a mistyped constant fails to compile. + +Because Go auto-converts untyped string-constant literals to a defined string type, every call site keeps working both ways: + +``` +fr.RecordCall("id", true, swaig.FormatWAV, "both", nil) // typed const +fr.RecordCall("id", true, "wav", "both", nil) // bare string still compiles +``` + +RecordFormat is a string subtype, so the value written into the SWML record params is byte-identical to the bare string the reference uses — parity with Python's record\_call(format=...) keyword (a plain str). The enumerator emits it as union\, so signature drift stays 0 against the reference's str (the string member absorbs). + +#### Signature + +```go +type RecordFormat alias +``` + +#### Examples + + + + ```go + fr.RecordCall("id", true, swaig.FormatWAV, "both", nil) // typed const + fr.RecordCall("id", true, "wav", "both", nil) // bare string still compiles + ``` + + + + ```go + fr.RecordCall("id", true, swaig.FormatWAV, "both", nil) // typed const + fr.RecordCall("id", true, "wav", "both", nil) // bare string still compiles + ``` + + + +#### Source + +[`pkg/swaig/record_format.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/record_format.go) + +Line 20. + +*** + +### TapDirection + +TapDirection is the closed set of audio directions accepted by FunctionResult.Tap's direction argument, as a defined string type with typed constants. It gives Go callers editor autocompletion plus call-site typo checking — a bare string like "haer" only fails downstream (the server rejects it), whereas a mistyped constant fails to compile. + +Because Go auto-converts untyped string-constant literals to a defined string type, every call site keeps working both ways: + +``` +fr.Tap("rtp://h:1", "id", swaig.TapDirectionHear, swaig.CodecPCMU, 0, "") // typed const +fr.Tap("rtp://h:1", "id", "hear", "PCMU", 0, "") // bare string still compiles +``` + +TapDirection is a string subtype, so the value written into the SWML tap params is byte-identical to the bare string the reference uses — parity with Python's tap(direction=...) keyword (a plain str). The enumerator emits the direction param as union\, so signature drift stays 0 against the reference's str (the string member absorbs). + +IMPORTANT: this set (\{speak, hear, both\}) is DISTINCT from RecordDirection (\{speak, listen, both\}) — tap uses "hear" where record\_call uses "listen". The Python reference validates the two with two different lists (function\_result.py:1212 vs :917), so they are modelled as two separate types and must never be unified. (And both differ again from the RELAY play/record/ tap direction vocabulary — three distinct vocabularies in all.) + +#### Signature + +```go +type TapDirection alias +``` + +#### Examples + + + + ```go + fr.Tap("rtp://h:1", "id", swaig.TapDirectionHear, swaig.CodecPCMU, 0, "") // typed const + fr.Tap("rtp://h:1", "id", "hear", "PCMU", 0, "") // bare string still compiles + ``` + + + + ```go + fr.Tap("rtp://h:1", "id", swaig.TapDirectionHear, swaig.CodecPCMU, 0, "") // typed const + fr.Tap("rtp://h:1", "id", "hear", "PCMU", 0, "") // bare string still compiles + ``` + + + +#### Source + +[`pkg/swaig/tap_direction.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/tap_direction.go) + +Line 27. diff --git a/fern/products/sdk-reference/go/agents/swaig/swaig/join-conference-options/index.mdx b/fern/products/sdk-reference/go/agents/swaig/swaig/join-conference-options/index.mdx new file mode 100644 index 0000000000..650522e87a --- /dev/null +++ b/fern/products/sdk-reference/go/agents/swaig/swaig/join-conference-options/index.mdx @@ -0,0 +1,99 @@ +--- +slug: "/reference/go/agents/swaig/swaig/join-conference-options" +title: "JoinConferenceOptions" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/swaig.JoinConferenceOptions" + parent: "agents.swaig.swaig" + module: "agents.swaig.swaig" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go" +--- +# `JoinConferenceOptions` + +JoinConferenceOptions holds optional parameters for JoinConference beyond the required name. + +## Signature + +```go +type JoinConferenceOptions struct +``` + +## Properties + + + Beep controls beep behavior: "true" (default), "false", "onEnter", "onExit". + + + + Coach sets the SWML Call ID or CXML CallSid for coaching. + + + + EndOnExit controls whether the conference ends when this participant exits (default false). + + + + MaxParticipants sets the maximum number of participants (\<= 250). 0 uses server default. + + + + Muted joins the conference muted when true. + + + + Record sets the recording mode: "do-not-record" (default) or "record-from-start". + + + + RecordingStatusCallback is the URL for recording status callbacks. + + + + RecordingStatusCallbackEvent sets recording events to report. + + + + RecordingStatusCallbackMethod sets the HTTP method for recording callbacks ("GET" or "POST"). + + + + Region sets the conference region. + + + + Result sets switch-on-return-value behavior (object or array). + + + + StartOnEnter controls whether the conference starts when this participant enters (default true in Python). + + + + StatusCallback is the URL for status callbacks. + + + + StatusCallbackEvent specifies events to report (space-separated). + + + + StatusCallbackMethod sets the HTTP method for status callbacks ("GET" or "POST"). + + + + Trim controls silence trimming: "trim-silence" (default) or "do-not-trim". + + + + WaitURL is the SWML URL for hold music (replaces the old holdAudio parameter). + + +## Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 508. diff --git a/fern/products/sdk-reference/go/agents/swaig/swaig/params/index.mdx b/fern/products/sdk-reference/go/agents/swaig/swaig/params/index.mdx new file mode 100644 index 0000000000..a4ddeede52 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/swaig/swaig/params/index.mdx @@ -0,0 +1,369 @@ +--- +slug: "/reference/go/agents/swaig/swaig/params" +title: "Params" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/swaig.Params" + parent: "agents.swaig.swaig" + module: "agents.swaig.swaig" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go" +--- +# `Params` + +Params accumulates SWAIG tool-parameter properties and the top-level required list, then renders them into the exact map\[string]any / \[]string pair that agent.ToolDefinition.Parameters and .Required expect. + +The zero value is not usable; construct with NewParams. Methods return the receiver so calls chain fluently. Params is not safe for concurrent mutation (build it on one goroutine, then read it). + +## Signature + +```go +type Params struct +``` + +## Methods + +### Array + +Array adds an array-typed property named name whose elements match items. + +#### Signature + +```go +func (*Params) Array(name string, items *Prop, description string, opts ...PropOption) *Params +``` + +#### Parameters + + + + + + + + + +#### Returns + +`*Params` + +#### Source + +[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) + +Line 220. + +*** + +### Boolean + +Boolean adds a boolean-typed property named name. + +#### Signature + +```go +func (*Params) Boolean(name string, description string, opts ...PropOption) *Params +``` + +#### Parameters + + + + + + + +#### Returns + +`*Params` + +#### Source + +[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) + +Line 207. + +*** + +### Build + +Build renders both halves at once: the properties map (for ToolDefinition.Parameters) and the required list (for ToolDefinition.Required). It is sugar for (b.Properties(), b.RequiredNames()): + +``` +params, required := swaig.NewParams(). + String("service", "The service").Required("service").Build() +td := agent.ToolDefinition{Name: "x", Parameters: params, Required: required} +``` + +#### Signature + +```go +func (*Params) Build() (map[string]any, []string) +``` + +#### Returns + +`(map[string]any, []string)` + +#### Examples + + + + ```go + params, required := swaig.NewParams(). + String("service", "The service").Required("service").Build() + td := agent.ToolDefinition{Name: "x", Parameters: params, Required: required} + ``` + + + + ```go + params, required := swaig.NewParams(). + String("service", "The service").Required("service").Build() + td := agent.ToolDefinition{Name: "x", Parameters: params, Required: required} + ``` + + + +#### Source + +[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) + +Line 290. + +*** + +### Enum + +Enum adds a string-typed property named name constrained to the closed set values (JSON-Schema "enum"). Pass RecordFormatValues() / RecordDirectionValues() / TapDirectionValues() / CodecValues() to wire one of the Tier-1 typed enums, or any caller list. + +#### Signature + +```go +func (*Params) Enum(name string, values []string, description string, opts ...PropOption) *Params +``` + +#### Parameters + + + + + + + + + +#### Returns + +`*Params` + +#### Source + +[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) + +Line 215. + +*** + +### Integer + +Integer adds an integer-typed property named name. + +#### Signature + +```go +func (*Params) Integer(name string, description string, opts ...PropOption) *Params +``` + +#### Parameters + + + + + + + +#### Returns + +`*Params` + +#### Source + +[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) + +Line 202. + +*** + +### Number + +Number adds a number-typed (floating-point) property named name. + +#### Signature + +```go +func (*Params) Number(name string, description string, opts ...PropOption) *Params +``` + +#### Parameters + + + + + + + +#### Returns + +`*Params` + +#### Source + +[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) + +Line 197. + +*** + +### Object + +Object adds an object-typed property named name whose nested properties come from nested. + +#### Signature + +```go +func (*Params) Object(name string, nested *Params, description string, opts ...PropOption) *Params +``` + +#### Parameters + + + + + + + + + +#### Returns + +`*Params` + +#### Source + +[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) + +Line 226. + +*** + +### Properties + +Properties renders the accumulated properties as a JSON-Schema _properties_ map, assignable directly to agent.ToolDefinition.Parameters. The result is a fresh map on each call (callers may mutate it freely); it is byte-identical to the equivalent hand-written map\[string]any literal. + +A builder with no properties returns an empty (non-nil) map, so the caller can pass it straight through; assign nil explicitly if you want the "no schema" path (ToolDefinition omits the parameters block when Parameters is nil/empty). + +#### Signature + +```go +func (*Params) Properties() map[string]any +``` + +#### Returns + +`map[string]any` + +#### Source + +[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) + +Line 252. + +*** + +### Required + +Required marks one or more already-declared (or yet-to-be-declared) property names as required at the top level. Duplicate names are ignored; first-seen order is preserved. Returns the receiver for chaining. + +#### Signature + +```go +func (*Params) Required(names ...string) *Params +``` + +#### Parameters + + + +#### Returns + +`*Params` + +#### Source + +[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) + +Line 233. + +*** + +### RequiredNames + +RequiredNames returns the top-level required property names in first-seen order, assignable directly to agent.ToolDefinition.Required. It returns nil when nothing is required (matching a hand-written `Required: nil`); a fresh slice is returned on each call. + +(The fluent setter is Required(names ...string) \*Params; this getter is named RequiredNames so the two don't collide on the method set.) + +#### Signature + +```go +func (*Params) RequiredNames() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) + +Line 279. + +*** + +### String + +String adds a string-typed property named name. + +#### Signature + +```go +func (*Params) String(name string, description string, opts ...PropOption) *Params +``` + +#### Parameters + + + + + + + +#### Returns + +`*Params` + +#### Source + +[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) + +Line 192. + +## Source + +[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) + +Line 57. diff --git a/fern/products/sdk-reference/go/agents/swaig/swaig/pay-options/index.mdx b/fern/products/sdk-reference/go/agents/swaig/swaig/pay-options/index.mdx new file mode 100644 index 0000000000..741a643e62 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/swaig/swaig/pay-options/index.mdx @@ -0,0 +1,107 @@ +--- +slug: "/reference/go/agents/swaig/swaig/pay-options" +title: "PayOptions" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/swaig.PayOptions" + parent: "agents.swaig.swaig" + module: "agents.swaig.swaig" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go" +--- +# `PayOptions` + +PayOptions holds all optional parameters for the Pay method. + +## Signature + +```go +type PayOptions struct +``` + +## Properties + + + AIResponse is the message set via the "set" verb that always precedes the pay verb; empty string uses the Python default status message. The set verb is always emitted (Python has no suppression path), matching pay()'s SWML. + + + + ChargeAmount is the amount to charge as a decimal string (e.g. "9.99"). + + + + Currency is the currency code. Defaults to "usd". + + + + Description is a custom payment description. + + + + InputMethod is the method to collect payment details ("dtmf" or "voice"). Defaults to "dtmf". + + + + Language is the language for prompts. Defaults to "en-US". + + + + MaxAttempts is the number of retry attempts. Defaults to 1. + + + + MinPostalCodeLength sets the minimum number of postal code digits. Defaults to 0. + + + + Parameters is an array of name/value pairs for the payment connector. + + + + PaymentMethod is the payment method type. Defaults to "credit-card". + + + + PostalCode controls whether to prompt for postal code, or supplies the actual code. String value is used as-is; bool true/false becomes "true"/"false". + + + + Prompts is an array of custom prompt configurations. + + + + SecurityCode controls whether to prompt for security code. Defaults to true. Use SecurityCodeSet to override; zero value (false) is treated as "not set". + + + + SecurityCodeSet must be true to explicitly set SecurityCode=false. + + + + StatusURL is the URL for payment status change notifications. + + + + Timeout is the seconds to wait for the next digit. Defaults to 5. + + + + TokenType is the payment token type: "one-time" or "reusable". Defaults to "reusable". + + + + ValidCardTypes is a space-separated list of card types. Defaults to "visa mastercard amex". + + + + Voice is the TTS voice to use. Defaults to "woman". + + +## Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 769. diff --git a/fern/products/sdk-reference/go/agents/swaig/swaig/prop/index.mdx b/fern/products/sdk-reference/go/agents/swaig/swaig/prop/index.mdx new file mode 100644 index 0000000000..afdd00eb02 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/swaig/swaig/prop/index.mdx @@ -0,0 +1,29 @@ +--- +slug: "/reference/go/agents/swaig/swaig/prop" +title: "Prop" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/swaig.Prop" + parent: "agents.swaig.swaig" + module: "agents.swaig.swaig" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go" +--- +# `Prop` + +Prop is a single JSON-Schema property under construction. It is produced by the kind constructors (PropString, PropArray, PropObject, …) for use as the item schema of Array, and is otherwise an internal detail of Params. Build it via the Prop\* constructors; the zero value is not usable. + +## Signature + +```go +type Prop struct +``` + +## Source + +[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) + +Line 84. diff --git a/fern/products/sdk-reference/go/agents/swaig/swaig/record-call-options/index.mdx b/fern/products/sdk-reference/go/agents/swaig/swaig/record-call-options/index.mdx new file mode 100644 index 0000000000..9fc2fac430 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/swaig/swaig/record-call-options/index.mdx @@ -0,0 +1,71 @@ +--- +slug: "/reference/go/agents/swaig/swaig/record-call-options" +title: "RecordCallOptions" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/swaig.RecordCallOptions" + parent: "agents.swaig.swaig" + module: "agents.swaig.swaig" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go" +--- +# `RecordCallOptions` + +RecordCallOptions holds optional parameters for RecordCall beyond the required fields. + +## Signature + +```go +type RecordCallOptions struct +``` + +## Properties + + + Beep plays a beep before recording starts when true. Always emitted (Python emits beep unconditionally; default false). + + + + EndSilenceTimeout is seconds of silence before ending (voicemail-style). Negative value is omitted. + + + + EndSilenceTimeoutSet must be true for EndSilenceTimeout of 0.0 to be included. + + + + InitialTimeout is the time in seconds to wait for speech to start (voicemail-style). Negative value is omitted. + + + + InitialTimeoutSet must be true for InitialTimeout of 0.0 to be included. + + + + InputSensitivity sets the input sensitivity for recording. Always emitted (Python emits input\_sensitivity unconditionally; default 44.0). The Go zero value (0.0) is mapped to the Python default 44.0 — pass a non-zero value to override. + + + + MaxLength is the maximum recording length in seconds. Negative value is omitted. + + + + MaxLengthSet must be true for MaxLength of 0.0 to be included. + + + + StatusURL is the URL to send recording status events to. + + + + Terminators specifies digits that stop recording when pressed. + + +## Source + +[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) + +Line 314. diff --git a/fern/products/sdk-reference/go/agents/swml/index.mdx b/fern/products/sdk-reference/go/agents/swml/index.mdx new file mode 100644 index 0000000000..0b978ff821 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/swml/index.mdx @@ -0,0 +1,854 @@ +--- +slug: "/reference/go/agents/swml" +title: "swml" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "module" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/swml" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/ai_verb_handler.go" +--- +# `swml` + +Package swml provides the SWML (SignalWire Markup Language) document model, builder, and rendering for the SignalWire AI platform. + +SWML documents define call flows, AI agent behavior, and telephony operations. The SignalWire platform fetches SWML from agents and executes it. + +Package swml — URL validation utility to prevent SSRF attacks. Ported from signalwire/utils/url\_validator.py. + +## Signature + +```go +package swml +``` + +## Constants + + + + + + + + + + + +## Modules + + + + + +## Functions + +### ExtractSIPUsername + +ExtractSIPUsername extracts a SIP username from a request body. + +#### Signature + +```go +func ExtractSIPUsername(body map[string]any) string +``` + +#### Parameters + + + +#### Returns + +`string` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 1049. + +*** + +### GetExecutionMode + +GetExecutionMode inspects the process environment and returns the detected runtime mode. The detection order matches the Python and TypeScript SDKs so that the same env vars resolve to the same mode across languages. + +Detection order: + +1. CGI (GATEWAY\_INTERFACE) +2. AWS Lambda (AWS\_LAMBDA\_FUNCTION\_NAME or LAMBDA\_TASK\_ROOT) +3. GCF (FUNCTION\_TARGET, K\_SERVICE, or GOOGLE\_CLOUD\_PROJECT) +4. Azure (AZURE\_FUNCTIONS\_ENVIRONMENT, FUNCTIONS\_WORKER\_RUNTIME, or AzureWebJobsStorage) +5. Server (default fallback) + +#### Signature + +```go +func GetExecutionMode() ExecutionMode +``` + +#### Returns + +`ExecutionMode` + +#### Source + +[`pkg/swml/execution_mode.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/execution_mode.go) + +Line 40. + +*** + +### GetSchema + +GetSchema returns the global singleton Schema loaded from the embedded schema.json. + +#### Signature + +```go +func GetSchema() (*Schema, error) +``` + +#### Returns + +`(*Schema, error)` + +#### Source + +[`pkg/swml/schema.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema.go) + +Line 42. + +*** + +### IsServerlessMode + +IsServerlessMode reports whether the process is running in any serverless environment (i.e. NOT in plain long-running server mode). + +Mirrors Python's is\_serverless\_mode(): + +``` +def is_serverless_mode() -> bool: + return get_execution_mode() != 'server' +``` + +#### Signature + +```go +func IsServerlessMode() bool +``` + +#### Returns + +`bool` + +#### Examples + + + + ```go + def is_serverless_mode() -> bool: + return get_execution_mode() != 'server' + ``` + + + + ```go + def is_serverless_mode() -> bool: + return get_execution_mode() != 'server' + ``` + + + +#### Source + +[`pkg/swml/execution_mode.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/execution_mode.go) + +Line 67. + +*** + +### LoadSchemaFromFile + +LoadSchemaFromFile loads a SWML schema from the given file path instead of the embedded schema.json. Mirrors Python's schema\_path constructor param. + +#### Signature + +```go +func LoadSchemaFromFile(path string) (*Schema, error) +``` + +#### Parameters + + + +#### Returns + +`(*Schema, error)` + +#### Source + +[`pkg/swml/schema.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema.go) + +Line 163. + +*** + +### NewAIVerbHandler + +NewAIVerbHandler returns a new AIVerbHandler ready for registration. + +Example: + +``` +svc.RegisterVerbHandler(swml.NewAIVerbHandler()) +``` + +#### Signature + +```go +func NewAIVerbHandler() *AIVerbHandler +``` + +#### Returns + +`*AIVerbHandler` + +#### Examples + + + + ```go + svc.RegisterVerbHandler(swml.NewAIVerbHandler()) + ``` + + + + ```go + svc.RegisterVerbHandler(swml.NewAIVerbHandler()) + ``` + + + +#### Source + +[`pkg/swml/ai_verb_handler.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/ai_verb_handler.go) + +Line 27. + +*** + +### NewDocument + +NewDocument creates a new empty SWML document with default version. + +#### Signature + +```go +func NewDocument() *Document +``` + +#### Returns + +`*Document` + +#### Source + +[`pkg/swml/document.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/document.go) + +Line 26. + +*** + +### NewSchemaUtils + +NewSchemaUtils constructs a SchemaUtils. Mirrors Python's “SchemaUtils(schema\_path, schema\_validation=True)“. + +Pass schemaPath="" to use the embedded schema.json bundled with the SDK. schemaValidation=false disables validation; the env var SWML\_SKIP\_SCHEMA\_VALIDATION=1/true/yes also disables it. + +#### Signature + +```go +func NewSchemaUtils(schemaPath string, schemaValidation bool) *SchemaUtils +``` + +#### Parameters + + + + + +#### Returns + +`*SchemaUtils` + +#### Source + +[`pkg/swml/schema_utils.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema_utils.go) + +Line 88. + +*** + +### NewSchemaValidationError + +NewSchemaValidationError constructs a SchemaValidationError. Mirrors Python's SchemaValidationError.**init**(verb\_name, errors). + +#### Signature + +```go +func NewSchemaValidationError(verbName string, errors []string) *SchemaValidationError +``` + +#### Parameters + + + + + +#### Returns + +`*SchemaValidationError` + +#### Source + +[`pkg/swml/schema_utils.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema_utils.go) + +Line 36. + +*** + +### NewService + +NewService creates a new SWML service with the given options. + +#### Signature + +```go +func NewService(opts ...ServiceOption) *Service +``` + +#### Parameters + + + +#### Returns + +`*Service` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 285. + +*** + +### ValidateURL + +ValidateURL reports whether rawURL is safe to fetch (i.e. does not point to a private or internal resource). It returns an error describing why the URL was rejected, or nil if the URL is acceptable. + +Behavior mirrors Python's validate\_url(url, allow\_private=False): + +- Only http and https schemes are accepted. +- A non-empty hostname is required. +- When allowPrivate is false AND the SWML\_ALLOW\_PRIVATE\_URLS env var is not set to "1", "true", or "yes" (case-insensitive), every IP address that the hostname resolves to is checked against the nine blocked CIDR ranges above. If any resolved IP falls in a blocked range the URL is rejected. + +Go idiom: returns (bool, error) instead of a bare bool so callers can log or propagate the rejection reason. Returning (false, nil) never happens — err is always non-nil when the bool is false. + +#### Signature + +```go +func ValidateURL(rawURL string, allowPrivate bool) (bool, error) +``` + +#### Parameters + + + + + +#### Returns + +`(bool, error)` + +#### Source + +[`pkg/swml/url_validator.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/url_validator.go) + +Line 73. + +*** + +### WithAPIKey + +WithAPIKey configures API key authentication. When set, the withSecurity middleware accepts requests where the header named by header equals key. header is the HTTP header name (e.g. "X-API-Key"); pass an empty string to use the default "X-API-Key". Mirrors Python's SecurityConfig.api\_key / api\_key\_header fields and the AuthHandler verify\_api\_key / flask\_decorator behaviour. + +#### Signature + +```go +func WithAPIKey(key string, header string) ServiceOption +``` + +#### Parameters + + + + + +#### Returns + +`ServiceOption` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 184. + +*** + +### WithBasicAuth + +WithBasicAuth sets explicit basic auth credentials. + +#### Signature + +```go +func WithBasicAuth(user string, password string) ServiceOption +``` + +#### Parameters + + + + + +#### Returns + +`ServiceOption` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 161. + +*** + +### WithBearerToken + +WithBearerToken configures Bearer token authentication. When set, the withSecurity middleware accepts requests carrying an "Authorization: Bearer \" header that matches token in addition to (or instead of) Basic Auth. Mirrors Python's SecurityConfig.bearer\_token field and the AuthHandler verify\_bearer\_token / flask\_decorator behaviour. + +#### Signature + +```go +func WithBearerToken(token string) ServiceOption +``` + +#### Parameters + + + +#### Returns + +`ServiceOption` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 174. + +*** + +### WithConfigFile + +WithConfigFile loads a YAML configuration file and applies its `security` section to the Service. Mirrors Python's SecurityConfig(config\_file=...) loader (signalwire/core/security\_config.py \_load\_config\_file). The expected schema is: + +``` +security: + ssl_cert_path: /path/to/cert.pem + ssl_key_path: /path/to/key.pem + domain: example.com + auth: + basic: + user: alice + password: secret + bearer_token: + api_key: + api_key_header: X-API-Key +``` + +Settings from the file are applied AFTER the explicit WithBasicAuth / WithBearerToken / WithAPIKey / WithTLS / WithDomain options, so config-file values take precedence (matching Python's documented load order). If the file cannot be read or parsed, NewService logs a warning and keeps running with the previously-set values; this matches Python's "best-effort" load behaviour and avoids crashing services whose config is missing. + +#### Signature + +```go +func WithConfigFile(path string) ServiceOption +``` + +#### Parameters + + + +#### Returns + +`ServiceOption` + +#### Examples + + + + ```go + security: + ssl_cert_path: /path/to/cert.pem + ssl_key_path: /path/to/key.pem + domain: example.com + auth: + basic: + user: alice + password: secret + bearer_token: + api_key: + api_key_header: X-API-Key + ``` + + + + ```go + security: + ssl_cert_path: /path/to/cert.pem + ssl_key_path: /path/to/key.pem + domain: example.com + auth: + basic: + user: alice + password: secret + bearer_token: + api_key: + api_key_header: X-API-Key + ``` + + + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 267. + +*** + +### WithDomain + +WithDomain sets the domain name used in URL generation when TLS is enabled. Mirrors Python's SecurityConfig.domain / SWML\_DOMAIN env var. + +#### Signature + +```go +func WithDomain(domain string) ServiceOption +``` + +#### Parameters + + + +#### Returns + +`ServiceOption` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 232. + +*** + +### WithHost + +WithHost sets the HTTP server bind host. + +#### Signature + +```go +func WithHost(host string) ServiceOption +``` + +#### Parameters + + + +#### Returns + +`ServiceOption` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 151. + +*** + +### WithName + +WithName sets the service name. + +#### Signature + +```go +func WithName(name string) ServiceOption +``` + +#### Parameters + + + +#### Returns + +`ServiceOption` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 141. + +*** + +### WithPort + +WithPort sets the HTTP server port. + +#### Signature + +```go +func WithPort(port int) ServiceOption +``` + +#### Parameters + + + +#### Returns + +`ServiceOption` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 156. + +*** + +### WithRoute + +WithRoute sets the HTTP route path. + +#### Signature + +```go +func WithRoute(route string) ServiceOption +``` + +#### Parameters + + + +#### Returns + +`ServiceOption` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 146. + +*** + +### WithSchemaPath + +WithSchemaPath overrides the schema file path used for verb validation. By default the embedded schema.json is used. Pass a custom path when testing or when deploying a modified schema alongside your binary. Mirrors Python's schema\_path constructor parameter. + +#### Signature + +```go +func WithSchemaPath(path string) ServiceOption +``` + +#### Parameters + + + +#### Returns + +`ServiceOption` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 240. + +*** + +### WithSchemaValidation + +WithSchemaValidation enables or disables SWML schema validation. Defaults to true (validation on). Set to false, or export SWML\_SKIP\_SCHEMA\_VALIDATION=1, to bypass schema checks. Mirrors Python's schema\_validation constructor parameter. + +#### Signature + +```go +func WithSchemaValidation(enabled bool) ServiceOption +``` + +#### Parameters + + + +#### Returns + +`ServiceOption` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 280. + +*** + +### WithSecurityConfig + +WithSecurityConfig applies a SecurityConfig bundle, setting Basic Auth, Bearer token, and API key configuration in one call. This is the Go equivalent of Python's AuthHandler(security\_config=...) pattern: it maps each SecurityConfig field to the corresponding WithXxx option. + +#### Signature + +```go +func WithSecurityConfig(cfg SecurityConfig) ServiceOption +``` + +#### Parameters + + + +#### Returns + +`ServiceOption` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 198. + +*** + +### WithTLS + +WithTLS configures TLS for the service. When set, Serve() calls ListenAndServeTLS instead of ListenAndServe. Mirrors Python's ssl\_cert / ssl\_key serve() parameters and ssl\_enabled property. + +#### Signature + +```go +func WithTLS(certFile string, keyFile string) ServiceOption +``` + +#### Parameters + + + + + +#### Returns + +`ServiceOption` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 223. + +## Type Aliases + +### RoutingCallback + +RoutingCallback is a function called on incoming requests to customize responses. It receives the request and request body, and returns an optional SWML JSON override. If it returns nil, the default document is used. + +#### Signature + +```go +type RoutingCallback alias +``` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 37. + +*** + +### ServiceOption + +ServiceOption is a functional option for configuring a Service. + +#### Signature + +```go +type ServiceOption alias +``` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 138. + +*** + +### ToolHandler + +ToolHandler is the function signature for a registered SWAIG tool. Returns a result that will be JSON-encoded as the SWAIG response. + +#### Signature + +```go +type ToolHandler alias +``` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 23. + +*** + +### Verb + +Verb represents a single SWML verb (instruction) as a key-value pair. Example: \{"play": \{"url": "https://example.com/audio.mp3"\}\} + +#### Signature + +```go +type Verb alias +``` + +#### Source + +[`pkg/swml/document.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/document.go) + +Line 23. + +## Source + +[`pkg/swml/ai_verb_handler.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/ai_verb_handler.go) diff --git a/fern/products/sdk-reference/go/agents/swml/swml/ai-verb-handler/index.mdx b/fern/products/sdk-reference/go/agents/swml/swml/ai-verb-handler/index.mdx new file mode 100644 index 0000000000..76106f489e --- /dev/null +++ b/fern/products/sdk-reference/go/agents/swml/swml/ai-verb-handler/index.mdx @@ -0,0 +1,132 @@ +--- +slug: "/reference/go/agents/swml/swml/ai-verb-handler" +title: "AIVerbHandler" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/swml.AIVerbHandler" + parent: "agents.swml.swml" + module: "agents.swml.swml" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/ai_verb_handler.go" +--- +# `AIVerbHandler` + +AIVerbHandler is a concrete VerbHandler for the SWML "ai" verb. + +It implements the VerbHandler interface and provides validation and configuration-building logic for the AI verb. This is the Go equivalent of the Python AIVerbHandler class in core/swml\_handler.py. + +The AI verb is complex and requires specialized handling, particularly for managing prompts, SWAIG functions, and AI configurations. + +## Signature + +```go +type AIVerbHandler struct +``` + +## Methods + +### BuildConfig + +BuildConfig assembles an AI verb configuration map from the provided params. + +Recognised keys in params (ported from Python AIVerbHandler.build\_config): + +- "prompt\_text" (string) — text prompt; mutually exclusive with "prompt\_pom" +- "prompt\_pom" (\[]any or similar) — POM structure; mutually exclusive with "prompt\_text" +- "contexts" (map\[string]any) — optional contexts / steps configuration +- "post\_prompt" (string) — optional post-prompt text; wrapped in \{"text": value\} +- "post\_prompt\_url" (string) — optional post-prompt URL +- "swaig" (map\[string]any) — optional SWAIG configuration; emitted as "SWAIG" + +Additional keys in params are handled as follows (matching Python \*\*kwargs logic): + +- "languages", "hints", "pronounce", "global\_data" — emitted as top-level keys. +- All other extra keys are collected under a nested "params" map. + +Returns (configMap, nil) on success, or (nil, error) if the parameters are contradictory (e.g. both prompt\_text and prompt\_pom supplied, or neither). + +#### Signature + +```go +func (*AIVerbHandler) BuildConfig(params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/swml/ai_verb_handler.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/ai_verb_handler.go) + +Line 112. + +*** + +### GetVerbName + +GetVerbName returns "ai", the name of the SWML verb this handler handles. + +#### Signature + +```go +func (*AIVerbHandler) GetVerbName() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/swml/ai_verb_handler.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/ai_verb_handler.go) + +Line 32. + +*** + +### ValidateConfig + +ValidateConfig validates the configuration map for the AI verb. + +Validation rules (ported from Python AIVerbHandler.validate\_config): + +- "prompt" key must be present and must be a map\[string]any. +- "prompt" must contain exactly one of "text" or "pom" (mutually exclusive). +- If "prompt.contexts" is present it must be a map\[string]any. +- If "SWAIG" is present it must be a map\[string]any. + +Returns (true, nil) when the config is valid; (false, errors) when it is not. + +#### Signature + +```go +func (*AIVerbHandler) ValidateConfig(config map[string]any) (bool, []string) +``` + +#### Parameters + + + +#### Returns + +`(bool, []string)` + +#### Source + +[`pkg/swml/ai_verb_handler.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/ai_verb_handler.go) + +Line 45. + +## Source + +[`pkg/swml/ai_verb_handler.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/ai_verb_handler.go) + +Line 20. diff --git a/fern/products/sdk-reference/go/agents/swml/swml/document/index.mdx b/fern/products/sdk-reference/go/agents/swml/swml/document/index.mdx new file mode 100644 index 0000000000..8e1a466052 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/swml/swml/document/index.mdx @@ -0,0 +1,277 @@ +--- +slug: "/reference/go/agents/swml/swml/document" +title: "Document" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/swml.Document" + parent: "agents.swml.swml" + module: "agents.swml.swml" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/document.go" +--- +# `Document` + +Document represents a complete SWML document with version and sections. + +## Signature + +```go +type Document struct +``` + +## Properties + + + + + +## Methods + +### AddSection + +AddSection creates a new named section in the document. Returns false if the section already exists. + +#### Signature + +```go +func (*Document) AddSection(name string) bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`pkg/swml/document.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/document.go) + +Line 46. + +*** + +### AddVerb + +AddVerb appends a verb to the "main" section. Returns an error if the verb name is empty. + +#### Signature + +```go +func (*Document) AddVerb(verbName string, config any) error +``` + +#### Parameters + + + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/document.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/document.go) + +Line 66. + +*** + +### AddVerbToSection + +AddVerbToSection appends a verb to a named section. Creates the section if it doesn't exist. + +#### Signature + +```go +func (*Document) AddVerbToSection(section string, verbName string, config any) error +``` + +#### Parameters + + + + + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/document.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/document.go) + +Line 72. + +*** + +### GetVerbs + +GetVerbs returns the verbs in a named section. Returns nil if the section doesn't exist. + +#### Signature + +```go +func (*Document) GetVerbs(section string) []Verb +``` + +#### Parameters + + + +#### Returns + +`[]Verb` + +#### Source + +[`pkg/swml/document.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/document.go) + +Line 88. + +*** + +### HasSection + +HasSection returns whether a section exists in the document. + +#### Signature + +```go +func (*Document) HasSection(name string) bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`pkg/swml/document.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/document.go) + +Line 57. + +*** + +### MarshalJSON + +MarshalJSON implements the json.Marshaler interface. + +#### Signature + +```go +func (*Document) MarshalJSON() ([]byte, error) +``` + +#### Returns + +`([]byte, error)` + +#### Source + +[`pkg/swml/document.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/document.go) + +Line 139. + +*** + +### Render + +Render serializes the document to a JSON string. + +#### Signature + +```go +func (*Document) Render() (string, error) +``` + +#### Returns + +`(string, error)` + +#### Source + +[`pkg/swml/document.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/document.go) + +Line 121. + +*** + +### RenderPretty + +RenderPretty serializes the document to an indented JSON string. + +#### Signature + +```go +func (*Document) RenderPretty() (string, error) +``` + +#### Returns + +`(string, error)` + +#### Source + +[`pkg/swml/document.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/document.go) + +Line 130. + +*** + +### Reset + +Reset clears all sections and recreates the default "main" section. + +#### Signature + +```go +func (*Document) Reset() +``` + +#### Source + +[`pkg/swml/document.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/document.go) + +Line 36. + +*** + +### ToMap + +ToMap returns the document as a nested map suitable for JSON serialization. + +#### Signature + +```go +func (*Document) ToMap() map[string]any +``` + +#### Returns + +`map[string]any` + +#### Source + +[`pkg/swml/document.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/document.go) + +Line 101. + +## Source + +[`pkg/swml/document.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/document.go) + +Line 15. diff --git a/fern/products/sdk-reference/go/agents/swml/swml/index.mdx b/fern/products/sdk-reference/go/agents/swml/swml/index.mdx new file mode 100644 index 0000000000..19167f26f9 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/swml/swml/index.mdx @@ -0,0 +1,166 @@ +--- +slug: "/reference/go/agents/swml/swml" +title: "swml" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "module" + language: "go" + qualified_name: "agents.swml.swml" + parent: "github.com/signalwire/signalwire-go/pkg/swml" + module: "agents.swml" +--- +# `swml` + +## Classes + + + + AIVerbHandler is a concrete VerbHandler for the SWML "ai" verb. + + + + Document represents a complete SWML document with version and sections. + + + + Schema holds the parsed SWML schema and provides verb metadata. + + + + SchemaUtils is the Go port of signalwire.utils.schema\_utils.SchemaUtils. + + + + SchemaValidationError is the canonical error type raised when SWML schema validation fails. Mirrors Python's SchemaValidationError. + + + + SecurityConfig bundles configuration for all supported authentication methods: HTTP Basic Auth, Bearer token, and API key. Pass it to WithSecurityConfig to configure multiple auth methods in one call. + + + + Service is the base SWML service that manages documents, HTTP endpoints, and auth. It provides auto-vivified verb methods driven by the SWML schema. + + + + ToolDefinition is a SWAIG tool registered on the Service. + + + + ValidationResult mirrors Python's “Tuple\[bool, List\[str]]“ return shape used by ValidateVerb / ValidateDocument. + + + + VerbInfo holds metadata about a SWML verb extracted from the schema. + + + +## Interfaces + +### VerbHandler + +VerbHandler defines the contract for specialized SWML verb handlers. + +Implementations provide verb-specific validation and configuration-building logic for complex SWML verbs that cannot be handled generically. This is the Go equivalent of the Python SWMLVerbHandler abstract base class. + +#### Signature + +```go +type VerbHandler interface { GetVerbName; ValidateConfig; BuildConfig } +``` + +#### Methods + +##### BuildConfig + +BuildConfig builds a configuration map for this verb from the provided + +parameters. + +params contains keyword arguments specific to this verb, mirroring the +\*\*kwargs pattern from Python. It returns the constructed configuration +map, or an error if the provided parameters are insufficient or +contradictory. + +###### Signature + +```go +BuildConfig(params map[string]any) (map[string]any, error) +``` + +###### Source + +[`pkg/swml/verb_handler.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/verb_handler.go) + +Line 38. + +*** + +##### GetVerbName + +GetVerbName returns the name of the SWML verb this handler handles. + +The returned name must match the verb name used in SWML documents +(e.g., "ai", "play", "record"). + +###### Signature + +```go +GetVerbName() string +``` + +###### Source + +[`pkg/swml/verb_handler.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/verb_handler.go) + +Line 20. + +*** + +##### ValidateConfig + +ValidateConfig validates the configuration map for this verb. + +config is the configuration dictionary for this verb. It returns +(isValid, errorMessages): isValid is true when the config passes all +validation checks, and errorMessages contains human-readable descriptions +of any validation failures. When isValid is true, errorMessages will be +empty. + +###### Signature + +```go +ValidateConfig(config map[string]any) (bool, []string) +``` + +###### Source + +[`pkg/swml/verb_handler.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/verb_handler.go) + +Line 29. + +#### Source + +[`pkg/swml/verb_handler.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/verb_handler.go) + +Line 15. + +## Enums + +### ExecutionMode + +ExecutionMode identifies the runtime environment the service is executing in. The value is used to adjust URL construction, request parsing, and auth handling for platforms that do not provide a traditional TCP listener. + +#### Signature + +```go +type ExecutionMode alias +``` + +#### Source + +[`pkg/swml/execution_mode.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/execution_mode.go) + +Line 8. diff --git a/fern/products/sdk-reference/go/agents/swml/swml/schema-utils/index.mdx b/fern/products/sdk-reference/go/agents/swml/swml/schema-utils/index.mdx new file mode 100644 index 0000000000..753dd50b58 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/swml/swml/schema-utils/index.mdx @@ -0,0 +1,289 @@ +--- +slug: "/reference/go/agents/swml/swml/schema-utils" +title: "SchemaUtils" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/swml.SchemaUtils" + parent: "agents.swml.swml" + module: "agents.swml.swml" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema_utils.go" +--- +# `SchemaUtils` + +SchemaUtils is the Go port of signalwire.utils.schema\_utils.SchemaUtils. + +Construction rules: + +- schemaPath empty + SWML\_SKIP\_SCHEMA\_VALIDATION unset → load embedded. +- schemaPath set → load from file. +- schemaValidation=false OR SWML\_SKIP\_SCHEMA\_VALIDATION=1 → no full validator (lightweight required-property check still runs). + +## Signature + +```go +type SchemaUtils struct +``` + +## Methods + +### FullValidationAvailable + +FullValidationAvailable reports whether the full JSON Schema validator is wired up. Mirrors Python's full\_validation\_available. + +#### Signature + +```go +func (*SchemaUtils) FullValidationAvailable() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/swml/schema_utils.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema_utils.go) + +Line 199. + +*** + +### GenerateMethodBody + +GenerateMethodBody renders a Python-style method body for a verb. Mirrors Python's “generate\_method\_body(verb\_name)“. + +#### Signature + +```go +func (*SchemaUtils) GenerateMethodBody(verbName string) string +``` + +#### Parameters + + + +#### Returns + +`string` + +#### Source + +[`pkg/swml/schema_utils.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema_utils.go) + +Line 358. + +*** + +### GenerateMethodSignature + +GenerateMethodSignature renders a Python-style method signature for a verb — used by code-gen tooling. Mirrors Python's “generate\_method\_signature(verb\_name)“. + +#### Signature + +```go +func (*SchemaUtils) GenerateMethodSignature(verbName string) string +``` + +#### Parameters + + + +#### Returns + +`string` + +#### Source + +[`pkg/swml/schema_utils.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema_utils.go) + +Line 317. + +*** + +### GetAllVerbNames + +GetAllVerbNames returns the sorted list of all known verb names. Mirrors Python's “get\_all\_verb\_names()“. + +#### Signature + +```go +func (*SchemaUtils) GetAllVerbNames() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/swml/schema_utils.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema_utils.go) + +Line 205. + +*** + +### GetVerbParameters + +GetVerbParameters returns the parameter-definition block used for codegen — verb\_props\["properties"]. Mirrors Python's “get\_verb\_parameters(verb\_name)“. + +#### Signature + +```go +func (*SchemaUtils) GetVerbParameters(verbName string) map[string]any +``` + +#### Parameters + + + +#### Returns + +`map[string]any` + +#### Source + +[`pkg/swml/schema_utils.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema_utils.go) + +Line 253. + +*** + +### GetVerbProperties + +GetVerbProperties returns the inner “properties\[verb\_name]“ block for a verb, or an empty map when the verb is unknown. Mirrors Python's “get\_verb\_properties(verb\_name)“. + +#### Signature + +```go +func (*SchemaUtils) GetVerbProperties(verbName string) map[string]any +``` + +#### Parameters + + + +#### Returns + +`map[string]any` + +#### Source + +[`pkg/swml/schema_utils.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema_utils.go) + +Line 217. + +*** + +### GetVerbRequiredProperties + +GetVerbRequiredProperties returns the “required“ list for a verb. Mirrors Python's “get\_verb\_required\_properties(verb\_name)“. + +#### Signature + +```go +func (*SchemaUtils) GetVerbRequiredProperties(verbName string) []string +``` + +#### Parameters + + + +#### Returns + +`[]string` + +#### Source + +[`pkg/swml/schema_utils.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema_utils.go) + +Line 235. + +*** + +### LoadSchema + +LoadSchema reads and parses the JSON Schema. Mirrors Python's “load\_schema()“. + +#### Signature + +```go +func (*SchemaUtils) LoadSchema() map[string]any +``` + +#### Returns + +`map[string]any` + +#### Source + +[`pkg/swml/schema_utils.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema_utils.go) + +Line 113. + +*** + +### ValidateDocument + +ValidateDocument validates a complete SWML document against the schema. Mirrors Python's “validate\_document(document)“. + +When the full validator is unavailable Python returns “(False, \["Schema validator not initialized"])“; the Go port matches that contract bit-for-bit. + +#### Signature + +```go +func (*SchemaUtils) ValidateDocument(document map[string]any) ValidationResult +``` + +#### Parameters + + + +#### Returns + +`ValidationResult` + +#### Source + +[`pkg/swml/schema_utils.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema_utils.go) + +Line 306. + +*** + +### ValidateVerb + +ValidateVerb validates a verb config against the schema. Mirrors Python's “validate\_verb(verb\_name, verb\_config)“. + +When validation is disabled returns Valid=true. When the verb name is unknown returns Valid=false with a single "Unknown verb" error. Otherwise runs the full validator if available, falling back to the lightweight required-property check. + +#### Signature + +```go +func (*SchemaUtils) ValidateVerb(verbName string, verbConfig map[string]any) ValidationResult +``` + +#### Parameters + + + + + +#### Returns + +`ValidationResult` + +#### Source + +[`pkg/swml/schema_utils.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema_utils.go) + +Line 269. + +## Source + +[`pkg/swml/schema_utils.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema_utils.go) + +Line 65. diff --git a/fern/products/sdk-reference/go/agents/swml/swml/schema-validation-error/index.mdx b/fern/products/sdk-reference/go/agents/swml/swml/schema-validation-error/index.mdx new file mode 100644 index 0000000000..a6cca8c2aa --- /dev/null +++ b/fern/products/sdk-reference/go/agents/swml/swml/schema-validation-error/index.mdx @@ -0,0 +1,57 @@ +--- +slug: "/reference/go/agents/swml/swml/schema-validation-error" +title: "SchemaValidationError" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/swml.SchemaValidationError" + parent: "agents.swml.swml" + module: "agents.swml.swml" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema_utils.go" +--- +# `SchemaValidationError` + +SchemaValidationError is the canonical error type raised when SWML schema validation fails. Mirrors Python's SchemaValidationError. + +## Signature + +```go +type SchemaValidationError struct +``` + +## Properties + + + + + +## Methods + +### Error + +Error renders the validation failure as a single string. + +#### Signature + +```go +func (*SchemaValidationError) Error() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/swml/schema_utils.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema_utils.go) + +Line 41. + +## Source + +[`pkg/swml/schema_utils.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema_utils.go) + +Line 29. diff --git a/fern/products/sdk-reference/go/agents/swml/swml/schema/index.mdx b/fern/products/sdk-reference/go/agents/swml/swml/schema/index.mdx new file mode 100644 index 0000000000..ef9471bcf2 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/swml/swml/schema/index.mdx @@ -0,0 +1,125 @@ +--- +slug: "/reference/go/agents/swml/swml/schema" +title: "Schema" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/swml.Schema" + parent: "agents.swml.swml" + module: "agents.swml.swml" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema.go" +--- +# `Schema` + +Schema holds the parsed SWML schema and provides verb metadata. + +## Signature + +```go +type Schema struct +``` + +## Methods + +### GetAllVerbNames + +GetAllVerbNames returns all known verb names (the actual SWML names, not schema names). + +#### Signature + +```go +func (*Schema) GetAllVerbNames() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/swml/schema.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema.go) + +Line 136. + +*** + +### GetVerb + +GetVerb returns metadata for a verb by its actual name (e.g., "sip\_refer"). + +#### Signature + +```go +func (*Schema) GetVerb(name string) (*VerbInfo, bool) +``` + +#### Parameters + + + +#### Returns + +`(*VerbInfo, bool)` + +#### Source + +[`pkg/swml/schema.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema.go) + +Line 128. + +*** + +### IsValidVerb + +IsValidVerb returns whether a name is a recognized SWML verb. + +#### Signature + +```go +func (*Schema) IsValidVerb(name string) bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`pkg/swml/schema.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema.go) + +Line 147. + +*** + +### VerbCount + +VerbCount returns the number of verbs in the schema. + +#### Signature + +```go +func (*Schema) VerbCount() int +``` + +#### Returns + +`int` + +#### Source + +[`pkg/swml/schema.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema.go) + +Line 155. + +## Source + +[`pkg/swml/schema.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema.go) + +Line 29. diff --git a/fern/products/sdk-reference/go/agents/swml/swml/security-config/index.mdx b/fern/products/sdk-reference/go/agents/swml/swml/security-config/index.mdx new file mode 100644 index 0000000000..1c2b927740 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/swml/swml/security-config/index.mdx @@ -0,0 +1,52 @@ +--- +slug: "/reference/go/agents/swml/swml/security-config" +title: "SecurityConfig" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/swml.SecurityConfig" + parent: "agents.swml.swml" + module: "agents.swml.swml" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go" +--- +# `SecurityConfig` + +SecurityConfig bundles configuration for all supported authentication methods: HTTP Basic Auth, Bearer token, and API key. Pass it to WithSecurityConfig to configure multiple auth methods in one call. + +Fields default to the zero value (disabled). Set only the fields you need. + +- BasicAuthUser / BasicAuthPassword — HTTP Basic Auth credentials. +- BearerToken — Expected value of the "Authorization: Bearer \" header. +- APIKey — Expected API key value. +- APIKeyHeader — Header name to read the API key from (default "X-API-Key"). + +Mirrors Python's SecurityConfig dataclass. + +## Signature + +```go +type SecurityConfig struct +``` + +## Properties + + + + + defaults to "X-API-Key" when APIKey is set + + + + + + + + +## Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 53. diff --git a/fern/products/sdk-reference/go/agents/swml/swml/service/index.mdx b/fern/products/sdk-reference/go/agents/swml/swml/service/index.mdx new file mode 100644 index 0000000000..e362754ced --- /dev/null +++ b/fern/products/sdk-reference/go/agents/swml/swml/service/index.mdx @@ -0,0 +1,2010 @@ +--- +slug: "/reference/go/agents/swml/swml/service" +title: "Service" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/swml.Service" + parent: "agents.swml.swml" + module: "agents.swml.swml" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go" +--- +# `Service` + +Service is the base SWML service that manages documents, HTTP endpoints, and auth. It provides auto-vivified verb methods driven by the SWML schema. + +## Signature + +```go +type Service struct +``` + +## Properties + + + Domain for TLS certificates and URL generation (SWML\_DOMAIN env var) + + + + + + + + + + + + +## Methods + +### AddSection + +AddSection adds a new named section to the SWML document. Returns false if the section already exists. Delegates to Document.AddSection. Mirrors Python's add\_section method which was only on the Document in Go but is on SWMLService in Python. + +#### Signature + +```go +func (*Service) AddSection(name string) bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 565. + +*** + +### AI + +AI adds the ai verb. AgentBase overrides this with its own AI rendering. promptText and promptPOM are mutually exclusive; providing both is an error. promptText sets a plain-text prompt; promptPOM sets a structured POM prompt. postPrompt and postPromptURL configure post-prompt behavior (optional). swaig supplies SWAIG configuration (optional). extra is a map of additional AI parameters merged into the verb config (optional). Mirrors Python SWMLBuilder.ai(prompt\_text, prompt\_pom, post\_prompt, post\_prompt\_url, swaig, \*\*kwargs). + +#### Signature + +```go +func (*Service) AI( + promptText *string, + promptPOM []map[string]any, + postPrompt *string, + postPromptURL *string, + swaig map[string]any, + extra map[string]any +) error +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 762. + +*** + +### AmazonBedrock + +AmazonBedrock adds the amazon\_bedrock verb. + +#### Signature + +```go +func (*Service) AmazonBedrock(config map[string]any) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 792. + +*** + +### Answer + +Answer adds the answer verb to the document. maxDuration sets the maximum call duration in seconds (optional). codecs sets a comma-separated list of allowed codecs (optional). Mirrors Python SWMLBuilder.answer(max\_duration, codecs). + +#### Signature + +```go +func (*Service) Answer(maxDuration *int, codecs *string) error +``` + +#### Parameters + + + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 637. + +*** + +### AsRouter + +AsRouter returns an http.Handler that serves this service's endpoints. Use this to embed the service in a custom HTTP mux or router. Mirrors Python's as\_router() -> APIRouter method on SWMLService. + +#### Signature + +```go +func (*Service) AsRouter() http.Handler +``` + +#### Returns + +`http.Handler` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 572. + +*** + +### BuildSwaigListToolsPayload + +BuildSwaigListToolsPayload returns the JSON payload that --example mode expects between the sentinel markers: \{"tools": \[\]\}. Each element echoes whatever the in-memory ToolDefinition stores (name, description, parameters); we deliberately do not normalize so the CLI can be permissive about field names. + +Exposed for tests so the env-var-driven exit branch in Serve() can be asserted without forking a process. + +#### Signature + +```go +func (*Service) BuildSwaigListToolsPayload() ([]byte, error) +``` + +#### Returns + +`([]byte, error)` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 1117. + +*** + +### Cond + +Cond adds the cond verb (conditional logic). + +#### Signature + +```go +func (*Service) Cond(config map[string]any) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 797. + +*** + +### Connect + +Connect adds the connect verb. + +#### Signature + +```go +func (*Service) Connect(config map[string]any) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 726. + +*** + +### DefineTool + +DefineTool registers a SWAIG function the AI can call. Tool descriptions and parameter descriptions are LLM-facing prompt engineering — see PORTING\_GUIDE for guidance. + +#### Signature + +```go +func (*Service) DefineTool(td *ToolDefinition) *Service +``` + +#### Parameters + + + +#### Returns + +`*Service` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 1261. + +*** + +### Denoise + +Denoise adds the denoise verb. + +#### Signature + +```go +func (*Service) Denoise(config map[string]any) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 852. + +*** + +### DetectMachine + +DetectMachine adds the detect\_machine verb. + +#### Signature + +```go +func (*Service) DetectMachine(config map[string]any) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 892. + +*** + +### EnterQueue + +EnterQueue adds the enter\_queue verb. + +#### Signature + +```go +func (*Service) EnterQueue(config map[string]any) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 877. + +*** + +### Execute + +Execute adds the execute verb (run another SWML section). + +#### Signature + +```go +func (*Service) Execute(config map[string]any) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 807. + +*** + +### ExecuteVerb + +ExecuteVerb adds any SWML verb to the document, validated against the schema and any registered VerbHandler. This is the core method that all verb convenience methods delegate to. For most verbs, config should be a map\[string]any of verb parameters. For "sleep", config should be an integer (milliseconds). + +#### Signature + +```go +func (*Service) ExecuteVerb(verbName string, config any) error +``` + +#### Parameters + + + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 592. + +*** + +### ExecuteVerbToSection + +ExecuteVerbToSection adds a SWML verb to a named section. + +#### Signature + +```go +func (*Service) ExecuteVerbToSection(section string, verbName string, config any) error +``` + +#### Parameters + + + + + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 611. + +*** + +### FullValidationEnabled + +FullValidationEnabled reports whether schema validation is active. Returns true when a schema was successfully loaded and schemaValidation is on. Mirrors Python's full\_validation\_enabled property. + +#### Signature + +```go +func (*Service) FullValidationEnabled() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 555. + +*** + +### GetAuthInfo + +GetAuthInfo returns a map describing every configured authentication method. The map mirrors the Python AuthHandler.get\_auth\_info() return value: + +- "basic" → \{"enabled": true, "username": "\"\} +- "bearer" → \{"enabled": true, "hint": "Use Authorization: Bearer \"\} +- "api\_key" → \{"enabled": true, "header": "\", "hint": "Use \: \"\} + +Only methods that are actively configured appear in the map. Basic auth is always present because the service always has a username/password (either explicit or auto-generated). Mirrors Python AuthHandler.get\_auth\_info() -> Dict\[str, Any]. + +#### Signature + +```go +func (*Service) GetAuthInfo() map[string]any +``` + +#### Returns + +`map[string]any` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 513. + +*** + +### GetBasicAuthCredentials + +GetBasicAuthCredentials returns the (username, password) for basic auth. + +#### Signature + +```go +func (*Service) GetBasicAuthCredentials() (string, string) +``` + +#### Returns + +`(string, string)` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 428. + +*** + +### GetBasicAuthCredentialsWithSource + +GetBasicAuthCredentialsWithSource returns (username, password, source) where source is one of "environment", "explicit", or "auto-generated". Mirrors Python's get\_basic\_auth\_credentials(include\_source=True) three-tuple return. + +#### Signature + +```go +func (*Service) GetBasicAuthCredentialsWithSource() (string, string, string) +``` + +#### Returns + +`(string, string, string)` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 435. + +*** + +### GetDocument + +GetDocument returns the current SWML document. + +#### Signature + +```go +func (*Service) GetDocument() *Document +``` + +#### Returns + +`*Document` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 407. + +*** + +### GetFullURL + +GetFullURL returns the full URL for this service including auth. + +Base URL resolution order: + +1. SWML\_PROXY\_URL\_BASE (explicit proxy override — always wins) +2. Platform-specific base derived from GetExecutionMode() when running inside a serverless runtime (currently AWS Lambda) +3. Local `http://host:port` base (default server mode) + +In every branch the agent's Route is appended to the base. Callers that need to serve SWAIG / post\_prompt endpoints then append further path segments onto the result. This invariant is load-bearing: a Lambda-hosted agent at route "/my-agent" must emit SWAIG URLs like "https://xxx.lambda-url.us-east-1.on.aws/my-agent/swaig" — NOT "https://xxx.lambda-url.us-east-1.on.aws/swaig". See buildWebhookURL in pkg/agent/agent.go for the defensive HasSuffix re-check that enforces the same property downstream. + +#### Signature + +```go +func (*Service) GetFullURL(includeAuth bool) string +``` + +#### Parameters + + + +#### Returns + +`string` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 929. + +*** + +### GetVerbHandler + +GetVerbHandler returns the registered handler for verbName, or nil if no handler has been registered for that verb. This is the Go equivalent of Python's VerbHandlerRegistry.get\_handler. + +#### Signature + +```go +func (*Service) GetVerbHandler(verbName string) VerbHandler +``` + +#### Parameters + + + +#### Returns + +`VerbHandler` + +#### Source + +[`pkg/swml/verb_handler.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/verb_handler.go) + +Line 57. + +*** + +### Goto + +Goto adds the goto verb. + +#### Signature + +```go +func (*Service) Goto(config map[string]any) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 817. + +*** + +### Hangup + +Hangup adds the hangup verb. reason is an optional reason string for the hangup. Mirrors Python SWMLBuilder.hangup(reason). + +#### Signature + +```go +func (*Service) Hangup(reason *string) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 651. + +*** + +### HasTool + +HasTool reports whether a tool with the given name has been registered. + +#### Signature + +```go +func (*Service) HasTool(name string) bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 1315. + +*** + +### HasVerbHandler + +HasVerbHandler reports whether a custom handler is registered for verbName. This is the Go equivalent of Python's VerbHandlerRegistry.has\_handler. + +#### Signature + +```go +func (*Service) HasVerbHandler(verbName string) bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`pkg/swml/verb_handler.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/verb_handler.go) + +Line 65. + +*** + +### JoinConference + +JoinConference adds the join\_conference verb. + +#### Signature + +```go +func (*Service) JoinConference(config map[string]any) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 867. + +*** + +### JoinRoom + +JoinRoom adds the join\_room verb. + +#### Signature + +```go +func (*Service) JoinRoom(config map[string]any) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 862. + +*** + +### Label + +Label adds the label verb. + +#### Signature + +```go +func (*Service) Label(config map[string]any) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 822. + +*** + +### ListToolNames + +ListToolNames returns the registered tool names in insertion order. + +#### Signature + +```go +func (*Service) ListToolNames() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 1323. + +*** + +### LiveTranscribe + +LiveTranscribe adds the live\_transcribe verb. + +#### Signature + +```go +func (*Service) LiveTranscribe(config map[string]any) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 897. + +*** + +### LiveTranslate + +LiveTranslate adds the live\_translate verb. + +#### Signature + +```go +func (*Service) LiveTranslate(config map[string]any) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 902. + +*** + +### ManualSetProxyUrl + +ManualSetProxyUrl overrides the proxy URL base used for URL generation. Call this at runtime to set or update the proxy URL (e.g. an ngrok URL). Mirrors Python's manual\_set\_proxy\_url(proxy\_url: str) on SWMLService. + +#### Signature + +```go +func (*Service) ManualSetProxyUrl(url string) +``` + +#### Parameters + + + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 579. + +*** + +### OnFunctionCall + +OnFunctionCall dispatches a function call to the registered handler. Default implementation: looks up the tool in the registry and invokes its handler. Subclasses (AgentBase) may override at the type level by providing their own method (Go method dispatch is static — to override in a way that is callable through Service, use the SwaigPreDispatch extension hook to substitute a target). + +#### Signature + +```go +func (*Service) OnFunctionCall(name string, args map[string]any, rawData map[string]any) any +``` + +#### Parameters + + + + + + + +#### Returns + +`any` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 1304. + +*** + +### OnRequest + +OnRequest generates the SWML response for an incoming request. It checks routing callbacks first, then returns the default document. + +The return value is a pointer to allow subclasses (AgentBase) to signal "no override" by returning nil — matching Python's Optional\[dict] return type for on\_request. Callers should treat a nil return as "use the default document unchanged". + +#### Signature + +```go +func (*Service) OnRequest(requestData map[string]any, callbackPath string) map[string]any +``` + +#### Parameters + + + + + +#### Returns + +`map[string]any` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 1021. + +*** + +### Pay + +Pay adds the pay verb. + +#### Signature + +```go +func (*Service) Pay(config map[string]any) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 887. + +*** + +### Play + +Play adds the play verb. Exactly one of url or urls must be provided; providing both is an error. volume sets the playback volume (-40 to 40, optional). sayVoice, sayLanguage, sayGender configure text-to-speech (optional). autoAnswer controls whether to auto-answer the call (optional). Mirrors Python SWMLBuilder.play(url, urls, volume, say\_voice, say\_language, say\_gender, auto\_answer). + +#### Signature + +```go +func (*Service) Play( + url *string, + urls []string, + volume *float64, + sayVoice *string, + sayLanguage *string, + sayGender *string, + autoAnswer *bool +) error +``` + +#### Parameters + + + + + + + + + + + + + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 665. + +*** + +### Prompt + +Prompt adds the prompt verb. + +#### Signature + +```go +func (*Service) Prompt(config map[string]any) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 872. + +*** + +### ReceiveFax + +ReceiveFax adds the receive\_fax verb. + +#### Signature + +```go +func (*Service) ReceiveFax(config map[string]any) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 746. + +*** + +### Record + +Record adds the record verb. + +#### Signature + +```go +func (*Service) Record(config map[string]any) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 706. + +*** + +### RecordCall + +RecordCall adds the record\_call verb. + +#### Signature + +```go +func (*Service) RecordCall(config map[string]any) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 711. + +*** + +### RegisterAdditionalRoutes + +RegisterAdditionalRoutes is an extension hook for subclasses (e.g. AgentBase) to mount additional routes (/post\_prompt, /mcp). Default no-op. Composing types call this from their own buildMux equivalent. + +#### Signature + +```go +func (*Service) RegisterAdditionalRoutes(mux *http.ServeMux) +``` + +#### Parameters + + + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 1252. + +*** + +### RegisterRoutingCallback + +RegisterRoutingCallback registers a callback for a specific path. + +#### Signature + +```go +func (*Service) RegisterRoutingCallback(path string, cb RoutingCallback) +``` + +#### Parameters + + + + + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 986. + +*** + +### RegisterSwaigFunction + +RegisterSwaigFunction registers a raw SWAIG function definition (e.g. DataMap tools that have no local handler). The map must contain a "function" key giving the tool name. + +#### Signature + +```go +func (*Service) RegisterSwaigFunction(funcDef map[string]any) *Service +``` + +#### Parameters + + + +#### Returns + +`*Service` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 1277. + +*** + +### RegisterVerbHandler + +RegisterVerbHandler registers a custom handler for a SWML verb, keyed by the name returned by h.GetVerbName(). A subsequent call with the same verb name replaces the previous handler. This is the Go equivalent of Python's VerbHandlerRegistry.register\_handler. + +#### Signature + +```go +func (*Service) RegisterVerbHandler(h VerbHandler) +``` + +#### Parameters + + + +#### Source + +[`pkg/swml/verb_handler.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/verb_handler.go) + +Line 45. + +*** + +### Render + +Render returns the SWML document as a JSON string. + +#### Signature + +```go +func (*Service) Render() (string, error) +``` + +#### Returns + +`(string, error)` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 1039. + +*** + +### RenderMainSwml + +RenderMainSwml is an extension hook invoked for the main route and for GET /swaig. Default returns the currently-built document. AgentBase overrides to render with prompts + dynamic config. + +#### Signature + +```go +func (*Service) RenderMainSwml(r *http.Request) map[string]any +``` + +#### Parameters + + + +#### Returns + +`map[string]any` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 1343. + +*** + +### RenderPretty + +RenderPretty returns the SWML document as an indented JSON string. + +#### Signature + +```go +func (*Service) RenderPretty() (string, error) +``` + +#### Returns + +`(string, error)` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 1044. + +*** + +### Request + +Request adds the request verb (HTTP request). + +#### Signature + +```go +func (*Service) Request(config map[string]any) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 882. + +*** + +### ResetDocument + +ResetDocument resets the SWML document to empty. + +#### Signature + +```go +func (*Service) ResetDocument() +``` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 414. + +*** + +### Return + +Return adds the return verb. + +#### Signature + +```go +func (*Service) Return(config map[string]any) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 812. + +*** + +### RoutingCallbackPaths + +RoutingCallbackPaths returns the paths that have routing callbacks registered. Callers use this to register corresponding HTTP endpoints (mirrors Python web\_mixin.py line 428 which iterates self.\_routing\_callbacks to register callback endpoints on the router). Paths are returned in sorted order for deterministic HTTP registration. + +#### Signature + +```go +func (*Service) RoutingCallbackPaths() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 997. + +*** + +### Say + +Say adds a play verb with a "say:" prefix for text-to-speech. voice, language, and gender configure the TTS voice (optional). volume sets the playback volume (-40 to 40, optional). Mirrors Python SWMLBuilder.say(text, voice, language, gender, volume). + +#### Signature + +```go +func (*Service) Say( + text string, + voice *string, + language *string, + gender *string, + volume *float64 +) error +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 700. + +*** + +### SchemaUtils + +SchemaUtils returns the SchemaUtils helper bound to this Service. Mirrors Python's “self.schema\_utils“ instance attribute exposed publicly on signalwire.core.swml\_service.SWMLService. + +#### Signature + +```go +func (*Service) SchemaUtils() *SchemaUtils +``` + +#### Returns + +`*SchemaUtils` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 423. + +*** + +### SendDigits + +SendDigits adds the send\_digits verb. + +#### Signature + +```go +func (*Service) SendDigits(config map[string]any) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 731. + +*** + +### SendFax + +SendFax adds the send\_fax verb. + +#### Signature + +```go +func (*Service) SendFax(config map[string]any) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 741. + +*** + +### SendSMS + +SendSMS adds the send\_sms verb. + +#### Signature + +```go +func (*Service) SendSMS(config map[string]any) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 736. + +*** + +### Serve + +Serve starts the HTTP server. This is a blocking call. + +When TLS is configured via WithTLS (or SWML\_SSL\_CERT\_PATH / SWML\_SSL\_KEY\_PATH env vars), ListenAndServeTLS is called automatically. Mirrors Python's serve() ssl\_cert / ssl\_key / ssl\_enabled parameter support. + +If SWAIG\_LIST\_TOOLS is set in the environment, Serve() does NOT bind a port; instead it prints the registered tool registry sandwiched by **SWAIG\_TOOLS\_BEGIN** / **SWAIG\_TOOLS\_END** sentinels to stdout and exits 0. This is how `swaig-test --example NAME` introspects a SWMLService-only binary without HTTP-walking rendered SWML. + +#### Signature + +```go +func (*Service) Serve() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 1170. + +*** + +### Set + +Set adds the set verb (set variables). + +#### Signature + +```go +func (*Service) Set(config map[string]any) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 827. + +*** + +### SIPRefer + +SIPRefer adds the sip\_refer verb. + +#### Signature + +```go +func (*Service) SIPRefer(config map[string]any) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 751. + +*** + +### Sleep + +Sleep adds the sleep verb. Duration is in milliseconds. + +#### Signature + +```go +func (*Service) Sleep(duration int) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 721. + +*** + +### Stop + +Stop gracefully stops the HTTP server. + +#### Signature + +```go +func (*Service) Stop() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 1207. + +*** + +### StopDenoise + +StopDenoise adds the stop\_denoise verb. + +#### Signature + +```go +func (*Service) StopDenoise(config map[string]any) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 857. + +*** + +### StopRecordCall + +StopRecordCall adds the stop\_record\_call verb. + +#### Signature + +```go +func (*Service) StopRecordCall(config map[string]any) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 716. + +*** + +### StopTap + +StopTap adds the stop\_tap verb. + +#### Signature + +```go +func (*Service) StopTap(config map[string]any) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 847. + +*** + +### SwaigPreDispatch + +SwaigPreDispatch is an extension hook invoked between argument parsing and function dispatch on POST /swaig. It returns a target Service to dispatch on (defaults to s) and an optional short-circuit response. Subclasses (AgentBase) override to add session-token validation or ephemeral dynamic-config copies. + +#### Signature + +```go +func (*Service) SwaigPreDispatch(requestData map[string]any, funcName string) (target *Service, shortCircuit map[string]any) +``` + +#### Parameters + + + + + +#### Returns + +`(*Service, map[string]any)` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 1336. + +*** + +### Switch + +Switch adds the switch verb. + +#### Signature + +```go +func (*Service) Switch(config map[string]any) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 802. + +*** + +### Tap + +Tap adds the tap verb (media tapping). + +#### Signature + +```go +func (*Service) Tap(config map[string]any) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 842. + +*** + +### TLSEnabled + +TLSEnabled reports whether TLS is configured for this service. Mirrors Python's ssl\_enabled property on SWMLService. + +#### Signature + +```go +func (*Service) TLSEnabled() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 548. + +*** + +### Transfer + +Transfer adds the transfer verb. + +#### Signature + +```go +func (*Service) Transfer(config map[string]any) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 837. + +*** + +### Unset + +Unset adds the unset verb. + +#### Signature + +```go +func (*Service) Unset(config map[string]any) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 832. + +*** + +### UserEvent + +UserEvent adds the user\_event verb. + +#### Signature + +```go +func (*Service) UserEvent(config map[string]any) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 907. + +*** + +### VerifyAPIKey + +VerifyAPIKey performs a timing-safe comparison of the supplied key value against the service's configured API key. Returns false when no API key is configured (i.e. WithAPIKey was not called). + +Callers typically read the key from the header returned by APIKeyHeader(). Mirrors Python AuthHandler.verify\_api\_key(api\_key: str) -> bool. + +#### Signature + +```go +func (*Service) VerifyAPIKey(key string) bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 493. + +*** + +### VerifyBasicAuth + +VerifyBasicAuth performs a timing-safe comparison of the supplied credentials against the service's configured basic auth username and password. Returns true when both username and password match. + +This exposes the same check that withSecurity applies inside the HTTP middleware, making auth testable in isolation without an HTTP round-trip. Mirrors Python AuthHandler.verify\_basic\_auth(credentials) -> bool using secrets.compare\_digest (equivalent: crypto/subtle.ConstantTimeCompare). + +#### Signature + +```go +func (*Service) VerifyBasicAuth(username string, password string) bool +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 462. + +*** + +### VerifyBearerToken + +VerifyBearerToken performs a timing-safe comparison of the supplied token against the service's configured bearer token. Returns false when no bearer token is configured (i.e. WithBearerToken was not called). + +Callers typically extract the token from the "Authorization: Bearer \" header before calling this method. Mirrors Python AuthHandler.verify\_bearer\_token(credentials) -> bool. + +#### Signature + +```go +func (*Service) VerifyBearerToken(token string) bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 478. + +## Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 63. diff --git a/fern/products/sdk-reference/go/agents/swml/swml/tool-definition/index.mdx b/fern/products/sdk-reference/go/agents/swml/swml/tool-definition/index.mdx new file mode 100644 index 0000000000..ee63c9c9bc --- /dev/null +++ b/fern/products/sdk-reference/go/agents/swml/swml/tool-definition/index.mdx @@ -0,0 +1,41 @@ +--- +slug: "/reference/go/agents/swml/swml/tool-definition" +title: "ToolDefinition" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/swml.ToolDefinition" + parent: "agents.swml.swml" + module: "agents.swml.swml" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go" +--- +# `ToolDefinition` + +ToolDefinition is a SWAIG tool registered on the Service. + +## Signature + +```go +type ToolDefinition struct +``` + +## Properties + + + + + + + + + + + +## Source + +[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) + +Line 26. diff --git a/fern/products/sdk-reference/go/agents/swml/swml/validation-result/index.mdx b/fern/products/sdk-reference/go/agents/swml/swml/validation-result/index.mdx new file mode 100644 index 0000000000..0382229292 --- /dev/null +++ b/fern/products/sdk-reference/go/agents/swml/swml/validation-result/index.mdx @@ -0,0 +1,37 @@ +--- +slug: "/reference/go/agents/swml/swml/validation-result" +title: "ValidationResult" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/swml.ValidationResult" + parent: "agents.swml.swml" + module: "agents.swml.swml" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema_utils.go" +--- +# `ValidationResult` + +ValidationResult mirrors Python's “Tuple\[bool, List\[str]]“ return shape used by ValidateVerb / ValidateDocument. + +The cross-language type alias table maps this struct to the canonical “tuple\>“ so audits accept it as Python-shaped. + +## Signature + +```go +type ValidationResult struct +``` + +## Properties + + + + + +## Source + +[`pkg/swml/schema_utils.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema_utils.go) + +Line 53. diff --git a/fern/products/sdk-reference/go/agents/swml/swml/verb-info/index.mdx b/fern/products/sdk-reference/go/agents/swml/swml/verb-info/index.mdx new file mode 100644 index 0000000000..2c7f4709cb --- /dev/null +++ b/fern/products/sdk-reference/go/agents/swml/swml/verb-info/index.mdx @@ -0,0 +1,43 @@ +--- +slug: "/reference/go/agents/swml/swml/verb-info" +title: "VerbInfo" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/swml.VerbInfo" + parent: "agents.swml.swml" + module: "agents.swml.swml" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema.go" +--- +# `VerbInfo` + +VerbInfo holds metadata about a SWML verb extracted from the schema. + +## Signature + +```go +type VerbInfo struct +``` + +## Properties + + + Definition is the raw schema definition for this verb + + + + Name is the actual SWML verb name (e.g., "sip\_refer", "ai", "play") + + + + SchemaName is the PascalCase name from the schema definition (e.g., "SIPRefer", "AI", "Play") + + +## Source + +[`pkg/swml/schema.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema.go) + +Line 19. diff --git a/fern/products/sdk-reference/go/core/index.mdx b/fern/products/sdk-reference/go/core/index.mdx new file mode 100644 index 0000000000..e72184041e --- /dev/null +++ b/fern/products/sdk-reference/go/core/index.mdx @@ -0,0 +1,28 @@ +--- +slug: "/reference/go/core" +title: "core" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "module" + language: "go" + qualified_name: "core" +--- +# `core` + +## Modules + + + + Package logging provides structured logging for the SignalWire AI Agents SDK. + + + + Package security provides session management and token-based authentication for SWAIG function calls, preventing unauthorized tool execution. + + + + Package util provides cross-cutting helpers used across the Go SDK. + + diff --git a/fern/products/sdk-reference/go/core/logging/index.mdx b/fern/products/sdk-reference/go/core/logging/index.mdx new file mode 100644 index 0000000000..10caf0eee0 --- /dev/null +++ b/fern/products/sdk-reference/go/core/logging/index.mdx @@ -0,0 +1,243 @@ +--- +slug: "/reference/go/core/logging" +title: "logging" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "module" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/logging" + parent: "core" + module: "core" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/logging/log_level.go" +--- +# `logging` + +Package logging provides structured logging for the SignalWire AI Agents SDK. + +It supports log levels (debug, info, warn, error), named loggers per component, and can be suppressed globally for CLI tools or testing. + +## Signature + +```go +package logging +``` + +## Constants + + + + + + + + + Canonical log-level names. These are exactly the strings ParseLevel maps to a Level; the values must stay in lockstep with the switch in ParseLevel. The set mirrors the Python reference's documented SIGNALWIRE\_LOG\_LEVEL vocabulary (debug, info, warning, error) plus the Go-side aliases ParseLevel also honors (warn, off). + + + + Canonical log-level names. These are exactly the strings ParseLevel maps to a Level; the values must stay in lockstep with the switch in ParseLevel. The set mirrors the Python reference's documented SIGNALWIRE\_LOG\_LEVEL vocabulary (debug, info, warning, error) plus the Go-side aliases ParseLevel also honors (warn, off). + + + + Canonical log-level names. These are exactly the strings ParseLevel maps to a Level; the values must stay in lockstep with the switch in ParseLevel. The set mirrors the Python reference's documented SIGNALWIRE\_LOG\_LEVEL vocabulary (debug, info, warning, error) plus the Go-side aliases ParseLevel also honors (warn, off). + + + + Canonical log-level names. These are exactly the strings ParseLevel maps to a Level; the values must stay in lockstep with the switch in ParseLevel. The set mirrors the Python reference's documented SIGNALWIRE\_LOG\_LEVEL vocabulary (debug, info, warning, error) plus the Go-side aliases ParseLevel also honors (warn, off). + + + + Canonical log-level names. These are exactly the strings ParseLevel maps to a Level; the values must stay in lockstep with the switch in ParseLevel. The set mirrors the Python reference's documented SIGNALWIRE\_LOG\_LEVEL vocabulary (debug, info, warning, error) plus the Go-side aliases ParseLevel also honors (warn, off). + + + + Canonical log-level names. These are exactly the strings ParseLevel maps to a Level; the values must stay in lockstep with the switch in ParseLevel. The set mirrors the Python reference's documented SIGNALWIRE\_LOG\_LEVEL vocabulary (debug, info, warning, error) plus the Go-side aliases ParseLevel also honors (warn, off). + + + + + + +## Modules + + + + + +## Functions + +### GetGlobalLevel + +GetGlobalLevel returns the current global log level. + +#### Signature + +```go +func GetGlobalLevel() Level +``` + +#### Returns + +`Level` + +#### Source + +[`pkg/logging/logger.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/logging/logger.go) + +Line 96. + +*** + +### IsSuppressed + +IsSuppressed returns whether logging is currently suppressed. + +#### Signature + +```go +func IsSuppressed() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/logging/logger.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/logging/logger.go) + +Line 117. + +*** + +### New + +New creates a new Logger with the given component name. + +#### Signature + +```go +func New(name string) *Logger +``` + +#### Parameters + + + +#### Returns + +`*Logger` + +#### Source + +[`pkg/logging/logger.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/logging/logger.go) + +Line 130. + +*** + +### ParseLevel + +ParseLevel converts a string level name to a Level. Returns LevelInfo if the string is not recognized. + +#### Signature + +```go +func ParseLevel(s string) Level +``` + +#### Parameters + + + +#### Returns + +`Level` + +#### Source + +[`pkg/logging/logger.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/logging/logger.go) + +Line 36. + +*** + +### ResetLoggingConfiguration + +ResetLoggingConfiguration re-reads SIGNALWIRE\_LOG\_LEVEL and SIGNALWIRE\_LOG\_MODE from the environment and resets globalLevel and suppressed to the env-derived defaults. It is the Go equivalent of Python's reset\_logging\_configuration() and is intended for test teardown and env-var-driven reconfiguration at runtime. + +#### Signature + +```go +func ResetLoggingConfiguration() +``` + +#### Source + +[`pkg/logging/logger.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/logging/logger.go) + +Line 82. + +*** + +### SetGlobalLevel + +SetGlobalLevel sets the minimum log level for all loggers. + +#### Signature + +```go +func SetGlobalLevel(level Level) +``` + +#### Parameters + + + +#### Source + +[`pkg/logging/logger.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/logging/logger.go) + +Line 89. + +*** + +### Suppress + +Suppress disables all log output. + +#### Signature + +```go +func Suppress() +``` + +#### Source + +[`pkg/logging/logger.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/logging/logger.go) + +Line 103. + +*** + +### Unsuppress + +Unsuppress re-enables log output. + +#### Signature + +```go +func Unsuppress() +``` + +#### Source + +[`pkg/logging/logger.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/logging/logger.go) + +Line 110. + +## Source + +[`pkg/logging/log_level.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/logging/log_level.go) diff --git a/fern/products/sdk-reference/go/core/logging/logging/index.mdx b/fern/products/sdk-reference/go/core/logging/logging/index.mdx new file mode 100644 index 0000000000..8a4f47a363 --- /dev/null +++ b/fern/products/sdk-reference/go/core/logging/logging/index.mdx @@ -0,0 +1,85 @@ +--- +slug: "/reference/go/core/logging/logging" +title: "logging" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "module" + language: "go" + qualified_name: "core.logging.logging" + parent: "github.com/signalwire/signalwire-go/pkg/logging" + module: "core.logging" +--- +# `logging` + +## Classes + + + + Logger is a named logger that respects global log level settings. + + + +## Enums + +### Level + +Level represents a log severity level. + +#### Signature + +```go +type Level alias +``` + +#### Source + +[`pkg/logging/logger.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/logging/logger.go) + +Line 16. + +*** + +### LogLevel + +LogLevel is the closed set of log-level _names_ accepted at the string boundary (e.g. server.WithLogLevel, the SIGNALWIRE\_LOG\_LEVEL env var) as a defined string type with typed constants. It is distinct from Level: Level is the internal integer severity used by the loggers, whereas LogLevel is the user-facing textual name that ParseLevel resolves into a Level. + +Adding the typed constants gives Go callers editor autocompletion plus call-site typo checking — a bare string like "debgu" only diverges at runtime (ParseLevel silently falls back to LevelInfo), whereas a mistyped constant fails to compile. Because Go auto-converts untyped string-constant literals to a defined string type, every call site keeps working both ways: + +``` +server.WithLogLevel(logging.LevelNameDebug) // typed const — autocompleted +server.WithLogLevel("debug") // bare string literal still compiles +``` + +LogLevel is a string subtype, so its value is byte-identical to the bare string the reference uses — ParseLevel("debug") and ParseLevel(LevelNameDebug) resolve to the same Level, preserving parity with the Python reference whose log\_level is a plain str (signalwire/core/logging\_config.py). + +#### Signature + +```go +type LogLevel alias +``` + +#### Examples + + + + ```go + server.WithLogLevel(logging.LevelNameDebug) // typed const — autocompleted + server.WithLogLevel("debug") // bare string literal still compiles + ``` + + + + ```go + server.WithLogLevel(logging.LevelNameDebug) // typed const — autocompleted + server.WithLogLevel("debug") // bare string literal still compiles + ``` + + + +#### Source + +[`pkg/logging/log_level.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/logging/log_level.go) + +Line 22. diff --git a/fern/products/sdk-reference/go/core/logging/logging/logger/index.mdx b/fern/products/sdk-reference/go/core/logging/logging/logger/index.mdx new file mode 100644 index 0000000000..5d7966284e --- /dev/null +++ b/fern/products/sdk-reference/go/core/logging/logging/logger/index.mdx @@ -0,0 +1,125 @@ +--- +slug: "/reference/go/core/logging/logging/logger" +title: "Logger" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/logging.Logger" + parent: "core.logging.logging" + module: "core.logging.logging" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/logging/logger.go" +--- +# `Logger` + +Logger is a named logger that respects global log level settings. + +## Signature + +```go +type Logger struct +``` + +## Methods + +### Debug + +Debug logs a message at debug level. + +#### Signature + +```go +func (*Logger) Debug(format string, args ...any) +``` + +#### Parameters + + + + + +#### Source + +[`pkg/logging/logger.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/logging/logger.go) + +Line 153. + +*** + +### Error + +Error logs a message at error level. + +#### Signature + +```go +func (*Logger) Error(format string, args ...any) +``` + +#### Parameters + + + + + +#### Source + +[`pkg/logging/logger.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/logging/logger.go) + +Line 168. + +*** + +### Info + +Info logs a message at info level. + +#### Signature + +```go +func (*Logger) Info(format string, args ...any) +``` + +#### Parameters + + + + + +#### Source + +[`pkg/logging/logger.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/logging/logger.go) + +Line 158. + +*** + +### Warn + +Warn logs a message at warn level. + +#### Signature + +```go +func (*Logger) Warn(format string, args ...any) +``` + +#### Parameters + + + + + +#### Source + +[`pkg/logging/logger.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/logging/logger.go) + +Line 163. + +## Source + +[`pkg/logging/logger.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/logging/logger.go) + +Line 124. diff --git a/fern/products/sdk-reference/go/core/security/index.mdx b/fern/products/sdk-reference/go/core/security/index.mdx new file mode 100644 index 0000000000..c502fb7925 --- /dev/null +++ b/fern/products/sdk-reference/go/core/security/index.mdx @@ -0,0 +1,362 @@ +--- +slug: "/reference/go/core/security" +title: "security" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "module" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/security" + parent: "core" + module: "core" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/security/session_manager.go" +--- +# `security` + +Package security provides session management and token-based authentication for SWAIG function calls, preventing unauthorized tool execution. + +## Signature + +```go +package security +``` + +## Constants + + + ErrMissingSigningKey is returned by ValidateWebhookSignatureE / ValidateRequestE when an empty signing key is supplied. Per the spec, a missing signing key is a programming error rather than a validation failure, so the bool-returning entry points panic; the \*E variants return this sentinel for callers that prefer error returns. + + + + RawBodyContextKey is the context key under which WebhookMiddleware stashes the raw request body. Downstream handlers should retrieve via RawBodyFromContext rather than reaching for this key directly. + + +## Modules + + + + + +## Functions + +### NewSessionManager + +NewSessionManager creates a new SessionManager. If tokenExpirySecs is \<= 0, a default of 900 seconds (15 minutes) is used, matching the Python SDK default. Provide functional options (e.g. WithSecret) to customise behaviour. + +#### Signature + +```go +func NewSessionManager(tokenExpirySecs int, opts ...Option) *SessionManager +``` + +#### Parameters + + + + + +#### Returns + +`*SessionManager` + +#### Source + +[`pkg/security/session_manager.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/security/session_manager.go) + +Line 55. + +*** + +### RawBodyFromContext + +RawBodyFromContext returns the raw request body bytes that the webhook middleware captured before signature validation. Returns nil and false when called from a handler that wasn't wrapped by WebhookMiddleware (or when the request had no body). + +#### Signature + +```go +func RawBodyFromContext(ctx context.Context) ([]byte, bool) +``` + +#### Parameters + + + +#### Returns + +`([]byte, bool)` + +#### Source + +[`pkg/security/webhook_middleware.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/security/webhook_middleware.go) + +Line 42. + +*** + +### ValidateRequest + +ValidateRequest is the legacy @signalwire/compatibility-api drop-in entry point. The fourth argument is dynamically dispatched: + +- string: delegate to ValidateWebhookSignature (Scheme A then Scheme B with parsed form); +- map\[string]\[]string / url.Values / map\[string]string: pre-parsed form params, run Scheme B directly with URL port normalization; +- nil: pre-parsed empty params, run Scheme B with empty concat string; +- anything else: panic with a clear message (programmer error). + +#### Signature + +```go +func ValidateRequest( + signingKey string, + signature string, + urlStr string, + paramsOrRawBody any +) bool +``` + +#### Parameters + + + + + + + + + +#### Returns + +`bool` + +#### Source + +[`pkg/security/webhook.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/security/webhook.go) + +Line 243. + +*** + +### ValidateRequestE + +ValidateRequestE is the error-returning variant of ValidateRequest. Returns ErrMissingSigningKey when signingKey is empty, or a typed error when paramsOrRawBody is neither a string, nil, nor a recognized map shape. + +#### Signature + +```go +func ValidateRequestE( + signingKey string, + signature string, + urlStr string, + paramsOrRawBody any +) (bool, error) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`(bool, error)` + +#### Source + +[`pkg/security/webhook.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/security/webhook.go) + +Line 299. + +*** + +### ValidateWebhookSignature + +ValidateWebhookSignature validates a SignalWire webhook signature against both schemes. Returns true if the signature matches Scheme A (hex JSON) or Scheme B (base64 form, with port-normalization variants and optional bodySHA256 fallback); false otherwise. + +signingKey: customer's Signing Key. Empty string panics — that's a programming error, not a validation failure (use ValidateWebhookSignatureE for the error-returning variant). + +signature: X-SignalWire-Signature (or X-Twilio-Signature) header value. Empty returns false without panicking. + +url: full URL SignalWire POSTed to (scheme, host, optional port, path, query). Must match what the platform saw — see the URL reconstruction section of porting-sdk/webhooks.md. + +rawBody: raw request body bytes as a UTF-8 string, BEFORE any JSON / form parsing. + +All comparisons use crypto/subtle.ConstantTimeCompare. The function does not log which scheme was tried, what the expected signature was, or any other branch information. + +#### Signature + +```go +func ValidateWebhookSignature( + signingKey string, + signature string, + url string, + rawBody string +) bool +``` + +#### Parameters + + + + + + + + + +#### Returns + +`bool` + +#### Source + +[`pkg/security/webhook.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/security/webhook.go) + +Line 226. + +*** + +### ValidateWebhookSignatureE + +ValidateWebhookSignatureE is the error-returning variant of ValidateWebhookSignature. Returns ErrMissingSigningKey when signingKey is empty; otherwise (matched, nil). + +#### Signature + +```go +func ValidateWebhookSignatureE( + signingKey string, + signature string, + urlStr string, + rawBody string +) (bool, error) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`(bool, error)` + +#### Source + +[`pkg/security/webhook.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/security/webhook.go) + +Line 258. + +*** + +### WebhookMiddleware + +WebhookMiddleware returns an http.Handler middleware that validates the X-SignalWire-Signature (or X-Twilio-Signature) header against signingKey before invoking the wrapped handler. + +Pass nil for opts to use defaults (no proxy trust, no size cap, env-var override consulted). + +The middleware never logs the signing key, the expected signature, or which validation branch matched — per porting-sdk/webhooks.md §"Required SDK Behaviors / Error modes". + +#### Signature + +```go +func WebhookMiddleware(signingKey string, opts *WebhookOpts) func(http.Handler) http.Handler +``` + +#### Parameters + + + + + +#### Returns + +`func(http.Handler) http.Handler` + +#### Source + +[`pkg/security/webhook_middleware.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/security/webhook_middleware.go) + +Line 82. + +*** + +### WithDebugMode + +WithDebugMode enables the DebugToken method. Off by default to prevent accidental token introspection in production. + +#### Signature + +```go +func WithDebugMode(enabled bool) Option +``` + +#### Parameters + + + +#### Returns + +`Option` + +#### Source + +[`pkg/security/session_manager.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/security/session_manager.go) + +Line 46. + +*** + +### WithSecret + +WithSecret injects a fixed secret key into the SessionManager. Use this when you need multiple processes or instances to validate each other's tokens. Pass nil to keep the default behaviour (auto-generate a random 32-byte secret). + +#### Signature + +```go +func WithSecret(key []byte) Option +``` + +#### Parameters + + + +#### Returns + +`Option` + +#### Source + +[`pkg/security/session_manager.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/security/session_manager.go) + +Line 36. + +## Type Aliases + +### Option + +Option is a functional option for NewSessionManager. + +#### Signature + +```go +type Option alias +``` + +#### Source + +[`pkg/security/session_manager.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/security/session_manager.go) + +Line 31. + +## Source + +[`pkg/security/session_manager.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/security/session_manager.go) diff --git a/fern/products/sdk-reference/go/core/security/security/index.mdx b/fern/products/sdk-reference/go/core/security/security/index.mdx new file mode 100644 index 0000000000..f6295e872c --- /dev/null +++ b/fern/products/sdk-reference/go/core/security/security/index.mdx @@ -0,0 +1,26 @@ +--- +slug: "/reference/go/core/security/security" +title: "security" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "module" + language: "go" + qualified_name: "core.security.security" + parent: "github.com/signalwire/signalwire-go/pkg/security" + module: "core.security" +--- +# `security` + +## Classes + + + + SessionManager creates and validates HMAC-SHA256 tokens for SWAIG function calls. The secret can be supplied at construction time (for cross-process validation) or auto-generated (default, single-process use). + + + + WebhookOpts configures WebhookMiddleware. + + diff --git a/fern/products/sdk-reference/go/core/security/security/session-manager/index.mdx b/fern/products/sdk-reference/go/core/security/security/session-manager/index.mdx new file mode 100644 index 0000000000..1c06aa730a --- /dev/null +++ b/fern/products/sdk-reference/go/core/security/security/session-manager/index.mdx @@ -0,0 +1,139 @@ +--- +slug: "/reference/go/core/security/security/session-manager" +title: "SessionManager" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/security.SessionManager" + parent: "core.security.security" + module: "core.security.security" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/security/session_manager.go" +--- +# `SessionManager` + +SessionManager creates and validates HMAC-SHA256 tokens for SWAIG function calls. The secret can be supplied at construction time (for cross-process validation) or auto-generated (default, single-process use). + +## Signature + +```go +type SessionManager struct +``` + +## Methods + +### CreateSession + +CreateSession returns callID unchanged if it is non-empty; otherwise it generates a cryptographically random URL-safe string (matches Python secrets.token\_urlsafe(16) — 16 bytes of entropy, base64url-encoded without padding). + +#### Signature + +```go +func (*SessionManager) CreateSession(callID string) string +``` + +#### Parameters + + + +#### Returns + +`string` + +#### Source + +[`pkg/security/session_manager.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/security/session_manager.go) + +Line 84. + +*** + +### CreateToken + +CreateToken generates an HMAC-SHA256 signed token for the given function name and call ID. The token embeds an expiry timestamp and is returned as a base64url-encoded string. + +#### Signature + +```go +func (*SessionManager) CreateToken(functionName string, callID string) string +``` + +#### Parameters + + + + + +#### Returns + +`string` + +#### Source + +[`pkg/security/session_manager.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/security/session_manager.go) + +Line 99. + +*** + +### DebugToken + +DebugToken decodes a token and returns a map of its components and status without performing signature validation. This is intended for development and debugging only. It requires debug mode to be enabled via WithDebugMode; if not, it returns map\["error": "debug mode not enabled"]. + +#### Signature + +```go +func (*SessionManager) DebugToken(token string) map[string]any +``` + +#### Parameters + + + +#### Returns + +`map[string]any` + +#### Source + +[`pkg/security/session_manager.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/security/session_manager.go) + +Line 194. + +*** + +### ValidateToken + +ValidateToken verifies that a token is authentic, unexpired, and matches the expected function name and call ID. All comparisons are performed in constant time where possible to prevent timing attacks. Returns true only if every check passes. + +#### Signature + +```go +func (*SessionManager) ValidateToken(functionName string, token string, callID string) bool +``` + +#### Parameters + + + + + + + +#### Returns + +`bool` + +#### Source + +[`pkg/security/session_manager.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/security/session_manager.go) + +Line 115. + +## Source + +[`pkg/security/session_manager.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/security/session_manager.go) + +Line 23. diff --git a/fern/products/sdk-reference/go/core/security/security/webhook-opts/index.mdx b/fern/products/sdk-reference/go/core/security/security/webhook-opts/index.mdx new file mode 100644 index 0000000000..41016857dd --- /dev/null +++ b/fern/products/sdk-reference/go/core/security/security/webhook-opts/index.mdx @@ -0,0 +1,43 @@ +--- +slug: "/reference/go/core/security/security/webhook-opts" +title: "WebhookOpts" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/security.WebhookOpts" + parent: "core.security.security" + module: "core.security.security" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/security/webhook_middleware.go" +--- +# `WebhookOpts` + +WebhookOpts configures WebhookMiddleware. + +## Signature + +```go +type WebhookOpts struct +``` + +## Properties + + + MaxBodyBytes caps the body size the middleware will buffer before signature validation. Zero (default) imposes no cap beyond Go's own MaxBytesReader behavior. A small positive value protects against memory exhaustion from oversized POSTs targeted at the gate. + + + + ProxyURLBase, when non-empty, overrides URL reconstruction entirely: the validator sees ProxyURLBase + r.URL.RequestURI(). This matches the SWML\_PROXY\_URL\_BASE env-var override documented in the spec. When empty, the env var is consulted at construction time. + + + + TrustProxy makes the middleware honor X-Forwarded-Proto and X-Forwarded-Host when reconstructing the URL passed to the validator. Leave false (default) when the SDK terminates TLS itself; flip true when running behind a reverse proxy / ngrok / load balancer. + + +## Source + +[`pkg/security/webhook_middleware.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/security/webhook_middleware.go) + +Line 52. diff --git a/fern/products/sdk-reference/go/core/util/index.mdx b/fern/products/sdk-reference/go/core/util/index.mdx new file mode 100644 index 0000000000..7685b285e9 --- /dev/null +++ b/fern/products/sdk-reference/go/core/util/index.mdx @@ -0,0 +1,120 @@ +--- +slug: "/reference/go/core/util" +title: "util" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "module" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/util" + parent: "core" + module: "core" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/util/execution_mode.go" +--- +# `util` + +Package util provides cross-cutting helpers used across the Go SDK. + +validate\_url is the SSRF-prevention guard applied to user-supplied URLs before they are fetched. It must mirror the Python reference at signalwire.utils.url\_validator.validate\_url: + +- require http or https scheme +- require a hostname +- allow\_private bypass (param OR SWML\_ALLOW\_PRIVATE\_URLS env var) +- resolve hostname; reject any IP that lands in a blocked network + +The blocked-network list is identical across all SDK ports. + +## Signature + +```go +package util +``` + +## Functions + +### GetExecutionMode + +GetExecutionMode reports the SDK's deployment environment based on well-known environment variables. Returned values are: "cgi", "lambda", "google\_cloud\_function", "azure\_function", "server". + +#### Signature + +```go +func GetExecutionMode() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/util/execution_mode.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/util/execution_mode.go) + +Line 26. + +*** + +### IsServerlessMode + +IsServerlessMode reports whether the SDK is running in any serverless invocation environment (i.e. not "server"). + +#### Signature + +```go +func IsServerlessMode() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/util/execution_mode.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/util/execution_mode.go) + +Line 48. + +*** + +### ValidateURL + +ValidateURL reports whether the supplied URL is safe to fetch. + +Mirrors Python's validate\_url(url, allow\_private=False) -> bool. Returns false (without raising) for any of: + +- parse failure +- scheme not http/https +- missing hostname +- DNS resolution failure +- any resolved IP in a blocked network + +When allowPrivate is true, or the SWML\_ALLOW\_PRIVATE\_URLS env var is set to "1", "true" or "yes" (case-insensitive), the IP-blocklist check is skipped. Scheme + hostname checks still apply. + +This function is projected onto the Python free function name validate\_url via internal/surface/tables.go. + +#### Signature + +```go +func ValidateURL(url_ string, allowPrivate bool) bool +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`pkg/util/url_validator.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/util/url_validator.go) + +Line 73. + +## Source + +[`pkg/util/execution_mode.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/util/execution_mode.go) diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/cmd/swaig-test/main/basic-auth/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/cmd/swaig-test/main/basic-auth/index.mdx deleted file mode 100644 index 79dcdadce2..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/cmd/swaig-test/main/basic-auth/index.mdx +++ /dev/null @@ -1,35 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/cmd/swaig-test/main/basic-auth" -title: "BasicAuth" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/cmd/swaig-test.BasicAuth" - parent: "github.com/signalwire/signalwire-go/cmd/swaig-test" - module: "github.com.signalwire.signalwire-go.cmd.swaig-test" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/cmd/swaig-test/simulate.go" ---- -# `BasicAuth` - -BasicAuth bundles a username/password pair for convenience. - -## Signature - -```go -type BasicAuth struct -``` - -## Properties - - - - - -## Source - -[`cmd/swaig-test/simulate.go`](https://github.com/signalwire/signalwire-go/blob/main/cmd/swaig-test/simulate.go) - -Line 507. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/cmd/swaig-test/main/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/cmd/swaig-test/main/index.mdx deleted file mode 100644 index 0da69d0a24..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/cmd/swaig-test/main/index.mdx +++ /dev/null @@ -1,249 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/cmd/swaig-test/main" -title: "main" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "module" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/cmd/swaig-test" - module: "github.com.signalwire.signalwire-go.cmd.swaig-test" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/cmd/swaig-test/main.go" ---- -# `main` - -Command swaig-test is a CLI tool for testing SWAIG agents by exercising their HTTP endpoints. Unlike the Python SDK's swaig-test which loads agent files dynamically, this tool operates against a running agent server. - -Usage: - -``` -swaig-test --url http://user:pass@localhost:3000/ --dump-swml -swaig-test --url http://user:pass@localhost:3000/ --list-tools -swaig-test --url http://user:pass@localhost:3000/ --exec get_weather --param location=London -``` - -Binary-introspection mode (no HTTP): - -``` -swaig-test --example swmlservice_swaig_standalone --list-tools -``` - -In `--example` mode the CLI runs `go run ./examples/` with SWAIG\_LIST\_TOOLS=1 set in the subprocess environment. The SDK's Service.Serve() honors that env var by printing the registered tool registry between **SWAIG\_TOOLS\_BEGIN** / **SWAIG\_TOOLS\_END** sentinels and exiting 0 BEFORE binding any port. The CLI captures stdout, slices between the sentinels, parses the JSON, and pretty-prints — no HTTP, no /swaig endpoint, no rendered-SWML walk required. - -Simulator support for `--simulate-serverless` mode. - -In the Python SDK, `swaig-test` can load an agent from a source file and dispatch invocations through the chosen serverless adapter in-process. Go has no equivalent dynamic-loader for compiled binaries, so the simulator is split in two: - -1. A library API (this file) that sets/clears the mode-detection env vars, dispatches a synthetic Lambda Function URL event through pkg/lambda, and restores the outer environment on exit. Tests and in-process callers (e.g. users who embed `swaig-test` in their own test suites) drive the simulator through this API. -2. A flag on the `swaig-test` CLI (see main.go) that validates the requested platform against what the port actually implements and surfaces a clear error for unsupported platforms (Phase 9 of the porting guide). The flag also works with --url: it sets the mode-detection env vars for the duration of the invocation so the server-side URL generation goes through the platform branch. - -The simulator mirrors the behaviour of Python's `signalwire/cli/simulation/mock_env.py`: - -- Platform preset env vars are applied (AWS\_LAMBDA\_FUNCTION\_NAME etc). -- Conflicting env vars — most importantly SWML\_PROXY\_URL\_BASE — are cleared so platform-specific URL generation is actually exercised. -- The original env is restored on exit, whether the simulated call succeeded, errored, or panicked. Leaking env across simulations would corrupt later tests in the same process. - -## Signature - -```go -package main -``` - -## Examples - - - - ```go - swaig-test --url http://user:pass@localhost:3000/ --dump-swml - swaig-test --url http://user:pass@localhost:3000/ --list-tools - swaig-test --url http://user:pass@localhost:3000/ --exec get_weather --param location=London - ``` - - - - ```go - swaig-test --example swmlservice_swaig_standalone --list-tools - ``` - - - - ```go - swaig-test --url http://user:pass@localhost:3000/ --dump-swml - swaig-test --url http://user:pass@localhost:3000/ --list-tools - swaig-test --url http://user:pass@localhost:3000/ --exec get_weather --param location=London - ``` - - - - ```go - swaig-test --example swmlservice_swaig_standalone --list-tools - ``` - - - -## Classes - - - - BasicAuth bundles a username/password pair for convenience. - - - - LambdaSimResult is the decoded result of one synthetic Lambda invocation. Status is the HTTP status returned by the handler, Body is the response body (already base64-decoded if the adapter marked it so), and Headers mirrors the Lambda response envelope's flattened single-value map. - - - - SimulateLambdaOptions tunes an in-process Lambda simulation. - - - -## Functions - -### SimulateDumpSWMLViaLambda - -SimulateDumpSWMLViaLambda activates the Lambda environment, calls the factory to construct the agent (so any env-captured state reflects the simulated Lambda environment), issues a POST to the agent's route through the Lambda adapter, and returns the response body (the SWML document JSON). It's the library-side equivalent of `swaig-test --simulate-serverless lambda --dump-swml`, usable from in-process tests. - -The factory-based API is load-bearing: constructing the agent BEFORE activation would let SWML\_PROXY\_URL\_BASE from the outer shell leak into the agent's own proxyURLBase field, and the rendered webhook URLs would point at the outer proxy instead of the simulated Lambda function. Use SimulateDumpSWMLViaLambdaHandler only when you've already verified the handler doesn't capture env state — it skips the activation-ordering guarantee. - -basicAuth, if non-empty in both fields, adds a basic-auth header to the synthetic event so authed agents don't 401. - -#### Signature - -```go -func SimulateDumpSWMLViaLambda( - factory HandlerFactory, - agentRoute string, - opts SimulateLambdaOptions, - basicAuth BasicAuth -) ([]byte, error) -``` - -#### Parameters - - - - - - - - - -#### Returns - -`([]byte, error)` - -#### Source - -[`cmd/swaig-test/simulate.go`](https://github.com/signalwire/signalwire-go/blob/main/cmd/swaig-test/simulate.go) - -Line 396. - -*** - -### SimulateExecToolViaLambda - -SimulateExecToolViaLambda activates the Lambda environment, calls the factory to construct the agent (so any env-captured state reflects the simulated Lambda environment), and dispatches a SWAIG tool invocation through the Lambda adapter at `/swaig`. Returns the raw response body. - -#### Signature - -```go -func SimulateExecToolViaLambda( - factory HandlerFactory, - agentRoute string, - toolName string, - args map[string]any, - opts SimulateLambdaOptions, - basicAuth BasicAuth -) ([]byte, error) -``` - -#### Parameters - - - - - - - - - - - - - -#### Returns - -`([]byte, error)` - -#### Source - -[`cmd/swaig-test/simulate.go`](https://github.com/signalwire/signalwire-go/blob/main/cmd/swaig-test/simulate.go) - -Line 445. - -*** - -### SimulateLambdaInvocation - -SimulateLambdaInvocation runs a single synthetic Lambda Function URL event against the given handler with the Lambda environment active. It does NOT touch env vars itself — call activateLambdaEnv first and defer restore() so the env change has the right scope. - -The split exists so one activation can host multiple invocations (dump-SWML then exec-tool, say) without paying the env save/restore cost per call. - -#### Signature - -```go -func SimulateLambdaInvocation( - handler http.Handler, - method string, - path string, - headers map[string]string, - body io.Reader -) (LambdaSimResult, error) -``` - -#### Parameters - - - - - - - - - - - -#### Returns - -`(LambdaSimResult, error)` - -#### Source - -[`cmd/swaig-test/simulate.go`](https://github.com/signalwire/signalwire-go/blob/main/cmd/swaig-test/simulate.go) - -Line 287. - -## Type Aliases - -### HandlerFactory - -HandlerFactory is a zero-arg function that constructs the http.Handler under test. The factory is called AFTER the simulator has activated the platform env vars, so any env-var-driven state the agent captures at construction (notably SWML\_PROXY\_URL\_BASE, which pkg/swml.Service reads in its constructor) reflects the simulated environment rather than the outer shell. - -This mirrors the Python SDK's mock\_env.py flow: env vars are set first, then the agent module is imported/loaded, then invocations run against that freshly-loaded agent. - -#### Signature - -```go -type HandlerFactory alias -``` - -#### Source - -[`cmd/swaig-test/simulate.go`](https://github.com/signalwire/signalwire-go/blob/main/cmd/swaig-test/simulate.go) - -Line 376. - -## Source - -[`cmd/swaig-test/main.go`](https://github.com/signalwire/signalwire-go/blob/main/cmd/swaig-test/main.go) diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/cmd/swaig-test/main/lambda-sim-result/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/cmd/swaig-test/main/lambda-sim-result/index.mdx deleted file mode 100644 index 4888623575..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/cmd/swaig-test/main/lambda-sim-result/index.mdx +++ /dev/null @@ -1,37 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/cmd/swaig-test/main/lambda-sim-result" -title: "LambdaSimResult" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/cmd/swaig-test.LambdaSimResult" - parent: "github.com/signalwire/signalwire-go/cmd/swaig-test" - module: "github.com.signalwire.signalwire-go.cmd.swaig-test" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/cmd/swaig-test/simulate.go" ---- -# `LambdaSimResult` - -LambdaSimResult is the decoded result of one synthetic Lambda invocation. Status is the HTTP status returned by the handler, Body is the response body (already base64-decoded if the adapter marked it so), and Headers mirrors the Lambda response envelope's flattened single-value map. - -## Signature - -```go -type LambdaSimResult struct -``` - -## Properties - - - - - - - -## Source - -[`cmd/swaig-test/simulate.go`](https://github.com/signalwire/signalwire-go/blob/main/cmd/swaig-test/simulate.go) - -Line 273. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/cmd/swaig-test/main/simulate-lambda-options/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/cmd/swaig-test/main/simulate-lambda-options/index.mdx deleted file mode 100644 index ae00b36575..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/cmd/swaig-test/main/simulate-lambda-options/index.mdx +++ /dev/null @@ -1,47 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/cmd/swaig-test/main/simulate-lambda-options" -title: "SimulateLambdaOptions" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/cmd/swaig-test.SimulateLambdaOptions" - parent: "github.com/signalwire/signalwire-go/cmd/swaig-test" - module: "github.com.signalwire.signalwire-go.cmd.swaig-test" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/cmd/swaig-test/simulate.go" ---- -# `SimulateLambdaOptions` - -SimulateLambdaOptions tunes an in-process Lambda simulation. - -## Signature - -```go -type SimulateLambdaOptions struct -``` - -## Properties - - - FunctionName overrides AWS\_LAMBDA\_FUNCTION\_NAME. Empty means use the preset default ("test-agent-function"). - - - - FunctionURLOverride, if non-empty, is assigned to AWS\_LAMBDA\_FUNCTION\_URL during the simulation. The default (empty) lets GetFullURL fall back to constructing the URL from AWS\_LAMBDA\_FUNCTION\_NAME + AWS\_REGION, which is the more interesting code path to exercise in tests. - - - - Logger receives warnings about env state — notably if SWML\_PROXY\_URL\_BASE is still set after the clear attempt. A nil Logger sends warnings to os.Stderr. - - - - Region overrides AWS\_REGION. Empty means use the preset default ("us-east-1"). - - -## Source - -[`cmd/swaig-test/simulate.go`](https://github.com/signalwire/signalwire-go/blob/main/cmd/swaig-test/simulate.go) - -Line 195. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/agent/agent/agent-base/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/agent/agent/agent-base/index.mdx deleted file mode 100644 index 8a487ec130..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/agent/agent/agent-base/index.mdx +++ /dev/null @@ -1,2701 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/agent/agent/agent-base" -title: "AgentBase" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/agent.AgentBase" - parent: "github.com/signalwire/signalwire-go/pkg/agent" - module: "github.com.signalwire.signalwire-go.pkg.agent" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go" ---- -# `AgentBase` - -AgentBase is the central agent struct. It embeds \*swml.Service so that Service's fields and methods (Name, Route, Host, Port, basic auth, the HTTP server, the tool registry, etc.) are promoted onto AgentBase. The agent-specific state below is layered on top. - -## Signature - -```go -type AgentBase struct -``` - -## Properties - - - Agent identity — matches Python: self.agent\_id = agent\_id or str(uuid.uuid4()) Exported so callers can read the assigned ID without a getter. - - - - - - -## Methods - -### AddAnswerVerb - -AddAnswerVerb configures the answer verb. Merged with defaults at render time. - -#### Signature - -```go -func (*AgentBase) AddAnswerVerb(config map[string]any) *AgentBase -``` - -#### Parameters - - - -#### Returns - -`*AgentBase` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 1537. - -*** - -### AddFunctionInclude - -AddFunctionInclude adds a remote SWAIG function include. - -#### Signature - -```go -func (*AgentBase) AddFunctionInclude(url string, functions []string, metaData map[string]any) *AgentBase -``` - -#### Parameters - - - - - - - -#### Returns - -`*AgentBase` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 1472. - -*** - -### AddHint - -AddHint adds a single speech-recognition hint. - -#### Signature - -```go -func (*AgentBase) AddHint(hint string) *AgentBase -``` - -#### Parameters - - - -#### Returns - -`*AgentBase` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 1086. - -*** - -### AddHints - -AddHints adds multiple speech-recognition hints. - -#### Signature - -```go -func (*AgentBase) AddHints(hints []string) *AgentBase -``` - -#### Parameters - - - -#### Returns - -`*AgentBase` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 1094. - -*** - -### AddInternalFiller - -AddInternalFiller adds fillers for a specific function and language. - -See SetInternalFillers for the complete list of supported funcName values (SupportedInternalFillerNames) and what fillers do. Names outside the supported set log a warning and are stored but will not play at runtime. - -#### Signature - -```go -func (*AgentBase) AddInternalFiller(funcName string, langCode string, fillers []string) *AgentBase -``` - -#### Parameters - - - - - - - -#### Returns - -`*AgentBase` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 1444. - -*** - -### AddLanguage - -AddLanguage adds a language configuration as a raw map. - -#### Signature - -```go -func (*AgentBase) AddLanguage(config map[string]any) *AgentBase -``` - -#### Parameters - - - -#### Returns - -`*AgentBase` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 1133. - -*** - -### AddLanguageTyped - -AddLanguageTyped adds a language configuration using typed named parameters, matching the Python SDK's add\_language method signature exactly. - -Python equivalent: ai\_config\_mixin.AIConfigMixin.add\_language Python signature: add\_language(name, code, voice, speech\_fillers=None, - -``` -function_fillers=None, engine=None, model=None, params=None) -``` - -Parameters: - -- name: display name (e.g. "English") -- code: BCP-47 language code (e.g. "en-US") -- voice: TTS voice name; may use "engine.voice:model" combined format -- speechFillers: filler phrases for natural speech pauses -- functionFillers: filler phrases played during SWAIG function calls -- engine: explicit TTS engine name (e.g. "elevenlabs") -- model: explicit TTS model name (e.g. "eleven\_turbo\_v2\_5") -- params: optional per-language params dict (engine-specific tuning, voice settings, etc.). Variadic — passing a single non-empty map\[string]any emits the SWML language object's "params" key. Empty or omitted → key not emitted. - -#### Signature - -```go -func (*AgentBase) AddLanguageTyped( - name string, - code string, - voice string, - speechFillers []string, - functionFillers []string, - engine string, - model string, - params ...map[string]any -) *AgentBase -``` - -#### Parameters - - - - - - - - - - - - - - - - - -#### Returns - -`*AgentBase` - -#### Examples - - - - ```go - function_fillers=None, engine=None, model=None, params=None) - ``` - - - - ```go - function_fillers=None, engine=None, model=None, params=None) - ``` - - - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 1160. - -*** - -### AddMcpServer - -AddMcpServer adds an external MCP server for tool discovery and invocation. Tools are discovered via the MCP protocol at session start and registered as SWAIG functions. Returns self for method chaining. - -#### Signature - -```go -func (*AgentBase) AddMcpServer(cfg MCPServerConfig) *AgentBase -``` - -#### Parameters - - - -#### Returns - -`*AgentBase` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 1867. - -*** - -### AddPatternHint - -AddPatternHint adds a pattern-based speech-recognition hint with regex replacement semantics. - -Python equivalent: ai\_config\_mixin.AIConfigMixin.add\_pattern\_hint Python signature: add\_pattern\_hint(hint, pattern, replace, ignore\_case=False) - -The Python implementation appends to self.\_hints (not a separate patternHints list) as a dict with keys "hint", "pattern", "replace", "ignore\_case". The Go implementation stores in patternHints and merges into the rendered "hints" array at render time. - -Parameters: - -- hint: the hint text the model receives -- pattern: regex pattern for the spoken word/phrase -- replace: replacement string for the matched pattern -- ignoreCase: when true, matching is case-insensitive - -#### Signature - -```go -func (*AgentBase) AddPatternHint(hint string, pattern string, replace string, ignoreCase ...bool) *AgentBase -``` - -#### Parameters - - - - - - - - - -#### Returns - -`*AgentBase` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 1117. - -*** - -### AddPostAiVerb - -AddPostAiVerb adds a SWML verb to execute after the AI verb. - -#### Signature - -```go -func (*AgentBase) AddPostAiVerb(verbName string, config map[string]any) *AgentBase -``` - -#### Parameters - - - - - -#### Returns - -`*AgentBase` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 1555. - -*** - -### AddPostAnswerVerb - -AddPostAnswerVerb adds a SWML verb to execute after the answer. - -#### Signature - -```go -func (*AgentBase) AddPostAnswerVerb(verbName string, config map[string]any) *AgentBase -``` - -#### Parameters - - - - - -#### Returns - -`*AgentBase` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 1547. - -*** - -### AddPreAnswerVerb - -AddPreAnswerVerb adds a SWML verb to execute before the answer. - -#### Signature - -```go -func (*AgentBase) AddPreAnswerVerb(verbName string, config map[string]any) *AgentBase -``` - -#### Parameters - - - - - -#### Returns - -`*AgentBase` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 1529. - -*** - -### AddPronunciation - -AddPronunciation adds a pronunciation override rule. - -Python equivalent: ai\_config\_mixin.AIConfigMixin.add\_pronunciation Python signature: add\_pronunciation(replace, with\_text, ignore\_case=False) - -Parameters: - -- replace: the word or expression to match -- withText: the phonetic spelling to substitute -- ignoreCase: when true, matching ignores case (Python: ignore\_case) - -#### Signature - -```go -func (*AgentBase) AddPronunciation(replace string, withText string, ignoreCase ...bool) *AgentBase -``` - -#### Parameters - - - - - - - -#### Returns - -`*AgentBase` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 1289. - -*** - -### AddSkill - -AddSkill loads a skill by name with optional params and registers its tools. - -skillName is a skills.SkillName (a defined string type). The built-in skills.Skill\* constants give autocomplete + call-site typo checking; because Go auto-converts untyped string-constant literals, a bare "datetime" literal or skills.SkillName("custom") for a third-party skill compiles identically — parity with the Python reference's str parameter. - -#### Signature - -```go -func (*AgentBase) AddSkill(skillName skills.SkillName, params map[string]any) *AgentBase -``` - -#### Parameters - - - - - -#### Returns - -`*AgentBase` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 2244. - -*** - -### AddSwaigQueryParams - -AddSwaigQueryParams adds query parameters that will be appended to SWAIG webhook URLs. - -#### Signature - -```go -func (*AgentBase) AddSwaigQueryParams(params map[string]string) *AgentBase -``` - -#### Parameters - - - -#### Returns - -`*AgentBase` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 1671. - -*** - -### AsRouter - -AsRouter returns an http.Handler for embedding in a custom server. - -#### Signature - -```go -func (*AgentBase) AsRouter() http.Handler -``` - -#### Returns - -`http.Handler` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 2729. - -*** - -### AutoMapSipUsernames - -AutoMapSipUsernames automatically registers common SIP usernames derived from this agent's name and route. - -Python equivalent: AgentBase.auto\_map\_sip\_usernames (agent\_base.py line 674) - -Derives usernames by: - -1. Stripping non-alphanumeric/underscore chars from the agent name (lowercased) -2. Stripping non-alphanumeric/underscore chars from the route (lowercased) -3. If the cleaned name is longer than 3 chars, also registers a vowel-stripped variant - -#### Signature - -```go -func (*AgentBase) AutoMapSipUsernames() *AgentBase -``` - -#### Returns - -`*AgentBase` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 2195. - -*** - -### ClearPostAiVerbs - -ClearPostAiVerbs removes all post-AI verbs. - -#### Signature - -```go -func (*AgentBase) ClearPostAiVerbs() *AgentBase -``` - -#### Returns - -`*AgentBase` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 1579. - -*** - -### ClearPostAnswerVerbs - -ClearPostAnswerVerbs removes all post-answer verbs. - -#### Signature - -```go -func (*AgentBase) ClearPostAnswerVerbs() *AgentBase -``` - -#### Returns - -`*AgentBase` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 1571. - -*** - -### ClearPreAnswerVerbs - -ClearPreAnswerVerbs removes all pre-answer verbs. - -#### Signature - -```go -func (*AgentBase) ClearPreAnswerVerbs() *AgentBase -``` - -#### Returns - -`*AgentBase` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 1563. - -*** - -### ClearSwaigQueryParams - -ClearSwaigQueryParams removes all SWAIG query parameters. - -#### Signature - -```go -func (*AgentBase) ClearSwaigQueryParams() *AgentBase -``` - -#### Returns - -`*AgentBase` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 1681. - -*** - -### Contexts - -Contexts is an alias for DefineContexts. - -#### Signature - -```go -func (*AgentBase) Contexts() *contexts.ContextBuilder -``` - -#### Returns - -`*contexts.ContextBuilder` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 1615. - -*** - -### CreateToolToken - -CreateToolToken mints a per-call SWAIG-function token via the agent's SessionManager. Returns an empty string when minting fails (Python parity: state\_mixin.StateMixin.\_create\_tool\_token, which catches all exceptions and returns "" on error). - -#### Signature - -```go -func (*AgentBase) CreateToolToken(toolName string, callID string) (token string) -``` - -#### Parameters - - - - - -#### Returns - -`string` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 1843. - -*** - -### DefineContexts - -DefineContexts returns the context builder, creating it if needed. The builder is attached to this agent so Validate() can check user-defined tool names against reserved native tool names (next\_step, change\_context, gather\_submit). - -#### Signature - -```go -func (*AgentBase) DefineContexts() *contexts.ContextBuilder -``` - -#### Returns - -`*contexts.ContextBuilder` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 1594. - -*** - -### DefineTool - -DefineTool registers a tool (SWAIG function) with the agent. - -A SWAIG function is exactly the same concept as a "tool" in native OpenAI / Anthropic tool calling. On every LLM turn, the SDK renders each registered SWAIG function into the OpenAI tool schema: - -``` -{ - "type": "function", - "function": { - "name": "your_name_here", - "description": "your description text", - "parameters": { /* your JSON schema */ } - } -} -``` - -That schema is sent to the model as part of the same API call that produces the next assistant message. The model reads: - -- the function Description to decide WHEN to call this tool -- each parameter "description" (inside Parameters) to decide HOW to fill in that argument from the user's utterance - -This means descriptions are prompt engineering, not developer comments. A vague Description is the #1 cause of "the model has the right tool but doesn't call it" failures. - -BAD: - -``` -Description: "Lookup function" -Parameters: {"id": {"type": "string", "description": "the id"}} -``` - -GOOD: - -``` -Description: "Look up a customer's account details by account number. "+ - "Use this BEFORE quoting any account-specific info (balance, "+ - "plan, status). Do not use for general product questions.", -Parameters: map[string]any{ - "account_number": map[string]any{ - "type": "string", - "description": "The customer's 8-digit account number, no "+ - "dashes or spaces. Ask the user if they don't provide it.", - }, -}, -``` - -LLM tool selection accuracy degrades past ~7-8 simultaneously-active tools per call. Use Step.SetFunctions() to partition tools across steps so only the relevant subset is active at any moment. - -#### Signature - -```go -func (*AgentBase) DefineTool(def ToolDefinition) *AgentBase -``` - -#### Parameters - - - -#### Returns - -`*AgentBase` - -#### Examples - - - - ```go - { - "type": "function", - "function": { - "name": "your_name_here", - "description": "your description text", - "parameters": { /* your JSON schema */ } - } - } - ``` - - - - ```go - Description: "Lookup function" - Parameters: {"id": {"type": "string", "description": "the id"}} - ``` - - - - ```go - Description: "Look up a customer's account details by account number. "+ - "Use this BEFORE quoting any account-specific info (balance, "+ - "plan, status). Do not use for general product questions.", - Parameters: map[string]any{ - "account_number": map[string]any{ - "type": "string", - "description": "The customer's 8-digit account number, no "+ - "dashes or spaces. Ask the user if they don't provide it.", - }, - }, - ``` - - - - ```go - { - "type": "function", - "function": { - "name": "your_name_here", - "description": "your description text", - "parameters": { /* your JSON schema */ } - } - } - ``` - - - - ```go - Description: "Lookup function" - Parameters: {"id": {"type": "string", "description": "the id"}} - ``` - - - - ```go - Description: "Look up a customer's account details by account number. "+ - "Use this BEFORE quoting any account-specific info (balance, "+ - "plan, status). Do not use for general product questions.", - Parameters: map[string]any{ - "account_number": map[string]any{ - "type": "string", - "description": "The customer's 8-digit account number, no "+ - "dashes or spaces. Ask the user if they don't provide it.", - }, - }, - ``` - - - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 964. - -*** - -### DefineTools - -DefineTools returns all registered tool definitions in insertion order. - -#### Signature - -```go -func (*AgentBase) DefineTools() []*ToolDefinition -``` - -#### Returns - -`[]*ToolDefinition` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 1050. - -*** - -### EnableDebugEvents - -EnableDebugEvents sets the debug events level (0 = off). - -#### Signature - -```go -func (*AgentBase) EnableDebugEvents(level int) *AgentBase -``` - -#### Parameters - - - -#### Returns - -`*AgentBase` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 1464. - -*** - -### EnableDebugRoutes - -EnableDebugRoutes is a placeholder for adding debug HTTP routes. - -#### Signature - -```go -func (*AgentBase) EnableDebugRoutes() *AgentBase -``` - -#### Returns - -`*AgentBase` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 1689. - -*** - -### EnableMcpServer - -EnableMcpServer exposes this agent's tools as an MCP server endpoint at /mcp. The endpoint speaks JSON-RPC 2.0 (MCP protocol) and supports initialize, tools/list, tools/call, and ping. Returns self for method chaining. - -#### Signature - -```go -func (*AgentBase) EnableMcpServer() *AgentBase -``` - -#### Returns - -`*AgentBase` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 1888. - -*** - -### EnableSipRouting - -EnableSipRouting enables SIP-based routing for this agent. - -Python equivalent: AgentBase.enable\_sip\_routing(auto\_map=True, path="/sip") - -This registers a routing callback at the given path that checks incoming SIP usernames against the agent's registered username set. When autoMap is true, AutoMapSipUsernames is called to derive common usernames from the agent name and route. - -The Python implementation (agent\_base.py line 612) creates a sip\_routing\_callback that extracts the SIP username from the body, checks it against \_sip\_usernames, and returns None in both the matched and unmatched case — letting the normal routing continue. It then calls register\_routing\_callback to register the callback, and optionally calls auto\_map\_sip\_usernames. - -#### Signature - -```go -func (*AgentBase) EnableSipRouting(autoMap bool, path string) *AgentBase -``` - -#### Parameters - - - - - -#### Returns - -`*AgentBase` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 2084. - -*** - -### GetAllFunctions - -GetAllFunctions returns a snapshot of all registered SWAIG functions keyed by name. The returned map is a copy — subsequent registrations do not mutate it. (Python parity: “ToolRegistry.get\_all\_functions“.) - -#### Signature - -```go -func (*AgentBase) GetAllFunctions() map[string]*ToolDefinition -``` - -#### Returns - -`map[string]*ToolDefinition` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 1020. - -*** - -### GetBasicAuthCredentials - -GetBasicAuthCredentials returns the (username, password) configured for this agent's HTTP basic auth. - -Python equivalent: auth\_mixin.AuthMixin.get\_basic\_auth\_credentials (auth\_mixin.py line 42) Python behavior: returns (username, password) tuple from self.\_basic\_auth - -#### Signature - -```go -func (*AgentBase) GetBasicAuthCredentials() (string, string) -``` - -#### Returns - -`(string, string)` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 1796. - -*** - -### GetBasicAuthCredentialsWithSource - -GetBasicAuthCredentialsWithSource returns the basic-auth credentials plus a string indicating their SOURCE — one of "provided", "environment", or "generated". Mirrors Python's “auth\_mixin.AuthMixin.get\_basic\_auth\_credentials(include\_source=True)“ (auth\_mixin.py line 42-73). - -#### Signature - -```go -func (*AgentBase) GetBasicAuthCredentialsWithSource() (user string, pass string, source string) -``` - -#### Returns - -`(string, string, string)` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 1805. - -*** - -### GetContexts - -GetContexts returns the contexts as a serialised map (the same shape SWML expects), or nil when no contexts have been defined yet. This mirrors Python's “PromptManager.get\_contexts“ which returns the contexts dict or “None“. - -Python equivalent: prompt\_manager.PromptManager.get\_contexts - -#### Signature - -```go -func (*AgentBase) GetContexts() map[string]any -``` - -#### Returns - -`map[string]any` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 893. - -*** - -### GetFullURL - -GetFullURL returns the full URL for this agent's endpoint, optionally embedding basic-auth credentials. - -Python equivalent: AgentBase.get\_full\_url(include\_auth=False) (agent\_base.py:325) - -The Python implementation handles serverless URL construction (CGI / Lambda / Cloud Functions / Azure) inline. In the Go SDK, serverless URL construction lives in pkg/lambda; this method delegates server-mode URL building to the embedded swml.Service and matches Python's server-mode behavior. - -#### Signature - -```go -func (*AgentBase) GetFullURL(includeAuth bool) string -``` - -#### Parameters - - - -#### Returns - -`string` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 574. - -*** - -### GetFunction - -GetFunction returns the registered tool definition for the given name, or nil when no such function is registered. (Python parity: “ToolRegistry.get\_function“.) - -#### Signature - -```go -func (*AgentBase) GetFunction(name string) *ToolDefinition -``` - -#### Parameters - - - -#### Returns - -`*ToolDefinition` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 1008. - -*** - -### GetLanguageParams - -GetLanguageParams reads the per-language params dict for a previously-added language. - -Python equivalent: ai\_config\_mixin.AIConfigMixin.get\_language\_params Python signature: get\_language\_params(code) -> Optional\[Dict\[str, Any]] - -Returns the params map if set, or nil otherwise (including when the code is unknown). Callers can distinguish "no params set" from "empty params set" by the fact that empty maps are never stored (SetLanguageParams with an empty dict removes the key). - -#### Signature - -```go -func (*AgentBase) GetLanguageParams(code string) map[string]any -``` - -#### Parameters - - - -#### Returns - -`map[string]any` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 1258. - -*** - -### GetName - -GetName returns the agent's name. - -#### Signature - -```go -func (*AgentBase) GetName() string -``` - -#### Returns - -`string` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 559. - -*** - -### GetPostPrompt - -GetPostPrompt returns the current post-prompt text. Returns an empty string if no post-prompt has been set. - -Python equivalent: prompt\_mixin.PromptMixin.get\_post\_prompt (prompt\_mixin.py line 374) - -#### Signature - -```go -func (*AgentBase) GetPostPrompt() string -``` - -#### Returns - -`string` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 870. - -*** - -### GetPrompt - -GetPrompt returns the current prompt. If POM mode is active, it returns \[]map\[string]any; otherwise it returns the raw string. - -#### Signature - -```go -func (*AgentBase) GetPrompt() any -``` - -#### Returns - -`any` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 776. - -*** - -### GetRawPrompt - -GetRawPrompt returns the raw prompt text whatever “SetPromptText“ stored, regardless of POM mode. Returns an empty string when no raw prompt has been set. - -Python equivalent: prompt\_manager.PromptManager.get\_raw\_prompt - -#### Signature - -```go -func (*AgentBase) GetRawPrompt() string -``` - -#### Returns - -`string` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 881. - -*** - -### GetRoute - -GetRoute returns the agent's configured route path. - -#### Signature - -```go -func (*AgentBase) GetRoute() string -``` - -#### Returns - -`string` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 552. - -*** - -### HasFunction - -HasFunction reports whether a SWAIG function with the given name is registered. (Python parity: “ToolRegistry.has\_function“.) - -#### Signature - -```go -func (*AgentBase) HasFunction(name string) bool -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 998. - -*** - -### HasSkill - -HasSkill returns whether a skill is loaded. Accepts a skills.SkillName constant or any string literal (Go auto-converts), mirroring AddSkill. - -#### Signature - -```go -func (*AgentBase) HasSkill(skillName skills.SkillName) bool -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 2320. - -*** - -### ListSkills - -ListSkills returns the names of loaded skills. - -#### Signature - -```go -func (*AgentBase) ListSkills() []string -``` - -#### Returns - -`[]string` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 2314. - -*** - -### ListToolNames - -ListToolNames returns the names of every registered SWAIG tool in insertion order. Implements contexts.ToolLister. - -#### Signature - -```go -func (*AgentBase) ListToolNames() []string -``` - -#### Returns - -`[]string` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 1606. - -*** - -### ManualSetProxyUrl - -ManualSetProxyUrl overrides the proxy URL base used for webhook URL generation. - -#### Signature - -```go -func (*AgentBase) ManualSetProxyUrl(url string) *AgentBase -``` - -#### Parameters - - - -#### Returns - -`*AgentBase` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 1646. - -*** - -### OnDebugEvent - -OnDebugEvent registers a callback for debug events. - -#### Signature - -```go -func (*AgentBase) OnDebugEvent(cb DebugEventHandler) *AgentBase -``` - -#### Parameters - - - -#### Returns - -`*AgentBase` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 2337. - -*** - -### OnFunctionCall - -OnFunctionCall dispatches a SWAIG function call to the registered handler. - -#### Signature - -```go -func (*AgentBase) OnFunctionCall(name string, args map[string]any, rawData map[string]any) (any, error) -``` - -#### Parameters - - - - - - - -#### Returns - -`(any, error)` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 1063. - -*** - -### OnRequest - -OnRequest is called on every SWML request before rendering. Subclasses can override this method to inspect or transform the request data. It delegates to OnSwmlRequest. - -Python equivalent: web\_mixin.WebMixin.on\_request (web\_mixin.py line 1266) Python signature: on\_request(request\_data, callback\_path) -> Optional\[dict] - -Returns nil to proceed with default rendering, or a non-nil map containing SWML document overrides. - -#### Signature - -```go -func (*AgentBase) OnRequest(requestData map[string]any, callbackPath string) map[string]any -``` - -#### Parameters - - - - - -#### Returns - -`map[string]any` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 1703. - -*** - -### OnSummary - -OnSummary registers a callback for post-prompt summaries. - -#### Signature - -```go -func (*AgentBase) OnSummary(cb SummaryCallback) *AgentBase -``` - -#### Parameters - - - -#### Returns - -`*AgentBase` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 2329. - -*** - -### OnSwmlRequest - -OnSwmlRequest is the primary customization point for the user to modify the SWML document based on request data. If a hook has been registered via SetOnSwmlRequestHook the hook is invoked; otherwise this returns nil (no modification). - -Python equivalent: web\_mixin.WebMixin.on\_swml\_request (web\_mixin.py line 1287) Python signature: on\_swml\_request(request\_data, callback\_path, request) -> Optional\[dict] - -Go has no method overriding via embedded structs alone — the hook field is the idiomatic Go equivalent of Python's overridable on\_swml\_request. The third \*http.Request argument is preserved on the Go-native signature (the cross-language audit projects only the first two args). Returning a non-nil map applies modifications to the rendered SWML; returning nil uses the default rendering unchanged. - -#### Signature - -```go -func (*AgentBase) OnSwmlRequest(requestData map[string]any, callbackPath string, r *http.Request) map[string]any -``` - -#### Parameters - - - - - - - -#### Returns - -`map[string]any` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 1721. - -*** - -### Pom - -Pom returns a typed PromptObjectModel built from the agent's current POM sections. Returns nil when use\_pom is false (Python parity: “self.pom“ is “None“ when “use\_pom=False“). The returned value is a deep copy / fresh build — mutations don't affect the agent's internal state. - -Python equivalent: “agent.pom“ instance attribute (agent\_base.py line 209), which is a “PromptObjectModel“ instance. - -#### Signature - -```go -func (*AgentBase) Pom() *pom.PromptObjectModel -``` - -#### Returns - -`*pom.PromptObjectModel` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 795. - -*** - -### PromptAddSection - -PromptAddSection appends a new section to the POM prompt. - -Python equivalent: prompt\_mixin.PromptMixin.prompt\_add\_section Added params to match Python signature: numbered, numberedBullets, subsections. - numbered: if true the section itself is rendered with a numeric marker - numberedBullets: if true the bullet list is rendered with numbers - subsections: optional list of child section maps (each with "title", "body", "bullets") - -#### Signature - -```go -func (*AgentBase) PromptAddSection( - title string, - body string, - bullets []string, - opts ...PromptSectionOption -) *AgentBase -``` - -#### Parameters - - - - - - - - - -#### Returns - -`*AgentBase` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 615. - -*** - -### PromptAddSubsection - -PromptAddSubsection adds a subsection under an existing parent section. - -#### Signature - -```go -func (*AgentBase) PromptAddSubsection( - parentTitle string, - title string, - body string, - bullets []string -) *AgentBase -``` - -#### Parameters - - - - - - - - - -#### Returns - -`*AgentBase` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 739. - -*** - -### PromptAddToSection - -PromptAddToSection finds an existing POM section by title and appends text and/or bullets. If the section does not exist, it is a no-op. - -Python equivalent: prompt\_mixin.PromptMixin.prompt\_add\_to\_section Added params to match Python signature: bullet (single bullet string) and bullets (\[]string list). When body is non-empty it is appended to the section body. When bullet is non-empty it is added to the bullets list. When bullets is non-nil its elements are appended to the bullets list. - -#### Signature - -```go -func (*AgentBase) PromptAddToSection(title string, body string, opts ...PromptAddToSectionOption) *AgentBase -``` - -#### Parameters - - - - - - - -#### Returns - -`*AgentBase` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 681. - -*** - -### PromptHasSection - -PromptHasSection returns true if a POM section with the given title exists. - -#### Signature - -```go -func (*AgentBase) PromptHasSection(title string) bool -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 763. - -*** - -### RegisterRoutingCallback - -RegisterRoutingCallback registers a callback function that is invoked for incoming requests at the given path to determine routing. - -Python equivalent: web\_mixin.WebMixin.register\_routing\_callback Python signature: register\_routing\_callback(callback\_fn, path="/sip") - -The callback receives the HTTP request and the parsed body. It should return a non-nil map to override the response, or nil to let normal processing continue. This method delegates to swml.Service.RegisterRoutingCallback. - -For Python-aligned redirect semantics (callback returns a route string and the framework issues an HTTP 307 redirect), use RegisterSipRoutingCallback. - -#### Signature - -```go -func (*AgentBase) RegisterRoutingCallback( - callbackFn func(r *http.Request, body map[string]any) map[string]any, - path string -) -``` - -#### Parameters - - - - - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 2132. - -*** - -### RegisterSipRoutingCallback - -RegisterSipRoutingCallback registers a callback whose string return value triggers an HTTP 307 Temporary Redirect to that route. An empty return value (or a GET / non-POST request) lets normal SWML processing continue. - -Python equivalent: web\_mixin.WebMixin.register\_routing\_callback Python signature: register\_routing\_callback(callback\_fn, path="/sip") - -The Python callback returns Optional\[str]; on a non-None return the framework responds with HTTP 307 + Location: route (web\_mixin.py:628-635). This method preserves that behavior, in contrast to RegisterRoutingCallback which returns a response document override (a richer Go-only mechanism). - -Use this form when porting Python code that relies on redirect-based SIP or route-dispatch patterns. - -#### Signature - -```go -func (*AgentBase) RegisterSipRoutingCallback( - callbackFn func(r *http.Request, body map[string]any) string, - path string -) -``` - -#### Parameters - - - - - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 2153. - -*** - -### RegisterSipUsername - -RegisterSipUsername registers a SIP username that this agent handles. - -#### Signature - -```go -func (*AgentBase) RegisterSipUsername(username string) *AgentBase -``` - -#### Parameters - - - -#### Returns - -`*AgentBase` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 2226. - -*** - -### RegisterSwaigFunction - -RegisterSwaigFunction registers a raw SWAIG function definition (e.g. for DataMap tools that don't have a Go handler). - -#### Signature - -```go -func (*AgentBase) RegisterSwaigFunction(funcDef map[string]any) *AgentBase -``` - -#### Parameters - - - -#### Returns - -`*AgentBase` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 976. - -*** - -### RemoveFunction - -RemoveFunction removes a registered SWAIG function. Returns true when the function was found and removed; false when it wasn't registered. (Python parity: “ToolRegistry.remove\_function“.) - -#### Signature - -```go -func (*AgentBase) RemoveFunction(name string) bool -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 1033. - -*** - -### RemoveSkill - -RemoveSkill unloads a skill by name. Accepts a skills.SkillName constant or any string literal (Go auto-converts), mirroring AddSkill. - -#### Signature - -```go -func (*AgentBase) RemoveSkill(skillName skills.SkillName) *AgentBase -``` - -#### Parameters - - - -#### Returns - -`*AgentBase` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 2308. - -*** - -### RenderSWML - -RenderSWML builds the complete SWML document for a request. - -#### Signature - -```go -func (*AgentBase) RenderSWML(requestData map[string]any, request *http.Request) map[string]any -``` - -#### Parameters - - - - - -#### Returns - -`map[string]any` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 2488. - -*** - -### ResetContexts - -ResetContexts removes all contexts, returning the agent to a no-contexts state. This is a convenience wrapper around DefineContexts().Reset(). Use it in a dynamic config callback when you need to rebuild contexts from scratch for a specific request. - -#### Signature - -```go -func (*AgentBase) ResetContexts() *AgentBase -``` - -#### Returns - -`*AgentBase` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 1623. - -*** - -### Run - -Run starts the HTTP server for the agent. This is a blocking call. - -Run delegates to RunContext with context.Background(); use RunContext to drive a graceful shutdown from a context (cancellation or deadline). - -#### Signature - -```go -func (*AgentBase) Run() error -``` - -#### Returns - -`error` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 2666. - -*** - -### RunContext - -RunContext is the context-aware form of Run. It blocks serving HTTP exactly like Run, but when ctx is cancelled (or its deadline passes) it triggers the same graceful HTTP shutdown that SetupGracefulShutdown performs on a signal — draining in-flight requests — then returns nil. It composes with SetupGracefulShutdown: whichever of (ctx, SIGTERM/SIGINT) fires first wins. - -This is a Go-port addition (the Python reference's run()/serve loop has no caller-supplied cancellation token); documented in PORT\_ADDITIONS.md. - -#### Signature - -```go -func (*AgentBase) RunContext(ctx context.Context) error -``` - -#### Parameters - - - -#### Returns - -`error` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 2678. - -*** - -### Serve - -Serve is an alias for Run. - -#### Signature - -```go -func (*AgentBase) Serve() error -``` - -#### Returns - -`error` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 2724. - -*** - -### SetDynamicConfigCallback - -SetDynamicConfigCallback sets a callback invoked on each request to allow per-request agent customisation. - -#### Signature - -```go -func (*AgentBase) SetDynamicConfigCallback(cb DynamicConfigCallback) *AgentBase -``` - -#### Parameters - - - -#### Returns - -`*AgentBase` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 1638. - -*** - -### SetFunctionIncludes - -SetFunctionIncludes replaces all function includes. - -#### Signature - -```go -func (*AgentBase) SetFunctionIncludes(includes []map[string]any) *AgentBase -``` - -#### Parameters - - - -#### Returns - -`*AgentBase` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 1487. - -*** - -### SetGlobalData - -SetGlobalData replaces all global data. - -#### Signature - -```go -func (*AgentBase) SetGlobalData(data map[string]any) *AgentBase -``` - -#### Parameters - - - -#### Returns - -`*AgentBase` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 1328. - -*** - -### SetInternalFillers - -SetInternalFillers replaces all internal fillers. - -Internal fillers are short phrases the AI agent speaks (via TTS) while an internal/native function is running, so the caller doesn't hear dead air during transitions or background work. - -Supported function names (match the SWAIGInternalFiller schema): - -``` -hangup — when the agent is hanging up -check_time — when checking the time -wait_for_user — when waiting for user input -wait_seconds — during deliberate pauses -adjust_response_latency — when adjusting response timing -next_step — transitioning between steps in prompt.contexts -change_context — switching between contexts in prompt.contexts -get_visual_input — processing visual input (enable_vision) -get_ideal_strategy — thinking (enable_thinking) -``` - -Notably NOT supported: change\_step, gather\_submit, or arbitrary user-defined SWAIG function names. The runtime only honors fillers for the names listed above; everything else is silently ignored at the SWML level. This method warns at registration time if you pass an unknown name so you catch the typo early. - -#### Signature - -```go -func (*AgentBase) SetInternalFillers(fillers map[string]map[string][]string) *AgentBase -``` - -#### Parameters - - - -#### Returns - -`*AgentBase` - -#### Examples - - - - ```go - hangup — when the agent is hanging up - check_time — when checking the time - wait_for_user — when waiting for user input - wait_seconds — during deliberate pauses - adjust_response_latency — when adjusting response timing - next_step — transitioning between steps in prompt.contexts - change_context — switching between contexts in prompt.contexts - get_visual_input — processing visual input (enable_vision) - get_ideal_strategy — thinking (enable_thinking) - ``` - - - - ```go - hangup — when the agent is hanging up - check_time — when checking the time - wait_for_user — when waiting for user input - wait_seconds — during deliberate pauses - adjust_response_latency — when adjusting response timing - next_step — transitioning between steps in prompt.contexts - change_context — switching between contexts in prompt.contexts - get_visual_input — processing visual input (enable_vision) - get_ideal_strategy — thinking (enable_thinking) - ``` - - - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 1411. - -*** - -### SetLanguageParams - -SetLanguageParams sets (or replaces) the per-language params dict on an already-added language. Useful when language entries are built up via AddLanguage/AddLanguageTyped first and engine-specific tuning is added later (e.g., from a config loader). - -Python equivalent: ai\_config\_mixin.AIConfigMixin.set\_language\_params Python signature: set\_language\_params(code, params) - -Parameters: - -- code: language code as previously passed to AddLanguage (e.g. "en-US") -- params: engine-specific params dict to attach. Empty/nil removes the key. - -Returns the AgentBase for chaining. No-op if the code isn't found. - -#### Signature - -```go -func (*AgentBase) SetLanguageParams(code string, params map[string]any) *AgentBase -``` - -#### Parameters - - - - - -#### Returns - -`*AgentBase` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 1232. - -*** - -### SetLanguages - -SetLanguages replaces all language configurations. - -#### Signature - -```go -func (*AgentBase) SetLanguages(languages []map[string]any) *AgentBase -``` - -#### Parameters - - - -#### Returns - -`*AgentBase` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 1273. - -*** - -### SetNativeFunctions - -SetNativeFunctions sets the list of native function names. - -#### Signature - -```go -func (*AgentBase) SetNativeFunctions(names []string) *AgentBase -``` - -#### Parameters - - - -#### Returns - -`*AgentBase` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 1346. - -*** - -### SetOnSwmlRequestHook - -SetOnSwmlRequestHook registers a function that customizes the SWML response on a per-request basis. The hook receives the parsed body, the callback path (for routing-callback dispatch), and the raw \*http.Request for header / query inspection. Returning a non-nil map applies modifications to the rendered SWML; returning nil falls through to the default rendering. - -Python parity: this is the Go-idiomatic way of "overriding" on\_swml\_request — Go has no method inheritance. - -#### Signature - -```go -func (*AgentBase) SetOnSwmlRequestHook(hook OnSwmlRequestHook) *AgentBase -``` - -#### Parameters - - - -#### Returns - -`*AgentBase` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 1740. - -*** - -### SetParam - -SetParam sets a single AI parameter (e.g. temperature, top\_p). - -#### Signature - -```go -func (*AgentBase) SetParam(key string, value any) *AgentBase -``` - -#### Parameters - - - - - -#### Returns - -`*AgentBase` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 1312. - -*** - -### SetParams - -SetParams replaces all AI parameters. - -#### Signature - -```go -func (*AgentBase) SetParams(params map[string]any) *AgentBase -``` - -#### Parameters - - - -#### Returns - -`*AgentBase` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 1320. - -*** - -### SetPostPrompt - -SetPostPrompt sets the post-prompt text used for conversation summary. - -#### Signature - -```go -func (*AgentBase) SetPostPrompt(text string) *AgentBase -``` - -#### Parameters - - - -#### Returns - -`*AgentBase` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 592. - -*** - -### SetPostPromptLlmParams - -SetPostPromptLlmParams sets LLM parameters for the post-prompt. - -#### Signature - -```go -func (*AgentBase) SetPostPromptLlmParams(params map[string]any) *AgentBase -``` - -#### Parameters - - - -#### Returns - -`*AgentBase` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 1503. - -*** - -### SetPostPromptUrl - -SetPostPromptUrl sets the URL for post-prompt summary delivery. - -#### Signature - -```go -func (*AgentBase) SetPostPromptUrl(url string) *AgentBase -``` - -#### Parameters - - - -#### Returns - -`*AgentBase` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 1662. - -*** - -### SetPromptLlmParams - -SetPromptLlmParams sets LLM parameters for the main prompt. - -#### Signature - -```go -func (*AgentBase) SetPromptLlmParams(params map[string]any) *AgentBase -``` - -#### Parameters - - - -#### Returns - -`*AgentBase` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 1495. - -*** - -### SetPromptPom - -SetPromptPom sets the POM sections directly and enables POM mode. - -#### Signature - -```go -func (*AgentBase) SetPromptPom(pom []map[string]any) *AgentBase -``` - -#### Parameters - - - -#### Returns - -`*AgentBase` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 600. - -*** - -### SetPromptText - -SetPromptText sets the agent prompt to raw text, disabling POM mode. - -#### Signature - -```go -func (*AgentBase) SetPromptText(text string) *AgentBase -``` - -#### Parameters - - - -#### Returns - -`*AgentBase` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 583. - -*** - -### SetPromptTransformer - -SetPromptTransformer installs a hook that is called with the assembled prompt map before it is placed into the AI verb config. The function may return a new map or mutate and return the same map. Set to nil to remove a previously installed transformer. - -This is used by specialised agents (e.g. BedrockAgent) that need to add or filter prompt-level keys without reimplementing all of RenderSWML. - -#### Signature - -```go -func (*AgentBase) SetPromptTransformer(fn func(map[string]any) map[string]any) *AgentBase -``` - -#### Parameters - - - -#### Returns - -`*AgentBase` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 1517. - -*** - -### SetPronunciations - -SetPronunciations replaces all pronunciation overrides. - -#### Signature - -```go -func (*AgentBase) SetPronunciations(p []map[string]any) *AgentBase -``` - -#### Parameters - - - -#### Returns - -`*AgentBase` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 1304. - -*** - -### SetupGracefulShutdown - -SetupGracefulShutdown registers OS signal handlers for SIGTERM and SIGINT that initiate a graceful HTTP server shutdown. This is useful for Kubernetes deployments where the pod receives SIGTERM before termination. - -Python equivalent: web\_mixin.WebMixin.setup\_graceful\_shutdown (web\_mixin.py line 1405) Python behavior: registers signal.SIGTERM and signal.SIGINT handlers that call sys.exit(0) after optional cleanup. - -The Go implementation uses signal.NotifyContext so that the active HTTP server (if started via Run/Serve) can shut down cleanly. Call this before Run(). - -#### Signature - -```go -func (*AgentBase) SetupGracefulShutdown() -``` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 1758. - -*** - -### SetWebHookUrl - -SetWebHookUrl explicitly sets the webhook URL used in SWAIG function defs. - -#### Signature - -```go -func (*AgentBase) SetWebHookUrl(url string) *AgentBase -``` - -#### Parameters - - - -#### Returns - -`*AgentBase` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 1654. - -*** - -### UpdateGlobalData - -UpdateGlobalData merges data into existing global data. - -#### Signature - -```go -func (*AgentBase) UpdateGlobalData(data map[string]any) *AgentBase -``` - -#### Parameters - - - -#### Returns - -`*AgentBase` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 1336. - -*** - -### ValidateBasicAuth - -ValidateBasicAuth validates the provided username and password against the agent's configured basic auth credentials using a constant-time comparison. - -Python equivalent: auth\_mixin.AuthMixin.validate\_basic\_auth (auth\_mixin.py line 24) Python behavior: hmac.compare\_digest(username, exp\_user) and compare\_digest(password, exp\_pass) - -#### Signature - -```go -func (*AgentBase) ValidateBasicAuth(username string, password string) bool -``` - -#### Parameters - - - - - -#### Returns - -`bool` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 1784. - -*** - -### ValidateToolToken - -ValidateToolToken verifies that a SWAIG tool security token is authentic, unexpired, and matches the given function name and call ID. Returns false when the function is not registered, the SessionManager rejects the token, or the validation panics for any reason. - -Python parity: state\_mixin.StateMixin.validate\_tool\_token. Python rejects unknown function names up-front and swallows exceptions, returning false. - -#### Signature - -```go -func (*AgentBase) ValidateToolToken(functionName string, token string, callID string) (ok bool) -``` - -#### Parameters - - - - - - - -#### Returns - -`bool` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 1827. - -## Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 326. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/agent/agent/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/agent/agent/index.mdx deleted file mode 100644 index a3033676cc..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/agent/agent/index.mdx +++ /dev/null @@ -1,976 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/agent/agent" -title: "agent" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "module" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/agent" - module: "github.com.signalwire.signalwire-go.pkg.agent" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go" ---- -# `agent` - -Package agent provides the core AgentBase type that wires together SWML rendering, tool dispatch, prompt management, AI configuration, and HTTP serving into a single self-contained AI agent. - -## Signature - -```go -package agent -``` - -## Constants - - - SupportedInternalFillerNames is the complete set of internal SWAIG function names that accept fillers, matching the SWAIGInternalFiller schema definition. Any name outside this set is silently ignored by the runtime — SetInternalFillers / AddInternalFiller warn if you pass an unknown name. Notable absences: change\_step, gather\_submit, and arbitrary user-defined SWAIG function names are NOT supported. - - -## Classes - - - - AgentBase is the central agent struct. It embeds \*swml.Service so that Service's fields and methods (Name, Route, Host, Port, basic auth, the HTTP server, the tool registry, etc.) are promoted onto AgentBase. The agent-specific state below is layered on top. - - - - MCPServerConfig holds configuration for an external MCP server connection. - - - - ToolDefinition describes a single SWAIG tool including its JSON Schema parameters and a Go handler function. - - - -## Functions - -### NewAgentBase - -NewAgentBase creates a new AgentBase with default values and applies the provided functional options. - -#### Signature - -```go -func NewAgentBase(opts ...AgentOption) *AgentBase -``` - -#### Parameters - - - -#### Returns - -`*AgentBase` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 449. - -*** - -### WithAgentID - -WithAgentID sets a fixed agent ID. If not provided, a UUID is generated automatically in NewAgentBase. - -Python equivalent: agent\_id parameter in AgentBase.**init** Python behavior: self.agent\_id = agent\_id or str(uuid.uuid4()) - -#### Signature - -```go -func WithAgentID(id string) AgentOption -``` - -#### Parameters - - - -#### Returns - -`AgentOption` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 221. - -*** - -### WithAIVerbName - -WithAIVerbName overrides the SWML verb name used for the AI section. The default is "ai". Set to "amazon\_bedrock" for BedrockAgent. - -#### Signature - -```go -func WithAIVerbName(name string) AgentOption -``` - -#### Parameters - - - -#### Returns - -`AgentOption` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 194. - -*** - -### WithAutoAnswer - -WithAutoAnswer controls whether the answer verb is emitted automatically. - -#### Signature - -```go -func WithAutoAnswer(autoAnswer bool) AgentOption -``` - -#### Parameters - - - -#### Returns - -`AgentOption` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 164. - -*** - -### WithBasicAuth - -WithBasicAuth sets explicit basic-auth credentials. - -#### Signature - -```go -func WithBasicAuth(user string, password string) AgentOption -``` - -#### Parameters - - - - - -#### Returns - -`AgentOption` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 156. - -*** - -### WithBullet - -WithBullet adds a single bullet point to an existing section. Python equivalent: bullet= param in prompt\_add\_to\_section - -#### Signature - -```go -func WithBullet(b string) PromptAddToSectionOption -``` - -#### Parameters - - - -#### Returns - -`PromptAddToSectionOption` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 728. - -*** - -### WithBullets - -WithBullets adds multiple bullet points to an existing section. Python equivalent: bullets= param in prompt\_add\_to\_section - -#### Signature - -```go -func WithBullets(bs []string) PromptAddToSectionOption -``` - -#### Parameters - - - -#### Returns - -`PromptAddToSectionOption` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 734. - -*** - -### WithCheckForInputOverride - -WithCheckForInputOverride enables the /check\_for\_input endpoint, which allows external systems to inject input into an active AI session. - -Python equivalent: check\_for\_input\_override parameter in AgentBase.**init** - -#### Signature - -```go -func WithCheckForInputOverride(enable bool) AgentOption -``` - -#### Parameters - - - -#### Returns - -`AgentOption` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 266. - -*** - -### WithConfigFile - -WithConfigFile sets the path to an optional YAML/JSON service configuration file. When provided, the file is loaded at startup and its values are merged with (but do not override) explicit constructor parameters. - -Python equivalent: config\_file parameter in AgentBase.**init** - -#### Signature - -```go -func WithConfigFile(path string) AgentOption -``` - -#### Parameters - - - -#### Returns - -`AgentOption` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 275. - -*** - -### WithDefaultWebhookURL - -WithDefaultWebhookURL sets the default webhook URL for all SWAIG functions. When set, this URL is used as the fallback for all tools that do not specify their own WebhookURL. - -Python equivalent: default\_webhook\_url parameter in AgentBase.**init** - -#### Signature - -```go -func WithDefaultWebhookURL(url string) AgentOption -``` - -#### Parameters - - - -#### Returns - -`AgentOption` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 212. - -*** - -### WithEnablePostPromptOverride - -WithEnablePostPromptOverride allows subclasses to override the post-prompt URL with a custom handler. When enabled, the agent registers a /post\_prompt\_override endpoint and routes summary callbacks through it. - -Python equivalent: enable\_post\_prompt\_override parameter in AgentBase.**init** - -#### Signature - -```go -func WithEnablePostPromptOverride(enable bool) AgentOption -``` - -#### Parameters - - - -#### Returns - -`AgentOption` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 258. - -*** - -### WithHost - -WithHost sets the HTTP listen address. - -#### Signature - -```go -func WithHost(host string) AgentOption -``` - -#### Parameters - - - -#### Returns - -`AgentOption` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 146. - -*** - -### WithName - -WithName sets the agent (and service) name. - -#### Signature - -```go -func WithName(name string) AgentOption -``` - -#### Parameters - - - -#### Returns - -`AgentOption` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 136. - -*** - -### WithNativeFunctions - -WithNativeFunctions sets the initial list of native (built-in) SWAIG function names to include in the SWAIG object on every rendered document. - -Python equivalent: native\_functions parameter in AgentBase.**init** - -#### Signature - -```go -func WithNativeFunctions(names []string) AgentOption -``` - -#### Parameters - - - -#### Returns - -`AgentOption` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 229. - -*** - -### WithNumbered - -WithNumbered marks the section as numbered. Python equivalent: numbered=True in prompt\_add\_section - -#### Signature - -```go -func WithNumbered(v bool) PromptSectionOption -``` - -#### Parameters - - - -#### Returns - -`PromptSectionOption` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 657. - -*** - -### WithNumberedBullets - -WithNumberedBullets marks the bullets list as numbered. Python equivalent: numbered\_bullets=True in prompt\_add\_section - -#### Signature - -```go -func WithNumberedBullets(v bool) PromptSectionOption -``` - -#### Parameters - - - -#### Returns - -`PromptSectionOption` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 663. - -*** - -### WithPort - -WithPort sets the HTTP listen port. - -#### Signature - -```go -func WithPort(port int) AgentOption -``` - -#### Parameters - - - -#### Returns - -`AgentOption` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 151. - -*** - -### WithRecordCall - -WithRecordCall enables or disables automatic call recording. - -#### Signature - -```go -func WithRecordCall(record bool) AgentOption -``` - -#### Parameters - - - -#### Returns - -`AgentOption` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 169. - -*** - -### WithRecordFormat - -WithRecordFormat sets the recording format (e.g. "mp4", "wav"). The parameter is the defined string type swaig.RecordFormat: the Format\* constants give autocomplete + a compile-time typo check, while Go's untyped-constant auto-conversion keeps a bare "wav" literal compiling. It is stored as a plain string so the emitted SWML is unchanged. - -#### Signature - -```go -func WithRecordFormat(format swaig.RecordFormat) AgentOption -``` - -#### Parameters - - - -#### Returns - -`AgentOption` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 178. - -*** - -### WithRecordStereo - -WithRecordStereo enables or disables stereo recording. - -#### Signature - -```go -func WithRecordStereo(stereo bool) AgentOption -``` - -#### Parameters - - - -#### Returns - -`AgentOption` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 183. - -*** - -### WithRoute - -WithRoute sets the HTTP route path the agent listens on. - -#### Signature - -```go -func WithRoute(route string) AgentOption -``` - -#### Parameters - - - -#### Returns - -`AgentOption` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 141. - -*** - -### WithSchemaPath - -WithSchemaPath sets the path to an optional SWML schema file used for validation. If empty, no schema validation is performed. - -Python equivalent: schema\_path parameter in AgentBase.**init** - -#### Signature - -```go -func WithSchemaPath(path string) AgentOption -``` - -#### Parameters - - - -#### Returns - -`AgentOption` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 241. - -*** - -### WithSchemaValidation - -WithSchemaValidation controls whether the rendered SWML document is validated against the SWML schema before serving. Defaults to true. Can also be disabled via the SWML\_SKIP\_SCHEMA\_VALIDATION=1 environment variable. - -Python equivalent: schema\_validation parameter in AgentBase.**init** - -#### Signature - -```go -func WithSchemaValidation(validate bool) AgentOption -``` - -#### Parameters - - - -#### Returns - -`AgentOption` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 285. - -*** - -### WithSigningKey - -WithSigningKey sets the SignalWire Signing Key used to validate inbound webhook signatures. When non-empty, signed routes (POST /, /swaig, /post\_prompt, and any registered routing callbacks) are wrapped with security.WebhookMiddleware — unsigned or mis-signed requests are rejected with HTTP 403 before reaching the handler. - -When this option is unset, AgentBase falls back to the SIGNALWIRE\_SIGNING\_KEY environment variable. When neither is set, the agent accepts unsigned requests and emits a one-time WARN log on startup, per porting-sdk/webhooks.md §"AgentBase integration". - -Python equivalent: AgentBase(signing\_key="...") parameter. - -#### Signature - -```go -func WithSigningKey(key string) AgentOption -``` - -#### Parameters - - - -#### Returns - -`AgentOption` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 301. - -*** - -### WithSigningKeyTrustProxy - -WithSigningKeyTrustProxy enables X-Forwarded-Proto / X-Forwarded-Host honoring during URL reconstruction. Set true when AgentBase runs behind a reverse proxy / ngrok / load balancer that terminates TLS upstream; without it the validator sees the internal scheme/host and the signature will mismatch. - -No Python parity flag — Python's web\_mixin reads X-Forwarded-\* headers unconditionally; in Go we make it explicit because forging these headers is a real attack on naive deployments. - -#### Signature - -```go -func WithSigningKeyTrustProxy(trust bool) AgentOption -``` - -#### Parameters - - - -#### Returns - -`AgentOption` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 314. - -*** - -### WithSubsections - -WithSubsections attaches child sections to the parent section. Python equivalent: subsections=\[...] in prompt\_add\_section - -#### Signature - -```go -func WithSubsections(subs []map[string]any) PromptSectionOption -``` - -#### Parameters - - - -#### Returns - -`PromptSectionOption` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 669. - -*** - -### WithSuppressLogs - -WithSuppressLogs disables verbose structured logging from the agent. When true, info-level agent lifecycle logs are suppressed. - -Python equivalent: suppress\_logs parameter in AgentBase.**init** - -#### Signature - -```go -func WithSuppressLogs(suppress bool) AgentOption -``` - -#### Parameters - - - -#### Returns - -`AgentOption` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 249. - -*** - -### WithTokenExpiry - -WithTokenExpiry sets the token expiry time in seconds for secure tools. - -#### Signature - -```go -func WithTokenExpiry(secs int) AgentOption -``` - -#### Parameters - - - -#### Returns - -`AgentOption` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 188. - -*** - -### WithUsePom - -WithUsePom controls whether Prompt Object Model (POM) mode is active. When true (default), structured prompt sections are used; when false, raw text from SetPromptText is used. - -Python equivalent: use\_pom parameter in AgentBase.**init** - -#### Signature - -```go -func WithUsePom(usePom bool) AgentOption -``` - -#### Parameters - - - -#### Returns - -`AgentOption` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 203. - -## Type Aliases - -### AgentOption - -AgentOption configures an AgentBase during construction. - -#### Signature - -```go -type AgentOption alias -``` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 133. - -*** - -### DebugEventHandler - -DebugEventHandler is called for debug events if enabled. - -#### Signature - -```go -type DebugEventHandler alias -``` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 46. - -*** - -### DynamicConfigCallback - -DynamicConfigCallback is invoked on each request to mutate an ephemeral agent copy before rendering. Headers and body params give the callback full context about the inbound request. - -#### Signature - -```go -type DynamicConfigCallback alias -``` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 40. - -*** - -### OnSwmlRequestHook - -OnSwmlRequestHook is the function-field hook that user code can set to override the default SWML-request customization behavior. Returning a non-nil map applies modifications to the rendered SWML; returning nil uses the default rendering unchanged. - -Python parity: web\_mixin.WebMixin.on\_swml\_request — Go has no method inheritance, so we expose the override as a settable function field. - -#### Signature - -```go -type OnSwmlRequestHook alias -``` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 55. - -*** - -### PromptAddToSectionOption - -PromptAddToSectionOption is a functional option for PromptAddToSection. - -#### Signature - -```go -type PromptAddToSectionOption alias -``` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 724. - -*** - -### PromptSectionOption - -PromptSectionOption is a functional option for PromptAddSection. - -#### Signature - -```go -type PromptSectionOption alias -``` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 653. - -*** - -### SummaryCallback - -SummaryCallback is called when a post-prompt summary arrives. - -#### Signature - -```go -type SummaryCallback alias -``` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 43. - -*** - -### ToolHandler - -ToolHandler is the signature for SWAIG function handlers. - -#### Signature - -```go -type ToolHandler alias -``` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 35. - -## Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/agent/agent/mcp-server-config/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/agent/agent/mcp-server-config/index.mdx deleted file mode 100644 index 24b433fd40..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/agent/agent/mcp-server-config/index.mdx +++ /dev/null @@ -1,39 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/agent/agent/mcp-server-config" -title: "MCPServerConfig" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/agent.MCPServerConfig" - parent: "github.com/signalwire/signalwire-go/pkg/agent" - module: "github.com.signalwire.signalwire-go.pkg.agent" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go" ---- -# `MCPServerConfig` - -MCPServerConfig holds configuration for an external MCP server connection. - -## Signature - -```go -type MCPServerConfig struct -``` - -## Properties - - - - - - - - - -## Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 1857. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/agent/agent/tool-definition/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/agent/agent/tool-definition/index.mdx deleted file mode 100644 index 2c57085da3..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/agent/agent/tool-definition/index.mdx +++ /dev/null @@ -1,108 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/agent/agent/tool-definition" -title: "ToolDefinition" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/agent.ToolDefinition" - parent: "github.com/signalwire/signalwire-go/pkg/agent" - module: "github.com.signalwire.signalwire-go.pkg.agent" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go" ---- -# `ToolDefinition` - -ToolDefinition describes a single SWAIG tool including its JSON Schema parameters and a Go handler function. - -Python equivalent: signalwire.core.mixins.tool\_mixin.ToolMixin.define\_tool Added fields to match Python: WebhookURL (webhook\_url param), Required (required param for required argument names), IsTypedHandler (is\_typed\_handler). - -## Signature - -```go -type ToolDefinition struct -``` - -## Properties - - - - - - - - - whether handler uses typed structs (Python: is\_typed\_handler) - - - - - - - - JSON Schema for arguments (properties map) - - - - Required parameter names included in the JSON Schema envelope - - - - - - extra per-function SWAIG fields - - - - URL to audio file to play while the function executes - - - - Number of times to loop WaitFile (0 = no loop) - - - - Per-tool webhook URL; overrides the agent-level webhook when non-empty - - -## Methods - -### ValidateArgs - -ValidateArgs validates the provided args map against the tool's parameter schema. - -It constructs a JSON Schema envelope from Parameters and Required (matching the shape emitted by buildSwaigFunctions) and validates args against that schema using encoding/json round-trip comparison. When Parameters is nil or empty the function returns (true, nil) immediately, mirroring the Python SDK's behaviour of skipping validation when no schema is declared. - -Go's standard library does not include a JSON Schema validator, so this implementation performs a best-effort structural check: - -- Every key listed in Required must be present in args. -- No third-party dependency is introduced; the check is intentionally lightweight. - -A full JSON Schema validator (e.g. github.com/xeipuuv/gojsonschema) can be swapped in by replacing the body of this method. - -#### Signature - -```go -func (*ToolDefinition) ValidateArgs(args map[string]any) (bool, []string) -``` - -#### Parameters - - - -#### Returns - -`(bool, []string)` - -#### Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 98. - -## Source - -[`pkg/agent/agent.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/agent/agent.go) - -Line 67. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/contexts/contexts/context-builder/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/contexts/contexts/context-builder/index.mdx deleted file mode 100644 index 430aa2da9b..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/contexts/contexts/context-builder/index.mdx +++ /dev/null @@ -1,199 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/contexts/contexts/context-builder" -title: "ContextBuilder" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/contexts.ContextBuilder" - parent: "github.com/signalwire/signalwire-go/pkg/contexts" - module: "github.com.signalwire.signalwire-go.pkg.contexts" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go" ---- -# `ContextBuilder` - -ContextBuilder is the top-level builder for multi-step, multi-context AI agent workflows. - -A ContextBuilder owns one or more Contexts; each Context owns an ordered list of Steps. Only one context and one step is active at a time. Per chat turn, the runtime injects the current step's instructions as a system message, then asks the LLM for a response. - -When a step (or its enclosing context) declares valid\_steps or valid\_contexts, the runtime auto-injects two native tools so the model can navigate the flow: - -- next\_step(step: enum) — present when valid\_steps is set -- change\_context(context: enum) — present when valid\_contexts is set - -Their enum schemas are rewritten on every turn to match whatever valid\_steps / valid\_contexts apply to the current step. You do NOT need to define these tools yourself; they appear automatically. - -A third native tool — gather\_submit — is injected during gather\_info questioning (see Step.SetGatherInfo / Step.AddGatherQuestion). - -These three names — next\_step, change\_context, gather\_submit — are reserved. ContextBuilder.Validate() rejects any agent that defines a SWAIG tool with one of these names. See ReservedNativeToolNames. - -Each step may declare a functions whitelist. The whitelist is applied in-memory at the start of each LLM turn. CRITICALLY: if a step does NOT declare a functions field, it INHERITS the previous step's active set. See Step.SetFunctions for details and examples. - -## Signature - -```go -type ContextBuilder struct -``` - -## Methods - -### AddContext - -AddContext creates a new context with the given name and returns it. - -#### Signature - -```go -func (*ContextBuilder) AddContext(name string) *Context -``` - -#### Parameters - - - -#### Returns - -`*Context` - -#### Source - -[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) - -Line 831. - -*** - -### AttachAgent - -AttachAgent wires an agent into the builder so Validate() can check user-defined tool names against ReservedNativeToolNames. AgentBase calls this internally when you invoke DefineContexts(). - -#### Signature - -```go -func (*ContextBuilder) AttachAgent(a ToolLister) *ContextBuilder -``` - -#### Parameters - - - -#### Returns - -`*ContextBuilder` - -#### Source - -[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) - -Line 809. - -*** - -### GetContext - -GetContext returns the context with the given name, or nil if not found. - -#### Signature - -```go -func (*ContextBuilder) GetContext(name string) *Context -``` - -#### Parameters - - - -#### Returns - -`*Context` - -#### Source - -[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) - -Line 839. - -*** - -### Reset - -Reset removes all contexts, returning the builder to its initial state. Use this in a dynamic config callback when you need to rebuild contexts from scratch for a specific request. - -#### Signature - -```go -func (*ContextBuilder) Reset() *ContextBuilder -``` - -#### Returns - -`*ContextBuilder` - -#### Source - -[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) - -Line 824. - -*** - -### ToMap - -ToMap serialises all contexts to the SWML map format. It calls Validate first and returns an error if validation fails. - -#### Signature - -```go -func (*ContextBuilder) ToMap() (map[string]any, error) -``` - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) - -Line 1057. - -*** - -### Validate - -Validate checks the builder configuration for common errors: - -- At least one context must be defined. -- A single context must be named "default". -- Every context must contain at least one step. -- Every step must have a name. -- valid\_steps entries (except "next") must name existing steps in the same context. -- valid\_contexts entries (context-level) must name existing contexts. -- valid\_contexts entries (step-level) must name existing contexts. -- gather\_info questions must be non-empty and have unique keys. -- gather\_info completion\_action (if set) targets an existing step. -- No user-defined SWAIG tool collides with a reserved native name. - -#### Signature - -```go -func (*ContextBuilder) Validate() error -``` - -#### Returns - -`error` - -#### Source - -[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) - -Line 854. - -## Source - -[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) - -Line 800. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/contexts/contexts/context/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/contexts/contexts/context/index.mdx deleted file mode 100644 index d9d3a2f8d1..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/contexts/contexts/context/index.mdx +++ /dev/null @@ -1,671 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/contexts/contexts/context" -title: "Context" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/contexts.Context" - parent: "github.com/signalwire/signalwire-go/pkg/contexts" - module: "github.com.signalwire.signalwire-go.pkg.contexts" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go" ---- -# `Context` - -Context represents a single context containing ordered steps. All setter methods return \*Context for chaining. - -## Signature - -```go -type Context struct -``` - -## Methods - -### AddBullets - -AddBullets adds a POM section with bullet points to the context prompt. - -#### Signature - -```go -func (*Context) AddBullets(title string, bullets []string) *Context -``` - -#### Parameters - - - - - -#### Returns - -`*Context` - -#### Source - -[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) - -Line 622. - -*** - -### AddEnterFiller - -AddEnterFiller adds enter fillers for a specific language code. - -#### Signature - -```go -func (*Context) AddEnterFiller(langCode string, fillers []string) *Context -``` - -#### Parameters - - - - - -#### Returns - -`*Context` - -#### Source - -[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) - -Line 652. - -*** - -### AddExitFiller - -AddExitFiller adds exit fillers for a specific language code. - -#### Signature - -```go -func (*Context) AddExitFiller(langCode string, fillers []string) *Context -``` - -#### Parameters - - - - - -#### Returns - -`*Context` - -#### Source - -[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) - -Line 661. - -*** - -### AddSection - -AddSection adds a POM section to the context prompt. - -#### Signature - -```go -func (*Context) AddSection(title string, body string) *Context -``` - -#### Parameters - - - - - -#### Returns - -`*Context` - -#### Source - -[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) - -Line 616. - -*** - -### AddStep - -AddStep creates a new step, appends it to the ordered list, stores it in the lookup map, and returns the Step for further configuration. - -#### Signature - -```go -func (*Context) AddStep(name string) *Step -``` - -#### Parameters - - - -#### Returns - -`*Step` - -#### Source - -[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) - -Line 478. - -*** - -### AddSystemBullets - -AddSystemBullets adds a POM section with bullet points to the system prompt. - -#### Signature - -```go -func (*Context) AddSystemBullets(title string, bullets []string) *Context -``` - -#### Parameters - - - - - -#### Returns - -`*Context` - -#### Source - -[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) - -Line 634. - -*** - -### AddSystemSection - -AddSystemSection adds a POM section to the system prompt. - -#### Signature - -```go -func (*Context) AddSystemSection(title string, body string) *Context -``` - -#### Parameters - - - - - -#### Returns - -`*Context` - -#### Source - -[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) - -Line 628. - -*** - -### GetStep - -GetStep returns the step with the given name, or nil if not found. - -#### Signature - -```go -func (*Context) GetStep(name string) *Step -``` - -#### Parameters - - - -#### Returns - -`*Step` - -#### Source - -[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) - -Line 486. - -*** - -### MoveStep - -MoveStep moves an existing step to the given position (0-based index). Returns the receiver for method chaining. - -#### Signature - -```go -func (*Context) MoveStep(name string, position int) *Context -``` - -#### Parameters - - - - - -#### Returns - -`*Context` - -#### Source - -[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) - -Line 507. - -*** - -### Name - -Name returns the context's name. - -#### Signature - -```go -func (*Context) Name() string -``` - -#### Returns - -`string` - -#### Source - -[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) - -Line 474. - -*** - -### RemoveStep - -RemoveStep removes a step by name. Returns the receiver for method chaining. - -#### Signature - -```go -func (*Context) RemoveStep(name string) *Context -``` - -#### Parameters - - - -#### Returns - -`*Context` - -#### Source - -[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) - -Line 491. - -*** - -### SetConsolidate - -SetConsolidate sets whether to consolidate conversation history on entry. - -#### Signature - -```go -func (*Context) SetConsolidate(consolidate bool) *Context -``` - -#### Parameters - - - -#### Returns - -`*Context` - -#### Source - -[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) - -Line 573. - -*** - -### SetEnterFillers - -SetEnterFillers sets all enter fillers at once. - -#### Signature - -```go -func (*Context) SetEnterFillers(fillers map[string][]string) *Context -``` - -#### Parameters - - - -#### Returns - -`*Context` - -#### Source - -[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) - -Line 640. - -*** - -### SetExitFillers - -SetExitFillers sets all exit fillers at once. - -#### Signature - -```go -func (*Context) SetExitFillers(fillers map[string][]string) *Context -``` - -#### Parameters - - - -#### Returns - -`*Context` - -#### Source - -[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) - -Line 646. - -*** - -### SetFullReset - -SetFullReset sets whether to do a full reset when entering this context. - -#### Signature - -```go -func (*Context) SetFullReset(fullReset bool) *Context -``` - -#### Parameters - - - -#### Returns - -`*Context` - -#### Source - -[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) - -Line 579. - -*** - -### SetInitialStep - -SetInitialStep sets which step the context starts on when entered. - -By default, a context starts on its first step (index 0). Use this to skip a preamble step on re-entry via change\_context. - -#### Signature - -```go -func (*Context) SetInitialStep(stepName string) *Context -``` - -#### Parameters - - - -#### Returns - -`*Context` - -#### Source - -[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) - -Line 537. - -*** - -### SetIsolated - -SetIsolated marks this context as isolated — entering it wipes conversation history. - -When isolated=true and the context is entered via change\_context, the runtime wipes the conversation array. The model starts fresh with only the new context's system\_prompt + step instructions, with no memory of prior turns. - -EXCEPTION — reset overrides the wipe: If the context also has a reset configuration (via SetConsolidate or SetFullReset), the wipe is skipped in favor of the reset behavior. Use reset with consolidate=true to summarize prior history into a single message instead of dropping it entirely. - -Use cases: - -- Switching to a sensitive billing flow that should not see prior small-talk -- Handing off to a different agent persona -- Resetting after a long off-topic detour - -#### Signature - -```go -func (*Context) SetIsolated(isolated bool) *Context -``` - -#### Parameters - - - -#### Returns - -`*Context` - -#### Source - -[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) - -Line 610. - -*** - -### SetPostPrompt - -SetPostPrompt sets the post-prompt override for this context. - -#### Signature - -```go -func (*Context) SetPostPrompt(prompt string) *Context -``` - -#### Parameters - - - -#### Returns - -`*Context` - -#### Source - -[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) - -Line 555. - -*** - -### SetPrompt - -SetPrompt sets the context's prompt text directly. - -#### Signature - -```go -func (*Context) SetPrompt(prompt string) *Context -``` - -#### Parameters - - - -#### Returns - -`*Context` - -#### Source - -[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) - -Line 567. - -*** - -### SetSystemPrompt - -SetSystemPrompt sets the system prompt for context switching. - -#### Signature - -```go -func (*Context) SetSystemPrompt(prompt string) *Context -``` - -#### Parameters - - - -#### Returns - -`*Context` - -#### Source - -[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) - -Line 561. - -*** - -### SetUserPrompt - -SetUserPrompt sets the user prompt to inject when entering this context. - -#### Signature - -```go -func (*Context) SetUserPrompt(prompt string) *Context -``` - -#### Parameters - - - -#### Returns - -`*Context` - -#### Source - -[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) - -Line 585. - -*** - -### SetValidContexts - -SetValidContexts sets which contexts can be navigated to from this context. - -#### Signature - -```go -func (*Context) SetValidContexts(ctxs []string) *Context -``` - -#### Parameters - - - -#### Returns - -`*Context` - -#### Source - -[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) - -Line 543. - -*** - -### SetValidSteps - -SetValidSteps sets which steps can be navigated to from any step in this context. - -#### Signature - -```go -func (*Context) SetValidSteps(steps []string) *Context -``` - -#### Parameters - - - -#### Returns - -`*Context` - -#### Source - -[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) - -Line 549. - -*** - -### ToMap - -ToMap serialises the context to the SWML map format. - -#### Signature - -```go -func (*Context) ToMap() map[string]any -``` - -#### Returns - -`map[string]any` - -#### Source - -[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) - -Line 693. - -## Source - -[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) - -Line 445. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/contexts/contexts/gather-info/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/contexts/contexts/gather-info/index.mdx deleted file mode 100644 index 0e81dcafa2..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/contexts/contexts/gather-info/index.mdx +++ /dev/null @@ -1,113 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/contexts/contexts/gather-info" -title: "GatherInfo" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/contexts.GatherInfo" - parent: "github.com/signalwire/signalwire-go/pkg/contexts" - module: "github.com.signalwire.signalwire-go.pkg.contexts" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go" ---- -# `GatherInfo` - -GatherInfo configures information gathering for a step. - -## Signature - -```go -type GatherInfo struct -``` - -## Properties - - - - - - - - - -## Methods - -### AddQuestion - -AddQuestion appends a question and returns the GatherInfo for chaining. - -#### Signature - -```go -func (*GatherInfo) AddQuestion(key string, question string, opts ...GatherQuestionOption) *GatherInfo -``` - -#### Parameters - - - - - - - -#### Returns - -`*GatherInfo` - -#### Source - -[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) - -Line 112. - -*** - -### ToMap - -ToMap serialises to the SWML map format. Callers that construct GatherInfo directly should call Validate() first to ensure the result is valid SWML. Step.ToMap() enforces this automatically by only calling ToMap() when len(Questions) > 0. - -#### Signature - -```go -func (*GatherInfo) ToMap() map[string]any -``` - -#### Returns - -`map[string]any` - -#### Source - -[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) - -Line 140. - -*** - -### Validate - -Validate returns an error if the GatherInfo is not ready for serialisation. Specifically, it rejects a GatherInfo with no questions, which would produce invalid SWML. This matches the Python SDK's ValueError raised by to\_dict() when \_questions is empty. - -#### Signature - -```go -func (*GatherInfo) Validate() error -``` - -#### Returns - -`error` - -#### Source - -[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) - -Line 129. - -## Source - -[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) - -Line 104. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/contexts/contexts/gather-question/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/contexts/contexts/gather-question/index.mdx deleted file mode 100644 index 0fad3d2fc2..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/contexts/contexts/gather-question/index.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/contexts/contexts/gather-question" -title: "GatherQuestion" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/contexts.GatherQuestion" - parent: "github.com/signalwire/signalwire-go/pkg/contexts" - module: "github.com.signalwire.signalwire-go.pkg.contexts" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go" ---- -# `GatherQuestion` - -GatherQuestion represents a single question in a gather\_info configuration. - -## Signature - -```go -type GatherQuestion struct -``` - -## Properties - - - - - optional - - - - - - optional - - - - - - default "string" - - -## Methods - -### ToMap - -ToMap serialises the question to the SWML map format. - -#### Signature - -```go -func (*GatherQuestion) ToMap() map[string]any -``` - -#### Returns - -`map[string]any` - -#### Source - -[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) - -Line 79. - -## Source - -[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) - -Line 69. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/contexts/contexts/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/contexts/contexts/index.mdx deleted file mode 100644 index 2211639cd7..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/contexts/contexts/index.mdx +++ /dev/null @@ -1,272 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/contexts/contexts" -title: "contexts" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "module" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/contexts" - module: "github.com.signalwire.signalwire-go.pkg.contexts" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go" ---- -# `contexts` - -Package contexts provides the Contexts & Steps workflow system for SignalWire AI agents. - -Instead of a single flat prompt, agents can define structured Contexts (conversation flows) containing ordered Steps (sequential stages). Each step carries its own prompt, completion criteria, function restrictions, and navigation rules. The builder serialises the whole tree into the map\[string]any format expected by the SWML AI verb. - -## Signature - -```go -package contexts -``` - -## Constants - - - Limits guard against unreasonable configurations. - - - - Limits guard against unreasonable configurations. - - - - ReservedNativeToolNames is the set of tool names the runtime auto-injects when contexts/steps are present. User-defined SWAIG tools must not collide with these names. ContextBuilder.Validate() rejects any agent that registers a user tool sharing one of these names — the runtime would never call the user tool because the native one wins. - - -## Classes - - - - Context represents a single context containing ordered steps. All setter methods return \*Context for chaining. - - - - ContextBuilder is the top-level builder for multi-step, multi-context AI agent workflows. - - - - GatherInfo configures information gathering for a step. - - - - GatherQuestion represents a single question in a gather\_info configuration. - - - - Step represents a single step within a context. All setter methods return \*Step so they can be chained. - - - -## Functions - -### CreateSimpleContext - -CreateSimpleContext creates a standalone Context. If name is empty it defaults to "default". - -#### Signature - -```go -func CreateSimpleContext(name string) *Context -``` - -#### Parameters - - - -#### Returns - -`*Context` - -#### Source - -[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) - -Line 1074. - -*** - -### NewContextBuilder - -NewContextBuilder creates a new empty ContextBuilder. - -#### Signature - -```go -func NewContextBuilder() *ContextBuilder -``` - -#### Returns - -`*ContextBuilder` - -#### Source - -[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) - -Line 815. - -*** - -### WithConfirm - -WithConfirm sets whether the model must confirm the answer with the user. - -#### Signature - -```go -func WithConfirm(c bool) GatherQuestionOption -``` - -#### Parameters - - - -#### Returns - -`GatherQuestionOption` - -#### Source - -[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) - -Line 54. - -*** - -### WithFunctions - -WithFunctions sets additional function names visible for this question. - -#### Signature - -```go -func WithFunctions(f []string) GatherQuestionOption -``` - -#### Parameters - - - -#### Returns - -`GatherQuestionOption` - -#### Source - -[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) - -Line 64. - -*** - -### WithPrompt - -WithPrompt sets extra instruction text appended for this question. - -#### Signature - -```go -func WithPrompt(p string) GatherQuestionOption -``` - -#### Parameters - - - -#### Returns - -`GatherQuestionOption` - -#### Source - -[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) - -Line 59. - -*** - -### WithType - -WithType sets the JSON-schema type for the answer (default "string"). - -#### Signature - -```go -func WithType(t string) GatherQuestionOption -``` - -#### Parameters - - - -#### Returns - -`GatherQuestionOption` - -#### Source - -[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) - -Line 49. - -## Type Aliases - -### GatherQuestionOption - -GatherQuestionOption is a functional option applied to a GatherQuestion. - -#### Signature - -```go -type GatherQuestionOption alias -``` - -#### Source - -[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) - -Line 46. - -## Interfaces - -### ToolLister - -ToolLister is implemented by an agent so ContextBuilder.Validate() can check registered SWAIG tool names against ReservedNativeToolNames. AgentBase implements this by returning the insertion-ordered list of registered tool names. - -#### Signature - -```go -type ToolLister interface { ListToolNames } -``` - -#### Methods - -##### ListToolNames - -ListToolNames returns the names of every registered SWAIG tool. - -###### Signature - -```go -ListToolNames() []string -``` - -###### Source - -[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) - -Line 763. - -#### Source - -[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) - -Line 761. - -## Source - -[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/contexts/contexts/step/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/contexts/contexts/step/index.mdx deleted file mode 100644 index b9ccb21895..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/contexts/contexts/step/index.mdx +++ /dev/null @@ -1,550 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/contexts/contexts/step" -title: "Step" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/contexts.Step" - parent: "github.com/signalwire/signalwire-go/pkg/contexts" - module: "github.com.signalwire.signalwire-go.pkg.contexts" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go" ---- -# `Step` - -Step represents a single step within a context. All setter methods return \*Step so they can be chained. - -## Signature - -```go -type Step struct -``` - -## Methods - -### AddBullets - -AddBullets adds a POM section with bullet points. - -#### Signature - -```go -func (*Step) AddBullets(title string, bullets []string) *Step -``` - -#### Parameters - - - - - -#### Returns - -`*Step` - -#### Source - -[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) - -Line 200. - -*** - -### AddGatherQuestion - -AddGatherQuestion adds a question to this step's gather\_info. SetGatherInfo should be called first (this method silently initialises the struct if not, to keep callers from having to worry about ordering). Returns the Step for chaining. - -IMPORTANT — gather mode locks function access: While the model is asking gather questions, the runtime forcibly deactivates ALL of the step's other functions. The only callable tools during a gather question are: - -- gather\_submit (the native answer-submission tool) -- Whatever names you list with WithFunctions in this question's opts - -next\_step and change\_context are also filtered out — the model cannot navigate away until the gather completes. This is by design: it forces a tight ask → submit → next-question loop. - -If a question needs to call out to a tool (e.g. validate an email, geocode a ZIP), pass that tool name via WithFunctions on this question. Functions listed here are active ONLY for this question. - -#### Signature - -```go -func (*Step) AddGatherQuestion(key string, question string, opts ...GatherQuestionOption) *Step -``` - -#### Parameters - - - - - - - -#### Returns - -`*Step` - -#### Source - -[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) - -Line 319. - -*** - -### AddSection - -AddSection adds a POM section to the step. - -#### Signature - -```go -func (*Step) AddSection(title string, body string) *Step -``` - -#### Parameters - - - - - -#### Returns - -`*Step` - -#### Source - -[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) - -Line 194. - -*** - -### ClearSections - -ClearSections removes all POM sections and direct text from this step. - -#### Signature - -```go -func (*Step) ClearSections() *Step -``` - -#### Returns - -`*Step` - -#### Source - -[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) - -Line 329. - -*** - -### Name - -Name returns the step's name. - -#### Signature - -```go -func (*Step) Name() string -``` - -#### Returns - -`string` - -#### Source - -[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) - -Line 185. - -*** - -### SetEnd - -SetEnd marks this step as terminal for the step flow. - -IMPORTANT: end=true does NOT end the conversation or hang up the call. It exits step mode entirely after this step executes — clearing the steps list, current step index, valid\_steps, and valid\_contexts. The agent keeps running, but operates only under the base system prompt and the context-level prompt; no more step instructions are injected and no more next\_step tool is offered. - -To actually end the call, call a hangup tool or define a hangup\_hook. - -#### Signature - -```go -func (*Step) SetEnd(end bool) *Step -``` - -#### Parameters - - - -#### Returns - -`*Step` - -#### Source - -[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) - -Line 266. - -*** - -### SetFunctions - -SetFunctions sets which non-internal functions are callable while this step is active. - -IMPORTANT — inheritance behavior: If you do NOT call this method, the step inherits whichever function set was active on the previous step (or the previous context's last step). The server-side runtime only resets the active set when a step explicitly declares its `functions` field. This is the most common source of bugs in multi-step agents: forgetting SetFunctions on a later step lets the previous step's tools leak through. Best practice is to call SetFunctions explicitly on every step that should differ from the previous one. - -Keep the per-step active set small: LLM tool selection accuracy degrades noticeably past ~7-8 simultaneously-active tools per call. Use per-step whitelisting to partition large tool collections. - -Accepts: - -- \[]string\{"a", "b"\} — whitelist of function names allowed in this step -- \[]string\{\} — explicit disable-all -- "none" — synonym for the empty slice - -Internal functions (e.g. gather\_submit, hangup\_hook) are ALWAYS protected and cannot be deactivated by this whitelist. The native navigation tools next\_step and change\_context are injected automatically when SetValidSteps / SetValidContexts is used; they are not affected by this list and do not need to appear in it. - -#### Signature - -```go -func (*Step) SetFunctions(functions any) *Step -``` - -#### Parameters - - - -#### Returns - -`*Step` - -#### Source - -[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) - -Line 239. - -*** - -### SetGatherInfo - -SetGatherInfo enables info gathering for this step and returns the Step for fluent chaining. This matches the Python SDK's set\_gather\_info, which returns self so that step-level setters (SetFunctions, SetValidSteps, etc.) can be chained after configuring gather info. - -To add questions to the gather info, use AddGatherQuestion on the same \*Step receiver. - -#### Signature - -```go -func (*Step) SetGatherInfo(outputKey string, completionAction string, prompt string) *Step -``` - -#### Parameters - - - - - - - -#### Returns - -`*Step` - -#### Source - -[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) - -Line 290. - -*** - -### SetResetConsolidate - -SetResetConsolidate sets whether to consolidate conversation on context switch. - -#### Signature - -```go -func (*Step) SetResetConsolidate(consolidate bool) *Step -``` - -#### Parameters - - - -#### Returns - -`*Step` - -#### Source - -[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) - -Line 348. - -*** - -### SetResetFullReset - -SetResetFullReset sets whether to do a full reset on context switch. - -#### Signature - -```go -func (*Step) SetResetFullReset(fullReset bool) *Step -``` - -#### Parameters - - - -#### Returns - -`*Step` - -#### Source - -[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) - -Line 354. - -*** - -### SetResetSystemPrompt - -SetResetSystemPrompt sets the system prompt for context switching. - -#### Signature - -```go -func (*Step) SetResetSystemPrompt(prompt string) *Step -``` - -#### Parameters - - - -#### Returns - -`*Step` - -#### Source - -[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) - -Line 336. - -*** - -### SetResetUserPrompt - -SetResetUserPrompt sets the user prompt for context switching. - -#### Signature - -```go -func (*Step) SetResetUserPrompt(prompt string) *Step -``` - -#### Parameters - - - -#### Returns - -`*Step` - -#### Source - -[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) - -Line 342. - -*** - -### SetSkipToNextStep - -SetSkipToNextStep sets whether to automatically advance to the next step. - -#### Signature - -```go -func (*Step) SetSkipToNextStep(skip bool) *Step -``` - -#### Parameters - - - -#### Returns - -`*Step` - -#### Source - -[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) - -Line 278. - -*** - -### SetSkipUserTurn - -SetSkipUserTurn sets whether to skip waiting for user input after this step. - -#### Signature - -```go -func (*Step) SetSkipUserTurn(skip bool) *Step -``` - -#### Parameters - - - -#### Returns - -`*Step` - -#### Source - -[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) - -Line 272. - -*** - -### SetStepCriteria - -SetStepCriteria sets the criteria for determining when this step is complete. - -#### Signature - -```go -func (*Step) SetStepCriteria(criteria string) *Step -``` - -#### Parameters - - - -#### Returns - -`*Step` - -#### Source - -[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) - -Line 206. - -*** - -### SetText - -SetText sets the step's prompt text directly. - -#### Signature - -```go -func (*Step) SetText(text string) *Step -``` - -#### Parameters - - - -#### Returns - -`*Step` - -#### Source - -[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) - -Line 188. - -*** - -### SetValidContexts - -SetValidContexts sets which contexts can be navigated to from this step. - -#### Signature - -```go -func (*Step) SetValidContexts(contexts []string) *Step -``` - -#### Parameters - - - -#### Returns - -`*Step` - -#### Source - -[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) - -Line 251. - -*** - -### SetValidSteps - -SetValidSteps sets which steps can be navigated to from this step. - -#### Signature - -```go -func (*Step) SetValidSteps(steps []string) *Step -``` - -#### Parameters - - - -#### Returns - -`*Step` - -#### Source - -[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) - -Line 245. - -*** - -### ToMap - -ToMap serialises the step to the SWML map format. - -#### Signature - -```go -func (*Step) ToMap() map[string]any -``` - -#### Returns - -`map[string]any` - -#### Source - -[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) - -Line 386. - -## Source - -[`pkg/contexts/contexts.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/contexts/contexts.go) - -Line 166. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/datamap/datamap/expression-pattern/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/datamap/datamap/expression-pattern/index.mdx deleted file mode 100644 index 14ac874bb2..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/datamap/datamap/expression-pattern/index.mdx +++ /dev/null @@ -1,35 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/datamap/datamap/expression-pattern" -title: "ExpressionPattern" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/datamap.ExpressionPattern" - parent: "github.com/signalwire/signalwire-go/pkg/datamap" - module: "github.com.signalwire.signalwire-go.pkg.datamap" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/datamap/datamap.go" ---- -# `ExpressionPattern` - -ExpressionPattern pairs a regex pattern string with a FunctionResult to execute when test\_value matches the pattern. Go equivalent of Python's Tuple\[str, FunctionResult] entry in create\_expression\_tool patterns. - -## Signature - -```go -type ExpressionPattern struct -``` - -## Properties - - - - - -## Source - -[`pkg/datamap/datamap.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/datamap/datamap.go) - -Line 431. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/datamap/datamap/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/datamap/datamap/index.mdx deleted file mode 100644 index 02335d38e0..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/datamap/datamap/index.mdx +++ /dev/null @@ -1,713 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/datamap/datamap" -title: "datamap" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/datamap" - module: "github.com.signalwire.signalwire-go.pkg.datamap" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/datamap/datamap.go" ---- -# `datamap` - -DataMap is a fluent builder for SWAIG data\_map function definitions. Data map tools execute on SignalWire servers without needing a webhook endpoint. - -## Signature - -```go -type DataMap struct -``` - -## Examples - - - - ```go - dm := datamap.New("get_weather"). - Purpose("Get current weather information"). - Parameter("location", "string", "City name", true, nil). - Webhook("GET", "https://api.weather.com/v1/current?q=${location}", nil, "", false, nil). - Output(swaig.NewFunctionResult("Weather: ${response.current.condition.text}")) - ``` - - - - ```go - dm := datamap.New("get_weather"). - Purpose("Get current weather information"). - Parameter("location", "string", "City name", true, nil). - Webhook("GET", "https://api.weather.com/v1/current?q=${location}", nil, "", false, nil). - Output(swaig.NewFunctionResult("Weather: ${response.current.condition.text}")) - ``` - - - -## Classes - - - - ExpressionPattern pairs a regex pattern string with a FunctionResult to execute when test\_value matches the pattern. Go equivalent of Python's Tuple\[str, FunctionResult] entry in create\_expression\_tool patterns. - - - -## Methods - -### Body - -Body sets the request body for the current webhook (for POST/PUT requests). - -#### Signature - -```go -func (*DataMap) Body(data map[string]any) *DataMap -``` - -#### Parameters - - - -#### Returns - -`*DataMap` - -#### Source - -[`pkg/datamap/datamap.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/datamap/datamap.go) - -Line 259. - -*** - -### Description - -Description sets the LLM-facing tool description. - -This string is read by the model to decide WHEN to call this tool. See Purpose for bad-vs-good examples. Alias for Purpose. - -#### Signature - -```go -func (*DataMap) Description(description string) *DataMap -``` - -#### Parameters - - - -#### Returns - -`*DataMap` - -#### Source - -[`pkg/datamap/datamap.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/datamap/datamap.go) - -Line 114. - -*** - -### ErrorKeys - -ErrorKeys sets error indicator keys for the current webhook. - -#### Signature - -```go -func (*DataMap) ErrorKeys(keys []string) *DataMap -``` - -#### Parameters - - - -#### Returns - -`*DataMap` - -#### Source - -[`pkg/datamap/datamap.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/datamap/datamap.go) - -Line 289. - -*** - -### Expression - -Expression adds a pattern-matching expression for expression-based responses. testValue is the template string to test (e.g., "$\{args.command\}"). pattern is the regex pattern to match against. output is the FunctionResult returned when the pattern matches. nomatchOutput is an optional FunctionResult returned when the pattern does not match (can be nil). - -#### Signature - -```go -func (*DataMap) Expression( - testValue string, - pattern string, - output *swaig.FunctionResult, - nomatchOutput *swaig.FunctionResult -) *DataMap -``` - -#### Parameters - - - - - - - - - -#### Returns - -`*DataMap` - -#### Source - -[`pkg/datamap/datamap.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/datamap/datamap.go) - -Line 152. - -*** - -### ExpressionRegexp - -ExpressionRegexp adds a pattern-matching expression using a compiled \*regexp.Regexp. This mirrors Python's expression() which accepts either a plain string or a compiled re.Pattern object — when a compiled pattern is passed, Python extracts pattern.pattern (the raw string). Here, pattern.String() serves the same role. - -testValue is the template string to test (e.g., "$\{args.command\}"). pattern is a compiled regexp whose string representation is used as the match pattern. output is the FunctionResult returned when the pattern matches. nomatchOutput is an optional FunctionResult returned when the pattern does not match (can be nil). - -#### Signature - -```go -func (*DataMap) ExpressionRegexp( - testValue string, - pattern *regexp.Regexp, - output *swaig.FunctionResult, - nomatchOutput *swaig.FunctionResult -) *DataMap -``` - -#### Parameters - - - - - - - - - -#### Returns - -`*DataMap` - -#### Source - -[`pkg/datamap/datamap.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/datamap/datamap.go) - -Line 171. - -*** - -### FallbackOutput - -FallbackOutput sets the fallback output result used when all webhooks fail. - -#### Signature - -```go -func (*DataMap) FallbackOutput(result *swaig.FunctionResult) *DataMap -``` - -#### Parameters - - - -#### Returns - -`*DataMap` - -#### Source - -[`pkg/datamap/datamap.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/datamap/datamap.go) - -Line 283. - -*** - -### Foreach - -Foreach configures array processing for the current webhook response. - -#### Signature - -```go -func (*DataMap) Foreach(config map[string]any) *DataMap -``` - -#### Parameters - - - -#### Returns - -`*DataMap` - -#### Source - -[`pkg/datamap/datamap.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/datamap/datamap.go) - -Line 271. - -*** - -### FunctionName - -FunctionName returns the function name this DataMap was built for. Useful for logging, deduplication checks, and introspection by callers that hold a \*DataMap reference but need to identify which tool it represents. - -#### Signature - -```go -func (*DataMap) FunctionName() string -``` - -#### Returns - -`string` - -#### Source - -[`pkg/datamap/datamap.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/datamap/datamap.go) - -Line 83. - -*** - -### GlobalErrorKeys - -GlobalErrorKeys sets top-level error keys that apply to all webhooks. - -#### Signature - -```go -func (*DataMap) GlobalErrorKeys(keys []string) *DataMap -``` - -#### Parameters - - - -#### Returns - -`*DataMap` - -#### Source - -[`pkg/datamap/datamap.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/datamap/datamap.go) - -Line 295. - -*** - -### Output - -Output sets the output result for the current webhook. - -#### Signature - -```go -func (*DataMap) Output(result *swaig.FunctionResult) *DataMap -``` - -#### Parameters - - - -#### Returns - -`*DataMap` - -#### Source - -[`pkg/datamap/datamap.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/datamap/datamap.go) - -Line 277. - -*** - -### Parameter - -Parameter adds a parameter definition — the `desc` is LLM-FACING. - -Each parameter description is rendered into the OpenAI tool schema under parameters.properties.\.description and sent to the model. The model uses it to decide HOW to fill in the argument from user speech. It is prompt engineering, not developer FYI. - -Bad vs good: - -``` -BAD: dm.Parameter("city", "string", "the city", true, nil) -GOOD: dm.Parameter("city", "string", - "The name of the city to get weather for, e.g. 'San Francisco'. "+ - "Ask the user if they did not provide one. Include the state "+ - "or country if the city name is ambiguous.", - true, nil) -``` - -The enum parameter can be nil if no enumeration constraint is needed. - -#### Signature - -```go -func (*DataMap) Parameter( - name string, - paramType string, - desc string, - required bool, - enum []string -) *DataMap -``` - -#### Parameters - - - - - - - - - - - -#### Returns - -`*DataMap` - -#### Examples - - - - ```go - BAD: dm.Parameter("city", "string", "the city", true, nil) - GOOD: dm.Parameter("city", "string", - "The name of the city to get weather for, e.g. 'San Francisco'. "+ - "Ask the user if they did not provide one. Include the state "+ - "or country if the city name is ambiguous.", - true, nil) - ``` - - - - ```go - BAD: dm.Parameter("city", "string", "the city", true, nil) - GOOD: dm.Parameter("city", "string", - "The name of the city to get weather for, e.g. 'San Francisco'. "+ - "Ask the user if they did not provide one. Include the state "+ - "or country if the city name is ambiguous.", - true, nil) - ``` - - - -#### Source - -[`pkg/datamap/datamap.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/datamap/datamap.go) - -Line 136. - -*** - -### Params - -Params sets the request params for the current webhook. - -#### Signature - -```go -func (*DataMap) Params(data map[string]any) *DataMap -``` - -#### Parameters - - - -#### Returns - -`*DataMap` - -#### Source - -[`pkg/datamap/datamap.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/datamap/datamap.go) - -Line 265. - -*** - -### Purpose - -Purpose sets the LLM-facing tool description — this is an alias for Description. - -The description string is rendered into the OpenAI tool schema "description" field on every LLM turn. The model reads it to decide WHEN to call this tool. It is PROMPT ENGINEERING, not developer documentation. - -A vague Purpose is the #1 cause of "the model has the right tool but doesn't call it" failures with data-map tools. - -Bad vs good: - -``` -BAD: dm.Purpose("weather api") -GOOD: dm.Purpose("Get the current weather conditions and forecast " + - "for a specific city. Use this whenever the user asks about " + - "weather, temperature, rain, or similar conditions in a " + - "named location.") -``` - -#### Signature - -```go -func (*DataMap) Purpose(description string) *DataMap -``` - -#### Parameters - - - -#### Returns - -`*DataMap` - -#### Examples - - - - ```go - BAD: dm.Purpose("weather api") - GOOD: dm.Purpose("Get the current weather conditions and forecast " + - "for a specific city. Use this whenever the user asks about " + - "weather, temperature, rain, or similar conditions in a " + - "named location.") - ``` - - - - ```go - BAD: dm.Purpose("weather api") - GOOD: dm.Purpose("Get the current weather conditions and forecast " + - "for a specific city. Use this whenever the user asks about " + - "weather, temperature, rain, or similar conditions in a " + - "named location.") - ``` - - - -#### Source - -[`pkg/datamap/datamap.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/datamap/datamap.go) - -Line 105. - -*** - -### ToSwaigFunction - -ToSwaigFunction converts the DataMap to a complete SWAIG function definition map. The returned map contains "function", "description", "parameters", and "data\_map" keys, matching the canonical SWML/SWAIG schema consumed by the SignalWire AI platform. - -#### Signature - -```go -func (*DataMap) ToSwaigFunction() map[string]any -``` - -#### Returns - -`map[string]any` - -#### Source - -[`pkg/datamap/datamap.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/datamap/datamap.go) - -Line 303. - -*** - -### Webhook - -Webhook adds a webhook API call configuration. If a previous webhook was configured, it is finalized first. method is the HTTP method (GET, POST, etc.). url is the API endpoint URL (can include $\{variable\} substitutions). headers are optional HTTP headers (can be nil). formParam sends JSON body as a single form parameter with this name (empty string to skip). inputArgsAsParams merges function arguments into params. requireArgs lists arguments that must be present to execute (can be nil). - -#### Signature - -```go -func (*DataMap) Webhook( - method string, - url string, - headers map[string]string, - formParam string, - inputArgsAsParams bool, - requireArgs []string -) *DataMap -``` - -#### Parameters - - - - - - - - - - - - - -#### Returns - -`*DataMap` - -#### Source - -[`pkg/datamap/datamap.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/datamap/datamap.go) - -Line 237. - -*** - -### WebhookExpressions - -WebhookExpressions sets expressions to evaluate after the current webhook completes. - -#### Signature - -```go -func (*DataMap) WebhookExpressions(expressions []map[string]any) *DataMap -``` - -#### Parameters - - - -#### Returns - -`*DataMap` - -#### Source - -[`pkg/datamap/datamap.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/datamap/datamap.go) - -Line 253. - -## Functions - -### CreateExpressionTool - -CreateExpressionTool creates a DataMap configured for expression-based pattern matching. name is the function name. patterns maps test values to an ExpressionPattern where Pattern is the regex string and Result is the \*swaig.FunctionResult to return on match. parameters maps parameter names to their definitions (each with "type", "description", "required" keys). - -#### Signature - -```go -func CreateExpressionTool( - name string, - patterns map[string]ExpressionPattern, - parameters map[string]map[string]any -) *DataMap -``` - -#### Parameters - - - - - - - -#### Returns - -`*DataMap` - -#### Source - -[`pkg/datamap/datamap.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/datamap/datamap.go) - -Line 441. - -*** - -### CreateSimpleApiTool - -CreateSimpleApiTool creates a DataMap configured for a simple API call. name is the function name. url is the API endpoint URL. responseTemplate is the template for formatting the response. parameters maps parameter names to their definitions (each with "type", "description", "required" keys). method is the HTTP method (e.g., "GET", "POST"). headers are optional HTTP headers (can be nil). body is an optional request body for POST/PUT (can be nil). errorKeys are optional error indicator keys (can be nil). - -#### Signature - -```go -func CreateSimpleApiTool( - name string, - url string, - responseTemplate string, - parameters map[string]map[string]any, - method string, - headers map[string]string, - body map[string]any, - errorKeys []string -) *DataMap -``` - -#### Parameters - - - - - - - - - - - - - - - - - -#### Returns - -`*DataMap` - -#### Source - -[`pkg/datamap/datamap.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/datamap/datamap.go) - -Line 391. - -*** - -### New - -New creates a new DataMap builder for a function with the given name. - -#### Signature - -```go -func New(functionName string) *DataMap -``` - -#### Parameters - - - -#### Returns - -`*DataMap` - -#### Source - -[`pkg/datamap/datamap.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/datamap/datamap.go) - -Line 74. - -## Source - -[`pkg/datamap/datamap.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/datamap/datamap.go) - -Line 52. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/lambda/lambda/handler/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/lambda/lambda/handler/index.mdx deleted file mode 100644 index d4bdecc438..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/lambda/lambda/handler/index.mdx +++ /dev/null @@ -1,85 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/lambda/lambda/handler" -title: "Handler" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/lambda.Handler" - parent: "github.com/signalwire/signalwire-go/pkg/lambda" - module: "github.com.signalwire.signalwire-go.pkg.lambda" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/lambda/lambda.go" ---- -# `Handler` - -Handler wraps an http.Handler so it can service AWS Lambda invocations. Construct one with NewHandler. - -## Signature - -```go -type Handler struct -``` - -## Methods - -### HandleAPIGatewayV2 - -HandleAPIGatewayV2 processes an API Gateway HTTP API v2 invocation. The payload shape is virtually identical to Function URLs, but the response type differs, so we provide a dedicated entry point. - -#### Signature - -```go -func (*Handler) HandleAPIGatewayV2(ctx context.Context, req events.APIGatewayV2HTTPRequest) (events.APIGatewayV2HTTPResponse, error) -``` - -#### Parameters - - - - - -#### Returns - -`(events.APIGatewayV2HTTPResponse, error)` - -#### Source - -[`pkg/lambda/lambda.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/lambda/lambda.go) - -Line 107. - -*** - -### HandleFunctionURL - -HandleFunctionURL processes a Lambda Function URL invocation. It is intended to be passed to github.com/aws/aws-lambda-go/lambda.Start. - -#### Signature - -```go -func (*Handler) HandleFunctionURL(ctx context.Context, req events.LambdaFunctionURLRequest) (events.LambdaFunctionURLResponse, error) -``` - -#### Parameters - - - - - -#### Returns - -`(events.LambdaFunctionURLResponse, error)` - -#### Source - -[`pkg/lambda/lambda.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/lambda/lambda.go) - -Line 84. - -## Source - -[`pkg/lambda/lambda.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/lambda/lambda.go) - -Line 65. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/lambda/lambda/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/lambda/lambda/index.mdx deleted file mode 100644 index 41386a3b99..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/lambda/lambda/index.mdx +++ /dev/null @@ -1,132 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/lambda/lambda" -title: "lambda" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "module" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/lambda" - module: "github.com.signalwire.signalwire-go.pkg.lambda" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/lambda/lambda.go" ---- -# `lambda` - -Package lambda adapts a net/http handler produced by the SignalWire Agents SDK (typically agent.AsRouter()) so it can run inside AWS Lambda. - -The adapter translates a Lambda invocation event into a synthetic \*http.Request, runs the underlying handler against an in-memory response recorder, and marshals the recorder's result back into the Lambda response type that matches the invoking event. - -Two event shapes are supported, because they are the two ways an AI agent is realistically exposed over HTTP on Lambda: - -- Lambda Function URLs (events.LambdaFunctionURLRequest / LambdaFunctionURLResponse). This is the simplest deployment and the one we recommend; no API Gateway is required. -- API Gateway HTTP API v2 (events.APIGatewayV2HTTPRequest / APIGatewayV2HTTPResponse). Identical payload shape in practice, but consumers with an API Gateway layer want the exact response type rather than an assignable alias. - -The classic REST API (v1) payload is intentionally not supported as a first-class path to keep this package small. Users who need v1 can wrap it via github.com/awslabs/aws-lambda-go-api-proxy. - -``` -package main - -import ( - "github.com/aws/aws-lambda-go/lambda" - swlambda "github.com/signalwire/signalwire-go/pkg/lambda" - "github.com/signalwire/signalwire-go/pkg/agent" -) - -var a = agent.NewAgentBase(agent.WithName("MyAgent"), agent.WithRoute("/my-agent")) -var handler = swlambda.NewHandler(a.AsRouter()) - -func main() { - lambda.Start(handler.HandleFunctionURL) -} -``` - -Because agent.AsRouter() installs routes relative to the agent's Route (e.g. /my-agent, /my-agent/swaig), the Lambda event's RawPath must line up with that Route. Lambda Function URLs preserve the full request path unchanged, so no rewriting is needed in the common case. - -## Signature - -```go -package lambda -``` - -## Examples - - - - ```go - package main - - import ( - "github.com/aws/aws-lambda-go/lambda" - swlambda "github.com/signalwire/signalwire-go/pkg/lambda" - "github.com/signalwire/signalwire-go/pkg/agent" - ) - - var a = agent.NewAgentBase(agent.WithName("MyAgent"), agent.WithRoute("/my-agent")) - var handler = swlambda.NewHandler(a.AsRouter()) - - func main() { - lambda.Start(handler.HandleFunctionURL) - } - ``` - - - - ```go - package main - - import ( - "github.com/aws/aws-lambda-go/lambda" - swlambda "github.com/signalwire/signalwire-go/pkg/lambda" - "github.com/signalwire/signalwire-go/pkg/agent" - ) - - var a = agent.NewAgentBase(agent.WithName("MyAgent"), agent.WithRoute("/my-agent")) - var handler = swlambda.NewHandler(a.AsRouter()) - - func main() { - lambda.Start(handler.HandleFunctionURL) - } - ``` - - - -## Classes - - - - Handler wraps an http.Handler so it can service AWS Lambda invocations. Construct one with NewHandler. - - - -## Functions - -### NewHandler - -NewHandler returns a Handler that dispatches Lambda events to the given http.Handler. The handler is usually agent.AsRouter() but any http.Handler works. - -Panics if h is nil to fail loudly at cold-start rather than silently returning 500 on every invocation. - -#### Signature - -```go -func NewHandler(h http.Handler) *Handler -``` - -#### Parameters - - - -#### Returns - -`*Handler` - -#### Source - -[`pkg/lambda/lambda.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/lambda/lambda.go) - -Line 75. - -## Source - -[`pkg/lambda/lambda.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/lambda/lambda.go) diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/agent-handoff/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/agent-handoff/index.mdx deleted file mode 100644 index fdc46f5863..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/agent-handoff/index.mdx +++ /dev/null @@ -1,35 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/agent-handoff" -title: "AgentHandoff" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/livewire.AgentHandoff" - parent: "github.com/signalwire/signalwire-go/pkg/livewire" - module: "github.com.signalwire.signalwire-go.pkg.livewire" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go" ---- -# `AgentHandoff` - -AgentHandoff signals a handoff to another agent in multi-agent scenarios. Mirrors Python AgentHandoff(agent, \*, returns=None) (line 153). - -## Signature - -```go -type AgentHandoff struct -``` - -## Properties - - - - - -## Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 873. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/agent-session/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/agent-session/index.mdx deleted file mode 100644 index ec0d4e24e2..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/agent-session/index.mdx +++ /dev/null @@ -1,255 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/agent-session" -title: "AgentSession" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/livewire.AgentSession" - parent: "github.com/signalwire/signalwire-go/pkg/livewire" - module: "github.com.signalwire.signalwire-go.pkg.livewire" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go" ---- -# `AgentSession` - -AgentSession mirrors a LiveKit AgentSession — it binds an Agent to the SignalWire platform and manages the call lifecycle. - -## Signature - -```go -type AgentSession struct -``` - -## Methods - -### GenerateReply - -GenerateReply triggers the agent to speak. On SignalWire this is handled by the prompt; reply instructions are appended to the prompt. - -#### Signature - -```go -func (*AgentSession) GenerateReply(opts ...ReplyOption) -``` - -#### Parameters - - - -#### Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 674. - -*** - -### GetSwAgent - -GetSwAgent returns the underlying SignalWire AgentBase (for testing/advanced use). - -#### Signature - -```go -func (*AgentSession) GetSwAgent() *agent.AgentBase -``` - -#### Returns - -`*agent.AgentBase` - -#### Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 701. - -*** - -### History - -History returns the conversation turn history (read-only). Mirrors Python AgentSession.history property (line 497). - -#### Signature - -```go -func (*AgentSession) History() []map[string]string -``` - -#### Returns - -`[]map[string]string` - -#### Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 532. - -*** - -### Interrupt - -Interrupt interrupts current speech — noop on SignalWire (barge-in is automatic). - -#### Signature - -```go -func (*AgentSession) Interrupt() -``` - -#### Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 686. - -*** - -### Say - -Say queues text to be spoken by the agent. - -#### Signature - -```go -func (*AgentSession) Say(text string) -``` - -#### Parameters - - - -#### Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 655. - -*** - -### SetUserdata - -SetUserdata sets the session-level userdata. Mirrors Python AgentSession.userdata property setter (line 493). - -#### Signature - -```go -func (*AgentSession) SetUserdata(val any) -``` - -#### Parameters - - - -#### Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 526. - -*** - -### Start - -Start binds the session to an agent and prepares the underlying SignalWire AgentBase for serving. - -Mirrors Python AgentSession.start(agent, \*, room=None, record=False) (line 504). The room and record parameters are accepted via StartOption functional options (WithRoom and WithRecord) following Go idioms. - -#### Signature - -```go -func (*AgentSession) Start(ctx *JobContext, ag *Agent, opts ...StartOption) error -``` - -#### Parameters - - - - - - - -#### Returns - -`error` - -#### Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 571. - -*** - -### UpdateAgent - -UpdateAgent swaps in a new Agent mid-session. Mirrors Python AgentSession.update\_agent (line 528) which sets self.\_agent = agent and agent.session = self. - -#### Signature - -```go -func (*AgentSession) UpdateAgent(ag *Agent) -``` - -#### Parameters - - - -#### Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 539. - -*** - -### UpdateInstructions - -UpdateInstructions changes the agent's prompt mid-session. - -#### Signature - -```go -func (*AgentSession) UpdateInstructions(instructions string) -``` - -#### Parameters - - - -#### Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 691. - -*** - -### Userdata - -Userdata returns the session-level userdata. Mirrors Python AgentSession.userdata property getter (line 489). - -#### Signature - -```go -func (*AgentSession) Userdata() any -``` - -#### Returns - -`any` - -#### Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 520. - -## Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 330. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/agent/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/agent/index.mdx deleted file mode 100644 index 3ca29ab611..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/agent/index.mdx +++ /dev/null @@ -1,247 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/agent" -title: "Agent" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/livewire.Agent" - parent: "github.com/signalwire/signalwire-go/pkg/livewire" - module: "github.com.signalwire.signalwire-go.pkg.livewire" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go" ---- -# `Agent` - -Agent mirrors a LiveKit Agent — it holds instructions and tool definitions. - -## Signature - -```go -type Agent struct -``` - -## Methods - -### FunctionTool - -FunctionTool registers a named tool on the agent. The handler must be - -``` -func(args map[string]any, rawData map[string]any) *swaig.FunctionResult -``` - -or a LiveKit-style handler that will be wrapped: - -``` -func(ctx *RunContext, location string) string -``` - -In the LiveKit-style case the function's string parameters are inferred and the return string is wrapped into a FunctionResult automatically. - -#### Signature - -```go -func (*Agent) FunctionTool(name string, handler any, opts ...ToolOption) *Agent -``` - -#### Parameters - - - - - - - -#### Returns - -`*Agent` - -#### Examples - - - - ```go - func(args map[string]any, rawData map[string]any) *swaig.FunctionResult - ``` - - - - ```go - func(ctx *RunContext, location string) string - ``` - - - - ```go - func(args map[string]any, rawData map[string]any) *swaig.FunctionResult - ``` - - - - ```go - func(ctx *RunContext, location string) string - ``` - - - -#### Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 196. - -*** - -### Instructions - -Instructions returns the agent's current instructions string. Mirrors Python Agent.instructions (public read/write attribute, line 290). - -#### Signature - -```go -func (*Agent) Instructions() string -``` - -#### Returns - -`string` - -#### Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 242. - -*** - -### OnEnter - -OnEnter registers a callback to be invoked when the agent enters a session. Mirrors Python Agent.on\_enter lifecycle hook (line 346). Returns the Agent for method chaining. - -#### Signature - -```go -func (*Agent) OnEnter(fn func()) *Agent -``` - -#### Parameters - - - -#### Returns - -`*Agent` - -#### Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 256. - -*** - -### OnExit - -OnExit registers a callback to be invoked when the agent exits a session. Mirrors Python Agent.on\_exit lifecycle hook (line 350). Returns the Agent for method chaining. - -#### Signature - -```go -func (*Agent) OnExit(fn func()) *Agent -``` - -#### Parameters - - - -#### Returns - -`*Agent` - -#### Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 264. - -*** - -### OnUserTurnCompleted - -OnUserTurnCompleted registers a callback invoked when the user finishes speaking. The two arguments mirror Python's turn\_ctx and new\_message parameters (line 354), typed as any to avoid a LiveKit dependency. Returns the Agent for method chaining. - -#### Signature - -```go -func (*Agent) OnUserTurnCompleted(fn func(turnCtx any, newMessage any)) *Agent -``` - -#### Parameters - - - -#### Returns - -`*Agent` - -#### Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 273. - -*** - -### Session - -Session returns the AgentSession currently bound to this agent, or nil if the agent has not been started. Mirrors Python Agent.session property (lines 334–340). - -#### Signature - -```go -func (*Agent) Session() *AgentSession -``` - -#### Returns - -`*AgentSession` - -#### Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 249. - -*** - -### UpdateTools - -UpdateTools replaces the agent's tool list. Mirrors Python Agent.update\_tools (livewire/**init**.py:394) which accepts List\[Any] and stores self.\_tools = list(tools). In Go, the parameter is \[]any to keep the unexported toolDef out of the public signature (the original typed \[]toolDef made the method uncallable from external packages). Elements that aren't recognized tools are silently skipped, matching Python's permissive storage semantics. Returns the Agent for method chaining. - -#### Signature - -```go -func (*Agent) UpdateTools(tools []any) *Agent -``` - -#### Parameters - - - -#### Returns - -`*Agent` - -#### Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 286. - -## Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 124. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/cartesia-tts/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/cartesia-tts/index.mdx deleted file mode 100644 index b9bd3ded57..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/cartesia-tts/index.mdx +++ /dev/null @@ -1,33 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/cartesia-tts" -title: "CartesiaTTS" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/livewire.CartesiaTTS" - parent: "github.com/signalwire/signalwire-go/pkg/livewire" - module: "github.com.signalwire.signalwire-go.pkg.livewire" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go" ---- -# `CartesiaTTS` - -CartesiaTTS is a stub for the Cartesia TTS provider. - -## Signature - -```go -type CartesiaTTS struct -``` - -## Properties - - - -## Source - -[`pkg/livewire/plugins.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go) - -Line 79. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/chat-context/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/chat-context/index.mdx deleted file mode 100644 index d7bf0d8488..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/chat-context/index.mdx +++ /dev/null @@ -1,61 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/chat-context" -title: "ChatContext" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/livewire.ChatContext" - parent: "github.com/signalwire/signalwire-go/pkg/livewire" - module: "github.com.signalwire.signalwire-go.pkg.livewire" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go" ---- -# `ChatContext` - -ChatContext buffers a conversation as an ordered list of role/content messages. It mirrors the Python livewire.ChatContext stub which is API-compatible with the livekit-agents ChatContext shape. - -## Signature - -```go -type ChatContext struct -``` - -## Properties - - - -## Methods - -### Append - -Append adds a role/content message to the context and returns the receiver for method chaining. If role is empty it defaults to "user"; if content is empty it defaults to "" (empty string), matching the Python defaults role="user", text="". - -#### Signature - -```go -func (*ChatContext) Append(role string, content string) *ChatContext -``` - -#### Parameters - - - - - -#### Returns - -`*ChatContext` - -#### Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 929. - -## Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 918. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/chat-message/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/chat-message/index.mdx deleted file mode 100644 index e3026b845c..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/chat-message/index.mdx +++ /dev/null @@ -1,35 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/chat-message" -title: "ChatMessage" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/livewire.ChatMessage" - parent: "github.com/signalwire/signalwire-go/pkg/livewire" - module: "github.com.signalwire.signalwire-go.pkg.livewire" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go" ---- -# `ChatMessage` - -ChatMessage holds a single role/content pair in a conversation history. The JSON tags match the dict keys produced by the Python ChatContext.append() implementation: \{"role": ..., "content": ...\}. - -## Signature - -```go -type ChatMessage struct -``` - -## Properties - - - - - -## Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 910. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/deepgram-stt/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/deepgram-stt/index.mdx deleted file mode 100644 index a51fc45766..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/deepgram-stt/index.mdx +++ /dev/null @@ -1,33 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/deepgram-stt" -title: "DeepgramSTT" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/livewire.DeepgramSTT" - parent: "github.com/signalwire/signalwire-go/pkg/livewire" - module: "github.com.signalwire.signalwire-go.pkg.livewire" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go" ---- -# `DeepgramSTT` - -DeepgramSTT is a stub for the Deepgram STT provider. On SignalWire, speech recognition is handled by the control plane. - -## Signature - -```go -type DeepgramSTT struct -``` - -## Properties - - - -## Source - -[`pkg/livewire/plugins.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go) - -Line 9. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/eleven-labs-tts/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/eleven-labs-tts/index.mdx deleted file mode 100644 index 5078916650..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/eleven-labs-tts/index.mdx +++ /dev/null @@ -1,33 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/eleven-labs-tts" -title: "ElevenLabsTTS" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/livewire.ElevenLabsTTS" - parent: "github.com/signalwire/signalwire-go/pkg/livewire" - module: "github.com.signalwire.signalwire-go.pkg.livewire" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go" ---- -# `ElevenLabsTTS` - -ElevenLabsTTS is a stub for the ElevenLabs TTS provider. - -## Signature - -```go -type ElevenLabsTTS struct -``` - -## Properties - - - -## Source - -[`pkg/livewire/plugins.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go) - -Line 65. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/google-stt/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/google-stt/index.mdx deleted file mode 100644 index da5ab856fa..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/google-stt/index.mdx +++ /dev/null @@ -1,33 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/google-stt" -title: "GoogleSTT" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/livewire.GoogleSTT" - parent: "github.com/signalwire/signalwire-go/pkg/livewire" - module: "github.com.signalwire.signalwire-go.pkg.livewire" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go" ---- -# `GoogleSTT` - -GoogleSTT is a stub for the Google STT provider. - -## Signature - -```go -type GoogleSTT struct -``` - -## Properties - - - -## Source - -[`pkg/livewire/plugins.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go) - -Line 24. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/index.mdx deleted file mode 100644 index ee954dc6f6..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/index.mdx +++ /dev/null @@ -1,1360 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire" -title: "livewire" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "module" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/livewire" - module: "github.com.signalwire.signalwire-go.pkg.livewire" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go" ---- -# `livewire` - -Package livewire provides a LiveKit-compatible API surface that runs on SignalWire's platform. Developers can use familiar LiveKit struct and function names — just change the import path to get SignalWire's infrastructure handling STT, TTS, VAD, LLM, and call control. - -## Signature - -```go -package livewire -``` - -## Classes - - - - Agent mirrors a LiveKit Agent — it holds instructions and tool definitions. - - - - AgentHandoff signals a handoff to another agent in multi-agent scenarios. Mirrors Python AgentHandoff(agent, \*, returns=None) (line 153). - - - - AgentSession mirrors a LiveKit AgentSession — it binds an Agent to the SignalWire platform and manages the call lifecycle. - - - - CartesiaTTS is a stub for the Cartesia TTS provider. - - - - ChatContext buffers a conversation as an ordered list of role/content messages. It mirrors the Python livewire.ChatContext stub which is API-compatible with the livekit-agents ChatContext shape. - - - - ChatMessage holds a single role/content pair in a conversation history. The JSON tags match the dict keys produced by the Python ChatContext.append() implementation: \{"role": ..., "content": ...\}. - - - - DeepgramSTT is a stub for the Deepgram STT provider. On SignalWire, speech recognition is handled by the control plane. - - - - ElevenLabsTTS is a stub for the ElevenLabs TTS provider. - - - - GoogleSTT is a stub for the Google STT provider. - - - - InferenceLLM is a stub for the SignalWire-hosted inference LLM. On SignalWire, the LLM pipeline is handled by the control plane; the Model field is forwarded to SignalWire AI parameters. Mirrors Python InferenceLLM(model="") (livewire/**init**.py:751). - - - - InferenceSTT is a stub for the SignalWire-hosted inference STT provider. On SignalWire, speech recognition is handled by the control plane. Mirrors Python InferenceSTT(model="") (livewire/**init**.py:736). - - - - InferenceTTS is a no-op stub providing LiveKit import compatibility. SignalWire's control plane handles text-to-speech; this type exists so code written for livekit/agents inference.TTS can be dropped in unchanged. - - - - JobContext mirrors a LiveKit JobContext — provides room and connection info. - - - - JobProcess mirrors a LiveKit JobProcess — used for prewarm/setup. - - - - LiveServer mirrors a LiveKit AgentServer — it registers entrypoints and starts the agent. - - - - OpenAILLM is a stub for the OpenAI LLM provider. - - - - OpenAITTS is a stub for the OpenAI TTS provider. - - - - Room is a stub — SignalWire doesn't use the LiveKit room abstraction. - - - - RunContext mirrors a LiveKit RunContext — available inside tool handlers. - - - - SileroVAD is a stub for the Silero VAD provider. - - - - StopResponse signals that a tool should not trigger another LLM reply. - - - - ToolError signals a tool execution error. Return a \*ToolError from a tool handler to tell the framework the tool failed; the error message is forwarded to the LLM as a tool-failure notification rather than triggering a normal LLM reply. Parallel to StopResponse in this file. - - - -## Functions - -### NewAgent - -NewAgent creates a new Agent with the given instructions and options. - -#### Signature - -```go -func NewAgent(instructions string, opts ...AgentOption) *Agent -``` - -#### Parameters - - - - - -#### Returns - -`*Agent` - -#### Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 163. - -*** - -### NewAgentServer - -NewAgentServer creates a new LiveServer. - -#### Signature - -```go -func NewAgentServer() *LiveServer -``` - -#### Returns - -`*LiveServer` - -#### Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 754. - -*** - -### NewAgentSession - -NewAgentSession creates a new AgentSession with the given options. Mirrors Python AgentSession.**init** which initializes \_history to \[] (line 480) and \_userdata to \{\} when not provided (line 460). - -#### Signature - -```go -func NewAgentSession(opts ...SessionOption) *AgentSession -``` - -#### Parameters - - - -#### Returns - -`*AgentSession` - -#### Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 495. - -*** - -### NewCartesiaTTS - -NewCartesiaTTS creates a CartesiaTTS stub. - -#### Signature - -```go -func NewCartesiaTTS(opts ...func(*CartesiaTTS)) *CartesiaTTS -``` - -#### Parameters - - - -#### Returns - -`*CartesiaTTS` - -#### Source - -[`pkg/livewire/plugins.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go) - -Line 84. - -*** - -### NewChatContext - -NewChatContext returns an empty ChatContext ready for use. - -#### Signature - -```go -func NewChatContext() *ChatContext -``` - -#### Returns - -`*ChatContext` - -#### Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 923. - -*** - -### NewDeepgramSTT - -NewDeepgramSTT creates a DeepgramSTT stub. - -#### Signature - -```go -func NewDeepgramSTT(opts ...func(*DeepgramSTT)) *DeepgramSTT -``` - -#### Parameters - - - -#### Returns - -`*DeepgramSTT` - -#### Source - -[`pkg/livewire/plugins.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go) - -Line 14. - -*** - -### NewElevenLabsTTS - -NewElevenLabsTTS creates an ElevenLabsTTS stub. - -#### Signature - -```go -func NewElevenLabsTTS(opts ...func(*ElevenLabsTTS)) *ElevenLabsTTS -``` - -#### Parameters - - - -#### Returns - -`*ElevenLabsTTS` - -#### Source - -[`pkg/livewire/plugins.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go) - -Line 70. - -*** - -### NewGoogleSTT - -NewGoogleSTT creates a GoogleSTT stub. - -#### Signature - -```go -func NewGoogleSTT(opts ...func(*GoogleSTT)) *GoogleSTT -``` - -#### Parameters - - - -#### Returns - -`*GoogleSTT` - -#### Source - -[`pkg/livewire/plugins.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go) - -Line 29. - -*** - -### NewInferenceLLM - -NewInferenceLLM creates an InferenceLLM stub with the given options. - -#### Signature - -```go -func NewInferenceLLM(opts ...func(*InferenceLLM)) *InferenceLLM -``` - -#### Parameters - - - -#### Returns - -`*InferenceLLM` - -#### Source - -[`pkg/livewire/plugins.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go) - -Line 134. - -*** - -### NewInferenceSTT - -NewInferenceSTT creates an InferenceSTT stub with the given options. - -#### Signature - -```go -func NewInferenceSTT(opts ...func(*InferenceSTT)) *InferenceSTT -``` - -#### Parameters - - - -#### Returns - -`*InferenceSTT` - -#### Source - -[`pkg/livewire/plugins.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go) - -Line 46. - -*** - -### NewInferenceTTS - -NewInferenceTTS creates an InferenceTTS stub with the given model hint. The model value is stored for compatibility but is otherwise unused. - -#### Signature - -```go -func NewInferenceTTS(model string) *InferenceTTS -``` - -#### Parameters - - - -#### Returns - -`*InferenceTTS` - -#### Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 950. - -*** - -### NewOpenAILLM - -NewOpenAILLM creates an OpenAILLM stub. - -#### Signature - -```go -func NewOpenAILLM(opts ...func(*OpenAILLM)) *OpenAILLM -``` - -#### Parameters - - - -#### Returns - -`*OpenAILLM` - -#### Source - -[`pkg/livewire/plugins.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go) - -Line 116. - -*** - -### NewOpenAITTS - -NewOpenAITTS creates an OpenAITTS stub. - -#### Signature - -```go -func NewOpenAITTS(opts ...func(*OpenAITTS)) *OpenAITTS -``` - -#### Parameters - - - -#### Returns - -`*OpenAITTS` - -#### Source - -[`pkg/livewire/plugins.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go) - -Line 98. - -*** - -### NewSileroVAD - -NewSileroVAD creates a SileroVAD stub. Mirrors Python SileroVAD(\*\*kwargs) — accepts functional options for LiveKit portability, matching the in-file convention for all other stubs. - -#### Signature - -```go -func NewSileroVAD(opts ...func(*SileroVAD)) *SileroVAD -``` - -#### Parameters - - - -#### Returns - -`*SileroVAD` - -#### Source - -[`pkg/livewire/plugins.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go) - -Line 157. - -*** - -### NewToolError - -NewToolError constructs a ToolError with the given message. - -#### Signature - -```go -func NewToolError(message string) *ToolError -``` - -#### Parameters - - - -#### Returns - -`*ToolError` - -#### Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 901. - -*** - -### RunApp - -RunApp starts the LiveWire agent — prints the banner, a random tip, invokes the setup function (if any), calls the entrypoint, and starts the underlying SignalWire agent server. - -#### Signature - -```go -func RunApp(server *LiveServer) -``` - -#### Parameters - - - -#### Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 834. - -*** - -### WithAgentName - -WithAgentName sets the agent name for the RTC session. - -#### Signature - -```go -func WithAgentName(name string) RTCOption -``` - -#### Parameters - - - -#### Returns - -`RTCOption` - -#### Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 770. - -*** - -### WithAllowInterruptions - -WithAllowInterruptions maps to barge configuration on SignalWire. - -#### Signature - -```go -func WithAllowInterruptions(allow bool) SessionOption -``` - -#### Parameters - - - -#### Returns - -`SessionOption` - -#### Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 418. - -*** - -### WithDescription - -WithDescription sets the tool description. - -#### Signature - -```go -func WithDescription(desc string) ToolOption -``` - -#### Parameters - - - -#### Returns - -`ToolOption` - -#### Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 177. - -*** - -### WithInferenceLLMModel - -WithInferenceLLMModel returns a functional option that sets the model string. - -#### Signature - -```go -func WithInferenceLLMModel(model string) func(*InferenceLLM) -``` - -#### Parameters - - - -#### Returns - -`func(*InferenceLLM)` - -#### Source - -[`pkg/livewire/plugins.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go) - -Line 143. - -*** - -### WithInferenceSTTModel - -WithInferenceSTTModel returns a functional option that sets the model string. - -#### Signature - -```go -func WithInferenceSTTModel(model string) func(*InferenceSTT) -``` - -#### Parameters - - - -#### Returns - -`func(*InferenceSTT)` - -#### Source - -[`pkg/livewire/plugins.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go) - -Line 56. - -*** - -### WithLLM - -WithLLM sets the LLM model — this maps to SignalWire AI params. - -#### Signature - -```go -func WithLLM(model string) SessionOption -``` - -#### Parameters - - - -#### Returns - -`SessionOption` - -#### Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 395. - -*** - -### WithMaxEndpointingDelay - -WithMaxEndpointingDelay maps to AI params on SignalWire. - -#### Signature - -```go -func WithMaxEndpointingDelay(d float64) SessionOption -``` - -#### Parameters - - - -#### Returns - -`SessionOption` - -#### Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 432. - -*** - -### WithMaxToolSteps - -WithMaxToolSteps sets the maximum tool call chain depth — noop on SignalWire. - -#### Signature - -```go -func WithMaxToolSteps(n int) SessionOption -``` - -#### Parameters - - - -#### Returns - -`SessionOption` - -#### Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 439. - -*** - -### WithMCPServers - -WithMCPServers is a LiveKit-compatible noop — MCP servers are not yet supported in LiveWire. Tools should be registered via FunctionTool. Mirrors Python Agent(mcp\_servers=...) which emits a one-time noop warning. - -#### Signature - -```go -func WithMCPServers(servers ...any) AgentOption -``` - -#### Parameters - - - -#### Returns - -`AgentOption` - -#### Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 156. - -*** - -### WithMinEndpointingDelay - -WithMinEndpointingDelay maps to end\_of\_speech\_timeout on SignalWire. - -#### Signature - -```go -func WithMinEndpointingDelay(d float64) SessionOption -``` - -#### Parameters - - - -#### Returns - -`SessionOption` - -#### Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 425. - -*** - -### WithMinInterruptionDuration - -WithMinInterruptionDuration sets the minimum interruption duration — noop on SignalWire where barge-in timing is handled automatically. Mirrors Python AgentSession(min\_interruption\_duration=0.5) (line 419). - -#### Signature - -```go -func WithMinInterruptionDuration(d float64) SessionOption -``` - -#### Parameters - - - -#### Returns - -`SessionOption` - -#### Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 476. - -*** - -### WithOnRequest - -WithOnRequest accepts a request callback — noop on SignalWire. Mirrors Python AgentServer.rtc\_session(on\_request=...) which silently ignores the parameter for LiveKit portability. - -#### Signature - -```go -func WithOnRequest(fn func()) RTCOption -``` - -#### Parameters - - - -#### Returns - -`RTCOption` - -#### Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 785. - -*** - -### WithOnSessionEnd - -WithOnSessionEnd accepts a session-end callback — noop on SignalWire. Mirrors Python AgentServer.rtc\_session(on\_session\_end=...) which silently ignores the parameter for LiveKit portability. - -#### Signature - -```go -func WithOnSessionEnd(fn func()) RTCOption -``` - -#### Parameters - - - -#### Returns - -`RTCOption` - -#### Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 794. - -*** - -### WithParameters - -WithParameters sets explicit JSON-Schema parameters for a tool. - -#### Signature - -```go -func WithParameters(params map[string]any) ToolOption -``` - -#### Parameters - - - -#### Returns - -`ToolOption` - -#### Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 182. - -*** - -### WithPreemptiveGeneration - -WithPreemptiveGeneration enables or disables preemptive generation — noop on SignalWire. Mirrors Python AgentSession(preemptive\_generation=False) (line 423). - -#### Signature - -```go -func WithPreemptiveGeneration(enabled bool) SessionOption -``` - -#### Parameters - - - -#### Returns - -`SessionOption` - -#### Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 485. - -*** - -### WithRecord - -WithRecord enables call recording for the session. Mirrors Python AgentSession.start(record=False) keyword-only param (line 504). - -#### Signature - -```go -func WithRecord(record bool) StartOption -``` - -#### Parameters - - - -#### Returns - -`StartOption` - -#### Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 561. - -*** - -### WithReplyInstructions - -WithReplyInstructions sets the instructions for the generated reply. - -#### Signature - -```go -func WithReplyInstructions(inst string) ReplyOption -``` - -#### Parameters - - - -#### Returns - -`ReplyOption` - -#### Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 668. - -*** - -### WithRoom - -WithRoom sets the room for the session start. Mirrors Python AgentSession.start(room=...) keyword-only param (line 504). - -#### Signature - -```go -func WithRoom(room *Room) StartOption -``` - -#### Parameters - - - -#### Returns - -`StartOption` - -#### Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 555. - -*** - -### WithServerType - -WithServerType sets the server type ("room" or "publisher") — noop on SignalWire. - -#### Signature - -```go -func WithServerType(t string) RTCOption -``` - -#### Parameters - - - -#### Returns - -`RTCOption` - -#### Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 775. - -*** - -### WithSessionMCPServers - -WithSessionMCPServers stores the MCP servers value on the session — noop on SignalWire. Mirrors Python AgentSession(mcp\_servers=...) which emits a one-time noop warning (lines 450–456). - -#### Signature - -```go -func WithSessionMCPServers(servers any) SessionOption -``` - -#### Parameters - - - -#### Returns - -`SessionOption` - -#### Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 459. - -*** - -### WithSessionTools - -WithSessionTools appends session-level tools to the AgentSession. These are merged with the bound Agent's tools in Start(). Mirrors Python AgentSession(tools=...) which stores list(tools or \[]) on self.\_tools (line 459) and merges them in \_build\_sw\_agent() (line 591). - -#### Signature - -```go -func WithSessionTools(tools ...any) SessionOption -``` - -#### Parameters - - - -#### Returns - -`SessionOption` - -#### Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 450. - -*** - -### WithSessionUserdata - -WithSessionUserdata attaches arbitrary user data to the session. Mirrors Python AgentSession(userdata=...) which stores the value as self.\_userdata (line 460). - -#### Signature - -```go -func WithSessionUserdata(data any) SessionOption -``` - -#### Parameters - - - -#### Returns - -`SessionOption` - -#### Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 469. - -*** - -### WithSTT - -WithSTT sets the STT provider — noop on SignalWire (handled by the control plane). - -#### Signature - -```go -func WithSTT(provider string) SessionOption -``` - -#### Parameters - - - -#### Returns - -`SessionOption` - -#### Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 379. - -*** - -### WithTools - -WithTools is a LiveKit-compatible noop — use FunctionTool to register tools. - -#### Signature - -```go -func WithTools(tools ...any) AgentOption -``` - -#### Parameters - - - -#### Returns - -`AgentOption` - -#### Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 142. - -*** - -### WithTTS - -WithTTS sets the TTS provider — noop on SignalWire (voice can be configured via languages). - -#### Signature - -```go -func WithTTS(provider string) SessionOption -``` - -#### Parameters - - - -#### Returns - -`SessionOption` - -#### Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 387. - -*** - -### WithTurnDetection - -WithTurnDetection sets the turn detection mode — noop on SignalWire. - -#### Signature - -```go -func WithTurnDetection(mode string) SessionOption -``` - -#### Parameters - - - -#### Returns - -`SessionOption` - -#### Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 410. - -*** - -### WithUserdata - -WithUserdata attaches arbitrary user data to the agent. - -#### Signature - -```go -func WithUserdata(data any) AgentOption -``` - -#### Parameters - - - -#### Returns - -`AgentOption` - -#### Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 149. - -*** - -### WithVAD - -WithVAD sets the VAD provider — noop on SignalWire (handled by the control plane). - -#### Signature - -```go -func WithVAD(vad any) SessionOption -``` - -#### Parameters - - - -#### Returns - -`SessionOption` - -#### Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 402. - -## Type Aliases - -### AgentOption - -AgentOption configures an Agent during construction. - -#### Signature - -```go -type AgentOption alias -``` - -#### Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 139. - -*** - -### ReplyOption - -ReplyOption configures a GenerateReply call. - -#### Signature - -```go -type ReplyOption alias -``` - -#### Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 665. - -*** - -### RTCOption - -RTCOption configures an RTC session. - -#### Signature - -```go -type RTCOption alias -``` - -#### Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 767. - -*** - -### SessionOption - -SessionOption configures an AgentSession. - -#### Signature - -```go -type SessionOption alias -``` - -#### Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 376. - -*** - -### StartOption - -StartOption configures a Start() call. - -#### Signature - -```go -type StartOption alias -``` - -#### Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 551. - -*** - -### ToolOption - -ToolOption configures a tool definition. - -#### Signature - -```go -type ToolOption alias -``` - -#### Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 174. - -## Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/inference-llm/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/inference-llm/index.mdx deleted file mode 100644 index 9966dd50ce..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/inference-llm/index.mdx +++ /dev/null @@ -1,33 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/inference-llm" -title: "InferenceLLM" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/livewire.InferenceLLM" - parent: "github.com/signalwire/signalwire-go/pkg/livewire" - module: "github.com.signalwire.signalwire-go.pkg.livewire" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go" ---- -# `InferenceLLM` - -InferenceLLM is a stub for the SignalWire-hosted inference LLM. On SignalWire, the LLM pipeline is handled by the control plane; the Model field is forwarded to SignalWire AI parameters. Mirrors Python InferenceLLM(model="") (livewire/**init**.py:751). - -## Signature - -```go -type InferenceLLM struct -``` - -## Properties - - - -## Source - -[`pkg/livewire/plugins.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go) - -Line 129. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/inference-stt/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/inference-stt/index.mdx deleted file mode 100644 index 9cefe09a54..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/inference-stt/index.mdx +++ /dev/null @@ -1,33 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/inference-stt" -title: "InferenceSTT" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/livewire.InferenceSTT" - parent: "github.com/signalwire/signalwire-go/pkg/livewire" - module: "github.com.signalwire.signalwire-go.pkg.livewire" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go" ---- -# `InferenceSTT` - -InferenceSTT is a stub for the SignalWire-hosted inference STT provider. On SignalWire, speech recognition is handled by the control plane. Mirrors Python InferenceSTT(model="") (livewire/**init**.py:736). - -## Signature - -```go -type InferenceSTT struct -``` - -## Properties - - - -## Source - -[`pkg/livewire/plugins.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go) - -Line 41. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/inference-tts/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/inference-tts/index.mdx deleted file mode 100644 index 08b4a7a3cc..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/inference-tts/index.mdx +++ /dev/null @@ -1,33 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/inference-tts" -title: "InferenceTTS" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/livewire.InferenceTTS" - parent: "github.com/signalwire/signalwire-go/pkg/livewire" - module: "github.com.signalwire.signalwire-go.pkg.livewire" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go" ---- -# `InferenceTTS` - -InferenceTTS is a no-op stub providing LiveKit import compatibility. SignalWire's control plane handles text-to-speech; this type exists so code written for livekit/agents inference.TTS can be dropped in unchanged. - -## Signature - -```go -type InferenceTTS struct -``` - -## Properties - - - -## Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 944. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/job-context/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/job-context/index.mdx deleted file mode 100644 index 35577295cb..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/job-context/index.mdx +++ /dev/null @@ -1,83 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/job-context" -title: "JobContext" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/livewire.JobContext" - parent: "github.com/signalwire/signalwire-go/pkg/livewire" - module: "github.com.signalwire.signalwire-go.pkg.livewire" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go" ---- -# `JobContext` - -JobContext mirrors a LiveKit JobContext — provides room and connection info. - -## Signature - -```go -type JobContext struct -``` - -## Properties - - - - - -## Methods - -### Connect - -Connect is a LiveKit compatibility noop — SignalWire agents connect automatically when the platform invokes the SWML endpoint. - -#### Signature - -```go -func (*JobContext) Connect() error -``` - -#### Returns - -`error` - -#### Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 718. - -*** - -### WaitForParticipant - -WaitForParticipant is a LiveKit compatibility noop — SignalWire handles participant management automatically. Mirrors Python JobContext.wait\_for\_participant(\*, identity=None) (line 670). - -#### Signature - -```go -func (*JobContext) WaitForParticipant(identity string) error -``` - -#### Parameters - - - -#### Returns - -`error` - -#### Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 726. - -## Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 710. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/job-process/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/job-process/index.mdx deleted file mode 100644 index a668bb8e9b..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/job-process/index.mdx +++ /dev/null @@ -1,33 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/job-process" -title: "JobProcess" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/livewire.JobProcess" - parent: "github.com/signalwire/signalwire-go/pkg/livewire" - module: "github.com.signalwire.signalwire-go.pkg.livewire" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go" ---- -# `JobProcess` - -JobProcess mirrors a LiveKit JobProcess — used for prewarm/setup. - -## Signature - -```go -type JobProcess struct -``` - -## Properties - - - -## Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 823. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/live-server/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/live-server/index.mdx deleted file mode 100644 index 4db311e867..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/live-server/index.mdx +++ /dev/null @@ -1,75 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/live-server" -title: "LiveServer" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/livewire.LiveServer" - parent: "github.com/signalwire/signalwire-go/pkg/livewire" - module: "github.com.signalwire.signalwire-go.pkg.livewire" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go" ---- -# `LiveServer` - -LiveServer mirrors a LiveKit AgentServer — it registers entrypoints and starts the agent. - -## Signature - -```go -type LiveServer struct -``` - -## Methods - -### RTCSession - -RTCSession registers the session entrypoint function. - -#### Signature - -```go -func (*LiveServer) RTCSession(fn func(*JobContext), opts ...RTCOption) -``` - -#### Parameters - - - - - -#### Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 807. - -*** - -### SetSetupFunc - -SetSetupFunc sets the prewarm/setup function — noop on SignalWire. - -#### Signature - -```go -func (*LiveServer) SetSetupFunc(fn func(*JobProcess)) -``` - -#### Parameters - - - -#### Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 801. - -## Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 746. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/open-aillm/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/open-aillm/index.mdx deleted file mode 100644 index 9f51f257eb..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/open-aillm/index.mdx +++ /dev/null @@ -1,33 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/open-aillm" -title: "OpenAILLM" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/livewire.OpenAILLM" - parent: "github.com/signalwire/signalwire-go/pkg/livewire" - module: "github.com.signalwire.signalwire-go.pkg.livewire" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go" ---- -# `OpenAILLM` - -OpenAILLM is a stub for the OpenAI LLM provider. - -## Signature - -```go -type OpenAILLM struct -``` - -## Properties - - - -## Source - -[`pkg/livewire/plugins.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go) - -Line 111. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/open-aitts/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/open-aitts/index.mdx deleted file mode 100644 index 4223c9113d..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/open-aitts/index.mdx +++ /dev/null @@ -1,33 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/open-aitts" -title: "OpenAITTS" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/livewire.OpenAITTS" - parent: "github.com/signalwire/signalwire-go/pkg/livewire" - module: "github.com.signalwire.signalwire-go.pkg.livewire" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go" ---- -# `OpenAITTS` - -OpenAITTS is a stub for the OpenAI TTS provider. - -## Signature - -```go -type OpenAITTS struct -``` - -## Properties - - - -## Source - -[`pkg/livewire/plugins.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go) - -Line 93. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/room/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/room/index.mdx deleted file mode 100644 index 0693a0deae..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/room/index.mdx +++ /dev/null @@ -1,33 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/room" -title: "Room" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/livewire.Room" - parent: "github.com/signalwire/signalwire-go/pkg/livewire" - module: "github.com.signalwire.signalwire-go.pkg.livewire" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go" ---- -# `Room` - -Room is a stub — SignalWire doesn't use the LiveKit room abstraction. - -## Signature - -```go -type Room struct -``` - -## Properties - - - -## Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 736. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/run-context/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/run-context/index.mdx deleted file mode 100644 index b9541cdcc1..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/run-context/index.mdx +++ /dev/null @@ -1,41 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/run-context" -title: "RunContext" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/livewire.RunContext" - parent: "github.com/signalwire/signalwire-go/pkg/livewire" - module: "github.com.signalwire.signalwire-go.pkg.livewire" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go" ---- -# `RunContext` - -RunContext mirrors a LiveKit RunContext — available inside tool handlers. - -## Signature - -```go -type RunContext struct -``` - -## Properties - - - - - - - - - - - -## Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 316. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/silero-vad/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/silero-vad/index.mdx deleted file mode 100644 index 16c022a349..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/silero-vad/index.mdx +++ /dev/null @@ -1,51 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/silero-vad" -title: "SileroVAD" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/livewire.SileroVAD" - parent: "github.com/signalwire/signalwire-go/pkg/livewire" - module: "github.com.signalwire.signalwire-go.pkg.livewire" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go" ---- -# `SileroVAD` - -SileroVAD is a stub for the Silero VAD provider. - -## Signature - -```go -type SileroVAD struct -``` - -## Methods - -### Load - -Load is a noop — Silero VAD model loading is not needed on SignalWire. - -#### Signature - -```go -func (*SileroVAD) Load() *SileroVAD -``` - -#### Returns - -`*SileroVAD` - -#### Source - -[`pkg/livewire/plugins.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go) - -Line 166. - -## Source - -[`pkg/livewire/plugins.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/plugins.go) - -Line 152. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/stop-response/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/stop-response/index.mdx deleted file mode 100644 index 12e3b2915d..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/stop-response/index.mdx +++ /dev/null @@ -1,29 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/stop-response" -title: "StopResponse" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/livewire.StopResponse" - parent: "github.com/signalwire/signalwire-go/pkg/livewire" - module: "github.com.signalwire.signalwire-go.pkg.livewire" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go" ---- -# `StopResponse` - -StopResponse signals that a tool should not trigger another LLM reply. - -## Signature - -```go -type StopResponse struct -``` - -## Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 883. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/tool-error/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/tool-error/index.mdx deleted file mode 100644 index 024b794f10..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/tool-error/index.mdx +++ /dev/null @@ -1,55 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire/tool-error" -title: "ToolError" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/livewire.ToolError" - parent: "github.com/signalwire/signalwire-go/pkg/livewire" - module: "github.com.signalwire.signalwire-go.pkg.livewire" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go" ---- -# `ToolError` - -ToolError signals a tool execution error. Return a \*ToolError from a tool handler to tell the framework the tool failed; the error message is forwarded to the LLM as a tool-failure notification rather than triggering a normal LLM reply. Parallel to StopResponse in this file. - -## Signature - -```go -type ToolError struct -``` - -## Properties - - - -## Methods - -### Error - -Error implements the built-in error interface. - -#### Signature - -```go -func (*ToolError) Error() string -``` - -#### Returns - -`string` - -#### Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 898. - -## Source - -[`pkg/livewire/livewire.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/livewire/livewire.go) - -Line 893. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/logging/logging/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/logging/logging/index.mdx deleted file mode 100644 index 8353315374..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/logging/logging/index.mdx +++ /dev/null @@ -1,307 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/logging/logging" -title: "logging" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "module" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/logging" - module: "github.com.signalwire.signalwire-go.pkg.logging" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/logging/log_level.go" ---- -# `logging` - -Package logging provides structured logging for the SignalWire AI Agents SDK. - -It supports log levels (debug, info, warn, error), named loggers per component, and can be suppressed globally for CLI tools or testing. - -## Signature - -```go -package logging -``` - -## Constants - - - - - - - - - Canonical log-level names. These are exactly the strings ParseLevel maps to a Level; the values must stay in lockstep with the switch in ParseLevel. The set mirrors the Python reference's documented SIGNALWIRE\_LOG\_LEVEL vocabulary (debug, info, warning, error) plus the Go-side aliases ParseLevel also honors (warn, off). - - - - Canonical log-level names. These are exactly the strings ParseLevel maps to a Level; the values must stay in lockstep with the switch in ParseLevel. The set mirrors the Python reference's documented SIGNALWIRE\_LOG\_LEVEL vocabulary (debug, info, warning, error) plus the Go-side aliases ParseLevel also honors (warn, off). - - - - Canonical log-level names. These are exactly the strings ParseLevel maps to a Level; the values must stay in lockstep with the switch in ParseLevel. The set mirrors the Python reference's documented SIGNALWIRE\_LOG\_LEVEL vocabulary (debug, info, warning, error) plus the Go-side aliases ParseLevel also honors (warn, off). - - - - Canonical log-level names. These are exactly the strings ParseLevel maps to a Level; the values must stay in lockstep with the switch in ParseLevel. The set mirrors the Python reference's documented SIGNALWIRE\_LOG\_LEVEL vocabulary (debug, info, warning, error) plus the Go-side aliases ParseLevel also honors (warn, off). - - - - Canonical log-level names. These are exactly the strings ParseLevel maps to a Level; the values must stay in lockstep with the switch in ParseLevel. The set mirrors the Python reference's documented SIGNALWIRE\_LOG\_LEVEL vocabulary (debug, info, warning, error) plus the Go-side aliases ParseLevel also honors (warn, off). - - - - Canonical log-level names. These are exactly the strings ParseLevel maps to a Level; the values must stay in lockstep with the switch in ParseLevel. The set mirrors the Python reference's documented SIGNALWIRE\_LOG\_LEVEL vocabulary (debug, info, warning, error) plus the Go-side aliases ParseLevel also honors (warn, off). - - - - - - -## Classes - - - - Logger is a named logger that respects global log level settings. - - - -## Functions - -### GetGlobalLevel - -GetGlobalLevel returns the current global log level. - -#### Signature - -```go -func GetGlobalLevel() Level -``` - -#### Returns - -`Level` - -#### Source - -[`pkg/logging/logger.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/logging/logger.go) - -Line 96. - -*** - -### IsSuppressed - -IsSuppressed returns whether logging is currently suppressed. - -#### Signature - -```go -func IsSuppressed() bool -``` - -#### Returns - -`bool` - -#### Source - -[`pkg/logging/logger.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/logging/logger.go) - -Line 117. - -*** - -### New - -New creates a new Logger with the given component name. - -#### Signature - -```go -func New(name string) *Logger -``` - -#### Parameters - - - -#### Returns - -`*Logger` - -#### Source - -[`pkg/logging/logger.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/logging/logger.go) - -Line 130. - -*** - -### ParseLevel - -ParseLevel converts a string level name to a Level. Returns LevelInfo if the string is not recognized. - -#### Signature - -```go -func ParseLevel(s string) Level -``` - -#### Parameters - - - -#### Returns - -`Level` - -#### Source - -[`pkg/logging/logger.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/logging/logger.go) - -Line 36. - -*** - -### ResetLoggingConfiguration - -ResetLoggingConfiguration re-reads SIGNALWIRE\_LOG\_LEVEL and SIGNALWIRE\_LOG\_MODE from the environment and resets globalLevel and suppressed to the env-derived defaults. It is the Go equivalent of Python's reset\_logging\_configuration() and is intended for test teardown and env-var-driven reconfiguration at runtime. - -#### Signature - -```go -func ResetLoggingConfiguration() -``` - -#### Source - -[`pkg/logging/logger.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/logging/logger.go) - -Line 82. - -*** - -### SetGlobalLevel - -SetGlobalLevel sets the minimum log level for all loggers. - -#### Signature - -```go -func SetGlobalLevel(level Level) -``` - -#### Parameters - - - -#### Source - -[`pkg/logging/logger.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/logging/logger.go) - -Line 89. - -*** - -### Suppress - -Suppress disables all log output. - -#### Signature - -```go -func Suppress() -``` - -#### Source - -[`pkg/logging/logger.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/logging/logger.go) - -Line 103. - -*** - -### Unsuppress - -Unsuppress re-enables log output. - -#### Signature - -```go -func Unsuppress() -``` - -#### Source - -[`pkg/logging/logger.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/logging/logger.go) - -Line 110. - -## Enums - -### Level - -Level represents a log severity level. - -#### Signature - -```go -type Level alias -``` - -#### Source - -[`pkg/logging/logger.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/logging/logger.go) - -Line 16. - -*** - -### LogLevel - -LogLevel is the closed set of log-level _names_ accepted at the string boundary (e.g. server.WithLogLevel, the SIGNALWIRE\_LOG\_LEVEL env var) as a defined string type with typed constants. It is distinct from Level: Level is the internal integer severity used by the loggers, whereas LogLevel is the user-facing textual name that ParseLevel resolves into a Level. - -Adding the typed constants gives Go callers editor autocompletion plus call-site typo checking — a bare string like "debgu" only diverges at runtime (ParseLevel silently falls back to LevelInfo), whereas a mistyped constant fails to compile. Because Go auto-converts untyped string-constant literals to a defined string type, every call site keeps working both ways: - -``` -server.WithLogLevel(logging.LevelNameDebug) // typed const — autocompleted -server.WithLogLevel("debug") // bare string literal still compiles -``` - -LogLevel is a string subtype, so its value is byte-identical to the bare string the reference uses — ParseLevel("debug") and ParseLevel(LevelNameDebug) resolve to the same Level, preserving parity with the Python reference whose log\_level is a plain str (signalwire/core/logging\_config.py). - -#### Signature - -```go -type LogLevel alias -``` - -#### Examples - - - - ```go - server.WithLogLevel(logging.LevelNameDebug) // typed const — autocompleted - server.WithLogLevel("debug") // bare string literal still compiles - ``` - - - - ```go - server.WithLogLevel(logging.LevelNameDebug) // typed const — autocompleted - server.WithLogLevel("debug") // bare string literal still compiles - ``` - - - -#### Source - -[`pkg/logging/log_level.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/logging/log_level.go) - -Line 22. - -## Source - -[`pkg/logging/log_level.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/logging/log_level.go) diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/logging/logging/logger/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/logging/logging/logger/index.mdx deleted file mode 100644 index 306b0e4c32..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/logging/logging/logger/index.mdx +++ /dev/null @@ -1,125 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/logging/logging/logger" -title: "Logger" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/logging.Logger" - parent: "github.com/signalwire/signalwire-go/pkg/logging" - module: "github.com.signalwire.signalwire-go.pkg.logging" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/logging/logger.go" ---- -# `Logger` - -Logger is a named logger that respects global log level settings. - -## Signature - -```go -type Logger struct -``` - -## Methods - -### Debug - -Debug logs a message at debug level. - -#### Signature - -```go -func (*Logger) Debug(format string, args ...any) -``` - -#### Parameters - - - - - -#### Source - -[`pkg/logging/logger.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/logging/logger.go) - -Line 153. - -*** - -### Error - -Error logs a message at error level. - -#### Signature - -```go -func (*Logger) Error(format string, args ...any) -``` - -#### Parameters - - - - - -#### Source - -[`pkg/logging/logger.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/logging/logger.go) - -Line 168. - -*** - -### Info - -Info logs a message at info level. - -#### Signature - -```go -func (*Logger) Info(format string, args ...any) -``` - -#### Parameters - - - - - -#### Source - -[`pkg/logging/logger.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/logging/logger.go) - -Line 158. - -*** - -### Warn - -Warn logs a message at warn level. - -#### Signature - -```go -func (*Logger) Warn(format string, args ...any) -``` - -#### Parameters - - - - - -#### Source - -[`pkg/logging/logger.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/logging/logger.go) - -Line 163. - -## Source - -[`pkg/logging/logger.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/logging/logger.go) - -Line 124. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/pom/pom/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/pom/pom/index.mdx deleted file mode 100644 index 8ed042d7b5..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/pom/pom/index.mdx +++ /dev/null @@ -1,303 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/pom/pom" -title: "pom" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "module" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/pom" - module: "github.com.signalwire.signalwire-go.pkg.pom" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go" ---- -# `pom` - -Package pom provides a typed Prompt Object Model — a structured tree of sections that can be rendered to Markdown, XML, JSON, or YAML. The rendered output matches the Python reference at signalwire/signalwire/pom/pom.py byte-for-byte for the canonical scenarios covered by the cross-port parity tests in tests/unit/pom/test\_pom\_render\_parity.py. - -Two types make up the API: - -- Section: one node in the tree (title, body, bullets, subsections, numbered, numberedBullets). -- PromptObjectModel: the root container that holds the top-level sections and provides JSON / YAML round-trip helpers plus the Markdown / XML renderers. - -Both types are exported so callers can build a POM imperatively (NewPromptObjectModel + AddSection + AddSubsection) or by parsing a JSON/YAML document (FromJSON / FromYAML). The rendered output is the canonical wire format; user-facing helpers like AgentBase.Pom() return a \*PromptObjectModel value to keep mutations off the agent's internal state. - -## Signature - -```go -package pom -``` - -## Classes - - - - PromptObjectModel is the root container — a list of top-level Sections plus serialization / rendering helpers. Use NewPromptObjectModel() to construct one, or FromJSON / FromYAML to parse one. - - - - Section is one node in the POM tree. - - - -## Functions - -### FromJSON - -FromJSON parses a JSON string (an array of section maps) and returns a populated \*PromptObjectModel. Subsections are validated to require a title; any section without body/bullets/subsections is rejected. - -Python equivalent: PromptObjectModel.from\_json - -#### Signature - -```go -func FromJSON(jsonStr string) (*PromptObjectModel, error) -``` - -#### Parameters - - - -#### Returns - -`(*PromptObjectModel, error)` - -#### Source - -[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) - -Line 577. - -*** - -### FromList - -FromList builds a POM from a pre-parsed \[]map\[string]any (callers can use this when they already have the dict form, e.g. from a database row or another config source). - -Python equivalent: PromptObjectModel.\_from\_dict (the internal helper shared by from\_json / from\_yaml). - -#### Signature - -```go -func FromList(data []map[string]any) (*PromptObjectModel, error) -``` - -#### Parameters - - - -#### Returns - -`(*PromptObjectModel, error)` - -#### Source - -[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) - -Line 603. - -*** - -### FromYAML - -FromYAML parses a YAML string (an array of section maps) and returns a populated \*PromptObjectModel. - -Python equivalent: PromptObjectModel.from\_yaml - -#### Signature - -```go -func FromYAML(yamlStr string) (*PromptObjectModel, error) -``` - -#### Parameters - - - -#### Returns - -`(*PromptObjectModel, error)` - -#### Source - -[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) - -Line 589. - -*** - -### NewPromptObjectModel - -NewPromptObjectModel returns an empty POM ready for AddSection calls. - -Python equivalent: PromptObjectModel.**init** - -#### Signature - -```go -func NewPromptObjectModel() *PromptObjectModel -``` - -#### Returns - -`*PromptObjectModel` - -#### Source - -[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) - -Line 341. - -*** - -### NewSection - -NewSection returns a new Section with the supplied title (which may be empty to indicate untitled). Body, bullets, and subsections start empty; populate them via AddBody / AddBullets / AddSubsection. - -Python equivalent: Section.**init** - -#### Signature - -```go -func NewSection(title string) *Section -``` - -#### Parameters - - - -#### Returns - -`*Section` - -#### Source - -[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) - -Line 69. - -*** - -### WithBody - -WithBody sets the section body. - -#### Signature - -```go -func WithBody(body string) SectionOption -``` - -#### Parameters - - - -#### Returns - -`SectionOption` - -#### Source - -[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) - -Line 112. - -*** - -### WithBullets - -WithBullets sets the section bullets (replaces, not appends). - -#### Signature - -```go -func WithBullets(bullets []string) SectionOption -``` - -#### Parameters - - - -#### Returns - -`SectionOption` - -#### Source - -[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) - -Line 115. - -*** - -### WithNumbered - -WithNumbered marks the section as numbered (or explicitly un-numbered). - -#### Signature - -```go -func WithNumbered(v bool) SectionOption -``` - -#### Parameters - - - -#### Returns - -`SectionOption` - -#### Source - -[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) - -Line 120. - -*** - -### WithNumberedBullets - -WithNumberedBullets switches bullet rendering to numbered form. - -#### Signature - -```go -func WithNumberedBullets(v bool) SectionOption -``` - -#### Parameters - - - -#### Returns - -`SectionOption` - -#### Source - -[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) - -Line 123. - -## Type Aliases - -### SectionOption - -SectionOption configures a Section at construction (used by AddSubsection and PromptObjectModel.AddSection). - -#### Signature - -```go -type SectionOption alias -``` - -#### Source - -[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) - -Line 109. - -## Source - -[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/pom/pom/prompt-object-model/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/pom/pom/prompt-object-model/index.mdx deleted file mode 100644 index 743f5651b0..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/pom/pom/prompt-object-model/index.mdx +++ /dev/null @@ -1,271 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/pom/pom/prompt-object-model" -title: "PromptObjectModel" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/pom.PromptObjectModel" - parent: "github.com/signalwire/signalwire-go/pkg/pom" - module: "github.com.signalwire.signalwire-go.pkg.pom" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go" ---- -# `PromptObjectModel` - -PromptObjectModel is the root container — a list of top-level Sections plus serialization / rendering helpers. Use NewPromptObjectModel() to construct one, or FromJSON / FromYAML to parse one. - -Python equivalent: signalwire.pom.pom.PromptObjectModel - -## Signature - -```go -type PromptObjectModel struct -``` - -## Properties - - - Debug, when true, prints rendering decisions to stderr (matches the Python flag). Off by default. - - - - Sections is the ordered list of top-level sections. Only the first section may have a nil Title. - - -## Methods - -### AddPomAsSubsection - -AddPomAsSubsection attaches every top-level section of pomToAdd underneath the section identified by target — either the title of an existing section in this POM, or a \*Section pointer. - -Python equivalent: PromptObjectModel.add\_pom\_as\_subsection - -#### Signature - -```go -func (*PromptObjectModel) AddPomAsSubsection(target any, pomToAdd *PromptObjectModel) error -``` - -#### Parameters - - - - - -#### Returns - -`error` - -#### Source - -[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) - -Line 828. - -*** - -### AddSection - -AddSection appends a top-level section. title may be empty only for the first section (Python contract: "Only the first section can have no title"). The returned \*Section can be configured further (for example, by calling AddSubsection on it). - -Python equivalent: PromptObjectModel.add\_section - -#### Signature - -```go -func (*PromptObjectModel) AddSection(title string, opts ...SectionOption) (*Section, error) -``` - -#### Parameters - - - - - -#### Returns - -`(*Section, error)` - -#### Source - -[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) - -Line 351. - -*** - -### Clone - -Clone returns a deep copy of the POM. Useful when an agent wants to hand callers a snapshot without exposing internal mutable state. - -#### Signature - -```go -func (*PromptObjectModel) Clone() *PromptObjectModel -``` - -#### Returns - -`*PromptObjectModel` - -#### Source - -[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) - -Line 849. - -*** - -### FindSection - -FindSection performs a recursive depth-first search for a section whose Title matches. Returns nil if no match is found. - -Python equivalent: PromptObjectModel.find\_section - -#### Signature - -```go -func (*PromptObjectModel) FindSection(title string) *Section -``` - -#### Parameters - - - -#### Returns - -`*Section` - -#### Source - -[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) - -Line 372. - -*** - -### RenderMarkdown - -RenderMarkdown renders the entire POM as a Markdown document. - -Python equivalent: PromptObjectModel.render\_markdown - -#### Signature - -```go -func (*PromptObjectModel) RenderMarkdown() string -``` - -#### Returns - -`string` - -#### Source - -[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) - -Line 770. - -*** - -### RenderXML - -RenderXML renders the entire POM as an XML document with the canonical “<?xml ...?>\ ... </prompt>“ envelope. - -Python equivalent: PromptObjectModel.render\_xml - -#### Signature - -```go -func (*PromptObjectModel) RenderXML() string -``` - -#### Returns - -`string` - -#### Source - -[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) - -Line 797. - -*** - -### ToJSON - -ToJSON serializes the POM to a JSON string. Matches Python's json.dumps(..., indent=2) byte-for-byte for the canonical fixtures. - -Python equivalent: PromptObjectModel.to\_json - -#### Signature - -```go -func (*PromptObjectModel) ToJSON() (string, error) -``` - -#### Returns - -`(string, error)` - -#### Source - -[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) - -Line 404. - -*** - -### ToList - -ToList returns the POM as \[]map\[string]any (one entry per top-level section), matching Python's to\_dict. - -Python equivalent: PromptObjectModel.to\_dict - -#### Signature - -```go -func (*PromptObjectModel) ToList() []map[string]any -``` - -#### Returns - -`[]map[string]any` - -#### Source - -[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) - -Line 392. - -*** - -### ToYAML - -ToYAML serializes the POM to a YAML string in the same shape as Python's yaml.dump(..., default\_flow\_style=False, sort\_keys=False). PyYAML uses block-sequence-with-indent-0 by default (the leading "-" of each list item aligns with the parent's mapping key, not after it); gopkg.in/yaml.v3 cannot be configured to do the same, so this renderer writes the YAML structure manually for byte-for-byte parity. - -Python equivalent: PromptObjectModel.to\_yaml - -#### Signature - -```go -func (*PromptObjectModel) ToYAML() string -``` - -#### Returns - -`string` - -#### Source - -[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) - -Line 500. - -## Source - -[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) - -Line 329. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/pom/pom/section/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/pom/pom/section/index.mdx deleted file mode 100644 index 810e4d8b9a..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/pom/pom/section/index.mdx +++ /dev/null @@ -1,246 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/pom/pom/section" -title: "Section" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/pom.Section" - parent: "github.com/signalwire/signalwire-go/pkg/pom" - module: "github.com.signalwire.signalwire-go.pkg.pom" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go" ---- -# `Section` - -Section is one node in the POM tree. - -Python equivalent: signalwire.pom.pom.Section. The exported field names match the JSON / YAML schema: - -``` -{"title": "...", "body": "...", "bullets": [...], - "subsections": [...], "numbered": true, "numberedBullets": true} -``` - -Title is a \*string (not string) to faithfully model Python's "title may be None" semantics for the optional first top-level section. All other fields use zero values to mean "absent". - -## Signature - -```go -type Section struct -``` - -## Examples - - - - ```go - {"title": "...", "body": "...", "bullets": [...], - "subsections": [...], "numbered": true, "numberedBullets": true} - ``` - - - - ```go - {"title": "...", "body": "...", "bullets": [...], - "subsections": [...], "numbered": true, "numberedBullets": true} - ``` - - - -## Properties - - - Body is a paragraph of free text (rendered before any bullets). - - - - Bullets is the list of bullet points. Empty means no bullet list. - - - - Numbered, when non-nil, opts the section into (or out of) numeric section numbering. nil means "default" (inherit sibling behavior). - - - - NumberedBullets renders bullets as "1." "2." instead of "-". - - - - Subsections is the list of nested child sections. - - - - Title is the section heading. nil means untitled (only legal for the first top-level section in a PromptObjectModel). - - -## Methods - -### AddBody - -AddBody sets (or replaces) the section body text. - -Python equivalent: Section.add\_body — the docstring says "Add OR REPLACE the body text"; this is a setter, not an appender. - -#### Signature - -```go -func (*Section) AddBody(body string) -``` - -#### Parameters - - - -#### Source - -[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) - -Line 78. - -*** - -### AddBullets - -AddBullets appends bullet points to the section. - -Python equivalent: Section.add\_bullets — the Python contract is to extend (not replace) the existing bullet list. - -#### Signature - -```go -func (*Section) AddBullets(bullets []string) -``` - -#### Parameters - - - -#### Source - -[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) - -Line 86. - -*** - -### AddSubsection - -AddSubsection creates and appends a subsection under this section. title must be non-empty (subsections always require a title). Returns the new \*Section so callers can keep building. - -Python equivalent: Section.add\_subsection - -#### Signature - -```go -func (*Section) AddSubsection(title string, opts ...SectionOption) (*Section, error) -``` - -#### Parameters - - - - - -#### Returns - -`(*Section, error)` - -#### Source - -[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) - -Line 95. - -*** - -### RenderMarkdown - -RenderMarkdown returns this section (and its subsections) as a Markdown string. level controls the starting heading level (default 2 == "##"); sectionNumber is the optional dotted prefix the section inherits when its parent is numbered. - -Python equivalent: Section.render\_markdown - -#### Signature - -```go -func (*Section) RenderMarkdown(level int, sectionNumber []int) string -``` - -#### Parameters - - - - - -#### Returns - -`string` - -#### Source - -[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) - -Line 196. - -*** - -### RenderXML - -RenderXML returns this section (and its subsections) as a chunk of XML. indent is the starting indent level (each level == 2 spaces). - -Python equivalent: Section.render\_xml - -#### Signature - -```go -func (*Section) RenderXML(indent int, sectionNumber []int) string -``` - -#### Parameters - - - - - -#### Returns - -`string` - -#### Source - -[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) - -Line 261. - -*** - -### ToMap - -ToMap returns the section as a map\[string]any with keys in canonical order (title, body, bullets, subsections, numbered, numberedBullets). Empty-or-zero fields are omitted to match Python's to\_dict behavior. - -The returned value is intended for JSON / YAML serialization; callers that need a plain Go map (and don't care about key order) can type-assert each value. - -Python equivalent: Section.to\_dict - -#### Signature - -```go -func (*Section) ToMap() map[string]any -``` - -#### Returns - -`map[string]any` - -#### Source - -[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) - -Line 136. - -## Source - -[`pkg/pom/pom.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/pom/pom.go) - -Line 47. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/amenity/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/amenity/index.mdx deleted file mode 100644 index 5f47f1b4db..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/amenity/index.mdx +++ /dev/null @@ -1,37 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/amenity" -title: "Amenity" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/prefabs.Amenity" - parent: "github.com/signalwire/signalwire-go/pkg/prefabs" - module: "github.com.signalwire.signalwire-go.pkg.prefabs" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/concierge.go" ---- -# `Amenity` - -Amenity describes a venue amenity with its hours, location, and extra details. - -## Signature - -```go -type Amenity struct -``` - -## Properties - - - - - - - -## Source - -[`pkg/prefabs/concierge.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/concierge.go) - -Line 16. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/bedrock-agent/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/bedrock-agent/index.mdx deleted file mode 100644 index 0fdf69411f..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/bedrock-agent/index.mdx +++ /dev/null @@ -1,183 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/bedrock-agent" -title: "BedrockAgent" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/prefabs.BedrockAgent" - parent: "github.com/signalwire/signalwire-go/pkg/prefabs" - module: "github.com.signalwire.signalwire-go.pkg.prefabs" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/bedrock.go" ---- -# `BedrockAgent` - -BedrockAgent wraps AgentBase and configures it to emit the "amazon\_bedrock" SWML verb instead of the standard "ai" verb. - -The voice\_id, temperature, and top\_p values are injected into the rendered prompt config (matching Python's \_add\_voice\_to\_prompt). Keys that are text-model-specific (barge\_confidence, presence\_penalty, frequency\_penalty) are removed from the prompt config because they do not apply to Bedrock's voice-to-voice model. - -## Signature - -```go -type BedrockAgent struct -``` - -## Properties - - - -## Methods - -### SetInferenceParams - -SetInferenceParams updates one or more Bedrock inference parameters. Pass zero-value pointers to leave a parameter unchanged. - -Python equivalent: BedrockAgent.set\_inference\_params - -#### Signature - -```go -func (*BedrockAgent) SetInferenceParams(temperature float64, topP float64, maxTokens int) -``` - -#### Parameters - - - - - - - -#### Source - -[`pkg/prefabs/bedrock.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/bedrock.go) - -Line 183. - -*** - -### SetLLMModel - -SetLLMModel logs a warning and does nothing. Bedrock uses a fixed voice-to-voice model, so overriding the model name is not meaningful. - -Python equivalent: BedrockAgent.set\_llm\_model - -#### Signature - -```go -func (*BedrockAgent) SetLLMModel(model string) -``` - -#### Parameters - - - -#### Source - -[`pkg/prefabs/bedrock.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/bedrock.go) - -Line 201. - -*** - -### SetLLMTemperature - -SetLLMTemperature is a convenience wrapper that delegates to SetInferenceParams. - -Python equivalent: BedrockAgent.set\_llm\_temperature - -#### Signature - -```go -func (*BedrockAgent) SetLLMTemperature(temperature float64) -``` - -#### Parameters - - - -#### Source - -[`pkg/prefabs/bedrock.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/bedrock.go) - -Line 209. - -*** - -### SetPostPromptLLMParams - -SetPostPromptLLMParams logs a warning and ignores the parameters. Bedrock's post-prompt summarisation uses OpenAI configured at the platform level (in the C code), so SDK-level overrides have no effect. The keys of params are listed in the warning so the caller can see what was ignored. - -Python equivalent: BedrockAgent.set\_post\_prompt\_llm\_params - -#### Signature - -```go -func (*BedrockAgent) SetPostPromptLLMParams(params map[string]any) -``` - -#### Parameters - - - -#### Source - -[`pkg/prefabs/bedrock.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/bedrock.go) - -Line 220. - -*** - -### SetPromptLLMParams - -SetPromptLLMParams logs a warning directing the caller to SetInferenceParams instead. The keys of params are listed in the warning so the caller can see what was ignored. - -Python equivalent: BedrockAgent.set\_prompt\_llm\_params - -#### Signature - -```go -func (*BedrockAgent) SetPromptLLMParams(params map[string]any) -``` - -#### Parameters - - - -#### Source - -[`pkg/prefabs/bedrock.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/bedrock.go) - -Line 237. - -*** - -### SetVoice - -SetVoice sets the Bedrock voice ID. - -Python equivalent: BedrockAgent.set\_voice - -#### Signature - -```go -func (*BedrockAgent) SetVoice(voiceID string) -``` - -#### Parameters - - - -#### Source - -[`pkg/prefabs/bedrock.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/bedrock.go) - -Line 174. - -## Source - -[`pkg/prefabs/bedrock.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/bedrock.go) - -Line 58. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/bedrock-options/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/bedrock-options/index.mdx deleted file mode 100644 index 7143e1cc76..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/bedrock-options/index.mdx +++ /dev/null @@ -1,65 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/bedrock-options" -title: "BedrockOptions" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/prefabs.BedrockOptions" - parent: "github.com/signalwire/signalwire-go/pkg/prefabs" - module: "github.com.signalwire.signalwire-go.pkg.prefabs" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/bedrock.go" ---- -# `BedrockOptions` - -BedrockOptions configures a new BedrockAgent. - -BedrockAgent is the Go equivalent of the Python BedrockAgent class. It extends the standard agent infrastructure but renders the SWML document with the "amazon\_bedrock" verb instead of the default "ai" verb. All standard AgentBase capabilities (prompt, SWAIG tools, skills, post-prompt, dynamic config, etc.) work unchanged. - -## Signature - -```go -type BedrockOptions struct -``` - -## Properties - - - AgentOptions are functional options forwarded to NewAgentBase. Use them to set host, port, auth credentials, etc. - - - - MaxTokens is the maximum number of tokens to generate. Defaults to 1024. - - - - Name is the agent name. Defaults to "bedrock\_agent". - - - - Route is the HTTP route for the agent. Defaults to "/bedrock". - - - - SystemPrompt is an optional initial system prompt. It can be overridden later via SetPromptText. - - - - Temperature is the generation temperature (0–1). Defaults to 0.7. - - - - TopP is the nucleus-sampling parameter (0–1). Defaults to 0.9. - - - - VoiceID is the Bedrock voice identifier. Defaults to "matthew". - - -## Source - -[`pkg/prefabs/bedrock.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/bedrock.go) - -Line 21. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/concierge-agent/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/concierge-agent/index.mdx deleted file mode 100644 index c3b53df376..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/concierge-agent/index.mdx +++ /dev/null @@ -1,33 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/concierge-agent" -title: "ConciergeAgent" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/prefabs.ConciergeAgent" - parent: "github.com/signalwire/signalwire-go/pkg/prefabs" - module: "github.com.signalwire.signalwire-go.pkg.prefabs" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/concierge.go" ---- -# `ConciergeAgent` - -ConciergeAgent acts as a virtual concierge for a venue, answering questions about amenities, services, hours, and directions. - -## Signature - -```go -type ConciergeAgent struct -``` - -## Properties - - - -## Source - -[`pkg/prefabs/concierge.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/concierge.go) - -Line 36. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/concierge-options/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/concierge-options/index.mdx deleted file mode 100644 index 89c562d5d1..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/concierge-options/index.mdx +++ /dev/null @@ -1,53 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/concierge-options" -title: "ConciergeOptions" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/prefabs.ConciergeOptions" - parent: "github.com/signalwire/signalwire-go/pkg/prefabs" - module: "github.com.signalwire.signalwire-go.pkg.prefabs" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/concierge.go" ---- -# `ConciergeOptions` - -ConciergeOptions configures a new ConciergeAgent. - -## Signature - -```go -type ConciergeOptions struct -``` - -## Properties - - - - - general hours of operation - - - - - - - - - - optional additional instructions appended to the default list - - - - - - optional static greeting spoken at the start of the call - - -## Source - -[`pkg/prefabs/concierge.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/concierge.go) - -Line 23. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/department/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/department/index.mdx deleted file mode 100644 index e4a2ada625..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/department/index.mdx +++ /dev/null @@ -1,47 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/department" -title: "Department" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/prefabs.Department" - parent: "github.com/signalwire/signalwire-go/pkg/prefabs" - module: "github.com.signalwire.signalwire-go.pkg.prefabs" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/receptionist.go" ---- -# `Department` - -Department describes a destination the receptionist can transfer to. - -## Signature - -```go -type Department struct -``` - -## Properties - - - what the department handles - - - - e.g. "sales" - - - - phone number or SWML transfer destination - - - - true if Number is a SWML destination (uses SwmlTransfer) - - -## Source - -[`pkg/prefabs/receptionist.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/receptionist.go) - -Line 15. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/faq-bot-agent/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/faq-bot-agent/index.mdx deleted file mode 100644 index 42fa220578..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/faq-bot-agent/index.mdx +++ /dev/null @@ -1,33 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/faq-bot-agent" -title: "FAQBotAgent" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/prefabs.FAQBotAgent" - parent: "github.com/signalwire/signalwire-go/pkg/prefabs" - module: "github.com.signalwire.signalwire-go.pkg.prefabs" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/faq_bot.go" ---- -# `FAQBotAgent` - -FAQBotAgent answers frequently asked questions by matching user queries against a provided FAQ database. - -## Signature - -```go -type FAQBotAgent struct -``` - -## Properties - - - -## Source - -[`pkg/prefabs/faq_bot.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/faq_bot.go) - -Line 38. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/faq-bot-options/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/faq-bot-options/index.mdx deleted file mode 100644 index b0f2b648f4..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/faq-bot-options/index.mdx +++ /dev/null @@ -1,47 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/faq-bot-options" -title: "FAQBotOptions" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/prefabs.FAQBotOptions" - parent: "github.com/signalwire/signalwire-go/pkg/prefabs" - module: "github.com.signalwire.signalwire-go.pkg.prefabs" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/faq_bot.go" ---- -# `FAQBotOptions` - -FAQBotOptions configures a new FAQBotAgent. - -## Signature - -```go -type FAQBotOptions struct -``` - -## Properties - - - AgentOptions holds additional functional options forwarded to NewAgentBase, matching the \*\*kwargs pass-through in the Python SDK. - - - - - - - - - - - - SuggestRelated controls whether the agent suggests related questions. Defaults to true when nil, matching the Python SDK default. - - -## Source - -[`pkg/prefabs/faq_bot.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/faq_bot.go) - -Line 23. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/faq/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/faq/index.mdx deleted file mode 100644 index df9351c5c4..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/faq/index.mdx +++ /dev/null @@ -1,37 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/faq" -title: "FAQ" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/prefabs.FAQ" - parent: "github.com/signalwire/signalwire-go/pkg/prefabs" - module: "github.com.signalwire.signalwire-go.pkg.prefabs" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/faq_bot.go" ---- -# `FAQ` - -FAQ represents a single frequently asked question and its answer. - -## Signature - -```go -type FAQ struct -``` - -## Properties - - - - - - - -## Source - -[`pkg/prefabs/faq_bot.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/faq_bot.go) - -Line 16. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/index.mdx deleted file mode 100644 index 6aa529acb6..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/index.mdx +++ /dev/null @@ -1,428 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs" -title: "prefabs" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "module" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/prefabs" - module: "github.com.signalwire.signalwire-go.pkg.prefabs" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/bedrock.go" ---- -# `prefabs` - -Package prefabs provides pre-built agent patterns that extend AgentBase with common conversational workflows such as information gathering, surveys, reception/routing, FAQ answering, and virtual concierge services. - -## Signature - -```go -package prefabs -``` - -## Classes - - - - Amenity describes a venue amenity with its hours, location, and extra details. - - - - BedrockAgent wraps AgentBase and configures it to emit the "amazon\_bedrock" SWML verb instead of the standard "ai" verb. - - - - BedrockOptions configures a new BedrockAgent. - - - - ConciergeAgent acts as a virtual concierge for a venue, answering questions about amenities, services, hours, and directions. - - - - ConciergeOptions configures a new ConciergeAgent. - - - - Department describes a destination the receptionist can transfer to. - - - - FAQ represents a single frequently asked question and its answer. - - - - FAQBotAgent answers frequently asked questions by matching user queries against a provided FAQ database. - - - - FAQBotOptions configures a new FAQBotAgent. - - - - InfoGathererAgent collects answers to a series of questions sequentially. Supports both static (questions provided at construction) and dynamic (questions determined per-request via SetQuestionCallback) modes. - - - - InfoGathererOptions configures a new InfoGathererAgent. Set Questions to nil to enable dynamic callback mode via SetQuestionCallback. - - - - Question describes a single question in an InfoGatherer sequence. - - - - ReceptionistAgent greets callers and routes them to the appropriate department. - - - - ReceptionistOptions configures a new ReceptionistAgent. - - - - SurveyAgent conducts structured surveys with typed questions. - - - - SurveyOptions configures a new SurveyAgent. - - - - SurveyQuestion describes a single question in a survey. - - - -## Functions - -### NewBedrockAgent - -NewBedrockAgent creates a BedrockAgent with Bedrock-specific SWML rendering. - -Python equivalent: BedrockAgent.**init** - -#### Signature - -```go -func NewBedrockAgent(opts BedrockOptions) *BedrockAgent -``` - -#### Parameters - - - -#### Returns - -`*BedrockAgent` - -#### Source - -[`pkg/prefabs/bedrock.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/bedrock.go) - -Line 75. - -*** - -### NewConciergeAgent - -NewConciergeAgent creates an agent that provides concierge services for a venue. - -#### Signature - -```go -func NewConciergeAgent(opts ConciergeOptions) *ConciergeAgent -``` - -#### Parameters - - - -#### Returns - -`*ConciergeAgent` - -#### Source - -[`pkg/prefabs/concierge.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/concierge.go) - -Line 49. - -*** - -### NewFAQBotAgent - -NewFAQBotAgent creates an agent that answers frequently asked questions. - -#### Signature - -```go -func NewFAQBotAgent(opts FAQBotOptions) *FAQBotAgent -``` - -#### Parameters - - - -#### Returns - -`*FAQBotAgent` - -#### Source - -[`pkg/prefabs/faq_bot.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/faq_bot.go) - -Line 49. - -*** - -### NewInfoGathererAgent - -NewInfoGathererAgent creates an agent that asks a series of questions and stores the answers in global data. Pass nil Questions to enable dynamic mode; call SetQuestionCallback on the returned agent to supply per-request questions. - -#### Signature - -```go -func NewInfoGathererAgent(opts InfoGathererOptions) *InfoGathererAgent -``` - -#### Parameters - - - -#### Returns - -`*InfoGathererAgent` - -#### Source - -[`pkg/prefabs/info_gatherer.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/info_gatherer.go) - -Line 49. - -*** - -### NewReceptionistAgent - -NewReceptionistAgent creates an agent that greets callers and transfers them to the appropriate department. - -#### Signature - -```go -func NewReceptionistAgent(opts ReceptionistOptions) *ReceptionistAgent -``` - -#### Parameters - - - -#### Returns - -`*ReceptionistAgent` - -#### Source - -[`pkg/prefabs/receptionist.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/receptionist.go) - -Line 43. - -*** - -### NewSurveyAgent - -NewSurveyAgent creates an agent that conducts a structured survey. - -#### Signature - -```go -func NewSurveyAgent(opts SurveyOptions) *SurveyAgent -``` - -#### Parameters - - - -#### Returns - -`*SurveyAgent` - -#### Source - -[`pkg/prefabs/survey.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/survey.go) - -Line 104. - -*** - -### NewSurveyQuestion - -NewSurveyQuestion constructs a SurveyQuestion with Required:true, matching Python SurveyAgent.\_validate\_questions which defaults required=True when unspecified. Callers opt out with WithOptional(). - -#### Signature - -```go -func NewSurveyQuestion(text string, opts ...SurveyQuestionOption) SurveyQuestion -``` - -#### Parameters - - - - - -#### Returns - -`SurveyQuestion` - -#### Source - -[`pkg/prefabs/survey.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/survey.go) - -Line 65. - -*** - -### WithOptional - -WithOptional marks a question as not required. Matches Python's required=False escape hatch on SurveyAgent questions. - -#### Signature - -```go -func WithOptional() SurveyQuestionOption -``` - -#### Returns - -`SurveyQuestionOption` - -#### Source - -[`pkg/prefabs/survey.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/survey.go) - -Line 58. - -*** - -### WithQuestionChoices - -WithQuestionChoices sets the choice list for multiple\_choice questions. - -#### Signature - -```go -func WithQuestionChoices(choices ...string) SurveyQuestionOption -``` - -#### Parameters - - - -#### Returns - -`SurveyQuestionOption` - -#### Source - -[`pkg/prefabs/survey.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/survey.go) - -Line 52. - -*** - -### WithQuestionID - -WithQuestionID sets the question ID. - -#### Signature - -```go -func WithQuestionID(id string) SurveyQuestionOption -``` - -#### Parameters - - - -#### Returns - -`SurveyQuestionOption` - -#### Source - -[`pkg/prefabs/survey.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/survey.go) - -Line 36. - -*** - -### WithQuestionScale - -WithQuestionScale sets the scale for rating questions (answers run 1..n). - -#### Signature - -```go -func WithQuestionScale(n int) SurveyQuestionOption -``` - -#### Parameters - - - -#### Returns - -`SurveyQuestionOption` - -#### Source - -[`pkg/prefabs/survey.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/survey.go) - -Line 47. - -*** - -### WithQuestionType - -WithQuestionType sets the question type ("rating", "multiple\_choice", "yes\_no", "open\_ended"). - -#### Signature - -```go -func WithQuestionType(t string) SurveyQuestionOption -``` - -#### Parameters - - - -#### Returns - -`SurveyQuestionOption` - -#### Source - -[`pkg/prefabs/survey.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/survey.go) - -Line 42. - -## Type Aliases - -### SurveyQuestionOption - -SurveyQuestionOption configures a question during construction. - -#### Signature - -```go -type SurveyQuestionOption alias -``` - -#### Source - -[`pkg/prefabs/survey.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/survey.go) - -Line 33. - -## Source - -[`pkg/prefabs/bedrock.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/bedrock.go) diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/info-gatherer-agent/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/info-gatherer-agent/index.mdx deleted file mode 100644 index 67d51b7cb1..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/info-gatherer-agent/index.mdx +++ /dev/null @@ -1,96 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/info-gatherer-agent" -title: "InfoGathererAgent" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/prefabs.InfoGathererAgent" - parent: "github.com/signalwire/signalwire-go/pkg/prefabs" - module: "github.com.signalwire.signalwire-go.pkg.prefabs" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/info_gatherer.go" ---- -# `InfoGathererAgent` - -InfoGathererAgent collects answers to a series of questions sequentially. Supports both static (questions provided at construction) and dynamic (questions determined per-request via SetQuestionCallback) modes. - -## Signature - -```go -type InfoGathererAgent struct -``` - -## Properties - - - -## Methods - -### SetQuestionCallback - -SetQuestionCallback registers a per-request callback that returns the list of questions to ask. Calling this method enables dynamic mode: on each SWML request the callback is invoked with the request's query parameters, body parameters, and headers; the returned \[]Question becomes the session's question list. This mirrors Python's InfoGathererAgent.set\_question\_callback. - -If Questions was set to nil in InfoGathererOptions (dynamic mode), a fallback question set is used when no callback is registered. - -Example: - -``` -ig.SetQuestionCallback(func(query, body map[string]any, headers map[string]string) []Question { - if body["department"] == "support" { - return []Question{{KeyName: "issue", QuestionText: "What is the issue?"}} - } - return []Question{{KeyName: "name", QuestionText: "What is your name?"}} -}) -``` - -#### Signature - -```go -func (*InfoGathererAgent) SetQuestionCallback( - cb func(queryParams map[string]string, bodyParams map[string]any, headers map[string]string) []Question -) -``` - -#### Parameters - - - -#### Examples - - - - ```go - ig.SetQuestionCallback(func(query, body map[string]any, headers map[string]string) []Question { - if body["department"] == "support" { - return []Question{{KeyName: "issue", QuestionText: "What is the issue?"}} - } - return []Question{{KeyName: "name", QuestionText: "What is your name?"}} - }) - ``` - - - - ```go - ig.SetQuestionCallback(func(query, body map[string]any, headers map[string]string) []Question { - if body["department"] == "support" { - return []Question{{KeyName: "issue", QuestionText: "What is the issue?"}} - } - return []Question{{KeyName: "name", QuestionText: "What is your name?"}} - }) - ``` - - - -#### Source - -[`pkg/prefabs/info_gatherer.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/info_gatherer.go) - -Line 135. - -## Source - -[`pkg/prefabs/info_gatherer.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/info_gatherer.go) - -Line 36. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/info-gatherer-options/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/info-gatherer-options/index.mdx deleted file mode 100644 index e6fc3999b2..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/info-gatherer-options/index.mdx +++ /dev/null @@ -1,39 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/info-gatherer-options" -title: "InfoGathererOptions" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/prefabs.InfoGathererOptions" - parent: "github.com/signalwire/signalwire-go/pkg/prefabs" - module: "github.com.signalwire.signalwire-go.pkg.prefabs" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/info_gatherer.go" ---- -# `InfoGathererOptions` - -InfoGathererOptions configures a new InfoGathererAgent. Set Questions to nil to enable dynamic callback mode via SetQuestionCallback. - -## Signature - -```go -type InfoGathererOptions struct -``` - -## Properties - - - - - nil enables dynamic callback mode; non-nil is static mode - - - - -## Source - -[`pkg/prefabs/info_gatherer.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/info_gatherer.go) - -Line 27. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/question/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/question/index.mdx deleted file mode 100644 index 795dab5e05..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/question/index.mdx +++ /dev/null @@ -1,43 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/question" -title: "Question" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/prefabs.Question" - parent: "github.com/signalwire/signalwire-go/pkg/prefabs" - module: "github.com.signalwire.signalwire-go.pkg.prefabs" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/info_gatherer.go" ---- -# `Question` - -Question describes a single question in an InfoGatherer sequence. - -## Signature - -```go -type Question struct -``` - -## Properties - - - if true the agent will confirm before accepting - - - - identifier used to store the answer - - - - the question to ask the user - - -## Source - -[`pkg/prefabs/info_gatherer.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/info_gatherer.go) - -Line 19. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/receptionist-agent/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/receptionist-agent/index.mdx deleted file mode 100644 index c81ff12ade..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/receptionist-agent/index.mdx +++ /dev/null @@ -1,33 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/receptionist-agent" -title: "ReceptionistAgent" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/prefabs.ReceptionistAgent" - parent: "github.com/signalwire/signalwire-go/pkg/prefabs" - module: "github.com.signalwire.signalwire-go.pkg.prefabs" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/receptionist.go" ---- -# `ReceptionistAgent` - -ReceptionistAgent greets callers and routes them to the appropriate department. - -## Signature - -```go -type ReceptionistAgent struct -``` - -## Properties - - - -## Source - -[`pkg/prefabs/receptionist.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/receptionist.go) - -Line 32. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/receptionist-options/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/receptionist-options/index.mdx deleted file mode 100644 index 0bb3bfbde4..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/receptionist-options/index.mdx +++ /dev/null @@ -1,43 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/receptionist-options" -title: "ReceptionistOptions" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/prefabs.ReceptionistOptions" - parent: "github.com/signalwire/signalwire-go/pkg/prefabs" - module: "github.com.signalwire.signalwire-go.pkg.prefabs" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/receptionist.go" ---- -# `ReceptionistOptions` - -ReceptionistOptions configures a new ReceptionistAgent. - -## Signature - -```go -type ReceptionistOptions struct -``` - -## Properties - - - - - - - - - - - Voice ID for TTS (default: "rime.spore") - - -## Source - -[`pkg/prefabs/receptionist.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/receptionist.go) - -Line 23. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/survey-agent/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/survey-agent/index.mdx deleted file mode 100644 index 3bc3655ec5..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/survey-agent/index.mdx +++ /dev/null @@ -1,33 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/survey-agent" -title: "SurveyAgent" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/prefabs.SurveyAgent" - parent: "github.com/signalwire/signalwire-go/pkg/prefabs" - module: "github.com.signalwire.signalwire-go.pkg.prefabs" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/survey.go" ---- -# `SurveyAgent` - -SurveyAgent conducts structured surveys with typed questions. - -## Signature - -```go -type SurveyAgent struct -``` - -## Properties - - - -## Source - -[`pkg/prefabs/survey.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/survey.go) - -Line 89. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/survey-options/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/survey-options/index.mdx deleted file mode 100644 index 9a65bdb979..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/survey-options/index.mdx +++ /dev/null @@ -1,47 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/survey-options" -title: "SurveyOptions" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/prefabs.SurveyOptions" - parent: "github.com/signalwire/signalwire-go/pkg/prefabs" - module: "github.com.signalwire.signalwire-go.pkg.prefabs" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/survey.go" ---- -# `SurveyOptions` - -SurveyOptions configures a new SurveyAgent. - -## Signature - -```go -type SurveyOptions struct -``` - -## Properties - - - - - - - - - - - - - - - - - -## Source - -[`pkg/prefabs/survey.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/survey.go) - -Line 77. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/survey-question/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/survey-question/index.mdx deleted file mode 100644 index d1ac512c20..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/survey-question/index.mdx +++ /dev/null @@ -1,57 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs/survey-question" -title: "SurveyQuestion" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/prefabs.SurveyQuestion" - parent: "github.com/signalwire/signalwire-go/pkg/prefabs" - module: "github.com.signalwire.signalwire-go.pkg.prefabs" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/survey.go" ---- -# `SurveyQuestion` - -SurveyQuestion describes a single question in a survey. - -Prefer NewSurveyQuestion for construction — it defaults Required:true to match Python SurveyAgent behavior (signalwire/prefabs/survey.py \_validate\_questions sets required=True when unspecified). Struct literals are still supported, but the Go zero value for Required is false, which diverges from Python. - -## Signature - -```go -type SurveyQuestion struct -``` - -## Properties - - - options for multiple\_choice questions - - - - unique question identifier - - - - whether a non-empty answer is required — Python default true - - - - 1..Scale for rating questions (default 5) - - - - the question to ask - - - - "rating", "multiple\_choice", "yes\_no", "open\_ended" - - -## Source - -[`pkg/prefabs/survey.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/prefabs/survey.go) - -Line 23. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/action/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/action/index.mdx deleted file mode 100644 index 7a65371460..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/action/index.mdx +++ /dev/null @@ -1,165 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/action" -title: "Action" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.Action" - parent: "github.com/signalwire/signalwire-go/pkg/relay" - module: "github.com.signalwire.signalwire-go.pkg.relay" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go" ---- -# `Action` - -Action represents a long-running operation on a call, such as playing audio, recording, or collecting input. Callers can Wait for completion, check status, or register a completion callback. - -## Signature - -```go -type Action struct -``` - -## Methods - -### Completed - -Completed returns whether the action finished. - -#### Signature - -```go -func (*Action) Completed() bool -``` - -#### Returns - -`bool` - -#### Source - -[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) - -Line 93. - -*** - -### ControlID - -ControlID returns the control identifier for this action. - -#### Signature - -```go -func (*Action) ControlID() string -``` - -#### Returns - -`string` - -#### Source - -[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) - -Line 62. - -*** - -### IsDone - -IsDone returns true if the action has completed. - -#### Signature - -```go -func (*Action) IsDone() bool -``` - -#### Returns - -`bool` - -#### Source - -[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) - -Line 79. - -*** - -### OnCompleted - -OnCompleted registers a callback invoked when the action completes. - -#### Signature - -```go -func (*Action) OnCompleted(fn func(*RelayEvent)) -``` - -#### Parameters - - - -#### Source - -[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) - -Line 98. - -*** - -### Result - -Result returns the final event that resolved this action, or nil if pending. - -#### Signature - -```go -func (*Action) Result() *RelayEvent -``` - -#### Returns - -`*RelayEvent` - -#### Source - -[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) - -Line 86. - -*** - -### Wait - -Wait blocks until the action completes or the context is cancelled. - -#### Signature - -```go -func (*Action) Wait(ctx context.Context) (*RelayEvent, error) -``` - -#### Parameters - - - -#### Returns - -`(*RelayEvent, error)` - -#### Source - -[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) - -Line 67. - -## Source - -[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) - -Line 12. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/ai-action/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/ai-action/index.mdx deleted file mode 100644 index 9baa060c7f..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/ai-action/index.mdx +++ /dev/null @@ -1,55 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/ai-action" -title: "AIAction" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.AIAction" - parent: "github.com/signalwire/signalwire-go/pkg/relay" - module: "github.com.signalwire.signalwire-go.pkg.relay" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go" ---- -# `AIAction` - -AIAction represents a long-running AI operation on a call. - -## Signature - -```go -type AIAction struct -``` - -## Properties - - - -## Methods - -### Stop - -Stop sends calling.ai.stop to halt the active AI session. - -#### Signature - -```go -func (*AIAction) Stop() error -``` - -#### Returns - -`error` - -#### Source - -[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) - -Line 533. - -## Source - -[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) - -Line 521. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/ai-event/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/ai-event/index.mdx deleted file mode 100644 index 62bd5a3e1f..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/ai-event/index.mdx +++ /dev/null @@ -1,39 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/ai-event" -title: "AIEvent" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.AIEvent" - parent: "github.com/signalwire/signalwire-go/pkg/relay" - module: "github.com.signalwire.signalwire-go.pkg.relay" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" ---- -# `AIEvent` - -AIEvent represents a calling.call.ai event. - -## Signature - -```go -type AIEvent struct -``` - -## Properties - - - - - - - - - -## Source - -[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) - -Line 817. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/call-receive-event/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/call-receive-event/index.mdx deleted file mode 100644 index bfc7b9fd94..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/call-receive-event/index.mdx +++ /dev/null @@ -1,51 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/call-receive-event" -title: "CallReceiveEvent" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.CallReceiveEvent" - parent: "github.com/signalwire/signalwire-go/pkg/relay" - module: "github.com.signalwire.signalwire-go.pkg.relay" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" ---- -# `CallReceiveEvent` - -CallReceiveEvent represents a calling.call.receive event for inbound calls. - -## Signature - -```go -type CallReceiveEvent struct -``` - -## Properties - - - - - - - - - - - - - - - - - - - - - -## Source - -[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) - -Line 226. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/call-state-event/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/call-state-event/index.mdx deleted file mode 100644 index c8f25d0355..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/call-state-event/index.mdx +++ /dev/null @@ -1,47 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/call-state-event" -title: "CallStateEvent" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.CallStateEvent" - parent: "github.com/signalwire/signalwire-go/pkg/relay" - module: "github.com.signalwire.signalwire-go.pkg.relay" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" ---- -# `CallStateEvent` - -CallStateEvent represents a calling.call.state event. - -## Signature - -```go -type CallStateEvent struct -``` - -## Properties - - - - - - - - - - - - - - - - - -## Source - -[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) - -Line 199. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/call/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/call/index.mdx deleted file mode 100644 index 0d651780c8..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/call/index.mdx +++ /dev/null @@ -1,1819 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/call" -title: "Call" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.Call" - parent: "github.com/signalwire/signalwire-go/pkg/relay" - module: "github.com.signalwire.signalwire-go.pkg.relay" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go" ---- -# `Call` - -Call represents an active voice call managed through the RELAY client. It exposes methods for every calling operation supported by SignalWire, grouped into logical categories: lifecycle, audio, recording, bridging, DTMF, detection, fax, tap, streaming, conferencing, AI, hold/denoise, room/queue, pay, and transcription. - -## Signature - -```go -type Call struct -``` - -## Methods - -### AI - -AI starts an AI session on the call. Use WithAIControlID for an explicit control\_id (matches Python's ai(control\_id=...)). - -#### Signature - -```go -func (*Call) AI(opts ...AIOption) *AIAction -``` - -#### Parameters - - - -#### Returns - -`*AIAction` - -#### Source - -[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) - -Line 1178. - -*** - -### AIHold - -AIHold places the AI-controlled call on hold. controlID, timeout and prompt are all optional — pass "" to omit any of them, matching Python's ai\_hold(\*, timeout: Optional\[str] = None, prompt: Optional\[str] = None) which has no control\_id parameter and only writes keys conditionally. - -#### Signature - -```go -func (*Call) AIHold(controlID string, timeout string, prompt string) error -``` - -#### Parameters - - - - - - - -#### Returns - -`error` - -#### Source - -[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) - -Line 1249. - -*** - -### AIMessage - -AIMessage sends a text message within an active AI session. All parameters are optional, matching Python's ai\_message(\*, message\_text=None, role=None, reset=None, global\_data=None). Pass "" for controlID/text/role and nil for reset/globalData to omit them from the wire payload (Python omits the key entirely when the argument is None). - -#### Signature - -```go -func (*Call) AIMessage( - controlID string, - text string, - role string, - reset map[string]any, - globalData map[string]any -) error -``` - -#### Parameters - - - - - - - - - - - -#### Returns - -`error` - -#### Source - -[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) - -Line 1221. - -*** - -### AIUnhold - -AIUnhold removes the call from AI hold. controlID and prompt are both optional — pass "" to omit either, matching Python's ai\_unhold(\*, prompt: Optional\[str] = None) which has no control\_id parameter and only writes keys conditionally. - -#### Signature - -```go -func (*Call) AIUnhold(controlID string, prompt string) error -``` - -#### Parameters - - - - - -#### Returns - -`error` - -#### Source - -[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) - -Line 1271. - -*** - -### AmazonBedrock - -AmazonBedrock starts an AI session using Amazon Bedrock. - -#### Signature - -```go -func (*Call) AmazonBedrock(opts ...AIOption) *AIAction -``` - -#### Parameters - - - -#### Returns - -`*AIAction` - -#### Source - -[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) - -Line 1211. - -*** - -### Answer - -Answer answers an inbound call. - -#### Signature - -```go -func (*Call) Answer() error -``` - -#### Returns - -`error` - -#### Source - -[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) - -Line 320. - -*** - -### BindDigit - -BindDigit binds a DTMF digit sequence to trigger a RELAY method. bindParams, realm, and maxTriggers are optional (nil/zero-value omits them), matching Python's bind\_digit(digits, bind\_method, \*, bind\_params, realm, max\_triggers). - -#### Signature - -```go -func (*Call) BindDigit( - digits string, - method string, - bindParams map[string]any, - realm string, - maxTriggers int -) error -``` - -#### Parameters - - - - - - - - - - - -#### Returns - -`error` - -#### Source - -[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) - -Line 1400. - -*** - -### CallID - -CallID returns the unique call identifier assigned by the server. - -#### Signature - -```go -func (*Call) CallID() string -``` - -#### Returns - -`string` - -#### Source - -[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) - -Line 55. - -*** - -### CallState - -CallState returns the current call state as a typed CallState ALONGSIDE the bare-string State() accessor (kept for parity with the Python reference). The typed kind gives callers IsTerminal()/IsKnown() predicates and compile-time distinctness from DialState/MessageState; its underlying string equals State() exactly. Additive port idiom — see states.go and PORT\_ADDITIONS.md. - -#### Signature - -```go -func (*Call) CallState() CallState -``` - -#### Returns - -`CallState` - -#### Source - -[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) - -Line 76. - -*** - -### ClearDigitBindings - -ClearDigitBindings clears all DTMF digit bindings, optionally filtered by realm. Pass an empty string to clear all realms (matches Python's clear\_digit\_bindings(\*, realm)). - -#### Signature - -```go -func (*Call) ClearDigitBindings(realm string) error -``` - -#### Parameters - - - -#### Returns - -`error` - -#### Source - -[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) - -Line 1423. - -*** - -### Collect - -Collect starts collecting user input without playing media. The params argument exposes named fields that mirror Python's collect() parameters at relay/call.py:565. Pass a nil CollectParams to send an empty collect body. - -Wire shape (matches Python): - -``` -{"node_id":..., "call_id":..., "control_id":..., "digits":..., "speech":..., ...} -``` - -#### Signature - -```go -func (*Call) Collect(params *CollectParams) *StandaloneCollectAction -``` - -#### Parameters - - - -#### Returns - -`*StandaloneCollectAction` - -#### Examples - - - - ```go - {"node_id":..., "call_id":..., "control_id":..., "digits":..., "speech":..., ...} - ``` - - - - ```go - {"node_id":..., "call_id":..., "control_id":..., "digits":..., "speech":..., ...} - ``` - - - -#### Source - -[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) - -Line 558. - -*** - -### Connect - -Connect bridges this call to one or more devices. - -#### Signature - -```go -func (*Call) Connect(devices [][]map[string]any, opts ...ConnectOption) error -``` - -#### Parameters - - - - - -#### Returns - -`error` - -#### Source - -[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) - -Line 906. - -*** - -### Context - -Context returns the RELAY context this call was received on. - -#### Signature - -```go -func (*Call) Context() string -``` - -#### Returns - -`string` - -#### Source - -[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) - -Line 90. - -*** - -### Denoise - -Denoise starts noise reduction on the call. - -#### Signature - -```go -func (*Call) Denoise() error -``` - -#### Returns - -`error` - -#### Source - -[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) - -Line 1309. - -*** - -### DenoiseStop - -DenoiseStop stops noise reduction on the call. - -#### Signature - -```go -func (*Call) DenoiseStop() error -``` - -#### Returns - -`error` - -#### Source - -[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) - -Line 1318. - -*** - -### Detect - -Detect starts a detection operation (e.g., answering machine detection). timeout is optional; pass nil to omit it from the request (matches Python's optional float timeout parameter). - -controlID is optional — pass "" to auto-generate. Matches Python's detect(\*, control\_id=None) at relay/call.py:654. - -#### Signature - -```go -func (*Call) Detect(detect map[string]any, timeout *float64, controlID ...string) *DetectAction -``` - -#### Parameters - - - - - - - -#### Returns - -`*DetectAction` - -#### Source - -[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) - -Line 954. - -*** - -### DetectAnsweringMachine - -DetectAnsweringMachine detects human vs answering machine (AMD). Typed convenience over Detect, mirroring Python's call.detect\_answering\_machine(\*, initial\_timeout, end\_silence\_timeout, machine\_voice\_threshold, machine\_words\_threshold, detect\_interruptions, detect\_message\_end, timeout). Only the options the caller supplies are emitted under params, matching Python's only-provided-keys behavior. - -Wire shape: detect \{"type":"machine","params":\{...only-provided...\}\} with an optional top-level timeout. - -#### Signature - -```go -func (*Call) DetectAnsweringMachine(opts ...AMDOption) *DetectAction -``` - -#### Parameters - - - -#### Returns - -`*DetectAction` - -#### Source - -[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) - -Line 732. - -*** - -### DetectDigit - -DetectDigit detects DTMF digits. Typed convenience over Detect, mirroring Python's call.detect\_digit(\*, digits, timeout). - -Wire shape: detect \{"type":"digit","params":\{digits?\}\} with an optional top-level timeout. - -#### Signature - -```go -func (*Call) DetectDigit(opts ...DetectDigitOption) *DetectAction -``` - -#### Parameters - - - -#### Returns - -`*DetectAction` - -#### Source - -[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) - -Line 706. - -*** - -### DetectFax - -DetectFax detects a fax tone (CED/CNG). Typed convenience over Detect, mirroring Python's call.detect\_fax(\*, tone, timeout). - -Wire shape: detect \{"type":"fax","params":\{tone?\}\} with an optional top-level timeout. - -#### Signature - -```go -func (*Call) DetectFax(opts ...DetectFaxOption) *DetectAction -``` - -#### Parameters - - - -#### Returns - -`*DetectAction` - -#### Source - -[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) - -Line 759. - -*** - -### Device - -Device returns the device map describing the endpoint of this call. - -#### Signature - -```go -func (*Call) Device() map[string]any -``` - -#### Returns - -`map[string]any` - -#### Source - -[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) - -Line 104. - -*** - -### Direction - -Direction returns the call direction ("inbound" or "outbound"). - -#### Signature - -```go -func (*Call) Direction() string -``` - -#### Returns - -`string` - -#### Source - -[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) - -Line 97. - -*** - -### Disconnect - -Disconnect tears down a previously established bridge. - -#### Signature - -```go -func (*Call) Disconnect() error -``` - -#### Returns - -`error` - -#### Source - -[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) - -Line 920. - -*** - -### Echo - -Echo starts echo mode on the call (echo audio back to the caller). Both timeout and statusURL are optional (nil omits them), matching Python's echo(\*, timeout: float|None, status\_url). - -#### Signature - -```go -func (*Call) Echo(timeout *float64, statusURL string) error -``` - -#### Parameters - - - - - -#### Returns - -`error` - -#### Source - -[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) - -Line 1461. - -*** - -### Hangup - -Hangup ends the call with the given reason. - -#### Signature - -```go -func (*Call) Hangup(reason string) error -``` - -#### Parameters - - - -#### Returns - -`error` - -#### Source - -[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) - -Line 329. - -*** - -### Hold - -Hold places the call on hold. - -#### Signature - -```go -func (*Call) Hold() error -``` - -#### Returns - -`error` - -#### Source - -[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) - -Line 1291. - -*** - -### JoinConference - -JoinConference joins the call to a named conference. - -#### Signature - -```go -func (*Call) JoinConference(name string, opts ...ConferenceOption) error -``` - -#### Parameters - - - - - -#### Returns - -`error` - -#### Source - -[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) - -Line 1149. - -*** - -### JoinRoom - -JoinRoom joins the call to a named room. statusURL is optional (empty string omits it), matching Python's join\_room(name, \*, status\_url). - -#### Signature - -```go -func (*Call) JoinRoom(name string, statusURL string) error -``` - -#### Parameters - - - - - -#### Returns - -`error` - -#### Source - -[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) - -Line 1332. - -*** - -### LeaveConference - -LeaveConference removes the call from a conference. - -#### Signature - -```go -func (*Call) LeaveConference(confID string) error -``` - -#### Parameters - - - -#### Returns - -`error` - -#### Source - -[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) - -Line 1163. - -*** - -### LeaveRoom - -LeaveRoom removes the call from the current room. - -#### Signature - -```go -func (*Call) LeaveRoom() error -``` - -#### Returns - -`error` - -#### Source - -[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) - -Line 1346. - -*** - -### LiveTranscribe - -LiveTranscribe starts or stops live transcription on the call. The action map describes the transcription operation (e.g. \{"type": "start"\}). Matches Python's live\_transcribe(action, \*\*kwargs). - -#### Signature - -```go -func (*Call) LiveTranscribe(action map[string]any) error -``` - -#### Parameters - - - -#### Returns - -`error` - -#### Source - -[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) - -Line 389. - -*** - -### LiveTranslate - -LiveTranslate starts or stops live translation on the call. The action map describes the translation operation. statusURL is optional (empty string omits it), matching Python's live\_translate(action, \*, status\_url). - -#### Signature - -```go -func (*Call) LiveTranslate(action map[string]any, statusURL string) error -``` - -#### Parameters - - - - - -#### Returns - -`error` - -#### Source - -[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) - -Line 401. - -*** - -### NodeID - -NodeID returns the node handling this call. - -#### Signature - -```go -func (*Call) NodeID() string -``` - -#### Returns - -`string` - -#### Source - -[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) - -Line 58. - -*** - -### On - -On registers a handler for a specific event type on this call. - -#### Signature - -```go -func (*Call) On(eventType string, handler func(*RelayEvent)) -``` - -#### Parameters - - - - - -#### Source - -[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) - -Line 122. - -*** - -### Pass - -Pass passes the call to the next context handler without answering. - -#### Signature - -```go -func (*Call) Pass() error -``` - -#### Returns - -`error` - -#### Source - -[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) - -Line 342. - -*** - -### Pay - -Pay starts a payment collection session on the call. Use PayOption functional options to supply any of the 20+ optional parameters that Python's pay() exposes (input\_method, status\_url, payment\_method, timeout, max\_attempts, security\_code, postal\_code, min\_postal\_code\_length, token\_type, charge\_amount, currency, language, voice, description, valid\_card\_types, parameters, prompts). - -Use WithPayControlID for an explicit control\_id (matches Python's pay(control\_id=...)). - -#### Signature - -```go -func (*Call) Pay(connectorURL string, opts ...PayOption) *PayAction -``` - -#### Parameters - - - - - -#### Returns - -`*PayAction` - -#### Source - -[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) - -Line 1489. - -*** - -### Play - -Play starts playing media on the call and returns a PlayAction. - -Use WithPlayControlID to supply an explicit control\_id (mirrors Python's play(control\_id=...)). When omitted the SDK auto-generates a UUID — same as Python's `cid = control_id or str(uuid.uuid4())` at relay/call.py:506. - -#### Signature - -```go -func (*Call) Play(media []map[string]any, opts ...PlayOption) *PlayAction -``` - -#### Parameters - - - - - -#### Returns - -`*PlayAction` - -#### Source - -[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) - -Line 424. - -*** - -### PlayAndCollect - -PlayAndCollect plays media while collecting input (DTMF or speech). - -Honors WithPlayControlID for an explicit control\_id (mirrors Python's play\_and\_collect(control\_id=...)). Note the gotcha at RELAY\_IMPLEMENTATION\_GUIDE.md: this action listens on the calling.call.collect terminal event, NOT calling.call.play(finished). - -#### Signature - -```go -func (*Call) PlayAndCollect( - media []map[string]any, - collect map[string]any, - opts ...PlayOption -) *CollectAction -``` - -#### Parameters - - - - - - - -#### Returns - -`*CollectAction` - -#### Source - -[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) - -Line 478. - -*** - -### PlayAudio - -PlayAudio plays an audio file from a URL. Typed convenience over Play, mirroring Python's call.play\_audio(url, \*, volume). - -Wire shape: play \[\{"type":"audio","params":\{"url":...\}\}] with an optional top-level volume. - -#### Signature - -```go -func (*Call) PlayAudio(url string, opts ...AudioOption) *PlayAction -``` - -#### Parameters - - - - - -#### Returns - -`*PlayAction` - -#### Source - -[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) - -Line 657. - -*** - -### PlayRingtone - -PlayRingtone plays a named ringtone by country code. Typed convenience over Play, mirroring Python's call.play\_ringtone(name, \*, duration, volume). - -Wire shape: play \[\{"type":"ringtone","params":\{"name":..., duration?\}\}] with an optional top-level volume. - -#### Signature - -```go -func (*Call) PlayRingtone(name string, opts ...RingtoneOption) *PlayAction -``` - -#### Parameters - - - - - -#### Returns - -`*PlayAction` - -#### Source - -[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) - -Line 684. - -*** - -### PlaySilence - -PlaySilence plays silence for duration seconds. Typed convenience over Play, mirroring Python's call.play\_silence(duration). - -Wire shape: play \[\{"type":"silence","params":\{"duration":...\}\}]. - -#### Signature - -```go -func (*Call) PlaySilence(duration float64) *PlayAction -``` - -#### Parameters - - - -#### Returns - -`*PlayAction` - -#### Source - -[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) - -Line 674. - -*** - -### PlayTTS - -PlayTTS plays text-to-speech. Typed convenience over Play, mirroring Python's call.play\_tts(text, \*, language, gender, voice, volume). - -Wire shape: play \[\{"type":"tts","params":\{"text":..., language?, gender?, voice?\}\}] with an optional top-level volume. - -#### Signature - -```go -func (*Call) PlayTTS(text string, opts ...TTSOption) *PlayAction -``` - -#### Parameters - - - - - -#### Returns - -`*PlayAction` - -#### Source - -[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) - -Line 629. - -*** - -### ProjectID - -ProjectID returns the project ID associated with this call. - -#### Signature - -```go -func (*Call) ProjectID() string -``` - -#### Returns - -`string` - -#### Source - -[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) - -Line 83. - -*** - -### PromptAudio - -PromptAudio plays an audio file then collects input. Typed media over PlayAndCollect, mirroring Python's call.prompt\_audio(url, collect, \*, volume). - -Wire shape: play\_and\_collect \[\{"type":"audio","params":\{"url":...\}\}] with the given collect object and an optional top-level volume. - -#### Signature - -```go -func (*Call) PromptAudio(url string, collect map[string]any, opts ...AudioOption) *CollectAction -``` - -#### Parameters - - - - - - - -#### Returns - -`*CollectAction` - -#### Source - -[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) - -Line 812. - -*** - -### PromptTTS - -PromptTTS plays TTS then collects input. Typed media over PlayAndCollect, mirroring Python's call.prompt\_tts(text, collect, \*, language, gender, voice, volume). - -Wire shape: play\_and\_collect \[\{"type":"tts","params":\{"text":..., language?, gender?, voice?\}\}] with the given collect object and an optional top-level volume. - -#### Signature - -```go -func (*Call) PromptTTS(text string, collect map[string]any, opts ...TTSOption) *CollectAction -``` - -#### Parameters - - - - - - - -#### Returns - -`*CollectAction` - -#### Source - -[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) - -Line 783. - -*** - -### QueueEnter - -QueueEnter places the call in a named queue. statusURL is optional (empty string omits it), matching Python's queue\_enter(queue\_name, \*, control\_id, status\_url) at signalwire/relay/call.py:1268. A per-request control\_id is generated so the server can correlate this action with subsequent events. - -#### Signature - -```go -func (*Call) QueueEnter(name string, statusURL string) error -``` - -#### Parameters - - - - - -#### Returns - -`error` - -#### Source - -[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) - -Line 1358. - -*** - -### QueueLeave - -QueueLeave removes the call from the named queue. queueID and statusURL are optional (empty string omits each), matching Python's queue\_leave(queue\_name, \*, control\_id, queue\_id, status\_url) at signalwire/relay/call.py:1287. A per-request control\_id is generated. - -#### Signature - -```go -func (*Call) QueueLeave(name string, queueID string, statusURL string) error -``` - -#### Parameters - - - - - - - -#### Returns - -`error` - -#### Source - -[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) - -Line 1376. - -*** - -### ReceiveFax - -ReceiveFax starts receiving a fax on the call. Use WithFaxControlID to supply an explicit control\_id. - -#### Signature - -```go -func (*Call) ReceiveFax(opts ...FaxOption) *FaxAction -``` - -#### Parameters - - - -#### Returns - -`*FaxAction` - -#### Source - -[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) - -Line 1032. - -*** - -### Record - -Record starts recording the call and returns a RecordAction. - -Use WithRecordAudio to supply the audio config map (Python's record(audio=...)) and WithRecordControlID to fix the control\_id. Other RecordOption helpers set top-level fields directly (e.g. WithRecordBeep, WithRecordFormat); these are folded into the "record": \{"audio": \{...\}\} object on transmit so the wire shape matches Python: \{"record": \{"audio": \{...\}\}\}. - -#### Signature - -```go -func (*Call) Record(opts ...RecordOption) *RecordAction -``` - -#### Parameters - - - -#### Returns - -`*RecordAction` - -#### Source - -[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) - -Line 837. - -*** - -### Refer - -Refer transfers a SIP call to an external SIP endpoint via a REFER request. statusURL is optional (empty string omits it), matching Python's refer(device, \*, status\_url). - -#### Signature - -```go -func (*Call) Refer(device map[string]any, statusURL string) error -``` - -#### Parameters - - - - - -#### Returns - -`error` - -#### Source - -[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) - -Line 369. - -*** - -### SegmentID - -SegmentID returns the segment identifier for this call leg. - -#### Signature - -```go -func (*Call) SegmentID() string -``` - -#### Returns - -`string` - -#### Source - -[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) - -Line 111. - -*** - -### SendDigits - -SendDigits sends DTMF digits on the call. - -#### Signature - -```go -func (*Call) SendDigits(digits string) error -``` - -#### Parameters - - - -#### Returns - -`error` - -#### Source - -[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) - -Line 933. - -*** - -### SendFax - -SendFax sends a fax document on the call. Use WithFaxHeaderInfo for the fax header string and WithFaxControlID for an explicit control\_id. - -#### Signature - -```go -func (*Call) SendFax(document string, identity string, opts ...FaxOption) *FaxAction -``` - -#### Parameters - - - - - - - -#### Returns - -`*FaxAction` - -#### Source - -[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) - -Line 994. - -*** - -### State - -State returns the current call state. - -#### Signature - -```go -func (*Call) State() string -``` - -#### Returns - -`string` - -#### Source - -[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) - -Line 64. - -*** - -### Stream - -Stream starts streaming call audio to a WebSocket URL. Use WithStreamControlID for an explicit control\_id (matches Python's stream(control\_id=...)). - -#### Signature - -```go -func (*Call) Stream(url string, opts ...StreamOption) *StreamAction -``` - -#### Parameters - - - - - -#### Returns - -`*StreamAction` - -#### Source - -[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) - -Line 1111. - -*** - -### String - -String returns a human-readable representation of the call. - -#### Signature - -```go -func (*Call) String() string -``` - -#### Returns - -`string` - -#### Source - -[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) - -Line 1568. - -*** - -### Tag - -Tag returns the client-generated correlation tag. - -#### Signature - -```go -func (*Call) Tag() string -``` - -#### Returns - -`string` - -#### Source - -[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) - -Line 61. - -*** - -### Tap - -Tap starts tapping the call audio to an external destination. The optional controlID argument supplies an explicit control\_id (matches Python's tap(control\_id=...)). Pass "" or omit to auto-generate. - -#### Signature - -```go -func (*Call) Tap(tap map[string]any, device map[string]any, controlID ...string) *TapAction -``` - -#### Parameters - - - - - - - -#### Returns - -`*TapAction` - -#### Source - -[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) - -Line 1071. - -*** - -### Transcribe - -Transcribe starts real-time transcription on the call. The optional controlID argument supplies an explicit control\_id (matches Python's transcribe(control\_id=...)). - -#### Signature - -```go -func (*Call) Transcribe(statusURL string, controlID ...string) *TranscribeAction -``` - -#### Parameters - - - - - -#### Returns - -`*TranscribeAction` - -#### Source - -[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) - -Line 1529. - -*** - -### Transfer - -Transfer transfers call control to another RELAY app or SWML script. The dest parameter is the destination context/URL string, sent as the "dest" key to the server (matches Python's transfer(dest: str) behavior). - -#### Signature - -```go -func (*Call) Transfer(dest string) error -``` - -#### Parameters - - - -#### Returns - -`error` - -#### Source - -[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) - -Line 353. - -*** - -### Unhold - -Unhold takes the call off hold. - -#### Signature - -```go -func (*Call) Unhold() error -``` - -#### Returns - -`error` - -#### Source - -[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) - -Line 1300. - -*** - -### UserEvent - -UserEvent sends a user-defined event on the call. eventName is the custom event identifier; pass "" to omit it. Optional `extra` maps are merged into the top-level wire params (mirroring Python's \*\*kwargs in user\_event(\*, event: Optional\[str] = None, \*\*kwargs)). - -Wire shape (matches Python): \{"event": \, ...extra\}. - -#### Signature - -```go -func (*Call) UserEvent(eventName string, extra ...map[string]any) error -``` - -#### Parameters - - - - - -#### Returns - -`error` - -#### Source - -[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) - -Line 1441. - -*** - -### WaitFor - -WaitFor blocks until an event matching the given type and predicate is received, or the context expires. - -#### Signature - -```go -func (*Call) WaitFor(ctx context.Context, eventType string, predicate func(*RelayEvent) bool) (*RelayEvent, error) -``` - -#### Parameters - - - - - - - -#### Returns - -`(*RelayEvent, error)` - -#### Source - -[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) - -Line 130. - -*** - -### WaitForAnswered - -WaitForAnswered blocks until the call is answered (returns immediately if already answered or past it). Typed wait over WaitFor, mirroring Python's call.wait\_for\_answered(timeout). - -#### Signature - -```go -func (*Call) WaitForAnswered(ctx context.Context) (*RelayEvent, error) -``` - -#### Parameters - - - -#### Returns - -`(*RelayEvent, error)` - -#### Source - -[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) - -Line 197. - -*** - -### WaitForEnded - -WaitForEnded blocks until the call reaches the "ended" state, or the context expires. This mirrors Python's wait\_for\_ended() which awaits the \_ended asyncio.Future. - -#### Signature - -```go -func (*Call) WaitForEnded(ctx context.Context) (*RelayEvent, error) -``` - -#### Parameters - - - -#### Returns - -`(*RelayEvent, error)` - -#### Source - -[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) - -Line 151. - -*** - -### WaitForEnding - -WaitForEnding blocks until the call is ending (returns immediately if already ending or past it). Typed wait over WaitFor, mirroring Python's call.wait\_for\_ending(timeout). - -#### Signature - -```go -func (*Call) WaitForEnding(ctx context.Context) (*RelayEvent, error) -``` - -#### Parameters - - - -#### Returns - -`(*RelayEvent, error)` - -#### Source - -[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) - -Line 211. - -*** - -### WaitForRinging - -WaitForRinging blocks until the call is ringing (returns immediately if already ringing or past it). Typed wait over WaitFor, mirroring Python's call.wait\_for\_ringing(timeout). - -#### Signature - -```go -func (*Call) WaitForRinging(ctx context.Context) (*RelayEvent, error) -``` - -#### Parameters - - - -#### Returns - -`(*RelayEvent, error)` - -#### Source - -[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) - -Line 204. - -## Source - -[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) - -Line 16. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/calling-error-event/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/calling-error-event/index.mdx deleted file mode 100644 index cee627893b..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/calling-error-event/index.mdx +++ /dev/null @@ -1,39 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/calling-error-event" -title: "CallingErrorEvent" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.CallingErrorEvent" - parent: "github.com/signalwire/signalwire-go/pkg/relay" - module: "github.com.signalwire.signalwire-go.pkg.relay" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" ---- -# `CallingErrorEvent` - -CallingErrorEvent represents a calling.call.error event. - -## Signature - -```go -type CallingErrorEvent struct -``` - -## Properties - - - - - - - - - -## Source - -[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) - -Line 684. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/client/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/client/index.mdx deleted file mode 100644 index afa4c72535..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/client/index.mdx +++ /dev/null @@ -1,613 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/client" -title: "Client" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.Client" - parent: "github.com/signalwire/signalwire-go/pkg/relay" - module: "github.com.signalwire.signalwire-go.pkg.relay" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go" ---- -# `Client` - -Client is the main RELAY WebSocket client that manages a persistent connection to SignalWire, handles Blade/JSON-RPC 2.0 authentication, event dispatch, and exposes high-level Dial/SendMessage methods. - -## Signature - -```go -type Client struct -``` - -## Methods - -### Authenticate - -Authenticate runs the signalwire.connect handshake and stores the server-issued protocol string. Mirrors Python's RelayClient.connect() auth phase. Use Connect first to establish the WebSocket; this call reads the auth response synchronously (the read loop has not yet started so no other reader is contending for the socket). - -#### Signature - -```go -func (*Client) Authenticate() error -``` - -#### Returns - -`error` - -#### Source - -[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) - -Line 317. - -*** - -### AuthorizationState - -AuthorizationState returns the most recent encrypted authorization state blob received via signalwire.authorization.state events. Mirrors Python's RelayClient.\_authorization\_state used during reconnection (relay/client.py:174). Empty until the server pushes such an event. - -#### Signature - -```go -func (*Client) AuthorizationState() string -``` - -#### Returns - -`string` - -#### Source - -[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) - -Line 170. - -*** - -### Connect - -Connect establishes the WebSocket connection to SignalWire. This is the public equivalent of the internal connect() method, mirroring Python's async connect() which is also used in the async-with context manager. In most cases callers should use Run() which calls Connect internally and then drives the read loop. - -#### Signature - -```go -func (*Client) Connect() error -``` - -#### Returns - -`error` - -#### Source - -[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) - -Line 181. - -*** - -### Contexts - -Contexts returns a copy of the configured RELAY contexts. Mirrors Python's public client.contexts attribute. The returned slice is a copy — mutating it does not affect the client. - -#### Signature - -```go -func (*Client) Contexts() []string -``` - -#### Returns - -`[]string` - -#### Source - -[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) - -Line 159. - -*** - -### Dial - -Dial initiates an outbound call to the given device list. The devices parameter is a list of serial/parallel device groups (same structure as the Blade calling.dial devices field). - -Mirrors Python's RelayClient.dial(devices, \*, tag=None, max\_duration=None, dial\_timeout=None). The calling.dial RPC response only contains \{"code": "200", "message": "Dialing"\} — no call\_id. The real call\_id and node\_id arrive via subsequent calling.call.dial events keyed by tag. This method waits for that event so the returned Call always has valid identifiers. - -To pass a caller-supplied tag, use WithDialTag. Without it the SDK generates a UUID, matching Python's tag = tag or str(uuid.uuid4()). - -Dial delegates to DialContext with context.Background(); use DialContext to abort the dial via a caller-controlled context (cancellation or deadline). - -#### Signature - -```go -func (*Client) Dial(devices [][]map[string]any, opts ...DialOption) (*Call, error) -``` - -#### Parameters - - - - - -#### Returns - -`(*Call, error)` - -#### Source - -[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) - -Line 380. - -*** - -### DialContext - -DialContext is the context-aware form of Dial: in addition to the dial-timeout and the client's own lifecycle, it aborts when ctx is cancelled or its deadline passes, returning ctx.Err() (wrapping context.Canceled / context.DeadlineExceeded). This is a Go-port addition — the Python reference's dial() has no caller-cancellation channel (documented in PORT\_ADDITIONS.md). - -Error sentinels (errors.Is-able): a per-dial timeout wraps ErrDialTimeout, a server "failed" dial\_state wraps ErrDialFailed, and an RPC-send failure against a torn-down socket surfaces ErrNotConnected from the transport. - -#### Signature - -```go -func (*Client) DialContext(ctx context.Context, devices [][]map[string]any, opts ...DialOption) (*Call, error) -``` - -#### Parameters - - - - - - - -#### Returns - -`(*Call, error)` - -#### Source - -[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) - -Line 394. - -*** - -### Execute - -Execute sends a JSON-RPC request over the WebSocket and waits for the response. Mirrors Python's async execute(method, params) which is the public arbitrary-RPC surface used by callers that need low-level access. - -#### Signature - -```go -func (*Client) Execute(method string, params map[string]any) (json.RawMessage, error) -``` - -#### Parameters - - - - - -#### Returns - -`(json.RawMessage, error)` - -#### Source - -[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) - -Line 188. - -*** - -### JWTToken - -JWTToken returns the configured JWT. Mirrors Python's public client.jwt\_token attribute, allowing callers to read back the value supplied via WithJWT(...). - -#### Signature - -```go -func (*Client) JWTToken() string -``` - -#### Returns - -`string` - -#### Source - -[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) - -Line 141. - -*** - -### Notify - -Notify sends a JSON-RPC notification (no `id`, no response expected) with the given method and params. Used for fire-and-forget frames such as the client-side `signalwire.event` ACK pattern that some integration fixtures expect. Returns any write error from the underlying socket. - -#### Signature - -```go -func (*Client) Notify(method string, params map[string]any) error -``` - -#### Parameters - - - - - -#### Returns - -`error` - -#### Source - -[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) - -Line 197. - -*** - -### OnCall - -OnCall registers a handler invoked for each inbound call. - -#### Signature - -```go -func (*Client) OnCall(handler func(*Call)) -``` - -#### Parameters - - - -#### Source - -[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) - -Line 86. - -*** - -### OnEvent - -OnEvent registers a handler invoked for every inbound `signalwire.event` frame, AFTER type-specific routing (call, messaging) has run. The handler receives the raw event\_type string and params map. This is the lowest-level event hook — most callers should use OnCall or OnMessage instead. Mirrors Python RelayClient's public event-tap surface used by integration tests. - -#### Signature - -```go -func (*Client) OnEvent(handler func(eventType string, params map[string]any)) -``` - -#### Parameters - - - -#### Source - -[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) - -Line 105. - -*** - -### OnMessage - -OnMessage registers a handler invoked for each inbound message. - -#### Signature - -```go -func (*Client) OnMessage(handler func(*Message)) -``` - -#### Parameters - - - -#### Source - -[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) - -Line 93. - -*** - -### ProjectID - -ProjectID returns the configured project ID. Mirrors Python's public client.project attribute, allowing callers to read back the value supplied via WithProject(...) or the SIGNALWIRE\_PROJECT\_ID env var. - -#### Signature - -```go -func (*Client) ProjectID() string -``` - -#### Returns - -`string` - -#### Source - -[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) - -Line 123. - -*** - -### Receive - -Receive subscribes to additional contexts for inbound events after the client is already connected. Sends signalwire.receive on the assigned protocol. Mirrors Python's async receive(contexts). - -#### Signature - -```go -func (*Client) Receive(contexts ...string) error -``` - -#### Parameters - - - -#### Returns - -`error` - -#### Source - -[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) - -Line 209. - -*** - -### RelayProtocol - -RelayProtocol returns the server-assigned protocol string received during authentication. Mirrors Python's relay\_protocol property. The value is empty until after a successful Connect/Run. - -#### Signature - -```go -func (*Client) RelayProtocol() string -``` - -#### Returns - -`string` - -#### Source - -[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) - -Line 114. - -*** - -### Run - -Run connects to SignalWire, authenticates, subscribes to configured contexts, and starts the read loop. It blocks until Stop is called or the context is cancelled. - -Important: the read loop must be running before subscribeContexts() is called. subscribeContexts() executes a JSON-RPC request whose response is delivered through the read loop's pending-id channel machinery. If the read loop isn't running, the JSON-RPC reply has no reader and the request times out (30s). Hence we start readLoop in a goroutine BEFORE the subscribe call, then block on a done channel here. - -#### Signature - -```go -func (*Client) Run() error -``` - -#### Returns - -`error` - -#### Source - -[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) - -Line 243. - -*** - -### RunContext - -RunContext is the context-aware form of Run. It behaves identically to Run (connect, authenticate, subscribe, drive the read loop, block) but also stops cleanly when ctx is cancelled or its deadline passes — equivalent to another goroutine calling Stop(). On a ctx-driven shutdown it returns ctx.Err() (wrapping context.Canceled / context.DeadlineExceeded); on a caller Stop() it returns nil, matching Run. - -This is a Go-port addition (the Python reference's run()/serve loop has no caller-supplied cancellation token); documented in PORT\_ADDITIONS.md. - -#### Signature - -```go -func (*Client) RunContext(ctx context.Context) error -``` - -#### Parameters - - - -#### Returns - -`error` - -#### Source - -[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) - -Line 256. - -*** - -### SendMessage - -SendMessage sends an SMS/MMS message and returns a Message that can be used to track delivery. - -The context option (WithMessageContext) sets the routing context for the message; it defaults to the relay protocol when omitted, matching Python SDK behaviour. The on\_completed option (WithMessageOnCompleted) registers a callback fired when the message reaches a terminal state. - -#### Signature - -```go -func (*Client) SendMessage(to string, from string, body string, opts ...MessageOption) (*Message, error) -``` - -#### Parameters - - - - - - - - - -#### Returns - -`(*Message, error)` - -#### Source - -[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) - -Line 471. - -*** - -### Space - -Space returns the configured SignalWire space hostname. Mirrors Python's public client.host attribute (Python uses the term "host"; Go uses "space" because that's the more accurate noun — see WithSpace). - -#### Signature - -```go -func (*Client) Space() string -``` - -#### Returns - -`string` - -#### Source - -[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) - -Line 150. - -*** - -### StartReadLoop - -StartReadLoop spawns the read goroutine and marks the client running. Mirrors the goroutine-spawn portion of Run() — call it after Authenticate() and before any Execute() call so JSON-RPC responses have a reader. Pair with Stop() to terminate. - -#### Signature - -```go -func (*Client) StartReadLoop() -``` - -#### Source - -[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) - -Line 325. - -*** - -### Stop - -Stop gracefully shuts down the client connection. - -Equivalent to Python's RelayClient.disconnect() (relay/client.py:286). Python users porting code can search for "disconnect" and find this method by its rename. - -#### Signature - -```go -func (*Client) Stop() -``` - -#### Source - -[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) - -Line 342. - -*** - -### SubscribeContexts - -SubscribeContexts subscribes to whatever contexts were configured via WithContexts. No-op when the contexts slice is empty. Used by the mock-relay test helper which drives connect/auth/read-loop manually. - -#### Signature - -```go -func (*Client) SubscribeContexts() error -``` - -#### Returns - -`error` - -#### Source - -[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) - -Line 333. - -*** - -### Token - -Token returns the configured API token. Mirrors Python's public client.token attribute, allowing callers to read back the value supplied via WithToken(...) or the SIGNALWIRE\_API\_TOKEN env var. - -#### Signature - -```go -func (*Client) Token() string -``` - -#### Returns - -`string` - -#### Source - -[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) - -Line 132. - -*** - -### Unreceive - -Unreceive unsubscribes from contexts for inbound events. Sends signalwire.unreceive on the assigned protocol. Mirrors Python's async unreceive(contexts). - -#### Signature - -```go -func (*Client) Unreceive(contexts ...string) error -``` - -#### Parameters - - - -#### Returns - -`error` - -#### Source - -[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) - -Line 222. - -## Source - -[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) - -Line 24. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/collect-action/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/collect-action/index.mdx deleted file mode 100644 index c8279557ec..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/collect-action/index.mdx +++ /dev/null @@ -1,103 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/collect-action" -title: "CollectAction" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.CollectAction" - parent: "github.com/signalwire/signalwire-go/pkg/relay" - module: "github.com.signalwire.signalwire-go.pkg.relay" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go" ---- -# `CollectAction` - -CollectAction represents a play-and-collect operation. - -## Signature - -```go -type CollectAction struct -``` - -## Properties - - - -## Methods - -### StartInputTimers - -StartInputTimers starts the initial\_timeout timer on an active collect, equivalent to Python's CollectAction.start\_input\_timers(). - -#### Signature - -```go -func (*CollectAction) StartInputTimers() error -``` - -#### Returns - -`error` - -#### Source - -[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) - -Line 332. - -*** - -### Stop - -Stop sends calling.play\_and\_collect.stop to halt the play-and-collect operation. - -#### Signature - -```go -func (*CollectAction) Stop() error -``` - -#### Returns - -`error` - -#### Source - -[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) - -Line 303. - -*** - -### Volume - -Volume adjusts the playback volume by the given dB offset during a play-and-collect operation. - -#### Signature - -```go -func (*CollectAction) Volume(db float64) error -``` - -#### Parameters - - - -#### Returns - -`error` - -#### Source - -[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) - -Line 317. - -## Source - -[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) - -Line 288. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/collect-event/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/collect-event/index.mdx deleted file mode 100644 index 1177a48549..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/collect-event/index.mdx +++ /dev/null @@ -1,43 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/collect-event" -title: "CollectEvent" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.CollectEvent" - parent: "github.com/signalwire/signalwire-go/pkg/relay" - module: "github.com.signalwire.signalwire-go.pkg.relay" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" ---- -# `CollectEvent` - -CollectEvent represents a calling.call.collect event. - -## Signature - -```go -type CollectEvent struct -``` - -## Properties - - - - - Final is a \*bool matching Python's Optional\[bool] = None semantics. - - - - - - - - -## Source - -[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) - -Line 333. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/collect-params/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/collect-params/index.mdx deleted file mode 100644 index f984676256..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/collect-params/index.mdx +++ /dev/null @@ -1,67 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/collect-params" -title: "CollectParams" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.CollectParams" - parent: "github.com/signalwire/signalwire-go/pkg/relay" - module: "github.com.signalwire.signalwire-go.pkg.relay" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go" ---- -# `CollectParams` - -CollectParams holds named parameters for the Collect method, matching Python's collect() named arguments. The fields are placed at the top level of the on-wire calling.collect frame (NOT nested under a "collect" object) — mirroring Python's params\["digits"] = digits at relay/call.py:583. - -## Signature - -```go -type CollectParams struct -``` - -## Properties - - - Continuous enables continuous collection after a result is received. - - - - ControlID overrides the auto-generated control identifier. - - - - Digits configures DTMF digit collection. - - - - InitialTimeout is the number of seconds to wait for first input. - - - - OnCompleted is fired when the collect action reaches a terminal state. - - - - PartialResults enables streaming partial results as input is gathered. - - - - SendStartOfInput signals when the user begins speaking/pressing. - - - - Speech configures speech recognition collection. - - - - StartInputTimers controls whether input timers start immediately. - - -## Source - -[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) - -Line 529. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/conference-event/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/conference-event/index.mdx deleted file mode 100644 index 0d48d9aed0..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/conference-event/index.mdx +++ /dev/null @@ -1,43 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/conference-event" -title: "ConferenceEvent" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.ConferenceEvent" - parent: "github.com/signalwire/signalwire-go/pkg/relay" - module: "github.com.signalwire.signalwire-go.pkg.relay" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" ---- -# `ConferenceEvent` - -ConferenceEvent represents a calling.call.conference event. - -## Signature - -```go -type ConferenceEvent struct -``` - -## Properties - - - - - - - - - - - Status reads wire key "status" matching Python's status field. (Replaces the previous State field which incorrectly read "state".) - - -## Source - -[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) - -Line 661. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/connect-event/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/connect-event/index.mdx deleted file mode 100644 index 8a4e2a8172..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/connect-event/index.mdx +++ /dev/null @@ -1,37 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/connect-event" -title: "ConnectEvent" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.ConnectEvent" - parent: "github.com/signalwire/signalwire-go/pkg/relay" - module: "github.com.signalwire.signalwire-go.pkg.relay" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" ---- -# `ConnectEvent` - -ConnectEvent represents a calling.call.connect event. - -## Signature - -```go -type ConnectEvent struct -``` - -## Properties - - - - - - - -## Source - -[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) - -Line 355. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/denoise-event/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/denoise-event/index.mdx deleted file mode 100644 index b40e5fb4af..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/denoise-event/index.mdx +++ /dev/null @@ -1,41 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/denoise-event" -title: "DenoiseEvent" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.DenoiseEvent" - parent: "github.com/signalwire/signalwire-go/pkg/relay" - module: "github.com.signalwire.signalwire-go.pkg.relay" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" ---- -# `DenoiseEvent` - -DenoiseEvent represents a calling.call.denoise event. - -## Signature - -```go -type DenoiseEvent struct -``` - -## Properties - - - - - Denoised matches Python's denoised bool field. - - - - - - -## Source - -[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) - -Line 527. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/detect-action/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/detect-action/index.mdx deleted file mode 100644 index a90f798a08..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/detect-action/index.mdx +++ /dev/null @@ -1,55 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/detect-action" -title: "DetectAction" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.DetectAction" - parent: "github.com/signalwire/signalwire-go/pkg/relay" - module: "github.com.signalwire.signalwire-go.pkg.relay" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go" ---- -# `DetectAction` - -DetectAction represents a long-running detect operation (e.g. machine detection). - -## Signature - -```go -type DetectAction struct -``` - -## Properties - - - -## Methods - -### Stop - -Stop sends calling.detect.stop to halt the active detect operation. - -#### Signature - -```go -func (*DetectAction) Stop() error -``` - -#### Returns - -`error` - -#### Source - -[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) - -Line 275. - -## Source - -[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) - -Line 258. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/detect-event/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/detect-event/index.mdx deleted file mode 100644 index 307a03065e..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/detect-event/index.mdx +++ /dev/null @@ -1,37 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/detect-event" -title: "DetectEvent" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.DetectEvent" - parent: "github.com/signalwire/signalwire-go/pkg/relay" - module: "github.com.signalwire.signalwire-go.pkg.relay" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" ---- -# `DetectEvent` - -DetectEvent represents a calling.call.detect event. - -## Signature - -```go -type DetectEvent struct -``` - -## Properties - - - - - - - -## Source - -[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) - -Line 372. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/device/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/device/index.mdx deleted file mode 100644 index 9ad26dbd7e..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/device/index.mdx +++ /dev/null @@ -1,85 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/device" -title: "Device" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.Device" - parent: "github.com/signalwire/signalwire-go/pkg/relay" - module: "github.com.signalwire.signalwire-go.pkg.relay" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/device.go" ---- -# `Device` - -Device is a typed view of the \{type, params\} object that RELAY passes across connect / refer / dial / tap. It types the SHAPE only — the discriminant `type` stays a string because the set of device types is NOT schema-enumerated (the wire schema declares `type` as a free string; grounding: porting-sdk/relay-protocol/calling.\{connect,dial,refer,tap\}. params.json, where each device is \{required:\["type"], properties:\{type: \{type:string\}, params:\{\}\}\}). - -Device is purely ADDITIVE: the raw-map path is unchanged — Call.Connect, Client.Dial/DialContext, Call.Refer and the tap helpers all still take map\[string]any / \[]\[]map\[string]any. ToMap() (and json.Marshal via MarshalJSON) yield the IDENTICAL wire shape — \{"type": \, "params": \\} — so a Device can be dropped in anywhere a hand-written device map is used, byte-for-byte. Params is left `any` to carry whatever the specific device type expects (e.g. phone: \{to\_number, from\_number\}; sip: \{to, from, headers\}); when nil it serialises as an empty object to match the canonical hand-written `"params": map[string]any{}`. - -## Signature - -```go -type Device struct -``` - -## Properties - - - Params is the device-type-specific parameter object. Typically a map\[string]any; left `any` so callers pass the shape the type needs. - - - - Type is the device discriminant (e.g. "phone", "sip"). Kept a string — the value set is open / not schema-enumerated. - - -## Methods - -### MarshalJSON - -MarshalJSON makes a Device serialise identically to its ToMap() form, so a Device used directly inside a params payload produces the same bytes as the equivalent raw map. - -#### Signature - -```go -func (Device) MarshalJSON() ([]byte, error) -``` - -#### Returns - -`([]byte, error)` - -#### Source - -[`pkg/relay/device.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/device.go) - -Line 59. - -*** - -### ToMap - -ToMap renders the Device as the raw wire map \{"type":…, "params":…\}, byte-identical to the hand-written map\[string]any callers pass to Connect/Dial/Refer/tap. A nil Params becomes an empty object. - -#### Signature - -```go -func (Device) ToMap() map[string]any -``` - -#### Returns - -`map[string]any` - -#### Source - -[`pkg/relay/device.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/device.go) - -Line 49. - -## Source - -[`pkg/relay/device.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/device.go) - -Line 22. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/dial-event/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/dial-event/index.mdx deleted file mode 100644 index f7188e9f04..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/dial-event/index.mdx +++ /dev/null @@ -1,69 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/dial-event" -title: "DialEvent" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.DialEvent" - parent: "github.com/signalwire/signalwire-go/pkg/relay" - module: "github.com.signalwire.signalwire-go.pkg.relay" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" ---- -# `DialEvent` - -DialEvent represents a calling.call.dial event. - -## Signature - -```go -type DialEvent struct -``` - -## Properties - - - Call is the nested call dict, matching Python's call field. - - - - - - DialState reads wire key "dial\_state" matching Python's dial\_state field. (Replaces the previous State field which incorrectly read "state".) - - - - - - - - -## Methods - -### DialStateTyped - -DialStateTyped returns the dial outcome as a typed DialState ALONGSIDE the bare-string DialState field (kept for parity with the Python reference). The typed kind gives callers IsTerminal()/IsKnown() predicates and compile-time distinctness from CallState/MessageState; its underlying string equals the DialState field exactly. Additive port idiom — see states.go and PORT\_ADDITIONS.md. - -#### Signature - -```go -func (*DialEvent) DialStateTyped() DialState -``` - -#### Returns - -`DialState` - -#### Source - -[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) - -Line 499. - -## Source - -[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) - -Line 468. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/echo-event/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/echo-event/index.mdx deleted file mode 100644 index ea6baa31a4..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/echo-event/index.mdx +++ /dev/null @@ -1,37 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/echo-event" -title: "EchoEvent" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.EchoEvent" - parent: "github.com/signalwire/signalwire-go/pkg/relay" - module: "github.com.signalwire.signalwire-go.pkg.relay" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" ---- -# `EchoEvent` - -EchoEvent represents a calling.call.echo event. - -## Signature - -```go -type EchoEvent struct -``` - -## Properties - - - - - - - -## Source - -[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) - -Line 596. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/fax-action/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/fax-action/index.mdx deleted file mode 100644 index dca6033f0c..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/fax-action/index.mdx +++ /dev/null @@ -1,55 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/fax-action" -title: "FaxAction" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.FaxAction" - parent: "github.com/signalwire/signalwire-go/pkg/relay" - module: "github.com.signalwire.signalwire-go.pkg.relay" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go" ---- -# `FaxAction` - -FaxAction represents a long-running fax send/receive operation. methodPrefix distinguishes "send\_fax" from "receive\_fax" and is used to build the operation-specific stop command (e.g. "calling.send\_fax.stop"). - -## Signature - -```go -type FaxAction struct -``` - -## Properties - - - -## Methods - -### Stop - -Stop sends "calling.\{methodPrefix\}.stop" (e.g. "calling.send\_fax.stop" or "calling.receive\_fax.stop") to halt the active fax operation. - -#### Signature - -```go -func (*FaxAction) Stop() error -``` - -#### Returns - -`error` - -#### Source - -[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) - -Line 407. - -## Source - -[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) - -Line 388. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/fax-event/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/fax-event/index.mdx deleted file mode 100644 index 1d25426ff1..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/fax-event/index.mdx +++ /dev/null @@ -1,37 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/fax-event" -title: "FaxEvent" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.FaxEvent" - parent: "github.com/signalwire/signalwire-go/pkg/relay" - module: "github.com.signalwire.signalwire-go.pkg.relay" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" ---- -# `FaxEvent` - -FaxEvent represents a calling.call.fax event. - -## Signature - -```go -type FaxEvent struct -``` - -## Properties - - - - - - - -## Source - -[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) - -Line 389. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/hold-event/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/hold-event/index.mdx deleted file mode 100644 index 391ebc0622..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/hold-event/index.mdx +++ /dev/null @@ -1,37 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/hold-event" -title: "HoldEvent" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.HoldEvent" - parent: "github.com/signalwire/signalwire-go/pkg/relay" - module: "github.com.signalwire.signalwire-go.pkg.relay" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" ---- -# `HoldEvent` - -HoldEvent represents a calling.call.hold event. - -## Signature - -```go -type HoldEvent struct -``` - -## Properties - - - - - - - -## Source - -[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) - -Line 644. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/index.mdx deleted file mode 100644 index bbf1f9bbf9..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/index.mdx +++ /dev/null @@ -1,4073 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay" -title: "relay" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "module" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/relay" - module: "github.com.signalwire.signalwire-go.pkg.relay" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go" ---- -# `relay` - -Package relay implements real-time WebSocket call control over the SignalWire Blade protocol (JSON-RPC 2.0). It provides a RELAY client that manages WebSocket connections, authentication, and event routing for calling, messaging, and other real-time communication primitives. - -## Signature - -```go -package relay -``` - -## Constants - - - AgentString is the SDK identifier the connect frame announces to the RELAY server. Mirrors Python's AGENT\_STRING at relay/constants.py:5, translated to identify this language's port. Sent as `params.agent` on signalwire.connect. - - - - Call lifecycle states. These equal the bare-string CallState\* consts in constants.go (created \< ringing \< answered \< ending \< ended) — the typed kind is an alternative spelling, not a replacement. - - - - Call lifecycle states. These equal the bare-string CallState\* consts in constants.go (created \< ringing \< answered \< ending \< ended) — the typed kind is an alternative spelling, not a replacement. - - - - Call lifecycle states. These equal the bare-string CallState\* consts in constants.go (created \< ringing \< answered \< ending \< ended) — the typed kind is an alternative spelling, not a replacement. - - - - Call lifecycle states. These equal the bare-string CallState\* consts in constants.go (created \< ringing \< answered \< ending \< ended) — the typed kind is an alternative spelling, not a replacement. - - - - Call lifecycle states. These equal the bare-string CallState\* consts in constants.go (created \< ringing \< answered \< ending \< ended) — the typed kind is an alternative spelling, not a replacement. - - - - Call states represent the lifecycle of a call. - - - - Call states represent the lifecycle of a call. - - - - Call states represent the lifecycle of a call. - - - - Call states represent the lifecycle of a call. - - - - Call states represent the lifecycle of a call. - - - - Dial outcome states. "dialing" is a non-terminal progress state; "answered" and "failed" are the two terminal outcomes that resolve/reject the dial. - - - - Dial outcome states. "dialing" is a non-terminal progress state; "answered" and "failed" are the two terminal outcomes that resolve/reject the dial. - - - - Dial outcome states. "dialing" is a non-terminal progress state; "answered" and "failed" are the two terminal outcomes that resolve/reject the dial. - - - - Call directions. - - - - Call directions. - - - - Call end reasons indicate why a call ended. - - - - Call end reasons indicate why a call ended. - - - - Call end reasons indicate why a call ended. - - - - Call end reasons indicate why a call ended. - - - - Call end reasons indicate why a call ended. - - - - Call end reasons indicate why a call ended. - - - - Call end reasons indicate why a call ended. - - - - Call end reasons indicate why a call ended. - - - - Call end reasons indicate why a call ended. - - - - Package-level sentinel errors for the conditions the relay client returns. These are Go-idiomatic, errors.Is-able markers (a Go-port addition — the Python reference uses RelayError + bare exceptions and has no equivalent sentinel set). Every code path that produces one of these conditions wraps the sentinel with %w, so callers can branch with errors.Is rather than scraping error strings: if \_, err := c.Dial(devices); errors.Is(err, relay.ErrDialTimeout) \{ // retry / give up on the dial specifically \} They are documented in PORT\_ADDITIONS.md. - - - - Package-level sentinel errors for the conditions the relay client returns. These are Go-idiomatic, errors.Is-able markers (a Go-port addition — the Python reference uses RelayError + bare exceptions and has no equivalent sentinel set). Every code path that produces one of these conditions wraps the sentinel with %w, so callers can branch with errors.Is rather than scraping error strings: if \_, err := c.Dial(devices); errors.Is(err, relay.ErrDialTimeout) \{ // retry / give up on the dial specifically \} They are documented in PORT\_ADDITIONS.md. - - - - Package-level sentinel errors for the conditions the relay client returns. These are Go-idiomatic, errors.Is-able markers (a Go-port addition — the Python reference uses RelayError + bare exceptions and has no equivalent sentinel set). Every code path that produces one of these conditions wraps the sentinel with %w, so callers can branch with errors.Is rather than scraping error strings: if \_, err := c.Dial(devices); errors.Is(err, relay.ErrDialTimeout) \{ // retry / give up on the dial specifically \} They are documented in PORT\_ADDITIONS.md. - - - - Package-level sentinel errors for the conditions the relay client returns. These are Go-idiomatic, errors.Is-able markers (a Go-port addition — the Python reference uses RelayError + bare exceptions and has no equivalent sentinel set). Every code path that produces one of these conditions wraps the sentinel with %w, so callers can branch with errors.Is rather than scraping error strings: if \_, err := c.Dial(devices); errors.Is(err, relay.ErrDialTimeout) \{ // retry / give up on the dial specifically \} They are documented in PORT\_ADDITIONS.md. - - - - Authorization-state event used to refresh reconnect material. Mirrors Python's EVENT\_AUTHORIZATION\_STATE = "signalwire.authorization.state" (relay/constants.py:16). - - - - Event types for calling events. - - - - Event types for calling events. - - - - Event types for calling events. - - - - Event types for calling events. - - - - Event types for calling events. - - - - Event types for calling events. - - - - Event types for calling events. - - - - Event types for calling events. - - - - Event types for calling events. - - - - Event types for calling events. - - - - Event types for calling events. - - - - Event types for calling events. - - - - Event types for calling events. - - - - Event types for calling events. - - - - Event types for calling events. - - - - Event types for calling events. - - - - Event types for calling events. - - - - Event types for calling events. - - - - Event types for calling events. - - - - Event types for calling events. - - - - Event types for calling events. - - - - Event types for calling events. - - - - Event types for messaging events. - - - - Event types for messaging events. - - - - TTS voice genders. These are the canonical gender strings the RELAY wire accepts in the tts params; the values are the exact tokens emitted on the wire. - - - - TTS voice genders. These are the canonical gender strings the RELAY wire accepts in the tts params; the values are the exact tokens emitted on the wire. - - - - Message states represent the lifecycle of an SMS/MMS message. - - - - Message states represent the lifecycle of an SMS/MMS message. - - - - Message states represent the lifecycle of an SMS/MMS message. - - - - Message states represent the lifecycle of an SMS/MMS message. - - - - Message states represent the lifecycle of an SMS/MMS message. - - - - Message states represent the lifecycle of an SMS/MMS message. - - - - Message states represent the lifecycle of an SMS/MMS message. - - - - Blade/SignalWire internal method constants. - - - - Blade/SignalWire internal method constants. - - - - Blade/SignalWire internal method constants. - - - - Blade/SignalWire internal method constants. - - - - Blade/SignalWire internal method constants. - - - - Message delivery states. These equal the bare-string MessageState\* consts in constants.go. - - - - Message delivery states. These equal the bare-string MessageState\* consts in constants.go. - - - - Message delivery states. These equal the bare-string MessageState\* consts in constants.go. - - - - Message delivery states. These equal the bare-string MessageState\* consts in constants.go. - - - - Message delivery states. These equal the bare-string MessageState\* consts in constants.go. - - - - Message delivery states. These equal the bare-string MessageState\* consts in constants.go. - - - - Message delivery states. These equal the bare-string MessageState\* consts in constants.go. - - - - Protocol version for the SignalWire Blade protocol. - - - - Protocol version for the SignalWire Blade protocol. - - - - Protocol version for the SignalWire Blade protocol. - - -## Classes - - - - Action represents a long-running operation on a call, such as playing audio, recording, or collecting input. Callers can Wait for completion, check status, or register a completion callback. - - - - AIAction represents a long-running AI operation on a call. - - - - AIEvent represents a calling.call.ai event. - - - - Call represents an active voice call managed through the RELAY client. It exposes methods for every calling operation supported by SignalWire, grouped into logical categories: lifecycle, audio, recording, bridging, DTMF, detection, fax, tap, streaming, conferencing, AI, hold/denoise, room/queue, pay, and transcription. - - - - CallingErrorEvent represents a calling.call.error event. - - - - CallReceiveEvent represents a calling.call.receive event for inbound calls. - - - - CallStateEvent represents a calling.call.state event. - - - - Client is the main RELAY WebSocket client that manages a persistent connection to SignalWire, handles Blade/JSON-RPC 2.0 authentication, event dispatch, and exposes high-level Dial/SendMessage methods. - - - - CollectAction represents a play-and-collect operation. - - - - CollectEvent represents a calling.call.collect event. - - - - CollectParams holds named parameters for the Collect method, matching Python's collect() named arguments. The fields are placed at the top level of the on-wire calling.collect frame (NOT nested under a "collect" object) — mirroring Python's params\["digits"] = digits at relay/call.py:583. - - - - ConferenceEvent represents a calling.call.conference event. - - - - ConnectEvent represents a calling.call.connect event. - - - - DenoiseEvent represents a calling.call.denoise event. - - - - DetectAction represents a long-running detect operation (e.g. machine detection). - - - - DetectEvent represents a calling.call.detect event. - - - - Device is a typed view of the \{type, params\} object that RELAY passes across connect / refer / dial / tap. It types the SHAPE only — the discriminant `type` stays a string because the set of device types is NOT schema-enumerated (the wire schema declares `type` as a free string; grounding: porting-sdk/relay-protocol/calling.\{connect,dial,refer,tap\}. params.json, where each device is \{required:\["type"], properties:\{type: \{type:string\}, params:\{\}\}\}). - - - - DialEvent represents a calling.call.dial event. - - - - EchoEvent represents a calling.call.echo event. - - - - FaxAction represents a long-running fax send/receive operation. methodPrefix distinguishes "send\_fax" from "receive\_fax" and is used to build the operation-specific stop command (e.g. "calling.send\_fax.stop"). - - - - FaxEvent represents a calling.call.fax event. - - - - HoldEvent represents a calling.call.hold event. - - - - Message represents an SMS/MMS message tracked through its lifecycle. - - - - MessageReceiveEvent represents a messaging.receive event. - - - - MessageStateEvent represents a messaging.state event. - - - - PayAction represents a long-running pay operation. - - - - PayEvent represents a calling.call.pay event. - - - - PlayAction represents a long-running play operation with media controls. - - - - PlayEvent represents a calling.call.play event. - - - - QueueEvent represents a calling.call.queue event. - - - - RecordAction represents a long-running record operation. - - - - RecordEvent represents a calling.call.record event. - - - - ReferEvent represents a calling.call.refer event. - - - - RelayError is a typed error returned by the RELAY protocol client. It carries the numeric code and message from the server so callers can programmatically inspect failures via errors.As. - - - - RelayEvent is the base event type for all events received from the SignalWire RELAY service. It carries an event type string and a generic parameter map that can be queried via helper methods. - - - - SendDigitsEvent represents a calling.call.send\_digits event. - - - - StandaloneCollectAction represents a standalone collect (without play). - - - - StreamAction represents a long-running media stream operation. - - - - StreamEvent represents a calling.call.stream event. - - - - TapAction represents a long-running tap operation. - - - - TapEvent represents a calling.call.tap event. - - - - TranscribeAction represents a long-running transcription operation. - - - - TranscribeEvent represents a calling.call.transcribe event. - - - -## Functions - -### DeviceGroups - -DeviceGroups converts serial groups of parallel typed Devices into the \[]\[]map\[string]any shape Connect/Dial expect: the outer slice is tried serially, the inner slice in parallel — the same semantics as the raw \[]\[]map\[string]any field. Byte-identical to building the nested maps by hand. - -#### Signature - -```go -func DeviceGroups(groups ...[]Device) [][]map[string]any -``` - -#### Parameters - - - -#### Returns - -`[][]map[string]any` - -#### Source - -[`pkg/relay/device.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/device.go) - -Line 79. - -*** - -### DeviceList - -DeviceList converts a flat list of typed Devices into ONE parallel device leg in the \[]\[]map\[string]any shape that Connect/Dial expect — i.e. all the given devices are tried in parallel (a single serial group). Equivalent to the hand-written \[]\[]map\[string]any\{\{dev1, dev2, …\}\}. - -#### Signature - -```go -func DeviceList(devices ...Device) [][]map[string]any -``` - -#### Parameters - - - -#### Returns - -`[][]map[string]any` - -#### Source - -[`pkg/relay/device.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/device.go) - -Line 67. - -*** - -### NewAIEvent - -NewAIEvent constructs an AIEvent from raw params. - -#### Signature - -```go -func NewAIEvent(params map[string]any) *AIEvent -``` - -#### Parameters - - - -#### Returns - -`*AIEvent` - -#### Source - -[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) - -Line 825. - -*** - -### NewCallingErrorEvent - -NewCallingErrorEvent constructs a CallingErrorEvent from raw params. - -#### Signature - -```go -func NewCallingErrorEvent(params map[string]any) *CallingErrorEvent -``` - -#### Parameters - - - -#### Returns - -`*CallingErrorEvent` - -#### Source - -[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) - -Line 692. - -*** - -### NewCallReceiveEvent - -NewCallReceiveEvent constructs a CallReceiveEvent from raw params. - -#### Signature - -```go -func NewCallReceiveEvent(params map[string]any) *CallReceiveEvent -``` - -#### Parameters - - - -#### Returns - -`*CallReceiveEvent` - -#### Source - -[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) - -Line 240. - -*** - -### NewCallStateEvent - -NewCallStateEvent constructs a CallStateEvent from raw params. - -#### Signature - -```go -func NewCallStateEvent(params map[string]any) *CallStateEvent -``` - -#### Parameters - - - -#### Returns - -`*CallStateEvent` - -#### Source - -[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) - -Line 211. - -*** - -### NewCollectEvent - -NewCollectEvent constructs a CollectEvent from raw params. - -#### Signature - -```go -func NewCollectEvent(params map[string]any) *CollectEvent -``` - -#### Parameters - - - -#### Returns - -`*CollectEvent` - -#### Source - -[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) - -Line 343. - -*** - -### NewConferenceEvent - -NewConferenceEvent constructs a ConferenceEvent from raw params. - -#### Signature - -```go -func NewConferenceEvent(params map[string]any) *ConferenceEvent -``` - -#### Parameters - - - -#### Returns - -`*ConferenceEvent` - -#### Source - -[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) - -Line 672. - -*** - -### NewConnectEvent - -NewConnectEvent constructs a ConnectEvent from raw params. - -#### Signature - -```go -func NewConnectEvent(params map[string]any) *ConnectEvent -``` - -#### Parameters - - - -#### Returns - -`*ConnectEvent` - -#### Source - -[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) - -Line 362. - -*** - -### NewDenoiseEvent - -NewDenoiseEvent constructs a DenoiseEvent from raw params. - -#### Signature - -```go -func NewDenoiseEvent(params map[string]any) *DenoiseEvent -``` - -#### Parameters - - - -#### Returns - -`*DenoiseEvent` - -#### Source - -[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) - -Line 536. - -*** - -### NewDetectEvent - -NewDetectEvent constructs a DetectEvent from raw params. - -#### Signature - -```go -func NewDetectEvent(params map[string]any) *DetectEvent -``` - -#### Parameters - - - -#### Returns - -`*DetectEvent` - -#### Source - -[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) - -Line 379. - -*** - -### NewDevice - -NewDevice constructs a Device from a type discriminant and its params. - -#### Signature - -```go -func NewDevice(deviceType string, params any) Device -``` - -#### Parameters - - - - - -#### Returns - -`Device` - -#### Source - -[`pkg/relay/device.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/device.go) - -Line 32. - -*** - -### NewDialEvent - -NewDialEvent constructs a DialEvent from raw params. - -#### Signature - -```go -func NewDialEvent(params map[string]any) *DialEvent -``` - -#### Parameters - - - -#### Returns - -`*DialEvent` - -#### Source - -[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) - -Line 481. - -*** - -### NewEchoEvent - -NewEchoEvent constructs an EchoEvent from raw params. - -#### Signature - -```go -func NewEchoEvent(params map[string]any) *EchoEvent -``` - -#### Parameters - - - -#### Returns - -`*EchoEvent` - -#### Source - -[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) - -Line 603. - -*** - -### NewFaxEvent - -NewFaxEvent constructs a FaxEvent from raw params. - -#### Signature - -```go -func NewFaxEvent(params map[string]any) *FaxEvent -``` - -#### Parameters - - - -#### Returns - -`*FaxEvent` - -#### Source - -[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) - -Line 396. - -*** - -### NewHoldEvent - -NewHoldEvent constructs a HoldEvent from raw params. - -#### Signature - -```go -func NewHoldEvent(params map[string]any) *HoldEvent -``` - -#### Parameters - - - -#### Returns - -`*HoldEvent` - -#### Source - -[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) - -Line 651. - -*** - -### NewMessageReceiveEvent - -NewMessageReceiveEvent constructs a MessageReceiveEvent from raw params. - -#### Signature - -```go -func NewMessageReceiveEvent(params map[string]any) *MessageReceiveEvent -``` - -#### Parameters - - - -#### Returns - -`*MessageReceiveEvent` - -#### Source - -[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) - -Line 719. - -*** - -### NewMessageStateEvent - -NewMessageStateEvent constructs a MessageStateEvent from raw params. - -#### Signature - -```go -func NewMessageStateEvent(params map[string]any) *MessageStateEvent -``` - -#### Parameters - - - -#### Returns - -`*MessageStateEvent` - -#### Source - -[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) - -Line 779. - -*** - -### NewPayEvent - -NewPayEvent constructs a PayEvent from raw params. - -#### Signature - -```go -func NewPayEvent(params map[string]any) *PayEvent -``` - -#### Parameters - - - -#### Returns - -`*PayEvent` - -#### Source - -[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) - -Line 555. - -*** - -### NewPlayEvent - -NewPlayEvent constructs a PlayEvent from raw params. - -#### Signature - -```go -func NewPlayEvent(params map[string]any) *PlayEvent -``` - -#### Parameters - - - -#### Returns - -`*PlayEvent` - -#### Source - -[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) - -Line 274. - -*** - -### NewQueueEvent - -NewQueueEvent constructs a QueueEvent from raw params. - -#### Signature - -```go -func NewQueueEvent(params map[string]any) *QueueEvent -``` - -#### Parameters - - - -#### Returns - -`*QueueEvent` - -#### Source - -[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) - -Line 582. - -*** - -### NewRecordEvent - -NewRecordEvent constructs a RecordEvent from raw params. URL, Duration, and Size are extracted from the nested "record" dict first, falling back to top-level params — matching Python's from\_payload behavior. - -#### Signature - -```go -func NewRecordEvent(params map[string]any) *RecordEvent -``` - -#### Parameters - - - -#### Returns - -`*RecordEvent` - -#### Source - -[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) - -Line 299. - -*** - -### NewReferEvent - -NewReferEvent constructs a ReferEvent from raw params. - -#### Signature - -```go -func NewReferEvent(params map[string]any) *ReferEvent -``` - -#### Parameters - - - -#### Returns - -`*ReferEvent` - -#### Source - -[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) - -Line 514. - -*** - -### NewRelayClient - -NewRelayClient creates a new RELAY Client with the given options. - -After explicit options are applied, any remaining unset auth/space fields fall back to SIGNALWIRE\_PROJECT\_ID, SIGNALWIRE\_API\_TOKEN, SIGNALWIRE\_JWT\_TOKEN, SIGNALWIRE\_SPACE, and RELAY\_MAX\_ACTIVE\_CALLS environment variables — matching Python RelayClient.**init**'s automatic env-var fallback (relay/client.py:115-119). Explicit options always win. - -#### Signature - -```go -func NewRelayClient(opts ...ClientOption) *Client -``` - -#### Parameters - - - -#### Returns - -`*Client` - -#### Source - -[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) - -Line 65. - -*** - -### NewRelayError - -NewRelayError constructs a RelayError with the given code and message. - -#### Signature - -```go -func NewRelayError(code int, message string) *RelayError -``` - -#### Parameters - - - - - -#### Returns - -`*RelayError` - -#### Source - -[`pkg/relay/error.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/error.go) - -Line 70. - -*** - -### NewRelayEvent - -NewRelayEvent creates a new RelayEvent from the given type and params. - -#### Signature - -```go -func NewRelayEvent(eventType string, params map[string]any) *RelayEvent -``` - -#### Parameters - - - - - -#### Returns - -`*RelayEvent` - -#### Source - -[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) - -Line 23. - -*** - -### NewSendDigitsEvent - -NewSendDigitsEvent constructs a SendDigitsEvent from raw params. - -#### Signature - -```go -func NewSendDigitsEvent(params map[string]any) *SendDigitsEvent -``` - -#### Parameters - - - -#### Returns - -`*SendDigitsEvent` - -#### Source - -[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) - -Line 458. - -*** - -### NewStreamEvent - -NewStreamEvent constructs a StreamEvent from raw params. - -#### Signature - -```go -func NewStreamEvent(params map[string]any) *StreamEvent -``` - -#### Parameters - - - -#### Returns - -`*StreamEvent` - -#### Source - -[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) - -Line 439. - -*** - -### NewTapEvent - -NewTapEvent constructs a TapEvent from raw params. - -#### Signature - -```go -func NewTapEvent(params map[string]any) *TapEvent -``` - -#### Parameters - - - -#### Returns - -`*TapEvent` - -#### Source - -[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) - -Line 416. - -*** - -### NewTranscribeEvent - -NewTranscribeEvent constructs a TranscribeEvent from raw params. - -#### Signature - -```go -func NewTranscribeEvent(params map[string]any) *TranscribeEvent -``` - -#### Parameters - - - -#### Returns - -`*TranscribeEvent` - -#### Source - -[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) - -Line 629. - -*** - -### ParseEvent - -ParseEvent parses a raw signalwire event payload dict into a typed event object. It reads "event\_type" from the top-level payload and "params" as the inner parameter map, then dispatches to the appropriate typed constructor. If the event\_type is not recognised, a plain \*RelayEvent is returned. Callers can type-assert or type-switch on the result to access the concrete event fields. - -This mirrors Python's relay.event.parse\_event(payload). - -#### Signature - -```go -func ParseEvent(payload map[string]any) any -``` - -#### Parameters - - - -#### Returns - -`any` - -#### Source - -[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) - -Line 843. - -*** - -### WithAIControlID - -WithAIControlID supplies an explicit control\_id for the AI action, matching Python's ai(control\_id=...). - -#### Signature - -```go -func WithAIControlID(id string) AIOption -``` - -#### Parameters - - - -#### Returns - -`AIOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 448. - -*** - -### WithAIEngine - -WithAIEngine sets the AI engine to use. - -#### Signature - -```go -func WithAIEngine(engine string) AIOption -``` - -#### Parameters - - - -#### Returns - -`AIOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 453. - -*** - -### WithAIParams - -WithAIParams sets arbitrary AI parameters. - -#### Signature - -```go -func WithAIParams(params map[string]any) AIOption -``` - -#### Parameters - - - -#### Returns - -`AIOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 474. - -*** - -### WithAIPostPrompt - -WithAIPostPrompt sets the AI post-prompt configuration. - -#### Signature - -```go -func WithAIPostPrompt(pp map[string]any) AIOption -``` - -#### Parameters - - - -#### Returns - -`AIOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 467. - -*** - -### WithAIPrompt - -WithAIPrompt sets the AI prompt text. - -#### Signature - -```go -func WithAIPrompt(prompt map[string]any) AIOption -``` - -#### Parameters - - - -#### Returns - -`AIOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 460. - -*** - -### WithAMDDetectInterruptions - -WithAMDDetectInterruptions sets detect\_interruptions (Python detect\_answering\_machine). - -#### Signature - -```go -func WithAMDDetectInterruptions(enabled bool) AMDOption -``` - -#### Parameters - - - -#### Returns - -`AMDOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 165. - -*** - -### WithAMDDetectMessageEnd - -WithAMDDetectMessageEnd sets detect\_message\_end (Python detect\_answering\_machine). - -#### Signature - -```go -func WithAMDDetectMessageEnd(enabled bool) AMDOption -``` - -#### Parameters - - - -#### Returns - -`AMDOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 170. - -*** - -### WithAMDEndSilenceTimeout - -WithAMDEndSilenceTimeout sets end\_silence\_timeout (Python detect\_answering\_machine). - -#### Signature - -```go -func WithAMDEndSilenceTimeout(seconds float64) AMDOption -``` - -#### Parameters - - - -#### Returns - -`AMDOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 150. - -*** - -### WithAMDInitialTimeout - -WithAMDInitialTimeout sets initial\_timeout (Python detect\_answering\_machine). - -#### Signature - -```go -func WithAMDInitialTimeout(seconds float64) AMDOption -``` - -#### Parameters - - - -#### Returns - -`AMDOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 145. - -*** - -### WithAMDMachineVoiceThreshold - -WithAMDMachineVoiceThreshold sets machine\_voice\_threshold (Python detect\_answering\_machine). - -#### Signature - -```go -func WithAMDMachineVoiceThreshold(threshold float64) AMDOption -``` - -#### Parameters - - - -#### Returns - -`AMDOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 155. - -*** - -### WithAMDMachineWordsThreshold - -WithAMDMachineWordsThreshold sets machine\_words\_threshold (Python detect\_answering\_machine). - -#### Signature - -```go -func WithAMDMachineWordsThreshold(threshold int) AMDOption -``` - -#### Parameters - - - -#### Returns - -`AMDOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 160. - -*** - -### WithAMDTimeout - -WithAMDTimeout sets the overall detect timeout in seconds (Python detect\_answering\_machine timeout). - -#### Signature - -```go -func WithAMDTimeout(seconds float64) AMDOption -``` - -#### Parameters - - - -#### Returns - -`AMDOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 175. - -*** - -### WithAudioVolume - -WithAudioVolume sets the playback volume in dB (Python play\_audio/prompt\_audio volume). - -#### Signature - -```go -func WithAudioVolume(db float64) AudioOption -``` - -#### Parameters - - - -#### Returns - -`AudioOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 104. - -*** - -### WithConferenceBeep - -WithConferenceBeep enables beep on join/leave. - -#### Signature - -```go -func WithConferenceBeep(beep string) ConferenceOption -``` - -#### Parameters - - - -#### Returns - -`ConferenceOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 311. - -*** - -### WithConferenceDeaf - -WithConferenceDeaf joins deaf (cannot hear others). - -#### Signature - -```go -func WithConferenceDeaf(deaf bool) ConferenceOption -``` - -#### Parameters - - - -#### Returns - -`ConferenceOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 325. - -*** - -### WithConferenceMuted - -WithConferenceMuted joins muted. - -#### Signature - -```go -func WithConferenceMuted(muted bool) ConferenceOption -``` - -#### Parameters - - - -#### Returns - -`ConferenceOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 318. - -*** - -### WithConnectRingback - -WithConnectRingback sets ringback media for the connect operation. - -#### Signature - -```go -func WithConnectRingback(media []map[string]any) ConnectOption -``` - -#### Parameters - - - -#### Returns - -`ConnectOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 278. - -*** - -### WithContexts - -WithContexts sets the contexts to subscribe to for inbound events. - -#### Signature - -```go -func WithContexts(contexts ...string) ClientOption -``` - -#### Parameters - - - -#### Returns - -`ClientOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 518. - -*** - -### WithDialClientTimeout - -WithDialClientTimeout bounds how long Dial() will wait for the calling.call.dial event before raising a timeout error. Mirrors Python's dial(dial\_timeout=\). Default is 120s when omitted. - -The duration is consumed by the Go Dial() loop; it never goes on the wire — that's why it's stored under an underscore-prefixed key removed before transmit. - -#### Signature - -```go -func WithDialClientTimeout(d time.Duration) DialOption -``` - -#### Parameters - - - -#### Returns - -`DialOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 566. - -*** - -### WithDialFromNumber - -WithDialFromNumber sets the caller ID for the outbound call. - -#### Signature - -```go -func WithDialFromNumber(from string) DialOption -``` - -#### Parameters - - - -#### Returns - -`DialOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 535. - -*** - -### WithDialMaxDuration - -WithDialMaxDuration sets the maximum call duration in minutes. Mirrors Python's dial(max\_duration=...) parameter. - -#### Signature - -```go -func WithDialMaxDuration(minutes int) DialOption -``` - -#### Parameters - - - -#### Returns - -`DialOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 574. - -*** - -### WithDialTag - -WithDialTag sets an explicit caller-supplied dial tag. When omitted the SDK generates a UUID, mirroring Python's `tag = tag or str(uuid.uuid4())` at relay/client.py:368. - -#### Signature - -```go -func WithDialTag(tag string) DialOption -``` - -#### Parameters - - - -#### Returns - -`DialOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 553. - -*** - -### WithDialTimeout - -WithDialTimeout sets the legacy per-leg dial timeout in seconds. (Was the only Go option; retained for back-compat. To bound the overall Dial() call use WithDialClientTimeout.) - -#### Signature - -```go -func WithDialTimeout(t int) DialOption -``` - -#### Parameters - - - -#### Returns - -`DialOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 544. - -*** - -### WithDigitDigits - -WithDigitDigits restricts detection to the given DTMF digit set, nested inside the detect params (Python detect\_digit digits). - -#### Signature - -```go -func WithDigitDigits(digits string) DetectDigitOption -``` - -#### Parameters - - - -#### Returns - -`DetectDigitOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 128. - -*** - -### WithDigitTimeout - -WithDigitTimeout sets the detect timeout in seconds (Python detect\_digit timeout). - -#### Signature - -```go -func WithDigitTimeout(seconds float64) DetectDigitOption -``` - -#### Parameters - - - -#### Returns - -`DetectDigitOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 133. - -*** - -### WithEnvDefaults - -WithEnvDefaults is now a no-op pass-through retained for backwards compatibility — env defaults are loaded automatically at the end of NewRelayClient (mirroring Python RelayClient.**init**). New code can rely on the auto-load behavior and omit this option entirely. - -#### Signature - -```go -func WithEnvDefaults() ClientOption -``` - -#### Returns - -`ClientOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 663. - -*** - -### WithFaxControlID - -WithFaxControlID supplies an explicit control\_id for the fax action, matching Python's send\_fax(control\_id=...) / receive\_fax(control\_id=...). - -#### Signature - -```go -func WithFaxControlID(id string) FaxOption -``` - -#### Parameters - - - -#### Returns - -`FaxOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 345. - -*** - -### WithFaxDetectTimeout - -WithFaxDetectTimeout sets the detect timeout in seconds (Python detect\_fax timeout). - -#### Signature - -```go -func WithFaxDetectTimeout(seconds float64) DetectFaxOption -``` - -#### Parameters - - - -#### Returns - -`DetectFaxOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 189. - -*** - -### WithFaxHeaderInfo - -WithFaxHeaderInfo sets the fax header info string (matches Python's header\_info param). - -#### Signature - -```go -func WithFaxHeaderInfo(headerInfo string) FaxOption -``` - -#### Parameters - - - -#### Returns - -`FaxOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 335. - -*** - -### WithFaxTone - -WithFaxTone restricts fax detection to a specific tone (CED/CNG), nested inside the detect params (Python detect\_fax tone). - -#### Signature - -```go -func WithFaxTone(tone string) DetectFaxOption -``` - -#### Parameters - - - -#### Returns - -`DetectFaxOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 184. - -*** - -### WithJWT - -WithJWT sets a pre-existing JWT for authentication. - -#### Signature - -```go -func WithJWT(jwt string) ClientOption -``` - -#### Parameters - - - -#### Returns - -`ClientOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 504. - -*** - -### WithMaxActiveCalls - -WithMaxActiveCalls limits the number of concurrent active calls. - -#### Signature - -```go -func WithMaxActiveCalls(n int) ClientOption -``` - -#### Parameters - - - -#### Returns - -`ClientOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 525. - -*** - -### WithMessageContext - -WithMessageContext sets the routing context for the message. Mirrors Python's send\_message(context=...) parameter — defaults to the relay protocol when omitted. - -#### Signature - -```go -func WithMessageContext(ctx string) MessageOption -``` - -#### Parameters - - - -#### Returns - -`MessageOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 607. - -*** - -### WithMessageMedia - -WithMessageMedia adds media URLs to the message (MMS). - -#### Signature - -```go -func WithMessageMedia(urls []string) MessageOption -``` - -#### Parameters - - - -#### Returns - -`MessageOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 584. - -*** - -### WithMessageOnCompleted - -WithMessageOnCompleted registers a callback invoked when the message reaches a terminal state (delivered, undelivered, or failed). The callback receives both the message and the terminal RelayEvent, mirroring Python's \_on\_completed callback contract (relay/message.py:115-117) which receives the event directly. Mirrors Python's send\_message(on\_completed=...) parameter. - -#### Signature - -```go -func WithMessageOnCompleted(cb func(*Message, *RelayEvent)) MessageOption -``` - -#### Parameters - - - -#### Returns - -`MessageOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 618. - -*** - -### WithMessageRegion - -WithMessageRegion sets the region for message delivery. - -#### Signature - -```go -func WithMessageRegion(region string) MessageOption -``` - -#### Parameters - - - -#### Returns - -`MessageOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 591. - -*** - -### WithMessageTags - -WithMessageTags sets tags on the message for tracking. - -#### Signature - -```go -func WithMessageTags(tags []string) MessageOption -``` - -#### Parameters - - - -#### Returns - -`MessageOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 598. - -*** - -### WithPayChargeAmount - -WithPayChargeAmount sets the charge amount. - -#### Signature - -```go -func WithPayChargeAmount(amount string) PayOption -``` - -#### Parameters - - - -#### Returns - -`PayOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 404. - -*** - -### WithPayControlID - -WithPayControlID supplies an explicit control\_id for the pay action, matching Python's pay(control\_id=...). - -#### Signature - -```go -func WithPayControlID(id string) PayOption -``` - -#### Parameters - - - -#### Returns - -`PayOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 354. - -*** - -### WithPayCurrency - -WithPayCurrency sets the payment currency. - -#### Signature - -```go -func WithPayCurrency(currency string) PayOption -``` - -#### Parameters - - - -#### Returns - -`PayOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 409. - -*** - -### WithPayDescription - -WithPayDescription sets a description for the payment. - -#### Signature - -```go -func WithPayDescription(desc string) PayOption -``` - -#### Parameters - - - -#### Returns - -`PayOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 424. - -*** - -### WithPayInputMethod - -WithPayInputMethod sets the payment input method. - -#### Signature - -```go -func WithPayInputMethod(method string) PayOption -``` - -#### Parameters - - - -#### Returns - -`PayOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 359. - -*** - -### WithPayLanguage - -WithPayLanguage sets the language for payment prompts. - -#### Signature - -```go -func WithPayLanguage(language string) PayOption -``` - -#### Parameters - - - -#### Returns - -`PayOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 414. - -*** - -### WithPayMaxAttempts - -WithPayMaxAttempts sets the maximum number of payment attempts. - -#### Signature - -```go -func WithPayMaxAttempts(max string) PayOption -``` - -#### Parameters - - - -#### Returns - -`PayOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 379. - -*** - -### WithPayMinPostalCodeLength - -WithPayMinPostalCodeLength sets the minimum postal code length. - -#### Signature - -```go -func WithPayMinPostalCodeLength(length string) PayOption -``` - -#### Parameters - - - -#### Returns - -`PayOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 394. - -*** - -### WithPayParameters - -WithPayParameters sets additional payment parameters. - -#### Signature - -```go -func WithPayParameters(parameters []map[string]any) PayOption -``` - -#### Parameters - - - -#### Returns - -`PayOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 434. - -*** - -### WithPayPaymentMethod - -WithPayPaymentMethod sets the payment method (e.g. "credit-card"). - -#### Signature - -```go -func WithPayPaymentMethod(method string) PayOption -``` - -#### Parameters - - - -#### Returns - -`PayOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 369. - -*** - -### WithPayPostalCode - -WithPayPostalCode sets whether to collect postal code. - -#### Signature - -```go -func WithPayPostalCode(code string) PayOption -``` - -#### Parameters - - - -#### Returns - -`PayOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 389. - -*** - -### WithPayPrompts - -WithPayPrompts sets custom payment prompts. - -#### Signature - -```go -func WithPayPrompts(prompts []map[string]any) PayOption -``` - -#### Parameters - - - -#### Returns - -`PayOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 439. - -*** - -### WithPaySecurityCode - -WithPaySecurityCode sets whether to collect security code. - -#### Signature - -```go -func WithPaySecurityCode(code string) PayOption -``` - -#### Parameters - - - -#### Returns - -`PayOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 384. - -*** - -### WithPayStatusURL - -WithPayStatusURL sets the payment status callback URL. - -#### Signature - -```go -func WithPayStatusURL(url string) PayOption -``` - -#### Parameters - - - -#### Returns - -`PayOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 364. - -*** - -### WithPayTimeout - -WithPayTimeout sets the timeout string for the payment session. - -#### Signature - -```go -func WithPayTimeout(timeout string) PayOption -``` - -#### Parameters - - - -#### Returns - -`PayOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 374. - -*** - -### WithPayTokenType - -WithPayTokenType sets the payment token type. - -#### Signature - -```go -func WithPayTokenType(tokenType string) PayOption -``` - -#### Parameters - - - -#### Returns - -`PayOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 399. - -*** - -### WithPayValidCardTypes - -WithPayValidCardTypes sets the valid card types string. - -#### Signature - -```go -func WithPayValidCardTypes(types string) PayOption -``` - -#### Parameters - - - -#### Returns - -`PayOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 429. - -*** - -### WithPayVoice - -WithPayVoice sets the voice for payment prompts. - -#### Signature - -```go -func WithPayVoice(voice string) PayOption -``` - -#### Parameters - - - -#### Returns - -`PayOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 419. - -*** - -### WithPlayControlID - -WithPlayControlID sets an explicit control\_id for the play action. Mirrors Python's play(control\_id=...). When omitted the SDK auto-generates a UUID. The same key is honored by play\_and\_collect. - -#### Signature - -```go -func WithPlayControlID(id string) PlayOption -``` - -#### Parameters - - - -#### Returns - -`PlayOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 27. - -*** - -### WithPlayDirection - -WithPlayDirection sets the play direction (e.g. "self" / "peer" / "both"). - -#### Signature - -```go -func WithPlayDirection(dir string) PlayOption -``` - -#### Parameters - - - -#### Returns - -`PlayOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 34. - -*** - -### WithPlayLoop - -WithPlayLoop sets the number of loop iterations for playback. - -#### Signature - -```go -func WithPlayLoop(n int) PlayOption -``` - -#### Parameters - - - -#### Returns - -`PlayOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 41. - -*** - -### WithPlayOnCompleted - -WithPlayOnCompleted registers a callback fired when the play action reaches a terminal state. Mirrors Python's play(on\_completed=...). - -#### Signature - -```go -func WithPlayOnCompleted(cb func(*RelayEvent)) PlayOption -``` - -#### Parameters - - - -#### Returns - -`PlayOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 49. - -*** - -### WithPlayVolume - -WithPlayVolume sets the volume for playback in dB. - -#### Signature - -```go -func WithPlayVolume(db float64) PlayOption -``` - -#### Parameters - - - -#### Returns - -`PlayOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 18. - -*** - -### WithProject - -WithProject sets the project ID for authentication. - -#### Signature - -```go -func WithProject(id string) ClientOption -``` - -#### Parameters - - - -#### Returns - -`ClientOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 490. - -*** - -### WithRecordAudio - -WithRecordAudio sets the audio config map for the record action's "record": \{"audio": ...\} payload. Mirrors Python's record(audio=...). - -#### Signature - -```go -func WithRecordAudio(audio map[string]any) RecordOption -``` - -#### Parameters - - - -#### Returns - -`RecordOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 259. - -*** - -### WithRecordBeep - -WithRecordBeep enables a beep before recording. - -#### Signature - -```go -func WithRecordBeep(beep bool) RecordOption -``` - -#### Parameters - - - -#### Returns - -`RecordOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 197. - -*** - -### WithRecordControlID - -WithRecordControlID sets an explicit control\_id for the record action. Mirrors Python's record(control\_id=...). - -#### Signature - -```go -func WithRecordControlID(id string) RecordOption -``` - -#### Parameters - - - -#### Returns - -`RecordOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 251. - -*** - -### WithRecordDirection - -WithRecordDirection sets the recording direction ("listen", "speak", "both"). - -#### Signature - -```go -func WithRecordDirection(dir string) RecordOption -``` - -#### Parameters - - - -#### Returns - -`RecordOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 222. - -*** - -### WithRecordEndSilenceTimeout - -WithRecordEndSilenceTimeout sets the end-of-speech silence timeout in seconds. - -#### Signature - -```go -func WithRecordEndSilenceTimeout(t float64) RecordOption -``` - -#### Parameters - - - -#### Returns - -`RecordOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 243. - -*** - -### WithRecordFormat - -WithRecordFormat sets the recording format (e.g. "wav", "mp3"). The parameter is the defined string type swaig.RecordFormat: the Format\* constants give autocomplete + a compile-time typo check, while Go's untyped-constant auto-conversion keeps a bare "wav" literal compiling. The value is stored as a plain string so the wire shape is unchanged. - -#### Signature - -```go -func WithRecordFormat(format swaig.RecordFormat) RecordOption -``` - -#### Parameters - - - -#### Returns - -`RecordOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 208. - -*** - -### WithRecordInitialTimeout - -WithRecordInitialTimeout sets the initial timeout in seconds. - -#### Signature - -```go -func WithRecordInitialTimeout(t float64) RecordOption -``` - -#### Parameters - - - -#### Returns - -`RecordOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 236. - -*** - -### WithRecordOnCompleted - -WithRecordOnCompleted registers a callback fired when the record action reaches a terminal state. Mirrors Python's record(on\_completed=...). - -#### Signature - -```go -func WithRecordOnCompleted(cb func(*RelayEvent)) RecordOption -``` - -#### Parameters - - - -#### Returns - -`RecordOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 268. - -*** - -### WithRecordStereo - -WithRecordStereo enables stereo recording. - -#### Signature - -```go -func WithRecordStereo(stereo bool) RecordOption -``` - -#### Parameters - - - -#### Returns - -`RecordOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 215. - -*** - -### WithRecordTerminators - -WithRecordTerminators sets DTMF terminators to stop recording. - -#### Signature - -```go -func WithRecordTerminators(terminators string) RecordOption -``` - -#### Parameters - - - -#### Returns - -`RecordOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 229. - -*** - -### WithRingtoneDuration - -WithRingtoneDuration sets how long the ringtone plays, in seconds (Python play\_ringtone duration). It is nested inside the ringtone media params, matching Python's “\{"type":"ringtone","params":\{"duration":...\}\}“. - -#### Signature - -```go -func WithRingtoneDuration(seconds float64) RingtoneOption -``` - -#### Parameters - - - -#### Returns - -`RingtoneOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 114. - -*** - -### WithRingtoneVolume - -WithRingtoneVolume sets the playback volume in dB (Python play\_ringtone volume). - -#### Signature - -```go -func WithRingtoneVolume(db float64) RingtoneOption -``` - -#### Parameters - - - -#### Returns - -`RingtoneOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 119. - -*** - -### WithSpace - -WithSpace sets the SignalWire space (e.g. "example.signalwire.com"). - -#### Signature - -```go -func WithSpace(space string) ClientOption -``` - -#### Parameters - - - -#### Returns - -`ClientOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 511. - -*** - -### WithStreamCodec - -WithStreamCodec sets the stream audio codec. - -#### Signature - -```go -func WithStreamCodec(codec string) StreamOption -``` - -#### Parameters - - - -#### Returns - -`StreamOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 301. - -*** - -### WithStreamControlID - -WithStreamControlID supplies an explicit control\_id for the stream action, matching Python's stream(control\_id=...). - -#### Signature - -```go -func WithStreamControlID(id string) StreamOption -``` - -#### Parameters - - - -#### Returns - -`StreamOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 289. - -*** - -### WithStreamDirection - -WithStreamDirection sets the stream direction. - -#### Signature - -```go -func WithStreamDirection(dir string) StreamOption -``` - -#### Parameters - - - -#### Returns - -`StreamOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 294. - -*** - -### WithToken - -WithToken sets the API token for authentication. - -#### Signature - -```go -func WithToken(token string) ClientOption -``` - -#### Parameters - - - -#### Returns - -`ClientOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 497. - -*** - -### WithTTSGender - -WithTTSGender sets the TTS voice gender (Python play\_tts/prompt\_tts gender). The parameter is the defined string type TTSGender: the GenderMale / GenderFemale constants give autocomplete + a compile-time typo check, while Go's untyped-constant auto-conversion keeps a bare "female" literal compiling. The value is stored as a plain string so the wire shape is identical to the reference's str gender. - -#### Signature - -```go -func WithTTSGender(gender TTSGender) TTSOption -``` - -#### Parameters - - - -#### Returns - -`TTSOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 86. - -*** - -### WithTTSLanguage - -WithTTSLanguage sets the TTS language (Python play\_tts/prompt\_tts language). - -#### Signature - -```go -func WithTTSLanguage(language string) TTSOption -``` - -#### Parameters - - - -#### Returns - -`TTSOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 76. - -*** - -### WithTTSVoice - -WithTTSVoice sets the TTS voice (Python play\_tts/prompt\_tts voice). - -#### Signature - -```go -func WithTTSVoice(voice string) TTSOption -``` - -#### Parameters - - - -#### Returns - -`TTSOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 91. - -*** - -### WithTTSVolume - -WithTTSVolume sets the playback volume in dB (Python play\_tts/prompt\_tts volume). - -#### Signature - -```go -func WithTTSVolume(db float64) TTSOption -``` - -#### Parameters - - - -#### Returns - -`TTSOption` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 96. - -## Type Aliases - -### AIOption - -AIOption configures an AI operation on a call. - -#### Signature - -```go -type AIOption alias -``` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 444. - -*** - -### AMDOption - -AMDOption configures a DetectAnsweringMachine call. Each option maps to one Python detect\_answering\_machine keyword argument and is nested inside the “\{"type":"machine","params":\{...\}\}“ detect media entry — only the options the caller supplies are emitted (matching Python's only-provided-keys behavior). - -#### Signature - -```go -type AMDOption alias -``` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 142. - -*** - -### AudioOption - -AudioOption configures a PlayAudio or PromptAudio call. - -#### Signature - -```go -type AudioOption alias -``` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 101. - -*** - -### ClientOption - -ClientOption configures the RELAY Client. - -#### Signature - -```go -type ClientOption alias -``` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 487. - -*** - -### ConferenceOption - -ConferenceOption configures a JoinConference call. - -#### Signature - -```go -type ConferenceOption alias -``` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 308. - -*** - -### ConnectOption - -ConnectOption configures a Connect call. - -#### Signature - -```go -type ConnectOption alias -``` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 275. - -*** - -### DetectDigitOption - -DetectDigitOption configures a DetectDigit call. - -#### Signature - -```go -type DetectDigitOption alias -``` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 124. - -*** - -### DetectFaxOption - -DetectFaxOption configures a DetectFax call. - -#### Signature - -```go -type DetectFaxOption alias -``` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 180. - -*** - -### DialOption - -DialOption configures a Dial (outbound call) operation. - -#### Signature - -```go -type DialOption alias -``` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 532. - -*** - -### FaxOption - -FaxOption configures a SendFax call. - -#### Signature - -```go -type FaxOption alias -``` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 332. - -*** - -### MessageOption - -MessageOption configures a SendMessage operation. - -#### Signature - -```go -type MessageOption alias -``` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 581. - -*** - -### PayOption - -PayOption configures a Pay call. - -#### Signature - -```go -type PayOption alias -``` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 350. - -*** - -### PlayOption - -PlayOption configures a Play call. - -#### Signature - -```go -type PlayOption alias -``` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 15. - -*** - -### RecordOption - -RecordOption configures a Record call. - -#### Signature - -```go -type RecordOption alias -``` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 194. - -*** - -### RingtoneOption - -RingtoneOption configures a PlayRingtone call. - -#### Signature - -```go -type RingtoneOption alias -``` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 109. - -*** - -### StreamOption - -StreamOption configures a Stream call. - -#### Signature - -```go -type StreamOption alias -``` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 285. - -*** - -### TTSOption - -TTSOption configures a PlayTTS or PromptTTS call. It sets the language / gender / voice fields nested inside the “\{"type":"tts","params":\{...\}\}“ media entry and the top-level volume on the play frame. - -#### Signature - -```go -type TTSOption alias -``` - -#### Source - -[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) - -Line 73. - -## Enums - -### CallState - -CallState is the lifecycle state of a Call as a typed defined-string kind. The underlying string is the exact wire token (e.g. "answered"), so a CallState is interchangeable with the bare string the reference uses. - -Server-emitted and growable: prefer IsKnown()/IsTerminal() over an exhaustive switch so an unrecognized future state does not break callers. - -#### Signature - -```go -type CallState alias -``` - -#### Methods - -##### IsKnown - -IsKnown reports whether s is one of the documented call lifecycle states. A false result means the server emitted a state this SDK build doesn't name yet — the value is still carried, just not recognized. - -###### Signature - -```go -func (CallState) IsKnown() bool -``` - -###### Returns - -`bool` - -###### Source - -[`pkg/relay/states.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/states.go) - -Line 58. - -*** - -##### IsTerminal - -IsTerminal reports whether s is a terminal call state (no further transitions expected). For a call the single terminal state is "ended", matching Python's CALL\_STATE\_ENDED gate in relay/call.py (the \_ended future resolves only on "ended"). - -###### Signature - -```go -func (CallState) IsTerminal() bool -``` - -###### Returns - -`bool` - -###### Source - -[`pkg/relay/states.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/states.go) - -Line 70. - -*** - -##### String - -String returns the wire token (identical to the underlying string). - -###### Signature - -```go -func (CallState) String() string -``` - -###### Returns - -`string` - -###### Source - -[`pkg/relay/states.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/states.go) - -Line 53. - -#### Source - -[`pkg/relay/states.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/states.go) - -Line 39. - -*** - -### DialState - -DialState is the outcome state of a calling.dial operation as a typed defined-string kind, read from the wire "dial\_state" field. It is a SEPARATE vocabulary from CallState (and from the connect/bridge states): a dial progresses dialing -> answered (winner found) or dialing -> failed (no device answered). Grounded in Python relay/client.py:950. - -Distinct Go type from CallState/MessageState so the three can never be mixed. - -#### Signature - -```go -type DialState alias -``` - -#### Methods - -##### IsKnown - -IsKnown reports whether s is one of the documented dial outcome states. - -###### Signature - -```go -func (DialState) IsKnown() bool -``` - -###### Returns - -`bool` - -###### Source - -[`pkg/relay/states.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/states.go) - -Line 99. - -*** - -##### IsTerminal - -IsTerminal reports whether s is a terminal dial outcome — "answered" (a winning call was found) or "failed" (no device answered). "dialing" is progress and is NOT terminal. Mirrors Python's \_handle\_dial\_event, which resolves the dial future on "answered", rejects it on "failed", and treats "dialing" as a progress event that doesn't settle the future (relay/client.py:976-1006). - -###### Signature - -```go -func (DialState) IsTerminal() bool -``` - -###### Returns - -`bool` - -###### Source - -[`pkg/relay/states.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/states.go) - -Line 113. - -*** - -##### String - -String returns the wire token (identical to the underlying string). - -###### Signature - -```go -func (DialState) String() string -``` - -###### Returns - -`string` - -###### Source - -[`pkg/relay/states.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/states.go) - -Line 96. - -#### Source - -[`pkg/relay/states.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/states.go) - -Line 85. - -*** - -### MessageState - -MessageState is the delivery lifecycle state of a Message as a typed defined-string kind. The underlying string is the exact wire token (the "message\_state" field), so it is interchangeable with the bare string the reference uses. - -Server-emitted and growable: prefer IsKnown()/IsTerminal(). A SEPARATE vocabulary from CallState/DialState — distinct Go type. - -#### Signature - -```go -type MessageState alias -``` - -#### Methods - -##### IsKnown - -IsKnown reports whether s is one of the documented message delivery states. - -###### Signature - -```go -func (MessageState) IsKnown() bool -``` - -###### Returns - -`bool` - -###### Source - -[`pkg/relay/states.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/states.go) - -Line 146. - -*** - -##### IsTerminal - -IsTerminal reports whether s is a terminal OUTBOUND delivery state — one of delivered, undelivered, failed — matching Python's MESSAGE\_TERMINAL\_STATES (relay/constants.py). These are the states on which an outbound send settles. - -Note: the inbound terminal state "received" is intentionally NOT counted here, to mirror Python exactly (received is excluded from MESSAGE\_TERMINAL\_STATES — the inbound flow doesn't await). The internal helper isTerminalMessageState (message.go) additionally treats "received" as terminal so a Wait() on an inbound message returns immediately; that is a separate, behavior-only concern and is deliberately not folded into this grounded predicate. - -###### Signature - -```go -func (MessageState) IsTerminal() bool -``` - -###### Returns - -`bool` - -###### Source - -[`pkg/relay/states.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/states.go) - -Line 166. - -*** - -##### String - -String returns the wire token (identical to the underlying string). - -###### Signature - -```go -func (MessageState) String() string -``` - -###### Returns - -`string` - -###### Source - -[`pkg/relay/states.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/states.go) - -Line 143. - -#### Source - -[`pkg/relay/states.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/states.go) - -Line 128. - -*** - -### TTSGender - -TTSGender is the closed set of text-to-speech voice genders as a defined string type with typed constants. WithTTSGender (the play\_tts / prompt\_tts gender option) takes it, giving Go callers editor autocompletion plus call-site typo checking — a bare string like "femail" only fails downstream, whereas a mistyped constant fails to compile. - -Because Go auto-converts untyped string-constant literals to a defined string type, every call site keeps working both ways: - -``` -relay.WithTTSGender(relay.GenderFemale) // typed const — autocompleted -relay.WithTTSGender("female") // bare string literal still compiles -``` - -TTSGender is a string subtype, so the value written into the \{"type":"tts","params":\{"gender":...\}\} media entry is byte-identical to the bare string the reference uses — parity with Python's play\_tts/prompt\_tts gender keyword (a plain str). - -#### Signature - -```go -type TTSGender alias -``` - -#### Examples - - - - ```go - relay.WithTTSGender(relay.GenderFemale) // typed const — autocompleted - relay.WithTTSGender("female") // bare string literal still compiles - ``` - - - - ```go - relay.WithTTSGender(relay.GenderFemale) // typed const — autocompleted - relay.WithTTSGender("female") // bare string literal still compiles - ``` - - - -#### Source - -[`pkg/relay/tts_gender.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/tts_gender.go) - -Line 19. - -## Source - -[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/message-receive-event/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/message-receive-event/index.mdx deleted file mode 100644 index fb5ba3820f..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/message-receive-event/index.mdx +++ /dev/null @@ -1,55 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/message-receive-event" -title: "MessageReceiveEvent" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.MessageReceiveEvent" - parent: "github.com/signalwire/signalwire-go/pkg/relay" - module: "github.com.signalwire.signalwire-go.pkg.relay" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" ---- -# `MessageReceiveEvent` - -MessageReceiveEvent represents a messaging.receive event. - -## Signature - -```go -type MessageReceiveEvent struct -``` - -## Properties - - - - - - - - - - - - - - - MessageState matches Python's message\_state field. - - - - - - - - - - -## Source - -[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) - -Line 703. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/message-state-event/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/message-state-event/index.mdx deleted file mode 100644 index dcbf30e19a..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/message-state-event/index.mdx +++ /dev/null @@ -1,67 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/message-state-event" -title: "MessageStateEvent" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.MessageStateEvent" - parent: "github.com/signalwire/signalwire-go/pkg/relay" - module: "github.com.signalwire.signalwire-go.pkg.relay" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" ---- -# `MessageStateEvent` - -MessageStateEvent represents a messaging.state event. - -## Signature - -```go -type MessageStateEvent struct -``` - -## Properties - - - Body matches Python's body field. - - - - Context matches Python's context field. - - - - - - - - Media matches Python's media: list\[str] field. - - - - - - MessageState reads wire key "message\_state" matching Python's message\_state field. (Replaces the previous State field which incorrectly read "state".) - - - - - - - - Segments matches Python's segments: int field. - - - - Tags matches Python's tags: list\[str] field. - - - - -## Source - -[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) - -Line 756. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/message/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/message/index.mdx deleted file mode 100644 index 6723d462b0..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/message/index.mdx +++ /dev/null @@ -1,385 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/message" -title: "Message" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.Message" - parent: "github.com/signalwire/signalwire-go/pkg/relay" - module: "github.com.signalwire.signalwire-go.pkg.relay" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/message.go" ---- -# `Message` - -Message represents an SMS/MMS message tracked through its lifecycle. - -## Signature - -```go -type Message struct -``` - -## Methods - -### Body - -Body returns the text body of the message. - -#### Signature - -```go -func (*Message) Body() string -``` - -#### Returns - -`string` - -#### Source - -[`pkg/relay/message.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/message.go) - -Line 60. - -*** - -### Context - -Context returns the RELAY context on which this message was received. - -#### Signature - -```go -func (*Message) Context() string -``` - -#### Returns - -`string` - -#### Source - -[`pkg/relay/message.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/message.go) - -Line 48. - -*** - -### Direction - -Direction returns "inbound" or "outbound". - -#### Signature - -```go -func (*Message) Direction() string -``` - -#### Returns - -`string` - -#### Source - -[`pkg/relay/message.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/message.go) - -Line 51. - -*** - -### FromNumber - -FromNumber returns the sender number. - -#### Signature - -```go -func (*Message) FromNumber() string -``` - -#### Returns - -`string` - -#### Source - -[`pkg/relay/message.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/message.go) - -Line 54. - -*** - -### IsDone - -IsDone returns true if the message has reached a terminal state. - -#### Signature - -```go -func (*Message) IsDone() bool -``` - -#### Returns - -`bool` - -#### Source - -[`pkg/relay/message.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/message.go) - -Line 123. - -*** - -### Media - -Media returns the list of media URLs attached to the message. - -#### Signature - -```go -func (*Message) Media() []string -``` - -#### Returns - -`[]string` - -#### Source - -[`pkg/relay/message.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/message.go) - -Line 63. - -*** - -### MessageID - -MessageID returns the unique message identifier. - -#### Signature - -```go -func (*Message) MessageID() string -``` - -#### Returns - -`string` - -#### Source - -[`pkg/relay/message.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/message.go) - -Line 45. - -*** - -### MessageState - -MessageState returns the current message state as a typed MessageState ALONGSIDE the bare-string State() accessor (kept for parity with the Python reference). The typed kind gives callers IsTerminal()/IsKnown() predicates and compile-time distinctness from CallState/DialState; its underlying string equals State() exactly. Additive port idiom — see states.go and PORT\_ADDITIONS.md. - -#### Signature - -```go -func (*Message) MessageState() MessageState -``` - -#### Returns - -`MessageState` - -#### Source - -[`pkg/relay/message.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/message.go) - -Line 81. - -*** - -### On - -On registers an event handler called when message state changes. - -#### Signature - -```go -func (*Message) On(handler func(*RelayEvent)) -``` - -#### Parameters - - - -#### Source - -[`pkg/relay/message.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/message.go) - -Line 130. - -*** - -### Reason - -Reason returns the failure reason if the message failed. - -#### Signature - -```go -func (*Message) Reason() string -``` - -#### Returns - -`string` - -#### Source - -[`pkg/relay/message.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/message.go) - -Line 88. - -*** - -### Result - -Result returns the terminal RelayEvent if the message has reached a terminal state, or nil if not yet done. This is the non-blocking equivalent of Python's Message.result property. - -#### Signature - -```go -func (*Message) Result() *RelayEvent -``` - -#### Returns - -`*RelayEvent` - -#### Source - -[`pkg/relay/message.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/message.go) - -Line 100. - -*** - -### Segments - -Segments returns the number of SMS segments. - -#### Signature - -```go -func (*Message) Segments() int -``` - -#### Returns - -`int` - -#### Source - -[`pkg/relay/message.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/message.go) - -Line 66. - -*** - -### State - -State returns the current message state. - -#### Signature - -```go -func (*Message) State() string -``` - -#### Returns - -`string` - -#### Source - -[`pkg/relay/message.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/message.go) - -Line 69. - -*** - -### Tags - -Tags returns the tags associated with the message. - -#### Signature - -```go -func (*Message) Tags() []string -``` - -#### Returns - -`[]string` - -#### Source - -[`pkg/relay/message.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/message.go) - -Line 95. - -*** - -### ToNumber - -ToNumber returns the recipient number. - -#### Signature - -```go -func (*Message) ToNumber() string -``` - -#### Returns - -`string` - -#### Source - -[`pkg/relay/message.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/message.go) - -Line 57. - -*** - -### Wait - -Wait blocks until the message reaches a terminal state or the context is cancelled. Returns the final event or the context error. - -#### Signature - -```go -func (*Message) Wait(ctx context.Context) (*RelayEvent, error) -``` - -#### Parameters - - - -#### Returns - -`(*RelayEvent, error)` - -#### Source - -[`pkg/relay/message.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/message.go) - -Line 111. - -## Source - -[`pkg/relay/message.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/message.go) - -Line 9. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/pay-action/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/pay-action/index.mdx deleted file mode 100644 index 19e18e48de..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/pay-action/index.mdx +++ /dev/null @@ -1,55 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/pay-action" -title: "PayAction" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.PayAction" - parent: "github.com/signalwire/signalwire-go/pkg/relay" - module: "github.com.signalwire.signalwire-go.pkg.relay" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go" ---- -# `PayAction` - -PayAction represents a long-running pay operation. - -## Signature - -```go -type PayAction struct -``` - -## Properties - - - -## Methods - -### Stop - -Stop sends calling.pay.stop to halt the active pay operation. - -#### Signature - -```go -func (*PayAction) Stop() error -``` - -#### Returns - -`error` - -#### Source - -[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) - -Line 482. - -## Source - -[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) - -Line 470. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/pay-event/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/pay-event/index.mdx deleted file mode 100644 index f67388b323..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/pay-event/index.mdx +++ /dev/null @@ -1,39 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/pay-event" -title: "PayEvent" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.PayEvent" - parent: "github.com/signalwire/signalwire-go/pkg/relay" - module: "github.com.signalwire.signalwire-go.pkg.relay" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" ---- -# `PayEvent` - -PayEvent represents a calling.call.pay event. - -## Signature - -```go -type PayEvent struct -``` - -## Properties - - - - - - - - - -## Source - -[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) - -Line 547. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/play-action/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/play-action/index.mdx deleted file mode 100644 index f27cb9c34e..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/play-action/index.mdx +++ /dev/null @@ -1,125 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/play-action" -title: "PlayAction" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.PlayAction" - parent: "github.com/signalwire/signalwire-go/pkg/relay" - module: "github.com.signalwire.signalwire-go.pkg.relay" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go" ---- -# `PlayAction` - -PlayAction represents a long-running play operation with media controls. - -## Signature - -```go -type PlayAction struct -``` - -## Properties - - - -## Methods - -### Pause - -Pause pauses the currently playing media. - -#### Signature - -```go -func (*PlayAction) Pause() error -``` - -#### Returns - -`error` - -#### Source - -[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) - -Line 158. - -*** - -### Resume - -Resume resumes paused media playback. - -#### Signature - -```go -func (*PlayAction) Resume() error -``` - -#### Returns - -`error` - -#### Source - -[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) - -Line 171. - -*** - -### Stop - -Stop sends calling.play.stop to halt the active play operation. - -#### Signature - -```go -func (*PlayAction) Stop() error -``` - -#### Returns - -`error` - -#### Source - -[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) - -Line 145. - -*** - -### Volume - -Volume adjusts playback volume by the given dB offset. - -#### Signature - -```go -func (*PlayAction) Volume(db float64) error -``` - -#### Parameters - - - -#### Returns - -`error` - -#### Source - -[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) - -Line 184. - -## Source - -[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) - -Line 129. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/play-event/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/play-event/index.mdx deleted file mode 100644 index 7914b5a631..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/play-event/index.mdx +++ /dev/null @@ -1,37 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/play-event" -title: "PlayEvent" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.PlayEvent" - parent: "github.com/signalwire/signalwire-go/pkg/relay" - module: "github.com.signalwire.signalwire-go.pkg.relay" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" ---- -# `PlayEvent` - -PlayEvent represents a calling.call.play event. - -## Signature - -```go -type PlayEvent struct -``` - -## Properties - - - - - - - -## Source - -[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) - -Line 267. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/queue-event/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/queue-event/index.mdx deleted file mode 100644 index c1023cb2d3..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/queue-event/index.mdx +++ /dev/null @@ -1,51 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/queue-event" -title: "QueueEvent" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.QueueEvent" - parent: "github.com/signalwire/signalwire-go/pkg/relay" - module: "github.com.signalwire.signalwire-go.pkg.relay" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" ---- -# `QueueEvent` - -QueueEvent represents a calling.call.queue event. - -## Signature - -```go -type QueueEvent struct -``` - -## Properties - - - - - - - QueueID reads wire key "id" matching Python's queue\_id = p.get("id", ""). - - - - QueueName reads wire key "name" matching Python's queue\_name = p.get("name", ""). (Previously read "queue\_name" which was wrong.) - - - - - - - - Status reads wire key "status" matching Python's status field. (Replaces the previous State field which incorrectly read "state".) - - -## Source - -[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) - -Line 566. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/record-action/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/record-action/index.mdx deleted file mode 100644 index d1210a52c4..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/record-action/index.mdx +++ /dev/null @@ -1,103 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/record-action" -title: "RecordAction" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.RecordAction" - parent: "github.com/signalwire/signalwire-go/pkg/relay" - module: "github.com.signalwire.signalwire-go.pkg.relay" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go" ---- -# `RecordAction` - -RecordAction represents a long-running record operation. - -## Signature - -```go -type RecordAction struct -``` - -## Properties - - - -## Methods - -### Pause - -Pause pauses the active recording. An optional behavior string may be provided (e.g. "silence" or "skip") to control how the gap is handled. Pass no argument — or "" — to omit behavior, matching Python's pause(behavior: Optional\[str] = None) signature. - -#### Signature - -```go -func (*RecordAction) Pause(behavior ...string) error -``` - -#### Parameters - - - -#### Returns - -`error` - -#### Source - -[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) - -Line 228. - -*** - -### Resume - -Resume resumes a paused recording. - -#### Signature - -```go -func (*RecordAction) Resume() error -``` - -#### Returns - -`error` - -#### Source - -[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) - -Line 245. - -*** - -### Stop - -Stop sends calling.record.stop to halt the active recording. - -#### Signature - -```go -func (*RecordAction) Stop() error -``` - -#### Returns - -`error` - -#### Source - -[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) - -Line 212. - -## Source - -[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) - -Line 198. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/record-event/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/record-event/index.mdx deleted file mode 100644 index 765a2f0e31..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/record-event/index.mdx +++ /dev/null @@ -1,49 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/record-event" -title: "RecordEvent" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.RecordEvent" - parent: "github.com/signalwire/signalwire-go/pkg/relay" - module: "github.com.signalwire.signalwire-go.pkg.relay" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" ---- -# `RecordEvent` - -RecordEvent represents a calling.call.record event. - -## Signature - -```go -type RecordEvent struct -``` - -## Properties - - - - - Duration is float64 (matching Python's float) to preserve subsecond precision. - - - - Record is the raw nested record dict from the wire payload, matching Python's record field. - - - - - - - - - - -## Source - -[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) - -Line 284. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/refer-event/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/refer-event/index.mdx deleted file mode 100644 index 1e7c603102..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/refer-event/index.mdx +++ /dev/null @@ -1,43 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/refer-event" -title: "ReferEvent" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.ReferEvent" - parent: "github.com/signalwire/signalwire-go/pkg/relay" - module: "github.com.signalwire.signalwire-go.pkg.relay" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" ---- -# `ReferEvent` - -ReferEvent represents a calling.call.refer event. - -## Signature - -```go -type ReferEvent struct -``` - -## Properties - - - - - - - - - - - - - -## Source - -[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) - -Line 504. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/relay-error/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/relay-error/index.mdx deleted file mode 100644 index 2bd0d3cc93..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/relay-error/index.mdx +++ /dev/null @@ -1,83 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/relay-error" -title: "RelayError" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.RelayError" - parent: "github.com/signalwire/signalwire-go/pkg/relay" - module: "github.com.signalwire.signalwire-go.pkg.relay" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/error.go" ---- -# `RelayError` - -RelayError is a typed error returned by the RELAY protocol client. It carries the numeric code and message from the server so callers can programmatically inspect failures via errors.As. - -The error format matches Python's RelayError.**str**: "RELAY error \{code\}: \{message\}". - -A RelayError may also carry a wrapped sentinel (one of the Err\* values above) so the same value satisfies BOTH errors.As(\&RelayError) and errors.Is(err, ErrDialTimeout): the typed error preserves the server code/message, and the sentinel gives callers a stable, string-free branch. - -## Signature - -```go -type RelayError struct -``` - -## Properties - - - - - -## Methods - -### Error - -Error implements the built-in error interface. Format matches Python's RelayError.**str**: "RELAY error \{code\}: \{message\}". - -#### Signature - -```go -func (*RelayError) Error() string -``` - -#### Returns - -`string` - -#### Source - -[`pkg/relay/error.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/error.go) - -Line 59. - -*** - -### Unwrap - -Unwrap exposes the optional wrapped sentinel so errors.Is can match it. Returns nil for a plain server-issued RelayError (no sentinel attached). - -#### Signature - -```go -func (*RelayError) Unwrap() error -``` - -#### Returns - -`error` - -#### Source - -[`pkg/relay/error.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/error.go) - -Line 65. - -## Source - -[`pkg/relay/error.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/error.go) - -Line 51. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/relay-event/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/relay-event/index.mdx deleted file mode 100644 index 558e2232fd..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/relay-event/index.mdx +++ /dev/null @@ -1,225 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/relay-event" -title: "RelayEvent" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.RelayEvent" - parent: "github.com/signalwire/signalwire-go/pkg/relay" - module: "github.com.signalwire.signalwire-go.pkg.relay" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" ---- -# `RelayEvent` - -RelayEvent is the base event type for all events received from the SignalWire RELAY service. It carries an event type string and a generic parameter map that can be queried via helper methods. - -## Signature - -```go -type RelayEvent struct -``` - -## Properties - - - CallID is the call identifier, populated from the "call\_id" wire key. Python base class always carries this field. - - - - - - - - Timestamp is the event timestamp (float for subsecond precision), populated from the "timestamp" wire key. - - -## Methods - -### GetBool - -GetBool returns the boolean value for a key in params, or false if missing/wrong type. - -#### Signature - -```go -func (*RelayEvent) GetBool(key string) bool -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) - -Line 107. - -*** - -### GetBoolPtr - -GetBoolPtr returns a \*bool for a key in params, or nil if the key is absent. This matches Python's Optional\[bool] = None semantics. - -#### Signature - -```go -func (*RelayEvent) GetBoolPtr(key string) *bool -``` - -#### Parameters - - - -#### Returns - -`*bool` - -#### Source - -[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) - -Line 131. - -*** - -### GetFloat64 - -GetFloat64 returns the float64 value for a key in params, or 0.0 if missing/wrong type. This preserves subsecond precision for duration and timestamp fields. - -#### Signature - -```go -func (*RelayEvent) GetFloat64(key string) float64 -``` - -#### Parameters - - - -#### Returns - -`float64` - -#### Source - -[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) - -Line 81. - -*** - -### GetInt - -GetInt returns the integer value for a key in params, or 0 if missing/wrong type. - -#### Signature - -```go -func (*RelayEvent) GetInt(key string) int -``` - -#### Parameters - - - -#### Returns - -`int` - -#### Source - -[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) - -Line 56. - -*** - -### GetMap - -GetMap returns the nested map for a key in params, or nil if missing/wrong type. - -#### Signature - -```go -func (*RelayEvent) GetMap(key string) map[string]any -``` - -#### Parameters - - - -#### Returns - -`map[string]any` - -#### Source - -[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) - -Line 156. - -*** - -### GetString - -GetString returns the string value for a key in params, or "" if missing/wrong type. - -#### Signature - -```go -func (*RelayEvent) GetString(key string) string -``` - -#### Parameters - - - -#### Returns - -`string` - -#### Source - -[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) - -Line 37. - -*** - -### GetStringSlice - -GetStringSlice returns a \[]string for a key in params whose wire value is \[]any. Returns nil if absent or wrong type. Matches Python list\[str] field behavior. - -#### Signature - -```go -func (*RelayEvent) GetStringSlice(key string) []string -``` - -#### Parameters - - - -#### Returns - -`[]string` - -#### Source - -[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) - -Line 173. - -## Source - -[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) - -Line 11. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/send-digits-event/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/send-digits-event/index.mdx deleted file mode 100644 index 0ffa22968d..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/send-digits-event/index.mdx +++ /dev/null @@ -1,37 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/send-digits-event" -title: "SendDigitsEvent" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.SendDigitsEvent" - parent: "github.com/signalwire/signalwire-go/pkg/relay" - module: "github.com.signalwire.signalwire-go.pkg.relay" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" ---- -# `SendDigitsEvent` - -SendDigitsEvent represents a calling.call.send\_digits event. - -## Signature - -```go -type SendDigitsEvent struct -``` - -## Properties - - - - - - - -## Source - -[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) - -Line 451. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/standalone-collect-action/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/standalone-collect-action/index.mdx deleted file mode 100644 index 3e7b43ec0c..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/standalone-collect-action/index.mdx +++ /dev/null @@ -1,77 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/standalone-collect-action" -title: "StandaloneCollectAction" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.StandaloneCollectAction" - parent: "github.com/signalwire/signalwire-go/pkg/relay" - module: "github.com.signalwire.signalwire-go.pkg.relay" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go" ---- -# `StandaloneCollectAction` - -StandaloneCollectAction represents a standalone collect (without play). - -## Signature - -```go -type StandaloneCollectAction struct -``` - -## Properties - - - -## Methods - -### StartInputTimers - -StartInputTimers starts the initial\_timeout timer on an active standalone collect, equivalent to Python's StandaloneCollectAction.start\_input\_timers(). - -#### Signature - -```go -func (*StandaloneCollectAction) StartInputTimers() error -``` - -#### Returns - -`error` - -#### Source - -[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) - -Line 373. - -*** - -### Stop - -Stop sends calling.collect.stop to halt the standalone collect operation. - -#### Signature - -```go -func (*StandaloneCollectAction) Stop() error -``` - -#### Returns - -`error` - -#### Source - -[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) - -Line 359. - -## Source - -[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) - -Line 345. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/stream-action/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/stream-action/index.mdx deleted file mode 100644 index 7fbb7dd37d..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/stream-action/index.mdx +++ /dev/null @@ -1,55 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/stream-action" -title: "StreamAction" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.StreamAction" - parent: "github.com/signalwire/signalwire-go/pkg/relay" - module: "github.com.signalwire.signalwire-go.pkg.relay" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go" ---- -# `StreamAction` - -StreamAction represents a long-running media stream operation. - -## Signature - -```go -type StreamAction struct -``` - -## Properties - - - -## Methods - -### Stop - -Stop sends calling.stream.stop to halt the active stream operation. - -#### Signature - -```go -func (*StreamAction) Stop() error -``` - -#### Returns - -`error` - -#### Source - -[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) - -Line 457. - -## Source - -[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) - -Line 445. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/stream-event/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/stream-event/index.mdx deleted file mode 100644 index 7558164377..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/stream-event/index.mdx +++ /dev/null @@ -1,45 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/stream-event" -title: "StreamEvent" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.StreamEvent" - parent: "github.com/signalwire/signalwire-go/pkg/relay" - module: "github.com.signalwire.signalwire-go.pkg.relay" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" ---- -# `StreamEvent` - -StreamEvent represents a calling.call.stream event. - -## Signature - -```go -type StreamEvent struct -``` - -## Properties - - - - - Name is the stream name, matching Python's name field. - - - - - - - - URL is the stream URL, matching Python's url field. - - -## Source - -[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) - -Line 428. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/tap-action/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/tap-action/index.mdx deleted file mode 100644 index a5d2297d2d..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/tap-action/index.mdx +++ /dev/null @@ -1,55 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/tap-action" -title: "TapAction" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.TapAction" - parent: "github.com/signalwire/signalwire-go/pkg/relay" - module: "github.com.signalwire.signalwire-go.pkg.relay" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go" ---- -# `TapAction` - -TapAction represents a long-running tap operation. - -## Signature - -```go -type TapAction struct -``` - -## Properties - - - -## Methods - -### Stop - -Stop sends calling.tap.stop to halt the active tap operation. - -#### Signature - -```go -func (*TapAction) Stop() error -``` - -#### Returns - -`error` - -#### Source - -[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) - -Line 432. - -## Source - -[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) - -Line 420. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/tap-event/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/tap-event/index.mdx deleted file mode 100644 index 6c1aa2d299..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/tap-event/index.mdx +++ /dev/null @@ -1,43 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/tap-event" -title: "TapEvent" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.TapEvent" - parent: "github.com/signalwire/signalwire-go/pkg/relay" - module: "github.com.signalwire.signalwire-go.pkg.relay" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" ---- -# `TapEvent` - -TapEvent represents a calling.call.tap event. - -## Signature - -```go -type TapEvent struct -``` - -## Properties - - - - - Device is the tap device dict, matching Python's device field. - - - - - - - - -## Source - -[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) - -Line 406. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/transcribe-action/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/transcribe-action/index.mdx deleted file mode 100644 index 5622a38435..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/transcribe-action/index.mdx +++ /dev/null @@ -1,55 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/transcribe-action" -title: "TranscribeAction" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.TranscribeAction" - parent: "github.com/signalwire/signalwire-go/pkg/relay" - module: "github.com.signalwire.signalwire-go.pkg.relay" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go" ---- -# `TranscribeAction` - -TranscribeAction represents a long-running transcription operation. - -## Signature - -```go -type TranscribeAction struct -``` - -## Properties - - - -## Methods - -### Stop - -Stop sends calling.transcribe.stop to halt the active transcription. - -#### Signature - -```go -func (*TranscribeAction) Stop() error -``` - -#### Returns - -`error` - -#### Source - -[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) - -Line 508. - -## Source - -[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) - -Line 495. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/transcribe-event/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/transcribe-event/index.mdx deleted file mode 100644 index 8c98f94fb4..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/transcribe-event/index.mdx +++ /dev/null @@ -1,55 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay/transcribe-event" -title: "TranscribeEvent" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.TranscribeEvent" - parent: "github.com/signalwire/signalwire-go/pkg/relay" - module: "github.com.signalwire.signalwire-go.pkg.relay" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" ---- -# `TranscribeEvent` - -TranscribeEvent represents a calling.call.transcribe event. - -## Signature - -```go -type TranscribeEvent struct -``` - -## Properties - - - - - Duration is float64 for subsecond precision, matching Python's duration: float field. - - - - RecordingID is the recording identifier, matching Python's recording\_id field. - - - - - - Size is the recording size in bytes, matching Python's size field. - - - - - - - - URL is the transcription recording URL, matching Python's url field. - - -## Source - -[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) - -Line 613. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/addresses-namespace/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/addresses-namespace/index.mdx deleted file mode 100644 index e8211f711b..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/addresses-namespace/index.mdx +++ /dev/null @@ -1,137 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/addresses-namespace" -title: "AddressesNamespace" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.AddressesNamespace" - parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" - module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/addresses.go" ---- -# `AddressesNamespace` - -AddressesNamespace provides address management (no update endpoint). - -## Signature - -```go -type AddressesNamespace struct -``` - -## Properties - - - -## Methods - -### Create - -Create creates a new address. - -#### Signature - -```go -func (*AddressesNamespace) Create(data map[string]any) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/addresses.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/addresses.go) - -Line 28. - -*** - -### Delete - -Delete removes an address by ID. - -#### Signature - -```go -func (*AddressesNamespace) Delete(id string) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/addresses.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/addresses.go) - -Line 38. - -*** - -### Get - -Get retrieves an address by ID. - -#### Signature - -```go -func (*AddressesNamespace) Get(id string) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/addresses.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/addresses.go) - -Line 33. - -*** - -### List - -List lists all addresses. - -#### Signature - -```go -func (*AddressesNamespace) List(params map[string]string) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/addresses.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/addresses.go) - -Line 23. - -## Source - -[`pkg/rest/namespaces/addresses.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/addresses.go) - -Line 11. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/auto-materialized-webhook-resource/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/auto-materialized-webhook-resource/index.mdx deleted file mode 100644 index 4d40c0cbbe..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/auto-materialized-webhook-resource/index.mdx +++ /dev/null @@ -1,63 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/auto-materialized-webhook-resource" -title: "AutoMaterializedWebhookResource" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.AutoMaterializedWebhookResource" - parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" - module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go" ---- -# `AutoMaterializedWebhookResource` - -AutoMaterializedWebhookResource is a Fabric webhook resource that is normally auto-created by the phone\_numbers.Set\*Webhook helpers. Exposed for backwards compatibility: list/get/update/delete work as usual, but Create now emits a deprecation warning because creating a webhook resource directly produces an orphan that isn't bound to any phone number. - -## Signature - -```go -type AutoMaterializedWebhookResource struct -``` - -## Properties - - - -## Methods - -### Create - - - **Deprecated.** Creating a webhook Fabric resource directly produces an orphan not bound to any phone number. Use phone\_numbers.SetSwmlWebhook or phone\_numbers.SetCxmlWebhook instead; setting call\_handler on the phone number causes the server to auto-materialize the webhook resource. See porting-sdk's phone-binding.md. - - -Create sends a POST to create a new webhook resource. - -#### Signature - -```go -func (*AutoMaterializedWebhookResource) Create(data map[string]any) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) - -Line 199. - -## Source - -[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) - -Line 182. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/call-flow-options/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/call-flow-options/index.mdx deleted file mode 100644 index 695a8a0812..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/call-flow-options/index.mdx +++ /dev/null @@ -1,39 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/call-flow-options" -title: "CallFlowOptions" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.CallFlowOptions" - parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" - module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/phone_numbers.go" ---- -# `CallFlowOptions` - -CallFlowOptions holds optional fields for SetCallFlow. - -## Signature - -```go -type CallFlowOptions struct -``` - -## Properties - - - Extra passes through additional wire-level fields. - - - - Version accepts "working\_copy" or "current\_deployed" (server default when omitted). - - -## Source - -[`pkg/rest/namespaces/phone_numbers.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/phone_numbers.go) - -Line 125. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/call-flows-resource/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/call-flows-resource/index.mdx deleted file mode 100644 index fc46405b61..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/call-flows-resource/index.mdx +++ /dev/null @@ -1,117 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/call-flows-resource" -title: "CallFlowsResource" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.CallFlowsResource" - parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" - module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go" ---- -# `CallFlowsResource` - -CallFlowsResource extends CrudResource with version management and a singular sub-resource path convention. - -## Signature - -```go -type CallFlowsResource struct -``` - -## Properties - - - -## Methods - -### DeployVersion - -DeployVersion deploys a new version of a call flow. - -#### Signature - -```go -func (*CallFlowsResource) DeployVersion(id string, data map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) - -Line 94. - -*** - -### ListAddresses - -ListAddresses lists addresses for a call flow (uses singular "call\_flow" path). - -#### Signature - -```go -func (*CallFlowsResource) ListAddresses(id string, params map[string]string) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) - -Line 82. - -*** - -### ListVersions - -ListVersions lists versions of a call flow. - -#### Signature - -```go -func (*CallFlowsResource) ListVersions(id string, params map[string]string) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) - -Line 88. - -## Source - -[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) - -Line 77. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/calling-namespace/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/calling-namespace/index.mdx deleted file mode 100644 index 821d53d4eb..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/calling-namespace/index.mdx +++ /dev/null @@ -1,1065 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/calling-namespace" -title: "CallingNamespace" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.CallingNamespace" - parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" - module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go" ---- -# `CallingNamespace` - -CallingNamespace provides REST-based call control. All commands are dispatched as POST /api/calling/calls with a "command" field. - -## Signature - -```go -type CallingNamespace struct -``` - -## Properties - - - -## Methods - -### AIHold - -AIHold puts the AI on hold. - -#### Signature - -```go -func (*CallingNamespace) AIHold(callID string, params map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) - -Line 196. - -*** - -### AIMessage - -AIMessage sends a message to the AI agent on a call. - -#### Signature - -```go -func (*CallingNamespace) AIMessage(callID string, params map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) - -Line 191. - -*** - -### AIStop - -AIStop stops the AI session. - -#### Signature - -```go -func (*CallingNamespace) AIStop(callID string, params map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) - -Line 206. - -*** - -### AIUnhold - -AIUnhold takes the AI off hold. - -#### Signature - -```go -func (*CallingNamespace) AIUnhold(callID string, params map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) - -Line 201. - -*** - -### Collect - -Collect starts input collection on a call. - -#### Signature - -```go -func (*CallingNamespace) Collect(callID string, params map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) - -Line 114. - -*** - -### CollectStartInputTimers - -CollectStartInputTimers starts input timers for collection. - -#### Signature - -```go -func (*CallingNamespace) CollectStartInputTimers(callID string, params map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) - -Line 124. - -*** - -### CollectStop - -CollectStop stops input collection. - -#### Signature - -```go -func (*CallingNamespace) CollectStop(callID string, params map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) - -Line 119. - -*** - -### Denoise - -Denoise enables denoising on a call. - -#### Signature - -```go -func (*CallingNamespace) Denoise(callID string, params map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) - -Line 167. - -*** - -### DenoiseStop - -DenoiseStop disables denoising. - -#### Signature - -```go -func (*CallingNamespace) DenoiseStop(callID string, params map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) - -Line 172. - -*** - -### Detect - -Detect starts detection (e.g., answering machine) on a call. - -#### Signature - -```go -func (*CallingNamespace) Detect(callID string, params map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) - -Line 131. - -*** - -### DetectStop - -DetectStop stops detection. - -#### Signature - -```go -func (*CallingNamespace) DetectStop(callID string, params map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) - -Line 136. - -*** - -### Dial - -Dial initiates a new call. - -#### Signature - -```go -func (*CallingNamespace) Dial(params map[string]any) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) - -Line 38. - -*** - -### Disconnect - -Disconnect disconnects a call. - -#### Signature - -```go -func (*CallingNamespace) Disconnect(callID string, params map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) - -Line 58. - -*** - -### End - -End terminates a call. - -#### Signature - -```go -func (*CallingNamespace) End(callID string, params map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) - -Line 48. - -*** - -### LiveTranscribe - -LiveTranscribe starts live transcription. - -#### Signature - -```go -func (*CallingNamespace) LiveTranscribe(callID string, params map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) - -Line 213. - -*** - -### LiveTranslate - -LiveTranslate starts live translation. - -#### Signature - -```go -func (*CallingNamespace) LiveTranslate(callID string, params map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) - -Line 218. - -*** - -### Play - -Play starts playback on a call. - -#### Signature - -```go -func (*CallingNamespace) Play(callID string, params map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) - -Line 65. - -*** - -### PlayPause - -PlayPause pauses playback. - -#### Signature - -```go -func (*CallingNamespace) PlayPause(callID string, params map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) - -Line 70. - -*** - -### PlayResume - -PlayResume resumes playback. - -#### Signature - -```go -func (*CallingNamespace) PlayResume(callID string, params map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) - -Line 75. - -*** - -### PlayStop - -PlayStop stops playback. - -#### Signature - -```go -func (*CallingNamespace) PlayStop(callID string, params map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) - -Line 80. - -*** - -### PlayVolume - -PlayVolume adjusts playback volume. - -#### Signature - -```go -func (*CallingNamespace) PlayVolume(callID string, params map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) - -Line 85. - -*** - -### ReceiveFaxStop - -ReceiveFaxStop stops receiving a fax. - -#### Signature - -```go -func (*CallingNamespace) ReceiveFaxStop(callID string, params map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) - -Line 230. - -*** - -### Record - -Record starts recording on a call. - -#### Signature - -```go -func (*CallingNamespace) Record(callID string, params map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) - -Line 92. - -*** - -### RecordPause - -RecordPause pauses recording. - -#### Signature - -```go -func (*CallingNamespace) RecordPause(callID string, params map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) - -Line 97. - -*** - -### RecordResume - -RecordResume resumes recording. - -#### Signature - -```go -func (*CallingNamespace) RecordResume(callID string, params map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) - -Line 102. - -*** - -### RecordStop - -RecordStop stops recording. - -#### Signature - -```go -func (*CallingNamespace) RecordStop(callID string, params map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) - -Line 107. - -*** - -### Refer - -Refer sends a SIP REFER on a call. - -#### Signature - -```go -func (*CallingNamespace) Refer(callID string, params map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) - -Line 237. - -*** - -### SendFaxStop - -SendFaxStop stops sending a fax. - -#### Signature - -```go -func (*CallingNamespace) SendFaxStop(callID string, params map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) - -Line 225. - -*** - -### Stream - -Stream starts streaming on a call. - -#### Signature - -```go -func (*CallingNamespace) Stream(callID string, params map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) - -Line 155. - -*** - -### StreamStop - -StreamStop stops streaming. - -#### Signature - -```go -func (*CallingNamespace) StreamStop(callID string, params map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) - -Line 160. - -*** - -### Tap - -Tap starts tapping a call. - -#### Signature - -```go -func (*CallingNamespace) Tap(callID string, params map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) - -Line 143. - -*** - -### TapStop - -TapStop stops tapping. - -#### Signature - -```go -func (*CallingNamespace) TapStop(callID string, params map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) - -Line 148. - -*** - -### Transcribe - -Transcribe starts transcription on a call. - -#### Signature - -```go -func (*CallingNamespace) Transcribe(callID string, params map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) - -Line 179. - -*** - -### TranscribeStop - -TranscribeStop stops transcription. - -#### Signature - -```go -func (*CallingNamespace) TranscribeStop(callID string, params map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) - -Line 184. - -*** - -### Transfer - -Transfer transfers a call. - -#### Signature - -```go -func (*CallingNamespace) Transfer(callID string, params map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) - -Line 53. - -*** - -### Update - -Update updates call parameters. - -#### Signature - -```go -func (*CallingNamespace) Update(params map[string]any) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) - -Line 43. - -*** - -### UserEvent - -UserEvent sends a custom user event on a call. - -#### Signature - -```go -func (*CallingNamespace) UserEvent(callID string, params map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) - -Line 244. - -## Source - -[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) - -Line 12. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/chat-namespace/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/chat-namespace/index.mdx deleted file mode 100644 index d7dea9c85b..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/chat-namespace/index.mdx +++ /dev/null @@ -1,59 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/chat-namespace" -title: "ChatNamespace" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.ChatNamespace" - parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" - module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/chat.go" ---- -# `ChatNamespace` - -ChatNamespace provides Chat token generation. - -## Signature - -```go -type ChatNamespace struct -``` - -## Properties - - - -## Methods - -### CreateToken - -CreateToken creates a Chat token. - -#### Signature - -```go -func (*ChatNamespace) CreateToken(data map[string]any) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/chat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/chat.go) - -Line 23. - -## Source - -[`pkg/rest/namespaces/chat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/chat.go) - -Line 11. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-accounts/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-accounts/index.mdx deleted file mode 100644 index e641194235..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-accounts/index.mdx +++ /dev/null @@ -1,139 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-accounts" -title: "CompatAccounts" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.CompatAccounts" - parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" - module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go" ---- -# `CompatAccounts` - -CompatAccounts provides compat account/subproject management. - -## Signature - -```go -type CompatAccounts struct -``` - -## Properties - - - -## Methods - -### Create - -Create creates a new compat account. - -#### Signature - -```go -func (*CompatAccounts) Create(data map[string]any) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) - -Line 25. - -*** - -### Get - -Get retrieves a compat account by SID. - -#### Signature - -```go -func (*CompatAccounts) Get(sid string) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) - -Line 30. - -*** - -### List - -List lists all compat accounts. - -#### Signature - -```go -func (*CompatAccounts) List(params map[string]string) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) - -Line 20. - -*** - -### Update - -Update updates a compat account by SID. - -#### Signature - -```go -func (*CompatAccounts) Update(sid string, data map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) - -Line 35. - -## Source - -[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) - -Line 15. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-applications/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-applications/index.mdx deleted file mode 100644 index 9928821c91..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-applications/index.mdx +++ /dev/null @@ -1,61 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-applications" -title: "CompatApplications" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.CompatApplications" - parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" - module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go" ---- -# `CompatApplications` - -CompatApplications provides compat application management. - -## Signature - -```go -type CompatApplications struct -``` - -## Properties - - - -## Methods - -### Update - -Update updates an application (uses POST per Twilio compat). - -#### Signature - -```go -func (*CompatApplications) Update(sid string, data map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) - -Line 266. - -## Source - -[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) - -Line 261. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-calls/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-calls/index.mdx deleted file mode 100644 index 05bd9abb12..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-calls/index.mdx +++ /dev/null @@ -1,177 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-calls" -title: "CompatCalls" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.CompatCalls" - parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" - module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go" ---- -# `CompatCalls` - -CompatCalls provides compat call management with recording and stream sub-resources. - -## Signature - -```go -type CompatCalls struct -``` - -## Properties - - - -## Methods - -### StartRecording - -StartRecording starts recording on a call. - -#### Signature - -```go -func (*CompatCalls) StartRecording(callSID string, data map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) - -Line 52. - -*** - -### StartStream - -StartStream starts a stream on a call. - -#### Signature - -```go -func (*CompatCalls) StartStream(callSID string, data map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) - -Line 62. - -*** - -### StopStream - -StopStream stops a stream on a call. - -#### Signature - -```go -func (*CompatCalls) StopStream(callSID string, streamSID string, data map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) - -Line 67. - -*** - -### Update - -Update updates a call (uses POST per Twilio compat). - -#### Signature - -```go -func (*CompatCalls) Update(sid string, data map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) - -Line 47. - -*** - -### UpdateRecording - -UpdateRecording updates a recording on a call. - -#### Signature - -```go -func (*CompatCalls) UpdateRecording(callSID string, recordingSID string, data map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) - -Line 57. - -## Source - -[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) - -Line 42. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-conferences/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-conferences/index.mdx deleted file mode 100644 index fca1490055..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-conferences/index.mdx +++ /dev/null @@ -1,399 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-conferences" -title: "CompatConferences" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.CompatConferences" - parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" - module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go" ---- -# `CompatConferences` - -CompatConferences provides compat conference management with participants, recordings, and streams. - -## Signature - -```go -type CompatConferences struct -``` - -## Properties - - - -## Methods - -### DeleteRecording - -DeleteRecording deletes a recording from a conference. - -#### Signature - -```go -func (*CompatConferences) DeleteRecording(conferenceSID string, recordingSID string) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) - -Line 188. - -*** - -### Get - -Get retrieves a conference by SID. - -#### Signature - -```go -func (*CompatConferences) Get(sid string) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) - -Line 139. - -*** - -### GetParticipant - -GetParticipant retrieves a participant from a conference. - -#### Signature - -```go -func (*CompatConferences) GetParticipant(conferenceSID string, callSID string) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) - -Line 156. - -*** - -### GetRecording - -GetRecording retrieves a recording from a conference. - -#### Signature - -```go -func (*CompatConferences) GetRecording(conferenceSID string, recordingSID string) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) - -Line 178. - -*** - -### List - -List lists all conferences. - -#### Signature - -```go -func (*CompatConferences) List(params map[string]string) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) - -Line 134. - -*** - -### ListParticipants - -ListParticipants lists participants in a conference. - -#### Signature - -```go -func (*CompatConferences) ListParticipants(conferenceSID string, params map[string]string) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) - -Line 151. - -*** - -### ListRecordings - -ListRecordings lists recordings for a conference. - -#### Signature - -```go -func (*CompatConferences) ListRecordings(conferenceSID string, params map[string]string) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) - -Line 173. - -*** - -### RemoveParticipant - -RemoveParticipant removes a participant from a conference. - -#### Signature - -```go -func (*CompatConferences) RemoveParticipant(conferenceSID string, callSID string) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) - -Line 166. - -*** - -### StartStream - -StartStream starts a stream on a conference. - -#### Signature - -```go -func (*CompatConferences) StartStream(conferenceSID string, data map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) - -Line 195. - -*** - -### StopStream - -StopStream stops a stream on a conference. - -#### Signature - -```go -func (*CompatConferences) StopStream(conferenceSID string, streamSID string, data map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) - -Line 200. - -*** - -### Update - -Update updates a conference. - -#### Signature - -```go -func (*CompatConferences) Update(sid string, data map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) - -Line 144. - -*** - -### UpdateParticipant - -UpdateParticipant updates a participant in a conference. - -#### Signature - -```go -func (*CompatConferences) UpdateParticipant(conferenceSID string, callSID string, data map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) - -Line 161. - -*** - -### UpdateRecording - -UpdateRecording updates a recording in a conference. - -#### Signature - -```go -func (*CompatConferences) UpdateRecording(conferenceSID string, recordingSID string, data map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) - -Line 183. - -## Source - -[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) - -Line 129. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-faxes/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-faxes/index.mdx deleted file mode 100644 index 3a38b99ee6..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-faxes/index.mdx +++ /dev/null @@ -1,145 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-faxes" -title: "CompatFaxes" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.CompatFaxes" - parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" - module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go" ---- -# `CompatFaxes` - -CompatFaxes provides compat fax management with media sub-resources. - -## Signature - -```go -type CompatFaxes struct -``` - -## Properties - - - -## Methods - -### DeleteMedia - -DeleteMedia deletes a media item from a fax. - -#### Signature - -```go -func (*CompatFaxes) DeleteMedia(faxSID string, mediaSID string) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) - -Line 121. - -*** - -### GetMedia - -GetMedia retrieves a specific media item from a fax. - -#### Signature - -```go -func (*CompatFaxes) GetMedia(faxSID string, mediaSID string) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) - -Line 116. - -*** - -### ListMedia - -ListMedia lists media for a fax. - -#### Signature - -```go -func (*CompatFaxes) ListMedia(faxSID string, params map[string]string) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) - -Line 111. - -*** - -### Update - -Update updates a fax (uses POST per Twilio compat). - -#### Signature - -```go -func (*CompatFaxes) Update(sid string, data map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) - -Line 106. - -## Source - -[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) - -Line 101. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-laml-bins/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-laml-bins/index.mdx deleted file mode 100644 index 22188efeda..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-laml-bins/index.mdx +++ /dev/null @@ -1,61 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-laml-bins" -title: "CompatLamlBins" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.CompatLamlBins" - parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" - module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go" ---- -# `CompatLamlBins` - -CompatLamlBins provides compat cXML/LaML script management. - -## Signature - -```go -type CompatLamlBins struct -``` - -## Properties - - - -## Methods - -### Update - -Update updates a LaML bin (uses POST per Twilio compat). - -#### Signature - -```go -func (*CompatLamlBins) Update(sid string, data map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) - -Line 278. - -## Source - -[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) - -Line 273. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-messages/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-messages/index.mdx deleted file mode 100644 index 3dcfd51ab1..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-messages/index.mdx +++ /dev/null @@ -1,145 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-messages" -title: "CompatMessages" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.CompatMessages" - parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" - module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go" ---- -# `CompatMessages` - -CompatMessages provides compat message management with media sub-resources. - -## Signature - -```go -type CompatMessages struct -``` - -## Properties - - - -## Methods - -### DeleteMedia - -DeleteMedia deletes a media item from a message. - -#### Signature - -```go -func (*CompatMessages) DeleteMedia(messageSID string, mediaSID string) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) - -Line 94. - -*** - -### GetMedia - -GetMedia retrieves a specific media item from a message. - -#### Signature - -```go -func (*CompatMessages) GetMedia(messageSID string, mediaSID string) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) - -Line 89. - -*** - -### ListMedia - -ListMedia lists media for a message. - -#### Signature - -```go -func (*CompatMessages) ListMedia(messageSID string, params map[string]string) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) - -Line 84. - -*** - -### Update - -Update updates a message (uses POST per Twilio compat). - -#### Signature - -```go -func (*CompatMessages) Update(sid string, data map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) - -Line 79. - -## Source - -[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) - -Line 74. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-namespace/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-namespace/index.mdx deleted file mode 100644 index a4f26168a2..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-namespace/index.mdx +++ /dev/null @@ -1,55 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-namespace" -title: "CompatNamespace" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.CompatNamespace" - parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" - module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go" ---- -# `CompatNamespace` - -CompatNamespace provides the Twilio-compatible LAML API with AccountSid scoping. - -## Signature - -```go -type CompatNamespace struct -``` - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - -## Source - -[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) - -Line 378. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-phone-numbers/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-phone-numbers/index.mdx deleted file mode 100644 index 0f8fa38c5a..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-phone-numbers/index.mdx +++ /dev/null @@ -1,273 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-phone-numbers" -title: "CompatPhoneNumbers" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.CompatPhoneNumbers" - parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" - module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go" ---- -# `CompatPhoneNumbers` - -CompatPhoneNumbers provides compat phone number management. - -## Signature - -```go -type CompatPhoneNumbers struct -``` - -## Properties - - - -## Methods - -### Delete - -Delete releases an incoming phone number. - -#### Signature - -```go -func (*CompatPhoneNumbers) Delete(sid string) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) - -Line 233. - -*** - -### Get - -Get retrieves an incoming phone number by SID. - -#### Signature - -```go -func (*CompatPhoneNumbers) Get(sid string) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) - -Line 223. - -*** - -### ImportNumber - -ImportNumber imports an externally-hosted phone number. - -#### Signature - -```go -func (*CompatPhoneNumbers) ImportNumber(data map[string]any) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) - -Line 238. - -*** - -### List - -List lists all incoming phone numbers. - -#### Signature - -```go -func (*CompatPhoneNumbers) List(params map[string]string) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) - -Line 213. - -*** - -### ListAvailableCountries - -ListAvailableCountries lists countries with available numbers. - -#### Signature - -```go -func (*CompatPhoneNumbers) ListAvailableCountries(params map[string]string) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) - -Line 244. - -*** - -### Purchase - -Purchase purchases a phone number. - -#### Signature - -```go -func (*CompatPhoneNumbers) Purchase(data map[string]any) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) - -Line 218. - -*** - -### SearchLocal - -SearchLocal searches for available local numbers in a country. - -#### Signature - -```go -func (*CompatPhoneNumbers) SearchLocal(country string, params map[string]string) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) - -Line 249. - -*** - -### SearchTollFree - -SearchTollFree searches for available toll-free numbers in a country. - -#### Signature - -```go -func (*CompatPhoneNumbers) SearchTollFree(country string, params map[string]string) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) - -Line 254. - -*** - -### Update - -Update updates an incoming phone number. - -#### Signature - -```go -func (*CompatPhoneNumbers) Update(sid string, data map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) - -Line 228. - -## Source - -[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) - -Line 207. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-queues/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-queues/index.mdx deleted file mode 100644 index e76ce89d04..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-queues/index.mdx +++ /dev/null @@ -1,147 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-queues" -title: "CompatQueues" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.CompatQueues" - parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" - module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go" ---- -# `CompatQueues` - -CompatQueues provides compat queue management with members. - -## Signature - -```go -type CompatQueues struct -``` - -## Properties - - - -## Methods - -### DequeueMember - -DequeueMember dequeues a member from a queue. - -#### Signature - -```go -func (*CompatQueues) DequeueMember(queueSID string, callSID string, data map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) - -Line 305. - -*** - -### GetMember - -GetMember retrieves a member from a queue. - -#### Signature - -```go -func (*CompatQueues) GetMember(queueSID string, callSID string) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) - -Line 300. - -*** - -### ListMembers - -ListMembers lists members of a queue. - -#### Signature - -```go -func (*CompatQueues) ListMembers(queueSID string, params map[string]string) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) - -Line 295. - -*** - -### Update - -Update updates a queue (uses POST per Twilio compat). - -#### Signature - -```go -func (*CompatQueues) Update(sid string, data map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) - -Line 290. - -## Source - -[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) - -Line 285. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-recordings/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-recordings/index.mdx deleted file mode 100644 index b465304f81..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-recordings/index.mdx +++ /dev/null @@ -1,111 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-recordings" -title: "CompatRecordings" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.CompatRecordings" - parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" - module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go" ---- -# `CompatRecordings` - -CompatRecordings provides compat recording management. - -## Signature - -```go -type CompatRecordings struct -``` - -## Properties - - - -## Methods - -### Delete - -Delete removes a recording. - -#### Signature - -```go -func (*CompatRecordings) Delete(sid string) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) - -Line 327. - -*** - -### Get - -Get retrieves a recording by SID. - -#### Signature - -```go -func (*CompatRecordings) Get(sid string) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) - -Line 322. - -*** - -### List - -List lists all recordings. - -#### Signature - -```go -func (*CompatRecordings) List(params map[string]string) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) - -Line 317. - -## Source - -[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) - -Line 312. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-tokens/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-tokens/index.mdx deleted file mode 100644 index 7b09603970..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-tokens/index.mdx +++ /dev/null @@ -1,113 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-tokens" -title: "CompatTokens" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.CompatTokens" - parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" - module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go" ---- -# `CompatTokens` - -CompatTokens provides compat API token management. - -## Signature - -```go -type CompatTokens struct -``` - -## Properties - - - -## Methods - -### Create - -Create creates a new API token. - -#### Signature - -```go -func (*CompatTokens) Create(data map[string]any) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) - -Line 361. - -*** - -### Delete - -Delete removes an API token. - -#### Signature - -```go -func (*CompatTokens) Delete(tokenID string) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) - -Line 371. - -*** - -### Update - -Update modifies an API token. - -#### Signature - -```go -func (*CompatTokens) Update(tokenID string, data map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) - -Line 366. - -## Source - -[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) - -Line 356. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-transcriptions/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-transcriptions/index.mdx deleted file mode 100644 index 9f6c4f841f..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-transcriptions/index.mdx +++ /dev/null @@ -1,111 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/compat-transcriptions" -title: "CompatTranscriptions" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.CompatTranscriptions" - parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" - module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go" ---- -# `CompatTranscriptions` - -CompatTranscriptions provides compat transcription management. - -## Signature - -```go -type CompatTranscriptions struct -``` - -## Properties - - - -## Methods - -### Delete - -Delete removes a transcription. - -#### Signature - -```go -func (*CompatTranscriptions) Delete(sid string) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) - -Line 349. - -*** - -### Get - -Get retrieves a transcription by SID. - -#### Signature - -```go -func (*CompatTranscriptions) Get(sid string) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) - -Line 344. - -*** - -### List - -List lists all transcriptions. - -#### Signature - -```go -func (*CompatTranscriptions) List(params map[string]string) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) - -Line 339. - -## Source - -[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) - -Line 334. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/conference-logs/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/conference-logs/index.mdx deleted file mode 100644 index bd6a7ae604..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/conference-logs/index.mdx +++ /dev/null @@ -1,59 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/conference-logs" -title: "ConferenceLogs" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.ConferenceLogs" - parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" - module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/logs.go" ---- -# `ConferenceLogs` - -ConferenceLogs provides conference log queries. - -## Signature - -```go -type ConferenceLogs struct -``` - -## Properties - - - -## Methods - -### List - -List lists conference logs. - -#### Signature - -```go -func (*ConferenceLogs) List(params map[string]string) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/logs.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/logs.go) - -Line 74. - -## Source - -[`pkg/rest/namespaces/logs.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/logs.go) - -Line 69. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/conference-rooms-resource/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/conference-rooms-resource/index.mdx deleted file mode 100644 index 9bf008e1bd..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/conference-rooms-resource/index.mdx +++ /dev/null @@ -1,61 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/conference-rooms-resource" -title: "ConferenceRoomsResource" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.ConferenceRoomsResource" - parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" - module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go" ---- -# `ConferenceRoomsResource` - -ConferenceRoomsResource uses singular "conference\_room" for sub-resource paths. - -## Signature - -```go -type ConferenceRoomsResource struct -``` - -## Properties - - - -## Methods - -### ListAddresses - -ListAddresses lists addresses for a conference room. - -#### Signature - -```go -func (*ConferenceRoomsResource) ListAddresses(id string, params map[string]string) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) - -Line 107. - -## Source - -[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) - -Line 102. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/crud-resource/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/crud-resource/index.mdx deleted file mode 100644 index fc2af43e99..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/crud-resource/index.mdx +++ /dev/null @@ -1,169 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/crud-resource" -title: "CrudResource" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.CrudResource" - parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" - module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/common.go" ---- -# `CrudResource` - -CrudResource provides standard List, Create, Get, Update, Delete operations against a REST collection endpoint within a namespace. - -## Signature - -```go -type CrudResource struct -``` - -## Properties - - - - - "PATCH" (default) or "PUT" - - -## Methods - -### Create - -Create sends a POST request to create a new resource. - -#### Signature - -```go -func (*CrudResource) Create(data map[string]any) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/common.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/common.go) - -Line 68. - -*** - -### Delete - -Delete removes a resource by ID. It returns the parsed response body (or an empty map for 204 No Content) and any error. - -#### Signature - -```go -func (*CrudResource) Delete(id string) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/common.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/common.go) - -Line 88. - -*** - -### Get - -Get retrieves a single resource by ID. - -#### Signature - -```go -func (*CrudResource) Get(id string) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/common.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/common.go) - -Line 73. - -*** - -### List - -List retrieves all items from the collection. - -#### Signature - -```go -func (*CrudResource) List(params map[string]string) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/common.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/common.go) - -Line 63. - -*** - -### Update - -Update modifies an existing resource by ID. - -#### Signature - -```go -func (*CrudResource) Update(id string, data map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/common.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/common.go) - -Line 78. - -## Source - -[`pkg/rest/namespaces/common.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/common.go) - -Line 41. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/crud-with-addresses/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/crud-with-addresses/index.mdx deleted file mode 100644 index d7a8953bee..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/crud-with-addresses/index.mdx +++ /dev/null @@ -1,61 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/crud-with-addresses" -title: "CrudWithAddresses" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.CrudWithAddresses" - parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" - module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/common.go" ---- -# `CrudWithAddresses` - -CrudWithAddresses extends CrudResource with the nested addresses endpoint. Matches Python's CrudWithAddresses at \_base.py:109-113. Only resources that explicitly support the addresses sub-resource should embed this type; plain CrudResource does not expose ListAddresses. - -## Signature - -```go -type CrudWithAddresses struct -``` - -## Properties - - - -## Methods - -### ListAddresses - -ListAddresses lists addresses associated with the resource identified by id. - -#### Signature - -```go -func (*CrudWithAddresses) ListAddresses(id string, params map[string]string) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/common.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/common.go) - -Line 113. - -## Source - -[`pkg/rest/namespaces/common.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/common.go) - -Line 96. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/cxml-applications-resource/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/cxml-applications-resource/index.mdx deleted file mode 100644 index 3403563420..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/cxml-applications-resource/index.mdx +++ /dev/null @@ -1,89 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/cxml-applications-resource" -title: "CxmlApplicationsResource" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.CxmlApplicationsResource" - parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" - module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go" ---- -# `CxmlApplicationsResource` - -CxmlApplicationsResource exposes the fabric cXML applications sub-resource. Create is explicitly disallowed — cXML applications cannot be created via this API. This mirrors Python's CxmlApplicationsResource.create raising NotImplementedError (fabric.py:90). - -## Signature - -```go -type CxmlApplicationsResource struct -``` - -## Properties - - - -## Methods - -### Create - -Create always returns an error — cXML applications cannot be created via this API. The params argument is accepted for API parity with other CRUD resources but is reported in the error so the caller can see what payload was rejected. To create a new cXML application use a different API surface or the SignalWire dashboard. - -Mirrors Python's CxmlApplicationsResource.create raising NotImplementedError (signalwire/rest/namespaces/fabric.py:90). - -#### Signature - -```go -func (*CxmlApplicationsResource) Create(params map[string]any) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) - -Line 162. - -*** - -### ListAddresses - -ListAddresses lists addresses for a cXML application. - -#### Signature - -```go -func (*CxmlApplicationsResource) ListAddresses(id string, params map[string]string) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) - -Line 170. - -## Source - -[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) - -Line 150. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/cxml-webhook-options/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/cxml-webhook-options/index.mdx deleted file mode 100644 index 342323f0d4..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/cxml-webhook-options/index.mdx +++ /dev/null @@ -1,43 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/cxml-webhook-options" -title: "CxmlWebhookOptions" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.CxmlWebhookOptions" - parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" - module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/phone_numbers.go" ---- -# `CxmlWebhookOptions` - -CxmlWebhookOptions holds optional fields for SetCxmlWebhook. - -## Signature - -```go -type CxmlWebhookOptions struct -``` - -## Properties - - - Extra passes through additional wire-level fields. - - - - FallbackURL is used when the primary URL fails. - - - - StatusCallbackURL receives call status updates. - - -## Source - -[`pkg/rest/namespaces/phone_numbers.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/phone_numbers.go) - -Line 71. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/datasphere-documents/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/datasphere-documents/index.mdx deleted file mode 100644 index 3aacd9d433..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/datasphere-documents/index.mdx +++ /dev/null @@ -1,143 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/datasphere-documents" -title: "DatasphereDocuments" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.DatasphereDocuments" - parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" - module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/datasphere.go" ---- -# `DatasphereDocuments` - -DatasphereDocuments provides document management with search and chunk operations for the Datasphere API. - -## Signature - -```go -type DatasphereDocuments struct -``` - -## Properties - - - -## Methods - -### DeleteChunk - -DeleteChunk deletes a specific chunk from a document. - -#### Signature - -```go -func (*DatasphereDocuments) DeleteChunk(documentID string, chunkID string) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/datasphere.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/datasphere.go) - -Line 32. - -*** - -### GetChunk - -GetChunk retrieves a specific chunk from a document. - -#### Signature - -```go -func (*DatasphereDocuments) GetChunk(documentID string, chunkID string) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/datasphere.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/datasphere.go) - -Line 27. - -*** - -### ListChunks - -ListChunks lists chunks for a specific document. - -#### Signature - -```go -func (*DatasphereDocuments) ListChunks(documentID string, params map[string]string) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/datasphere.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/datasphere.go) - -Line 22. - -*** - -### Search - -Search performs a semantic search across documents. - -#### Signature - -```go -func (*DatasphereDocuments) Search(data map[string]any) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/datasphere.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/datasphere.go) - -Line 17. - -## Source - -[`pkg/rest/namespaces/datasphere.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/datasphere.go) - -Line 12. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/datasphere-namespace/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/datasphere-namespace/index.mdx deleted file mode 100644 index 1b12b5fc55..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/datasphere-namespace/index.mdx +++ /dev/null @@ -1,33 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/datasphere-namespace" -title: "DatasphereNamespace" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.DatasphereNamespace" - parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" - module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/datasphere.go" ---- -# `DatasphereNamespace` - -DatasphereNamespace groups Datasphere API resources. - -## Signature - -```go -type DatasphereNamespace struct -``` - -## Properties - - - -## Source - -[`pkg/rest/namespaces/datasphere.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/datasphere.go) - -Line 37. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/fabric-addresses/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/fabric-addresses/index.mdx deleted file mode 100644 index 0a131ddbc4..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/fabric-addresses/index.mdx +++ /dev/null @@ -1,85 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/fabric-addresses" -title: "FabricAddresses" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.FabricAddresses" - parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" - module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go" ---- -# `FabricAddresses` - -FabricAddresses provides read-only access to fabric addresses. - -## Signature - -```go -type FabricAddresses struct -``` - -## Properties - - - -## Methods - -### Get - -Get retrieves a fabric address by ID. - -#### Signature - -```go -func (*FabricAddresses) Get(id string) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) - -Line 275. - -*** - -### List - -List lists all fabric addresses. - -#### Signature - -```go -func (*FabricAddresses) List(params map[string]string) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) - -Line 270. - -## Source - -[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) - -Line 265. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/fabric-namespace/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/fabric-namespace/index.mdx deleted file mode 100644 index 40a4c3f74f..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/fabric-namespace/index.mdx +++ /dev/null @@ -1,69 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/fabric-namespace" -title: "FabricNamespace" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.FabricNamespace" - parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" - module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go" ---- -# `FabricNamespace` - -FabricNamespace groups all Fabric API resource types. - -## Signature - -```go -type FabricNamespace struct -``` - -## Properties - - - - - - - - - - - - - - - - - - - - - Special resources - - - - - - - - - - PUT-update resources - - - - PATCH-update resources SWMLWebhooks and CXMLWebhooks are auto-materialized: prefer PhoneNumbers.SetSwmlWebhook / SetCxmlWebhook for creation. Direct .Create still works for backcompat but emits a deprecation warning. - - - - -## Source - -[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) - -Line 333. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/fabric-tokens/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/fabric-tokens/index.mdx deleted file mode 100644 index 3e32227ef3..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/fabric-tokens/index.mdx +++ /dev/null @@ -1,163 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/fabric-tokens" -title: "FabricTokens" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.FabricTokens" - parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" - module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go" ---- -# `FabricTokens` - -FabricTokens provides subscriber, guest, invite, and embed token creation. - -## Signature - -```go -type FabricTokens struct -``` - -## Properties - - - -## Methods - -### CreateEmbedToken - -CreateEmbedToken creates an embed token. - -#### Signature - -```go -func (*FabricTokens) CreateEmbedToken(data map[string]any) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) - -Line 307. - -*** - -### CreateGuestToken - -CreateGuestToken creates a guest token. - -#### Signature - -```go -func (*FabricTokens) CreateGuestToken(data map[string]any) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) - -Line 302. - -*** - -### CreateInviteToken - -CreateInviteToken creates an invite token. - -#### Signature - -```go -func (*FabricTokens) CreateInviteToken(data map[string]any) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) - -Line 297. - -*** - -### CreateSubscriberToken - -CreateSubscriberToken creates a subscriber token. - -#### Signature - -```go -func (*FabricTokens) CreateSubscriberToken(data map[string]any) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) - -Line 287. - -*** - -### RefreshSubscriberToken - -RefreshSubscriberToken refreshes a subscriber token. - -#### Signature - -```go -func (*FabricTokens) RefreshSubscriberToken(data map[string]any) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) - -Line 292. - -## Source - -[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) - -Line 282. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/fax-logs/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/fax-logs/index.mdx deleted file mode 100644 index 6beb083353..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/fax-logs/index.mdx +++ /dev/null @@ -1,85 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/fax-logs" -title: "FaxLogs" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.FaxLogs" - parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" - module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/logs.go" ---- -# `FaxLogs` - -FaxLogs provides fax log queries. - -## Signature - -```go -type FaxLogs struct -``` - -## Properties - - - -## Methods - -### Get - -Get retrieves a specific fax log entry. - -#### Signature - -```go -func (*FaxLogs) Get(logID string) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/logs.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/logs.go) - -Line 62. - -*** - -### List - -List lists fax logs. - -#### Signature - -```go -func (*FaxLogs) List(params map[string]string) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/logs.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/logs.go) - -Line 57. - -## Source - -[`pkg/rest/namespaces/logs.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/logs.go) - -Line 52. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/generic-resources/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/generic-resources/index.mdx deleted file mode 100644 index 10301cbca7..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/generic-resources/index.mdx +++ /dev/null @@ -1,199 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/generic-resources" -title: "GenericResources" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.GenericResources" - parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" - module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go" ---- -# `GenericResources` - -GenericResources provides operations across all fabric resource types. - -## Signature - -```go -type GenericResources struct -``` - -## Properties - - - -## Methods - -### AssignDomainApplication - -AssignDomainApplication assigns a domain application to a resource. - -#### Signature - -```go -func (*GenericResources) AssignDomainApplication(id string, data map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) - -Line 258. - -*** - -### AssignPhoneRoute - - - **Deprecated.** This endpoint (POST /api/fabric/resources/\{id\}/phone\_routes) accepts only a narrow set of legacy resource types as the attach target. It does NOT work for swml\_webhook / cxml\_webhook / ai\_agent bindings — those are configured on the phone number and the Fabric resource is auto-materialized. Use phone\_numbers.SetSwmlWebhook, SetCxmlWebhook, SetAiAgent, etc. instead. See porting-sdk's phone-binding.md. - - -AssignPhoneRoute assigns a phone route to a resource. - -#### Signature - -```go -func (*GenericResources) AssignPhoneRoute(id string, data map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) - -Line 245. - -*** - -### Delete - -Delete removes a generic resource by ID. - -#### Signature - -```go -func (*GenericResources) Delete(id string) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) - -Line 228. - -*** - -### Get - -Get retrieves a generic resource by ID. - -#### Signature - -```go -func (*GenericResources) Get(id string) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) - -Line 223. - -*** - -### List - -List lists all generic resources. - -#### Signature - -```go -func (*GenericResources) List(params map[string]string) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) - -Line 218. - -*** - -### ListAddresses - -ListAddresses lists addresses for a generic resource. - -#### Signature - -```go -func (*GenericResources) ListAddresses(id string, params map[string]string) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) - -Line 233. - -## Source - -[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) - -Line 213. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/imported-numbers-namespace/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/imported-numbers-namespace/index.mdx deleted file mode 100644 index 807cc4d341..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/imported-numbers-namespace/index.mdx +++ /dev/null @@ -1,59 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/imported-numbers-namespace" -title: "ImportedNumbersNamespace" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.ImportedNumbersNamespace" - parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" - module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/imported_numbers.go" ---- -# `ImportedNumbersNamespace` - -ImportedNumbersNamespace provides imported phone number management. - -## Signature - -```go -type ImportedNumbersNamespace struct -``` - -## Properties - - - -## Methods - -### Create - -Create imports an externally-hosted phone number. - -#### Signature - -```go -func (*ImportedNumbersNamespace) Create(data map[string]any) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/imported_numbers.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/imported_numbers.go) - -Line 23. - -## Source - -[`pkg/rest/namespaces/imported_numbers.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/imported_numbers.go) - -Line 11. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/index.mdx deleted file mode 100644 index 1f12cd1442..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/index.mdx +++ /dev/null @@ -1,1467 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces" -title: "namespaces" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "module" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" - module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/addresses.go" ---- -# `namespaces` - -Package namespaces contains the individual API namespace implementations for the SignalWire REST client. - -## Signature - -```go -package namespaces -``` - -## Constants - - - PhoneCallHandler wire values accepted by phone\_numbers.Update. - - - - PhoneCallHandler wire values accepted by phone\_numbers.Update. - - - - PhoneCallHandler wire values accepted by phone\_numbers.Update. - - - - PhoneCallHandler wire values accepted by phone\_numbers.Update. - - - - PhoneCallHandler wire values accepted by phone\_numbers.Update. - - - - PhoneCallHandler wire values accepted by phone\_numbers.Update. - - - - PhoneCallHandler wire values accepted by phone\_numbers.Update. - - - - PhoneCallHandler wire values accepted by phone\_numbers.Update. - - - - PhoneCallHandler wire values accepted by phone\_numbers.Update. - - - - PhoneCallHandler wire values accepted by phone\_numbers.Update. - - - - PhoneCallHandler wire values accepted by phone\_numbers.Update. - - -## Classes - - - - AddressesNamespace provides address management (no update endpoint). - - - - AutoMaterializedWebhookResource is a Fabric webhook resource that is normally auto-created by the phone\_numbers.Set\*Webhook helpers. Exposed for backwards compatibility: list/get/update/delete work as usual, but Create now emits a deprecation warning because creating a webhook resource directly produces an orphan that isn't bound to any phone number. - - - - CallFlowOptions holds optional fields for SetCallFlow. - - - - CallFlowsResource extends CrudResource with version management and a singular sub-resource path convention. - - - - CallingNamespace provides REST-based call control. All commands are dispatched as POST /api/calling/calls with a "command" field. - - - - ChatNamespace provides Chat token generation. - - - - CompatAccounts provides compat account/subproject management. - - - - CompatApplications provides compat application management. - - - - CompatCalls provides compat call management with recording and stream sub-resources. - - - - CompatConferences provides compat conference management with participants, recordings, and streams. - - - - CompatFaxes provides compat fax management with media sub-resources. - - - - CompatLamlBins provides compat cXML/LaML script management. - - - - CompatMessages provides compat message management with media sub-resources. - - - - CompatNamespace provides the Twilio-compatible LAML API with AccountSid scoping. - - - - CompatPhoneNumbers provides compat phone number management. - - - - CompatQueues provides compat queue management with members. - - - - CompatRecordings provides compat recording management. - - - - CompatTokens provides compat API token management. - - - - CompatTranscriptions provides compat transcription management. - - - - ConferenceLogs provides conference log queries. - - - - ConferenceRoomsResource uses singular "conference\_room" for sub-resource paths. - - - - CrudResource provides standard List, Create, Get, Update, Delete operations against a REST collection endpoint within a namespace. - - - - CrudWithAddresses extends CrudResource with the nested addresses endpoint. Matches Python's CrudWithAddresses at \_base.py:109-113. Only resources that explicitly support the addresses sub-resource should embed this type; plain CrudResource does not expose ListAddresses. - - - - CxmlApplicationsResource exposes the fabric cXML applications sub-resource. Create is explicitly disallowed — cXML applications cannot be created via this API. This mirrors Python's CxmlApplicationsResource.create raising NotImplementedError (fabric.py:90). - - - - CxmlWebhookOptions holds optional fields for SetCxmlWebhook. - - - - DatasphereDocuments provides document management with search and chunk operations for the Datasphere API. - - - - DatasphereNamespace groups Datasphere API resources. - - - - FabricAddresses provides read-only access to fabric addresses. - - - - FabricNamespace groups all Fabric API resource types. - - - - FabricTokens provides subscriber, guest, invite, and embed token creation. - - - - FaxLogs provides fax log queries. - - - - GenericResources provides operations across all fabric resource types. - - - - ImportedNumbersNamespace provides imported phone number management. - - - - LogsNamespace groups all log query resources. - - - - LookupNamespace provides phone number lookup (carrier, CNAM). - - - - MessageLogs provides message log queries. - - - - MFANamespace provides multi-factor authentication via SMS or phone call. - - - - NumberGroupsNamespace provides number group management with membership operations. - - - - PhoneNumbersNamespace provides phone number management with search and typed helpers for binding an inbound call to a handler (SWML webhook, cXML webhook, AI agent, call flow, RELAY application/topic). - - - - ProjectNamespace groups project management resources. - - - - ProjectTokens provides project API token management. - - - - PubSubNamespace provides PubSub token generation. - - - - QueuesNamespace provides queue management with member operations. - - - - RecordingsNamespace provides recording management (read-only + delete). - - - - RegistryBrands provides 10DLC brand management. - - - - RegistryCampaigns provides 10DLC campaign management. - - - - RegistryNamespace groups all 10DLC Campaign Registry resources. - - - - RegistryNumbers provides 10DLC number assignment management. - - - - RegistryOrders provides 10DLC assignment order management. - - - - RelayTopicOptions holds optional fields for SetRelayTopic. - - - - Resource is a helper for building sub-paths from a base path. - - - - ShortCodesNamespace provides short code management (read + update only). - - - - SipProfileNamespace provides project SIP profile management (singleton resource). - - - - SubscribersResource extends CrudResource with SIP endpoint management. - - - - VerifiedCallersNamespace provides verified caller ID management with verification flow. - - - - VideoConferences provides video conference management with tokens and streams. - - - - VideoConferenceTokens provides video conference token management. - - - - VideoNamespace groups all Video API resources. - - - - VideoRoomRecordings provides video room recording management. - - - - VideoRooms provides video room management with stream sub-resources. - - - - VideoRoomSessions provides video room session management. - - - - VideoRoomTokens provides video room token generation. - - - - VideoStreams provides video stream management. - - - - VoiceLogs provides voice log queries. - - - -## Functions - -### AllPhoneCallHandlers - -AllPhoneCallHandlers returns every PhoneCallHandler value. Useful for enum-contract tests and for callers that need to validate or enumerate the set. - -#### Signature - -```go -func AllPhoneCallHandlers() []PhoneCallHandler -``` - -#### Returns - -`[]PhoneCallHandler` - -#### Source - -[`pkg/rest/namespaces/call_handler.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/call_handler.go) - -Line 58. - -*** - -### NewAddressesNamespace - -NewAddressesNamespace creates a new AddressesNamespace. - -#### Signature - -```go -func NewAddressesNamespace(client HTTPClient) *AddressesNamespace -``` - -#### Parameters - - - -#### Returns - -`*AddressesNamespace` - -#### Source - -[`pkg/rest/namespaces/addresses.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/addresses.go) - -Line 16. - -*** - -### NewCallingNamespace - -NewCallingNamespace creates a new CallingNamespace. - -#### Signature - -```go -func NewCallingNamespace(client HTTPClient) *CallingNamespace -``` - -#### Parameters - - - -#### Returns - -`*CallingNamespace` - -#### Source - -[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) - -Line 17. - -*** - -### NewChatNamespace - -NewChatNamespace creates a new ChatNamespace. - -#### Signature - -```go -func NewChatNamespace(client HTTPClient) *ChatNamespace -``` - -#### Parameters - - - -#### Returns - -`*ChatNamespace` - -#### Source - -[`pkg/rest/namespaces/chat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/chat.go) - -Line 16. - -*** - -### NewCompatNamespace - -NewCompatNamespace creates a new CompatNamespace with all sub-resources scoped to the given account SID. - -#### Signature - -```go -func NewCompatNamespace(client HTTPClient, accountSID string) *CompatNamespace -``` - -#### Parameters - - - - - -#### Returns - -`*CompatNamespace` - -#### Source - -[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) - -Line 395. - -*** - -### NewCrudResource - -NewCrudResource creates a CrudResource with PATCH as the update method. - -#### Signature - -```go -func NewCrudResource(client HTTPClient, path string) *CrudResource -``` - -#### Parameters - - - - - -#### Returns - -`*CrudResource` - -#### Source - -[`pkg/rest/namespaces/common.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/common.go) - -Line 47. - -*** - -### NewCrudResourcePUT - -NewCrudResourcePUT creates a CrudResource that uses PUT for updates. - -#### Signature - -```go -func NewCrudResourcePUT(client HTTPClient, path string) *CrudResource -``` - -#### Parameters - - - - - -#### Returns - -`*CrudResource` - -#### Source - -[`pkg/rest/namespaces/common.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/common.go) - -Line 55. - -*** - -### NewCrudWithAddresses - -NewCrudWithAddresses constructs a CrudWithAddresses backed by a PATCH-default CrudResource. Use NewCrudWithAddressesPUT for resources that update via PUT. - -#### Signature - -```go -func NewCrudWithAddresses(client HTTPClient, path string) *CrudWithAddresses -``` - -#### Parameters - - - - - -#### Returns - -`*CrudWithAddresses` - -#### Source - -[`pkg/rest/namespaces/common.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/common.go) - -Line 102. - -*** - -### NewCrudWithAddressesPUT - -NewCrudWithAddressesPUT constructs a CrudWithAddresses backed by a PUT-update CrudResource. - -#### Signature - -```go -func NewCrudWithAddressesPUT(client HTTPClient, path string) *CrudWithAddresses -``` - -#### Parameters - - - - - -#### Returns - -`*CrudWithAddresses` - -#### Source - -[`pkg/rest/namespaces/common.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/common.go) - -Line 108. - -*** - -### NewDatasphereNamespace - -NewDatasphereNamespace creates a new DatasphereNamespace. - -#### Signature - -```go -func NewDatasphereNamespace(client HTTPClient) *DatasphereNamespace -``` - -#### Parameters - - - -#### Returns - -`*DatasphereNamespace` - -#### Source - -[`pkg/rest/namespaces/datasphere.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/datasphere.go) - -Line 42. - -*** - -### NewFabricNamespace - -NewFabricNamespace creates a new FabricNamespace with all sub-resources initialized. - -#### Signature - -```go -func NewFabricNamespace(client HTTPClient) *FabricNamespace -``` - -#### Parameters - - - -#### Returns - -`*FabricNamespace` - -#### Source - -[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) - -Line 362. - -*** - -### NewImportedNumbersNamespace - -NewImportedNumbersNamespace creates a new ImportedNumbersNamespace. - -#### Signature - -```go -func NewImportedNumbersNamespace(client HTTPClient) *ImportedNumbersNamespace -``` - -#### Parameters - - - -#### Returns - -`*ImportedNumbersNamespace` - -#### Source - -[`pkg/rest/namespaces/imported_numbers.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/imported_numbers.go) - -Line 16. - -*** - -### NewLogsNamespace - -NewLogsNamespace creates a new LogsNamespace with all sub-resources initialized. - -#### Signature - -```go -func NewLogsNamespace(client HTTPClient) *LogsNamespace -``` - -#### Parameters - - - -#### Returns - -`*LogsNamespace` - -#### Source - -[`pkg/rest/namespaces/logs.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/logs.go) - -Line 89. - -*** - -### NewLookupNamespace - -NewLookupNamespace creates a new LookupNamespace. - -#### Signature - -```go -func NewLookupNamespace(client HTTPClient) *LookupNamespace -``` - -#### Parameters - - - -#### Returns - -`*LookupNamespace` - -#### Source - -[`pkg/rest/namespaces/lookup.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/lookup.go) - -Line 16. - -*** - -### NewMFANamespace - -NewMFANamespace creates a new MFANamespace. - -#### Signature - -```go -func NewMFANamespace(client HTTPClient) *MFANamespace -``` - -#### Parameters - - - -#### Returns - -`*MFANamespace` - -#### Source - -[`pkg/rest/namespaces/mfa.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/mfa.go) - -Line 16. - -*** - -### NewNumberGroupsNamespace - -NewNumberGroupsNamespace creates a new NumberGroupsNamespace. - -#### Signature - -```go -func NewNumberGroupsNamespace(client HTTPClient) *NumberGroupsNamespace -``` - -#### Parameters - - - -#### Returns - -`*NumberGroupsNamespace` - -#### Source - -[`pkg/rest/namespaces/number_groups.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/number_groups.go) - -Line 16. - -*** - -### NewPhoneNumbersNamespace - -NewPhoneNumbersNamespace creates a new PhoneNumbersNamespace. - -#### Signature - -```go -func NewPhoneNumbersNamespace(client HTTPClient) *PhoneNumbersNamespace -``` - -#### Parameters - - - -#### Returns - -`*PhoneNumbersNamespace` - -#### Source - -[`pkg/rest/namespaces/phone_numbers.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/phone_numbers.go) - -Line 26. - -*** - -### NewProjectNamespace - -NewProjectNamespace creates a new ProjectNamespace. - -#### Signature - -```go -func NewProjectNamespace(client HTTPClient) *ProjectNamespace -``` - -#### Parameters - - - -#### Returns - -`*ProjectNamespace` - -#### Source - -[`pkg/rest/namespaces/project.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/project.go) - -Line 36. - -*** - -### NewPubSubNamespace - -NewPubSubNamespace creates a new PubSubNamespace. - -#### Signature - -```go -func NewPubSubNamespace(client HTTPClient) *PubSubNamespace -``` - -#### Parameters - - - -#### Returns - -`*PubSubNamespace` - -#### Source - -[`pkg/rest/namespaces/pubsub.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/pubsub.go) - -Line 16. - -*** - -### NewQueuesNamespace - -NewQueuesNamespace creates a new QueuesNamespace. - -#### Signature - -```go -func NewQueuesNamespace(client HTTPClient) *QueuesNamespace -``` - -#### Parameters - - - -#### Returns - -`*QueuesNamespace` - -#### Source - -[`pkg/rest/namespaces/queues.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/queues.go) - -Line 16. - -*** - -### NewRecordingsNamespace - -NewRecordingsNamespace creates a new RecordingsNamespace. - -#### Signature - -```go -func NewRecordingsNamespace(client HTTPClient) *RecordingsNamespace -``` - -#### Parameters - - - -#### Returns - -`*RecordingsNamespace` - -#### Source - -[`pkg/rest/namespaces/recordings.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/recordings.go) - -Line 18. - -*** - -### NewRegistryNamespace - -NewRegistryNamespace creates a new RegistryNamespace with all sub-resources. - -#### Signature - -```go -func NewRegistryNamespace(client HTTPClient) *RegistryNamespace -``` - -#### Parameters - - - -#### Returns - -`*RegistryNamespace` - -#### Source - -[`pkg/rest/namespaces/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/registry.go) - -Line 109. - -*** - -### NewShortCodesNamespace - -NewShortCodesNamespace creates a new ShortCodesNamespace. - -#### Signature - -```go -func NewShortCodesNamespace(client HTTPClient) *ShortCodesNamespace -``` - -#### Parameters - - - -#### Returns - -`*ShortCodesNamespace` - -#### Source - -[`pkg/rest/namespaces/short_codes.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/short_codes.go) - -Line 18. - -*** - -### NewSipProfileNamespace - -NewSipProfileNamespace creates a new SipProfileNamespace. - -#### Signature - -```go -func NewSipProfileNamespace(client HTTPClient) *SipProfileNamespace -``` - -#### Parameters - - - -#### Returns - -`*SipProfileNamespace` - -#### Source - -[`pkg/rest/namespaces/sip_profile.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/sip_profile.go) - -Line 16. - -*** - -### NewVerifiedCallersNamespace - -NewVerifiedCallersNamespace creates a new VerifiedCallersNamespace. - -#### Signature - -```go -func NewVerifiedCallersNamespace(client HTTPClient) *VerifiedCallersNamespace -``` - -#### Parameters - - - -#### Returns - -`*VerifiedCallersNamespace` - -#### Source - -[`pkg/rest/namespaces/verified_callers.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/verified_callers.go) - -Line 17. - -*** - -### NewVideoNamespace - -NewVideoNamespace creates a new VideoNamespace with all sub-resources initialized. - -#### Signature - -```go -func NewVideoNamespace(client HTTPClient) *VideoNamespace -``` - -#### Parameters - - - -#### Returns - -`*VideoNamespace` - -#### Source - -[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) - -Line 175. - -*** - -### ResetDeprecationWarnOnce - -ResetDeprecationWarnOnce clears the "once" tracking set so deprecation warnings fire again. Test-only helper. - -#### Signature - -```go -func ResetDeprecationWarnOnce() -``` - -#### Source - -[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) - -Line 67. - -*** - -### SetDeprecationLogger - -SetDeprecationLogger replaces the package-level deprecation logger. The previous logger is returned so tests can restore it. Passing nil is a no-op. - -#### Signature - -```go -func SetDeprecationLogger(l *logging.Logger) *logging.Logger -``` - -#### Parameters - - - -#### Returns - -`*logging.Logger` - -#### Source - -[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) - -Line 54. - -## Type Aliases - -### AddressesResource - -AddressesResource is an alias for AddressesNamespace, matching the Python class name for cross-SDK parity. Prefer AddressesNamespace in new Go code. - -#### Signature - -```go -type AddressesResource alias -``` - -#### Source - -[`pkg/rest/namespaces/addresses.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/addresses.go) - -Line 44. - -*** - -### CxmlWebhooksResource - -CxmlWebhooksResource is the Python class name for the auto-materialized CXML webhook resource. Go aliases AutoMaterializedWebhookResource here. - -#### Signature - -```go -type CxmlWebhooksResource alias -``` - -#### Source - -[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) - -Line 328. - -*** - -### FabricResource - -FabricResource is the Python class name for a CrudResource that exposes the addresses sub-resource. Go aliases CrudWithAddresses here for the same reason as FabricResourcePUT. - -#### Signature - -```go -type FabricResource alias -``` - -#### Source - -[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) - -Line 320. - -*** - -### FabricResourcePUT - -FabricResourcePUT is the Python class name for a CrudResource that uses PUT for updates. Go aliases CrudResource here so the cross-language audit sees the same type name on both sides without requiring a distinct struct. - -#### Signature - -```go -type FabricResourcePUT alias -``` - -#### Source - -[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) - -Line 315. - -*** - -### LookupResource - -LookupResource is an alias for LookupNamespace, matching the Python class name for cross-SDK parity. Prefer LookupNamespace in new Go code. - -#### Signature - -```go -type LookupResource alias -``` - -#### Source - -[`pkg/rest/namespaces/lookup.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/lookup.go) - -Line 31. - -*** - -### NumberGroupsResource - -NumberGroupsResource is an alias for NumberGroupsNamespace, matching the Python class name for cross-SDK parity. - -#### Signature - -```go -type NumberGroupsResource alias -``` - -#### Source - -[`pkg/rest/namespaces/number_groups.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/number_groups.go) - -Line 44. - -*** - -### PhoneNumbersResource - -PhoneNumbersResource is an alias for PhoneNumbersNamespace, matching the Python class name for cross-SDK parity. Prefer PhoneNumbersNamespace in new Go code. - -#### Signature - -```go -type PhoneNumbersResource alias -``` - -#### Source - -[`pkg/rest/namespaces/phone_numbers.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/phone_numbers.go) - -Line 201. - -*** - -### PubSubResource - -PubSubResource is an alias for PubSubNamespace, matching the Python class name for cross-SDK parity. Prefer PubSubNamespace in new Go code. - -#### Signature - -```go -type PubSubResource alias -``` - -#### Source - -[`pkg/rest/namespaces/pubsub.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/pubsub.go) - -Line 29. - -*** - -### QueuesResource - -QueuesResource is an alias for QueuesNamespace, matching the Python class name for cross-SDK parity. Prefer QueuesNamespace in new Go code. - -#### Signature - -```go -type QueuesResource alias -``` - -#### Source - -[`pkg/rest/namespaces/queues.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/queues.go) - -Line 39. - -*** - -### RecordingsResource - -RecordingsResource is an alias for RecordingsNamespace, matching the Python class name for cross-SDK parity. Prefer RecordingsNamespace in new Go code. - -#### Signature - -```go -type RecordingsResource alias -``` - -#### Source - -[`pkg/rest/namespaces/recordings.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/recordings.go) - -Line 54. - -*** - -### ShortCodesResource - -ShortCodesResource is an alias for ShortCodesNamespace, matching the Python class name for cross-SDK parity. Prefer ShortCodesNamespace in new Go code. - -#### Signature - -```go -type ShortCodesResource alias -``` - -#### Source - -[`pkg/rest/namespaces/short_codes.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/short_codes.go) - -Line 45. - -*** - -### SipProfileResource - -SipProfileResource is an alias for SipProfileNamespace, matching the Python class name for cross-SDK parity. Prefer SipProfileNamespace in new Go code. - -#### Signature - -```go -type SipProfileResource alias -``` - -#### Source - -[`pkg/rest/namespaces/sip_profile.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/sip_profile.go) - -Line 34. - -*** - -### SwmlWebhooksResource - -SwmlWebhooksResource is the Python class name for the auto-materialized SWML webhook resource. Go aliases AutoMaterializedWebhookResource here. - -#### Signature - -```go -type SwmlWebhooksResource alias -``` - -#### Source - -[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) - -Line 324. - -## Interfaces - -### HTTPClient - -HTTPClient is the interface that namespace implementations use to make HTTP requests. It is satisfied by the httpAdapter in the parent rest package, which prevents an import cycle. - -#### Signature - -```go -type HTTPClient interface { Get; Post; Put; Patch; Delete } -``` - -#### Methods - -##### Delete - -###### Signature - -```go -Delete(path string) (map[string]any, error) -``` - -###### Source - -[`pkg/rest/namespaces/common.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/common.go) - -Line 22. - -*** - -##### Get - -###### Signature - -```go -Get(path string, params map[string]string) (map[string]any, error) -``` - -###### Source - -[`pkg/rest/namespaces/common.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/common.go) - -Line 18. - -*** - -##### Patch - -###### Signature - -```go -Patch(path string, body map[string]any) (map[string]any, error) -``` - -###### Source - -[`pkg/rest/namespaces/common.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/common.go) - -Line 21. - -*** - -##### Post - -###### Signature - -```go -Post(path string, body map[string]any, params map[string]string) (map[string]any, error) -``` - -###### Source - -[`pkg/rest/namespaces/common.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/common.go) - -Line 19. - -*** - -##### Put - -###### Signature - -```go -Put(path string, body map[string]any) (map[string]any, error) -``` - -###### Source - -[`pkg/rest/namespaces/common.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/common.go) - -Line 20. - -#### Source - -[`pkg/rest/namespaces/common.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/common.go) - -Line 17. - -## Enums - -### PhoneCallHandler - -PhoneCallHandler is the value of the “call\_handler“ field accepted by phone\_numbers.Update. - -Named PhoneCallHandler (not CallHandler) to avoid colliding with the RELAY client's inbound-call-handler callback type already present in the SDK (pkg/relay OnCallHandler). - -Setting a phone number's call\_handler + the handler-specific companion field routes inbound calls and, for most values, auto-materializes the matching Fabric resource on the server. See the high-level helpers on PhoneNumbersNamespace (SetSwmlWebhook, SetCxmlWebhook, SetCxmlApplication, SetAiAgent, SetCallFlow, SetRelayApplication, SetRelayTopic). - -``` -Enum member Companion field (required) Auto-creates resource -RelayScript call_relay_script_url swml_webhook -LamlWebhooks call_request_url cxml_webhook -LamlApplication call_laml_application_id cxml_application -AiAgent call_ai_agent_id ai_agent -CallFlow call_flow_id call_flow -RelayApplication call_relay_application relay_application -RelayTopic call_relay_topic (routes via RELAY) -RelayContext call_relay_context (legacy, prefer topic) -RelayConnector (connector config) (internal) -VideoRoom call_video_room_id (routes to Video API) -Dialogflow call_dialogflow_agent_id (none) -``` - -Note: LamlWebhooks (wire value "laml\_webhooks") produces a cXML handler, not a generic webhook. For SWML, use RelayScript. - -#### Signature - -```go -type PhoneCallHandler alias -``` - -#### Examples - - - - ```go - Enum member Companion field (required) Auto-creates resource - RelayScript call_relay_script_url swml_webhook - LamlWebhooks call_request_url cxml_webhook - LamlApplication call_laml_application_id cxml_application - AiAgent call_ai_agent_id ai_agent - CallFlow call_flow_id call_flow - RelayApplication call_relay_application relay_application - RelayTopic call_relay_topic (routes via RELAY) - RelayContext call_relay_context (legacy, prefer topic) - RelayConnector (connector config) (internal) - VideoRoom call_video_room_id (routes to Video API) - Dialogflow call_dialogflow_agent_id (none) - ``` - - - - ```go - Enum member Companion field (required) Auto-creates resource - RelayScript call_relay_script_url swml_webhook - LamlWebhooks call_request_url cxml_webhook - LamlApplication call_laml_application_id cxml_application - AiAgent call_ai_agent_id ai_agent - CallFlow call_flow_id call_flow - RelayApplication call_relay_application relay_application - RelayTopic call_relay_topic (routes via RELAY) - RelayContext call_relay_context (legacy, prefer topic) - RelayConnector (connector config) (internal) - VideoRoom call_video_room_id (routes to Video API) - Dialogflow call_dialogflow_agent_id (none) - ``` - - - -#### Source - -[`pkg/rest/namespaces/call_handler.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/call_handler.go) - -Line 38. - -## Source - -[`pkg/rest/namespaces/addresses.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/addresses.go) diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/logs-namespace/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/logs-namespace/index.mdx deleted file mode 100644 index 03e106327e..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/logs-namespace/index.mdx +++ /dev/null @@ -1,39 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/logs-namespace" -title: "LogsNamespace" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.LogsNamespace" - parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" - module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/logs.go" ---- -# `LogsNamespace` - -LogsNamespace groups all log query resources. - -## Signature - -```go -type LogsNamespace struct -``` - -## Properties - - - - - - - - - -## Source - -[`pkg/rest/namespaces/logs.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/logs.go) - -Line 81. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/lookup-namespace/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/lookup-namespace/index.mdx deleted file mode 100644 index a21066de8b..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/lookup-namespace/index.mdx +++ /dev/null @@ -1,61 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/lookup-namespace" -title: "LookupNamespace" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.LookupNamespace" - parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" - module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/lookup.go" ---- -# `LookupNamespace` - -LookupNamespace provides phone number lookup (carrier, CNAM). - -## Signature - -```go -type LookupNamespace struct -``` - -## Properties - - - -## Methods - -### PhoneNumber - -PhoneNumber looks up information about a phone number. The e164 parameter should be the number in E.164 format. Optional params can include "include" for additional data (e.g., "carrier"). - -#### Signature - -```go -func (*LookupNamespace) PhoneNumber(e164 string, params map[string]string) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/lookup.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/lookup.go) - -Line 25. - -## Source - -[`pkg/rest/namespaces/lookup.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/lookup.go) - -Line 11. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/message-logs/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/message-logs/index.mdx deleted file mode 100644 index 64bbd2a5fe..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/message-logs/index.mdx +++ /dev/null @@ -1,85 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/message-logs" -title: "MessageLogs" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.MessageLogs" - parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" - module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/logs.go" ---- -# `MessageLogs` - -MessageLogs provides message log queries. - -## Signature - -```go -type MessageLogs struct -``` - -## Properties - - - -## Methods - -### Get - -Get retrieves a specific message log entry. - -#### Signature - -```go -func (*MessageLogs) Get(logID string) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/logs.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/logs.go) - -Line 23. - -*** - -### List - -List lists message logs. - -#### Signature - -```go -func (*MessageLogs) List(params map[string]string) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/logs.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/logs.go) - -Line 18. - -## Source - -[`pkg/rest/namespaces/logs.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/logs.go) - -Line 13. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/mfa-namespace/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/mfa-namespace/index.mdx deleted file mode 100644 index a6120acd60..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/mfa-namespace/index.mdx +++ /dev/null @@ -1,113 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/mfa-namespace" -title: "MFANamespace" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.MFANamespace" - parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" - module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/mfa.go" ---- -# `MFANamespace` - -MFANamespace provides multi-factor authentication via SMS or phone call. - -## Signature - -```go -type MFANamespace struct -``` - -## Properties - - - -## Methods - -### Call - -Call initiates MFA verification via phone call. - -#### Signature - -```go -func (*MFANamespace) Call(data map[string]any) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/mfa.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/mfa.go) - -Line 28. - -*** - -### SMS - -SMS initiates MFA verification via SMS. - -#### Signature - -```go -func (*MFANamespace) SMS(data map[string]any) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/mfa.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/mfa.go) - -Line 23. - -*** - -### Verify - -Verify verifies an MFA token for a given request ID. - -#### Signature - -```go -func (*MFANamespace) Verify(requestID string, data map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/mfa.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/mfa.go) - -Line 33. - -## Source - -[`pkg/rest/namespaces/mfa.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/mfa.go) - -Line 11. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/number-groups-namespace/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/number-groups-namespace/index.mdx deleted file mode 100644 index e18641f846..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/number-groups-namespace/index.mdx +++ /dev/null @@ -1,141 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/number-groups-namespace" -title: "NumberGroupsNamespace" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.NumberGroupsNamespace" - parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" - module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/number_groups.go" ---- -# `NumberGroupsNamespace` - -NumberGroupsNamespace provides number group management with membership operations. - -## Signature - -```go -type NumberGroupsNamespace struct -``` - -## Properties - - - -## Methods - -### AddMembership - -AddMembership adds a number to a group. - -#### Signature - -```go -func (*NumberGroupsNamespace) AddMembership(groupID string, data map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/number_groups.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/number_groups.go) - -Line 28. - -*** - -### DeleteMembership - -DeleteMembership removes a membership by ID. - -#### Signature - -```go -func (*NumberGroupsNamespace) DeleteMembership(membershipID string) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/number_groups.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/number_groups.go) - -Line 38. - -*** - -### GetMembership - -GetMembership retrieves a specific membership by ID. - -#### Signature - -```go -func (*NumberGroupsNamespace) GetMembership(membershipID string) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/number_groups.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/number_groups.go) - -Line 33. - -*** - -### ListMemberships - -ListMemberships lists number group memberships for a group. - -#### Signature - -```go -func (*NumberGroupsNamespace) ListMemberships(groupID string, params map[string]string) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/number_groups.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/number_groups.go) - -Line 23. - -## Source - -[`pkg/rest/namespaces/number_groups.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/number_groups.go) - -Line 11. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/phone-numbers-namespace/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/phone-numbers-namespace/index.mdx deleted file mode 100644 index 39d16d516a..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/phone-numbers-namespace/index.mdx +++ /dev/null @@ -1,277 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/phone-numbers-namespace" -title: "PhoneNumbersNamespace" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.PhoneNumbersNamespace" - parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" - module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/phone_numbers.go" ---- -# `PhoneNumbersNamespace` - -PhoneNumbersNamespace provides phone number management with search and typed helpers for binding an inbound call to a handler (SWML webhook, cXML webhook, AI agent, call flow, RELAY application/topic). - -Binding model: set “call\_handler“ + the handler-specific companion field on the phone number; the server auto-materializes the matching Fabric resource. The helpers below (Set\*) are one-line wrappers around Update with the right call\_handler + field combination baked in. See PhoneCallHandler for the enum. - -## Signature - -```go -type PhoneNumbersNamespace struct -``` - -## Properties - - - -## Methods - -### Search - -Search searches for available phone numbers with optional filter parameters such as area\_code, contains, starts\_with, etc. - -params may contain values of any type (string, int, bool, etc.); they are converted to strings internally before the HTTP request is made, matching Python's \*\*params behaviour which accepts numeric and boolean query values. - -#### Signature - -```go -func (*PhoneNumbersNamespace) Search(params map[string]any) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/phone_numbers.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/phone_numbers.go) - -Line 38. - -*** - -### SetAiAgent - -SetAiAgent routes inbound calls to an AI Agent Fabric resource by ID. - -#### Signature - -```go -func (*PhoneNumbersNamespace) SetAiAgent(sid string, agentID string, extra ...map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/phone_numbers.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/phone_numbers.go) - -Line 115. - -*** - -### SetCallFlow - -SetCallFlow routes inbound calls to a Call Flow by ID. Pass nil opts for the minimal form; pass opts.Version to pin a specific version. - -#### Signature - -```go -func (*PhoneNumbersNamespace) SetCallFlow(sid string, flowID string, opts *CallFlowOptions) (map[string]any, error) -``` - -#### Parameters - - - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/phone_numbers.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/phone_numbers.go) - -Line 135. - -*** - -### SetCxmlApplication - -SetCxmlApplication routes inbound calls to an existing cXML application by ID. - -#### Signature - -```go -func (*PhoneNumbersNamespace) SetCxmlApplication(sid string, applicationID string, extra ...map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/phone_numbers.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/phone_numbers.go) - -Line 105. - -*** - -### SetCxmlWebhook - -SetCxmlWebhook routes inbound calls to a cXML (Twilio-compat / LAML) webhook. - -Despite the wire value "laml\_webhooks" being plural, this creates a single cxml\_webhook Fabric resource. Pass opts to set FallbackURL and StatusCallbackURL; pass nil for the minimal form. - -#### Signature - -```go -func (*PhoneNumbersNamespace) SetCxmlWebhook(sid string, url string, opts *CxmlWebhookOptions) (map[string]any, error) -``` - -#### Parameters - - - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/phone_numbers.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/phone_numbers.go) - -Line 85. - -*** - -### SetRelayApplication - -SetRelayApplication routes inbound calls to a named RELAY application. - -#### Signature - -```go -func (*PhoneNumbersNamespace) SetRelayApplication(sid string, name string, extra ...map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/phone_numbers.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/phone_numbers.go) - -Line 152. - -*** - -### SetRelayTopic - -SetRelayTopic routes inbound calls to a RELAY topic (client subscription). Pass nil opts for the minimal form. - -#### Signature - -```go -func (*PhoneNumbersNamespace) SetRelayTopic(sid string, topic string, opts *RelayTopicOptions) (map[string]any, error) -``` - -#### Parameters - - - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/phone_numbers.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/phone_numbers.go) - -Line 171. - -*** - -### SetSwmlWebhook - -SetSwmlWebhook routes inbound calls to an SWML webhook URL. - -Your backend returns an SWML document per call. The server auto-creates a swml\_webhook Fabric resource keyed off this URL. - -#### Signature - -```go -func (*PhoneNumbersNamespace) SetSwmlWebhook(sid string, url string, extra ...map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/phone_numbers.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/phone_numbers.go) - -Line 61. - -## Source - -[`pkg/rest/namespaces/phone_numbers.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/phone_numbers.go) - -Line 21. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/project-namespace/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/project-namespace/index.mdx deleted file mode 100644 index 1cf76491b5..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/project-namespace/index.mdx +++ /dev/null @@ -1,33 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/project-namespace" -title: "ProjectNamespace" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.ProjectNamespace" - parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" - module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/project.go" ---- -# `ProjectNamespace` - -ProjectNamespace groups project management resources. - -## Signature - -```go -type ProjectNamespace struct -``` - -## Properties - - - -## Source - -[`pkg/rest/namespaces/project.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/project.go) - -Line 31. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/project-tokens/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/project-tokens/index.mdx deleted file mode 100644 index aa2b3550f0..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/project-tokens/index.mdx +++ /dev/null @@ -1,113 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/project-tokens" -title: "ProjectTokens" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.ProjectTokens" - parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" - module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/project.go" ---- -# `ProjectTokens` - -ProjectTokens provides project API token management. - -## Signature - -```go -type ProjectTokens struct -``` - -## Properties - - - -## Methods - -### Create - -Create creates a new project API token. - -#### Signature - -```go -func (*ProjectTokens) Create(data map[string]any) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/project.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/project.go) - -Line 16. - -*** - -### Delete - -Delete removes a project API token. - -#### Signature - -```go -func (*ProjectTokens) Delete(tokenID string) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/project.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/project.go) - -Line 26. - -*** - -### Update - -Update modifies a project API token. - -#### Signature - -```go -func (*ProjectTokens) Update(tokenID string, data map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/project.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/project.go) - -Line 21. - -## Source - -[`pkg/rest/namespaces/project.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/project.go) - -Line 11. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/pub-sub-namespace/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/pub-sub-namespace/index.mdx deleted file mode 100644 index be7d660f73..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/pub-sub-namespace/index.mdx +++ /dev/null @@ -1,59 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/pub-sub-namespace" -title: "PubSubNamespace" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.PubSubNamespace" - parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" - module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/pubsub.go" ---- -# `PubSubNamespace` - -PubSubNamespace provides PubSub token generation. - -## Signature - -```go -type PubSubNamespace struct -``` - -## Properties - - - -## Methods - -### CreateToken - -CreateToken creates a PubSub token. - -#### Signature - -```go -func (*PubSubNamespace) CreateToken(data map[string]any) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/pubsub.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/pubsub.go) - -Line 23. - -## Source - -[`pkg/rest/namespaces/pubsub.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/pubsub.go) - -Line 11. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/queues-namespace/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/queues-namespace/index.mdx deleted file mode 100644 index ec9f6dae65..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/queues-namespace/index.mdx +++ /dev/null @@ -1,115 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/queues-namespace" -title: "QueuesNamespace" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.QueuesNamespace" - parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" - module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/queues.go" ---- -# `QueuesNamespace` - -QueuesNamespace provides queue management with member operations. - -## Signature - -```go -type QueuesNamespace struct -``` - -## Properties - - - -## Methods - -### GetMember - -GetMember retrieves a specific member from a queue. - -#### Signature - -```go -func (*QueuesNamespace) GetMember(queueID string, memberID string) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/queues.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/queues.go) - -Line 33. - -*** - -### GetNextMember - -GetNextMember retrieves the next member in the queue. - -#### Signature - -```go -func (*QueuesNamespace) GetNextMember(queueID string) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/queues.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/queues.go) - -Line 28. - -*** - -### ListMembers - -ListMembers lists members of a queue. - -#### Signature - -```go -func (*QueuesNamespace) ListMembers(queueID string, params map[string]string) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/queues.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/queues.go) - -Line 23. - -## Source - -[`pkg/rest/namespaces/queues.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/queues.go) - -Line 11. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/recordings-namespace/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/recordings-namespace/index.mdx deleted file mode 100644 index e44192dea2..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/recordings-namespace/index.mdx +++ /dev/null @@ -1,111 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/recordings-namespace" -title: "RecordingsNamespace" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.RecordingsNamespace" - parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" - module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/recordings.go" ---- -# `RecordingsNamespace` - -RecordingsNamespace provides recording management (read-only + delete). - -## Signature - -```go -type RecordingsNamespace struct -``` - -## Properties - - - -## Methods - -### Delete - -Delete removes a recording by ID. - -#### Signature - -```go -func (*RecordingsNamespace) Delete(id string) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/recordings.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/recordings.go) - -Line 48. - -*** - -### Get - -Get retrieves a recording by ID. - -#### Signature - -```go -func (*RecordingsNamespace) Get(id string) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/recordings.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/recordings.go) - -Line 43. - -*** - -### List - -List lists all recordings. params may contain values of any type (matching Python's \*\*data); non-string values are stringified via fmt.Sprintf before being sent as query parameters. - -#### Signature - -```go -func (*RecordingsNamespace) List(params map[string]any) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/recordings.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/recordings.go) - -Line 27. - -## Source - -[`pkg/rest/namespaces/recordings.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/recordings.go) - -Line 13. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/registry-brands/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/registry-brands/index.mdx deleted file mode 100644 index 4c6c2b4ba9..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/registry-brands/index.mdx +++ /dev/null @@ -1,167 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/registry-brands" -title: "RegistryBrands" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.RegistryBrands" - parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" - module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/registry.go" ---- -# `RegistryBrands` - -RegistryBrands provides 10DLC brand management. - -## Signature - -```go -type RegistryBrands struct -``` - -## Properties - - - -## Methods - -### Create - -Create creates a new brand. - -#### Signature - -```go -func (*RegistryBrands) Create(data map[string]any) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/registry.go) - -Line 23. - -*** - -### CreateCampaign - -CreateCampaign creates a campaign under a brand. - -#### Signature - -```go -func (*RegistryBrands) CreateCampaign(brandID string, data map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/registry.go) - -Line 38. - -*** - -### Get - -Get retrieves a brand by ID. - -#### Signature - -```go -func (*RegistryBrands) Get(brandID string) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/registry.go) - -Line 28. - -*** - -### List - -List lists all brands. - -#### Signature - -```go -func (*RegistryBrands) List(params map[string]string) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/registry.go) - -Line 18. - -*** - -### ListCampaigns - -ListCampaigns lists campaigns for a brand. - -#### Signature - -```go -func (*RegistryBrands) ListCampaigns(brandID string, params map[string]string) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/registry.go) - -Line 33. - -## Source - -[`pkg/rest/namespaces/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/registry.go) - -Line 13. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/registry-campaigns/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/registry-campaigns/index.mdx deleted file mode 100644 index 996ad9492c..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/registry-campaigns/index.mdx +++ /dev/null @@ -1,171 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/registry-campaigns" -title: "RegistryCampaigns" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.RegistryCampaigns" - parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" - module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/registry.go" ---- -# `RegistryCampaigns` - -RegistryCampaigns provides 10DLC campaign management. - -## Signature - -```go -type RegistryCampaigns struct -``` - -## Properties - - - -## Methods - -### CreateOrder - -CreateOrder creates a number assignment order for a campaign. - -#### Signature - -```go -func (*RegistryCampaigns) CreateOrder(campaignID string, data map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/registry.go) - -Line 70. - -*** - -### Get - -Get retrieves a campaign by ID. - -#### Signature - -```go -func (*RegistryCampaigns) Get(campaignID string) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/registry.go) - -Line 50. - -*** - -### ListNumbers - -ListNumbers lists numbers assigned to a campaign. - -#### Signature - -```go -func (*RegistryCampaigns) ListNumbers(campaignID string, params map[string]string) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/registry.go) - -Line 60. - -*** - -### ListOrders - -ListOrders lists orders for a campaign. - -#### Signature - -```go -func (*RegistryCampaigns) ListOrders(campaignID string, params map[string]string) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/registry.go) - -Line 65. - -*** - -### Update - -Update modifies a campaign by ID. - -#### Signature - -```go -func (*RegistryCampaigns) Update(campaignID string, data map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/registry.go) - -Line 55. - -## Source - -[`pkg/rest/namespaces/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/registry.go) - -Line 45. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/registry-namespace/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/registry-namespace/index.mdx deleted file mode 100644 index 069a7fc1aa..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/registry-namespace/index.mdx +++ /dev/null @@ -1,39 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/registry-namespace" -title: "RegistryNamespace" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.RegistryNamespace" - parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" - module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/registry.go" ---- -# `RegistryNamespace` - -RegistryNamespace groups all 10DLC Campaign Registry resources. - -## Signature - -```go -type RegistryNamespace struct -``` - -## Properties - - - - - - - - - -## Source - -[`pkg/rest/namespaces/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/registry.go) - -Line 101. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/registry-numbers/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/registry-numbers/index.mdx deleted file mode 100644 index 30bef62714..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/registry-numbers/index.mdx +++ /dev/null @@ -1,59 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/registry-numbers" -title: "RegistryNumbers" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.RegistryNumbers" - parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" - module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/registry.go" ---- -# `RegistryNumbers` - -RegistryNumbers provides 10DLC number assignment management. - -## Signature - -```go -type RegistryNumbers struct -``` - -## Properties - - - -## Methods - -### Delete - -Delete removes a number assignment. - -#### Signature - -```go -func (*RegistryNumbers) Delete(numberID string) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/registry.go) - -Line 94. - -## Source - -[`pkg/rest/namespaces/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/registry.go) - -Line 89. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/registry-orders/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/registry-orders/index.mdx deleted file mode 100644 index 2b5a27b613..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/registry-orders/index.mdx +++ /dev/null @@ -1,59 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/registry-orders" -title: "RegistryOrders" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.RegistryOrders" - parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" - module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/registry.go" ---- -# `RegistryOrders` - -RegistryOrders provides 10DLC assignment order management. - -## Signature - -```go -type RegistryOrders struct -``` - -## Properties - - - -## Methods - -### Get - -Get retrieves an order by ID. - -#### Signature - -```go -func (*RegistryOrders) Get(orderID string) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/registry.go) - -Line 82. - -## Source - -[`pkg/rest/namespaces/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/registry.go) - -Line 77. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/relay-topic-options/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/relay-topic-options/index.mdx deleted file mode 100644 index f7060e401e..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/relay-topic-options/index.mdx +++ /dev/null @@ -1,39 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/relay-topic-options" -title: "RelayTopicOptions" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.RelayTopicOptions" - parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" - module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/phone_numbers.go" ---- -# `RelayTopicOptions` - -RelayTopicOptions holds optional fields for SetRelayTopic. - -## Signature - -```go -type RelayTopicOptions struct -``` - -## Properties - - - Extra passes through additional wire-level fields. - - - - StatusCallbackURL receives topic status updates. - - -## Source - -[`pkg/rest/namespaces/phone_numbers.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/phone_numbers.go) - -Line 162. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/resource/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/resource/index.mdx deleted file mode 100644 index 1e78e6acb9..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/resource/index.mdx +++ /dev/null @@ -1,61 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/resource" -title: "Resource" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.Resource" - parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" - module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/common.go" ---- -# `Resource` - -Resource is a helper for building sub-paths from a base path. - -## Signature - -```go -type Resource struct -``` - -## Properties - - - - - -## Methods - -### Path - -Path joins additional segments onto the base path. - -#### Signature - -```go -func (*Resource) Path(parts ...string) string -``` - -#### Parameters - - - -#### Returns - -`string` - -#### Source - -[`pkg/rest/namespaces/common.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/common.go) - -Line 32. - -## Source - -[`pkg/rest/namespaces/common.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/common.go) - -Line 26. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/short-codes-namespace/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/short-codes-namespace/index.mdx deleted file mode 100644 index 28db367891..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/short-codes-namespace/index.mdx +++ /dev/null @@ -1,113 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/short-codes-namespace" -title: "ShortCodesNamespace" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.ShortCodesNamespace" - parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" - module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/short_codes.go" ---- -# `ShortCodesNamespace` - -ShortCodesNamespace provides short code management (read + update only). - -## Signature - -```go -type ShortCodesNamespace struct -``` - -## Properties - - - -## Methods - -### Get - -Get retrieves a short code by ID. - -#### Signature - -```go -func (*ShortCodesNamespace) Get(id string) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/short_codes.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/short_codes.go) - -Line 34. - -*** - -### List - -List lists all short codes. - -#### Signature - -```go -func (*ShortCodesNamespace) List(params map[string]any) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/short_codes.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/short_codes.go) - -Line 25. - -*** - -### Update - -Update modifies a short code by ID. - -#### Signature - -```go -func (*ShortCodesNamespace) Update(id string, data map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/short_codes.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/short_codes.go) - -Line 39. - -## Source - -[`pkg/rest/namespaces/short_codes.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/short_codes.go) - -Line 13. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/sip-profile-namespace/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/sip-profile-namespace/index.mdx deleted file mode 100644 index 336e9d211e..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/sip-profile-namespace/index.mdx +++ /dev/null @@ -1,81 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/sip-profile-namespace" -title: "SipProfileNamespace" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.SipProfileNamespace" - parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" - module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/sip_profile.go" ---- -# `SipProfileNamespace` - -SipProfileNamespace provides project SIP profile management (singleton resource). - -## Signature - -```go -type SipProfileNamespace struct -``` - -## Properties - - - -## Methods - -### Get - -Get retrieves the project SIP profile. - -#### Signature - -```go -func (*SipProfileNamespace) Get() (map[string]any, error) -``` - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/sip_profile.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/sip_profile.go) - -Line 23. - -*** - -### Update - -Update modifies the project SIP profile. - -#### Signature - -```go -func (*SipProfileNamespace) Update(data map[string]any) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/sip_profile.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/sip_profile.go) - -Line 28. - -## Source - -[`pkg/rest/namespaces/sip_profile.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/sip_profile.go) - -Line 11. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/subscribers-resource/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/subscribers-resource/index.mdx deleted file mode 100644 index 34dd7da927..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/subscribers-resource/index.mdx +++ /dev/null @@ -1,175 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/subscribers-resource" -title: "SubscribersResource" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.SubscribersResource" - parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" - module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go" ---- -# `SubscribersResource` - -SubscribersResource extends CrudResource with SIP endpoint management. - -## Signature - -```go -type SubscribersResource struct -``` - -## Properties - - - -## Methods - -### CreateSIPEndpoint - -CreateSIPEndpoint creates a SIP endpoint for a subscriber. - -#### Signature - -```go -func (*SubscribersResource) CreateSIPEndpoint(subscriberID string, data map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) - -Line 125. - -*** - -### DeleteSIPEndpoint - -DeleteSIPEndpoint deletes a SIP endpoint from a subscriber. - -#### Signature - -```go -func (*SubscribersResource) DeleteSIPEndpoint(subscriberID string, endpointID string) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) - -Line 140. - -*** - -### GetSIPEndpoint - -GetSIPEndpoint retrieves a SIP endpoint for a subscriber. - -#### Signature - -```go -func (*SubscribersResource) GetSIPEndpoint(subscriberID string, endpointID string) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) - -Line 130. - -*** - -### ListSIPEndpoints - -ListSIPEndpoints lists SIP endpoints for a subscriber. - -#### Signature - -```go -func (*SubscribersResource) ListSIPEndpoints(subscriberID string, params map[string]string) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) - -Line 120. - -*** - -### UpdateSIPEndpoint - -UpdateSIPEndpoint updates a SIP endpoint for a subscriber. - -#### Signature - -```go -func (*SubscribersResource) UpdateSIPEndpoint(subscriberID string, endpointID string, data map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) - -Line 135. - -## Source - -[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) - -Line 115. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/verified-callers-namespace/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/verified-callers-namespace/index.mdx deleted file mode 100644 index 23cba7b23e..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/verified-callers-namespace/index.mdx +++ /dev/null @@ -1,87 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/verified-callers-namespace" -title: "VerifiedCallersNamespace" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.VerifiedCallersNamespace" - parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" - module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/verified_callers.go" ---- -# `VerifiedCallersNamespace` - -VerifiedCallersNamespace provides verified caller ID management with verification flow. - -## Signature - -```go -type VerifiedCallersNamespace struct -``` - -## Properties - - - -## Methods - -### RedialVerification - -RedialVerification redials the verification call for a caller ID. - -#### Signature - -```go -func (*VerifiedCallersNamespace) RedialVerification(callerID string) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/verified_callers.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/verified_callers.go) - -Line 24. - -*** - -### SubmitVerification - -SubmitVerification submits a verification code for a caller ID. - -#### Signature - -```go -func (*VerifiedCallersNamespace) SubmitVerification(callerID string, data map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/verified_callers.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/verified_callers.go) - -Line 29. - -## Source - -[`pkg/rest/namespaces/verified_callers.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/verified_callers.go) - -Line 12. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-conference-tokens/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-conference-tokens/index.mdx deleted file mode 100644 index 46005dd09a..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-conference-tokens/index.mdx +++ /dev/null @@ -1,85 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-conference-tokens" -title: "VideoConferenceTokens" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.VideoConferenceTokens" - parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" - module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go" ---- -# `VideoConferenceTokens` - -VideoConferenceTokens provides video conference token management. - -## Signature - -```go -type VideoConferenceTokens struct -``` - -## Properties - - - -## Methods - -### Get - -Get retrieves a conference token. - -#### Signature - -```go -func (*VideoConferenceTokens) Get(tokenID string) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) - -Line 129. - -*** - -### Reset - -Reset resets a conference token. - -#### Signature - -```go -func (*VideoConferenceTokens) Reset(tokenID string) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) - -Line 134. - -## Source - -[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) - -Line 124. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-conferences/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-conferences/index.mdx deleted file mode 100644 index f97bd8411f..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-conferences/index.mdx +++ /dev/null @@ -1,117 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-conferences" -title: "VideoConferences" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.VideoConferences" - parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" - module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go" ---- -# `VideoConferences` - -VideoConferences provides video conference management with tokens and streams. - -## Signature - -```go -type VideoConferences struct -``` - -## Properties - - - -## Methods - -### CreateStream - -CreateStream creates a stream for a conference. - -#### Signature - -```go -func (*VideoConferences) CreateStream(conferenceID string, data map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) - -Line 117. - -*** - -### ListConferenceTokens - -ListConferenceTokens lists tokens for a conference. - -#### Signature - -```go -func (*VideoConferences) ListConferenceTokens(conferenceID string, params map[string]string) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) - -Line 107. - -*** - -### ListStreams - -ListStreams lists streams for a conference. - -#### Signature - -```go -func (*VideoConferences) ListStreams(conferenceID string, params map[string]string) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) - -Line 112. - -## Source - -[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) - -Line 102. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-namespace/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-namespace/index.mdx deleted file mode 100644 index 3bc01cf743..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-namespace/index.mdx +++ /dev/null @@ -1,45 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-namespace" -title: "VideoNamespace" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.VideoNamespace" - parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" - module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go" ---- -# `VideoNamespace` - -VideoNamespace groups all Video API resources. - -## Signature - -```go -type VideoNamespace struct -``` - -## Properties - - - - - - - - - - - - - - - -## Source - -[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) - -Line 164. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-room-recordings/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-room-recordings/index.mdx deleted file mode 100644 index c694eb0772..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-room-recordings/index.mdx +++ /dev/null @@ -1,139 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-room-recordings" -title: "VideoRoomRecordings" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.VideoRoomRecordings" - parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" - module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go" ---- -# `VideoRoomRecordings` - -VideoRoomRecordings provides video room recording management. - -## Signature - -```go -type VideoRoomRecordings struct -``` - -## Properties - - - -## Methods - -### Delete - -Delete removes a room recording. It returns the parsed response body (or an empty map for 204 No Content) and any error. - -#### Signature - -```go -func (*VideoRoomRecordings) Delete(recordingID string) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) - -Line 90. - -*** - -### Get - -Get retrieves a specific room recording. - -#### Signature - -```go -func (*VideoRoomRecordings) Get(recordingID string) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) - -Line 84. - -*** - -### List - -List lists all room recordings. - -#### Signature - -```go -func (*VideoRoomRecordings) List(params map[string]string) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) - -Line 79. - -*** - -### ListEvents - -ListEvents lists events for a room recording. - -#### Signature - -```go -func (*VideoRoomRecordings) ListEvents(recordingID string, params map[string]string) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) - -Line 95. - -## Source - -[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) - -Line 74. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-room-sessions/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-room-sessions/index.mdx deleted file mode 100644 index 070e1aea55..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-room-sessions/index.mdx +++ /dev/null @@ -1,169 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-room-sessions" -title: "VideoRoomSessions" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.VideoRoomSessions" - parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" - module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go" ---- -# `VideoRoomSessions` - -VideoRoomSessions provides video room session management. - -## Signature - -```go -type VideoRoomSessions struct -``` - -## Properties - - - -## Methods - -### Get - -Get retrieves a specific room session. - -#### Signature - -```go -func (*VideoRoomSessions) Get(sessionID string) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) - -Line 52. - -*** - -### List - -List lists all room sessions. - -#### Signature - -```go -func (*VideoRoomSessions) List(params map[string]string) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) - -Line 47. - -*** - -### ListEvents - -ListEvents lists events for a room session. - -#### Signature - -```go -func (*VideoRoomSessions) ListEvents(sessionID string, params map[string]string) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) - -Line 57. - -*** - -### ListMembers - -ListMembers lists members in a room session. - -#### Signature - -```go -func (*VideoRoomSessions) ListMembers(sessionID string, params map[string]string) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) - -Line 62. - -*** - -### ListRecordings - -ListRecordings lists recordings for a room session. - -#### Signature - -```go -func (*VideoRoomSessions) ListRecordings(sessionID string, params map[string]string) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) - -Line 67. - -## Source - -[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) - -Line 42. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-room-tokens/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-room-tokens/index.mdx deleted file mode 100644 index b360994edd..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-room-tokens/index.mdx +++ /dev/null @@ -1,59 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-room-tokens" -title: "VideoRoomTokens" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.VideoRoomTokens" - parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" - module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go" ---- -# `VideoRoomTokens` - -VideoRoomTokens provides video room token generation. - -## Signature - -```go -type VideoRoomTokens struct -``` - -## Properties - - - -## Methods - -### Create - -Create creates a video room token. - -#### Signature - -```go -func (*VideoRoomTokens) Create(data map[string]any) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) - -Line 35. - -## Source - -[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) - -Line 30. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-rooms/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-rooms/index.mdx deleted file mode 100644 index ec4a0bbd38..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-rooms/index.mdx +++ /dev/null @@ -1,89 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-rooms" -title: "VideoRooms" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.VideoRooms" - parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" - module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go" ---- -# `VideoRooms` - -VideoRooms provides video room management with stream sub-resources. - -## Signature - -```go -type VideoRooms struct -``` - -## Properties - - - -## Methods - -### CreateStream - -CreateStream creates a stream for a video room. - -#### Signature - -```go -func (*VideoRooms) CreateStream(roomID string, data map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) - -Line 23. - -*** - -### ListStreams - -ListStreams lists streams for a video room. - -#### Signature - -```go -func (*VideoRooms) ListStreams(roomID string, params map[string]string) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) - -Line 18. - -## Source - -[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) - -Line 13. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-streams/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-streams/index.mdx deleted file mode 100644 index 9591545a81..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-streams/index.mdx +++ /dev/null @@ -1,113 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/video-streams" -title: "VideoStreams" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.VideoStreams" - parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" - module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go" ---- -# `VideoStreams` - -VideoStreams provides video stream management. - -## Signature - -```go -type VideoStreams struct -``` - -## Properties - - - -## Methods - -### Delete - -Delete removes a video stream. It returns the parsed response body (or an empty map for 204 No Content) and any error. - -#### Signature - -```go -func (*VideoStreams) Delete(streamID string) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) - -Line 157. - -*** - -### Get - -Get retrieves a video stream. - -#### Signature - -```go -func (*VideoStreams) Get(streamID string) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) - -Line 146. - -*** - -### Update - -Update modifies a video stream. - -#### Signature - -```go -func (*VideoStreams) Update(streamID string, data map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) - -Line 151. - -## Source - -[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) - -Line 141. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/voice-logs/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/voice-logs/index.mdx deleted file mode 100644 index 11afa15584..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/voice-logs/index.mdx +++ /dev/null @@ -1,113 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces/voice-logs" -title: "VoiceLogs" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.VoiceLogs" - parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" - module: "github.com.signalwire.signalwire-go.pkg.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/logs.go" ---- -# `VoiceLogs` - -VoiceLogs provides voice log queries. - -## Signature - -```go -type VoiceLogs struct -``` - -## Properties - - - -## Methods - -### Get - -Get retrieves a specific voice log entry. - -#### Signature - -```go -func (*VoiceLogs) Get(logID string) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/logs.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/logs.go) - -Line 40. - -*** - -### List - -List lists voice logs. - -#### Signature - -```go -func (*VoiceLogs) List(params map[string]string) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/logs.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/logs.go) - -Line 35. - -*** - -### ListEvents - -ListEvents lists events for a voice log entry. - -#### Signature - -```go -func (*VoiceLogs) ListEvents(logID string, params map[string]string) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/namespaces/logs.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/logs.go) - -Line 45. - -## Source - -[`pkg/rest/namespaces/logs.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/logs.go) - -Line 30. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/rest/crud-resource/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/rest/crud-resource/index.mdx deleted file mode 100644 index 4f0cd71e66..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/rest/crud-resource/index.mdx +++ /dev/null @@ -1,171 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/rest/crud-resource" -title: "CrudResource" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/rest.CrudResource" - parent: "github.com/signalwire/signalwire-go/pkg/rest" - module: "github.com.signalwire.signalwire-go.pkg.rest" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go" ---- -# `CrudResource` - -CrudResource provides standard List, Create, Get, Update, Delete operations against a REST collection endpoint. Update defaults to PATCH; set UpdateMethod to "PUT" to override. - -## Signature - -```go -type CrudResource struct -``` - -## Properties - - - - - - - "PATCH" (default) or "PUT" - - -## Methods - -### Create - -Create sends a POST request to create a new resource. - -#### Signature - -```go -func (*CrudResource) Create(data map[string]any) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) - -Line 276. - -*** - -### Delete - -Delete removes a resource by ID. It returns the parsed response body (or an empty map for 204 No Content) and any error. - -#### Signature - -```go -func (*CrudResource) Delete(id string) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) - -Line 297. - -*** - -### Get - -Get retrieves a single resource by ID. - -#### Signature - -```go -func (*CrudResource) Get(id string) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) - -Line 281. - -*** - -### List - -List retrieves all items from the collection. Optional query parameters can be provided. The raw JSON response map is returned. - -#### Signature - -```go -func (*CrudResource) List(params map[string]string) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) - -Line 271. - -*** - -### Update - -Update modifies an existing resource by ID using the configured update method (PATCH or PUT). - -#### Signature - -```go -func (*CrudResource) Update(id string, data map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) - -Line 287. - -## Source - -[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) - -Line 239. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/rest/http-client/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/rest/http-client/index.mdx deleted file mode 100644 index 4ae2d2a46a..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/rest/http-client/index.mdx +++ /dev/null @@ -1,213 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/rest/http-client" -title: "HttpClient" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/rest.HttpClient" - parent: "github.com/signalwire/signalwire-go/pkg/rest" - module: "github.com.signalwire.signalwire-go.pkg.rest" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go" ---- -# `HttpClient` - -HttpClient is a thin wrapper around net/http that provides Basic Auth, JSON encoding/decoding, and standard headers for SignalWire API calls. - -## Signature - -```go -type HttpClient struct -``` - -## Methods - -### BaseURL - -BaseURL returns the base URL used by this client. - -#### Signature - -```go -func (*HttpClient) BaseURL() string -``` - -#### Returns - -`string` - -#### Source - -[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) - -Line 124. - -*** - -### Delete - -Delete performs an HTTP DELETE request. It returns the parsed response body (or an empty map for 204 No Content) and any error. - -#### Signature - -```go -func (*HttpClient) Delete(path string) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) - -Line 160. - -*** - -### Get - -Get performs an HTTP GET request. params are added as query-string parameters. - -#### Signature - -```go -func (*HttpClient) Get(path string, params map[string]string) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) - -Line 138. - -*** - -### Patch - -Patch performs an HTTP PATCH request with a JSON body. - -#### Signature - -```go -func (*HttpClient) Patch(path string, body map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) - -Line 154. - -*** - -### Post - -Post performs an HTTP POST request with a JSON body. Optional params are appended to the URL as query-string parameters. - -#### Signature - -```go -func (*HttpClient) Post(path string, body map[string]any, params map[string]string) (map[string]any, error) -``` - -#### Parameters - - - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) - -Line 144. - -*** - -### Put - -Put performs an HTTP PUT request with a JSON body. - -#### Signature - -```go -func (*HttpClient) Put(path string, body map[string]any) (map[string]any, error) -``` - -#### Parameters - - - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) - -Line 149. - -*** - -### SetBaseURL - -SetBaseURL overrides the base URL used by this client. Useful for pointing the client at a non-default endpoint (audit fixtures, mock servers, etc.) without re-running the constructor with a synthetic space name. - -#### Signature - -```go -func (*HttpClient) SetBaseURL(url string) -``` - -#### Parameters - - - -#### Source - -[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) - -Line 132. - -## Source - -[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) - -Line 62. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/rest/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/rest/index.mdx deleted file mode 100644 index 407e732543..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/rest/index.mdx +++ /dev/null @@ -1,265 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/rest" -title: "rest" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "module" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/rest" - module: "github.com.signalwire.signalwire-go.pkg.rest" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go" ---- -# `rest` - -Package rest provides a REST client for the SignalWire platform APIs. - -It includes an HTTP transport layer, generic CRUD resource abstractions, paginated iteration, and namespaced sub-clients for each API domain. - -## Signature - -```go -package rest -``` - -## Classes - - - - CrudResource provides standard List, Create, Get, Update, Delete operations against a REST collection endpoint. Update defaults to PATCH; set UpdateMethod to "PUT" to override. - - - - HttpClient is a thin wrapper around net/http that provides Basic Auth, JSON encoding/decoding, and standard headers for SignalWire API calls. - - - - PaginatedIterator walks through paginated API responses one page at a time. Each call to Next returns the items from the current page, a boolean indicating whether more pages exist, and any error encountered. - - - - RestClient is the top-level REST client for the SignalWire platform. It provides namespaced access to all SignalWire API domains. - - - - SignalWireRestError is returned when the SignalWire REST API responds with a non-2xx status code. - - - -## Functions - -### NewCrudResource - -NewCrudResource creates a CrudResource for the given path. The default update method is PATCH. - -#### Signature - -```go -func NewCrudResource(client *HttpClient, path string) *CrudResource -``` - -#### Parameters - - - - - -#### Returns - -`*CrudResource` - -#### Source - -[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) - -Line 247. - -*** - -### NewCrudResourcePUT - -NewCrudResourcePUT creates a CrudResource that uses PUT for updates. - -#### Signature - -```go -func NewCrudResourcePUT(client *HttpClient, path string) *CrudResource -``` - -#### Parameters - - - - - -#### Returns - -`*CrudResource` - -#### Source - -[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) - -Line 256. - -*** - -### NewHttpClient - -NewHttpClient creates a new HttpClient configured for the given SignalWire space. The baseURL is normally constructed as "https://\", but the SIGNALWIRE\_REST\_BASE\_URL environment variable overrides it when set — pointing the client at a loopback fixture for the porting-sdk audit\_rest\_transport.py harness, or at any non-default endpoint. - -#### Signature - -```go -func NewHttpClient(projectID string, token string, space string) *HttpClient -``` - -#### Parameters - - - - - - - -#### Returns - -`*HttpClient` - -#### Source - -[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) - -Line 75. - -*** - -### NewPaginatedIterator - -NewPaginatedIterator creates a new iterator for the given endpoint. dataKey is the JSON key that holds the array of items (typically "data"). - -#### Signature - -```go -func NewPaginatedIterator( - client *HttpClient, - path string, - params map[string]string, - dataKey string -) *PaginatedIterator -``` - -#### Parameters - - - - - - - - - -#### Returns - -`*PaginatedIterator` - -#### Source - -[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) - -Line 316. - -*** - -### NewRestClient - -NewRestClient creates a new RestClient. If project, token, or space are empty strings the corresponding environment variables are used: - -``` -SIGNALWIRE_PROJECT_ID -SIGNALWIRE_API_TOKEN -SIGNALWIRE_SPACE -``` - -An error is returned when any of the three values is still empty after the environment lookup. - -#### Signature - -```go -func NewRestClient(project string, token string, space string) (*RestClient, error) -``` - -#### Parameters - - - - - - - -#### Returns - -`(*RestClient, error)` - -#### Examples - - - - ```go - SIGNALWIRE_PROJECT_ID - SIGNALWIRE_API_TOKEN - SIGNALWIRE_SPACE - ``` - - - - ```go - SIGNALWIRE_PROJECT_ID - SIGNALWIRE_API_TOKEN - SIGNALWIRE_SPACE - ``` - - - -#### Source - -[`pkg/rest/rest_client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/rest_client.go) - -Line 99. - -*** - -### NewSignalWireRestError - -NewSignalWireRestError constructs a SignalWireRestError, substituting "GET" as the method when method is empty — matches Python's default. - -#### Signature - -```go -func NewSignalWireRestError(statusCode int, body string, url string, method string) *SignalWireRestError -``` - -#### Parameters - - - - - - - - - -#### Returns - -`*SignalWireRestError` - -#### Source - -[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) - -Line 51. - -## Source - -[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/rest/paginated-iterator/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/rest/paginated-iterator/index.mdx deleted file mode 100644 index 122260b5c4..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/rest/paginated-iterator/index.mdx +++ /dev/null @@ -1,77 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/rest/paginated-iterator" -title: "PaginatedIterator" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/rest.PaginatedIterator" - parent: "github.com/signalwire/signalwire-go/pkg/rest" - module: "github.com.signalwire.signalwire-go.pkg.rest" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go" ---- -# `PaginatedIterator` - -PaginatedIterator walks through paginated API responses one page at a time. Each call to Next returns the items from the current page, a boolean indicating whether more pages exist, and any error encountered. - -## Signature - -```go -type PaginatedIterator struct -``` - -## Methods - -### ForEach - -ForEach calls fn for every item across all pages. It fetches pages lazily via Next and invokes fn once per item in the order they are returned. Iteration stops early if fn returns a non-nil error (that error is returned to the caller) or when Next signals there are no more pages. - -#### Signature - -```go -func (*PaginatedIterator) ForEach(fn func(map[string]any) error) error -``` - -#### Parameters - - - -#### Returns - -`error` - -#### Source - -[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) - -Line 387. - -*** - -### Next - -Next fetches the next page of results. It returns the items from the page, a boolean hasMore that is true when additional pages remain, and any error. When there are no more pages, it returns nil, false, nil. - -#### Signature - -```go -func (*PaginatedIterator) Next() ([]map[string]any, bool, error) -``` - -#### Returns - -`([]map[string]any, bool, error)` - -#### Source - -[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) - -Line 334. - -## Source - -[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) - -Line 306. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/rest/rest-client/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/rest/rest-client/index.mdx deleted file mode 100644 index c7b9bd5a76..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/rest/rest-client/index.mdx +++ /dev/null @@ -1,174 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/rest/rest-client" -title: "RestClient" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/rest.RestClient" - parent: "github.com/signalwire/signalwire-go/pkg/rest" - module: "github.com.signalwire.signalwire-go.pkg.rest" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/rest_client.go" ---- -# `RestClient` - -RestClient is the top-level REST client for the SignalWire platform. It provides namespaced access to all SignalWire API domains. - -Usage: - -``` -client, err := rest.NewRestClient("project-id", "api-token", "your-space.signalwire.com") -// or use environment variables SIGNALWIRE_PROJECT_ID, SIGNALWIRE_API_TOKEN, SIGNALWIRE_SPACE -client, err := rest.NewRestClient("", "", "") - -agents, err := client.Fabric.AIAgents.List(nil) -client.Calling.Play("call-id", map[string]any{"play": [...]}) -``` - -## Signature - -```go -type RestClient struct -``` - -## Examples - - - - ```go - client, err := rest.NewRestClient("project-id", "api-token", "your-space.signalwire.com") - // or use environment variables SIGNALWIRE_PROJECT_ID, SIGNALWIRE_API_TOKEN, SIGNALWIRE_SPACE - client, err := rest.NewRestClient("", "", "") - - agents, err := client.Fabric.AIAgents.List(nil) - client.Calling.Play("call-id", map[string]any{"play": [...]}) - ``` - - - - ```go - client, err := rest.NewRestClient("project-id", "api-token", "your-space.signalwire.com") - // or use environment variables SIGNALWIRE_PROJECT_ID, SIGNALWIRE_API_TOKEN, SIGNALWIRE_SPACE - client, err := rest.NewRestClient("", "", "") - - agents, err := client.Fabric.AIAgents.List(nil) - client.Calling.Play("call-id", map[string]any{"play": [...]}) - ``` - - - -## Properties - - - - - Calling API (REST-based call control) - - - - - - Compatibility (Twilio-compatible) LAML API - - - - Datasphere API - - - - Fabric API - - - - - - Logs - - - - - - - - - - Relay REST resources - - - - Project management - - - - PubSub & Chat - - - - - - - - 10DLC Campaign Registry - - - - - - - - - - Video API - - -## Methods - -### HttpClient - -HttpClient exposes the underlying HTTP transport. It is the public form of Python's “signalwire\_client.\_http“ and is the entry point used by helpers like PaginatedIterator that need raw GET access without going through a namespace resource. - -#### Signature - -```go -func (*RestClient) HttpClient() *HttpClient -``` - -#### Returns - -`*HttpClient` - -#### Source - -[`pkg/rest/rest_client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/rest_client.go) - -Line 86. - -*** - -### SetBaseURL - -SetBaseURL overrides the base URL used by the underlying HttpClient. Useful for pointing the client at a non-default endpoint such as the audit\_rest\_transport.py harness fixture, a recorded-cassette mock server, or a regional endpoint without re-running the constructor. - -#### Signature - -```go -func (*RestClient) SetBaseURL(url string) -``` - -#### Parameters - - - -#### Source - -[`pkg/rest/rest_client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/rest_client.go) - -Line 78. - -## Source - -[`pkg/rest/rest_client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/rest_client.go) - -Line 28. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/rest/signal-wire-rest-error/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/rest/signal-wire-rest-error/index.mdx deleted file mode 100644 index d0558addcd..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/rest/rest/signal-wire-rest-error/index.mdx +++ /dev/null @@ -1,61 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/rest/rest/signal-wire-rest-error" -title: "SignalWireRestError" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/rest.SignalWireRestError" - parent: "github.com/signalwire/signalwire-go/pkg/rest" - module: "github.com.signalwire.signalwire-go.pkg.rest" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go" ---- -# `SignalWireRestError` - -SignalWireRestError is returned when the SignalWire REST API responds with a non-2xx status code. - -## Signature - -```go -type SignalWireRestError struct -``` - -## Properties - - - - - - - - - -## Methods - -### Error - -Error implements the error interface. - -#### Signature - -```go -func (*SignalWireRestError) Error() string -``` - -#### Returns - -`string` - -#### Source - -[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) - -Line 45. - -## Source - -[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) - -Line 37. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/security/security/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/security/security/index.mdx deleted file mode 100644 index aa52713ea8..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/security/security/index.mdx +++ /dev/null @@ -1,367 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/security/security" -title: "security" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "module" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/security" - module: "github.com.signalwire.signalwire-go.pkg.security" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/security/session_manager.go" ---- -# `security` - -Package security provides session management and token-based authentication for SWAIG function calls, preventing unauthorized tool execution. - -## Signature - -```go -package security -``` - -## Constants - - - ErrMissingSigningKey is returned by ValidateWebhookSignatureE / ValidateRequestE when an empty signing key is supplied. Per the spec, a missing signing key is a programming error rather than a validation failure, so the bool-returning entry points panic; the \*E variants return this sentinel for callers that prefer error returns. - - - - RawBodyContextKey is the context key under which WebhookMiddleware stashes the raw request body. Downstream handlers should retrieve via RawBodyFromContext rather than reaching for this key directly. - - -## Classes - - - - SessionManager creates and validates HMAC-SHA256 tokens for SWAIG function calls. The secret can be supplied at construction time (for cross-process validation) or auto-generated (default, single-process use). - - - - WebhookOpts configures WebhookMiddleware. - - - -## Functions - -### NewSessionManager - -NewSessionManager creates a new SessionManager. If tokenExpirySecs is \<= 0, a default of 900 seconds (15 minutes) is used, matching the Python SDK default. Provide functional options (e.g. WithSecret) to customise behaviour. - -#### Signature - -```go -func NewSessionManager(tokenExpirySecs int, opts ...Option) *SessionManager -``` - -#### Parameters - - - - - -#### Returns - -`*SessionManager` - -#### Source - -[`pkg/security/session_manager.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/security/session_manager.go) - -Line 55. - -*** - -### RawBodyFromContext - -RawBodyFromContext returns the raw request body bytes that the webhook middleware captured before signature validation. Returns nil and false when called from a handler that wasn't wrapped by WebhookMiddleware (or when the request had no body). - -#### Signature - -```go -func RawBodyFromContext(ctx context.Context) ([]byte, bool) -``` - -#### Parameters - - - -#### Returns - -`([]byte, bool)` - -#### Source - -[`pkg/security/webhook_middleware.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/security/webhook_middleware.go) - -Line 42. - -*** - -### ValidateRequest - -ValidateRequest is the legacy @signalwire/compatibility-api drop-in entry point. The fourth argument is dynamically dispatched: - -- string: delegate to ValidateWebhookSignature (Scheme A then Scheme B with parsed form); -- map\[string]\[]string / url.Values / map\[string]string: pre-parsed form params, run Scheme B directly with URL port normalization; -- nil: pre-parsed empty params, run Scheme B with empty concat string; -- anything else: panic with a clear message (programmer error). - -#### Signature - -```go -func ValidateRequest( - signingKey string, - signature string, - urlStr string, - paramsOrRawBody any -) bool -``` - -#### Parameters - - - - - - - - - -#### Returns - -`bool` - -#### Source - -[`pkg/security/webhook.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/security/webhook.go) - -Line 243. - -*** - -### ValidateRequestE - -ValidateRequestE is the error-returning variant of ValidateRequest. Returns ErrMissingSigningKey when signingKey is empty, or a typed error when paramsOrRawBody is neither a string, nil, nor a recognized map shape. - -#### Signature - -```go -func ValidateRequestE( - signingKey string, - signature string, - urlStr string, - paramsOrRawBody any -) (bool, error) -``` - -#### Parameters - - - - - - - - - -#### Returns - -`(bool, error)` - -#### Source - -[`pkg/security/webhook.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/security/webhook.go) - -Line 299. - -*** - -### ValidateWebhookSignature - -ValidateWebhookSignature validates a SignalWire webhook signature against both schemes. Returns true if the signature matches Scheme A (hex JSON) or Scheme B (base64 form, with port-normalization variants and optional bodySHA256 fallback); false otherwise. - -signingKey: customer's Signing Key. Empty string panics — that's a programming error, not a validation failure (use ValidateWebhookSignatureE for the error-returning variant). - -signature: X-SignalWire-Signature (or X-Twilio-Signature) header value. Empty returns false without panicking. - -url: full URL SignalWire POSTed to (scheme, host, optional port, path, query). Must match what the platform saw — see the URL reconstruction section of porting-sdk/webhooks.md. - -rawBody: raw request body bytes as a UTF-8 string, BEFORE any JSON / form parsing. - -All comparisons use crypto/subtle.ConstantTimeCompare. The function does not log which scheme was tried, what the expected signature was, or any other branch information. - -#### Signature - -```go -func ValidateWebhookSignature( - signingKey string, - signature string, - url string, - rawBody string -) bool -``` - -#### Parameters - - - - - - - - - -#### Returns - -`bool` - -#### Source - -[`pkg/security/webhook.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/security/webhook.go) - -Line 226. - -*** - -### ValidateWebhookSignatureE - -ValidateWebhookSignatureE is the error-returning variant of ValidateWebhookSignature. Returns ErrMissingSigningKey when signingKey is empty; otherwise (matched, nil). - -#### Signature - -```go -func ValidateWebhookSignatureE( - signingKey string, - signature string, - urlStr string, - rawBody string -) (bool, error) -``` - -#### Parameters - - - - - - - - - -#### Returns - -`(bool, error)` - -#### Source - -[`pkg/security/webhook.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/security/webhook.go) - -Line 258. - -*** - -### WebhookMiddleware - -WebhookMiddleware returns an http.Handler middleware that validates the X-SignalWire-Signature (or X-Twilio-Signature) header against signingKey before invoking the wrapped handler. - -Pass nil for opts to use defaults (no proxy trust, no size cap, env-var override consulted). - -The middleware never logs the signing key, the expected signature, or which validation branch matched — per porting-sdk/webhooks.md §"Required SDK Behaviors / Error modes". - -#### Signature - -```go -func WebhookMiddleware(signingKey string, opts *WebhookOpts) func(http.Handler) http.Handler -``` - -#### Parameters - - - - - -#### Returns - -`func(http.Handler) http.Handler` - -#### Source - -[`pkg/security/webhook_middleware.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/security/webhook_middleware.go) - -Line 82. - -*** - -### WithDebugMode - -WithDebugMode enables the DebugToken method. Off by default to prevent accidental token introspection in production. - -#### Signature - -```go -func WithDebugMode(enabled bool) Option -``` - -#### Parameters - - - -#### Returns - -`Option` - -#### Source - -[`pkg/security/session_manager.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/security/session_manager.go) - -Line 46. - -*** - -### WithSecret - -WithSecret injects a fixed secret key into the SessionManager. Use this when you need multiple processes or instances to validate each other's tokens. Pass nil to keep the default behaviour (auto-generate a random 32-byte secret). - -#### Signature - -```go -func WithSecret(key []byte) Option -``` - -#### Parameters - - - -#### Returns - -`Option` - -#### Source - -[`pkg/security/session_manager.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/security/session_manager.go) - -Line 36. - -## Type Aliases - -### Option - -Option is a functional option for NewSessionManager. - -#### Signature - -```go -type Option alias -``` - -#### Source - -[`pkg/security/session_manager.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/security/session_manager.go) - -Line 31. - -## Source - -[`pkg/security/session_manager.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/security/session_manager.go) diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/security/security/session-manager/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/security/security/session-manager/index.mdx deleted file mode 100644 index c14dd3b507..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/security/security/session-manager/index.mdx +++ /dev/null @@ -1,139 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/security/security/session-manager" -title: "SessionManager" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/security.SessionManager" - parent: "github.com/signalwire/signalwire-go/pkg/security" - module: "github.com.signalwire.signalwire-go.pkg.security" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/security/session_manager.go" ---- -# `SessionManager` - -SessionManager creates and validates HMAC-SHA256 tokens for SWAIG function calls. The secret can be supplied at construction time (for cross-process validation) or auto-generated (default, single-process use). - -## Signature - -```go -type SessionManager struct -``` - -## Methods - -### CreateSession - -CreateSession returns callID unchanged if it is non-empty; otherwise it generates a cryptographically random URL-safe string (matches Python secrets.token\_urlsafe(16) — 16 bytes of entropy, base64url-encoded without padding). - -#### Signature - -```go -func (*SessionManager) CreateSession(callID string) string -``` - -#### Parameters - - - -#### Returns - -`string` - -#### Source - -[`pkg/security/session_manager.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/security/session_manager.go) - -Line 84. - -*** - -### CreateToken - -CreateToken generates an HMAC-SHA256 signed token for the given function name and call ID. The token embeds an expiry timestamp and is returned as a base64url-encoded string. - -#### Signature - -```go -func (*SessionManager) CreateToken(functionName string, callID string) string -``` - -#### Parameters - - - - - -#### Returns - -`string` - -#### Source - -[`pkg/security/session_manager.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/security/session_manager.go) - -Line 99. - -*** - -### DebugToken - -DebugToken decodes a token and returns a map of its components and status without performing signature validation. This is intended for development and debugging only. It requires debug mode to be enabled via WithDebugMode; if not, it returns map\["error": "debug mode not enabled"]. - -#### Signature - -```go -func (*SessionManager) DebugToken(token string) map[string]any -``` - -#### Parameters - - - -#### Returns - -`map[string]any` - -#### Source - -[`pkg/security/session_manager.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/security/session_manager.go) - -Line 194. - -*** - -### ValidateToken - -ValidateToken verifies that a token is authentic, unexpired, and matches the expected function name and call ID. All comparisons are performed in constant time where possible to prevent timing attacks. Returns true only if every check passes. - -#### Signature - -```go -func (*SessionManager) ValidateToken(functionName string, token string, callID string) bool -``` - -#### Parameters - - - - - - - -#### Returns - -`bool` - -#### Source - -[`pkg/security/session_manager.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/security/session_manager.go) - -Line 115. - -## Source - -[`pkg/security/session_manager.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/security/session_manager.go) - -Line 23. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/security/security/webhook-opts/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/security/security/webhook-opts/index.mdx deleted file mode 100644 index bd9b9d86df..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/security/security/webhook-opts/index.mdx +++ /dev/null @@ -1,43 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/security/security/webhook-opts" -title: "WebhookOpts" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/security.WebhookOpts" - parent: "github.com/signalwire/signalwire-go/pkg/security" - module: "github.com.signalwire.signalwire-go.pkg.security" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/security/webhook_middleware.go" ---- -# `WebhookOpts` - -WebhookOpts configures WebhookMiddleware. - -## Signature - -```go -type WebhookOpts struct -``` - -## Properties - - - MaxBodyBytes caps the body size the middleware will buffer before signature validation. Zero (default) imposes no cap beyond Go's own MaxBytesReader behavior. A small positive value protects against memory exhaustion from oversized POSTs targeted at the gate. - - - - ProxyURLBase, when non-empty, overrides URL reconstruction entirely: the validator sees ProxyURLBase + r.URL.RequestURI(). This matches the SWML\_PROXY\_URL\_BASE env-var override documented in the spec. When empty, the env var is consulted at construction time. - - - - TrustProxy makes the middleware honor X-Forwarded-Proto and X-Forwarded-Host when reconstructing the URL passed to the validator. Leave false (default) when the SDK terminates TLS itself; flip true when running behind a reverse proxy / ngrok / load balancer. - - -## Source - -[`pkg/security/webhook_middleware.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/security/webhook_middleware.go) - -Line 52. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/server/server/agent-entry/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/server/server/agent-entry/index.mdx deleted file mode 100644 index 1843ce3f91..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/server/server/agent-entry/index.mdx +++ /dev/null @@ -1,35 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/server/server/agent-entry" -title: "AgentEntry" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/server.AgentEntry" - parent: "github.com/signalwire/signalwire-go/pkg/server" - module: "github.com.signalwire.signalwire-go.pkg.server" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go" ---- -# `AgentEntry` - -AgentEntry pairs a route with its agent for listing purposes. - -## Signature - -```go -type AgentEntry struct -``` - -## Properties - - - - - -## Source - -[`pkg/server/server.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go) - -Line 187. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/server/server/agent-server/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/server/server/agent-server/index.mdx deleted file mode 100644 index 59f638f040..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/server/server/agent-server/index.mdx +++ /dev/null @@ -1,342 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/server/server/agent-server" -title: "AgentServer" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/server.AgentServer" - parent: "github.com/signalwire/signalwire-go/pkg/server" - module: "github.com.signalwire.signalwire-go.pkg.server" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go" ---- -# `AgentServer` - -AgentServer hosts multiple agents on a single HTTP server with route-based dispatch. Each registered agent is mounted at its own route prefix and exposed via the agent's AsRouter() handler. - -## Signature - -```go -type AgentServer struct -``` - -## Methods - -### GetAgent - -GetAgent returns the agent registered at the given route, or nil if none. - -#### Signature - -```go -func (*AgentServer) GetAgent(route string) *agent.AgentBase -``` - -#### Parameters - - - -#### Returns - -`*agent.AgentBase` - -#### Source - -[`pkg/server/server.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go) - -Line 207. - -*** - -### GetAgents - -GetAgents returns all registered agents in insertion order. - -#### Signature - -```go -func (*AgentServer) GetAgents() []AgentEntry -``` - -#### Returns - -`[]AgentEntry` - -#### Source - -[`pkg/server/server.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go) - -Line 193. - -*** - -### Register - -Register adds an agent to the server at the given route. If route is empty the agent's configured route (via WithRoute) is used instead. The route is normalised to always start with "/". - -#### Signature - -```go -func (*AgentServer) Register(a *agent.AgentBase, route string) -``` - -#### Parameters - - - - - -#### Source - -[`pkg/server/server.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go) - -Line 139. - -*** - -### RegisterGlobalRoutingCallback - -RegisterGlobalRoutingCallback registers a routing callback across all currently-registered agents at the given path. The callback fires on every incoming request to that path and can return an SWML document override (or nil to fall through to the agent's default response). - -This is the Go equivalent of Python's AgentServer.register\_global\_routing\_callback(callback\_fn, path). - -#### Signature - -```go -func (*AgentServer) RegisterGlobalRoutingCallback(path string, cb swml.RoutingCallback) -``` - -#### Parameters - - - - - -#### Source - -[`pkg/server/server.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go) - -Line 276. - -*** - -### RegisterGlobalSipRoutingCallback - -RegisterGlobalSipRoutingCallback registers a SIP redirect-routing callback across all currently-registered agents at the given path. The callback returns a route string; on a non-empty return the framework responds with HTTP 307 Temporary Redirect (matching Python register\_routing\_callback semantics — see AgentBase.RegisterSipRoutingCallback for details). - -Use this form when porting Python AgentServer code that registers a redirect-style global routing callback. For a global response-document override (the richer Go-only mechanism), use RegisterGlobalRoutingCallback. - -#### Signature - -```go -func (*AgentServer) RegisterGlobalSipRoutingCallback( - path string, - cb func(r *http.Request, body map[string]any) string -) -``` - -#### Parameters - - - - - -#### Source - -[`pkg/server/server.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go) - -Line 305. - -*** - -### RegisterSipUsername - -RegisterSipUsername maps a SIP username to an agent route so that inbound SIP calls for that username are routed to the correct agent. - -#### Signature - -```go -func (*AgentServer) RegisterSipUsername(username string, route string) -``` - -#### Parameters - - - - - -#### Source - -[`pkg/server/server.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go) - -Line 246. - -*** - -### Run - -Run starts the HTTP server. This is a blocking call. Optional RunOption values can override host and port at start time. - -Serverless dispatch: unlike Python's AgentServer.run() which auto-detects CGI and Lambda environments, Run() is HTTP-server-only. For AWS Lambda deployments use the pkg/lambda package instead. CGI mode has no Go equivalent; deploy as a standard HTTP service behind a reverse proxy. - -Run delegates to RunContext with context.Background(); use RunContext to drive shutdown from a context, or call Shutdown from another goroutine. - -#### Signature - -```go -func (*AgentServer) Run(opts ...RunOption) error -``` - -#### Parameters - - - -#### Returns - -`error` - -#### Source - -[`pkg/server/server.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go) - -Line 338. - -*** - -### RunContext - -RunContext is the context-aware form of Run. It blocks serving HTTP exactly like Run, but when ctx is cancelled (or its deadline passes) it performs a graceful Shutdown — stopping new connections and draining in-flight requests — then returns nil. A concurrent Shutdown call has the same effect. Any other listen error is returned as-is. - -This is a Go-port addition (the Python reference's AgentServer.run() has no caller-supplied cancellation token); documented in PORT\_ADDITIONS.md. - -#### Signature - -```go -func (*AgentServer) RunContext(ctx context.Context, opts ...RunOption) error -``` - -#### Parameters - - - - - -#### Returns - -`error` - -#### Source - -[`pkg/server/server.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go) - -Line 350. - -*** - -### ServeStaticFiles - -ServeStaticFiles registers a directory to be served at the given route. - -#### Signature - -```go -func (*AgentServer) ServeStaticFiles(directory string, route string) -``` - -#### Parameters - - - - - -#### Source - -[`pkg/server/server.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go) - -Line 258. - -*** - -### SetupSipRouting - -SetupSipRouting enables a central SIP routing endpoint. When autoMap is true, all currently registered agents are automatically mapped using their route as the SIP username. - -#### Signature - -```go -func (*AgentServer) SetupSipRouting(route string, autoMap bool) -``` - -#### Parameters - - - - - -#### Source - -[`pkg/server/server.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go) - -Line 220. - -*** - -### Shutdown - -Shutdown gracefully stops the running HTTP server: it stops accepting new connections and waits for in-flight requests to complete, bounded by ctx's deadline (a passed deadline returns ctx.Err() and closes idle connections, per net/http.Server.Shutdown). It returns ErrServerNotRunning (wrapped) when no server is currently serving. - -After Shutdown returns, the in-flight Run/RunContext call unblocks and returns nil. This is a Go-port addition (no Python-reference equivalent); documented in PORT\_ADDITIONS.md. - -#### Signature - -```go -func (*AgentServer) Shutdown(ctx context.Context) error -``` - -#### Parameters - - - -#### Returns - -`error` - -#### Source - -[`pkg/server/server.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go) - -Line 426. - -*** - -### Unregister - -Unregister removes the agent at the given route. Returns true if an agent was found and removed. - -#### Signature - -```go -func (*AgentServer) Unregister(route string) bool -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`pkg/server/server.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go) - -Line 164. - -## Source - -[`pkg/server/server.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go) - -Line 33. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/server/server/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/server/server/index.mdx deleted file mode 100644 index 24efb634cd..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/server/server/index.mdx +++ /dev/null @@ -1,238 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/server/server" -title: "server" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "module" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/server" - module: "github.com.signalwire.signalwire-go.pkg.server" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go" ---- -# `server` - -Package server provides AgentServer for hosting multiple AI agents on a single HTTP server with route-based dispatch. - -## Signature - -```go -package server -``` - -## Constants - - - ErrServerNotRunning is returned (wrapped) by Shutdown when no HTTP server is currently active — i.e. Shutdown was called before Run, or after the server already stopped. It is errors.Is-able. This is a Go-port addition (the Python reference's AgentServer has no graceful-shutdown surface); documented in PORT\_ADDITIONS.md. - - -## Classes - - - - AgentEntry pairs a route with its agent for listing purposes. - - - - AgentServer hosts multiple agents on a single HTTP server with route-based dispatch. Each registered agent is mounted at its own route prefix and exposed via the agent's AsRouter() handler. - - - -## Functions - -### NewAgentServer - -NewAgentServer creates a new AgentServer with the given options. Default host is "0.0.0.0" and default port is 3000. - -#### Signature - -```go -func NewAgentServer(opts ...ServerOption) *AgentServer -``` - -#### Parameters - - - -#### Returns - -`*AgentServer` - -#### Source - -[`pkg/server/server.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go) - -Line 113. - -*** - -### WithLogLevel - -WithLogLevel sets the global log level for the server. Accepted values (case-insensitive): "debug", "info", "warn", "warning", "error", "off" — see the logging.LevelName\* typed constants. Mirrors Python AgentServer(log\_level=...) behavior: the level is applied globally via logging.SetGlobalLevel so all loggers in the process are affected. The default level is "info". - -The parameter is the defined string type logging.LogLevel: the typed constants give autocomplete + a compile-time typo check, while Go's untyped-constant auto-conversion keeps a bare "debug" literal compiling — parity with the Python reference's plain str log\_level. - -#### Signature - -```go -func WithLogLevel(level logging.LogLevel) ServerOption -``` - -#### Parameters - - - -#### Returns - -`ServerOption` - -#### Source - -[`pkg/server/server.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go) - -Line 84. - -*** - -### WithRunHost - -WithRunHost overrides the listen address when calling Run. - -#### Signature - -```go -func WithRunHost(host string) RunOption -``` - -#### Parameters - - - -#### Returns - -`RunOption` - -#### Source - -[`pkg/server/server.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go) - -Line 98. - -*** - -### WithRunPort - -WithRunPort overrides the listen port when calling Run. - -#### Signature - -```go -func WithRunPort(port int) RunOption -``` - -#### Parameters - - - -#### Returns - -`RunOption` - -#### Source - -[`pkg/server/server.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go) - -Line 103. - -*** - -### WithServerHost - -WithServerHost sets the listen address for the server. - -#### Signature - -```go -func WithServerHost(host string) ServerOption -``` - -#### Parameters - - - -#### Returns - -`ServerOption` - -#### Source - -[`pkg/server/server.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go) - -Line 64. - -*** - -### WithServerPort - -WithServerPort sets the listen port for the server. - -#### Signature - -```go -func WithServerPort(port int) ServerOption -``` - -#### Parameters - - - -#### Returns - -`ServerOption` - -#### Source - -[`pkg/server/server.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go) - -Line 69. - -## Type Aliases - -### RunOption - -RunOption overrides server settings at run time. - -#### Signature - -```go -type RunOption alias -``` - -#### Source - -[`pkg/server/server.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go) - -Line 95. - -*** - -### ServerOption - -ServerOption configures an AgentServer during construction. - -#### Signature - -```go -type ServerOption alias -``` - -#### Source - -[`pkg/server/server.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go) - -Line 61. - -## Source - -[`pkg/server/server.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/server/server.go) diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/api-ninjas-trivia-skill/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/api-ninjas-trivia-skill/index.mdx deleted file mode 100644 index 3732d0706d..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/api-ninjas-trivia-skill/index.mdx +++ /dev/null @@ -1,193 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/api-ninjas-trivia-skill" -title: "APINinjasTriviaSkill" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/skills/builtin.APINinjasTriviaSkill" - parent: "github.com/signalwire/signalwire-go/pkg/skills/builtin" - module: "github.com.signalwire.signalwire-go.pkg.skills.builtin" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/api_ninjas_trivia.go" ---- -# `APINinjasTriviaSkill` - -APINinjasTriviaSkill gets trivia questions from API Ninjas. - -## Signature - -```go -type APINinjasTriviaSkill struct -``` - -## Properties - - - -## Methods - -### GetHints - -#### Signature - -```go -func (*APINinjasTriviaSkill) GetHints() []string -``` - -#### Returns - -`[]string` - -#### Source - -[`pkg/skills/builtin/api_ninjas_trivia.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/api_ninjas_trivia.go) - -Line 225. - -*** - -### GetInstanceKey - -#### Signature - -```go -func (*APINinjasTriviaSkill) GetInstanceKey() string -``` - -#### Returns - -`string` - -#### Source - -[`pkg/skills/builtin/api_ninjas_trivia.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/api_ninjas_trivia.go) - -Line 64. - -*** - -### GetParameterSchema - -#### Signature - -```go -func (*APINinjasTriviaSkill) GetParameterSchema() map[string]map[string]any -``` - -#### Returns - -`map[string]map[string]any` - -#### Source - -[`pkg/skills/builtin/api_ninjas_trivia.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/api_ninjas_trivia.go) - -Line 242. - -*** - -### GetPromptSections - -#### Signature - -```go -func (*APINinjasTriviaSkill) GetPromptSections() []map[string]any -``` - -#### Returns - -`[]map[string]any` - -#### Source - -[`pkg/skills/builtin/api_ninjas_trivia.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/api_ninjas_trivia.go) - -Line 229. - -*** - -### RegisterTools - -#### Signature - -```go -func (*APINinjasTriviaSkill) RegisterTools() []skills.ToolRegistration -``` - -#### Returns - -`[]skills.ToolRegistration` - -#### Source - -[`pkg/skills/builtin/api_ninjas_trivia.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/api_ninjas_trivia.go) - -Line 116. - -*** - -### RequiredEnvVars - -#### Signature - -```go -func (*APINinjasTriviaSkill) RequiredEnvVars() []string -``` - -#### Returns - -`[]string` - -#### Source - -[`pkg/skills/builtin/api_ninjas_trivia.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/api_ninjas_trivia.go) - -Line 53. - -*** - -### Setup - -#### Signature - -```go -func (*APINinjasTriviaSkill) Setup() bool -``` - -#### Returns - -`bool` - -#### Source - -[`pkg/skills/builtin/api_ninjas_trivia.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/api_ninjas_trivia.go) - -Line 69. - -*** - -### SupportsMultipleInstances - -#### Signature - -```go -func (*APINinjasTriviaSkill) SupportsMultipleInstances() bool -``` - -#### Returns - -`bool` - -#### Source - -[`pkg/skills/builtin/api_ninjas_trivia.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/api_ninjas_trivia.go) - -Line 62. - -## Source - -[`pkg/skills/builtin/api_ninjas_trivia.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/api_ninjas_trivia.go) - -Line 34. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/claude-skills-skill/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/claude-skills-skill/index.mdx deleted file mode 100644 index abee977efc..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/claude-skills-skill/index.mdx +++ /dev/null @@ -1,211 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/claude-skills-skill" -title: "ClaudeSkillsSkill" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/skills/builtin.ClaudeSkillsSkill" - parent: "github.com/signalwire/signalwire-go/pkg/skills/builtin" - module: "github.com.signalwire.signalwire-go.pkg.skills.builtin" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/claude_skills.go" ---- -# `ClaudeSkillsSkill` - -ClaudeSkillsSkill loads Claude-style SKILL.md files as SignalWire agent tools. - -Each directory under skills\_path that contains a SKILL.md becomes a SWAIG tool. The SKILL.md frontmatter provides the tool name and description; the body becomes the tool's response content when invoked. - -## Signature - -```go -type ClaudeSkillsSkill struct -``` - -## Properties - - - -## Methods - -### GetHints - -GetHints returns speech recognition hints derived from loaded skill names. - -#### Signature - -```go -func (*ClaudeSkillsSkill) GetHints() []string -``` - -#### Returns - -`[]string` - -#### Source - -[`pkg/skills/builtin/claude_skills.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/claude_skills.go) - -Line 728. - -*** - -### GetInstanceKey - -GetInstanceKey returns a unique key based on skills\_path for multi-instance support. - -#### Signature - -```go -func (*ClaudeSkillsSkill) GetInstanceKey() string -``` - -#### Returns - -`string` - -#### Source - -[`pkg/skills/builtin/claude_skills.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/claude_skills.go) - -Line 797. - -*** - -### GetParameterSchema - -GetParameterSchema returns the full parameter schema for the SKILL.md loader. - -#### Signature - -```go -func (*ClaudeSkillsSkill) GetParameterSchema() map[string]map[string]any -``` - -#### Returns - -`map[string]map[string]any` - -#### Source - -[`pkg/skills/builtin/claude_skills.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/claude_skills.go) - -Line 804. - -*** - -### GetPromptSections - -GetPromptSections returns one prompt section per loaded skill (excluding skipped ones). - -#### Signature - -```go -func (*ClaudeSkillsSkill) GetPromptSections() []map[string]any -``` - -#### Returns - -`[]map[string]any` - -#### Source - -[`pkg/skills/builtin/claude_skills.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/claude_skills.go) - -Line 744. - -*** - -### RegisterTools - -RegisterTools returns one ToolRegistration per discovered SKILL.md that is not flagged to skip. - -#### Signature - -```go -func (*ClaudeSkillsSkill) RegisterTools() []skills.ToolRegistration -``` - -#### Returns - -`[]skills.ToolRegistration` - -#### Source - -[`pkg/skills/builtin/claude_skills.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/claude_skills.go) - -Line 612. - -*** - -### RequiredEnvVars - -RequiredEnvVars returns nil — no env vars required (skills\_path is a param). - -#### Signature - -```go -func (*ClaudeSkillsSkill) RequiredEnvVars() []string -``` - -#### Returns - -`[]string` - -#### Source - -[`pkg/skills/builtin/claude_skills.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/claude_skills.go) - -Line 118. - -*** - -### Setup - -Setup validates configuration and discovers SKILL.md files. - -#### Signature - -```go -func (*ClaudeSkillsSkill) Setup() bool -``` - -#### Returns - -`bool` - -#### Source - -[`pkg/skills/builtin/claude_skills.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/claude_skills.go) - -Line 121. - -*** - -### SupportsMultipleInstances - -SupportsMultipleInstances returns true — different skills\_path values create distinct instances. - -#### Signature - -```go -func (*ClaudeSkillsSkill) SupportsMultipleInstances() bool -``` - -#### Returns - -`bool` - -#### Source - -[`pkg/skills/builtin/claude_skills.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/claude_skills.go) - -Line 115. - -## Source - -[`pkg/skills/builtin/claude_skills.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/claude_skills.go) - -Line 82. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/custom-skills-skill/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/custom-skills-skill/index.mdx deleted file mode 100644 index 8a06f85243..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/custom-skills-skill/index.mdx +++ /dev/null @@ -1,153 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/custom-skills-skill" -title: "CustomSkillsSkill" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/skills/builtin.CustomSkillsSkill" - parent: "github.com/signalwire/signalwire-go/pkg/skills/builtin" - module: "github.com.signalwire.signalwire-go.pkg.skills.builtin" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/custom_skills.go" ---- -# `CustomSkillsSkill` - -CustomSkillsSkill is a meta-skill that registers user-defined tools. - -## Signature - -```go -type CustomSkillsSkill struct -``` - -## Properties - - - -## Methods - -### GetInstanceKey - -#### Signature - -```go -func (*CustomSkillsSkill) GetInstanceKey() string -``` - -#### Returns - -`string` - -#### Source - -[`pkg/skills/builtin/custom_skills.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/custom_skills.go) - -Line 28. - -*** - -### GetParameterSchema - -#### Signature - -```go -func (*CustomSkillsSkill) GetParameterSchema() map[string]map[string]any -``` - -#### Returns - -`map[string]map[string]any` - -#### Source - -[`pkg/skills/builtin/custom_skills.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/custom_skills.go) - -Line 134. - -*** - -### GetPromptSections - -#### Signature - -```go -func (*CustomSkillsSkill) GetPromptSections() []map[string]any -``` - -#### Returns - -`[]map[string]any` - -#### Source - -[`pkg/skills/builtin/custom_skills.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/custom_skills.go) - -Line 110. - -*** - -### RegisterTools - -#### Signature - -```go -func (*CustomSkillsSkill) RegisterTools() []skills.ToolRegistration -``` - -#### Returns - -`[]skills.ToolRegistration` - -#### Source - -[`pkg/skills/builtin/custom_skills.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/custom_skills.go) - -Line 60. - -*** - -### Setup - -#### Signature - -```go -func (*CustomSkillsSkill) Setup() bool -``` - -#### Returns - -`bool` - -#### Source - -[`pkg/skills/builtin/custom_skills.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/custom_skills.go) - -Line 33. - -*** - -### SupportsMultipleInstances - -#### Signature - -```go -func (*CustomSkillsSkill) SupportsMultipleInstances() bool -``` - -#### Returns - -`bool` - -#### Source - -[`pkg/skills/builtin/custom_skills.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/custom_skills.go) - -Line 26. - -## Source - -[`pkg/skills/builtin/custom_skills.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/custom_skills.go) - -Line 9. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/data-sphere-serverless-skill/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/data-sphere-serverless-skill/index.mdx deleted file mode 100644 index 4f10d0ba63..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/data-sphere-serverless-skill/index.mdx +++ /dev/null @@ -1,197 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/data-sphere-serverless-skill" -title: "DataSphereServerlessSkill" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/skills/builtin.DataSphereServerlessSkill" - parent: "github.com/signalwire/signalwire-go/pkg/skills/builtin" - module: "github.com.signalwire.signalwire-go.pkg.skills.builtin" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datasphere_serverless.go" ---- -# `DataSphereServerlessSkill` - -DataSphereServerlessSkill provides DataSphere search using DataMap (serverless execution). - -## Signature - -```go -type DataSphereServerlessSkill struct -``` - -## Properties - - - -## Methods - -### GetGlobalData - -GetGlobalData returns global data for agent context. - -#### Signature - -```go -func (*DataSphereServerlessSkill) GetGlobalData() map[string]any -``` - -#### Returns - -`map[string]any` - -#### Source - -[`pkg/skills/builtin/datasphere_serverless.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datasphere_serverless.go) - -Line 176. - -*** - -### GetInstanceKey - -#### Signature - -```go -func (*DataSphereServerlessSkill) GetInstanceKey() string -``` - -#### Returns - -`string` - -#### Source - -[`pkg/skills/builtin/datasphere_serverless.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datasphere_serverless.go) - -Line 58. - -*** - -### GetParameterSchema - -#### Signature - -```go -func (*DataSphereServerlessSkill) GetParameterSchema() map[string]map[string]any -``` - -#### Returns - -`map[string]map[string]any` - -#### Source - -[`pkg/skills/builtin/datasphere_serverless.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datasphere_serverless.go) - -Line 200. - -*** - -### GetPromptSections - -#### Signature - -```go -func (*DataSphereServerlessSkill) GetPromptSections() []map[string]any -``` - -#### Returns - -`[]map[string]any` - -#### Source - -[`pkg/skills/builtin/datasphere_serverless.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datasphere_serverless.go) - -Line 184. - -*** - -### RegisterTools - -RegisterTools returns DataMap-style tool registration for serverless execution. The actual tool is registered as a DataMap function that runs on SignalWire servers. - -#### Signature - -```go -func (*DataSphereServerlessSkill) RegisterTools() []skills.ToolRegistration -``` - -#### Returns - -`[]skills.ToolRegistration` - -#### Source - -[`pkg/skills/builtin/datasphere_serverless.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datasphere_serverless.go) - -Line 100. - -*** - -### RequiredEnvVars - -#### Signature - -```go -func (*DataSphereServerlessSkill) RequiredEnvVars() []string -``` - -#### Returns - -`[]string` - -#### Source - -[`pkg/skills/builtin/datasphere_serverless.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datasphere_serverless.go) - -Line 44. - -*** - -### Setup - -#### Signature - -```go -func (*DataSphereServerlessSkill) Setup() bool -``` - -#### Returns - -`bool` - -#### Source - -[`pkg/skills/builtin/datasphere_serverless.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datasphere_serverless.go) - -Line 63. - -*** - -### SupportsMultipleInstances - -#### Signature - -```go -func (*DataSphereServerlessSkill) SupportsMultipleInstances() bool -``` - -#### Returns - -`bool` - -#### Source - -[`pkg/skills/builtin/datasphere_serverless.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datasphere_serverless.go) - -Line 56. - -## Source - -[`pkg/skills/builtin/datasphere_serverless.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datasphere_serverless.go) - -Line 14. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/data-sphere-skill/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/data-sphere-skill/index.mdx deleted file mode 100644 index 794724e681..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/data-sphere-skill/index.mdx +++ /dev/null @@ -1,193 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/data-sphere-skill" -title: "DataSphereSkill" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/skills/builtin.DataSphereSkill" - parent: "github.com/signalwire/signalwire-go/pkg/skills/builtin" - module: "github.com.signalwire.signalwire-go.pkg.skills.builtin" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datasphere.go" ---- -# `DataSphereSkill` - -DataSphereSkill searches knowledge using SignalWire DataSphere RAG stack. - -## Signature - -```go -type DataSphereSkill struct -``` - -## Properties - - - -## Methods - -### GetGlobalData - -#### Signature - -```go -func (*DataSphereSkill) GetGlobalData() map[string]any -``` - -#### Returns - -`map[string]any` - -#### Source - -[`pkg/skills/builtin/datasphere.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datasphere.go) - -Line 221. - -*** - -### GetInstanceKey - -#### Signature - -```go -func (*DataSphereSkill) GetInstanceKey() string -``` - -#### Returns - -`string` - -#### Source - -[`pkg/skills/builtin/datasphere.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datasphere.go) - -Line 60. - -*** - -### GetParameterSchema - -#### Signature - -```go -func (*DataSphereSkill) GetParameterSchema() map[string]map[string]any -``` - -#### Returns - -`map[string]map[string]any` - -#### Source - -[`pkg/skills/builtin/datasphere.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datasphere.go) - -Line 244. - -*** - -### GetPromptSections - -#### Signature - -```go -func (*DataSphereSkill) GetPromptSections() []map[string]any -``` - -#### Returns - -`[]map[string]any` - -#### Source - -[`pkg/skills/builtin/datasphere.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datasphere.go) - -Line 229. - -*** - -### RegisterTools - -#### Signature - -```go -func (*DataSphereSkill) RegisterTools() []skills.ToolRegistration -``` - -#### Returns - -`[]skills.ToolRegistration` - -#### Source - -[`pkg/skills/builtin/datasphere.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datasphere.go) - -Line 124. - -*** - -### RequiredEnvVars - -#### Signature - -```go -func (*DataSphereSkill) RequiredEnvVars() []string -``` - -#### Returns - -`[]string` - -#### Source - -[`pkg/skills/builtin/datasphere.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datasphere.go) - -Line 46. - -*** - -### Setup - -#### Signature - -```go -func (*DataSphereSkill) Setup() bool -``` - -#### Returns - -`bool` - -#### Source - -[`pkg/skills/builtin/datasphere.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datasphere.go) - -Line 65. - -*** - -### SupportsMultipleInstances - -#### Signature - -```go -func (*DataSphereSkill) SupportsMultipleInstances() bool -``` - -#### Returns - -`bool` - -#### Source - -[`pkg/skills/builtin/datasphere.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datasphere.go) - -Line 58. - -## Source - -[`pkg/skills/builtin/datasphere.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datasphere.go) - -Line 16. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/date-time-skill/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/date-time-skill/index.mdx deleted file mode 100644 index dcd01c68aa..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/date-time-skill/index.mdx +++ /dev/null @@ -1,113 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/date-time-skill" -title: "DateTimeSkill" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/skills/builtin.DateTimeSkill" - parent: "github.com/signalwire/signalwire-go/pkg/skills/builtin" - module: "github.com.signalwire.signalwire-go.pkg.skills.builtin" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datetime.go" ---- -# `DateTimeSkill` - -DateTimeSkill provides current date and time information. - -## Signature - -```go -type DateTimeSkill struct -``` - -## Properties - - - -## Methods - -### GetHints - -#### Signature - -```go -func (*DateTimeSkill) GetHints() []string -``` - -#### Returns - -`[]string` - -#### Source - -[`pkg/skills/builtin/datetime.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datetime.go) - -Line 128. - -*** - -### GetPromptSections - -#### Signature - -```go -func (*DateTimeSkill) GetPromptSections() []map[string]any -``` - -#### Returns - -`[]map[string]any` - -#### Source - -[`pkg/skills/builtin/datetime.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datetime.go) - -Line 132. - -*** - -### RegisterTools - -#### Signature - -```go -func (*DateTimeSkill) RegisterTools() []skills.ToolRegistration -``` - -#### Returns - -`[]skills.ToolRegistration` - -#### Source - -[`pkg/skills/builtin/datetime.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datetime.go) - -Line 35. - -*** - -### Setup - -#### Signature - -```go -func (*DateTimeSkill) Setup() bool -``` - -#### Returns - -`bool` - -#### Source - -[`pkg/skills/builtin/datetime.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datetime.go) - -Line 30. - -## Source - -[`pkg/skills/builtin/datetime.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datetime.go) - -Line 12. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/google-maps-skill/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/google-maps-skill/index.mdx deleted file mode 100644 index ac266f2bc9..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/google-maps-skill/index.mdx +++ /dev/null @@ -1,153 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/google-maps-skill" -title: "GoogleMapsSkill" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/skills/builtin.GoogleMapsSkill" - parent: "github.com/signalwire/signalwire-go/pkg/skills/builtin" - module: "github.com.signalwire.signalwire-go.pkg.skills.builtin" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/google_maps.go" ---- -# `GoogleMapsSkill` - -GoogleMapsSkill validates addresses and computes routes using Google Maps. - -## Signature - -```go -type GoogleMapsSkill struct -``` - -## Properties - - - -## Methods - -### GetHints - -#### Signature - -```go -func (*GoogleMapsSkill) GetHints() []string -``` - -#### Returns - -`[]string` - -#### Source - -[`pkg/skills/builtin/google_maps.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/google_maps.go) - -Line 293. - -*** - -### GetParameterSchema - -#### Signature - -```go -func (*GoogleMapsSkill) GetParameterSchema() map[string]map[string]any -``` - -#### Returns - -`map[string]map[string]any` - -#### Source - -[`pkg/skills/builtin/google_maps.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/google_maps.go) - -Line 312. - -*** - -### GetPromptSections - -#### Signature - -```go -func (*GoogleMapsSkill) GetPromptSections() []map[string]any -``` - -#### Returns - -`[]map[string]any` - -#### Source - -[`pkg/skills/builtin/google_maps.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/google_maps.go) - -Line 297. - -*** - -### RegisterTools - -#### Signature - -```go -func (*GoogleMapsSkill) RegisterTools() []skills.ToolRegistration -``` - -#### Returns - -`[]skills.ToolRegistration` - -#### Source - -[`pkg/skills/builtin/google_maps.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/google_maps.go) - -Line 53. - -*** - -### RequiredEnvVars - -#### Signature - -```go -func (*GoogleMapsSkill) RequiredEnvVars() []string -``` - -#### Returns - -`[]string` - -#### Source - -[`pkg/skills/builtin/google_maps.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/google_maps.go) - -Line 37. - -*** - -### Setup - -#### Signature - -```go -func (*GoogleMapsSkill) Setup() bool -``` - -#### Returns - -`bool` - -#### Source - -[`pkg/skills/builtin/google_maps.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/google_maps.go) - -Line 46. - -## Source - -[`pkg/skills/builtin/google_maps.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/google_maps.go) - -Line 18. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/index.mdx deleted file mode 100644 index 29c28256ab..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/index.mdx +++ /dev/null @@ -1,590 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin" -title: "builtin" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "module" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/skills/builtin" - module: "github.com.signalwire.signalwire-go.pkg.skills.builtin" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/api_ninjas_trivia.go" ---- -# `builtin` - -## Signature - -```go -package builtin -``` - -## Constants - - - \_digitStartRE checks if a string starts with a digit. - - - - \_hyphenSpaceRE matches hyphens and spaces for sanitization. - - - - \_sanitizeRE matches characters invalid in SWAIG tool names. - - - - \_shellInjectionRE matches !`command` patterns in skill bodies. - - - - \_unsupportedFields maps SKILL.md frontmatter field names to warning message templates. - - -## Classes - - - - APINinjasTriviaSkill gets trivia questions from API Ninjas. - - - - ClaudeSkillsSkill loads Claude-style SKILL.md files as SignalWire agent tools. - - - - CustomSkillsSkill is a meta-skill that registers user-defined tools. - - - - DataSphereServerlessSkill provides DataSphere search using DataMap (serverless execution). - - - - DataSphereSkill searches knowledge using SignalWire DataSphere RAG stack. - - - - DateTimeSkill provides current date and time information. - - - - GoogleMapsSkill validates addresses and computes routes using Google Maps. - - - - InfoGathererSkill guides an AI agent through a series of questions, collecting and storing answers in global\_data. - - - - JokeSkill tells random jokes from a built-in list. - - - - MathSkill provides basic mathematical calculation capabilities. - - - - MCPGatewaySkill connects to MCP gateway servers and registers their tools. - - - - NativeVectorSearchSkill searches knowledge using a remote search server. - - - - PlayBackgroundFileSkill plays audio files in the background. - - - - SpiderSkill fetches and extracts text content from URLs. - - - - SWMLTransferSkill transfers calls between agents using DataMap pattern matching. - - - - WeatherAPISkill gets current weather from WeatherAPI.com. - - - - WebSearchSkill searches the web using Google Custom Search API. - - - - WikipediaSearchSkill searches Wikipedia for information. - - - -## Functions - -### NewAPINinjasTrivia - -NewAPINinjasTrivia creates a new APINinjasTriviaSkill. - -#### Signature - -```go -func NewAPINinjasTrivia(params map[string]any) skills.SkillBase -``` - -#### Parameters - - - -#### Returns - -`skills.SkillBase` - -#### Source - -[`pkg/skills/builtin/api_ninjas_trivia.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/api_ninjas_trivia.go) - -Line 42. - -*** - -### NewClaudeSkills - -NewClaudeSkills creates a new ClaudeSkillsSkill. - -#### Signature - -```go -func NewClaudeSkills(params map[string]any) skills.SkillBase -``` - -#### Parameters - - - -#### Returns - -`skills.SkillBase` - -#### Source - -[`pkg/skills/builtin/claude_skills.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/claude_skills.go) - -Line 103. - -*** - -### NewCustomSkills - -NewCustomSkills creates a new CustomSkillsSkill. - -#### Signature - -```go -func NewCustomSkills(params map[string]any) skills.SkillBase -``` - -#### Parameters - - - -#### Returns - -`skills.SkillBase` - -#### Source - -[`pkg/skills/builtin/custom_skills.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/custom_skills.go) - -Line 15. - -*** - -### NewDataSphere - -NewDataSphere creates a new DataSphereSkill. - -#### Signature - -```go -func NewDataSphere(params map[string]any) skills.SkillBase -``` - -#### Parameters - - - -#### Returns - -`skills.SkillBase` - -#### Source - -[`pkg/skills/builtin/datasphere.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datasphere.go) - -Line 34. - -*** - -### NewDataSphereServerless - -NewDataSphereServerless creates a new DataSphereServerlessSkill. - -#### Signature - -```go -func NewDataSphereServerless(params map[string]any) skills.SkillBase -``` - -#### Parameters - - - -#### Returns - -`skills.SkillBase` - -#### Source - -[`pkg/skills/builtin/datasphere_serverless.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datasphere_serverless.go) - -Line 33. - -*** - -### NewDateTime - -NewDateTime creates a new DateTimeSkill. - -#### Signature - -```go -func NewDateTime(params map[string]any) skills.SkillBase -``` - -#### Parameters - - - -#### Returns - -`skills.SkillBase` - -#### Source - -[`pkg/skills/builtin/datetime.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/datetime.go) - -Line 18. - -*** - -### NewGoogleMaps - -NewGoogleMaps creates a new GoogleMapsSkill. - -#### Signature - -```go -func NewGoogleMaps(params map[string]any) skills.SkillBase -``` - -#### Parameters - - - -#### Returns - -`skills.SkillBase` - -#### Source - -[`pkg/skills/builtin/google_maps.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/google_maps.go) - -Line 26. - -*** - -### NewInfoGatherer - -NewInfoGatherer creates a new InfoGathererSkill. - -#### Signature - -```go -func NewInfoGatherer(params map[string]any) skills.SkillBase -``` - -#### Parameters - - - -#### Returns - -`skills.SkillBase` - -#### Source - -[`pkg/skills/builtin/info_gatherer.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/info_gatherer.go) - -Line 22. - -*** - -### NewJoke - -NewJoke creates a new JokeSkill. - -#### Signature - -```go -func NewJoke(params map[string]any) skills.SkillBase -``` - -#### Parameters - - - -#### Returns - -`skills.SkillBase` - -#### Source - -[`pkg/skills/builtin/joke.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/joke.go) - -Line 36. - -*** - -### NewMath - -NewMath creates a new MathSkill. - -#### Signature - -```go -func NewMath(params map[string]any) skills.SkillBase -``` - -#### Parameters - - - -#### Returns - -`skills.SkillBase` - -#### Source - -[`pkg/skills/builtin/math.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/math.go) - -Line 21. - -*** - -### NewMCPGateway - -NewMCPGateway creates a new MCPGatewaySkill. - -#### Signature - -```go -func NewMCPGateway(params map[string]any) skills.SkillBase -``` - -#### Parameters - - - -#### Returns - -`skills.SkillBase` - -#### Source - -[`pkg/skills/builtin/mcp_gateway.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/mcp_gateway.go) - -Line 34. - -*** - -### NewNativeVectorSearch - -NewNativeVectorSearch creates a new NativeVectorSearchSkill. - -#### Signature - -```go -func NewNativeVectorSearch(params map[string]any) skills.SkillBase -``` - -#### Parameters - - - -#### Returns - -`skills.SkillBase` - -#### Source - -[`pkg/skills/builtin/native_vector_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/native_vector_search.go) - -Line 38. - -*** - -### NewPlayBackgroundFile - -NewPlayBackgroundFile creates a new PlayBackgroundFileSkill. - -#### Signature - -```go -func NewPlayBackgroundFile(params map[string]any) skills.SkillBase -``` - -#### Parameters - - - -#### Returns - -`skills.SkillBase` - -#### Source - -[`pkg/skills/builtin/play_background_file.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/play_background_file.go) - -Line 22. - -*** - -### NewSpider - -NewSpider creates a new SpiderSkill. - -#### Signature - -```go -func NewSpider(params map[string]any) skills.SkillBase -``` - -#### Parameters - - - -#### Returns - -`skills.SkillBase` - -#### Source - -[`pkg/skills/builtin/spider.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/spider.go) - -Line 72. - -*** - -### NewSWMLTransfer - -NewSWMLTransfer creates a new SWMLTransferSkill. - -#### Signature - -```go -func NewSWMLTransfer(params map[string]any) skills.SkillBase -``` - -#### Parameters - - - -#### Returns - -`skills.SkillBase` - -#### Source - -[`pkg/skills/builtin/swml_transfer.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/swml_transfer.go) - -Line 25. - -*** - -### NewWeatherAPI - -NewWeatherAPI creates a new WeatherAPISkill. - -#### Signature - -```go -func NewWeatherAPI(params map[string]any) skills.SkillBase -``` - -#### Parameters - - - -#### Returns - -`skills.SkillBase` - -#### Source - -[`pkg/skills/builtin/weather_api.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/weather_api.go) - -Line 25. - -*** - -### NewWebSearch - -NewWebSearch creates a new WebSearchSkill. - -#### Signature - -```go -func NewWebSearch(params map[string]any) skills.SkillBase -``` - -#### Parameters - - - -#### Returns - -`skills.SkillBase` - -#### Source - -[`pkg/skills/builtin/web_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/web_search.go) - -Line 60. - -*** - -### NewWikipediaSearch - -NewWikipediaSearch creates a new WikipediaSearchSkill. - -#### Signature - -```go -func NewWikipediaSearch(params map[string]any) skills.SkillBase -``` - -#### Parameters - - - -#### Returns - -`skills.SkillBase` - -#### Source - -[`pkg/skills/builtin/wikipedia_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/wikipedia_search.go) - -Line 24. - -## Source - -[`pkg/skills/builtin/api_ninjas_trivia.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/api_ninjas_trivia.go) diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/info-gatherer-skill/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/info-gatherer-skill/index.mdx deleted file mode 100644 index fa2c598246..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/info-gatherer-skill/index.mdx +++ /dev/null @@ -1,173 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/info-gatherer-skill" -title: "InfoGathererSkill" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/skills/builtin.InfoGathererSkill" - parent: "github.com/signalwire/signalwire-go/pkg/skills/builtin" - module: "github.com.signalwire.signalwire-go.pkg.skills.builtin" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/info_gatherer.go" ---- -# `InfoGathererSkill` - -InfoGathererSkill guides an AI agent through a series of questions, collecting and storing answers in global\_data. - -## Signature - -```go -type InfoGathererSkill struct -``` - -## Properties - - - -## Methods - -### GetGlobalData - -#### Signature - -```go -func (*InfoGathererSkill) GetGlobalData() map[string]any -``` - -#### Returns - -`map[string]any` - -#### Source - -[`pkg/skills/builtin/info_gatherer.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/info_gatherer.go) - -Line 249. - -*** - -### GetInstanceKey - -#### Signature - -```go -func (*InfoGathererSkill) GetInstanceKey() string -``` - -#### Returns - -`string` - -#### Source - -[`pkg/skills/builtin/info_gatherer.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/info_gatherer.go) - -Line 35. - -*** - -### GetParameterSchema - -#### Signature - -```go -func (*InfoGathererSkill) GetParameterSchema() map[string]map[string]any -``` - -#### Returns - -`map[string]map[string]any` - -#### Source - -[`pkg/skills/builtin/info_gatherer.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/info_gatherer.go) - -Line 282. - -*** - -### GetPromptSections - -#### Signature - -```go -func (*InfoGathererSkill) GetPromptSections() []map[string]any -``` - -#### Returns - -`[]map[string]any` - -#### Source - -[`pkg/skills/builtin/info_gatherer.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/info_gatherer.go) - -Line 259. - -*** - -### RegisterTools - -#### Signature - -```go -func (*InfoGathererSkill) RegisterTools() []skills.ToolRegistration -``` - -#### Returns - -`[]skills.ToolRegistration` - -#### Source - -[`pkg/skills/builtin/info_gatherer.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/info_gatherer.go) - -Line 84. - -*** - -### Setup - -#### Signature - -```go -func (*InfoGathererSkill) Setup() bool -``` - -#### Returns - -`bool` - -#### Source - -[`pkg/skills/builtin/info_gatherer.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/info_gatherer.go) - -Line 42. - -*** - -### SupportsMultipleInstances - -#### Signature - -```go -func (*InfoGathererSkill) SupportsMultipleInstances() bool -``` - -#### Returns - -`bool` - -#### Source - -[`pkg/skills/builtin/info_gatherer.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/info_gatherer.go) - -Line 33. - -## Source - -[`pkg/skills/builtin/info_gatherer.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/info_gatherer.go) - -Line 12. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/joke-skill/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/joke-skill/index.mdx deleted file mode 100644 index 9c1a1c33cb..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/joke-skill/index.mdx +++ /dev/null @@ -1,133 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/joke-skill" -title: "JokeSkill" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/skills/builtin.JokeSkill" - parent: "github.com/signalwire/signalwire-go/pkg/skills/builtin" - module: "github.com.signalwire.signalwire-go.pkg.skills.builtin" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/joke.go" ---- -# `JokeSkill` - -JokeSkill tells random jokes from a built-in list. - -## Signature - -```go -type JokeSkill struct -``` - -## Properties - - - -## Methods - -### GetGlobalData - -#### Signature - -```go -func (*JokeSkill) GetGlobalData() map[string]any -``` - -#### Returns - -`map[string]any` - -#### Source - -[`pkg/skills/builtin/joke.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/joke.go) - -Line 79. - -*** - -### GetHints - -#### Signature - -```go -func (*JokeSkill) GetHints() []string -``` - -#### Returns - -`[]string` - -#### Source - -[`pkg/skills/builtin/joke.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/joke.go) - -Line 85. - -*** - -### GetPromptSections - -#### Signature - -```go -func (*JokeSkill) GetPromptSections() []map[string]any -``` - -#### Returns - -`[]map[string]any` - -#### Source - -[`pkg/skills/builtin/joke.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/joke.go) - -Line 89. - -*** - -### RegisterTools - -#### Signature - -```go -func (*JokeSkill) RegisterTools() []skills.ToolRegistration -``` - -#### Returns - -`[]skills.ToolRegistration` - -#### Source - -[`pkg/skills/builtin/joke.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/joke.go) - -Line 53. - -*** - -### Setup - -#### Signature - -```go -func (*JokeSkill) Setup() bool -``` - -#### Returns - -`bool` - -#### Source - -[`pkg/skills/builtin/joke.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/joke.go) - -Line 47. - -## Source - -[`pkg/skills/builtin/joke.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/joke.go) - -Line 29. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/math-skill/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/math-skill/index.mdx deleted file mode 100644 index dfcff0881b..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/math-skill/index.mdx +++ /dev/null @@ -1,93 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/math-skill" -title: "MathSkill" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/skills/builtin.MathSkill" - parent: "github.com/signalwire/signalwire-go/pkg/skills/builtin" - module: "github.com.signalwire.signalwire-go.pkg.skills.builtin" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/math.go" ---- -# `MathSkill` - -MathSkill provides basic mathematical calculation capabilities. - -## Signature - -```go -type MathSkill struct -``` - -## Properties - - - -## Methods - -### GetPromptSections - -#### Signature - -```go -func (*MathSkill) GetPromptSections() []map[string]any -``` - -#### Returns - -`[]map[string]any` - -#### Source - -[`pkg/skills/builtin/math.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/math.go) - -Line 143. - -*** - -### RegisterTools - -#### Signature - -```go -func (*MathSkill) RegisterTools() []skills.ToolRegistration -``` - -#### Returns - -`[]skills.ToolRegistration` - -#### Source - -[`pkg/skills/builtin/math.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/math.go) - -Line 34. - -*** - -### Setup - -#### Signature - -```go -func (*MathSkill) Setup() bool -``` - -#### Returns - -`bool` - -#### Source - -[`pkg/skills/builtin/math.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/math.go) - -Line 32. - -## Source - -[`pkg/skills/builtin/math.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/math.go) - -Line 16. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/mcp-gateway-skill/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/mcp-gateway-skill/index.mdx deleted file mode 100644 index 800378e4f3..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/mcp-gateway-skill/index.mdx +++ /dev/null @@ -1,155 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/mcp-gateway-skill" -title: "MCPGatewaySkill" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/skills/builtin.MCPGatewaySkill" - parent: "github.com/signalwire/signalwire-go/pkg/skills/builtin" - module: "github.com.signalwire.signalwire-go.pkg.skills.builtin" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/mcp_gateway.go" ---- -# `MCPGatewaySkill` - -MCPGatewaySkill connects to MCP gateway servers and registers their tools. - -## Signature - -```go -type MCPGatewaySkill struct -``` - -## Properties - - - -## Methods - -### GetGlobalData - -GetGlobalData returns MCP gateway state for DataMap variable expansion. Mirrors Python get\_global\_data: mcp\_gateway\_url, mcp\_session\_id, mcp\_services. - -#### Signature - -```go -func (*MCPGatewaySkill) GetGlobalData() map[string]any -``` - -#### Returns - -`map[string]any` - -#### Source - -[`pkg/skills/builtin/mcp_gateway.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/mcp_gateway.go) - -Line 353. - -*** - -### GetHints - -#### Signature - -```go -func (*MCPGatewaySkill) GetHints() []string -``` - -#### Returns - -`[]string` - -#### Source - -[`pkg/skills/builtin/mcp_gateway.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/mcp_gateway.go) - -Line 367. - -*** - -### GetParameterSchema - -#### Signature - -```go -func (*MCPGatewaySkill) GetParameterSchema() map[string]map[string]any -``` - -#### Returns - -`map[string]map[string]any` - -#### Source - -[`pkg/skills/builtin/mcp_gateway.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/mcp_gateway.go) - -Line 398. - -*** - -### GetPromptSections - -#### Signature - -```go -func (*MCPGatewaySkill) GetPromptSections() []map[string]any -``` - -#### Returns - -`[]map[string]any` - -#### Source - -[`pkg/skills/builtin/mcp_gateway.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/mcp_gateway.go) - -Line 377. - -*** - -### RegisterTools - -#### Signature - -```go -func (*MCPGatewaySkill) RegisterTools() []skills.ToolRegistration -``` - -#### Returns - -`[]skills.ToolRegistration` - -#### Source - -[`pkg/skills/builtin/mcp_gateway.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/mcp_gateway.go) - -Line 110. - -*** - -### Setup - -#### Signature - -```go -func (*MCPGatewaySkill) Setup() bool -``` - -#### Returns - -`bool` - -#### Source - -[`pkg/skills/builtin/mcp_gateway.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/mcp_gateway.go) - -Line 45. - -## Source - -[`pkg/skills/builtin/mcp_gateway.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/mcp_gateway.go) - -Line 17. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/native-vector-search-skill/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/native-vector-search-skill/index.mdx deleted file mode 100644 index a29c8766ac..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/native-vector-search-skill/index.mdx +++ /dev/null @@ -1,193 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/native-vector-search-skill" -title: "NativeVectorSearchSkill" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/skills/builtin.NativeVectorSearchSkill" - parent: "github.com/signalwire/signalwire-go/pkg/skills/builtin" - module: "github.com.signalwire.signalwire-go.pkg.skills.builtin" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/native_vector_search.go" ---- -# `NativeVectorSearchSkill` - -NativeVectorSearchSkill searches knowledge using a remote search server. - -## Signature - -```go -type NativeVectorSearchSkill struct -``` - -## Properties - - - -## Methods - -### GetGlobalData - -#### Signature - -```go -func (*NativeVectorSearchSkill) GetGlobalData() map[string]any -``` - -#### Returns - -`map[string]any` - -#### Source - -[`pkg/skills/builtin/native_vector_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/native_vector_search.go) - -Line 380. - -*** - -### GetHints - -#### Signature - -```go -func (*NativeVectorSearchSkill) GetHints() []string -``` - -#### Returns - -`[]string` - -#### Source - -[`pkg/skills/builtin/native_vector_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/native_vector_search.go) - -Line 350. - -*** - -### GetInstanceKey - -#### Signature - -```go -func (*NativeVectorSearchSkill) GetInstanceKey() string -``` - -#### Returns - -`string` - -#### Source - -[`pkg/skills/builtin/native_vector_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/native_vector_search.go) - -Line 52. - -*** - -### GetParameterSchema - -#### Signature - -```go -func (*NativeVectorSearchSkill) GetParameterSchema() map[string]map[string]any -``` - -#### Returns - -`map[string]map[string]any` - -#### Source - -[`pkg/skills/builtin/native_vector_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/native_vector_search.go) - -Line 386. - -*** - -### GetPromptSections - -#### Signature - -```go -func (*NativeVectorSearchSkill) GetPromptSections() []map[string]any -``` - -#### Returns - -`[]map[string]any` - -#### Source - -[`pkg/skills/builtin/native_vector_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/native_vector_search.go) - -Line 362. - -*** - -### RegisterTools - -#### Signature - -```go -func (*NativeVectorSearchSkill) RegisterTools() []skills.ToolRegistration -``` - -#### Returns - -`[]skills.ToolRegistration` - -#### Source - -[`pkg/skills/builtin/native_vector_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/native_vector_search.go) - -Line 200. - -*** - -### Setup - -#### Signature - -```go -func (*NativeVectorSearchSkill) Setup() bool -``` - -#### Returns - -`bool` - -#### Source - -[`pkg/skills/builtin/native_vector_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/native_vector_search.go) - -Line 116. - -*** - -### SupportsMultipleInstances - -#### Signature - -```go -func (*NativeVectorSearchSkill) SupportsMultipleInstances() bool -``` - -#### Returns - -`bool` - -#### Source - -[`pkg/skills/builtin/native_vector_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/native_vector_search.go) - -Line 50. - -## Source - -[`pkg/skills/builtin/native_vector_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/native_vector_search.go) - -Line 20. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/play-background-file-skill/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/play-background-file-skill/index.mdx deleted file mode 100644 index 9be45d0cd4..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/play-background-file-skill/index.mdx +++ /dev/null @@ -1,133 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/play-background-file-skill" -title: "PlayBackgroundFileSkill" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/skills/builtin.PlayBackgroundFileSkill" - parent: "github.com/signalwire/signalwire-go/pkg/skills/builtin" - module: "github.com.signalwire.signalwire-go.pkg.skills.builtin" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/play_background_file.go" ---- -# `PlayBackgroundFileSkill` - -PlayBackgroundFileSkill plays audio files in the background. - -## Signature - -```go -type PlayBackgroundFileSkill struct -``` - -## Properties - - - -## Methods - -### GetInstanceKey - -#### Signature - -```go -func (*PlayBackgroundFileSkill) GetInstanceKey() string -``` - -#### Returns - -`string` - -#### Source - -[`pkg/skills/builtin/play_background_file.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/play_background_file.go) - -Line 35. - -*** - -### GetParameterSchema - -#### Signature - -```go -func (*PlayBackgroundFileSkill) GetParameterSchema() map[string]map[string]any -``` - -#### Returns - -`map[string]map[string]any` - -#### Source - -[`pkg/skills/builtin/play_background_file.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/play_background_file.go) - -Line 158. - -*** - -### RegisterTools - -#### Signature - -```go -func (*PlayBackgroundFileSkill) RegisterTools() []skills.ToolRegistration -``` - -#### Returns - -`[]skills.ToolRegistration` - -#### Source - -[`pkg/skills/builtin/play_background_file.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/play_background_file.go) - -Line 84. - -*** - -### Setup - -#### Signature - -```go -func (*PlayBackgroundFileSkill) Setup() bool -``` - -#### Returns - -`bool` - -#### Source - -[`pkg/skills/builtin/play_background_file.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/play_background_file.go) - -Line 40. - -*** - -### SupportsMultipleInstances - -#### Signature - -```go -func (*PlayBackgroundFileSkill) SupportsMultipleInstances() bool -``` - -#### Returns - -`bool` - -#### Source - -[`pkg/skills/builtin/play_background_file.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/play_background_file.go) - -Line 33. - -## Source - -[`pkg/skills/builtin/play_background_file.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/play_background_file.go) - -Line 15. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/spider-skill/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/spider-skill/index.mdx deleted file mode 100644 index 9d0f07266f..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/spider-skill/index.mdx +++ /dev/null @@ -1,173 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/spider-skill" -title: "SpiderSkill" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/skills/builtin.SpiderSkill" - parent: "github.com/signalwire/signalwire-go/pkg/skills/builtin" - module: "github.com.signalwire.signalwire-go.pkg.skills.builtin" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/spider.go" ---- -# `SpiderSkill` - -SpiderSkill fetches and extracts text content from URLs. - -## Signature - -```go -type SpiderSkill struct -``` - -## Properties - - - -## Methods - -### Cleanup - -Cleanup releases resources when the skill is unloaded. - -#### Signature - -```go -func (*SpiderSkill) Cleanup() -``` - -#### Source - -[`pkg/skills/builtin/spider.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/spider.go) - -Line 720. - -*** - -### GetHints - -#### Signature - -```go -func (*SpiderSkill) GetHints() []string -``` - -#### Returns - -`[]string` - -#### Source - -[`pkg/skills/builtin/spider.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/spider.go) - -Line 715. - -*** - -### GetInstanceKey - -#### Signature - -```go -func (*SpiderSkill) GetInstanceKey() string -``` - -#### Returns - -`string` - -#### Source - -[`pkg/skills/builtin/spider.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/spider.go) - -Line 85. - -*** - -### GetParameterSchema - -GetParameterSchema returns the full parameter schema extending the base schema. - -#### Signature - -```go -func (*SpiderSkill) GetParameterSchema() map[string]map[string]any -``` - -#### Returns - -`map[string]map[string]any` - -#### Source - -[`pkg/skills/builtin/spider.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/spider.go) - -Line 149. - -*** - -### RegisterTools - -#### Signature - -```go -func (*SpiderSkill) RegisterTools() []skills.ToolRegistration -``` - -#### Returns - -`[]skills.ToolRegistration` - -#### Source - -[`pkg/skills/builtin/spider.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/spider.go) - -Line 253. - -*** - -### Setup - -#### Signature - -```go -func (*SpiderSkill) Setup() bool -``` - -#### Returns - -`bool` - -#### Source - -[`pkg/skills/builtin/spider.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/spider.go) - -Line 90. - -*** - -### SupportsMultipleInstances - -#### Signature - -```go -func (*SpiderSkill) SupportsMultipleInstances() bool -``` - -#### Returns - -`bool` - -#### Source - -[`pkg/skills/builtin/spider.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/spider.go) - -Line 83. - -## Source - -[`pkg/skills/builtin/spider.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/spider.go) - -Line 47. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/swml-transfer-skill/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/swml-transfer-skill/index.mdx deleted file mode 100644 index 6039025e5c..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/swml-transfer-skill/index.mdx +++ /dev/null @@ -1,173 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/swml-transfer-skill" -title: "SWMLTransferSkill" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/skills/builtin.SWMLTransferSkill" - parent: "github.com/signalwire/signalwire-go/pkg/skills/builtin" - module: "github.com.signalwire.signalwire-go.pkg.skills.builtin" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/swml_transfer.go" ---- -# `SWMLTransferSkill` - -SWMLTransferSkill transfers calls between agents using DataMap pattern matching. - -## Signature - -```go -type SWMLTransferSkill struct -``` - -## Properties - - - -## Methods - -### GetHints - -#### Signature - -```go -func (*SWMLTransferSkill) GetHints() []string -``` - -#### Returns - -`[]string` - -#### Source - -[`pkg/skills/builtin/swml_transfer.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/swml_transfer.go) - -Line 221. - -*** - -### GetInstanceKey - -#### Signature - -```go -func (*SWMLTransferSkill) GetInstanceKey() string -``` - -#### Returns - -`string` - -#### Source - -[`pkg/skills/builtin/swml_transfer.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/swml_transfer.go) - -Line 38. - -*** - -### GetParameterSchema - -#### Signature - -```go -func (*SWMLTransferSkill) GetParameterSchema() map[string]map[string]any -``` - -#### Returns - -`map[string]map[string]any` - -#### Source - -[`pkg/skills/builtin/swml_transfer.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/swml_transfer.go) - -Line 305. - -*** - -### GetPromptSections - -#### Signature - -```go -func (*SWMLTransferSkill) GetPromptSections() []map[string]any -``` - -#### Returns - -`[]map[string]any` - -#### Source - -[`pkg/skills/builtin/swml_transfer.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/swml_transfer.go) - -Line 247. - -*** - -### RegisterTools - -#### Signature - -```go -func (*SWMLTransferSkill) RegisterTools() []skills.ToolRegistration -``` - -#### Returns - -`[]skills.ToolRegistration` - -#### Source - -[`pkg/skills/builtin/swml_transfer.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/swml_transfer.go) - -Line 75. - -*** - -### Setup - -#### Signature - -```go -func (*SWMLTransferSkill) Setup() bool -``` - -#### Returns - -`bool` - -#### Source - -[`pkg/skills/builtin/swml_transfer.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/swml_transfer.go) - -Line 43. - -*** - -### SupportsMultipleInstances - -#### Signature - -```go -func (*SWMLTransferSkill) SupportsMultipleInstances() bool -``` - -#### Returns - -`bool` - -#### Source - -[`pkg/skills/builtin/swml_transfer.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/swml_transfer.go) - -Line 36. - -## Source - -[`pkg/skills/builtin/swml_transfer.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/swml_transfer.go) - -Line 12. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/weather-api-skill/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/weather-api-skill/index.mdx deleted file mode 100644 index 46e5c32578..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/weather-api-skill/index.mdx +++ /dev/null @@ -1,153 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/weather-api-skill" -title: "WeatherAPISkill" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/skills/builtin.WeatherAPISkill" - parent: "github.com/signalwire/signalwire-go/pkg/skills/builtin" - module: "github.com.signalwire.signalwire-go.pkg.skills.builtin" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/weather_api.go" ---- -# `WeatherAPISkill` - -WeatherAPISkill gets current weather from WeatherAPI.com. - -## Signature - -```go -type WeatherAPISkill struct -``` - -## Properties - - - -## Methods - -### GetHints - -#### Signature - -```go -func (*WeatherAPISkill) GetHints() []string -``` - -#### Returns - -`[]string` - -#### Source - -[`pkg/skills/builtin/weather_api.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/weather_api.go) - -Line 217. - -*** - -### GetParameterSchema - -#### Signature - -```go -func (*WeatherAPISkill) GetParameterSchema() map[string]map[string]any -``` - -#### Returns - -`map[string]map[string]any` - -#### Source - -[`pkg/skills/builtin/weather_api.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/weather_api.go) - -Line 234. - -*** - -### GetPromptSections - -#### Signature - -```go -func (*WeatherAPISkill) GetPromptSections() []map[string]any -``` - -#### Returns - -`[]map[string]any` - -#### Source - -[`pkg/skills/builtin/weather_api.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/weather_api.go) - -Line 221. - -*** - -### RegisterTools - -#### Signature - -```go -func (*WeatherAPISkill) RegisterTools() []skills.ToolRegistration -``` - -#### Returns - -`[]skills.ToolRegistration` - -#### Source - -[`pkg/skills/builtin/weather_api.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/weather_api.go) - -Line 61. - -*** - -### RequiredEnvVars - -#### Signature - -```go -func (*WeatherAPISkill) RequiredEnvVars() []string -``` - -#### Returns - -`[]string` - -#### Source - -[`pkg/skills/builtin/weather_api.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/weather_api.go) - -Line 36. - -*** - -### Setup - -#### Signature - -```go -func (*WeatherAPISkill) Setup() bool -``` - -#### Returns - -`bool` - -#### Source - -[`pkg/skills/builtin/weather_api.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/weather_api.go) - -Line 46. - -## Source - -[`pkg/skills/builtin/weather_api.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/weather_api.go) - -Line 17. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/web-search-skill/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/web-search-skill/index.mdx deleted file mode 100644 index b1318d4aaf..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/web-search-skill/index.mdx +++ /dev/null @@ -1,197 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/web-search-skill" -title: "WebSearchSkill" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/skills/builtin.WebSearchSkill" - parent: "github.com/signalwire/signalwire-go/pkg/skills/builtin" - module: "github.com.signalwire.signalwire-go.pkg.skills.builtin" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/web_search.go" ---- -# `WebSearchSkill` - -WebSearchSkill searches the web using Google Custom Search API. - -## Signature - -```go -type WebSearchSkill struct -``` - -## Properties - - - -## Methods - -### GetGlobalData - -GetGlobalData returns global context data signalling that quality-filtered web search is available. Mirrors Python's get\_global\_data return value. - -#### Signature - -```go -func (*WebSearchSkill) GetGlobalData() map[string]any -``` - -#### Returns - -`map[string]any` - -#### Source - -[`pkg/skills/builtin/web_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/web_search.go) - -Line 898. - -*** - -### GetInstanceKey - -GetInstanceKey returns a unique key incorporating both searchEngineID and toolName, matching Python's f"\{SKILL\_NAME\}_\{search\_engine\_id\}_\{tool\_name\}" pattern. - -#### Signature - -```go -func (*WebSearchSkill) GetInstanceKey() string -``` - -#### Returns - -`string` - -#### Source - -[`pkg/skills/builtin/web_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/web_search.go) - -Line 86. - -*** - -### GetParameterSchema - -#### Signature - -```go -func (*WebSearchSkill) GetParameterSchema() map[string]map[string]any -``` - -#### Returns - -`map[string]map[string]any` - -#### Source - -[`pkg/skills/builtin/web_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/web_search.go) - -Line 921. - -*** - -### GetPromptSections - -#### Signature - -```go -func (*WebSearchSkill) GetPromptSections() []map[string]any -``` - -#### Returns - -`[]map[string]any` - -#### Source - -[`pkg/skills/builtin/web_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/web_search.go) - -Line 906. - -*** - -### RegisterTools - -#### Signature - -```go -func (*WebSearchSkill) RegisterTools() []skills.ToolRegistration -``` - -#### Returns - -`[]skills.ToolRegistration` - -#### Source - -[`pkg/skills/builtin/web_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/web_search.go) - -Line 118. - -*** - -### RequiredEnvVars - -#### Signature - -```go -func (*WebSearchSkill) RequiredEnvVars() []string -``` - -#### Returns - -`[]string` - -#### Source - -[`pkg/skills/builtin/web_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/web_search.go) - -Line 71. - -*** - -### Setup - -#### Signature - -```go -func (*WebSearchSkill) Setup() bool -``` - -#### Returns - -`bool` - -#### Source - -[`pkg/skills/builtin/web_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/web_search.go) - -Line 90. - -*** - -### SupportsMultipleInstances - -#### Signature - -```go -func (*WebSearchSkill) SupportsMultipleInstances() bool -``` - -#### Returns - -`bool` - -#### Source - -[`pkg/skills/builtin/web_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/web_search.go) - -Line 82. - -## Source - -[`pkg/skills/builtin/web_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/web_search.go) - -Line 24. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/wikipedia-search-skill/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/wikipedia-search-skill/index.mdx deleted file mode 100644 index 6b695fc908..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/wikipedia-search-skill/index.mdx +++ /dev/null @@ -1,113 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin/wikipedia-search-skill" -title: "WikipediaSearchSkill" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/skills/builtin.WikipediaSearchSkill" - parent: "github.com/signalwire/signalwire-go/pkg/skills/builtin" - module: "github.com.signalwire.signalwire-go.pkg.skills.builtin" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/wikipedia_search.go" ---- -# `WikipediaSearchSkill` - -WikipediaSearchSkill searches Wikipedia for information. - -## Signature - -```go -type WikipediaSearchSkill struct -``` - -## Properties - - - -## Methods - -### GetParameterSchema - -#### Signature - -```go -func (*WikipediaSearchSkill) GetParameterSchema() map[string]map[string]any -``` - -#### Returns - -`map[string]map[string]any` - -#### Source - -[`pkg/skills/builtin/wikipedia_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/wikipedia_search.go) - -Line 46. - -*** - -### GetPromptSections - -#### Signature - -```go -func (*WikipediaSearchSkill) GetPromptSections() []map[string]any -``` - -#### Returns - -`[]map[string]any` - -#### Source - -[`pkg/skills/builtin/wikipedia_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/wikipedia_search.go) - -Line 182. - -*** - -### RegisterTools - -#### Signature - -```go -func (*WikipediaSearchSkill) RegisterTools() []skills.ToolRegistration -``` - -#### Returns - -`[]skills.ToolRegistration` - -#### Source - -[`pkg/skills/builtin/wikipedia_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/wikipedia_search.go) - -Line 65. - -*** - -### Setup - -#### Signature - -```go -func (*WikipediaSearchSkill) Setup() bool -``` - -#### Returns - -`bool` - -#### Source - -[`pkg/skills/builtin/wikipedia_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/wikipedia_search.go) - -Line 35. - -## Source - -[`pkg/skills/builtin/wikipedia_search.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/builtin/wikipedia_search.go) - -Line 17. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/skills/base-skill/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/skills/base-skill/index.mdx deleted file mode 100644 index faaf0bc825..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/skills/base-skill/index.mdx +++ /dev/null @@ -1,519 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/skills/skills/base-skill" -title: "BaseSkill" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/skills.BaseSkill" - parent: "github.com/signalwire/signalwire-go/pkg/skills" - module: "github.com.signalwire.signalwire-go.pkg.skills" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go" ---- -# `BaseSkill` - -BaseSkill provides default implementations for the SkillBase interface. Concrete skills should embed this struct and override methods as needed. - -## Signature - -```go -type BaseSkill struct -``` - -## Properties - - - Logger is a named logger for this skill instance. It is initialized automatically when Name() is first called via NewBaseSkill, or can be set explicitly. Mirrors Python SkillBase.logger. - - - - - - - - - - -## Methods - -### Cleanup - -Cleanup is a no-op by default. - -#### Signature - -```go -func (*BaseSkill) Cleanup() -``` - -#### Source - -[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) - -Line 111. - -*** - -### Description - -Description returns the skill description. - -#### Signature - -```go -func (*BaseSkill) Description() string -``` - -#### Returns - -`string` - -#### Source - -[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) - -Line 70. - -*** - -### GetGlobalData - -GetGlobalData returns nil (no global data by default). - -#### Signature - -```go -func (*BaseSkill) GetGlobalData() map[string]any -``` - -#### Returns - -`map[string]any` - -#### Source - -[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) - -Line 90. - -*** - -### GetHints - -GetHints returns nil (no hints by default). - -#### Signature - -```go -func (*BaseSkill) GetHints() []string -``` - -#### Returns - -`[]string` - -#### Source - -[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) - -Line 87. - -*** - -### GetInstanceKey - -GetInstanceKey returns a unique key for tracking this skill instance. When SupportsMultipleInstances() returns true, the key is composed of the skill name and the "tool\_name" parameter (defaulting to the skill name), matching Python's get\_instance\_key() behavior for multi-instance skills. When SupportsMultipleInstances() returns false, returns the skill name. - -#### Signature - -```go -func (*BaseSkill) GetInstanceKey() string -``` - -#### Returns - -`string` - -#### Source - -[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) - -Line 118. - -*** - -### GetParam - -GetParam retrieves a parameter value from the skill's Params map. Returns the value and true if found, or nil and false otherwise. - -#### Signature - -```go -func (*BaseSkill) GetParam(key string) (any, bool) -``` - -#### Parameters - - - -#### Returns - -`(any, bool)` - -#### Source - -[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) - -Line 195. - -*** - -### GetParamBool - -GetParamBool retrieves a boolean parameter, returning the default if not found. - -#### Signature - -```go -func (*BaseSkill) GetParamBool(key string, defaultVal bool) bool -``` - -#### Parameters - - - - - -#### Returns - -`bool` - -#### Source - -[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) - -Line 262. - -*** - -### GetParameterSchema - -GetParameterSchema returns the common parameters available to all skills. The "tool\_name" parameter is only included when SupportsMultipleInstances() returns true, matching Python's conditional inclusion in get\_parameter\_schema(). - -#### Signature - -```go -func (*BaseSkill) GetParameterSchema() map[string]map[string]any -``` - -#### Returns - -`map[string]map[string]any` - -#### Source - -[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) - -Line 129. - -*** - -### GetParamFloat - -GetParamFloat retrieves a float parameter, returning the default if not found. - -#### Signature - -```go -func (*BaseSkill) GetParamFloat(key string, defaultVal float64) float64 -``` - -#### Parameters - - - - - -#### Returns - -`float64` - -#### Source - -[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) - -Line 241. - -*** - -### GetParamInt - -GetParamInt retrieves an integer parameter, returning the default if not found. - -#### Signature - -```go -func (*BaseSkill) GetParamInt(key string, defaultVal int) int -``` - -#### Parameters - - - - - -#### Returns - -`int` - -#### Source - -[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) - -Line 220. - -*** - -### GetParamString - -GetParamString retrieves a string parameter, returning the default if not found. - -#### Signature - -```go -func (*BaseSkill) GetParamString(key string, defaultVal string) string -``` - -#### Parameters - - - - - -#### Returns - -`string` - -#### Source - -[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) - -Line 204. - -*** - -### GetPromptSections - -GetPromptSections returns nil (no prompt sections by default). When skip\_prompt is set to true in Params, returns nil even for concrete overrides — concrete overrides that inject prompt sections MUST call ShouldSkipPrompt() and return nil (or an empty slice) when it is true. - -#### Signature - -```go -func (*BaseSkill) GetPromptSections() []map[string]any -``` - -#### Returns - -`[]map[string]any` - -#### Source - -[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) - -Line 103. - -*** - -### GetSkillData - -GetSkillData reads this skill instance's namespaced state from rawData. rawData is the raw\_data map passed to SWAIG function handlers, expected to contain a "global\_data" key. Returns an empty map when not found. Mirrors Python's get\_skill\_data(raw\_data). - -#### Signature - -```go -func (*BaseSkill) GetSkillData(rawData map[string]any) map[string]any -``` - -#### Parameters - - - -#### Returns - -`map[string]any` - -#### Source - -[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) - -Line 172. - -*** - -### GetSkillNamespace - -GetSkillNamespace returns the namespaced key used to store this skill instance's state in agent global\_data. Uses the "prefix" parameter if set, otherwise falls back to the instance key. Mirrors Python's \_get\_skill\_namespace(). - -Example: a skill named "datasphere" with no prefix returns "skill:datasphere". With prefix "kb" it returns "skill:kb". - -#### Signature - -```go -func (*BaseSkill) GetSkillNamespace() string -``` - -#### Returns - -`string` - -#### Source - -[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) - -Line 161. - -*** - -### Name - -Name returns the skill name. - -#### Signature - -```go -func (*BaseSkill) Name() string -``` - -#### Returns - -`string` - -#### Source - -[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) - -Line 67. - -*** - -### RequiredEnvVars - -RequiredEnvVars returns nil (no required env vars by default). - -#### Signature - -```go -func (*BaseSkill) RequiredEnvVars() []string -``` - -#### Returns - -`[]string` - -#### Source - -[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) - -Line 81. - -*** - -### ShouldSkipPrompt - -ShouldSkipPrompt returns true if the "skip\_prompt" parameter is set to true. Concrete skill overrides of GetPromptSections should call this helper before returning prompt content, mirroring Python's get\_prompt\_sections() guard. - -#### Signature - -```go -func (*BaseSkill) ShouldSkipPrompt() bool -``` - -#### Returns - -`bool` - -#### Source - -[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) - -Line 95. - -*** - -### SupportsMultipleInstances - -SupportsMultipleInstances returns false by default. - -#### Signature - -```go -func (*BaseSkill) SupportsMultipleInstances() bool -``` - -#### Returns - -`bool` - -#### Source - -[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) - -Line 84. - -*** - -### UpdateSkillData - -UpdateSkillData writes this skill instance's namespaced state into result's global\_data via result.UpdateGlobalData(). Returns result for method chaining. Mirrors Python's update\_skill\_data(result, data). - -#### Signature - -```go -func (*BaseSkill) UpdateSkillData(result *swaig.FunctionResult, data map[string]any) *swaig.FunctionResult -``` - -#### Parameters - - - - - -#### Returns - -`*swaig.FunctionResult` - -#### Source - -[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) - -Line 187. - -*** - -### Version - -Version returns the skill version, defaulting to "1.0.0". - -#### Signature - -```go -func (*BaseSkill) Version() string -``` - -#### Returns - -`string` - -#### Source - -[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) - -Line 73. - -## Source - -[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) - -Line 55. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/skills/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/skills/index.mdx deleted file mode 100644 index f06c170902..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/skills/index.mdx +++ /dev/null @@ -1,591 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/skills/skills" -title: "skills" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "module" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/skills" - module: "github.com.signalwire.signalwire-go.pkg.skills" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/manager.go" ---- -# `skills` - -Package skills provides the skills system for SignalWire AI agents. Skills are modular capabilities that can be loaded into agents to provide tools, prompt sections, speech hints, and global data. - -## Signature - -```go -package skills -``` - -## Constants - - - Built-in skill names. These are the canonical keys the builtin packages register via RegisterSkill(); the constant values must stay in lockstep with those registrations (see pkg/skills/builtin/\*.go). - - - - Built-in skill names. These are the canonical keys the builtin packages register via RegisterSkill(); the constant values must stay in lockstep with those registrations (see pkg/skills/builtin/\*.go). - - - - Built-in skill names. These are the canonical keys the builtin packages register via RegisterSkill(); the constant values must stay in lockstep with those registrations (see pkg/skills/builtin/\*.go). - - - - Built-in skill names. These are the canonical keys the builtin packages register via RegisterSkill(); the constant values must stay in lockstep with those registrations (see pkg/skills/builtin/\*.go). - - - - Built-in skill names. These are the canonical keys the builtin packages register via RegisterSkill(); the constant values must stay in lockstep with those registrations (see pkg/skills/builtin/\*.go). - - - - Built-in skill names. These are the canonical keys the builtin packages register via RegisterSkill(); the constant values must stay in lockstep with those registrations (see pkg/skills/builtin/\*.go). - - - - Built-in skill names. These are the canonical keys the builtin packages register via RegisterSkill(); the constant values must stay in lockstep with those registrations (see pkg/skills/builtin/\*.go). - - - - Built-in skill names. These are the canonical keys the builtin packages register via RegisterSkill(); the constant values must stay in lockstep with those registrations (see pkg/skills/builtin/\*.go). - - - - Built-in skill names. These are the canonical keys the builtin packages register via RegisterSkill(); the constant values must stay in lockstep with those registrations (see pkg/skills/builtin/\*.go). - - - - Built-in skill names. These are the canonical keys the builtin packages register via RegisterSkill(); the constant values must stay in lockstep with those registrations (see pkg/skills/builtin/\*.go). - - - - Built-in skill names. These are the canonical keys the builtin packages register via RegisterSkill(); the constant values must stay in lockstep with those registrations (see pkg/skills/builtin/\*.go). - - - - Built-in skill names. These are the canonical keys the builtin packages register via RegisterSkill(); the constant values must stay in lockstep with those registrations (see pkg/skills/builtin/\*.go). - - - - Built-in skill names. These are the canonical keys the builtin packages register via RegisterSkill(); the constant values must stay in lockstep with those registrations (see pkg/skills/builtin/\*.go). - - - - Built-in skill names. These are the canonical keys the builtin packages register via RegisterSkill(); the constant values must stay in lockstep with those registrations (see pkg/skills/builtin/\*.go). - - - - Built-in skill names. These are the canonical keys the builtin packages register via RegisterSkill(); the constant values must stay in lockstep with those registrations (see pkg/skills/builtin/\*.go). - - - - Built-in skill names. These are the canonical keys the builtin packages register via RegisterSkill(); the constant values must stay in lockstep with those registrations (see pkg/skills/builtin/\*.go). - - - - Built-in skill names. These are the canonical keys the builtin packages register via RegisterSkill(); the constant values must stay in lockstep with those registrations (see pkg/skills/builtin/\*.go). - - - - Built-in skill names. These are the canonical keys the builtin packages register via RegisterSkill(); the constant values must stay in lockstep with those registrations (see pkg/skills/builtin/\*.go). - - -## Classes - - - - BaseSkill provides default implementations for the SkillBase interface. Concrete skills should embed this struct and override methods as needed. - - - - SkillManager manages the lifecycle of loaded skill instances. - - - - SkillRegistry is the per-instance Python-parity surface mirroring `signalwire.skills.registry.SkillRegistry`. Each instance owns its own list of external skill directories, validated and de-duplicated on insert. The package-level `RegisterSkill` / `GetSkillFactory` / `ListSkills` functions remain the canonical Go API for static compile-time skill registration; `SkillRegistry` exists so the `add_skill_directory` parity case has a real owning object the audit and downstream callers can hold. - - - - ToolRegistration describes a tool that a skill wants to register with the agent. - - - -## Functions - -### AddSkillDirectory - -AddSkillDirectory is a package-level shim that delegates to the shared `globalRegistry.AddSkillDirectory`. It mirrors Python's `signalwire.add_skill_directory` (which delegates to the module singleton `signalwire.skills.registry.skill_registry`). - -The path is validated (must exist and be a directory) and added (de-duplicated) to the global registry's external-paths list. Note that Go compiles to a static binary; dynamic on-disk skill loading is not implemented here, but the path-tracking surface is — so tools that introspect "what external directories has this agent registered?" get the same answer they'd get on the Python side. - -#### Signature - -```go -func AddSkillDirectory(path string) error -``` - -#### Parameters - - - -#### Returns - -`error` - -#### Source - -[`pkg/skills/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/registry.go) - -Line 135. - -*** - -### GetSkillFactory - -GetSkillFactory returns the factory function for a registered skill name. Returns nil if the skill is not registered. - -#### Signature - -```go -func GetSkillFactory(name string) func(params map[string]any) SkillBase -``` - -#### Parameters - - - -#### Returns - -`func(params map[string]any) SkillBase` - -#### Source - -[`pkg/skills/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/registry.go) - -Line 91. - -*** - -### ListSkills - -ListSkills returns sorted names of all registered skills. - -#### Signature - -```go -func ListSkills() []string -``` - -#### Returns - -`[]string` - -#### Source - -[`pkg/skills/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/registry.go) - -Line 98. - -*** - -### ListSkillsWithParams - -ListSkillsWithParams returns the complete parameter schema for all registered skills. It instantiates each skill with nil params to obtain its GetParameterSchema output. This mirrors Python's skill\_registry.get\_all\_skills\_schema(). The returned map has skill names as keys and their parameter schemas as values. - -#### Signature - -```go -func ListSkillsWithParams() map[string]map[string]map[string]any -``` - -#### Returns - -`map[string]map[string]map[string]any` - -#### Source - -[`pkg/skills/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/registry.go) - -Line 113. - -*** - -### NewSkillManager - -NewSkillManager creates a new SkillManager. - -#### Signature - -```go -func NewSkillManager() *SkillManager -``` - -#### Returns - -`*SkillManager` - -#### Source - -[`pkg/skills/manager.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/manager.go) - -Line 16. - -*** - -### NewSkillRegistry - -NewSkillRegistry constructs a new SkillRegistry. The Python reference uses a singleton-per-module (`skill_registry`); Go callers can either construct their own via NewSkillRegistry() or use the global `globalRegistry` accessed through the package-level helpers. - -#### Signature - -```go -func NewSkillRegistry() *SkillRegistry -``` - -#### Returns - -`*SkillRegistry` - -#### Source - -[`pkg/skills/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/registry.go) - -Line 34. - -*** - -### RegisterSkill - -RegisterSkill registers a skill factory function by name. This is typically called from init() functions in builtin skill packages. - -#### Signature - -```go -func RegisterSkill(name string, factory func(params map[string]any) SkillBase) -``` - -#### Parameters - - - - - -#### Source - -[`pkg/skills/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/registry.go) - -Line 83. - -## Interfaces - -### SkillBase - -SkillBase defines the interface that all skills must implement. - -#### Signature - -```go -type SkillBase interface { Name; Description; Version; RequiredEnvVars; SupportsMultipleInstances; Setup; RegisterTools; GetHints; GetGlobalData; GetPromptSections; Cleanup; GetInstanceKey; GetParameterSchema } -``` - -#### Methods - -##### Cleanup - -Cleanup releases resources when the skill is unloaded. - -###### Signature - -```go -Cleanup() -``` - -###### Source - -[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) - -Line 35. - -*** - -##### Description - -Description returns a human-readable description of the skill. - -###### Signature - -```go -Description() string -``` - -###### Source - -[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) - -Line 16. - -*** - -##### GetGlobalData - -GetGlobalData returns data to add to the agent's global context. - -###### Signature - -```go -GetGlobalData() map[string]any -``` - -###### Source - -[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) - -Line 31. - -*** - -##### GetHints - -GetHints returns speech recognition hints for this skill. - -###### Signature - -```go -GetHints() []string -``` - -###### Source - -[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) - -Line 29. - -*** - -##### GetInstanceKey - -GetInstanceKey returns a unique key for tracking this skill instance. - -###### Signature - -```go -GetInstanceKey() string -``` - -###### Source - -[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) - -Line 37. - -*** - -##### GetParameterSchema - -GetParameterSchema returns metadata about all parameters the skill accepts. - -###### Signature - -```go -GetParameterSchema() map[string]map[string]any -``` - -###### Source - -[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) - -Line 39. - -*** - -##### GetPromptSections - -GetPromptSections returns prompt sections to inject into the agent. - -###### Signature - -```go -GetPromptSections() []map[string]any -``` - -###### Source - -[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) - -Line 33. - -*** - -##### Name - -Name returns the unique skill identifier. - -###### Signature - -```go -Name() string -``` - -###### Source - -[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) - -Line 14. - -*** - -##### RegisterTools - -RegisterTools returns tool registrations for this skill. - -###### Signature - -```go -RegisterTools() []ToolRegistration -``` - -###### Source - -[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) - -Line 27. - -*** - -##### RequiredEnvVars - -RequiredEnvVars returns environment variable names that must be set. - -###### Signature - -```go -RequiredEnvVars() []string -``` - -###### Source - -[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) - -Line 20. - -*** - -##### Setup - -Setup validates configuration and initializes the skill. - -Returns true if setup was successful. - -###### Signature - -```go -Setup() bool -``` - -###### Source - -[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) - -Line 25. - -*** - -##### SupportsMultipleInstances - -SupportsMultipleInstances returns whether multiple instances are allowed. - -###### Signature - -```go -SupportsMultipleInstances() bool -``` - -###### Source - -[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) - -Line 22. - -*** - -##### Version - -Version returns the semantic version of the skill. - -###### Signature - -```go -Version() string -``` - -###### Source - -[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) - -Line 18. - -#### Source - -[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) - -Line 12. - -## Enums - -### SkillName - -SkillName is the closed set of built-in skill names as a defined string type with typed constants. It mirrors the PHP `SkillName` backed enum and gives Go callers editor autocompletion plus call-site typo checking: a bare string like "datetiem" only fails at runtime (on the server), whereas a mistyped constant fails to compile. - -AgentBase.AddSkill / RemoveSkill / HasSkill take SkillName. Because Go auto-converts untyped string-constant literals to a defined string type, every call site keeps working three ways: - -``` -agent.AddSkill(skills.SkillDatetime, nil) // typed const — autocompleted -agent.AddSkill("datetime", nil) // bare string literal still compiles -agent.AddSkill(skills.SkillName("custom"), // open set: custom / 3rd-party skills - map[string]any{...}) -``` - -SkillName is a string subtype, so its wire/JSON value is identical to the reference's bare `str` parameter — parity with the Python reference (which uses `str`) and with custom skills that aren't built in. - -#### Signature - -```go -type SkillName alias -``` - -#### Examples - - - - ```go - agent.AddSkill(skills.SkillDatetime, nil) // typed const — autocompleted - agent.AddSkill("datetime", nil) // bare string literal still compiles - agent.AddSkill(skills.SkillName("custom"), // open set: custom / 3rd-party skills - map[string]any{...}) - ``` - - - - ```go - agent.AddSkill(skills.SkillDatetime, nil) // typed const — autocompleted - agent.AddSkill("datetime", nil) // bare string literal still compiles - agent.AddSkill(skills.SkillName("custom"), // open set: custom / 3rd-party skills - map[string]any{...}) - ``` - - - -#### Source - -[`pkg/skills/skill_name.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_name.go) - -Line 21. - -## Source - -[`pkg/skills/manager.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/manager.go) diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/skills/skill-manager/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/skills/skill-manager/index.mdx deleted file mode 100644 index dd283bc98b..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/skills/skill-manager/index.mdx +++ /dev/null @@ -1,160 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/skills/skills/skill-manager" -title: "SkillManager" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/skills.SkillManager" - parent: "github.com/signalwire/signalwire-go/pkg/skills" - module: "github.com.signalwire.signalwire-go.pkg.skills" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/manager.go" ---- -# `SkillManager` - -SkillManager manages the lifecycle of loaded skill instances. - -## Signature - -```go -type SkillManager struct -``` - -## Methods - -### GetSkill - -GetSkill returns the skill with the given instance key, or nil if not found. - -#### Signature - -```go -func (*SkillManager) GetSkill(key string) SkillBase -``` - -#### Parameters - - - -#### Returns - -`SkillBase` - -#### Source - -[`pkg/skills/manager.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/manager.go) - -Line 98. - -*** - -### HasSkill - -HasSkill returns true if a skill with the given instance key is loaded. - -#### Signature - -```go -func (*SkillManager) HasSkill(key string) bool -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`pkg/skills/manager.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/manager.go) - -Line 90. - -*** - -### ListLoadedSkills - -ListLoadedSkills returns the instance keys of all loaded skills. - -#### Signature - -```go -func (*SkillManager) ListLoadedSkills() []string -``` - -#### Returns - -`[]string` - -#### Source - -[`pkg/skills/manager.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/manager.go) - -Line 78. - -*** - -### LoadSkill - -LoadSkill validates environment variables, calls Setup, and registers the skill. Returns (success bool, errorMessage string). - -When a skill with the same instance key is already loaded, the behavior depends on SupportsMultipleInstances(): - -- false (default): returns (false, error) — duplicate is an error. -- true: returns (true, "") — duplicate instance is silently accepted, matching Python's SkillManager.load\_skill() warning-and-continue behavior. - -#### Signature - -```go -func (*SkillManager) LoadSkill(skill SkillBase) (bool, string) -``` - -#### Parameters - - - -#### Returns - -`(bool, string)` - -#### Source - -[`pkg/skills/manager.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/manager.go) - -Line 30. - -*** - -### UnloadSkill - -UnloadSkill removes a skill by its instance key. Returns true if found and removed. - -#### Signature - -```go -func (*SkillManager) UnloadSkill(key string) bool -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`pkg/skills/manager.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/manager.go) - -Line 63. - -## Source - -[`pkg/skills/manager.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/manager.go) - -Line 10. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/skills/skill-registry/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/skills/skill-registry/index.mdx deleted file mode 100644 index d2014e7349..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/skills/skill-registry/index.mdx +++ /dev/null @@ -1,77 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/skills/skills/skill-registry" -title: "SkillRegistry" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/skills.SkillRegistry" - parent: "github.com/signalwire/signalwire-go/pkg/skills" - module: "github.com.signalwire.signalwire-go.pkg.skills" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/registry.go" ---- -# `SkillRegistry` - -SkillRegistry is the per-instance Python-parity surface mirroring `signalwire.skills.registry.SkillRegistry`. Each instance owns its own list of external skill directories, validated and de-duplicated on insert. The package-level `RegisterSkill` / `GetSkillFactory` / `ListSkills` functions remain the canonical Go API for static compile-time skill registration; `SkillRegistry` exists so the `add_skill_directory` parity case has a real owning object the audit and downstream callers can hold. - -## Signature - -```go -type SkillRegistry struct -``` - -## Methods - -### AddSkillDirectory - -AddSkillDirectory adds a directory to search for skills. Mirrors Python's `SkillRegistry.add_skill_directory`: validates that the path exists and is a directory, then appends it (de-duplicated) to the registry's external paths list. Returns an error (the Go analog of Python's `ValueError`) for non-existent paths or non-directories. - -#### Signature - -```go -func (*SkillRegistry) AddSkillDirectory(path string) error -``` - -#### Parameters - - - -#### Returns - -`error` - -#### Source - -[`pkg/skills/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/registry.go) - -Line 49. - -*** - -### ExternalPaths - -ExternalPaths returns a copy of the registered external skill directories. Parity surface for Python's `_external_paths`. - -#### Signature - -```go -func (*SkillRegistry) ExternalPaths() []string -``` - -#### Returns - -`[]string` - -#### Source - -[`pkg/skills/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/registry.go) - -Line 73. - -## Source - -[`pkg/skills/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/registry.go) - -Line 25. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/skills/tool-registration/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/skills/tool-registration/index.mdx deleted file mode 100644 index c945235c57..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/skills/skills/tool-registration/index.mdx +++ /dev/null @@ -1,45 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/skills/skills/tool-registration" -title: "ToolRegistration" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/skills.ToolRegistration" - parent: "github.com/signalwire/signalwire-go/pkg/skills" - module: "github.com.signalwire.signalwire-go.pkg.skills" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go" ---- -# `ToolRegistration` - -ToolRegistration describes a tool that a skill wants to register with the agent. - -## Signature - -```go -type ToolRegistration struct -``` - -## Properties - - - - - - - - - - - - - - - -## Source - -[`pkg/skills/skill_base.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/skills/skill_base.go) - -Line 43. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig/function-result/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig/function-result/index.mdx deleted file mode 100644 index 6e5fef2b7c..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig/function-result/index.mdx +++ /dev/null @@ -1,1451 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig/function-result" -title: "FunctionResult" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/swaig.FunctionResult" - parent: "github.com/signalwire/signalwire-go/pkg/swaig" - module: "github.com.signalwire.signalwire-go.pkg.swaig" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go" ---- -# `FunctionResult` - -FunctionResult represents the response from a SWAIG tool handler. It contains a text response, optional actions, and post-processing control. All mutating methods return \*FunctionResult for method chaining. - -## Signature - -```go -type FunctionResult struct -``` - -## Methods - -### Actions - -Actions returns the list of actions added to this result. - -#### Signature - -```go -func (*FunctionResult) Actions() []map[string]any -``` - -#### Returns - -`[]map[string]any` - -#### Source - -[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) - -Line 40. - -*** - -### AddAction - -AddAction appends a single named action to the result. - -#### Signature - -```go -func (*FunctionResult) AddAction(name string, data any) *FunctionResult -``` - -#### Parameters - - - - - -#### Returns - -`*FunctionResult` - -#### Source - -[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) - -Line 64. - -*** - -### AddActions - -AddActions appends multiple actions to the result. - -#### Signature - -```go -func (*FunctionResult) AddActions(actions []map[string]any) *FunctionResult -``` - -#### Parameters - - - -#### Returns - -`*FunctionResult` - -#### Source - -[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) - -Line 70. - -*** - -### AddDynamicHints - -AddDynamicHints adds dynamic speech recognition hints during a call. - -#### Signature - -```go -func (*FunctionResult) AddDynamicHints(hints []any) *FunctionResult -``` - -#### Parameters - - - -#### Returns - -`*FunctionResult` - -#### Source - -[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) - -Line 429. - -*** - -### ClearDynamicHints - -ClearDynamicHints removes all dynamic speech recognition hints. - -#### Signature - -```go -func (*FunctionResult) ClearDynamicHints() *FunctionResult -``` - -#### Returns - -`*FunctionResult` - -#### Source - -[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) - -Line 434. - -*** - -### Connect - -Connect adds a connect action to transfer/connect the call to another destination. If final is true, the call permanently transfers (exits the agent). If final is false, the call returns to the agent when the far end hangs up. The from parameter sets the caller ID; pass empty string to use the call's default. - -#### Signature - -```go -func (*FunctionResult) Connect(destination string, final bool, from string) *FunctionResult -``` - -#### Parameters - - - - - - - -#### Returns - -`*FunctionResult` - -#### Source - -[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) - -Line 104. - -*** - -### EnableExtensiveData - -EnableExtensiveData sends full data to LLM for this turn only. - -#### Signature - -```go -func (*FunctionResult) EnableExtensiveData(enabled bool) *FunctionResult -``` - -#### Parameters - - - -#### Returns - -`*FunctionResult` - -#### Source - -[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) - -Line 461. - -*** - -### EnableFunctionsOnTimeout - -EnableFunctionsOnTimeout enables or disables function calls on speaker timeout. - -#### Signature - -```go -func (*FunctionResult) EnableFunctionsOnTimeout(enabled bool) *FunctionResult -``` - -#### Parameters - - - -#### Returns - -`*FunctionResult` - -#### Source - -[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) - -Line 456. - -*** - -### ExecuteRpc - -ExecuteRpc executes an RPC method on a call. Pass empty strings for callID and nodeID to omit them from the payload. - -#### Signature - -```go -func (*FunctionResult) ExecuteRpc(method string, params map[string]any, callID string, nodeID string) *FunctionResult -``` - -#### Parameters - - - - - - - - - -#### Returns - -`*FunctionResult` - -#### Source - -[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) - -Line 943. - -*** - -### ExecuteSwml - -ExecuteSwml executes SWML content. If transfer is true, the call exits the agent after execution. swmlContent can be a map\[string]any or a string (raw SWML JSON). - -#### Signature - -```go -func (*FunctionResult) ExecuteSwml(swmlContent any, transfer bool) *FunctionResult -``` - -#### Parameters - - - - - -#### Returns - -`*FunctionResult` - -#### Source - -[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) - -Line 474. - -*** - -### Hangup - -Hangup terminates the call. - -#### Signature - -```go -func (*FunctionResult) Hangup() *FunctionResult -``` - -#### Returns - -`*FunctionResult` - -#### Source - -[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) - -Line 146. - -*** - -### Hold - -Hold puts the call on hold with the given timeout in seconds. Timeout is clamped to the range \[0, 900]. - -#### Signature - -```go -func (*FunctionResult) Hold(timeout int) *FunctionResult -``` - -#### Parameters - - - -#### Returns - -`*FunctionResult` - -#### Source - -[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) - -Line 152. - -*** - -### JoinConference - -JoinConference joins an ad-hoc audio conference. Pass nil for opts to use default behavior (muted=false, beep="true", no holdAudio). - -#### Signature - -```go -func (*FunctionResult) JoinConference(name string, opts *JoinConferenceOptions) *FunctionResult -``` - -#### Parameters - - - - - -#### Returns - -`*FunctionResult` - -#### Source - -[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) - -Line 547. - -*** - -### JoinRoom - -JoinRoom joins a RELAY room for multi-party communication. - -#### Signature - -```go -func (*FunctionResult) JoinRoom(name string) *FunctionResult -``` - -#### Parameters - - - -#### Returns - -`*FunctionResult` - -#### Source - -[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) - -Line 653. - -*** - -### Pay - -Pay processes a payment using SWML pay action. connectorURL is the only required parameter. opts may be nil to use Python SDK defaults for all optional parameters. - -#### Signature - -```go -func (*FunctionResult) Pay(connectorURL string, opts *PayOptions) *FunctionResult -``` - -#### Parameters - - - - - -#### Returns - -`*FunctionResult` - -#### Source - -[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) - -Line 817. - -*** - -### PlayBackgroundFile - -PlayBackgroundFile plays an audio or video file in the background. If wait is true, attention-getting behavior is suppressed during playback. - -#### Signature - -```go -func (*FunctionResult) PlayBackgroundFile(filename string, wait bool) *FunctionResult -``` - -#### Parameters - - - - - -#### Returns - -`*FunctionResult` - -#### Source - -[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) - -Line 301. - -*** - -### PostProcess - -PostProcess returns whether post-processing is enabled. - -#### Signature - -```go -func (*FunctionResult) PostProcess() bool -``` - -#### Returns - -`bool` - -#### Source - -[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) - -Line 45. - -*** - -### RecordCall - -RecordCall starts background call recording using SWML. controlID, stereo, format, and direction are the primary parameters. Use opts to specify additional optional parameters (pass nil to use defaults). - -format is the defined string type RecordFormat: the Format\* constants give autocomplete + a compile-time typo check, while Go's untyped-constant auto-conversion keeps a bare "wav" literal compiling — parity with the Python reference's str format. It is written to the wire as a plain string. - -direction is the defined string type RecordDirection (\{speak, listen, both\} — the RecordDirection\* constants); like format it autocompletes + typo-checks at compile time while a bare "both" literal still compiles, and is written to the wire as a plain string. Note this set differs from TapDirection (\{speak, hear, both\}) — record\_call uses "listen", tap uses "hear". - -#### Signature - -```go -func (*FunctionResult) RecordCall( - controlID string, - stereo bool, - format RecordFormat, - direction RecordDirection, - opts *RecordCallOptions -) *FunctionResult -``` - -#### Parameters - - - - - - - - - - - -#### Returns - -`*FunctionResult` - -#### Source - -[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) - -Line 356. - -*** - -### RemoveGlobalData - -RemoveGlobalData removes global agent data variables by key slice. - -#### Signature - -```go -func (*FunctionResult) RemoveGlobalData(keys []string) *FunctionResult -``` - -#### Parameters - - - -#### Returns - -`*FunctionResult` - -#### Source - -[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) - -Line 191. - -*** - -### RemoveGlobalDataKey - -RemoveGlobalDataKey removes a single global agent data variable by key. This matches the Python SDK's Union\[str, List\[str]] behavior for a bare string argument, which emits the key as a string (not a one-element array) in the action payload. - -#### Signature - -```go -func (*FunctionResult) RemoveGlobalDataKey(key string) *FunctionResult -``` - -#### Parameters - - - -#### Returns - -`*FunctionResult` - -#### Source - -[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) - -Line 198. - -*** - -### RemoveMetadata - -RemoveMetadata removes metadata keys from the current function's scope. - -#### Signature - -```go -func (*FunctionResult) RemoveMetadata(keys []string) *FunctionResult -``` - -#### Parameters - - - -#### Returns - -`*FunctionResult` - -#### Source - -[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) - -Line 208. - -*** - -### RemoveMetadataKey - -RemoveMetadataKey removes a single metadata key from the current function's scope. This matches the Python SDK's Union\[str, List\[str]] behavior for a bare string argument, which emits the key as a string (not a one-element array) in the action payload. - -#### Signature - -```go -func (*FunctionResult) RemoveMetadataKey(key string) *FunctionResult -``` - -#### Parameters - - - -#### Returns - -`*FunctionResult` - -#### Source - -[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) - -Line 215. - -*** - -### ReplaceInHistory - -ReplaceInHistory replaces the tool call and result pair in conversation history. If text is a string, the tool call is replaced with an assistant message containing that text. If text is a bool and true, the pair is removed from history entirely. - -#### Signature - -```go -func (*FunctionResult) ReplaceInHistory(text any) *FunctionResult -``` - -#### Parameters - - - -#### Returns - -`*FunctionResult` - -#### Source - -[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) - -Line 280. - -*** - -### Response - -Response returns the natural language response text. - -#### Signature - -```go -func (*FunctionResult) Response() string -``` - -#### Returns - -`string` - -#### Source - -[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) - -Line 35. - -*** - -### RpcAiMessage - -RpcAiMessage injects a message into an AI agent on another call. role defaults to "system" when empty, matching the Python SDK default. This matches the Python SDK's rpc\_ai\_message() which calls execute\_rpc(method="ai\_message", ...). - -#### Signature - -```go -func (*FunctionResult) RpcAiMessage(callID string, messageText string, role string) *FunctionResult -``` - -#### Parameters - - - - - - - -#### Returns - -`*FunctionResult` - -#### Source - -[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) - -Line 995. - -*** - -### RpcAiUnhold - -RpcAiUnhold unholds another call. This matches the Python SDK's rpc\_ai\_unhold() which calls execute\_rpc(method="ai\_unhold", ...). - -#### Signature - -```go -func (*FunctionResult) RpcAiUnhold(callID string) *FunctionResult -``` - -#### Parameters - - - -#### Returns - -`*FunctionResult` - -#### Source - -[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) - -Line 1007. - -*** - -### RpcDial - -RpcDial dials out to a number with a destination SWML URL using execute\_rpc. deviceType defaults to "phone" when empty. This matches the Python SDK's rpc\_dial() which calls execute\_rpc(method="dial", ...). - -#### Signature - -```go -func (*FunctionResult) RpcDial(toNumber string, fromNumber string, destSwml string, deviceType string) *FunctionResult -``` - -#### Parameters - - - - - - - - - -#### Returns - -`*FunctionResult` - -#### Source - -[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) - -Line 974. - -*** - -### Say - -Say makes the agent speak specific text. - -#### Signature - -```go -func (*FunctionResult) Say(text string) *FunctionResult -``` - -#### Parameters - - - -#### Returns - -`*FunctionResult` - -#### Source - -[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) - -Line 295. - -*** - -### SendSms - -SendSms sends a text message to a PSTN phone number. Pass empty string for body if only sending media, nil for optional slices, and empty string for region to omit it. - -#### Signature - -```go -func (*FunctionResult) SendSms( - toNumber string, - fromNumber string, - body string, - media []string, - tags []string, - region string -) *FunctionResult -``` - -#### Parameters - - - - - - - - - - - - - -#### Returns - -`*FunctionResult` - -#### Source - -[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) - -Line 739. - -*** - -### SetEndOfSpeechTimeout - -SetEndOfSpeechTimeout adjusts the end-of-speech timeout in milliseconds. - -#### Signature - -```go -func (*FunctionResult) SetEndOfSpeechTimeout(ms int) *FunctionResult -``` - -#### Parameters - - - -#### Returns - -`*FunctionResult` - -#### Source - -[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) - -Line 440. - -*** - -### SetMetadata - -SetMetadata sets metadata scoped to the current function's meta\_data\_token. - -#### Signature - -```go -func (*FunctionResult) SetMetadata(data map[string]any) *FunctionResult -``` - -#### Parameters - - - -#### Returns - -`*FunctionResult` - -#### Source - -[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) - -Line 203. - -*** - -### SetPostProcess - -SetPostProcess controls whether the AI takes another turn before executing actions. - -#### Signature - -```go -func (*FunctionResult) SetPostProcess(postProcess bool) *FunctionResult -``` - -#### Parameters - - - -#### Returns - -`*FunctionResult` - -#### Source - -[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) - -Line 58. - -*** - -### SetResponse - -SetResponse sets the natural language response text. - -#### Signature - -```go -func (*FunctionResult) SetResponse(response string) *FunctionResult -``` - -#### Parameters - - - -#### Returns - -`*FunctionResult` - -#### Source - -[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) - -Line 52. - -*** - -### SetSpeechEventTimeout - -SetSpeechEventTimeout adjusts the speech event timeout in milliseconds. - -#### Signature - -```go -func (*FunctionResult) SetSpeechEventTimeout(ms int) *FunctionResult -``` - -#### Parameters - - - -#### Returns - -`*FunctionResult` - -#### Source - -[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) - -Line 445. - -*** - -### SimulateUserInput - -SimulateUserInput queues simulated user input text. Emits action key "user\_input" matching the Python SDK's add\_action("user\_input", text). - -#### Signature - -```go -func (*FunctionResult) SimulateUserInput(text string) *FunctionResult -``` - -#### Parameters - - - -#### Returns - -`*FunctionResult` - -#### Source - -[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) - -Line 1013. - -*** - -### SipRefer - -SipRefer sends a SIP REFER for call transfer in SIP environments. - -#### Signature - -```go -func (*FunctionResult) SipRefer(toURI string) *FunctionResult -``` - -#### Parameters - - - -#### Returns - -`*FunctionResult` - -#### Source - -[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) - -Line 666. - -*** - -### Stop - -Stop stops the agent execution. - -#### Signature - -```go -func (*FunctionResult) Stop() *FunctionResult -``` - -#### Returns - -`*FunctionResult` - -#### Source - -[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) - -Line 179. - -*** - -### StopBackgroundFile - -StopBackgroundFile stops the currently playing background file. - -#### Signature - -```go -func (*FunctionResult) StopBackgroundFile() *FunctionResult -``` - -#### Returns - -`*FunctionResult` - -#### Source - -[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) - -Line 309. - -*** - -### StopRecordCall - -StopRecordCall stops an active background call recording. - -#### Signature - -```go -func (*FunctionResult) StopRecordCall(controlID string) *FunctionResult -``` - -#### Parameters - - - -#### Returns - -`*FunctionResult` - -#### Source - -[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) - -Line 409. - -*** - -### StopTap - -StopTap stops an active tap stream. - -#### Signature - -```go -func (*FunctionResult) StopTap(controlID string) *FunctionResult -``` - -#### Parameters - - - -#### Returns - -`*FunctionResult` - -#### Source - -[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) - -Line 719. - -*** - -### String - -String returns a human-readable representation including the response and action count. - -#### Signature - -```go -func (*FunctionResult) String() string -``` - -#### Returns - -`string` - -#### Source - -[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) - -Line 1053. - -*** - -### SwitchContext - -SwitchContext changes the agent context/prompt during conversation. Only non-empty/true fields are included in the action. - -#### Signature - -```go -func (*FunctionResult) SwitchContext( - systemPrompt string, - userPrompt string, - consolidate bool, - fullReset bool, - isolated bool -) *FunctionResult -``` - -#### Parameters - - - - - - - - - - - -#### Returns - -`*FunctionResult` - -#### Source - -[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) - -Line 252. - -*** - -### SwmlChangeContext - -SwmlChangeContext transitions to a different conversation context. Emits action key "change\_context" with the context name as a plain string value, matching the Python SDK's add\_action("change\_context", context\_name). - -#### Signature - -```go -func (*FunctionResult) SwmlChangeContext(contextName string) *FunctionResult -``` - -#### Parameters - - - -#### Returns - -`*FunctionResult` - -#### Source - -[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) - -Line 246. - -*** - -### SwmlChangeStep - -SwmlChangeStep transitions to a different conversation step. Emits action key "change\_step" with the step name as a plain string value, matching the Python SDK's add\_action("change\_step", step\_name). - -#### Signature - -```go -func (*FunctionResult) SwmlChangeStep(stepName string) *FunctionResult -``` - -#### Parameters - - - -#### Returns - -`*FunctionResult` - -#### Source - -[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) - -Line 239. - -*** - -### SwmlTransfer - -SwmlTransfer adds a SWML transfer action with an AI response for when control returns. - -#### Signature - -```go -func (*FunctionResult) SwmlTransfer(dest string, aiResponse string, final bool) *FunctionResult -``` - -#### Parameters - - - - - - - -#### Returns - -`*FunctionResult` - -#### Source - -[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) - -Line 127. - -*** - -### SwmlUserEvent - -SwmlUserEvent sends a user event through SWML for real-time UI updates. - -#### Signature - -```go -func (*FunctionResult) SwmlUserEvent(eventData map[string]any) *FunctionResult -``` - -#### Parameters - - - -#### Returns - -`*FunctionResult` - -#### Source - -[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) - -Line 220. - -*** - -### Tap - -Tap starts background call tapping, streaming media to the given URI. rtpPtime sets the packetization time in milliseconds for RTP streams (0 = use default of 20ms). Pass empty string for statusURL to omit it. - -direction is the defined string type TapDirection (\{speak, hear, both\} — the TapDirection\* constants) and codec is the defined string type Codec (\{PCMU, PCMA\} — the Codec\* constants); both autocomplete + typo-check at compile time while bare "both"/"PCMU" literals still compile, and are written to the wire as plain strings. Note TapDirection (\{speak, hear, both\}) differs from RecordDirection (\{speak, listen, both\}), and this 2-value tap Codec is distinct from the larger RELAY connect/stream codec superset (left a bare string). - -#### Signature - -```go -func (*FunctionResult) Tap( - uri string, - controlID string, - direction TapDirection, - codec Codec, - rtpPtime int, - statusURL string -) *FunctionResult -``` - -#### Parameters - - - - - - - - - - - - - -#### Returns - -`*FunctionResult` - -#### Source - -[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) - -Line 689. - -*** - -### ToggleFunctions - -ToggleFunctions enables or disables specific SWAIG functions. Each toggle should have "function" and "active" keys. - -#### Signature - -```go -func (*FunctionResult) ToggleFunctions(toggles []map[string]any) *FunctionResult -``` - -#### Parameters - - - -#### Returns - -`*FunctionResult` - -#### Source - -[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) - -Line 451. - -*** - -### ToMap - -ToMap serializes the FunctionResult to a map suitable for JSON encoding. The "action" key is only included if there are actions. The "post\_process" key is only included if true. - -#### Signature - -```go -func (*FunctionResult) ToMap() map[string]any -``` - -#### Returns - -`map[string]any` - -#### Source - -[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) - -Line 78. - -*** - -### UpdateGlobalData - -UpdateGlobalData sets or updates global agent data variables. - -#### Signature - -```go -func (*FunctionResult) UpdateGlobalData(data map[string]any) *FunctionResult -``` - -#### Parameters - - - -#### Returns - -`*FunctionResult` - -#### Source - -[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) - -Line 186. - -*** - -### UpdateSettings - -UpdateSettings updates agent runtime settings such as temperature, top\_p, etc. - -#### Signature - -```go -func (*FunctionResult) UpdateSettings(settings map[string]any) *FunctionResult -``` - -#### Parameters - - - -#### Returns - -`*FunctionResult` - -#### Source - -[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) - -Line 466. - -*** - -### WaitForUser - -WaitForUser controls how the agent waits for user input. Pass nil for enabled/timeout to omit those fields. If answerFirst is true, the value is set to "answer\_first" regardless of other parameters. - -#### Signature - -```go -func (*FunctionResult) WaitForUser(enabled *bool, timeout *int, answerFirst bool) *FunctionResult -``` - -#### Parameters - - - - - - - -#### Returns - -`*FunctionResult` - -#### Source - -[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) - -Line 165. - -## Source - -[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) - -Line 18. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig/index.mdx deleted file mode 100644 index 900177267e..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig/index.mdx +++ /dev/null @@ -1,853 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig" -title: "swaig" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "module" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/swaig" - module: "github.com.signalwire.signalwire-go.pkg.swaig" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/codec.go" ---- -# `swaig` - -Package swaig provides SWAIG (SignalWire AI Gateway) function result handling for building AI agent tool responses with actions and call control. - -## Signature - -```go -package swaig -``` - -## Constants - - - Audio codecs for Tap. These are exactly the strings the SWML tap verb accepts for codec; the values are emitted verbatim into the tap params (matching the Python reference's valid\_codecs = \["PCMU", "PCMA"], default "PCMU"). - - - - Audio codecs for Tap. These are exactly the strings the SWML tap verb accepts for codec; the values are emitted verbatim into the tap params (matching the Python reference's valid\_codecs = \["PCMU", "PCMA"], default "PCMU"). - - - - Recording container formats. These are the canonical format tokens the SWML record verb accepts; the values are the exact strings emitted in the record params (matching the Python reference's record\_call format examples: mp3, wav, mp4). - - - - Recording container formats. These are the canonical format tokens the SWML record verb accepts; the values are the exact strings emitted in the record params (matching the Python reference's record\_call format examples: mp3, wav, mp4). - - - - Recording container formats. These are the canonical format tokens the SWML record verb accepts; the values are the exact strings emitted in the record params (matching the Python reference's record\_call format examples: mp3, wav, mp4). - - - - Audio directions for RecordCall. These are exactly the strings the SWML record\_call verb accepts for direction; the values are emitted verbatim into the record\_call params (matching the Python reference's valid\_directions = \["speak", "listen", "both"]). - - - - Audio directions for RecordCall. These are exactly the strings the SWML record\_call verb accepts for direction; the values are emitted verbatim into the record\_call params (matching the Python reference's valid\_directions = \["speak", "listen", "both"]). - - - - Audio directions for RecordCall. These are exactly the strings the SWML record\_call verb accepts for direction; the values are emitted verbatim into the record\_call params (matching the Python reference's valid\_directions = \["speak", "listen", "both"]). - - - - Audio directions for Tap. These are exactly the strings the SWML tap verb accepts for direction; the values are emitted verbatim into the tap params (matching the Python reference's valid\_directions = \["speak", "hear", "both"]). - - - - Audio directions for Tap. These are exactly the strings the SWML tap verb accepts for direction; the values are emitted verbatim into the tap params (matching the Python reference's valid\_directions = \["speak", "hear", "both"]). - - - - Audio directions for Tap. These are exactly the strings the SWML tap verb accepts for direction; the values are emitted verbatim into the tap params (matching the Python reference's valid\_directions = \["speak", "hear", "both"]). - - -## Classes - - - - FunctionResult represents the response from a SWAIG tool handler. It contains a text response, optional actions, and post-processing control. All mutating methods return \*FunctionResult for method chaining. - - - - JoinConferenceOptions holds optional parameters for JoinConference beyond the required name. - - - - Params accumulates SWAIG tool-parameter properties and the top-level required list, then renders them into the exact map\[string]any / \[]string pair that agent.ToolDefinition.Parameters and .Required expect. - - - - PayOptions holds all optional parameters for the Pay method. - - - - Prop is a single JSON-Schema property under construction. It is produced by the kind constructors (PropString, PropArray, PropObject, …) for use as the item schema of Array, and is otherwise an internal detail of Params. Build it via the Prop\* constructors; the zero value is not usable. - - - - RecordCallOptions holds optional parameters for RecordCall beyond the required fields. - - - -## Functions - -### CodecValues - -CodecValues returns the Codec closed set as wire strings (PCMU, PCMA), suitable for Params.Enum / PropEnum / WithEnum. - -#### Signature - -```go -func CodecValues() []string -``` - -#### Returns - -`[]string` - -#### Source - -[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) - -Line 319. - -*** - -### CreatePaymentAction - -CreatePaymentAction creates a single payment action entry. - -#### Signature - -```go -func CreatePaymentAction(actionType string, phrase string) map[string]string -``` - -#### Parameters - - - - - -#### Returns - -`map[string]string` - -#### Source - -[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) - -Line 1037. - -*** - -### CreatePaymentParameter - -CreatePaymentParameter creates a payment parameter entry. - -#### Signature - -```go -func CreatePaymentParameter(name string, value string) map[string]string -``` - -#### Parameters - - - - - -#### Returns - -`map[string]string` - -#### Source - -[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) - -Line 1045. - -*** - -### CreatePaymentPrompt - -CreatePaymentPrompt creates a payment prompt configuration. cardType and errorType are optional; pass empty strings to omit them. This matches the Python SDK's create\_payment\_prompt() static method signature. - -#### Signature - -```go -func CreatePaymentPrompt( - forSituation string, - actions []map[string]string, - cardType string, - errorType string -) map[string]any -``` - -#### Parameters - - - - - - - - - -#### Returns - -`map[string]any` - -#### Source - -[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) - -Line 1022. - -*** - -### Default - -Default sets the property's JSON-Schema "default" keyword to v (emitted verbatim — pass the wire value). - -#### Signature - -```go -func Default(v any) PropOption -``` - -#### Parameters - - - -#### Returns - -`PropOption` - -#### Source - -[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) - -Line 103. - -*** - -### Format - -Format sets the property's JSON-Schema "format" keyword (e.g. "date", "date-time", "email"). - -#### Signature - -```go -func Format(format string) PropOption -``` - -#### Parameters - - - -#### Returns - -`PropOption` - -#### Source - -[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) - -Line 109. - -*** - -### NewFunctionResult - -NewFunctionResult creates a new FunctionResult with the given response text. - -#### Signature - -```go -func NewFunctionResult(response string) *FunctionResult -``` - -#### Parameters - - - -#### Returns - -`*FunctionResult` - -#### Source - -[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) - -Line 25. - -*** - -### NewParams - -NewParams returns an empty parameter builder ready to accept property declarations. - -#### Signature - -```go -func NewParams() *Params -``` - -#### Returns - -`*Params` - -#### Source - -[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) - -Line 73. - -*** - -### PropArray - -PropArray returns an array-typed property whose elements match items. - -#### Signature - -```go -func PropArray(items *Prop, description string, opts ...PropOption) *Prop -``` - -#### Parameters - - - - - - - -#### Returns - -`*Prop` - -#### Source - -[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) - -Line 164. - -*** - -### PropBoolean - -PropBoolean returns a boolean-typed property. - -#### Signature - -```go -func PropBoolean(description string, opts ...PropOption) *Prop -``` - -#### Parameters - - - - - -#### Returns - -`*Prop` - -#### Source - -[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) - -Line 148. - -*** - -### PropEnum - -PropEnum returns a string-typed property constrained to the given closed set (JSON-Schema "enum"). values is typically one of RecordFormatValues(), RecordDirectionValues(), TapDirectionValues(), CodecValues(), or any caller list. - -#### Signature - -```go -func PropEnum(values []string, description string, opts ...PropOption) *Prop -``` - -#### Parameters - - - - - - - -#### Returns - -`*Prop` - -#### Source - -[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) - -Line 156. - -*** - -### PropInteger - -PropInteger returns an integer-typed property. - -#### Signature - -```go -func PropInteger(description string, opts ...PropOption) *Prop -``` - -#### Parameters - - - - - -#### Returns - -`*Prop` - -#### Source - -[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) - -Line 143. - -*** - -### PropNumber - -PropNumber returns a number-typed (floating-point) property. - -#### Signature - -```go -func PropNumber(description string, opts ...PropOption) *Prop -``` - -#### Parameters - - - - - -#### Returns - -`*Prop` - -#### Source - -[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) - -Line 138. - -*** - -### PropObject - -PropObject returns an object-typed property whose nested properties (and nested required list) come from nested. - -#### Signature - -```go -func PropObject(nested *Params, description string, opts ...PropOption) *Prop -``` - -#### Parameters - - - - - - - -#### Returns - -`*Prop` - -#### Source - -[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) - -Line 175. - -*** - -### PropString - -PropString returns a string-typed property with the given description. - -#### Signature - -```go -func PropString(description string, opts ...PropOption) *Prop -``` - -#### Parameters - - - - - -#### Returns - -`*Prop` - -#### Source - -[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) - -Line 133. - -*** - -### RecordDirectionValues - -RecordDirectionValues returns the RecordDirection closed set as wire strings (speak, listen, both), suitable for Params.Enum / PropEnum / WithEnum. - -#### Signature - -```go -func RecordDirectionValues() []string -``` - -#### Returns - -`[]string` - -#### Source - -[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) - -Line 307. - -*** - -### RecordFormatValues - -RecordFormatValues returns the RecordFormat closed set as wire strings (mp3, wav, mp4), suitable for Params.Enum / PropEnum / WithEnum. The values are derived from the typed constants, so adding a constant updates the list. - -#### Signature - -```go -func RecordFormatValues() []string -``` - -#### Returns - -`[]string` - -#### Source - -[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) - -Line 301. - -*** - -### Required - -Required marks the enclosing property as required. On a top-level Params property it adds the name to the schema's top-level required array; inside an Object it adds to that object's required array. This is the per-property alternative to Params.Required(names...). - -#### Signature - -```go -func Required() PropOption -``` - -#### Returns - -`PropOption` - -#### Source - -[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) - -Line 124. - -*** - -### TapDirectionValues - -TapDirectionValues returns the TapDirection closed set as wire strings (speak, hear, both), suitable for Params.Enum / PropEnum / WithEnum. - -#### Signature - -```go -func TapDirectionValues() []string -``` - -#### Returns - -`[]string` - -#### Source - -[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) - -Line 313. - -*** - -### WithEnum - -WithEnum constrains the property to the given closed set, setting the JSON-Schema "enum" keyword. Use it to attach an enum to a String/Integer/… property; the Enum kind constructor is the shorthand for a string enum. - -#### Signature - -```go -func WithEnum(values ...string) PropOption -``` - -#### Parameters - - - -#### Returns - -`PropOption` - -#### Source - -[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) - -Line 116. - -## Type Aliases - -### PropOption - -PropOption mutates a property's JSON-Schema object. Options are applied left to right after the kind and description are set, so a later option overrides an earlier one writing the same key. - -#### Signature - -```go -type PropOption alias -``` - -#### Source - -[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) - -Line 99. - -*** - -### ToolHandler - -ToolHandler is the function signature for SWAIG tool handlers. args contains the parsed function arguments, rawData contains the full request payload including global\_data, call\_id, etc. - -#### Signature - -```go -type ToolHandler alias -``` - -#### Source - -[`pkg/swaig/handler.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/handler.go) - -Line 6. - -## Enums - -### Codec - -Codec is the closed set of audio codecs accepted by FunctionResult.Tap's codec argument (the SWAIG tap media stream), as a defined string type with typed constants. It gives Go callers editor autocompletion plus call-site typo checking — a bare string like "PCUM" only fails downstream (the server rejects it), whereas a mistyped constant fails to compile. - -Because Go auto-converts untyped string-constant literals to a defined string type, every call site keeps working both ways: - -``` -fr.Tap("rtp://h:1", "id", swaig.TapDirectionBoth, swaig.CodecPCMA, 0, "") // typed const -fr.Tap("rtp://h:1", "id", "both", "PCMA", 0, "") // bare string still compiles -``` - -Codec is a string subtype, so the value written into the SWML tap params is byte-identical to the bare string the reference uses — parity with Python's tap(codec=...) keyword (a plain str). The enumerator emits the codec param as union\, so signature drift stays 0 against the reference's str (the string member absorbs). - -IMPORTANT: this 2-value SWAIG-tap set (\{PCMU, PCMA\}, validated at function\_result.py:1217) is DISTINCT from the larger RELAY connect/stream device codec superset (\{PCMU, PCMA, OPUS, G729, G722, VP8, H264, ...\}, comma-joinable). The relay codec is genuinely open/multi-value and is deliberately left a bare string (see PORT\_ADDITIONS / the journal §3) — this type must never be reused there. - -#### Signature - -```go -type Codec alias -``` - -#### Examples - - - - ```go - fr.Tap("rtp://h:1", "id", swaig.TapDirectionBoth, swaig.CodecPCMA, 0, "") // typed const - fr.Tap("rtp://h:1", "id", "both", "PCMA", 0, "") // bare string still compiles - ``` - - - - ```go - fr.Tap("rtp://h:1", "id", swaig.TapDirectionBoth, swaig.CodecPCMA, 0, "") // typed const - fr.Tap("rtp://h:1", "id", "both", "PCMA", 0, "") // bare string still compiles - ``` - - - -#### Source - -[`pkg/swaig/codec.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/codec.go) - -Line 27. - -*** - -### RecordDirection - -RecordDirection is the closed set of audio directions accepted by FunctionResult.RecordCall's direction argument, as a defined string type with typed constants. It gives Go callers editor autocompletion plus call-site typo checking — a bare string like "lisetn" only fails downstream (the server rejects it), whereas a mistyped constant fails to compile. - -Because Go auto-converts untyped string-constant literals to a defined string type, every call site keeps working both ways: - -``` -fr.RecordCall("id", true, swaig.FormatWAV, swaig.RecordDirectionListen, nil) // typed const -fr.RecordCall("id", true, swaig.FormatWAV, "listen", nil) // bare string still compiles -``` - -RecordDirection is a string subtype, so the value written into the SWML record\_call params is byte-identical to the bare string the reference uses — parity with Python's record\_call(direction=...) keyword (a plain str). The enumerator emits the direction param as union\, so signature drift stays 0 against the reference's str (the string member absorbs). - -IMPORTANT: this set (\{speak, listen, both\}) is DISTINCT from TapDirection (\{speak, hear, both\}) — record\_call uses "listen" where tap uses "hear". The Python reference validates the two with two different lists (function\_result.py:917 vs :1212), so they are modelled as two separate types and must never be unified. (And both differ again from the RELAY play/record/ tap direction vocabulary — three distinct vocabularies in all.) - -#### Signature - -```go -type RecordDirection alias -``` - -#### Examples - - - - ```go - fr.RecordCall("id", true, swaig.FormatWAV, swaig.RecordDirectionListen, nil) // typed const - fr.RecordCall("id", true, swaig.FormatWAV, "listen", nil) // bare string still compiles - ``` - - - - ```go - fr.RecordCall("id", true, swaig.FormatWAV, swaig.RecordDirectionListen, nil) // typed const - fr.RecordCall("id", true, swaig.FormatWAV, "listen", nil) // bare string still compiles - ``` - - - -#### Source - -[`pkg/swaig/record_direction.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/record_direction.go) - -Line 28. - -*** - -### RecordFormat - -RecordFormat is the closed set of call-recording container formats as a defined string type with typed constants. FunctionResult.RecordCall takes it for the format argument, giving Go callers editor autocompletion plus call-site typo checking — a bare string like "wvv" only fails downstream, whereas a mistyped constant fails to compile. - -Because Go auto-converts untyped string-constant literals to a defined string type, every call site keeps working both ways: - -``` -fr.RecordCall("id", true, swaig.FormatWAV, "both", nil) // typed const -fr.RecordCall("id", true, "wav", "both", nil) // bare string still compiles -``` - -RecordFormat is a string subtype, so the value written into the SWML record params is byte-identical to the bare string the reference uses — parity with Python's record\_call(format=...) keyword (a plain str). The enumerator emits it as union\, so signature drift stays 0 against the reference's str (the string member absorbs). - -#### Signature - -```go -type RecordFormat alias -``` - -#### Examples - - - - ```go - fr.RecordCall("id", true, swaig.FormatWAV, "both", nil) // typed const - fr.RecordCall("id", true, "wav", "both", nil) // bare string still compiles - ``` - - - - ```go - fr.RecordCall("id", true, swaig.FormatWAV, "both", nil) // typed const - fr.RecordCall("id", true, "wav", "both", nil) // bare string still compiles - ``` - - - -#### Source - -[`pkg/swaig/record_format.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/record_format.go) - -Line 20. - -*** - -### TapDirection - -TapDirection is the closed set of audio directions accepted by FunctionResult.Tap's direction argument, as a defined string type with typed constants. It gives Go callers editor autocompletion plus call-site typo checking — a bare string like "haer" only fails downstream (the server rejects it), whereas a mistyped constant fails to compile. - -Because Go auto-converts untyped string-constant literals to a defined string type, every call site keeps working both ways: - -``` -fr.Tap("rtp://h:1", "id", swaig.TapDirectionHear, swaig.CodecPCMU, 0, "") // typed const -fr.Tap("rtp://h:1", "id", "hear", "PCMU", 0, "") // bare string still compiles -``` - -TapDirection is a string subtype, so the value written into the SWML tap params is byte-identical to the bare string the reference uses — parity with Python's tap(direction=...) keyword (a plain str). The enumerator emits the direction param as union\, so signature drift stays 0 against the reference's str (the string member absorbs). - -IMPORTANT: this set (\{speak, hear, both\}) is DISTINCT from RecordDirection (\{speak, listen, both\}) — tap uses "hear" where record\_call uses "listen". The Python reference validates the two with two different lists (function\_result.py:1212 vs :917), so they are modelled as two separate types and must never be unified. (And both differ again from the RELAY play/record/ tap direction vocabulary — three distinct vocabularies in all.) - -#### Signature - -```go -type TapDirection alias -``` - -#### Examples - - - - ```go - fr.Tap("rtp://h:1", "id", swaig.TapDirectionHear, swaig.CodecPCMU, 0, "") // typed const - fr.Tap("rtp://h:1", "id", "hear", "PCMU", 0, "") // bare string still compiles - ``` - - - - ```go - fr.Tap("rtp://h:1", "id", swaig.TapDirectionHear, swaig.CodecPCMU, 0, "") // typed const - fr.Tap("rtp://h:1", "id", "hear", "PCMU", 0, "") // bare string still compiles - ``` - - - -#### Source - -[`pkg/swaig/tap_direction.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/tap_direction.go) - -Line 27. - -## Source - -[`pkg/swaig/codec.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/codec.go) diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig/join-conference-options/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig/join-conference-options/index.mdx deleted file mode 100644 index 8fbe8c3242..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig/join-conference-options/index.mdx +++ /dev/null @@ -1,99 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig/join-conference-options" -title: "JoinConferenceOptions" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/swaig.JoinConferenceOptions" - parent: "github.com/signalwire/signalwire-go/pkg/swaig" - module: "github.com.signalwire.signalwire-go.pkg.swaig" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go" ---- -# `JoinConferenceOptions` - -JoinConferenceOptions holds optional parameters for JoinConference beyond the required name. - -## Signature - -```go -type JoinConferenceOptions struct -``` - -## Properties - - - Beep controls beep behavior: "true" (default), "false", "onEnter", "onExit". - - - - Coach sets the SWML Call ID or CXML CallSid for coaching. - - - - EndOnExit controls whether the conference ends when this participant exits (default false). - - - - MaxParticipants sets the maximum number of participants (\<= 250). 0 uses server default. - - - - Muted joins the conference muted when true. - - - - Record sets the recording mode: "do-not-record" (default) or "record-from-start". - - - - RecordingStatusCallback is the URL for recording status callbacks. - - - - RecordingStatusCallbackEvent sets recording events to report. - - - - RecordingStatusCallbackMethod sets the HTTP method for recording callbacks ("GET" or "POST"). - - - - Region sets the conference region. - - - - Result sets switch-on-return-value behavior (object or array). - - - - StartOnEnter controls whether the conference starts when this participant enters (default true in Python). - - - - StatusCallback is the URL for status callbacks. - - - - StatusCallbackEvent specifies events to report (space-separated). - - - - StatusCallbackMethod sets the HTTP method for status callbacks ("GET" or "POST"). - - - - Trim controls silence trimming: "trim-silence" (default) or "do-not-trim". - - - - WaitURL is the SWML URL for hold music (replaces the old holdAudio parameter). - - -## Source - -[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) - -Line 508. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig/params/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig/params/index.mdx deleted file mode 100644 index 0d8340d621..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig/params/index.mdx +++ /dev/null @@ -1,369 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig/params" -title: "Params" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/swaig.Params" - parent: "github.com/signalwire/signalwire-go/pkg/swaig" - module: "github.com.signalwire.signalwire-go.pkg.swaig" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go" ---- -# `Params` - -Params accumulates SWAIG tool-parameter properties and the top-level required list, then renders them into the exact map\[string]any / \[]string pair that agent.ToolDefinition.Parameters and .Required expect. - -The zero value is not usable; construct with NewParams. Methods return the receiver so calls chain fluently. Params is not safe for concurrent mutation (build it on one goroutine, then read it). - -## Signature - -```go -type Params struct -``` - -## Methods - -### Array - -Array adds an array-typed property named name whose elements match items. - -#### Signature - -```go -func (*Params) Array(name string, items *Prop, description string, opts ...PropOption) *Params -``` - -#### Parameters - - - - - - - - - -#### Returns - -`*Params` - -#### Source - -[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) - -Line 220. - -*** - -### Boolean - -Boolean adds a boolean-typed property named name. - -#### Signature - -```go -func (*Params) Boolean(name string, description string, opts ...PropOption) *Params -``` - -#### Parameters - - - - - - - -#### Returns - -`*Params` - -#### Source - -[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) - -Line 207. - -*** - -### Build - -Build renders both halves at once: the properties map (for ToolDefinition.Parameters) and the required list (for ToolDefinition.Required). It is sugar for (b.Properties(), b.RequiredNames()): - -``` -params, required := swaig.NewParams(). - String("service", "The service").Required("service").Build() -td := agent.ToolDefinition{Name: "x", Parameters: params, Required: required} -``` - -#### Signature - -```go -func (*Params) Build() (map[string]any, []string) -``` - -#### Returns - -`(map[string]any, []string)` - -#### Examples - - - - ```go - params, required := swaig.NewParams(). - String("service", "The service").Required("service").Build() - td := agent.ToolDefinition{Name: "x", Parameters: params, Required: required} - ``` - - - - ```go - params, required := swaig.NewParams(). - String("service", "The service").Required("service").Build() - td := agent.ToolDefinition{Name: "x", Parameters: params, Required: required} - ``` - - - -#### Source - -[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) - -Line 290. - -*** - -### Enum - -Enum adds a string-typed property named name constrained to the closed set values (JSON-Schema "enum"). Pass RecordFormatValues() / RecordDirectionValues() / TapDirectionValues() / CodecValues() to wire one of the Tier-1 typed enums, or any caller list. - -#### Signature - -```go -func (*Params) Enum(name string, values []string, description string, opts ...PropOption) *Params -``` - -#### Parameters - - - - - - - - - -#### Returns - -`*Params` - -#### Source - -[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) - -Line 215. - -*** - -### Integer - -Integer adds an integer-typed property named name. - -#### Signature - -```go -func (*Params) Integer(name string, description string, opts ...PropOption) *Params -``` - -#### Parameters - - - - - - - -#### Returns - -`*Params` - -#### Source - -[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) - -Line 202. - -*** - -### Number - -Number adds a number-typed (floating-point) property named name. - -#### Signature - -```go -func (*Params) Number(name string, description string, opts ...PropOption) *Params -``` - -#### Parameters - - - - - - - -#### Returns - -`*Params` - -#### Source - -[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) - -Line 197. - -*** - -### Object - -Object adds an object-typed property named name whose nested properties come from nested. - -#### Signature - -```go -func (*Params) Object(name string, nested *Params, description string, opts ...PropOption) *Params -``` - -#### Parameters - - - - - - - - - -#### Returns - -`*Params` - -#### Source - -[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) - -Line 226. - -*** - -### Properties - -Properties renders the accumulated properties as a JSON-Schema _properties_ map, assignable directly to agent.ToolDefinition.Parameters. The result is a fresh map on each call (callers may mutate it freely); it is byte-identical to the equivalent hand-written map\[string]any literal. - -A builder with no properties returns an empty (non-nil) map, so the caller can pass it straight through; assign nil explicitly if you want the "no schema" path (ToolDefinition omits the parameters block when Parameters is nil/empty). - -#### Signature - -```go -func (*Params) Properties() map[string]any -``` - -#### Returns - -`map[string]any` - -#### Source - -[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) - -Line 252. - -*** - -### Required - -Required marks one or more already-declared (or yet-to-be-declared) property names as required at the top level. Duplicate names are ignored; first-seen order is preserved. Returns the receiver for chaining. - -#### Signature - -```go -func (*Params) Required(names ...string) *Params -``` - -#### Parameters - - - -#### Returns - -`*Params` - -#### Source - -[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) - -Line 233. - -*** - -### RequiredNames - -RequiredNames returns the top-level required property names in first-seen order, assignable directly to agent.ToolDefinition.Required. It returns nil when nothing is required (matching a hand-written `Required: nil`); a fresh slice is returned on each call. - -(The fluent setter is Required(names ...string) \*Params; this getter is named RequiredNames so the two don't collide on the method set.) - -#### Signature - -```go -func (*Params) RequiredNames() []string -``` - -#### Returns - -`[]string` - -#### Source - -[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) - -Line 279. - -*** - -### String - -String adds a string-typed property named name. - -#### Signature - -```go -func (*Params) String(name string, description string, opts ...PropOption) *Params -``` - -#### Parameters - - - - - - - -#### Returns - -`*Params` - -#### Source - -[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) - -Line 192. - -## Source - -[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) - -Line 57. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig/pay-options/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig/pay-options/index.mdx deleted file mode 100644 index 54dd8d944b..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig/pay-options/index.mdx +++ /dev/null @@ -1,107 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig/pay-options" -title: "PayOptions" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/swaig.PayOptions" - parent: "github.com/signalwire/signalwire-go/pkg/swaig" - module: "github.com.signalwire.signalwire-go.pkg.swaig" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go" ---- -# `PayOptions` - -PayOptions holds all optional parameters for the Pay method. - -## Signature - -```go -type PayOptions struct -``` - -## Properties - - - AIResponse is the message set via the "set" verb that always precedes the pay verb; empty string uses the Python default status message. The set verb is always emitted (Python has no suppression path), matching pay()'s SWML. - - - - ChargeAmount is the amount to charge as a decimal string (e.g. "9.99"). - - - - Currency is the currency code. Defaults to "usd". - - - - Description is a custom payment description. - - - - InputMethod is the method to collect payment details ("dtmf" or "voice"). Defaults to "dtmf". - - - - Language is the language for prompts. Defaults to "en-US". - - - - MaxAttempts is the number of retry attempts. Defaults to 1. - - - - MinPostalCodeLength sets the minimum number of postal code digits. Defaults to 0. - - - - Parameters is an array of name/value pairs for the payment connector. - - - - PaymentMethod is the payment method type. Defaults to "credit-card". - - - - PostalCode controls whether to prompt for postal code, or supplies the actual code. String value is used as-is; bool true/false becomes "true"/"false". - - - - Prompts is an array of custom prompt configurations. - - - - SecurityCode controls whether to prompt for security code. Defaults to true. Use SecurityCodeSet to override; zero value (false) is treated as "not set". - - - - SecurityCodeSet must be true to explicitly set SecurityCode=false. - - - - StatusURL is the URL for payment status change notifications. - - - - Timeout is the seconds to wait for the next digit. Defaults to 5. - - - - TokenType is the payment token type: "one-time" or "reusable". Defaults to "reusable". - - - - ValidCardTypes is a space-separated list of card types. Defaults to "visa mastercard amex". - - - - Voice is the TTS voice to use. Defaults to "woman". - - -## Source - -[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) - -Line 769. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig/prop/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig/prop/index.mdx deleted file mode 100644 index ecbeba7638..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig/prop/index.mdx +++ /dev/null @@ -1,29 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig/prop" -title: "Prop" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/swaig.Prop" - parent: "github.com/signalwire/signalwire-go/pkg/swaig" - module: "github.com.signalwire.signalwire-go.pkg.swaig" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go" ---- -# `Prop` - -Prop is a single JSON-Schema property under construction. It is produced by the kind constructors (PropString, PropArray, PropObject, …) for use as the item schema of Array, and is otherwise an internal detail of Params. Build it via the Prop\* constructors; the zero value is not usable. - -## Signature - -```go -type Prop struct -``` - -## Source - -[`pkg/swaig/params.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/params.go) - -Line 84. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig/record-call-options/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig/record-call-options/index.mdx deleted file mode 100644 index f95eaa0c12..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig/record-call-options/index.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig/record-call-options" -title: "RecordCallOptions" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/swaig.RecordCallOptions" - parent: "github.com/signalwire/signalwire-go/pkg/swaig" - module: "github.com.signalwire.signalwire-go.pkg.swaig" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go" ---- -# `RecordCallOptions` - -RecordCallOptions holds optional parameters for RecordCall beyond the required fields. - -## Signature - -```go -type RecordCallOptions struct -``` - -## Properties - - - Beep plays a beep before recording starts when true. Always emitted (Python emits beep unconditionally; default false). - - - - EndSilenceTimeout is seconds of silence before ending (voicemail-style). Negative value is omitted. - - - - EndSilenceTimeoutSet must be true for EndSilenceTimeout of 0.0 to be included. - - - - InitialTimeout is the time in seconds to wait for speech to start (voicemail-style). Negative value is omitted. - - - - InitialTimeoutSet must be true for InitialTimeout of 0.0 to be included. - - - - InputSensitivity sets the input sensitivity for recording. Always emitted (Python emits input\_sensitivity unconditionally; default 44.0). The Go zero value (0.0) is mapped to the Python default 44.0 — pass a non-zero value to override. - - - - MaxLength is the maximum recording length in seconds. Negative value is omitted. - - - - MaxLengthSet must be true for MaxLength of 0.0 to be included. - - - - StatusURL is the URL to send recording status events to. - - - - Terminators specifies digits that stop recording when pressed. - - -## Source - -[`pkg/swaig/function_result.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swaig/function_result.go) - -Line 314. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/ai-verb-handler/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/ai-verb-handler/index.mdx deleted file mode 100644 index 9f3e597b34..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/ai-verb-handler/index.mdx +++ /dev/null @@ -1,132 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/ai-verb-handler" -title: "AIVerbHandler" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/swml.AIVerbHandler" - parent: "github.com/signalwire/signalwire-go/pkg/swml" - module: "github.com.signalwire.signalwire-go.pkg.swml" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/ai_verb_handler.go" ---- -# `AIVerbHandler` - -AIVerbHandler is a concrete VerbHandler for the SWML "ai" verb. - -It implements the VerbHandler interface and provides validation and configuration-building logic for the AI verb. This is the Go equivalent of the Python AIVerbHandler class in core/swml\_handler.py. - -The AI verb is complex and requires specialized handling, particularly for managing prompts, SWAIG functions, and AI configurations. - -## Signature - -```go -type AIVerbHandler struct -``` - -## Methods - -### BuildConfig - -BuildConfig assembles an AI verb configuration map from the provided params. - -Recognised keys in params (ported from Python AIVerbHandler.build\_config): - -- "prompt\_text" (string) — text prompt; mutually exclusive with "prompt\_pom" -- "prompt\_pom" (\[]any or similar) — POM structure; mutually exclusive with "prompt\_text" -- "contexts" (map\[string]any) — optional contexts / steps configuration -- "post\_prompt" (string) — optional post-prompt text; wrapped in \{"text": value\} -- "post\_prompt\_url" (string) — optional post-prompt URL -- "swaig" (map\[string]any) — optional SWAIG configuration; emitted as "SWAIG" - -Additional keys in params are handled as follows (matching Python \*\*kwargs logic): - -- "languages", "hints", "pronounce", "global\_data" — emitted as top-level keys. -- All other extra keys are collected under a nested "params" map. - -Returns (configMap, nil) on success, or (nil, error) if the parameters are contradictory (e.g. both prompt\_text and prompt\_pom supplied, or neither). - -#### Signature - -```go -func (*AIVerbHandler) BuildConfig(params map[string]any) (map[string]any, error) -``` - -#### Parameters - - - -#### Returns - -`(map[string]any, error)` - -#### Source - -[`pkg/swml/ai_verb_handler.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/ai_verb_handler.go) - -Line 112. - -*** - -### GetVerbName - -GetVerbName returns "ai", the name of the SWML verb this handler handles. - -#### Signature - -```go -func (*AIVerbHandler) GetVerbName() string -``` - -#### Returns - -`string` - -#### Source - -[`pkg/swml/ai_verb_handler.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/ai_verb_handler.go) - -Line 32. - -*** - -### ValidateConfig - -ValidateConfig validates the configuration map for the AI verb. - -Validation rules (ported from Python AIVerbHandler.validate\_config): - -- "prompt" key must be present and must be a map\[string]any. -- "prompt" must contain exactly one of "text" or "pom" (mutually exclusive). -- If "prompt.contexts" is present it must be a map\[string]any. -- If "SWAIG" is present it must be a map\[string]any. - -Returns (true, nil) when the config is valid; (false, errors) when it is not. - -#### Signature - -```go -func (*AIVerbHandler) ValidateConfig(config map[string]any) (bool, []string) -``` - -#### Parameters - - - -#### Returns - -`(bool, []string)` - -#### Source - -[`pkg/swml/ai_verb_handler.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/ai_verb_handler.go) - -Line 45. - -## Source - -[`pkg/swml/ai_verb_handler.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/ai_verb_handler.go) - -Line 20. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/document/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/document/index.mdx deleted file mode 100644 index 399023e03c..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/document/index.mdx +++ /dev/null @@ -1,277 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/document" -title: "Document" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/swml.Document" - parent: "github.com/signalwire/signalwire-go/pkg/swml" - module: "github.com.signalwire.signalwire-go.pkg.swml" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/document.go" ---- -# `Document` - -Document represents a complete SWML document with version and sections. - -## Signature - -```go -type Document struct -``` - -## Properties - - - - - -## Methods - -### AddSection - -AddSection creates a new named section in the document. Returns false if the section already exists. - -#### Signature - -```go -func (*Document) AddSection(name string) bool -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`pkg/swml/document.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/document.go) - -Line 46. - -*** - -### AddVerb - -AddVerb appends a verb to the "main" section. Returns an error if the verb name is empty. - -#### Signature - -```go -func (*Document) AddVerb(verbName string, config any) error -``` - -#### Parameters - - - - - -#### Returns - -`error` - -#### Source - -[`pkg/swml/document.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/document.go) - -Line 66. - -*** - -### AddVerbToSection - -AddVerbToSection appends a verb to a named section. Creates the section if it doesn't exist. - -#### Signature - -```go -func (*Document) AddVerbToSection(section string, verbName string, config any) error -``` - -#### Parameters - - - - - - - -#### Returns - -`error` - -#### Source - -[`pkg/swml/document.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/document.go) - -Line 72. - -*** - -### GetVerbs - -GetVerbs returns the verbs in a named section. Returns nil if the section doesn't exist. - -#### Signature - -```go -func (*Document) GetVerbs(section string) []Verb -``` - -#### Parameters - - - -#### Returns - -`[]Verb` - -#### Source - -[`pkg/swml/document.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/document.go) - -Line 88. - -*** - -### HasSection - -HasSection returns whether a section exists in the document. - -#### Signature - -```go -func (*Document) HasSection(name string) bool -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`pkg/swml/document.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/document.go) - -Line 57. - -*** - -### MarshalJSON - -MarshalJSON implements the json.Marshaler interface. - -#### Signature - -```go -func (*Document) MarshalJSON() ([]byte, error) -``` - -#### Returns - -`([]byte, error)` - -#### Source - -[`pkg/swml/document.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/document.go) - -Line 139. - -*** - -### Render - -Render serializes the document to a JSON string. - -#### Signature - -```go -func (*Document) Render() (string, error) -``` - -#### Returns - -`(string, error)` - -#### Source - -[`pkg/swml/document.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/document.go) - -Line 121. - -*** - -### RenderPretty - -RenderPretty serializes the document to an indented JSON string. - -#### Signature - -```go -func (*Document) RenderPretty() (string, error) -``` - -#### Returns - -`(string, error)` - -#### Source - -[`pkg/swml/document.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/document.go) - -Line 130. - -*** - -### Reset - -Reset clears all sections and recreates the default "main" section. - -#### Signature - -```go -func (*Document) Reset() -``` - -#### Source - -[`pkg/swml/document.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/document.go) - -Line 36. - -*** - -### ToMap - -ToMap returns the document as a nested map suitable for JSON serialization. - -#### Signature - -```go -func (*Document) ToMap() map[string]any -``` - -#### Returns - -`map[string]any` - -#### Source - -[`pkg/swml/document.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/document.go) - -Line 101. - -## Source - -[`pkg/swml/document.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/document.go) - -Line 15. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/index.mdx deleted file mode 100644 index 3c0378bdbb..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/index.mdx +++ /dev/null @@ -1,999 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml" -title: "swml" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "module" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/swml" - module: "github.com.signalwire.signalwire-go.pkg.swml" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/ai_verb_handler.go" ---- -# `swml` - -Package swml provides the SWML (SignalWire Markup Language) document model, builder, and rendering for the SignalWire AI platform. - -SWML documents define call flows, AI agent behavior, and telephony operations. The SignalWire platform fetches SWML from agents and executes it. - -Package swml — URL validation utility to prevent SSRF attacks. Ported from signalwire/utils/url\_validator.py. - -## Signature - -```go -package swml -``` - -## Constants - - - - - - - - - - - -## Classes - - - - AIVerbHandler is a concrete VerbHandler for the SWML "ai" verb. - - - - Document represents a complete SWML document with version and sections. - - - - Schema holds the parsed SWML schema and provides verb metadata. - - - - SchemaUtils is the Go port of signalwire.utils.schema\_utils.SchemaUtils. - - - - SchemaValidationError is the canonical error type raised when SWML schema validation fails. Mirrors Python's SchemaValidationError. - - - - SecurityConfig bundles configuration for all supported authentication methods: HTTP Basic Auth, Bearer token, and API key. Pass it to WithSecurityConfig to configure multiple auth methods in one call. - - - - Service is the base SWML service that manages documents, HTTP endpoints, and auth. It provides auto-vivified verb methods driven by the SWML schema. - - - - ToolDefinition is a SWAIG tool registered on the Service. - - - - ValidationResult mirrors Python's “Tuple\[bool, List\[str]]“ return shape used by ValidateVerb / ValidateDocument. - - - - VerbInfo holds metadata about a SWML verb extracted from the schema. - - - -## Functions - -### ExtractSIPUsername - -ExtractSIPUsername extracts a SIP username from a request body. - -#### Signature - -```go -func ExtractSIPUsername(body map[string]any) string -``` - -#### Parameters - - - -#### Returns - -`string` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 1049. - -*** - -### GetExecutionMode - -GetExecutionMode inspects the process environment and returns the detected runtime mode. The detection order matches the Python and TypeScript SDKs so that the same env vars resolve to the same mode across languages. - -Detection order: - -1. CGI (GATEWAY\_INTERFACE) -2. AWS Lambda (AWS\_LAMBDA\_FUNCTION\_NAME or LAMBDA\_TASK\_ROOT) -3. GCF (FUNCTION\_TARGET, K\_SERVICE, or GOOGLE\_CLOUD\_PROJECT) -4. Azure (AZURE\_FUNCTIONS\_ENVIRONMENT, FUNCTIONS\_WORKER\_RUNTIME, or AzureWebJobsStorage) -5. Server (default fallback) - -#### Signature - -```go -func GetExecutionMode() ExecutionMode -``` - -#### Returns - -`ExecutionMode` - -#### Source - -[`pkg/swml/execution_mode.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/execution_mode.go) - -Line 40. - -*** - -### GetSchema - -GetSchema returns the global singleton Schema loaded from the embedded schema.json. - -#### Signature - -```go -func GetSchema() (*Schema, error) -``` - -#### Returns - -`(*Schema, error)` - -#### Source - -[`pkg/swml/schema.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema.go) - -Line 42. - -*** - -### IsServerlessMode - -IsServerlessMode reports whether the process is running in any serverless environment (i.e. NOT in plain long-running server mode). - -Mirrors Python's is\_serverless\_mode(): - -``` -def is_serverless_mode() -> bool: - return get_execution_mode() != 'server' -``` - -#### Signature - -```go -func IsServerlessMode() bool -``` - -#### Returns - -`bool` - -#### Examples - - - - ```go - def is_serverless_mode() -> bool: - return get_execution_mode() != 'server' - ``` - - - - ```go - def is_serverless_mode() -> bool: - return get_execution_mode() != 'server' - ``` - - - -#### Source - -[`pkg/swml/execution_mode.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/execution_mode.go) - -Line 67. - -*** - -### LoadSchemaFromFile - -LoadSchemaFromFile loads a SWML schema from the given file path instead of the embedded schema.json. Mirrors Python's schema\_path constructor param. - -#### Signature - -```go -func LoadSchemaFromFile(path string) (*Schema, error) -``` - -#### Parameters - - - -#### Returns - -`(*Schema, error)` - -#### Source - -[`pkg/swml/schema.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema.go) - -Line 163. - -*** - -### NewAIVerbHandler - -NewAIVerbHandler returns a new AIVerbHandler ready for registration. - -Example: - -``` -svc.RegisterVerbHandler(swml.NewAIVerbHandler()) -``` - -#### Signature - -```go -func NewAIVerbHandler() *AIVerbHandler -``` - -#### Returns - -`*AIVerbHandler` - -#### Examples - - - - ```go - svc.RegisterVerbHandler(swml.NewAIVerbHandler()) - ``` - - - - ```go - svc.RegisterVerbHandler(swml.NewAIVerbHandler()) - ``` - - - -#### Source - -[`pkg/swml/ai_verb_handler.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/ai_verb_handler.go) - -Line 27. - -*** - -### NewDocument - -NewDocument creates a new empty SWML document with default version. - -#### Signature - -```go -func NewDocument() *Document -``` - -#### Returns - -`*Document` - -#### Source - -[`pkg/swml/document.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/document.go) - -Line 26. - -*** - -### NewSchemaUtils - -NewSchemaUtils constructs a SchemaUtils. Mirrors Python's “SchemaUtils(schema\_path, schema\_validation=True)“. - -Pass schemaPath="" to use the embedded schema.json bundled with the SDK. schemaValidation=false disables validation; the env var SWML\_SKIP\_SCHEMA\_VALIDATION=1/true/yes also disables it. - -#### Signature - -```go -func NewSchemaUtils(schemaPath string, schemaValidation bool) *SchemaUtils -``` - -#### Parameters - - - - - -#### Returns - -`*SchemaUtils` - -#### Source - -[`pkg/swml/schema_utils.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema_utils.go) - -Line 88. - -*** - -### NewSchemaValidationError - -NewSchemaValidationError constructs a SchemaValidationError. Mirrors Python's SchemaValidationError.**init**(verb\_name, errors). - -#### Signature - -```go -func NewSchemaValidationError(verbName string, errors []string) *SchemaValidationError -``` - -#### Parameters - - - - - -#### Returns - -`*SchemaValidationError` - -#### Source - -[`pkg/swml/schema_utils.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema_utils.go) - -Line 36. - -*** - -### NewService - -NewService creates a new SWML service with the given options. - -#### Signature - -```go -func NewService(opts ...ServiceOption) *Service -``` - -#### Parameters - - - -#### Returns - -`*Service` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 285. - -*** - -### ValidateURL - -ValidateURL reports whether rawURL is safe to fetch (i.e. does not point to a private or internal resource). It returns an error describing why the URL was rejected, or nil if the URL is acceptable. - -Behavior mirrors Python's validate\_url(url, allow\_private=False): - -- Only http and https schemes are accepted. -- A non-empty hostname is required. -- When allowPrivate is false AND the SWML\_ALLOW\_PRIVATE\_URLS env var is not set to "1", "true", or "yes" (case-insensitive), every IP address that the hostname resolves to is checked against the nine blocked CIDR ranges above. If any resolved IP falls in a blocked range the URL is rejected. - -Go idiom: returns (bool, error) instead of a bare bool so callers can log or propagate the rejection reason. Returning (false, nil) never happens — err is always non-nil when the bool is false. - -#### Signature - -```go -func ValidateURL(rawURL string, allowPrivate bool) (bool, error) -``` - -#### Parameters - - - - - -#### Returns - -`(bool, error)` - -#### Source - -[`pkg/swml/url_validator.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/url_validator.go) - -Line 73. - -*** - -### WithAPIKey - -WithAPIKey configures API key authentication. When set, the withSecurity middleware accepts requests where the header named by header equals key. header is the HTTP header name (e.g. "X-API-Key"); pass an empty string to use the default "X-API-Key". Mirrors Python's SecurityConfig.api\_key / api\_key\_header fields and the AuthHandler verify\_api\_key / flask\_decorator behaviour. - -#### Signature - -```go -func WithAPIKey(key string, header string) ServiceOption -``` - -#### Parameters - - - - - -#### Returns - -`ServiceOption` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 184. - -*** - -### WithBasicAuth - -WithBasicAuth sets explicit basic auth credentials. - -#### Signature - -```go -func WithBasicAuth(user string, password string) ServiceOption -``` - -#### Parameters - - - - - -#### Returns - -`ServiceOption` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 161. - -*** - -### WithBearerToken - -WithBearerToken configures Bearer token authentication. When set, the withSecurity middleware accepts requests carrying an "Authorization: Bearer \" header that matches token in addition to (or instead of) Basic Auth. Mirrors Python's SecurityConfig.bearer\_token field and the AuthHandler verify\_bearer\_token / flask\_decorator behaviour. - -#### Signature - -```go -func WithBearerToken(token string) ServiceOption -``` - -#### Parameters - - - -#### Returns - -`ServiceOption` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 174. - -*** - -### WithConfigFile - -WithConfigFile loads a YAML configuration file and applies its `security` section to the Service. Mirrors Python's SecurityConfig(config\_file=...) loader (signalwire/core/security\_config.py \_load\_config\_file). The expected schema is: - -``` -security: - ssl_cert_path: /path/to/cert.pem - ssl_key_path: /path/to/key.pem - domain: example.com - auth: - basic: - user: alice - password: secret - bearer_token: - api_key: - api_key_header: X-API-Key -``` - -Settings from the file are applied AFTER the explicit WithBasicAuth / WithBearerToken / WithAPIKey / WithTLS / WithDomain options, so config-file values take precedence (matching Python's documented load order). If the file cannot be read or parsed, NewService logs a warning and keeps running with the previously-set values; this matches Python's "best-effort" load behaviour and avoids crashing services whose config is missing. - -#### Signature - -```go -func WithConfigFile(path string) ServiceOption -``` - -#### Parameters - - - -#### Returns - -`ServiceOption` - -#### Examples - - - - ```go - security: - ssl_cert_path: /path/to/cert.pem - ssl_key_path: /path/to/key.pem - domain: example.com - auth: - basic: - user: alice - password: secret - bearer_token: - api_key: - api_key_header: X-API-Key - ``` - - - - ```go - security: - ssl_cert_path: /path/to/cert.pem - ssl_key_path: /path/to/key.pem - domain: example.com - auth: - basic: - user: alice - password: secret - bearer_token: - api_key: - api_key_header: X-API-Key - ``` - - - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 267. - -*** - -### WithDomain - -WithDomain sets the domain name used in URL generation when TLS is enabled. Mirrors Python's SecurityConfig.domain / SWML\_DOMAIN env var. - -#### Signature - -```go -func WithDomain(domain string) ServiceOption -``` - -#### Parameters - - - -#### Returns - -`ServiceOption` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 232. - -*** - -### WithHost - -WithHost sets the HTTP server bind host. - -#### Signature - -```go -func WithHost(host string) ServiceOption -``` - -#### Parameters - - - -#### Returns - -`ServiceOption` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 151. - -*** - -### WithName - -WithName sets the service name. - -#### Signature - -```go -func WithName(name string) ServiceOption -``` - -#### Parameters - - - -#### Returns - -`ServiceOption` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 141. - -*** - -### WithPort - -WithPort sets the HTTP server port. - -#### Signature - -```go -func WithPort(port int) ServiceOption -``` - -#### Parameters - - - -#### Returns - -`ServiceOption` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 156. - -*** - -### WithRoute - -WithRoute sets the HTTP route path. - -#### Signature - -```go -func WithRoute(route string) ServiceOption -``` - -#### Parameters - - - -#### Returns - -`ServiceOption` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 146. - -*** - -### WithSchemaPath - -WithSchemaPath overrides the schema file path used for verb validation. By default the embedded schema.json is used. Pass a custom path when testing or when deploying a modified schema alongside your binary. Mirrors Python's schema\_path constructor parameter. - -#### Signature - -```go -func WithSchemaPath(path string) ServiceOption -``` - -#### Parameters - - - -#### Returns - -`ServiceOption` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 240. - -*** - -### WithSchemaValidation - -WithSchemaValidation enables or disables SWML schema validation. Defaults to true (validation on). Set to false, or export SWML\_SKIP\_SCHEMA\_VALIDATION=1, to bypass schema checks. Mirrors Python's schema\_validation constructor parameter. - -#### Signature - -```go -func WithSchemaValidation(enabled bool) ServiceOption -``` - -#### Parameters - - - -#### Returns - -`ServiceOption` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 280. - -*** - -### WithSecurityConfig - -WithSecurityConfig applies a SecurityConfig bundle, setting Basic Auth, Bearer token, and API key configuration in one call. This is the Go equivalent of Python's AuthHandler(security\_config=...) pattern: it maps each SecurityConfig field to the corresponding WithXxx option. - -#### Signature - -```go -func WithSecurityConfig(cfg SecurityConfig) ServiceOption -``` - -#### Parameters - - - -#### Returns - -`ServiceOption` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 198. - -*** - -### WithTLS - -WithTLS configures TLS for the service. When set, Serve() calls ListenAndServeTLS instead of ListenAndServe. Mirrors Python's ssl\_cert / ssl\_key serve() parameters and ssl\_enabled property. - -#### Signature - -```go -func WithTLS(certFile string, keyFile string) ServiceOption -``` - -#### Parameters - - - - - -#### Returns - -`ServiceOption` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 223. - -## Type Aliases - -### RoutingCallback - -RoutingCallback is a function called on incoming requests to customize responses. It receives the request and request body, and returns an optional SWML JSON override. If it returns nil, the default document is used. - -#### Signature - -```go -type RoutingCallback alias -``` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 37. - -*** - -### ServiceOption - -ServiceOption is a functional option for configuring a Service. - -#### Signature - -```go -type ServiceOption alias -``` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 138. - -*** - -### ToolHandler - -ToolHandler is the function signature for a registered SWAIG tool. Returns a result that will be JSON-encoded as the SWAIG response. - -#### Signature - -```go -type ToolHandler alias -``` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 23. - -*** - -### Verb - -Verb represents a single SWML verb (instruction) as a key-value pair. Example: \{"play": \{"url": "https://example.com/audio.mp3"\}\} - -#### Signature - -```go -type Verb alias -``` - -#### Source - -[`pkg/swml/document.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/document.go) - -Line 23. - -## Interfaces - -### VerbHandler - -VerbHandler defines the contract for specialized SWML verb handlers. - -Implementations provide verb-specific validation and configuration-building logic for complex SWML verbs that cannot be handled generically. This is the Go equivalent of the Python SWMLVerbHandler abstract base class. - -#### Signature - -```go -type VerbHandler interface { GetVerbName; ValidateConfig; BuildConfig } -``` - -#### Methods - -##### BuildConfig - -BuildConfig builds a configuration map for this verb from the provided - -parameters. - -params contains keyword arguments specific to this verb, mirroring the -\*\*kwargs pattern from Python. It returns the constructed configuration -map, or an error if the provided parameters are insufficient or -contradictory. - -###### Signature - -```go -BuildConfig(params map[string]any) (map[string]any, error) -``` - -###### Source - -[`pkg/swml/verb_handler.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/verb_handler.go) - -Line 38. - -*** - -##### GetVerbName - -GetVerbName returns the name of the SWML verb this handler handles. - -The returned name must match the verb name used in SWML documents -(e.g., "ai", "play", "record"). - -###### Signature - -```go -GetVerbName() string -``` - -###### Source - -[`pkg/swml/verb_handler.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/verb_handler.go) - -Line 20. - -*** - -##### ValidateConfig - -ValidateConfig validates the configuration map for this verb. - -config is the configuration dictionary for this verb. It returns -(isValid, errorMessages): isValid is true when the config passes all -validation checks, and errorMessages contains human-readable descriptions -of any validation failures. When isValid is true, errorMessages will be -empty. - -###### Signature - -```go -ValidateConfig(config map[string]any) (bool, []string) -``` - -###### Source - -[`pkg/swml/verb_handler.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/verb_handler.go) - -Line 29. - -#### Source - -[`pkg/swml/verb_handler.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/verb_handler.go) - -Line 15. - -## Enums - -### ExecutionMode - -ExecutionMode identifies the runtime environment the service is executing in. The value is used to adjust URL construction, request parsing, and auth handling for platforms that do not provide a traditional TCP listener. - -#### Signature - -```go -type ExecutionMode alias -``` - -#### Source - -[`pkg/swml/execution_mode.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/execution_mode.go) - -Line 8. - -## Source - -[`pkg/swml/ai_verb_handler.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/ai_verb_handler.go) diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/schema-utils/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/schema-utils/index.mdx deleted file mode 100644 index f53884abfe..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/schema-utils/index.mdx +++ /dev/null @@ -1,289 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/schema-utils" -title: "SchemaUtils" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/swml.SchemaUtils" - parent: "github.com/signalwire/signalwire-go/pkg/swml" - module: "github.com.signalwire.signalwire-go.pkg.swml" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema_utils.go" ---- -# `SchemaUtils` - -SchemaUtils is the Go port of signalwire.utils.schema\_utils.SchemaUtils. - -Construction rules: - -- schemaPath empty + SWML\_SKIP\_SCHEMA\_VALIDATION unset → load embedded. -- schemaPath set → load from file. -- schemaValidation=false OR SWML\_SKIP\_SCHEMA\_VALIDATION=1 → no full validator (lightweight required-property check still runs). - -## Signature - -```go -type SchemaUtils struct -``` - -## Methods - -### FullValidationAvailable - -FullValidationAvailable reports whether the full JSON Schema validator is wired up. Mirrors Python's full\_validation\_available. - -#### Signature - -```go -func (*SchemaUtils) FullValidationAvailable() bool -``` - -#### Returns - -`bool` - -#### Source - -[`pkg/swml/schema_utils.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema_utils.go) - -Line 199. - -*** - -### GenerateMethodBody - -GenerateMethodBody renders a Python-style method body for a verb. Mirrors Python's “generate\_method\_body(verb\_name)“. - -#### Signature - -```go -func (*SchemaUtils) GenerateMethodBody(verbName string) string -``` - -#### Parameters - - - -#### Returns - -`string` - -#### Source - -[`pkg/swml/schema_utils.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema_utils.go) - -Line 358. - -*** - -### GenerateMethodSignature - -GenerateMethodSignature renders a Python-style method signature for a verb — used by code-gen tooling. Mirrors Python's “generate\_method\_signature(verb\_name)“. - -#### Signature - -```go -func (*SchemaUtils) GenerateMethodSignature(verbName string) string -``` - -#### Parameters - - - -#### Returns - -`string` - -#### Source - -[`pkg/swml/schema_utils.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema_utils.go) - -Line 317. - -*** - -### GetAllVerbNames - -GetAllVerbNames returns the sorted list of all known verb names. Mirrors Python's “get\_all\_verb\_names()“. - -#### Signature - -```go -func (*SchemaUtils) GetAllVerbNames() []string -``` - -#### Returns - -`[]string` - -#### Source - -[`pkg/swml/schema_utils.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema_utils.go) - -Line 205. - -*** - -### GetVerbParameters - -GetVerbParameters returns the parameter-definition block used for codegen — verb\_props\["properties"]. Mirrors Python's “get\_verb\_parameters(verb\_name)“. - -#### Signature - -```go -func (*SchemaUtils) GetVerbParameters(verbName string) map[string]any -``` - -#### Parameters - - - -#### Returns - -`map[string]any` - -#### Source - -[`pkg/swml/schema_utils.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema_utils.go) - -Line 253. - -*** - -### GetVerbProperties - -GetVerbProperties returns the inner “properties\[verb\_name]“ block for a verb, or an empty map when the verb is unknown. Mirrors Python's “get\_verb\_properties(verb\_name)“. - -#### Signature - -```go -func (*SchemaUtils) GetVerbProperties(verbName string) map[string]any -``` - -#### Parameters - - - -#### Returns - -`map[string]any` - -#### Source - -[`pkg/swml/schema_utils.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema_utils.go) - -Line 217. - -*** - -### GetVerbRequiredProperties - -GetVerbRequiredProperties returns the “required“ list for a verb. Mirrors Python's “get\_verb\_required\_properties(verb\_name)“. - -#### Signature - -```go -func (*SchemaUtils) GetVerbRequiredProperties(verbName string) []string -``` - -#### Parameters - - - -#### Returns - -`[]string` - -#### Source - -[`pkg/swml/schema_utils.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema_utils.go) - -Line 235. - -*** - -### LoadSchema - -LoadSchema reads and parses the JSON Schema. Mirrors Python's “load\_schema()“. - -#### Signature - -```go -func (*SchemaUtils) LoadSchema() map[string]any -``` - -#### Returns - -`map[string]any` - -#### Source - -[`pkg/swml/schema_utils.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema_utils.go) - -Line 113. - -*** - -### ValidateDocument - -ValidateDocument validates a complete SWML document against the schema. Mirrors Python's “validate\_document(document)“. - -When the full validator is unavailable Python returns “(False, \["Schema validator not initialized"])“; the Go port matches that contract bit-for-bit. - -#### Signature - -```go -func (*SchemaUtils) ValidateDocument(document map[string]any) ValidationResult -``` - -#### Parameters - - - -#### Returns - -`ValidationResult` - -#### Source - -[`pkg/swml/schema_utils.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema_utils.go) - -Line 306. - -*** - -### ValidateVerb - -ValidateVerb validates a verb config against the schema. Mirrors Python's “validate\_verb(verb\_name, verb\_config)“. - -When validation is disabled returns Valid=true. When the verb name is unknown returns Valid=false with a single "Unknown verb" error. Otherwise runs the full validator if available, falling back to the lightweight required-property check. - -#### Signature - -```go -func (*SchemaUtils) ValidateVerb(verbName string, verbConfig map[string]any) ValidationResult -``` - -#### Parameters - - - - - -#### Returns - -`ValidationResult` - -#### Source - -[`pkg/swml/schema_utils.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema_utils.go) - -Line 269. - -## Source - -[`pkg/swml/schema_utils.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema_utils.go) - -Line 65. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/schema-validation-error/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/schema-validation-error/index.mdx deleted file mode 100644 index bb934605a4..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/schema-validation-error/index.mdx +++ /dev/null @@ -1,57 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/schema-validation-error" -title: "SchemaValidationError" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/swml.SchemaValidationError" - parent: "github.com/signalwire/signalwire-go/pkg/swml" - module: "github.com.signalwire.signalwire-go.pkg.swml" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema_utils.go" ---- -# `SchemaValidationError` - -SchemaValidationError is the canonical error type raised when SWML schema validation fails. Mirrors Python's SchemaValidationError. - -## Signature - -```go -type SchemaValidationError struct -``` - -## Properties - - - - - -## Methods - -### Error - -Error renders the validation failure as a single string. - -#### Signature - -```go -func (*SchemaValidationError) Error() string -``` - -#### Returns - -`string` - -#### Source - -[`pkg/swml/schema_utils.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema_utils.go) - -Line 41. - -## Source - -[`pkg/swml/schema_utils.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema_utils.go) - -Line 29. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/schema/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/schema/index.mdx deleted file mode 100644 index e57b02963e..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/schema/index.mdx +++ /dev/null @@ -1,125 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/schema" -title: "Schema" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/swml.Schema" - parent: "github.com/signalwire/signalwire-go/pkg/swml" - module: "github.com.signalwire.signalwire-go.pkg.swml" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema.go" ---- -# `Schema` - -Schema holds the parsed SWML schema and provides verb metadata. - -## Signature - -```go -type Schema struct -``` - -## Methods - -### GetAllVerbNames - -GetAllVerbNames returns all known verb names (the actual SWML names, not schema names). - -#### Signature - -```go -func (*Schema) GetAllVerbNames() []string -``` - -#### Returns - -`[]string` - -#### Source - -[`pkg/swml/schema.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema.go) - -Line 136. - -*** - -### GetVerb - -GetVerb returns metadata for a verb by its actual name (e.g., "sip\_refer"). - -#### Signature - -```go -func (*Schema) GetVerb(name string) (*VerbInfo, bool) -``` - -#### Parameters - - - -#### Returns - -`(*VerbInfo, bool)` - -#### Source - -[`pkg/swml/schema.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema.go) - -Line 128. - -*** - -### IsValidVerb - -IsValidVerb returns whether a name is a recognized SWML verb. - -#### Signature - -```go -func (*Schema) IsValidVerb(name string) bool -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`pkg/swml/schema.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema.go) - -Line 147. - -*** - -### VerbCount - -VerbCount returns the number of verbs in the schema. - -#### Signature - -```go -func (*Schema) VerbCount() int -``` - -#### Returns - -`int` - -#### Source - -[`pkg/swml/schema.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema.go) - -Line 155. - -## Source - -[`pkg/swml/schema.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema.go) - -Line 29. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/security-config/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/security-config/index.mdx deleted file mode 100644 index 57dd7f446c..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/security-config/index.mdx +++ /dev/null @@ -1,52 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/security-config" -title: "SecurityConfig" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/swml.SecurityConfig" - parent: "github.com/signalwire/signalwire-go/pkg/swml" - module: "github.com.signalwire.signalwire-go.pkg.swml" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go" ---- -# `SecurityConfig` - -SecurityConfig bundles configuration for all supported authentication methods: HTTP Basic Auth, Bearer token, and API key. Pass it to WithSecurityConfig to configure multiple auth methods in one call. - -Fields default to the zero value (disabled). Set only the fields you need. - -- BasicAuthUser / BasicAuthPassword — HTTP Basic Auth credentials. -- BearerToken — Expected value of the "Authorization: Bearer \" header. -- APIKey — Expected API key value. -- APIKeyHeader — Header name to read the API key from (default "X-API-Key"). - -Mirrors Python's SecurityConfig dataclass. - -## Signature - -```go -type SecurityConfig struct -``` - -## Properties - - - - - defaults to "X-API-Key" when APIKey is set - - - - - - - - -## Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 53. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/service/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/service/index.mdx deleted file mode 100644 index 44def7441e..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/service/index.mdx +++ /dev/null @@ -1,2010 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/service" -title: "Service" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/swml.Service" - parent: "github.com/signalwire/signalwire-go/pkg/swml" - module: "github.com.signalwire.signalwire-go.pkg.swml" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go" ---- -# `Service` - -Service is the base SWML service that manages documents, HTTP endpoints, and auth. It provides auto-vivified verb methods driven by the SWML schema. - -## Signature - -```go -type Service struct -``` - -## Properties - - - Domain for TLS certificates and URL generation (SWML\_DOMAIN env var) - - - - - - - - - - - - -## Methods - -### AddSection - -AddSection adds a new named section to the SWML document. Returns false if the section already exists. Delegates to Document.AddSection. Mirrors Python's add\_section method which was only on the Document in Go but is on SWMLService in Python. - -#### Signature - -```go -func (*Service) AddSection(name string) bool -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 565. - -*** - -### AI - -AI adds the ai verb. AgentBase overrides this with its own AI rendering. promptText and promptPOM are mutually exclusive; providing both is an error. promptText sets a plain-text prompt; promptPOM sets a structured POM prompt. postPrompt and postPromptURL configure post-prompt behavior (optional). swaig supplies SWAIG configuration (optional). extra is a map of additional AI parameters merged into the verb config (optional). Mirrors Python SWMLBuilder.ai(prompt\_text, prompt\_pom, post\_prompt, post\_prompt\_url, swaig, \*\*kwargs). - -#### Signature - -```go -func (*Service) AI( - promptText *string, - promptPOM []map[string]any, - postPrompt *string, - postPromptURL *string, - swaig map[string]any, - extra map[string]any -) error -``` - -#### Parameters - - - - - - - - - - - - - -#### Returns - -`error` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 762. - -*** - -### AmazonBedrock - -AmazonBedrock adds the amazon\_bedrock verb. - -#### Signature - -```go -func (*Service) AmazonBedrock(config map[string]any) error -``` - -#### Parameters - - - -#### Returns - -`error` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 792. - -*** - -### Answer - -Answer adds the answer verb to the document. maxDuration sets the maximum call duration in seconds (optional). codecs sets a comma-separated list of allowed codecs (optional). Mirrors Python SWMLBuilder.answer(max\_duration, codecs). - -#### Signature - -```go -func (*Service) Answer(maxDuration *int, codecs *string) error -``` - -#### Parameters - - - - - -#### Returns - -`error` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 637. - -*** - -### AsRouter - -AsRouter returns an http.Handler that serves this service's endpoints. Use this to embed the service in a custom HTTP mux or router. Mirrors Python's as\_router() -> APIRouter method on SWMLService. - -#### Signature - -```go -func (*Service) AsRouter() http.Handler -``` - -#### Returns - -`http.Handler` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 572. - -*** - -### BuildSwaigListToolsPayload - -BuildSwaigListToolsPayload returns the JSON payload that --example mode expects between the sentinel markers: \{"tools": \[\]\}. Each element echoes whatever the in-memory ToolDefinition stores (name, description, parameters); we deliberately do not normalize so the CLI can be permissive about field names. - -Exposed for tests so the env-var-driven exit branch in Serve() can be asserted without forking a process. - -#### Signature - -```go -func (*Service) BuildSwaigListToolsPayload() ([]byte, error) -``` - -#### Returns - -`([]byte, error)` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 1117. - -*** - -### Cond - -Cond adds the cond verb (conditional logic). - -#### Signature - -```go -func (*Service) Cond(config map[string]any) error -``` - -#### Parameters - - - -#### Returns - -`error` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 797. - -*** - -### Connect - -Connect adds the connect verb. - -#### Signature - -```go -func (*Service) Connect(config map[string]any) error -``` - -#### Parameters - - - -#### Returns - -`error` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 726. - -*** - -### DefineTool - -DefineTool registers a SWAIG function the AI can call. Tool descriptions and parameter descriptions are LLM-facing prompt engineering — see PORTING\_GUIDE for guidance. - -#### Signature - -```go -func (*Service) DefineTool(td *ToolDefinition) *Service -``` - -#### Parameters - - - -#### Returns - -`*Service` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 1261. - -*** - -### Denoise - -Denoise adds the denoise verb. - -#### Signature - -```go -func (*Service) Denoise(config map[string]any) error -``` - -#### Parameters - - - -#### Returns - -`error` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 852. - -*** - -### DetectMachine - -DetectMachine adds the detect\_machine verb. - -#### Signature - -```go -func (*Service) DetectMachine(config map[string]any) error -``` - -#### Parameters - - - -#### Returns - -`error` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 892. - -*** - -### EnterQueue - -EnterQueue adds the enter\_queue verb. - -#### Signature - -```go -func (*Service) EnterQueue(config map[string]any) error -``` - -#### Parameters - - - -#### Returns - -`error` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 877. - -*** - -### Execute - -Execute adds the execute verb (run another SWML section). - -#### Signature - -```go -func (*Service) Execute(config map[string]any) error -``` - -#### Parameters - - - -#### Returns - -`error` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 807. - -*** - -### ExecuteVerb - -ExecuteVerb adds any SWML verb to the document, validated against the schema and any registered VerbHandler. This is the core method that all verb convenience methods delegate to. For most verbs, config should be a map\[string]any of verb parameters. For "sleep", config should be an integer (milliseconds). - -#### Signature - -```go -func (*Service) ExecuteVerb(verbName string, config any) error -``` - -#### Parameters - - - - - -#### Returns - -`error` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 592. - -*** - -### ExecuteVerbToSection - -ExecuteVerbToSection adds a SWML verb to a named section. - -#### Signature - -```go -func (*Service) ExecuteVerbToSection(section string, verbName string, config any) error -``` - -#### Parameters - - - - - - - -#### Returns - -`error` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 611. - -*** - -### FullValidationEnabled - -FullValidationEnabled reports whether schema validation is active. Returns true when a schema was successfully loaded and schemaValidation is on. Mirrors Python's full\_validation\_enabled property. - -#### Signature - -```go -func (*Service) FullValidationEnabled() bool -``` - -#### Returns - -`bool` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 555. - -*** - -### GetAuthInfo - -GetAuthInfo returns a map describing every configured authentication method. The map mirrors the Python AuthHandler.get\_auth\_info() return value: - -- "basic" → \{"enabled": true, "username": "\"\} -- "bearer" → \{"enabled": true, "hint": "Use Authorization: Bearer \"\} -- "api\_key" → \{"enabled": true, "header": "\", "hint": "Use \: \"\} - -Only methods that are actively configured appear in the map. Basic auth is always present because the service always has a username/password (either explicit or auto-generated). Mirrors Python AuthHandler.get\_auth\_info() -> Dict\[str, Any]. - -#### Signature - -```go -func (*Service) GetAuthInfo() map[string]any -``` - -#### Returns - -`map[string]any` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 513. - -*** - -### GetBasicAuthCredentials - -GetBasicAuthCredentials returns the (username, password) for basic auth. - -#### Signature - -```go -func (*Service) GetBasicAuthCredentials() (string, string) -``` - -#### Returns - -`(string, string)` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 428. - -*** - -### GetBasicAuthCredentialsWithSource - -GetBasicAuthCredentialsWithSource returns (username, password, source) where source is one of "environment", "explicit", or "auto-generated". Mirrors Python's get\_basic\_auth\_credentials(include\_source=True) three-tuple return. - -#### Signature - -```go -func (*Service) GetBasicAuthCredentialsWithSource() (string, string, string) -``` - -#### Returns - -`(string, string, string)` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 435. - -*** - -### GetDocument - -GetDocument returns the current SWML document. - -#### Signature - -```go -func (*Service) GetDocument() *Document -``` - -#### Returns - -`*Document` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 407. - -*** - -### GetFullURL - -GetFullURL returns the full URL for this service including auth. - -Base URL resolution order: - -1. SWML\_PROXY\_URL\_BASE (explicit proxy override — always wins) -2. Platform-specific base derived from GetExecutionMode() when running inside a serverless runtime (currently AWS Lambda) -3. Local `http://host:port` base (default server mode) - -In every branch the agent's Route is appended to the base. Callers that need to serve SWAIG / post\_prompt endpoints then append further path segments onto the result. This invariant is load-bearing: a Lambda-hosted agent at route "/my-agent" must emit SWAIG URLs like "https://xxx.lambda-url.us-east-1.on.aws/my-agent/swaig" — NOT "https://xxx.lambda-url.us-east-1.on.aws/swaig". See buildWebhookURL in pkg/agent/agent.go for the defensive HasSuffix re-check that enforces the same property downstream. - -#### Signature - -```go -func (*Service) GetFullURL(includeAuth bool) string -``` - -#### Parameters - - - -#### Returns - -`string` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 929. - -*** - -### GetVerbHandler - -GetVerbHandler returns the registered handler for verbName, or nil if no handler has been registered for that verb. This is the Go equivalent of Python's VerbHandlerRegistry.get\_handler. - -#### Signature - -```go -func (*Service) GetVerbHandler(verbName string) VerbHandler -``` - -#### Parameters - - - -#### Returns - -`VerbHandler` - -#### Source - -[`pkg/swml/verb_handler.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/verb_handler.go) - -Line 57. - -*** - -### Goto - -Goto adds the goto verb. - -#### Signature - -```go -func (*Service) Goto(config map[string]any) error -``` - -#### Parameters - - - -#### Returns - -`error` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 817. - -*** - -### Hangup - -Hangup adds the hangup verb. reason is an optional reason string for the hangup. Mirrors Python SWMLBuilder.hangup(reason). - -#### Signature - -```go -func (*Service) Hangup(reason *string) error -``` - -#### Parameters - - - -#### Returns - -`error` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 651. - -*** - -### HasTool - -HasTool reports whether a tool with the given name has been registered. - -#### Signature - -```go -func (*Service) HasTool(name string) bool -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 1315. - -*** - -### HasVerbHandler - -HasVerbHandler reports whether a custom handler is registered for verbName. This is the Go equivalent of Python's VerbHandlerRegistry.has\_handler. - -#### Signature - -```go -func (*Service) HasVerbHandler(verbName string) bool -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`pkg/swml/verb_handler.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/verb_handler.go) - -Line 65. - -*** - -### JoinConference - -JoinConference adds the join\_conference verb. - -#### Signature - -```go -func (*Service) JoinConference(config map[string]any) error -``` - -#### Parameters - - - -#### Returns - -`error` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 867. - -*** - -### JoinRoom - -JoinRoom adds the join\_room verb. - -#### Signature - -```go -func (*Service) JoinRoom(config map[string]any) error -``` - -#### Parameters - - - -#### Returns - -`error` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 862. - -*** - -### Label - -Label adds the label verb. - -#### Signature - -```go -func (*Service) Label(config map[string]any) error -``` - -#### Parameters - - - -#### Returns - -`error` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 822. - -*** - -### ListToolNames - -ListToolNames returns the registered tool names in insertion order. - -#### Signature - -```go -func (*Service) ListToolNames() []string -``` - -#### Returns - -`[]string` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 1323. - -*** - -### LiveTranscribe - -LiveTranscribe adds the live\_transcribe verb. - -#### Signature - -```go -func (*Service) LiveTranscribe(config map[string]any) error -``` - -#### Parameters - - - -#### Returns - -`error` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 897. - -*** - -### LiveTranslate - -LiveTranslate adds the live\_translate verb. - -#### Signature - -```go -func (*Service) LiveTranslate(config map[string]any) error -``` - -#### Parameters - - - -#### Returns - -`error` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 902. - -*** - -### ManualSetProxyUrl - -ManualSetProxyUrl overrides the proxy URL base used for URL generation. Call this at runtime to set or update the proxy URL (e.g. an ngrok URL). Mirrors Python's manual\_set\_proxy\_url(proxy\_url: str) on SWMLService. - -#### Signature - -```go -func (*Service) ManualSetProxyUrl(url string) -``` - -#### Parameters - - - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 579. - -*** - -### OnFunctionCall - -OnFunctionCall dispatches a function call to the registered handler. Default implementation: looks up the tool in the registry and invokes its handler. Subclasses (AgentBase) may override at the type level by providing their own method (Go method dispatch is static — to override in a way that is callable through Service, use the SwaigPreDispatch extension hook to substitute a target). - -#### Signature - -```go -func (*Service) OnFunctionCall(name string, args map[string]any, rawData map[string]any) any -``` - -#### Parameters - - - - - - - -#### Returns - -`any` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 1304. - -*** - -### OnRequest - -OnRequest generates the SWML response for an incoming request. It checks routing callbacks first, then returns the default document. - -The return value is a pointer to allow subclasses (AgentBase) to signal "no override" by returning nil — matching Python's Optional\[dict] return type for on\_request. Callers should treat a nil return as "use the default document unchanged". - -#### Signature - -```go -func (*Service) OnRequest(requestData map[string]any, callbackPath string) map[string]any -``` - -#### Parameters - - - - - -#### Returns - -`map[string]any` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 1021. - -*** - -### Pay - -Pay adds the pay verb. - -#### Signature - -```go -func (*Service) Pay(config map[string]any) error -``` - -#### Parameters - - - -#### Returns - -`error` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 887. - -*** - -### Play - -Play adds the play verb. Exactly one of url or urls must be provided; providing both is an error. volume sets the playback volume (-40 to 40, optional). sayVoice, sayLanguage, sayGender configure text-to-speech (optional). autoAnswer controls whether to auto-answer the call (optional). Mirrors Python SWMLBuilder.play(url, urls, volume, say\_voice, say\_language, say\_gender, auto\_answer). - -#### Signature - -```go -func (*Service) Play( - url *string, - urls []string, - volume *float64, - sayVoice *string, - sayLanguage *string, - sayGender *string, - autoAnswer *bool -) error -``` - -#### Parameters - - - - - - - - - - - - - - - -#### Returns - -`error` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 665. - -*** - -### Prompt - -Prompt adds the prompt verb. - -#### Signature - -```go -func (*Service) Prompt(config map[string]any) error -``` - -#### Parameters - - - -#### Returns - -`error` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 872. - -*** - -### ReceiveFax - -ReceiveFax adds the receive\_fax verb. - -#### Signature - -```go -func (*Service) ReceiveFax(config map[string]any) error -``` - -#### Parameters - - - -#### Returns - -`error` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 746. - -*** - -### Record - -Record adds the record verb. - -#### Signature - -```go -func (*Service) Record(config map[string]any) error -``` - -#### Parameters - - - -#### Returns - -`error` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 706. - -*** - -### RecordCall - -RecordCall adds the record\_call verb. - -#### Signature - -```go -func (*Service) RecordCall(config map[string]any) error -``` - -#### Parameters - - - -#### Returns - -`error` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 711. - -*** - -### RegisterAdditionalRoutes - -RegisterAdditionalRoutes is an extension hook for subclasses (e.g. AgentBase) to mount additional routes (/post\_prompt, /mcp). Default no-op. Composing types call this from their own buildMux equivalent. - -#### Signature - -```go -func (*Service) RegisterAdditionalRoutes(mux *http.ServeMux) -``` - -#### Parameters - - - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 1252. - -*** - -### RegisterRoutingCallback - -RegisterRoutingCallback registers a callback for a specific path. - -#### Signature - -```go -func (*Service) RegisterRoutingCallback(path string, cb RoutingCallback) -``` - -#### Parameters - - - - - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 986. - -*** - -### RegisterSwaigFunction - -RegisterSwaigFunction registers a raw SWAIG function definition (e.g. DataMap tools that have no local handler). The map must contain a "function" key giving the tool name. - -#### Signature - -```go -func (*Service) RegisterSwaigFunction(funcDef map[string]any) *Service -``` - -#### Parameters - - - -#### Returns - -`*Service` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 1277. - -*** - -### RegisterVerbHandler - -RegisterVerbHandler registers a custom handler for a SWML verb, keyed by the name returned by h.GetVerbName(). A subsequent call with the same verb name replaces the previous handler. This is the Go equivalent of Python's VerbHandlerRegistry.register\_handler. - -#### Signature - -```go -func (*Service) RegisterVerbHandler(h VerbHandler) -``` - -#### Parameters - - - -#### Source - -[`pkg/swml/verb_handler.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/verb_handler.go) - -Line 45. - -*** - -### Render - -Render returns the SWML document as a JSON string. - -#### Signature - -```go -func (*Service) Render() (string, error) -``` - -#### Returns - -`(string, error)` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 1039. - -*** - -### RenderMainSwml - -RenderMainSwml is an extension hook invoked for the main route and for GET /swaig. Default returns the currently-built document. AgentBase overrides to render with prompts + dynamic config. - -#### Signature - -```go -func (*Service) RenderMainSwml(r *http.Request) map[string]any -``` - -#### Parameters - - - -#### Returns - -`map[string]any` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 1343. - -*** - -### RenderPretty - -RenderPretty returns the SWML document as an indented JSON string. - -#### Signature - -```go -func (*Service) RenderPretty() (string, error) -``` - -#### Returns - -`(string, error)` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 1044. - -*** - -### Request - -Request adds the request verb (HTTP request). - -#### Signature - -```go -func (*Service) Request(config map[string]any) error -``` - -#### Parameters - - - -#### Returns - -`error` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 882. - -*** - -### ResetDocument - -ResetDocument resets the SWML document to empty. - -#### Signature - -```go -func (*Service) ResetDocument() -``` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 414. - -*** - -### Return - -Return adds the return verb. - -#### Signature - -```go -func (*Service) Return(config map[string]any) error -``` - -#### Parameters - - - -#### Returns - -`error` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 812. - -*** - -### RoutingCallbackPaths - -RoutingCallbackPaths returns the paths that have routing callbacks registered. Callers use this to register corresponding HTTP endpoints (mirrors Python web\_mixin.py line 428 which iterates self.\_routing\_callbacks to register callback endpoints on the router). Paths are returned in sorted order for deterministic HTTP registration. - -#### Signature - -```go -func (*Service) RoutingCallbackPaths() []string -``` - -#### Returns - -`[]string` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 997. - -*** - -### Say - -Say adds a play verb with a "say:" prefix for text-to-speech. voice, language, and gender configure the TTS voice (optional). volume sets the playback volume (-40 to 40, optional). Mirrors Python SWMLBuilder.say(text, voice, language, gender, volume). - -#### Signature - -```go -func (*Service) Say( - text string, - voice *string, - language *string, - gender *string, - volume *float64 -) error -``` - -#### Parameters - - - - - - - - - - - -#### Returns - -`error` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 700. - -*** - -### SchemaUtils - -SchemaUtils returns the SchemaUtils helper bound to this Service. Mirrors Python's “self.schema\_utils“ instance attribute exposed publicly on signalwire.core.swml\_service.SWMLService. - -#### Signature - -```go -func (*Service) SchemaUtils() *SchemaUtils -``` - -#### Returns - -`*SchemaUtils` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 423. - -*** - -### SendDigits - -SendDigits adds the send\_digits verb. - -#### Signature - -```go -func (*Service) SendDigits(config map[string]any) error -``` - -#### Parameters - - - -#### Returns - -`error` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 731. - -*** - -### SendFax - -SendFax adds the send\_fax verb. - -#### Signature - -```go -func (*Service) SendFax(config map[string]any) error -``` - -#### Parameters - - - -#### Returns - -`error` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 741. - -*** - -### SendSMS - -SendSMS adds the send\_sms verb. - -#### Signature - -```go -func (*Service) SendSMS(config map[string]any) error -``` - -#### Parameters - - - -#### Returns - -`error` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 736. - -*** - -### Serve - -Serve starts the HTTP server. This is a blocking call. - -When TLS is configured via WithTLS (or SWML\_SSL\_CERT\_PATH / SWML\_SSL\_KEY\_PATH env vars), ListenAndServeTLS is called automatically. Mirrors Python's serve() ssl\_cert / ssl\_key / ssl\_enabled parameter support. - -If SWAIG\_LIST\_TOOLS is set in the environment, Serve() does NOT bind a port; instead it prints the registered tool registry sandwiched by **SWAIG\_TOOLS\_BEGIN** / **SWAIG\_TOOLS\_END** sentinels to stdout and exits 0. This is how `swaig-test --example NAME` introspects a SWMLService-only binary without HTTP-walking rendered SWML. - -#### Signature - -```go -func (*Service) Serve() error -``` - -#### Returns - -`error` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 1170. - -*** - -### Set - -Set adds the set verb (set variables). - -#### Signature - -```go -func (*Service) Set(config map[string]any) error -``` - -#### Parameters - - - -#### Returns - -`error` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 827. - -*** - -### SIPRefer - -SIPRefer adds the sip\_refer verb. - -#### Signature - -```go -func (*Service) SIPRefer(config map[string]any) error -``` - -#### Parameters - - - -#### Returns - -`error` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 751. - -*** - -### Sleep - -Sleep adds the sleep verb. Duration is in milliseconds. - -#### Signature - -```go -func (*Service) Sleep(duration int) error -``` - -#### Parameters - - - -#### Returns - -`error` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 721. - -*** - -### Stop - -Stop gracefully stops the HTTP server. - -#### Signature - -```go -func (*Service) Stop() error -``` - -#### Returns - -`error` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 1207. - -*** - -### StopDenoise - -StopDenoise adds the stop\_denoise verb. - -#### Signature - -```go -func (*Service) StopDenoise(config map[string]any) error -``` - -#### Parameters - - - -#### Returns - -`error` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 857. - -*** - -### StopRecordCall - -StopRecordCall adds the stop\_record\_call verb. - -#### Signature - -```go -func (*Service) StopRecordCall(config map[string]any) error -``` - -#### Parameters - - - -#### Returns - -`error` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 716. - -*** - -### StopTap - -StopTap adds the stop\_tap verb. - -#### Signature - -```go -func (*Service) StopTap(config map[string]any) error -``` - -#### Parameters - - - -#### Returns - -`error` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 847. - -*** - -### SwaigPreDispatch - -SwaigPreDispatch is an extension hook invoked between argument parsing and function dispatch on POST /swaig. It returns a target Service to dispatch on (defaults to s) and an optional short-circuit response. Subclasses (AgentBase) override to add session-token validation or ephemeral dynamic-config copies. - -#### Signature - -```go -func (*Service) SwaigPreDispatch(requestData map[string]any, funcName string) (target *Service, shortCircuit map[string]any) -``` - -#### Parameters - - - - - -#### Returns - -`(*Service, map[string]any)` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 1336. - -*** - -### Switch - -Switch adds the switch verb. - -#### Signature - -```go -func (*Service) Switch(config map[string]any) error -``` - -#### Parameters - - - -#### Returns - -`error` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 802. - -*** - -### Tap - -Tap adds the tap verb (media tapping). - -#### Signature - -```go -func (*Service) Tap(config map[string]any) error -``` - -#### Parameters - - - -#### Returns - -`error` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 842. - -*** - -### TLSEnabled - -TLSEnabled reports whether TLS is configured for this service. Mirrors Python's ssl\_enabled property on SWMLService. - -#### Signature - -```go -func (*Service) TLSEnabled() bool -``` - -#### Returns - -`bool` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 548. - -*** - -### Transfer - -Transfer adds the transfer verb. - -#### Signature - -```go -func (*Service) Transfer(config map[string]any) error -``` - -#### Parameters - - - -#### Returns - -`error` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 837. - -*** - -### Unset - -Unset adds the unset verb. - -#### Signature - -```go -func (*Service) Unset(config map[string]any) error -``` - -#### Parameters - - - -#### Returns - -`error` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 832. - -*** - -### UserEvent - -UserEvent adds the user\_event verb. - -#### Signature - -```go -func (*Service) UserEvent(config map[string]any) error -``` - -#### Parameters - - - -#### Returns - -`error` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 907. - -*** - -### VerifyAPIKey - -VerifyAPIKey performs a timing-safe comparison of the supplied key value against the service's configured API key. Returns false when no API key is configured (i.e. WithAPIKey was not called). - -Callers typically read the key from the header returned by APIKeyHeader(). Mirrors Python AuthHandler.verify\_api\_key(api\_key: str) -> bool. - -#### Signature - -```go -func (*Service) VerifyAPIKey(key string) bool -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 493. - -*** - -### VerifyBasicAuth - -VerifyBasicAuth performs a timing-safe comparison of the supplied credentials against the service's configured basic auth username and password. Returns true when both username and password match. - -This exposes the same check that withSecurity applies inside the HTTP middleware, making auth testable in isolation without an HTTP round-trip. Mirrors Python AuthHandler.verify\_basic\_auth(credentials) -> bool using secrets.compare\_digest (equivalent: crypto/subtle.ConstantTimeCompare). - -#### Signature - -```go -func (*Service) VerifyBasicAuth(username string, password string) bool -``` - -#### Parameters - - - - - -#### Returns - -`bool` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 462. - -*** - -### VerifyBearerToken - -VerifyBearerToken performs a timing-safe comparison of the supplied token against the service's configured bearer token. Returns false when no bearer token is configured (i.e. WithBearerToken was not called). - -Callers typically extract the token from the "Authorization: Bearer \" header before calling this method. Mirrors Python AuthHandler.verify\_bearer\_token(credentials) -> bool. - -#### Signature - -```go -func (*Service) VerifyBearerToken(token string) bool -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 478. - -## Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 63. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/tool-definition/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/tool-definition/index.mdx deleted file mode 100644 index 6dbbbc0413..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/tool-definition/index.mdx +++ /dev/null @@ -1,41 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/tool-definition" -title: "ToolDefinition" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/swml.ToolDefinition" - parent: "github.com/signalwire/signalwire-go/pkg/swml" - module: "github.com.signalwire.signalwire-go.pkg.swml" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go" ---- -# `ToolDefinition` - -ToolDefinition is a SWAIG tool registered on the Service. - -## Signature - -```go -type ToolDefinition struct -``` - -## Properties - - - - - - - - - - - -## Source - -[`pkg/swml/service.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/service.go) - -Line 26. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/validation-result/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/validation-result/index.mdx deleted file mode 100644 index 07c0d1a937..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/validation-result/index.mdx +++ /dev/null @@ -1,37 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/validation-result" -title: "ValidationResult" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/swml.ValidationResult" - parent: "github.com/signalwire/signalwire-go/pkg/swml" - module: "github.com.signalwire.signalwire-go.pkg.swml" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema_utils.go" ---- -# `ValidationResult` - -ValidationResult mirrors Python's “Tuple\[bool, List\[str]]“ return shape used by ValidateVerb / ValidateDocument. - -The cross-language type alias table maps this struct to the canonical “tuple\>“ so audits accept it as Python-shaped. - -## Signature - -```go -type ValidationResult struct -``` - -## Properties - - - - - -## Source - -[`pkg/swml/schema_utils.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema_utils.go) - -Line 53. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/verb-info/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/verb-info/index.mdx deleted file mode 100644 index 99b039be93..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/verb-info/index.mdx +++ /dev/null @@ -1,43 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml/verb-info" -title: "VerbInfo" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/swml.VerbInfo" - parent: "github.com/signalwire/signalwire-go/pkg/swml" - module: "github.com.signalwire.signalwire-go.pkg.swml" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema.go" ---- -# `VerbInfo` - -VerbInfo holds metadata about a SWML verb extracted from the schema. - -## Signature - -```go -type VerbInfo struct -``` - -## Properties - - - Definition is the raw schema definition for this verb - - - - Name is the actual SWML verb name (e.g., "sip\_refer", "ai", "play") - - - - SchemaName is the PascalCase name from the schema definition (e.g., "SIPRefer", "AI", "Play") - - -## Source - -[`pkg/swml/schema.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/swml/schema.go) - -Line 19. diff --git a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/util/util/index.mdx b/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/util/util/index.mdx deleted file mode 100644 index 0495755434..0000000000 --- a/fern/products/sdk-reference/go/github.com/signalwire/signalwire-go/pkg/util/util/index.mdx +++ /dev/null @@ -1,119 +0,0 @@ ---- -slug: "/reference/go/github.com/signalwire/signalwire-go/pkg/util/util" -title: "util" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "module" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/util" - module: "github.com.signalwire.signalwire-go.pkg.util" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/util/execution_mode.go" ---- -# `util` - -Package util provides cross-cutting helpers used across the Go SDK. - -validate\_url is the SSRF-prevention guard applied to user-supplied URLs before they are fetched. It must mirror the Python reference at signalwire.utils.url\_validator.validate\_url: - -- require http or https scheme -- require a hostname -- allow\_private bypass (param OR SWML\_ALLOW\_PRIVATE\_URLS env var) -- resolve hostname; reject any IP that lands in a blocked network - -The blocked-network list is identical across all SDK ports. - -## Signature - -```go -package util -``` - -## Functions - -### GetExecutionMode - -GetExecutionMode reports the SDK's deployment environment based on well-known environment variables. Returned values are: "cgi", "lambda", "google\_cloud\_function", "azure\_function", "server". - -#### Signature - -```go -func GetExecutionMode() string -``` - -#### Returns - -`string` - -#### Source - -[`pkg/util/execution_mode.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/util/execution_mode.go) - -Line 26. - -*** - -### IsServerlessMode - -IsServerlessMode reports whether the SDK is running in any serverless invocation environment (i.e. not "server"). - -#### Signature - -```go -func IsServerlessMode() bool -``` - -#### Returns - -`bool` - -#### Source - -[`pkg/util/execution_mode.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/util/execution_mode.go) - -Line 48. - -*** - -### ValidateURL - -ValidateURL reports whether the supplied URL is safe to fetch. - -Mirrors Python's validate\_url(url, allow\_private=False) -> bool. Returns false (without raising) for any of: - -- parse failure -- scheme not http/https -- missing hostname -- DNS resolution failure -- any resolved IP in a blocked network - -When allowPrivate is true, or the SWML\_ALLOW\_PRIVATE\_URLS env var is set to "1", "true" or "yes" (case-insensitive), the IP-blocklist check is skipped. Scheme + hostname checks still apply. - -This function is projected onto the Python free function name validate\_url via internal/surface/tables.go. - -#### Signature - -```go -func ValidateURL(url_ string, allowPrivate bool) bool -``` - -#### Parameters - - - - - -#### Returns - -`bool` - -#### Source - -[`pkg/util/url_validator.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/util/url_validator.go) - -Line 73. - -## Source - -[`pkg/util/execution_mode.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/util/execution_mode.go) diff --git a/fern/products/sdk-reference/go/index.mdx b/fern/products/sdk-reference/go/index.mdx index f3221ad465..bef6a49041 100644 --- a/fern/products/sdk-reference/go/index.mdx +++ b/fern/products/sdk-reference/go/index.mdx @@ -10,22 +10,8 @@ lustri: ## Modules -- [`agent`](/docs/sdk-reference/reference/go/github.com/signalwire/signalwire-go/pkg/agent/agent) -- [`builtin`](/docs/sdk-reference/reference/go/github.com/signalwire/signalwire-go/pkg/skills/builtin/builtin) -- [`contexts`](/docs/sdk-reference/reference/go/github.com/signalwire/signalwire-go/pkg/contexts/contexts) -- [`lambda`](/docs/sdk-reference/reference/go/github.com/signalwire/signalwire-go/pkg/lambda/lambda) -- [`livewire`](/docs/sdk-reference/reference/go/github.com/signalwire/signalwire-go/pkg/livewire/livewire) -- [`logging`](/docs/sdk-reference/reference/go/github.com/signalwire/signalwire-go/pkg/logging/logging) -- [`main`](/docs/sdk-reference/reference/go/github.com/signalwire/signalwire-go/cmd/swaig-test/main) -- [`namespaces`](/docs/sdk-reference/reference/go/github.com/signalwire/signalwire-go/pkg/rest/namespaces/namespaces) -- [`pom`](/docs/sdk-reference/reference/go/github.com/signalwire/signalwire-go/pkg/pom/pom) -- [`prefabs`](/docs/sdk-reference/reference/go/github.com/signalwire/signalwire-go/pkg/prefabs/prefabs) -- [`relay`](/docs/sdk-reference/reference/go/github.com/signalwire/signalwire-go/pkg/relay/relay) -- [`rest`](/docs/sdk-reference/reference/go/github.com/signalwire/signalwire-go/pkg/rest/rest) -- [`security`](/docs/sdk-reference/reference/go/github.com/signalwire/signalwire-go/pkg/security/security) -- [`server`](/docs/sdk-reference/reference/go/github.com/signalwire/signalwire-go/pkg/server/server) -- [`skills`](/docs/sdk-reference/reference/go/github.com/signalwire/signalwire-go/pkg/skills/skills) -- [`swaig`](/docs/sdk-reference/reference/go/github.com/signalwire/signalwire-go/pkg/swaig/swaig) -- [`swml`](/docs/sdk-reference/reference/go/github.com/signalwire/signalwire-go/pkg/swml/swml) -- [`util`](/docs/sdk-reference/reference/go/github.com/signalwire/signalwire-go/pkg/util/util) +- [`agents`](/docs/sdk-reference/reference/go/agents) +- [`core`](/docs/sdk-reference/reference/go/core) +- [`relay`](/docs/sdk-reference/reference/go/relay) +- [`rest`](/docs/sdk-reference/reference/go/rest) diff --git a/fern/products/sdk-reference/go/relay/index.mdx b/fern/products/sdk-reference/go/relay/index.mdx new file mode 100644 index 0000000000..9f459294e3 --- /dev/null +++ b/fern/products/sdk-reference/go/relay/index.mdx @@ -0,0 +1,3597 @@ +--- +slug: "/reference/go/relay" +title: "relay" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "module" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go" +--- +# `relay` + +Package relay implements real-time WebSocket call control over the SignalWire Blade protocol (JSON-RPC 2.0). It provides a RELAY client that manages WebSocket connections, authentication, and event routing for calling, messaging, and other real-time communication primitives. + +## Signature + +```go +package relay +``` + +## Constants + + + AgentString is the SDK identifier the connect frame announces to the RELAY server. Mirrors Python's AGENT\_STRING at relay/constants.py:5, translated to identify this language's port. Sent as `params.agent` on signalwire.connect. + + + + Call lifecycle states. These equal the bare-string CallState\* consts in constants.go (created \< ringing \< answered \< ending \< ended) — the typed kind is an alternative spelling, not a replacement. + + + + Call lifecycle states. These equal the bare-string CallState\* consts in constants.go (created \< ringing \< answered \< ending \< ended) — the typed kind is an alternative spelling, not a replacement. + + + + Call lifecycle states. These equal the bare-string CallState\* consts in constants.go (created \< ringing \< answered \< ending \< ended) — the typed kind is an alternative spelling, not a replacement. + + + + Call lifecycle states. These equal the bare-string CallState\* consts in constants.go (created \< ringing \< answered \< ending \< ended) — the typed kind is an alternative spelling, not a replacement. + + + + Call lifecycle states. These equal the bare-string CallState\* consts in constants.go (created \< ringing \< answered \< ending \< ended) — the typed kind is an alternative spelling, not a replacement. + + + + Call states represent the lifecycle of a call. + + + + Call states represent the lifecycle of a call. + + + + Call states represent the lifecycle of a call. + + + + Call states represent the lifecycle of a call. + + + + Call states represent the lifecycle of a call. + + + + Dial outcome states. "dialing" is a non-terminal progress state; "answered" and "failed" are the two terminal outcomes that resolve/reject the dial. + + + + Dial outcome states. "dialing" is a non-terminal progress state; "answered" and "failed" are the two terminal outcomes that resolve/reject the dial. + + + + Dial outcome states. "dialing" is a non-terminal progress state; "answered" and "failed" are the two terminal outcomes that resolve/reject the dial. + + + + Call directions. + + + + Call directions. + + + + Call end reasons indicate why a call ended. + + + + Call end reasons indicate why a call ended. + + + + Call end reasons indicate why a call ended. + + + + Call end reasons indicate why a call ended. + + + + Call end reasons indicate why a call ended. + + + + Call end reasons indicate why a call ended. + + + + Call end reasons indicate why a call ended. + + + + Call end reasons indicate why a call ended. + + + + Call end reasons indicate why a call ended. + + + + Package-level sentinel errors for the conditions the relay client returns. These are Go-idiomatic, errors.Is-able markers (a Go-port addition — the Python reference uses RelayError + bare exceptions and has no equivalent sentinel set). Every code path that produces one of these conditions wraps the sentinel with %w, so callers can branch with errors.Is rather than scraping error strings: if \_, err := c.Dial(devices); errors.Is(err, relay.ErrDialTimeout) \{ // retry / give up on the dial specifically \} They are documented in PORT\_ADDITIONS.md. + + + + Package-level sentinel errors for the conditions the relay client returns. These are Go-idiomatic, errors.Is-able markers (a Go-port addition — the Python reference uses RelayError + bare exceptions and has no equivalent sentinel set). Every code path that produces one of these conditions wraps the sentinel with %w, so callers can branch with errors.Is rather than scraping error strings: if \_, err := c.Dial(devices); errors.Is(err, relay.ErrDialTimeout) \{ // retry / give up on the dial specifically \} They are documented in PORT\_ADDITIONS.md. + + + + Package-level sentinel errors for the conditions the relay client returns. These are Go-idiomatic, errors.Is-able markers (a Go-port addition — the Python reference uses RelayError + bare exceptions and has no equivalent sentinel set). Every code path that produces one of these conditions wraps the sentinel with %w, so callers can branch with errors.Is rather than scraping error strings: if \_, err := c.Dial(devices); errors.Is(err, relay.ErrDialTimeout) \{ // retry / give up on the dial specifically \} They are documented in PORT\_ADDITIONS.md. + + + + Package-level sentinel errors for the conditions the relay client returns. These are Go-idiomatic, errors.Is-able markers (a Go-port addition — the Python reference uses RelayError + bare exceptions and has no equivalent sentinel set). Every code path that produces one of these conditions wraps the sentinel with %w, so callers can branch with errors.Is rather than scraping error strings: if \_, err := c.Dial(devices); errors.Is(err, relay.ErrDialTimeout) \{ // retry / give up on the dial specifically \} They are documented in PORT\_ADDITIONS.md. + + + + Authorization-state event used to refresh reconnect material. Mirrors Python's EVENT\_AUTHORIZATION\_STATE = "signalwire.authorization.state" (relay/constants.py:16). + + + + Event types for calling events. + + + + Event types for calling events. + + + + Event types for calling events. + + + + Event types for calling events. + + + + Event types for calling events. + + + + Event types for calling events. + + + + Event types for calling events. + + + + Event types for calling events. + + + + Event types for calling events. + + + + Event types for calling events. + + + + Event types for calling events. + + + + Event types for calling events. + + + + Event types for calling events. + + + + Event types for calling events. + + + + Event types for calling events. + + + + Event types for calling events. + + + + Event types for calling events. + + + + Event types for calling events. + + + + Event types for calling events. + + + + Event types for calling events. + + + + Event types for calling events. + + + + Event types for calling events. + + + + Event types for messaging events. + + + + Event types for messaging events. + + + + TTS voice genders. These are the canonical gender strings the RELAY wire accepts in the tts params; the values are the exact tokens emitted on the wire. + + + + TTS voice genders. These are the canonical gender strings the RELAY wire accepts in the tts params; the values are the exact tokens emitted on the wire. + + + + Message states represent the lifecycle of an SMS/MMS message. + + + + Message states represent the lifecycle of an SMS/MMS message. + + + + Message states represent the lifecycle of an SMS/MMS message. + + + + Message states represent the lifecycle of an SMS/MMS message. + + + + Message states represent the lifecycle of an SMS/MMS message. + + + + Message states represent the lifecycle of an SMS/MMS message. + + + + Message states represent the lifecycle of an SMS/MMS message. + + + + Blade/SignalWire internal method constants. + + + + Blade/SignalWire internal method constants. + + + + Blade/SignalWire internal method constants. + + + + Blade/SignalWire internal method constants. + + + + Blade/SignalWire internal method constants. + + + + Message delivery states. These equal the bare-string MessageState\* consts in constants.go. + + + + Message delivery states. These equal the bare-string MessageState\* consts in constants.go. + + + + Message delivery states. These equal the bare-string MessageState\* consts in constants.go. + + + + Message delivery states. These equal the bare-string MessageState\* consts in constants.go. + + + + Message delivery states. These equal the bare-string MessageState\* consts in constants.go. + + + + Message delivery states. These equal the bare-string MessageState\* consts in constants.go. + + + + Message delivery states. These equal the bare-string MessageState\* consts in constants.go. + + + + Protocol version for the SignalWire Blade protocol. + + + + Protocol version for the SignalWire Blade protocol. + + + + Protocol version for the SignalWire Blade protocol. + + +## Modules + + + + + +## Functions + +### DeviceGroups + +DeviceGroups converts serial groups of parallel typed Devices into the \[]\[]map\[string]any shape Connect/Dial expect: the outer slice is tried serially, the inner slice in parallel — the same semantics as the raw \[]\[]map\[string]any field. Byte-identical to building the nested maps by hand. + +#### Signature + +```go +func DeviceGroups(groups ...[]Device) [][]map[string]any +``` + +#### Parameters + + + +#### Returns + +`[][]map[string]any` + +#### Source + +[`pkg/relay/device.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/device.go) + +Line 79. + +*** + +### DeviceList + +DeviceList converts a flat list of typed Devices into ONE parallel device leg in the \[]\[]map\[string]any shape that Connect/Dial expect — i.e. all the given devices are tried in parallel (a single serial group). Equivalent to the hand-written \[]\[]map\[string]any\{\{dev1, dev2, …\}\}. + +#### Signature + +```go +func DeviceList(devices ...Device) [][]map[string]any +``` + +#### Parameters + + + +#### Returns + +`[][]map[string]any` + +#### Source + +[`pkg/relay/device.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/device.go) + +Line 67. + +*** + +### NewAIEvent + +NewAIEvent constructs an AIEvent from raw params. + +#### Signature + +```go +func NewAIEvent(params map[string]any) *AIEvent +``` + +#### Parameters + + + +#### Returns + +`*AIEvent` + +#### Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 825. + +*** + +### NewCallingErrorEvent + +NewCallingErrorEvent constructs a CallingErrorEvent from raw params. + +#### Signature + +```go +func NewCallingErrorEvent(params map[string]any) *CallingErrorEvent +``` + +#### Parameters + + + +#### Returns + +`*CallingErrorEvent` + +#### Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 692. + +*** + +### NewCallReceiveEvent + +NewCallReceiveEvent constructs a CallReceiveEvent from raw params. + +#### Signature + +```go +func NewCallReceiveEvent(params map[string]any) *CallReceiveEvent +``` + +#### Parameters + + + +#### Returns + +`*CallReceiveEvent` + +#### Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 240. + +*** + +### NewCallStateEvent + +NewCallStateEvent constructs a CallStateEvent from raw params. + +#### Signature + +```go +func NewCallStateEvent(params map[string]any) *CallStateEvent +``` + +#### Parameters + + + +#### Returns + +`*CallStateEvent` + +#### Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 211. + +*** + +### NewCollectEvent + +NewCollectEvent constructs a CollectEvent from raw params. + +#### Signature + +```go +func NewCollectEvent(params map[string]any) *CollectEvent +``` + +#### Parameters + + + +#### Returns + +`*CollectEvent` + +#### Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 343. + +*** + +### NewConferenceEvent + +NewConferenceEvent constructs a ConferenceEvent from raw params. + +#### Signature + +```go +func NewConferenceEvent(params map[string]any) *ConferenceEvent +``` + +#### Parameters + + + +#### Returns + +`*ConferenceEvent` + +#### Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 672. + +*** + +### NewConnectEvent + +NewConnectEvent constructs a ConnectEvent from raw params. + +#### Signature + +```go +func NewConnectEvent(params map[string]any) *ConnectEvent +``` + +#### Parameters + + + +#### Returns + +`*ConnectEvent` + +#### Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 362. + +*** + +### NewDenoiseEvent + +NewDenoiseEvent constructs a DenoiseEvent from raw params. + +#### Signature + +```go +func NewDenoiseEvent(params map[string]any) *DenoiseEvent +``` + +#### Parameters + + + +#### Returns + +`*DenoiseEvent` + +#### Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 536. + +*** + +### NewDetectEvent + +NewDetectEvent constructs a DetectEvent from raw params. + +#### Signature + +```go +func NewDetectEvent(params map[string]any) *DetectEvent +``` + +#### Parameters + + + +#### Returns + +`*DetectEvent` + +#### Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 379. + +*** + +### NewDevice + +NewDevice constructs a Device from a type discriminant and its params. + +#### Signature + +```go +func NewDevice(deviceType string, params any) Device +``` + +#### Parameters + + + + + +#### Returns + +`Device` + +#### Source + +[`pkg/relay/device.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/device.go) + +Line 32. + +*** + +### NewDialEvent + +NewDialEvent constructs a DialEvent from raw params. + +#### Signature + +```go +func NewDialEvent(params map[string]any) *DialEvent +``` + +#### Parameters + + + +#### Returns + +`*DialEvent` + +#### Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 481. + +*** + +### NewEchoEvent + +NewEchoEvent constructs an EchoEvent from raw params. + +#### Signature + +```go +func NewEchoEvent(params map[string]any) *EchoEvent +``` + +#### Parameters + + + +#### Returns + +`*EchoEvent` + +#### Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 603. + +*** + +### NewFaxEvent + +NewFaxEvent constructs a FaxEvent from raw params. + +#### Signature + +```go +func NewFaxEvent(params map[string]any) *FaxEvent +``` + +#### Parameters + + + +#### Returns + +`*FaxEvent` + +#### Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 396. + +*** + +### NewHoldEvent + +NewHoldEvent constructs a HoldEvent from raw params. + +#### Signature + +```go +func NewHoldEvent(params map[string]any) *HoldEvent +``` + +#### Parameters + + + +#### Returns + +`*HoldEvent` + +#### Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 651. + +*** + +### NewMessageReceiveEvent + +NewMessageReceiveEvent constructs a MessageReceiveEvent from raw params. + +#### Signature + +```go +func NewMessageReceiveEvent(params map[string]any) *MessageReceiveEvent +``` + +#### Parameters + + + +#### Returns + +`*MessageReceiveEvent` + +#### Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 719. + +*** + +### NewMessageStateEvent + +NewMessageStateEvent constructs a MessageStateEvent from raw params. + +#### Signature + +```go +func NewMessageStateEvent(params map[string]any) *MessageStateEvent +``` + +#### Parameters + + + +#### Returns + +`*MessageStateEvent` + +#### Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 779. + +*** + +### NewPayEvent + +NewPayEvent constructs a PayEvent from raw params. + +#### Signature + +```go +func NewPayEvent(params map[string]any) *PayEvent +``` + +#### Parameters + + + +#### Returns + +`*PayEvent` + +#### Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 555. + +*** + +### NewPlayEvent + +NewPlayEvent constructs a PlayEvent from raw params. + +#### Signature + +```go +func NewPlayEvent(params map[string]any) *PlayEvent +``` + +#### Parameters + + + +#### Returns + +`*PlayEvent` + +#### Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 274. + +*** + +### NewQueueEvent + +NewQueueEvent constructs a QueueEvent from raw params. + +#### Signature + +```go +func NewQueueEvent(params map[string]any) *QueueEvent +``` + +#### Parameters + + + +#### Returns + +`*QueueEvent` + +#### Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 582. + +*** + +### NewRecordEvent + +NewRecordEvent constructs a RecordEvent from raw params. URL, Duration, and Size are extracted from the nested "record" dict first, falling back to top-level params — matching Python's from\_payload behavior. + +#### Signature + +```go +func NewRecordEvent(params map[string]any) *RecordEvent +``` + +#### Parameters + + + +#### Returns + +`*RecordEvent` + +#### Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 299. + +*** + +### NewReferEvent + +NewReferEvent constructs a ReferEvent from raw params. + +#### Signature + +```go +func NewReferEvent(params map[string]any) *ReferEvent +``` + +#### Parameters + + + +#### Returns + +`*ReferEvent` + +#### Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 514. + +*** + +### NewRelayClient + +NewRelayClient creates a new RELAY Client with the given options. + +After explicit options are applied, any remaining unset auth/space fields fall back to SIGNALWIRE\_PROJECT\_ID, SIGNALWIRE\_API\_TOKEN, SIGNALWIRE\_JWT\_TOKEN, SIGNALWIRE\_SPACE, and RELAY\_MAX\_ACTIVE\_CALLS environment variables — matching Python RelayClient.**init**'s automatic env-var fallback (relay/client.py:115-119). Explicit options always win. + +#### Signature + +```go +func NewRelayClient(opts ...ClientOption) *Client +``` + +#### Parameters + + + +#### Returns + +`*Client` + +#### Source + +[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) + +Line 65. + +*** + +### NewRelayError + +NewRelayError constructs a RelayError with the given code and message. + +#### Signature + +```go +func NewRelayError(code int, message string) *RelayError +``` + +#### Parameters + + + + + +#### Returns + +`*RelayError` + +#### Source + +[`pkg/relay/error.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/error.go) + +Line 70. + +*** + +### NewRelayEvent + +NewRelayEvent creates a new RelayEvent from the given type and params. + +#### Signature + +```go +func NewRelayEvent(eventType string, params map[string]any) *RelayEvent +``` + +#### Parameters + + + + + +#### Returns + +`*RelayEvent` + +#### Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 23. + +*** + +### NewSendDigitsEvent + +NewSendDigitsEvent constructs a SendDigitsEvent from raw params. + +#### Signature + +```go +func NewSendDigitsEvent(params map[string]any) *SendDigitsEvent +``` + +#### Parameters + + + +#### Returns + +`*SendDigitsEvent` + +#### Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 458. + +*** + +### NewStreamEvent + +NewStreamEvent constructs a StreamEvent from raw params. + +#### Signature + +```go +func NewStreamEvent(params map[string]any) *StreamEvent +``` + +#### Parameters + + + +#### Returns + +`*StreamEvent` + +#### Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 439. + +*** + +### NewTapEvent + +NewTapEvent constructs a TapEvent from raw params. + +#### Signature + +```go +func NewTapEvent(params map[string]any) *TapEvent +``` + +#### Parameters + + + +#### Returns + +`*TapEvent` + +#### Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 416. + +*** + +### NewTranscribeEvent + +NewTranscribeEvent constructs a TranscribeEvent from raw params. + +#### Signature + +```go +func NewTranscribeEvent(params map[string]any) *TranscribeEvent +``` + +#### Parameters + + + +#### Returns + +`*TranscribeEvent` + +#### Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 629. + +*** + +### ParseEvent + +ParseEvent parses a raw signalwire event payload dict into a typed event object. It reads "event\_type" from the top-level payload and "params" as the inner parameter map, then dispatches to the appropriate typed constructor. If the event\_type is not recognised, a plain \*RelayEvent is returned. Callers can type-assert or type-switch on the result to access the concrete event fields. + +This mirrors Python's relay.event.parse\_event(payload). + +#### Signature + +```go +func ParseEvent(payload map[string]any) any +``` + +#### Parameters + + + +#### Returns + +`any` + +#### Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 843. + +*** + +### WithAIControlID + +WithAIControlID supplies an explicit control\_id for the AI action, matching Python's ai(control\_id=...). + +#### Signature + +```go +func WithAIControlID(id string) AIOption +``` + +#### Parameters + + + +#### Returns + +`AIOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 448. + +*** + +### WithAIEngine + +WithAIEngine sets the AI engine to use. + +#### Signature + +```go +func WithAIEngine(engine string) AIOption +``` + +#### Parameters + + + +#### Returns + +`AIOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 453. + +*** + +### WithAIParams + +WithAIParams sets arbitrary AI parameters. + +#### Signature + +```go +func WithAIParams(params map[string]any) AIOption +``` + +#### Parameters + + + +#### Returns + +`AIOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 474. + +*** + +### WithAIPostPrompt + +WithAIPostPrompt sets the AI post-prompt configuration. + +#### Signature + +```go +func WithAIPostPrompt(pp map[string]any) AIOption +``` + +#### Parameters + + + +#### Returns + +`AIOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 467. + +*** + +### WithAIPrompt + +WithAIPrompt sets the AI prompt text. + +#### Signature + +```go +func WithAIPrompt(prompt map[string]any) AIOption +``` + +#### Parameters + + + +#### Returns + +`AIOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 460. + +*** + +### WithAMDDetectInterruptions + +WithAMDDetectInterruptions sets detect\_interruptions (Python detect\_answering\_machine). + +#### Signature + +```go +func WithAMDDetectInterruptions(enabled bool) AMDOption +``` + +#### Parameters + + + +#### Returns + +`AMDOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 165. + +*** + +### WithAMDDetectMessageEnd + +WithAMDDetectMessageEnd sets detect\_message\_end (Python detect\_answering\_machine). + +#### Signature + +```go +func WithAMDDetectMessageEnd(enabled bool) AMDOption +``` + +#### Parameters + + + +#### Returns + +`AMDOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 170. + +*** + +### WithAMDEndSilenceTimeout + +WithAMDEndSilenceTimeout sets end\_silence\_timeout (Python detect\_answering\_machine). + +#### Signature + +```go +func WithAMDEndSilenceTimeout(seconds float64) AMDOption +``` + +#### Parameters + + + +#### Returns + +`AMDOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 150. + +*** + +### WithAMDInitialTimeout + +WithAMDInitialTimeout sets initial\_timeout (Python detect\_answering\_machine). + +#### Signature + +```go +func WithAMDInitialTimeout(seconds float64) AMDOption +``` + +#### Parameters + + + +#### Returns + +`AMDOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 145. + +*** + +### WithAMDMachineVoiceThreshold + +WithAMDMachineVoiceThreshold sets machine\_voice\_threshold (Python detect\_answering\_machine). + +#### Signature + +```go +func WithAMDMachineVoiceThreshold(threshold float64) AMDOption +``` + +#### Parameters + + + +#### Returns + +`AMDOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 155. + +*** + +### WithAMDMachineWordsThreshold + +WithAMDMachineWordsThreshold sets machine\_words\_threshold (Python detect\_answering\_machine). + +#### Signature + +```go +func WithAMDMachineWordsThreshold(threshold int) AMDOption +``` + +#### Parameters + + + +#### Returns + +`AMDOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 160. + +*** + +### WithAMDTimeout + +WithAMDTimeout sets the overall detect timeout in seconds (Python detect\_answering\_machine timeout). + +#### Signature + +```go +func WithAMDTimeout(seconds float64) AMDOption +``` + +#### Parameters + + + +#### Returns + +`AMDOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 175. + +*** + +### WithAudioVolume + +WithAudioVolume sets the playback volume in dB (Python play\_audio/prompt\_audio volume). + +#### Signature + +```go +func WithAudioVolume(db float64) AudioOption +``` + +#### Parameters + + + +#### Returns + +`AudioOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 104. + +*** + +### WithConferenceBeep + +WithConferenceBeep enables beep on join/leave. + +#### Signature + +```go +func WithConferenceBeep(beep string) ConferenceOption +``` + +#### Parameters + + + +#### Returns + +`ConferenceOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 311. + +*** + +### WithConferenceDeaf + +WithConferenceDeaf joins deaf (cannot hear others). + +#### Signature + +```go +func WithConferenceDeaf(deaf bool) ConferenceOption +``` + +#### Parameters + + + +#### Returns + +`ConferenceOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 325. + +*** + +### WithConferenceMuted + +WithConferenceMuted joins muted. + +#### Signature + +```go +func WithConferenceMuted(muted bool) ConferenceOption +``` + +#### Parameters + + + +#### Returns + +`ConferenceOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 318. + +*** + +### WithConnectRingback + +WithConnectRingback sets ringback media for the connect operation. + +#### Signature + +```go +func WithConnectRingback(media []map[string]any) ConnectOption +``` + +#### Parameters + + + +#### Returns + +`ConnectOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 278. + +*** + +### WithContexts + +WithContexts sets the contexts to subscribe to for inbound events. + +#### Signature + +```go +func WithContexts(contexts ...string) ClientOption +``` + +#### Parameters + + + +#### Returns + +`ClientOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 518. + +*** + +### WithDialClientTimeout + +WithDialClientTimeout bounds how long Dial() will wait for the calling.call.dial event before raising a timeout error. Mirrors Python's dial(dial\_timeout=\). Default is 120s when omitted. + +The duration is consumed by the Go Dial() loop; it never goes on the wire — that's why it's stored under an underscore-prefixed key removed before transmit. + +#### Signature + +```go +func WithDialClientTimeout(d time.Duration) DialOption +``` + +#### Parameters + + + +#### Returns + +`DialOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 566. + +*** + +### WithDialFromNumber + +WithDialFromNumber sets the caller ID for the outbound call. + +#### Signature + +```go +func WithDialFromNumber(from string) DialOption +``` + +#### Parameters + + + +#### Returns + +`DialOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 535. + +*** + +### WithDialMaxDuration + +WithDialMaxDuration sets the maximum call duration in minutes. Mirrors Python's dial(max\_duration=...) parameter. + +#### Signature + +```go +func WithDialMaxDuration(minutes int) DialOption +``` + +#### Parameters + + + +#### Returns + +`DialOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 574. + +*** + +### WithDialTag + +WithDialTag sets an explicit caller-supplied dial tag. When omitted the SDK generates a UUID, mirroring Python's `tag = tag or str(uuid.uuid4())` at relay/client.py:368. + +#### Signature + +```go +func WithDialTag(tag string) DialOption +``` + +#### Parameters + + + +#### Returns + +`DialOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 553. + +*** + +### WithDialTimeout + +WithDialTimeout sets the legacy per-leg dial timeout in seconds. (Was the only Go option; retained for back-compat. To bound the overall Dial() call use WithDialClientTimeout.) + +#### Signature + +```go +func WithDialTimeout(t int) DialOption +``` + +#### Parameters + + + +#### Returns + +`DialOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 544. + +*** + +### WithDigitDigits + +WithDigitDigits restricts detection to the given DTMF digit set, nested inside the detect params (Python detect\_digit digits). + +#### Signature + +```go +func WithDigitDigits(digits string) DetectDigitOption +``` + +#### Parameters + + + +#### Returns + +`DetectDigitOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 128. + +*** + +### WithDigitTimeout + +WithDigitTimeout sets the detect timeout in seconds (Python detect\_digit timeout). + +#### Signature + +```go +func WithDigitTimeout(seconds float64) DetectDigitOption +``` + +#### Parameters + + + +#### Returns + +`DetectDigitOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 133. + +*** + +### WithEnvDefaults + +WithEnvDefaults is now a no-op pass-through retained for backwards compatibility — env defaults are loaded automatically at the end of NewRelayClient (mirroring Python RelayClient.**init**). New code can rely on the auto-load behavior and omit this option entirely. + +#### Signature + +```go +func WithEnvDefaults() ClientOption +``` + +#### Returns + +`ClientOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 663. + +*** + +### WithFaxControlID + +WithFaxControlID supplies an explicit control\_id for the fax action, matching Python's send\_fax(control\_id=...) / receive\_fax(control\_id=...). + +#### Signature + +```go +func WithFaxControlID(id string) FaxOption +``` + +#### Parameters + + + +#### Returns + +`FaxOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 345. + +*** + +### WithFaxDetectTimeout + +WithFaxDetectTimeout sets the detect timeout in seconds (Python detect\_fax timeout). + +#### Signature + +```go +func WithFaxDetectTimeout(seconds float64) DetectFaxOption +``` + +#### Parameters + + + +#### Returns + +`DetectFaxOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 189. + +*** + +### WithFaxHeaderInfo + +WithFaxHeaderInfo sets the fax header info string (matches Python's header\_info param). + +#### Signature + +```go +func WithFaxHeaderInfo(headerInfo string) FaxOption +``` + +#### Parameters + + + +#### Returns + +`FaxOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 335. + +*** + +### WithFaxTone + +WithFaxTone restricts fax detection to a specific tone (CED/CNG), nested inside the detect params (Python detect\_fax tone). + +#### Signature + +```go +func WithFaxTone(tone string) DetectFaxOption +``` + +#### Parameters + + + +#### Returns + +`DetectFaxOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 184. + +*** + +### WithJWT + +WithJWT sets a pre-existing JWT for authentication. + +#### Signature + +```go +func WithJWT(jwt string) ClientOption +``` + +#### Parameters + + + +#### Returns + +`ClientOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 504. + +*** + +### WithMaxActiveCalls + +WithMaxActiveCalls limits the number of concurrent active calls. + +#### Signature + +```go +func WithMaxActiveCalls(n int) ClientOption +``` + +#### Parameters + + + +#### Returns + +`ClientOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 525. + +*** + +### WithMessageContext + +WithMessageContext sets the routing context for the message. Mirrors Python's send\_message(context=...) parameter — defaults to the relay protocol when omitted. + +#### Signature + +```go +func WithMessageContext(ctx string) MessageOption +``` + +#### Parameters + + + +#### Returns + +`MessageOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 607. + +*** + +### WithMessageMedia + +WithMessageMedia adds media URLs to the message (MMS). + +#### Signature + +```go +func WithMessageMedia(urls []string) MessageOption +``` + +#### Parameters + + + +#### Returns + +`MessageOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 584. + +*** + +### WithMessageOnCompleted + +WithMessageOnCompleted registers a callback invoked when the message reaches a terminal state (delivered, undelivered, or failed). The callback receives both the message and the terminal RelayEvent, mirroring Python's \_on\_completed callback contract (relay/message.py:115-117) which receives the event directly. Mirrors Python's send\_message(on\_completed=...) parameter. + +#### Signature + +```go +func WithMessageOnCompleted(cb func(*Message, *RelayEvent)) MessageOption +``` + +#### Parameters + + + +#### Returns + +`MessageOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 618. + +*** + +### WithMessageRegion + +WithMessageRegion sets the region for message delivery. + +#### Signature + +```go +func WithMessageRegion(region string) MessageOption +``` + +#### Parameters + + + +#### Returns + +`MessageOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 591. + +*** + +### WithMessageTags + +WithMessageTags sets tags on the message for tracking. + +#### Signature + +```go +func WithMessageTags(tags []string) MessageOption +``` + +#### Parameters + + + +#### Returns + +`MessageOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 598. + +*** + +### WithPayChargeAmount + +WithPayChargeAmount sets the charge amount. + +#### Signature + +```go +func WithPayChargeAmount(amount string) PayOption +``` + +#### Parameters + + + +#### Returns + +`PayOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 404. + +*** + +### WithPayControlID + +WithPayControlID supplies an explicit control\_id for the pay action, matching Python's pay(control\_id=...). + +#### Signature + +```go +func WithPayControlID(id string) PayOption +``` + +#### Parameters + + + +#### Returns + +`PayOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 354. + +*** + +### WithPayCurrency + +WithPayCurrency sets the payment currency. + +#### Signature + +```go +func WithPayCurrency(currency string) PayOption +``` + +#### Parameters + + + +#### Returns + +`PayOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 409. + +*** + +### WithPayDescription + +WithPayDescription sets a description for the payment. + +#### Signature + +```go +func WithPayDescription(desc string) PayOption +``` + +#### Parameters + + + +#### Returns + +`PayOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 424. + +*** + +### WithPayInputMethod + +WithPayInputMethod sets the payment input method. + +#### Signature + +```go +func WithPayInputMethod(method string) PayOption +``` + +#### Parameters + + + +#### Returns + +`PayOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 359. + +*** + +### WithPayLanguage + +WithPayLanguage sets the language for payment prompts. + +#### Signature + +```go +func WithPayLanguage(language string) PayOption +``` + +#### Parameters + + + +#### Returns + +`PayOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 414. + +*** + +### WithPayMaxAttempts + +WithPayMaxAttempts sets the maximum number of payment attempts. + +#### Signature + +```go +func WithPayMaxAttempts(max string) PayOption +``` + +#### Parameters + + + +#### Returns + +`PayOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 379. + +*** + +### WithPayMinPostalCodeLength + +WithPayMinPostalCodeLength sets the minimum postal code length. + +#### Signature + +```go +func WithPayMinPostalCodeLength(length string) PayOption +``` + +#### Parameters + + + +#### Returns + +`PayOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 394. + +*** + +### WithPayParameters + +WithPayParameters sets additional payment parameters. + +#### Signature + +```go +func WithPayParameters(parameters []map[string]any) PayOption +``` + +#### Parameters + + + +#### Returns + +`PayOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 434. + +*** + +### WithPayPaymentMethod + +WithPayPaymentMethod sets the payment method (e.g. "credit-card"). + +#### Signature + +```go +func WithPayPaymentMethod(method string) PayOption +``` + +#### Parameters + + + +#### Returns + +`PayOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 369. + +*** + +### WithPayPostalCode + +WithPayPostalCode sets whether to collect postal code. + +#### Signature + +```go +func WithPayPostalCode(code string) PayOption +``` + +#### Parameters + + + +#### Returns + +`PayOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 389. + +*** + +### WithPayPrompts + +WithPayPrompts sets custom payment prompts. + +#### Signature + +```go +func WithPayPrompts(prompts []map[string]any) PayOption +``` + +#### Parameters + + + +#### Returns + +`PayOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 439. + +*** + +### WithPaySecurityCode + +WithPaySecurityCode sets whether to collect security code. + +#### Signature + +```go +func WithPaySecurityCode(code string) PayOption +``` + +#### Parameters + + + +#### Returns + +`PayOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 384. + +*** + +### WithPayStatusURL + +WithPayStatusURL sets the payment status callback URL. + +#### Signature + +```go +func WithPayStatusURL(url string) PayOption +``` + +#### Parameters + + + +#### Returns + +`PayOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 364. + +*** + +### WithPayTimeout + +WithPayTimeout sets the timeout string for the payment session. + +#### Signature + +```go +func WithPayTimeout(timeout string) PayOption +``` + +#### Parameters + + + +#### Returns + +`PayOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 374. + +*** + +### WithPayTokenType + +WithPayTokenType sets the payment token type. + +#### Signature + +```go +func WithPayTokenType(tokenType string) PayOption +``` + +#### Parameters + + + +#### Returns + +`PayOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 399. + +*** + +### WithPayValidCardTypes + +WithPayValidCardTypes sets the valid card types string. + +#### Signature + +```go +func WithPayValidCardTypes(types string) PayOption +``` + +#### Parameters + + + +#### Returns + +`PayOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 429. + +*** + +### WithPayVoice + +WithPayVoice sets the voice for payment prompts. + +#### Signature + +```go +func WithPayVoice(voice string) PayOption +``` + +#### Parameters + + + +#### Returns + +`PayOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 419. + +*** + +### WithPlayControlID + +WithPlayControlID sets an explicit control\_id for the play action. Mirrors Python's play(control\_id=...). When omitted the SDK auto-generates a UUID. The same key is honored by play\_and\_collect. + +#### Signature + +```go +func WithPlayControlID(id string) PlayOption +``` + +#### Parameters + + + +#### Returns + +`PlayOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 27. + +*** + +### WithPlayDirection + +WithPlayDirection sets the play direction (e.g. "self" / "peer" / "both"). + +#### Signature + +```go +func WithPlayDirection(dir string) PlayOption +``` + +#### Parameters + + + +#### Returns + +`PlayOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 34. + +*** + +### WithPlayLoop + +WithPlayLoop sets the number of loop iterations for playback. + +#### Signature + +```go +func WithPlayLoop(n int) PlayOption +``` + +#### Parameters + + + +#### Returns + +`PlayOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 41. + +*** + +### WithPlayOnCompleted + +WithPlayOnCompleted registers a callback fired when the play action reaches a terminal state. Mirrors Python's play(on\_completed=...). + +#### Signature + +```go +func WithPlayOnCompleted(cb func(*RelayEvent)) PlayOption +``` + +#### Parameters + + + +#### Returns + +`PlayOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 49. + +*** + +### WithPlayVolume + +WithPlayVolume sets the volume for playback in dB. + +#### Signature + +```go +func WithPlayVolume(db float64) PlayOption +``` + +#### Parameters + + + +#### Returns + +`PlayOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 18. + +*** + +### WithProject + +WithProject sets the project ID for authentication. + +#### Signature + +```go +func WithProject(id string) ClientOption +``` + +#### Parameters + + + +#### Returns + +`ClientOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 490. + +*** + +### WithRecordAudio + +WithRecordAudio sets the audio config map for the record action's "record": \{"audio": ...\} payload. Mirrors Python's record(audio=...). + +#### Signature + +```go +func WithRecordAudio(audio map[string]any) RecordOption +``` + +#### Parameters + + + +#### Returns + +`RecordOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 259. + +*** + +### WithRecordBeep + +WithRecordBeep enables a beep before recording. + +#### Signature + +```go +func WithRecordBeep(beep bool) RecordOption +``` + +#### Parameters + + + +#### Returns + +`RecordOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 197. + +*** + +### WithRecordControlID + +WithRecordControlID sets an explicit control\_id for the record action. Mirrors Python's record(control\_id=...). + +#### Signature + +```go +func WithRecordControlID(id string) RecordOption +``` + +#### Parameters + + + +#### Returns + +`RecordOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 251. + +*** + +### WithRecordDirection + +WithRecordDirection sets the recording direction ("listen", "speak", "both"). + +#### Signature + +```go +func WithRecordDirection(dir string) RecordOption +``` + +#### Parameters + + + +#### Returns + +`RecordOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 222. + +*** + +### WithRecordEndSilenceTimeout + +WithRecordEndSilenceTimeout sets the end-of-speech silence timeout in seconds. + +#### Signature + +```go +func WithRecordEndSilenceTimeout(t float64) RecordOption +``` + +#### Parameters + + + +#### Returns + +`RecordOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 243. + +*** + +### WithRecordFormat + +WithRecordFormat sets the recording format (e.g. "wav", "mp3"). The parameter is the defined string type swaig.RecordFormat: the Format\* constants give autocomplete + a compile-time typo check, while Go's untyped-constant auto-conversion keeps a bare "wav" literal compiling. The value is stored as a plain string so the wire shape is unchanged. + +#### Signature + +```go +func WithRecordFormat(format swaig.RecordFormat) RecordOption +``` + +#### Parameters + + + +#### Returns + +`RecordOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 208. + +*** + +### WithRecordInitialTimeout + +WithRecordInitialTimeout sets the initial timeout in seconds. + +#### Signature + +```go +func WithRecordInitialTimeout(t float64) RecordOption +``` + +#### Parameters + + + +#### Returns + +`RecordOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 236. + +*** + +### WithRecordOnCompleted + +WithRecordOnCompleted registers a callback fired when the record action reaches a terminal state. Mirrors Python's record(on\_completed=...). + +#### Signature + +```go +func WithRecordOnCompleted(cb func(*RelayEvent)) RecordOption +``` + +#### Parameters + + + +#### Returns + +`RecordOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 268. + +*** + +### WithRecordStereo + +WithRecordStereo enables stereo recording. + +#### Signature + +```go +func WithRecordStereo(stereo bool) RecordOption +``` + +#### Parameters + + + +#### Returns + +`RecordOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 215. + +*** + +### WithRecordTerminators + +WithRecordTerminators sets DTMF terminators to stop recording. + +#### Signature + +```go +func WithRecordTerminators(terminators string) RecordOption +``` + +#### Parameters + + + +#### Returns + +`RecordOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 229. + +*** + +### WithRingtoneDuration + +WithRingtoneDuration sets how long the ringtone plays, in seconds (Python play\_ringtone duration). It is nested inside the ringtone media params, matching Python's “\{"type":"ringtone","params":\{"duration":...\}\}“. + +#### Signature + +```go +func WithRingtoneDuration(seconds float64) RingtoneOption +``` + +#### Parameters + + + +#### Returns + +`RingtoneOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 114. + +*** + +### WithRingtoneVolume + +WithRingtoneVolume sets the playback volume in dB (Python play\_ringtone volume). + +#### Signature + +```go +func WithRingtoneVolume(db float64) RingtoneOption +``` + +#### Parameters + + + +#### Returns + +`RingtoneOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 119. + +*** + +### WithSpace + +WithSpace sets the SignalWire space (e.g. "example.signalwire.com"). + +#### Signature + +```go +func WithSpace(space string) ClientOption +``` + +#### Parameters + + + +#### Returns + +`ClientOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 511. + +*** + +### WithStreamCodec + +WithStreamCodec sets the stream audio codec. + +#### Signature + +```go +func WithStreamCodec(codec string) StreamOption +``` + +#### Parameters + + + +#### Returns + +`StreamOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 301. + +*** + +### WithStreamControlID + +WithStreamControlID supplies an explicit control\_id for the stream action, matching Python's stream(control\_id=...). + +#### Signature + +```go +func WithStreamControlID(id string) StreamOption +``` + +#### Parameters + + + +#### Returns + +`StreamOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 289. + +*** + +### WithStreamDirection + +WithStreamDirection sets the stream direction. + +#### Signature + +```go +func WithStreamDirection(dir string) StreamOption +``` + +#### Parameters + + + +#### Returns + +`StreamOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 294. + +*** + +### WithToken + +WithToken sets the API token for authentication. + +#### Signature + +```go +func WithToken(token string) ClientOption +``` + +#### Parameters + + + +#### Returns + +`ClientOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 497. + +*** + +### WithTTSGender + +WithTTSGender sets the TTS voice gender (Python play\_tts/prompt\_tts gender). The parameter is the defined string type TTSGender: the GenderMale / GenderFemale constants give autocomplete + a compile-time typo check, while Go's untyped-constant auto-conversion keeps a bare "female" literal compiling. The value is stored as a plain string so the wire shape is identical to the reference's str gender. + +#### Signature + +```go +func WithTTSGender(gender TTSGender) TTSOption +``` + +#### Parameters + + + +#### Returns + +`TTSOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 86. + +*** + +### WithTTSLanguage + +WithTTSLanguage sets the TTS language (Python play\_tts/prompt\_tts language). + +#### Signature + +```go +func WithTTSLanguage(language string) TTSOption +``` + +#### Parameters + + + +#### Returns + +`TTSOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 76. + +*** + +### WithTTSVoice + +WithTTSVoice sets the TTS voice (Python play\_tts/prompt\_tts voice). + +#### Signature + +```go +func WithTTSVoice(voice string) TTSOption +``` + +#### Parameters + + + +#### Returns + +`TTSOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 91. + +*** + +### WithTTSVolume + +WithTTSVolume sets the playback volume in dB (Python play\_tts/prompt\_tts volume). + +#### Signature + +```go +func WithTTSVolume(db float64) TTSOption +``` + +#### Parameters + + + +#### Returns + +`TTSOption` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 96. + +## Type Aliases + +### AIOption + +AIOption configures an AI operation on a call. + +#### Signature + +```go +type AIOption alias +``` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 444. + +*** + +### AMDOption + +AMDOption configures a DetectAnsweringMachine call. Each option maps to one Python detect\_answering\_machine keyword argument and is nested inside the “\{"type":"machine","params":\{...\}\}“ detect media entry — only the options the caller supplies are emitted (matching Python's only-provided-keys behavior). + +#### Signature + +```go +type AMDOption alias +``` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 142. + +*** + +### AudioOption + +AudioOption configures a PlayAudio or PromptAudio call. + +#### Signature + +```go +type AudioOption alias +``` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 101. + +*** + +### ClientOption + +ClientOption configures the RELAY Client. + +#### Signature + +```go +type ClientOption alias +``` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 487. + +*** + +### ConferenceOption + +ConferenceOption configures a JoinConference call. + +#### Signature + +```go +type ConferenceOption alias +``` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 308. + +*** + +### ConnectOption + +ConnectOption configures a Connect call. + +#### Signature + +```go +type ConnectOption alias +``` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 275. + +*** + +### DetectDigitOption + +DetectDigitOption configures a DetectDigit call. + +#### Signature + +```go +type DetectDigitOption alias +``` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 124. + +*** + +### DetectFaxOption + +DetectFaxOption configures a DetectFax call. + +#### Signature + +```go +type DetectFaxOption alias +``` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 180. + +*** + +### DialOption + +DialOption configures a Dial (outbound call) operation. + +#### Signature + +```go +type DialOption alias +``` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 532. + +*** + +### FaxOption + +FaxOption configures a SendFax call. + +#### Signature + +```go +type FaxOption alias +``` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 332. + +*** + +### MessageOption + +MessageOption configures a SendMessage operation. + +#### Signature + +```go +type MessageOption alias +``` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 581. + +*** + +### PayOption + +PayOption configures a Pay call. + +#### Signature + +```go +type PayOption alias +``` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 350. + +*** + +### PlayOption + +PlayOption configures a Play call. + +#### Signature + +```go +type PlayOption alias +``` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 15. + +*** + +### RecordOption + +RecordOption configures a Record call. + +#### Signature + +```go +type RecordOption alias +``` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 194. + +*** + +### RingtoneOption + +RingtoneOption configures a PlayRingtone call. + +#### Signature + +```go +type RingtoneOption alias +``` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 109. + +*** + +### StreamOption + +StreamOption configures a Stream call. + +#### Signature + +```go +type StreamOption alias +``` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 285. + +*** + +### TTSOption + +TTSOption configures a PlayTTS or PromptTTS call. It sets the language / gender / voice fields nested inside the “\{"type":"tts","params":\{...\}\}“ media entry and the top-level volume on the play frame. + +#### Signature + +```go +type TTSOption alias +``` + +#### Source + +[`pkg/relay/options.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/options.go) + +Line 73. + +## Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) diff --git a/fern/products/sdk-reference/go/relay/relay/action/index.mdx b/fern/products/sdk-reference/go/relay/relay/action/index.mdx new file mode 100644 index 0000000000..b5f69122c9 --- /dev/null +++ b/fern/products/sdk-reference/go/relay/relay/action/index.mdx @@ -0,0 +1,165 @@ +--- +slug: "/reference/go/relay/relay/action" +title: "Action" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.Action" + parent: "relay.relay" + module: "relay.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go" +--- +# `Action` + +Action represents a long-running operation on a call, such as playing audio, recording, or collecting input. Callers can Wait for completion, check status, or register a completion callback. + +## Signature + +```go +type Action struct +``` + +## Methods + +### Completed + +Completed returns whether the action finished. + +#### Signature + +```go +func (*Action) Completed() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 93. + +*** + +### ControlID + +ControlID returns the control identifier for this action. + +#### Signature + +```go +func (*Action) ControlID() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 62. + +*** + +### IsDone + +IsDone returns true if the action has completed. + +#### Signature + +```go +func (*Action) IsDone() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 79. + +*** + +### OnCompleted + +OnCompleted registers a callback invoked when the action completes. + +#### Signature + +```go +func (*Action) OnCompleted(fn func(*RelayEvent)) +``` + +#### Parameters + + + +#### Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 98. + +*** + +### Result + +Result returns the final event that resolved this action, or nil if pending. + +#### Signature + +```go +func (*Action) Result() *RelayEvent +``` + +#### Returns + +`*RelayEvent` + +#### Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 86. + +*** + +### Wait + +Wait blocks until the action completes or the context is cancelled. + +#### Signature + +```go +func (*Action) Wait(ctx context.Context) (*RelayEvent, error) +``` + +#### Parameters + + + +#### Returns + +`(*RelayEvent, error)` + +#### Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 67. + +## Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 12. diff --git a/fern/products/sdk-reference/go/relay/relay/ai-action/index.mdx b/fern/products/sdk-reference/go/relay/relay/ai-action/index.mdx new file mode 100644 index 0000000000..f280b7a818 --- /dev/null +++ b/fern/products/sdk-reference/go/relay/relay/ai-action/index.mdx @@ -0,0 +1,55 @@ +--- +slug: "/reference/go/relay/relay/ai-action" +title: "AIAction" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.AIAction" + parent: "relay.relay" + module: "relay.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go" +--- +# `AIAction` + +AIAction represents a long-running AI operation on a call. + +## Signature + +```go +type AIAction struct +``` + +## Properties + + + +## Methods + +### Stop + +Stop sends calling.ai.stop to halt the active AI session. + +#### Signature + +```go +func (*AIAction) Stop() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 533. + +## Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 521. diff --git a/fern/products/sdk-reference/go/relay/relay/ai-event/index.mdx b/fern/products/sdk-reference/go/relay/relay/ai-event/index.mdx new file mode 100644 index 0000000000..6fdfdf346d --- /dev/null +++ b/fern/products/sdk-reference/go/relay/relay/ai-event/index.mdx @@ -0,0 +1,39 @@ +--- +slug: "/reference/go/relay/relay/ai-event" +title: "AIEvent" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.AIEvent" + parent: "relay.relay" + module: "relay.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" +--- +# `AIEvent` + +AIEvent represents a calling.call.ai event. + +## Signature + +```go +type AIEvent struct +``` + +## Properties + + + + + + + + + +## Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 817. diff --git a/fern/products/sdk-reference/go/relay/relay/call-receive-event/index.mdx b/fern/products/sdk-reference/go/relay/relay/call-receive-event/index.mdx new file mode 100644 index 0000000000..ed6572a523 --- /dev/null +++ b/fern/products/sdk-reference/go/relay/relay/call-receive-event/index.mdx @@ -0,0 +1,51 @@ +--- +slug: "/reference/go/relay/relay/call-receive-event" +title: "CallReceiveEvent" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.CallReceiveEvent" + parent: "relay.relay" + module: "relay.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" +--- +# `CallReceiveEvent` + +CallReceiveEvent represents a calling.call.receive event for inbound calls. + +## Signature + +```go +type CallReceiveEvent struct +``` + +## Properties + + + + + + + + + + + + + + + + + + + + + +## Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 226. diff --git a/fern/products/sdk-reference/go/relay/relay/call-state-event/index.mdx b/fern/products/sdk-reference/go/relay/relay/call-state-event/index.mdx new file mode 100644 index 0000000000..a4140ae238 --- /dev/null +++ b/fern/products/sdk-reference/go/relay/relay/call-state-event/index.mdx @@ -0,0 +1,47 @@ +--- +slug: "/reference/go/relay/relay/call-state-event" +title: "CallStateEvent" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.CallStateEvent" + parent: "relay.relay" + module: "relay.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" +--- +# `CallStateEvent` + +CallStateEvent represents a calling.call.state event. + +## Signature + +```go +type CallStateEvent struct +``` + +## Properties + + + + + + + + + + + + + + + + + +## Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 199. diff --git a/fern/products/sdk-reference/go/relay/relay/call/index.mdx b/fern/products/sdk-reference/go/relay/relay/call/index.mdx new file mode 100644 index 0000000000..3a3b1cff90 --- /dev/null +++ b/fern/products/sdk-reference/go/relay/relay/call/index.mdx @@ -0,0 +1,1819 @@ +--- +slug: "/reference/go/relay/relay/call" +title: "Call" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.Call" + parent: "relay.relay" + module: "relay.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go" +--- +# `Call` + +Call represents an active voice call managed through the RELAY client. It exposes methods for every calling operation supported by SignalWire, grouped into logical categories: lifecycle, audio, recording, bridging, DTMF, detection, fax, tap, streaming, conferencing, AI, hold/denoise, room/queue, pay, and transcription. + +## Signature + +```go +type Call struct +``` + +## Methods + +### AI + +AI starts an AI session on the call. Use WithAIControlID for an explicit control\_id (matches Python's ai(control\_id=...)). + +#### Signature + +```go +func (*Call) AI(opts ...AIOption) *AIAction +``` + +#### Parameters + + + +#### Returns + +`*AIAction` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 1178. + +*** + +### AIHold + +AIHold places the AI-controlled call on hold. controlID, timeout and prompt are all optional — pass "" to omit any of them, matching Python's ai\_hold(\*, timeout: Optional\[str] = None, prompt: Optional\[str] = None) which has no control\_id parameter and only writes keys conditionally. + +#### Signature + +```go +func (*Call) AIHold(controlID string, timeout string, prompt string) error +``` + +#### Parameters + + + + + + + +#### Returns + +`error` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 1249. + +*** + +### AIMessage + +AIMessage sends a text message within an active AI session. All parameters are optional, matching Python's ai\_message(\*, message\_text=None, role=None, reset=None, global\_data=None). Pass "" for controlID/text/role and nil for reset/globalData to omit them from the wire payload (Python omits the key entirely when the argument is None). + +#### Signature + +```go +func (*Call) AIMessage( + controlID string, + text string, + role string, + reset map[string]any, + globalData map[string]any +) error +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`error` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 1221. + +*** + +### AIUnhold + +AIUnhold removes the call from AI hold. controlID and prompt are both optional — pass "" to omit either, matching Python's ai\_unhold(\*, prompt: Optional\[str] = None) which has no control\_id parameter and only writes keys conditionally. + +#### Signature + +```go +func (*Call) AIUnhold(controlID string, prompt string) error +``` + +#### Parameters + + + + + +#### Returns + +`error` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 1271. + +*** + +### AmazonBedrock + +AmazonBedrock starts an AI session using Amazon Bedrock. + +#### Signature + +```go +func (*Call) AmazonBedrock(opts ...AIOption) *AIAction +``` + +#### Parameters + + + +#### Returns + +`*AIAction` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 1211. + +*** + +### Answer + +Answer answers an inbound call. + +#### Signature + +```go +func (*Call) Answer() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 320. + +*** + +### BindDigit + +BindDigit binds a DTMF digit sequence to trigger a RELAY method. bindParams, realm, and maxTriggers are optional (nil/zero-value omits them), matching Python's bind\_digit(digits, bind\_method, \*, bind\_params, realm, max\_triggers). + +#### Signature + +```go +func (*Call) BindDigit( + digits string, + method string, + bindParams map[string]any, + realm string, + maxTriggers int +) error +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`error` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 1400. + +*** + +### CallID + +CallID returns the unique call identifier assigned by the server. + +#### Signature + +```go +func (*Call) CallID() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 55. + +*** + +### CallState + +CallState returns the current call state as a typed CallState ALONGSIDE the bare-string State() accessor (kept for parity with the Python reference). The typed kind gives callers IsTerminal()/IsKnown() predicates and compile-time distinctness from DialState/MessageState; its underlying string equals State() exactly. Additive port idiom — see states.go and PORT\_ADDITIONS.md. + +#### Signature + +```go +func (*Call) CallState() CallState +``` + +#### Returns + +`CallState` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 76. + +*** + +### ClearDigitBindings + +ClearDigitBindings clears all DTMF digit bindings, optionally filtered by realm. Pass an empty string to clear all realms (matches Python's clear\_digit\_bindings(\*, realm)). + +#### Signature + +```go +func (*Call) ClearDigitBindings(realm string) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 1423. + +*** + +### Collect + +Collect starts collecting user input without playing media. The params argument exposes named fields that mirror Python's collect() parameters at relay/call.py:565. Pass a nil CollectParams to send an empty collect body. + +Wire shape (matches Python): + +``` +{"node_id":..., "call_id":..., "control_id":..., "digits":..., "speech":..., ...} +``` + +#### Signature + +```go +func (*Call) Collect(params *CollectParams) *StandaloneCollectAction +``` + +#### Parameters + + + +#### Returns + +`*StandaloneCollectAction` + +#### Examples + + + + ```go + {"node_id":..., "call_id":..., "control_id":..., "digits":..., "speech":..., ...} + ``` + + + + ```go + {"node_id":..., "call_id":..., "control_id":..., "digits":..., "speech":..., ...} + ``` + + + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 558. + +*** + +### Connect + +Connect bridges this call to one or more devices. + +#### Signature + +```go +func (*Call) Connect(devices [][]map[string]any, opts ...ConnectOption) error +``` + +#### Parameters + + + + + +#### Returns + +`error` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 906. + +*** + +### Context + +Context returns the RELAY context this call was received on. + +#### Signature + +```go +func (*Call) Context() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 90. + +*** + +### Denoise + +Denoise starts noise reduction on the call. + +#### Signature + +```go +func (*Call) Denoise() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 1309. + +*** + +### DenoiseStop + +DenoiseStop stops noise reduction on the call. + +#### Signature + +```go +func (*Call) DenoiseStop() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 1318. + +*** + +### Detect + +Detect starts a detection operation (e.g., answering machine detection). timeout is optional; pass nil to omit it from the request (matches Python's optional float timeout parameter). + +controlID is optional — pass "" to auto-generate. Matches Python's detect(\*, control\_id=None) at relay/call.py:654. + +#### Signature + +```go +func (*Call) Detect(detect map[string]any, timeout *float64, controlID ...string) *DetectAction +``` + +#### Parameters + + + + + + + +#### Returns + +`*DetectAction` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 954. + +*** + +### DetectAnsweringMachine + +DetectAnsweringMachine detects human vs answering machine (AMD). Typed convenience over Detect, mirroring Python's call.detect\_answering\_machine(\*, initial\_timeout, end\_silence\_timeout, machine\_voice\_threshold, machine\_words\_threshold, detect\_interruptions, detect\_message\_end, timeout). Only the options the caller supplies are emitted under params, matching Python's only-provided-keys behavior. + +Wire shape: detect \{"type":"machine","params":\{...only-provided...\}\} with an optional top-level timeout. + +#### Signature + +```go +func (*Call) DetectAnsweringMachine(opts ...AMDOption) *DetectAction +``` + +#### Parameters + + + +#### Returns + +`*DetectAction` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 732. + +*** + +### DetectDigit + +DetectDigit detects DTMF digits. Typed convenience over Detect, mirroring Python's call.detect\_digit(\*, digits, timeout). + +Wire shape: detect \{"type":"digit","params":\{digits?\}\} with an optional top-level timeout. + +#### Signature + +```go +func (*Call) DetectDigit(opts ...DetectDigitOption) *DetectAction +``` + +#### Parameters + + + +#### Returns + +`*DetectAction` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 706. + +*** + +### DetectFax + +DetectFax detects a fax tone (CED/CNG). Typed convenience over Detect, mirroring Python's call.detect\_fax(\*, tone, timeout). + +Wire shape: detect \{"type":"fax","params":\{tone?\}\} with an optional top-level timeout. + +#### Signature + +```go +func (*Call) DetectFax(opts ...DetectFaxOption) *DetectAction +``` + +#### Parameters + + + +#### Returns + +`*DetectAction` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 759. + +*** + +### Device + +Device returns the device map describing the endpoint of this call. + +#### Signature + +```go +func (*Call) Device() map[string]any +``` + +#### Returns + +`map[string]any` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 104. + +*** + +### Direction + +Direction returns the call direction ("inbound" or "outbound"). + +#### Signature + +```go +func (*Call) Direction() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 97. + +*** + +### Disconnect + +Disconnect tears down a previously established bridge. + +#### Signature + +```go +func (*Call) Disconnect() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 920. + +*** + +### Echo + +Echo starts echo mode on the call (echo audio back to the caller). Both timeout and statusURL are optional (nil omits them), matching Python's echo(\*, timeout: float|None, status\_url). + +#### Signature + +```go +func (*Call) Echo(timeout *float64, statusURL string) error +``` + +#### Parameters + + + + + +#### Returns + +`error` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 1461. + +*** + +### Hangup + +Hangup ends the call with the given reason. + +#### Signature + +```go +func (*Call) Hangup(reason string) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 329. + +*** + +### Hold + +Hold places the call on hold. + +#### Signature + +```go +func (*Call) Hold() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 1291. + +*** + +### JoinConference + +JoinConference joins the call to a named conference. + +#### Signature + +```go +func (*Call) JoinConference(name string, opts ...ConferenceOption) error +``` + +#### Parameters + + + + + +#### Returns + +`error` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 1149. + +*** + +### JoinRoom + +JoinRoom joins the call to a named room. statusURL is optional (empty string omits it), matching Python's join\_room(name, \*, status\_url). + +#### Signature + +```go +func (*Call) JoinRoom(name string, statusURL string) error +``` + +#### Parameters + + + + + +#### Returns + +`error` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 1332. + +*** + +### LeaveConference + +LeaveConference removes the call from a conference. + +#### Signature + +```go +func (*Call) LeaveConference(confID string) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 1163. + +*** + +### LeaveRoom + +LeaveRoom removes the call from the current room. + +#### Signature + +```go +func (*Call) LeaveRoom() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 1346. + +*** + +### LiveTranscribe + +LiveTranscribe starts or stops live transcription on the call. The action map describes the transcription operation (e.g. \{"type": "start"\}). Matches Python's live\_transcribe(action, \*\*kwargs). + +#### Signature + +```go +func (*Call) LiveTranscribe(action map[string]any) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 389. + +*** + +### LiveTranslate + +LiveTranslate starts or stops live translation on the call. The action map describes the translation operation. statusURL is optional (empty string omits it), matching Python's live\_translate(action, \*, status\_url). + +#### Signature + +```go +func (*Call) LiveTranslate(action map[string]any, statusURL string) error +``` + +#### Parameters + + + + + +#### Returns + +`error` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 401. + +*** + +### NodeID + +NodeID returns the node handling this call. + +#### Signature + +```go +func (*Call) NodeID() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 58. + +*** + +### On + +On registers a handler for a specific event type on this call. + +#### Signature + +```go +func (*Call) On(eventType string, handler func(*RelayEvent)) +``` + +#### Parameters + + + + + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 122. + +*** + +### Pass + +Pass passes the call to the next context handler without answering. + +#### Signature + +```go +func (*Call) Pass() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 342. + +*** + +### Pay + +Pay starts a payment collection session on the call. Use PayOption functional options to supply any of the 20+ optional parameters that Python's pay() exposes (input\_method, status\_url, payment\_method, timeout, max\_attempts, security\_code, postal\_code, min\_postal\_code\_length, token\_type, charge\_amount, currency, language, voice, description, valid\_card\_types, parameters, prompts). + +Use WithPayControlID for an explicit control\_id (matches Python's pay(control\_id=...)). + +#### Signature + +```go +func (*Call) Pay(connectorURL string, opts ...PayOption) *PayAction +``` + +#### Parameters + + + + + +#### Returns + +`*PayAction` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 1489. + +*** + +### Play + +Play starts playing media on the call and returns a PlayAction. + +Use WithPlayControlID to supply an explicit control\_id (mirrors Python's play(control\_id=...)). When omitted the SDK auto-generates a UUID — same as Python's `cid = control_id or str(uuid.uuid4())` at relay/call.py:506. + +#### Signature + +```go +func (*Call) Play(media []map[string]any, opts ...PlayOption) *PlayAction +``` + +#### Parameters + + + + + +#### Returns + +`*PlayAction` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 424. + +*** + +### PlayAndCollect + +PlayAndCollect plays media while collecting input (DTMF or speech). + +Honors WithPlayControlID for an explicit control\_id (mirrors Python's play\_and\_collect(control\_id=...)). Note the gotcha at RELAY\_IMPLEMENTATION\_GUIDE.md: this action listens on the calling.call.collect terminal event, NOT calling.call.play(finished). + +#### Signature + +```go +func (*Call) PlayAndCollect( + media []map[string]any, + collect map[string]any, + opts ...PlayOption +) *CollectAction +``` + +#### Parameters + + + + + + + +#### Returns + +`*CollectAction` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 478. + +*** + +### PlayAudio + +PlayAudio plays an audio file from a URL. Typed convenience over Play, mirroring Python's call.play\_audio(url, \*, volume). + +Wire shape: play \[\{"type":"audio","params":\{"url":...\}\}] with an optional top-level volume. + +#### Signature + +```go +func (*Call) PlayAudio(url string, opts ...AudioOption) *PlayAction +``` + +#### Parameters + + + + + +#### Returns + +`*PlayAction` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 657. + +*** + +### PlayRingtone + +PlayRingtone plays a named ringtone by country code. Typed convenience over Play, mirroring Python's call.play\_ringtone(name, \*, duration, volume). + +Wire shape: play \[\{"type":"ringtone","params":\{"name":..., duration?\}\}] with an optional top-level volume. + +#### Signature + +```go +func (*Call) PlayRingtone(name string, opts ...RingtoneOption) *PlayAction +``` + +#### Parameters + + + + + +#### Returns + +`*PlayAction` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 684. + +*** + +### PlaySilence + +PlaySilence plays silence for duration seconds. Typed convenience over Play, mirroring Python's call.play\_silence(duration). + +Wire shape: play \[\{"type":"silence","params":\{"duration":...\}\}]. + +#### Signature + +```go +func (*Call) PlaySilence(duration float64) *PlayAction +``` + +#### Parameters + + + +#### Returns + +`*PlayAction` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 674. + +*** + +### PlayTTS + +PlayTTS plays text-to-speech. Typed convenience over Play, mirroring Python's call.play\_tts(text, \*, language, gender, voice, volume). + +Wire shape: play \[\{"type":"tts","params":\{"text":..., language?, gender?, voice?\}\}] with an optional top-level volume. + +#### Signature + +```go +func (*Call) PlayTTS(text string, opts ...TTSOption) *PlayAction +``` + +#### Parameters + + + + + +#### Returns + +`*PlayAction` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 629. + +*** + +### ProjectID + +ProjectID returns the project ID associated with this call. + +#### Signature + +```go +func (*Call) ProjectID() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 83. + +*** + +### PromptAudio + +PromptAudio plays an audio file then collects input. Typed media over PlayAndCollect, mirroring Python's call.prompt\_audio(url, collect, \*, volume). + +Wire shape: play\_and\_collect \[\{"type":"audio","params":\{"url":...\}\}] with the given collect object and an optional top-level volume. + +#### Signature + +```go +func (*Call) PromptAudio(url string, collect map[string]any, opts ...AudioOption) *CollectAction +``` + +#### Parameters + + + + + + + +#### Returns + +`*CollectAction` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 812. + +*** + +### PromptTTS + +PromptTTS plays TTS then collects input. Typed media over PlayAndCollect, mirroring Python's call.prompt\_tts(text, collect, \*, language, gender, voice, volume). + +Wire shape: play\_and\_collect \[\{"type":"tts","params":\{"text":..., language?, gender?, voice?\}\}] with the given collect object and an optional top-level volume. + +#### Signature + +```go +func (*Call) PromptTTS(text string, collect map[string]any, opts ...TTSOption) *CollectAction +``` + +#### Parameters + + + + + + + +#### Returns + +`*CollectAction` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 783. + +*** + +### QueueEnter + +QueueEnter places the call in a named queue. statusURL is optional (empty string omits it), matching Python's queue\_enter(queue\_name, \*, control\_id, status\_url) at signalwire/relay/call.py:1268. A per-request control\_id is generated so the server can correlate this action with subsequent events. + +#### Signature + +```go +func (*Call) QueueEnter(name string, statusURL string) error +``` + +#### Parameters + + + + + +#### Returns + +`error` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 1358. + +*** + +### QueueLeave + +QueueLeave removes the call from the named queue. queueID and statusURL are optional (empty string omits each), matching Python's queue\_leave(queue\_name, \*, control\_id, queue\_id, status\_url) at signalwire/relay/call.py:1287. A per-request control\_id is generated. + +#### Signature + +```go +func (*Call) QueueLeave(name string, queueID string, statusURL string) error +``` + +#### Parameters + + + + + + + +#### Returns + +`error` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 1376. + +*** + +### ReceiveFax + +ReceiveFax starts receiving a fax on the call. Use WithFaxControlID to supply an explicit control\_id. + +#### Signature + +```go +func (*Call) ReceiveFax(opts ...FaxOption) *FaxAction +``` + +#### Parameters + + + +#### Returns + +`*FaxAction` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 1032. + +*** + +### Record + +Record starts recording the call and returns a RecordAction. + +Use WithRecordAudio to supply the audio config map (Python's record(audio=...)) and WithRecordControlID to fix the control\_id. Other RecordOption helpers set top-level fields directly (e.g. WithRecordBeep, WithRecordFormat); these are folded into the "record": \{"audio": \{...\}\} object on transmit so the wire shape matches Python: \{"record": \{"audio": \{...\}\}\}. + +#### Signature + +```go +func (*Call) Record(opts ...RecordOption) *RecordAction +``` + +#### Parameters + + + +#### Returns + +`*RecordAction` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 837. + +*** + +### Refer + +Refer transfers a SIP call to an external SIP endpoint via a REFER request. statusURL is optional (empty string omits it), matching Python's refer(device, \*, status\_url). + +#### Signature + +```go +func (*Call) Refer(device map[string]any, statusURL string) error +``` + +#### Parameters + + + + + +#### Returns + +`error` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 369. + +*** + +### SegmentID + +SegmentID returns the segment identifier for this call leg. + +#### Signature + +```go +func (*Call) SegmentID() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 111. + +*** + +### SendDigits + +SendDigits sends DTMF digits on the call. + +#### Signature + +```go +func (*Call) SendDigits(digits string) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 933. + +*** + +### SendFax + +SendFax sends a fax document on the call. Use WithFaxHeaderInfo for the fax header string and WithFaxControlID for an explicit control\_id. + +#### Signature + +```go +func (*Call) SendFax(document string, identity string, opts ...FaxOption) *FaxAction +``` + +#### Parameters + + + + + + + +#### Returns + +`*FaxAction` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 994. + +*** + +### State + +State returns the current call state. + +#### Signature + +```go +func (*Call) State() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 64. + +*** + +### Stream + +Stream starts streaming call audio to a WebSocket URL. Use WithStreamControlID for an explicit control\_id (matches Python's stream(control\_id=...)). + +#### Signature + +```go +func (*Call) Stream(url string, opts ...StreamOption) *StreamAction +``` + +#### Parameters + + + + + +#### Returns + +`*StreamAction` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 1111. + +*** + +### String + +String returns a human-readable representation of the call. + +#### Signature + +```go +func (*Call) String() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 1568. + +*** + +### Tag + +Tag returns the client-generated correlation tag. + +#### Signature + +```go +func (*Call) Tag() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 61. + +*** + +### Tap + +Tap starts tapping the call audio to an external destination. The optional controlID argument supplies an explicit control\_id (matches Python's tap(control\_id=...)). Pass "" or omit to auto-generate. + +#### Signature + +```go +func (*Call) Tap(tap map[string]any, device map[string]any, controlID ...string) *TapAction +``` + +#### Parameters + + + + + + + +#### Returns + +`*TapAction` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 1071. + +*** + +### Transcribe + +Transcribe starts real-time transcription on the call. The optional controlID argument supplies an explicit control\_id (matches Python's transcribe(control\_id=...)). + +#### Signature + +```go +func (*Call) Transcribe(statusURL string, controlID ...string) *TranscribeAction +``` + +#### Parameters + + + + + +#### Returns + +`*TranscribeAction` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 1529. + +*** + +### Transfer + +Transfer transfers call control to another RELAY app or SWML script. The dest parameter is the destination context/URL string, sent as the "dest" key to the server (matches Python's transfer(dest: str) behavior). + +#### Signature + +```go +func (*Call) Transfer(dest string) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 353. + +*** + +### Unhold + +Unhold takes the call off hold. + +#### Signature + +```go +func (*Call) Unhold() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 1300. + +*** + +### UserEvent + +UserEvent sends a user-defined event on the call. eventName is the custom event identifier; pass "" to omit it. Optional `extra` maps are merged into the top-level wire params (mirroring Python's \*\*kwargs in user\_event(\*, event: Optional\[str] = None, \*\*kwargs)). + +Wire shape (matches Python): \{"event": \, ...extra\}. + +#### Signature + +```go +func (*Call) UserEvent(eventName string, extra ...map[string]any) error +``` + +#### Parameters + + + + + +#### Returns + +`error` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 1441. + +*** + +### WaitFor + +WaitFor blocks until an event matching the given type and predicate is received, or the context expires. + +#### Signature + +```go +func (*Call) WaitFor(ctx context.Context, eventType string, predicate func(*RelayEvent) bool) (*RelayEvent, error) +``` + +#### Parameters + + + + + + + +#### Returns + +`(*RelayEvent, error)` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 130. + +*** + +### WaitForAnswered + +WaitForAnswered blocks until the call is answered (returns immediately if already answered or past it). Typed wait over WaitFor, mirroring Python's call.wait\_for\_answered(timeout). + +#### Signature + +```go +func (*Call) WaitForAnswered(ctx context.Context) (*RelayEvent, error) +``` + +#### Parameters + + + +#### Returns + +`(*RelayEvent, error)` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 197. + +*** + +### WaitForEnded + +WaitForEnded blocks until the call reaches the "ended" state, or the context expires. This mirrors Python's wait\_for\_ended() which awaits the \_ended asyncio.Future. + +#### Signature + +```go +func (*Call) WaitForEnded(ctx context.Context) (*RelayEvent, error) +``` + +#### Parameters + + + +#### Returns + +`(*RelayEvent, error)` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 151. + +*** + +### WaitForEnding + +WaitForEnding blocks until the call is ending (returns immediately if already ending or past it). Typed wait over WaitFor, mirroring Python's call.wait\_for\_ending(timeout). + +#### Signature + +```go +func (*Call) WaitForEnding(ctx context.Context) (*RelayEvent, error) +``` + +#### Parameters + + + +#### Returns + +`(*RelayEvent, error)` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 211. + +*** + +### WaitForRinging + +WaitForRinging blocks until the call is ringing (returns immediately if already ringing or past it). Typed wait over WaitFor, mirroring Python's call.wait\_for\_ringing(timeout). + +#### Signature + +```go +func (*Call) WaitForRinging(ctx context.Context) (*RelayEvent, error) +``` + +#### Parameters + + + +#### Returns + +`(*RelayEvent, error)` + +#### Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 204. + +## Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 16. diff --git a/fern/products/sdk-reference/go/relay/relay/calling-error-event/index.mdx b/fern/products/sdk-reference/go/relay/relay/calling-error-event/index.mdx new file mode 100644 index 0000000000..874969c8ac --- /dev/null +++ b/fern/products/sdk-reference/go/relay/relay/calling-error-event/index.mdx @@ -0,0 +1,39 @@ +--- +slug: "/reference/go/relay/relay/calling-error-event" +title: "CallingErrorEvent" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.CallingErrorEvent" + parent: "relay.relay" + module: "relay.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" +--- +# `CallingErrorEvent` + +CallingErrorEvent represents a calling.call.error event. + +## Signature + +```go +type CallingErrorEvent struct +``` + +## Properties + + + + + + + + + +## Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 684. diff --git a/fern/products/sdk-reference/go/relay/relay/client/index.mdx b/fern/products/sdk-reference/go/relay/relay/client/index.mdx new file mode 100644 index 0000000000..bb4f782d5e --- /dev/null +++ b/fern/products/sdk-reference/go/relay/relay/client/index.mdx @@ -0,0 +1,613 @@ +--- +slug: "/reference/go/relay/relay/client" +title: "Client" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.Client" + parent: "relay.relay" + module: "relay.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go" +--- +# `Client` + +Client is the main RELAY WebSocket client that manages a persistent connection to SignalWire, handles Blade/JSON-RPC 2.0 authentication, event dispatch, and exposes high-level Dial/SendMessage methods. + +## Signature + +```go +type Client struct +``` + +## Methods + +### Authenticate + +Authenticate runs the signalwire.connect handshake and stores the server-issued protocol string. Mirrors Python's RelayClient.connect() auth phase. Use Connect first to establish the WebSocket; this call reads the auth response synchronously (the read loop has not yet started so no other reader is contending for the socket). + +#### Signature + +```go +func (*Client) Authenticate() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) + +Line 317. + +*** + +### AuthorizationState + +AuthorizationState returns the most recent encrypted authorization state blob received via signalwire.authorization.state events. Mirrors Python's RelayClient.\_authorization\_state used during reconnection (relay/client.py:174). Empty until the server pushes such an event. + +#### Signature + +```go +func (*Client) AuthorizationState() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) + +Line 170. + +*** + +### Connect + +Connect establishes the WebSocket connection to SignalWire. This is the public equivalent of the internal connect() method, mirroring Python's async connect() which is also used in the async-with context manager. In most cases callers should use Run() which calls Connect internally and then drives the read loop. + +#### Signature + +```go +func (*Client) Connect() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) + +Line 181. + +*** + +### Contexts + +Contexts returns a copy of the configured RELAY contexts. Mirrors Python's public client.contexts attribute. The returned slice is a copy — mutating it does not affect the client. + +#### Signature + +```go +func (*Client) Contexts() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) + +Line 159. + +*** + +### Dial + +Dial initiates an outbound call to the given device list. The devices parameter is a list of serial/parallel device groups (same structure as the Blade calling.dial devices field). + +Mirrors Python's RelayClient.dial(devices, \*, tag=None, max\_duration=None, dial\_timeout=None). The calling.dial RPC response only contains \{"code": "200", "message": "Dialing"\} — no call\_id. The real call\_id and node\_id arrive via subsequent calling.call.dial events keyed by tag. This method waits for that event so the returned Call always has valid identifiers. + +To pass a caller-supplied tag, use WithDialTag. Without it the SDK generates a UUID, matching Python's tag = tag or str(uuid.uuid4()). + +Dial delegates to DialContext with context.Background(); use DialContext to abort the dial via a caller-controlled context (cancellation or deadline). + +#### Signature + +```go +func (*Client) Dial(devices [][]map[string]any, opts ...DialOption) (*Call, error) +``` + +#### Parameters + + + + + +#### Returns + +`(*Call, error)` + +#### Source + +[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) + +Line 380. + +*** + +### DialContext + +DialContext is the context-aware form of Dial: in addition to the dial-timeout and the client's own lifecycle, it aborts when ctx is cancelled or its deadline passes, returning ctx.Err() (wrapping context.Canceled / context.DeadlineExceeded). This is a Go-port addition — the Python reference's dial() has no caller-cancellation channel (documented in PORT\_ADDITIONS.md). + +Error sentinels (errors.Is-able): a per-dial timeout wraps ErrDialTimeout, a server "failed" dial\_state wraps ErrDialFailed, and an RPC-send failure against a torn-down socket surfaces ErrNotConnected from the transport. + +#### Signature + +```go +func (*Client) DialContext(ctx context.Context, devices [][]map[string]any, opts ...DialOption) (*Call, error) +``` + +#### Parameters + + + + + + + +#### Returns + +`(*Call, error)` + +#### Source + +[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) + +Line 394. + +*** + +### Execute + +Execute sends a JSON-RPC request over the WebSocket and waits for the response. Mirrors Python's async execute(method, params) which is the public arbitrary-RPC surface used by callers that need low-level access. + +#### Signature + +```go +func (*Client) Execute(method string, params map[string]any) (json.RawMessage, error) +``` + +#### Parameters + + + + + +#### Returns + +`(json.RawMessage, error)` + +#### Source + +[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) + +Line 188. + +*** + +### JWTToken + +JWTToken returns the configured JWT. Mirrors Python's public client.jwt\_token attribute, allowing callers to read back the value supplied via WithJWT(...). + +#### Signature + +```go +func (*Client) JWTToken() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) + +Line 141. + +*** + +### Notify + +Notify sends a JSON-RPC notification (no `id`, no response expected) with the given method and params. Used for fire-and-forget frames such as the client-side `signalwire.event` ACK pattern that some integration fixtures expect. Returns any write error from the underlying socket. + +#### Signature + +```go +func (*Client) Notify(method string, params map[string]any) error +``` + +#### Parameters + + + + + +#### Returns + +`error` + +#### Source + +[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) + +Line 197. + +*** + +### OnCall + +OnCall registers a handler invoked for each inbound call. + +#### Signature + +```go +func (*Client) OnCall(handler func(*Call)) +``` + +#### Parameters + + + +#### Source + +[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) + +Line 86. + +*** + +### OnEvent + +OnEvent registers a handler invoked for every inbound `signalwire.event` frame, AFTER type-specific routing (call, messaging) has run. The handler receives the raw event\_type string and params map. This is the lowest-level event hook — most callers should use OnCall or OnMessage instead. Mirrors Python RelayClient's public event-tap surface used by integration tests. + +#### Signature + +```go +func (*Client) OnEvent(handler func(eventType string, params map[string]any)) +``` + +#### Parameters + + + +#### Source + +[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) + +Line 105. + +*** + +### OnMessage + +OnMessage registers a handler invoked for each inbound message. + +#### Signature + +```go +func (*Client) OnMessage(handler func(*Message)) +``` + +#### Parameters + + + +#### Source + +[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) + +Line 93. + +*** + +### ProjectID + +ProjectID returns the configured project ID. Mirrors Python's public client.project attribute, allowing callers to read back the value supplied via WithProject(...) or the SIGNALWIRE\_PROJECT\_ID env var. + +#### Signature + +```go +func (*Client) ProjectID() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) + +Line 123. + +*** + +### Receive + +Receive subscribes to additional contexts for inbound events after the client is already connected. Sends signalwire.receive on the assigned protocol. Mirrors Python's async receive(contexts). + +#### Signature + +```go +func (*Client) Receive(contexts ...string) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) + +Line 209. + +*** + +### RelayProtocol + +RelayProtocol returns the server-assigned protocol string received during authentication. Mirrors Python's relay\_protocol property. The value is empty until after a successful Connect/Run. + +#### Signature + +```go +func (*Client) RelayProtocol() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) + +Line 114. + +*** + +### Run + +Run connects to SignalWire, authenticates, subscribes to configured contexts, and starts the read loop. It blocks until Stop is called or the context is cancelled. + +Important: the read loop must be running before subscribeContexts() is called. subscribeContexts() executes a JSON-RPC request whose response is delivered through the read loop's pending-id channel machinery. If the read loop isn't running, the JSON-RPC reply has no reader and the request times out (30s). Hence we start readLoop in a goroutine BEFORE the subscribe call, then block on a done channel here. + +#### Signature + +```go +func (*Client) Run() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) + +Line 243. + +*** + +### RunContext + +RunContext is the context-aware form of Run. It behaves identically to Run (connect, authenticate, subscribe, drive the read loop, block) but also stops cleanly when ctx is cancelled or its deadline passes — equivalent to another goroutine calling Stop(). On a ctx-driven shutdown it returns ctx.Err() (wrapping context.Canceled / context.DeadlineExceeded); on a caller Stop() it returns nil, matching Run. + +This is a Go-port addition (the Python reference's run()/serve loop has no caller-supplied cancellation token); documented in PORT\_ADDITIONS.md. + +#### Signature + +```go +func (*Client) RunContext(ctx context.Context) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) + +Line 256. + +*** + +### SendMessage + +SendMessage sends an SMS/MMS message and returns a Message that can be used to track delivery. + +The context option (WithMessageContext) sets the routing context for the message; it defaults to the relay protocol when omitted, matching Python SDK behaviour. The on\_completed option (WithMessageOnCompleted) registers a callback fired when the message reaches a terminal state. + +#### Signature + +```go +func (*Client) SendMessage(to string, from string, body string, opts ...MessageOption) (*Message, error) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`(*Message, error)` + +#### Source + +[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) + +Line 471. + +*** + +### Space + +Space returns the configured SignalWire space hostname. Mirrors Python's public client.host attribute (Python uses the term "host"; Go uses "space" because that's the more accurate noun — see WithSpace). + +#### Signature + +```go +func (*Client) Space() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) + +Line 150. + +*** + +### StartReadLoop + +StartReadLoop spawns the read goroutine and marks the client running. Mirrors the goroutine-spawn portion of Run() — call it after Authenticate() and before any Execute() call so JSON-RPC responses have a reader. Pair with Stop() to terminate. + +#### Signature + +```go +func (*Client) StartReadLoop() +``` + +#### Source + +[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) + +Line 325. + +*** + +### Stop + +Stop gracefully shuts down the client connection. + +Equivalent to Python's RelayClient.disconnect() (relay/client.py:286). Python users porting code can search for "disconnect" and find this method by its rename. + +#### Signature + +```go +func (*Client) Stop() +``` + +#### Source + +[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) + +Line 342. + +*** + +### SubscribeContexts + +SubscribeContexts subscribes to whatever contexts were configured via WithContexts. No-op when the contexts slice is empty. Used by the mock-relay test helper which drives connect/auth/read-loop manually. + +#### Signature + +```go +func (*Client) SubscribeContexts() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) + +Line 333. + +*** + +### Token + +Token returns the configured API token. Mirrors Python's public client.token attribute, allowing callers to read back the value supplied via WithToken(...) or the SIGNALWIRE\_API\_TOKEN env var. + +#### Signature + +```go +func (*Client) Token() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) + +Line 132. + +*** + +### Unreceive + +Unreceive unsubscribes from contexts for inbound events. Sends signalwire.unreceive on the assigned protocol. Mirrors Python's async unreceive(contexts). + +#### Signature + +```go +func (*Client) Unreceive(contexts ...string) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) + +Line 222. + +## Source + +[`pkg/relay/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go) + +Line 24. diff --git a/fern/products/sdk-reference/go/relay/relay/collect-action/index.mdx b/fern/products/sdk-reference/go/relay/relay/collect-action/index.mdx new file mode 100644 index 0000000000..e5bd37c032 --- /dev/null +++ b/fern/products/sdk-reference/go/relay/relay/collect-action/index.mdx @@ -0,0 +1,103 @@ +--- +slug: "/reference/go/relay/relay/collect-action" +title: "CollectAction" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.CollectAction" + parent: "relay.relay" + module: "relay.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go" +--- +# `CollectAction` + +CollectAction represents a play-and-collect operation. + +## Signature + +```go +type CollectAction struct +``` + +## Properties + + + +## Methods + +### StartInputTimers + +StartInputTimers starts the initial\_timeout timer on an active collect, equivalent to Python's CollectAction.start\_input\_timers(). + +#### Signature + +```go +func (*CollectAction) StartInputTimers() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 332. + +*** + +### Stop + +Stop sends calling.play\_and\_collect.stop to halt the play-and-collect operation. + +#### Signature + +```go +func (*CollectAction) Stop() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 303. + +*** + +### Volume + +Volume adjusts the playback volume by the given dB offset during a play-and-collect operation. + +#### Signature + +```go +func (*CollectAction) Volume(db float64) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 317. + +## Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 288. diff --git a/fern/products/sdk-reference/go/relay/relay/collect-event/index.mdx b/fern/products/sdk-reference/go/relay/relay/collect-event/index.mdx new file mode 100644 index 0000000000..f8b2ccca82 --- /dev/null +++ b/fern/products/sdk-reference/go/relay/relay/collect-event/index.mdx @@ -0,0 +1,43 @@ +--- +slug: "/reference/go/relay/relay/collect-event" +title: "CollectEvent" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.CollectEvent" + parent: "relay.relay" + module: "relay.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" +--- +# `CollectEvent` + +CollectEvent represents a calling.call.collect event. + +## Signature + +```go +type CollectEvent struct +``` + +## Properties + + + + + Final is a \*bool matching Python's Optional\[bool] = None semantics. + + + + + + + + +## Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 333. diff --git a/fern/products/sdk-reference/go/relay/relay/collect-params/index.mdx b/fern/products/sdk-reference/go/relay/relay/collect-params/index.mdx new file mode 100644 index 0000000000..5aad327039 --- /dev/null +++ b/fern/products/sdk-reference/go/relay/relay/collect-params/index.mdx @@ -0,0 +1,67 @@ +--- +slug: "/reference/go/relay/relay/collect-params" +title: "CollectParams" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.CollectParams" + parent: "relay.relay" + module: "relay.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go" +--- +# `CollectParams` + +CollectParams holds named parameters for the Collect method, matching Python's collect() named arguments. The fields are placed at the top level of the on-wire calling.collect frame (NOT nested under a "collect" object) — mirroring Python's params\["digits"] = digits at relay/call.py:583. + +## Signature + +```go +type CollectParams struct +``` + +## Properties + + + Continuous enables continuous collection after a result is received. + + + + ControlID overrides the auto-generated control identifier. + + + + Digits configures DTMF digit collection. + + + + InitialTimeout is the number of seconds to wait for first input. + + + + OnCompleted is fired when the collect action reaches a terminal state. + + + + PartialResults enables streaming partial results as input is gathered. + + + + SendStartOfInput signals when the user begins speaking/pressing. + + + + Speech configures speech recognition collection. + + + + StartInputTimers controls whether input timers start immediately. + + +## Source + +[`pkg/relay/call.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go) + +Line 529. diff --git a/fern/products/sdk-reference/go/relay/relay/conference-event/index.mdx b/fern/products/sdk-reference/go/relay/relay/conference-event/index.mdx new file mode 100644 index 0000000000..934e94b8de --- /dev/null +++ b/fern/products/sdk-reference/go/relay/relay/conference-event/index.mdx @@ -0,0 +1,43 @@ +--- +slug: "/reference/go/relay/relay/conference-event" +title: "ConferenceEvent" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.ConferenceEvent" + parent: "relay.relay" + module: "relay.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" +--- +# `ConferenceEvent` + +ConferenceEvent represents a calling.call.conference event. + +## Signature + +```go +type ConferenceEvent struct +``` + +## Properties + + + + + + + + + + + Status reads wire key "status" matching Python's status field. (Replaces the previous State field which incorrectly read "state".) + + +## Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 661. diff --git a/fern/products/sdk-reference/go/relay/relay/connect-event/index.mdx b/fern/products/sdk-reference/go/relay/relay/connect-event/index.mdx new file mode 100644 index 0000000000..e5f94c35c6 --- /dev/null +++ b/fern/products/sdk-reference/go/relay/relay/connect-event/index.mdx @@ -0,0 +1,37 @@ +--- +slug: "/reference/go/relay/relay/connect-event" +title: "ConnectEvent" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.ConnectEvent" + parent: "relay.relay" + module: "relay.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" +--- +# `ConnectEvent` + +ConnectEvent represents a calling.call.connect event. + +## Signature + +```go +type ConnectEvent struct +``` + +## Properties + + + + + + + +## Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 355. diff --git a/fern/products/sdk-reference/go/relay/relay/denoise-event/index.mdx b/fern/products/sdk-reference/go/relay/relay/denoise-event/index.mdx new file mode 100644 index 0000000000..0fffb659e8 --- /dev/null +++ b/fern/products/sdk-reference/go/relay/relay/denoise-event/index.mdx @@ -0,0 +1,41 @@ +--- +slug: "/reference/go/relay/relay/denoise-event" +title: "DenoiseEvent" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.DenoiseEvent" + parent: "relay.relay" + module: "relay.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" +--- +# `DenoiseEvent` + +DenoiseEvent represents a calling.call.denoise event. + +## Signature + +```go +type DenoiseEvent struct +``` + +## Properties + + + + + Denoised matches Python's denoised bool field. + + + + + + +## Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 527. diff --git a/fern/products/sdk-reference/go/relay/relay/detect-action/index.mdx b/fern/products/sdk-reference/go/relay/relay/detect-action/index.mdx new file mode 100644 index 0000000000..790f21aee3 --- /dev/null +++ b/fern/products/sdk-reference/go/relay/relay/detect-action/index.mdx @@ -0,0 +1,55 @@ +--- +slug: "/reference/go/relay/relay/detect-action" +title: "DetectAction" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.DetectAction" + parent: "relay.relay" + module: "relay.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go" +--- +# `DetectAction` + +DetectAction represents a long-running detect operation (e.g. machine detection). + +## Signature + +```go +type DetectAction struct +``` + +## Properties + + + +## Methods + +### Stop + +Stop sends calling.detect.stop to halt the active detect operation. + +#### Signature + +```go +func (*DetectAction) Stop() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 275. + +## Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 258. diff --git a/fern/products/sdk-reference/go/relay/relay/detect-event/index.mdx b/fern/products/sdk-reference/go/relay/relay/detect-event/index.mdx new file mode 100644 index 0000000000..95fc28fe61 --- /dev/null +++ b/fern/products/sdk-reference/go/relay/relay/detect-event/index.mdx @@ -0,0 +1,37 @@ +--- +slug: "/reference/go/relay/relay/detect-event" +title: "DetectEvent" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.DetectEvent" + parent: "relay.relay" + module: "relay.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" +--- +# `DetectEvent` + +DetectEvent represents a calling.call.detect event. + +## Signature + +```go +type DetectEvent struct +``` + +## Properties + + + + + + + +## Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 372. diff --git a/fern/products/sdk-reference/go/relay/relay/device/index.mdx b/fern/products/sdk-reference/go/relay/relay/device/index.mdx new file mode 100644 index 0000000000..1db40a9add --- /dev/null +++ b/fern/products/sdk-reference/go/relay/relay/device/index.mdx @@ -0,0 +1,85 @@ +--- +slug: "/reference/go/relay/relay/device" +title: "Device" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.Device" + parent: "relay.relay" + module: "relay.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/device.go" +--- +# `Device` + +Device is a typed view of the \{type, params\} object that RELAY passes across connect / refer / dial / tap. It types the SHAPE only — the discriminant `type` stays a string because the set of device types is NOT schema-enumerated (the wire schema declares `type` as a free string; grounding: porting-sdk/relay-protocol/calling.\{connect,dial,refer,tap\}. params.json, where each device is \{required:\["type"], properties:\{type: \{type:string\}, params:\{\}\}\}). + +Device is purely ADDITIVE: the raw-map path is unchanged — Call.Connect, Client.Dial/DialContext, Call.Refer and the tap helpers all still take map\[string]any / \[]\[]map\[string]any. ToMap() (and json.Marshal via MarshalJSON) yield the IDENTICAL wire shape — \{"type": \, "params": \\} — so a Device can be dropped in anywhere a hand-written device map is used, byte-for-byte. Params is left `any` to carry whatever the specific device type expects (e.g. phone: \{to\_number, from\_number\}; sip: \{to, from, headers\}); when nil it serialises as an empty object to match the canonical hand-written `"params": map[string]any{}`. + +## Signature + +```go +type Device struct +``` + +## Properties + + + Params is the device-type-specific parameter object. Typically a map\[string]any; left `any` so callers pass the shape the type needs. + + + + Type is the device discriminant (e.g. "phone", "sip"). Kept a string — the value set is open / not schema-enumerated. + + +## Methods + +### MarshalJSON + +MarshalJSON makes a Device serialise identically to its ToMap() form, so a Device used directly inside a params payload produces the same bytes as the equivalent raw map. + +#### Signature + +```go +func (Device) MarshalJSON() ([]byte, error) +``` + +#### Returns + +`([]byte, error)` + +#### Source + +[`pkg/relay/device.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/device.go) + +Line 59. + +*** + +### ToMap + +ToMap renders the Device as the raw wire map \{"type":…, "params":…\}, byte-identical to the hand-written map\[string]any callers pass to Connect/Dial/Refer/tap. A nil Params becomes an empty object. + +#### Signature + +```go +func (Device) ToMap() map[string]any +``` + +#### Returns + +`map[string]any` + +#### Source + +[`pkg/relay/device.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/device.go) + +Line 49. + +## Source + +[`pkg/relay/device.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/device.go) + +Line 22. diff --git a/fern/products/sdk-reference/go/relay/relay/dial-event/index.mdx b/fern/products/sdk-reference/go/relay/relay/dial-event/index.mdx new file mode 100644 index 0000000000..e303af13a0 --- /dev/null +++ b/fern/products/sdk-reference/go/relay/relay/dial-event/index.mdx @@ -0,0 +1,69 @@ +--- +slug: "/reference/go/relay/relay/dial-event" +title: "DialEvent" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.DialEvent" + parent: "relay.relay" + module: "relay.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" +--- +# `DialEvent` + +DialEvent represents a calling.call.dial event. + +## Signature + +```go +type DialEvent struct +``` + +## Properties + + + Call is the nested call dict, matching Python's call field. + + + + + + DialState reads wire key "dial\_state" matching Python's dial\_state field. (Replaces the previous State field which incorrectly read "state".) + + + + + + + + +## Methods + +### DialStateTyped + +DialStateTyped returns the dial outcome as a typed DialState ALONGSIDE the bare-string DialState field (kept for parity with the Python reference). The typed kind gives callers IsTerminal()/IsKnown() predicates and compile-time distinctness from CallState/MessageState; its underlying string equals the DialState field exactly. Additive port idiom — see states.go and PORT\_ADDITIONS.md. + +#### Signature + +```go +func (*DialEvent) DialStateTyped() DialState +``` + +#### Returns + +`DialState` + +#### Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 499. + +## Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 468. diff --git a/fern/products/sdk-reference/go/relay/relay/echo-event/index.mdx b/fern/products/sdk-reference/go/relay/relay/echo-event/index.mdx new file mode 100644 index 0000000000..d0dd67e0ab --- /dev/null +++ b/fern/products/sdk-reference/go/relay/relay/echo-event/index.mdx @@ -0,0 +1,37 @@ +--- +slug: "/reference/go/relay/relay/echo-event" +title: "EchoEvent" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.EchoEvent" + parent: "relay.relay" + module: "relay.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" +--- +# `EchoEvent` + +EchoEvent represents a calling.call.echo event. + +## Signature + +```go +type EchoEvent struct +``` + +## Properties + + + + + + + +## Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 596. diff --git a/fern/products/sdk-reference/go/relay/relay/fax-action/index.mdx b/fern/products/sdk-reference/go/relay/relay/fax-action/index.mdx new file mode 100644 index 0000000000..1e31549fb4 --- /dev/null +++ b/fern/products/sdk-reference/go/relay/relay/fax-action/index.mdx @@ -0,0 +1,55 @@ +--- +slug: "/reference/go/relay/relay/fax-action" +title: "FaxAction" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.FaxAction" + parent: "relay.relay" + module: "relay.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go" +--- +# `FaxAction` + +FaxAction represents a long-running fax send/receive operation. methodPrefix distinguishes "send\_fax" from "receive\_fax" and is used to build the operation-specific stop command (e.g. "calling.send\_fax.stop"). + +## Signature + +```go +type FaxAction struct +``` + +## Properties + + + +## Methods + +### Stop + +Stop sends "calling.\{methodPrefix\}.stop" (e.g. "calling.send\_fax.stop" or "calling.receive\_fax.stop") to halt the active fax operation. + +#### Signature + +```go +func (*FaxAction) Stop() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 407. + +## Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 388. diff --git a/fern/products/sdk-reference/go/relay/relay/fax-event/index.mdx b/fern/products/sdk-reference/go/relay/relay/fax-event/index.mdx new file mode 100644 index 0000000000..62665edf16 --- /dev/null +++ b/fern/products/sdk-reference/go/relay/relay/fax-event/index.mdx @@ -0,0 +1,37 @@ +--- +slug: "/reference/go/relay/relay/fax-event" +title: "FaxEvent" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.FaxEvent" + parent: "relay.relay" + module: "relay.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" +--- +# `FaxEvent` + +FaxEvent represents a calling.call.fax event. + +## Signature + +```go +type FaxEvent struct +``` + +## Properties + + + + + + + +## Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 389. diff --git a/fern/products/sdk-reference/go/relay/relay/hold-event/index.mdx b/fern/products/sdk-reference/go/relay/relay/hold-event/index.mdx new file mode 100644 index 0000000000..8d0d473bfb --- /dev/null +++ b/fern/products/sdk-reference/go/relay/relay/hold-event/index.mdx @@ -0,0 +1,37 @@ +--- +slug: "/reference/go/relay/relay/hold-event" +title: "HoldEvent" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.HoldEvent" + parent: "relay.relay" + module: "relay.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" +--- +# `HoldEvent` + +HoldEvent represents a calling.call.hold event. + +## Signature + +```go +type HoldEvent struct +``` + +## Properties + + + + + + + +## Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 644. diff --git a/fern/products/sdk-reference/go/relay/relay/index.mdx b/fern/products/sdk-reference/go/relay/relay/index.mdx new file mode 100644 index 0000000000..c186eb7c49 --- /dev/null +++ b/fern/products/sdk-reference/go/relay/relay/index.mdx @@ -0,0 +1,495 @@ +--- +slug: "/reference/go/relay/relay" +title: "relay" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "module" + language: "go" + qualified_name: "relay.relay" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "relay" +--- +# `relay` + +## Classes + + + + Action represents a long-running operation on a call, such as playing audio, recording, or collecting input. Callers can Wait for completion, check status, or register a completion callback. + + + + AIAction represents a long-running AI operation on a call. + + + + AIEvent represents a calling.call.ai event. + + + + Call represents an active voice call managed through the RELAY client. It exposes methods for every calling operation supported by SignalWire, grouped into logical categories: lifecycle, audio, recording, bridging, DTMF, detection, fax, tap, streaming, conferencing, AI, hold/denoise, room/queue, pay, and transcription. + + + + CallingErrorEvent represents a calling.call.error event. + + + + CallReceiveEvent represents a calling.call.receive event for inbound calls. + + + + CallStateEvent represents a calling.call.state event. + + + + Client is the main RELAY WebSocket client that manages a persistent connection to SignalWire, handles Blade/JSON-RPC 2.0 authentication, event dispatch, and exposes high-level Dial/SendMessage methods. + + + + CollectAction represents a play-and-collect operation. + + + + CollectEvent represents a calling.call.collect event. + + + + CollectParams holds named parameters for the Collect method, matching Python's collect() named arguments. The fields are placed at the top level of the on-wire calling.collect frame (NOT nested under a "collect" object) — mirroring Python's params\["digits"] = digits at relay/call.py:583. + + + + ConferenceEvent represents a calling.call.conference event. + + + + ConnectEvent represents a calling.call.connect event. + + + + DenoiseEvent represents a calling.call.denoise event. + + + + DetectAction represents a long-running detect operation (e.g. machine detection). + + + + DetectEvent represents a calling.call.detect event. + + + + Device is a typed view of the \{type, params\} object that RELAY passes across connect / refer / dial / tap. It types the SHAPE only — the discriminant `type` stays a string because the set of device types is NOT schema-enumerated (the wire schema declares `type` as a free string; grounding: porting-sdk/relay-protocol/calling.\{connect,dial,refer,tap\}. params.json, where each device is \{required:\["type"], properties:\{type: \{type:string\}, params:\{\}\}\}). + + + + DialEvent represents a calling.call.dial event. + + + + EchoEvent represents a calling.call.echo event. + + + + FaxAction represents a long-running fax send/receive operation. methodPrefix distinguishes "send\_fax" from "receive\_fax" and is used to build the operation-specific stop command (e.g. "calling.send\_fax.stop"). + + + + FaxEvent represents a calling.call.fax event. + + + + HoldEvent represents a calling.call.hold event. + + + + Message represents an SMS/MMS message tracked through its lifecycle. + + + + MessageReceiveEvent represents a messaging.receive event. + + + + MessageStateEvent represents a messaging.state event. + + + + PayAction represents a long-running pay operation. + + + + PayEvent represents a calling.call.pay event. + + + + PlayAction represents a long-running play operation with media controls. + + + + PlayEvent represents a calling.call.play event. + + + + QueueEvent represents a calling.call.queue event. + + + + RecordAction represents a long-running record operation. + + + + RecordEvent represents a calling.call.record event. + + + + ReferEvent represents a calling.call.refer event. + + + + RelayError is a typed error returned by the RELAY protocol client. It carries the numeric code and message from the server so callers can programmatically inspect failures via errors.As. + + + + RelayEvent is the base event type for all events received from the SignalWire RELAY service. It carries an event type string and a generic parameter map that can be queried via helper methods. + + + + SendDigitsEvent represents a calling.call.send\_digits event. + + + + StandaloneCollectAction represents a standalone collect (without play). + + + + StreamAction represents a long-running media stream operation. + + + + StreamEvent represents a calling.call.stream event. + + + + TapAction represents a long-running tap operation. + + + + TapEvent represents a calling.call.tap event. + + + + TranscribeAction represents a long-running transcription operation. + + + + TranscribeEvent represents a calling.call.transcribe event. + + + +## Enums + +### CallState + +CallState is the lifecycle state of a Call as a typed defined-string kind. The underlying string is the exact wire token (e.g. "answered"), so a CallState is interchangeable with the bare string the reference uses. + +Server-emitted and growable: prefer IsKnown()/IsTerminal() over an exhaustive switch so an unrecognized future state does not break callers. + +#### Signature + +```go +type CallState alias +``` + +#### Methods + +##### IsKnown + +IsKnown reports whether s is one of the documented call lifecycle states. A false result means the server emitted a state this SDK build doesn't name yet — the value is still carried, just not recognized. + +###### Signature + +```go +func (CallState) IsKnown() bool +``` + +###### Returns + +`bool` + +###### Source + +[`pkg/relay/states.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/states.go) + +Line 58. + +*** + +##### IsTerminal + +IsTerminal reports whether s is a terminal call state (no further transitions expected). For a call the single terminal state is "ended", matching Python's CALL\_STATE\_ENDED gate in relay/call.py (the \_ended future resolves only on "ended"). + +###### Signature + +```go +func (CallState) IsTerminal() bool +``` + +###### Returns + +`bool` + +###### Source + +[`pkg/relay/states.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/states.go) + +Line 70. + +*** + +##### String + +String returns the wire token (identical to the underlying string). + +###### Signature + +```go +func (CallState) String() string +``` + +###### Returns + +`string` + +###### Source + +[`pkg/relay/states.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/states.go) + +Line 53. + +#### Source + +[`pkg/relay/states.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/states.go) + +Line 39. + +*** + +### DialState + +DialState is the outcome state of a calling.dial operation as a typed defined-string kind, read from the wire "dial\_state" field. It is a SEPARATE vocabulary from CallState (and from the connect/bridge states): a dial progresses dialing -> answered (winner found) or dialing -> failed (no device answered). Grounded in Python relay/client.py:950. + +Distinct Go type from CallState/MessageState so the three can never be mixed. + +#### Signature + +```go +type DialState alias +``` + +#### Methods + +##### IsKnown + +IsKnown reports whether s is one of the documented dial outcome states. + +###### Signature + +```go +func (DialState) IsKnown() bool +``` + +###### Returns + +`bool` + +###### Source + +[`pkg/relay/states.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/states.go) + +Line 99. + +*** + +##### IsTerminal + +IsTerminal reports whether s is a terminal dial outcome — "answered" (a winning call was found) or "failed" (no device answered). "dialing" is progress and is NOT terminal. Mirrors Python's \_handle\_dial\_event, which resolves the dial future on "answered", rejects it on "failed", and treats "dialing" as a progress event that doesn't settle the future (relay/client.py:976-1006). + +###### Signature + +```go +func (DialState) IsTerminal() bool +``` + +###### Returns + +`bool` + +###### Source + +[`pkg/relay/states.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/states.go) + +Line 113. + +*** + +##### String + +String returns the wire token (identical to the underlying string). + +###### Signature + +```go +func (DialState) String() string +``` + +###### Returns + +`string` + +###### Source + +[`pkg/relay/states.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/states.go) + +Line 96. + +#### Source + +[`pkg/relay/states.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/states.go) + +Line 85. + +*** + +### MessageState + +MessageState is the delivery lifecycle state of a Message as a typed defined-string kind. The underlying string is the exact wire token (the "message\_state" field), so it is interchangeable with the bare string the reference uses. + +Server-emitted and growable: prefer IsKnown()/IsTerminal(). A SEPARATE vocabulary from CallState/DialState — distinct Go type. + +#### Signature + +```go +type MessageState alias +``` + +#### Methods + +##### IsKnown + +IsKnown reports whether s is one of the documented message delivery states. + +###### Signature + +```go +func (MessageState) IsKnown() bool +``` + +###### Returns + +`bool` + +###### Source + +[`pkg/relay/states.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/states.go) + +Line 146. + +*** + +##### IsTerminal + +IsTerminal reports whether s is a terminal OUTBOUND delivery state — one of delivered, undelivered, failed — matching Python's MESSAGE\_TERMINAL\_STATES (relay/constants.py). These are the states on which an outbound send settles. + +Note: the inbound terminal state "received" is intentionally NOT counted here, to mirror Python exactly (received is excluded from MESSAGE\_TERMINAL\_STATES — the inbound flow doesn't await). The internal helper isTerminalMessageState (message.go) additionally treats "received" as terminal so a Wait() on an inbound message returns immediately; that is a separate, behavior-only concern and is deliberately not folded into this grounded predicate. + +###### Signature + +```go +func (MessageState) IsTerminal() bool +``` + +###### Returns + +`bool` + +###### Source + +[`pkg/relay/states.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/states.go) + +Line 166. + +*** + +##### String + +String returns the wire token (identical to the underlying string). + +###### Signature + +```go +func (MessageState) String() string +``` + +###### Returns + +`string` + +###### Source + +[`pkg/relay/states.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/states.go) + +Line 143. + +#### Source + +[`pkg/relay/states.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/states.go) + +Line 128. + +*** + +### TTSGender + +TTSGender is the closed set of text-to-speech voice genders as a defined string type with typed constants. WithTTSGender (the play\_tts / prompt\_tts gender option) takes it, giving Go callers editor autocompletion plus call-site typo checking — a bare string like "femail" only fails downstream, whereas a mistyped constant fails to compile. + +Because Go auto-converts untyped string-constant literals to a defined string type, every call site keeps working both ways: + +``` +relay.WithTTSGender(relay.GenderFemale) // typed const — autocompleted +relay.WithTTSGender("female") // bare string literal still compiles +``` + +TTSGender is a string subtype, so the value written into the \{"type":"tts","params":\{"gender":...\}\} media entry is byte-identical to the bare string the reference uses — parity with Python's play\_tts/prompt\_tts gender keyword (a plain str). + +#### Signature + +```go +type TTSGender alias +``` + +#### Examples + + + + ```go + relay.WithTTSGender(relay.GenderFemale) // typed const — autocompleted + relay.WithTTSGender("female") // bare string literal still compiles + ``` + + + + ```go + relay.WithTTSGender(relay.GenderFemale) // typed const — autocompleted + relay.WithTTSGender("female") // bare string literal still compiles + ``` + + + +#### Source + +[`pkg/relay/tts_gender.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/tts_gender.go) + +Line 19. diff --git a/fern/products/sdk-reference/go/relay/relay/message-receive-event/index.mdx b/fern/products/sdk-reference/go/relay/relay/message-receive-event/index.mdx new file mode 100644 index 0000000000..18c4a1a62a --- /dev/null +++ b/fern/products/sdk-reference/go/relay/relay/message-receive-event/index.mdx @@ -0,0 +1,55 @@ +--- +slug: "/reference/go/relay/relay/message-receive-event" +title: "MessageReceiveEvent" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.MessageReceiveEvent" + parent: "relay.relay" + module: "relay.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" +--- +# `MessageReceiveEvent` + +MessageReceiveEvent represents a messaging.receive event. + +## Signature + +```go +type MessageReceiveEvent struct +``` + +## Properties + + + + + + + + + + + + + + + MessageState matches Python's message\_state field. + + + + + + + + + + +## Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 703. diff --git a/fern/products/sdk-reference/go/relay/relay/message-state-event/index.mdx b/fern/products/sdk-reference/go/relay/relay/message-state-event/index.mdx new file mode 100644 index 0000000000..9bf68a6525 --- /dev/null +++ b/fern/products/sdk-reference/go/relay/relay/message-state-event/index.mdx @@ -0,0 +1,67 @@ +--- +slug: "/reference/go/relay/relay/message-state-event" +title: "MessageStateEvent" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.MessageStateEvent" + parent: "relay.relay" + module: "relay.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" +--- +# `MessageStateEvent` + +MessageStateEvent represents a messaging.state event. + +## Signature + +```go +type MessageStateEvent struct +``` + +## Properties + + + Body matches Python's body field. + + + + Context matches Python's context field. + + + + + + + + Media matches Python's media: list\[str] field. + + + + + + MessageState reads wire key "message\_state" matching Python's message\_state field. (Replaces the previous State field which incorrectly read "state".) + + + + + + + + Segments matches Python's segments: int field. + + + + Tags matches Python's tags: list\[str] field. + + + + +## Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 756. diff --git a/fern/products/sdk-reference/go/relay/relay/message/index.mdx b/fern/products/sdk-reference/go/relay/relay/message/index.mdx new file mode 100644 index 0000000000..89f75d7a4a --- /dev/null +++ b/fern/products/sdk-reference/go/relay/relay/message/index.mdx @@ -0,0 +1,385 @@ +--- +slug: "/reference/go/relay/relay/message" +title: "Message" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.Message" + parent: "relay.relay" + module: "relay.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/message.go" +--- +# `Message` + +Message represents an SMS/MMS message tracked through its lifecycle. + +## Signature + +```go +type Message struct +``` + +## Methods + +### Body + +Body returns the text body of the message. + +#### Signature + +```go +func (*Message) Body() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/relay/message.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/message.go) + +Line 60. + +*** + +### Context + +Context returns the RELAY context on which this message was received. + +#### Signature + +```go +func (*Message) Context() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/relay/message.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/message.go) + +Line 48. + +*** + +### Direction + +Direction returns "inbound" or "outbound". + +#### Signature + +```go +func (*Message) Direction() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/relay/message.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/message.go) + +Line 51. + +*** + +### FromNumber + +FromNumber returns the sender number. + +#### Signature + +```go +func (*Message) FromNumber() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/relay/message.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/message.go) + +Line 54. + +*** + +### IsDone + +IsDone returns true if the message has reached a terminal state. + +#### Signature + +```go +func (*Message) IsDone() bool +``` + +#### Returns + +`bool` + +#### Source + +[`pkg/relay/message.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/message.go) + +Line 123. + +*** + +### Media + +Media returns the list of media URLs attached to the message. + +#### Signature + +```go +func (*Message) Media() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/relay/message.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/message.go) + +Line 63. + +*** + +### MessageID + +MessageID returns the unique message identifier. + +#### Signature + +```go +func (*Message) MessageID() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/relay/message.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/message.go) + +Line 45. + +*** + +### MessageState + +MessageState returns the current message state as a typed MessageState ALONGSIDE the bare-string State() accessor (kept for parity with the Python reference). The typed kind gives callers IsTerminal()/IsKnown() predicates and compile-time distinctness from CallState/DialState; its underlying string equals State() exactly. Additive port idiom — see states.go and PORT\_ADDITIONS.md. + +#### Signature + +```go +func (*Message) MessageState() MessageState +``` + +#### Returns + +`MessageState` + +#### Source + +[`pkg/relay/message.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/message.go) + +Line 81. + +*** + +### On + +On registers an event handler called when message state changes. + +#### Signature + +```go +func (*Message) On(handler func(*RelayEvent)) +``` + +#### Parameters + + + +#### Source + +[`pkg/relay/message.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/message.go) + +Line 130. + +*** + +### Reason + +Reason returns the failure reason if the message failed. + +#### Signature + +```go +func (*Message) Reason() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/relay/message.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/message.go) + +Line 88. + +*** + +### Result + +Result returns the terminal RelayEvent if the message has reached a terminal state, or nil if not yet done. This is the non-blocking equivalent of Python's Message.result property. + +#### Signature + +```go +func (*Message) Result() *RelayEvent +``` + +#### Returns + +`*RelayEvent` + +#### Source + +[`pkg/relay/message.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/message.go) + +Line 100. + +*** + +### Segments + +Segments returns the number of SMS segments. + +#### Signature + +```go +func (*Message) Segments() int +``` + +#### Returns + +`int` + +#### Source + +[`pkg/relay/message.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/message.go) + +Line 66. + +*** + +### State + +State returns the current message state. + +#### Signature + +```go +func (*Message) State() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/relay/message.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/message.go) + +Line 69. + +*** + +### Tags + +Tags returns the tags associated with the message. + +#### Signature + +```go +func (*Message) Tags() []string +``` + +#### Returns + +`[]string` + +#### Source + +[`pkg/relay/message.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/message.go) + +Line 95. + +*** + +### ToNumber + +ToNumber returns the recipient number. + +#### Signature + +```go +func (*Message) ToNumber() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/relay/message.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/message.go) + +Line 57. + +*** + +### Wait + +Wait blocks until the message reaches a terminal state or the context is cancelled. Returns the final event or the context error. + +#### Signature + +```go +func (*Message) Wait(ctx context.Context) (*RelayEvent, error) +``` + +#### Parameters + + + +#### Returns + +`(*RelayEvent, error)` + +#### Source + +[`pkg/relay/message.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/message.go) + +Line 111. + +## Source + +[`pkg/relay/message.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/message.go) + +Line 9. diff --git a/fern/products/sdk-reference/go/relay/relay/pay-action/index.mdx b/fern/products/sdk-reference/go/relay/relay/pay-action/index.mdx new file mode 100644 index 0000000000..b42de93257 --- /dev/null +++ b/fern/products/sdk-reference/go/relay/relay/pay-action/index.mdx @@ -0,0 +1,55 @@ +--- +slug: "/reference/go/relay/relay/pay-action" +title: "PayAction" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.PayAction" + parent: "relay.relay" + module: "relay.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go" +--- +# `PayAction` + +PayAction represents a long-running pay operation. + +## Signature + +```go +type PayAction struct +``` + +## Properties + + + +## Methods + +### Stop + +Stop sends calling.pay.stop to halt the active pay operation. + +#### Signature + +```go +func (*PayAction) Stop() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 482. + +## Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 470. diff --git a/fern/products/sdk-reference/go/relay/relay/pay-event/index.mdx b/fern/products/sdk-reference/go/relay/relay/pay-event/index.mdx new file mode 100644 index 0000000000..6db9dc84d8 --- /dev/null +++ b/fern/products/sdk-reference/go/relay/relay/pay-event/index.mdx @@ -0,0 +1,39 @@ +--- +slug: "/reference/go/relay/relay/pay-event" +title: "PayEvent" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.PayEvent" + parent: "relay.relay" + module: "relay.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" +--- +# `PayEvent` + +PayEvent represents a calling.call.pay event. + +## Signature + +```go +type PayEvent struct +``` + +## Properties + + + + + + + + + +## Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 547. diff --git a/fern/products/sdk-reference/go/relay/relay/play-action/index.mdx b/fern/products/sdk-reference/go/relay/relay/play-action/index.mdx new file mode 100644 index 0000000000..56668c1238 --- /dev/null +++ b/fern/products/sdk-reference/go/relay/relay/play-action/index.mdx @@ -0,0 +1,125 @@ +--- +slug: "/reference/go/relay/relay/play-action" +title: "PlayAction" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.PlayAction" + parent: "relay.relay" + module: "relay.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go" +--- +# `PlayAction` + +PlayAction represents a long-running play operation with media controls. + +## Signature + +```go +type PlayAction struct +``` + +## Properties + + + +## Methods + +### Pause + +Pause pauses the currently playing media. + +#### Signature + +```go +func (*PlayAction) Pause() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 158. + +*** + +### Resume + +Resume resumes paused media playback. + +#### Signature + +```go +func (*PlayAction) Resume() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 171. + +*** + +### Stop + +Stop sends calling.play.stop to halt the active play operation. + +#### Signature + +```go +func (*PlayAction) Stop() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 145. + +*** + +### Volume + +Volume adjusts playback volume by the given dB offset. + +#### Signature + +```go +func (*PlayAction) Volume(db float64) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 184. + +## Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 129. diff --git a/fern/products/sdk-reference/go/relay/relay/play-event/index.mdx b/fern/products/sdk-reference/go/relay/relay/play-event/index.mdx new file mode 100644 index 0000000000..a5b804b668 --- /dev/null +++ b/fern/products/sdk-reference/go/relay/relay/play-event/index.mdx @@ -0,0 +1,37 @@ +--- +slug: "/reference/go/relay/relay/play-event" +title: "PlayEvent" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.PlayEvent" + parent: "relay.relay" + module: "relay.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" +--- +# `PlayEvent` + +PlayEvent represents a calling.call.play event. + +## Signature + +```go +type PlayEvent struct +``` + +## Properties + + + + + + + +## Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 267. diff --git a/fern/products/sdk-reference/go/relay/relay/queue-event/index.mdx b/fern/products/sdk-reference/go/relay/relay/queue-event/index.mdx new file mode 100644 index 0000000000..66c8c714e7 --- /dev/null +++ b/fern/products/sdk-reference/go/relay/relay/queue-event/index.mdx @@ -0,0 +1,51 @@ +--- +slug: "/reference/go/relay/relay/queue-event" +title: "QueueEvent" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.QueueEvent" + parent: "relay.relay" + module: "relay.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" +--- +# `QueueEvent` + +QueueEvent represents a calling.call.queue event. + +## Signature + +```go +type QueueEvent struct +``` + +## Properties + + + + + + + QueueID reads wire key "id" matching Python's queue\_id = p.get("id", ""). + + + + QueueName reads wire key "name" matching Python's queue\_name = p.get("name", ""). (Previously read "queue\_name" which was wrong.) + + + + + + + + Status reads wire key "status" matching Python's status field. (Replaces the previous State field which incorrectly read "state".) + + +## Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 566. diff --git a/fern/products/sdk-reference/go/relay/relay/record-action/index.mdx b/fern/products/sdk-reference/go/relay/relay/record-action/index.mdx new file mode 100644 index 0000000000..ccec052423 --- /dev/null +++ b/fern/products/sdk-reference/go/relay/relay/record-action/index.mdx @@ -0,0 +1,103 @@ +--- +slug: "/reference/go/relay/relay/record-action" +title: "RecordAction" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.RecordAction" + parent: "relay.relay" + module: "relay.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go" +--- +# `RecordAction` + +RecordAction represents a long-running record operation. + +## Signature + +```go +type RecordAction struct +``` + +## Properties + + + +## Methods + +### Pause + +Pause pauses the active recording. An optional behavior string may be provided (e.g. "silence" or "skip") to control how the gap is handled. Pass no argument — or "" — to omit behavior, matching Python's pause(behavior: Optional\[str] = None) signature. + +#### Signature + +```go +func (*RecordAction) Pause(behavior ...string) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 228. + +*** + +### Resume + +Resume resumes a paused recording. + +#### Signature + +```go +func (*RecordAction) Resume() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 245. + +*** + +### Stop + +Stop sends calling.record.stop to halt the active recording. + +#### Signature + +```go +func (*RecordAction) Stop() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 212. + +## Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 198. diff --git a/fern/products/sdk-reference/go/relay/relay/record-event/index.mdx b/fern/products/sdk-reference/go/relay/relay/record-event/index.mdx new file mode 100644 index 0000000000..5b09a47b90 --- /dev/null +++ b/fern/products/sdk-reference/go/relay/relay/record-event/index.mdx @@ -0,0 +1,49 @@ +--- +slug: "/reference/go/relay/relay/record-event" +title: "RecordEvent" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.RecordEvent" + parent: "relay.relay" + module: "relay.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" +--- +# `RecordEvent` + +RecordEvent represents a calling.call.record event. + +## Signature + +```go +type RecordEvent struct +``` + +## Properties + + + + + Duration is float64 (matching Python's float) to preserve subsecond precision. + + + + Record is the raw nested record dict from the wire payload, matching Python's record field. + + + + + + + + + + +## Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 284. diff --git a/fern/products/sdk-reference/go/relay/relay/refer-event/index.mdx b/fern/products/sdk-reference/go/relay/relay/refer-event/index.mdx new file mode 100644 index 0000000000..b21a1266c3 --- /dev/null +++ b/fern/products/sdk-reference/go/relay/relay/refer-event/index.mdx @@ -0,0 +1,43 @@ +--- +slug: "/reference/go/relay/relay/refer-event" +title: "ReferEvent" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.ReferEvent" + parent: "relay.relay" + module: "relay.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" +--- +# `ReferEvent` + +ReferEvent represents a calling.call.refer event. + +## Signature + +```go +type ReferEvent struct +``` + +## Properties + + + + + + + + + + + + + +## Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 504. diff --git a/fern/products/sdk-reference/go/relay/relay/relay-error/index.mdx b/fern/products/sdk-reference/go/relay/relay/relay-error/index.mdx new file mode 100644 index 0000000000..7ee1048143 --- /dev/null +++ b/fern/products/sdk-reference/go/relay/relay/relay-error/index.mdx @@ -0,0 +1,83 @@ +--- +slug: "/reference/go/relay/relay/relay-error" +title: "RelayError" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.RelayError" + parent: "relay.relay" + module: "relay.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/error.go" +--- +# `RelayError` + +RelayError is a typed error returned by the RELAY protocol client. It carries the numeric code and message from the server so callers can programmatically inspect failures via errors.As. + +The error format matches Python's RelayError.**str**: "RELAY error \{code\}: \{message\}". + +A RelayError may also carry a wrapped sentinel (one of the Err\* values above) so the same value satisfies BOTH errors.As(\&RelayError) and errors.Is(err, ErrDialTimeout): the typed error preserves the server code/message, and the sentinel gives callers a stable, string-free branch. + +## Signature + +```go +type RelayError struct +``` + +## Properties + + + + + +## Methods + +### Error + +Error implements the built-in error interface. Format matches Python's RelayError.**str**: "RELAY error \{code\}: \{message\}". + +#### Signature + +```go +func (*RelayError) Error() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/relay/error.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/error.go) + +Line 59. + +*** + +### Unwrap + +Unwrap exposes the optional wrapped sentinel so errors.Is can match it. Returns nil for a plain server-issued RelayError (no sentinel attached). + +#### Signature + +```go +func (*RelayError) Unwrap() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/relay/error.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/error.go) + +Line 65. + +## Source + +[`pkg/relay/error.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/error.go) + +Line 51. diff --git a/fern/products/sdk-reference/go/relay/relay/relay-event/index.mdx b/fern/products/sdk-reference/go/relay/relay/relay-event/index.mdx new file mode 100644 index 0000000000..8c191c4ea7 --- /dev/null +++ b/fern/products/sdk-reference/go/relay/relay/relay-event/index.mdx @@ -0,0 +1,225 @@ +--- +slug: "/reference/go/relay/relay/relay-event" +title: "RelayEvent" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.RelayEvent" + parent: "relay.relay" + module: "relay.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" +--- +# `RelayEvent` + +RelayEvent is the base event type for all events received from the SignalWire RELAY service. It carries an event type string and a generic parameter map that can be queried via helper methods. + +## Signature + +```go +type RelayEvent struct +``` + +## Properties + + + CallID is the call identifier, populated from the "call\_id" wire key. Python base class always carries this field. + + + + + + + + Timestamp is the event timestamp (float for subsecond precision), populated from the "timestamp" wire key. + + +## Methods + +### GetBool + +GetBool returns the boolean value for a key in params, or false if missing/wrong type. + +#### Signature + +```go +func (*RelayEvent) GetBool(key string) bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 107. + +*** + +### GetBoolPtr + +GetBoolPtr returns a \*bool for a key in params, or nil if the key is absent. This matches Python's Optional\[bool] = None semantics. + +#### Signature + +```go +func (*RelayEvent) GetBoolPtr(key string) *bool +``` + +#### Parameters + + + +#### Returns + +`*bool` + +#### Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 131. + +*** + +### GetFloat64 + +GetFloat64 returns the float64 value for a key in params, or 0.0 if missing/wrong type. This preserves subsecond precision for duration and timestamp fields. + +#### Signature + +```go +func (*RelayEvent) GetFloat64(key string) float64 +``` + +#### Parameters + + + +#### Returns + +`float64` + +#### Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 81. + +*** + +### GetInt + +GetInt returns the integer value for a key in params, or 0 if missing/wrong type. + +#### Signature + +```go +func (*RelayEvent) GetInt(key string) int +``` + +#### Parameters + + + +#### Returns + +`int` + +#### Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 56. + +*** + +### GetMap + +GetMap returns the nested map for a key in params, or nil if missing/wrong type. + +#### Signature + +```go +func (*RelayEvent) GetMap(key string) map[string]any +``` + +#### Parameters + + + +#### Returns + +`map[string]any` + +#### Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 156. + +*** + +### GetString + +GetString returns the string value for a key in params, or "" if missing/wrong type. + +#### Signature + +```go +func (*RelayEvent) GetString(key string) string +``` + +#### Parameters + + + +#### Returns + +`string` + +#### Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 37. + +*** + +### GetStringSlice + +GetStringSlice returns a \[]string for a key in params whose wire value is \[]any. Returns nil if absent or wrong type. Matches Python list\[str] field behavior. + +#### Signature + +```go +func (*RelayEvent) GetStringSlice(key string) []string +``` + +#### Parameters + + + +#### Returns + +`[]string` + +#### Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 173. + +## Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 11. diff --git a/fern/products/sdk-reference/go/relay/relay/send-digits-event/index.mdx b/fern/products/sdk-reference/go/relay/relay/send-digits-event/index.mdx new file mode 100644 index 0000000000..2f893c4687 --- /dev/null +++ b/fern/products/sdk-reference/go/relay/relay/send-digits-event/index.mdx @@ -0,0 +1,37 @@ +--- +slug: "/reference/go/relay/relay/send-digits-event" +title: "SendDigitsEvent" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.SendDigitsEvent" + parent: "relay.relay" + module: "relay.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" +--- +# `SendDigitsEvent` + +SendDigitsEvent represents a calling.call.send\_digits event. + +## Signature + +```go +type SendDigitsEvent struct +``` + +## Properties + + + + + + + +## Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 451. diff --git a/fern/products/sdk-reference/go/relay/relay/standalone-collect-action/index.mdx b/fern/products/sdk-reference/go/relay/relay/standalone-collect-action/index.mdx new file mode 100644 index 0000000000..c04f9301af --- /dev/null +++ b/fern/products/sdk-reference/go/relay/relay/standalone-collect-action/index.mdx @@ -0,0 +1,77 @@ +--- +slug: "/reference/go/relay/relay/standalone-collect-action" +title: "StandaloneCollectAction" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.StandaloneCollectAction" + parent: "relay.relay" + module: "relay.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go" +--- +# `StandaloneCollectAction` + +StandaloneCollectAction represents a standalone collect (without play). + +## Signature + +```go +type StandaloneCollectAction struct +``` + +## Properties + + + +## Methods + +### StartInputTimers + +StartInputTimers starts the initial\_timeout timer on an active standalone collect, equivalent to Python's StandaloneCollectAction.start\_input\_timers(). + +#### Signature + +```go +func (*StandaloneCollectAction) StartInputTimers() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 373. + +*** + +### Stop + +Stop sends calling.collect.stop to halt the standalone collect operation. + +#### Signature + +```go +func (*StandaloneCollectAction) Stop() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 359. + +## Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 345. diff --git a/fern/products/sdk-reference/go/relay/relay/stream-action/index.mdx b/fern/products/sdk-reference/go/relay/relay/stream-action/index.mdx new file mode 100644 index 0000000000..691d29d399 --- /dev/null +++ b/fern/products/sdk-reference/go/relay/relay/stream-action/index.mdx @@ -0,0 +1,55 @@ +--- +slug: "/reference/go/relay/relay/stream-action" +title: "StreamAction" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.StreamAction" + parent: "relay.relay" + module: "relay.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go" +--- +# `StreamAction` + +StreamAction represents a long-running media stream operation. + +## Signature + +```go +type StreamAction struct +``` + +## Properties + + + +## Methods + +### Stop + +Stop sends calling.stream.stop to halt the active stream operation. + +#### Signature + +```go +func (*StreamAction) Stop() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 457. + +## Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 445. diff --git a/fern/products/sdk-reference/go/relay/relay/stream-event/index.mdx b/fern/products/sdk-reference/go/relay/relay/stream-event/index.mdx new file mode 100644 index 0000000000..f1a5a7feeb --- /dev/null +++ b/fern/products/sdk-reference/go/relay/relay/stream-event/index.mdx @@ -0,0 +1,45 @@ +--- +slug: "/reference/go/relay/relay/stream-event" +title: "StreamEvent" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.StreamEvent" + parent: "relay.relay" + module: "relay.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" +--- +# `StreamEvent` + +StreamEvent represents a calling.call.stream event. + +## Signature + +```go +type StreamEvent struct +``` + +## Properties + + + + + Name is the stream name, matching Python's name field. + + + + + + + + URL is the stream URL, matching Python's url field. + + +## Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 428. diff --git a/fern/products/sdk-reference/go/relay/relay/tap-action/index.mdx b/fern/products/sdk-reference/go/relay/relay/tap-action/index.mdx new file mode 100644 index 0000000000..f40d13223f --- /dev/null +++ b/fern/products/sdk-reference/go/relay/relay/tap-action/index.mdx @@ -0,0 +1,55 @@ +--- +slug: "/reference/go/relay/relay/tap-action" +title: "TapAction" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.TapAction" + parent: "relay.relay" + module: "relay.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go" +--- +# `TapAction` + +TapAction represents a long-running tap operation. + +## Signature + +```go +type TapAction struct +``` + +## Properties + + + +## Methods + +### Stop + +Stop sends calling.tap.stop to halt the active tap operation. + +#### Signature + +```go +func (*TapAction) Stop() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 432. + +## Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 420. diff --git a/fern/products/sdk-reference/go/relay/relay/tap-event/index.mdx b/fern/products/sdk-reference/go/relay/relay/tap-event/index.mdx new file mode 100644 index 0000000000..7563da7522 --- /dev/null +++ b/fern/products/sdk-reference/go/relay/relay/tap-event/index.mdx @@ -0,0 +1,43 @@ +--- +slug: "/reference/go/relay/relay/tap-event" +title: "TapEvent" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.TapEvent" + parent: "relay.relay" + module: "relay.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" +--- +# `TapEvent` + +TapEvent represents a calling.call.tap event. + +## Signature + +```go +type TapEvent struct +``` + +## Properties + + + + + Device is the tap device dict, matching Python's device field. + + + + + + + + +## Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 406. diff --git a/fern/products/sdk-reference/go/relay/relay/transcribe-action/index.mdx b/fern/products/sdk-reference/go/relay/relay/transcribe-action/index.mdx new file mode 100644 index 0000000000..4a152bdb6d --- /dev/null +++ b/fern/products/sdk-reference/go/relay/relay/transcribe-action/index.mdx @@ -0,0 +1,55 @@ +--- +slug: "/reference/go/relay/relay/transcribe-action" +title: "TranscribeAction" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.TranscribeAction" + parent: "relay.relay" + module: "relay.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go" +--- +# `TranscribeAction` + +TranscribeAction represents a long-running transcription operation. + +## Signature + +```go +type TranscribeAction struct +``` + +## Properties + + + +## Methods + +### Stop + +Stop sends calling.transcribe.stop to halt the active transcription. + +#### Signature + +```go +func (*TranscribeAction) Stop() error +``` + +#### Returns + +`error` + +#### Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 508. + +## Source + +[`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) + +Line 495. diff --git a/fern/products/sdk-reference/go/relay/relay/transcribe-event/index.mdx b/fern/products/sdk-reference/go/relay/relay/transcribe-event/index.mdx new file mode 100644 index 0000000000..ee6d9d0b2d --- /dev/null +++ b/fern/products/sdk-reference/go/relay/relay/transcribe-event/index.mdx @@ -0,0 +1,55 @@ +--- +slug: "/reference/go/relay/relay/transcribe-event" +title: "TranscribeEvent" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.TranscribeEvent" + parent: "relay.relay" + module: "relay.relay" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" +--- +# `TranscribeEvent` + +TranscribeEvent represents a calling.call.transcribe event. + +## Signature + +```go +type TranscribeEvent struct +``` + +## Properties + + + + + Duration is float64 for subsecond precision, matching Python's duration: float field. + + + + RecordingID is the recording identifier, matching Python's recording\_id field. + + + + + + Size is the recording size in bytes, matching Python's size field. + + + + + + + + URL is the transcription recording URL, matching Python's url field. + + +## Source + +[`pkg/relay/event.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go) + +Line 613. diff --git a/fern/products/sdk-reference/go/rest/index.mdx b/fern/products/sdk-reference/go/rest/index.mdx new file mode 100644 index 0000000000..edaa44e145 --- /dev/null +++ b/fern/products/sdk-reference/go/rest/index.mdx @@ -0,0 +1,248 @@ +--- +slug: "/reference/go/rest" +title: "rest" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "module" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go" +--- +# `rest` + +Package rest provides a REST client for the SignalWire platform APIs. + +It includes an HTTP transport layer, generic CRUD resource abstractions, paginated iteration, and namespaced sub-clients for each API domain. + +## Signature + +```go +package rest +``` + +## Modules + + + + + + + +## Functions + +### NewCrudResource + +NewCrudResource creates a CrudResource for the given path. The default update method is PATCH. + +#### Signature + +```go +func NewCrudResource(client *HttpClient, path string) *CrudResource +``` + +#### Parameters + + + + + +#### Returns + +`*CrudResource` + +#### Source + +[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) + +Line 247. + +*** + +### NewCrudResourcePUT + +NewCrudResourcePUT creates a CrudResource that uses PUT for updates. + +#### Signature + +```go +func NewCrudResourcePUT(client *HttpClient, path string) *CrudResource +``` + +#### Parameters + + + + + +#### Returns + +`*CrudResource` + +#### Source + +[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) + +Line 256. + +*** + +### NewHttpClient + +NewHttpClient creates a new HttpClient configured for the given SignalWire space. The baseURL is normally constructed as "https://\", but the SIGNALWIRE\_REST\_BASE\_URL environment variable overrides it when set — pointing the client at a loopback fixture for the porting-sdk audit\_rest\_transport.py harness, or at any non-default endpoint. + +#### Signature + +```go +func NewHttpClient(projectID string, token string, space string) *HttpClient +``` + +#### Parameters + + + + + + + +#### Returns + +`*HttpClient` + +#### Source + +[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) + +Line 75. + +*** + +### NewPaginatedIterator + +NewPaginatedIterator creates a new iterator for the given endpoint. dataKey is the JSON key that holds the array of items (typically "data"). + +#### Signature + +```go +func NewPaginatedIterator( + client *HttpClient, + path string, + params map[string]string, + dataKey string +) *PaginatedIterator +``` + +#### Parameters + + + + + + + + + +#### Returns + +`*PaginatedIterator` + +#### Source + +[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) + +Line 316. + +*** + +### NewRestClient + +NewRestClient creates a new RestClient. If project, token, or space are empty strings the corresponding environment variables are used: + +``` +SIGNALWIRE_PROJECT_ID +SIGNALWIRE_API_TOKEN +SIGNALWIRE_SPACE +``` + +An error is returned when any of the three values is still empty after the environment lookup. + +#### Signature + +```go +func NewRestClient(project string, token string, space string) (*RestClient, error) +``` + +#### Parameters + + + + + + + +#### Returns + +`(*RestClient, error)` + +#### Examples + + + + ```go + SIGNALWIRE_PROJECT_ID + SIGNALWIRE_API_TOKEN + SIGNALWIRE_SPACE + ``` + + + + ```go + SIGNALWIRE_PROJECT_ID + SIGNALWIRE_API_TOKEN + SIGNALWIRE_SPACE + ``` + + + +#### Source + +[`pkg/rest/rest_client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/rest_client.go) + +Line 99. + +*** + +### NewSignalWireRestError + +NewSignalWireRestError constructs a SignalWireRestError, substituting "GET" as the method when method is empty — matches Python's default. + +#### Signature + +```go +func NewSignalWireRestError(statusCode int, body string, url string, method string) *SignalWireRestError +``` + +#### Parameters + + + + + + + + + +#### Returns + +`*SignalWireRestError` + +#### Source + +[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) + +Line 51. + +## Source + +[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) diff --git a/fern/products/sdk-reference/go/rest/namespaces/index.mdx b/fern/products/sdk-reference/go/rest/namespaces/index.mdx new file mode 100644 index 0000000000..d76e28b57e --- /dev/null +++ b/fern/products/sdk-reference/go/rest/namespaces/index.mdx @@ -0,0 +1,22 @@ +--- +slug: "/reference/go/rest/namespaces" +title: "namespaces" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "module" + language: "go" + qualified_name: "rest.namespaces" + parent: "github.com/signalwire/signalwire-go/pkg/rest" + module: "rest" +--- +# `namespaces` + +## Modules + + + + Package namespaces contains the individual API namespace implementations for the SignalWire REST client. + + diff --git a/fern/products/sdk-reference/go/rest/namespaces/namespaces/addresses-namespace/index.mdx b/fern/products/sdk-reference/go/rest/namespaces/namespaces/addresses-namespace/index.mdx new file mode 100644 index 0000000000..1967b8afa8 --- /dev/null +++ b/fern/products/sdk-reference/go/rest/namespaces/namespaces/addresses-namespace/index.mdx @@ -0,0 +1,137 @@ +--- +slug: "/reference/go/rest/namespaces/namespaces/addresses-namespace" +title: "AddressesNamespace" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.AddressesNamespace" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/addresses.go" +--- +# `AddressesNamespace` + +AddressesNamespace provides address management (no update endpoint). + +## Signature + +```go +type AddressesNamespace struct +``` + +## Properties + + + +## Methods + +### Create + +Create creates a new address. + +#### Signature + +```go +func (*AddressesNamespace) Create(data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/addresses.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/addresses.go) + +Line 28. + +*** + +### Delete + +Delete removes an address by ID. + +#### Signature + +```go +func (*AddressesNamespace) Delete(id string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/addresses.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/addresses.go) + +Line 38. + +*** + +### Get + +Get retrieves an address by ID. + +#### Signature + +```go +func (*AddressesNamespace) Get(id string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/addresses.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/addresses.go) + +Line 33. + +*** + +### List + +List lists all addresses. + +#### Signature + +```go +func (*AddressesNamespace) List(params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/addresses.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/addresses.go) + +Line 23. + +## Source + +[`pkg/rest/namespaces/addresses.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/addresses.go) + +Line 11. diff --git a/fern/products/sdk-reference/go/rest/namespaces/namespaces/auto-materialized-webhook-resource/index.mdx b/fern/products/sdk-reference/go/rest/namespaces/namespaces/auto-materialized-webhook-resource/index.mdx new file mode 100644 index 0000000000..f471acb80b --- /dev/null +++ b/fern/products/sdk-reference/go/rest/namespaces/namespaces/auto-materialized-webhook-resource/index.mdx @@ -0,0 +1,63 @@ +--- +slug: "/reference/go/rest/namespaces/namespaces/auto-materialized-webhook-resource" +title: "AutoMaterializedWebhookResource" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.AutoMaterializedWebhookResource" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go" +--- +# `AutoMaterializedWebhookResource` + +AutoMaterializedWebhookResource is a Fabric webhook resource that is normally auto-created by the phone\_numbers.Set\*Webhook helpers. Exposed for backwards compatibility: list/get/update/delete work as usual, but Create now emits a deprecation warning because creating a webhook resource directly produces an orphan that isn't bound to any phone number. + +## Signature + +```go +type AutoMaterializedWebhookResource struct +``` + +## Properties + + + +## Methods + +### Create + + + **Deprecated.** Creating a webhook Fabric resource directly produces an orphan not bound to any phone number. Use phone\_numbers.SetSwmlWebhook or phone\_numbers.SetCxmlWebhook instead; setting call\_handler on the phone number causes the server to auto-materialize the webhook resource. See porting-sdk's phone-binding.md. + + +Create sends a POST to create a new webhook resource. + +#### Signature + +```go +func (*AutoMaterializedWebhookResource) Create(data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 199. + +## Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 182. diff --git a/fern/products/sdk-reference/go/rest/namespaces/namespaces/call-flow-options/index.mdx b/fern/products/sdk-reference/go/rest/namespaces/namespaces/call-flow-options/index.mdx new file mode 100644 index 0000000000..4e2e61aa53 --- /dev/null +++ b/fern/products/sdk-reference/go/rest/namespaces/namespaces/call-flow-options/index.mdx @@ -0,0 +1,39 @@ +--- +slug: "/reference/go/rest/namespaces/namespaces/call-flow-options" +title: "CallFlowOptions" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.CallFlowOptions" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/phone_numbers.go" +--- +# `CallFlowOptions` + +CallFlowOptions holds optional fields for SetCallFlow. + +## Signature + +```go +type CallFlowOptions struct +``` + +## Properties + + + Extra passes through additional wire-level fields. + + + + Version accepts "working\_copy" or "current\_deployed" (server default when omitted). + + +## Source + +[`pkg/rest/namespaces/phone_numbers.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/phone_numbers.go) + +Line 125. diff --git a/fern/products/sdk-reference/go/rest/namespaces/namespaces/call-flows-resource/index.mdx b/fern/products/sdk-reference/go/rest/namespaces/namespaces/call-flows-resource/index.mdx new file mode 100644 index 0000000000..98be0225ef --- /dev/null +++ b/fern/products/sdk-reference/go/rest/namespaces/namespaces/call-flows-resource/index.mdx @@ -0,0 +1,117 @@ +--- +slug: "/reference/go/rest/namespaces/namespaces/call-flows-resource" +title: "CallFlowsResource" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.CallFlowsResource" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go" +--- +# `CallFlowsResource` + +CallFlowsResource extends CrudResource with version management and a singular sub-resource path convention. + +## Signature + +```go +type CallFlowsResource struct +``` + +## Properties + + + +## Methods + +### DeployVersion + +DeployVersion deploys a new version of a call flow. + +#### Signature + +```go +func (*CallFlowsResource) DeployVersion(id string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 94. + +*** + +### ListAddresses + +ListAddresses lists addresses for a call flow (uses singular "call\_flow" path). + +#### Signature + +```go +func (*CallFlowsResource) ListAddresses(id string, params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 82. + +*** + +### ListVersions + +ListVersions lists versions of a call flow. + +#### Signature + +```go +func (*CallFlowsResource) ListVersions(id string, params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 88. + +## Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 77. diff --git a/fern/products/sdk-reference/go/rest/namespaces/namespaces/calling-namespace/index.mdx b/fern/products/sdk-reference/go/rest/namespaces/namespaces/calling-namespace/index.mdx new file mode 100644 index 0000000000..1b79c7ce5b --- /dev/null +++ b/fern/products/sdk-reference/go/rest/namespaces/namespaces/calling-namespace/index.mdx @@ -0,0 +1,1065 @@ +--- +slug: "/reference/go/rest/namespaces/namespaces/calling-namespace" +title: "CallingNamespace" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.CallingNamespace" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go" +--- +# `CallingNamespace` + +CallingNamespace provides REST-based call control. All commands are dispatched as POST /api/calling/calls with a "command" field. + +## Signature + +```go +type CallingNamespace struct +``` + +## Properties + + + +## Methods + +### AIHold + +AIHold puts the AI on hold. + +#### Signature + +```go +func (*CallingNamespace) AIHold(callID string, params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 196. + +*** + +### AIMessage + +AIMessage sends a message to the AI agent on a call. + +#### Signature + +```go +func (*CallingNamespace) AIMessage(callID string, params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 191. + +*** + +### AIStop + +AIStop stops the AI session. + +#### Signature + +```go +func (*CallingNamespace) AIStop(callID string, params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 206. + +*** + +### AIUnhold + +AIUnhold takes the AI off hold. + +#### Signature + +```go +func (*CallingNamespace) AIUnhold(callID string, params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 201. + +*** + +### Collect + +Collect starts input collection on a call. + +#### Signature + +```go +func (*CallingNamespace) Collect(callID string, params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 114. + +*** + +### CollectStartInputTimers + +CollectStartInputTimers starts input timers for collection. + +#### Signature + +```go +func (*CallingNamespace) CollectStartInputTimers(callID string, params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 124. + +*** + +### CollectStop + +CollectStop stops input collection. + +#### Signature + +```go +func (*CallingNamespace) CollectStop(callID string, params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 119. + +*** + +### Denoise + +Denoise enables denoising on a call. + +#### Signature + +```go +func (*CallingNamespace) Denoise(callID string, params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 167. + +*** + +### DenoiseStop + +DenoiseStop disables denoising. + +#### Signature + +```go +func (*CallingNamespace) DenoiseStop(callID string, params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 172. + +*** + +### Detect + +Detect starts detection (e.g., answering machine) on a call. + +#### Signature + +```go +func (*CallingNamespace) Detect(callID string, params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 131. + +*** + +### DetectStop + +DetectStop stops detection. + +#### Signature + +```go +func (*CallingNamespace) DetectStop(callID string, params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 136. + +*** + +### Dial + +Dial initiates a new call. + +#### Signature + +```go +func (*CallingNamespace) Dial(params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 38. + +*** + +### Disconnect + +Disconnect disconnects a call. + +#### Signature + +```go +func (*CallingNamespace) Disconnect(callID string, params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 58. + +*** + +### End + +End terminates a call. + +#### Signature + +```go +func (*CallingNamespace) End(callID string, params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 48. + +*** + +### LiveTranscribe + +LiveTranscribe starts live transcription. + +#### Signature + +```go +func (*CallingNamespace) LiveTranscribe(callID string, params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 213. + +*** + +### LiveTranslate + +LiveTranslate starts live translation. + +#### Signature + +```go +func (*CallingNamespace) LiveTranslate(callID string, params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 218. + +*** + +### Play + +Play starts playback on a call. + +#### Signature + +```go +func (*CallingNamespace) Play(callID string, params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 65. + +*** + +### PlayPause + +PlayPause pauses playback. + +#### Signature + +```go +func (*CallingNamespace) PlayPause(callID string, params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 70. + +*** + +### PlayResume + +PlayResume resumes playback. + +#### Signature + +```go +func (*CallingNamespace) PlayResume(callID string, params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 75. + +*** + +### PlayStop + +PlayStop stops playback. + +#### Signature + +```go +func (*CallingNamespace) PlayStop(callID string, params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 80. + +*** + +### PlayVolume + +PlayVolume adjusts playback volume. + +#### Signature + +```go +func (*CallingNamespace) PlayVolume(callID string, params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 85. + +*** + +### ReceiveFaxStop + +ReceiveFaxStop stops receiving a fax. + +#### Signature + +```go +func (*CallingNamespace) ReceiveFaxStop(callID string, params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 230. + +*** + +### Record + +Record starts recording on a call. + +#### Signature + +```go +func (*CallingNamespace) Record(callID string, params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 92. + +*** + +### RecordPause + +RecordPause pauses recording. + +#### Signature + +```go +func (*CallingNamespace) RecordPause(callID string, params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 97. + +*** + +### RecordResume + +RecordResume resumes recording. + +#### Signature + +```go +func (*CallingNamespace) RecordResume(callID string, params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 102. + +*** + +### RecordStop + +RecordStop stops recording. + +#### Signature + +```go +func (*CallingNamespace) RecordStop(callID string, params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 107. + +*** + +### Refer + +Refer sends a SIP REFER on a call. + +#### Signature + +```go +func (*CallingNamespace) Refer(callID string, params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 237. + +*** + +### SendFaxStop + +SendFaxStop stops sending a fax. + +#### Signature + +```go +func (*CallingNamespace) SendFaxStop(callID string, params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 225. + +*** + +### Stream + +Stream starts streaming on a call. + +#### Signature + +```go +func (*CallingNamespace) Stream(callID string, params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 155. + +*** + +### StreamStop + +StreamStop stops streaming. + +#### Signature + +```go +func (*CallingNamespace) StreamStop(callID string, params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 160. + +*** + +### Tap + +Tap starts tapping a call. + +#### Signature + +```go +func (*CallingNamespace) Tap(callID string, params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 143. + +*** + +### TapStop + +TapStop stops tapping. + +#### Signature + +```go +func (*CallingNamespace) TapStop(callID string, params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 148. + +*** + +### Transcribe + +Transcribe starts transcription on a call. + +#### Signature + +```go +func (*CallingNamespace) Transcribe(callID string, params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 179. + +*** + +### TranscribeStop + +TranscribeStop stops transcription. + +#### Signature + +```go +func (*CallingNamespace) TranscribeStop(callID string, params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 184. + +*** + +### Transfer + +Transfer transfers a call. + +#### Signature + +```go +func (*CallingNamespace) Transfer(callID string, params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 53. + +*** + +### Update + +Update updates call parameters. + +#### Signature + +```go +func (*CallingNamespace) Update(params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 43. + +*** + +### UserEvent + +UserEvent sends a custom user event on a call. + +#### Signature + +```go +func (*CallingNamespace) UserEvent(callID string, params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 244. + +## Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 12. diff --git a/fern/products/sdk-reference/go/rest/namespaces/namespaces/chat-namespace/index.mdx b/fern/products/sdk-reference/go/rest/namespaces/namespaces/chat-namespace/index.mdx new file mode 100644 index 0000000000..b0cf73c168 --- /dev/null +++ b/fern/products/sdk-reference/go/rest/namespaces/namespaces/chat-namespace/index.mdx @@ -0,0 +1,59 @@ +--- +slug: "/reference/go/rest/namespaces/namespaces/chat-namespace" +title: "ChatNamespace" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.ChatNamespace" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/chat.go" +--- +# `ChatNamespace` + +ChatNamespace provides Chat token generation. + +## Signature + +```go +type ChatNamespace struct +``` + +## Properties + + + +## Methods + +### CreateToken + +CreateToken creates a Chat token. + +#### Signature + +```go +func (*ChatNamespace) CreateToken(data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/chat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/chat.go) + +Line 23. + +## Source + +[`pkg/rest/namespaces/chat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/chat.go) + +Line 11. diff --git a/fern/products/sdk-reference/go/rest/namespaces/namespaces/compat-accounts/index.mdx b/fern/products/sdk-reference/go/rest/namespaces/namespaces/compat-accounts/index.mdx new file mode 100644 index 0000000000..0fe79b68d8 --- /dev/null +++ b/fern/products/sdk-reference/go/rest/namespaces/namespaces/compat-accounts/index.mdx @@ -0,0 +1,139 @@ +--- +slug: "/reference/go/rest/namespaces/namespaces/compat-accounts" +title: "CompatAccounts" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.CompatAccounts" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go" +--- +# `CompatAccounts` + +CompatAccounts provides compat account/subproject management. + +## Signature + +```go +type CompatAccounts struct +``` + +## Properties + + + +## Methods + +### Create + +Create creates a new compat account. + +#### Signature + +```go +func (*CompatAccounts) Create(data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 25. + +*** + +### Get + +Get retrieves a compat account by SID. + +#### Signature + +```go +func (*CompatAccounts) Get(sid string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 30. + +*** + +### List + +List lists all compat accounts. + +#### Signature + +```go +func (*CompatAccounts) List(params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 20. + +*** + +### Update + +Update updates a compat account by SID. + +#### Signature + +```go +func (*CompatAccounts) Update(sid string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 35. + +## Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 15. diff --git a/fern/products/sdk-reference/go/rest/namespaces/namespaces/compat-applications/index.mdx b/fern/products/sdk-reference/go/rest/namespaces/namespaces/compat-applications/index.mdx new file mode 100644 index 0000000000..0e696fb8f5 --- /dev/null +++ b/fern/products/sdk-reference/go/rest/namespaces/namespaces/compat-applications/index.mdx @@ -0,0 +1,61 @@ +--- +slug: "/reference/go/rest/namespaces/namespaces/compat-applications" +title: "CompatApplications" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.CompatApplications" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go" +--- +# `CompatApplications` + +CompatApplications provides compat application management. + +## Signature + +```go +type CompatApplications struct +``` + +## Properties + + + +## Methods + +### Update + +Update updates an application (uses POST per Twilio compat). + +#### Signature + +```go +func (*CompatApplications) Update(sid string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 266. + +## Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 261. diff --git a/fern/products/sdk-reference/go/rest/namespaces/namespaces/compat-calls/index.mdx b/fern/products/sdk-reference/go/rest/namespaces/namespaces/compat-calls/index.mdx new file mode 100644 index 0000000000..63c59e1de3 --- /dev/null +++ b/fern/products/sdk-reference/go/rest/namespaces/namespaces/compat-calls/index.mdx @@ -0,0 +1,177 @@ +--- +slug: "/reference/go/rest/namespaces/namespaces/compat-calls" +title: "CompatCalls" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.CompatCalls" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go" +--- +# `CompatCalls` + +CompatCalls provides compat call management with recording and stream sub-resources. + +## Signature + +```go +type CompatCalls struct +``` + +## Properties + + + +## Methods + +### StartRecording + +StartRecording starts recording on a call. + +#### Signature + +```go +func (*CompatCalls) StartRecording(callSID string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 52. + +*** + +### StartStream + +StartStream starts a stream on a call. + +#### Signature + +```go +func (*CompatCalls) StartStream(callSID string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 62. + +*** + +### StopStream + +StopStream stops a stream on a call. + +#### Signature + +```go +func (*CompatCalls) StopStream(callSID string, streamSID string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 67. + +*** + +### Update + +Update updates a call (uses POST per Twilio compat). + +#### Signature + +```go +func (*CompatCalls) Update(sid string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 47. + +*** + +### UpdateRecording + +UpdateRecording updates a recording on a call. + +#### Signature + +```go +func (*CompatCalls) UpdateRecording(callSID string, recordingSID string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 57. + +## Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 42. diff --git a/fern/products/sdk-reference/go/rest/namespaces/namespaces/compat-conferences/index.mdx b/fern/products/sdk-reference/go/rest/namespaces/namespaces/compat-conferences/index.mdx new file mode 100644 index 0000000000..691ed0794b --- /dev/null +++ b/fern/products/sdk-reference/go/rest/namespaces/namespaces/compat-conferences/index.mdx @@ -0,0 +1,399 @@ +--- +slug: "/reference/go/rest/namespaces/namespaces/compat-conferences" +title: "CompatConferences" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.CompatConferences" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go" +--- +# `CompatConferences` + +CompatConferences provides compat conference management with participants, recordings, and streams. + +## Signature + +```go +type CompatConferences struct +``` + +## Properties + + + +## Methods + +### DeleteRecording + +DeleteRecording deletes a recording from a conference. + +#### Signature + +```go +func (*CompatConferences) DeleteRecording(conferenceSID string, recordingSID string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 188. + +*** + +### Get + +Get retrieves a conference by SID. + +#### Signature + +```go +func (*CompatConferences) Get(sid string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 139. + +*** + +### GetParticipant + +GetParticipant retrieves a participant from a conference. + +#### Signature + +```go +func (*CompatConferences) GetParticipant(conferenceSID string, callSID string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 156. + +*** + +### GetRecording + +GetRecording retrieves a recording from a conference. + +#### Signature + +```go +func (*CompatConferences) GetRecording(conferenceSID string, recordingSID string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 178. + +*** + +### List + +List lists all conferences. + +#### Signature + +```go +func (*CompatConferences) List(params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 134. + +*** + +### ListParticipants + +ListParticipants lists participants in a conference. + +#### Signature + +```go +func (*CompatConferences) ListParticipants(conferenceSID string, params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 151. + +*** + +### ListRecordings + +ListRecordings lists recordings for a conference. + +#### Signature + +```go +func (*CompatConferences) ListRecordings(conferenceSID string, params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 173. + +*** + +### RemoveParticipant + +RemoveParticipant removes a participant from a conference. + +#### Signature + +```go +func (*CompatConferences) RemoveParticipant(conferenceSID string, callSID string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 166. + +*** + +### StartStream + +StartStream starts a stream on a conference. + +#### Signature + +```go +func (*CompatConferences) StartStream(conferenceSID string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 195. + +*** + +### StopStream + +StopStream stops a stream on a conference. + +#### Signature + +```go +func (*CompatConferences) StopStream(conferenceSID string, streamSID string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 200. + +*** + +### Update + +Update updates a conference. + +#### Signature + +```go +func (*CompatConferences) Update(sid string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 144. + +*** + +### UpdateParticipant + +UpdateParticipant updates a participant in a conference. + +#### Signature + +```go +func (*CompatConferences) UpdateParticipant(conferenceSID string, callSID string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 161. + +*** + +### UpdateRecording + +UpdateRecording updates a recording in a conference. + +#### Signature + +```go +func (*CompatConferences) UpdateRecording(conferenceSID string, recordingSID string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 183. + +## Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 129. diff --git a/fern/products/sdk-reference/go/rest/namespaces/namespaces/compat-faxes/index.mdx b/fern/products/sdk-reference/go/rest/namespaces/namespaces/compat-faxes/index.mdx new file mode 100644 index 0000000000..fcc57bc48f --- /dev/null +++ b/fern/products/sdk-reference/go/rest/namespaces/namespaces/compat-faxes/index.mdx @@ -0,0 +1,145 @@ +--- +slug: "/reference/go/rest/namespaces/namespaces/compat-faxes" +title: "CompatFaxes" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.CompatFaxes" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go" +--- +# `CompatFaxes` + +CompatFaxes provides compat fax management with media sub-resources. + +## Signature + +```go +type CompatFaxes struct +``` + +## Properties + + + +## Methods + +### DeleteMedia + +DeleteMedia deletes a media item from a fax. + +#### Signature + +```go +func (*CompatFaxes) DeleteMedia(faxSID string, mediaSID string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 121. + +*** + +### GetMedia + +GetMedia retrieves a specific media item from a fax. + +#### Signature + +```go +func (*CompatFaxes) GetMedia(faxSID string, mediaSID string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 116. + +*** + +### ListMedia + +ListMedia lists media for a fax. + +#### Signature + +```go +func (*CompatFaxes) ListMedia(faxSID string, params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 111. + +*** + +### Update + +Update updates a fax (uses POST per Twilio compat). + +#### Signature + +```go +func (*CompatFaxes) Update(sid string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 106. + +## Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 101. diff --git a/fern/products/sdk-reference/go/rest/namespaces/namespaces/compat-laml-bins/index.mdx b/fern/products/sdk-reference/go/rest/namespaces/namespaces/compat-laml-bins/index.mdx new file mode 100644 index 0000000000..e86cbf3cc4 --- /dev/null +++ b/fern/products/sdk-reference/go/rest/namespaces/namespaces/compat-laml-bins/index.mdx @@ -0,0 +1,61 @@ +--- +slug: "/reference/go/rest/namespaces/namespaces/compat-laml-bins" +title: "CompatLamlBins" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.CompatLamlBins" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go" +--- +# `CompatLamlBins` + +CompatLamlBins provides compat cXML/LaML script management. + +## Signature + +```go +type CompatLamlBins struct +``` + +## Properties + + + +## Methods + +### Update + +Update updates a LaML bin (uses POST per Twilio compat). + +#### Signature + +```go +func (*CompatLamlBins) Update(sid string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 278. + +## Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 273. diff --git a/fern/products/sdk-reference/go/rest/namespaces/namespaces/compat-messages/index.mdx b/fern/products/sdk-reference/go/rest/namespaces/namespaces/compat-messages/index.mdx new file mode 100644 index 0000000000..fc7cea15d2 --- /dev/null +++ b/fern/products/sdk-reference/go/rest/namespaces/namespaces/compat-messages/index.mdx @@ -0,0 +1,145 @@ +--- +slug: "/reference/go/rest/namespaces/namespaces/compat-messages" +title: "CompatMessages" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.CompatMessages" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go" +--- +# `CompatMessages` + +CompatMessages provides compat message management with media sub-resources. + +## Signature + +```go +type CompatMessages struct +``` + +## Properties + + + +## Methods + +### DeleteMedia + +DeleteMedia deletes a media item from a message. + +#### Signature + +```go +func (*CompatMessages) DeleteMedia(messageSID string, mediaSID string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 94. + +*** + +### GetMedia + +GetMedia retrieves a specific media item from a message. + +#### Signature + +```go +func (*CompatMessages) GetMedia(messageSID string, mediaSID string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 89. + +*** + +### ListMedia + +ListMedia lists media for a message. + +#### Signature + +```go +func (*CompatMessages) ListMedia(messageSID string, params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 84. + +*** + +### Update + +Update updates a message (uses POST per Twilio compat). + +#### Signature + +```go +func (*CompatMessages) Update(sid string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 79. + +## Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 74. diff --git a/fern/products/sdk-reference/go/rest/namespaces/namespaces/compat-namespace/index.mdx b/fern/products/sdk-reference/go/rest/namespaces/namespaces/compat-namespace/index.mdx new file mode 100644 index 0000000000..99791c350e --- /dev/null +++ b/fern/products/sdk-reference/go/rest/namespaces/namespaces/compat-namespace/index.mdx @@ -0,0 +1,55 @@ +--- +slug: "/reference/go/rest/namespaces/namespaces/compat-namespace" +title: "CompatNamespace" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.CompatNamespace" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go" +--- +# `CompatNamespace` + +CompatNamespace provides the Twilio-compatible LAML API with AccountSid scoping. + +## Signature + +```go +type CompatNamespace struct +``` + +## Properties + + + + + + + + + + + + + + + + + + + + + + + + + +## Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 378. diff --git a/fern/products/sdk-reference/go/rest/namespaces/namespaces/compat-phone-numbers/index.mdx b/fern/products/sdk-reference/go/rest/namespaces/namespaces/compat-phone-numbers/index.mdx new file mode 100644 index 0000000000..9c6e63b4cb --- /dev/null +++ b/fern/products/sdk-reference/go/rest/namespaces/namespaces/compat-phone-numbers/index.mdx @@ -0,0 +1,273 @@ +--- +slug: "/reference/go/rest/namespaces/namespaces/compat-phone-numbers" +title: "CompatPhoneNumbers" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.CompatPhoneNumbers" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go" +--- +# `CompatPhoneNumbers` + +CompatPhoneNumbers provides compat phone number management. + +## Signature + +```go +type CompatPhoneNumbers struct +``` + +## Properties + + + +## Methods + +### Delete + +Delete releases an incoming phone number. + +#### Signature + +```go +func (*CompatPhoneNumbers) Delete(sid string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 233. + +*** + +### Get + +Get retrieves an incoming phone number by SID. + +#### Signature + +```go +func (*CompatPhoneNumbers) Get(sid string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 223. + +*** + +### ImportNumber + +ImportNumber imports an externally-hosted phone number. + +#### Signature + +```go +func (*CompatPhoneNumbers) ImportNumber(data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 238. + +*** + +### List + +List lists all incoming phone numbers. + +#### Signature + +```go +func (*CompatPhoneNumbers) List(params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 213. + +*** + +### ListAvailableCountries + +ListAvailableCountries lists countries with available numbers. + +#### Signature + +```go +func (*CompatPhoneNumbers) ListAvailableCountries(params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 244. + +*** + +### Purchase + +Purchase purchases a phone number. + +#### Signature + +```go +func (*CompatPhoneNumbers) Purchase(data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 218. + +*** + +### SearchLocal + +SearchLocal searches for available local numbers in a country. + +#### Signature + +```go +func (*CompatPhoneNumbers) SearchLocal(country string, params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 249. + +*** + +### SearchTollFree + +SearchTollFree searches for available toll-free numbers in a country. + +#### Signature + +```go +func (*CompatPhoneNumbers) SearchTollFree(country string, params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 254. + +*** + +### Update + +Update updates an incoming phone number. + +#### Signature + +```go +func (*CompatPhoneNumbers) Update(sid string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 228. + +## Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 207. diff --git a/fern/products/sdk-reference/go/rest/namespaces/namespaces/compat-queues/index.mdx b/fern/products/sdk-reference/go/rest/namespaces/namespaces/compat-queues/index.mdx new file mode 100644 index 0000000000..8b523b9de5 --- /dev/null +++ b/fern/products/sdk-reference/go/rest/namespaces/namespaces/compat-queues/index.mdx @@ -0,0 +1,147 @@ +--- +slug: "/reference/go/rest/namespaces/namespaces/compat-queues" +title: "CompatQueues" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.CompatQueues" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go" +--- +# `CompatQueues` + +CompatQueues provides compat queue management with members. + +## Signature + +```go +type CompatQueues struct +``` + +## Properties + + + +## Methods + +### DequeueMember + +DequeueMember dequeues a member from a queue. + +#### Signature + +```go +func (*CompatQueues) DequeueMember(queueSID string, callSID string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 305. + +*** + +### GetMember + +GetMember retrieves a member from a queue. + +#### Signature + +```go +func (*CompatQueues) GetMember(queueSID string, callSID string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 300. + +*** + +### ListMembers + +ListMembers lists members of a queue. + +#### Signature + +```go +func (*CompatQueues) ListMembers(queueSID string, params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 295. + +*** + +### Update + +Update updates a queue (uses POST per Twilio compat). + +#### Signature + +```go +func (*CompatQueues) Update(sid string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 290. + +## Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 285. diff --git a/fern/products/sdk-reference/go/rest/namespaces/namespaces/compat-recordings/index.mdx b/fern/products/sdk-reference/go/rest/namespaces/namespaces/compat-recordings/index.mdx new file mode 100644 index 0000000000..d480a5bd36 --- /dev/null +++ b/fern/products/sdk-reference/go/rest/namespaces/namespaces/compat-recordings/index.mdx @@ -0,0 +1,111 @@ +--- +slug: "/reference/go/rest/namespaces/namespaces/compat-recordings" +title: "CompatRecordings" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.CompatRecordings" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go" +--- +# `CompatRecordings` + +CompatRecordings provides compat recording management. + +## Signature + +```go +type CompatRecordings struct +``` + +## Properties + + + +## Methods + +### Delete + +Delete removes a recording. + +#### Signature + +```go +func (*CompatRecordings) Delete(sid string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 327. + +*** + +### Get + +Get retrieves a recording by SID. + +#### Signature + +```go +func (*CompatRecordings) Get(sid string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 322. + +*** + +### List + +List lists all recordings. + +#### Signature + +```go +func (*CompatRecordings) List(params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 317. + +## Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 312. diff --git a/fern/products/sdk-reference/go/rest/namespaces/namespaces/compat-tokens/index.mdx b/fern/products/sdk-reference/go/rest/namespaces/namespaces/compat-tokens/index.mdx new file mode 100644 index 0000000000..d6b67d382d --- /dev/null +++ b/fern/products/sdk-reference/go/rest/namespaces/namespaces/compat-tokens/index.mdx @@ -0,0 +1,113 @@ +--- +slug: "/reference/go/rest/namespaces/namespaces/compat-tokens" +title: "CompatTokens" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.CompatTokens" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go" +--- +# `CompatTokens` + +CompatTokens provides compat API token management. + +## Signature + +```go +type CompatTokens struct +``` + +## Properties + + + +## Methods + +### Create + +Create creates a new API token. + +#### Signature + +```go +func (*CompatTokens) Create(data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 361. + +*** + +### Delete + +Delete removes an API token. + +#### Signature + +```go +func (*CompatTokens) Delete(tokenID string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 371. + +*** + +### Update + +Update modifies an API token. + +#### Signature + +```go +func (*CompatTokens) Update(tokenID string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 366. + +## Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 356. diff --git a/fern/products/sdk-reference/go/rest/namespaces/namespaces/compat-transcriptions/index.mdx b/fern/products/sdk-reference/go/rest/namespaces/namespaces/compat-transcriptions/index.mdx new file mode 100644 index 0000000000..1b620db550 --- /dev/null +++ b/fern/products/sdk-reference/go/rest/namespaces/namespaces/compat-transcriptions/index.mdx @@ -0,0 +1,111 @@ +--- +slug: "/reference/go/rest/namespaces/namespaces/compat-transcriptions" +title: "CompatTranscriptions" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.CompatTranscriptions" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go" +--- +# `CompatTranscriptions` + +CompatTranscriptions provides compat transcription management. + +## Signature + +```go +type CompatTranscriptions struct +``` + +## Properties + + + +## Methods + +### Delete + +Delete removes a transcription. + +#### Signature + +```go +func (*CompatTranscriptions) Delete(sid string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 349. + +*** + +### Get + +Get retrieves a transcription by SID. + +#### Signature + +```go +func (*CompatTranscriptions) Get(sid string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 344. + +*** + +### List + +List lists all transcriptions. + +#### Signature + +```go +func (*CompatTranscriptions) List(params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 339. + +## Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 334. diff --git a/fern/products/sdk-reference/go/rest/namespaces/namespaces/conference-logs/index.mdx b/fern/products/sdk-reference/go/rest/namespaces/namespaces/conference-logs/index.mdx new file mode 100644 index 0000000000..f3af1052a7 --- /dev/null +++ b/fern/products/sdk-reference/go/rest/namespaces/namespaces/conference-logs/index.mdx @@ -0,0 +1,59 @@ +--- +slug: "/reference/go/rest/namespaces/namespaces/conference-logs" +title: "ConferenceLogs" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.ConferenceLogs" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/logs.go" +--- +# `ConferenceLogs` + +ConferenceLogs provides conference log queries. + +## Signature + +```go +type ConferenceLogs struct +``` + +## Properties + + + +## Methods + +### List + +List lists conference logs. + +#### Signature + +```go +func (*ConferenceLogs) List(params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/logs.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/logs.go) + +Line 74. + +## Source + +[`pkg/rest/namespaces/logs.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/logs.go) + +Line 69. diff --git a/fern/products/sdk-reference/go/rest/namespaces/namespaces/conference-rooms-resource/index.mdx b/fern/products/sdk-reference/go/rest/namespaces/namespaces/conference-rooms-resource/index.mdx new file mode 100644 index 0000000000..03dff09575 --- /dev/null +++ b/fern/products/sdk-reference/go/rest/namespaces/namespaces/conference-rooms-resource/index.mdx @@ -0,0 +1,61 @@ +--- +slug: "/reference/go/rest/namespaces/namespaces/conference-rooms-resource" +title: "ConferenceRoomsResource" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.ConferenceRoomsResource" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go" +--- +# `ConferenceRoomsResource` + +ConferenceRoomsResource uses singular "conference\_room" for sub-resource paths. + +## Signature + +```go +type ConferenceRoomsResource struct +``` + +## Properties + + + +## Methods + +### ListAddresses + +ListAddresses lists addresses for a conference room. + +#### Signature + +```go +func (*ConferenceRoomsResource) ListAddresses(id string, params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 107. + +## Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 102. diff --git a/fern/products/sdk-reference/go/rest/namespaces/namespaces/crud-resource/index.mdx b/fern/products/sdk-reference/go/rest/namespaces/namespaces/crud-resource/index.mdx new file mode 100644 index 0000000000..eb2bd260c4 --- /dev/null +++ b/fern/products/sdk-reference/go/rest/namespaces/namespaces/crud-resource/index.mdx @@ -0,0 +1,169 @@ +--- +slug: "/reference/go/rest/namespaces/namespaces/crud-resource" +title: "CrudResource" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.CrudResource" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/common.go" +--- +# `CrudResource` + +CrudResource provides standard List, Create, Get, Update, Delete operations against a REST collection endpoint within a namespace. + +## Signature + +```go +type CrudResource struct +``` + +## Properties + + + + + "PATCH" (default) or "PUT" + + +## Methods + +### Create + +Create sends a POST request to create a new resource. + +#### Signature + +```go +func (*CrudResource) Create(data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/common.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/common.go) + +Line 68. + +*** + +### Delete + +Delete removes a resource by ID. It returns the parsed response body (or an empty map for 204 No Content) and any error. + +#### Signature + +```go +func (*CrudResource) Delete(id string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/common.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/common.go) + +Line 88. + +*** + +### Get + +Get retrieves a single resource by ID. + +#### Signature + +```go +func (*CrudResource) Get(id string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/common.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/common.go) + +Line 73. + +*** + +### List + +List retrieves all items from the collection. + +#### Signature + +```go +func (*CrudResource) List(params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/common.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/common.go) + +Line 63. + +*** + +### Update + +Update modifies an existing resource by ID. + +#### Signature + +```go +func (*CrudResource) Update(id string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/common.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/common.go) + +Line 78. + +## Source + +[`pkg/rest/namespaces/common.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/common.go) + +Line 41. diff --git a/fern/products/sdk-reference/go/rest/namespaces/namespaces/crud-with-addresses/index.mdx b/fern/products/sdk-reference/go/rest/namespaces/namespaces/crud-with-addresses/index.mdx new file mode 100644 index 0000000000..426ab39667 --- /dev/null +++ b/fern/products/sdk-reference/go/rest/namespaces/namespaces/crud-with-addresses/index.mdx @@ -0,0 +1,61 @@ +--- +slug: "/reference/go/rest/namespaces/namespaces/crud-with-addresses" +title: "CrudWithAddresses" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.CrudWithAddresses" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/common.go" +--- +# `CrudWithAddresses` + +CrudWithAddresses extends CrudResource with the nested addresses endpoint. Matches Python's CrudWithAddresses at \_base.py:109-113. Only resources that explicitly support the addresses sub-resource should embed this type; plain CrudResource does not expose ListAddresses. + +## Signature + +```go +type CrudWithAddresses struct +``` + +## Properties + + + +## Methods + +### ListAddresses + +ListAddresses lists addresses associated with the resource identified by id. + +#### Signature + +```go +func (*CrudWithAddresses) ListAddresses(id string, params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/common.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/common.go) + +Line 113. + +## Source + +[`pkg/rest/namespaces/common.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/common.go) + +Line 96. diff --git a/fern/products/sdk-reference/go/rest/namespaces/namespaces/cxml-applications-resource/index.mdx b/fern/products/sdk-reference/go/rest/namespaces/namespaces/cxml-applications-resource/index.mdx new file mode 100644 index 0000000000..1b94075e2e --- /dev/null +++ b/fern/products/sdk-reference/go/rest/namespaces/namespaces/cxml-applications-resource/index.mdx @@ -0,0 +1,89 @@ +--- +slug: "/reference/go/rest/namespaces/namespaces/cxml-applications-resource" +title: "CxmlApplicationsResource" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.CxmlApplicationsResource" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go" +--- +# `CxmlApplicationsResource` + +CxmlApplicationsResource exposes the fabric cXML applications sub-resource. Create is explicitly disallowed — cXML applications cannot be created via this API. This mirrors Python's CxmlApplicationsResource.create raising NotImplementedError (fabric.py:90). + +## Signature + +```go +type CxmlApplicationsResource struct +``` + +## Properties + + + +## Methods + +### Create + +Create always returns an error — cXML applications cannot be created via this API. The params argument is accepted for API parity with other CRUD resources but is reported in the error so the caller can see what payload was rejected. To create a new cXML application use a different API surface or the SignalWire dashboard. + +Mirrors Python's CxmlApplicationsResource.create raising NotImplementedError (signalwire/rest/namespaces/fabric.py:90). + +#### Signature + +```go +func (*CxmlApplicationsResource) Create(params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 162. + +*** + +### ListAddresses + +ListAddresses lists addresses for a cXML application. + +#### Signature + +```go +func (*CxmlApplicationsResource) ListAddresses(id string, params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 170. + +## Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 150. diff --git a/fern/products/sdk-reference/go/rest/namespaces/namespaces/cxml-webhook-options/index.mdx b/fern/products/sdk-reference/go/rest/namespaces/namespaces/cxml-webhook-options/index.mdx new file mode 100644 index 0000000000..a44d6f4d10 --- /dev/null +++ b/fern/products/sdk-reference/go/rest/namespaces/namespaces/cxml-webhook-options/index.mdx @@ -0,0 +1,43 @@ +--- +slug: "/reference/go/rest/namespaces/namespaces/cxml-webhook-options" +title: "CxmlWebhookOptions" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.CxmlWebhookOptions" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/phone_numbers.go" +--- +# `CxmlWebhookOptions` + +CxmlWebhookOptions holds optional fields for SetCxmlWebhook. + +## Signature + +```go +type CxmlWebhookOptions struct +``` + +## Properties + + + Extra passes through additional wire-level fields. + + + + FallbackURL is used when the primary URL fails. + + + + StatusCallbackURL receives call status updates. + + +## Source + +[`pkg/rest/namespaces/phone_numbers.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/phone_numbers.go) + +Line 71. diff --git a/fern/products/sdk-reference/go/rest/namespaces/namespaces/datasphere-documents/index.mdx b/fern/products/sdk-reference/go/rest/namespaces/namespaces/datasphere-documents/index.mdx new file mode 100644 index 0000000000..fb7ae16927 --- /dev/null +++ b/fern/products/sdk-reference/go/rest/namespaces/namespaces/datasphere-documents/index.mdx @@ -0,0 +1,143 @@ +--- +slug: "/reference/go/rest/namespaces/namespaces/datasphere-documents" +title: "DatasphereDocuments" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.DatasphereDocuments" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/datasphere.go" +--- +# `DatasphereDocuments` + +DatasphereDocuments provides document management with search and chunk operations for the Datasphere API. + +## Signature + +```go +type DatasphereDocuments struct +``` + +## Properties + + + +## Methods + +### DeleteChunk + +DeleteChunk deletes a specific chunk from a document. + +#### Signature + +```go +func (*DatasphereDocuments) DeleteChunk(documentID string, chunkID string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/datasphere.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/datasphere.go) + +Line 32. + +*** + +### GetChunk + +GetChunk retrieves a specific chunk from a document. + +#### Signature + +```go +func (*DatasphereDocuments) GetChunk(documentID string, chunkID string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/datasphere.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/datasphere.go) + +Line 27. + +*** + +### ListChunks + +ListChunks lists chunks for a specific document. + +#### Signature + +```go +func (*DatasphereDocuments) ListChunks(documentID string, params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/datasphere.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/datasphere.go) + +Line 22. + +*** + +### Search + +Search performs a semantic search across documents. + +#### Signature + +```go +func (*DatasphereDocuments) Search(data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/datasphere.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/datasphere.go) + +Line 17. + +## Source + +[`pkg/rest/namespaces/datasphere.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/datasphere.go) + +Line 12. diff --git a/fern/products/sdk-reference/go/rest/namespaces/namespaces/datasphere-namespace/index.mdx b/fern/products/sdk-reference/go/rest/namespaces/namespaces/datasphere-namespace/index.mdx new file mode 100644 index 0000000000..7c0eaa8c40 --- /dev/null +++ b/fern/products/sdk-reference/go/rest/namespaces/namespaces/datasphere-namespace/index.mdx @@ -0,0 +1,33 @@ +--- +slug: "/reference/go/rest/namespaces/namespaces/datasphere-namespace" +title: "DatasphereNamespace" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.DatasphereNamespace" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/datasphere.go" +--- +# `DatasphereNamespace` + +DatasphereNamespace groups Datasphere API resources. + +## Signature + +```go +type DatasphereNamespace struct +``` + +## Properties + + + +## Source + +[`pkg/rest/namespaces/datasphere.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/datasphere.go) + +Line 37. diff --git a/fern/products/sdk-reference/go/rest/namespaces/namespaces/fabric-addresses/index.mdx b/fern/products/sdk-reference/go/rest/namespaces/namespaces/fabric-addresses/index.mdx new file mode 100644 index 0000000000..94ed3d36d5 --- /dev/null +++ b/fern/products/sdk-reference/go/rest/namespaces/namespaces/fabric-addresses/index.mdx @@ -0,0 +1,85 @@ +--- +slug: "/reference/go/rest/namespaces/namespaces/fabric-addresses" +title: "FabricAddresses" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.FabricAddresses" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go" +--- +# `FabricAddresses` + +FabricAddresses provides read-only access to fabric addresses. + +## Signature + +```go +type FabricAddresses struct +``` + +## Properties + + + +## Methods + +### Get + +Get retrieves a fabric address by ID. + +#### Signature + +```go +func (*FabricAddresses) Get(id string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 275. + +*** + +### List + +List lists all fabric addresses. + +#### Signature + +```go +func (*FabricAddresses) List(params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 270. + +## Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 265. diff --git a/fern/products/sdk-reference/go/rest/namespaces/namespaces/fabric-namespace/index.mdx b/fern/products/sdk-reference/go/rest/namespaces/namespaces/fabric-namespace/index.mdx new file mode 100644 index 0000000000..579cd77201 --- /dev/null +++ b/fern/products/sdk-reference/go/rest/namespaces/namespaces/fabric-namespace/index.mdx @@ -0,0 +1,69 @@ +--- +slug: "/reference/go/rest/namespaces/namespaces/fabric-namespace" +title: "FabricNamespace" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.FabricNamespace" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go" +--- +# `FabricNamespace` + +FabricNamespace groups all Fabric API resource types. + +## Signature + +```go +type FabricNamespace struct +``` + +## Properties + + + + + + + + + + + + + + + + + + + + + Special resources + + + + + + + + + + PUT-update resources + + + + PATCH-update resources SWMLWebhooks and CXMLWebhooks are auto-materialized: prefer PhoneNumbers.SetSwmlWebhook / SetCxmlWebhook for creation. Direct .Create still works for backcompat but emits a deprecation warning. + + + + +## Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 333. diff --git a/fern/products/sdk-reference/go/rest/namespaces/namespaces/fabric-tokens/index.mdx b/fern/products/sdk-reference/go/rest/namespaces/namespaces/fabric-tokens/index.mdx new file mode 100644 index 0000000000..ee5bcb8281 --- /dev/null +++ b/fern/products/sdk-reference/go/rest/namespaces/namespaces/fabric-tokens/index.mdx @@ -0,0 +1,163 @@ +--- +slug: "/reference/go/rest/namespaces/namespaces/fabric-tokens" +title: "FabricTokens" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.FabricTokens" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go" +--- +# `FabricTokens` + +FabricTokens provides subscriber, guest, invite, and embed token creation. + +## Signature + +```go +type FabricTokens struct +``` + +## Properties + + + +## Methods + +### CreateEmbedToken + +CreateEmbedToken creates an embed token. + +#### Signature + +```go +func (*FabricTokens) CreateEmbedToken(data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 307. + +*** + +### CreateGuestToken + +CreateGuestToken creates a guest token. + +#### Signature + +```go +func (*FabricTokens) CreateGuestToken(data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 302. + +*** + +### CreateInviteToken + +CreateInviteToken creates an invite token. + +#### Signature + +```go +func (*FabricTokens) CreateInviteToken(data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 297. + +*** + +### CreateSubscriberToken + +CreateSubscriberToken creates a subscriber token. + +#### Signature + +```go +func (*FabricTokens) CreateSubscriberToken(data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 287. + +*** + +### RefreshSubscriberToken + +RefreshSubscriberToken refreshes a subscriber token. + +#### Signature + +```go +func (*FabricTokens) RefreshSubscriberToken(data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 292. + +## Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 282. diff --git a/fern/products/sdk-reference/go/rest/namespaces/namespaces/fax-logs/index.mdx b/fern/products/sdk-reference/go/rest/namespaces/namespaces/fax-logs/index.mdx new file mode 100644 index 0000000000..138850f8ab --- /dev/null +++ b/fern/products/sdk-reference/go/rest/namespaces/namespaces/fax-logs/index.mdx @@ -0,0 +1,85 @@ +--- +slug: "/reference/go/rest/namespaces/namespaces/fax-logs" +title: "FaxLogs" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.FaxLogs" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/logs.go" +--- +# `FaxLogs` + +FaxLogs provides fax log queries. + +## Signature + +```go +type FaxLogs struct +``` + +## Properties + + + +## Methods + +### Get + +Get retrieves a specific fax log entry. + +#### Signature + +```go +func (*FaxLogs) Get(logID string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/logs.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/logs.go) + +Line 62. + +*** + +### List + +List lists fax logs. + +#### Signature + +```go +func (*FaxLogs) List(params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/logs.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/logs.go) + +Line 57. + +## Source + +[`pkg/rest/namespaces/logs.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/logs.go) + +Line 52. diff --git a/fern/products/sdk-reference/go/rest/namespaces/namespaces/generic-resources/index.mdx b/fern/products/sdk-reference/go/rest/namespaces/namespaces/generic-resources/index.mdx new file mode 100644 index 0000000000..c0ba364833 --- /dev/null +++ b/fern/products/sdk-reference/go/rest/namespaces/namespaces/generic-resources/index.mdx @@ -0,0 +1,199 @@ +--- +slug: "/reference/go/rest/namespaces/namespaces/generic-resources" +title: "GenericResources" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.GenericResources" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go" +--- +# `GenericResources` + +GenericResources provides operations across all fabric resource types. + +## Signature + +```go +type GenericResources struct +``` + +## Properties + + + +## Methods + +### AssignDomainApplication + +AssignDomainApplication assigns a domain application to a resource. + +#### Signature + +```go +func (*GenericResources) AssignDomainApplication(id string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 258. + +*** + +### AssignPhoneRoute + + + **Deprecated.** This endpoint (POST /api/fabric/resources/\{id\}/phone\_routes) accepts only a narrow set of legacy resource types as the attach target. It does NOT work for swml\_webhook / cxml\_webhook / ai\_agent bindings — those are configured on the phone number and the Fabric resource is auto-materialized. Use phone\_numbers.SetSwmlWebhook, SetCxmlWebhook, SetAiAgent, etc. instead. See porting-sdk's phone-binding.md. + + +AssignPhoneRoute assigns a phone route to a resource. + +#### Signature + +```go +func (*GenericResources) AssignPhoneRoute(id string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 245. + +*** + +### Delete + +Delete removes a generic resource by ID. + +#### Signature + +```go +func (*GenericResources) Delete(id string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 228. + +*** + +### Get + +Get retrieves a generic resource by ID. + +#### Signature + +```go +func (*GenericResources) Get(id string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 223. + +*** + +### List + +List lists all generic resources. + +#### Signature + +```go +func (*GenericResources) List(params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 218. + +*** + +### ListAddresses + +ListAddresses lists addresses for a generic resource. + +#### Signature + +```go +func (*GenericResources) ListAddresses(id string, params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 233. + +## Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 213. diff --git a/fern/products/sdk-reference/go/rest/namespaces/namespaces/imported-numbers-namespace/index.mdx b/fern/products/sdk-reference/go/rest/namespaces/namespaces/imported-numbers-namespace/index.mdx new file mode 100644 index 0000000000..1f1ec98079 --- /dev/null +++ b/fern/products/sdk-reference/go/rest/namespaces/namespaces/imported-numbers-namespace/index.mdx @@ -0,0 +1,59 @@ +--- +slug: "/reference/go/rest/namespaces/namespaces/imported-numbers-namespace" +title: "ImportedNumbersNamespace" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.ImportedNumbersNamespace" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/imported_numbers.go" +--- +# `ImportedNumbersNamespace` + +ImportedNumbersNamespace provides imported phone number management. + +## Signature + +```go +type ImportedNumbersNamespace struct +``` + +## Properties + + + +## Methods + +### Create + +Create imports an externally-hosted phone number. + +#### Signature + +```go +func (*ImportedNumbersNamespace) Create(data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/imported_numbers.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/imported_numbers.go) + +Line 23. + +## Source + +[`pkg/rest/namespaces/imported_numbers.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/imported_numbers.go) + +Line 11. diff --git a/fern/products/sdk-reference/go/rest/namespaces/namespaces/index.mdx b/fern/products/sdk-reference/go/rest/namespaces/namespaces/index.mdx new file mode 100644 index 0000000000..19ee86c544 --- /dev/null +++ b/fern/products/sdk-reference/go/rest/namespaces/namespaces/index.mdx @@ -0,0 +1,1468 @@ +--- +slug: "/reference/go/rest/namespaces/namespaces" +title: "namespaces" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "module" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + parent: "rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/addresses.go" +--- +# `namespaces` + +Package namespaces contains the individual API namespace implementations for the SignalWire REST client. + +## Signature + +```go +package namespaces +``` + +## Constants + + + PhoneCallHandler wire values accepted by phone\_numbers.Update. + + + + PhoneCallHandler wire values accepted by phone\_numbers.Update. + + + + PhoneCallHandler wire values accepted by phone\_numbers.Update. + + + + PhoneCallHandler wire values accepted by phone\_numbers.Update. + + + + PhoneCallHandler wire values accepted by phone\_numbers.Update. + + + + PhoneCallHandler wire values accepted by phone\_numbers.Update. + + + + PhoneCallHandler wire values accepted by phone\_numbers.Update. + + + + PhoneCallHandler wire values accepted by phone\_numbers.Update. + + + + PhoneCallHandler wire values accepted by phone\_numbers.Update. + + + + PhoneCallHandler wire values accepted by phone\_numbers.Update. + + + + PhoneCallHandler wire values accepted by phone\_numbers.Update. + + +## Classes + + + + AddressesNamespace provides address management (no update endpoint). + + + + AutoMaterializedWebhookResource is a Fabric webhook resource that is normally auto-created by the phone\_numbers.Set\*Webhook helpers. Exposed for backwards compatibility: list/get/update/delete work as usual, but Create now emits a deprecation warning because creating a webhook resource directly produces an orphan that isn't bound to any phone number. + + + + CallFlowOptions holds optional fields for SetCallFlow. + + + + CallFlowsResource extends CrudResource with version management and a singular sub-resource path convention. + + + + CallingNamespace provides REST-based call control. All commands are dispatched as POST /api/calling/calls with a "command" field. + + + + ChatNamespace provides Chat token generation. + + + + CompatAccounts provides compat account/subproject management. + + + + CompatApplications provides compat application management. + + + + CompatCalls provides compat call management with recording and stream sub-resources. + + + + CompatConferences provides compat conference management with participants, recordings, and streams. + + + + CompatFaxes provides compat fax management with media sub-resources. + + + + CompatLamlBins provides compat cXML/LaML script management. + + + + CompatMessages provides compat message management with media sub-resources. + + + + CompatNamespace provides the Twilio-compatible LAML API with AccountSid scoping. + + + + CompatPhoneNumbers provides compat phone number management. + + + + CompatQueues provides compat queue management with members. + + + + CompatRecordings provides compat recording management. + + + + CompatTokens provides compat API token management. + + + + CompatTranscriptions provides compat transcription management. + + + + ConferenceLogs provides conference log queries. + + + + ConferenceRoomsResource uses singular "conference\_room" for sub-resource paths. + + + + CrudResource provides standard List, Create, Get, Update, Delete operations against a REST collection endpoint within a namespace. + + + + CrudWithAddresses extends CrudResource with the nested addresses endpoint. Matches Python's CrudWithAddresses at \_base.py:109-113. Only resources that explicitly support the addresses sub-resource should embed this type; plain CrudResource does not expose ListAddresses. + + + + CxmlApplicationsResource exposes the fabric cXML applications sub-resource. Create is explicitly disallowed — cXML applications cannot be created via this API. This mirrors Python's CxmlApplicationsResource.create raising NotImplementedError (fabric.py:90). + + + + CxmlWebhookOptions holds optional fields for SetCxmlWebhook. + + + + DatasphereDocuments provides document management with search and chunk operations for the Datasphere API. + + + + DatasphereNamespace groups Datasphere API resources. + + + + FabricAddresses provides read-only access to fabric addresses. + + + + FabricNamespace groups all Fabric API resource types. + + + + FabricTokens provides subscriber, guest, invite, and embed token creation. + + + + FaxLogs provides fax log queries. + + + + GenericResources provides operations across all fabric resource types. + + + + ImportedNumbersNamespace provides imported phone number management. + + + + LogsNamespace groups all log query resources. + + + + LookupNamespace provides phone number lookup (carrier, CNAM). + + + + MessageLogs provides message log queries. + + + + MFANamespace provides multi-factor authentication via SMS or phone call. + + + + NumberGroupsNamespace provides number group management with membership operations. + + + + PhoneNumbersNamespace provides phone number management with search and typed helpers for binding an inbound call to a handler (SWML webhook, cXML webhook, AI agent, call flow, RELAY application/topic). + + + + ProjectNamespace groups project management resources. + + + + ProjectTokens provides project API token management. + + + + PubSubNamespace provides PubSub token generation. + + + + QueuesNamespace provides queue management with member operations. + + + + RecordingsNamespace provides recording management (read-only + delete). + + + + RegistryBrands provides 10DLC brand management. + + + + RegistryCampaigns provides 10DLC campaign management. + + + + RegistryNamespace groups all 10DLC Campaign Registry resources. + + + + RegistryNumbers provides 10DLC number assignment management. + + + + RegistryOrders provides 10DLC assignment order management. + + + + RelayTopicOptions holds optional fields for SetRelayTopic. + + + + Resource is a helper for building sub-paths from a base path. + + + + ShortCodesNamespace provides short code management (read + update only). + + + + SipProfileNamespace provides project SIP profile management (singleton resource). + + + + SubscribersResource extends CrudResource with SIP endpoint management. + + + + VerifiedCallersNamespace provides verified caller ID management with verification flow. + + + + VideoConferences provides video conference management with tokens and streams. + + + + VideoConferenceTokens provides video conference token management. + + + + VideoNamespace groups all Video API resources. + + + + VideoRoomRecordings provides video room recording management. + + + + VideoRooms provides video room management with stream sub-resources. + + + + VideoRoomSessions provides video room session management. + + + + VideoRoomTokens provides video room token generation. + + + + VideoStreams provides video stream management. + + + + VoiceLogs provides voice log queries. + + + +## Functions + +### AllPhoneCallHandlers + +AllPhoneCallHandlers returns every PhoneCallHandler value. Useful for enum-contract tests and for callers that need to validate or enumerate the set. + +#### Signature + +```go +func AllPhoneCallHandlers() []PhoneCallHandler +``` + +#### Returns + +`[]PhoneCallHandler` + +#### Source + +[`pkg/rest/namespaces/call_handler.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/call_handler.go) + +Line 58. + +*** + +### NewAddressesNamespace + +NewAddressesNamespace creates a new AddressesNamespace. + +#### Signature + +```go +func NewAddressesNamespace(client HTTPClient) *AddressesNamespace +``` + +#### Parameters + + + +#### Returns + +`*AddressesNamespace` + +#### Source + +[`pkg/rest/namespaces/addresses.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/addresses.go) + +Line 16. + +*** + +### NewCallingNamespace + +NewCallingNamespace creates a new CallingNamespace. + +#### Signature + +```go +func NewCallingNamespace(client HTTPClient) *CallingNamespace +``` + +#### Parameters + + + +#### Returns + +`*CallingNamespace` + +#### Source + +[`pkg/rest/namespaces/calling.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/calling.go) + +Line 17. + +*** + +### NewChatNamespace + +NewChatNamespace creates a new ChatNamespace. + +#### Signature + +```go +func NewChatNamespace(client HTTPClient) *ChatNamespace +``` + +#### Parameters + + + +#### Returns + +`*ChatNamespace` + +#### Source + +[`pkg/rest/namespaces/chat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/chat.go) + +Line 16. + +*** + +### NewCompatNamespace + +NewCompatNamespace creates a new CompatNamespace with all sub-resources scoped to the given account SID. + +#### Signature + +```go +func NewCompatNamespace(client HTTPClient, accountSID string) *CompatNamespace +``` + +#### Parameters + + + + + +#### Returns + +`*CompatNamespace` + +#### Source + +[`pkg/rest/namespaces/compat.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/compat.go) + +Line 395. + +*** + +### NewCrudResource + +NewCrudResource creates a CrudResource with PATCH as the update method. + +#### Signature + +```go +func NewCrudResource(client HTTPClient, path string) *CrudResource +``` + +#### Parameters + + + + + +#### Returns + +`*CrudResource` + +#### Source + +[`pkg/rest/namespaces/common.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/common.go) + +Line 47. + +*** + +### NewCrudResourcePUT + +NewCrudResourcePUT creates a CrudResource that uses PUT for updates. + +#### Signature + +```go +func NewCrudResourcePUT(client HTTPClient, path string) *CrudResource +``` + +#### Parameters + + + + + +#### Returns + +`*CrudResource` + +#### Source + +[`pkg/rest/namespaces/common.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/common.go) + +Line 55. + +*** + +### NewCrudWithAddresses + +NewCrudWithAddresses constructs a CrudWithAddresses backed by a PATCH-default CrudResource. Use NewCrudWithAddressesPUT for resources that update via PUT. + +#### Signature + +```go +func NewCrudWithAddresses(client HTTPClient, path string) *CrudWithAddresses +``` + +#### Parameters + + + + + +#### Returns + +`*CrudWithAddresses` + +#### Source + +[`pkg/rest/namespaces/common.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/common.go) + +Line 102. + +*** + +### NewCrudWithAddressesPUT + +NewCrudWithAddressesPUT constructs a CrudWithAddresses backed by a PUT-update CrudResource. + +#### Signature + +```go +func NewCrudWithAddressesPUT(client HTTPClient, path string) *CrudWithAddresses +``` + +#### Parameters + + + + + +#### Returns + +`*CrudWithAddresses` + +#### Source + +[`pkg/rest/namespaces/common.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/common.go) + +Line 108. + +*** + +### NewDatasphereNamespace + +NewDatasphereNamespace creates a new DatasphereNamespace. + +#### Signature + +```go +func NewDatasphereNamespace(client HTTPClient) *DatasphereNamespace +``` + +#### Parameters + + + +#### Returns + +`*DatasphereNamespace` + +#### Source + +[`pkg/rest/namespaces/datasphere.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/datasphere.go) + +Line 42. + +*** + +### NewFabricNamespace + +NewFabricNamespace creates a new FabricNamespace with all sub-resources initialized. + +#### Signature + +```go +func NewFabricNamespace(client HTTPClient) *FabricNamespace +``` + +#### Parameters + + + +#### Returns + +`*FabricNamespace` + +#### Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 362. + +*** + +### NewImportedNumbersNamespace + +NewImportedNumbersNamespace creates a new ImportedNumbersNamespace. + +#### Signature + +```go +func NewImportedNumbersNamespace(client HTTPClient) *ImportedNumbersNamespace +``` + +#### Parameters + + + +#### Returns + +`*ImportedNumbersNamespace` + +#### Source + +[`pkg/rest/namespaces/imported_numbers.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/imported_numbers.go) + +Line 16. + +*** + +### NewLogsNamespace + +NewLogsNamespace creates a new LogsNamespace with all sub-resources initialized. + +#### Signature + +```go +func NewLogsNamespace(client HTTPClient) *LogsNamespace +``` + +#### Parameters + + + +#### Returns + +`*LogsNamespace` + +#### Source + +[`pkg/rest/namespaces/logs.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/logs.go) + +Line 89. + +*** + +### NewLookupNamespace + +NewLookupNamespace creates a new LookupNamespace. + +#### Signature + +```go +func NewLookupNamespace(client HTTPClient) *LookupNamespace +``` + +#### Parameters + + + +#### Returns + +`*LookupNamespace` + +#### Source + +[`pkg/rest/namespaces/lookup.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/lookup.go) + +Line 16. + +*** + +### NewMFANamespace + +NewMFANamespace creates a new MFANamespace. + +#### Signature + +```go +func NewMFANamespace(client HTTPClient) *MFANamespace +``` + +#### Parameters + + + +#### Returns + +`*MFANamespace` + +#### Source + +[`pkg/rest/namespaces/mfa.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/mfa.go) + +Line 16. + +*** + +### NewNumberGroupsNamespace + +NewNumberGroupsNamespace creates a new NumberGroupsNamespace. + +#### Signature + +```go +func NewNumberGroupsNamespace(client HTTPClient) *NumberGroupsNamespace +``` + +#### Parameters + + + +#### Returns + +`*NumberGroupsNamespace` + +#### Source + +[`pkg/rest/namespaces/number_groups.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/number_groups.go) + +Line 16. + +*** + +### NewPhoneNumbersNamespace + +NewPhoneNumbersNamespace creates a new PhoneNumbersNamespace. + +#### Signature + +```go +func NewPhoneNumbersNamespace(client HTTPClient) *PhoneNumbersNamespace +``` + +#### Parameters + + + +#### Returns + +`*PhoneNumbersNamespace` + +#### Source + +[`pkg/rest/namespaces/phone_numbers.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/phone_numbers.go) + +Line 26. + +*** + +### NewProjectNamespace + +NewProjectNamespace creates a new ProjectNamespace. + +#### Signature + +```go +func NewProjectNamespace(client HTTPClient) *ProjectNamespace +``` + +#### Parameters + + + +#### Returns + +`*ProjectNamespace` + +#### Source + +[`pkg/rest/namespaces/project.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/project.go) + +Line 36. + +*** + +### NewPubSubNamespace + +NewPubSubNamespace creates a new PubSubNamespace. + +#### Signature + +```go +func NewPubSubNamespace(client HTTPClient) *PubSubNamespace +``` + +#### Parameters + + + +#### Returns + +`*PubSubNamespace` + +#### Source + +[`pkg/rest/namespaces/pubsub.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/pubsub.go) + +Line 16. + +*** + +### NewQueuesNamespace + +NewQueuesNamespace creates a new QueuesNamespace. + +#### Signature + +```go +func NewQueuesNamespace(client HTTPClient) *QueuesNamespace +``` + +#### Parameters + + + +#### Returns + +`*QueuesNamespace` + +#### Source + +[`pkg/rest/namespaces/queues.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/queues.go) + +Line 16. + +*** + +### NewRecordingsNamespace + +NewRecordingsNamespace creates a new RecordingsNamespace. + +#### Signature + +```go +func NewRecordingsNamespace(client HTTPClient) *RecordingsNamespace +``` + +#### Parameters + + + +#### Returns + +`*RecordingsNamespace` + +#### Source + +[`pkg/rest/namespaces/recordings.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/recordings.go) + +Line 18. + +*** + +### NewRegistryNamespace + +NewRegistryNamespace creates a new RegistryNamespace with all sub-resources. + +#### Signature + +```go +func NewRegistryNamespace(client HTTPClient) *RegistryNamespace +``` + +#### Parameters + + + +#### Returns + +`*RegistryNamespace` + +#### Source + +[`pkg/rest/namespaces/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/registry.go) + +Line 109. + +*** + +### NewShortCodesNamespace + +NewShortCodesNamespace creates a new ShortCodesNamespace. + +#### Signature + +```go +func NewShortCodesNamespace(client HTTPClient) *ShortCodesNamespace +``` + +#### Parameters + + + +#### Returns + +`*ShortCodesNamespace` + +#### Source + +[`pkg/rest/namespaces/short_codes.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/short_codes.go) + +Line 18. + +*** + +### NewSipProfileNamespace + +NewSipProfileNamespace creates a new SipProfileNamespace. + +#### Signature + +```go +func NewSipProfileNamespace(client HTTPClient) *SipProfileNamespace +``` + +#### Parameters + + + +#### Returns + +`*SipProfileNamespace` + +#### Source + +[`pkg/rest/namespaces/sip_profile.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/sip_profile.go) + +Line 16. + +*** + +### NewVerifiedCallersNamespace + +NewVerifiedCallersNamespace creates a new VerifiedCallersNamespace. + +#### Signature + +```go +func NewVerifiedCallersNamespace(client HTTPClient) *VerifiedCallersNamespace +``` + +#### Parameters + + + +#### Returns + +`*VerifiedCallersNamespace` + +#### Source + +[`pkg/rest/namespaces/verified_callers.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/verified_callers.go) + +Line 17. + +*** + +### NewVideoNamespace + +NewVideoNamespace creates a new VideoNamespace with all sub-resources initialized. + +#### Signature + +```go +func NewVideoNamespace(client HTTPClient) *VideoNamespace +``` + +#### Parameters + + + +#### Returns + +`*VideoNamespace` + +#### Source + +[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) + +Line 175. + +*** + +### ResetDeprecationWarnOnce + +ResetDeprecationWarnOnce clears the "once" tracking set so deprecation warnings fire again. Test-only helper. + +#### Signature + +```go +func ResetDeprecationWarnOnce() +``` + +#### Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 67. + +*** + +### SetDeprecationLogger + +SetDeprecationLogger replaces the package-level deprecation logger. The previous logger is returned so tests can restore it. Passing nil is a no-op. + +#### Signature + +```go +func SetDeprecationLogger(l *logging.Logger) *logging.Logger +``` + +#### Parameters + + + +#### Returns + +`*logging.Logger` + +#### Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 54. + +## Type Aliases + +### AddressesResource + +AddressesResource is an alias for AddressesNamespace, matching the Python class name for cross-SDK parity. Prefer AddressesNamespace in new Go code. + +#### Signature + +```go +type AddressesResource alias +``` + +#### Source + +[`pkg/rest/namespaces/addresses.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/addresses.go) + +Line 44. + +*** + +### CxmlWebhooksResource + +CxmlWebhooksResource is the Python class name for the auto-materialized CXML webhook resource. Go aliases AutoMaterializedWebhookResource here. + +#### Signature + +```go +type CxmlWebhooksResource alias +``` + +#### Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 328. + +*** + +### FabricResource + +FabricResource is the Python class name for a CrudResource that exposes the addresses sub-resource. Go aliases CrudWithAddresses here for the same reason as FabricResourcePUT. + +#### Signature + +```go +type FabricResource alias +``` + +#### Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 320. + +*** + +### FabricResourcePUT + +FabricResourcePUT is the Python class name for a CrudResource that uses PUT for updates. Go aliases CrudResource here so the cross-language audit sees the same type name on both sides without requiring a distinct struct. + +#### Signature + +```go +type FabricResourcePUT alias +``` + +#### Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 315. + +*** + +### LookupResource + +LookupResource is an alias for LookupNamespace, matching the Python class name for cross-SDK parity. Prefer LookupNamespace in new Go code. + +#### Signature + +```go +type LookupResource alias +``` + +#### Source + +[`pkg/rest/namespaces/lookup.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/lookup.go) + +Line 31. + +*** + +### NumberGroupsResource + +NumberGroupsResource is an alias for NumberGroupsNamespace, matching the Python class name for cross-SDK parity. + +#### Signature + +```go +type NumberGroupsResource alias +``` + +#### Source + +[`pkg/rest/namespaces/number_groups.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/number_groups.go) + +Line 44. + +*** + +### PhoneNumbersResource + +PhoneNumbersResource is an alias for PhoneNumbersNamespace, matching the Python class name for cross-SDK parity. Prefer PhoneNumbersNamespace in new Go code. + +#### Signature + +```go +type PhoneNumbersResource alias +``` + +#### Source + +[`pkg/rest/namespaces/phone_numbers.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/phone_numbers.go) + +Line 201. + +*** + +### PubSubResource + +PubSubResource is an alias for PubSubNamespace, matching the Python class name for cross-SDK parity. Prefer PubSubNamespace in new Go code. + +#### Signature + +```go +type PubSubResource alias +``` + +#### Source + +[`pkg/rest/namespaces/pubsub.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/pubsub.go) + +Line 29. + +*** + +### QueuesResource + +QueuesResource is an alias for QueuesNamespace, matching the Python class name for cross-SDK parity. Prefer QueuesNamespace in new Go code. + +#### Signature + +```go +type QueuesResource alias +``` + +#### Source + +[`pkg/rest/namespaces/queues.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/queues.go) + +Line 39. + +*** + +### RecordingsResource + +RecordingsResource is an alias for RecordingsNamespace, matching the Python class name for cross-SDK parity. Prefer RecordingsNamespace in new Go code. + +#### Signature + +```go +type RecordingsResource alias +``` + +#### Source + +[`pkg/rest/namespaces/recordings.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/recordings.go) + +Line 54. + +*** + +### ShortCodesResource + +ShortCodesResource is an alias for ShortCodesNamespace, matching the Python class name for cross-SDK parity. Prefer ShortCodesNamespace in new Go code. + +#### Signature + +```go +type ShortCodesResource alias +``` + +#### Source + +[`pkg/rest/namespaces/short_codes.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/short_codes.go) + +Line 45. + +*** + +### SipProfileResource + +SipProfileResource is an alias for SipProfileNamespace, matching the Python class name for cross-SDK parity. Prefer SipProfileNamespace in new Go code. + +#### Signature + +```go +type SipProfileResource alias +``` + +#### Source + +[`pkg/rest/namespaces/sip_profile.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/sip_profile.go) + +Line 34. + +*** + +### SwmlWebhooksResource + +SwmlWebhooksResource is the Python class name for the auto-materialized SWML webhook resource. Go aliases AutoMaterializedWebhookResource here. + +#### Signature + +```go +type SwmlWebhooksResource alias +``` + +#### Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 324. + +## Interfaces + +### HTTPClient + +HTTPClient is the interface that namespace implementations use to make HTTP requests. It is satisfied by the httpAdapter in the parent rest package, which prevents an import cycle. + +#### Signature + +```go +type HTTPClient interface { Get; Post; Put; Patch; Delete } +``` + +#### Methods + +##### Delete + +###### Signature + +```go +Delete(path string) (map[string]any, error) +``` + +###### Source + +[`pkg/rest/namespaces/common.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/common.go) + +Line 22. + +*** + +##### Get + +###### Signature + +```go +Get(path string, params map[string]string) (map[string]any, error) +``` + +###### Source + +[`pkg/rest/namespaces/common.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/common.go) + +Line 18. + +*** + +##### Patch + +###### Signature + +```go +Patch(path string, body map[string]any) (map[string]any, error) +``` + +###### Source + +[`pkg/rest/namespaces/common.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/common.go) + +Line 21. + +*** + +##### Post + +###### Signature + +```go +Post(path string, body map[string]any, params map[string]string) (map[string]any, error) +``` + +###### Source + +[`pkg/rest/namespaces/common.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/common.go) + +Line 19. + +*** + +##### Put + +###### Signature + +```go +Put(path string, body map[string]any) (map[string]any, error) +``` + +###### Source + +[`pkg/rest/namespaces/common.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/common.go) + +Line 20. + +#### Source + +[`pkg/rest/namespaces/common.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/common.go) + +Line 17. + +## Enums + +### PhoneCallHandler + +PhoneCallHandler is the value of the “call\_handler“ field accepted by phone\_numbers.Update. + +Named PhoneCallHandler (not CallHandler) to avoid colliding with the RELAY client's inbound-call-handler callback type already present in the SDK (pkg/relay OnCallHandler). + +Setting a phone number's call\_handler + the handler-specific companion field routes inbound calls and, for most values, auto-materializes the matching Fabric resource on the server. See the high-level helpers on PhoneNumbersNamespace (SetSwmlWebhook, SetCxmlWebhook, SetCxmlApplication, SetAiAgent, SetCallFlow, SetRelayApplication, SetRelayTopic). + +``` +Enum member Companion field (required) Auto-creates resource +RelayScript call_relay_script_url swml_webhook +LamlWebhooks call_request_url cxml_webhook +LamlApplication call_laml_application_id cxml_application +AiAgent call_ai_agent_id ai_agent +CallFlow call_flow_id call_flow +RelayApplication call_relay_application relay_application +RelayTopic call_relay_topic (routes via RELAY) +RelayContext call_relay_context (legacy, prefer topic) +RelayConnector (connector config) (internal) +VideoRoom call_video_room_id (routes to Video API) +Dialogflow call_dialogflow_agent_id (none) +``` + +Note: LamlWebhooks (wire value "laml\_webhooks") produces a cXML handler, not a generic webhook. For SWML, use RelayScript. + +#### Signature + +```go +type PhoneCallHandler alias +``` + +#### Examples + + + + ```go + Enum member Companion field (required) Auto-creates resource + RelayScript call_relay_script_url swml_webhook + LamlWebhooks call_request_url cxml_webhook + LamlApplication call_laml_application_id cxml_application + AiAgent call_ai_agent_id ai_agent + CallFlow call_flow_id call_flow + RelayApplication call_relay_application relay_application + RelayTopic call_relay_topic (routes via RELAY) + RelayContext call_relay_context (legacy, prefer topic) + RelayConnector (connector config) (internal) + VideoRoom call_video_room_id (routes to Video API) + Dialogflow call_dialogflow_agent_id (none) + ``` + + + + ```go + Enum member Companion field (required) Auto-creates resource + RelayScript call_relay_script_url swml_webhook + LamlWebhooks call_request_url cxml_webhook + LamlApplication call_laml_application_id cxml_application + AiAgent call_ai_agent_id ai_agent + CallFlow call_flow_id call_flow + RelayApplication call_relay_application relay_application + RelayTopic call_relay_topic (routes via RELAY) + RelayContext call_relay_context (legacy, prefer topic) + RelayConnector (connector config) (internal) + VideoRoom call_video_room_id (routes to Video API) + Dialogflow call_dialogflow_agent_id (none) + ``` + + + +#### Source + +[`pkg/rest/namespaces/call_handler.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/call_handler.go) + +Line 38. + +## Source + +[`pkg/rest/namespaces/addresses.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/addresses.go) diff --git a/fern/products/sdk-reference/go/rest/namespaces/namespaces/logs-namespace/index.mdx b/fern/products/sdk-reference/go/rest/namespaces/namespaces/logs-namespace/index.mdx new file mode 100644 index 0000000000..5c70d82ca9 --- /dev/null +++ b/fern/products/sdk-reference/go/rest/namespaces/namespaces/logs-namespace/index.mdx @@ -0,0 +1,39 @@ +--- +slug: "/reference/go/rest/namespaces/namespaces/logs-namespace" +title: "LogsNamespace" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.LogsNamespace" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/logs.go" +--- +# `LogsNamespace` + +LogsNamespace groups all log query resources. + +## Signature + +```go +type LogsNamespace struct +``` + +## Properties + + + + + + + + + +## Source + +[`pkg/rest/namespaces/logs.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/logs.go) + +Line 81. diff --git a/fern/products/sdk-reference/go/rest/namespaces/namespaces/lookup-namespace/index.mdx b/fern/products/sdk-reference/go/rest/namespaces/namespaces/lookup-namespace/index.mdx new file mode 100644 index 0000000000..d62cfbc766 --- /dev/null +++ b/fern/products/sdk-reference/go/rest/namespaces/namespaces/lookup-namespace/index.mdx @@ -0,0 +1,61 @@ +--- +slug: "/reference/go/rest/namespaces/namespaces/lookup-namespace" +title: "LookupNamespace" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.LookupNamespace" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/lookup.go" +--- +# `LookupNamespace` + +LookupNamespace provides phone number lookup (carrier, CNAM). + +## Signature + +```go +type LookupNamespace struct +``` + +## Properties + + + +## Methods + +### PhoneNumber + +PhoneNumber looks up information about a phone number. The e164 parameter should be the number in E.164 format. Optional params can include "include" for additional data (e.g., "carrier"). + +#### Signature + +```go +func (*LookupNamespace) PhoneNumber(e164 string, params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/lookup.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/lookup.go) + +Line 25. + +## Source + +[`pkg/rest/namespaces/lookup.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/lookup.go) + +Line 11. diff --git a/fern/products/sdk-reference/go/rest/namespaces/namespaces/message-logs/index.mdx b/fern/products/sdk-reference/go/rest/namespaces/namespaces/message-logs/index.mdx new file mode 100644 index 0000000000..1c7b2c314c --- /dev/null +++ b/fern/products/sdk-reference/go/rest/namespaces/namespaces/message-logs/index.mdx @@ -0,0 +1,85 @@ +--- +slug: "/reference/go/rest/namespaces/namespaces/message-logs" +title: "MessageLogs" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.MessageLogs" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/logs.go" +--- +# `MessageLogs` + +MessageLogs provides message log queries. + +## Signature + +```go +type MessageLogs struct +``` + +## Properties + + + +## Methods + +### Get + +Get retrieves a specific message log entry. + +#### Signature + +```go +func (*MessageLogs) Get(logID string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/logs.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/logs.go) + +Line 23. + +*** + +### List + +List lists message logs. + +#### Signature + +```go +func (*MessageLogs) List(params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/logs.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/logs.go) + +Line 18. + +## Source + +[`pkg/rest/namespaces/logs.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/logs.go) + +Line 13. diff --git a/fern/products/sdk-reference/go/rest/namespaces/namespaces/mfa-namespace/index.mdx b/fern/products/sdk-reference/go/rest/namespaces/namespaces/mfa-namespace/index.mdx new file mode 100644 index 0000000000..7c42ba7878 --- /dev/null +++ b/fern/products/sdk-reference/go/rest/namespaces/namespaces/mfa-namespace/index.mdx @@ -0,0 +1,113 @@ +--- +slug: "/reference/go/rest/namespaces/namespaces/mfa-namespace" +title: "MFANamespace" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.MFANamespace" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/mfa.go" +--- +# `MFANamespace` + +MFANamespace provides multi-factor authentication via SMS or phone call. + +## Signature + +```go +type MFANamespace struct +``` + +## Properties + + + +## Methods + +### Call + +Call initiates MFA verification via phone call. + +#### Signature + +```go +func (*MFANamespace) Call(data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/mfa.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/mfa.go) + +Line 28. + +*** + +### SMS + +SMS initiates MFA verification via SMS. + +#### Signature + +```go +func (*MFANamespace) SMS(data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/mfa.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/mfa.go) + +Line 23. + +*** + +### Verify + +Verify verifies an MFA token for a given request ID. + +#### Signature + +```go +func (*MFANamespace) Verify(requestID string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/mfa.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/mfa.go) + +Line 33. + +## Source + +[`pkg/rest/namespaces/mfa.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/mfa.go) + +Line 11. diff --git a/fern/products/sdk-reference/go/rest/namespaces/namespaces/number-groups-namespace/index.mdx b/fern/products/sdk-reference/go/rest/namespaces/namespaces/number-groups-namespace/index.mdx new file mode 100644 index 0000000000..3eacb60396 --- /dev/null +++ b/fern/products/sdk-reference/go/rest/namespaces/namespaces/number-groups-namespace/index.mdx @@ -0,0 +1,141 @@ +--- +slug: "/reference/go/rest/namespaces/namespaces/number-groups-namespace" +title: "NumberGroupsNamespace" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.NumberGroupsNamespace" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/number_groups.go" +--- +# `NumberGroupsNamespace` + +NumberGroupsNamespace provides number group management with membership operations. + +## Signature + +```go +type NumberGroupsNamespace struct +``` + +## Properties + + + +## Methods + +### AddMembership + +AddMembership adds a number to a group. + +#### Signature + +```go +func (*NumberGroupsNamespace) AddMembership(groupID string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/number_groups.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/number_groups.go) + +Line 28. + +*** + +### DeleteMembership + +DeleteMembership removes a membership by ID. + +#### Signature + +```go +func (*NumberGroupsNamespace) DeleteMembership(membershipID string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/number_groups.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/number_groups.go) + +Line 38. + +*** + +### GetMembership + +GetMembership retrieves a specific membership by ID. + +#### Signature + +```go +func (*NumberGroupsNamespace) GetMembership(membershipID string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/number_groups.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/number_groups.go) + +Line 33. + +*** + +### ListMemberships + +ListMemberships lists number group memberships for a group. + +#### Signature + +```go +func (*NumberGroupsNamespace) ListMemberships(groupID string, params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/number_groups.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/number_groups.go) + +Line 23. + +## Source + +[`pkg/rest/namespaces/number_groups.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/number_groups.go) + +Line 11. diff --git a/fern/products/sdk-reference/go/rest/namespaces/namespaces/phone-numbers-namespace/index.mdx b/fern/products/sdk-reference/go/rest/namespaces/namespaces/phone-numbers-namespace/index.mdx new file mode 100644 index 0000000000..091655092d --- /dev/null +++ b/fern/products/sdk-reference/go/rest/namespaces/namespaces/phone-numbers-namespace/index.mdx @@ -0,0 +1,277 @@ +--- +slug: "/reference/go/rest/namespaces/namespaces/phone-numbers-namespace" +title: "PhoneNumbersNamespace" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.PhoneNumbersNamespace" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/phone_numbers.go" +--- +# `PhoneNumbersNamespace` + +PhoneNumbersNamespace provides phone number management with search and typed helpers for binding an inbound call to a handler (SWML webhook, cXML webhook, AI agent, call flow, RELAY application/topic). + +Binding model: set “call\_handler“ + the handler-specific companion field on the phone number; the server auto-materializes the matching Fabric resource. The helpers below (Set\*) are one-line wrappers around Update with the right call\_handler + field combination baked in. See PhoneCallHandler for the enum. + +## Signature + +```go +type PhoneNumbersNamespace struct +``` + +## Properties + + + +## Methods + +### Search + +Search searches for available phone numbers with optional filter parameters such as area\_code, contains, starts\_with, etc. + +params may contain values of any type (string, int, bool, etc.); they are converted to strings internally before the HTTP request is made, matching Python's \*\*params behaviour which accepts numeric and boolean query values. + +#### Signature + +```go +func (*PhoneNumbersNamespace) Search(params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/phone_numbers.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/phone_numbers.go) + +Line 38. + +*** + +### SetAiAgent + +SetAiAgent routes inbound calls to an AI Agent Fabric resource by ID. + +#### Signature + +```go +func (*PhoneNumbersNamespace) SetAiAgent(sid string, agentID string, extra ...map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/phone_numbers.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/phone_numbers.go) + +Line 115. + +*** + +### SetCallFlow + +SetCallFlow routes inbound calls to a Call Flow by ID. Pass nil opts for the minimal form; pass opts.Version to pin a specific version. + +#### Signature + +```go +func (*PhoneNumbersNamespace) SetCallFlow(sid string, flowID string, opts *CallFlowOptions) (map[string]any, error) +``` + +#### Parameters + + + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/phone_numbers.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/phone_numbers.go) + +Line 135. + +*** + +### SetCxmlApplication + +SetCxmlApplication routes inbound calls to an existing cXML application by ID. + +#### Signature + +```go +func (*PhoneNumbersNamespace) SetCxmlApplication(sid string, applicationID string, extra ...map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/phone_numbers.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/phone_numbers.go) + +Line 105. + +*** + +### SetCxmlWebhook + +SetCxmlWebhook routes inbound calls to a cXML (Twilio-compat / LAML) webhook. + +Despite the wire value "laml\_webhooks" being plural, this creates a single cxml\_webhook Fabric resource. Pass opts to set FallbackURL and StatusCallbackURL; pass nil for the minimal form. + +#### Signature + +```go +func (*PhoneNumbersNamespace) SetCxmlWebhook(sid string, url string, opts *CxmlWebhookOptions) (map[string]any, error) +``` + +#### Parameters + + + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/phone_numbers.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/phone_numbers.go) + +Line 85. + +*** + +### SetRelayApplication + +SetRelayApplication routes inbound calls to a named RELAY application. + +#### Signature + +```go +func (*PhoneNumbersNamespace) SetRelayApplication(sid string, name string, extra ...map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/phone_numbers.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/phone_numbers.go) + +Line 152. + +*** + +### SetRelayTopic + +SetRelayTopic routes inbound calls to a RELAY topic (client subscription). Pass nil opts for the minimal form. + +#### Signature + +```go +func (*PhoneNumbersNamespace) SetRelayTopic(sid string, topic string, opts *RelayTopicOptions) (map[string]any, error) +``` + +#### Parameters + + + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/phone_numbers.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/phone_numbers.go) + +Line 171. + +*** + +### SetSwmlWebhook + +SetSwmlWebhook routes inbound calls to an SWML webhook URL. + +Your backend returns an SWML document per call. The server auto-creates a swml\_webhook Fabric resource keyed off this URL. + +#### Signature + +```go +func (*PhoneNumbersNamespace) SetSwmlWebhook(sid string, url string, extra ...map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/phone_numbers.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/phone_numbers.go) + +Line 61. + +## Source + +[`pkg/rest/namespaces/phone_numbers.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/phone_numbers.go) + +Line 21. diff --git a/fern/products/sdk-reference/go/rest/namespaces/namespaces/project-namespace/index.mdx b/fern/products/sdk-reference/go/rest/namespaces/namespaces/project-namespace/index.mdx new file mode 100644 index 0000000000..83f1e9221e --- /dev/null +++ b/fern/products/sdk-reference/go/rest/namespaces/namespaces/project-namespace/index.mdx @@ -0,0 +1,33 @@ +--- +slug: "/reference/go/rest/namespaces/namespaces/project-namespace" +title: "ProjectNamespace" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.ProjectNamespace" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/project.go" +--- +# `ProjectNamespace` + +ProjectNamespace groups project management resources. + +## Signature + +```go +type ProjectNamespace struct +``` + +## Properties + + + +## Source + +[`pkg/rest/namespaces/project.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/project.go) + +Line 31. diff --git a/fern/products/sdk-reference/go/rest/namespaces/namespaces/project-tokens/index.mdx b/fern/products/sdk-reference/go/rest/namespaces/namespaces/project-tokens/index.mdx new file mode 100644 index 0000000000..4a67846f06 --- /dev/null +++ b/fern/products/sdk-reference/go/rest/namespaces/namespaces/project-tokens/index.mdx @@ -0,0 +1,113 @@ +--- +slug: "/reference/go/rest/namespaces/namespaces/project-tokens" +title: "ProjectTokens" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.ProjectTokens" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/project.go" +--- +# `ProjectTokens` + +ProjectTokens provides project API token management. + +## Signature + +```go +type ProjectTokens struct +``` + +## Properties + + + +## Methods + +### Create + +Create creates a new project API token. + +#### Signature + +```go +func (*ProjectTokens) Create(data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/project.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/project.go) + +Line 16. + +*** + +### Delete + +Delete removes a project API token. + +#### Signature + +```go +func (*ProjectTokens) Delete(tokenID string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/project.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/project.go) + +Line 26. + +*** + +### Update + +Update modifies a project API token. + +#### Signature + +```go +func (*ProjectTokens) Update(tokenID string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/project.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/project.go) + +Line 21. + +## Source + +[`pkg/rest/namespaces/project.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/project.go) + +Line 11. diff --git a/fern/products/sdk-reference/go/rest/namespaces/namespaces/pub-sub-namespace/index.mdx b/fern/products/sdk-reference/go/rest/namespaces/namespaces/pub-sub-namespace/index.mdx new file mode 100644 index 0000000000..3b9ffa769b --- /dev/null +++ b/fern/products/sdk-reference/go/rest/namespaces/namespaces/pub-sub-namespace/index.mdx @@ -0,0 +1,59 @@ +--- +slug: "/reference/go/rest/namespaces/namespaces/pub-sub-namespace" +title: "PubSubNamespace" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.PubSubNamespace" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/pubsub.go" +--- +# `PubSubNamespace` + +PubSubNamespace provides PubSub token generation. + +## Signature + +```go +type PubSubNamespace struct +``` + +## Properties + + + +## Methods + +### CreateToken + +CreateToken creates a PubSub token. + +#### Signature + +```go +func (*PubSubNamespace) CreateToken(data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/pubsub.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/pubsub.go) + +Line 23. + +## Source + +[`pkg/rest/namespaces/pubsub.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/pubsub.go) + +Line 11. diff --git a/fern/products/sdk-reference/go/rest/namespaces/namespaces/queues-namespace/index.mdx b/fern/products/sdk-reference/go/rest/namespaces/namespaces/queues-namespace/index.mdx new file mode 100644 index 0000000000..0be66dae97 --- /dev/null +++ b/fern/products/sdk-reference/go/rest/namespaces/namespaces/queues-namespace/index.mdx @@ -0,0 +1,115 @@ +--- +slug: "/reference/go/rest/namespaces/namespaces/queues-namespace" +title: "QueuesNamespace" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.QueuesNamespace" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/queues.go" +--- +# `QueuesNamespace` + +QueuesNamespace provides queue management with member operations. + +## Signature + +```go +type QueuesNamespace struct +``` + +## Properties + + + +## Methods + +### GetMember + +GetMember retrieves a specific member from a queue. + +#### Signature + +```go +func (*QueuesNamespace) GetMember(queueID string, memberID string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/queues.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/queues.go) + +Line 33. + +*** + +### GetNextMember + +GetNextMember retrieves the next member in the queue. + +#### Signature + +```go +func (*QueuesNamespace) GetNextMember(queueID string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/queues.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/queues.go) + +Line 28. + +*** + +### ListMembers + +ListMembers lists members of a queue. + +#### Signature + +```go +func (*QueuesNamespace) ListMembers(queueID string, params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/queues.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/queues.go) + +Line 23. + +## Source + +[`pkg/rest/namespaces/queues.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/queues.go) + +Line 11. diff --git a/fern/products/sdk-reference/go/rest/namespaces/namespaces/recordings-namespace/index.mdx b/fern/products/sdk-reference/go/rest/namespaces/namespaces/recordings-namespace/index.mdx new file mode 100644 index 0000000000..ff7b906a33 --- /dev/null +++ b/fern/products/sdk-reference/go/rest/namespaces/namespaces/recordings-namespace/index.mdx @@ -0,0 +1,111 @@ +--- +slug: "/reference/go/rest/namespaces/namespaces/recordings-namespace" +title: "RecordingsNamespace" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.RecordingsNamespace" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/recordings.go" +--- +# `RecordingsNamespace` + +RecordingsNamespace provides recording management (read-only + delete). + +## Signature + +```go +type RecordingsNamespace struct +``` + +## Properties + + + +## Methods + +### Delete + +Delete removes a recording by ID. + +#### Signature + +```go +func (*RecordingsNamespace) Delete(id string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/recordings.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/recordings.go) + +Line 48. + +*** + +### Get + +Get retrieves a recording by ID. + +#### Signature + +```go +func (*RecordingsNamespace) Get(id string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/recordings.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/recordings.go) + +Line 43. + +*** + +### List + +List lists all recordings. params may contain values of any type (matching Python's \*\*data); non-string values are stringified via fmt.Sprintf before being sent as query parameters. + +#### Signature + +```go +func (*RecordingsNamespace) List(params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/recordings.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/recordings.go) + +Line 27. + +## Source + +[`pkg/rest/namespaces/recordings.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/recordings.go) + +Line 13. diff --git a/fern/products/sdk-reference/go/rest/namespaces/namespaces/registry-brands/index.mdx b/fern/products/sdk-reference/go/rest/namespaces/namespaces/registry-brands/index.mdx new file mode 100644 index 0000000000..68df409b1b --- /dev/null +++ b/fern/products/sdk-reference/go/rest/namespaces/namespaces/registry-brands/index.mdx @@ -0,0 +1,167 @@ +--- +slug: "/reference/go/rest/namespaces/namespaces/registry-brands" +title: "RegistryBrands" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.RegistryBrands" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/registry.go" +--- +# `RegistryBrands` + +RegistryBrands provides 10DLC brand management. + +## Signature + +```go +type RegistryBrands struct +``` + +## Properties + + + +## Methods + +### Create + +Create creates a new brand. + +#### Signature + +```go +func (*RegistryBrands) Create(data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/registry.go) + +Line 23. + +*** + +### CreateCampaign + +CreateCampaign creates a campaign under a brand. + +#### Signature + +```go +func (*RegistryBrands) CreateCampaign(brandID string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/registry.go) + +Line 38. + +*** + +### Get + +Get retrieves a brand by ID. + +#### Signature + +```go +func (*RegistryBrands) Get(brandID string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/registry.go) + +Line 28. + +*** + +### List + +List lists all brands. + +#### Signature + +```go +func (*RegistryBrands) List(params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/registry.go) + +Line 18. + +*** + +### ListCampaigns + +ListCampaigns lists campaigns for a brand. + +#### Signature + +```go +func (*RegistryBrands) ListCampaigns(brandID string, params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/registry.go) + +Line 33. + +## Source + +[`pkg/rest/namespaces/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/registry.go) + +Line 13. diff --git a/fern/products/sdk-reference/go/rest/namespaces/namespaces/registry-campaigns/index.mdx b/fern/products/sdk-reference/go/rest/namespaces/namespaces/registry-campaigns/index.mdx new file mode 100644 index 0000000000..3ce2e9c4a0 --- /dev/null +++ b/fern/products/sdk-reference/go/rest/namespaces/namespaces/registry-campaigns/index.mdx @@ -0,0 +1,171 @@ +--- +slug: "/reference/go/rest/namespaces/namespaces/registry-campaigns" +title: "RegistryCampaigns" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.RegistryCampaigns" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/registry.go" +--- +# `RegistryCampaigns` + +RegistryCampaigns provides 10DLC campaign management. + +## Signature + +```go +type RegistryCampaigns struct +``` + +## Properties + + + +## Methods + +### CreateOrder + +CreateOrder creates a number assignment order for a campaign. + +#### Signature + +```go +func (*RegistryCampaigns) CreateOrder(campaignID string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/registry.go) + +Line 70. + +*** + +### Get + +Get retrieves a campaign by ID. + +#### Signature + +```go +func (*RegistryCampaigns) Get(campaignID string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/registry.go) + +Line 50. + +*** + +### ListNumbers + +ListNumbers lists numbers assigned to a campaign. + +#### Signature + +```go +func (*RegistryCampaigns) ListNumbers(campaignID string, params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/registry.go) + +Line 60. + +*** + +### ListOrders + +ListOrders lists orders for a campaign. + +#### Signature + +```go +func (*RegistryCampaigns) ListOrders(campaignID string, params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/registry.go) + +Line 65. + +*** + +### Update + +Update modifies a campaign by ID. + +#### Signature + +```go +func (*RegistryCampaigns) Update(campaignID string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/registry.go) + +Line 55. + +## Source + +[`pkg/rest/namespaces/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/registry.go) + +Line 45. diff --git a/fern/products/sdk-reference/go/rest/namespaces/namespaces/registry-namespace/index.mdx b/fern/products/sdk-reference/go/rest/namespaces/namespaces/registry-namespace/index.mdx new file mode 100644 index 0000000000..72642a6ff1 --- /dev/null +++ b/fern/products/sdk-reference/go/rest/namespaces/namespaces/registry-namespace/index.mdx @@ -0,0 +1,39 @@ +--- +slug: "/reference/go/rest/namespaces/namespaces/registry-namespace" +title: "RegistryNamespace" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.RegistryNamespace" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/registry.go" +--- +# `RegistryNamespace` + +RegistryNamespace groups all 10DLC Campaign Registry resources. + +## Signature + +```go +type RegistryNamespace struct +``` + +## Properties + + + + + + + + + +## Source + +[`pkg/rest/namespaces/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/registry.go) + +Line 101. diff --git a/fern/products/sdk-reference/go/rest/namespaces/namespaces/registry-numbers/index.mdx b/fern/products/sdk-reference/go/rest/namespaces/namespaces/registry-numbers/index.mdx new file mode 100644 index 0000000000..d9d2fbff68 --- /dev/null +++ b/fern/products/sdk-reference/go/rest/namespaces/namespaces/registry-numbers/index.mdx @@ -0,0 +1,59 @@ +--- +slug: "/reference/go/rest/namespaces/namespaces/registry-numbers" +title: "RegistryNumbers" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.RegistryNumbers" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/registry.go" +--- +# `RegistryNumbers` + +RegistryNumbers provides 10DLC number assignment management. + +## Signature + +```go +type RegistryNumbers struct +``` + +## Properties + + + +## Methods + +### Delete + +Delete removes a number assignment. + +#### Signature + +```go +func (*RegistryNumbers) Delete(numberID string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/registry.go) + +Line 94. + +## Source + +[`pkg/rest/namespaces/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/registry.go) + +Line 89. diff --git a/fern/products/sdk-reference/go/rest/namespaces/namespaces/registry-orders/index.mdx b/fern/products/sdk-reference/go/rest/namespaces/namespaces/registry-orders/index.mdx new file mode 100644 index 0000000000..0976ee9fa8 --- /dev/null +++ b/fern/products/sdk-reference/go/rest/namespaces/namespaces/registry-orders/index.mdx @@ -0,0 +1,59 @@ +--- +slug: "/reference/go/rest/namespaces/namespaces/registry-orders" +title: "RegistryOrders" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.RegistryOrders" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/registry.go" +--- +# `RegistryOrders` + +RegistryOrders provides 10DLC assignment order management. + +## Signature + +```go +type RegistryOrders struct +``` + +## Properties + + + +## Methods + +### Get + +Get retrieves an order by ID. + +#### Signature + +```go +func (*RegistryOrders) Get(orderID string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/registry.go) + +Line 82. + +## Source + +[`pkg/rest/namespaces/registry.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/registry.go) + +Line 77. diff --git a/fern/products/sdk-reference/go/rest/namespaces/namespaces/relay-topic-options/index.mdx b/fern/products/sdk-reference/go/rest/namespaces/namespaces/relay-topic-options/index.mdx new file mode 100644 index 0000000000..2d1d662b25 --- /dev/null +++ b/fern/products/sdk-reference/go/rest/namespaces/namespaces/relay-topic-options/index.mdx @@ -0,0 +1,39 @@ +--- +slug: "/reference/go/rest/namespaces/namespaces/relay-topic-options" +title: "RelayTopicOptions" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.RelayTopicOptions" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/phone_numbers.go" +--- +# `RelayTopicOptions` + +RelayTopicOptions holds optional fields for SetRelayTopic. + +## Signature + +```go +type RelayTopicOptions struct +``` + +## Properties + + + Extra passes through additional wire-level fields. + + + + StatusCallbackURL receives topic status updates. + + +## Source + +[`pkg/rest/namespaces/phone_numbers.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/phone_numbers.go) + +Line 162. diff --git a/fern/products/sdk-reference/go/rest/namespaces/namespaces/resource/index.mdx b/fern/products/sdk-reference/go/rest/namespaces/namespaces/resource/index.mdx new file mode 100644 index 0000000000..01eba736d7 --- /dev/null +++ b/fern/products/sdk-reference/go/rest/namespaces/namespaces/resource/index.mdx @@ -0,0 +1,61 @@ +--- +slug: "/reference/go/rest/namespaces/namespaces/resource" +title: "Resource" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.Resource" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/common.go" +--- +# `Resource` + +Resource is a helper for building sub-paths from a base path. + +## Signature + +```go +type Resource struct +``` + +## Properties + + + + + +## Methods + +### Path + +Path joins additional segments onto the base path. + +#### Signature + +```go +func (*Resource) Path(parts ...string) string +``` + +#### Parameters + + + +#### Returns + +`string` + +#### Source + +[`pkg/rest/namespaces/common.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/common.go) + +Line 32. + +## Source + +[`pkg/rest/namespaces/common.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/common.go) + +Line 26. diff --git a/fern/products/sdk-reference/go/rest/namespaces/namespaces/short-codes-namespace/index.mdx b/fern/products/sdk-reference/go/rest/namespaces/namespaces/short-codes-namespace/index.mdx new file mode 100644 index 0000000000..04d3829c4c --- /dev/null +++ b/fern/products/sdk-reference/go/rest/namespaces/namespaces/short-codes-namespace/index.mdx @@ -0,0 +1,113 @@ +--- +slug: "/reference/go/rest/namespaces/namespaces/short-codes-namespace" +title: "ShortCodesNamespace" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.ShortCodesNamespace" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/short_codes.go" +--- +# `ShortCodesNamespace` + +ShortCodesNamespace provides short code management (read + update only). + +## Signature + +```go +type ShortCodesNamespace struct +``` + +## Properties + + + +## Methods + +### Get + +Get retrieves a short code by ID. + +#### Signature + +```go +func (*ShortCodesNamespace) Get(id string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/short_codes.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/short_codes.go) + +Line 34. + +*** + +### List + +List lists all short codes. + +#### Signature + +```go +func (*ShortCodesNamespace) List(params map[string]any) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/short_codes.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/short_codes.go) + +Line 25. + +*** + +### Update + +Update modifies a short code by ID. + +#### Signature + +```go +func (*ShortCodesNamespace) Update(id string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/short_codes.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/short_codes.go) + +Line 39. + +## Source + +[`pkg/rest/namespaces/short_codes.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/short_codes.go) + +Line 13. diff --git a/fern/products/sdk-reference/go/rest/namespaces/namespaces/sip-profile-namespace/index.mdx b/fern/products/sdk-reference/go/rest/namespaces/namespaces/sip-profile-namespace/index.mdx new file mode 100644 index 0000000000..81abf3a8f4 --- /dev/null +++ b/fern/products/sdk-reference/go/rest/namespaces/namespaces/sip-profile-namespace/index.mdx @@ -0,0 +1,81 @@ +--- +slug: "/reference/go/rest/namespaces/namespaces/sip-profile-namespace" +title: "SipProfileNamespace" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.SipProfileNamespace" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/sip_profile.go" +--- +# `SipProfileNamespace` + +SipProfileNamespace provides project SIP profile management (singleton resource). + +## Signature + +```go +type SipProfileNamespace struct +``` + +## Properties + + + +## Methods + +### Get + +Get retrieves the project SIP profile. + +#### Signature + +```go +func (*SipProfileNamespace) Get() (map[string]any, error) +``` + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/sip_profile.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/sip_profile.go) + +Line 23. + +*** + +### Update + +Update modifies the project SIP profile. + +#### Signature + +```go +func (*SipProfileNamespace) Update(data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/sip_profile.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/sip_profile.go) + +Line 28. + +## Source + +[`pkg/rest/namespaces/sip_profile.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/sip_profile.go) + +Line 11. diff --git a/fern/products/sdk-reference/go/rest/namespaces/namespaces/subscribers-resource/index.mdx b/fern/products/sdk-reference/go/rest/namespaces/namespaces/subscribers-resource/index.mdx new file mode 100644 index 0000000000..aad25e7169 --- /dev/null +++ b/fern/products/sdk-reference/go/rest/namespaces/namespaces/subscribers-resource/index.mdx @@ -0,0 +1,175 @@ +--- +slug: "/reference/go/rest/namespaces/namespaces/subscribers-resource" +title: "SubscribersResource" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.SubscribersResource" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go" +--- +# `SubscribersResource` + +SubscribersResource extends CrudResource with SIP endpoint management. + +## Signature + +```go +type SubscribersResource struct +``` + +## Properties + + + +## Methods + +### CreateSIPEndpoint + +CreateSIPEndpoint creates a SIP endpoint for a subscriber. + +#### Signature + +```go +func (*SubscribersResource) CreateSIPEndpoint(subscriberID string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 125. + +*** + +### DeleteSIPEndpoint + +DeleteSIPEndpoint deletes a SIP endpoint from a subscriber. + +#### Signature + +```go +func (*SubscribersResource) DeleteSIPEndpoint(subscriberID string, endpointID string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 140. + +*** + +### GetSIPEndpoint + +GetSIPEndpoint retrieves a SIP endpoint for a subscriber. + +#### Signature + +```go +func (*SubscribersResource) GetSIPEndpoint(subscriberID string, endpointID string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 130. + +*** + +### ListSIPEndpoints + +ListSIPEndpoints lists SIP endpoints for a subscriber. + +#### Signature + +```go +func (*SubscribersResource) ListSIPEndpoints(subscriberID string, params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 120. + +*** + +### UpdateSIPEndpoint + +UpdateSIPEndpoint updates a SIP endpoint for a subscriber. + +#### Signature + +```go +func (*SubscribersResource) UpdateSIPEndpoint(subscriberID string, endpointID string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 135. + +## Source + +[`pkg/rest/namespaces/fabric.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/fabric.go) + +Line 115. diff --git a/fern/products/sdk-reference/go/rest/namespaces/namespaces/verified-callers-namespace/index.mdx b/fern/products/sdk-reference/go/rest/namespaces/namespaces/verified-callers-namespace/index.mdx new file mode 100644 index 0000000000..e2f3dac8aa --- /dev/null +++ b/fern/products/sdk-reference/go/rest/namespaces/namespaces/verified-callers-namespace/index.mdx @@ -0,0 +1,87 @@ +--- +slug: "/reference/go/rest/namespaces/namespaces/verified-callers-namespace" +title: "VerifiedCallersNamespace" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.VerifiedCallersNamespace" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/verified_callers.go" +--- +# `VerifiedCallersNamespace` + +VerifiedCallersNamespace provides verified caller ID management with verification flow. + +## Signature + +```go +type VerifiedCallersNamespace struct +``` + +## Properties + + + +## Methods + +### RedialVerification + +RedialVerification redials the verification call for a caller ID. + +#### Signature + +```go +func (*VerifiedCallersNamespace) RedialVerification(callerID string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/verified_callers.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/verified_callers.go) + +Line 24. + +*** + +### SubmitVerification + +SubmitVerification submits a verification code for a caller ID. + +#### Signature + +```go +func (*VerifiedCallersNamespace) SubmitVerification(callerID string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/verified_callers.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/verified_callers.go) + +Line 29. + +## Source + +[`pkg/rest/namespaces/verified_callers.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/verified_callers.go) + +Line 12. diff --git a/fern/products/sdk-reference/go/rest/namespaces/namespaces/video-conference-tokens/index.mdx b/fern/products/sdk-reference/go/rest/namespaces/namespaces/video-conference-tokens/index.mdx new file mode 100644 index 0000000000..2fa1328766 --- /dev/null +++ b/fern/products/sdk-reference/go/rest/namespaces/namespaces/video-conference-tokens/index.mdx @@ -0,0 +1,85 @@ +--- +slug: "/reference/go/rest/namespaces/namespaces/video-conference-tokens" +title: "VideoConferenceTokens" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.VideoConferenceTokens" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go" +--- +# `VideoConferenceTokens` + +VideoConferenceTokens provides video conference token management. + +## Signature + +```go +type VideoConferenceTokens struct +``` + +## Properties + + + +## Methods + +### Get + +Get retrieves a conference token. + +#### Signature + +```go +func (*VideoConferenceTokens) Get(tokenID string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) + +Line 129. + +*** + +### Reset + +Reset resets a conference token. + +#### Signature + +```go +func (*VideoConferenceTokens) Reset(tokenID string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) + +Line 134. + +## Source + +[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) + +Line 124. diff --git a/fern/products/sdk-reference/go/rest/namespaces/namespaces/video-conferences/index.mdx b/fern/products/sdk-reference/go/rest/namespaces/namespaces/video-conferences/index.mdx new file mode 100644 index 0000000000..ed25d6b920 --- /dev/null +++ b/fern/products/sdk-reference/go/rest/namespaces/namespaces/video-conferences/index.mdx @@ -0,0 +1,117 @@ +--- +slug: "/reference/go/rest/namespaces/namespaces/video-conferences" +title: "VideoConferences" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.VideoConferences" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go" +--- +# `VideoConferences` + +VideoConferences provides video conference management with tokens and streams. + +## Signature + +```go +type VideoConferences struct +``` + +## Properties + + + +## Methods + +### CreateStream + +CreateStream creates a stream for a conference. + +#### Signature + +```go +func (*VideoConferences) CreateStream(conferenceID string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) + +Line 117. + +*** + +### ListConferenceTokens + +ListConferenceTokens lists tokens for a conference. + +#### Signature + +```go +func (*VideoConferences) ListConferenceTokens(conferenceID string, params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) + +Line 107. + +*** + +### ListStreams + +ListStreams lists streams for a conference. + +#### Signature + +```go +func (*VideoConferences) ListStreams(conferenceID string, params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) + +Line 112. + +## Source + +[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) + +Line 102. diff --git a/fern/products/sdk-reference/go/rest/namespaces/namespaces/video-namespace/index.mdx b/fern/products/sdk-reference/go/rest/namespaces/namespaces/video-namespace/index.mdx new file mode 100644 index 0000000000..e954114eb8 --- /dev/null +++ b/fern/products/sdk-reference/go/rest/namespaces/namespaces/video-namespace/index.mdx @@ -0,0 +1,45 @@ +--- +slug: "/reference/go/rest/namespaces/namespaces/video-namespace" +title: "VideoNamespace" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.VideoNamespace" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go" +--- +# `VideoNamespace` + +VideoNamespace groups all Video API resources. + +## Signature + +```go +type VideoNamespace struct +``` + +## Properties + + + + + + + + + + + + + + + +## Source + +[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) + +Line 164. diff --git a/fern/products/sdk-reference/go/rest/namespaces/namespaces/video-room-recordings/index.mdx b/fern/products/sdk-reference/go/rest/namespaces/namespaces/video-room-recordings/index.mdx new file mode 100644 index 0000000000..a0e7cd92fb --- /dev/null +++ b/fern/products/sdk-reference/go/rest/namespaces/namespaces/video-room-recordings/index.mdx @@ -0,0 +1,139 @@ +--- +slug: "/reference/go/rest/namespaces/namespaces/video-room-recordings" +title: "VideoRoomRecordings" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.VideoRoomRecordings" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go" +--- +# `VideoRoomRecordings` + +VideoRoomRecordings provides video room recording management. + +## Signature + +```go +type VideoRoomRecordings struct +``` + +## Properties + + + +## Methods + +### Delete + +Delete removes a room recording. It returns the parsed response body (or an empty map for 204 No Content) and any error. + +#### Signature + +```go +func (*VideoRoomRecordings) Delete(recordingID string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) + +Line 90. + +*** + +### Get + +Get retrieves a specific room recording. + +#### Signature + +```go +func (*VideoRoomRecordings) Get(recordingID string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) + +Line 84. + +*** + +### List + +List lists all room recordings. + +#### Signature + +```go +func (*VideoRoomRecordings) List(params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) + +Line 79. + +*** + +### ListEvents + +ListEvents lists events for a room recording. + +#### Signature + +```go +func (*VideoRoomRecordings) ListEvents(recordingID string, params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) + +Line 95. + +## Source + +[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) + +Line 74. diff --git a/fern/products/sdk-reference/go/rest/namespaces/namespaces/video-room-sessions/index.mdx b/fern/products/sdk-reference/go/rest/namespaces/namespaces/video-room-sessions/index.mdx new file mode 100644 index 0000000000..4af83aff47 --- /dev/null +++ b/fern/products/sdk-reference/go/rest/namespaces/namespaces/video-room-sessions/index.mdx @@ -0,0 +1,169 @@ +--- +slug: "/reference/go/rest/namespaces/namespaces/video-room-sessions" +title: "VideoRoomSessions" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.VideoRoomSessions" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go" +--- +# `VideoRoomSessions` + +VideoRoomSessions provides video room session management. + +## Signature + +```go +type VideoRoomSessions struct +``` + +## Properties + + + +## Methods + +### Get + +Get retrieves a specific room session. + +#### Signature + +```go +func (*VideoRoomSessions) Get(sessionID string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) + +Line 52. + +*** + +### List + +List lists all room sessions. + +#### Signature + +```go +func (*VideoRoomSessions) List(params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) + +Line 47. + +*** + +### ListEvents + +ListEvents lists events for a room session. + +#### Signature + +```go +func (*VideoRoomSessions) ListEvents(sessionID string, params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) + +Line 57. + +*** + +### ListMembers + +ListMembers lists members in a room session. + +#### Signature + +```go +func (*VideoRoomSessions) ListMembers(sessionID string, params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) + +Line 62. + +*** + +### ListRecordings + +ListRecordings lists recordings for a room session. + +#### Signature + +```go +func (*VideoRoomSessions) ListRecordings(sessionID string, params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) + +Line 67. + +## Source + +[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) + +Line 42. diff --git a/fern/products/sdk-reference/go/rest/namespaces/namespaces/video-room-tokens/index.mdx b/fern/products/sdk-reference/go/rest/namespaces/namespaces/video-room-tokens/index.mdx new file mode 100644 index 0000000000..48ccab8cc5 --- /dev/null +++ b/fern/products/sdk-reference/go/rest/namespaces/namespaces/video-room-tokens/index.mdx @@ -0,0 +1,59 @@ +--- +slug: "/reference/go/rest/namespaces/namespaces/video-room-tokens" +title: "VideoRoomTokens" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.VideoRoomTokens" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go" +--- +# `VideoRoomTokens` + +VideoRoomTokens provides video room token generation. + +## Signature + +```go +type VideoRoomTokens struct +``` + +## Properties + + + +## Methods + +### Create + +Create creates a video room token. + +#### Signature + +```go +func (*VideoRoomTokens) Create(data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) + +Line 35. + +## Source + +[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) + +Line 30. diff --git a/fern/products/sdk-reference/go/rest/namespaces/namespaces/video-rooms/index.mdx b/fern/products/sdk-reference/go/rest/namespaces/namespaces/video-rooms/index.mdx new file mode 100644 index 0000000000..9368827547 --- /dev/null +++ b/fern/products/sdk-reference/go/rest/namespaces/namespaces/video-rooms/index.mdx @@ -0,0 +1,89 @@ +--- +slug: "/reference/go/rest/namespaces/namespaces/video-rooms" +title: "VideoRooms" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.VideoRooms" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go" +--- +# `VideoRooms` + +VideoRooms provides video room management with stream sub-resources. + +## Signature + +```go +type VideoRooms struct +``` + +## Properties + + + +## Methods + +### CreateStream + +CreateStream creates a stream for a video room. + +#### Signature + +```go +func (*VideoRooms) CreateStream(roomID string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) + +Line 23. + +*** + +### ListStreams + +ListStreams lists streams for a video room. + +#### Signature + +```go +func (*VideoRooms) ListStreams(roomID string, params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) + +Line 18. + +## Source + +[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) + +Line 13. diff --git a/fern/products/sdk-reference/go/rest/namespaces/namespaces/video-streams/index.mdx b/fern/products/sdk-reference/go/rest/namespaces/namespaces/video-streams/index.mdx new file mode 100644 index 0000000000..9b191338c5 --- /dev/null +++ b/fern/products/sdk-reference/go/rest/namespaces/namespaces/video-streams/index.mdx @@ -0,0 +1,113 @@ +--- +slug: "/reference/go/rest/namespaces/namespaces/video-streams" +title: "VideoStreams" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.VideoStreams" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go" +--- +# `VideoStreams` + +VideoStreams provides video stream management. + +## Signature + +```go +type VideoStreams struct +``` + +## Properties + + + +## Methods + +### Delete + +Delete removes a video stream. It returns the parsed response body (or an empty map for 204 No Content) and any error. + +#### Signature + +```go +func (*VideoStreams) Delete(streamID string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) + +Line 157. + +*** + +### Get + +Get retrieves a video stream. + +#### Signature + +```go +func (*VideoStreams) Get(streamID string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) + +Line 146. + +*** + +### Update + +Update modifies a video stream. + +#### Signature + +```go +func (*VideoStreams) Update(streamID string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) + +Line 151. + +## Source + +[`pkg/rest/namespaces/video.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/video.go) + +Line 141. diff --git a/fern/products/sdk-reference/go/rest/namespaces/namespaces/voice-logs/index.mdx b/fern/products/sdk-reference/go/rest/namespaces/namespaces/voice-logs/index.mdx new file mode 100644 index 0000000000..a7888535ea --- /dev/null +++ b/fern/products/sdk-reference/go/rest/namespaces/namespaces/voice-logs/index.mdx @@ -0,0 +1,113 @@ +--- +slug: "/reference/go/rest/namespaces/namespaces/voice-logs" +title: "VoiceLogs" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest/namespaces.VoiceLogs" + parent: "github.com/signalwire/signalwire-go/pkg/rest/namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/logs.go" +--- +# `VoiceLogs` + +VoiceLogs provides voice log queries. + +## Signature + +```go +type VoiceLogs struct +``` + +## Properties + + + +## Methods + +### Get + +Get retrieves a specific voice log entry. + +#### Signature + +```go +func (*VoiceLogs) Get(logID string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/logs.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/logs.go) + +Line 40. + +*** + +### List + +List lists voice logs. + +#### Signature + +```go +func (*VoiceLogs) List(params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/logs.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/logs.go) + +Line 35. + +*** + +### ListEvents + +ListEvents lists events for a voice log entry. + +#### Signature + +```go +func (*VoiceLogs) ListEvents(logID string, params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/namespaces/logs.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/logs.go) + +Line 45. + +## Source + +[`pkg/rest/namespaces/logs.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/namespaces/logs.go) + +Line 30. diff --git a/fern/products/sdk-reference/go/rest/rest/crud-resource/index.mdx b/fern/products/sdk-reference/go/rest/rest/crud-resource/index.mdx new file mode 100644 index 0000000000..8c4ad6e588 --- /dev/null +++ b/fern/products/sdk-reference/go/rest/rest/crud-resource/index.mdx @@ -0,0 +1,171 @@ +--- +slug: "/reference/go/rest/rest/crud-resource" +title: "CrudResource" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest.CrudResource" + parent: "rest.rest" + module: "rest.rest" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go" +--- +# `CrudResource` + +CrudResource provides standard List, Create, Get, Update, Delete operations against a REST collection endpoint. Update defaults to PATCH; set UpdateMethod to "PUT" to override. + +## Signature + +```go +type CrudResource struct +``` + +## Properties + + + + + + + "PATCH" (default) or "PUT" + + +## Methods + +### Create + +Create sends a POST request to create a new resource. + +#### Signature + +```go +func (*CrudResource) Create(data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) + +Line 276. + +*** + +### Delete + +Delete removes a resource by ID. It returns the parsed response body (or an empty map for 204 No Content) and any error. + +#### Signature + +```go +func (*CrudResource) Delete(id string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) + +Line 297. + +*** + +### Get + +Get retrieves a single resource by ID. + +#### Signature + +```go +func (*CrudResource) Get(id string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) + +Line 281. + +*** + +### List + +List retrieves all items from the collection. Optional query parameters can be provided. The raw JSON response map is returned. + +#### Signature + +```go +func (*CrudResource) List(params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) + +Line 271. + +*** + +### Update + +Update modifies an existing resource by ID using the configured update method (PATCH or PUT). + +#### Signature + +```go +func (*CrudResource) Update(id string, data map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) + +Line 287. + +## Source + +[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) + +Line 239. diff --git a/fern/products/sdk-reference/go/rest/rest/http-client/index.mdx b/fern/products/sdk-reference/go/rest/rest/http-client/index.mdx new file mode 100644 index 0000000000..7502256cd8 --- /dev/null +++ b/fern/products/sdk-reference/go/rest/rest/http-client/index.mdx @@ -0,0 +1,213 @@ +--- +slug: "/reference/go/rest/rest/http-client" +title: "HttpClient" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest.HttpClient" + parent: "rest.rest" + module: "rest.rest" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go" +--- +# `HttpClient` + +HttpClient is a thin wrapper around net/http that provides Basic Auth, JSON encoding/decoding, and standard headers for SignalWire API calls. + +## Signature + +```go +type HttpClient struct +``` + +## Methods + +### BaseURL + +BaseURL returns the base URL used by this client. + +#### Signature + +```go +func (*HttpClient) BaseURL() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) + +Line 124. + +*** + +### Delete + +Delete performs an HTTP DELETE request. It returns the parsed response body (or an empty map for 204 No Content) and any error. + +#### Signature + +```go +func (*HttpClient) Delete(path string) (map[string]any, error) +``` + +#### Parameters + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) + +Line 160. + +*** + +### Get + +Get performs an HTTP GET request. params are added as query-string parameters. + +#### Signature + +```go +func (*HttpClient) Get(path string, params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) + +Line 138. + +*** + +### Patch + +Patch performs an HTTP PATCH request with a JSON body. + +#### Signature + +```go +func (*HttpClient) Patch(path string, body map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) + +Line 154. + +*** + +### Post + +Post performs an HTTP POST request with a JSON body. Optional params are appended to the URL as query-string parameters. + +#### Signature + +```go +func (*HttpClient) Post(path string, body map[string]any, params map[string]string) (map[string]any, error) +``` + +#### Parameters + + + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) + +Line 144. + +*** + +### Put + +Put performs an HTTP PUT request with a JSON body. + +#### Signature + +```go +func (*HttpClient) Put(path string, body map[string]any) (map[string]any, error) +``` + +#### Parameters + + + + + +#### Returns + +`(map[string]any, error)` + +#### Source + +[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) + +Line 149. + +*** + +### SetBaseURL + +SetBaseURL overrides the base URL used by this client. Useful for pointing the client at a non-default endpoint (audit fixtures, mock servers, etc.) without re-running the constructor with a synthetic space name. + +#### Signature + +```go +func (*HttpClient) SetBaseURL(url string) +``` + +#### Parameters + + + +#### Source + +[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) + +Line 132. + +## Source + +[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) + +Line 62. diff --git a/fern/products/sdk-reference/go/rest/rest/index.mdx b/fern/products/sdk-reference/go/rest/rest/index.mdx new file mode 100644 index 0000000000..d843da72c1 --- /dev/null +++ b/fern/products/sdk-reference/go/rest/rest/index.mdx @@ -0,0 +1,38 @@ +--- +slug: "/reference/go/rest/rest" +title: "rest" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "module" + language: "go" + qualified_name: "rest.rest" + parent: "github.com/signalwire/signalwire-go/pkg/rest" + module: "rest" +--- +# `rest` + +## Classes + + + + CrudResource provides standard List, Create, Get, Update, Delete operations against a REST collection endpoint. Update defaults to PATCH; set UpdateMethod to "PUT" to override. + + + + HttpClient is a thin wrapper around net/http that provides Basic Auth, JSON encoding/decoding, and standard headers for SignalWire API calls. + + + + PaginatedIterator walks through paginated API responses one page at a time. Each call to Next returns the items from the current page, a boolean indicating whether more pages exist, and any error encountered. + + + + RestClient is the top-level REST client for the SignalWire platform. It provides namespaced access to all SignalWire API domains. + + + + SignalWireRestError is returned when the SignalWire REST API responds with a non-2xx status code. + + diff --git a/fern/products/sdk-reference/go/rest/rest/paginated-iterator/index.mdx b/fern/products/sdk-reference/go/rest/rest/paginated-iterator/index.mdx new file mode 100644 index 0000000000..04b8e4b11d --- /dev/null +++ b/fern/products/sdk-reference/go/rest/rest/paginated-iterator/index.mdx @@ -0,0 +1,77 @@ +--- +slug: "/reference/go/rest/rest/paginated-iterator" +title: "PaginatedIterator" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest.PaginatedIterator" + parent: "rest.rest" + module: "rest.rest" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go" +--- +# `PaginatedIterator` + +PaginatedIterator walks through paginated API responses one page at a time. Each call to Next returns the items from the current page, a boolean indicating whether more pages exist, and any error encountered. + +## Signature + +```go +type PaginatedIterator struct +``` + +## Methods + +### ForEach + +ForEach calls fn for every item across all pages. It fetches pages lazily via Next and invokes fn once per item in the order they are returned. Iteration stops early if fn returns a non-nil error (that error is returned to the caller) or when Next signals there are no more pages. + +#### Signature + +```go +func (*PaginatedIterator) ForEach(fn func(map[string]any) error) error +``` + +#### Parameters + + + +#### Returns + +`error` + +#### Source + +[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) + +Line 387. + +*** + +### Next + +Next fetches the next page of results. It returns the items from the page, a boolean hasMore that is true when additional pages remain, and any error. When there are no more pages, it returns nil, false, nil. + +#### Signature + +```go +func (*PaginatedIterator) Next() ([]map[string]any, bool, error) +``` + +#### Returns + +`([]map[string]any, bool, error)` + +#### Source + +[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) + +Line 334. + +## Source + +[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) + +Line 306. diff --git a/fern/products/sdk-reference/go/rest/rest/rest-client/index.mdx b/fern/products/sdk-reference/go/rest/rest/rest-client/index.mdx new file mode 100644 index 0000000000..bf37400a84 --- /dev/null +++ b/fern/products/sdk-reference/go/rest/rest/rest-client/index.mdx @@ -0,0 +1,174 @@ +--- +slug: "/reference/go/rest/rest/rest-client" +title: "RestClient" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest.RestClient" + parent: "rest.rest" + module: "rest.rest" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/rest_client.go" +--- +# `RestClient` + +RestClient is the top-level REST client for the SignalWire platform. It provides namespaced access to all SignalWire API domains. + +Usage: + +``` +client, err := rest.NewRestClient("project-id", "api-token", "your-space.signalwire.com") +// or use environment variables SIGNALWIRE_PROJECT_ID, SIGNALWIRE_API_TOKEN, SIGNALWIRE_SPACE +client, err := rest.NewRestClient("", "", "") + +agents, err := client.Fabric.AIAgents.List(nil) +client.Calling.Play("call-id", map[string]any{"play": [...]}) +``` + +## Signature + +```go +type RestClient struct +``` + +## Examples + + + + ```go + client, err := rest.NewRestClient("project-id", "api-token", "your-space.signalwire.com") + // or use environment variables SIGNALWIRE_PROJECT_ID, SIGNALWIRE_API_TOKEN, SIGNALWIRE_SPACE + client, err := rest.NewRestClient("", "", "") + + agents, err := client.Fabric.AIAgents.List(nil) + client.Calling.Play("call-id", map[string]any{"play": [...]}) + ``` + + + + ```go + client, err := rest.NewRestClient("project-id", "api-token", "your-space.signalwire.com") + // or use environment variables SIGNALWIRE_PROJECT_ID, SIGNALWIRE_API_TOKEN, SIGNALWIRE_SPACE + client, err := rest.NewRestClient("", "", "") + + agents, err := client.Fabric.AIAgents.List(nil) + client.Calling.Play("call-id", map[string]any{"play": [...]}) + ``` + + + +## Properties + + + + + Calling API (REST-based call control) + + + + + + Compatibility (Twilio-compatible) LAML API + + + + Datasphere API + + + + Fabric API + + + + + + Logs + + + + + + + + + + Relay REST resources + + + + Project management + + + + PubSub & Chat + + + + + + + + 10DLC Campaign Registry + + + + + + + + + + Video API + + +## Methods + +### HttpClient + +HttpClient exposes the underlying HTTP transport. It is the public form of Python's “signalwire\_client.\_http“ and is the entry point used by helpers like PaginatedIterator that need raw GET access without going through a namespace resource. + +#### Signature + +```go +func (*RestClient) HttpClient() *HttpClient +``` + +#### Returns + +`*HttpClient` + +#### Source + +[`pkg/rest/rest_client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/rest_client.go) + +Line 86. + +*** + +### SetBaseURL + +SetBaseURL overrides the base URL used by the underlying HttpClient. Useful for pointing the client at a non-default endpoint such as the audit\_rest\_transport.py harness fixture, a recorded-cassette mock server, or a regional endpoint without re-running the constructor. + +#### Signature + +```go +func (*RestClient) SetBaseURL(url string) +``` + +#### Parameters + + + +#### Source + +[`pkg/rest/rest_client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/rest_client.go) + +Line 78. + +## Source + +[`pkg/rest/rest_client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/rest_client.go) + +Line 28. diff --git a/fern/products/sdk-reference/go/rest/rest/signal-wire-rest-error/index.mdx b/fern/products/sdk-reference/go/rest/rest/signal-wire-rest-error/index.mdx new file mode 100644 index 0000000000..95fe3446f8 --- /dev/null +++ b/fern/products/sdk-reference/go/rest/rest/signal-wire-rest-error/index.mdx @@ -0,0 +1,61 @@ +--- +slug: "/reference/go/rest/rest/signal-wire-rest-error" +title: "SignalWireRestError" +sdk_label: "Go SDK" +icon: "golang" +lustri: + auto_generated: true + kind: "class" + language: "go" + qualified_name: "github.com/signalwire/signalwire-go/pkg/rest.SignalWireRestError" + parent: "rest.rest" + module: "rest.rest" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go" +--- +# `SignalWireRestError` + +SignalWireRestError is returned when the SignalWire REST API responds with a non-2xx status code. + +## Signature + +```go +type SignalWireRestError struct +``` + +## Properties + + + + + + + + + +## Methods + +### Error + +Error implements the error interface. + +#### Signature + +```go +func (*SignalWireRestError) Error() string +``` + +#### Returns + +`string` + +#### Source + +[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) + +Line 45. + +## Source + +[`pkg/rest/client.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go) + +Line 37. diff --git a/fern/products/sdk-reference/java/_meta.json b/fern/products/sdk-reference/java/_meta.json index 680209bf83..81855778e8 100644 --- a/fern/products/sdk-reference/java/_meta.json +++ b/fern/products/sdk-reference/java/_meta.json @@ -6,5 +6,5 @@ "format": "mdx", "platform": "fern", "base_slug": "/reference/java", - "item_count": 1906 + "item_count": 1944 } \ No newline at end of file diff --git a/fern/products/sdk-reference/java/agents/agent/agent/agent-base/builder/index.mdx b/fern/products/sdk-reference/java/agents/agent/agent/agent-base/builder/index.mdx new file mode 100644 index 0000000000..181b966635 --- /dev/null +++ b/fern/products/sdk-reference/java/agents/agent/agent/agent-base/builder/index.mdx @@ -0,0 +1,466 @@ +--- +slug: "/reference/java/agents/agent/agent/agent-base/builder" +title: "Builder" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.agent.AgentBase.Builder" + parent: "agents.agent.agent.AgentBase" + module: "agents.agent.agent.AgentBase" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java" + visibility: "public" +--- +# `Builder` + +**Modifiers:** `static` + +## Signature + +```java +public static class Builder +``` + +## Methods + +### \ + +#### Signature + +```java +public () +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +*** + +### authPassword + +#### Signature + +```java +public Builder authPassword(String password) +``` + +#### Parameters + + + +#### Returns + +`Builder` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 202. + +*** + +### authUser + +#### Signature + +```java +public Builder authUser(String user) +``` + +#### Parameters + + + +#### Returns + +`Builder` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 201. + +*** + +### autoAnswer + +#### Signature + +```java +public Builder autoAnswer(boolean autoAnswer) +``` + +#### Parameters + + + +#### Returns + +`Builder` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 189. + +*** + +### build + +#### Signature + +```java +public AgentBase build() +``` + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 265. + +*** + +### envProvider + +Supply an alternative `EnvProvider` for the build-time env +var reads (`SWML_BASIC_AUTH_USER`, `SWML_BASIC_AUTH_PASSWORD`, +`SWML_PROXY_URL_BASE`). + +<p>Primarily for the --simulate-serverless +harness, which needs to mask the real process env with simulated +values without mutating `System#getenv()` (which Java does +not support). + +Pass `null` to fall back to the real process +env (the default). + +#### Signature + +```java +public Builder envProvider(EnvProvider env) +``` + +#### Parameters + + + environment source. + + +#### Returns + +`Builder` — this builder. + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 260. + +*** + +### host + +#### Signature + +```java +public Builder host(String host) +``` + +#### Parameters + + + +#### Returns + +`Builder` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 187. + +*** + +### maxDuration + +#### Signature + +```java +public Builder maxDuration(int maxDuration) +``` + +#### Parameters + + + +#### Returns + +`Builder` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 190. + +*** + +### name + +#### Signature + +```java +public Builder name(String name) +``` + +#### Parameters + + + +#### Returns + +`Builder` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 181. + +*** + +### port + +#### Signature + +```java +public Builder port(int port) +``` + +#### Parameters + + + +#### Returns + +`Builder` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 188. + +*** + +### recordCall + +#### Signature + +```java +public Builder recordCall(boolean recordCall) +``` + +#### Parameters + + + +#### Returns + +`Builder` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 191. + +*** + +### recordFormat + +Typed overload of `#recordFormat(String)`. + +Accepts a +`RecordFormat` so a misspelled container format fails at compile +time instead of being rejected by the server. Delegates to the string +path via `RecordFormat#getValue()`, so wire behavior is identical. + +#### Signature + + + + ```java + public Builder recordFormat(String format) + ``` + + + + ```java + public Builder recordFormat(RecordFormat format) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`Builder` + +#### Returns (Overload 2) + +`Builder` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 192. + +*** + +### recordStereo + +#### Signature + +```java +public Builder recordStereo(boolean stereo) +``` + +#### Parameters + + + +#### Returns + +`Builder` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 200. + +*** + +### route + +#### Signature + +```java +public Builder route(String route) +``` + +#### Parameters + + + +#### Returns + +`Builder` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 182. + +*** + +### signingKey + +Configure the customer's SignalWire Signing Key from the Dashboard +(API Credentials → Signing Key). + +When set, the agent enforces +webhook signature validation on POST `/`, `/swaig`, +and `/post_prompt` — unsigned or invalidly-signed requests +are rejected with HTTP 403. + +<p>Resolution order at `#build()` time: +<ol> + <li>Explicit `signingKey(...)` on the builder.</li> + <li>`SIGNALWIRE_SIGNING_KEY` environment variable.</li> + <li>Unset → validation disabled, with a startup warning.</li> +</ol> + +#### Signature + +```java +public Builder signingKey(String key) +``` + +#### Parameters + + + the Signing Key. Pass `null` to fall through to env-var resolution. + + +#### Returns + +`Builder` — this builder. + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 226. + +*** + +### trustProxyForSignature + +When set to `true`, the webhook URL reconstruction honors +`X-Forwarded-Proto` / `X-Forwarded-Host` headers +during signature validation. + +Default `false` — proxy +headers are spoofable, so opt in only when you control the +proxy chain. + +#### Signature + +```java +public Builder trustProxyForSignature(boolean trust) +``` + +#### Parameters + + + whether to trust proxy headers. + + +#### Returns + +`Builder` — this builder. + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 241. + +## Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 164. diff --git a/fern/products/sdk-reference/java/agents/agent/agent/agent-base/index.mdx b/fern/products/sdk-reference/java/agents/agent/agent/agent-base/index.mdx new file mode 100644 index 0000000000..b35d4c97ba --- /dev/null +++ b/fern/products/sdk-reference/java/agents/agent/agent/agent-base/index.mdx @@ -0,0 +1,2940 @@ +--- +slug: "/reference/java/agents/agent/agent/agent-base" +title: "AgentBase" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.agent.AgentBase" + parent: "agents.agent.agent" + module: "agents.agent.agent" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java" + visibility: "public" +--- +# `AgentBase` + +Base class for all SignalWire AI agents. +Composes prompt management, tool registration, AI config, HTTP serving, +skills integration, and SWML rendering. + +Use the builder pattern: + +<pre> +var agent = AgentBase.builder() + .name("my-agent") + .route("/") + .port(3000) + .build(); +</pre> + +## Signature + +```java +public class AgentBase extends Service +``` + +## Inheritance + +**Extends:** [Service](/docs/sdk-reference/reference/java/agents/swml/swml/service) + +## Constants + + + The complete set of internal SWAIG function names that accept fillers, matching the SWAIGInternalFiller schema definition. \

Any name outside this set is silently ignored by the runtime — \`#setInternalFillersMap(java.util.Map)\` and String, java.util.List) warn if you pass an unknown name. \

Notable absences: \`change\_step\`, \`gather\_submit\`, or arbitrary user-defined SWAIG function names are NOT supported. + + +## Methods + +### addAnswerVerb + +#### Signature + +```java +public AgentBase addAnswerVerb(String verbName, Object verbData) +``` + +#### Parameters + + + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 976. + +*** + +### addFunctionInclude + +#### Signature + +```java +public AgentBase addFunctionInclude(String url, Map functions) +``` + +#### Parameters + + + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 939. + +*** + +### addHint + +#### Signature + +```java +public AgentBase addHint(String hint) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 671. + +*** + +### addHints + +#### Signature + +```java +public AgentBase addHints(List newHints) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 676. + +*** + +### addInternalFiller + +Add internal fillers for a single internal function and language. + +<p>See `#setInternalFillersMap(java.util.Map)` for the complete +list of supported function names and an explanation of what fillers +do. + +Names outside the supported set log a warning and are stored, but +the runtime will not play them. + +#### Signature + + + + ```java + public AgentBase addInternalFiller(String text, String file) + ``` + + + + ```java + public AgentBase addInternalFiller( + String functionName, + String languageCode, + List fillers + ) + ``` + + + +#### Parameters (Overload 1) + + + + + +#### Parameters (Overload 2) + + + one of `#SUPPORTED_INTERNAL_FILLER_NAMES`. + + + + BCP-47 language code (e.g. `"en-US"`). + + + + phrases to speak while the function runs. + + +#### Returns (Overload 1) + +`AgentBase` + +#### Returns (Overload 2) + +`AgentBase` — this agent for chaining. + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 897. + +*** + +### addLanguage + +Add a language configuration with an optional per-language `params` +dict (engine-specific tuning, voice settings, etc.). + +The `params` +key is only emitted into SWML when non-empty so existing language +entries stay byte-identical when no params are passed. +Mirrors Python's add\_language(params=...) addition. + +#### Signature + + + + ```java + public AgentBase addLanguage(String name, String code, String voice) + ``` + + + + ```java + public AgentBase addLanguage( + String name, + String code, + String voice, + String speechModel, + String fillerWord, + String engine + ) + ``` + + + + ```java + public AgentBase addLanguage( + String name, + String code, + String voice, + String speechModel, + String fillerWord, + String engine, + Map params + ) + ``` + + + +#### Parameters (Overload 1) + + + + + + + +#### Parameters (Overload 2) + + + + + + + + + + + + + +#### Parameters (Overload 3) + + + + + + + + + + + + + + + +#### Returns (Overload 1) + +`AgentBase` + +#### Returns (Overload 2) + +`AgentBase` + +#### Returns (Overload 3) + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 686. + +*** + +### addMcpServer + +Add an external MCP server for tool discovery and invocation. +Tools are discovered via MCP protocol at session start and added to SWAIG. + +#### Signature + + + + ```java + public AgentBase addMcpServer( + String url, + Map headers, + boolean resources, + Map resourceVars + ) + ``` + + + + ```java + public AgentBase addMcpServer(String url) + ``` + + + + ```java + public AgentBase addMcpServer(String url, Map headers) + ``` + + + +#### Parameters (Overload 1) + + + MCP server HTTP endpoint URL + + + + Optional HTTP headers (e.g. Authorization) + + + + Whether to fetch resources into global\_data + + + + Variables for URI template substitution + + +#### Parameters (Overload 2) + + + +#### Parameters (Overload 3) + + + + + +#### Returns (Overload 1) + +`AgentBase` — this for chaining + +#### Returns (Overload 2) + +`AgentBase` + +#### Returns (Overload 3) + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1131. + +*** + +### addPatternHint + +#### Signature + +```java +public AgentBase addPatternHint(String pattern) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 681. + +*** + +### addPostAiVerb + +#### Signature + +```java +public AgentBase addPostAiVerb(String verbName, Object verbData) +``` + +#### Parameters + + + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 990. + +*** + +### addPostAnswerVerb + +#### Signature + +```java +public AgentBase addPostAnswerVerb(String verbName, Object verbData) +``` + +#### Parameters + + + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 983. + +*** + +### addPreAnswerVerb + +#### Signature + +```java +public AgentBase addPreAnswerVerb(String verbName, Object verbData) +``` + +#### Parameters + + + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 969. + +*** + +### addPronunciation + +#### Signature + +```java +public AgentBase addPronunciation( + String replace, + String with, + boolean ignoreCase +) +``` + +#### Parameters + + + + + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 760. + +*** + +### addSkill + +Typed overload of Map). + +Accepts a built-in +`SkillName` so a misspelled skill fails at compile time instead of +silently no-op-ing on the server. Delegates to the string path via +`SkillName#getValue()`, so wire behavior is identical. + +#### Signature + + + + ```java + public AgentBase addSkill(String skillName, Map params) + ``` + + + + ```java + public AgentBase addSkill(SkillName skillName, Map params) + ``` + + + +#### Parameters (Overload 1) + + + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`AgentBase` + +#### Returns (Overload 2) + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1040. + +*** + +### addSwaigQueryParams + +#### Signature + +```java +public AgentBase addSwaigQueryParams(Map params) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1102. + +*** + +### builder + +**Modifiers:** `static` + +#### Signature + +```java +public static Builder builder() +``` + +#### Returns + +`Builder` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 160. + +*** + +### buildMcpToolList + +Build MCP tool list from registered tools. + +#### Signature + +```java +public List> buildMcpToolList() +``` + +#### Returns + +`List>` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1190. + +*** + +### clearPostAiVerbs + +#### Signature + +```java +public AgentBase clearPostAiVerbs() +``` + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 999. + +*** + +### clearPostAnswerVerbs + +#### Signature + +```java +public AgentBase clearPostAnswerVerbs() +``` + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 998. + +*** + +### clearPreAnswerVerbs + +#### Signature + +```java +public AgentBase clearPreAnswerVerbs() +``` + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 997. + +*** + +### clearSwaigQueryParams + +#### Signature + +```java +public AgentBase clearSwaigQueryParams() +``` + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1107. + +*** + +### clone + +Create a deep copy of this agent for per-request customization. + +#### Signature + +```java +public AgentBase clone() +``` + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1737. + +*** + +### contexts + +#### Signature + +```java +public ContextBuilder contexts() +``` + +#### Returns + +`ContextBuilder` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1017. + +*** + +### createToolToken + +Mint a per-call SWAIG-function token via the agent's SessionManager. + +<p>Python parity: `state_mixin.StateMixin._create_tool_token`. +Returns an empty string when the underlying SessionManager throws +(Python catches all exceptions and returns "" on error). + +#### Signature + +```java +public String createToolToken(String toolName, String callId) +``` + +#### Parameters + + + + + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 640. + +*** + +### defineContexts + +Define or return the ContextBuilder for this agent. + +The builder is +wired to report registered SWAIG tool names back so that its +`validate()` can check for collisions with reserved native tool +names (`next_step`, `change_context`, `gather_submit`). + +#### Signature + +```java +public ContextBuilder defineContexts() +``` + +#### Returns + +`ContextBuilder` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1011. + +*** + +### defineTool + +Register a SWAIG tool (function) that the AI can invoke during a call. + +<h3>How this becomes a tool the model sees</h3> + +<p>A SWAIG function is <b>exactly the same concept</b> as a "tool" in +native OpenAI / Anthropic tool calling. + +On every LLM turn, the SDK +renders each registered SWAIG function into the OpenAI tool schema: + +<pre>"type": "function", + "function": { + "name": "your_name_here", + "description": "your description text", + "parameters": { ... your JSON schema ... + } +} +}</pre> + +<p>That schema is sent to the model as part of the same API call that +produces the next assistant message. The model reads: +<ul> + <li>the function `description` to decide WHEN to call this tool</li> + <li>each parameter `description` (inside parameters) to decide + HOW to fill in that argument from the user's utterance</li> +</ul> + +<p>This means <b>descriptions are prompt engineering</b>, not developer +comments. A vague description is the #1 cause of "the model has the +right tool but doesn't call it" failures. + +<h3>Bad vs good descriptions</h3> +<pre>: description: "Lookup function" +GOOD: description: "Look up a customer's account details by account " + + "number. Use this BEFORE quoting any account-" + + "specific info (balance, plan, status). Do not " + + "use for general product questions." + +BAD : parameters : Map.of("id", Map.of("type", "string", +"description", "the id")) +GOOD: parameters : Map.of("account\_number", Map.of("type", "string", +"description", "The customer's 8-digit account " +\+ "number, no dashes or spaces. Ask the user if " +\+ "they don't provide it."))</pre> + +<h3>Tool count matters</h3> + +<p>LLM tool selection accuracy degrades past ~7-8 simultaneously-active +tools per call. Use `com.signalwire.sdk.contexts.Step#setFunctions(Object)` +to partition tools across steps so only the relevant subset is active +at any moment. + +**Decorators:** `@Override` + +#### Signature + + + + ```java + public AgentBase defineTool( + String name, + String description, + Map parameters, + ToolHandler handler + ) + ``` + + + + ```java + public AgentBase defineTool(ToolDefinition toolDef) + ``` + + + +#### Parameters (Overload 1) + + + the function name (snake\_case verb recommended). + + + + LLM-facing description of when to call this tool. + + + + JSON-schema properties map with LLM-facing descriptions for each parameter. + + + + the Java handler invoked when the model calls this tool. + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`AgentBase` + +#### Returns (Overload 2) + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 575. + +*** + +### defineTools + +**Decorators:** `@Override` + +#### Signature + +```java +public AgentBase defineTools(List toolDefs) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 594. + +*** + +### detectServerlessBaseUrl + +Resolve a base URL from environment variables alone (proxy or +serverless platform). + +Returns `null` if no suitable env +vars are set. + +<p>This is used by both the HTTP server path (when no proxy is +manually set) and by non-HTTP transports such as the Lambda +adapter, so they agree on the origin to use for webhook URLs. + +<p>The returned origin is a bare scheme + host(:port) with NO +route appended — callers must layer their route on top via +`#buildWebhookUrl(String)` and the post-prompt URL builder. +This matters: it is how we guarantee that the agent's route +always appears in webhook URLs regardless of which source +produced the base. + +#### Signature + + + + ```java + public String detectServerlessBaseUrl() + ``` + + + + ```java + public String detectServerlessBaseUrl(EnvProvider env) + ``` + + + +#### Parameters (Overload 2) + + + environment variable source. + + +#### Returns (Overload 1) + +`String` — base URL, or `null`. + +#### Returns (Overload 2) + +`String` — base URL, or `null`. + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1855. + +*** + +### enableDebugEvents + +#### Signature + +```java +public AgentBase enableDebugEvents() +``` + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 934. + +*** + +### enableDebugRoutes + +#### Signature + +```java +public AgentBase enableDebugRoutes() +``` + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1112. + +*** + +### enableMcpServer + +Expose this agent's tools as an MCP server endpoint at /mcp. +Adds a JSON-RPC 2.0 endpoint that MCP clients can connect to. + +#### Signature + +```java +public AgentBase enableMcpServer() +``` + +#### Returns + +`AgentBase` — this for chaining + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1168. + +*** + +### enableSipRouting + +#### Signature + +```java +public AgentBase enableSipRouting() +``` + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1293. + +*** + +### extractSipUsername + +Extract the username portion from a SIP URI. + +<p> +Handles formats: +<ul> + <li>`sip:user@host` -> `user`</li> + <li>`sip:user@host:port` -> `user`</li> + <li>`user@host` -> `user`</li> + <li>`+15551234567` -> `+15551234567` (returned as-is)</li> +</ul> + +**Modifiers:** `static` + +#### Signature + +```java +public static String extractSipUsername(String sipUri) +``` + +#### Parameters + + + The SIP URI or phone number + + +#### Returns + +`String` — The extracted username, or the original string if no @ is found + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1324. + +*** + +### getAuthPassword + +#### Signature + +```java +public String getAuthPassword() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1374. + +*** + +### getAuthUser + +#### Signature + +```java +public String getAuthUser() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1373. + +*** + +### getContexts + +Returns the contexts dictionary as serialised SWML, or null when no +contexts have been defined yet. + +Mirrors Python's PromptManager.get\_contexts which returns the contexts +dict or None. + +#### Signature + +```java +public Map getContexts() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 498. + +*** + +### getDynamicConfigCallback + +#### Signature + +```java +public DynamicConfigCallback getDynamicConfigCallback() +``` + +#### Returns + +`DynamicConfigCallback` — the dynamic config callback, or `null` if none set. Exposed primarily so alternative transports (e.g. the Lambda adapter) can invoke it outside the HTTP server path. + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1504. + +*** + +### getGlobalData + +#### Signature + +```java +public Map getGlobalData() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 796. + +*** + +### getHost + +#### Signature + +```java +public String getHost() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1371. + +*** + +### getLanguageParams + +Read the per-language `params` dict for a previously-added language. +Returns null when the code is unknown or params were never set. +Mirrors Python's get\_language\_params. + +**Decorators:** `@SuppressWarnings` + +#### Signature + +```java +public Map getLanguageParams(String code) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 743. + +*** + +### getMcpServers + +Get configured MCP servers (read-only). + +#### Signature + +```java +public List> getMcpServers() +``` + +#### Returns + +`List>` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1183. + +*** + +### getName + +#### Signature + +```java +public String getName() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1369. + +*** + +### getNormalisedRoute + +Return the agent's route normalised to an empty string for the +root route or `"/"` otherwise. + +Exposed so non-HTTP +transports can construct paths correctly. + +#### Signature + +```java +public String getNormalisedRoute() +``` + +#### Returns + +`String` — normalised route prefix. + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1522. + +*** + +### getOnSummaryCallback + +#### Signature + +```java +public BiConsumer,Map> getOnSummaryCallback() +``` + +#### Returns + +`BiConsumer,Map>` — the post-prompt summary callback, or `null`. + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1511. + +*** + +### getPom + +Read-only snapshot of the agent's POM as a typed +`PromptObjectModel`. + +Wraps the internal map-based section list so +callers get the rich Section / render API without mutating internal +state. + +<p>Python parity: `agent.pom` instance attribute +(agent_base.py line 209). Returns `null` when `usePom` is +false (mirroring Python's = None). + +#### Signature + +```java +public PromptObjectModel getPom() +``` + +#### Returns + +`PromptObjectModel` — typed POM wrapper, or `null` when POM mode is off. + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 484. + +*** + +### getPort + +#### Signature + +```java +public int getPort() +``` + +#### Returns + +`int` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1372. + +*** + +### getPostPrompt + +Returns the post-prompt text that was set via setPostPrompt, or null +when none has been set. + +Mirrors Python's PromptManager.get\_post\_prompt / +PromptMixin.get\_post\_prompt — used by SWML rendering when a post-prompt +is configured. + +#### Signature + +```java +public String getPostPrompt() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 438. + +*** + +### getPrompt + +#### Signature + +```java +public Object getPrompt() +``` + +#### Returns + +`Object` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 421. + +*** + +### getRawPrompt + +Returns the raw prompt text whatever setPromptText stored, or null when +no raw prompt has been set. + +Distinct from getPrompt() which may return +a POM map when usePom is true. + +Mirrors Python's PromptManager.get\_raw\_prompt. + +#### Signature + +```java +public String getRawPrompt() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 449. + +*** + +### getRoute + +#### Signature + +```java +public String getRoute() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1370. + +*** + +### getSigningKey + +#### Signature + +```java +public String getSigningKey() +``` + +#### Returns + +`String` — the configured Signing Key for SignalWire webhook signature validation (resolved from the builder or `SIGNALWIRE_SIGNING_KEY` env), or `null` when validation is disabled. + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1382. + +*** + +### getSipUsernames + +#### Signature + +```java +public Set getSipUsernames() +``` + +#### Returns + +`Set` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1308. + +*** + +### getSkillManager + +#### Signature + +```java +public SkillManager getSkillManager() +``` + +#### Returns + +`SkillManager` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1525. + +*** + +### getTools + +#### Signature + +```java +public Map getTools() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 625. + +*** + +### handleMcpRequest + +Handle an MCP JSON-RPC 2.0 request. + +Returns the response map. + +#### Signature + +```java +public Map handleMcpRequest(Map body) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1211. + +*** + +### hasSkill + +Typed overload of `#hasSkill(String)` (see Map)). + +#### Signature + + + + ```java + public boolean hasSkill(String skillName) + ``` + + + + ```java + public boolean hasSkill(SkillName skillName) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`boolean` + +#### Returns (Overload 2) + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1069. + +*** + +### hasTool + +#### Signature + +```java +public boolean hasTool(String name) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 629. + +*** + +### isMcpServerEnabled + +Check if MCP server endpoint is enabled. + +#### Signature + +```java +public boolean isMcpServerEnabled() +``` + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1176. + +*** + +### isSipRoutingEnabled + +#### Signature + +```java +public boolean isSipRoutingEnabled() +``` + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1307. + +*** + +### isTrustProxyForSignature + +#### Signature + +```java +public boolean isTrustProxyForSignature() +``` + +#### Returns + +`boolean` — whether webhook URL reconstruction trusts `X-Forwarded-Proto` / `X-Forwarded-Host` headers during signature validation. + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1389. + +*** + +### listSkills + +#### Signature + +```java +public List listSkills() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1065. + +*** + +### manualSetProxyUrl + +#### Signature + +```java +public AgentBase manualSetProxyUrl(String url) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1097. + +*** + +### onDebugEvent + +#### Signature + +```java +public AgentBase onDebugEvent(Consumer> callback) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1360. + +*** + +### onFunctionCall + +#### Signature + +```java +public FunctionResult onFunctionCall( + String name, + Map args, + Map rawData +) +``` + +#### Parameters + + + + + + + +#### Returns + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 600. + +*** + +### onSummary + +#### Signature + +```java +public AgentBase onSummary( + BiConsumer,Map> callback +) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1355. + +*** + +### promptAddSection + +#### Signature + + + + ```java + public AgentBase promptAddSection( + String title, + String body, + List bullets + ) + ``` + + + + ```java + public AgentBase promptAddSection(String title, String body) + ``` + + + +#### Parameters (Overload 1) + + + + + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`AgentBase` + +#### Returns (Overload 2) + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 368. + +*** + +### promptAddSubsection + +#### Signature + +```java +public AgentBase promptAddSubsection( + String parentTitle, + String title, + String body +) +``` + +#### Parameters + + + + + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 384. + +*** + +### promptAddToSection + +#### Signature + +```java +public AgentBase promptAddToSection(String title, List bullets) +``` + +#### Parameters + + + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 400. + +*** + +### promptHasSection + +#### Signature + +```java +public boolean promptHasSection(String title) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 412. + +*** + +### registerAdditionalRoutes + +**Decorators:** `@Override` + +#### Signature + +```java +protected void registerAdditionalRoutes( + com.sun.net.httpserver.HttpServer server +) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1962. + +*** + +### registerSipUsername + +#### Signature + +```java +public AgentBase registerSipUsername(String username) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1298. + +*** + +### registerSwaigFunction + +**Decorators:** `@Override` + +#### Signature + +```java +public AgentBase registerSwaigFunction(Map swaigFunc) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 588. + +*** + +### removeSkill + +Typed overload of `#removeSkill(String)` (see Map)). + +#### Signature + + + + ```java + public AgentBase removeSkill(String skillName) + ``` + + + + ```java + public AgentBase removeSkill(SkillName skillName) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`AgentBase` + +#### Returns (Overload 2) + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1055. + +*** + +### renderMainSwml + +**Decorators:** `@Override` + +#### Signature + +```java +protected Map renderMainSwml(HttpExchange exchange) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1930. + +*** + +### renderSwml + +Render the complete SWML document. +5 phases: pre-answer, answer, post-answer, AI, post-AI + +#### Signature + +```java +public Map renderSwml(String baseUrl) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1535. + +*** + +### renderSwmlJson + +Render SWML as a JSON string. + +#### Signature + +```java +public String renderSwmlJson(String baseUrl) +``` + +#### Parameters + + + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1726. + +*** + +### resetContexts + +Remove all contexts, returning the agent to a no-contexts state. +This is a convenience wrapper around `defineContexts().reset()`. +Use it in a dynamic config callback when you need to rebuild +contexts from scratch for a specific request. + +#### Signature + +```java +public AgentBase resetContexts() +``` + +#### Returns + +`AgentBase` — this agent for chaining. + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1029. + +*** + +### run + +Start the agent server. + +Equivalent to `#serve()` (inherited). + +#### Signature + +```java +public void run() +``` + +#### Throws + +- `IOException` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 2088. + +*** + +### setDynamicConfigCallback + +#### Signature + +```java +public AgentBase setDynamicConfigCallback(DynamicConfigCallback callback) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1082. + +*** + +### setFunctionIncludes + +#### Signature + +```java +public AgentBase setFunctionIncludes(List> includes) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 947. + +*** + +### setGlobalData + +#### Signature + +```java +public AgentBase setGlobalData(Map data) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 785. + +*** + +### setInternalFillers + +#### Signature + +```java +public AgentBase setInternalFillers(List> fillers) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 836. + +*** + +### setInternalFillersMap + +Set internal fillers for native SWAIG functions. + +<p>Internal fillers are short phrases the AI agent speaks (via TTS) +while an internal/native function is running, so the caller doesn't +hear dead air during transitions or background work. + +<p>Supported function names (match the SWAIGInternalFiller schema): +`hangup`, `check_time`, `wait_for_user`, +`wait_seconds`, `adjust_response_latency`, +`next_step`, `change_context`, `get_visual_input`, +`get_ideal_strategy`. + +See +`#SUPPORTED_INTERNAL_FILLER_NAMES`. + +<p>Notably NOT supported: `change_step`, `gather_submit`, or +arbitrary user-defined SWAIG function names. The runtime only honors +fillers for the names listed above; everything else is silently +ignored at the SWML level. This method warns at registration time if +you pass an unknown name so you catch the typo early. + +#### Signature + +```java +public AgentBase setInternalFillersMap( + Map>> fillers +) +``` + +#### Parameters + + + map of → language\_code → phrases. + + +#### Returns + +`AgentBase` — this agent for chaining. + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 865. + +*** + +### setLanguageParams + +Set (or replace) the per-language `params` dict on an already-added +language. + +Empty/null params removes the key. Unknown code is a no-op. +Returns self for chaining. Mirrors Python's set\_language\_params. + +#### Signature + +```java +public AgentBase setLanguageParams(String code, Map params) +``` + +#### Parameters + + + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 724. + +*** + +### setLanguages + +#### Signature + +```java +public AgentBase setLanguages(List> langs) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 754. + +*** + +### setNativeFunctions + +#### Signature + +```java +public AgentBase setNativeFunctions(List funcs) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 800. + +*** + +### setParam + +#### Signature + +```java +public AgentBase setParam(String key, Object value) +``` + +#### Parameters + + + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 775. + +*** + +### setParams + +#### Signature + +```java +public AgentBase setParams(Map newParams) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 780. + +*** + +### setPostPrompt + +#### Signature + +```java +public AgentBase setPostPrompt(String text) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 363. + +*** + +### setPostPromptLlmParams + +#### Signature + +```java +public AgentBase setPostPromptLlmParams(Map llmParams) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 959. + +*** + +### setPostPromptUrl + +#### Signature + +```java +public AgentBase setPostPromptUrl(String url) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1092. + +*** + +### setPromptLlmParams + +#### Signature + +```java +public AgentBase setPromptLlmParams(Map llmParams) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 953. + +*** + +### setPromptPom + +Sets the prompt as a list of POM section maps. + +Each section map +supports keys "title", "body", "bullets", "numbered", +"numbered\_bullets", and "subsections". Switches the agent to POM mode. + +Mirrors Python's PromptManager.set\_prompt\_pom — accepts a list of +section dicts and stores them in pomSections. + +#### Signature + +```java +public AgentBase setPromptPom(List> pom) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 461. + +*** + +### setPromptText + +#### Signature + +```java +public AgentBase setPromptText(String text) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 357. + +*** + +### setPronunciations + +#### Signature + +```java +public AgentBase setPronunciations(List> prons) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 769. + +*** + +### setWebHookUrl + +#### Signature + +```java +public AgentBase setWebHookUrl(String url) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1087. + +*** + +### updateGlobalData + +#### Signature + +```java +public AgentBase updateGlobalData(Map data) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 791. + +*** + +### validateSignedWebhook + +Override the `Service` hook to enforce SignalWire webhook +signature validation when a `#signingKey` is configured. + +Returns +`true` (no-op) when `signingKey` is unset; per +porting-sdk/webhooks.md, the AgentBase MUST NOT silently reject +unsigned requests when no key is configured (a prominent startup +warning is the documented behavior instead — emitted in +`Builder#build()`). + +<p>The signature header is read from `X-SignalWire-Signature` +(or its `X-Twilio-Signature` legacy alias). The URL is +reconstructed from proxy headers / `SWML_PROXY_URL_BASE` / +the request itself, and the validator is called with the raw body +bytes the caller already captured. + +**Decorators:** `@Override` + +#### Signature + +```java +protected boolean validateSignedWebhook( + com.sun.net.httpserver.HttpExchange exchange, + String rawBody +) +``` + +#### Parameters + + + the inbound HttpExchange. + + + + the raw UTF-8 body string that was already read from the exchange. + + +#### Returns + +`boolean` — `true` when validation passes (or no key is configured). + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1426. + +*** + +### validateToolToken + +Validate a per-call SWAIG-function token. + +Returns false when the +function is not registered, when the SessionManager rejects the +token, or on any underlying exception. + +<p>Python parity: `state_mixin.StateMixin.validate_tool_token` +— rejects unknown functions up-front and swallows exceptions. + +#### Signature + +```java +public boolean validateToolToken( + String functionName, + String token, + String callId +) +``` + +#### Parameters + + + + + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 656. + +*** + +### validateWebhook + +Public delegate around `#validateSignedWebhook` so external +front-doors (e.g. + +`com.signalwire.sdk.server.AgentServer`, a +Lambda adapter, etc.) can run the same logic the in-process HTTP +server does. Mirrors the no-op-when-unset behavior described in +porting-sdk/webhooks.md. + +#### Signature + +```java +public boolean validateWebhook( + com.sun.net.httpserver.HttpExchange exchange, + String rawBody +) +``` + +#### Parameters + + + the inbound HttpExchange. + + + + raw UTF-8 body string. + + +#### Returns + +`boolean` — `true` when validation passes (or no key is configured). + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1402. + +## Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 55. diff --git a/fern/products/sdk-reference/java/agents/agent/agent/agent-base/index__2.mdx b/fern/products/sdk-reference/java/agents/agent/agent/agent-base/index__2.mdx new file mode 100644 index 0000000000..64f9a94a43 --- /dev/null +++ b/fern/products/sdk-reference/java/agents/agent/agent/agent-base/index__2.mdx @@ -0,0 +1,67 @@ +--- +slug: "/reference/java/agents/agent/agent/agent-base/index__2" +title: "AgentBase" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "agents.agent.agent.AgentBase" + parent: "agents.agent.agent" + module: "agents.agent.agent" +--- +# `AgentBase` + +## Classes + + + + + +## Interfaces + +### DynamicConfigCallback + +#### Signature + +```java +public interface DynamicConfigCallback +``` + +#### Methods + +##### configure + +###### Signature + +```java +void configure( + Map queryParams, + Map bodyParams, + Map> headers, + AgentBase agent +) +``` + +###### Parameters + + + + + + + + + +###### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 2100. + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 2098. diff --git a/fern/products/sdk-reference/java/agents/agent/agent/index.mdx b/fern/products/sdk-reference/java/agents/agent/agent/index.mdx new file mode 100644 index 0000000000..2418fb9d4d --- /dev/null +++ b/fern/products/sdk-reference/java/agents/agent/agent/index.mdx @@ -0,0 +1,28 @@ +--- +slug: "/reference/java/agents/agent/agent" +title: "agent" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "agents.agent.agent" + parent: "com.signalwire.sdk.agent" + module: "agents.agent" +--- +# `agent` + +## Classes + + + + Base class for all SignalWire AI agents. Composes prompt management, tool registration, AI config, HTTP serving, skills integration, and SWML rendering. Use the builder pattern: <pre> var agent = AgentBase.builder() .name("my-agent") .route("/") .port(3000) .build(); </pre> + + + +## Modules + + + + diff --git a/fern/products/sdk-reference/java/agents/agent/index.mdx b/fern/products/sdk-reference/java/agents/agent/index.mdx new file mode 100644 index 0000000000..b55daf0ea8 --- /dev/null +++ b/fern/products/sdk-reference/java/agents/agent/index.mdx @@ -0,0 +1,26 @@ +--- +slug: "/reference/java/agents/agent" +title: "agent" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "com.signalwire.sdk.agent" + parent: "agents" + module: "agents" +--- +# `agent` + +## Signature + +```java +package com.signalwire.sdk.agent +``` + +## Modules + + + + diff --git a/fern/products/sdk-reference/java/agents/cli/cli/index.mdx b/fern/products/sdk-reference/java/agents/cli/cli/index.mdx new file mode 100644 index 0000000000..eaaed05a07 --- /dev/null +++ b/fern/products/sdk-reference/java/agents/cli/cli/index.mdx @@ -0,0 +1,22 @@ +--- +slug: "/reference/java/agents/cli/cli" +title: "cli" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "agents.cli.cli" + parent: "com.signalwire.sdk.cli" + module: "agents.cli" +--- +# `cli` + +## Classes + + + + CLI tool for testing SWAIG functions against an agent. <p> Uses only JDK classes (java.net.http.HttpClient) -- no external dependencies. <p> Two modes: <ul> <li><b>URL mode</b> — hit a running agent HTTP server.</li> <li><b>Simulation mode</b> — \ loads the agent class directly and routes invocation through the matching serverless adapter (e.g. + + diff --git a/fern/products/sdk-reference/java/agents/cli/cli/swaig-test/index.mdx b/fern/products/sdk-reference/java/agents/cli/cli/swaig-test/index.mdx new file mode 100644 index 0000000000..22ba49d22d --- /dev/null +++ b/fern/products/sdk-reference/java/agents/cli/cli/swaig-test/index.mdx @@ -0,0 +1,136 @@ +--- +slug: "/reference/java/agents/cli/cli/swaig-test" +title: "SwaigTest" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.cli.SwaigTest" + parent: "agents.cli.cli" + module: "agents.cli.cli" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/SwaigTest.java" + visibility: "public" +--- +# `SwaigTest` + +CLI tool for testing SWAIG functions against an agent. + +<p> +Uses only JDK classes (java.net.http.HttpClient) -- no external dependencies. +<p> +Two modes: +<ul> + <li><b>URL mode</b> — hit a running agent HTTP server.</li> + <li><b>Simulation mode</b> — <platform> loads the + agent class directly and routes invocation through the matching + serverless adapter (e.g. + +`LambdaAgentHandler`) instead of +the HTTP server. Uses an injected `EnvProvider` to mask the +real process env with simulated values, since Java cannot mutate +`System#getenv()`.</li> + +</ul> +<p> +Usage: +<pre> + swaig-test --url http://user:pass@localhost:3000 --list-tools + swaig-test --url http://user:pass@localhost:3000 --dump-swml + swaig-test --url http://user:pass@localhost:3000 --exec tool_name --param key=value + swaig-test <agent-class> --simulate-serverless lambda --dump-swml + swaig-test <agent-class> --simulate-serverless lambda --exec tool_name --param k=v + swaig-test <agent-class> --simulate-serverless lambda +</pre> + +## Signature + +```java +public class SwaigTest +``` + +## Methods + +### \ + +#### Signature + +```java +public () +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/cli/SwaigTest.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/SwaigTest.java) + +*** + +### main + +**Modifiers:** `static` + +#### Signature + +```java +public static void main(String[] args) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/cli/SwaigTest.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/SwaigTest.java) + +Line 75. + +*** + +### run + +Run the CLI and return the exit code. + +Extracted so tests can drive +`main` without calling `System#exit(int)`. + +**Modifiers:** `static` + +#### Signature + + + + ```java + public static int run(String[] args) + ``` + + + + ```java + private void run() + ``` + + + +#### Parameters (Overload 1) + + + command-line arguments. + + +#### Returns (Overload 1) + +`int` — 0 on success, non-zero on error. + +#### Source + +[`src/main/java/com/signalwire/sdk/cli/SwaigTest.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/SwaigTest.java) + +Line 87. + +## Source + +[`src/main/java/com/signalwire/sdk/cli/SwaigTest.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/SwaigTest.java) + +Line 44. diff --git a/fern/products/sdk-reference/java/agents/cli/index.mdx b/fern/products/sdk-reference/java/agents/cli/index.mdx new file mode 100644 index 0000000000..cdb925986e --- /dev/null +++ b/fern/products/sdk-reference/java/agents/cli/index.mdx @@ -0,0 +1,28 @@ +--- +slug: "/reference/java/agents/cli" +title: "cli" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "com.signalwire.sdk.cli" + parent: "agents" + module: "agents" +--- +# `cli` + +## Signature + +```java +package com.signalwire.sdk.cli +``` + +## Modules + + + + + + diff --git a/fern/products/sdk-reference/java/agents/cli/simulation/index.mdx b/fern/products/sdk-reference/java/agents/cli/simulation/index.mdx new file mode 100644 index 0000000000..9f1437c4e1 --- /dev/null +++ b/fern/products/sdk-reference/java/agents/cli/simulation/index.mdx @@ -0,0 +1,20 @@ +--- +slug: "/reference/java/agents/cli/simulation" +title: "simulation" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "agents.cli.simulation" + parent: "com.signalwire.sdk.cli" + module: "agents.cli" +--- +# `simulation` + +## Modules + + + + diff --git a/fern/products/sdk-reference/java/agents/cli/simulation/simulation/index.mdx b/fern/products/sdk-reference/java/agents/cli/simulation/simulation/index.mdx new file mode 100644 index 0000000000..90258349e3 --- /dev/null +++ b/fern/products/sdk-reference/java/agents/cli/simulation/simulation/index.mdx @@ -0,0 +1,34 @@ +--- +slug: "/reference/java/agents/cli/simulation/simulation" +title: "simulation" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "com.signalwire.sdk.cli.simulation" + parent: "agents.cli.simulation" + module: "agents.cli.simulation" +--- +# `simulation` + +## Signature + +```java +package com.signalwire.sdk.cli.simulation +``` + +## Classes + + + + Build a layered `EnvProvider` that overlays simulated serverless environment values on top of the real process environment. <p>Java cannot mutate `System#getenv()` at runtime (the map it returns is an immutable snapshot of the OS env). + + + +## Modules + + + + diff --git a/fern/products/sdk-reference/java/agents/cli/simulation/simulation/serverless-simulator/index.mdx b/fern/products/sdk-reference/java/agents/cli/simulation/simulation/serverless-simulator/index.mdx new file mode 100644 index 0000000000..d77f94fe8a --- /dev/null +++ b/fern/products/sdk-reference/java/agents/cli/simulation/simulation/serverless-simulator/index.mdx @@ -0,0 +1,288 @@ +--- +slug: "/reference/java/agents/cli/simulation/simulation/serverless-simulator" +title: "ServerlessSimulator" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.cli.simulation.ServerlessSimulator" + parent: "com.signalwire.sdk.cli.simulation" + module: "agents.cli.simulation.simulation" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java" + visibility: "public" +--- +# `ServerlessSimulator` + +Build a layered `EnvProvider` that overlays simulated serverless +environment values on top of the real process environment. + +<p>Java cannot mutate `System#getenv()` at runtime (the map it +returns is an immutable snapshot of the OS env). + +To implement the +\--simulate-serverless flag in the same spirit as +Python's `mock_env.py`, we therefore cannot "set env vars then +clean up" — we instead compose an injectable `EnvProvider` and +thread it through every code path in the SDK that reads env vars. + +<p>Accepts only the platforms the port actually implements. Ports that +add CGI / GCF / Azure support later should extend +`#presetFor(Platform)`. + +<p>Mirrors the clear-and-warn semantics of Python's +`_clear_conflicting_env`: `SWML_PROXY_URL_BASE` is masked +in the simulated view so that platform-specific URL generation is +actually exercised. If the caller's real OS env has +`SWML_PROXY_URL_BASE` set, the simulator does <b>not</b> mutate +the real env — it simply returns `null` for that key through the +layered `EnvProvider`. Callers that want to surface the mismatch +to the user can check `#proxyUrlBaseMaskedFromRealEnv()`. + +**Modifiers:** `final` + +## Signature + +```java +public final class ServerlessSimulator +``` + +## Methods + +### \ + +Build a simulator for the given platform using the real process +environment as the fallback layer. + +#### Signature + + + + ```java + public (Platform platform) + ``` + + + + ```java + public ( + Platform platform, + EnvProvider realEnv, + Map overrides + ) + ``` + + + +#### Parameters (Overload 1) + + + platform to simulate. + + +#### Parameters (Overload 2) + + + platform to simulate. + + + + fallback env provider (usually `EnvProvider#SYSTEM`). + + + + user-supplied overrides on top of the platform preset. + + +#### Source + +[`src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java) + +Line 100. + +*** + +### buildEnvProvider + +Build the layered `EnvProvider`. + +Precedence is: + +<ol> + <li>masked keys — always return `null`.</li> + <li>simulated values — overlaid on the real env.</li> + <li>Real env — everything else passes through.</li> +</ol> + +#### Signature + +```java +public EnvProvider buildEnvProvider() +``` + +#### Returns + +`EnvProvider` — layered env provider. + +#### Source + +[`src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java) + +Line 199. + +*** + +### getMaskedKeys + +#### Signature + +```java +public Set getMaskedKeys() +``` + +#### Returns + +`Set` — an immutable view of the keys that are masked (returned as `null`) regardless of what the real env has for them. + +#### Source + +[`src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java) + +Line 174. + +*** + +### getPlatform + +#### Signature + +```java +public Platform getPlatform() +``` + +#### Returns + +`Platform` — the simulated platform. + +#### Source + +[`src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java) + +Line 158. + +*** + +### getSimulatedEnv + +#### Signature + +```java +public Map getSimulatedEnv() +``` + +#### Returns + +`Map` — the map of simulated values layered on top of the real env. The returned map is a defensive copy. + +#### Source + +[`src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java) + +Line 166. + +*** + +### parsePlatform + +Parse the CLI-string form of a platform. + +Accepts only values this +port supports; unknown strings throw `IllegalArgumentException` +so the CLI can surface a clear error instead of silently falling +back. + +**Modifiers:** `static` + +#### Signature + +```java +public static Platform parsePlatform(String s) +``` + +#### Parameters + + + user-supplied platform string. + + +#### Returns + +`Platform` — the matching `Platform`. + +#### Throws + +- `IllegalArgumentException` — for unsupported platforms. + +#### Source + +[`src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java) + +Line 80. + +*** + +### presetFor + +Default env-var preset for a platform, mirroring Python's +`ServerlessSimulator.PLATFORM_PRESETS`. + +**Modifiers:** `static` + +#### Signature + +```java +public static Map presetFor(Platform platform) +``` + +#### Parameters + + + platform. + + +#### Returns + +`Map` — the preset map (never null). + +#### Source + +[`src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java) + +Line 142. + +*** + +### proxyUrlBaseMaskedFromRealEnv + +#### Signature + +```java +public boolean proxyUrlBaseMaskedFromRealEnv() +``` + +#### Returns + +`boolean` — `true` if the real process env has `SWML_PROXY_URL_BASE` set — i.e. the simulated view is hiding a real value the user might not have intended. The CLI uses this to print a warning that mirrors Python's behaviour. + +#### Source + +[`src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java) + +Line 184. + +## Source + +[`src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java) + +Line 36. diff --git a/fern/products/sdk-reference/java/agents/cli/simulation/simulation/serverless-simulator/index__2.mdx b/fern/products/sdk-reference/java/agents/cli/simulation/simulation/serverless-simulator/index__2.mdx new file mode 100644 index 0000000000..d4d10c18f4 --- /dev/null +++ b/fern/products/sdk-reference/java/agents/cli/simulation/simulation/serverless-simulator/index__2.mdx @@ -0,0 +1,82 @@ +--- +slug: "/reference/java/agents/cli/simulation/simulation/serverless-simulator/index__2" +title: "ServerlessSimulator" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "agents.cli.simulation.simulation.ServerlessSimulator" + parent: "com.signalwire.sdk.cli.simulation" + module: "agents.cli.simulation.simulation" +--- +# `ServerlessSimulator` + +## Enums + +### Platform + +Platforms the Java port supports simulating today. + +#### Signature + +```java +public enum Platform +``` + +#### Variants + + + AWS Lambda. + + +#### Methods + +##### valueOf + +**Modifiers:** `static` + +###### Signature + +```java +public static Platform valueOf(String name) +``` + +###### Parameters + + + +###### Returns + +`Platform` + +###### Source + +[`src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java) + +*** + +##### values + +**Modifiers:** `static` + +###### Signature + +```java +public static Platform[] values() +``` + +###### Returns + +`Platform[]` + +###### Source + +[`src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java) + +#### Source + +[`src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java) + +Line 39. diff --git a/fern/products/sdk-reference/java/agents/contexts/contexts/context-builder/index.mdx b/fern/products/sdk-reference/java/agents/contexts/contexts/context-builder/index.mdx new file mode 100644 index 0000000000..ec4a788d40 --- /dev/null +++ b/fern/products/sdk-reference/java/agents/contexts/contexts/context-builder/index.mdx @@ -0,0 +1,257 @@ +--- +slug: "/reference/java/agents/contexts/contexts/context-builder" +title: "ContextBuilder" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.contexts.ContextBuilder" + parent: "agents.contexts.contexts" + module: "agents.contexts.contexts" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/ContextBuilder.java" + visibility: "public" +--- +# `ContextBuilder` + +Builder for multi-step, multi-context AI agent workflows. + +<p>A ContextBuilder owns one or more `Context`s; each context owns an +ordered list of `Step`s. + +Only one context and one step is active at a +time. Per chat turn, the runtime injects the current step's instructions as +a system message, then asks the LLM for a response. + +<h2>Native tools auto-injected by the runtime</h2> + +<p>When a step (or its enclosing context) declares valid_steps or +valid_contexts, the runtime auto-injects two native tools so the model can +navigate the flow: +<ul> + <li>enum) — present when valid_steps is set</li> + <li>enum) — present when valid_contexts is set</li> +</ul> + +<p>A third native tool — `gather_submit` — is injected during +gather_info questioning. These three names are <b>reserved</b>: +`#validate()` rejects any agent that defines a SWAIG tool with one of +these names. See `#RESERVED_NATIVE_TOOL_NAMES`. + +<h2>Function whitelisting (Step.setFunctions)</h2> + +<p>Each step may declare a functions whitelist. The whitelist is applied +in-memory at the start of each LLM turn. CRITICALLY: if a step does NOT +declare a functions field, it INHERITS the previous step's active set. +See `Step#setFunctions(Object)` for details and examples. + +## Signature + +```java +public class ContextBuilder +``` + +## Constants + + + Reserved tool names auto-injected by the runtime when contexts/steps are in use. User-defined SWAIG tools must not collide with these names. \

    \
  • \`next\_step\` / \`change\_context\` are injected when valid\_steps or valid\_contexts is set so the model can navigate the flow.\
  • \
  • \`gather\_submit\` is injected while a step's gather\_info is collecting answers.\
  • \
+
+ +## Methods + +### \ + +#### Signature + +```java +public () +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/ContextBuilder.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/ContextBuilder.java) + +Line 70. + +*** + +### addContext + +Add a new context. + +#### Signature + +```java +public Context addContext(String name) +``` + +#### Parameters + + + +#### Returns + +`Context` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/ContextBuilder.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/ContextBuilder.java) + +Line 105. + +*** + +### attachToolNameSupplier + +Attach a supplier that returns registered SWAIG tool names so +`#validate()` can check for collisions with +`#RESERVED_NATIVE_TOOL_NAMES`. + +Called internally by +`AgentBase.defineContexts()`. + +#### Signature + +```java +public ContextBuilder attachToolNameSupplier( + java.util.function.Supplier> supplier +) +``` + +#### Parameters + + + returns the current set of registered tool names. + + +#### Returns + +`ContextBuilder` — this builder for chaining. + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/ContextBuilder.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/ContextBuilder.java) + +Line 84. + +*** + +### getContext + +Get an existing context by name. + +#### Signature + +```java +public Context getContext(String name) +``` + +#### Parameters + + + +#### Returns + +`Context` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/ContextBuilder.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/ContextBuilder.java) + +Line 121. + +*** + +### isEmpty + +#### Signature + +```java +public boolean isEmpty() +``` + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/ContextBuilder.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/ContextBuilder.java) + +Line 125. + +*** + +### reset + +Remove all contexts, returning the builder to its initial state. +Use this in a dynamic config callback when you need to rebuild +contexts from scratch for a specific request. + +#### Signature + +```java +public ContextBuilder reset() +``` + +#### Returns + +`ContextBuilder` — this builder for chaining. + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/ContextBuilder.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/ContextBuilder.java) + +Line 96. + +*** + +### toMap + +Convert all contexts to a Map for SWML generation. +Validates before converting. + +#### Signature + +```java +public Map toMap() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/ContextBuilder.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/ContextBuilder.java) + +Line 310. + +*** + +### validate + +Validate the contexts configuration. + +#### Signature + +```java +public void validate() +``` + +#### Throws + +- `IllegalStateException` — if validation fails + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/ContextBuilder.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/ContextBuilder.java) + +Line 134. + +## Source + +[`src/main/java/com/signalwire/sdk/contexts/ContextBuilder.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/ContextBuilder.java) + +Line 41. diff --git a/fern/products/sdk-reference/java/agents/contexts/contexts/context/index.mdx b/fern/products/sdk-reference/java/agents/contexts/contexts/context/index.mdx new file mode 100644 index 0000000000..d819b1c6be --- /dev/null +++ b/fern/products/sdk-reference/java/agents/contexts/contexts/context/index.mdx @@ -0,0 +1,650 @@ +--- +slug: "/reference/java/agents/contexts/contexts/context" +title: "Context" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.contexts.Context" + parent: "agents.contexts.contexts" + module: "agents.contexts.contexts" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java" + visibility: "public" +--- +# `Context` + +Represents a single context containing multiple steps. + +<p> +All setter methods return `this` for fluent chaining. + +## Signature + +```java +public class Context +``` + +## Methods + +### \ + +#### Signature + +```java +public (String name) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) + +Line 43. + +*** + +### addBullets + +#### Signature + +```java +public Context addBullets(String title, List bullets) +``` + +#### Parameters + + + + + +#### Returns + +`Context` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) + +Line 205. + +*** + +### addEnterFiller + +#### Signature + +```java +public Context addEnterFiller(String languageCode, List fillers) +``` + +#### Parameters + + + + + +#### Returns + +`Context` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) + +Line 230. + +*** + +### addExitFiller + +#### Signature + +```java +public Context addExitFiller(String languageCode, List fillers) +``` + +#### Parameters + + + + + +#### Returns + +`Context` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) + +Line 238. + +*** + +### addSection + +#### Signature + +```java +public Context addSection(String title, String body) +``` + +#### Parameters + + + + + +#### Returns + +`Context` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) + +Line 194. + +*** + +### addStep + +Add a new step to this context. + +#### Signature + + + + ```java + public Step addStep(String stepName) + ``` + + + + ```java + public Step addStep( + String stepName, + String task, + List bullets, + String criteria, + Object functions, + List validSteps + ) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + + + + + + + + + +#### Returns (Overload 1) + +`Step` + +#### Returns (Overload 2) + +`Step` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) + +Line 57. + +*** + +### getName + +#### Signature + +```java +public String getName() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) + +Line 50. + +*** + +### getStep + +#### Signature + +```java +public Step getStep(String stepName) +``` + +#### Parameters + + + +#### Returns + +`Step` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) + +Line 84. + +*** + +### moveStep + +#### Signature + +```java +public Context moveStep(String stepName, int position) +``` + +#### Parameters + + + + + +#### Returns + +`Context` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) + +Line 96. + +*** + +### removeStep + +#### Signature + +```java +public Context removeStep(String stepName) +``` + +#### Parameters + + + +#### Returns + +`Context` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) + +Line 88. + +*** + +### setConsolidate + +#### Signature + +```java +public Context setConsolidate(boolean consolidate) +``` + +#### Parameters + + + +#### Returns + +`Context` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) + +Line 144. + +*** + +### setEnterFillers + +#### Signature + +```java +public Context setEnterFillers(Map> fillers) +``` + +#### Parameters + + + +#### Returns + +`Context` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) + +Line 216. + +*** + +### setExitFillers + +#### Signature + +```java +public Context setExitFillers(Map> fillers) +``` + +#### Parameters + + + +#### Returns + +`Context` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) + +Line 223. + +*** + +### setFullReset + +#### Signature + +```java +public Context setFullReset(boolean fullReset) +``` + +#### Parameters + + + +#### Returns + +`Context` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) + +Line 149. + +*** + +### setInitialStep + +Set which step the context starts on when entered. + +<p>By default, a context starts on its first step (index 0). + +Use this +to skip a preamble step on re-entry via `change_context`. + +#### Signature + +```java +public Context setInitialStep(String stepName) +``` + +#### Parameters + + + name of the step to start on (must exist in this context). + + +#### Returns + +`Context` — this context for chaining. + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) + +Line 114. + +*** + +### setIsolated + +Mark this context as isolated — entering it wipes conversation history. + +<p>When `isolated=true` and the context is entered via +change_context, the runtime wipes the conversation array. + +The model +starts fresh with only the new context's system\_prompt + step +instructions, with no memory of prior turns. + +<p><b>EXCEPTION — reset overrides the wipe:</b> If the context also has +a reset configuration (via `#setConsolidate(boolean)` or +`#setFullReset(boolean)`), the wipe is skipped in favor of the +reset behavior. Use reset with consolidate=true to summarize prior +history into a single message instead of dropping it entirely. + +<p>Use cases: switching to a sensitive billing flow that should not see +prior small-talk; handing off to a different agent persona; resetting +after a long off-topic detour. + +#### Signature + +```java +public Context setIsolated(boolean isolated) +``` + +#### Parameters + + + true to wipe conversation history on context entry (subject to the reset exception above). + + +#### Returns + +`Context` — this context for chaining. + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) + +Line 181. + +*** + +### setPostPrompt + +#### Signature + +```java +public Context setPostPrompt(String postPrompt) +``` + +#### Parameters + + + +#### Returns + +`Context` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) + +Line 134. + +*** + +### setPrompt + +#### Signature + +```java +public Context setPrompt(String prompt) +``` + +#### Parameters + + + +#### Returns + +`Context` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) + +Line 186. + +*** + +### setSystemPrompt + +#### Signature + +```java +public Context setSystemPrompt(String systemPrompt) +``` + +#### Parameters + + + +#### Returns + +`Context` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) + +Line 139. + +*** + +### setUserPrompt + +#### Signature + +```java +public Context setUserPrompt(String userPrompt) +``` + +#### Parameters + + + +#### Returns + +`Context` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) + +Line 154. + +*** + +### setValidContexts + +#### Signature + +```java +public Context setValidContexts(List contexts) +``` + +#### Parameters + + + +#### Returns + +`Context` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) + +Line 124. + +*** + +### setValidSteps + +#### Signature + +```java +public Context setValidSteps(List steps) +``` + +#### Parameters + + + +#### Returns + +`Context` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) + +Line 129. + +*** + +### toMap + +#### Signature + +```java +public Map toMap() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) + +Line 259. + +## Source + +[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) + +Line 16. diff --git a/fern/products/sdk-reference/java/agents/contexts/contexts/gather-info/index.mdx b/fern/products/sdk-reference/java/agents/contexts/contexts/gather-info/index.mdx new file mode 100644 index 0000000000..2e12d73fba --- /dev/null +++ b/fern/products/sdk-reference/java/agents/contexts/contexts/gather-info/index.mdx @@ -0,0 +1,191 @@ +--- +slug: "/reference/java/agents/contexts/contexts/gather-info" +title: "GatherInfo" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.contexts.GatherInfo" + parent: "agents.contexts.contexts" + module: "agents.contexts.contexts" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/GatherInfo.java" + visibility: "public" +--- +# `GatherInfo` + +Configuration for gathering information in a step via the C-side gather\_info system. + +<p> +This produces zero tool_call/tool_result entries in LLM-visible history, +instead using dynamic step instruction re-injection to present one question at a time. + +## Signature + +```java +public class GatherInfo +``` + +## Methods + +### \ + +#### Signature + + + + ```java + public (String outputKey, String completionAction, String prompt) + ``` + + + + ```java + public () + ``` + + + +#### Parameters (Overload 1) + + + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/GatherInfo.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/GatherInfo.java) + +Line 24. + +*** + +### addQuestion + +Add a question to gather. + +#### Signature + + + + ```java + public GatherInfo addQuestion( + String key, + String question, + String type, + boolean confirm, + String prompt, + List functions + ) + ``` + + + + ```java + public GatherInfo addQuestion(String key, String question) + ``` + + + +#### Parameters (Overload 1) + + + + + + + + + + + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`GatherInfo` + +#### Returns (Overload 2) + +`GatherInfo` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/GatherInfo.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/GatherInfo.java) + +Line 38. + +*** + +### getCompletionAction + +#### Signature + +```java +public String getCompletionAction() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/GatherInfo.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/GatherInfo.java) + +Line 52. + +*** + +### getQuestions + +#### Signature + +```java +public List getQuestions() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/GatherInfo.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/GatherInfo.java) + +Line 48. + +*** + +### toMap + +#### Signature + +```java +public Map toMap() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/GatherInfo.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/GatherInfo.java) + +Line 56. + +## Source + +[`src/main/java/com/signalwire/sdk/contexts/GatherInfo.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/GatherInfo.java) + +Line 17. diff --git a/fern/products/sdk-reference/java/agents/contexts/contexts/gather-question/index.mdx b/fern/products/sdk-reference/java/agents/contexts/contexts/gather-question/index.mdx new file mode 100644 index 0000000000..68682b3ba3 --- /dev/null +++ b/fern/products/sdk-reference/java/agents/contexts/contexts/gather-question/index.mdx @@ -0,0 +1,123 @@ +--- +slug: "/reference/java/agents/contexts/contexts/gather-question" +title: "GatherQuestion" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.contexts.GatherQuestion" + parent: "agents.contexts.contexts" + module: "agents.contexts.contexts" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/GatherQuestion.java" + visibility: "public" +--- +# `GatherQuestion` + +Represents a single question in a gather\_info configuration. + +## Signature + +```java +public class GatherQuestion +``` + +## Methods + +### \ + +#### Signature + + + + ```java + public ( + String key, + String question, + String type, + boolean confirm, + String prompt, + List functions + ) + ``` + + + + ```java + public (String key, String question) + ``` + + + +#### Parameters (Overload 1) + + + + + + + + + + + + + +#### Parameters (Overload 2) + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/GatherQuestion.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/GatherQuestion.java) + +Line 23. + +*** + +### getKey + +#### Signature + +```java +public String getKey() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/GatherQuestion.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/GatherQuestion.java) + +Line 37. + +*** + +### toMap + +#### Signature + +```java +public Map toMap() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/GatherQuestion.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/GatherQuestion.java) + +Line 41. + +## Source + +[`src/main/java/com/signalwire/sdk/contexts/GatherQuestion.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/GatherQuestion.java) + +Line 14. diff --git a/fern/products/sdk-reference/java/agents/contexts/contexts/index.mdx b/fern/products/sdk-reference/java/agents/contexts/contexts/index.mdx new file mode 100644 index 0000000000..645f803a40 --- /dev/null +++ b/fern/products/sdk-reference/java/agents/contexts/contexts/index.mdx @@ -0,0 +1,38 @@ +--- +slug: "/reference/java/agents/contexts/contexts" +title: "contexts" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "agents.contexts.contexts" + parent: "com.signalwire.sdk.contexts" + module: "agents.contexts" +--- +# `contexts` + +## Classes + + + + Represents a single context containing multiple steps. <p> All setter methods return `this` for fluent chaining. + + + + Builder for multi-step, multi-context AI agent workflows. <p>A ContextBuilder owns one or more `Context`s; each context owns an ordered list of `Step`s. + + + + Configuration for gathering information in a step via the C-side gather\_info system. <p> This produces zero tool\_call/tool\_result entries in LLM-visible history, instead using dynamic step instruction re-injection to present one question at a time. + + + + Represents a single question in a gather\_info configuration. + + + + Represents a single step within a context. <p> Steps can use either raw text or POM-style sections for their prompt content. All setter methods return `this` for fluent chaining. + + diff --git a/fern/products/sdk-reference/java/agents/contexts/contexts/step/index.mdx b/fern/products/sdk-reference/java/agents/contexts/contexts/step/index.mdx new file mode 100644 index 0000000000..7c78e7c400 --- /dev/null +++ b/fern/products/sdk-reference/java/agents/contexts/contexts/step/index.mdx @@ -0,0 +1,629 @@ +--- +slug: "/reference/java/agents/contexts/contexts/step" +title: "Step" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.contexts.Step" + parent: "agents.contexts.contexts" + module: "agents.contexts.contexts" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Step.java" + visibility: "public" +--- +# `Step` + +Represents a single step within a context. + +<p> +Steps can use either raw text or POM-style sections for their prompt content. +All setter methods return `this` for fluent chaining. + +## Signature + +```java +public class Step +``` + +## Methods + +### \ + +#### Signature + +```java +public (String name) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Step.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Step.java) + +Line 39. + +*** + +### addBullets + +Add a POM section with bullet points. + +#### Signature + +```java +public Step addBullets(String title, List bullets) +``` + +#### Parameters + + + + + +#### Returns + +`Step` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Step.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Step.java) + +Line 78. + +*** + +### addGatherQuestion + +Add a question to this step's gather\_info configuration. +String, String) must be called first. + +<p><b>IMPORTANT — gather mode locks function access:</b> While the model +is asking gather questions, the runtime forcibly deactivates ALL of the +step's other functions. + +The only callable tools during a gather +question are: + +<ul> + <li>`gather_submit` (the native answer-submission tool)</li> + <li>Whatever names you pass in this question's `functions` + argument</li> +</ul> + +<p>`next_step` and `change_context` are also filtered out — +the model cannot navigate away until the gather completes. This is by +design: it forces a tight ask → submit → next-question loop. + +<p>If a question needs to call out to a tool (e.g. validate an email, +geocode a ZIP), list that tool name in this question's `functions` +argument. Functions listed here are active ONLY for this question. + +#### Signature + + + + ```java + public Step addGatherQuestion( + String key, + String question, + String type, + boolean confirm, + String prompt, + List functions + ) + ``` + + + + ```java + public Step addGatherQuestion(String key, String question) + ``` + + + +#### Parameters (Overload 1) + + + + + + + + + + + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`Step` + +#### Returns (Overload 2) + +`Step` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Step.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Step.java) + +Line 206. + +*** + +### addSection + +Add a POM section to the step. + +#### Signature + +```java +public Step addSection(String title, String body) +``` + +#### Parameters + + + + + +#### Returns + +`Step` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Step.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Step.java) + +Line 63. + +*** + +### clearSections + +#### Signature + +```java +public Step clearSections() +``` + +#### Returns + +`Step` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Step.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Step.java) + +Line 219. + +*** + +### getName + +#### Signature + +```java +public String getName() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Step.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Step.java) + +Line 44. + +*** + +### setEnd + +Mark this step as terminal for the step flow. + +<p><b>IMPORTANT:</b> `end=true` does NOT end the conversation or +hang up the call. + +It exits step mode entirely after this step executes +— clearing the steps list, current step index, valid\_steps, and +valid\_contexts. The agent keeps running, but operates only under the +base system prompt and the context-level prompt; no more step +instructions are injected and no more `next_step` tool is offered. + +<p>To actually end the call, call a hangup tool or define a +hangup hook. + +#### Signature + +```java +public Step setEnd(boolean end) +``` + +#### Parameters + + + true to exit step mode after this step. + + +#### Returns + +`Step` — this step for chaining. + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Step.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Step.java) + +Line 161. + +*** + +### setFunctions + +Set which non-internal functions are callable while this step is active. + +<p><b>IMPORTANT — inheritance behavior:</b> If you do NOT call this method, +the step inherits whichever function set was active on the previous step +(or the previous context's last step). + +The server-side runtime only +resets the active set when a step explicitly declares its `functions` +field. This is the most common source of bugs in multi-step agents: +forgetting `setFunctions()` on a later step lets the previous step's +tools leak through. Best practice is to call `setFunctions()` +explicitly on every step that should differ from the previous one. + +<p>Keep the per-step active set small: LLM tool selection accuracy +degrades noticeably past ~7-8 simultaneously-active tools per call. +Use per-step whitelisting to partition large tool collections. + +<p>Accepts: +<ul> + <li>`List<String>` — whitelist of function names allowed in this + step. Functions not in the list become inactive.</li> + <li>`List.of()` (empty list) — explicit disable-all.</li> + <li>The string `"none"` — synonym for an empty list.</li> +</ul> + +<p>Internal functions (e.g. `gather_submit`, hangup hook) are +ALWAYS protected and cannot be deactivated by this whitelist. The native +navigation tools `next_step` and `change_context` are +injected automatically when `setValidSteps`/`setValidContexts` +is used; they are not affected by this list and do not need to appear in +it. + +#### Signature + +```java +public Step setFunctions(Object functions) +``` + +#### Parameters + + + a `List` whitelist, an empty list, or the string `"none"`. + + +#### Returns + +`Step` — this step for chaining. + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Step.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Step.java) + +Line 130. + +*** + +### setGatherInfo + +Enable info gathering for this step. + +#### Signature + +```java +public Step setGatherInfo( + String outputKey, + String completionAction, + String prompt +) +``` + +#### Parameters + + + + + + + +#### Returns + +`Step` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Step.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Step.java) + +Line 179. + +*** + +### setResetConsolidate + +#### Signature + +```java +public Step setResetConsolidate(boolean consolidate) +``` + +#### Parameters + + + +#### Returns + +`Step` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Step.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Step.java) + +Line 235. + +*** + +### setResetFullReset + +#### Signature + +```java +public Step setResetFullReset(boolean fullReset) +``` + +#### Parameters + + + +#### Returns + +`Step` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Step.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Step.java) + +Line 240. + +*** + +### setResetSystemPrompt + +#### Signature + +```java +public Step setResetSystemPrompt(String systemPrompt) +``` + +#### Parameters + + + +#### Returns + +`Step` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Step.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Step.java) + +Line 225. + +*** + +### setResetUserPrompt + +#### Signature + +```java +public Step setResetUserPrompt(String userPrompt) +``` + +#### Parameters + + + +#### Returns + +`Step` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Step.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Step.java) + +Line 230. + +*** + +### setSkipToNextStep + +#### Signature + +```java +public Step setSkipToNextStep(boolean skip) +``` + +#### Parameters + + + +#### Returns + +`Step` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Step.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Step.java) + +Line 171. + +*** + +### setSkipUserTurn + +#### Signature + +```java +public Step setSkipUserTurn(boolean skip) +``` + +#### Parameters + + + +#### Returns + +`Step` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Step.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Step.java) + +Line 166. + +*** + +### setStepCriteria + +#### Signature + +```java +public Step setStepCriteria(String criteria) +``` + +#### Parameters + + + +#### Returns + +`Step` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Step.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Step.java) + +Line 90. + +*** + +### setText + +Set the step's prompt text directly. + +#### Signature + +```java +public Step setText(String text) +``` + +#### Parameters + + + +#### Returns + +`Step` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Step.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Step.java) + +Line 51. + +*** + +### setValidContexts + +#### Signature + +```java +public Step setValidContexts(List contexts) +``` + +#### Parameters + + + +#### Returns + +`Step` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Step.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Step.java) + +Line 140. + +*** + +### setValidSteps + +#### Signature + +```java +public Step setValidSteps(List steps) +``` + +#### Parameters + + + +#### Returns + +`Step` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Step.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Step.java) + +Line 135. + +*** + +### toMap + +#### Signature + +```java +public Map toMap() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/contexts/Step.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Step.java) + +Line 289. + +## Source + +[`src/main/java/com/signalwire/sdk/contexts/Step.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Step.java) + +Line 17. diff --git a/fern/products/sdk-reference/java/agents/contexts/index.mdx b/fern/products/sdk-reference/java/agents/contexts/index.mdx new file mode 100644 index 0000000000..4fa5b72816 --- /dev/null +++ b/fern/products/sdk-reference/java/agents/contexts/index.mdx @@ -0,0 +1,26 @@ +--- +slug: "/reference/java/agents/contexts" +title: "contexts" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "com.signalwire.sdk.contexts" + parent: "agents" + module: "agents" +--- +# `contexts` + +## Signature + +```java +package com.signalwire.sdk.contexts +``` + +## Modules + + + + diff --git a/fern/products/sdk-reference/java/agents/datamap/index.mdx b/fern/products/sdk-reference/java/agents/datamap/index.mdx new file mode 100644 index 0000000000..5e90aca06c --- /dev/null +++ b/fern/products/sdk-reference/java/agents/datamap/index.mdx @@ -0,0 +1,571 @@ +--- +slug: "/reference/java/agents/datamap" +title: "datamap" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.datamap" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/datamap/DataMap.java" +--- +# `datamap` + +Fluent builder for creating SWAIG data\_map configurations. + +<p> +DataMap tools execute on SignalWire servers without requiring webhook endpoints. +Supports variable expansion: `${args.param`}, `${response.field`}, +`${global_data.key`}, `${foreach.item`}. +<p> +All methods return `this` for fluent chaining. + +## Signature + +```java +public class DataMap +``` + +## Methods + +### \ + +#### Signature + +```java +public (String functionName) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/datamap/DataMap.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/datamap/DataMap.java) + +Line 33. + +*** + +### body + +Set request body for the last added webhook (POST/PUT requests). + +#### Signature + +```java +public DataMap body(Map data) +``` + +#### Parameters + + + +#### Returns + +`DataMap` + +#### Source + +[`src/main/java/com/signalwire/sdk/datamap/DataMap.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/datamap/DataMap.java) + +Line 166. + +*** + +### description + +Alias for `#purpose(String)`; sets the LLM-facing tool +description. + +This string is read by the model to decide WHEN to +call this tool. See `#purpose(String)` for bad-vs-good +examples. + +#### Signature + +```java +public DataMap description(String description) +``` + +#### Parameters + + + +#### Returns + +`DataMap` + +#### Source + +[`src/main/java/com/signalwire/sdk/datamap/DataMap.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/datamap/DataMap.java) + +Line 79. + +*** + +### errorKeys + +Set error keys for the most recent webhook (if webhooks exist) or top-level. + +#### Signature + +```java +public DataMap errorKeys(List keys) +``` + +#### Parameters + + + +#### Returns + +`DataMap` + +#### Source + +[`src/main/java/com/signalwire/sdk/datamap/DataMap.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/datamap/DataMap.java) + +Line 218. + +*** + +### expression + +Add an expression pattern for pattern-based responses. + +#### Signature + + + + ```java + public DataMap expression( + String testValue, + String pattern, + FunctionResult output, + FunctionResult nomatchOutput + ) + ``` + + + + ```java + public DataMap expression( + String testValue, + String pattern, + FunctionResult output + ) + ``` + + + +#### Parameters (Overload 1) + + + + + + + + + +#### Parameters (Overload 2) + + + + + + + +#### Returns (Overload 1) + +`DataMap` + +#### Returns (Overload 2) + +`DataMap` + +#### Source + +[`src/main/java/com/signalwire/sdk/datamap/DataMap.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/datamap/DataMap.java) + +Line 128. + +*** + +### fallbackOutput + +Set a fallback output result at the top level (used when all webhooks fail). + +#### Signature + +```java +public DataMap fallbackOutput(FunctionResult result) +``` + +#### Parameters + + + +#### Returns + +`DataMap` + +#### Source + +[`src/main/java/com/signalwire/sdk/datamap/DataMap.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/datamap/DataMap.java) + +Line 210. + +*** + +### foreach + +Process an array from the webhook response using foreach mechanism. + +#### Signature + +```java +public DataMap foreach(Map foreachConfig) +``` + +#### Parameters + + + +#### Returns + +`DataMap` + +#### Source + +[`src/main/java/com/signalwire/sdk/datamap/DataMap.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/datamap/DataMap.java) + +Line 188. + +*** + +### getName + +#### Signature + +```java +public String getName() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/datamap/DataMap.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/datamap/DataMap.java) + +Line 43. + +*** + +### globalErrorKeys + +Set top-level error keys (applies to all webhooks). + +#### Signature + +```java +public DataMap globalErrorKeys(List keys) +``` + +#### Parameters + + + +#### Returns + +`DataMap` + +#### Source + +[`src/main/java/com/signalwire/sdk/datamap/DataMap.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/datamap/DataMap.java) + +Line 230. + +*** + +### output + +Set the output result for the most recent webhook. + +#### Signature + +```java +public DataMap output(FunctionResult result) +``` + +#### Parameters + + + +#### Returns + +`DataMap` + +#### Source + +[`src/main/java/com/signalwire/sdk/datamap/DataMap.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/datamap/DataMap.java) + +Line 199. + +*** + +### parameter + +Add a parameter to this data-map tool — the `description` is +LLM-FACING. + +<p>Each parameter description is rendered into the OpenAI tool schema +under `parameters.properties.<name>.description` and sent to +the model. + +The model uses it to decide HOW to fill in the argument +from user speech. It is prompt engineering, not developer FYI. + +<h3>Bad vs good</h3> +<pre>: .parameter("city", "string", "the city", true, null) +GOOD: .parameter("city", "string", + "The name of the city to get weather for, e.g. " + + "\"San Francisco\". Ask the user if they did not " + + "provide one. Include the state or country if the " + + "city name is ambiguous.", true, null)</pre> + +#### Signature + + + + ```java + public DataMap parameter( + String name, + String paramType, + String description, + boolean required, + List enumValues + ) + ``` + + + + ```java + public DataMap parameter( + String name, + String paramType, + String description, + boolean required + ) + ``` + + + + ```java + public DataMap parameter(String name, String paramType, String description) + ``` + + + +#### Parameters (Overload 1) + + + + + + + + + + + +#### Parameters (Overload 2) + + + + + + + + + +#### Parameters (Overload 3) + + + + + + + +#### Returns (Overload 1) + +`DataMap` + +#### Returns (Overload 2) + +`DataMap` + +#### Returns (Overload 3) + +`DataMap` + +#### Source + +[`src/main/java/com/signalwire/sdk/datamap/DataMap.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/datamap/DataMap.java) + +Line 102. + +*** + +### params + +Set request params for the last added webhook. + +#### Signature + +```java +public DataMap params(Map data) +``` + +#### Parameters + + + +#### Returns + +`DataMap` + +#### Source + +[`src/main/java/com/signalwire/sdk/datamap/DataMap.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/datamap/DataMap.java) + +Line 177. + +*** + +### purpose + +Set the LLM-facing tool description — this is PROMPT ENGINEERING, +not developer documentation. + +<p>The description string is rendered into the OpenAI tool schema +`description` field on every LLM turn. + +The model reads it to +decide WHEN to call this tool. A vague `purpose()` is the #1 +cause of "the model has the right tool but doesn't call it" failures +with data-map tools. + +<h3>Bad vs good</h3> +<pre>: .purpose("weather api") +GOOD: .purpose("Get the current weather conditions and forecast " + + "for a specific city. Use this whenever the user " + + "asks about weather, temperature, rain, or similar " + + "conditions in a named location.")</pre> + +#### Signature + +```java +public DataMap purpose(String description) +``` + +#### Parameters + + + prompt-engineering description of when to call this tool. + + +#### Returns + +`DataMap` + +#### Source + +[`src/main/java/com/signalwire/sdk/datamap/DataMap.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/datamap/DataMap.java) + +Line 68. + +*** + +### toSwaigFunction + +Convert this DataMap to a SWAIG function definition. + +#### Signature + +```java +public Map toSwaigFunction() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/datamap/DataMap.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/datamap/DataMap.java) + +Line 238. + +*** + +### webhook + +Add a webhook API call. + +#### Signature + + + + ```java + public DataMap webhook(String method, String url, Map headers) + ``` + + + + ```java + public DataMap webhook(String method, String url) + ``` + + + +#### Parameters (Overload 1) + + + + + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`DataMap` + +#### Returns (Overload 2) + +`DataMap` + +#### Source + +[`src/main/java/com/signalwire/sdk/datamap/DataMap.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/datamap/DataMap.java) + +Line 148. + +## Source + +[`src/main/java/com/signalwire/sdk/datamap/DataMap.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/datamap/DataMap.java) + +Line 22. diff --git a/fern/products/sdk-reference/java/agents/index.mdx b/fern/products/sdk-reference/java/agents/index.mdx new file mode 100644 index 0000000000..e04bf5a683 --- /dev/null +++ b/fern/products/sdk-reference/java/agents/index.mdx @@ -0,0 +1,46 @@ +--- +slug: "/reference/java/agents" +title: "agents" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "agents" +--- +# `agents` + +## Classes + + + + Fluent builder for creating SWAIG data\_map configurations. <p> DataMap tools execute on SignalWire servers without requiring webhook endpoints. Supports variable expansion: `${args.param`\}, `${response.field`\}, `${global_data.key`\}, `${foreach.item`\}. <p> All methods return `this` for fluent chaining. + + + +## Modules + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/fern/products/sdk-reference/java/agents/pom/index.mdx b/fern/products/sdk-reference/java/agents/pom/index.mdx new file mode 100644 index 0000000000..32a4a3ad22 --- /dev/null +++ b/fern/products/sdk-reference/java/agents/pom/index.mdx @@ -0,0 +1,26 @@ +--- +slug: "/reference/java/agents/pom" +title: "pom" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "com.signalwire.sdk.pom" + parent: "agents" + module: "agents" +--- +# `pom` + +## Signature + +```java +package com.signalwire.sdk.pom +``` + +## Modules + + + + diff --git a/fern/products/sdk-reference/java/agents/pom/pom/index.mdx b/fern/products/sdk-reference/java/agents/pom/pom/index.mdx new file mode 100644 index 0000000000..615db99394 --- /dev/null +++ b/fern/products/sdk-reference/java/agents/pom/pom/index.mdx @@ -0,0 +1,26 @@ +--- +slug: "/reference/java/agents/pom/pom" +title: "pom" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "agents.pom.pom" + parent: "com.signalwire.sdk.pom" + module: "agents.pom" +--- +# `pom` + +## Classes + + + + A structured data format for composing, organising, and rendering prompt instructions for large language models. + + + + Represents a section in the Prompt Object Model. <p>Each section contains a title, optional body text, optional bullet points, and can have any number of nested subsections. + + diff --git a/fern/products/sdk-reference/java/agents/pom/pom/prompt-object-model/index.mdx b/fern/products/sdk-reference/java/agents/pom/pom/prompt-object-model/index.mdx new file mode 100644 index 0000000000..3a8e69479b --- /dev/null +++ b/fern/products/sdk-reference/java/agents/pom/pom/prompt-object-model/index.mdx @@ -0,0 +1,536 @@ +--- +slug: "/reference/java/agents/pom/pom/prompt-object-model" +title: "PromptObjectModel" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.pom.PromptObjectModel" + parent: "agents.pom.pom" + module: "agents.pom.pom" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java" + visibility: "public" +--- +# `PromptObjectModel` + +A structured data format for composing, organising, and rendering prompt +instructions for large language models. + +Java port of the Python reference +`signalwire.pom.pom.PromptObjectModel` (signalwire-python: +`pom/pom.py`). + +<p>The Prompt Object Model provides a tree-based representation of a prompt +document composed of nested `Section`s. Each section can include a +title, body text, bullet points, and arbitrarily nested subsections. + +<p>Idiom mapping: +<ul> + <li>Python `to_dict()` ↔ Java `#toMap()` (returns + `List<Map<String,Object>>`)</li> + <li>Python `from_json(str|dict)` ↔ Java `#fromJson(String)` + and `#fromJsonMap(List)`</li> + <li>Python `from_yaml(str|dict)` ↔ Java `#fromYaml(String)` + and `#fromYamlMap(List)`</li> +</ul> + +## Signature + +```java +public class PromptObjectModel +``` + +## Methods + +### \ + +Empty model (Python parity: `PromptObjectModel()` with debug=False). + +#### Signature + + + + ```java + public () + ``` + + + + ```java + public (boolean debug) + ``` + + + + ```java + public (List> data) + ``` + + + +#### Parameters (Overload 2) + + + +#### Parameters (Overload 3) + + + list of section maps (each entry is one top-level section) + + +#### Source + +[`src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java) + +Line 47. + +*** + +### addPomAsSubsection + +Add another POM's top-level sections as subsections of an existing +section. + +Mirrors Python pom) where +`target` is either a title (String) or a `Section`. + +#### Signature + +```java +public void addPomAsSubsection(Object target, PromptObjectModel pomToAdd) +``` + +#### Parameters + + + + + +#### Throws + +- `IllegalArgumentException` — when `target` is not a String or `Section`, or when the title is not found + +#### Source + +[`src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java) + +Line 200. + +*** + +### addSection + +Add a top-level section. + +Mirrors Python `add_section(...)`. + +#### Signature + + + + ```java + public Section addSection( + String title, + String body, + List bullets, + Boolean numbered, + boolean numberedBullets + ) + ``` + + + + ```java + public Section addSection(String title) + ``` + + + + ```java + public Section addSection(String title, String body) + ``` + + + + ```java + public Section addSection(String title, String body, List bullets) + ``` + + + +#### Parameters (Overload 1) + + + + + + + + + + + +#### Parameters (Overload 2) + + + +#### Parameters (Overload 3) + + + + + +#### Parameters (Overload 4) + + + + + + + +#### Returns (Overload 1) + +`Section` — the newly created `Section` + +#### Returns (Overload 2) + +`Section` + +#### Returns (Overload 3) + +`Section` + +#### Returns (Overload 4) + +`Section` + +#### Throws + +- `IllegalArgumentException` — if a null-title section is added after the first section + +#### Source + +[`src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java) + +Line 144. + +*** + +### findSection + +Recursively search for a section with the given title. + +Mirrors Python +`find_section(title)`. + +#### Signature + +```java +public Optional
findSection(String title) +``` + +#### Parameters + + + +#### Returns + +`Optional
` + +#### Source + +[`src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java) + +Line 175. + +*** + +### fromJson + +Parse a JSON string into a model. + +Mirrors Python +`PromptObjectModel.from_json(str)`. + +**Modifiers:** `static` + +#### Signature + +```java +public static PromptObjectModel fromJson(String json) +``` + +#### Parameters + + + +#### Returns + +`PromptObjectModel` + +#### Source + +[`src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java) + +Line 87. + +*** + +### fromJsonMap + +Build a model from an already-parsed list-of-maps. + +Mirrors Python's +dict-input branch of `from_json`. + +**Modifiers:** `static` + +#### Signature + +```java +public static PromptObjectModel fromJsonMap(List> data) +``` + +#### Parameters + + + +#### Returns + +`PromptObjectModel` + +#### Source + +[`src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java) + +Line 99. + +*** + +### fromYaml + +Parse a YAML string into a model. + +Mirrors Python `from_yaml(str)`. + +**Modifiers:** `static` + +#### Signature + +```java +public static PromptObjectModel fromYaml(String yaml) +``` + +#### Parameters + + + +#### Returns + +`PromptObjectModel` + +#### Source + +[`src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java) + +Line 108. + +*** + +### fromYamlMap + +Build a model from an already-parsed list-of-maps (YAML form). +Mirrors Python's dict-input branch of `from_yaml`. + +**Modifiers:** `static` + +#### Signature + +```java +public static PromptObjectModel fromYamlMap(List> data) +``` + +#### Parameters + + + +#### Returns + +`PromptObjectModel` + +#### Source + +[`src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java) + +Line 129. + +*** + +### getSections + +#### Signature + +```java +public List
getSections() +``` + +#### Returns + +`List
` + +#### Source + +[`src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java) + +Line 71. + +*** + +### isDebug + +#### Signature + +```java +public boolean isDebug() +``` + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java) + +Line 75. + +*** + +### renderMarkdown + +Render the entire model as Markdown. + +Mirrors Python `render_markdown()`. + +#### Signature + +```java +public String renderMarkdown() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java) + +Line 256. + +*** + +### renderXml + +Render the entire model as XML. + +Mirrors Python `render_xml()`. + +#### Signature + +```java +public String renderXml() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java) + +Line 285. + +*** + +### toJson + +Convert to a JSON string with 2-space indent. + +Mirrors Python `to_json`. + +#### Signature + +```java +public String toJson() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java) + +Line 235. + +*** + +### toMap + +Convert the entire model to a list of maps. + +Mirrors Python +`to_dict()` (named `toMap` here because the Java return +type is `List>`). + +#### Signature + +```java +public List> toMap() +``` + +#### Returns + +`List>` + +#### Source + +[`src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java) + +Line 226. + +*** + +### toYaml + +Convert to a YAML string. + +Output matches Python's +default\_flow\_style=False, sort\_keys=False). + +#### Signature + +```java +public String toYaml() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java) + +Line 243. + +## Source + +[`src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java) + +Line 37. diff --git a/fern/products/sdk-reference/java/agents/pom/pom/section/index.mdx b/fern/products/sdk-reference/java/agents/pom/pom/section/index.mdx new file mode 100644 index 0000000000..945dcbf2c2 --- /dev/null +++ b/fern/products/sdk-reference/java/agents/pom/pom/section/index.mdx @@ -0,0 +1,532 @@ +--- +slug: "/reference/java/agents/pom/pom/section" +title: "Section" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.pom.Section" + parent: "agents.pom.pom" + module: "agents.pom.pom" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/Section.java" + visibility: "public" +--- +# `Section` + +Represents a section in the Prompt Object Model. + +<p>Each section contains a title, optional body text, optional bullet points, +and can have any number of nested subsections. + +Mirrors the Python reference +`signalwire.pom.pom.Section` (see signalwire-python: pom/pom.py). + +<p>Idiom mapping: +<ul> + <li>Python `to_dict()` ↔ Java `#toMap()` (returns + `Map<String,Object>`)</li> + <li>Python section_number) ↔ Java + java.util.List)</li> + <li>Python section_number) ↔ Java + java.util.List)</li> +</ul> + +<p>Output format is byte-identical to Python's renderer so cross-port POMs +can round-trip through markdown/XML/JSON. + +## Signature + +```java +public class Section +``` + +## Methods + +### \ + +Construct a section. + +All parameters except `title` default to +empty/null. Mirrors Python's keyword-only constructor. + +#### Signature + + + + ```java + public ( + String title, + String body, + List bullets, + Boolean numbered, + boolean numberedBullets + ) + ``` + + + + ```java + public (String title) + ``` + + + + ```java + public (String title, String body) + ``` + + + + ```java + public (String title, String body, List bullets) + ``` + + + +#### Parameters (Overload 1) + + + section title (may be `null` for an unnamed root) + + + + body text (must not be `null`) + + + + bullet points (may be `null` → empty list) + + + + tri-state numbering flag (may be `null`) + + + + when `true`, bullets render as a numbered list + + +#### Parameters (Overload 2) + + + +#### Parameters (Overload 3) + + + + + +#### Parameters (Overload 4) + + + + + + + +#### Throws + +- `NullPointerException` — if `body` is `null` + +#### Source + +[`src/main/java/com/signalwire/sdk/pom/Section.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/Section.java) + +Line 50. + +*** + +### addBody + +Add or replace the body text for this section. + +Mirrors Python +`Section.add_body`. + +#### Signature + +```java +public void addBody(String body) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/pom/Section.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/Section.java) + +Line 103. + +*** + +### addBullets + +Append bullet points to this section. + +Mirrors Python +`Section.add_bullets` (which extends, not replaces). + +#### Signature + +```java +public void addBullets(List bullets) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/pom/Section.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/Section.java) + +Line 111. + +*** + +### addSubsection + +Add a subsection to this section. + +Mirrors Python +`Section.add_subsection`. Subsections must have a title. + +#### Signature + + + + ```java + public Section addSubsection( + String title, + String body, + List bullets, + Boolean numbered, + boolean numberedBullets + ) + ``` + + + + ```java + public Section addSubsection(String title) + ``` + + + + ```java + public Section addSubsection(String title, String body) + ``` + + + + ```java + public Section addSubsection(String title, String body, List bullets) + ``` + + + +#### Parameters (Overload 1) + + + + + + + + + + + +#### Parameters (Overload 2) + + + +#### Parameters (Overload 3) + + + + + +#### Parameters (Overload 4) + + + + + + + +#### Returns (Overload 1) + +`Section` — the newly created sub-`Section` + +#### Returns (Overload 2) + +`Section` + +#### Returns (Overload 3) + +`Section` + +#### Returns (Overload 4) + +`Section` + +#### Throws + +- `IllegalArgumentException` — if `title` is `null` + +#### Source + +[`src/main/java/com/signalwire/sdk/pom/Section.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/Section.java) + +Line 123. + +*** + +### getBody + +#### Signature + +```java +public String getBody() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/pom/Section.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/Section.java) + +Line 79. + +*** + +### getBullets + +#### Signature + +```java +public List getBullets() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/pom/Section.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/Section.java) + +Line 83. + +*** + +### getNumbered + +#### Signature + +```java +public Boolean getNumbered() +``` + +#### Returns + +`Boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/pom/Section.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/Section.java) + +Line 91. + +*** + +### getSubsections + +#### Signature + +```java +public List
getSubsections() +``` + +#### Returns + +`List
` + +#### Source + +[`src/main/java/com/signalwire/sdk/pom/Section.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/Section.java) + +Line 87. + +*** + +### getTitle + +#### Signature + +```java +public String getTitle() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/pom/Section.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/Section.java) + +Line 75. + +*** + +### isNumberedBullets + +#### Signature + +```java +public boolean isNumberedBullets() +``` + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/pom/Section.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/Section.java) + +Line 95. + +*** + +### renderMarkdown + +Render this section and its subsections as Markdown. + +Mirrors Python +`Section.render_markdown`. + +#### Signature + + + + ```java + public String renderMarkdown(int level, List sectionNumber) + ``` + + + + ```java + public String renderMarkdown() + ``` + + + +#### Parameters (Overload 1) + + + heading level (default 2 → "##") + + + + current numbering breadcrumb (may be `null`) + + +#### Returns (Overload 1) + +`String` + +#### Returns (Overload 2) + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/pom/Section.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/Section.java) + +Line 188. + +*** + +### renderXml + +Render this section and its subsections as XML. + +Mirrors Python +`Section.render_xml`. + +#### Signature + + + + ```java + public String renderXml(int indent, List sectionNumber) + ``` + + + + ```java + public String renderXml() + ``` + + + +#### Parameters (Overload 1) + + + + + +#### Returns (Overload 1) + +`String` + +#### Returns (Overload 2) + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/pom/Section.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/Section.java) + +Line 259. + +*** + +### toMap + +Convert this section to an ordered `Map` for JSON / YAML +serialisation. + +Mirrors Python `Section.to_dict`: keys appear in +the same order (title, body, bullets, subsections, numbered, +numberedBullets) and empty/false values are omitted. + +#### Signature + +```java +public Map toMap() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/pom/Section.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/Section.java) + +Line 154. + +## Source + +[`src/main/java/com/signalwire/sdk/pom/Section.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/Section.java) + +Line 29. diff --git a/fern/products/sdk-reference/java/agents/prefabs/index.mdx b/fern/products/sdk-reference/java/agents/prefabs/index.mdx new file mode 100644 index 0000000000..f12a482c34 --- /dev/null +++ b/fern/products/sdk-reference/java/agents/prefabs/index.mdx @@ -0,0 +1,26 @@ +--- +slug: "/reference/java/agents/prefabs" +title: "prefabs" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "com.signalwire.sdk.prefabs" + parent: "agents" + module: "agents" +--- +# `prefabs` + +## Signature + +```java +package com.signalwire.sdk.prefabs +``` + +## Modules + + + + diff --git a/fern/products/sdk-reference/java/agents/prefabs/prefabs/concierge-agent/index.mdx b/fern/products/sdk-reference/java/agents/prefabs/prefabs/concierge-agent/index.mdx new file mode 100644 index 0000000000..e4fcdad016 --- /dev/null +++ b/fern/products/sdk-reference/java/agents/prefabs/prefabs/concierge-agent/index.mdx @@ -0,0 +1,186 @@ +--- +slug: "/reference/java/agents/prefabs/prefabs/concierge-agent" +title: "ConciergeAgent" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.prefabs.ConciergeAgent" + parent: "agents.prefabs.prefabs" + module: "agents.prefabs.prefabs" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/ConciergeAgent.java" + visibility: "public" +--- +# `ConciergeAgent` + +Pre-built agent for venue concierge with amenity info and availability checking. + +## Signature + +```java +public class ConciergeAgent +``` + +## Methods + +### \ + +#### Signature + + + + ```java + public ( + String name, + String venueName, + List> amenities + ) + ``` + + + + ```java + public ( + String name, + String venueName, + List> amenities, + String route, + int port + ) + ``` + + + +#### Parameters (Overload 1) + + + + + + + +#### Parameters (Overload 2) + + + + + + + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/prefabs/ConciergeAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/ConciergeAgent.java) + +Line 16. + +*** + +### amenity + +**Modifiers:** `static` + +#### Signature + +```java +public static Map amenity( + String name, + String description, + String hours, + String location, + String price +) +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/prefabs/ConciergeAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/ConciergeAgent.java) + +Line 120. + +*** + +### getAgent + +#### Signature + +```java +public AgentBase getAgent() +``` + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/prefabs/ConciergeAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/ConciergeAgent.java) + +Line 116. + +*** + +### run + +#### Signature + +```java +public void run() +``` + +#### Throws + +- `Exception` + +#### Source + +[`src/main/java/com/signalwire/sdk/prefabs/ConciergeAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/ConciergeAgent.java) + +Line 118. + +*** + +### serve + +#### Signature + +```java +public void serve() +``` + +#### Throws + +- `Exception` + +#### Source + +[`src/main/java/com/signalwire/sdk/prefabs/ConciergeAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/ConciergeAgent.java) + +Line 117. + +## Source + +[`src/main/java/com/signalwire/sdk/prefabs/ConciergeAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/ConciergeAgent.java) + +Line 12. diff --git a/fern/products/sdk-reference/java/agents/prefabs/prefabs/faq-bot-agent/index.mdx b/fern/products/sdk-reference/java/agents/prefabs/prefabs/faq-bot-agent/index.mdx new file mode 100644 index 0000000000..925a871a20 --- /dev/null +++ b/fern/products/sdk-reference/java/agents/prefabs/prefabs/faq-bot-agent/index.mdx @@ -0,0 +1,171 @@ +--- +slug: "/reference/java/agents/prefabs/prefabs/faq-bot-agent" +title: "FAQBotAgent" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.prefabs.FAQBotAgent" + parent: "agents.prefabs.prefabs" + module: "agents.prefabs.prefabs" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/FAQBotAgent.java" + visibility: "public" +--- +# `FAQBotAgent` + +Pre-built agent for keyword-based FAQ matching with optional related suggestions. + +## Signature + +```java +public class FAQBotAgent +``` + +## Methods + +### \ + +#### Signature + + + + ```java + public (String name, List> faqs) + ``` + + + + ```java + public ( + String name, + List> faqs, + String route, + int port + ) + ``` + + + +#### Parameters (Overload 1) + + + + + +#### Parameters (Overload 2) + + + + + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/prefabs/FAQBotAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/FAQBotAgent.java) + +Line 16. + +*** + +### faq + +**Modifiers:** `static` + +#### Signature + +```java +public static Map faq( + String question, + String answer, + List keywords +) +``` + +#### Parameters + + + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/prefabs/FAQBotAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/FAQBotAgent.java) + +Line 115. + +*** + +### getAgent + +#### Signature + +```java +public AgentBase getAgent() +``` + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/prefabs/FAQBotAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/FAQBotAgent.java) + +Line 111. + +*** + +### run + +#### Signature + +```java +public void run() +``` + +#### Throws + +- `Exception` + +#### Source + +[`src/main/java/com/signalwire/sdk/prefabs/FAQBotAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/FAQBotAgent.java) + +Line 113. + +*** + +### serve + +#### Signature + +```java +public void serve() +``` + +#### Throws + +- `Exception` + +#### Source + +[`src/main/java/com/signalwire/sdk/prefabs/FAQBotAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/FAQBotAgent.java) + +Line 112. + +## Source + +[`src/main/java/com/signalwire/sdk/prefabs/FAQBotAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/FAQBotAgent.java) + +Line 12. diff --git a/fern/products/sdk-reference/java/agents/prefabs/prefabs/index.mdx b/fern/products/sdk-reference/java/agents/prefabs/prefabs/index.mdx new file mode 100644 index 0000000000..7595d6ffd2 --- /dev/null +++ b/fern/products/sdk-reference/java/agents/prefabs/prefabs/index.mdx @@ -0,0 +1,38 @@ +--- +slug: "/reference/java/agents/prefabs/prefabs" +title: "prefabs" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "agents.prefabs.prefabs" + parent: "com.signalwire.sdk.prefabs" + module: "agents.prefabs" +--- +# `prefabs` + +## Classes + + + + Pre-built agent for venue concierge with amenity info and availability checking. + + + + Pre-built agent for keyword-based FAQ matching with optional related suggestions. + + + + Pre-built agent for sequential question collection with key/value answers. Wraps the info\_gatherer skill with agent-level configuration. + + + + Pre-built agent for department routing with call transfer. Routes callers to appropriate departments via phone numbers or SWML URLs. + + + + Pre-built agent for conducting typed surveys. Supports rating, multiple\_choice, yes\_no, and open\_ended question types. + + diff --git a/fern/products/sdk-reference/java/agents/prefabs/prefabs/info-gatherer-agent/index.mdx b/fern/products/sdk-reference/java/agents/prefabs/prefabs/info-gatherer-agent/index.mdx new file mode 100644 index 0000000000..141f7f9769 --- /dev/null +++ b/fern/products/sdk-reference/java/agents/prefabs/prefabs/info-gatherer-agent/index.mdx @@ -0,0 +1,197 @@ +--- +slug: "/reference/java/agents/prefabs/prefabs/info-gatherer-agent" +title: "InfoGathererAgent" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.prefabs.InfoGathererAgent" + parent: "agents.prefabs.prefabs" + module: "agents.prefabs.prefabs" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/InfoGathererAgent.java" + visibility: "public" +--- +# `InfoGathererAgent` + +Pre-built agent for sequential question collection with key/value answers. +Wraps the info\_gatherer skill with agent-level configuration. + +## Signature + +```java +public class InfoGathererAgent +``` + +## Methods + +### \ + +#### Signature + + + + ```java + public (String name, List> questions) + ``` + + + + ```java + public ( + String name, + List> questions, + String route, + int port + ) + ``` + + + +#### Parameters (Overload 1) + + + + + +#### Parameters (Overload 2) + + + + + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/prefabs/InfoGathererAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/InfoGathererAgent.java) + +Line 15. + +*** + +### getAgent + +#### Signature + +```java +public AgentBase getAgent() +``` + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/prefabs/InfoGathererAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/InfoGathererAgent.java) + +Line 42. + +*** + +### question + +Convenience builder for questions. + +**Modifiers:** `static` + +#### Signature + + + + ```java + public static Map question(String keyName, String questionText) + ``` + + + + ```java + public static Map question( + String keyName, + String questionText, + boolean confirm, + String promptAdd + ) + ``` + + + +#### Parameters (Overload 1) + + + + + +#### Parameters (Overload 2) + + + + + + + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/prefabs/InfoGathererAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/InfoGathererAgent.java) + +Line 57. + +*** + +### run + +#### Signature + +```java +public void run() +``` + +#### Throws + +- `Exception` + +#### Source + +[`src/main/java/com/signalwire/sdk/prefabs/InfoGathererAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/InfoGathererAgent.java) + +Line 50. + +*** + +### serve + +#### Signature + +```java +public void serve() +``` + +#### Throws + +- `Exception` + +#### Source + +[`src/main/java/com/signalwire/sdk/prefabs/InfoGathererAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/InfoGathererAgent.java) + +Line 46. + +## Source + +[`src/main/java/com/signalwire/sdk/prefabs/InfoGathererAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/InfoGathererAgent.java) + +Line 11. diff --git a/fern/products/sdk-reference/java/agents/prefabs/prefabs/receptionist-agent/index.mdx b/fern/products/sdk-reference/java/agents/prefabs/prefabs/receptionist-agent/index.mdx new file mode 100644 index 0000000000..ac37c7f75b --- /dev/null +++ b/fern/products/sdk-reference/java/agents/prefabs/prefabs/receptionist-agent/index.mdx @@ -0,0 +1,213 @@ +--- +slug: "/reference/java/agents/prefabs/prefabs/receptionist-agent" +title: "ReceptionistAgent" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.prefabs.ReceptionistAgent" + parent: "agents.prefabs.prefabs" + module: "agents.prefabs.prefabs" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/ReceptionistAgent.java" + visibility: "public" +--- +# `ReceptionistAgent` + +Pre-built agent for department routing with call transfer. +Routes callers to appropriate departments via phone numbers or SWML URLs. + +## Signature + +```java +public class ReceptionistAgent +``` + +## Methods + +### \ + +#### Signature + + + + ```java + public ( + String name, + String greeting, + Map> departments + ) + ``` + + + + ```java + public ( + String name, + String greeting, + Map> departments, + String route, + int port + ) + ``` + + + +#### Parameters (Overload 1) + + + + + + + +#### Parameters (Overload 2) + + + + + + + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/prefabs/ReceptionistAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/ReceptionistAgent.java) + +Line 15. + +*** + +### getAgent + +#### Signature + +```java +public AgentBase getAgent() +``` + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/prefabs/ReceptionistAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/ReceptionistAgent.java) + +Line 59. + +*** + +### phoneDepartment + +Create a phone-based department config. + +**Modifiers:** `static` + +#### Signature + +```java +public static Map phoneDepartment( + String description, + String phoneNumber +) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/prefabs/ReceptionistAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/ReceptionistAgent.java) + +Line 66. + +*** + +### run + +#### Signature + +```java +public void run() +``` + +#### Throws + +- `Exception` + +#### Source + +[`src/main/java/com/signalwire/sdk/prefabs/ReceptionistAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/ReceptionistAgent.java) + +Line 61. + +*** + +### serve + +#### Signature + +```java +public void serve() +``` + +#### Throws + +- `Exception` + +#### Source + +[`src/main/java/com/signalwire/sdk/prefabs/ReceptionistAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/ReceptionistAgent.java) + +Line 60. + +*** + +### swmlDepartment + +Create a SWML-based department config. + +**Modifiers:** `static` + +#### Signature + +```java +public static Map swmlDepartment( + String description, + String swmlUrl +) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/prefabs/ReceptionistAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/ReceptionistAgent.java) + +Line 77. + +## Source + +[`src/main/java/com/signalwire/sdk/prefabs/ReceptionistAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/ReceptionistAgent.java) + +Line 11. diff --git a/fern/products/sdk-reference/java/agents/prefabs/prefabs/survey-agent/index.mdx b/fern/products/sdk-reference/java/agents/prefabs/prefabs/survey-agent/index.mdx new file mode 100644 index 0000000000..e65275059f --- /dev/null +++ b/fern/products/sdk-reference/java/agents/prefabs/prefabs/survey-agent/index.mdx @@ -0,0 +1,258 @@ +--- +slug: "/reference/java/agents/prefabs/prefabs/survey-agent" +title: "SurveyAgent" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.prefabs.SurveyAgent" + parent: "agents.prefabs.prefabs" + module: "agents.prefabs.prefabs" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/SurveyAgent.java" + visibility: "public" +--- +# `SurveyAgent` + +Pre-built agent for conducting typed surveys. +Supports rating, multiple\_choice, yes\_no, and open\_ended question types. + +## Signature + +```java +public class SurveyAgent +``` + +## Methods + +### \ + +#### Signature + + + + ```java + public (String name, List> questions) + ``` + + + + ```java + public ( + String name, + List> questions, + String completionMessage, + String route, + int port + ) + ``` + + + +#### Parameters (Overload 1) + + + + + +#### Parameters (Overload 2) + + + + + + + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/prefabs/SurveyAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/SurveyAgent.java) + +Line 19. + +*** + +### getAgent + +#### Signature + +```java +public AgentBase getAgent() +``` + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/prefabs/SurveyAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/SurveyAgent.java) + +Line 167. + +*** + +### multipleChoiceQuestion + +**Modifiers:** `static` + +#### Signature + +```java +public static Map multipleChoiceQuestion( + String question, + List options +) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/prefabs/SurveyAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/SurveyAgent.java) + +Line 175. + +*** + +### openEndedQuestion + +**Modifiers:** `static` + +#### Signature + +```java +public static Map openEndedQuestion(String question) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/prefabs/SurveyAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/SurveyAgent.java) + +Line 183. + +*** + +### ratingQuestion + +**Modifiers:** `static` + +#### Signature + +```java +public static Map ratingQuestion( + String question, + int min, + int max +) +``` + +#### Parameters + + + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/prefabs/SurveyAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/SurveyAgent.java) + +Line 171. + +*** + +### run + +#### Signature + +```java +public void run() +``` + +#### Throws + +- `Exception` + +#### Source + +[`src/main/java/com/signalwire/sdk/prefabs/SurveyAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/SurveyAgent.java) + +Line 169. + +*** + +### serve + +#### Signature + +```java +public void serve() +``` + +#### Throws + +- `Exception` + +#### Source + +[`src/main/java/com/signalwire/sdk/prefabs/SurveyAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/SurveyAgent.java) + +Line 168. + +*** + +### yesNoQuestion + +**Modifiers:** `static` + +#### Signature + +```java +public static Map yesNoQuestion(String question) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/prefabs/SurveyAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/SurveyAgent.java) + +Line 179. + +## Source + +[`src/main/java/com/signalwire/sdk/prefabs/SurveyAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/SurveyAgent.java) + +Line 13. diff --git a/fern/products/sdk-reference/java/agents/runtime/index.mdx b/fern/products/sdk-reference/java/agents/runtime/index.mdx new file mode 100644 index 0000000000..d08c0920de --- /dev/null +++ b/fern/products/sdk-reference/java/agents/runtime/index.mdx @@ -0,0 +1,28 @@ +--- +slug: "/reference/java/agents/runtime" +title: "runtime" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "com.signalwire.sdk.runtime" + parent: "agents" + module: "agents" +--- +# `runtime` + +## Signature + +```java +package com.signalwire.sdk.runtime +``` + +## Modules + + + + + + diff --git a/fern/products/sdk-reference/java/agents/runtime/lambda/index.mdx b/fern/products/sdk-reference/java/agents/runtime/lambda/index.mdx new file mode 100644 index 0000000000..3e9c6c4bd2 --- /dev/null +++ b/fern/products/sdk-reference/java/agents/runtime/lambda/index.mdx @@ -0,0 +1,20 @@ +--- +slug: "/reference/java/agents/runtime/lambda" +title: "lambda" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "agents.runtime.lambda" + parent: "com.signalwire.sdk.runtime" + module: "agents.runtime" +--- +# `lambda` + +## Modules + + + + diff --git a/fern/products/sdk-reference/java/agents/runtime/lambda/lambda/index.mdx b/fern/products/sdk-reference/java/agents/runtime/lambda/lambda/index.mdx new file mode 100644 index 0000000000..4cb8dfc60d --- /dev/null +++ b/fern/products/sdk-reference/java/agents/runtime/lambda/lambda/index.mdx @@ -0,0 +1,32 @@ +--- +slug: "/reference/java/agents/runtime/lambda/lambda" +title: "lambda" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "com.signalwire.sdk.runtime.lambda" + parent: "agents.runtime.lambda" + module: "agents.runtime.lambda" +--- +# `lambda` + +## Signature + +```java +package com.signalwire.sdk.runtime.lambda +``` + +## Classes + + + + AWS Lambda adapter for a SignalWire `AgentBase`. <p>Translates API Gateway (REST v1 or HTTP v2) / Lambda Function URL events into the same dispatch logic the in-process HTTP server uses, without depending on the `aws-lambda-java-events` typed models at runtime (the handler accepts plain Object> so the SDK stays dependency-light). <p><b>Usage</b> — in your Lambda handler class: <pre>class MyHandler implements RequestHandler\, Map\> \{ private final LambdaAgentHandler delegate; public MyHandler() \{ AgentBase agent = AgentBase.builder() .name("my-agent") .route("/") .build(); agent.setPromptText("You are helpful."); this.delegate = new LambdaAgentHandler(agent); public Map\ handleRequest(Map\ event, Context ctx) \{ return delegate.handle(event).toMap(); \} \} \}</pre> <p>The adapter dispatches based on the request path and the agent's configured route: <ul> <li>/<route> → returns rendered SWML</li> <li>/<route>/swaig → executes the named SWAIG tool</li> <li>/<route>/post\_prompt → invokes the summary callback</li> <li>/<route>/mcp → JSON-RPC 2.0 (if MCP enabled)</li> <li>/health, `/ready` → health probes</li> </ul> <p>All webhook URLs generated inside the SWML document are built from the Lambda's Function URL (via `LambdaUrlResolver`) or the `SWML_PROXY_URL_BASE` override, with the agent's route always layered on top. + + + + Response shape returned by `LambdaAgentHandler` and compatible with AWS API Gateway (REST v1 and HTTP v2) and Lambda Function URL response envelopes. <p>The fields map 1:1 to `APIGatewayProxyResponseEvent`: `statusCode`, `headers`, `body`, `isBase64Encoded`. + + diff --git a/fern/products/sdk-reference/java/agents/runtime/lambda/lambda/lambda-agent-handler/index.mdx b/fern/products/sdk-reference/java/agents/runtime/lambda/lambda/lambda-agent-handler/index.mdx new file mode 100644 index 0000000000..2fa9d37e1c --- /dev/null +++ b/fern/products/sdk-reference/java/agents/runtime/lambda/lambda/lambda-agent-handler/index.mdx @@ -0,0 +1,150 @@ +--- +slug: "/reference/java/agents/runtime/lambda/lambda/lambda-agent-handler" +title: "LambdaAgentHandler" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.runtime.lambda.LambdaAgentHandler" + parent: "com.signalwire.sdk.runtime.lambda" + module: "agents.runtime.lambda.lambda" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/lambda/LambdaAgentHandler.java" + visibility: "public" +--- +# `LambdaAgentHandler` + +AWS Lambda adapter for a SignalWire `AgentBase`. + +<p>Translates API Gateway (REST v1 or HTTP v2) / Lambda Function URL +events into the same dispatch logic the in-process HTTP server uses, +without depending on the `aws-lambda-java-events` typed models +at runtime (the handler accepts plain Object> so +the SDK stays dependency-light). + +<p><b>Usage</b> — in your Lambda handler class: +<pre>class MyHandler implements RequestHandler<Map<String, Object>, Map<String, Object>> { + private final LambdaAgentHandler delegate; + +``` +public MyHandler() { + AgentBase agent = AgentBase.builder() + .name("my-agent") + .route("/") + .build(); + agent.setPromptText("You are helpful."); + this.delegate = new LambdaAgentHandler(agent); + +public Map handleRequest(Map event, Context ctx) { + return delegate.handle(event).toMap(); +} +``` + +\} +\}</pre> + +<p>The adapter dispatches based on the request path and the agent's +configured route: +<ul> + <li>/<route> → returns rendered SWML</li> + <li>/<route>/swaig → executes the named SWAIG tool</li> + <li>/<route>/post_prompt → invokes the summary callback</li> + <li>/<route>/mcp → JSON-RPC 2.0 (if MCP enabled)</li> + <li>/health, `/ready` → health probes</li> +</ul> + +<p>All webhook URLs generated inside the SWML document are built from +the Lambda's Function URL (via `LambdaUrlResolver`) or the +`SWML_PROXY_URL_BASE` override, with the agent's route always +layered on top. + +This is the same invariant the HTTP server path +enforces. + +**Modifiers:** `final` + +## Signature + +```java +public final class LambdaAgentHandler +``` + +## Methods + +### \ + +Create a handler for the given agent using the real process +environment. + +#### Signature + + + + ```java + public (AgentBase agent) + ``` + + + + ```java + public (AgentBase agent, EnvProvider env) + ``` + + + +#### Parameters (Overload 1) + + + the configured agent. + + +#### Parameters (Overload 2) + + + the configured agent. + + + + environment variable source. + + +#### Source + +[`src/main/java/com/signalwire/sdk/runtime/lambda/LambdaAgentHandler.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/lambda/LambdaAgentHandler.java) + +Line 80. + +*** + +### handle + +Handle a single invocation. + +#### Signature + +```java +public LambdaResponse handle(Map event) +``` + +#### Parameters + + + the raw Lambda event (API Gateway v1, v2, or Function URL payload). Null events are treated as a root GET. + + +#### Returns + +`LambdaResponse` — response envelope ready to convert to `APIGatewayProxyResponseEvent` or equivalent. + +#### Source + +[`src/main/java/com/signalwire/sdk/runtime/lambda/LambdaAgentHandler.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/lambda/LambdaAgentHandler.java) + +Line 106. + +## Source + +[`src/main/java/com/signalwire/sdk/runtime/lambda/LambdaAgentHandler.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/lambda/LambdaAgentHandler.java) + +Line 65. diff --git a/fern/products/sdk-reference/java/agents/runtime/lambda/lambda/lambda-response/index.mdx b/fern/products/sdk-reference/java/agents/runtime/lambda/lambda/lambda-response/index.mdx new file mode 100644 index 0000000000..56ca1aa53e --- /dev/null +++ b/fern/products/sdk-reference/java/agents/runtime/lambda/lambda/lambda-response/index.mdx @@ -0,0 +1,241 @@ +--- +slug: "/reference/java/agents/runtime/lambda/lambda/lambda-response" +title: "LambdaResponse" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.runtime.lambda.LambdaResponse" + parent: "com.signalwire.sdk.runtime.lambda" + module: "agents.runtime.lambda.lambda" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/lambda/LambdaResponse.java" + visibility: "public" +--- +# `LambdaResponse` + +Response shape returned by `LambdaAgentHandler` and compatible +with AWS API Gateway (REST v1 and HTTP v2) and Lambda Function URL +response envelopes. + +<p>The fields map 1:1 to `APIGatewayProxyResponseEvent`: +`statusCode`, `headers`, `body`, +`isBase64Encoded`. + +Returned as a plain `Map` so the SDK +does not require a runtime dependency on `aws-lambda-java-events`. +Users who want the typed variant can trivially copy the fields over. + +**Modifiers:** `final` + +## Signature + +```java +public final class LambdaResponse +``` + +## Methods + +### \ + +Create a Lambda response with the given fields. + +#### Signature + +```java +public ( + int statusCode, + Map headers, + String body, + boolean isBase64Encoded +) +``` + +#### Parameters + + + HTTP status code. + + + + response headers (must not be null — pass an empty map for no headers). + + + + raw response body as a string. + + + + whether the body is base64-encoded binary. + + +#### Source + +[`src/main/java/com/signalwire/sdk/runtime/lambda/LambdaResponse.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/lambda/LambdaResponse.java) + +Line 33. + +*** + +### getBody + +#### Signature + +```java +public String getBody() +``` + +#### Returns + +`String` — response body. + +#### Source + +[`src/main/java/com/signalwire/sdk/runtime/lambda/LambdaResponse.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/lambda/LambdaResponse.java) + +Line 48. + +*** + +### getHeaders + +#### Signature + +```java +public Map getHeaders() +``` + +#### Returns + +`Map` — response headers. + +#### Source + +[`src/main/java/com/signalwire/sdk/runtime/lambda/LambdaResponse.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/lambda/LambdaResponse.java) + +Line 45. + +*** + +### getStatusCode + +#### Signature + +```java +public int getStatusCode() +``` + +#### Returns + +`int` — HTTP status code. + +#### Source + +[`src/main/java/com/signalwire/sdk/runtime/lambda/LambdaResponse.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/lambda/LambdaResponse.java) + +Line 42. + +*** + +### isBase64Encoded + +#### Signature + +```java +public boolean isBase64Encoded() +``` + +#### Returns + +`boolean` — whether the body is base64-encoded. + +#### Source + +[`src/main/java/com/signalwire/sdk/runtime/lambda/LambdaResponse.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/lambda/LambdaResponse.java) + +Line 51. + +*** + +### json + +Convenience builder for a 200 JSON response. + +**Modifiers:** `static` + +#### Signature + + + + ```java + public static LambdaResponse json(String body) + ``` + + + + ```java + public static LambdaResponse json(int statusCode, String body) + ``` + + + +#### Parameters (Overload 1) + + + raw JSON string. + + +#### Parameters (Overload 2) + + + HTTP status. + + + + raw JSON string. + + +#### Returns (Overload 1) + +`LambdaResponse` — LambdaResponse. + +#### Returns (Overload 2) + +`LambdaResponse` — LambdaResponse. + +#### Source + +[`src/main/java/com/signalwire/sdk/runtime/lambda/LambdaResponse.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/lambda/LambdaResponse.java) + +Line 75. + +*** + +### toMap + +Serialise this response into the AWS Lambda Function URL / +API Gateway payload format (v1 and v2 are structurally identical +for response shape). + +#### Signature + +```java +public Map toMap() +``` + +#### Returns + +`Map` — a Map suitable for returning from a Lambda handler. + +#### Source + +[`src/main/java/com/signalwire/sdk/runtime/lambda/LambdaResponse.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/lambda/LambdaResponse.java) + +Line 60. + +## Source + +[`src/main/java/com/signalwire/sdk/runtime/lambda/LambdaResponse.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/lambda/LambdaResponse.java) + +Line 17. diff --git a/fern/products/sdk-reference/java/agents/runtime/runtime/index.mdx b/fern/products/sdk-reference/java/agents/runtime/runtime/index.mdx new file mode 100644 index 0000000000..d5ffac06c2 --- /dev/null +++ b/fern/products/sdk-reference/java/agents/runtime/runtime/index.mdx @@ -0,0 +1,346 @@ +--- +slug: "/reference/java/agents/runtime/runtime" +title: "runtime" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "agents.runtime.runtime" + parent: "com.signalwire.sdk.runtime" + module: "agents.runtime" +--- +# `runtime` + +## Classes + + + + Resolve the base URL of a SignalWire agent running as an AWS Lambda function, from standard Lambda environment variables. <p>Precedence — highest first: <ol> <li>`AWS_LAMBDA_FUNCTION_URL` — the Function URL explicitly assigned to this Lambda (the only variant that is guaranteed correct; synthetic fallbacks below assume the Function URL service was used and the function name matches the public subdomain, which is typically true but not guaranteed).</li> <li>Synthesised `https://{AWS_LAMBDA_FUNCTION_NAME`.lambda-url.\{AWS\_REGION\}.on.aws\} — built when the Function URL env var is not present but the standard Lambda identity variables are.</li> </ol> <p>This class returns a bare origin (scheme + host). + + + +## Interfaces + +### EnvProvider + +Simple read-only view of process environment variables. + +<p>Extracted as an interface so tests can inject a deterministic map +instead of relying on actual OS environment variables (which Java +cannot mutate at runtime without native hackery). + +<p>The default implementation delegates to `System#getenv(String)`. + +#### Signature + +```java +public interface EnvProvider +``` + +#### Constants + + + Default provider backed by `System#getenv(String)`. + + +#### Methods + +##### get + +Return the value of the given environment variable, or `null` if +it is not set. + +###### Signature + +```java +String get(String name) +``` + +###### Parameters + + + the environment variable name. + + +###### Returns + +`String` — the value, or `null`. + +###### Source + +[`src/main/java/com/signalwire/sdk/runtime/EnvProvider.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/EnvProvider.java) + +Line 22. + +*** + +##### isSet + +Return true iff the env var is set and non-empty. + +**Modifiers:** `default` + +###### Signature + +```java +default boolean isSet(String name) +``` + +###### Parameters + + + the environment variable name. + + +###### Returns + +`boolean` — true if the value is set and non-empty. + +###### Source + +[`src/main/java/com/signalwire/sdk/runtime/EnvProvider.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/EnvProvider.java) + +Line 33. + +#### Source + +[`src/main/java/com/signalwire/sdk/runtime/EnvProvider.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/EnvProvider.java) + +Line 12. + +## Enums + +### ExecutionMode + +Runtime deployment environments the SDK knows about. + +<p>Detected from well-known environment variables set by the hosting +platform. + +Mirrors `get_execution_mode()` in the Python SDK and +`detectPlatform()` in the TypeScript SDK. + +<p>Use `#detect()` to read the actual process environment, or +`#detect(EnvProvider)` to pass a test double. + +#### Signature + +```java +public enum ExecutionMode +``` + +#### Variants + + + Azure Functions. + + + + Legacy CGI script behind a web server. + + + + Google Cloud Functions (1st or 2nd gen / Cloud Run). + + + + AWS Lambda function (container or zip deployment). + + + + Normal long-running HTTP server process (the default). + + +#### Methods + +##### detect + +Detect the execution mode from the real process environment. + +**Modifiers:** `static` + +###### Signature + + + + ```java + public static ExecutionMode detect() + ``` + + + + ```java + public static ExecutionMode detect(EnvProvider env) + ``` + + + +###### Parameters (Overload 2) + + + environment variable source (injectable for tests). + + +###### Returns (Overload 1) + +`ExecutionMode` — the detected mode, or `#SERVER` as fallback. + +###### Returns (Overload 2) + +`ExecutionMode` — the detected mode. + +###### Source + +[`src/main/java/com/signalwire/sdk/runtime/ExecutionMode.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/ExecutionMode.java) + +Line 35. + +*** + +##### getExecutionMode + +Cross-language SDK contract: return the execution mode as the +canonical lower-case-with-underscores string used by every port. +Mirrors `signalwire.core.logging_config.get_execution_mode` +in Python: one of `"cgi"`, `"lambda"`, +`"google_cloud_function"`, `"azure_function"`, or +`"server"`. + +**Modifiers:** `static` + +###### Signature + + + + ```java + public static String getExecutionMode() + ``` + + + + ```java + public static String getExecutionMode(EnvProvider env) + ``` + + + +###### Parameters (Overload 2) + + + environment variable source (injectable for tests). + + +###### Returns (Overload 1) + +`String` — canonical mode string detected from the process environment + +###### Returns (Overload 2) + +`String` — canonical mode string. + +###### Source + +[`src/main/java/com/signalwire/sdk/runtime/ExecutionMode.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/ExecutionMode.java) + +Line 81. + +*** + +##### isServerlessMode + +Cross-language SDK contract: true when the process is running +inside any serverless / short-lived environment (i.e. + +anything +other than `"server"`). Mirrors +`signalwire.utils.is_serverless_mode` in Python. + +**Modifiers:** `static` + +###### Signature + + + + ```java + public static boolean isServerlessMode() + ``` + + + + ```java + public static boolean isServerlessMode(EnvProvider env) + ``` + + + +###### Parameters (Overload 2) + + + environment variable source (injectable for tests). + + +###### Returns (Overload 1) + +`boolean` — `true` unless the detected mode is `"server"`. + +###### Returns (Overload 2) + +`boolean` — true unless the detected mode is `"server"`. + +###### Source + +[`src/main/java/com/signalwire/sdk/runtime/ExecutionMode.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/ExecutionMode.java) + +Line 112. + +*** + +##### valueOf + +**Modifiers:** `static` + +###### Signature + +```java +public static ExecutionMode valueOf(String name) +``` + +###### Parameters + + + +###### Returns + +`ExecutionMode` + +###### Source + +[`src/main/java/com/signalwire/sdk/runtime/ExecutionMode.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/ExecutionMode.java) + +*** + +##### values + +**Modifiers:** `static` + +###### Signature + +```java +public static ExecutionMode[] values() +``` + +###### Returns + +`ExecutionMode[]` + +###### Source + +[`src/main/java/com/signalwire/sdk/runtime/ExecutionMode.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/ExecutionMode.java) + +#### Source + +[`src/main/java/com/signalwire/sdk/runtime/ExecutionMode.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/ExecutionMode.java) + +Line 13. diff --git a/fern/products/sdk-reference/java/agents/runtime/runtime/lambda-url-resolver/index.mdx b/fern/products/sdk-reference/java/agents/runtime/runtime/lambda-url-resolver/index.mdx new file mode 100644 index 0000000000..2c53085059 --- /dev/null +++ b/fern/products/sdk-reference/java/agents/runtime/runtime/lambda-url-resolver/index.mdx @@ -0,0 +1,117 @@ +--- +slug: "/reference/java/agents/runtime/runtime/lambda-url-resolver" +title: "LambdaUrlResolver" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.runtime.LambdaUrlResolver" + parent: "agents.runtime.runtime" + module: "agents.runtime.runtime" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/LambdaUrlResolver.java" + visibility: "public" +--- +# `LambdaUrlResolver` + +Resolve the base URL of a SignalWire agent running as an AWS Lambda +function, from standard Lambda environment variables. + +<p>Precedence — highest first: +<ol> + <li>`AWS_LAMBDA_FUNCTION_URL` — the Function URL explicitly + assigned to this Lambda (the only variant that is guaranteed + correct; synthetic fallbacks below assume the Function URL + service was used and the function name matches the public + subdomain, which is typically true but not guaranteed).</li> + <li>Synthesised `https://{AWS_LAMBDA_FUNCTION_NAME`.lambda-url.{AWS_REGION}.on.aws} + — built when the Function URL env var is not present but the + standard Lambda identity variables are.</li> +</ol> + +<p>This class returns a bare origin (scheme + host). + +It intentionally +does NOT append any route — callers (e.g. `AgentBase.buildWebhookUrl`) +are responsible for appending the agent's route + endpoint path. This +keeps the route-preservation invariant intact regardless of which +source produced the base URL. + +<p>Mirrors the Lambda branch of `get_full_url()` in the Python SDK. + +**Modifiers:** `final` + +## Signature + +```java +public final class LambdaUrlResolver +``` + +## Methods + +### \ + +Create a resolver backed by the real process environment. + +#### Signature + + + + ```java + public () + ``` + + + + ```java + public (EnvProvider env) + ``` + + + +#### Parameters (Overload 2) + + + environment variable source. + + +#### Source + +[`src/main/java/com/signalwire/sdk/runtime/LambdaUrlResolver.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/LambdaUrlResolver.java) + +Line 34. + +*** + +### resolveBaseUrl + +Return the base URL for the Lambda, without any trailing slash. + +<p>Returns `null` if none of the expected env vars are set +(which typically means we're not actually running on Lambda). + +The +caller should then fall back to its normal base-URL detection. + +#### Signature + +```java +public String resolveBaseUrl() +``` + +#### Returns + +`String` — bare origin (e.g. `https://xyz.lambda-url.us-east-1.on.aws`), or `null`. + +#### Source + +[`src/main/java/com/signalwire/sdk/runtime/LambdaUrlResolver.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/LambdaUrlResolver.java) + +Line 58. + +## Source + +[`src/main/java/com/signalwire/sdk/runtime/LambdaUrlResolver.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/LambdaUrlResolver.java) + +Line 27. diff --git a/fern/products/sdk-reference/java/agents/server/index.mdx b/fern/products/sdk-reference/java/agents/server/index.mdx new file mode 100644 index 0000000000..9310db09cf --- /dev/null +++ b/fern/products/sdk-reference/java/agents/server/index.mdx @@ -0,0 +1,26 @@ +--- +slug: "/reference/java/agents/server" +title: "server" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "com.signalwire.sdk.server" + parent: "agents" + module: "agents" +--- +# `server` + +## Signature + +```java +package com.signalwire.sdk.server +``` + +## Modules + + + + diff --git a/fern/products/sdk-reference/java/agents/server/server/agent-server/index.mdx b/fern/products/sdk-reference/java/agents/server/server/agent-server/index.mdx new file mode 100644 index 0000000000..cbc3802cbf --- /dev/null +++ b/fern/products/sdk-reference/java/agents/server/server/agent-server/index.mdx @@ -0,0 +1,459 @@ +--- +slug: "/reference/java/agents/server/server/agent-server" +title: "AgentServer" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.server.AgentServer" + parent: "agents.server.server" + module: "agents.server.server" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java" + visibility: "public" +--- +# `AgentServer` + +Multi-agent hosting server. +Registers multiple agents on different routes and dispatches requests accordingly. + +## Signature + +```java +public class AgentServer implements AutoCloseable +``` + +## Inheritance + +**Implements:** `AutoCloseable` + +## Methods + +### \ + +#### Signature + + + + ```java + public () + ``` + + + + ```java + public (int port) + ``` + + + + ```java + public (String host, int port) + ``` + + + +#### Parameters (Overload 2) + + + +#### Parameters (Overload 3) + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) + +Line 61. + +*** + +### close + +`AutoCloseable` entry point so the multi-agent server can be +run inside a try-with-resources block: + +<pre>{@code +try (var server = new AgentServer(host, port)) { + server.register(agent); + server.run(); + // ... + +`AutoCloseable` entry point so the multi-agent server can be +run inside a try-with-resources block: + +<pre>(var server = new AgentServer(host, port)) { + server.register(agent); + server.run(); + // ... serve ... // close() runs here: the HTTP listener is shut down +}</pre> + +Delegates to `#stop()`, releasing the bound HTTP(S) listener and +its socket. Idempotent: harmless if the server was never started or is +already stopped. + +**Decorators:** `@Override` + +#### Signature + +```java +public void close() +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) + +Line 730. + +*** + +### enableTls + +Serve over HTTPS using an explicit PEM certificate chain and PKCS#8 +private key. + +This is the explicit-cert option that parallels Python's +ssl\_key=...); it takes +precedence over the `SWML_SSL_*` environment variables. + +<p>`certPath` must be a PEM file containing the leaf (and any +intermediate) certificates; `keyPath` must be the matching +unencrypted PKCS#8 private key in PEM form. When both resolve at +`#run()` time the server binds a +`com.sun.net.httpserver.HttpsServer`. + +#### Signature + +```java +public AgentServer enableTls(String certPath, String keyPath) +``` + +#### Parameters + + + filesystem path to the PEM certificate file + + + + filesystem path to the PEM PKCS#8 private-key file + + +#### Returns + +`AgentServer` + +#### Source + +[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) + +Line 180. + +*** + +### getAgent + +Get agent for a route. + +#### Signature + +```java +public AgentBase getAgent(String route) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) + +Line 129. + +*** + +### getRoutes + +List all registered routes. + +#### Signature + +```java +public Set getRoutes() +``` + +#### Returns + +`Set` + +#### Source + +[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) + +Line 136. + +*** + +### getSipRoute + +Get route for a SIP username. + +#### Signature + +```java +public String getSipRoute(String username) +``` + +#### Parameters + + + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) + +Line 304. + +*** + +### isTlsEnabled + +Reports whether the server will serve HTTPS, resolving the explicit +cert/key option and then the `SWML_SSL_*` environment variables +the same way `#run()` does. + +A configured cert/key must both point +at existing files for TLS to be considered enabled. + +#### Signature + +```java +public boolean isTlsEnabled() +``` + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) + +Line 192. + +*** + +### register + +Register an agent at a specific route. + +#### Signature + + + + ```java + public AgentServer register(AgentBase agent, String route) + ``` + + + + ```java + public AgentServer register(AgentBase agent) + ``` + + + +#### Parameters (Overload 1) + + + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`AgentServer` + +#### Returns (Overload 2) + +`AgentServer` + +#### Source + +[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) + +Line 90. + +*** + +### registerSipRoute + +Register a SIP username to route to a specific agent. + +#### Signature + +```java +public AgentServer registerSipRoute(String username, String route) +``` + +#### Parameters + + + + + +#### Returns + +`AgentServer` + +#### Source + +[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) + +Line 296. + +*** + +### run + +Start the multi-agent server. + +#### Signature + +```java +public void run() +``` + +#### Throws + +- `IOException` + +#### Source + +[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) + +Line 315. + +*** + +### serveStaticFiles + +Serve static files from a directory at a specific route. + +#### Signature + +```java +public AgentServer serveStaticFiles(String directory, String route) +``` + +#### Parameters + + + Filesystem path to the directory containing static files + + + + URL route prefix (e.g., "/static" or "/assets") + + +#### Returns + +`AgentServer` + +#### Source + +[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) + +Line 155. + +*** + +### setStaticFilesDir + +Set directory for serving static files at /static route. + +#### Signature + +```java +public AgentServer setStaticFilesDir(String dir) +``` + +#### Parameters + + + +#### Returns + +`AgentServer` + +#### Source + +[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) + +Line 143. + +*** + +### stop + +Stop the server. + +#### Signature + +```java +public void stop() +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) + +Line 707. + +*** + +### unregister + +Unregister an agent from a route. + +#### Signature + +```java +public AgentServer unregister(String route) +``` + +#### Parameters + + + +#### Returns + +`AgentServer` + +#### Source + +[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) + +Line 115. + +## Source + +[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) + +Line 39. diff --git a/fern/products/sdk-reference/java/agents/server/server/index.mdx b/fern/products/sdk-reference/java/agents/server/server/index.mdx new file mode 100644 index 0000000000..55bec4e7cf --- /dev/null +++ b/fern/products/sdk-reference/java/agents/server/server/index.mdx @@ -0,0 +1,22 @@ +--- +slug: "/reference/java/agents/server/server" +title: "server" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "agents.server.server" + parent: "com.signalwire.sdk.server" + module: "agents.server" +--- +# `server` + +## Classes + + + + Multi-agent hosting server. Registers multiple agents on different routes and dispatches requests accordingly. + + diff --git a/fern/products/sdk-reference/java/agents/skills/builtin/builtin/api-ninja-trivia-skill/index.mdx b/fern/products/sdk-reference/java/agents/skills/builtin/builtin/api-ninja-trivia-skill/index.mdx new file mode 100644 index 0000000000..30e6c7dc67 --- /dev/null +++ b/fern/products/sdk-reference/java/agents/skills/builtin/builtin/api-ninja-trivia-skill/index.mdx @@ -0,0 +1,182 @@ +--- +slug: "/reference/java/agents/skills/builtin/builtin/api-ninja-trivia-skill" +title: "ApiNinjaTriviaSkill" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.skills.builtin.ApiNinjaTriviaSkill" + parent: "com.signalwire.sdk.skills.builtin" + module: "agents.skills.builtin.builtin" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/ApiNinjaTriviaSkill.java" + visibility: "public" +--- +# `ApiNinjaTriviaSkill` + +## Signature + +```java +public class ApiNinjaTriviaSkill implements SkillBase +``` + +## Inheritance + +**Implements:** [SkillBase](/docs/sdk-reference/reference/java/agents/skills/skills#skill-base) + +## Methods + +### \ + +#### Signature + +```java +public () +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/ApiNinjaTriviaSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/ApiNinjaTriviaSkill.java) + +*** + +### getDescription + +**Decorators:** `@Override` + +#### Signature + +```java +public String getDescription() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/ApiNinjaTriviaSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/ApiNinjaTriviaSkill.java) + +Line 23. + +*** + +### getName + +**Decorators:** `@Override` + +#### Signature + +```java +public String getName() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/ApiNinjaTriviaSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/ApiNinjaTriviaSkill.java) + +Line 22. + +*** + +### getSwaigFunctions + +**Decorators:** `@Override` + +#### Signature + +```java +public List> getSwaigFunctions() +``` + +#### Returns + +`List>` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/ApiNinjaTriviaSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/ApiNinjaTriviaSkill.java) + +Line 42. + +*** + +### registerTools + +**Decorators:** `@Override` + +#### Signature + +```java +public List registerTools() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/ApiNinjaTriviaSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/ApiNinjaTriviaSkill.java) + +Line 37. + +*** + +### setup + +**Decorators:** `@Override` `@SuppressWarnings` + +#### Signature + +```java +public boolean setup(Map params) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/ApiNinjaTriviaSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/ApiNinjaTriviaSkill.java) + +Line 26. + +*** + +### supportsMultipleInstances + +**Decorators:** `@Override` + +#### Signature + +```java +public boolean supportsMultipleInstances() +``` + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/ApiNinjaTriviaSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/ApiNinjaTriviaSkill.java) + +Line 24. + +## Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/ApiNinjaTriviaSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/ApiNinjaTriviaSkill.java) + +Line 10. diff --git a/fern/products/sdk-reference/java/agents/skills/builtin/builtin/claude-skills-skill/index.mdx b/fern/products/sdk-reference/java/agents/skills/builtin/builtin/claude-skills-skill/index.mdx new file mode 100644 index 0000000000..7b80255d94 --- /dev/null +++ b/fern/products/sdk-reference/java/agents/skills/builtin/builtin/claude-skills-skill/index.mdx @@ -0,0 +1,207 @@ +--- +slug: "/reference/java/agents/skills/builtin/builtin/claude-skills-skill" +title: "ClaudeSkillsSkill" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.skills.builtin.ClaudeSkillsSkill" + parent: "com.signalwire.sdk.skills.builtin" + module: "agents.skills.builtin.builtin" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/ClaudeSkillsSkill.java" + visibility: "public" +--- +# `ClaudeSkillsSkill` + +Load SKILL.md files as agent tools. +Reads .md files from a directory, extracts YAML frontmatter, and creates tools. + +## Signature + +```java +public class ClaudeSkillsSkill implements SkillBase +``` + +## Inheritance + +**Implements:** [SkillBase](/docs/sdk-reference/reference/java/agents/skills/skills#skill-base) + +## Methods + +### \ + +#### Signature + +```java +public () +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/ClaudeSkillsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/ClaudeSkillsSkill.java) + +*** + +### getDescription + +**Decorators:** `@Override` + +#### Signature + +```java +public String getDescription() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/ClaudeSkillsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/ClaudeSkillsSkill.java) + +Line 29. + +*** + +### getHints + +**Decorators:** `@Override` + +#### Signature + +```java +public List getHints() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/ClaudeSkillsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/ClaudeSkillsSkill.java) + +Line 109. + +*** + +### getName + +**Decorators:** `@Override` + +#### Signature + +```java +public String getName() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/ClaudeSkillsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/ClaudeSkillsSkill.java) + +Line 28. + +*** + +### getPromptSections + +**Decorators:** `@Override` + +#### Signature + +```java +public List> getPromptSections() +``` + +#### Returns + +`List>` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/ClaudeSkillsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/ClaudeSkillsSkill.java) + +Line 114. + +*** + +### registerTools + +**Decorators:** `@Override` + +#### Signature + +```java +public List registerTools() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/ClaudeSkillsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/ClaudeSkillsSkill.java) + +Line 104. + +*** + +### setup + +**Decorators:** `@Override` `@SuppressWarnings` + +#### Signature + +```java +public boolean setup(Map params) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/ClaudeSkillsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/ClaudeSkillsSkill.java) + +Line 32. + +*** + +### supportsMultipleInstances + +**Decorators:** `@Override` + +#### Signature + +```java +public boolean supportsMultipleInstances() +``` + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/ClaudeSkillsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/ClaudeSkillsSkill.java) + +Line 30. + +## Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/ClaudeSkillsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/ClaudeSkillsSkill.java) + +Line 18. diff --git a/fern/products/sdk-reference/java/agents/skills/builtin/builtin/custom-skills-skill/index.mdx b/fern/products/sdk-reference/java/agents/skills/builtin/builtin/custom-skills-skill/index.mdx new file mode 100644 index 0000000000..75edde3ce1 --- /dev/null +++ b/fern/products/sdk-reference/java/agents/skills/builtin/builtin/custom-skills-skill/index.mdx @@ -0,0 +1,162 @@ +--- +slug: "/reference/java/agents/skills/builtin/builtin/custom-skills-skill" +title: "CustomSkillsSkill" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.skills.builtin.CustomSkillsSkill" + parent: "com.signalwire.sdk.skills.builtin" + module: "agents.skills.builtin.builtin" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/CustomSkillsSkill.java" + visibility: "public" +--- +# `CustomSkillsSkill` + +Register user-defined custom tools from configuration. + +## Signature + +```java +public class CustomSkillsSkill implements SkillBase +``` + +## Inheritance + +**Implements:** [SkillBase](/docs/sdk-reference/reference/java/agents/skills/skills#skill-base) + +## Methods + +### \ + +#### Signature + +```java +public () +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/CustomSkillsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/CustomSkillsSkill.java) + +*** + +### getDescription + +**Decorators:** `@Override` + +#### Signature + +```java +public String getDescription() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/CustomSkillsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/CustomSkillsSkill.java) + +Line 17. + +*** + +### getName + +**Decorators:** `@Override` + +#### Signature + +```java +public String getName() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/CustomSkillsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/CustomSkillsSkill.java) + +Line 16. + +*** + +### registerTools + +**Decorators:** `@Override` + +#### Signature + +```java +public List registerTools() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/CustomSkillsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/CustomSkillsSkill.java) + +Line 44. + +*** + +### setup + +**Decorators:** `@Override` `@SuppressWarnings` + +#### Signature + +```java +public boolean setup(Map params) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/CustomSkillsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/CustomSkillsSkill.java) + +Line 20. + +*** + +### supportsMultipleInstances + +**Decorators:** `@Override` + +#### Signature + +```java +public boolean supportsMultipleInstances() +``` + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/CustomSkillsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/CustomSkillsSkill.java) + +Line 18. + +## Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/CustomSkillsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/CustomSkillsSkill.java) + +Line 12. diff --git a/fern/products/sdk-reference/java/agents/skills/builtin/builtin/datasphere-serverless-skill/index.mdx b/fern/products/sdk-reference/java/agents/skills/builtin/builtin/datasphere-serverless-skill/index.mdx new file mode 100644 index 0000000000..60596db988 --- /dev/null +++ b/fern/products/sdk-reference/java/agents/skills/builtin/builtin/datasphere-serverless-skill/index.mdx @@ -0,0 +1,226 @@ +--- +slug: "/reference/java/agents/skills/builtin/builtin/datasphere-serverless-skill" +title: "DatasphereServerlessSkill" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.skills.builtin.DatasphereServerlessSkill" + parent: "com.signalwire.sdk.skills.builtin" + module: "agents.skills.builtin.builtin" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatasphereServerlessSkill.java" + visibility: "public" +--- +# `DatasphereServerlessSkill` + +## Signature + +```java +public class DatasphereServerlessSkill implements SkillBase +``` + +## Inheritance + +**Implements:** [SkillBase](/docs/sdk-reference/reference/java/agents/skills/skills#skill-base) + +## Methods + +### \ + +#### Signature + +```java +public () +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/DatasphereServerlessSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatasphereServerlessSkill.java) + +*** + +### getDescription + +**Decorators:** `@Override` + +#### Signature + +```java +public String getDescription() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/DatasphereServerlessSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatasphereServerlessSkill.java) + +Line 22. + +*** + +### getGlobalData + +**Decorators:** `@Override` + +#### Signature + +```java +public Map getGlobalData() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/DatasphereServerlessSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatasphereServerlessSkill.java) + +Line 78. + +*** + +### getName + +**Decorators:** `@Override` + +#### Signature + +```java +public String getName() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/DatasphereServerlessSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatasphereServerlessSkill.java) + +Line 21. + +*** + +### getPromptSections + +**Decorators:** `@Override` + +#### Signature + +```java +public List> getPromptSections() +``` + +#### Returns + +`List>` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/DatasphereServerlessSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatasphereServerlessSkill.java) + +Line 66. + +*** + +### getSwaigFunctions + +**Decorators:** `@Override` + +#### Signature + +```java +public List> getSwaigFunctions() +``` + +#### Returns + +`List>` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/DatasphereServerlessSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatasphereServerlessSkill.java) + +Line 42. + +*** + +### registerTools + +**Decorators:** `@Override` + +#### Signature + +```java +public List registerTools() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/DatasphereServerlessSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatasphereServerlessSkill.java) + +Line 37. + +*** + +### setup + +**Decorators:** `@Override` + +#### Signature + +```java +public boolean setup(Map params) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/DatasphereServerlessSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatasphereServerlessSkill.java) + +Line 25. + +*** + +### supportsMultipleInstances + +**Decorators:** `@Override` + +#### Signature + +```java +public boolean supportsMultipleInstances() +``` + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/DatasphereServerlessSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatasphereServerlessSkill.java) + +Line 23. + +## Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/DatasphereServerlessSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatasphereServerlessSkill.java) + +Line 11. diff --git a/fern/products/sdk-reference/java/agents/skills/builtin/builtin/datasphere-skill/index.mdx b/fern/products/sdk-reference/java/agents/skills/builtin/builtin/datasphere-skill/index.mdx new file mode 100644 index 0000000000..07ae8cc186 --- /dev/null +++ b/fern/products/sdk-reference/java/agents/skills/builtin/builtin/datasphere-skill/index.mdx @@ -0,0 +1,204 @@ +--- +slug: "/reference/java/agents/skills/builtin/builtin/datasphere-skill" +title: "DatasphereSkill" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.skills.builtin.DatasphereSkill" + parent: "com.signalwire.sdk.skills.builtin" + module: "agents.skills.builtin.builtin" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatasphereSkill.java" + visibility: "public" +--- +# `DatasphereSkill` + +## Signature + +```java +public class DatasphereSkill implements SkillBase +``` + +## Inheritance + +**Implements:** [SkillBase](/docs/sdk-reference/reference/java/agents/skills/skills#skill-base) + +## Methods + +### \ + +#### Signature + +```java +public () +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/DatasphereSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatasphereSkill.java) + +*** + +### getDescription + +**Decorators:** `@Override` + +#### Signature + +```java +public String getDescription() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/DatasphereSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatasphereSkill.java) + +Line 31. + +*** + +### getGlobalData + +**Decorators:** `@Override` + +#### Signature + +```java +public Map getGlobalData() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/DatasphereSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatasphereSkill.java) + +Line 144. + +*** + +### getName + +**Decorators:** `@Override` + +#### Signature + +```java +public String getName() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/DatasphereSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatasphereSkill.java) + +Line 30. + +*** + +### getPromptSections + +**Decorators:** `@Override` + +#### Signature + +```java +public List> getPromptSections() +``` + +#### Returns + +`List>` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/DatasphereSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatasphereSkill.java) + +Line 131. + +*** + +### registerTools + +**Decorators:** `@Override` `@SuppressWarnings` + +#### Signature + +```java +public List registerTools() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/DatasphereSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatasphereSkill.java) + +Line 48. + +*** + +### setup + +**Decorators:** `@Override` + +#### Signature + +```java +public boolean setup(Map params) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/DatasphereSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatasphereSkill.java) + +Line 34. + +*** + +### supportsMultipleInstances + +**Decorators:** `@Override` + +#### Signature + +```java +public boolean supportsMultipleInstances() +``` + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/DatasphereSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatasphereSkill.java) + +Line 32. + +## Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/DatasphereSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatasphereSkill.java) + +Line 17. diff --git a/fern/products/sdk-reference/java/agents/skills/builtin/builtin/datetime-skill/index.mdx b/fern/products/sdk-reference/java/agents/skills/builtin/builtin/datetime-skill/index.mdx new file mode 100644 index 0000000000..da47a6ec0e --- /dev/null +++ b/fern/products/sdk-reference/java/agents/skills/builtin/builtin/datetime-skill/index.mdx @@ -0,0 +1,182 @@ +--- +slug: "/reference/java/agents/skills/builtin/builtin/datetime-skill" +title: "DatetimeSkill" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.skills.builtin.DatetimeSkill" + parent: "com.signalwire.sdk.skills.builtin" + module: "agents.skills.builtin.builtin" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatetimeSkill.java" + visibility: "public" +--- +# `DatetimeSkill` + +## Signature + +```java +public class DatetimeSkill implements SkillBase +``` + +## Inheritance + +**Implements:** [SkillBase](/docs/sdk-reference/reference/java/agents/skills/skills#skill-base) + +## Methods + +### \ + +#### Signature + +```java +public () +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/DatetimeSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatetimeSkill.java) + +*** + +### getDescription + +**Decorators:** `@Override` + +#### Signature + +```java +public String getDescription() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/DatetimeSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatetimeSkill.java) + +Line 15. + +*** + +### getName + +**Decorators:** `@Override` + +#### Signature + +```java +public String getName() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/DatetimeSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatetimeSkill.java) + +Line 14. + +*** + +### getPromptSections + +**Decorators:** `@Override` + +#### Signature + +```java +public List> getPromptSections() +``` + +#### Returns + +`List>` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/DatetimeSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatetimeSkill.java) + +Line 66. + +*** + +### registerTools + +**Decorators:** `@Override` + +#### Signature + +```java +public List registerTools() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/DatetimeSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatetimeSkill.java) + +Line 23. + +*** + +### setup + +**Decorators:** `@Override` + +#### Signature + +```java +public boolean setup(Map params) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/DatetimeSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatetimeSkill.java) + +Line 18. + +*** + +### supportsMultipleInstances + +**Decorators:** `@Override` + +#### Signature + +```java +public boolean supportsMultipleInstances() +``` + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/DatetimeSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatetimeSkill.java) + +Line 16. + +## Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/DatetimeSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatetimeSkill.java) + +Line 12. diff --git a/fern/products/sdk-reference/java/agents/skills/builtin/builtin/google-maps-skill/index.mdx b/fern/products/sdk-reference/java/agents/skills/builtin/builtin/google-maps-skill/index.mdx new file mode 100644 index 0000000000..eb73c85734 --- /dev/null +++ b/fern/products/sdk-reference/java/agents/skills/builtin/builtin/google-maps-skill/index.mdx @@ -0,0 +1,182 @@ +--- +slug: "/reference/java/agents/skills/builtin/builtin/google-maps-skill" +title: "GoogleMapsSkill" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.skills.builtin.GoogleMapsSkill" + parent: "com.signalwire.sdk.skills.builtin" + module: "agents.skills.builtin.builtin" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/GoogleMapsSkill.java" + visibility: "public" +--- +# `GoogleMapsSkill` + +## Signature + +```java +public class GoogleMapsSkill implements SkillBase +``` + +## Inheritance + +**Implements:** [SkillBase](/docs/sdk-reference/reference/java/agents/skills/skills#skill-base) + +## Methods + +### \ + +#### Signature + +```java +public () +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/GoogleMapsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/GoogleMapsSkill.java) + +*** + +### getDescription + +**Decorators:** `@Override` + +#### Signature + +```java +public String getDescription() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/GoogleMapsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/GoogleMapsSkill.java) + +Line 27. + +*** + +### getHints + +**Decorators:** `@Override` + +#### Signature + +```java +public List getHints() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/GoogleMapsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/GoogleMapsSkill.java) + +Line 123. + +*** + +### getName + +**Decorators:** `@Override` + +#### Signature + +```java +public String getName() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/GoogleMapsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/GoogleMapsSkill.java) + +Line 26. + +*** + +### getPromptSections + +**Decorators:** `@Override` + +#### Signature + +```java +public List> getPromptSections() +``` + +#### Returns + +`List>` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/GoogleMapsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/GoogleMapsSkill.java) + +Line 128. + +*** + +### registerTools + +**Decorators:** `@Override` `@SuppressWarnings` + +#### Signature + +```java +public List registerTools() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/GoogleMapsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/GoogleMapsSkill.java) + +Line 37. + +*** + +### setup + +**Decorators:** `@Override` + +#### Signature + +```java +public boolean setup(Map params) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/GoogleMapsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/GoogleMapsSkill.java) + +Line 29. + +## Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/GoogleMapsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/GoogleMapsSkill.java) + +Line 18. diff --git a/fern/products/sdk-reference/java/agents/skills/builtin/builtin/index.mdx b/fern/products/sdk-reference/java/agents/skills/builtin/builtin/index.mdx new file mode 100644 index 0000000000..ad07b1bf99 --- /dev/null +++ b/fern/products/sdk-reference/java/agents/skills/builtin/builtin/index.mdx @@ -0,0 +1,68 @@ +--- +slug: "/reference/java/agents/skills/builtin/builtin" +title: "builtin" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "com.signalwire.sdk.skills.builtin" + parent: "agents.skills.builtin" + module: "agents.skills.builtin" +--- +# `builtin` + +## Signature + +```java +package com.signalwire.sdk.skills.builtin +``` + +## Classes + + + + + + Load SKILL.md files as agent tools. Reads .md files from a directory, extracts YAML frontmatter, and creates tools. + + + + Register user-defined custom tools from configuration. + + + + + + + + + + + + + + + + + + Bridge MCP (Model Context Protocol) servers with SWAIG functions. + + + + Native vector search skill - supports remote mode only (network API). Local .swsearch file support is skipped per porting guide. + + + + + + + + + + + + + + diff --git a/fern/products/sdk-reference/java/agents/skills/builtin/builtin/info-gatherer-skill/index.mdx b/fern/products/sdk-reference/java/agents/skills/builtin/builtin/info-gatherer-skill/index.mdx new file mode 100644 index 0000000000..081f036ca1 --- /dev/null +++ b/fern/products/sdk-reference/java/agents/skills/builtin/builtin/info-gatherer-skill/index.mdx @@ -0,0 +1,204 @@ +--- +slug: "/reference/java/agents/skills/builtin/builtin/info-gatherer-skill" +title: "InfoGathererSkill" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.skills.builtin.InfoGathererSkill" + parent: "com.signalwire.sdk.skills.builtin" + module: "agents.skills.builtin.builtin" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/InfoGathererSkill.java" + visibility: "public" +--- +# `InfoGathererSkill` + +## Signature + +```java +public class InfoGathererSkill implements SkillBase +``` + +## Inheritance + +**Implements:** [SkillBase](/docs/sdk-reference/reference/java/agents/skills/skills#skill-base) + +## Methods + +### \ + +#### Signature + +```java +public () +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/InfoGathererSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/InfoGathererSkill.java) + +*** + +### getDescription + +**Decorators:** `@Override` + +#### Signature + +```java +public String getDescription() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/InfoGathererSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/InfoGathererSkill.java) + +Line 17. + +*** + +### getGlobalData + +**Decorators:** `@Override` + +#### Signature + +```java +public Map getGlobalData() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/InfoGathererSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/InfoGathererSkill.java) + +Line 130. + +*** + +### getName + +**Decorators:** `@Override` + +#### Signature + +```java +public String getName() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/InfoGathererSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/InfoGathererSkill.java) + +Line 16. + +*** + +### getPromptSections + +**Decorators:** `@Override` + +#### Signature + +```java +public List> getPromptSections() +``` + +#### Returns + +`List>` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/InfoGathererSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/InfoGathererSkill.java) + +Line 116. + +*** + +### registerTools + +**Decorators:** `@Override` + +#### Signature + +```java +public List registerTools() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/InfoGathererSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/InfoGathererSkill.java) + +Line 34. + +*** + +### setup + +**Decorators:** `@Override` `@SuppressWarnings` + +#### Signature + +```java +public boolean setup(Map params) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/InfoGathererSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/InfoGathererSkill.java) + +Line 20. + +*** + +### supportsMultipleInstances + +**Decorators:** `@Override` + +#### Signature + +```java +public boolean supportsMultipleInstances() +``` + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/InfoGathererSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/InfoGathererSkill.java) + +Line 18. + +## Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/InfoGathererSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/InfoGathererSkill.java) + +Line 9. diff --git a/fern/products/sdk-reference/java/agents/skills/builtin/builtin/joke-skill/index.mdx b/fern/products/sdk-reference/java/agents/skills/builtin/builtin/joke-skill/index.mdx new file mode 100644 index 0000000000..b5c0a4843c --- /dev/null +++ b/fern/products/sdk-reference/java/agents/skills/builtin/builtin/joke-skill/index.mdx @@ -0,0 +1,204 @@ +--- +slug: "/reference/java/agents/skills/builtin/builtin/joke-skill" +title: "JokeSkill" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.skills.builtin.JokeSkill" + parent: "com.signalwire.sdk.skills.builtin" + module: "agents.skills.builtin.builtin" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/JokeSkill.java" + visibility: "public" +--- +# `JokeSkill` + +## Signature + +```java +public class JokeSkill implements SkillBase +``` + +## Inheritance + +**Implements:** [SkillBase](/docs/sdk-reference/reference/java/agents/skills/skills#skill-base) + +## Methods + +### \ + +#### Signature + +```java +public () +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/JokeSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/JokeSkill.java) + +*** + +### getDescription + +**Decorators:** `@Override` + +#### Signature + +```java +public String getDescription() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/JokeSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/JokeSkill.java) + +Line 16. + +*** + +### getGlobalData + +**Decorators:** `@Override` + +#### Signature + +```java +public Map getGlobalData() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/JokeSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/JokeSkill.java) + +Line 59. + +*** + +### getName + +**Decorators:** `@Override` + +#### Signature + +```java +public String getName() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/JokeSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/JokeSkill.java) + +Line 15. + +*** + +### getPromptSections + +**Decorators:** `@Override` + +#### Signature + +```java +public List> getPromptSections() +``` + +#### Returns + +`List>` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/JokeSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/JokeSkill.java) + +Line 47. + +*** + +### getSwaigFunctions + +**Decorators:** `@Override` + +#### Signature + +```java +public List> getSwaigFunctions() +``` + +#### Returns + +`List>` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/JokeSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/JokeSkill.java) + +Line 33. + +*** + +### registerTools + +**Decorators:** `@Override` + +#### Signature + +```java +public List registerTools() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/JokeSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/JokeSkill.java) + +Line 27. + +*** + +### setup + +**Decorators:** `@Override` + +#### Signature + +```java +public boolean setup(Map params) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/JokeSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/JokeSkill.java) + +Line 18. + +## Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/JokeSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/JokeSkill.java) + +Line 10. diff --git a/fern/products/sdk-reference/java/agents/skills/builtin/builtin/math-skill/index.mdx b/fern/products/sdk-reference/java/agents/skills/builtin/builtin/math-skill/index.mdx new file mode 100644 index 0000000000..40dc27637e --- /dev/null +++ b/fern/products/sdk-reference/java/agents/skills/builtin/builtin/math-skill/index.mdx @@ -0,0 +1,182 @@ +--- +slug: "/reference/java/agents/skills/builtin/builtin/math-skill" +title: "MathSkill" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.skills.builtin.MathSkill" + parent: "com.signalwire.sdk.skills.builtin" + module: "agents.skills.builtin.builtin" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/MathSkill.java" + visibility: "public" +--- +# `MathSkill` + +## Signature + +```java +public class MathSkill implements SkillBase +``` + +## Inheritance + +**Implements:** [SkillBase](/docs/sdk-reference/reference/java/agents/skills/skills#skill-base) + +## Methods + +### \ + +#### Signature + +```java +public () +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/MathSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/MathSkill.java) + +*** + +### getDescription + +**Decorators:** `@Override` + +#### Signature + +```java +public String getDescription() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/MathSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/MathSkill.java) + +Line 12. + +*** + +### getName + +**Decorators:** `@Override` + +#### Signature + +```java +public String getName() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/MathSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/MathSkill.java) + +Line 11. + +*** + +### getPromptSections + +**Decorators:** `@Override` + +#### Signature + +```java +public List> getPromptSections() +``` + +#### Returns + +`List>` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/MathSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/MathSkill.java) + +Line 138. + +*** + +### registerTools + +**Decorators:** `@Override` + +#### Signature + +```java +public List registerTools() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/MathSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/MathSkill.java) + +Line 20. + +*** + +### setup + +**Decorators:** `@Override` + +#### Signature + +```java +public boolean setup(Map params) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/MathSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/MathSkill.java) + +Line 15. + +*** + +### supportsMultipleInstances + +**Decorators:** `@Override` + +#### Signature + +```java +public boolean supportsMultipleInstances() +``` + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/MathSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/MathSkill.java) + +Line 13. + +## Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/MathSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/MathSkill.java) + +Line 9. diff --git a/fern/products/sdk-reference/java/agents/skills/builtin/builtin/mcp-gateway-skill/index.mdx b/fern/products/sdk-reference/java/agents/skills/builtin/builtin/mcp-gateway-skill/index.mdx new file mode 100644 index 0000000000..1373ebed9d --- /dev/null +++ b/fern/products/sdk-reference/java/agents/skills/builtin/builtin/mcp-gateway-skill/index.mdx @@ -0,0 +1,206 @@ +--- +slug: "/reference/java/agents/skills/builtin/builtin/mcp-gateway-skill" +title: "McpGatewaySkill" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.skills.builtin.McpGatewaySkill" + parent: "com.signalwire.sdk.skills.builtin" + module: "agents.skills.builtin.builtin" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/McpGatewaySkill.java" + visibility: "public" +--- +# `McpGatewaySkill` + +Bridge MCP (Model Context Protocol) servers with SWAIG functions. + +## Signature + +```java +public class McpGatewaySkill implements SkillBase +``` + +## Inheritance + +**Implements:** [SkillBase](/docs/sdk-reference/reference/java/agents/skills/skills#skill-base) + +## Methods + +### \ + +#### Signature + +```java +public () +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/McpGatewaySkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/McpGatewaySkill.java) + +*** + +### getDescription + +**Decorators:** `@Override` + +#### Signature + +```java +public String getDescription() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/McpGatewaySkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/McpGatewaySkill.java) + +Line 36. + +*** + +### getGlobalData + +**Decorators:** `@Override` + +#### Signature + +```java +public Map getGlobalData() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/McpGatewaySkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/McpGatewaySkill.java) + +Line 142. + +*** + +### getHints + +**Decorators:** `@Override` + +#### Signature + +```java +public List getHints() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/McpGatewaySkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/McpGatewaySkill.java) + +Line 127. + +*** + +### getName + +**Decorators:** `@Override` + +#### Signature + +```java +public String getName() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/McpGatewaySkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/McpGatewaySkill.java) + +Line 35. + +*** + +### getPromptSections + +**Decorators:** `@Override` + +#### Signature + +```java +public List> getPromptSections() +``` + +#### Returns + +`List>` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/McpGatewaySkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/McpGatewaySkill.java) + +Line 134. + +*** + +### registerTools + +**Decorators:** `@Override` + +#### Signature + +```java +public List registerTools() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/McpGatewaySkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/McpGatewaySkill.java) + +Line 122. + +*** + +### setup + +**Decorators:** `@Override` `@SuppressWarnings` + +#### Signature + +```java +public boolean setup(Map params) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/McpGatewaySkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/McpGatewaySkill.java) + +Line 38. + +## Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/McpGatewaySkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/McpGatewaySkill.java) + +Line 21. diff --git a/fern/products/sdk-reference/java/agents/skills/builtin/builtin/native-vector-search-skill/index.mdx b/fern/products/sdk-reference/java/agents/skills/builtin/builtin/native-vector-search-skill/index.mdx new file mode 100644 index 0000000000..8db1c23ead --- /dev/null +++ b/fern/products/sdk-reference/java/agents/skills/builtin/builtin/native-vector-search-skill/index.mdx @@ -0,0 +1,185 @@ +--- +slug: "/reference/java/agents/skills/builtin/builtin/native-vector-search-skill" +title: "NativeVectorSearchSkill" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.skills.builtin.NativeVectorSearchSkill" + parent: "com.signalwire.sdk.skills.builtin" + module: "agents.skills.builtin.builtin" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/NativeVectorSearchSkill.java" + visibility: "public" +--- +# `NativeVectorSearchSkill` + +Native vector search skill - supports remote mode only (network API). +Local .swsearch file support is skipped per porting guide. + +## Signature + +```java +public class NativeVectorSearchSkill implements SkillBase +``` + +## Inheritance + +**Implements:** [SkillBase](/docs/sdk-reference/reference/java/agents/skills/skills#skill-base) + +## Methods + +### \ + +#### Signature + +```java +public () +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/NativeVectorSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/NativeVectorSearchSkill.java) + +*** + +### getDescription + +**Decorators:** `@Override` + +#### Signature + +```java +public String getDescription() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/NativeVectorSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/NativeVectorSearchSkill.java) + +Line 32. + +*** + +### getHints + +**Decorators:** `@Override` + +#### Signature + +```java +public List getHints() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/NativeVectorSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/NativeVectorSearchSkill.java) + +Line 102. + +*** + +### getName + +**Decorators:** `@Override` + +#### Signature + +```java +public String getName() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/NativeVectorSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/NativeVectorSearchSkill.java) + +Line 31. + +*** + +### registerTools + +**Decorators:** `@Override` `@SuppressWarnings` + +#### Signature + +```java +public List registerTools() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/NativeVectorSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/NativeVectorSearchSkill.java) + +Line 47. + +*** + +### setup + +**Decorators:** `@Override` `@SuppressWarnings` + +#### Signature + +```java +public boolean setup(Map params) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/NativeVectorSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/NativeVectorSearchSkill.java) + +Line 35. + +*** + +### supportsMultipleInstances + +**Decorators:** `@Override` + +#### Signature + +```java +public boolean supportsMultipleInstances() +``` + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/NativeVectorSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/NativeVectorSearchSkill.java) + +Line 33. + +## Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/NativeVectorSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/NativeVectorSearchSkill.java) + +Line 20. diff --git a/fern/products/sdk-reference/java/agents/skills/builtin/builtin/play-background-file-skill/index.mdx b/fern/products/sdk-reference/java/agents/skills/builtin/builtin/play-background-file-skill/index.mdx new file mode 100644 index 0000000000..59d4afad9f --- /dev/null +++ b/fern/products/sdk-reference/java/agents/skills/builtin/builtin/play-background-file-skill/index.mdx @@ -0,0 +1,182 @@ +--- +slug: "/reference/java/agents/skills/builtin/builtin/play-background-file-skill" +title: "PlayBackgroundFileSkill" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.skills.builtin.PlayBackgroundFileSkill" + parent: "com.signalwire.sdk.skills.builtin" + module: "agents.skills.builtin.builtin" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/PlayBackgroundFileSkill.java" + visibility: "public" +--- +# `PlayBackgroundFileSkill` + +## Signature + +```java +public class PlayBackgroundFileSkill implements SkillBase +``` + +## Inheritance + +**Implements:** [SkillBase](/docs/sdk-reference/reference/java/agents/skills/skills#skill-base) + +## Methods + +### \ + +#### Signature + +```java +public () +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/PlayBackgroundFileSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/PlayBackgroundFileSkill.java) + +*** + +### getDescription + +**Decorators:** `@Override` + +#### Signature + +```java +public String getDescription() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/PlayBackgroundFileSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/PlayBackgroundFileSkill.java) + +Line 16. + +*** + +### getName + +**Decorators:** `@Override` + +#### Signature + +```java +public String getName() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/PlayBackgroundFileSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/PlayBackgroundFileSkill.java) + +Line 15. + +*** + +### getSwaigFunctions + +**Decorators:** `@Override` + +#### Signature + +```java +public List> getSwaigFunctions() +``` + +#### Returns + +`List>` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/PlayBackgroundFileSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/PlayBackgroundFileSkill.java) + +Line 34. + +*** + +### registerTools + +**Decorators:** `@Override` + +#### Signature + +```java +public List registerTools() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/PlayBackgroundFileSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/PlayBackgroundFileSkill.java) + +Line 29. + +*** + +### setup + +**Decorators:** `@Override` `@SuppressWarnings` + +#### Signature + +```java +public boolean setup(Map params) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/PlayBackgroundFileSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/PlayBackgroundFileSkill.java) + +Line 19. + +*** + +### supportsMultipleInstances + +**Decorators:** `@Override` + +#### Signature + +```java +public boolean supportsMultipleInstances() +``` + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/PlayBackgroundFileSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/PlayBackgroundFileSkill.java) + +Line 17. + +## Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/PlayBackgroundFileSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/PlayBackgroundFileSkill.java) + +Line 10. diff --git a/fern/products/sdk-reference/java/agents/skills/builtin/builtin/spider-skill/index.mdx b/fern/products/sdk-reference/java/agents/skills/builtin/builtin/spider-skill/index.mdx new file mode 100644 index 0000000000..9219f3d369 --- /dev/null +++ b/fern/products/sdk-reference/java/agents/skills/builtin/builtin/spider-skill/index.mdx @@ -0,0 +1,182 @@ +--- +slug: "/reference/java/agents/skills/builtin/builtin/spider-skill" +title: "SpiderSkill" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.skills.builtin.SpiderSkill" + parent: "com.signalwire.sdk.skills.builtin" + module: "agents.skills.builtin.builtin" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/SpiderSkill.java" + visibility: "public" +--- +# `SpiderSkill` + +## Signature + +```java +public class SpiderSkill implements SkillBase +``` + +## Inheritance + +**Implements:** [SkillBase](/docs/sdk-reference/reference/java/agents/skills/skills#skill-base) + +## Methods + +### \ + +#### Signature + +```java +public () +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/SpiderSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/SpiderSkill.java) + +*** + +### getDescription + +**Decorators:** `@Override` + +#### Signature + +```java +public String getDescription() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/SpiderSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/SpiderSkill.java) + +Line 24. + +*** + +### getHints + +**Decorators:** `@Override` + +#### Signature + +```java +public List getHints() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/SpiderSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/SpiderSkill.java) + +Line 120. + +*** + +### getName + +**Decorators:** `@Override` + +#### Signature + +```java +public String getName() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/SpiderSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/SpiderSkill.java) + +Line 23. + +*** + +### registerTools + +**Decorators:** `@Override` + +#### Signature + +```java +public List registerTools() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/SpiderSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/SpiderSkill.java) + +Line 35. + +*** + +### setup + +**Decorators:** `@Override` + +#### Signature + +```java +public boolean setup(Map params) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/SpiderSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/SpiderSkill.java) + +Line 27. + +*** + +### supportsMultipleInstances + +**Decorators:** `@Override` + +#### Signature + +```java +public boolean supportsMultipleInstances() +``` + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/SpiderSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/SpiderSkill.java) + +Line 25. + +## Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/SpiderSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/SpiderSkill.java) + +Line 15. diff --git a/fern/products/sdk-reference/java/agents/skills/builtin/builtin/swml-transfer-skill/index.mdx b/fern/products/sdk-reference/java/agents/skills/builtin/builtin/swml-transfer-skill/index.mdx new file mode 100644 index 0000000000..c43db4516e --- /dev/null +++ b/fern/products/sdk-reference/java/agents/skills/builtin/builtin/swml-transfer-skill/index.mdx @@ -0,0 +1,226 @@ +--- +slug: "/reference/java/agents/skills/builtin/builtin/swml-transfer-skill" +title: "SwmlTransferSkill" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.skills.builtin.SwmlTransferSkill" + parent: "com.signalwire.sdk.skills.builtin" + module: "agents.skills.builtin.builtin" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/SwmlTransferSkill.java" + visibility: "public" +--- +# `SwmlTransferSkill` + +## Signature + +```java +public class SwmlTransferSkill implements SkillBase +``` + +## Inheritance + +**Implements:** [SkillBase](/docs/sdk-reference/reference/java/agents/skills/skills#skill-base) + +## Methods + +### \ + +#### Signature + +```java +public () +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/SwmlTransferSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/SwmlTransferSkill.java) + +*** + +### getDescription + +**Decorators:** `@Override` + +#### Signature + +```java +public String getDescription() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/SwmlTransferSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/SwmlTransferSkill.java) + +Line 20. + +*** + +### getHints + +**Decorators:** `@Override` + +#### Signature + +```java +public List getHints() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/SwmlTransferSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/SwmlTransferSkill.java) + +Line 82. + +*** + +### getName + +**Decorators:** `@Override` + +#### Signature + +```java +public String getName() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/SwmlTransferSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/SwmlTransferSkill.java) + +Line 19. + +*** + +### getPromptSections + +**Decorators:** `@Override` + +#### Signature + +```java +public List> getPromptSections() +``` + +#### Returns + +`List>` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/SwmlTransferSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/SwmlTransferSkill.java) + +Line 91. + +*** + +### getSwaigFunctions + +**Decorators:** `@Override` + +#### Signature + +```java +public List> getSwaigFunctions() +``` + +#### Returns + +`List>` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/SwmlTransferSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/SwmlTransferSkill.java) + +Line 42. + +*** + +### registerTools + +**Decorators:** `@Override` + +#### Signature + +```java +public List registerTools() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/SwmlTransferSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/SwmlTransferSkill.java) + +Line 37. + +*** + +### setup + +**Decorators:** `@Override` `@SuppressWarnings` + +#### Signature + +```java +public boolean setup(Map params) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/SwmlTransferSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/SwmlTransferSkill.java) + +Line 23. + +*** + +### supportsMultipleInstances + +**Decorators:** `@Override` + +#### Signature + +```java +public boolean supportsMultipleInstances() +``` + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/SwmlTransferSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/SwmlTransferSkill.java) + +Line 21. + +## Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/SwmlTransferSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/SwmlTransferSkill.java) + +Line 10. diff --git a/fern/products/sdk-reference/java/agents/skills/builtin/builtin/weather-api-skill/index.mdx b/fern/products/sdk-reference/java/agents/skills/builtin/builtin/weather-api-skill/index.mdx new file mode 100644 index 0000000000..31e8c07d18 --- /dev/null +++ b/fern/products/sdk-reference/java/agents/skills/builtin/builtin/weather-api-skill/index.mdx @@ -0,0 +1,160 @@ +--- +slug: "/reference/java/agents/skills/builtin/builtin/weather-api-skill" +title: "WeatherApiSkill" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.skills.builtin.WeatherApiSkill" + parent: "com.signalwire.sdk.skills.builtin" + module: "agents.skills.builtin.builtin" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WeatherApiSkill.java" + visibility: "public" +--- +# `WeatherApiSkill` + +## Signature + +```java +public class WeatherApiSkill implements SkillBase +``` + +## Inheritance + +**Implements:** [SkillBase](/docs/sdk-reference/reference/java/agents/skills/skills#skill-base) + +## Methods + +### \ + +#### Signature + +```java +public () +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/WeatherApiSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WeatherApiSkill.java) + +*** + +### getDescription + +**Decorators:** `@Override` + +#### Signature + +```java +public String getDescription() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/WeatherApiSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WeatherApiSkill.java) + +Line 17. + +*** + +### getName + +**Decorators:** `@Override` + +#### Signature + +```java +public String getName() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/WeatherApiSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WeatherApiSkill.java) + +Line 16. + +*** + +### getSwaigFunctions + +**Decorators:** `@Override` + +#### Signature + +```java +public List> getSwaigFunctions() +``` + +#### Returns + +`List>` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/WeatherApiSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WeatherApiSkill.java) + +Line 36. + +*** + +### registerTools + +**Decorators:** `@Override` + +#### Signature + +```java +public List registerTools() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/WeatherApiSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WeatherApiSkill.java) + +Line 31. + +*** + +### setup + +**Decorators:** `@Override` + +#### Signature + +```java +public boolean setup(Map params) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/WeatherApiSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WeatherApiSkill.java) + +Line 19. + +## Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/WeatherApiSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WeatherApiSkill.java) + +Line 10. diff --git a/fern/products/sdk-reference/java/agents/skills/builtin/builtin/web-search-skill/index.mdx b/fern/products/sdk-reference/java/agents/skills/builtin/builtin/web-search-skill/index.mdx new file mode 100644 index 0000000000..5ff4d1ab8b --- /dev/null +++ b/fern/products/sdk-reference/java/agents/skills/builtin/builtin/web-search-skill/index.mdx @@ -0,0 +1,254 @@ +--- +slug: "/reference/java/agents/skills/builtin/builtin/web-search-skill" +title: "WebSearchSkill" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.skills.builtin.WebSearchSkill" + parent: "com.signalwire.sdk.skills.builtin" + module: "agents.skills.builtin.builtin" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WebSearchSkill.java" + visibility: "public" +--- +# `WebSearchSkill` + +## Signature + +```java +public class WebSearchSkill implements SkillBase +``` + +## Inheritance + +**Implements:** [SkillBase](/docs/sdk-reference/reference/java/agents/skills/skills#skill-base) + +## Methods + +### \ + +#### Signature + +```java +public () +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/WebSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WebSearchSkill.java) + +*** + +### getDescription + +**Decorators:** `@Override` + +#### Signature + +```java +public String getDescription() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/WebSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WebSearchSkill.java) + +Line 58. + +*** + +### getGlobalData + +**Decorators:** `@Override` + +#### Signature + +```java +public Map getGlobalData() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/WebSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WebSearchSkill.java) + +Line 465. + +*** + +### getName + +**Decorators:** `@Override` + +#### Signature + +```java +public String getName() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/WebSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WebSearchSkill.java) + +Line 57. + +*** + +### getParameterSchema + +Advertise every configurable param so GUI tooling can discover it. +Mirrors Python's get\_parameter\_schema (commit 295745b), including the +six latency / response params. + +Each setup() read must appear here. + +**Decorators:** `@Override` + +#### Signature + +```java +public Map getParameterSchema() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/WebSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WebSearchSkill.java) + +Line 479. + +*** + +### getPromptSections + +**Decorators:** `@Override` + +#### Signature + +```java +public List> getPromptSections() +``` + +#### Returns + +`List>` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/WebSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WebSearchSkill.java) + +Line 452. + +*** + +### getVersion + +**Decorators:** `@Override` + +#### Signature + +```java +public String getVersion() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/WebSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WebSearchSkill.java) + +Line 59. + +*** + +### registerTools + +**Decorators:** `@Override` + +#### Signature + +```java +public List registerTools() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/WebSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WebSearchSkill.java) + +Line 104. + +*** + +### setup + +**Decorators:** `@Override` + +#### Signature + +```java +public boolean setup(Map params) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/WebSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WebSearchSkill.java) + +Line 62. + +*** + +### supportsMultipleInstances + +**Decorators:** `@Override` + +#### Signature + +```java +public boolean supportsMultipleInstances() +``` + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/WebSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WebSearchSkill.java) + +Line 60. + +## Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/WebSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WebSearchSkill.java) + +Line 23. diff --git a/fern/products/sdk-reference/java/agents/skills/builtin/builtin/wikipedia-search-skill/index.mdx b/fern/products/sdk-reference/java/agents/skills/builtin/builtin/wikipedia-search-skill/index.mdx new file mode 100644 index 0000000000..985a1178c2 --- /dev/null +++ b/fern/products/sdk-reference/java/agents/skills/builtin/builtin/wikipedia-search-skill/index.mdx @@ -0,0 +1,160 @@ +--- +slug: "/reference/java/agents/skills/builtin/builtin/wikipedia-search-skill" +title: "WikipediaSearchSkill" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.skills.builtin.WikipediaSearchSkill" + parent: "com.signalwire.sdk.skills.builtin" + module: "agents.skills.builtin.builtin" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WikipediaSearchSkill.java" + visibility: "public" +--- +# `WikipediaSearchSkill` + +## Signature + +```java +public class WikipediaSearchSkill implements SkillBase +``` + +## Inheritance + +**Implements:** [SkillBase](/docs/sdk-reference/reference/java/agents/skills/skills#skill-base) + +## Methods + +### \ + +#### Signature + +```java +public () +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/WikipediaSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WikipediaSearchSkill.java) + +*** + +### getDescription + +**Decorators:** `@Override` + +#### Signature + +```java +public String getDescription() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/WikipediaSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WikipediaSearchSkill.java) + +Line 26. + +*** + +### getName + +**Decorators:** `@Override` + +#### Signature + +```java +public String getName() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/WikipediaSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WikipediaSearchSkill.java) + +Line 25. + +*** + +### getPromptSections + +**Decorators:** `@Override` + +#### Signature + +```java +public List> getPromptSections() +``` + +#### Returns + +`List>` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/WikipediaSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WikipediaSearchSkill.java) + +Line 106. + +*** + +### registerTools + +**Decorators:** `@Override` `@SuppressWarnings` + +#### Signature + +```java +public List registerTools() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/WikipediaSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WikipediaSearchSkill.java) + +Line 40. + +*** + +### setup + +**Decorators:** `@Override` + +#### Signature + +```java +public boolean setup(Map params) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/WikipediaSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WikipediaSearchSkill.java) + +Line 28. + +## Source + +[`src/main/java/com/signalwire/sdk/skills/builtin/WikipediaSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WikipediaSearchSkill.java) + +Line 18. diff --git a/fern/products/sdk-reference/java/agents/skills/builtin/index.mdx b/fern/products/sdk-reference/java/agents/skills/builtin/index.mdx new file mode 100644 index 0000000000..86bc242e64 --- /dev/null +++ b/fern/products/sdk-reference/java/agents/skills/builtin/index.mdx @@ -0,0 +1,20 @@ +--- +slug: "/reference/java/agents/skills/builtin" +title: "builtin" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "agents.skills.builtin" + parent: "com.signalwire.sdk.skills" + module: "agents.skills" +--- +# `builtin` + +## Modules + + + + diff --git a/fern/products/sdk-reference/java/agents/skills/index.mdx b/fern/products/sdk-reference/java/agents/skills/index.mdx new file mode 100644 index 0000000000..eb03fbe831 --- /dev/null +++ b/fern/products/sdk-reference/java/agents/skills/index.mdx @@ -0,0 +1,28 @@ +--- +slug: "/reference/java/agents/skills" +title: "skills" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "com.signalwire.sdk.skills" + parent: "agents" + module: "agents" +--- +# `skills` + +## Signature + +```java +package com.signalwire.sdk.skills +``` + +## Modules + + + + + + diff --git a/fern/products/sdk-reference/java/agents/skills/skills/index.mdx b/fern/products/sdk-reference/java/agents/skills/skills/index.mdx new file mode 100644 index 0000000000..ecb6a7e9ea --- /dev/null +++ b/fern/products/sdk-reference/java/agents/skills/skills/index.mdx @@ -0,0 +1,569 @@ +--- +slug: "/reference/java/agents/skills/skills" +title: "skills" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "agents.skills.skills" + parent: "com.signalwire.sdk.skills" + module: "agents.skills" +--- +# `skills` + +## Classes + + + + Manages skill lifecycle: instantiation, validation, registration with the agent. + + + + Static registry of all available skills. Skills are registered by name and can be instantiated on demand. <p>The class also exposes a small per-instance surface for Python-parity: an instance constructor and `#addSkillDirectory(String)` mirror Python's `SkillRegistry().add_skill_directory(path)`. + + + +## Interfaces + +### SkillBase + +Interface for all skills. + +Skills are modular capabilities that can be +added to agents to provide tools, prompts, hints, and global data. + +#### Signature + +```java +public interface SkillBase +``` + +#### Methods + +##### cleanup + +Cleanup resources. + +**Modifiers:** `default` + +###### Signature + +```java +default void cleanup() +``` + +###### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillBase.java) + +Line 68. + +*** + +##### getDescription + +Human-readable description. + +###### Signature + +```java +String getDescription() +``` + +###### Returns + +`String` + +###### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillBase.java) + +Line 17. + +*** + +##### getExtraFields + +Get extra fields to merge into all tool definitions (e.g., fillers). + +**Modifiers:** `default` + +###### Signature + +```java +default Map getExtraFields() +``` + +###### Returns + +`Map` + +###### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillBase.java) + +Line 83. + +*** + +##### getGlobalData + +Get global data to merge into the agent. + +**Modifiers:** `default` + +###### Signature + +```java +default Map getGlobalData() +``` + +###### Returns + +`Map` + +###### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillBase.java) + +Line 52. + +*** + +##### getHints + +Get speech recognition hints for this skill. + +**Modifiers:** `default` + +###### Signature + +```java +default List getHints() +``` + +###### Returns + +`List` + +###### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillBase.java) + +Line 47. + +*** + +##### getInstanceKey + +Get unique instance key (for multi-instance skills). + +**Modifiers:** `default` + +###### Signature + +```java +default String getInstanceKey() +``` + +###### Returns + +`String` + +###### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillBase.java) + +Line 78. + +*** + +##### getName + +Unique skill name. + +###### Signature + +```java +String getName() +``` + +###### Returns + +`String` + +###### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillBase.java) + +Line 14. + +*** + +##### getParameterSchema + +Get parameter schema for GUI tools. + +**Modifiers:** `default` + +###### Signature + +```java +default Map getParameterSchema() +``` + +###### Returns + +`Map` + +###### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillBase.java) + +Line 73. + +*** + +##### getPromptSections + +Get prompt sections to inject into the agent. +Each section is a map with: title, body, bullets (optional) + +**Modifiers:** `default` + +###### Signature + +```java +default List> getPromptSections() +``` + +###### Returns + +`List>` + +###### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillBase.java) + +Line 58. + +*** + +##### getRequiredEnvVars + +Required environment variables. + +**Modifiers:** `default` + +###### Signature + +```java +default List getRequiredEnvVars() +``` + +###### Returns + +`List` + +###### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillBase.java) + +Line 26. + +*** + +##### getRequiredPackages + +Required packages (informational). + +**Modifiers:** `default` + +###### Signature + +```java +default List getRequiredPackages() +``` + +###### Returns + +`List` + +###### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillBase.java) + +Line 29. + +*** + +##### getSwaigFunctions + +Get SWAIG functions (for DataMap-based skills that bypass handlers). + +**Modifiers:** `default` + +###### Signature + +```java +default List> getSwaigFunctions() +``` + +###### Returns + +`List>` + +###### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillBase.java) + +Line 63. + +*** + +##### getVersion + +Semantic version string. + +**Modifiers:** `default` + +###### Signature + +```java +default String getVersion() +``` + +###### Returns + +`String` + +###### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillBase.java) + +Line 20. + +*** + +##### registerTools + +Register tools with the agent. + +###### Signature + +```java +List registerTools() +``` + +###### Returns + +`List` — List of tool definitions to register + +###### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillBase.java) + +Line 42. + +*** + +##### setup + +Initialize the skill with parameters. + +###### Signature + +```java +boolean setup(Map params) +``` + +###### Parameters + + + Configuration parameters + + +###### Returns + +`boolean` — true if setup succeeded + +###### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillBase.java) + +Line 36. + +*** + +##### supportsMultipleInstances + +Whether multiple instances can be loaded with different configs. + +**Modifiers:** `default` + +###### Signature + +```java +default boolean supportsMultipleInstances() +``` + +###### Returns + +`boolean` + +###### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillBase.java) + +Line 23. + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillBase.java) + +Line 11. + +## Enums + +### SkillName + +Built-in skill names as a typed, compile-time-checked closed set. + +<p>java.util.Map) +(and the matching `removeSkill` / `hasSkill` overloads) accept +this enum <em>or</em> a plain `String`. + +The enum gives editor +autocompletion and makes a typo fail at compile time (a bare string like +`"datetiem"` only fails at runtime, on the server). Strings keep +parity with the Python reference (which uses bare `str`) and still +allow custom / third-party skills that aren't built in: + +<pre>// typed, autocompleted +agent.addSkill("datetime"); // string still works (parity) +agent.addSkill("my_custom_skill"); // open set: custom skills ok</pre> + +<p>Each constant's value is the canonical wire string +(the key the skill registers under in `SkillRegistry`), so routing a +call through the enum is byte-for-byte identical to passing that string. + +#### Signature + +```java +public enum SkillName +``` + +#### Variants + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#### Methods + +##### getValue + +The canonical wire string for this skill — the name it registers under +in `SkillRegistry`. + +Equivalent to PHP's backed-enum `->value`. + +###### Signature + +```java +public String getValue() +``` + +###### Returns + +`String` — the lower-case-with-underscores skill name. + +###### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillName.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillName.java) + +Line 57. + +*** + +##### valueOf + +**Modifiers:** `static` + +###### Signature + +```java +public static SkillName valueOf(String name) +``` + +###### Parameters + + + +###### Returns + +`SkillName` + +###### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillName.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillName.java) + +*** + +##### values + +**Modifiers:** `static` + +###### Signature + +```java +public static SkillName[] values() +``` + +###### Returns + +`SkillName[]` + +###### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillName.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillName.java) + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillName.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillName.java) + +Line 24. diff --git a/fern/products/sdk-reference/java/agents/skills/skills/skill-manager/index.mdx b/fern/products/sdk-reference/java/agents/skills/skills/skill-manager/index.mdx new file mode 100644 index 0000000000..f79ed67e59 --- /dev/null +++ b/fern/products/sdk-reference/java/agents/skills/skills/skill-manager/index.mdx @@ -0,0 +1,173 @@ +--- +slug: "/reference/java/agents/skills/skills/skill-manager" +title: "SkillManager" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.skills.SkillManager" + parent: "agents.skills.skills" + module: "agents.skills.skills" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillManager.java" + visibility: "public" +--- +# `SkillManager` + +Manages skill lifecycle: instantiation, validation, registration with the agent. + +## Signature + +```java +public class SkillManager +``` + +## Methods + +### \ + +#### Signature + +```java +public (AgentBase agent) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillManager.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillManager.java) + +Line 19. + +*** + +### addSkill + +Add a skill to the agent. +1\. + +Get skill factory from registry +2\. Create instance +3\. Check for duplicates +4\. Validate env vars +5\. Call setup() +6\. Register tools +7\. Merge hints +8\. Merge global data +9\. Add prompt sections + +#### Signature + +```java +public void addSkill(String skillName, Map params) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillManager.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillManager.java) + +Line 35. + +*** + +### cleanup + +Cleanup all skills. + +#### Signature + +```java +public void cleanup() +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillManager.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillManager.java) + +Line 159. + +*** + +### hasSkill + +Check if a skill is active. + +#### Signature + +```java +public boolean hasSkill(String skillName) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillManager.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillManager.java) + +Line 152. + +*** + +### listSkills + +List active skill instance keys. + +#### Signature + +```java +public List listSkills() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillManager.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillManager.java) + +Line 145. + +*** + +### removeSkill + +Remove a skill from the agent. + +#### Signature + +```java +public void removeSkill(String skillName) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillManager.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillManager.java) + +Line 134. + +## Source + +[`src/main/java/com/signalwire/sdk/skills/SkillManager.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillManager.java) + +Line 12. diff --git a/fern/products/sdk-reference/java/agents/skills/skills/skill-registry/index.mdx b/fern/products/sdk-reference/java/agents/skills/skills/skill-registry/index.mdx new file mode 100644 index 0000000000..f114633823 --- /dev/null +++ b/fern/products/sdk-reference/java/agents/skills/skills/skill-registry/index.mdx @@ -0,0 +1,288 @@ +--- +slug: "/reference/java/agents/skills/skills/skill-registry" +title: "SkillRegistry" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.skills.SkillRegistry" + parent: "agents.skills.skills" + module: "agents.skills.skills" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillRegistry.java" + visibility: "public" +--- +# `SkillRegistry` + +Static registry of all available skills. +Skills are registered by name and can be instantiated on demand. + +<p>The class also exposes a small per-instance surface for +Python-parity: an instance constructor and `#addSkillDirectory(String)` +mirror Python's `SkillRegistry().add_skill_directory(path)`. + +The +static registry is kept for the existing Java idiom; instance state is +limited to the external skill directories list. + +**Modifiers:** `final` + +## Signature + +```java +public final class SkillRegistry +``` + +## Methods + +### \ + +Public no-arg constructor so callers can manage their own +external-paths list. + +The static registry is unaffected. + +#### Signature + +```java +public () +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillRegistry.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillRegistry.java) + +Line 53. + +*** + +### addSkillDirectory + +Add a directory to search for skills. + +<p>Mirrors Python's +`signalwire.skills.registry.SkillRegistry.add_skill_directory`: +validate that the path exists and is a directory, then append it +(de-duplicated) to `externalPaths`. + +Throws +`IllegalArgumentException` (the Java analog of Python's +`ValueError`) for non-existent paths or non-directories. + +**Modifiers:** `synchronized` + +#### Signature + +```java +public synchronized void addSkillDirectory(String path) +``` + +#### Parameters + + + absolute or relative path to a directory containing skill subdirectories + + +#### Throws + +- `IllegalArgumentException` — when the path doesn't exist or isn't a directory. + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillRegistry.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillRegistry.java) + +Line 110. + +*** + +### get + +Get a new instance of a skill by name. + +**Modifiers:** `static` + +#### Signature + +```java +public static SkillBase get(String name) +``` + +#### Parameters + + + +#### Returns + +`SkillBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillRegistry.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillRegistry.java) + +Line 66. + +*** + +### getAllSkillsSchema + +Get complete schema for all registered skills. + +<p>Mirrors Python's instance-method +`SkillRegistry.get_all_skills_schema()` — returns a map +keyed by skill name where each value contains parameter metadata. +Java skills don't carry rich Python-style parameter introspection +in v1, so the value defaults to a minimal shape with the skill +name; built-in skills that expose `getSkillDescription` / +`getSkillVersion` get those merged in. + +#### Signature + +```java +public Map> getAllSkillsSchema() +``` + +#### Returns + +`Map>` — ordered map of skill name to schema metadata + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillRegistry.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillRegistry.java) + +Line 146. + +*** + +### getExternalPaths + +Returns an immutable copy of the registered external skill +directories. + +Parity surface for Python's `_external_paths`. + +**Modifiers:** `synchronized` + +#### Signature + +```java +public synchronized List getExternalPaths() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillRegistry.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillRegistry.java) + +Line 129. + +*** + +### has + +Check if a skill is registered. + +**Modifiers:** `static` + +#### Signature + +```java +public static boolean has(String name) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillRegistry.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillRegistry.java) + +Line 77. + +*** + +### list + +List all registered skill names. + +**Modifiers:** `static` + +#### Signature + +```java +public static Set list() +``` + +#### Returns + +`Set` + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillRegistry.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillRegistry.java) + +Line 84. + +*** + +### register + +Register a skill factory. + +**Modifiers:** `static` + +#### Signature + +```java +public static void register(String name, Supplier factory) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillRegistry.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillRegistry.java) + +Line 58. + +*** + +### unregister + +Unregister a skill (for testing). + +**Modifiers:** `static` + +#### Signature + +```java +public static void unregister(String name) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/skills/SkillRegistry.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillRegistry.java) + +Line 91. + +## Source + +[`src/main/java/com/signalwire/sdk/skills/SkillRegistry.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillRegistry.java) + +Line 21. diff --git a/fern/products/sdk-reference/java/agents/swaig/index.mdx b/fern/products/sdk-reference/java/agents/swaig/index.mdx new file mode 100644 index 0000000000..4b987dc81d --- /dev/null +++ b/fern/products/sdk-reference/java/agents/swaig/index.mdx @@ -0,0 +1,26 @@ +--- +slug: "/reference/java/agents/swaig" +title: "swaig" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "com.signalwire.sdk.swaig" + parent: "agents" + module: "agents" +--- +# `swaig` + +## Signature + +```java +package com.signalwire.sdk.swaig +``` + +## Modules + + + + diff --git a/fern/products/sdk-reference/java/agents/swaig/swaig/function-result/index.mdx b/fern/products/sdk-reference/java/agents/swaig/swaig/function-result/index.mdx new file mode 100644 index 0000000000..da5e634cb7 --- /dev/null +++ b/fern/products/sdk-reference/java/agents/swaig/swaig/function-result/index.mdx @@ -0,0 +1,2454 @@ +--- +slug: "/reference/java/agents/swaig/swaig/function-result" +title: "FunctionResult" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.swaig.FunctionResult" + parent: "agents.swaig.swaig" + module: "agents.swaig.swaig" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java" + visibility: "public" +--- +# `FunctionResult` + +SwaigFunctionResult - the response builder returned by tool handlers. + +<p> +Every method returns `this` for fluent chaining. + +Contains 40+ action methods +covering call control, state management, media, speech/AI config, and advanced features. + +<p> +Serialization rules: +<ul> + <li>response - always included (string)</li> + <li>action - only included if at least one action exists (array of objects)</li> + <li>post_process - only included if true and actions exist (boolean)</li> +</ul> + +## Signature + +```java +public class FunctionResult +``` + +## Constants + + + Default `ai_response` for `#pay`. Set as a `set` verb ahead of the `pay` verb so the AI relays the payment outcome via the `${pay_result`\} variable. Caller-overridable through the full-arity `pay(...)` overload. + + +## Methods + +### \ + +#### Signature + + + + ```java + public () + ``` + + + + ```java + public (String response) + ``` + + + + ```java + public (String response, boolean postProcess) + ``` + + + +#### Parameters (Overload 2) + + + +#### Parameters (Overload 3) + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 38. + +*** + +### addAction + +Add a single action to the response. + +#### Signature + +```java +public FunctionResult addAction(String name, Object data) +``` + +#### Parameters + + + + + +#### Returns + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 67. + +*** + +### addActions + +Add multiple actions. + +#### Signature + +```java +public FunctionResult addActions(List> actionList) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 77. + +*** + +### addDynamicHints + +#### Signature + +```java +public FunctionResult addDynamicHints(List hints) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 439. + +*** + +### clearDynamicHints + +#### Signature + +```java +public FunctionResult clearDynamicHints() +``` + +#### Returns + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 443. + +*** + +### connect + +Connect/transfer the call to another destination via SWML connect verb. + +#### Signature + + + + ```java + public FunctionResult connect(String destination, boolean isFinal, String from) + ``` + + + + ```java + public FunctionResult connect(String destination, boolean isFinal) + ``` + + + +#### Parameters (Overload 1) + + + + + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`FunctionResult` + +#### Returns (Overload 2) + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 87. + +*** + +### createPaymentAction + +**Modifiers:** `static` + +#### Signature + +```java +public static Map createPaymentAction( + String actionType, + String phrase +) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 1074. + +*** + +### createPaymentParameter + +**Modifiers:** `static` + +#### Signature + +```java +public static Map createPaymentParameter( + String name, + String value +) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 1078. + +*** + +### createPaymentPrompt + +**Modifiers:** `static` + +#### Signature + +```java +public static Map createPaymentPrompt( + String forSituation, + List> payActions, + String cardType, + String errorType +) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 1063. + +*** + +### enableExtensiveData + +#### Signature + +```java +public FunctionResult enableExtensiveData(boolean enabled) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 466. + +*** + +### enableFunctionsOnTimeout + +#### Signature + +```java +public FunctionResult enableFunctionsOnTimeout(boolean enabled) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 462. + +*** + +### executeRpc + +Execute an RPC method via SWML. + +#### Signature + + + + ```java + public FunctionResult executeRpc( + String method, + Map params, + String callId, + String nodeId + ) + ``` + + + + ```java + public FunctionResult executeRpc(String method, Map params) + ``` + + + +#### Parameters (Overload 1) + + + + + + + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`FunctionResult` + +#### Returns (Overload 2) + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 972. + +*** + +### executeSwml + +Execute SWML content with optional transfer behavior. + +#### Signature + + + + ```java + public FunctionResult executeSwml(Object swmlContent, boolean transfer) + ``` + + + + ```java + public FunctionResult executeSwml(Object swmlContent) + ``` + + + +#### Parameters (Overload 1) + + + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`FunctionResult` + +#### Returns (Overload 2) + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 482. + +*** + +### getActions + +#### Signature + +```java +public List> getActions() +``` + +#### Returns + +`List>` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 1117. + +*** + +### getResponse + +#### Signature + +```java +public String getResponse() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 1113. + +*** + +### hangup + +Hangup the call. + +#### Signature + +```java +public FunctionResult hangup() +``` + +#### Returns + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 128. + +*** + +### hold + +Put the call on hold (timeout clamped 0-900). + +#### Signature + +```java +public FunctionResult hold(int timeout) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 135. + +*** + +### isPostProcess + +#### Signature + +```java +public boolean isPostProcess() +``` + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 1121. + +*** + +### joinConference + +Join an ad-hoc audio conference with RELAY and CXML calls using SWML. + +<p> +Functional parity with the Python reference +`signalwire.core.function_result.FunctionResult.join_conference`. +Every optional parameter the reference exposes is a positional argument +here, with the same default and the same validation. + +Hold music is +`waitUrl` (snake\_case wire key `wait_url`) — there is no +separate "hold audio" parameter; the reference uses `wait_url`. + +#### Signature + + + + ```java + public FunctionResult joinConference( + String name, + boolean muted, + String beep, + boolean startOnEnter, + boolean endOnExit, + String waitUrl, + int maxParticipants, + String record, + String region, + String trim, + String coach, + String statusCallbackEvent, + String statusCallback, + String statusCallbackMethod, + String recordingStatusCallback, + String recordingStatusCallbackMethod, + String recordingStatusCallbackEvent, + Object result + ) + ``` + + + + ```java + public FunctionResult joinConference(String name) + ``` + + + +#### Parameters (Overload 1) + + + conference name (required, must be non-blank) + + + + join muted (default `false`) + + + + "true", "false", "onEnter", "onExit" (default "true") + + + + conference starts when this participant enters (default `true`) + + + + conference ends when this participant exits (default `false`) + + + + SWML URL for hold music (`null` for default) + + + + maximum participants, 1..250 (default 250) + + + + "do-not-record" or "record-from-start" (default "do-not-record") + + + + conference region (`null` for default) + + + + "trim-silence" or "do-not-trim" (default "trim-silence") + + + + SWML Call ID / CXML CallSid for coaching (`null` for none) + + + + space-separated status events (`null` for none) + + + + URL for status callbacks (`null` for none) + + + + "GET" or "POST" (default "POST") + + + + URL for recording status callbacks (`null` for none) + + + + "GET" or "POST" (default "POST") + + + + recording events (default "completed") + + + + switch-on-return value/cond (`null` for none) + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`FunctionResult` — this, for chaining + +#### Returns (Overload 2) + +`FunctionResult` + +#### Throws + +- `IllegalArgumentException` — if any validated value is invalid + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 541. + +*** + +### joinRoom + +Join a RELAY room. + +#### Signature + +```java +public FunctionResult joinRoom(String name) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 661. + +*** + +### pay + +Process payment via SWML pay action — full parity with the Python +reference `signalwire.core.function_result.FunctionResult.pay`. + +<p> +Every optional parameter the reference exposes is a positional argument +here, in the same order, with the same default and the same emitted +wire key. + +The reference ALWAYS emits `payment_connector_url`, +`input`, `payment_method`, `timeout`, `max_attempts`, +`security_code`, `min_postal_code_length`, `token_type`, +`currency`, `language`, `voice`, `valid_card_types` +and `postal_code`; `status_url`, `charge_amount`, +`description`, `parameters` and `prompts` are emitted +only when supplied. Numeric values are stringified to match Python's +`str(...)`. A `set` verb carrying `ai_response` is +emitted before the `pay` verb. + +#### Signature + + + + ```java + public FunctionResult pay( + String connectorUrl, + String inputMethod, + String statusUrl, + String paymentMethod, + int timeout, + int maxAttempts, + boolean securityCode, + Object postalCode, + int minPostalCodeLength, + String tokenType, + String chargeAmount, + String currency, + String language, + String voice, + String description, + String validCardTypes, + List> parameters, + List> prompts, + String aiResponse + ) + ``` + + + + ```java + public FunctionResult pay( + String connectorUrl, + String inputMethod, + String statusUrl, + int timeout, + int maxAttempts + ) + ``` + + + +#### Parameters (Overload 1) + + + payment connector URL (required) + + + + "dtmf" (the SWML schema is `const:"dtmf"`; default "dtmf") + + + + URL for status-change notifications (`null` to omit) + + + + payment method (default "credit-card") + + + + seconds to wait for next digit (default 5) + + + + retry attempts (default 1) + + + + prompt for the security code (default `true`) + + + + prompt for postal code (`Boolean`) or the literal postcode (`String`); default `Boolean.TRUE` + + + + minimum postal-code digits (default 0) + + + + "one-time" or "reusable" (default "reusable") + + + + amount to charge, decimal string (`null` to omit) + + + + currency code (default "usd") + + + + prompt language (default "en-US") + + + + TTS voice (default "woman") + + + + custom payment description (`null` to omit) + + + + space-separated card types (default "visa mastercard amex") + + + + name/value pairs for the connector (`null` to omit) + + + + custom prompt configurations (`null` to omit) + + + + `ai_response` text for the leading `set` verb (default `#DEFAULT_PAY_AI_RESPONSE`) + + +#### Parameters (Overload 2) + + + + + + + + + + + +#### Returns (Overload 1) + +`FunctionResult` — this, for chaining + +#### Returns (Overload 2) + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 906. + +*** + +### playBackgroundFile + +Play audio file in background. + +#### Signature + + + + ```java + public FunctionResult playBackgroundFile(String filename, boolean wait) + ``` + + + + ```java + public FunctionResult playBackgroundFile(String filename) + ``` + + + +#### Parameters (Overload 1) + + + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`FunctionResult` + +#### Returns (Overload 2) + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 261. + +*** + +### recordCall + +Start background call recording via SWML — full parity with the Python +reference `signalwire.core.function_result.FunctionResult.record_call`. + +<p> +Validates `format` ∈ {wav, mp3, mp4} and `direction` ∈ +{speak, listen, both} with byte-exact Python `ValueError` messages. +The reference ALWAYS emits `stereo`, `format`, `direction`, +`beep` and `input_sensitivity`; `control_id`, +`terminators`, `initial_timeout`, `end_silence_timeout`, +`max_length` and `status_url` are emitted only when supplied. + +#### Signature + + + + ```java + public FunctionResult recordCall( + String controlId, + boolean stereo, + String format, + String direction, + String terminators, + boolean beep, + double inputSensitivity, + Double initialTimeout, + Double endSilenceTimeout, + Double maxLength, + String statusUrl + ) + ``` + + + + ```java + public FunctionResult recordCall( + String controlId, + boolean stereo, + RecordFormat format, + RecordDirection direction, + String terminators, + boolean beep, + double inputSensitivity, + Double initialTimeout, + Double endSilenceTimeout, + Double maxLength, + String statusUrl + ) + ``` + + + + ```java + public FunctionResult recordCall( + String controlId, + boolean stereo, + String format, + String direction + ) + ``` + + + + ```java + public FunctionResult recordCall( + String controlId, + boolean stereo, + RecordFormat format, + String direction + ) + ``` + + + + ```java + public FunctionResult recordCall( + String controlId, + boolean stereo, + String format, + RecordDirection direction + ) + ``` + + + + ```java + public FunctionResult recordCall( + String controlId, + boolean stereo, + RecordFormat format, + RecordDirection direction + ) + ``` + + + + ```java + public FunctionResult recordCall() + ``` + + + +#### Parameters (Overload 1) + + + recording identifier (pairs with stopRecordCall; `null` to omit) + + + + record in stereo (default `false`) + + + + "wav", "mp3" or "mp4" (default "wav") + + + + "speak", "listen" or "both" (default "both") + + + + digits that stop recording (`null` to omit) + + + + play a beep before recording (default `false`; ALWAYS emitted) + + + + input sensitivity (default 44.0; ALWAYS emitted) + + + + seconds to wait for speech start (`null` to omit) + + + + seconds of trailing silence before ending (`null` to omit) + + + + maximum recording length in seconds (`null` to omit) + + + + URL for recording status events (`null` to omit) + + +#### Parameters (Overload 2) + + + + + + + + + + + + + + + + + + + + + + + +#### Parameters (Overload 3) + + + + + + + + + +#### Parameters (Overload 4) + + + + + + + + + +#### Parameters (Overload 5) + + + + + + + + + +#### Parameters (Overload 6) + + + + + + + + + +#### Returns (Overload 1) + +`FunctionResult` — this, for chaining + +#### Returns (Overload 2) + +`FunctionResult` + +#### Returns (Overload 3) + +`FunctionResult` + +#### Returns (Overload 4) + +`FunctionResult` + +#### Returns (Overload 5) + +`FunctionResult` + +#### Returns (Overload 6) + +`FunctionResult` + +#### Returns (Overload 7) + +`FunctionResult` + +#### Throws + +- `IllegalArgumentException` — if format or direction is invalid + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 304. + +*** + +### removeGlobalData + +#### Signature + +```java +public FunctionResult removeGlobalData(Object keys) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 173. + +*** + +### removeMetadata + +#### Signature + +```java +public FunctionResult removeMetadata(Object keys) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 181. + +*** + +### replaceInHistory + +Replace tool\_call+result pair in conversation history. + +#### Signature + + + + ```java + public FunctionResult replaceInHistory(String text) + ``` + + + + ```java + public FunctionResult replaceInHistory(boolean summary) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`FunctionResult` + +#### Returns (Overload 2) + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 244. + +*** + +### rpcAiMessage + +Inject a message into an AI agent on another call — full parity with the +Python reference `FunctionResult.rpc_ai_message`. + +`role` +flows through to `params.role` (Python defaults "system") instead +of being hard-coded. + +#### Signature + + + + ```java + public FunctionResult rpcAiMessage( + String callId, + String messageText, + String role + ) + ``` + + + + ```java + public FunctionResult rpcAiMessage(String callId, String messageText) + ``` + + + +#### Parameters (Overload 1) + + + target call ID (required) + + + + message text to inject (required) + + + + message role (default "system") + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`FunctionResult` — this, for chaining + +#### Returns (Overload 2) + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 1032. + +*** + +### rpcAiUnhold + +Unhold another call. + +#### Signature + +```java +public FunctionResult rpcAiUnhold(String callId) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 1050. + +*** + +### rpcDial + +Dial out to a number with a destination SWML URL — full parity with the +Python reference `FunctionResult.rpc_dial`. + +`deviceType` +flows through to `params.devices.type` (Python defaults "phone") +instead of being hard-coded. + +#### Signature + + + + ```java + public FunctionResult rpcDial( + String toNumber, + String fromNumber, + String destSwml, + String deviceType + ) + ``` + + + + ```java + public FunctionResult rpcDial( + String toNumber, + String fromNumber, + String destSwml + ) + ``` + + + +#### Parameters (Overload 1) + + + E.164 number to dial (required) + + + + E.164 caller ID (required) + + + + URL to the SWML handling the outbound leg (required) + + + + device type for the dial (default "phone") + + +#### Parameters (Overload 2) + + + + + + + +#### Returns (Overload 1) + +`FunctionResult` — this, for chaining + +#### Returns (Overload 2) + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 1001. + +*** + +### say + +#### Signature + +```java +public FunctionResult say(String text) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 254. + +*** + +### sendSms + +Send SMS via SWML — full parity with the Python reference +`signalwire.core.function_result.FunctionResult.send_sms`. +Either `body` or `media` must be supplied. + +`to_number` +and `from_number` are always emitted; `body`, `media`, +`tags` and `region` are emitted only when supplied. + +#### Signature + + + + ```java + public FunctionResult sendSms( + String toNumber, + String fromNumber, + String body, + List media, + List tags, + String region + ) + ``` + + + + ```java + public FunctionResult sendSms( + String toNumber, + String fromNumber, + String body, + List media, + List tags + ) + ``` + + + +#### Parameters (Overload 1) + + + E.164 destination (required) + + + + E.164 origin (required) + + + + message body (`null` if media supplied) + + + + media URLs (`null` if body supplied) + + + + tags for UI search (`null` to omit) + + + + region to originate the message from (`null` to omit) + + +#### Parameters (Overload 2) + + + + + + + + + + + +#### Returns (Overload 1) + +`FunctionResult` — this, for chaining + +#### Returns (Overload 2) + +`FunctionResult` + +#### Throws + +- `IllegalArgumentException` — if neither body nor media is provided + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 832. + +*** + +### setEndOfSpeechTimeout + +#### Signature + +```java +public FunctionResult setEndOfSpeechTimeout(int milliseconds) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 447. + +*** + +### setMetadata + +#### Signature + +```java +public FunctionResult setMetadata(Map data) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 177. + +*** + +### setPostProcess + +#### Signature + +```java +public FunctionResult setPostProcess(boolean postProcess) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 59. + +*** + +### setResponse + +#### Signature + +```java +public FunctionResult setResponse(String response) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 54. + +*** + +### setSpeechEventTimeout + +#### Signature + +```java +public FunctionResult setSpeechEventTimeout(int milliseconds) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 451. + +*** + +### simulateUserInput + +Queue simulated user input. + +#### Signature + +```java +public FunctionResult simulateUserInput(String text) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 1057. + +*** + +### sipRefer + +Send SIP REFER. + +#### Signature + +```java +public FunctionResult sipRefer(String toUri) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 671. + +*** + +### stop + +Stop the agent execution. + +#### Signature + +```java +public FunctionResult stop() +``` + +#### Returns + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 163. + +*** + +### stopBackgroundFile + +#### Signature + +```java +public FunctionResult stopBackgroundFile() +``` + +#### Returns + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 275. + +*** + +### stopRecordCall + +Stop an active background call recording. + +#### Signature + + + + ```java + public FunctionResult stopRecordCall(String controlId) + ``` + + + + ```java + public FunctionResult stopRecordCall() + ``` + + + +#### Parameters (Overload 1) + + + +#### Returns (Overload 1) + +`FunctionResult` + +#### Returns (Overload 2) + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 422. + +*** + +### stopTap + +Stop a tap stream. + +#### Signature + + + + ```java + public FunctionResult stopTap(String controlId) + ``` + + + + ```java + public FunctionResult stopTap() + ``` + + + +#### Parameters (Overload 1) + + + +#### Returns (Overload 1) + +`FunctionResult` + +#### Returns (Overload 2) + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 801. + +*** + +### switchContext + +Switch context with optional reset parameters. + +#### Signature + + + + ```java + public FunctionResult switchContext( + String systemPrompt, + String userPrompt, + boolean consolidate, + boolean fullReset + ) + ``` + + + + ```java + public FunctionResult switchContext(String systemPrompt) + ``` + + + +#### Parameters (Overload 1) + + + + + + + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`FunctionResult` + +#### Returns (Overload 2) + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 214. + +*** + +### swmlChangeContext + +Change the conversation context. + +#### Signature + +```java +public FunctionResult swmlChangeContext(String contextName) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 207. + +*** + +### swmlChangeStep + +Change the conversation step. + +#### Signature + +```java +public FunctionResult swmlChangeStep(String stepName) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 200. + +*** + +### swmlTransfer + +SWML transfer with AI response setup. + +#### Signature + +```java +public FunctionResult swmlTransfer( + String dest, + String aiResponse, + boolean isFinal +) +``` + +#### Parameters + + + + + + + +#### Returns + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 111. + +*** + +### swmlUserEvent + +Send a user event through SWML. + +#### Signature + +```java +public FunctionResult swmlUserEvent(Map eventData) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 188. + +*** + +### tap + +Start a background call tap via SWML — full parity with the Python +reference `signalwire.core.function_result.FunctionResult.tap`. + +<p> +Validates `direction` ∈ {speak, hear, both}, `codec` ∈ +{PCMU, PCMA}, and > 0 with byte-exact Python +`ValueError` messages (rendered through +`IllegalArgumentException`). + +Only `uri` is always emitted; +each other key is emitted only when it differs from its reference +default (!= "both", != "PCMU", +!= 20), plus `control_id` and `status_url` +when supplied. + +#### Signature + + + + ```java + public FunctionResult tap( + String uri, + String controlId, + String direction, + String codec, + int rtpPtime, + String statusUrl + ) + ``` + + + + ```java + public FunctionResult tap( + String uri, + String controlId, + TapDirection direction, + Codec codec, + int rtpPtime, + String statusUrl + ) + ``` + + + + ```java + public FunctionResult tap( + String uri, + String controlId, + String direction, + String codec + ) + ``` + + + + ```java + public FunctionResult tap( + String uri, + String controlId, + TapDirection direction, + String codec + ) + ``` + + + + ```java + public FunctionResult tap( + String uri, + String controlId, + String direction, + Codec codec + ) + ``` + + + + ```java + public FunctionResult tap( + String uri, + String controlId, + TapDirection direction, + Codec codec + ) + ``` + + + +#### Parameters (Overload 1) + + + tap media-stream destination (required; rtp://, ws://, wss://) + + + + tap identifier (`null` for an auto-generated one) + + + + "speak", "hear" or "both" (default "both") + + + + "PCMU" or "PCMA" (default "PCMU") + + + + RTP packetization time in ms, > 0 (default 20) + + + + URL for status-change requests (`null` to omit) + + +#### Parameters (Overload 2) + + + + + + + + + + + + + +#### Parameters (Overload 3) + + + + + + + + + +#### Parameters (Overload 4) + + + + + + + + + +#### Parameters (Overload 5) + + + + + + + + + +#### Parameters (Overload 6) + + + + + + + + + +#### Returns (Overload 1) + +`FunctionResult` — this, for chaining + +#### Returns (Overload 2) + +`FunctionResult` + +#### Returns (Overload 3) + +`FunctionResult` + +#### Returns (Overload 4) + +`FunctionResult` + +#### Returns (Overload 5) + +`FunctionResult` + +#### Returns (Overload 6) + +`FunctionResult` + +#### Throws + +- `IllegalArgumentException` — if direction, codec or rtp\_ptime is invalid + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 700. + +*** + +### toggleFunctions + +Toggle specific SWAIG functions on/off. + +#### Signature + +```java +public FunctionResult toggleFunctions(List> toggles) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 458. + +*** + +### toJson + +Render as JSON string. + +#### Signature + +```java +public String toJson() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 1107. + +*** + +### toMap + +Convert to the Map structure expected by SWAIG. + +#### Signature + +```java +public Map toMap() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 1087. + +*** + +### updateGlobalData + +#### Signature + +```java +public FunctionResult updateGlobalData(Map data) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 169. + +*** + +### updateSettings + +Update agent runtime settings (temperature, top\_p, etc.). + +#### Signature + +```java +public FunctionResult updateSettings(Map settings) +``` + +#### Parameters + + + +#### Returns + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 473. + +*** + +### waitForUser + +Control how agent waits for user input. + +#### Signature + + + + ```java + public FunctionResult waitForUser( + Boolean enabled, + Integer timeout, + boolean answerFirst + ) + ``` + + + + ```java + public FunctionResult waitForUser() + ``` + + + +#### Parameters (Overload 1) + + + + + + + +#### Returns (Overload 1) + +`FunctionResult` + +#### Returns (Overload 2) + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 142. + +## Source + +[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) + +Line 30. diff --git a/fern/products/sdk-reference/java/agents/swaig/swaig/index.mdx b/fern/products/sdk-reference/java/agents/swaig/swaig/index.mdx new file mode 100644 index 0000000000..b8c0677e55 --- /dev/null +++ b/fern/products/sdk-reference/java/agents/swaig/swaig/index.mdx @@ -0,0 +1,87 @@ +--- +slug: "/reference/java/agents/swaig/swaig" +title: "swaig" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "agents.swaig.swaig" + parent: "com.signalwire.sdk.swaig" + module: "agents.swaig" +--- +# `swaig` + +## Classes + + + + SwaigFunctionResult - the response builder returned by tool handlers. <p> Every method returns `this` for fluent chaining. + + + + Typed, fluent builder for the JSON-Schema `parameters` blob that a `ToolDefinition` (and `com.signalwire.sdk.agent.AgentBase#defineTool`) takes. <p>Today the `parameters` argument is a hand-written, untyped `Map` of nested maps — the JSON Schema spelled out by hand: <pre>Object> params = new LinkedHashMap\<>(); params.put("type", "object"); params.put("properties", Map.of( "service", Map.of("type", "string", "description", "The service"), "date", Map.of("type", "string", "description", "YYYY-MM-DD"))); params.put("required", List.of("service", "date"));</pre> <p>That is easy to typo (a wrong `"type"` value, a misspelled key, a required name that doesn't match a property) and only fails at runtime on the server. + + + + Defines a SWAIG tool with its name, description, parameters, and handler. + + + +## Modules + + + + + +## Interfaces + +### ToolHandler + +Functional interface for SWAIG tool handlers. +Called when the platform invokes a tool during a conversation. + +#### Signature + +```java +public interface ToolHandler +``` + +#### Methods + +##### handle + +Handle a SWAIG tool invocation. + +###### Signature + +```java +FunctionResult handle(Map args, Map rawData) +``` + +###### Parameters + + + Parsed arguments from the tool call + + + + Full raw request payload for accessing call info, global data, etc. + + +###### Returns + +`FunctionResult` — A FunctionResult with the response text and optional actions + +###### Source + +[`src/main/java/com/signalwire/sdk/swaig/ToolHandler.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ToolHandler.java) + +Line 19. + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/ToolHandler.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ToolHandler.java) + +Line 10. diff --git a/fern/products/sdk-reference/java/agents/swaig/swaig/parameter-schema/builder/index.mdx b/fern/products/sdk-reference/java/agents/swaig/swaig/parameter-schema/builder/index.mdx new file mode 100644 index 0000000000..27d763e6b2 --- /dev/null +++ b/fern/products/sdk-reference/java/agents/swaig/swaig/parameter-schema/builder/index.mdx @@ -0,0 +1,547 @@ +--- +slug: "/reference/java/agents/swaig/swaig/parameter-schema/builder" +title: "Builder" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.swaig.ParameterSchema.Builder" + parent: "agents.swaig.swaig.ParameterSchema" + module: "agents.swaig.swaig.ParameterSchema" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java" + visibility: "public" +--- +# `Builder` + +Fluent builder accumulating properties and required names, then emitting +the JSON-Schema `parameters` Map via `#build()`. + +**Modifiers:** `static` `final` + +## Signature + +```java +public static final class Builder +``` + +## Methods + +### array + +Add an `array` property whose items are a scalar JSON-Schema +kind (`"string"`, `"number"`, `"integer"`, +`"boolean"`). + +Produces "items":\{"type":itemType\}\}. + +#### Signature + +```java +public Builder array(String name, String itemType, String description) +``` + +#### Parameters + + + property name. + + + + the scalar item kind. + + + + LLM-facing description. + + +#### Returns + +`Builder` — this builder. + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java) + +Line 234. + +*** + +### arrayOfObjects + +Add an `array` property whose items are a nested object schema +built with another `ParameterSchema`. + +Produces +schema>\}\}. + +#### Signature + +```java +public Builder arrayOfObjects( + String name, + Map itemSchema, + String description +) +``` + +#### Parameters + + + property name. + + + + the built schema for each array element (from `Builder#build()`). + + + + LLM-facing description. + + +#### Returns + +`Builder` — this builder. + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java) + +Line 254. + +*** + +### bool + +Add a `boolean` property. + +#### Signature + +```java +public Builder bool(String name, String description) +``` + +#### Parameters + + + property name. + + + + LLM-facing description. + + +#### Returns + +`Builder` — this builder. + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java) + +Line 158. + +*** + +### build + +Build the JSON-Schema `parameters` Map. + +The result is a +`LinkedHashMap` ordered → properties → required +(with `required` omitted when empty) — byte-for-byte identical +to the hand-written nested-map form. Each call returns a fresh, +independent Map; the builder may be reused. + +#### Signature + +```java +public Map build() +``` + +#### Returns + +`Map` — the parameters Map, ready to pass to `ToolDefinition` / `defineTool`. + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java) + +Line 360. + +*** + +### defaultValue + +Set a JSON-Schema `default` on the most-recently-added +property. + +The value is emitted verbatim into the property map. + +#### Signature + +```java +public Builder defaultValue(Object value) +``` + +#### Parameters + + + the default value. + + +#### Returns + +`Builder` — this builder. + +#### Throws + +- `IllegalStateException` — if no property has been added yet. + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java) + +Line 309. + +*** + +### enumOf + +Add a closed-set `string` property whose allowed values come +from a Tier-1 `WireEnum` array — typically `RecordFormat.values()` / `Codec.values()` etc. + +Each constant +contributes its `WireEnum#getValue()` wire string, producing a +JSON-Schema `enum:[...]` of those exact strings (so it is +byte-identical to hand-writing the same string list). + +#### Signature + + + + ```java + public Builder enumOf(String name, WireEnum[] values, String description) + ``` + + + + ```java + public Builder enumOf( + String name, + Collection values, + String description + ) + ``` + + + + ```java + public Builder enumOf(String name, String description, String values) + ``` + + + +#### Parameters (Overload 1) + + + property name. + + + + the enum constants (e.g. `RecordFormat.values()`). + + + + LLM-facing description. + + +#### Parameters (Overload 2) + + + property name. + + + + the allowed values. + + + + LLM-facing description. + + +#### Parameters (Overload 3) + + + property name. + + + + LLM-facing description. + + + + the allowed values. + + +#### Returns (Overload 1) + +`Builder` — this builder. + +#### Returns (Overload 2) + +`Builder` — this builder. + +#### Returns (Overload 3) + +`Builder` — this builder. + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java) + +Line 179. + +*** + +### format + +Set a JSON-Schema `format` on the most-recently-added property. + +#### Signature + +```java +public Builder format(String format) +``` + +#### Parameters + + + the `format` value. + + +#### Returns + +`Builder` — this builder. + +#### Throws + +- `IllegalStateException` — if no property has been added yet. + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java) + +Line 321. + +*** + +### integer + +Add an `integer` property. + +#### Signature + +```java +public Builder integer(String name, String description) +``` + +#### Parameters + + + property name. + + + + LLM-facing description. + + +#### Returns + +`Builder` — this builder. + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java) + +Line 147. + +*** + +### number + +Add a `number` (floating-point) property. + +#### Signature + +```java +public Builder number(String name, String description) +``` + +#### Parameters + + + property name. + + + + LLM-facing description. + + +#### Returns + +`Builder` — this builder. + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java) + +Line 136. + +*** + +### object + +Add a nested `object` property whose schema is built with +another `ParameterSchema`. + +The nested schema's `type`, +`properties` (and `required`, if any) are merged in +alongside this property's `description`, producing +`{"type":"object","description":…,"properties":{…`\}\}. + +**Decorators:** `@SuppressWarnings` + +#### Signature + +```java +public Builder object( + String name, + Map objectSchema, + String description +) +``` + +#### Parameters + + + property name. + + + + the built nested schema (from `Builder#build()`). + + + + LLM-facing description. + + +#### Returns + +`Builder` — this builder. + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java) + +Line 277. + +*** + +### required + +Mark one or more properties as required. + +Names are kept in +declaration order and de-duplicated; calling this multiple times +accumulates. If no name is ever marked required, the built schema +omits the `required` key entirely. + +#### Signature + +```java +public Builder required(String names) +``` + +#### Parameters + + + property names to require. + + +#### Returns + +`Builder` — this builder. + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java) + +Line 339. + +*** + +### string + +Add a `string` property. + +#### Signature + + + + ```java + public Builder string(String name, String description) + ``` + + + + ```java + public Builder string(String name, String description, String format) + ``` + + + +#### Parameters (Overload 1) + + + property name (the JSON object key). + + + + LLM-facing description of the argument. + + +#### Parameters (Overload 2) + + + property name. + + + + LLM-facing description. + + + + the JSON-Schema `format` value. + + +#### Returns (Overload 1) + +`Builder` — this builder. + +#### Returns (Overload 2) + +`Builder` — this builder. + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java) + +Line 107. + +## Source + +[`src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java) + +Line 86. diff --git a/fern/products/sdk-reference/java/agents/swaig/swaig/parameter-schema/index.mdx b/fern/products/sdk-reference/java/agents/swaig/swaig/parameter-schema/index.mdx new file mode 100644 index 0000000000..88d1074025 --- /dev/null +++ b/fern/products/sdk-reference/java/agents/swaig/swaig/parameter-schema/index.mdx @@ -0,0 +1,105 @@ +--- +slug: "/reference/java/agents/swaig/swaig/parameter-schema" +title: "ParameterSchema" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.swaig.ParameterSchema" + parent: "agents.swaig.swaig" + module: "agents.swaig.swaig" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java" + visibility: "public" +--- +# `ParameterSchema` + +Typed, fluent builder for the JSON-Schema `parameters` blob that a +`ToolDefinition` (and `com.signalwire.sdk.agent.AgentBase#defineTool`) takes. + +<p>Today the `parameters` argument is a hand-written, untyped +`Map<String,Object>` of nested maps — the JSON Schema spelled out by +hand: + +<pre>Object> params = new LinkedHashMap<>(); +params.put("type", "object"); +params.put("properties", Map.of( + "service", Map.of("type", "string", "description", "The service"), + "date", Map.of("type", "string", "description", "YYYY-MM-DD"))); +params.put("required", List.of("service", "date"));</pre> + +<p>That is easy to typo (a wrong `"type"` value, a misspelled key, a +required name that doesn't match a property) and only fails at runtime on the +server. + +This builder constructs the <strong>exact same wire shape</strong> +type-safely: + +<pre>Object> params = ParameterSchema.builder() + .string("service", "The service") + .string("date", "YYYY-MM-DD") + .enumOf("fmt", RecordFormat.values(), "format") // Tier-1 enum → enum:[mp3,wav,mp4] + .required("service", "date") + .build(); + +agent.defineTool(new ToolDefinition("book", "Book a service", params, handler));</pre> + +<p><strong>This is a typed convenience over the SAME output, not a new +format.</strong> `#build()` returns a plain `Map<String,Object>` +that is byte-for-byte identical to the hand-written form above and is used +exactly the same way as the `parameters` argument — the untyped Map +path keeps working unchanged. The builder is purely additive. + +<p>Supported property kinds: `string`, `number`, `integer`, +`boolean`, `enum` (a closed set — either the Tier-1 +`WireEnum` enums via WireEnum[], String), +each contributing its `WireEnum#getValue()`, or a bare string set), +`array` (of a kind), and `object` (a nested schema built with +another `ParameterSchema`). Every property carries a `description` +and may also set `default`, `format`, or `enum`. + +<p>Insertion order is preserved: `properties` keeps the order the +properties were declared, each property map orders its keys +→ description → enum → default → format → items → properties, +and `required` keeps declaration order (de-duplicated). The +`required` key is omitted entirely when no property is marked required, +matching the hand-written convention of not emitting an empty list. + +**Modifiers:** `final` + +## Signature + +```java +public final class ParameterSchema +``` + +## Methods + +### builder + +Start a new schema builder. + +**Modifiers:** `static` + +#### Signature + +```java +public static Builder builder() +``` + +#### Returns + +`Builder` — a fresh `Builder`. + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java) + +Line 78. + +## Source + +[`src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java) + +Line 67. diff --git a/fern/products/sdk-reference/java/agents/swaig/swaig/parameter-schema/index__2.mdx b/fern/products/sdk-reference/java/agents/swaig/swaig/parameter-schema/index__2.mdx new file mode 100644 index 0000000000..9f31886fa4 --- /dev/null +++ b/fern/products/sdk-reference/java/agents/swaig/swaig/parameter-schema/index__2.mdx @@ -0,0 +1,22 @@ +--- +slug: "/reference/java/agents/swaig/swaig/parameter-schema/index__2" +title: "ParameterSchema" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "agents.swaig.swaig.ParameterSchema" + parent: "agents.swaig.swaig" + module: "agents.swaig.swaig" +--- +# `ParameterSchema` + +## Classes + + + + Fluent builder accumulating properties and required names, then emitting the JSON-Schema `parameters` Map via `#build()`. + + diff --git a/fern/products/sdk-reference/java/agents/swaig/swaig/tool-definition/index.mdx b/fern/products/sdk-reference/java/agents/swaig/swaig/tool-definition/index.mdx new file mode 100644 index 0000000000..a0ca4e474c --- /dev/null +++ b/fern/products/sdk-reference/java/agents/swaig/swaig/tool-definition/index.mdx @@ -0,0 +1,282 @@ +--- +slug: "/reference/java/agents/swaig/swaig/tool-definition" +title: "ToolDefinition" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.swaig.ToolDefinition" + parent: "agents.swaig.swaig" + module: "agents.swaig.swaig" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java" + visibility: "public" +--- +# `ToolDefinition` + +Defines a SWAIG tool with its name, description, parameters, and handler. + +## Signature + +```java +public class ToolDefinition +``` + +## Methods + +### \ + +#### Signature + +```java +public ( + String name, + String description, + Map parameters, + ToolHandler handler +) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java) + +Line 16. + +*** + +### getDescription + +#### Signature + +```java +public String getDescription() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java) + +Line 24. + +*** + +### getExtraFields + +#### Signature + +```java +public Map getExtraFields() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java) + +Line 39. + +*** + +### getHandler + +#### Signature + +```java +public ToolHandler getHandler() +``` + +#### Returns + +`ToolHandler` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java) + +Line 26. + +*** + +### getName + +#### Signature + +```java +public String getName() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java) + +Line 23. + +*** + +### getParameters + +#### Signature + +```java +public Map getParameters() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java) + +Line 25. + +*** + +### hasHandler + +Check if this tool has a handler (as opposed to DataMap tools which don't). + +#### Signature + +```java +public boolean hasHandler() +``` + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java) + +Line 68. + +*** + +### isSecure + +#### Signature + +```java +public boolean isSecure() +``` + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java) + +Line 27. + +*** + +### setExtraFields + +#### Signature + +```java +public ToolDefinition setExtraFields(Map extraFields) +``` + +#### Parameters + + + +#### Returns + +`ToolDefinition` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java) + +Line 34. + +*** + +### setSecure + +#### Signature + +```java +public ToolDefinition setSecure(boolean secure) +``` + +#### Parameters + + + +#### Returns + +`ToolDefinition` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java) + +Line 29. + +*** + +### toSwaigFunction + +Serialize to SWAIG function format for SWML. + +#### Signature + +```java +public Map toSwaigFunction( + String webhookUrl, + String metaDataToken +) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java) + +Line 46. + +## Source + +[`src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java) + +Line 8. diff --git a/fern/products/sdk-reference/java/agents/swml/index.mdx b/fern/products/sdk-reference/java/agents/swml/index.mdx new file mode 100644 index 0000000000..566bddc337 --- /dev/null +++ b/fern/products/sdk-reference/java/agents/swml/index.mdx @@ -0,0 +1,26 @@ +--- +slug: "/reference/java/agents/swml" +title: "swml" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "com.signalwire.sdk.swml" + parent: "agents" + module: "agents" +--- +# `swml` + +## Signature + +```java +package com.signalwire.sdk.swml +``` + +## Modules + + + + diff --git a/fern/products/sdk-reference/java/agents/swml/swml/document/index.mdx b/fern/products/sdk-reference/java/agents/swml/swml/document/index.mdx new file mode 100644 index 0000000000..c9bdc43292 --- /dev/null +++ b/fern/products/sdk-reference/java/agents/swml/swml/document/index.mdx @@ -0,0 +1,290 @@ +--- +slug: "/reference/java/agents/swml/swml/document" +title: "Document" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.swml.Document" + parent: "agents.swml.swml" + module: "agents.swml.swml" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Document.java" + visibility: "public" +--- +# `Document` + +SWML Document model. + +<p> +A document has a version, sections (each a list of verbs), and a top-level +verbs list that maps to the "main" section. + +## Signature + +```java +public class Document +``` + +## Methods + +### \ + +#### Signature + +```java +public () +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Document.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Document.java) + +Line 27. + +*** + +### addSection + +Add a named section. + +If the section already exists, returns the existing list. + +#### Signature + +```java +public List> addSection(String name) +``` + +#### Parameters + + + +#### Returns + +`List>` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Document.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Document.java) + +Line 45. + +*** + +### addVerb + +Add a verb to the main section. + +#### Signature + +```java +public void addVerb(String verbName, Object verbData) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Document.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Document.java) + +Line 59. + +*** + +### addVerbToSection + +Add a verb to a named section. + +#### Signature + +```java +public void addVerbToSection( + String sectionName, + String verbName, + Object verbData +) +``` + +#### Parameters + + + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Document.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Document.java) + +Line 68. + +*** + +### getSectionVerbs + +Get verbs for a named section. + +#### Signature + +```java +public List> getSectionVerbs(String name) +``` + +#### Parameters + + + +#### Returns + +`List>` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Document.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Document.java) + +Line 85. + +*** + +### getVerbs + +Get the main verbs list. + +#### Signature + +```java +public List> getVerbs() +``` + +#### Returns + +`List>` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Document.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Document.java) + +Line 78. + +*** + +### hasSection + +Check whether a section exists. + +#### Signature + +```java +public boolean hasSection(String name) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Document.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Document.java) + +Line 52. + +*** + +### render + +Render as compact JSON. + +#### Signature + +```java +public String render() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Document.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Document.java) + +Line 102. + +*** + +### renderPretty + +Render as pretty-printed JSON. + +#### Signature + +```java +public String renderPretty() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Document.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Document.java) + +Line 109. + +*** + +### reset + +Reset document to empty state. + +#### Signature + +```java +public void reset() +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Document.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Document.java) + +Line 36. + +*** + +### toMap + +Convert to a Map suitable for JSON serialization. + +#### Signature + +```java +public Map toMap() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Document.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Document.java) + +Line 92. + +## Source + +[`src/main/java/com/signalwire/sdk/swml/Document.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Document.java) + +Line 20. diff --git a/fern/products/sdk-reference/java/agents/swml/swml/index.mdx b/fern/products/sdk-reference/java/agents/swml/swml/index.mdx new file mode 100644 index 0000000000..478630858e --- /dev/null +++ b/fern/products/sdk-reference/java/agents/swml/swml/index.mdx @@ -0,0 +1,697 @@ +--- +slug: "/reference/java/agents/swml/swml" +title: "swml" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "agents.swml.swml" + parent: "com.signalwire.sdk.swml" + module: "agents.swml" +--- +# `swml` + +## Classes + + + + SWML Document model. <p> A document has a version, sections (each a list of verbs), and a top-level verbs list that maps to the "main" section. + + + + Singleton that loads schema.json from resources and extracts the 38 SWML verb definitions. <p> The extraction algorithm: <ol> <li>Parse schema.json</li> <li>For each entry in $defs.SWMLMethod.anyOf, get the $ref</li> <li>Look up the definition in $defs</li> <li>The actual verb name is the first key in properties</li> </ol> + + + + SchemaUtils — Java port of `signalwire.utils.schema_utils.SchemaUtils`. <p>Loads the SWML JSON Schema, extracts verb metadata, and validates either a single verb config or a complete SWML document.</p> <p>Construction rules mirror Python:</p> <ul> <li>Pass `schemaPath=null` to use the embedded `schema.json`.</li> <li>`schemaValidation=false` disables validation (returns valid=true for every `validateVerb` call).</li> <li>The env var `SWML_SKIP_SCHEMA_VALIDATION=1/true/yes` also disables validation regardless of the constructor argument.</li> </ul> <p>The Java port currently ships only the lightweight validator (verb existence + required-property check). + + + + SchemaValidationError — Java port of `signalwire.utils.schema_utils.SchemaValidationError`. <p>Raised when SWML schema validation of a verb config fails.</p> + + + + Base SWML service with an embedded HTTP server, basic auth, security headers, and explicit methods for all 38 schema-driven verbs. <p> Uses JDK built-in com.sun.net.httpserver.HttpServer with virtual threads. + + + +## Modules + + + + + +## Interfaces + +### WireEnum + +Marker for the typed, compile-time-checked closed-set enums whose constants +carry a canonical <em>wire string</em> (`RecordFormat`, `RecordDirection`, +`TapDirection`, `Codec`). + +<p>Every such enum already exposes `#getValue()` returning the exact +string the SignalWire platform expects on the wire (e.g. + +`"mp3"`, +`"listen"`, `"PCMU"`). This interface simply names that shared +shape so a single API can accept any of them generically — most importantly +WireEnum\[], String), +which turns `RecordFormat.values()` into a JSON-schema `enum:[...]` +of wire strings without per-enum overloads. + +<p>Because Java arrays are covariant, `RecordFormat.values()` (typed +`RecordFormat[]`) is directly usable wherever a `WireEnum[]` is +expected. The interface adds <strong>no</strong> new method to the enums — +`getValue()` already existed — so it is purely a unifying type, and +routing a value through it is byte-for-byte identical to passing its +`getValue()` string. + +<p>This is the SWAIG/SWML "has a canonical wire value" set only. It is +deliberately NOT implemented by RELAY device codecs or other open-ended +string fields — see the per-enum Javadoc for the 3-vocabulary trap. + +#### Signature + +```java +public interface WireEnum +``` + +#### Methods + +##### getValue + +The canonical wire string for this constant — the exact value the +SignalWire platform expects (e.g. + +`"mp3"` / `"listen"` / +`"PCMU"`). Equivalent to PHP's backed-enum `->value`. + +###### Signature + +```java +String getValue() +``` + +###### Returns + +`String` — the wire string as it appears on the wire. + +###### Source + +[`src/main/java/com/signalwire/sdk/swml/WireEnum.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/WireEnum.java) + +Line 36. + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/WireEnum.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/WireEnum.java) + +Line 27. + +## Enums + +### Codec + +Media codec for the SWML `tap` verb, as a typed, compile-time-checked +closed set. + +<p>The Python reference `FunctionResult.tap` validates `codec` +against "PCMA"] and raises `ValueError` on anything +else. + +The methods that take a tap codec +(String, String, Codec)) +accept this enum <em>or</em> a plain `String`. The enum gives editor +autocompletion and makes a typo fail at compile time (a bare string like +`"PCMX"` only fails at runtime, on the server). Strings keep parity +with the Python reference (which uses a bare `str`): + +<pre>"t1", "both", Codec.PCMA); // typed, autocompleted +result.tap("wss://x", "t1", "both", "PCMA"); // string still works (parity)</pre> + +<p><strong>This is the SWAIG `tap` codec set only — do NOT reuse it for +RELAY `stream`/`connect`.</strong> RELAY device codecs are a much +larger superset (e.g. `PCMU,PCMA,OPUS,G729,G722,VP8,H264`, comma-joined); +the 2-value SWAIG tap codec set is deliberately distinct and never shared. + +<p>The wire strings are upper-case (`"PCMU"` / `"PCMA"`), matching +the reference's literal list exactly. Each constant's value +is the canonical wire string, so routing a tap through the enum is +byte-for-byte identical to passing that string. + +#### Signature + +```java +public enum Codec +``` + +#### Variants + + + + + +#### Methods + +##### fromWire + +Parse a wire string into a `Codec`, or return `null` if it is +not a recognised codec. + +Matching is exact (case-sensitive), mirroring the +reference's literal \["PCMU", "PCMA"] check (so `"pcmu"` +returns `null`). The Java analog of Rust's `from_str`. + +**Modifiers:** `static` + +###### Signature + +```java +public static Codec fromWire(String wire) +``` + +###### Parameters + + + the candidate wire string (case-sensitive). + + +###### Returns + +`Codec` — the matching constant, or `null` if none matches. + +###### Source + +[`src/main/java/com/signalwire/sdk/swml/Codec.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Codec.java) + +Line 61. + +*** + +##### getValue + +The canonical (upper-case) wire string for this codec (`"PCMU"` / +`"PCMA"`). + +Equivalent to PHP's backed-enum `->value`. + +###### Signature + +```java +public String getValue() +``` + +###### Returns + +`String` — the upper-case codec name as it appears on the wire. + +###### Source + +[`src/main/java/com/signalwire/sdk/swml/Codec.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Codec.java) + +Line 48. + +*** + +##### valueOf + +**Modifiers:** `static` + +###### Signature + +```java +public static Codec valueOf(String name) +``` + +###### Parameters + + + +###### Returns + +`Codec` + +###### Source + +[`src/main/java/com/signalwire/sdk/swml/Codec.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Codec.java) + +*** + +##### values + +**Modifiers:** `static` + +###### Signature + +```java +public static Codec[] values() +``` + +###### Returns + +`Codec[]` + +###### Source + +[`src/main/java/com/signalwire/sdk/swml/Codec.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Codec.java) + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Codec.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Codec.java) + +Line 31. + +*** + +### RecordDirection + +Audio direction for the SWML `record_call` verb, as a typed, +compile-time-checked closed set. + +<p>The Python reference `FunctionResult.record_call` validates +`direction` against "listen", "both"] and raises +`ValueError` on anything else. + +The methods that take a record +direction +(boolean, String, RecordDirection)) +accept this enum <em>or</em> a plain `String`. The enum gives editor +autocompletion and makes a typo fail at compile time (a bare string like +`"listenn"` only fails at runtime, on the server). Strings keep parity +with the Python reference (which uses a bare `str`): + +<pre>true, "mp3", RecordDirection.LISTEN); // typed, autocompleted +result.recordCall("rec1", true, "mp3", "listen"); // string still works (parity)</pre> + +<p><strong>This is a DIFFERENT set from `TapDirection`.</strong> +`record_call` uses `listen` where `tap` uses `hear`, +mirroring the reference's two separate validation lists — the two sets are +modelled as two distinct enums and are never shared (see the 3-vocabulary +trap: SWML `record_call` `{speak,listen,both`} vs SWML +`tap` `{speak,hear,both`} vs RELAY `{listen,speak,both`}). + +<p>Each constant's value is the canonical wire string, so +routing a recording through the enum is byte-for-byte identical to passing +that string. + +#### Signature + +```java +public enum RecordDirection +``` + +#### Variants + + + + + + + +#### Methods + +##### fromWire + +Parse a wire string into a `RecordDirection`, or return +`null` if it is not a recognised direction (the same strings the +Python reference would reject with `ValueError`). + +Note `"hear"` +is valid for `TapDirection` but NOT for `record_call`, so it +returns `null` here. The Java analog of Rust's `from_str`. + +**Modifiers:** `static` + +###### Signature + +```java +public static RecordDirection fromWire(String wire) +``` + +###### Parameters + + + the candidate wire string (case-sensitive). + + +###### Returns + +`RecordDirection` — the matching constant, or `null` if none matches. + +###### Source + +[`src/main/java/com/signalwire/sdk/swml/RecordDirection.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/RecordDirection.java) + +Line 66. + +*** + +##### getValue + +The canonical wire string for this direction (`"speak"` / +`"listen"` / `"both"`). + +Equivalent to PHP's backed-enum +`->value`. + +###### Signature + +```java +public String getValue() +``` + +###### Returns + +`String` — the lower-case direction name as it appears on the wire. + +###### Source + +[`src/main/java/com/signalwire/sdk/swml/RecordDirection.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/RecordDirection.java) + +Line 52. + +*** + +##### valueOf + +**Modifiers:** `static` + +###### Signature + +```java +public static RecordDirection valueOf(String name) +``` + +###### Parameters + + + +###### Returns + +`RecordDirection` + +###### Source + +[`src/main/java/com/signalwire/sdk/swml/RecordDirection.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/RecordDirection.java) + +*** + +##### values + +**Modifiers:** `static` + +###### Signature + +```java +public static RecordDirection[] values() +``` + +###### Returns + +`RecordDirection[]` + +###### Source + +[`src/main/java/com/signalwire/sdk/swml/RecordDirection.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/RecordDirection.java) + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/RecordDirection.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/RecordDirection.java) + +Line 33. + +*** + +### RecordFormat + +Audio container format for call recording, as a typed, compile-time-checked +closed set. + +<p>The SWML `record_call` verb (and the SignalWire calling REST API) +accept a fixed set of recording formats — `mp3`, `wav`, and +`mp4`. + +The methods that take a format +(boolean, RecordFormat, String) +and the `recordFormat(RecordFormat)` builder setter) accept this enum <em>or</em> a plain `String`. The enum gives editor autocompletion and +makes a typo fail at compile time (a bare string like `"mp33"` only +fails at runtime, on the server). Strings keep parity with the Python +reference (which uses a bare `str`): + +<pre>true, RecordFormat.MP3, "both"); // typed, autocompleted +result.recordCall(null, true, "mp3", "both"); // string still works (parity) +AgentBase.builder().recordFormat(RecordFormat.WAV); // typed builder +AgentBase.builder().recordFormat("wav"); // string still works (parity)</pre> + +<p>Each constant's value is the canonical wire string, so +routing a recording through the enum is byte-for-byte identical to passing +that string. + +#### Signature + +```java +public enum RecordFormat +``` + +#### Variants + + + + + + + +#### Methods + +##### getValue + +The canonical wire string for this format (`"mp3"` / `"wav"` / +`"mp4"`). + +Equivalent to PHP's backed-enum `->value`. + +###### Signature + +```java +public String getValue() +``` + +###### Returns + +`String` — the lower-case format name as it appears on the wire. + +###### Source + +[`src/main/java/com/signalwire/sdk/swml/RecordFormat.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/RecordFormat.java) + +Line 46. + +*** + +##### valueOf + +**Modifiers:** `static` + +###### Signature + +```java +public static RecordFormat valueOf(String name) +``` + +###### Parameters + + + +###### Returns + +`RecordFormat` + +###### Source + +[`src/main/java/com/signalwire/sdk/swml/RecordFormat.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/RecordFormat.java) + +*** + +##### values + +**Modifiers:** `static` + +###### Signature + +```java +public static RecordFormat[] values() +``` + +###### Returns + +`RecordFormat[]` + +###### Source + +[`src/main/java/com/signalwire/sdk/swml/RecordFormat.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/RecordFormat.java) + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/RecordFormat.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/RecordFormat.java) + +Line 28. + +*** + +### TapDirection + +Audio direction for the SWML `tap` verb, as a typed, +compile-time-checked closed set. + +<p>The Python reference `FunctionResult.tap` validates `direction` +against "hear", "both"] and raises `ValueError` on +anything else. + +The methods that take a tap direction +(String, TapDirection, String)) +accept this enum <em>or</em> a plain `String`. The enum gives editor +autocompletion and makes a typo fail at compile time (a bare string like +`"haer"` only fails at runtime, on the server). Strings keep parity +with the Python reference (which uses a bare `str`): + +<pre>"t1", TapDirection.HEAR, "PCMU"); // typed, autocompleted +result.tap("wss://x", "t1", "hear", "PCMU"); // string still works (parity)</pre> + +<p><strong>This is a DIFFERENT set from `RecordDirection`.</strong> +`tap` uses `hear` where `record_call` uses `listen`, +mirroring the reference's two separate validation lists — the two sets are +modelled as two distinct enums and are never shared (see the 3-vocabulary +trap: SWML `record_call` `{speak,listen,both`} vs SWML +`tap` `{speak,hear,both`} vs RELAY `{listen,speak,both`}). + +<p>Each constant's value is the canonical wire string, so +routing a tap through the enum is byte-for-byte identical to passing that +string. + +#### Signature + +```java +public enum TapDirection +``` + +#### Variants + + + + + + + +#### Methods + +##### fromWire + +Parse a wire string into a `TapDirection`, or return `null` +if it is not a recognised direction (the same strings the Python +reference would reject with `ValueError`). + +Note `"listen"` is +valid for `RecordDirection` but NOT for `tap`, so it returns +`null` here. The Java analog of Rust's `from_str`. + +**Modifiers:** `static` + +###### Signature + +```java +public static TapDirection fromWire(String wire) +``` + +###### Parameters + + + the candidate wire string (case-sensitive). + + +###### Returns + +`TapDirection` — the matching constant, or `null` if none matches. + +###### Source + +[`src/main/java/com/signalwire/sdk/swml/TapDirection.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/TapDirection.java) + +Line 65. + +*** + +##### getValue + +The canonical wire string for this direction (`"speak"` / +`"hear"` / `"both"`). + +Equivalent to PHP's backed-enum +`->value`. + +###### Signature + +```java +public String getValue() +``` + +###### Returns + +`String` — the lower-case direction name as it appears on the wire. + +###### Source + +[`src/main/java/com/signalwire/sdk/swml/TapDirection.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/TapDirection.java) + +Line 51. + +*** + +##### valueOf + +**Modifiers:** `static` + +###### Signature + +```java +public static TapDirection valueOf(String name) +``` + +###### Parameters + + + +###### Returns + +`TapDirection` + +###### Source + +[`src/main/java/com/signalwire/sdk/swml/TapDirection.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/TapDirection.java) + +*** + +##### values + +**Modifiers:** `static` + +###### Signature + +```java +public static TapDirection[] values() +``` + +###### Returns + +`TapDirection[]` + +###### Source + +[`src/main/java/com/signalwire/sdk/swml/TapDirection.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/TapDirection.java) + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/TapDirection.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/TapDirection.java) + +Line 32. diff --git a/fern/products/sdk-reference/java/agents/swml/swml/schema-utils/index.mdx b/fern/products/sdk-reference/java/agents/swml/swml/schema-utils/index.mdx new file mode 100644 index 0000000000..1ce25e1885 --- /dev/null +++ b/fern/products/sdk-reference/java/agents/swml/swml/schema-utils/index.mdx @@ -0,0 +1,349 @@ +--- +slug: "/reference/java/agents/swml/swml/schema-utils" +title: "SchemaUtils" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.swml.SchemaUtils" + parent: "agents.swml.swml" + module: "agents.swml.swml" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/SchemaUtils.java" + visibility: "public" +--- +# `SchemaUtils` + +SchemaUtils — Java port of `signalwire.utils.schema_utils.SchemaUtils`. + +<p>Loads the SWML JSON Schema, extracts verb metadata, and validates either a +single verb config or a complete SWML document.</p> + +<p>Construction rules mirror Python:</p> +<ul> + <li>Pass `schemaPath=null` to use the embedded `schema.json`.</li> + <li>`schemaValidation=false` disables validation (returns valid=true + for every `validateVerb` call).</li> + <li>The env var `SWML_SKIP_SCHEMA_VALIDATION=1/true/yes` also disables + validation regardless of the constructor argument.</li> +</ul> + +<p>The Java port currently ships only the lightweight validator (verb existence ++ required-property check). + +Full JSON Schema validation can be wired in by +extending `#initFullValidator()`. The lightweight contract matches +Python's `_validate_verb_lightweight()` exactly.</p> + +## Signature + +```java +public class SchemaUtils +``` + +## Methods + +### \ + +Construct a SchemaUtils. +Mirrors Python's schema\_validation=True). + +#### Signature + +```java +public (String schemaPath, boolean schemaValidation) +``` + +#### Parameters + + + optional path to a schema.json file; pass null to use the embedded resource bundled with the SDK jar. + + + + enables/disables schema validation. Honors `SWML_SKIP_SCHEMA_VALIDATION=1` env override. + + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/SchemaUtils.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/SchemaUtils.java) + +Line 83. + +*** + +### generateMethodBody + +Generate a Python-style method body string for a verb. +Mirrors Python's `generate_method_body(verb_name)`. + +#### Signature + +```java +public String generateMethodBody(String verbName) +``` + +#### Parameters + + + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/SchemaUtils.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/SchemaUtils.java) + +Line 329. + +*** + +### generateMethodSignature + +Generate a Python-style method signature string for a verb. +Mirrors Python's `generate_method_signature(verb_name)`. + +#### Signature + +```java +public String generateMethodSignature(String verbName) +``` + +#### Parameters + + + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/SchemaUtils.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/SchemaUtils.java) + +Line 292. + +*** + +### getAllVerbNames + +Sorted list of all known verb names. +Mirrors Python's `get_all_verb_names()`. + +#### Signature + +```java +public List getAllVerbNames() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/SchemaUtils.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/SchemaUtils.java) + +Line 178. + +*** + +### getVerbParameters + +Parameter-definition block used by code-gen tooling. +Mirrors Python's `get_verb_parameters(verb_name)`. + +#### Signature + +```java +public Map getVerbParameters(String verbName) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/SchemaUtils.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/SchemaUtils.java) + +Line 226. + +*** + +### getVerbProperties + +The `properties[verb_name]` block for a verb, or an empty map when +the verb is unknown. +Mirrors Python's `get_verb_properties(verb_name)`. + +#### Signature + +```java +public Map getVerbProperties(String verbName) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/SchemaUtils.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/SchemaUtils.java) + +Line 187. + +*** + +### getVerbRequiredProperties + +The `required` list for a verb, or an empty list when the verb is +unknown or has no required properties. +Mirrors Python's `get_verb_required_properties(verb_name)`. + +#### Signature + +```java +public List getVerbRequiredProperties(String verbName) +``` + +#### Parameters + + + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/SchemaUtils.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/SchemaUtils.java) + +Line 202. + +*** + +### isFullValidationAvailable + +Whether full JSON Schema validation is wired up. +Mirrors Python's `full_validation_available` property. + +#### Signature + +```java +public boolean isFullValidationAvailable() +``` + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/SchemaUtils.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/SchemaUtils.java) + +Line 170. + +*** + +### loadSchema + +Read and parse the JSON Schema. +Mirrors Python's `load_schema()`. + +#### Signature + +```java +public JsonObject loadSchema() +``` + +#### Returns + +`JsonObject` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/SchemaUtils.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/SchemaUtils.java) + +Line 105. + +*** + +### validateDocument + +Validate a complete SWML document. +Mirrors Python's `validate_document(document)`. + +Returns +\["Schema validator not initialized"]) when no full +validator is wired in — same contract as Python. + +#### Signature + +```java +public Map.Entry> validateDocument( + Map document +) +``` + +#### Parameters + + + +#### Returns + +`Map.Entry>` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/SchemaUtils.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/SchemaUtils.java) + +Line 279. + +*** + +### validateVerb + +Validate a verb config against the schema. +Mirrors Python's verb\_config). + +#### Signature + +```java +public Map.Entry> validateVerb( + String verbName, + Map verbConfig +) +``` + +#### Parameters + + + + + +#### Returns + +`Map.Entry>` — (`valid`, `errors`) entry; mirrors Python's List\[str]] return. + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/SchemaUtils.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/SchemaUtils.java) + +Line 244. + +## Source + +[`src/main/java/com/signalwire/sdk/swml/SchemaUtils.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/SchemaUtils.java) + +Line 51. diff --git a/fern/products/sdk-reference/java/agents/swml/swml/schema-utils/index__2.mdx b/fern/products/sdk-reference/java/agents/swml/swml/schema-utils/index__2.mdx new file mode 100644 index 0000000000..4142697a33 --- /dev/null +++ b/fern/products/sdk-reference/java/agents/swml/swml/schema-utils/index__2.mdx @@ -0,0 +1,22 @@ +--- +slug: "/reference/java/agents/swml/swml/schema-utils/index__2" +title: "SchemaUtils" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "agents.swml.swml.SchemaUtils" + parent: "agents.swml.swml" + module: "agents.swml.swml" +--- +# `SchemaUtils` + +## Classes + + + + A verb extracted from the schema. + + diff --git a/fern/products/sdk-reference/java/agents/swml/swml/schema-utils/verb-info/index.mdx b/fern/products/sdk-reference/java/agents/swml/swml/schema-utils/verb-info/index.mdx new file mode 100644 index 0000000000..96a0f29b46 --- /dev/null +++ b/fern/products/sdk-reference/java/agents/swml/swml/schema-utils/verb-info/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/java/agents/swml/swml/schema-utils/verb-info" +title: "VerbInfo" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.swml.SchemaUtils.VerbInfo" + parent: "agents.swml.swml.SchemaUtils" + module: "agents.swml.swml.SchemaUtils" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/SchemaUtils.java" + visibility: "public" +--- +# `VerbInfo` + +A verb extracted from the schema. + +**Modifiers:** `static` `final` + +## Signature + +```java +public static final class VerbInfo +``` + +## Properties + + + + + + + +## Source + +[`src/main/java/com/signalwire/sdk/swml/SchemaUtils.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/SchemaUtils.java) + +Line 62. diff --git a/fern/products/sdk-reference/java/agents/swml/swml/schema-validation-error/index.mdx b/fern/products/sdk-reference/java/agents/swml/swml/schema-validation-error/index.mdx new file mode 100644 index 0000000000..17ee4a4a30 --- /dev/null +++ b/fern/products/sdk-reference/java/agents/swml/swml/schema-validation-error/index.mdx @@ -0,0 +1,108 @@ +--- +slug: "/reference/java/agents/swml/swml/schema-validation-error" +title: "SchemaValidationError" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.swml.SchemaValidationError" + parent: "agents.swml.swml" + module: "agents.swml.swml" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/SchemaValidationError.java" + visibility: "public" +--- +# `SchemaValidationError` + +SchemaValidationError — Java port of +`signalwire.utils.schema_utils.SchemaValidationError`. + +<p>Raised when SWML schema validation of a verb config fails.</p> + +## Signature + +```java +public class SchemaValidationError extends RuntimeException +``` + +## Inheritance + +**Extends:** `RuntimeException` + +## Methods + +### \ + +Construct a SchemaValidationError. + +Mirrors Python's +errors) signature. + +#### Signature + +```java +public (String verbName, List errors) +``` + +#### Parameters + + + the verb whose validation failed + + + + the list of human-readable error messages + + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/SchemaValidationError.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/SchemaValidationError.java) + +Line 32. + +*** + +### getErrors + +#### Signature + +```java +public List getErrors() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/SchemaValidationError.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/SchemaValidationError.java) + +Line 44. + +*** + +### getVerbName + +#### Signature + +```java +public String getVerbName() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/SchemaValidationError.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/SchemaValidationError.java) + +Line 40. + +## Source + +[`src/main/java/com/signalwire/sdk/swml/SchemaValidationError.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/SchemaValidationError.java) + +Line 18. diff --git a/fern/products/sdk-reference/java/agents/swml/swml/schema/index.mdx b/fern/products/sdk-reference/java/agents/swml/swml/schema/index.mdx new file mode 100644 index 0000000000..06ca9ba417 --- /dev/null +++ b/fern/products/sdk-reference/java/agents/swml/swml/schema/index.mdx @@ -0,0 +1,159 @@ +--- +slug: "/reference/java/agents/swml/swml/schema" +title: "Schema" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.swml.Schema" + parent: "agents.swml.swml" + module: "agents.swml.swml" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Schema.java" + visibility: "public" +--- +# `Schema` + +Singleton that loads schema.json from resources and extracts the 38 SWML verb definitions. + +<p> +The extraction algorithm: +<ol> + <li>Parse schema.json</li> + <li>For each entry in $defs.SWMLMethod.anyOf, get the $ref</li> + <li>Look up the definition in $defs</li> + <li>The actual verb name is the first key in properties</li> +</ol> + +**Modifiers:** `final` + +## Signature + +```java +public final class Schema +``` + +## Methods + +### getInstance + +**Modifiers:** `static` + +#### Signature + +```java +public static Schema getInstance() +``` + +#### Returns + +`Schema` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Schema.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Schema.java) + +Line 44. + +*** + +### getVerb + +Get the full definition for a verb. + +#### Signature + +```java +public JsonObject getVerb(String name) +``` + +#### Parameters + + + +#### Returns + +`JsonObject` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Schema.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Schema.java) + +Line 125. + +*** + +### getVerbNames + +Get all verb names. + +#### Signature + +```java +public Set getVerbNames() +``` + +#### Returns + +`Set` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Schema.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Schema.java) + +Line 118. + +*** + +### isValidVerb + +Check if a verb name is valid. + +#### Signature + +```java +public boolean isValidVerb(String name) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Schema.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Schema.java) + +Line 111. + +*** + +### verbCount + +Get the number of loaded verb definitions. + +#### Signature + +```java +public int verbCount() +``` + +#### Returns + +`int` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Schema.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Schema.java) + +Line 132. + +## Source + +[`src/main/java/com/signalwire/sdk/swml/Schema.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Schema.java) + +Line 30. diff --git a/fern/products/sdk-reference/java/agents/swml/swml/service/index.mdx b/fern/products/sdk-reference/java/agents/swml/swml/service/index.mdx new file mode 100644 index 0000000000..e67533cf0f --- /dev/null +++ b/fern/products/sdk-reference/java/agents/swml/swml/service/index.mdx @@ -0,0 +1,2073 @@ +--- +slug: "/reference/java/agents/swml/swml/service" +title: "Service" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.swml.Service" + parent: "agents.swml.swml" + module: "agents.swml.swml" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java" + visibility: "public" +--- +# `Service` + +Base SWML service with an embedded HTTP server, basic auth, security headers, +and explicit methods for all 38 schema-driven verbs. + +<p> +Uses JDK built-in com.sun.net.httpserver.HttpServer with virtual threads. + +## Signature + +```java +public class Service implements AutoCloseable +``` + +## Inheritance + +**Implements:** `AutoCloseable` + +## Properties + + + + + + + + + + + + + + + + + + + + + + + +## Constants + + + HttpExchange attribute key under which the raw POST body is stashed by `#serve()` when reading it up-front for signature validation. Subclasses (notably `com.signalwire.sdk.agent.AgentBase`) check this attribute in `renderMainSwml` so they can re-use the cached body without re-reading the (already-consumed) request stream. + + +## Methods + +### \ + +#### Signature + + + + ```java + public (String name) + ``` + + + + ```java + public (String name, String route) + ``` + + + + ```java + public ( + String name, + String route, + String host, + int port, + String authUser, + String authPassword + ) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Parameters (Overload 3) + + + + + + + + + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 74. + +*** + +### addSecurityHeaders + +Add security headers to every authenticated response. + +#### Signature + +```java +protected void addSecurityHeaders(HttpExchange exchange) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 411. + +*** + +### ai + +#### Signature + +```java +public Service ai(Map params) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 445. + +*** + +### amazonBedrock + +#### Signature + +```java +public Service amazonBedrock(Map params) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 450. + +*** + +### answer + +#### Signature + +```java +public Service answer(Map params) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 440. + +*** + +### close + +`AutoCloseable` entry point so a service — and every subclass, +including `AgentBase` — can be served inside a try-with-resources +block: + +<pre>{@code +try (var agent = MyAgent.builder()...build()) { + agent.run(); + // ... + +`AutoCloseable` entry point so a service — and every subclass, +including `AgentBase` — can be served inside a try-with-resources +block: + +<pre>(var agent = MyAgent.builder()...build()) { + agent.run(); + // ... serve ... // close() runs here: the HTTP listener is shut down +}</pre> + +Delegates to `#stop()`, releasing the bound HTTP(S) listener and +its socket — the rough Java parallel of using a Python SWMLService / +AgentBase under a context manager. Idempotent: harmless if the service +was never served or is already stopped. + +**Decorators:** `@Override` + +#### Signature + +```java +public void close() +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 911. + +*** + +### cond + +#### Signature + +```java +public Service cond(List> conditions) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 455. + +*** + +### connect + +#### Signature + +```java +public Service connect(Map params) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 460. + +*** + +### defineTool + +Define a SWAIG function the AI can call. + +Tool descriptions and +parameter descriptions are LLM-facing prompt engineering — see +PORTING\_GUIDE for guidance on writing them. + +#### Signature + + + + ```java + public Service defineTool( + String name, + String description, + java.util.Map parameters, + com.signalwire.sdk.swaig.ToolHandler handler + ) + ``` + + + + ```java + public Service defineTool(com.signalwire.sdk.swaig.ToolDefinition toolDef) + ``` + + + +#### Parameters (Overload 1) + + + + + + + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`Service` + +#### Returns (Overload 2) + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 219. + +*** + +### defineTools + +Register multiple tool definitions at once. + +#### Signature + +```java +public Service defineTools( + java.util.List toolDefs +) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 239. + +*** + +### denoise + +#### Signature + +```java +public Service denoise(Map params) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 465. + +*** + +### detectMachine + +#### Signature + +```java +public Service detectMachine(Map params) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 470. + +*** + +### enterQueue + +#### Signature + +```java +public Service enterQueue(Map params) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 475. + +*** + +### execute + +#### Signature + +```java +public Service execute(Map params) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 480. + +*** + +### generatePassword + +**Modifiers:** `static` + +#### Signature + +```java +protected static String generatePassword() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 116. + +*** + +### getAllFunctions + +Snapshot of all registered SWAIG functions keyed by name. +(Python parity: `ToolRegistry.get_all_functions`.) + +#### Signature + +```java +public java.util.Map getAllFunctions() +``` + +#### Returns + +`java.util.Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 277. + +*** + +### getAuthPassword + +#### Signature + +```java +public String getAuthPassword() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 129. + +*** + +### getAuthUser + +#### Signature + +```java +public String getAuthUser() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 125. + +*** + +### getBasicAuthCredentials + +Get the configured (user, password) pair as a String\[2] tuple. +(Python parity: `AuthMixin.get_basic_auth_credentials`.) + +#### Signature + +```java +public String[] getBasicAuthCredentials() +``` + +#### Returns + +`String[]` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 148. + +*** + +### getBasicAuthCredentialsWithSource + +Get (user, password, source) where source is "provided", +"environment", or "generated". + +(Python parity: +`AuthMixin.get_basic_auth_credentials(include_source=True)`.) + +#### Signature + +```java +public String[] getBasicAuthCredentialsWithSource() +``` + +#### Returns + +`String[]` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 155. + +*** + +### getDocument + +#### Signature + +```java +public Document getDocument() +``` + +#### Returns + +`Document` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 420. + +*** + +### getFunction + +Get a registered SWAIG function by name, or null when absent. +(Python parity: `ToolRegistry.get_function`.) + +#### Signature + +```java +public com.signalwire.sdk.swaig.ToolDefinition getFunction(String name) +``` + +#### Parameters + + + +#### Returns + +`com.signalwire.sdk.swaig.ToolDefinition` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 271. + +*** + +### getRegisteredSwaigFunctions + +Read-only view of the raw SWAIG function entries registered via +`#registerSwaigFunction(java.util.Map)`. + +These are typically +DataMap or schema-only tools that don't have a Java `com.signalwire.sdk.swaig.ToolHandler`. +Each entry is a defensive copy of the original map; the outer list +is unmodifiable. + +#### Signature + +```java +public java.util.List> getRegisteredSwaigFunctions() +``` + +#### Returns + +`java.util.List>` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 306. + +*** + +### getRegisteredTools + +Public, read-only view of the registered SWAIG tool registry. +Returned in insertion order; the map and its definitions are +unmodifiable. + +Used by introspection callers (CLI `--list-tools` +file-loader path, tests, audit tooling) that need name + description + +parameters without going through `/swaig` HTTP. + +#### Signature + +```java +public java.util.Map getRegisteredTools() +``` + +#### Returns + +`java.util.Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 295. + +*** + +### getSchemaUtils + +SchemaUtils helper bound to this Service. + +Mirrors Python's +`self.schema_utils` public instance attribute on +`SWMLService`. Built lazily on first access. + +#### Signature + +```java +public SchemaUtils getSchemaUtils() +``` + +#### Returns + +`SchemaUtils` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 429. + +*** + +### gotoLabel + +#### Signature + +```java +public Service gotoLabel(Map params) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 485. + +*** + +### hangup + +#### Signature + + + + ```java + public Service hangup(Map params) + ``` + + + + ```java + public Service hangup() + ``` + + + +#### Parameters (Overload 1) + + + +#### Returns (Overload 1) + +`Service` + +#### Returns (Overload 2) + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 490. + +*** + +### hasFunction + +Whether a SWAIG function with the given name is registered. +(Python parity: `ToolRegistry.has_function`.) + +#### Signature + +```java +public boolean hasFunction(String name) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 265. + +*** + +### joinConference + +#### Signature + +```java +public Service joinConference(Map params) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 500. + +*** + +### joinRoom + +#### Signature + +```java +public Service joinRoom(Map params) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 505. + +*** + +### label + +#### Signature + +```java +public Service label(Map params) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 510. + +*** + +### listToolNames + +List registered SWAIG tool names in insertion order. + +#### Signature + +```java +public java.util.List listToolNames() +``` + +#### Returns + +`java.util.List` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 259. + +*** + +### liveTranscribe + +#### Signature + +```java +public Service liveTranscribe(Map params) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 515. + +*** + +### liveTranslate + +#### Signature + +```java +public Service liveTranslate(Map params) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 520. + +*** + +### onFunctionCall + +Dispatch a function call to the registered handler. + +#### Signature + +```java +public com.signalwire.sdk.swaig.FunctionResult onFunctionCall( + String funcName, + java.util.Map args, + java.util.Map rawData +) +``` + +#### Parameters + + + + + + + +#### Returns + +`com.signalwire.sdk.swaig.FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 247. + +*** + +### onRequest + +Customization hook called when SWML is requested. + +Default +delegates to String) and +returns its result. Subclasses typically override +`onSwmlRequest` rather than this method. + +<p>Returning `null` uses the default rendered SWML; +returning a non-null map merges the entries as modifications. + +<p>Python parity: callback_path). The Python third `request` parameter is +FastAPI-specific and intentionally not mirrored. + +#### Signature + +```java +public java.util.Map onRequest( + java.util.Map requestData, + String callbackPath +) +``` + +#### Parameters + + + parsed request body, or `null` + + + + optional callback sub-path, or `null` + + +#### Returns + +`java.util.Map` — modifications map, or `null` for default rendering + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 360. + +*** + +### onSwmlRequest + +Customization point for subclasses to modify SWML based on +request data. + +The default implementation returns `null` +(no modification). Subclasses override to inspect the body or +callback path and return a map of SWML overrides. + +<p>Python parity: callback_path). The Python third `request` parameter is +FastAPI-specific and intentionally not mirrored. + +#### Signature + +```java +public java.util.Map onSwmlRequest( + java.util.Map requestData, + String callbackPath +) +``` + +#### Parameters + + + parsed request body, or `null` + + + + optional callback sub-path, or `null` + + +#### Returns + +`java.util.Map` — modifications map, or `null` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 380. + +*** + +### pay + +#### Signature + +```java +public Service pay(Map params) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 525. + +*** + +### play + +#### Signature + +```java +public Service play(Map params) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 530. + +*** + +### prompt + +#### Signature + +```java +public Service prompt(Map params) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 535. + +*** + +### readBody + +Read request body with size limit. + +#### Signature + +```java +protected String readBody(HttpExchange exchange) +``` + +#### Parameters + + + +#### Returns + +`String` + +#### Throws + +- `IOException` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 643. + +*** + +### receiveFax + +#### Signature + +```java +public Service receiveFax(Map params) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 540. + +*** + +### record + +#### Signature + +```java +public Service record(Map params) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 545. + +*** + +### recordCall + +#### Signature + +```java +public Service recordCall(Map params) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 550. + +*** + +### registerAdditionalRoutes + +Extension point: register additional HTTP routes after Service +mounts /health, /ready, /swaig and the main route. + +AgentBase uses +this to add /post\_prompt and /mcp. + +#### Signature + +```java +protected void registerAdditionalRoutes(HttpServer server) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 340. + +*** + +### registerSwaigFunction + +Register a raw SWAIG function definition (e.g. + +DataMap tools). + +#### Signature + +```java +public Service registerSwaigFunction(java.util.Map swaigFunc) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 233. + +*** + +### removeFunction + +Remove a registered SWAIG function. + +Returns true when removed, +false when the function was not registered. +(Python parity: `ToolRegistry.remove_function`.) + +#### Signature + +```java +public boolean removeFunction(String name) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 284. + +*** + +### renderMainSwml + +Extension point: render the SWML document for the main path or for +GET /swaig. + +Default returns the currently-built Document. AgentBase +overrides to emit prompt + AI verb at request time. + +#### Signature + +```java +protected java.util.Map renderMainSwml(HttpExchange exchange) +``` + +#### Parameters + + + +#### Returns + +`java.util.Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 331. + +*** + +### request + +#### Signature + +```java +public Service request(Map params) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 555. + +*** + +### resolvePort + +**Modifiers:** `static` + +#### Signature + +```java +protected static int resolvePort() +``` + +#### Returns + +`int` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 105. + +*** + +### returnVerb + +#### Signature + +```java +public Service returnVerb(Map params) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 560. + +*** + +### sendDigits + +#### Signature + +```java +public Service sendDigits(Map params) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 570. + +*** + +### sendFax + +#### Signature + +```java +public Service sendFax(Map params) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 575. + +*** + +### sendJson + +Send a JSON response. + +#### Signature + +```java +protected void sendJson(HttpExchange exchange, int status, Object body) +``` + +#### Parameters + + + + + + + +#### Throws + +- `IOException` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 661. + +*** + +### sendPayloadTooLarge + +Send a 413 Payload Too Large response. + +#### Signature + +```java +protected void sendPayloadTooLarge(HttpExchange exchange) +``` + +#### Parameters + + + +#### Throws + +- `IOException` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 683. + +*** + +### sendSms + +#### Signature + +```java +public Service sendSms(Map params) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 580. + +*** + +### sendUnauthorized + +Send a 401 Unauthorized response. + +#### Signature + +```java +protected void sendUnauthorized(HttpExchange exchange) +``` + +#### Parameters + + + +#### Throws + +- `IOException` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 674. + +*** + +### serve + +Start the HTTP server with health, ready, /swaig, and main SWML endpoint. +Subclasses (AgentBase) add additional routes via +`#registerAdditionalRoutes(HttpServer)` and customize SWML +rendering via `#renderMainSwml(HttpExchange)`. + +#### Signature + +```java +public void serve() +``` + +#### Throws + +- `IOException` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 694. + +*** + +### set + +#### Signature + +```java +public Service set(Map params) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 585. + +*** + +### sipRefer + +#### Signature + +```java +public Service sipRefer(Map params) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 565. + +*** + +### sleep + +Sleep takes an integer (milliseconds), not a map. + +#### Signature + +```java +public Service sleep(int milliseconds) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 593. + +*** + +### stop + +Stop the HTTP server. + +#### Signature + +```java +public void stop() +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 887. + +*** + +### stopDenoise + +#### Signature + +```java +public Service stopDenoise(Map params) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 598. + +*** + +### stopRecordCall + +#### Signature + +```java +public Service stopRecordCall(Map params) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 603. + +*** + +### stopTap + +#### Signature + +```java +public Service stopTap(Map params) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 608. + +*** + +### swaigPreDispatch + +Extension point: invoked between argument parsing and function +dispatch. + +Returns a 2-element array: \[target Service, shortCircuit Map]. +If shortCircuit is non-null, it's returned as the SWAIG response +without calling onFunctionCall. AgentBase may override to add +session-token validation or ephemeral dynamic-config copies. + +#### Signature + +```java +protected Object[] swaigPreDispatch( + java.util.Map requestData, + String funcName +) +``` + +#### Parameters + + + + + +#### Returns + +`Object[]` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 321. + +*** + +### switchVerb + +#### Signature + +```java +public Service switchVerb(Map params) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 613. + +*** + +### tap + +#### Signature + +```java +public Service tap(Map params) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 618. + +*** + +### transfer + +#### Signature + +```java +public Service transfer(Map params) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 623. + +*** + +### unset + +#### Signature + +```java +public Service unset(Map params) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 628. + +*** + +### userEvent + +#### Signature + +```java +public Service userEvent(Map params) +``` + +#### Parameters + + + +#### Returns + +`Service` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 633. + +*** + +### validateAuth + +Timing-safe basic auth validation using MessageDigest.isEqual. + +#### Signature + +```java +protected boolean validateAuth(HttpExchange exchange) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 176. + +*** + +### validateBasicAuth + +Validate provided basic-auth credentials against the configured ones +using a constant-time comparison. + +(Python parity: +`AuthMixin.validate_basic_auth(username, password)`.) + +#### Signature + +```java +public boolean validateBasicAuth(String username, String password) +``` + +#### Parameters + + + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 136. + +*** + +### validateSignedWebhook + +Extension hook invoked between raw-body capture and JSON parsing on +signed POST routes (`/`, `/swaig`, `/post_prompt`). +Subclasses (AgentBase) override to enforce SignalWire webhook signature +validation when a signing key is configured. + +Default returns +`true` (no validation). + +<p>Returning `false` signals "signature invalid"; the caller +sends Forbidden and stops dispatch. Per +porting-sdk/webhooks.md the response body must NOT disclose which +branch failed. + +#### Signature + +```java +protected boolean validateSignedWebhook(HttpExchange exchange, String rawBody) +``` + +#### Parameters + + + the HTTP exchange. + + + + the raw UTF-8 body string already read from the exchange. Pass through to `com.signalwire.sdk.security.WebhookValidator`. + + +#### Returns + +`boolean` — `true` when validation passes (or is disabled); `false` to short-circuit with a 403. + +#### Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 404. + +## Source + +[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) + +Line 31. diff --git a/fern/products/sdk-reference/java/agents/tools/index.mdx b/fern/products/sdk-reference/java/agents/tools/index.mdx new file mode 100644 index 0000000000..fb6ab1878d --- /dev/null +++ b/fern/products/sdk-reference/java/agents/tools/index.mdx @@ -0,0 +1,20 @@ +--- +slug: "/reference/java/agents/tools" +title: "tools" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "com.signalwire.sdk.tools" + parent: "agents" + module: "agents" +--- +# `tools` + +## Signature + +```java +package com.signalwire.sdk.tools +``` diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/agent/agent/agent-base/builder/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/agent/agent/agent-base/builder/index.mdx deleted file mode 100644 index b38f9490fc..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/agent/agent/agent-base/builder/index.mdx +++ /dev/null @@ -1,466 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/agent/agent/agent-base/builder" -title: "Builder" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.agent.AgentBase.Builder" - parent: "com.signalwire.sdk.agent.AgentBase" - module: "com.signalwire.sdk.agent" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java" - visibility: "public" ---- -# `Builder` - -**Modifiers:** `static` - -## Signature - -```java -public static class Builder -``` - -## Methods - -### \ - -#### Signature - -```java -public () -``` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -*** - -### authPassword - -#### Signature - -```java -public Builder authPassword(String password) -``` - -#### Parameters - - - -#### Returns - -`Builder` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 202. - -*** - -### authUser - -#### Signature - -```java -public Builder authUser(String user) -``` - -#### Parameters - - - -#### Returns - -`Builder` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 201. - -*** - -### autoAnswer - -#### Signature - -```java -public Builder autoAnswer(boolean autoAnswer) -``` - -#### Parameters - - - -#### Returns - -`Builder` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 189. - -*** - -### build - -#### Signature - -```java -public AgentBase build() -``` - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 265. - -*** - -### envProvider - -Supply an alternative `EnvProvider` for the build-time env -var reads (`SWML_BASIC_AUTH_USER`, `SWML_BASIC_AUTH_PASSWORD`, -`SWML_PROXY_URL_BASE`). - -<p>Primarily for the --simulate-serverless -harness, which needs to mask the real process env with simulated -values without mutating `System#getenv()` (which Java does -not support). - -Pass `null` to fall back to the real process -env (the default). - -#### Signature - -```java -public Builder envProvider(EnvProvider env) -``` - -#### Parameters - - - environment source. - - -#### Returns - -`Builder` — this builder. - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 260. - -*** - -### host - -#### Signature - -```java -public Builder host(String host) -``` - -#### Parameters - - - -#### Returns - -`Builder` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 187. - -*** - -### maxDuration - -#### Signature - -```java -public Builder maxDuration(int maxDuration) -``` - -#### Parameters - - - -#### Returns - -`Builder` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 190. - -*** - -### name - -#### Signature - -```java -public Builder name(String name) -``` - -#### Parameters - - - -#### Returns - -`Builder` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 181. - -*** - -### port - -#### Signature - -```java -public Builder port(int port) -``` - -#### Parameters - - - -#### Returns - -`Builder` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 188. - -*** - -### recordCall - -#### Signature - -```java -public Builder recordCall(boolean recordCall) -``` - -#### Parameters - - - -#### Returns - -`Builder` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 191. - -*** - -### recordFormat - -Typed overload of `#recordFormat(String)`. - -Accepts a -`RecordFormat` so a misspelled container format fails at compile -time instead of being rejected by the server. Delegates to the string -path via `RecordFormat#getValue()`, so wire behavior is identical. - -#### Signature - - - - ```java - public Builder recordFormat(String format) - ``` - - - - ```java - public Builder recordFormat(RecordFormat format) - ``` - - - -#### Parameters (Overload 1) - - - -#### Parameters (Overload 2) - - - -#### Returns (Overload 1) - -`Builder` - -#### Returns (Overload 2) - -`Builder` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 192. - -*** - -### recordStereo - -#### Signature - -```java -public Builder recordStereo(boolean stereo) -``` - -#### Parameters - - - -#### Returns - -`Builder` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 200. - -*** - -### route - -#### Signature - -```java -public Builder route(String route) -``` - -#### Parameters - - - -#### Returns - -`Builder` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 182. - -*** - -### signingKey - -Configure the customer's SignalWire Signing Key from the Dashboard -(API Credentials → Signing Key). - -When set, the agent enforces -webhook signature validation on POST `/`, `/swaig`, -and `/post_prompt` — unsigned or invalidly-signed requests -are rejected with HTTP 403. - -<p>Resolution order at `#build()` time: -<ol> - <li>Explicit `signingKey(...)` on the builder.</li> - <li>`SIGNALWIRE_SIGNING_KEY` environment variable.</li> - <li>Unset → validation disabled, with a startup warning.</li> -</ol> - -#### Signature - -```java -public Builder signingKey(String key) -``` - -#### Parameters - - - the Signing Key. Pass `null` to fall through to env-var resolution. - - -#### Returns - -`Builder` — this builder. - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 226. - -*** - -### trustProxyForSignature - -When set to `true`, the webhook URL reconstruction honors -`X-Forwarded-Proto` / `X-Forwarded-Host` headers -during signature validation. - -Default `false` — proxy -headers are spoofable, so opt in only when you control the -proxy chain. - -#### Signature - -```java -public Builder trustProxyForSignature(boolean trust) -``` - -#### Parameters - - - whether to trust proxy headers. - - -#### Returns - -`Builder` — this builder. - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 241. - -## Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 164. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/agent/agent/agent-base/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/agent/agent/agent-base/index.mdx deleted file mode 100644 index 84e82ec267..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/agent/agent/agent-base/index.mdx +++ /dev/null @@ -1,2993 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/agent/agent/agent-base" -title: "AgentBase" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.agent.AgentBase" - parent: "com.signalwire.sdk.agent" - module: "com.signalwire.sdk.agent" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java" - visibility: "public" ---- -# `AgentBase` - -Base class for all SignalWire AI agents. -Composes prompt management, tool registration, AI config, HTTP serving, -skills integration, and SWML rendering. - -Use the builder pattern: - -<pre> -var agent = AgentBase.builder() - .name("my-agent") - .route("/") - .port(3000) - .build(); -</pre> - -## Signature - -```java -public class AgentBase extends Service -``` - -## Inheritance - -**Extends:** [Service](/docs/sdk-reference/reference/java/com/signalwire/sdk/swml/swml/service) - -## Constants - - - The complete set of internal SWAIG function names that accept fillers, matching the SWAIGInternalFiller schema definition. \

Any name outside this set is silently ignored by the runtime — \`#setInternalFillersMap(java.util.Map)\` and String, java.util.List) warn if you pass an unknown name. \

Notable absences: \`change\_step\`, \`gather\_submit\`, or arbitrary user-defined SWAIG function names are NOT supported. - - -## Classes - - - - - -## Methods - -### addAnswerVerb - -#### Signature - -```java -public AgentBase addAnswerVerb(String verbName, Object verbData) -``` - -#### Parameters - - - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 976. - -*** - -### addFunctionInclude - -#### Signature - -```java -public AgentBase addFunctionInclude(String url, Map functions) -``` - -#### Parameters - - - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 939. - -*** - -### addHint - -#### Signature - -```java -public AgentBase addHint(String hint) -``` - -#### Parameters - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 671. - -*** - -### addHints - -#### Signature - -```java -public AgentBase addHints(List newHints) -``` - -#### Parameters - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 676. - -*** - -### addInternalFiller - -Add internal fillers for a single internal function and language. - -<p>See `#setInternalFillersMap(java.util.Map)` for the complete -list of supported function names and an explanation of what fillers -do. - -Names outside the supported set log a warning and are stored, but -the runtime will not play them. - -#### Signature - - - - ```java - public AgentBase addInternalFiller(String text, String file) - ``` - - - - ```java - public AgentBase addInternalFiller( - String functionName, - String languageCode, - List fillers - ) - ``` - - - -#### Parameters (Overload 1) - - - - - -#### Parameters (Overload 2) - - - one of `#SUPPORTED_INTERNAL_FILLER_NAMES`. - - - - BCP-47 language code (e.g. `"en-US"`). - - - - phrases to speak while the function runs. - - -#### Returns (Overload 1) - -`AgentBase` - -#### Returns (Overload 2) - -`AgentBase` — this agent for chaining. - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 897. - -*** - -### addLanguage - -Add a language configuration with an optional per-language `params` -dict (engine-specific tuning, voice settings, etc.). - -The `params` -key is only emitted into SWML when non-empty so existing language -entries stay byte-identical when no params are passed. -Mirrors Python's add\_language(params=...) addition. - -#### Signature - - - - ```java - public AgentBase addLanguage(String name, String code, String voice) - ``` - - - - ```java - public AgentBase addLanguage( - String name, - String code, - String voice, - String speechModel, - String fillerWord, - String engine - ) - ``` - - - - ```java - public AgentBase addLanguage( - String name, - String code, - String voice, - String speechModel, - String fillerWord, - String engine, - Map params - ) - ``` - - - -#### Parameters (Overload 1) - - - - - - - -#### Parameters (Overload 2) - - - - - - - - - - - - - -#### Parameters (Overload 3) - - - - - - - - - - - - - - - -#### Returns (Overload 1) - -`AgentBase` - -#### Returns (Overload 2) - -`AgentBase` - -#### Returns (Overload 3) - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 686. - -*** - -### addMcpServer - -Add an external MCP server for tool discovery and invocation. -Tools are discovered via MCP protocol at session start and added to SWAIG. - -#### Signature - - - - ```java - public AgentBase addMcpServer( - String url, - Map headers, - boolean resources, - Map resourceVars - ) - ``` - - - - ```java - public AgentBase addMcpServer(String url) - ``` - - - - ```java - public AgentBase addMcpServer(String url, Map headers) - ``` - - - -#### Parameters (Overload 1) - - - MCP server HTTP endpoint URL - - - - Optional HTTP headers (e.g. Authorization) - - - - Whether to fetch resources into global\_data - - - - Variables for URI template substitution - - -#### Parameters (Overload 2) - - - -#### Parameters (Overload 3) - - - - - -#### Returns (Overload 1) - -`AgentBase` — this for chaining - -#### Returns (Overload 2) - -`AgentBase` - -#### Returns (Overload 3) - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1131. - -*** - -### addPatternHint - -#### Signature - -```java -public AgentBase addPatternHint(String pattern) -``` - -#### Parameters - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 681. - -*** - -### addPostAiVerb - -#### Signature - -```java -public AgentBase addPostAiVerb(String verbName, Object verbData) -``` - -#### Parameters - - - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 990. - -*** - -### addPostAnswerVerb - -#### Signature - -```java -public AgentBase addPostAnswerVerb(String verbName, Object verbData) -``` - -#### Parameters - - - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 983. - -*** - -### addPreAnswerVerb - -#### Signature - -```java -public AgentBase addPreAnswerVerb(String verbName, Object verbData) -``` - -#### Parameters - - - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 969. - -*** - -### addPronunciation - -#### Signature - -```java -public AgentBase addPronunciation( - String replace, - String with, - boolean ignoreCase -) -``` - -#### Parameters - - - - - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 760. - -*** - -### addSkill - -Typed overload of Map). - -Accepts a built-in -`SkillName` so a misspelled skill fails at compile time instead of -silently no-op-ing on the server. Delegates to the string path via -`SkillName#getValue()`, so wire behavior is identical. - -#### Signature - - - - ```java - public AgentBase addSkill(String skillName, Map params) - ``` - - - - ```java - public AgentBase addSkill(SkillName skillName, Map params) - ``` - - - -#### Parameters (Overload 1) - - - - - -#### Parameters (Overload 2) - - - - - -#### Returns (Overload 1) - -`AgentBase` - -#### Returns (Overload 2) - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1040. - -*** - -### addSwaigQueryParams - -#### Signature - -```java -public AgentBase addSwaigQueryParams(Map params) -``` - -#### Parameters - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1102. - -*** - -### builder - -**Modifiers:** `static` - -#### Signature - -```java -public static Builder builder() -``` - -#### Returns - -`Builder` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 160. - -*** - -### buildMcpToolList - -Build MCP tool list from registered tools. - -#### Signature - -```java -public List> buildMcpToolList() -``` - -#### Returns - -`List>` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1190. - -*** - -### clearPostAiVerbs - -#### Signature - -```java -public AgentBase clearPostAiVerbs() -``` - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 999. - -*** - -### clearPostAnswerVerbs - -#### Signature - -```java -public AgentBase clearPostAnswerVerbs() -``` - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 998. - -*** - -### clearPreAnswerVerbs - -#### Signature - -```java -public AgentBase clearPreAnswerVerbs() -``` - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 997. - -*** - -### clearSwaigQueryParams - -#### Signature - -```java -public AgentBase clearSwaigQueryParams() -``` - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1107. - -*** - -### clone - -Create a deep copy of this agent for per-request customization. - -#### Signature - -```java -public AgentBase clone() -``` - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1737. - -*** - -### contexts - -#### Signature - -```java -public ContextBuilder contexts() -``` - -#### Returns - -`ContextBuilder` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1017. - -*** - -### createToolToken - -Mint a per-call SWAIG-function token via the agent's SessionManager. - -<p>Python parity: `state_mixin.StateMixin._create_tool_token`. -Returns an empty string when the underlying SessionManager throws -(Python catches all exceptions and returns "" on error). - -#### Signature - -```java -public String createToolToken(String toolName, String callId) -``` - -#### Parameters - - - - - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 640. - -*** - -### defineContexts - -Define or return the ContextBuilder for this agent. - -The builder is -wired to report registered SWAIG tool names back so that its -`validate()` can check for collisions with reserved native tool -names (`next_step`, `change_context`, `gather_submit`). - -#### Signature - -```java -public ContextBuilder defineContexts() -``` - -#### Returns - -`ContextBuilder` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1011. - -*** - -### defineTool - -Register a SWAIG tool (function) that the AI can invoke during a call. - -<h3>How this becomes a tool the model sees</h3> - -<p>A SWAIG function is <b>exactly the same concept</b> as a "tool" in -native OpenAI / Anthropic tool calling. - -On every LLM turn, the SDK -renders each registered SWAIG function into the OpenAI tool schema: - -<pre>"type": "function", - "function": { - "name": "your_name_here", - "description": "your description text", - "parameters": { ... your JSON schema ... - } -} -}</pre> - -<p>That schema is sent to the model as part of the same API call that -produces the next assistant message. The model reads: -<ul> - <li>the function `description` to decide WHEN to call this tool</li> - <li>each parameter `description` (inside parameters) to decide - HOW to fill in that argument from the user's utterance</li> -</ul> - -<p>This means <b>descriptions are prompt engineering</b>, not developer -comments. A vague description is the #1 cause of "the model has the -right tool but doesn't call it" failures. - -<h3>Bad vs good descriptions</h3> -<pre>: description: "Lookup function" -GOOD: description: "Look up a customer's account details by account " - + "number. Use this BEFORE quoting any account-" - + "specific info (balance, plan, status). Do not " - + "use for general product questions." - -BAD : parameters : Map.of("id", Map.of("type", "string", -"description", "the id")) -GOOD: parameters : Map.of("account\_number", Map.of("type", "string", -"description", "The customer's 8-digit account " -\+ "number, no dashes or spaces. Ask the user if " -\+ "they don't provide it."))</pre> - -<h3>Tool count matters</h3> - -<p>LLM tool selection accuracy degrades past ~7-8 simultaneously-active -tools per call. Use `com.signalwire.sdk.contexts.Step#setFunctions(Object)` -to partition tools across steps so only the relevant subset is active -at any moment. - -**Decorators:** `@Override` - -#### Signature - - - - ```java - public AgentBase defineTool( - String name, - String description, - Map parameters, - ToolHandler handler - ) - ``` - - - - ```java - public AgentBase defineTool(ToolDefinition toolDef) - ``` - - - -#### Parameters (Overload 1) - - - the function name (snake\_case verb recommended). - - - - LLM-facing description of when to call this tool. - - - - JSON-schema properties map with LLM-facing descriptions for each parameter. - - - - the Java handler invoked when the model calls this tool. - - -#### Parameters (Overload 2) - - - -#### Returns (Overload 1) - -`AgentBase` - -#### Returns (Overload 2) - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 575. - -*** - -### defineTools - -**Decorators:** `@Override` - -#### Signature - -```java -public AgentBase defineTools(List toolDefs) -``` - -#### Parameters - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 594. - -*** - -### detectServerlessBaseUrl - -Resolve a base URL from environment variables alone (proxy or -serverless platform). - -Returns `null` if no suitable env -vars are set. - -<p>This is used by both the HTTP server path (when no proxy is -manually set) and by non-HTTP transports such as the Lambda -adapter, so they agree on the origin to use for webhook URLs. - -<p>The returned origin is a bare scheme + host(:port) with NO -route appended — callers must layer their route on top via -`#buildWebhookUrl(String)` and the post-prompt URL builder. -This matters: it is how we guarantee that the agent's route -always appears in webhook URLs regardless of which source -produced the base. - -#### Signature - - - - ```java - public String detectServerlessBaseUrl() - ``` - - - - ```java - public String detectServerlessBaseUrl(EnvProvider env) - ``` - - - -#### Parameters (Overload 2) - - - environment variable source. - - -#### Returns (Overload 1) - -`String` — base URL, or `null`. - -#### Returns (Overload 2) - -`String` — base URL, or `null`. - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1855. - -*** - -### enableDebugEvents - -#### Signature - -```java -public AgentBase enableDebugEvents() -``` - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 934. - -*** - -### enableDebugRoutes - -#### Signature - -```java -public AgentBase enableDebugRoutes() -``` - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1112. - -*** - -### enableMcpServer - -Expose this agent's tools as an MCP server endpoint at /mcp. -Adds a JSON-RPC 2.0 endpoint that MCP clients can connect to. - -#### Signature - -```java -public AgentBase enableMcpServer() -``` - -#### Returns - -`AgentBase` — this for chaining - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1168. - -*** - -### enableSipRouting - -#### Signature - -```java -public AgentBase enableSipRouting() -``` - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1293. - -*** - -### extractSipUsername - -Extract the username portion from a SIP URI. - -<p> -Handles formats: -<ul> - <li>`sip:user@host` -> `user`</li> - <li>`sip:user@host:port` -> `user`</li> - <li>`user@host` -> `user`</li> - <li>`+15551234567` -> `+15551234567` (returned as-is)</li> -</ul> - -**Modifiers:** `static` - -#### Signature - -```java -public static String extractSipUsername(String sipUri) -``` - -#### Parameters - - - The SIP URI or phone number - - -#### Returns - -`String` — The extracted username, or the original string if no @ is found - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1324. - -*** - -### getAuthPassword - -#### Signature - -```java -public String getAuthPassword() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1374. - -*** - -### getAuthUser - -#### Signature - -```java -public String getAuthUser() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1373. - -*** - -### getContexts - -Returns the contexts dictionary as serialised SWML, or null when no -contexts have been defined yet. - -Mirrors Python's PromptManager.get\_contexts which returns the contexts -dict or None. - -#### Signature - -```java -public Map getContexts() -``` - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 498. - -*** - -### getDynamicConfigCallback - -#### Signature - -```java -public DynamicConfigCallback getDynamicConfigCallback() -``` - -#### Returns - -`DynamicConfigCallback` — the dynamic config callback, or `null` if none set. Exposed primarily so alternative transports (e.g. the Lambda adapter) can invoke it outside the HTTP server path. - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1504. - -*** - -### getGlobalData - -#### Signature - -```java -public Map getGlobalData() -``` - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 796. - -*** - -### getHost - -#### Signature - -```java -public String getHost() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1371. - -*** - -### getLanguageParams - -Read the per-language `params` dict for a previously-added language. -Returns null when the code is unknown or params were never set. -Mirrors Python's get\_language\_params. - -**Decorators:** `@SuppressWarnings` - -#### Signature - -```java -public Map getLanguageParams(String code) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 743. - -*** - -### getMcpServers - -Get configured MCP servers (read-only). - -#### Signature - -```java -public List> getMcpServers() -``` - -#### Returns - -`List>` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1183. - -*** - -### getName - -#### Signature - -```java -public String getName() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1369. - -*** - -### getNormalisedRoute - -Return the agent's route normalised to an empty string for the -root route or `"/"` otherwise. - -Exposed so non-HTTP -transports can construct paths correctly. - -#### Signature - -```java -public String getNormalisedRoute() -``` - -#### Returns - -`String` — normalised route prefix. - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1522. - -*** - -### getOnSummaryCallback - -#### Signature - -```java -public BiConsumer,Map> getOnSummaryCallback() -``` - -#### Returns - -`BiConsumer,Map>` — the post-prompt summary callback, or `null`. - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1511. - -*** - -### getPom - -Read-only snapshot of the agent's POM as a typed -`PromptObjectModel`. - -Wraps the internal map-based section list so -callers get the rich Section / render API without mutating internal -state. - -<p>Python parity: `agent.pom` instance attribute -(agent_base.py line 209). Returns `null` when `usePom` is -false (mirroring Python's = None). - -#### Signature - -```java -public PromptObjectModel getPom() -``` - -#### Returns - -`PromptObjectModel` — typed POM wrapper, or `null` when POM mode is off. - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 484. - -*** - -### getPort - -#### Signature - -```java -public int getPort() -``` - -#### Returns - -`int` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1372. - -*** - -### getPostPrompt - -Returns the post-prompt text that was set via setPostPrompt, or null -when none has been set. - -Mirrors Python's PromptManager.get\_post\_prompt / -PromptMixin.get\_post\_prompt — used by SWML rendering when a post-prompt -is configured. - -#### Signature - -```java -public String getPostPrompt() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 438. - -*** - -### getPrompt - -#### Signature - -```java -public Object getPrompt() -``` - -#### Returns - -`Object` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 421. - -*** - -### getRawPrompt - -Returns the raw prompt text whatever setPromptText stored, or null when -no raw prompt has been set. - -Distinct from getPrompt() which may return -a POM map when usePom is true. - -Mirrors Python's PromptManager.get\_raw\_prompt. - -#### Signature - -```java -public String getRawPrompt() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 449. - -*** - -### getRoute - -#### Signature - -```java -public String getRoute() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1370. - -*** - -### getSigningKey - -#### Signature - -```java -public String getSigningKey() -``` - -#### Returns - -`String` — the configured Signing Key for SignalWire webhook signature validation (resolved from the builder or `SIGNALWIRE_SIGNING_KEY` env), or `null` when validation is disabled. - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1382. - -*** - -### getSipUsernames - -#### Signature - -```java -public Set getSipUsernames() -``` - -#### Returns - -`Set` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1308. - -*** - -### getSkillManager - -#### Signature - -```java -public SkillManager getSkillManager() -``` - -#### Returns - -`SkillManager` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1525. - -*** - -### getTools - -#### Signature - -```java -public Map getTools() -``` - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 625. - -*** - -### handleMcpRequest - -Handle an MCP JSON-RPC 2.0 request. - -Returns the response map. - -#### Signature - -```java -public Map handleMcpRequest(Map body) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1211. - -*** - -### hasSkill - -Typed overload of `#hasSkill(String)` (see Map)). - -#### Signature - - - - ```java - public boolean hasSkill(String skillName) - ``` - - - - ```java - public boolean hasSkill(SkillName skillName) - ``` - - - -#### Parameters (Overload 1) - - - -#### Parameters (Overload 2) - - - -#### Returns (Overload 1) - -`boolean` - -#### Returns (Overload 2) - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1069. - -*** - -### hasTool - -#### Signature - -```java -public boolean hasTool(String name) -``` - -#### Parameters - - - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 629. - -*** - -### isMcpServerEnabled - -Check if MCP server endpoint is enabled. - -#### Signature - -```java -public boolean isMcpServerEnabled() -``` - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1176. - -*** - -### isSipRoutingEnabled - -#### Signature - -```java -public boolean isSipRoutingEnabled() -``` - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1307. - -*** - -### isTrustProxyForSignature - -#### Signature - -```java -public boolean isTrustProxyForSignature() -``` - -#### Returns - -`boolean` — whether webhook URL reconstruction trusts `X-Forwarded-Proto` / `X-Forwarded-Host` headers during signature validation. - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1389. - -*** - -### listSkills - -#### Signature - -```java -public List listSkills() -``` - -#### Returns - -`List` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1065. - -*** - -### manualSetProxyUrl - -#### Signature - -```java -public AgentBase manualSetProxyUrl(String url) -``` - -#### Parameters - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1097. - -*** - -### onDebugEvent - -#### Signature - -```java -public AgentBase onDebugEvent(Consumer> callback) -``` - -#### Parameters - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1360. - -*** - -### onFunctionCall - -#### Signature - -```java -public FunctionResult onFunctionCall( - String name, - Map args, - Map rawData -) -``` - -#### Parameters - - - - - - - -#### Returns - -`FunctionResult` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 600. - -*** - -### onSummary - -#### Signature - -```java -public AgentBase onSummary( - BiConsumer,Map> callback -) -``` - -#### Parameters - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1355. - -*** - -### promptAddSection - -#### Signature - - - - ```java - public AgentBase promptAddSection( - String title, - String body, - List bullets - ) - ``` - - - - ```java - public AgentBase promptAddSection(String title, String body) - ``` - - - -#### Parameters (Overload 1) - - - - - - - -#### Parameters (Overload 2) - - - - - -#### Returns (Overload 1) - -`AgentBase` - -#### Returns (Overload 2) - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 368. - -*** - -### promptAddSubsection - -#### Signature - -```java -public AgentBase promptAddSubsection( - String parentTitle, - String title, - String body -) -``` - -#### Parameters - - - - - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 384. - -*** - -### promptAddToSection - -#### Signature - -```java -public AgentBase promptAddToSection(String title, List bullets) -``` - -#### Parameters - - - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 400. - -*** - -### promptHasSection - -#### Signature - -```java -public boolean promptHasSection(String title) -``` - -#### Parameters - - - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 412. - -*** - -### registerAdditionalRoutes - -**Decorators:** `@Override` - -#### Signature - -```java -protected void registerAdditionalRoutes( - com.sun.net.httpserver.HttpServer server -) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1962. - -*** - -### registerSipUsername - -#### Signature - -```java -public AgentBase registerSipUsername(String username) -``` - -#### Parameters - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1298. - -*** - -### registerSwaigFunction - -**Decorators:** `@Override` - -#### Signature - -```java -public AgentBase registerSwaigFunction(Map swaigFunc) -``` - -#### Parameters - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 588. - -*** - -### removeSkill - -Typed overload of `#removeSkill(String)` (see Map)). - -#### Signature - - - - ```java - public AgentBase removeSkill(String skillName) - ``` - - - - ```java - public AgentBase removeSkill(SkillName skillName) - ``` - - - -#### Parameters (Overload 1) - - - -#### Parameters (Overload 2) - - - -#### Returns (Overload 1) - -`AgentBase` - -#### Returns (Overload 2) - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1055. - -*** - -### renderMainSwml - -**Decorators:** `@Override` - -#### Signature - -```java -protected Map renderMainSwml(HttpExchange exchange) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1930. - -*** - -### renderSwml - -Render the complete SWML document. -5 phases: pre-answer, answer, post-answer, AI, post-AI - -#### Signature - -```java -public Map renderSwml(String baseUrl) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1535. - -*** - -### renderSwmlJson - -Render SWML as a JSON string. - -#### Signature - -```java -public String renderSwmlJson(String baseUrl) -``` - -#### Parameters - - - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1726. - -*** - -### resetContexts - -Remove all contexts, returning the agent to a no-contexts state. -This is a convenience wrapper around `defineContexts().reset()`. -Use it in a dynamic config callback when you need to rebuild -contexts from scratch for a specific request. - -#### Signature - -```java -public AgentBase resetContexts() -``` - -#### Returns - -`AgentBase` — this agent for chaining. - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1029. - -*** - -### run - -Start the agent server. - -Equivalent to `#serve()` (inherited). - -#### Signature - -```java -public void run() -``` - -#### Throws - -- `IOException` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 2088. - -*** - -### setDynamicConfigCallback - -#### Signature - -```java -public AgentBase setDynamicConfigCallback(DynamicConfigCallback callback) -``` - -#### Parameters - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1082. - -*** - -### setFunctionIncludes - -#### Signature - -```java -public AgentBase setFunctionIncludes(List> includes) -``` - -#### Parameters - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 947. - -*** - -### setGlobalData - -#### Signature - -```java -public AgentBase setGlobalData(Map data) -``` - -#### Parameters - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 785. - -*** - -### setInternalFillers - -#### Signature - -```java -public AgentBase setInternalFillers(List> fillers) -``` - -#### Parameters - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 836. - -*** - -### setInternalFillersMap - -Set internal fillers for native SWAIG functions. - -<p>Internal fillers are short phrases the AI agent speaks (via TTS) -while an internal/native function is running, so the caller doesn't -hear dead air during transitions or background work. - -<p>Supported function names (match the SWAIGInternalFiller schema): -`hangup`, `check_time`, `wait_for_user`, -`wait_seconds`, `adjust_response_latency`, -`next_step`, `change_context`, `get_visual_input`, -`get_ideal_strategy`. - -See -`#SUPPORTED_INTERNAL_FILLER_NAMES`. - -<p>Notably NOT supported: `change_step`, `gather_submit`, or -arbitrary user-defined SWAIG function names. The runtime only honors -fillers for the names listed above; everything else is silently -ignored at the SWML level. This method warns at registration time if -you pass an unknown name so you catch the typo early. - -#### Signature - -```java -public AgentBase setInternalFillersMap( - Map>> fillers -) -``` - -#### Parameters - - - map of → language\_code → phrases. - - -#### Returns - -`AgentBase` — this agent for chaining. - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 865. - -*** - -### setLanguageParams - -Set (or replace) the per-language `params` dict on an already-added -language. - -Empty/null params removes the key. Unknown code is a no-op. -Returns self for chaining. Mirrors Python's set\_language\_params. - -#### Signature - -```java -public AgentBase setLanguageParams(String code, Map params) -``` - -#### Parameters - - - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 724. - -*** - -### setLanguages - -#### Signature - -```java -public AgentBase setLanguages(List> langs) -``` - -#### Parameters - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 754. - -*** - -### setNativeFunctions - -#### Signature - -```java -public AgentBase setNativeFunctions(List funcs) -``` - -#### Parameters - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 800. - -*** - -### setParam - -#### Signature - -```java -public AgentBase setParam(String key, Object value) -``` - -#### Parameters - - - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 775. - -*** - -### setParams - -#### Signature - -```java -public AgentBase setParams(Map newParams) -``` - -#### Parameters - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 780. - -*** - -### setPostPrompt - -#### Signature - -```java -public AgentBase setPostPrompt(String text) -``` - -#### Parameters - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 363. - -*** - -### setPostPromptLlmParams - -#### Signature - -```java -public AgentBase setPostPromptLlmParams(Map llmParams) -``` - -#### Parameters - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 959. - -*** - -### setPostPromptUrl - -#### Signature - -```java -public AgentBase setPostPromptUrl(String url) -``` - -#### Parameters - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1092. - -*** - -### setPromptLlmParams - -#### Signature - -```java -public AgentBase setPromptLlmParams(Map llmParams) -``` - -#### Parameters - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 953. - -*** - -### setPromptPom - -Sets the prompt as a list of POM section maps. - -Each section map -supports keys "title", "body", "bullets", "numbered", -"numbered\_bullets", and "subsections". Switches the agent to POM mode. - -Mirrors Python's PromptManager.set\_prompt\_pom — accepts a list of -section dicts and stores them in pomSections. - -#### Signature - -```java -public AgentBase setPromptPom(List> pom) -``` - -#### Parameters - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 461. - -*** - -### setPromptText - -#### Signature - -```java -public AgentBase setPromptText(String text) -``` - -#### Parameters - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 357. - -*** - -### setPronunciations - -#### Signature - -```java -public AgentBase setPronunciations(List> prons) -``` - -#### Parameters - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 769. - -*** - -### setWebHookUrl - -#### Signature - -```java -public AgentBase setWebHookUrl(String url) -``` - -#### Parameters - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1087. - -*** - -### updateGlobalData - -#### Signature - -```java -public AgentBase updateGlobalData(Map data) -``` - -#### Parameters - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 791. - -*** - -### validateSignedWebhook - -Override the `Service` hook to enforce SignalWire webhook -signature validation when a `#signingKey` is configured. - -Returns -`true` (no-op) when `signingKey` is unset; per -porting-sdk/webhooks.md, the AgentBase MUST NOT silently reject -unsigned requests when no key is configured (a prominent startup -warning is the documented behavior instead — emitted in -`Builder#build()`). - -<p>The signature header is read from `X-SignalWire-Signature` -(or its `X-Twilio-Signature` legacy alias). The URL is -reconstructed from proxy headers / `SWML_PROXY_URL_BASE` / -the request itself, and the validator is called with the raw body -bytes the caller already captured. - -**Decorators:** `@Override` - -#### Signature - -```java -protected boolean validateSignedWebhook( - com.sun.net.httpserver.HttpExchange exchange, - String rawBody -) -``` - -#### Parameters - - - the inbound HttpExchange. - - - - the raw UTF-8 body string that was already read from the exchange. - - -#### Returns - -`boolean` — `true` when validation passes (or no key is configured). - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1426. - -*** - -### validateToolToken - -Validate a per-call SWAIG-function token. - -Returns false when the -function is not registered, when the SessionManager rejects the -token, or on any underlying exception. - -<p>Python parity: `state_mixin.StateMixin.validate_tool_token` -— rejects unknown functions up-front and swallows exceptions. - -#### Signature - -```java -public boolean validateToolToken( - String functionName, - String token, - String callId -) -``` - -#### Parameters - - - - - - - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 656. - -*** - -### validateWebhook - -Public delegate around `#validateSignedWebhook` so external -front-doors (e.g. - -`com.signalwire.sdk.server.AgentServer`, a -Lambda adapter, etc.) can run the same logic the in-process HTTP -server does. Mirrors the no-op-when-unset behavior described in -porting-sdk/webhooks.md. - -#### Signature - -```java -public boolean validateWebhook( - com.sun.net.httpserver.HttpExchange exchange, - String rawBody -) -``` - -#### Parameters - - - the inbound HttpExchange. - - - - raw UTF-8 body string. - - -#### Returns - -`boolean` — `true` when validation passes (or no key is configured). - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1402. - -## Interfaces - -### DynamicConfigCallback - -#### Signature - -```java -public interface DynamicConfigCallback -``` - -#### Methods - -##### configure - -###### Signature - -```java -void configure( - Map queryParams, - Map bodyParams, - Map> headers, - AgentBase agent -) -``` - -###### Parameters - - - - - - - - - -###### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 2100. - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 2098. - -## Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 55. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/agent/agent/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/agent/agent/index.mdx deleted file mode 100644 index de1506fecb..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/agent/agent/index.mdx +++ /dev/null @@ -1,27 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/agent/agent" -title: "agent" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "module" - language: "java" - qualified_name: "com.signalwire.sdk.agent" - module: "com.signalwire.sdk.agent" ---- -# `agent` - -## Signature - -```java -package com.signalwire.sdk.agent -``` - -## Classes - - - - Base class for all SignalWire AI agents. Composes prompt management, tool registration, AI config, HTTP serving, skills integration, and SWML rendering. Use the builder pattern: <pre> var agent = AgentBase.builder() .name("my-agent") .route("/") .port(3000) .build(); </pre> - - diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/cli/cli/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/cli/cli/index.mdx deleted file mode 100644 index 9f81988635..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/cli/cli/index.mdx +++ /dev/null @@ -1,27 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/cli/cli" -title: "cli" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "module" - language: "java" - qualified_name: "com.signalwire.sdk.cli" - module: "com.signalwire.sdk.cli" ---- -# `cli` - -## Signature - -```java -package com.signalwire.sdk.cli -``` - -## Classes - - - - CLI tool for testing SWAIG functions against an agent. <p> Uses only JDK classes (java.net.http.HttpClient) -- no external dependencies. <p> Two modes: <ul> <li><b>URL mode</b> — hit a running agent HTTP server.</li> <li><b>Simulation mode</b> — \ loads the agent class directly and routes invocation through the matching serverless adapter (e.g. - - diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/cli/cli/swaig-test/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/cli/cli/swaig-test/index.mdx deleted file mode 100644 index af912278d2..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/cli/cli/swaig-test/index.mdx +++ /dev/null @@ -1,136 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/cli/cli/swaig-test" -title: "SwaigTest" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.cli.SwaigTest" - parent: "com.signalwire.sdk.cli" - module: "com.signalwire.sdk.cli" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/SwaigTest.java" - visibility: "public" ---- -# `SwaigTest` - -CLI tool for testing SWAIG functions against an agent. - -<p> -Uses only JDK classes (java.net.http.HttpClient) -- no external dependencies. -<p> -Two modes: -<ul> - <li><b>URL mode</b> — hit a running agent HTTP server.</li> - <li><b>Simulation mode</b> — <platform> loads the - agent class directly and routes invocation through the matching - serverless adapter (e.g. - -`LambdaAgentHandler`) instead of -the HTTP server. Uses an injected `EnvProvider` to mask the -real process env with simulated values, since Java cannot mutate -`System#getenv()`.</li> - -</ul> -<p> -Usage: -<pre> - swaig-test --url http://user:pass@localhost:3000 --list-tools - swaig-test --url http://user:pass@localhost:3000 --dump-swml - swaig-test --url http://user:pass@localhost:3000 --exec tool_name --param key=value - swaig-test <agent-class> --simulate-serverless lambda --dump-swml - swaig-test <agent-class> --simulate-serverless lambda --exec tool_name --param k=v - swaig-test <agent-class> --simulate-serverless lambda -</pre> - -## Signature - -```java -public class SwaigTest -``` - -## Methods - -### \ - -#### Signature - -```java -public () -``` - -#### Source - -[`src/main/java/com/signalwire/sdk/cli/SwaigTest.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/SwaigTest.java) - -*** - -### main - -**Modifiers:** `static` - -#### Signature - -```java -public static void main(String[] args) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/cli/SwaigTest.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/SwaigTest.java) - -Line 75. - -*** - -### run - -Run the CLI and return the exit code. - -Extracted so tests can drive -`main` without calling `System#exit(int)`. - -**Modifiers:** `static` - -#### Signature - - - - ```java - public static int run(String[] args) - ``` - - - - ```java - private void run() - ``` - - - -#### Parameters (Overload 1) - - - command-line arguments. - - -#### Returns (Overload 1) - -`int` — 0 on success, non-zero on error. - -#### Source - -[`src/main/java/com/signalwire/sdk/cli/SwaigTest.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/SwaigTest.java) - -Line 87. - -## Source - -[`src/main/java/com/signalwire/sdk/cli/SwaigTest.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/SwaigTest.java) - -Line 44. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/cli/simulation/simulation/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/cli/simulation/simulation/index.mdx deleted file mode 100644 index bdced5012e..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/cli/simulation/simulation/index.mdx +++ /dev/null @@ -1,27 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/cli/simulation/simulation" -title: "simulation" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "module" - language: "java" - qualified_name: "com.signalwire.sdk.cli.simulation" - module: "com.signalwire.sdk.cli.simulation" ---- -# `simulation` - -## Signature - -```java -package com.signalwire.sdk.cli.simulation -``` - -## Classes - - - - Build a layered `EnvProvider` that overlays simulated serverless environment values on top of the real process environment. <p>Java cannot mutate `System#getenv()` at runtime (the map it returns is an immutable snapshot of the OS env). - - diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/cli/simulation/simulation/serverless-simulator/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/cli/simulation/simulation/serverless-simulator/index.mdx deleted file mode 100644 index 9a188e8e27..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/cli/simulation/simulation/serverless-simulator/index.mdx +++ /dev/null @@ -1,356 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/cli/simulation/simulation/serverless-simulator" -title: "ServerlessSimulator" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.cli.simulation.ServerlessSimulator" - parent: "com.signalwire.sdk.cli.simulation" - module: "com.signalwire.sdk.cli.simulation" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java" - visibility: "public" ---- -# `ServerlessSimulator` - -Build a layered `EnvProvider` that overlays simulated serverless -environment values on top of the real process environment. - -<p>Java cannot mutate `System#getenv()` at runtime (the map it -returns is an immutable snapshot of the OS env). - -To implement the -\--simulate-serverless flag in the same spirit as -Python's `mock_env.py`, we therefore cannot "set env vars then -clean up" — we instead compose an injectable `EnvProvider` and -thread it through every code path in the SDK that reads env vars. - -<p>Accepts only the platforms the port actually implements. Ports that -add CGI / GCF / Azure support later should extend -`#presetFor(Platform)`. - -<p>Mirrors the clear-and-warn semantics of Python's -`_clear_conflicting_env`: `SWML_PROXY_URL_BASE` is masked -in the simulated view so that platform-specific URL generation is -actually exercised. If the caller's real OS env has -`SWML_PROXY_URL_BASE` set, the simulator does <b>not</b> mutate -the real env — it simply returns `null` for that key through the -layered `EnvProvider`. Callers that want to surface the mismatch -to the user can check `#proxyUrlBaseMaskedFromRealEnv()`. - -**Modifiers:** `final` - -## Signature - -```java -public final class ServerlessSimulator -``` - -## Methods - -### \ - -Build a simulator for the given platform using the real process -environment as the fallback layer. - -#### Signature - - - - ```java - public (Platform platform) - ``` - - - - ```java - public ( - Platform platform, - EnvProvider realEnv, - Map overrides - ) - ``` - - - -#### Parameters (Overload 1) - - - platform to simulate. - - -#### Parameters (Overload 2) - - - platform to simulate. - - - - fallback env provider (usually `EnvProvider#SYSTEM`). - - - - user-supplied overrides on top of the platform preset. - - -#### Source - -[`src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java) - -Line 100. - -*** - -### buildEnvProvider - -Build the layered `EnvProvider`. - -Precedence is: - -<ol> - <li>masked keys — always return `null`.</li> - <li>simulated values — overlaid on the real env.</li> - <li>Real env — everything else passes through.</li> -</ol> - -#### Signature - -```java -public EnvProvider buildEnvProvider() -``` - -#### Returns - -`EnvProvider` — layered env provider. - -#### Source - -[`src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java) - -Line 199. - -*** - -### getMaskedKeys - -#### Signature - -```java -public Set getMaskedKeys() -``` - -#### Returns - -`Set` — an immutable view of the keys that are masked (returned as `null`) regardless of what the real env has for them. - -#### Source - -[`src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java) - -Line 174. - -*** - -### getPlatform - -#### Signature - -```java -public Platform getPlatform() -``` - -#### Returns - -`Platform` — the simulated platform. - -#### Source - -[`src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java) - -Line 158. - -*** - -### getSimulatedEnv - -#### Signature - -```java -public Map getSimulatedEnv() -``` - -#### Returns - -`Map` — the map of simulated values layered on top of the real env. The returned map is a defensive copy. - -#### Source - -[`src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java) - -Line 166. - -*** - -### parsePlatform - -Parse the CLI-string form of a platform. - -Accepts only values this -port supports; unknown strings throw `IllegalArgumentException` -so the CLI can surface a clear error instead of silently falling -back. - -**Modifiers:** `static` - -#### Signature - -```java -public static Platform parsePlatform(String s) -``` - -#### Parameters - - - user-supplied platform string. - - -#### Returns - -`Platform` — the matching `Platform`. - -#### Throws - -- `IllegalArgumentException` — for unsupported platforms. - -#### Source - -[`src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java) - -Line 80. - -*** - -### presetFor - -Default env-var preset for a platform, mirroring Python's -`ServerlessSimulator.PLATFORM_PRESETS`. - -**Modifiers:** `static` - -#### Signature - -```java -public static Map presetFor(Platform platform) -``` - -#### Parameters - - - platform. - - -#### Returns - -`Map` — the preset map (never null). - -#### Source - -[`src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java) - -Line 142. - -*** - -### proxyUrlBaseMaskedFromRealEnv - -#### Signature - -```java -public boolean proxyUrlBaseMaskedFromRealEnv() -``` - -#### Returns - -`boolean` — `true` if the real process env has `SWML_PROXY_URL_BASE` set — i.e. the simulated view is hiding a real value the user might not have intended. The CLI uses this to print a warning that mirrors Python's behaviour. - -#### Source - -[`src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java) - -Line 184. - -## Enums - -### Platform - -Platforms the Java port supports simulating today. - -#### Signature - -```java -public enum Platform -``` - -#### Variants - - - AWS Lambda. - - -#### Methods - -##### valueOf - -**Modifiers:** `static` - -###### Signature - -```java -public static Platform valueOf(String name) -``` - -###### Parameters - - - -###### Returns - -`Platform` - -###### Source - -[`src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java) - -*** - -##### values - -**Modifiers:** `static` - -###### Signature - -```java -public static Platform[] values() -``` - -###### Returns - -`Platform[]` - -###### Source - -[`src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java) - -#### Source - -[`src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java) - -Line 39. - -## Source - -[`src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java) - -Line 36. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/contexts/contexts/context-builder/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/contexts/contexts/context-builder/index.mdx deleted file mode 100644 index 438e583d88..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/contexts/contexts/context-builder/index.mdx +++ /dev/null @@ -1,257 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/contexts/contexts/context-builder" -title: "ContextBuilder" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.contexts.ContextBuilder" - parent: "com.signalwire.sdk.contexts" - module: "com.signalwire.sdk.contexts" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/ContextBuilder.java" - visibility: "public" ---- -# `ContextBuilder` - -Builder for multi-step, multi-context AI agent workflows. - -<p>A ContextBuilder owns one or more `Context`s; each context owns an -ordered list of `Step`s. - -Only one context and one step is active at a -time. Per chat turn, the runtime injects the current step's instructions as -a system message, then asks the LLM for a response. - -<h2>Native tools auto-injected by the runtime</h2> - -<p>When a step (or its enclosing context) declares valid_steps or -valid_contexts, the runtime auto-injects two native tools so the model can -navigate the flow: -<ul> - <li>enum) — present when valid_steps is set</li> - <li>enum) — present when valid_contexts is set</li> -</ul> - -<p>A third native tool — `gather_submit` — is injected during -gather_info questioning. These three names are <b>reserved</b>: -`#validate()` rejects any agent that defines a SWAIG tool with one of -these names. See `#RESERVED_NATIVE_TOOL_NAMES`. - -<h2>Function whitelisting (Step.setFunctions)</h2> - -<p>Each step may declare a functions whitelist. The whitelist is applied -in-memory at the start of each LLM turn. CRITICALLY: if a step does NOT -declare a functions field, it INHERITS the previous step's active set. -See `Step#setFunctions(Object)` for details and examples. - -## Signature - -```java -public class ContextBuilder -``` - -## Constants - - - Reserved tool names auto-injected by the runtime when contexts/steps are in use. User-defined SWAIG tools must not collide with these names. \

    \
  • \`next\_step\` / \`change\_context\` are injected when valid\_steps or valid\_contexts is set so the model can navigate the flow.\
  • \
  • \`gather\_submit\` is injected while a step's gather\_info is collecting answers.\
  • \
-
- -## Methods - -### \ - -#### Signature - -```java -public () -``` - -#### Source - -[`src/main/java/com/signalwire/sdk/contexts/ContextBuilder.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/ContextBuilder.java) - -Line 70. - -*** - -### addContext - -Add a new context. - -#### Signature - -```java -public Context addContext(String name) -``` - -#### Parameters - - - -#### Returns - -`Context` - -#### Source - -[`src/main/java/com/signalwire/sdk/contexts/ContextBuilder.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/ContextBuilder.java) - -Line 105. - -*** - -### attachToolNameSupplier - -Attach a supplier that returns registered SWAIG tool names so -`#validate()` can check for collisions with -`#RESERVED_NATIVE_TOOL_NAMES`. - -Called internally by -`AgentBase.defineContexts()`. - -#### Signature - -```java -public ContextBuilder attachToolNameSupplier( - java.util.function.Supplier> supplier -) -``` - -#### Parameters - - - returns the current set of registered tool names. - - -#### Returns - -`ContextBuilder` — this builder for chaining. - -#### Source - -[`src/main/java/com/signalwire/sdk/contexts/ContextBuilder.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/ContextBuilder.java) - -Line 84. - -*** - -### getContext - -Get an existing context by name. - -#### Signature - -```java -public Context getContext(String name) -``` - -#### Parameters - - - -#### Returns - -`Context` - -#### Source - -[`src/main/java/com/signalwire/sdk/contexts/ContextBuilder.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/ContextBuilder.java) - -Line 121. - -*** - -### isEmpty - -#### Signature - -```java -public boolean isEmpty() -``` - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/contexts/ContextBuilder.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/ContextBuilder.java) - -Line 125. - -*** - -### reset - -Remove all contexts, returning the builder to its initial state. -Use this in a dynamic config callback when you need to rebuild -contexts from scratch for a specific request. - -#### Signature - -```java -public ContextBuilder reset() -``` - -#### Returns - -`ContextBuilder` — this builder for chaining. - -#### Source - -[`src/main/java/com/signalwire/sdk/contexts/ContextBuilder.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/ContextBuilder.java) - -Line 96. - -*** - -### toMap - -Convert all contexts to a Map for SWML generation. -Validates before converting. - -#### Signature - -```java -public Map toMap() -``` - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/contexts/ContextBuilder.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/ContextBuilder.java) - -Line 310. - -*** - -### validate - -Validate the contexts configuration. - -#### Signature - -```java -public void validate() -``` - -#### Throws - -- `IllegalStateException` — if validation fails - -#### Source - -[`src/main/java/com/signalwire/sdk/contexts/ContextBuilder.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/ContextBuilder.java) - -Line 134. - -## Source - -[`src/main/java/com/signalwire/sdk/contexts/ContextBuilder.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/ContextBuilder.java) - -Line 41. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/contexts/contexts/context/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/contexts/contexts/context/index.mdx deleted file mode 100644 index 929f0b465f..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/contexts/contexts/context/index.mdx +++ /dev/null @@ -1,650 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/contexts/contexts/context" -title: "Context" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.contexts.Context" - parent: "com.signalwire.sdk.contexts" - module: "com.signalwire.sdk.contexts" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java" - visibility: "public" ---- -# `Context` - -Represents a single context containing multiple steps. - -<p> -All setter methods return `this` for fluent chaining. - -## Signature - -```java -public class Context -``` - -## Methods - -### \ - -#### Signature - -```java -public (String name) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) - -Line 43. - -*** - -### addBullets - -#### Signature - -```java -public Context addBullets(String title, List bullets) -``` - -#### Parameters - - - - - -#### Returns - -`Context` - -#### Source - -[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) - -Line 205. - -*** - -### addEnterFiller - -#### Signature - -```java -public Context addEnterFiller(String languageCode, List fillers) -``` - -#### Parameters - - - - - -#### Returns - -`Context` - -#### Source - -[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) - -Line 230. - -*** - -### addExitFiller - -#### Signature - -```java -public Context addExitFiller(String languageCode, List fillers) -``` - -#### Parameters - - - - - -#### Returns - -`Context` - -#### Source - -[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) - -Line 238. - -*** - -### addSection - -#### Signature - -```java -public Context addSection(String title, String body) -``` - -#### Parameters - - - - - -#### Returns - -`Context` - -#### Source - -[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) - -Line 194. - -*** - -### addStep - -Add a new step to this context. - -#### Signature - - - - ```java - public Step addStep(String stepName) - ``` - - - - ```java - public Step addStep( - String stepName, - String task, - List bullets, - String criteria, - Object functions, - List validSteps - ) - ``` - - - -#### Parameters (Overload 1) - - - -#### Parameters (Overload 2) - - - - - - - - - - - - - -#### Returns (Overload 1) - -`Step` - -#### Returns (Overload 2) - -`Step` - -#### Source - -[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) - -Line 57. - -*** - -### getName - -#### Signature - -```java -public String getName() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) - -Line 50. - -*** - -### getStep - -#### Signature - -```java -public Step getStep(String stepName) -``` - -#### Parameters - - - -#### Returns - -`Step` - -#### Source - -[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) - -Line 84. - -*** - -### moveStep - -#### Signature - -```java -public Context moveStep(String stepName, int position) -``` - -#### Parameters - - - - - -#### Returns - -`Context` - -#### Source - -[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) - -Line 96. - -*** - -### removeStep - -#### Signature - -```java -public Context removeStep(String stepName) -``` - -#### Parameters - - - -#### Returns - -`Context` - -#### Source - -[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) - -Line 88. - -*** - -### setConsolidate - -#### Signature - -```java -public Context setConsolidate(boolean consolidate) -``` - -#### Parameters - - - -#### Returns - -`Context` - -#### Source - -[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) - -Line 144. - -*** - -### setEnterFillers - -#### Signature - -```java -public Context setEnterFillers(Map> fillers) -``` - -#### Parameters - - - -#### Returns - -`Context` - -#### Source - -[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) - -Line 216. - -*** - -### setExitFillers - -#### Signature - -```java -public Context setExitFillers(Map> fillers) -``` - -#### Parameters - - - -#### Returns - -`Context` - -#### Source - -[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) - -Line 223. - -*** - -### setFullReset - -#### Signature - -```java -public Context setFullReset(boolean fullReset) -``` - -#### Parameters - - - -#### Returns - -`Context` - -#### Source - -[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) - -Line 149. - -*** - -### setInitialStep - -Set which step the context starts on when entered. - -<p>By default, a context starts on its first step (index 0). - -Use this -to skip a preamble step on re-entry via `change_context`. - -#### Signature - -```java -public Context setInitialStep(String stepName) -``` - -#### Parameters - - - name of the step to start on (must exist in this context). - - -#### Returns - -`Context` — this context for chaining. - -#### Source - -[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) - -Line 114. - -*** - -### setIsolated - -Mark this context as isolated — entering it wipes conversation history. - -<p>When `isolated=true` and the context is entered via -change_context, the runtime wipes the conversation array. - -The model -starts fresh with only the new context's system\_prompt + step -instructions, with no memory of prior turns. - -<p><b>EXCEPTION — reset overrides the wipe:</b> If the context also has -a reset configuration (via `#setConsolidate(boolean)` or -`#setFullReset(boolean)`), the wipe is skipped in favor of the -reset behavior. Use reset with consolidate=true to summarize prior -history into a single message instead of dropping it entirely. - -<p>Use cases: switching to a sensitive billing flow that should not see -prior small-talk; handing off to a different agent persona; resetting -after a long off-topic detour. - -#### Signature - -```java -public Context setIsolated(boolean isolated) -``` - -#### Parameters - - - true to wipe conversation history on context entry (subject to the reset exception above). - - -#### Returns - -`Context` — this context for chaining. - -#### Source - -[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) - -Line 181. - -*** - -### setPostPrompt - -#### Signature - -```java -public Context setPostPrompt(String postPrompt) -``` - -#### Parameters - - - -#### Returns - -`Context` - -#### Source - -[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) - -Line 134. - -*** - -### setPrompt - -#### Signature - -```java -public Context setPrompt(String prompt) -``` - -#### Parameters - - - -#### Returns - -`Context` - -#### Source - -[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) - -Line 186. - -*** - -### setSystemPrompt - -#### Signature - -```java -public Context setSystemPrompt(String systemPrompt) -``` - -#### Parameters - - - -#### Returns - -`Context` - -#### Source - -[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) - -Line 139. - -*** - -### setUserPrompt - -#### Signature - -```java -public Context setUserPrompt(String userPrompt) -``` - -#### Parameters - - - -#### Returns - -`Context` - -#### Source - -[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) - -Line 154. - -*** - -### setValidContexts - -#### Signature - -```java -public Context setValidContexts(List contexts) -``` - -#### Parameters - - - -#### Returns - -`Context` - -#### Source - -[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) - -Line 124. - -*** - -### setValidSteps - -#### Signature - -```java -public Context setValidSteps(List steps) -``` - -#### Parameters - - - -#### Returns - -`Context` - -#### Source - -[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) - -Line 129. - -*** - -### toMap - -#### Signature - -```java -public Map toMap() -``` - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) - -Line 259. - -## Source - -[`src/main/java/com/signalwire/sdk/contexts/Context.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Context.java) - -Line 16. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/contexts/contexts/gather-info/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/contexts/contexts/gather-info/index.mdx deleted file mode 100644 index dc2ee5fe84..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/contexts/contexts/gather-info/index.mdx +++ /dev/null @@ -1,191 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/contexts/contexts/gather-info" -title: "GatherInfo" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.contexts.GatherInfo" - parent: "com.signalwire.sdk.contexts" - module: "com.signalwire.sdk.contexts" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/GatherInfo.java" - visibility: "public" ---- -# `GatherInfo` - -Configuration for gathering information in a step via the C-side gather\_info system. - -<p> -This produces zero tool_call/tool_result entries in LLM-visible history, -instead using dynamic step instruction re-injection to present one question at a time. - -## Signature - -```java -public class GatherInfo -``` - -## Methods - -### \ - -#### Signature - - - - ```java - public (String outputKey, String completionAction, String prompt) - ``` - - - - ```java - public () - ``` - - - -#### Parameters (Overload 1) - - - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/contexts/GatherInfo.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/GatherInfo.java) - -Line 24. - -*** - -### addQuestion - -Add a question to gather. - -#### Signature - - - - ```java - public GatherInfo addQuestion( - String key, - String question, - String type, - boolean confirm, - String prompt, - List functions - ) - ``` - - - - ```java - public GatherInfo addQuestion(String key, String question) - ``` - - - -#### Parameters (Overload 1) - - - - - - - - - - - - - -#### Parameters (Overload 2) - - - - - -#### Returns (Overload 1) - -`GatherInfo` - -#### Returns (Overload 2) - -`GatherInfo` - -#### Source - -[`src/main/java/com/signalwire/sdk/contexts/GatherInfo.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/GatherInfo.java) - -Line 38. - -*** - -### getCompletionAction - -#### Signature - -```java -public String getCompletionAction() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/contexts/GatherInfo.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/GatherInfo.java) - -Line 52. - -*** - -### getQuestions - -#### Signature - -```java -public List getQuestions() -``` - -#### Returns - -`List` - -#### Source - -[`src/main/java/com/signalwire/sdk/contexts/GatherInfo.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/GatherInfo.java) - -Line 48. - -*** - -### toMap - -#### Signature - -```java -public Map toMap() -``` - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/contexts/GatherInfo.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/GatherInfo.java) - -Line 56. - -## Source - -[`src/main/java/com/signalwire/sdk/contexts/GatherInfo.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/GatherInfo.java) - -Line 17. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/contexts/contexts/gather-question/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/contexts/contexts/gather-question/index.mdx deleted file mode 100644 index 172336ba51..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/contexts/contexts/gather-question/index.mdx +++ /dev/null @@ -1,123 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/contexts/contexts/gather-question" -title: "GatherQuestion" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.contexts.GatherQuestion" - parent: "com.signalwire.sdk.contexts" - module: "com.signalwire.sdk.contexts" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/GatherQuestion.java" - visibility: "public" ---- -# `GatherQuestion` - -Represents a single question in a gather\_info configuration. - -## Signature - -```java -public class GatherQuestion -``` - -## Methods - -### \ - -#### Signature - - - - ```java - public ( - String key, - String question, - String type, - boolean confirm, - String prompt, - List functions - ) - ``` - - - - ```java - public (String key, String question) - ``` - - - -#### Parameters (Overload 1) - - - - - - - - - - - - - -#### Parameters (Overload 2) - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/contexts/GatherQuestion.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/GatherQuestion.java) - -Line 23. - -*** - -### getKey - -#### Signature - -```java -public String getKey() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/contexts/GatherQuestion.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/GatherQuestion.java) - -Line 37. - -*** - -### toMap - -#### Signature - -```java -public Map toMap() -``` - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/contexts/GatherQuestion.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/GatherQuestion.java) - -Line 41. - -## Source - -[`src/main/java/com/signalwire/sdk/contexts/GatherQuestion.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/GatherQuestion.java) - -Line 14. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/contexts/contexts/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/contexts/contexts/index.mdx deleted file mode 100644 index d6e9e9983f..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/contexts/contexts/index.mdx +++ /dev/null @@ -1,43 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/contexts/contexts" -title: "contexts" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "module" - language: "java" - qualified_name: "com.signalwire.sdk.contexts" - module: "com.signalwire.sdk.contexts" ---- -# `contexts` - -## Signature - -```java -package com.signalwire.sdk.contexts -``` - -## Classes - - - - Represents a single context containing multiple steps. <p> All setter methods return `this` for fluent chaining. - - - - Builder for multi-step, multi-context AI agent workflows. <p>A ContextBuilder owns one or more `Context`s; each context owns an ordered list of `Step`s. - - - - Configuration for gathering information in a step via the C-side gather\_info system. <p> This produces zero tool\_call/tool\_result entries in LLM-visible history, instead using dynamic step instruction re-injection to present one question at a time. - - - - Represents a single question in a gather\_info configuration. - - - - Represents a single step within a context. <p> Steps can use either raw text or POM-style sections for their prompt content. All setter methods return `this` for fluent chaining. - - diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/contexts/contexts/step/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/contexts/contexts/step/index.mdx deleted file mode 100644 index 2760df1afb..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/contexts/contexts/step/index.mdx +++ /dev/null @@ -1,629 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/contexts/contexts/step" -title: "Step" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.contexts.Step" - parent: "com.signalwire.sdk.contexts" - module: "com.signalwire.sdk.contexts" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Step.java" - visibility: "public" ---- -# `Step` - -Represents a single step within a context. - -<p> -Steps can use either raw text or POM-style sections for their prompt content. -All setter methods return `this` for fluent chaining. - -## Signature - -```java -public class Step -``` - -## Methods - -### \ - -#### Signature - -```java -public (String name) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/contexts/Step.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Step.java) - -Line 39. - -*** - -### addBullets - -Add a POM section with bullet points. - -#### Signature - -```java -public Step addBullets(String title, List bullets) -``` - -#### Parameters - - - - - -#### Returns - -`Step` - -#### Source - -[`src/main/java/com/signalwire/sdk/contexts/Step.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Step.java) - -Line 78. - -*** - -### addGatherQuestion - -Add a question to this step's gather\_info configuration. -String, String) must be called first. - -<p><b>IMPORTANT — gather mode locks function access:</b> While the model -is asking gather questions, the runtime forcibly deactivates ALL of the -step's other functions. - -The only callable tools during a gather -question are: - -<ul> - <li>`gather_submit` (the native answer-submission tool)</li> - <li>Whatever names you pass in this question's `functions` - argument</li> -</ul> - -<p>`next_step` and `change_context` are also filtered out — -the model cannot navigate away until the gather completes. This is by -design: it forces a tight ask → submit → next-question loop. - -<p>If a question needs to call out to a tool (e.g. validate an email, -geocode a ZIP), list that tool name in this question's `functions` -argument. Functions listed here are active ONLY for this question. - -#### Signature - - - - ```java - public Step addGatherQuestion( - String key, - String question, - String type, - boolean confirm, - String prompt, - List functions - ) - ``` - - - - ```java - public Step addGatherQuestion(String key, String question) - ``` - - - -#### Parameters (Overload 1) - - - - - - - - - - - - - -#### Parameters (Overload 2) - - - - - -#### Returns (Overload 1) - -`Step` - -#### Returns (Overload 2) - -`Step` - -#### Source - -[`src/main/java/com/signalwire/sdk/contexts/Step.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Step.java) - -Line 206. - -*** - -### addSection - -Add a POM section to the step. - -#### Signature - -```java -public Step addSection(String title, String body) -``` - -#### Parameters - - - - - -#### Returns - -`Step` - -#### Source - -[`src/main/java/com/signalwire/sdk/contexts/Step.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Step.java) - -Line 63. - -*** - -### clearSections - -#### Signature - -```java -public Step clearSections() -``` - -#### Returns - -`Step` - -#### Source - -[`src/main/java/com/signalwire/sdk/contexts/Step.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Step.java) - -Line 219. - -*** - -### getName - -#### Signature - -```java -public String getName() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/contexts/Step.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Step.java) - -Line 44. - -*** - -### setEnd - -Mark this step as terminal for the step flow. - -<p><b>IMPORTANT:</b> `end=true` does NOT end the conversation or -hang up the call. - -It exits step mode entirely after this step executes -— clearing the steps list, current step index, valid\_steps, and -valid\_contexts. The agent keeps running, but operates only under the -base system prompt and the context-level prompt; no more step -instructions are injected and no more `next_step` tool is offered. - -<p>To actually end the call, call a hangup tool or define a -hangup hook. - -#### Signature - -```java -public Step setEnd(boolean end) -``` - -#### Parameters - - - true to exit step mode after this step. - - -#### Returns - -`Step` — this step for chaining. - -#### Source - -[`src/main/java/com/signalwire/sdk/contexts/Step.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Step.java) - -Line 161. - -*** - -### setFunctions - -Set which non-internal functions are callable while this step is active. - -<p><b>IMPORTANT — inheritance behavior:</b> If you do NOT call this method, -the step inherits whichever function set was active on the previous step -(or the previous context's last step). - -The server-side runtime only -resets the active set when a step explicitly declares its `functions` -field. This is the most common source of bugs in multi-step agents: -forgetting `setFunctions()` on a later step lets the previous step's -tools leak through. Best practice is to call `setFunctions()` -explicitly on every step that should differ from the previous one. - -<p>Keep the per-step active set small: LLM tool selection accuracy -degrades noticeably past ~7-8 simultaneously-active tools per call. -Use per-step whitelisting to partition large tool collections. - -<p>Accepts: -<ul> - <li>`List<String>` — whitelist of function names allowed in this - step. Functions not in the list become inactive.</li> - <li>`List.of()` (empty list) — explicit disable-all.</li> - <li>The string `"none"` — synonym for an empty list.</li> -</ul> - -<p>Internal functions (e.g. `gather_submit`, hangup hook) are -ALWAYS protected and cannot be deactivated by this whitelist. The native -navigation tools `next_step` and `change_context` are -injected automatically when `setValidSteps`/`setValidContexts` -is used; they are not affected by this list and do not need to appear in -it. - -#### Signature - -```java -public Step setFunctions(Object functions) -``` - -#### Parameters - - - a `List` whitelist, an empty list, or the string `"none"`. - - -#### Returns - -`Step` — this step for chaining. - -#### Source - -[`src/main/java/com/signalwire/sdk/contexts/Step.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Step.java) - -Line 130. - -*** - -### setGatherInfo - -Enable info gathering for this step. - -#### Signature - -```java -public Step setGatherInfo( - String outputKey, - String completionAction, - String prompt -) -``` - -#### Parameters - - - - - - - -#### Returns - -`Step` - -#### Source - -[`src/main/java/com/signalwire/sdk/contexts/Step.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Step.java) - -Line 179. - -*** - -### setResetConsolidate - -#### Signature - -```java -public Step setResetConsolidate(boolean consolidate) -``` - -#### Parameters - - - -#### Returns - -`Step` - -#### Source - -[`src/main/java/com/signalwire/sdk/contexts/Step.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Step.java) - -Line 235. - -*** - -### setResetFullReset - -#### Signature - -```java -public Step setResetFullReset(boolean fullReset) -``` - -#### Parameters - - - -#### Returns - -`Step` - -#### Source - -[`src/main/java/com/signalwire/sdk/contexts/Step.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Step.java) - -Line 240. - -*** - -### setResetSystemPrompt - -#### Signature - -```java -public Step setResetSystemPrompt(String systemPrompt) -``` - -#### Parameters - - - -#### Returns - -`Step` - -#### Source - -[`src/main/java/com/signalwire/sdk/contexts/Step.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Step.java) - -Line 225. - -*** - -### setResetUserPrompt - -#### Signature - -```java -public Step setResetUserPrompt(String userPrompt) -``` - -#### Parameters - - - -#### Returns - -`Step` - -#### Source - -[`src/main/java/com/signalwire/sdk/contexts/Step.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Step.java) - -Line 230. - -*** - -### setSkipToNextStep - -#### Signature - -```java -public Step setSkipToNextStep(boolean skip) -``` - -#### Parameters - - - -#### Returns - -`Step` - -#### Source - -[`src/main/java/com/signalwire/sdk/contexts/Step.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Step.java) - -Line 171. - -*** - -### setSkipUserTurn - -#### Signature - -```java -public Step setSkipUserTurn(boolean skip) -``` - -#### Parameters - - - -#### Returns - -`Step` - -#### Source - -[`src/main/java/com/signalwire/sdk/contexts/Step.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Step.java) - -Line 166. - -*** - -### setStepCriteria - -#### Signature - -```java -public Step setStepCriteria(String criteria) -``` - -#### Parameters - - - -#### Returns - -`Step` - -#### Source - -[`src/main/java/com/signalwire/sdk/contexts/Step.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Step.java) - -Line 90. - -*** - -### setText - -Set the step's prompt text directly. - -#### Signature - -```java -public Step setText(String text) -``` - -#### Parameters - - - -#### Returns - -`Step` - -#### Source - -[`src/main/java/com/signalwire/sdk/contexts/Step.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Step.java) - -Line 51. - -*** - -### setValidContexts - -#### Signature - -```java -public Step setValidContexts(List contexts) -``` - -#### Parameters - - - -#### Returns - -`Step` - -#### Source - -[`src/main/java/com/signalwire/sdk/contexts/Step.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Step.java) - -Line 140. - -*** - -### setValidSteps - -#### Signature - -```java -public Step setValidSteps(List steps) -``` - -#### Parameters - - - -#### Returns - -`Step` - -#### Source - -[`src/main/java/com/signalwire/sdk/contexts/Step.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Step.java) - -Line 135. - -*** - -### toMap - -#### Signature - -```java -public Map toMap() -``` - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/contexts/Step.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Step.java) - -Line 289. - -## Source - -[`src/main/java/com/signalwire/sdk/contexts/Step.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/contexts/Step.java) - -Line 17. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/datamap/datamap/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/datamap/datamap/index.mdx deleted file mode 100644 index 17d9c2287e..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/datamap/datamap/index.mdx +++ /dev/null @@ -1,570 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/datamap/datamap" -title: "datamap" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.datamap" - module: "com.signalwire.sdk.datamap" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/datamap/DataMap.java" ---- -# `datamap` - -Fluent builder for creating SWAIG data\_map configurations. - -<p> -DataMap tools execute on SignalWire servers without requiring webhook endpoints. -Supports variable expansion: `${args.param`}, `${response.field`}, -`${global_data.key`}, `${foreach.item`}. -<p> -All methods return `this` for fluent chaining. - -## Signature - -```java -public class DataMap -``` - -## Methods - -### \ - -#### Signature - -```java -public (String functionName) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/datamap/DataMap.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/datamap/DataMap.java) - -Line 33. - -*** - -### body - -Set request body for the last added webhook (POST/PUT requests). - -#### Signature - -```java -public DataMap body(Map data) -``` - -#### Parameters - - - -#### Returns - -`DataMap` - -#### Source - -[`src/main/java/com/signalwire/sdk/datamap/DataMap.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/datamap/DataMap.java) - -Line 166. - -*** - -### description - -Alias for `#purpose(String)`; sets the LLM-facing tool -description. - -This string is read by the model to decide WHEN to -call this tool. See `#purpose(String)` for bad-vs-good -examples. - -#### Signature - -```java -public DataMap description(String description) -``` - -#### Parameters - - - -#### Returns - -`DataMap` - -#### Source - -[`src/main/java/com/signalwire/sdk/datamap/DataMap.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/datamap/DataMap.java) - -Line 79. - -*** - -### errorKeys - -Set error keys for the most recent webhook (if webhooks exist) or top-level. - -#### Signature - -```java -public DataMap errorKeys(List keys) -``` - -#### Parameters - - - -#### Returns - -`DataMap` - -#### Source - -[`src/main/java/com/signalwire/sdk/datamap/DataMap.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/datamap/DataMap.java) - -Line 218. - -*** - -### expression - -Add an expression pattern for pattern-based responses. - -#### Signature - - - - ```java - public DataMap expression( - String testValue, - String pattern, - FunctionResult output, - FunctionResult nomatchOutput - ) - ``` - - - - ```java - public DataMap expression( - String testValue, - String pattern, - FunctionResult output - ) - ``` - - - -#### Parameters (Overload 1) - - - - - - - - - -#### Parameters (Overload 2) - - - - - - - -#### Returns (Overload 1) - -`DataMap` - -#### Returns (Overload 2) - -`DataMap` - -#### Source - -[`src/main/java/com/signalwire/sdk/datamap/DataMap.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/datamap/DataMap.java) - -Line 128. - -*** - -### fallbackOutput - -Set a fallback output result at the top level (used when all webhooks fail). - -#### Signature - -```java -public DataMap fallbackOutput(FunctionResult result) -``` - -#### Parameters - - - -#### Returns - -`DataMap` - -#### Source - -[`src/main/java/com/signalwire/sdk/datamap/DataMap.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/datamap/DataMap.java) - -Line 210. - -*** - -### foreach - -Process an array from the webhook response using foreach mechanism. - -#### Signature - -```java -public DataMap foreach(Map foreachConfig) -``` - -#### Parameters - - - -#### Returns - -`DataMap` - -#### Source - -[`src/main/java/com/signalwire/sdk/datamap/DataMap.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/datamap/DataMap.java) - -Line 188. - -*** - -### getName - -#### Signature - -```java -public String getName() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/datamap/DataMap.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/datamap/DataMap.java) - -Line 43. - -*** - -### globalErrorKeys - -Set top-level error keys (applies to all webhooks). - -#### Signature - -```java -public DataMap globalErrorKeys(List keys) -``` - -#### Parameters - - - -#### Returns - -`DataMap` - -#### Source - -[`src/main/java/com/signalwire/sdk/datamap/DataMap.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/datamap/DataMap.java) - -Line 230. - -*** - -### output - -Set the output result for the most recent webhook. - -#### Signature - -```java -public DataMap output(FunctionResult result) -``` - -#### Parameters - - - -#### Returns - -`DataMap` - -#### Source - -[`src/main/java/com/signalwire/sdk/datamap/DataMap.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/datamap/DataMap.java) - -Line 199. - -*** - -### parameter - -Add a parameter to this data-map tool — the `description` is -LLM-FACING. - -<p>Each parameter description is rendered into the OpenAI tool schema -under `parameters.properties.<name>.description` and sent to -the model. - -The model uses it to decide HOW to fill in the argument -from user speech. It is prompt engineering, not developer FYI. - -<h3>Bad vs good</h3> -<pre>: .parameter("city", "string", "the city", true, null) -GOOD: .parameter("city", "string", - "The name of the city to get weather for, e.g. " - + "\"San Francisco\". Ask the user if they did not " - + "provide one. Include the state or country if the " - + "city name is ambiguous.", true, null)</pre> - -#### Signature - - - - ```java - public DataMap parameter( - String name, - String paramType, - String description, - boolean required, - List enumValues - ) - ``` - - - - ```java - public DataMap parameter( - String name, - String paramType, - String description, - boolean required - ) - ``` - - - - ```java - public DataMap parameter(String name, String paramType, String description) - ``` - - - -#### Parameters (Overload 1) - - - - - - - - - - - -#### Parameters (Overload 2) - - - - - - - - - -#### Parameters (Overload 3) - - - - - - - -#### Returns (Overload 1) - -`DataMap` - -#### Returns (Overload 2) - -`DataMap` - -#### Returns (Overload 3) - -`DataMap` - -#### Source - -[`src/main/java/com/signalwire/sdk/datamap/DataMap.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/datamap/DataMap.java) - -Line 102. - -*** - -### params - -Set request params for the last added webhook. - -#### Signature - -```java -public DataMap params(Map data) -``` - -#### Parameters - - - -#### Returns - -`DataMap` - -#### Source - -[`src/main/java/com/signalwire/sdk/datamap/DataMap.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/datamap/DataMap.java) - -Line 177. - -*** - -### purpose - -Set the LLM-facing tool description — this is PROMPT ENGINEERING, -not developer documentation. - -<p>The description string is rendered into the OpenAI tool schema -`description` field on every LLM turn. - -The model reads it to -decide WHEN to call this tool. A vague `purpose()` is the #1 -cause of "the model has the right tool but doesn't call it" failures -with data-map tools. - -<h3>Bad vs good</h3> -<pre>: .purpose("weather api") -GOOD: .purpose("Get the current weather conditions and forecast " - + "for a specific city. Use this whenever the user " - + "asks about weather, temperature, rain, or similar " - + "conditions in a named location.")</pre> - -#### Signature - -```java -public DataMap purpose(String description) -``` - -#### Parameters - - - prompt-engineering description of when to call this tool. - - -#### Returns - -`DataMap` - -#### Source - -[`src/main/java/com/signalwire/sdk/datamap/DataMap.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/datamap/DataMap.java) - -Line 68. - -*** - -### toSwaigFunction - -Convert this DataMap to a SWAIG function definition. - -#### Signature - -```java -public Map toSwaigFunction() -``` - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/datamap/DataMap.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/datamap/DataMap.java) - -Line 238. - -*** - -### webhook - -Add a webhook API call. - -#### Signature - - - - ```java - public DataMap webhook(String method, String url, Map headers) - ``` - - - - ```java - public DataMap webhook(String method, String url) - ``` - - - -#### Parameters (Overload 1) - - - - - - - -#### Parameters (Overload 2) - - - - - -#### Returns (Overload 1) - -`DataMap` - -#### Returns (Overload 2) - -`DataMap` - -#### Source - -[`src/main/java/com/signalwire/sdk/datamap/DataMap.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/datamap/DataMap.java) - -Line 148. - -## Source - -[`src/main/java/com/signalwire/sdk/datamap/DataMap.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/datamap/DataMap.java) - -Line 22. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/logging/logging/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/logging/logging/index.mdx deleted file mode 100644 index f96161e364..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/logging/logging/index.mdx +++ /dev/null @@ -1,27 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/logging/logging" -title: "logging" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "module" - language: "java" - qualified_name: "com.signalwire.sdk.logging" - module: "com.signalwire.sdk.logging" ---- -# `logging` - -## Signature - -```java -package com.signalwire.sdk.logging -``` - -## Classes - - - - Simple logging system with level control via environment variables. <p> Levels: DEBUG, INFO, WARN, ERROR, OFF <p> Environment variables: <ul> <li>SIGNALWIRE\_LOG\_LEVEL - set log level (debug/info/warn/error/off)</li> <li>SIGNALWIRE\_LOG\_MODE - set to "off" to suppress all output</li> </ul> - - diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/logging/logging/logger/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/logging/logging/logger/index.mdx deleted file mode 100644 index b55cd4ba58..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/logging/logging/logger/index.mdx +++ /dev/null @@ -1,421 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/logging/logging/logger" -title: "Logger" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.logging.Logger" - parent: "com.signalwire.sdk.logging" - module: "com.signalwire.sdk.logging" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java" - visibility: "public" ---- -# `Logger` - -Simple logging system with level control via environment variables. - -<p> -Levels: DEBUG, INFO, WARN, ERROR, OFF -<p> -Environment variables: -<ul> - <li>SIGNALWIRE_LOG_LEVEL - set log level (debug/info/warn/error/off)</li> - <li>SIGNALWIRE_LOG_MODE - set to "off" to suppress all output</li> -</ul> - -**Modifiers:** `final` - -## Signature - -```java -public final class Logger -``` - -## Methods - -### \ - -#### Signature - -```java -public (String name) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/logging/Logger.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java) - -Line 63. - -*** - -### debug - -#### Signature - - - - ```java - public void debug(String message) - ``` - - - - ```java - public void debug(String format, Object args) - ``` - - - -#### Parameters (Overload 1) - - - -#### Parameters (Overload 2) - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/logging/Logger.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java) - -Line 87. - -*** - -### error - -#### Signature - - - - ```java - public void error(String message) - ``` - - - - ```java - public void error(String format, Object args) - ``` - - - - ```java - public void error(String message, Throwable t) - ``` - - - -#### Parameters (Overload 1) - - - -#### Parameters (Overload 2) - - - - - -#### Parameters (Overload 3) - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/logging/Logger.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java) - -Line 111. - -*** - -### getGlobalLevel - -**Modifiers:** `static` - -#### Signature - -```java -public static Level getGlobalLevel() -``` - -#### Returns - -`Level` - -#### Source - -[`src/main/java/com/signalwire/sdk/logging/Logger.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java) - -Line 79. - -*** - -### getLogger - -**Modifiers:** `static` - -#### Signature - - - - ```java - public static Logger getLogger(String name) - ``` - - - - ```java - public static Logger getLogger(Class clazz) - ``` - - - -#### Parameters (Overload 1) - - - -#### Parameters (Overload 2) - - - -#### Returns (Overload 1) - -`Logger` - -#### Returns (Overload 2) - -`Logger` - -#### Source - -[`src/main/java/com/signalwire/sdk/logging/Logger.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java) - -Line 67. - -*** - -### info - -#### Signature - - - - ```java - public void info(String message) - ``` - - - - ```java - public void info(String format, Object args) - ``` - - - -#### Parameters (Overload 1) - - - -#### Parameters (Overload 2) - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/logging/Logger.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java) - -Line 95. - -*** - -### isEnabled - -#### Signature - -```java -public boolean isEnabled(Level level) -``` - -#### Parameters - - - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/logging/Logger.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java) - -Line 83. - -*** - -### setGlobalLevel - -**Modifiers:** `static` - -#### Signature - -```java -public static void setGlobalLevel(Level level) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/logging/Logger.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java) - -Line 75. - -*** - -### warn - -#### Signature - - - - ```java - public void warn(String message) - ``` - - - - ```java - public void warn(String format, Object args) - ``` - - - -#### Parameters (Overload 1) - - - -#### Parameters (Overload 2) - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/logging/Logger.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java) - -Line 103. - -## Enums - -### Level - -#### Signature - -```java -public enum Level -``` - -#### Variants - - - - - - - - - - - -#### Methods - -##### getValue - -###### Signature - -```java -public int getValue() -``` - -###### Returns - -`int` - -###### Source - -[`src/main/java/com/signalwire/sdk/logging/Logger.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java) - -Line 31. - -*** - -##### valueOf - -**Modifiers:** `static` - -###### Signature - -```java -public static Level valueOf(String name) -``` - -###### Parameters - - - -###### Returns - -`Level` - -###### Source - -[`src/main/java/com/signalwire/sdk/logging/Logger.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java) - -*** - -##### values - -**Modifiers:** `static` - -###### Signature - -```java -public static Level[] values() -``` - -###### Returns - -`Level[]` - -###### Source - -[`src/main/java/com/signalwire/sdk/logging/Logger.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java) - -#### Source - -[`src/main/java/com/signalwire/sdk/logging/Logger.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java) - -Line 22. - -## Source - -[`src/main/java/com/signalwire/sdk/logging/Logger.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java) - -Line 20. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/pom/pom/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/pom/pom/index.mdx deleted file mode 100644 index 7b5590af37..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/pom/pom/index.mdx +++ /dev/null @@ -1,31 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/pom/pom" -title: "pom" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "module" - language: "java" - qualified_name: "com.signalwire.sdk.pom" - module: "com.signalwire.sdk.pom" ---- -# `pom` - -## Signature - -```java -package com.signalwire.sdk.pom -``` - -## Classes - - - - A structured data format for composing, organising, and rendering prompt instructions for large language models. - - - - Represents a section in the Prompt Object Model. <p>Each section contains a title, optional body text, optional bullet points, and can have any number of nested subsections. - - diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/pom/pom/prompt-object-model/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/pom/pom/prompt-object-model/index.mdx deleted file mode 100644 index ca55e024d6..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/pom/pom/prompt-object-model/index.mdx +++ /dev/null @@ -1,536 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/pom/pom/prompt-object-model" -title: "PromptObjectModel" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.pom.PromptObjectModel" - parent: "com.signalwire.sdk.pom" - module: "com.signalwire.sdk.pom" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java" - visibility: "public" ---- -# `PromptObjectModel` - -A structured data format for composing, organising, and rendering prompt -instructions for large language models. - -Java port of the Python reference -`signalwire.pom.pom.PromptObjectModel` (signalwire-python: -`pom/pom.py`). - -<p>The Prompt Object Model provides a tree-based representation of a prompt -document composed of nested `Section`s. Each section can include a -title, body text, bullet points, and arbitrarily nested subsections. - -<p>Idiom mapping: -<ul> - <li>Python `to_dict()` ↔ Java `#toMap()` (returns - `List<Map<String,Object>>`)</li> - <li>Python `from_json(str|dict)` ↔ Java `#fromJson(String)` - and `#fromJsonMap(List)`</li> - <li>Python `from_yaml(str|dict)` ↔ Java `#fromYaml(String)` - and `#fromYamlMap(List)`</li> -</ul> - -## Signature - -```java -public class PromptObjectModel -``` - -## Methods - -### \ - -Empty model (Python parity: `PromptObjectModel()` with debug=False). - -#### Signature - - - - ```java - public () - ``` - - - - ```java - public (boolean debug) - ``` - - - - ```java - public (List> data) - ``` - - - -#### Parameters (Overload 2) - - - -#### Parameters (Overload 3) - - - list of section maps (each entry is one top-level section) - - -#### Source - -[`src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java) - -Line 47. - -*** - -### addPomAsSubsection - -Add another POM's top-level sections as subsections of an existing -section. - -Mirrors Python pom) where -`target` is either a title (String) or a `Section`. - -#### Signature - -```java -public void addPomAsSubsection(Object target, PromptObjectModel pomToAdd) -``` - -#### Parameters - - - - - -#### Throws - -- `IllegalArgumentException` — when `target` is not a String or `Section`, or when the title is not found - -#### Source - -[`src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java) - -Line 200. - -*** - -### addSection - -Add a top-level section. - -Mirrors Python `add_section(...)`. - -#### Signature - - - - ```java - public Section addSection( - String title, - String body, - List bullets, - Boolean numbered, - boolean numberedBullets - ) - ``` - - - - ```java - public Section addSection(String title) - ``` - - - - ```java - public Section addSection(String title, String body) - ``` - - - - ```java - public Section addSection(String title, String body, List bullets) - ``` - - - -#### Parameters (Overload 1) - - - - - - - - - - - -#### Parameters (Overload 2) - - - -#### Parameters (Overload 3) - - - - - -#### Parameters (Overload 4) - - - - - - - -#### Returns (Overload 1) - -`Section` — the newly created `Section` - -#### Returns (Overload 2) - -`Section` - -#### Returns (Overload 3) - -`Section` - -#### Returns (Overload 4) - -`Section` - -#### Throws - -- `IllegalArgumentException` — if a null-title section is added after the first section - -#### Source - -[`src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java) - -Line 144. - -*** - -### findSection - -Recursively search for a section with the given title. - -Mirrors Python -`find_section(title)`. - -#### Signature - -```java -public Optional
findSection(String title) -``` - -#### Parameters - - - -#### Returns - -`Optional
` - -#### Source - -[`src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java) - -Line 175. - -*** - -### fromJson - -Parse a JSON string into a model. - -Mirrors Python -`PromptObjectModel.from_json(str)`. - -**Modifiers:** `static` - -#### Signature - -```java -public static PromptObjectModel fromJson(String json) -``` - -#### Parameters - - - -#### Returns - -`PromptObjectModel` - -#### Source - -[`src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java) - -Line 87. - -*** - -### fromJsonMap - -Build a model from an already-parsed list-of-maps. - -Mirrors Python's -dict-input branch of `from_json`. - -**Modifiers:** `static` - -#### Signature - -```java -public static PromptObjectModel fromJsonMap(List> data) -``` - -#### Parameters - - - -#### Returns - -`PromptObjectModel` - -#### Source - -[`src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java) - -Line 99. - -*** - -### fromYaml - -Parse a YAML string into a model. - -Mirrors Python `from_yaml(str)`. - -**Modifiers:** `static` - -#### Signature - -```java -public static PromptObjectModel fromYaml(String yaml) -``` - -#### Parameters - - - -#### Returns - -`PromptObjectModel` - -#### Source - -[`src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java) - -Line 108. - -*** - -### fromYamlMap - -Build a model from an already-parsed list-of-maps (YAML form). -Mirrors Python's dict-input branch of `from_yaml`. - -**Modifiers:** `static` - -#### Signature - -```java -public static PromptObjectModel fromYamlMap(List> data) -``` - -#### Parameters - - - -#### Returns - -`PromptObjectModel` - -#### Source - -[`src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java) - -Line 129. - -*** - -### getSections - -#### Signature - -```java -public List
getSections() -``` - -#### Returns - -`List
` - -#### Source - -[`src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java) - -Line 71. - -*** - -### isDebug - -#### Signature - -```java -public boolean isDebug() -``` - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java) - -Line 75. - -*** - -### renderMarkdown - -Render the entire model as Markdown. - -Mirrors Python `render_markdown()`. - -#### Signature - -```java -public String renderMarkdown() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java) - -Line 256. - -*** - -### renderXml - -Render the entire model as XML. - -Mirrors Python `render_xml()`. - -#### Signature - -```java -public String renderXml() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java) - -Line 285. - -*** - -### toJson - -Convert to a JSON string with 2-space indent. - -Mirrors Python `to_json`. - -#### Signature - -```java -public String toJson() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java) - -Line 235. - -*** - -### toMap - -Convert the entire model to a list of maps. - -Mirrors Python -`to_dict()` (named `toMap` here because the Java return -type is `List>`). - -#### Signature - -```java -public List> toMap() -``` - -#### Returns - -`List>` - -#### Source - -[`src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java) - -Line 226. - -*** - -### toYaml - -Convert to a YAML string. - -Output matches Python's -default\_flow\_style=False, sort\_keys=False). - -#### Signature - -```java -public String toYaml() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java) - -Line 243. - -## Source - -[`src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/PromptObjectModel.java) - -Line 37. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/pom/pom/section/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/pom/pom/section/index.mdx deleted file mode 100644 index 1377365fc8..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/pom/pom/section/index.mdx +++ /dev/null @@ -1,532 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/pom/pom/section" -title: "Section" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.pom.Section" - parent: "com.signalwire.sdk.pom" - module: "com.signalwire.sdk.pom" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/Section.java" - visibility: "public" ---- -# `Section` - -Represents a section in the Prompt Object Model. - -<p>Each section contains a title, optional body text, optional bullet points, -and can have any number of nested subsections. - -Mirrors the Python reference -`signalwire.pom.pom.Section` (see signalwire-python: pom/pom.py). - -<p>Idiom mapping: -<ul> - <li>Python `to_dict()` ↔ Java `#toMap()` (returns - `Map<String,Object>`)</li> - <li>Python section_number) ↔ Java - java.util.List)</li> - <li>Python section_number) ↔ Java - java.util.List)</li> -</ul> - -<p>Output format is byte-identical to Python's renderer so cross-port POMs -can round-trip through markdown/XML/JSON. - -## Signature - -```java -public class Section -``` - -## Methods - -### \ - -Construct a section. - -All parameters except `title` default to -empty/null. Mirrors Python's keyword-only constructor. - -#### Signature - - - - ```java - public ( - String title, - String body, - List bullets, - Boolean numbered, - boolean numberedBullets - ) - ``` - - - - ```java - public (String title) - ``` - - - - ```java - public (String title, String body) - ``` - - - - ```java - public (String title, String body, List bullets) - ``` - - - -#### Parameters (Overload 1) - - - section title (may be `null` for an unnamed root) - - - - body text (must not be `null`) - - - - bullet points (may be `null` → empty list) - - - - tri-state numbering flag (may be `null`) - - - - when `true`, bullets render as a numbered list - - -#### Parameters (Overload 2) - - - -#### Parameters (Overload 3) - - - - - -#### Parameters (Overload 4) - - - - - - - -#### Throws - -- `NullPointerException` — if `body` is `null` - -#### Source - -[`src/main/java/com/signalwire/sdk/pom/Section.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/Section.java) - -Line 50. - -*** - -### addBody - -Add or replace the body text for this section. - -Mirrors Python -`Section.add_body`. - -#### Signature - -```java -public void addBody(String body) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/pom/Section.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/Section.java) - -Line 103. - -*** - -### addBullets - -Append bullet points to this section. - -Mirrors Python -`Section.add_bullets` (which extends, not replaces). - -#### Signature - -```java -public void addBullets(List bullets) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/pom/Section.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/Section.java) - -Line 111. - -*** - -### addSubsection - -Add a subsection to this section. - -Mirrors Python -`Section.add_subsection`. Subsections must have a title. - -#### Signature - - - - ```java - public Section addSubsection( - String title, - String body, - List bullets, - Boolean numbered, - boolean numberedBullets - ) - ``` - - - - ```java - public Section addSubsection(String title) - ``` - - - - ```java - public Section addSubsection(String title, String body) - ``` - - - - ```java - public Section addSubsection(String title, String body, List bullets) - ``` - - - -#### Parameters (Overload 1) - - - - - - - - - - - -#### Parameters (Overload 2) - - - -#### Parameters (Overload 3) - - - - - -#### Parameters (Overload 4) - - - - - - - -#### Returns (Overload 1) - -`Section` — the newly created sub-`Section` - -#### Returns (Overload 2) - -`Section` - -#### Returns (Overload 3) - -`Section` - -#### Returns (Overload 4) - -`Section` - -#### Throws - -- `IllegalArgumentException` — if `title` is `null` - -#### Source - -[`src/main/java/com/signalwire/sdk/pom/Section.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/Section.java) - -Line 123. - -*** - -### getBody - -#### Signature - -```java -public String getBody() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/pom/Section.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/Section.java) - -Line 79. - -*** - -### getBullets - -#### Signature - -```java -public List getBullets() -``` - -#### Returns - -`List` - -#### Source - -[`src/main/java/com/signalwire/sdk/pom/Section.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/Section.java) - -Line 83. - -*** - -### getNumbered - -#### Signature - -```java -public Boolean getNumbered() -``` - -#### Returns - -`Boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/pom/Section.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/Section.java) - -Line 91. - -*** - -### getSubsections - -#### Signature - -```java -public List
getSubsections() -``` - -#### Returns - -`List
` - -#### Source - -[`src/main/java/com/signalwire/sdk/pom/Section.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/Section.java) - -Line 87. - -*** - -### getTitle - -#### Signature - -```java -public String getTitle() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/pom/Section.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/Section.java) - -Line 75. - -*** - -### isNumberedBullets - -#### Signature - -```java -public boolean isNumberedBullets() -``` - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/pom/Section.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/Section.java) - -Line 95. - -*** - -### renderMarkdown - -Render this section and its subsections as Markdown. - -Mirrors Python -`Section.render_markdown`. - -#### Signature - - - - ```java - public String renderMarkdown(int level, List sectionNumber) - ``` - - - - ```java - public String renderMarkdown() - ``` - - - -#### Parameters (Overload 1) - - - heading level (default 2 → "##") - - - - current numbering breadcrumb (may be `null`) - - -#### Returns (Overload 1) - -`String` - -#### Returns (Overload 2) - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/pom/Section.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/Section.java) - -Line 188. - -*** - -### renderXml - -Render this section and its subsections as XML. - -Mirrors Python -`Section.render_xml`. - -#### Signature - - - - ```java - public String renderXml(int indent, List sectionNumber) - ``` - - - - ```java - public String renderXml() - ``` - - - -#### Parameters (Overload 1) - - - - - -#### Returns (Overload 1) - -`String` - -#### Returns (Overload 2) - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/pom/Section.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/Section.java) - -Line 259. - -*** - -### toMap - -Convert this section to an ordered `Map` for JSON / YAML -serialisation. - -Mirrors Python `Section.to_dict`: keys appear in -the same order (title, body, bullets, subsections, numbered, -numberedBullets) and empty/false values are omitted. - -#### Signature - -```java -public Map toMap() -``` - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/pom/Section.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/Section.java) - -Line 154. - -## Source - -[`src/main/java/com/signalwire/sdk/pom/Section.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/pom/Section.java) - -Line 29. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/prefabs/prefabs/concierge-agent/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/prefabs/prefabs/concierge-agent/index.mdx deleted file mode 100644 index 28aaa7901d..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/prefabs/prefabs/concierge-agent/index.mdx +++ /dev/null @@ -1,186 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/prefabs/prefabs/concierge-agent" -title: "ConciergeAgent" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.prefabs.ConciergeAgent" - parent: "com.signalwire.sdk.prefabs" - module: "com.signalwire.sdk.prefabs" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/ConciergeAgent.java" - visibility: "public" ---- -# `ConciergeAgent` - -Pre-built agent for venue concierge with amenity info and availability checking. - -## Signature - -```java -public class ConciergeAgent -``` - -## Methods - -### \ - -#### Signature - - - - ```java - public ( - String name, - String venueName, - List> amenities - ) - ``` - - - - ```java - public ( - String name, - String venueName, - List> amenities, - String route, - int port - ) - ``` - - - -#### Parameters (Overload 1) - - - - - - - -#### Parameters (Overload 2) - - - - - - - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/prefabs/ConciergeAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/ConciergeAgent.java) - -Line 16. - -*** - -### amenity - -**Modifiers:** `static` - -#### Signature - -```java -public static Map amenity( - String name, - String description, - String hours, - String location, - String price -) -``` - -#### Parameters - - - - - - - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/prefabs/ConciergeAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/ConciergeAgent.java) - -Line 120. - -*** - -### getAgent - -#### Signature - -```java -public AgentBase getAgent() -``` - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/prefabs/ConciergeAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/ConciergeAgent.java) - -Line 116. - -*** - -### run - -#### Signature - -```java -public void run() -``` - -#### Throws - -- `Exception` - -#### Source - -[`src/main/java/com/signalwire/sdk/prefabs/ConciergeAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/ConciergeAgent.java) - -Line 118. - -*** - -### serve - -#### Signature - -```java -public void serve() -``` - -#### Throws - -- `Exception` - -#### Source - -[`src/main/java/com/signalwire/sdk/prefabs/ConciergeAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/ConciergeAgent.java) - -Line 117. - -## Source - -[`src/main/java/com/signalwire/sdk/prefabs/ConciergeAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/ConciergeAgent.java) - -Line 12. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/prefabs/prefabs/faq-bot-agent/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/prefabs/prefabs/faq-bot-agent/index.mdx deleted file mode 100644 index 478bc0597b..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/prefabs/prefabs/faq-bot-agent/index.mdx +++ /dev/null @@ -1,171 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/prefabs/prefabs/faq-bot-agent" -title: "FAQBotAgent" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.prefabs.FAQBotAgent" - parent: "com.signalwire.sdk.prefabs" - module: "com.signalwire.sdk.prefabs" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/FAQBotAgent.java" - visibility: "public" ---- -# `FAQBotAgent` - -Pre-built agent for keyword-based FAQ matching with optional related suggestions. - -## Signature - -```java -public class FAQBotAgent -``` - -## Methods - -### \ - -#### Signature - - - - ```java - public (String name, List> faqs) - ``` - - - - ```java - public ( - String name, - List> faqs, - String route, - int port - ) - ``` - - - -#### Parameters (Overload 1) - - - - - -#### Parameters (Overload 2) - - - - - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/prefabs/FAQBotAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/FAQBotAgent.java) - -Line 16. - -*** - -### faq - -**Modifiers:** `static` - -#### Signature - -```java -public static Map faq( - String question, - String answer, - List keywords -) -``` - -#### Parameters - - - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/prefabs/FAQBotAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/FAQBotAgent.java) - -Line 115. - -*** - -### getAgent - -#### Signature - -```java -public AgentBase getAgent() -``` - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/prefabs/FAQBotAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/FAQBotAgent.java) - -Line 111. - -*** - -### run - -#### Signature - -```java -public void run() -``` - -#### Throws - -- `Exception` - -#### Source - -[`src/main/java/com/signalwire/sdk/prefabs/FAQBotAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/FAQBotAgent.java) - -Line 113. - -*** - -### serve - -#### Signature - -```java -public void serve() -``` - -#### Throws - -- `Exception` - -#### Source - -[`src/main/java/com/signalwire/sdk/prefabs/FAQBotAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/FAQBotAgent.java) - -Line 112. - -## Source - -[`src/main/java/com/signalwire/sdk/prefabs/FAQBotAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/FAQBotAgent.java) - -Line 12. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/prefabs/prefabs/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/prefabs/prefabs/index.mdx deleted file mode 100644 index 79d3aaca24..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/prefabs/prefabs/index.mdx +++ /dev/null @@ -1,43 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/prefabs/prefabs" -title: "prefabs" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "module" - language: "java" - qualified_name: "com.signalwire.sdk.prefabs" - module: "com.signalwire.sdk.prefabs" ---- -# `prefabs` - -## Signature - -```java -package com.signalwire.sdk.prefabs -``` - -## Classes - - - - Pre-built agent for venue concierge with amenity info and availability checking. - - - - Pre-built agent for keyword-based FAQ matching with optional related suggestions. - - - - Pre-built agent for sequential question collection with key/value answers. Wraps the info\_gatherer skill with agent-level configuration. - - - - Pre-built agent for department routing with call transfer. Routes callers to appropriate departments via phone numbers or SWML URLs. - - - - Pre-built agent for conducting typed surveys. Supports rating, multiple\_choice, yes\_no, and open\_ended question types. - - diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/prefabs/prefabs/info-gatherer-agent/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/prefabs/prefabs/info-gatherer-agent/index.mdx deleted file mode 100644 index 0c9cb0fc94..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/prefabs/prefabs/info-gatherer-agent/index.mdx +++ /dev/null @@ -1,197 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/prefabs/prefabs/info-gatherer-agent" -title: "InfoGathererAgent" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.prefabs.InfoGathererAgent" - parent: "com.signalwire.sdk.prefabs" - module: "com.signalwire.sdk.prefabs" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/InfoGathererAgent.java" - visibility: "public" ---- -# `InfoGathererAgent` - -Pre-built agent for sequential question collection with key/value answers. -Wraps the info\_gatherer skill with agent-level configuration. - -## Signature - -```java -public class InfoGathererAgent -``` - -## Methods - -### \ - -#### Signature - - - - ```java - public (String name, List> questions) - ``` - - - - ```java - public ( - String name, - List> questions, - String route, - int port - ) - ``` - - - -#### Parameters (Overload 1) - - - - - -#### Parameters (Overload 2) - - - - - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/prefabs/InfoGathererAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/InfoGathererAgent.java) - -Line 15. - -*** - -### getAgent - -#### Signature - -```java -public AgentBase getAgent() -``` - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/prefabs/InfoGathererAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/InfoGathererAgent.java) - -Line 42. - -*** - -### question - -Convenience builder for questions. - -**Modifiers:** `static` - -#### Signature - - - - ```java - public static Map question(String keyName, String questionText) - ``` - - - - ```java - public static Map question( - String keyName, - String questionText, - boolean confirm, - String promptAdd - ) - ``` - - - -#### Parameters (Overload 1) - - - - - -#### Parameters (Overload 2) - - - - - - - - - -#### Returns (Overload 1) - -`Map` - -#### Returns (Overload 2) - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/prefabs/InfoGathererAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/InfoGathererAgent.java) - -Line 57. - -*** - -### run - -#### Signature - -```java -public void run() -``` - -#### Throws - -- `Exception` - -#### Source - -[`src/main/java/com/signalwire/sdk/prefabs/InfoGathererAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/InfoGathererAgent.java) - -Line 50. - -*** - -### serve - -#### Signature - -```java -public void serve() -``` - -#### Throws - -- `Exception` - -#### Source - -[`src/main/java/com/signalwire/sdk/prefabs/InfoGathererAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/InfoGathererAgent.java) - -Line 46. - -## Source - -[`src/main/java/com/signalwire/sdk/prefabs/InfoGathererAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/InfoGathererAgent.java) - -Line 11. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/prefabs/prefabs/receptionist-agent/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/prefabs/prefabs/receptionist-agent/index.mdx deleted file mode 100644 index c5fdf9e8ee..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/prefabs/prefabs/receptionist-agent/index.mdx +++ /dev/null @@ -1,213 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/prefabs/prefabs/receptionist-agent" -title: "ReceptionistAgent" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.prefabs.ReceptionistAgent" - parent: "com.signalwire.sdk.prefabs" - module: "com.signalwire.sdk.prefabs" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/ReceptionistAgent.java" - visibility: "public" ---- -# `ReceptionistAgent` - -Pre-built agent for department routing with call transfer. -Routes callers to appropriate departments via phone numbers or SWML URLs. - -## Signature - -```java -public class ReceptionistAgent -``` - -## Methods - -### \ - -#### Signature - - - - ```java - public ( - String name, - String greeting, - Map> departments - ) - ``` - - - - ```java - public ( - String name, - String greeting, - Map> departments, - String route, - int port - ) - ``` - - - -#### Parameters (Overload 1) - - - - - - - -#### Parameters (Overload 2) - - - - - - - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/prefabs/ReceptionistAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/ReceptionistAgent.java) - -Line 15. - -*** - -### getAgent - -#### Signature - -```java -public AgentBase getAgent() -``` - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/prefabs/ReceptionistAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/ReceptionistAgent.java) - -Line 59. - -*** - -### phoneDepartment - -Create a phone-based department config. - -**Modifiers:** `static` - -#### Signature - -```java -public static Map phoneDepartment( - String description, - String phoneNumber -) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/prefabs/ReceptionistAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/ReceptionistAgent.java) - -Line 66. - -*** - -### run - -#### Signature - -```java -public void run() -``` - -#### Throws - -- `Exception` - -#### Source - -[`src/main/java/com/signalwire/sdk/prefabs/ReceptionistAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/ReceptionistAgent.java) - -Line 61. - -*** - -### serve - -#### Signature - -```java -public void serve() -``` - -#### Throws - -- `Exception` - -#### Source - -[`src/main/java/com/signalwire/sdk/prefabs/ReceptionistAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/ReceptionistAgent.java) - -Line 60. - -*** - -### swmlDepartment - -Create a SWML-based department config. - -**Modifiers:** `static` - -#### Signature - -```java -public static Map swmlDepartment( - String description, - String swmlUrl -) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/prefabs/ReceptionistAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/ReceptionistAgent.java) - -Line 77. - -## Source - -[`src/main/java/com/signalwire/sdk/prefabs/ReceptionistAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/ReceptionistAgent.java) - -Line 11. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/prefabs/prefabs/survey-agent/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/prefabs/prefabs/survey-agent/index.mdx deleted file mode 100644 index 2daedca0c6..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/prefabs/prefabs/survey-agent/index.mdx +++ /dev/null @@ -1,258 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/prefabs/prefabs/survey-agent" -title: "SurveyAgent" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.prefabs.SurveyAgent" - parent: "com.signalwire.sdk.prefabs" - module: "com.signalwire.sdk.prefabs" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/SurveyAgent.java" - visibility: "public" ---- -# `SurveyAgent` - -Pre-built agent for conducting typed surveys. -Supports rating, multiple\_choice, yes\_no, and open\_ended question types. - -## Signature - -```java -public class SurveyAgent -``` - -## Methods - -### \ - -#### Signature - - - - ```java - public (String name, List> questions) - ``` - - - - ```java - public ( - String name, - List> questions, - String completionMessage, - String route, - int port - ) - ``` - - - -#### Parameters (Overload 1) - - - - - -#### Parameters (Overload 2) - - - - - - - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/prefabs/SurveyAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/SurveyAgent.java) - -Line 19. - -*** - -### getAgent - -#### Signature - -```java -public AgentBase getAgent() -``` - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/prefabs/SurveyAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/SurveyAgent.java) - -Line 167. - -*** - -### multipleChoiceQuestion - -**Modifiers:** `static` - -#### Signature - -```java -public static Map multipleChoiceQuestion( - String question, - List options -) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/prefabs/SurveyAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/SurveyAgent.java) - -Line 175. - -*** - -### openEndedQuestion - -**Modifiers:** `static` - -#### Signature - -```java -public static Map openEndedQuestion(String question) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/prefabs/SurveyAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/SurveyAgent.java) - -Line 183. - -*** - -### ratingQuestion - -**Modifiers:** `static` - -#### Signature - -```java -public static Map ratingQuestion( - String question, - int min, - int max -) -``` - -#### Parameters - - - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/prefabs/SurveyAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/SurveyAgent.java) - -Line 171. - -*** - -### run - -#### Signature - -```java -public void run() -``` - -#### Throws - -- `Exception` - -#### Source - -[`src/main/java/com/signalwire/sdk/prefabs/SurveyAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/SurveyAgent.java) - -Line 169. - -*** - -### serve - -#### Signature - -```java -public void serve() -``` - -#### Throws - -- `Exception` - -#### Source - -[`src/main/java/com/signalwire/sdk/prefabs/SurveyAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/SurveyAgent.java) - -Line 168. - -*** - -### yesNoQuestion - -**Modifiers:** `static` - -#### Signature - -```java -public static Map yesNoQuestion(String question) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/prefabs/SurveyAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/SurveyAgent.java) - -Line 179. - -## Source - -[`src/main/java/com/signalwire/sdk/prefabs/SurveyAgent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/prefabs/SurveyAgent.java) - -Line 13. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/ai-action/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/ai-action/index.mdx deleted file mode 100644 index 21a6437b9f..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/ai-action/index.mdx +++ /dev/null @@ -1,102 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/relay/relay/action/ai-action" -title: "AiAction" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.relay.Action.AiAction" - parent: "com.signalwire.sdk.relay.Action" - module: "com.signalwire.sdk.relay" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java" - visibility: "public" ---- -# `AiAction` - -AI action with stop sub-command. - -**Modifiers:** `static` - -## Signature - -```java -public static class AiAction extends Action -``` - -## Inheritance - -**Extends:** [Action](/docs/sdk-reference/reference/java/com/signalwire/sdk/relay/relay/action) - -## Methods - -### \ - -#### Signature - -```java -public (String controlId, Call call) -``` - -#### Parameters - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) - -Line 428. - -*** - -### isTerminal - -**Decorators:** `@Override` - -#### Signature - -```java -protected boolean isTerminal(String actionState) -``` - -#### Parameters - - - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) - -Line 432. - -*** - -### stop - -**Decorators:** `@Override` - -#### Signature - -```java -public void stop() -``` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) - -Line 438. - -## Source - -[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) - -Line 427. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/collect-action/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/collect-action/index.mdx deleted file mode 100644 index 63e6b2f50b..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/collect-action/index.mdx +++ /dev/null @@ -1,92 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/relay/relay/action/collect-action" -title: "CollectAction" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.relay.Action.CollectAction" - parent: "com.signalwire.sdk.relay.Action" - module: "com.signalwire.sdk.relay" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java" - visibility: "public" ---- -# `CollectAction` - -Collect action with stop and start\_input\_timers sub-commands. - -**Modifiers:** `static` - -## Signature - -```java -public static class CollectAction extends Action -``` - -## Inheritance - -**Extends:** [Action](/docs/sdk-reference/reference/java/com/signalwire/sdk/relay/relay/action) - -## Methods - -### \ - -#### Signature - -```java -public (String controlId, Call call) -``` - -#### Parameters - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) - -Line 248. - -*** - -### startInputTimers - -#### Signature - -```java -public void startInputTimers() -``` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) - -Line 261. - -*** - -### stop - -**Decorators:** `@Override` - -#### Signature - -```java -public void stop() -``` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) - -Line 252. - -## Source - -[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) - -Line 247. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/detect-action/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/detect-action/index.mdx deleted file mode 100644 index f80f1912ad..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/detect-action/index.mdx +++ /dev/null @@ -1,76 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/relay/relay/action/detect-action" -title: "DetectAction" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.relay.Action.DetectAction" - parent: "com.signalwire.sdk.relay.Action" - module: "com.signalwire.sdk.relay" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java" - visibility: "public" ---- -# `DetectAction` - -Detect action with stop sub-command. - -**Modifiers:** `static` - -## Signature - -```java -public static class DetectAction extends Action -``` - -## Inheritance - -**Extends:** [Action](/docs/sdk-reference/reference/java/com/signalwire/sdk/relay/relay/action) - -## Methods - -### \ - -#### Signature - -```java -public (String controlId, Call call) -``` - -#### Parameters - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) - -Line 230. - -*** - -### stop - -**Decorators:** `@Override` - -#### Signature - -```java -public void stop() -``` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) - -Line 234. - -## Source - -[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) - -Line 229. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/index.mdx deleted file mode 100644 index 2310fa2fac..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/index.mdx +++ /dev/null @@ -1,392 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/relay/relay/action" -title: "Action" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.relay.Action" - parent: "com.signalwire.sdk.relay" - module: "com.signalwire.sdk.relay" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java" - visibility: "public" ---- -# `Action` - -Base class for long-running call actions tracked by `control_id`. - -<p> -Actions support three completion patterns: -<ol> - <li><b>Wait inline</b>: `action.waitForCompletion()` blocks until terminal</li> - <li><b>Fire and forget</b>: don't wait, check `isDone()` later</li> - <li><b>Callback</b>: pass an `onCompleted` callback that fires on terminal state</li> -</ol> -<p> -Subclasses add action-specific sub-commands (pause, resume, volume, etc.). - -## Signature - -```java -public class Action -``` - -## Classes - - - - AI action with stop sub-command. - - - - Collect action with stop and start\_input\_timers sub-commands. - - - - Detect action with stop sub-command. - - - - Pay action with stop sub-command. - - - - Play action with pause, resume, volume, and stop sub-commands. - - - - Play-and-collect action. <p> Shares one `control_id` across both play and collect phases. Events arrive as BOTH `calling.call.play` and `calling.call.collect`. This action only resolves on collect events, NOT play events. - - - - Receive fax action with stop sub-command. - - - - Record action with pause, resume, and stop sub-commands. - - - - Send fax action with stop sub-command. - - - - Stream action with stop sub-command. - - - - Tap action with stop sub-command. - - - - Transcribe action with stop sub-command. - - - -## Methods - -### \ - -#### Signature - -```java -public (String controlId, Call call) -``` - -#### Parameters - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) - -Line 40. - -*** - -### getCall - -#### Signature - -```java -public Call getCall() -``` - -#### Returns - -`Call` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) - -Line 51. - -*** - -### getControlId - -#### Signature - -```java -public String getControlId() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) - -Line 47. - -*** - -### getResult - -#### Signature - -```java -public RelayEvent getResult() -``` - -#### Returns - -`RelayEvent` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) - -Line 59. - -*** - -### getState - -#### Signature - -```java -public String getState() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) - -Line 55. - -*** - -### isDone - -#### Signature - -```java -public boolean isDone() -``` - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) - -Line 63. - -*** - -### isTerminal - -Check if a state is terminal for this action type. -Subclasses may override for custom terminal states. - -#### Signature - -```java -protected boolean isTerminal(String actionState) -``` - -#### Parameters - - - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) - -Line 132. - -*** - -### resolve - -Resolve the action immediately (e.g., on call-gone 404/410). - -#### Signature - -```java -public void resolve(RelayEvent event) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) - -Line 119. - -*** - -### setOnCompleted - -#### Signature - -```java -public void setOnCompleted(Consumer onCompleted) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) - -Line 67. - -*** - -### stop - -Stop the action. - -#### Signature - -```java -public void stop() -``` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) - -Line 101. - -*** - -### toString - -**Decorators:** `@Override` - -#### Signature - -```java -public String toString() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) - -Line 146. - -*** - -### updateState - -Update state from an incoming event. - -Resolves the completion future -when a terminal state is reached. - -#### Signature - -```java -public void updateState(String newState, RelayEvent event) -``` - -#### Parameters - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) - -Line 109. - -*** - -### waitForCompletion - -Block until the action reaches a terminal state. - -#### Signature - - - - ```java - public RelayEvent waitForCompletion() - ``` - - - - ```java - public RelayEvent waitForCompletion(long timeoutMs) - ``` - - - -#### Parameters (Overload 2) - - - timeout in milliseconds - - -#### Returns (Overload 1) - -`RelayEvent` — the terminal event - -#### Returns (Overload 2) - -`RelayEvent` — the terminal event, or null on timeout - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) - -Line 76. - -## Source - -[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) - -Line 28. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/pay-action/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/pay-action/index.mdx deleted file mode 100644 index 2df7cc2316..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/pay-action/index.mdx +++ /dev/null @@ -1,76 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/relay/relay/action/pay-action" -title: "PayAction" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.relay.Action.PayAction" - parent: "com.signalwire.sdk.relay.Action" - module: "com.signalwire.sdk.relay" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java" - visibility: "public" ---- -# `PayAction` - -Pay action with stop sub-command. - -**Modifiers:** `static` - -## Signature - -```java -public static class PayAction extends Action -``` - -## Inheritance - -**Extends:** [Action](/docs/sdk-reference/reference/java/com/signalwire/sdk/relay/relay/action) - -## Methods - -### \ - -#### Signature - -```java -public (String controlId, Call call) -``` - -#### Parameters - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) - -Line 305. - -*** - -### stop - -**Decorators:** `@Override` - -#### Signature - -```java -public void stop() -``` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) - -Line 309. - -## Source - -[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) - -Line 304. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/play-action/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/play-action/index.mdx deleted file mode 100644 index c994aaed04..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/play-action/index.mdx +++ /dev/null @@ -1,128 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/relay/relay/action/play-action" -title: "PlayAction" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.relay.Action.PlayAction" - parent: "com.signalwire.sdk.relay.Action" - module: "com.signalwire.sdk.relay" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java" - visibility: "public" ---- -# `PlayAction` - -Play action with pause, resume, volume, and stop sub-commands. - -**Modifiers:** `static` - -## Signature - -```java -public static class PlayAction extends Action -``` - -## Inheritance - -**Extends:** [Action](/docs/sdk-reference/reference/java/com/signalwire/sdk/relay/relay/action) - -## Methods - -### \ - -#### Signature - -```java -public (String controlId, Call call) -``` - -#### Parameters - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) - -Line 158. - -*** - -### pause - -#### Signature - -```java -public void pause() -``` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) - -Line 167. - -*** - -### resume - -#### Signature - -```java -public void resume() -``` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) - -Line 171. - -*** - -### stop - -**Decorators:** `@Override` - -#### Signature - -```java -public void stop() -``` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) - -Line 162. - -*** - -### volume - -#### Signature - -```java -public void volume(double volumeDb) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) - -Line 175. - -## Source - -[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) - -Line 157. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/play-and-collect-action/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/play-and-collect-action/index.mdx deleted file mode 100644 index 0799fead45..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/play-and-collect-action/index.mdx +++ /dev/null @@ -1,101 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/relay/relay/action/play-and-collect-action" -title: "PlayAndCollectAction" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.relay.Action.PlayAndCollectAction" - parent: "com.signalwire.sdk.relay.Action" - module: "com.signalwire.sdk.relay" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java" - visibility: "public" ---- -# `PlayAndCollectAction` - -Play-and-collect action. - -<p> -Shares one `control_id` across both play and collect phases. -Events arrive as BOTH `calling.call.play` and `calling.call.collect`. -This action only resolves on collect events, NOT play events. - -**Modifiers:** `static` - -## Signature - -```java -public static class PlayAndCollectAction extends Action -``` - -## Inheritance - -**Extends:** [Action](/docs/sdk-reference/reference/java/com/signalwire/sdk/relay/relay/action) - -## Methods - -### \ - -#### Signature - -```java -public (String controlId, Call call) -``` - -#### Parameters - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) - -Line 278. - -*** - -### stop - -**Decorators:** `@Override` - -#### Signature - -```java -public void stop() -``` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) - -Line 282. - -*** - -### volume - -#### Signature - -```java -public void volume(double volumeDb) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) - -Line 291. - -## Source - -[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) - -Line 277. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/receive-fax-action/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/receive-fax-action/index.mdx deleted file mode 100644 index b08a65624c..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/receive-fax-action/index.mdx +++ /dev/null @@ -1,76 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/relay/relay/action/receive-fax-action" -title: "ReceiveFaxAction" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.relay.Action.ReceiveFaxAction" - parent: "com.signalwire.sdk.relay.Action" - module: "com.signalwire.sdk.relay" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java" - visibility: "public" ---- -# `ReceiveFaxAction` - -Receive fax action with stop sub-command. - -**Modifiers:** `static` - -## Signature - -```java -public static class ReceiveFaxAction extends Action -``` - -## Inheritance - -**Extends:** [Action](/docs/sdk-reference/reference/java/com/signalwire/sdk/relay/relay/action) - -## Methods - -### \ - -#### Signature - -```java -public (String controlId, Call call) -``` - -#### Parameters - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) - -Line 341. - -*** - -### stop - -**Decorators:** `@Override` - -#### Signature - -```java -public void stop() -``` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) - -Line 345. - -## Source - -[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) - -Line 340. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/record-action/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/record-action/index.mdx deleted file mode 100644 index 8c4d9a462b..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/record-action/index.mdx +++ /dev/null @@ -1,128 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/relay/relay/action/record-action" -title: "RecordAction" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.relay.Action.RecordAction" - parent: "com.signalwire.sdk.relay.Action" - module: "com.signalwire.sdk.relay" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java" - visibility: "public" ---- -# `RecordAction` - -Record action with pause, resume, and stop sub-commands. - -**Modifiers:** `static` - -## Signature - -```java -public static class RecordAction extends Action -``` - -## Inheritance - -**Extends:** [Action](/docs/sdk-reference/reference/java/com/signalwire/sdk/relay/relay/action) - -## Methods - -### \ - -#### Signature - -```java -public (String controlId, Call call) -``` - -#### Parameters - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) - -Line 194. - -*** - -### pause - -#### Signature - -```java -public void pause() -``` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) - -Line 203. - -*** - -### pauseWithBehavior - -#### Signature - -```java -public void pauseWithBehavior(String behavior) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) - -Line 207. - -*** - -### resume - -#### Signature - -```java -public void resume() -``` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) - -Line 213. - -*** - -### stop - -**Decorators:** `@Override` - -#### Signature - -```java -public void stop() -``` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) - -Line 198. - -## Source - -[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) - -Line 193. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/send-fax-action/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/send-fax-action/index.mdx deleted file mode 100644 index f4f5061e36..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/send-fax-action/index.mdx +++ /dev/null @@ -1,76 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/relay/relay/action/send-fax-action" -title: "SendFaxAction" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.relay.Action.SendFaxAction" - parent: "com.signalwire.sdk.relay.Action" - module: "com.signalwire.sdk.relay" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java" - visibility: "public" ---- -# `SendFaxAction` - -Send fax action with stop sub-command. - -**Modifiers:** `static` - -## Signature - -```java -public static class SendFaxAction extends Action -``` - -## Inheritance - -**Extends:** [Action](/docs/sdk-reference/reference/java/com/signalwire/sdk/relay/relay/action) - -## Methods - -### \ - -#### Signature - -```java -public (String controlId, Call call) -``` - -#### Parameters - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) - -Line 323. - -*** - -### stop - -**Decorators:** `@Override` - -#### Signature - -```java -public void stop() -``` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) - -Line 327. - -## Source - -[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) - -Line 322. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/stream-action/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/stream-action/index.mdx deleted file mode 100644 index c78a6be15c..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/stream-action/index.mdx +++ /dev/null @@ -1,102 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/relay/relay/action/stream-action" -title: "StreamAction" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.relay.Action.StreamAction" - parent: "com.signalwire.sdk.relay.Action" - module: "com.signalwire.sdk.relay" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java" - visibility: "public" ---- -# `StreamAction` - -Stream action with stop sub-command. - -**Modifiers:** `static` - -## Signature - -```java -public static class StreamAction extends Action -``` - -## Inheritance - -**Extends:** [Action](/docs/sdk-reference/reference/java/com/signalwire/sdk/relay/relay/action) - -## Methods - -### \ - -#### Signature - -```java -public (String controlId, Call call) -``` - -#### Parameters - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) - -Line 382. - -*** - -### isTerminal - -**Decorators:** `@Override` - -#### Signature - -```java -protected boolean isTerminal(String actionState) -``` - -#### Parameters - - - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) - -Line 386. - -*** - -### stop - -**Decorators:** `@Override` - -#### Signature - -```java -public void stop() -``` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) - -Line 391. - -## Source - -[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) - -Line 381. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/tap-action/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/tap-action/index.mdx deleted file mode 100644 index ff1ed045ab..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/tap-action/index.mdx +++ /dev/null @@ -1,102 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/relay/relay/action/tap-action" -title: "TapAction" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.relay.Action.TapAction" - parent: "com.signalwire.sdk.relay.Action" - module: "com.signalwire.sdk.relay" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java" - visibility: "public" ---- -# `TapAction` - -Tap action with stop sub-command. - -**Modifiers:** `static` - -## Signature - -```java -public static class TapAction extends Action -``` - -## Inheritance - -**Extends:** [Action](/docs/sdk-reference/reference/java/com/signalwire/sdk/relay/relay/action) - -## Methods - -### \ - -#### Signature - -```java -public (String controlId, Call call) -``` - -#### Parameters - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) - -Line 359. - -*** - -### isTerminal - -**Decorators:** `@Override` - -#### Signature - -```java -protected boolean isTerminal(String actionState) -``` - -#### Parameters - - - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) - -Line 363. - -*** - -### stop - -**Decorators:** `@Override` - -#### Signature - -```java -public void stop() -``` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) - -Line 368. - -## Source - -[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) - -Line 358. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/transcribe-action/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/transcribe-action/index.mdx deleted file mode 100644 index b1b38a6c16..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/action/transcribe-action/index.mdx +++ /dev/null @@ -1,102 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/relay/relay/action/transcribe-action" -title: "TranscribeAction" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.relay.Action.TranscribeAction" - parent: "com.signalwire.sdk.relay.Action" - module: "com.signalwire.sdk.relay" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java" - visibility: "public" ---- -# `TranscribeAction` - -Transcribe action with stop sub-command. - -**Modifiers:** `static` - -## Signature - -```java -public static class TranscribeAction extends Action -``` - -## Inheritance - -**Extends:** [Action](/docs/sdk-reference/reference/java/com/signalwire/sdk/relay/relay/action) - -## Methods - -### \ - -#### Signature - -```java -public (String controlId, Call call) -``` - -#### Parameters - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) - -Line 405. - -*** - -### isTerminal - -**Decorators:** `@Override` - -#### Signature - -```java -protected boolean isTerminal(String actionState) -``` - -#### Parameters - - - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) - -Line 409. - -*** - -### stop - -**Decorators:** `@Override` - -#### Signature - -```java -public void stop() -``` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) - -Line 414. - -## Source - -[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) - -Line 404. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/call/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/call/index.mdx deleted file mode 100644 index 20abedbb10..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/call/index.mdx +++ /dev/null @@ -1,2561 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/relay/relay/call" -title: "Call" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.relay.Call" - parent: "com.signalwire.sdk.relay" - module: "com.signalwire.sdk.relay" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java" - visibility: "public" ---- -# `Call` - -Represents a RELAY call with 30+ methods organized by category. - -<p> -Methods are grouped into: -<ul> - <li><b>Simple fire-and-response</b>: answer, hangup, pass, hold, etc.</li> - <li><b>Action-based</b>: play, record, detect, collect, etc. - -(return `Action`)</li> - - <li><b>Connection</b>: connect, disconnect, transfer</li> - <li><b>Conference</b>: joinConference, leaveConference</li> - <li><b>AI</b>: ai, aiMessage, aiHold, aiUnhold, amazonBedrock</li> -</ul> - -Event routing: the `RelayClient` routes events to calls by `call_id`. -Each call maintains an `actions` map keyed by `control_id` for action events. - -## Signature - -```java -public class Call -``` - -## Methods - -### \ - -#### Signature - -```java -public (String callId, String nodeId) -``` - -#### Parameters - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 52. - -*** - -### ai - -Start an AI agent on the call. - -#### Signature - - - - ```java - public Action.AiAction ai(Map aiConfig) - ``` - - - - ```java - public Action.AiAction ai(Map prompt, String controlId) - ``` - - - -#### Parameters (Overload 1) - - - AI configuration - - -#### Parameters (Overload 2) - - - - - -#### Returns (Overload 1) - -`Action.AiAction` — an AiAction - -#### Returns (Overload 2) - -`Action.AiAction` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 1183. - -*** - -### aiHold - -Put AI on hold. - -#### Signature - -```java -public Map aiHold(Map options) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 1236. - -*** - -### aiMessage - -Send a message to an active AI session. - -#### Signature - -```java -public Map aiMessage(Map messageConfig) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 1225. - -*** - -### aiUnhold - -Resume AI from hold. - -#### Signature - -```java -public Map aiUnhold(Map options) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 1247. - -*** - -### amazonBedrock - -Start Amazon Bedrock AI on the call. - -#### Signature - -```java -public Map amazonBedrock(Map config) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 1214. - -*** - -### answer - -Answer the call. - -#### Signature - -```java -public Map answer() -``` - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 226. - -*** - -### bindDigit - -Bind a digit sequence to a method. - -#### Signature - -```java -public Map bindDigit( - String digits, - String bindMethod, - Map options -) -``` - -#### Parameters - - - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 305. - -*** - -### clearDigitBindings - -Clear digit bindings. - -#### Signature - - - - ```java - public Map clearDigitBindings() - ``` - - - - ```java - public Map clearDigitBindings(String realm) - ``` - - - -#### Parameters (Overload 2) - - - -#### Returns (Overload 1) - -`Map` - -#### Returns (Overload 2) - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 318. - -*** - -### collect - -Collect digits or speech input. - -#### Signature - -```java -public Action.CollectAction collect( - Map collectConfig, - Map options -) -``` - -#### Parameters - - - collect configuration - - - - optional parameters - - -#### Returns - -`Action.CollectAction` — a CollectAction - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 607. - -*** - -### collectDigits - -Collect digits with an explicit control\_id (test helper). - -#### Signature - - - - ```java - public Action.CollectAction collectDigits( - Map digitsConfig, - String controlId - ) - ``` - - - - ```java - public Action.CollectAction collectDigits( - Map digitsConfig, - boolean startInputTimers, - String controlId - ) - ``` - - - -#### Parameters (Overload 1) - - - - - -#### Parameters (Overload 2) - - - - - - - -#### Returns (Overload 1) - -`Action.CollectAction` - -#### Returns (Overload 2) - -`Action.CollectAction` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 629. - -*** - -### connect - -Connect another device to this call. - -#### Signature - -```java -public Map connect( - List>> devices, - Map options -) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 393. - -*** - -### denoise - -Enable denoise on the call. - -#### Signature - -```java -public Map denoise() -``` - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 271. - -*** - -### denoiseStop - -Disable denoise on the call. - -#### Signature - -```java -public Map denoiseStop() -``` - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 278. - -*** - -### detect - -Detect answering machine, fax, or digits. - -#### Signature - -```java -public Action.DetectAction detect( - Map detectConfig, - Map options -) -``` - -#### Parameters - - - detect configuration - - - - optional parameters (timeout, etc.) - - -#### Returns - -`Action.DetectAction` — a DetectAction - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 573. - -*** - -### detectAnsweringMachine - -Detect human vs answering machine (AMD). - -Typed convenience over -`#detect`. - -<p> -Builds params:{...only-provided...}}. Recognised -option keys (all folded into the machine params): `initial_timeout`, -`end_silence_timeout`, `machine_voice_threshold`, -`machine_words_threshold`, `detect_interruptions`, -`detect_message_end`; plus `timeout` (passed to detect). - -#### Signature - - - - ```java - public Action.DetectAction detectAnsweringMachine(Map options) - ``` - - - - ```java - public Action.DetectAction detectAnsweringMachine() - ``` - - - -#### Parameters (Overload 1) - - - optional AMD tuning + timeout - - -#### Returns (Overload 1) - -`Action.DetectAction` — a DetectAction - -#### Returns (Overload 2) - -`Action.DetectAction` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 824. - -*** - -### detectDigit - -Detect DTMF digits. - -Typed convenience over `#detect`. - -<p> -Builds params:{digits?}}. Recognised option keys: -`digits` (folded into the detect params) and `timeout` -(passed to detect). - -#### Signature - - - - ```java - public Action.DetectAction detectDigit(Map options) - ``` - - - - ```java - public Action.DetectAction detectDigit() - ``` - - - -#### Parameters (Overload 1) - - - optional digits/timeout - - -#### Returns (Overload 1) - -`Action.DetectAction` — a DetectAction - -#### Returns (Overload 2) - -`Action.DetectAction` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 798. - -*** - -### detectFax - -Detect a fax tone (CED/CNG). - -Typed convenience over `#detect`. - -<p> -Builds params:{tone?}}. Recognised option keys: -`tone` (folded into the detect params) and `timeout` -(passed to detect). - -#### Signature - - - - ```java - public Action.DetectAction detectFax(Map options) - ``` - - - - ```java - public Action.DetectAction detectFax() - ``` - - - -#### Parameters (Overload 1) - - - optional tone/timeout - - -#### Returns (Overload 1) - -`Action.DetectAction` — a DetectAction - -#### Returns (Overload 2) - -`Action.DetectAction` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 852. - -*** - -### detectWith - -Detect with an explicit control\_id (test helper). - -Wraps in <config>. - -#### Signature - -```java -public Action.DetectAction detectWith( - Map detectConfig, - String controlId -) -``` - -#### Parameters - - - - - -#### Returns - -`Action.DetectAction` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 596. - -*** - -### disconnect - -Disconnect all connected calls. - -#### Signature - -```java -public Map disconnect() -``` - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 405. - -*** - -### dispatchEvent - -Dispatch an event to this call. - -Routes action events by control\_id. - -#### Signature - -```java -public void dispatchEvent(RelayEvent event) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 123. - -*** - -### echo - -Start echo on the call. - -#### Signature - -```java -public Map echo(Map options) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 285. - -*** - -### getAction - -Get an action by control\_id. - -#### Signature - -```java -public Action getAction(String controlId) -``` - -#### Parameters - - - -#### Returns - -`Action` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 217. - -*** - -### getCallId - -#### Signature - -```java -public String getCallId() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 60. - -*** - -### getCallState - -The current call state as a typed `CallState`, <em>alongside</em> -the raw string `#getState()` (which stays canonical for parity and -forward-compat). - -Returns `Optional.empty()` when the live wire state -is not one of the five known `CallState` values — the set mirrors -server-emitted values that can grow, so an unrecognised state is tolerated -here rather than crashing the caller. The present value always agrees with -`getState()`: `getCallState().get().getValue().equals(getState())`. - -#### Signature - -```java -public Optional getCallState() -``` - -#### Returns - -`Optional` — the typed state, or empty if the raw state is unknown/unset. - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 75. - -*** - -### getDevice - -#### Signature - -```java -public Map getDevice() -``` - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 62. - -*** - -### getDirection - -Call direction (inbound/outbound) once known; empty until set. - -#### Signature - -```java -public Optional getDirection() -``` - -#### Returns - -`Optional` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 95. - -*** - -### getEndReason - -End reason once the call has ended; empty while the call is live. - -#### Signature - -```java -public Optional getEndReason() -``` - -#### Returns - -`Optional` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 93. - -*** - -### getNodeId - -Node id once the call is bound to a RELAY node; empty until then. - -#### Signature - -```java -public Optional getNodeId() -``` - -#### Returns - -`Optional` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 91. - -*** - -### getState - -#### Signature - -```java -public String getState() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 61. - -*** - -### getTag - -Dial-correlation tag for outbound calls; empty for inbound. - -#### Signature - -```java -public Optional getTag() -``` - -#### Returns - -`Optional` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 97. - -*** - -### hangup - -Hang up the call. - -#### Signature - - - - ```java - public Map hangup() - ``` - - - - ```java - public Map hangup(String reason) - ``` - - - -#### Parameters (Overload 2) - - - -#### Returns (Overload 1) - -`Map` - -#### Returns (Overload 2) - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 234. - -*** - -### hold - -Put the call on hold. - -#### Signature - -```java -public Map hold() -``` - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 257. - -*** - -### isEnded - -#### Signature - -```java -public boolean isEnded() -``` - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 107. - -*** - -### joinConference - -Join a conference. - -#### Signature - -```java -public Map joinConference( - String name, - Map options -) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 414. - -*** - -### joinRoom - -Join a room. - -#### Signature - -```java -public Map joinRoom(String name, Map options) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 437. - -*** - -### leaveConference - -Leave a conference. - -#### Signature - -```java -public Map leaveConference(String conferenceId) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 426. - -*** - -### leaveRoom - -Leave a room. - -#### Signature - -```java -public Map leaveRoom() -``` - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 449. - -*** - -### liveTranscribe - -Start live transcription. - -#### Signature - -```java -public Map liveTranscribe(Map action) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 347. - -*** - -### liveTranslate - -Start live translation. - -#### Signature - -```java -public Map liveTranslate( - Map action, - Map options -) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 356. - -*** - -### on - -Register an event listener on this call. - -#### Signature - -```java -public void on(Consumer listener) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 116. - -*** - -### pass - -Pass on an inbound call offer. - -#### Signature - -```java -public Map pass() -``` - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 250. - -*** - -### pay - -Process payment via DTMF. - -#### Signature - - - - ```java - public Action.PayAction pay( - String paymentConnectorUrl, - Map options - ) - ``` - - - - ```java - public Action.PayAction pay(String paymentConnectorUrl, String controlId) - ``` - - - -#### Parameters (Overload 1) - - - connector URL - - - - optional parameters - - -#### Parameters (Overload 2) - - - - - -#### Returns (Overload 1) - -`Action.PayAction` — a PayAction - -#### Returns (Overload 2) - -`Action.PayAction` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 987. - -*** - -### play - -Play media on the call. - -#### Signature - - - - ```java - public Action.PlayAction play( - List> media, - Map options - ) - ``` - - - - ```java - public Action.PlayAction play(List> media) - ``` - - - - ```java - public Action.PlayAction play(List> media, String controlId) - ``` - - - -#### Parameters (Overload 1) - - - list of media objects - - - - optional parameters (volume, direction, loop, etc.) - - -#### Parameters (Overload 2) - - - -#### Parameters (Overload 3) - - - - - -#### Returns (Overload 1) - -`Action.PlayAction` — a PlayAction that can be waited on, paused, resumed, stopped - -#### Returns (Overload 2) - -`Action.PlayAction` - -#### Returns (Overload 3) - -`Action.PlayAction` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 492. - -*** - -### playAndCollect - -Play media and collect input. - -#### Signature - - - - ```java - public Action.PlayAndCollectAction playAndCollect( - List> media, - Map collectConfig, - Map options - ) - ``` - - - - ```java - public Action.PlayAndCollectAction playAndCollect( - List> media, - Map collectConfig, - String controlId - ) - ``` - - - -#### Parameters (Overload 1) - - - list of media objects - - - - collect configuration - - - - optional parameters - - -#### Parameters (Overload 2) - - - - - - - -#### Returns (Overload 1) - -`Action.PlayAndCollectAction` — a PlayAndCollectAction - -#### Returns (Overload 2) - -`Action.PlayAndCollectAction` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 653. - -*** - -### playAudio - -Play an audio file from a URL. - -Typed convenience over `#play`. - -<p> -Builds params:{url}]}. Recognised option key: -`volume` (passed to play). - -#### Signature - - - - ```java - public Action.PlayAction playAudio(String url, Map options) - ``` - - - - ```java - public Action.PlayAction playAudio(String url) - ``` - - - -#### Parameters (Overload 1) - - - the audio file URL - - - - optional volume - - -#### Parameters (Overload 2) - - - -#### Returns (Overload 1) - -`Action.PlayAction` — a PlayAction - -#### Returns (Overload 2) - -`Action.PlayAction` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 729. - -*** - -### playRingtone - -Play a named ringtone by country code. - -Typed convenience over -`#play`. - -<p> -Builds params:{name, duration?}]}. Recognised -option keys: `duration` (folded into the ringtone params) and -`volume` (passed to play). - -#### Signature - - - - ```java - public Action.PlayAction playRingtone(String name, Map options) - ``` - - - - ```java - public Action.PlayAction playRingtone(String name) - ``` - - - -#### Parameters (Overload 1) - - - the ringtone country-code name - - - - optional duration/volume - - -#### Parameters (Overload 2) - - - -#### Returns (Overload 1) - -`Action.PlayAction` — a PlayAction - -#### Returns (Overload 2) - -`Action.PlayAction` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 767. - -*** - -### playSilence - -Play silence for `duration` seconds. - -Typed convenience over -`#play`. - -<p> -Builds params:{duration}]}. - -#### Signature - -```java -public Action.PlayAction playSilence(double duration) -``` - -#### Parameters - - - silence duration in seconds - - -#### Returns - -`Action.PlayAction` — a PlayAction - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 750. - -*** - -### playTts - -Play text-to-speech. - -Typed convenience over `#play`. - -<p> -Builds params:{text, language?, gender?, voice?}]}. -Recognised option keys: `language`, `gender`, `voice` -(folded into the tts params) and `volume` (passed to play). - -#### Signature - - - - ```java - public Action.PlayAction playTts(String text, Map options) - ``` - - - - ```java - public Action.PlayAction playTts(String text) - ``` - - - -#### Parameters (Overload 1) - - - the text to speak - - - - optional language/gender/voice/volume - - -#### Parameters (Overload 2) - - - -#### Returns (Overload 1) - -`Action.PlayAction` — a PlayAction - -#### Returns (Overload 2) - -`Action.PlayAction` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 703. - -*** - -### promptAudio - -Play an audio file then collect input. - -Typed media over -`#playAndCollect`. - -<p> -Builds params:{url}]} as the play media. -Recognised option key: `volume` (passed to playAndCollect). - -#### Signature - - - - ```java - public Action.PlayAndCollectAction promptAudio( - String url, - Map collectConfig, - Map options - ) - ``` - - - - ```java - public Action.PlayAndCollectAction promptAudio( - String url, - Map collectConfig - ) - ``` - - - -#### Parameters (Overload 1) - - - the audio file URL - - - - the collect configuration - - - - optional volume - - -#### Parameters (Overload 2) - - - - - -#### Returns (Overload 1) - -`Action.PlayAndCollectAction` — a PlayAndCollectAction - -#### Returns (Overload 2) - -`Action.PlayAndCollectAction` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 913. - -*** - -### promptTts - -Play TTS then collect input. - -Typed media over `#playAndCollect`. - -<p> -Builds params:{text, language?, gender?, voice?}]} -as the play media. Recognised option keys: `language`, -`gender`, `voice` (folded into the tts params) and -`volume` (passed to playAndCollect). - -#### Signature - - - - ```java - public Action.PlayAndCollectAction promptTts( - String text, - Map collectConfig, - Map options - ) - ``` - - - - ```java - public Action.PlayAndCollectAction promptTts( - String text, - Map collectConfig - ) - ``` - - - -#### Parameters (Overload 1) - - - the text to speak - - - - the collect configuration - - - - optional language/gender/voice/volume - - -#### Parameters (Overload 2) - - - - - -#### Returns (Overload 1) - -`Action.PlayAndCollectAction` — a PlayAndCollectAction - -#### Returns (Overload 2) - -`Action.PlayAndCollectAction` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 884. - -*** - -### queueEnter - -Enter a queue. - -#### Signature - -```java -public Map queueEnter( - String queueName, - Map options -) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 458. - -*** - -### queueLeave - -Leave a queue. - -#### Signature - -```java -public Map queueLeave( - String queueName, - Map options -) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 472. - -*** - -### receiveFax - -Receive a fax. - -#### Signature - - - - ```java - public Action.ReceiveFaxAction receiveFax(Map options) - ``` - - - - ```java - public Action.ReceiveFaxAction receiveFax(String controlId) - ``` - - - -#### Parameters (Overload 1) - - - optional parameters - - -#### Parameters (Overload 2) - - - -#### Returns (Overload 1) - -`Action.ReceiveFaxAction` — a ReceiveFaxAction - -#### Returns (Overload 2) - -`Action.ReceiveFaxAction` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 1051. - -*** - -### record - -Record the call. - -#### Signature - -```java -public Action.RecordAction record( - Map recordConfig, - Map options -) -``` - -#### Parameters - - - record configuration object - - - - optional parameters - - -#### Returns - -`Action.RecordAction` — a RecordAction - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 536. - -*** - -### recordAudio - -Record with an explicit control\_id (test helper). - -The `audioConfig` -is wrapped as \{audio: <config>\} on the wire to match the -Python control\_id=...) pattern. - -#### Signature - -```java -public Action.RecordAction recordAudio( - Map audioConfig, - String controlId -) -``` - -#### Parameters - - - - - -#### Returns - -`Action.RecordAction` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 560. - -*** - -### refer - -SIP REFER transfer. - -#### Signature - -```java -public Map refer( - Map deviceSpec, - Map options -) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 368. - -*** - -### registerAction - -Register an action by control\_id. - -#### Signature - -```java -public void registerAction(Action action) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 210. - -*** - -### resolveAllActions - -Resolve all pending actions (e.g., on call ended or call-gone). - -#### Signature - -```java -public void resolveAllActions(RelayEvent event) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 198. - -*** - -### sendDigits - -Send DTMF digits. - -#### Signature - -```java -public Map sendDigits(String digits) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 380. - -*** - -### sendFax - -Send a fax. - -#### Signature - - - - ```java - public Action.SendFaxAction sendFax( - String documentUrl, - Map options - ) - ``` - - - - ```java - public Action.SendFaxAction sendFax( - String documentUrl, - String identity, - String controlId - ) - ``` - - - -#### Parameters (Overload 1) - - - URL to PDF document - - - - optional parameters - - -#### Parameters (Overload 2) - - - - - - - -#### Returns (Overload 1) - -`Action.SendFaxAction` — a SendFaxAction - -#### Returns (Overload 2) - -`Action.SendFaxAction` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 1018. - -*** - -### setClient - -#### Signature - -```java -public void setClient(RelayClient client) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 105. - -*** - -### setDevice - -#### Signature - -```java -public void setDevice(Map device) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 104. - -*** - -### setDirection - -#### Signature - -```java -public void setDirection(String direction) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 102. - -*** - -### setEndReason - -#### Signature - -```java -public void setEndReason(String endReason) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 101. - -*** - -### setNodeId - -#### Signature - -```java -public void setNodeId(String nodeId) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 99. - -*** - -### setState - -#### Signature - -```java -public void setState(String state) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 100. - -*** - -### setTag - -#### Signature - -```java -public void setTag(String tag) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 103. - -*** - -### stream - -Start streaming audio from the call. - -#### Signature - - - - ```java - public Action.StreamAction stream(String url, Map options) - ``` - - - - ```java - public Action.StreamAction stream(String url, String controlId) - ``` - - - - ```java - public Action.StreamAction stream(String url, String codec, String controlId) - ``` - - - -#### Parameters (Overload 1) - - - WebSocket URL - - - - optional parameters (name, codec, track, etc.) - - -#### Parameters (Overload 2) - - - - - -#### Parameters (Overload 3) - - - - - - - -#### Returns (Overload 1) - -`Action.StreamAction` — a StreamAction - -#### Returns (Overload 2) - -`Action.StreamAction` - -#### Returns (Overload 3) - -`Action.StreamAction` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 1114. - -*** - -### tap - -Tap audio from the call. - -#### Signature - - - - ```java - public Action.TapAction tap( - Map tapConfig, - Map tapDevice, - Map options - ) - ``` - - - - ```java - public Action.TapAction tap( - Map tapConfig, - Map tapDevice, - String controlId - ) - ``` - - - -#### Parameters (Overload 1) - - - tap configuration - - - - tap device (rtp or ws) - - - - optional parameters - - -#### Parameters (Overload 2) - - - - - - - -#### Returns (Overload 1) - -`Action.TapAction` — a TapAction - -#### Returns (Overload 2) - -`Action.TapAction` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 1082. - -*** - -### toString - -**Decorators:** `@Override` - -#### Signature - -```java -public String toString() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 1306. - -*** - -### transcribe - -Start transcription on the call. - -#### Signature - - - - ```java - public Action.TranscribeAction transcribe(Map options) - ``` - - - - ```java - public Action.TranscribeAction transcribe(String controlId) - ``` - - - -#### Parameters (Overload 1) - - - optional parameters - - -#### Parameters (Overload 2) - - - -#### Returns (Overload 1) - -`Action.TranscribeAction` — a TranscribeAction - -#### Returns (Overload 2) - -`Action.TranscribeAction` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 1154. - -*** - -### transfer - -Transfer the call. - -#### Signature - -```java -public Map transfer(String dest) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 296. - -*** - -### unhold - -Take the call off hold. - -#### Signature - -```java -public Map unhold() -``` - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 264. - -*** - -### userEvent - -Send a user event. - -#### Signature - -```java -public Map userEvent(String event) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 336. - -## Source - -[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) - -Line 31. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/constants/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/constants/index.mdx deleted file mode 100644 index a19044e090..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/constants/index.mdx +++ /dev/null @@ -1,424 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/relay/relay/constants" -title: "Constants" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.relay.Constants" - parent: "com.signalwire.sdk.relay" - module: "com.signalwire.sdk.relay" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Constants.java" - visibility: "public" ---- -# `Constants` - -Constants for the SignalWire RELAY protocol. - -<p> -Includes call states, end reasons, message states, event types, -and action terminal states used throughout the RELAY client. - -**Modifiers:** `final` - -## Signature - -```java -public final class Constants -``` - -## Constants - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -## Methods - -### isCallGoneCode - -Check if an HTTP code indicates a "call gone" condition. - -**Modifiers:** `static` - -#### Signature - -```java -public static boolean isCallGoneCode(String code) -``` - -#### Parameters - - - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Constants.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Constants.java) - -Line 221. - -*** - -### isTerminalActionState - -Check if an action state is terminal (applies to play, record, etc.). - -**Modifiers:** `static` - -#### Signature - -```java -public static boolean isTerminalActionState(String state) -``` - -#### Parameters - - - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Constants.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Constants.java) - -Line 202. - -*** - -### isTerminalCallState - -Check if a call state is terminal. - -**Modifiers:** `static` - -#### Signature - -```java -public static boolean isTerminalCallState(String state) -``` - -#### Parameters - - - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Constants.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Constants.java) - -Line 195. - -*** - -### isTerminalMessageState - -Check if a message state is terminal. - -**Modifiers:** `static` - -#### Signature - -```java -public static boolean isTerminalMessageState(String state) -``` - -#### Parameters - - - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Constants.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Constants.java) - -Line 212. - -## Source - -[`src/main/java/com/signalwire/sdk/relay/Constants.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Constants.java) - -Line 15. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/device/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/device/index.mdx deleted file mode 100644 index ef2505d462..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/device/index.mdx +++ /dev/null @@ -1,358 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/relay/relay/device" -title: "Device" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.relay.Device" - parent: "com.signalwire.sdk.relay" - module: "com.signalwire.sdk.relay" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Device.java" - visibility: "public" ---- -# `Device` - -A typed view of the RELAY params\} device object that recurs as -a raw Object> across `Call#connect`, `Call#refer`, -`RelayClient#dial` and `Call#tap`. - -<p>The wire shape is fixed (extracted from switchblade's -`PublicCallConnectParams` / `PublicCallDialParams` / -`PublicCallReferParams` / `PublicCallTapParams`, mirrored in -`porting-sdk/relay-protocol/calling.*.params.json`): every device is an -object with a required string `type` discriminant and a `params` -sub-object whose shape depends on the type (a `phone` carries -`to_number`/`from_number`, a `sip` carries `to`/ -`headers`, etc.). - -This class types the <em>shape</em> — the -params\} envelope — so callers stop hand-rolling the two-key -map and get an explicit constructor + accessors. - -<p><strong>`type` stays a `String`.</strong> The discriminant is -NOT schema-enumerated: the wire schema constrains it only to -{"type": "string"}, and the platform accepts device types the -SDK may not know about. Typing it as an enum would reject valid values, so it -is deliberately left open (the convention names `phone`/`sip`/ -`webrtc` — see `Constants#DEVICE_TYPE_PHONE` etc. — but those are -conveniences, not a closed set). `params` is left an arbitrary -Object> for the same reason: it is type-dependent and not -a single fixed schema. - -<p><strong>Additive — the raw-map path stays.</strong> Every method that -takes a device still accepts a raw Object>; this class is -a convenience on top. `#toMap()` produces a map that is -<em>byte-for-byte identical</em> to the hand-written -…, "params": …} (insertion order `type` then -`params`, matching every existing call site), so routing a device -through `Device` serialises exactly as the raw map does. - -<pre>typed: -Device phone = Device.of("phone", Map.of( - "to_number", "+15551112222", "from_number", "+15553334444")); -call.connect(List.of(List.of(phone.toMap())), null); - -// raw map still works (parity): -call.connect(List.of(List.of(Map.of( - "type", "phone", - "params", Map.of("to_number", "+15551112222", - "from_number", "+15553334444")))), null);</pre> - -<p>Python uses a bare `dict` for this object, so there is no reference -equivalent — this is a documented Java addition. - -**Modifiers:** `final` - -## Signature - -```java -public final class Device -``` - -## Methods - -### \ - -Construct a device from its `type` discriminant and `params` -sub-object. - -#### Signature - -```java -public (String type, Map params) -``` - -#### Parameters - - - the device type discriminant (e.g. `"phone"`, `"sip"`, `"webrtc"`); must not be `null`. - - - - the type-dependent params; `null` is treated as an empty map. - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Device.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Device.java) - -Line 76. - -*** - -### equals - -**Decorators:** `@Override` - -#### Signature - -```java -public boolean equals(Object o) -``` - -#### Parameters - - - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Device.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Device.java) - -Line 163. - -*** - -### getParams - -The type-dependent params sub-object (an unmodifiable view). - -#### Signature - -```java -public Map getParams() -``` - -#### Returns - -`Map` — the params map; never `null` (empty if none were supplied). - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Device.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Device.java) - -Line 141. - -*** - -### getType - -The device type discriminant (`"phone"`/`"sip"`/…). - -#### Signature - -```java -public String getType() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Device.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Device.java) - -Line 132. - -*** - -### hashCode - -**Decorators:** `@Override` - -#### Signature - -```java -public int hashCode() -``` - -#### Returns - -`int` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Device.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Device.java) - -Line 175. - -*** - -### of - -Factory mirroring the constructor, for fluent call sites -(…)). - -**Modifiers:** `static` - -#### Signature - -```java -public static Device of(String type, Map params) -``` - -#### Parameters - - - the device type discriminant. - - - - the type-dependent params (may be `null`). - - -#### Returns - -`Device` — a new `Device`. - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Device.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Device.java) - -Line 95. - -*** - -### phone - -Convenience factory for the most common case — a `phone` device. -Builds params:\{to\_number, from\_number\}\}. - -**Modifiers:** `static` - -#### Signature - -```java -public static Device phone(String toNumber, String fromNumber) -``` - -#### Parameters - - - the destination E.164 number. - - - - the caller-ID E.164 number. - - -#### Returns - -`Device` — a new `phone` `Device`. - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Device.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Device.java) - -Line 107. - -*** - -### sip - -Convenience factory for a `sip` device. - -Builds -params:\{to, from?\}\} (only non-null values). - -**Modifiers:** `static` - -#### Signature - -```java -public static Device sip(String to, String from) -``` - -#### Parameters - - - the SIP destination URI. - - - - the SIP from URI, or `null` to omit. - - -#### Returns - -`Device` — a new `sip` `Device`. - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Device.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Device.java) - -Line 122. - -*** - -### toMap - -Serialise to the wire shape: a two-key map …, "params": …\} -with `type` inserted first, identical to the hand-written map every -existing call site builds. - -The returned map is fresh and mutable (callers -routinely nest it inside a `devices` list), and `params` is a -defensive copy so later mutation of the returned map cannot corrupt this -`Device`. - -#### Signature - -```java -public Map toMap() -``` - -#### Returns - -`Map` — a new params\} map ready to pass to `connect`/`refer`/`dial`/`tap`. - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Device.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Device.java) - -Line 156. - -*** - -### toString - -**Decorators:** `@Override` - -#### Signature - -```java -public String toString() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Device.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Device.java) - -Line 180. - -## Source - -[`src/main/java/com/signalwire/sdk/relay/Device.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Device.java) - -Line 62. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/index.mdx deleted file mode 100644 index 48f540ec91..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/index.mdx +++ /dev/null @@ -1,704 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/relay/relay" -title: "relay" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "module" - language: "java" - qualified_name: "com.signalwire.sdk.relay" - module: "com.signalwire.sdk.relay" ---- -# `relay` - -## Signature - -```java -package com.signalwire.sdk.relay -``` - -## Classes - - - - Base class for long-running call actions tracked by `control_id`. <p> Actions support three completion patterns: <ol> <li><b>Wait inline</b>: `action.waitForCompletion()` blocks until terminal</li> <li><b>Fire and forget</b>: don't wait, check `isDone()` later</li> <li><b>Callback</b>: pass an `onCompleted` callback that fires on terminal state</li> </ol> <p> Subclasses add action-specific sub-commands (pause, resume, volume, etc.). - - - - Represents a RELAY call with 30+ methods organized by category. <p> Methods are grouped into: <ul> <li><b>Simple fire-and-response</b>: answer, hangup, pass, hold, etc.</li> <li><b>Action-based</b>: play, record, detect, collect, etc. - - - - Constants for the SignalWire RELAY protocol. <p> Includes call states, end reasons, message states, event types, and action terminal states used throughout the RELAY client. - - - - A typed view of the RELAY params\} device object that recurs as a raw Object> across `Call#connect`, `Call#refer`, `RelayClient#dial` and `Call#tap`. <p>The wire shape is fixed (extracted from switchblade's `PublicCallConnectParams` / `PublicCallDialParams` / `PublicCallReferParams` / `PublicCallTapParams`, mirrored in `porting-sdk/relay-protocol/calling.*.params.json`): every device is an object with a required string `type` discriminant and a `params` sub-object whose shape depends on the type (a `phone` carries `to_number`/`from_number`, a `sip` carries `to`/ `headers`, etc.). - - - - Represents an SMS/MMS message with state tracking. <p> Messages are simpler than calls: they have a `message_id`, progress through states (queued, initiated, sent, delivered), and support completion waiting. <p> State progression: <ul> <li>Success: queued -> initiated -> sent -> delivered</li> <li>Failure: queued -> initiated -> failed/undelivered</li> </ul> Terminal states: delivered, undelivered, failed - - - - RELAY WebSocket connection manager. <p> Manages WebSocket connections to the SignalWire RELAY service using JSON-RPC 2.0. Implements the four correlation mechanisms: <ol> <li>JSON-RPC id -> CompletableFuture for RPC response matching</li> <li>call\_id -> Call for event routing</li> <li>control\_id -> Action per Call for action event routing</li> <li>tag -> CompletableFuture\ for dial correlation</li> </ol> <p> Also handles: <ul> <li>Event ACK for every `signalwire.event`</li> <li>Ping/pong for `signalwire.ping`</li> <li>Exponential backoff reconnection</li> <li>Authorization state for fast reconnection</li> <li>Server-initiated disconnect with restart flag</li> <li>Dynamic context subscription via receive/unreceive</li> <li>Message tracking by message\_id</li> </ul> <pre>client = RelayClient.builder() .project("project-id") .token("api-token") .space("example.signalwire.com") .contexts(List.of("default")) .build(); client.onCall(call -> \{ call.answer(); var action = call.play(List.of(Map.of("type", "tts", "params", Map.of("text", "Hello!")))); action.waitForCompletion(); call.hangup();); client.run(); \}</pre> - - - - Runtime exception for RELAY-level failures (dial timeout, dial failed, connect rejected, etc.). - - - - Base class for all RELAY events. <p> Events arrive as `signalwire.event` messages with nested params: <pre> \{ "params": \{ "event\_type": "calling.call.play", "timestamp": 123457.1234, "params": \{ "call\_id": "...", "control\_id": "...", "state": "finished" \} \} \} </pre> Subclasses provide typed access to specific event payloads. - - - -## Enums - -### CallState - -The lifecycle state of a RELAY `Call`, as a typed, compile-time-checked -closed set. - -<p>The RELAY server pushes the current call state as a bare string on every -`calling.call.state` event (`created` → `ringing` → -`answered` → `ending` → `ended`). - -This enum mirrors the -five values the Python reference declares in -`signalwire/relay/constants.py` as `CALL_STATE_*` -(`Constants#CALL_STATE_CREATED` … `Constants#CALL_STATE_ENDED`). - -<p>It is exposed <em>alongside</em> the existing string getter, never instead -of it: `Call#getState()` keeps returning the raw wire string (parity -with Python, forward-compatible with any value the server later adds), while -`Call#getCallState()` returns `Optional<CallState>` for callers -who want a typed, switch-exhaustive handle and a `#isTerminal()` -predicate. - -<pre>raw = call.getState(); // "answered" (always present, parity) -Optional<CallState> typed = call.getCallState(); -if (typed.map(CallState::isTerminal).orElse(false)) { - // call has reached ENDED -}</pre> - -<p><strong>Server-emitted, growable.</strong> These values mirror what the -server sends and the set can grow in a future protocol revision. So -`#fromWire(String)` returns `null` (and `Call#getCallState()` -`Optional.empty()`) for an unrecognised value rather than throwing — -an unknown state must never crash event dispatch. This is the Java analog of -Rust's `#[non_exhaustive]` + a fallible `from_str`. - -<p><strong>This is a DISTINCT vocabulary from `DialState` and -`MessageState`.</strong> A `Call`'s lifecycle state -(`created/ringing/answered/ending/ended`) is not the dial <em>outcome</em> -(`dialing/answered/failed`) and not a message delivery state -(`queued/…/delivered`). The three are modelled as three separate enums -and are never conflated — mirroring the three separate `*_STATE_*` -blocks in the Python reference's `constants.py`. - -#### Signature - -```java -public enum CallState -``` - -#### Variants - - - The call has been answered and media is flowing. - - - - The call object has been created but no leg is ringing yet. - - - - Terminal: the call has ended. - - - - The call is in the process of tearing down. - - - - The call is ringing (alerting). - - -#### Methods - -##### fromWire - -Parse a wire string into a `CallState`, or return `null` if -it is not one of the five recognised states. - -Because the set mirrors -server-emitted values that may grow, an unknown string is tolerated -(returns `null`) rather than rejected with an exception — the Java -analog of a fallible `from_str` over a `#[non_exhaustive]` -enum. - -**Modifiers:** `static` - -###### Signature - -```java -public static CallState fromWire(String wire) -``` - -###### Parameters - - - the candidate wire string (case-sensitive), may be `null`. - - -###### Returns - -`CallState` — the matching constant, or `null` if none matches. - -###### Source - -[`src/main/java/com/signalwire/sdk/relay/CallState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/CallState.java) - -Line 106. - -*** - -##### getValue - -The canonical wire string for this state (`"created"` / -`"ringing"` / `"answered"` / `"ending"` / -`"ended"`) — exactly the value the server sends on -`calling.call.state`. - -Equivalent to PHP's backed-enum -`->value`. - -###### Signature - -```java -public String getValue() -``` - -###### Returns - -`String` — the lower-case state name as it appears on the wire. - -###### Source - -[`src/main/java/com/signalwire/sdk/relay/CallState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/CallState.java) - -Line 78. - -*** - -##### isTerminal - -Whether this is a <em>terminal</em> state — i.e. - -the call has reached -the end of its lifecycle and will not transition further. Only -`#ENDED` is terminal (matching `Call#isEnded()` and the -reference's `CALL_STATE_ENDED` terminal check); `#ENDING` is <em>not</em> terminal because an `ended` event still follows. - -###### Signature - -```java -public boolean isTerminal() -``` - -###### Returns - -`boolean` — `true` iff this state is `#ENDED`. - -###### Source - -[`src/main/java/com/signalwire/sdk/relay/CallState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/CallState.java) - -Line 91. - -*** - -##### valueOf - -**Modifiers:** `static` - -###### Signature - -```java -public static CallState valueOf(String name) -``` - -###### Parameters - - - -###### Returns - -`CallState` - -###### Source - -[`src/main/java/com/signalwire/sdk/relay/CallState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/CallState.java) - -*** - -##### values - -**Modifiers:** `static` - -###### Signature - -```java -public static CallState[] values() -``` - -###### Returns - -`CallState[]` - -###### Source - -[`src/main/java/com/signalwire/sdk/relay/CallState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/CallState.java) - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/CallState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/CallState.java) - -Line 50. - -*** - -### DialState - -The outcome state of an outbound `calling.dial`, as a typed, -compile-time-checked closed set. - -<p>A dial progresses `dialing` → `answered` (a leg won) or -`dialing` → `failed` (every leg gave up). - -The RELAY server reports -it as the bare `dial_state` field on each `calling.call.dial` -event. This enum mirrors the three values the Java port declares in -`Constants` as `DIAL_STATE_*` -(`Constants#DIAL_STATE_DIALING` / `Constants#DIAL_STATE_ANSWERED` -/ `Constants#DIAL_STATE_FAILED`), which back the dial-completion logic -in `RelayClient.handleDialEvent`. - -<p>It is exposed <em>alongside</em> the existing string getter, never instead -of it: `RelayEvent.CallDialEvent#getDialState()` keeps returning the raw -wire string (parity with Python, forward-compatible), while -`RelayEvent.CallDialEvent#getDialStateEnum()` returns -`Optional<DialState>` for callers who want a typed handle and an -`#isTerminal()` predicate. - -<p><strong>Terminal semantics.</strong> Unlike `CallState` (where only -`ended` is terminal), <em>both</em> `#ANSWERED` and `#FAILED` -are terminal dial outcomes — each resolves the pending dial (one completes the -`CompletableFuture<Call>`, the other fails it). Only `#DIALING` is -non-terminal. So "terminal" here means "the dial has a final outcome", -matching the `answered`/`failed` branches that resolve the dial in -`RelayClient`. - -<pre>// "answered" (always present, parity) -event.getDialStateEnum() - .filter(DialState::isTerminal) // ANSWERED or FAILED - .ifPresent(s -> ...);</pre> - -<p><strong>Server-emitted, growable</strong> — `#fromWire(String)` -returns `null` for an unrecognised value rather than throwing (the Java -analog of Rust's `#[non_exhaustive]` + fallible `from_str`); an -unknown dial state must never crash event dispatch. - -<p><strong>This is a DISTINCT vocabulary from `CallState` and -`MessageState`.</strong> A dial outcome (`dialing/answered/failed`) -is not a call lifecycle state and not a message delivery state. Note in -particular `answered` appears in <em>both</em> `DialState` and -`CallState` but means different things (the dial won vs. the call leg is -up) — the two enums are never shared. - -#### Signature - -```java -public enum DialState -``` - -#### Variants - - - Terminal: a leg answered and the dial resolved to a `Call`. - - - - The dial is in progress; legs are ringing. Non-terminal. - - - - Terminal: every leg failed and the dial did not connect. - - -#### Methods - -##### fromWire - -Parse a wire string into a `DialState`, or return `null` if -it is not one of the three recognised dial states. - -Because the set -mirrors server-emitted values that may grow, an unknown string is -tolerated (returns `null`) rather than rejected with an exception. - -**Modifiers:** `static` - -###### Signature - -```java -public static DialState fromWire(String wire) -``` - -###### Parameters - - - the candidate wire string (case-sensitive), may be `null`. - - -###### Returns - -`DialState` — the matching constant, or `null` if none matches. - -###### Source - -[`src/main/java/com/signalwire/sdk/relay/DialState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/DialState.java) - -Line 104. - -*** - -##### getValue - -The canonical wire string for this dial outcome (`"dialing"` / -`"answered"` / `"failed"`) — exactly the `dial_state` -value the server sends on `calling.call.dial`. - -Equivalent to PHP's -backed-enum `->value`. - -###### Signature - -```java -public String getValue() -``` - -###### Returns - -`String` — the lower-case dial-state name as it appears on the wire. - -###### Source - -[`src/main/java/com/signalwire/sdk/relay/DialState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/DialState.java) - -Line 79. - -*** - -##### isTerminal - -Whether this is a <em>terminal</em> dial outcome — i.e. - -the dial has a -final result and will not transition further. Both `#ANSWERED` and -`#FAILED` are terminal (each resolves the pending dial); only -`#DIALING` is non-terminal. - -###### Signature - -```java -public boolean isTerminal() -``` - -###### Returns - -`boolean` — `true` iff this state is `#ANSWERED` or `#FAILED`. - -###### Source - -[`src/main/java/com/signalwire/sdk/relay/DialState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/DialState.java) - -Line 91. - -*** - -##### valueOf - -**Modifiers:** `static` - -###### Signature - -```java -public static DialState valueOf(String name) -``` - -###### Parameters - - - -###### Returns - -`DialState` - -###### Source - -[`src/main/java/com/signalwire/sdk/relay/DialState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/DialState.java) - -*** - -##### values - -**Modifiers:** `static` - -###### Signature - -```java -public static DialState[] values() -``` - -###### Returns - -`DialState[]` - -###### Source - -[`src/main/java/com/signalwire/sdk/relay/DialState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/DialState.java) - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/DialState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/DialState.java) - -Line 56. - -*** - -### MessageState - -The delivery state of a RELAY `Message`, as a typed, -compile-time-checked closed set. - -<p>An outbound message progresses `queued` → `initiated` → -`sent` → `delivered` (success) or → `undelivered` / -`failed` (failure); an inbound message arrives as `received`. - -The -RELAY server reports the state as the bare `message_state` field on -`messaging.state` (outbound) and `messaging.receive` (inbound) -events. This enum mirrors the seven values the Python reference declares in -`signalwire/relay/constants.py` as `MESSAGE_STATE_*` -(`Constants#MESSAGE_STATE_QUEUED` … `Constants#MESSAGE_STATE_RECEIVED`). -The `messaging.state` wire schema enumerates the six outbound values; -`received` is the inbound-only seventh. - -<p>It is exposed <em>alongside</em> the existing string getter, never instead -of it: `Message#getState()` keeps returning the raw wire string (parity -with Python, forward-compatible), while `Message#getMessageState()` -returns `Optional<MessageState>` for callers who want a typed handle and -an `#isTerminal()` predicate. - -<pre>raw = msg.getState(); // "delivered" (always present, parity) -msg.getMessageState() - .filter(MessageState::isTerminal) // DELIVERED / UNDELIVERED / FAILED - .ifPresent(s -> ...);</pre> - -<p><strong>Terminal semantics.</strong> The terminal set is -`#DELIVERED`, `#UNDELIVERED`, `#FAILED` — exactly the -reference's `MESSAGE_TERMINAL_STATES` and the set -`Constants#isTerminalMessageState(String)` checks (the state at which -`Message` resolves its completion future). `received` is NOT -terminal: it is an inbound arrival, not the end of an outbound delivery -lifecycle. - -<p><strong>Server-emitted, growable</strong> — `#fromWire(String)` -returns `null` for an unrecognised value rather than throwing (the Java -analog of Rust's `#[non_exhaustive]` + fallible `from_str`); an -unknown message state must never crash event dispatch. - -<p><strong>This is a DISTINCT vocabulary from `CallState` and -`DialState`.</strong> A message delivery state is neither a call -lifecycle state nor a dial outcome; the three enums are never conflated. - -#### Signature - -```java -public enum MessageState -``` - -#### Variants - - - Terminal: the message was delivered. - - - - Terminal: the send failed. - - - - Sending has been initiated. - - - - The message is queued for sending. - - - - An inbound message was received (inbound-only; not a terminal delivery state). - - - - The message has left for the carrier. - - - - Terminal: the carrier reported non-delivery. - - -#### Methods - -##### fromWire - -Parse a wire string into a `MessageState`, or return `null` -if it is not one of the seven recognised states. - -Because the set mirrors -server-emitted values that may grow, an unknown string is tolerated -(returns `null`) rather than rejected with an exception. - -**Modifiers:** `static` - -###### Signature - -```java -public static MessageState fromWire(String wire) -``` - -###### Parameters - - - the candidate wire string (case-sensitive), may be `null`. - - -###### Returns - -`MessageState` — the matching constant, or `null` if none matches. - -###### Source - -[`src/main/java/com/signalwire/sdk/relay/MessageState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/MessageState.java) - -Line 114. - -*** - -##### getValue - -The canonical wire string for this state (`"queued"` / -`"initiated"` / `"sent"` / `"delivered"` / -`"undelivered"` / `"failed"` / `"received"`) — exactly -the `message_state` value the server sends. - -Equivalent to PHP's -backed-enum `->value`. - -###### Signature - -```java -public String getValue() -``` - -###### Returns - -`String` — the lower-case state name as it appears on the wire. - -###### Source - -[`src/main/java/com/signalwire/sdk/relay/MessageState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/MessageState.java) - -Line 86. - -*** - -##### isTerminal - -Whether this is a <em>terminal</em> delivery state — i.e. - -the outbound -message has a final delivery outcome and will not transition further. The -terminal set is `#DELIVERED`, `#UNDELIVERED`, `#FAILED` -(matching the reference's `MESSAGE_TERMINAL_STATES` and -`Constants#isTerminalMessageState(String)`). `#RECEIVED` is -NOT terminal (it is an inbound arrival, not an outbound completion). - -###### Signature - -```java -public boolean isTerminal() -``` - -###### Returns - -`boolean` — `true` iff this state is `#DELIVERED`, `#UNDELIVERED`, or `#FAILED`. - -###### Source - -[`src/main/java/com/signalwire/sdk/relay/MessageState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/MessageState.java) - -Line 101. - -*** - -##### valueOf - -**Modifiers:** `static` - -###### Signature - -```java -public static MessageState valueOf(String name) -``` - -###### Parameters - - - -###### Returns - -`MessageState` - -###### Source - -[`src/main/java/com/signalwire/sdk/relay/MessageState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/MessageState.java) - -*** - -##### values - -**Modifiers:** `static` - -###### Signature - -```java -public static MessageState[] values() -``` - -###### Returns - -`MessageState[]` - -###### Source - -[`src/main/java/com/signalwire/sdk/relay/MessageState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/MessageState.java) - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/MessageState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/MessageState.java) - -Line 54. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/message/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/message/index.mdx deleted file mode 100644 index 15b6b436fc..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/message/index.mdx +++ /dev/null @@ -1,699 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/relay/relay/message" -title: "Message" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.relay.Message" - parent: "com.signalwire.sdk.relay" - module: "com.signalwire.sdk.relay" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java" - visibility: "public" ---- -# `Message` - -Represents an SMS/MMS message with state tracking. - -<p> -Messages are simpler than calls: they have a `message_id`, progress through -states (queued, initiated, sent, delivered), and support completion waiting. -<p> -State progression: -<ul> - <li>Success: queued -> initiated -> sent -> delivered</li> - <li>Failure: queued -> initiated -> failed/undelivered</li> -</ul> -Terminal states: delivered, undelivered, failed - -## Signature - -```java -public class Message -``` - -## Methods - -### \ - -#### Signature - -```java -public (String messageId) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) - -Line 51. - -*** - -### fromReceiveEvent - -Create a Message from an inbound receive event. - -**Modifiers:** `static` - -#### Signature - -```java -public static Message fromReceiveEvent(RelayEvent.MessagingReceiveEvent event) -``` - -#### Parameters - - - -#### Returns - -`Message` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) - -Line 209. - -*** - -### getBody - -Message body; empty for media-only messages or before set. - -#### Signature - -```java -public Optional getBody() -``` - -#### Returns - -`Optional` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) - -Line 106. - -*** - -### getContext - -Messaging context (the RELAY protocol/context the message rode on). - -#### Signature - -```java -public Optional getContext() -``` - -#### Returns - -`Optional` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) - -Line 98. - -*** - -### getDirection - -Direction (inbound/outbound) once known; empty until set. - -#### Signature - -```java -public Optional getDirection() -``` - -#### Returns - -`Optional` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) - -Line 100. - -*** - -### getFromNumber - -Sender E.164 number; empty until set. - -#### Signature - -```java -public Optional getFromNumber() -``` - -#### Returns - -`Optional` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) - -Line 102. - -*** - -### getMedia - -#### Signature - -```java -public List getMedia() -``` - -#### Returns - -`List` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) - -Line 62. - -*** - -### getMessageId - -#### Signature - -```java -public String getMessageId() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) - -Line 61. - -*** - -### getMessageState - -The current message state as a typed `MessageState`, <em>alongside</em> the raw string `#getState()` (which stays -canonical for parity and forward-compat). - -Returns `Optional.empty()` -when the live wire state is not one of the seven known -`MessageState` values — the set mirrors server-emitted values that -can grow, so an unrecognised state is tolerated here rather than crashing -the caller. The present value always agrees with `getState()`: -`getMessageState().get().getValue().equals(getState())`. - -#### Signature - -```java -public Optional getMessageState() -``` - -#### Returns - -`Optional` — the typed state, or empty if the raw state is unknown/unset. - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) - -Line 80. - -*** - -### getReason - -Failure reason; present only on a failed/undelivered terminal state. - -#### Signature - -```java -public Optional getReason() -``` - -#### Returns - -`Optional` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) - -Line 108. - -*** - -### getResult - -Terminal completion event; empty until the message reaches a terminal state. - -#### Signature - -```java -public Optional getResult() -``` - -#### Returns - -`Optional` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) - -Line 110. - -*** - -### getSegments - -#### Signature - -```java -public int getSegments() -``` - -#### Returns - -`int` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) - -Line 63. - -*** - -### getState - -#### Signature - -```java -public String getState() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) - -Line 64. - -*** - -### getTags - -#### Signature - -```java -public List getTags() -``` - -#### Returns - -`List` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) - -Line 65. - -*** - -### getToNumber - -Recipient E.164 number; empty until set. - -#### Signature - -```java -public Optional getToNumber() -``` - -#### Returns - -`Optional` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) - -Line 104. - -*** - -### isDone - -#### Signature - -```java -public boolean isDone() -``` - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) - -Line 66. - -*** - -### on - -Register a state change listener. - -#### Signature - -```java -public void on(Consumer listener) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) - -Line 131. - -*** - -### setBody - -#### Signature - -```java -public void setBody(String body) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) - -Line 118. - -*** - -### setContext - -#### Signature - -```java -public void setContext(String context) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) - -Line 114. - -*** - -### setDirection - -#### Signature - -```java -public void setDirection(String direction) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) - -Line 115. - -*** - -### setFromNumber - -#### Signature - -```java -public void setFromNumber(String fromNumber) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) - -Line 116. - -*** - -### setMedia - -#### Signature - -```java -public void setMedia(List media) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) - -Line 119. - -*** - -### setOnCompleted - -#### Signature - -```java -public void setOnCompleted(Consumer onCompleted) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) - -Line 124. - -*** - -### setSegments - -#### Signature - -```java -public void setSegments(int segments) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) - -Line 120. - -*** - -### setState - -#### Signature - -```java -public void setState(String state) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) - -Line 122. - -*** - -### setTags - -#### Signature - -```java -public void setTags(List tags) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) - -Line 121. - -*** - -### setToNumber - -#### Signature - -```java -public void setToNumber(String toNumber) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) - -Line 117. - -*** - -### toString - -**Decorators:** `@Override` - -#### Signature - -```java -public String toString() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) - -Line 223. - -*** - -### updateFromEvent - -Update state from an incoming event. - -#### Signature - -```java -public void updateFromEvent(RelayEvent event) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) - -Line 138. - -*** - -### waitForCompletion - -Block until the message reaches a terminal state. - -#### Signature - - - - ```java - public RelayEvent waitForCompletion() - ``` - - - - ```java - public RelayEvent waitForCompletion(long timeoutMs) - ``` - - - -#### Parameters (Overload 2) - - - -#### Returns (Overload 1) - -`RelayEvent` - -#### Returns (Overload 2) - -`RelayEvent` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) - -Line 165. - -## Source - -[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) - -Line 29. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-client/builder/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-client/builder/index.mdx deleted file mode 100644 index ff4f832505..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-client/builder/index.mdx +++ /dev/null @@ -1,208 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/relay/relay/relay-client/builder" -title: "Builder" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.relay.RelayClient.Builder" - parent: "com.signalwire.sdk.relay.RelayClient" - module: "com.signalwire.sdk.relay" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java" - visibility: "public" ---- -# `Builder` - -**Modifiers:** `static` - -## Signature - -```java -public static class Builder -``` - -## Methods - -### \ - -#### Signature - -```java -public () -``` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) - -*** - -### build - -#### Signature - -```java -public RelayClient build() -``` - -#### Returns - -`RelayClient` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) - -Line 145. - -*** - -### contexts - -#### Signature - -```java -public Builder contexts(List contexts) -``` - -#### Parameters - - - -#### Returns - -`Builder` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) - -Line 143. - -*** - -### host - -#### Signature - -```java -public Builder host(String host) -``` - -#### Parameters - - - -#### Returns - -`Builder` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) - -Line 142. - -*** - -### jwtToken - -#### Signature - -```java -public Builder jwtToken(String jwtToken) -``` - -#### Parameters - - - -#### Returns - -`Builder` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) - -Line 140. - -*** - -### project - -#### Signature - -```java -public Builder project(String project) -``` - -#### Parameters - - - -#### Returns - -`Builder` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) - -Line 138. - -*** - -### space - -#### Signature - -```java -public Builder space(String space) -``` - -#### Parameters - - - -#### Returns - -`Builder` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) - -Line 141. - -*** - -### token - -#### Signature - -```java -public Builder token(String token) -``` - -#### Parameters - - - -#### Returns - -`Builder` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) - -Line 139. - -## Source - -[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) - -Line 131. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-client/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-client/index.mdx deleted file mode 100644 index 211cca0a06..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-client/index.mdx +++ /dev/null @@ -1,694 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/relay/relay/relay-client" -title: "RelayClient" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.relay.RelayClient" - parent: "com.signalwire.sdk.relay" - module: "com.signalwire.sdk.relay" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java" - visibility: "public" ---- -# `RelayClient` - -RELAY WebSocket connection manager. - -<p> -Manages WebSocket connections to the SignalWire RELAY service using JSON-RPC 2.0. -Implements the four correlation mechanisms: -<ol> - <li>JSON-RPC id -> CompletableFuture for RPC response matching</li> - <li>call_id -> Call for event routing</li> - <li>control_id -> Action per Call for action event routing</li> - <li>tag -> CompletableFuture<Call> for dial correlation</li> -</ol> -<p> -Also handles: -<ul> - <li>Event ACK for every `signalwire.event`</li> - <li>Ping/pong for `signalwire.ping`</li> - <li>Exponential backoff reconnection</li> - <li>Authorization state for fast reconnection</li> - <li>Server-initiated disconnect with restart flag</li> - <li>Dynamic context subscription via receive/unreceive</li> - <li>Message tracking by message_id</li> -</ul> - -<pre>client = RelayClient.builder() - .project("project-id") - .token("api-token") - .space("example.signalwire.com") - .contexts(List.of("default")) - .build(); - -client.onCall(call -> { - call.answer(); - var action = call.play(List.of(Map.of("type", "tts", - "params", Map.of("text", "Hello!")))); - action.waitForCompletion(); - call.hangup();); - -client.run(); -}</pre> - -## Signature - -```java -public class RelayClient implements AutoCloseable -``` - -## Inheritance - -**Implements:** `AutoCloseable` - -## Classes - - - - - -## Methods - -### builder - -**Modifiers:** `static` - -#### Signature - -```java -public static Builder builder() -``` - -#### Returns - -`Builder` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) - -Line 127. - -*** - -### close - -`AutoCloseable` entry point so the client can be used in a -try-with-resources block: - -<pre>{@code -try (var client = RelayClient.builder()...build()) { - client.connect(); - // ... - -`AutoCloseable` entry point so the client can be used in a -try-with-resources block: - -<pre>(var client = RelayClient.builder()...build()) { - client.connect(); - // ... use the client ... // close() runs here: WebSocket shut down, worker pool released -}</pre> - -Releases the same resources as `#disconnect()` — closes the -RELAY WebSocket, releases the `#run()` latch, and shuts the -worker `java.util.concurrent.ExecutorService` down — so the -client is the rough Java parallel of Python's -with RelayClient(...) context manager. Idempotent: a -second call is a harmless no-op. - -**Decorators:** `@Override` - -#### Signature - -```java -public void close() -``` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) - -Line 282. - -*** - -### connect - -Open the WebSocket connection and complete the signalwire.connect -handshake without blocking the caller. - -<p>Mirrors the Python `RelayClient.connect()` coroutine. - -Tests use -this directly; production code typically uses `#run()` instead. - -#### Signature - - - - ```java - public void connect(long timeoutMs) - ``` - - - - ```java - public void connect() - ``` - - - -#### Parameters (Overload 1) - - - how long to wait for the handshake to complete - - -#### Throws - -- `RuntimeException` — if connect fails or times out - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) - -Line 234. - -*** - -### dial - -Dial an outbound call. - -#### Signature - - - - ```java - public Call dial( - List>> devices, - Map options, - long timeout - ) - ``` - - - - ```java - public Call dial(List>> devices) - ``` - - - -#### Parameters (Overload 1) - - - nested array: outer = sequential, inner = parallel - - - - optional parameters (region, max\_price\_per\_minute) - - - - timeout in milliseconds - - -#### Parameters (Overload 2) - - - -#### Returns (Overload 1) - -`Call` — the answered Call - -#### Returns (Overload 2) - -`Call` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) - -Line 313. - -*** - -### disconnect - -Disconnect the client. - -#### Signature - -```java -public void disconnect() -``` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) - -Line 255. - -*** - -### execute - -Execute an RPC method and wait for the response. - -#### Signature - -```java -public Map execute(String method, Map params) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) - -Line 429. - -*** - -### getAuthorizationState - -Returns the authorization state blob the server pushed via the -`signalwire.authorization.state` event, or null. - -#### Signature - -```java -public String getAuthorizationState() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) - -Line 176. - -*** - -### getContexts - -#### Signature - -```java -public List getContexts() -``` - -#### Returns - -`List` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) - -Line 161. - -*** - -### getProject - -#### Signature - -```java -public String getProject() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) - -Line 159. - -*** - -### getRelayProtocol - -Returns the protocol identifier issued by the server during the -signalwire.connect handshake. - -Empty string before connect completes. - -#### Signature - -```java -public String getRelayProtocol() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) - -Line 168. - -*** - -### getSpace - -#### Signature - -```java -public String getSpace() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) - -Line 160. - -*** - -### isConnected - -#### Signature - -```java -public boolean isConnected() -``` - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) - -Line 162. - -*** - -### onCall - -Register a handler for inbound calls. - -#### Signature - -```java -public void onCall(Consumer handler) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) - -Line 191. - -*** - -### onEvent - -Register a handler for all raw events. - -#### Signature - -```java -public void onEvent(Consumer handler) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) - -Line 205. - -*** - -### onMessage - -Register a handler for inbound messages. - -#### Signature - -```java -public void onMessage(Consumer handler) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) - -Line 198. - -*** - -### receive - -Subscribe to additional contexts dynamically. - -#### Signature - -```java -public Map receive(List newContexts) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) - -Line 290. - -*** - -### run - -Connect and run the client. - -Blocks until `#disconnect()` is called. - -#### Signature - -```java -public void run() -``` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) - -Line 212. - -*** - -### sendMessage - -Send an outbound SMS/MMS. - -#### Signature - - - - ```java - public Message sendMessage( - String context, - String fromNumber, - String toNumber, - String body, - List mediaUrls - ) - ``` - - - - ```java - public Message sendMessage( - String context, - String fromNumber, - String toNumber, - String body, - List mediaUrls, - List tags - ) - ``` - - - -#### Parameters (Overload 1) - - - message context - - - - sender E.164 number - - - - recipient E.164 number - - - - message body (required if no media) - - - - media URLs (required if no body) - - -#### Parameters (Overload 2) - - - - - - - - - - - - - -#### Returns (Overload 1) - -`Message` — the Message object with message\_id for tracking - -#### Returns (Overload 2) - -`Message` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) - -Line 369. - -*** - -### sendRaw - -Send a raw JSON-RPC frame on the underlying socket. - -Production code -uses Map), which adds project\_id/protocol -automatically. This helper exists for the porting-sdk RELAY-handshake -audit harness, which has to emit a `method:"signalwire.event"` -frame from inside the on-event callback so the fixture's dispatch -counter fires (see SUBAGENT\_PLAYBOOK lesson on event-ACK semantics). - -#### Signature - -```java -public void sendRaw(Map frame) -``` - -#### Parameters - - - a Gson-serializable map representing the frame - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) - -Line 871. - -*** - -### setRelayProtocol - -Test-only setter for the protocol — used by reconnect-with-protocol -tests that simulate "I already have a session token from last time". - -#### Signature - -```java -public void setRelayProtocol(String protocol) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) - -Line 184. - -*** - -### unreceive - -Unsubscribe from contexts. - -#### Signature - -```java -public Map unreceive(List removeContexts) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) - -Line 299. - -## Source - -[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) - -Line 62. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-error/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-error/index.mdx deleted file mode 100644 index 5148f78f3a..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-error/index.mdx +++ /dev/null @@ -1,73 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/relay/relay/relay-error" -title: "RelayError" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.relay.RelayError" - parent: "com.signalwire.sdk.relay" - module: "com.signalwire.sdk.relay" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayError.java" - visibility: "public" ---- -# `RelayError` - -Runtime exception for RELAY-level failures (dial timeout, dial failed, -connect rejected, etc.). - -Mirrors the Python `RelayError` class. - -## Signature - -```java -public class RelayError extends RuntimeException -``` - -## Inheritance - -**Extends:** `RuntimeException` - -## Methods - -### \ - -#### Signature - - - - ```java - public (String message) - ``` - - - - ```java - public (String message, Throwable cause) - ``` - - - -#### Parameters (Overload 1) - - - -#### Parameters (Overload 2) - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayError.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayError.java) - -Line 15. - -## Source - -[`src/main/java/com/signalwire/sdk/relay/RelayError.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayError.java) - -Line 13. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/authorization-state-event/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/authorization-state-event/index.mdx deleted file mode 100644 index 6d1b05de45..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/authorization-state-event/index.mdx +++ /dev/null @@ -1,80 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/relay/relay/relay-event/authorization-state-event" -title: "AuthorizationStateEvent" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.relay.RelayEvent.AuthorizationStateEvent" - parent: "com.signalwire.sdk.relay.RelayEvent" - module: "com.signalwire.sdk.relay" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" - visibility: "public" ---- -# `AuthorizationStateEvent` - -Authorization state event (`signalwire.authorization.state`). - -**Modifiers:** `static` - -## Signature - -```java -public static class AuthorizationStateEvent extends RelayEvent -``` - -## Inheritance - -**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/com/signalwire/sdk/relay/relay/relay-event) - -## Methods - -### \ - -#### Signature - -```java -public (String eventType, double timestamp, Map params) -``` - -#### Parameters - - - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 450. - -*** - -### getAuthorizationState - -#### Signature - -```java -public String getAuthorizationState() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 454. - -## Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 449. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-collect-event/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-collect-event/index.mdx deleted file mode 100644 index 209b570ea9..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-collect-event/index.mdx +++ /dev/null @@ -1,140 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/relay/relay/relay-event/call-collect-event" -title: "CallCollectEvent" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallCollectEvent" - parent: "com.signalwire.sdk.relay.RelayEvent" - module: "com.signalwire.sdk.relay" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" - visibility: "public" ---- -# `CallCollectEvent` - -Collect event (`calling.call.collect`). - -**Modifiers:** `static` - -## Signature - -```java -public static class CallCollectEvent extends RelayEvent -``` - -## Inheritance - -**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/com/signalwire/sdk/relay/relay/relay-event) - -## Methods - -### \ - -#### Signature - -```java -public (String eventType, double timestamp, Map params) -``` - -#### Parameters - - - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 311. - -*** - -### getCallId - -#### Signature - -```java -public String getCallId() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 315. - -*** - -### getControlId - -#### Signature - -```java -public String getControlId() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 316. - -*** - -### getResult - -#### Signature - -```java -public Map getResult() -``` - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 318. - -*** - -### getResultType - -#### Signature - -```java -public String getResultType() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 317. - -## Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 310. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-connect-event/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-connect-event/index.mdx deleted file mode 100644 index 807a514452..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-connect-event/index.mdx +++ /dev/null @@ -1,100 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/relay/relay/relay-event/call-connect-event" -title: "CallConnectEvent" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallConnectEvent" - parent: "com.signalwire.sdk.relay.RelayEvent" - module: "com.signalwire.sdk.relay" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" - visibility: "public" ---- -# `CallConnectEvent` - -Connect event (`calling.call.connect`). - -**Modifiers:** `static` - -## Signature - -```java -public static class CallConnectEvent extends RelayEvent -``` - -## Inheritance - -**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/com/signalwire/sdk/relay/relay/relay-event) - -## Methods - -### \ - -#### Signature - -```java -public (String eventType, double timestamp, Map params) -``` - -#### Parameters - - - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 377. - -*** - -### getCallId - -#### Signature - -```java -public String getCallId() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 381. - -*** - -### getConnectState - -#### Signature - -```java -public String getConnectState() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 382. - -## Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 376. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-detect-event/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-detect-event/index.mdx deleted file mode 100644 index 6cb778d200..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-detect-event/index.mdx +++ /dev/null @@ -1,142 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/relay/relay/relay-event/call-detect-event" -title: "CallDetectEvent" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallDetectEvent" - parent: "com.signalwire.sdk.relay.RelayEvent" - module: "com.signalwire.sdk.relay" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" - visibility: "public" ---- -# `CallDetectEvent` - -Detect event (`calling.call.detect`). - -**Modifiers:** `static` - -## Signature - -```java -public static class CallDetectEvent extends RelayEvent -``` - -## Inheritance - -**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/com/signalwire/sdk/relay/relay/relay-event) - -## Methods - -### \ - -#### Signature - -```java -public (String eventType, double timestamp, Map params) -``` - -#### Parameters - - - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 290. - -*** - -### getCallId - -#### Signature - -```java -public String getCallId() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 294. - -*** - -### getControlId - -#### Signature - -```java -public String getControlId() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 295. - -*** - -### getDetect - -Results are in detect.params.event, not a simple state field. - -#### Signature - -```java -public Map getDetect() -``` - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 298. - -*** - -### getDetectEvent - -#### Signature - -```java -public String getDetectEvent() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 300. - -## Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 289. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-dial-event/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-dial-event/index.mdx deleted file mode 100644 index eb0da54afd..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-dial-event/index.mdx +++ /dev/null @@ -1,194 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/relay/relay/relay-event/call-dial-event" -title: "CallDialEvent" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallDialEvent" - parent: "com.signalwire.sdk.relay.RelayEvent" - module: "com.signalwire.sdk.relay" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" - visibility: "public" ---- -# `CallDialEvent` - -Dial completion event (`calling.call.dial`). - -<p> -Note: No top-level `call_id`. - -The call info is nested at `params.call`. - -**Modifiers:** `static` - -## Signature - -```java -public static class CallDialEvent extends RelayEvent -``` - -## Inheritance - -**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/com/signalwire/sdk/relay/relay/relay-event) - -## Methods - -### \ - -#### Signature - -```java -public (String eventType, double timestamp, Map params) -``` - -#### Parameters - - - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 206. - -*** - -### getCallId - -#### Signature - -```java -public String getCallId() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 232. - -*** - -### getCallInfo - -#### Signature - -```java -public Map getCallInfo() -``` - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 228. - -*** - -### getDialState - -#### Signature - -```java -public String getDialState() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 212. - -*** - -### getDialStateEnum - -The dial outcome as a typed `DialState`, <em>alongside</em> the -raw string `#getDialState()` (which stays canonical for parity -and forward-compat). - -Returns `Optional.empty()` when the wire -`dial_state` is not one of the three known `DialState` -values — the set mirrors server-emitted values that can grow, so an -unrecognised state is tolerated here rather than crashing dispatch. - -#### Signature - -```java -public Optional getDialStateEnum() -``` - -#### Returns - -`Optional` — the typed dial state, or empty if unknown/unset. - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 224. - -*** - -### getNodeId - -#### Signature - -```java -public String getNodeId() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 211. - -*** - -### getTag - -#### Signature - -```java -public String getTag() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 210. - -## Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 205. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-fax-event/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-fax-event/index.mdx deleted file mode 100644 index 55e2a8c275..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-fax-event/index.mdx +++ /dev/null @@ -1,120 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/relay/relay/relay-event/call-fax-event" -title: "CallFaxEvent" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallFaxEvent" - parent: "com.signalwire.sdk.relay.RelayEvent" - module: "com.signalwire.sdk.relay" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" - visibility: "public" ---- -# `CallFaxEvent` - -Fax event (`calling.call.fax`). - -**Modifiers:** `static` - -## Signature - -```java -public static class CallFaxEvent extends RelayEvent -``` - -## Inheritance - -**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/com/signalwire/sdk/relay/relay/relay-event) - -## Methods - -### \ - -#### Signature - -```java -public (String eventType, double timestamp, Map params) -``` - -#### Parameters - - - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 325. - -*** - -### getCallId - -#### Signature - -```java -public String getCallId() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 329. - -*** - -### getControlId - -#### Signature - -```java -public String getControlId() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 330. - -*** - -### getState - -#### Signature - -```java -public String getState() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 331. - -## Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 324. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-pay-event/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-pay-event/index.mdx deleted file mode 100644 index 78d81f1f99..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-pay-event/index.mdx +++ /dev/null @@ -1,120 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/relay/relay/relay-event/call-pay-event" -title: "CallPayEvent" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallPayEvent" - parent: "com.signalwire.sdk.relay.RelayEvent" - module: "com.signalwire.sdk.relay" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" - visibility: "public" ---- -# `CallPayEvent` - -Pay event (`calling.call.pay`). - -**Modifiers:** `static` - -## Signature - -```java -public static class CallPayEvent extends RelayEvent -``` - -## Inheritance - -**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/com/signalwire/sdk/relay/relay/relay-event) - -## Methods - -### \ - -#### Signature - -```java -public (String eventType, double timestamp, Map params) -``` - -#### Parameters - - - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 413. - -*** - -### getCallId - -#### Signature - -```java -public String getCallId() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 417. - -*** - -### getControlId - -#### Signature - -```java -public String getControlId() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 418. - -*** - -### getState - -#### Signature - -```java -public String getState() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 419. - -## Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 412. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-play-event/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-play-event/index.mdx deleted file mode 100644 index 506090ec8c..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-play-event/index.mdx +++ /dev/null @@ -1,120 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/relay/relay/relay-event/call-play-event" -title: "CallPlayEvent" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallPlayEvent" - parent: "com.signalwire.sdk.relay.RelayEvent" - module: "com.signalwire.sdk.relay" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" - visibility: "public" ---- -# `CallPlayEvent` - -Play event (`calling.call.play`). - -**Modifiers:** `static` - -## Signature - -```java -public static class CallPlayEvent extends RelayEvent -``` - -## Inheritance - -**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/com/signalwire/sdk/relay/relay/relay-event) - -## Methods - -### \ - -#### Signature - -```java -public (String eventType, double timestamp, Map params) -``` - -#### Parameters - - - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 241. - -*** - -### getCallId - -#### Signature - -```java -public String getCallId() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 245. - -*** - -### getControlId - -#### Signature - -```java -public String getControlId() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 246. - -*** - -### getState - -#### Signature - -```java -public String getState() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 247. - -## Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 240. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-receive-event/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-receive-event/index.mdx deleted file mode 100644 index 691e0f0c90..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-receive-event/index.mdx +++ /dev/null @@ -1,160 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/relay/relay/relay-event/call-receive-event" -title: "CallReceiveEvent" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallReceiveEvent" - parent: "com.signalwire.sdk.relay.RelayEvent" - module: "com.signalwire.sdk.relay" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" - visibility: "public" ---- -# `CallReceiveEvent` - -Inbound call event (`calling.call.receive`). - -**Modifiers:** `static` - -## Signature - -```java -public static class CallReceiveEvent extends RelayEvent -``` - -## Inheritance - -**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/com/signalwire/sdk/relay/relay/relay-event) - -## Methods - -### \ - -#### Signature - -```java -public (String eventType, double timestamp, Map params) -``` - -#### Parameters - - - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 189. - -*** - -### getCallId - -#### Signature - -```java -public String getCallId() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 193. - -*** - -### getCallState - -#### Signature - -```java -public String getCallState() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 195. - -*** - -### getContext - -#### Signature - -```java -public String getContext() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 196. - -*** - -### getDevice - -#### Signature - -```java -public Map getDevice() -``` - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 197. - -*** - -### getNodeId - -#### Signature - -```java -public String getNodeId() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 194. - -## Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 188. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-record-event/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-record-event/index.mdx deleted file mode 100644 index ecf7d9e1aa..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-record-event/index.mdx +++ /dev/null @@ -1,180 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/relay/relay/relay-event/call-record-event" -title: "CallRecordEvent" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallRecordEvent" - parent: "com.signalwire.sdk.relay.RelayEvent" - module: "com.signalwire.sdk.relay" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" - visibility: "public" ---- -# `CallRecordEvent` - -Record event (`calling.call.record`). - -**Modifiers:** `static` - -## Signature - -```java -public static class CallRecordEvent extends RelayEvent -``` - -## Inheritance - -**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/com/signalwire/sdk/relay/relay/relay-event) - -## Methods - -### \ - -#### Signature - -```java -public (String eventType, double timestamp, Map params) -``` - -#### Parameters - - - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 254. - -*** - -### getCallId - -#### Signature - -```java -public String getCallId() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 258. - -*** - -### getControlId - -#### Signature - -```java -public String getControlId() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 259. - -*** - -### getDuration - -#### Signature - -```java -public double getDuration() -``` - -#### Returns - -`double` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 270. - -*** - -### getSize - -#### Signature - -```java -public long getSize() -``` - -#### Returns - -`long` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 277. - -*** - -### getState - -#### Signature - -```java -public String getState() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 260. - -*** - -### getUrl - -#### Signature - -```java -public String getUrl() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 262. - -## Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 253. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-refer-event/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-refer-event/index.mdx deleted file mode 100644 index e70addfb15..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-refer-event/index.mdx +++ /dev/null @@ -1,100 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/relay/relay/relay-event/call-refer-event" -title: "CallReferEvent" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallReferEvent" - parent: "com.signalwire.sdk.relay.RelayEvent" - module: "com.signalwire.sdk.relay" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" - visibility: "public" ---- -# `CallReferEvent` - -Refer event (`calling.call.refer`). - -**Modifiers:** `static` - -## Signature - -```java -public static class CallReferEvent extends RelayEvent -``` - -## Inheritance - -**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/com/signalwire/sdk/relay/relay/relay-event) - -## Methods - -### \ - -#### Signature - -```java -public (String eventType, double timestamp, Map params) -``` - -#### Parameters - - - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 389. - -*** - -### getCallId - -#### Signature - -```java -public String getCallId() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 393. - -*** - -### getReferState - -#### Signature - -```java -public String getReferState() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 394. - -## Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 388. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-send-digits-event/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-send-digits-event/index.mdx deleted file mode 100644 index d26ff1c8f1..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-send-digits-event/index.mdx +++ /dev/null @@ -1,100 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/relay/relay/relay-event/call-send-digits-event" -title: "CallSendDigitsEvent" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallSendDigitsEvent" - parent: "com.signalwire.sdk.relay.RelayEvent" - module: "com.signalwire.sdk.relay" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" - visibility: "public" ---- -# `CallSendDigitsEvent` - -Send digits event (`calling.call.send_digits`). - -**Modifiers:** `static` - -## Signature - -```java -public static class CallSendDigitsEvent extends RelayEvent -``` - -## Inheritance - -**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/com/signalwire/sdk/relay/relay/relay-event) - -## Methods - -### \ - -#### Signature - -```java -public (String eventType, double timestamp, Map params) -``` - -#### Parameters - - - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 401. - -*** - -### getCallId - -#### Signature - -```java -public String getCallId() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 405. - -*** - -### getState - -#### Signature - -```java -public String getState() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 406. - -## Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 400. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-state-event/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-state-event/index.mdx deleted file mode 100644 index d128e3cec4..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-state-event/index.mdx +++ /dev/null @@ -1,200 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/relay/relay/relay-event/call-state-event" -title: "CallStateEvent" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallStateEvent" - parent: "com.signalwire.sdk.relay.RelayEvent" - module: "com.signalwire.sdk.relay" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" - visibility: "public" ---- -# `CallStateEvent` - -Call state change event (`calling.call.state`). - -**Modifiers:** `static` - -## Signature - -```java -public static class CallStateEvent extends RelayEvent -``` - -## Inheritance - -**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/com/signalwire/sdk/relay/relay/relay-event) - -## Methods - -### \ - -#### Signature - -```java -public (String eventType, double timestamp, Map params) -``` - -#### Parameters - - - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 172. - -*** - -### getCallId - -#### Signature - -```java -public String getCallId() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 176. - -*** - -### getCallState - -#### Signature - -```java -public String getCallState() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 178. - -*** - -### getDevice - -#### Signature - -```java -public Map getDevice() -``` - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 182. - -*** - -### getDirection - -#### Signature - -```java -public String getDirection() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 181. - -*** - -### getEndReason - -#### Signature - -```java -public String getEndReason() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 179. - -*** - -### getNodeId - -#### Signature - -```java -public String getNodeId() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 177. - -*** - -### getTag - -#### Signature - -```java -public String getTag() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 180. - -## Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 171. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-stream-event/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-stream-event/index.mdx deleted file mode 100644 index b629104bad..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-stream-event/index.mdx +++ /dev/null @@ -1,120 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/relay/relay/relay-event/call-stream-event" -title: "CallStreamEvent" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallStreamEvent" - parent: "com.signalwire.sdk.relay.RelayEvent" - module: "com.signalwire.sdk.relay" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" - visibility: "public" ---- -# `CallStreamEvent` - -Stream event (`calling.call.stream`). - -**Modifiers:** `static` - -## Signature - -```java -public static class CallStreamEvent extends RelayEvent -``` - -## Inheritance - -**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/com/signalwire/sdk/relay/relay/relay-event) - -## Methods - -### \ - -#### Signature - -```java -public (String eventType, double timestamp, Map params) -``` - -#### Parameters - - - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 351. - -*** - -### getCallId - -#### Signature - -```java -public String getCallId() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 355. - -*** - -### getControlId - -#### Signature - -```java -public String getControlId() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 356. - -*** - -### getState - -#### Signature - -```java -public String getState() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 357. - -## Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 350. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-tap-event/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-tap-event/index.mdx deleted file mode 100644 index b97b7b3c15..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-tap-event/index.mdx +++ /dev/null @@ -1,120 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/relay/relay/relay-event/call-tap-event" -title: "CallTapEvent" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallTapEvent" - parent: "com.signalwire.sdk.relay.RelayEvent" - module: "com.signalwire.sdk.relay" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" - visibility: "public" ---- -# `CallTapEvent` - -Tap event (`calling.call.tap`). - -**Modifiers:** `static` - -## Signature - -```java -public static class CallTapEvent extends RelayEvent -``` - -## Inheritance - -**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/com/signalwire/sdk/relay/relay/relay-event) - -## Methods - -### \ - -#### Signature - -```java -public (String eventType, double timestamp, Map params) -``` - -#### Parameters - - - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 338. - -*** - -### getCallId - -#### Signature - -```java -public String getCallId() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 342. - -*** - -### getControlId - -#### Signature - -```java -public String getControlId() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 343. - -*** - -### getState - -#### Signature - -```java -public String getState() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 344. - -## Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 337. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-transcribe-event/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-transcribe-event/index.mdx deleted file mode 100644 index a561fa122a..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/call-transcribe-event/index.mdx +++ /dev/null @@ -1,120 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/relay/relay/relay-event/call-transcribe-event" -title: "CallTranscribeEvent" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallTranscribeEvent" - parent: "com.signalwire.sdk.relay.RelayEvent" - module: "com.signalwire.sdk.relay" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" - visibility: "public" ---- -# `CallTranscribeEvent` - -Transcribe event (`calling.call.transcribe`). - -**Modifiers:** `static` - -## Signature - -```java -public static class CallTranscribeEvent extends RelayEvent -``` - -## Inheritance - -**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/com/signalwire/sdk/relay/relay/relay-event) - -## Methods - -### \ - -#### Signature - -```java -public (String eventType, double timestamp, Map params) -``` - -#### Parameters - - - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 364. - -*** - -### getCallId - -#### Signature - -```java -public String getCallId() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 368. - -*** - -### getControlId - -#### Signature - -```java -public String getControlId() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 369. - -*** - -### getState - -#### Signature - -```java -public String getState() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 370. - -## Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 363. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/conference-event/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/conference-event/index.mdx deleted file mode 100644 index 98fdb306fd..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/conference-event/index.mdx +++ /dev/null @@ -1,100 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/relay/relay/relay-event/conference-event" -title: "ConferenceEvent" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.relay.RelayEvent.ConferenceEvent" - parent: "com.signalwire.sdk.relay.RelayEvent" - module: "com.signalwire.sdk.relay" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" - visibility: "public" ---- -# `ConferenceEvent` - -Conference event (`calling.conference`). - -**Modifiers:** `static` - -## Signature - -```java -public static class ConferenceEvent extends RelayEvent -``` - -## Inheritance - -**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/com/signalwire/sdk/relay/relay/relay-event) - -## Methods - -### \ - -#### Signature - -```java -public (String eventType, double timestamp, Map params) -``` - -#### Parameters - - - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 426. - -*** - -### getCallId - -#### Signature - -```java -public String getCallId() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 431. - -*** - -### getConferenceId - -#### Signature - -```java -public String getConferenceId() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 430. - -## Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 425. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/index.mdx deleted file mode 100644 index 9ffbc10dfd..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/index.mdx +++ /dev/null @@ -1,305 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/relay/relay/relay-event" -title: "RelayEvent" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.relay.RelayEvent" - parent: "com.signalwire.sdk.relay" - module: "com.signalwire.sdk.relay" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" - visibility: "public" ---- -# `RelayEvent` - -Base class for all RELAY events. - -<p> -Events arrive as `signalwire.event` messages with nested params: -<pre> -{ - "params": { - "event_type": "calling.call.play", - "timestamp": 123457.1234, - "params": { "call_id": "...", "control_id": "...", "state": "finished" } - } -} -</pre> -Subclasses provide typed access to specific event payloads. - -## Signature - -```java -public class RelayEvent -``` - -## Classes - - - - Authorization state event (`signalwire.authorization.state`). - - - - Collect event (`calling.call.collect`). - - - - Connect event (`calling.call.connect`). - - - - Detect event (`calling.call.detect`). - - - - Dial completion event (`calling.call.dial`). <p> Note: No top-level `call_id`. - - - - Fax event (`calling.call.fax`). - - - - Pay event (`calling.call.pay`). - - - - Play event (`calling.call.play`). - - - - Inbound call event (`calling.call.receive`). - - - - Record event (`calling.call.record`). - - - - Refer event (`calling.call.refer`). - - - - Send digits event (`calling.call.send_digits`). - - - - Call state change event (`calling.call.state`). - - - - Stream event (`calling.call.stream`). - - - - Tap event (`calling.call.tap`). - - - - Transcribe event (`calling.call.transcribe`). - - - - Conference event (`calling.conference`). - - - - Inbound messaging event (`messaging.receive`). - - - - Outbound messaging state event (`messaging.state`). - - - - Queue event (`calling.queue`). - - - -## Methods - -### \ - -#### Signature - -```java -public (String eventType, double timestamp, Map params) -``` - -#### Parameters - - - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 34. - -*** - -### fromRawParams - -Create the appropriate event subclass from raw JSON-RPC event params. - -**Modifiers:** `static` - -#### Signature - -```java -public static RelayEvent fromRawParams(Map outerParams) -``` - -#### Parameters - - - -#### Returns - -`RelayEvent` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 65. - -*** - -### getEventType - -#### Signature - -```java -public String getEventType() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 40. - -*** - -### getParams - -#### Signature - -```java -public Map getParams() -``` - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 48. - -*** - -### getStringParam - -#### Signature - - - - ```java - public String getStringParam(String key) - ``` - - - - ```java - public String getStringParam(String key, String defaultValue) - ``` - - - -#### Parameters (Overload 1) - - - -#### Parameters (Overload 2) - - - - - -#### Returns (Overload 1) - -`String` - -#### Returns (Overload 2) - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 52. - -*** - -### getTimestamp - -#### Signature - -```java -public double getTimestamp() -``` - -#### Returns - -`double` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 44. - -*** - -### toString - -**Decorators:** `@Override` - -#### Signature - -```java -public String toString() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 116. - -## Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 28. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/messaging-receive-event/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/messaging-receive-event/index.mdx deleted file mode 100644 index ea56cf4ae7..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/messaging-receive-event/index.mdx +++ /dev/null @@ -1,260 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/relay/relay/relay-event/messaging-receive-event" -title: "MessagingReceiveEvent" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.relay.RelayEvent.MessagingReceiveEvent" - parent: "com.signalwire.sdk.relay.RelayEvent" - module: "com.signalwire.sdk.relay" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" - visibility: "public" ---- -# `MessagingReceiveEvent` - -Inbound messaging event (`messaging.receive`). - -**Modifiers:** `static` - -## Signature - -```java -public static class MessagingReceiveEvent extends RelayEvent -``` - -## Inheritance - -**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/com/signalwire/sdk/relay/relay/relay-event) - -## Methods - -### \ - -#### Signature - -```java -public (String eventType, double timestamp, Map params) -``` - -#### Parameters - - - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 463. - -*** - -### getBody - -#### Signature - -```java -public String getBody() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 472. - -*** - -### getContext - -#### Signature - -```java -public String getContext() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 468. - -*** - -### getDirection - -#### Signature - -```java -public String getDirection() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 469. - -*** - -### getFromNumber - -#### Signature - -```java -public String getFromNumber() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 470. - -*** - -### getMedia - -#### Signature - -```java -public List getMedia() -``` - -#### Returns - -`List` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 473. - -*** - -### getMessageId - -#### Signature - -```java -public String getMessageId() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 467. - -*** - -### getMessageState - -#### Signature - -```java -public String getMessageState() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 475. - -*** - -### getSegments - -#### Signature - -```java -public int getSegments() -``` - -#### Returns - -`int` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 474. - -*** - -### getTags - -#### Signature - -```java -public List getTags() -``` - -#### Returns - -`List` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 476. - -*** - -### getToNumber - -#### Signature - -```java -public String getToNumber() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 471. - -## Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 462. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/messaging-state-event/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/messaging-state-event/index.mdx deleted file mode 100644 index 7f0d81be77..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/messaging-state-event/index.mdx +++ /dev/null @@ -1,280 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/relay/relay/relay-event/messaging-state-event" -title: "MessagingStateEvent" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.relay.RelayEvent.MessagingStateEvent" - parent: "com.signalwire.sdk.relay.RelayEvent" - module: "com.signalwire.sdk.relay" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" - visibility: "public" ---- -# `MessagingStateEvent` - -Outbound messaging state event (`messaging.state`). - -**Modifiers:** `static` - -## Signature - -```java -public static class MessagingStateEvent extends RelayEvent -``` - -## Inheritance - -**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/com/signalwire/sdk/relay/relay/relay-event) - -## Methods - -### \ - -#### Signature - -```java -public (String eventType, double timestamp, Map params) -``` - -#### Parameters - - - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 483. - -*** - -### getBody - -#### Signature - -```java -public String getBody() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 492. - -*** - -### getContext - -#### Signature - -```java -public String getContext() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 488. - -*** - -### getDirection - -#### Signature - -```java -public String getDirection() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 489. - -*** - -### getFromNumber - -#### Signature - -```java -public String getFromNumber() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 490. - -*** - -### getMedia - -#### Signature - -```java -public List getMedia() -``` - -#### Returns - -`List` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 493. - -*** - -### getMessageId - -#### Signature - -```java -public String getMessageId() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 487. - -*** - -### getMessageState - -#### Signature - -```java -public String getMessageState() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 495. - -*** - -### getReason - -#### Signature - -```java -public String getReason() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 496. - -*** - -### getSegments - -#### Signature - -```java -public int getSegments() -``` - -#### Returns - -`int` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 494. - -*** - -### getTags - -#### Signature - -```java -public List getTags() -``` - -#### Returns - -`List` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 497. - -*** - -### getToNumber - -#### Signature - -```java -public String getToNumber() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 491. - -## Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 482. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/queue-event/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/queue-event/index.mdx deleted file mode 100644 index 30b33a6412..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/relay/relay/relay-event/queue-event/index.mdx +++ /dev/null @@ -1,100 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/relay/relay/relay-event/queue-event" -title: "QueueEvent" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.relay.RelayEvent.QueueEvent" - parent: "com.signalwire.sdk.relay.RelayEvent" - module: "com.signalwire.sdk.relay" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" - visibility: "public" ---- -# `QueueEvent` - -Queue event (`calling.queue`). - -**Modifiers:** `static` - -## Signature - -```java -public static class QueueEvent extends RelayEvent -``` - -## Inheritance - -**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/com/signalwire/sdk/relay/relay/relay-event) - -## Methods - -### \ - -#### Signature - -```java -public (String eventType, double timestamp, Map params) -``` - -#### Parameters - - - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 438. - -*** - -### getCallId - -#### Signature - -```java -public String getCallId() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 442. - -*** - -### getQueueId - -#### Signature - -```java -public String getQueueId() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 443. - -## Source - -[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) - -Line 437. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/addresses-namespace/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/addresses-namespace/index.mdx deleted file mode 100644 index 6ca316d7b3..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/addresses-namespace/index.mdx +++ /dev/null @@ -1,184 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/addresses-namespace" -title: "AddressesNamespace" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.rest.namespaces.AddressesNamespace" - parent: "com.signalwire.sdk.rest.namespaces" - module: "com.signalwire.sdk.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/AddressesNamespace.java" - visibility: "public" ---- -# `AddressesNamespace` - -Address management namespace. - -<p>Mirrors `signalwire.rest.namespaces.addresses.AddressesResource`: -list / create / get / delete (no update endpoint exists for addresses). -Paths sit under `/api/relay/rest/addresses`. - -## Signature - -```java -public class AddressesNamespace -``` - -## Methods - -### \ - -#### Signature - -```java -public (HttpClient httpClient) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/AddressesNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/AddressesNamespace.java) - -Line 25. - -*** - -### create - -#### Signature - -```java -public Map create(Map body) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/AddressesNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/AddressesNamespace.java) - -Line 39. - -*** - -### delete - -#### Signature - -```java -public Map delete(String addressId) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/AddressesNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/AddressesNamespace.java) - -Line 47. - -*** - -### get - -#### Signature - -```java -public Map get(String addressId) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/AddressesNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/AddressesNamespace.java) - -Line 43. - -*** - -### getBasePath - -#### Signature - -```java -public String getBasePath() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/AddressesNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/AddressesNamespace.java) - -Line 29. - -*** - -### list - -#### Signature - - - - ```java - public Map list() - ``` - - - - ```java - public Map list(Map queryParams) - ``` - - - -#### Parameters (Overload 2) - - - -#### Returns (Overload 1) - -`Map` - -#### Returns (Overload 2) - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/AddressesNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/AddressesNamespace.java) - -Line 31. - -## Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/AddressesNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/AddressesNamespace.java) - -Line 20. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/billing-namespace/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/billing-namespace/index.mdx deleted file mode 100644 index e3c358a4e3..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/billing-namespace/index.mdx +++ /dev/null @@ -1,90 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/billing-namespace" -title: "BillingNamespace" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.rest.namespaces.BillingNamespace" - parent: "com.signalwire.sdk.rest.namespaces" - module: "com.signalwire.sdk.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/BillingNamespace.java" - visibility: "public" ---- -# `BillingNamespace` - -REST namespace for billing resources. - -## Signature - -```java -public class BillingNamespace -``` - -## Methods - -### \ - -#### Signature - -```java -public (HttpClient httpClient) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/BillingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/BillingNamespace.java) - -Line 20. - -*** - -### invoices - -#### Signature - -```java -public CrudResource invoices() -``` - -#### Returns - -`CrudResource` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/BillingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/BillingNamespace.java) - -Line 25. - -*** - -### usage - -#### Signature - -```java -public CrudResource usage() -``` - -#### Returns - -`CrudResource` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/BillingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/BillingNamespace.java) - -Line 26. - -## Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/BillingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/BillingNamespace.java) - -Line 15. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/calling-namespace/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/calling-namespace/index.mdx deleted file mode 100644 index e3ee3d908a..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/calling-namespace/index.mdx +++ /dev/null @@ -1,1050 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/calling-namespace" -title: "CallingNamespace" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.rest.namespaces.CallingNamespace" - parent: "com.signalwire.sdk.rest.namespaces" - module: "com.signalwire.sdk.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java" - visibility: "public" ---- -# `CallingNamespace` - -REST-based call control. - -All commands are dispatched as -/api/calling/calls with a `"command"` field that names -the operation, optionally an `"id"` field that names the target call, -and a `"params"` object containing keyword arguments. The mock -server (and the real Calling API) matches commands against the registered -routes via the `command` field. - -## Signature - -```java -public class CallingNamespace -``` - -## Methods - -### \ - -#### Signature - -```java -public (HttpClient httpClient) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) - -Line 30. - -*** - -### aiHold - -#### Signature - -```java -public Map aiHold(String callId, Map params) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) - -Line 184. - -*** - -### aiMessage - -#### Signature - -```java -public Map aiMessage(String callId, Map params) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) - -Line 180. - -*** - -### aiStop - -#### Signature - -```java -public Map aiStop(String callId, Map params) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) - -Line 192. - -*** - -### aiUnhold - -#### Signature - -```java -public Map aiUnhold(String callId, Map params) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) - -Line 188. - -*** - -### calls - -#### Signature - -```java -public CrudResource calls() -``` - -#### Returns - -`CrudResource` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) - -Line 35. - -*** - -### collect - -#### Signature - -```java -public Map collect(String callId, Map params) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) - -Line 116. - -*** - -### collectStartInputTimers - -#### Signature - -```java -public Map collectStartInputTimers( - String callId, - Map params -) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) - -Line 124. - -*** - -### collectStop - -#### Signature - -```java -public Map collectStop(String callId, Map params) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) - -Line 120. - -*** - -### denoise - -#### Signature - -```java -public Map denoise(String callId, Map params) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) - -Line 160. - -*** - -### denoiseStop - -#### Signature - -```java -public Map denoiseStop(String callId, Map params) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) - -Line 164. - -*** - -### detect - -#### Signature - -```java -public Map detect(String callId, Map params) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) - -Line 130. - -*** - -### detectStop - -#### Signature - -```java -public Map detectStop(String callId, Map params) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) - -Line 134. - -*** - -### dial - -#### Signature - -```java -public Map dial(Map params) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) - -Line 54. - -*** - -### disconnect - -#### Signature - -```java -public Map disconnect(String callId, Map params) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) - -Line 70. - -*** - -### end - -#### Signature - -```java -public Map end(String callId, Map params) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) - -Line 62. - -*** - -### liveTranscribe - -#### Signature - -```java -public Map liveTranscribe( - String callId, - Map params -) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) - -Line 198. - -*** - -### liveTranslate - -#### Signature - -```java -public Map liveTranslate( - String callId, - Map params -) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) - -Line 202. - -*** - -### play - -#### Signature - -```java -public Map play(String callId, Map params) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) - -Line 76. - -*** - -### playPause - -#### Signature - -```java -public Map playPause(String callId, Map params) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) - -Line 80. - -*** - -### playResume - -#### Signature - -```java -public Map playResume(String callId, Map params) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) - -Line 84. - -*** - -### playStop - -#### Signature - -```java -public Map playStop(String callId, Map params) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) - -Line 88. - -*** - -### playVolume - -#### Signature - -```java -public Map playVolume(String callId, Map params) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) - -Line 92. - -*** - -### receiveFaxStop - -#### Signature - -```java -public Map receiveFaxStop( - String callId, - Map params -) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) - -Line 212. - -*** - -### record - -#### Signature - -```java -public Map record(String callId, Map params) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) - -Line 98. - -*** - -### recordPause - -#### Signature - -```java -public Map recordPause(String callId, Map params) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) - -Line 102. - -*** - -### recordResume - -#### Signature - -```java -public Map recordResume(String callId, Map params) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) - -Line 106. - -*** - -### recordStop - -#### Signature - -```java -public Map recordStop(String callId, Map params) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) - -Line 110. - -*** - -### refer - -#### Signature - -```java -public Map refer(String callId, Map params) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) - -Line 218. - -*** - -### sendFaxStop - -#### Signature - -```java -public Map sendFaxStop(String callId, Map params) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) - -Line 208. - -*** - -### stream - -#### Signature - -```java -public Map stream(String callId, Map params) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) - -Line 150. - -*** - -### streamStop - -#### Signature - -```java -public Map streamStop(String callId, Map params) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) - -Line 154. - -*** - -### tap - -#### Signature - -```java -public Map tap(String callId, Map params) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) - -Line 140. - -*** - -### tapStop - -#### Signature - -```java -public Map tapStop(String callId, Map params) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) - -Line 144. - -*** - -### transcribe - -#### Signature - -```java -public Map transcribe(String callId, Map params) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) - -Line 170. - -*** - -### transcribeStop - -#### Signature - -```java -public Map transcribeStop( - String callId, - Map params -) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) - -Line 174. - -*** - -### transfer - -#### Signature - -```java -public Map transfer(String callId, Map params) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) - -Line 66. - -*** - -### update - -#### Signature - -```java -public Map update(Map params) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) - -Line 58. - -*** - -### userEvent - -#### Signature - -```java -public Map userEvent(String callId, Map params) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) - -Line 224. - -## Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) - -Line 24. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/campaign-namespace/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/campaign-namespace/index.mdx deleted file mode 100644 index 2799479639..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/campaign-namespace/index.mdx +++ /dev/null @@ -1,130 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/campaign-namespace" -title: "CampaignNamespace" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.rest.namespaces.CampaignNamespace" - parent: "com.signalwire.sdk.rest.namespaces" - module: "com.signalwire.sdk.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CampaignNamespace.java" - visibility: "public" ---- -# `CampaignNamespace` - -REST namespace for 10DLC campaign registration resources. - -## Signature - -```java -public class CampaignNamespace -``` - -## Methods - -### \ - -#### Signature - -```java -public (HttpClient httpClient) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CampaignNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CampaignNamespace.java) - -Line 22. - -*** - -### assignments - -#### Signature - -```java -public CrudResource assignments() -``` - -#### Returns - -`CrudResource` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CampaignNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CampaignNamespace.java) - -Line 32. - -*** - -### brands - -#### Signature - -```java -public CrudResource brands() -``` - -#### Returns - -`CrudResource` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CampaignNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CampaignNamespace.java) - -Line 29. - -*** - -### campaigns - -#### Signature - -```java -public CrudResource campaigns() -``` - -#### Returns - -`CrudResource` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CampaignNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CampaignNamespace.java) - -Line 30. - -*** - -### orders - -#### Signature - -```java -public CrudResource orders() -``` - -#### Returns - -`CrudResource` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CampaignNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CampaignNamespace.java) - -Line 31. - -## Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CampaignNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CampaignNamespace.java) - -Line 15. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/chat-namespace/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/chat-namespace/index.mdx deleted file mode 100644 index e2e2a43083..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/chat-namespace/index.mdx +++ /dev/null @@ -1,110 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/chat-namespace" -title: "ChatNamespace" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.rest.namespaces.ChatNamespace" - parent: "com.signalwire.sdk.rest.namespaces" - module: "com.signalwire.sdk.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ChatNamespace.java" - visibility: "public" ---- -# `ChatNamespace` - -REST namespace for chat resources. - -## Signature - -```java -public class ChatNamespace -``` - -## Methods - -### \ - -#### Signature - -```java -public (HttpClient httpClient) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/ChatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ChatNamespace.java) - -Line 21. - -*** - -### channels - -#### Signature - -```java -public CrudResource channels() -``` - -#### Returns - -`CrudResource` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/ChatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ChatNamespace.java) - -Line 27. - -*** - -### members - -#### Signature - -```java -public CrudResource members() -``` - -#### Returns - -`CrudResource` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/ChatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ChatNamespace.java) - -Line 29. - -*** - -### messages - -#### Signature - -```java -public CrudResource messages() -``` - -#### Returns - -`CrudResource` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/ChatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ChatNamespace.java) - -Line 28. - -## Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/ChatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ChatNamespace.java) - -Line 15. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-accounts/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-accounts/index.mdx deleted file mode 100644 index 6d6be5be5a..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-accounts/index.mdx +++ /dev/null @@ -1,191 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-accounts" -title: "CompatAccounts" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.rest.namespaces.CompatNamespace.CompatAccounts" - parent: "com.signalwire.sdk.rest.namespaces.CompatNamespace" - module: "com.signalwire.sdk.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java" - visibility: "public" ---- -# `CompatAccounts` - -Compat account / sub-project management. - -<p>Mirrors `signalwire.rest.namespaces.compat.CompatAccounts`: -accounts.create lives at the top-level `/Accounts` collection -(no AccountSid prefix); accounts.get/update operate on -`/Accounts/{sid`}. - -update is a Twilio-compat POST (not PATCH/PUT). - -**Modifiers:** `static` - -## Signature - -```java -public static class CompatAccounts -``` - -## Methods - -### \ - -#### Signature - -```java -public (HttpClient httpClient) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 333. - -*** - -### create - -#### Signature - -```java -public Map create(Map body) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 347. - -*** - -### get - -#### Signature - -```java -public Map get(String sid) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 351. - -*** - -### getBasePath - -#### Signature - -```java -public String getBasePath() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 337. - -*** - -### list - -#### Signature - - - - ```java - public Map list() - ``` - - - - ```java - public Map list(Map queryParams) - ``` - - - -#### Parameters (Overload 2) - - - -#### Returns (Overload 1) - -`Map` - -#### Returns (Overload 2) - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 339. - -*** - -### update - -#### Signature - -```java -public Map update(String sid, Map body) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 355. - -## Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 328. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-applications/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-applications/index.mdx deleted file mode 100644 index 8ee83581ec..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-applications/index.mdx +++ /dev/null @@ -1,88 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-applications" -title: "CompatApplications" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.rest.namespaces.CompatNamespace.CompatApplications" - parent: "com.signalwire.sdk.rest.namespaces.CompatNamespace" - module: "com.signalwire.sdk.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java" - visibility: "public" ---- -# `CompatApplications` - -Compat application management. - -Twilio-compat update is POST. - -**Modifiers:** `static` - -## Signature - -```java -public static class CompatApplications extends CrudResource -``` - -## Inheritance - -**Extends:** [CrudResource](/docs/sdk-reference/reference/java/com/signalwire/sdk/rest/rest/crud-resource) - -## Methods - -### \ - -#### Signature - -```java -public (HttpClient httpClient, String basePath) -``` - -#### Parameters - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 464. - -*** - -### update - -**Decorators:** `@Override` - -#### Signature - -```java -public Map update(String sid, Map body) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 468. - -## Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 462. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-calls/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-calls/index.mdx deleted file mode 100644 index 71457cf3ae..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-calls/index.mdx +++ /dev/null @@ -1,203 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-calls" -title: "CompatCalls" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.rest.namespaces.CompatNamespace.CompatCalls" - parent: "com.signalwire.sdk.rest.namespaces.CompatNamespace" - module: "com.signalwire.sdk.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java" - visibility: "public" ---- -# `CompatCalls` - -Compat call management with recording and stream sub-resources. - -**Modifiers:** `static` - -## Signature - -```java -public static class CompatCalls extends CrudResource -``` - -## Inheritance - -**Extends:** [CrudResource](/docs/sdk-reference/reference/java/com/signalwire/sdk/rest/rest/crud-resource) - -## Methods - -### \ - -#### Signature - -```java -public (HttpClient httpClient, String basePath) -``` - -#### Parameters - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 93. - -*** - -### startRecording - -#### Signature - -```java -public Map startRecording( - String callSid, - Map body -) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 101. - -*** - -### startStream - -#### Signature - -```java -public Map startStream(String callSid, Map body) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 111. - -*** - -### stopStream - -#### Signature - -```java -public Map stopStream( - String callSid, - String streamSid, - Map body -) -``` - -#### Parameters - - - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 115. - -*** - -### update - -#### Signature - -```java -public Map update(String sid, Map body) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 97. - -*** - -### updateRecording - -#### Signature - -```java -public Map updateRecording( - String callSid, - String recordingSid, - Map body -) -``` - -#### Parameters - - - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 105. - -## Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 91. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-conferences/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-conferences/index.mdx deleted file mode 100644 index cbc5d884da..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-conferences/index.mdx +++ /dev/null @@ -1,495 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-conferences" -title: "CompatConferences" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.rest.namespaces.CompatNamespace.CompatConferences" - parent: "com.signalwire.sdk.rest.namespaces.CompatNamespace" - module: "com.signalwire.sdk.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java" - visibility: "public" ---- -# `CompatConferences` - -Compat conference management with participants, recordings, and -stream sub-resources. - -**Modifiers:** `static` - -## Signature - -```java -public static class CompatConferences -``` - -## Methods - -### \ - -#### Signature - -```java -public (HttpClient httpClient, String basePath) -``` - -#### Parameters - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 369. - -*** - -### deleteRecording - -#### Signature - -```java -public Map deleteRecording( - String conferenceSid, - String recordingSid -) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 441. - -*** - -### get - -#### Signature - -```java -public Map get(String sid) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 384. - -*** - -### getBasePath - -#### Signature - -```java -public String getBasePath() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 374. - -*** - -### getParticipant - -#### Signature - -```java -public Map getParticipant(String conferenceSid, String callSid) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 403. - -*** - -### getRecording - -#### Signature - -```java -public Map getRecording( - String conferenceSid, - String recordingSid -) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 430. - -*** - -### list - -#### Signature - - - - ```java - public Map list() - ``` - - - - ```java - public Map list(Map queryParams) - ``` - - - -#### Parameters (Overload 2) - - - -#### Returns (Overload 1) - -`Map` - -#### Returns (Overload 2) - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 376. - -*** - -### listParticipants - -#### Signature - - - - ```java - public Map listParticipants(String conferenceSid) - ``` - - - - ```java - public Map listParticipants( - String conferenceSid, - Map queryParams - ) - ``` - - - -#### Parameters (Overload 1) - - - -#### Parameters (Overload 2) - - - - - -#### Returns (Overload 1) - -`Map` - -#### Returns (Overload 2) - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 394. - -*** - -### listRecordings - -#### Signature - - - - ```java - public Map listRecordings(String conferenceSid) - ``` - - - - ```java - public Map listRecordings( - String conferenceSid, - Map queryParams - ) - ``` - - - -#### Parameters (Overload 1) - - - -#### Parameters (Overload 2) - - - - - -#### Returns (Overload 1) - -`Map` - -#### Returns (Overload 2) - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 421. - -*** - -### removeParticipant - -#### Signature - -```java -public Map removeParticipant( - String conferenceSid, - String callSid -) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 414. - -*** - -### startStream - -#### Signature - -```java -public Map startStream( - String conferenceSid, - Map body -) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 448. - -*** - -### stopStream - -#### Signature - -```java -public Map stopStream( - String conferenceSid, - String streamSid, - Map body -) -``` - -#### Parameters - - - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 452. - -*** - -### update - -#### Signature - -```java -public Map update(String sid, Map body) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 388. - -*** - -### updateParticipant - -#### Signature - -```java -public Map updateParticipant( - String conferenceSid, - String callSid, - Map body -) -``` - -#### Parameters - - - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 408. - -*** - -### updateRecording - -#### Signature - -```java -public Map updateRecording( - String conferenceSid, - String recordingSid, - Map body -) -``` - -#### Parameters - - - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 435. - -## Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 364. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-faxes/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-faxes/index.mdx deleted file mode 100644 index 1fcde1f0bc..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-faxes/index.mdx +++ /dev/null @@ -1,183 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-faxes" -title: "CompatFaxes" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.rest.namespaces.CompatNamespace.CompatFaxes" - parent: "com.signalwire.sdk.rest.namespaces.CompatNamespace" - module: "com.signalwire.sdk.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java" - visibility: "public" ---- -# `CompatFaxes` - -Compat fax management with media sub-resources. - -**Modifiers:** `static` - -## Signature - -```java -public static class CompatFaxes extends CrudResource -``` - -## Inheritance - -**Extends:** [CrudResource](/docs/sdk-reference/reference/java/com/signalwire/sdk/rest/rest/crud-resource) - -## Methods - -### \ - -#### Signature - -```java -public (HttpClient httpClient, String basePath) -``` - -#### Parameters - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 157. - -*** - -### deleteMedia - -#### Signature - -```java -public Map deleteMedia(String faxSid, String mediaSid) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 177. - -*** - -### getMedia - -#### Signature - -```java -public Map getMedia(String faxSid, String mediaSid) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 173. - -*** - -### listMedia - -#### Signature - - - - ```java - public Map listMedia(String faxSid) - ``` - - - - ```java - public Map listMedia( - String faxSid, - Map queryParams - ) - ``` - - - -#### Parameters (Overload 1) - - - -#### Parameters (Overload 2) - - - - - -#### Returns (Overload 1) - -`Map` - -#### Returns (Overload 2) - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 165. - -*** - -### update - -#### Signature - -```java -public Map update(String sid, Map body) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 161. - -## Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 155. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-laml-bins/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-laml-bins/index.mdx deleted file mode 100644 index a345802329..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-laml-bins/index.mdx +++ /dev/null @@ -1,88 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-laml-bins" -title: "CompatLamlBins" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.rest.namespaces.CompatNamespace.CompatLamlBins" - parent: "com.signalwire.sdk.rest.namespaces.CompatNamespace" - module: "com.signalwire.sdk.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java" - visibility: "public" ---- -# `CompatLamlBins` - -Compat cXML/LaML script bin management. - -Twilio-compat update is POST. - -**Modifiers:** `static` - -## Signature - -```java -public static class CompatLamlBins extends CrudResource -``` - -## Inheritance - -**Extends:** [CrudResource](/docs/sdk-reference/reference/java/com/signalwire/sdk/rest/rest/crud-resource) - -## Methods - -### \ - -#### Signature - -```java -public (HttpClient httpClient, String basePath) -``` - -#### Parameters - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 479. - -*** - -### update - -**Decorators:** `@Override` - -#### Signature - -```java -public Map update(String sid, Map body) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 483. - -## Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 477. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-messages/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-messages/index.mdx deleted file mode 100644 index b5d68acc1b..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-messages/index.mdx +++ /dev/null @@ -1,183 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-messages" -title: "CompatMessages" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.rest.namespaces.CompatNamespace.CompatMessages" - parent: "com.signalwire.sdk.rest.namespaces.CompatNamespace" - module: "com.signalwire.sdk.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java" - visibility: "public" ---- -# `CompatMessages` - -Compat message management with media sub-resources. - -**Modifiers:** `static` - -## Signature - -```java -public static class CompatMessages extends CrudResource -``` - -## Inheritance - -**Extends:** [CrudResource](/docs/sdk-reference/reference/java/com/signalwire/sdk/rest/rest/crud-resource) - -## Methods - -### \ - -#### Signature - -```java -public (HttpClient httpClient, String basePath) -``` - -#### Parameters - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 127. - -*** - -### deleteMedia - -#### Signature - -```java -public Map deleteMedia(String messageSid, String mediaSid) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 147. - -*** - -### getMedia - -#### Signature - -```java -public Map getMedia(String messageSid, String mediaSid) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 143. - -*** - -### listMedia - -#### Signature - - - - ```java - public Map listMedia(String messageSid) - ``` - - - - ```java - public Map listMedia( - String messageSid, - Map queryParams - ) - ``` - - - -#### Parameters (Overload 1) - - - -#### Parameters (Overload 2) - - - - - -#### Returns (Overload 1) - -`Map` - -#### Returns (Overload 2) - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 135. - -*** - -### update - -#### Signature - -```java -public Map update(String sid, Map body) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 131. - -## Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 125. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-phone-numbers/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-phone-numbers/index.mdx deleted file mode 100644 index fa0a6c3523..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-phone-numbers/index.mdx +++ /dev/null @@ -1,366 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-phone-numbers" -title: "CompatPhoneNumbers" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.rest.namespaces.CompatNamespace.CompatPhoneNumbers" - parent: "com.signalwire.sdk.rest.namespaces.CompatNamespace" - module: "com.signalwire.sdk.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java" - visibility: "public" ---- -# `CompatPhoneNumbers` - -Compat IncomingPhoneNumbers + AvailablePhoneNumbers management. - -**Modifiers:** `static` - -## Signature - -```java -public static class CompatPhoneNumbers -``` - -## Methods - -### \ - -#### Signature - -```java -public (HttpClient httpClient, String basePath) -``` - -#### Parameters - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 192. - -*** - -### delete - -#### Signature - -```java -public Map delete(String sid) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 219. - -*** - -### get - -#### Signature - -```java -public Map get(String sid) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 211. - -*** - -### getBasePath - -#### Signature - -```java -public String getBasePath() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 201. - -*** - -### importNumber - -#### Signature - -```java -public Map importNumber(Map body) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 227. - -*** - -### list - -#### Signature - - - - ```java - public Map list() - ``` - - - - ```java - public Map list(Map queryParams) - ``` - - - -#### Parameters (Overload 2) - - - -#### Returns (Overload 1) - -`Map` - -#### Returns (Overload 2) - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 203. - -*** - -### listAvailableCountries - -#### Signature - - - - ```java - public Map listAvailableCountries() - ``` - - - - ```java - public Map listAvailableCountries(Map queryParams) - ``` - - - -#### Parameters (Overload 2) - - - -#### Returns (Overload 1) - -`Map` - -#### Returns (Overload 2) - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 231. - -*** - -### purchase - -#### Signature - -```java -public Map purchase(Map body) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 223. - -*** - -### searchLocal - -#### Signature - - - - ```java - public Map searchLocal(String country) - ``` - - - - ```java - public Map searchLocal( - String country, - Map queryParams - ) - ``` - - - -#### Parameters (Overload 1) - - - -#### Parameters (Overload 2) - - - - - -#### Returns (Overload 1) - -`Map` - -#### Returns (Overload 2) - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 239. - -*** - -### searchTollFree - -#### Signature - - - - ```java - public Map searchTollFree(String country) - ``` - - - - ```java - public Map searchTollFree( - String country, - Map queryParams - ) - ``` - - - -#### Parameters (Overload 1) - - - -#### Parameters (Overload 2) - - - - - -#### Returns (Overload 1) - -`Map` - -#### Returns (Overload 2) - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 247. - -*** - -### update - -#### Signature - -```java -public Map update(String sid, Map body) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 215. - -## Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 185. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-queues/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-queues/index.mdx deleted file mode 100644 index 477e05c297..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-queues/index.mdx +++ /dev/null @@ -1,191 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-queues" -title: "CompatQueues" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.rest.namespaces.CompatNamespace.CompatQueues" - parent: "com.signalwire.sdk.rest.namespaces.CompatNamespace" - module: "com.signalwire.sdk.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java" - visibility: "public" ---- -# `CompatQueues` - -Compat queue management with member operations. - -**Modifiers:** `static` - -## Signature - -```java -public static class CompatQueues extends CrudResource -``` - -## Inheritance - -**Extends:** [CrudResource](/docs/sdk-reference/reference/java/com/signalwire/sdk/rest/rest/crud-resource) - -## Methods - -### \ - -#### Signature - -```java -public (HttpClient httpClient, String basePath) -``` - -#### Parameters - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 494. - -*** - -### dequeueMember - -#### Signature - -```java -public Map dequeueMember( - String queueSid, - String callSid, - Map body -) -``` - -#### Parameters - - - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 515. - -*** - -### getMember - -#### Signature - -```java -public Map getMember(String queueSid, String callSid) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 511. - -*** - -### listMembers - -#### Signature - - - - ```java - public Map listMembers(String queueSid) - ``` - - - - ```java - public Map listMembers( - String queueSid, - Map queryParams - ) - ``` - - - -#### Parameters (Overload 1) - - - -#### Parameters (Overload 2) - - - - - -#### Returns (Overload 1) - -`Map` - -#### Returns (Overload 2) - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 503. - -*** - -### update - -**Decorators:** `@Override` - -#### Signature - -```java -public Map update(String sid, Map body) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 498. - -## Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 492. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-recordings/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-recordings/index.mdx deleted file mode 100644 index 08890efffe..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-recordings/index.mdx +++ /dev/null @@ -1,160 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-recordings" -title: "CompatRecordings" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.rest.namespaces.CompatNamespace.CompatRecordings" - parent: "com.signalwire.sdk.rest.namespaces.CompatNamespace" - module: "com.signalwire.sdk.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java" - visibility: "public" ---- -# `CompatRecordings` - -Compat recording management. - -**Modifiers:** `static` - -## Signature - -```java -public static class CompatRecordings -``` - -## Methods - -### \ - -#### Signature - -```java -public (HttpClient httpClient, String basePath) -``` - -#### Parameters - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 264. - -*** - -### delete - -#### Signature - -```java -public Map delete(String sid) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 283. - -*** - -### get - -#### Signature - -```java -public Map get(String sid) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 279. - -*** - -### getBasePath - -#### Signature - -```java -public String getBasePath() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 269. - -*** - -### list - -#### Signature - - - - ```java - public Map list() - ``` - - - - ```java - public Map list(Map queryParams) - ``` - - - -#### Parameters (Overload 2) - - - -#### Returns (Overload 1) - -`Map` - -#### Returns (Overload 2) - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 271. - -## Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 259. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-tokens/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-tokens/index.mdx deleted file mode 100644 index 92d06add3b..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-tokens/index.mdx +++ /dev/null @@ -1,151 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-tokens" -title: "CompatTokens" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.rest.namespaces.CompatNamespace.CompatTokens" - parent: "com.signalwire.sdk.rest.namespaces.CompatNamespace" - module: "com.signalwire.sdk.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java" - visibility: "public" ---- -# `CompatTokens` - -Compat API token management. - -Note: update is PATCH (BaseResource style), -not POST. - -**Modifiers:** `static` - -## Signature - -```java -public static class CompatTokens -``` - -## Methods - -### \ - -#### Signature - -```java -public (HttpClient httpClient, String basePath) -``` - -#### Parameters - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 531. - -*** - -### create - -#### Signature - -```java -public Map create(Map body) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 538. - -*** - -### delete - -#### Signature - -```java -public Map delete(String tokenId) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 546. - -*** - -### getBasePath - -#### Signature - -```java -public String getBasePath() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 536. - -*** - -### update - -#### Signature - -```java -public Map update(String tokenId, Map body) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 542. - -## Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 526. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-transcriptions/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-transcriptions/index.mdx deleted file mode 100644 index 922e535070..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-transcriptions/index.mdx +++ /dev/null @@ -1,160 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/compat-transcriptions" -title: "CompatTranscriptions" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.rest.namespaces.CompatNamespace.CompatTranscriptions" - parent: "com.signalwire.sdk.rest.namespaces.CompatNamespace" - module: "com.signalwire.sdk.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java" - visibility: "public" ---- -# `CompatTranscriptions` - -Compat transcription management. - -**Modifiers:** `static` - -## Signature - -```java -public static class CompatTranscriptions -``` - -## Methods - -### \ - -#### Signature - -```java -public (HttpClient httpClient, String basePath) -``` - -#### Parameters - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 296. - -*** - -### delete - -#### Signature - -```java -public Map delete(String sid) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 315. - -*** - -### get - -#### Signature - -```java -public Map get(String sid) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 311. - -*** - -### getBasePath - -#### Signature - -```java -public String getBasePath() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 301. - -*** - -### list - -#### Signature - - - - ```java - public Map list() - ``` - - - - ```java - public Map list(Map queryParams) - ``` - - - -#### Parameters (Overload 2) - - - -#### Returns (Overload 1) - -`Map` - -#### Returns (Overload 2) - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 303. - -## Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 291. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/index.mdx deleted file mode 100644 index 58a8ada5dd..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace/index.mdx +++ /dev/null @@ -1,411 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compat-namespace" -title: "CompatNamespace" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.rest.namespaces.CompatNamespace" - parent: "com.signalwire.sdk.rest.namespaces" - module: "com.signalwire.sdk.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java" - visibility: "public" ---- -# `CompatNamespace` - -REST namespace for compatibility (CXML/Twilio-compatible) resources. - -<p>The Twilio-compatible LAML API is mounted under -`/api/laml/2010-04-01/Accounts/{AccountSid`}. - -The trailing -`/api` prefix is added by `HttpClient`, so namespace base -paths here begin with `/laml/2010-04-01/Accounts/...`. - -## Signature - -```java -public class CompatNamespace -``` - -## Classes - - - - Compat account / sub-project management. <p>Mirrors `signalwire.rest.namespaces.compat.CompatAccounts`: accounts.create lives at the top-level `/Accounts` collection (no AccountSid prefix); accounts.get/update operate on `/Accounts/{sid`\}. - - - - Compat application management. - - - - Compat call management with recording and stream sub-resources. - - - - Compat conference management with participants, recordings, and stream sub-resources. - - - - Compat fax management with media sub-resources. - - - - Compat cXML/LaML script bin management. - - - - Compat message management with media sub-resources. - - - - Compat IncomingPhoneNumbers + AvailablePhoneNumbers management. - - - - Compat queue management with member operations. - - - - Compat recording management. - - - - Compat API token management. - - - - Compat transcription management. - - - -## Methods - -### \ - -#### Signature - -```java -public (HttpClient httpClient, String accountSid) -``` - -#### Parameters - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 44. - -*** - -### accounts - -#### Signature - -```java -public CompatAccounts accounts() -``` - -#### Returns - -`CompatAccounts` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 74. - -*** - -### applications - -#### Signature - -```java -public CompatApplications applications() -``` - -#### Returns - -`CompatApplications` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 77. - -*** - -### calls - -#### Signature - -```java -public CompatCalls calls() -``` - -#### Returns - -`CompatCalls` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 68. - -*** - -### conferences - -#### Signature - -```java -public CompatConferences conferences() -``` - -#### Returns - -`CompatConferences` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 76. - -*** - -### faxes - -#### Signature - -```java -public CompatFaxes faxes() -``` - -#### Returns - -`CompatFaxes` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 70. - -*** - -### lamlBins - -#### Signature - -```java -public CompatLamlBins lamlBins() -``` - -#### Returns - -`CompatLamlBins` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 78. - -*** - -### messages - -#### Signature - -```java -public CompatMessages messages() -``` - -#### Returns - -`CompatMessages` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 69. - -*** - -### phoneNumbers - -#### Signature - -```java -public CompatPhoneNumbers phoneNumbers() -``` - -#### Returns - -`CompatPhoneNumbers` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 71. - -*** - -### queues - -#### Signature - -```java -public CompatQueues queues() -``` - -#### Returns - -`CompatQueues` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 75. - -*** - -### recordings - -#### Signature - -```java -public CompatRecordings recordings() -``` - -#### Returns - -`CompatRecordings` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 72. - -*** - -### sipCredentialLists - -#### Signature - -```java -public CrudResource sipCredentialLists() -``` - -#### Returns - -`CrudResource` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 81. - -*** - -### sipDomains - -#### Signature - -```java -public CrudResource sipDomains() -``` - -#### Returns - -`CrudResource` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 80. - -*** - -### sipIpAccessControlLists - -#### Signature - -```java -public CrudResource sipIpAccessControlLists() -``` - -#### Returns - -`CrudResource` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 82. - -*** - -### tokens - -#### Signature - -```java -public CompatTokens tokens() -``` - -#### Returns - -`CompatTokens` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 79. - -*** - -### transcriptions - -#### Signature - -```java -public CompatTranscriptions transcriptions() -``` - -#### Returns - -`CompatTranscriptions` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 73. - -## Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) - -Line 22. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compliance-namespace/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compliance-namespace/index.mdx deleted file mode 100644 index d73a8f8c39..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compliance-namespace/index.mdx +++ /dev/null @@ -1,90 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/compliance-namespace" -title: "ComplianceNamespace" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.rest.namespaces.ComplianceNamespace" - parent: "com.signalwire.sdk.rest.namespaces" - module: "com.signalwire.sdk.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ComplianceNamespace.java" - visibility: "public" ---- -# `ComplianceNamespace` - -REST namespace for compliance resources (CNAM, SHAKEN/STIR). - -## Signature - -```java -public class ComplianceNamespace -``` - -## Methods - -### \ - -#### Signature - -```java -public (HttpClient httpClient) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/ComplianceNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ComplianceNamespace.java) - -Line 20. - -*** - -### cnamRegistrations - -#### Signature - -```java -public CrudResource cnamRegistrations() -``` - -#### Returns - -`CrudResource` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/ComplianceNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ComplianceNamespace.java) - -Line 25. - -*** - -### shakenStir - -#### Signature - -```java -public CrudResource shakenStir() -``` - -#### Returns - -`CrudResource` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/ComplianceNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ComplianceNamespace.java) - -Line 26. - -## Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/ComplianceNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ComplianceNamespace.java) - -Line 15. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/conference-namespace/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/conference-namespace/index.mdx deleted file mode 100644 index 205fcb172e..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/conference-namespace/index.mdx +++ /dev/null @@ -1,90 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/conference-namespace" -title: "ConferenceNamespace" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.rest.namespaces.ConferenceNamespace" - parent: "com.signalwire.sdk.rest.namespaces" - module: "com.signalwire.sdk.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ConferenceNamespace.java" - visibility: "public" ---- -# `ConferenceNamespace` - -REST namespace for conference resources. - -## Signature - -```java -public class ConferenceNamespace -``` - -## Methods - -### \ - -#### Signature - -```java -public (HttpClient httpClient) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/ConferenceNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ConferenceNamespace.java) - -Line 20. - -*** - -### conferences - -#### Signature - -```java -public CrudResource conferences() -``` - -#### Returns - -`CrudResource` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/ConferenceNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ConferenceNamespace.java) - -Line 25. - -*** - -### participants - -#### Signature - -```java -public CrudResource participants() -``` - -#### Returns - -`CrudResource` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/ConferenceNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ConferenceNamespace.java) - -Line 26. - -## Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/ConferenceNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ConferenceNamespace.java) - -Line 15. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/datasphere-namespace/datasphere-documents/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/datasphere-namespace/datasphere-documents/index.mdx deleted file mode 100644 index f213d94b52..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/datasphere-namespace/datasphere-documents/index.mdx +++ /dev/null @@ -1,181 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/datasphere-namespace/datasphere-documents" -title: "DatasphereDocuments" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.rest.namespaces.DatasphereNamespace.DatasphereDocuments" - parent: "com.signalwire.sdk.rest.namespaces.DatasphereNamespace" - module: "com.signalwire.sdk.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/DatasphereNamespace.java" - visibility: "public" ---- -# `DatasphereDocuments` - -Document management with search and chunk operations. - -**Modifiers:** `static` - -## Signature - -```java -public static class DatasphereDocuments extends CrudResource -``` - -## Inheritance - -**Extends:** [CrudResource](/docs/sdk-reference/reference/java/com/signalwire/sdk/rest/rest/crud-resource) - -## Methods - -### \ - -#### Signature - -```java -public (HttpClient httpClient, String basePath) -``` - -#### Parameters - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/DatasphereNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/DatasphereNamespace.java) - -Line 50. - -*** - -### deleteChunk - -#### Signature - -```java -public Map deleteChunk(String documentId, String chunkId) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/DatasphereNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/DatasphereNamespace.java) - -Line 70. - -*** - -### getChunk - -#### Signature - -```java -public Map getChunk(String documentId, String chunkId) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/DatasphereNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/DatasphereNamespace.java) - -Line 66. - -*** - -### listChunks - -#### Signature - - - - ```java - public Map listChunks(String documentId) - ``` - - - - ```java - public Map listChunks( - String documentId, - Map queryParams - ) - ``` - - - -#### Parameters (Overload 1) - - - -#### Parameters (Overload 2) - - - - - -#### Returns (Overload 1) - -`Map` - -#### Returns (Overload 2) - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/DatasphereNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/DatasphereNamespace.java) - -Line 58. - -*** - -### search - -#### Signature - -```java -public Map search(Map body) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/DatasphereNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/DatasphereNamespace.java) - -Line 54. - -## Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/DatasphereNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/DatasphereNamespace.java) - -Line 48. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/datasphere-namespace/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/datasphere-namespace/index.mdx deleted file mode 100644 index 8fb71785b7..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/datasphere-namespace/index.mdx +++ /dev/null @@ -1,109 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/datasphere-namespace" -title: "DatasphereNamespace" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.rest.namespaces.DatasphereNamespace" - parent: "com.signalwire.sdk.rest.namespaces" - module: "com.signalwire.sdk.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/DatasphereNamespace.java" - visibility: "public" ---- -# `DatasphereNamespace` - -REST namespace for DataSphere (knowledge base) resources. - -<p>Mirrors `signalwire.rest.namespaces.datasphere.DatasphereNamespace`: -documents are CRUD-shaped, plus `search` (POST) and chunk-level -operations. - -## Signature - -```java -public class DatasphereNamespace -``` - -## Classes - - - - Document management with search and chunk operations. - - - -## Methods - -### \ - -#### Signature - -```java -public (HttpClient httpClient) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/DatasphereNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/DatasphereNamespace.java) - -Line 26. - -*** - -### documents - -#### Signature - -```java -public DatasphereDocuments documents() -``` - -#### Returns - -`DatasphereDocuments` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/DatasphereNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/DatasphereNamespace.java) - -Line 31. - -*** - -### search - -Legacy convenience for knowledge-base search; the canonical entry point -is `DatasphereDocuments#search(Map)`. - -#### Signature - -```java -public Map search(Map body) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/DatasphereNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/DatasphereNamespace.java) - -Line 37. - -## Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/DatasphereNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/DatasphereNamespace.java) - -Line 21. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/call-flows-resource/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/call-flows-resource/index.mdx deleted file mode 100644 index dc1838537a..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/call-flows-resource/index.mdx +++ /dev/null @@ -1,211 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/call-flows-resource" -title: "CallFlowsResource" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.rest.namespaces.FabricNamespace.CallFlowsResource" - parent: "com.signalwire.sdk.rest.namespaces.FabricNamespace" - module: "com.signalwire.sdk.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java" - visibility: "public" ---- -# `CallFlowsResource` - -Call flows resource — uses PUT for update and rewrites the path -segment to singular `call_flow` for sub-collection paths -(per the API spec). - -**Modifiers:** `static` - -## Signature - -```java -public static class CallFlowsResource extends CrudResource -``` - -## Inheritance - -**Extends:** [CrudResource](/docs/sdk-reference/reference/java/com/signalwire/sdk/rest/rest/crud-resource) - -## Methods - -### \ - -#### Signature - -```java -public (HttpClient httpClient, String basePath) -``` - -#### Parameters - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) - -Line 177. - -*** - -### deployVersion - -#### Signature - -```java -public Map deployVersion( - String resourceId, - Map body -) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) - -Line 208. - -*** - -### listAddresses - -#### Signature - - - - ```java - public Map listAddresses(String resourceId) - ``` - - - - ```java - public Map listAddresses( - String resourceId, - Map queryParams - ) - ``` - - - -#### Parameters (Overload 1) - - - -#### Parameters (Overload 2) - - - - - -#### Returns (Overload 1) - -`Map` - -#### Returns (Overload 2) - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) - -Line 190. - -*** - -### listVersions - -#### Signature - - - - ```java - public Map listVersions(String resourceId) - ``` - - - - ```java - public Map listVersions( - String resourceId, - Map queryParams - ) - ``` - - - -#### Parameters (Overload 1) - - - -#### Parameters (Overload 2) - - - - - -#### Returns (Overload 1) - -`Map` - -#### Returns (Overload 2) - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) - -Line 199. - -*** - -### update - -**Decorators:** `@Override` - -#### Signature - -```java -public Map update(String resourceId, Map body) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) - -Line 181. - -## Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) - -Line 175. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/conference-rooms-resource/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/conference-rooms-resource/index.mdx deleted file mode 100644 index ea748916f7..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/conference-rooms-resource/index.mdx +++ /dev/null @@ -1,133 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/conference-rooms-resource" -title: "ConferenceRoomsResource" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.rest.namespaces.FabricNamespace.ConferenceRoomsResource" - parent: "com.signalwire.sdk.rest.namespaces.FabricNamespace" - module: "com.signalwire.sdk.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java" - visibility: "public" ---- -# `ConferenceRoomsResource` - -Conference rooms — singular `conference_room` for sub-collections. - -**Modifiers:** `static` - -## Signature - -```java -public static class ConferenceRoomsResource extends CrudResource -``` - -## Inheritance - -**Extends:** [CrudResource](/docs/sdk-reference/reference/java/com/signalwire/sdk/rest/rest/crud-resource) - -## Methods - -### \ - -#### Signature - -```java -public (HttpClient httpClient, String basePath) -``` - -#### Parameters - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) - -Line 218. - -*** - -### listAddresses - -#### Signature - - - - ```java - public Map listAddresses(String resourceId) - ``` - - - - ```java - public Map listAddresses( - String resourceId, - Map queryParams - ) - ``` - - - -#### Parameters (Overload 1) - - - -#### Parameters (Overload 2) - - - - - -#### Returns (Overload 1) - -`Map` - -#### Returns (Overload 2) - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) - -Line 231. - -*** - -### update - -**Decorators:** `@Override` - -#### Signature - -```java -public Map update(String resourceId, Map body) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) - -Line 222. - -## Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) - -Line 216. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/cxml-applications-resource/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/cxml-applications-resource/index.mdx deleted file mode 100644 index 1bd8952328..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/cxml-applications-resource/index.mdx +++ /dev/null @@ -1,113 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/cxml-applications-resource" -title: "CxmlApplicationsResource" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.rest.namespaces.FabricNamespace.CxmlApplicationsResource" - parent: "com.signalwire.sdk.rest.namespaces.FabricNamespace" - module: "com.signalwire.sdk.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java" - visibility: "public" ---- -# `CxmlApplicationsResource` - -cXML applications — read/update/delete only (no create endpoint exists). -Calling `create` raises `UnsupportedOperationException`. - -**Modifiers:** `static` - -## Signature - -```java -public static class CxmlApplicationsResource extends CrudResource -``` - -## Inheritance - -**Extends:** [CrudResource](/docs/sdk-reference/reference/java/com/signalwire/sdk/rest/rest/crud-resource) - -## Methods - -### \ - -#### Signature - -```java -public (HttpClient httpClient, String basePath) -``` - -#### Parameters - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) - -Line 247. - -*** - -### create - -**Decorators:** `@Override` - -#### Signature - -```java -public Map create(Map body) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) - -Line 251. - -*** - -### update - -**Decorators:** `@Override` - -#### Signature - -```java -public Map update(String resourceId, Map body) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) - -Line 257. - -## Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) - -Line 245. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/fabric-addresses/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/fabric-addresses/index.mdx deleted file mode 100644 index 6dc0866c18..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/fabric-addresses/index.mdx +++ /dev/null @@ -1,136 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/fabric-addresses" -title: "FabricAddresses" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.rest.namespaces.FabricNamespace.FabricAddresses" - parent: "com.signalwire.sdk.rest.namespaces.FabricNamespace" - module: "com.signalwire.sdk.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java" - visibility: "public" ---- -# `FabricAddresses` - -Read-only fabric addresses collection (top-level). - -**Modifiers:** `static` - -## Signature - -```java -public static class FabricAddresses -``` - -## Methods - -### \ - -#### Signature - -```java -public (HttpClient httpClient, String basePath) -``` - -#### Parameters - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) - -Line 96. - -*** - -### get - -#### Signature - -```java -public Map get(String addressId) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) - -Line 111. - -*** - -### getBasePath - -#### Signature - -```java -public String getBasePath() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) - -Line 101. - -*** - -### list - -#### Signature - - - - ```java - public Map list() - ``` - - - - ```java - public Map list(Map queryParams) - ``` - - - -#### Parameters (Overload 2) - - - -#### Returns (Overload 1) - -`Map` - -#### Returns (Overload 2) - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) - -Line 103. - -## Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) - -Line 91. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/fabric-subscribers/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/fabric-subscribers/index.mdx deleted file mode 100644 index 3fc6827e3d..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/fabric-subscribers/index.mdx +++ /dev/null @@ -1,298 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/fabric-subscribers" -title: "FabricSubscribers" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.rest.namespaces.FabricNamespace.FabricSubscribers" - parent: "com.signalwire.sdk.rest.namespaces.FabricNamespace" - module: "com.signalwire.sdk.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java" - visibility: "public" ---- -# `FabricSubscribers` - -Subscribers resource with SIP-endpoint sub-resource. - -Update uses PUT. - -**Modifiers:** `static` - -## Signature - -```java -public static class FabricSubscribers extends CrudResource -``` - -## Inheritance - -**Extends:** [CrudResource](/docs/sdk-reference/reference/java/com/signalwire/sdk/rest/rest/crud-resource) - -## Methods - -### \ - -#### Signature - -```java -public (HttpClient httpClient, String basePath) -``` - -#### Parameters - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) - -Line 121. - -*** - -### createSipEndpoint - -#### Signature - -```java -public Map createSipEndpoint( - String subscriberId, - Map body -) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) - -Line 139. - -*** - -### deleteSipEndpoint - -#### Signature - -```java -public Map deleteSipEndpoint( - String subscriberId, - String endpointId -) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) - -Line 155. - -*** - -### getSipEndpoint - -#### Signature - -```java -public Map getSipEndpoint(String subscriberId, String endpointId) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) - -Line 144. - -*** - -### listAddresses - -#### Signature - - - - ```java - public Map listAddresses(String subscriberId) - ``` - - - - ```java - public Map listAddresses( - String subscriberId, - Map queryParams - ) - ``` - - - -#### Parameters (Overload 1) - - - -#### Parameters (Overload 2) - - - - - -#### Returns (Overload 1) - -`Map` - -#### Returns (Overload 2) - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) - -Line 160. - -*** - -### listSipEndpoints - -#### Signature - - - - ```java - public Map listSipEndpoints(String subscriberId) - ``` - - - - ```java - public Map listSipEndpoints( - String subscriberId, - Map queryParams - ) - ``` - - - -#### Parameters (Overload 1) - - - -#### Parameters (Overload 2) - - - - - -#### Returns (Overload 1) - -`Map` - -#### Returns (Overload 2) - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) - -Line 130. - -*** - -### update - -**Decorators:** `@Override` - -#### Signature - -```java -public Map update(String resourceId, Map body) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) - -Line 125. - -*** - -### updateSipEndpoint - -#### Signature - -```java -public Map updateSipEndpoint( - String subscriberId, - String endpointId, - Map body -) -``` - -#### Parameters - - - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) - -Line 149. - -## Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) - -Line 119. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/fabric-tokens/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/fabric-tokens/index.mdx deleted file mode 100644 index 9334f09ced..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/fabric-tokens/index.mdx +++ /dev/null @@ -1,172 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/fabric-tokens" -title: "FabricTokens" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.rest.namespaces.FabricNamespace.FabricTokens" - parent: "com.signalwire.sdk.rest.namespaces.FabricNamespace" - module: "com.signalwire.sdk.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java" - visibility: "public" ---- -# `FabricTokens` - -Subscriber, guest, invite, and embed token endpoints (all POST). - -**Modifiers:** `static` - -## Signature - -```java -public static class FabricTokens -``` - -## Methods - -### \ - -#### Signature - -```java -public (HttpClient httpClient) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) - -Line 316. - -*** - -### createEmbedToken - -#### Signature - -```java -public Map createEmbedToken(Map body) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) - -Line 336. - -*** - -### createGuestToken - -#### Signature - -```java -public Map createGuestToken(Map body) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) - -Line 332. - -*** - -### createInviteToken - -#### Signature - -```java -public Map createInviteToken(Map body) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) - -Line 328. - -*** - -### createSubscriberToken - -#### Signature - -```java -public Map createSubscriberToken(Map body) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) - -Line 320. - -*** - -### refreshSubscriberToken - -#### Signature - -```java -public Map refreshSubscriberToken(Map body) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) - -Line 324. - -## Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) - -Line 312. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/generic-resources/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/generic-resources/index.mdx deleted file mode 100644 index bb8ef51460..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/generic-resources/index.mdx +++ /dev/null @@ -1,237 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/generic-resources" -title: "GenericResources" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.rest.namespaces.FabricNamespace.GenericResources" - parent: "com.signalwire.sdk.rest.namespaces.FabricNamespace" - module: "com.signalwire.sdk.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java" - visibility: "public" ---- -# `GenericResources` - -Generic operations against `/api/fabric/resources`: list, get, -delete, plus address listing and domain-application assignment. - -**Modifiers:** `static` - -## Signature - -```java -public static class GenericResources -``` - -## Methods - -### \ - -#### Signature - -```java -public (HttpClient httpClient, String basePath) -``` - -#### Parameters - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) - -Line 272. - -*** - -### assignDomainApplication - -#### Signature - -```java -public Map assignDomainApplication( - String resourceId, - Map body -) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) - -Line 303. - -*** - -### delete - -#### Signature - -```java -public Map delete(String resourceId) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) - -Line 291. - -*** - -### get - -#### Signature - -```java -public Map get(String resourceId) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) - -Line 287. - -*** - -### getBasePath - -#### Signature - -```java -public String getBasePath() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) - -Line 277. - -*** - -### list - -#### Signature - - - - ```java - public Map list() - ``` - - - - ```java - public Map list(Map queryParams) - ``` - - - -#### Parameters (Overload 2) - - - -#### Returns (Overload 1) - -`Map` - -#### Returns (Overload 2) - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) - -Line 279. - -*** - -### listAddresses - -#### Signature - - - - ```java - public Map listAddresses(String resourceId) - ``` - - - - ```java - public Map listAddresses( - String resourceId, - Map queryParams - ) - ``` - - - -#### Parameters (Overload 1) - - - -#### Parameters (Overload 2) - - - - - -#### Returns (Overload 1) - -`Map` - -#### Returns (Overload 2) - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) - -Line 295. - -## Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) - -Line 267. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/index.mdx deleted file mode 100644 index 63ba63f71f..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace/index.mdx +++ /dev/null @@ -1,411 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fabric-namespace" -title: "FabricNamespace" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.rest.namespaces.FabricNamespace" - parent: "com.signalwire.sdk.rest.namespaces" - module: "com.signalwire.sdk.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java" - visibility: "public" ---- -# `FabricNamespace` - -REST namespace for SignalWire Fabric resources. - -<p>Mirrors `signalwire.rest.namespaces.fabric.FabricNamespace`: the -sub-resources expose typed access to addresses, generic resources, -subscribers (with sip-endpoint sub-resource ops), call-flow / conference-room -address sub-paths, cxml-applications (read-only), and tokens. - -The -`resources` entry-point handles cross-resource list/get/delete plus -domain-application assignment. - -## Signature - -```java -public class FabricNamespace -``` - -## Classes - - - - Call flows resource — uses PUT for update and rewrites the path segment to singular `call_flow` for sub-collection paths (per the API spec). - - - - Conference rooms — singular `conference_room` for sub-collections. - - - - cXML applications — read/update/delete only (no create endpoint exists). Calling `create` raises `UnsupportedOperationException`. - - - - Read-only fabric addresses collection (top-level). - - - - Subscribers resource with SIP-endpoint sub-resource. - - - - Subscriber, guest, invite, and embed token endpoints (all POST). - - - - Generic operations against `/api/fabric/resources`: list, get, delete, plus address listing and domain-application assignment. - - - -## Methods - -### \ - -#### Signature - -```java -public (HttpClient httpClient) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) - -Line 43. - -*** - -### addresses - -#### Signature - -```java -public FabricAddresses addresses() -``` - -#### Returns - -`FabricAddresses` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) - -Line 68. - -*** - -### aiAgents - -#### Signature - -```java -public CrudResource aiAgents() -``` - -#### Returns - -`CrudResource` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) - -Line 70. - -*** - -### callFlows - -#### Signature - -```java -public CallFlowsResource callFlows() -``` - -#### Returns - -`CallFlowsResource` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) - -Line 71. - -*** - -### conferenceRooms - -#### Signature - -```java -public ConferenceRoomsResource conferenceRooms() -``` - -#### Returns - -`ConferenceRoomsResource` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) - -Line 72. - -*** - -### cxmlApplications - -#### Signature - -```java -public CxmlApplicationsResource cxmlApplications() -``` - -#### Returns - -`CxmlApplicationsResource` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) - -Line 73. - -*** - -### cxmlScripts - -#### Signature - -```java -public CrudResource cxmlScripts() -``` - -#### Returns - -`CrudResource` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) - -Line 74. - -*** - -### cxmlWebhooks - -#### Signature - -```java -public CrudResource cxmlWebhooks() -``` - -#### Returns - -`CrudResource` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) - -Line 75. - -*** - -### freeswitchConnectors - -#### Signature - -```java -public CrudResource freeswitchConnectors() -``` - -#### Returns - -`CrudResource` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) - -Line 76. - -*** - -### relayApplications - -#### Signature - -```java -public CrudResource relayApplications() -``` - -#### Returns - -`CrudResource` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) - -Line 77. - -*** - -### resources - -#### Signature - -```java -public GenericResources resources() -``` - -#### Returns - -`GenericResources` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) - -Line 69. - -*** - -### sipEndpoints - -#### Signature - -```java -public CrudResource sipEndpoints() -``` - -#### Returns - -`CrudResource` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) - -Line 78. - -*** - -### sipGateways - -#### Signature - -```java -public CrudResource sipGateways() -``` - -#### Returns - -`CrudResource` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) - -Line 79. - -*** - -### subscribers - -#### Signature - -```java -public FabricSubscribers subscribers() -``` - -#### Returns - -`FabricSubscribers` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) - -Line 67. - -*** - -### swmlScripts - -#### Signature - -```java -public CrudResource swmlScripts() -``` - -#### Returns - -`CrudResource` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) - -Line 80. - -*** - -### swmlWebhooks - -#### Signature - -```java -public CrudResource swmlWebhooks() -``` - -#### Returns - -`CrudResource` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) - -Line 81. - -*** - -### tokens - -#### Signature - -```java -public FabricTokens tokens() -``` - -#### Returns - -`FabricTokens` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) - -Line 82. - -## Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) - -Line 24. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fax-namespace/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fax-namespace/index.mdx deleted file mode 100644 index 8cf0a40443..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fax-namespace/index.mdx +++ /dev/null @@ -1,70 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/fax-namespace" -title: "FaxNamespace" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.rest.namespaces.FaxNamespace" - parent: "com.signalwire.sdk.rest.namespaces" - module: "com.signalwire.sdk.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FaxNamespace.java" - visibility: "public" ---- -# `FaxNamespace` - -REST namespace for fax resources. - -## Signature - -```java -public class FaxNamespace -``` - -## Methods - -### \ - -#### Signature - -```java -public (HttpClient httpClient) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/FaxNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FaxNamespace.java) - -Line 19. - -*** - -### faxes - -#### Signature - -```java -public CrudResource faxes() -``` - -#### Returns - -`CrudResource` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/FaxNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FaxNamespace.java) - -Line 23. - -## Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/FaxNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FaxNamespace.java) - -Line 15. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/imported-numbers-namespace/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/imported-numbers-namespace/index.mdx deleted file mode 100644 index 82a9048335..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/imported-numbers-namespace/index.mdx +++ /dev/null @@ -1,97 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/imported-numbers-namespace" -title: "ImportedNumbersNamespace" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.rest.namespaces.ImportedNumbersNamespace" - parent: "com.signalwire.sdk.rest.namespaces" - module: "com.signalwire.sdk.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ImportedNumbersNamespace.java" - visibility: "public" ---- -# `ImportedNumbersNamespace` - -Imported Phone Numbers namespace — create-only. - -<p>Mirrors -`signalwire.rest.namespaces.imported_numbers.ImportedNumbersResource`. - -## Signature - -```java -public class ImportedNumbersNamespace -``` - -## Methods - -### \ - -#### Signature - -```java -public (HttpClient httpClient) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/ImportedNumbersNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ImportedNumbersNamespace.java) - -Line 24. - -*** - -### create - -#### Signature - -```java -public Map create(Map body) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/ImportedNumbersNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ImportedNumbersNamespace.java) - -Line 30. - -*** - -### getBasePath - -#### Signature - -```java -public String getBasePath() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/ImportedNumbersNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ImportedNumbersNamespace.java) - -Line 28. - -## Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/ImportedNumbersNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ImportedNumbersNamespace.java) - -Line 19. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/index.mdx deleted file mode 100644 index db1e1a52bd..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/index.mdx +++ /dev/null @@ -1,143 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces" -title: "namespaces" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "module" - language: "java" - qualified_name: "com.signalwire.sdk.rest.namespaces" - module: "com.signalwire.sdk.rest.namespaces" ---- -# `namespaces` - -## Signature - -```java -package com.signalwire.sdk.rest.namespaces -``` - -## Classes - - - - Address management namespace. <p>Mirrors `signalwire.rest.namespaces.addresses.AddressesResource`: list / create / get / delete (no update endpoint exists for addresses). Paths sit under `/api/relay/rest/addresses`. - - - - REST namespace for billing resources. - - - - REST-based call control. - - - - REST namespace for 10DLC campaign registration resources. - - - - REST namespace for chat resources. - - - - REST namespace for compatibility (CXML/Twilio-compatible) resources. <p>The Twilio-compatible LAML API is mounted under `/api/laml/2010-04-01/Accounts/{AccountSid`\}. - - - - REST namespace for compliance resources (CNAM, SHAKEN/STIR). - - - - REST namespace for conference resources. - - - - REST namespace for DataSphere (knowledge base) resources. <p>Mirrors `signalwire.rest.namespaces.datasphere.DatasphereNamespace`: documents are CRUD-shaped, plus `search` (POST) and chunk-level operations. - - - - REST namespace for SignalWire Fabric resources. <p>Mirrors `signalwire.rest.namespaces.fabric.FabricNamespace`: the sub-resources expose typed access to addresses, generic resources, subscribers (with sip-endpoint sub-resource ops), call-flow / conference-room address sub-paths, cxml-applications (read-only), and tokens. - - - - REST namespace for fax resources. - - - - Imported Phone Numbers namespace — create-only. <p>Mirrors `signalwire.rest.namespaces.imported_numbers.ImportedNumbersResource`. - - - - Logs namespace — message, voice, fax, and conference logs (read-only). <p>Mirrors `signalwire.rest.namespaces.logs.LogsNamespace`: each sub-resource fans out to a distinct sub-API root (message → /messaging/logs, voice → /voice/logs, fax → /fax/logs, conference → /logs/conferences). - - - - REST namespace for messaging (SMS/MMS) resources. - - - - MFA (Multi-Factor Authentication) namespace. <p>Mirrors `signalwire.rest.namespaces.mfa.MfaResource`: sms / call / verify endpoints. - - - - Number Groups namespace — full CRUD on number groups + membership ops. <p>Mirrors `signalwire.rest.namespaces.number_groups.NumberGroupsResource`: the group CRUD uses PUT for update; membership get/delete operate against a separate top-level `/api/relay/rest/number_group_memberships` collection (not a sub-collection of the group). - - - - REST namespace for number lookup (CNAM/carrier lookup) resources. - - - - REST namespace for phone number management. <p> Supports the standard CRUD surface plus typed helpers for binding an inbound call to a handler (SWML webhook, cXML webhook, AI agent, call flow, RELAY application/topic). - - - - REST namespace for project management resources. <p>Mirrors `signalwire.rest.namespaces.project.ProjectNamespace`: exposes `ProjectTokens` for API token CRUD (PATCH for update, DELETE for revoke). - - - - REST namespace for Pub/Sub resources. - - - - Queues namespace — full CRUD with member operations. <p>Mirrors `signalwire.rest.namespaces.queues.QueuesResource`: queue CRUD uses PUT for update; members are addressable both per-id and via the special `/next` endpoint. - - - - Recordings namespace — list / get / delete (no create/update). <p>Mirrors `signalwire.rest.namespaces.recordings.RecordingsResource`. Path: `/api/relay/rest/recordings`. - - - - 10DLC Campaign Registry namespace — brands, campaigns, orders, numbers. <p>Mirrors `signalwire.rest.namespaces.registry.RegistryNamespace`. All endpoints sit under `/api/relay/rest/registry/beta`. - - - - Short Codes namespace — list / get / update (PUT). - - - - REST namespace for SIP resources. - - - - SIP Profile namespace — get / update (PUT) the project's singleton SIP profile. <p>Mirrors `signalwire.rest.namespaces.sip_profile.SipProfileResource`. - - - - REST namespace for audio stream resources. - - - - REST namespace for SWML script resources. - - - - REST namespace for transcription resources. - - - - REST namespace for the Video API: rooms, room sessions/recordings, conferences, conference tokens, and individual streams. <p>Mirrors `signalwire.rest.namespaces.video.VideoNamespace`. - - diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/logs-namespace/conference-logs/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/logs-namespace/conference-logs/index.mdx deleted file mode 100644 index e53f5988bb..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/logs-namespace/conference-logs/index.mdx +++ /dev/null @@ -1,112 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/logs-namespace/conference-logs" -title: "ConferenceLogs" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.rest.namespaces.LogsNamespace.ConferenceLogs" - parent: "com.signalwire.sdk.rest.namespaces.LogsNamespace" - module: "com.signalwire.sdk.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java" - visibility: "public" ---- -# `ConferenceLogs` - -Conference logs — list-only. - -**Modifiers:** `static` - -## Signature - -```java -public static class ConferenceLogs -``` - -## Methods - -### \ - -#### Signature - -```java -public (HttpClient httpClient, String basePath) -``` - -#### Parameters - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) - -Line 135. - -*** - -### getBasePath - -#### Signature - -```java -public String getBasePath() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) - -Line 140. - -*** - -### list - -#### Signature - - - - ```java - public Map list() - ``` - - - - ```java - public Map list(Map queryParams) - ``` - - - -#### Parameters (Overload 2) - - - -#### Returns (Overload 1) - -`Map` - -#### Returns (Overload 2) - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) - -Line 142. - -## Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) - -Line 130. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/logs-namespace/fax-logs/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/logs-namespace/fax-logs/index.mdx deleted file mode 100644 index ded1935335..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/logs-namespace/fax-logs/index.mdx +++ /dev/null @@ -1,136 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/logs-namespace/fax-logs" -title: "FaxLogs" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.rest.namespaces.LogsNamespace.FaxLogs" - parent: "com.signalwire.sdk.rest.namespaces.LogsNamespace" - module: "com.signalwire.sdk.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java" - visibility: "public" ---- -# `FaxLogs` - -Fax logs — list + per-id get. - -**Modifiers:** `static` - -## Signature - -```java -public static class FaxLogs -``` - -## Methods - -### \ - -#### Signature - -```java -public (HttpClient httpClient, String basePath) -``` - -#### Parameters - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) - -Line 109. - -*** - -### get - -#### Signature - -```java -public Map get(String logId) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) - -Line 124. - -*** - -### getBasePath - -#### Signature - -```java -public String getBasePath() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) - -Line 114. - -*** - -### list - -#### Signature - - - - ```java - public Map list() - ``` - - - - ```java - public Map list(Map queryParams) - ``` - - - -#### Parameters (Overload 2) - - - -#### Returns (Overload 1) - -`Map` - -#### Returns (Overload 2) - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) - -Line 116. - -## Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) - -Line 104. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/logs-namespace/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/logs-namespace/index.mdx deleted file mode 100644 index 55adc0e9c0..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/logs-namespace/index.mdx +++ /dev/null @@ -1,154 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/logs-namespace" -title: "LogsNamespace" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.rest.namespaces.LogsNamespace" - parent: "com.signalwire.sdk.rest.namespaces" - module: "com.signalwire.sdk.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java" - visibility: "public" ---- -# `LogsNamespace` - -Logs namespace — message, voice, fax, and conference logs (read-only). - -<p>Mirrors `signalwire.rest.namespaces.logs.LogsNamespace`: each -sub-resource fans out to a distinct sub-API root (message → /messaging/logs, -voice → /voice/logs, fax → /fax/logs, conference → /logs/conferences). - -## Signature - -```java -public class LogsNamespace -``` - -## Classes - - - - Conference logs — list-only. - - - - Fax logs — list + per-id get. - - - - Read-only logs supporting list + per-id get. - - - - Voice logs add a per-id events sub-collection. - - - -## Methods - -### \ - -#### Signature - -```java -public (HttpClient httpClient) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) - -Line 27. - -*** - -### conferences - -#### Signature - -```java -public ConferenceLogs conferences() -``` - -#### Returns - -`ConferenceLogs` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) - -Line 37. - -*** - -### fax - -#### Signature - -```java -public FaxLogs fax() -``` - -#### Returns - -`FaxLogs` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) - -Line 36. - -*** - -### messages - -#### Signature - -```java -public MessageLogs messages() -``` - -#### Returns - -`MessageLogs` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) - -Line 34. - -*** - -### voice - -#### Signature - -```java -public VoiceLogs voice() -``` - -#### Returns - -`VoiceLogs` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) - -Line 35. - -## Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) - -Line 20. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/logs-namespace/message-logs/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/logs-namespace/message-logs/index.mdx deleted file mode 100644 index 1245eb6d7d..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/logs-namespace/message-logs/index.mdx +++ /dev/null @@ -1,136 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/logs-namespace/message-logs" -title: "MessageLogs" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.rest.namespaces.LogsNamespace.MessageLogs" - parent: "com.signalwire.sdk.rest.namespaces.LogsNamespace" - module: "com.signalwire.sdk.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java" - visibility: "public" ---- -# `MessageLogs` - -Read-only logs supporting list + per-id get. - -**Modifiers:** `static` - -## Signature - -```java -public static class MessageLogs -``` - -## Methods - -### \ - -#### Signature - -```java -public (HttpClient httpClient, String basePath) -``` - -#### Parameters - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) - -Line 49. - -*** - -### get - -#### Signature - -```java -public Map get(String logId) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) - -Line 64. - -*** - -### getBasePath - -#### Signature - -```java -public String getBasePath() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) - -Line 54. - -*** - -### list - -#### Signature - - - - ```java - public Map list() - ``` - - - - ```java - public Map list(Map queryParams) - ``` - - - -#### Parameters (Overload 2) - - - -#### Returns (Overload 1) - -`Map` - -#### Returns (Overload 2) - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) - -Line 56. - -## Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) - -Line 44. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/logs-namespace/voice-logs/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/logs-namespace/voice-logs/index.mdx deleted file mode 100644 index cf3ea34c23..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/logs-namespace/voice-logs/index.mdx +++ /dev/null @@ -1,183 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/logs-namespace/voice-logs" -title: "VoiceLogs" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.rest.namespaces.LogsNamespace.VoiceLogs" - parent: "com.signalwire.sdk.rest.namespaces.LogsNamespace" - module: "com.signalwire.sdk.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java" - visibility: "public" ---- -# `VoiceLogs` - -Voice logs add a per-id events sub-collection. - -**Modifiers:** `static` - -## Signature - -```java -public static class VoiceLogs -``` - -## Methods - -### \ - -#### Signature - -```java -public (HttpClient httpClient, String basePath) -``` - -#### Parameters - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) - -Line 75. - -*** - -### get - -#### Signature - -```java -public Map get(String logId) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) - -Line 90. - -*** - -### getBasePath - -#### Signature - -```java -public String getBasePath() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) - -Line 80. - -*** - -### list - -#### Signature - - - - ```java - public Map list() - ``` - - - - ```java - public Map list(Map queryParams) - ``` - - - -#### Parameters (Overload 2) - - - -#### Returns (Overload 1) - -`Map` - -#### Returns (Overload 2) - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) - -Line 82. - -*** - -### listEvents - -#### Signature - - - - ```java - public Map listEvents(String logId) - ``` - - - - ```java - public Map listEvents( - String logId, - Map queryParams - ) - ``` - - - -#### Parameters (Overload 1) - - - -#### Parameters (Overload 2) - - - - - -#### Returns (Overload 1) - -`Map` - -#### Returns (Overload 2) - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) - -Line 94. - -## Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) - -Line 70. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/messaging-namespace/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/messaging-namespace/index.mdx deleted file mode 100644 index eb3affc3c1..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/messaging-namespace/index.mdx +++ /dev/null @@ -1,96 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/messaging-namespace" -title: "MessagingNamespace" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.rest.namespaces.MessagingNamespace" - parent: "com.signalwire.sdk.rest.namespaces" - module: "com.signalwire.sdk.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/MessagingNamespace.java" - visibility: "public" ---- -# `MessagingNamespace` - -REST namespace for messaging (SMS/MMS) resources. - -## Signature - -```java -public class MessagingNamespace -``` - -## Methods - -### \ - -#### Signature - -```java -public (HttpClient httpClient) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/MessagingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/MessagingNamespace.java) - -Line 22. - -*** - -### messages - -#### Signature - -```java -public CrudResource messages() -``` - -#### Returns - -`CrudResource` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/MessagingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/MessagingNamespace.java) - -Line 27. - -*** - -### send - -Send a message via REST. - -#### Signature - -```java -public Map send(Map body) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/MessagingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/MessagingNamespace.java) - -Line 30. - -## Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/MessagingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/MessagingNamespace.java) - -Line 17. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/mfa-namespace/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/mfa-namespace/index.mdx deleted file mode 100644 index e0ed459a6f..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/mfa-namespace/index.mdx +++ /dev/null @@ -1,147 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/mfa-namespace" -title: "MfaNamespace" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.rest.namespaces.MfaNamespace" - parent: "com.signalwire.sdk.rest.namespaces" - module: "com.signalwire.sdk.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/MfaNamespace.java" - visibility: "public" ---- -# `MfaNamespace` - -MFA (Multi-Factor Authentication) namespace. - -<p>Mirrors `signalwire.rest.namespaces.mfa.MfaResource`: -sms / call / verify endpoints. - -## Signature - -```java -public class MfaNamespace -``` - -## Methods - -### \ - -#### Signature - -```java -public (HttpClient httpClient) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/MfaNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/MfaNamespace.java) - -Line 24. - -*** - -### call - -#### Signature - -```java -public Map call(Map body) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/MfaNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/MfaNamespace.java) - -Line 34. - -*** - -### getBasePath - -#### Signature - -```java -public String getBasePath() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/MfaNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/MfaNamespace.java) - -Line 28. - -*** - -### sms - -#### Signature - -```java -public Map sms(Map body) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/MfaNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/MfaNamespace.java) - -Line 30. - -*** - -### verify - -#### Signature - -```java -public Map verify(String requestId, Map body) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/MfaNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/MfaNamespace.java) - -Line 38. - -## Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/MfaNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/MfaNamespace.java) - -Line 19. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/number-groups-namespace/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/number-groups-namespace/index.mdx deleted file mode 100644 index c2de6e5de4..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/number-groups-namespace/index.mdx +++ /dev/null @@ -1,333 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/number-groups-namespace" -title: "NumberGroupsNamespace" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.rest.namespaces.NumberGroupsNamespace" - parent: "com.signalwire.sdk.rest.namespaces" - module: "com.signalwire.sdk.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java" - visibility: "public" ---- -# `NumberGroupsNamespace` - -Number Groups namespace — full CRUD on number groups + membership ops. - -<p>Mirrors -`signalwire.rest.namespaces.number_groups.NumberGroupsResource`: the -group CRUD uses PUT for update; membership get/delete operate against a -separate top-level `/api/relay/rest/number_group_memberships` -collection (not a sub-collection of the group). - -## Signature - -```java -public class NumberGroupsNamespace -``` - -## Methods - -### \ - -#### Signature - -```java -public (HttpClient httpClient) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java) - -Line 28. - -*** - -### addMembership - -#### Signature - -```java -public Map addMembership(String groupId, Map body) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java) - -Line 70. - -*** - -### create - -#### Signature - -```java -public Map create(Map body) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java) - -Line 44. - -*** - -### delete - -#### Signature - -```java -public Map delete(String groupId) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java) - -Line 56. - -*** - -### deleteMembership - -#### Signature - -```java -public Map deleteMembership(String membershipId) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java) - -Line 78. - -*** - -### get - -#### Signature - -```java -public Map get(String groupId) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java) - -Line 48. - -*** - -### getBasePath - -#### Signature - -```java -public String getBasePath() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java) - -Line 32. - -*** - -### getMembership - -#### Signature - -```java -public Map getMembership(String membershipId) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java) - -Line 74. - -*** - -### list - -#### Signature - - - - ```java - public Map list() - ``` - - - - ```java - public Map list(Map queryParams) - ``` - - - -#### Parameters (Overload 2) - - - -#### Returns (Overload 1) - -`Map` - -#### Returns (Overload 2) - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java) - -Line 36. - -*** - -### listMemberships - -#### Signature - - - - ```java - public Map listMemberships(String groupId) - ``` - - - - ```java - public Map listMemberships( - String groupId, - Map queryParams - ) - ``` - - - -#### Parameters (Overload 1) - - - -#### Parameters (Overload 2) - - - - - -#### Returns (Overload 1) - -`Map` - -#### Returns (Overload 2) - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java) - -Line 62. - -*** - -### update - -#### Signature - -```java -public Map update(String groupId, Map body) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java) - -Line 52. - -## Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java) - -Line 22. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/number-lookup-namespace/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/number-lookup-namespace/index.mdx deleted file mode 100644 index 71714c9bee..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/number-lookup-namespace/index.mdx +++ /dev/null @@ -1,76 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/number-lookup-namespace" -title: "NumberLookupNamespace" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.rest.namespaces.NumberLookupNamespace" - parent: "com.signalwire.sdk.rest.namespaces" - module: "com.signalwire.sdk.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/NumberLookupNamespace.java" - visibility: "public" ---- -# `NumberLookupNamespace` - -REST namespace for number lookup (CNAM/carrier lookup) resources. - -## Signature - -```java -public class NumberLookupNamespace -``` - -## Methods - -### \ - -#### Signature - -```java -public (HttpClient httpClient) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/NumberLookupNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/NumberLookupNamespace.java) - -Line 20. - -*** - -### lookup - -Look up a phone number. - -#### Signature - -```java -public Map lookup(String phoneNumber) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/NumberLookupNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/NumberLookupNamespace.java) - -Line 25. - -## Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/NumberLookupNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/NumberLookupNamespace.java) - -Line 16. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/phone-numbers-namespace/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/phone-numbers-namespace/index.mdx deleted file mode 100644 index 3574547b36..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/phone-numbers-namespace/index.mdx +++ /dev/null @@ -1,614 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/phone-numbers-namespace" -title: "PhoneNumbersNamespace" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.rest.namespaces.PhoneNumbersNamespace" - parent: "com.signalwire.sdk.rest.namespaces" - module: "com.signalwire.sdk.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java" - visibility: "public" ---- -# `PhoneNumbersNamespace` - -REST namespace for phone number management. - -<p> -Supports the standard CRUD surface plus typed helpers for binding an -inbound call to a handler (SWML webhook, cXML webhook, AI agent, call -flow, RELAY application/topic). - -The binding model is: set -`call_handler` + the handler-specific companion field on the phone -number; the server auto-materializes the matching Fabric resource. -See `PhoneCallHandler` for the enum and `rest/docs/phone-binding.md` -for the full model. - -## Signature - -```java -public class PhoneNumbersNamespace -``` - -## Methods - -### \ - -#### Signature - -```java -public (HttpClient httpClient) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java) - -Line 32. - -*** - -### create - -Purchase a phone number. - -#### Signature - -```java -public Map create(Map body) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java) - -Line 47. - -*** - -### delete - -Release a phone number. - -#### Signature - -```java -public Map delete(String id) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java) - -Line 53. - -*** - -### get - -Get a single phone number. - -#### Signature - -```java -public Map get(String id) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java) - -Line 44. - -*** - -### getResource - -Get the underlying CRUD resource. - -#### Signature - -```java -public CrudResource getResource() -``` - -#### Returns - -`CrudResource` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java) - -Line 61. - -*** - -### list - -List all phone numbers. - -#### Signature - - - - ```java - public Map list() - ``` - - - - ```java - public Map list(Map queryParams) - ``` - - - -#### Parameters (Overload 2) - - - -#### Returns (Overload 1) - -`Map` - -#### Returns (Overload 2) - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java) - -Line 38. - -*** - -### search - -Search available phone numbers. - -#### Signature - -```java -public Map search(Map queryParams) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java) - -Line 56. - -*** - -### setAiAgent - -Route inbound calls to an AI Agent Fabric resource by ID. - -#### Signature - -```java -public Map setAiAgent(String id, String agentId) -``` - -#### Parameters - - - phone number SID - - - - AI agent resource ID - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java) - -Line 156. - -*** - -### setCallFlow - -Route inbound calls to a Call Flow by ID (server default version). - -#### Signature - - - - ```java - public Map setCallFlow(String id, String flowId) - ``` - - - - ```java - public Map setCallFlow(String id, String flowId, String version) - ``` - - - -#### Parameters (Overload 1) - - - phone number SID - - - - call-flow resource ID - - -#### Parameters (Overload 2) - - - phone number SID - - - - call-flow resource ID - - - - `"working_copy"`, `"current_deployed"`, or `null` for the server default - - -#### Returns (Overload 1) - -`Map` - -#### Returns (Overload 2) - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java) - -Line 169. - -*** - -### setCxmlApplication - -Route inbound calls to an existing cXML application by ID. - -#### Signature - -```java -public Map setCxmlApplication(String id, String applicationId) -``` - -#### Parameters - - - phone number SID - - - - cXML application ID - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java) - -Line 143. - -*** - -### setCxmlWebhook - -Route inbound calls to a cXML (Twilio-compat / LAML) webhook. - -<p> -Despite the wire value `laml_webhooks` being plural, this -creates a single `cxml_webhook` Fabric resource. - -#### Signature - - - - ```java - public Map setCxmlWebhook(String id, String url) - ``` - - - - ```java - public Map setCxmlWebhook( - String id, - String url, - String fallbackUrl - ) - ``` - - - - ```java - public Map setCxmlWebhook( - String id, - String url, - String fallbackUrl, - String statusCallbackUrl - ) - ``` - - - -#### Parameters (Overload 1) - - - phone number SID - - - - primary cXML endpoint - - -#### Parameters (Overload 2) - - - phone number SID - - - - primary cXML endpoint - - - - URL the server falls back to when the primary fails - - -#### Parameters (Overload 3) - - - phone number SID - - - - primary cXML endpoint - - - - fallback URL (may be `null`) - - - - call-status callback (may be `null`) - - -#### Returns (Overload 1) - -`Map` - -#### Returns (Overload 2) - -`Map` - -#### Returns (Overload 3) - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java) - -Line 100. - -*** - -### setRelayApplication - -Route inbound calls to a named RELAY application. - -#### Signature - -```java -public Map setRelayApplication(String id, String name) -``` - -#### Parameters - - - phone number SID - - - - RELAY application name - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java) - -Line 197. - -*** - -### setRelayTopic - -Route inbound calls to a RELAY topic (client subscription). - -#### Signature - - - - ```java - public Map setRelayTopic(String id, String topic) - ``` - - - - ```java - public Map setRelayTopic( - String id, - String topic, - String statusCallbackUrl - ) - ``` - - - -#### Parameters (Overload 1) - - - phone number SID - - - - RELAY topic name - - -#### Parameters (Overload 2) - - - phone number SID - - - - RELAY topic name - - - - call-status callback URL (may be `null`) - - -#### Returns (Overload 1) - -`Map` - -#### Returns (Overload 2) - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java) - -Line 210. - -*** - -### setSwmlWebhook - -Route inbound calls on this phone number to an SWML webhook URL. - -<p> -Your backend returns an SWML document per call. - -The server -auto-creates a `swml_webhook` Fabric resource keyed off this URL. - -#### Signature - -```java -public Map setSwmlWebhook(String id, String url) -``` - -#### Parameters - - - phone number SID - - - - SWML endpoint the server should fetch per call - - -#### Returns - -`Map` — the updated phone number representation - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java) - -Line 84. - -*** - -### update - -Update a phone number. - -#### Signature - -```java -public Map update(String id, Map body) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java) - -Line 50. - -## Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java) - -Line 27. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/project-namespace/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/project-namespace/index.mdx deleted file mode 100644 index 0c8b90cc39..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/project-namespace/index.mdx +++ /dev/null @@ -1,178 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/project-namespace" -title: "ProjectNamespace" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.rest.namespaces.ProjectNamespace" - parent: "com.signalwire.sdk.rest.namespaces" - module: "com.signalwire.sdk.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java" - visibility: "public" ---- -# `ProjectNamespace` - -REST namespace for project management resources. - -<p>Mirrors `signalwire.rest.namespaces.project.ProjectNamespace`: -exposes `ProjectTokens` for API token CRUD (PATCH for update, -DELETE for revoke). - -## Signature - -```java -public class ProjectNamespace -``` - -## Classes - - - - Project API token management. - - - -## Methods - -### \ - -#### Signature - -```java -public (HttpClient httpClient) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java) - -Line 25. - -*** - -### createToken - -Create a project token (legacy single-method form). - -#### Signature - -```java -public Map createToken(Map body) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java) - -Line 50. - -*** - -### get - -Get project info. - -#### Signature - -```java -public Map get() -``` - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java) - -Line 35. - -*** - -### listTokens - -List project tokens (legacy single-method form). - -#### Signature - -```java -public Map listTokens() -``` - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java) - -Line 45. - -*** - -### tokens - -#### Signature - -```java -public ProjectTokens tokens() -``` - -#### Returns - -`ProjectTokens` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java) - -Line 30. - -*** - -### update - -Update project settings. - -#### Signature - -```java -public Map update(Map body) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java) - -Line 40. - -## Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java) - -Line 20. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/project-namespace/project-tokens/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/project-namespace/project-tokens/index.mdx deleted file mode 100644 index a47d25bc56..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/project-namespace/project-tokens/index.mdx +++ /dev/null @@ -1,149 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/project-namespace/project-tokens" -title: "ProjectTokens" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.rest.namespaces.ProjectNamespace.ProjectTokens" - parent: "com.signalwire.sdk.rest.namespaces.ProjectNamespace" - module: "com.signalwire.sdk.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java" - visibility: "public" ---- -# `ProjectTokens` - -Project API token management. - -Update is PATCH (matches Python's --> http.patch); delete revokes the token. - -**Modifiers:** `static` - -## Signature - -```java -public static class ProjectTokens -``` - -## Methods - -### \ - -#### Signature - -```java -public (HttpClient httpClient) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java) - -Line 67. - -*** - -### create - -#### Signature - -```java -public Map create(Map body) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java) - -Line 73. - -*** - -### delete - -#### Signature - -```java -public Map delete(String tokenId) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java) - -Line 81. - -*** - -### getBasePath - -#### Signature - -```java -public String getBasePath() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java) - -Line 71. - -*** - -### update - -#### Signature - -```java -public Map update(String tokenId, Map body) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java) - -Line 77. - -## Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java) - -Line 62. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/pub-sub-namespace/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/pub-sub-namespace/index.mdx deleted file mode 100644 index 44cc56e7f0..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/pub-sub-namespace/index.mdx +++ /dev/null @@ -1,98 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/pub-sub-namespace" -title: "PubSubNamespace" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.rest.namespaces.PubSubNamespace" - parent: "com.signalwire.sdk.rest.namespaces" - module: "com.signalwire.sdk.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/PubSubNamespace.java" - visibility: "public" ---- -# `PubSubNamespace` - -REST namespace for Pub/Sub resources. - -## Signature - -```java -public class PubSubNamespace -``` - -## Methods - -### \ - -#### Signature - -```java -public (HttpClient httpClient) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/PubSubNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/PubSubNamespace.java) - -Line 22. - -*** - -### channels - -#### Signature - -```java -public CrudResource channels() -``` - -#### Returns - -`CrudResource` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/PubSubNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/PubSubNamespace.java) - -Line 27. - -*** - -### publish - -Publish a message to a channel. - -#### Signature - -```java -public Map publish(String channel, Map body) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/PubSubNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/PubSubNamespace.java) - -Line 30. - -## Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/PubSubNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/PubSubNamespace.java) - -Line 17. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/queue-namespace/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/queue-namespace/index.mdx deleted file mode 100644 index a8c984b9d7..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/queue-namespace/index.mdx +++ /dev/null @@ -1,340 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/queue-namespace" -title: "QueueNamespace" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.rest.namespaces.QueueNamespace" - parent: "com.signalwire.sdk.rest.namespaces" - module: "com.signalwire.sdk.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java" - visibility: "public" ---- -# `QueueNamespace` - -Queues namespace — full CRUD with member operations. - -<p>Mirrors `signalwire.rest.namespaces.queues.QueuesResource`: queue -CRUD uses PUT for update; members are addressable both per-id and via the -special `/next` endpoint. - -## Signature - -```java -public class QueueNamespace -``` - -## Methods - -### \ - -#### Signature - -```java -public (HttpClient httpClient) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java) - -Line 25. - -*** - -### create - -#### Signature - -```java -public Map create(Map body) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java) - -Line 41. - -*** - -### delete - -#### Signature - -```java -public Map delete(String queueId) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java) - -Line 53. - -*** - -### get - -#### Signature - -```java -public Map get(String queueId) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java) - -Line 45. - -*** - -### getBasePath - -#### Signature - -```java -public String getBasePath() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java) - -Line 29. - -*** - -### getMember - -#### Signature - -```java -public Map getMember(String queueId, String memberId) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java) - -Line 71. - -*** - -### getNextMember - -#### Signature - -```java -public Map getNextMember(String queueId) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java) - -Line 67. - -*** - -### list - -#### Signature - - - - ```java - public Map list() - ``` - - - - ```java - public Map list(Map queryParams) - ``` - - - -#### Parameters (Overload 2) - - - -#### Returns (Overload 1) - -`Map` - -#### Returns (Overload 2) - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java) - -Line 33. - -*** - -### listMembers - -#### Signature - - - - ```java - public Map listMembers(String queueId) - ``` - - - - ```java - public Map listMembers( - String queueId, - Map queryParams - ) - ``` - - - -#### Parameters (Overload 1) - - - -#### Parameters (Overload 2) - - - - - -#### Returns (Overload 1) - -`Map` - -#### Returns (Overload 2) - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java) - -Line 59. - -*** - -### queues - - - **Deprecated.** direct calls on this namespace (`#list()`, `#get(String)` etc.) match Python parity. Prefer those. - - -Returns the legacy `com.signalwire.sdk.rest.CrudResource`-shaped -accessor so older callers like `client.queues().queues()` keep -compiling. - -The returned resource targets the same path as this -namespace (`/relay/rest/queues`). - -**Decorators:** `@Deprecated` - -#### Signature - -```java -public com.signalwire.sdk.rest.CrudResource queues() -``` - -#### Returns - -`com.signalwire.sdk.rest.CrudResource` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java) - -Line 84. - -*** - -### update - -#### Signature - -```java -public Map update(String queueId, Map body) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java) - -Line 49. - -## Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java) - -Line 20. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/recording-namespace/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/recording-namespace/index.mdx deleted file mode 100644 index 048fc5ee78..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/recording-namespace/index.mdx +++ /dev/null @@ -1,191 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/recording-namespace" -title: "RecordingNamespace" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.rest.namespaces.RecordingNamespace" - parent: "com.signalwire.sdk.rest.namespaces" - module: "com.signalwire.sdk.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RecordingNamespace.java" - visibility: "public" ---- -# `RecordingNamespace` - -Recordings namespace — list / get / delete (no create/update). - -<p>Mirrors `signalwire.rest.namespaces.recordings.RecordingsResource`. -Path: `/api/relay/rest/recordings`. - -## Signature - -```java -public class RecordingNamespace -``` - -## Methods - -### \ - -#### Signature - -```java -public (HttpClient httpClient) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/RecordingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RecordingNamespace.java) - -Line 24. - -*** - -### delete - -#### Signature - -```java -public Map delete(String recordingId) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/RecordingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RecordingNamespace.java) - -Line 42. - -*** - -### get - -#### Signature - -```java -public Map get(String recordingId) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/RecordingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RecordingNamespace.java) - -Line 38. - -*** - -### getBasePath - -#### Signature - -```java -public String getBasePath() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/RecordingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RecordingNamespace.java) - -Line 28. - -*** - -### list - -#### Signature - - - - ```java - public Map list() - ``` - - - - ```java - public Map list(Map queryParams) - ``` - - - -#### Parameters (Overload 2) - - - -#### Returns (Overload 1) - -`Map` - -#### Returns (Overload 2) - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/RecordingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RecordingNamespace.java) - -Line 30. - -*** - -### recordings - - - **Deprecated.** prefer the direct namespace methods which match Python. - - -Legacy CRUD-shaped accessor for backwards compat with the previous -Java surface (`client.recordings().recordings()`). - -Targets the -same path as this namespace. - -**Decorators:** `@Deprecated` - -#### Signature - -```java -public com.signalwire.sdk.rest.CrudResource recordings() -``` - -#### Returns - -`com.signalwire.sdk.rest.CrudResource` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/RecordingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RecordingNamespace.java) - -Line 53. - -## Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/RecordingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RecordingNamespace.java) - -Line 19. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/registry-namespace/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/registry-namespace/index.mdx deleted file mode 100644 index 42d76b2152..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/registry-namespace/index.mdx +++ /dev/null @@ -1,153 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/registry-namespace" -title: "RegistryNamespace" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.rest.namespaces.RegistryNamespace" - parent: "com.signalwire.sdk.rest.namespaces" - module: "com.signalwire.sdk.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java" - visibility: "public" ---- -# `RegistryNamespace` - -10DLC Campaign Registry namespace — brands, campaigns, orders, numbers. - -<p>Mirrors `signalwire.rest.namespaces.registry.RegistryNamespace`. -All endpoints sit under `/api/relay/rest/registry/beta`. - -## Signature - -```java -public class RegistryNamespace -``` - -## Classes - - - - 10DLC brand management — list / create / get plus brand-scoped campaign sub-resources. - - - - 10DLC campaign management — get / update (PUT) plus number / order sub-resources. - - - - 10DLC number-assignment management — release a number. - - - - 10DLC assignment-order management — read-only get. - - - -## Methods - -### \ - -#### Signature - -```java -public (HttpClient httpClient) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) - -Line 28. - -*** - -### brands - -#### Signature - -```java -public RegistryBrands brands() -``` - -#### Returns - -`RegistryBrands` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) - -Line 35. - -*** - -### campaigns - -#### Signature - -```java -public RegistryCampaigns campaigns() -``` - -#### Returns - -`RegistryCampaigns` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) - -Line 36. - -*** - -### numbers - -#### Signature - -```java -public RegistryNumbers numbers() -``` - -#### Returns - -`RegistryNumbers` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) - -Line 38. - -*** - -### orders - -#### Signature - -```java -public RegistryOrders orders() -``` - -#### Returns - -`RegistryOrders` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) - -Line 37. - -## Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) - -Line 19. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/registry-namespace/registry-brands/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/registry-namespace/registry-brands/index.mdx deleted file mode 100644 index fb430aea29..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/registry-namespace/registry-brands/index.mdx +++ /dev/null @@ -1,237 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/registry-namespace/registry-brands" -title: "RegistryBrands" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.rest.namespaces.RegistryNamespace.RegistryBrands" - parent: "com.signalwire.sdk.rest.namespaces.RegistryNamespace" - module: "com.signalwire.sdk.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java" - visibility: "public" ---- -# `RegistryBrands` - -10DLC brand management — list / create / get plus brand-scoped -campaign sub-resources. - -**Modifiers:** `static` - -## Signature - -```java -public static class RegistryBrands -``` - -## Methods - -### \ - -#### Signature - -```java -public (HttpClient httpClient, String basePath) -``` - -#### Parameters - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) - -Line 53. - -*** - -### create - -#### Signature - -```java -public Map create(Map body) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) - -Line 68. - -*** - -### createCampaign - -#### Signature - -```java -public Map createCampaign( - String brandId, - Map body -) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) - -Line 84. - -*** - -### get - -#### Signature - -```java -public Map get(String brandId) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) - -Line 72. - -*** - -### getBasePath - -#### Signature - -```java -public String getBasePath() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) - -Line 58. - -*** - -### list - -#### Signature - - - - ```java - public Map list() - ``` - - - - ```java - public Map list(Map queryParams) - ``` - - - -#### Parameters (Overload 2) - - - -#### Returns (Overload 1) - -`Map` - -#### Returns (Overload 2) - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) - -Line 60. - -*** - -### listCampaigns - -#### Signature - - - - ```java - public Map listCampaigns(String brandId) - ``` - - - - ```java - public Map listCampaigns( - String brandId, - Map queryParams - ) - ``` - - - -#### Parameters (Overload 1) - - - -#### Parameters (Overload 2) - - - - - -#### Returns (Overload 1) - -`Map` - -#### Returns (Overload 2) - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) - -Line 76. - -## Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) - -Line 48. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/registry-namespace/registry-campaigns/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/registry-namespace/registry-campaigns/index.mdx deleted file mode 100644 index a4850a2c43..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/registry-namespace/registry-campaigns/index.mdx +++ /dev/null @@ -1,248 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/registry-namespace/registry-campaigns" -title: "RegistryCampaigns" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.rest.namespaces.RegistryNamespace.RegistryCampaigns" - parent: "com.signalwire.sdk.rest.namespaces.RegistryNamespace" - module: "com.signalwire.sdk.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java" - visibility: "public" ---- -# `RegistryCampaigns` - -10DLC campaign management — get / update (PUT) plus number / order -sub-resources. - -**Modifiers:** `static` - -## Signature - -```java -public static class RegistryCampaigns -``` - -## Methods - -### \ - -#### Signature - -```java -public (HttpClient httpClient, String basePath) -``` - -#### Parameters - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) - -Line 98. - -*** - -### createOrder - -#### Signature - -```java -public Map createOrder( - String campaignId, - Map body -) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) - -Line 129. - -*** - -### get - -#### Signature - -```java -public Map get(String campaignId) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) - -Line 105. - -*** - -### getBasePath - -#### Signature - -```java -public String getBasePath() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) - -Line 103. - -*** - -### listNumbers - -#### Signature - - - - ```java - public Map listNumbers(String campaignId) - ``` - - - - ```java - public Map listNumbers( - String campaignId, - Map queryParams - ) - ``` - - - -#### Parameters (Overload 1) - - - -#### Parameters (Overload 2) - - - - - -#### Returns (Overload 1) - -`Map` - -#### Returns (Overload 2) - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) - -Line 113. - -*** - -### listOrders - -#### Signature - - - - ```java - public Map listOrders(String campaignId) - ``` - - - - ```java - public Map listOrders( - String campaignId, - Map queryParams - ) - ``` - - - -#### Parameters (Overload 1) - - - -#### Parameters (Overload 2) - - - - - -#### Returns (Overload 1) - -`Map` - -#### Returns (Overload 2) - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) - -Line 121. - -*** - -### update - -#### Signature - -```java -public Map update(String campaignId, Map body) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) - -Line 109. - -## Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) - -Line 93. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/registry-namespace/registry-numbers/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/registry-namespace/registry-numbers/index.mdx deleted file mode 100644 index ae1a398fd5..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/registry-namespace/registry-numbers/index.mdx +++ /dev/null @@ -1,98 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/registry-namespace/registry-numbers" -title: "RegistryNumbers" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.rest.namespaces.RegistryNamespace.RegistryNumbers" - parent: "com.signalwire.sdk.rest.namespaces.RegistryNamespace" - module: "com.signalwire.sdk.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java" - visibility: "public" ---- -# `RegistryNumbers` - -10DLC number-assignment management — release a number. - -**Modifiers:** `static` - -## Signature - -```java -public static class RegistryNumbers -``` - -## Methods - -### \ - -#### Signature - -```java -public (HttpClient httpClient, String basePath) -``` - -#### Parameters - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) - -Line 162. - -*** - -### delete - -#### Signature - -```java -public Map delete(String numberId) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) - -Line 169. - -*** - -### getBasePath - -#### Signature - -```java -public String getBasePath() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) - -Line 167. - -## Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) - -Line 157. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/registry-namespace/registry-orders/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/registry-namespace/registry-orders/index.mdx deleted file mode 100644 index 5ac265d9fd..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/registry-namespace/registry-orders/index.mdx +++ /dev/null @@ -1,98 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/registry-namespace/registry-orders" -title: "RegistryOrders" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.rest.namespaces.RegistryNamespace.RegistryOrders" - parent: "com.signalwire.sdk.rest.namespaces.RegistryNamespace" - module: "com.signalwire.sdk.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java" - visibility: "public" ---- -# `RegistryOrders` - -10DLC assignment-order management — read-only get. - -**Modifiers:** `static` - -## Signature - -```java -public static class RegistryOrders -``` - -## Methods - -### \ - -#### Signature - -```java -public (HttpClient httpClient, String basePath) -``` - -#### Parameters - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) - -Line 142. - -*** - -### get - -#### Signature - -```java -public Map get(String orderId) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) - -Line 149. - -*** - -### getBasePath - -#### Signature - -```java -public String getBasePath() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) - -Line 147. - -## Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) - -Line 137. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/short-codes-namespace/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/short-codes-namespace/index.mdx deleted file mode 100644 index 82e585f712..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/short-codes-namespace/index.mdx +++ /dev/null @@ -1,162 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/short-codes-namespace" -title: "ShortCodesNamespace" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.rest.namespaces.ShortCodesNamespace" - parent: "com.signalwire.sdk.rest.namespaces" - module: "com.signalwire.sdk.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ShortCodesNamespace.java" - visibility: "public" ---- -# `ShortCodesNamespace` - -Short Codes namespace — list / get / update (PUT). - -No create/delete. - -<p>Mirrors `signalwire.rest.namespaces.short_codes.ShortCodesResource`. - -## Signature - -```java -public class ShortCodesNamespace -``` - -## Methods - -### \ - -#### Signature - -```java -public (HttpClient httpClient) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/ShortCodesNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ShortCodesNamespace.java) - -Line 23. - -*** - -### get - -#### Signature - -```java -public Map get(String shortCodeId) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/ShortCodesNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ShortCodesNamespace.java) - -Line 37. - -*** - -### getBasePath - -#### Signature - -```java -public String getBasePath() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/ShortCodesNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ShortCodesNamespace.java) - -Line 27. - -*** - -### list - -#### Signature - - - - ```java - public Map list() - ``` - - - - ```java - public Map list(Map queryParams) - ``` - - - -#### Parameters (Overload 2) - - - -#### Returns (Overload 1) - -`Map` - -#### Returns (Overload 2) - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/ShortCodesNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ShortCodesNamespace.java) - -Line 29. - -*** - -### update - -#### Signature - -```java -public Map update(String shortCodeId, Map body) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/ShortCodesNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ShortCodesNamespace.java) - -Line 41. - -## Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/ShortCodesNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ShortCodesNamespace.java) - -Line 18. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/sip-namespace/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/sip-namespace/index.mdx deleted file mode 100644 index 0f3a246f85..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/sip-namespace/index.mdx +++ /dev/null @@ -1,90 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/sip-namespace" -title: "SipNamespace" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.rest.namespaces.SipNamespace" - parent: "com.signalwire.sdk.rest.namespaces" - module: "com.signalwire.sdk.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/SipNamespace.java" - visibility: "public" ---- -# `SipNamespace` - -REST namespace for SIP resources. - -## Signature - -```java -public class SipNamespace -``` - -## Methods - -### \ - -#### Signature - -```java -public (HttpClient httpClient) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/SipNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/SipNamespace.java) - -Line 20. - -*** - -### endpoints - -#### Signature - -```java -public CrudResource endpoints() -``` - -#### Returns - -`CrudResource` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/SipNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/SipNamespace.java) - -Line 25. - -*** - -### profiles - -#### Signature - -```java -public CrudResource profiles() -``` - -#### Returns - -`CrudResource` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/SipNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/SipNamespace.java) - -Line 26. - -## Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/SipNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/SipNamespace.java) - -Line 15. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/sip-profile-namespace/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/sip-profile-namespace/index.mdx deleted file mode 100644 index a57251557b..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/sip-profile-namespace/index.mdx +++ /dev/null @@ -1,117 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/sip-profile-namespace" -title: "SipProfileNamespace" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.rest.namespaces.SipProfileNamespace" - parent: "com.signalwire.sdk.rest.namespaces" - module: "com.signalwire.sdk.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/SipProfileNamespace.java" - visibility: "public" ---- -# `SipProfileNamespace` - -SIP Profile namespace — get / update (PUT) the project's singleton SIP -profile. - -<p>Mirrors `signalwire.rest.namespaces.sip_profile.SipProfileResource`. - -## Signature - -```java -public class SipProfileNamespace -``` - -## Methods - -### \ - -#### Signature - -```java -public (HttpClient httpClient) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/SipProfileNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/SipProfileNamespace.java) - -Line 24. - -*** - -### get - -#### Signature - -```java -public Map get() -``` - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/SipProfileNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/SipProfileNamespace.java) - -Line 30. - -*** - -### getBasePath - -#### Signature - -```java -public String getBasePath() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/SipProfileNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/SipProfileNamespace.java) - -Line 28. - -*** - -### update - -#### Signature - -```java -public Map update(Map body) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/SipProfileNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/SipProfileNamespace.java) - -Line 34. - -## Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/SipProfileNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/SipProfileNamespace.java) - -Line 19. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/stream-namespace/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/stream-namespace/index.mdx deleted file mode 100644 index ef60d486b7..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/stream-namespace/index.mdx +++ /dev/null @@ -1,70 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/stream-namespace" -title: "StreamNamespace" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.rest.namespaces.StreamNamespace" - parent: "com.signalwire.sdk.rest.namespaces" - module: "com.signalwire.sdk.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/StreamNamespace.java" - visibility: "public" ---- -# `StreamNamespace` - -REST namespace for audio stream resources. - -## Signature - -```java -public class StreamNamespace -``` - -## Methods - -### \ - -#### Signature - -```java -public (HttpClient httpClient) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/StreamNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/StreamNamespace.java) - -Line 19. - -*** - -### streams - -#### Signature - -```java -public CrudResource streams() -``` - -#### Returns - -`CrudResource` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/StreamNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/StreamNamespace.java) - -Line 23. - -## Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/StreamNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/StreamNamespace.java) - -Line 15. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/swml-namespace/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/swml-namespace/index.mdx deleted file mode 100644 index b8fb183a76..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/swml-namespace/index.mdx +++ /dev/null @@ -1,70 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/swml-namespace" -title: "SwmlNamespace" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.rest.namespaces.SwmlNamespace" - parent: "com.signalwire.sdk.rest.namespaces" - module: "com.signalwire.sdk.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/SwmlNamespace.java" - visibility: "public" ---- -# `SwmlNamespace` - -REST namespace for SWML script resources. - -## Signature - -```java -public class SwmlNamespace -``` - -## Methods - -### \ - -#### Signature - -```java -public (HttpClient httpClient) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/SwmlNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/SwmlNamespace.java) - -Line 19. - -*** - -### scripts - -#### Signature - -```java -public CrudResource scripts() -``` - -#### Returns - -`CrudResource` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/SwmlNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/SwmlNamespace.java) - -Line 23. - -## Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/SwmlNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/SwmlNamespace.java) - -Line 15. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/transcription-namespace/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/transcription-namespace/index.mdx deleted file mode 100644 index 517f38fd38..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/transcription-namespace/index.mdx +++ /dev/null @@ -1,70 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/transcription-namespace" -title: "TranscriptionNamespace" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.rest.namespaces.TranscriptionNamespace" - parent: "com.signalwire.sdk.rest.namespaces" - module: "com.signalwire.sdk.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/TranscriptionNamespace.java" - visibility: "public" ---- -# `TranscriptionNamespace` - -REST namespace for transcription resources. - -## Signature - -```java -public class TranscriptionNamespace -``` - -## Methods - -### \ - -#### Signature - -```java -public (HttpClient httpClient) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/TranscriptionNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/TranscriptionNamespace.java) - -Line 19. - -*** - -### transcriptions - -#### Signature - -```java -public CrudResource transcriptions() -``` - -#### Returns - -`CrudResource` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/TranscriptionNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/TranscriptionNamespace.java) - -Line 23. - -## Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/TranscriptionNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/TranscriptionNamespace.java) - -Line 15. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/video-namespace/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/video-namespace/index.mdx deleted file mode 100644 index b243fb6a64..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/video-namespace/index.mdx +++ /dev/null @@ -1,251 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/video-namespace" -title: "VideoNamespace" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.rest.namespaces.VideoNamespace" - parent: "com.signalwire.sdk.rest.namespaces" - module: "com.signalwire.sdk.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java" - visibility: "public" ---- -# `VideoNamespace` - -REST namespace for the Video API: rooms, room sessions/recordings, -conferences, conference tokens, and individual streams. - -<p>Mirrors `signalwire.rest.namespaces.video.VideoNamespace`. - -The -stream sub-resources hang off rooms and conferences; the top-level -`streams` resource exists for CRUD on individual streams keyed by -stream id. - -## Signature - -```java -public class VideoNamespace -``` - -## Classes - - - - Video conferences with token + stream sub-collections. - - - - Video conference tokens (top-level): get + reset. - - - - Top-level video room recordings collection: list, get, delete, plus a per-recording events sub-collection. - - - - Video room management with stream sub-resources. - - - - Video room sessions: list, get, plus events / members / recordings sub-collections. - - - - Top-level streams resource (per stream id): get / update (PUT) / delete. - - - -## Methods - -### \ - -#### Signature - -```java -public (HttpClient httpClient) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) - -Line 33. - -*** - -### conferences - -#### Signature - -```java -public VideoConferences conferences() -``` - -#### Returns - -`VideoConferences` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) - -Line 48. - -*** - -### conferenceTokens - -#### Signature - -```java -public VideoConferenceTokens conferenceTokens() -``` - -#### Returns - -`VideoConferenceTokens` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) - -Line 49. - -*** - -### recordings - -Legacy alias for `#roomRecordings()`; previous releases of the -Java port exposed video.recordings(). - -Kept for backwards compatibility. - -#### Signature - -```java -public VideoRoomRecordings recordings() -``` - -#### Returns - -`VideoRoomRecordings` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) - -Line 56. - -*** - -### roomRecordings - -#### Signature - -```java -public VideoRoomRecordings roomRecordings() -``` - -#### Returns - -`VideoRoomRecordings` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) - -Line 47. - -*** - -### rooms - -#### Signature - -```java -public VideoRooms rooms() -``` - -#### Returns - -`VideoRooms` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) - -Line 44. - -*** - -### roomSessions - -#### Signature - -```java -public VideoRoomSessions roomSessions() -``` - -#### Returns - -`VideoRoomSessions` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) - -Line 46. - -*** - -### roomTokens - -#### Signature - -```java -public CrudResource roomTokens() -``` - -#### Returns - -`CrudResource` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) - -Line 45. - -*** - -### streams - -#### Signature - -```java -public VideoStreams streams() -``` - -#### Returns - -`VideoStreams` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) - -Line 50. - -## Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) - -Line 23. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/video-namespace/video-conference-tokens/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/video-namespace/video-conference-tokens/index.mdx deleted file mode 100644 index 9bec37810d..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/video-namespace/video-conference-tokens/index.mdx +++ /dev/null @@ -1,122 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/video-namespace/video-conference-tokens" -title: "VideoConferenceTokens" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.rest.namespaces.VideoNamespace.VideoConferenceTokens" - parent: "com.signalwire.sdk.rest.namespaces.VideoNamespace" - module: "com.signalwire.sdk.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java" - visibility: "public" ---- -# `VideoConferenceTokens` - -Video conference tokens (top-level): get + reset. - -**Modifiers:** `static` - -## Signature - -```java -public static class VideoConferenceTokens -``` - -## Methods - -### \ - -#### Signature - -```java -public (HttpClient httpClient, String basePath) -``` - -#### Parameters - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) - -Line 231. - -*** - -### get - -#### Signature - -```java -public Map get(String tokenId) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) - -Line 238. - -*** - -### getBasePath - -#### Signature - -```java -public String getBasePath() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) - -Line 236. - -*** - -### reset - -#### Signature - -```java -public Map reset(String tokenId) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) - -Line 242. - -## Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) - -Line 226. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/video-namespace/video-conferences/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/video-namespace/video-conferences/index.mdx deleted file mode 100644 index 276f20cf21..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/video-namespace/video-conferences/index.mdx +++ /dev/null @@ -1,211 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/video-namespace/video-conferences" -title: "VideoConferences" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.rest.namespaces.VideoNamespace.VideoConferences" - parent: "com.signalwire.sdk.rest.namespaces.VideoNamespace" - module: "com.signalwire.sdk.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java" - visibility: "public" ---- -# `VideoConferences` - -Video conferences with token + stream sub-collections. - -Update uses PUT. - -**Modifiers:** `static` - -## Signature - -```java -public static class VideoConferences extends CrudResource -``` - -## Inheritance - -**Extends:** [CrudResource](/docs/sdk-reference/reference/java/com/signalwire/sdk/rest/rest/crud-resource) - -## Methods - -### \ - -#### Signature - -```java -public (HttpClient httpClient, String basePath) -``` - -#### Parameters - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) - -Line 188. - -*** - -### createStream - -#### Signature - -```java -public Map createStream( - String conferenceId, - Map body -) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) - -Line 218. - -*** - -### listConferenceTokens - -#### Signature - - - - ```java - public Map listConferenceTokens(String conferenceId) - ``` - - - - ```java - public Map listConferenceTokens( - String conferenceId, - Map queryParams - ) - ``` - - - -#### Parameters (Overload 1) - - - -#### Parameters (Overload 2) - - - - - -#### Returns (Overload 1) - -`Map` - -#### Returns (Overload 2) - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) - -Line 197. - -*** - -### listStreams - -#### Signature - - - - ```java - public Map listStreams(String conferenceId) - ``` - - - - ```java - public Map listStreams( - String conferenceId, - Map queryParams - ) - ``` - - - -#### Parameters (Overload 1) - - - -#### Parameters (Overload 2) - - - - - -#### Returns (Overload 1) - -`Map` - -#### Returns (Overload 2) - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) - -Line 208. - -*** - -### update - -**Decorators:** `@Override` - -#### Signature - -```java -public Map update(String conferenceId, Map body) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) - -Line 192. - -## Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) - -Line 186. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/video-namespace/video-room-recordings/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/video-namespace/video-room-recordings/index.mdx deleted file mode 100644 index 15c6c8e37e..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/video-namespace/video-room-recordings/index.mdx +++ /dev/null @@ -1,208 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/video-namespace/video-room-recordings" -title: "VideoRoomRecordings" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.rest.namespaces.VideoNamespace.VideoRoomRecordings" - parent: "com.signalwire.sdk.rest.namespaces.VideoNamespace" - module: "com.signalwire.sdk.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java" - visibility: "public" ---- -# `VideoRoomRecordings` - -Top-level video room recordings collection: list, get, delete, plus -a per-recording events sub-collection. - -**Modifiers:** `static` - -## Signature - -```java -public static class VideoRoomRecordings -``` - -## Methods - -### \ - -#### Signature - -```java -public (HttpClient httpClient, String basePath) -``` - -#### Parameters - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) - -Line 151. - -*** - -### delete - -#### Signature - -```java -public Map delete(String recordingId) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) - -Line 170. - -*** - -### get - -#### Signature - -```java -public Map get(String recordingId) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) - -Line 166. - -*** - -### getBasePath - -#### Signature - -```java -public String getBasePath() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) - -Line 156. - -*** - -### list - -#### Signature - - - - ```java - public Map list() - ``` - - - - ```java - public Map list(Map queryParams) - ``` - - - -#### Parameters (Overload 2) - - - -#### Returns (Overload 1) - -`Map` - -#### Returns (Overload 2) - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) - -Line 158. - -*** - -### listEvents - -#### Signature - - - - ```java - public Map listEvents(String recordingId) - ``` - - - - ```java - public Map listEvents( - String recordingId, - Map queryParams - ) - ``` - - - -#### Parameters (Overload 1) - - - -#### Parameters (Overload 2) - - - - - -#### Returns (Overload 1) - -`Map` - -#### Returns (Overload 2) - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) - -Line 174. - -## Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) - -Line 146. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/video-namespace/video-room-sessions/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/video-namespace/video-room-sessions/index.mdx deleted file mode 100644 index a3d33df3c1..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/video-namespace/video-room-sessions/index.mdx +++ /dev/null @@ -1,278 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/video-namespace/video-room-sessions" -title: "VideoRoomSessions" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.rest.namespaces.VideoNamespace.VideoRoomSessions" - parent: "com.signalwire.sdk.rest.namespaces.VideoNamespace" - module: "com.signalwire.sdk.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java" - visibility: "public" ---- -# `VideoRoomSessions` - -Video room sessions: list, get, plus events / members / recordings -sub-collections. - -**Modifiers:** `static` - -## Signature - -```java -public static class VideoRoomSessions -``` - -## Methods - -### \ - -#### Signature - -```java -public (HttpClient httpClient, String basePath) -``` - -#### Parameters - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) - -Line 98. - -*** - -### get - -#### Signature - -```java -public Map get(String sessionId) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) - -Line 113. - -*** - -### getBasePath - -#### Signature - -```java -public String getBasePath() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) - -Line 103. - -*** - -### list - -#### Signature - - - - ```java - public Map list() - ``` - - - - ```java - public Map list(Map queryParams) - ``` - - - -#### Parameters (Overload 2) - - - -#### Returns (Overload 1) - -`Map` - -#### Returns (Overload 2) - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) - -Line 105. - -*** - -### listEvents - -#### Signature - - - - ```java - public Map listEvents(String sessionId) - ``` - - - - ```java - public Map listEvents( - String sessionId, - Map queryParams - ) - ``` - - - -#### Parameters (Overload 1) - - - -#### Parameters (Overload 2) - - - - - -#### Returns (Overload 1) - -`Map` - -#### Returns (Overload 2) - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) - -Line 117. - -*** - -### listMembers - -#### Signature - - - - ```java - public Map listMembers(String sessionId) - ``` - - - - ```java - public Map listMembers( - String sessionId, - Map queryParams - ) - ``` - - - -#### Parameters (Overload 1) - - - -#### Parameters (Overload 2) - - - - - -#### Returns (Overload 1) - -`Map` - -#### Returns (Overload 2) - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) - -Line 125. - -*** - -### listRecordings - -#### Signature - - - - ```java - public Map listRecordings(String sessionId) - ``` - - - - ```java - public Map listRecordings( - String sessionId, - Map queryParams - ) - ``` - - - -#### Parameters (Overload 1) - - - -#### Parameters (Overload 2) - - - - - -#### Returns (Overload 1) - -`Map` - -#### Returns (Overload 2) - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) - -Line 133. - -## Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) - -Line 93. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/video-namespace/video-rooms/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/video-namespace/video-rooms/index.mdx deleted file mode 100644 index d11d85a0bd..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/video-namespace/video-rooms/index.mdx +++ /dev/null @@ -1,161 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/video-namespace/video-rooms" -title: "VideoRooms" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.rest.namespaces.VideoNamespace.VideoRooms" - parent: "com.signalwire.sdk.rest.namespaces.VideoNamespace" - module: "com.signalwire.sdk.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java" - visibility: "public" ---- -# `VideoRooms` - -Video room management with stream sub-resources. - -Update uses PUT. - -**Modifiers:** `static` - -## Signature - -```java -public static class VideoRooms extends CrudResource -``` - -## Inheritance - -**Extends:** [CrudResource](/docs/sdk-reference/reference/java/com/signalwire/sdk/rest/rest/crud-resource) - -## Methods - -### \ - -#### Signature - -```java -public (HttpClient httpClient, String basePath) -``` - -#### Parameters - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) - -Line 67. - -*** - -### createStream - -#### Signature - -```java -public Map createStream(String roomId, Map body) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) - -Line 84. - -*** - -### listStreams - -#### Signature - - - - ```java - public Map listStreams(String roomId) - ``` - - - - ```java - public Map listStreams( - String roomId, - Map queryParams - ) - ``` - - - -#### Parameters (Overload 1) - - - -#### Parameters (Overload 2) - - - - - -#### Returns (Overload 1) - -`Map` - -#### Returns (Overload 2) - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) - -Line 76. - -*** - -### update - -**Decorators:** `@Override` - -#### Signature - -```java -public Map update(String roomId, Map body) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) - -Line 71. - -## Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) - -Line 65. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/video-namespace/video-streams/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/video-namespace/video-streams/index.mdx deleted file mode 100644 index 7b04b0e2b6..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/namespaces/namespaces/video-namespace/video-streams/index.mdx +++ /dev/null @@ -1,148 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/namespaces/namespaces/video-namespace/video-streams" -title: "VideoStreams" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.rest.namespaces.VideoNamespace.VideoStreams" - parent: "com.signalwire.sdk.rest.namespaces.VideoNamespace" - module: "com.signalwire.sdk.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java" - visibility: "public" ---- -# `VideoStreams` - -Top-level streams resource (per stream id): get / update (PUT) / delete. - -**Modifiers:** `static` - -## Signature - -```java -public static class VideoStreams -``` - -## Methods - -### \ - -#### Signature - -```java -public (HttpClient httpClient, String basePath) -``` - -#### Parameters - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) - -Line 255. - -*** - -### delete - -#### Signature - -```java -public Map delete(String streamId) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) - -Line 270. - -*** - -### get - -#### Signature - -```java -public Map get(String streamId) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) - -Line 262. - -*** - -### getBasePath - -#### Signature - -```java -public String getBasePath() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) - -Line 260. - -*** - -### update - -#### Signature - -```java -public Map update(String streamId, Map body) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) - -Line 266. - -## Source - -[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) - -Line 250. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/rest/crud-resource/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/rest/crud-resource/index.mdx deleted file mode 100644 index 9df7e9093f..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/rest/crud-resource/index.mdx +++ /dev/null @@ -1,259 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/rest/crud-resource" -title: "CrudResource" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.rest.CrudResource" - parent: "com.signalwire.sdk.rest" - module: "com.signalwire.sdk.rest" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/CrudResource.java" - visibility: "public" ---- -# `CrudResource` - -Generic CRUD resource for REST API namespaces. - -<p> -Provides standard list, get, create, update, and delete operations -against a base path. - -Used by namespace classes to avoid repetitive -HTTP boilerplate. - -<pre>numbers = new CrudResource(httpClient, "/phone_numbers"); -var all = numbers.list(); -var one = numbers.get("pn-abc-123");</pre> - -## Signature - -```java -public class CrudResource -``` - -## Methods - -### \ - -Create a CRUD resource. - -#### Signature - -```java -public (HttpClient httpClient, String basePath) -``` - -#### Parameters - - - the HTTP client - - - - base path for this resource (e.g., "/phone\_numbers") - - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/CrudResource.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/CrudResource.java) - -Line 35. - -*** - -### create - -Create a new resource. - -#### Signature - -```java -public Map create(Map body) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/CrudResource.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/CrudResource.java) - -Line 64. - -*** - -### delete - -Delete a resource by ID. - -#### Signature - -```java -public Map delete(String id) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/CrudResource.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/CrudResource.java) - -Line 78. - -*** - -### get - -Get a single resource by ID. - -#### Signature - -```java -public Map get(String id) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/CrudResource.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/CrudResource.java) - -Line 57. - -*** - -### getBasePath - -Get the base path for this resource. - -#### Signature - -```java -public String getBasePath() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/CrudResource.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/CrudResource.java) - -Line 85. - -*** - -### getHttpClient - -Get the underlying HTTP client. - -#### Signature - -```java -public HttpClient getHttpClient() -``` - -#### Returns - -`HttpClient` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/CrudResource.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/CrudResource.java) - -Line 92. - -*** - -### list - -List all resources. - -#### Signature - - - - ```java - public Map list() - ``` - - - - ```java - public Map list(Map queryParams) - ``` - - - -#### Parameters (Overload 2) - - - -#### Returns (Overload 1) - -`Map` - -#### Returns (Overload 2) - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/CrudResource.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/CrudResource.java) - -Line 43. - -*** - -### update - -Update an existing resource by ID. - -#### Signature - -```java -public Map update(String id, Map body) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/CrudResource.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/CrudResource.java) - -Line 71. - -## Source - -[`src/main/java/com/signalwire/sdk/rest/CrudResource.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/CrudResource.java) - -Line 24. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/rest/http-client/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/rest/http-client/index.mdx deleted file mode 100644 index 30d7bbef1d..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/rest/http-client/index.mdx +++ /dev/null @@ -1,317 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/rest/http-client" -title: "HttpClient" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.rest.HttpClient" - parent: "com.signalwire.sdk.rest" - module: "com.signalwire.sdk.rest" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/HttpClient.java" - visibility: "public" ---- -# `HttpClient` - -HTTP client for the SignalWire REST API. - -<p> -Uses `java.net.http.HttpClient` (JDK 11+ built-in) with Basic Auth -and JSON content types. - -Provides low-level GET, POST, PUT, DELETE methods -used by `CrudResource` and namespace classes. - -## Signature - -```java -public class HttpClient -``` - -## Methods - -### \ - -Create an HTTP client. - -#### Signature - - - - ```java - public (String space, String project, String token) - ``` - - - - ```java - private (String baseUrl, String project, String token, Void marker) - ``` - - - -#### Parameters (Overload 1) - - - SignalWire space (e.g., "example.signalwire.com") - - - - project ID used as Basic Auth username - - - - API token used as Basic Auth password - - -#### Parameters (Overload 2) - - - - - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/HttpClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/HttpClient.java) - -Line 46. - -*** - -### delete - -DELETE request. - -#### Signature - -```java -public Map delete(String path) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/HttpClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/HttpClient.java) - -Line 146. - -*** - -### get - -GET request, returns parsed JSON as a Map. - -#### Signature - - - - ```java - public Map get(String path) - ``` - - - - ```java - public Map get(String path, Map queryParams) - ``` - - - -#### Parameters (Overload 1) - - - -#### Parameters (Overload 2) - - - - - -#### Returns (Overload 1) - -`Map` - -#### Returns (Overload 2) - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/HttpClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/HttpClient.java) - -Line 88. - -*** - -### getBaseUrl - -Get the base URL. - -#### Signature - -```java -public String getBaseUrl() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/HttpClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/HttpClient.java) - -Line 157. - -*** - -### patch - -PATCH request with JSON body. - -java.net.http.HttpRequest doesn't have a -dedicated builder for PATCH, so use ...). - -#### Signature - -```java -public Map patch(String path, Map body) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/HttpClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/HttpClient.java) - -Line 133. - -*** - -### post - -POST request with JSON body. - -#### Signature - -```java -public Map post(String path, Map body) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/HttpClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/HttpClient.java) - -Line 106. - -*** - -### put - -PUT request with JSON body. - -#### Signature - -```java -public Map put(String path, Map body) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/HttpClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/HttpClient.java) - -Line 119. - -*** - -### withBaseUrl - -Create an HTTP client with an explicit base URL (e.g., plain HTTP for -local integration tests, or to point a `RestClient` at an audit -fixture). - -Production callers use the project, token) -constructor instead. - -**Modifiers:** `static` - -#### Signature - -```java -public static HttpClient withBaseUrl( - String baseUrl, - String project, - String token -) -``` - -#### Parameters - - - fully qualified base URL ending in `/api` - - - - project ID used as Basic Auth username - - - - API token used as Basic Auth password - - -#### Returns - -`HttpClient` — a configured HTTP client - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/HttpClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/HttpClient.java) - -Line 68. - -## Source - -[`src/main/java/com/signalwire/sdk/rest/HttpClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/HttpClient.java) - -Line 29. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/rest/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/rest/index.mdx deleted file mode 100644 index c8f0ddf0a8..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/rest/index.mdx +++ /dev/null @@ -1,210 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/rest" -title: "rest" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "module" - language: "java" - qualified_name: "com.signalwire.sdk.rest" - module: "com.signalwire.sdk.rest" ---- -# `rest` - -## Signature - -```java -package com.signalwire.sdk.rest -``` - -## Classes - - - - Generic CRUD resource for REST API namespaces. <p> Provides standard list, get, create, update, and delete operations against a base path. - - - - HTTP client for the SignalWire REST API. <p> Uses `java.net.http.HttpClient` (JDK 11+ built-in) with Basic Auth and JSON content types. - - - - Iterator that walks paged REST responses by following the `links.next` cursor. <p>Mirrors `signalwire.rest._pagination.PaginatedIterator`: the constructor records the `http` client, path, query params, and the data-list key without performing an HTTP fetch. - - - - SignalWire REST API client with all 21 namespaces. <p> Uses `java.net.http.HttpClient` with Basic Auth. - - - - Exception for SignalWire REST API errors. <p> Contains the HTTP status code and error message from the server. - - - -## Enums - -### PhoneCallHandler - -Values accepted for `call_handler` on -java.util.Map) phoneNumbers().update. - -<p> -Named `PhoneCallHandler` (not `CallHandler`) to avoid colliding -with the RELAY client's inbound-call-handler callback type. -<p> -Setting a phone number's `call_handler` + the handler-specific -companion field routes inbound calls and auto-materializes the matching -Fabric resource on the server. - -See the typed helpers on -`com.signalwire.sdk.rest.namespaces.PhoneNumbersNamespace` -(`setSwmlWebhook`, `setCxmlWebhook`, ...). - -<p>Binding table: -<pre> -Enum member Companion field (required) Auto-creates resource ------------------ -------------------------------- --------------------- -RELAY_SCRIPT call_relay_script_url swml_webhook -LAML_WEBHOOKS call_request_url cxml_webhook -LAML_APPLICATION call_laml_application_id cxml_application -AI_AGENT call_ai_agent_id ai_agent -CALL_FLOW call_flow_id call_flow -RELAY_APPLICATION call_relay_application relay_application -RELAY_TOPIC call_relay_topic (routes via RELAY) -RELAY_CONTEXT call_relay_context (legacy, prefer topic) -RELAY_CONNECTOR (connector config) (internal) -VIDEO_ROOM call_video_room_id (routes to Video API) -DIALOGFLOW call_dialogflow_agent_id (none) -</pre> - -<p>Note: `#LAML_WEBHOOKS` (wire value `laml_webhooks`) produces -a <b>cXML</b> handler, not a generic webhook. For SWML, use -`#RELAY_SCRIPT`. - -#### Signature - -```java -public enum PhoneCallHandler -``` - -#### Variants - - - - - - - - - - - - - - - - - - - - - - - -#### Methods - -##### toString - -Returns the wire value so this enum serializes transparently into -request bodies without an explicit `.wireValue()` indirection. - -**Decorators:** `@Override` - -###### Signature - -```java -public String toString() -``` - -###### Returns - -`String` - -###### Source - -[`src/main/java/com/signalwire/sdk/rest/PhoneCallHandler.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/PhoneCallHandler.java) - -Line 74. - -*** - -##### valueOf - -**Modifiers:** `static` - -###### Signature - -```java -public static PhoneCallHandler valueOf(String name) -``` - -###### Parameters - - - -###### Returns - -`PhoneCallHandler` - -###### Source - -[`src/main/java/com/signalwire/sdk/rest/PhoneCallHandler.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/PhoneCallHandler.java) - -*** - -##### values - -**Modifiers:** `static` - -###### Signature - -```java -public static PhoneCallHandler[] values() -``` - -###### Returns - -`PhoneCallHandler[]` - -###### Source - -[`src/main/java/com/signalwire/sdk/rest/PhoneCallHandler.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/PhoneCallHandler.java) - -*** - -##### wireValue - -The wire value sent on the `call_handler` field. - -###### Signature - -```java -public String wireValue() -``` - -###### Returns - -`String` - -###### Source - -[`src/main/java/com/signalwire/sdk/rest/PhoneCallHandler.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/PhoneCallHandler.java) - -Line 66. - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/PhoneCallHandler.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/PhoneCallHandler.java) - -Line 43. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/rest/paginated-iterator/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/rest/paginated-iterator/index.mdx deleted file mode 100644 index 4401014da7..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/rest/paginated-iterator/index.mdx +++ /dev/null @@ -1,176 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/rest/paginated-iterator" -title: "PaginatedIterator" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.rest.PaginatedIterator" - parent: "com.signalwire.sdk.rest" - module: "com.signalwire.sdk.rest" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/PaginatedIterator.java" - visibility: "public" ---- -# `PaginatedIterator` - -Iterator that walks paged REST responses by following the -`links.next` cursor. - -<p>Mirrors `signalwire.rest._pagination.PaginatedIterator`: the -constructor records the `http` client, path, query params, and the -data-list key without performing an HTTP fetch. - -Each call to -`#next()` returns the next item from the buffered page; when the -buffer is exhausted the iterator follows `links.next`, parses the -URL query into the next request's params, and fetches the next page. - -<p>Iteration terminates when the buffer is empty and a fetched response -either lacks a `links.next` cursor or returns an empty data list. - -**Modifiers:** `final` - -## Signature - -```java -public final class PaginatedIterator implements Iterator>, Iterable> -``` - -## Inheritance - -**Implements:** `Iterator>`, `Iterable>` - -## Methods - -### \ - -#### Signature - - - - ```java - public (HttpClient http, String path) - ``` - - - - ```java - public (HttpClient http, String path, Map params) - ``` - - - - ```java - public ( - HttpClient http, - String path, - Map params, - String dataKey - ) - ``` - - - -#### Parameters (Overload 1) - - - - - -#### Parameters (Overload 2) - - - - - - - -#### Parameters (Overload 3) - - - - - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/PaginatedIterator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/PaginatedIterator.java) - -Line 46. - -*** - -### hasNext - -**Decorators:** `@Override` - -#### Signature - -```java -public boolean hasNext() -``` - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/PaginatedIterator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/PaginatedIterator.java) - -Line 67. - -*** - -### iterator - -**Decorators:** `@Override` - -#### Signature - -```java -public PaginatedIterator iterator() -``` - -#### Returns - -`PaginatedIterator` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/PaginatedIterator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/PaginatedIterator.java) - -Line 62. - -*** - -### next - -**Decorators:** `@Override` - -#### Signature - -```java -public Map next() -``` - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/PaginatedIterator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/PaginatedIterator.java) - -Line 78. - -## Source - -[`src/main/java/com/signalwire/sdk/rest/PaginatedIterator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/PaginatedIterator.java) - -Line 34. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/rest/rest-client/builder/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/rest/rest-client/builder/index.mdx deleted file mode 100644 index 6d2d6929a2..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/rest/rest-client/builder/index.mdx +++ /dev/null @@ -1,136 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/rest/rest-client/builder" -title: "Builder" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.rest.RestClient.Builder" - parent: "com.signalwire.sdk.rest.RestClient" - module: "com.signalwire.sdk.rest" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java" - visibility: "public" ---- -# `Builder` - -**Modifiers:** `static` - -## Signature - -```java -public static class Builder -``` - -## Methods - -### \ - -#### Signature - -```java -public () -``` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) - -*** - -### build - -#### Signature - -```java -public RestClient build() -``` - -#### Returns - -`RestClient` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) - -Line 126. - -*** - -### project - -#### Signature - -```java -public Builder project(String project) -``` - -#### Parameters - - - -#### Returns - -`Builder` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) - -Line 116. - -*** - -### space - -#### Signature - -```java -public Builder space(String space) -``` - -#### Parameters - - - -#### Returns - -`Builder` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) - -Line 118. - -*** - -### token - -#### Signature - -```java -public Builder token(String token) -``` - -#### Parameters - - - -#### Returns - -`Builder` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) - -Line 117. - -## Source - -[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) - -Line 110. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/rest/rest-client/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/rest/rest-client/index.mdx deleted file mode 100644 index eea0171af0..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/rest/rest-client/index.mdx +++ /dev/null @@ -1,781 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/rest/rest-client" -title: "RestClient" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.rest.RestClient" - parent: "com.signalwire.sdk.rest" - module: "com.signalwire.sdk.rest" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java" - visibility: "public" ---- -# `RestClient` - -SignalWire REST API client with all 21 namespaces. - -<p> -Uses `java.net.http.HttpClient` with Basic Auth. - -Each namespace -provides typed access to a group of API resources. - -<pre>client = RestClient.builder() - .project("project-id") - .token("api-token") - .space("example.signalwire.com") - .build(); - -var numbers = client.phoneNumbers().list(); -var docs = client.datasphere().documents().list();</pre> - -## Signature - -```java -public class RestClient -``` - -## Classes - - - - - -## Methods - -### addresses - -#### Signature - -```java -public AddressesNamespace addresses() -``` - -#### Returns - -`AddressesNamespace` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) - -Line 254. - -*** - -### billing - -#### Signature - -```java -public BillingNamespace billing() -``` - -#### Returns - -`BillingNamespace` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) - -Line 212. - -*** - -### builder - -**Modifiers:** `static` - -#### Signature - -```java -public static Builder builder() -``` - -#### Returns - -`Builder` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) - -Line 106. - -*** - -### calling - -#### Signature - -```java -public CallingNamespace calling() -``` - -#### Returns - -`CallingNamespace` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) - -Line 147. - -*** - -### campaign - -#### Signature - -```java -public CampaignNamespace campaign() -``` - -#### Returns - -`CampaignNamespace` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) - -Line 202. - -*** - -### chat - -#### Signature - -```java -public ChatNamespace chat() -``` - -#### Returns - -`ChatNamespace` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) - -Line 187. - -*** - -### compat - -#### Signature - -```java -public CompatNamespace compat() -``` - -#### Returns - -`CompatNamespace` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) - -Line 167. - -*** - -### compliance - -#### Signature - -```java -public ComplianceNamespace compliance() -``` - -#### Returns - -`ComplianceNamespace` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) - -Line 207. - -*** - -### conferences - -#### Signature - -```java -public ConferenceNamespace conferences() -``` - -#### Returns - -`ConferenceNamespace` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) - -Line 232. - -*** - -### datasphere - -#### Signature - -```java -public DatasphereNamespace datasphere() -``` - -#### Returns - -`DatasphereNamespace` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) - -Line 157. - -*** - -### fabric - -#### Signature - -```java -public FabricNamespace fabric() -``` - -#### Returns - -`FabricNamespace` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) - -Line 142. - -*** - -### fax - -#### Signature - -```java -public FaxNamespace fax() -``` - -#### Returns - -`FaxNamespace` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) - -Line 182. - -*** - -### getHttpClient - -#### Signature - -```java -public HttpClient getHttpClient() -``` - -#### Returns - -`HttpClient` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) - -Line 138. - -*** - -### getProject - -#### Signature - -```java -public String getProject() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) - -Line 136. - -*** - -### getSpace - -#### Signature - -```java -public String getSpace() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) - -Line 137. - -*** - -### importedNumbers - -#### Signature - -```java -public ImportedNumbersNamespace importedNumbers() -``` - -#### Returns - -`ImportedNumbersNamespace` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) - -Line 264. - -*** - -### logs - -#### Signature - -```java -public LogsNamespace logs() -``` - -#### Returns - -`LogsNamespace` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) - -Line 289. - -*** - -### messaging - -#### Signature - -```java -public MessagingNamespace messaging() -``` - -#### Returns - -`MessagingNamespace` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) - -Line 172. - -*** - -### mfa - -#### Signature - -```java -public MfaNamespace mfa() -``` - -#### Returns - -`MfaNamespace` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) - -Line 269. - -*** - -### numberGroups - -#### Signature - -```java -public NumberGroupsNamespace numberGroups() -``` - -#### Returns - -`NumberGroupsNamespace` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) - -Line 279. - -*** - -### numberLookup - -#### Signature - -```java -public NumberLookupNamespace numberLookup() -``` - -#### Returns - -`NumberLookupNamespace` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) - -Line 227. - -*** - -### phoneNumbers - -#### Signature - -```java -public PhoneNumbersNamespace phoneNumbers() -``` - -#### Returns - -`PhoneNumbersNamespace` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) - -Line 152. - -*** - -### project - -#### Signature - -```java -public ProjectNamespace project() -``` - -#### Returns - -`ProjectNamespace` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) - -Line 217. - -*** - -### pubSub - -#### Signature - -```java -public PubSubNamespace pubSub() -``` - -#### Returns - -`PubSubNamespace` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) - -Line 192. - -*** - -### queues - -#### Signature - -```java -public QueueNamespace queues() -``` - -#### Returns - -`QueueNamespace` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) - -Line 237. - -*** - -### recordings - -#### Signature - -```java -public RecordingNamespace recordings() -``` - -#### Returns - -`RecordingNamespace` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) - -Line 242. - -*** - -### registry - -#### Signature - -```java -public RegistryNamespace registry() -``` - -#### Returns - -`RegistryNamespace` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) - -Line 284. - -*** - -### shortCodes - -#### Signature - -```java -public ShortCodesNamespace shortCodes() -``` - -#### Returns - -`ShortCodesNamespace` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) - -Line 259. - -*** - -### sip - -#### Signature - -```java -public SipNamespace sip() -``` - -#### Returns - -`SipNamespace` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) - -Line 177. - -*** - -### sipProfile - -#### Signature - -```java -public SipProfileNamespace sipProfile() -``` - -#### Returns - -`SipProfileNamespace` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) - -Line 274. - -*** - -### streams - -#### Signature - -```java -public StreamNamespace streams() -``` - -#### Returns - -`StreamNamespace` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) - -Line 222. - -*** - -### swml - -#### Signature - -```java -public SwmlNamespace swml() -``` - -#### Returns - -`SwmlNamespace` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) - -Line 197. - -*** - -### transcriptions - -#### Signature - -```java -public TranscriptionNamespace transcriptions() -``` - -#### Returns - -`TranscriptionNamespace` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) - -Line 247. - -*** - -### video - -#### Signature - -```java -public VideoNamespace video() -``` - -#### Returns - -`VideoNamespace` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) - -Line 162. - -*** - -### withBaseUrl - -Build a `RestClient` pointed at an explicit base URL — typically -a loopback fixture used by the porting-sdk's REST-transport audit. - -The -returned client signs requests with the given `project`/`token` -pair via Basic Auth and routes every namespace's HTTP through the -fixture instead of the live SignalWire space. - -**Modifiers:** `static` - -#### Signature - -```java -public static RestClient withBaseUrl( - String baseUrl, - String project, - String token -) -``` - -#### Parameters - - - fully qualified base URL (e.g. `"http://127.0.0.1:NNNN/api"`); `"/api"` is appended if not already present - - - - project ID used as the Basic Auth username - - - - API token used as the Basic Auth password - - -#### Returns - -`RestClient` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) - -Line 89. - -## Source - -[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) - -Line 30. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/rest/rest-error/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/rest/rest/rest-error/index.mdx deleted file mode 100644 index 4e41c77f7d..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/rest/rest/rest-error/index.mdx +++ /dev/null @@ -1,259 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/rest/rest/rest-error" -title: "RestError" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.rest.RestError" - parent: "com.signalwire.sdk.rest" - module: "com.signalwire.sdk.rest" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestError.java" - visibility: "public" ---- -# `RestError` - -Exception for SignalWire REST API errors. - -<p> -Contains the HTTP status code and error message from the server. - -## Signature - -```java -public class RestError extends RuntimeException -``` - -## Inheritance - -**Extends:** `RuntimeException` - -## Methods - -### \ - -#### Signature - - - - ```java - public (int statusCode, String method, String path, String responseBody) - ``` - - - - ```java - public ( - int statusCode, - String method, - String path, - String responseBody, - Throwable cause - ) - ``` - - - -#### Parameters (Overload 1) - - - - - - - - - -#### Parameters (Overload 2) - - - - - - - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/RestError.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestError.java) - -Line 21. - -*** - -### getMethod - -#### Signature - -```java -public String getMethod() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/RestError.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestError.java) - -Line 41. - -*** - -### getPath - -#### Signature - -```java -public String getPath() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/RestError.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestError.java) - -Line 45. - -*** - -### getResponseBody - -#### Signature - -```java -public String getResponseBody() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/RestError.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestError.java) - -Line 49. - -*** - -### getStatusCode - -#### Signature - -```java -public int getStatusCode() -``` - -#### Returns - -`int` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/RestError.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestError.java) - -Line 37. - -*** - -### isClientError - -Whether the error is a client error (4xx). - -#### Signature - -```java -public boolean isClientError() -``` - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/RestError.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestError.java) - -Line 56. - -*** - -### isNotFound - -Whether the resource was not found (404). - -#### Signature - -```java -public boolean isNotFound() -``` - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/RestError.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestError.java) - -Line 70. - -*** - -### isServerError - -Whether the error is a server error (5xx). - -#### Signature - -```java -public boolean isServerError() -``` - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/RestError.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestError.java) - -Line 63. - -*** - -### isUnauthorized - -Whether access was denied (401 or 403). - -#### Signature - -```java -public boolean isUnauthorized() -``` - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/RestError.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestError.java) - -Line 77. - -## Source - -[`src/main/java/com/signalwire/sdk/rest/RestError.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestError.java) - -Line 14. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/runtime/lambda/lambda/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/runtime/lambda/lambda/index.mdx deleted file mode 100644 index 617bf068e7..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/runtime/lambda/lambda/index.mdx +++ /dev/null @@ -1,31 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/runtime/lambda/lambda" -title: "lambda" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "module" - language: "java" - qualified_name: "com.signalwire.sdk.runtime.lambda" - module: "com.signalwire.sdk.runtime.lambda" ---- -# `lambda` - -## Signature - -```java -package com.signalwire.sdk.runtime.lambda -``` - -## Classes - - - - AWS Lambda adapter for a SignalWire `AgentBase`. <p>Translates API Gateway (REST v1 or HTTP v2) / Lambda Function URL events into the same dispatch logic the in-process HTTP server uses, without depending on the `aws-lambda-java-events` typed models at runtime (the handler accepts plain Object> so the SDK stays dependency-light). <p><b>Usage</b> — in your Lambda handler class: <pre>class MyHandler implements RequestHandler\, Map\> \{ private final LambdaAgentHandler delegate; public MyHandler() \{ AgentBase agent = AgentBase.builder() .name("my-agent") .route("/") .build(); agent.setPromptText("You are helpful."); this.delegate = new LambdaAgentHandler(agent); public Map\ handleRequest(Map\ event, Context ctx) \{ return delegate.handle(event).toMap(); \} \} \}</pre> <p>The adapter dispatches based on the request path and the agent's configured route: <ul> <li>/<route> → returns rendered SWML</li> <li>/<route>/swaig → executes the named SWAIG tool</li> <li>/<route>/post\_prompt → invokes the summary callback</li> <li>/<route>/mcp → JSON-RPC 2.0 (if MCP enabled)</li> <li>/health, `/ready` → health probes</li> </ul> <p>All webhook URLs generated inside the SWML document are built from the Lambda's Function URL (via `LambdaUrlResolver`) or the `SWML_PROXY_URL_BASE` override, with the agent's route always layered on top. - - - - Response shape returned by `LambdaAgentHandler` and compatible with AWS API Gateway (REST v1 and HTTP v2) and Lambda Function URL response envelopes. <p>The fields map 1:1 to `APIGatewayProxyResponseEvent`: `statusCode`, `headers`, `body`, `isBase64Encoded`. - - diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/runtime/lambda/lambda/lambda-agent-handler/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/runtime/lambda/lambda/lambda-agent-handler/index.mdx deleted file mode 100644 index ab2412de47..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/runtime/lambda/lambda/lambda-agent-handler/index.mdx +++ /dev/null @@ -1,150 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/runtime/lambda/lambda/lambda-agent-handler" -title: "LambdaAgentHandler" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.runtime.lambda.LambdaAgentHandler" - parent: "com.signalwire.sdk.runtime.lambda" - module: "com.signalwire.sdk.runtime.lambda" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/lambda/LambdaAgentHandler.java" - visibility: "public" ---- -# `LambdaAgentHandler` - -AWS Lambda adapter for a SignalWire `AgentBase`. - -<p>Translates API Gateway (REST v1 or HTTP v2) / Lambda Function URL -events into the same dispatch logic the in-process HTTP server uses, -without depending on the `aws-lambda-java-events` typed models -at runtime (the handler accepts plain Object> so -the SDK stays dependency-light). - -<p><b>Usage</b> — in your Lambda handler class: -<pre>class MyHandler implements RequestHandler<Map<String, Object>, Map<String, Object>> { - private final LambdaAgentHandler delegate; - -``` -public MyHandler() { - AgentBase agent = AgentBase.builder() - .name("my-agent") - .route("/") - .build(); - agent.setPromptText("You are helpful."); - this.delegate = new LambdaAgentHandler(agent); - -public Map handleRequest(Map event, Context ctx) { - return delegate.handle(event).toMap(); -} -``` - -\} -\}</pre> - -<p>The adapter dispatches based on the request path and the agent's -configured route: -<ul> - <li>/<route> → returns rendered SWML</li> - <li>/<route>/swaig → executes the named SWAIG tool</li> - <li>/<route>/post_prompt → invokes the summary callback</li> - <li>/<route>/mcp → JSON-RPC 2.0 (if MCP enabled)</li> - <li>/health, `/ready` → health probes</li> -</ul> - -<p>All webhook URLs generated inside the SWML document are built from -the Lambda's Function URL (via `LambdaUrlResolver`) or the -`SWML_PROXY_URL_BASE` override, with the agent's route always -layered on top. - -This is the same invariant the HTTP server path -enforces. - -**Modifiers:** `final` - -## Signature - -```java -public final class LambdaAgentHandler -``` - -## Methods - -### \ - -Create a handler for the given agent using the real process -environment. - -#### Signature - - - - ```java - public (AgentBase agent) - ``` - - - - ```java - public (AgentBase agent, EnvProvider env) - ``` - - - -#### Parameters (Overload 1) - - - the configured agent. - - -#### Parameters (Overload 2) - - - the configured agent. - - - - environment variable source. - - -#### Source - -[`src/main/java/com/signalwire/sdk/runtime/lambda/LambdaAgentHandler.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/lambda/LambdaAgentHandler.java) - -Line 80. - -*** - -### handle - -Handle a single invocation. - -#### Signature - -```java -public LambdaResponse handle(Map event) -``` - -#### Parameters - - - the raw Lambda event (API Gateway v1, v2, or Function URL payload). Null events are treated as a root GET. - - -#### Returns - -`LambdaResponse` — response envelope ready to convert to `APIGatewayProxyResponseEvent` or equivalent. - -#### Source - -[`src/main/java/com/signalwire/sdk/runtime/lambda/LambdaAgentHandler.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/lambda/LambdaAgentHandler.java) - -Line 106. - -## Source - -[`src/main/java/com/signalwire/sdk/runtime/lambda/LambdaAgentHandler.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/lambda/LambdaAgentHandler.java) - -Line 65. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/runtime/lambda/lambda/lambda-response/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/runtime/lambda/lambda/lambda-response/index.mdx deleted file mode 100644 index e067a039a9..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/runtime/lambda/lambda/lambda-response/index.mdx +++ /dev/null @@ -1,241 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/runtime/lambda/lambda/lambda-response" -title: "LambdaResponse" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.runtime.lambda.LambdaResponse" - parent: "com.signalwire.sdk.runtime.lambda" - module: "com.signalwire.sdk.runtime.lambda" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/lambda/LambdaResponse.java" - visibility: "public" ---- -# `LambdaResponse` - -Response shape returned by `LambdaAgentHandler` and compatible -with AWS API Gateway (REST v1 and HTTP v2) and Lambda Function URL -response envelopes. - -<p>The fields map 1:1 to `APIGatewayProxyResponseEvent`: -`statusCode`, `headers`, `body`, -`isBase64Encoded`. - -Returned as a plain `Map` so the SDK -does not require a runtime dependency on `aws-lambda-java-events`. -Users who want the typed variant can trivially copy the fields over. - -**Modifiers:** `final` - -## Signature - -```java -public final class LambdaResponse -``` - -## Methods - -### \ - -Create a Lambda response with the given fields. - -#### Signature - -```java -public ( - int statusCode, - Map headers, - String body, - boolean isBase64Encoded -) -``` - -#### Parameters - - - HTTP status code. - - - - response headers (must not be null — pass an empty map for no headers). - - - - raw response body as a string. - - - - whether the body is base64-encoded binary. - - -#### Source - -[`src/main/java/com/signalwire/sdk/runtime/lambda/LambdaResponse.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/lambda/LambdaResponse.java) - -Line 33. - -*** - -### getBody - -#### Signature - -```java -public String getBody() -``` - -#### Returns - -`String` — response body. - -#### Source - -[`src/main/java/com/signalwire/sdk/runtime/lambda/LambdaResponse.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/lambda/LambdaResponse.java) - -Line 48. - -*** - -### getHeaders - -#### Signature - -```java -public Map getHeaders() -``` - -#### Returns - -`Map` — response headers. - -#### Source - -[`src/main/java/com/signalwire/sdk/runtime/lambda/LambdaResponse.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/lambda/LambdaResponse.java) - -Line 45. - -*** - -### getStatusCode - -#### Signature - -```java -public int getStatusCode() -``` - -#### Returns - -`int` — HTTP status code. - -#### Source - -[`src/main/java/com/signalwire/sdk/runtime/lambda/LambdaResponse.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/lambda/LambdaResponse.java) - -Line 42. - -*** - -### isBase64Encoded - -#### Signature - -```java -public boolean isBase64Encoded() -``` - -#### Returns - -`boolean` — whether the body is base64-encoded. - -#### Source - -[`src/main/java/com/signalwire/sdk/runtime/lambda/LambdaResponse.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/lambda/LambdaResponse.java) - -Line 51. - -*** - -### json - -Convenience builder for a 200 JSON response. - -**Modifiers:** `static` - -#### Signature - - - - ```java - public static LambdaResponse json(String body) - ``` - - - - ```java - public static LambdaResponse json(int statusCode, String body) - ``` - - - -#### Parameters (Overload 1) - - - raw JSON string. - - -#### Parameters (Overload 2) - - - HTTP status. - - - - raw JSON string. - - -#### Returns (Overload 1) - -`LambdaResponse` — LambdaResponse. - -#### Returns (Overload 2) - -`LambdaResponse` — LambdaResponse. - -#### Source - -[`src/main/java/com/signalwire/sdk/runtime/lambda/LambdaResponse.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/lambda/LambdaResponse.java) - -Line 75. - -*** - -### toMap - -Serialise this response into the AWS Lambda Function URL / -API Gateway payload format (v1 and v2 are structurally identical -for response shape). - -#### Signature - -```java -public Map toMap() -``` - -#### Returns - -`Map` — a Map suitable for returning from a Lambda handler. - -#### Source - -[`src/main/java/com/signalwire/sdk/runtime/lambda/LambdaResponse.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/lambda/LambdaResponse.java) - -Line 60. - -## Source - -[`src/main/java/com/signalwire/sdk/runtime/lambda/LambdaResponse.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/lambda/LambdaResponse.java) - -Line 17. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/runtime/runtime/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/runtime/runtime/index.mdx deleted file mode 100644 index bff0ec36ac..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/runtime/runtime/index.mdx +++ /dev/null @@ -1,351 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/runtime/runtime" -title: "runtime" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "module" - language: "java" - qualified_name: "com.signalwire.sdk.runtime" - module: "com.signalwire.sdk.runtime" ---- -# `runtime` - -## Signature - -```java -package com.signalwire.sdk.runtime -``` - -## Classes - - - - Resolve the base URL of a SignalWire agent running as an AWS Lambda function, from standard Lambda environment variables. <p>Precedence — highest first: <ol> <li>`AWS_LAMBDA_FUNCTION_URL` — the Function URL explicitly assigned to this Lambda (the only variant that is guaranteed correct; synthetic fallbacks below assume the Function URL service was used and the function name matches the public subdomain, which is typically true but not guaranteed).</li> <li>Synthesised `https://{AWS_LAMBDA_FUNCTION_NAME`.lambda-url.\{AWS\_REGION\}.on.aws\} — built when the Function URL env var is not present but the standard Lambda identity variables are.</li> </ol> <p>This class returns a bare origin (scheme + host). - - - -## Interfaces - -### EnvProvider - -Simple read-only view of process environment variables. - -<p>Extracted as an interface so tests can inject a deterministic map -instead of relying on actual OS environment variables (which Java -cannot mutate at runtime without native hackery). - -<p>The default implementation delegates to `System#getenv(String)`. - -#### Signature - -```java -public interface EnvProvider -``` - -#### Constants - - - Default provider backed by `System#getenv(String)`. - - -#### Methods - -##### get - -Return the value of the given environment variable, or `null` if -it is not set. - -###### Signature - -```java -String get(String name) -``` - -###### Parameters - - - the environment variable name. - - -###### Returns - -`String` — the value, or `null`. - -###### Source - -[`src/main/java/com/signalwire/sdk/runtime/EnvProvider.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/EnvProvider.java) - -Line 22. - -*** - -##### isSet - -Return true iff the env var is set and non-empty. - -**Modifiers:** `default` - -###### Signature - -```java -default boolean isSet(String name) -``` - -###### Parameters - - - the environment variable name. - - -###### Returns - -`boolean` — true if the value is set and non-empty. - -###### Source - -[`src/main/java/com/signalwire/sdk/runtime/EnvProvider.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/EnvProvider.java) - -Line 33. - -#### Source - -[`src/main/java/com/signalwire/sdk/runtime/EnvProvider.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/EnvProvider.java) - -Line 12. - -## Enums - -### ExecutionMode - -Runtime deployment environments the SDK knows about. - -<p>Detected from well-known environment variables set by the hosting -platform. - -Mirrors `get_execution_mode()` in the Python SDK and -`detectPlatform()` in the TypeScript SDK. - -<p>Use `#detect()` to read the actual process environment, or -`#detect(EnvProvider)` to pass a test double. - -#### Signature - -```java -public enum ExecutionMode -``` - -#### Variants - - - Azure Functions. - - - - Legacy CGI script behind a web server. - - - - Google Cloud Functions (1st or 2nd gen / Cloud Run). - - - - AWS Lambda function (container or zip deployment). - - - - Normal long-running HTTP server process (the default). - - -#### Methods - -##### detect - -Detect the execution mode from the real process environment. - -**Modifiers:** `static` - -###### Signature - - - - ```java - public static ExecutionMode detect() - ``` - - - - ```java - public static ExecutionMode detect(EnvProvider env) - ``` - - - -###### Parameters (Overload 2) - - - environment variable source (injectable for tests). - - -###### Returns (Overload 1) - -`ExecutionMode` — the detected mode, or `#SERVER` as fallback. - -###### Returns (Overload 2) - -`ExecutionMode` — the detected mode. - -###### Source - -[`src/main/java/com/signalwire/sdk/runtime/ExecutionMode.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/ExecutionMode.java) - -Line 35. - -*** - -##### getExecutionMode - -Cross-language SDK contract: return the execution mode as the -canonical lower-case-with-underscores string used by every port. -Mirrors `signalwire.core.logging_config.get_execution_mode` -in Python: one of `"cgi"`, `"lambda"`, -`"google_cloud_function"`, `"azure_function"`, or -`"server"`. - -**Modifiers:** `static` - -###### Signature - - - - ```java - public static String getExecutionMode() - ``` - - - - ```java - public static String getExecutionMode(EnvProvider env) - ``` - - - -###### Parameters (Overload 2) - - - environment variable source (injectable for tests). - - -###### Returns (Overload 1) - -`String` — canonical mode string detected from the process environment - -###### Returns (Overload 2) - -`String` — canonical mode string. - -###### Source - -[`src/main/java/com/signalwire/sdk/runtime/ExecutionMode.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/ExecutionMode.java) - -Line 81. - -*** - -##### isServerlessMode - -Cross-language SDK contract: true when the process is running -inside any serverless / short-lived environment (i.e. - -anything -other than `"server"`). Mirrors -`signalwire.utils.is_serverless_mode` in Python. - -**Modifiers:** `static` - -###### Signature - - - - ```java - public static boolean isServerlessMode() - ``` - - - - ```java - public static boolean isServerlessMode(EnvProvider env) - ``` - - - -###### Parameters (Overload 2) - - - environment variable source (injectable for tests). - - -###### Returns (Overload 1) - -`boolean` — `true` unless the detected mode is `"server"`. - -###### Returns (Overload 2) - -`boolean` — true unless the detected mode is `"server"`. - -###### Source - -[`src/main/java/com/signalwire/sdk/runtime/ExecutionMode.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/ExecutionMode.java) - -Line 112. - -*** - -##### valueOf - -**Modifiers:** `static` - -###### Signature - -```java -public static ExecutionMode valueOf(String name) -``` - -###### Parameters - - - -###### Returns - -`ExecutionMode` - -###### Source - -[`src/main/java/com/signalwire/sdk/runtime/ExecutionMode.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/ExecutionMode.java) - -*** - -##### values - -**Modifiers:** `static` - -###### Signature - -```java -public static ExecutionMode[] values() -``` - -###### Returns - -`ExecutionMode[]` - -###### Source - -[`src/main/java/com/signalwire/sdk/runtime/ExecutionMode.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/ExecutionMode.java) - -#### Source - -[`src/main/java/com/signalwire/sdk/runtime/ExecutionMode.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/ExecutionMode.java) - -Line 13. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/runtime/runtime/lambda-url-resolver/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/runtime/runtime/lambda-url-resolver/index.mdx deleted file mode 100644 index 5208a2a751..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/runtime/runtime/lambda-url-resolver/index.mdx +++ /dev/null @@ -1,117 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/runtime/runtime/lambda-url-resolver" -title: "LambdaUrlResolver" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.runtime.LambdaUrlResolver" - parent: "com.signalwire.sdk.runtime" - module: "com.signalwire.sdk.runtime" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/LambdaUrlResolver.java" - visibility: "public" ---- -# `LambdaUrlResolver` - -Resolve the base URL of a SignalWire agent running as an AWS Lambda -function, from standard Lambda environment variables. - -<p>Precedence — highest first: -<ol> - <li>`AWS_LAMBDA_FUNCTION_URL` — the Function URL explicitly - assigned to this Lambda (the only variant that is guaranteed - correct; synthetic fallbacks below assume the Function URL - service was used and the function name matches the public - subdomain, which is typically true but not guaranteed).</li> - <li>Synthesised `https://{AWS_LAMBDA_FUNCTION_NAME`.lambda-url.{AWS_REGION}.on.aws} - — built when the Function URL env var is not present but the - standard Lambda identity variables are.</li> -</ol> - -<p>This class returns a bare origin (scheme + host). - -It intentionally -does NOT append any route — callers (e.g. `AgentBase.buildWebhookUrl`) -are responsible for appending the agent's route + endpoint path. This -keeps the route-preservation invariant intact regardless of which -source produced the base URL. - -<p>Mirrors the Lambda branch of `get_full_url()` in the Python SDK. - -**Modifiers:** `final` - -## Signature - -```java -public final class LambdaUrlResolver -``` - -## Methods - -### \ - -Create a resolver backed by the real process environment. - -#### Signature - - - - ```java - public () - ``` - - - - ```java - public (EnvProvider env) - ``` - - - -#### Parameters (Overload 2) - - - environment variable source. - - -#### Source - -[`src/main/java/com/signalwire/sdk/runtime/LambdaUrlResolver.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/LambdaUrlResolver.java) - -Line 34. - -*** - -### resolveBaseUrl - -Return the base URL for the Lambda, without any trailing slash. - -<p>Returns `null` if none of the expected env vars are set -(which typically means we're not actually running on Lambda). - -The -caller should then fall back to its normal base-URL detection. - -#### Signature - -```java -public String resolveBaseUrl() -``` - -#### Returns - -`String` — bare origin (e.g. `https://xyz.lambda-url.us-east-1.on.aws`), or `null`. - -#### Source - -[`src/main/java/com/signalwire/sdk/runtime/LambdaUrlResolver.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/LambdaUrlResolver.java) - -Line 58. - -## Source - -[`src/main/java/com/signalwire/sdk/runtime/LambdaUrlResolver.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/LambdaUrlResolver.java) - -Line 27. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/security/security/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/security/security/index.mdx deleted file mode 100644 index dbbbbbf4b1..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/security/security/index.mdx +++ /dev/null @@ -1,35 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/security/security" -title: "security" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "module" - language: "java" - qualified_name: "com.signalwire.sdk.security" - module: "com.signalwire.sdk.security" ---- -# `security` - -## Signature - -```java -package com.signalwire.sdk.security -``` - -## Classes - - - - Session manager for HMAC-SHA256 signed tool tokens. Stub for the security module being built by another agent. - - - - Servlet filter that enforces SignalWire webhook signature validation on incoming requests. <p>Wraps the request in a body-caching wrapper before reading the body so that downstream handlers (including framework parsers) can re-read the same raw bytes. - - - - Webhook signature validation for SignalWire-signed HTTP requests. <p>Implements both schemes from `porting-sdk/webhooks.md`: <ul> <li><b>Scheme A</b> (RELAY/SWML/JSON): url + rawBody)).</li> <li><b>Scheme B</b> (Compat/cXML form): url + sortedFormParams)) with optional `bodySHA256` query-param fallback for JSON-on-compat-surface.</li> </ul> <p>All signature comparisons use byte\[]) (constant-time) so the secret cannot be leaked through timing differences. <p>Public API: <ul> <li>String, String, String) — combined entry point.</li> <li>String, String, Object) — legacy `@signalwire/compatibility-api` drop-in alias.</li> </ul> <p>This is a stateless utility — every method is static and the class is not intended to be instantiated. - - diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/security/security/session-manager/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/security/security/session-manager/index.mdx deleted file mode 100644 index 054d8583e4..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/security/security/session-manager/index.mdx +++ /dev/null @@ -1,141 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/security/security/session-manager" -title: "SessionManager" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.security.SessionManager" - parent: "com.signalwire.sdk.security" - module: "com.signalwire.sdk.security" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/security/SessionManager.java" - visibility: "public" ---- -# `SessionManager` - -Session manager for HMAC-SHA256 signed tool tokens. -Stub for the security module being built by another agent. - -## Signature - -```java -public class SessionManager -``` - -## Methods - -### \ - -#### Signature - - - - ```java - public () - ``` - - - - ```java - public (int defaultExpiry) - ``` - - - -#### Parameters (Overload 2) - - - -#### Source - -[`src/main/java/com/signalwire/sdk/security/SessionManager.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/security/SessionManager.java) - -Line 19. - -*** - -### createToken - -Create a signed token for a function + callID. - -#### Signature - - - - ```java - public String createToken(String functionName, String callId) - ``` - - - - ```java - public String createToken(String functionName, String callId, int expirySeconds) - ``` - - - -#### Parameters (Overload 1) - - - - - -#### Parameters (Overload 2) - - - - - - - -#### Returns (Overload 1) - -`String` - -#### Returns (Overload 2) - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/security/SessionManager.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/security/SessionManager.java) - -Line 32. - -*** - -### validateToken - -Validate a signed token. - -#### Signature - -```java -public boolean validateToken(String token, String functionName, String callId) -``` - -#### Parameters - - - - - - - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/security/SessionManager.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/security/SessionManager.java) - -Line 48. - -## Source - -[`src/main/java/com/signalwire/sdk/security/SessionManager.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/security/SessionManager.java) - -Line 14. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/security/security/webhook-filter/cached-body-http-servlet-request/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/security/security/webhook-filter/cached-body-http-servlet-request/index.mdx deleted file mode 100644 index 1893005f03..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/security/security/webhook-filter/cached-body-http-servlet-request/index.mdx +++ /dev/null @@ -1,152 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/security/security/webhook-filter/cached-body-http-servlet-request" -title: "CachedBodyHttpServletRequest" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.security.WebhookFilter.CachedBodyHttpServletRequest" - parent: "com.signalwire.sdk.security.WebhookFilter" - module: "com.signalwire.sdk.security" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/security/WebhookFilter.java" - visibility: "public" ---- -# `CachedBodyHttpServletRequest` - -`HttpServletRequestWrapper` that buffers the request body so it -can be read multiple times (once by the filter for signature -validation, once by the downstream handler for parsing). - -**Modifiers:** `static` `final` - -## Signature - -```java -public static final class CachedBodyHttpServletRequest extends HttpServletRequestWrapper -``` - -## Inheritance - -**Extends:** `HttpServletRequestWrapper` - -## Methods - -### \ - -#### Signature - -```java -public (HttpServletRequest request) -``` - -#### Parameters - - - -#### Throws - -- `IOException` - -#### Source - -[`src/main/java/com/signalwire/sdk/security/WebhookFilter.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/security/WebhookFilter.java) - -Line 199. - -*** - -### getCachedBody - -Snapshot of the cached body bytes. - -Defensive copy. - -#### Signature - -```java -public byte[] getCachedBody() -``` - -#### Returns - -`byte[]` - -#### Source - -[`src/main/java/com/signalwire/sdk/security/WebhookFilter.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/security/WebhookFilter.java) - -Line 208. - -*** - -### getCachedBodyAsString - -Cached body decoded as UTF-8 (or the request's declared charset). - -#### Signature - -```java -public String getCachedBodyAsString() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/security/WebhookFilter.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/security/WebhookFilter.java) - -Line 213. - -*** - -### getInputStream - -**Decorators:** `@Override` - -#### Signature - -```java -public ServletInputStream getInputStream() -``` - -#### Returns - -`ServletInputStream` - -#### Source - -[`src/main/java/com/signalwire/sdk/security/WebhookFilter.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/security/WebhookFilter.java) - -Line 221. - -*** - -### getReader - -**Decorators:** `@Override` - -#### Signature - -```java -public BufferedReader getReader() -``` - -#### Returns - -`BufferedReader` - -#### Source - -[`src/main/java/com/signalwire/sdk/security/WebhookFilter.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/security/WebhookFilter.java) - -Line 256. - -## Source - -[`src/main/java/com/signalwire/sdk/security/WebhookFilter.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/security/WebhookFilter.java) - -Line 195. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/security/security/webhook-filter/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/security/security/webhook-filter/index.mdx deleted file mode 100644 index 879ed5a18c..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/security/security/webhook-filter/index.mdx +++ /dev/null @@ -1,196 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/security/security/webhook-filter" -title: "WebhookFilter" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.security.WebhookFilter" - parent: "com.signalwire.sdk.security" - module: "com.signalwire.sdk.security" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/security/WebhookFilter.java" - visibility: "public" ---- -# `WebhookFilter` - -Servlet filter that enforces SignalWire webhook signature validation on -incoming requests. - -<p>Wraps the request in a body-caching wrapper before reading the body so -that downstream handlers (including framework parsers) can re-read the same -raw bytes. - -This is the canonical Java framework adapter described in the -"Framework adapter" section of `porting-sdk/webhooks.md`. - -<p>Behavior: - -<ol> - <li>Read the raw request body once and cache it.</li> - <li>Extract `X-SignalWire-Signature` (or `X-Twilio-Signature`) - from the request headers.</li> - <li>Reconstruct the public URL — uses `X-Forwarded-Proto` / - `X-Forwarded-Host` when `trustProxy` is set, otherwise - falls back to `HttpServletRequest#getRequestURL()` + - `HttpServletRequest#getQueryString()`.</li> - <li>Call String, String, String).</li> - <li>On invalid: respond Forbidden and do <b>not</b> call - `chain.doFilter`.</li> - <li>On valid: forward via `chain.doFilter` with the body-caching - request wrapper so downstream handlers can re-read the body.</li> -</ol> - -<p>The filter intentionally does <b>not</b> log the signing key, the -incoming signature, or which scheme branch tripped — disclosing those -weakens the constant-time defense and gives attackers data to differentiate -scheme branches with. - -<p>Note: this class targets the `javax.servlet` API (Servlet 4.x / -Tomcat 9 / Jetty 9). Apps on Servlet 5.x / Jakarta EE 9+ should bridge via -a → jakarta shim or copy this class into their codebase -with the import package swapped. - -## Signature - -```java -public class WebhookFilter implements Filter -``` - -## Inheritance - -**Implements:** `Filter` - -## Classes - - - - `HttpServletRequestWrapper` that buffers the request body so it can be read multiple times (once by the filter for signature validation, once by the downstream handler for parsing). - - - -## Methods - -### \ - -Construct a filter with proxy trust disabled. - -#### Signature - - - - ```java - public (String signingKey) - ``` - - - - ```java - public (String signingKey, boolean trustProxy) - ``` - - - -#### Parameters (Overload 1) - - - customer's Signing Key. Must be non-empty; an empty value is a programming error and the constructor throws `IllegalArgumentException`. - - -#### Parameters (Overload 2) - - - customer's Signing Key. Required. - - - - when `true`, honor `X-Forwarded-Proto` / `X-Forwarded-Host` for URL reconstruction. `false` by default since proxy headers are spoofable; only enable when you control the proxy chain. - - -#### Source - -[`src/main/java/com/signalwire/sdk/security/WebhookFilter.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/security/WebhookFilter.java) - -Line 75. - -*** - -### destroy - -**Decorators:** `@Override` - -#### Signature - -```java -public void destroy() -``` - -#### Source - -[`src/main/java/com/signalwire/sdk/security/WebhookFilter.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/security/WebhookFilter.java) - -Line 102. - -*** - -### doFilter - -**Decorators:** `@Override` - -#### Signature - -```java -public void doFilter( - ServletRequest request, - ServletResponse response, - FilterChain chain -) -``` - -#### Parameters - - - - - - - -#### Throws - -- `IOException` -- `ServletException` - -#### Source - -[`src/main/java/com/signalwire/sdk/security/WebhookFilter.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/security/WebhookFilter.java) - -Line 107. - -*** - -### init - -**Decorators:** `@Override` - -#### Signature - -```java -public void init(FilterConfig filterConfig) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/security/WebhookFilter.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/security/WebhookFilter.java) - -Line 97. - -## Source - -[`src/main/java/com/signalwire/sdk/security/WebhookFilter.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/security/WebhookFilter.java) - -Line 63. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/security/security/webhook-validator/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/security/security/webhook-validator/index.mdx deleted file mode 100644 index 14a56a71c9..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/security/security/webhook-validator/index.mdx +++ /dev/null @@ -1,181 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/security/security/webhook-validator" -title: "WebhookValidator" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.security.WebhookValidator" - parent: "com.signalwire.sdk.security" - module: "com.signalwire.sdk.security" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/security/WebhookValidator.java" - visibility: "public" ---- -# `WebhookValidator` - -Webhook signature validation for SignalWire-signed HTTP requests. - -<p>Implements both schemes from `porting-sdk/webhooks.md`: - -<ul> - <li><b>Scheme A</b> (RELAY/SWML/JSON): url + rawBody)).</li> - <li><b>Scheme B</b> (Compat/cXML form): url + sortedFormParams)) - with optional `bodySHA256` query-param fallback for JSON-on-compat-surface.</li> -</ul> - -<p>All signature comparisons use byte[]) -(constant-time) so the secret cannot be leaked through timing differences. - -<p>Public API: -<ul> - <li>String, String, String) — combined entry point.</li> - <li>String, String, Object) — legacy - `@signalwire/compatibility-api` drop-in alias.</li> -</ul> - -<p>This is a stateless utility — every method is static and the class is -not intended to be instantiated. - -**Modifiers:** `final` - -## Signature - -```java -public final class WebhookValidator -``` - -## Constants - - - Header name that carries the signature on every signed SignalWire request. - - - - Legacy alias accepted by the cXML/Compatibility surface. - - -## Methods - -### validateRequest - -Legacy `@signalwire/compatibility-api` drop-in entry point. - -<p>Dispatches on the runtime type of `paramsOrRawBody`: -<ul> - <li>`String` → delegates to - String, String, String).</li> - <li>`Map` or any `Iterable` of `Map.Entry` (or - 2-element arrays / lists) → treats the value as pre-parsed form - params and runs Scheme B directly with URL port normalization.</li> - <li>`null` → treated as an empty params map (Scheme B).</li> - <li>Anything else → `IllegalArgumentException`.</li> -</ul> - -**Modifiers:** `static` - -#### Signature - -```java -public static boolean validateRequest( - String signingKey, - String signature, - String url, - Object paramsOrRawBody -) -``` - -#### Parameters - - - customer's Signing Key. Non-empty. - - - - header value. `null` / empty returns `false`. - - - - full URL SignalWire POSTed to. - - - - `String` raw body OR pre-parsed form params. - - -#### Returns - -`boolean` — `true` on match, `false` otherwise. - -#### Throws - -- `IllegalArgumentException` — when `signingKey` is empty or `paramsOrRawBody` is of an unsupported type. - -#### Source - -[`src/main/java/com/signalwire/sdk/security/WebhookValidator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/security/WebhookValidator.java) - -Line 171. - -*** - -### validateWebhookSignature - -Validate a SignalWire webhook signature against both schemes. - -<p>Tries Scheme A (hex HMAC-SHA1 over + rawBody) first; on -miss, tries Scheme B (base64 HMAC-SHA1 over + sortedFormParams) -with both port-normalization variants of the URL and an optional -`bodySHA256` fallback for JSON-on-compat-surface. - -**Modifiers:** `static` - -#### Signature - -```java -public static boolean validateWebhookSignature( - String signingKey, - String signature, - String url, - String rawBody -) -``` - -#### Parameters - - - customer's Signing Key from the Dashboard. Must be non-null and non-empty; otherwise an `IllegalArgumentException` is thrown — that's a programming error, not a validation failure. - - - - the `X-SignalWire-Signature` header value (or the `X-Twilio-Signature` alias). `null` or empty returns `false` without throwing. - - - - the full URL SignalWire POSTed to (scheme, host, optional port, path, query). Must match what the platform saw — see the URL reconstruction section of `porting-sdk/webhooks.md`. - - - - the raw UTF-8 request body bytes as a string, <b>before</b> any JSON / form parsing. May be empty but must not be `null` — pass `""` when the body was empty. - - -#### Returns - -`boolean` — `true` when the signature matches either scheme, otherwise `false`. - -#### Throws - -- `IllegalArgumentException` — when `signingKey` is `null` or empty, or when `rawBody` is `null`. - -#### Source - -[`src/main/java/com/signalwire/sdk/security/WebhookValidator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/security/WebhookValidator.java) - -Line 94. - -## Source - -[`src/main/java/com/signalwire/sdk/security/WebhookValidator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/security/WebhookValidator.java) - -Line 50. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/server/server/agent-server/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/server/server/agent-server/index.mdx deleted file mode 100644 index b212c8c1ca..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/server/server/agent-server/index.mdx +++ /dev/null @@ -1,459 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/server/server/agent-server" -title: "AgentServer" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.server.AgentServer" - parent: "com.signalwire.sdk.server" - module: "com.signalwire.sdk.server" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java" - visibility: "public" ---- -# `AgentServer` - -Multi-agent hosting server. -Registers multiple agents on different routes and dispatches requests accordingly. - -## Signature - -```java -public class AgentServer implements AutoCloseable -``` - -## Inheritance - -**Implements:** `AutoCloseable` - -## Methods - -### \ - -#### Signature - - - - ```java - public () - ``` - - - - ```java - public (int port) - ``` - - - - ```java - public (String host, int port) - ``` - - - -#### Parameters (Overload 2) - - - -#### Parameters (Overload 3) - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) - -Line 61. - -*** - -### close - -`AutoCloseable` entry point so the multi-agent server can be -run inside a try-with-resources block: - -<pre>{@code -try (var server = new AgentServer(host, port)) { - server.register(agent); - server.run(); - // ... - -`AutoCloseable` entry point so the multi-agent server can be -run inside a try-with-resources block: - -<pre>(var server = new AgentServer(host, port)) { - server.register(agent); - server.run(); - // ... serve ... // close() runs here: the HTTP listener is shut down -}</pre> - -Delegates to `#stop()`, releasing the bound HTTP(S) listener and -its socket. Idempotent: harmless if the server was never started or is -already stopped. - -**Decorators:** `@Override` - -#### Signature - -```java -public void close() -``` - -#### Source - -[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) - -Line 730. - -*** - -### enableTls - -Serve over HTTPS using an explicit PEM certificate chain and PKCS#8 -private key. - -This is the explicit-cert option that parallels Python's -ssl\_key=...); it takes -precedence over the `SWML_SSL_*` environment variables. - -<p>`certPath` must be a PEM file containing the leaf (and any -intermediate) certificates; `keyPath` must be the matching -unencrypted PKCS#8 private key in PEM form. When both resolve at -`#run()` time the server binds a -`com.sun.net.httpserver.HttpsServer`. - -#### Signature - -```java -public AgentServer enableTls(String certPath, String keyPath) -``` - -#### Parameters - - - filesystem path to the PEM certificate file - - - - filesystem path to the PEM PKCS#8 private-key file - - -#### Returns - -`AgentServer` - -#### Source - -[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) - -Line 180. - -*** - -### getAgent - -Get agent for a route. - -#### Signature - -```java -public AgentBase getAgent(String route) -``` - -#### Parameters - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) - -Line 129. - -*** - -### getRoutes - -List all registered routes. - -#### Signature - -```java -public Set getRoutes() -``` - -#### Returns - -`Set` - -#### Source - -[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) - -Line 136. - -*** - -### getSipRoute - -Get route for a SIP username. - -#### Signature - -```java -public String getSipRoute(String username) -``` - -#### Parameters - - - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) - -Line 304. - -*** - -### isTlsEnabled - -Reports whether the server will serve HTTPS, resolving the explicit -cert/key option and then the `SWML_SSL_*` environment variables -the same way `#run()` does. - -A configured cert/key must both point -at existing files for TLS to be considered enabled. - -#### Signature - -```java -public boolean isTlsEnabled() -``` - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) - -Line 192. - -*** - -### register - -Register an agent at a specific route. - -#### Signature - - - - ```java - public AgentServer register(AgentBase agent, String route) - ``` - - - - ```java - public AgentServer register(AgentBase agent) - ``` - - - -#### Parameters (Overload 1) - - - - - -#### Parameters (Overload 2) - - - -#### Returns (Overload 1) - -`AgentServer` - -#### Returns (Overload 2) - -`AgentServer` - -#### Source - -[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) - -Line 90. - -*** - -### registerSipRoute - -Register a SIP username to route to a specific agent. - -#### Signature - -```java -public AgentServer registerSipRoute(String username, String route) -``` - -#### Parameters - - - - - -#### Returns - -`AgentServer` - -#### Source - -[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) - -Line 296. - -*** - -### run - -Start the multi-agent server. - -#### Signature - -```java -public void run() -``` - -#### Throws - -- `IOException` - -#### Source - -[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) - -Line 315. - -*** - -### serveStaticFiles - -Serve static files from a directory at a specific route. - -#### Signature - -```java -public AgentServer serveStaticFiles(String directory, String route) -``` - -#### Parameters - - - Filesystem path to the directory containing static files - - - - URL route prefix (e.g., "/static" or "/assets") - - -#### Returns - -`AgentServer` - -#### Source - -[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) - -Line 155. - -*** - -### setStaticFilesDir - -Set directory for serving static files at /static route. - -#### Signature - -```java -public AgentServer setStaticFilesDir(String dir) -``` - -#### Parameters - - - -#### Returns - -`AgentServer` - -#### Source - -[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) - -Line 143. - -*** - -### stop - -Stop the server. - -#### Signature - -```java -public void stop() -``` - -#### Source - -[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) - -Line 707. - -*** - -### unregister - -Unregister an agent from a route. - -#### Signature - -```java -public AgentServer unregister(String route) -``` - -#### Parameters - - - -#### Returns - -`AgentServer` - -#### Source - -[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) - -Line 115. - -## Source - -[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) - -Line 39. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/server/server/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/server/server/index.mdx deleted file mode 100644 index 10331be7a2..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/server/server/index.mdx +++ /dev/null @@ -1,27 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/server/server" -title: "server" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "module" - language: "java" - qualified_name: "com.signalwire.sdk.server" - module: "com.signalwire.sdk.server" ---- -# `server` - -## Signature - -```java -package com.signalwire.sdk.server -``` - -## Classes - - - - Multi-agent hosting server. Registers multiple agents on different routes and dispatches requests accordingly. - - diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/api-ninja-trivia-skill/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/api-ninja-trivia-skill/index.mdx deleted file mode 100644 index 4690cb51a6..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/api-ninja-trivia-skill/index.mdx +++ /dev/null @@ -1,182 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/skills/builtin/builtin/api-ninja-trivia-skill" -title: "ApiNinjaTriviaSkill" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.skills.builtin.ApiNinjaTriviaSkill" - parent: "com.signalwire.sdk.skills.builtin" - module: "com.signalwire.sdk.skills.builtin" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/ApiNinjaTriviaSkill.java" - visibility: "public" ---- -# `ApiNinjaTriviaSkill` - -## Signature - -```java -public class ApiNinjaTriviaSkill implements SkillBase -``` - -## Inheritance - -**Implements:** [SkillBase](/docs/sdk-reference/reference/java/com/signalwire/sdk/skills/skills#skill-base) - -## Methods - -### \ - -#### Signature - -```java -public () -``` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/ApiNinjaTriviaSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/ApiNinjaTriviaSkill.java) - -*** - -### getDescription - -**Decorators:** `@Override` - -#### Signature - -```java -public String getDescription() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/ApiNinjaTriviaSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/ApiNinjaTriviaSkill.java) - -Line 23. - -*** - -### getName - -**Decorators:** `@Override` - -#### Signature - -```java -public String getName() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/ApiNinjaTriviaSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/ApiNinjaTriviaSkill.java) - -Line 22. - -*** - -### getSwaigFunctions - -**Decorators:** `@Override` - -#### Signature - -```java -public List> getSwaigFunctions() -``` - -#### Returns - -`List>` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/ApiNinjaTriviaSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/ApiNinjaTriviaSkill.java) - -Line 42. - -*** - -### registerTools - -**Decorators:** `@Override` - -#### Signature - -```java -public List registerTools() -``` - -#### Returns - -`List` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/ApiNinjaTriviaSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/ApiNinjaTriviaSkill.java) - -Line 37. - -*** - -### setup - -**Decorators:** `@Override` `@SuppressWarnings` - -#### Signature - -```java -public boolean setup(Map params) -``` - -#### Parameters - - - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/ApiNinjaTriviaSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/ApiNinjaTriviaSkill.java) - -Line 26. - -*** - -### supportsMultipleInstances - -**Decorators:** `@Override` - -#### Signature - -```java -public boolean supportsMultipleInstances() -``` - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/ApiNinjaTriviaSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/ApiNinjaTriviaSkill.java) - -Line 24. - -## Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/ApiNinjaTriviaSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/ApiNinjaTriviaSkill.java) - -Line 10. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/claude-skills-skill/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/claude-skills-skill/index.mdx deleted file mode 100644 index a24a3c09a7..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/claude-skills-skill/index.mdx +++ /dev/null @@ -1,207 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/skills/builtin/builtin/claude-skills-skill" -title: "ClaudeSkillsSkill" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.skills.builtin.ClaudeSkillsSkill" - parent: "com.signalwire.sdk.skills.builtin" - module: "com.signalwire.sdk.skills.builtin" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/ClaudeSkillsSkill.java" - visibility: "public" ---- -# `ClaudeSkillsSkill` - -Load SKILL.md files as agent tools. -Reads .md files from a directory, extracts YAML frontmatter, and creates tools. - -## Signature - -```java -public class ClaudeSkillsSkill implements SkillBase -``` - -## Inheritance - -**Implements:** [SkillBase](/docs/sdk-reference/reference/java/com/signalwire/sdk/skills/skills#skill-base) - -## Methods - -### \ - -#### Signature - -```java -public () -``` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/ClaudeSkillsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/ClaudeSkillsSkill.java) - -*** - -### getDescription - -**Decorators:** `@Override` - -#### Signature - -```java -public String getDescription() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/ClaudeSkillsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/ClaudeSkillsSkill.java) - -Line 29. - -*** - -### getHints - -**Decorators:** `@Override` - -#### Signature - -```java -public List getHints() -``` - -#### Returns - -`List` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/ClaudeSkillsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/ClaudeSkillsSkill.java) - -Line 109. - -*** - -### getName - -**Decorators:** `@Override` - -#### Signature - -```java -public String getName() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/ClaudeSkillsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/ClaudeSkillsSkill.java) - -Line 28. - -*** - -### getPromptSections - -**Decorators:** `@Override` - -#### Signature - -```java -public List> getPromptSections() -``` - -#### Returns - -`List>` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/ClaudeSkillsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/ClaudeSkillsSkill.java) - -Line 114. - -*** - -### registerTools - -**Decorators:** `@Override` - -#### Signature - -```java -public List registerTools() -``` - -#### Returns - -`List` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/ClaudeSkillsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/ClaudeSkillsSkill.java) - -Line 104. - -*** - -### setup - -**Decorators:** `@Override` `@SuppressWarnings` - -#### Signature - -```java -public boolean setup(Map params) -``` - -#### Parameters - - - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/ClaudeSkillsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/ClaudeSkillsSkill.java) - -Line 32. - -*** - -### supportsMultipleInstances - -**Decorators:** `@Override` - -#### Signature - -```java -public boolean supportsMultipleInstances() -``` - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/ClaudeSkillsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/ClaudeSkillsSkill.java) - -Line 30. - -## Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/ClaudeSkillsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/ClaudeSkillsSkill.java) - -Line 18. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/custom-skills-skill/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/custom-skills-skill/index.mdx deleted file mode 100644 index b2727d00f4..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/custom-skills-skill/index.mdx +++ /dev/null @@ -1,162 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/skills/builtin/builtin/custom-skills-skill" -title: "CustomSkillsSkill" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.skills.builtin.CustomSkillsSkill" - parent: "com.signalwire.sdk.skills.builtin" - module: "com.signalwire.sdk.skills.builtin" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/CustomSkillsSkill.java" - visibility: "public" ---- -# `CustomSkillsSkill` - -Register user-defined custom tools from configuration. - -## Signature - -```java -public class CustomSkillsSkill implements SkillBase -``` - -## Inheritance - -**Implements:** [SkillBase](/docs/sdk-reference/reference/java/com/signalwire/sdk/skills/skills#skill-base) - -## Methods - -### \ - -#### Signature - -```java -public () -``` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/CustomSkillsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/CustomSkillsSkill.java) - -*** - -### getDescription - -**Decorators:** `@Override` - -#### Signature - -```java -public String getDescription() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/CustomSkillsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/CustomSkillsSkill.java) - -Line 17. - -*** - -### getName - -**Decorators:** `@Override` - -#### Signature - -```java -public String getName() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/CustomSkillsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/CustomSkillsSkill.java) - -Line 16. - -*** - -### registerTools - -**Decorators:** `@Override` - -#### Signature - -```java -public List registerTools() -``` - -#### Returns - -`List` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/CustomSkillsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/CustomSkillsSkill.java) - -Line 44. - -*** - -### setup - -**Decorators:** `@Override` `@SuppressWarnings` - -#### Signature - -```java -public boolean setup(Map params) -``` - -#### Parameters - - - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/CustomSkillsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/CustomSkillsSkill.java) - -Line 20. - -*** - -### supportsMultipleInstances - -**Decorators:** `@Override` - -#### Signature - -```java -public boolean supportsMultipleInstances() -``` - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/CustomSkillsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/CustomSkillsSkill.java) - -Line 18. - -## Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/CustomSkillsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/CustomSkillsSkill.java) - -Line 12. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/datasphere-serverless-skill/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/datasphere-serverless-skill/index.mdx deleted file mode 100644 index bea5da143d..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/datasphere-serverless-skill/index.mdx +++ /dev/null @@ -1,226 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/skills/builtin/builtin/datasphere-serverless-skill" -title: "DatasphereServerlessSkill" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.skills.builtin.DatasphereServerlessSkill" - parent: "com.signalwire.sdk.skills.builtin" - module: "com.signalwire.sdk.skills.builtin" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatasphereServerlessSkill.java" - visibility: "public" ---- -# `DatasphereServerlessSkill` - -## Signature - -```java -public class DatasphereServerlessSkill implements SkillBase -``` - -## Inheritance - -**Implements:** [SkillBase](/docs/sdk-reference/reference/java/com/signalwire/sdk/skills/skills#skill-base) - -## Methods - -### \ - -#### Signature - -```java -public () -``` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/DatasphereServerlessSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatasphereServerlessSkill.java) - -*** - -### getDescription - -**Decorators:** `@Override` - -#### Signature - -```java -public String getDescription() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/DatasphereServerlessSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatasphereServerlessSkill.java) - -Line 22. - -*** - -### getGlobalData - -**Decorators:** `@Override` - -#### Signature - -```java -public Map getGlobalData() -``` - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/DatasphereServerlessSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatasphereServerlessSkill.java) - -Line 78. - -*** - -### getName - -**Decorators:** `@Override` - -#### Signature - -```java -public String getName() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/DatasphereServerlessSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatasphereServerlessSkill.java) - -Line 21. - -*** - -### getPromptSections - -**Decorators:** `@Override` - -#### Signature - -```java -public List> getPromptSections() -``` - -#### Returns - -`List>` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/DatasphereServerlessSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatasphereServerlessSkill.java) - -Line 66. - -*** - -### getSwaigFunctions - -**Decorators:** `@Override` - -#### Signature - -```java -public List> getSwaigFunctions() -``` - -#### Returns - -`List>` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/DatasphereServerlessSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatasphereServerlessSkill.java) - -Line 42. - -*** - -### registerTools - -**Decorators:** `@Override` - -#### Signature - -```java -public List registerTools() -``` - -#### Returns - -`List` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/DatasphereServerlessSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatasphereServerlessSkill.java) - -Line 37. - -*** - -### setup - -**Decorators:** `@Override` - -#### Signature - -```java -public boolean setup(Map params) -``` - -#### Parameters - - - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/DatasphereServerlessSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatasphereServerlessSkill.java) - -Line 25. - -*** - -### supportsMultipleInstances - -**Decorators:** `@Override` - -#### Signature - -```java -public boolean supportsMultipleInstances() -``` - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/DatasphereServerlessSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatasphereServerlessSkill.java) - -Line 23. - -## Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/DatasphereServerlessSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatasphereServerlessSkill.java) - -Line 11. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/datasphere-skill/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/datasphere-skill/index.mdx deleted file mode 100644 index 4717c123e5..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/datasphere-skill/index.mdx +++ /dev/null @@ -1,204 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/skills/builtin/builtin/datasphere-skill" -title: "DatasphereSkill" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.skills.builtin.DatasphereSkill" - parent: "com.signalwire.sdk.skills.builtin" - module: "com.signalwire.sdk.skills.builtin" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatasphereSkill.java" - visibility: "public" ---- -# `DatasphereSkill` - -## Signature - -```java -public class DatasphereSkill implements SkillBase -``` - -## Inheritance - -**Implements:** [SkillBase](/docs/sdk-reference/reference/java/com/signalwire/sdk/skills/skills#skill-base) - -## Methods - -### \ - -#### Signature - -```java -public () -``` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/DatasphereSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatasphereSkill.java) - -*** - -### getDescription - -**Decorators:** `@Override` - -#### Signature - -```java -public String getDescription() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/DatasphereSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatasphereSkill.java) - -Line 31. - -*** - -### getGlobalData - -**Decorators:** `@Override` - -#### Signature - -```java -public Map getGlobalData() -``` - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/DatasphereSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatasphereSkill.java) - -Line 144. - -*** - -### getName - -**Decorators:** `@Override` - -#### Signature - -```java -public String getName() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/DatasphereSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatasphereSkill.java) - -Line 30. - -*** - -### getPromptSections - -**Decorators:** `@Override` - -#### Signature - -```java -public List> getPromptSections() -``` - -#### Returns - -`List>` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/DatasphereSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatasphereSkill.java) - -Line 131. - -*** - -### registerTools - -**Decorators:** `@Override` `@SuppressWarnings` - -#### Signature - -```java -public List registerTools() -``` - -#### Returns - -`List` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/DatasphereSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatasphereSkill.java) - -Line 48. - -*** - -### setup - -**Decorators:** `@Override` - -#### Signature - -```java -public boolean setup(Map params) -``` - -#### Parameters - - - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/DatasphereSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatasphereSkill.java) - -Line 34. - -*** - -### supportsMultipleInstances - -**Decorators:** `@Override` - -#### Signature - -```java -public boolean supportsMultipleInstances() -``` - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/DatasphereSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatasphereSkill.java) - -Line 32. - -## Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/DatasphereSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatasphereSkill.java) - -Line 17. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/datetime-skill/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/datetime-skill/index.mdx deleted file mode 100644 index e7914fb395..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/datetime-skill/index.mdx +++ /dev/null @@ -1,182 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/skills/builtin/builtin/datetime-skill" -title: "DatetimeSkill" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.skills.builtin.DatetimeSkill" - parent: "com.signalwire.sdk.skills.builtin" - module: "com.signalwire.sdk.skills.builtin" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatetimeSkill.java" - visibility: "public" ---- -# `DatetimeSkill` - -## Signature - -```java -public class DatetimeSkill implements SkillBase -``` - -## Inheritance - -**Implements:** [SkillBase](/docs/sdk-reference/reference/java/com/signalwire/sdk/skills/skills#skill-base) - -## Methods - -### \ - -#### Signature - -```java -public () -``` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/DatetimeSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatetimeSkill.java) - -*** - -### getDescription - -**Decorators:** `@Override` - -#### Signature - -```java -public String getDescription() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/DatetimeSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatetimeSkill.java) - -Line 15. - -*** - -### getName - -**Decorators:** `@Override` - -#### Signature - -```java -public String getName() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/DatetimeSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatetimeSkill.java) - -Line 14. - -*** - -### getPromptSections - -**Decorators:** `@Override` - -#### Signature - -```java -public List> getPromptSections() -``` - -#### Returns - -`List>` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/DatetimeSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatetimeSkill.java) - -Line 66. - -*** - -### registerTools - -**Decorators:** `@Override` - -#### Signature - -```java -public List registerTools() -``` - -#### Returns - -`List` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/DatetimeSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatetimeSkill.java) - -Line 23. - -*** - -### setup - -**Decorators:** `@Override` - -#### Signature - -```java -public boolean setup(Map params) -``` - -#### Parameters - - - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/DatetimeSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatetimeSkill.java) - -Line 18. - -*** - -### supportsMultipleInstances - -**Decorators:** `@Override` - -#### Signature - -```java -public boolean supportsMultipleInstances() -``` - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/DatetimeSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatetimeSkill.java) - -Line 16. - -## Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/DatetimeSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/DatetimeSkill.java) - -Line 12. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/google-maps-skill/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/google-maps-skill/index.mdx deleted file mode 100644 index 87e8967239..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/google-maps-skill/index.mdx +++ /dev/null @@ -1,182 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/skills/builtin/builtin/google-maps-skill" -title: "GoogleMapsSkill" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.skills.builtin.GoogleMapsSkill" - parent: "com.signalwire.sdk.skills.builtin" - module: "com.signalwire.sdk.skills.builtin" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/GoogleMapsSkill.java" - visibility: "public" ---- -# `GoogleMapsSkill` - -## Signature - -```java -public class GoogleMapsSkill implements SkillBase -``` - -## Inheritance - -**Implements:** [SkillBase](/docs/sdk-reference/reference/java/com/signalwire/sdk/skills/skills#skill-base) - -## Methods - -### \ - -#### Signature - -```java -public () -``` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/GoogleMapsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/GoogleMapsSkill.java) - -*** - -### getDescription - -**Decorators:** `@Override` - -#### Signature - -```java -public String getDescription() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/GoogleMapsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/GoogleMapsSkill.java) - -Line 27. - -*** - -### getHints - -**Decorators:** `@Override` - -#### Signature - -```java -public List getHints() -``` - -#### Returns - -`List` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/GoogleMapsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/GoogleMapsSkill.java) - -Line 123. - -*** - -### getName - -**Decorators:** `@Override` - -#### Signature - -```java -public String getName() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/GoogleMapsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/GoogleMapsSkill.java) - -Line 26. - -*** - -### getPromptSections - -**Decorators:** `@Override` - -#### Signature - -```java -public List> getPromptSections() -``` - -#### Returns - -`List>` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/GoogleMapsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/GoogleMapsSkill.java) - -Line 128. - -*** - -### registerTools - -**Decorators:** `@Override` `@SuppressWarnings` - -#### Signature - -```java -public List registerTools() -``` - -#### Returns - -`List` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/GoogleMapsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/GoogleMapsSkill.java) - -Line 37. - -*** - -### setup - -**Decorators:** `@Override` - -#### Signature - -```java -public boolean setup(Map params) -``` - -#### Parameters - - - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/GoogleMapsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/GoogleMapsSkill.java) - -Line 29. - -## Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/GoogleMapsSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/GoogleMapsSkill.java) - -Line 18. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/index.mdx deleted file mode 100644 index a111a0526f..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/index.mdx +++ /dev/null @@ -1,67 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/skills/builtin/builtin" -title: "builtin" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "module" - language: "java" - qualified_name: "com.signalwire.sdk.skills.builtin" - module: "com.signalwire.sdk.skills.builtin" ---- -# `builtin` - -## Signature - -```java -package com.signalwire.sdk.skills.builtin -``` - -## Classes - - - - - - Load SKILL.md files as agent tools. Reads .md files from a directory, extracts YAML frontmatter, and creates tools. - - - - Register user-defined custom tools from configuration. - - - - - - - - - - - - - - - - - - Bridge MCP (Model Context Protocol) servers with SWAIG functions. - - - - Native vector search skill - supports remote mode only (network API). Local .swsearch file support is skipped per porting guide. - - - - - - - - - - - - - - diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/info-gatherer-skill/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/info-gatherer-skill/index.mdx deleted file mode 100644 index a6b8000aa3..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/info-gatherer-skill/index.mdx +++ /dev/null @@ -1,204 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/skills/builtin/builtin/info-gatherer-skill" -title: "InfoGathererSkill" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.skills.builtin.InfoGathererSkill" - parent: "com.signalwire.sdk.skills.builtin" - module: "com.signalwire.sdk.skills.builtin" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/InfoGathererSkill.java" - visibility: "public" ---- -# `InfoGathererSkill` - -## Signature - -```java -public class InfoGathererSkill implements SkillBase -``` - -## Inheritance - -**Implements:** [SkillBase](/docs/sdk-reference/reference/java/com/signalwire/sdk/skills/skills#skill-base) - -## Methods - -### \ - -#### Signature - -```java -public () -``` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/InfoGathererSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/InfoGathererSkill.java) - -*** - -### getDescription - -**Decorators:** `@Override` - -#### Signature - -```java -public String getDescription() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/InfoGathererSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/InfoGathererSkill.java) - -Line 17. - -*** - -### getGlobalData - -**Decorators:** `@Override` - -#### Signature - -```java -public Map getGlobalData() -``` - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/InfoGathererSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/InfoGathererSkill.java) - -Line 130. - -*** - -### getName - -**Decorators:** `@Override` - -#### Signature - -```java -public String getName() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/InfoGathererSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/InfoGathererSkill.java) - -Line 16. - -*** - -### getPromptSections - -**Decorators:** `@Override` - -#### Signature - -```java -public List> getPromptSections() -``` - -#### Returns - -`List>` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/InfoGathererSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/InfoGathererSkill.java) - -Line 116. - -*** - -### registerTools - -**Decorators:** `@Override` - -#### Signature - -```java -public List registerTools() -``` - -#### Returns - -`List` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/InfoGathererSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/InfoGathererSkill.java) - -Line 34. - -*** - -### setup - -**Decorators:** `@Override` `@SuppressWarnings` - -#### Signature - -```java -public boolean setup(Map params) -``` - -#### Parameters - - - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/InfoGathererSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/InfoGathererSkill.java) - -Line 20. - -*** - -### supportsMultipleInstances - -**Decorators:** `@Override` - -#### Signature - -```java -public boolean supportsMultipleInstances() -``` - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/InfoGathererSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/InfoGathererSkill.java) - -Line 18. - -## Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/InfoGathererSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/InfoGathererSkill.java) - -Line 9. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/joke-skill/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/joke-skill/index.mdx deleted file mode 100644 index 6a17d68eec..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/joke-skill/index.mdx +++ /dev/null @@ -1,204 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/skills/builtin/builtin/joke-skill" -title: "JokeSkill" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.skills.builtin.JokeSkill" - parent: "com.signalwire.sdk.skills.builtin" - module: "com.signalwire.sdk.skills.builtin" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/JokeSkill.java" - visibility: "public" ---- -# `JokeSkill` - -## Signature - -```java -public class JokeSkill implements SkillBase -``` - -## Inheritance - -**Implements:** [SkillBase](/docs/sdk-reference/reference/java/com/signalwire/sdk/skills/skills#skill-base) - -## Methods - -### \ - -#### Signature - -```java -public () -``` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/JokeSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/JokeSkill.java) - -*** - -### getDescription - -**Decorators:** `@Override` - -#### Signature - -```java -public String getDescription() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/JokeSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/JokeSkill.java) - -Line 16. - -*** - -### getGlobalData - -**Decorators:** `@Override` - -#### Signature - -```java -public Map getGlobalData() -``` - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/JokeSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/JokeSkill.java) - -Line 59. - -*** - -### getName - -**Decorators:** `@Override` - -#### Signature - -```java -public String getName() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/JokeSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/JokeSkill.java) - -Line 15. - -*** - -### getPromptSections - -**Decorators:** `@Override` - -#### Signature - -```java -public List> getPromptSections() -``` - -#### Returns - -`List>` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/JokeSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/JokeSkill.java) - -Line 47. - -*** - -### getSwaigFunctions - -**Decorators:** `@Override` - -#### Signature - -```java -public List> getSwaigFunctions() -``` - -#### Returns - -`List>` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/JokeSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/JokeSkill.java) - -Line 33. - -*** - -### registerTools - -**Decorators:** `@Override` - -#### Signature - -```java -public List registerTools() -``` - -#### Returns - -`List` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/JokeSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/JokeSkill.java) - -Line 27. - -*** - -### setup - -**Decorators:** `@Override` - -#### Signature - -```java -public boolean setup(Map params) -``` - -#### Parameters - - - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/JokeSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/JokeSkill.java) - -Line 18. - -## Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/JokeSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/JokeSkill.java) - -Line 10. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/math-skill/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/math-skill/index.mdx deleted file mode 100644 index 3d51b53987..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/math-skill/index.mdx +++ /dev/null @@ -1,182 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/skills/builtin/builtin/math-skill" -title: "MathSkill" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.skills.builtin.MathSkill" - parent: "com.signalwire.sdk.skills.builtin" - module: "com.signalwire.sdk.skills.builtin" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/MathSkill.java" - visibility: "public" ---- -# `MathSkill` - -## Signature - -```java -public class MathSkill implements SkillBase -``` - -## Inheritance - -**Implements:** [SkillBase](/docs/sdk-reference/reference/java/com/signalwire/sdk/skills/skills#skill-base) - -## Methods - -### \ - -#### Signature - -```java -public () -``` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/MathSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/MathSkill.java) - -*** - -### getDescription - -**Decorators:** `@Override` - -#### Signature - -```java -public String getDescription() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/MathSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/MathSkill.java) - -Line 12. - -*** - -### getName - -**Decorators:** `@Override` - -#### Signature - -```java -public String getName() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/MathSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/MathSkill.java) - -Line 11. - -*** - -### getPromptSections - -**Decorators:** `@Override` - -#### Signature - -```java -public List> getPromptSections() -``` - -#### Returns - -`List>` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/MathSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/MathSkill.java) - -Line 138. - -*** - -### registerTools - -**Decorators:** `@Override` - -#### Signature - -```java -public List registerTools() -``` - -#### Returns - -`List` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/MathSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/MathSkill.java) - -Line 20. - -*** - -### setup - -**Decorators:** `@Override` - -#### Signature - -```java -public boolean setup(Map params) -``` - -#### Parameters - - - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/MathSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/MathSkill.java) - -Line 15. - -*** - -### supportsMultipleInstances - -**Decorators:** `@Override` - -#### Signature - -```java -public boolean supportsMultipleInstances() -``` - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/MathSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/MathSkill.java) - -Line 13. - -## Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/MathSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/MathSkill.java) - -Line 9. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/mcp-gateway-skill/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/mcp-gateway-skill/index.mdx deleted file mode 100644 index 84632016dc..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/mcp-gateway-skill/index.mdx +++ /dev/null @@ -1,206 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/skills/builtin/builtin/mcp-gateway-skill" -title: "McpGatewaySkill" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.skills.builtin.McpGatewaySkill" - parent: "com.signalwire.sdk.skills.builtin" - module: "com.signalwire.sdk.skills.builtin" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/McpGatewaySkill.java" - visibility: "public" ---- -# `McpGatewaySkill` - -Bridge MCP (Model Context Protocol) servers with SWAIG functions. - -## Signature - -```java -public class McpGatewaySkill implements SkillBase -``` - -## Inheritance - -**Implements:** [SkillBase](/docs/sdk-reference/reference/java/com/signalwire/sdk/skills/skills#skill-base) - -## Methods - -### \ - -#### Signature - -```java -public () -``` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/McpGatewaySkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/McpGatewaySkill.java) - -*** - -### getDescription - -**Decorators:** `@Override` - -#### Signature - -```java -public String getDescription() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/McpGatewaySkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/McpGatewaySkill.java) - -Line 36. - -*** - -### getGlobalData - -**Decorators:** `@Override` - -#### Signature - -```java -public Map getGlobalData() -``` - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/McpGatewaySkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/McpGatewaySkill.java) - -Line 142. - -*** - -### getHints - -**Decorators:** `@Override` - -#### Signature - -```java -public List getHints() -``` - -#### Returns - -`List` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/McpGatewaySkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/McpGatewaySkill.java) - -Line 127. - -*** - -### getName - -**Decorators:** `@Override` - -#### Signature - -```java -public String getName() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/McpGatewaySkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/McpGatewaySkill.java) - -Line 35. - -*** - -### getPromptSections - -**Decorators:** `@Override` - -#### Signature - -```java -public List> getPromptSections() -``` - -#### Returns - -`List>` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/McpGatewaySkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/McpGatewaySkill.java) - -Line 134. - -*** - -### registerTools - -**Decorators:** `@Override` - -#### Signature - -```java -public List registerTools() -``` - -#### Returns - -`List` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/McpGatewaySkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/McpGatewaySkill.java) - -Line 122. - -*** - -### setup - -**Decorators:** `@Override` `@SuppressWarnings` - -#### Signature - -```java -public boolean setup(Map params) -``` - -#### Parameters - - - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/McpGatewaySkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/McpGatewaySkill.java) - -Line 38. - -## Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/McpGatewaySkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/McpGatewaySkill.java) - -Line 21. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/native-vector-search-skill/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/native-vector-search-skill/index.mdx deleted file mode 100644 index 09f5897e37..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/native-vector-search-skill/index.mdx +++ /dev/null @@ -1,185 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/skills/builtin/builtin/native-vector-search-skill" -title: "NativeVectorSearchSkill" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.skills.builtin.NativeVectorSearchSkill" - parent: "com.signalwire.sdk.skills.builtin" - module: "com.signalwire.sdk.skills.builtin" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/NativeVectorSearchSkill.java" - visibility: "public" ---- -# `NativeVectorSearchSkill` - -Native vector search skill - supports remote mode only (network API). -Local .swsearch file support is skipped per porting guide. - -## Signature - -```java -public class NativeVectorSearchSkill implements SkillBase -``` - -## Inheritance - -**Implements:** [SkillBase](/docs/sdk-reference/reference/java/com/signalwire/sdk/skills/skills#skill-base) - -## Methods - -### \ - -#### Signature - -```java -public () -``` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/NativeVectorSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/NativeVectorSearchSkill.java) - -*** - -### getDescription - -**Decorators:** `@Override` - -#### Signature - -```java -public String getDescription() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/NativeVectorSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/NativeVectorSearchSkill.java) - -Line 32. - -*** - -### getHints - -**Decorators:** `@Override` - -#### Signature - -```java -public List getHints() -``` - -#### Returns - -`List` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/NativeVectorSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/NativeVectorSearchSkill.java) - -Line 102. - -*** - -### getName - -**Decorators:** `@Override` - -#### Signature - -```java -public String getName() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/NativeVectorSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/NativeVectorSearchSkill.java) - -Line 31. - -*** - -### registerTools - -**Decorators:** `@Override` `@SuppressWarnings` - -#### Signature - -```java -public List registerTools() -``` - -#### Returns - -`List` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/NativeVectorSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/NativeVectorSearchSkill.java) - -Line 47. - -*** - -### setup - -**Decorators:** `@Override` `@SuppressWarnings` - -#### Signature - -```java -public boolean setup(Map params) -``` - -#### Parameters - - - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/NativeVectorSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/NativeVectorSearchSkill.java) - -Line 35. - -*** - -### supportsMultipleInstances - -**Decorators:** `@Override` - -#### Signature - -```java -public boolean supportsMultipleInstances() -``` - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/NativeVectorSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/NativeVectorSearchSkill.java) - -Line 33. - -## Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/NativeVectorSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/NativeVectorSearchSkill.java) - -Line 20. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/play-background-file-skill/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/play-background-file-skill/index.mdx deleted file mode 100644 index c1d82d11b8..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/play-background-file-skill/index.mdx +++ /dev/null @@ -1,182 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/skills/builtin/builtin/play-background-file-skill" -title: "PlayBackgroundFileSkill" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.skills.builtin.PlayBackgroundFileSkill" - parent: "com.signalwire.sdk.skills.builtin" - module: "com.signalwire.sdk.skills.builtin" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/PlayBackgroundFileSkill.java" - visibility: "public" ---- -# `PlayBackgroundFileSkill` - -## Signature - -```java -public class PlayBackgroundFileSkill implements SkillBase -``` - -## Inheritance - -**Implements:** [SkillBase](/docs/sdk-reference/reference/java/com/signalwire/sdk/skills/skills#skill-base) - -## Methods - -### \ - -#### Signature - -```java -public () -``` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/PlayBackgroundFileSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/PlayBackgroundFileSkill.java) - -*** - -### getDescription - -**Decorators:** `@Override` - -#### Signature - -```java -public String getDescription() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/PlayBackgroundFileSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/PlayBackgroundFileSkill.java) - -Line 16. - -*** - -### getName - -**Decorators:** `@Override` - -#### Signature - -```java -public String getName() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/PlayBackgroundFileSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/PlayBackgroundFileSkill.java) - -Line 15. - -*** - -### getSwaigFunctions - -**Decorators:** `@Override` - -#### Signature - -```java -public List> getSwaigFunctions() -``` - -#### Returns - -`List>` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/PlayBackgroundFileSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/PlayBackgroundFileSkill.java) - -Line 34. - -*** - -### registerTools - -**Decorators:** `@Override` - -#### Signature - -```java -public List registerTools() -``` - -#### Returns - -`List` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/PlayBackgroundFileSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/PlayBackgroundFileSkill.java) - -Line 29. - -*** - -### setup - -**Decorators:** `@Override` `@SuppressWarnings` - -#### Signature - -```java -public boolean setup(Map params) -``` - -#### Parameters - - - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/PlayBackgroundFileSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/PlayBackgroundFileSkill.java) - -Line 19. - -*** - -### supportsMultipleInstances - -**Decorators:** `@Override` - -#### Signature - -```java -public boolean supportsMultipleInstances() -``` - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/PlayBackgroundFileSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/PlayBackgroundFileSkill.java) - -Line 17. - -## Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/PlayBackgroundFileSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/PlayBackgroundFileSkill.java) - -Line 10. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/spider-skill/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/spider-skill/index.mdx deleted file mode 100644 index 4b32810e30..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/spider-skill/index.mdx +++ /dev/null @@ -1,182 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/skills/builtin/builtin/spider-skill" -title: "SpiderSkill" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.skills.builtin.SpiderSkill" - parent: "com.signalwire.sdk.skills.builtin" - module: "com.signalwire.sdk.skills.builtin" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/SpiderSkill.java" - visibility: "public" ---- -# `SpiderSkill` - -## Signature - -```java -public class SpiderSkill implements SkillBase -``` - -## Inheritance - -**Implements:** [SkillBase](/docs/sdk-reference/reference/java/com/signalwire/sdk/skills/skills#skill-base) - -## Methods - -### \ - -#### Signature - -```java -public () -``` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/SpiderSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/SpiderSkill.java) - -*** - -### getDescription - -**Decorators:** `@Override` - -#### Signature - -```java -public String getDescription() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/SpiderSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/SpiderSkill.java) - -Line 24. - -*** - -### getHints - -**Decorators:** `@Override` - -#### Signature - -```java -public List getHints() -``` - -#### Returns - -`List` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/SpiderSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/SpiderSkill.java) - -Line 120. - -*** - -### getName - -**Decorators:** `@Override` - -#### Signature - -```java -public String getName() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/SpiderSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/SpiderSkill.java) - -Line 23. - -*** - -### registerTools - -**Decorators:** `@Override` - -#### Signature - -```java -public List registerTools() -``` - -#### Returns - -`List` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/SpiderSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/SpiderSkill.java) - -Line 35. - -*** - -### setup - -**Decorators:** `@Override` - -#### Signature - -```java -public boolean setup(Map params) -``` - -#### Parameters - - - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/SpiderSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/SpiderSkill.java) - -Line 27. - -*** - -### supportsMultipleInstances - -**Decorators:** `@Override` - -#### Signature - -```java -public boolean supportsMultipleInstances() -``` - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/SpiderSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/SpiderSkill.java) - -Line 25. - -## Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/SpiderSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/SpiderSkill.java) - -Line 15. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/swml-transfer-skill/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/swml-transfer-skill/index.mdx deleted file mode 100644 index 157a50b4ae..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/swml-transfer-skill/index.mdx +++ /dev/null @@ -1,226 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/skills/builtin/builtin/swml-transfer-skill" -title: "SwmlTransferSkill" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.skills.builtin.SwmlTransferSkill" - parent: "com.signalwire.sdk.skills.builtin" - module: "com.signalwire.sdk.skills.builtin" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/SwmlTransferSkill.java" - visibility: "public" ---- -# `SwmlTransferSkill` - -## Signature - -```java -public class SwmlTransferSkill implements SkillBase -``` - -## Inheritance - -**Implements:** [SkillBase](/docs/sdk-reference/reference/java/com/signalwire/sdk/skills/skills#skill-base) - -## Methods - -### \ - -#### Signature - -```java -public () -``` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/SwmlTransferSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/SwmlTransferSkill.java) - -*** - -### getDescription - -**Decorators:** `@Override` - -#### Signature - -```java -public String getDescription() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/SwmlTransferSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/SwmlTransferSkill.java) - -Line 20. - -*** - -### getHints - -**Decorators:** `@Override` - -#### Signature - -```java -public List getHints() -``` - -#### Returns - -`List` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/SwmlTransferSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/SwmlTransferSkill.java) - -Line 82. - -*** - -### getName - -**Decorators:** `@Override` - -#### Signature - -```java -public String getName() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/SwmlTransferSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/SwmlTransferSkill.java) - -Line 19. - -*** - -### getPromptSections - -**Decorators:** `@Override` - -#### Signature - -```java -public List> getPromptSections() -``` - -#### Returns - -`List>` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/SwmlTransferSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/SwmlTransferSkill.java) - -Line 91. - -*** - -### getSwaigFunctions - -**Decorators:** `@Override` - -#### Signature - -```java -public List> getSwaigFunctions() -``` - -#### Returns - -`List>` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/SwmlTransferSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/SwmlTransferSkill.java) - -Line 42. - -*** - -### registerTools - -**Decorators:** `@Override` - -#### Signature - -```java -public List registerTools() -``` - -#### Returns - -`List` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/SwmlTransferSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/SwmlTransferSkill.java) - -Line 37. - -*** - -### setup - -**Decorators:** `@Override` `@SuppressWarnings` - -#### Signature - -```java -public boolean setup(Map params) -``` - -#### Parameters - - - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/SwmlTransferSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/SwmlTransferSkill.java) - -Line 23. - -*** - -### supportsMultipleInstances - -**Decorators:** `@Override` - -#### Signature - -```java -public boolean supportsMultipleInstances() -``` - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/SwmlTransferSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/SwmlTransferSkill.java) - -Line 21. - -## Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/SwmlTransferSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/SwmlTransferSkill.java) - -Line 10. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/weather-api-skill/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/weather-api-skill/index.mdx deleted file mode 100644 index f1353e3115..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/weather-api-skill/index.mdx +++ /dev/null @@ -1,160 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/skills/builtin/builtin/weather-api-skill" -title: "WeatherApiSkill" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.skills.builtin.WeatherApiSkill" - parent: "com.signalwire.sdk.skills.builtin" - module: "com.signalwire.sdk.skills.builtin" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WeatherApiSkill.java" - visibility: "public" ---- -# `WeatherApiSkill` - -## Signature - -```java -public class WeatherApiSkill implements SkillBase -``` - -## Inheritance - -**Implements:** [SkillBase](/docs/sdk-reference/reference/java/com/signalwire/sdk/skills/skills#skill-base) - -## Methods - -### \ - -#### Signature - -```java -public () -``` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/WeatherApiSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WeatherApiSkill.java) - -*** - -### getDescription - -**Decorators:** `@Override` - -#### Signature - -```java -public String getDescription() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/WeatherApiSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WeatherApiSkill.java) - -Line 17. - -*** - -### getName - -**Decorators:** `@Override` - -#### Signature - -```java -public String getName() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/WeatherApiSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WeatherApiSkill.java) - -Line 16. - -*** - -### getSwaigFunctions - -**Decorators:** `@Override` - -#### Signature - -```java -public List> getSwaigFunctions() -``` - -#### Returns - -`List>` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/WeatherApiSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WeatherApiSkill.java) - -Line 36. - -*** - -### registerTools - -**Decorators:** `@Override` - -#### Signature - -```java -public List registerTools() -``` - -#### Returns - -`List` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/WeatherApiSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WeatherApiSkill.java) - -Line 31. - -*** - -### setup - -**Decorators:** `@Override` - -#### Signature - -```java -public boolean setup(Map params) -``` - -#### Parameters - - - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/WeatherApiSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WeatherApiSkill.java) - -Line 19. - -## Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/WeatherApiSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WeatherApiSkill.java) - -Line 10. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/web-search-skill/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/web-search-skill/index.mdx deleted file mode 100644 index 02787ccf9a..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/web-search-skill/index.mdx +++ /dev/null @@ -1,254 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/skills/builtin/builtin/web-search-skill" -title: "WebSearchSkill" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.skills.builtin.WebSearchSkill" - parent: "com.signalwire.sdk.skills.builtin" - module: "com.signalwire.sdk.skills.builtin" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WebSearchSkill.java" - visibility: "public" ---- -# `WebSearchSkill` - -## Signature - -```java -public class WebSearchSkill implements SkillBase -``` - -## Inheritance - -**Implements:** [SkillBase](/docs/sdk-reference/reference/java/com/signalwire/sdk/skills/skills#skill-base) - -## Methods - -### \ - -#### Signature - -```java -public () -``` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/WebSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WebSearchSkill.java) - -*** - -### getDescription - -**Decorators:** `@Override` - -#### Signature - -```java -public String getDescription() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/WebSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WebSearchSkill.java) - -Line 58. - -*** - -### getGlobalData - -**Decorators:** `@Override` - -#### Signature - -```java -public Map getGlobalData() -``` - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/WebSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WebSearchSkill.java) - -Line 465. - -*** - -### getName - -**Decorators:** `@Override` - -#### Signature - -```java -public String getName() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/WebSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WebSearchSkill.java) - -Line 57. - -*** - -### getParameterSchema - -Advertise every configurable param so GUI tooling can discover it. -Mirrors Python's get\_parameter\_schema (commit 295745b), including the -six latency / response params. - -Each setup() read must appear here. - -**Decorators:** `@Override` - -#### Signature - -```java -public Map getParameterSchema() -``` - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/WebSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WebSearchSkill.java) - -Line 479. - -*** - -### getPromptSections - -**Decorators:** `@Override` - -#### Signature - -```java -public List> getPromptSections() -``` - -#### Returns - -`List>` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/WebSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WebSearchSkill.java) - -Line 452. - -*** - -### getVersion - -**Decorators:** `@Override` - -#### Signature - -```java -public String getVersion() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/WebSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WebSearchSkill.java) - -Line 59. - -*** - -### registerTools - -**Decorators:** `@Override` - -#### Signature - -```java -public List registerTools() -``` - -#### Returns - -`List` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/WebSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WebSearchSkill.java) - -Line 104. - -*** - -### setup - -**Decorators:** `@Override` - -#### Signature - -```java -public boolean setup(Map params) -``` - -#### Parameters - - - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/WebSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WebSearchSkill.java) - -Line 62. - -*** - -### supportsMultipleInstances - -**Decorators:** `@Override` - -#### Signature - -```java -public boolean supportsMultipleInstances() -``` - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/WebSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WebSearchSkill.java) - -Line 60. - -## Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/WebSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WebSearchSkill.java) - -Line 23. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/wikipedia-search-skill/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/wikipedia-search-skill/index.mdx deleted file mode 100644 index 8e58c13f53..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/skills/builtin/builtin/wikipedia-search-skill/index.mdx +++ /dev/null @@ -1,160 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/skills/builtin/builtin/wikipedia-search-skill" -title: "WikipediaSearchSkill" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.skills.builtin.WikipediaSearchSkill" - parent: "com.signalwire.sdk.skills.builtin" - module: "com.signalwire.sdk.skills.builtin" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WikipediaSearchSkill.java" - visibility: "public" ---- -# `WikipediaSearchSkill` - -## Signature - -```java -public class WikipediaSearchSkill implements SkillBase -``` - -## Inheritance - -**Implements:** [SkillBase](/docs/sdk-reference/reference/java/com/signalwire/sdk/skills/skills#skill-base) - -## Methods - -### \ - -#### Signature - -```java -public () -``` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/WikipediaSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WikipediaSearchSkill.java) - -*** - -### getDescription - -**Decorators:** `@Override` - -#### Signature - -```java -public String getDescription() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/WikipediaSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WikipediaSearchSkill.java) - -Line 26. - -*** - -### getName - -**Decorators:** `@Override` - -#### Signature - -```java -public String getName() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/WikipediaSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WikipediaSearchSkill.java) - -Line 25. - -*** - -### getPromptSections - -**Decorators:** `@Override` - -#### Signature - -```java -public List> getPromptSections() -``` - -#### Returns - -`List>` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/WikipediaSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WikipediaSearchSkill.java) - -Line 106. - -*** - -### registerTools - -**Decorators:** `@Override` `@SuppressWarnings` - -#### Signature - -```java -public List registerTools() -``` - -#### Returns - -`List` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/WikipediaSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WikipediaSearchSkill.java) - -Line 40. - -*** - -### setup - -**Decorators:** `@Override` - -#### Signature - -```java -public boolean setup(Map params) -``` - -#### Parameters - - - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/WikipediaSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WikipediaSearchSkill.java) - -Line 28. - -## Source - -[`src/main/java/com/signalwire/sdk/skills/builtin/WikipediaSearchSkill.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/builtin/WikipediaSearchSkill.java) - -Line 18. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/skills/skills/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/skills/skills/index.mdx deleted file mode 100644 index 9b17c7a8fc..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/skills/skills/index.mdx +++ /dev/null @@ -1,574 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/skills/skills" -title: "skills" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "module" - language: "java" - qualified_name: "com.signalwire.sdk.skills" - module: "com.signalwire.sdk.skills" ---- -# `skills` - -## Signature - -```java -package com.signalwire.sdk.skills -``` - -## Classes - - - - Manages skill lifecycle: instantiation, validation, registration with the agent. - - - - Static registry of all available skills. Skills are registered by name and can be instantiated on demand. <p>The class also exposes a small per-instance surface for Python-parity: an instance constructor and `#addSkillDirectory(String)` mirror Python's `SkillRegistry().add_skill_directory(path)`. - - - -## Interfaces - -### SkillBase - -Interface for all skills. - -Skills are modular capabilities that can be -added to agents to provide tools, prompts, hints, and global data. - -#### Signature - -```java -public interface SkillBase -``` - -#### Methods - -##### cleanup - -Cleanup resources. - -**Modifiers:** `default` - -###### Signature - -```java -default void cleanup() -``` - -###### Source - -[`src/main/java/com/signalwire/sdk/skills/SkillBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillBase.java) - -Line 68. - -*** - -##### getDescription - -Human-readable description. - -###### Signature - -```java -String getDescription() -``` - -###### Returns - -`String` - -###### Source - -[`src/main/java/com/signalwire/sdk/skills/SkillBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillBase.java) - -Line 17. - -*** - -##### getExtraFields - -Get extra fields to merge into all tool definitions (e.g., fillers). - -**Modifiers:** `default` - -###### Signature - -```java -default Map getExtraFields() -``` - -###### Returns - -`Map` - -###### Source - -[`src/main/java/com/signalwire/sdk/skills/SkillBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillBase.java) - -Line 83. - -*** - -##### getGlobalData - -Get global data to merge into the agent. - -**Modifiers:** `default` - -###### Signature - -```java -default Map getGlobalData() -``` - -###### Returns - -`Map` - -###### Source - -[`src/main/java/com/signalwire/sdk/skills/SkillBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillBase.java) - -Line 52. - -*** - -##### getHints - -Get speech recognition hints for this skill. - -**Modifiers:** `default` - -###### Signature - -```java -default List getHints() -``` - -###### Returns - -`List` - -###### Source - -[`src/main/java/com/signalwire/sdk/skills/SkillBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillBase.java) - -Line 47. - -*** - -##### getInstanceKey - -Get unique instance key (for multi-instance skills). - -**Modifiers:** `default` - -###### Signature - -```java -default String getInstanceKey() -``` - -###### Returns - -`String` - -###### Source - -[`src/main/java/com/signalwire/sdk/skills/SkillBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillBase.java) - -Line 78. - -*** - -##### getName - -Unique skill name. - -###### Signature - -```java -String getName() -``` - -###### Returns - -`String` - -###### Source - -[`src/main/java/com/signalwire/sdk/skills/SkillBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillBase.java) - -Line 14. - -*** - -##### getParameterSchema - -Get parameter schema for GUI tools. - -**Modifiers:** `default` - -###### Signature - -```java -default Map getParameterSchema() -``` - -###### Returns - -`Map` - -###### Source - -[`src/main/java/com/signalwire/sdk/skills/SkillBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillBase.java) - -Line 73. - -*** - -##### getPromptSections - -Get prompt sections to inject into the agent. -Each section is a map with: title, body, bullets (optional) - -**Modifiers:** `default` - -###### Signature - -```java -default List> getPromptSections() -``` - -###### Returns - -`List>` - -###### Source - -[`src/main/java/com/signalwire/sdk/skills/SkillBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillBase.java) - -Line 58. - -*** - -##### getRequiredEnvVars - -Required environment variables. - -**Modifiers:** `default` - -###### Signature - -```java -default List getRequiredEnvVars() -``` - -###### Returns - -`List` - -###### Source - -[`src/main/java/com/signalwire/sdk/skills/SkillBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillBase.java) - -Line 26. - -*** - -##### getRequiredPackages - -Required packages (informational). - -**Modifiers:** `default` - -###### Signature - -```java -default List getRequiredPackages() -``` - -###### Returns - -`List` - -###### Source - -[`src/main/java/com/signalwire/sdk/skills/SkillBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillBase.java) - -Line 29. - -*** - -##### getSwaigFunctions - -Get SWAIG functions (for DataMap-based skills that bypass handlers). - -**Modifiers:** `default` - -###### Signature - -```java -default List> getSwaigFunctions() -``` - -###### Returns - -`List>` - -###### Source - -[`src/main/java/com/signalwire/sdk/skills/SkillBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillBase.java) - -Line 63. - -*** - -##### getVersion - -Semantic version string. - -**Modifiers:** `default` - -###### Signature - -```java -default String getVersion() -``` - -###### Returns - -`String` - -###### Source - -[`src/main/java/com/signalwire/sdk/skills/SkillBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillBase.java) - -Line 20. - -*** - -##### registerTools - -Register tools with the agent. - -###### Signature - -```java -List registerTools() -``` - -###### Returns - -`List` — List of tool definitions to register - -###### Source - -[`src/main/java/com/signalwire/sdk/skills/SkillBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillBase.java) - -Line 42. - -*** - -##### setup - -Initialize the skill with parameters. - -###### Signature - -```java -boolean setup(Map params) -``` - -###### Parameters - - - Configuration parameters - - -###### Returns - -`boolean` — true if setup succeeded - -###### Source - -[`src/main/java/com/signalwire/sdk/skills/SkillBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillBase.java) - -Line 36. - -*** - -##### supportsMultipleInstances - -Whether multiple instances can be loaded with different configs. - -**Modifiers:** `default` - -###### Signature - -```java -default boolean supportsMultipleInstances() -``` - -###### Returns - -`boolean` - -###### Source - -[`src/main/java/com/signalwire/sdk/skills/SkillBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillBase.java) - -Line 23. - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/SkillBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillBase.java) - -Line 11. - -## Enums - -### SkillName - -Built-in skill names as a typed, compile-time-checked closed set. - -<p>java.util.Map) -(and the matching `removeSkill` / `hasSkill` overloads) accept -this enum <em>or</em> a plain `String`. - -The enum gives editor -autocompletion and makes a typo fail at compile time (a bare string like -`"datetiem"` only fails at runtime, on the server). Strings keep -parity with the Python reference (which uses bare `str`) and still -allow custom / third-party skills that aren't built in: - -<pre>// typed, autocompleted -agent.addSkill("datetime"); // string still works (parity) -agent.addSkill("my_custom_skill"); // open set: custom skills ok</pre> - -<p>Each constant's value is the canonical wire string -(the key the skill registers under in `SkillRegistry`), so routing a -call through the enum is byte-for-byte identical to passing that string. - -#### Signature - -```java -public enum SkillName -``` - -#### Variants - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -#### Methods - -##### getValue - -The canonical wire string for this skill — the name it registers under -in `SkillRegistry`. - -Equivalent to PHP's backed-enum `->value`. - -###### Signature - -```java -public String getValue() -``` - -###### Returns - -`String` — the lower-case-with-underscores skill name. - -###### Source - -[`src/main/java/com/signalwire/sdk/skills/SkillName.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillName.java) - -Line 57. - -*** - -##### valueOf - -**Modifiers:** `static` - -###### Signature - -```java -public static SkillName valueOf(String name) -``` - -###### Parameters - - - -###### Returns - -`SkillName` - -###### Source - -[`src/main/java/com/signalwire/sdk/skills/SkillName.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillName.java) - -*** - -##### values - -**Modifiers:** `static` - -###### Signature - -```java -public static SkillName[] values() -``` - -###### Returns - -`SkillName[]` - -###### Source - -[`src/main/java/com/signalwire/sdk/skills/SkillName.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillName.java) - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/SkillName.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillName.java) - -Line 24. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/skills/skills/skill-manager/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/skills/skills/skill-manager/index.mdx deleted file mode 100644 index 838de7af9c..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/skills/skills/skill-manager/index.mdx +++ /dev/null @@ -1,173 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/skills/skills/skill-manager" -title: "SkillManager" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.skills.SkillManager" - parent: "com.signalwire.sdk.skills" - module: "com.signalwire.sdk.skills" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillManager.java" - visibility: "public" ---- -# `SkillManager` - -Manages skill lifecycle: instantiation, validation, registration with the agent. - -## Signature - -```java -public class SkillManager -``` - -## Methods - -### \ - -#### Signature - -```java -public (AgentBase agent) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/SkillManager.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillManager.java) - -Line 19. - -*** - -### addSkill - -Add a skill to the agent. -1\. - -Get skill factory from registry -2\. Create instance -3\. Check for duplicates -4\. Validate env vars -5\. Call setup() -6\. Register tools -7\. Merge hints -8\. Merge global data -9\. Add prompt sections - -#### Signature - -```java -public void addSkill(String skillName, Map params) -``` - -#### Parameters - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/SkillManager.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillManager.java) - -Line 35. - -*** - -### cleanup - -Cleanup all skills. - -#### Signature - -```java -public void cleanup() -``` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/SkillManager.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillManager.java) - -Line 159. - -*** - -### hasSkill - -Check if a skill is active. - -#### Signature - -```java -public boolean hasSkill(String skillName) -``` - -#### Parameters - - - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/SkillManager.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillManager.java) - -Line 152. - -*** - -### listSkills - -List active skill instance keys. - -#### Signature - -```java -public List listSkills() -``` - -#### Returns - -`List` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/SkillManager.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillManager.java) - -Line 145. - -*** - -### removeSkill - -Remove a skill from the agent. - -#### Signature - -```java -public void removeSkill(String skillName) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/SkillManager.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillManager.java) - -Line 134. - -## Source - -[`src/main/java/com/signalwire/sdk/skills/SkillManager.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillManager.java) - -Line 12. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/skills/skills/skill-registry/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/skills/skills/skill-registry/index.mdx deleted file mode 100644 index bdacd92b59..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/skills/skills/skill-registry/index.mdx +++ /dev/null @@ -1,288 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/skills/skills/skill-registry" -title: "SkillRegistry" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.skills.SkillRegistry" - parent: "com.signalwire.sdk.skills" - module: "com.signalwire.sdk.skills" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillRegistry.java" - visibility: "public" ---- -# `SkillRegistry` - -Static registry of all available skills. -Skills are registered by name and can be instantiated on demand. - -<p>The class also exposes a small per-instance surface for -Python-parity: an instance constructor and `#addSkillDirectory(String)` -mirror Python's `SkillRegistry().add_skill_directory(path)`. - -The -static registry is kept for the existing Java idiom; instance state is -limited to the external skill directories list. - -**Modifiers:** `final` - -## Signature - -```java -public final class SkillRegistry -``` - -## Methods - -### \ - -Public no-arg constructor so callers can manage their own -external-paths list. - -The static registry is unaffected. - -#### Signature - -```java -public () -``` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/SkillRegistry.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillRegistry.java) - -Line 53. - -*** - -### addSkillDirectory - -Add a directory to search for skills. - -<p>Mirrors Python's -`signalwire.skills.registry.SkillRegistry.add_skill_directory`: -validate that the path exists and is a directory, then append it -(de-duplicated) to `externalPaths`. - -Throws -`IllegalArgumentException` (the Java analog of Python's -`ValueError`) for non-existent paths or non-directories. - -**Modifiers:** `synchronized` - -#### Signature - -```java -public synchronized void addSkillDirectory(String path) -``` - -#### Parameters - - - absolute or relative path to a directory containing skill subdirectories - - -#### Throws - -- `IllegalArgumentException` — when the path doesn't exist or isn't a directory. - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/SkillRegistry.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillRegistry.java) - -Line 110. - -*** - -### get - -Get a new instance of a skill by name. - -**Modifiers:** `static` - -#### Signature - -```java -public static SkillBase get(String name) -``` - -#### Parameters - - - -#### Returns - -`SkillBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/SkillRegistry.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillRegistry.java) - -Line 66. - -*** - -### getAllSkillsSchema - -Get complete schema for all registered skills. - -<p>Mirrors Python's instance-method -`SkillRegistry.get_all_skills_schema()` — returns a map -keyed by skill name where each value contains parameter metadata. -Java skills don't carry rich Python-style parameter introspection -in v1, so the value defaults to a minimal shape with the skill -name; built-in skills that expose `getSkillDescription` / -`getSkillVersion` get those merged in. - -#### Signature - -```java -public Map> getAllSkillsSchema() -``` - -#### Returns - -`Map>` — ordered map of skill name to schema metadata - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/SkillRegistry.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillRegistry.java) - -Line 146. - -*** - -### getExternalPaths - -Returns an immutable copy of the registered external skill -directories. - -Parity surface for Python's `_external_paths`. - -**Modifiers:** `synchronized` - -#### Signature - -```java -public synchronized List getExternalPaths() -``` - -#### Returns - -`List` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/SkillRegistry.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillRegistry.java) - -Line 129. - -*** - -### has - -Check if a skill is registered. - -**Modifiers:** `static` - -#### Signature - -```java -public static boolean has(String name) -``` - -#### Parameters - - - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/SkillRegistry.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillRegistry.java) - -Line 77. - -*** - -### list - -List all registered skill names. - -**Modifiers:** `static` - -#### Signature - -```java -public static Set list() -``` - -#### Returns - -`Set` - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/SkillRegistry.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillRegistry.java) - -Line 84. - -*** - -### register - -Register a skill factory. - -**Modifiers:** `static` - -#### Signature - -```java -public static void register(String name, Supplier factory) -``` - -#### Parameters - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/SkillRegistry.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillRegistry.java) - -Line 58. - -*** - -### unregister - -Unregister a skill (for testing). - -**Modifiers:** `static` - -#### Signature - -```java -public static void unregister(String name) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/skills/SkillRegistry.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillRegistry.java) - -Line 91. - -## Source - -[`src/main/java/com/signalwire/sdk/skills/SkillRegistry.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/skills/SkillRegistry.java) - -Line 21. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/swaig/swaig/function-result/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/swaig/swaig/function-result/index.mdx deleted file mode 100644 index 4b63b2fa59..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/swaig/swaig/function-result/index.mdx +++ /dev/null @@ -1,2454 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/swaig/swaig/function-result" -title: "FunctionResult" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.swaig.FunctionResult" - parent: "com.signalwire.sdk.swaig" - module: "com.signalwire.sdk.swaig" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java" - visibility: "public" ---- -# `FunctionResult` - -SwaigFunctionResult - the response builder returned by tool handlers. - -<p> -Every method returns `this` for fluent chaining. - -Contains 40+ action methods -covering call control, state management, media, speech/AI config, and advanced features. - -<p> -Serialization rules: -<ul> - <li>response - always included (string)</li> - <li>action - only included if at least one action exists (array of objects)</li> - <li>post_process - only included if true and actions exist (boolean)</li> -</ul> - -## Signature - -```java -public class FunctionResult -``` - -## Constants - - - Default `ai_response` for `#pay`. Set as a `set` verb ahead of the `pay` verb so the AI relays the payment outcome via the `${pay_result`\} variable. Caller-overridable through the full-arity `pay(...)` overload. - - -## Methods - -### \ - -#### Signature - - - - ```java - public () - ``` - - - - ```java - public (String response) - ``` - - - - ```java - public (String response, boolean postProcess) - ``` - - - -#### Parameters (Overload 2) - - - -#### Parameters (Overload 3) - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) - -Line 38. - -*** - -### addAction - -Add a single action to the response. - -#### Signature - -```java -public FunctionResult addAction(String name, Object data) -``` - -#### Parameters - - - - - -#### Returns - -`FunctionResult` - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) - -Line 67. - -*** - -### addActions - -Add multiple actions. - -#### Signature - -```java -public FunctionResult addActions(List> actionList) -``` - -#### Parameters - - - -#### Returns - -`FunctionResult` - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) - -Line 77. - -*** - -### addDynamicHints - -#### Signature - -```java -public FunctionResult addDynamicHints(List hints) -``` - -#### Parameters - - - -#### Returns - -`FunctionResult` - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) - -Line 439. - -*** - -### clearDynamicHints - -#### Signature - -```java -public FunctionResult clearDynamicHints() -``` - -#### Returns - -`FunctionResult` - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) - -Line 443. - -*** - -### connect - -Connect/transfer the call to another destination via SWML connect verb. - -#### Signature - - - - ```java - public FunctionResult connect(String destination, boolean isFinal, String from) - ``` - - - - ```java - public FunctionResult connect(String destination, boolean isFinal) - ``` - - - -#### Parameters (Overload 1) - - - - - - - -#### Parameters (Overload 2) - - - - - -#### Returns (Overload 1) - -`FunctionResult` - -#### Returns (Overload 2) - -`FunctionResult` - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) - -Line 87. - -*** - -### createPaymentAction - -**Modifiers:** `static` - -#### Signature - -```java -public static Map createPaymentAction( - String actionType, - String phrase -) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) - -Line 1074. - -*** - -### createPaymentParameter - -**Modifiers:** `static` - -#### Signature - -```java -public static Map createPaymentParameter( - String name, - String value -) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) - -Line 1078. - -*** - -### createPaymentPrompt - -**Modifiers:** `static` - -#### Signature - -```java -public static Map createPaymentPrompt( - String forSituation, - List> payActions, - String cardType, - String errorType -) -``` - -#### Parameters - - - - - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) - -Line 1063. - -*** - -### enableExtensiveData - -#### Signature - -```java -public FunctionResult enableExtensiveData(boolean enabled) -``` - -#### Parameters - - - -#### Returns - -`FunctionResult` - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) - -Line 466. - -*** - -### enableFunctionsOnTimeout - -#### Signature - -```java -public FunctionResult enableFunctionsOnTimeout(boolean enabled) -``` - -#### Parameters - - - -#### Returns - -`FunctionResult` - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) - -Line 462. - -*** - -### executeRpc - -Execute an RPC method via SWML. - -#### Signature - - - - ```java - public FunctionResult executeRpc( - String method, - Map params, - String callId, - String nodeId - ) - ``` - - - - ```java - public FunctionResult executeRpc(String method, Map params) - ``` - - - -#### Parameters (Overload 1) - - - - - - - - - -#### Parameters (Overload 2) - - - - - -#### Returns (Overload 1) - -`FunctionResult` - -#### Returns (Overload 2) - -`FunctionResult` - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) - -Line 972. - -*** - -### executeSwml - -Execute SWML content with optional transfer behavior. - -#### Signature - - - - ```java - public FunctionResult executeSwml(Object swmlContent, boolean transfer) - ``` - - - - ```java - public FunctionResult executeSwml(Object swmlContent) - ``` - - - -#### Parameters (Overload 1) - - - - - -#### Parameters (Overload 2) - - - -#### Returns (Overload 1) - -`FunctionResult` - -#### Returns (Overload 2) - -`FunctionResult` - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) - -Line 482. - -*** - -### getActions - -#### Signature - -```java -public List> getActions() -``` - -#### Returns - -`List>` - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) - -Line 1117. - -*** - -### getResponse - -#### Signature - -```java -public String getResponse() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) - -Line 1113. - -*** - -### hangup - -Hangup the call. - -#### Signature - -```java -public FunctionResult hangup() -``` - -#### Returns - -`FunctionResult` - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) - -Line 128. - -*** - -### hold - -Put the call on hold (timeout clamped 0-900). - -#### Signature - -```java -public FunctionResult hold(int timeout) -``` - -#### Parameters - - - -#### Returns - -`FunctionResult` - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) - -Line 135. - -*** - -### isPostProcess - -#### Signature - -```java -public boolean isPostProcess() -``` - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) - -Line 1121. - -*** - -### joinConference - -Join an ad-hoc audio conference with RELAY and CXML calls using SWML. - -<p> -Functional parity with the Python reference -`signalwire.core.function_result.FunctionResult.join_conference`. -Every optional parameter the reference exposes is a positional argument -here, with the same default and the same validation. - -Hold music is -`waitUrl` (snake\_case wire key `wait_url`) — there is no -separate "hold audio" parameter; the reference uses `wait_url`. - -#### Signature - - - - ```java - public FunctionResult joinConference( - String name, - boolean muted, - String beep, - boolean startOnEnter, - boolean endOnExit, - String waitUrl, - int maxParticipants, - String record, - String region, - String trim, - String coach, - String statusCallbackEvent, - String statusCallback, - String statusCallbackMethod, - String recordingStatusCallback, - String recordingStatusCallbackMethod, - String recordingStatusCallbackEvent, - Object result - ) - ``` - - - - ```java - public FunctionResult joinConference(String name) - ``` - - - -#### Parameters (Overload 1) - - - conference name (required, must be non-blank) - - - - join muted (default `false`) - - - - "true", "false", "onEnter", "onExit" (default "true") - - - - conference starts when this participant enters (default `true`) - - - - conference ends when this participant exits (default `false`) - - - - SWML URL for hold music (`null` for default) - - - - maximum participants, 1..250 (default 250) - - - - "do-not-record" or "record-from-start" (default "do-not-record") - - - - conference region (`null` for default) - - - - "trim-silence" or "do-not-trim" (default "trim-silence") - - - - SWML Call ID / CXML CallSid for coaching (`null` for none) - - - - space-separated status events (`null` for none) - - - - URL for status callbacks (`null` for none) - - - - "GET" or "POST" (default "POST") - - - - URL for recording status callbacks (`null` for none) - - - - "GET" or "POST" (default "POST") - - - - recording events (default "completed") - - - - switch-on-return value/cond (`null` for none) - - -#### Parameters (Overload 2) - - - -#### Returns (Overload 1) - -`FunctionResult` — this, for chaining - -#### Returns (Overload 2) - -`FunctionResult` - -#### Throws - -- `IllegalArgumentException` — if any validated value is invalid - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) - -Line 541. - -*** - -### joinRoom - -Join a RELAY room. - -#### Signature - -```java -public FunctionResult joinRoom(String name) -``` - -#### Parameters - - - -#### Returns - -`FunctionResult` - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) - -Line 661. - -*** - -### pay - -Process payment via SWML pay action — full parity with the Python -reference `signalwire.core.function_result.FunctionResult.pay`. - -<p> -Every optional parameter the reference exposes is a positional argument -here, in the same order, with the same default and the same emitted -wire key. - -The reference ALWAYS emits `payment_connector_url`, -`input`, `payment_method`, `timeout`, `max_attempts`, -`security_code`, `min_postal_code_length`, `token_type`, -`currency`, `language`, `voice`, `valid_card_types` -and `postal_code`; `status_url`, `charge_amount`, -`description`, `parameters` and `prompts` are emitted -only when supplied. Numeric values are stringified to match Python's -`str(...)`. A `set` verb carrying `ai_response` is -emitted before the `pay` verb. - -#### Signature - - - - ```java - public FunctionResult pay( - String connectorUrl, - String inputMethod, - String statusUrl, - String paymentMethod, - int timeout, - int maxAttempts, - boolean securityCode, - Object postalCode, - int minPostalCodeLength, - String tokenType, - String chargeAmount, - String currency, - String language, - String voice, - String description, - String validCardTypes, - List> parameters, - List> prompts, - String aiResponse - ) - ``` - - - - ```java - public FunctionResult pay( - String connectorUrl, - String inputMethod, - String statusUrl, - int timeout, - int maxAttempts - ) - ``` - - - -#### Parameters (Overload 1) - - - payment connector URL (required) - - - - "dtmf" (the SWML schema is `const:"dtmf"`; default "dtmf") - - - - URL for status-change notifications (`null` to omit) - - - - payment method (default "credit-card") - - - - seconds to wait for next digit (default 5) - - - - retry attempts (default 1) - - - - prompt for the security code (default `true`) - - - - prompt for postal code (`Boolean`) or the literal postcode (`String`); default `Boolean.TRUE` - - - - minimum postal-code digits (default 0) - - - - "one-time" or "reusable" (default "reusable") - - - - amount to charge, decimal string (`null` to omit) - - - - currency code (default "usd") - - - - prompt language (default "en-US") - - - - TTS voice (default "woman") - - - - custom payment description (`null` to omit) - - - - space-separated card types (default "visa mastercard amex") - - - - name/value pairs for the connector (`null` to omit) - - - - custom prompt configurations (`null` to omit) - - - - `ai_response` text for the leading `set` verb (default `#DEFAULT_PAY_AI_RESPONSE`) - - -#### Parameters (Overload 2) - - - - - - - - - - - -#### Returns (Overload 1) - -`FunctionResult` — this, for chaining - -#### Returns (Overload 2) - -`FunctionResult` - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) - -Line 906. - -*** - -### playBackgroundFile - -Play audio file in background. - -#### Signature - - - - ```java - public FunctionResult playBackgroundFile(String filename, boolean wait) - ``` - - - - ```java - public FunctionResult playBackgroundFile(String filename) - ``` - - - -#### Parameters (Overload 1) - - - - - -#### Parameters (Overload 2) - - - -#### Returns (Overload 1) - -`FunctionResult` - -#### Returns (Overload 2) - -`FunctionResult` - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) - -Line 261. - -*** - -### recordCall - -Start background call recording via SWML — full parity with the Python -reference `signalwire.core.function_result.FunctionResult.record_call`. - -<p> -Validates `format` ∈ {wav, mp3, mp4} and `direction` ∈ -{speak, listen, both} with byte-exact Python `ValueError` messages. -The reference ALWAYS emits `stereo`, `format`, `direction`, -`beep` and `input_sensitivity`; `control_id`, -`terminators`, `initial_timeout`, `end_silence_timeout`, -`max_length` and `status_url` are emitted only when supplied. - -#### Signature - - - - ```java - public FunctionResult recordCall( - String controlId, - boolean stereo, - String format, - String direction, - String terminators, - boolean beep, - double inputSensitivity, - Double initialTimeout, - Double endSilenceTimeout, - Double maxLength, - String statusUrl - ) - ``` - - - - ```java - public FunctionResult recordCall( - String controlId, - boolean stereo, - RecordFormat format, - RecordDirection direction, - String terminators, - boolean beep, - double inputSensitivity, - Double initialTimeout, - Double endSilenceTimeout, - Double maxLength, - String statusUrl - ) - ``` - - - - ```java - public FunctionResult recordCall( - String controlId, - boolean stereo, - String format, - String direction - ) - ``` - - - - ```java - public FunctionResult recordCall( - String controlId, - boolean stereo, - RecordFormat format, - String direction - ) - ``` - - - - ```java - public FunctionResult recordCall( - String controlId, - boolean stereo, - String format, - RecordDirection direction - ) - ``` - - - - ```java - public FunctionResult recordCall( - String controlId, - boolean stereo, - RecordFormat format, - RecordDirection direction - ) - ``` - - - - ```java - public FunctionResult recordCall() - ``` - - - -#### Parameters (Overload 1) - - - recording identifier (pairs with stopRecordCall; `null` to omit) - - - - record in stereo (default `false`) - - - - "wav", "mp3" or "mp4" (default "wav") - - - - "speak", "listen" or "both" (default "both") - - - - digits that stop recording (`null` to omit) - - - - play a beep before recording (default `false`; ALWAYS emitted) - - - - input sensitivity (default 44.0; ALWAYS emitted) - - - - seconds to wait for speech start (`null` to omit) - - - - seconds of trailing silence before ending (`null` to omit) - - - - maximum recording length in seconds (`null` to omit) - - - - URL for recording status events (`null` to omit) - - -#### Parameters (Overload 2) - - - - - - - - - - - - - - - - - - - - - - - -#### Parameters (Overload 3) - - - - - - - - - -#### Parameters (Overload 4) - - - - - - - - - -#### Parameters (Overload 5) - - - - - - - - - -#### Parameters (Overload 6) - - - - - - - - - -#### Returns (Overload 1) - -`FunctionResult` — this, for chaining - -#### Returns (Overload 2) - -`FunctionResult` - -#### Returns (Overload 3) - -`FunctionResult` - -#### Returns (Overload 4) - -`FunctionResult` - -#### Returns (Overload 5) - -`FunctionResult` - -#### Returns (Overload 6) - -`FunctionResult` - -#### Returns (Overload 7) - -`FunctionResult` - -#### Throws - -- `IllegalArgumentException` — if format or direction is invalid - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) - -Line 304. - -*** - -### removeGlobalData - -#### Signature - -```java -public FunctionResult removeGlobalData(Object keys) -``` - -#### Parameters - - - -#### Returns - -`FunctionResult` - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) - -Line 173. - -*** - -### removeMetadata - -#### Signature - -```java -public FunctionResult removeMetadata(Object keys) -``` - -#### Parameters - - - -#### Returns - -`FunctionResult` - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) - -Line 181. - -*** - -### replaceInHistory - -Replace tool\_call+result pair in conversation history. - -#### Signature - - - - ```java - public FunctionResult replaceInHistory(String text) - ``` - - - - ```java - public FunctionResult replaceInHistory(boolean summary) - ``` - - - -#### Parameters (Overload 1) - - - -#### Parameters (Overload 2) - - - -#### Returns (Overload 1) - -`FunctionResult` - -#### Returns (Overload 2) - -`FunctionResult` - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) - -Line 244. - -*** - -### rpcAiMessage - -Inject a message into an AI agent on another call — full parity with the -Python reference `FunctionResult.rpc_ai_message`. - -`role` -flows through to `params.role` (Python defaults "system") instead -of being hard-coded. - -#### Signature - - - - ```java - public FunctionResult rpcAiMessage( - String callId, - String messageText, - String role - ) - ``` - - - - ```java - public FunctionResult rpcAiMessage(String callId, String messageText) - ``` - - - -#### Parameters (Overload 1) - - - target call ID (required) - - - - message text to inject (required) - - - - message role (default "system") - - -#### Parameters (Overload 2) - - - - - -#### Returns (Overload 1) - -`FunctionResult` — this, for chaining - -#### Returns (Overload 2) - -`FunctionResult` - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) - -Line 1032. - -*** - -### rpcAiUnhold - -Unhold another call. - -#### Signature - -```java -public FunctionResult rpcAiUnhold(String callId) -``` - -#### Parameters - - - -#### Returns - -`FunctionResult` - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) - -Line 1050. - -*** - -### rpcDial - -Dial out to a number with a destination SWML URL — full parity with the -Python reference `FunctionResult.rpc_dial`. - -`deviceType` -flows through to `params.devices.type` (Python defaults "phone") -instead of being hard-coded. - -#### Signature - - - - ```java - public FunctionResult rpcDial( - String toNumber, - String fromNumber, - String destSwml, - String deviceType - ) - ``` - - - - ```java - public FunctionResult rpcDial( - String toNumber, - String fromNumber, - String destSwml - ) - ``` - - - -#### Parameters (Overload 1) - - - E.164 number to dial (required) - - - - E.164 caller ID (required) - - - - URL to the SWML handling the outbound leg (required) - - - - device type for the dial (default "phone") - - -#### Parameters (Overload 2) - - - - - - - -#### Returns (Overload 1) - -`FunctionResult` — this, for chaining - -#### Returns (Overload 2) - -`FunctionResult` - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) - -Line 1001. - -*** - -### say - -#### Signature - -```java -public FunctionResult say(String text) -``` - -#### Parameters - - - -#### Returns - -`FunctionResult` - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) - -Line 254. - -*** - -### sendSms - -Send SMS via SWML — full parity with the Python reference -`signalwire.core.function_result.FunctionResult.send_sms`. -Either `body` or `media` must be supplied. - -`to_number` -and `from_number` are always emitted; `body`, `media`, -`tags` and `region` are emitted only when supplied. - -#### Signature - - - - ```java - public FunctionResult sendSms( - String toNumber, - String fromNumber, - String body, - List media, - List tags, - String region - ) - ``` - - - - ```java - public FunctionResult sendSms( - String toNumber, - String fromNumber, - String body, - List media, - List tags - ) - ``` - - - -#### Parameters (Overload 1) - - - E.164 destination (required) - - - - E.164 origin (required) - - - - message body (`null` if media supplied) - - - - media URLs (`null` if body supplied) - - - - tags for UI search (`null` to omit) - - - - region to originate the message from (`null` to omit) - - -#### Parameters (Overload 2) - - - - - - - - - - - -#### Returns (Overload 1) - -`FunctionResult` — this, for chaining - -#### Returns (Overload 2) - -`FunctionResult` - -#### Throws - -- `IllegalArgumentException` — if neither body nor media is provided - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) - -Line 832. - -*** - -### setEndOfSpeechTimeout - -#### Signature - -```java -public FunctionResult setEndOfSpeechTimeout(int milliseconds) -``` - -#### Parameters - - - -#### Returns - -`FunctionResult` - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) - -Line 447. - -*** - -### setMetadata - -#### Signature - -```java -public FunctionResult setMetadata(Map data) -``` - -#### Parameters - - - -#### Returns - -`FunctionResult` - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) - -Line 177. - -*** - -### setPostProcess - -#### Signature - -```java -public FunctionResult setPostProcess(boolean postProcess) -``` - -#### Parameters - - - -#### Returns - -`FunctionResult` - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) - -Line 59. - -*** - -### setResponse - -#### Signature - -```java -public FunctionResult setResponse(String response) -``` - -#### Parameters - - - -#### Returns - -`FunctionResult` - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) - -Line 54. - -*** - -### setSpeechEventTimeout - -#### Signature - -```java -public FunctionResult setSpeechEventTimeout(int milliseconds) -``` - -#### Parameters - - - -#### Returns - -`FunctionResult` - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) - -Line 451. - -*** - -### simulateUserInput - -Queue simulated user input. - -#### Signature - -```java -public FunctionResult simulateUserInput(String text) -``` - -#### Parameters - - - -#### Returns - -`FunctionResult` - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) - -Line 1057. - -*** - -### sipRefer - -Send SIP REFER. - -#### Signature - -```java -public FunctionResult sipRefer(String toUri) -``` - -#### Parameters - - - -#### Returns - -`FunctionResult` - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) - -Line 671. - -*** - -### stop - -Stop the agent execution. - -#### Signature - -```java -public FunctionResult stop() -``` - -#### Returns - -`FunctionResult` - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) - -Line 163. - -*** - -### stopBackgroundFile - -#### Signature - -```java -public FunctionResult stopBackgroundFile() -``` - -#### Returns - -`FunctionResult` - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) - -Line 275. - -*** - -### stopRecordCall - -Stop an active background call recording. - -#### Signature - - - - ```java - public FunctionResult stopRecordCall(String controlId) - ``` - - - - ```java - public FunctionResult stopRecordCall() - ``` - - - -#### Parameters (Overload 1) - - - -#### Returns (Overload 1) - -`FunctionResult` - -#### Returns (Overload 2) - -`FunctionResult` - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) - -Line 422. - -*** - -### stopTap - -Stop a tap stream. - -#### Signature - - - - ```java - public FunctionResult stopTap(String controlId) - ``` - - - - ```java - public FunctionResult stopTap() - ``` - - - -#### Parameters (Overload 1) - - - -#### Returns (Overload 1) - -`FunctionResult` - -#### Returns (Overload 2) - -`FunctionResult` - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) - -Line 801. - -*** - -### switchContext - -Switch context with optional reset parameters. - -#### Signature - - - - ```java - public FunctionResult switchContext( - String systemPrompt, - String userPrompt, - boolean consolidate, - boolean fullReset - ) - ``` - - - - ```java - public FunctionResult switchContext(String systemPrompt) - ``` - - - -#### Parameters (Overload 1) - - - - - - - - - -#### Parameters (Overload 2) - - - -#### Returns (Overload 1) - -`FunctionResult` - -#### Returns (Overload 2) - -`FunctionResult` - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) - -Line 214. - -*** - -### swmlChangeContext - -Change the conversation context. - -#### Signature - -```java -public FunctionResult swmlChangeContext(String contextName) -``` - -#### Parameters - - - -#### Returns - -`FunctionResult` - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) - -Line 207. - -*** - -### swmlChangeStep - -Change the conversation step. - -#### Signature - -```java -public FunctionResult swmlChangeStep(String stepName) -``` - -#### Parameters - - - -#### Returns - -`FunctionResult` - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) - -Line 200. - -*** - -### swmlTransfer - -SWML transfer with AI response setup. - -#### Signature - -```java -public FunctionResult swmlTransfer( - String dest, - String aiResponse, - boolean isFinal -) -``` - -#### Parameters - - - - - - - -#### Returns - -`FunctionResult` - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) - -Line 111. - -*** - -### swmlUserEvent - -Send a user event through SWML. - -#### Signature - -```java -public FunctionResult swmlUserEvent(Map eventData) -``` - -#### Parameters - - - -#### Returns - -`FunctionResult` - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) - -Line 188. - -*** - -### tap - -Start a background call tap via SWML — full parity with the Python -reference `signalwire.core.function_result.FunctionResult.tap`. - -<p> -Validates `direction` ∈ {speak, hear, both}, `codec` ∈ -{PCMU, PCMA}, and > 0 with byte-exact Python -`ValueError` messages (rendered through -`IllegalArgumentException`). - -Only `uri` is always emitted; -each other key is emitted only when it differs from its reference -default (!= "both", != "PCMU", -!= 20), plus `control_id` and `status_url` -when supplied. - -#### Signature - - - - ```java - public FunctionResult tap( - String uri, - String controlId, - String direction, - String codec, - int rtpPtime, - String statusUrl - ) - ``` - - - - ```java - public FunctionResult tap( - String uri, - String controlId, - TapDirection direction, - Codec codec, - int rtpPtime, - String statusUrl - ) - ``` - - - - ```java - public FunctionResult tap( - String uri, - String controlId, - String direction, - String codec - ) - ``` - - - - ```java - public FunctionResult tap( - String uri, - String controlId, - TapDirection direction, - String codec - ) - ``` - - - - ```java - public FunctionResult tap( - String uri, - String controlId, - String direction, - Codec codec - ) - ``` - - - - ```java - public FunctionResult tap( - String uri, - String controlId, - TapDirection direction, - Codec codec - ) - ``` - - - -#### Parameters (Overload 1) - - - tap media-stream destination (required; rtp://, ws://, wss://) - - - - tap identifier (`null` for an auto-generated one) - - - - "speak", "hear" or "both" (default "both") - - - - "PCMU" or "PCMA" (default "PCMU") - - - - RTP packetization time in ms, > 0 (default 20) - - - - URL for status-change requests (`null` to omit) - - -#### Parameters (Overload 2) - - - - - - - - - - - - - -#### Parameters (Overload 3) - - - - - - - - - -#### Parameters (Overload 4) - - - - - - - - - -#### Parameters (Overload 5) - - - - - - - - - -#### Parameters (Overload 6) - - - - - - - - - -#### Returns (Overload 1) - -`FunctionResult` — this, for chaining - -#### Returns (Overload 2) - -`FunctionResult` - -#### Returns (Overload 3) - -`FunctionResult` - -#### Returns (Overload 4) - -`FunctionResult` - -#### Returns (Overload 5) - -`FunctionResult` - -#### Returns (Overload 6) - -`FunctionResult` - -#### Throws - -- `IllegalArgumentException` — if direction, codec or rtp\_ptime is invalid - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) - -Line 700. - -*** - -### toggleFunctions - -Toggle specific SWAIG functions on/off. - -#### Signature - -```java -public FunctionResult toggleFunctions(List> toggles) -``` - -#### Parameters - - - -#### Returns - -`FunctionResult` - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) - -Line 458. - -*** - -### toJson - -Render as JSON string. - -#### Signature - -```java -public String toJson() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) - -Line 1107. - -*** - -### toMap - -Convert to the Map structure expected by SWAIG. - -#### Signature - -```java -public Map toMap() -``` - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) - -Line 1087. - -*** - -### updateGlobalData - -#### Signature - -```java -public FunctionResult updateGlobalData(Map data) -``` - -#### Parameters - - - -#### Returns - -`FunctionResult` - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) - -Line 169. - -*** - -### updateSettings - -Update agent runtime settings (temperature, top\_p, etc.). - -#### Signature - -```java -public FunctionResult updateSettings(Map settings) -``` - -#### Parameters - - - -#### Returns - -`FunctionResult` - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) - -Line 473. - -*** - -### waitForUser - -Control how agent waits for user input. - -#### Signature - - - - ```java - public FunctionResult waitForUser( - Boolean enabled, - Integer timeout, - boolean answerFirst - ) - ``` - - - - ```java - public FunctionResult waitForUser() - ``` - - - -#### Parameters (Overload 1) - - - - - - - -#### Returns (Overload 1) - -`FunctionResult` - -#### Returns (Overload 2) - -`FunctionResult` - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) - -Line 142. - -## Source - -[`src/main/java/com/signalwire/sdk/swaig/FunctionResult.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/FunctionResult.java) - -Line 30. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/swaig/swaig/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/swaig/swaig/index.mdx deleted file mode 100644 index 5e377d8ff6..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/swaig/swaig/index.mdx +++ /dev/null @@ -1,86 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/swaig/swaig" -title: "swaig" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "module" - language: "java" - qualified_name: "com.signalwire.sdk.swaig" - module: "com.signalwire.sdk.swaig" ---- -# `swaig` - -## Signature - -```java -package com.signalwire.sdk.swaig -``` - -## Classes - - - - SwaigFunctionResult - the response builder returned by tool handlers. <p> Every method returns `this` for fluent chaining. - - - - Typed, fluent builder for the JSON-Schema `parameters` blob that a `ToolDefinition` (and `com.signalwire.sdk.agent.AgentBase#defineTool`) takes. <p>Today the `parameters` argument is a hand-written, untyped `Map` of nested maps — the JSON Schema spelled out by hand: <pre>Object> params = new LinkedHashMap\<>(); params.put("type", "object"); params.put("properties", Map.of( "service", Map.of("type", "string", "description", "The service"), "date", Map.of("type", "string", "description", "YYYY-MM-DD"))); params.put("required", List.of("service", "date"));</pre> <p>That is easy to typo (a wrong `"type"` value, a misspelled key, a required name that doesn't match a property) and only fails at runtime on the server. - - - - Defines a SWAIG tool with its name, description, parameters, and handler. - - - -## Interfaces - -### ToolHandler - -Functional interface for SWAIG tool handlers. -Called when the platform invokes a tool during a conversation. - -#### Signature - -```java -public interface ToolHandler -``` - -#### Methods - -##### handle - -Handle a SWAIG tool invocation. - -###### Signature - -```java -FunctionResult handle(Map args, Map rawData) -``` - -###### Parameters - - - Parsed arguments from the tool call - - - - Full raw request payload for accessing call info, global data, etc. - - -###### Returns - -`FunctionResult` — A FunctionResult with the response text and optional actions - -###### Source - -[`src/main/java/com/signalwire/sdk/swaig/ToolHandler.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ToolHandler.java) - -Line 19. - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/ToolHandler.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ToolHandler.java) - -Line 10. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/swaig/swaig/parameter-schema/builder/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/swaig/swaig/parameter-schema/builder/index.mdx deleted file mode 100644 index 4dfdf2da53..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/swaig/swaig/parameter-schema/builder/index.mdx +++ /dev/null @@ -1,547 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/swaig/swaig/parameter-schema/builder" -title: "Builder" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.swaig.ParameterSchema.Builder" - parent: "com.signalwire.sdk.swaig.ParameterSchema" - module: "com.signalwire.sdk.swaig" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java" - visibility: "public" ---- -# `Builder` - -Fluent builder accumulating properties and required names, then emitting -the JSON-Schema `parameters` Map via `#build()`. - -**Modifiers:** `static` `final` - -## Signature - -```java -public static final class Builder -``` - -## Methods - -### array - -Add an `array` property whose items are a scalar JSON-Schema -kind (`"string"`, `"number"`, `"integer"`, -`"boolean"`). - -Produces "items":\{"type":itemType\}\}. - -#### Signature - -```java -public Builder array(String name, String itemType, String description) -``` - -#### Parameters - - - property name. - - - - the scalar item kind. - - - - LLM-facing description. - - -#### Returns - -`Builder` — this builder. - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java) - -Line 234. - -*** - -### arrayOfObjects - -Add an `array` property whose items are a nested object schema -built with another `ParameterSchema`. - -Produces -schema>\}\}. - -#### Signature - -```java -public Builder arrayOfObjects( - String name, - Map itemSchema, - String description -) -``` - -#### Parameters - - - property name. - - - - the built schema for each array element (from `Builder#build()`). - - - - LLM-facing description. - - -#### Returns - -`Builder` — this builder. - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java) - -Line 254. - -*** - -### bool - -Add a `boolean` property. - -#### Signature - -```java -public Builder bool(String name, String description) -``` - -#### Parameters - - - property name. - - - - LLM-facing description. - - -#### Returns - -`Builder` — this builder. - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java) - -Line 158. - -*** - -### build - -Build the JSON-Schema `parameters` Map. - -The result is a -`LinkedHashMap` ordered → properties → required -(with `required` omitted when empty) — byte-for-byte identical -to the hand-written nested-map form. Each call returns a fresh, -independent Map; the builder may be reused. - -#### Signature - -```java -public Map build() -``` - -#### Returns - -`Map` — the parameters Map, ready to pass to `ToolDefinition` / `defineTool`. - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java) - -Line 360. - -*** - -### defaultValue - -Set a JSON-Schema `default` on the most-recently-added -property. - -The value is emitted verbatim into the property map. - -#### Signature - -```java -public Builder defaultValue(Object value) -``` - -#### Parameters - - - the default value. - - -#### Returns - -`Builder` — this builder. - -#### Throws - -- `IllegalStateException` — if no property has been added yet. - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java) - -Line 309. - -*** - -### enumOf - -Add a closed-set `string` property whose allowed values come -from a Tier-1 `WireEnum` array — typically `RecordFormat.values()` / `Codec.values()` etc. - -Each constant -contributes its `WireEnum#getValue()` wire string, producing a -JSON-Schema `enum:[...]` of those exact strings (so it is -byte-identical to hand-writing the same string list). - -#### Signature - - - - ```java - public Builder enumOf(String name, WireEnum[] values, String description) - ``` - - - - ```java - public Builder enumOf( - String name, - Collection values, - String description - ) - ``` - - - - ```java - public Builder enumOf(String name, String description, String values) - ``` - - - -#### Parameters (Overload 1) - - - property name. - - - - the enum constants (e.g. `RecordFormat.values()`). - - - - LLM-facing description. - - -#### Parameters (Overload 2) - - - property name. - - - - the allowed values. - - - - LLM-facing description. - - -#### Parameters (Overload 3) - - - property name. - - - - LLM-facing description. - - - - the allowed values. - - -#### Returns (Overload 1) - -`Builder` — this builder. - -#### Returns (Overload 2) - -`Builder` — this builder. - -#### Returns (Overload 3) - -`Builder` — this builder. - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java) - -Line 179. - -*** - -### format - -Set a JSON-Schema `format` on the most-recently-added property. - -#### Signature - -```java -public Builder format(String format) -``` - -#### Parameters - - - the `format` value. - - -#### Returns - -`Builder` — this builder. - -#### Throws - -- `IllegalStateException` — if no property has been added yet. - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java) - -Line 321. - -*** - -### integer - -Add an `integer` property. - -#### Signature - -```java -public Builder integer(String name, String description) -``` - -#### Parameters - - - property name. - - - - LLM-facing description. - - -#### Returns - -`Builder` — this builder. - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java) - -Line 147. - -*** - -### number - -Add a `number` (floating-point) property. - -#### Signature - -```java -public Builder number(String name, String description) -``` - -#### Parameters - - - property name. - - - - LLM-facing description. - - -#### Returns - -`Builder` — this builder. - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java) - -Line 136. - -*** - -### object - -Add a nested `object` property whose schema is built with -another `ParameterSchema`. - -The nested schema's `type`, -`properties` (and `required`, if any) are merged in -alongside this property's `description`, producing -`{"type":"object","description":…,"properties":{…`\}\}. - -**Decorators:** `@SuppressWarnings` - -#### Signature - -```java -public Builder object( - String name, - Map objectSchema, - String description -) -``` - -#### Parameters - - - property name. - - - - the built nested schema (from `Builder#build()`). - - - - LLM-facing description. - - -#### Returns - -`Builder` — this builder. - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java) - -Line 277. - -*** - -### required - -Mark one or more properties as required. - -Names are kept in -declaration order and de-duplicated; calling this multiple times -accumulates. If no name is ever marked required, the built schema -omits the `required` key entirely. - -#### Signature - -```java -public Builder required(String names) -``` - -#### Parameters - - - property names to require. - - -#### Returns - -`Builder` — this builder. - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java) - -Line 339. - -*** - -### string - -Add a `string` property. - -#### Signature - - - - ```java - public Builder string(String name, String description) - ``` - - - - ```java - public Builder string(String name, String description, String format) - ``` - - - -#### Parameters (Overload 1) - - - property name (the JSON object key). - - - - LLM-facing description of the argument. - - -#### Parameters (Overload 2) - - - property name. - - - - LLM-facing description. - - - - the JSON-Schema `format` value. - - -#### Returns (Overload 1) - -`Builder` — this builder. - -#### Returns (Overload 2) - -`Builder` — this builder. - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java) - -Line 107. - -## Source - -[`src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java) - -Line 86. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/swaig/swaig/parameter-schema/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/swaig/swaig/parameter-schema/index.mdx deleted file mode 100644 index f6515fbb8d..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/swaig/swaig/parameter-schema/index.mdx +++ /dev/null @@ -1,113 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/swaig/swaig/parameter-schema" -title: "ParameterSchema" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.swaig.ParameterSchema" - parent: "com.signalwire.sdk.swaig" - module: "com.signalwire.sdk.swaig" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java" - visibility: "public" ---- -# `ParameterSchema` - -Typed, fluent builder for the JSON-Schema `parameters` blob that a -`ToolDefinition` (and `com.signalwire.sdk.agent.AgentBase#defineTool`) takes. - -<p>Today the `parameters` argument is a hand-written, untyped -`Map<String,Object>` of nested maps — the JSON Schema spelled out by -hand: - -<pre>Object> params = new LinkedHashMap<>(); -params.put("type", "object"); -params.put("properties", Map.of( - "service", Map.of("type", "string", "description", "The service"), - "date", Map.of("type", "string", "description", "YYYY-MM-DD"))); -params.put("required", List.of("service", "date"));</pre> - -<p>That is easy to typo (a wrong `"type"` value, a misspelled key, a -required name that doesn't match a property) and only fails at runtime on the -server. - -This builder constructs the <strong>exact same wire shape</strong> -type-safely: - -<pre>Object> params = ParameterSchema.builder() - .string("service", "The service") - .string("date", "YYYY-MM-DD") - .enumOf("fmt", RecordFormat.values(), "format") // Tier-1 enum → enum:[mp3,wav,mp4] - .required("service", "date") - .build(); - -agent.defineTool(new ToolDefinition("book", "Book a service", params, handler));</pre> - -<p><strong>This is a typed convenience over the SAME output, not a new -format.</strong> `#build()` returns a plain `Map<String,Object>` -that is byte-for-byte identical to the hand-written form above and is used -exactly the same way as the `parameters` argument — the untyped Map -path keeps working unchanged. The builder is purely additive. - -<p>Supported property kinds: `string`, `number`, `integer`, -`boolean`, `enum` (a closed set — either the Tier-1 -`WireEnum` enums via WireEnum[], String), -each contributing its `WireEnum#getValue()`, or a bare string set), -`array` (of a kind), and `object` (a nested schema built with -another `ParameterSchema`). Every property carries a `description` -and may also set `default`, `format`, or `enum`. - -<p>Insertion order is preserved: `properties` keeps the order the -properties were declared, each property map orders its keys -→ description → enum → default → format → items → properties, -and `required` keeps declaration order (de-duplicated). The -`required` key is omitted entirely when no property is marked required, -matching the hand-written convention of not emitting an empty list. - -**Modifiers:** `final` - -## Signature - -```java -public final class ParameterSchema -``` - -## Classes - - - - Fluent builder accumulating properties and required names, then emitting the JSON-Schema `parameters` Map via `#build()`. - - - -## Methods - -### builder - -Start a new schema builder. - -**Modifiers:** `static` - -#### Signature - -```java -public static Builder builder() -``` - -#### Returns - -`Builder` — a fresh `Builder`. - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java) - -Line 78. - -## Source - -[`src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java) - -Line 67. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/swaig/swaig/tool-definition/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/swaig/swaig/tool-definition/index.mdx deleted file mode 100644 index 2f547665ad..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/swaig/swaig/tool-definition/index.mdx +++ /dev/null @@ -1,282 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/swaig/swaig/tool-definition" -title: "ToolDefinition" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.swaig.ToolDefinition" - parent: "com.signalwire.sdk.swaig" - module: "com.signalwire.sdk.swaig" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java" - visibility: "public" ---- -# `ToolDefinition` - -Defines a SWAIG tool with its name, description, parameters, and handler. - -## Signature - -```java -public class ToolDefinition -``` - -## Methods - -### \ - -#### Signature - -```java -public ( - String name, - String description, - Map parameters, - ToolHandler handler -) -``` - -#### Parameters - - - - - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java) - -Line 16. - -*** - -### getDescription - -#### Signature - -```java -public String getDescription() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java) - -Line 24. - -*** - -### getExtraFields - -#### Signature - -```java -public Map getExtraFields() -``` - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java) - -Line 39. - -*** - -### getHandler - -#### Signature - -```java -public ToolHandler getHandler() -``` - -#### Returns - -`ToolHandler` - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java) - -Line 26. - -*** - -### getName - -#### Signature - -```java -public String getName() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java) - -Line 23. - -*** - -### getParameters - -#### Signature - -```java -public Map getParameters() -``` - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java) - -Line 25. - -*** - -### hasHandler - -Check if this tool has a handler (as opposed to DataMap tools which don't). - -#### Signature - -```java -public boolean hasHandler() -``` - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java) - -Line 68. - -*** - -### isSecure - -#### Signature - -```java -public boolean isSecure() -``` - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java) - -Line 27. - -*** - -### setExtraFields - -#### Signature - -```java -public ToolDefinition setExtraFields(Map extraFields) -``` - -#### Parameters - - - -#### Returns - -`ToolDefinition` - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java) - -Line 34. - -*** - -### setSecure - -#### Signature - -```java -public ToolDefinition setSecure(boolean secure) -``` - -#### Parameters - - - -#### Returns - -`ToolDefinition` - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java) - -Line 29. - -*** - -### toSwaigFunction - -Serialize to SWAIG function format for SWML. - -#### Signature - -```java -public Map toSwaigFunction( - String webhookUrl, - String metaDataToken -) -``` - -#### Parameters - - - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java) - -Line 46. - -## Source - -[`src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ToolDefinition.java) - -Line 8. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/swml/swml/document/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/swml/swml/document/index.mdx deleted file mode 100644 index 725a6faa74..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/swml/swml/document/index.mdx +++ /dev/null @@ -1,290 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/swml/swml/document" -title: "Document" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.swml.Document" - parent: "com.signalwire.sdk.swml" - module: "com.signalwire.sdk.swml" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Document.java" - visibility: "public" ---- -# `Document` - -SWML Document model. - -<p> -A document has a version, sections (each a list of verbs), and a top-level -verbs list that maps to the "main" section. - -## Signature - -```java -public class Document -``` - -## Methods - -### \ - -#### Signature - -```java -public () -``` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Document.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Document.java) - -Line 27. - -*** - -### addSection - -Add a named section. - -If the section already exists, returns the existing list. - -#### Signature - -```java -public List> addSection(String name) -``` - -#### Parameters - - - -#### Returns - -`List>` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Document.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Document.java) - -Line 45. - -*** - -### addVerb - -Add a verb to the main section. - -#### Signature - -```java -public void addVerb(String verbName, Object verbData) -``` - -#### Parameters - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Document.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Document.java) - -Line 59. - -*** - -### addVerbToSection - -Add a verb to a named section. - -#### Signature - -```java -public void addVerbToSection( - String sectionName, - String verbName, - Object verbData -) -``` - -#### Parameters - - - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Document.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Document.java) - -Line 68. - -*** - -### getSectionVerbs - -Get verbs for a named section. - -#### Signature - -```java -public List> getSectionVerbs(String name) -``` - -#### Parameters - - - -#### Returns - -`List>` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Document.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Document.java) - -Line 85. - -*** - -### getVerbs - -Get the main verbs list. - -#### Signature - -```java -public List> getVerbs() -``` - -#### Returns - -`List>` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Document.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Document.java) - -Line 78. - -*** - -### hasSection - -Check whether a section exists. - -#### Signature - -```java -public boolean hasSection(String name) -``` - -#### Parameters - - - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Document.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Document.java) - -Line 52. - -*** - -### render - -Render as compact JSON. - -#### Signature - -```java -public String render() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Document.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Document.java) - -Line 102. - -*** - -### renderPretty - -Render as pretty-printed JSON. - -#### Signature - -```java -public String renderPretty() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Document.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Document.java) - -Line 109. - -*** - -### reset - -Reset document to empty state. - -#### Signature - -```java -public void reset() -``` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Document.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Document.java) - -Line 36. - -*** - -### toMap - -Convert to a Map suitable for JSON serialization. - -#### Signature - -```java -public Map toMap() -``` - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Document.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Document.java) - -Line 92. - -## Source - -[`src/main/java/com/signalwire/sdk/swml/Document.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Document.java) - -Line 20. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/swml/swml/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/swml/swml/index.mdx deleted file mode 100644 index a18f7cec0b..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/swml/swml/index.mdx +++ /dev/null @@ -1,696 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/swml/swml" -title: "swml" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "module" - language: "java" - qualified_name: "com.signalwire.sdk.swml" - module: "com.signalwire.sdk.swml" ---- -# `swml` - -## Signature - -```java -package com.signalwire.sdk.swml -``` - -## Classes - - - - SWML Document model. <p> A document has a version, sections (each a list of verbs), and a top-level verbs list that maps to the "main" section. - - - - Singleton that loads schema.json from resources and extracts the 38 SWML verb definitions. <p> The extraction algorithm: <ol> <li>Parse schema.json</li> <li>For each entry in $defs.SWMLMethod.anyOf, get the $ref</li> <li>Look up the definition in $defs</li> <li>The actual verb name is the first key in properties</li> </ol> - - - - SchemaUtils — Java port of `signalwire.utils.schema_utils.SchemaUtils`. <p>Loads the SWML JSON Schema, extracts verb metadata, and validates either a single verb config or a complete SWML document.</p> <p>Construction rules mirror Python:</p> <ul> <li>Pass `schemaPath=null` to use the embedded `schema.json`.</li> <li>`schemaValidation=false` disables validation (returns valid=true for every `validateVerb` call).</li> <li>The env var `SWML_SKIP_SCHEMA_VALIDATION=1/true/yes` also disables validation regardless of the constructor argument.</li> </ul> <p>The Java port currently ships only the lightweight validator (verb existence + required-property check). - - - - SchemaValidationError — Java port of `signalwire.utils.schema_utils.SchemaValidationError`. <p>Raised when SWML schema validation of a verb config fails.</p> - - - - Base SWML service with an embedded HTTP server, basic auth, security headers, and explicit methods for all 38 schema-driven verbs. <p> Uses JDK built-in com.sun.net.httpserver.HttpServer with virtual threads. - - - -## Interfaces - -### WireEnum - -Marker for the typed, compile-time-checked closed-set enums whose constants -carry a canonical <em>wire string</em> (`RecordFormat`, `RecordDirection`, -`TapDirection`, `Codec`). - -<p>Every such enum already exposes `#getValue()` returning the exact -string the SignalWire platform expects on the wire (e.g. - -`"mp3"`, -`"listen"`, `"PCMU"`). This interface simply names that shared -shape so a single API can accept any of them generically — most importantly -WireEnum\[], String), -which turns `RecordFormat.values()` into a JSON-schema `enum:[...]` -of wire strings without per-enum overloads. - -<p>Because Java arrays are covariant, `RecordFormat.values()` (typed -`RecordFormat[]`) is directly usable wherever a `WireEnum[]` is -expected. The interface adds <strong>no</strong> new method to the enums — -`getValue()` already existed — so it is purely a unifying type, and -routing a value through it is byte-for-byte identical to passing its -`getValue()` string. - -<p>This is the SWAIG/SWML "has a canonical wire value" set only. It is -deliberately NOT implemented by RELAY device codecs or other open-ended -string fields — see the per-enum Javadoc for the 3-vocabulary trap. - -#### Signature - -```java -public interface WireEnum -``` - -#### Methods - -##### getValue - -The canonical wire string for this constant — the exact value the -SignalWire platform expects (e.g. - -`"mp3"` / `"listen"` / -`"PCMU"`). Equivalent to PHP's backed-enum `->value`. - -###### Signature - -```java -String getValue() -``` - -###### Returns - -`String` — the wire string as it appears on the wire. - -###### Source - -[`src/main/java/com/signalwire/sdk/swml/WireEnum.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/WireEnum.java) - -Line 36. - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/WireEnum.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/WireEnum.java) - -Line 27. - -## Enums - -### Codec - -Media codec for the SWML `tap` verb, as a typed, compile-time-checked -closed set. - -<p>The Python reference `FunctionResult.tap` validates `codec` -against "PCMA"] and raises `ValueError` on anything -else. - -The methods that take a tap codec -(String, String, Codec)) -accept this enum <em>or</em> a plain `String`. The enum gives editor -autocompletion and makes a typo fail at compile time (a bare string like -`"PCMX"` only fails at runtime, on the server). Strings keep parity -with the Python reference (which uses a bare `str`): - -<pre>"t1", "both", Codec.PCMA); // typed, autocompleted -result.tap("wss://x", "t1", "both", "PCMA"); // string still works (parity)</pre> - -<p><strong>This is the SWAIG `tap` codec set only — do NOT reuse it for -RELAY `stream`/`connect`.</strong> RELAY device codecs are a much -larger superset (e.g. `PCMU,PCMA,OPUS,G729,G722,VP8,H264`, comma-joined); -the 2-value SWAIG tap codec set is deliberately distinct and never shared. - -<p>The wire strings are upper-case (`"PCMU"` / `"PCMA"`), matching -the reference's literal list exactly. Each constant's value -is the canonical wire string, so routing a tap through the enum is -byte-for-byte identical to passing that string. - -#### Signature - -```java -public enum Codec -``` - -#### Variants - - - - - -#### Methods - -##### fromWire - -Parse a wire string into a `Codec`, or return `null` if it is -not a recognised codec. - -Matching is exact (case-sensitive), mirroring the -reference's literal \["PCMU", "PCMA"] check (so `"pcmu"` -returns `null`). The Java analog of Rust's `from_str`. - -**Modifiers:** `static` - -###### Signature - -```java -public static Codec fromWire(String wire) -``` - -###### Parameters - - - the candidate wire string (case-sensitive). - - -###### Returns - -`Codec` — the matching constant, or `null` if none matches. - -###### Source - -[`src/main/java/com/signalwire/sdk/swml/Codec.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Codec.java) - -Line 61. - -*** - -##### getValue - -The canonical (upper-case) wire string for this codec (`"PCMU"` / -`"PCMA"`). - -Equivalent to PHP's backed-enum `->value`. - -###### Signature - -```java -public String getValue() -``` - -###### Returns - -`String` — the upper-case codec name as it appears on the wire. - -###### Source - -[`src/main/java/com/signalwire/sdk/swml/Codec.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Codec.java) - -Line 48. - -*** - -##### valueOf - -**Modifiers:** `static` - -###### Signature - -```java -public static Codec valueOf(String name) -``` - -###### Parameters - - - -###### Returns - -`Codec` - -###### Source - -[`src/main/java/com/signalwire/sdk/swml/Codec.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Codec.java) - -*** - -##### values - -**Modifiers:** `static` - -###### Signature - -```java -public static Codec[] values() -``` - -###### Returns - -`Codec[]` - -###### Source - -[`src/main/java/com/signalwire/sdk/swml/Codec.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Codec.java) - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Codec.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Codec.java) - -Line 31. - -*** - -### RecordDirection - -Audio direction for the SWML `record_call` verb, as a typed, -compile-time-checked closed set. - -<p>The Python reference `FunctionResult.record_call` validates -`direction` against "listen", "both"] and raises -`ValueError` on anything else. - -The methods that take a record -direction -(boolean, String, RecordDirection)) -accept this enum <em>or</em> a plain `String`. The enum gives editor -autocompletion and makes a typo fail at compile time (a bare string like -`"listenn"` only fails at runtime, on the server). Strings keep parity -with the Python reference (which uses a bare `str`): - -<pre>true, "mp3", RecordDirection.LISTEN); // typed, autocompleted -result.recordCall("rec1", true, "mp3", "listen"); // string still works (parity)</pre> - -<p><strong>This is a DIFFERENT set from `TapDirection`.</strong> -`record_call` uses `listen` where `tap` uses `hear`, -mirroring the reference's two separate validation lists — the two sets are -modelled as two distinct enums and are never shared (see the 3-vocabulary -trap: SWML `record_call` `{speak,listen,both`} vs SWML -`tap` `{speak,hear,both`} vs RELAY `{listen,speak,both`}). - -<p>Each constant's value is the canonical wire string, so -routing a recording through the enum is byte-for-byte identical to passing -that string. - -#### Signature - -```java -public enum RecordDirection -``` - -#### Variants - - - - - - - -#### Methods - -##### fromWire - -Parse a wire string into a `RecordDirection`, or return -`null` if it is not a recognised direction (the same strings the -Python reference would reject with `ValueError`). - -Note `"hear"` -is valid for `TapDirection` but NOT for `record_call`, so it -returns `null` here. The Java analog of Rust's `from_str`. - -**Modifiers:** `static` - -###### Signature - -```java -public static RecordDirection fromWire(String wire) -``` - -###### Parameters - - - the candidate wire string (case-sensitive). - - -###### Returns - -`RecordDirection` — the matching constant, or `null` if none matches. - -###### Source - -[`src/main/java/com/signalwire/sdk/swml/RecordDirection.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/RecordDirection.java) - -Line 66. - -*** - -##### getValue - -The canonical wire string for this direction (`"speak"` / -`"listen"` / `"both"`). - -Equivalent to PHP's backed-enum -`->value`. - -###### Signature - -```java -public String getValue() -``` - -###### Returns - -`String` — the lower-case direction name as it appears on the wire. - -###### Source - -[`src/main/java/com/signalwire/sdk/swml/RecordDirection.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/RecordDirection.java) - -Line 52. - -*** - -##### valueOf - -**Modifiers:** `static` - -###### Signature - -```java -public static RecordDirection valueOf(String name) -``` - -###### Parameters - - - -###### Returns - -`RecordDirection` - -###### Source - -[`src/main/java/com/signalwire/sdk/swml/RecordDirection.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/RecordDirection.java) - -*** - -##### values - -**Modifiers:** `static` - -###### Signature - -```java -public static RecordDirection[] values() -``` - -###### Returns - -`RecordDirection[]` - -###### Source - -[`src/main/java/com/signalwire/sdk/swml/RecordDirection.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/RecordDirection.java) - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/RecordDirection.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/RecordDirection.java) - -Line 33. - -*** - -### RecordFormat - -Audio container format for call recording, as a typed, compile-time-checked -closed set. - -<p>The SWML `record_call` verb (and the SignalWire calling REST API) -accept a fixed set of recording formats — `mp3`, `wav`, and -`mp4`. - -The methods that take a format -(boolean, RecordFormat, String) -and the `recordFormat(RecordFormat)` builder setter) accept this enum <em>or</em> a plain `String`. The enum gives editor autocompletion and -makes a typo fail at compile time (a bare string like `"mp33"` only -fails at runtime, on the server). Strings keep parity with the Python -reference (which uses a bare `str`): - -<pre>true, RecordFormat.MP3, "both"); // typed, autocompleted -result.recordCall(null, true, "mp3", "both"); // string still works (parity) -AgentBase.builder().recordFormat(RecordFormat.WAV); // typed builder -AgentBase.builder().recordFormat("wav"); // string still works (parity)</pre> - -<p>Each constant's value is the canonical wire string, so -routing a recording through the enum is byte-for-byte identical to passing -that string. - -#### Signature - -```java -public enum RecordFormat -``` - -#### Variants - - - - - - - -#### Methods - -##### getValue - -The canonical wire string for this format (`"mp3"` / `"wav"` / -`"mp4"`). - -Equivalent to PHP's backed-enum `->value`. - -###### Signature - -```java -public String getValue() -``` - -###### Returns - -`String` — the lower-case format name as it appears on the wire. - -###### Source - -[`src/main/java/com/signalwire/sdk/swml/RecordFormat.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/RecordFormat.java) - -Line 46. - -*** - -##### valueOf - -**Modifiers:** `static` - -###### Signature - -```java -public static RecordFormat valueOf(String name) -``` - -###### Parameters - - - -###### Returns - -`RecordFormat` - -###### Source - -[`src/main/java/com/signalwire/sdk/swml/RecordFormat.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/RecordFormat.java) - -*** - -##### values - -**Modifiers:** `static` - -###### Signature - -```java -public static RecordFormat[] values() -``` - -###### Returns - -`RecordFormat[]` - -###### Source - -[`src/main/java/com/signalwire/sdk/swml/RecordFormat.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/RecordFormat.java) - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/RecordFormat.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/RecordFormat.java) - -Line 28. - -*** - -### TapDirection - -Audio direction for the SWML `tap` verb, as a typed, -compile-time-checked closed set. - -<p>The Python reference `FunctionResult.tap` validates `direction` -against "hear", "both"] and raises `ValueError` on -anything else. - -The methods that take a tap direction -(String, TapDirection, String)) -accept this enum <em>or</em> a plain `String`. The enum gives editor -autocompletion and makes a typo fail at compile time (a bare string like -`"haer"` only fails at runtime, on the server). Strings keep parity -with the Python reference (which uses a bare `str`): - -<pre>"t1", TapDirection.HEAR, "PCMU"); // typed, autocompleted -result.tap("wss://x", "t1", "hear", "PCMU"); // string still works (parity)</pre> - -<p><strong>This is a DIFFERENT set from `RecordDirection`.</strong> -`tap` uses `hear` where `record_call` uses `listen`, -mirroring the reference's two separate validation lists — the two sets are -modelled as two distinct enums and are never shared (see the 3-vocabulary -trap: SWML `record_call` `{speak,listen,both`} vs SWML -`tap` `{speak,hear,both`} vs RELAY `{listen,speak,both`}). - -<p>Each constant's value is the canonical wire string, so -routing a tap through the enum is byte-for-byte identical to passing that -string. - -#### Signature - -```java -public enum TapDirection -``` - -#### Variants - - - - - - - -#### Methods - -##### fromWire - -Parse a wire string into a `TapDirection`, or return `null` -if it is not a recognised direction (the same strings the Python -reference would reject with `ValueError`). - -Note `"listen"` is -valid for `RecordDirection` but NOT for `tap`, so it returns -`null` here. The Java analog of Rust's `from_str`. - -**Modifiers:** `static` - -###### Signature - -```java -public static TapDirection fromWire(String wire) -``` - -###### Parameters - - - the candidate wire string (case-sensitive). - - -###### Returns - -`TapDirection` — the matching constant, or `null` if none matches. - -###### Source - -[`src/main/java/com/signalwire/sdk/swml/TapDirection.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/TapDirection.java) - -Line 65. - -*** - -##### getValue - -The canonical wire string for this direction (`"speak"` / -`"hear"` / `"both"`). - -Equivalent to PHP's backed-enum -`->value`. - -###### Signature - -```java -public String getValue() -``` - -###### Returns - -`String` — the lower-case direction name as it appears on the wire. - -###### Source - -[`src/main/java/com/signalwire/sdk/swml/TapDirection.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/TapDirection.java) - -Line 51. - -*** - -##### valueOf - -**Modifiers:** `static` - -###### Signature - -```java -public static TapDirection valueOf(String name) -``` - -###### Parameters - - - -###### Returns - -`TapDirection` - -###### Source - -[`src/main/java/com/signalwire/sdk/swml/TapDirection.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/TapDirection.java) - -*** - -##### values - -**Modifiers:** `static` - -###### Signature - -```java -public static TapDirection[] values() -``` - -###### Returns - -`TapDirection[]` - -###### Source - -[`src/main/java/com/signalwire/sdk/swml/TapDirection.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/TapDirection.java) - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/TapDirection.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/TapDirection.java) - -Line 32. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/swml/swml/schema-utils/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/swml/swml/schema-utils/index.mdx deleted file mode 100644 index 4433fa33cd..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/swml/swml/schema-utils/index.mdx +++ /dev/null @@ -1,357 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/swml/swml/schema-utils" -title: "SchemaUtils" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.swml.SchemaUtils" - parent: "com.signalwire.sdk.swml" - module: "com.signalwire.sdk.swml" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/SchemaUtils.java" - visibility: "public" ---- -# `SchemaUtils` - -SchemaUtils — Java port of `signalwire.utils.schema_utils.SchemaUtils`. - -<p>Loads the SWML JSON Schema, extracts verb metadata, and validates either a -single verb config or a complete SWML document.</p> - -<p>Construction rules mirror Python:</p> -<ul> - <li>Pass `schemaPath=null` to use the embedded `schema.json`.</li> - <li>`schemaValidation=false` disables validation (returns valid=true - for every `validateVerb` call).</li> - <li>The env var `SWML_SKIP_SCHEMA_VALIDATION=1/true/yes` also disables - validation regardless of the constructor argument.</li> -</ul> - -<p>The Java port currently ships only the lightweight validator (verb existence -+ required-property check). - -Full JSON Schema validation can be wired in by -extending `#initFullValidator()`. The lightweight contract matches -Python's `_validate_verb_lightweight()` exactly.</p> - -## Signature - -```java -public class SchemaUtils -``` - -## Classes - - - - A verb extracted from the schema. - - - -## Methods - -### \ - -Construct a SchemaUtils. -Mirrors Python's schema\_validation=True). - -#### Signature - -```java -public (String schemaPath, boolean schemaValidation) -``` - -#### Parameters - - - optional path to a schema.json file; pass null to use the embedded resource bundled with the SDK jar. - - - - enables/disables schema validation. Honors `SWML_SKIP_SCHEMA_VALIDATION=1` env override. - - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/SchemaUtils.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/SchemaUtils.java) - -Line 83. - -*** - -### generateMethodBody - -Generate a Python-style method body string for a verb. -Mirrors Python's `generate_method_body(verb_name)`. - -#### Signature - -```java -public String generateMethodBody(String verbName) -``` - -#### Parameters - - - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/SchemaUtils.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/SchemaUtils.java) - -Line 329. - -*** - -### generateMethodSignature - -Generate a Python-style method signature string for a verb. -Mirrors Python's `generate_method_signature(verb_name)`. - -#### Signature - -```java -public String generateMethodSignature(String verbName) -``` - -#### Parameters - - - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/SchemaUtils.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/SchemaUtils.java) - -Line 292. - -*** - -### getAllVerbNames - -Sorted list of all known verb names. -Mirrors Python's `get_all_verb_names()`. - -#### Signature - -```java -public List getAllVerbNames() -``` - -#### Returns - -`List` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/SchemaUtils.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/SchemaUtils.java) - -Line 178. - -*** - -### getVerbParameters - -Parameter-definition block used by code-gen tooling. -Mirrors Python's `get_verb_parameters(verb_name)`. - -#### Signature - -```java -public Map getVerbParameters(String verbName) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/SchemaUtils.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/SchemaUtils.java) - -Line 226. - -*** - -### getVerbProperties - -The `properties[verb_name]` block for a verb, or an empty map when -the verb is unknown. -Mirrors Python's `get_verb_properties(verb_name)`. - -#### Signature - -```java -public Map getVerbProperties(String verbName) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/SchemaUtils.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/SchemaUtils.java) - -Line 187. - -*** - -### getVerbRequiredProperties - -The `required` list for a verb, or an empty list when the verb is -unknown or has no required properties. -Mirrors Python's `get_verb_required_properties(verb_name)`. - -#### Signature - -```java -public List getVerbRequiredProperties(String verbName) -``` - -#### Parameters - - - -#### Returns - -`List` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/SchemaUtils.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/SchemaUtils.java) - -Line 202. - -*** - -### isFullValidationAvailable - -Whether full JSON Schema validation is wired up. -Mirrors Python's `full_validation_available` property. - -#### Signature - -```java -public boolean isFullValidationAvailable() -``` - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/SchemaUtils.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/SchemaUtils.java) - -Line 170. - -*** - -### loadSchema - -Read and parse the JSON Schema. -Mirrors Python's `load_schema()`. - -#### Signature - -```java -public JsonObject loadSchema() -``` - -#### Returns - -`JsonObject` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/SchemaUtils.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/SchemaUtils.java) - -Line 105. - -*** - -### validateDocument - -Validate a complete SWML document. -Mirrors Python's `validate_document(document)`. - -Returns -\["Schema validator not initialized"]) when no full -validator is wired in — same contract as Python. - -#### Signature - -```java -public Map.Entry> validateDocument( - Map document -) -``` - -#### Parameters - - - -#### Returns - -`Map.Entry>` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/SchemaUtils.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/SchemaUtils.java) - -Line 279. - -*** - -### validateVerb - -Validate a verb config against the schema. -Mirrors Python's verb\_config). - -#### Signature - -```java -public Map.Entry> validateVerb( - String verbName, - Map verbConfig -) -``` - -#### Parameters - - - - - -#### Returns - -`Map.Entry>` — (`valid`, `errors`) entry; mirrors Python's List\[str]] return. - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/SchemaUtils.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/SchemaUtils.java) - -Line 244. - -## Source - -[`src/main/java/com/signalwire/sdk/swml/SchemaUtils.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/SchemaUtils.java) - -Line 51. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/swml/swml/schema-utils/verb-info/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/swml/swml/schema-utils/verb-info/index.mdx deleted file mode 100644 index 5e0e141740..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/swml/swml/schema-utils/verb-info/index.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/swml/swml/schema-utils/verb-info" -title: "VerbInfo" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.swml.SchemaUtils.VerbInfo" - parent: "com.signalwire.sdk.swml.SchemaUtils" - module: "com.signalwire.sdk.swml" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/SchemaUtils.java" - visibility: "public" ---- -# `VerbInfo` - -A verb extracted from the schema. - -**Modifiers:** `static` `final` - -## Signature - -```java -public static final class VerbInfo -``` - -## Properties - - - - - - - -## Source - -[`src/main/java/com/signalwire/sdk/swml/SchemaUtils.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/SchemaUtils.java) - -Line 62. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/swml/swml/schema-validation-error/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/swml/swml/schema-validation-error/index.mdx deleted file mode 100644 index 974ba9a2d6..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/swml/swml/schema-validation-error/index.mdx +++ /dev/null @@ -1,108 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/swml/swml/schema-validation-error" -title: "SchemaValidationError" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.swml.SchemaValidationError" - parent: "com.signalwire.sdk.swml" - module: "com.signalwire.sdk.swml" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/SchemaValidationError.java" - visibility: "public" ---- -# `SchemaValidationError` - -SchemaValidationError — Java port of -`signalwire.utils.schema_utils.SchemaValidationError`. - -<p>Raised when SWML schema validation of a verb config fails.</p> - -## Signature - -```java -public class SchemaValidationError extends RuntimeException -``` - -## Inheritance - -**Extends:** `RuntimeException` - -## Methods - -### \ - -Construct a SchemaValidationError. - -Mirrors Python's -errors) signature. - -#### Signature - -```java -public (String verbName, List errors) -``` - -#### Parameters - - - the verb whose validation failed - - - - the list of human-readable error messages - - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/SchemaValidationError.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/SchemaValidationError.java) - -Line 32. - -*** - -### getErrors - -#### Signature - -```java -public List getErrors() -``` - -#### Returns - -`List` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/SchemaValidationError.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/SchemaValidationError.java) - -Line 44. - -*** - -### getVerbName - -#### Signature - -```java -public String getVerbName() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/SchemaValidationError.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/SchemaValidationError.java) - -Line 40. - -## Source - -[`src/main/java/com/signalwire/sdk/swml/SchemaValidationError.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/SchemaValidationError.java) - -Line 18. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/swml/swml/schema/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/swml/swml/schema/index.mdx deleted file mode 100644 index ba8ff6955d..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/swml/swml/schema/index.mdx +++ /dev/null @@ -1,159 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/swml/swml/schema" -title: "Schema" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.swml.Schema" - parent: "com.signalwire.sdk.swml" - module: "com.signalwire.sdk.swml" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Schema.java" - visibility: "public" ---- -# `Schema` - -Singleton that loads schema.json from resources and extracts the 38 SWML verb definitions. - -<p> -The extraction algorithm: -<ol> - <li>Parse schema.json</li> - <li>For each entry in $defs.SWMLMethod.anyOf, get the $ref</li> - <li>Look up the definition in $defs</li> - <li>The actual verb name is the first key in properties</li> -</ol> - -**Modifiers:** `final` - -## Signature - -```java -public final class Schema -``` - -## Methods - -### getInstance - -**Modifiers:** `static` - -#### Signature - -```java -public static Schema getInstance() -``` - -#### Returns - -`Schema` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Schema.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Schema.java) - -Line 44. - -*** - -### getVerb - -Get the full definition for a verb. - -#### Signature - -```java -public JsonObject getVerb(String name) -``` - -#### Parameters - - - -#### Returns - -`JsonObject` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Schema.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Schema.java) - -Line 125. - -*** - -### getVerbNames - -Get all verb names. - -#### Signature - -```java -public Set getVerbNames() -``` - -#### Returns - -`Set` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Schema.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Schema.java) - -Line 118. - -*** - -### isValidVerb - -Check if a verb name is valid. - -#### Signature - -```java -public boolean isValidVerb(String name) -``` - -#### Parameters - - - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Schema.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Schema.java) - -Line 111. - -*** - -### verbCount - -Get the number of loaded verb definitions. - -#### Signature - -```java -public int verbCount() -``` - -#### Returns - -`int` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Schema.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Schema.java) - -Line 132. - -## Source - -[`src/main/java/com/signalwire/sdk/swml/Schema.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Schema.java) - -Line 30. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/swml/swml/service/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/swml/swml/service/index.mdx deleted file mode 100644 index fa20e6213b..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/swml/swml/service/index.mdx +++ /dev/null @@ -1,2073 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/swml/swml/service" -title: "Service" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.swml.Service" - parent: "com.signalwire.sdk.swml" - module: "com.signalwire.sdk.swml" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java" - visibility: "public" ---- -# `Service` - -Base SWML service with an embedded HTTP server, basic auth, security headers, -and explicit methods for all 38 schema-driven verbs. - -<p> -Uses JDK built-in com.sun.net.httpserver.HttpServer with virtual threads. - -## Signature - -```java -public class Service implements AutoCloseable -``` - -## Inheritance - -**Implements:** `AutoCloseable` - -## Properties - - - - - - - - - - - - - - - - - - - - - - - -## Constants - - - HttpExchange attribute key under which the raw POST body is stashed by `#serve()` when reading it up-front for signature validation. Subclasses (notably `com.signalwire.sdk.agent.AgentBase`) check this attribute in `renderMainSwml` so they can re-use the cached body without re-reading the (already-consumed) request stream. - - -## Methods - -### \ - -#### Signature - - - - ```java - public (String name) - ``` - - - - ```java - public (String name, String route) - ``` - - - - ```java - public ( - String name, - String route, - String host, - int port, - String authUser, - String authPassword - ) - ``` - - - -#### Parameters (Overload 1) - - - -#### Parameters (Overload 2) - - - - - -#### Parameters (Overload 3) - - - - - - - - - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 74. - -*** - -### addSecurityHeaders - -Add security headers to every authenticated response. - -#### Signature - -```java -protected void addSecurityHeaders(HttpExchange exchange) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 411. - -*** - -### ai - -#### Signature - -```java -public Service ai(Map params) -``` - -#### Parameters - - - -#### Returns - -`Service` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 445. - -*** - -### amazonBedrock - -#### Signature - -```java -public Service amazonBedrock(Map params) -``` - -#### Parameters - - - -#### Returns - -`Service` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 450. - -*** - -### answer - -#### Signature - -```java -public Service answer(Map params) -``` - -#### Parameters - - - -#### Returns - -`Service` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 440. - -*** - -### close - -`AutoCloseable` entry point so a service — and every subclass, -including `AgentBase` — can be served inside a try-with-resources -block: - -<pre>{@code -try (var agent = MyAgent.builder()...build()) { - agent.run(); - // ... - -`AutoCloseable` entry point so a service — and every subclass, -including `AgentBase` — can be served inside a try-with-resources -block: - -<pre>(var agent = MyAgent.builder()...build()) { - agent.run(); - // ... serve ... // close() runs here: the HTTP listener is shut down -}</pre> - -Delegates to `#stop()`, releasing the bound HTTP(S) listener and -its socket — the rough Java parallel of using a Python SWMLService / -AgentBase under a context manager. Idempotent: harmless if the service -was never served or is already stopped. - -**Decorators:** `@Override` - -#### Signature - -```java -public void close() -``` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 911. - -*** - -### cond - -#### Signature - -```java -public Service cond(List> conditions) -``` - -#### Parameters - - - -#### Returns - -`Service` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 455. - -*** - -### connect - -#### Signature - -```java -public Service connect(Map params) -``` - -#### Parameters - - - -#### Returns - -`Service` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 460. - -*** - -### defineTool - -Define a SWAIG function the AI can call. - -Tool descriptions and -parameter descriptions are LLM-facing prompt engineering — see -PORTING\_GUIDE for guidance on writing them. - -#### Signature - - - - ```java - public Service defineTool( - String name, - String description, - java.util.Map parameters, - com.signalwire.sdk.swaig.ToolHandler handler - ) - ``` - - - - ```java - public Service defineTool(com.signalwire.sdk.swaig.ToolDefinition toolDef) - ``` - - - -#### Parameters (Overload 1) - - - - - - - - - -#### Parameters (Overload 2) - - - -#### Returns (Overload 1) - -`Service` - -#### Returns (Overload 2) - -`Service` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 219. - -*** - -### defineTools - -Register multiple tool definitions at once. - -#### Signature - -```java -public Service defineTools( - java.util.List toolDefs -) -``` - -#### Parameters - - - -#### Returns - -`Service` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 239. - -*** - -### denoise - -#### Signature - -```java -public Service denoise(Map params) -``` - -#### Parameters - - - -#### Returns - -`Service` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 465. - -*** - -### detectMachine - -#### Signature - -```java -public Service detectMachine(Map params) -``` - -#### Parameters - - - -#### Returns - -`Service` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 470. - -*** - -### enterQueue - -#### Signature - -```java -public Service enterQueue(Map params) -``` - -#### Parameters - - - -#### Returns - -`Service` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 475. - -*** - -### execute - -#### Signature - -```java -public Service execute(Map params) -``` - -#### Parameters - - - -#### Returns - -`Service` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 480. - -*** - -### generatePassword - -**Modifiers:** `static` - -#### Signature - -```java -protected static String generatePassword() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 116. - -*** - -### getAllFunctions - -Snapshot of all registered SWAIG functions keyed by name. -(Python parity: `ToolRegistry.get_all_functions`.) - -#### Signature - -```java -public java.util.Map getAllFunctions() -``` - -#### Returns - -`java.util.Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 277. - -*** - -### getAuthPassword - -#### Signature - -```java -public String getAuthPassword() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 129. - -*** - -### getAuthUser - -#### Signature - -```java -public String getAuthUser() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 125. - -*** - -### getBasicAuthCredentials - -Get the configured (user, password) pair as a String\[2] tuple. -(Python parity: `AuthMixin.get_basic_auth_credentials`.) - -#### Signature - -```java -public String[] getBasicAuthCredentials() -``` - -#### Returns - -`String[]` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 148. - -*** - -### getBasicAuthCredentialsWithSource - -Get (user, password, source) where source is "provided", -"environment", or "generated". - -(Python parity: -`AuthMixin.get_basic_auth_credentials(include_source=True)`.) - -#### Signature - -```java -public String[] getBasicAuthCredentialsWithSource() -``` - -#### Returns - -`String[]` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 155. - -*** - -### getDocument - -#### Signature - -```java -public Document getDocument() -``` - -#### Returns - -`Document` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 420. - -*** - -### getFunction - -Get a registered SWAIG function by name, or null when absent. -(Python parity: `ToolRegistry.get_function`.) - -#### Signature - -```java -public com.signalwire.sdk.swaig.ToolDefinition getFunction(String name) -``` - -#### Parameters - - - -#### Returns - -`com.signalwire.sdk.swaig.ToolDefinition` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 271. - -*** - -### getRegisteredSwaigFunctions - -Read-only view of the raw SWAIG function entries registered via -`#registerSwaigFunction(java.util.Map)`. - -These are typically -DataMap or schema-only tools that don't have a Java `com.signalwire.sdk.swaig.ToolHandler`. -Each entry is a defensive copy of the original map; the outer list -is unmodifiable. - -#### Signature - -```java -public java.util.List> getRegisteredSwaigFunctions() -``` - -#### Returns - -`java.util.List>` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 306. - -*** - -### getRegisteredTools - -Public, read-only view of the registered SWAIG tool registry. -Returned in insertion order; the map and its definitions are -unmodifiable. - -Used by introspection callers (CLI `--list-tools` -file-loader path, tests, audit tooling) that need name + description + -parameters without going through `/swaig` HTTP. - -#### Signature - -```java -public java.util.Map getRegisteredTools() -``` - -#### Returns - -`java.util.Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 295. - -*** - -### getSchemaUtils - -SchemaUtils helper bound to this Service. - -Mirrors Python's -`self.schema_utils` public instance attribute on -`SWMLService`. Built lazily on first access. - -#### Signature - -```java -public SchemaUtils getSchemaUtils() -``` - -#### Returns - -`SchemaUtils` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 429. - -*** - -### gotoLabel - -#### Signature - -```java -public Service gotoLabel(Map params) -``` - -#### Parameters - - - -#### Returns - -`Service` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 485. - -*** - -### hangup - -#### Signature - - - - ```java - public Service hangup(Map params) - ``` - - - - ```java - public Service hangup() - ``` - - - -#### Parameters (Overload 1) - - - -#### Returns (Overload 1) - -`Service` - -#### Returns (Overload 2) - -`Service` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 490. - -*** - -### hasFunction - -Whether a SWAIG function with the given name is registered. -(Python parity: `ToolRegistry.has_function`.) - -#### Signature - -```java -public boolean hasFunction(String name) -``` - -#### Parameters - - - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 265. - -*** - -### joinConference - -#### Signature - -```java -public Service joinConference(Map params) -``` - -#### Parameters - - - -#### Returns - -`Service` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 500. - -*** - -### joinRoom - -#### Signature - -```java -public Service joinRoom(Map params) -``` - -#### Parameters - - - -#### Returns - -`Service` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 505. - -*** - -### label - -#### Signature - -```java -public Service label(Map params) -``` - -#### Parameters - - - -#### Returns - -`Service` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 510. - -*** - -### listToolNames - -List registered SWAIG tool names in insertion order. - -#### Signature - -```java -public java.util.List listToolNames() -``` - -#### Returns - -`java.util.List` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 259. - -*** - -### liveTranscribe - -#### Signature - -```java -public Service liveTranscribe(Map params) -``` - -#### Parameters - - - -#### Returns - -`Service` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 515. - -*** - -### liveTranslate - -#### Signature - -```java -public Service liveTranslate(Map params) -``` - -#### Parameters - - - -#### Returns - -`Service` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 520. - -*** - -### onFunctionCall - -Dispatch a function call to the registered handler. - -#### Signature - -```java -public com.signalwire.sdk.swaig.FunctionResult onFunctionCall( - String funcName, - java.util.Map args, - java.util.Map rawData -) -``` - -#### Parameters - - - - - - - -#### Returns - -`com.signalwire.sdk.swaig.FunctionResult` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 247. - -*** - -### onRequest - -Customization hook called when SWML is requested. - -Default -delegates to String) and -returns its result. Subclasses typically override -`onSwmlRequest` rather than this method. - -<p>Returning `null` uses the default rendered SWML; -returning a non-null map merges the entries as modifications. - -<p>Python parity: callback_path). The Python third `request` parameter is -FastAPI-specific and intentionally not mirrored. - -#### Signature - -```java -public java.util.Map onRequest( - java.util.Map requestData, - String callbackPath -) -``` - -#### Parameters - - - parsed request body, or `null` - - - - optional callback sub-path, or `null` - - -#### Returns - -`java.util.Map` — modifications map, or `null` for default rendering - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 360. - -*** - -### onSwmlRequest - -Customization point for subclasses to modify SWML based on -request data. - -The default implementation returns `null` -(no modification). Subclasses override to inspect the body or -callback path and return a map of SWML overrides. - -<p>Python parity: callback_path). The Python third `request` parameter is -FastAPI-specific and intentionally not mirrored. - -#### Signature - -```java -public java.util.Map onSwmlRequest( - java.util.Map requestData, - String callbackPath -) -``` - -#### Parameters - - - parsed request body, or `null` - - - - optional callback sub-path, or `null` - - -#### Returns - -`java.util.Map` — modifications map, or `null` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 380. - -*** - -### pay - -#### Signature - -```java -public Service pay(Map params) -``` - -#### Parameters - - - -#### Returns - -`Service` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 525. - -*** - -### play - -#### Signature - -```java -public Service play(Map params) -``` - -#### Parameters - - - -#### Returns - -`Service` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 530. - -*** - -### prompt - -#### Signature - -```java -public Service prompt(Map params) -``` - -#### Parameters - - - -#### Returns - -`Service` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 535. - -*** - -### readBody - -Read request body with size limit. - -#### Signature - -```java -protected String readBody(HttpExchange exchange) -``` - -#### Parameters - - - -#### Returns - -`String` - -#### Throws - -- `IOException` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 643. - -*** - -### receiveFax - -#### Signature - -```java -public Service receiveFax(Map params) -``` - -#### Parameters - - - -#### Returns - -`Service` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 540. - -*** - -### record - -#### Signature - -```java -public Service record(Map params) -``` - -#### Parameters - - - -#### Returns - -`Service` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 545. - -*** - -### recordCall - -#### Signature - -```java -public Service recordCall(Map params) -``` - -#### Parameters - - - -#### Returns - -`Service` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 550. - -*** - -### registerAdditionalRoutes - -Extension point: register additional HTTP routes after Service -mounts /health, /ready, /swaig and the main route. - -AgentBase uses -this to add /post\_prompt and /mcp. - -#### Signature - -```java -protected void registerAdditionalRoutes(HttpServer server) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 340. - -*** - -### registerSwaigFunction - -Register a raw SWAIG function definition (e.g. - -DataMap tools). - -#### Signature - -```java -public Service registerSwaigFunction(java.util.Map swaigFunc) -``` - -#### Parameters - - - -#### Returns - -`Service` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 233. - -*** - -### removeFunction - -Remove a registered SWAIG function. - -Returns true when removed, -false when the function was not registered. -(Python parity: `ToolRegistry.remove_function`.) - -#### Signature - -```java -public boolean removeFunction(String name) -``` - -#### Parameters - - - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 284. - -*** - -### renderMainSwml - -Extension point: render the SWML document for the main path or for -GET /swaig. - -Default returns the currently-built Document. AgentBase -overrides to emit prompt + AI verb at request time. - -#### Signature - -```java -protected java.util.Map renderMainSwml(HttpExchange exchange) -``` - -#### Parameters - - - -#### Returns - -`java.util.Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 331. - -*** - -### request - -#### Signature - -```java -public Service request(Map params) -``` - -#### Parameters - - - -#### Returns - -`Service` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 555. - -*** - -### resolvePort - -**Modifiers:** `static` - -#### Signature - -```java -protected static int resolvePort() -``` - -#### Returns - -`int` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 105. - -*** - -### returnVerb - -#### Signature - -```java -public Service returnVerb(Map params) -``` - -#### Parameters - - - -#### Returns - -`Service` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 560. - -*** - -### sendDigits - -#### Signature - -```java -public Service sendDigits(Map params) -``` - -#### Parameters - - - -#### Returns - -`Service` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 570. - -*** - -### sendFax - -#### Signature - -```java -public Service sendFax(Map params) -``` - -#### Parameters - - - -#### Returns - -`Service` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 575. - -*** - -### sendJson - -Send a JSON response. - -#### Signature - -```java -protected void sendJson(HttpExchange exchange, int status, Object body) -``` - -#### Parameters - - - - - - - -#### Throws - -- `IOException` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 661. - -*** - -### sendPayloadTooLarge - -Send a 413 Payload Too Large response. - -#### Signature - -```java -protected void sendPayloadTooLarge(HttpExchange exchange) -``` - -#### Parameters - - - -#### Throws - -- `IOException` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 683. - -*** - -### sendSms - -#### Signature - -```java -public Service sendSms(Map params) -``` - -#### Parameters - - - -#### Returns - -`Service` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 580. - -*** - -### sendUnauthorized - -Send a 401 Unauthorized response. - -#### Signature - -```java -protected void sendUnauthorized(HttpExchange exchange) -``` - -#### Parameters - - - -#### Throws - -- `IOException` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 674. - -*** - -### serve - -Start the HTTP server with health, ready, /swaig, and main SWML endpoint. -Subclasses (AgentBase) add additional routes via -`#registerAdditionalRoutes(HttpServer)` and customize SWML -rendering via `#renderMainSwml(HttpExchange)`. - -#### Signature - -```java -public void serve() -``` - -#### Throws - -- `IOException` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 694. - -*** - -### set - -#### Signature - -```java -public Service set(Map params) -``` - -#### Parameters - - - -#### Returns - -`Service` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 585. - -*** - -### sipRefer - -#### Signature - -```java -public Service sipRefer(Map params) -``` - -#### Parameters - - - -#### Returns - -`Service` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 565. - -*** - -### sleep - -Sleep takes an integer (milliseconds), not a map. - -#### Signature - -```java -public Service sleep(int milliseconds) -``` - -#### Parameters - - - -#### Returns - -`Service` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 593. - -*** - -### stop - -Stop the HTTP server. - -#### Signature - -```java -public void stop() -``` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 887. - -*** - -### stopDenoise - -#### Signature - -```java -public Service stopDenoise(Map params) -``` - -#### Parameters - - - -#### Returns - -`Service` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 598. - -*** - -### stopRecordCall - -#### Signature - -```java -public Service stopRecordCall(Map params) -``` - -#### Parameters - - - -#### Returns - -`Service` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 603. - -*** - -### stopTap - -#### Signature - -```java -public Service stopTap(Map params) -``` - -#### Parameters - - - -#### Returns - -`Service` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 608. - -*** - -### swaigPreDispatch - -Extension point: invoked between argument parsing and function -dispatch. - -Returns a 2-element array: \[target Service, shortCircuit Map]. -If shortCircuit is non-null, it's returned as the SWAIG response -without calling onFunctionCall. AgentBase may override to add -session-token validation or ephemeral dynamic-config copies. - -#### Signature - -```java -protected Object[] swaigPreDispatch( - java.util.Map requestData, - String funcName -) -``` - -#### Parameters - - - - - -#### Returns - -`Object[]` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 321. - -*** - -### switchVerb - -#### Signature - -```java -public Service switchVerb(Map params) -``` - -#### Parameters - - - -#### Returns - -`Service` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 613. - -*** - -### tap - -#### Signature - -```java -public Service tap(Map params) -``` - -#### Parameters - - - -#### Returns - -`Service` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 618. - -*** - -### transfer - -#### Signature - -```java -public Service transfer(Map params) -``` - -#### Parameters - - - -#### Returns - -`Service` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 623. - -*** - -### unset - -#### Signature - -```java -public Service unset(Map params) -``` - -#### Parameters - - - -#### Returns - -`Service` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 628. - -*** - -### userEvent - -#### Signature - -```java -public Service userEvent(Map params) -``` - -#### Parameters - - - -#### Returns - -`Service` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 633. - -*** - -### validateAuth - -Timing-safe basic auth validation using MessageDigest.isEqual. - -#### Signature - -```java -protected boolean validateAuth(HttpExchange exchange) -``` - -#### Parameters - - - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 176. - -*** - -### validateBasicAuth - -Validate provided basic-auth credentials against the configured ones -using a constant-time comparison. - -(Python parity: -`AuthMixin.validate_basic_auth(username, password)`.) - -#### Signature - -```java -public boolean validateBasicAuth(String username, String password) -``` - -#### Parameters - - - - - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 136. - -*** - -### validateSignedWebhook - -Extension hook invoked between raw-body capture and JSON parsing on -signed POST routes (`/`, `/swaig`, `/post_prompt`). -Subclasses (AgentBase) override to enforce SignalWire webhook signature -validation when a signing key is configured. - -Default returns -`true` (no validation). - -<p>Returning `false` signals "signature invalid"; the caller -sends Forbidden and stops dispatch. Per -porting-sdk/webhooks.md the response body must NOT disclose which -branch failed. - -#### Signature - -```java -protected boolean validateSignedWebhook(HttpExchange exchange, String rawBody) -``` - -#### Parameters - - - the HTTP exchange. - - - - the raw UTF-8 body string already read from the exchange. Pass through to `com.signalwire.sdk.security.WebhookValidator`. - - -#### Returns - -`boolean` — `true` when validation passes (or is disabled); `false` to short-circuit with a 403. - -#### Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 404. - -## Source - -[`src/main/java/com/signalwire/sdk/swml/Service.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/Service.java) - -Line 31. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/tools/tools/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/tools/tools/index.mdx deleted file mode 100644 index a08ba8f071..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/tools/tools/index.mdx +++ /dev/null @@ -1,19 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/tools/tools" -title: "tools" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "module" - language: "java" - qualified_name: "com.signalwire.sdk.tools" - module: "com.signalwire.sdk.tools" ---- -# `tools` - -## Signature - -```java -package com.signalwire.sdk.tools -``` diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/utils/utils/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/utils/utils/index.mdx deleted file mode 100644 index 753dd6b84f..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/utils/utils/index.mdx +++ /dev/null @@ -1,27 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/utils/utils" -title: "utils" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "module" - language: "java" - qualified_name: "com.signalwire.sdk.utils" - module: "com.signalwire.sdk.utils" ---- -# `utils` - -## Signature - -```java -package com.signalwire.sdk.utils -``` - -## Classes - - - - SSRF-prevention guard for user-supplied URLs. <p> Mirrors Python's `signalwire.utils.url_validator.validate_url`: rejects non-http(s) schemes, missing hostnames, and any URL whose hostname resolves to a private / loopback / link-local / cloud-metadata IP. - - diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/utils/utils/url-validator/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/utils/utils/url-validator/index.mdx deleted file mode 100644 index 65c3f377c3..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/utils/utils/url-validator/index.mdx +++ /dev/null @@ -1,80 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/utils/utils/url-validator" -title: "UrlValidator" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.utils.UrlValidator" - parent: "com.signalwire.sdk.utils" - module: "com.signalwire.sdk.utils" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/utils/UrlValidator.java" - visibility: "public" ---- -# `UrlValidator` - -SSRF-prevention guard for user-supplied URLs. - -<p> -Mirrors Python's `signalwire.utils.url_validator.validate_url`: -rejects non-http(s) schemes, missing hostnames, and any URL whose -hostname resolves to a private / loopback / link-local / cloud-metadata -IP. - -The `allowPrivate` parameter (or the -`SWML_ALLOW_PRIVATE_URLS` env var with value "1", "true" or "yes", -case-insensitive) bypasses the IP-blocklist check. - -<p> -Projected onto the Python free function name `validate_url` via -scripts/enumerate_signatures.py. - -**Modifiers:** `final` - -## Signature - -```java -public final class UrlValidator -``` - -## Methods - -### validateUrl - -Validate that a URL is safe to fetch. - -**Modifiers:** `static` - -#### Signature - -```java -public static boolean validateUrl(String url, boolean allowPrivate) -``` - -#### Parameters - - - URL string to validate. - - - - when true, bypass the IP-blocklist check. - - -#### Returns - -`boolean` — true when the URL is safe to fetch, false otherwise. - -#### Source - -[`src/main/java/com/signalwire/sdk/utils/UrlValidator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/utils/UrlValidator.java) - -Line 73. - -## Source - -[`src/main/java/com/signalwire/sdk/utils/UrlValidator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/utils/UrlValidator.java) - -Line 30. diff --git a/fern/products/sdk-reference/java/core/index.mdx b/fern/products/sdk-reference/java/core/index.mdx new file mode 100644 index 0000000000..2c588a0f37 --- /dev/null +++ b/fern/products/sdk-reference/java/core/index.mdx @@ -0,0 +1,22 @@ +--- +slug: "/reference/java/core" +title: "core" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "core" +--- +# `core` + +## Modules + + + + + + + + diff --git a/fern/products/sdk-reference/java/core/logging/index.mdx b/fern/products/sdk-reference/java/core/logging/index.mdx new file mode 100644 index 0000000000..4e28a2c702 --- /dev/null +++ b/fern/products/sdk-reference/java/core/logging/index.mdx @@ -0,0 +1,26 @@ +--- +slug: "/reference/java/core/logging" +title: "logging" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "com.signalwire.sdk.logging" + parent: "core" + module: "core" +--- +# `logging` + +## Signature + +```java +package com.signalwire.sdk.logging +``` + +## Modules + + + + diff --git a/fern/products/sdk-reference/java/core/logging/logging/index.mdx b/fern/products/sdk-reference/java/core/logging/logging/index.mdx new file mode 100644 index 0000000000..fc1ca73973 --- /dev/null +++ b/fern/products/sdk-reference/java/core/logging/logging/index.mdx @@ -0,0 +1,28 @@ +--- +slug: "/reference/java/core/logging/logging" +title: "logging" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "core.logging.logging" + parent: "com.signalwire.sdk.logging" + module: "core.logging" +--- +# `logging` + +## Classes + + + + Simple logging system with level control via environment variables. <p> Levels: DEBUG, INFO, WARN, ERROR, OFF <p> Environment variables: <ul> <li>SIGNALWIRE\_LOG\_LEVEL - set log level (debug/info/warn/error/off)</li> <li>SIGNALWIRE\_LOG\_MODE - set to "off" to suppress all output</li> </ul> + + + +## Modules + + + + diff --git a/fern/products/sdk-reference/java/core/logging/logging/logger/index.mdx b/fern/products/sdk-reference/java/core/logging/logging/logger/index.mdx new file mode 100644 index 0000000000..3466274c5d --- /dev/null +++ b/fern/products/sdk-reference/java/core/logging/logging/logger/index.mdx @@ -0,0 +1,329 @@ +--- +slug: "/reference/java/core/logging/logging/logger" +title: "Logger" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.logging.Logger" + parent: "core.logging.logging" + module: "core.logging.logging" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java" + visibility: "public" +--- +# `Logger` + +Simple logging system with level control via environment variables. + +<p> +Levels: DEBUG, INFO, WARN, ERROR, OFF +<p> +Environment variables: +<ul> + <li>SIGNALWIRE_LOG_LEVEL - set log level (debug/info/warn/error/off)</li> + <li>SIGNALWIRE_LOG_MODE - set to "off" to suppress all output</li> +</ul> + +**Modifiers:** `final` + +## Signature + +```java +public final class Logger +``` + +## Methods + +### \ + +#### Signature + +```java +public (String name) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/logging/Logger.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java) + +Line 63. + +*** + +### debug + +#### Signature + + + + ```java + public void debug(String message) + ``` + + + + ```java + public void debug(String format, Object args) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/logging/Logger.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java) + +Line 87. + +*** + +### error + +#### Signature + + + + ```java + public void error(String message) + ``` + + + + ```java + public void error(String format, Object args) + ``` + + + + ```java + public void error(String message, Throwable t) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Parameters (Overload 3) + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/logging/Logger.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java) + +Line 111. + +*** + +### getGlobalLevel + +**Modifiers:** `static` + +#### Signature + +```java +public static Level getGlobalLevel() +``` + +#### Returns + +`Level` + +#### Source + +[`src/main/java/com/signalwire/sdk/logging/Logger.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java) + +Line 79. + +*** + +### getLogger + +**Modifiers:** `static` + +#### Signature + + + + ```java + public static Logger getLogger(String name) + ``` + + + + ```java + public static Logger getLogger(Class clazz) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`Logger` + +#### Returns (Overload 2) + +`Logger` + +#### Source + +[`src/main/java/com/signalwire/sdk/logging/Logger.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java) + +Line 67. + +*** + +### info + +#### Signature + + + + ```java + public void info(String message) + ``` + + + + ```java + public void info(String format, Object args) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/logging/Logger.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java) + +Line 95. + +*** + +### isEnabled + +#### Signature + +```java +public boolean isEnabled(Level level) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/logging/Logger.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java) + +Line 83. + +*** + +### setGlobalLevel + +**Modifiers:** `static` + +#### Signature + +```java +public static void setGlobalLevel(Level level) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/logging/Logger.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java) + +Line 75. + +*** + +### warn + +#### Signature + + + + ```java + public void warn(String message) + ``` + + + + ```java + public void warn(String format, Object args) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/logging/Logger.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java) + +Line 103. + +## Source + +[`src/main/java/com/signalwire/sdk/logging/Logger.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java) + +Line 20. diff --git a/fern/products/sdk-reference/java/core/logging/logging/logger/index__2.mdx b/fern/products/sdk-reference/java/core/logging/logging/logger/index__2.mdx new file mode 100644 index 0000000000..f05d1ef616 --- /dev/null +++ b/fern/products/sdk-reference/java/core/logging/logging/logger/index__2.mdx @@ -0,0 +1,106 @@ +--- +slug: "/reference/java/core/logging/logging/logger/index__2" +title: "Logger" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "core.logging.logging.Logger" + parent: "core.logging.logging" + module: "core.logging.logging" +--- +# `Logger` + +## Enums + +### Level + +#### Signature + +```java +public enum Level +``` + +#### Variants + + + + + + + + + + + +#### Methods + +##### getValue + +###### Signature + +```java +public int getValue() +``` + +###### Returns + +`int` + +###### Source + +[`src/main/java/com/signalwire/sdk/logging/Logger.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java) + +Line 31. + +*** + +##### valueOf + +**Modifiers:** `static` + +###### Signature + +```java +public static Level valueOf(String name) +``` + +###### Parameters + + + +###### Returns + +`Level` + +###### Source + +[`src/main/java/com/signalwire/sdk/logging/Logger.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java) + +*** + +##### values + +**Modifiers:** `static` + +###### Signature + +```java +public static Level[] values() +``` + +###### Returns + +`Level[]` + +###### Source + +[`src/main/java/com/signalwire/sdk/logging/Logger.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java) + +#### Source + +[`src/main/java/com/signalwire/sdk/logging/Logger.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java) + +Line 22. diff --git a/fern/products/sdk-reference/java/core/security/index.mdx b/fern/products/sdk-reference/java/core/security/index.mdx new file mode 100644 index 0000000000..798b80c406 --- /dev/null +++ b/fern/products/sdk-reference/java/core/security/index.mdx @@ -0,0 +1,26 @@ +--- +slug: "/reference/java/core/security" +title: "security" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "com.signalwire.sdk.security" + parent: "core" + module: "core" +--- +# `security` + +## Signature + +```java +package com.signalwire.sdk.security +``` + +## Modules + + + + diff --git a/fern/products/sdk-reference/java/core/security/security/index.mdx b/fern/products/sdk-reference/java/core/security/security/index.mdx new file mode 100644 index 0000000000..5412cfa328 --- /dev/null +++ b/fern/products/sdk-reference/java/core/security/security/index.mdx @@ -0,0 +1,36 @@ +--- +slug: "/reference/java/core/security/security" +title: "security" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "core.security.security" + parent: "com.signalwire.sdk.security" + module: "core.security" +--- +# `security` + +## Classes + + + + Session manager for HMAC-SHA256 signed tool tokens. Stub for the security module being built by another agent. + + + + Servlet filter that enforces SignalWire webhook signature validation on incoming requests. <p>Wraps the request in a body-caching wrapper before reading the body so that downstream handlers (including framework parsers) can re-read the same raw bytes. + + + + Webhook signature validation for SignalWire-signed HTTP requests. <p>Implements both schemes from `porting-sdk/webhooks.md`: <ul> <li><b>Scheme A</b> (RELAY/SWML/JSON): url + rawBody)).</li> <li><b>Scheme B</b> (Compat/cXML form): url + sortedFormParams)) with optional `bodySHA256` query-param fallback for JSON-on-compat-surface.</li> </ul> <p>All signature comparisons use byte\[]) (constant-time) so the secret cannot be leaked through timing differences. <p>Public API: <ul> <li>String, String, String) — combined entry point.</li> <li>String, String, Object) — legacy `@signalwire/compatibility-api` drop-in alias.</li> </ul> <p>This is a stateless utility — every method is static and the class is not intended to be instantiated. + + + +## Modules + + + + diff --git a/fern/products/sdk-reference/java/core/security/security/session-manager/index.mdx b/fern/products/sdk-reference/java/core/security/security/session-manager/index.mdx new file mode 100644 index 0000000000..7f3783daf3 --- /dev/null +++ b/fern/products/sdk-reference/java/core/security/security/session-manager/index.mdx @@ -0,0 +1,141 @@ +--- +slug: "/reference/java/core/security/security/session-manager" +title: "SessionManager" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.security.SessionManager" + parent: "core.security.security" + module: "core.security.security" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/security/SessionManager.java" + visibility: "public" +--- +# `SessionManager` + +Session manager for HMAC-SHA256 signed tool tokens. +Stub for the security module being built by another agent. + +## Signature + +```java +public class SessionManager +``` + +## Methods + +### \ + +#### Signature + + + + ```java + public () + ``` + + + + ```java + public (int defaultExpiry) + ``` + + + +#### Parameters (Overload 2) + + + +#### Source + +[`src/main/java/com/signalwire/sdk/security/SessionManager.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/security/SessionManager.java) + +Line 19. + +*** + +### createToken + +Create a signed token for a function + callID. + +#### Signature + + + + ```java + public String createToken(String functionName, String callId) + ``` + + + + ```java + public String createToken(String functionName, String callId, int expirySeconds) + ``` + + + +#### Parameters (Overload 1) + + + + + +#### Parameters (Overload 2) + + + + + + + +#### Returns (Overload 1) + +`String` + +#### Returns (Overload 2) + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/security/SessionManager.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/security/SessionManager.java) + +Line 32. + +*** + +### validateToken + +Validate a signed token. + +#### Signature + +```java +public boolean validateToken(String token, String functionName, String callId) +``` + +#### Parameters + + + + + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/security/SessionManager.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/security/SessionManager.java) + +Line 48. + +## Source + +[`src/main/java/com/signalwire/sdk/security/SessionManager.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/security/SessionManager.java) + +Line 14. diff --git a/fern/products/sdk-reference/java/core/security/security/webhook-filter/cached-body-http-servlet-request/index.mdx b/fern/products/sdk-reference/java/core/security/security/webhook-filter/cached-body-http-servlet-request/index.mdx new file mode 100644 index 0000000000..02a9c25b3a --- /dev/null +++ b/fern/products/sdk-reference/java/core/security/security/webhook-filter/cached-body-http-servlet-request/index.mdx @@ -0,0 +1,152 @@ +--- +slug: "/reference/java/core/security/security/webhook-filter/cached-body-http-servlet-request" +title: "CachedBodyHttpServletRequest" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.security.WebhookFilter.CachedBodyHttpServletRequest" + parent: "core.security.security.WebhookFilter" + module: "core.security.security.WebhookFilter" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/security/WebhookFilter.java" + visibility: "public" +--- +# `CachedBodyHttpServletRequest` + +`HttpServletRequestWrapper` that buffers the request body so it +can be read multiple times (once by the filter for signature +validation, once by the downstream handler for parsing). + +**Modifiers:** `static` `final` + +## Signature + +```java +public static final class CachedBodyHttpServletRequest extends HttpServletRequestWrapper +``` + +## Inheritance + +**Extends:** `HttpServletRequestWrapper` + +## Methods + +### \ + +#### Signature + +```java +public (HttpServletRequest request) +``` + +#### Parameters + + + +#### Throws + +- `IOException` + +#### Source + +[`src/main/java/com/signalwire/sdk/security/WebhookFilter.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/security/WebhookFilter.java) + +Line 199. + +*** + +### getCachedBody + +Snapshot of the cached body bytes. + +Defensive copy. + +#### Signature + +```java +public byte[] getCachedBody() +``` + +#### Returns + +`byte[]` + +#### Source + +[`src/main/java/com/signalwire/sdk/security/WebhookFilter.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/security/WebhookFilter.java) + +Line 208. + +*** + +### getCachedBodyAsString + +Cached body decoded as UTF-8 (or the request's declared charset). + +#### Signature + +```java +public String getCachedBodyAsString() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/security/WebhookFilter.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/security/WebhookFilter.java) + +Line 213. + +*** + +### getInputStream + +**Decorators:** `@Override` + +#### Signature + +```java +public ServletInputStream getInputStream() +``` + +#### Returns + +`ServletInputStream` + +#### Source + +[`src/main/java/com/signalwire/sdk/security/WebhookFilter.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/security/WebhookFilter.java) + +Line 221. + +*** + +### getReader + +**Decorators:** `@Override` + +#### Signature + +```java +public BufferedReader getReader() +``` + +#### Returns + +`BufferedReader` + +#### Source + +[`src/main/java/com/signalwire/sdk/security/WebhookFilter.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/security/WebhookFilter.java) + +Line 256. + +## Source + +[`src/main/java/com/signalwire/sdk/security/WebhookFilter.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/security/WebhookFilter.java) + +Line 195. diff --git a/fern/products/sdk-reference/java/core/security/security/webhook-filter/index.mdx b/fern/products/sdk-reference/java/core/security/security/webhook-filter/index.mdx new file mode 100644 index 0000000000..b3643ee9b1 --- /dev/null +++ b/fern/products/sdk-reference/java/core/security/security/webhook-filter/index.mdx @@ -0,0 +1,188 @@ +--- +slug: "/reference/java/core/security/security/webhook-filter" +title: "WebhookFilter" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.security.WebhookFilter" + parent: "core.security.security" + module: "core.security.security" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/security/WebhookFilter.java" + visibility: "public" +--- +# `WebhookFilter` + +Servlet filter that enforces SignalWire webhook signature validation on +incoming requests. + +<p>Wraps the request in a body-caching wrapper before reading the body so +that downstream handlers (including framework parsers) can re-read the same +raw bytes. + +This is the canonical Java framework adapter described in the +"Framework adapter" section of `porting-sdk/webhooks.md`. + +<p>Behavior: + +<ol> + <li>Read the raw request body once and cache it.</li> + <li>Extract `X-SignalWire-Signature` (or `X-Twilio-Signature`) + from the request headers.</li> + <li>Reconstruct the public URL — uses `X-Forwarded-Proto` / + `X-Forwarded-Host` when `trustProxy` is set, otherwise + falls back to `HttpServletRequest#getRequestURL()` + + `HttpServletRequest#getQueryString()`.</li> + <li>Call String, String, String).</li> + <li>On invalid: respond Forbidden and do <b>not</b> call + `chain.doFilter`.</li> + <li>On valid: forward via `chain.doFilter` with the body-caching + request wrapper so downstream handlers can re-read the body.</li> +</ol> + +<p>The filter intentionally does <b>not</b> log the signing key, the +incoming signature, or which scheme branch tripped — disclosing those +weakens the constant-time defense and gives attackers data to differentiate +scheme branches with. + +<p>Note: this class targets the `javax.servlet` API (Servlet 4.x / +Tomcat 9 / Jetty 9). Apps on Servlet 5.x / Jakarta EE 9+ should bridge via +a → jakarta shim or copy this class into their codebase +with the import package swapped. + +## Signature + +```java +public class WebhookFilter implements Filter +``` + +## Inheritance + +**Implements:** `Filter` + +## Methods + +### \ + +Construct a filter with proxy trust disabled. + +#### Signature + + + + ```java + public (String signingKey) + ``` + + + + ```java + public (String signingKey, boolean trustProxy) + ``` + + + +#### Parameters (Overload 1) + + + customer's Signing Key. Must be non-empty; an empty value is a programming error and the constructor throws `IllegalArgumentException`. + + +#### Parameters (Overload 2) + + + customer's Signing Key. Required. + + + + when `true`, honor `X-Forwarded-Proto` / `X-Forwarded-Host` for URL reconstruction. `false` by default since proxy headers are spoofable; only enable when you control the proxy chain. + + +#### Source + +[`src/main/java/com/signalwire/sdk/security/WebhookFilter.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/security/WebhookFilter.java) + +Line 75. + +*** + +### destroy + +**Decorators:** `@Override` + +#### Signature + +```java +public void destroy() +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/security/WebhookFilter.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/security/WebhookFilter.java) + +Line 102. + +*** + +### doFilter + +**Decorators:** `@Override` + +#### Signature + +```java +public void doFilter( + ServletRequest request, + ServletResponse response, + FilterChain chain +) +``` + +#### Parameters + + + + + + + +#### Throws + +- `IOException` +- `ServletException` + +#### Source + +[`src/main/java/com/signalwire/sdk/security/WebhookFilter.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/security/WebhookFilter.java) + +Line 107. + +*** + +### init + +**Decorators:** `@Override` + +#### Signature + +```java +public void init(FilterConfig filterConfig) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/security/WebhookFilter.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/security/WebhookFilter.java) + +Line 97. + +## Source + +[`src/main/java/com/signalwire/sdk/security/WebhookFilter.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/security/WebhookFilter.java) + +Line 63. diff --git a/fern/products/sdk-reference/java/core/security/security/webhook-filter/index__2.mdx b/fern/products/sdk-reference/java/core/security/security/webhook-filter/index__2.mdx new file mode 100644 index 0000000000..9154f49af5 --- /dev/null +++ b/fern/products/sdk-reference/java/core/security/security/webhook-filter/index__2.mdx @@ -0,0 +1,22 @@ +--- +slug: "/reference/java/core/security/security/webhook-filter/index__2" +title: "WebhookFilter" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "core.security.security.WebhookFilter" + parent: "core.security.security" + module: "core.security.security" +--- +# `WebhookFilter` + +## Classes + + + + `HttpServletRequestWrapper` that buffers the request body so it can be read multiple times (once by the filter for signature validation, once by the downstream handler for parsing). + + diff --git a/fern/products/sdk-reference/java/core/security/security/webhook-validator/index.mdx b/fern/products/sdk-reference/java/core/security/security/webhook-validator/index.mdx new file mode 100644 index 0000000000..573b0738c0 --- /dev/null +++ b/fern/products/sdk-reference/java/core/security/security/webhook-validator/index.mdx @@ -0,0 +1,181 @@ +--- +slug: "/reference/java/core/security/security/webhook-validator" +title: "WebhookValidator" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.security.WebhookValidator" + parent: "core.security.security" + module: "core.security.security" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/security/WebhookValidator.java" + visibility: "public" +--- +# `WebhookValidator` + +Webhook signature validation for SignalWire-signed HTTP requests. + +<p>Implements both schemes from `porting-sdk/webhooks.md`: + +<ul> + <li><b>Scheme A</b> (RELAY/SWML/JSON): url + rawBody)).</li> + <li><b>Scheme B</b> (Compat/cXML form): url + sortedFormParams)) + with optional `bodySHA256` query-param fallback for JSON-on-compat-surface.</li> +</ul> + +<p>All signature comparisons use byte[]) +(constant-time) so the secret cannot be leaked through timing differences. + +<p>Public API: +<ul> + <li>String, String, String) — combined entry point.</li> + <li>String, String, Object) — legacy + `@signalwire/compatibility-api` drop-in alias.</li> +</ul> + +<p>This is a stateless utility — every method is static and the class is +not intended to be instantiated. + +**Modifiers:** `final` + +## Signature + +```java +public final class WebhookValidator +``` + +## Constants + + + Header name that carries the signature on every signed SignalWire request. + + + + Legacy alias accepted by the cXML/Compatibility surface. + + +## Methods + +### validateRequest + +Legacy `@signalwire/compatibility-api` drop-in entry point. + +<p>Dispatches on the runtime type of `paramsOrRawBody`: +<ul> + <li>`String` → delegates to + String, String, String).</li> + <li>`Map` or any `Iterable` of `Map.Entry` (or + 2-element arrays / lists) → treats the value as pre-parsed form + params and runs Scheme B directly with URL port normalization.</li> + <li>`null` → treated as an empty params map (Scheme B).</li> + <li>Anything else → `IllegalArgumentException`.</li> +</ul> + +**Modifiers:** `static` + +#### Signature + +```java +public static boolean validateRequest( + String signingKey, + String signature, + String url, + Object paramsOrRawBody +) +``` + +#### Parameters + + + customer's Signing Key. Non-empty. + + + + header value. `null` / empty returns `false`. + + + + full URL SignalWire POSTed to. + + + + `String` raw body OR pre-parsed form params. + + +#### Returns + +`boolean` — `true` on match, `false` otherwise. + +#### Throws + +- `IllegalArgumentException` — when `signingKey` is empty or `paramsOrRawBody` is of an unsupported type. + +#### Source + +[`src/main/java/com/signalwire/sdk/security/WebhookValidator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/security/WebhookValidator.java) + +Line 171. + +*** + +### validateWebhookSignature + +Validate a SignalWire webhook signature against both schemes. + +<p>Tries Scheme A (hex HMAC-SHA1 over + rawBody) first; on +miss, tries Scheme B (base64 HMAC-SHA1 over + sortedFormParams) +with both port-normalization variants of the URL and an optional +`bodySHA256` fallback for JSON-on-compat-surface. + +**Modifiers:** `static` + +#### Signature + +```java +public static boolean validateWebhookSignature( + String signingKey, + String signature, + String url, + String rawBody +) +``` + +#### Parameters + + + customer's Signing Key from the Dashboard. Must be non-null and non-empty; otherwise an `IllegalArgumentException` is thrown — that's a programming error, not a validation failure. + + + + the `X-SignalWire-Signature` header value (or the `X-Twilio-Signature` alias). `null` or empty returns `false` without throwing. + + + + the full URL SignalWire POSTed to (scheme, host, optional port, path, query). Must match what the platform saw — see the URL reconstruction section of `porting-sdk/webhooks.md`. + + + + the raw UTF-8 request body bytes as a string, <b>before</b> any JSON / form parsing. May be empty but must not be `null` — pass `""` when the body was empty. + + +#### Returns + +`boolean` — `true` when the signature matches either scheme, otherwise `false`. + +#### Throws + +- `IllegalArgumentException` — when `signingKey` is `null` or empty, or when `rawBody` is `null`. + +#### Source + +[`src/main/java/com/signalwire/sdk/security/WebhookValidator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/security/WebhookValidator.java) + +Line 94. + +## Source + +[`src/main/java/com/signalwire/sdk/security/WebhookValidator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/security/WebhookValidator.java) + +Line 50. diff --git a/fern/products/sdk-reference/java/core/utils/index.mdx b/fern/products/sdk-reference/java/core/utils/index.mdx new file mode 100644 index 0000000000..f81f9f9a6d --- /dev/null +++ b/fern/products/sdk-reference/java/core/utils/index.mdx @@ -0,0 +1,26 @@ +--- +slug: "/reference/java/core/utils" +title: "utils" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "com.signalwire.sdk.utils" + parent: "core" + module: "core" +--- +# `utils` + +## Signature + +```java +package com.signalwire.sdk.utils +``` + +## Modules + + + + diff --git a/fern/products/sdk-reference/java/core/utils/utils/index.mdx b/fern/products/sdk-reference/java/core/utils/utils/index.mdx new file mode 100644 index 0000000000..d4a5c22e85 --- /dev/null +++ b/fern/products/sdk-reference/java/core/utils/utils/index.mdx @@ -0,0 +1,22 @@ +--- +slug: "/reference/java/core/utils/utils" +title: "utils" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "core.utils.utils" + parent: "com.signalwire.sdk.utils" + module: "core.utils" +--- +# `utils` + +## Classes + + + + SSRF-prevention guard for user-supplied URLs. <p> Mirrors Python's `signalwire.utils.url_validator.validate_url`: rejects non-http(s) schemes, missing hostnames, and any URL whose hostname resolves to a private / loopback / link-local / cloud-metadata IP. + + diff --git a/fern/products/sdk-reference/java/core/utils/utils/url-validator/index.mdx b/fern/products/sdk-reference/java/core/utils/utils/url-validator/index.mdx new file mode 100644 index 0000000000..a8ad758ef1 --- /dev/null +++ b/fern/products/sdk-reference/java/core/utils/utils/url-validator/index.mdx @@ -0,0 +1,80 @@ +--- +slug: "/reference/java/core/utils/utils/url-validator" +title: "UrlValidator" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.utils.UrlValidator" + parent: "core.utils.utils" + module: "core.utils.utils" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/utils/UrlValidator.java" + visibility: "public" +--- +# `UrlValidator` + +SSRF-prevention guard for user-supplied URLs. + +<p> +Mirrors Python's `signalwire.utils.url_validator.validate_url`: +rejects non-http(s) schemes, missing hostnames, and any URL whose +hostname resolves to a private / loopback / link-local / cloud-metadata +IP. + +The `allowPrivate` parameter (or the +`SWML_ALLOW_PRIVATE_URLS` env var with value "1", "true" or "yes", +case-insensitive) bypasses the IP-blocklist check. + +<p> +Projected onto the Python free function name `validate_url` via +scripts/enumerate_signatures.py. + +**Modifiers:** `final` + +## Signature + +```java +public final class UrlValidator +``` + +## Methods + +### validateUrl + +Validate that a URL is safe to fetch. + +**Modifiers:** `static` + +#### Signature + +```java +public static boolean validateUrl(String url, boolean allowPrivate) +``` + +#### Parameters + + + URL string to validate. + + + + when true, bypass the IP-blocklist check. + + +#### Returns + +`boolean` — true when the URL is safe to fetch, false otherwise. + +#### Source + +[`src/main/java/com/signalwire/sdk/utils/UrlValidator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/utils/UrlValidator.java) + +Line 73. + +## Source + +[`src/main/java/com/signalwire/sdk/utils/UrlValidator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/utils/UrlValidator.java) + +Line 30. diff --git a/fern/products/sdk-reference/java/index.mdx b/fern/products/sdk-reference/java/index.mdx index 77869bfa4c..caae56f844 100644 --- a/fern/products/sdk-reference/java/index.mdx +++ b/fern/products/sdk-reference/java/index.mdx @@ -10,25 +10,9 @@ lustri: ## Modules -- [`agent`](/docs/sdk-reference/reference/java/com/signalwire/sdk/agent/agent) -- [`builtin`](/docs/sdk-reference/reference/java/com/signalwire/sdk/skills/builtin/builtin) -- [`cli`](/docs/sdk-reference/reference/java/com/signalwire/sdk/cli/cli) -- [`contexts`](/docs/sdk-reference/reference/java/com/signalwire/sdk/contexts/contexts) -- [`lambda`](/docs/sdk-reference/reference/java/com/signalwire/sdk/runtime/lambda/lambda) -- [`logging`](/docs/sdk-reference/reference/java/com/signalwire/sdk/logging/logging) -- [`namespaces`](/docs/sdk-reference/reference/java/com/signalwire/sdk/rest/namespaces/namespaces) -- [`pom`](/docs/sdk-reference/reference/java/com/signalwire/sdk/pom/pom) -- [`prefabs`](/docs/sdk-reference/reference/java/com/signalwire/sdk/prefabs/prefabs) -- [`relay`](/docs/sdk-reference/reference/java/com/signalwire/sdk/relay/relay) -- [`rest`](/docs/sdk-reference/reference/java/com/signalwire/sdk/rest/rest) -- [`runtime`](/docs/sdk-reference/reference/java/com/signalwire/sdk/runtime/runtime) +- [`agents`](/docs/sdk-reference/reference/java/agents) +- [`core`](/docs/sdk-reference/reference/java/core) +- [`relay`](/docs/sdk-reference/reference/java/relay) +- [`rest`](/docs/sdk-reference/reference/java/rest) - [`sdk`](/docs/sdk-reference/reference/java/com/signalwire/sdk/sdk) -- [`security`](/docs/sdk-reference/reference/java/com/signalwire/sdk/security/security) -- [`server`](/docs/sdk-reference/reference/java/com/signalwire/sdk/server/server) -- [`simulation`](/docs/sdk-reference/reference/java/com/signalwire/sdk/cli/simulation/simulation) -- [`skills`](/docs/sdk-reference/reference/java/com/signalwire/sdk/skills/skills) -- [`swaig`](/docs/sdk-reference/reference/java/com/signalwire/sdk/swaig/swaig) -- [`swml`](/docs/sdk-reference/reference/java/com/signalwire/sdk/swml/swml) -- [`tools`](/docs/sdk-reference/reference/java/com/signalwire/sdk/tools/tools) -- [`utils`](/docs/sdk-reference/reference/java/com/signalwire/sdk/utils/utils) diff --git a/fern/products/sdk-reference/java/relay/index.mdx b/fern/products/sdk-reference/java/relay/index.mdx new file mode 100644 index 0000000000..9a96c32530 --- /dev/null +++ b/fern/products/sdk-reference/java/relay/index.mdx @@ -0,0 +1,24 @@ +--- +slug: "/reference/java/relay" +title: "relay" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "com.signalwire.sdk.relay" +--- +# `relay` + +## Signature + +```java +package com.signalwire.sdk.relay +``` + +## Modules + + + + diff --git a/fern/products/sdk-reference/java/relay/relay/action/ai-action/index.mdx b/fern/products/sdk-reference/java/relay/relay/action/ai-action/index.mdx new file mode 100644 index 0000000000..41410c76b1 --- /dev/null +++ b/fern/products/sdk-reference/java/relay/relay/action/ai-action/index.mdx @@ -0,0 +1,102 @@ +--- +slug: "/reference/java/relay/relay/action/ai-action" +title: "AiAction" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.Action.AiAction" + parent: "relay.relay.Action" + module: "relay.relay.Action" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java" + visibility: "public" +--- +# `AiAction` + +AI action with stop sub-command. + +**Modifiers:** `static` + +## Signature + +```java +public static class AiAction extends Action +``` + +## Inheritance + +**Extends:** [Action](/docs/sdk-reference/reference/java/relay/relay/action) + +## Methods + +### \ + +#### Signature + +```java +public (String controlId, Call call) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 428. + +*** + +### isTerminal + +**Decorators:** `@Override` + +#### Signature + +```java +protected boolean isTerminal(String actionState) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 432. + +*** + +### stop + +**Decorators:** `@Override` + +#### Signature + +```java +public void stop() +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 438. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 427. diff --git a/fern/products/sdk-reference/java/relay/relay/action/collect-action/index.mdx b/fern/products/sdk-reference/java/relay/relay/action/collect-action/index.mdx new file mode 100644 index 0000000000..b70412add6 --- /dev/null +++ b/fern/products/sdk-reference/java/relay/relay/action/collect-action/index.mdx @@ -0,0 +1,92 @@ +--- +slug: "/reference/java/relay/relay/action/collect-action" +title: "CollectAction" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.Action.CollectAction" + parent: "relay.relay.Action" + module: "relay.relay.Action" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java" + visibility: "public" +--- +# `CollectAction` + +Collect action with stop and start\_input\_timers sub-commands. + +**Modifiers:** `static` + +## Signature + +```java +public static class CollectAction extends Action +``` + +## Inheritance + +**Extends:** [Action](/docs/sdk-reference/reference/java/relay/relay/action) + +## Methods + +### \ + +#### Signature + +```java +public (String controlId, Call call) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 248. + +*** + +### startInputTimers + +#### Signature + +```java +public void startInputTimers() +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 261. + +*** + +### stop + +**Decorators:** `@Override` + +#### Signature + +```java +public void stop() +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 252. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 247. diff --git a/fern/products/sdk-reference/java/relay/relay/action/detect-action/index.mdx b/fern/products/sdk-reference/java/relay/relay/action/detect-action/index.mdx new file mode 100644 index 0000000000..d89e9ee77a --- /dev/null +++ b/fern/products/sdk-reference/java/relay/relay/action/detect-action/index.mdx @@ -0,0 +1,76 @@ +--- +slug: "/reference/java/relay/relay/action/detect-action" +title: "DetectAction" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.Action.DetectAction" + parent: "relay.relay.Action" + module: "relay.relay.Action" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java" + visibility: "public" +--- +# `DetectAction` + +Detect action with stop sub-command. + +**Modifiers:** `static` + +## Signature + +```java +public static class DetectAction extends Action +``` + +## Inheritance + +**Extends:** [Action](/docs/sdk-reference/reference/java/relay/relay/action) + +## Methods + +### \ + +#### Signature + +```java +public (String controlId, Call call) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 230. + +*** + +### stop + +**Decorators:** `@Override` + +#### Signature + +```java +public void stop() +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 234. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 229. diff --git a/fern/products/sdk-reference/java/relay/relay/action/index.mdx b/fern/products/sdk-reference/java/relay/relay/action/index.mdx new file mode 100644 index 0000000000..5e356bcb5b --- /dev/null +++ b/fern/products/sdk-reference/java/relay/relay/action/index.mdx @@ -0,0 +1,340 @@ +--- +slug: "/reference/java/relay/relay/action" +title: "Action" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.Action" + parent: "relay.relay" + module: "relay.relay" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java" + visibility: "public" +--- +# `Action` + +Base class for long-running call actions tracked by `control_id`. + +<p> +Actions support three completion patterns: +<ol> + <li><b>Wait inline</b>: `action.waitForCompletion()` blocks until terminal</li> + <li><b>Fire and forget</b>: don't wait, check `isDone()` later</li> + <li><b>Callback</b>: pass an `onCompleted` callback that fires on terminal state</li> +</ol> +<p> +Subclasses add action-specific sub-commands (pause, resume, volume, etc.). + +## Signature + +```java +public class Action +``` + +## Methods + +### \ + +#### Signature + +```java +public (String controlId, Call call) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 40. + +*** + +### getCall + +#### Signature + +```java +public Call getCall() +``` + +#### Returns + +`Call` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 51. + +*** + +### getControlId + +#### Signature + +```java +public String getControlId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 47. + +*** + +### getResult + +#### Signature + +```java +public RelayEvent getResult() +``` + +#### Returns + +`RelayEvent` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 59. + +*** + +### getState + +#### Signature + +```java +public String getState() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 55. + +*** + +### isDone + +#### Signature + +```java +public boolean isDone() +``` + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 63. + +*** + +### isTerminal + +Check if a state is terminal for this action type. +Subclasses may override for custom terminal states. + +#### Signature + +```java +protected boolean isTerminal(String actionState) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 132. + +*** + +### resolve + +Resolve the action immediately (e.g., on call-gone 404/410). + +#### Signature + +```java +public void resolve(RelayEvent event) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 119. + +*** + +### setOnCompleted + +#### Signature + +```java +public void setOnCompleted(Consumer onCompleted) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 67. + +*** + +### stop + +Stop the action. + +#### Signature + +```java +public void stop() +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 101. + +*** + +### toString + +**Decorators:** `@Override` + +#### Signature + +```java +public String toString() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 146. + +*** + +### updateState + +Update state from an incoming event. + +Resolves the completion future +when a terminal state is reached. + +#### Signature + +```java +public void updateState(String newState, RelayEvent event) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 109. + +*** + +### waitForCompletion + +Block until the action reaches a terminal state. + +#### Signature + + + + ```java + public RelayEvent waitForCompletion() + ``` + + + + ```java + public RelayEvent waitForCompletion(long timeoutMs) + ``` + + + +#### Parameters (Overload 2) + + + timeout in milliseconds + + +#### Returns (Overload 1) + +`RelayEvent` — the terminal event + +#### Returns (Overload 2) + +`RelayEvent` — the terminal event, or null on timeout + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 76. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 28. diff --git a/fern/products/sdk-reference/java/relay/relay/action/index__2.mdx b/fern/products/sdk-reference/java/relay/relay/action/index__2.mdx new file mode 100644 index 0000000000..4d96f50599 --- /dev/null +++ b/fern/products/sdk-reference/java/relay/relay/action/index__2.mdx @@ -0,0 +1,66 @@ +--- +slug: "/reference/java/relay/relay/action/index__2" +title: "Action" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "relay.relay.Action" + parent: "relay.relay" + module: "relay.relay" +--- +# `Action` + +## Classes + + + + AI action with stop sub-command. + + + + Collect action with stop and start\_input\_timers sub-commands. + + + + Detect action with stop sub-command. + + + + Pay action with stop sub-command. + + + + Play action with pause, resume, volume, and stop sub-commands. + + + + Play-and-collect action. <p> Shares one `control_id` across both play and collect phases. Events arrive as BOTH `calling.call.play` and `calling.call.collect`. This action only resolves on collect events, NOT play events. + + + + Receive fax action with stop sub-command. + + + + Record action with pause, resume, and stop sub-commands. + + + + Send fax action with stop sub-command. + + + + Stream action with stop sub-command. + + + + Tap action with stop sub-command. + + + + Transcribe action with stop sub-command. + + diff --git a/fern/products/sdk-reference/java/relay/relay/action/pay-action/index.mdx b/fern/products/sdk-reference/java/relay/relay/action/pay-action/index.mdx new file mode 100644 index 0000000000..b7d46c9ff5 --- /dev/null +++ b/fern/products/sdk-reference/java/relay/relay/action/pay-action/index.mdx @@ -0,0 +1,76 @@ +--- +slug: "/reference/java/relay/relay/action/pay-action" +title: "PayAction" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.Action.PayAction" + parent: "relay.relay.Action" + module: "relay.relay.Action" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java" + visibility: "public" +--- +# `PayAction` + +Pay action with stop sub-command. + +**Modifiers:** `static` + +## Signature + +```java +public static class PayAction extends Action +``` + +## Inheritance + +**Extends:** [Action](/docs/sdk-reference/reference/java/relay/relay/action) + +## Methods + +### \ + +#### Signature + +```java +public (String controlId, Call call) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 305. + +*** + +### stop + +**Decorators:** `@Override` + +#### Signature + +```java +public void stop() +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 309. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 304. diff --git a/fern/products/sdk-reference/java/relay/relay/action/play-action/index.mdx b/fern/products/sdk-reference/java/relay/relay/action/play-action/index.mdx new file mode 100644 index 0000000000..97fe0228fd --- /dev/null +++ b/fern/products/sdk-reference/java/relay/relay/action/play-action/index.mdx @@ -0,0 +1,128 @@ +--- +slug: "/reference/java/relay/relay/action/play-action" +title: "PlayAction" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.Action.PlayAction" + parent: "relay.relay.Action" + module: "relay.relay.Action" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java" + visibility: "public" +--- +# `PlayAction` + +Play action with pause, resume, volume, and stop sub-commands. + +**Modifiers:** `static` + +## Signature + +```java +public static class PlayAction extends Action +``` + +## Inheritance + +**Extends:** [Action](/docs/sdk-reference/reference/java/relay/relay/action) + +## Methods + +### \ + +#### Signature + +```java +public (String controlId, Call call) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 158. + +*** + +### pause + +#### Signature + +```java +public void pause() +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 167. + +*** + +### resume + +#### Signature + +```java +public void resume() +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 171. + +*** + +### stop + +**Decorators:** `@Override` + +#### Signature + +```java +public void stop() +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 162. + +*** + +### volume + +#### Signature + +```java +public void volume(double volumeDb) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 175. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 157. diff --git a/fern/products/sdk-reference/java/relay/relay/action/play-and-collect-action/index.mdx b/fern/products/sdk-reference/java/relay/relay/action/play-and-collect-action/index.mdx new file mode 100644 index 0000000000..55af03ed80 --- /dev/null +++ b/fern/products/sdk-reference/java/relay/relay/action/play-and-collect-action/index.mdx @@ -0,0 +1,101 @@ +--- +slug: "/reference/java/relay/relay/action/play-and-collect-action" +title: "PlayAndCollectAction" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.Action.PlayAndCollectAction" + parent: "relay.relay.Action" + module: "relay.relay.Action" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java" + visibility: "public" +--- +# `PlayAndCollectAction` + +Play-and-collect action. + +<p> +Shares one `control_id` across both play and collect phases. +Events arrive as BOTH `calling.call.play` and `calling.call.collect`. +This action only resolves on collect events, NOT play events. + +**Modifiers:** `static` + +## Signature + +```java +public static class PlayAndCollectAction extends Action +``` + +## Inheritance + +**Extends:** [Action](/docs/sdk-reference/reference/java/relay/relay/action) + +## Methods + +### \ + +#### Signature + +```java +public (String controlId, Call call) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 278. + +*** + +### stop + +**Decorators:** `@Override` + +#### Signature + +```java +public void stop() +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 282. + +*** + +### volume + +#### Signature + +```java +public void volume(double volumeDb) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 291. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 277. diff --git a/fern/products/sdk-reference/java/relay/relay/action/receive-fax-action/index.mdx b/fern/products/sdk-reference/java/relay/relay/action/receive-fax-action/index.mdx new file mode 100644 index 0000000000..11ddd99fb6 --- /dev/null +++ b/fern/products/sdk-reference/java/relay/relay/action/receive-fax-action/index.mdx @@ -0,0 +1,76 @@ +--- +slug: "/reference/java/relay/relay/action/receive-fax-action" +title: "ReceiveFaxAction" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.Action.ReceiveFaxAction" + parent: "relay.relay.Action" + module: "relay.relay.Action" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java" + visibility: "public" +--- +# `ReceiveFaxAction` + +Receive fax action with stop sub-command. + +**Modifiers:** `static` + +## Signature + +```java +public static class ReceiveFaxAction extends Action +``` + +## Inheritance + +**Extends:** [Action](/docs/sdk-reference/reference/java/relay/relay/action) + +## Methods + +### \ + +#### Signature + +```java +public (String controlId, Call call) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 341. + +*** + +### stop + +**Decorators:** `@Override` + +#### Signature + +```java +public void stop() +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 345. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 340. diff --git a/fern/products/sdk-reference/java/relay/relay/action/record-action/index.mdx b/fern/products/sdk-reference/java/relay/relay/action/record-action/index.mdx new file mode 100644 index 0000000000..a6f2a3c998 --- /dev/null +++ b/fern/products/sdk-reference/java/relay/relay/action/record-action/index.mdx @@ -0,0 +1,128 @@ +--- +slug: "/reference/java/relay/relay/action/record-action" +title: "RecordAction" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.Action.RecordAction" + parent: "relay.relay.Action" + module: "relay.relay.Action" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java" + visibility: "public" +--- +# `RecordAction` + +Record action with pause, resume, and stop sub-commands. + +**Modifiers:** `static` + +## Signature + +```java +public static class RecordAction extends Action +``` + +## Inheritance + +**Extends:** [Action](/docs/sdk-reference/reference/java/relay/relay/action) + +## Methods + +### \ + +#### Signature + +```java +public (String controlId, Call call) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 194. + +*** + +### pause + +#### Signature + +```java +public void pause() +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 203. + +*** + +### pauseWithBehavior + +#### Signature + +```java +public void pauseWithBehavior(String behavior) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 207. + +*** + +### resume + +#### Signature + +```java +public void resume() +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 213. + +*** + +### stop + +**Decorators:** `@Override` + +#### Signature + +```java +public void stop() +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 198. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 193. diff --git a/fern/products/sdk-reference/java/relay/relay/action/send-fax-action/index.mdx b/fern/products/sdk-reference/java/relay/relay/action/send-fax-action/index.mdx new file mode 100644 index 0000000000..cd7255a475 --- /dev/null +++ b/fern/products/sdk-reference/java/relay/relay/action/send-fax-action/index.mdx @@ -0,0 +1,76 @@ +--- +slug: "/reference/java/relay/relay/action/send-fax-action" +title: "SendFaxAction" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.Action.SendFaxAction" + parent: "relay.relay.Action" + module: "relay.relay.Action" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java" + visibility: "public" +--- +# `SendFaxAction` + +Send fax action with stop sub-command. + +**Modifiers:** `static` + +## Signature + +```java +public static class SendFaxAction extends Action +``` + +## Inheritance + +**Extends:** [Action](/docs/sdk-reference/reference/java/relay/relay/action) + +## Methods + +### \ + +#### Signature + +```java +public (String controlId, Call call) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 323. + +*** + +### stop + +**Decorators:** `@Override` + +#### Signature + +```java +public void stop() +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 327. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 322. diff --git a/fern/products/sdk-reference/java/relay/relay/action/stream-action/index.mdx b/fern/products/sdk-reference/java/relay/relay/action/stream-action/index.mdx new file mode 100644 index 0000000000..ce9de7b3fe --- /dev/null +++ b/fern/products/sdk-reference/java/relay/relay/action/stream-action/index.mdx @@ -0,0 +1,102 @@ +--- +slug: "/reference/java/relay/relay/action/stream-action" +title: "StreamAction" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.Action.StreamAction" + parent: "relay.relay.Action" + module: "relay.relay.Action" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java" + visibility: "public" +--- +# `StreamAction` + +Stream action with stop sub-command. + +**Modifiers:** `static` + +## Signature + +```java +public static class StreamAction extends Action +``` + +## Inheritance + +**Extends:** [Action](/docs/sdk-reference/reference/java/relay/relay/action) + +## Methods + +### \ + +#### Signature + +```java +public (String controlId, Call call) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 382. + +*** + +### isTerminal + +**Decorators:** `@Override` + +#### Signature + +```java +protected boolean isTerminal(String actionState) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 386. + +*** + +### stop + +**Decorators:** `@Override` + +#### Signature + +```java +public void stop() +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 391. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 381. diff --git a/fern/products/sdk-reference/java/relay/relay/action/tap-action/index.mdx b/fern/products/sdk-reference/java/relay/relay/action/tap-action/index.mdx new file mode 100644 index 0000000000..c96161912c --- /dev/null +++ b/fern/products/sdk-reference/java/relay/relay/action/tap-action/index.mdx @@ -0,0 +1,102 @@ +--- +slug: "/reference/java/relay/relay/action/tap-action" +title: "TapAction" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.Action.TapAction" + parent: "relay.relay.Action" + module: "relay.relay.Action" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java" + visibility: "public" +--- +# `TapAction` + +Tap action with stop sub-command. + +**Modifiers:** `static` + +## Signature + +```java +public static class TapAction extends Action +``` + +## Inheritance + +**Extends:** [Action](/docs/sdk-reference/reference/java/relay/relay/action) + +## Methods + +### \ + +#### Signature + +```java +public (String controlId, Call call) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 359. + +*** + +### isTerminal + +**Decorators:** `@Override` + +#### Signature + +```java +protected boolean isTerminal(String actionState) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 363. + +*** + +### stop + +**Decorators:** `@Override` + +#### Signature + +```java +public void stop() +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 368. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 358. diff --git a/fern/products/sdk-reference/java/relay/relay/action/transcribe-action/index.mdx b/fern/products/sdk-reference/java/relay/relay/action/transcribe-action/index.mdx new file mode 100644 index 0000000000..7e81716443 --- /dev/null +++ b/fern/products/sdk-reference/java/relay/relay/action/transcribe-action/index.mdx @@ -0,0 +1,102 @@ +--- +slug: "/reference/java/relay/relay/action/transcribe-action" +title: "TranscribeAction" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.Action.TranscribeAction" + parent: "relay.relay.Action" + module: "relay.relay.Action" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java" + visibility: "public" +--- +# `TranscribeAction` + +Transcribe action with stop sub-command. + +**Modifiers:** `static` + +## Signature + +```java +public static class TranscribeAction extends Action +``` + +## Inheritance + +**Extends:** [Action](/docs/sdk-reference/reference/java/relay/relay/action) + +## Methods + +### \ + +#### Signature + +```java +public (String controlId, Call call) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 405. + +*** + +### isTerminal + +**Decorators:** `@Override` + +#### Signature + +```java +protected boolean isTerminal(String actionState) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 409. + +*** + +### stop + +**Decorators:** `@Override` + +#### Signature + +```java +public void stop() +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 414. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/Action.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java) + +Line 404. diff --git a/fern/products/sdk-reference/java/relay/relay/call/index.mdx b/fern/products/sdk-reference/java/relay/relay/call/index.mdx new file mode 100644 index 0000000000..8203072606 --- /dev/null +++ b/fern/products/sdk-reference/java/relay/relay/call/index.mdx @@ -0,0 +1,2561 @@ +--- +slug: "/reference/java/relay/relay/call" +title: "Call" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.Call" + parent: "relay.relay" + module: "relay.relay" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java" + visibility: "public" +--- +# `Call` + +Represents a RELAY call with 30+ methods organized by category. + +<p> +Methods are grouped into: +<ul> + <li><b>Simple fire-and-response</b>: answer, hangup, pass, hold, etc.</li> + <li><b>Action-based</b>: play, record, detect, collect, etc. + +(return `Action`)</li> + + <li><b>Connection</b>: connect, disconnect, transfer</li> + <li><b>Conference</b>: joinConference, leaveConference</li> + <li><b>AI</b>: ai, aiMessage, aiHold, aiUnhold, amazonBedrock</li> +</ul> + +Event routing: the `RelayClient` routes events to calls by `call_id`. +Each call maintains an `actions` map keyed by `control_id` for action events. + +## Signature + +```java +public class Call +``` + +## Methods + +### \ + +#### Signature + +```java +public (String callId, String nodeId) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 52. + +*** + +### ai + +Start an AI agent on the call. + +#### Signature + + + + ```java + public Action.AiAction ai(Map aiConfig) + ``` + + + + ```java + public Action.AiAction ai(Map prompt, String controlId) + ``` + + + +#### Parameters (Overload 1) + + + AI configuration + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`Action.AiAction` — an AiAction + +#### Returns (Overload 2) + +`Action.AiAction` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 1183. + +*** + +### aiHold + +Put AI on hold. + +#### Signature + +```java +public Map aiHold(Map options) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 1236. + +*** + +### aiMessage + +Send a message to an active AI session. + +#### Signature + +```java +public Map aiMessage(Map messageConfig) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 1225. + +*** + +### aiUnhold + +Resume AI from hold. + +#### Signature + +```java +public Map aiUnhold(Map options) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 1247. + +*** + +### amazonBedrock + +Start Amazon Bedrock AI on the call. + +#### Signature + +```java +public Map amazonBedrock(Map config) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 1214. + +*** + +### answer + +Answer the call. + +#### Signature + +```java +public Map answer() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 226. + +*** + +### bindDigit + +Bind a digit sequence to a method. + +#### Signature + +```java +public Map bindDigit( + String digits, + String bindMethod, + Map options +) +``` + +#### Parameters + + + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 305. + +*** + +### clearDigitBindings + +Clear digit bindings. + +#### Signature + + + + ```java + public Map clearDigitBindings() + ``` + + + + ```java + public Map clearDigitBindings(String realm) + ``` + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 318. + +*** + +### collect + +Collect digits or speech input. + +#### Signature + +```java +public Action.CollectAction collect( + Map collectConfig, + Map options +) +``` + +#### Parameters + + + collect configuration + + + + optional parameters + + +#### Returns + +`Action.CollectAction` — a CollectAction + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 607. + +*** + +### collectDigits + +Collect digits with an explicit control\_id (test helper). + +#### Signature + + + + ```java + public Action.CollectAction collectDigits( + Map digitsConfig, + String controlId + ) + ``` + + + + ```java + public Action.CollectAction collectDigits( + Map digitsConfig, + boolean startInputTimers, + String controlId + ) + ``` + + + +#### Parameters (Overload 1) + + + + + +#### Parameters (Overload 2) + + + + + + + +#### Returns (Overload 1) + +`Action.CollectAction` + +#### Returns (Overload 2) + +`Action.CollectAction` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 629. + +*** + +### connect + +Connect another device to this call. + +#### Signature + +```java +public Map connect( + List>> devices, + Map options +) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 393. + +*** + +### denoise + +Enable denoise on the call. + +#### Signature + +```java +public Map denoise() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 271. + +*** + +### denoiseStop + +Disable denoise on the call. + +#### Signature + +```java +public Map denoiseStop() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 278. + +*** + +### detect + +Detect answering machine, fax, or digits. + +#### Signature + +```java +public Action.DetectAction detect( + Map detectConfig, + Map options +) +``` + +#### Parameters + + + detect configuration + + + + optional parameters (timeout, etc.) + + +#### Returns + +`Action.DetectAction` — a DetectAction + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 573. + +*** + +### detectAnsweringMachine + +Detect human vs answering machine (AMD). + +Typed convenience over +`#detect`. + +<p> +Builds params:{...only-provided...}}. Recognised +option keys (all folded into the machine params): `initial_timeout`, +`end_silence_timeout`, `machine_voice_threshold`, +`machine_words_threshold`, `detect_interruptions`, +`detect_message_end`; plus `timeout` (passed to detect). + +#### Signature + + + + ```java + public Action.DetectAction detectAnsweringMachine(Map options) + ``` + + + + ```java + public Action.DetectAction detectAnsweringMachine() + ``` + + + +#### Parameters (Overload 1) + + + optional AMD tuning + timeout + + +#### Returns (Overload 1) + +`Action.DetectAction` — a DetectAction + +#### Returns (Overload 2) + +`Action.DetectAction` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 824. + +*** + +### detectDigit + +Detect DTMF digits. + +Typed convenience over `#detect`. + +<p> +Builds params:{digits?}}. Recognised option keys: +`digits` (folded into the detect params) and `timeout` +(passed to detect). + +#### Signature + + + + ```java + public Action.DetectAction detectDigit(Map options) + ``` + + + + ```java + public Action.DetectAction detectDigit() + ``` + + + +#### Parameters (Overload 1) + + + optional digits/timeout + + +#### Returns (Overload 1) + +`Action.DetectAction` — a DetectAction + +#### Returns (Overload 2) + +`Action.DetectAction` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 798. + +*** + +### detectFax + +Detect a fax tone (CED/CNG). + +Typed convenience over `#detect`. + +<p> +Builds params:{tone?}}. Recognised option keys: +`tone` (folded into the detect params) and `timeout` +(passed to detect). + +#### Signature + + + + ```java + public Action.DetectAction detectFax(Map options) + ``` + + + + ```java + public Action.DetectAction detectFax() + ``` + + + +#### Parameters (Overload 1) + + + optional tone/timeout + + +#### Returns (Overload 1) + +`Action.DetectAction` — a DetectAction + +#### Returns (Overload 2) + +`Action.DetectAction` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 852. + +*** + +### detectWith + +Detect with an explicit control\_id (test helper). + +Wraps in <config>. + +#### Signature + +```java +public Action.DetectAction detectWith( + Map detectConfig, + String controlId +) +``` + +#### Parameters + + + + + +#### Returns + +`Action.DetectAction` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 596. + +*** + +### disconnect + +Disconnect all connected calls. + +#### Signature + +```java +public Map disconnect() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 405. + +*** + +### dispatchEvent + +Dispatch an event to this call. + +Routes action events by control\_id. + +#### Signature + +```java +public void dispatchEvent(RelayEvent event) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 123. + +*** + +### echo + +Start echo on the call. + +#### Signature + +```java +public Map echo(Map options) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 285. + +*** + +### getAction + +Get an action by control\_id. + +#### Signature + +```java +public Action getAction(String controlId) +``` + +#### Parameters + + + +#### Returns + +`Action` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 217. + +*** + +### getCallId + +#### Signature + +```java +public String getCallId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 60. + +*** + +### getCallState + +The current call state as a typed `CallState`, <em>alongside</em> +the raw string `#getState()` (which stays canonical for parity and +forward-compat). + +Returns `Optional.empty()` when the live wire state +is not one of the five known `CallState` values — the set mirrors +server-emitted values that can grow, so an unrecognised state is tolerated +here rather than crashing the caller. The present value always agrees with +`getState()`: `getCallState().get().getValue().equals(getState())`. + +#### Signature + +```java +public Optional getCallState() +``` + +#### Returns + +`Optional` — the typed state, or empty if the raw state is unknown/unset. + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 75. + +*** + +### getDevice + +#### Signature + +```java +public Map getDevice() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 62. + +*** + +### getDirection + +Call direction (inbound/outbound) once known; empty until set. + +#### Signature + +```java +public Optional getDirection() +``` + +#### Returns + +`Optional` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 95. + +*** + +### getEndReason + +End reason once the call has ended; empty while the call is live. + +#### Signature + +```java +public Optional getEndReason() +``` + +#### Returns + +`Optional` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 93. + +*** + +### getNodeId + +Node id once the call is bound to a RELAY node; empty until then. + +#### Signature + +```java +public Optional getNodeId() +``` + +#### Returns + +`Optional` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 91. + +*** + +### getState + +#### Signature + +```java +public String getState() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 61. + +*** + +### getTag + +Dial-correlation tag for outbound calls; empty for inbound. + +#### Signature + +```java +public Optional getTag() +``` + +#### Returns + +`Optional` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 97. + +*** + +### hangup + +Hang up the call. + +#### Signature + + + + ```java + public Map hangup() + ``` + + + + ```java + public Map hangup(String reason) + ``` + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 234. + +*** + +### hold + +Put the call on hold. + +#### Signature + +```java +public Map hold() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 257. + +*** + +### isEnded + +#### Signature + +```java +public boolean isEnded() +``` + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 107. + +*** + +### joinConference + +Join a conference. + +#### Signature + +```java +public Map joinConference( + String name, + Map options +) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 414. + +*** + +### joinRoom + +Join a room. + +#### Signature + +```java +public Map joinRoom(String name, Map options) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 437. + +*** + +### leaveConference + +Leave a conference. + +#### Signature + +```java +public Map leaveConference(String conferenceId) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 426. + +*** + +### leaveRoom + +Leave a room. + +#### Signature + +```java +public Map leaveRoom() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 449. + +*** + +### liveTranscribe + +Start live transcription. + +#### Signature + +```java +public Map liveTranscribe(Map action) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 347. + +*** + +### liveTranslate + +Start live translation. + +#### Signature + +```java +public Map liveTranslate( + Map action, + Map options +) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 356. + +*** + +### on + +Register an event listener on this call. + +#### Signature + +```java +public void on(Consumer listener) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 116. + +*** + +### pass + +Pass on an inbound call offer. + +#### Signature + +```java +public Map pass() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 250. + +*** + +### pay + +Process payment via DTMF. + +#### Signature + + + + ```java + public Action.PayAction pay( + String paymentConnectorUrl, + Map options + ) + ``` + + + + ```java + public Action.PayAction pay(String paymentConnectorUrl, String controlId) + ``` + + + +#### Parameters (Overload 1) + + + connector URL + + + + optional parameters + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`Action.PayAction` — a PayAction + +#### Returns (Overload 2) + +`Action.PayAction` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 987. + +*** + +### play + +Play media on the call. + +#### Signature + + + + ```java + public Action.PlayAction play( + List> media, + Map options + ) + ``` + + + + ```java + public Action.PlayAction play(List> media) + ``` + + + + ```java + public Action.PlayAction play(List> media, String controlId) + ``` + + + +#### Parameters (Overload 1) + + + list of media objects + + + + optional parameters (volume, direction, loop, etc.) + + +#### Parameters (Overload 2) + + + +#### Parameters (Overload 3) + + + + + +#### Returns (Overload 1) + +`Action.PlayAction` — a PlayAction that can be waited on, paused, resumed, stopped + +#### Returns (Overload 2) + +`Action.PlayAction` + +#### Returns (Overload 3) + +`Action.PlayAction` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 492. + +*** + +### playAndCollect + +Play media and collect input. + +#### Signature + + + + ```java + public Action.PlayAndCollectAction playAndCollect( + List> media, + Map collectConfig, + Map options + ) + ``` + + + + ```java + public Action.PlayAndCollectAction playAndCollect( + List> media, + Map collectConfig, + String controlId + ) + ``` + + + +#### Parameters (Overload 1) + + + list of media objects + + + + collect configuration + + + + optional parameters + + +#### Parameters (Overload 2) + + + + + + + +#### Returns (Overload 1) + +`Action.PlayAndCollectAction` — a PlayAndCollectAction + +#### Returns (Overload 2) + +`Action.PlayAndCollectAction` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 653. + +*** + +### playAudio + +Play an audio file from a URL. + +Typed convenience over `#play`. + +<p> +Builds params:{url}]}. Recognised option key: +`volume` (passed to play). + +#### Signature + + + + ```java + public Action.PlayAction playAudio(String url, Map options) + ``` + + + + ```java + public Action.PlayAction playAudio(String url) + ``` + + + +#### Parameters (Overload 1) + + + the audio file URL + + + + optional volume + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`Action.PlayAction` — a PlayAction + +#### Returns (Overload 2) + +`Action.PlayAction` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 729. + +*** + +### playRingtone + +Play a named ringtone by country code. + +Typed convenience over +`#play`. + +<p> +Builds params:{name, duration?}]}. Recognised +option keys: `duration` (folded into the ringtone params) and +`volume` (passed to play). + +#### Signature + + + + ```java + public Action.PlayAction playRingtone(String name, Map options) + ``` + + + + ```java + public Action.PlayAction playRingtone(String name) + ``` + + + +#### Parameters (Overload 1) + + + the ringtone country-code name + + + + optional duration/volume + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`Action.PlayAction` — a PlayAction + +#### Returns (Overload 2) + +`Action.PlayAction` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 767. + +*** + +### playSilence + +Play silence for `duration` seconds. + +Typed convenience over +`#play`. + +<p> +Builds params:{duration}]}. + +#### Signature + +```java +public Action.PlayAction playSilence(double duration) +``` + +#### Parameters + + + silence duration in seconds + + +#### Returns + +`Action.PlayAction` — a PlayAction + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 750. + +*** + +### playTts + +Play text-to-speech. + +Typed convenience over `#play`. + +<p> +Builds params:{text, language?, gender?, voice?}]}. +Recognised option keys: `language`, `gender`, `voice` +(folded into the tts params) and `volume` (passed to play). + +#### Signature + + + + ```java + public Action.PlayAction playTts(String text, Map options) + ``` + + + + ```java + public Action.PlayAction playTts(String text) + ``` + + + +#### Parameters (Overload 1) + + + the text to speak + + + + optional language/gender/voice/volume + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`Action.PlayAction` — a PlayAction + +#### Returns (Overload 2) + +`Action.PlayAction` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 703. + +*** + +### promptAudio + +Play an audio file then collect input. + +Typed media over +`#playAndCollect`. + +<p> +Builds params:{url}]} as the play media. +Recognised option key: `volume` (passed to playAndCollect). + +#### Signature + + + + ```java + public Action.PlayAndCollectAction promptAudio( + String url, + Map collectConfig, + Map options + ) + ``` + + + + ```java + public Action.PlayAndCollectAction promptAudio( + String url, + Map collectConfig + ) + ``` + + + +#### Parameters (Overload 1) + + + the audio file URL + + + + the collect configuration + + + + optional volume + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`Action.PlayAndCollectAction` — a PlayAndCollectAction + +#### Returns (Overload 2) + +`Action.PlayAndCollectAction` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 913. + +*** + +### promptTts + +Play TTS then collect input. + +Typed media over `#playAndCollect`. + +<p> +Builds params:{text, language?, gender?, voice?}]} +as the play media. Recognised option keys: `language`, +`gender`, `voice` (folded into the tts params) and +`volume` (passed to playAndCollect). + +#### Signature + + + + ```java + public Action.PlayAndCollectAction promptTts( + String text, + Map collectConfig, + Map options + ) + ``` + + + + ```java + public Action.PlayAndCollectAction promptTts( + String text, + Map collectConfig + ) + ``` + + + +#### Parameters (Overload 1) + + + the text to speak + + + + the collect configuration + + + + optional language/gender/voice/volume + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`Action.PlayAndCollectAction` — a PlayAndCollectAction + +#### Returns (Overload 2) + +`Action.PlayAndCollectAction` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 884. + +*** + +### queueEnter + +Enter a queue. + +#### Signature + +```java +public Map queueEnter( + String queueName, + Map options +) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 458. + +*** + +### queueLeave + +Leave a queue. + +#### Signature + +```java +public Map queueLeave( + String queueName, + Map options +) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 472. + +*** + +### receiveFax + +Receive a fax. + +#### Signature + + + + ```java + public Action.ReceiveFaxAction receiveFax(Map options) + ``` + + + + ```java + public Action.ReceiveFaxAction receiveFax(String controlId) + ``` + + + +#### Parameters (Overload 1) + + + optional parameters + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`Action.ReceiveFaxAction` — a ReceiveFaxAction + +#### Returns (Overload 2) + +`Action.ReceiveFaxAction` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 1051. + +*** + +### record + +Record the call. + +#### Signature + +```java +public Action.RecordAction record( + Map recordConfig, + Map options +) +``` + +#### Parameters + + + record configuration object + + + + optional parameters + + +#### Returns + +`Action.RecordAction` — a RecordAction + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 536. + +*** + +### recordAudio + +Record with an explicit control\_id (test helper). + +The `audioConfig` +is wrapped as \{audio: <config>\} on the wire to match the +Python control\_id=...) pattern. + +#### Signature + +```java +public Action.RecordAction recordAudio( + Map audioConfig, + String controlId +) +``` + +#### Parameters + + + + + +#### Returns + +`Action.RecordAction` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 560. + +*** + +### refer + +SIP REFER transfer. + +#### Signature + +```java +public Map refer( + Map deviceSpec, + Map options +) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 368. + +*** + +### registerAction + +Register an action by control\_id. + +#### Signature + +```java +public void registerAction(Action action) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 210. + +*** + +### resolveAllActions + +Resolve all pending actions (e.g., on call ended or call-gone). + +#### Signature + +```java +public void resolveAllActions(RelayEvent event) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 198. + +*** + +### sendDigits + +Send DTMF digits. + +#### Signature + +```java +public Map sendDigits(String digits) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 380. + +*** + +### sendFax + +Send a fax. + +#### Signature + + + + ```java + public Action.SendFaxAction sendFax( + String documentUrl, + Map options + ) + ``` + + + + ```java + public Action.SendFaxAction sendFax( + String documentUrl, + String identity, + String controlId + ) + ``` + + + +#### Parameters (Overload 1) + + + URL to PDF document + + + + optional parameters + + +#### Parameters (Overload 2) + + + + + + + +#### Returns (Overload 1) + +`Action.SendFaxAction` — a SendFaxAction + +#### Returns (Overload 2) + +`Action.SendFaxAction` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 1018. + +*** + +### setClient + +#### Signature + +```java +public void setClient(RelayClient client) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 105. + +*** + +### setDevice + +#### Signature + +```java +public void setDevice(Map device) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 104. + +*** + +### setDirection + +#### Signature + +```java +public void setDirection(String direction) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 102. + +*** + +### setEndReason + +#### Signature + +```java +public void setEndReason(String endReason) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 101. + +*** + +### setNodeId + +#### Signature + +```java +public void setNodeId(String nodeId) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 99. + +*** + +### setState + +#### Signature + +```java +public void setState(String state) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 100. + +*** + +### setTag + +#### Signature + +```java +public void setTag(String tag) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 103. + +*** + +### stream + +Start streaming audio from the call. + +#### Signature + + + + ```java + public Action.StreamAction stream(String url, Map options) + ``` + + + + ```java + public Action.StreamAction stream(String url, String controlId) + ``` + + + + ```java + public Action.StreamAction stream(String url, String codec, String controlId) + ``` + + + +#### Parameters (Overload 1) + + + WebSocket URL + + + + optional parameters (name, codec, track, etc.) + + +#### Parameters (Overload 2) + + + + + +#### Parameters (Overload 3) + + + + + + + +#### Returns (Overload 1) + +`Action.StreamAction` — a StreamAction + +#### Returns (Overload 2) + +`Action.StreamAction` + +#### Returns (Overload 3) + +`Action.StreamAction` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 1114. + +*** + +### tap + +Tap audio from the call. + +#### Signature + + + + ```java + public Action.TapAction tap( + Map tapConfig, + Map tapDevice, + Map options + ) + ``` + + + + ```java + public Action.TapAction tap( + Map tapConfig, + Map tapDevice, + String controlId + ) + ``` + + + +#### Parameters (Overload 1) + + + tap configuration + + + + tap device (rtp or ws) + + + + optional parameters + + +#### Parameters (Overload 2) + + + + + + + +#### Returns (Overload 1) + +`Action.TapAction` — a TapAction + +#### Returns (Overload 2) + +`Action.TapAction` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 1082. + +*** + +### toString + +**Decorators:** `@Override` + +#### Signature + +```java +public String toString() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 1306. + +*** + +### transcribe + +Start transcription on the call. + +#### Signature + + + + ```java + public Action.TranscribeAction transcribe(Map options) + ``` + + + + ```java + public Action.TranscribeAction transcribe(String controlId) + ``` + + + +#### Parameters (Overload 1) + + + optional parameters + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`Action.TranscribeAction` — a TranscribeAction + +#### Returns (Overload 2) + +`Action.TranscribeAction` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 1154. + +*** + +### transfer + +Transfer the call. + +#### Signature + +```java +public Map transfer(String dest) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 296. + +*** + +### unhold + +Take the call off hold. + +#### Signature + +```java +public Map unhold() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 264. + +*** + +### userEvent + +Send a user event. + +#### Signature + +```java +public Map userEvent(String event) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 336. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/Call.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java) + +Line 31. diff --git a/fern/products/sdk-reference/java/relay/relay/constants/index.mdx b/fern/products/sdk-reference/java/relay/relay/constants/index.mdx new file mode 100644 index 0000000000..cf23c0dd98 --- /dev/null +++ b/fern/products/sdk-reference/java/relay/relay/constants/index.mdx @@ -0,0 +1,424 @@ +--- +slug: "/reference/java/relay/relay/constants" +title: "Constants" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.Constants" + parent: "relay.relay" + module: "relay.relay" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Constants.java" + visibility: "public" +--- +# `Constants` + +Constants for the SignalWire RELAY protocol. + +<p> +Includes call states, end reasons, message states, event types, +and action terminal states used throughout the RELAY client. + +**Modifiers:** `final` + +## Signature + +```java +public final class Constants +``` + +## Constants + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## Methods + +### isCallGoneCode + +Check if an HTTP code indicates a "call gone" condition. + +**Modifiers:** `static` + +#### Signature + +```java +public static boolean isCallGoneCode(String code) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Constants.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Constants.java) + +Line 221. + +*** + +### isTerminalActionState + +Check if an action state is terminal (applies to play, record, etc.). + +**Modifiers:** `static` + +#### Signature + +```java +public static boolean isTerminalActionState(String state) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Constants.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Constants.java) + +Line 202. + +*** + +### isTerminalCallState + +Check if a call state is terminal. + +**Modifiers:** `static` + +#### Signature + +```java +public static boolean isTerminalCallState(String state) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Constants.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Constants.java) + +Line 195. + +*** + +### isTerminalMessageState + +Check if a message state is terminal. + +**Modifiers:** `static` + +#### Signature + +```java +public static boolean isTerminalMessageState(String state) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Constants.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Constants.java) + +Line 212. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/Constants.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Constants.java) + +Line 15. diff --git a/fern/products/sdk-reference/java/relay/relay/device/index.mdx b/fern/products/sdk-reference/java/relay/relay/device/index.mdx new file mode 100644 index 0000000000..848bff387a --- /dev/null +++ b/fern/products/sdk-reference/java/relay/relay/device/index.mdx @@ -0,0 +1,358 @@ +--- +slug: "/reference/java/relay/relay/device" +title: "Device" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.Device" + parent: "relay.relay" + module: "relay.relay" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Device.java" + visibility: "public" +--- +# `Device` + +A typed view of the RELAY params\} device object that recurs as +a raw Object> across `Call#connect`, `Call#refer`, +`RelayClient#dial` and `Call#tap`. + +<p>The wire shape is fixed (extracted from switchblade's +`PublicCallConnectParams` / `PublicCallDialParams` / +`PublicCallReferParams` / `PublicCallTapParams`, mirrored in +`porting-sdk/relay-protocol/calling.*.params.json`): every device is an +object with a required string `type` discriminant and a `params` +sub-object whose shape depends on the type (a `phone` carries +`to_number`/`from_number`, a `sip` carries `to`/ +`headers`, etc.). + +This class types the <em>shape</em> — the +params\} envelope — so callers stop hand-rolling the two-key +map and get an explicit constructor + accessors. + +<p><strong>`type` stays a `String`.</strong> The discriminant is +NOT schema-enumerated: the wire schema constrains it only to +{"type": "string"}, and the platform accepts device types the +SDK may not know about. Typing it as an enum would reject valid values, so it +is deliberately left open (the convention names `phone`/`sip`/ +`webrtc` — see `Constants#DEVICE_TYPE_PHONE` etc. — but those are +conveniences, not a closed set). `params` is left an arbitrary +Object> for the same reason: it is type-dependent and not +a single fixed schema. + +<p><strong>Additive — the raw-map path stays.</strong> Every method that +takes a device still accepts a raw Object>; this class is +a convenience on top. `#toMap()` produces a map that is +<em>byte-for-byte identical</em> to the hand-written +…, "params": …} (insertion order `type` then +`params`, matching every existing call site), so routing a device +through `Device` serialises exactly as the raw map does. + +<pre>typed: +Device phone = Device.of("phone", Map.of( + "to_number", "+15551112222", "from_number", "+15553334444")); +call.connect(List.of(List.of(phone.toMap())), null); + +// raw map still works (parity): +call.connect(List.of(List.of(Map.of( + "type", "phone", + "params", Map.of("to_number", "+15551112222", + "from_number", "+15553334444")))), null);</pre> + +<p>Python uses a bare `dict` for this object, so there is no reference +equivalent — this is a documented Java addition. + +**Modifiers:** `final` + +## Signature + +```java +public final class Device +``` + +## Methods + +### \ + +Construct a device from its `type` discriminant and `params` +sub-object. + +#### Signature + +```java +public (String type, Map params) +``` + +#### Parameters + + + the device type discriminant (e.g. `"phone"`, `"sip"`, `"webrtc"`); must not be `null`. + + + + the type-dependent params; `null` is treated as an empty map. + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Device.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Device.java) + +Line 76. + +*** + +### equals + +**Decorators:** `@Override` + +#### Signature + +```java +public boolean equals(Object o) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Device.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Device.java) + +Line 163. + +*** + +### getParams + +The type-dependent params sub-object (an unmodifiable view). + +#### Signature + +```java +public Map getParams() +``` + +#### Returns + +`Map` — the params map; never `null` (empty if none were supplied). + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Device.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Device.java) + +Line 141. + +*** + +### getType + +The device type discriminant (`"phone"`/`"sip"`/…). + +#### Signature + +```java +public String getType() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Device.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Device.java) + +Line 132. + +*** + +### hashCode + +**Decorators:** `@Override` + +#### Signature + +```java +public int hashCode() +``` + +#### Returns + +`int` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Device.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Device.java) + +Line 175. + +*** + +### of + +Factory mirroring the constructor, for fluent call sites +(…)). + +**Modifiers:** `static` + +#### Signature + +```java +public static Device of(String type, Map params) +``` + +#### Parameters + + + the device type discriminant. + + + + the type-dependent params (may be `null`). + + +#### Returns + +`Device` — a new `Device`. + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Device.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Device.java) + +Line 95. + +*** + +### phone + +Convenience factory for the most common case — a `phone` device. +Builds params:\{to\_number, from\_number\}\}. + +**Modifiers:** `static` + +#### Signature + +```java +public static Device phone(String toNumber, String fromNumber) +``` + +#### Parameters + + + the destination E.164 number. + + + + the caller-ID E.164 number. + + +#### Returns + +`Device` — a new `phone` `Device`. + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Device.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Device.java) + +Line 107. + +*** + +### sip + +Convenience factory for a `sip` device. + +Builds +params:\{to, from?\}\} (only non-null values). + +**Modifiers:** `static` + +#### Signature + +```java +public static Device sip(String to, String from) +``` + +#### Parameters + + + the SIP destination URI. + + + + the SIP from URI, or `null` to omit. + + +#### Returns + +`Device` — a new `sip` `Device`. + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Device.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Device.java) + +Line 122. + +*** + +### toMap + +Serialise to the wire shape: a two-key map …, "params": …\} +with `type` inserted first, identical to the hand-written map every +existing call site builds. + +The returned map is fresh and mutable (callers +routinely nest it inside a `devices` list), and `params` is a +defensive copy so later mutation of the returned map cannot corrupt this +`Device`. + +#### Signature + +```java +public Map toMap() +``` + +#### Returns + +`Map` — a new params\} map ready to pass to `connect`/`refer`/`dial`/`tap`. + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Device.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Device.java) + +Line 156. + +*** + +### toString + +**Decorators:** `@Override` + +#### Signature + +```java +public String toString() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Device.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Device.java) + +Line 180. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/Device.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Device.java) + +Line 62. diff --git a/fern/products/sdk-reference/java/relay/relay/index.mdx b/fern/products/sdk-reference/java/relay/relay/index.mdx new file mode 100644 index 0000000000..f29e05488e --- /dev/null +++ b/fern/products/sdk-reference/java/relay/relay/index.mdx @@ -0,0 +1,709 @@ +--- +slug: "/reference/java/relay/relay" +title: "relay" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "relay.relay" + parent: "com.signalwire.sdk.relay" + module: "relay" +--- +# `relay` + +## Classes + + + + Base class for long-running call actions tracked by `control_id`. <p> Actions support three completion patterns: <ol> <li><b>Wait inline</b>: `action.waitForCompletion()` blocks until terminal</li> <li><b>Fire and forget</b>: don't wait, check `isDone()` later</li> <li><b>Callback</b>: pass an `onCompleted` callback that fires on terminal state</li> </ol> <p> Subclasses add action-specific sub-commands (pause, resume, volume, etc.). + + + + Represents a RELAY call with 30+ methods organized by category. <p> Methods are grouped into: <ul> <li><b>Simple fire-and-response</b>: answer, hangup, pass, hold, etc.</li> <li><b>Action-based</b>: play, record, detect, collect, etc. + + + + Constants for the SignalWire RELAY protocol. <p> Includes call states, end reasons, message states, event types, and action terminal states used throughout the RELAY client. + + + + A typed view of the RELAY params\} device object that recurs as a raw Object> across `Call#connect`, `Call#refer`, `RelayClient#dial` and `Call#tap`. <p>The wire shape is fixed (extracted from switchblade's `PublicCallConnectParams` / `PublicCallDialParams` / `PublicCallReferParams` / `PublicCallTapParams`, mirrored in `porting-sdk/relay-protocol/calling.*.params.json`): every device is an object with a required string `type` discriminant and a `params` sub-object whose shape depends on the type (a `phone` carries `to_number`/`from_number`, a `sip` carries `to`/ `headers`, etc.). + + + + Represents an SMS/MMS message with state tracking. <p> Messages are simpler than calls: they have a `message_id`, progress through states (queued, initiated, sent, delivered), and support completion waiting. <p> State progression: <ul> <li>Success: queued -> initiated -> sent -> delivered</li> <li>Failure: queued -> initiated -> failed/undelivered</li> </ul> Terminal states: delivered, undelivered, failed + + + + RELAY WebSocket connection manager. <p> Manages WebSocket connections to the SignalWire RELAY service using JSON-RPC 2.0. Implements the four correlation mechanisms: <ol> <li>JSON-RPC id -> CompletableFuture for RPC response matching</li> <li>call\_id -> Call for event routing</li> <li>control\_id -> Action per Call for action event routing</li> <li>tag -> CompletableFuture\ for dial correlation</li> </ol> <p> Also handles: <ul> <li>Event ACK for every `signalwire.event`</li> <li>Ping/pong for `signalwire.ping`</li> <li>Exponential backoff reconnection</li> <li>Authorization state for fast reconnection</li> <li>Server-initiated disconnect with restart flag</li> <li>Dynamic context subscription via receive/unreceive</li> <li>Message tracking by message\_id</li> </ul> <pre>client = RelayClient.builder() .project("project-id") .token("api-token") .space("example.signalwire.com") .contexts(List.of("default")) .build(); client.onCall(call -> \{ call.answer(); var action = call.play(List.of(Map.of("type", "tts", "params", Map.of("text", "Hello!")))); action.waitForCompletion(); call.hangup();); client.run(); \}</pre> + + + + Runtime exception for RELAY-level failures (dial timeout, dial failed, connect rejected, etc.). + + + + Base class for all RELAY events. <p> Events arrive as `signalwire.event` messages with nested params: <pre> \{ "params": \{ "event\_type": "calling.call.play", "timestamp": 123457.1234, "params": \{ "call\_id": "...", "control\_id": "...", "state": "finished" \} \} \} </pre> Subclasses provide typed access to specific event payloads. + + + +## Modules + + + + + + + + + +## Enums + +### CallState + +The lifecycle state of a RELAY `Call`, as a typed, compile-time-checked +closed set. + +<p>The RELAY server pushes the current call state as a bare string on every +`calling.call.state` event (`created` → `ringing` → +`answered` → `ending` → `ended`). + +This enum mirrors the +five values the Python reference declares in +`signalwire/relay/constants.py` as `CALL_STATE_*` +(`Constants#CALL_STATE_CREATED` … `Constants#CALL_STATE_ENDED`). + +<p>It is exposed <em>alongside</em> the existing string getter, never instead +of it: `Call#getState()` keeps returning the raw wire string (parity +with Python, forward-compatible with any value the server later adds), while +`Call#getCallState()` returns `Optional<CallState>` for callers +who want a typed, switch-exhaustive handle and a `#isTerminal()` +predicate. + +<pre>raw = call.getState(); // "answered" (always present, parity) +Optional<CallState> typed = call.getCallState(); +if (typed.map(CallState::isTerminal).orElse(false)) { + // call has reached ENDED +}</pre> + +<p><strong>Server-emitted, growable.</strong> These values mirror what the +server sends and the set can grow in a future protocol revision. So +`#fromWire(String)` returns `null` (and `Call#getCallState()` +`Optional.empty()`) for an unrecognised value rather than throwing — +an unknown state must never crash event dispatch. This is the Java analog of +Rust's `#[non_exhaustive]` + a fallible `from_str`. + +<p><strong>This is a DISTINCT vocabulary from `DialState` and +`MessageState`.</strong> A `Call`'s lifecycle state +(`created/ringing/answered/ending/ended`) is not the dial <em>outcome</em> +(`dialing/answered/failed`) and not a message delivery state +(`queued/…/delivered`). The three are modelled as three separate enums +and are never conflated — mirroring the three separate `*_STATE_*` +blocks in the Python reference's `constants.py`. + +#### Signature + +```java +public enum CallState +``` + +#### Variants + + + The call has been answered and media is flowing. + + + + The call object has been created but no leg is ringing yet. + + + + Terminal: the call has ended. + + + + The call is in the process of tearing down. + + + + The call is ringing (alerting). + + +#### Methods + +##### fromWire + +Parse a wire string into a `CallState`, or return `null` if +it is not one of the five recognised states. + +Because the set mirrors +server-emitted values that may grow, an unknown string is tolerated +(returns `null`) rather than rejected with an exception — the Java +analog of a fallible `from_str` over a `#[non_exhaustive]` +enum. + +**Modifiers:** `static` + +###### Signature + +```java +public static CallState fromWire(String wire) +``` + +###### Parameters + + + the candidate wire string (case-sensitive), may be `null`. + + +###### Returns + +`CallState` — the matching constant, or `null` if none matches. + +###### Source + +[`src/main/java/com/signalwire/sdk/relay/CallState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/CallState.java) + +Line 106. + +*** + +##### getValue + +The canonical wire string for this state (`"created"` / +`"ringing"` / `"answered"` / `"ending"` / +`"ended"`) — exactly the value the server sends on +`calling.call.state`. + +Equivalent to PHP's backed-enum +`->value`. + +###### Signature + +```java +public String getValue() +``` + +###### Returns + +`String` — the lower-case state name as it appears on the wire. + +###### Source + +[`src/main/java/com/signalwire/sdk/relay/CallState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/CallState.java) + +Line 78. + +*** + +##### isTerminal + +Whether this is a <em>terminal</em> state — i.e. + +the call has reached +the end of its lifecycle and will not transition further. Only +`#ENDED` is terminal (matching `Call#isEnded()` and the +reference's `CALL_STATE_ENDED` terminal check); `#ENDING` is <em>not</em> terminal because an `ended` event still follows. + +###### Signature + +```java +public boolean isTerminal() +``` + +###### Returns + +`boolean` — `true` iff this state is `#ENDED`. + +###### Source + +[`src/main/java/com/signalwire/sdk/relay/CallState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/CallState.java) + +Line 91. + +*** + +##### valueOf + +**Modifiers:** `static` + +###### Signature + +```java +public static CallState valueOf(String name) +``` + +###### Parameters + + + +###### Returns + +`CallState` + +###### Source + +[`src/main/java/com/signalwire/sdk/relay/CallState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/CallState.java) + +*** + +##### values + +**Modifiers:** `static` + +###### Signature + +```java +public static CallState[] values() +``` + +###### Returns + +`CallState[]` + +###### Source + +[`src/main/java/com/signalwire/sdk/relay/CallState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/CallState.java) + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/CallState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/CallState.java) + +Line 50. + +*** + +### DialState + +The outcome state of an outbound `calling.dial`, as a typed, +compile-time-checked closed set. + +<p>A dial progresses `dialing` → `answered` (a leg won) or +`dialing` → `failed` (every leg gave up). + +The RELAY server reports +it as the bare `dial_state` field on each `calling.call.dial` +event. This enum mirrors the three values the Java port declares in +`Constants` as `DIAL_STATE_*` +(`Constants#DIAL_STATE_DIALING` / `Constants#DIAL_STATE_ANSWERED` +/ `Constants#DIAL_STATE_FAILED`), which back the dial-completion logic +in `RelayClient.handleDialEvent`. + +<p>It is exposed <em>alongside</em> the existing string getter, never instead +of it: `RelayEvent.CallDialEvent#getDialState()` keeps returning the raw +wire string (parity with Python, forward-compatible), while +`RelayEvent.CallDialEvent#getDialStateEnum()` returns +`Optional<DialState>` for callers who want a typed handle and an +`#isTerminal()` predicate. + +<p><strong>Terminal semantics.</strong> Unlike `CallState` (where only +`ended` is terminal), <em>both</em> `#ANSWERED` and `#FAILED` +are terminal dial outcomes — each resolves the pending dial (one completes the +`CompletableFuture<Call>`, the other fails it). Only `#DIALING` is +non-terminal. So "terminal" here means "the dial has a final outcome", +matching the `answered`/`failed` branches that resolve the dial in +`RelayClient`. + +<pre>// "answered" (always present, parity) +event.getDialStateEnum() + .filter(DialState::isTerminal) // ANSWERED or FAILED + .ifPresent(s -> ...);</pre> + +<p><strong>Server-emitted, growable</strong> — `#fromWire(String)` +returns `null` for an unrecognised value rather than throwing (the Java +analog of Rust's `#[non_exhaustive]` + fallible `from_str`); an +unknown dial state must never crash event dispatch. + +<p><strong>This is a DISTINCT vocabulary from `CallState` and +`MessageState`.</strong> A dial outcome (`dialing/answered/failed`) +is not a call lifecycle state and not a message delivery state. Note in +particular `answered` appears in <em>both</em> `DialState` and +`CallState` but means different things (the dial won vs. the call leg is +up) — the two enums are never shared. + +#### Signature + +```java +public enum DialState +``` + +#### Variants + + + Terminal: a leg answered and the dial resolved to a `Call`. + + + + The dial is in progress; legs are ringing. Non-terminal. + + + + Terminal: every leg failed and the dial did not connect. + + +#### Methods + +##### fromWire + +Parse a wire string into a `DialState`, or return `null` if +it is not one of the three recognised dial states. + +Because the set +mirrors server-emitted values that may grow, an unknown string is +tolerated (returns `null`) rather than rejected with an exception. + +**Modifiers:** `static` + +###### Signature + +```java +public static DialState fromWire(String wire) +``` + +###### Parameters + + + the candidate wire string (case-sensitive), may be `null`. + + +###### Returns + +`DialState` — the matching constant, or `null` if none matches. + +###### Source + +[`src/main/java/com/signalwire/sdk/relay/DialState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/DialState.java) + +Line 104. + +*** + +##### getValue + +The canonical wire string for this dial outcome (`"dialing"` / +`"answered"` / `"failed"`) — exactly the `dial_state` +value the server sends on `calling.call.dial`. + +Equivalent to PHP's +backed-enum `->value`. + +###### Signature + +```java +public String getValue() +``` + +###### Returns + +`String` — the lower-case dial-state name as it appears on the wire. + +###### Source + +[`src/main/java/com/signalwire/sdk/relay/DialState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/DialState.java) + +Line 79. + +*** + +##### isTerminal + +Whether this is a <em>terminal</em> dial outcome — i.e. + +the dial has a +final result and will not transition further. Both `#ANSWERED` and +`#FAILED` are terminal (each resolves the pending dial); only +`#DIALING` is non-terminal. + +###### Signature + +```java +public boolean isTerminal() +``` + +###### Returns + +`boolean` — `true` iff this state is `#ANSWERED` or `#FAILED`. + +###### Source + +[`src/main/java/com/signalwire/sdk/relay/DialState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/DialState.java) + +Line 91. + +*** + +##### valueOf + +**Modifiers:** `static` + +###### Signature + +```java +public static DialState valueOf(String name) +``` + +###### Parameters + + + +###### Returns + +`DialState` + +###### Source + +[`src/main/java/com/signalwire/sdk/relay/DialState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/DialState.java) + +*** + +##### values + +**Modifiers:** `static` + +###### Signature + +```java +public static DialState[] values() +``` + +###### Returns + +`DialState[]` + +###### Source + +[`src/main/java/com/signalwire/sdk/relay/DialState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/DialState.java) + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/DialState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/DialState.java) + +Line 56. + +*** + +### MessageState + +The delivery state of a RELAY `Message`, as a typed, +compile-time-checked closed set. + +<p>An outbound message progresses `queued` → `initiated` → +`sent` → `delivered` (success) or → `undelivered` / +`failed` (failure); an inbound message arrives as `received`. + +The +RELAY server reports the state as the bare `message_state` field on +`messaging.state` (outbound) and `messaging.receive` (inbound) +events. This enum mirrors the seven values the Python reference declares in +`signalwire/relay/constants.py` as `MESSAGE_STATE_*` +(`Constants#MESSAGE_STATE_QUEUED` … `Constants#MESSAGE_STATE_RECEIVED`). +The `messaging.state` wire schema enumerates the six outbound values; +`received` is the inbound-only seventh. + +<p>It is exposed <em>alongside</em> the existing string getter, never instead +of it: `Message#getState()` keeps returning the raw wire string (parity +with Python, forward-compatible), while `Message#getMessageState()` +returns `Optional<MessageState>` for callers who want a typed handle and +an `#isTerminal()` predicate. + +<pre>raw = msg.getState(); // "delivered" (always present, parity) +msg.getMessageState() + .filter(MessageState::isTerminal) // DELIVERED / UNDELIVERED / FAILED + .ifPresent(s -> ...);</pre> + +<p><strong>Terminal semantics.</strong> The terminal set is +`#DELIVERED`, `#UNDELIVERED`, `#FAILED` — exactly the +reference's `MESSAGE_TERMINAL_STATES` and the set +`Constants#isTerminalMessageState(String)` checks (the state at which +`Message` resolves its completion future). `received` is NOT +terminal: it is an inbound arrival, not the end of an outbound delivery +lifecycle. + +<p><strong>Server-emitted, growable</strong> — `#fromWire(String)` +returns `null` for an unrecognised value rather than throwing (the Java +analog of Rust's `#[non_exhaustive]` + fallible `from_str`); an +unknown message state must never crash event dispatch. + +<p><strong>This is a DISTINCT vocabulary from `CallState` and +`DialState`.</strong> A message delivery state is neither a call +lifecycle state nor a dial outcome; the three enums are never conflated. + +#### Signature + +```java +public enum MessageState +``` + +#### Variants + + + Terminal: the message was delivered. + + + + Terminal: the send failed. + + + + Sending has been initiated. + + + + The message is queued for sending. + + + + An inbound message was received (inbound-only; not a terminal delivery state). + + + + The message has left for the carrier. + + + + Terminal: the carrier reported non-delivery. + + +#### Methods + +##### fromWire + +Parse a wire string into a `MessageState`, or return `null` +if it is not one of the seven recognised states. + +Because the set mirrors +server-emitted values that may grow, an unknown string is tolerated +(returns `null`) rather than rejected with an exception. + +**Modifiers:** `static` + +###### Signature + +```java +public static MessageState fromWire(String wire) +``` + +###### Parameters + + + the candidate wire string (case-sensitive), may be `null`. + + +###### Returns + +`MessageState` — the matching constant, or `null` if none matches. + +###### Source + +[`src/main/java/com/signalwire/sdk/relay/MessageState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/MessageState.java) + +Line 114. + +*** + +##### getValue + +The canonical wire string for this state (`"queued"` / +`"initiated"` / `"sent"` / `"delivered"` / +`"undelivered"` / `"failed"` / `"received"`) — exactly +the `message_state` value the server sends. + +Equivalent to PHP's +backed-enum `->value`. + +###### Signature + +```java +public String getValue() +``` + +###### Returns + +`String` — the lower-case state name as it appears on the wire. + +###### Source + +[`src/main/java/com/signalwire/sdk/relay/MessageState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/MessageState.java) + +Line 86. + +*** + +##### isTerminal + +Whether this is a <em>terminal</em> delivery state — i.e. + +the outbound +message has a final delivery outcome and will not transition further. The +terminal set is `#DELIVERED`, `#UNDELIVERED`, `#FAILED` +(matching the reference's `MESSAGE_TERMINAL_STATES` and +`Constants#isTerminalMessageState(String)`). `#RECEIVED` is +NOT terminal (it is an inbound arrival, not an outbound completion). + +###### Signature + +```java +public boolean isTerminal() +``` + +###### Returns + +`boolean` — `true` iff this state is `#DELIVERED`, `#UNDELIVERED`, or `#FAILED`. + +###### Source + +[`src/main/java/com/signalwire/sdk/relay/MessageState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/MessageState.java) + +Line 101. + +*** + +##### valueOf + +**Modifiers:** `static` + +###### Signature + +```java +public static MessageState valueOf(String name) +``` + +###### Parameters + + + +###### Returns + +`MessageState` + +###### Source + +[`src/main/java/com/signalwire/sdk/relay/MessageState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/MessageState.java) + +*** + +##### values + +**Modifiers:** `static` + +###### Signature + +```java +public static MessageState[] values() +``` + +###### Returns + +`MessageState[]` + +###### Source + +[`src/main/java/com/signalwire/sdk/relay/MessageState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/MessageState.java) + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/MessageState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/MessageState.java) + +Line 54. diff --git a/fern/products/sdk-reference/java/relay/relay/message/index.mdx b/fern/products/sdk-reference/java/relay/relay/message/index.mdx new file mode 100644 index 0000000000..8a059e0f5d --- /dev/null +++ b/fern/products/sdk-reference/java/relay/relay/message/index.mdx @@ -0,0 +1,699 @@ +--- +slug: "/reference/java/relay/relay/message" +title: "Message" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.Message" + parent: "relay.relay" + module: "relay.relay" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java" + visibility: "public" +--- +# `Message` + +Represents an SMS/MMS message with state tracking. + +<p> +Messages are simpler than calls: they have a `message_id`, progress through +states (queued, initiated, sent, delivered), and support completion waiting. +<p> +State progression: +<ul> + <li>Success: queued -> initiated -> sent -> delivered</li> + <li>Failure: queued -> initiated -> failed/undelivered</li> +</ul> +Terminal states: delivered, undelivered, failed + +## Signature + +```java +public class Message +``` + +## Methods + +### \ + +#### Signature + +```java +public (String messageId) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) + +Line 51. + +*** + +### fromReceiveEvent + +Create a Message from an inbound receive event. + +**Modifiers:** `static` + +#### Signature + +```java +public static Message fromReceiveEvent(RelayEvent.MessagingReceiveEvent event) +``` + +#### Parameters + + + +#### Returns + +`Message` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) + +Line 209. + +*** + +### getBody + +Message body; empty for media-only messages or before set. + +#### Signature + +```java +public Optional getBody() +``` + +#### Returns + +`Optional` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) + +Line 106. + +*** + +### getContext + +Messaging context (the RELAY protocol/context the message rode on). + +#### Signature + +```java +public Optional getContext() +``` + +#### Returns + +`Optional` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) + +Line 98. + +*** + +### getDirection + +Direction (inbound/outbound) once known; empty until set. + +#### Signature + +```java +public Optional getDirection() +``` + +#### Returns + +`Optional` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) + +Line 100. + +*** + +### getFromNumber + +Sender E.164 number; empty until set. + +#### Signature + +```java +public Optional getFromNumber() +``` + +#### Returns + +`Optional` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) + +Line 102. + +*** + +### getMedia + +#### Signature + +```java +public List getMedia() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) + +Line 62. + +*** + +### getMessageId + +#### Signature + +```java +public String getMessageId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) + +Line 61. + +*** + +### getMessageState + +The current message state as a typed `MessageState`, <em>alongside</em> the raw string `#getState()` (which stays +canonical for parity and forward-compat). + +Returns `Optional.empty()` +when the live wire state is not one of the seven known +`MessageState` values — the set mirrors server-emitted values that +can grow, so an unrecognised state is tolerated here rather than crashing +the caller. The present value always agrees with `getState()`: +`getMessageState().get().getValue().equals(getState())`. + +#### Signature + +```java +public Optional getMessageState() +``` + +#### Returns + +`Optional` — the typed state, or empty if the raw state is unknown/unset. + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) + +Line 80. + +*** + +### getReason + +Failure reason; present only on a failed/undelivered terminal state. + +#### Signature + +```java +public Optional getReason() +``` + +#### Returns + +`Optional` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) + +Line 108. + +*** + +### getResult + +Terminal completion event; empty until the message reaches a terminal state. + +#### Signature + +```java +public Optional getResult() +``` + +#### Returns + +`Optional` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) + +Line 110. + +*** + +### getSegments + +#### Signature + +```java +public int getSegments() +``` + +#### Returns + +`int` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) + +Line 63. + +*** + +### getState + +#### Signature + +```java +public String getState() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) + +Line 64. + +*** + +### getTags + +#### Signature + +```java +public List getTags() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) + +Line 65. + +*** + +### getToNumber + +Recipient E.164 number; empty until set. + +#### Signature + +```java +public Optional getToNumber() +``` + +#### Returns + +`Optional` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) + +Line 104. + +*** + +### isDone + +#### Signature + +```java +public boolean isDone() +``` + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) + +Line 66. + +*** + +### on + +Register a state change listener. + +#### Signature + +```java +public void on(Consumer listener) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) + +Line 131. + +*** + +### setBody + +#### Signature + +```java +public void setBody(String body) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) + +Line 118. + +*** + +### setContext + +#### Signature + +```java +public void setContext(String context) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) + +Line 114. + +*** + +### setDirection + +#### Signature + +```java +public void setDirection(String direction) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) + +Line 115. + +*** + +### setFromNumber + +#### Signature + +```java +public void setFromNumber(String fromNumber) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) + +Line 116. + +*** + +### setMedia + +#### Signature + +```java +public void setMedia(List media) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) + +Line 119. + +*** + +### setOnCompleted + +#### Signature + +```java +public void setOnCompleted(Consumer onCompleted) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) + +Line 124. + +*** + +### setSegments + +#### Signature + +```java +public void setSegments(int segments) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) + +Line 120. + +*** + +### setState + +#### Signature + +```java +public void setState(String state) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) + +Line 122. + +*** + +### setTags + +#### Signature + +```java +public void setTags(List tags) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) + +Line 121. + +*** + +### setToNumber + +#### Signature + +```java +public void setToNumber(String toNumber) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) + +Line 117. + +*** + +### toString + +**Decorators:** `@Override` + +#### Signature + +```java +public String toString() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) + +Line 223. + +*** + +### updateFromEvent + +Update state from an incoming event. + +#### Signature + +```java +public void updateFromEvent(RelayEvent event) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) + +Line 138. + +*** + +### waitForCompletion + +Block until the message reaches a terminal state. + +#### Signature + + + + ```java + public RelayEvent waitForCompletion() + ``` + + + + ```java + public RelayEvent waitForCompletion(long timeoutMs) + ``` + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`RelayEvent` + +#### Returns (Overload 2) + +`RelayEvent` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) + +Line 165. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/Message.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java) + +Line 29. diff --git a/fern/products/sdk-reference/java/relay/relay/relay-client/builder/index.mdx b/fern/products/sdk-reference/java/relay/relay/relay-client/builder/index.mdx new file mode 100644 index 0000000000..64e127ce83 --- /dev/null +++ b/fern/products/sdk-reference/java/relay/relay/relay-client/builder/index.mdx @@ -0,0 +1,208 @@ +--- +slug: "/reference/java/relay/relay/relay-client/builder" +title: "Builder" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.RelayClient.Builder" + parent: "relay.relay.RelayClient" + module: "relay.relay.RelayClient" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java" + visibility: "public" +--- +# `Builder` + +**Modifiers:** `static` + +## Signature + +```java +public static class Builder +``` + +## Methods + +### \ + +#### Signature + +```java +public () +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) + +*** + +### build + +#### Signature + +```java +public RelayClient build() +``` + +#### Returns + +`RelayClient` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) + +Line 145. + +*** + +### contexts + +#### Signature + +```java +public Builder contexts(List contexts) +``` + +#### Parameters + + + +#### Returns + +`Builder` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) + +Line 143. + +*** + +### host + +#### Signature + +```java +public Builder host(String host) +``` + +#### Parameters + + + +#### Returns + +`Builder` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) + +Line 142. + +*** + +### jwtToken + +#### Signature + +```java +public Builder jwtToken(String jwtToken) +``` + +#### Parameters + + + +#### Returns + +`Builder` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) + +Line 140. + +*** + +### project + +#### Signature + +```java +public Builder project(String project) +``` + +#### Parameters + + + +#### Returns + +`Builder` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) + +Line 138. + +*** + +### space + +#### Signature + +```java +public Builder space(String space) +``` + +#### Parameters + + + +#### Returns + +`Builder` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) + +Line 141. + +*** + +### token + +#### Signature + +```java +public Builder token(String token) +``` + +#### Parameters + + + +#### Returns + +`Builder` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) + +Line 139. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) + +Line 131. diff --git a/fern/products/sdk-reference/java/relay/relay/relay-client/index.mdx b/fern/products/sdk-reference/java/relay/relay/relay-client/index.mdx new file mode 100644 index 0000000000..c613800c7d --- /dev/null +++ b/fern/products/sdk-reference/java/relay/relay/relay-client/index.mdx @@ -0,0 +1,688 @@ +--- +slug: "/reference/java/relay/relay/relay-client" +title: "RelayClient" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.RelayClient" + parent: "relay.relay" + module: "relay.relay" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java" + visibility: "public" +--- +# `RelayClient` + +RELAY WebSocket connection manager. + +<p> +Manages WebSocket connections to the SignalWire RELAY service using JSON-RPC 2.0. +Implements the four correlation mechanisms: +<ol> + <li>JSON-RPC id -> CompletableFuture for RPC response matching</li> + <li>call_id -> Call for event routing</li> + <li>control_id -> Action per Call for action event routing</li> + <li>tag -> CompletableFuture<Call> for dial correlation</li> +</ol> +<p> +Also handles: +<ul> + <li>Event ACK for every `signalwire.event`</li> + <li>Ping/pong for `signalwire.ping`</li> + <li>Exponential backoff reconnection</li> + <li>Authorization state for fast reconnection</li> + <li>Server-initiated disconnect with restart flag</li> + <li>Dynamic context subscription via receive/unreceive</li> + <li>Message tracking by message_id</li> +</ul> + +<pre>client = RelayClient.builder() + .project("project-id") + .token("api-token") + .space("example.signalwire.com") + .contexts(List.of("default")) + .build(); + +client.onCall(call -> { + call.answer(); + var action = call.play(List.of(Map.of("type", "tts", + "params", Map.of("text", "Hello!")))); + action.waitForCompletion(); + call.hangup();); + +client.run(); +}</pre> + +## Signature + +```java +public class RelayClient implements AutoCloseable +``` + +## Inheritance + +**Implements:** `AutoCloseable` + +## Methods + +### builder + +**Modifiers:** `static` + +#### Signature + +```java +public static Builder builder() +``` + +#### Returns + +`Builder` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) + +Line 127. + +*** + +### close + +`AutoCloseable` entry point so the client can be used in a +try-with-resources block: + +<pre>{@code +try (var client = RelayClient.builder()...build()) { + client.connect(); + // ... + +`AutoCloseable` entry point so the client can be used in a +try-with-resources block: + +<pre>(var client = RelayClient.builder()...build()) { + client.connect(); + // ... use the client ... // close() runs here: WebSocket shut down, worker pool released +}</pre> + +Releases the same resources as `#disconnect()` — closes the +RELAY WebSocket, releases the `#run()` latch, and shuts the +worker `java.util.concurrent.ExecutorService` down — so the +client is the rough Java parallel of Python's +with RelayClient(...) context manager. Idempotent: a +second call is a harmless no-op. + +**Decorators:** `@Override` + +#### Signature + +```java +public void close() +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) + +Line 282. + +*** + +### connect + +Open the WebSocket connection and complete the signalwire.connect +handshake without blocking the caller. + +<p>Mirrors the Python `RelayClient.connect()` coroutine. + +Tests use +this directly; production code typically uses `#run()` instead. + +#### Signature + + + + ```java + public void connect(long timeoutMs) + ``` + + + + ```java + public void connect() + ``` + + + +#### Parameters (Overload 1) + + + how long to wait for the handshake to complete + + +#### Throws + +- `RuntimeException` — if connect fails or times out + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) + +Line 234. + +*** + +### dial + +Dial an outbound call. + +#### Signature + + + + ```java + public Call dial( + List>> devices, + Map options, + long timeout + ) + ``` + + + + ```java + public Call dial(List>> devices) + ``` + + + +#### Parameters (Overload 1) + + + nested array: outer = sequential, inner = parallel + + + + optional parameters (region, max\_price\_per\_minute) + + + + timeout in milliseconds + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`Call` — the answered Call + +#### Returns (Overload 2) + +`Call` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) + +Line 313. + +*** + +### disconnect + +Disconnect the client. + +#### Signature + +```java +public void disconnect() +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) + +Line 255. + +*** + +### execute + +Execute an RPC method and wait for the response. + +#### Signature + +```java +public Map execute(String method, Map params) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) + +Line 429. + +*** + +### getAuthorizationState + +Returns the authorization state blob the server pushed via the +`signalwire.authorization.state` event, or null. + +#### Signature + +```java +public String getAuthorizationState() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) + +Line 176. + +*** + +### getContexts + +#### Signature + +```java +public List getContexts() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) + +Line 161. + +*** + +### getProject + +#### Signature + +```java +public String getProject() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) + +Line 159. + +*** + +### getRelayProtocol + +Returns the protocol identifier issued by the server during the +signalwire.connect handshake. + +Empty string before connect completes. + +#### Signature + +```java +public String getRelayProtocol() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) + +Line 168. + +*** + +### getSpace + +#### Signature + +```java +public String getSpace() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) + +Line 160. + +*** + +### isConnected + +#### Signature + +```java +public boolean isConnected() +``` + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) + +Line 162. + +*** + +### onCall + +Register a handler for inbound calls. + +#### Signature + +```java +public void onCall(Consumer handler) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) + +Line 191. + +*** + +### onEvent + +Register a handler for all raw events. + +#### Signature + +```java +public void onEvent(Consumer handler) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) + +Line 205. + +*** + +### onMessage + +Register a handler for inbound messages. + +#### Signature + +```java +public void onMessage(Consumer handler) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) + +Line 198. + +*** + +### receive + +Subscribe to additional contexts dynamically. + +#### Signature + +```java +public Map receive(List newContexts) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) + +Line 290. + +*** + +### run + +Connect and run the client. + +Blocks until `#disconnect()` is called. + +#### Signature + +```java +public void run() +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) + +Line 212. + +*** + +### sendMessage + +Send an outbound SMS/MMS. + +#### Signature + + + + ```java + public Message sendMessage( + String context, + String fromNumber, + String toNumber, + String body, + List mediaUrls + ) + ``` + + + + ```java + public Message sendMessage( + String context, + String fromNumber, + String toNumber, + String body, + List mediaUrls, + List tags + ) + ``` + + + +#### Parameters (Overload 1) + + + message context + + + + sender E.164 number + + + + recipient E.164 number + + + + message body (required if no media) + + + + media URLs (required if no body) + + +#### Parameters (Overload 2) + + + + + + + + + + + + + +#### Returns (Overload 1) + +`Message` — the Message object with message\_id for tracking + +#### Returns (Overload 2) + +`Message` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) + +Line 369. + +*** + +### sendRaw + +Send a raw JSON-RPC frame on the underlying socket. + +Production code +uses Map), which adds project\_id/protocol +automatically. This helper exists for the porting-sdk RELAY-handshake +audit harness, which has to emit a `method:"signalwire.event"` +frame from inside the on-event callback so the fixture's dispatch +counter fires (see SUBAGENT\_PLAYBOOK lesson on event-ACK semantics). + +#### Signature + +```java +public void sendRaw(Map frame) +``` + +#### Parameters + + + a Gson-serializable map representing the frame + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) + +Line 871. + +*** + +### setRelayProtocol + +Test-only setter for the protocol — used by reconnect-with-protocol +tests that simulate "I already have a session token from last time". + +#### Signature + +```java +public void setRelayProtocol(String protocol) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) + +Line 184. + +*** + +### unreceive + +Unsubscribe from contexts. + +#### Signature + +```java +public Map unreceive(List removeContexts) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) + +Line 299. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/RelayClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java) + +Line 62. diff --git a/fern/products/sdk-reference/java/relay/relay/relay-client/index__2.mdx b/fern/products/sdk-reference/java/relay/relay/relay-client/index__2.mdx new file mode 100644 index 0000000000..f665b20ca4 --- /dev/null +++ b/fern/products/sdk-reference/java/relay/relay/relay-client/index__2.mdx @@ -0,0 +1,20 @@ +--- +slug: "/reference/java/relay/relay/relay-client/index__2" +title: "RelayClient" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "relay.relay.RelayClient" + parent: "relay.relay" + module: "relay.relay" +--- +# `RelayClient` + +## Classes + + + + diff --git a/fern/products/sdk-reference/java/relay/relay/relay-error/index.mdx b/fern/products/sdk-reference/java/relay/relay/relay-error/index.mdx new file mode 100644 index 0000000000..e225f9243e --- /dev/null +++ b/fern/products/sdk-reference/java/relay/relay/relay-error/index.mdx @@ -0,0 +1,73 @@ +--- +slug: "/reference/java/relay/relay/relay-error" +title: "RelayError" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.RelayError" + parent: "relay.relay" + module: "relay.relay" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayError.java" + visibility: "public" +--- +# `RelayError` + +Runtime exception for RELAY-level failures (dial timeout, dial failed, +connect rejected, etc.). + +Mirrors the Python `RelayError` class. + +## Signature + +```java +public class RelayError extends RuntimeException +``` + +## Inheritance + +**Extends:** `RuntimeException` + +## Methods + +### \ + +#### Signature + + + + ```java + public (String message) + ``` + + + + ```java + public (String message, Throwable cause) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayError.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayError.java) + +Line 15. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/RelayError.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayError.java) + +Line 13. diff --git a/fern/products/sdk-reference/java/relay/relay/relay-event/authorization-state-event/index.mdx b/fern/products/sdk-reference/java/relay/relay/relay-event/authorization-state-event/index.mdx new file mode 100644 index 0000000000..8178bbd882 --- /dev/null +++ b/fern/products/sdk-reference/java/relay/relay/relay-event/authorization-state-event/index.mdx @@ -0,0 +1,80 @@ +--- +slug: "/reference/java/relay/relay/relay-event/authorization-state-event" +title: "AuthorizationStateEvent" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.RelayEvent.AuthorizationStateEvent" + parent: "relay.relay.RelayEvent" + module: "relay.relay.RelayEvent" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" + visibility: "public" +--- +# `AuthorizationStateEvent` + +Authorization state event (`signalwire.authorization.state`). + +**Modifiers:** `static` + +## Signature + +```java +public static class AuthorizationStateEvent extends RelayEvent +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/relay/relay/relay-event) + +## Methods + +### \ + +#### Signature + +```java +public (String eventType, double timestamp, Map params) +``` + +#### Parameters + + + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 450. + +*** + +### getAuthorizationState + +#### Signature + +```java +public String getAuthorizationState() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 454. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 449. diff --git a/fern/products/sdk-reference/java/relay/relay/relay-event/call-collect-event/index.mdx b/fern/products/sdk-reference/java/relay/relay/relay-event/call-collect-event/index.mdx new file mode 100644 index 0000000000..42b8d8feda --- /dev/null +++ b/fern/products/sdk-reference/java/relay/relay/relay-event/call-collect-event/index.mdx @@ -0,0 +1,140 @@ +--- +slug: "/reference/java/relay/relay/relay-event/call-collect-event" +title: "CallCollectEvent" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallCollectEvent" + parent: "relay.relay.RelayEvent" + module: "relay.relay.RelayEvent" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" + visibility: "public" +--- +# `CallCollectEvent` + +Collect event (`calling.call.collect`). + +**Modifiers:** `static` + +## Signature + +```java +public static class CallCollectEvent extends RelayEvent +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/relay/relay/relay-event) + +## Methods + +### \ + +#### Signature + +```java +public (String eventType, double timestamp, Map params) +``` + +#### Parameters + + + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 311. + +*** + +### getCallId + +#### Signature + +```java +public String getCallId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 315. + +*** + +### getControlId + +#### Signature + +```java +public String getControlId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 316. + +*** + +### getResult + +#### Signature + +```java +public Map getResult() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 318. + +*** + +### getResultType + +#### Signature + +```java +public String getResultType() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 317. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 310. diff --git a/fern/products/sdk-reference/java/relay/relay/relay-event/call-connect-event/index.mdx b/fern/products/sdk-reference/java/relay/relay/relay-event/call-connect-event/index.mdx new file mode 100644 index 0000000000..fc647b57dd --- /dev/null +++ b/fern/products/sdk-reference/java/relay/relay/relay-event/call-connect-event/index.mdx @@ -0,0 +1,100 @@ +--- +slug: "/reference/java/relay/relay/relay-event/call-connect-event" +title: "CallConnectEvent" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallConnectEvent" + parent: "relay.relay.RelayEvent" + module: "relay.relay.RelayEvent" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" + visibility: "public" +--- +# `CallConnectEvent` + +Connect event (`calling.call.connect`). + +**Modifiers:** `static` + +## Signature + +```java +public static class CallConnectEvent extends RelayEvent +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/relay/relay/relay-event) + +## Methods + +### \ + +#### Signature + +```java +public (String eventType, double timestamp, Map params) +``` + +#### Parameters + + + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 377. + +*** + +### getCallId + +#### Signature + +```java +public String getCallId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 381. + +*** + +### getConnectState + +#### Signature + +```java +public String getConnectState() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 382. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 376. diff --git a/fern/products/sdk-reference/java/relay/relay/relay-event/call-detect-event/index.mdx b/fern/products/sdk-reference/java/relay/relay/relay-event/call-detect-event/index.mdx new file mode 100644 index 0000000000..8c2c05b944 --- /dev/null +++ b/fern/products/sdk-reference/java/relay/relay/relay-event/call-detect-event/index.mdx @@ -0,0 +1,142 @@ +--- +slug: "/reference/java/relay/relay/relay-event/call-detect-event" +title: "CallDetectEvent" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallDetectEvent" + parent: "relay.relay.RelayEvent" + module: "relay.relay.RelayEvent" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" + visibility: "public" +--- +# `CallDetectEvent` + +Detect event (`calling.call.detect`). + +**Modifiers:** `static` + +## Signature + +```java +public static class CallDetectEvent extends RelayEvent +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/relay/relay/relay-event) + +## Methods + +### \ + +#### Signature + +```java +public (String eventType, double timestamp, Map params) +``` + +#### Parameters + + + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 290. + +*** + +### getCallId + +#### Signature + +```java +public String getCallId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 294. + +*** + +### getControlId + +#### Signature + +```java +public String getControlId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 295. + +*** + +### getDetect + +Results are in detect.params.event, not a simple state field. + +#### Signature + +```java +public Map getDetect() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 298. + +*** + +### getDetectEvent + +#### Signature + +```java +public String getDetectEvent() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 300. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 289. diff --git a/fern/products/sdk-reference/java/relay/relay/relay-event/call-dial-event/index.mdx b/fern/products/sdk-reference/java/relay/relay/relay-event/call-dial-event/index.mdx new file mode 100644 index 0000000000..1f2f7195a8 --- /dev/null +++ b/fern/products/sdk-reference/java/relay/relay/relay-event/call-dial-event/index.mdx @@ -0,0 +1,194 @@ +--- +slug: "/reference/java/relay/relay/relay-event/call-dial-event" +title: "CallDialEvent" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallDialEvent" + parent: "relay.relay.RelayEvent" + module: "relay.relay.RelayEvent" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" + visibility: "public" +--- +# `CallDialEvent` + +Dial completion event (`calling.call.dial`). + +<p> +Note: No top-level `call_id`. + +The call info is nested at `params.call`. + +**Modifiers:** `static` + +## Signature + +```java +public static class CallDialEvent extends RelayEvent +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/relay/relay/relay-event) + +## Methods + +### \ + +#### Signature + +```java +public (String eventType, double timestamp, Map params) +``` + +#### Parameters + + + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 206. + +*** + +### getCallId + +#### Signature + +```java +public String getCallId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 232. + +*** + +### getCallInfo + +#### Signature + +```java +public Map getCallInfo() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 228. + +*** + +### getDialState + +#### Signature + +```java +public String getDialState() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 212. + +*** + +### getDialStateEnum + +The dial outcome as a typed `DialState`, <em>alongside</em> the +raw string `#getDialState()` (which stays canonical for parity +and forward-compat). + +Returns `Optional.empty()` when the wire +`dial_state` is not one of the three known `DialState` +values — the set mirrors server-emitted values that can grow, so an +unrecognised state is tolerated here rather than crashing dispatch. + +#### Signature + +```java +public Optional getDialStateEnum() +``` + +#### Returns + +`Optional` — the typed dial state, or empty if unknown/unset. + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 224. + +*** + +### getNodeId + +#### Signature + +```java +public String getNodeId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 211. + +*** + +### getTag + +#### Signature + +```java +public String getTag() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 210. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 205. diff --git a/fern/products/sdk-reference/java/relay/relay/relay-event/call-fax-event/index.mdx b/fern/products/sdk-reference/java/relay/relay/relay-event/call-fax-event/index.mdx new file mode 100644 index 0000000000..702a6098cc --- /dev/null +++ b/fern/products/sdk-reference/java/relay/relay/relay-event/call-fax-event/index.mdx @@ -0,0 +1,120 @@ +--- +slug: "/reference/java/relay/relay/relay-event/call-fax-event" +title: "CallFaxEvent" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallFaxEvent" + parent: "relay.relay.RelayEvent" + module: "relay.relay.RelayEvent" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" + visibility: "public" +--- +# `CallFaxEvent` + +Fax event (`calling.call.fax`). + +**Modifiers:** `static` + +## Signature + +```java +public static class CallFaxEvent extends RelayEvent +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/relay/relay/relay-event) + +## Methods + +### \ + +#### Signature + +```java +public (String eventType, double timestamp, Map params) +``` + +#### Parameters + + + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 325. + +*** + +### getCallId + +#### Signature + +```java +public String getCallId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 329. + +*** + +### getControlId + +#### Signature + +```java +public String getControlId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 330. + +*** + +### getState + +#### Signature + +```java +public String getState() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 331. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 324. diff --git a/fern/products/sdk-reference/java/relay/relay/relay-event/call-pay-event/index.mdx b/fern/products/sdk-reference/java/relay/relay/relay-event/call-pay-event/index.mdx new file mode 100644 index 0000000000..5b33930136 --- /dev/null +++ b/fern/products/sdk-reference/java/relay/relay/relay-event/call-pay-event/index.mdx @@ -0,0 +1,120 @@ +--- +slug: "/reference/java/relay/relay/relay-event/call-pay-event" +title: "CallPayEvent" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallPayEvent" + parent: "relay.relay.RelayEvent" + module: "relay.relay.RelayEvent" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" + visibility: "public" +--- +# `CallPayEvent` + +Pay event (`calling.call.pay`). + +**Modifiers:** `static` + +## Signature + +```java +public static class CallPayEvent extends RelayEvent +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/relay/relay/relay-event) + +## Methods + +### \ + +#### Signature + +```java +public (String eventType, double timestamp, Map params) +``` + +#### Parameters + + + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 413. + +*** + +### getCallId + +#### Signature + +```java +public String getCallId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 417. + +*** + +### getControlId + +#### Signature + +```java +public String getControlId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 418. + +*** + +### getState + +#### Signature + +```java +public String getState() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 419. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 412. diff --git a/fern/products/sdk-reference/java/relay/relay/relay-event/call-play-event/index.mdx b/fern/products/sdk-reference/java/relay/relay/relay-event/call-play-event/index.mdx new file mode 100644 index 0000000000..b9124cd2c8 --- /dev/null +++ b/fern/products/sdk-reference/java/relay/relay/relay-event/call-play-event/index.mdx @@ -0,0 +1,120 @@ +--- +slug: "/reference/java/relay/relay/relay-event/call-play-event" +title: "CallPlayEvent" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallPlayEvent" + parent: "relay.relay.RelayEvent" + module: "relay.relay.RelayEvent" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" + visibility: "public" +--- +# `CallPlayEvent` + +Play event (`calling.call.play`). + +**Modifiers:** `static` + +## Signature + +```java +public static class CallPlayEvent extends RelayEvent +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/relay/relay/relay-event) + +## Methods + +### \ + +#### Signature + +```java +public (String eventType, double timestamp, Map params) +``` + +#### Parameters + + + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 241. + +*** + +### getCallId + +#### Signature + +```java +public String getCallId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 245. + +*** + +### getControlId + +#### Signature + +```java +public String getControlId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 246. + +*** + +### getState + +#### Signature + +```java +public String getState() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 247. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 240. diff --git a/fern/products/sdk-reference/java/relay/relay/relay-event/call-receive-event/index.mdx b/fern/products/sdk-reference/java/relay/relay/relay-event/call-receive-event/index.mdx new file mode 100644 index 0000000000..c62e26fb79 --- /dev/null +++ b/fern/products/sdk-reference/java/relay/relay/relay-event/call-receive-event/index.mdx @@ -0,0 +1,160 @@ +--- +slug: "/reference/java/relay/relay/relay-event/call-receive-event" +title: "CallReceiveEvent" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallReceiveEvent" + parent: "relay.relay.RelayEvent" + module: "relay.relay.RelayEvent" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" + visibility: "public" +--- +# `CallReceiveEvent` + +Inbound call event (`calling.call.receive`). + +**Modifiers:** `static` + +## Signature + +```java +public static class CallReceiveEvent extends RelayEvent +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/relay/relay/relay-event) + +## Methods + +### \ + +#### Signature + +```java +public (String eventType, double timestamp, Map params) +``` + +#### Parameters + + + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 189. + +*** + +### getCallId + +#### Signature + +```java +public String getCallId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 193. + +*** + +### getCallState + +#### Signature + +```java +public String getCallState() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 195. + +*** + +### getContext + +#### Signature + +```java +public String getContext() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 196. + +*** + +### getDevice + +#### Signature + +```java +public Map getDevice() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 197. + +*** + +### getNodeId + +#### Signature + +```java +public String getNodeId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 194. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 188. diff --git a/fern/products/sdk-reference/java/relay/relay/relay-event/call-record-event/index.mdx b/fern/products/sdk-reference/java/relay/relay/relay-event/call-record-event/index.mdx new file mode 100644 index 0000000000..0bf0254871 --- /dev/null +++ b/fern/products/sdk-reference/java/relay/relay/relay-event/call-record-event/index.mdx @@ -0,0 +1,180 @@ +--- +slug: "/reference/java/relay/relay/relay-event/call-record-event" +title: "CallRecordEvent" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallRecordEvent" + parent: "relay.relay.RelayEvent" + module: "relay.relay.RelayEvent" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" + visibility: "public" +--- +# `CallRecordEvent` + +Record event (`calling.call.record`). + +**Modifiers:** `static` + +## Signature + +```java +public static class CallRecordEvent extends RelayEvent +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/relay/relay/relay-event) + +## Methods + +### \ + +#### Signature + +```java +public (String eventType, double timestamp, Map params) +``` + +#### Parameters + + + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 254. + +*** + +### getCallId + +#### Signature + +```java +public String getCallId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 258. + +*** + +### getControlId + +#### Signature + +```java +public String getControlId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 259. + +*** + +### getDuration + +#### Signature + +```java +public double getDuration() +``` + +#### Returns + +`double` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 270. + +*** + +### getSize + +#### Signature + +```java +public long getSize() +``` + +#### Returns + +`long` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 277. + +*** + +### getState + +#### Signature + +```java +public String getState() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 260. + +*** + +### getUrl + +#### Signature + +```java +public String getUrl() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 262. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 253. diff --git a/fern/products/sdk-reference/java/relay/relay/relay-event/call-refer-event/index.mdx b/fern/products/sdk-reference/java/relay/relay/relay-event/call-refer-event/index.mdx new file mode 100644 index 0000000000..7fdc7795b3 --- /dev/null +++ b/fern/products/sdk-reference/java/relay/relay/relay-event/call-refer-event/index.mdx @@ -0,0 +1,100 @@ +--- +slug: "/reference/java/relay/relay/relay-event/call-refer-event" +title: "CallReferEvent" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallReferEvent" + parent: "relay.relay.RelayEvent" + module: "relay.relay.RelayEvent" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" + visibility: "public" +--- +# `CallReferEvent` + +Refer event (`calling.call.refer`). + +**Modifiers:** `static` + +## Signature + +```java +public static class CallReferEvent extends RelayEvent +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/relay/relay/relay-event) + +## Methods + +### \ + +#### Signature + +```java +public (String eventType, double timestamp, Map params) +``` + +#### Parameters + + + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 389. + +*** + +### getCallId + +#### Signature + +```java +public String getCallId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 393. + +*** + +### getReferState + +#### Signature + +```java +public String getReferState() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 394. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 388. diff --git a/fern/products/sdk-reference/java/relay/relay/relay-event/call-send-digits-event/index.mdx b/fern/products/sdk-reference/java/relay/relay/relay-event/call-send-digits-event/index.mdx new file mode 100644 index 0000000000..6d288bf54d --- /dev/null +++ b/fern/products/sdk-reference/java/relay/relay/relay-event/call-send-digits-event/index.mdx @@ -0,0 +1,100 @@ +--- +slug: "/reference/java/relay/relay/relay-event/call-send-digits-event" +title: "CallSendDigitsEvent" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallSendDigitsEvent" + parent: "relay.relay.RelayEvent" + module: "relay.relay.RelayEvent" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" + visibility: "public" +--- +# `CallSendDigitsEvent` + +Send digits event (`calling.call.send_digits`). + +**Modifiers:** `static` + +## Signature + +```java +public static class CallSendDigitsEvent extends RelayEvent +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/relay/relay/relay-event) + +## Methods + +### \ + +#### Signature + +```java +public (String eventType, double timestamp, Map params) +``` + +#### Parameters + + + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 401. + +*** + +### getCallId + +#### Signature + +```java +public String getCallId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 405. + +*** + +### getState + +#### Signature + +```java +public String getState() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 406. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 400. diff --git a/fern/products/sdk-reference/java/relay/relay/relay-event/call-state-event/index.mdx b/fern/products/sdk-reference/java/relay/relay/relay-event/call-state-event/index.mdx new file mode 100644 index 0000000000..1b6c7b0f43 --- /dev/null +++ b/fern/products/sdk-reference/java/relay/relay/relay-event/call-state-event/index.mdx @@ -0,0 +1,200 @@ +--- +slug: "/reference/java/relay/relay/relay-event/call-state-event" +title: "CallStateEvent" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallStateEvent" + parent: "relay.relay.RelayEvent" + module: "relay.relay.RelayEvent" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" + visibility: "public" +--- +# `CallStateEvent` + +Call state change event (`calling.call.state`). + +**Modifiers:** `static` + +## Signature + +```java +public static class CallStateEvent extends RelayEvent +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/relay/relay/relay-event) + +## Methods + +### \ + +#### Signature + +```java +public (String eventType, double timestamp, Map params) +``` + +#### Parameters + + + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 172. + +*** + +### getCallId + +#### Signature + +```java +public String getCallId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 176. + +*** + +### getCallState + +#### Signature + +```java +public String getCallState() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 178. + +*** + +### getDevice + +#### Signature + +```java +public Map getDevice() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 182. + +*** + +### getDirection + +#### Signature + +```java +public String getDirection() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 181. + +*** + +### getEndReason + +#### Signature + +```java +public String getEndReason() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 179. + +*** + +### getNodeId + +#### Signature + +```java +public String getNodeId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 177. + +*** + +### getTag + +#### Signature + +```java +public String getTag() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 180. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 171. diff --git a/fern/products/sdk-reference/java/relay/relay/relay-event/call-stream-event/index.mdx b/fern/products/sdk-reference/java/relay/relay/relay-event/call-stream-event/index.mdx new file mode 100644 index 0000000000..566f7b9790 --- /dev/null +++ b/fern/products/sdk-reference/java/relay/relay/relay-event/call-stream-event/index.mdx @@ -0,0 +1,120 @@ +--- +slug: "/reference/java/relay/relay/relay-event/call-stream-event" +title: "CallStreamEvent" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallStreamEvent" + parent: "relay.relay.RelayEvent" + module: "relay.relay.RelayEvent" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" + visibility: "public" +--- +# `CallStreamEvent` + +Stream event (`calling.call.stream`). + +**Modifiers:** `static` + +## Signature + +```java +public static class CallStreamEvent extends RelayEvent +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/relay/relay/relay-event) + +## Methods + +### \ + +#### Signature + +```java +public (String eventType, double timestamp, Map params) +``` + +#### Parameters + + + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 351. + +*** + +### getCallId + +#### Signature + +```java +public String getCallId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 355. + +*** + +### getControlId + +#### Signature + +```java +public String getControlId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 356. + +*** + +### getState + +#### Signature + +```java +public String getState() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 357. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 350. diff --git a/fern/products/sdk-reference/java/relay/relay/relay-event/call-tap-event/index.mdx b/fern/products/sdk-reference/java/relay/relay/relay-event/call-tap-event/index.mdx new file mode 100644 index 0000000000..b5c94a9525 --- /dev/null +++ b/fern/products/sdk-reference/java/relay/relay/relay-event/call-tap-event/index.mdx @@ -0,0 +1,120 @@ +--- +slug: "/reference/java/relay/relay/relay-event/call-tap-event" +title: "CallTapEvent" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallTapEvent" + parent: "relay.relay.RelayEvent" + module: "relay.relay.RelayEvent" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" + visibility: "public" +--- +# `CallTapEvent` + +Tap event (`calling.call.tap`). + +**Modifiers:** `static` + +## Signature + +```java +public static class CallTapEvent extends RelayEvent +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/relay/relay/relay-event) + +## Methods + +### \ + +#### Signature + +```java +public (String eventType, double timestamp, Map params) +``` + +#### Parameters + + + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 338. + +*** + +### getCallId + +#### Signature + +```java +public String getCallId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 342. + +*** + +### getControlId + +#### Signature + +```java +public String getControlId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 343. + +*** + +### getState + +#### Signature + +```java +public String getState() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 344. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 337. diff --git a/fern/products/sdk-reference/java/relay/relay/relay-event/call-transcribe-event/index.mdx b/fern/products/sdk-reference/java/relay/relay/relay-event/call-transcribe-event/index.mdx new file mode 100644 index 0000000000..f89d1204e6 --- /dev/null +++ b/fern/products/sdk-reference/java/relay/relay/relay-event/call-transcribe-event/index.mdx @@ -0,0 +1,120 @@ +--- +slug: "/reference/java/relay/relay/relay-event/call-transcribe-event" +title: "CallTranscribeEvent" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallTranscribeEvent" + parent: "relay.relay.RelayEvent" + module: "relay.relay.RelayEvent" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" + visibility: "public" +--- +# `CallTranscribeEvent` + +Transcribe event (`calling.call.transcribe`). + +**Modifiers:** `static` + +## Signature + +```java +public static class CallTranscribeEvent extends RelayEvent +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/relay/relay/relay-event) + +## Methods + +### \ + +#### Signature + +```java +public (String eventType, double timestamp, Map params) +``` + +#### Parameters + + + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 364. + +*** + +### getCallId + +#### Signature + +```java +public String getCallId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 368. + +*** + +### getControlId + +#### Signature + +```java +public String getControlId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 369. + +*** + +### getState + +#### Signature + +```java +public String getState() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 370. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 363. diff --git a/fern/products/sdk-reference/java/relay/relay/relay-event/conference-event/index.mdx b/fern/products/sdk-reference/java/relay/relay/relay-event/conference-event/index.mdx new file mode 100644 index 0000000000..af9fe2aba1 --- /dev/null +++ b/fern/products/sdk-reference/java/relay/relay/relay-event/conference-event/index.mdx @@ -0,0 +1,100 @@ +--- +slug: "/reference/java/relay/relay/relay-event/conference-event" +title: "ConferenceEvent" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.RelayEvent.ConferenceEvent" + parent: "relay.relay.RelayEvent" + module: "relay.relay.RelayEvent" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" + visibility: "public" +--- +# `ConferenceEvent` + +Conference event (`calling.conference`). + +**Modifiers:** `static` + +## Signature + +```java +public static class ConferenceEvent extends RelayEvent +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/relay/relay/relay-event) + +## Methods + +### \ + +#### Signature + +```java +public (String eventType, double timestamp, Map params) +``` + +#### Parameters + + + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 426. + +*** + +### getCallId + +#### Signature + +```java +public String getCallId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 431. + +*** + +### getConferenceId + +#### Signature + +```java +public String getConferenceId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 430. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 425. diff --git a/fern/products/sdk-reference/java/relay/relay/relay-event/index.mdx b/fern/products/sdk-reference/java/relay/relay/relay-event/index.mdx new file mode 100644 index 0000000000..4a36800bb1 --- /dev/null +++ b/fern/products/sdk-reference/java/relay/relay/relay-event/index.mdx @@ -0,0 +1,221 @@ +--- +slug: "/reference/java/relay/relay/relay-event" +title: "RelayEvent" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.RelayEvent" + parent: "relay.relay" + module: "relay.relay" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" + visibility: "public" +--- +# `RelayEvent` + +Base class for all RELAY events. + +<p> +Events arrive as `signalwire.event` messages with nested params: +<pre> +{ + "params": { + "event_type": "calling.call.play", + "timestamp": 123457.1234, + "params": { "call_id": "...", "control_id": "...", "state": "finished" } + } +} +</pre> +Subclasses provide typed access to specific event payloads. + +## Signature + +```java +public class RelayEvent +``` + +## Methods + +### \ + +#### Signature + +```java +public (String eventType, double timestamp, Map params) +``` + +#### Parameters + + + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 34. + +*** + +### fromRawParams + +Create the appropriate event subclass from raw JSON-RPC event params. + +**Modifiers:** `static` + +#### Signature + +```java +public static RelayEvent fromRawParams(Map outerParams) +``` + +#### Parameters + + + +#### Returns + +`RelayEvent` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 65. + +*** + +### getEventType + +#### Signature + +```java +public String getEventType() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 40. + +*** + +### getParams + +#### Signature + +```java +public Map getParams() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 48. + +*** + +### getStringParam + +#### Signature + + + + ```java + public String getStringParam(String key) + ``` + + + + ```java + public String getStringParam(String key, String defaultValue) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`String` + +#### Returns (Overload 2) + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 52. + +*** + +### getTimestamp + +#### Signature + +```java +public double getTimestamp() +``` + +#### Returns + +`double` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 44. + +*** + +### toString + +**Decorators:** `@Override` + +#### Signature + +```java +public String toString() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 116. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 28. diff --git a/fern/products/sdk-reference/java/relay/relay/relay-event/index__2.mdx b/fern/products/sdk-reference/java/relay/relay/relay-event/index__2.mdx new file mode 100644 index 0000000000..95fdad951d --- /dev/null +++ b/fern/products/sdk-reference/java/relay/relay/relay-event/index__2.mdx @@ -0,0 +1,98 @@ +--- +slug: "/reference/java/relay/relay/relay-event/index__2" +title: "RelayEvent" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "relay.relay.RelayEvent" + parent: "relay.relay" + module: "relay.relay" +--- +# `RelayEvent` + +## Classes + + + + Authorization state event (`signalwire.authorization.state`). + + + + Collect event (`calling.call.collect`). + + + + Connect event (`calling.call.connect`). + + + + Detect event (`calling.call.detect`). + + + + Dial completion event (`calling.call.dial`). <p> Note: No top-level `call_id`. + + + + Fax event (`calling.call.fax`). + + + + Pay event (`calling.call.pay`). + + + + Play event (`calling.call.play`). + + + + Inbound call event (`calling.call.receive`). + + + + Record event (`calling.call.record`). + + + + Refer event (`calling.call.refer`). + + + + Send digits event (`calling.call.send_digits`). + + + + Call state change event (`calling.call.state`). + + + + Stream event (`calling.call.stream`). + + + + Tap event (`calling.call.tap`). + + + + Transcribe event (`calling.call.transcribe`). + + + + Conference event (`calling.conference`). + + + + Inbound messaging event (`messaging.receive`). + + + + Outbound messaging state event (`messaging.state`). + + + + Queue event (`calling.queue`). + + diff --git a/fern/products/sdk-reference/java/relay/relay/relay-event/messaging-receive-event/index.mdx b/fern/products/sdk-reference/java/relay/relay/relay-event/messaging-receive-event/index.mdx new file mode 100644 index 0000000000..290086941b --- /dev/null +++ b/fern/products/sdk-reference/java/relay/relay/relay-event/messaging-receive-event/index.mdx @@ -0,0 +1,260 @@ +--- +slug: "/reference/java/relay/relay/relay-event/messaging-receive-event" +title: "MessagingReceiveEvent" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.RelayEvent.MessagingReceiveEvent" + parent: "relay.relay.RelayEvent" + module: "relay.relay.RelayEvent" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" + visibility: "public" +--- +# `MessagingReceiveEvent` + +Inbound messaging event (`messaging.receive`). + +**Modifiers:** `static` + +## Signature + +```java +public static class MessagingReceiveEvent extends RelayEvent +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/relay/relay/relay-event) + +## Methods + +### \ + +#### Signature + +```java +public (String eventType, double timestamp, Map params) +``` + +#### Parameters + + + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 463. + +*** + +### getBody + +#### Signature + +```java +public String getBody() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 472. + +*** + +### getContext + +#### Signature + +```java +public String getContext() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 468. + +*** + +### getDirection + +#### Signature + +```java +public String getDirection() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 469. + +*** + +### getFromNumber + +#### Signature + +```java +public String getFromNumber() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 470. + +*** + +### getMedia + +#### Signature + +```java +public List getMedia() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 473. + +*** + +### getMessageId + +#### Signature + +```java +public String getMessageId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 467. + +*** + +### getMessageState + +#### Signature + +```java +public String getMessageState() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 475. + +*** + +### getSegments + +#### Signature + +```java +public int getSegments() +``` + +#### Returns + +`int` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 474. + +*** + +### getTags + +#### Signature + +```java +public List getTags() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 476. + +*** + +### getToNumber + +#### Signature + +```java +public String getToNumber() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 471. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 462. diff --git a/fern/products/sdk-reference/java/relay/relay/relay-event/messaging-state-event/index.mdx b/fern/products/sdk-reference/java/relay/relay/relay-event/messaging-state-event/index.mdx new file mode 100644 index 0000000000..b0f847a603 --- /dev/null +++ b/fern/products/sdk-reference/java/relay/relay/relay-event/messaging-state-event/index.mdx @@ -0,0 +1,280 @@ +--- +slug: "/reference/java/relay/relay/relay-event/messaging-state-event" +title: "MessagingStateEvent" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.RelayEvent.MessagingStateEvent" + parent: "relay.relay.RelayEvent" + module: "relay.relay.RelayEvent" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" + visibility: "public" +--- +# `MessagingStateEvent` + +Outbound messaging state event (`messaging.state`). + +**Modifiers:** `static` + +## Signature + +```java +public static class MessagingStateEvent extends RelayEvent +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/relay/relay/relay-event) + +## Methods + +### \ + +#### Signature + +```java +public (String eventType, double timestamp, Map params) +``` + +#### Parameters + + + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 483. + +*** + +### getBody + +#### Signature + +```java +public String getBody() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 492. + +*** + +### getContext + +#### Signature + +```java +public String getContext() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 488. + +*** + +### getDirection + +#### Signature + +```java +public String getDirection() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 489. + +*** + +### getFromNumber + +#### Signature + +```java +public String getFromNumber() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 490. + +*** + +### getMedia + +#### Signature + +```java +public List getMedia() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 493. + +*** + +### getMessageId + +#### Signature + +```java +public String getMessageId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 487. + +*** + +### getMessageState + +#### Signature + +```java +public String getMessageState() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 495. + +*** + +### getReason + +#### Signature + +```java +public String getReason() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 496. + +*** + +### getSegments + +#### Signature + +```java +public int getSegments() +``` + +#### Returns + +`int` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 494. + +*** + +### getTags + +#### Signature + +```java +public List getTags() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 497. + +*** + +### getToNumber + +#### Signature + +```java +public String getToNumber() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 491. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 482. diff --git a/fern/products/sdk-reference/java/relay/relay/relay-event/queue-event/index.mdx b/fern/products/sdk-reference/java/relay/relay/relay-event/queue-event/index.mdx new file mode 100644 index 0000000000..2d4046bcec --- /dev/null +++ b/fern/products/sdk-reference/java/relay/relay/relay-event/queue-event/index.mdx @@ -0,0 +1,100 @@ +--- +slug: "/reference/java/relay/relay/relay-event/queue-event" +title: "QueueEvent" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.relay.RelayEvent.QueueEvent" + parent: "relay.relay.RelayEvent" + module: "relay.relay.RelayEvent" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" + visibility: "public" +--- +# `QueueEvent` + +Queue event (`calling.queue`). + +**Modifiers:** `static` + +## Signature + +```java +public static class QueueEvent extends RelayEvent +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/relay/relay/relay-event) + +## Methods + +### \ + +#### Signature + +```java +public (String eventType, double timestamp, Map params) +``` + +#### Parameters + + + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 438. + +*** + +### getCallId + +#### Signature + +```java +public String getCallId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 442. + +*** + +### getQueueId + +#### Signature + +```java +public String getQueueId() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 443. + +## Source + +[`src/main/java/com/signalwire/sdk/relay/RelayEvent.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java) + +Line 437. diff --git a/fern/products/sdk-reference/java/rest/index.mdx b/fern/products/sdk-reference/java/rest/index.mdx new file mode 100644 index 0000000000..4c3b0d3bf7 --- /dev/null +++ b/fern/products/sdk-reference/java/rest/index.mdx @@ -0,0 +1,26 @@ +--- +slug: "/reference/java/rest" +title: "rest" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "com.signalwire.sdk.rest" +--- +# `rest` + +## Signature + +```java +package com.signalwire.sdk.rest +``` + +## Modules + + + + + + diff --git a/fern/products/sdk-reference/java/rest/namespaces/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/index.mdx new file mode 100644 index 0000000000..9d451de642 --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/index.mdx @@ -0,0 +1,20 @@ +--- +slug: "/reference/java/rest/namespaces" +title: "namespaces" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "rest.namespaces" + parent: "com.signalwire.sdk.rest" + module: "rest" +--- +# `namespaces` + +## Modules + + + + diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/addresses-namespace/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/addresses-namespace/index.mdx new file mode 100644 index 0000000000..31f9b0a592 --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/addresses-namespace/index.mdx @@ -0,0 +1,184 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/addresses-namespace" +title: "AddressesNamespace" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.AddressesNamespace" + parent: "com.signalwire.sdk.rest.namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/AddressesNamespace.java" + visibility: "public" +--- +# `AddressesNamespace` + +Address management namespace. + +<p>Mirrors `signalwire.rest.namespaces.addresses.AddressesResource`: +list / create / get / delete (no update endpoint exists for addresses). +Paths sit under `/api/relay/rest/addresses`. + +## Signature + +```java +public class AddressesNamespace +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/AddressesNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/AddressesNamespace.java) + +Line 25. + +*** + +### create + +#### Signature + +```java +public Map create(Map body) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/AddressesNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/AddressesNamespace.java) + +Line 39. + +*** + +### delete + +#### Signature + +```java +public Map delete(String addressId) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/AddressesNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/AddressesNamespace.java) + +Line 47. + +*** + +### get + +#### Signature + +```java +public Map get(String addressId) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/AddressesNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/AddressesNamespace.java) + +Line 43. + +*** + +### getBasePath + +#### Signature + +```java +public String getBasePath() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/AddressesNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/AddressesNamespace.java) + +Line 29. + +*** + +### list + +#### Signature + + + + ```java + public Map list() + ``` + + + + ```java + public Map list(Map queryParams) + ``` + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/AddressesNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/AddressesNamespace.java) + +Line 31. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/AddressesNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/AddressesNamespace.java) + +Line 20. diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/billing-namespace/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/billing-namespace/index.mdx new file mode 100644 index 0000000000..178f87b432 --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/billing-namespace/index.mdx @@ -0,0 +1,90 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/billing-namespace" +title: "BillingNamespace" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.BillingNamespace" + parent: "com.signalwire.sdk.rest.namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/BillingNamespace.java" + visibility: "public" +--- +# `BillingNamespace` + +REST namespace for billing resources. + +## Signature + +```java +public class BillingNamespace +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/BillingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/BillingNamespace.java) + +Line 20. + +*** + +### invoices + +#### Signature + +```java +public CrudResource invoices() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/BillingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/BillingNamespace.java) + +Line 25. + +*** + +### usage + +#### Signature + +```java +public CrudResource usage() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/BillingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/BillingNamespace.java) + +Line 26. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/BillingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/BillingNamespace.java) + +Line 15. diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/calling-namespace/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/calling-namespace/index.mdx new file mode 100644 index 0000000000..3a2b48773f --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/calling-namespace/index.mdx @@ -0,0 +1,1050 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/calling-namespace" +title: "CallingNamespace" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.CallingNamespace" + parent: "com.signalwire.sdk.rest.namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java" + visibility: "public" +--- +# `CallingNamespace` + +REST-based call control. + +All commands are dispatched as +/api/calling/calls with a `"command"` field that names +the operation, optionally an `"id"` field that names the target call, +and a `"params"` object containing keyword arguments. The mock +server (and the real Calling API) matches commands against the registered +routes via the `command` field. + +## Signature + +```java +public class CallingNamespace +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 30. + +*** + +### aiHold + +#### Signature + +```java +public Map aiHold(String callId, Map params) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 184. + +*** + +### aiMessage + +#### Signature + +```java +public Map aiMessage(String callId, Map params) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 180. + +*** + +### aiStop + +#### Signature + +```java +public Map aiStop(String callId, Map params) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 192. + +*** + +### aiUnhold + +#### Signature + +```java +public Map aiUnhold(String callId, Map params) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 188. + +*** + +### calls + +#### Signature + +```java +public CrudResource calls() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 35. + +*** + +### collect + +#### Signature + +```java +public Map collect(String callId, Map params) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 116. + +*** + +### collectStartInputTimers + +#### Signature + +```java +public Map collectStartInputTimers( + String callId, + Map params +) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 124. + +*** + +### collectStop + +#### Signature + +```java +public Map collectStop(String callId, Map params) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 120. + +*** + +### denoise + +#### Signature + +```java +public Map denoise(String callId, Map params) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 160. + +*** + +### denoiseStop + +#### Signature + +```java +public Map denoiseStop(String callId, Map params) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 164. + +*** + +### detect + +#### Signature + +```java +public Map detect(String callId, Map params) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 130. + +*** + +### detectStop + +#### Signature + +```java +public Map detectStop(String callId, Map params) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 134. + +*** + +### dial + +#### Signature + +```java +public Map dial(Map params) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 54. + +*** + +### disconnect + +#### Signature + +```java +public Map disconnect(String callId, Map params) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 70. + +*** + +### end + +#### Signature + +```java +public Map end(String callId, Map params) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 62. + +*** + +### liveTranscribe + +#### Signature + +```java +public Map liveTranscribe( + String callId, + Map params +) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 198. + +*** + +### liveTranslate + +#### Signature + +```java +public Map liveTranslate( + String callId, + Map params +) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 202. + +*** + +### play + +#### Signature + +```java +public Map play(String callId, Map params) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 76. + +*** + +### playPause + +#### Signature + +```java +public Map playPause(String callId, Map params) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 80. + +*** + +### playResume + +#### Signature + +```java +public Map playResume(String callId, Map params) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 84. + +*** + +### playStop + +#### Signature + +```java +public Map playStop(String callId, Map params) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 88. + +*** + +### playVolume + +#### Signature + +```java +public Map playVolume(String callId, Map params) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 92. + +*** + +### receiveFaxStop + +#### Signature + +```java +public Map receiveFaxStop( + String callId, + Map params +) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 212. + +*** + +### record + +#### Signature + +```java +public Map record(String callId, Map params) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 98. + +*** + +### recordPause + +#### Signature + +```java +public Map recordPause(String callId, Map params) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 102. + +*** + +### recordResume + +#### Signature + +```java +public Map recordResume(String callId, Map params) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 106. + +*** + +### recordStop + +#### Signature + +```java +public Map recordStop(String callId, Map params) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 110. + +*** + +### refer + +#### Signature + +```java +public Map refer(String callId, Map params) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 218. + +*** + +### sendFaxStop + +#### Signature + +```java +public Map sendFaxStop(String callId, Map params) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 208. + +*** + +### stream + +#### Signature + +```java +public Map stream(String callId, Map params) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 150. + +*** + +### streamStop + +#### Signature + +```java +public Map streamStop(String callId, Map params) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 154. + +*** + +### tap + +#### Signature + +```java +public Map tap(String callId, Map params) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 140. + +*** + +### tapStop + +#### Signature + +```java +public Map tapStop(String callId, Map params) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 144. + +*** + +### transcribe + +#### Signature + +```java +public Map transcribe(String callId, Map params) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 170. + +*** + +### transcribeStop + +#### Signature + +```java +public Map transcribeStop( + String callId, + Map params +) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 174. + +*** + +### transfer + +#### Signature + +```java +public Map transfer(String callId, Map params) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 66. + +*** + +### update + +#### Signature + +```java +public Map update(Map params) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 58. + +*** + +### userEvent + +#### Signature + +```java +public Map userEvent(String callId, Map params) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 224. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CallingNamespace.java) + +Line 24. diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/campaign-namespace/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/campaign-namespace/index.mdx new file mode 100644 index 0000000000..90412921a0 --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/campaign-namespace/index.mdx @@ -0,0 +1,130 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/campaign-namespace" +title: "CampaignNamespace" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.CampaignNamespace" + parent: "com.signalwire.sdk.rest.namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CampaignNamespace.java" + visibility: "public" +--- +# `CampaignNamespace` + +REST namespace for 10DLC campaign registration resources. + +## Signature + +```java +public class CampaignNamespace +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CampaignNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CampaignNamespace.java) + +Line 22. + +*** + +### assignments + +#### Signature + +```java +public CrudResource assignments() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CampaignNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CampaignNamespace.java) + +Line 32. + +*** + +### brands + +#### Signature + +```java +public CrudResource brands() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CampaignNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CampaignNamespace.java) + +Line 29. + +*** + +### campaigns + +#### Signature + +```java +public CrudResource campaigns() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CampaignNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CampaignNamespace.java) + +Line 30. + +*** + +### orders + +#### Signature + +```java +public CrudResource orders() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CampaignNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CampaignNamespace.java) + +Line 31. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CampaignNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CampaignNamespace.java) + +Line 15. diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/chat-namespace/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/chat-namespace/index.mdx new file mode 100644 index 0000000000..e48e91b6d8 --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/chat-namespace/index.mdx @@ -0,0 +1,110 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/chat-namespace" +title: "ChatNamespace" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.ChatNamespace" + parent: "com.signalwire.sdk.rest.namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ChatNamespace.java" + visibility: "public" +--- +# `ChatNamespace` + +REST namespace for chat resources. + +## Signature + +```java +public class ChatNamespace +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ChatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ChatNamespace.java) + +Line 21. + +*** + +### channels + +#### Signature + +```java +public CrudResource channels() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ChatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ChatNamespace.java) + +Line 27. + +*** + +### members + +#### Signature + +```java +public CrudResource members() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ChatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ChatNamespace.java) + +Line 29. + +*** + +### messages + +#### Signature + +```java +public CrudResource messages() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ChatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ChatNamespace.java) + +Line 28. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ChatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ChatNamespace.java) + +Line 15. diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-accounts/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-accounts/index.mdx new file mode 100644 index 0000000000..60ff87f05a --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-accounts/index.mdx @@ -0,0 +1,191 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/compat-namespace/compat-accounts" +title: "CompatAccounts" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.CompatNamespace.CompatAccounts" + parent: "rest.namespaces.namespaces.CompatNamespace" + module: "rest.namespaces.namespaces.CompatNamespace" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java" + visibility: "public" +--- +# `CompatAccounts` + +Compat account / sub-project management. + +<p>Mirrors `signalwire.rest.namespaces.compat.CompatAccounts`: +accounts.create lives at the top-level `/Accounts` collection +(no AccountSid prefix); accounts.get/update operate on +`/Accounts/{sid`}. + +update is a Twilio-compat POST (not PATCH/PUT). + +**Modifiers:** `static` + +## Signature + +```java +public static class CompatAccounts +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 333. + +*** + +### create + +#### Signature + +```java +public Map create(Map body) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 347. + +*** + +### get + +#### Signature + +```java +public Map get(String sid) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 351. + +*** + +### getBasePath + +#### Signature + +```java +public String getBasePath() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 337. + +*** + +### list + +#### Signature + + + + ```java + public Map list() + ``` + + + + ```java + public Map list(Map queryParams) + ``` + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 339. + +*** + +### update + +#### Signature + +```java +public Map update(String sid, Map body) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 355. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 328. diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-applications/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-applications/index.mdx new file mode 100644 index 0000000000..88f91b4c4c --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-applications/index.mdx @@ -0,0 +1,88 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/compat-namespace/compat-applications" +title: "CompatApplications" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.CompatNamespace.CompatApplications" + parent: "rest.namespaces.namespaces.CompatNamespace" + module: "rest.namespaces.namespaces.CompatNamespace" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java" + visibility: "public" +--- +# `CompatApplications` + +Compat application management. + +Twilio-compat update is POST. + +**Modifiers:** `static` + +## Signature + +```java +public static class CompatApplications extends CrudResource +``` + +## Inheritance + +**Extends:** [CrudResource](/docs/sdk-reference/reference/java/rest/rest/crud-resource) + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient, String basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 464. + +*** + +### update + +**Decorators:** `@Override` + +#### Signature + +```java +public Map update(String sid, Map body) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 468. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 462. diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-calls/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-calls/index.mdx new file mode 100644 index 0000000000..fec2b61c74 --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-calls/index.mdx @@ -0,0 +1,203 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/compat-namespace/compat-calls" +title: "CompatCalls" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.CompatNamespace.CompatCalls" + parent: "rest.namespaces.namespaces.CompatNamespace" + module: "rest.namespaces.namespaces.CompatNamespace" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java" + visibility: "public" +--- +# `CompatCalls` + +Compat call management with recording and stream sub-resources. + +**Modifiers:** `static` + +## Signature + +```java +public static class CompatCalls extends CrudResource +``` + +## Inheritance + +**Extends:** [CrudResource](/docs/sdk-reference/reference/java/rest/rest/crud-resource) + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient, String basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 93. + +*** + +### startRecording + +#### Signature + +```java +public Map startRecording( + String callSid, + Map body +) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 101. + +*** + +### startStream + +#### Signature + +```java +public Map startStream(String callSid, Map body) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 111. + +*** + +### stopStream + +#### Signature + +```java +public Map stopStream( + String callSid, + String streamSid, + Map body +) +``` + +#### Parameters + + + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 115. + +*** + +### update + +#### Signature + +```java +public Map update(String sid, Map body) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 97. + +*** + +### updateRecording + +#### Signature + +```java +public Map updateRecording( + String callSid, + String recordingSid, + Map body +) +``` + +#### Parameters + + + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 105. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 91. diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-conferences/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-conferences/index.mdx new file mode 100644 index 0000000000..0de5937789 --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-conferences/index.mdx @@ -0,0 +1,495 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/compat-namespace/compat-conferences" +title: "CompatConferences" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.CompatNamespace.CompatConferences" + parent: "rest.namespaces.namespaces.CompatNamespace" + module: "rest.namespaces.namespaces.CompatNamespace" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java" + visibility: "public" +--- +# `CompatConferences` + +Compat conference management with participants, recordings, and +stream sub-resources. + +**Modifiers:** `static` + +## Signature + +```java +public static class CompatConferences +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient, String basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 369. + +*** + +### deleteRecording + +#### Signature + +```java +public Map deleteRecording( + String conferenceSid, + String recordingSid +) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 441. + +*** + +### get + +#### Signature + +```java +public Map get(String sid) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 384. + +*** + +### getBasePath + +#### Signature + +```java +public String getBasePath() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 374. + +*** + +### getParticipant + +#### Signature + +```java +public Map getParticipant(String conferenceSid, String callSid) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 403. + +*** + +### getRecording + +#### Signature + +```java +public Map getRecording( + String conferenceSid, + String recordingSid +) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 430. + +*** + +### list + +#### Signature + + + + ```java + public Map list() + ``` + + + + ```java + public Map list(Map queryParams) + ``` + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 376. + +*** + +### listParticipants + +#### Signature + + + + ```java + public Map listParticipants(String conferenceSid) + ``` + + + + ```java + public Map listParticipants( + String conferenceSid, + Map queryParams + ) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 394. + +*** + +### listRecordings + +#### Signature + + + + ```java + public Map listRecordings(String conferenceSid) + ``` + + + + ```java + public Map listRecordings( + String conferenceSid, + Map queryParams + ) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 421. + +*** + +### removeParticipant + +#### Signature + +```java +public Map removeParticipant( + String conferenceSid, + String callSid +) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 414. + +*** + +### startStream + +#### Signature + +```java +public Map startStream( + String conferenceSid, + Map body +) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 448. + +*** + +### stopStream + +#### Signature + +```java +public Map stopStream( + String conferenceSid, + String streamSid, + Map body +) +``` + +#### Parameters + + + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 452. + +*** + +### update + +#### Signature + +```java +public Map update(String sid, Map body) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 388. + +*** + +### updateParticipant + +#### Signature + +```java +public Map updateParticipant( + String conferenceSid, + String callSid, + Map body +) +``` + +#### Parameters + + + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 408. + +*** + +### updateRecording + +#### Signature + +```java +public Map updateRecording( + String conferenceSid, + String recordingSid, + Map body +) +``` + +#### Parameters + + + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 435. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 364. diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-faxes/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-faxes/index.mdx new file mode 100644 index 0000000000..d0d9ea29ee --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-faxes/index.mdx @@ -0,0 +1,183 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/compat-namespace/compat-faxes" +title: "CompatFaxes" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.CompatNamespace.CompatFaxes" + parent: "rest.namespaces.namespaces.CompatNamespace" + module: "rest.namespaces.namespaces.CompatNamespace" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java" + visibility: "public" +--- +# `CompatFaxes` + +Compat fax management with media sub-resources. + +**Modifiers:** `static` + +## Signature + +```java +public static class CompatFaxes extends CrudResource +``` + +## Inheritance + +**Extends:** [CrudResource](/docs/sdk-reference/reference/java/rest/rest/crud-resource) + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient, String basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 157. + +*** + +### deleteMedia + +#### Signature + +```java +public Map deleteMedia(String faxSid, String mediaSid) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 177. + +*** + +### getMedia + +#### Signature + +```java +public Map getMedia(String faxSid, String mediaSid) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 173. + +*** + +### listMedia + +#### Signature + + + + ```java + public Map listMedia(String faxSid) + ``` + + + + ```java + public Map listMedia( + String faxSid, + Map queryParams + ) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 165. + +*** + +### update + +#### Signature + +```java +public Map update(String sid, Map body) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 161. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 155. diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-laml-bins/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-laml-bins/index.mdx new file mode 100644 index 0000000000..9759528819 --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-laml-bins/index.mdx @@ -0,0 +1,88 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/compat-namespace/compat-laml-bins" +title: "CompatLamlBins" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.CompatNamespace.CompatLamlBins" + parent: "rest.namespaces.namespaces.CompatNamespace" + module: "rest.namespaces.namespaces.CompatNamespace" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java" + visibility: "public" +--- +# `CompatLamlBins` + +Compat cXML/LaML script bin management. + +Twilio-compat update is POST. + +**Modifiers:** `static` + +## Signature + +```java +public static class CompatLamlBins extends CrudResource +``` + +## Inheritance + +**Extends:** [CrudResource](/docs/sdk-reference/reference/java/rest/rest/crud-resource) + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient, String basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 479. + +*** + +### update + +**Decorators:** `@Override` + +#### Signature + +```java +public Map update(String sid, Map body) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 483. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 477. diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-messages/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-messages/index.mdx new file mode 100644 index 0000000000..a929544e17 --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-messages/index.mdx @@ -0,0 +1,183 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/compat-namespace/compat-messages" +title: "CompatMessages" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.CompatNamespace.CompatMessages" + parent: "rest.namespaces.namespaces.CompatNamespace" + module: "rest.namespaces.namespaces.CompatNamespace" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java" + visibility: "public" +--- +# `CompatMessages` + +Compat message management with media sub-resources. + +**Modifiers:** `static` + +## Signature + +```java +public static class CompatMessages extends CrudResource +``` + +## Inheritance + +**Extends:** [CrudResource](/docs/sdk-reference/reference/java/rest/rest/crud-resource) + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient, String basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 127. + +*** + +### deleteMedia + +#### Signature + +```java +public Map deleteMedia(String messageSid, String mediaSid) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 147. + +*** + +### getMedia + +#### Signature + +```java +public Map getMedia(String messageSid, String mediaSid) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 143. + +*** + +### listMedia + +#### Signature + + + + ```java + public Map listMedia(String messageSid) + ``` + + + + ```java + public Map listMedia( + String messageSid, + Map queryParams + ) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 135. + +*** + +### update + +#### Signature + +```java +public Map update(String sid, Map body) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 131. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 125. diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-phone-numbers/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-phone-numbers/index.mdx new file mode 100644 index 0000000000..030dd67001 --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-phone-numbers/index.mdx @@ -0,0 +1,366 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/compat-namespace/compat-phone-numbers" +title: "CompatPhoneNumbers" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.CompatNamespace.CompatPhoneNumbers" + parent: "rest.namespaces.namespaces.CompatNamespace" + module: "rest.namespaces.namespaces.CompatNamespace" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java" + visibility: "public" +--- +# `CompatPhoneNumbers` + +Compat IncomingPhoneNumbers + AvailablePhoneNumbers management. + +**Modifiers:** `static` + +## Signature + +```java +public static class CompatPhoneNumbers +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient, String basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 192. + +*** + +### delete + +#### Signature + +```java +public Map delete(String sid) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 219. + +*** + +### get + +#### Signature + +```java +public Map get(String sid) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 211. + +*** + +### getBasePath + +#### Signature + +```java +public String getBasePath() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 201. + +*** + +### importNumber + +#### Signature + +```java +public Map importNumber(Map body) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 227. + +*** + +### list + +#### Signature + + + + ```java + public Map list() + ``` + + + + ```java + public Map list(Map queryParams) + ``` + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 203. + +*** + +### listAvailableCountries + +#### Signature + + + + ```java + public Map listAvailableCountries() + ``` + + + + ```java + public Map listAvailableCountries(Map queryParams) + ``` + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 231. + +*** + +### purchase + +#### Signature + +```java +public Map purchase(Map body) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 223. + +*** + +### searchLocal + +#### Signature + + + + ```java + public Map searchLocal(String country) + ``` + + + + ```java + public Map searchLocal( + String country, + Map queryParams + ) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 239. + +*** + +### searchTollFree + +#### Signature + + + + ```java + public Map searchTollFree(String country) + ``` + + + + ```java + public Map searchTollFree( + String country, + Map queryParams + ) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 247. + +*** + +### update + +#### Signature + +```java +public Map update(String sid, Map body) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 215. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 185. diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-queues/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-queues/index.mdx new file mode 100644 index 0000000000..57caacb281 --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-queues/index.mdx @@ -0,0 +1,191 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/compat-namespace/compat-queues" +title: "CompatQueues" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.CompatNamespace.CompatQueues" + parent: "rest.namespaces.namespaces.CompatNamespace" + module: "rest.namespaces.namespaces.CompatNamespace" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java" + visibility: "public" +--- +# `CompatQueues` + +Compat queue management with member operations. + +**Modifiers:** `static` + +## Signature + +```java +public static class CompatQueues extends CrudResource +``` + +## Inheritance + +**Extends:** [CrudResource](/docs/sdk-reference/reference/java/rest/rest/crud-resource) + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient, String basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 494. + +*** + +### dequeueMember + +#### Signature + +```java +public Map dequeueMember( + String queueSid, + String callSid, + Map body +) +``` + +#### Parameters + + + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 515. + +*** + +### getMember + +#### Signature + +```java +public Map getMember(String queueSid, String callSid) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 511. + +*** + +### listMembers + +#### Signature + + + + ```java + public Map listMembers(String queueSid) + ``` + + + + ```java + public Map listMembers( + String queueSid, + Map queryParams + ) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 503. + +*** + +### update + +**Decorators:** `@Override` + +#### Signature + +```java +public Map update(String sid, Map body) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 498. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 492. diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-recordings/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-recordings/index.mdx new file mode 100644 index 0000000000..8c597add9b --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-recordings/index.mdx @@ -0,0 +1,160 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/compat-namespace/compat-recordings" +title: "CompatRecordings" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.CompatNamespace.CompatRecordings" + parent: "rest.namespaces.namespaces.CompatNamespace" + module: "rest.namespaces.namespaces.CompatNamespace" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java" + visibility: "public" +--- +# `CompatRecordings` + +Compat recording management. + +**Modifiers:** `static` + +## Signature + +```java +public static class CompatRecordings +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient, String basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 264. + +*** + +### delete + +#### Signature + +```java +public Map delete(String sid) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 283. + +*** + +### get + +#### Signature + +```java +public Map get(String sid) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 279. + +*** + +### getBasePath + +#### Signature + +```java +public String getBasePath() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 269. + +*** + +### list + +#### Signature + + + + ```java + public Map list() + ``` + + + + ```java + public Map list(Map queryParams) + ``` + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 271. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 259. diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-tokens/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-tokens/index.mdx new file mode 100644 index 0000000000..4cf720a7e7 --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-tokens/index.mdx @@ -0,0 +1,151 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/compat-namespace/compat-tokens" +title: "CompatTokens" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.CompatNamespace.CompatTokens" + parent: "rest.namespaces.namespaces.CompatNamespace" + module: "rest.namespaces.namespaces.CompatNamespace" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java" + visibility: "public" +--- +# `CompatTokens` + +Compat API token management. + +Note: update is PATCH (BaseResource style), +not POST. + +**Modifiers:** `static` + +## Signature + +```java +public static class CompatTokens +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient, String basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 531. + +*** + +### create + +#### Signature + +```java +public Map create(Map body) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 538. + +*** + +### delete + +#### Signature + +```java +public Map delete(String tokenId) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 546. + +*** + +### getBasePath + +#### Signature + +```java +public String getBasePath() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 536. + +*** + +### update + +#### Signature + +```java +public Map update(String tokenId, Map body) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 542. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 526. diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-transcriptions/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-transcriptions/index.mdx new file mode 100644 index 0000000000..fb30b12133 --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-transcriptions/index.mdx @@ -0,0 +1,160 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/compat-namespace/compat-transcriptions" +title: "CompatTranscriptions" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.CompatNamespace.CompatTranscriptions" + parent: "rest.namespaces.namespaces.CompatNamespace" + module: "rest.namespaces.namespaces.CompatNamespace" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java" + visibility: "public" +--- +# `CompatTranscriptions` + +Compat transcription management. + +**Modifiers:** `static` + +## Signature + +```java +public static class CompatTranscriptions +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient, String basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 296. + +*** + +### delete + +#### Signature + +```java +public Map delete(String sid) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 315. + +*** + +### get + +#### Signature + +```java +public Map get(String sid) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 311. + +*** + +### getBasePath + +#### Signature + +```java +public String getBasePath() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 301. + +*** + +### list + +#### Signature + + + + ```java + public Map list() + ``` + + + + ```java + public Map list(Map queryParams) + ``` + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 303. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 291. diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/index.mdx new file mode 100644 index 0000000000..19377a89a9 --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/index.mdx @@ -0,0 +1,359 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/compat-namespace" +title: "CompatNamespace" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.CompatNamespace" + parent: "com.signalwire.sdk.rest.namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java" + visibility: "public" +--- +# `CompatNamespace` + +REST namespace for compatibility (CXML/Twilio-compatible) resources. + +<p>The Twilio-compatible LAML API is mounted under +`/api/laml/2010-04-01/Accounts/{AccountSid`}. + +The trailing +`/api` prefix is added by `HttpClient`, so namespace base +paths here begin with `/laml/2010-04-01/Accounts/...`. + +## Signature + +```java +public class CompatNamespace +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient, String accountSid) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 44. + +*** + +### accounts + +#### Signature + +```java +public CompatAccounts accounts() +``` + +#### Returns + +`CompatAccounts` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 74. + +*** + +### applications + +#### Signature + +```java +public CompatApplications applications() +``` + +#### Returns + +`CompatApplications` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 77. + +*** + +### calls + +#### Signature + +```java +public CompatCalls calls() +``` + +#### Returns + +`CompatCalls` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 68. + +*** + +### conferences + +#### Signature + +```java +public CompatConferences conferences() +``` + +#### Returns + +`CompatConferences` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 76. + +*** + +### faxes + +#### Signature + +```java +public CompatFaxes faxes() +``` + +#### Returns + +`CompatFaxes` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 70. + +*** + +### lamlBins + +#### Signature + +```java +public CompatLamlBins lamlBins() +``` + +#### Returns + +`CompatLamlBins` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 78. + +*** + +### messages + +#### Signature + +```java +public CompatMessages messages() +``` + +#### Returns + +`CompatMessages` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 69. + +*** + +### phoneNumbers + +#### Signature + +```java +public CompatPhoneNumbers phoneNumbers() +``` + +#### Returns + +`CompatPhoneNumbers` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 71. + +*** + +### queues + +#### Signature + +```java +public CompatQueues queues() +``` + +#### Returns + +`CompatQueues` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 75. + +*** + +### recordings + +#### Signature + +```java +public CompatRecordings recordings() +``` + +#### Returns + +`CompatRecordings` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 72. + +*** + +### sipCredentialLists + +#### Signature + +```java +public CrudResource sipCredentialLists() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 81. + +*** + +### sipDomains + +#### Signature + +```java +public CrudResource sipDomains() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 80. + +*** + +### sipIpAccessControlLists + +#### Signature + +```java +public CrudResource sipIpAccessControlLists() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 82. + +*** + +### tokens + +#### Signature + +```java +public CompatTokens tokens() +``` + +#### Returns + +`CompatTokens` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 79. + +*** + +### transcriptions + +#### Signature + +```java +public CompatTranscriptions transcriptions() +``` + +#### Returns + +`CompatTranscriptions` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 73. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java) + +Line 22. diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/index__2.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/index__2.mdx new file mode 100644 index 0000000000..3af6a5aa03 --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/index__2.mdx @@ -0,0 +1,66 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/compat-namespace/index__2" +title: "CompatNamespace" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "rest.namespaces.namespaces.CompatNamespace" + parent: "com.signalwire.sdk.rest.namespaces" + module: "rest.namespaces.namespaces" +--- +# `CompatNamespace` + +## Classes + + + + Compat account / sub-project management. <p>Mirrors `signalwire.rest.namespaces.compat.CompatAccounts`: accounts.create lives at the top-level `/Accounts` collection (no AccountSid prefix); accounts.get/update operate on `/Accounts/{sid`\}. + + + + Compat application management. + + + + Compat call management with recording and stream sub-resources. + + + + Compat conference management with participants, recordings, and stream sub-resources. + + + + Compat fax management with media sub-resources. + + + + Compat cXML/LaML script bin management. + + + + Compat message management with media sub-resources. + + + + Compat IncomingPhoneNumbers + AvailablePhoneNumbers management. + + + + Compat queue management with member operations. + + + + Compat recording management. + + + + Compat API token management. + + + + Compat transcription management. + + diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/compliance-namespace/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/compliance-namespace/index.mdx new file mode 100644 index 0000000000..a6d56d5860 --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/compliance-namespace/index.mdx @@ -0,0 +1,90 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/compliance-namespace" +title: "ComplianceNamespace" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.ComplianceNamespace" + parent: "com.signalwire.sdk.rest.namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ComplianceNamespace.java" + visibility: "public" +--- +# `ComplianceNamespace` + +REST namespace for compliance resources (CNAM, SHAKEN/STIR). + +## Signature + +```java +public class ComplianceNamespace +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ComplianceNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ComplianceNamespace.java) + +Line 20. + +*** + +### cnamRegistrations + +#### Signature + +```java +public CrudResource cnamRegistrations() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ComplianceNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ComplianceNamespace.java) + +Line 25. + +*** + +### shakenStir + +#### Signature + +```java +public CrudResource shakenStir() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ComplianceNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ComplianceNamespace.java) + +Line 26. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ComplianceNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ComplianceNamespace.java) + +Line 15. diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/conference-namespace/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/conference-namespace/index.mdx new file mode 100644 index 0000000000..d409b97708 --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/conference-namespace/index.mdx @@ -0,0 +1,90 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/conference-namespace" +title: "ConferenceNamespace" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.ConferenceNamespace" + parent: "com.signalwire.sdk.rest.namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ConferenceNamespace.java" + visibility: "public" +--- +# `ConferenceNamespace` + +REST namespace for conference resources. + +## Signature + +```java +public class ConferenceNamespace +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ConferenceNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ConferenceNamespace.java) + +Line 20. + +*** + +### conferences + +#### Signature + +```java +public CrudResource conferences() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ConferenceNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ConferenceNamespace.java) + +Line 25. + +*** + +### participants + +#### Signature + +```java +public CrudResource participants() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ConferenceNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ConferenceNamespace.java) + +Line 26. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ConferenceNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ConferenceNamespace.java) + +Line 15. diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/datasphere-namespace/datasphere-documents/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/datasphere-namespace/datasphere-documents/index.mdx new file mode 100644 index 0000000000..ebdd01c70a --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/datasphere-namespace/datasphere-documents/index.mdx @@ -0,0 +1,181 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/datasphere-namespace/datasphere-documents" +title: "DatasphereDocuments" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.DatasphereNamespace.DatasphereDocuments" + parent: "rest.namespaces.namespaces.DatasphereNamespace" + module: "rest.namespaces.namespaces.DatasphereNamespace" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/DatasphereNamespace.java" + visibility: "public" +--- +# `DatasphereDocuments` + +Document management with search and chunk operations. + +**Modifiers:** `static` + +## Signature + +```java +public static class DatasphereDocuments extends CrudResource +``` + +## Inheritance + +**Extends:** [CrudResource](/docs/sdk-reference/reference/java/rest/rest/crud-resource) + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient, String basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/DatasphereNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/DatasphereNamespace.java) + +Line 50. + +*** + +### deleteChunk + +#### Signature + +```java +public Map deleteChunk(String documentId, String chunkId) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/DatasphereNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/DatasphereNamespace.java) + +Line 70. + +*** + +### getChunk + +#### Signature + +```java +public Map getChunk(String documentId, String chunkId) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/DatasphereNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/DatasphereNamespace.java) + +Line 66. + +*** + +### listChunks + +#### Signature + + + + ```java + public Map listChunks(String documentId) + ``` + + + + ```java + public Map listChunks( + String documentId, + Map queryParams + ) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/DatasphereNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/DatasphereNamespace.java) + +Line 58. + +*** + +### search + +#### Signature + +```java +public Map search(Map body) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/DatasphereNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/DatasphereNamespace.java) + +Line 54. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/DatasphereNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/DatasphereNamespace.java) + +Line 48. diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/datasphere-namespace/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/datasphere-namespace/index.mdx new file mode 100644 index 0000000000..e1335aaaff --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/datasphere-namespace/index.mdx @@ -0,0 +1,101 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/datasphere-namespace" +title: "DatasphereNamespace" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.DatasphereNamespace" + parent: "com.signalwire.sdk.rest.namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/DatasphereNamespace.java" + visibility: "public" +--- +# `DatasphereNamespace` + +REST namespace for DataSphere (knowledge base) resources. + +<p>Mirrors `signalwire.rest.namespaces.datasphere.DatasphereNamespace`: +documents are CRUD-shaped, plus `search` (POST) and chunk-level +operations. + +## Signature + +```java +public class DatasphereNamespace +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/DatasphereNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/DatasphereNamespace.java) + +Line 26. + +*** + +### documents + +#### Signature + +```java +public DatasphereDocuments documents() +``` + +#### Returns + +`DatasphereDocuments` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/DatasphereNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/DatasphereNamespace.java) + +Line 31. + +*** + +### search + +Legacy convenience for knowledge-base search; the canonical entry point +is `DatasphereDocuments#search(Map)`. + +#### Signature + +```java +public Map search(Map body) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/DatasphereNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/DatasphereNamespace.java) + +Line 37. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/DatasphereNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/DatasphereNamespace.java) + +Line 21. diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/datasphere-namespace/index__2.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/datasphere-namespace/index__2.mdx new file mode 100644 index 0000000000..1e8eebe2a7 --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/datasphere-namespace/index__2.mdx @@ -0,0 +1,22 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/datasphere-namespace/index__2" +title: "DatasphereNamespace" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "rest.namespaces.namespaces.DatasphereNamespace" + parent: "com.signalwire.sdk.rest.namespaces" + module: "rest.namespaces.namespaces" +--- +# `DatasphereNamespace` + +## Classes + + + + Document management with search and chunk operations. + + diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/call-flows-resource/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/call-flows-resource/index.mdx new file mode 100644 index 0000000000..8882a9216a --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/call-flows-resource/index.mdx @@ -0,0 +1,211 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/fabric-namespace/call-flows-resource" +title: "CallFlowsResource" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.FabricNamespace.CallFlowsResource" + parent: "rest.namespaces.namespaces.FabricNamespace" + module: "rest.namespaces.namespaces.FabricNamespace" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java" + visibility: "public" +--- +# `CallFlowsResource` + +Call flows resource — uses PUT for update and rewrites the path +segment to singular `call_flow` for sub-collection paths +(per the API spec). + +**Modifiers:** `static` + +## Signature + +```java +public static class CallFlowsResource extends CrudResource +``` + +## Inheritance + +**Extends:** [CrudResource](/docs/sdk-reference/reference/java/rest/rest/crud-resource) + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient, String basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 177. + +*** + +### deployVersion + +#### Signature + +```java +public Map deployVersion( + String resourceId, + Map body +) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 208. + +*** + +### listAddresses + +#### Signature + + + + ```java + public Map listAddresses(String resourceId) + ``` + + + + ```java + public Map listAddresses( + String resourceId, + Map queryParams + ) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 190. + +*** + +### listVersions + +#### Signature + + + + ```java + public Map listVersions(String resourceId) + ``` + + + + ```java + public Map listVersions( + String resourceId, + Map queryParams + ) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 199. + +*** + +### update + +**Decorators:** `@Override` + +#### Signature + +```java +public Map update(String resourceId, Map body) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 181. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 175. diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/conference-rooms-resource/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/conference-rooms-resource/index.mdx new file mode 100644 index 0000000000..23d43a5056 --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/conference-rooms-resource/index.mdx @@ -0,0 +1,133 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/fabric-namespace/conference-rooms-resource" +title: "ConferenceRoomsResource" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.FabricNamespace.ConferenceRoomsResource" + parent: "rest.namespaces.namespaces.FabricNamespace" + module: "rest.namespaces.namespaces.FabricNamespace" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java" + visibility: "public" +--- +# `ConferenceRoomsResource` + +Conference rooms — singular `conference_room` for sub-collections. + +**Modifiers:** `static` + +## Signature + +```java +public static class ConferenceRoomsResource extends CrudResource +``` + +## Inheritance + +**Extends:** [CrudResource](/docs/sdk-reference/reference/java/rest/rest/crud-resource) + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient, String basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 218. + +*** + +### listAddresses + +#### Signature + + + + ```java + public Map listAddresses(String resourceId) + ``` + + + + ```java + public Map listAddresses( + String resourceId, + Map queryParams + ) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 231. + +*** + +### update + +**Decorators:** `@Override` + +#### Signature + +```java +public Map update(String resourceId, Map body) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 222. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 216. diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/cxml-applications-resource/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/cxml-applications-resource/index.mdx new file mode 100644 index 0000000000..ca34c1707b --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/cxml-applications-resource/index.mdx @@ -0,0 +1,113 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/fabric-namespace/cxml-applications-resource" +title: "CxmlApplicationsResource" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.FabricNamespace.CxmlApplicationsResource" + parent: "rest.namespaces.namespaces.FabricNamespace" + module: "rest.namespaces.namespaces.FabricNamespace" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java" + visibility: "public" +--- +# `CxmlApplicationsResource` + +cXML applications — read/update/delete only (no create endpoint exists). +Calling `create` raises `UnsupportedOperationException`. + +**Modifiers:** `static` + +## Signature + +```java +public static class CxmlApplicationsResource extends CrudResource +``` + +## Inheritance + +**Extends:** [CrudResource](/docs/sdk-reference/reference/java/rest/rest/crud-resource) + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient, String basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 247. + +*** + +### create + +**Decorators:** `@Override` + +#### Signature + +```java +public Map create(Map body) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 251. + +*** + +### update + +**Decorators:** `@Override` + +#### Signature + +```java +public Map update(String resourceId, Map body) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 257. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 245. diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/fabric-addresses/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/fabric-addresses/index.mdx new file mode 100644 index 0000000000..406f9ad7de --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/fabric-addresses/index.mdx @@ -0,0 +1,136 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/fabric-namespace/fabric-addresses" +title: "FabricAddresses" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.FabricNamespace.FabricAddresses" + parent: "rest.namespaces.namespaces.FabricNamespace" + module: "rest.namespaces.namespaces.FabricNamespace" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java" + visibility: "public" +--- +# `FabricAddresses` + +Read-only fabric addresses collection (top-level). + +**Modifiers:** `static` + +## Signature + +```java +public static class FabricAddresses +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient, String basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 96. + +*** + +### get + +#### Signature + +```java +public Map get(String addressId) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 111. + +*** + +### getBasePath + +#### Signature + +```java +public String getBasePath() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 101. + +*** + +### list + +#### Signature + + + + ```java + public Map list() + ``` + + + + ```java + public Map list(Map queryParams) + ``` + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 103. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 91. diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/fabric-subscribers/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/fabric-subscribers/index.mdx new file mode 100644 index 0000000000..5d2c655092 --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/fabric-subscribers/index.mdx @@ -0,0 +1,298 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/fabric-namespace/fabric-subscribers" +title: "FabricSubscribers" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.FabricNamespace.FabricSubscribers" + parent: "rest.namespaces.namespaces.FabricNamespace" + module: "rest.namespaces.namespaces.FabricNamespace" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java" + visibility: "public" +--- +# `FabricSubscribers` + +Subscribers resource with SIP-endpoint sub-resource. + +Update uses PUT. + +**Modifiers:** `static` + +## Signature + +```java +public static class FabricSubscribers extends CrudResource +``` + +## Inheritance + +**Extends:** [CrudResource](/docs/sdk-reference/reference/java/rest/rest/crud-resource) + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient, String basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 121. + +*** + +### createSipEndpoint + +#### Signature + +```java +public Map createSipEndpoint( + String subscriberId, + Map body +) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 139. + +*** + +### deleteSipEndpoint + +#### Signature + +```java +public Map deleteSipEndpoint( + String subscriberId, + String endpointId +) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 155. + +*** + +### getSipEndpoint + +#### Signature + +```java +public Map getSipEndpoint(String subscriberId, String endpointId) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 144. + +*** + +### listAddresses + +#### Signature + + + + ```java + public Map listAddresses(String subscriberId) + ``` + + + + ```java + public Map listAddresses( + String subscriberId, + Map queryParams + ) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 160. + +*** + +### listSipEndpoints + +#### Signature + + + + ```java + public Map listSipEndpoints(String subscriberId) + ``` + + + + ```java + public Map listSipEndpoints( + String subscriberId, + Map queryParams + ) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 130. + +*** + +### update + +**Decorators:** `@Override` + +#### Signature + +```java +public Map update(String resourceId, Map body) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 125. + +*** + +### updateSipEndpoint + +#### Signature + +```java +public Map updateSipEndpoint( + String subscriberId, + String endpointId, + Map body +) +``` + +#### Parameters + + + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 149. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 119. diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/fabric-tokens/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/fabric-tokens/index.mdx new file mode 100644 index 0000000000..b8e236395e --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/fabric-tokens/index.mdx @@ -0,0 +1,172 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/fabric-namespace/fabric-tokens" +title: "FabricTokens" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.FabricNamespace.FabricTokens" + parent: "rest.namespaces.namespaces.FabricNamespace" + module: "rest.namespaces.namespaces.FabricNamespace" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java" + visibility: "public" +--- +# `FabricTokens` + +Subscriber, guest, invite, and embed token endpoints (all POST). + +**Modifiers:** `static` + +## Signature + +```java +public static class FabricTokens +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 316. + +*** + +### createEmbedToken + +#### Signature + +```java +public Map createEmbedToken(Map body) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 336. + +*** + +### createGuestToken + +#### Signature + +```java +public Map createGuestToken(Map body) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 332. + +*** + +### createInviteToken + +#### Signature + +```java +public Map createInviteToken(Map body) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 328. + +*** + +### createSubscriberToken + +#### Signature + +```java +public Map createSubscriberToken(Map body) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 320. + +*** + +### refreshSubscriberToken + +#### Signature + +```java +public Map refreshSubscriberToken(Map body) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 324. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 312. diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/generic-resources/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/generic-resources/index.mdx new file mode 100644 index 0000000000..d85a7f4870 --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/generic-resources/index.mdx @@ -0,0 +1,237 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/fabric-namespace/generic-resources" +title: "GenericResources" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.FabricNamespace.GenericResources" + parent: "rest.namespaces.namespaces.FabricNamespace" + module: "rest.namespaces.namespaces.FabricNamespace" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java" + visibility: "public" +--- +# `GenericResources` + +Generic operations against `/api/fabric/resources`: list, get, +delete, plus address listing and domain-application assignment. + +**Modifiers:** `static` + +## Signature + +```java +public static class GenericResources +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient, String basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 272. + +*** + +### assignDomainApplication + +#### Signature + +```java +public Map assignDomainApplication( + String resourceId, + Map body +) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 303. + +*** + +### delete + +#### Signature + +```java +public Map delete(String resourceId) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 291. + +*** + +### get + +#### Signature + +```java +public Map get(String resourceId) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 287. + +*** + +### getBasePath + +#### Signature + +```java +public String getBasePath() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 277. + +*** + +### list + +#### Signature + + + + ```java + public Map list() + ``` + + + + ```java + public Map list(Map queryParams) + ``` + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 279. + +*** + +### listAddresses + +#### Signature + + + + ```java + public Map listAddresses(String resourceId) + ``` + + + + ```java + public Map listAddresses( + String resourceId, + Map queryParams + ) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 295. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 267. diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/index.mdx new file mode 100644 index 0000000000..ae9f1e9660 --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/index.mdx @@ -0,0 +1,379 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/fabric-namespace" +title: "FabricNamespace" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.FabricNamespace" + parent: "com.signalwire.sdk.rest.namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java" + visibility: "public" +--- +# `FabricNamespace` + +REST namespace for SignalWire Fabric resources. + +<p>Mirrors `signalwire.rest.namespaces.fabric.FabricNamespace`: the +sub-resources expose typed access to addresses, generic resources, +subscribers (with sip-endpoint sub-resource ops), call-flow / conference-room +address sub-paths, cxml-applications (read-only), and tokens. + +The +`resources` entry-point handles cross-resource list/get/delete plus +domain-application assignment. + +## Signature + +```java +public class FabricNamespace +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 43. + +*** + +### addresses + +#### Signature + +```java +public FabricAddresses addresses() +``` + +#### Returns + +`FabricAddresses` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 68. + +*** + +### aiAgents + +#### Signature + +```java +public CrudResource aiAgents() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 70. + +*** + +### callFlows + +#### Signature + +```java +public CallFlowsResource callFlows() +``` + +#### Returns + +`CallFlowsResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 71. + +*** + +### conferenceRooms + +#### Signature + +```java +public ConferenceRoomsResource conferenceRooms() +``` + +#### Returns + +`ConferenceRoomsResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 72. + +*** + +### cxmlApplications + +#### Signature + +```java +public CxmlApplicationsResource cxmlApplications() +``` + +#### Returns + +`CxmlApplicationsResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 73. + +*** + +### cxmlScripts + +#### Signature + +```java +public CrudResource cxmlScripts() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 74. + +*** + +### cxmlWebhooks + +#### Signature + +```java +public CrudResource cxmlWebhooks() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 75. + +*** + +### freeswitchConnectors + +#### Signature + +```java +public CrudResource freeswitchConnectors() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 76. + +*** + +### relayApplications + +#### Signature + +```java +public CrudResource relayApplications() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 77. + +*** + +### resources + +#### Signature + +```java +public GenericResources resources() +``` + +#### Returns + +`GenericResources` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 69. + +*** + +### sipEndpoints + +#### Signature + +```java +public CrudResource sipEndpoints() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 78. + +*** + +### sipGateways + +#### Signature + +```java +public CrudResource sipGateways() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 79. + +*** + +### subscribers + +#### Signature + +```java +public FabricSubscribers subscribers() +``` + +#### Returns + +`FabricSubscribers` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 67. + +*** + +### swmlScripts + +#### Signature + +```java +public CrudResource swmlScripts() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 80. + +*** + +### swmlWebhooks + +#### Signature + +```java +public CrudResource swmlWebhooks() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 81. + +*** + +### tokens + +#### Signature + +```java +public FabricTokens tokens() +``` + +#### Returns + +`FabricTokens` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 82. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java) + +Line 24. diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/index__2.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/index__2.mdx new file mode 100644 index 0000000000..08f5a97478 --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/index__2.mdx @@ -0,0 +1,46 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/fabric-namespace/index__2" +title: "FabricNamespace" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "rest.namespaces.namespaces.FabricNamespace" + parent: "com.signalwire.sdk.rest.namespaces" + module: "rest.namespaces.namespaces" +--- +# `FabricNamespace` + +## Classes + + + + Call flows resource — uses PUT for update and rewrites the path segment to singular `call_flow` for sub-collection paths (per the API spec). + + + + Conference rooms — singular `conference_room` for sub-collections. + + + + cXML applications — read/update/delete only (no create endpoint exists). Calling `create` raises `UnsupportedOperationException`. + + + + Read-only fabric addresses collection (top-level). + + + + Subscribers resource with SIP-endpoint sub-resource. + + + + Subscriber, guest, invite, and embed token endpoints (all POST). + + + + Generic operations against `/api/fabric/resources`: list, get, delete, plus address listing and domain-application assignment. + + diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/fax-namespace/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/fax-namespace/index.mdx new file mode 100644 index 0000000000..efef10614c --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/fax-namespace/index.mdx @@ -0,0 +1,70 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/fax-namespace" +title: "FaxNamespace" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.FaxNamespace" + parent: "com.signalwire.sdk.rest.namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FaxNamespace.java" + visibility: "public" +--- +# `FaxNamespace` + +REST namespace for fax resources. + +## Signature + +```java +public class FaxNamespace +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FaxNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FaxNamespace.java) + +Line 19. + +*** + +### faxes + +#### Signature + +```java +public CrudResource faxes() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FaxNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FaxNamespace.java) + +Line 23. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/FaxNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FaxNamespace.java) + +Line 15. diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/imported-numbers-namespace/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/imported-numbers-namespace/index.mdx new file mode 100644 index 0000000000..edd425bcd0 --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/imported-numbers-namespace/index.mdx @@ -0,0 +1,97 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/imported-numbers-namespace" +title: "ImportedNumbersNamespace" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.ImportedNumbersNamespace" + parent: "com.signalwire.sdk.rest.namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ImportedNumbersNamespace.java" + visibility: "public" +--- +# `ImportedNumbersNamespace` + +Imported Phone Numbers namespace — create-only. + +<p>Mirrors +`signalwire.rest.namespaces.imported_numbers.ImportedNumbersResource`. + +## Signature + +```java +public class ImportedNumbersNamespace +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ImportedNumbersNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ImportedNumbersNamespace.java) + +Line 24. + +*** + +### create + +#### Signature + +```java +public Map create(Map body) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ImportedNumbersNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ImportedNumbersNamespace.java) + +Line 30. + +*** + +### getBasePath + +#### Signature + +```java +public String getBasePath() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ImportedNumbersNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ImportedNumbersNamespace.java) + +Line 28. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ImportedNumbersNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ImportedNumbersNamespace.java) + +Line 19. diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/index.mdx new file mode 100644 index 0000000000..f934123a77 --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/index.mdx @@ -0,0 +1,162 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces" +title: "namespaces" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces" + parent: "rest.namespaces" + module: "rest.namespaces" +--- +# `namespaces` + +## Signature + +```java +package com.signalwire.sdk.rest.namespaces +``` + +## Classes + + + + Address management namespace. <p>Mirrors `signalwire.rest.namespaces.addresses.AddressesResource`: list / create / get / delete (no update endpoint exists for addresses). Paths sit under `/api/relay/rest/addresses`. + + + + REST namespace for billing resources. + + + + REST-based call control. + + + + REST namespace for 10DLC campaign registration resources. + + + + REST namespace for chat resources. + + + + REST namespace for compatibility (CXML/Twilio-compatible) resources. <p>The Twilio-compatible LAML API is mounted under `/api/laml/2010-04-01/Accounts/{AccountSid`\}. + + + + REST namespace for compliance resources (CNAM, SHAKEN/STIR). + + + + REST namespace for conference resources. + + + + REST namespace for DataSphere (knowledge base) resources. <p>Mirrors `signalwire.rest.namespaces.datasphere.DatasphereNamespace`: documents are CRUD-shaped, plus `search` (POST) and chunk-level operations. + + + + REST namespace for SignalWire Fabric resources. <p>Mirrors `signalwire.rest.namespaces.fabric.FabricNamespace`: the sub-resources expose typed access to addresses, generic resources, subscribers (with sip-endpoint sub-resource ops), call-flow / conference-room address sub-paths, cxml-applications (read-only), and tokens. + + + + REST namespace for fax resources. + + + + Imported Phone Numbers namespace — create-only. <p>Mirrors `signalwire.rest.namespaces.imported_numbers.ImportedNumbersResource`. + + + + Logs namespace — message, voice, fax, and conference logs (read-only). <p>Mirrors `signalwire.rest.namespaces.logs.LogsNamespace`: each sub-resource fans out to a distinct sub-API root (message → /messaging/logs, voice → /voice/logs, fax → /fax/logs, conference → /logs/conferences). + + + + REST namespace for messaging (SMS/MMS) resources. + + + + MFA (Multi-Factor Authentication) namespace. <p>Mirrors `signalwire.rest.namespaces.mfa.MfaResource`: sms / call / verify endpoints. + + + + Number Groups namespace — full CRUD on number groups + membership ops. <p>Mirrors `signalwire.rest.namespaces.number_groups.NumberGroupsResource`: the group CRUD uses PUT for update; membership get/delete operate against a separate top-level `/api/relay/rest/number_group_memberships` collection (not a sub-collection of the group). + + + + REST namespace for number lookup (CNAM/carrier lookup) resources. + + + + REST namespace for phone number management. <p> Supports the standard CRUD surface plus typed helpers for binding an inbound call to a handler (SWML webhook, cXML webhook, AI agent, call flow, RELAY application/topic). + + + + REST namespace for project management resources. <p>Mirrors `signalwire.rest.namespaces.project.ProjectNamespace`: exposes `ProjectTokens` for API token CRUD (PATCH for update, DELETE for revoke). + + + + REST namespace for Pub/Sub resources. + + + + Queues namespace — full CRUD with member operations. <p>Mirrors `signalwire.rest.namespaces.queues.QueuesResource`: queue CRUD uses PUT for update; members are addressable both per-id and via the special `/next` endpoint. + + + + Recordings namespace — list / get / delete (no create/update). <p>Mirrors `signalwire.rest.namespaces.recordings.RecordingsResource`. Path: `/api/relay/rest/recordings`. + + + + 10DLC Campaign Registry namespace — brands, campaigns, orders, numbers. <p>Mirrors `signalwire.rest.namespaces.registry.RegistryNamespace`. All endpoints sit under `/api/relay/rest/registry/beta`. + + + + Short Codes namespace — list / get / update (PUT). + + + + REST namespace for SIP resources. + + + + SIP Profile namespace — get / update (PUT) the project's singleton SIP profile. <p>Mirrors `signalwire.rest.namespaces.sip_profile.SipProfileResource`. + + + + REST namespace for audio stream resources. + + + + REST namespace for SWML script resources. + + + + REST namespace for transcription resources. + + + + REST namespace for the Video API: rooms, room sessions/recordings, conferences, conference tokens, and individual streams. <p>Mirrors `signalwire.rest.namespaces.video.VideoNamespace`. + + + +## Modules + + + + + + + + + + + + + + + + diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/logs-namespace/conference-logs/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/logs-namespace/conference-logs/index.mdx new file mode 100644 index 0000000000..120967b8bf --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/logs-namespace/conference-logs/index.mdx @@ -0,0 +1,112 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/logs-namespace/conference-logs" +title: "ConferenceLogs" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.LogsNamespace.ConferenceLogs" + parent: "rest.namespaces.namespaces.LogsNamespace" + module: "rest.namespaces.namespaces.LogsNamespace" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java" + visibility: "public" +--- +# `ConferenceLogs` + +Conference logs — list-only. + +**Modifiers:** `static` + +## Signature + +```java +public static class ConferenceLogs +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient, String basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) + +Line 135. + +*** + +### getBasePath + +#### Signature + +```java +public String getBasePath() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) + +Line 140. + +*** + +### list + +#### Signature + + + + ```java + public Map list() + ``` + + + + ```java + public Map list(Map queryParams) + ``` + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) + +Line 142. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) + +Line 130. diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/logs-namespace/fax-logs/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/logs-namespace/fax-logs/index.mdx new file mode 100644 index 0000000000..ec12828251 --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/logs-namespace/fax-logs/index.mdx @@ -0,0 +1,136 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/logs-namespace/fax-logs" +title: "FaxLogs" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.LogsNamespace.FaxLogs" + parent: "rest.namespaces.namespaces.LogsNamespace" + module: "rest.namespaces.namespaces.LogsNamespace" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java" + visibility: "public" +--- +# `FaxLogs` + +Fax logs — list + per-id get. + +**Modifiers:** `static` + +## Signature + +```java +public static class FaxLogs +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient, String basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) + +Line 109. + +*** + +### get + +#### Signature + +```java +public Map get(String logId) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) + +Line 124. + +*** + +### getBasePath + +#### Signature + +```java +public String getBasePath() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) + +Line 114. + +*** + +### list + +#### Signature + + + + ```java + public Map list() + ``` + + + + ```java + public Map list(Map queryParams) + ``` + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) + +Line 116. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) + +Line 104. diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/logs-namespace/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/logs-namespace/index.mdx new file mode 100644 index 0000000000..5c3e0bb295 --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/logs-namespace/index.mdx @@ -0,0 +1,134 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/logs-namespace" +title: "LogsNamespace" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.LogsNamespace" + parent: "com.signalwire.sdk.rest.namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java" + visibility: "public" +--- +# `LogsNamespace` + +Logs namespace — message, voice, fax, and conference logs (read-only). + +<p>Mirrors `signalwire.rest.namespaces.logs.LogsNamespace`: each +sub-resource fans out to a distinct sub-API root (message → /messaging/logs, +voice → /voice/logs, fax → /fax/logs, conference → /logs/conferences). + +## Signature + +```java +public class LogsNamespace +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) + +Line 27. + +*** + +### conferences + +#### Signature + +```java +public ConferenceLogs conferences() +``` + +#### Returns + +`ConferenceLogs` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) + +Line 37. + +*** + +### fax + +#### Signature + +```java +public FaxLogs fax() +``` + +#### Returns + +`FaxLogs` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) + +Line 36. + +*** + +### messages + +#### Signature + +```java +public MessageLogs messages() +``` + +#### Returns + +`MessageLogs` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) + +Line 34. + +*** + +### voice + +#### Signature + +```java +public VoiceLogs voice() +``` + +#### Returns + +`VoiceLogs` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) + +Line 35. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) + +Line 20. diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/logs-namespace/index__2.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/logs-namespace/index__2.mdx new file mode 100644 index 0000000000..55ecf0342f --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/logs-namespace/index__2.mdx @@ -0,0 +1,34 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/logs-namespace/index__2" +title: "LogsNamespace" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "rest.namespaces.namespaces.LogsNamespace" + parent: "com.signalwire.sdk.rest.namespaces" + module: "rest.namespaces.namespaces" +--- +# `LogsNamespace` + +## Classes + + + + Conference logs — list-only. + + + + Fax logs — list + per-id get. + + + + Read-only logs supporting list + per-id get. + + + + Voice logs add a per-id events sub-collection. + + diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/logs-namespace/message-logs/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/logs-namespace/message-logs/index.mdx new file mode 100644 index 0000000000..15b5574090 --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/logs-namespace/message-logs/index.mdx @@ -0,0 +1,136 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/logs-namespace/message-logs" +title: "MessageLogs" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.LogsNamespace.MessageLogs" + parent: "rest.namespaces.namespaces.LogsNamespace" + module: "rest.namespaces.namespaces.LogsNamespace" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java" + visibility: "public" +--- +# `MessageLogs` + +Read-only logs supporting list + per-id get. + +**Modifiers:** `static` + +## Signature + +```java +public static class MessageLogs +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient, String basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) + +Line 49. + +*** + +### get + +#### Signature + +```java +public Map get(String logId) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) + +Line 64. + +*** + +### getBasePath + +#### Signature + +```java +public String getBasePath() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) + +Line 54. + +*** + +### list + +#### Signature + + + + ```java + public Map list() + ``` + + + + ```java + public Map list(Map queryParams) + ``` + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) + +Line 56. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) + +Line 44. diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/logs-namespace/voice-logs/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/logs-namespace/voice-logs/index.mdx new file mode 100644 index 0000000000..13a7025128 --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/logs-namespace/voice-logs/index.mdx @@ -0,0 +1,183 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/logs-namespace/voice-logs" +title: "VoiceLogs" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.LogsNamespace.VoiceLogs" + parent: "rest.namespaces.namespaces.LogsNamespace" + module: "rest.namespaces.namespaces.LogsNamespace" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java" + visibility: "public" +--- +# `VoiceLogs` + +Voice logs add a per-id events sub-collection. + +**Modifiers:** `static` + +## Signature + +```java +public static class VoiceLogs +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient, String basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) + +Line 75. + +*** + +### get + +#### Signature + +```java +public Map get(String logId) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) + +Line 90. + +*** + +### getBasePath + +#### Signature + +```java +public String getBasePath() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) + +Line 80. + +*** + +### list + +#### Signature + + + + ```java + public Map list() + ``` + + + + ```java + public Map list(Map queryParams) + ``` + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) + +Line 82. + +*** + +### listEvents + +#### Signature + + + + ```java + public Map listEvents(String logId) + ``` + + + + ```java + public Map listEvents( + String logId, + Map queryParams + ) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) + +Line 94. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java) + +Line 70. diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/messaging-namespace/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/messaging-namespace/index.mdx new file mode 100644 index 0000000000..5ca78bb107 --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/messaging-namespace/index.mdx @@ -0,0 +1,96 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/messaging-namespace" +title: "MessagingNamespace" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.MessagingNamespace" + parent: "com.signalwire.sdk.rest.namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/MessagingNamespace.java" + visibility: "public" +--- +# `MessagingNamespace` + +REST namespace for messaging (SMS/MMS) resources. + +## Signature + +```java +public class MessagingNamespace +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/MessagingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/MessagingNamespace.java) + +Line 22. + +*** + +### messages + +#### Signature + +```java +public CrudResource messages() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/MessagingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/MessagingNamespace.java) + +Line 27. + +*** + +### send + +Send a message via REST. + +#### Signature + +```java +public Map send(Map body) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/MessagingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/MessagingNamespace.java) + +Line 30. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/MessagingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/MessagingNamespace.java) + +Line 17. diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/mfa-namespace/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/mfa-namespace/index.mdx new file mode 100644 index 0000000000..58f20cb3c4 --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/mfa-namespace/index.mdx @@ -0,0 +1,147 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/mfa-namespace" +title: "MfaNamespace" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.MfaNamespace" + parent: "com.signalwire.sdk.rest.namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/MfaNamespace.java" + visibility: "public" +--- +# `MfaNamespace` + +MFA (Multi-Factor Authentication) namespace. + +<p>Mirrors `signalwire.rest.namespaces.mfa.MfaResource`: +sms / call / verify endpoints. + +## Signature + +```java +public class MfaNamespace +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/MfaNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/MfaNamespace.java) + +Line 24. + +*** + +### call + +#### Signature + +```java +public Map call(Map body) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/MfaNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/MfaNamespace.java) + +Line 34. + +*** + +### getBasePath + +#### Signature + +```java +public String getBasePath() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/MfaNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/MfaNamespace.java) + +Line 28. + +*** + +### sms + +#### Signature + +```java +public Map sms(Map body) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/MfaNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/MfaNamespace.java) + +Line 30. + +*** + +### verify + +#### Signature + +```java +public Map verify(String requestId, Map body) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/MfaNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/MfaNamespace.java) + +Line 38. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/MfaNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/MfaNamespace.java) + +Line 19. diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/number-groups-namespace/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/number-groups-namespace/index.mdx new file mode 100644 index 0000000000..bf78a61620 --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/number-groups-namespace/index.mdx @@ -0,0 +1,333 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/number-groups-namespace" +title: "NumberGroupsNamespace" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.NumberGroupsNamespace" + parent: "com.signalwire.sdk.rest.namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java" + visibility: "public" +--- +# `NumberGroupsNamespace` + +Number Groups namespace — full CRUD on number groups + membership ops. + +<p>Mirrors +`signalwire.rest.namespaces.number_groups.NumberGroupsResource`: the +group CRUD uses PUT for update; membership get/delete operate against a +separate top-level `/api/relay/rest/number_group_memberships` +collection (not a sub-collection of the group). + +## Signature + +```java +public class NumberGroupsNamespace +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java) + +Line 28. + +*** + +### addMembership + +#### Signature + +```java +public Map addMembership(String groupId, Map body) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java) + +Line 70. + +*** + +### create + +#### Signature + +```java +public Map create(Map body) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java) + +Line 44. + +*** + +### delete + +#### Signature + +```java +public Map delete(String groupId) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java) + +Line 56. + +*** + +### deleteMembership + +#### Signature + +```java +public Map deleteMembership(String membershipId) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java) + +Line 78. + +*** + +### get + +#### Signature + +```java +public Map get(String groupId) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java) + +Line 48. + +*** + +### getBasePath + +#### Signature + +```java +public String getBasePath() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java) + +Line 32. + +*** + +### getMembership + +#### Signature + +```java +public Map getMembership(String membershipId) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java) + +Line 74. + +*** + +### list + +#### Signature + + + + ```java + public Map list() + ``` + + + + ```java + public Map list(Map queryParams) + ``` + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java) + +Line 36. + +*** + +### listMemberships + +#### Signature + + + + ```java + public Map listMemberships(String groupId) + ``` + + + + ```java + public Map listMemberships( + String groupId, + Map queryParams + ) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java) + +Line 62. + +*** + +### update + +#### Signature + +```java +public Map update(String groupId, Map body) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java) + +Line 52. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/NumberGroupsNamespace.java) + +Line 22. diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/number-lookup-namespace/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/number-lookup-namespace/index.mdx new file mode 100644 index 0000000000..d84b38f06d --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/number-lookup-namespace/index.mdx @@ -0,0 +1,76 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/number-lookup-namespace" +title: "NumberLookupNamespace" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.NumberLookupNamespace" + parent: "com.signalwire.sdk.rest.namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/NumberLookupNamespace.java" + visibility: "public" +--- +# `NumberLookupNamespace` + +REST namespace for number lookup (CNAM/carrier lookup) resources. + +## Signature + +```java +public class NumberLookupNamespace +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/NumberLookupNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/NumberLookupNamespace.java) + +Line 20. + +*** + +### lookup + +Look up a phone number. + +#### Signature + +```java +public Map lookup(String phoneNumber) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/NumberLookupNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/NumberLookupNamespace.java) + +Line 25. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/NumberLookupNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/NumberLookupNamespace.java) + +Line 16. diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/phone-numbers-namespace/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/phone-numbers-namespace/index.mdx new file mode 100644 index 0000000000..77ac30931c --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/phone-numbers-namespace/index.mdx @@ -0,0 +1,614 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/phone-numbers-namespace" +title: "PhoneNumbersNamespace" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.PhoneNumbersNamespace" + parent: "com.signalwire.sdk.rest.namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java" + visibility: "public" +--- +# `PhoneNumbersNamespace` + +REST namespace for phone number management. + +<p> +Supports the standard CRUD surface plus typed helpers for binding an +inbound call to a handler (SWML webhook, cXML webhook, AI agent, call +flow, RELAY application/topic). + +The binding model is: set +`call_handler` + the handler-specific companion field on the phone +number; the server auto-materializes the matching Fabric resource. +See `PhoneCallHandler` for the enum and `rest/docs/phone-binding.md` +for the full model. + +## Signature + +```java +public class PhoneNumbersNamespace +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java) + +Line 32. + +*** + +### create + +Purchase a phone number. + +#### Signature + +```java +public Map create(Map body) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java) + +Line 47. + +*** + +### delete + +Release a phone number. + +#### Signature + +```java +public Map delete(String id) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java) + +Line 53. + +*** + +### get + +Get a single phone number. + +#### Signature + +```java +public Map get(String id) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java) + +Line 44. + +*** + +### getResource + +Get the underlying CRUD resource. + +#### Signature + +```java +public CrudResource getResource() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java) + +Line 61. + +*** + +### list + +List all phone numbers. + +#### Signature + + + + ```java + public Map list() + ``` + + + + ```java + public Map list(Map queryParams) + ``` + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java) + +Line 38. + +*** + +### search + +Search available phone numbers. + +#### Signature + +```java +public Map search(Map queryParams) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java) + +Line 56. + +*** + +### setAiAgent + +Route inbound calls to an AI Agent Fabric resource by ID. + +#### Signature + +```java +public Map setAiAgent(String id, String agentId) +``` + +#### Parameters + + + phone number SID + + + + AI agent resource ID + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java) + +Line 156. + +*** + +### setCallFlow + +Route inbound calls to a Call Flow by ID (server default version). + +#### Signature + + + + ```java + public Map setCallFlow(String id, String flowId) + ``` + + + + ```java + public Map setCallFlow(String id, String flowId, String version) + ``` + + + +#### Parameters (Overload 1) + + + phone number SID + + + + call-flow resource ID + + +#### Parameters (Overload 2) + + + phone number SID + + + + call-flow resource ID + + + + `"working_copy"`, `"current_deployed"`, or `null` for the server default + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java) + +Line 169. + +*** + +### setCxmlApplication + +Route inbound calls to an existing cXML application by ID. + +#### Signature + +```java +public Map setCxmlApplication(String id, String applicationId) +``` + +#### Parameters + + + phone number SID + + + + cXML application ID + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java) + +Line 143. + +*** + +### setCxmlWebhook + +Route inbound calls to a cXML (Twilio-compat / LAML) webhook. + +<p> +Despite the wire value `laml_webhooks` being plural, this +creates a single `cxml_webhook` Fabric resource. + +#### Signature + + + + ```java + public Map setCxmlWebhook(String id, String url) + ``` + + + + ```java + public Map setCxmlWebhook( + String id, + String url, + String fallbackUrl + ) + ``` + + + + ```java + public Map setCxmlWebhook( + String id, + String url, + String fallbackUrl, + String statusCallbackUrl + ) + ``` + + + +#### Parameters (Overload 1) + + + phone number SID + + + + primary cXML endpoint + + +#### Parameters (Overload 2) + + + phone number SID + + + + primary cXML endpoint + + + + URL the server falls back to when the primary fails + + +#### Parameters (Overload 3) + + + phone number SID + + + + primary cXML endpoint + + + + fallback URL (may be `null`) + + + + call-status callback (may be `null`) + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Returns (Overload 3) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java) + +Line 100. + +*** + +### setRelayApplication + +Route inbound calls to a named RELAY application. + +#### Signature + +```java +public Map setRelayApplication(String id, String name) +``` + +#### Parameters + + + phone number SID + + + + RELAY application name + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java) + +Line 197. + +*** + +### setRelayTopic + +Route inbound calls to a RELAY topic (client subscription). + +#### Signature + + + + ```java + public Map setRelayTopic(String id, String topic) + ``` + + + + ```java + public Map setRelayTopic( + String id, + String topic, + String statusCallbackUrl + ) + ``` + + + +#### Parameters (Overload 1) + + + phone number SID + + + + RELAY topic name + + +#### Parameters (Overload 2) + + + phone number SID + + + + RELAY topic name + + + + call-status callback URL (may be `null`) + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java) + +Line 210. + +*** + +### setSwmlWebhook + +Route inbound calls on this phone number to an SWML webhook URL. + +<p> +Your backend returns an SWML document per call. + +The server +auto-creates a `swml_webhook` Fabric resource keyed off this URL. + +#### Signature + +```java +public Map setSwmlWebhook(String id, String url) +``` + +#### Parameters + + + phone number SID + + + + SWML endpoint the server should fetch per call + + +#### Returns + +`Map` — the updated phone number representation + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java) + +Line 84. + +*** + +### update + +Update a phone number. + +#### Signature + +```java +public Map update(String id, Map body) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java) + +Line 50. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/PhoneNumbersNamespace.java) + +Line 27. diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/project-namespace/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/project-namespace/index.mdx new file mode 100644 index 0000000000..84e59440c9 --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/project-namespace/index.mdx @@ -0,0 +1,170 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/project-namespace" +title: "ProjectNamespace" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.ProjectNamespace" + parent: "com.signalwire.sdk.rest.namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java" + visibility: "public" +--- +# `ProjectNamespace` + +REST namespace for project management resources. + +<p>Mirrors `signalwire.rest.namespaces.project.ProjectNamespace`: +exposes `ProjectTokens` for API token CRUD (PATCH for update, +DELETE for revoke). + +## Signature + +```java +public class ProjectNamespace +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java) + +Line 25. + +*** + +### createToken + +Create a project token (legacy single-method form). + +#### Signature + +```java +public Map createToken(Map body) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java) + +Line 50. + +*** + +### get + +Get project info. + +#### Signature + +```java +public Map get() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java) + +Line 35. + +*** + +### listTokens + +List project tokens (legacy single-method form). + +#### Signature + +```java +public Map listTokens() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java) + +Line 45. + +*** + +### tokens + +#### Signature + +```java +public ProjectTokens tokens() +``` + +#### Returns + +`ProjectTokens` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java) + +Line 30. + +*** + +### update + +Update project settings. + +#### Signature + +```java +public Map update(Map body) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java) + +Line 40. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java) + +Line 20. diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/project-namespace/index__2.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/project-namespace/index__2.mdx new file mode 100644 index 0000000000..dde6a0994c --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/project-namespace/index__2.mdx @@ -0,0 +1,22 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/project-namespace/index__2" +title: "ProjectNamespace" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "rest.namespaces.namespaces.ProjectNamespace" + parent: "com.signalwire.sdk.rest.namespaces" + module: "rest.namespaces.namespaces" +--- +# `ProjectNamespace` + +## Classes + + + + Project API token management. + + diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/project-namespace/project-tokens/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/project-namespace/project-tokens/index.mdx new file mode 100644 index 0000000000..a9b37885f5 --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/project-namespace/project-tokens/index.mdx @@ -0,0 +1,149 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/project-namespace/project-tokens" +title: "ProjectTokens" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.ProjectNamespace.ProjectTokens" + parent: "rest.namespaces.namespaces.ProjectNamespace" + module: "rest.namespaces.namespaces.ProjectNamespace" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java" + visibility: "public" +--- +# `ProjectTokens` + +Project API token management. + +Update is PATCH (matches Python's +-> http.patch); delete revokes the token. + +**Modifiers:** `static` + +## Signature + +```java +public static class ProjectTokens +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java) + +Line 67. + +*** + +### create + +#### Signature + +```java +public Map create(Map body) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java) + +Line 73. + +*** + +### delete + +#### Signature + +```java +public Map delete(String tokenId) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java) + +Line 81. + +*** + +### getBasePath + +#### Signature + +```java +public String getBasePath() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java) + +Line 71. + +*** + +### update + +#### Signature + +```java +public Map update(String tokenId, Map body) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java) + +Line 77. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java) + +Line 62. diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/pub-sub-namespace/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/pub-sub-namespace/index.mdx new file mode 100644 index 0000000000..565ef69afa --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/pub-sub-namespace/index.mdx @@ -0,0 +1,98 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/pub-sub-namespace" +title: "PubSubNamespace" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.PubSubNamespace" + parent: "com.signalwire.sdk.rest.namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/PubSubNamespace.java" + visibility: "public" +--- +# `PubSubNamespace` + +REST namespace for Pub/Sub resources. + +## Signature + +```java +public class PubSubNamespace +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/PubSubNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/PubSubNamespace.java) + +Line 22. + +*** + +### channels + +#### Signature + +```java +public CrudResource channels() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/PubSubNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/PubSubNamespace.java) + +Line 27. + +*** + +### publish + +Publish a message to a channel. + +#### Signature + +```java +public Map publish(String channel, Map body) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/PubSubNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/PubSubNamespace.java) + +Line 30. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/PubSubNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/PubSubNamespace.java) + +Line 17. diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/queue-namespace/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/queue-namespace/index.mdx new file mode 100644 index 0000000000..0fdb3cb2f5 --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/queue-namespace/index.mdx @@ -0,0 +1,340 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/queue-namespace" +title: "QueueNamespace" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.QueueNamespace" + parent: "com.signalwire.sdk.rest.namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java" + visibility: "public" +--- +# `QueueNamespace` + +Queues namespace — full CRUD with member operations. + +<p>Mirrors `signalwire.rest.namespaces.queues.QueuesResource`: queue +CRUD uses PUT for update; members are addressable both per-id and via the +special `/next` endpoint. + +## Signature + +```java +public class QueueNamespace +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java) + +Line 25. + +*** + +### create + +#### Signature + +```java +public Map create(Map body) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java) + +Line 41. + +*** + +### delete + +#### Signature + +```java +public Map delete(String queueId) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java) + +Line 53. + +*** + +### get + +#### Signature + +```java +public Map get(String queueId) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java) + +Line 45. + +*** + +### getBasePath + +#### Signature + +```java +public String getBasePath() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java) + +Line 29. + +*** + +### getMember + +#### Signature + +```java +public Map getMember(String queueId, String memberId) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java) + +Line 71. + +*** + +### getNextMember + +#### Signature + +```java +public Map getNextMember(String queueId) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java) + +Line 67. + +*** + +### list + +#### Signature + + + + ```java + public Map list() + ``` + + + + ```java + public Map list(Map queryParams) + ``` + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java) + +Line 33. + +*** + +### listMembers + +#### Signature + + + + ```java + public Map listMembers(String queueId) + ``` + + + + ```java + public Map listMembers( + String queueId, + Map queryParams + ) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java) + +Line 59. + +*** + +### queues + + + **Deprecated.** direct calls on this namespace (`#list()`, `#get(String)` etc.) match Python parity. Prefer those. + + +Returns the legacy `com.signalwire.sdk.rest.CrudResource`-shaped +accessor so older callers like `client.queues().queues()` keep +compiling. + +The returned resource targets the same path as this +namespace (`/relay/rest/queues`). + +**Decorators:** `@Deprecated` + +#### Signature + +```java +public com.signalwire.sdk.rest.CrudResource queues() +``` + +#### Returns + +`com.signalwire.sdk.rest.CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java) + +Line 84. + +*** + +### update + +#### Signature + +```java +public Map update(String queueId, Map body) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java) + +Line 49. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/QueueNamespace.java) + +Line 20. diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/recording-namespace/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/recording-namespace/index.mdx new file mode 100644 index 0000000000..676cfbab10 --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/recording-namespace/index.mdx @@ -0,0 +1,191 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/recording-namespace" +title: "RecordingNamespace" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.RecordingNamespace" + parent: "com.signalwire.sdk.rest.namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RecordingNamespace.java" + visibility: "public" +--- +# `RecordingNamespace` + +Recordings namespace — list / get / delete (no create/update). + +<p>Mirrors `signalwire.rest.namespaces.recordings.RecordingsResource`. +Path: `/api/relay/rest/recordings`. + +## Signature + +```java +public class RecordingNamespace +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RecordingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RecordingNamespace.java) + +Line 24. + +*** + +### delete + +#### Signature + +```java +public Map delete(String recordingId) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RecordingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RecordingNamespace.java) + +Line 42. + +*** + +### get + +#### Signature + +```java +public Map get(String recordingId) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RecordingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RecordingNamespace.java) + +Line 38. + +*** + +### getBasePath + +#### Signature + +```java +public String getBasePath() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RecordingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RecordingNamespace.java) + +Line 28. + +*** + +### list + +#### Signature + + + + ```java + public Map list() + ``` + + + + ```java + public Map list(Map queryParams) + ``` + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RecordingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RecordingNamespace.java) + +Line 30. + +*** + +### recordings + + + **Deprecated.** prefer the direct namespace methods which match Python. + + +Legacy CRUD-shaped accessor for backwards compat with the previous +Java surface (`client.recordings().recordings()`). + +Targets the +same path as this namespace. + +**Decorators:** `@Deprecated` + +#### Signature + +```java +public com.signalwire.sdk.rest.CrudResource recordings() +``` + +#### Returns + +`com.signalwire.sdk.rest.CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RecordingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RecordingNamespace.java) + +Line 53. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RecordingNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RecordingNamespace.java) + +Line 19. diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/registry-namespace/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/registry-namespace/index.mdx new file mode 100644 index 0000000000..dd6da9077c --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/registry-namespace/index.mdx @@ -0,0 +1,133 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/registry-namespace" +title: "RegistryNamespace" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.RegistryNamespace" + parent: "com.signalwire.sdk.rest.namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java" + visibility: "public" +--- +# `RegistryNamespace` + +10DLC Campaign Registry namespace — brands, campaigns, orders, numbers. + +<p>Mirrors `signalwire.rest.namespaces.registry.RegistryNamespace`. +All endpoints sit under `/api/relay/rest/registry/beta`. + +## Signature + +```java +public class RegistryNamespace +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) + +Line 28. + +*** + +### brands + +#### Signature + +```java +public RegistryBrands brands() +``` + +#### Returns + +`RegistryBrands` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) + +Line 35. + +*** + +### campaigns + +#### Signature + +```java +public RegistryCampaigns campaigns() +``` + +#### Returns + +`RegistryCampaigns` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) + +Line 36. + +*** + +### numbers + +#### Signature + +```java +public RegistryNumbers numbers() +``` + +#### Returns + +`RegistryNumbers` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) + +Line 38. + +*** + +### orders + +#### Signature + +```java +public RegistryOrders orders() +``` + +#### Returns + +`RegistryOrders` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) + +Line 37. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) + +Line 19. diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/registry-namespace/index__2.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/registry-namespace/index__2.mdx new file mode 100644 index 0000000000..dee855f7de --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/registry-namespace/index__2.mdx @@ -0,0 +1,34 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/registry-namespace/index__2" +title: "RegistryNamespace" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "rest.namespaces.namespaces.RegistryNamespace" + parent: "com.signalwire.sdk.rest.namespaces" + module: "rest.namespaces.namespaces" +--- +# `RegistryNamespace` + +## Classes + + + + 10DLC brand management — list / create / get plus brand-scoped campaign sub-resources. + + + + 10DLC campaign management — get / update (PUT) plus number / order sub-resources. + + + + 10DLC number-assignment management — release a number. + + + + 10DLC assignment-order management — read-only get. + + diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/registry-namespace/registry-brands/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/registry-namespace/registry-brands/index.mdx new file mode 100644 index 0000000000..7a815414dc --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/registry-namespace/registry-brands/index.mdx @@ -0,0 +1,237 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/registry-namespace/registry-brands" +title: "RegistryBrands" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.RegistryNamespace.RegistryBrands" + parent: "rest.namespaces.namespaces.RegistryNamespace" + module: "rest.namespaces.namespaces.RegistryNamespace" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java" + visibility: "public" +--- +# `RegistryBrands` + +10DLC brand management — list / create / get plus brand-scoped +campaign sub-resources. + +**Modifiers:** `static` + +## Signature + +```java +public static class RegistryBrands +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient, String basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) + +Line 53. + +*** + +### create + +#### Signature + +```java +public Map create(Map body) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) + +Line 68. + +*** + +### createCampaign + +#### Signature + +```java +public Map createCampaign( + String brandId, + Map body +) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) + +Line 84. + +*** + +### get + +#### Signature + +```java +public Map get(String brandId) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) + +Line 72. + +*** + +### getBasePath + +#### Signature + +```java +public String getBasePath() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) + +Line 58. + +*** + +### list + +#### Signature + + + + ```java + public Map list() + ``` + + + + ```java + public Map list(Map queryParams) + ``` + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) + +Line 60. + +*** + +### listCampaigns + +#### Signature + + + + ```java + public Map listCampaigns(String brandId) + ``` + + + + ```java + public Map listCampaigns( + String brandId, + Map queryParams + ) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) + +Line 76. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) + +Line 48. diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/registry-namespace/registry-campaigns/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/registry-namespace/registry-campaigns/index.mdx new file mode 100644 index 0000000000..ab32d22ebf --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/registry-namespace/registry-campaigns/index.mdx @@ -0,0 +1,248 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/registry-namespace/registry-campaigns" +title: "RegistryCampaigns" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.RegistryNamespace.RegistryCampaigns" + parent: "rest.namespaces.namespaces.RegistryNamespace" + module: "rest.namespaces.namespaces.RegistryNamespace" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java" + visibility: "public" +--- +# `RegistryCampaigns` + +10DLC campaign management — get / update (PUT) plus number / order +sub-resources. + +**Modifiers:** `static` + +## Signature + +```java +public static class RegistryCampaigns +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient, String basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) + +Line 98. + +*** + +### createOrder + +#### Signature + +```java +public Map createOrder( + String campaignId, + Map body +) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) + +Line 129. + +*** + +### get + +#### Signature + +```java +public Map get(String campaignId) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) + +Line 105. + +*** + +### getBasePath + +#### Signature + +```java +public String getBasePath() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) + +Line 103. + +*** + +### listNumbers + +#### Signature + + + + ```java + public Map listNumbers(String campaignId) + ``` + + + + ```java + public Map listNumbers( + String campaignId, + Map queryParams + ) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) + +Line 113. + +*** + +### listOrders + +#### Signature + + + + ```java + public Map listOrders(String campaignId) + ``` + + + + ```java + public Map listOrders( + String campaignId, + Map queryParams + ) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) + +Line 121. + +*** + +### update + +#### Signature + +```java +public Map update(String campaignId, Map body) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) + +Line 109. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) + +Line 93. diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/registry-namespace/registry-numbers/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/registry-namespace/registry-numbers/index.mdx new file mode 100644 index 0000000000..ce6438e265 --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/registry-namespace/registry-numbers/index.mdx @@ -0,0 +1,98 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/registry-namespace/registry-numbers" +title: "RegistryNumbers" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.RegistryNamespace.RegistryNumbers" + parent: "rest.namespaces.namespaces.RegistryNamespace" + module: "rest.namespaces.namespaces.RegistryNamespace" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java" + visibility: "public" +--- +# `RegistryNumbers` + +10DLC number-assignment management — release a number. + +**Modifiers:** `static` + +## Signature + +```java +public static class RegistryNumbers +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient, String basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) + +Line 162. + +*** + +### delete + +#### Signature + +```java +public Map delete(String numberId) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) + +Line 169. + +*** + +### getBasePath + +#### Signature + +```java +public String getBasePath() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) + +Line 167. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) + +Line 157. diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/registry-namespace/registry-orders/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/registry-namespace/registry-orders/index.mdx new file mode 100644 index 0000000000..9dc47b05ea --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/registry-namespace/registry-orders/index.mdx @@ -0,0 +1,98 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/registry-namespace/registry-orders" +title: "RegistryOrders" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.RegistryNamespace.RegistryOrders" + parent: "rest.namespaces.namespaces.RegistryNamespace" + module: "rest.namespaces.namespaces.RegistryNamespace" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java" + visibility: "public" +--- +# `RegistryOrders` + +10DLC assignment-order management — read-only get. + +**Modifiers:** `static` + +## Signature + +```java +public static class RegistryOrders +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient, String basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) + +Line 142. + +*** + +### get + +#### Signature + +```java +public Map get(String orderId) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) + +Line 149. + +*** + +### getBasePath + +#### Signature + +```java +public String getBasePath() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) + +Line 147. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java) + +Line 137. diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/short-codes-namespace/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/short-codes-namespace/index.mdx new file mode 100644 index 0000000000..5458347678 --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/short-codes-namespace/index.mdx @@ -0,0 +1,162 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/short-codes-namespace" +title: "ShortCodesNamespace" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.ShortCodesNamespace" + parent: "com.signalwire.sdk.rest.namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ShortCodesNamespace.java" + visibility: "public" +--- +# `ShortCodesNamespace` + +Short Codes namespace — list / get / update (PUT). + +No create/delete. + +<p>Mirrors `signalwire.rest.namespaces.short_codes.ShortCodesResource`. + +## Signature + +```java +public class ShortCodesNamespace +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ShortCodesNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ShortCodesNamespace.java) + +Line 23. + +*** + +### get + +#### Signature + +```java +public Map get(String shortCodeId) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ShortCodesNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ShortCodesNamespace.java) + +Line 37. + +*** + +### getBasePath + +#### Signature + +```java +public String getBasePath() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ShortCodesNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ShortCodesNamespace.java) + +Line 27. + +*** + +### list + +#### Signature + + + + ```java + public Map list() + ``` + + + + ```java + public Map list(Map queryParams) + ``` + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ShortCodesNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ShortCodesNamespace.java) + +Line 29. + +*** + +### update + +#### Signature + +```java +public Map update(String shortCodeId, Map body) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ShortCodesNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ShortCodesNamespace.java) + +Line 41. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/ShortCodesNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ShortCodesNamespace.java) + +Line 18. diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/sip-namespace/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/sip-namespace/index.mdx new file mode 100644 index 0000000000..b77626e7a3 --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/sip-namespace/index.mdx @@ -0,0 +1,90 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/sip-namespace" +title: "SipNamespace" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.SipNamespace" + parent: "com.signalwire.sdk.rest.namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/SipNamespace.java" + visibility: "public" +--- +# `SipNamespace` + +REST namespace for SIP resources. + +## Signature + +```java +public class SipNamespace +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/SipNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/SipNamespace.java) + +Line 20. + +*** + +### endpoints + +#### Signature + +```java +public CrudResource endpoints() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/SipNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/SipNamespace.java) + +Line 25. + +*** + +### profiles + +#### Signature + +```java +public CrudResource profiles() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/SipNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/SipNamespace.java) + +Line 26. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/SipNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/SipNamespace.java) + +Line 15. diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/sip-profile-namespace/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/sip-profile-namespace/index.mdx new file mode 100644 index 0000000000..2ef7c0a7f1 --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/sip-profile-namespace/index.mdx @@ -0,0 +1,117 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/sip-profile-namespace" +title: "SipProfileNamespace" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.SipProfileNamespace" + parent: "com.signalwire.sdk.rest.namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/SipProfileNamespace.java" + visibility: "public" +--- +# `SipProfileNamespace` + +SIP Profile namespace — get / update (PUT) the project's singleton SIP +profile. + +<p>Mirrors `signalwire.rest.namespaces.sip_profile.SipProfileResource`. + +## Signature + +```java +public class SipProfileNamespace +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/SipProfileNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/SipProfileNamespace.java) + +Line 24. + +*** + +### get + +#### Signature + +```java +public Map get() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/SipProfileNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/SipProfileNamespace.java) + +Line 30. + +*** + +### getBasePath + +#### Signature + +```java +public String getBasePath() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/SipProfileNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/SipProfileNamespace.java) + +Line 28. + +*** + +### update + +#### Signature + +```java +public Map update(Map body) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/SipProfileNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/SipProfileNamespace.java) + +Line 34. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/SipProfileNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/SipProfileNamespace.java) + +Line 19. diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/stream-namespace/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/stream-namespace/index.mdx new file mode 100644 index 0000000000..d39a08b96c --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/stream-namespace/index.mdx @@ -0,0 +1,70 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/stream-namespace" +title: "StreamNamespace" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.StreamNamespace" + parent: "com.signalwire.sdk.rest.namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/StreamNamespace.java" + visibility: "public" +--- +# `StreamNamespace` + +REST namespace for audio stream resources. + +## Signature + +```java +public class StreamNamespace +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/StreamNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/StreamNamespace.java) + +Line 19. + +*** + +### streams + +#### Signature + +```java +public CrudResource streams() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/StreamNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/StreamNamespace.java) + +Line 23. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/StreamNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/StreamNamespace.java) + +Line 15. diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/swml-namespace/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/swml-namespace/index.mdx new file mode 100644 index 0000000000..8d4369f130 --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/swml-namespace/index.mdx @@ -0,0 +1,70 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/swml-namespace" +title: "SwmlNamespace" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.SwmlNamespace" + parent: "com.signalwire.sdk.rest.namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/SwmlNamespace.java" + visibility: "public" +--- +# `SwmlNamespace` + +REST namespace for SWML script resources. + +## Signature + +```java +public class SwmlNamespace +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/SwmlNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/SwmlNamespace.java) + +Line 19. + +*** + +### scripts + +#### Signature + +```java +public CrudResource scripts() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/SwmlNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/SwmlNamespace.java) + +Line 23. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/SwmlNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/SwmlNamespace.java) + +Line 15. diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/transcription-namespace/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/transcription-namespace/index.mdx new file mode 100644 index 0000000000..f5a3fd0f49 --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/transcription-namespace/index.mdx @@ -0,0 +1,70 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/transcription-namespace" +title: "TranscriptionNamespace" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.TranscriptionNamespace" + parent: "com.signalwire.sdk.rest.namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/TranscriptionNamespace.java" + visibility: "public" +--- +# `TranscriptionNamespace` + +REST namespace for transcription resources. + +## Signature + +```java +public class TranscriptionNamespace +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/TranscriptionNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/TranscriptionNamespace.java) + +Line 19. + +*** + +### transcriptions + +#### Signature + +```java +public CrudResource transcriptions() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/TranscriptionNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/TranscriptionNamespace.java) + +Line 23. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/TranscriptionNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/TranscriptionNamespace.java) + +Line 15. diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/index.mdx new file mode 100644 index 0000000000..d6a05fbb4c --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/index.mdx @@ -0,0 +1,223 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/video-namespace" +title: "VideoNamespace" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.VideoNamespace" + parent: "com.signalwire.sdk.rest.namespaces" + module: "rest.namespaces.namespaces" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java" + visibility: "public" +--- +# `VideoNamespace` + +REST namespace for the Video API: rooms, room sessions/recordings, +conferences, conference tokens, and individual streams. + +<p>Mirrors `signalwire.rest.namespaces.video.VideoNamespace`. + +The +stream sub-resources hang off rooms and conferences; the top-level +`streams` resource exists for CRUD on individual streams keyed by +stream id. + +## Signature + +```java +public class VideoNamespace +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 33. + +*** + +### conferences + +#### Signature + +```java +public VideoConferences conferences() +``` + +#### Returns + +`VideoConferences` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 48. + +*** + +### conferenceTokens + +#### Signature + +```java +public VideoConferenceTokens conferenceTokens() +``` + +#### Returns + +`VideoConferenceTokens` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 49. + +*** + +### recordings + +Legacy alias for `#roomRecordings()`; previous releases of the +Java port exposed video.recordings(). + +Kept for backwards compatibility. + +#### Signature + +```java +public VideoRoomRecordings recordings() +``` + +#### Returns + +`VideoRoomRecordings` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 56. + +*** + +### roomRecordings + +#### Signature + +```java +public VideoRoomRecordings roomRecordings() +``` + +#### Returns + +`VideoRoomRecordings` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 47. + +*** + +### rooms + +#### Signature + +```java +public VideoRooms rooms() +``` + +#### Returns + +`VideoRooms` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 44. + +*** + +### roomSessions + +#### Signature + +```java +public VideoRoomSessions roomSessions() +``` + +#### Returns + +`VideoRoomSessions` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 46. + +*** + +### roomTokens + +#### Signature + +```java +public CrudResource roomTokens() +``` + +#### Returns + +`CrudResource` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 45. + +*** + +### streams + +#### Signature + +```java +public VideoStreams streams() +``` + +#### Returns + +`VideoStreams` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 50. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 23. diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/index__2.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/index__2.mdx new file mode 100644 index 0000000000..d905f5b125 --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/index__2.mdx @@ -0,0 +1,42 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/video-namespace/index__2" +title: "VideoNamespace" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "rest.namespaces.namespaces.VideoNamespace" + parent: "com.signalwire.sdk.rest.namespaces" + module: "rest.namespaces.namespaces" +--- +# `VideoNamespace` + +## Classes + + + + Video conferences with token + stream sub-collections. + + + + Video conference tokens (top-level): get + reset. + + + + Top-level video room recordings collection: list, get, delete, plus a per-recording events sub-collection. + + + + Video room management with stream sub-resources. + + + + Video room sessions: list, get, plus events / members / recordings sub-collections. + + + + Top-level streams resource (per stream id): get / update (PUT) / delete. + + diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/video-conference-tokens/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/video-conference-tokens/index.mdx new file mode 100644 index 0000000000..5fd7724e27 --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/video-conference-tokens/index.mdx @@ -0,0 +1,122 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/video-namespace/video-conference-tokens" +title: "VideoConferenceTokens" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.VideoNamespace.VideoConferenceTokens" + parent: "rest.namespaces.namespaces.VideoNamespace" + module: "rest.namespaces.namespaces.VideoNamespace" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java" + visibility: "public" +--- +# `VideoConferenceTokens` + +Video conference tokens (top-level): get + reset. + +**Modifiers:** `static` + +## Signature + +```java +public static class VideoConferenceTokens +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient, String basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 231. + +*** + +### get + +#### Signature + +```java +public Map get(String tokenId) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 238. + +*** + +### getBasePath + +#### Signature + +```java +public String getBasePath() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 236. + +*** + +### reset + +#### Signature + +```java +public Map reset(String tokenId) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 242. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 226. diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/video-conferences/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/video-conferences/index.mdx new file mode 100644 index 0000000000..b3def72ee5 --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/video-conferences/index.mdx @@ -0,0 +1,211 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/video-namespace/video-conferences" +title: "VideoConferences" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.VideoNamespace.VideoConferences" + parent: "rest.namespaces.namespaces.VideoNamespace" + module: "rest.namespaces.namespaces.VideoNamespace" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java" + visibility: "public" +--- +# `VideoConferences` + +Video conferences with token + stream sub-collections. + +Update uses PUT. + +**Modifiers:** `static` + +## Signature + +```java +public static class VideoConferences extends CrudResource +``` + +## Inheritance + +**Extends:** [CrudResource](/docs/sdk-reference/reference/java/rest/rest/crud-resource) + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient, String basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 188. + +*** + +### createStream + +#### Signature + +```java +public Map createStream( + String conferenceId, + Map body +) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 218. + +*** + +### listConferenceTokens + +#### Signature + + + + ```java + public Map listConferenceTokens(String conferenceId) + ``` + + + + ```java + public Map listConferenceTokens( + String conferenceId, + Map queryParams + ) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 197. + +*** + +### listStreams + +#### Signature + + + + ```java + public Map listStreams(String conferenceId) + ``` + + + + ```java + public Map listStreams( + String conferenceId, + Map queryParams + ) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 208. + +*** + +### update + +**Decorators:** `@Override` + +#### Signature + +```java +public Map update(String conferenceId, Map body) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 192. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 186. diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/video-room-recordings/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/video-room-recordings/index.mdx new file mode 100644 index 0000000000..30fa4055fd --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/video-room-recordings/index.mdx @@ -0,0 +1,208 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/video-namespace/video-room-recordings" +title: "VideoRoomRecordings" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.VideoNamespace.VideoRoomRecordings" + parent: "rest.namespaces.namespaces.VideoNamespace" + module: "rest.namespaces.namespaces.VideoNamespace" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java" + visibility: "public" +--- +# `VideoRoomRecordings` + +Top-level video room recordings collection: list, get, delete, plus +a per-recording events sub-collection. + +**Modifiers:** `static` + +## Signature + +```java +public static class VideoRoomRecordings +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient, String basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 151. + +*** + +### delete + +#### Signature + +```java +public Map delete(String recordingId) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 170. + +*** + +### get + +#### Signature + +```java +public Map get(String recordingId) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 166. + +*** + +### getBasePath + +#### Signature + +```java +public String getBasePath() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 156. + +*** + +### list + +#### Signature + + + + ```java + public Map list() + ``` + + + + ```java + public Map list(Map queryParams) + ``` + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 158. + +*** + +### listEvents + +#### Signature + + + + ```java + public Map listEvents(String recordingId) + ``` + + + + ```java + public Map listEvents( + String recordingId, + Map queryParams + ) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 174. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 146. diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/video-room-sessions/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/video-room-sessions/index.mdx new file mode 100644 index 0000000000..5c6704084b --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/video-room-sessions/index.mdx @@ -0,0 +1,278 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/video-namespace/video-room-sessions" +title: "VideoRoomSessions" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.VideoNamespace.VideoRoomSessions" + parent: "rest.namespaces.namespaces.VideoNamespace" + module: "rest.namespaces.namespaces.VideoNamespace" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java" + visibility: "public" +--- +# `VideoRoomSessions` + +Video room sessions: list, get, plus events / members / recordings +sub-collections. + +**Modifiers:** `static` + +## Signature + +```java +public static class VideoRoomSessions +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient, String basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 98. + +*** + +### get + +#### Signature + +```java +public Map get(String sessionId) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 113. + +*** + +### getBasePath + +#### Signature + +```java +public String getBasePath() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 103. + +*** + +### list + +#### Signature + + + + ```java + public Map list() + ``` + + + + ```java + public Map list(Map queryParams) + ``` + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 105. + +*** + +### listEvents + +#### Signature + + + + ```java + public Map listEvents(String sessionId) + ``` + + + + ```java + public Map listEvents( + String sessionId, + Map queryParams + ) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 117. + +*** + +### listMembers + +#### Signature + + + + ```java + public Map listMembers(String sessionId) + ``` + + + + ```java + public Map listMembers( + String sessionId, + Map queryParams + ) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 125. + +*** + +### listRecordings + +#### Signature + + + + ```java + public Map listRecordings(String sessionId) + ``` + + + + ```java + public Map listRecordings( + String sessionId, + Map queryParams + ) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 133. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 93. diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/video-rooms/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/video-rooms/index.mdx new file mode 100644 index 0000000000..4be5c253d7 --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/video-rooms/index.mdx @@ -0,0 +1,161 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/video-namespace/video-rooms" +title: "VideoRooms" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.VideoNamespace.VideoRooms" + parent: "rest.namespaces.namespaces.VideoNamespace" + module: "rest.namespaces.namespaces.VideoNamespace" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java" + visibility: "public" +--- +# `VideoRooms` + +Video room management with stream sub-resources. + +Update uses PUT. + +**Modifiers:** `static` + +## Signature + +```java +public static class VideoRooms extends CrudResource +``` + +## Inheritance + +**Extends:** [CrudResource](/docs/sdk-reference/reference/java/rest/rest/crud-resource) + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient, String basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 67. + +*** + +### createStream + +#### Signature + +```java +public Map createStream(String roomId, Map body) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 84. + +*** + +### listStreams + +#### Signature + + + + ```java + public Map listStreams(String roomId) + ``` + + + + ```java + public Map listStreams( + String roomId, + Map queryParams + ) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 76. + +*** + +### update + +**Decorators:** `@Override` + +#### Signature + +```java +public Map update(String roomId, Map body) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 71. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 65. diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/video-streams/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/video-streams/index.mdx new file mode 100644 index 0000000000..49da1710ca --- /dev/null +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/video-streams/index.mdx @@ -0,0 +1,148 @@ +--- +slug: "/reference/java/rest/namespaces/namespaces/video-namespace/video-streams" +title: "VideoStreams" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.namespaces.VideoNamespace.VideoStreams" + parent: "rest.namespaces.namespaces.VideoNamespace" + module: "rest.namespaces.namespaces.VideoNamespace" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java" + visibility: "public" +--- +# `VideoStreams` + +Top-level streams resource (per stream id): get / update (PUT) / delete. + +**Modifiers:** `static` + +## Signature + +```java +public static class VideoStreams +``` + +## Methods + +### \ + +#### Signature + +```java +public (HttpClient httpClient, String basePath) +``` + +#### Parameters + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 255. + +*** + +### delete + +#### Signature + +```java +public Map delete(String streamId) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 270. + +*** + +### get + +#### Signature + +```java +public Map get(String streamId) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 262. + +*** + +### getBasePath + +#### Signature + +```java +public String getBasePath() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 260. + +*** + +### update + +#### Signature + +```java +public Map update(String streamId, Map body) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 266. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java) + +Line 250. diff --git a/fern/products/sdk-reference/java/rest/rest/crud-resource/index.mdx b/fern/products/sdk-reference/java/rest/rest/crud-resource/index.mdx new file mode 100644 index 0000000000..9c10627f3c --- /dev/null +++ b/fern/products/sdk-reference/java/rest/rest/crud-resource/index.mdx @@ -0,0 +1,259 @@ +--- +slug: "/reference/java/rest/rest/crud-resource" +title: "CrudResource" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.CrudResource" + parent: "rest.rest" + module: "rest.rest" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/CrudResource.java" + visibility: "public" +--- +# `CrudResource` + +Generic CRUD resource for REST API namespaces. + +<p> +Provides standard list, get, create, update, and delete operations +against a base path. + +Used by namespace classes to avoid repetitive +HTTP boilerplate. + +<pre>numbers = new CrudResource(httpClient, "/phone_numbers"); +var all = numbers.list(); +var one = numbers.get("pn-abc-123");</pre> + +## Signature + +```java +public class CrudResource +``` + +## Methods + +### \ + +Create a CRUD resource. + +#### Signature + +```java +public (HttpClient httpClient, String basePath) +``` + +#### Parameters + + + the HTTP client + + + + base path for this resource (e.g., "/phone\_numbers") + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/CrudResource.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/CrudResource.java) + +Line 35. + +*** + +### create + +Create a new resource. + +#### Signature + +```java +public Map create(Map body) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/CrudResource.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/CrudResource.java) + +Line 64. + +*** + +### delete + +Delete a resource by ID. + +#### Signature + +```java +public Map delete(String id) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/CrudResource.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/CrudResource.java) + +Line 78. + +*** + +### get + +Get a single resource by ID. + +#### Signature + +```java +public Map get(String id) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/CrudResource.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/CrudResource.java) + +Line 57. + +*** + +### getBasePath + +Get the base path for this resource. + +#### Signature + +```java +public String getBasePath() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/CrudResource.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/CrudResource.java) + +Line 85. + +*** + +### getHttpClient + +Get the underlying HTTP client. + +#### Signature + +```java +public HttpClient getHttpClient() +``` + +#### Returns + +`HttpClient` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/CrudResource.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/CrudResource.java) + +Line 92. + +*** + +### list + +List all resources. + +#### Signature + + + + ```java + public Map list() + ``` + + + + ```java + public Map list(Map queryParams) + ``` + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/CrudResource.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/CrudResource.java) + +Line 43. + +*** + +### update + +Update an existing resource by ID. + +#### Signature + +```java +public Map update(String id, Map body) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/CrudResource.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/CrudResource.java) + +Line 71. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/CrudResource.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/CrudResource.java) + +Line 24. diff --git a/fern/products/sdk-reference/java/rest/rest/http-client/index.mdx b/fern/products/sdk-reference/java/rest/rest/http-client/index.mdx new file mode 100644 index 0000000000..37296e8d6b --- /dev/null +++ b/fern/products/sdk-reference/java/rest/rest/http-client/index.mdx @@ -0,0 +1,317 @@ +--- +slug: "/reference/java/rest/rest/http-client" +title: "HttpClient" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.HttpClient" + parent: "rest.rest" + module: "rest.rest" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/HttpClient.java" + visibility: "public" +--- +# `HttpClient` + +HTTP client for the SignalWire REST API. + +<p> +Uses `java.net.http.HttpClient` (JDK 11+ built-in) with Basic Auth +and JSON content types. + +Provides low-level GET, POST, PUT, DELETE methods +used by `CrudResource` and namespace classes. + +## Signature + +```java +public class HttpClient +``` + +## Methods + +### \ + +Create an HTTP client. + +#### Signature + + + + ```java + public (String space, String project, String token) + ``` + + + + ```java + private (String baseUrl, String project, String token, Void marker) + ``` + + + +#### Parameters (Overload 1) + + + SignalWire space (e.g., "example.signalwire.com") + + + + project ID used as Basic Auth username + + + + API token used as Basic Auth password + + +#### Parameters (Overload 2) + + + + + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/HttpClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/HttpClient.java) + +Line 46. + +*** + +### delete + +DELETE request. + +#### Signature + +```java +public Map delete(String path) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/HttpClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/HttpClient.java) + +Line 146. + +*** + +### get + +GET request, returns parsed JSON as a Map. + +#### Signature + + + + ```java + public Map get(String path) + ``` + + + + ```java + public Map get(String path, Map queryParams) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`Map` + +#### Returns (Overload 2) + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/HttpClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/HttpClient.java) + +Line 88. + +*** + +### getBaseUrl + +Get the base URL. + +#### Signature + +```java +public String getBaseUrl() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/HttpClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/HttpClient.java) + +Line 157. + +*** + +### patch + +PATCH request with JSON body. + +java.net.http.HttpRequest doesn't have a +dedicated builder for PATCH, so use ...). + +#### Signature + +```java +public Map patch(String path, Map body) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/HttpClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/HttpClient.java) + +Line 133. + +*** + +### post + +POST request with JSON body. + +#### Signature + +```java +public Map post(String path, Map body) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/HttpClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/HttpClient.java) + +Line 106. + +*** + +### put + +PUT request with JSON body. + +#### Signature + +```java +public Map put(String path, Map body) +``` + +#### Parameters + + + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/HttpClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/HttpClient.java) + +Line 119. + +*** + +### withBaseUrl + +Create an HTTP client with an explicit base URL (e.g., plain HTTP for +local integration tests, or to point a `RestClient` at an audit +fixture). + +Production callers use the project, token) +constructor instead. + +**Modifiers:** `static` + +#### Signature + +```java +public static HttpClient withBaseUrl( + String baseUrl, + String project, + String token +) +``` + +#### Parameters + + + fully qualified base URL ending in `/api` + + + + project ID used as Basic Auth username + + + + API token used as Basic Auth password + + +#### Returns + +`HttpClient` — a configured HTTP client + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/HttpClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/HttpClient.java) + +Line 68. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/HttpClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/HttpClient.java) + +Line 29. diff --git a/fern/products/sdk-reference/java/rest/rest/index.mdx b/fern/products/sdk-reference/java/rest/rest/index.mdx new file mode 100644 index 0000000000..d28372ea34 --- /dev/null +++ b/fern/products/sdk-reference/java/rest/rest/index.mdx @@ -0,0 +1,211 @@ +--- +slug: "/reference/java/rest/rest" +title: "rest" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "rest.rest" + parent: "com.signalwire.sdk.rest" + module: "rest" +--- +# `rest` + +## Classes + + + + Generic CRUD resource for REST API namespaces. <p> Provides standard list, get, create, update, and delete operations against a base path. + + + + HTTP client for the SignalWire REST API. <p> Uses `java.net.http.HttpClient` (JDK 11+ built-in) with Basic Auth and JSON content types. + + + + Iterator that walks paged REST responses by following the `links.next` cursor. <p>Mirrors `signalwire.rest._pagination.PaginatedIterator`: the constructor records the `http` client, path, query params, and the data-list key without performing an HTTP fetch. + + + + SignalWire REST API client with all 21 namespaces. <p> Uses `java.net.http.HttpClient` with Basic Auth. + + + + Exception for SignalWire REST API errors. <p> Contains the HTTP status code and error message from the server. + + + +## Modules + + + + + +## Enums + +### PhoneCallHandler + +Values accepted for `call_handler` on +java.util.Map) phoneNumbers().update. + +<p> +Named `PhoneCallHandler` (not `CallHandler`) to avoid colliding +with the RELAY client's inbound-call-handler callback type. +<p> +Setting a phone number's `call_handler` + the handler-specific +companion field routes inbound calls and auto-materializes the matching +Fabric resource on the server. + +See the typed helpers on +`com.signalwire.sdk.rest.namespaces.PhoneNumbersNamespace` +(`setSwmlWebhook`, `setCxmlWebhook`, ...). + +<p>Binding table: +<pre> +Enum member Companion field (required) Auto-creates resource +----------------- -------------------------------- --------------------- +RELAY_SCRIPT call_relay_script_url swml_webhook +LAML_WEBHOOKS call_request_url cxml_webhook +LAML_APPLICATION call_laml_application_id cxml_application +AI_AGENT call_ai_agent_id ai_agent +CALL_FLOW call_flow_id call_flow +RELAY_APPLICATION call_relay_application relay_application +RELAY_TOPIC call_relay_topic (routes via RELAY) +RELAY_CONTEXT call_relay_context (legacy, prefer topic) +RELAY_CONNECTOR (connector config) (internal) +VIDEO_ROOM call_video_room_id (routes to Video API) +DIALOGFLOW call_dialogflow_agent_id (none) +</pre> + +<p>Note: `#LAML_WEBHOOKS` (wire value `laml_webhooks`) produces +a <b>cXML</b> handler, not a generic webhook. For SWML, use +`#RELAY_SCRIPT`. + +#### Signature + +```java +public enum PhoneCallHandler +``` + +#### Variants + + + + + + + + + + + + + + + + + + + + + + + +#### Methods + +##### toString + +Returns the wire value so this enum serializes transparently into +request bodies without an explicit `.wireValue()` indirection. + +**Decorators:** `@Override` + +###### Signature + +```java +public String toString() +``` + +###### Returns + +`String` + +###### Source + +[`src/main/java/com/signalwire/sdk/rest/PhoneCallHandler.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/PhoneCallHandler.java) + +Line 74. + +*** + +##### valueOf + +**Modifiers:** `static` + +###### Signature + +```java +public static PhoneCallHandler valueOf(String name) +``` + +###### Parameters + + + +###### Returns + +`PhoneCallHandler` + +###### Source + +[`src/main/java/com/signalwire/sdk/rest/PhoneCallHandler.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/PhoneCallHandler.java) + +*** + +##### values + +**Modifiers:** `static` + +###### Signature + +```java +public static PhoneCallHandler[] values() +``` + +###### Returns + +`PhoneCallHandler[]` + +###### Source + +[`src/main/java/com/signalwire/sdk/rest/PhoneCallHandler.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/PhoneCallHandler.java) + +*** + +##### wireValue + +The wire value sent on the `call_handler` field. + +###### Signature + +```java +public String wireValue() +``` + +###### Returns + +`String` + +###### Source + +[`src/main/java/com/signalwire/sdk/rest/PhoneCallHandler.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/PhoneCallHandler.java) + +Line 66. + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/PhoneCallHandler.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/PhoneCallHandler.java) + +Line 43. diff --git a/fern/products/sdk-reference/java/rest/rest/paginated-iterator/index.mdx b/fern/products/sdk-reference/java/rest/rest/paginated-iterator/index.mdx new file mode 100644 index 0000000000..508bb0a698 --- /dev/null +++ b/fern/products/sdk-reference/java/rest/rest/paginated-iterator/index.mdx @@ -0,0 +1,176 @@ +--- +slug: "/reference/java/rest/rest/paginated-iterator" +title: "PaginatedIterator" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.PaginatedIterator" + parent: "rest.rest" + module: "rest.rest" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/PaginatedIterator.java" + visibility: "public" +--- +# `PaginatedIterator` + +Iterator that walks paged REST responses by following the +`links.next` cursor. + +<p>Mirrors `signalwire.rest._pagination.PaginatedIterator`: the +constructor records the `http` client, path, query params, and the +data-list key without performing an HTTP fetch. + +Each call to +`#next()` returns the next item from the buffered page; when the +buffer is exhausted the iterator follows `links.next`, parses the +URL query into the next request's params, and fetches the next page. + +<p>Iteration terminates when the buffer is empty and a fetched response +either lacks a `links.next` cursor or returns an empty data list. + +**Modifiers:** `final` + +## Signature + +```java +public final class PaginatedIterator implements Iterator>, Iterable> +``` + +## Inheritance + +**Implements:** `Iterator>`, `Iterable>` + +## Methods + +### \ + +#### Signature + + + + ```java + public (HttpClient http, String path) + ``` + + + + ```java + public (HttpClient http, String path, Map params) + ``` + + + + ```java + public ( + HttpClient http, + String path, + Map params, + String dataKey + ) + ``` + + + +#### Parameters (Overload 1) + + + + + +#### Parameters (Overload 2) + + + + + + + +#### Parameters (Overload 3) + + + + + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/PaginatedIterator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/PaginatedIterator.java) + +Line 46. + +*** + +### hasNext + +**Decorators:** `@Override` + +#### Signature + +```java +public boolean hasNext() +``` + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/PaginatedIterator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/PaginatedIterator.java) + +Line 67. + +*** + +### iterator + +**Decorators:** `@Override` + +#### Signature + +```java +public PaginatedIterator iterator() +``` + +#### Returns + +`PaginatedIterator` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/PaginatedIterator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/PaginatedIterator.java) + +Line 62. + +*** + +### next + +**Decorators:** `@Override` + +#### Signature + +```java +public Map next() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/PaginatedIterator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/PaginatedIterator.java) + +Line 78. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/PaginatedIterator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/PaginatedIterator.java) + +Line 34. diff --git a/fern/products/sdk-reference/java/rest/rest/rest-client/builder/index.mdx b/fern/products/sdk-reference/java/rest/rest/rest-client/builder/index.mdx new file mode 100644 index 0000000000..a378bf616b --- /dev/null +++ b/fern/products/sdk-reference/java/rest/rest/rest-client/builder/index.mdx @@ -0,0 +1,136 @@ +--- +slug: "/reference/java/rest/rest/rest-client/builder" +title: "Builder" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.RestClient.Builder" + parent: "rest.rest.RestClient" + module: "rest.rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java" + visibility: "public" +--- +# `Builder` + +**Modifiers:** `static` + +## Signature + +```java +public static class Builder +``` + +## Methods + +### \ + +#### Signature + +```java +public () +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +*** + +### build + +#### Signature + +```java +public RestClient build() +``` + +#### Returns + +`RestClient` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 126. + +*** + +### project + +#### Signature + +```java +public Builder project(String project) +``` + +#### Parameters + + + +#### Returns + +`Builder` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 116. + +*** + +### space + +#### Signature + +```java +public Builder space(String space) +``` + +#### Parameters + + + +#### Returns + +`Builder` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 118. + +*** + +### token + +#### Signature + +```java +public Builder token(String token) +``` + +#### Parameters + + + +#### Returns + +`Builder` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 117. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 110. diff --git a/fern/products/sdk-reference/java/rest/rest/rest-client/index.mdx b/fern/products/sdk-reference/java/rest/rest/rest-client/index.mdx new file mode 100644 index 0000000000..523319a5c3 --- /dev/null +++ b/fern/products/sdk-reference/java/rest/rest/rest-client/index.mdx @@ -0,0 +1,775 @@ +--- +slug: "/reference/java/rest/rest/rest-client" +title: "RestClient" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.RestClient" + parent: "rest.rest" + module: "rest.rest" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java" + visibility: "public" +--- +# `RestClient` + +SignalWire REST API client with all 21 namespaces. + +<p> +Uses `java.net.http.HttpClient` with Basic Auth. + +Each namespace +provides typed access to a group of API resources. + +<pre>client = RestClient.builder() + .project("project-id") + .token("api-token") + .space("example.signalwire.com") + .build(); + +var numbers = client.phoneNumbers().list(); +var docs = client.datasphere().documents().list();</pre> + +## Signature + +```java +public class RestClient +``` + +## Methods + +### addresses + +#### Signature + +```java +public AddressesNamespace addresses() +``` + +#### Returns + +`AddressesNamespace` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 254. + +*** + +### billing + +#### Signature + +```java +public BillingNamespace billing() +``` + +#### Returns + +`BillingNamespace` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 212. + +*** + +### builder + +**Modifiers:** `static` + +#### Signature + +```java +public static Builder builder() +``` + +#### Returns + +`Builder` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 106. + +*** + +### calling + +#### Signature + +```java +public CallingNamespace calling() +``` + +#### Returns + +`CallingNamespace` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 147. + +*** + +### campaign + +#### Signature + +```java +public CampaignNamespace campaign() +``` + +#### Returns + +`CampaignNamespace` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 202. + +*** + +### chat + +#### Signature + +```java +public ChatNamespace chat() +``` + +#### Returns + +`ChatNamespace` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 187. + +*** + +### compat + +#### Signature + +```java +public CompatNamespace compat() +``` + +#### Returns + +`CompatNamespace` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 167. + +*** + +### compliance + +#### Signature + +```java +public ComplianceNamespace compliance() +``` + +#### Returns + +`ComplianceNamespace` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 207. + +*** + +### conferences + +#### Signature + +```java +public ConferenceNamespace conferences() +``` + +#### Returns + +`ConferenceNamespace` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 232. + +*** + +### datasphere + +#### Signature + +```java +public DatasphereNamespace datasphere() +``` + +#### Returns + +`DatasphereNamespace` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 157. + +*** + +### fabric + +#### Signature + +```java +public FabricNamespace fabric() +``` + +#### Returns + +`FabricNamespace` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 142. + +*** + +### fax + +#### Signature + +```java +public FaxNamespace fax() +``` + +#### Returns + +`FaxNamespace` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 182. + +*** + +### getHttpClient + +#### Signature + +```java +public HttpClient getHttpClient() +``` + +#### Returns + +`HttpClient` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 138. + +*** + +### getProject + +#### Signature + +```java +public String getProject() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 136. + +*** + +### getSpace + +#### Signature + +```java +public String getSpace() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 137. + +*** + +### importedNumbers + +#### Signature + +```java +public ImportedNumbersNamespace importedNumbers() +``` + +#### Returns + +`ImportedNumbersNamespace` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 264. + +*** + +### logs + +#### Signature + +```java +public LogsNamespace logs() +``` + +#### Returns + +`LogsNamespace` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 289. + +*** + +### messaging + +#### Signature + +```java +public MessagingNamespace messaging() +``` + +#### Returns + +`MessagingNamespace` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 172. + +*** + +### mfa + +#### Signature + +```java +public MfaNamespace mfa() +``` + +#### Returns + +`MfaNamespace` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 269. + +*** + +### numberGroups + +#### Signature + +```java +public NumberGroupsNamespace numberGroups() +``` + +#### Returns + +`NumberGroupsNamespace` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 279. + +*** + +### numberLookup + +#### Signature + +```java +public NumberLookupNamespace numberLookup() +``` + +#### Returns + +`NumberLookupNamespace` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 227. + +*** + +### phoneNumbers + +#### Signature + +```java +public PhoneNumbersNamespace phoneNumbers() +``` + +#### Returns + +`PhoneNumbersNamespace` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 152. + +*** + +### project + +#### Signature + +```java +public ProjectNamespace project() +``` + +#### Returns + +`ProjectNamespace` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 217. + +*** + +### pubSub + +#### Signature + +```java +public PubSubNamespace pubSub() +``` + +#### Returns + +`PubSubNamespace` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 192. + +*** + +### queues + +#### Signature + +```java +public QueueNamespace queues() +``` + +#### Returns + +`QueueNamespace` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 237. + +*** + +### recordings + +#### Signature + +```java +public RecordingNamespace recordings() +``` + +#### Returns + +`RecordingNamespace` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 242. + +*** + +### registry + +#### Signature + +```java +public RegistryNamespace registry() +``` + +#### Returns + +`RegistryNamespace` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 284. + +*** + +### shortCodes + +#### Signature + +```java +public ShortCodesNamespace shortCodes() +``` + +#### Returns + +`ShortCodesNamespace` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 259. + +*** + +### sip + +#### Signature + +```java +public SipNamespace sip() +``` + +#### Returns + +`SipNamespace` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 177. + +*** + +### sipProfile + +#### Signature + +```java +public SipProfileNamespace sipProfile() +``` + +#### Returns + +`SipProfileNamespace` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 274. + +*** + +### streams + +#### Signature + +```java +public StreamNamespace streams() +``` + +#### Returns + +`StreamNamespace` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 222. + +*** + +### swml + +#### Signature + +```java +public SwmlNamespace swml() +``` + +#### Returns + +`SwmlNamespace` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 197. + +*** + +### transcriptions + +#### Signature + +```java +public TranscriptionNamespace transcriptions() +``` + +#### Returns + +`TranscriptionNamespace` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 247. + +*** + +### video + +#### Signature + +```java +public VideoNamespace video() +``` + +#### Returns + +`VideoNamespace` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 162. + +*** + +### withBaseUrl + +Build a `RestClient` pointed at an explicit base URL — typically +a loopback fixture used by the porting-sdk's REST-transport audit. + +The +returned client signs requests with the given `project`/`token` +pair via Basic Auth and routes every namespace's HTTP through the +fixture instead of the live SignalWire space. + +**Modifiers:** `static` + +#### Signature + +```java +public static RestClient withBaseUrl( + String baseUrl, + String project, + String token +) +``` + +#### Parameters + + + fully qualified base URL (e.g. `"http://127.0.0.1:NNNN/api"`); `"/api"` is appended if not already present + + + + project ID used as the Basic Auth username + + + + API token used as the Basic Auth password + + +#### Returns + +`RestClient` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 89. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/RestClient.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java) + +Line 30. diff --git a/fern/products/sdk-reference/java/rest/rest/rest-client/index__2.mdx b/fern/products/sdk-reference/java/rest/rest/rest-client/index__2.mdx new file mode 100644 index 0000000000..37df8b22f4 --- /dev/null +++ b/fern/products/sdk-reference/java/rest/rest/rest-client/index__2.mdx @@ -0,0 +1,20 @@ +--- +slug: "/reference/java/rest/rest/rest-client/index__2" +title: "RestClient" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "module" + language: "java" + qualified_name: "rest.rest.RestClient" + parent: "rest.rest" + module: "rest.rest" +--- +# `RestClient` + +## Classes + + + + diff --git a/fern/products/sdk-reference/java/rest/rest/rest-error/index.mdx b/fern/products/sdk-reference/java/rest/rest/rest-error/index.mdx new file mode 100644 index 0000000000..5c33b82179 --- /dev/null +++ b/fern/products/sdk-reference/java/rest/rest/rest-error/index.mdx @@ -0,0 +1,259 @@ +--- +slug: "/reference/java/rest/rest/rest-error" +title: "RestError" +sdk_label: "Java SDK" +icon: "java" +lustri: + auto_generated: true + kind: "class" + language: "java" + qualified_name: "com.signalwire.sdk.rest.RestError" + parent: "rest.rest" + module: "rest.rest" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestError.java" + visibility: "public" +--- +# `RestError` + +Exception for SignalWire REST API errors. + +<p> +Contains the HTTP status code and error message from the server. + +## Signature + +```java +public class RestError extends RuntimeException +``` + +## Inheritance + +**Extends:** `RuntimeException` + +## Methods + +### \ + +#### Signature + + + + ```java + public (int statusCode, String method, String path, String responseBody) + ``` + + + + ```java + public ( + int statusCode, + String method, + String path, + String responseBody, + Throwable cause + ) + ``` + + + +#### Parameters (Overload 1) + + + + + + + + + +#### Parameters (Overload 2) + + + + + + + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestError.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestError.java) + +Line 21. + +*** + +### getMethod + +#### Signature + +```java +public String getMethod() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestError.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestError.java) + +Line 41. + +*** + +### getPath + +#### Signature + +```java +public String getPath() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestError.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestError.java) + +Line 45. + +*** + +### getResponseBody + +#### Signature + +```java +public String getResponseBody() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestError.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestError.java) + +Line 49. + +*** + +### getStatusCode + +#### Signature + +```java +public int getStatusCode() +``` + +#### Returns + +`int` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestError.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestError.java) + +Line 37. + +*** + +### isClientError + +Whether the error is a client error (4xx). + +#### Signature + +```java +public boolean isClientError() +``` + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestError.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestError.java) + +Line 56. + +*** + +### isNotFound + +Whether the resource was not found (404). + +#### Signature + +```java +public boolean isNotFound() +``` + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestError.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestError.java) + +Line 70. + +*** + +### isServerError + +Whether the error is a server error (5xx). + +#### Signature + +```java +public boolean isServerError() +``` + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestError.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestError.java) + +Line 63. + +*** + +### isUnauthorized + +Whether access was denied (401 or 403). + +#### Signature + +```java +public boolean isUnauthorized() +``` + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/RestError.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestError.java) + +Line 77. + +## Source + +[`src/main/java/com/signalwire/sdk/rest/RestError.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestError.java) + +Line 14. diff --git a/fern/products/sdk-reference/perl/_meta.json b/fern/products/sdk-reference/perl/_meta.json index 2e78d0fb81..3d0ed6b7a4 100644 --- a/fern/products/sdk-reference/perl/_meta.json +++ b/fern/products/sdk-reference/perl/_meta.json @@ -6,5 +6,5 @@ "format": "mdx", "platform": "fern", "base_slug": "/reference/perl", - "item_count": 898 + "item_count": 983 } \ No newline at end of file diff --git a/fern/products/sdk-reference/perl/agents/agent/agent-base/agent-base/index.mdx b/fern/products/sdk-reference/perl/agents/agent/agent-base/agent-base/index.mdx new file mode 100644 index 0000000000..2965521a5e --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/agent/agent-base/agent-base/index.mdx @@ -0,0 +1,1343 @@ +--- +slug: "/reference/perl/agents/agent/agent-base/agent-base" +title: "AgentBase" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Agent::AgentBase" + parent: "agents.Agent.AgentBase" + module: "agents.Agent.AgentBase" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm" +--- +# `AgentBase` + +## Signature + +```perl +package SignalWire::Agent::AgentBase +``` + +## Inheritance + +**Extends:** [SignalWire::SWML::Service](/docs/sdk-reference/reference/perl/agents/swml/service/service) + +## Methods + +### add\_function\_include + +#### Signature + +```perl +sub add_function_include($include) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 659. + +*** + +### add\_hint + +#### Signature + +```perl +sub add_hint($hint) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 415. + +*** + +### add\_hints + +#### Signature + +```perl +sub add_hints($hints) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 421. + +*** + +### add\_internal\_filler + +#### Signature + +```perl +sub add_internal_filler(@args) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 616. + +*** + +### add\_language + +#### Signature + +```perl +sub add_language(@lang) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 447. + +*** + +### add\_mcp\_server + +#### Signature + +```perl +sub add_mcp_server($url, %opts) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 899. + +*** + +### add\_pattern\_hint + +#### Signature + +```perl +sub add_pattern_hint($pattern) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 441. + +*** + +### add\_post\_ai\_verb + +#### Signature + +```perl +sub add_post_ai_verb($verb_name, $verb_config) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 697. + +*** + +### add\_post\_answer\_verb + +#### Signature + +```perl +sub add_post_answer_verb($verb_name, $verb_config) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 691. + +*** + +### add\_pre\_answer\_verb + +#### Signature + +```perl +sub add_pre_answer_verb($verb_name, $verb_config) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 685. + +*** + +### add\_pronunciation + +#### Signature + +```perl +sub add_pronunciation(@pron) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 500. + +*** + +### add\_skill + +#### Signature + +```perl +sub add_skill($skill_name, $params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 807. + +*** + +### add\_swaig\_query\_params + +#### Signature + +```perl +sub add_swaig_query_params(@params) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 854. + +*** + +### BUILD + +#### Signature + +```perl +sub BUILD() +``` + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 161. + +*** + +### clear\_post\_ai\_verbs + +#### Signature + +```perl +sub clear_post_ai_verbs() +``` + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 715. + +*** + +### clear\_post\_answer\_verbs + +#### Signature + +```perl +sub clear_post_answer_verbs() +``` + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 709. + +*** + +### clear\_pre\_answer\_verbs + +#### Signature + +```perl +sub clear_pre_answer_verbs() +``` + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 703. + +*** + +### clear\_swaig\_query\_params + +#### Signature + +```perl +sub clear_swaig_query_params() +``` + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 860. + +*** + +### contexts + +#### Signature + +```perl +sub contexts() +``` + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 800. + +*** + +### create\_tool\_token + +#### Signature + +```perl +sub create_tool_token($tool_name, $call_id) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 378. + +*** + +### define\_contexts + +#### Signature + +```perl +sub define_contexts($contexts) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 735. + +*** + +### enable\_debug\_events + +#### Signature + +```perl +sub enable_debug_events($level) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 652. + +*** + +### enable\_mcp\_server + +#### Signature + +```perl +sub enable_mcp_server() +``` + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 909. + +*** + +### extract\_sip\_username + +#### Signature + +```perl +sub extract_sip_username($class_or_self, $body) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 1725. + +*** + +### get\_contexts + +#### Signature + +```perl +sub get_contexts() +``` + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 311. + +*** + +### get\_full\_url + +#### Signature + +```perl +sub get_full_url(%opts) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 1096. + +*** + +### get\_language\_params + +#### Signature + +```perl +sub get_language_params($code) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 491. + +*** + +### get\_post\_prompt + +#### Signature + +```perl +sub get_post_prompt() +``` + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 276. + +*** + +### get\_prompt + +#### Signature + +```perl +sub get_prompt() +``` + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 240. + +*** + +### get\_raw\_prompt + +#### Signature + +```perl +sub get_raw_prompt() +``` + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 286. + +*** + +### has\_skill + +#### Signature + +```perl +sub has_skill($skill_name) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 823. + +*** + +### list\_skills + +#### Signature + +```perl +sub list_skills() +``` + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 818. + +*** + +### list\_tool\_names + +#### Signature + +```perl +sub list_tool_names() +``` + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 795. + +*** + +### manual\_set\_proxy\_url + +#### Signature + +```perl +sub manual_set_proxy_url($url) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 848. + +*** + +### on\_debug\_event + +#### Signature + +```perl +sub on_debug_event($cb) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 891. + +*** + +### on\_summary + +#### Signature + +```perl +sub on_summary($summary, $raw_data) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 866. + +*** + +### pom + +#### Signature + +```perl +sub pom() +``` + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 257. + +*** + +### prompt\_add\_section + +#### Signature + +```perl +sub prompt_add_section($title, $body, %opts) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 190. + +*** + +### prompt\_add\_subsection + +#### Signature + +```perl +sub prompt_add_subsection($parent_title, $title, $body, %opts) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 201. + +*** + +### prompt\_add\_to\_section + +#### Signature + +```perl +sub prompt_add_to_section($title, %opts) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 215. + +*** + +### prompt\_has\_section + +#### Signature + +```perl +sub prompt_has_section($title) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 232. + +*** + +### psgi\_app + +#### Signature + +```perl +sub psgi_app() +``` + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 1271. + +*** + +### remove\_skill + +#### Signature + +```perl +sub remove_skill($skill_name) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 813. + +*** + +### render\_swml + +#### Signature + +```perl +sub render_swml($request_env) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 1111. + +*** + +### reset\_contexts + +#### Signature + +```perl +sub reset_contexts() +``` + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 782. + +*** + +### run + +#### Signature + +```perl +sub run(%opts) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 1620. + +*** + +### serve + +#### Signature + +```perl +sub serve(%opts) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 1625. + +*** + +### set\_answer\_config + +#### Signature + +```perl +sub set_answer_config($config) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 721. + +*** + +### set\_dynamic\_config\_callback + +#### Signature + +```perl +sub set_dynamic_config_callback($cb) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 830. + +*** + +### set\_function\_includes + +#### Signature + +```perl +sub set_function_includes($includes) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 665. + +*** + +### set\_global\_data + +#### Signature + +```perl +sub set_global_data($data) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 524. + +*** + +### set\_internal\_fillers + +#### Signature + +```perl +sub set_internal_fillers($fillers) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 584. + +*** + +### set\_language\_params + +#### Signature + +```perl +sub set_language_params($code, $params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 474. + +*** + +### set\_languages + +#### Signature + +```perl +sub set_languages($langs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 464. + +*** + +### set\_native\_functions + +#### Signature + +```perl +sub set_native_functions($funcs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 536. + +*** + +### set\_param + +#### Signature + +```perl +sub set_param($key, $value) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 512. + +*** + +### set\_params + +#### Signature + +```perl +sub set_params($p) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 518. + +*** + +### set\_post\_prompt + +#### Signature + +```perl +sub set_post_prompt($text) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 184. + +*** + +### set\_post\_prompt\_llm\_params + +#### Signature + +```perl +sub set_post_prompt_llm_params(@p) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 677. + +*** + +### set\_post\_prompt\_url + +#### Signature + +```perl +sub set_post_prompt_url($url) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 842. + +*** + +### set\_prompt\_llm\_params + +#### Signature + +```perl +sub set_prompt_llm_params(@p) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 671. + +*** + +### set\_prompt\_pom + +#### Signature + +```perl +sub set_prompt_pom($pom) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 298. + +*** + +### set\_prompt\_text + +#### Signature + +```perl +sub set_prompt_text($text) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 178. + +*** + +### set\_pronunciations + +#### Signature + +```perl +sub set_pronunciations($prons) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 506. + +*** + +### set\_web\_hook\_url + +#### Signature + +```perl +sub set_web_hook_url($url) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 836. + +*** + +### update\_global\_data + +#### Signature + +```perl +sub update_global_data($data) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 530. + +*** + +### validate\_tool\_token + +#### Signature + +```perl +sub validate_tool_token($function_name, $token, $call_id) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 396. + +## Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/agent/agent-base/index.mdx b/fern/products/sdk-reference/perl/agents/agent/agent-base/index.mdx new file mode 100644 index 0000000000..1eb65803f4 --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/agent/agent-base/index.mdx @@ -0,0 +1,20 @@ +--- +slug: "/reference/perl/agents/agent/agent-base" +title: "AgentBase" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "agents.Agent.AgentBase" + parent: "agents.Agent" + module: "agents.Agent" +--- +# `AgentBase` + +## Classes + + + + diff --git a/fern/products/sdk-reference/perl/agents/agent/index.mdx b/fern/products/sdk-reference/perl/agents/agent/index.mdx new file mode 100644 index 0000000000..fc096df414 --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/agent/index.mdx @@ -0,0 +1,20 @@ +--- +slug: "/reference/perl/agents/agent" +title: "Agent" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "agents.Agent" + parent: "agents" + module: "agents" +--- +# `Agent` + +## Modules + + + + diff --git a/fern/products/sdk-reference/perl/agents/index.mdx b/fern/products/sdk-reference/perl/agents/index.mdx new file mode 100644 index 0000000000..6ce3433a7b --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/index.mdx @@ -0,0 +1,30 @@ +--- +slug: "/reference/perl/agents" +title: "agents" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "agents" +--- +# `agents` + +## Modules + + + + + + + + + + + + + + + + diff --git a/fern/products/sdk-reference/perl/agents/pom/index.mdx b/fern/products/sdk-reference/perl/agents/pom/index.mdx new file mode 100644 index 0000000000..803070e50b --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/pom/index.mdx @@ -0,0 +1,22 @@ +--- +slug: "/reference/perl/agents/pom" +title: "POM" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "agents.POM" + parent: "agents" + module: "agents" +--- +# `POM` + +## Modules + + + + + + diff --git a/fern/products/sdk-reference/perl/agents/pom/prompt-object-model/index.mdx b/fern/products/sdk-reference/perl/agents/pom/prompt-object-model/index.mdx new file mode 100644 index 0000000000..56cdd8a4b2 --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/pom/prompt-object-model/index.mdx @@ -0,0 +1,22 @@ +--- +slug: "/reference/perl/agents/pom/prompt-object-model" +title: "PromptObjectModel" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "agents.POM.PromptObjectModel" + parent: "agents.POM" + module: "agents.POM" +--- +# `PromptObjectModel` + +## Classes + + + + SignalWire::POM::PromptObjectModel is a Perl port of `signalwire.pom.pom.PromptObjectModel` from the Python SignalWire SDK. It owns an ordered list of SignalWire::POM::Section objects and provides JSON / YAML serialisation, Markdown / XML rendering, recursive title-based search, and POM-merging via `add_pom_as_subsection`. + + diff --git a/fern/products/sdk-reference/perl/agents/pom/prompt-object-model/prompt-object-model/index.mdx b/fern/products/sdk-reference/perl/agents/pom/prompt-object-model/prompt-object-model/index.mdx new file mode 100644 index 0000000000..0d1ffe13a2 --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/pom/prompt-object-model/prompt-object-model/index.mdx @@ -0,0 +1,249 @@ +--- +slug: "/reference/perl/agents/pom/prompt-object-model/prompt-object-model" +title: "PromptObjectModel" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::POM::PromptObjectModel" + parent: "agents.POM.PromptObjectModel" + module: "agents.POM.PromptObjectModel" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/PromptObjectModel.pm" +--- +# `PromptObjectModel` + +SignalWire::POM::PromptObjectModel is a Perl port of `signalwire.pom.pom.PromptObjectModel` from the Python SignalWire SDK. It owns an ordered list of SignalWire::POM::Section objects and provides JSON / YAML serialisation, Markdown / XML rendering, recursive title-based search, and POM-merging via `add_pom_as_subsection`. + +The serialised form is byte-for-byte identical to the Python reference; prompts authored in either language can be loaded by the other. + +**Synopsis** + +```perl +use SignalWire::POM::PromptObjectModel; +``` + +```perl +my $pom = SignalWire::POM::PromptObjectModel->new; +my $sec = $pom->add_section( + title => 'Greeting', + body => 'You are a helpful assistant.', +); +$sec->add_subsection( + title => 'Tone', + body => 'Speak warmly.', +); +``` + +```perl +print $pom->render_markdown; +print $pom->render_xml; +``` + +```perl +my $json = $pom->to_json; +my $back = SignalWire::POM::PromptObjectModel->from_json($json); +``` + +## Signature + +```perl +package SignalWire::POM::PromptObjectModel +``` + +## See Also + +- \[SignalWire::POM::Section]\(xref://SignalWire::POM::Section) + +## Methods + +### add\_pom\_as\_subsection + +#### Signature + +```perl +sub add_pom_as_subsection($target, $pom_to_add) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/POM/PromptObjectModel.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/PromptObjectModel.pm) + +Line 322. + +*** + +### add\_section + +#### Signature + +```perl +sub add_section(%opts) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/POM/PromptObjectModel.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/PromptObjectModel.pm) + +Line 169. + +*** + +### find\_section + +#### Signature + +```perl +sub find_section($title) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/POM/PromptObjectModel.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/PromptObjectModel.pm) + +Line 198. + +*** + +### from\_json + +#### Signature + +```perl +sub from_json($class_or_self, $json_data) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/POM/PromptObjectModel.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/PromptObjectModel.pm) + +Line 48. + +*** + +### from\_yaml + +#### Signature + +```perl +sub from_yaml($class_or_self, $yaml_data) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/POM/PromptObjectModel.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/PromptObjectModel.pm) + +Line 67. + +*** + +### render\_markdown + +#### Signature + +```perl +sub render_markdown() +``` + +#### Source + +[`lib/SignalWire/POM/PromptObjectModel.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/PromptObjectModel.pm) + +Line 254. + +*** + +### render\_xml + +#### Signature + +```perl +sub render_xml() +``` + +#### Source + +[`lib/SignalWire/POM/PromptObjectModel.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/PromptObjectModel.pm) + +Line 285. + +*** + +### to\_hash + +#### Signature + +```perl +sub to_hash() +``` + +#### Source + +[`lib/SignalWire/POM/PromptObjectModel.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/PromptObjectModel.pm) + +Line 246. + +*** + +### to\_json + +#### Signature + +```perl +sub to_json() +``` + +#### Source + +[`lib/SignalWire/POM/PromptObjectModel.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/PromptObjectModel.pm) + +Line 217. + +*** + +### to\_yaml + +#### Signature + +```perl +sub to_yaml() +``` + +#### Source + +[`lib/SignalWire/POM/PromptObjectModel.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/PromptObjectModel.pm) + +Line 232. + +## Source + +[`lib/SignalWire/POM/PromptObjectModel.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/PromptObjectModel.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/pom/section/index.mdx b/fern/products/sdk-reference/perl/agents/pom/section/index.mdx new file mode 100644 index 0000000000..48d0628b40 --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/pom/section/index.mdx @@ -0,0 +1,22 @@ +--- +slug: "/reference/perl/agents/pom/section" +title: "Section" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "agents.POM.Section" + parent: "agents.POM" + module: "agents.POM" +--- +# `Section` + +## Classes + + + + SignalWire::POM::Section is a Perl port of `signalwire.pom.pom.Section` from the Python SignalWire SDK. Both implementations render byte-for-byte identical Markdown/XML/JSON output so prompts authored in either language can be consumed interchangeably. + + diff --git a/fern/products/sdk-reference/perl/agents/pom/section/section/index.mdx b/fern/products/sdk-reference/perl/agents/pom/section/section/index.mdx new file mode 100644 index 0000000000..11e343a274 --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/pom/section/section/index.mdx @@ -0,0 +1,171 @@ +--- +slug: "/reference/perl/agents/pom/section/section" +title: "Section" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::POM::Section" + parent: "agents.POM.Section" + module: "agents.POM.Section" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/Section.pm" +--- +# `Section` + +SignalWire::POM::Section is a Perl port of `signalwire.pom.pom.Section` from the Python SignalWire SDK. Both implementations render byte-for-byte identical Markdown/XML/JSON output so prompts authored in either language can be consumed interchangeably. + +**Synopsis** + +```perl +use SignalWire::POM::Section; +``` + +```perl +my $section = SignalWire::POM::Section->new( + title => 'Greeting', + body => 'You are a helpful assistant.', + bullets => ['Be polite', 'Be concise'], +); +``` + +```perl +my $sub = $section->add_subsection( + title => 'Tone', + body => 'Speak warmly.', +); +``` + +```perl +print $section->render_markdown; +print $section->render_xml; +``` + +## Signature + +```perl +package SignalWire::POM::Section +``` + +## See Also + +- SignalWire::POM::PromptObjectModel — the top-level container that holds a list of Sections. + +## Methods + +### add\_body + +#### Signature + +```perl +sub add_body() +``` + +#### Source + +[`lib/SignalWire/POM/Section.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/Section.pm) + +Line 89. + +*** + +### add\_bullets + +#### Signature + +```perl +sub add_bullets() +``` + +#### Source + +[`lib/SignalWire/POM/Section.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/Section.pm) + +Line 96. + +*** + +### add\_subsection + +#### Signature + +```perl +sub add_subsection() +``` + +#### Source + +[`lib/SignalWire/POM/Section.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/Section.pm) + +Line 106. + +*** + +### BUILD + +#### Signature + +```perl +sub BUILD() +``` + +#### Source + +[`lib/SignalWire/POM/Section.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/Section.pm) + +Line 73. + +*** + +### render\_markdown + +#### Signature + +```perl +sub render_markdown() +``` + +#### Source + +[`lib/SignalWire/POM/Section.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/Section.pm) + +Line 153. + +*** + +### render\_xml + +#### Signature + +```perl +sub render_xml() +``` + +#### Source + +[`lib/SignalWire/POM/Section.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/Section.pm) + +Line 221. + +*** + +### to\_hash + +#### Signature + +```perl +sub to_hash() +``` + +#### Source + +[`lib/SignalWire/POM/Section.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/Section.pm) + +Line 124. + +## Source + +[`lib/SignalWire/POM/Section.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/Section.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/prefabs/concierge/concierge/index.mdx b/fern/products/sdk-reference/perl/agents/prefabs/concierge/concierge/index.mdx new file mode 100644 index 0000000000..79ad06e9c4 --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/prefabs/concierge/concierge/index.mdx @@ -0,0 +1,51 @@ +--- +slug: "/reference/perl/agents/prefabs/concierge/concierge" +title: "Concierge" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Prefabs::Concierge" + parent: "agents.Prefabs.Concierge" + module: "agents.Prefabs.Concierge" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/Concierge.pm" +--- +# `Concierge` + +## Signature + +```perl +package SignalWire::Prefabs::Concierge +``` + +## Inheritance + +**Extends:** [SignalWire::Agent::AgentBase](/docs/sdk-reference/reference/perl/agents/agent/agent-base/agent-base) + +## Methods + +### BUILD + +#### Signature + +```perl +sub BUILD($args) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Prefabs/Concierge.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/Concierge.pm) + +Line 18. + +## Source + +[`lib/SignalWire/Prefabs/Concierge.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/Concierge.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/prefabs/concierge/index.mdx b/fern/products/sdk-reference/perl/agents/prefabs/concierge/index.mdx new file mode 100644 index 0000000000..547751ecb9 --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/prefabs/concierge/index.mdx @@ -0,0 +1,20 @@ +--- +slug: "/reference/perl/agents/prefabs/concierge" +title: "Concierge" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "agents.Prefabs.Concierge" + parent: "agents.Prefabs" + module: "agents.Prefabs" +--- +# `Concierge` + +## Classes + + + + diff --git a/fern/products/sdk-reference/perl/agents/prefabs/faq-bot/faq-bot/index.mdx b/fern/products/sdk-reference/perl/agents/prefabs/faq-bot/faq-bot/index.mdx new file mode 100644 index 0000000000..4a4aeda2a9 --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/prefabs/faq-bot/faq-bot/index.mdx @@ -0,0 +1,51 @@ +--- +slug: "/reference/perl/agents/prefabs/faq-bot/faq-bot" +title: "FAQBot" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Prefabs::FAQBot" + parent: "agents.Prefabs.FAQBot" + module: "agents.Prefabs.FAQBot" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/FAQBot.pm" +--- +# `FAQBot` + +## Signature + +```perl +package SignalWire::Prefabs::FAQBot +``` + +## Inheritance + +**Extends:** [SignalWire::Agent::AgentBase](/docs/sdk-reference/reference/perl/agents/agent/agent-base/agent-base) + +## Methods + +### BUILD + +#### Signature + +```perl +sub BUILD($args) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Prefabs/FAQBot.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/FAQBot.pm) + +Line 15. + +## Source + +[`lib/SignalWire/Prefabs/FAQBot.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/FAQBot.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/prefabs/faq-bot/index.mdx b/fern/products/sdk-reference/perl/agents/prefabs/faq-bot/index.mdx new file mode 100644 index 0000000000..cca47ab713 --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/prefabs/faq-bot/index.mdx @@ -0,0 +1,20 @@ +--- +slug: "/reference/perl/agents/prefabs/faq-bot" +title: "FAQBot" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "agents.Prefabs.FAQBot" + parent: "agents.Prefabs" + module: "agents.Prefabs" +--- +# `FAQBot` + +## Classes + + + + diff --git a/fern/products/sdk-reference/perl/agents/prefabs/index.mdx b/fern/products/sdk-reference/perl/agents/prefabs/index.mdx new file mode 100644 index 0000000000..b2f880a017 --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/prefabs/index.mdx @@ -0,0 +1,28 @@ +--- +slug: "/reference/perl/agents/prefabs" +title: "Prefabs" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "agents.Prefabs" + parent: "agents" + module: "agents" +--- +# `Prefabs` + +## Modules + + + + + + + + + + + + diff --git a/fern/products/sdk-reference/perl/agents/prefabs/info-gatherer/index.mdx b/fern/products/sdk-reference/perl/agents/prefabs/info-gatherer/index.mdx new file mode 100644 index 0000000000..aa4e213fcc --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/prefabs/info-gatherer/index.mdx @@ -0,0 +1,20 @@ +--- +slug: "/reference/perl/agents/prefabs/info-gatherer" +title: "InfoGatherer" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "agents.Prefabs.InfoGatherer" + parent: "agents.Prefabs" + module: "agents.Prefabs" +--- +# `InfoGatherer` + +## Classes + + + + diff --git a/fern/products/sdk-reference/perl/agents/prefabs/info-gatherer/info-gatherer/index.mdx b/fern/products/sdk-reference/perl/agents/prefabs/info-gatherer/info-gatherer/index.mdx new file mode 100644 index 0000000000..88f96396de --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/prefabs/info-gatherer/info-gatherer/index.mdx @@ -0,0 +1,51 @@ +--- +slug: "/reference/perl/agents/prefabs/info-gatherer/info-gatherer" +title: "InfoGatherer" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Prefabs::InfoGatherer" + parent: "agents.Prefabs.InfoGatherer" + module: "agents.Prefabs.InfoGatherer" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/InfoGatherer.pm" +--- +# `InfoGatherer` + +## Signature + +```perl +package SignalWire::Prefabs::InfoGatherer +``` + +## Inheritance + +**Extends:** [SignalWire::Agent::AgentBase](/docs/sdk-reference/reference/perl/agents/agent/agent-base/agent-base) + +## Methods + +### BUILD + +#### Signature + +```perl +sub BUILD($args) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Prefabs/InfoGatherer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/InfoGatherer.pm) + +Line 13. + +## Source + +[`lib/SignalWire/Prefabs/InfoGatherer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/InfoGatherer.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/prefabs/receptionist/index.mdx b/fern/products/sdk-reference/perl/agents/prefabs/receptionist/index.mdx new file mode 100644 index 0000000000..2a9f689263 --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/prefabs/receptionist/index.mdx @@ -0,0 +1,20 @@ +--- +slug: "/reference/perl/agents/prefabs/receptionist" +title: "Receptionist" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "agents.Prefabs.Receptionist" + parent: "agents.Prefabs" + module: "agents.Prefabs" +--- +# `Receptionist` + +## Classes + + + + diff --git a/fern/products/sdk-reference/perl/agents/prefabs/receptionist/receptionist/index.mdx b/fern/products/sdk-reference/perl/agents/prefabs/receptionist/receptionist/index.mdx new file mode 100644 index 0000000000..2e877965af --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/prefabs/receptionist/receptionist/index.mdx @@ -0,0 +1,51 @@ +--- +slug: "/reference/perl/agents/prefabs/receptionist/receptionist" +title: "Receptionist" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Prefabs::Receptionist" + parent: "agents.Prefabs.Receptionist" + module: "agents.Prefabs.Receptionist" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/Receptionist.pm" +--- +# `Receptionist` + +## Signature + +```perl +package SignalWire::Prefabs::Receptionist +``` + +## Inheritance + +**Extends:** [SignalWire::Agent::AgentBase](/docs/sdk-reference/reference/perl/agents/agent/agent-base/agent-base) + +## Methods + +### BUILD + +#### Signature + +```perl +sub BUILD($args) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Prefabs/Receptionist.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/Receptionist.pm) + +Line 15. + +## Source + +[`lib/SignalWire/Prefabs/Receptionist.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/Receptionist.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/prefabs/survey/index.mdx b/fern/products/sdk-reference/perl/agents/prefabs/survey/index.mdx new file mode 100644 index 0000000000..e806417c1f --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/prefabs/survey/index.mdx @@ -0,0 +1,20 @@ +--- +slug: "/reference/perl/agents/prefabs/survey" +title: "Survey" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "agents.Prefabs.Survey" + parent: "agents.Prefabs" + module: "agents.Prefabs" +--- +# `Survey` + +## Classes + + + + diff --git a/fern/products/sdk-reference/perl/agents/prefabs/survey/survey/index.mdx b/fern/products/sdk-reference/perl/agents/prefabs/survey/survey/index.mdx new file mode 100644 index 0000000000..7f2472d126 --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/prefabs/survey/survey/index.mdx @@ -0,0 +1,51 @@ +--- +slug: "/reference/perl/agents/prefabs/survey/survey" +title: "Survey" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Prefabs::Survey" + parent: "agents.Prefabs.Survey" + module: "agents.Prefabs.Survey" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/Survey.pm" +--- +# `Survey` + +## Signature + +```perl +package SignalWire::Prefabs::Survey +``` + +## Inheritance + +**Extends:** [SignalWire::Agent::AgentBase](/docs/sdk-reference/reference/perl/agents/agent/agent-base/agent-base) + +## Methods + +### BUILD + +#### Signature + +```perl +sub BUILD($args) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Prefabs/Survey.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/Survey.pm) + +Line 18. + +## Source + +[`lib/SignalWire/Prefabs/Survey.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/Survey.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/server/agent-server/agent-server/index.mdx b/fern/products/sdk-reference/perl/agents/server/agent-server/agent-server/index.mdx new file mode 100644 index 0000000000..9b1e87a662 --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/server/agent-server/agent-server/index.mdx @@ -0,0 +1,163 @@ +--- +slug: "/reference/perl/agents/server/agent-server/agent-server" +title: "AgentServer" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Server::AgentServer" + parent: "agents.Server.AgentServer" + module: "agents.Server.AgentServer" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Server/AgentServer.pm" +--- +# `AgentServer` + +## Signature + +```perl +package SignalWire::Server::AgentServer +``` + +## Methods + +### get\_agent + +#### Signature + +```perl +sub get_agent($route) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Server/AgentServer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Server/AgentServer.pm) + +Line 53. + +*** + +### list\_agents + +#### Signature + +```perl +sub list_agents() +``` + +#### Source + +[`lib/SignalWire/Server/AgentServer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Server/AgentServer.pm) + +Line 48. + +*** + +### psgi\_app + +#### Signature + +```perl +sub psgi_app() +``` + +#### Source + +[`lib/SignalWire/Server/AgentServer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Server/AgentServer.pm) + +Line 73. + +*** + +### register + +#### Signature + +```perl +sub register($agent, $route) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Server/AgentServer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Server/AgentServer.pm) + +Line 24. + +*** + +### run + +#### Signature + +```perl +sub run(%opts) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Server/AgentServer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Server/AgentServer.pm) + +Line 218. + +*** + +### serve\_static\_files + +#### Signature + +```perl +sub serve_static_files($directory, $route) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Server/AgentServer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Server/AgentServer.pm) + +Line 58. + +*** + +### unregister + +#### Signature + +```perl +sub unregister($route) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Server/AgentServer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Server/AgentServer.pm) + +Line 40. + +## Source + +[`lib/SignalWire/Server/AgentServer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Server/AgentServer.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/server/agent-server/index.mdx b/fern/products/sdk-reference/perl/agents/server/agent-server/index.mdx new file mode 100644 index 0000000000..de24f1db6f --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/server/agent-server/index.mdx @@ -0,0 +1,20 @@ +--- +slug: "/reference/perl/agents/server/agent-server" +title: "AgentServer" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "agents.Server.AgentServer" + parent: "agents.Server" + module: "agents.Server" +--- +# `AgentServer` + +## Classes + + + + diff --git a/fern/products/sdk-reference/perl/agents/server/index.mdx b/fern/products/sdk-reference/perl/agents/server/index.mdx new file mode 100644 index 0000000000..731423f3a3 --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/server/index.mdx @@ -0,0 +1,20 @@ +--- +slug: "/reference/perl/agents/server" +title: "Server" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "agents.Server" + parent: "agents" + module: "agents" +--- +# `Server` + +## Modules + + + + diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/api-ninjas-trivia/api-ninjas-trivia/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/api-ninjas-trivia/api-ninjas-trivia/index.mdx new file mode 100644 index 0000000000..9a902022a7 --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/skills/builtin/api-ninjas-trivia/api-ninjas-trivia/index.mdx @@ -0,0 +1,79 @@ +--- +slug: "/reference/perl/agents/skills/builtin/api-ninjas-trivia/api-ninjas-trivia" +title: "ApiNinjasTrivia" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Skills::Builtin::ApiNinjasTrivia" + parent: "agents.Skills.Builtin.ApiNinjasTrivia" + module: "agents.Skills.Builtin.ApiNinjasTrivia" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/ApiNinjasTrivia.pm" +--- +# `ApiNinjasTrivia` + +## Signature + +```perl +package SignalWire::Skills::Builtin::ApiNinjasTrivia +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/agents/skills/skill-base/skill-base) + +## Methods + +### get\_parameter\_schema + +#### Signature + +```perl +sub get_parameter_schema() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/ApiNinjasTrivia.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/ApiNinjasTrivia.pm) + +Line 95. + +*** + +### register\_tools + +#### Signature + +```perl +sub register_tools() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/ApiNinjasTrivia.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/ApiNinjasTrivia.pm) + +Line 48. + +*** + +### setup + +#### Signature + +```perl +sub setup() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/ApiNinjasTrivia.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/ApiNinjasTrivia.pm) + +Line 46. + +## Source + +[`lib/SignalWire/Skills/Builtin/ApiNinjasTrivia.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/ApiNinjasTrivia.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/api-ninjas-trivia/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/api-ninjas-trivia/index.mdx new file mode 100644 index 0000000000..4f2d8f776e --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/skills/builtin/api-ninjas-trivia/index.mdx @@ -0,0 +1,20 @@ +--- +slug: "/reference/perl/agents/skills/builtin/api-ninjas-trivia" +title: "ApiNinjasTrivia" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "agents.Skills.Builtin.ApiNinjasTrivia" + parent: "agents.Skills.Builtin" + module: "agents.Skills.Builtin" +--- +# `ApiNinjasTrivia` + +## Classes + + + + diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/claude-skills/claude-skills/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/claude-skills/claude-skills/index.mdx new file mode 100644 index 0000000000..e7a6db1fbf --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/skills/builtin/claude-skills/claude-skills/index.mdx @@ -0,0 +1,95 @@ +--- +slug: "/reference/perl/agents/skills/builtin/claude-skills/claude-skills" +title: "ClaudeSkills" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Skills::Builtin::ClaudeSkills" + parent: "agents.Skills.Builtin.ClaudeSkills" + module: "agents.Skills.Builtin.ClaudeSkills" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/ClaudeSkills.pm" +--- +# `ClaudeSkills` + +## Signature + +```perl +package SignalWire::Skills::Builtin::ClaudeSkills +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/agents/skills/skill-base/skill-base) + +## Methods + +### get\_hints + +#### Signature + +```perl +sub get_hints() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/ClaudeSkills.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/ClaudeSkills.pm) + +Line 41. + +*** + +### get\_parameter\_schema + +#### Signature + +```perl +sub get_parameter_schema() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/ClaudeSkills.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/ClaudeSkills.pm) + +Line 46. + +*** + +### register\_tools + +#### Signature + +```perl +sub register_tools() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/ClaudeSkills.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/ClaudeSkills.pm) + +Line 16. + +*** + +### setup + +#### Signature + +```perl +sub setup() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/ClaudeSkills.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/ClaudeSkills.pm) + +Line 14. + +## Source + +[`lib/SignalWire/Skills/Builtin/ClaudeSkills.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/ClaudeSkills.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/claude-skills/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/claude-skills/index.mdx new file mode 100644 index 0000000000..746e2d0405 --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/skills/builtin/claude-skills/index.mdx @@ -0,0 +1,20 @@ +--- +slug: "/reference/perl/agents/skills/builtin/claude-skills" +title: "ClaudeSkills" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "agents.Skills.Builtin.ClaudeSkills" + parent: "agents.Skills.Builtin" + module: "agents.Skills.Builtin" +--- +# `ClaudeSkills` + +## Classes + + + + diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/custom-skills/custom-skills/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/custom-skills/custom-skills/index.mdx new file mode 100644 index 0000000000..4cdfaaa144 --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/skills/builtin/custom-skills/custom-skills/index.mdx @@ -0,0 +1,79 @@ +--- +slug: "/reference/perl/agents/skills/builtin/custom-skills/custom-skills" +title: "CustomSkills" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Skills::Builtin::CustomSkills" + parent: "agents.Skills.Builtin.CustomSkills" + module: "agents.Skills.Builtin.CustomSkills" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/CustomSkills.pm" +--- +# `CustomSkills` + +## Signature + +```perl +package SignalWire::Skills::Builtin::CustomSkills +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/agents/skills/skill-base/skill-base) + +## Methods + +### get\_parameter\_schema + +#### Signature + +```perl +sub get_parameter_schema() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/CustomSkills.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/CustomSkills.pm) + +Line 30. + +*** + +### register\_tools + +#### Signature + +```perl +sub register_tools() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/CustomSkills.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/CustomSkills.pm) + +Line 16. + +*** + +### setup + +#### Signature + +```perl +sub setup() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/CustomSkills.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/CustomSkills.pm) + +Line 14. + +## Source + +[`lib/SignalWire/Skills/Builtin/CustomSkills.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/CustomSkills.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/custom-skills/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/custom-skills/index.mdx new file mode 100644 index 0000000000..88dc5db7e3 --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/skills/builtin/custom-skills/index.mdx @@ -0,0 +1,20 @@ +--- +slug: "/reference/perl/agents/skills/builtin/custom-skills" +title: "CustomSkills" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "agents.Skills.Builtin.CustomSkills" + parent: "agents.Skills.Builtin" + module: "agents.Skills.Builtin" +--- +# `CustomSkills` + +## Classes + + + + diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/datasphere-serverless/datasphere-serverless/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/datasphere-serverless/datasphere-serverless/index.mdx new file mode 100644 index 0000000000..89efc4c51b --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/skills/builtin/datasphere-serverless/datasphere-serverless/index.mdx @@ -0,0 +1,111 @@ +--- +slug: "/reference/perl/agents/skills/builtin/datasphere-serverless/datasphere-serverless" +title: "DatasphereServerless" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Skills::Builtin::DatasphereServerless" + parent: "agents.Skills.Builtin.DatasphereServerless" + module: "agents.Skills.Builtin.DatasphereServerless" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/DatasphereServerless.pm" +--- +# `DatasphereServerless` + +## Signature + +```perl +package SignalWire::Skills::Builtin::DatasphereServerless +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/agents/skills/skill-base/skill-base) + +## Methods + +### get\_global\_data + +#### Signature + +```perl +sub get_global_data() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/DatasphereServerless.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/DatasphereServerless.pm) + +Line 47. + +*** + +### get\_hints + +#### Signature + +```perl +sub get_hints() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/DatasphereServerless.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/DatasphereServerless.pm) + +Line 45. + +*** + +### get\_parameter\_schema + +#### Signature + +```perl +sub get_parameter_schema() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/DatasphereServerless.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/DatasphereServerless.pm) + +Line 67. + +*** + +### register\_tools + +#### Signature + +```perl +sub register_tools() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/DatasphereServerless.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/DatasphereServerless.pm) + +Line 17. + +*** + +### setup + +#### Signature + +```perl +sub setup() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/DatasphereServerless.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/DatasphereServerless.pm) + +Line 15. + +## Source + +[`lib/SignalWire/Skills/Builtin/DatasphereServerless.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/DatasphereServerless.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/datasphere-serverless/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/datasphere-serverless/index.mdx new file mode 100644 index 0000000000..7366119918 --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/skills/builtin/datasphere-serverless/index.mdx @@ -0,0 +1,20 @@ +--- +slug: "/reference/perl/agents/skills/builtin/datasphere-serverless" +title: "DatasphereServerless" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "agents.Skills.Builtin.DatasphereServerless" + parent: "agents.Skills.Builtin" + module: "agents.Skills.Builtin" +--- +# `DatasphereServerless` + +## Classes + + + + diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/datasphere/datasphere/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/datasphere/datasphere/index.mdx new file mode 100644 index 0000000000..b691c1a11a --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/skills/builtin/datasphere/datasphere/index.mdx @@ -0,0 +1,131 @@ +--- +slug: "/reference/perl/agents/skills/builtin/datasphere/datasphere" +title: "Datasphere" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Skills::Builtin::Datasphere" + parent: "agents.Skills.Builtin.Datasphere" + module: "agents.Skills.Builtin.Datasphere" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Datasphere.pm" +--- +# `Datasphere` + +## Signature + +```perl +package SignalWire::Skills::Builtin::Datasphere +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/agents/skills/skill-base/skill-base) + +## Methods + +### get\_global\_data + +#### Signature + +```perl +sub get_global_data() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/Datasphere.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Datasphere.pm) + +Line 183. + +*** + +### get\_hints + +#### Signature + +```perl +sub get_hints() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/Datasphere.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Datasphere.pm) + +Line 181. + +*** + +### get\_parameter\_schema + +#### Signature + +```perl +sub get_parameter_schema() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/Datasphere.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Datasphere.pm) + +Line 203. + +*** + +### register\_tools + +#### Signature + +```perl +sub register_tools() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/Datasphere.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Datasphere.pm) + +Line 63. + +*** + +### search\_knowledge + +#### Signature + +```perl +sub search_knowledge($query) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Skills/Builtin/Datasphere.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Datasphere.pm) + +Line 107. + +*** + +### setup + +#### Signature + +```perl +sub setup() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/Datasphere.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Datasphere.pm) + +Line 54. + +## Source + +[`lib/SignalWire/Skills/Builtin/Datasphere.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Datasphere.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/datasphere/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/datasphere/index.mdx new file mode 100644 index 0000000000..d9dceb89b8 --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/skills/builtin/datasphere/index.mdx @@ -0,0 +1,20 @@ +--- +slug: "/reference/perl/agents/skills/builtin/datasphere" +title: "Datasphere" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "agents.Skills.Builtin.Datasphere" + parent: "agents.Skills.Builtin" + module: "agents.Skills.Builtin" +--- +# `Datasphere` + +## Classes + + + + diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/datetime/datetime/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/datetime/datetime/index.mdx new file mode 100644 index 0000000000..f826d99718 --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/skills/builtin/datetime/datetime/index.mdx @@ -0,0 +1,79 @@ +--- +slug: "/reference/perl/agents/skills/builtin/datetime/datetime" +title: "Datetime" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Skills::Builtin::Datetime" + parent: "agents.Skills.Builtin.Datetime" + module: "agents.Skills.Builtin.Datetime" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Datetime.pm" +--- +# `Datetime` + +## Signature + +```perl +package SignalWire::Skills::Builtin::Datetime +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/agents/skills/skill-base/skill-base) + +## Methods + +### get\_parameter\_schema + +#### Signature + +```perl +sub get_parameter_schema() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/Datetime.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Datetime.pm) + +Line 78. + +*** + +### register\_tools + +#### Signature + +```perl +sub register_tools() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/Datetime.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Datetime.pm) + +Line 17. + +*** + +### setup + +#### Signature + +```perl +sub setup() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/Datetime.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Datetime.pm) + +Line 15. + +## Source + +[`lib/SignalWire/Skills/Builtin/Datetime.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Datetime.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/datetime/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/datetime/index.mdx new file mode 100644 index 0000000000..e67056b4cd --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/skills/builtin/datetime/index.mdx @@ -0,0 +1,20 @@ +--- +slug: "/reference/perl/agents/skills/builtin/datetime" +title: "Datetime" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "agents.Skills.Builtin.Datetime" + parent: "agents.Skills.Builtin" + module: "agents.Skills.Builtin" +--- +# `Datetime` + +## Classes + + + + diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/google-maps/google-maps/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/google-maps/google-maps/index.mdx new file mode 100644 index 0000000000..fc0d81fe23 --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/skills/builtin/google-maps/google-maps/index.mdx @@ -0,0 +1,95 @@ +--- +slug: "/reference/perl/agents/skills/builtin/google-maps/google-maps" +title: "GoogleMaps" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Skills::Builtin::GoogleMaps" + parent: "agents.Skills.Builtin.GoogleMaps" + module: "agents.Skills.Builtin.GoogleMaps" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/GoogleMaps.pm" +--- +# `GoogleMaps` + +## Signature + +```perl +package SignalWire::Skills::Builtin::GoogleMaps +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/agents/skills/skill-base/skill-base) + +## Methods + +### get\_hints + +#### Signature + +```perl +sub get_hints() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/GoogleMaps.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/GoogleMaps.pm) + +Line 65. + +*** + +### get\_parameter\_schema + +#### Signature + +```perl +sub get_parameter_schema() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/GoogleMaps.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/GoogleMaps.pm) + +Line 80. + +*** + +### register\_tools + +#### Signature + +```perl +sub register_tools() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/GoogleMaps.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/GoogleMaps.pm) + +Line 16. + +*** + +### setup + +#### Signature + +```perl +sub setup() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/GoogleMaps.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/GoogleMaps.pm) + +Line 14. + +## Source + +[`lib/SignalWire/Skills/Builtin/GoogleMaps.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/GoogleMaps.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/google-maps/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/google-maps/index.mdx new file mode 100644 index 0000000000..36e65c64ab --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/skills/builtin/google-maps/index.mdx @@ -0,0 +1,20 @@ +--- +slug: "/reference/perl/agents/skills/builtin/google-maps" +title: "GoogleMaps" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "agents.Skills.Builtin.GoogleMaps" + parent: "agents.Skills.Builtin" + module: "agents.Skills.Builtin" +--- +# `GoogleMaps` + +## Classes + + + + diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/index.mdx new file mode 100644 index 0000000000..3e0df5412b --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/skills/builtin/index.mdx @@ -0,0 +1,54 @@ +--- +slug: "/reference/perl/agents/skills/builtin" +title: "Builtin" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "agents.Skills.Builtin" + parent: "agents.Skills" + module: "agents.Skills" +--- +# `Builtin` + +## Modules + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/info-gatherer/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/info-gatherer/index.mdx new file mode 100644 index 0000000000..914e67272d --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/skills/builtin/info-gatherer/index.mdx @@ -0,0 +1,20 @@ +--- +slug: "/reference/perl/agents/skills/builtin/info-gatherer" +title: "InfoGatherer" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "agents.Skills.Builtin.InfoGatherer" + parent: "agents.Skills.Builtin" + module: "agents.Skills.Builtin" +--- +# `InfoGatherer` + +## Classes + + + + diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/info-gatherer/info-gatherer/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/info-gatherer/info-gatherer/index.mdx new file mode 100644 index 0000000000..4a225b9364 --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/skills/builtin/info-gatherer/info-gatherer/index.mdx @@ -0,0 +1,95 @@ +--- +slug: "/reference/perl/agents/skills/builtin/info-gatherer/info-gatherer" +title: "InfoGatherer" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Skills::Builtin::InfoGatherer" + parent: "agents.Skills.Builtin.InfoGatherer" + module: "agents.Skills.Builtin.InfoGatherer" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/InfoGatherer.pm" +--- +# `InfoGatherer` + +## Signature + +```perl +package SignalWire::Skills::Builtin::InfoGatherer +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/agents/skills/skill-base/skill-base) + +## Methods + +### get\_global\_data + +#### Signature + +```perl +sub get_global_data() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/InfoGatherer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/InfoGatherer.pm) + +Line 60. + +*** + +### get\_parameter\_schema + +#### Signature + +```perl +sub get_parameter_schema() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/InfoGatherer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/InfoGatherer.pm) + +Line 86. + +*** + +### register\_tools + +#### Signature + +```perl +sub register_tools() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/InfoGatherer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/InfoGatherer.pm) + +Line 17. + +*** + +### setup + +#### Signature + +```perl +sub setup() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/InfoGatherer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/InfoGatherer.pm) + +Line 15. + +## Source + +[`lib/SignalWire/Skills/Builtin/InfoGatherer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/InfoGatherer.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/joke/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/joke/index.mdx new file mode 100644 index 0000000000..56e02a859d --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/skills/builtin/joke/index.mdx @@ -0,0 +1,20 @@ +--- +slug: "/reference/perl/agents/skills/builtin/joke" +title: "Joke" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "agents.Skills.Builtin.Joke" + parent: "agents.Skills.Builtin" + module: "agents.Skills.Builtin" +--- +# `Joke` + +## Classes + + + + diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/joke/joke/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/joke/joke/index.mdx new file mode 100644 index 0000000000..2fa4f842b3 --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/skills/builtin/joke/joke/index.mdx @@ -0,0 +1,95 @@ +--- +slug: "/reference/perl/agents/skills/builtin/joke/joke" +title: "Joke" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Skills::Builtin::Joke" + parent: "agents.Skills.Builtin.Joke" + module: "agents.Skills.Builtin.Joke" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Joke.pm" +--- +# `Joke` + +## Signature + +```perl +package SignalWire::Skills::Builtin::Joke +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/agents/skills/skill-base/skill-base) + +## Methods + +### get\_global\_data + +#### Signature + +```perl +sub get_global_data() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/Joke.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Joke.pm) + +Line 49. + +*** + +### get\_parameter\_schema + +#### Signature + +```perl +sub get_parameter_schema() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/Joke.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Joke.pm) + +Line 64. + +*** + +### register\_tools + +#### Signature + +```perl +sub register_tools() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/Joke.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Joke.pm) + +Line 17. + +*** + +### setup + +#### Signature + +```perl +sub setup() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/Joke.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Joke.pm) + +Line 15. + +## Source + +[`lib/SignalWire/Skills/Builtin/Joke.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Joke.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/math/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/math/index.mdx new file mode 100644 index 0000000000..e054923a25 --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/skills/builtin/math/index.mdx @@ -0,0 +1,20 @@ +--- +slug: "/reference/perl/agents/skills/builtin/math" +title: "Math" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "agents.Skills.Builtin.Math" + parent: "agents.Skills.Builtin" + module: "agents.Skills.Builtin" +--- +# `Math` + +## Classes + + + + diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/math/math/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/math/math/index.mdx new file mode 100644 index 0000000000..86eea238e8 --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/skills/builtin/math/math/index.mdx @@ -0,0 +1,79 @@ +--- +slug: "/reference/perl/agents/skills/builtin/math/math" +title: "Math" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Skills::Builtin::Math" + parent: "agents.Skills.Builtin.Math" + module: "agents.Skills.Builtin.Math" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Math.pm" +--- +# `Math` + +## Signature + +```perl +package SignalWire::Skills::Builtin::Math +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/agents/skills/skill-base/skill-base) + +## Methods + +### get\_parameter\_schema + +#### Signature + +```perl +sub get_parameter_schema() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/Math.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Math.pm) + +Line 62. + +*** + +### register\_tools + +#### Signature + +```perl +sub register_tools() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/Math.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Math.pm) + +Line 16. + +*** + +### setup + +#### Signature + +```perl +sub setup() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/Math.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Math.pm) + +Line 14. + +## Source + +[`lib/SignalWire/Skills/Builtin/Math.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Math.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/mcp-gateway/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/mcp-gateway/index.mdx new file mode 100644 index 0000000000..501458576b --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/skills/builtin/mcp-gateway/index.mdx @@ -0,0 +1,20 @@ +--- +slug: "/reference/perl/agents/skills/builtin/mcp-gateway" +title: "McpGateway" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "agents.Skills.Builtin.McpGateway" + parent: "agents.Skills.Builtin" + module: "agents.Skills.Builtin" +--- +# `McpGateway` + +## Classes + + + + diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/mcp-gateway/mcp-gateway/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/mcp-gateway/mcp-gateway/index.mdx new file mode 100644 index 0000000000..f1022166ad --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/skills/builtin/mcp-gateway/mcp-gateway/index.mdx @@ -0,0 +1,111 @@ +--- +slug: "/reference/perl/agents/skills/builtin/mcp-gateway/mcp-gateway" +title: "McpGateway" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Skills::Builtin::McpGateway" + parent: "agents.Skills.Builtin.McpGateway" + module: "agents.Skills.Builtin.McpGateway" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/McpGateway.pm" +--- +# `McpGateway` + +## Signature + +```perl +package SignalWire::Skills::Builtin::McpGateway +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/agents/skills/skill-base/skill-base) + +## Methods + +### get\_global\_data + +#### Signature + +```perl +sub get_global_data() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/McpGateway.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/McpGateway.pm) + +Line 54. + +*** + +### get\_hints + +#### Signature + +```perl +sub get_hints() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/McpGateway.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/McpGateway.pm) + +Line 45. + +*** + +### get\_parameter\_schema + +#### Signature + +```perl +sub get_parameter_schema() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/McpGateway.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/McpGateway.pm) + +Line 71. + +*** + +### register\_tools + +#### Signature + +```perl +sub register_tools() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/McpGateway.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/McpGateway.pm) + +Line 16. + +*** + +### setup + +#### Signature + +```perl +sub setup() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/McpGateway.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/McpGateway.pm) + +Line 14. + +## Source + +[`lib/SignalWire/Skills/Builtin/McpGateway.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/McpGateway.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/native-vector-search/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/native-vector-search/index.mdx new file mode 100644 index 0000000000..e91779f106 --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/skills/builtin/native-vector-search/index.mdx @@ -0,0 +1,20 @@ +--- +slug: "/reference/perl/agents/skills/builtin/native-vector-search" +title: "NativeVectorSearch" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "agents.Skills.Builtin.NativeVectorSearch" + parent: "agents.Skills.Builtin" + module: "agents.Skills.Builtin" +--- +# `NativeVectorSearch` + +## Classes + + + + diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/native-vector-search/native-vector-search/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/native-vector-search/native-vector-search/index.mdx new file mode 100644 index 0000000000..a88d79e072 --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/skills/builtin/native-vector-search/native-vector-search/index.mdx @@ -0,0 +1,95 @@ +--- +slug: "/reference/perl/agents/skills/builtin/native-vector-search/native-vector-search" +title: "NativeVectorSearch" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Skills::Builtin::NativeVectorSearch" + parent: "agents.Skills.Builtin.NativeVectorSearch" + module: "agents.Skills.Builtin.NativeVectorSearch" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/NativeVectorSearch.pm" +--- +# `NativeVectorSearch` + +## Signature + +```perl +package SignalWire::Skills::Builtin::NativeVectorSearch +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/agents/skills/skill-base/skill-base) + +## Methods + +### get\_hints + +#### Signature + +```perl +sub get_hints() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/NativeVectorSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/NativeVectorSearch.pm) + +Line 42. + +*** + +### get\_parameter\_schema + +#### Signature + +```perl +sub get_parameter_schema() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/NativeVectorSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/NativeVectorSearch.pm) + +Line 57. + +*** + +### register\_tools + +#### Signature + +```perl +sub register_tools() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/NativeVectorSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/NativeVectorSearch.pm) + +Line 16. + +*** + +### setup + +#### Signature + +```perl +sub setup() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/NativeVectorSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/NativeVectorSearch.pm) + +Line 14. + +## Source + +[`lib/SignalWire/Skills/Builtin/NativeVectorSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/NativeVectorSearch.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/play-background-file/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/play-background-file/index.mdx new file mode 100644 index 0000000000..663316b870 --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/skills/builtin/play-background-file/index.mdx @@ -0,0 +1,20 @@ +--- +slug: "/reference/perl/agents/skills/builtin/play-background-file" +title: "PlayBackgroundFile" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "agents.Skills.Builtin.PlayBackgroundFile" + parent: "agents.Skills.Builtin" + module: "agents.Skills.Builtin" +--- +# `PlayBackgroundFile` + +## Classes + + + + diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/play-background-file/play-background-file/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/play-background-file/play-background-file/index.mdx new file mode 100644 index 0000000000..9cce4af9d7 --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/skills/builtin/play-background-file/play-background-file/index.mdx @@ -0,0 +1,79 @@ +--- +slug: "/reference/perl/agents/skills/builtin/play-background-file/play-background-file" +title: "PlayBackgroundFile" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Skills::Builtin::PlayBackgroundFile" + parent: "agents.Skills.Builtin.PlayBackgroundFile" + module: "agents.Skills.Builtin.PlayBackgroundFile" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/PlayBackgroundFile.pm" +--- +# `PlayBackgroundFile` + +## Signature + +```perl +package SignalWire::Skills::Builtin::PlayBackgroundFile +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/agents/skills/skill-base/skill-base) + +## Methods + +### get\_parameter\_schema + +#### Signature + +```perl +sub get_parameter_schema() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/PlayBackgroundFile.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/PlayBackgroundFile.pm) + +Line 57. + +*** + +### register\_tools + +#### Signature + +```perl +sub register_tools() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/PlayBackgroundFile.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/PlayBackgroundFile.pm) + +Line 16. + +*** + +### setup + +#### Signature + +```perl +sub setup() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/PlayBackgroundFile.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/PlayBackgroundFile.pm) + +Line 14. + +## Source + +[`lib/SignalWire/Skills/Builtin/PlayBackgroundFile.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/PlayBackgroundFile.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/spider/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/spider/index.mdx new file mode 100644 index 0000000000..fd3eb76d25 --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/skills/builtin/spider/index.mdx @@ -0,0 +1,20 @@ +--- +slug: "/reference/perl/agents/skills/builtin/spider" +title: "Spider" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "agents.Skills.Builtin.Spider" + parent: "agents.Skills.Builtin" + module: "agents.Skills.Builtin" +--- +# `Spider` + +## Classes + + + + diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/spider/spider/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/spider/spider/index.mdx new file mode 100644 index 0000000000..bdbec2a23e --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/skills/builtin/spider/spider/index.mdx @@ -0,0 +1,115 @@ +--- +slug: "/reference/perl/agents/skills/builtin/spider/spider" +title: "Spider" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Skills::Builtin::Spider" + parent: "agents.Skills.Builtin.Spider" + module: "agents.Skills.Builtin.Spider" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Spider.pm" +--- +# `Spider` + +## Signature + +```perl +package SignalWire::Skills::Builtin::Spider +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/agents/skills/skill-base/skill-base) + +## Methods + +### get\_hints + +#### Signature + +```perl +sub get_hints() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/Spider.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Spider.pm) + +Line 180. + +*** + +### get\_parameter\_schema + +#### Signature + +```perl +sub get_parameter_schema() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/Spider.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Spider.pm) + +Line 184. + +*** + +### register\_tools + +#### Signature + +```perl +sub register_tools() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/Spider.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Spider.pm) + +Line 50. + +*** + +### scrape\_url + +#### Signature + +```perl +sub scrape_url($url) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Skills/Builtin/Spider.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Spider.pm) + +Line 119. + +*** + +### setup + +#### Signature + +```perl +sub setup() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/Spider.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Spider.pm) + +Line 48. + +## Source + +[`lib/SignalWire/Skills/Builtin/Spider.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Spider.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/swml-transfer/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/swml-transfer/index.mdx new file mode 100644 index 0000000000..0ab9952395 --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/skills/builtin/swml-transfer/index.mdx @@ -0,0 +1,20 @@ +--- +slug: "/reference/perl/agents/skills/builtin/swml-transfer" +title: "SwmlTransfer" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "agents.Skills.Builtin.SwmlTransfer" + parent: "agents.Skills.Builtin" + module: "agents.Skills.Builtin" +--- +# `SwmlTransfer` + +## Classes + + + + diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/swml-transfer/swml-transfer/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/swml-transfer/swml-transfer/index.mdx new file mode 100644 index 0000000000..e86b0817a3 --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/skills/builtin/swml-transfer/swml-transfer/index.mdx @@ -0,0 +1,95 @@ +--- +slug: "/reference/perl/agents/skills/builtin/swml-transfer/swml-transfer" +title: "SwmlTransfer" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Skills::Builtin::SwmlTransfer" + parent: "agents.Skills.Builtin.SwmlTransfer" + module: "agents.Skills.Builtin.SwmlTransfer" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/SwmlTransfer.pm" +--- +# `SwmlTransfer` + +## Signature + +```perl +package SignalWire::Skills::Builtin::SwmlTransfer +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/agents/skills/skill-base/skill-base) + +## Methods + +### get\_hints + +#### Signature + +```perl +sub get_hints() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/SwmlTransfer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/SwmlTransfer.pm) + +Line 57. + +*** + +### get\_parameter\_schema + +#### Signature + +```perl +sub get_parameter_schema() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/SwmlTransfer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/SwmlTransfer.pm) + +Line 82. + +*** + +### register\_tools + +#### Signature + +```perl +sub register_tools() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/SwmlTransfer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/SwmlTransfer.pm) + +Line 16. + +*** + +### setup + +#### Signature + +```perl +sub setup() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/SwmlTransfer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/SwmlTransfer.pm) + +Line 14. + +## Source + +[`lib/SignalWire/Skills/Builtin/SwmlTransfer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/SwmlTransfer.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/weather-api/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/weather-api/index.mdx new file mode 100644 index 0000000000..c6b3bcdb37 --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/skills/builtin/weather-api/index.mdx @@ -0,0 +1,20 @@ +--- +slug: "/reference/perl/agents/skills/builtin/weather-api" +title: "WeatherApi" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "agents.Skills.Builtin.WeatherApi" + parent: "agents.Skills.Builtin" + module: "agents.Skills.Builtin" +--- +# `WeatherApi` + +## Classes + + + + diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/weather-api/weather-api/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/weather-api/weather-api/index.mdx new file mode 100644 index 0000000000..ffbaad2614 --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/skills/builtin/weather-api/weather-api/index.mdx @@ -0,0 +1,79 @@ +--- +slug: "/reference/perl/agents/skills/builtin/weather-api/weather-api" +title: "WeatherApi" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Skills::Builtin::WeatherApi" + parent: "agents.Skills.Builtin.WeatherApi" + module: "agents.Skills.Builtin.WeatherApi" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WeatherApi.pm" +--- +# `WeatherApi` + +## Signature + +```perl +package SignalWire::Skills::Builtin::WeatherApi +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/agents/skills/skill-base/skill-base) + +## Methods + +### get\_parameter\_schema + +#### Signature + +```perl +sub get_parameter_schema() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/WeatherApi.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WeatherApi.pm) + +Line 67. + +*** + +### register\_tools + +#### Signature + +```perl +sub register_tools() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/WeatherApi.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WeatherApi.pm) + +Line 16. + +*** + +### setup + +#### Signature + +```perl +sub setup() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/WeatherApi.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WeatherApi.pm) + +Line 14. + +## Source + +[`lib/SignalWire/Skills/Builtin/WeatherApi.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WeatherApi.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/web-search/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/web-search/index.mdx new file mode 100644 index 0000000000..27ebd9be7d --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/skills/builtin/web-search/index.mdx @@ -0,0 +1,20 @@ +--- +slug: "/reference/perl/agents/skills/builtin/web-search" +title: "WebSearch" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "agents.Skills.Builtin.WebSearch" + parent: "agents.Skills.Builtin" + module: "agents.Skills.Builtin" +--- +# `WebSearch` + +## Classes + + + + diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/web-search/web-search/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/web-search/web-search/index.mdx new file mode 100644 index 0000000000..b236adccb0 --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/skills/builtin/web-search/web-search/index.mdx @@ -0,0 +1,115 @@ +--- +slug: "/reference/perl/agents/skills/builtin/web-search/web-search" +title: "WebSearch" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Skills::Builtin::WebSearch" + parent: "agents.Skills.Builtin.WebSearch" + module: "agents.Skills.Builtin.WebSearch" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WebSearch.pm" +--- +# `WebSearch` + +## Signature + +```perl +package SignalWire::Skills::Builtin::WebSearch +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/agents/skills/skill-base/skill-base) + +## Methods + +### get\_global\_data + +#### Signature + +```perl +sub get_global_data() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/WebSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WebSearch.pm) + +Line 307. + +*** + +### get\_parameter\_schema + +#### Signature + +```perl +sub get_parameter_schema() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/WebSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WebSearch.pm) + +Line 326. + +*** + +### register\_tools + +#### Signature + +```perl +sub register_tools() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/WebSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WebSearch.pm) + +Line 138. + +*** + +### search\_web + +#### Signature + +```perl +sub search_web($query) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Skills/Builtin/WebSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WebSearch.pm) + +Line 167. + +*** + +### setup + +#### Signature + +```perl +sub setup() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/WebSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WebSearch.pm) + +Line 86. + +## Source + +[`lib/SignalWire/Skills/Builtin/WebSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WebSearch.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/wikipedia-search/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/wikipedia-search/index.mdx new file mode 100644 index 0000000000..1284a02f58 --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/skills/builtin/wikipedia-search/index.mdx @@ -0,0 +1,20 @@ +--- +slug: "/reference/perl/agents/skills/builtin/wikipedia-search" +title: "WikipediaSearch" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "agents.Skills.Builtin.WikipediaSearch" + parent: "agents.Skills.Builtin" + module: "agents.Skills.Builtin" +--- +# `WikipediaSearch` + +## Classes + + + + diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/wikipedia-search/wikipedia-search/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/wikipedia-search/wikipedia-search/index.mdx new file mode 100644 index 0000000000..1ce83db4c9 --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/skills/builtin/wikipedia-search/wikipedia-search/index.mdx @@ -0,0 +1,99 @@ +--- +slug: "/reference/perl/agents/skills/builtin/wikipedia-search/wikipedia-search" +title: "WikipediaSearch" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Skills::Builtin::WikipediaSearch" + parent: "agents.Skills.Builtin.WikipediaSearch" + module: "agents.Skills.Builtin.WikipediaSearch" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WikipediaSearch.pm" +--- +# `WikipediaSearch` + +## Signature + +```perl +package SignalWire::Skills::Builtin::WikipediaSearch +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/agents/skills/skill-base/skill-base) + +## Methods + +### get\_parameter\_schema + +#### Signature + +```perl +sub get_parameter_schema() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/WikipediaSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WikipediaSearch.pm) + +Line 189. + +*** + +### register\_tools + +#### Signature + +```perl +sub register_tools() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/WikipediaSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WikipediaSearch.pm) + +Line 77. + +*** + +### search\_wiki + +#### Signature + +```perl +sub search_wiki($query) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Skills/Builtin/WikipediaSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WikipediaSearch.pm) + +Line 112. + +*** + +### setup + +#### Signature + +```perl +sub setup() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/WikipediaSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WikipediaSearch.pm) + +Line 64. + +## Source + +[`lib/SignalWire/Skills/Builtin/WikipediaSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WikipediaSearch.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/skills/index.mdx b/fern/products/sdk-reference/perl/agents/skills/index.mdx new file mode 100644 index 0000000000..3e564a83ad --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/skills/index.mdx @@ -0,0 +1,28 @@ +--- +slug: "/reference/perl/agents/skills" +title: "Skills" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "agents.Skills" + parent: "agents" + module: "agents" +--- +# `Skills` + +## Modules + + + + + + + + + + + + diff --git a/fern/products/sdk-reference/perl/agents/skills/skill-base/index.mdx b/fern/products/sdk-reference/perl/agents/skills/skill-base/index.mdx new file mode 100644 index 0000000000..09202550a3 --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/skills/skill-base/index.mdx @@ -0,0 +1,22 @@ +--- +slug: "/reference/perl/agents/skills/skill-base" +title: "SkillBase" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "agents.Skills.SkillBase" + parent: "agents.Skills" + module: "agents.Skills" +--- +# `SkillBase` + +## Classes + + + + SignalWire::Skills::SkillBase is the Perl port of the Python reference's `SkillBase`. Every built-in or custom skill extends it. A skill declares metadata (`skill_name`, `skill_description`, `skill_version`), optional package / environment requirements, and overrides the abstract `setup` and `register_tools` hooks to wire its SWAIG tools onto the owning agent. + + diff --git a/fern/products/sdk-reference/perl/agents/skills/skill-base/skill-base/index.mdx b/fern/products/sdk-reference/perl/agents/skills/skill-base/skill-base/index.mdx new file mode 100644 index 0000000000..54abac0dc8 --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/skills/skill-base/skill-base/index.mdx @@ -0,0 +1,255 @@ +--- +slug: "/reference/perl/agents/skills/skill-base/skill-base" +title: "SkillBase" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Skills::SkillBase" + parent: "agents.Skills.SkillBase" + module: "agents.Skills.SkillBase" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillBase.pm" +--- +# `SkillBase` + +SignalWire::Skills::SkillBase is the Perl port of the Python reference's `SkillBase`. Every built-in or custom skill extends it. A skill declares metadata (`skill_name`, `skill_description`, `skill_version`), optional package / environment requirements, and overrides the abstract `setup` and `register_tools` hooks to wire its SWAIG tools onto the owning agent. + +Construction fails fast (Moo `isa` constraints): `skill_name` / `skill_description` must be non-empty strings, `agent` must be a blessed object, `required_packages` / `required_env_vars` must be arrayrefs, and `params` / `swaig_fields` must be hashrefs. + +**ATTRIBUTES** + +`skill_name`, `skill_description`, `skill_version`, `supports_multiple_instances`, `required_packages`, `required_env_vars`, `agent`, `params`, `swaig_fields`. + +**LICENSE** + +Copyright (c) 2025 SignalWire. Licensed under the MIT License. + +**METHODS** + +- `setup` / `register_tools` — abstract; a subclass **must** override both (the defaults `croak`). + +- `define_tool(%opts)` — register a SWAIG tool on the agent, merging the skill's `swaig_fields` into the definition. + +- `get_hints` / `get_global_data` / `get_prompt_sections` — default no-op contributions a subclass may override; `get_prompt_sections` honours the `skip_prompt` param. + +- `cleanup` — teardown hook (no-op by default). + +- `validate_env_vars` — true iff every `required_env_vars` entry is set in `%ENV`. + +- `get_parameter_schema` — the JSON-schema-ish description of the config params the skill accepts. + +- `get_instance_key` — the registry key for this skill instance (`skill_name`, optionally suffixed by `tool_name`). + +**Synopsis** + +```perl +package SignalWire::Skills::Builtin::MySkill; +use Moo; +extends 'SignalWire::Skills::SkillBase'; +``` + +```perl +has '+skill_name' => ( default => sub { 'my_skill' } ); +has '+skill_description' => ( default => sub { 'Does a thing' } ); +``` + +```perl +sub setup ($self) { ...; return 1; } +sub register_tools ($self) { + $self->define_tool( name => 'do_thing', ... ); +} +``` + +## Signature + +```perl +package SignalWire::Skills::SkillBase +``` + +## See Also + +- SignalWire::Skills::SkillRegistry, SignalWire::Skills::SkillManager, SignalWire::Skills::SkillName. + +## Methods + +### BUILD + +#### Signature + +```perl +sub BUILD() +``` + +#### Source + +[`lib/SignalWire/Skills/SkillBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillBase.pm) + +Line 45. + +*** + +### cleanup + +#### Signature + +```perl +sub cleanup() +``` + +#### Source + +[`lib/SignalWire/Skills/SkillBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillBase.pm) + +Line 87. + +*** + +### define\_tool + +#### Signature + +```perl +sub define_tool() +``` + +#### Source + +[`lib/SignalWire/Skills/SkillBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillBase.pm) + +Line 64. + +*** + +### get\_global\_data + +#### Signature + +```perl +sub get_global_data() +``` + +#### Source + +[`lib/SignalWire/Skills/SkillBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillBase.pm) + +Line 74. + +*** + +### get\_hints + +#### Signature + +```perl +sub get_hints() +``` + +#### Source + +[`lib/SignalWire/Skills/SkillBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillBase.pm) + +Line 70. + +*** + +### get\_instance\_key + +#### Signature + +```perl +sub get_instance_key() +``` + +#### Source + +[`lib/SignalWire/Skills/SkillBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillBase.pm) + +Line 106. + +*** + +### get\_parameter\_schema + +#### Signature + +```perl +sub get_parameter_schema() +``` + +#### Source + +[`lib/SignalWire/Skills/SkillBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillBase.pm) + +Line 98. + +*** + +### get\_prompt\_sections + +#### Signature + +```perl +sub get_prompt_sections() +``` + +#### Source + +[`lib/SignalWire/Skills/SkillBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillBase.pm) + +Line 78. + +*** + +### register\_tools + +#### Signature + +```perl +sub register_tools() +``` + +#### Source + +[`lib/SignalWire/Skills/SkillBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillBase.pm) + +Line 58. + +*** + +### setup + +#### Signature + +```perl +sub setup() +``` + +#### Source + +[`lib/SignalWire/Skills/SkillBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillBase.pm) + +Line 54. + +*** + +### validate\_env\_vars + +#### Signature + +```perl +sub validate_env_vars() +``` + +#### Source + +[`lib/SignalWire/Skills/SkillBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillBase.pm) + +Line 91. + +## Source + +[`lib/SignalWire/Skills/SkillBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillBase.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/skills/skill-manager/index.mdx b/fern/products/sdk-reference/perl/agents/skills/skill-manager/index.mdx new file mode 100644 index 0000000000..31687f361b --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/skills/skill-manager/index.mdx @@ -0,0 +1,20 @@ +--- +slug: "/reference/perl/agents/skills/skill-manager" +title: "SkillManager" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "agents.Skills.SkillManager" + parent: "agents.Skills" + module: "agents.Skills" +--- +# `SkillManager` + +## Classes + + + + diff --git a/fern/products/sdk-reference/perl/agents/skills/skill-manager/skill-manager/index.mdx b/fern/products/sdk-reference/perl/agents/skills/skill-manager/skill-manager/index.mdx new file mode 100644 index 0000000000..b3292f8665 --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/skills/skill-manager/skill-manager/index.mdx @@ -0,0 +1,107 @@ +--- +slug: "/reference/perl/agents/skills/skill-manager/skill-manager" +title: "SkillManager" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Skills::SkillManager" + parent: "agents.Skills.SkillManager" + module: "agents.Skills.SkillManager" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillManager.pm" +--- +# `SkillManager` + +## Signature + +```perl +package SignalWire::Skills::SkillManager +``` + +## Methods + +### has\_skill + +#### Signature + +```perl +sub has_skill($key) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Skills/SkillManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillManager.pm) + +Line 108. + +*** + +### list\_skills + +#### Signature + +```perl +sub list_skills() +``` + +#### Source + +[`lib/SignalWire/Skills/SkillManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillManager.pm) + +Line 103. + +*** + +### load\_skill + +#### Signature + +```perl +sub load_skill($skill_name, $skill_class, $params) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/Skills/SkillManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillManager.pm) + +Line 13. + +*** + +### unload\_skill + +#### Signature + +```perl +sub unload_skill($key) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Skills/SkillManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillManager.pm) + +Line 93. + +## Source + +[`lib/SignalWire/Skills/SkillManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillManager.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/skills/skill-name/index.mdx b/fern/products/sdk-reference/perl/agents/skills/skill-name/index.mdx new file mode 100644 index 0000000000..a5de6412ee --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/skills/skill-name/index.mdx @@ -0,0 +1,22 @@ +--- +slug: "/reference/perl/agents/skills/skill-name" +title: "SkillName" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "agents.Skills.SkillName" + parent: "agents.Skills" + module: "agents.Skills" +--- +# `SkillName` + +## Classes + + + + The 18 built-in skill names, surfaced as typed, named constants. Each constant's value is the skill's registered wire name — the exact string passed to `SkillRegistry->register_skill` in the matching `SignalWire::Skills::Builtin::*` module. + + diff --git a/fern/products/sdk-reference/perl/agents/skills/skill-name/skill-name/index.mdx b/fern/products/sdk-reference/perl/agents/skills/skill-name/skill-name/index.mdx new file mode 100644 index 0000000000..2ae861b123 --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/skills/skill-name/skill-name/index.mdx @@ -0,0 +1,152 @@ +--- +slug: "/reference/perl/agents/skills/skill-name/skill-name" +title: "SkillName" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Skills::SkillName" + parent: "agents.Skills.SkillName" + module: "agents.Skills.SkillName" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillName.pm" +--- +# `SkillName` + +The 18 built-in skill names, surfaced as typed, named constants. Each constant's value is the skill's registered wire name — the exact string passed to `SkillRegistry->register_skill` in the matching `SignalWire::Skills::Builtin::*` module. + +The constants **are** the canonical wire strings, so nothing about `AgentBase->add_skill` / `remove_skill` / `has_skill` changes: they still take a string. That keeps parity with the Python reference (a bare `str`) and leaves custom / third-party skill names working automatically — an unknown string is simply not in this set. + +This buys a single source of truth for the built-in names (otherwise they live only inside `SkillRegistry::_load_all_builtins` and the test suite), plus editor autocomplete and the membership/iteration helpers below. + +**ALL** + +my $aref = SignalWire::Skills::SkillName->all; + +Arrayref of the 18 built-in skill wire names, sorted so the order matches `SkillRegistry->list_skills`. + +**CONSTANTS** + +Exported on request via Exporter; `:all` pulls every name. The full set: `API_NINJAS_TRIVIA`, `CLAUDE_SKILLS`, `CUSTOM_SKILLS`, `DATASPHERE`, `DATASPHERE_SERVERLESS`, `DATETIME`, `GOOGLE_MAPS`, `INFO_GATHERER`, `JOKE`, `MATH`, `MCP_GATEWAY`, `NATIVE_VECTOR_SEARCH`, `PLAY_BACKGROUND_FILE`, `SPIDER`, `SWML_TRANSFER`, `WEATHER_API`, `WEB_SEARCH`, `WIKIPEDIA_SEARCH`. + +**IS BUILTIN** + +my $bool = SignalWire::Skills::SkillName->is\_builtin($name); + +True if `$name` is one of the built-in skills, false for custom / unknown names. Accepts the bareword constant too. + +**LICENSE** + +Copyright (c) 2025 SignalWire. Licensed under the MIT License. + +**Synopsis** + +```perl +use SignalWire::Skills::SkillName qw(DATETIME); +``` + +```perl +$agent->add_skill( DATETIME ); # imported constant +$agent->add_skill( 'datetime' ); # string (Python parity) +$agent->add_skill( 'my_custom_skill' ); # open set: custom skill +``` + +```perl +# Membership / iteration helpers: +SignalWire::Skills::SkillName->is_builtin('datetime'); # 1 +SignalWire::Skills::SkillName->is_builtin('my_custom'); # 0 +@{ SignalWire::Skills::SkillName->all }; # 18 names +``` + +## Signature + +```perl +package SignalWire::Skills::SkillName +``` + +## See Also + +- SignalWire::Skills::SkillRegistry, SignalWire::Skills::SkillManager, SignalWire::Skills::SkillBase. + +## Constants + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## Methods + +### all + +#### Signature + +```perl +sub all() +``` + +#### Source + +[`lib/SignalWire/Skills/SkillName.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillName.pm) + +Line 101. + +*** + +### is\_builtin + +#### Signature + +```perl +sub is_builtin($class, $name) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Skills/SkillName.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillName.pm) + +Line 108. + +## Source + +[`lib/SignalWire/Skills/SkillName.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillName.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/skills/skill-registry/index.mdx b/fern/products/sdk-reference/perl/agents/skills/skill-registry/index.mdx new file mode 100644 index 0000000000..497a4448f3 --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/skills/skill-registry/index.mdx @@ -0,0 +1,20 @@ +--- +slug: "/reference/perl/agents/skills/skill-registry" +title: "SkillRegistry" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "agents.Skills.SkillRegistry" + parent: "agents.Skills" + module: "agents.Skills" +--- +# `SkillRegistry` + +## Classes + + + + diff --git a/fern/products/sdk-reference/perl/agents/skills/skill-registry/skill-registry/index.mdx b/fern/products/sdk-reference/perl/agents/skills/skill-registry/skill-registry/index.mdx new file mode 100644 index 0000000000..5578d87399 --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/skills/skill-registry/skill-registry/index.mdx @@ -0,0 +1,147 @@ +--- +slug: "/reference/perl/agents/skills/skill-registry/skill-registry" +title: "SkillRegistry" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Skills::SkillRegistry" + parent: "agents.Skills.SkillRegistry" + module: "agents.Skills.SkillRegistry" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillRegistry.pm" +--- +# `SkillRegistry` + +## Signature + +```perl +package SignalWire::Skills::SkillRegistry +``` + +## Methods + +### add\_skill\_directory + +#### Signature + +```perl +sub add_skill_directory($class, $path) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Skills/SkillRegistry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillRegistry.pm) + +Line 118. + +*** + +### clear\_registry + +#### Signature + +```perl +sub clear_registry() +``` + +#### Source + +[`lib/SignalWire/Skills/SkillRegistry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillRegistry.pm) + +Line 106. + +*** + +### get\_all\_skills\_schema + +#### Signature + +```perl +sub get_all_skills_schema() +``` + +#### Source + +[`lib/SignalWire/Skills/SkillRegistry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillRegistry.pm) + +Line 54. + +*** + +### get\_factory + +#### Signature + +```perl +sub get_factory($class, $skill_name) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Skills/SkillRegistry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillRegistry.pm) + +Line 19. + +*** + +### list\_skills + +#### Signature + +```perl +sub list_skills($class) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Skills/SkillRegistry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillRegistry.pm) + +Line 39. + +*** + +### register\_skill + +#### Signature + +```perl +sub register_skill($class, $skill_name, $skill_class) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/Skills/SkillRegistry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillRegistry.pm) + +Line 14. + +## Source + +[`lib/SignalWire/Skills/SkillRegistry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillRegistry.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/swaig/function-result/function-result/index.mdx b/fern/products/sdk-reference/perl/agents/swaig/function-result/function-result/index.mdx new file mode 100644 index 0000000000..ec64afeec9 --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/swaig/function-result/function-result/index.mdx @@ -0,0 +1,896 @@ +--- +slug: "/reference/perl/agents/swaig/function-result/function-result" +title: "FunctionResult" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::SWAIG::FunctionResult" + parent: "agents.SWAIG.FunctionResult" + module: "agents.SWAIG.FunctionResult" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm" +--- +# `FunctionResult` + +SignalWire::SWAIG::FunctionResult is the Perl port of `signalwire.core.function_result.FunctionResult`. A SWAIG function handler returns one of these to tell the agent what to say and which call-control actions to perform. The action list is serialised to the wire shape the SignalWire AI engine expects. + +Most mutators return `$self` so calls chain fluently. The constructor accepts either `new(response => $text)`, the positional shorthand `new($text)`, or `new($text, post_process => 1)`. + +The class-method payment helpers (`create_payment_prompt`, `create_payment_action`, `create_payment_parameter`) may be invoked as class or instance methods — they build plain hashrefs and hold no state. + +**ADVANCED / RPC** + +`execute_swml`, `execute_rpc`, `rpc_dial`, `rpc_ai_message`, `rpc_ai_unhold`. + +**CALL CONTROL** + +`connect`, `swml_transfer`, `hangup`, `hold`, `wait_for_user`, `stop`, `join_conference`, `join_room`, `sip_refer`, `send_sms`, `pay`. + +**CORE** + +`set_response`, `set_post_process`, `add_action`, `add_actions`. + +**LICENSE** + +Copyright (c) 2025 SignalWire. Licensed under the MIT License. + +**MEDIA** + +`say`, `play_background_file`, `stop_background_file`, `record_call`, `stop_record_call`, `tap`, `stop_tap`. + +**METHODS** + +The surface mirrors the Python reference; see that documentation for the authoritative per-argument contract. Grouped by area: + +**SERIALIZATION** + +`to_hash` (the Python `to_dict` equivalent) and `to_json`. + +**SPEECH AND AI** + +`add_dynamic_hints`, `clear_dynamic_hints`, `set_end_of_speech_timeout`, `set_speech_event_timeout`, `toggle_functions`, `enable_functions_on_timeout`, `enable_extensive_data`, `update_settings`, `simulate_user_input`. + +**STATE AND DATA** + +`update_global_data`, `remove_global_data`, `set_metadata`, `remove_metadata`, `swml_user_event`, `swml_change_step`, `swml_change_context`, `switch_context`, `replace_in_history`. + +**Synopsis** + +```perl +use SignalWire::SWAIG::FunctionResult; +``` + +```perl +# Plain spoken response: +my $result = SignalWire::SWAIG::FunctionResult->new('Order placed.'); +``` + +```perl +# Response plus call-control actions (chainable, fluent style): +my $result = SignalWire::SWAIG::FunctionResult->new + ->set_response('Connecting you now.') + ->connect('+15551234567', final => 1); +``` + +```perl +my $payload = $result->to_hash; # ready for JSON emission +my $json = $result->to_json; +``` + +## Signature + +```perl +package SignalWire::SWAIG::FunctionResult +``` + +## See Also + +- SignalWire::SWAIG::RecordCall, SignalWire::SWAIG::Tap, and SignalWire::SWAIG::JoinConference for the typed closed sets accepted by `record_call`, `tap`, and `join_conference`. + +## Methods + +### add\_action + +#### Signature + +```perl +sub add_action() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 74. + +*** + +### add\_actions + +#### Signature + +```perl +sub add_actions() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 79. + +*** + +### add\_dynamic\_hints + +#### Signature + +```perl +sub add_dynamic_hints() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 301. + +*** + +### clear\_dynamic\_hints + +#### Signature + +```perl +sub clear_dynamic_hints() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 305. + +*** + +### connect + +#### Signature + +```perl +sub connect() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 86. + +*** + +### create\_payment\_action + +#### Signature + +```perl +sub create_payment_action() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 719. + +*** + +### create\_payment\_parameter + +#### Signature + +```perl +sub create_payment_parameter() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 723. + +*** + +### create\_payment\_prompt + +#### Signature + +```perl +sub create_payment_prompt() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 703. + +*** + +### enable\_extensive\_data + +#### Signature + +```perl +sub enable_extensive_data() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 327. + +*** + +### enable\_functions\_on\_timeout + +#### Signature + +```perl +sub enable_functions_on_timeout() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 322. + +*** + +### execute\_rpc + +#### Signature + +```perl +sub execute_rpc() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 628. + +*** + +### execute\_swml + +#### Signature + +```perl +sub execute_swml() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 338. + +*** + +### hangup + +#### Signature + +```perl +sub hangup() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 127. + +*** + +### hold + +#### Signature + +```perl +sub hold() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 131. + +*** + +### join\_conference + +#### Signature + +```perl +sub join_conference() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 374. + +*** + +### join\_room + +#### Signature + +```perl +sub join_room() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 486. + +*** + +### pay + +#### Signature + +```perl +sub pay() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 573. + +*** + +### play\_background\_file + +#### Signature + +```perl +sub play_background_file() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 227. + +*** + +### record\_call + +#### Signature + +```perl +sub record_call() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 239. + +*** + +### remove\_global\_data + +#### Signature + +```perl +sub remove_global_data() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 166. + +*** + +### remove\_metadata + +#### Signature + +```perl +sub remove_metadata() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 174. + +*** + +### replace\_in\_history + +#### Signature + +```perl +sub replace_in_history() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 216. + +*** + +### rpc\_ai\_message + +#### Signature + +```perl +sub rpc_ai_message() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 672. + +*** + +### rpc\_ai\_unhold + +#### Signature + +```perl +sub rpc_ai_unhold() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 687. + +*** + +### rpc\_dial + +#### Signature + +```perl +sub rpc_dial() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 651. + +*** + +### say + +#### Signature + +```perl +sub say() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 223. + +*** + +### send\_sms + +#### Signature + +```perl +sub send_sms() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 544. + +*** + +### set\_end\_of\_speech\_timeout + +#### Signature + +```perl +sub set_end_of_speech_timeout() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 310. + +*** + +### set\_metadata + +#### Signature + +```perl +sub set_metadata() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 170. + +*** + +### set\_post\_process + +#### Signature + +```perl +sub set_post_process() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 69. + +*** + +### set\_response + +#### Signature + +```perl +sub set_response() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 64. + +*** + +### set\_speech\_event\_timeout + +#### Signature + +```perl +sub set_speech_event_timeout() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 314. + +*** + +### simulate\_user\_input + +#### Signature + +```perl +sub simulate_user_input() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 697. + +*** + +### sip\_refer + +#### Signature + +```perl +sub sip_refer() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 494. + +*** + +### stop + +#### Signature + +```perl +sub stop() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 156. + +*** + +### stop\_background\_file + +#### Signature + +```perl +sub stop_background_file() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 235. + +*** + +### stop\_record\_call + +#### Signature + +```perl +sub stop_record_call() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 287. + +*** + +### stop\_tap + +#### Signature + +```perl +sub stop_tap() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 532. + +*** + +### switch\_context + +#### Signature + +```perl +sub switch_context() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 198. + +*** + +### swml\_change\_context + +#### Signature + +```perl +sub swml_change_context() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 194. + +*** + +### swml\_change\_step + +#### Signature + +```perl +sub swml_change_step() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 190. + +*** + +### swml\_transfer + +#### Signature + +```perl +sub swml_transfer() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 107. + +*** + +### swml\_user\_event + +#### Signature + +```perl +sub swml_user_event() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 178. + +*** + +### tap + +#### Signature + +```perl +sub tap() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 502. + +*** + +### to\_hash + +#### Signature + +```perl +sub to_hash() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 729. + +*** + +### to\_json + +#### Signature + +```perl +sub to_json() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 747. + +*** + +### toggle\_functions + +#### Signature + +```perl +sub toggle_functions() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 318. + +*** + +### update\_global\_data + +#### Signature + +```perl +sub update_global_data() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 162. + +*** + +### update\_settings + +#### Signature + +```perl +sub update_settings() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 332. + +*** + +### wait\_for\_user + +#### Signature + +```perl +sub wait_for_user() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 138. + +## Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/swaig/function-result/index.mdx b/fern/products/sdk-reference/perl/agents/swaig/function-result/index.mdx new file mode 100644 index 0000000000..07c2f400a1 --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/swaig/function-result/index.mdx @@ -0,0 +1,22 @@ +--- +slug: "/reference/perl/agents/swaig/function-result" +title: "FunctionResult" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "agents.SWAIG.FunctionResult" + parent: "agents.SWAIG" + module: "agents.SWAIG" +--- +# `FunctionResult` + +## Classes + + + + SignalWire::SWAIG::FunctionResult is the Perl port of `signalwire.core.function_result.FunctionResult`. A SWAIG function handler returns one of these to tell the agent what to say and which call-control actions to perform. The action list is serialised to the wire shape the SignalWire AI engine expects. + + diff --git a/fern/products/sdk-reference/perl/agents/swaig/index.mdx b/fern/products/sdk-reference/perl/agents/swaig/index.mdx new file mode 100644 index 0000000000..3b0239287b --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/swaig/index.mdx @@ -0,0 +1,28 @@ +--- +slug: "/reference/perl/agents/swaig" +title: "SWAIG" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "agents.SWAIG" + parent: "agents" + module: "agents" +--- +# `SWAIG` + +## Modules + + + + + + + + + + + + diff --git a/fern/products/sdk-reference/perl/agents/swaig/join-conference/index.mdx b/fern/products/sdk-reference/perl/agents/swaig/join-conference/index.mdx new file mode 100644 index 0000000000..18c5676add --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/swaig/join-conference/index.mdx @@ -0,0 +1,22 @@ +--- +slug: "/reference/perl/agents/swaig/join-conference" +title: "JoinConference" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "agents.SWAIG.JoinConference" + parent: "agents.SWAIG" + module: "agents.SWAIG" +--- +# `JoinConference` + +## Classes + + + + The four closed-set string parameters of SignalWire::SWAIG::FunctionResult's `join_conference` verb, surfaced as typed, named constants: + + diff --git a/fern/products/sdk-reference/perl/agents/swaig/join-conference/join-conference/index.mdx b/fern/products/sdk-reference/perl/agents/swaig/join-conference/join-conference/index.mdx new file mode 100644 index 0000000000..7ca1cac199 --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/swaig/join-conference/join-conference/index.mdx @@ -0,0 +1,280 @@ +--- +slug: "/reference/perl/agents/swaig/join-conference/join-conference" +title: "JoinConference" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::SWAIG::JoinConference" + parent: "agents.SWAIG.JoinConference" + module: "agents.SWAIG.JoinConference" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/JoinConference.pm" +--- +# `JoinConference` + +The four closed-set string parameters of SignalWire::SWAIG::FunctionResult's `join_conference` verb, surfaced as typed, named constants: + +- **BEEP** — beep behaviour: `true`, `false`, `onEnter`, or `onExit`. + +- **RECORD** — recording mode: `do-not-record` or `record-from-start`. + +- **TRIM** — silence trimming: `trim-silence` or `do-not-trim`. + +- **METHOD** — HTTP method for the status / recording-status callbacks: `GET` or `POST` (shared by `status_callback_method` and `recording_status_callback_method`). + +`join_conference` validates each inline and dies on anything outside the set, reproducing the Python reference's exact `ValueError` messages (e.g. `beep must be one of ['true', 'false', 'onEnter', 'onExit']`). This module hoists those literal sets into a single source of truth so the accepted values are discoverable and autocompletable. The constants **are** the canonical wire strings, so `join_conference`'s signature is unchanged, preserving Python parity. + +The constant **names** use shouting identifiers (`ON_ENTER`); the **values** are the camelCase wire strings the SWML verb expects (`onEnter`). + +**BEEPS / RECORDS / TRIMS / METHODS** + +my $aref = SignalWire::SWAIG::JoinConference->beeps; +my $aref = SignalWire::SWAIG::JoinConference->records; +my $aref = SignalWire::SWAIG::JoinConference->trims; +my $aref = SignalWire::SWAIG::JoinConference->methods; + +Arrayrefs of the accepted strings for each set, in the order `join_conference` lists them in its validation messages. + +**CONSTANTS** + +Exported on request via Exporter. Tags: `:beep`, `:record`, `:trim`, `:methods`, and `:all`. + +```perl +BEEP_TRUE => 'true' DO_NOT_RECORD => 'do-not-record' +BEEP_FALSE => 'false' RECORD_FROM_START => 'record-from-start' +ON_ENTER => 'onEnter' TRIM_SILENCE => 'trim-silence' +ON_EXIT => 'onExit' DO_NOT_TRIM => 'do-not-trim' +GET => 'GET' POST => 'POST' +``` + +**IS BEEP / IS RECORD / IS TRIM / IS METHOD** + +my $bool = SignalWire::SWAIG::JoinConference->is\_beep($value); +my $bool = SignalWire::SWAIG::JoinConference->is\_record($value); +my $bool = SignalWire::SWAIG::JoinConference->is\_trim($value); +my $bool = SignalWire::SWAIG::JoinConference->is\_method($value); + +True if `$value` is an accepted member of the corresponding set. Each accepts the bareword constant too (it is just the string). + +**LICENSE** + +Copyright (c) 2025 SignalWire. Licensed under the MIT License. + +**Synopsis** + +```perl +use SignalWire::SWAIG::JoinConference qw(ON_ENTER RECORD_FROM_START); +use SignalWire::SWAIG::FunctionResult; +``` + +```perl +my $result = SignalWire::SWAIG::FunctionResult->new; +``` + +```perl +# Named constants and bare wire strings are interchangeable: +$result->join_conference( 'lobby', + beep => ON_ENTER, + record => RECORD_FROM_START ); +$result->join_conference( 'lobby', + beep => 'onEnter', + record => 'record-from-start' ); +``` + +```perl +# Membership / iteration helpers: +SignalWire::SWAIG::JoinConference->is_beep('onEnter'); # 1 +@{ SignalWire::SWAIG::JoinConference->records }; # do-not-record,... +``` + +## Signature + +```perl +package SignalWire::SWAIG::JoinConference +``` + +## See Also + +- SignalWire::SWAIG::FunctionResult, SignalWire::SWAIG::RecordCall, SignalWire::SWAIG::Tap. + +## Constants + + + + + + + + + + + + + + + + + + + + + +## Methods + +### beeps + +#### Signature + +```perl +sub beeps() +``` + +#### Source + +[`lib/SignalWire/SWAIG/JoinConference.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/JoinConference.pm) + +Line 104. + +*** + +### is\_beep + +#### Signature + +```perl +sub is_beep($class, $value) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/SWAIG/JoinConference.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/JoinConference.pm) + +Line 117. + +*** + +### is\_method + +#### Signature + +```perl +sub is_method($class, $value) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/SWAIG/JoinConference.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/JoinConference.pm) + +Line 141. + +*** + +### is\_record + +#### Signature + +```perl +sub is_record($class, $value) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/SWAIG/JoinConference.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/JoinConference.pm) + +Line 125. + +*** + +### is\_trim + +#### Signature + +```perl +sub is_trim($class, $value) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/SWAIG/JoinConference.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/JoinConference.pm) + +Line 133. + +*** + +### methods + +#### Signature + +```perl +sub methods() +``` + +#### Source + +[`lib/SignalWire/SWAIG/JoinConference.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/JoinConference.pm) + +Line 113. + +*** + +### records + +#### Signature + +```perl +sub records() +``` + +#### Source + +[`lib/SignalWire/SWAIG/JoinConference.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/JoinConference.pm) + +Line 107. + +*** + +### trims + +#### Signature + +```perl +sub trims() +``` + +#### Source + +[`lib/SignalWire/SWAIG/JoinConference.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/JoinConference.pm) + +Line 110. + +## Source + +[`lib/SignalWire/SWAIG/JoinConference.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/JoinConference.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/swaig/parameter-schema/index.mdx b/fern/products/sdk-reference/perl/agents/swaig/parameter-schema/index.mdx new file mode 100644 index 0000000000..67d37c409b --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/swaig/parameter-schema/index.mdx @@ -0,0 +1,22 @@ +--- +slug: "/reference/perl/agents/swaig/parameter-schema" +title: "ParameterSchema" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "agents.SWAIG.ParameterSchema" + parent: "agents.SWAIG" + module: "agents.SWAIG" +--- +# `ParameterSchema` + +## Classes + + + + A SWAIG tool's argument schema is the JSON-Schema `parameters` object that SignalWire::Agent::AgentBase's `define_tool` renders into the SWAIG function block. It is normally written by hand as nested hashrefs. This class builds the **exact same hashref** through a fluent, named, typed API: `->to_hash` returns the identical `{ type => 'object', properties => {...}, required => [...] }` structure a hand-written literal produces, byte for byte (`required` is omitted when no property was marked required, just as hand-written schemas omit it). + + diff --git a/fern/products/sdk-reference/perl/agents/swaig/parameter-schema/parameter-schema/index.mdx b/fern/products/sdk-reference/perl/agents/swaig/parameter-schema/parameter-schema/index.mdx new file mode 100644 index 0000000000..2be79fb5a9 --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/swaig/parameter-schema/parameter-schema/index.mdx @@ -0,0 +1,289 @@ +--- +slug: "/reference/perl/agents/swaig/parameter-schema/parameter-schema" +title: "ParameterSchema" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::SWAIG::ParameterSchema" + parent: "agents.SWAIG.ParameterSchema" + module: "agents.SWAIG.ParameterSchema" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/ParameterSchema.pm" +--- +# `ParameterSchema` + +A SWAIG tool's argument schema is the JSON-Schema `parameters` object that SignalWire::Agent::AgentBase's `define_tool` renders into the SWAIG function block. It is normally written by hand as nested hashrefs. This class builds the **exact same hashref** through a fluent, named, typed API: `->to_hash` returns the identical `{ type => 'object', properties => {...}, required => [...] }` structure a hand-written literal produces, byte for byte (`required` is omitted when no property was marked required, just as hand-written schemas omit it). + +It is a **convenience over the same wire output, not a new format**. The untyped-hashref path into `define_tool` is unchanged and still accepted, so Python parity and every existing caller keep working; the builder is purely additive (see PORT\_ADDITIONS.md). This is the Perl realisation of the cross-port Tier-2 flagship idiom: a typed SWAIG tool-parameter builder. + +**LICENSE** + +Copyright (c) 2025 SignalWire. Licensed under the MIT License. + +**MARKING REQUIRED FIELDS** + +- `->required(@names)` — mark already-declared properties required. Accumulates across calls and de-duplicates on emit, preserving first-seen order. Equivalent to passing `required => 1` on each kind call. + +**NEW** + +my $schema = SignalWire::SWAIG::ParameterSchema->new; + +Construct an empty builder. + +**PROPERTY KINDS** + +Each kind method has the form `->KIND($name, $description, %opts)` and returns `$self` so calls chain. The `$description` second positional is the LLM-facing prompt text (it may also be given as `description => ...` in `%opts`). `%opts` carries the optional facets: `required => 1` (shorthand for also calling `->required($name)`), `default => ...`, `enum => [...]`, `format => ...`, and any other JSON-Schema keyword, emitted verbatim in caller-given order. + +- `->string($name, $desc, %opts)` — `{ type => 'string' }`. + +- `->number($name, $desc, %opts)` — `{ type => 'number' }`. + +- `->integer($name, $desc, %opts)` — `{ type => 'integer' }`. + +- `->boolean($name, $desc, %opts)` — `{ type => 'boolean' }`. + +- `->enum($name, $values, $desc, %opts)` — a closed-set string, `{ type => 'string', enum => [ @$values ] }`. `$values` is an arrayref of accepted values; pass a Tier-1 constant set directly (`SignalWire::SWAIG::RecordCall->formats`, `SignalWire::SWAIG::Tap->codecs`, ...) so the schema's `enum` is single-sourced from the same closed set the verb validates against. Pass `type => 'integer'` in `%opts` for a numeric enum. + +- `->array($name, $desc, %opts)` — `{ type => 'array' }`, with an optional `of => ...` element spec rendered as `items`. `of` may be a kind-name string (`'string'`, `'object'`, ...), a nested `ParameterSchema`, or a raw hashref items schema. Omit `of` for an untyped array. + +- `->object($name, $desc, %opts)` — `{ type => 'object' }`, with an optional `properties => ...` nested spec. `properties` may be a nested `ParameterSchema`, a coderef called with a fresh child schema, or a raw hashref. The nested `properties`/`required` are spliced in. Omit `properties` for an open object. + +**REQUIRED** + +$schema->required('a', 'b'); + +Mark properties required. See \["Marking required fields"]\(Marking required fields). Returns `$self`. + +**STRING / NUMBER / INTEGER / BOOLEAN / ENUM / ARRAY / OBJECT** + +Add a property of the named kind. See \["Property kinds"]\(Property kinds). Each returns `$self`. Dies on a duplicate property name. + +**TO DICT** + +Alias for "to\_hash", matching the SDK's serialiser naming. Identical output. + +**TO HASH** + +my $params = $schema->to\_hash; + +Render the JSON-Schema `parameters` hashref. `required` is omitted when empty. The result is is\_deeply- and JSON-identical to the equivalent hand-written literal and shares no references with the builder's internal state. + +**Synopsis** + +```perl +use SignalWire::SWAIG::ParameterSchema; +use SignalWire::SWAIG::RecordCall; +``` + +```perl +my $params = SignalWire::SWAIG::ParameterSchema->new + ->string('service', 'The service to book') + ->string('date', 'Appointment date, YYYY-MM-DD') + ->enum('format', SignalWire::SWAIG::RecordCall->formats, + 'Recording container format') + ->integer('seats', 'How many seats', default => 1) + ->required('service', 'date') + ->to_hash; +``` + +```perl +# $params is the SAME hashref you would have hand-written: +# { +# type => 'object', +# properties => { +# service => { type => 'string', description => 'The service to book' }, +# date => { type => 'string', description => 'Appointment date, YYYY-MM-DD' }, +# format => { type => 'string', description => 'Recording container format', +# enum => ['wav','mp3','mp4'] }, +# seats => { type => 'integer', description => 'How many seats', default => 1 }, +# }, +# required => ['service','date'], +# } +``` + +```perl +$agent->define_tool( + name => 'book_appointment', + description => 'Book an appointment for a service on a date.', + parameters => $params, # typed-built, same wire shape + handler => sub { ... }, +); +``` + +## Signature + +```perl +package SignalWire::SWAIG::ParameterSchema +``` + +## See Also + +- SignalWire::Agent::AgentBase (`define_tool`), SignalWire::SWML::Service (`define_tool`), SignalWire::SWAIG::RecordCall, SignalWire::SWAIG::Tap (Tier-1 closed-set constant sets that drop into `->enum`), SignalWire::POM::Section (sibling Tier-2 typed-builder idiom). + +## Methods + +### array + +#### Signature + +```perl +sub array() +``` + +#### Source + +[`lib/SignalWire/SWAIG/ParameterSchema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/ParameterSchema.pm) + +Line 149. + +*** + +### boolean + +#### Signature + +```perl +sub boolean() +``` + +#### Source + +[`lib/SignalWire/SWAIG/ParameterSchema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/ParameterSchema.pm) + +Line 118. + +*** + +### enum + +#### Signature + +```perl +sub enum() +``` + +#### Source + +[`lib/SignalWire/SWAIG/ParameterSchema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/ParameterSchema.pm) + +Line 129. + +*** + +### integer + +#### Signature + +```perl +sub integer() +``` + +#### Source + +[`lib/SignalWire/SWAIG/ParameterSchema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/ParameterSchema.pm) + +Line 113. + +*** + +### number + +#### Signature + +```perl +sub number() +``` + +#### Source + +[`lib/SignalWire/SWAIG/ParameterSchema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/ParameterSchema.pm) + +Line 108. + +*** + +### object + +#### Signature + +```perl +sub object() +``` + +#### Source + +[`lib/SignalWire/SWAIG/ParameterSchema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/ParameterSchema.pm) + +Line 176. + +*** + +### required + +#### Signature + +```perl +sub required() +``` + +#### Source + +[`lib/SignalWire/SWAIG/ParameterSchema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/ParameterSchema.pm) + +Line 189. + +*** + +### string + +#### Signature + +```perl +sub string() +``` + +#### Source + +[`lib/SignalWire/SWAIG/ParameterSchema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/ParameterSchema.pm) + +Line 103. + +*** + +### to\_dict + +#### Signature + +```perl +sub to_dict() +``` + +#### Source + +[`lib/SignalWire/SWAIG/ParameterSchema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/ParameterSchema.pm) + +Line 230. + +*** + +### to\_hash + +#### Signature + +```perl +sub to_hash() +``` + +#### Source + +[`lib/SignalWire/SWAIG/ParameterSchema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/ParameterSchema.pm) + +Line 210. + +## Source + +[`lib/SignalWire/SWAIG/ParameterSchema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/ParameterSchema.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/swaig/record-call/index.mdx b/fern/products/sdk-reference/perl/agents/swaig/record-call/index.mdx new file mode 100644 index 0000000000..4480c10d6a --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/swaig/record-call/index.mdx @@ -0,0 +1,22 @@ +--- +slug: "/reference/perl/agents/swaig/record-call" +title: "RecordCall" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "agents.SWAIG.RecordCall" + parent: "agents.SWAIG" + module: "agents.SWAIG" +--- +# `RecordCall` + +## Classes + + + + The two closed-set string parameters of SignalWire::SWAIG::FunctionResult's `record_call` verb, surfaced as typed, named constants: + + diff --git a/fern/products/sdk-reference/perl/agents/swaig/record-call/record-call/index.mdx b/fern/products/sdk-reference/perl/agents/swaig/record-call/record-call/index.mdx new file mode 100644 index 0000000000..44418b5227 --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/swaig/record-call/record-call/index.mdx @@ -0,0 +1,193 @@ +--- +slug: "/reference/perl/agents/swaig/record-call/record-call" +title: "RecordCall" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::SWAIG::RecordCall" + parent: "agents.SWAIG.RecordCall" + module: "agents.SWAIG.RecordCall" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/RecordCall.pm" +--- +# `RecordCall` + +The two closed-set string parameters of SignalWire::SWAIG::FunctionResult's `record_call` verb, surfaced as typed, named constants: + +- **FORMAT** — the recording container: `wav`, `mp3`, or `mp4`. + +- **DIRECTION** — which audio channel(s) to capture: `speak`, `listen`, or `both`. + +These sets are not merely advisory. `record_call` validates both inline and dies on anything outside the set; this module hoists those literal sets into a single source of truth so the accepted values are discoverable and autocompletable instead of living only inside the `die` strings. The constants **are** the canonical wire strings, so `record_call`'s signature is unchanged — it still takes plain `format => ...` / `direction => ...` strings, preserving Python parity. + +The record `direction` here is the write-side record-channel selector. It is unrelated to the read-only inbound/outbound `direction` field on Relay message events, and it uses `listen` where SignalWire::SWAIG::Tap uses `hear` — the two vocabularies must never be unified. + +**CONSTANTS** + +Exported on request via Exporter. The `:formats` tag pulls `WAV`/`MP3`/`MP4`; `:directions` pulls `SPEAK`/`LISTEN`/`BOTH`; `:all` pulls every constant. + +```perl +WAV => 'wav' SPEAK => 'speak' +MP3 => 'mp3' LISTEN => 'listen' +MP4 => 'mp4' BOTH => 'both' +``` + +**DIRECTIONS** + +my $aref = SignalWire::SWAIG::RecordCall->directions; + +Arrayref of the accepted record-direction strings. + +**FORMATS** + +my $aref = SignalWire::SWAIG::RecordCall->formats; + +Arrayref of the accepted format strings, in the order `record_call` lists them in its validation message. + +**IS DIRECTION** + +my $bool = SignalWire::SWAIG::RecordCall->is\_direction($value); + +True if `$value` is an accepted record direction. + +**IS FORMAT** + +my $bool = SignalWire::SWAIG::RecordCall->is\_format($value); + +True if `$value` is an accepted recording format. Accepts the bareword constant too (it is just the string). + +**LICENSE** + +Copyright (c) 2025 SignalWire. Licensed under the MIT License. + +**Synopsis** + +```perl +use SignalWire::SWAIG::RecordCall qw(MP3 BOTH); +use SignalWire::SWAIG::FunctionResult; +``` + +```perl +my $result = SignalWire::SWAIG::FunctionResult->new; +``` + +```perl +# Named constants and bare wire strings are interchangeable: +$result->record_call( format => MP3, direction => BOTH ); +$result->record_call( format => 'mp3', direction => 'both' ); +``` + +```perl +# Membership / iteration helpers: +SignalWire::SWAIG::RecordCall->is_format('mp3'); # 1 +SignalWire::SWAIG::RecordCall->is_direction('hear'); # 0 (that's tap's word) +@{ SignalWire::SWAIG::RecordCall->formats }; # ('wav','mp3','mp4') +``` + +## Signature + +```perl +package SignalWire::SWAIG::RecordCall +``` + +## See Also + +- SignalWire::SWAIG::FunctionResult, SignalWire::SWAIG::Tap, SignalWire::SWAIG::JoinConference, SignalWire::Skills::SkillName, SignalWire::Logging::LogLevel. + +## Constants + + + + + + + + + + + + + +## Methods + +### directions + +#### Signature + +```perl +sub directions() +``` + +#### Source + +[`lib/SignalWire/SWAIG/RecordCall.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/RecordCall.pm) + +Line 83. + +*** + +### formats + +#### Signature + +```perl +sub formats() +``` + +#### Source + +[`lib/SignalWire/SWAIG/RecordCall.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/RecordCall.pm) + +Line 78. + +*** + +### is\_direction + +#### Signature + +```perl +sub is_direction($class, $value) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/SWAIG/RecordCall.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/RecordCall.pm) + +Line 97. + +*** + +### is\_format + +#### Signature + +```perl +sub is_format($class, $value) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/SWAIG/RecordCall.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/RecordCall.pm) + +Line 89. + +## Source + +[`lib/SignalWire/SWAIG/RecordCall.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/RecordCall.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/swaig/tap/index.mdx b/fern/products/sdk-reference/perl/agents/swaig/tap/index.mdx new file mode 100644 index 0000000000..7aa926c4b8 --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/swaig/tap/index.mdx @@ -0,0 +1,22 @@ +--- +slug: "/reference/perl/agents/swaig/tap" +title: "Tap" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "agents.SWAIG.Tap" + parent: "agents.SWAIG" + module: "agents.SWAIG" +--- +# `Tap` + +## Classes + + + + The two closed-set string parameters of SignalWire::SWAIG::FunctionResult's `tap` verb, surfaced as typed, named constants: + + diff --git a/fern/products/sdk-reference/perl/agents/swaig/tap/tap/index.mdx b/fern/products/sdk-reference/perl/agents/swaig/tap/tap/index.mdx new file mode 100644 index 0000000000..9fd013c69a --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/swaig/tap/tap/index.mdx @@ -0,0 +1,191 @@ +--- +slug: "/reference/perl/agents/swaig/tap/tap" +title: "Tap" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::SWAIG::Tap" + parent: "agents.SWAIG.Tap" + module: "agents.SWAIG.Tap" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/Tap.pm" +--- +# `Tap` + +The two closed-set string parameters of SignalWire::SWAIG::FunctionResult's `tap` verb, surfaced as typed, named constants: + +- **DIRECTION** — which audio channel(s) to tap: `speak`, `hear`, or `both`. + +- **CODEC** — the RTP codec for the tapped media: `PCMU` or `PCMA`. + +`tap` validates both inline and dies on anything outside the set; this module hoists those literal sets into a single source of truth so the accepted values are discoverable and autocompletable instead of living only inside the `die` strings. The constants **are** the canonical wire strings, so `tap`'s signature is unchanged. + +**Distinct from RecordCall.** The tap direction set is `{speak, hear, both}`: the inbound-listen channel is `hear`, not `record_call`'s `listen`. Likewise this two-value codec set `{PCMU, PCMA}` is the SWAIG-tap codec set only — a strict subset of the RELAY connect/stream codec superset (`PCMU`, `PCMA`, `OPUS`, `G722`, ...). These vocabularies must never be conflated. + +**CODECS** + +my $aref = SignalWire::SWAIG::Tap->codecs; + +Arrayref of the accepted tap-codec strings. + +**CONSTANTS** + +Exported on request via Exporter. The `:directions` tag pulls `SPEAK`/`HEAR`/`BOTH`; `:codecs` pulls `PCMU`/`PCMA`; `:all` pulls every constant. + +```perl +SPEAK => 'speak' PCMU => 'PCMU' +HEAR => 'hear' PCMA => 'PCMA' +BOTH => 'both' +``` + +**DIRECTIONS** + +my $aref = SignalWire::SWAIG::Tap->directions; + +Arrayref of the accepted tap-direction strings. + +**IS CODEC** + +my $bool = SignalWire::SWAIG::Tap->is\_codec($value); + +True if `$value` is an accepted tap codec. + +**IS DIRECTION** + +my $bool = SignalWire::SWAIG::Tap->is\_direction($value); + +True if `$value` is an accepted tap direction. Accepts the bareword constant too (it is just the string). + +**LICENSE** + +Copyright (c) 2025 SignalWire. Licensed under the MIT License. + +**Synopsis** + +```perl +use SignalWire::SWAIG::Tap qw(SPEAK HEAR BOTH PCMU PCMA); +use SignalWire::SWAIG::FunctionResult; +``` + +```perl +my $result = SignalWire::SWAIG::FunctionResult->new; +``` + +```perl +# Named constants and bare wire strings are interchangeable: +$result->tap( 'rtp://1.2.3.4:5000', direction => HEAR, codec => PCMA ); +$result->tap( 'rtp://1.2.3.4:5000', direction => 'hear', codec => 'PCMA' ); +``` + +```perl +# Membership / iteration helpers: +SignalWire::SWAIG::Tap->is_direction('hear'); # 1 +SignalWire::SWAIG::Tap->is_codec('OPUS'); # 0 (RELAY-only codec) +@{ SignalWire::SWAIG::Tap->codecs }; # ('PCMU','PCMA') +``` + +## Signature + +```perl +package SignalWire::SWAIG::Tap +``` + +## See Also + +- SignalWire::SWAIG::FunctionResult, SignalWire::SWAIG::RecordCall, SignalWire::SWAIG::JoinConference. + +## Constants + + + + + + + + + + + +## Methods + +### codecs + +#### Signature + +```perl +sub codecs() +``` + +#### Source + +[`lib/SignalWire/SWAIG/Tap.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/Tap.pm) + +Line 85. + +*** + +### directions + +#### Signature + +```perl +sub directions() +``` + +#### Source + +[`lib/SignalWire/SWAIG/Tap.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/Tap.pm) + +Line 80. + +*** + +### is\_codec + +#### Signature + +```perl +sub is_codec($class, $value) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/SWAIG/Tap.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/Tap.pm) + +Line 99. + +*** + +### is\_direction + +#### Signature + +```perl +sub is_direction($class, $value) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/SWAIG/Tap.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/Tap.pm) + +Line 91. + +## Source + +[`lib/SignalWire/SWAIG/Tap.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/Tap.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/swml/document/document/index.mdx b/fern/products/sdk-reference/perl/agents/swml/document/document/index.mdx new file mode 100644 index 0000000000..284a1423b9 --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/swml/document/document/index.mdx @@ -0,0 +1,201 @@ +--- +slug: "/reference/perl/agents/swml/document/document" +title: "Document" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::SWML::Document" + parent: "agents.SWML.Document" + module: "agents.SWML.Document" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Document.pm" +--- +# `Document` + +## Signature + +```perl +package SignalWire::SWML::Document +``` + +## Methods + +### add\_raw\_verb + +#### Signature + +```perl +sub add_raw_verb($section_name, $verb_hash) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/SWML/Document.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Document.pm) + +Line 30. + +*** + +### add\_section + +#### Signature + +```perl +sub add_section($name) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/SWML/Document.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Document.pm) + +Line 17. + +*** + +### add\_verb + +#### Signature + +```perl +sub add_verb($section_name, $verb_name, $verb_data) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/SWML/Document.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Document.pm) + +Line 23. + +*** + +### clear\_section + +#### Signature + +```perl +sub clear_section($name) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/SWML/Document.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Document.pm) + +Line 47. + +*** + +### get\_section + +#### Signature + +```perl +sub get_section($name) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/SWML/Document.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Document.pm) + +Line 37. + +*** + +### has\_section + +#### Signature + +```perl +sub has_section($name) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/SWML/Document.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Document.pm) + +Line 42. + +*** + +### to\_hash + +#### Signature + +```perl +sub to_hash() +``` + +#### Source + +[`lib/SignalWire/SWML/Document.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Document.pm) + +Line 53. + +*** + +### to\_json + +#### Signature + +```perl +sub to_json() +``` + +#### Source + +[`lib/SignalWire/SWML/Document.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Document.pm) + +Line 61. + +*** + +### to\_pretty\_json + +#### Signature + +```perl +sub to_pretty_json() +``` + +#### Source + +[`lib/SignalWire/SWML/Document.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Document.pm) + +Line 66. + +## Source + +[`lib/SignalWire/SWML/Document.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Document.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/swml/document/index.mdx b/fern/products/sdk-reference/perl/agents/swml/document/index.mdx new file mode 100644 index 0000000000..a676ce7ae5 --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/swml/document/index.mdx @@ -0,0 +1,20 @@ +--- +slug: "/reference/perl/agents/swml/document" +title: "Document" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "agents.SWML.Document" + parent: "agents.SWML" + module: "agents.SWML" +--- +# `Document` + +## Classes + + + + diff --git a/fern/products/sdk-reference/perl/agents/swml/index.mdx b/fern/products/sdk-reference/perl/agents/swml/index.mdx new file mode 100644 index 0000000000..7f51972721 --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/swml/index.mdx @@ -0,0 +1,24 @@ +--- +slug: "/reference/perl/agents/swml" +title: "SWML" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "agents.SWML" + parent: "agents" + module: "agents" +--- +# `SWML` + +## Modules + + + + + + + + diff --git a/fern/products/sdk-reference/perl/agents/swml/schema/index.mdx b/fern/products/sdk-reference/perl/agents/swml/schema/index.mdx new file mode 100644 index 0000000000..0236b6c8d1 --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/swml/schema/index.mdx @@ -0,0 +1,20 @@ +--- +slug: "/reference/perl/agents/swml/schema" +title: "Schema" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "agents.SWML.Schema" + parent: "agents.SWML" + module: "agents.SWML" +--- +# `Schema` + +## Classes + + + + diff --git a/fern/products/sdk-reference/perl/agents/swml/schema/schema/index.mdx b/fern/products/sdk-reference/perl/agents/swml/schema/schema/index.mdx new file mode 100644 index 0000000000..542bf3262f --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/swml/schema/schema/index.mdx @@ -0,0 +1,135 @@ +--- +slug: "/reference/perl/agents/swml/schema/schema" +title: "Schema" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::SWML::Schema" + parent: "agents.SWML.Schema" + module: "agents.SWML.Schema" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Schema.pm" +--- +# `Schema` + +## Signature + +```perl +package SignalWire::SWML::Schema +``` + +## Methods + +### BUILD + +#### Signature + +```perl +sub BUILD() +``` + +#### Source + +[`lib/SignalWire/SWML/Schema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Schema.pm) + +Line 21. + +*** + +### get\_verb + +#### Signature + +```perl +sub get_verb($name) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/SWML/Schema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Schema.pm) + +Line 83. + +*** + +### get\_verb\_names + +#### Signature + +```perl +sub get_verb_names() +``` + +#### Source + +[`lib/SignalWire/SWML/Schema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Schema.pm) + +Line 73. + +*** + +### has\_verb + +#### Signature + +```perl +sub has_verb($name) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/SWML/Schema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Schema.pm) + +Line 78. + +*** + +### instance + +#### Signature + +```perl +sub instance($class) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/SWML/Schema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Schema.pm) + +Line 67. + +*** + +### verb\_count + +#### Signature + +```perl +sub verb_count() +``` + +#### Source + +[`lib/SignalWire/SWML/Schema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Schema.pm) + +Line 88. + +## Source + +[`lib/SignalWire/SWML/Schema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Schema.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/swml/service/index.mdx b/fern/products/sdk-reference/perl/agents/swml/service/index.mdx new file mode 100644 index 0000000000..379ea6b4ef --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/swml/service/index.mdx @@ -0,0 +1,20 @@ +--- +slug: "/reference/perl/agents/swml/service" +title: "Service" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "agents.SWML.Service" + parent: "agents.SWML" + module: "agents.SWML" +--- +# `Service` + +## Classes + + + + diff --git a/fern/products/sdk-reference/perl/agents/swml/service/service/index.mdx b/fern/products/sdk-reference/perl/agents/swml/service/service/index.mdx new file mode 100644 index 0000000000..a9094a67eb --- /dev/null +++ b/fern/products/sdk-reference/perl/agents/swml/service/service/index.mdx @@ -0,0 +1,475 @@ +--- +slug: "/reference/perl/agents/swml/service/service" +title: "Service" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::SWML::Service" + parent: "agents.SWML.Service" + module: "agents.SWML.Service" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm" +--- +# `Service` + +## Signature + +```perl +package SignalWire::SWML::Service +``` + +## Methods + +### can + +#### Signature + +```perl +sub can($method) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) + +Line 146. + +*** + +### define\_tool + +#### Signature + +```perl +sub define_tool(%opts) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) + +Line 402. + +*** + +### define\_tools + +#### Signature + +```perl +sub define_tools(@tool_defs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) + +Line 468. + +*** + +### extract\_sip\_username + +#### Signature + +```perl +sub extract_sip_username($class_or_self, $request_body) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) + +Line 235. + +*** + +### get\_all\_functions + +#### Signature + +```perl +sub get_all_functions() +``` + +#### Source + +[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) + +Line 452. + +*** + +### get\_basic\_auth\_credentials + +#### Signature + +```perl +sub get_basic_auth_credentials($include_source) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) + +Line 199. + +*** + +### get\_basic\_auth\_credentials\_with\_source + +#### Signature + +```perl +sub get_basic_auth_credentials_with_source() +``` + +#### Source + +[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) + +Line 219. + +*** + +### get\_function + +#### Signature + +```perl +sub get_function($name) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) + +Line 445. + +*** + +### handle\_additional\_route + +#### Signature + +```perl +sub handle_additional_route($sub_path, $request_data, $env) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) + +Line 509. + +*** + +### has\_function + +#### Signature + +```perl +sub has_function($name) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) + +Line 438. + +*** + +### list\_tool\_names + +#### Signature + +```perl +sub list_tool_names() +``` + +#### Source + +[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) + +Line 492. + +*** + +### on\_function\_call + +#### Signature + +```perl +sub on_function_call($name, $args, $raw_data) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) + +Line 484. + +*** + +### on\_request + +#### Signature + +```perl +sub on_request($request_data, $callback_path) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) + +Line 377. + +*** + +### on\_swml\_request + +#### Signature + +```perl +sub on_swml_request($request_data, $callback_path, $request) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) + +Line 390. + +*** + +### register\_routing\_callback + +#### Signature + +```perl +sub register_routing_callback($path, $cb) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) + +Line 515. + +*** + +### register\_swaig\_function + +#### Signature + +```perl +sub register_swaig_function($func_def) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) + +Line 427. + +*** + +### remove\_function + +#### Signature + +```perl +sub remove_function($name) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) + +Line 459. + +*** + +### render\_main\_swml + +#### Signature + +```perl +sub render_main_swml($env) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) + +Line 356. + +*** + +### render\_swml + +#### Signature + +```perl +sub render_swml($env) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) + +Line 362. + +*** + +### swaig\_pre\_dispatch + +#### Signature + +```perl +sub swaig_pre_dispatch($request_data, $func_name, $env) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) + +Line 501. + +*** + +### to\_psgi\_app + +#### Signature + +```perl +sub to_psgi_app() +``` + +#### Source + +[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) + +Line 299. + +*** + +### validate\_basic\_auth + +#### Signature + +```perl +sub validate_basic_auth($username, $password) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) + +Line 186. + +## Source + +[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/core/core/index.mdx b/fern/products/sdk-reference/perl/core/core/index.mdx new file mode 100644 index 0000000000..d479876312 --- /dev/null +++ b/fern/products/sdk-reference/perl/core/core/index.mdx @@ -0,0 +1,20 @@ +--- +slug: "/reference/perl/core/core" +title: "Core" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "core.Core" + parent: "core" + module: "core" +--- +# `Core` + +## Modules + + + + diff --git a/fern/products/sdk-reference/perl/core/core/logging-config/index.mdx b/fern/products/sdk-reference/perl/core/core/logging-config/index.mdx new file mode 100644 index 0000000000..a95ac49ae8 --- /dev/null +++ b/fern/products/sdk-reference/perl/core/core/logging-config/index.mdx @@ -0,0 +1,20 @@ +--- +slug: "/reference/perl/core/core/logging-config" +title: "LoggingConfig" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "core.Core.LoggingConfig" + parent: "core.Core" + module: "core.Core" +--- +# `LoggingConfig` + +## Classes + + + + diff --git a/fern/products/sdk-reference/perl/core/core/logging-config/logging-config/index.mdx b/fern/products/sdk-reference/perl/core/core/logging-config/logging-config/index.mdx new file mode 100644 index 0000000000..b02949125b --- /dev/null +++ b/fern/products/sdk-reference/perl/core/core/logging-config/logging-config/index.mdx @@ -0,0 +1,63 @@ +--- +slug: "/reference/perl/core/core/logging-config/logging-config" +title: "LoggingConfig" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Core::LoggingConfig" + parent: "core.Core.LoggingConfig" + module: "core.Core.LoggingConfig" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Core/LoggingConfig.pm" +--- +# `LoggingConfig` + +## Signature + +```perl +package SignalWire::Core::LoggingConfig +``` + +## Methods + +### get\_execution\_mode + +#### Signature + +```perl +sub get_execution_mode() +``` + +#### Source + +[`lib/SignalWire/Core/LoggingConfig.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Core/LoggingConfig.pm) + +Line 33. + +*** + +### get\_logger + +#### Signature + +```perl +sub get_logger($name) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Core/LoggingConfig.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Core/LoggingConfig.pm) + +Line 14. + +## Source + +[`lib/SignalWire/Core/LoggingConfig.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Core/LoggingConfig.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/core/index.mdx b/fern/products/sdk-reference/perl/core/index.mdx new file mode 100644 index 0000000000..71d57e32a8 --- /dev/null +++ b/fern/products/sdk-reference/perl/core/index.mdx @@ -0,0 +1,20 @@ +--- +slug: "/reference/perl/core" +title: "core" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "core" +--- +# `core` + +## Modules + + + + + + diff --git a/fern/products/sdk-reference/perl/core/security/index.mdx b/fern/products/sdk-reference/perl/core/security/index.mdx new file mode 100644 index 0000000000..737d2149c8 --- /dev/null +++ b/fern/products/sdk-reference/perl/core/security/index.mdx @@ -0,0 +1,24 @@ +--- +slug: "/reference/perl/core/security" +title: "Security" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "core.Security" + parent: "core" + module: "core" +--- +# `Security` + +## Modules + + + + + + + + diff --git a/fern/products/sdk-reference/perl/core/security/session-manager/index.mdx b/fern/products/sdk-reference/perl/core/security/session-manager/index.mdx new file mode 100644 index 0000000000..8f1742ba5d --- /dev/null +++ b/fern/products/sdk-reference/perl/core/security/session-manager/index.mdx @@ -0,0 +1,20 @@ +--- +slug: "/reference/perl/core/security/session-manager" +title: "SessionManager" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "core.Security.SessionManager" + parent: "core.Security" + module: "core.Security" +--- +# `SessionManager` + +## Classes + + + + diff --git a/fern/products/sdk-reference/perl/core/security/session-manager/session-manager/index.mdx b/fern/products/sdk-reference/perl/core/security/session-manager/session-manager/index.mdx new file mode 100644 index 0000000000..3e4386ca62 --- /dev/null +++ b/fern/products/sdk-reference/perl/core/security/session-manager/session-manager/index.mdx @@ -0,0 +1,243 @@ +--- +slug: "/reference/perl/core/security/session-manager/session-manager" +title: "SessionManager" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Security::SessionManager" + parent: "core.Security.SessionManager" + module: "core.Security.SessionManager" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/SessionManager.pm" +--- +# `SessionManager` + +## Signature + +```perl +package SignalWire::Security::SessionManager +``` + +## Methods + +### activate\_session + +#### Signature + +```perl +sub activate_session($call_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Security/SessionManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/SessionManager.pm) + +Line 127. + +*** + +### create\_session + +#### Signature + +```perl +sub create_session($call_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Security/SessionManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/SessionManager.pm) + +Line 50. + +*** + +### create\_tool\_token + +#### Signature + +```perl +sub create_tool_token($function_name, $call_id) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Security/SessionManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/SessionManager.pm) + +Line 69. + +*** + +### debug\_token + +#### Signature + +```perl +sub debug_token($token) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Security/SessionManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/SessionManager.pm) + +Line 147. + +*** + +### end\_session + +#### Signature + +```perl +sub end_session($call_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Security/SessionManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/SessionManager.pm) + +Line 132. + +*** + +### generate\_token + +#### Signature + +```perl +sub generate_token($function_name, $call_id) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Security/SessionManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/SessionManager.pm) + +Line 56. + +*** + +### get\_session\_metadata + +#### Signature + +```perl +sub get_session_metadata($call_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Security/SessionManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/SessionManager.pm) + +Line 137. + +*** + +### set\_session\_metadata + +#### Signature + +```perl +sub set_session_metadata($call_id, $key, $value) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/Security/SessionManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/SessionManager.pm) + +Line 142. + +*** + +### validate\_token + +#### Signature + +```perl +sub validate_token($call_id, $function_name, $token) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/Security/SessionManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/SessionManager.pm) + +Line 83. + +*** + +### validate\_tool\_token + +#### Signature + +```perl +sub validate_tool_token($function_name, $token, $call_id) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/Security/SessionManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/SessionManager.pm) + +Line 119. + +## Source + +[`lib/SignalWire/Security/SessionManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/SessionManager.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/core/security/webhook-middleware/index.mdx b/fern/products/sdk-reference/perl/core/security/webhook-middleware/index.mdx new file mode 100644 index 0000000000..19ec490f9d --- /dev/null +++ b/fern/products/sdk-reference/perl/core/security/webhook-middleware/index.mdx @@ -0,0 +1,22 @@ +--- +slug: "/reference/perl/core/security/webhook-middleware" +title: "WebhookMiddleware" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "core.Security.WebhookMiddleware" + parent: "core.Security" + module: "core.Security" +--- +# `WebhookMiddleware` + +## Classes + + + + Wraps a PSGI app so that incoming POST requests must carry a valid `X-SignalWire-Signature` header (or the legacy `X-Twilio-Signature`) matching the configured signing key. Invalid or missing signatures produce a 403 without ever invoking the wrapped app. + + diff --git a/fern/products/sdk-reference/perl/core/security/webhook-middleware/webhook-middleware/index.mdx b/fern/products/sdk-reference/perl/core/security/webhook-middleware/webhook-middleware/index.mdx new file mode 100644 index 0000000000..704e0b0c9e --- /dev/null +++ b/fern/products/sdk-reference/perl/core/security/webhook-middleware/webhook-middleware/index.mdx @@ -0,0 +1,68 @@ +--- +slug: "/reference/perl/core/security/webhook-middleware/webhook-middleware" +title: "WebhookMiddleware" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Security::WebhookMiddleware" + parent: "core.Security.WebhookMiddleware" + module: "core.Security.WebhookMiddleware" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/WebhookMiddleware.pm" +--- +# `WebhookMiddleware` + +Wraps a PSGI app so that incoming POST requests must carry a valid `X-SignalWire-Signature` header (or the legacy `X-Twilio-Signature`) matching the configured signing key. Invalid or missing signatures produce a 403 without ever invoking the wrapped app. + +The raw body is captured before validation and stashed on the env as `signalwire.raw_body`; `psgi.input` is rewound (or replaced with a buffer) so downstream handlers can re-read. + +**Synopsis** + +```perl +use SignalWire::Security::WebhookMiddleware; +``` + +```perl +my $wrapped = SignalWire::Security::WebhookMiddleware->wrap( + app => $psgi_app, + signing_key => $ENV{SIGNALWIRE_SIGNING_KEY}, + paths => [ '/', '/swaig', '/post_prompt' ], + trust_proxy => 1, +); +``` + +## Signature + +```perl +package SignalWire::Security::WebhookMiddleware +``` + +## Methods + +### wrap + +#### Signature + +```perl +sub wrap($class, %opts) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Security/WebhookMiddleware.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/WebhookMiddleware.pm) + +Line 63. + +## Source + +[`lib/SignalWire/Security/WebhookMiddleware.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/WebhookMiddleware.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/core/security/webhook-validator/index.mdx b/fern/products/sdk-reference/perl/core/security/webhook-validator/index.mdx new file mode 100644 index 0000000000..22d9f7a5bd --- /dev/null +++ b/fern/products/sdk-reference/perl/core/security/webhook-validator/index.mdx @@ -0,0 +1,22 @@ +--- +slug: "/reference/perl/core/security/webhook-validator" +title: "WebhookValidator" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "core.Security.WebhookValidator" + parent: "core.Security" + module: "core.Security" +--- +# `WebhookValidator` + +## Classes + + + + Implements both signature schemes from porting-sdk/webhooks.md: + + diff --git a/fern/products/sdk-reference/perl/core/security/webhook-validator/webhook-validator/index.mdx b/fern/products/sdk-reference/perl/core/security/webhook-validator/webhook-validator/index.mdx new file mode 100644 index 0000000000..194160e2c7 --- /dev/null +++ b/fern/products/sdk-reference/perl/core/security/webhook-validator/webhook-validator/index.mdx @@ -0,0 +1,125 @@ +--- +slug: "/reference/perl/core/security/webhook-validator/webhook-validator" +title: "WebhookValidator" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Security::WebhookValidator" + parent: "core.Security.WebhookValidator" + module: "core.Security.WebhookValidator" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/WebhookValidator.pm" +--- +# `WebhookValidator` + +Implements both signature schemes from porting-sdk/webhooks.md: + +- Scheme A (RELAY / SWML / JSON) + + `lower_hex(HMAC-SHA1(key, url + raw_body))` + +- Scheme B (Compat / cXML form) + + `base64(HMAC-SHA1(key, url + sorted_concat_form_params))`, with URL port normalization (try both with / without `:443` / `:80`) and an optional `bodySHA256` query-param fallback for JSON-on-compat. + +The combined entry point tries Scheme A first, then Scheme B in all URL / param-shape variants. All signature comparisons use a constant-time compare so the secret is not leaked across repeated requests. + +**ERROR MODES** + +- Valid signature -> returns `1` + +- Invalid signature -> returns `0` + +- Missing `$signature` -> returns `0` (never throws) + +- Missing `$signing_key` -> croaks (programming error) + +- Reference passed as `$raw_body` -> croaks + +**Synopsis** + +```perl +use SignalWire::Security::WebhookValidator qw( + validate_webhook_signature validate_request +); +``` + +```perl +# JSON / RELAY / SWML callbacks +if (validate_webhook_signature($signing_key, $sig_header, $url, $raw_body)) { + # request is genuine +} +``` + +```perl +# Legacy compat-api drop-in +if (validate_request($signing_key, $sig_header, $url, \%params)) { + # cXML / form-encoded request is genuine +} +``` + +## Signature + +```perl +package SignalWire::Security::WebhookValidator +``` + +## Methods + +### validate\_request + +#### Signature + +```perl +sub validate_request($signing_key, $signature, $url, $params_or_raw_body) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`lib/SignalWire/Security/WebhookValidator.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/WebhookValidator.pm) + +Line 309. + +*** + +### validate\_webhook\_signature + +#### Signature + +```perl +sub validate_webhook_signature($signing_key, $signature, $url, $raw_body) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`lib/SignalWire/Security/WebhookValidator.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/WebhookValidator.pm) + +Line 260. + +## Source + +[`lib/SignalWire/Security/WebhookValidator.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/WebhookValidator.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/index.mdx b/fern/products/sdk-reference/perl/index.mdx index 7d8f507618..bd10a55bce 100644 --- a/fern/products/sdk-reference/perl/index.mdx +++ b/fern/products/sdk-reference/perl/index.mdx @@ -11,5 +11,8 @@ Version: **2.0.2** ## Modules -- [`Constants`](/docs/sdk-reference/reference/perl/signal-wire/relay/constants/constants) +- [`agents`](/docs/sdk-reference/reference/perl/agents) +- [`core`](/docs/sdk-reference/reference/perl/core) +- [`relay`](/docs/sdk-reference/reference/perl/relay) +- [`rest`](/docs/sdk-reference/reference/perl/rest) diff --git a/fern/products/sdk-reference/perl/relay/action/action/index.mdx b/fern/products/sdk-reference/perl/relay/action/action/index.mdx new file mode 100644 index 0000000000..397e8aeabc --- /dev/null +++ b/fern/products/sdk-reference/perl/relay/action/action/index.mdx @@ -0,0 +1,357 @@ +--- +slug: "/reference/perl/relay/action/action" +title: "Action" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Relay::Action" + parent: "relay.Action" + module: "relay.Action" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm" +--- +# `Action` + +SignalWire::Relay::Action is the base class for every long-running RELAY operation (play, record, detect, collect, fax, tap, stream, pay, transcribe, AI). It tracks the `control_id` correlation key, accumulates events, exposes the latest `payload`, and resolves when the operation reaches a terminal state — mirroring the Python reference's action objects. + +Construction fails fast: `control_id` must be a non-empty string, `events` must be an arrayref, and `payload` must be a hashref (Moo `isa` constraints). These objects are normally created by SignalWire::Relay::Call, not by user code. + +**BASE METHODS** + +- `on_completed($cb)` — register a completion callback (fires immediately if already done); no-arg form returns the registered callback. + +- `is_done` — true once resolved. + +- `wait(timeout => $secs)` — block (polling) until resolved or the timeout elapses (default 30s), then return the result. + +- `stop` — send the subclass's stop verb unless already done. + +**LICENSE** + +Copyright (c) 2025 SignalWire. Licensed under the MIT License. + +**SUBCLASSES** + +Each subclass overrides the stop verb and adds result accessors: + +- **::Play** — `pause`, `resume`, `volume($vol)`. + +- **::Record** — `pause(behavior => ...)`, `resume`, and the `url` / `duration` / `size` result accessors. + +- **::Detect** — `detect_result`; resolves on the first `params.detect` payload. + +- **::Collect** / **::StandaloneCollect** — `start_input_timers`, `collect_result`; filters stray `calling.call.play` events. + +- **::Fax** — `fax_result`; stop verb depends on `_fax_type`. + +- **::Tap**, **::Stream**, **::Transcribe**, **::AI** — stop-verb-only specialisations. + +- **::Pay** — `pay_result`. + +**Synopsis** + +```perl +# Actions are returned by SignalWire::Relay::Call methods, not +# constructed directly: +my $action = $call->play_async( url => $url ); # ::Action::Play +``` + +```perl +$action->on_completed(sub ($a) { print "done: ", $a->state, "\n"; }); +my $result = $action->wait( timeout => 30 ); # block until done +$action->stop unless $action->is_done; +``` + +## Signature + +```perl +package SignalWire::Relay::Action +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::Action](/docs/sdk-reference/reference/perl/relay/action/action), `SignalWire::Relay::Action::Collect` + +## See Also + +- SignalWire::Relay::Call, SignalWire::Relay::Client, SignalWire::Relay::Event. + +## Methods + +### collect\_result + +#### Signature + +```perl +sub collect_result() +``` + +#### Source + +[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) + +Line 208. + +*** + +### detect\_result + +#### Signature + +```perl +sub detect_result() +``` + +#### Source + +[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) + +Line 176. + +*** + +### duration + +#### Signature + +```perl +sub duration() +``` + +#### Source + +[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) + +Line 165. + +*** + +### fax\_result + +#### Signature + +```perl +sub fax_result() +``` + +#### Source + +[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) + +Line 264. + +*** + +### is\_done + +#### Signature + +```perl +sub is_done() +``` + +#### Source + +[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) + +Line 57. + +*** + +### on\_completed + +#### Signature + +```perl +sub on_completed() +``` + +#### Source + +[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) + +Line 43. + +*** + +### pause + +#### Signature + +```perl +sub pause() +``` + +#### Source + +[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) + +Line 120. + +*** + +### pause + +#### Signature + +```perl +sub pause() +``` + +#### Source + +[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) + +Line 147. + +*** + +### pay\_result + +#### Signature + +```perl +sub pay_result() +``` + +#### Source + +[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) + +Line 287. + +*** + +### resume + +#### Signature + +```perl +sub resume() +``` + +#### Source + +[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) + +Line 124. + +*** + +### resume + +#### Signature + +```perl +sub resume() +``` + +#### Source + +[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) + +Line 159. + +*** + +### size + +#### Signature + +```perl +sub size() +``` + +#### Source + +[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) + +Line 166. + +*** + +### start\_input\_timers + +#### Signature + +```perl +sub start_input_timers() +``` + +#### Source + +[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) + +Line 204. + +*** + +### stop + +#### Signature + +```perl +sub stop() +``` + +#### Source + +[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) + +Line 104. + +*** + +### url + +#### Signature + +```perl +sub url() +``` + +#### Source + +[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) + +Line 164. + +*** + +### volume + +#### Signature + +```perl +sub volume() +``` + +#### Source + +[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) + +Line 128. + +*** + +### wait + +#### Signature + +```perl +sub wait() +``` + +#### Source + +[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) + +Line 62. + +## Source + +[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/relay/action/index.mdx b/fern/products/sdk-reference/perl/relay/action/index.mdx new file mode 100644 index 0000000000..ddb00ef8c9 --- /dev/null +++ b/fern/products/sdk-reference/perl/relay/action/index.mdx @@ -0,0 +1,22 @@ +--- +slug: "/reference/perl/relay/action" +title: "Action" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "relay.Action" + parent: "relay" + module: "relay" +--- +# `Action` + +## Classes + + + + SignalWire::Relay::Action is the base class for every long-running RELAY operation (play, record, detect, collect, fax, tap, stream, pay, transcribe, AI). It tracks the `control_id` correlation key, accumulates events, exposes the latest `payload`, and resolves when the operation reaches a terminal state — mirroring the Python reference's action objects. + + diff --git a/fern/products/sdk-reference/perl/relay/call-state/call-state/index.mdx b/fern/products/sdk-reference/perl/relay/call-state/call-state/index.mdx new file mode 100644 index 0000000000..918a5f0174 --- /dev/null +++ b/fern/products/sdk-reference/perl/relay/call-state/call-state/index.mdx @@ -0,0 +1,168 @@ +--- +slug: "/reference/perl/relay/call-state/call-state" +title: "CallState" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Relay::CallState" + parent: "relay.CallState" + module: "relay.CallState" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/CallState.pm" +--- +# `CallState` + +The RELAY call-lifecycle states, surfaced as typed, named constants. A call moves through `created` → `ringing` → `answered` → `ending` → `ended`. Each constant's value is the exact wire string the server sends in the `calling.call.state` event's `call_state` field. + +The constants **are** the canonical wire strings, so nothing about `SignalWire::Relay::Call->state` changes: it still reads and writes a plain string. That keeps parity with the Python reference (bare `str`) and leaves forward-compatible server states working — an unknown string is simply not in this set. + +Grounded in the Python reference's `relay/constants.py` (`CALL_STATE_*` / `CALL_STATES`) and the port's SignalWire::Relay::Constants (`CALL_STATES` / `CALL_TERMINAL_STATES`), which are the single source the lists below are derived from. + +**CONSTANTS** + +Exported on request via Exporter; `:all` pulls every state. + +```perl +CREATED => 'created' +RINGING => 'ringing' +ANSWERED => 'answered' +ENDING => 'ending' +ENDED => 'ended' +``` + +**IS STATE** + +my $bool = SignalWire::Relay::CallState->is\_state($value); + +True if `$value` is a known call state. Returns false (never dies) on `undef` or an unknown/forward-compatible value. + +**IS TERMINAL** + +my $bool = SignalWire::Relay::CallState->is\_terminal($value); + +True if `$value` is a terminal call state (the only terminal `CallState` is `ended`). Returns false on `undef`, a non-terminal state, or an unknown value — it never dies, since these mirror server-emitted values that can grow. + +**LICENSE** + +Copyright (c) 2025 SignalWire. Licensed under the MIT License. + +**STATES** + +my $aref = SignalWire::Relay::CallState->states; + +Arrayref of the call lifecycle states, in lifecycle order. + +**THREE DISTINCT STATE VOCABULARIES** + +CallState, DialState, and MessageState are **distinct** sets with **distinct** terminal members and must never be conflated. `answered` is a **non-terminal** `CallState` but a **terminal** `DialState`; `failed` is not a `CallState` at all. Each module owns its own terminal set. + +**Synopsis** + +```perl +use SignalWire::Relay::CallState qw(CREATED RINGING ANSWERED ENDING ENDED); +``` + +```perl +# Named constants and bare wire strings are interchangeable: +$call->state eq ANSWERED; # constant +$call->state eq 'answered'; # string (Python parity) +``` + +```perl +# Membership / terminality (false on unknown — never dies): +SignalWire::Relay::CallState->is_state('ringing'); # 1 +SignalWire::Relay::CallState->is_terminal('ended'); # 1 +SignalWire::Relay::CallState->is_terminal('answered'); # 0 +SignalWire::Relay::CallState->is_terminal('made_up'); # 0 +@{ SignalWire::Relay::CallState->states }; # created..ended +``` + +## Signature + +```perl +package SignalWire::Relay::CallState +``` + +## See Also + +- SignalWire::Relay::Call, SignalWire::Relay::Constants, SignalWire::Relay::DialState, SignalWire::Relay::MessageState. + +## Constants + + + + + + + + + + + +## Methods + +### is\_state + +#### Signature + +```perl +sub is_state($class, $value) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Relay/CallState.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/CallState.pm) + +Line 84. + +*** + +### is\_terminal + +#### Signature + +```perl +sub is_terminal($class, $value) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Relay/CallState.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/CallState.pm) + +Line 93. + +*** + +### states + +#### Signature + +```perl +sub states() +``` + +#### Source + +[`lib/SignalWire/Relay/CallState.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/CallState.pm) + +Line 78. + +## Source + +[`lib/SignalWire/Relay/CallState.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/CallState.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/relay/call-state/index.mdx b/fern/products/sdk-reference/perl/relay/call-state/index.mdx new file mode 100644 index 0000000000..5817506bb9 --- /dev/null +++ b/fern/products/sdk-reference/perl/relay/call-state/index.mdx @@ -0,0 +1,22 @@ +--- +slug: "/reference/perl/relay/call-state" +title: "CallState" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "relay.CallState" + parent: "relay" + module: "relay" +--- +# `CallState` + +## Classes + + + + The RELAY call-lifecycle states, surfaced as typed, named constants. A call moves through `created` → `ringing` → `answered` → `ending` → `ended`. Each constant's value is the exact wire string the server sends in the `calling.call.state` event's `call_state` field. + + diff --git a/fern/products/sdk-reference/perl/relay/call/call/index.mdx b/fern/products/sdk-reference/perl/relay/call/call/index.mdx new file mode 100644 index 0000000000..5f7fe3cf07 --- /dev/null +++ b/fern/products/sdk-reference/perl/relay/call/call/index.mdx @@ -0,0 +1,932 @@ +--- +slug: "/reference/perl/relay/call/call" +title: "Call" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Relay::Call" + parent: "relay.Call" + module: "relay.Call" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm" +--- +# `Call` + +SignalWire::Relay::Call is the Perl port of the Python reference's call object. It models one RELAY call: it carries call state, demultiplexes incoming events (updating state, routing to the right SignalWire::Relay::Action by `control_id`, and firing listeners), and exposes the full set of call-control verbs. + +Construction fails fast: `call_id` is required and must be a non-empty string; `device` / `peer` must be hashrefs (Moo `isa` constraints). These objects are created by SignalWire::Relay::Client. + +**ACTION-BASED VERBS** + +`play`, `record`, `detect`, `collect`, `play_and_collect`, `send_fax`, `receive_fax`, `tap`, `stream`, `pay`, `transcribe`, `ai` — each returns a SignalWire::Relay::Action subclass that tracks a `control_id` and resolves when the operation completes. + +**EVENTS** + +- `on($cb)` — register a listener invoked as `$cb->($call, $event)` for every dispatched event. The callback must be a coderef. + +- `dispatch_event($event)` — apply an incoming event (normally called by the client). + +**FIRE-AND-RESPONSE VERBS** + +`answer`, `hangup`, `pass`, `connect`, `disconnect`, `hold`, `unhold`, `denoise`, `denoise_stop`, `transfer`, `join_conference`, `leave_conference`, `echo`, `bind_digit`, `clear_digit_bindings`, `live_transcribe`, `live_translate`, `join_room`, `leave_room`, `amazon_bedrock`, `ai_message`, `ai_hold`, `ai_unhold`, `user_event`, `queue_enter`, `queue_leave`, `refer`, `send_digits`. Each forwards its keyword arguments to the matching RELAY method. + +**LICENSE** + +Copyright (c) 2025 SignalWire. Licensed under the MIT License. + +**TYPED CONVENIENCE WRAPPERS** + +`play_tts`, `play_audio`, `play_silence`, `play_ringtone` build the RELAY media object and delegate to `play`. `detect_digit`, `detect_answering_machine`, `detect_fax` build the detect object and delegate to `detect`. `prompt_tts` / `prompt_audio` play a prompt and collect input via `play_and_collect`. + +**TYPED STATE** + +`state` remains the canonical bare-string accessor (Python parity). These add the SignalWire::Relay::CallState-backed view: + +- `current_state` — the call's lifecycle state as the CallState-typed view. Returns the same wire string as `state` (the CallState constants **are** the wire strings); pair it with `SignalWire::Relay::CallState->is_state` / `->is_terminal` for membership and terminality. + +- `is_terminal` — true once the call has reached a terminal lifecycle state (`ended`). Delegates to SignalWire::Relay::CallState so the terminal definition lives in one place; returns false (never dies) on an unknown/forward-compatible state. + +**Synopsis** + +```perl +# Calls are produced by SignalWire::Relay::Client, not constructed +# directly: +$call->answer; +$call->play_tts( text => 'Hello', voice => 'en-US-Neural2-A' ); +``` + +```perl +my $rec = $call->record( record => { ... } ); # returns an Action +$rec->on_completed(sub ($a) { ... }); +``` + +```perl +$call->on(sub ($c, $event) { ... }); # raw event listener +$call->hangup; +``` + +## Signature + +```perl +package SignalWire::Relay::Call +``` + +## See Also + +- SignalWire::Relay::Client, SignalWire::Relay::Action, SignalWire::Relay::Event, SignalWire::Relay::Constants, SignalWire::Relay::CallState, SignalWire::Relay::Device. + +## Methods + +### ai + +#### Signature + +```perl +sub ai() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 491. + +*** + +### ai\_hold + +#### Signature + +```perl +sub ai_hold() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 283. + +*** + +### ai\_message + +#### Signature + +```perl +sub ai_message() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 279. + +*** + +### ai\_unhold + +#### Signature + +```perl +sub ai_unhold() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 287. + +*** + +### amazon\_bedrock + +#### Signature + +```perl +sub amazon_bedrock() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 275. + +*** + +### answer + +#### Signature + +```perl +sub answer() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 196. + +*** + +### bind\_digit + +#### Signature + +```perl +sub bind_digit() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 248. + +*** + +### clear\_digit\_bindings + +#### Signature + +```perl +sub clear_digit_bindings() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 252. + +*** + +### collect + +#### Signature + +```perl +sub collect() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 408. + +*** + +### connect + +#### Signature + +```perl +sub connect() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 208. + +*** + +### current\_state + +#### Signature + +```perl +sub current_state() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 174. + +*** + +### denoise + +#### Signature + +```perl +sub denoise() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 224. + +*** + +### denoise\_stop + +#### Signature + +```perl +sub denoise_stop() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 228. + +*** + +### detect + +#### Signature + +```perl +sub detect() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 363. + +*** + +### detect\_answering\_machine + +#### Signature + +```perl +sub detect_answering_machine() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 383. + +*** + +### detect\_digit + +#### Signature + +```perl +sub detect_digit() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 374. + +*** + +### detect\_fax + +#### Signature + +```perl +sub detect_fax() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 399. + +*** + +### disconnect + +#### Signature + +```perl +sub disconnect() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 212. + +*** + +### dispatch\_event + +#### Signature + +```perl +sub dispatch_event() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 98. + +*** + +### echo + +#### Signature + +```perl +sub echo() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 244. + +*** + +### hangup + +#### Signature + +```perl +sub hangup() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 200. + +*** + +### hold + +#### Signature + +```perl +sub hold() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 216. + +*** + +### is\_terminal + +#### Signature + +```perl +sub is_terminal() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 182. + +*** + +### join\_conference + +#### Signature + +```perl +sub join_conference() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 236. + +*** + +### join\_room + +#### Signature + +```perl +sub join_room() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 264. + +*** + +### leave\_conference + +#### Signature + +```perl +sub leave_conference() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 240. + +*** + +### leave\_room + +#### Signature + +```perl +sub leave_room() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 268. + +*** + +### live\_transcribe + +#### Signature + +```perl +sub live_transcribe() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 256. + +*** + +### live\_translate + +#### Signature + +```perl +sub live_translate() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 260. + +*** + +### on + +#### Signature + +```perl +sub on() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 156. + +*** + +### pass + +#### Signature + +```perl +sub pass() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 204. + +*** + +### pay + +#### Signature + +```perl +sub pay() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 483. + +*** + +### play + +#### Signature + +```perl +sub play() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 313. + +*** + +### play\_and\_collect + +#### Signature + +```perl +sub play_and_collect() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 412. + +*** + +### play\_audio + +#### Signature + +```perl +sub play_audio() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 337. + +*** + +### play\_ringtone + +#### Signature + +```perl +sub play_ringtone() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 350. + +*** + +### play\_silence + +#### Signature + +```perl +sub play_silence() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 344. + +*** + +### play\_tts + +#### Signature + +```perl +sub play_tts() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 326. + +*** + +### prompt\_audio + +#### Signature + +```perl +sub prompt_audio() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 436. + +*** + +### prompt\_tts + +#### Signature + +```perl +sub prompt_tts() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 422. + +*** + +### queue\_enter + +#### Signature + +```perl +sub queue_enter() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 295. + +*** + +### queue\_leave + +#### Signature + +```perl +sub queue_leave() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 299. + +*** + +### receive\_fax + +#### Signature + +```perl +sub receive_fax() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 451. + +*** + +### record + +#### Signature + +```perl +sub record() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 359. + +*** + +### refer + +#### Signature + +```perl +sub refer() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 303. + +*** + +### send\_digits + +#### Signature + +```perl +sub send_digits() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 307. + +*** + +### send\_fax + +#### Signature + +```perl +sub send_fax() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 446. + +*** + +### stream + +#### Signature + +```perl +sub stream() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 479. + +*** + +### tap + +#### Signature + +```perl +sub tap() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 475. + +*** + +### transcribe + +#### Signature + +```perl +sub transcribe() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 487. + +*** + +### transfer + +#### Signature + +```perl +sub transfer() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 232. + +*** + +### unhold + +#### Signature + +```perl +sub unhold() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 220. + +*** + +### user\_event + +#### Signature + +```perl +sub user_event() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 291. + +## Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/relay/call/index.mdx b/fern/products/sdk-reference/perl/relay/call/index.mdx new file mode 100644 index 0000000000..01cfe19200 --- /dev/null +++ b/fern/products/sdk-reference/perl/relay/call/index.mdx @@ -0,0 +1,22 @@ +--- +slug: "/reference/perl/relay/call" +title: "Call" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "relay.Call" + parent: "relay" + module: "relay" +--- +# `Call` + +## Classes + + + + SignalWire::Relay::Call is the Perl port of the Python reference's call object. It models one RELAY call: it carries call state, demultiplexes incoming events (updating state, routing to the right SignalWire::Relay::Action by `control_id`, and firing listeners), and exposes the full set of call-control verbs. + + diff --git a/fern/products/sdk-reference/perl/relay/client/client/index.mdx b/fern/products/sdk-reference/perl/relay/client/client/index.mdx new file mode 100644 index 0000000000..53587027b4 --- /dev/null +++ b/fern/products/sdk-reference/perl/relay/client/client/index.mdx @@ -0,0 +1,359 @@ +--- +slug: "/reference/perl/relay/client/client" +title: "Client" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Relay::Client" + parent: "relay.Client" + module: "relay.Client" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm" +--- +# `Client` + +SignalWire::Relay::Client is the Perl port of the Python reference's `RelayClient`. It owns the RELAY WebSocket transport, performs the `signalwire.connect` handshake, runs a synchronous JSON-RPC request/ response loop, demultiplexes server-initiated events into typed SignalWire::Relay::Event objects, and routes them to the right SignalWire::Relay::Call / SignalWire::Relay::Message. + +Construction fails fast: `host` is required and must be a non-empty string; `contexts` must be an arrayref (Moo `isa` constraints). + +**CONNECTION** + +`connect` (open WS + authenticate), `disconnect`, `connect_ws`, `authenticate`, `reconnect`, `disconnect_ws`, and `run` (the blocking read loop). + +**HANDLER REGISTRATION** + +- `on_call($cb)` — `$cb->($call)` for each inbound call. + +- `on_message($cb)` — `$cb->($event)` for each inbound message. + +- `on_event($cb)` — `$cb->($event)` for every event. + +Each callback must be a coderef; each returns `$self` for chaining. + +**LICENSE** + +Copyright (c) 2025 SignalWire. Licensed under the MIT License. + +**RPC AND OPERATIONS** + +- `execute($method, $params)` — issue a JSON-RPC call and block for the result. + +- `dial(%opts)` — place an outbound call; returns the answered SignalWire::Relay::Call. + +- `send_message(%opts)` — send an SMS/MMS; returns a SignalWire::Relay::Message handle. + +- `receive($contexts)` / `unreceive($contexts)` — subscribe / unsubscribe to inbound contexts. Accepts an arrayref (canonical) or a bare list. + +**Synopsis** + +```perl +use SignalWire::Relay::Client; +``` + +```perl +my $client = SignalWire::Relay::Client->new( + host => 'relay.example.com', + project => $project, + token => $token, +); +``` + +```perl +$client->on_call(sub ($call) { $call->answer; }); +$client->connect; # opens WS + authenticates +$client->receive(['office']); # subscribe to inbound contexts +``` + +```perl +my $call = $client->dial( devices => [...] ); # outbound +my $msg = $client->send_message( to_number => $to, + from_number => $from, + body => 'hi' ); +``` + +```perl +$client->run; # block in the event loop +$client->disconnect; +``` + +## Signature + +```perl +package SignalWire::Relay::Client +``` + +## See Also + +- SignalWire::Relay::Call, SignalWire::Relay::Message, SignalWire::Relay::Event, SignalWire::Relay::Constants, and the RELAY protocol guide in porting-sdk/RELAY\_IMPLEMENTATION\_GUIDE.md. + +## Methods + +### authenticate + +#### Signature + +```perl +sub authenticate() +``` + +#### Source + +[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) + +Line 228. + +*** + +### connect + +#### Signature + +```perl +sub connect() +``` + +#### Source + +[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) + +Line 128. + +*** + +### connect\_ws + +#### Signature + +```perl +sub connect_ws() +``` + +#### Source + +[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) + +Line 142. + +*** + +### dial + +#### Signature + +```perl +sub dial() +``` + +#### Source + +[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) + +Line 411. + +*** + +### disconnect + +#### Signature + +```perl +sub disconnect() +``` + +#### Source + +[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) + +Line 138. + +*** + +### disconnect\_ws + +#### Signature + +```perl +sub disconnect_ws() +``` + +#### Source + +[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) + +Line 763. + +*** + +### execute + +#### Signature + +```perl +sub execute() +``` + +#### Source + +[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) + +Line 279. + +*** + +### on\_call + +#### Signature + +```perl +sub on_call() +``` + +#### Source + +[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) + +Line 105. + +*** + +### on\_event + +#### Signature + +```perl +sub on_event() +``` + +#### Source + +[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) + +Line 117. + +*** + +### on\_message + +#### Signature + +```perl +sub on_message() +``` + +#### Source + +[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) + +Line 111. + +*** + +### receive + +#### Signature + +```perl +sub receive($contexts) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) + +Line 372. + +*** + +### reconnect + +#### Signature + +```perl +sub reconnect() +``` + +#### Source + +[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) + +Line 731. + +*** + +### relay\_protocol + +#### Signature + +```perl +sub relay_protocol() +``` + +#### Source + +[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) + +Line 66. + +*** + +### run + +#### Signature + +```perl +sub run() +``` + +#### Source + +[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) + +Line 774. + +*** + +### send\_message + +#### Signature + +```perl +sub send_message() +``` + +#### Source + +[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) + +Line 325. + +*** + +### unreceive + +#### Signature + +```perl +sub unreceive($contexts) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) + +Line 393. + +## Source + +[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/relay/client/index.mdx b/fern/products/sdk-reference/perl/relay/client/index.mdx new file mode 100644 index 0000000000..e5c1343a31 --- /dev/null +++ b/fern/products/sdk-reference/perl/relay/client/index.mdx @@ -0,0 +1,22 @@ +--- +slug: "/reference/perl/relay/client" +title: "Client" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "relay.Client" + parent: "relay" + module: "relay" +--- +# `Client` + +## Classes + + + + SignalWire::Relay::Client is the Perl port of the Python reference's `RelayClient`. It owns the RELAY WebSocket transport, performs the `signalwire.connect` handshake, runs a synchronous JSON-RPC request/ response loop, demultiplexes server-initiated events into typed SignalWire::Relay::Event objects, and routes them to the right SignalWire::Relay::Call / SignalWire::Relay::Message. + + diff --git a/fern/products/sdk-reference/perl/relay/constants/constants/index.mdx b/fern/products/sdk-reference/perl/relay/constants/constants/index.mdx new file mode 100644 index 0000000000..48370bfe4a --- /dev/null +++ b/fern/products/sdk-reference/perl/relay/constants/constants/index.mdx @@ -0,0 +1,77 @@ +--- +slug: "/reference/perl/relay/constants/constants" +title: "Constants" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "SignalWire::Relay::Constants" + parent: "relay.Constants" + module: "relay.Constants" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Constants.pm" +--- +# `Constants` + +## Signature + +```perl +package SignalWire::Relay::Constants +``` + +## Constants + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## Source + +[`lib/SignalWire/Relay/Constants.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Constants.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/relay/constants/index.mdx b/fern/products/sdk-reference/perl/relay/constants/index.mdx new file mode 100644 index 0000000000..392eafc1d5 --- /dev/null +++ b/fern/products/sdk-reference/perl/relay/constants/index.mdx @@ -0,0 +1,20 @@ +--- +slug: "/reference/perl/relay/constants" +title: "Constants" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "relay.Constants" + parent: "relay" + module: "relay" +--- +# `Constants` + +## Modules + + + + diff --git a/fern/products/sdk-reference/perl/relay/device/device/index.mdx b/fern/products/sdk-reference/perl/relay/device/device/index.mdx new file mode 100644 index 0000000000..db3d5558dd --- /dev/null +++ b/fern/products/sdk-reference/perl/relay/device/device/index.mdx @@ -0,0 +1,106 @@ +--- +slug: "/reference/perl/relay/device/device" +title: "Device" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Relay::Device" + parent: "relay.Device" + module: "relay.Device" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Device.pm" +--- +# `Device` + +A RELAY **device** object — the `{ type, params }` pair that names one leg of a dial / connect / refer / tap target. It recurs as a raw hashref across the relay calling layer (`$client->dial(devices => [...])`, `$call->connect` / `$call->refer`, and the `device` field on SignalWire::Relay::Call / the `CallState` / `CallReceive` events). + +This class types the **shape** of that hashref so callers can build one with a constructor and named accessors instead of hand-assembling a nested map. "to\_hash" yields the byte-identical wire hashref the raw form produced, so a `Device` is a drop-in replacement wherever a device hashref is accepted — the existing relay verbs are unchanged (additive, parity-preserving). + +Grounded in `relay-protocol/calling.connect.params.json` and `calling.dial.params.json`, where each device is `{ "type": , "params": }` with `type` required. + +**LICENSE** + +Copyright (c) 2025 SignalWire. Licensed under the MIT License. + +**THE SHAPE IS TYPED; THE DISCRIMINANT IS NOT** + +`type` is kept a plain **string**: the device-type set (`phone`, `sip`, ...) is **not** enumerated in the wire schema (it is an open `{ "type": "string" }`), so turning it into a closed enum would reject valid and forward-compatible values. Per the idiom rule, this class types the **knowable shape** and leaves the **unbounded discriminant** a string. `params` is a per-type arbitrary object, also left untyped. + +Construction fails fast (Moo `isa`): `type` is required and must be a non-empty string; `params` must be a hashref when supplied. + +**TO HASH** + +my $wire = $device->to\_hash; + +Return the canonical RELAY device wire hashref `{ type, params }` — exactly the raw shape the relay verbs already accept. `params` is snapshotted at construction and copied again here, so each emitted hash is independent: mutating one `to_hash` never affects the Device or a later emission, and a mutation of the caller's original hashref after construction does not leak in. + +**TYPE** + +The device type discriminant (e.g. `phone`, `sip`). Required, read-only, a non-empty string. + +**Synopsis** + +```perl +use SignalWire::Relay::Device; +``` + +```perl +my $device = SignalWire::Relay::Device->new( + type => 'phone', + params => { + to_number => '+15551234567', + from_number => '+15557654321', + timeout => 30, + }, +); +``` + +```perl +$device->type; # 'phone' +$device->params; # { to_number => ..., from_number => ..., timeout => 30 } +``` + +```perl +# to_hash yields the exact wire hashref the relay verbs accept: +my $wire = $device->to_hash; +# { type => 'phone', params => { to_number => ..., ... } } +``` + +```perl +# Drop-in for the hand-written hashref in a devices matrix: +$call->connect( devices => [[ $device->to_hash ]] ); +``` + +## Signature + +```perl +package SignalWire::Relay::Device +``` + +## See Also + +- SignalWire::Relay::Call, SignalWire::Relay::Client, SignalWire::Relay::Event. + +## Methods + +### to\_hash + +#### Signature + +```perl +sub to_hash() +``` + +#### Source + +[`lib/SignalWire/Relay/Device.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Device.pm) + +Line 78. + +## Source + +[`lib/SignalWire/Relay/Device.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Device.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/relay/device/index.mdx b/fern/products/sdk-reference/perl/relay/device/index.mdx new file mode 100644 index 0000000000..bcc6249e4b --- /dev/null +++ b/fern/products/sdk-reference/perl/relay/device/index.mdx @@ -0,0 +1,22 @@ +--- +slug: "/reference/perl/relay/device" +title: "Device" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "relay.Device" + parent: "relay" + module: "relay" +--- +# `Device` + +## Classes + + + + A RELAY **device** object — the `{ type, params }` pair that names one leg of a dial / connect / refer / tap target. It recurs as a raw hashref across the relay calling layer (`$client->dial(devices => [...])`, `$call->connect` / `$call->refer`, and the `device` field on SignalWire::Relay::Call / the `CallState` / `CallReceive` events). + + diff --git a/fern/products/sdk-reference/perl/relay/dial-state/dial-state/index.mdx b/fern/products/sdk-reference/perl/relay/dial-state/dial-state/index.mdx new file mode 100644 index 0000000000..05b952f323 --- /dev/null +++ b/fern/products/sdk-reference/perl/relay/dial-state/dial-state/index.mdx @@ -0,0 +1,162 @@ +--- +slug: "/reference/perl/relay/dial-state/dial-state" +title: "DialState" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Relay::DialState" + parent: "relay.DialState" + module: "relay.DialState" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/DialState.pm" +--- +# `DialState` + +The RELAY dial-outcome states, surfaced as typed, named constants. An outbound dial reports progress via the `calling.call.dial` event's `dial_state` field: `dialing` while in progress, then a terminal outcome of `answered` (a leg picked up — the dial succeeded) or `failed` (no leg answered). Each constant's value is the exact wire string the server sends. + +The constants **are** the canonical wire strings, so the dial flow is unchanged: it still compares plain strings (see SignalWire::Relay::Client's dial dispatch, which resolves a pending dial on `answered` and rejects on `failed`). That keeps parity with the Python reference and leaves forward-compatible server states working. + +Grounded in the port's SignalWire::Relay::Constants (`DIAL_STATES` / `DIAL_TERMINAL_STATES`), which are the single source the lists below are derived from. + +**CONSTANTS** + +Exported on request via Exporter; `:all` pulls every state. + +```perl +DIALING => 'dialing' +ANSWERED => 'answered' +FAILED => 'failed' +``` + +**IS STATE** + +my $bool = SignalWire::Relay::DialState->is\_state($value); + +True if `$value` is a known dial state. Returns false (never dies) on `undef` or an unknown/forward-compatible value. + +**IS TERMINAL** + +my $bool = SignalWire::Relay::DialState->is\_terminal($value); + +True if `$value` is a terminal dial state (`answered` or `failed`). Returns false on `undef`, the in-progress `dialing` state, or an unknown value — it never dies, since these mirror server-emitted values that can grow. + +**LICENSE** + +Copyright (c) 2025 SignalWire. Licensed under the MIT License. + +**STATES** + +my $aref = SignalWire::Relay::DialState->states; + +Arrayref of the dial-outcome states, in order. + +**THREE DISTINCT STATE VOCABULARIES** + +CallState, `DialState`, and MessageState are **distinct** sets and must never be conflated. `answered` is a **terminal** `DialState` but a **non-terminal** `CallState` — the same string with opposite terminality, because they are different vocabularies. `failed` is not a `CallState` at all. + +**Synopsis** + +```perl +use SignalWire::Relay::DialState qw(DIALING ANSWERED FAILED); +``` + +```perl +# Named constants and bare wire strings are interchangeable: +$event->dial_state eq ANSWERED; # constant +$event->dial_state eq 'answered'; # string (Python parity) +``` + +```perl +# Membership / terminality (false on unknown — never dies): +SignalWire::Relay::DialState->is_state('dialing'); # 1 +SignalWire::Relay::DialState->is_terminal('answered'); # 1 +SignalWire::Relay::DialState->is_terminal('failed'); # 1 +SignalWire::Relay::DialState->is_terminal('dialing'); # 0 +@{ SignalWire::Relay::DialState->states }; # dialing, answered, failed +``` + +## Signature + +```perl +package SignalWire::Relay::DialState +``` + +## See Also + +- SignalWire::Relay::Client, SignalWire::Relay::Constants, SignalWire::Relay::CallState, SignalWire::Relay::MessageState. + +## Constants + + + + + + + +## Methods + +### is\_state + +#### Signature + +```perl +sub is_state($class, $value) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Relay/DialState.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/DialState.pm) + +Line 85. + +*** + +### is\_terminal + +#### Signature + +```perl +sub is_terminal($class, $value) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Relay/DialState.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/DialState.pm) + +Line 95. + +*** + +### states + +#### Signature + +```perl +sub states() +``` + +#### Source + +[`lib/SignalWire/Relay/DialState.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/DialState.pm) + +Line 79. + +## Source + +[`lib/SignalWire/Relay/DialState.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/DialState.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/relay/dial-state/index.mdx b/fern/products/sdk-reference/perl/relay/dial-state/index.mdx new file mode 100644 index 0000000000..8b4156b13d --- /dev/null +++ b/fern/products/sdk-reference/perl/relay/dial-state/index.mdx @@ -0,0 +1,22 @@ +--- +slug: "/reference/perl/relay/dial-state" +title: "DialState" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "relay.DialState" + parent: "relay" + module: "relay" +--- +# `DialState` + +## Classes + + + + The RELAY dial-outcome states, surfaced as typed, named constants. An outbound dial reports progress via the `calling.call.dial` event's `dial_state` field: `dialing` while in progress, then a terminal outcome of `answered` (a leg picked up — the dial succeeded) or `failed` (no leg answered). Each constant's value is the exact wire string the server sends. + + diff --git a/fern/products/sdk-reference/perl/relay/event/event/index.mdx b/fern/products/sdk-reference/perl/relay/event/event/index.mdx new file mode 100644 index 0000000000..efa09b7762 --- /dev/null +++ b/fern/products/sdk-reference/perl/relay/event/event/index.mdx @@ -0,0 +1,87 @@ +--- +slug: "/reference/perl/relay/event/event" +title: "Event" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Relay::Event" + parent: "relay.Event" + module: "relay.Event" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Event.pm" +--- +# `Event` + +SignalWire::Relay::Event is the base class for every RELAY event the client receives. Each concrete event type is a small read-only Moo subclass that exposes the fields relevant to it (for example `::CallState` carries `call_state` / `end_reason` / `peer`, while `::MessageReceive` carries `from_number` / `body` / `media`). All subclasses inherit `event_type`, `timestamp`, and the raw `params` hashref from the base class. + +The event objects are read-only data carriers built from the server payload; they deliberately carry no `isa` constraints so a forward- compatible server shape is never rejected — unknown fields are simply ignored by Moo. + +**EVENT TYPES** + +The recognised `event_type` strings and their subclasses include the `calling.call.*` family (state, receive, dial, connect, disconnect, play, record, collect, detect, fax, tap, stream, transcribe, pay, send\_digits, refer, ai), `calling.conference`, `messaging.receive` / `messaging.state`, and the `signalwire.*` session events (`authorization.state`, `disconnect`). + +**LICENSE** + +Copyright (c) 2025 SignalWire. Licensed under the MIT License. + +**PARSE EVENT** + +my $event = SignalWire::Relay::Event->parse\_event($event\_type, $params); + +Class-method factory. Looks `$event_type` up in the internal event-class map and returns an instance of the matching subclass, populated from `$params` (which defaults to an empty hashref). Unknown event types fall back to a base SignalWire::Relay::Event carrying the raw type and params. Normally called by SignalWire::Relay::Client as it demultiplexes the WebSocket stream. + +**Synopsis** + +```perl +use SignalWire::Relay::Event; +``` + +```perl +my $event = SignalWire::Relay::Event->parse_event( + 'calling.call.state', + { call_id => $id, call_state => 'answered' }, +); +``` + +```perl +$event->event_type; # 'calling.call.state' +$event->call_state; # 'answered' (on the ::CallState subclass) +``` + +## Signature + +```perl +package SignalWire::Relay::Event +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::Event](/docs/sdk-reference/reference/perl/relay/event/event) + +## See Also + +- SignalWire::Relay::Client, SignalWire::Relay::Call, SignalWire::Relay::Message. + +## Methods + +### parse\_event + +#### Signature + +```perl +sub parse_event() +``` + +#### Source + +[`lib/SignalWire/Relay/Event.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Event.pm) + +Line 259. + +## Source + +[`lib/SignalWire/Relay/Event.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Event.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/relay/event/index.mdx b/fern/products/sdk-reference/perl/relay/event/index.mdx new file mode 100644 index 0000000000..9c4dc6c12a --- /dev/null +++ b/fern/products/sdk-reference/perl/relay/event/index.mdx @@ -0,0 +1,22 @@ +--- +slug: "/reference/perl/relay/event" +title: "Event" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "relay.Event" + parent: "relay" + module: "relay" +--- +# `Event` + +## Classes + + + + SignalWire::Relay::Event is the base class for every RELAY event the client receives. Each concrete event type is a small read-only Moo subclass that exposes the fields relevant to it (for example `::CallState` carries `call_state` / `end_reason` / `peer`, while `::MessageReceive` carries `from_number` / `body` / `media`). All subclasses inherit `event_type`, `timestamp`, and the raw `params` hashref from the base class. + + diff --git a/fern/products/sdk-reference/perl/relay/index.mdx b/fern/products/sdk-reference/perl/relay/index.mdx new file mode 100644 index 0000000000..b1c26b4d20 --- /dev/null +++ b/fern/products/sdk-reference/perl/relay/index.mdx @@ -0,0 +1,36 @@ +--- +slug: "/reference/perl/relay" +title: "relay" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "relay" +--- +# `relay` + +## Modules + + + + + + + + + + + + + + + + + + + + + + diff --git a/fern/products/sdk-reference/perl/relay/message-state/index.mdx b/fern/products/sdk-reference/perl/relay/message-state/index.mdx new file mode 100644 index 0000000000..29a29a6ae0 --- /dev/null +++ b/fern/products/sdk-reference/perl/relay/message-state/index.mdx @@ -0,0 +1,22 @@ +--- +slug: "/reference/perl/relay/message-state" +title: "MessageState" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "relay.MessageState" + parent: "relay" + module: "relay" +--- +# `MessageState` + +## Classes + + + + The RELAY message-delivery states, surfaced as typed, named constants. An outbound SMS moves through `queued` → `initiated` → `sent` and then to a terminal outcome of `delivered`, `undelivered`, or `failed`; `received` is the state of an inbound message. Each constant's value is the exact wire string the server sends in the `messaging.state` event's `message_state` field. + + diff --git a/fern/products/sdk-reference/perl/relay/message-state/message-state/index.mdx b/fern/products/sdk-reference/perl/relay/message-state/message-state/index.mdx new file mode 100644 index 0000000000..2f62de3b2a --- /dev/null +++ b/fern/products/sdk-reference/perl/relay/message-state/message-state/index.mdx @@ -0,0 +1,171 @@ +--- +slug: "/reference/perl/relay/message-state/message-state" +title: "MessageState" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Relay::MessageState" + parent: "relay.MessageState" + module: "relay.MessageState" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/MessageState.pm" +--- +# `MessageState` + +The RELAY message-delivery states, surfaced as typed, named constants. An outbound SMS moves through `queued` → `initiated` → `sent` and then to a terminal outcome of `delivered`, `undelivered`, or `failed`; `received` is the state of an inbound message. Each constant's value is the exact wire string the server sends in the `messaging.state` event's `message_state` field. + +The constants **are** the canonical wire strings, so nothing about `SignalWire::Relay::Message->state` changes: it still reads and writes a plain string. That keeps parity with the Python reference (bare `str`) and leaves forward-compatible server states working. + +Grounded in the Python reference's `relay/constants.py` (`MESSAGE_STATE_*` / `MESSAGE_TERMINAL_STATES`) and the port's SignalWire::Relay::Constants (`MESSAGE_STATES` / `MESSAGE_TERMINAL_STATES`), which are the single source the lists below are derived from. + +**CONSTANTS** + +Exported on request via Exporter; `:all` pulls every state. + +```perl +QUEUED => 'queued' UNDELIVERED => 'undelivered' +INITIATED => 'initiated' FAILED => 'failed' +SENT => 'sent' RECEIVED => 'received' +DELIVERED => 'delivered' +``` + +**IS STATE** + +my $bool = SignalWire::Relay::MessageState->is\_state($value); + +True if `$value` is a known message state. Returns false (never dies) on `undef` or an unknown/forward-compatible value. + +**IS TERMINAL** + +my $bool = SignalWire::Relay::MessageState->is\_terminal($value); + +True if `$value` is a terminal delivery state (`delivered`, `undelivered`, or `failed`). Returns false on `undef`, an in-flight state, `received`, or an unknown value — it never dies, since these mirror server-emitted values that can grow. + +**LICENSE** + +Copyright (c) 2025 SignalWire. Licensed under the MIT License. + +**STATES** + +my $aref = SignalWire::Relay::MessageState->states; + +Arrayref of the message-delivery states, in order. + +**THREE DISTINCT STATE VOCABULARIES** + +CallState, DialState, and `MessageState` are **distinct** sets and must never be conflated. `failed` is terminal in both `DialState` and `MessageState`, but the sets are otherwise disjoint (`MessageState` has no `dialing`/`answered`; `DialState` has no `delivered`). + +**Synopsis** + +```perl +use SignalWire::Relay::MessageState qw(QUEUED SENT DELIVERED FAILED); +``` + +```perl +# Named constants and bare wire strings are interchangeable: +$msg->state eq DELIVERED; # constant +$msg->state eq 'delivered'; # string (Python parity) +``` + +```perl +# Membership / terminality (false on unknown — never dies): +SignalWire::Relay::MessageState->is_state('sent'); # 1 +SignalWire::Relay::MessageState->is_terminal('delivered'); # 1 +SignalWire::Relay::MessageState->is_terminal('failed'); # 1 +SignalWire::Relay::MessageState->is_terminal('sent'); # 0 +@{ SignalWire::Relay::MessageState->states }; # queued..received +``` + +## Signature + +```perl +package SignalWire::Relay::MessageState +``` + +## See Also + +- SignalWire::Relay::Message, SignalWire::Relay::Constants, SignalWire::Relay::CallState, SignalWire::Relay::DialState. + +## Constants + + + + + + + + + + + + + + + +## Methods + +### is\_state + +#### Signature + +```perl +sub is_state($class, $value) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Relay/MessageState.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/MessageState.pm) + +Line 88. + +*** + +### is\_terminal + +#### Signature + +```perl +sub is_terminal($class, $value) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Relay/MessageState.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/MessageState.pm) + +Line 98. + +*** + +### states + +#### Signature + +```perl +sub states() +``` + +#### Source + +[`lib/SignalWire/Relay/MessageState.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/MessageState.pm) + +Line 82. + +## Source + +[`lib/SignalWire/Relay/MessageState.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/MessageState.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/relay/message/index.mdx b/fern/products/sdk-reference/perl/relay/message/index.mdx new file mode 100644 index 0000000000..a4562da41e --- /dev/null +++ b/fern/products/sdk-reference/perl/relay/message/index.mdx @@ -0,0 +1,22 @@ +--- +slug: "/reference/perl/relay/message" +title: "Message" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "relay.Message" + parent: "relay" + module: "relay" +--- +# `Message` + +## Classes + + + + SignalWire::Relay::Message tracks the lifecycle of a single RELAY message. It mirrors the Python reference's message handle: a message is created with a `message_id`, accumulates state from `messaging.state` events via "dispatch\_event", and resolves when it reaches a terminal state (see "MESSAGE\_TERMINAL\_STATES" in SignalWire::Relay::Constants). + + diff --git a/fern/products/sdk-reference/perl/relay/message/message/index.mdx b/fern/products/sdk-reference/perl/relay/message/message/index.mdx new file mode 100644 index 0000000000..6a1c97e63c --- /dev/null +++ b/fern/products/sdk-reference/perl/relay/message/message/index.mdx @@ -0,0 +1,213 @@ +--- +slug: "/reference/perl/relay/message/message" +title: "Message" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::Relay::Message" + parent: "relay.Message" + module: "relay.Message" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Message.pm" +--- +# `Message` + +SignalWire::Relay::Message tracks the lifecycle of a single RELAY message. It mirrors the Python reference's message handle: a message is created with a `message_id`, accumulates state from `messaging.state` events via "dispatch\_event", and resolves when it reaches a terminal state (see "MESSAGE\_TERMINAL\_STATES" in SignalWire::Relay::Constants). + +Construction fails fast on bad input: `message_id` must be a non-empty string, `media` / `tags` must be arrayrefs, and `segments` must be a number (Moo `isa` constraints). + +**CURRENT STATE** + +my $state = $msg->current\_state; + +The message's delivery state as the SignalWire::Relay::MessageState-typed view. Returns the same wire string as `state` (the MessageState constants **are** the wire strings); pair it with `SignalWire::Relay::MessageState->is_state` / `->is_terminal`. + +**DISPATCH EVENT** + +$msg->dispatch\_event($event); + +Apply a `messaging.state` event: update `state`/`reason`, fire event listeners, and resolve the message if the new state is terminal. Normally called by SignalWire::Relay::Client, not user code. + +**IS DONE** + +my $bool = $msg->is\_done; + +True once the message has reached a terminal state (the resolved `completed` flag set by "dispatch\_event"). + +**IS TERMINAL** + +my $bool = $msg->is\_terminal; + +True when the message's current `state` string is a terminal delivery state (`delivered`, `undelivered`, or `failed`). Delegates to SignalWire::Relay::MessageState; returns false (never dies) on an unknown/forward-compatible state. Distinct from "is\_done", which reports the resolved `completed` flag rather than classifying the `state` string. + +**LICENSE** + +Copyright (c) 2025 SignalWire. Licensed under the MIT License. + +**ON** + +$msg->on($cb); # returns $self + +Register a per-event listener invoked as `$cb->($msg, $event)` for every dispatched event. The callback must be a coderef. + +**ON COMPLETED** + +$msg->on\_completed($cb); # register; returns $self +my $cb = $msg->on\_completed; # no-arg: get the registered callback + +Register a callback invoked once with `$msg` when the message completes. If the message is already complete, the callback fires immediately. The callback must be a coderef. + +**WAIT** + +my $result = $msg->wait( timeout => 30 ); + +Block (polling) until the message completes or `timeout` seconds elapse (default 30), then return the terminal event. + +**Synopsis** + +```perl +use SignalWire::Relay::Message; +``` + +```perl +my $msg = SignalWire::Relay::Message->new( message_id => $id ); +``` + +```perl +$msg->on_completed(sub ($m) { print "final state: ", $m->state, "\n"; }); +$msg->on(sub ($m, $event) { ... }); # per-event listener +``` + +```perl +my $final = $msg->wait( timeout => 30 ); # blocks until terminal +``` + +## Signature + +```perl +package SignalWire::Relay::Message +``` + +## See Also + +- SignalWire::Relay::Client, SignalWire::Relay::Event, SignalWire::Relay::Constants, SignalWire::Relay::MessageState. + +## Methods + +### current\_state + +#### Signature + +```perl +sub current_state() +``` + +#### Source + +[`lib/SignalWire/Relay/Message.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Message.pm) + +Line 67. + +*** + +### dispatch\_event + +#### Signature + +```perl +sub dispatch_event() +``` + +#### Source + +[`lib/SignalWire/Relay/Message.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Message.pm) + +Line 115. + +*** + +### is\_done + +#### Signature + +```perl +sub is_done() +``` + +#### Source + +[`lib/SignalWire/Relay/Message.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Message.pm) + +Line 53. + +*** + +### is\_terminal + +#### Signature + +```perl +sub is_terminal() +``` + +#### Source + +[`lib/SignalWire/Relay/Message.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Message.pm) + +Line 79. + +*** + +### on + +#### Signature + +```perl +sub on() +``` + +#### Source + +[`lib/SignalWire/Relay/Message.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Message.pm) + +Line 98. + +*** + +### on\_completed + +#### Signature + +```perl +sub on_completed() +``` + +#### Source + +[`lib/SignalWire/Relay/Message.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Message.pm) + +Line 84. + +*** + +### wait + +#### Signature + +```perl +sub wait() +``` + +#### Source + +[`lib/SignalWire/Relay/Message.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Message.pm) + +Line 105. + +## Source + +[`lib/SignalWire/Relay/Message.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Message.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/rest/http-client/http-client/index.mdx b/fern/products/sdk-reference/perl/rest/http-client/http-client/index.mdx new file mode 100644 index 0000000000..8419b76bb0 --- /dev/null +++ b/fern/products/sdk-reference/perl/rest/http-client/http-client/index.mdx @@ -0,0 +1,135 @@ +--- +slug: "/reference/perl/rest/http-client/http-client" +title: "HttpClient" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::REST::HttpClient" + parent: "rest.HttpClient" + module: "rest.HttpClient" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/HttpClient.pm" +--- +# `HttpClient` + +## Signature + +```perl +package SignalWire::REST::HttpClient +``` + +## Methods + +### delete\_request + +#### Signature + +```perl +sub delete_request($path) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/HttpClient.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/HttpClient.pm) + +Line 127. + +*** + +### get + +#### Signature + +```perl +sub get($path, %opts) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/HttpClient.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/HttpClient.pm) + +Line 107. + +*** + +### patch + +#### Signature + +```perl +sub patch($path, %opts) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/HttpClient.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/HttpClient.pm) + +Line 122. + +*** + +### post + +#### Signature + +```perl +sub post($path, %opts) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/HttpClient.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/HttpClient.pm) + +Line 112. + +*** + +### put + +#### Signature + +```perl +sub put($path, %opts) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/HttpClient.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/HttpClient.pm) + +Line 117. + +## Source + +[`lib/SignalWire/REST/HttpClient.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/HttpClient.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/rest/http-client/index.mdx b/fern/products/sdk-reference/perl/rest/http-client/index.mdx new file mode 100644 index 0000000000..af4769bc97 --- /dev/null +++ b/fern/products/sdk-reference/perl/rest/http-client/index.mdx @@ -0,0 +1,20 @@ +--- +slug: "/reference/perl/rest/http-client" +title: "HttpClient" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "rest.HttpClient" + parent: "rest" + module: "rest" +--- +# `HttpClient` + +## Classes + + + + diff --git a/fern/products/sdk-reference/perl/rest/index.mdx b/fern/products/sdk-reference/perl/rest/index.mdx new file mode 100644 index 0000000000..d9e8a4ec65 --- /dev/null +++ b/fern/products/sdk-reference/perl/rest/index.mdx @@ -0,0 +1,26 @@ +--- +slug: "/reference/perl/rest" +title: "rest" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "rest" +--- +# `rest` + +## Modules + + + + + + + + + + + + diff --git a/fern/products/sdk-reference/perl/rest/namespaces/base/base/index.mdx b/fern/products/sdk-reference/perl/rest/namespaces/base/base/index.mdx new file mode 100644 index 0000000000..30fcbeda89 --- /dev/null +++ b/fern/products/sdk-reference/perl/rest/namespaces/base/base/index.mdx @@ -0,0 +1,133 @@ +--- +slug: "/reference/perl/rest/namespaces/base/base" +title: "Base" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::REST::Namespaces::Base" + parent: "rest.Namespaces.Base" + module: "rest.Namespaces.Base" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Base.pm" +--- +# `Base` + +## Signature + +```perl +package SignalWire::REST::Namespaces::Base +``` + +## Inheritance + +**Extends:** [SignalWire::REST::Namespaces::Base](/docs/sdk-reference/reference/perl/rest/namespaces/base/base) + +## Methods + +### create + +#### Signature + +```perl +sub create(%kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Base.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Base.pm) + +Line 29. + +*** + +### delete\_resource + +#### Signature + +```perl +sub delete_resource($resource_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Base.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Base.pm) + +Line 45. + +*** + +### get + +#### Signature + +```perl +sub get($resource_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Base.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Base.pm) + +Line 34. + +*** + +### list + +#### Signature + +```perl +sub list(@params) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Base.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Base.pm) + +Line 23. + +*** + +### update + +#### Signature + +```perl +sub update($resource_id, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Base.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Base.pm) + +Line 39. + +## Source + +[`lib/SignalWire/REST/Namespaces/Base.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Base.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/rest/namespaces/base/index.mdx b/fern/products/sdk-reference/perl/rest/namespaces/base/index.mdx new file mode 100644 index 0000000000..66015692d1 --- /dev/null +++ b/fern/products/sdk-reference/perl/rest/namespaces/base/index.mdx @@ -0,0 +1,20 @@ +--- +slug: "/reference/perl/rest/namespaces/base" +title: "Base" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "rest.Namespaces.Base" + parent: "rest.Namespaces" + module: "rest.Namespaces" +--- +# `Base` + +## Classes + + + + diff --git a/fern/products/sdk-reference/perl/rest/namespaces/calling/calling/index.mdx b/fern/products/sdk-reference/perl/rest/namespaces/calling/calling/index.mdx new file mode 100644 index 0000000000..4fdfb9c86b --- /dev/null +++ b/fern/products/sdk-reference/perl/rest/namespaces/calling/calling/index.mdx @@ -0,0 +1,953 @@ +--- +slug: "/reference/perl/rest/namespaces/calling/calling" +title: "Calling" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::REST::Namespaces::Calling" + parent: "rest.Namespaces.Calling" + module: "rest.Namespaces.Calling" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm" +--- +# `Calling` + +## Signature + +```perl +package SignalWire::REST::Namespaces::Calling +``` + +## Inheritance + +**Extends:** [SignalWire::REST::Namespaces::Base](/docs/sdk-reference/reference/perl/rest/namespaces/base/base) + +## Methods + +### ai\_hold + +#### Signature + +```perl +sub ai_hold($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 71. + +*** + +### ai\_message + +#### Signature + +```perl +sub ai_message($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 70. + +*** + +### ai\_stop + +#### Signature + +```perl +sub ai_stop($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 73. + +*** + +### ai\_unhold + +#### Signature + +```perl +sub ai_unhold($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 72. + +*** + +### BUILD + +#### Signature + +```perl +sub BUILD() +``` + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 9. + +*** + +### collect + +#### Signature + +```perl +sub collect($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 45. + +*** + +### collect\_start\_input\_timers + +#### Signature + +```perl +sub collect_start_input_timers($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 47. + +*** + +### collect\_stop + +#### Signature + +```perl +sub collect_stop($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 46. + +*** + +### denoise + +#### Signature + +```perl +sub denoise($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 62. + +*** + +### denoise\_stop + +#### Signature + +```perl +sub denoise_stop($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 63. + +*** + +### detect + +#### Signature + +```perl +sub detect($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 50. + +*** + +### detect\_stop + +#### Signature + +```perl +sub detect_stop($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 51. + +*** + +### dial + +#### Signature + +```perl +sub dial($s, @p) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 22. + +*** + +### disconnect + +#### Signature + +```perl +sub disconnect($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 29. + +*** + +### end + +#### Signature + +```perl +sub end($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 27. + +*** + +### live\_transcribe + +#### Signature + +```perl +sub live_transcribe($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 76. + +*** + +### live\_translate + +#### Signature + +```perl +sub live_translate($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 77. + +*** + +### play + +#### Signature + +```perl +sub play($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 32. + +*** + +### play\_pause + +#### Signature + +```perl +sub play_pause($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 33. + +*** + +### play\_resume + +#### Signature + +```perl +sub play_resume($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 34. + +*** + +### play\_stop + +#### Signature + +```perl +sub play_stop($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 35. + +*** + +### play\_volume + +#### Signature + +```perl +sub play_volume($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 36. + +*** + +### receive\_fax\_stop + +#### Signature + +```perl +sub receive_fax_stop($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 81. + +*** + +### record + +#### Signature + +```perl +sub record($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 39. + +*** + +### record\_pause + +#### Signature + +```perl +sub record_pause($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 40. + +*** + +### record\_resume + +#### Signature + +```perl +sub record_resume($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 41. + +*** + +### record\_stop + +#### Signature + +```perl +sub record_stop($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 42. + +*** + +### refer + +#### Signature + +```perl +sub refer($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 84. + +*** + +### send\_fax\_stop + +#### Signature + +```perl +sub send_fax_stop($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 80. + +*** + +### stream + +#### Signature + +```perl +sub stream($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 58. + +*** + +### stream\_stop + +#### Signature + +```perl +sub stream_stop($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 59. + +*** + +### tap + +#### Signature + +```perl +sub tap($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 54. + +*** + +### tap\_stop + +#### Signature + +```perl +sub tap_stop($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 55. + +*** + +### transcribe + +#### Signature + +```perl +sub transcribe($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 66. + +*** + +### transcribe\_stop + +#### Signature + +```perl +sub transcribe_stop($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 67. + +*** + +### transfer + +#### Signature + +```perl +sub transfer($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 28. + +*** + +### update + +#### Signature + +```perl +sub update($s, @p) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 25. + +*** + +### update\_call + +#### Signature + +```perl +sub update_call($s, @p) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 26. + +*** + +### user\_event + +#### Signature + +```perl +sub user_event($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 87. + +## Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/rest/namespaces/calling/index.mdx b/fern/products/sdk-reference/perl/rest/namespaces/calling/index.mdx new file mode 100644 index 0000000000..4b8db1b175 --- /dev/null +++ b/fern/products/sdk-reference/perl/rest/namespaces/calling/index.mdx @@ -0,0 +1,20 @@ +--- +slug: "/reference/perl/rest/namespaces/calling" +title: "Calling" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "rest.Namespaces.Calling" + parent: "rest.Namespaces" + module: "rest.Namespaces" +--- +# `Calling` + +## Classes + + + + diff --git a/fern/products/sdk-reference/perl/rest/namespaces/chat/chat/index.mdx b/fern/products/sdk-reference/perl/rest/namespaces/chat/chat/index.mdx new file mode 100644 index 0000000000..167d0a4093 --- /dev/null +++ b/fern/products/sdk-reference/perl/rest/namespaces/chat/chat/index.mdx @@ -0,0 +1,51 @@ +--- +slug: "/reference/perl/rest/namespaces/chat/chat" +title: "Chat" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::REST::Namespaces::Chat" + parent: "rest.Namespaces.Chat" + module: "rest.Namespaces.Chat" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Chat.pm" +--- +# `Chat` + +## Signature + +```perl +package SignalWire::REST::Namespaces::Chat +``` + +## Inheritance + +**Extends:** [SignalWire::REST::Namespaces::Base](/docs/sdk-reference/reference/perl/rest/namespaces/base/base) + +## Methods + +### create\_token + +#### Signature + +```perl +sub create_token(%kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Chat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Chat.pm) + +Line 7. + +## Source + +[`lib/SignalWire/REST/Namespaces/Chat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Chat.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/rest/namespaces/chat/index.mdx b/fern/products/sdk-reference/perl/rest/namespaces/chat/index.mdx new file mode 100644 index 0000000000..7dcf3a0500 --- /dev/null +++ b/fern/products/sdk-reference/perl/rest/namespaces/chat/index.mdx @@ -0,0 +1,20 @@ +--- +slug: "/reference/perl/rest/namespaces/chat" +title: "Chat" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "rest.Namespaces.Chat" + parent: "rest.Namespaces" + module: "rest.Namespaces" +--- +# `Chat` + +## Classes + + + + diff --git a/fern/products/sdk-reference/perl/rest/namespaces/compat/compat/index.mdx b/fern/products/sdk-reference/perl/rest/namespaces/compat/compat/index.mdx new file mode 100644 index 0000000000..0ead95753c --- /dev/null +++ b/fern/products/sdk-reference/perl/rest/namespaces/compat/compat/index.mdx @@ -0,0 +1,1273 @@ +--- +slug: "/reference/perl/rest/namespaces/compat/compat" +title: "Compat" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::REST::Namespaces::Compat" + parent: "rest.Namespaces.Compat" + module: "rest.Namespaces.Compat" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm" +--- +# `Compat` + +## Signature + +```perl +package SignalWire::REST::Namespaces::Compat +``` + +## Inheritance + +**Extends:** [SignalWire::REST::Namespaces::Base](/docs/sdk-reference/reference/perl/rest/namespaces/base/base), `SignalWire::REST::Namespaces::CrudResource` + +## Methods + +### create + +#### Signature + +```perl +sub create(%kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 17. + +*** + +### create + +#### Signature + +```perl +sub create(%kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 361. + +*** + +### delete + +#### Signature + +```perl +sub delete($sid) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 227. + +*** + +### delete + +#### Signature + +```perl +sub delete($sid) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 324. + +*** + +### delete + +#### Signature + +```perl +sub delete($sid) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 351. + +*** + +### delete + +#### Signature + +```perl +sub delete($token_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 377. + +*** + +### delete\_media + +#### Signature + +```perl +sub delete_media($message_sid, $media_sid) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 83. + +*** + +### delete\_media + +#### Signature + +```perl +sub delete_media($fax_sid, $media_sid) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 109. + +*** + +### delete\_number + +#### Signature + +```perl +sub delete_number($sid) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 221. + +*** + +### delete\_recording + +#### Signature + +```perl +sub delete_recording($conference_sid, $recording_sid) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 172. + +*** + +### delete\_recording + +#### Signature + +```perl +sub delete_recording($sid) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 318. + +*** + +### delete\_token + +#### Signature + +```perl +sub delete_token($token_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 371. + +*** + +### delete\_transcription + +#### Signature + +```perl +sub delete_transcription($sid) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 345. + +*** + +### dequeue\_member + +#### Signature + +```perl +sub dequeue_member($queue_sid, $call_sid, %kwargs) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 297. + +*** + +### get + +#### Signature + +```perl +sub get($sid) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 22. + +*** + +### get + +#### Signature + +```perl +sub get($sid) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 125. + +*** + +### get + +#### Signature + +```perl +sub get($sid) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 211. + +*** + +### get + +#### Signature + +```perl +sub get($sid) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 313. + +*** + +### get + +#### Signature + +```perl +sub get($sid) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 340. + +*** + +### get\_media + +#### Signature + +```perl +sub get_media($message_sid, $media_sid) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 78. + +*** + +### get\_media + +#### Signature + +```perl +sub get_media($fax_sid, $media_sid) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 104. + +*** + +### get\_member + +#### Signature + +```perl +sub get_member($queue_sid, $call_sid) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 292. + +*** + +### get\_participant + +#### Signature + +```perl +sub get_participant($conference_sid, $call_sid) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 141. + +*** + +### get\_recording + +#### Signature + +```perl +sub get_recording($conference_sid, $recording_sid) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 162. + +*** + +### import\_number + +#### Signature + +```perl +sub import_number(%kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 232. + +*** + +### list + +#### Signature + +```perl +sub list(@params) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 11. + +*** + +### list + +#### Signature + +```perl +sub list(@params) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 119. + +*** + +### list + +#### Signature + +```perl +sub list(@params) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 200. + +*** + +### list + +#### Signature + +```perl +sub list(@params) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 307. + +*** + +### list + +#### Signature + +```perl +sub list(@params) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 334. + +*** + +### list\_available\_countries + +#### Signature + +```perl +sub list_available_countries(@params) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 238. + +*** + +### list\_media + +#### Signature + +```perl +sub list_media($message_sid, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 72. + +*** + +### list\_media + +#### Signature + +```perl +sub list_media($fax_sid, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 98. + +*** + +### list\_members + +#### Signature + +```perl +sub list_members($queue_sid, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 286. + +*** + +### list\_participants + +#### Signature + +```perl +sub list_participants($conference_sid, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 135. + +*** + +### list\_recordings + +#### Signature + +```perl +sub list_recordings($conference_sid, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 156. + +*** + +### purchase + +#### Signature + +```perl +sub purchase(%kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 206. + +*** + +### remove\_participant + +#### Signature + +```perl +sub remove_participant($conference_sid, $call_sid) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 151. + +*** + +### search\_local + +#### Signature + +```perl +sub search_local($country, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 244. + +*** + +### search\_toll\_free + +#### Signature + +```perl +sub search_toll_free($country, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 250. + +*** + +### start\_recording + +#### Signature + +```perl +sub start_recording($call_sid, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 42. + +*** + +### start\_stream + +#### Signature + +```perl +sub start_stream($call_sid, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 52. + +*** + +### start\_stream + +#### Signature + +```perl +sub start_stream($conference_sid, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 177. + +*** + +### stop\_stream + +#### Signature + +```perl +sub stop_stream($call_sid, $stream_sid, %kwargs) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 57. + +*** + +### stop\_stream + +#### Signature + +```perl +sub stop_stream($conference_sid, $stream_sid, %kwargs) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 182. + +*** + +### update + +#### Signature + +```perl +sub update($sid, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 27. + +*** + +### update + +#### Signature + +```perl +sub update($sid, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 37. + +*** + +### update + +#### Signature + +```perl +sub update($sid, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 67. + +*** + +### update + +#### Signature + +```perl +sub update($sid, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 93. + +*** + +### update + +#### Signature + +```perl +sub update($sid, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 130. + +*** + +### update + +#### Signature + +```perl +sub update($sid, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 216. + +*** + +### update + +#### Signature + +```perl +sub update($sid, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 261. + +*** + +### update + +#### Signature + +```perl +sub update($sid, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 271. + +*** + +### update + +#### Signature + +```perl +sub update($sid, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 281. + +*** + +### update + +#### Signature + +```perl +sub update($token_id, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 366. + +*** + +### update\_participant + +#### Signature + +```perl +sub update_participant($conference_sid, $call_sid, %kwargs) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 146. + +*** + +### update\_recording + +#### Signature + +```perl +sub update_recording($call_sid, $recording_sid, %kwargs) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 47. + +*** + +### update\_recording + +#### Signature + +```perl +sub update_recording($conference_sid, $recording_sid, %kwargs) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 167. + +## Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/rest/namespaces/compat/index.mdx b/fern/products/sdk-reference/perl/rest/namespaces/compat/index.mdx new file mode 100644 index 0000000000..bbd0528c4f --- /dev/null +++ b/fern/products/sdk-reference/perl/rest/namespaces/compat/index.mdx @@ -0,0 +1,20 @@ +--- +slug: "/reference/perl/rest/namespaces/compat" +title: "Compat" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "rest.Namespaces.Compat" + parent: "rest.Namespaces" + module: "rest.Namespaces" +--- +# `Compat` + +## Classes + + + + diff --git a/fern/products/sdk-reference/perl/rest/namespaces/datasphere/datasphere/index.mdx b/fern/products/sdk-reference/perl/rest/namespaces/datasphere/datasphere/index.mdx new file mode 100644 index 0000000000..250a06c61b --- /dev/null +++ b/fern/products/sdk-reference/perl/rest/namespaces/datasphere/datasphere/index.mdx @@ -0,0 +1,117 @@ +--- +slug: "/reference/perl/rest/namespaces/datasphere/datasphere" +title: "Datasphere" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::REST::Namespaces::Datasphere" + parent: "rest.Namespaces.Datasphere" + module: "rest.Namespaces.Datasphere" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Datasphere.pm" +--- +# `Datasphere` + +## Signature + +```perl +package SignalWire::REST::Namespaces::Datasphere +``` + +## Inheritance + +**Extends:** `SignalWire::REST::Namespaces::CrudResource` + +## Methods + +### delete\_chunk + +#### Signature + +```perl +sub delete_chunk($document_id, $chunk_id) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Datasphere.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Datasphere.pm) + +Line 27. + +*** + +### get\_chunk + +#### Signature + +```perl +sub get_chunk($document_id, $chunk_id) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Datasphere.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Datasphere.pm) + +Line 22. + +*** + +### list\_chunks + +#### Signature + +```perl +sub list_chunks($document_id, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Datasphere.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Datasphere.pm) + +Line 16. + +*** + +### search + +#### Signature + +```perl +sub search(%kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Datasphere.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Datasphere.pm) + +Line 11. + +## Source + +[`lib/SignalWire/REST/Namespaces/Datasphere.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Datasphere.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/rest/namespaces/datasphere/index.mdx b/fern/products/sdk-reference/perl/rest/namespaces/datasphere/index.mdx new file mode 100644 index 0000000000..d061d734aa --- /dev/null +++ b/fern/products/sdk-reference/perl/rest/namespaces/datasphere/index.mdx @@ -0,0 +1,20 @@ +--- +slug: "/reference/perl/rest/namespaces/datasphere" +title: "Datasphere" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "rest.Namespaces.Datasphere" + parent: "rest.Namespaces" + module: "rest.Namespaces" +--- +# `Datasphere` + +## Classes + + + + diff --git a/fern/products/sdk-reference/perl/rest/namespaces/fabric/fabric/index.mdx b/fern/products/sdk-reference/perl/rest/namespaces/fabric/fabric/index.mdx new file mode 100644 index 0000000000..2cf3721a0d --- /dev/null +++ b/fern/products/sdk-reference/perl/rest/namespaces/fabric/fabric/index.mdx @@ -0,0 +1,579 @@ +--- +slug: "/reference/perl/rest/namespaces/fabric/fabric" +title: "Fabric" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::REST::Namespaces::Fabric" + parent: "rest.Namespaces.Fabric" + module: "rest.Namespaces.Fabric" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm" +--- +# `Fabric` + +## Signature + +```perl +package SignalWire::REST::Namespaces::Fabric +``` + +## Inheritance + +**Extends:** `SignalWire::REST::Namespaces::CrudResource`, `SignalWire::REST::Namespaces::Fabric::Resource`, `SignalWire::REST::Namespaces::Fabric::AutoMaterializedWebhook`, `SignalWire::REST::Namespaces::Fabric::ResourcePUT`, [SignalWire::REST::Namespaces::Base](/docs/sdk-reference/reference/perl/rest/namespaces/base/base) + +## Methods + +### assign\_domain\_application + +#### Signature + +```perl +sub assign_domain_application($resource_id, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 189. + +*** + +### assign\_phone\_route + +#### Signature + +```perl +sub assign_phone_route($resource_id, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 177. + +*** + +### create + +#### Signature + +```perl +sub create(%kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 32. + +*** + +### create + +#### Signature + +```perl +sub create(%kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 139. + +*** + +### create\_embed\_token + +#### Signature + +```perl +sub create_embed_token(%kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 235. + +*** + +### create\_guest\_token + +#### Signature + +```perl +sub create_guest_token(%kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 230. + +*** + +### create\_invite\_token + +#### Signature + +```perl +sub create_invite_token(%kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 225. + +*** + +### create\_sip\_endpoint + +#### Signature + +```perl +sub create_sip_endpoint($subscriber_id, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 114. + +*** + +### create\_subscriber\_token + +#### Signature + +```perl +sub create_subscriber_token(%kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 215. + +*** + +### delete + +#### Signature + +```perl +sub delete($resource_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 166. + +*** + +### delete\_resource + +#### Signature + +```perl +sub delete_resource($resource_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 160. + +*** + +### delete\_sip\_endpoint + +#### Signature + +```perl +sub delete_sip_endpoint($subscriber_id, $endpoint_id) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 129. + +*** + +### deploy\_version + +#### Signature + +```perl +sub deploy_version($resource_id, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 85. + +*** + +### get + +#### Signature + +```perl +sub get($resource_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 155. + +*** + +### get + +#### Signature + +```perl +sub get($address_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 205. + +*** + +### get\_sip\_endpoint + +#### Signature + +```perl +sub get_sip_endpoint($subscriber_id, $endpoint_id) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 119. + +*** + +### list + +#### Signature + +```perl +sub list(@params) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 149. + +*** + +### list + +#### Signature + +```perl +sub list(@params) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 199. + +*** + +### list\_addresses + +#### Signature + +```perl +sub list_addresses($resource_id, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 12. + +*** + +### list\_addresses + +#### Signature + +```perl +sub list_addresses($resource_id, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 71. + +*** + +### list\_addresses + +#### Signature + +```perl +sub list_addresses($resource_id, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 96. + +*** + +### list\_addresses + +#### Signature + +```perl +sub list_addresses($resource_id, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 171. + +*** + +### list\_sip\_endpoints + +#### Signature + +```perl +sub list_sip_endpoints($subscriber_id, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 108. + +*** + +### list\_versions + +#### Signature + +```perl +sub list_versions($resource_id, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 78. + +*** + +### refresh\_subscriber\_token + +#### Signature + +```perl +sub refresh_subscriber_token(%kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 220. + +*** + +### update\_sip\_endpoint + +#### Signature + +```perl +sub update_sip_endpoint($subscriber_id, $endpoint_id, %kwargs) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 124. + +## Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/rest/namespaces/fabric/index.mdx b/fern/products/sdk-reference/perl/rest/namespaces/fabric/index.mdx new file mode 100644 index 0000000000..e1b001a03a --- /dev/null +++ b/fern/products/sdk-reference/perl/rest/namespaces/fabric/index.mdx @@ -0,0 +1,20 @@ +--- +slug: "/reference/perl/rest/namespaces/fabric" +title: "Fabric" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "rest.Namespaces.Fabric" + parent: "rest.Namespaces" + module: "rest.Namespaces" +--- +# `Fabric` + +## Classes + + + + diff --git a/fern/products/sdk-reference/perl/rest/namespaces/index.mdx b/fern/products/sdk-reference/perl/rest/namespaces/index.mdx new file mode 100644 index 0000000000..85e03d24c4 --- /dev/null +++ b/fern/products/sdk-reference/perl/rest/namespaces/index.mdx @@ -0,0 +1,44 @@ +--- +slug: "/reference/perl/rest/namespaces" +title: "Namespaces" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "rest.Namespaces" + parent: "rest" + module: "rest" +--- +# `Namespaces` + +## Modules + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/fern/products/sdk-reference/perl/rest/namespaces/logs/index.mdx b/fern/products/sdk-reference/perl/rest/namespaces/logs/index.mdx new file mode 100644 index 0000000000..f7795340b2 --- /dev/null +++ b/fern/products/sdk-reference/perl/rest/namespaces/logs/index.mdx @@ -0,0 +1,20 @@ +--- +slug: "/reference/perl/rest/namespaces/logs" +title: "Logs" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "rest.Namespaces.Logs" + parent: "rest.Namespaces" + module: "rest.Namespaces" +--- +# `Logs` + +## Classes + + + + diff --git a/fern/products/sdk-reference/perl/rest/namespaces/logs/logs/index.mdx b/fern/products/sdk-reference/perl/rest/namespaces/logs/logs/index.mdx new file mode 100644 index 0000000000..9aed032d41 --- /dev/null +++ b/fern/products/sdk-reference/perl/rest/namespaces/logs/logs/index.mdx @@ -0,0 +1,193 @@ +--- +slug: "/reference/perl/rest/namespaces/logs/logs" +title: "Logs" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::REST::Namespaces::Logs" + parent: "rest.Namespaces.Logs" + module: "rest.Namespaces.Logs" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Logs.pm" +--- +# `Logs` + +## Signature + +```perl +package SignalWire::REST::Namespaces::Logs +``` + +## Inheritance + +**Extends:** [SignalWire::REST::Namespaces::Base](/docs/sdk-reference/reference/perl/rest/namespaces/base/base) + +## Methods + +### get + +#### Signature + +```perl +sub get($log_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Logs.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Logs.pm) + +Line 17. + +*** + +### get + +#### Signature + +```perl +sub get($log_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Logs.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Logs.pm) + +Line 33. + +*** + +### get + +#### Signature + +```perl +sub get($log_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Logs.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Logs.pm) + +Line 55. + +*** + +### list + +#### Signature + +```perl +sub list(@params) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Logs.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Logs.pm) + +Line 11. + +*** + +### list + +#### Signature + +```perl +sub list(@params) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Logs.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Logs.pm) + +Line 27. + +*** + +### list + +#### Signature + +```perl +sub list(@params) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Logs.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Logs.pm) + +Line 49. + +*** + +### list + +#### Signature + +```perl +sub list(@params) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Logs.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Logs.pm) + +Line 65. + +*** + +### list\_events + +#### Signature + +```perl +sub list_events($log_id, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Logs.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Logs.pm) + +Line 38. + +## Source + +[`lib/SignalWire/REST/Namespaces/Logs.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Logs.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/rest/namespaces/phone-numbers/index.mdx b/fern/products/sdk-reference/perl/rest/namespaces/phone-numbers/index.mdx new file mode 100644 index 0000000000..8e462658d4 --- /dev/null +++ b/fern/products/sdk-reference/perl/rest/namespaces/phone-numbers/index.mdx @@ -0,0 +1,22 @@ +--- +slug: "/reference/perl/rest/namespaces/phone-numbers" +title: "PhoneNumbers" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "rest.Namespaces.PhoneNumbers" + parent: "rest.Namespaces" + module: "rest.Namespaces" +--- +# `PhoneNumbers` + +## Classes + + + + Supports the standard CRUD surface plus typed helpers for binding an inbound call to a handler (SWML webhook, cXML webhook, AI agent, call flow, RELAY application/topic). The binding model is: set `call_handler` plus the handler-specific companion field on the phone number; the server auto-materializes the matching Fabric resource. See SignalWire::REST::PhoneCallHandler for the enum. + + diff --git a/fern/products/sdk-reference/perl/rest/namespaces/phone-numbers/phone-numbers/index.mdx b/fern/products/sdk-reference/perl/rest/namespaces/phone-numbers/phone-numbers/index.mdx new file mode 100644 index 0000000000..65c5d1144b --- /dev/null +++ b/fern/products/sdk-reference/perl/rest/namespaces/phone-numbers/phone-numbers/index.mdx @@ -0,0 +1,237 @@ +--- +slug: "/reference/perl/rest/namespaces/phone-numbers/phone-numbers" +title: "PhoneNumbers" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::REST::Namespaces::PhoneNumbers" + parent: "rest.Namespaces.PhoneNumbers" + module: "rest.Namespaces.PhoneNumbers" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/PhoneNumbers.pm" +--- +# `PhoneNumbers` + +Supports the standard CRUD surface plus typed helpers for binding an inbound call to a handler (SWML webhook, cXML webhook, AI agent, call flow, RELAY application/topic). The binding model is: set `call_handler` plus the handler-specific companion field on the phone number; the server auto-materializes the matching Fabric resource. See SignalWire::REST::PhoneCallHandler for the enum. + +**HELPERS** + +- set\_swml\_webhook($sid, url => $url) + + Route inbound calls to an SWML webhook URL. Your backend returns an SWML document per call. The server auto-creates a `swml_webhook` Fabric resource keyed off this URL. + +- set\_cxml\_webhook($sid, url => $url, fallback\_url => $f?, status\_callback\_url => $s?) + + Route inbound calls to a cXML (Twilio-compat / LAML) webhook. Despite the wire value `laml_webhooks` being plural, this creates a single `cxml_webhook` Fabric resource. + +- set\_cxml\_application($sid, application\_id => $id) + + Route inbound calls to an existing cXML application by ID. + +- set\_ai\_agent($sid, agent\_id => $id) + + Route inbound calls to an AI Agent Fabric resource by ID. + +- set\_call\_flow($sid, flow\_id => $id, version => $v?) + + Route inbound calls to a Call Flow by ID. `version` accepts `working_copy` or `current_deployed` (server default when omitted). + +- set\_relay\_application($sid, name => $name) + + Route inbound calls to a named RELAY application. + +- set\_relay\_topic($sid, topic => $topic, status\_callback\_url => $s?) + + Route inbound calls to a RELAY topic (client subscription). + +## Signature + +```perl +package SignalWire::REST::Namespaces::PhoneNumbers +``` + +## Inheritance + +**Extends:** `SignalWire::REST::Namespaces::CrudResource` + +## Methods + +### search + +#### Signature + +```perl +sub search(@params) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/PhoneNumbers.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/PhoneNumbers.pm) + +Line 11. + +*** + +### set\_ai\_agent + +#### Signature + +```perl +sub set_ai_agent($resource_id, @args) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/PhoneNumbers.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/PhoneNumbers.pm) + +Line 65. + +*** + +### set\_call\_flow + +#### Signature + +```perl +sub set_call_flow($resource_id, @args) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/PhoneNumbers.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/PhoneNumbers.pm) + +Line 77. + +*** + +### set\_cxml\_application + +#### Signature + +```perl +sub set_cxml_application($resource_id, @args) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/PhoneNumbers.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/PhoneNumbers.pm) + +Line 53. + +*** + +### set\_cxml\_webhook + +#### Signature + +```perl +sub set_cxml_webhook($resource_id, @args) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/PhoneNumbers.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/PhoneNumbers.pm) + +Line 36. + +*** + +### set\_relay\_application + +#### Signature + +```perl +sub set_relay_application($resource_id, @args) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/PhoneNumbers.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/PhoneNumbers.pm) + +Line 92. + +*** + +### set\_relay\_topic + +#### Signature + +```perl +sub set_relay_topic($resource_id, @args) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/PhoneNumbers.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/PhoneNumbers.pm) + +Line 104. + +*** + +### set\_swml\_webhook + +#### Signature + +```perl +sub set_swml_webhook($resource_id, @args) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/PhoneNumbers.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/PhoneNumbers.pm) + +Line 24. + +## Source + +[`lib/SignalWire/REST/Namespaces/PhoneNumbers.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/PhoneNumbers.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/rest/namespaces/project/index.mdx b/fern/products/sdk-reference/perl/rest/namespaces/project/index.mdx new file mode 100644 index 0000000000..305983a84e --- /dev/null +++ b/fern/products/sdk-reference/perl/rest/namespaces/project/index.mdx @@ -0,0 +1,20 @@ +--- +slug: "/reference/perl/rest/namespaces/project" +title: "Project" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "rest.Namespaces.Project" + parent: "rest.Namespaces" + module: "rest.Namespaces" +--- +# `Project` + +## Classes + + + + diff --git a/fern/products/sdk-reference/perl/rest/namespaces/project/project/index.mdx b/fern/products/sdk-reference/perl/rest/namespaces/project/project/index.mdx new file mode 100644 index 0000000000..ef293d0ccd --- /dev/null +++ b/fern/products/sdk-reference/perl/rest/namespaces/project/project/index.mdx @@ -0,0 +1,113 @@ +--- +slug: "/reference/perl/rest/namespaces/project/project" +title: "Project" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::REST::Namespaces::Project" + parent: "rest.Namespaces.Project" + module: "rest.Namespaces.Project" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Project.pm" +--- +# `Project` + +## Signature + +```perl +package SignalWire::REST::Namespaces::Project +``` + +## Inheritance + +**Extends:** [SignalWire::REST::Namespaces::Base](/docs/sdk-reference/reference/perl/rest/namespaces/base/base) + +## Methods + +### create + +#### Signature + +```perl +sub create(%kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Project.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Project.pm) + +Line 11. + +*** + +### delete + +#### Signature + +```perl +sub delete($token_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Project.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Project.pm) + +Line 27. + +*** + +### delete\_token + +#### Signature + +```perl +sub delete_token($token_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Project.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Project.pm) + +Line 21. + +*** + +### update + +#### Signature + +```perl +sub update($token_id, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Project.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Project.pm) + +Line 16. + +## Source + +[`lib/SignalWire/REST/Namespaces/Project.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Project.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/rest/namespaces/pub-sub/index.mdx b/fern/products/sdk-reference/perl/rest/namespaces/pub-sub/index.mdx new file mode 100644 index 0000000000..3677a38233 --- /dev/null +++ b/fern/products/sdk-reference/perl/rest/namespaces/pub-sub/index.mdx @@ -0,0 +1,20 @@ +--- +slug: "/reference/perl/rest/namespaces/pub-sub" +title: "PubSub" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "rest.Namespaces.PubSub" + parent: "rest.Namespaces" + module: "rest.Namespaces" +--- +# `PubSub` + +## Classes + + + + diff --git a/fern/products/sdk-reference/perl/rest/namespaces/pub-sub/pub-sub/index.mdx b/fern/products/sdk-reference/perl/rest/namespaces/pub-sub/pub-sub/index.mdx new file mode 100644 index 0000000000..407c71f5f4 --- /dev/null +++ b/fern/products/sdk-reference/perl/rest/namespaces/pub-sub/pub-sub/index.mdx @@ -0,0 +1,51 @@ +--- +slug: "/reference/perl/rest/namespaces/pub-sub/pub-sub" +title: "PubSub" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::REST::Namespaces::PubSub" + parent: "rest.Namespaces.PubSub" + module: "rest.Namespaces.PubSub" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/PubSub.pm" +--- +# `PubSub` + +## Signature + +```perl +package SignalWire::REST::Namespaces::PubSub +``` + +## Inheritance + +**Extends:** [SignalWire::REST::Namespaces::Base](/docs/sdk-reference/reference/perl/rest/namespaces/base/base) + +## Methods + +### create\_token + +#### Signature + +```perl +sub create_token(%kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/PubSub.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/PubSub.pm) + +Line 7. + +## Source + +[`lib/SignalWire/REST/Namespaces/PubSub.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/PubSub.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/rest/namespaces/registry/index.mdx b/fern/products/sdk-reference/perl/rest/namespaces/registry/index.mdx new file mode 100644 index 0000000000..44c73fffd1 --- /dev/null +++ b/fern/products/sdk-reference/perl/rest/namespaces/registry/index.mdx @@ -0,0 +1,20 @@ +--- +slug: "/reference/perl/rest/namespaces/registry" +title: "Registry" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "rest.Namespaces.Registry" + parent: "rest.Namespaces" + module: "rest.Namespaces" +--- +# `Registry` + +## Classes + + + + diff --git a/fern/products/sdk-reference/perl/rest/namespaces/registry/registry/index.mdx b/fern/products/sdk-reference/perl/rest/namespaces/registry/registry/index.mdx new file mode 100644 index 0000000000..2d67afa682 --- /dev/null +++ b/fern/products/sdk-reference/perl/rest/namespaces/registry/registry/index.mdx @@ -0,0 +1,303 @@ +--- +slug: "/reference/perl/rest/namespaces/registry/registry" +title: "Registry" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::REST::Namespaces::Registry" + parent: "rest.Namespaces.Registry" + module: "rest.Namespaces.Registry" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm" +--- +# `Registry` + +## Signature + +```perl +package SignalWire::REST::Namespaces::Registry +``` + +## Inheritance + +**Extends:** [SignalWire::REST::Namespaces::Base](/docs/sdk-reference/reference/perl/rest/namespaces/base/base) + +## Methods + +### create + +#### Signature + +```perl +sub create(%kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Registry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm) + +Line 17. + +*** + +### create\_campaign + +#### Signature + +```perl +sub create_campaign($brand_id, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Registry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm) + +Line 33. + +*** + +### create\_order + +#### Signature + +```perl +sub create_order($campaign_id, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Registry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm) + +Line 65. + +*** + +### delete + +#### Signature + +```perl +sub delete($number_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Registry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm) + +Line 91. + +*** + +### delete\_number + +#### Signature + +```perl +sub delete_number($number_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Registry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm) + +Line 85. + +*** + +### get + +#### Signature + +```perl +sub get($brand_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Registry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm) + +Line 22. + +*** + +### get + +#### Signature + +```perl +sub get($campaign_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Registry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm) + +Line 43. + +*** + +### get + +#### Signature + +```perl +sub get($order_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Registry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm) + +Line 75. + +*** + +### list + +#### Signature + +```perl +sub list(@params) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Registry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm) + +Line 11. + +*** + +### list\_campaigns + +#### Signature + +```perl +sub list_campaigns($brand_id, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Registry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm) + +Line 27. + +*** + +### list\_numbers + +#### Signature + +```perl +sub list_numbers($campaign_id, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Registry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm) + +Line 53. + +*** + +### list\_orders + +#### Signature + +```perl +sub list_orders($campaign_id, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Registry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm) + +Line 59. + +*** + +### update + +#### Signature + +```perl +sub update($campaign_id, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Registry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm) + +Line 48. + +## Source + +[`lib/SignalWire/REST/Namespaces/Registry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/rest/namespaces/resources/index.mdx b/fern/products/sdk-reference/perl/rest/namespaces/resources/index.mdx new file mode 100644 index 0000000000..78c5ea682e --- /dev/null +++ b/fern/products/sdk-reference/perl/rest/namespaces/resources/index.mdx @@ -0,0 +1,20 @@ +--- +slug: "/reference/perl/rest/namespaces/resources" +title: "Resources" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "rest.Namespaces.Resources" + parent: "rest.Namespaces" + module: "rest.Namespaces" +--- +# `Resources` + +## Classes + + + + diff --git a/fern/products/sdk-reference/perl/rest/namespaces/resources/resources/index.mdx b/fern/products/sdk-reference/perl/rest/namespaces/resources/resources/index.mdx new file mode 100644 index 0000000000..42efd4ad2d --- /dev/null +++ b/fern/products/sdk-reference/perl/rest/namespaces/resources/resources/index.mdx @@ -0,0 +1,583 @@ +--- +slug: "/reference/perl/rest/namespaces/resources/resources" +title: "Resources" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::REST::Namespaces::Resources" + parent: "rest.Namespaces.Resources" + module: "rest.Namespaces.Resources" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm" +--- +# `Resources` + +## Signature + +```perl +package SignalWire::REST::Namespaces::Resources +``` + +## Inheritance + +**Extends:** [SignalWire::REST::Namespaces::Base](/docs/sdk-reference/reference/perl/rest/namespaces/base/base), `SignalWire::REST::Namespaces::CrudResource` + +## Methods + +### add\_membership + +#### Signature + +```perl +sub add_membership($group_id, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 93. + +*** + +### call + +#### Signature + +```perl +sub call(%kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 191. + +*** + +### create + +#### Signature + +```perl +sub create(%kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 17. + +*** + +### create + +#### Signature + +```perl +sub create(%kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 176. + +*** + +### delete + +#### Signature + +```perl +sub delete($address_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 27. + +*** + +### delete + +#### Signature + +```perl +sub delete($recording_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 76. + +*** + +### delete\_membership + +#### Signature + +```perl +sub delete_membership($membership_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 103. + +*** + +### delete\_recording + +#### Signature + +```perl +sub delete_recording($recording_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 70. + +*** + +### get + +#### Signature + +```perl +sub get($address_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 22. + +*** + +### get + +#### Signature + +```perl +sub get($recording_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 65. + +*** + +### get + +#### Signature + +```perl +sub get() +``` + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 129. + +*** + +### get + +#### Signature + +```perl +sub get($short_code_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 161. + +*** + +### get\_member + +#### Signature + +```perl +sub get_member($queue_id, $member_id) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 49. + +*** + +### get\_membership + +#### Signature + +```perl +sub get_membership($membership_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 98. + +*** + +### get\_next\_member + +#### Signature + +```perl +sub get_next_member($queue_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 44. + +*** + +### list + +#### Signature + +```perl +sub list(@params) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 11. + +*** + +### list + +#### Signature + +```perl +sub list(@params) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 59. + +*** + +### list + +#### Signature + +```perl +sub list(@params) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 155. + +*** + +### list\_members + +#### Signature + +```perl +sub list_members($queue_id, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 38. + +*** + +### list\_memberships + +#### Signature + +```perl +sub list_memberships($group_id, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 87. + +*** + +### phone\_number + +#### Signature + +```perl +sub phone_number($e164, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 144. + +*** + +### redial\_verification + +#### Signature + +```perl +sub redial_verification($caller_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 114. + +*** + +### sms + +#### Signature + +```perl +sub sms(%kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 186. + +*** + +### submit\_verification + +#### Signature + +```perl +sub submit_verification($caller_id, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 119. + +*** + +### update + +#### Signature + +```perl +sub update(%kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 134. + +*** + +### update + +#### Signature + +```perl +sub update($short_code_id, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 166. + +*** + +### verify + +#### Signature + +```perl +sub verify($request_id, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 196. + +## Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/rest/namespaces/video/index.mdx b/fern/products/sdk-reference/perl/rest/namespaces/video/index.mdx new file mode 100644 index 0000000000..743ba64040 --- /dev/null +++ b/fern/products/sdk-reference/perl/rest/namespaces/video/index.mdx @@ -0,0 +1,20 @@ +--- +slug: "/reference/perl/rest/namespaces/video" +title: "Video" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "rest.Namespaces.Video" + parent: "rest.Namespaces" + module: "rest.Namespaces" +--- +# `Video` + +## Classes + + + + diff --git a/fern/products/sdk-reference/perl/rest/namespaces/video/video/index.mdx b/fern/products/sdk-reference/perl/rest/namespaces/video/video/index.mdx new file mode 100644 index 0000000000..2046ed17fd --- /dev/null +++ b/fern/products/sdk-reference/perl/rest/namespaces/video/video/index.mdx @@ -0,0 +1,491 @@ +--- +slug: "/reference/perl/rest/namespaces/video/video" +title: "Video" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::REST::Namespaces::Video" + parent: "rest.Namespaces.Video" + module: "rest.Namespaces.Video" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm" +--- +# `Video` + +## Signature + +```perl +package SignalWire::REST::Namespaces::Video +``` + +## Inheritance + +**Extends:** `SignalWire::REST::Namespaces::CrudResource`, [SignalWire::REST::Namespaces::Base](/docs/sdk-reference/reference/perl/rest/namespaces/base/base) + +## Methods + +### create + +#### Signature + +```perl +sub create(%kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) + +Line 28. + +*** + +### create\_stream + +#### Signature + +```perl +sub create_stream($room_id, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) + +Line 18. + +*** + +### create\_stream + +#### Signature + +```perl +sub create_stream($conference_id, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) + +Line 118. + +*** + +### delete + +#### Signature + +```perl +sub delete($recording_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) + +Line 89. + +*** + +### delete + +#### Signature + +```perl +sub delete($stream_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) + +Line 159. + +*** + +### delete\_recording + +#### Signature + +```perl +sub delete_recording($recording_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) + +Line 83. + +*** + +### delete\_stream + +#### Signature + +```perl +sub delete_stream($stream_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) + +Line 153. + +*** + +### get + +#### Signature + +```perl +sub get($session_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) + +Line 44. + +*** + +### get + +#### Signature + +```perl +sub get($recording_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) + +Line 78. + +*** + +### get + +#### Signature + +```perl +sub get($token_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) + +Line 128. + +*** + +### get + +#### Signature + +```perl +sub get($stream_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) + +Line 143. + +*** + +### list + +#### Signature + +```perl +sub list(@params) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) + +Line 38. + +*** + +### list + +#### Signature + +```perl +sub list(@params) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) + +Line 72. + +*** + +### list\_conference\_tokens + +#### Signature + +```perl +sub list_conference_tokens($conference_id, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) + +Line 106. + +*** + +### list\_events + +#### Signature + +```perl +sub list_events($session_id, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) + +Line 49. + +*** + +### list\_events + +#### Signature + +```perl +sub list_events($recording_id, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) + +Line 94. + +*** + +### list\_members + +#### Signature + +```perl +sub list_members($session_id, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) + +Line 55. + +*** + +### list\_recordings + +#### Signature + +```perl +sub list_recordings($session_id, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) + +Line 61. + +*** + +### list\_streams + +#### Signature + +```perl +sub list_streams($room_id, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) + +Line 12. + +*** + +### list\_streams + +#### Signature + +```perl +sub list_streams($conference_id, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) + +Line 112. + +*** + +### reset + +#### Signature + +```perl +sub reset($token_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) + +Line 133. + +*** + +### update + +#### Signature + +```perl +sub update($stream_id, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) + +Line 148. + +## Source + +[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/rest/pagination/index.mdx b/fern/products/sdk-reference/perl/rest/pagination/index.mdx new file mode 100644 index 0000000000..1a97c5fb15 --- /dev/null +++ b/fern/products/sdk-reference/perl/rest/pagination/index.mdx @@ -0,0 +1,22 @@ +--- +slug: "/reference/perl/rest/pagination" +title: "Pagination" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "rest.Pagination" + parent: "rest" + module: "rest" +--- +# `Pagination` + +## Classes + + + + Mirrors the Python `signalwire.rest._pagination.PaginatedIterator`. Walks the `links.next` cursor until no further page is advertised. Each fetch is performed via the SDK's SignalWire::REST::HttpClient so authentication and base-URL handling is shared with the rest of the SDK. + + diff --git a/fern/products/sdk-reference/perl/rest/pagination/pagination/index.mdx b/fern/products/sdk-reference/perl/rest/pagination/pagination/index.mdx new file mode 100644 index 0000000000..6cccc925f3 --- /dev/null +++ b/fern/products/sdk-reference/perl/rest/pagination/pagination/index.mdx @@ -0,0 +1,79 @@ +--- +slug: "/reference/perl/rest/pagination/pagination" +title: "Pagination" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::REST::Pagination" + parent: "rest.Pagination" + module: "rest.Pagination" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Pagination.pm" +--- +# `Pagination` + +Mirrors the Python `signalwire.rest._pagination.PaginatedIterator`. Walks the `links.next` cursor until no further page is advertised. Each fetch is performed via the SDK's SignalWire::REST::HttpClient so authentication and base-URL handling is shared with the rest of the SDK. + +**Synopsis** + +```perl +use SignalWire::REST::Pagination; +``` + +```perl +my $it = SignalWire::REST::Pagination::PaginatedIterator->new( + http => $client->_http, + path => '/api/fabric/addresses', + params => { page_size => 25 }, + data_key => 'data', +); +while (defined(my $item = $it->next)) { + ... +} +``` + +## Signature + +```perl +package SignalWire::REST::Pagination +``` + +## Methods + +### all + +#### Signature + +```perl +sub all() +``` + +#### Source + +[`lib/SignalWire/REST/Pagination.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Pagination.pm) + +Line 85. + +*** + +### BUILD + +#### Signature + +```perl +sub BUILD() +``` + +#### Source + +[`lib/SignalWire/REST/Pagination.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Pagination.pm) + +Line 39. + +## Source + +[`lib/SignalWire/REST/Pagination.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Pagination.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/rest/phone-call-handler/index.mdx b/fern/products/sdk-reference/perl/rest/phone-call-handler/index.mdx new file mode 100644 index 0000000000..c0b24962ef --- /dev/null +++ b/fern/products/sdk-reference/perl/rest/phone-call-handler/index.mdx @@ -0,0 +1,20 @@ +--- +slug: "/reference/perl/rest/phone-call-handler" +title: "PhoneCallHandler" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "rest.PhoneCallHandler" + parent: "rest" + module: "rest" +--- +# `PhoneCallHandler` + +## Classes + + + + diff --git a/fern/products/sdk-reference/perl/rest/phone-call-handler/phone-call-handler/index.mdx b/fern/products/sdk-reference/perl/rest/phone-call-handler/phone-call-handler/index.mdx new file mode 100644 index 0000000000..8d2a01e673 --- /dev/null +++ b/fern/products/sdk-reference/perl/rest/phone-call-handler/phone-call-handler/index.mdx @@ -0,0 +1,67 @@ +--- +slug: "/reference/perl/rest/phone-call-handler/phone-call-handler" +title: "PhoneCallHandler" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::REST::PhoneCallHandler" + parent: "rest.PhoneCallHandler" + module: "rest.PhoneCallHandler" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/PhoneCallHandler.pm" +--- +# `PhoneCallHandler` + +## Signature + +```perl +package SignalWire::REST::PhoneCallHandler +``` + +## Constants + + + + + + + + + + + + + + + + + + + + + + + +## Methods + +### values + +#### Signature + +```perl +sub values() +``` + +#### Source + +[`lib/SignalWire/REST/PhoneCallHandler.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/PhoneCallHandler.pm) + +Line 69. + +## Source + +[`lib/SignalWire/REST/PhoneCallHandler.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/PhoneCallHandler.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/rest/rest-client/index.mdx b/fern/products/sdk-reference/perl/rest/rest-client/index.mdx new file mode 100644 index 0000000000..8612274ea4 --- /dev/null +++ b/fern/products/sdk-reference/perl/rest/rest-client/index.mdx @@ -0,0 +1,20 @@ +--- +slug: "/reference/perl/rest/rest-client" +title: "RestClient" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "module" + language: "perl" + qualified_name: "rest.RestClient" + parent: "rest" + module: "rest" +--- +# `RestClient` + +## Classes + + + + diff --git a/fern/products/sdk-reference/perl/rest/rest-client/rest-client/index.mdx b/fern/products/sdk-reference/perl/rest/rest-client/rest-client/index.mdx new file mode 100644 index 0000000000..cf8ac8a308 --- /dev/null +++ b/fern/products/sdk-reference/perl/rest/rest-client/rest-client/index.mdx @@ -0,0 +1,27 @@ +--- +slug: "/reference/perl/rest/rest-client/rest-client" +title: "RestClient" +sdk_label: "Perl SDK" +icon: "perl" +lustri: + auto_generated: true + kind: "class" + language: "perl" + qualified_name: "SignalWire::REST::RestClient" + parent: "rest.RestClient" + module: "rest.RestClient" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/RestClient.pm" +--- +# `RestClient` + +## Signature + +```perl +package SignalWire::REST::RestClient +``` + +## Source + +[`lib/SignalWire/REST/RestClient.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/RestClient.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/agent/agent-base/agent-base/index.mdx b/fern/products/sdk-reference/perl/signal-wire/agent/agent-base/agent-base/index.mdx deleted file mode 100644 index cf7901ef8b..0000000000 --- a/fern/products/sdk-reference/perl/signal-wire/agent/agent-base/agent-base/index.mdx +++ /dev/null @@ -1,1342 +0,0 @@ ---- -slug: "/reference/perl/signal-wire/agent/agent-base/agent-base" -title: "AgentBase" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Agent::AgentBase" - module: "SignalWire.Agent.AgentBase" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm" ---- -# `AgentBase` - -## Signature - -```perl -package SignalWire::Agent::AgentBase -``` - -## Inheritance - -**Extends:** [SignalWire::SWML::Service](/docs/sdk-reference/reference/perl/signal-wire/swml/service/service) - -## Methods - -### add\_function\_include - -#### Signature - -```perl -sub add_function_include($include) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 659. - -*** - -### add\_hint - -#### Signature - -```perl -sub add_hint($hint) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 415. - -*** - -### add\_hints - -#### Signature - -```perl -sub add_hints($hints) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 421. - -*** - -### add\_internal\_filler - -#### Signature - -```perl -sub add_internal_filler(@args) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 616. - -*** - -### add\_language - -#### Signature - -```perl -sub add_language(@lang) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 447. - -*** - -### add\_mcp\_server - -#### Signature - -```perl -sub add_mcp_server($url, %opts) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 899. - -*** - -### add\_pattern\_hint - -#### Signature - -```perl -sub add_pattern_hint($pattern) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 441. - -*** - -### add\_post\_ai\_verb - -#### Signature - -```perl -sub add_post_ai_verb($verb_name, $verb_config) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 697. - -*** - -### add\_post\_answer\_verb - -#### Signature - -```perl -sub add_post_answer_verb($verb_name, $verb_config) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 691. - -*** - -### add\_pre\_answer\_verb - -#### Signature - -```perl -sub add_pre_answer_verb($verb_name, $verb_config) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 685. - -*** - -### add\_pronunciation - -#### Signature - -```perl -sub add_pronunciation(@pron) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 500. - -*** - -### add\_skill - -#### Signature - -```perl -sub add_skill($skill_name, $params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 807. - -*** - -### add\_swaig\_query\_params - -#### Signature - -```perl -sub add_swaig_query_params(@params) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 854. - -*** - -### BUILD - -#### Signature - -```perl -sub BUILD() -``` - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 161. - -*** - -### clear\_post\_ai\_verbs - -#### Signature - -```perl -sub clear_post_ai_verbs() -``` - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 715. - -*** - -### clear\_post\_answer\_verbs - -#### Signature - -```perl -sub clear_post_answer_verbs() -``` - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 709. - -*** - -### clear\_pre\_answer\_verbs - -#### Signature - -```perl -sub clear_pre_answer_verbs() -``` - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 703. - -*** - -### clear\_swaig\_query\_params - -#### Signature - -```perl -sub clear_swaig_query_params() -``` - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 860. - -*** - -### contexts - -#### Signature - -```perl -sub contexts() -``` - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 800. - -*** - -### create\_tool\_token - -#### Signature - -```perl -sub create_tool_token($tool_name, $call_id) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 378. - -*** - -### define\_contexts - -#### Signature - -```perl -sub define_contexts($contexts) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 735. - -*** - -### enable\_debug\_events - -#### Signature - -```perl -sub enable_debug_events($level) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 652. - -*** - -### enable\_mcp\_server - -#### Signature - -```perl -sub enable_mcp_server() -``` - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 909. - -*** - -### extract\_sip\_username - -#### Signature - -```perl -sub extract_sip_username($class_or_self, $body) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 1725. - -*** - -### get\_contexts - -#### Signature - -```perl -sub get_contexts() -``` - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 311. - -*** - -### get\_full\_url - -#### Signature - -```perl -sub get_full_url(%opts) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 1096. - -*** - -### get\_language\_params - -#### Signature - -```perl -sub get_language_params($code) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 491. - -*** - -### get\_post\_prompt - -#### Signature - -```perl -sub get_post_prompt() -``` - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 276. - -*** - -### get\_prompt - -#### Signature - -```perl -sub get_prompt() -``` - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 240. - -*** - -### get\_raw\_prompt - -#### Signature - -```perl -sub get_raw_prompt() -``` - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 286. - -*** - -### has\_skill - -#### Signature - -```perl -sub has_skill($skill_name) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 823. - -*** - -### list\_skills - -#### Signature - -```perl -sub list_skills() -``` - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 818. - -*** - -### list\_tool\_names - -#### Signature - -```perl -sub list_tool_names() -``` - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 795. - -*** - -### manual\_set\_proxy\_url - -#### Signature - -```perl -sub manual_set_proxy_url($url) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 848. - -*** - -### on\_debug\_event - -#### Signature - -```perl -sub on_debug_event($cb) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 891. - -*** - -### on\_summary - -#### Signature - -```perl -sub on_summary($summary, $raw_data) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 866. - -*** - -### pom - -#### Signature - -```perl -sub pom() -``` - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 257. - -*** - -### prompt\_add\_section - -#### Signature - -```perl -sub prompt_add_section($title, $body, %opts) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 190. - -*** - -### prompt\_add\_subsection - -#### Signature - -```perl -sub prompt_add_subsection($parent_title, $title, $body, %opts) -``` - -#### Parameters - - - - - - - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 201. - -*** - -### prompt\_add\_to\_section - -#### Signature - -```perl -sub prompt_add_to_section($title, %opts) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 215. - -*** - -### prompt\_has\_section - -#### Signature - -```perl -sub prompt_has_section($title) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 232. - -*** - -### psgi\_app - -#### Signature - -```perl -sub psgi_app() -``` - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 1271. - -*** - -### remove\_skill - -#### Signature - -```perl -sub remove_skill($skill_name) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 813. - -*** - -### render\_swml - -#### Signature - -```perl -sub render_swml($request_env) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 1111. - -*** - -### reset\_contexts - -#### Signature - -```perl -sub reset_contexts() -``` - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 782. - -*** - -### run - -#### Signature - -```perl -sub run(%opts) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 1620. - -*** - -### serve - -#### Signature - -```perl -sub serve(%opts) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 1625. - -*** - -### set\_answer\_config - -#### Signature - -```perl -sub set_answer_config($config) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 721. - -*** - -### set\_dynamic\_config\_callback - -#### Signature - -```perl -sub set_dynamic_config_callback($cb) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 830. - -*** - -### set\_function\_includes - -#### Signature - -```perl -sub set_function_includes($includes) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 665. - -*** - -### set\_global\_data - -#### Signature - -```perl -sub set_global_data($data) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 524. - -*** - -### set\_internal\_fillers - -#### Signature - -```perl -sub set_internal_fillers($fillers) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 584. - -*** - -### set\_language\_params - -#### Signature - -```perl -sub set_language_params($code, $params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 474. - -*** - -### set\_languages - -#### Signature - -```perl -sub set_languages($langs) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 464. - -*** - -### set\_native\_functions - -#### Signature - -```perl -sub set_native_functions($funcs) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 536. - -*** - -### set\_param - -#### Signature - -```perl -sub set_param($key, $value) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 512. - -*** - -### set\_params - -#### Signature - -```perl -sub set_params($p) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 518. - -*** - -### set\_post\_prompt - -#### Signature - -```perl -sub set_post_prompt($text) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 184. - -*** - -### set\_post\_prompt\_llm\_params - -#### Signature - -```perl -sub set_post_prompt_llm_params(@p) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 677. - -*** - -### set\_post\_prompt\_url - -#### Signature - -```perl -sub set_post_prompt_url($url) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 842. - -*** - -### set\_prompt\_llm\_params - -#### Signature - -```perl -sub set_prompt_llm_params(@p) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 671. - -*** - -### set\_prompt\_pom - -#### Signature - -```perl -sub set_prompt_pom($pom) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 298. - -*** - -### set\_prompt\_text - -#### Signature - -```perl -sub set_prompt_text($text) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 178. - -*** - -### set\_pronunciations - -#### Signature - -```perl -sub set_pronunciations($prons) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 506. - -*** - -### set\_web\_hook\_url - -#### Signature - -```perl -sub set_web_hook_url($url) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 836. - -*** - -### update\_global\_data - -#### Signature - -```perl -sub update_global_data($data) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 530. - -*** - -### validate\_tool\_token - -#### Signature - -```perl -sub validate_tool_token($function_name, $token, $call_id) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 396. - -## Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/core/logging-config/logging-config/index.mdx b/fern/products/sdk-reference/perl/signal-wire/core/logging-config/logging-config/index.mdx deleted file mode 100644 index 92f2751a3a..0000000000 --- a/fern/products/sdk-reference/perl/signal-wire/core/logging-config/logging-config/index.mdx +++ /dev/null @@ -1,62 +0,0 @@ ---- -slug: "/reference/perl/signal-wire/core/logging-config/logging-config" -title: "LoggingConfig" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Core::LoggingConfig" - module: "SignalWire.Core.LoggingConfig" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Core/LoggingConfig.pm" ---- -# `LoggingConfig` - -## Signature - -```perl -package SignalWire::Core::LoggingConfig -``` - -## Methods - -### get\_execution\_mode - -#### Signature - -```perl -sub get_execution_mode() -``` - -#### Source - -[`lib/SignalWire/Core/LoggingConfig.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Core/LoggingConfig.pm) - -Line 33. - -*** - -### get\_logger - -#### Signature - -```perl -sub get_logger($name) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Core/LoggingConfig.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Core/LoggingConfig.pm) - -Line 14. - -## Source - -[`lib/SignalWire/Core/LoggingConfig.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Core/LoggingConfig.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/pom/prompt-object-model/prompt-object-model/index.mdx b/fern/products/sdk-reference/perl/signal-wire/pom/prompt-object-model/prompt-object-model/index.mdx deleted file mode 100644 index 188d31fc85..0000000000 --- a/fern/products/sdk-reference/perl/signal-wire/pom/prompt-object-model/prompt-object-model/index.mdx +++ /dev/null @@ -1,248 +0,0 @@ ---- -slug: "/reference/perl/signal-wire/pom/prompt-object-model/prompt-object-model" -title: "PromptObjectModel" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::POM::PromptObjectModel" - module: "SignalWire.POM.PromptObjectModel" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/PromptObjectModel.pm" ---- -# `PromptObjectModel` - -SignalWire::POM::PromptObjectModel is a Perl port of `signalwire.pom.pom.PromptObjectModel` from the Python SignalWire SDK. It owns an ordered list of SignalWire::POM::Section objects and provides JSON / YAML serialisation, Markdown / XML rendering, recursive title-based search, and POM-merging via `add_pom_as_subsection`. - -The serialised form is byte-for-byte identical to the Python reference; prompts authored in either language can be loaded by the other. - -**Synopsis** - -```perl -use SignalWire::POM::PromptObjectModel; -``` - -```perl -my $pom = SignalWire::POM::PromptObjectModel->new; -my $sec = $pom->add_section( - title => 'Greeting', - body => 'You are a helpful assistant.', -); -$sec->add_subsection( - title => 'Tone', - body => 'Speak warmly.', -); -``` - -```perl -print $pom->render_markdown; -print $pom->render_xml; -``` - -```perl -my $json = $pom->to_json; -my $back = SignalWire::POM::PromptObjectModel->from_json($json); -``` - -## Signature - -```perl -package SignalWire::POM::PromptObjectModel -``` - -## See Also - -- \[SignalWire::POM::Section]\(xref://SignalWire::POM::Section) - -## Methods - -### add\_pom\_as\_subsection - -#### Signature - -```perl -sub add_pom_as_subsection($target, $pom_to_add) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/POM/PromptObjectModel.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/PromptObjectModel.pm) - -Line 322. - -*** - -### add\_section - -#### Signature - -```perl -sub add_section(%opts) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/POM/PromptObjectModel.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/PromptObjectModel.pm) - -Line 169. - -*** - -### find\_section - -#### Signature - -```perl -sub find_section($title) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/POM/PromptObjectModel.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/PromptObjectModel.pm) - -Line 198. - -*** - -### from\_json - -#### Signature - -```perl -sub from_json($class_or_self, $json_data) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/POM/PromptObjectModel.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/PromptObjectModel.pm) - -Line 48. - -*** - -### from\_yaml - -#### Signature - -```perl -sub from_yaml($class_or_self, $yaml_data) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/POM/PromptObjectModel.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/PromptObjectModel.pm) - -Line 67. - -*** - -### render\_markdown - -#### Signature - -```perl -sub render_markdown() -``` - -#### Source - -[`lib/SignalWire/POM/PromptObjectModel.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/PromptObjectModel.pm) - -Line 254. - -*** - -### render\_xml - -#### Signature - -```perl -sub render_xml() -``` - -#### Source - -[`lib/SignalWire/POM/PromptObjectModel.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/PromptObjectModel.pm) - -Line 285. - -*** - -### to\_hash - -#### Signature - -```perl -sub to_hash() -``` - -#### Source - -[`lib/SignalWire/POM/PromptObjectModel.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/PromptObjectModel.pm) - -Line 246. - -*** - -### to\_json - -#### Signature - -```perl -sub to_json() -``` - -#### Source - -[`lib/SignalWire/POM/PromptObjectModel.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/PromptObjectModel.pm) - -Line 217. - -*** - -### to\_yaml - -#### Signature - -```perl -sub to_yaml() -``` - -#### Source - -[`lib/SignalWire/POM/PromptObjectModel.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/PromptObjectModel.pm) - -Line 232. - -## Source - -[`lib/SignalWire/POM/PromptObjectModel.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/PromptObjectModel.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/pom/section/section/index.mdx b/fern/products/sdk-reference/perl/signal-wire/pom/section/section/index.mdx deleted file mode 100644 index 6f01e590c6..0000000000 --- a/fern/products/sdk-reference/perl/signal-wire/pom/section/section/index.mdx +++ /dev/null @@ -1,170 +0,0 @@ ---- -slug: "/reference/perl/signal-wire/pom/section/section" -title: "Section" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::POM::Section" - module: "SignalWire.POM.Section" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/Section.pm" ---- -# `Section` - -SignalWire::POM::Section is a Perl port of `signalwire.pom.pom.Section` from the Python SignalWire SDK. Both implementations render byte-for-byte identical Markdown/XML/JSON output so prompts authored in either language can be consumed interchangeably. - -**Synopsis** - -```perl -use SignalWire::POM::Section; -``` - -```perl -my $section = SignalWire::POM::Section->new( - title => 'Greeting', - body => 'You are a helpful assistant.', - bullets => ['Be polite', 'Be concise'], -); -``` - -```perl -my $sub = $section->add_subsection( - title => 'Tone', - body => 'Speak warmly.', -); -``` - -```perl -print $section->render_markdown; -print $section->render_xml; -``` - -## Signature - -```perl -package SignalWire::POM::Section -``` - -## See Also - -- SignalWire::POM::PromptObjectModel — the top-level container that holds a list of Sections. - -## Methods - -### add\_body - -#### Signature - -```perl -sub add_body() -``` - -#### Source - -[`lib/SignalWire/POM/Section.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/Section.pm) - -Line 89. - -*** - -### add\_bullets - -#### Signature - -```perl -sub add_bullets() -``` - -#### Source - -[`lib/SignalWire/POM/Section.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/Section.pm) - -Line 96. - -*** - -### add\_subsection - -#### Signature - -```perl -sub add_subsection() -``` - -#### Source - -[`lib/SignalWire/POM/Section.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/Section.pm) - -Line 106. - -*** - -### BUILD - -#### Signature - -```perl -sub BUILD() -``` - -#### Source - -[`lib/SignalWire/POM/Section.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/Section.pm) - -Line 73. - -*** - -### render\_markdown - -#### Signature - -```perl -sub render_markdown() -``` - -#### Source - -[`lib/SignalWire/POM/Section.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/Section.pm) - -Line 153. - -*** - -### render\_xml - -#### Signature - -```perl -sub render_xml() -``` - -#### Source - -[`lib/SignalWire/POM/Section.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/Section.pm) - -Line 221. - -*** - -### to\_hash - -#### Signature - -```perl -sub to_hash() -``` - -#### Source - -[`lib/SignalWire/POM/Section.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/Section.pm) - -Line 124. - -## Source - -[`lib/SignalWire/POM/Section.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/Section.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/prefabs/concierge/concierge/index.mdx b/fern/products/sdk-reference/perl/signal-wire/prefabs/concierge/concierge/index.mdx deleted file mode 100644 index 2872d74dcd..0000000000 --- a/fern/products/sdk-reference/perl/signal-wire/prefabs/concierge/concierge/index.mdx +++ /dev/null @@ -1,50 +0,0 @@ ---- -slug: "/reference/perl/signal-wire/prefabs/concierge/concierge" -title: "Concierge" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Prefabs::Concierge" - module: "SignalWire.Prefabs.Concierge" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/Concierge.pm" ---- -# `Concierge` - -## Signature - -```perl -package SignalWire::Prefabs::Concierge -``` - -## Inheritance - -**Extends:** [SignalWire::Agent::AgentBase](/docs/sdk-reference/reference/perl/signal-wire/agent/agent-base/agent-base) - -## Methods - -### BUILD - -#### Signature - -```perl -sub BUILD($args) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Prefabs/Concierge.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/Concierge.pm) - -Line 18. - -## Source - -[`lib/SignalWire/Prefabs/Concierge.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/Concierge.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/prefabs/faq-bot/faq-bot/index.mdx b/fern/products/sdk-reference/perl/signal-wire/prefabs/faq-bot/faq-bot/index.mdx deleted file mode 100644 index 2566d91808..0000000000 --- a/fern/products/sdk-reference/perl/signal-wire/prefabs/faq-bot/faq-bot/index.mdx +++ /dev/null @@ -1,50 +0,0 @@ ---- -slug: "/reference/perl/signal-wire/prefabs/faq-bot/faq-bot" -title: "FAQBot" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Prefabs::FAQBot" - module: "SignalWire.Prefabs.FAQBot" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/FAQBot.pm" ---- -# `FAQBot` - -## Signature - -```perl -package SignalWire::Prefabs::FAQBot -``` - -## Inheritance - -**Extends:** [SignalWire::Agent::AgentBase](/docs/sdk-reference/reference/perl/signal-wire/agent/agent-base/agent-base) - -## Methods - -### BUILD - -#### Signature - -```perl -sub BUILD($args) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Prefabs/FAQBot.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/FAQBot.pm) - -Line 15. - -## Source - -[`lib/SignalWire/Prefabs/FAQBot.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/FAQBot.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/prefabs/info-gatherer/info-gatherer/index.mdx b/fern/products/sdk-reference/perl/signal-wire/prefabs/info-gatherer/info-gatherer/index.mdx deleted file mode 100644 index 1e330d9a28..0000000000 --- a/fern/products/sdk-reference/perl/signal-wire/prefabs/info-gatherer/info-gatherer/index.mdx +++ /dev/null @@ -1,50 +0,0 @@ ---- -slug: "/reference/perl/signal-wire/prefabs/info-gatherer/info-gatherer" -title: "InfoGatherer" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Prefabs::InfoGatherer" - module: "SignalWire.Prefabs.InfoGatherer" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/InfoGatherer.pm" ---- -# `InfoGatherer` - -## Signature - -```perl -package SignalWire::Prefabs::InfoGatherer -``` - -## Inheritance - -**Extends:** [SignalWire::Agent::AgentBase](/docs/sdk-reference/reference/perl/signal-wire/agent/agent-base/agent-base) - -## Methods - -### BUILD - -#### Signature - -```perl -sub BUILD($args) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Prefabs/InfoGatherer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/InfoGatherer.pm) - -Line 13. - -## Source - -[`lib/SignalWire/Prefabs/InfoGatherer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/InfoGatherer.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/prefabs/receptionist/receptionist/index.mdx b/fern/products/sdk-reference/perl/signal-wire/prefabs/receptionist/receptionist/index.mdx deleted file mode 100644 index c3077d7dd2..0000000000 --- a/fern/products/sdk-reference/perl/signal-wire/prefabs/receptionist/receptionist/index.mdx +++ /dev/null @@ -1,50 +0,0 @@ ---- -slug: "/reference/perl/signal-wire/prefabs/receptionist/receptionist" -title: "Receptionist" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Prefabs::Receptionist" - module: "SignalWire.Prefabs.Receptionist" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/Receptionist.pm" ---- -# `Receptionist` - -## Signature - -```perl -package SignalWire::Prefabs::Receptionist -``` - -## Inheritance - -**Extends:** [SignalWire::Agent::AgentBase](/docs/sdk-reference/reference/perl/signal-wire/agent/agent-base/agent-base) - -## Methods - -### BUILD - -#### Signature - -```perl -sub BUILD($args) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Prefabs/Receptionist.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/Receptionist.pm) - -Line 15. - -## Source - -[`lib/SignalWire/Prefabs/Receptionist.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/Receptionist.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/prefabs/survey/survey/index.mdx b/fern/products/sdk-reference/perl/signal-wire/prefabs/survey/survey/index.mdx deleted file mode 100644 index 8105cf8b82..0000000000 --- a/fern/products/sdk-reference/perl/signal-wire/prefabs/survey/survey/index.mdx +++ /dev/null @@ -1,50 +0,0 @@ ---- -slug: "/reference/perl/signal-wire/prefabs/survey/survey" -title: "Survey" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Prefabs::Survey" - module: "SignalWire.Prefabs.Survey" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/Survey.pm" ---- -# `Survey` - -## Signature - -```perl -package SignalWire::Prefabs::Survey -``` - -## Inheritance - -**Extends:** [SignalWire::Agent::AgentBase](/docs/sdk-reference/reference/perl/signal-wire/agent/agent-base/agent-base) - -## Methods - -### BUILD - -#### Signature - -```perl -sub BUILD($args) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Prefabs/Survey.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/Survey.pm) - -Line 18. - -## Source - -[`lib/SignalWire/Prefabs/Survey.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/Survey.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/relay/action/action/index.mdx b/fern/products/sdk-reference/perl/signal-wire/relay/action/action/index.mdx deleted file mode 100644 index 947fe06499..0000000000 --- a/fern/products/sdk-reference/perl/signal-wire/relay/action/action/index.mdx +++ /dev/null @@ -1,356 +0,0 @@ ---- -slug: "/reference/perl/signal-wire/relay/action/action" -title: "Action" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Relay::Action" - module: "SignalWire.Relay.Action" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm" ---- -# `Action` - -SignalWire::Relay::Action is the base class for every long-running RELAY operation (play, record, detect, collect, fax, tap, stream, pay, transcribe, AI). It tracks the `control_id` correlation key, accumulates events, exposes the latest `payload`, and resolves when the operation reaches a terminal state — mirroring the Python reference's action objects. - -Construction fails fast: `control_id` must be a non-empty string, `events` must be an arrayref, and `payload` must be a hashref (Moo `isa` constraints). These objects are normally created by SignalWire::Relay::Call, not by user code. - -**BASE METHODS** - -- `on_completed($cb)` — register a completion callback (fires immediately if already done); no-arg form returns the registered callback. - -- `is_done` — true once resolved. - -- `wait(timeout => $secs)` — block (polling) until resolved or the timeout elapses (default 30s), then return the result. - -- `stop` — send the subclass's stop verb unless already done. - -**LICENSE** - -Copyright (c) 2025 SignalWire. Licensed under the MIT License. - -**SUBCLASSES** - -Each subclass overrides the stop verb and adds result accessors: - -- **::Play** — `pause`, `resume`, `volume($vol)`. - -- **::Record** — `pause(behavior => ...)`, `resume`, and the `url` / `duration` / `size` result accessors. - -- **::Detect** — `detect_result`; resolves on the first `params.detect` payload. - -- **::Collect** / **::StandaloneCollect** — `start_input_timers`, `collect_result`; filters stray `calling.call.play` events. - -- **::Fax** — `fax_result`; stop verb depends on `_fax_type`. - -- **::Tap**, **::Stream**, **::Transcribe**, **::AI** — stop-verb-only specialisations. - -- **::Pay** — `pay_result`. - -**Synopsis** - -```perl -# Actions are returned by SignalWire::Relay::Call methods, not -# constructed directly: -my $action = $call->play_async( url => $url ); # ::Action::Play -``` - -```perl -$action->on_completed(sub ($a) { print "done: ", $a->state, "\n"; }); -my $result = $action->wait( timeout => 30 ); # block until done -$action->stop unless $action->is_done; -``` - -## Signature - -```perl -package SignalWire::Relay::Action -``` - -## Inheritance - -**Extends:** [SignalWire::Relay::Action](/docs/sdk-reference/reference/perl/signal-wire/relay/action/action), `SignalWire::Relay::Action::Collect` - -## See Also - -- SignalWire::Relay::Call, SignalWire::Relay::Client, SignalWire::Relay::Event. - -## Methods - -### collect\_result - -#### Signature - -```perl -sub collect_result() -``` - -#### Source - -[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) - -Line 208. - -*** - -### detect\_result - -#### Signature - -```perl -sub detect_result() -``` - -#### Source - -[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) - -Line 176. - -*** - -### duration - -#### Signature - -```perl -sub duration() -``` - -#### Source - -[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) - -Line 165. - -*** - -### fax\_result - -#### Signature - -```perl -sub fax_result() -``` - -#### Source - -[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) - -Line 264. - -*** - -### is\_done - -#### Signature - -```perl -sub is_done() -``` - -#### Source - -[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) - -Line 57. - -*** - -### on\_completed - -#### Signature - -```perl -sub on_completed() -``` - -#### Source - -[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) - -Line 43. - -*** - -### pause - -#### Signature - -```perl -sub pause() -``` - -#### Source - -[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) - -Line 120. - -*** - -### pause - -#### Signature - -```perl -sub pause() -``` - -#### Source - -[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) - -Line 147. - -*** - -### pay\_result - -#### Signature - -```perl -sub pay_result() -``` - -#### Source - -[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) - -Line 287. - -*** - -### resume - -#### Signature - -```perl -sub resume() -``` - -#### Source - -[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) - -Line 124. - -*** - -### resume - -#### Signature - -```perl -sub resume() -``` - -#### Source - -[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) - -Line 159. - -*** - -### size - -#### Signature - -```perl -sub size() -``` - -#### Source - -[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) - -Line 166. - -*** - -### start\_input\_timers - -#### Signature - -```perl -sub start_input_timers() -``` - -#### Source - -[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) - -Line 204. - -*** - -### stop - -#### Signature - -```perl -sub stop() -``` - -#### Source - -[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) - -Line 104. - -*** - -### url - -#### Signature - -```perl -sub url() -``` - -#### Source - -[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) - -Line 164. - -*** - -### volume - -#### Signature - -```perl -sub volume() -``` - -#### Source - -[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) - -Line 128. - -*** - -### wait - -#### Signature - -```perl -sub wait() -``` - -#### Source - -[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) - -Line 62. - -## Source - -[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/relay/call-state/call-state/index.mdx b/fern/products/sdk-reference/perl/signal-wire/relay/call-state/call-state/index.mdx deleted file mode 100644 index 51bf30e6c3..0000000000 --- a/fern/products/sdk-reference/perl/signal-wire/relay/call-state/call-state/index.mdx +++ /dev/null @@ -1,167 +0,0 @@ ---- -slug: "/reference/perl/signal-wire/relay/call-state/call-state" -title: "CallState" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Relay::CallState" - module: "SignalWire.Relay.CallState" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/CallState.pm" ---- -# `CallState` - -The RELAY call-lifecycle states, surfaced as typed, named constants. A call moves through `created` → `ringing` → `answered` → `ending` → `ended`. Each constant's value is the exact wire string the server sends in the `calling.call.state` event's `call_state` field. - -The constants **are** the canonical wire strings, so nothing about `SignalWire::Relay::Call->state` changes: it still reads and writes a plain string. That keeps parity with the Python reference (bare `str`) and leaves forward-compatible server states working — an unknown string is simply not in this set. - -Grounded in the Python reference's `relay/constants.py` (`CALL_STATE_*` / `CALL_STATES`) and the port's SignalWire::Relay::Constants (`CALL_STATES` / `CALL_TERMINAL_STATES`), which are the single source the lists below are derived from. - -**CONSTANTS** - -Exported on request via Exporter; `:all` pulls every state. - -```perl -CREATED => 'created' -RINGING => 'ringing' -ANSWERED => 'answered' -ENDING => 'ending' -ENDED => 'ended' -``` - -**IS STATE** - -my $bool = SignalWire::Relay::CallState->is\_state($value); - -True if `$value` is a known call state. Returns false (never dies) on `undef` or an unknown/forward-compatible value. - -**IS TERMINAL** - -my $bool = SignalWire::Relay::CallState->is\_terminal($value); - -True if `$value` is a terminal call state (the only terminal `CallState` is `ended`). Returns false on `undef`, a non-terminal state, or an unknown value — it never dies, since these mirror server-emitted values that can grow. - -**LICENSE** - -Copyright (c) 2025 SignalWire. Licensed under the MIT License. - -**STATES** - -my $aref = SignalWire::Relay::CallState->states; - -Arrayref of the call lifecycle states, in lifecycle order. - -**THREE DISTINCT STATE VOCABULARIES** - -CallState, DialState, and MessageState are **distinct** sets with **distinct** terminal members and must never be conflated. `answered` is a **non-terminal** `CallState` but a **terminal** `DialState`; `failed` is not a `CallState` at all. Each module owns its own terminal set. - -**Synopsis** - -```perl -use SignalWire::Relay::CallState qw(CREATED RINGING ANSWERED ENDING ENDED); -``` - -```perl -# Named constants and bare wire strings are interchangeable: -$call->state eq ANSWERED; # constant -$call->state eq 'answered'; # string (Python parity) -``` - -```perl -# Membership / terminality (false on unknown — never dies): -SignalWire::Relay::CallState->is_state('ringing'); # 1 -SignalWire::Relay::CallState->is_terminal('ended'); # 1 -SignalWire::Relay::CallState->is_terminal('answered'); # 0 -SignalWire::Relay::CallState->is_terminal('made_up'); # 0 -@{ SignalWire::Relay::CallState->states }; # created..ended -``` - -## Signature - -```perl -package SignalWire::Relay::CallState -``` - -## See Also - -- SignalWire::Relay::Call, SignalWire::Relay::Constants, SignalWire::Relay::DialState, SignalWire::Relay::MessageState. - -## Constants - - - - - - - - - - - -## Methods - -### is\_state - -#### Signature - -```perl -sub is_state($class, $value) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/Relay/CallState.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/CallState.pm) - -Line 84. - -*** - -### is\_terminal - -#### Signature - -```perl -sub is_terminal($class, $value) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/Relay/CallState.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/CallState.pm) - -Line 93. - -*** - -### states - -#### Signature - -```perl -sub states() -``` - -#### Source - -[`lib/SignalWire/Relay/CallState.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/CallState.pm) - -Line 78. - -## Source - -[`lib/SignalWire/Relay/CallState.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/CallState.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/relay/call/call/index.mdx b/fern/products/sdk-reference/perl/signal-wire/relay/call/call/index.mdx deleted file mode 100644 index 8d3087193f..0000000000 --- a/fern/products/sdk-reference/perl/signal-wire/relay/call/call/index.mdx +++ /dev/null @@ -1,931 +0,0 @@ ---- -slug: "/reference/perl/signal-wire/relay/call/call" -title: "Call" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Relay::Call" - module: "SignalWire.Relay.Call" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm" ---- -# `Call` - -SignalWire::Relay::Call is the Perl port of the Python reference's call object. It models one RELAY call: it carries call state, demultiplexes incoming events (updating state, routing to the right SignalWire::Relay::Action by `control_id`, and firing listeners), and exposes the full set of call-control verbs. - -Construction fails fast: `call_id` is required and must be a non-empty string; `device` / `peer` must be hashrefs (Moo `isa` constraints). These objects are created by SignalWire::Relay::Client. - -**ACTION-BASED VERBS** - -`play`, `record`, `detect`, `collect`, `play_and_collect`, `send_fax`, `receive_fax`, `tap`, `stream`, `pay`, `transcribe`, `ai` — each returns a SignalWire::Relay::Action subclass that tracks a `control_id` and resolves when the operation completes. - -**EVENTS** - -- `on($cb)` — register a listener invoked as `$cb->($call, $event)` for every dispatched event. The callback must be a coderef. - -- `dispatch_event($event)` — apply an incoming event (normally called by the client). - -**FIRE-AND-RESPONSE VERBS** - -`answer`, `hangup`, `pass`, `connect`, `disconnect`, `hold`, `unhold`, `denoise`, `denoise_stop`, `transfer`, `join_conference`, `leave_conference`, `echo`, `bind_digit`, `clear_digit_bindings`, `live_transcribe`, `live_translate`, `join_room`, `leave_room`, `amazon_bedrock`, `ai_message`, `ai_hold`, `ai_unhold`, `user_event`, `queue_enter`, `queue_leave`, `refer`, `send_digits`. Each forwards its keyword arguments to the matching RELAY method. - -**LICENSE** - -Copyright (c) 2025 SignalWire. Licensed under the MIT License. - -**TYPED CONVENIENCE WRAPPERS** - -`play_tts`, `play_audio`, `play_silence`, `play_ringtone` build the RELAY media object and delegate to `play`. `detect_digit`, `detect_answering_machine`, `detect_fax` build the detect object and delegate to `detect`. `prompt_tts` / `prompt_audio` play a prompt and collect input via `play_and_collect`. - -**TYPED STATE** - -`state` remains the canonical bare-string accessor (Python parity). These add the SignalWire::Relay::CallState-backed view: - -- `current_state` — the call's lifecycle state as the CallState-typed view. Returns the same wire string as `state` (the CallState constants **are** the wire strings); pair it with `SignalWire::Relay::CallState->is_state` / `->is_terminal` for membership and terminality. - -- `is_terminal` — true once the call has reached a terminal lifecycle state (`ended`). Delegates to SignalWire::Relay::CallState so the terminal definition lives in one place; returns false (never dies) on an unknown/forward-compatible state. - -**Synopsis** - -```perl -# Calls are produced by SignalWire::Relay::Client, not constructed -# directly: -$call->answer; -$call->play_tts( text => 'Hello', voice => 'en-US-Neural2-A' ); -``` - -```perl -my $rec = $call->record( record => { ... } ); # returns an Action -$rec->on_completed(sub ($a) { ... }); -``` - -```perl -$call->on(sub ($c, $event) { ... }); # raw event listener -$call->hangup; -``` - -## Signature - -```perl -package SignalWire::Relay::Call -``` - -## See Also - -- SignalWire::Relay::Client, SignalWire::Relay::Action, SignalWire::Relay::Event, SignalWire::Relay::Constants, SignalWire::Relay::CallState, SignalWire::Relay::Device. - -## Methods - -### ai - -#### Signature - -```perl -sub ai() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 491. - -*** - -### ai\_hold - -#### Signature - -```perl -sub ai_hold() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 283. - -*** - -### ai\_message - -#### Signature - -```perl -sub ai_message() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 279. - -*** - -### ai\_unhold - -#### Signature - -```perl -sub ai_unhold() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 287. - -*** - -### amazon\_bedrock - -#### Signature - -```perl -sub amazon_bedrock() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 275. - -*** - -### answer - -#### Signature - -```perl -sub answer() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 196. - -*** - -### bind\_digit - -#### Signature - -```perl -sub bind_digit() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 248. - -*** - -### clear\_digit\_bindings - -#### Signature - -```perl -sub clear_digit_bindings() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 252. - -*** - -### collect - -#### Signature - -```perl -sub collect() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 408. - -*** - -### connect - -#### Signature - -```perl -sub connect() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 208. - -*** - -### current\_state - -#### Signature - -```perl -sub current_state() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 174. - -*** - -### denoise - -#### Signature - -```perl -sub denoise() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 224. - -*** - -### denoise\_stop - -#### Signature - -```perl -sub denoise_stop() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 228. - -*** - -### detect - -#### Signature - -```perl -sub detect() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 363. - -*** - -### detect\_answering\_machine - -#### Signature - -```perl -sub detect_answering_machine() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 383. - -*** - -### detect\_digit - -#### Signature - -```perl -sub detect_digit() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 374. - -*** - -### detect\_fax - -#### Signature - -```perl -sub detect_fax() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 399. - -*** - -### disconnect - -#### Signature - -```perl -sub disconnect() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 212. - -*** - -### dispatch\_event - -#### Signature - -```perl -sub dispatch_event() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 98. - -*** - -### echo - -#### Signature - -```perl -sub echo() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 244. - -*** - -### hangup - -#### Signature - -```perl -sub hangup() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 200. - -*** - -### hold - -#### Signature - -```perl -sub hold() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 216. - -*** - -### is\_terminal - -#### Signature - -```perl -sub is_terminal() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 182. - -*** - -### join\_conference - -#### Signature - -```perl -sub join_conference() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 236. - -*** - -### join\_room - -#### Signature - -```perl -sub join_room() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 264. - -*** - -### leave\_conference - -#### Signature - -```perl -sub leave_conference() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 240. - -*** - -### leave\_room - -#### Signature - -```perl -sub leave_room() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 268. - -*** - -### live\_transcribe - -#### Signature - -```perl -sub live_transcribe() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 256. - -*** - -### live\_translate - -#### Signature - -```perl -sub live_translate() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 260. - -*** - -### on - -#### Signature - -```perl -sub on() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 156. - -*** - -### pass - -#### Signature - -```perl -sub pass() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 204. - -*** - -### pay - -#### Signature - -```perl -sub pay() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 483. - -*** - -### play - -#### Signature - -```perl -sub play() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 313. - -*** - -### play\_and\_collect - -#### Signature - -```perl -sub play_and_collect() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 412. - -*** - -### play\_audio - -#### Signature - -```perl -sub play_audio() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 337. - -*** - -### play\_ringtone - -#### Signature - -```perl -sub play_ringtone() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 350. - -*** - -### play\_silence - -#### Signature - -```perl -sub play_silence() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 344. - -*** - -### play\_tts - -#### Signature - -```perl -sub play_tts() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 326. - -*** - -### prompt\_audio - -#### Signature - -```perl -sub prompt_audio() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 436. - -*** - -### prompt\_tts - -#### Signature - -```perl -sub prompt_tts() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 422. - -*** - -### queue\_enter - -#### Signature - -```perl -sub queue_enter() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 295. - -*** - -### queue\_leave - -#### Signature - -```perl -sub queue_leave() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 299. - -*** - -### receive\_fax - -#### Signature - -```perl -sub receive_fax() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 451. - -*** - -### record - -#### Signature - -```perl -sub record() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 359. - -*** - -### refer - -#### Signature - -```perl -sub refer() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 303. - -*** - -### send\_digits - -#### Signature - -```perl -sub send_digits() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 307. - -*** - -### send\_fax - -#### Signature - -```perl -sub send_fax() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 446. - -*** - -### stream - -#### Signature - -```perl -sub stream() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 479. - -*** - -### tap - -#### Signature - -```perl -sub tap() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 475. - -*** - -### transcribe - -#### Signature - -```perl -sub transcribe() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 487. - -*** - -### transfer - -#### Signature - -```perl -sub transfer() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 232. - -*** - -### unhold - -#### Signature - -```perl -sub unhold() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 220. - -*** - -### user\_event - -#### Signature - -```perl -sub user_event() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 291. - -## Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/relay/client/client/index.mdx b/fern/products/sdk-reference/perl/signal-wire/relay/client/client/index.mdx deleted file mode 100644 index e4c0a58849..0000000000 --- a/fern/products/sdk-reference/perl/signal-wire/relay/client/client/index.mdx +++ /dev/null @@ -1,358 +0,0 @@ ---- -slug: "/reference/perl/signal-wire/relay/client/client" -title: "Client" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Relay::Client" - module: "SignalWire.Relay.Client" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm" ---- -# `Client` - -SignalWire::Relay::Client is the Perl port of the Python reference's `RelayClient`. It owns the RELAY WebSocket transport, performs the `signalwire.connect` handshake, runs a synchronous JSON-RPC request/ response loop, demultiplexes server-initiated events into typed SignalWire::Relay::Event objects, and routes them to the right SignalWire::Relay::Call / SignalWire::Relay::Message. - -Construction fails fast: `host` is required and must be a non-empty string; `contexts` must be an arrayref (Moo `isa` constraints). - -**CONNECTION** - -`connect` (open WS + authenticate), `disconnect`, `connect_ws`, `authenticate`, `reconnect`, `disconnect_ws`, and `run` (the blocking read loop). - -**HANDLER REGISTRATION** - -- `on_call($cb)` — `$cb->($call)` for each inbound call. - -- `on_message($cb)` — `$cb->($event)` for each inbound message. - -- `on_event($cb)` — `$cb->($event)` for every event. - -Each callback must be a coderef; each returns `$self` for chaining. - -**LICENSE** - -Copyright (c) 2025 SignalWire. Licensed under the MIT License. - -**RPC AND OPERATIONS** - -- `execute($method, $params)` — issue a JSON-RPC call and block for the result. - -- `dial(%opts)` — place an outbound call; returns the answered SignalWire::Relay::Call. - -- `send_message(%opts)` — send an SMS/MMS; returns a SignalWire::Relay::Message handle. - -- `receive($contexts)` / `unreceive($contexts)` — subscribe / unsubscribe to inbound contexts. Accepts an arrayref (canonical) or a bare list. - -**Synopsis** - -```perl -use SignalWire::Relay::Client; -``` - -```perl -my $client = SignalWire::Relay::Client->new( - host => 'relay.example.com', - project => $project, - token => $token, -); -``` - -```perl -$client->on_call(sub ($call) { $call->answer; }); -$client->connect; # opens WS + authenticates -$client->receive(['office']); # subscribe to inbound contexts -``` - -```perl -my $call = $client->dial( devices => [...] ); # outbound -my $msg = $client->send_message( to_number => $to, - from_number => $from, - body => 'hi' ); -``` - -```perl -$client->run; # block in the event loop -$client->disconnect; -``` - -## Signature - -```perl -package SignalWire::Relay::Client -``` - -## See Also - -- SignalWire::Relay::Call, SignalWire::Relay::Message, SignalWire::Relay::Event, SignalWire::Relay::Constants, and the RELAY protocol guide in porting-sdk/RELAY\_IMPLEMENTATION\_GUIDE.md. - -## Methods - -### authenticate - -#### Signature - -```perl -sub authenticate() -``` - -#### Source - -[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) - -Line 228. - -*** - -### connect - -#### Signature - -```perl -sub connect() -``` - -#### Source - -[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) - -Line 128. - -*** - -### connect\_ws - -#### Signature - -```perl -sub connect_ws() -``` - -#### Source - -[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) - -Line 142. - -*** - -### dial - -#### Signature - -```perl -sub dial() -``` - -#### Source - -[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) - -Line 411. - -*** - -### disconnect - -#### Signature - -```perl -sub disconnect() -``` - -#### Source - -[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) - -Line 138. - -*** - -### disconnect\_ws - -#### Signature - -```perl -sub disconnect_ws() -``` - -#### Source - -[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) - -Line 763. - -*** - -### execute - -#### Signature - -```perl -sub execute() -``` - -#### Source - -[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) - -Line 279. - -*** - -### on\_call - -#### Signature - -```perl -sub on_call() -``` - -#### Source - -[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) - -Line 105. - -*** - -### on\_event - -#### Signature - -```perl -sub on_event() -``` - -#### Source - -[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) - -Line 117. - -*** - -### on\_message - -#### Signature - -```perl -sub on_message() -``` - -#### Source - -[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) - -Line 111. - -*** - -### receive - -#### Signature - -```perl -sub receive($contexts) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) - -Line 372. - -*** - -### reconnect - -#### Signature - -```perl -sub reconnect() -``` - -#### Source - -[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) - -Line 731. - -*** - -### relay\_protocol - -#### Signature - -```perl -sub relay_protocol() -``` - -#### Source - -[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) - -Line 66. - -*** - -### run - -#### Signature - -```perl -sub run() -``` - -#### Source - -[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) - -Line 774. - -*** - -### send\_message - -#### Signature - -```perl -sub send_message() -``` - -#### Source - -[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) - -Line 325. - -*** - -### unreceive - -#### Signature - -```perl -sub unreceive($contexts) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) - -Line 393. - -## Source - -[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/relay/constants/constants/index.mdx b/fern/products/sdk-reference/perl/signal-wire/relay/constants/constants/index.mdx deleted file mode 100644 index 7505ceee74..0000000000 --- a/fern/products/sdk-reference/perl/signal-wire/relay/constants/constants/index.mdx +++ /dev/null @@ -1,76 +0,0 @@ ---- -slug: "/reference/perl/signal-wire/relay/constants/constants" -title: "Constants" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "module" - language: "perl" - qualified_name: "SignalWire::Relay::Constants" - module: "SignalWire.Relay.Constants" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Constants.pm" ---- -# `Constants` - -## Signature - -```perl -package SignalWire::Relay::Constants -``` - -## Constants - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -## Source - -[`lib/SignalWire/Relay/Constants.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Constants.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/relay/device/device/index.mdx b/fern/products/sdk-reference/perl/signal-wire/relay/device/device/index.mdx deleted file mode 100644 index 6dca2a7e61..0000000000 --- a/fern/products/sdk-reference/perl/signal-wire/relay/device/device/index.mdx +++ /dev/null @@ -1,105 +0,0 @@ ---- -slug: "/reference/perl/signal-wire/relay/device/device" -title: "Device" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Relay::Device" - module: "SignalWire.Relay.Device" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Device.pm" ---- -# `Device` - -A RELAY **device** object — the `{ type, params }` pair that names one leg of a dial / connect / refer / tap target. It recurs as a raw hashref across the relay calling layer (`$client->dial(devices => [...])`, `$call->connect` / `$call->refer`, and the `device` field on SignalWire::Relay::Call / the `CallState` / `CallReceive` events). - -This class types the **shape** of that hashref so callers can build one with a constructor and named accessors instead of hand-assembling a nested map. "to\_hash" yields the byte-identical wire hashref the raw form produced, so a `Device` is a drop-in replacement wherever a device hashref is accepted — the existing relay verbs are unchanged (additive, parity-preserving). - -Grounded in `relay-protocol/calling.connect.params.json` and `calling.dial.params.json`, where each device is `{ "type": , "params": }` with `type` required. - -**LICENSE** - -Copyright (c) 2025 SignalWire. Licensed under the MIT License. - -**THE SHAPE IS TYPED; THE DISCRIMINANT IS NOT** - -`type` is kept a plain **string**: the device-type set (`phone`, `sip`, ...) is **not** enumerated in the wire schema (it is an open `{ "type": "string" }`), so turning it into a closed enum would reject valid and forward-compatible values. Per the idiom rule, this class types the **knowable shape** and leaves the **unbounded discriminant** a string. `params` is a per-type arbitrary object, also left untyped. - -Construction fails fast (Moo `isa`): `type` is required and must be a non-empty string; `params` must be a hashref when supplied. - -**TO HASH** - -my $wire = $device->to\_hash; - -Return the canonical RELAY device wire hashref `{ type, params }` — exactly the raw shape the relay verbs already accept. `params` is snapshotted at construction and copied again here, so each emitted hash is independent: mutating one `to_hash` never affects the Device or a later emission, and a mutation of the caller's original hashref after construction does not leak in. - -**TYPE** - -The device type discriminant (e.g. `phone`, `sip`). Required, read-only, a non-empty string. - -**Synopsis** - -```perl -use SignalWire::Relay::Device; -``` - -```perl -my $device = SignalWire::Relay::Device->new( - type => 'phone', - params => { - to_number => '+15551234567', - from_number => '+15557654321', - timeout => 30, - }, -); -``` - -```perl -$device->type; # 'phone' -$device->params; # { to_number => ..., from_number => ..., timeout => 30 } -``` - -```perl -# to_hash yields the exact wire hashref the relay verbs accept: -my $wire = $device->to_hash; -# { type => 'phone', params => { to_number => ..., ... } } -``` - -```perl -# Drop-in for the hand-written hashref in a devices matrix: -$call->connect( devices => [[ $device->to_hash ]] ); -``` - -## Signature - -```perl -package SignalWire::Relay::Device -``` - -## See Also - -- SignalWire::Relay::Call, SignalWire::Relay::Client, SignalWire::Relay::Event. - -## Methods - -### to\_hash - -#### Signature - -```perl -sub to_hash() -``` - -#### Source - -[`lib/SignalWire/Relay/Device.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Device.pm) - -Line 78. - -## Source - -[`lib/SignalWire/Relay/Device.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Device.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/relay/dial-state/dial-state/index.mdx b/fern/products/sdk-reference/perl/signal-wire/relay/dial-state/dial-state/index.mdx deleted file mode 100644 index 61391c367c..0000000000 --- a/fern/products/sdk-reference/perl/signal-wire/relay/dial-state/dial-state/index.mdx +++ /dev/null @@ -1,161 +0,0 @@ ---- -slug: "/reference/perl/signal-wire/relay/dial-state/dial-state" -title: "DialState" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Relay::DialState" - module: "SignalWire.Relay.DialState" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/DialState.pm" ---- -# `DialState` - -The RELAY dial-outcome states, surfaced as typed, named constants. An outbound dial reports progress via the `calling.call.dial` event's `dial_state` field: `dialing` while in progress, then a terminal outcome of `answered` (a leg picked up — the dial succeeded) or `failed` (no leg answered). Each constant's value is the exact wire string the server sends. - -The constants **are** the canonical wire strings, so the dial flow is unchanged: it still compares plain strings (see SignalWire::Relay::Client's dial dispatch, which resolves a pending dial on `answered` and rejects on `failed`). That keeps parity with the Python reference and leaves forward-compatible server states working. - -Grounded in the port's SignalWire::Relay::Constants (`DIAL_STATES` / `DIAL_TERMINAL_STATES`), which are the single source the lists below are derived from. - -**CONSTANTS** - -Exported on request via Exporter; `:all` pulls every state. - -```perl -DIALING => 'dialing' -ANSWERED => 'answered' -FAILED => 'failed' -``` - -**IS STATE** - -my $bool = SignalWire::Relay::DialState->is\_state($value); - -True if `$value` is a known dial state. Returns false (never dies) on `undef` or an unknown/forward-compatible value. - -**IS TERMINAL** - -my $bool = SignalWire::Relay::DialState->is\_terminal($value); - -True if `$value` is a terminal dial state (`answered` or `failed`). Returns false on `undef`, the in-progress `dialing` state, or an unknown value — it never dies, since these mirror server-emitted values that can grow. - -**LICENSE** - -Copyright (c) 2025 SignalWire. Licensed under the MIT License. - -**STATES** - -my $aref = SignalWire::Relay::DialState->states; - -Arrayref of the dial-outcome states, in order. - -**THREE DISTINCT STATE VOCABULARIES** - -CallState, `DialState`, and MessageState are **distinct** sets and must never be conflated. `answered` is a **terminal** `DialState` but a **non-terminal** `CallState` — the same string with opposite terminality, because they are different vocabularies. `failed` is not a `CallState` at all. - -**Synopsis** - -```perl -use SignalWire::Relay::DialState qw(DIALING ANSWERED FAILED); -``` - -```perl -# Named constants and bare wire strings are interchangeable: -$event->dial_state eq ANSWERED; # constant -$event->dial_state eq 'answered'; # string (Python parity) -``` - -```perl -# Membership / terminality (false on unknown — never dies): -SignalWire::Relay::DialState->is_state('dialing'); # 1 -SignalWire::Relay::DialState->is_terminal('answered'); # 1 -SignalWire::Relay::DialState->is_terminal('failed'); # 1 -SignalWire::Relay::DialState->is_terminal('dialing'); # 0 -@{ SignalWire::Relay::DialState->states }; # dialing, answered, failed -``` - -## Signature - -```perl -package SignalWire::Relay::DialState -``` - -## See Also - -- SignalWire::Relay::Client, SignalWire::Relay::Constants, SignalWire::Relay::CallState, SignalWire::Relay::MessageState. - -## Constants - - - - - - - -## Methods - -### is\_state - -#### Signature - -```perl -sub is_state($class, $value) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/Relay/DialState.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/DialState.pm) - -Line 85. - -*** - -### is\_terminal - -#### Signature - -```perl -sub is_terminal($class, $value) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/Relay/DialState.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/DialState.pm) - -Line 95. - -*** - -### states - -#### Signature - -```perl -sub states() -``` - -#### Source - -[`lib/SignalWire/Relay/DialState.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/DialState.pm) - -Line 79. - -## Source - -[`lib/SignalWire/Relay/DialState.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/DialState.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/relay/event/event/index.mdx b/fern/products/sdk-reference/perl/signal-wire/relay/event/event/index.mdx deleted file mode 100644 index f8533454d0..0000000000 --- a/fern/products/sdk-reference/perl/signal-wire/relay/event/event/index.mdx +++ /dev/null @@ -1,86 +0,0 @@ ---- -slug: "/reference/perl/signal-wire/relay/event/event" -title: "Event" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Relay::Event" - module: "SignalWire.Relay.Event" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Event.pm" ---- -# `Event` - -SignalWire::Relay::Event is the base class for every RELAY event the client receives. Each concrete event type is a small read-only Moo subclass that exposes the fields relevant to it (for example `::CallState` carries `call_state` / `end_reason` / `peer`, while `::MessageReceive` carries `from_number` / `body` / `media`). All subclasses inherit `event_type`, `timestamp`, and the raw `params` hashref from the base class. - -The event objects are read-only data carriers built from the server payload; they deliberately carry no `isa` constraints so a forward- compatible server shape is never rejected — unknown fields are simply ignored by Moo. - -**EVENT TYPES** - -The recognised `event_type` strings and their subclasses include the `calling.call.*` family (state, receive, dial, connect, disconnect, play, record, collect, detect, fax, tap, stream, transcribe, pay, send\_digits, refer, ai), `calling.conference`, `messaging.receive` / `messaging.state`, and the `signalwire.*` session events (`authorization.state`, `disconnect`). - -**LICENSE** - -Copyright (c) 2025 SignalWire. Licensed under the MIT License. - -**PARSE EVENT** - -my $event = SignalWire::Relay::Event->parse\_event($event\_type, $params); - -Class-method factory. Looks `$event_type` up in the internal event-class map and returns an instance of the matching subclass, populated from `$params` (which defaults to an empty hashref). Unknown event types fall back to a base SignalWire::Relay::Event carrying the raw type and params. Normally called by SignalWire::Relay::Client as it demultiplexes the WebSocket stream. - -**Synopsis** - -```perl -use SignalWire::Relay::Event; -``` - -```perl -my $event = SignalWire::Relay::Event->parse_event( - 'calling.call.state', - { call_id => $id, call_state => 'answered' }, -); -``` - -```perl -$event->event_type; # 'calling.call.state' -$event->call_state; # 'answered' (on the ::CallState subclass) -``` - -## Signature - -```perl -package SignalWire::Relay::Event -``` - -## Inheritance - -**Extends:** [SignalWire::Relay::Event](/docs/sdk-reference/reference/perl/signal-wire/relay/event/event) - -## See Also - -- SignalWire::Relay::Client, SignalWire::Relay::Call, SignalWire::Relay::Message. - -## Methods - -### parse\_event - -#### Signature - -```perl -sub parse_event() -``` - -#### Source - -[`lib/SignalWire/Relay/Event.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Event.pm) - -Line 259. - -## Source - -[`lib/SignalWire/Relay/Event.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Event.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/relay/message-state/message-state/index.mdx b/fern/products/sdk-reference/perl/signal-wire/relay/message-state/message-state/index.mdx deleted file mode 100644 index 0563168d55..0000000000 --- a/fern/products/sdk-reference/perl/signal-wire/relay/message-state/message-state/index.mdx +++ /dev/null @@ -1,170 +0,0 @@ ---- -slug: "/reference/perl/signal-wire/relay/message-state/message-state" -title: "MessageState" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Relay::MessageState" - module: "SignalWire.Relay.MessageState" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/MessageState.pm" ---- -# `MessageState` - -The RELAY message-delivery states, surfaced as typed, named constants. An outbound SMS moves through `queued` → `initiated` → `sent` and then to a terminal outcome of `delivered`, `undelivered`, or `failed`; `received` is the state of an inbound message. Each constant's value is the exact wire string the server sends in the `messaging.state` event's `message_state` field. - -The constants **are** the canonical wire strings, so nothing about `SignalWire::Relay::Message->state` changes: it still reads and writes a plain string. That keeps parity with the Python reference (bare `str`) and leaves forward-compatible server states working. - -Grounded in the Python reference's `relay/constants.py` (`MESSAGE_STATE_*` / `MESSAGE_TERMINAL_STATES`) and the port's SignalWire::Relay::Constants (`MESSAGE_STATES` / `MESSAGE_TERMINAL_STATES`), which are the single source the lists below are derived from. - -**CONSTANTS** - -Exported on request via Exporter; `:all` pulls every state. - -```perl -QUEUED => 'queued' UNDELIVERED => 'undelivered' -INITIATED => 'initiated' FAILED => 'failed' -SENT => 'sent' RECEIVED => 'received' -DELIVERED => 'delivered' -``` - -**IS STATE** - -my $bool = SignalWire::Relay::MessageState->is\_state($value); - -True if `$value` is a known message state. Returns false (never dies) on `undef` or an unknown/forward-compatible value. - -**IS TERMINAL** - -my $bool = SignalWire::Relay::MessageState->is\_terminal($value); - -True if `$value` is a terminal delivery state (`delivered`, `undelivered`, or `failed`). Returns false on `undef`, an in-flight state, `received`, or an unknown value — it never dies, since these mirror server-emitted values that can grow. - -**LICENSE** - -Copyright (c) 2025 SignalWire. Licensed under the MIT License. - -**STATES** - -my $aref = SignalWire::Relay::MessageState->states; - -Arrayref of the message-delivery states, in order. - -**THREE DISTINCT STATE VOCABULARIES** - -CallState, DialState, and `MessageState` are **distinct** sets and must never be conflated. `failed` is terminal in both `DialState` and `MessageState`, but the sets are otherwise disjoint (`MessageState` has no `dialing`/`answered`; `DialState` has no `delivered`). - -**Synopsis** - -```perl -use SignalWire::Relay::MessageState qw(QUEUED SENT DELIVERED FAILED); -``` - -```perl -# Named constants and bare wire strings are interchangeable: -$msg->state eq DELIVERED; # constant -$msg->state eq 'delivered'; # string (Python parity) -``` - -```perl -# Membership / terminality (false on unknown — never dies): -SignalWire::Relay::MessageState->is_state('sent'); # 1 -SignalWire::Relay::MessageState->is_terminal('delivered'); # 1 -SignalWire::Relay::MessageState->is_terminal('failed'); # 1 -SignalWire::Relay::MessageState->is_terminal('sent'); # 0 -@{ SignalWire::Relay::MessageState->states }; # queued..received -``` - -## Signature - -```perl -package SignalWire::Relay::MessageState -``` - -## See Also - -- SignalWire::Relay::Message, SignalWire::Relay::Constants, SignalWire::Relay::CallState, SignalWire::Relay::DialState. - -## Constants - - - - - - - - - - - - - - - -## Methods - -### is\_state - -#### Signature - -```perl -sub is_state($class, $value) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/Relay/MessageState.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/MessageState.pm) - -Line 88. - -*** - -### is\_terminal - -#### Signature - -```perl -sub is_terminal($class, $value) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/Relay/MessageState.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/MessageState.pm) - -Line 98. - -*** - -### states - -#### Signature - -```perl -sub states() -``` - -#### Source - -[`lib/SignalWire/Relay/MessageState.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/MessageState.pm) - -Line 82. - -## Source - -[`lib/SignalWire/Relay/MessageState.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/MessageState.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/relay/message/message/index.mdx b/fern/products/sdk-reference/perl/signal-wire/relay/message/message/index.mdx deleted file mode 100644 index 7e918acf10..0000000000 --- a/fern/products/sdk-reference/perl/signal-wire/relay/message/message/index.mdx +++ /dev/null @@ -1,212 +0,0 @@ ---- -slug: "/reference/perl/signal-wire/relay/message/message" -title: "Message" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Relay::Message" - module: "SignalWire.Relay.Message" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Message.pm" ---- -# `Message` - -SignalWire::Relay::Message tracks the lifecycle of a single RELAY message. It mirrors the Python reference's message handle: a message is created with a `message_id`, accumulates state from `messaging.state` events via "dispatch\_event", and resolves when it reaches a terminal state (see "MESSAGE\_TERMINAL\_STATES" in SignalWire::Relay::Constants). - -Construction fails fast on bad input: `message_id` must be a non-empty string, `media` / `tags` must be arrayrefs, and `segments` must be a number (Moo `isa` constraints). - -**CURRENT STATE** - -my $state = $msg->current\_state; - -The message's delivery state as the SignalWire::Relay::MessageState-typed view. Returns the same wire string as `state` (the MessageState constants **are** the wire strings); pair it with `SignalWire::Relay::MessageState->is_state` / `->is_terminal`. - -**DISPATCH EVENT** - -$msg->dispatch\_event($event); - -Apply a `messaging.state` event: update `state`/`reason`, fire event listeners, and resolve the message if the new state is terminal. Normally called by SignalWire::Relay::Client, not user code. - -**IS DONE** - -my $bool = $msg->is\_done; - -True once the message has reached a terminal state (the resolved `completed` flag set by "dispatch\_event"). - -**IS TERMINAL** - -my $bool = $msg->is\_terminal; - -True when the message's current `state` string is a terminal delivery state (`delivered`, `undelivered`, or `failed`). Delegates to SignalWire::Relay::MessageState; returns false (never dies) on an unknown/forward-compatible state. Distinct from "is\_done", which reports the resolved `completed` flag rather than classifying the `state` string. - -**LICENSE** - -Copyright (c) 2025 SignalWire. Licensed under the MIT License. - -**ON** - -$msg->on($cb); # returns $self - -Register a per-event listener invoked as `$cb->($msg, $event)` for every dispatched event. The callback must be a coderef. - -**ON COMPLETED** - -$msg->on\_completed($cb); # register; returns $self -my $cb = $msg->on\_completed; # no-arg: get the registered callback - -Register a callback invoked once with `$msg` when the message completes. If the message is already complete, the callback fires immediately. The callback must be a coderef. - -**WAIT** - -my $result = $msg->wait( timeout => 30 ); - -Block (polling) until the message completes or `timeout` seconds elapse (default 30), then return the terminal event. - -**Synopsis** - -```perl -use SignalWire::Relay::Message; -``` - -```perl -my $msg = SignalWire::Relay::Message->new( message_id => $id ); -``` - -```perl -$msg->on_completed(sub ($m) { print "final state: ", $m->state, "\n"; }); -$msg->on(sub ($m, $event) { ... }); # per-event listener -``` - -```perl -my $final = $msg->wait( timeout => 30 ); # blocks until terminal -``` - -## Signature - -```perl -package SignalWire::Relay::Message -``` - -## See Also - -- SignalWire::Relay::Client, SignalWire::Relay::Event, SignalWire::Relay::Constants, SignalWire::Relay::MessageState. - -## Methods - -### current\_state - -#### Signature - -```perl -sub current_state() -``` - -#### Source - -[`lib/SignalWire/Relay/Message.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Message.pm) - -Line 67. - -*** - -### dispatch\_event - -#### Signature - -```perl -sub dispatch_event() -``` - -#### Source - -[`lib/SignalWire/Relay/Message.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Message.pm) - -Line 115. - -*** - -### is\_done - -#### Signature - -```perl -sub is_done() -``` - -#### Source - -[`lib/SignalWire/Relay/Message.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Message.pm) - -Line 53. - -*** - -### is\_terminal - -#### Signature - -```perl -sub is_terminal() -``` - -#### Source - -[`lib/SignalWire/Relay/Message.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Message.pm) - -Line 79. - -*** - -### on - -#### Signature - -```perl -sub on() -``` - -#### Source - -[`lib/SignalWire/Relay/Message.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Message.pm) - -Line 98. - -*** - -### on\_completed - -#### Signature - -```perl -sub on_completed() -``` - -#### Source - -[`lib/SignalWire/Relay/Message.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Message.pm) - -Line 84. - -*** - -### wait - -#### Signature - -```perl -sub wait() -``` - -#### Source - -[`lib/SignalWire/Relay/Message.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Message.pm) - -Line 105. - -## Source - -[`lib/SignalWire/Relay/Message.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Message.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/rest/http-client/http-client/index.mdx b/fern/products/sdk-reference/perl/signal-wire/rest/http-client/http-client/index.mdx deleted file mode 100644 index 78a9104ba5..0000000000 --- a/fern/products/sdk-reference/perl/signal-wire/rest/http-client/http-client/index.mdx +++ /dev/null @@ -1,134 +0,0 @@ ---- -slug: "/reference/perl/signal-wire/rest/http-client/http-client" -title: "HttpClient" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::REST::HttpClient" - module: "SignalWire.REST.HttpClient" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/HttpClient.pm" ---- -# `HttpClient` - -## Signature - -```perl -package SignalWire::REST::HttpClient -``` - -## Methods - -### delete\_request - -#### Signature - -```perl -sub delete_request($path) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/HttpClient.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/HttpClient.pm) - -Line 127. - -*** - -### get - -#### Signature - -```perl -sub get($path, %opts) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/HttpClient.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/HttpClient.pm) - -Line 107. - -*** - -### patch - -#### Signature - -```perl -sub patch($path, %opts) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/HttpClient.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/HttpClient.pm) - -Line 122. - -*** - -### post - -#### Signature - -```perl -sub post($path, %opts) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/HttpClient.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/HttpClient.pm) - -Line 112. - -*** - -### put - -#### Signature - -```perl -sub put($path, %opts) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/HttpClient.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/HttpClient.pm) - -Line 117. - -## Source - -[`lib/SignalWire/REST/HttpClient.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/HttpClient.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/base/base/index.mdx b/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/base/base/index.mdx deleted file mode 100644 index 4dbf5d43c9..0000000000 --- a/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/base/base/index.mdx +++ /dev/null @@ -1,132 +0,0 @@ ---- -slug: "/reference/perl/signal-wire/rest/namespaces/base/base" -title: "Base" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::REST::Namespaces::Base" - module: "SignalWire.REST.Namespaces.Base" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Base.pm" ---- -# `Base` - -## Signature - -```perl -package SignalWire::REST::Namespaces::Base -``` - -## Inheritance - -**Extends:** [SignalWire::REST::Namespaces::Base](/docs/sdk-reference/reference/perl/signal-wire/rest/namespaces/base/base) - -## Methods - -### create - -#### Signature - -```perl -sub create(%kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Base.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Base.pm) - -Line 29. - -*** - -### delete\_resource - -#### Signature - -```perl -sub delete_resource($resource_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Base.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Base.pm) - -Line 45. - -*** - -### get - -#### Signature - -```perl -sub get($resource_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Base.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Base.pm) - -Line 34. - -*** - -### list - -#### Signature - -```perl -sub list(@params) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Base.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Base.pm) - -Line 23. - -*** - -### update - -#### Signature - -```perl -sub update($resource_id, %kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Base.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Base.pm) - -Line 39. - -## Source - -[`lib/SignalWire/REST/Namespaces/Base.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Base.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/calling/calling/index.mdx b/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/calling/calling/index.mdx deleted file mode 100644 index 359396007a..0000000000 --- a/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/calling/calling/index.mdx +++ /dev/null @@ -1,952 +0,0 @@ ---- -slug: "/reference/perl/signal-wire/rest/namespaces/calling/calling" -title: "Calling" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::REST::Namespaces::Calling" - module: "SignalWire.REST.Namespaces.Calling" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm" ---- -# `Calling` - -## Signature - -```perl -package SignalWire::REST::Namespaces::Calling -``` - -## Inheritance - -**Extends:** [SignalWire::REST::Namespaces::Base](/docs/sdk-reference/reference/perl/signal-wire/rest/namespaces/base/base) - -## Methods - -### ai\_hold - -#### Signature - -```perl -sub ai_hold($s, $id, @p) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 71. - -*** - -### ai\_message - -#### Signature - -```perl -sub ai_message($s, $id, @p) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 70. - -*** - -### ai\_stop - -#### Signature - -```perl -sub ai_stop($s, $id, @p) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 73. - -*** - -### ai\_unhold - -#### Signature - -```perl -sub ai_unhold($s, $id, @p) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 72. - -*** - -### BUILD - -#### Signature - -```perl -sub BUILD() -``` - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 9. - -*** - -### collect - -#### Signature - -```perl -sub collect($s, $id, @p) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 45. - -*** - -### collect\_start\_input\_timers - -#### Signature - -```perl -sub collect_start_input_timers($s, $id, @p) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 47. - -*** - -### collect\_stop - -#### Signature - -```perl -sub collect_stop($s, $id, @p) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 46. - -*** - -### denoise - -#### Signature - -```perl -sub denoise($s, $id, @p) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 62. - -*** - -### denoise\_stop - -#### Signature - -```perl -sub denoise_stop($s, $id, @p) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 63. - -*** - -### detect - -#### Signature - -```perl -sub detect($s, $id, @p) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 50. - -*** - -### detect\_stop - -#### Signature - -```perl -sub detect_stop($s, $id, @p) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 51. - -*** - -### dial - -#### Signature - -```perl -sub dial($s, @p) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 22. - -*** - -### disconnect - -#### Signature - -```perl -sub disconnect($s, $id, @p) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 29. - -*** - -### end - -#### Signature - -```perl -sub end($s, $id, @p) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 27. - -*** - -### live\_transcribe - -#### Signature - -```perl -sub live_transcribe($s, $id, @p) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 76. - -*** - -### live\_translate - -#### Signature - -```perl -sub live_translate($s, $id, @p) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 77. - -*** - -### play - -#### Signature - -```perl -sub play($s, $id, @p) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 32. - -*** - -### play\_pause - -#### Signature - -```perl -sub play_pause($s, $id, @p) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 33. - -*** - -### play\_resume - -#### Signature - -```perl -sub play_resume($s, $id, @p) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 34. - -*** - -### play\_stop - -#### Signature - -```perl -sub play_stop($s, $id, @p) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 35. - -*** - -### play\_volume - -#### Signature - -```perl -sub play_volume($s, $id, @p) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 36. - -*** - -### receive\_fax\_stop - -#### Signature - -```perl -sub receive_fax_stop($s, $id, @p) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 81. - -*** - -### record - -#### Signature - -```perl -sub record($s, $id, @p) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 39. - -*** - -### record\_pause - -#### Signature - -```perl -sub record_pause($s, $id, @p) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 40. - -*** - -### record\_resume - -#### Signature - -```perl -sub record_resume($s, $id, @p) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 41. - -*** - -### record\_stop - -#### Signature - -```perl -sub record_stop($s, $id, @p) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 42. - -*** - -### refer - -#### Signature - -```perl -sub refer($s, $id, @p) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 84. - -*** - -### send\_fax\_stop - -#### Signature - -```perl -sub send_fax_stop($s, $id, @p) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 80. - -*** - -### stream - -#### Signature - -```perl -sub stream($s, $id, @p) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 58. - -*** - -### stream\_stop - -#### Signature - -```perl -sub stream_stop($s, $id, @p) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 59. - -*** - -### tap - -#### Signature - -```perl -sub tap($s, $id, @p) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 54. - -*** - -### tap\_stop - -#### Signature - -```perl -sub tap_stop($s, $id, @p) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 55. - -*** - -### transcribe - -#### Signature - -```perl -sub transcribe($s, $id, @p) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 66. - -*** - -### transcribe\_stop - -#### Signature - -```perl -sub transcribe_stop($s, $id, @p) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 67. - -*** - -### transfer - -#### Signature - -```perl -sub transfer($s, $id, @p) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 28. - -*** - -### update - -#### Signature - -```perl -sub update($s, @p) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 25. - -*** - -### update\_call - -#### Signature - -```perl -sub update_call($s, @p) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 26. - -*** - -### user\_event - -#### Signature - -```perl -sub user_event($s, $id, @p) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 87. - -## Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/chat/chat/index.mdx b/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/chat/chat/index.mdx deleted file mode 100644 index 87787665e1..0000000000 --- a/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/chat/chat/index.mdx +++ /dev/null @@ -1,50 +0,0 @@ ---- -slug: "/reference/perl/signal-wire/rest/namespaces/chat/chat" -title: "Chat" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::REST::Namespaces::Chat" - module: "SignalWire.REST.Namespaces.Chat" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Chat.pm" ---- -# `Chat` - -## Signature - -```perl -package SignalWire::REST::Namespaces::Chat -``` - -## Inheritance - -**Extends:** [SignalWire::REST::Namespaces::Base](/docs/sdk-reference/reference/perl/signal-wire/rest/namespaces/base/base) - -## Methods - -### create\_token - -#### Signature - -```perl -sub create_token(%kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Chat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Chat.pm) - -Line 7. - -## Source - -[`lib/SignalWire/REST/Namespaces/Chat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Chat.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/compat/compat/index.mdx b/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/compat/compat/index.mdx deleted file mode 100644 index 7f69fcc1b8..0000000000 --- a/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/compat/compat/index.mdx +++ /dev/null @@ -1,1272 +0,0 @@ ---- -slug: "/reference/perl/signal-wire/rest/namespaces/compat/compat" -title: "Compat" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::REST::Namespaces::Compat" - module: "SignalWire.REST.Namespaces.Compat" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm" ---- -# `Compat` - -## Signature - -```perl -package SignalWire::REST::Namespaces::Compat -``` - -## Inheritance - -**Extends:** [SignalWire::REST::Namespaces::Base](/docs/sdk-reference/reference/perl/signal-wire/rest/namespaces/base/base), `SignalWire::REST::Namespaces::CrudResource` - -## Methods - -### create - -#### Signature - -```perl -sub create(%kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 17. - -*** - -### create - -#### Signature - -```perl -sub create(%kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 361. - -*** - -### delete - -#### Signature - -```perl -sub delete($sid) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 227. - -*** - -### delete - -#### Signature - -```perl -sub delete($sid) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 324. - -*** - -### delete - -#### Signature - -```perl -sub delete($sid) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 351. - -*** - -### delete - -#### Signature - -```perl -sub delete($token_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 377. - -*** - -### delete\_media - -#### Signature - -```perl -sub delete_media($message_sid, $media_sid) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 83. - -*** - -### delete\_media - -#### Signature - -```perl -sub delete_media($fax_sid, $media_sid) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 109. - -*** - -### delete\_number - -#### Signature - -```perl -sub delete_number($sid) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 221. - -*** - -### delete\_recording - -#### Signature - -```perl -sub delete_recording($conference_sid, $recording_sid) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 172. - -*** - -### delete\_recording - -#### Signature - -```perl -sub delete_recording($sid) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 318. - -*** - -### delete\_token - -#### Signature - -```perl -sub delete_token($token_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 371. - -*** - -### delete\_transcription - -#### Signature - -```perl -sub delete_transcription($sid) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 345. - -*** - -### dequeue\_member - -#### Signature - -```perl -sub dequeue_member($queue_sid, $call_sid, %kwargs) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 297. - -*** - -### get - -#### Signature - -```perl -sub get($sid) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 22. - -*** - -### get - -#### Signature - -```perl -sub get($sid) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 125. - -*** - -### get - -#### Signature - -```perl -sub get($sid) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 211. - -*** - -### get - -#### Signature - -```perl -sub get($sid) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 313. - -*** - -### get - -#### Signature - -```perl -sub get($sid) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 340. - -*** - -### get\_media - -#### Signature - -```perl -sub get_media($message_sid, $media_sid) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 78. - -*** - -### get\_media - -#### Signature - -```perl -sub get_media($fax_sid, $media_sid) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 104. - -*** - -### get\_member - -#### Signature - -```perl -sub get_member($queue_sid, $call_sid) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 292. - -*** - -### get\_participant - -#### Signature - -```perl -sub get_participant($conference_sid, $call_sid) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 141. - -*** - -### get\_recording - -#### Signature - -```perl -sub get_recording($conference_sid, $recording_sid) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 162. - -*** - -### import\_number - -#### Signature - -```perl -sub import_number(%kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 232. - -*** - -### list - -#### Signature - -```perl -sub list(@params) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 11. - -*** - -### list - -#### Signature - -```perl -sub list(@params) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 119. - -*** - -### list - -#### Signature - -```perl -sub list(@params) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 200. - -*** - -### list - -#### Signature - -```perl -sub list(@params) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 307. - -*** - -### list - -#### Signature - -```perl -sub list(@params) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 334. - -*** - -### list\_available\_countries - -#### Signature - -```perl -sub list_available_countries(@params) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 238. - -*** - -### list\_media - -#### Signature - -```perl -sub list_media($message_sid, @params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 72. - -*** - -### list\_media - -#### Signature - -```perl -sub list_media($fax_sid, @params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 98. - -*** - -### list\_members - -#### Signature - -```perl -sub list_members($queue_sid, @params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 286. - -*** - -### list\_participants - -#### Signature - -```perl -sub list_participants($conference_sid, @params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 135. - -*** - -### list\_recordings - -#### Signature - -```perl -sub list_recordings($conference_sid, @params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 156. - -*** - -### purchase - -#### Signature - -```perl -sub purchase(%kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 206. - -*** - -### remove\_participant - -#### Signature - -```perl -sub remove_participant($conference_sid, $call_sid) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 151. - -*** - -### search\_local - -#### Signature - -```perl -sub search_local($country, @params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 244. - -*** - -### search\_toll\_free - -#### Signature - -```perl -sub search_toll_free($country, @params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 250. - -*** - -### start\_recording - -#### Signature - -```perl -sub start_recording($call_sid, %kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 42. - -*** - -### start\_stream - -#### Signature - -```perl -sub start_stream($call_sid, %kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 52. - -*** - -### start\_stream - -#### Signature - -```perl -sub start_stream($conference_sid, %kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 177. - -*** - -### stop\_stream - -#### Signature - -```perl -sub stop_stream($call_sid, $stream_sid, %kwargs) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 57. - -*** - -### stop\_stream - -#### Signature - -```perl -sub stop_stream($conference_sid, $stream_sid, %kwargs) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 182. - -*** - -### update - -#### Signature - -```perl -sub update($sid, %kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 27. - -*** - -### update - -#### Signature - -```perl -sub update($sid, %kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 37. - -*** - -### update - -#### Signature - -```perl -sub update($sid, %kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 67. - -*** - -### update - -#### Signature - -```perl -sub update($sid, %kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 93. - -*** - -### update - -#### Signature - -```perl -sub update($sid, %kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 130. - -*** - -### update - -#### Signature - -```perl -sub update($sid, %kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 216. - -*** - -### update - -#### Signature - -```perl -sub update($sid, %kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 261. - -*** - -### update - -#### Signature - -```perl -sub update($sid, %kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 271. - -*** - -### update - -#### Signature - -```perl -sub update($sid, %kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 281. - -*** - -### update - -#### Signature - -```perl -sub update($token_id, %kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 366. - -*** - -### update\_participant - -#### Signature - -```perl -sub update_participant($conference_sid, $call_sid, %kwargs) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 146. - -*** - -### update\_recording - -#### Signature - -```perl -sub update_recording($call_sid, $recording_sid, %kwargs) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 47. - -*** - -### update\_recording - -#### Signature - -```perl -sub update_recording($conference_sid, $recording_sid, %kwargs) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 167. - -## Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/datasphere/datasphere/index.mdx b/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/datasphere/datasphere/index.mdx deleted file mode 100644 index 24251d37e2..0000000000 --- a/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/datasphere/datasphere/index.mdx +++ /dev/null @@ -1,116 +0,0 @@ ---- -slug: "/reference/perl/signal-wire/rest/namespaces/datasphere/datasphere" -title: "Datasphere" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::REST::Namespaces::Datasphere" - module: "SignalWire.REST.Namespaces.Datasphere" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Datasphere.pm" ---- -# `Datasphere` - -## Signature - -```perl -package SignalWire::REST::Namespaces::Datasphere -``` - -## Inheritance - -**Extends:** `SignalWire::REST::Namespaces::CrudResource` - -## Methods - -### delete\_chunk - -#### Signature - -```perl -sub delete_chunk($document_id, $chunk_id) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Datasphere.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Datasphere.pm) - -Line 27. - -*** - -### get\_chunk - -#### Signature - -```perl -sub get_chunk($document_id, $chunk_id) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Datasphere.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Datasphere.pm) - -Line 22. - -*** - -### list\_chunks - -#### Signature - -```perl -sub list_chunks($document_id, @params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Datasphere.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Datasphere.pm) - -Line 16. - -*** - -### search - -#### Signature - -```perl -sub search(%kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Datasphere.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Datasphere.pm) - -Line 11. - -## Source - -[`lib/SignalWire/REST/Namespaces/Datasphere.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Datasphere.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/fabric/fabric/index.mdx b/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/fabric/fabric/index.mdx deleted file mode 100644 index e9e9656fca..0000000000 --- a/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/fabric/fabric/index.mdx +++ /dev/null @@ -1,578 +0,0 @@ ---- -slug: "/reference/perl/signal-wire/rest/namespaces/fabric/fabric" -title: "Fabric" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::REST::Namespaces::Fabric" - module: "SignalWire.REST.Namespaces.Fabric" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm" ---- -# `Fabric` - -## Signature - -```perl -package SignalWire::REST::Namespaces::Fabric -``` - -## Inheritance - -**Extends:** `SignalWire::REST::Namespaces::CrudResource`, `SignalWire::REST::Namespaces::Fabric::Resource`, `SignalWire::REST::Namespaces::Fabric::AutoMaterializedWebhook`, `SignalWire::REST::Namespaces::Fabric::ResourcePUT`, [SignalWire::REST::Namespaces::Base](/docs/sdk-reference/reference/perl/signal-wire/rest/namespaces/base/base) - -## Methods - -### assign\_domain\_application - -#### Signature - -```perl -sub assign_domain_application($resource_id, %kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) - -Line 189. - -*** - -### assign\_phone\_route - -#### Signature - -```perl -sub assign_phone_route($resource_id, %kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) - -Line 177. - -*** - -### create - -#### Signature - -```perl -sub create(%kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) - -Line 32. - -*** - -### create - -#### Signature - -```perl -sub create(%kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) - -Line 139. - -*** - -### create\_embed\_token - -#### Signature - -```perl -sub create_embed_token(%kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) - -Line 235. - -*** - -### create\_guest\_token - -#### Signature - -```perl -sub create_guest_token(%kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) - -Line 230. - -*** - -### create\_invite\_token - -#### Signature - -```perl -sub create_invite_token(%kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) - -Line 225. - -*** - -### create\_sip\_endpoint - -#### Signature - -```perl -sub create_sip_endpoint($subscriber_id, %kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) - -Line 114. - -*** - -### create\_subscriber\_token - -#### Signature - -```perl -sub create_subscriber_token(%kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) - -Line 215. - -*** - -### delete - -#### Signature - -```perl -sub delete($resource_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) - -Line 166. - -*** - -### delete\_resource - -#### Signature - -```perl -sub delete_resource($resource_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) - -Line 160. - -*** - -### delete\_sip\_endpoint - -#### Signature - -```perl -sub delete_sip_endpoint($subscriber_id, $endpoint_id) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) - -Line 129. - -*** - -### deploy\_version - -#### Signature - -```perl -sub deploy_version($resource_id, %kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) - -Line 85. - -*** - -### get - -#### Signature - -```perl -sub get($resource_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) - -Line 155. - -*** - -### get - -#### Signature - -```perl -sub get($address_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) - -Line 205. - -*** - -### get\_sip\_endpoint - -#### Signature - -```perl -sub get_sip_endpoint($subscriber_id, $endpoint_id) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) - -Line 119. - -*** - -### list - -#### Signature - -```perl -sub list(@params) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) - -Line 149. - -*** - -### list - -#### Signature - -```perl -sub list(@params) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) - -Line 199. - -*** - -### list\_addresses - -#### Signature - -```perl -sub list_addresses($resource_id, @params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) - -Line 12. - -*** - -### list\_addresses - -#### Signature - -```perl -sub list_addresses($resource_id, @params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) - -Line 71. - -*** - -### list\_addresses - -#### Signature - -```perl -sub list_addresses($resource_id, @params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) - -Line 96. - -*** - -### list\_addresses - -#### Signature - -```perl -sub list_addresses($resource_id, @params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) - -Line 171. - -*** - -### list\_sip\_endpoints - -#### Signature - -```perl -sub list_sip_endpoints($subscriber_id, @params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) - -Line 108. - -*** - -### list\_versions - -#### Signature - -```perl -sub list_versions($resource_id, @params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) - -Line 78. - -*** - -### refresh\_subscriber\_token - -#### Signature - -```perl -sub refresh_subscriber_token(%kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) - -Line 220. - -*** - -### update\_sip\_endpoint - -#### Signature - -```perl -sub update_sip_endpoint($subscriber_id, $endpoint_id, %kwargs) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) - -Line 124. - -## Source - -[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/logs/logs/index.mdx b/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/logs/logs/index.mdx deleted file mode 100644 index 3870e0cde7..0000000000 --- a/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/logs/logs/index.mdx +++ /dev/null @@ -1,192 +0,0 @@ ---- -slug: "/reference/perl/signal-wire/rest/namespaces/logs/logs" -title: "Logs" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::REST::Namespaces::Logs" - module: "SignalWire.REST.Namespaces.Logs" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Logs.pm" ---- -# `Logs` - -## Signature - -```perl -package SignalWire::REST::Namespaces::Logs -``` - -## Inheritance - -**Extends:** [SignalWire::REST::Namespaces::Base](/docs/sdk-reference/reference/perl/signal-wire/rest/namespaces/base/base) - -## Methods - -### get - -#### Signature - -```perl -sub get($log_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Logs.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Logs.pm) - -Line 17. - -*** - -### get - -#### Signature - -```perl -sub get($log_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Logs.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Logs.pm) - -Line 33. - -*** - -### get - -#### Signature - -```perl -sub get($log_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Logs.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Logs.pm) - -Line 55. - -*** - -### list - -#### Signature - -```perl -sub list(@params) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Logs.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Logs.pm) - -Line 11. - -*** - -### list - -#### Signature - -```perl -sub list(@params) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Logs.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Logs.pm) - -Line 27. - -*** - -### list - -#### Signature - -```perl -sub list(@params) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Logs.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Logs.pm) - -Line 49. - -*** - -### list - -#### Signature - -```perl -sub list(@params) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Logs.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Logs.pm) - -Line 65. - -*** - -### list\_events - -#### Signature - -```perl -sub list_events($log_id, @params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Logs.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Logs.pm) - -Line 38. - -## Source - -[`lib/SignalWire/REST/Namespaces/Logs.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Logs.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/phone-numbers/phone-numbers/index.mdx b/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/phone-numbers/phone-numbers/index.mdx deleted file mode 100644 index d32827a5e5..0000000000 --- a/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/phone-numbers/phone-numbers/index.mdx +++ /dev/null @@ -1,236 +0,0 @@ ---- -slug: "/reference/perl/signal-wire/rest/namespaces/phone-numbers/phone-numbers" -title: "PhoneNumbers" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::REST::Namespaces::PhoneNumbers" - module: "SignalWire.REST.Namespaces.PhoneNumbers" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/PhoneNumbers.pm" ---- -# `PhoneNumbers` - -Supports the standard CRUD surface plus typed helpers for binding an inbound call to a handler (SWML webhook, cXML webhook, AI agent, call flow, RELAY application/topic). The binding model is: set `call_handler` plus the handler-specific companion field on the phone number; the server auto-materializes the matching Fabric resource. See SignalWire::REST::PhoneCallHandler for the enum. - -**HELPERS** - -- set\_swml\_webhook($sid, url => $url) - - Route inbound calls to an SWML webhook URL. Your backend returns an SWML document per call. The server auto-creates a `swml_webhook` Fabric resource keyed off this URL. - -- set\_cxml\_webhook($sid, url => $url, fallback\_url => $f?, status\_callback\_url => $s?) - - Route inbound calls to a cXML (Twilio-compat / LAML) webhook. Despite the wire value `laml_webhooks` being plural, this creates a single `cxml_webhook` Fabric resource. - -- set\_cxml\_application($sid, application\_id => $id) - - Route inbound calls to an existing cXML application by ID. - -- set\_ai\_agent($sid, agent\_id => $id) - - Route inbound calls to an AI Agent Fabric resource by ID. - -- set\_call\_flow($sid, flow\_id => $id, version => $v?) - - Route inbound calls to a Call Flow by ID. `version` accepts `working_copy` or `current_deployed` (server default when omitted). - -- set\_relay\_application($sid, name => $name) - - Route inbound calls to a named RELAY application. - -- set\_relay\_topic($sid, topic => $topic, status\_callback\_url => $s?) - - Route inbound calls to a RELAY topic (client subscription). - -## Signature - -```perl -package SignalWire::REST::Namespaces::PhoneNumbers -``` - -## Inheritance - -**Extends:** `SignalWire::REST::Namespaces::CrudResource` - -## Methods - -### search - -#### Signature - -```perl -sub search(@params) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/PhoneNumbers.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/PhoneNumbers.pm) - -Line 11. - -*** - -### set\_ai\_agent - -#### Signature - -```perl -sub set_ai_agent($resource_id, @args) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/PhoneNumbers.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/PhoneNumbers.pm) - -Line 65. - -*** - -### set\_call\_flow - -#### Signature - -```perl -sub set_call_flow($resource_id, @args) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/PhoneNumbers.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/PhoneNumbers.pm) - -Line 77. - -*** - -### set\_cxml\_application - -#### Signature - -```perl -sub set_cxml_application($resource_id, @args) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/PhoneNumbers.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/PhoneNumbers.pm) - -Line 53. - -*** - -### set\_cxml\_webhook - -#### Signature - -```perl -sub set_cxml_webhook($resource_id, @args) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/PhoneNumbers.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/PhoneNumbers.pm) - -Line 36. - -*** - -### set\_relay\_application - -#### Signature - -```perl -sub set_relay_application($resource_id, @args) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/PhoneNumbers.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/PhoneNumbers.pm) - -Line 92. - -*** - -### set\_relay\_topic - -#### Signature - -```perl -sub set_relay_topic($resource_id, @args) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/PhoneNumbers.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/PhoneNumbers.pm) - -Line 104. - -*** - -### set\_swml\_webhook - -#### Signature - -```perl -sub set_swml_webhook($resource_id, @args) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/PhoneNumbers.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/PhoneNumbers.pm) - -Line 24. - -## Source - -[`lib/SignalWire/REST/Namespaces/PhoneNumbers.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/PhoneNumbers.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/project/project/index.mdx b/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/project/project/index.mdx deleted file mode 100644 index fa71c80606..0000000000 --- a/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/project/project/index.mdx +++ /dev/null @@ -1,112 +0,0 @@ ---- -slug: "/reference/perl/signal-wire/rest/namespaces/project/project" -title: "Project" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::REST::Namespaces::Project" - module: "SignalWire.REST.Namespaces.Project" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Project.pm" ---- -# `Project` - -## Signature - -```perl -package SignalWire::REST::Namespaces::Project -``` - -## Inheritance - -**Extends:** [SignalWire::REST::Namespaces::Base](/docs/sdk-reference/reference/perl/signal-wire/rest/namespaces/base/base) - -## Methods - -### create - -#### Signature - -```perl -sub create(%kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Project.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Project.pm) - -Line 11. - -*** - -### delete - -#### Signature - -```perl -sub delete($token_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Project.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Project.pm) - -Line 27. - -*** - -### delete\_token - -#### Signature - -```perl -sub delete_token($token_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Project.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Project.pm) - -Line 21. - -*** - -### update - -#### Signature - -```perl -sub update($token_id, %kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Project.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Project.pm) - -Line 16. - -## Source - -[`lib/SignalWire/REST/Namespaces/Project.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Project.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/pub-sub/pub-sub/index.mdx b/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/pub-sub/pub-sub/index.mdx deleted file mode 100644 index 7ee811fdb0..0000000000 --- a/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/pub-sub/pub-sub/index.mdx +++ /dev/null @@ -1,50 +0,0 @@ ---- -slug: "/reference/perl/signal-wire/rest/namespaces/pub-sub/pub-sub" -title: "PubSub" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::REST::Namespaces::PubSub" - module: "SignalWire.REST.Namespaces.PubSub" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/PubSub.pm" ---- -# `PubSub` - -## Signature - -```perl -package SignalWire::REST::Namespaces::PubSub -``` - -## Inheritance - -**Extends:** [SignalWire::REST::Namespaces::Base](/docs/sdk-reference/reference/perl/signal-wire/rest/namespaces/base/base) - -## Methods - -### create\_token - -#### Signature - -```perl -sub create_token(%kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/PubSub.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/PubSub.pm) - -Line 7. - -## Source - -[`lib/SignalWire/REST/Namespaces/PubSub.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/PubSub.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/registry/registry/index.mdx b/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/registry/registry/index.mdx deleted file mode 100644 index cbd2a2db86..0000000000 --- a/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/registry/registry/index.mdx +++ /dev/null @@ -1,302 +0,0 @@ ---- -slug: "/reference/perl/signal-wire/rest/namespaces/registry/registry" -title: "Registry" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::REST::Namespaces::Registry" - module: "SignalWire.REST.Namespaces.Registry" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm" ---- -# `Registry` - -## Signature - -```perl -package SignalWire::REST::Namespaces::Registry -``` - -## Inheritance - -**Extends:** [SignalWire::REST::Namespaces::Base](/docs/sdk-reference/reference/perl/signal-wire/rest/namespaces/base/base) - -## Methods - -### create - -#### Signature - -```perl -sub create(%kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Registry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm) - -Line 17. - -*** - -### create\_campaign - -#### Signature - -```perl -sub create_campaign($brand_id, %kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Registry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm) - -Line 33. - -*** - -### create\_order - -#### Signature - -```perl -sub create_order($campaign_id, %kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Registry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm) - -Line 65. - -*** - -### delete - -#### Signature - -```perl -sub delete($number_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Registry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm) - -Line 91. - -*** - -### delete\_number - -#### Signature - -```perl -sub delete_number($number_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Registry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm) - -Line 85. - -*** - -### get - -#### Signature - -```perl -sub get($brand_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Registry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm) - -Line 22. - -*** - -### get - -#### Signature - -```perl -sub get($campaign_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Registry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm) - -Line 43. - -*** - -### get - -#### Signature - -```perl -sub get($order_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Registry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm) - -Line 75. - -*** - -### list - -#### Signature - -```perl -sub list(@params) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Registry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm) - -Line 11. - -*** - -### list\_campaigns - -#### Signature - -```perl -sub list_campaigns($brand_id, @params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Registry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm) - -Line 27. - -*** - -### list\_numbers - -#### Signature - -```perl -sub list_numbers($campaign_id, @params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Registry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm) - -Line 53. - -*** - -### list\_orders - -#### Signature - -```perl -sub list_orders($campaign_id, @params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Registry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm) - -Line 59. - -*** - -### update - -#### Signature - -```perl -sub update($campaign_id, %kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Registry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm) - -Line 48. - -## Source - -[`lib/SignalWire/REST/Namespaces/Registry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/resources/resources/index.mdx b/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/resources/resources/index.mdx deleted file mode 100644 index 89b7faabc6..0000000000 --- a/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/resources/resources/index.mdx +++ /dev/null @@ -1,582 +0,0 @@ ---- -slug: "/reference/perl/signal-wire/rest/namespaces/resources/resources" -title: "Resources" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::REST::Namespaces::Resources" - module: "SignalWire.REST.Namespaces.Resources" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm" ---- -# `Resources` - -## Signature - -```perl -package SignalWire::REST::Namespaces::Resources -``` - -## Inheritance - -**Extends:** [SignalWire::REST::Namespaces::Base](/docs/sdk-reference/reference/perl/signal-wire/rest/namespaces/base/base), `SignalWire::REST::Namespaces::CrudResource` - -## Methods - -### add\_membership - -#### Signature - -```perl -sub add_membership($group_id, %kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) - -Line 93. - -*** - -### call - -#### Signature - -```perl -sub call(%kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) - -Line 191. - -*** - -### create - -#### Signature - -```perl -sub create(%kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) - -Line 17. - -*** - -### create - -#### Signature - -```perl -sub create(%kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) - -Line 176. - -*** - -### delete - -#### Signature - -```perl -sub delete($address_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) - -Line 27. - -*** - -### delete - -#### Signature - -```perl -sub delete($recording_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) - -Line 76. - -*** - -### delete\_membership - -#### Signature - -```perl -sub delete_membership($membership_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) - -Line 103. - -*** - -### delete\_recording - -#### Signature - -```perl -sub delete_recording($recording_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) - -Line 70. - -*** - -### get - -#### Signature - -```perl -sub get($address_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) - -Line 22. - -*** - -### get - -#### Signature - -```perl -sub get($recording_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) - -Line 65. - -*** - -### get - -#### Signature - -```perl -sub get() -``` - -#### Source - -[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) - -Line 129. - -*** - -### get - -#### Signature - -```perl -sub get($short_code_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) - -Line 161. - -*** - -### get\_member - -#### Signature - -```perl -sub get_member($queue_id, $member_id) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) - -Line 49. - -*** - -### get\_membership - -#### Signature - -```perl -sub get_membership($membership_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) - -Line 98. - -*** - -### get\_next\_member - -#### Signature - -```perl -sub get_next_member($queue_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) - -Line 44. - -*** - -### list - -#### Signature - -```perl -sub list(@params) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) - -Line 11. - -*** - -### list - -#### Signature - -```perl -sub list(@params) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) - -Line 59. - -*** - -### list - -#### Signature - -```perl -sub list(@params) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) - -Line 155. - -*** - -### list\_members - -#### Signature - -```perl -sub list_members($queue_id, @params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) - -Line 38. - -*** - -### list\_memberships - -#### Signature - -```perl -sub list_memberships($group_id, @params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) - -Line 87. - -*** - -### phone\_number - -#### Signature - -```perl -sub phone_number($e164, @params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) - -Line 144. - -*** - -### redial\_verification - -#### Signature - -```perl -sub redial_verification($caller_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) - -Line 114. - -*** - -### sms - -#### Signature - -```perl -sub sms(%kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) - -Line 186. - -*** - -### submit\_verification - -#### Signature - -```perl -sub submit_verification($caller_id, %kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) - -Line 119. - -*** - -### update - -#### Signature - -```perl -sub update(%kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) - -Line 134. - -*** - -### update - -#### Signature - -```perl -sub update($short_code_id, %kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) - -Line 166. - -*** - -### verify - -#### Signature - -```perl -sub verify($request_id, %kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) - -Line 196. - -## Source - -[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/video/video/index.mdx b/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/video/video/index.mdx deleted file mode 100644 index bd62263119..0000000000 --- a/fern/products/sdk-reference/perl/signal-wire/rest/namespaces/video/video/index.mdx +++ /dev/null @@ -1,490 +0,0 @@ ---- -slug: "/reference/perl/signal-wire/rest/namespaces/video/video" -title: "Video" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::REST::Namespaces::Video" - module: "SignalWire.REST.Namespaces.Video" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm" ---- -# `Video` - -## Signature - -```perl -package SignalWire::REST::Namespaces::Video -``` - -## Inheritance - -**Extends:** `SignalWire::REST::Namespaces::CrudResource`, [SignalWire::REST::Namespaces::Base](/docs/sdk-reference/reference/perl/signal-wire/rest/namespaces/base/base) - -## Methods - -### create - -#### Signature - -```perl -sub create(%kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) - -Line 28. - -*** - -### create\_stream - -#### Signature - -```perl -sub create_stream($room_id, %kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) - -Line 18. - -*** - -### create\_stream - -#### Signature - -```perl -sub create_stream($conference_id, %kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) - -Line 118. - -*** - -### delete - -#### Signature - -```perl -sub delete($recording_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) - -Line 89. - -*** - -### delete - -#### Signature - -```perl -sub delete($stream_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) - -Line 159. - -*** - -### delete\_recording - -#### Signature - -```perl -sub delete_recording($recording_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) - -Line 83. - -*** - -### delete\_stream - -#### Signature - -```perl -sub delete_stream($stream_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) - -Line 153. - -*** - -### get - -#### Signature - -```perl -sub get($session_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) - -Line 44. - -*** - -### get - -#### Signature - -```perl -sub get($recording_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) - -Line 78. - -*** - -### get - -#### Signature - -```perl -sub get($token_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) - -Line 128. - -*** - -### get - -#### Signature - -```perl -sub get($stream_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) - -Line 143. - -*** - -### list - -#### Signature - -```perl -sub list(@params) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) - -Line 38. - -*** - -### list - -#### Signature - -```perl -sub list(@params) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) - -Line 72. - -*** - -### list\_conference\_tokens - -#### Signature - -```perl -sub list_conference_tokens($conference_id, @params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) - -Line 106. - -*** - -### list\_events - -#### Signature - -```perl -sub list_events($session_id, @params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) - -Line 49. - -*** - -### list\_events - -#### Signature - -```perl -sub list_events($recording_id, @params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) - -Line 94. - -*** - -### list\_members - -#### Signature - -```perl -sub list_members($session_id, @params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) - -Line 55. - -*** - -### list\_recordings - -#### Signature - -```perl -sub list_recordings($session_id, @params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) - -Line 61. - -*** - -### list\_streams - -#### Signature - -```perl -sub list_streams($room_id, @params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) - -Line 12. - -*** - -### list\_streams - -#### Signature - -```perl -sub list_streams($conference_id, @params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) - -Line 112. - -*** - -### reset - -#### Signature - -```perl -sub reset($token_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) - -Line 133. - -*** - -### update - -#### Signature - -```perl -sub update($stream_id, %kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) - -Line 148. - -## Source - -[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/rest/pagination/pagination/index.mdx b/fern/products/sdk-reference/perl/signal-wire/rest/pagination/pagination/index.mdx deleted file mode 100644 index 21e251713c..0000000000 --- a/fern/products/sdk-reference/perl/signal-wire/rest/pagination/pagination/index.mdx +++ /dev/null @@ -1,78 +0,0 @@ ---- -slug: "/reference/perl/signal-wire/rest/pagination/pagination" -title: "Pagination" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::REST::Pagination" - module: "SignalWire.REST.Pagination" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Pagination.pm" ---- -# `Pagination` - -Mirrors the Python `signalwire.rest._pagination.PaginatedIterator`. Walks the `links.next` cursor until no further page is advertised. Each fetch is performed via the SDK's SignalWire::REST::HttpClient so authentication and base-URL handling is shared with the rest of the SDK. - -**Synopsis** - -```perl -use SignalWire::REST::Pagination; -``` - -```perl -my $it = SignalWire::REST::Pagination::PaginatedIterator->new( - http => $client->_http, - path => '/api/fabric/addresses', - params => { page_size => 25 }, - data_key => 'data', -); -while (defined(my $item = $it->next)) { - ... -} -``` - -## Signature - -```perl -package SignalWire::REST::Pagination -``` - -## Methods - -### all - -#### Signature - -```perl -sub all() -``` - -#### Source - -[`lib/SignalWire/REST/Pagination.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Pagination.pm) - -Line 85. - -*** - -### BUILD - -#### Signature - -```perl -sub BUILD() -``` - -#### Source - -[`lib/SignalWire/REST/Pagination.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Pagination.pm) - -Line 39. - -## Source - -[`lib/SignalWire/REST/Pagination.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Pagination.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/rest/phone-call-handler/phone-call-handler/index.mdx b/fern/products/sdk-reference/perl/signal-wire/rest/phone-call-handler/phone-call-handler/index.mdx deleted file mode 100644 index b4b38e8698..0000000000 --- a/fern/products/sdk-reference/perl/signal-wire/rest/phone-call-handler/phone-call-handler/index.mdx +++ /dev/null @@ -1,66 +0,0 @@ ---- -slug: "/reference/perl/signal-wire/rest/phone-call-handler/phone-call-handler" -title: "PhoneCallHandler" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::REST::PhoneCallHandler" - module: "SignalWire.REST.PhoneCallHandler" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/PhoneCallHandler.pm" ---- -# `PhoneCallHandler` - -## Signature - -```perl -package SignalWire::REST::PhoneCallHandler -``` - -## Constants - - - - - - - - - - - - - - - - - - - - - - - -## Methods - -### values - -#### Signature - -```perl -sub values() -``` - -#### Source - -[`lib/SignalWire/REST/PhoneCallHandler.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/PhoneCallHandler.pm) - -Line 69. - -## Source - -[`lib/SignalWire/REST/PhoneCallHandler.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/PhoneCallHandler.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/rest/rest-client/rest-client/index.mdx b/fern/products/sdk-reference/perl/signal-wire/rest/rest-client/rest-client/index.mdx deleted file mode 100644 index 30d1d5757b..0000000000 --- a/fern/products/sdk-reference/perl/signal-wire/rest/rest-client/rest-client/index.mdx +++ /dev/null @@ -1,26 +0,0 @@ ---- -slug: "/reference/perl/signal-wire/rest/rest-client/rest-client" -title: "RestClient" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::REST::RestClient" - module: "SignalWire.REST.RestClient" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/RestClient.pm" ---- -# `RestClient` - -## Signature - -```perl -package SignalWire::REST::RestClient -``` - -## Source - -[`lib/SignalWire/REST/RestClient.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/RestClient.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/security/session-manager/session-manager/index.mdx b/fern/products/sdk-reference/perl/signal-wire/security/session-manager/session-manager/index.mdx deleted file mode 100644 index 29bcb1c8ca..0000000000 --- a/fern/products/sdk-reference/perl/signal-wire/security/session-manager/session-manager/index.mdx +++ /dev/null @@ -1,242 +0,0 @@ ---- -slug: "/reference/perl/signal-wire/security/session-manager/session-manager" -title: "SessionManager" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Security::SessionManager" - module: "SignalWire.Security.SessionManager" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/SessionManager.pm" ---- -# `SessionManager` - -## Signature - -```perl -package SignalWire::Security::SessionManager -``` - -## Methods - -### activate\_session - -#### Signature - -```perl -sub activate_session($call_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Security/SessionManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/SessionManager.pm) - -Line 127. - -*** - -### create\_session - -#### Signature - -```perl -sub create_session($call_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Security/SessionManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/SessionManager.pm) - -Line 50. - -*** - -### create\_tool\_token - -#### Signature - -```perl -sub create_tool_token($function_name, $call_id) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/Security/SessionManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/SessionManager.pm) - -Line 69. - -*** - -### debug\_token - -#### Signature - -```perl -sub debug_token($token) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Security/SessionManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/SessionManager.pm) - -Line 147. - -*** - -### end\_session - -#### Signature - -```perl -sub end_session($call_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Security/SessionManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/SessionManager.pm) - -Line 132. - -*** - -### generate\_token - -#### Signature - -```perl -sub generate_token($function_name, $call_id) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/Security/SessionManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/SessionManager.pm) - -Line 56. - -*** - -### get\_session\_metadata - -#### Signature - -```perl -sub get_session_metadata($call_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Security/SessionManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/SessionManager.pm) - -Line 137. - -*** - -### set\_session\_metadata - -#### Signature - -```perl -sub set_session_metadata($call_id, $key, $value) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/Security/SessionManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/SessionManager.pm) - -Line 142. - -*** - -### validate\_token - -#### Signature - -```perl -sub validate_token($call_id, $function_name, $token) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/Security/SessionManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/SessionManager.pm) - -Line 83. - -*** - -### validate\_tool\_token - -#### Signature - -```perl -sub validate_tool_token($function_name, $token, $call_id) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/Security/SessionManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/SessionManager.pm) - -Line 119. - -## Source - -[`lib/SignalWire/Security/SessionManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/SessionManager.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/security/webhook-middleware/webhook-middleware/index.mdx b/fern/products/sdk-reference/perl/signal-wire/security/webhook-middleware/webhook-middleware/index.mdx deleted file mode 100644 index 2888e3648d..0000000000 --- a/fern/products/sdk-reference/perl/signal-wire/security/webhook-middleware/webhook-middleware/index.mdx +++ /dev/null @@ -1,67 +0,0 @@ ---- -slug: "/reference/perl/signal-wire/security/webhook-middleware/webhook-middleware" -title: "WebhookMiddleware" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Security::WebhookMiddleware" - module: "SignalWire.Security.WebhookMiddleware" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/WebhookMiddleware.pm" ---- -# `WebhookMiddleware` - -Wraps a PSGI app so that incoming POST requests must carry a valid `X-SignalWire-Signature` header (or the legacy `X-Twilio-Signature`) matching the configured signing key. Invalid or missing signatures produce a 403 without ever invoking the wrapped app. - -The raw body is captured before validation and stashed on the env as `signalwire.raw_body`; `psgi.input` is rewound (or replaced with a buffer) so downstream handlers can re-read. - -**Synopsis** - -```perl -use SignalWire::Security::WebhookMiddleware; -``` - -```perl -my $wrapped = SignalWire::Security::WebhookMiddleware->wrap( - app => $psgi_app, - signing_key => $ENV{SIGNALWIRE_SIGNING_KEY}, - paths => [ '/', '/swaig', '/post_prompt' ], - trust_proxy => 1, -); -``` - -## Signature - -```perl -package SignalWire::Security::WebhookMiddleware -``` - -## Methods - -### wrap - -#### Signature - -```perl -sub wrap($class, %opts) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/Security/WebhookMiddleware.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/WebhookMiddleware.pm) - -Line 63. - -## Source - -[`lib/SignalWire/Security/WebhookMiddleware.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/WebhookMiddleware.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/security/webhook-validator/webhook-validator/index.mdx b/fern/products/sdk-reference/perl/signal-wire/security/webhook-validator/webhook-validator/index.mdx deleted file mode 100644 index 6ab1c7c7b5..0000000000 --- a/fern/products/sdk-reference/perl/signal-wire/security/webhook-validator/webhook-validator/index.mdx +++ /dev/null @@ -1,124 +0,0 @@ ---- -slug: "/reference/perl/signal-wire/security/webhook-validator/webhook-validator" -title: "WebhookValidator" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Security::WebhookValidator" - module: "SignalWire.Security.WebhookValidator" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/WebhookValidator.pm" ---- -# `WebhookValidator` - -Implements both signature schemes from porting-sdk/webhooks.md: - -- Scheme A (RELAY / SWML / JSON) - - `lower_hex(HMAC-SHA1(key, url + raw_body))` - -- Scheme B (Compat / cXML form) - - `base64(HMAC-SHA1(key, url + sorted_concat_form_params))`, with URL port normalization (try both with / without `:443` / `:80`) and an optional `bodySHA256` query-param fallback for JSON-on-compat. - -The combined entry point tries Scheme A first, then Scheme B in all URL / param-shape variants. All signature comparisons use a constant-time compare so the secret is not leaked across repeated requests. - -**ERROR MODES** - -- Valid signature -> returns `1` - -- Invalid signature -> returns `0` - -- Missing `$signature` -> returns `0` (never throws) - -- Missing `$signing_key` -> croaks (programming error) - -- Reference passed as `$raw_body` -> croaks - -**Synopsis** - -```perl -use SignalWire::Security::WebhookValidator qw( - validate_webhook_signature validate_request -); -``` - -```perl -# JSON / RELAY / SWML callbacks -if (validate_webhook_signature($signing_key, $sig_header, $url, $raw_body)) { - # request is genuine -} -``` - -```perl -# Legacy compat-api drop-in -if (validate_request($signing_key, $sig_header, $url, \%params)) { - # cXML / form-encoded request is genuine -} -``` - -## Signature - -```perl -package SignalWire::Security::WebhookValidator -``` - -## Methods - -### validate\_request - -#### Signature - -```perl -sub validate_request($signing_key, $signature, $url, $params_or_raw_body) -``` - -#### Parameters - - - - - - - - - -#### Source - -[`lib/SignalWire/Security/WebhookValidator.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/WebhookValidator.pm) - -Line 309. - -*** - -### validate\_webhook\_signature - -#### Signature - -```perl -sub validate_webhook_signature($signing_key, $signature, $url, $raw_body) -``` - -#### Parameters - - - - - - - - - -#### Source - -[`lib/SignalWire/Security/WebhookValidator.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/WebhookValidator.pm) - -Line 260. - -## Source - -[`lib/SignalWire/Security/WebhookValidator.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/WebhookValidator.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/server/agent-server/agent-server/index.mdx b/fern/products/sdk-reference/perl/signal-wire/server/agent-server/agent-server/index.mdx deleted file mode 100644 index 61831e7978..0000000000 --- a/fern/products/sdk-reference/perl/signal-wire/server/agent-server/agent-server/index.mdx +++ /dev/null @@ -1,162 +0,0 @@ ---- -slug: "/reference/perl/signal-wire/server/agent-server/agent-server" -title: "AgentServer" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Server::AgentServer" - module: "SignalWire.Server.AgentServer" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Server/AgentServer.pm" ---- -# `AgentServer` - -## Signature - -```perl -package SignalWire::Server::AgentServer -``` - -## Methods - -### get\_agent - -#### Signature - -```perl -sub get_agent($route) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Server/AgentServer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Server/AgentServer.pm) - -Line 53. - -*** - -### list\_agents - -#### Signature - -```perl -sub list_agents() -``` - -#### Source - -[`lib/SignalWire/Server/AgentServer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Server/AgentServer.pm) - -Line 48. - -*** - -### psgi\_app - -#### Signature - -```perl -sub psgi_app() -``` - -#### Source - -[`lib/SignalWire/Server/AgentServer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Server/AgentServer.pm) - -Line 73. - -*** - -### register - -#### Signature - -```perl -sub register($agent, $route) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/Server/AgentServer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Server/AgentServer.pm) - -Line 24. - -*** - -### run - -#### Signature - -```perl -sub run(%opts) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Server/AgentServer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Server/AgentServer.pm) - -Line 218. - -*** - -### serve\_static\_files - -#### Signature - -```perl -sub serve_static_files($directory, $route) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/Server/AgentServer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Server/AgentServer.pm) - -Line 58. - -*** - -### unregister - -#### Signature - -```perl -sub unregister($route) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Server/AgentServer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Server/AgentServer.pm) - -Line 40. - -## Source - -[`lib/SignalWire/Server/AgentServer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Server/AgentServer.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/skills/builtin/api-ninjas-trivia/api-ninjas-trivia/index.mdx b/fern/products/sdk-reference/perl/signal-wire/skills/builtin/api-ninjas-trivia/api-ninjas-trivia/index.mdx deleted file mode 100644 index f136668b54..0000000000 --- a/fern/products/sdk-reference/perl/signal-wire/skills/builtin/api-ninjas-trivia/api-ninjas-trivia/index.mdx +++ /dev/null @@ -1,78 +0,0 @@ ---- -slug: "/reference/perl/signal-wire/skills/builtin/api-ninjas-trivia/api-ninjas-trivia" -title: "ApiNinjasTrivia" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Skills::Builtin::ApiNinjasTrivia" - module: "SignalWire.Skills.Builtin.ApiNinjasTrivia" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/ApiNinjasTrivia.pm" ---- -# `ApiNinjasTrivia` - -## Signature - -```perl -package SignalWire::Skills::Builtin::ApiNinjasTrivia -``` - -## Inheritance - -**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/signal-wire/skills/skill-base/skill-base) - -## Methods - -### get\_parameter\_schema - -#### Signature - -```perl -sub get_parameter_schema() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/ApiNinjasTrivia.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/ApiNinjasTrivia.pm) - -Line 95. - -*** - -### register\_tools - -#### Signature - -```perl -sub register_tools() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/ApiNinjasTrivia.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/ApiNinjasTrivia.pm) - -Line 48. - -*** - -### setup - -#### Signature - -```perl -sub setup() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/ApiNinjasTrivia.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/ApiNinjasTrivia.pm) - -Line 46. - -## Source - -[`lib/SignalWire/Skills/Builtin/ApiNinjasTrivia.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/ApiNinjasTrivia.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/skills/builtin/claude-skills/claude-skills/index.mdx b/fern/products/sdk-reference/perl/signal-wire/skills/builtin/claude-skills/claude-skills/index.mdx deleted file mode 100644 index dee46a9be6..0000000000 --- a/fern/products/sdk-reference/perl/signal-wire/skills/builtin/claude-skills/claude-skills/index.mdx +++ /dev/null @@ -1,94 +0,0 @@ ---- -slug: "/reference/perl/signal-wire/skills/builtin/claude-skills/claude-skills" -title: "ClaudeSkills" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Skills::Builtin::ClaudeSkills" - module: "SignalWire.Skills.Builtin.ClaudeSkills" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/ClaudeSkills.pm" ---- -# `ClaudeSkills` - -## Signature - -```perl -package SignalWire::Skills::Builtin::ClaudeSkills -``` - -## Inheritance - -**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/signal-wire/skills/skill-base/skill-base) - -## Methods - -### get\_hints - -#### Signature - -```perl -sub get_hints() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/ClaudeSkills.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/ClaudeSkills.pm) - -Line 41. - -*** - -### get\_parameter\_schema - -#### Signature - -```perl -sub get_parameter_schema() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/ClaudeSkills.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/ClaudeSkills.pm) - -Line 46. - -*** - -### register\_tools - -#### Signature - -```perl -sub register_tools() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/ClaudeSkills.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/ClaudeSkills.pm) - -Line 16. - -*** - -### setup - -#### Signature - -```perl -sub setup() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/ClaudeSkills.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/ClaudeSkills.pm) - -Line 14. - -## Source - -[`lib/SignalWire/Skills/Builtin/ClaudeSkills.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/ClaudeSkills.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/skills/builtin/custom-skills/custom-skills/index.mdx b/fern/products/sdk-reference/perl/signal-wire/skills/builtin/custom-skills/custom-skills/index.mdx deleted file mode 100644 index 20bf99054e..0000000000 --- a/fern/products/sdk-reference/perl/signal-wire/skills/builtin/custom-skills/custom-skills/index.mdx +++ /dev/null @@ -1,78 +0,0 @@ ---- -slug: "/reference/perl/signal-wire/skills/builtin/custom-skills/custom-skills" -title: "CustomSkills" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Skills::Builtin::CustomSkills" - module: "SignalWire.Skills.Builtin.CustomSkills" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/CustomSkills.pm" ---- -# `CustomSkills` - -## Signature - -```perl -package SignalWire::Skills::Builtin::CustomSkills -``` - -## Inheritance - -**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/signal-wire/skills/skill-base/skill-base) - -## Methods - -### get\_parameter\_schema - -#### Signature - -```perl -sub get_parameter_schema() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/CustomSkills.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/CustomSkills.pm) - -Line 30. - -*** - -### register\_tools - -#### Signature - -```perl -sub register_tools() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/CustomSkills.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/CustomSkills.pm) - -Line 16. - -*** - -### setup - -#### Signature - -```perl -sub setup() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/CustomSkills.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/CustomSkills.pm) - -Line 14. - -## Source - -[`lib/SignalWire/Skills/Builtin/CustomSkills.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/CustomSkills.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/skills/builtin/datasphere-serverless/datasphere-serverless/index.mdx b/fern/products/sdk-reference/perl/signal-wire/skills/builtin/datasphere-serverless/datasphere-serverless/index.mdx deleted file mode 100644 index 0c4ed2905d..0000000000 --- a/fern/products/sdk-reference/perl/signal-wire/skills/builtin/datasphere-serverless/datasphere-serverless/index.mdx +++ /dev/null @@ -1,110 +0,0 @@ ---- -slug: "/reference/perl/signal-wire/skills/builtin/datasphere-serverless/datasphere-serverless" -title: "DatasphereServerless" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Skills::Builtin::DatasphereServerless" - module: "SignalWire.Skills.Builtin.DatasphereServerless" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/DatasphereServerless.pm" ---- -# `DatasphereServerless` - -## Signature - -```perl -package SignalWire::Skills::Builtin::DatasphereServerless -``` - -## Inheritance - -**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/signal-wire/skills/skill-base/skill-base) - -## Methods - -### get\_global\_data - -#### Signature - -```perl -sub get_global_data() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/DatasphereServerless.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/DatasphereServerless.pm) - -Line 47. - -*** - -### get\_hints - -#### Signature - -```perl -sub get_hints() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/DatasphereServerless.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/DatasphereServerless.pm) - -Line 45. - -*** - -### get\_parameter\_schema - -#### Signature - -```perl -sub get_parameter_schema() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/DatasphereServerless.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/DatasphereServerless.pm) - -Line 67. - -*** - -### register\_tools - -#### Signature - -```perl -sub register_tools() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/DatasphereServerless.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/DatasphereServerless.pm) - -Line 17. - -*** - -### setup - -#### Signature - -```perl -sub setup() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/DatasphereServerless.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/DatasphereServerless.pm) - -Line 15. - -## Source - -[`lib/SignalWire/Skills/Builtin/DatasphereServerless.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/DatasphereServerless.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/skills/builtin/datasphere/datasphere/index.mdx b/fern/products/sdk-reference/perl/signal-wire/skills/builtin/datasphere/datasphere/index.mdx deleted file mode 100644 index 103279e9f3..0000000000 --- a/fern/products/sdk-reference/perl/signal-wire/skills/builtin/datasphere/datasphere/index.mdx +++ /dev/null @@ -1,130 +0,0 @@ ---- -slug: "/reference/perl/signal-wire/skills/builtin/datasphere/datasphere" -title: "Datasphere" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Skills::Builtin::Datasphere" - module: "SignalWire.Skills.Builtin.Datasphere" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Datasphere.pm" ---- -# `Datasphere` - -## Signature - -```perl -package SignalWire::Skills::Builtin::Datasphere -``` - -## Inheritance - -**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/signal-wire/skills/skill-base/skill-base) - -## Methods - -### get\_global\_data - -#### Signature - -```perl -sub get_global_data() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/Datasphere.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Datasphere.pm) - -Line 183. - -*** - -### get\_hints - -#### Signature - -```perl -sub get_hints() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/Datasphere.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Datasphere.pm) - -Line 181. - -*** - -### get\_parameter\_schema - -#### Signature - -```perl -sub get_parameter_schema() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/Datasphere.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Datasphere.pm) - -Line 203. - -*** - -### register\_tools - -#### Signature - -```perl -sub register_tools() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/Datasphere.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Datasphere.pm) - -Line 63. - -*** - -### search\_knowledge - -#### Signature - -```perl -sub search_knowledge($query) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Skills/Builtin/Datasphere.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Datasphere.pm) - -Line 107. - -*** - -### setup - -#### Signature - -```perl -sub setup() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/Datasphere.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Datasphere.pm) - -Line 54. - -## Source - -[`lib/SignalWire/Skills/Builtin/Datasphere.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Datasphere.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/skills/builtin/datetime/datetime/index.mdx b/fern/products/sdk-reference/perl/signal-wire/skills/builtin/datetime/datetime/index.mdx deleted file mode 100644 index 2ddfcf4159..0000000000 --- a/fern/products/sdk-reference/perl/signal-wire/skills/builtin/datetime/datetime/index.mdx +++ /dev/null @@ -1,78 +0,0 @@ ---- -slug: "/reference/perl/signal-wire/skills/builtin/datetime/datetime" -title: "Datetime" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Skills::Builtin::Datetime" - module: "SignalWire.Skills.Builtin.Datetime" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Datetime.pm" ---- -# `Datetime` - -## Signature - -```perl -package SignalWire::Skills::Builtin::Datetime -``` - -## Inheritance - -**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/signal-wire/skills/skill-base/skill-base) - -## Methods - -### get\_parameter\_schema - -#### Signature - -```perl -sub get_parameter_schema() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/Datetime.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Datetime.pm) - -Line 78. - -*** - -### register\_tools - -#### Signature - -```perl -sub register_tools() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/Datetime.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Datetime.pm) - -Line 17. - -*** - -### setup - -#### Signature - -```perl -sub setup() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/Datetime.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Datetime.pm) - -Line 15. - -## Source - -[`lib/SignalWire/Skills/Builtin/Datetime.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Datetime.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/skills/builtin/google-maps/google-maps/index.mdx b/fern/products/sdk-reference/perl/signal-wire/skills/builtin/google-maps/google-maps/index.mdx deleted file mode 100644 index 4aa3a916e3..0000000000 --- a/fern/products/sdk-reference/perl/signal-wire/skills/builtin/google-maps/google-maps/index.mdx +++ /dev/null @@ -1,94 +0,0 @@ ---- -slug: "/reference/perl/signal-wire/skills/builtin/google-maps/google-maps" -title: "GoogleMaps" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Skills::Builtin::GoogleMaps" - module: "SignalWire.Skills.Builtin.GoogleMaps" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/GoogleMaps.pm" ---- -# `GoogleMaps` - -## Signature - -```perl -package SignalWire::Skills::Builtin::GoogleMaps -``` - -## Inheritance - -**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/signal-wire/skills/skill-base/skill-base) - -## Methods - -### get\_hints - -#### Signature - -```perl -sub get_hints() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/GoogleMaps.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/GoogleMaps.pm) - -Line 65. - -*** - -### get\_parameter\_schema - -#### Signature - -```perl -sub get_parameter_schema() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/GoogleMaps.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/GoogleMaps.pm) - -Line 80. - -*** - -### register\_tools - -#### Signature - -```perl -sub register_tools() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/GoogleMaps.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/GoogleMaps.pm) - -Line 16. - -*** - -### setup - -#### Signature - -```perl -sub setup() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/GoogleMaps.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/GoogleMaps.pm) - -Line 14. - -## Source - -[`lib/SignalWire/Skills/Builtin/GoogleMaps.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/GoogleMaps.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/skills/builtin/info-gatherer/info-gatherer/index.mdx b/fern/products/sdk-reference/perl/signal-wire/skills/builtin/info-gatherer/info-gatherer/index.mdx deleted file mode 100644 index b52d0799b1..0000000000 --- a/fern/products/sdk-reference/perl/signal-wire/skills/builtin/info-gatherer/info-gatherer/index.mdx +++ /dev/null @@ -1,94 +0,0 @@ ---- -slug: "/reference/perl/signal-wire/skills/builtin/info-gatherer/info-gatherer" -title: "InfoGatherer" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Skills::Builtin::InfoGatherer" - module: "SignalWire.Skills.Builtin.InfoGatherer" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/InfoGatherer.pm" ---- -# `InfoGatherer` - -## Signature - -```perl -package SignalWire::Skills::Builtin::InfoGatherer -``` - -## Inheritance - -**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/signal-wire/skills/skill-base/skill-base) - -## Methods - -### get\_global\_data - -#### Signature - -```perl -sub get_global_data() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/InfoGatherer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/InfoGatherer.pm) - -Line 60. - -*** - -### get\_parameter\_schema - -#### Signature - -```perl -sub get_parameter_schema() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/InfoGatherer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/InfoGatherer.pm) - -Line 86. - -*** - -### register\_tools - -#### Signature - -```perl -sub register_tools() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/InfoGatherer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/InfoGatherer.pm) - -Line 17. - -*** - -### setup - -#### Signature - -```perl -sub setup() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/InfoGatherer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/InfoGatherer.pm) - -Line 15. - -## Source - -[`lib/SignalWire/Skills/Builtin/InfoGatherer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/InfoGatherer.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/skills/builtin/joke/joke/index.mdx b/fern/products/sdk-reference/perl/signal-wire/skills/builtin/joke/joke/index.mdx deleted file mode 100644 index fc5a6c99a9..0000000000 --- a/fern/products/sdk-reference/perl/signal-wire/skills/builtin/joke/joke/index.mdx +++ /dev/null @@ -1,94 +0,0 @@ ---- -slug: "/reference/perl/signal-wire/skills/builtin/joke/joke" -title: "Joke" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Skills::Builtin::Joke" - module: "SignalWire.Skills.Builtin.Joke" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Joke.pm" ---- -# `Joke` - -## Signature - -```perl -package SignalWire::Skills::Builtin::Joke -``` - -## Inheritance - -**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/signal-wire/skills/skill-base/skill-base) - -## Methods - -### get\_global\_data - -#### Signature - -```perl -sub get_global_data() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/Joke.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Joke.pm) - -Line 49. - -*** - -### get\_parameter\_schema - -#### Signature - -```perl -sub get_parameter_schema() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/Joke.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Joke.pm) - -Line 64. - -*** - -### register\_tools - -#### Signature - -```perl -sub register_tools() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/Joke.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Joke.pm) - -Line 17. - -*** - -### setup - -#### Signature - -```perl -sub setup() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/Joke.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Joke.pm) - -Line 15. - -## Source - -[`lib/SignalWire/Skills/Builtin/Joke.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Joke.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/skills/builtin/math/math/index.mdx b/fern/products/sdk-reference/perl/signal-wire/skills/builtin/math/math/index.mdx deleted file mode 100644 index abf99037bc..0000000000 --- a/fern/products/sdk-reference/perl/signal-wire/skills/builtin/math/math/index.mdx +++ /dev/null @@ -1,78 +0,0 @@ ---- -slug: "/reference/perl/signal-wire/skills/builtin/math/math" -title: "Math" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Skills::Builtin::Math" - module: "SignalWire.Skills.Builtin.Math" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Math.pm" ---- -# `Math` - -## Signature - -```perl -package SignalWire::Skills::Builtin::Math -``` - -## Inheritance - -**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/signal-wire/skills/skill-base/skill-base) - -## Methods - -### get\_parameter\_schema - -#### Signature - -```perl -sub get_parameter_schema() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/Math.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Math.pm) - -Line 62. - -*** - -### register\_tools - -#### Signature - -```perl -sub register_tools() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/Math.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Math.pm) - -Line 16. - -*** - -### setup - -#### Signature - -```perl -sub setup() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/Math.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Math.pm) - -Line 14. - -## Source - -[`lib/SignalWire/Skills/Builtin/Math.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Math.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/skills/builtin/mcp-gateway/mcp-gateway/index.mdx b/fern/products/sdk-reference/perl/signal-wire/skills/builtin/mcp-gateway/mcp-gateway/index.mdx deleted file mode 100644 index 98bb44b9c4..0000000000 --- a/fern/products/sdk-reference/perl/signal-wire/skills/builtin/mcp-gateway/mcp-gateway/index.mdx +++ /dev/null @@ -1,110 +0,0 @@ ---- -slug: "/reference/perl/signal-wire/skills/builtin/mcp-gateway/mcp-gateway" -title: "McpGateway" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Skills::Builtin::McpGateway" - module: "SignalWire.Skills.Builtin.McpGateway" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/McpGateway.pm" ---- -# `McpGateway` - -## Signature - -```perl -package SignalWire::Skills::Builtin::McpGateway -``` - -## Inheritance - -**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/signal-wire/skills/skill-base/skill-base) - -## Methods - -### get\_global\_data - -#### Signature - -```perl -sub get_global_data() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/McpGateway.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/McpGateway.pm) - -Line 54. - -*** - -### get\_hints - -#### Signature - -```perl -sub get_hints() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/McpGateway.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/McpGateway.pm) - -Line 45. - -*** - -### get\_parameter\_schema - -#### Signature - -```perl -sub get_parameter_schema() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/McpGateway.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/McpGateway.pm) - -Line 71. - -*** - -### register\_tools - -#### Signature - -```perl -sub register_tools() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/McpGateway.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/McpGateway.pm) - -Line 16. - -*** - -### setup - -#### Signature - -```perl -sub setup() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/McpGateway.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/McpGateway.pm) - -Line 14. - -## Source - -[`lib/SignalWire/Skills/Builtin/McpGateway.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/McpGateway.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/skills/builtin/native-vector-search/native-vector-search/index.mdx b/fern/products/sdk-reference/perl/signal-wire/skills/builtin/native-vector-search/native-vector-search/index.mdx deleted file mode 100644 index 5aaba8a129..0000000000 --- a/fern/products/sdk-reference/perl/signal-wire/skills/builtin/native-vector-search/native-vector-search/index.mdx +++ /dev/null @@ -1,94 +0,0 @@ ---- -slug: "/reference/perl/signal-wire/skills/builtin/native-vector-search/native-vector-search" -title: "NativeVectorSearch" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Skills::Builtin::NativeVectorSearch" - module: "SignalWire.Skills.Builtin.NativeVectorSearch" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/NativeVectorSearch.pm" ---- -# `NativeVectorSearch` - -## Signature - -```perl -package SignalWire::Skills::Builtin::NativeVectorSearch -``` - -## Inheritance - -**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/signal-wire/skills/skill-base/skill-base) - -## Methods - -### get\_hints - -#### Signature - -```perl -sub get_hints() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/NativeVectorSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/NativeVectorSearch.pm) - -Line 42. - -*** - -### get\_parameter\_schema - -#### Signature - -```perl -sub get_parameter_schema() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/NativeVectorSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/NativeVectorSearch.pm) - -Line 57. - -*** - -### register\_tools - -#### Signature - -```perl -sub register_tools() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/NativeVectorSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/NativeVectorSearch.pm) - -Line 16. - -*** - -### setup - -#### Signature - -```perl -sub setup() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/NativeVectorSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/NativeVectorSearch.pm) - -Line 14. - -## Source - -[`lib/SignalWire/Skills/Builtin/NativeVectorSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/NativeVectorSearch.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/skills/builtin/play-background-file/play-background-file/index.mdx b/fern/products/sdk-reference/perl/signal-wire/skills/builtin/play-background-file/play-background-file/index.mdx deleted file mode 100644 index 50e0801179..0000000000 --- a/fern/products/sdk-reference/perl/signal-wire/skills/builtin/play-background-file/play-background-file/index.mdx +++ /dev/null @@ -1,78 +0,0 @@ ---- -slug: "/reference/perl/signal-wire/skills/builtin/play-background-file/play-background-file" -title: "PlayBackgroundFile" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Skills::Builtin::PlayBackgroundFile" - module: "SignalWire.Skills.Builtin.PlayBackgroundFile" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/PlayBackgroundFile.pm" ---- -# `PlayBackgroundFile` - -## Signature - -```perl -package SignalWire::Skills::Builtin::PlayBackgroundFile -``` - -## Inheritance - -**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/signal-wire/skills/skill-base/skill-base) - -## Methods - -### get\_parameter\_schema - -#### Signature - -```perl -sub get_parameter_schema() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/PlayBackgroundFile.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/PlayBackgroundFile.pm) - -Line 57. - -*** - -### register\_tools - -#### Signature - -```perl -sub register_tools() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/PlayBackgroundFile.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/PlayBackgroundFile.pm) - -Line 16. - -*** - -### setup - -#### Signature - -```perl -sub setup() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/PlayBackgroundFile.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/PlayBackgroundFile.pm) - -Line 14. - -## Source - -[`lib/SignalWire/Skills/Builtin/PlayBackgroundFile.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/PlayBackgroundFile.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/skills/builtin/spider/spider/index.mdx b/fern/products/sdk-reference/perl/signal-wire/skills/builtin/spider/spider/index.mdx deleted file mode 100644 index 9bf9b8250b..0000000000 --- a/fern/products/sdk-reference/perl/signal-wire/skills/builtin/spider/spider/index.mdx +++ /dev/null @@ -1,114 +0,0 @@ ---- -slug: "/reference/perl/signal-wire/skills/builtin/spider/spider" -title: "Spider" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Skills::Builtin::Spider" - module: "SignalWire.Skills.Builtin.Spider" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Spider.pm" ---- -# `Spider` - -## Signature - -```perl -package SignalWire::Skills::Builtin::Spider -``` - -## Inheritance - -**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/signal-wire/skills/skill-base/skill-base) - -## Methods - -### get\_hints - -#### Signature - -```perl -sub get_hints() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/Spider.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Spider.pm) - -Line 180. - -*** - -### get\_parameter\_schema - -#### Signature - -```perl -sub get_parameter_schema() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/Spider.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Spider.pm) - -Line 184. - -*** - -### register\_tools - -#### Signature - -```perl -sub register_tools() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/Spider.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Spider.pm) - -Line 50. - -*** - -### scrape\_url - -#### Signature - -```perl -sub scrape_url($url) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Skills/Builtin/Spider.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Spider.pm) - -Line 119. - -*** - -### setup - -#### Signature - -```perl -sub setup() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/Spider.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Spider.pm) - -Line 48. - -## Source - -[`lib/SignalWire/Skills/Builtin/Spider.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Spider.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/skills/builtin/swml-transfer/swml-transfer/index.mdx b/fern/products/sdk-reference/perl/signal-wire/skills/builtin/swml-transfer/swml-transfer/index.mdx deleted file mode 100644 index 0b52178304..0000000000 --- a/fern/products/sdk-reference/perl/signal-wire/skills/builtin/swml-transfer/swml-transfer/index.mdx +++ /dev/null @@ -1,94 +0,0 @@ ---- -slug: "/reference/perl/signal-wire/skills/builtin/swml-transfer/swml-transfer" -title: "SwmlTransfer" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Skills::Builtin::SwmlTransfer" - module: "SignalWire.Skills.Builtin.SwmlTransfer" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/SwmlTransfer.pm" ---- -# `SwmlTransfer` - -## Signature - -```perl -package SignalWire::Skills::Builtin::SwmlTransfer -``` - -## Inheritance - -**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/signal-wire/skills/skill-base/skill-base) - -## Methods - -### get\_hints - -#### Signature - -```perl -sub get_hints() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/SwmlTransfer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/SwmlTransfer.pm) - -Line 57. - -*** - -### get\_parameter\_schema - -#### Signature - -```perl -sub get_parameter_schema() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/SwmlTransfer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/SwmlTransfer.pm) - -Line 82. - -*** - -### register\_tools - -#### Signature - -```perl -sub register_tools() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/SwmlTransfer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/SwmlTransfer.pm) - -Line 16. - -*** - -### setup - -#### Signature - -```perl -sub setup() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/SwmlTransfer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/SwmlTransfer.pm) - -Line 14. - -## Source - -[`lib/SignalWire/Skills/Builtin/SwmlTransfer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/SwmlTransfer.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/skills/builtin/weather-api/weather-api/index.mdx b/fern/products/sdk-reference/perl/signal-wire/skills/builtin/weather-api/weather-api/index.mdx deleted file mode 100644 index 042f9f4863..0000000000 --- a/fern/products/sdk-reference/perl/signal-wire/skills/builtin/weather-api/weather-api/index.mdx +++ /dev/null @@ -1,78 +0,0 @@ ---- -slug: "/reference/perl/signal-wire/skills/builtin/weather-api/weather-api" -title: "WeatherApi" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Skills::Builtin::WeatherApi" - module: "SignalWire.Skills.Builtin.WeatherApi" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WeatherApi.pm" ---- -# `WeatherApi` - -## Signature - -```perl -package SignalWire::Skills::Builtin::WeatherApi -``` - -## Inheritance - -**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/signal-wire/skills/skill-base/skill-base) - -## Methods - -### get\_parameter\_schema - -#### Signature - -```perl -sub get_parameter_schema() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/WeatherApi.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WeatherApi.pm) - -Line 67. - -*** - -### register\_tools - -#### Signature - -```perl -sub register_tools() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/WeatherApi.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WeatherApi.pm) - -Line 16. - -*** - -### setup - -#### Signature - -```perl -sub setup() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/WeatherApi.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WeatherApi.pm) - -Line 14. - -## Source - -[`lib/SignalWire/Skills/Builtin/WeatherApi.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WeatherApi.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/skills/builtin/web-search/web-search/index.mdx b/fern/products/sdk-reference/perl/signal-wire/skills/builtin/web-search/web-search/index.mdx deleted file mode 100644 index f151952c17..0000000000 --- a/fern/products/sdk-reference/perl/signal-wire/skills/builtin/web-search/web-search/index.mdx +++ /dev/null @@ -1,114 +0,0 @@ ---- -slug: "/reference/perl/signal-wire/skills/builtin/web-search/web-search" -title: "WebSearch" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Skills::Builtin::WebSearch" - module: "SignalWire.Skills.Builtin.WebSearch" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WebSearch.pm" ---- -# `WebSearch` - -## Signature - -```perl -package SignalWire::Skills::Builtin::WebSearch -``` - -## Inheritance - -**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/signal-wire/skills/skill-base/skill-base) - -## Methods - -### get\_global\_data - -#### Signature - -```perl -sub get_global_data() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/WebSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WebSearch.pm) - -Line 307. - -*** - -### get\_parameter\_schema - -#### Signature - -```perl -sub get_parameter_schema() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/WebSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WebSearch.pm) - -Line 326. - -*** - -### register\_tools - -#### Signature - -```perl -sub register_tools() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/WebSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WebSearch.pm) - -Line 138. - -*** - -### search\_web - -#### Signature - -```perl -sub search_web($query) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Skills/Builtin/WebSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WebSearch.pm) - -Line 167. - -*** - -### setup - -#### Signature - -```perl -sub setup() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/WebSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WebSearch.pm) - -Line 86. - -## Source - -[`lib/SignalWire/Skills/Builtin/WebSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WebSearch.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/skills/builtin/wikipedia-search/wikipedia-search/index.mdx b/fern/products/sdk-reference/perl/signal-wire/skills/builtin/wikipedia-search/wikipedia-search/index.mdx deleted file mode 100644 index 1df9496e1a..0000000000 --- a/fern/products/sdk-reference/perl/signal-wire/skills/builtin/wikipedia-search/wikipedia-search/index.mdx +++ /dev/null @@ -1,98 +0,0 @@ ---- -slug: "/reference/perl/signal-wire/skills/builtin/wikipedia-search/wikipedia-search" -title: "WikipediaSearch" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Skills::Builtin::WikipediaSearch" - module: "SignalWire.Skills.Builtin.WikipediaSearch" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WikipediaSearch.pm" ---- -# `WikipediaSearch` - -## Signature - -```perl -package SignalWire::Skills::Builtin::WikipediaSearch -``` - -## Inheritance - -**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/signal-wire/skills/skill-base/skill-base) - -## Methods - -### get\_parameter\_schema - -#### Signature - -```perl -sub get_parameter_schema() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/WikipediaSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WikipediaSearch.pm) - -Line 189. - -*** - -### register\_tools - -#### Signature - -```perl -sub register_tools() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/WikipediaSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WikipediaSearch.pm) - -Line 77. - -*** - -### search\_wiki - -#### Signature - -```perl -sub search_wiki($query) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Skills/Builtin/WikipediaSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WikipediaSearch.pm) - -Line 112. - -*** - -### setup - -#### Signature - -```perl -sub setup() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/WikipediaSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WikipediaSearch.pm) - -Line 64. - -## Source - -[`lib/SignalWire/Skills/Builtin/WikipediaSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WikipediaSearch.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/skills/skill-base/skill-base/index.mdx b/fern/products/sdk-reference/perl/signal-wire/skills/skill-base/skill-base/index.mdx deleted file mode 100644 index 108b1aa798..0000000000 --- a/fern/products/sdk-reference/perl/signal-wire/skills/skill-base/skill-base/index.mdx +++ /dev/null @@ -1,254 +0,0 @@ ---- -slug: "/reference/perl/signal-wire/skills/skill-base/skill-base" -title: "SkillBase" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Skills::SkillBase" - module: "SignalWire.Skills.SkillBase" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillBase.pm" ---- -# `SkillBase` - -SignalWire::Skills::SkillBase is the Perl port of the Python reference's `SkillBase`. Every built-in or custom skill extends it. A skill declares metadata (`skill_name`, `skill_description`, `skill_version`), optional package / environment requirements, and overrides the abstract `setup` and `register_tools` hooks to wire its SWAIG tools onto the owning agent. - -Construction fails fast (Moo `isa` constraints): `skill_name` / `skill_description` must be non-empty strings, `agent` must be a blessed object, `required_packages` / `required_env_vars` must be arrayrefs, and `params` / `swaig_fields` must be hashrefs. - -**ATTRIBUTES** - -`skill_name`, `skill_description`, `skill_version`, `supports_multiple_instances`, `required_packages`, `required_env_vars`, `agent`, `params`, `swaig_fields`. - -**LICENSE** - -Copyright (c) 2025 SignalWire. Licensed under the MIT License. - -**METHODS** - -- `setup` / `register_tools` — abstract; a subclass **must** override both (the defaults `croak`). - -- `define_tool(%opts)` — register a SWAIG tool on the agent, merging the skill's `swaig_fields` into the definition. - -- `get_hints` / `get_global_data` / `get_prompt_sections` — default no-op contributions a subclass may override; `get_prompt_sections` honours the `skip_prompt` param. - -- `cleanup` — teardown hook (no-op by default). - -- `validate_env_vars` — true iff every `required_env_vars` entry is set in `%ENV`. - -- `get_parameter_schema` — the JSON-schema-ish description of the config params the skill accepts. - -- `get_instance_key` — the registry key for this skill instance (`skill_name`, optionally suffixed by `tool_name`). - -**Synopsis** - -```perl -package SignalWire::Skills::Builtin::MySkill; -use Moo; -extends 'SignalWire::Skills::SkillBase'; -``` - -```perl -has '+skill_name' => ( default => sub { 'my_skill' } ); -has '+skill_description' => ( default => sub { 'Does a thing' } ); -``` - -```perl -sub setup ($self) { ...; return 1; } -sub register_tools ($self) { - $self->define_tool( name => 'do_thing', ... ); -} -``` - -## Signature - -```perl -package SignalWire::Skills::SkillBase -``` - -## See Also - -- SignalWire::Skills::SkillRegistry, SignalWire::Skills::SkillManager, SignalWire::Skills::SkillName. - -## Methods - -### BUILD - -#### Signature - -```perl -sub BUILD() -``` - -#### Source - -[`lib/SignalWire/Skills/SkillBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillBase.pm) - -Line 45. - -*** - -### cleanup - -#### Signature - -```perl -sub cleanup() -``` - -#### Source - -[`lib/SignalWire/Skills/SkillBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillBase.pm) - -Line 87. - -*** - -### define\_tool - -#### Signature - -```perl -sub define_tool() -``` - -#### Source - -[`lib/SignalWire/Skills/SkillBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillBase.pm) - -Line 64. - -*** - -### get\_global\_data - -#### Signature - -```perl -sub get_global_data() -``` - -#### Source - -[`lib/SignalWire/Skills/SkillBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillBase.pm) - -Line 74. - -*** - -### get\_hints - -#### Signature - -```perl -sub get_hints() -``` - -#### Source - -[`lib/SignalWire/Skills/SkillBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillBase.pm) - -Line 70. - -*** - -### get\_instance\_key - -#### Signature - -```perl -sub get_instance_key() -``` - -#### Source - -[`lib/SignalWire/Skills/SkillBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillBase.pm) - -Line 106. - -*** - -### get\_parameter\_schema - -#### Signature - -```perl -sub get_parameter_schema() -``` - -#### Source - -[`lib/SignalWire/Skills/SkillBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillBase.pm) - -Line 98. - -*** - -### get\_prompt\_sections - -#### Signature - -```perl -sub get_prompt_sections() -``` - -#### Source - -[`lib/SignalWire/Skills/SkillBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillBase.pm) - -Line 78. - -*** - -### register\_tools - -#### Signature - -```perl -sub register_tools() -``` - -#### Source - -[`lib/SignalWire/Skills/SkillBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillBase.pm) - -Line 58. - -*** - -### setup - -#### Signature - -```perl -sub setup() -``` - -#### Source - -[`lib/SignalWire/Skills/SkillBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillBase.pm) - -Line 54. - -*** - -### validate\_env\_vars - -#### Signature - -```perl -sub validate_env_vars() -``` - -#### Source - -[`lib/SignalWire/Skills/SkillBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillBase.pm) - -Line 91. - -## Source - -[`lib/SignalWire/Skills/SkillBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillBase.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/skills/skill-manager/skill-manager/index.mdx b/fern/products/sdk-reference/perl/signal-wire/skills/skill-manager/skill-manager/index.mdx deleted file mode 100644 index a226292054..0000000000 --- a/fern/products/sdk-reference/perl/signal-wire/skills/skill-manager/skill-manager/index.mdx +++ /dev/null @@ -1,106 +0,0 @@ ---- -slug: "/reference/perl/signal-wire/skills/skill-manager/skill-manager" -title: "SkillManager" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Skills::SkillManager" - module: "SignalWire.Skills.SkillManager" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillManager.pm" ---- -# `SkillManager` - -## Signature - -```perl -package SignalWire::Skills::SkillManager -``` - -## Methods - -### has\_skill - -#### Signature - -```perl -sub has_skill($key) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Skills/SkillManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillManager.pm) - -Line 108. - -*** - -### list\_skills - -#### Signature - -```perl -sub list_skills() -``` - -#### Source - -[`lib/SignalWire/Skills/SkillManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillManager.pm) - -Line 103. - -*** - -### load\_skill - -#### Signature - -```perl -sub load_skill($skill_name, $skill_class, $params) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/Skills/SkillManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillManager.pm) - -Line 13. - -*** - -### unload\_skill - -#### Signature - -```perl -sub unload_skill($key) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Skills/SkillManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillManager.pm) - -Line 93. - -## Source - -[`lib/SignalWire/Skills/SkillManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillManager.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/skills/skill-name/skill-name/index.mdx b/fern/products/sdk-reference/perl/signal-wire/skills/skill-name/skill-name/index.mdx deleted file mode 100644 index d457ccd1e5..0000000000 --- a/fern/products/sdk-reference/perl/signal-wire/skills/skill-name/skill-name/index.mdx +++ /dev/null @@ -1,151 +0,0 @@ ---- -slug: "/reference/perl/signal-wire/skills/skill-name/skill-name" -title: "SkillName" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Skills::SkillName" - module: "SignalWire.Skills.SkillName" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillName.pm" ---- -# `SkillName` - -The 18 built-in skill names, surfaced as typed, named constants. Each constant's value is the skill's registered wire name — the exact string passed to `SkillRegistry->register_skill` in the matching `SignalWire::Skills::Builtin::*` module. - -The constants **are** the canonical wire strings, so nothing about `AgentBase->add_skill` / `remove_skill` / `has_skill` changes: they still take a string. That keeps parity with the Python reference (a bare `str`) and leaves custom / third-party skill names working automatically — an unknown string is simply not in this set. - -This buys a single source of truth for the built-in names (otherwise they live only inside `SkillRegistry::_load_all_builtins` and the test suite), plus editor autocomplete and the membership/iteration helpers below. - -**ALL** - -my $aref = SignalWire::Skills::SkillName->all; - -Arrayref of the 18 built-in skill wire names, sorted so the order matches `SkillRegistry->list_skills`. - -**CONSTANTS** - -Exported on request via Exporter; `:all` pulls every name. The full set: `API_NINJAS_TRIVIA`, `CLAUDE_SKILLS`, `CUSTOM_SKILLS`, `DATASPHERE`, `DATASPHERE_SERVERLESS`, `DATETIME`, `GOOGLE_MAPS`, `INFO_GATHERER`, `JOKE`, `MATH`, `MCP_GATEWAY`, `NATIVE_VECTOR_SEARCH`, `PLAY_BACKGROUND_FILE`, `SPIDER`, `SWML_TRANSFER`, `WEATHER_API`, `WEB_SEARCH`, `WIKIPEDIA_SEARCH`. - -**IS BUILTIN** - -my $bool = SignalWire::Skills::SkillName->is\_builtin($name); - -True if `$name` is one of the built-in skills, false for custom / unknown names. Accepts the bareword constant too. - -**LICENSE** - -Copyright (c) 2025 SignalWire. Licensed under the MIT License. - -**Synopsis** - -```perl -use SignalWire::Skills::SkillName qw(DATETIME); -``` - -```perl -$agent->add_skill( DATETIME ); # imported constant -$agent->add_skill( 'datetime' ); # string (Python parity) -$agent->add_skill( 'my_custom_skill' ); # open set: custom skill -``` - -```perl -# Membership / iteration helpers: -SignalWire::Skills::SkillName->is_builtin('datetime'); # 1 -SignalWire::Skills::SkillName->is_builtin('my_custom'); # 0 -@{ SignalWire::Skills::SkillName->all }; # 18 names -``` - -## Signature - -```perl -package SignalWire::Skills::SkillName -``` - -## See Also - -- SignalWire::Skills::SkillRegistry, SignalWire::Skills::SkillManager, SignalWire::Skills::SkillBase. - -## Constants - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -## Methods - -### all - -#### Signature - -```perl -sub all() -``` - -#### Source - -[`lib/SignalWire/Skills/SkillName.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillName.pm) - -Line 101. - -*** - -### is\_builtin - -#### Signature - -```perl -sub is_builtin($class, $name) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/Skills/SkillName.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillName.pm) - -Line 108. - -## Source - -[`lib/SignalWire/Skills/SkillName.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillName.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/skills/skill-registry/skill-registry/index.mdx b/fern/products/sdk-reference/perl/signal-wire/skills/skill-registry/skill-registry/index.mdx deleted file mode 100644 index 8f333776ff..0000000000 --- a/fern/products/sdk-reference/perl/signal-wire/skills/skill-registry/skill-registry/index.mdx +++ /dev/null @@ -1,146 +0,0 @@ ---- -slug: "/reference/perl/signal-wire/skills/skill-registry/skill-registry" -title: "SkillRegistry" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Skills::SkillRegistry" - module: "SignalWire.Skills.SkillRegistry" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillRegistry.pm" ---- -# `SkillRegistry` - -## Signature - -```perl -package SignalWire::Skills::SkillRegistry -``` - -## Methods - -### add\_skill\_directory - -#### Signature - -```perl -sub add_skill_directory($class, $path) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/Skills/SkillRegistry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillRegistry.pm) - -Line 118. - -*** - -### clear\_registry - -#### Signature - -```perl -sub clear_registry() -``` - -#### Source - -[`lib/SignalWire/Skills/SkillRegistry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillRegistry.pm) - -Line 106. - -*** - -### get\_all\_skills\_schema - -#### Signature - -```perl -sub get_all_skills_schema() -``` - -#### Source - -[`lib/SignalWire/Skills/SkillRegistry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillRegistry.pm) - -Line 54. - -*** - -### get\_factory - -#### Signature - -```perl -sub get_factory($class, $skill_name) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/Skills/SkillRegistry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillRegistry.pm) - -Line 19. - -*** - -### list\_skills - -#### Signature - -```perl -sub list_skills($class) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Skills/SkillRegistry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillRegistry.pm) - -Line 39. - -*** - -### register\_skill - -#### Signature - -```perl -sub register_skill($class, $skill_name, $skill_class) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/Skills/SkillRegistry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillRegistry.pm) - -Line 14. - -## Source - -[`lib/SignalWire/Skills/SkillRegistry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillRegistry.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/swaig/function-result/function-result/index.mdx b/fern/products/sdk-reference/perl/signal-wire/swaig/function-result/function-result/index.mdx deleted file mode 100644 index 9976530ab1..0000000000 --- a/fern/products/sdk-reference/perl/signal-wire/swaig/function-result/function-result/index.mdx +++ /dev/null @@ -1,895 +0,0 @@ ---- -slug: "/reference/perl/signal-wire/swaig/function-result/function-result" -title: "FunctionResult" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::SWAIG::FunctionResult" - module: "SignalWire.SWAIG.FunctionResult" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm" ---- -# `FunctionResult` - -SignalWire::SWAIG::FunctionResult is the Perl port of `signalwire.core.function_result.FunctionResult`. A SWAIG function handler returns one of these to tell the agent what to say and which call-control actions to perform. The action list is serialised to the wire shape the SignalWire AI engine expects. - -Most mutators return `$self` so calls chain fluently. The constructor accepts either `new(response => $text)`, the positional shorthand `new($text)`, or `new($text, post_process => 1)`. - -The class-method payment helpers (`create_payment_prompt`, `create_payment_action`, `create_payment_parameter`) may be invoked as class or instance methods — they build plain hashrefs and hold no state. - -**ADVANCED / RPC** - -`execute_swml`, `execute_rpc`, `rpc_dial`, `rpc_ai_message`, `rpc_ai_unhold`. - -**CALL CONTROL** - -`connect`, `swml_transfer`, `hangup`, `hold`, `wait_for_user`, `stop`, `join_conference`, `join_room`, `sip_refer`, `send_sms`, `pay`. - -**CORE** - -`set_response`, `set_post_process`, `add_action`, `add_actions`. - -**LICENSE** - -Copyright (c) 2025 SignalWire. Licensed under the MIT License. - -**MEDIA** - -`say`, `play_background_file`, `stop_background_file`, `record_call`, `stop_record_call`, `tap`, `stop_tap`. - -**METHODS** - -The surface mirrors the Python reference; see that documentation for the authoritative per-argument contract. Grouped by area: - -**SERIALIZATION** - -`to_hash` (the Python `to_dict` equivalent) and `to_json`. - -**SPEECH AND AI** - -`add_dynamic_hints`, `clear_dynamic_hints`, `set_end_of_speech_timeout`, `set_speech_event_timeout`, `toggle_functions`, `enable_functions_on_timeout`, `enable_extensive_data`, `update_settings`, `simulate_user_input`. - -**STATE AND DATA** - -`update_global_data`, `remove_global_data`, `set_metadata`, `remove_metadata`, `swml_user_event`, `swml_change_step`, `swml_change_context`, `switch_context`, `replace_in_history`. - -**Synopsis** - -```perl -use SignalWire::SWAIG::FunctionResult; -``` - -```perl -# Plain spoken response: -my $result = SignalWire::SWAIG::FunctionResult->new('Order placed.'); -``` - -```perl -# Response plus call-control actions (chainable, fluent style): -my $result = SignalWire::SWAIG::FunctionResult->new - ->set_response('Connecting you now.') - ->connect('+15551234567', final => 1); -``` - -```perl -my $payload = $result->to_hash; # ready for JSON emission -my $json = $result->to_json; -``` - -## Signature - -```perl -package SignalWire::SWAIG::FunctionResult -``` - -## See Also - -- SignalWire::SWAIG::RecordCall, SignalWire::SWAIG::Tap, and SignalWire::SWAIG::JoinConference for the typed closed sets accepted by `record_call`, `tap`, and `join_conference`. - -## Methods - -### add\_action - -#### Signature - -```perl -sub add_action() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 74. - -*** - -### add\_actions - -#### Signature - -```perl -sub add_actions() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 79. - -*** - -### add\_dynamic\_hints - -#### Signature - -```perl -sub add_dynamic_hints() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 301. - -*** - -### clear\_dynamic\_hints - -#### Signature - -```perl -sub clear_dynamic_hints() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 305. - -*** - -### connect - -#### Signature - -```perl -sub connect() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 86. - -*** - -### create\_payment\_action - -#### Signature - -```perl -sub create_payment_action() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 719. - -*** - -### create\_payment\_parameter - -#### Signature - -```perl -sub create_payment_parameter() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 723. - -*** - -### create\_payment\_prompt - -#### Signature - -```perl -sub create_payment_prompt() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 703. - -*** - -### enable\_extensive\_data - -#### Signature - -```perl -sub enable_extensive_data() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 327. - -*** - -### enable\_functions\_on\_timeout - -#### Signature - -```perl -sub enable_functions_on_timeout() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 322. - -*** - -### execute\_rpc - -#### Signature - -```perl -sub execute_rpc() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 628. - -*** - -### execute\_swml - -#### Signature - -```perl -sub execute_swml() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 338. - -*** - -### hangup - -#### Signature - -```perl -sub hangup() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 127. - -*** - -### hold - -#### Signature - -```perl -sub hold() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 131. - -*** - -### join\_conference - -#### Signature - -```perl -sub join_conference() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 374. - -*** - -### join\_room - -#### Signature - -```perl -sub join_room() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 486. - -*** - -### pay - -#### Signature - -```perl -sub pay() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 573. - -*** - -### play\_background\_file - -#### Signature - -```perl -sub play_background_file() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 227. - -*** - -### record\_call - -#### Signature - -```perl -sub record_call() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 239. - -*** - -### remove\_global\_data - -#### Signature - -```perl -sub remove_global_data() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 166. - -*** - -### remove\_metadata - -#### Signature - -```perl -sub remove_metadata() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 174. - -*** - -### replace\_in\_history - -#### Signature - -```perl -sub replace_in_history() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 216. - -*** - -### rpc\_ai\_message - -#### Signature - -```perl -sub rpc_ai_message() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 672. - -*** - -### rpc\_ai\_unhold - -#### Signature - -```perl -sub rpc_ai_unhold() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 687. - -*** - -### rpc\_dial - -#### Signature - -```perl -sub rpc_dial() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 651. - -*** - -### say - -#### Signature - -```perl -sub say() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 223. - -*** - -### send\_sms - -#### Signature - -```perl -sub send_sms() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 544. - -*** - -### set\_end\_of\_speech\_timeout - -#### Signature - -```perl -sub set_end_of_speech_timeout() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 310. - -*** - -### set\_metadata - -#### Signature - -```perl -sub set_metadata() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 170. - -*** - -### set\_post\_process - -#### Signature - -```perl -sub set_post_process() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 69. - -*** - -### set\_response - -#### Signature - -```perl -sub set_response() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 64. - -*** - -### set\_speech\_event\_timeout - -#### Signature - -```perl -sub set_speech_event_timeout() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 314. - -*** - -### simulate\_user\_input - -#### Signature - -```perl -sub simulate_user_input() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 697. - -*** - -### sip\_refer - -#### Signature - -```perl -sub sip_refer() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 494. - -*** - -### stop - -#### Signature - -```perl -sub stop() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 156. - -*** - -### stop\_background\_file - -#### Signature - -```perl -sub stop_background_file() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 235. - -*** - -### stop\_record\_call - -#### Signature - -```perl -sub stop_record_call() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 287. - -*** - -### stop\_tap - -#### Signature - -```perl -sub stop_tap() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 532. - -*** - -### switch\_context - -#### Signature - -```perl -sub switch_context() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 198. - -*** - -### swml\_change\_context - -#### Signature - -```perl -sub swml_change_context() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 194. - -*** - -### swml\_change\_step - -#### Signature - -```perl -sub swml_change_step() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 190. - -*** - -### swml\_transfer - -#### Signature - -```perl -sub swml_transfer() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 107. - -*** - -### swml\_user\_event - -#### Signature - -```perl -sub swml_user_event() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 178. - -*** - -### tap - -#### Signature - -```perl -sub tap() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 502. - -*** - -### to\_hash - -#### Signature - -```perl -sub to_hash() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 729. - -*** - -### to\_json - -#### Signature - -```perl -sub to_json() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 747. - -*** - -### toggle\_functions - -#### Signature - -```perl -sub toggle_functions() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 318. - -*** - -### update\_global\_data - -#### Signature - -```perl -sub update_global_data() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 162. - -*** - -### update\_settings - -#### Signature - -```perl -sub update_settings() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 332. - -*** - -### wait\_for\_user - -#### Signature - -```perl -sub wait_for_user() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 138. - -## Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/swaig/join-conference/join-conference/index.mdx b/fern/products/sdk-reference/perl/signal-wire/swaig/join-conference/join-conference/index.mdx deleted file mode 100644 index eb9c53ea35..0000000000 --- a/fern/products/sdk-reference/perl/signal-wire/swaig/join-conference/join-conference/index.mdx +++ /dev/null @@ -1,279 +0,0 @@ ---- -slug: "/reference/perl/signal-wire/swaig/join-conference/join-conference" -title: "JoinConference" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::SWAIG::JoinConference" - module: "SignalWire.SWAIG.JoinConference" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/JoinConference.pm" ---- -# `JoinConference` - -The four closed-set string parameters of SignalWire::SWAIG::FunctionResult's `join_conference` verb, surfaced as typed, named constants: - -- **BEEP** — beep behaviour: `true`, `false`, `onEnter`, or `onExit`. - -- **RECORD** — recording mode: `do-not-record` or `record-from-start`. - -- **TRIM** — silence trimming: `trim-silence` or `do-not-trim`. - -- **METHOD** — HTTP method for the status / recording-status callbacks: `GET` or `POST` (shared by `status_callback_method` and `recording_status_callback_method`). - -`join_conference` validates each inline and dies on anything outside the set, reproducing the Python reference's exact `ValueError` messages (e.g. `beep must be one of ['true', 'false', 'onEnter', 'onExit']`). This module hoists those literal sets into a single source of truth so the accepted values are discoverable and autocompletable. The constants **are** the canonical wire strings, so `join_conference`'s signature is unchanged, preserving Python parity. - -The constant **names** use shouting identifiers (`ON_ENTER`); the **values** are the camelCase wire strings the SWML verb expects (`onEnter`). - -**BEEPS / RECORDS / TRIMS / METHODS** - -my $aref = SignalWire::SWAIG::JoinConference->beeps; -my $aref = SignalWire::SWAIG::JoinConference->records; -my $aref = SignalWire::SWAIG::JoinConference->trims; -my $aref = SignalWire::SWAIG::JoinConference->methods; - -Arrayrefs of the accepted strings for each set, in the order `join_conference` lists them in its validation messages. - -**CONSTANTS** - -Exported on request via Exporter. Tags: `:beep`, `:record`, `:trim`, `:methods`, and `:all`. - -```perl -BEEP_TRUE => 'true' DO_NOT_RECORD => 'do-not-record' -BEEP_FALSE => 'false' RECORD_FROM_START => 'record-from-start' -ON_ENTER => 'onEnter' TRIM_SILENCE => 'trim-silence' -ON_EXIT => 'onExit' DO_NOT_TRIM => 'do-not-trim' -GET => 'GET' POST => 'POST' -``` - -**IS BEEP / IS RECORD / IS TRIM / IS METHOD** - -my $bool = SignalWire::SWAIG::JoinConference->is\_beep($value); -my $bool = SignalWire::SWAIG::JoinConference->is\_record($value); -my $bool = SignalWire::SWAIG::JoinConference->is\_trim($value); -my $bool = SignalWire::SWAIG::JoinConference->is\_method($value); - -True if `$value` is an accepted member of the corresponding set. Each accepts the bareword constant too (it is just the string). - -**LICENSE** - -Copyright (c) 2025 SignalWire. Licensed under the MIT License. - -**Synopsis** - -```perl -use SignalWire::SWAIG::JoinConference qw(ON_ENTER RECORD_FROM_START); -use SignalWire::SWAIG::FunctionResult; -``` - -```perl -my $result = SignalWire::SWAIG::FunctionResult->new; -``` - -```perl -# Named constants and bare wire strings are interchangeable: -$result->join_conference( 'lobby', - beep => ON_ENTER, - record => RECORD_FROM_START ); -$result->join_conference( 'lobby', - beep => 'onEnter', - record => 'record-from-start' ); -``` - -```perl -# Membership / iteration helpers: -SignalWire::SWAIG::JoinConference->is_beep('onEnter'); # 1 -@{ SignalWire::SWAIG::JoinConference->records }; # do-not-record,... -``` - -## Signature - -```perl -package SignalWire::SWAIG::JoinConference -``` - -## See Also - -- SignalWire::SWAIG::FunctionResult, SignalWire::SWAIG::RecordCall, SignalWire::SWAIG::Tap. - -## Constants - - - - - - - - - - - - - - - - - - - - - -## Methods - -### beeps - -#### Signature - -```perl -sub beeps() -``` - -#### Source - -[`lib/SignalWire/SWAIG/JoinConference.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/JoinConference.pm) - -Line 104. - -*** - -### is\_beep - -#### Signature - -```perl -sub is_beep($class, $value) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/SWAIG/JoinConference.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/JoinConference.pm) - -Line 117. - -*** - -### is\_method - -#### Signature - -```perl -sub is_method($class, $value) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/SWAIG/JoinConference.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/JoinConference.pm) - -Line 141. - -*** - -### is\_record - -#### Signature - -```perl -sub is_record($class, $value) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/SWAIG/JoinConference.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/JoinConference.pm) - -Line 125. - -*** - -### is\_trim - -#### Signature - -```perl -sub is_trim($class, $value) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/SWAIG/JoinConference.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/JoinConference.pm) - -Line 133. - -*** - -### methods - -#### Signature - -```perl -sub methods() -``` - -#### Source - -[`lib/SignalWire/SWAIG/JoinConference.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/JoinConference.pm) - -Line 113. - -*** - -### records - -#### Signature - -```perl -sub records() -``` - -#### Source - -[`lib/SignalWire/SWAIG/JoinConference.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/JoinConference.pm) - -Line 107. - -*** - -### trims - -#### Signature - -```perl -sub trims() -``` - -#### Source - -[`lib/SignalWire/SWAIG/JoinConference.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/JoinConference.pm) - -Line 110. - -## Source - -[`lib/SignalWire/SWAIG/JoinConference.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/JoinConference.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/swaig/parameter-schema/parameter-schema/index.mdx b/fern/products/sdk-reference/perl/signal-wire/swaig/parameter-schema/parameter-schema/index.mdx deleted file mode 100644 index 1167516675..0000000000 --- a/fern/products/sdk-reference/perl/signal-wire/swaig/parameter-schema/parameter-schema/index.mdx +++ /dev/null @@ -1,288 +0,0 @@ ---- -slug: "/reference/perl/signal-wire/swaig/parameter-schema/parameter-schema" -title: "ParameterSchema" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::SWAIG::ParameterSchema" - module: "SignalWire.SWAIG.ParameterSchema" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/ParameterSchema.pm" ---- -# `ParameterSchema` - -A SWAIG tool's argument schema is the JSON-Schema `parameters` object that SignalWire::Agent::AgentBase's `define_tool` renders into the SWAIG function block. It is normally written by hand as nested hashrefs. This class builds the **exact same hashref** through a fluent, named, typed API: `->to_hash` returns the identical `{ type => 'object', properties => {...}, required => [...] }` structure a hand-written literal produces, byte for byte (`required` is omitted when no property was marked required, just as hand-written schemas omit it). - -It is a **convenience over the same wire output, not a new format**. The untyped-hashref path into `define_tool` is unchanged and still accepted, so Python parity and every existing caller keep working; the builder is purely additive (see PORT\_ADDITIONS.md). This is the Perl realisation of the cross-port Tier-2 flagship idiom: a typed SWAIG tool-parameter builder. - -**LICENSE** - -Copyright (c) 2025 SignalWire. Licensed under the MIT License. - -**MARKING REQUIRED FIELDS** - -- `->required(@names)` — mark already-declared properties required. Accumulates across calls and de-duplicates on emit, preserving first-seen order. Equivalent to passing `required => 1` on each kind call. - -**NEW** - -my $schema = SignalWire::SWAIG::ParameterSchema->new; - -Construct an empty builder. - -**PROPERTY KINDS** - -Each kind method has the form `->KIND($name, $description, %opts)` and returns `$self` so calls chain. The `$description` second positional is the LLM-facing prompt text (it may also be given as `description => ...` in `%opts`). `%opts` carries the optional facets: `required => 1` (shorthand for also calling `->required($name)`), `default => ...`, `enum => [...]`, `format => ...`, and any other JSON-Schema keyword, emitted verbatim in caller-given order. - -- `->string($name, $desc, %opts)` — `{ type => 'string' }`. - -- `->number($name, $desc, %opts)` — `{ type => 'number' }`. - -- `->integer($name, $desc, %opts)` — `{ type => 'integer' }`. - -- `->boolean($name, $desc, %opts)` — `{ type => 'boolean' }`. - -- `->enum($name, $values, $desc, %opts)` — a closed-set string, `{ type => 'string', enum => [ @$values ] }`. `$values` is an arrayref of accepted values; pass a Tier-1 constant set directly (`SignalWire::SWAIG::RecordCall->formats`, `SignalWire::SWAIG::Tap->codecs`, ...) so the schema's `enum` is single-sourced from the same closed set the verb validates against. Pass `type => 'integer'` in `%opts` for a numeric enum. - -- `->array($name, $desc, %opts)` — `{ type => 'array' }`, with an optional `of => ...` element spec rendered as `items`. `of` may be a kind-name string (`'string'`, `'object'`, ...), a nested `ParameterSchema`, or a raw hashref items schema. Omit `of` for an untyped array. - -- `->object($name, $desc, %opts)` — `{ type => 'object' }`, with an optional `properties => ...` nested spec. `properties` may be a nested `ParameterSchema`, a coderef called with a fresh child schema, or a raw hashref. The nested `properties`/`required` are spliced in. Omit `properties` for an open object. - -**REQUIRED** - -$schema->required('a', 'b'); - -Mark properties required. See \["Marking required fields"]\(Marking required fields). Returns `$self`. - -**STRING / NUMBER / INTEGER / BOOLEAN / ENUM / ARRAY / OBJECT** - -Add a property of the named kind. See \["Property kinds"]\(Property kinds). Each returns `$self`. Dies on a duplicate property name. - -**TO DICT** - -Alias for "to\_hash", matching the SDK's serialiser naming. Identical output. - -**TO HASH** - -my $params = $schema->to\_hash; - -Render the JSON-Schema `parameters` hashref. `required` is omitted when empty. The result is is\_deeply- and JSON-identical to the equivalent hand-written literal and shares no references with the builder's internal state. - -**Synopsis** - -```perl -use SignalWire::SWAIG::ParameterSchema; -use SignalWire::SWAIG::RecordCall; -``` - -```perl -my $params = SignalWire::SWAIG::ParameterSchema->new - ->string('service', 'The service to book') - ->string('date', 'Appointment date, YYYY-MM-DD') - ->enum('format', SignalWire::SWAIG::RecordCall->formats, - 'Recording container format') - ->integer('seats', 'How many seats', default => 1) - ->required('service', 'date') - ->to_hash; -``` - -```perl -# $params is the SAME hashref you would have hand-written: -# { -# type => 'object', -# properties => { -# service => { type => 'string', description => 'The service to book' }, -# date => { type => 'string', description => 'Appointment date, YYYY-MM-DD' }, -# format => { type => 'string', description => 'Recording container format', -# enum => ['wav','mp3','mp4'] }, -# seats => { type => 'integer', description => 'How many seats', default => 1 }, -# }, -# required => ['service','date'], -# } -``` - -```perl -$agent->define_tool( - name => 'book_appointment', - description => 'Book an appointment for a service on a date.', - parameters => $params, # typed-built, same wire shape - handler => sub { ... }, -); -``` - -## Signature - -```perl -package SignalWire::SWAIG::ParameterSchema -``` - -## See Also - -- SignalWire::Agent::AgentBase (`define_tool`), SignalWire::SWML::Service (`define_tool`), SignalWire::SWAIG::RecordCall, SignalWire::SWAIG::Tap (Tier-1 closed-set constant sets that drop into `->enum`), SignalWire::POM::Section (sibling Tier-2 typed-builder idiom). - -## Methods - -### array - -#### Signature - -```perl -sub array() -``` - -#### Source - -[`lib/SignalWire/SWAIG/ParameterSchema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/ParameterSchema.pm) - -Line 149. - -*** - -### boolean - -#### Signature - -```perl -sub boolean() -``` - -#### Source - -[`lib/SignalWire/SWAIG/ParameterSchema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/ParameterSchema.pm) - -Line 118. - -*** - -### enum - -#### Signature - -```perl -sub enum() -``` - -#### Source - -[`lib/SignalWire/SWAIG/ParameterSchema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/ParameterSchema.pm) - -Line 129. - -*** - -### integer - -#### Signature - -```perl -sub integer() -``` - -#### Source - -[`lib/SignalWire/SWAIG/ParameterSchema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/ParameterSchema.pm) - -Line 113. - -*** - -### number - -#### Signature - -```perl -sub number() -``` - -#### Source - -[`lib/SignalWire/SWAIG/ParameterSchema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/ParameterSchema.pm) - -Line 108. - -*** - -### object - -#### Signature - -```perl -sub object() -``` - -#### Source - -[`lib/SignalWire/SWAIG/ParameterSchema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/ParameterSchema.pm) - -Line 176. - -*** - -### required - -#### Signature - -```perl -sub required() -``` - -#### Source - -[`lib/SignalWire/SWAIG/ParameterSchema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/ParameterSchema.pm) - -Line 189. - -*** - -### string - -#### Signature - -```perl -sub string() -``` - -#### Source - -[`lib/SignalWire/SWAIG/ParameterSchema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/ParameterSchema.pm) - -Line 103. - -*** - -### to\_dict - -#### Signature - -```perl -sub to_dict() -``` - -#### Source - -[`lib/SignalWire/SWAIG/ParameterSchema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/ParameterSchema.pm) - -Line 230. - -*** - -### to\_hash - -#### Signature - -```perl -sub to_hash() -``` - -#### Source - -[`lib/SignalWire/SWAIG/ParameterSchema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/ParameterSchema.pm) - -Line 210. - -## Source - -[`lib/SignalWire/SWAIG/ParameterSchema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/ParameterSchema.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/swaig/record-call/record-call/index.mdx b/fern/products/sdk-reference/perl/signal-wire/swaig/record-call/record-call/index.mdx deleted file mode 100644 index 16fe1cc9c1..0000000000 --- a/fern/products/sdk-reference/perl/signal-wire/swaig/record-call/record-call/index.mdx +++ /dev/null @@ -1,192 +0,0 @@ ---- -slug: "/reference/perl/signal-wire/swaig/record-call/record-call" -title: "RecordCall" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::SWAIG::RecordCall" - module: "SignalWire.SWAIG.RecordCall" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/RecordCall.pm" ---- -# `RecordCall` - -The two closed-set string parameters of SignalWire::SWAIG::FunctionResult's `record_call` verb, surfaced as typed, named constants: - -- **FORMAT** — the recording container: `wav`, `mp3`, or `mp4`. - -- **DIRECTION** — which audio channel(s) to capture: `speak`, `listen`, or `both`. - -These sets are not merely advisory. `record_call` validates both inline and dies on anything outside the set; this module hoists those literal sets into a single source of truth so the accepted values are discoverable and autocompletable instead of living only inside the `die` strings. The constants **are** the canonical wire strings, so `record_call`'s signature is unchanged — it still takes plain `format => ...` / `direction => ...` strings, preserving Python parity. - -The record `direction` here is the write-side record-channel selector. It is unrelated to the read-only inbound/outbound `direction` field on Relay message events, and it uses `listen` where SignalWire::SWAIG::Tap uses `hear` — the two vocabularies must never be unified. - -**CONSTANTS** - -Exported on request via Exporter. The `:formats` tag pulls `WAV`/`MP3`/`MP4`; `:directions` pulls `SPEAK`/`LISTEN`/`BOTH`; `:all` pulls every constant. - -```perl -WAV => 'wav' SPEAK => 'speak' -MP3 => 'mp3' LISTEN => 'listen' -MP4 => 'mp4' BOTH => 'both' -``` - -**DIRECTIONS** - -my $aref = SignalWire::SWAIG::RecordCall->directions; - -Arrayref of the accepted record-direction strings. - -**FORMATS** - -my $aref = SignalWire::SWAIG::RecordCall->formats; - -Arrayref of the accepted format strings, in the order `record_call` lists them in its validation message. - -**IS DIRECTION** - -my $bool = SignalWire::SWAIG::RecordCall->is\_direction($value); - -True if `$value` is an accepted record direction. - -**IS FORMAT** - -my $bool = SignalWire::SWAIG::RecordCall->is\_format($value); - -True if `$value` is an accepted recording format. Accepts the bareword constant too (it is just the string). - -**LICENSE** - -Copyright (c) 2025 SignalWire. Licensed under the MIT License. - -**Synopsis** - -```perl -use SignalWire::SWAIG::RecordCall qw(MP3 BOTH); -use SignalWire::SWAIG::FunctionResult; -``` - -```perl -my $result = SignalWire::SWAIG::FunctionResult->new; -``` - -```perl -# Named constants and bare wire strings are interchangeable: -$result->record_call( format => MP3, direction => BOTH ); -$result->record_call( format => 'mp3', direction => 'both' ); -``` - -```perl -# Membership / iteration helpers: -SignalWire::SWAIG::RecordCall->is_format('mp3'); # 1 -SignalWire::SWAIG::RecordCall->is_direction('hear'); # 0 (that's tap's word) -@{ SignalWire::SWAIG::RecordCall->formats }; # ('wav','mp3','mp4') -``` - -## Signature - -```perl -package SignalWire::SWAIG::RecordCall -``` - -## See Also - -- SignalWire::SWAIG::FunctionResult, SignalWire::SWAIG::Tap, SignalWire::SWAIG::JoinConference, SignalWire::Skills::SkillName, SignalWire::Logging::LogLevel. - -## Constants - - - - - - - - - - - - - -## Methods - -### directions - -#### Signature - -```perl -sub directions() -``` - -#### Source - -[`lib/SignalWire/SWAIG/RecordCall.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/RecordCall.pm) - -Line 83. - -*** - -### formats - -#### Signature - -```perl -sub formats() -``` - -#### Source - -[`lib/SignalWire/SWAIG/RecordCall.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/RecordCall.pm) - -Line 78. - -*** - -### is\_direction - -#### Signature - -```perl -sub is_direction($class, $value) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/SWAIG/RecordCall.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/RecordCall.pm) - -Line 97. - -*** - -### is\_format - -#### Signature - -```perl -sub is_format($class, $value) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/SWAIG/RecordCall.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/RecordCall.pm) - -Line 89. - -## Source - -[`lib/SignalWire/SWAIG/RecordCall.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/RecordCall.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/swaig/tap/tap/index.mdx b/fern/products/sdk-reference/perl/signal-wire/swaig/tap/tap/index.mdx deleted file mode 100644 index 94ad60d6e1..0000000000 --- a/fern/products/sdk-reference/perl/signal-wire/swaig/tap/tap/index.mdx +++ /dev/null @@ -1,190 +0,0 @@ ---- -slug: "/reference/perl/signal-wire/swaig/tap/tap" -title: "Tap" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::SWAIG::Tap" - module: "SignalWire.SWAIG.Tap" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/Tap.pm" ---- -# `Tap` - -The two closed-set string parameters of SignalWire::SWAIG::FunctionResult's `tap` verb, surfaced as typed, named constants: - -- **DIRECTION** — which audio channel(s) to tap: `speak`, `hear`, or `both`. - -- **CODEC** — the RTP codec for the tapped media: `PCMU` or `PCMA`. - -`tap` validates both inline and dies on anything outside the set; this module hoists those literal sets into a single source of truth so the accepted values are discoverable and autocompletable instead of living only inside the `die` strings. The constants **are** the canonical wire strings, so `tap`'s signature is unchanged. - -**Distinct from RecordCall.** The tap direction set is `{speak, hear, both}`: the inbound-listen channel is `hear`, not `record_call`'s `listen`. Likewise this two-value codec set `{PCMU, PCMA}` is the SWAIG-tap codec set only — a strict subset of the RELAY connect/stream codec superset (`PCMU`, `PCMA`, `OPUS`, `G722`, ...). These vocabularies must never be conflated. - -**CODECS** - -my $aref = SignalWire::SWAIG::Tap->codecs; - -Arrayref of the accepted tap-codec strings. - -**CONSTANTS** - -Exported on request via Exporter. The `:directions` tag pulls `SPEAK`/`HEAR`/`BOTH`; `:codecs` pulls `PCMU`/`PCMA`; `:all` pulls every constant. - -```perl -SPEAK => 'speak' PCMU => 'PCMU' -HEAR => 'hear' PCMA => 'PCMA' -BOTH => 'both' -``` - -**DIRECTIONS** - -my $aref = SignalWire::SWAIG::Tap->directions; - -Arrayref of the accepted tap-direction strings. - -**IS CODEC** - -my $bool = SignalWire::SWAIG::Tap->is\_codec($value); - -True if `$value` is an accepted tap codec. - -**IS DIRECTION** - -my $bool = SignalWire::SWAIG::Tap->is\_direction($value); - -True if `$value` is an accepted tap direction. Accepts the bareword constant too (it is just the string). - -**LICENSE** - -Copyright (c) 2025 SignalWire. Licensed under the MIT License. - -**Synopsis** - -```perl -use SignalWire::SWAIG::Tap qw(SPEAK HEAR BOTH PCMU PCMA); -use SignalWire::SWAIG::FunctionResult; -``` - -```perl -my $result = SignalWire::SWAIG::FunctionResult->new; -``` - -```perl -# Named constants and bare wire strings are interchangeable: -$result->tap( 'rtp://1.2.3.4:5000', direction => HEAR, codec => PCMA ); -$result->tap( 'rtp://1.2.3.4:5000', direction => 'hear', codec => 'PCMA' ); -``` - -```perl -# Membership / iteration helpers: -SignalWire::SWAIG::Tap->is_direction('hear'); # 1 -SignalWire::SWAIG::Tap->is_codec('OPUS'); # 0 (RELAY-only codec) -@{ SignalWire::SWAIG::Tap->codecs }; # ('PCMU','PCMA') -``` - -## Signature - -```perl -package SignalWire::SWAIG::Tap -``` - -## See Also - -- SignalWire::SWAIG::FunctionResult, SignalWire::SWAIG::RecordCall, SignalWire::SWAIG::JoinConference. - -## Constants - - - - - - - - - - - -## Methods - -### codecs - -#### Signature - -```perl -sub codecs() -``` - -#### Source - -[`lib/SignalWire/SWAIG/Tap.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/Tap.pm) - -Line 85. - -*** - -### directions - -#### Signature - -```perl -sub directions() -``` - -#### Source - -[`lib/SignalWire/SWAIG/Tap.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/Tap.pm) - -Line 80. - -*** - -### is\_codec - -#### Signature - -```perl -sub is_codec($class, $value) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/SWAIG/Tap.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/Tap.pm) - -Line 99. - -*** - -### is\_direction - -#### Signature - -```perl -sub is_direction($class, $value) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/SWAIG/Tap.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/Tap.pm) - -Line 91. - -## Source - -[`lib/SignalWire/SWAIG/Tap.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/Tap.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/swml/document/document/index.mdx b/fern/products/sdk-reference/perl/signal-wire/swml/document/document/index.mdx deleted file mode 100644 index 317473d377..0000000000 --- a/fern/products/sdk-reference/perl/signal-wire/swml/document/document/index.mdx +++ /dev/null @@ -1,200 +0,0 @@ ---- -slug: "/reference/perl/signal-wire/swml/document/document" -title: "Document" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::SWML::Document" - module: "SignalWire.SWML.Document" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Document.pm" ---- -# `Document` - -## Signature - -```perl -package SignalWire::SWML::Document -``` - -## Methods - -### add\_raw\_verb - -#### Signature - -```perl -sub add_raw_verb($section_name, $verb_hash) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/SWML/Document.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Document.pm) - -Line 30. - -*** - -### add\_section - -#### Signature - -```perl -sub add_section($name) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/SWML/Document.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Document.pm) - -Line 17. - -*** - -### add\_verb - -#### Signature - -```perl -sub add_verb($section_name, $verb_name, $verb_data) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/SWML/Document.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Document.pm) - -Line 23. - -*** - -### clear\_section - -#### Signature - -```perl -sub clear_section($name) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/SWML/Document.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Document.pm) - -Line 47. - -*** - -### get\_section - -#### Signature - -```perl -sub get_section($name) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/SWML/Document.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Document.pm) - -Line 37. - -*** - -### has\_section - -#### Signature - -```perl -sub has_section($name) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/SWML/Document.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Document.pm) - -Line 42. - -*** - -### to\_hash - -#### Signature - -```perl -sub to_hash() -``` - -#### Source - -[`lib/SignalWire/SWML/Document.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Document.pm) - -Line 53. - -*** - -### to\_json - -#### Signature - -```perl -sub to_json() -``` - -#### Source - -[`lib/SignalWire/SWML/Document.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Document.pm) - -Line 61. - -*** - -### to\_pretty\_json - -#### Signature - -```perl -sub to_pretty_json() -``` - -#### Source - -[`lib/SignalWire/SWML/Document.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Document.pm) - -Line 66. - -## Source - -[`lib/SignalWire/SWML/Document.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Document.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/swml/schema/schema/index.mdx b/fern/products/sdk-reference/perl/signal-wire/swml/schema/schema/index.mdx deleted file mode 100644 index 3b596fe6f8..0000000000 --- a/fern/products/sdk-reference/perl/signal-wire/swml/schema/schema/index.mdx +++ /dev/null @@ -1,134 +0,0 @@ ---- -slug: "/reference/perl/signal-wire/swml/schema/schema" -title: "Schema" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::SWML::Schema" - module: "SignalWire.SWML.Schema" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Schema.pm" ---- -# `Schema` - -## Signature - -```perl -package SignalWire::SWML::Schema -``` - -## Methods - -### BUILD - -#### Signature - -```perl -sub BUILD() -``` - -#### Source - -[`lib/SignalWire/SWML/Schema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Schema.pm) - -Line 21. - -*** - -### get\_verb - -#### Signature - -```perl -sub get_verb($name) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/SWML/Schema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Schema.pm) - -Line 83. - -*** - -### get\_verb\_names - -#### Signature - -```perl -sub get_verb_names() -``` - -#### Source - -[`lib/SignalWire/SWML/Schema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Schema.pm) - -Line 73. - -*** - -### has\_verb - -#### Signature - -```perl -sub has_verb($name) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/SWML/Schema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Schema.pm) - -Line 78. - -*** - -### instance - -#### Signature - -```perl -sub instance($class) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/SWML/Schema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Schema.pm) - -Line 67. - -*** - -### verb\_count - -#### Signature - -```perl -sub verb_count() -``` - -#### Source - -[`lib/SignalWire/SWML/Schema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Schema.pm) - -Line 88. - -## Source - -[`lib/SignalWire/SWML/Schema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Schema.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/swml/service/service/index.mdx b/fern/products/sdk-reference/perl/signal-wire/swml/service/service/index.mdx deleted file mode 100644 index 5857dae8e8..0000000000 --- a/fern/products/sdk-reference/perl/signal-wire/swml/service/service/index.mdx +++ /dev/null @@ -1,474 +0,0 @@ ---- -slug: "/reference/perl/signal-wire/swml/service/service" -title: "Service" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::SWML::Service" - module: "SignalWire.SWML.Service" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm" ---- -# `Service` - -## Signature - -```perl -package SignalWire::SWML::Service -``` - -## Methods - -### can - -#### Signature - -```perl -sub can($method) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) - -Line 146. - -*** - -### define\_tool - -#### Signature - -```perl -sub define_tool(%opts) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) - -Line 402. - -*** - -### define\_tools - -#### Signature - -```perl -sub define_tools(@tool_defs) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) - -Line 468. - -*** - -### extract\_sip\_username - -#### Signature - -```perl -sub extract_sip_username($class_or_self, $request_body) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) - -Line 235. - -*** - -### get\_all\_functions - -#### Signature - -```perl -sub get_all_functions() -``` - -#### Source - -[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) - -Line 452. - -*** - -### get\_basic\_auth\_credentials - -#### Signature - -```perl -sub get_basic_auth_credentials($include_source) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) - -Line 199. - -*** - -### get\_basic\_auth\_credentials\_with\_source - -#### Signature - -```perl -sub get_basic_auth_credentials_with_source() -``` - -#### Source - -[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) - -Line 219. - -*** - -### get\_function - -#### Signature - -```perl -sub get_function($name) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) - -Line 445. - -*** - -### handle\_additional\_route - -#### Signature - -```perl -sub handle_additional_route($sub_path, $request_data, $env) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) - -Line 509. - -*** - -### has\_function - -#### Signature - -```perl -sub has_function($name) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) - -Line 438. - -*** - -### list\_tool\_names - -#### Signature - -```perl -sub list_tool_names() -``` - -#### Source - -[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) - -Line 492. - -*** - -### on\_function\_call - -#### Signature - -```perl -sub on_function_call($name, $args, $raw_data) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) - -Line 484. - -*** - -### on\_request - -#### Signature - -```perl -sub on_request($request_data, $callback_path) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) - -Line 377. - -*** - -### on\_swml\_request - -#### Signature - -```perl -sub on_swml_request($request_data, $callback_path, $request) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) - -Line 390. - -*** - -### register\_routing\_callback - -#### Signature - -```perl -sub register_routing_callback($path, $cb) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) - -Line 515. - -*** - -### register\_swaig\_function - -#### Signature - -```perl -sub register_swaig_function($func_def) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) - -Line 427. - -*** - -### remove\_function - -#### Signature - -```perl -sub remove_function($name) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) - -Line 459. - -*** - -### render\_main\_swml - -#### Signature - -```perl -sub render_main_swml($env) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) - -Line 356. - -*** - -### render\_swml - -#### Signature - -```perl -sub render_swml($env) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) - -Line 362. - -*** - -### swaig\_pre\_dispatch - -#### Signature - -```perl -sub swaig_pre_dispatch($request_data, $func_name, $env) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) - -Line 501. - -*** - -### to\_psgi\_app - -#### Signature - -```perl -sub to_psgi_app() -``` - -#### Source - -[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) - -Line 299. - -*** - -### validate\_basic\_auth - -#### Signature - -```perl -sub validate_basic_auth($username, $password) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) - -Line 186. - -## Source - -[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) - -Line 1. diff --git a/fern/products/sdk-reference/php/_meta.json b/fern/products/sdk-reference/php/_meta.json index 86e5c7a2ce..3851088432 100644 --- a/fern/products/sdk-reference/php/_meta.json +++ b/fern/products/sdk-reference/php/_meta.json @@ -6,5 +6,5 @@ "format": "mdx", "platform": "fern", "base_slug": "/reference/php", - "item_count": 1615 + "item_count": 1633 } \ No newline at end of file diff --git a/fern/products/sdk-reference/php/agents/contexts/contexts/context-builder/index.mdx b/fern/products/sdk-reference/php/agents/contexts/contexts/context-builder/index.mdx new file mode 100644 index 0000000000..1ab2337575 --- /dev/null +++ b/fern/products/sdk-reference/php/agents/contexts/contexts/context-builder/index.mdx @@ -0,0 +1,287 @@ +--- +slug: "/reference/php/agents/contexts/contexts/context-builder" +title: "ContextBuilder" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Contexts\\ContextBuilder" + parent: "agents.Contexts.Contexts" + module: "agents.Contexts.Contexts" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php" +--- +# `ContextBuilder` + +Builder for multi-step, multi-context AI agent workflows. + +A ContextBuilder owns one or more Contexts; each Context owns an +ordered list of Steps. Only one context and one step is active at a +time. Per chat turn, the runtime injects the current step's +instructions as a system message, then asks the LLM for a response. + +## Native tools auto-injected by the runtime + +When a step (or its enclosing context) declares valid\_steps or +valid\_contexts, the runtime auto-injects two native tools so the +model can navigate the flow: + +- next\_step(step: enum) — present when valid\_steps is set +- change\_context(context: enum) — present when valid\_contexts is set + +A third native tool — gather\_submit — is injected during gather\_info +questioning. These three names are reserved: validate() rejects any +agent that defines a SWAIG tool with one of them. See the +RESERVED\_NATIVE\_TOOL\_NAMES constant. + +## Function whitelisting (Step::setFunctions) + +Each step may declare a functions whitelist. The whitelist is +applied in-memory at the start of each LLM turn. CRITICALLY: if a +step does NOT declare a functions field, it INHERITS the previous +step's active set. See Step::setFunctions for details and examples. + +## Signature + +```php +class ContextBuilder +``` + +## Methods + +### \_\_construct + +Construct a builder. The optional $agent reference mirrors Python's + +ContextBuilder(agent) so callers (typically AgentBase) can hand the +builder a reference to the owning agent for tool-name collision +checks during validate(). + +If $agent has a method named getRegisteredToolNames() returning an +array of strings, validate() will use it automatically — no +separate attachToolNameSupplier() call required. + +#### Signature + +```php +public function __construct(?object $agent = NULL) +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 1090. + +*** + +### addContext + +Add a new context and return it for further configuration. + +#### Signature + +```php +public function addContext(string $name): SignalWire\Contexts\Context +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Contexts\Context` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 1128. + +*** + +### attachToolNameSupplier + +Attach a callable that returns registered SWAIG tool names so + +validate() can check them against RESERVED\_NATIVE\_TOOL\_NAMES. +Called internally by AgentBase::defineContexts(). + +#### Signature + +```php +public function attachToolNameSupplier( + callable $supplier +): SignalWire\Contexts\ContextBuilder +``` + +#### Parameters + + + () => array<string> + + +#### Returns + +`SignalWire\Contexts\ContextBuilder` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 1107. + +*** + +### createSimpleContext + +Create a builder pre-populated with a single named context. + +**Modifiers:** `static` + +#### Signature + +```php +public static function createSimpleContext(string $name): SignalWire\Contexts\ContextBuilder +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Contexts\ContextBuilder` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 1343. + +*** + +### getContext + +Get an existing context by name, or null if not found. + +#### Signature + +```php +public function getContext(string $name): ?SignalWire\Contexts\Context +``` + +#### Parameters + + + +#### Returns + +`?SignalWire\Contexts\Context` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 1149. + +*** + +### hasContexts + +#### Signature + +```php +public function hasContexts(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 1154. + +*** + +### reset + +Remove all contexts, returning the builder to its initial state. + +Use this in a dynamic config callback when you need to rebuild +contexts from scratch for a specific request. + +#### Signature + +```php +public function reset(): SignalWire\Contexts\ContextBuilder +``` + +#### Returns + +`SignalWire\Contexts\ContextBuilder` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 1118. + +*** + +### toArray + +Serialize all contexts in order. Validates before converting. + +#### Signature + +```php +public function toArray(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 1323. + +*** + +### validate + +Validate the contexts configuration. + +#### Signature + +```php +public function validate(): array +``` + +#### Returns + +`array` — Array of error strings (empty if valid) + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 1164. + +## Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 1058. diff --git a/fern/products/sdk-reference/php/agents/contexts/contexts/context/index.mdx b/fern/products/sdk-reference/php/agents/contexts/contexts/context/index.mdx new file mode 100644 index 0000000000..3462eac8bf --- /dev/null +++ b/fern/products/sdk-reference/php/agents/contexts/contexts/context/index.mdx @@ -0,0 +1,809 @@ +--- +slug: "/reference/php/agents/contexts/contexts/context" +title: "Context" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Contexts\\Context" + parent: "agents.Contexts.Contexts" + module: "agents.Contexts.Contexts" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php" +--- +# `Context` + +## Signature + +```php +class Context +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(string $name) +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 587. + +*** + +### addBullets + +#### Signature + +```php +public function addBullets(string $title, array $bullets): SignalWire\Contexts\Context +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire\Contexts\Context` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 715. + +*** + +### addEnterFiller + +Add enter fillers for a specific language. + +Mirrors Python's Context.add\_enter\_filler(language\_code: str, fillers: +List\[str]) — pass a list of phrases to associate with this language code. + +#### Signature + +```php +public function addEnterFiller( + string $language_code, + array $fillers +): SignalWire\Contexts\Context +``` + +#### Parameters + + + Language code (e.g. "en-US", "es") or "default" for catch-all. + + + + List of filler phrases. + + +#### Returns + +`SignalWire\Contexts\Context` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 880. + +*** + +### addExitFiller + +Add exit fillers for a specific language. + +Mirrors Python's Context.add\_exit\_filler(language\_code: str, fillers: +List\[str]) — pass a list of phrases to associate with this language code. + +#### Signature + +```php +public function addExitFiller( + string $language_code, + array $fillers +): SignalWire\Contexts\Context +``` + +#### Parameters + + + Language code (e.g. "en-US", "es") or "default" for catch-all. + + + + List of filler phrases. + + +#### Returns + +`SignalWire\Contexts\Context` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 902. + +*** + +### addSection + +#### Signature + +```php +public function addSection(string $title, string $body): SignalWire\Contexts\Context +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire\Contexts\Context` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 704. + +*** + +### addStep + +Add a new step to this context. + +When called with only $name the returned Step can be configured with +the usual method-chaining API. When the optional keyword arguments are +supplied the step is fully configured in one call: + +#### Signature + +```php +public function addStep( + string $name, + ?string $task = NULL, + ?array $bullets = NULL, + ?string $criteria = NULL, + $functions = NULL, + ?array $valid_steps = NULL +): SignalWire\Contexts\Step +``` + +#### Parameters + + + Step name (must be unique within the context). + + + + Text for the "Task" section (≡ addSection("Task", $task)). + + + + List of bullet strings for the "Process" section (≡ addBullets("Process", $bullets)). Requires $task to also be set. + + + + Step-completion criteria (≡ setStepCriteria()). + + + + Tool names the step may call, or 'none' (≡ setFunctions()). + + + + Names of steps the agent may transition to (≡ setValidSteps()). + + +#### Returns + +`SignalWire\Contexts\Step` — The configured Step object for optional further chaining. + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 619. + +*** + +### addSystemBullets + +#### Signature + +```php +public function addSystemBullets( + string $title, + array $bullets +): SignalWire\Contexts\Context +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire\Contexts\Context` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 750. + +*** + +### addSystemSection + +#### Signature + +```php +public function addSystemSection( + string $title, + string $body +): SignalWire\Contexts\Context +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire\Contexts\Context` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 739. + +*** + +### getInitialStep + +#### Signature + +```php +public function getInitialStep(): ?string +``` + +#### Returns + +`?string` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 777. + +*** + +### getName + +#### Signature + +```php +public function getName(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 592. + +*** + +### getStep + +#### Signature + +```php +public function getStep(string $name): ?SignalWire\Contexts\Step +``` + +#### Parameters + + + +#### Returns + +`?SignalWire\Contexts\Step` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 659. + +*** + +### getStepOrder + +#### Signature + +```php +public function getStepOrder(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 927. + +*** + +### getSteps + +#### Signature + +```php +public function getSteps(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 919. + +*** + +### getValidContexts + +#### Signature + +```php +public function getValidContexts(): ?array +``` + +#### Returns + +`?array` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 932. + +*** + +### moveStep + +#### Signature + +```php +public function moveStep(string $name, int $position): SignalWire\Contexts\Context +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire\Contexts\Context` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 676. + +*** + +### removeStep + +#### Signature + +```php +public function removeStep(string $name): SignalWire\Contexts\Context +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Contexts\Context` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 664. + +*** + +### setConsolidate + +#### Signature + +```php +public function setConsolidate(bool $consolidate): SignalWire\Contexts\Context +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Contexts\Context` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 800. + +*** + +### setEnterFillers + +Set fillers played by the AI when entering this context. + +#### Signature + +```php +public function setEnterFillers(array $enter_fillers): SignalWire\Contexts\Context +``` + +#### Parameters + + + Map of language code ("en-US" / "default") to a list of phrases. + + +#### Returns + +`SignalWire\Contexts\Context` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 852. + +*** + +### setExitFillers + +Set fillers played by the AI when leaving this context. + +#### Signature + +```php +public function setExitFillers(array $exit_fillers): SignalWire\Contexts\Context +``` + +#### Parameters + + + Map of language code ("en-US" / "default") to a list of phrases. + + +#### Returns + +`SignalWire\Contexts\Context` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 864. + +*** + +### setFullReset + +#### Signature + +```php +public function setFullReset(bool $fullReset): SignalWire\Contexts\Context +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Contexts\Context` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 806. + +*** + +### setInitialStep + +Set which step the context starts on when entered. + +By default, a context starts on its first step (index 0). Use +this to skip a preamble step on re-entry via change\_context. + +#### Signature + +```php +public function setInitialStep(string $stepName): SignalWire\Contexts\Context +``` + +#### Parameters + + + name of the step to start on. + + +#### Returns + +`SignalWire\Contexts\Context` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 771. + +*** + +### setIsolated + +Mark this context as isolated — entering it wipes conversation + +history. + +When $isolated = true and the context is entered via +change\_context, the runtime wipes the conversation array. The +model starts fresh with only the new context's system\_prompt + +step instructions, with no memory of prior turns. + +EXCEPTION — reset overrides the wipe: +If the context also has a reset configuration (via +setConsolidate or setFullReset), the wipe is skipped in +favor of the reset behavior. Use reset with consolidate=true +to summarize prior history into a single message instead of +dropping it entirely. + +Use cases: switching to a sensitive billing flow that should +not see prior small-talk; handing off to a different agent +persona; resetting after a long off-topic detour. + +#### Signature + +```php +public function setIsolated(bool $isolated): SignalWire\Contexts\Context +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Contexts\Context` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 838. + +*** + +### setPostPrompt + +#### Signature + +```php +public function setPostPrompt(string $postPrompt): SignalWire\Contexts\Context +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Contexts\Context` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 794. + +*** + +### setPrompt + +#### Signature + +```php +public function setPrompt(string $prompt): SignalWire\Contexts\Context +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Contexts\Context` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 693. + +*** + +### setSystemPrompt + +#### Signature + +```php +public function setSystemPrompt(string $systemPrompt): SignalWire\Contexts\Context +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Contexts\Context` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 728. + +*** + +### setUserPrompt + +#### Signature + +```php +public function setUserPrompt(string $userPrompt): SignalWire\Contexts\Context +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Contexts\Context` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 812. + +*** + +### setValidContexts + +#### Signature + +```php +public function setValidContexts(array $contexts): SignalWire\Contexts\Context +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Contexts\Context` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 782. + +*** + +### setValidSteps + +#### Signature + +```php +public function setValidSteps(array $steps): SignalWire\Contexts\Context +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Contexts\Context` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 788. + +*** + +### toArray + +#### Signature + +```php +public function toArray(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 965. + +## Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 546. diff --git a/fern/products/sdk-reference/php/agents/contexts/contexts/gather-info/index.mdx b/fern/products/sdk-reference/php/agents/contexts/contexts/gather-info/index.mdx new file mode 100644 index 0000000000..bf1e2d752d --- /dev/null +++ b/fern/products/sdk-reference/php/agents/contexts/contexts/gather-info/index.mdx @@ -0,0 +1,161 @@ +--- +slug: "/reference/php/agents/contexts/contexts/gather-info" +title: "GatherInfo" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Contexts\\GatherInfo" + parent: "agents.Contexts.Contexts" + module: "agents.Contexts.Contexts" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php" +--- +# `GatherInfo` + +## Signature + +```php +class GatherInfo +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct( + ?string $outputKey = NULL, + ?string $completionAction = NULL, + ?string $prompt = NULL +) +``` + +#### Parameters + + + + + + + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 99. + +*** + +### addQuestion + +Add a question to gather. + +#### Signature + +```php +public function addQuestion( + string $key, + string $question, + array $kwargs = array ( +) +): SignalWire\Contexts\GatherInfo +``` + +#### Parameters + + + Key name for storing the answer in global\_data. + + + + The question text to ask. + + + + Optional named arguments forwarded to GatherQuestion. + + +#### Returns + +`SignalWire\Contexts\GatherInfo` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 117. + +*** + +### getCompletionAction + +#### Signature + +```php +public function getCompletionAction(): ?string +``` + +#### Returns + +`?string` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 138. + +*** + +### getQuestions + +#### Signature + +```php +public function getQuestions(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 133. + +*** + +### toArray + +#### Signature + +```php +public function toArray(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 143. + +## Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 91. diff --git a/fern/products/sdk-reference/php/agents/contexts/contexts/gather-question/index.mdx b/fern/products/sdk-reference/php/agents/contexts/contexts/gather-question/index.mdx new file mode 100644 index 0000000000..a16aa5afc2 --- /dev/null +++ b/fern/products/sdk-reference/php/agents/contexts/contexts/gather-question/index.mdx @@ -0,0 +1,116 @@ +--- +slug: "/reference/php/agents/contexts/contexts/gather-question" +title: "GatherQuestion" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Contexts\\GatherQuestion" + parent: "agents.Contexts.Contexts" + module: "agents.Contexts.Contexts" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php" +--- +# `GatherQuestion` + +## Signature + +```php +class GatherQuestion +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct( + string $key, + string $question, + string $type = 'string', + bool $confirm = false, + ?string $prompt = NULL, + ?array $functions = NULL +) +``` + +#### Parameters + + + Key name for storing the answer in global\_data. + + + + The question text to ask. + + + + JSON schema type for the answer (default 'string'). + + + + If true, the model must confirm the answer. + + + + Extra instruction text appended after the question. + + + + Functions to unlock for this question. + + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 44. + +*** + +### getKey + +#### Signature + +```php +public function getKey(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 60. + +*** + +### toArray + +#### Signature + +```php +public function toArray(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 65. + +## Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 27. diff --git a/fern/products/sdk-reference/php/agents/contexts/contexts/index.mdx b/fern/products/sdk-reference/php/agents/contexts/contexts/index.mdx new file mode 100644 index 0000000000..f544496899 --- /dev/null +++ b/fern/products/sdk-reference/php/agents/contexts/contexts/index.mdx @@ -0,0 +1,30 @@ +--- +slug: "/reference/php/agents/contexts/contexts" +title: "Contexts" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "module" + language: "php" + qualified_name: "agents.Contexts.Contexts" + parent: "SignalWire\\Contexts" + module: "agents.Contexts" +--- +# `Contexts` + +## Classes + + + + + + Builder for multi-step, multi-context AI agent workflows. + + + + + + + + diff --git a/fern/products/sdk-reference/php/agents/contexts/contexts/step/index.mdx b/fern/products/sdk-reference/php/agents/contexts/contexts/step/index.mdx new file mode 100644 index 0000000000..0052ec23fb --- /dev/null +++ b/fern/products/sdk-reference/php/agents/contexts/contexts/step/index.mdx @@ -0,0 +1,668 @@ +--- +slug: "/reference/php/agents/contexts/contexts/step" +title: "Step" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Contexts\\Step" + parent: "agents.Contexts.Contexts" + module: "agents.Contexts.Contexts" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php" +--- +# `Step` + +## Signature + +```php +class Step +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(string $name) +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 197. + +*** + +### addBullets + +Add a POM section with bullet points. + +#### Signature + +```php +public function addBullets(string $title, array $bullets): SignalWire\Contexts\Step +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire\Contexts\Step` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 238. + +*** + +### addGatherQuestion + +Add a question to this step's gather\_info. Initializes + +gather\_info if not yet set. + +IMPORTANT — gather mode locks function access: +While the model is asking gather questions, the runtime +forcibly deactivates ALL of the step's other functions. The +only callable tools during a gather question are: + +``` +- gather_submit (the native answer-submission tool) +- Whatever names you pass in this question's 'functions' + option +``` + +next\_step and change\_context are also filtered out — the +model cannot navigate away until the gather completes. This +is by design: it forces a tight ask → submit → next-question +loop. + +If a question needs to call out to a tool (e.g. validate an +email, geocode a ZIP), list that tool name in this question's +'functions' option. Functions listed here are active ONLY for +this question. + +#### Signature + +```php +public function addGatherQuestion( + string $key, + string $question, + string $type = 'string', + bool $confirm = false, + ?string $prompt = NULL, + ?array $functions = NULL +): SignalWire\Contexts\Step +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`SignalWire\Contexts\Step` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 392. + +*** + +### addSection + +Add a POM section with a body paragraph. + +#### Signature + +```php +public function addSection(string $title, string $body): SignalWire\Contexts\Step +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire\Contexts\Step` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 224. + +*** + +### clearSections + +Clear all content (both text and sections). + +#### Signature + +```php +public function clearSections(): SignalWire\Contexts\Step +``` + +#### Returns + +`SignalWire\Contexts\Step` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 252. + +*** + +### getGatherInfo + +#### Signature + +```php +public function getGatherInfo(): ?SignalWire\Contexts\GatherInfo +``` + +#### Returns + +`?SignalWire\Contexts\GatherInfo` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 450. + +*** + +### getName + +#### Signature + +```php +public function getName(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 202. + +*** + +### getValidContexts + +#### Signature + +```php +public function getValidContexts(): ?array +``` + +#### Returns + +`?array` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 445. + +*** + +### getValidSteps + +#### Signature + +```php +public function getValidSteps(): ?array +``` + +#### Returns + +`?array` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 440. + +*** + +### setEnd + +Mark this step as terminal for the step flow. + +IMPORTANT: $end = true does NOT end the conversation or hang up +the call. It exits step mode entirely after this step executes +— clearing the steps list, current step index, valid\_steps, and +valid\_contexts. The agent keeps running, but operates only +under the base system prompt and the context-level prompt; no +more step instructions are injected and no more next\_step tool +is offered. + +To actually end the call, call a hangup tool or define a +hangup hook. + +#### Signature + +```php +public function setEnd(bool $end): SignalWire\Contexts\Step +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Contexts\Step` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 329. + +*** + +### setFunctions + +Set which non-internal functions are callable while this step is + +active. + +IMPORTANT — inheritance behavior: +If you do NOT call this method, the step inherits whichever +function set was active on the previous step (or the previous +context's last step). The server-side runtime only resets the +active set when a step explicitly declares its `functions` +field. This is the most common source of bugs in multi-step +agents: forgetting setFunctions() on a later step lets the +previous step's tools leak through. Best practice is to call +setFunctions() explicitly on every step that should differ +from the previous one. + +Keep the per-step active set small: LLM tool selection accuracy +degrades noticeably past ~7-8 simultaneously-active tools per +call. Use per-step whitelisting to partition large tool +collections. + +Internal functions (e.g. gather\_submit, hangup hook) are ALWAYS +protected and cannot be deactivated by this whitelist. The +native navigation tools next\_step and change\_context are +injected automatically when setValidSteps / setValidContexts is +used; they are not affected by this list and do not need to +appear in it. + +#### Signature + +```php +public function setFunctions($functions): SignalWire\Contexts\Step +``` + +#### Parameters + + + One of: + + +#### Returns + +`SignalWire\Contexts\Step` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 297. + +*** + +### setGatherInfo + +Initialize the gather\_info configuration for this step. Questions are + +presented one at a time via dynamic step instruction re-injection, +producing zero tool\_call/tool\_result entries in LLM-visible history. + +After calling this, use addGatherQuestion() to define questions. + +#### Signature + +```php +public function setGatherInfo( + ?string $output_key = NULL, + ?string $completion_action = NULL, + ?string $prompt = NULL +): SignalWire\Contexts\Step +``` + +#### Parameters + + + Key in global\_data to store answers under. + + + + Where to go when all questions are answered ('next\_step', a step name, or null). + + + + Preamble text injected once when entering the gather step. + + +#### Returns + +`SignalWire\Contexts\Step` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 360. + +*** + +### setResetConsolidate + +#### Signature + +```php +public function setResetConsolidate(bool $consolidate): SignalWire\Contexts\Step +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Contexts\Step` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 426. + +*** + +### setResetFullReset + +#### Signature + +```php +public function setResetFullReset(bool $fullReset): SignalWire\Contexts\Step +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Contexts\Step` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 432. + +*** + +### setResetSystemPrompt + +#### Signature + +```php +public function setResetSystemPrompt(string $systemPrompt): SignalWire\Contexts\Step +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Contexts\Step` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 414. + +*** + +### setResetUserPrompt + +#### Signature + +```php +public function setResetUserPrompt(string $userPrompt): SignalWire\Contexts\Step +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Contexts\Step` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 420. + +*** + +### setSkipToNextStep + +#### Signature + +```php +public function setSkipToNextStep(bool $skip): SignalWire\Contexts\Step +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Contexts\Step` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 341. + +*** + +### setSkipUserTurn + +#### Signature + +```php +public function setSkipUserTurn(bool $skip): SignalWire\Contexts\Step +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Contexts\Step` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 335. + +*** + +### setStepCriteria + +#### Signature + +```php +public function setStepCriteria(string $criteria): SignalWire\Contexts\Step +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Contexts\Step` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 259. + +*** + +### setText + +Set the step's prompt text directly. Mutually exclusive with POM sections. + +#### Signature + +```php +public function setText(string $text): SignalWire\Contexts\Step +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Contexts\Step` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 210. + +*** + +### setValidContexts + +#### Signature + +```php +public function setValidContexts(array $contexts): SignalWire\Contexts\Step +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Contexts\Step` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 309. + +*** + +### setValidSteps + +#### Signature + +```php +public function setValidSteps(array $steps): SignalWire\Contexts\Step +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Contexts\Step` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 303. + +*** + +### toArray + +#### Signature + +```php +public function toArray(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 489. + +## Source + +[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) + +Line 169. diff --git a/fern/products/sdk-reference/php/agents/contexts/index.mdx b/fern/products/sdk-reference/php/agents/contexts/index.mdx new file mode 100644 index 0000000000..6ccc19ffe7 --- /dev/null +++ b/fern/products/sdk-reference/php/agents/contexts/index.mdx @@ -0,0 +1,26 @@ +--- +slug: "/reference/php/agents/contexts" +title: "Contexts" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "module" + language: "php" + qualified_name: "SignalWire\\Contexts" + parent: "agents" + module: "agents" +--- +# `Contexts` + +## Signature + +```php +namespace SignalWire\Contexts +``` + +## Modules + + + + diff --git a/fern/products/sdk-reference/php/agents/data-map/index.mdx b/fern/products/sdk-reference/php/agents/data-map/index.mdx new file mode 100644 index 0000000000..bb9bc21ba9 --- /dev/null +++ b/fern/products/sdk-reference/php/agents/data-map/index.mdx @@ -0,0 +1,601 @@ +--- +slug: "/reference/php/agents/data-map" +title: "DataMap" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\DataMap" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/DataMap/DataMap.php" +--- +# `DataMap` + +## Signature + +```php +class DataMap +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(string $functionName) +``` + +#### Parameters + + + +#### Source + +[`SignalWire/DataMap/DataMap.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/DataMap/DataMap.php) + +Line 33. + +*** + +### body + +Set body on the last webhook. + +#### Signature + +```php +public function body(array $data): SignalWire\DataMap\DataMap +``` + +#### Parameters + + + +#### Returns + +`SignalWire\DataMap\DataMap` + +#### Source + +[`SignalWire/DataMap/DataMap.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/DataMap/DataMap.php) + +Line 199. + +*** + +### createExpressionTool + +Build a complete SWAIG function definition with expressions only. + +**Modifiers:** `static` + +#### Signature + +```php +public static function createExpressionTool( + string $name, + string $purpose, + array $parameters, + array $expressions +): array +``` + +#### Parameters + + + + + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/DataMap/DataMap.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/DataMap/DataMap.php) + +Line 379. + +*** + +### createSimpleApiTool + +Build a complete SWAIG function definition with a single webhook. + +**Modifiers:** `static` + +#### Signature + +```php +public static function createSimpleApiTool( + string $name, + string $purpose, + array $parameters, + string $method, + string $url, + mixed $output, + array $headers = array ( +) +): array +``` + +#### Parameters + + + + + + + + + + + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/DataMap/DataMap.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/DataMap/DataMap.php) + +Line 344. + +*** + +### description + +Alias for purpose(). Sets the LLM-facing tool description. + +This string is read by the model to decide WHEN to call this +tool. See purpose() for bad-vs-good examples. + +#### Signature + +```php +public function description(string $desc): SignalWire\DataMap\DataMap +``` + +#### Parameters + + + +#### Returns + +`SignalWire\DataMap\DataMap` + +#### Source + +[`SignalWire/DataMap/DataMap.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/DataMap/DataMap.php) + +Line 68. + +*** + +### errorKeys + +Set error\_keys on the last webhook. + +#### Signature + +```php +public function errorKeys(array $keys): SignalWire\DataMap\DataMap +``` + +#### Parameters + + + +#### Returns + +`SignalWire\DataMap\DataMap` + +#### Source + +[`SignalWire/DataMap/DataMap.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/DataMap/DataMap.php) + +Line 263. + +*** + +### expression + +Add an expression rule. + +#### Signature + +```php +public function expression( + string $testValue, + string $pattern, + mixed $output, + mixed $nomatchOutput = NULL +): SignalWire\DataMap\DataMap +``` + +#### Parameters + + + + + + + + + +#### Returns + +`SignalWire\DataMap\DataMap` + +#### Source + +[`SignalWire/DataMap/DataMap.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/DataMap/DataMap.php) + +Line 122. + +*** + +### fallbackOutput + +Set global fallback output. + +#### Signature + +```php +public function fallbackOutput(mixed $result): SignalWire\DataMap\DataMap +``` + +#### Parameters + + + FunctionResult, array, or string + + +#### Returns + +`SignalWire\DataMap\DataMap` + +#### Source + +[`SignalWire/DataMap/DataMap.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/DataMap/DataMap.php) + +Line 251. + +*** + +### foreach + +Set foreach on the last webhook. + +#### Signature + +```php +public function foreach(array $config): SignalWire\DataMap\DataMap +``` + +#### Parameters + + + +#### Returns + +`SignalWire\DataMap\DataMap` + +#### Source + +[`SignalWire/DataMap/DataMap.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/DataMap/DataMap.php) + +Line 225. + +*** + +### globalErrorKeys + +Set global error\_keys. + +#### Signature + +```php +public function globalErrorKeys(array $keys): SignalWire\DataMap\DataMap +``` + +#### Parameters + + + +#### Returns + +`SignalWire\DataMap\DataMap` + +#### Source + +[`SignalWire/DataMap/DataMap.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/DataMap/DataMap.php) + +Line 276. + +*** + +### output + +Set output on the last webhook. + +#### Signature + +```php +public function output(mixed $result): SignalWire\DataMap\DataMap +``` + +#### Parameters + + + FunctionResult, array, or string + + +#### Returns + +`SignalWire\DataMap\DataMap` + +#### Source + +[`SignalWire/DataMap/DataMap.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/DataMap/DataMap.php) + +Line 238. + +*** + +### parameter + +Add a parameter to this data-map tool — the `$description` is + +LLM-FACING. + +Each parameter description is rendered into the OpenAI tool +schema under parameters.properties.<name>.description and sent +to the model. The model uses it to decide HOW to fill in the +argument from user speech. It is prompt engineering, not +developer FYI. + +Bad vs good: + +BAD : ->parameter('city', 'string', 'the city') +GOOD: ->parameter('city', 'string', +'The name of the city to get weather for, e.g. ' +. '"San Francisco". Ask the user if they did not ' +. 'provide one. Include the state or country if the ' +. 'city name is ambiguous.') + +#### Signature + +```php +public function parameter( + string $name, + string $type, + string $description, + bool $required = false, + array $enum = array ( +) +): SignalWire\DataMap\DataMap +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`SignalWire\DataMap\DataMap` + +#### Source + +[`SignalWire/DataMap/DataMap.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/DataMap/DataMap.php) + +Line 94. + +*** + +### params + +Set params on the last webhook. + +#### Signature + +```php +public function params(array $data): SignalWire\DataMap\DataMap +``` + +#### Parameters + + + +#### Returns + +`SignalWire\DataMap\DataMap` + +#### Source + +[`SignalWire/DataMap/DataMap.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/DataMap/DataMap.php) + +Line 212. + +*** + +### purpose + +Set the LLM-facing tool description (the "purpose"). PROMPT + +ENGINEERING, not developer documentation. + +The description string is rendered into the OpenAI tool schema +`description` field on every LLM turn. The model reads it to +decide WHEN to call this tool. A vague purpose() is the #1 +cause of "the model has the right tool but doesn't call it" +failures with data-map tools. + +Bad vs good: + +BAD : ->purpose('weather api') +GOOD: ->purpose('Get the current weather conditions and ' +. 'forecast for a specific city. Use this ' +. 'whenever the user asks about weather, ' +. 'temperature, rain, or similar conditions ' +. 'in a named location.') + +#### Signature + +```php +public function purpose(string $desc): SignalWire\DataMap\DataMap +``` + +#### Parameters + + + +#### Returns + +`SignalWire\DataMap\DataMap` + +#### Source + +[`SignalWire/DataMap/DataMap.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/DataMap/DataMap.php) + +Line 57. + +*** + +### toSwaigFunction + +Serialize to a SWAIG function definition array. + +#### Signature + +```php +public function toSwaigFunction(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/DataMap/DataMap.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/DataMap/DataMap.php) + +Line 287. + +*** + +### webhook + +Add a webhook definition. + +#### Signature + +```php +public function webhook( + string $method, + string $url, + array $headers = array ( +), + string $formParam = '', + bool $inputArgsAsParams = false, + array $requireArgs = array ( +) +): SignalWire\DataMap\DataMap +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`SignalWire\DataMap\DataMap` + +#### Source + +[`SignalWire/DataMap/DataMap.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/DataMap/DataMap.php) + +Line 148. + +*** + +### webhookExpressions + +Set expressions on the last webhook. + +#### Signature + +```php +public function webhookExpressions(array $expressions): SignalWire\DataMap\DataMap +``` + +#### Parameters + + + +#### Returns + +`SignalWire\DataMap\DataMap` + +#### Source + +[`SignalWire/DataMap/DataMap.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/DataMap/DataMap.php) + +Line 186. + +## Source + +[`SignalWire/DataMap/DataMap.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/DataMap/DataMap.php) + +Line 9. diff --git a/fern/products/sdk-reference/php/agents/index.mdx b/fern/products/sdk-reference/php/agents/index.mdx new file mode 100644 index 0000000000..64b179bd65 --- /dev/null +++ b/fern/products/sdk-reference/php/agents/index.mdx @@ -0,0 +1,36 @@ +--- +slug: "/reference/php/agents" +title: "agents" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "module" + language: "php" + qualified_name: "agents" +--- +# `agents` + +## Classes + + + + + +## Modules + + + + + + + + + + + + + + + + diff --git a/fern/products/sdk-reference/php/agents/pom/index.mdx b/fern/products/sdk-reference/php/agents/pom/index.mdx new file mode 100644 index 0000000000..db9a7fd3ad --- /dev/null +++ b/fern/products/sdk-reference/php/agents/pom/index.mdx @@ -0,0 +1,26 @@ +--- +slug: "/reference/php/agents/pom" +title: "POM" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "module" + language: "php" + qualified_name: "SignalWire\\POM" + parent: "agents" + module: "agents" +--- +# `POM` + +## Signature + +```php +namespace SignalWire\POM +``` + +## Modules + + + + diff --git a/fern/products/sdk-reference/php/agents/pom/pom/index.mdx b/fern/products/sdk-reference/php/agents/pom/pom/index.mdx new file mode 100644 index 0000000000..7a8a2ed830 --- /dev/null +++ b/fern/products/sdk-reference/php/agents/pom/pom/index.mdx @@ -0,0 +1,26 @@ +--- +slug: "/reference/php/agents/pom/pom" +title: "POM" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "module" + language: "php" + qualified_name: "agents.POM.POM" + parent: "SignalWire\\POM" + module: "agents.POM" +--- +# `POM` + +## Classes + + + + A structured data format for composing, organizing, and rendering prompt + + + + Represents a section in the Prompt Object Model. + + diff --git a/fern/products/sdk-reference/php/agents/pom/pom/prompt-object-model/index.mdx b/fern/products/sdk-reference/php/agents/pom/pom/prompt-object-model/index.mdx new file mode 100644 index 0000000000..f398198f37 --- /dev/null +++ b/fern/products/sdk-reference/php/agents/pom/pom/prompt-object-model/index.mdx @@ -0,0 +1,331 @@ +--- +slug: "/reference/php/agents/pom/pom/prompt-object-model" +title: "PromptObjectModel" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\POM\\PromptObjectModel" + parent: "agents.POM.POM" + module: "agents.POM.POM" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/POM/PromptObjectModel.php" +--- +# `PromptObjectModel` + +A structured data format for composing, organizing, and rendering prompt + +instructions for large language models. + +Mirrors Python's `signalwire.pom.pom.PromptObjectModel`. Provides a +tree-based representation of nested sections, supporting JSON / YAML +serialization and Markdown / XML rendering. + +YAML support: a small bundled emitter and parser implement the subset of +PyYAML's default block style needed for round-tripping POM documents. +Composer-installed yaml extensions are not required. + +## Signature + +```php +class PromptObjectModel +``` + +## Properties + + + + + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(bool $debug = false) +``` + +#### Parameters + + + +#### Source + +[`SignalWire/POM/PromptObjectModel.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/POM/PromptObjectModel.php) + +Line 25. + +*** + +### addPomAsSubsection + +Add another PromptObjectModel as a subsection block under a target. + +#### Signature + +```php +public function addPomAsSubsection( + SignalWire\POM\Section|string $target, + SignalWire\POM\PromptObjectModel $pomToAdd +): void +``` + +#### Parameters + + + Either a section title or a Section instance. + + + + +#### Throws + +- `\InvalidArgumentException` — When the title cannot be resolved. + +#### Source + +[`SignalWire/POM/PromptObjectModel.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/POM/PromptObjectModel.php) + +Line 359. + +*** + +### addSection + +Add a top-level section to the model. + +#### Signature + +```php +public function addSection( + ?string $title = NULL, + array $params = array ( +) +): SignalWire\POM\Section +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire\POM\Section` + +#### Throws + +- `\InvalidArgumentException` — If $title is null and there is already at least one section + +#### Source + +[`SignalWire/POM/PromptObjectModel.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/POM/PromptObjectModel.php) + +Line 181. + +*** + +### findSection + +Recursively search for a section by title. + +#### Signature + +```php +public function findSection(string $title): ?SignalWire\POM\Section +``` + +#### Parameters + + + +#### Returns + +`?SignalWire\POM\Section` + +#### Source + +[`SignalWire/POM/PromptObjectModel.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/POM/PromptObjectModel.php) + +Line 201. + +*** + +### fromJson + +Create a PromptObjectModel from a JSON string or a parsed array. + +**Modifiers:** `static` + +#### Signature + +```php +public static function fromJson(array|string $jsonData): SignalWire\POM\PromptObjectModel +``` + +#### Parameters + + + +#### Returns + +`SignalWire\POM\PromptObjectModel` + +#### Throws + +- `\InvalidArgumentException` — on malformed JSON or invalid structure + +#### Source + +[`SignalWire/POM/PromptObjectModel.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/POM/PromptObjectModel.php) + +Line 41. + +*** + +### fromYaml + +Create a PromptObjectModel from a YAML string or a parsed array. + +**Modifiers:** `static` + +#### Signature + +```php +public static function fromYaml(array|string $yamlData): SignalWire\POM\PromptObjectModel +``` + +#### Parameters + + + +#### Returns + +`SignalWire\POM\PromptObjectModel` + +#### Source + +[`SignalWire/POM/PromptObjectModel.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/POM/PromptObjectModel.php) + +Line 64. + +*** + +### renderMarkdown + +#### Signature + +```php +public function renderMarkdown(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/POM/PromptObjectModel.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/POM/PromptObjectModel.php) + +Line 289. + +*** + +### renderXml + +#### Signature + +```php +public function renderXml(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/POM/PromptObjectModel.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/POM/PromptObjectModel.php) + +Line 318. + +*** + +### toArray + +#### Signature + +```php +public function toArray(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/POM/PromptObjectModel.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/POM/PromptObjectModel.php) + +Line 230. + +*** + +### toJson + +Serialize the model as JSON. Matches Python `json.dumps(.., indent=2)`. + +#### Signature + +```php +public function toJson(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/POM/PromptObjectModel.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/POM/PromptObjectModel.php) + +Line 238. + +*** + +### toYaml + +Serialize the model as YAML. Matches PyYAML's default block style + +with `default_flow_style=False, sort_keys=False`. + +#### Signature + +```php +public function toYaml(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/POM/PromptObjectModel.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/POM/PromptObjectModel.php) + +Line 280. + +## Source + +[`SignalWire/POM/PromptObjectModel.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/POM/PromptObjectModel.php) + +Line 19. diff --git a/fern/products/sdk-reference/php/agents/pom/pom/section/index.mdx b/fern/products/sdk-reference/php/agents/pom/pom/section/index.mdx new file mode 100644 index 0000000000..1dff581f43 --- /dev/null +++ b/fern/products/sdk-reference/php/agents/pom/pom/section/index.mdx @@ -0,0 +1,261 @@ +--- +slug: "/reference/php/agents/pom/pom/section" +title: "Section" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\POM\\Section" + parent: "agents.POM.POM" + module: "agents.POM.POM" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/POM/Section.php" +--- +# `Section` + +Represents a section in the Prompt Object Model. + +Each section contains a title, optional body text, optional bullet +points, and any number of nested subsections. Mirrors Python's +`signalwire.pom.pom.Section` byte-for-byte for `render_markdown`, +`render_xml`, `to_dict` (and indirectly `to_json` / `to_yaml`). + +Python parity: signalwire/signalwire/pom/pom.py::Section + +Constructor params (`params` array — PHP idiom for kwargs): + +- title (?string) section title; null is permitted only on the + first top-level section of a PromptObjectModel +- body (string) paragraph text; default '' +- bullets (?list<string>) bullet items; default \[] +- numbered (?bool) null = inherit; true/false = explicit +- numberedBullets (bool) render bullets as "1. foo" instead of "- foo" + +## Signature + +```php +class Section +``` + +## Properties + + + + + + + + + + + + + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(?string $title = NULL, array $params = array ( +)) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/POM/Section.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/POM/Section.php) + +Line 45. + +*** + +### addBody + +Add or replace the body text for this section. + +#### Signature + +```php +public function addBody(string $body): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/POM/Section.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/POM/Section.php) + +Line 72. + +*** + +### addBullets + +Append bullet points to this section. + +#### Signature + +```php +public function addBullets(array $bullets): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/POM/Section.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/POM/Section.php) + +Line 82. + +*** + +### addSubsection + +Add a subsection to this section. + +#### Signature + +```php +public function addSubsection( + string $title, + array $params = array ( +) +): SignalWire\POM\Section +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire\POM\Section` + +#### Throws + +- `\InvalidArgumentException` — If $title is null + +#### Source + +[`SignalWire/POM/Section.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/POM/Section.php) + +Line 104. + +*** + +### renderMarkdown + +Render this section and all its subsections as Markdown. + +#### Signature + +```php +public function renderMarkdown(int $level = 2, ?array $sectionNumber = NULL): string +``` + +#### Parameters + + + heading level (default 2 -> ##) + + + + numbering breadcrumb + + +#### Returns + +`string` + +#### Source + +[`SignalWire/POM/Section.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/POM/Section.php) + +Line 155. + +*** + +### renderXml + +Render this section and all its subsections as XML. + +#### Signature + +```php +public function renderXml(int $indent = 0, ?array $sectionNumber = NULL): string +``` + +#### Parameters + + + indentation level (each = 2 spaces) + + + + numbering breadcrumb + + +#### Returns + +`string` + +#### Source + +[`SignalWire/POM/Section.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/POM/Section.php) + +Line 216. + +*** + +### toArray + +Convert the section to a dictionary representation. + +Key ordering (must match Python): title, body, bullets, subsections, +numbered, numberedBullets. + +#### Signature + +```php +public function toArray(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/POM/Section.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/POM/Section.php) + +Line 122. + +## Source + +[`SignalWire/POM/Section.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/POM/Section.php) + +Line 25. diff --git a/fern/products/sdk-reference/php/agents/server/index.mdx b/fern/products/sdk-reference/php/agents/server/index.mdx new file mode 100644 index 0000000000..94f63ac942 --- /dev/null +++ b/fern/products/sdk-reference/php/agents/server/index.mdx @@ -0,0 +1,26 @@ +--- +slug: "/reference/php/agents/server" +title: "Server" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "module" + language: "php" + qualified_name: "SignalWire\\Server" + parent: "agents" + module: "agents" +--- +# `Server` + +## Signature + +```php +namespace SignalWire\Server +``` + +## Modules + + + + diff --git a/fern/products/sdk-reference/php/agents/server/server/agent-server/index.mdx b/fern/products/sdk-reference/php/agents/server/server/agent-server/index.mdx new file mode 100644 index 0000000000..caa7c42d35 --- /dev/null +++ b/fern/products/sdk-reference/php/agents/server/server/agent-server/index.mdx @@ -0,0 +1,477 @@ +--- +slug: "/reference/php/agents/server/server/agent-server" +title: "AgentServer" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Server\\AgentServer" + parent: "agents.Server.Server" + module: "agents.Server.Server" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php" +--- +# `AgentServer` + +## Signature + +```php +class AgentServer +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct( + ?string $host = NULL, + ?int $port = NULL, + string $logLevel = 'info' +) +``` + +#### Parameters + + + + + + + +#### Source + +[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) + +Line 59. + +*** + +### getAgent + +Get an agent by route. + +#### Signature + +```php +public function getAgent(string $route): ?SignalWire\Agent\AgentBase +``` + +#### Parameters + + + +#### Returns + +`?SignalWire\Agent\AgentBase` + +#### Source + +[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) + +Line 119. + +*** + +### getAgents + +Get all registered routes (sorted). + +#### Signature + +```php +public function getAgents(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) + +Line 109. + +*** + +### getHost + +#### Signature + +```php +public function getHost(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) + +Line 424. + +*** + +### getPort + +#### Signature + +```php +public function getPort(): int +``` + +#### Returns + +`int` + +#### Source + +[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) + +Line 429. + +*** + +### getSipAutoMap + +#### Signature + +```php +public function getSipAutoMap(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) + +Line 178. + +*** + +### getSipRoute + +#### Signature + +```php +public function getSipRoute(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) + +Line 173. + +*** + +### getSipUsernameMapping + +Get the SIP username mapping. + +#### Signature + +```php +public function getSipUsernameMapping(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) + +Line 206. + +*** + +### handleRequest + +Handle an HTTP request and return \[status, headers, body]. + +#### Signature + +```php +public function handleRequest( + string $method, + string $path, + array $headers = array ( +), + ?string $body = NULL +): array +``` + +#### Parameters + + + + + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) + +Line 242. + +*** + +### isSipRoutingEnabled + +Check if SIP routing is enabled. + +#### Signature + +```php +public function isSipRoutingEnabled(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) + +Line 196. + +*** + +### register + +Register an agent at a route. + +#### Signature + +```php +public function register( + SignalWire\Agent\AgentBase $agent, + ?string $route = NULL +): SignalWire\Server\AgentServer +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire\Server\AgentServer` + +#### Throws + +- `\RuntimeException` — If the route is already registered. + +#### Source + +[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) + +Line 79. + +*** + +### registerSipUsername + +Map a SIP username to a route. + +#### Signature + +```php +public function registerSipUsername( + string $username, + string $route +): SignalWire\Server\AgentServer +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire\Server\AgentServer` + +#### Source + +[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) + +Line 186. + +*** + +### run + +Start the server (blocking). + +#### Signature + +```php +public function run(): void +``` + +#### Source + +[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) + +Line 296. + +*** + +### serve + +Start the server (blocking). + +Mirrors Python's AgentServer SSL handling: when `SWML_SSL_ENABLED` is +truthy and `SWML_SSL_CERT_PATH` / `SWML_SSL_KEY_PATH` point at a +readable cert + key, the server is served over verified HTTPS via a +Workerman SSL worker. Otherwise it falls back to PHP's built-in +(plaintext HTTP) server. + +#### Signature + +```php +public function serve(): void +``` + +#### Source + +[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) + +Line 310. + +*** + +### serveStatic + +Serve static files from a directory under a URL prefix. + +#### Signature + +```php +public function serveStatic( + string $directory, + string $urlPrefix +): SignalWire\Server\AgentServer +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire\Server\AgentServer` + +#### Throws + +- `\RuntimeException` — If the directory does not exist. + +#### Source + +[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) + +Line 220. + +*** + +### setupSipRouting + +Set up central SIP-based routing for the server. + +Mirrors Python's AgentServer.setup\_sip\_routing(route, auto\_map). When +called with no args, defaults match Python: route="/sip", auto\_map=true. + +#### Signature + +```php +public function setupSipRouting( + string $route = '/sip', + bool $auto_map = true +): SignalWire\Server\AgentServer +``` + +#### Parameters + + + Path for SIP routing (default "/sip"). Leading slash is added if missing; trailing slash is stripped. + + + + If true, existing agents have their SIP usernames auto-derived from their route. + + +#### Returns + +`SignalWire\Server\AgentServer` + +#### Source + +[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) + +Line 141. + +*** + +### unregister + +Unregister an agent from a route. + +#### Signature + +```php +public function unregister(string $route): SignalWire\Server\AgentServer +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Server\AgentServer` + +#### Source + +[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) + +Line 96. + +## Source + +[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) + +Line 10. diff --git a/fern/products/sdk-reference/php/agents/server/server/index.mdx b/fern/products/sdk-reference/php/agents/server/server/index.mdx new file mode 100644 index 0000000000..05d430d33b --- /dev/null +++ b/fern/products/sdk-reference/php/agents/server/server/index.mdx @@ -0,0 +1,20 @@ +--- +slug: "/reference/php/agents/server/server" +title: "Server" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "module" + language: "php" + qualified_name: "agents.Server.Server" + parent: "SignalWire\\Server" + module: "agents.Server" +--- +# `Server` + +## Classes + + + + diff --git a/fern/products/sdk-reference/php/agents/serverless/index.mdx b/fern/products/sdk-reference/php/agents/serverless/index.mdx new file mode 100644 index 0000000000..6ef0752ab8 --- /dev/null +++ b/fern/products/sdk-reference/php/agents/serverless/index.mdx @@ -0,0 +1,26 @@ +--- +slug: "/reference/php/agents/serverless" +title: "Serverless" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "module" + language: "php" + qualified_name: "SignalWire\\Serverless" + parent: "agents" + module: "agents" +--- +# `Serverless` + +## Signature + +```php +namespace SignalWire\Serverless +``` + +## Modules + + + + diff --git a/fern/products/sdk-reference/php/agents/serverless/serverless/adapter/index.mdx b/fern/products/sdk-reference/php/agents/serverless/serverless/adapter/index.mdx new file mode 100644 index 0000000000..cad04cd995 --- /dev/null +++ b/fern/products/sdk-reference/php/agents/serverless/serverless/adapter/index.mdx @@ -0,0 +1,259 @@ +--- +slug: "/reference/php/agents/serverless/serverless/adapter" +title: "Adapter" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Serverless\\Adapter" + parent: "agents.Serverless.Serverless" + module: "agents.Serverless.Serverless" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Serverless/Adapter.php" +--- +# `Adapter` + +Auto-detect and handle serverless environments (Lambda, GCF, Azure, CGI) + +or fall back to the built-in PHP server. + +## Signature + +```php +class Adapter +``` + +## Methods + +### detect + +Detect the current runtime environment. + +**Modifiers:** `static` + +#### Signature + +```php +public static function detect(): string +``` + +#### Returns + +`string` — One of 'lambda', 'gcf', 'azure', 'cgi', or 'server'. For a typed result, see \{@see detectMode()\}. + +#### Source + +[`SignalWire/Serverless/Adapter.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Serverless/Adapter.php) + +Line 19. + +*** + +### detectMode + +Detect the current runtime environment as a typed \{@see ExecutionMode\}. + +The typed counterpart to \{@see detect()\}: same detection logic and +precedence, but returns the enum (autocompletion, exhaustive `match`, +`->isServerless()`) instead of a bare string. `detectMode()->value` +equals `detect()`. + +**Modifiers:** `static` + +#### Signature + +```php +public static function detectMode(): SignalWire\Serverless\ExecutionMode +``` + +#### Returns + +`SignalWire\Serverless\ExecutionMode` + +#### Source + +[`SignalWire/Serverless/Adapter.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Serverless/Adapter.php) + +Line 32. + +*** + +### handleAzure + +Handle an Azure Functions invocation. + +Extracts method, path, headers, and body from the Azure request +array, calls agent->handleRequest(), and returns an Azure-compatible +response array. + +**Modifiers:** `static` + +#### Signature + +```php +public static function handleAzure(object $agent, array $request): array +``` + +#### Parameters + + + An AgentBase or Service instance with handleRequest(). + + + + The Azure Functions HTTP request array. + + +#### Returns + +`array` — Azure response format \{status, headers, body\}. + +#### Source + +[`SignalWire/Serverless/Adapter.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Serverless/Adapter.php) + +Line 141. + +*** + +### handleCgi + +Handle a CGI/FastCGI invocation. + +Reads REQUEST\_METHOD, PATH\_INFO, CONTENT\_TYPE from $_SERVER, +reads body from php://input, parses headers from HTTP_\* env vars, +and outputs the status line, headers, and body to stdout. + +**Modifiers:** `static` + +#### Signature + +```php +public static function handleCgi(object $agent): void +``` + +#### Parameters + + + An AgentBase or Service instance with handleRequest(). + + +#### Source + +[`SignalWire/Serverless/Adapter.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Serverless/Adapter.php) + +Line 171. + +*** + +### handleGcf + +Handle a Google Cloud Function invocation. + +Reads from php://input and $\_SERVER, calls agent->handleRequest(), +then outputs headers and body directly to the response stream. + +**Modifiers:** `static` + +#### Signature + +```php +public static function handleGcf(object $agent): void +``` + +#### Parameters + + + An AgentBase or Service instance with handleRequest(). + + +#### Source + +[`SignalWire/Serverless/Adapter.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Serverless/Adapter.php) + +Line 103. + +*** + +### handleLambda + +Handle an AWS Lambda (API Gateway) invocation. + +Extracts method, path, headers, and body from the API Gateway event +format, calls agent->handleRequest(), and returns an API Gateway +compatible response. + +**Modifiers:** `static` + +#### Signature + +```php +public static function handleLambda(object $agent, array $event, object $context): array +``` + +#### Parameters + + + An AgentBase or Service instance with handleRequest(). + + + + The API Gateway event payload. + + + + The Lambda context object. + + +#### Returns + +`array` — API Gateway response format \{statusCode, headers, body\}. + +#### Source + +[`SignalWire/Serverless/Adapter.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Serverless/Adapter.php) + +Line 65. + +*** + +### serve + +Auto-detect the runtime environment and serve the agent. + +For serverless environments, calls the appropriate handler. +For 'server', calls agent->run(). + +**Modifiers:** `static` + +#### Signature + +```php +public static function serve( + object $agent, + SignalWire\Serverless\ExecutionMode|string|null $mode = NULL +): void +``` + +#### Parameters + + + An AgentBase or Service instance. + + + + Optional explicit mode override. Pass an \{@see ExecutionMode\} (typed) or its backing string ('lambda'/'gcf'/'azure'/'cgi'/'server', for parity) to pin the dispatch instead of auto-detecting via \{@see detectMode()\}. An out-of-set string raises \ValueError. Defaults to null (auto-detect), preserving the original single-argument behaviour. + + +#### Source + +[`SignalWire/Serverless/Adapter.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Serverless/Adapter.php) + +Line 221. + +## Source + +[`SignalWire/Serverless/Adapter.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Serverless/Adapter.php) + +Line 11. diff --git a/fern/products/sdk-reference/php/agents/serverless/serverless/index.mdx b/fern/products/sdk-reference/php/agents/serverless/serverless/index.mdx new file mode 100644 index 0000000000..28dc0331f6 --- /dev/null +++ b/fern/products/sdk-reference/php/agents/serverless/serverless/index.mdx @@ -0,0 +1,242 @@ +--- +slug: "/reference/php/agents/serverless/serverless" +title: "Serverless" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "module" + language: "php" + qualified_name: "agents.Serverless.Serverless" + parent: "SignalWire\\Serverless" + module: "agents.Serverless" +--- +# `Serverless` + +## Classes + + + + Auto-detect and handle serverless environments (Lambda, GCF, Azure, CGI) + + + +## Enums + +### ExecutionMode + +The runtime environment \{@see Adapter\} detects, as a typed, backed enum. + +The five members are exactly the modes \{@see Adapter::detect()\} can return +(`lambda`, `gcf`, `azure`, `cgi`, `server`). The backing string of each case +IS that wire/dispatch token, so the enum and the legacy bare string are +interchangeable: + +``` +Adapter::detect(); // 'lambda' (string, parity) +Adapter::detectMode(); // ExecutionMode::Lambda (typed) +Adapter::detectMode()->value; // 'lambda' (round-trips) +ExecutionMode::from(Adapter::detect()); // ExecutionMode::Lambda +``` + +\{@see Adapter::serve()\} accepts an explicit `ExecutionMode|string|null` +override alongside auto-detection, so callers may pin the mode in a typed, +typo-checked way while the bare string still works for parity with the +stringly-typed original. + +This closed set is knowable from `Adapter::detect()`'s own implementation, so +per the idiom philosophy (knowable → type it) it is modelled as a native enum +_alongside_ the string rather than left as a magic-string literal. It is a PHP +PORT\_ADDITION — the Python reference has no equivalent (its serverless +handling lives in the broader `cli.simulation.mock_env` machinery). + +NOTE: this is the \{@see Adapter\} platform-detection vocabulary ONLY. It is +deliberately NOT unified with \{@see \SignalWire\Logging\LoggingConfig\}'s +execution-mode set (`cgi`/`lambda`/`google_cloud_function`/`azure_function`/ +`server`), which mirrors Python's `get_execution_mode` and uses different, +longer tokens. The two vocabularies must not be merged. + +#### Signature + +```php +final enum ExecutionMode implements UnitEnum, BackedEnum +``` + +#### Inheritance + +**Implements:** `UnitEnum`, `BackedEnum` + +#### Properties + + + + + +#### Constants + + + Azure Functions. + + + + CGI / FastCGI. + + + + Google Cloud Functions / Cloud Run. + + + + AWS Lambda (API Gateway / Lambda Function URL). + + + + The built-in PHP server (the default, non-serverless mode). + + +#### Variants + + + Azure Functions. + + + + CGI / FastCGI. + + + + Google Cloud Functions / Cloud Run. + + + + AWS Lambda (API Gateway / Lambda Function URL). + + + + The built-in PHP server (the default, non-serverless mode). + + +#### Methods + +##### cases + +**Modifiers:** `static` + +###### Signature + +```php +public static function cases(): array +``` + +###### Returns + +`array` + +*** + +##### coerce + +Coerce a mode given as either this enum or its backing string into the + +enum, validating the string against the closed set. + +Accepting `ExecutionMode|string` lets the public API take the typed enum +for safety while preserving the bare-string call style for parity. + +**Modifiers:** `static` + +###### Signature + +```php +public static function coerce( + SignalWire\Serverless\ExecutionMode|string $mode +): SignalWire\Serverless\ExecutionMode +``` + +###### Parameters + + + +###### Returns + +`SignalWire\Serverless\ExecutionMode` + +###### Throws + +- `\ValueError` — if $mode is a string outside the closed set. + +###### Source + +[`SignalWire/Serverless/ExecutionMode.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Serverless/ExecutionMode.php) + +Line 72. + +*** + +##### from + +**Modifiers:** `static` + +###### Signature + +```php +public static function from(string|int $value): static +``` + +###### Parameters + + + +###### Returns + +`static` + +*** + +##### isServerless + +True for every serverless invocation mode — anything other than the + +built-in \{@see ExecutionMode::Server\}. + +###### Signature + +```php +public function isServerless(): bool +``` + +###### Returns + +`bool` + +###### Source + +[`SignalWire/Serverless/ExecutionMode.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Serverless/ExecutionMode.php) + +Line 58. + +*** + +##### tryFrom + +**Modifiers:** `static` + +###### Signature + +```php +public static function tryFrom(string|int $value): ?static +``` + +###### Parameters + + + +###### Returns + +`?static` + +#### Source + +[`SignalWire/Serverless/ExecutionMode.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Serverless/ExecutionMode.php) + +Line 37. diff --git a/fern/products/sdk-reference/php/agents/skills/builtin/builtin/api-ninjas-trivia/index.mdx b/fern/products/sdk-reference/php/agents/skills/builtin/builtin/api-ninjas-trivia/index.mdx new file mode 100644 index 0000000000..6d12312e9e --- /dev/null +++ b/fern/products/sdk-reference/php/agents/skills/builtin/builtin/api-ninjas-trivia/index.mdx @@ -0,0 +1,331 @@ +--- +slug: "/reference/php/agents/skills/builtin/builtin/api-ninjas-trivia" +title: "ApiNinjasTrivia" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Skills\\Builtin\\ApiNinjasTrivia" + parent: "SignalWire\\Skills\\Builtin" + module: "agents.Skills.Builtin.Builtin" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/ApiNinjasTrivia.php" +--- +# `ApiNinjasTrivia` + +## Signature + +```php +class ApiNinjasTrivia extends SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire\Skills\SkillBase](/docs/sdk-reference/reference/php/agents/skills/skills/skill-base) + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(object $agent, array $params = array ( +)) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 13. + +*** + +### cleanup + +#### Signature + +```php +public function cleanup(): void +``` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 62. + +*** + +### getDescription + +#### Signature + +```php +public function getDescription(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/ApiNinjasTrivia.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/ApiNinjasTrivia.php) + +Line 34. + +*** + +### getGlobalData + +#### Signature + +```php +public function getGlobalData(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 48. + +*** + +### getHints + +#### Signature + +```php +public function getHints(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 43. + +*** + +### getInstanceKey + +#### Signature + +```php +public function getInstanceKey(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 89. + +*** + +### getName + +#### Signature + +```php +public function getName(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/ApiNinjasTrivia.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/ApiNinjasTrivia.php) + +Line 29. + +*** + +### getParameterSchema + +#### Signature + +```php +public function getParameterSchema(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 66. + +*** + +### getPromptSections + +#### Signature + +```php +public function getPromptSections(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 53. + +*** + +### getRequiredEnvVars + +#### Signature + +```php +public function getRequiredEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 33. + +*** + +### getVersion + +#### Signature + +```php +public function getVersion(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 28. + +*** + +### registerTools + +#### Signature + +```php +public function registerTools(): void +``` + +#### Source + +[`SignalWire/Skills/Builtin/ApiNinjasTrivia.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/ApiNinjasTrivia.php) + +Line 53. + +*** + +### setup + +#### Signature + +```php +public function setup(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/Builtin/ApiNinjasTrivia.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/ApiNinjasTrivia.php) + +Line 44. + +*** + +### supportsMultipleInstances + +#### Signature + +```php +public function supportsMultipleInstances(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/Builtin/ApiNinjasTrivia.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/ApiNinjasTrivia.php) + +Line 39. + +*** + +### validateEnvVars + +#### Signature + +```php +public function validateEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 100. + +## Source + +[`SignalWire/Skills/Builtin/ApiNinjasTrivia.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/ApiNinjasTrivia.php) + +Line 10. diff --git a/fern/products/sdk-reference/php/agents/skills/builtin/builtin/claude-skills/index.mdx b/fern/products/sdk-reference/php/agents/skills/builtin/builtin/claude-skills/index.mdx new file mode 100644 index 0000000000..ecf90f061b --- /dev/null +++ b/fern/products/sdk-reference/php/agents/skills/builtin/builtin/claude-skills/index.mdx @@ -0,0 +1,365 @@ +--- +slug: "/reference/php/agents/skills/builtin/builtin/claude-skills" +title: "ClaudeSkills" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Skills\\Builtin\\ClaudeSkills" + parent: "SignalWire\\Skills\\Builtin" + module: "agents.Skills.Builtin.Builtin" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/ClaudeSkills.php" +--- +# `ClaudeSkills` + +Claude Skills loader. + +Mirrors signalwire-python's +`signalwire.skills.claude_skills.skill.ClaudeSkillsSkill`: + +- Walks `skills_path` for `/SKILL.md` files. +- Parses YAML frontmatter (name, description, argument-hint, + disable-model-invocation, user-invocable). +- Discovers companion `*.md` files inside each skill dir as + selectable sections. +- Registers one SWAIG tool per loadable skill with a `(arguments, + section)` parameter pair, where `section` enums over the + discovered companion docs. +- When invoked, returns the SKILL.md body (or the requested + section), with `$ARGUMENTS`, `$ARGUMENTS[N]`, `$N`, + `${CLAUDE_SKILL_DIR}` and `${CLAUDE_SESSION_ID}` substituted. + +Two deliberate omissions vs Python (each documented in +PORT\_OMISSIONS.md): + +- `allow_shell_injection`: Python preprocesses `!`cmd\`\` patterns + by shelling out. PHP prefers not to ship a hot path that + subprocess() any user-controlled string by default — Python + itself defaults this off too. The flag is accepted but the + processor is a no-op (the pattern is left in place); set + `allow_shell_injection=false` (the default) and the behavior + matches Python. +- YAML frontmatter parser: PHP has no first-class YAML in + core. Implemented a small tolerant subset that handles the + forms Claude Code itself emits (string scalars, bool, list of + strings on continuation lines). Skill files using deeply + nested YAML constructs aren't supported and will hit a + graceful "frontmatter parse failed" warning at load. + +## Signature + +```php +class ClaudeSkills extends SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire\Skills\SkillBase](/docs/sdk-reference/reference/php/agents/skills/skills/skill-base) + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(object $agent, array $params = array ( +)) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 13. + +*** + +### cleanup + +#### Signature + +```php +public function cleanup(): void +``` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 62. + +*** + +### getDescription + +#### Signature + +```php +public function getDescription(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/ClaudeSkills.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/ClaudeSkills.php) + +Line 64. + +*** + +### getGlobalData + +#### Signature + +```php +public function getGlobalData(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 48. + +*** + +### getHints + +#### Signature + +```php +public function getHints(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/Builtin/ClaudeSkills.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/ClaudeSkills.php) + +Line 502. + +*** + +### getInstanceKey + +#### Signature + +```php +public function getInstanceKey(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 89. + +*** + +### getName + +#### Signature + +```php +public function getName(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/ClaudeSkills.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/ClaudeSkills.php) + +Line 59. + +*** + +### getParameterSchema + +#### Signature + +```php +public function getParameterSchema(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 66. + +*** + +### getPromptSections + +#### Signature + +```php +public function getPromptSections(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/Builtin/ClaudeSkills.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/ClaudeSkills.php) + +Line 520. + +*** + +### getRequiredEnvVars + +#### Signature + +```php +public function getRequiredEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 33. + +*** + +### getVersion + +#### Signature + +```php +public function getVersion(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 28. + +*** + +### registerTools + +#### Signature + +```php +public function registerTools(): void +``` + +#### Source + +[`SignalWire/Skills/Builtin/ClaudeSkills.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/ClaudeSkills.php) + +Line 108. + +*** + +### setup + +#### Signature + +```php +public function setup(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/Builtin/ClaudeSkills.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/ClaudeSkills.php) + +Line 74. + +*** + +### supportsMultipleInstances + +#### Signature + +```php +public function supportsMultipleInstances(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/Builtin/ClaudeSkills.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/ClaudeSkills.php) + +Line 69. + +*** + +### validateEnvVars + +#### Signature + +```php +public function validateEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 100. + +## Source + +[`SignalWire/Skills/Builtin/ClaudeSkills.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/ClaudeSkills.php) + +Line 45. diff --git a/fern/products/sdk-reference/php/agents/skills/builtin/builtin/custom-skills/index.mdx b/fern/products/sdk-reference/php/agents/skills/builtin/builtin/custom-skills/index.mdx new file mode 100644 index 0000000000..45ac440aa0 --- /dev/null +++ b/fern/products/sdk-reference/php/agents/skills/builtin/builtin/custom-skills/index.mdx @@ -0,0 +1,331 @@ +--- +slug: "/reference/php/agents/skills/builtin/builtin/custom-skills" +title: "CustomSkills" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Skills\\Builtin\\CustomSkills" + parent: "SignalWire\\Skills\\Builtin" + module: "agents.Skills.Builtin.Builtin" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/CustomSkills.php" +--- +# `CustomSkills` + +## Signature + +```php +class CustomSkills extends SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire\Skills\SkillBase](/docs/sdk-reference/reference/php/agents/skills/skills/skill-base) + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(object $agent, array $params = array ( +)) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 13. + +*** + +### cleanup + +#### Signature + +```php +public function cleanup(): void +``` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 62. + +*** + +### getDescription + +#### Signature + +```php +public function getDescription(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/CustomSkills.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/CustomSkills.php) + +Line 17. + +*** + +### getGlobalData + +#### Signature + +```php +public function getGlobalData(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 48. + +*** + +### getHints + +#### Signature + +```php +public function getHints(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 43. + +*** + +### getInstanceKey + +#### Signature + +```php +public function getInstanceKey(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 89. + +*** + +### getName + +#### Signature + +```php +public function getName(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/CustomSkills.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/CustomSkills.php) + +Line 12. + +*** + +### getParameterSchema + +#### Signature + +```php +public function getParameterSchema(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 66. + +*** + +### getPromptSections + +#### Signature + +```php +public function getPromptSections(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 53. + +*** + +### getRequiredEnvVars + +#### Signature + +```php +public function getRequiredEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 33. + +*** + +### getVersion + +#### Signature + +```php +public function getVersion(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 28. + +*** + +### registerTools + +#### Signature + +```php +public function registerTools(): void +``` + +#### Source + +[`SignalWire/Skills/Builtin/CustomSkills.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/CustomSkills.php) + +Line 32. + +*** + +### setup + +#### Signature + +```php +public function setup(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/Builtin/CustomSkills.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/CustomSkills.php) + +Line 27. + +*** + +### supportsMultipleInstances + +#### Signature + +```php +public function supportsMultipleInstances(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/Builtin/CustomSkills.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/CustomSkills.php) + +Line 22. + +*** + +### validateEnvVars + +#### Signature + +```php +public function validateEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 100. + +## Source + +[`SignalWire/Skills/Builtin/CustomSkills.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/CustomSkills.php) + +Line 10. diff --git a/fern/products/sdk-reference/php/agents/skills/builtin/builtin/datasphere-serverless/index.mdx b/fern/products/sdk-reference/php/agents/skills/builtin/builtin/datasphere-serverless/index.mdx new file mode 100644 index 0000000000..bc901376e4 --- /dev/null +++ b/fern/products/sdk-reference/php/agents/skills/builtin/builtin/datasphere-serverless/index.mdx @@ -0,0 +1,331 @@ +--- +slug: "/reference/php/agents/skills/builtin/builtin/datasphere-serverless" +title: "DatasphereServerless" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Skills\\Builtin\\DatasphereServerless" + parent: "SignalWire\\Skills\\Builtin" + module: "agents.Skills.Builtin.Builtin" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/DatasphereServerless.php" +--- +# `DatasphereServerless` + +## Signature + +```php +class DatasphereServerless extends SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire\Skills\SkillBase](/docs/sdk-reference/reference/php/agents/skills/skills/skill-base) + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(object $agent, array $params = array ( +)) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 13. + +*** + +### cleanup + +#### Signature + +```php +public function cleanup(): void +``` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 62. + +*** + +### getDescription + +#### Signature + +```php +public function getDescription(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/DatasphereServerless.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/DatasphereServerless.php) + +Line 17. + +*** + +### getGlobalData + +#### Signature + +```php +public function getGlobalData(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/Builtin/DatasphereServerless.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/DatasphereServerless.php) + +Line 116. + +*** + +### getHints + +#### Signature + +```php +public function getHints(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 43. + +*** + +### getInstanceKey + +#### Signature + +```php +public function getInstanceKey(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 89. + +*** + +### getName + +#### Signature + +```php +public function getName(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/DatasphereServerless.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/DatasphereServerless.php) + +Line 12. + +*** + +### getParameterSchema + +#### Signature + +```php +public function getParameterSchema(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 66. + +*** + +### getPromptSections + +#### Signature + +```php +public function getPromptSections(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/Builtin/DatasphereServerless.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/DatasphereServerless.php) + +Line 125. + +*** + +### getRequiredEnvVars + +#### Signature + +```php +public function getRequiredEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 33. + +*** + +### getVersion + +#### Signature + +```php +public function getVersion(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 28. + +*** + +### registerTools + +#### Signature + +```php +public function registerTools(): void +``` + +#### Source + +[`SignalWire/Skills/Builtin/DatasphereServerless.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/DatasphereServerless.php) + +Line 40. + +*** + +### setup + +#### Signature + +```php +public function setup(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/Builtin/DatasphereServerless.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/DatasphereServerless.php) + +Line 27. + +*** + +### supportsMultipleInstances + +#### Signature + +```php +public function supportsMultipleInstances(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/Builtin/DatasphereServerless.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/DatasphereServerless.php) + +Line 22. + +*** + +### validateEnvVars + +#### Signature + +```php +public function validateEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 100. + +## Source + +[`SignalWire/Skills/Builtin/DatasphereServerless.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/DatasphereServerless.php) + +Line 10. diff --git a/fern/products/sdk-reference/php/agents/skills/builtin/builtin/datasphere/index.mdx b/fern/products/sdk-reference/php/agents/skills/builtin/builtin/datasphere/index.mdx new file mode 100644 index 0000000000..3c64657966 --- /dev/null +++ b/fern/products/sdk-reference/php/agents/skills/builtin/builtin/datasphere/index.mdx @@ -0,0 +1,346 @@ +--- +slug: "/reference/php/agents/skills/builtin/builtin/datasphere" +title: "Datasphere" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Skills\\Builtin\\Datasphere" + parent: "SignalWire\\Skills\\Builtin" + module: "agents.Skills.Builtin.Builtin" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Datasphere.php" +--- +# `Datasphere` + +SignalWire DataSphere knowledge-search skill. + +Mirrors signalwire-python's +`signalwire.skills.datasphere.skill.DataSphereSkill._search_knowledge_handler`: + +POST https://\{space\_name\}.signalwire.com/api/datasphere/documents/search +Auth: Basic project\_id:token +Body: \{ document\_id, query\_string, distance, count, \[tags, language, ...] \} + +The response carries `chunks: [{text, score, ...}]` (NOT `results`). +The handler stringifies the chunks the same way the Python skill does. + +Upstream URL override: `DATASPHERE_BASE_URL` for the audit fixture. +The path `/api/datasphere/documents/search` is preserved. + +## Signature + +```php +class Datasphere extends SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire\Skills\SkillBase](/docs/sdk-reference/reference/php/agents/skills/skills/skill-base) + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(object $agent, array $params = array ( +)) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 13. + +*** + +### cleanup + +#### Signature + +```php +public function cleanup(): void +``` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 62. + +*** + +### getDescription + +#### Signature + +```php +public function getDescription(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/Datasphere.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Datasphere.php) + +Line 37. + +*** + +### getGlobalData + +#### Signature + +```php +public function getGlobalData(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/Builtin/Datasphere.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Datasphere.php) + +Line 202. + +*** + +### getHints + +#### Signature + +```php +public function getHints(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 43. + +*** + +### getInstanceKey + +#### Signature + +```php +public function getInstanceKey(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 89. + +*** + +### getName + +#### Signature + +```php +public function getName(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/Datasphere.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Datasphere.php) + +Line 32. + +*** + +### getParameterSchema + +#### Signature + +```php +public function getParameterSchema(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 66. + +*** + +### getPromptSections + +#### Signature + +```php +public function getPromptSections(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/Builtin/Datasphere.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Datasphere.php) + +Line 211. + +*** + +### getRequiredEnvVars + +#### Signature + +```php +public function getRequiredEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 33. + +*** + +### getVersion + +#### Signature + +```php +public function getVersion(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 28. + +*** + +### registerTools + +#### Signature + +```php +public function registerTools(): void +``` + +#### Source + +[`SignalWire/Skills/Builtin/Datasphere.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Datasphere.php) + +Line 58. + +*** + +### setup + +#### Signature + +```php +public function setup(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/Builtin/Datasphere.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Datasphere.php) + +Line 47. + +*** + +### supportsMultipleInstances + +#### Signature + +```php +public function supportsMultipleInstances(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/Builtin/Datasphere.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Datasphere.php) + +Line 42. + +*** + +### validateEnvVars + +#### Signature + +```php +public function validateEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 100. + +## Source + +[`SignalWire/Skills/Builtin/Datasphere.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Datasphere.php) + +Line 27. diff --git a/fern/products/sdk-reference/php/agents/skills/builtin/builtin/datetime/index.mdx b/fern/products/sdk-reference/php/agents/skills/builtin/builtin/datetime/index.mdx new file mode 100644 index 0000000000..f94710ac74 --- /dev/null +++ b/fern/products/sdk-reference/php/agents/skills/builtin/builtin/datetime/index.mdx @@ -0,0 +1,331 @@ +--- +slug: "/reference/php/agents/skills/builtin/builtin/datetime" +title: "Datetime" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Skills\\Builtin\\Datetime" + parent: "SignalWire\\Skills\\Builtin" + module: "agents.Skills.Builtin.Builtin" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Datetime.php" +--- +# `Datetime` + +## Signature + +```php +class Datetime extends SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire\Skills\SkillBase](/docs/sdk-reference/reference/php/agents/skills/skills/skill-base) + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(object $agent, array $params = array ( +)) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 13. + +*** + +### cleanup + +#### Signature + +```php +public function cleanup(): void +``` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 62. + +*** + +### getDescription + +#### Signature + +```php +public function getDescription(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/Datetime.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Datetime.php) + +Line 17. + +*** + +### getGlobalData + +#### Signature + +```php +public function getGlobalData(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 48. + +*** + +### getHints + +#### Signature + +```php +public function getHints(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 43. + +*** + +### getInstanceKey + +#### Signature + +```php +public function getInstanceKey(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 89. + +*** + +### getName + +#### Signature + +```php +public function getName(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/Datetime.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Datetime.php) + +Line 12. + +*** + +### getParameterSchema + +#### Signature + +```php +public function getParameterSchema(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 66. + +*** + +### getPromptSections + +#### Signature + +```php +public function getPromptSections(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/Builtin/Datetime.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Datetime.php) + +Line 84. + +*** + +### getRequiredEnvVars + +#### Signature + +```php +public function getRequiredEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 33. + +*** + +### getVersion + +#### Signature + +```php +public function getVersion(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 28. + +*** + +### registerTools + +#### Signature + +```php +public function registerTools(): void +``` + +#### Source + +[`SignalWire/Skills/Builtin/Datetime.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Datetime.php) + +Line 27. + +*** + +### setup + +#### Signature + +```php +public function setup(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/Builtin/Datetime.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Datetime.php) + +Line 22. + +*** + +### supportsMultipleInstances + +#### Signature + +```php +public function supportsMultipleInstances(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 38. + +*** + +### validateEnvVars + +#### Signature + +```php +public function validateEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 100. + +## Source + +[`SignalWire/Skills/Builtin/Datetime.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Datetime.php) + +Line 10. diff --git a/fern/products/sdk-reference/php/agents/skills/builtin/builtin/google-maps/index.mdx b/fern/products/sdk-reference/php/agents/skills/builtin/builtin/google-maps/index.mdx new file mode 100644 index 0000000000..0c49301f05 --- /dev/null +++ b/fern/products/sdk-reference/php/agents/skills/builtin/builtin/google-maps/index.mdx @@ -0,0 +1,331 @@ +--- +slug: "/reference/php/agents/skills/builtin/builtin/google-maps" +title: "GoogleMaps" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Skills\\Builtin\\GoogleMaps" + parent: "SignalWire\\Skills\\Builtin" + module: "agents.Skills.Builtin.Builtin" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/GoogleMaps.php" +--- +# `GoogleMaps` + +## Signature + +```php +class GoogleMaps extends SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire\Skills\SkillBase](/docs/sdk-reference/reference/php/agents/skills/skills/skill-base) + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(object $agent, array $params = array ( +)) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 13. + +*** + +### cleanup + +#### Signature + +```php +public function cleanup(): void +``` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 62. + +*** + +### getDescription + +#### Signature + +```php +public function getDescription(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/GoogleMaps.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/GoogleMaps.php) + +Line 17. + +*** + +### getGlobalData + +#### Signature + +```php +public function getGlobalData(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 48. + +*** + +### getHints + +#### Signature + +```php +public function getHints(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/Builtin/GoogleMaps.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/GoogleMaps.php) + +Line 157. + +*** + +### getInstanceKey + +#### Signature + +```php +public function getInstanceKey(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 89. + +*** + +### getName + +#### Signature + +```php +public function getName(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/GoogleMaps.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/GoogleMaps.php) + +Line 12. + +*** + +### getParameterSchema + +#### Signature + +```php +public function getParameterSchema(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 66. + +*** + +### getPromptSections + +#### Signature + +```php +public function getPromptSections(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/Builtin/GoogleMaps.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/GoogleMaps.php) + +Line 162. + +*** + +### getRequiredEnvVars + +#### Signature + +```php +public function getRequiredEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 33. + +*** + +### getVersion + +#### Signature + +```php +public function getVersion(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 28. + +*** + +### registerTools + +#### Signature + +```php +public function registerTools(): void +``` + +#### Source + +[`SignalWire/Skills/Builtin/GoogleMaps.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/GoogleMaps.php) + +Line 31. + +*** + +### setup + +#### Signature + +```php +public function setup(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/Builtin/GoogleMaps.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/GoogleMaps.php) + +Line 22. + +*** + +### supportsMultipleInstances + +#### Signature + +```php +public function supportsMultipleInstances(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 38. + +*** + +### validateEnvVars + +#### Signature + +```php +public function validateEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 100. + +## Source + +[`SignalWire/Skills/Builtin/GoogleMaps.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/GoogleMaps.php) + +Line 10. diff --git a/fern/products/sdk-reference/php/agents/skills/builtin/builtin/index.mdx b/fern/products/sdk-reference/php/agents/skills/builtin/builtin/index.mdx new file mode 100644 index 0000000000..5ae4046625 --- /dev/null +++ b/fern/products/sdk-reference/php/agents/skills/builtin/builtin/index.mdx @@ -0,0 +1,74 @@ +--- +slug: "/reference/php/agents/skills/builtin/builtin" +title: "Builtin" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "module" + language: "php" + qualified_name: "SignalWire\\Skills\\Builtin" + parent: "agents.Skills.Builtin" + module: "agents.Skills.Builtin" +--- +# `Builtin` + +## Signature + +```php +namespace SignalWire\Skills\Builtin +``` + +## Classes + + + + + + Claude Skills loader. + + + + + + SignalWire DataSphere knowledge-search skill. + + + + + + + + + + + + + + + + MCP Gateway skill. + + + + Native vector search skill — network/remote mode only. + + + + + + Spider scraping skill. + + + + + + + + Web search skill backed by Google Custom Search. + + + + Wikipedia search skill backed by the public MediaWiki action API. + + diff --git a/fern/products/sdk-reference/php/agents/skills/builtin/builtin/info-gatherer/index.mdx b/fern/products/sdk-reference/php/agents/skills/builtin/builtin/info-gatherer/index.mdx new file mode 100644 index 0000000000..febc8cddef --- /dev/null +++ b/fern/products/sdk-reference/php/agents/skills/builtin/builtin/info-gatherer/index.mdx @@ -0,0 +1,331 @@ +--- +slug: "/reference/php/agents/skills/builtin/builtin/info-gatherer" +title: "InfoGatherer" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Skills\\Builtin\\InfoGatherer" + parent: "SignalWire\\Skills\\Builtin" + module: "agents.Skills.Builtin.Builtin" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/InfoGatherer.php" +--- +# `InfoGatherer` + +## Signature + +```php +class InfoGatherer extends SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire\Skills\SkillBase](/docs/sdk-reference/reference/php/agents/skills/skills/skill-base) + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(object $agent, array $params = array ( +)) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 13. + +*** + +### cleanup + +#### Signature + +```php +public function cleanup(): void +``` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 62. + +*** + +### getDescription + +#### Signature + +```php +public function getDescription(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/InfoGatherer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/InfoGatherer.php) + +Line 17. + +*** + +### getGlobalData + +#### Signature + +```php +public function getGlobalData(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/Builtin/InfoGatherer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/InfoGatherer.php) + +Line 156. + +*** + +### getHints + +#### Signature + +```php +public function getHints(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 43. + +*** + +### getInstanceKey + +#### Signature + +```php +public function getInstanceKey(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 89. + +*** + +### getName + +#### Signature + +```php +public function getName(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/InfoGatherer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/InfoGatherer.php) + +Line 12. + +*** + +### getParameterSchema + +#### Signature + +```php +public function getParameterSchema(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 66. + +*** + +### getPromptSections + +#### Signature + +```php +public function getPromptSections(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/Builtin/InfoGatherer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/InfoGatherer.php) + +Line 170. + +*** + +### getRequiredEnvVars + +#### Signature + +```php +public function getRequiredEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 33. + +*** + +### getVersion + +#### Signature + +```php +public function getVersion(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 28. + +*** + +### registerTools + +#### Signature + +```php +public function registerTools(): void +``` + +#### Source + +[`SignalWire/Skills/Builtin/InfoGatherer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/InfoGatherer.php) + +Line 36. + +*** + +### setup + +#### Signature + +```php +public function setup(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/Builtin/InfoGatherer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/InfoGatherer.php) + +Line 27. + +*** + +### supportsMultipleInstances + +#### Signature + +```php +public function supportsMultipleInstances(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/Builtin/InfoGatherer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/InfoGatherer.php) + +Line 22. + +*** + +### validateEnvVars + +#### Signature + +```php +public function validateEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 100. + +## Source + +[`SignalWire/Skills/Builtin/InfoGatherer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/InfoGatherer.php) + +Line 10. diff --git a/fern/products/sdk-reference/php/agents/skills/builtin/builtin/joke/index.mdx b/fern/products/sdk-reference/php/agents/skills/builtin/builtin/joke/index.mdx new file mode 100644 index 0000000000..8f5316e1cb --- /dev/null +++ b/fern/products/sdk-reference/php/agents/skills/builtin/builtin/joke/index.mdx @@ -0,0 +1,331 @@ +--- +slug: "/reference/php/agents/skills/builtin/builtin/joke" +title: "Joke" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Skills\\Builtin\\Joke" + parent: "SignalWire\\Skills\\Builtin" + module: "agents.Skills.Builtin.Builtin" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Joke.php" +--- +# `Joke` + +## Signature + +```php +class Joke extends SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire\Skills\SkillBase](/docs/sdk-reference/reference/php/agents/skills/skills/skill-base) + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(object $agent, array $params = array ( +)) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 13. + +*** + +### cleanup + +#### Signature + +```php +public function cleanup(): void +``` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 62. + +*** + +### getDescription + +#### Signature + +```php +public function getDescription(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/Joke.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Joke.php) + +Line 17. + +*** + +### getGlobalData + +#### Signature + +```php +public function getGlobalData(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/Builtin/Joke.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Joke.php) + +Line 78. + +*** + +### getHints + +#### Signature + +```php +public function getHints(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 43. + +*** + +### getInstanceKey + +#### Signature + +```php +public function getInstanceKey(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 89. + +*** + +### getName + +#### Signature + +```php +public function getName(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/Joke.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Joke.php) + +Line 12. + +*** + +### getParameterSchema + +#### Signature + +```php +public function getParameterSchema(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 66. + +*** + +### getPromptSections + +#### Signature + +```php +public function getPromptSections(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/Builtin/Joke.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Joke.php) + +Line 83. + +*** + +### getRequiredEnvVars + +#### Signature + +```php +public function getRequiredEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 33. + +*** + +### getVersion + +#### Signature + +```php +public function getVersion(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 28. + +*** + +### registerTools + +#### Signature + +```php +public function registerTools(): void +``` + +#### Source + +[`SignalWire/Skills/Builtin/Joke.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Joke.php) + +Line 31. + +*** + +### setup + +#### Signature + +```php +public function setup(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/Builtin/Joke.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Joke.php) + +Line 22. + +*** + +### supportsMultipleInstances + +#### Signature + +```php +public function supportsMultipleInstances(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 38. + +*** + +### validateEnvVars + +#### Signature + +```php +public function validateEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 100. + +## Source + +[`SignalWire/Skills/Builtin/Joke.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Joke.php) + +Line 10. diff --git a/fern/products/sdk-reference/php/agents/skills/builtin/builtin/math/index.mdx b/fern/products/sdk-reference/php/agents/skills/builtin/builtin/math/index.mdx new file mode 100644 index 0000000000..1739148015 --- /dev/null +++ b/fern/products/sdk-reference/php/agents/skills/builtin/builtin/math/index.mdx @@ -0,0 +1,331 @@ +--- +slug: "/reference/php/agents/skills/builtin/builtin/math" +title: "Math" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Skills\\Builtin\\Math" + parent: "SignalWire\\Skills\\Builtin" + module: "agents.Skills.Builtin.Builtin" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Math.php" +--- +# `Math` + +## Signature + +```php +class Math extends SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire\Skills\SkillBase](/docs/sdk-reference/reference/php/agents/skills/skills/skill-base) + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(object $agent, array $params = array ( +)) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 13. + +*** + +### cleanup + +#### Signature + +```php +public function cleanup(): void +``` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 62. + +*** + +### getDescription + +#### Signature + +```php +public function getDescription(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/Math.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Math.php) + +Line 17. + +*** + +### getGlobalData + +#### Signature + +```php +public function getGlobalData(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 48. + +*** + +### getHints + +#### Signature + +```php +public function getHints(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 43. + +*** + +### getInstanceKey + +#### Signature + +```php +public function getInstanceKey(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 89. + +*** + +### getName + +#### Signature + +```php +public function getName(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/Math.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Math.php) + +Line 12. + +*** + +### getParameterSchema + +#### Signature + +```php +public function getParameterSchema(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 66. + +*** + +### getPromptSections + +#### Signature + +```php +public function getPromptSections(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/Builtin/Math.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Math.php) + +Line 79. + +*** + +### getRequiredEnvVars + +#### Signature + +```php +public function getRequiredEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 33. + +*** + +### getVersion + +#### Signature + +```php +public function getVersion(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 28. + +*** + +### registerTools + +#### Signature + +```php +public function registerTools(): void +``` + +#### Source + +[`SignalWire/Skills/Builtin/Math.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Math.php) + +Line 27. + +*** + +### setup + +#### Signature + +```php +public function setup(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/Builtin/Math.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Math.php) + +Line 22. + +*** + +### supportsMultipleInstances + +#### Signature + +```php +public function supportsMultipleInstances(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 38. + +*** + +### validateEnvVars + +#### Signature + +```php +public function validateEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 100. + +## Source + +[`SignalWire/Skills/Builtin/Math.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Math.php) + +Line 10. diff --git a/fern/products/sdk-reference/php/agents/skills/builtin/builtin/mcp-gateway/index.mdx b/fern/products/sdk-reference/php/agents/skills/builtin/builtin/mcp-gateway/index.mdx new file mode 100644 index 0000000000..91b354cfd2 --- /dev/null +++ b/fern/products/sdk-reference/php/agents/skills/builtin/builtin/mcp-gateway/index.mdx @@ -0,0 +1,351 @@ +--- +slug: "/reference/php/agents/skills/builtin/builtin/mcp-gateway" +title: "McpGateway" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Skills\\Builtin\\McpGateway" + parent: "SignalWire\\Skills\\Builtin" + module: "agents.Skills.Builtin.Builtin" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/McpGateway.php" +--- +# `McpGateway` + +MCP Gateway skill. + +Mirrors signalwire-python's `signalwire.skills.mcp_gateway.skill`: + +POST \{gateway\_url\}/services/\{service\}/call +Auth: Bearer auth\_token OR Basic auth\_user:auth\_password +Body: \{ tool, arguments, session\_id, timeout, metadata \} +Response: \{ result \} — surfaced verbatim + +For session cleanup the Python skill issues `DELETE +/sessions/{session_id}` from the hangup-hook tool. The audit only +exercises the per-tool `call` path; the hangup hook is preserved +but does not block on the audit. + +No upstream URL override env var — the gateway URL is mandatory and +fully user-supplied (no third-party host to mock). The audit path +isn't probed for this skill (it's not in audit\_skills\_dispatch's +SKILL\_PROBES list as of this writing) but the implementation must +still be real because the surface is shipped to users. + +## Signature + +```php +class McpGateway extends SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire\Skills\SkillBase](/docs/sdk-reference/reference/php/agents/skills/skills/skill-base) + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(object $agent, array $params = array ( +)) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 13. + +*** + +### cleanup + +#### Signature + +```php +public function cleanup(): void +``` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 62. + +*** + +### getDescription + +#### Signature + +```php +public function getDescription(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/McpGateway.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/McpGateway.php) + +Line 39. + +*** + +### getGlobalData + +#### Signature + +```php +public function getGlobalData(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/Builtin/McpGateway.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/McpGateway.php) + +Line 314. + +*** + +### getHints + +#### Signature + +```php +public function getHints(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/Builtin/McpGateway.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/McpGateway.php) + +Line 297. + +*** + +### getInstanceKey + +#### Signature + +```php +public function getInstanceKey(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 89. + +*** + +### getName + +#### Signature + +```php +public function getName(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/McpGateway.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/McpGateway.php) + +Line 34. + +*** + +### getParameterSchema + +#### Signature + +```php +public function getParameterSchema(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 66. + +*** + +### getPromptSections + +#### Signature + +```php +public function getPromptSections(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/Builtin/McpGateway.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/McpGateway.php) + +Line 335. + +*** + +### getRequiredEnvVars + +#### Signature + +```php +public function getRequiredEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 33. + +*** + +### getVersion + +#### Signature + +```php +public function getVersion(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 28. + +*** + +### registerTools + +#### Signature + +```php +public function registerTools(): void +``` + +#### Source + +[`SignalWire/Skills/Builtin/McpGateway.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/McpGateway.php) + +Line 56. + +*** + +### setup + +#### Signature + +```php +public function setup(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/Builtin/McpGateway.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/McpGateway.php) + +Line 44. + +*** + +### supportsMultipleInstances + +#### Signature + +```php +public function supportsMultipleInstances(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 38. + +*** + +### validateEnvVars + +#### Signature + +```php +public function validateEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 100. + +## Source + +[`SignalWire/Skills/Builtin/McpGateway.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/McpGateway.php) + +Line 32. diff --git a/fern/products/sdk-reference/php/agents/skills/builtin/builtin/native-vector-search/index.mdx b/fern/products/sdk-reference/php/agents/skills/builtin/builtin/native-vector-search/index.mdx new file mode 100644 index 0000000000..e4d82151e0 --- /dev/null +++ b/fern/products/sdk-reference/php/agents/skills/builtin/builtin/native-vector-search/index.mdx @@ -0,0 +1,347 @@ +--- +slug: "/reference/php/agents/skills/builtin/builtin/native-vector-search" +title: "NativeVectorSearch" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Skills\\Builtin\\NativeVectorSearch" + parent: "SignalWire\\Skills\\Builtin" + module: "agents.Skills.Builtin.Builtin" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/NativeVectorSearch.php" +--- +# `NativeVectorSearch` + +Native vector search skill — network/remote mode only. + +Mirrors signalwire-python's +`signalwire.skills.native_vector_search.skill.NativeVectorSearchSkill`, +specifically the `_search_remote` branch: + +POST \{remote\_url\}/search +Auth: Optional Basic (parsed from remote\_url's user:pass@ if set) +Body: \{ query, index\_name, count, similarity\_threshold, tags \} +Response: \{ results: \[\{ content, score, metadata \}] \} + +The Python skill also supports a local SQLite/pgvector backend via +`signalwire.search`. PHP doesn't ship that backend; in remote mode +the SDK is just a thin HTTP client, which the audit verifies. Local +backend is recorded in PORT\_OMISSIONS.md. + +## Signature + +```php +class NativeVectorSearch extends SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire\Skills\SkillBase](/docs/sdk-reference/reference/php/agents/skills/skills/skill-base) + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(object $agent, array $params = array ( +)) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 13. + +*** + +### cleanup + +#### Signature + +```php +public function cleanup(): void +``` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 62. + +*** + +### getDescription + +#### Signature + +```php +public function getDescription(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/NativeVectorSearch.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/NativeVectorSearch.php) + +Line 35. + +*** + +### getGlobalData + +#### Signature + +```php +public function getGlobalData(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 48. + +*** + +### getHints + +#### Signature + +```php +public function getHints(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/Builtin/NativeVectorSearch.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/NativeVectorSearch.php) + +Line 258. + +*** + +### getInstanceKey + +#### Signature + +```php +public function getInstanceKey(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 89. + +*** + +### getName + +#### Signature + +```php +public function getName(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/NativeVectorSearch.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/NativeVectorSearch.php) + +Line 30. + +*** + +### getParameterSchema + +#### Signature + +```php +public function getParameterSchema(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 66. + +*** + +### getPromptSections + +#### Signature + +```php +public function getPromptSections(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 53. + +*** + +### getRequiredEnvVars + +#### Signature + +```php +public function getRequiredEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 33. + +*** + +### getVersion + +#### Signature + +```php +public function getVersion(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 28. + +*** + +### registerTools + +#### Signature + +```php +public function registerTools(): void +``` + +#### Source + +[`SignalWire/Skills/Builtin/NativeVectorSearch.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/NativeVectorSearch.php) + +Line 54. + +*** + +### setup + +#### Signature + +```php +public function setup(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/Builtin/NativeVectorSearch.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/NativeVectorSearch.php) + +Line 45. + +*** + +### supportsMultipleInstances + +#### Signature + +```php +public function supportsMultipleInstances(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/Builtin/NativeVectorSearch.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/NativeVectorSearch.php) + +Line 40. + +*** + +### validateEnvVars + +#### Signature + +```php +public function validateEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 100. + +## Source + +[`SignalWire/Skills/Builtin/NativeVectorSearch.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/NativeVectorSearch.php) + +Line 28. diff --git a/fern/products/sdk-reference/php/agents/skills/builtin/builtin/play-background-file/index.mdx b/fern/products/sdk-reference/php/agents/skills/builtin/builtin/play-background-file/index.mdx new file mode 100644 index 0000000000..601341a03c --- /dev/null +++ b/fern/products/sdk-reference/php/agents/skills/builtin/builtin/play-background-file/index.mdx @@ -0,0 +1,331 @@ +--- +slug: "/reference/php/agents/skills/builtin/builtin/play-background-file" +title: "PlayBackgroundFile" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Skills\\Builtin\\PlayBackgroundFile" + parent: "SignalWire\\Skills\\Builtin" + module: "agents.Skills.Builtin.Builtin" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/PlayBackgroundFile.php" +--- +# `PlayBackgroundFile` + +## Signature + +```php +class PlayBackgroundFile extends SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire\Skills\SkillBase](/docs/sdk-reference/reference/php/agents/skills/skills/skill-base) + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(object $agent, array $params = array ( +)) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 13. + +*** + +### cleanup + +#### Signature + +```php +public function cleanup(): void +``` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 62. + +*** + +### getDescription + +#### Signature + +```php +public function getDescription(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/PlayBackgroundFile.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/PlayBackgroundFile.php) + +Line 17. + +*** + +### getGlobalData + +#### Signature + +```php +public function getGlobalData(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 48. + +*** + +### getHints + +#### Signature + +```php +public function getHints(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 43. + +*** + +### getInstanceKey + +#### Signature + +```php +public function getInstanceKey(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 89. + +*** + +### getName + +#### Signature + +```php +public function getName(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/PlayBackgroundFile.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/PlayBackgroundFile.php) + +Line 12. + +*** + +### getParameterSchema + +#### Signature + +```php +public function getParameterSchema(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 66. + +*** + +### getPromptSections + +#### Signature + +```php +public function getPromptSections(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 53. + +*** + +### getRequiredEnvVars + +#### Signature + +```php +public function getRequiredEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 33. + +*** + +### getVersion + +#### Signature + +```php +public function getVersion(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 28. + +*** + +### registerTools + +#### Signature + +```php +public function registerTools(): void +``` + +#### Source + +[`SignalWire/Skills/Builtin/PlayBackgroundFile.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/PlayBackgroundFile.php) + +Line 36. + +*** + +### setup + +#### Signature + +```php +public function setup(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/Builtin/PlayBackgroundFile.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/PlayBackgroundFile.php) + +Line 27. + +*** + +### supportsMultipleInstances + +#### Signature + +```php +public function supportsMultipleInstances(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/Builtin/PlayBackgroundFile.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/PlayBackgroundFile.php) + +Line 22. + +*** + +### validateEnvVars + +#### Signature + +```php +public function validateEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 100. + +## Source + +[`SignalWire/Skills/Builtin/PlayBackgroundFile.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/PlayBackgroundFile.php) + +Line 10. diff --git a/fern/products/sdk-reference/php/agents/skills/builtin/builtin/spider/index.mdx b/fern/products/sdk-reference/php/agents/skills/builtin/builtin/spider/index.mdx new file mode 100644 index 0000000000..9c277f9e91 --- /dev/null +++ b/fern/products/sdk-reference/php/agents/skills/builtin/builtin/spider/index.mdx @@ -0,0 +1,346 @@ +--- +slug: "/reference/php/agents/skills/builtin/builtin/spider" +title: "Spider" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Skills\\Builtin\\Spider" + parent: "SignalWire\\Skills\\Builtin" + module: "agents.Skills.Builtin.Builtin" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Spider.php" +--- +# `Spider` + +Spider scraping skill. + +Mirrors signalwire-python's `signalwire.skills.spider.skill` (the +`_scrape_url_handler` / `_crawl_site_handler` paths). PHP doesn't +ship `lxml`, so HTML extraction uses a strip\_tags + regex pipeline +that handles the audit's canned `...` +sentinel and basic real-world pages — the Python version's quality +scorer and Reddit-aware extractor are not yet ported, but the +upstream contract (real GET, real text extraction) is met. + +Upstream URL override: `SPIDER_BASE_URL` for the audit fixture. +The audit fixture is a generic JSON server, so the response body +may either be a raw HTML string (production) or a JSON object with +an `_raw_html` field (audit fixture). We accept both. + +## Signature + +```php +class Spider extends SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire\Skills\SkillBase](/docs/sdk-reference/reference/php/agents/skills/skills/skill-base) + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(object $agent, array $params = array ( +)) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 13. + +*** + +### cleanup + +#### Signature + +```php +public function cleanup(): void +``` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 62. + +*** + +### getDescription + +#### Signature + +```php +public function getDescription(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/Spider.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Spider.php) + +Line 36. + +*** + +### getGlobalData + +#### Signature + +```php +public function getGlobalData(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 48. + +*** + +### getHints + +#### Signature + +```php +public function getHints(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/Builtin/Spider.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Spider.php) + +Line 455. + +*** + +### getInstanceKey + +#### Signature + +```php +public function getInstanceKey(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 89. + +*** + +### getName + +#### Signature + +```php +public function getName(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/Spider.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Spider.php) + +Line 31. + +*** + +### getParameterSchema + +#### Signature + +```php +public function getParameterSchema(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 66. + +*** + +### getPromptSections + +#### Signature + +```php +public function getPromptSections(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 53. + +*** + +### getRequiredEnvVars + +#### Signature + +```php +public function getRequiredEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 33. + +*** + +### getVersion + +#### Signature + +```php +public function getVersion(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 28. + +*** + +### registerTools + +#### Signature + +```php +public function registerTools(): void +``` + +#### Source + +[`SignalWire/Skills/Builtin/Spider.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Spider.php) + +Line 51. + +*** + +### setup + +#### Signature + +```php +public function setup(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/Builtin/Spider.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Spider.php) + +Line 46. + +*** + +### supportsMultipleInstances + +#### Signature + +```php +public function supportsMultipleInstances(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/Builtin/Spider.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Spider.php) + +Line 41. + +*** + +### validateEnvVars + +#### Signature + +```php +public function validateEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 100. + +## Source + +[`SignalWire/Skills/Builtin/Spider.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Spider.php) + +Line 27. diff --git a/fern/products/sdk-reference/php/agents/skills/builtin/builtin/swml-transfer/index.mdx b/fern/products/sdk-reference/php/agents/skills/builtin/builtin/swml-transfer/index.mdx new file mode 100644 index 0000000000..21ba56503f --- /dev/null +++ b/fern/products/sdk-reference/php/agents/skills/builtin/builtin/swml-transfer/index.mdx @@ -0,0 +1,331 @@ +--- +slug: "/reference/php/agents/skills/builtin/builtin/swml-transfer" +title: "SwmlTransfer" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Skills\\Builtin\\SwmlTransfer" + parent: "SignalWire\\Skills\\Builtin" + module: "agents.Skills.Builtin.Builtin" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/SwmlTransfer.php" +--- +# `SwmlTransfer` + +## Signature + +```php +class SwmlTransfer extends SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire\Skills\SkillBase](/docs/sdk-reference/reference/php/agents/skills/skills/skill-base) + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(object $agent, array $params = array ( +)) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 13. + +*** + +### cleanup + +#### Signature + +```php +public function cleanup(): void +``` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 62. + +*** + +### getDescription + +#### Signature + +```php +public function getDescription(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/SwmlTransfer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/SwmlTransfer.php) + +Line 17. + +*** + +### getGlobalData + +#### Signature + +```php +public function getGlobalData(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 48. + +*** + +### getHints + +#### Signature + +```php +public function getHints(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/Builtin/SwmlTransfer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/SwmlTransfer.php) + +Line 131. + +*** + +### getInstanceKey + +#### Signature + +```php +public function getInstanceKey(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 89. + +*** + +### getName + +#### Signature + +```php +public function getName(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/SwmlTransfer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/SwmlTransfer.php) + +Line 12. + +*** + +### getParameterSchema + +#### Signature + +```php +public function getParameterSchema(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 66. + +*** + +### getPromptSections + +#### Signature + +```php +public function getPromptSections(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/Builtin/SwmlTransfer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/SwmlTransfer.php) + +Line 150. + +*** + +### getRequiredEnvVars + +#### Signature + +```php +public function getRequiredEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 33. + +*** + +### getVersion + +#### Signature + +```php +public function getVersion(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 28. + +*** + +### registerTools + +#### Signature + +```php +public function registerTools(): void +``` + +#### Source + +[`SignalWire/Skills/Builtin/SwmlTransfer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/SwmlTransfer.php) + +Line 36. + +*** + +### setup + +#### Signature + +```php +public function setup(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/Builtin/SwmlTransfer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/SwmlTransfer.php) + +Line 27. + +*** + +### supportsMultipleInstances + +#### Signature + +```php +public function supportsMultipleInstances(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/Builtin/SwmlTransfer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/SwmlTransfer.php) + +Line 22. + +*** + +### validateEnvVars + +#### Signature + +```php +public function validateEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 100. + +## Source + +[`SignalWire/Skills/Builtin/SwmlTransfer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/SwmlTransfer.php) + +Line 10. diff --git a/fern/products/sdk-reference/php/agents/skills/builtin/builtin/weather-api/index.mdx b/fern/products/sdk-reference/php/agents/skills/builtin/builtin/weather-api/index.mdx new file mode 100644 index 0000000000..262faa1b8c --- /dev/null +++ b/fern/products/sdk-reference/php/agents/skills/builtin/builtin/weather-api/index.mdx @@ -0,0 +1,331 @@ +--- +slug: "/reference/php/agents/skills/builtin/builtin/weather-api" +title: "WeatherApi" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Skills\\Builtin\\WeatherApi" + parent: "SignalWire\\Skills\\Builtin" + module: "agents.Skills.Builtin.Builtin" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WeatherApi.php" +--- +# `WeatherApi` + +## Signature + +```php +class WeatherApi extends SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire\Skills\SkillBase](/docs/sdk-reference/reference/php/agents/skills/skills/skill-base) + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(object $agent, array $params = array ( +)) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 13. + +*** + +### cleanup + +#### Signature + +```php +public function cleanup(): void +``` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 62. + +*** + +### getDescription + +#### Signature + +```php +public function getDescription(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/WeatherApi.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WeatherApi.php) + +Line 17. + +*** + +### getGlobalData + +#### Signature + +```php +public function getGlobalData(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 48. + +*** + +### getHints + +#### Signature + +```php +public function getHints(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 43. + +*** + +### getInstanceKey + +#### Signature + +```php +public function getInstanceKey(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 89. + +*** + +### getName + +#### Signature + +```php +public function getName(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/WeatherApi.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WeatherApi.php) + +Line 12. + +*** + +### getParameterSchema + +#### Signature + +```php +public function getParameterSchema(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 66. + +*** + +### getPromptSections + +#### Signature + +```php +public function getPromptSections(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 53. + +*** + +### getRequiredEnvVars + +#### Signature + +```php +public function getRequiredEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 33. + +*** + +### getVersion + +#### Signature + +```php +public function getVersion(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 28. + +*** + +### registerTools + +#### Signature + +```php +public function registerTools(): void +``` + +#### Source + +[`SignalWire/Skills/Builtin/WeatherApi.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WeatherApi.php) + +Line 31. + +*** + +### setup + +#### Signature + +```php +public function setup(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/Builtin/WeatherApi.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WeatherApi.php) + +Line 22. + +*** + +### supportsMultipleInstances + +#### Signature + +```php +public function supportsMultipleInstances(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 38. + +*** + +### validateEnvVars + +#### Signature + +```php +public function validateEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 100. + +## Source + +[`SignalWire/Skills/Builtin/WeatherApi.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WeatherApi.php) + +Line 10. diff --git a/fern/products/sdk-reference/php/agents/skills/builtin/builtin/web-search/index.mdx b/fern/products/sdk-reference/php/agents/skills/builtin/builtin/web-search/index.mdx new file mode 100644 index 0000000000..d6a18681a2 --- /dev/null +++ b/fern/products/sdk-reference/php/agents/skills/builtin/builtin/web-search/index.mdx @@ -0,0 +1,368 @@ +--- +slug: "/reference/php/agents/skills/builtin/builtin/web-search" +title: "WebSearch" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Skills\\Builtin\\WebSearch" + parent: "SignalWire\\Skills\\Builtin" + module: "agents.Skills.Builtin.Builtin" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WebSearch.php" +--- +# `WebSearch` + +Web search skill backed by Google Custom Search. + +Mirrors signalwire-python's `signalwire.skills.web_search.skill` +(the `WebSearchSkill.search_and_scrape_best` path). The Python +reference fetches CSE results, then scrapes each result URL and +quality-scores the extracted text with a Reddit-aware extractor, a +per-domain weight table, and a length/diversity scorer. The PHP port +issues the CSE call faithfully and scrapes each result page with a +lighter strip\_tags/regex extractor (the heavyweight BeautifulSoup +scorer and the per-domain quality table remain Python-specific and +are tracked in PORT\_OMISSIONS.md). When no scraped page clears the +quality threshold — or the overall deadline fires — the handler falls +back to formatting the CSE titles+snippets so the response is always +non-empty. + +Latency control (Python skill.py commits 51101da + 295745b — the +SignalWire kernel times out webhook responses around 55s, so the +handler MUST finish under that): + +- per\_page\_timeout (2.0s): cURL CURLOPT\_TIMEOUT on each page scrape. +- overall\_deadline (10.0s): wall-clock budget for the whole tool + call, tracked from microtime(true); once exceeded, remaining + scrapes are abandoned and we return whatever we have (or the + snippet fallback). +- snippets\_only (false): skip page scraping entirely and format the + CSE snippets directly. Sub-second response. +- parallel\_scrape (true): accepted for API/schema parity with + Python/Go/TS. PHP is single-threaded and true concurrent HTTP + would require curl\_multi (invasive, and parallelism is NOT part of + the latency contract), so scrapes run SEQUENTIALLY with strict + per-page + overall-deadline enforcement. See PORT\_ADDITIONS.md. + +Upstream URL override: `WEB_SEARCH_BASE_URL` (used by +audit\_skills\_dispatch.py to point at a local fixture). When set, +the URL is rewritten to the override host while the path +`/customsearch/v1` is preserved. + +## Signature + +```php +class WebSearch extends SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire\Skills\SkillBase](/docs/sdk-reference/reference/php/agents/skills/skills/skill-base) + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(object $agent, array $params = array ( +)) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 13. + +*** + +### cleanup + +#### Signature + +```php +public function cleanup(): void +``` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 62. + +*** + +### getDescription + +#### Signature + +```php +public function getDescription(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/WebSearch.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WebSearch.php) + +Line 58. + +*** + +### getGlobalData + +#### Signature + +```php +public function getGlobalData(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/Builtin/WebSearch.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WebSearch.php) + +Line 545. + +*** + +### getHints + +#### Signature + +```php +public function getHints(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 43. + +*** + +### getInstanceKey + +#### Signature + +```php +public function getInstanceKey(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 89. + +*** + +### getName + +#### Signature + +```php +public function getName(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/WebSearch.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WebSearch.php) + +Line 53. + +*** + +### getParameterSchema + +#### Signature + +```php +public function getParameterSchema(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/Builtin/WebSearch.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WebSearch.php) + +Line 81. + +*** + +### getPromptSections + +#### Signature + +```php +public function getPromptSections(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/Builtin/WebSearch.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WebSearch.php) + +Line 554. + +*** + +### getRequiredEnvVars + +#### Signature + +```php +public function getRequiredEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 33. + +*** + +### getVersion + +#### Signature + +```php +public function getVersion(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/WebSearch.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WebSearch.php) + +Line 63. + +*** + +### registerTools + +#### Signature + +```php +public function registerTools(): void +``` + +#### Source + +[`SignalWire/Skills/Builtin/WebSearch.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WebSearch.php) + +Line 152. + +*** + +### setup + +#### Signature + +```php +public function setup(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/Builtin/WebSearch.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WebSearch.php) + +Line 73. + +*** + +### supportsMultipleInstances + +#### Signature + +```php +public function supportsMultipleInstances(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/Builtin/WebSearch.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WebSearch.php) + +Line 68. + +*** + +### validateEnvVars + +#### Signature + +```php +public function validateEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 100. + +## Source + +[`SignalWire/Skills/Builtin/WebSearch.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WebSearch.php) + +Line 48. diff --git a/fern/products/sdk-reference/php/agents/skills/builtin/builtin/wikipedia-search/index.mdx b/fern/products/sdk-reference/php/agents/skills/builtin/builtin/wikipedia-search/index.mdx new file mode 100644 index 0000000000..e932b205e2 --- /dev/null +++ b/fern/products/sdk-reference/php/agents/skills/builtin/builtin/wikipedia-search/index.mdx @@ -0,0 +1,343 @@ +--- +slug: "/reference/php/agents/skills/builtin/builtin/wikipedia-search" +title: "WikipediaSearch" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Skills\\Builtin\\WikipediaSearch" + parent: "SignalWire\\Skills\\Builtin" + module: "agents.Skills.Builtin.Builtin" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WikipediaSearch.php" +--- +# `WikipediaSearch` + +Wikipedia search skill backed by the public MediaWiki action API. + +Mirrors signalwire-python's +`signalwire.skills.wikipedia_search.skill.WikipediaSearchSkill.search_wiki`: + +1. GET en.wikipedia.org/w/api.php?action=query\&list=search\&srsearch=... +2. For each top result, GET ?action=query\&prop=extracts\&exintro&... + to fetch the article intro extract. + +Upstream URL override: `WIKIPEDIA_BASE_URL` for the audit fixture. +The path component (`/w/api.php`) is preserved. + +## Signature + +```php +class WikipediaSearch extends SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire\Skills\SkillBase](/docs/sdk-reference/reference/php/agents/skills/skills/skill-base) + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(object $agent, array $params = array ( +)) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 13. + +*** + +### cleanup + +#### Signature + +```php +public function cleanup(): void +``` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 62. + +*** + +### getDescription + +#### Signature + +```php +public function getDescription(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/WikipediaSearch.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WikipediaSearch.php) + +Line 34. + +*** + +### getGlobalData + +#### Signature + +```php +public function getGlobalData(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 48. + +*** + +### getHints + +#### Signature + +```php +public function getHints(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 43. + +*** + +### getInstanceKey + +#### Signature + +```php +public function getInstanceKey(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 89. + +*** + +### getName + +#### Signature + +```php +public function getName(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/Builtin/WikipediaSearch.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WikipediaSearch.php) + +Line 29. + +*** + +### getParameterSchema + +#### Signature + +```php +public function getParameterSchema(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 66. + +*** + +### getPromptSections + +#### Signature + +```php +public function getPromptSections(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/Builtin/WikipediaSearch.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WikipediaSearch.php) + +Line 177. + +*** + +### getRequiredEnvVars + +#### Signature + +```php +public function getRequiredEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 33. + +*** + +### getVersion + +#### Signature + +```php +public function getVersion(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 28. + +*** + +### registerTools + +#### Signature + +```php +public function registerTools(): void +``` + +#### Source + +[`SignalWire/Skills/Builtin/WikipediaSearch.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WikipediaSearch.php) + +Line 44. + +*** + +### setup + +#### Signature + +```php +public function setup(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/Builtin/WikipediaSearch.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WikipediaSearch.php) + +Line 39. + +*** + +### supportsMultipleInstances + +#### Signature + +```php +public function supportsMultipleInstances(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 38. + +*** + +### validateEnvVars + +#### Signature + +```php +public function validateEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 100. + +## Source + +[`SignalWire/Skills/Builtin/WikipediaSearch.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WikipediaSearch.php) + +Line 24. diff --git a/fern/products/sdk-reference/php/agents/skills/builtin/index.mdx b/fern/products/sdk-reference/php/agents/skills/builtin/index.mdx new file mode 100644 index 0000000000..88ff02c91c --- /dev/null +++ b/fern/products/sdk-reference/php/agents/skills/builtin/index.mdx @@ -0,0 +1,20 @@ +--- +slug: "/reference/php/agents/skills/builtin" +title: "Builtin" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "module" + language: "php" + qualified_name: "agents.Skills.Builtin" + parent: "SignalWire\\Skills" + module: "agents.Skills" +--- +# `Builtin` + +## Modules + + + + diff --git a/fern/products/sdk-reference/php/agents/skills/index.mdx b/fern/products/sdk-reference/php/agents/skills/index.mdx new file mode 100644 index 0000000000..4ee197d373 --- /dev/null +++ b/fern/products/sdk-reference/php/agents/skills/index.mdx @@ -0,0 +1,28 @@ +--- +slug: "/reference/php/agents/skills" +title: "Skills" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "module" + language: "php" + qualified_name: "SignalWire\\Skills" + parent: "agents" + module: "agents" +--- +# `Skills` + +## Signature + +```php +namespace SignalWire\Skills +``` + +## Modules + + + + + + diff --git a/fern/products/sdk-reference/php/agents/skills/skills/http-helper/index.mdx b/fern/products/sdk-reference/php/agents/skills/skills/http-helper/index.mdx new file mode 100644 index 0000000000..64dcca7928 --- /dev/null +++ b/fern/products/sdk-reference/php/agents/skills/skills/http-helper/index.mdx @@ -0,0 +1,232 @@ +--- +slug: "/reference/php/agents/skills/skills/http-helper" +title: "HttpHelper" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Skills\\HttpHelper" + parent: "agents.Skills.Skills" + module: "agents.Skills.Skills" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/HttpHelper.php" +--- +# `HttpHelper` + +Tiny HTTP helper for skill upstream calls. + +The REST client uses cURL behind a Basic-auth wrapper bound to +`https://` — that's the wrong shape for skills, which talk to +arbitrary third-party services with their own URL bases, headers, +and auth schemes. Each skill could call cURL inline, but they all +need the same handful of mechanics (URL building, headers, basic +auth, JSON encode/decode, base-URL override for testing). This +helper centralises that and gives skills a way to honor the +`_BASE_URL` env-var override that audit\_skills\_dispatch +relies on without each skill duplicating the env lookup. + +## Signature + +```php +class HttpHelper +``` + +## Constants + + + Default request timeout in seconds. + + +## Methods + +### applyBaseUrlOverride + +Look up a URL override env var and rewrite the URL host/scheme + +to point at the audit fixture when set. Skills call this with +the documented env name (e.g. `WEB_SEARCH_BASE_URL`) and the +production URL; the helper returns either the original URL or +an audit-fixture rewrite, preserving path + query. + +**Modifiers:** `static` + +#### Signature + +```php +public static function applyBaseUrlOverride(string $url, string $envVarName): string +``` + +#### Parameters + + + + + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/HttpHelper.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/HttpHelper.php) + +Line 75. + +*** + +### get + +Issue a GET. Returns \[status, body, parsed\_json\_or\_null]. + +**Modifiers:** `static` + +#### Signature + +```php +public static function get( + string $url, + array $headers = array ( +), + ?array $query = NULL, + ?array $basicAuth = NULL, + int $timeout = 15 +): array +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/HttpHelper.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/HttpHelper.php) + +Line 31. + +*** + +### postJson + +Issue a POST with a JSON body. Returns \[status, body, parsed]. + +**Modifiers:** `static` + +#### Signature + +```php +public static function postJson( + string $url, + mixed $body, + array $headers = array ( +), + ?array $basicAuth = NULL, + int $timeout = 15 +): array +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/HttpHelper.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/HttpHelper.php) + +Line 51. + +*** + +### request + +Inner request engine using cURL. Other skills may use this + +directly when they need PUT/DELETE; the GET / POST helpers +above cover the common cases. + +**Modifiers:** `static` + +#### Signature + +```php +public static function request( + string $method, + string $url, + array $headers = array ( +), + ?string $body = NULL, + ?array $basicAuth = NULL, + int $timeout = 15 +): array +``` + +#### Parameters + + + + + + + + + + + \[user, password] + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/HttpHelper.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/HttpHelper.php) + +Line 104. + +## Source + +[`SignalWire/Skills/HttpHelper.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/HttpHelper.php) + +Line 20. diff --git a/fern/products/sdk-reference/php/agents/skills/skills/index.mdx b/fern/products/sdk-reference/php/agents/skills/skills/index.mdx new file mode 100644 index 0000000000..33c0924d9e --- /dev/null +++ b/fern/products/sdk-reference/php/agents/skills/skills/index.mdx @@ -0,0 +1,200 @@ +--- +slug: "/reference/php/agents/skills/skills" +title: "Skills" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "module" + language: "php" + qualified_name: "agents.Skills.Skills" + parent: "SignalWire\\Skills" + module: "agents.Skills" +--- +# `Skills` + +## Classes + + + + Tiny HTTP helper for skill upstream calls. + + + + + + + + + +## Enums + +### SkillName + +Built-in skill names as a typed, compile-time-checked closed set. + +\{@see \SignalWire\Agent\AgentBase::addSkill()\} accepts this enum OR a string. +The enum gives editor autocompletion and makes a typo fail at the call site +(a bare string like `'datetiem'` only fails at runtime, on the server); +strings keep parity with the Python reference (which uses bare `str`) and +still allow custom / third-party skills that aren't built in. + +``` +$agent->addSkill(SkillName::Datetime); // typed, autocompleted +$agent->addSkill('datetime'); // string still works (parity) +$agent->addSkill('my_custom_skill'); // open set: custom skills ok +``` + +#### Signature + +```php +final enum SkillName implements UnitEnum, BackedEnum +``` + +#### Inheritance + +**Implements:** `UnitEnum`, `BackedEnum` + +#### Properties + + + + + +#### Constants + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#### Variants + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#### Methods + +##### cases + +**Modifiers:** `static` + +###### Signature + +```php +public static function cases(): array +``` + +###### Returns + +`array` + +*** + +##### from + +**Modifiers:** `static` + +###### Signature + +```php +public static function from(string|int $value): static +``` + +###### Parameters + + + +###### Returns + +`static` + +*** + +##### tryFrom + +**Modifiers:** `static` + +###### Signature + +```php +public static function tryFrom(string|int $value): ?static +``` + +###### Parameters + + + +###### Returns + +`?static` + +#### Source + +[`SignalWire/Skills/SkillName.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillName.php) + +Line 20. diff --git a/fern/products/sdk-reference/php/agents/skills/skills/skill-base/index.mdx b/fern/products/sdk-reference/php/agents/skills/skills/skill-base/index.mdx new file mode 100644 index 0000000000..c677068973 --- /dev/null +++ b/fern/products/sdk-reference/php/agents/skills/skills/skill-base/index.mdx @@ -0,0 +1,337 @@ +--- +slug: "/reference/php/agents/skills/skills/skill-base" +title: "SkillBase" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Skills\\SkillBase" + parent: "agents.Skills.Skills" + module: "agents.Skills.Skills" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php" +--- +# `SkillBase` + +**Modifiers:** `abstract` + +## Signature + +```php +abstract class SkillBase +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(object $agent, array $params = array ( +)) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 13. + +*** + +### cleanup + +#### Signature + +```php +public function cleanup(): void +``` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 62. + +*** + +### getDescription + +**Modifiers:** `abstract` + +#### Signature + +```php +public abstract function getDescription(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 26. + +*** + +### getGlobalData + +#### Signature + +```php +public function getGlobalData(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 48. + +*** + +### getHints + +#### Signature + +```php +public function getHints(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 43. + +*** + +### getInstanceKey + +#### Signature + +```php +public function getInstanceKey(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 89. + +*** + +### getName + +**Modifiers:** `abstract` + +#### Signature + +```php +public abstract function getName(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 24. + +*** + +### getParameterSchema + +#### Signature + +```php +public function getParameterSchema(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 66. + +*** + +### getPromptSections + +#### Signature + +```php +public function getPromptSections(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 53. + +*** + +### getRequiredEnvVars + +#### Signature + +```php +public function getRequiredEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 33. + +*** + +### getVersion + +#### Signature + +```php +public function getVersion(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 28. + +*** + +### registerTools + +**Modifiers:** `abstract` + +#### Signature + +```php +public abstract function registerTools(): void +``` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 22. + +*** + +### setup + +**Modifiers:** `abstract` + +#### Signature + +```php +public abstract function setup(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 20. + +*** + +### supportsMultipleInstances + +#### Signature + +```php +public function supportsMultipleInstances(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 38. + +*** + +### validateEnvVars + +#### Signature + +```php +public function validateEnvVars(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 100. + +## Source + +[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) + +Line 7. diff --git a/fern/products/sdk-reference/php/agents/skills/skills/skill-manager/index.mdx b/fern/products/sdk-reference/php/agents/skills/skills/skill-manager/index.mdx new file mode 100644 index 0000000000..d05ed56859 --- /dev/null +++ b/fern/products/sdk-reference/php/agents/skills/skills/skill-manager/index.mdx @@ -0,0 +1,177 @@ +--- +slug: "/reference/php/agents/skills/skills/skill-manager" +title: "SkillManager" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Skills\\SkillManager" + parent: "agents.Skills.Skills" + module: "agents.Skills.Skills" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillManager.php" +--- +# `SkillManager` + +## Signature + +```php +class SkillManager +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(object $agent) +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Skills/SkillManager.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillManager.php) + +Line 13. + +*** + +### getSkill + +#### Signature + +```php +public function getSkill(string $key): ?SignalWire\Skills\SkillBase +``` + +#### Parameters + + + +#### Returns + +`?SignalWire\Skills\SkillBase` + +#### Source + +[`SignalWire/Skills/SkillManager.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillManager.php) + +Line 96. + +*** + +### hasSkill + +#### Signature + +```php +public function hasSkill(string $key): bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/SkillManager.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillManager.php) + +Line 91. + +*** + +### listSkills + +#### Signature + +```php +public function listSkills(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillManager.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillManager.php) + +Line 86. + +*** + +### loadSkill + +#### Signature + +```php +public function loadSkill( + string $skillName, + array $params = array ( +), + ?string $skillClass = NULL +): array +``` + +#### Parameters + + + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillManager.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillManager.php) + +Line 22. + +*** + +### unloadSkill + +#### Signature + +```php +public function unloadSkill(string $key): bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Skills/SkillManager.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillManager.php) + +Line 74. + +## Source + +[`SignalWire/Skills/SkillManager.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillManager.php) + +Line 7. diff --git a/fern/products/sdk-reference/php/agents/skills/skills/skill-registry/index.mdx b/fern/products/sdk-reference/php/agents/skills/skills/skill-registry/index.mdx new file mode 100644 index 0000000000..82478e404e --- /dev/null +++ b/fern/products/sdk-reference/php/agents/skills/skills/skill-registry/index.mdx @@ -0,0 +1,220 @@ +--- +slug: "/reference/php/agents/skills/skills/skill-registry" +title: "SkillRegistry" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Skills\\SkillRegistry" + parent: "agents.Skills.Skills" + module: "agents.Skills.Skills" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillRegistry.php" +--- +# `SkillRegistry` + +## Signature + +```php +class SkillRegistry +``` + +## Methods + +### addSkillDirectory + +Add a directory to search for skills. + +Mirrors Python's +`signalwire.skills.registry.SkillRegistry.add_skill_directory`: +validate that the path exists and is a directory, then append it +(de-duplicated) to the external paths list. Throws +`InvalidArgumentException` (the PHP analog of Python's `ValueError`) +for invalid input. + +#### Signature + +```php +public function addSkillDirectory(string $path): void +``` + +#### Parameters + + + +#### Throws + +- `\InvalidArgumentException` — when the path doesn't exist or isn't a directory. + +#### Source + +[`SignalWire/Skills/SkillRegistry.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillRegistry.php) + +Line 107. + +*** + +### getAllSkillsSchema + +Get complete schema for all registered skills. + +Mirrors Python's instance-method +`SkillRegistry.get_all_skills_schema()` — returns an associative +array keyed by skill name where each entry contains metadata + +parameter schema. PHP skills don't carry rich Python-style +parameter introspection in v1, so the value defaults to a minimal +shape with the skill name; built-ins that expose +`getDescription` / `getVersion` get those merged in. + +#### Signature + +```php +public function getAllSkillsSchema(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillRegistry.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillRegistry.php) + +Line 144. + +*** + +### getExternalPaths + +Returns the registered external skill directories. + +Parity surface for Python's `_external_paths`. + +#### Signature + +```php +public function getExternalPaths(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillRegistry.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillRegistry.php) + +Line 126. + +*** + +### getFactory + +#### Signature + +```php +public function getFactory(string $name): ?string +``` + +#### Parameters + + + +#### Returns + +`?string` + +#### Source + +[`SignalWire/Skills/SkillRegistry.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillRegistry.php) + +Line 47. + +*** + +### instance + +**Modifiers:** `static` + +#### Signature + +```php +public static function instance(): SignalWire\Skills\SkillRegistry +``` + +#### Returns + +`SignalWire\Skills\SkillRegistry` + +#### Source + +[`SignalWire/Skills/SkillRegistry.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillRegistry.php) + +Line 80. + +*** + +### listSkills + +#### Signature + +```php +public function listSkills(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Skills/SkillRegistry.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillRegistry.php) + +Line 64. + +*** + +### registerSkill + +#### Signature + +```php +public function registerSkill(string $name, string $className): void +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/Skills/SkillRegistry.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillRegistry.php) + +Line 42. + +*** + +### reset + +**Modifiers:** `static` + +#### Signature + +```php +public static function reset(): void +``` + +#### Source + +[`SignalWire/Skills/SkillRegistry.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillRegistry.php) + +Line 89. + +## Source + +[`SignalWire/Skills/SkillRegistry.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillRegistry.php) + +Line 7. diff --git a/fern/products/sdk-reference/php/agents/swaig/index.mdx b/fern/products/sdk-reference/php/agents/swaig/index.mdx new file mode 100644 index 0000000000..49d383dd5c --- /dev/null +++ b/fern/products/sdk-reference/php/agents/swaig/index.mdx @@ -0,0 +1,26 @@ +--- +slug: "/reference/php/agents/swaig" +title: "SWAIG" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "module" + language: "php" + qualified_name: "SignalWire\\SWAIG" + parent: "agents" + module: "agents" +--- +# `SWAIG` + +## Signature + +```php +namespace SignalWire\SWAIG +``` + +## Modules + + + + diff --git a/fern/products/sdk-reference/php/agents/swaig/swaig/function-result/index.mdx b/fern/products/sdk-reference/php/agents/swaig/swaig/function-result/index.mdx new file mode 100644 index 0000000000..6abe4cff5f --- /dev/null +++ b/fern/products/sdk-reference/php/agents/swaig/swaig/function-result/index.mdx @@ -0,0 +1,1674 @@ +--- +slug: "/reference/php/agents/swaig/swaig/function-result" +title: "FunctionResult" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\SWAIG\\FunctionResult" + parent: "agents.SWAIG.SWAIG" + module: "agents.SWAIG.SWAIG" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php" +--- +# `FunctionResult` + +## Signature + +```php +class FunctionResult +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(?string $response = '', bool $postProcess = false) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 13. + +*** + +### addAction + +#### Signature + +```php +public function addAction(array $action): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 33. + +*** + +### addActions + +#### Signature + +```php +public function addActions(array $actions): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 39. + +*** + +### addDynamicHints + +#### Signature + +```php +public function addDynamicHints(array $hints): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 430. + +*** + +### clearDynamicHints + +#### Signature + +```php +public function clearDynamicHints(): SignalWire\SWAIG\FunctionResult +``` + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 436. + +*** + +### connect + +#### Signature + +```php +public function connect( + string $destination, + bool $final = true, + string $from = '' +): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + + + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 80. + +*** + +### createPaymentAction + +Create a payment action for use in payment prompts. + +Parity: \{"type": $actionType, "phrase": $phrase\}. + +**Modifiers:** `static` + +#### Signature + +```php +public static function createPaymentAction(string $actionType, string $phrase): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 1131. + +*** + +### createPaymentParameter + +Create a payment parameter (name/value pair) for \{@see FunctionResult::pay()\}. + +Parity: \{"name": $name, "value": $value\}. + +**Modifiers:** `static` + +#### Signature + +```php +public static function createPaymentParameter(string $name, string $value): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 1145. + +*** + +### createPaymentPrompt + +Create a payment-prompt structure for use with \{@see FunctionResult::pay()\}. + +Parity with the Python reference `create_payment_prompt`: +\{"for": $forSituation, "actions": $actions, "card\_type"?, "error\_type"?\}. + +**Modifiers:** `static` + +#### Signature + +```php +public static function createPaymentPrompt( + string $forSituation, + array $actions, + ?string $cardType = NULL, + ?string $errorType = NULL +): array +``` + +#### Parameters + + + + + actions with 'type'/'phrase' keys. + + + + space-separated card types. + + + + space-separated error types. + + +#### Returns + +`array` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 1104. + +*** + +### enableExtensiveData + +#### Signature + +```php +public function enableExtensiveData( + bool $enabled = true +): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 475. + +*** + +### enableFunctionsOnTimeout + +#### Signature + +```php +public function enableFunctionsOnTimeout( + bool $enabled = true +): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 468. + +*** + +### executeRpc + +Execute an RPC method on a call using SWML. + +Parity with the Python reference `execute_rpc`: the rpc params are +keyed \{method, call\_id?, node\_id?, params?\} (call\_id/node\_id are +TOP-LEVEL siblings of method/params, NOT nested inside params) and the +\{"execute\_rpc": ...\} verb is wrapped in a full SWML document. There is +no `jsonrpc` envelope — method strings are bare (e.g. "dial", not +"calling.dial"). + +#### Signature + +```php +public function executeRpc( + string $method, + ?array $params = NULL, + ?string $callId = NULL, + ?string $nodeId = NULL +): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + + + optional RPC method parameters. + + + + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 1010. + +*** + +### executeSwml + +Execute SWML content with optional transfer behavior. Parity with the + +Python reference `execute_swml`: a string is parsed to an array (on parse +failure it is wrapped as \{"raw\_swml": <text>\}); when $transfer is true the +key "transfer" => "true" is set INSIDE the SWML document; the action is +ALWAYS added under the "SWML" key (there is no separate transfer key). + +#### Signature + +```php +public function executeSwml( + $swmlContent, + bool $transfer = false +): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + SWML JSON string or already-decoded array. + + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 499. + +*** + +### hangup + +#### Signature + +```php +public function hangup(): SignalWire\SWAIG\FunctionResult +``` + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 129. + +*** + +### hold + +#### Signature + +```php +public function hold(int $timeout = 300): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 136. + +*** + +### joinConference + +Join an ad-hoc audio conference with RELAY and CXML calls using SWML. + +Full parity with signalwire-python core/function\_result.py +`join_conference`: 18 optional parameters, 7 validations, and the +same simple/full emission. When every parameter is at its default the +payload collapses to the bare conference-NAME string +(\{"join\_conference": "<name>"\}); otherwise it is the object form keyed +by snake\_case wire keys, with each key emitted only when it differs +from its default. The \{"join\_conference": ...\} payload is wrapped in a +full SWML document and emitted through \{@see FunctionResult::executeSwml()\} +— the same path Python's `record_call` uses — so it lands under the +"SWML" action key. + +Note: Python uses `wait_url` (SWML URL) for hold music; there is no +`hold_audio` parameter. (The previously-invented `holdAudio`/`hold_audio` +had no Python equivalent and was removed.) + +#### Signature + +```php +public function joinConference( + string $name, + bool $muted = false, + string $beep = 'true', + bool $startOnEnter = true, + bool $endOnExit = false, + ?string $waitUrl = NULL, + int $maxParticipants = 250, + string $record = 'do-not-record', + ?string $region = NULL, + string $trim = 'trim-silence', + ?string $coach = NULL, + ?string $statusCallbackEvent = NULL, + ?string $statusCallback = NULL, + string $statusCallbackMethod = 'POST', + ?string $recordingStatusCallback = NULL, + string $recordingStatusCallbackMethod = 'POST', + string $recordingStatusCallbackEvent = 'completed', + mixed $result = NULL +): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Switch on return\_value when object \{\} or cond when array \[]; null to omit (parity with Python `Optional[Any]`). + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Throws + +- `\InvalidArgumentException` — on any of the 7 validation failures. + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 554. + +*** + +### joinRoom + +#### Signature + +```php +public function joinRoom(string $name): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 721. + +*** + +### pay + +Process payment using the SWML pay action. + +Full parity with the Python reference `pay` (19 user-facing params): the +SWML document runs `{set:{ai_response}}` then `{pay:{...}}`. The wire key +for the collection method is `input` (NOT `input_method`); numeric and +boolean fields are stringified ("5"/"true"); `postal_code` is emitted as a +lowercased bool-string when a bool, or verbatim when a string. Optional +fields (status\_url/charge\_amount/description/parameters/prompts) are +emitted only when supplied. + +#### Signature + +```php +public function pay( + string $paymentConnectorUrl, + string $inputMethod = 'dtmf', + ?string $statusUrl = NULL, + string $paymentMethod = 'credit-card', + int $timeout = 5, + int $maxAttempts = 1, + bool $securityCode = true, + string|bool $postalCode = true, + int $minPostalCodeLength = 0, + string $tokenType = 'reusable', + ?string $chargeAmount = NULL, + string $currency = 'usd', + string $language = 'en-US', + string $voice = 'woman', + ?string $description = NULL, + string $validCardTypes = 'visa mastercard amex', + ?array $parameters = NULL, + ?array $prompts = NULL, + ?string $aiResponse = 'The payment status is ${pay_result}, do not mention anything else about collecting payment if successful.' +): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + + + + + + + + + + + + + + + prompt-for-postal (bool) or an actual postcode (string). + + + + + + + + + + + + + + + + + + + + name/value pairs for the connector. + + + + custom prompt configs. + + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 924. + +*** + +### playBackgroundFile + +#### Signature + +```php +public function playBackgroundFile( + string $filename, + bool $wait = false +): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 298. + +*** + +### recordCall + +Start background call recording using SWML. + +Full parity with the Python reference `record_call`: validates the +format (\{wav,mp3,mp4\}) and direction (\{speak,listen,both\}) closed sets, +ALWAYS emits stereo/format/direction/beep/input\_sensitivity, adds the +optional fields only when supplied, and wraps the \{"record\_call": ...\} +verb in a full SWML document emitted via \{@see FunctionResult::executeSwml()\} +(so it lands under the "SWML" action key). + +#### Signature + +```php +public function recordCall( + ?string $controlId = NULL, + bool $stereo = false, + SignalWire\SWAIG\RecordFormat|string $format = 'wav', + SignalWire\SWAIG\RecordDirection|string $direction = 'both', + ?string $terminators = NULL, + bool $beep = false, + float $inputSensitivity = 44.0, + ?float $initialTimeout = NULL, + ?float $endSilenceTimeout = NULL, + ?float $maxLength = NULL, + ?string $statusUrl = NULL +): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + + + + + recording container format — the typed \{@see RecordFormat\} enum (typo-checked at the call site) or a bare string (parity with Python's `record_call`). Normalized to the wire string ('wav'/'mp3'/'mp4'). 'mp4' is valid for the SWML `record_call` verb, distinct from the RELAY `record` action's 2-value format set. + + + + stream direction — the typed \{@see RecordDirection\} enum (typo-checked at the call site) or a bare string (parity with Python's `record_call`). Normalized to the wire string ('speak'/'listen'/'both'). Note `record_call` uses 'listen' where \{@see FunctionResult::tap()\} uses 'hear' — distinct closed sets. + + + + + + + + + + + + + + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Throws + +- `\InvalidArgumentException` — on an invalid format or direction. + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 339. + +*** + +### removeGlobalData + +#### Signature + +```php +public function removeGlobalData(array|string $keys): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + single key or list of keys to remove + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 181. + +*** + +### removeMetadata + +#### Signature + +```php +public function removeMetadata(array|string $keys): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + single key or list of keys to remove + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 198. + +*** + +### replaceInHistory + +After first send, replace the tool\_call+result pair in history. + +#### Signature + +```php +public function replaceInHistory( + string|bool $text = true +): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + String -> replace the tool\_call with an assistant message containing this text. True (default) -> remove the pair entirely. + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 282. + +*** + +### rpcAiMessage + +Inject a message into an AI agent on another call using execute\_rpc. + +Parity: method="ai\_message", call\_id top-level, params=\{role, +message\_text\}. `role` defaults to "system". + +#### Signature + +```php +public function rpcAiMessage( + string $callId, + string $messageText, + string $role = 'system' +): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + + + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 1068. + +*** + +### rpcAiUnhold + +Unhold another call using execute\_rpc. + +Parity: method="ai\_unhold", call\_id top-level, params=\{\}. + +#### Signature + +```php +public function rpcAiUnhold(string $callId): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 1080. + +*** + +### rpcDial + +Dial out to a number with a destination SWML URL using execute\_rpc. + +Parity: method="dial", params=\{devices:\{type,params:\{to\_number, +from\_number\}\}, dest\_swml\}. + +#### Signature + +```php +public function rpcDial( + string $toNumber, + string $fromNumber, + string $destSwml, + string $deviceType = 'phone' +): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + + + + + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 1045. + +*** + +### say + +#### Signature + +```php +public function say(string $text): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 292. + +*** + +### sendSms + +Send a text message to a PSTN phone number using SWML. + +Full parity with the Python reference `send_sms`: either body or media +(or both) must be provided; the \{"send\_sms": ...\} verb is wrapped in a +full SWML document via executeSwml. Optional fields (body/media/tags/ +region) are emitted only when supplied. + +#### Signature + +```php +public function sendSms( + string $toNumber, + string $fromNumber, + ?string $body = NULL, + array $media = array ( +), + array $tags = array ( +), + ?string $region = NULL +): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + + + + + + + URLs to send (optional if $body is given). + + + + tags for UI searching. + + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Throws + +- `\InvalidArgumentException` — if neither body nor media is provided. + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 866. + +*** + +### setEndOfSpeechTimeout + +#### Signature + +```php +public function setEndOfSpeechTimeout(int $ms): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 446. + +*** + +### setMetadata + +#### Signature + +```php +public function setMetadata(array $data): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 189. + +*** + +### setPostProcess + +#### Signature + +```php +public function setPostProcess(bool $val): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 27. + +*** + +### setResponse + +#### Signature + +```php +public function setResponse(string $text): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 21. + +*** + +### setSpeechEventTimeout + +#### Signature + +```php +public function setSpeechEventTimeout(int $ms): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 452. + +*** + +### simulateUserInput + +#### Signature + +```php +public function simulateUserInput(string $text): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 1085. + +*** + +### sipRefer + +#### Signature + +```php +public function sipRefer(string $toUri): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 736. + +*** + +### stop + +#### Signature + +```php +public function stop(): SignalWire\SWAIG\FunctionResult +``` + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 164. + +*** + +### stopBackgroundFile + +#### Signature + +```php +public function stopBackgroundFile(): SignalWire\SWAIG\FunctionResult +``` + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 310. + +*** + +### stopRecordCall + +#### Signature + +```php +public function stopRecordCall( + ?string $controlId = NULL +): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 408. + +*** + +### stopTap + +#### Signature + +```php +public function stopTap(?string $controlId = NULL): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 834. + +*** + +### switchContext + +#### Signature + +```php +public function switchContext( + string $systemPrompt, + string $userPrompt = '', + bool $consolidate = false, + bool $fullReset = false, + bool $isolated = false +): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 238. + +*** + +### swmlChangeContext + +#### Signature + +```php +public function swmlChangeContext(string $contextName): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 231. + +*** + +### swmlChangeStep + +#### Signature + +```php +public function swmlChangeStep(string $stepName): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 224. + +*** + +### swmlTransfer + +Add a SWML transfer action with AI-response setup for when the transfer + +completes. Parity with the Python reference `swml_transfer`: builds a SWML +document whose `main` runs `{set:{ai_response}}` then `{transfer:{dest}}`, +and emits a top-level `transfer` = str($final).lower() that marks the call +(non-)final. `$final` defaults TRUE (permanent transfer), same as connect(). + +#### Signature + +```php +public function swmlTransfer( + string $dest, + string $aiResponse, + bool $final = true +): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + + + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 111. + +*** + +### swmlUserEvent + +#### Signature + +```php +public function swmlUserEvent(array $eventData): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 206. + +*** + +### tap + +Start background call tap using SWML. + +Full parity with the Python reference `tap`: validates direction +(\{speak,hear,both\}), codec (\{PCMU,PCMA\}) and rtp\_ptime (> 0); the only +always-emitted field is `uri`; control\_id/direction/codec/rtp\_ptime/ +status\_url are added only when they differ from their defaults; the +\{"tap": ...\} verb is wrapped in a full SWML document via executeSwml. + +#### Signature + +```php +public function tap( + string $uri, + ?string $controlId = NULL, + SignalWire\SWAIG\TapDirection|string $direction = 'both', + SignalWire\SWAIG\Codec|string $codec = 'PCMU', + int $rtpPtime = 20, + ?string $statusUrl = NULL +): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + + + + + stream direction — the typed \{@see TapDirection\} enum (typo-checked at the call site) or a bare string (parity with Python's `tap`). Normalized to the wire string ('speak'/'hear'/'both'). + + + + media codec — the typed \{@see Codec\} enum (typo-checked at the call site) or a bare string (parity with Python's `tap`). Normalized to the wire string ('PCMU'/'PCMA'). This is the SWAIG tap codec set only, NOT the larger RELAY stream/connect codec superset. + + + + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Throws + +- `\InvalidArgumentException` — on invalid direction, codec, or rtp\_ptime. + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 770. + +*** + +### toArray + +#### Signature + +```php +public function toArray(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 47. + +*** + +### toggleFunctions + +#### Signature + +```php +public function toggleFunctions(array $toggles): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 458. + +*** + +### toJson + +#### Signature + +```php +public function toJson(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 73. + +*** + +### updateGlobalData + +#### Signature + +```php +public function updateGlobalData(array $data): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 172. + +*** + +### updateSettings + +#### Signature + +```php +public function updateSettings(array $settings): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 481. + +*** + +### waitForUser + +#### Signature + +```php +public function waitForUser( + ?bool $enabled = NULL, + ?int $timeout = NULL, + bool $answerFirst = false +): SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + + + + + +#### Returns + +`SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 145. + +## Source + +[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) + +Line 7. diff --git a/fern/products/sdk-reference/php/agents/swaig/swaig/index.mdx b/fern/products/sdk-reference/php/agents/swaig/swaig/index.mdx new file mode 100644 index 0000000000..3e81ce0e57 --- /dev/null +++ b/fern/products/sdk-reference/php/agents/swaig/swaig/index.mdx @@ -0,0 +1,507 @@ +--- +slug: "/reference/php/agents/swaig/swaig" +title: "SWAIG" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "module" + language: "php" + qualified_name: "agents.SWAIG.SWAIG" + parent: "SignalWire\\SWAIG" + module: "agents.SWAIG" +--- +# `SWAIG` + +## Classes + + + + + + Fluent, type-safe builder for a SWAIG tool's parameter schema. + + + +## Enums + +### Codec + +Media codec for call tapping, as a typed, compile-time-checked closed set. + +\{@see FunctionResult::tap()\} accepts this enum OR a string for its `$codec` +argument. The enum gives editor autocompletion and makes a typo fail at the +call site; strings keep parity with the Python reference (`tap` takes a bare +`str`). + +``` +$result->tap($uri, codec: Codec::Pcma); // typed +$result->tap($uri, codec: 'PCMA'); // string (parity) +``` + +The two members are the only codecs the Python reference's `tap` accepts +(`["PCMU", "PCMA"]`). The wire strings are upper-case and matching is +case-sensitive, mirroring the reference's literal list. + +NOTE: this is the SWAIG `tap` codec set ONLY. It is deliberately NOT shared +with the RELAY `stream`/`connect` codec superset +(`{PCMU,PCMA,OPUS,G729,G722,VP8,H264}`, comma-joinable) — those are a +distinct, larger vocabulary and must not be unified with this 2-value set. + +- `Pcmu` — `PCMU` (G.711 µ-law, the default). +- `Pcma` — `PCMA` (G.711 A-law). + +#### Signature + +```php +final enum Codec implements UnitEnum, BackedEnum +``` + +#### Inheritance + +**Implements:** `UnitEnum`, `BackedEnum` + +#### Properties + + + + + +#### Constants + + + + + +#### Variants + + + + + +#### Methods + +##### cases + +**Modifiers:** `static` + +###### Signature + +```php +public static function cases(): array +``` + +###### Returns + +`array` + +*** + +##### from + +**Modifiers:** `static` + +###### Signature + +```php +public static function from(string|int $value): static +``` + +###### Parameters + + + +###### Returns + +`static` + +*** + +##### tryFrom + +**Modifiers:** `static` + +###### Signature + +```php +public static function tryFrom(string|int $value): ?static +``` + +###### Parameters + + + +###### Returns + +`?static` + +#### Source + +[`SignalWire/SWAIG/Codec.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/Codec.php) + +Line 30. + +*** + +### RecordDirection + +Audio-stream direction for call recording, as a typed, compile-time-checked + +closed set. + +\{@see FunctionResult::recordCall()\} accepts this enum OR a string for its +`$direction` argument. The enum gives editor autocompletion and makes a typo +fail at the call site; strings keep parity with the Python reference +(`record_call` takes a bare `str`). + +``` +$result->recordCall(direction: RecordDirection::Listen); // typed +$result->recordCall(direction: 'listen'); // string (parity) +``` + +The three members are the only directions the Python reference's `record_call` +accepts (`["speak", "listen", "both"]`). Note this set uses `listen`, which +differs from \{@see TapDirection\} — the `tap` set uses `hear`. They are +deliberately separate enums because the reference validates two distinct lists. +The backing values are the exact wire strings. + +- `Speak` — audio the far end hears from the agent. +- `Listen` — audio the agent hears from the far end. +- `Both` — bidirectional (the default). + +#### Signature + +```php +final enum RecordDirection implements UnitEnum, BackedEnum +``` + +#### Inheritance + +**Implements:** `UnitEnum`, `BackedEnum` + +#### Properties + + + + + +#### Constants + + + + + + + +#### Variants + + + + + + + +#### Methods + +##### cases + +**Modifiers:** `static` + +###### Signature + +```php +public static function cases(): array +``` + +###### Returns + +`array` + +*** + +##### from + +**Modifiers:** `static` + +###### Signature + +```php +public static function from(string|int $value): static +``` + +###### Parameters + + + +###### Returns + +`static` + +*** + +##### tryFrom + +**Modifiers:** `static` + +###### Signature + +```php +public static function tryFrom(string|int $value): ?static +``` + +###### Parameters + + + +###### Returns + +`?static` + +#### Source + +[`SignalWire/SWAIG/RecordDirection.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/RecordDirection.php) + +Line 29. + +*** + +### RecordFormat + +Recording container format for call recording, as a typed, + +compile-time-checked closed set. + +\{@see FunctionResult::recordCall()\} accepts this enum OR a string for its +`$format` argument. The enum gives editor autocompletion and makes a typo +fail at the call site; strings keep parity with the Python reference +(`record_call` takes a bare `str`). + +``` +$result->recordCall(format: RecordFormat::Mp3); // typed +$result->recordCall(format: 'mp3'); // string (parity) +``` + +The three members are the only formats the Python reference's `record_call` +accepts (`["wav", "mp3", "mp4"]` — the SWML `record_call` verb schema; `mp4` +is valid here, distinct from the RELAY `record` action's 2-value +`audio.format` set). The backing values are the exact wire strings. + +- `Wav` — WAV container (the default). +- `Mp3` — MP3 container. +- `Mp4` — MP4 container. + +#### Signature + +```php +final enum RecordFormat implements UnitEnum, BackedEnum +``` + +#### Inheritance + +**Implements:** `UnitEnum`, `BackedEnum` + +#### Properties + + + + + +#### Constants + + + + + + + +#### Variants + + + + + + + +#### Methods + +##### cases + +**Modifiers:** `static` + +###### Signature + +```php +public static function cases(): array +``` + +###### Returns + +`array` + +*** + +##### from + +**Modifiers:** `static` + +###### Signature + +```php +public static function from(string|int $value): static +``` + +###### Parameters + + + +###### Returns + +`static` + +*** + +##### tryFrom + +**Modifiers:** `static` + +###### Signature + +```php +public static function tryFrom(string|int $value): ?static +``` + +###### Parameters + + + +###### Returns + +`?static` + +#### Source + +[`SignalWire/SWAIG/RecordFormat.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/RecordFormat.php) + +Line 28. + +*** + +### TapDirection + +Audio-stream direction for call tapping, as a typed, compile-time-checked + +closed set. + +\{@see FunctionResult::tap()\} accepts this enum OR a string for its +`$direction` argument. The enum gives editor autocompletion and makes a typo +fail at the call site; strings keep parity with the Python reference (`tap` +takes a bare `str`). + +``` +$result->tap($uri, direction: TapDirection::Speak); // typed +$result->tap($uri, direction: 'speak'); // string (parity) +``` + +The three members are the only directions the Python reference's `tap` accepts +(`["speak", "hear", "both"]`). Note this set uses `hear`, which differs from +\{@see RecordDirection\} — the `record_call` set uses `listen`. They are +deliberately separate enums because the reference validates two distinct lists. +The backing values are the exact wire strings. + +- `Speak` — audio the far end hears from the agent. +- `Hear` — audio the agent hears from the far end. +- `Both` — bidirectional (the default). + +#### Signature + +```php +final enum TapDirection implements UnitEnum, BackedEnum +``` + +#### Inheritance + +**Implements:** `UnitEnum`, `BackedEnum` + +#### Properties + + + + + +#### Constants + + + + + + + +#### Variants + + + + + + + +#### Methods + +##### cases + +**Modifiers:** `static` + +###### Signature + +```php +public static function cases(): array +``` + +###### Returns + +`array` + +*** + +##### from + +**Modifiers:** `static` + +###### Signature + +```php +public static function from(string|int $value): static +``` + +###### Parameters + + + +###### Returns + +`static` + +*** + +##### tryFrom + +**Modifiers:** `static` + +###### Signature + +```php +public static function tryFrom(string|int $value): ?static +``` + +###### Parameters + + + +###### Returns + +`?static` + +#### Source + +[`SignalWire/SWAIG/TapDirection.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/TapDirection.php) + +Line 29. diff --git a/fern/products/sdk-reference/php/agents/swaig/swaig/parameter-schema/index.mdx b/fern/products/sdk-reference/php/agents/swaig/swaig/parameter-schema/index.mdx new file mode 100644 index 0000000000..41c74d8758 --- /dev/null +++ b/fern/products/sdk-reference/php/agents/swaig/swaig/parameter-schema/index.mdx @@ -0,0 +1,535 @@ +--- +slug: "/reference/php/agents/swaig/swaig/parameter-schema" +title: "ParameterSchema" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\SWAIG\\ParameterSchema" + parent: "agents.SWAIG.SWAIG" + module: "agents.SWAIG.SWAIG" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/ParameterSchema.php" +--- +# `ParameterSchema` + +Fluent, type-safe builder for a SWAIG tool's parameter schema. + +Defining a tool's parameters today means hand-writing the JSON-Schema +`properties` blob as a nested associative array — exactly the shape +\{@see \SignalWire\SWML\Service::defineTool()\} expects for its +`$parameters` argument: + +``` +$agent->defineTool('lookup', 'Look it up', [ + 'service' => ['type' => 'string', 'description' => 'The service'], + 'date' => ['type' => 'string', 'description' => 'YYYY-MM-DD'], +], $handler); +``` + +That untyped array is error-prone: a misspelled `'tpye'`, a wrong +nesting level, or an `enum` value that drifts from a closed set fails +silently at runtime (the model just sees a malformed schema). This +builder produces the **byte-identical** `properties` map type-safely — +one method per JSON-Schema property kind, with the kind, description, +and modifiers checked at the call site: + +``` +$params = ParameterSchema::create() + ->string('service', 'The service to look up') + ->string('date', 'YYYY-MM-DD') + ->enum('fmt', RecordFormat::cases(), 'Recording format') + ->required('service', 'date') + ->toArray(); // <- same array as the hand-written form + +$agent->defineTool('lookup', 'Look it up', $params, $handler); +``` + +This is a typed convenience over the SAME wire output, NOT a new +format. The untyped-array path keeps working unchanged; the builder is +purely additive (Python's reference takes a bare `Dict[str, Any]`, so +there is no Python equivalent — see PORT\_ADDITIONS.md). + +Two outputs, matching the two registration paths: + +- \{@see toArray()\} returns the bare `properties` map for the + `defineTool($name, $desc, $parameters, …)` slot. Per-`defineTool` + convention the schema-level `required` list has no home there, so + `required()` names are emitted as a per-property `'required' => true` + flag (the convention used by the built-in Math / WikipediaSearch + skills). +- \{@see toArgument()\} returns the full `argument` object + `{type: object, properties: {…}, required: […]}` for the + `registerSwaigFunction()` path, with `required` at the argument + level — byte-identical to the hand-written `argument` blocks (the + Joke / ApiNinjasTrivia / GoogleMaps skills). + +Each property carries a kind + description and accepts optional +modifiers (default, enum, format, nested items/object). Closed-set +enums integrate the Tier-1 typed enums +(\{@see RecordFormat\} / \{@see RecordDirection\} / \{@see TapDirection\} / +\{@see Codec\}) via \{@see enum()\} — pass `RecordFormat::cases()` and the +backing `->value` strings become the schema `enum` array. + +**Modifiers:** `final` + +## Signature + +```php +final class ParameterSchema +``` + +## Methods + +### array + +Add an `array` property whose elements are all of kind `$itemsKind` + +(`string`, `number`, `integer`, `boolean`, or `object`). + +For `object` items, pass a nested \{@see ParameterSchema\} via +`$opts['items_schema']` to describe the element shape. + +#### Signature + +```php +public function array( + string $name, + string $itemsKind, + string $description, + array $opts = array ( +) +): SignalWire\SWAIG\ParameterSchema +``` + +#### Parameters + + + + + + + + + +#### Returns + +`SignalWire\SWAIG\ParameterSchema` + +#### Source + +[`SignalWire/SWAIG/ParameterSchema.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/ParameterSchema.php) + +Line 164. + +*** + +### boolean + +Add a `boolean` property. + +#### Signature + +```php +public function boolean( + string $name, + string $description, + array $opts = array ( +) +): SignalWire\SWAIG\ParameterSchema +``` + +#### Parameters + + + + + + + +#### Returns + +`SignalWire\SWAIG\ParameterSchema` + +#### Source + +[`SignalWire/SWAIG/ParameterSchema.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/ParameterSchema.php) + +Line 121. + +*** + +### create + +Start a new, empty schema builder. + +**Modifiers:** `static` + +#### Signature + +```php +public static function create(): SignalWire\SWAIG\ParameterSchema +``` + +#### Returns + +`SignalWire\SWAIG\ParameterSchema` + +#### Source + +[`SignalWire/SWAIG/ParameterSchema.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/ParameterSchema.php) + +Line 81. + +*** + +### enum + +Add a closed-set `string` property whose value must be one of + +`$values`. + +The JSON-Schema kind is `string` with an `enum` constraint — the +wire shape the built-in skills already emit (e.g. Joke's +`{'type':'string','description':…,'enum':['jokes','dadjokes']}`). + +`$values` accepts: + +- a list of scalar wire values: `['jokes', 'dadjokes']`; +- the Tier-1 typed enums via `cases()`: `RecordFormat::cases()` — + each `\BackedEnum` is normalized to its backing `->value`, so + the typo-checked enum and the bare-string form produce the + SAME `enum` array. + +#### Signature + +```php +public function enum( + string $name, + array $values, + string $description, + array $opts = array ( +) +): SignalWire\SWAIG\ParameterSchema +``` + +#### Parameters + + + + + + + + + +#### Returns + +`SignalWire\SWAIG\ParameterSchema` + +#### Source + +[`SignalWire/SWAIG/ParameterSchema.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/ParameterSchema.php) + +Line 144. + +*** + +### integer + +Add an `integer` property. + +#### Signature + +```php +public function integer( + string $name, + string $description, + array $opts = array ( +) +): SignalWire\SWAIG\ParameterSchema +``` + +#### Parameters + + + + + + + +#### Returns + +`SignalWire\SWAIG\ParameterSchema` + +#### Source + +[`SignalWire/SWAIG/ParameterSchema.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/ParameterSchema.php) + +Line 111. + +*** + +### number + +Add a `number` property (JSON-Schema `number`: any numeric value). + +#### Signature + +```php +public function number( + string $name, + string $description, + array $opts = array ( +) +): SignalWire\SWAIG\ParameterSchema +``` + +#### Parameters + + + + + + + +#### Returns + +`SignalWire\SWAIG\ParameterSchema` + +#### Source + +[`SignalWire/SWAIG/ParameterSchema.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/ParameterSchema.php) + +Line 101. + +*** + +### object + +Add a nested `object` property described by another + +\{@see ParameterSchema\} (`$schema`). The nested schema's `required` +names are emitted at the nested-object level. + +#### Signature + +```php +public function object( + string $name, + SignalWire\SWAIG\ParameterSchema $schema, + string $description, + array $opts = array ( +) +): SignalWire\SWAIG\ParameterSchema +``` + +#### Parameters + + + + + + + + + +#### Returns + +`SignalWire\SWAIG\ParameterSchema` + +#### Source + +[`SignalWire/SWAIG/ParameterSchema.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/ParameterSchema.php) + +Line 194. + +*** + +### required + +Flag one or more already-declared (or yet-to-be-declared) property + +names as required. Idempotent; preserves first-seen order. + +#### Signature + +```php +public function required(string ...$names): SignalWire\SWAIG\ParameterSchema +``` + +#### Parameters + + + +#### Returns + +`SignalWire\SWAIG\ParameterSchema` + +#### Source + +[`SignalWire/SWAIG/ParameterSchema.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/ParameterSchema.php) + +Line 204. + +*** + +### requiredNames + +The required-property names, in declaration order. + +#### Signature + +```php +public function requiredNames(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/SWAIG/ParameterSchema.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/ParameterSchema.php) + +Line 270. + +*** + +### string + +Add a `string` property. + +#### Signature + +```php +public function string( + string $name, + string $description, + array $opts = array ( +) +): SignalWire\SWAIG\ParameterSchema +``` + +#### Parameters + + + + + + + +#### Returns + +`SignalWire\SWAIG\ParameterSchema` + +#### Source + +[`SignalWire/SWAIG/ParameterSchema.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/ParameterSchema.php) + +Line 91. + +*** + +### toArgument + +The full JSON-Schema `argument` object: + +`{type: 'object', properties: {…}}`, plus a top-level `required` +list when any names were flagged. + +Byte-identical to the hand-written `argument` blocks used with +\{@see \SignalWire\SWML\Service::registerSwaigFunction()\} (the Joke / +ApiNinjasTrivia / GoogleMaps skills). Here `required` lives at the +argument level, so individual properties are NOT marked — use this +form, not \{@see toArray()\}, when you want the schema-level list. + +#### Signature + +```php +public function toArgument(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/SWAIG/ParameterSchema.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/ParameterSchema.php) + +Line 253. + +*** + +### toArray + +The bare JSON-Schema `properties` map — the value + +\{@see \SignalWire\SWML\Service::defineTool()\} expects for its +`$parameters` argument. + +Byte-identical to the hand-written nested-array form. Because the +`defineTool` slot carries no schema-level `required`, names passed +to \{@see required()\} surface as a per-property `'required' => true` +flag on each matching property (the Math / WikipediaSearch skill +convention). Use \{@see toArgument()\} when you want the schema-level +`required` list instead. + +#### Signature + +```php +public function toArray(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/SWAIG/ParameterSchema.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/ParameterSchema.php) + +Line 228. + +## Source + +[`SignalWire/SWAIG/ParameterSchema.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/ParameterSchema.php) + +Line 62. diff --git a/fern/products/sdk-reference/php/agents/swml/index.mdx b/fern/products/sdk-reference/php/agents/swml/index.mdx new file mode 100644 index 0000000000..c04610cd38 --- /dev/null +++ b/fern/products/sdk-reference/php/agents/swml/index.mdx @@ -0,0 +1,26 @@ +--- +slug: "/reference/php/agents/swml" +title: "SWML" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "module" + language: "php" + qualified_name: "SignalWire\\SWML" + parent: "agents" + module: "agents" +--- +# `SWML` + +## Signature + +```php +namespace SignalWire\SWML +``` + +## Modules + + + + diff --git a/fern/products/sdk-reference/php/agents/swml/swml/document/index.mdx b/fern/products/sdk-reference/php/agents/swml/swml/document/index.mdx new file mode 100644 index 0000000000..7d704d9cfb --- /dev/null +++ b/fern/products/sdk-reference/php/agents/swml/swml/document/index.mdx @@ -0,0 +1,323 @@ +--- +slug: "/reference/php/agents/swml/swml/document" +title: "Document" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\SWML\\Document" + parent: "agents.SWML.SWML" + module: "agents.SWML.SWML" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Document.php" +--- +# `Document` + +## Signature + +```php +class Document +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct() +``` + +#### Source + +[`SignalWire/SWML/Document.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Document.php) + +Line 14. + +*** + +### addRawVerb + +Append a pre-formatted verb hash to a section. + +#### Signature + +```php +public function addRawVerb(string $section, array $verbHash): void +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/SWML/Document.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Document.php) + +Line 73. + +*** + +### addSection + +Add a new named section. Returns true if created, false if it already existed. + +#### Signature + +```php +public function addSection(string $name): bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`SignalWire/SWML/Document.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Document.php) + +Line 27. + +*** + +### addVerb + +Append a verb to the main section. + +#### Signature + +```php +public function addVerb(string $verbName, mixed $config): void +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/SWML/Document.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Document.php) + +Line 54. + +*** + +### addVerbToSection + +Append a verb to a named section. + +#### Signature + +```php +public function addVerbToSection( + string $section, + string $verbName, + mixed $config +): void +``` + +#### Parameters + + + + + + + +#### Source + +[`SignalWire/SWML/Document.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Document.php) + +Line 62. + +*** + +### clearSection + +Clear all verbs in a section. + +#### Signature + +```php +public function clearSection(string $section): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/SWML/Document.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Document.php) + +Line 84. + +*** + +### getVerbs + +Get a copy of the verbs for a section. + +#### Signature + +```php +public function getVerbs(string $section = 'main'): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/SWML/Document.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Document.php) + +Line 46. + +*** + +### getVersion + +#### Signature + +```php +public function getVersion(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/SWML/Document.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Document.php) + +Line 19. + +*** + +### hasSection + +#### Signature + +```php +public function hasSection(string $name): bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`SignalWire/SWML/Document.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Document.php) + +Line 36. + +*** + +### render + +Compact JSON string. + +#### Signature + +```php +public function render(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/SWML/Document.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Document.php) + +Line 115. + +*** + +### renderPretty + +Pretty-printed JSON string. + +#### Signature + +```php +public function renderPretty(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/SWML/Document.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Document.php) + +Line 123. + +*** + +### reset + +Reset document to initial state. + +#### Signature + +```php +public function reset(): void +``` + +#### Source + +[`SignalWire/SWML/Document.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Document.php) + +Line 94. + +*** + +### toArray + +Return document as associative array. + +#### Signature + +```php +public function toArray(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/SWML/Document.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Document.php) + +Line 104. + +## Source + +[`SignalWire/SWML/Document.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Document.php) + +Line 7. diff --git a/fern/products/sdk-reference/php/agents/swml/swml/index.mdx b/fern/products/sdk-reference/php/agents/swml/swml/index.mdx new file mode 100644 index 0000000000..c5db582eb0 --- /dev/null +++ b/fern/products/sdk-reference/php/agents/swml/swml/index.mdx @@ -0,0 +1,24 @@ +--- +slug: "/reference/php/agents/swml/swml" +title: "SWML" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "module" + language: "php" + qualified_name: "agents.SWML.SWML" + parent: "SignalWire\\SWML" + module: "agents.SWML" +--- +# `SWML` + +## Classes + + + + + + + + diff --git a/fern/products/sdk-reference/php/agents/swml/swml/schema/index.mdx b/fern/products/sdk-reference/php/agents/swml/swml/schema/index.mdx new file mode 100644 index 0000000000..ba5fe4dd15 --- /dev/null +++ b/fern/products/sdk-reference/php/agents/swml/swml/schema/index.mdx @@ -0,0 +1,165 @@ +--- +slug: "/reference/php/agents/swml/swml/schema" +title: "Schema" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\SWML\\Schema" + parent: "agents.SWML.SWML" + module: "agents.SWML.SWML" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Schema.php" +--- +# `Schema` + +## Signature + +```php +class Schema +``` + +## Methods + +### getVerb + +Get verb metadata, or null if not found. + +#### Signature + +```php +public function getVerb(string $name): ?array +``` + +#### Parameters + + + +#### Returns + +`?array` + +#### Source + +[`SignalWire/SWML/Schema.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Schema.php) + +Line 62. + +*** + +### getVerbNames + +Get sorted list of all verb names. + +#### Signature + +```php +public function getVerbNames(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/SWML/Schema.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Schema.php) + +Line 50. + +*** + +### instance + +**Modifiers:** `static` + +#### Signature + +```php +public static function instance(): SignalWire\SWML\Schema +``` + +#### Returns + +`SignalWire\SWML\Schema` + +#### Source + +[`SignalWire/SWML/Schema.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Schema.php) + +Line 21. + +*** + +### isValidVerb + +Check whether a verb name is valid. + +#### Signature + +```php +public function isValidVerb(string $name): bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`SignalWire/SWML/Schema.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Schema.php) + +Line 40. + +*** + +### reset + +Reset the singleton (for testing). + +**Modifiers:** `static` + +#### Signature + +```php +public static function reset(): void +``` + +#### Source + +[`SignalWire/SWML/Schema.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Schema.php) + +Line 32. + +*** + +### verbCount + +Number of verbs defined in the schema. + +#### Signature + +```php +public function verbCount(): int +``` + +#### Returns + +`int` + +#### Source + +[`SignalWire/SWML/Schema.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Schema.php) + +Line 70. + +## Source + +[`SignalWire/SWML/Schema.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Schema.php) + +Line 7. diff --git a/fern/products/sdk-reference/php/agents/swml/swml/service/index.mdx b/fern/products/sdk-reference/php/agents/swml/swml/service/index.mdx new file mode 100644 index 0000000000..9704b5d484 --- /dev/null +++ b/fern/products/sdk-reference/php/agents/swml/swml/service/index.mdx @@ -0,0 +1,958 @@ +--- +slug: "/reference/php/agents/swml/swml/service" +title: "Service" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\SWML\\Service" + parent: "agents.SWML.SWML" + module: "agents.SWML.SWML" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php" +--- +# `Service` + +## Signature + +```php +class Service +``` + +## Methods + +### \_\_call + +Dynamic verb methods from schema. + +$service->answer('main', \['max\_duration' => 3600]); +$service->sleep('main', 2000); +$service->hangup(); + +#### Signature + +```php +public function __call(string $method, array $args): static +``` + +#### Parameters + + + + + +#### Returns + +`static` + +#### Source + +[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) + +Line 114. + +*** + +### \_\_construct + +#### Signature + +```php +public function __construct( + string $name, + string $route = '/', + ?string $host = NULL, + ?int $port = NULL, + ?string $basicAuthUser = NULL, + ?string $basicAuthPassword = NULL +) +``` + +#### Parameters + + + + + + + + + + + + + +#### Source + +[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) + +Line 50. + +*** + +### defineTool + +Define a SWAIG function the AI can call. + +Tool descriptions and parameter descriptions are LLM-facing prompt +engineering, not internal documentation. See PORTING\_GUIDE for guidance. + +#### Signature + +```php +public function defineTool( + string $name, + string $description, + array $parameters, + callable $handler, + bool $secure = false +): static +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`static` + +#### Source + +[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) + +Line 226. + +*** + +### defineTools + +Register multiple tool definitions at once. + +#### Signature + +```php +public function defineTools(array $toolDefs): static +``` + +#### Parameters + + + +#### Returns + +`static` + +#### Source + +[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) + +Line 268. + +*** + +### dispatchFromGlobals + +Dispatch the current PHP request (cli-server / php-fpm / mod\_php) to + +handleRequest() and write the response. Must be called inside a SAPI +that has populated $\_SERVER for the inbound request. + +#### Signature + +```php +public function dispatchFromGlobals(): void +``` + +#### Source + +[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) + +Line 773. + +*** + +### extractSipUsername + +Extract SIP username from a request body. + +Validates format: only \[a-zA-Z0-9.\_-], max 64 chars. + +**Modifiers:** `static` + +#### Signature + +```php +public static function extractSipUsername(?array $requestBody): ?string +``` + +#### Parameters + + + +#### Returns + +`?string` + +#### Source + +[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) + +Line 648. + +*** + +### getAllFunctions + +Snapshot of all registered SWAIG functions keyed by name. + +Python parity: `ToolRegistry.get_all_functions`. + +#### Signature + +```php +public function getAllFunctions(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) + +Line 306. + +*** + +### getBasicAuthCredentials + +#### Signature + +```php +public function getBasicAuthCredentials(): array +``` + +#### Returns + +`array` — \[user, password] + +#### Source + +[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) + +Line 161. + +*** + +### getBasicAuthCredentialsWithSource + +Get (user, password, source) where source is "provided", + +"environment", or "generated". Python parity: +AuthMixin.get\_basic\_auth\_credentials(include\_source=True). + +#### Signature + +```php +public function getBasicAuthCredentialsWithSource(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) + +Line 178. + +*** + +### getDocument + +#### Signature + +```php +public function getDocument(): SignalWire\SWML\Document +``` + +#### Returns + +`SignalWire\SWML\Document` + +#### Source + +[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) + +Line 444. + +*** + +### getFullUrl + +Build the full URL for this service. + +#### Signature + +```php +public function getFullUrl(bool $includeAuth = false): string +``` + +#### Parameters + + + +#### Returns + +`string` + +#### Source + +[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) + +Line 198. + +*** + +### getFunction + +Get a registered SWAIG function by name, or null when absent. + +Python parity: `ToolRegistry.get_function`. + +#### Signature + +```php +public function getFunction(string $name): ?array +``` + +#### Parameters + + + +#### Returns + +`?array` + +#### Source + +[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) + +Line 299. + +*** + +### getHost + +#### Signature + +```php +public function getHost(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) + +Line 434. + +*** + +### getName + +#### Signature + +```php +public function getName(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) + +Line 424. + +*** + +### getPort + +#### Signature + +```php +public function getPort(): int +``` + +#### Returns + +`int` + +#### Source + +[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) + +Line 439. + +*** + +### getProxyUrlBase + +Detect or construct the proxy URL base from request headers. + +#### Signature + +```php +public function getProxyUrlBase(array $headers = array ( +)): string +``` + +#### Parameters + + + +#### Returns + +`string` + +#### Source + +[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) + +Line 682. + +*** + +### getRoute + +#### Signature + +```php +public function getRoute(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) + +Line 429. + +*** + +### getSchemaUtils + +SchemaUtils helper bound to this Service. Mirrors Python's + +self.schema\_utils public instance attribute on SWMLService. +Built lazily on first access. + +#### Signature + +```php +public function getSchemaUtils(): SignalWire\Utils\SchemaUtils +``` + +#### Returns + +`SignalWire\Utils\SchemaUtils` + +#### Source + +[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) + +Line 454. + +*** + +### getToolNames + +Return the names of registered tools in the order they were + +registered. Stable ordering matters for CLI output and for +tests that rely on deterministic enumeration. + +#### Signature + +```php +public function getToolNames(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) + +Line 327. + +*** + +### getTools + +Return the registered SWAIG tool definitions. + +Used by introspection (CLI --list-tools, the skills audit +harness, and any test that needs to inspect what's been +registered without going through a HTTP round trip). + +#### Signature + +```php +public function getTools(): array +``` + +#### Returns + +`array` — name => tool definition + +#### Source + +[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) + +Line 285. + +*** + +### handleRequest + +Handle an HTTP request. Returns \[status, headers, body]. + +#### Signature + +```php +public function handleRequest( + string $method, + string $path, + array $headers = array ( +), + ?string $body = NULL +): array +``` + +#### Parameters + + + + + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) + +Line 489. + +*** + +### hasFunction + +Whether a SWAIG function with the given name is registered. + +Python parity: `ToolRegistry.has_function`. + +#### Signature + +```php +public function hasFunction(string $name): bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) + +Line 292. + +*** + +### onFunctionCall + +Dispatch a function call to the registered handler. + +#### Signature + +```php +public function onFunctionCall( + string $name, + array $args, + array $rawData +): ?SignalWire\SWAIG\FunctionResult +``` + +#### Parameters + + + + + + + +#### Returns + +`?SignalWire\SWAIG\FunctionResult` + +#### Source + +[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) + +Line 335. + +*** + +### onRequest + +Customization hook called when SWML is requested. Default + +delegates to \{@see onSwmlRequest()\}; subclasses typically +override `onSwmlRequest` rather than this method. + +Return null to use the default SWML rendering, or an array of +modifications to merge into the rendered document. + +Python parity: WebMixin.on\_request(request\_data, callback\_path). +The Python third `request` arg is FastAPI-specific and is not +mirrored. + +#### Signature + +```php +public function onRequest( + ?array $requestData = NULL, + ?string $callbackPath = NULL +): ?array +``` + +#### Parameters + + + + + +#### Returns + +`?array` + +#### Source + +[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) + +Line 402. + +*** + +### onSwmlRequest + +Customization point for subclasses to modify SWML based on + +request data. The default implementation returns null (no +modification). Subclasses override to inspect the body or +callback path and return an associative array of overrides. + +Python parity: WebMixin.on\_swml\_request(request\_data, callback\_path). + +#### Signature + +```php +public function onSwmlRequest( + ?array $requestData = NULL, + ?string $callbackPath = NULL +): ?array +``` + +#### Parameters + + + + + +#### Returns + +`?array` + +#### Source + +[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) + +Line 415. + +*** + +### registerRoutingCallback + +#### Signature + +```php +public function registerRoutingCallback(string $path, callable $callback): void +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) + +Line 211. + +*** + +### registerSwaigFunction + +Register a raw SWAIG function definition (e.g. DataMap tools). + +#### Signature + +```php +public function registerSwaigFunction(array $funcDef): static +``` + +#### Parameters + + + +#### Returns + +`static` + +#### Source + +[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) + +Line 252. + +*** + +### removeFunction + +Remove a registered SWAIG function. True on success, false if absent. + +Python parity: `ToolRegistry.remove_function`. + +#### Signature + +```php +public function removeFunction(string $name): bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) + +Line 313. + +*** + +### render + +#### Signature + +```php +public function render(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) + +Line 462. + +*** + +### renderPretty + +#### Signature + +```php +public function renderPretty(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) + +Line 467. + +*** + +### renderSwml + +Render SWML for a request. Subclasses override this. + +#### Signature + +```php +public function renderSwml( + ?array $requestBody = NULL, + array $headers = array ( +) +): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) + +Line 475. + +*** + +### run + +Run the service (alias for serve). + +#### Signature + +```php +public function run(): void +``` + +#### Source + +[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) + +Line 763. + +*** + +### serve + +Start serving using PHP's built-in server (blocking). + +In CLI mode: spawns `php -S host:port ` where entry-script +is the example file the user ran. The entry script is responsible for +(re)building the service and calling run() — under the cli-server SAPI, +run() dispatches from $\_SERVER instead of re-spawning. + +Under cli-server SAPI: directly dispatches the inbound request to +handleRequest() and writes the result to the response. + +#### Signature + +```php +public function serve(): void +``` + +#### Source + +[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) + +Line 731. + +*** + +### validateBasicAuth + +Validate provided basic-auth credentials against the configured ones + +using a constant-time comparison. Python parity: +AuthMixin.validate\_basic\_auth(username, password). + +#### Signature + +```php +public function validateBasicAuth(string $username, string $password): bool +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) + +Line 169. + +## Source + +[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) + +Line 11. diff --git a/fern/products/sdk-reference/php/core/index.mdx b/fern/products/sdk-reference/php/core/index.mdx new file mode 100644 index 0000000000..0bfea592ca --- /dev/null +++ b/fern/products/sdk-reference/php/core/index.mdx @@ -0,0 +1,22 @@ +--- +slug: "/reference/php/core" +title: "core" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "module" + language: "php" + qualified_name: "core" +--- +# `core` + +## Modules + + + + + + + + diff --git a/fern/products/sdk-reference/php/core/logging/index.mdx b/fern/products/sdk-reference/php/core/logging/index.mdx new file mode 100644 index 0000000000..5b0d1e17a5 --- /dev/null +++ b/fern/products/sdk-reference/php/core/logging/index.mdx @@ -0,0 +1,26 @@ +--- +slug: "/reference/php/core/logging" +title: "Logging" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "module" + language: "php" + qualified_name: "SignalWire\\Logging" + parent: "core" + module: "core" +--- +# `Logging` + +## Signature + +```php +namespace SignalWire\Logging +``` + +## Modules + + + + diff --git a/fern/products/sdk-reference/php/core/logging/logging/index.mdx b/fern/products/sdk-reference/php/core/logging/logging/index.mdx new file mode 100644 index 0000000000..40bca651c1 --- /dev/null +++ b/fern/products/sdk-reference/php/core/logging/logging/index.mdx @@ -0,0 +1,142 @@ +--- +slug: "/reference/php/core/logging/logging" +title: "Logging" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "module" + language: "php" + qualified_name: "core.Logging.Logging" + parent: "SignalWire\\Logging" + module: "core.Logging" +--- +# `Logging` + +## Classes + + + + + + Cross-language SDK contract for serverless / deployment-mode detection. + + + +## Enums + +### LogLevel + +Logger severity levels as a typed, compile-time-checked closed set. + +\{@see \SignalWire\Logging\Logger::setLevel()\} and \{@see Logger::shouldLog()\} +accept this enum OR a string. The enum gives editor autocompletion and makes +a typo fail at the call site (a bare string like `'wrn'` only fails silently +at runtime — `setLevel()` ignores unknown levels); strings keep parity with +the Python reference (which configures stdlib `logging` with bare names) and +remain available for callers reading a level out of config/env. + +``` +$logger->setLevel(LogLevel::Warn); // typed, autocompleted +$logger->setLevel('warn'); // string still works (parity) +``` + +The backing values are the exact lowercase strings the Logger keys on. + +#### Signature + +```php +final enum LogLevel implements UnitEnum, BackedEnum +``` + +#### Inheritance + +**Implements:** `UnitEnum`, `BackedEnum` + +#### Properties + + + + + +#### Constants + + + + + + + + + +#### Variants + + + + + + + + + +#### Methods + +##### cases + +**Modifiers:** `static` + +###### Signature + +```php +public static function cases(): array +``` + +###### Returns + +`array` + +*** + +##### from + +**Modifiers:** `static` + +###### Signature + +```php +public static function from(string|int $value): static +``` + +###### Parameters + + + +###### Returns + +`static` + +*** + +##### tryFrom + +**Modifiers:** `static` + +###### Signature + +```php +public static function tryFrom(string|int $value): ?static +``` + +###### Parameters + + + +###### Returns + +`?static` + +#### Source + +[`SignalWire/Logging/LogLevel.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Logging/LogLevel.php) + +Line 22. diff --git a/fern/products/sdk-reference/php/core/logging/logging/logger/index.mdx b/fern/products/sdk-reference/php/core/logging/logging/logger/index.mdx new file mode 100644 index 0000000000..dbe8bddcd2 --- /dev/null +++ b/fern/products/sdk-reference/php/core/logging/logging/logger/index.mdx @@ -0,0 +1,281 @@ +--- +slug: "/reference/php/core/logging/logging/logger" +title: "Logger" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Logging\\Logger" + parent: "core.Logging.Logging" + module: "core.Logging.Logging" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Logging/Logger.php" +--- +# `Logger` + +## Signature + +```php +class Logger +``` + +## Methods + +### debug + +#### Signature + +```php +public function debug(string ...$messages): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Logging/Logger.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Logging/Logger.php) + +Line 99. + +*** + +### error + +#### Signature + +```php +public function error(string ...$messages): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Logging/Logger.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Logging/Logger.php) + +Line 114. + +*** + +### getLevel + +#### Signature + +```php +public function getLevel(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Logging/Logger.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Logging/Logger.php) + +Line 56. + +*** + +### getLogger + +**Modifiers:** `static` + +#### Signature + +```php +public static function getLogger(string $name = 'signalwire'): SignalWire\Logging\Logger +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Logging\Logger` + +#### Source + +[`SignalWire/Logging/Logger.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Logging/Logger.php) + +Line 35. + +*** + +### getName + +#### Signature + +```php +public function getName(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Logging/Logger.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Logging/Logger.php) + +Line 51. + +*** + +### info + +#### Signature + +```php +public function info(string ...$messages): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Logging/Logger.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Logging/Logger.php) + +Line 104. + +*** + +### isSuppressed + +#### Signature + +```php +public function isSuppressed(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Logging/Logger.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Logging/Logger.php) + +Line 74. + +*** + +### reset + +Reset all logger instances (for testing). + +**Modifiers:** `static` + +#### Signature + +```php +public static function reset(): void +``` + +#### Source + +[`SignalWire/Logging/Logger.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Logging/Logger.php) + +Line 46. + +*** + +### setLevel + +#### Signature + +```php +public function setLevel(SignalWire\Logging\LogLevel|string $level): void +``` + +#### Parameters + + + severity level — the typed \{@see LogLevel\} enum (typo-checked at the call site) or a bare string (parity with the Python reference). Unknown string levels are ignored, as before. + + +#### Source + +[`SignalWire/Logging/Logger.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Logging/Logger.php) + +Line 66. + +*** + +### setSuppressed + +#### Signature + +```php +public function setSuppressed(bool $suppressed): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Logging/Logger.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Logging/Logger.php) + +Line 79. + +*** + +### shouldLog + +#### Signature + +```php +public function shouldLog(SignalWire\Logging\LogLevel|string $level): bool +``` + +#### Parameters + + + severity to test — the typed \{@see LogLevel\} enum or a bare string (parity with Python). + + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Logging/Logger.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Logging/Logger.php) + +Line 88. + +*** + +### warn + +#### Signature + +```php +public function warn(string ...$messages): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Logging/Logger.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Logging/Logger.php) + +Line 109. + +## Source + +[`SignalWire/Logging/Logger.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Logging/Logger.php) + +Line 7. diff --git a/fern/products/sdk-reference/php/core/logging/logging/logging-config/index.mdx b/fern/products/sdk-reference/php/core/logging/logging/logging-config/index.mdx new file mode 100644 index 0000000000..4bb359e81b --- /dev/null +++ b/fern/products/sdk-reference/php/core/logging/logging/logging-config/index.mdx @@ -0,0 +1,97 @@ +--- +slug: "/reference/php/core/logging/logging/logging-config" +title: "LoggingConfig" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Logging\\LoggingConfig" + parent: "core.Logging.Logging" + module: "core.Logging.Logging" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Logging/LoggingConfig.php" +--- +# `LoggingConfig` + +Cross-language SDK contract for serverless / deployment-mode detection. + +Mirrors signalwire.core.logging\_config.get\_execution\_mode and +signalwire.utils.is\_serverless\_mode in the Python reference. Order +of precedence (FIRST match wins): + +1. GATEWAY\_INTERFACE -> 'cgi' +2. AWS\_LAMBDA\_FUNCTION\_NAME or LAMBDA\_TASK\_ROOT -> 'lambda' +3. FUNCTION\_TARGET, K\_SERVICE, or GOOGLE\_CLOUD\_PROJECT -> 'google\_cloud\_function' +4. AZURE\_FUNCTIONS\_ENVIRONMENT, FUNCTIONS\_WORKER\_RUNTIME, or + AzureWebJobsStorage -> 'azure\_function' +5. otherwise -> 'server' + +The static methods getExecutionMode() and isServerlessMode() project +onto the Python free functions + +- signalwire.core.logging\_config.get\_execution\_mode +- signalwire.utils.is\_serverless\_mode + via scripts/enumerate\_signatures.py FREE\_FUNCTION\_PROJECTIONS. + +**Modifiers:** `final` + +## Signature + +```php +final class LoggingConfig +``` + +## Methods + +### getExecutionMode + +Detect the SDK's deployment environment based on well-known + +environment variables. + +**Modifiers:** `static` + +#### Signature + +```php +public static function getExecutionMode(): string +``` + +#### Returns + +`string` — One of 'cgi', 'lambda', 'google\_cloud\_function', 'azure\_function', or 'server'. + +#### Source + +[`SignalWire/Logging/LoggingConfig.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Logging/LoggingConfig.php) + +Line 43. + +*** + +### isServerlessMode + +**Modifiers:** `static` + +#### Signature + +```php +public static function isServerlessMode(): bool +``` + +#### Returns + +`bool` — True when running in any serverless invocation environment (anything other than 'server'). + +#### Source + +[`SignalWire/Logging/LoggingConfig.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Logging/LoggingConfig.php) + +Line 72. + +## Source + +[`SignalWire/Logging/LoggingConfig.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Logging/LoggingConfig.php) + +Line 34. diff --git a/fern/products/sdk-reference/php/core/security/index.mdx b/fern/products/sdk-reference/php/core/security/index.mdx new file mode 100644 index 0000000000..332d576a9d --- /dev/null +++ b/fern/products/sdk-reference/php/core/security/index.mdx @@ -0,0 +1,26 @@ +--- +slug: "/reference/php/core/security" +title: "Security" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "module" + language: "php" + qualified_name: "SignalWire\\Security" + parent: "core" + module: "core" +--- +# `Security` + +## Signature + +```php +namespace SignalWire\Security +``` + +## Modules + + + + diff --git a/fern/products/sdk-reference/php/core/security/security/index.mdx b/fern/products/sdk-reference/php/core/security/security/index.mdx new file mode 100644 index 0000000000..6d2f4db39e --- /dev/null +++ b/fern/products/sdk-reference/php/core/security/security/index.mdx @@ -0,0 +1,28 @@ +--- +slug: "/reference/php/core/security/security" +title: "Security" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "module" + language: "php" + qualified_name: "core.Security.Security" + parent: "SignalWire\\Security" + module: "core.Security" +--- +# `Security` + +## Classes + + + + + + Middleware that validates SignalWire webhook signatures before forwarding + + + + Webhook signature validation for SignalWire-signed HTTP requests. + + diff --git a/fern/products/sdk-reference/php/core/security/security/session-manager/index.mdx b/fern/products/sdk-reference/php/core/security/security/session-manager/index.mdx new file mode 100644 index 0000000000..d490ec1b8b --- /dev/null +++ b/fern/products/sdk-reference/php/core/security/security/session-manager/index.mdx @@ -0,0 +1,249 @@ +--- +slug: "/reference/php/core/security/security/session-manager" +title: "SessionManager" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Security\\SessionManager" + parent: "core.Security.Security" + module: "core.Security.Security" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Security/SessionManager.php" +--- +# `SessionManager` + +## Signature + +```php +class SessionManager +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(int $tokenExpirySecs = 3600) +``` + +#### Parameters + + + Token lifetime in seconds (default 3600). + + +#### Throws + +- `RuntimeException` — If secure random bytes cannot be generated. + +#### Source + +[`SignalWire/Security/SessionManager.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Security/SessionManager.php) + +Line 19. + +*** + +### createSession + +Create or confirm a session, returning the call ID. + +#### Signature + +```php +public function createSession(?string $callId = NULL): string +``` + +#### Parameters + + + An existing call ID, or null to generate one. + + +#### Returns + +`string` — The call ID for this session. + +#### Source + +[`SignalWire/Security/SessionManager.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Security/SessionManager.php) + +Line 41. + +*** + +### createToolToken + +Alias for generateToken(). + +#### Signature + +```php +public function createToolToken(string $functionName, string $callId): string +``` + +#### Parameters + + + The function name to bind into the token. + + + + The call ID to bind into the token. + + +#### Returns + +`string` — A base64url-encoded token. + +#### Source + +[`SignalWire/Security/SessionManager.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Security/SessionManager.php) + +Line 79. + +*** + +### generateToken + +Generate an HMAC-SHA256 signed token for a given function and call. + +#### Signature + +```php +public function generateToken(string $functionName, string $callId): string +``` + +#### Parameters + + + The function name to bind into the token. + + + + The call ID to bind into the token. + + +#### Returns + +`string` — A base64url-encoded token. + +#### Source + +[`SignalWire/Security/SessionManager.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Security/SessionManager.php) + +Line 58. + +*** + +### getTokenExpirySecs + +Get the configured token expiry duration in seconds. + +#### Signature + +```php +public function getTokenExpirySecs(): int +``` + +#### Returns + +`int` — Token lifetime in seconds. + +#### Source + +[`SignalWire/Security/SessionManager.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Security/SessionManager.php) + +Line 154. + +*** + +### validateToken + +Validate a token against the expected call ID and function name. + +All comparisons use timing-safe equality checks to prevent side-channel attacks. + +#### Signature + +```php +public function validateToken( + string $callId, + string $functionName, + string $token +): bool +``` + +#### Parameters + + + The expected call ID. + + + + The expected function name. + + + + The base64url-encoded token to validate. + + +#### Returns + +`bool` — True if the token is valid and not expired. + +#### Source + +[`SignalWire/Security/SessionManager.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Security/SessionManager.php) + +Line 95. + +*** + +### validateToolToken + +Alias for validateToken() with reordered parameters. + +#### Signature + +```php +public function validateToolToken( + string $functionName, + string $token, + string $callId +): bool +``` + +#### Parameters + + + The expected function name. + + + + The base64url-encoded token to validate. + + + + The expected call ID. + + +#### Returns + +`bool` — True if the token is valid and not expired. + +#### Source + +[`SignalWire/Security/SessionManager.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Security/SessionManager.php) + +Line 144. + +## Source + +[`SignalWire/Security/SessionManager.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Security/SessionManager.php) + +Line 9. diff --git a/fern/products/sdk-reference/php/core/security/security/webhook-middleware/index.mdx b/fern/products/sdk-reference/php/core/security/security/webhook-middleware/index.mdx new file mode 100644 index 0000000000..9f12c3710d --- /dev/null +++ b/fern/products/sdk-reference/php/core/security/security/webhook-middleware/index.mdx @@ -0,0 +1,130 @@ +--- +slug: "/reference/php/core/security/security/webhook-middleware" +title: "WebhookMiddleware" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Security\\WebhookMiddleware" + parent: "core.Security.Security" + module: "core.Security.Security" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Security/WebhookMiddleware.php" +--- +# `WebhookMiddleware` + +Middleware that validates SignalWire webhook signatures before forwarding + +the request to the next handler. + +The signalwire-php SDK does not use PSR-15 — it has its own internal +(method, path, headers, body) -> \[status, headers, body] handler shape. +This middleware mirrors that shape and is the canonical way to add +signature validation to any handleRequest pipeline. + +Usage: + +``` +$mw = new WebhookMiddleware($signingKey); +[$status, $headers, $body] = $mw->process( + $method, $url, $headers, $rawBody, + function ($method, $url, $headers, $rawBody) use ($svc) { + return $svc->handleRequest($method, parse_url($url, PHP_URL_PATH), $headers, $rawBody); + }, +); +``` + +Behaviour: + +- Reads X-SignalWire-Signature (or X-Twilio-Signature alias). +- On valid signature: forwards to $next, returns its result unchanged. +- On invalid signature: returns 403 Forbidden, never calls $next. +- On missing header: returns 403 Forbidden, never calls $next. +- Never logs / echoes the signing key, signature, or expected digest. + +**Modifiers:** `final` + +## Signature + +```php +final class WebhookMiddleware +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(string $signingKey) +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Security/WebhookMiddleware.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Security/WebhookMiddleware.php) + +Line 40. + +*** + +### process + +Run the middleware. On valid signature delegates to $next; on + +invalid / missing signature returns 403 directly. + +#### Signature + +```php +public function process( + string $method, + string $url, + array $headers, + string $rawBody, + callable $next +): array +``` + +#### Parameters + + + HTTP method. + + + + Full reconstructed URL the platform POSTed to (scheme + host + optional port + path + query). Caller is responsible for honouring proxy headers / SWML\_PROXY\_URL\_BASE before passing it in. + + + + Request headers (mixed case keys allowed). + + + + Raw request body bytes. + + + + Downstream handler. Signature: function(string $method, string $url, array $headers, string $rawBody): array + + +#### Returns + +`array` — \[status, headers, body]. + +#### Source + +[`SignalWire/Security/WebhookMiddleware.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Security/WebhookMiddleware.php) + +Line 66. + +## Source + +[`SignalWire/Security/WebhookMiddleware.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Security/WebhookMiddleware.php) + +Line 35. diff --git a/fern/products/sdk-reference/php/core/security/security/webhook-validator/index.mdx b/fern/products/sdk-reference/php/core/security/security/webhook-validator/index.mdx new file mode 100644 index 0000000000..770e227ecb --- /dev/null +++ b/fern/products/sdk-reference/php/core/security/security/webhook-validator/index.mdx @@ -0,0 +1,154 @@ +--- +slug: "/reference/php/core/security/security/webhook-validator" +title: "WebhookValidator" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Security\\WebhookValidator" + parent: "core.Security.Security" + module: "core.Security.Security" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Security/WebhookValidator.php" +--- +# `WebhookValidator` + +Webhook signature validation for SignalWire-signed HTTP requests. + +Implements both schemes from porting-sdk/webhooks.md: + +- Scheme A (RELAY/SWML/JSON): hex(HMAC-SHA1(key, url + rawBody)) +- Scheme B (Compat/cXML form): base64(HMAC-SHA1(key, url + sortedFormParams)) + with optional bodySHA256 query-param fallback for JSON-on-compat-surface. + +Public API: + +``` +WebhookValidator::validateWebhookSignature($key, $sig, $url, $rawBody): bool +WebhookValidator::validateRequest($key, $sig, $url, $paramsOrRawBody): bool +``` + +All comparisons use hash\_equals() (constant-time) so the secret is not +leaked across repeated requests. + +**Modifiers:** `final` + +## Signature + +```php +final class WebhookValidator +``` + +## Methods + +### validateRequest + +Legacy @signalwire/compatibility-api drop-in entry point. + +If $paramsOrRawBody is a string, delegates to validateWebhookSignature +(Scheme A then Scheme B with parsed form). If it is an array, treats +it as pre-parsed form params and runs Scheme B directly (with URL +port normalisation). + +**Modifiers:** `static` + +#### Signature + +```php +public static function validateRequest( + string $signingKey, + string $signature, + string $url, + mixed $paramsOrRawBody +): bool +``` + +#### Parameters + + + Customer's Signing Key. + + + + Header value. Empty returns false. + + + + Full URL SignalWire POSTed to. + + + + Raw body string OR pre-parsed form params (associative or list-of- \[key, value] pairs). + + +#### Returns + +`bool` — True on match, false otherwise. + +#### Throws + +- `InvalidArgumentException` — When $signingKey is missing or the 4th argument has an invalid type. + +#### Source + +[`SignalWire/Security/WebhookValidator.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Security/WebhookValidator.php) + +Line 118. + +*** + +### validateWebhookSignature + +Validate a SignalWire webhook signature against both schemes. + +**Modifiers:** `static` + +#### Signature + +```php +public static function validateWebhookSignature( + string $signingKey, + string $signature, + string $url, + string $rawBody +): bool +``` + +#### Parameters + + + Customer's Signing Key from the Dashboard. UTF-8 string, secret. Empty string raises InvalidArgumentException — that is a programming error, not a validation failure. + + + + The X-SignalWire-Signature header value (or X-Twilio-Signature for cXML compat). Empty / missing returns false without raising. + + + + The full URL SignalWire POSTed to (scheme, host, optional port, path, query). Must match what the platform saw — see the URL-reconstruction section of porting-sdk/webhooks.md. + + + + The raw request body bytes as a UTF-8 string, BEFORE any JSON / form parsing. Type-hinted string so a parsed array passed by mistake yields a TypeError. + + +#### Returns + +`bool` — True if the signature matches either Scheme A (hex JSON) or Scheme B (base64 form, with port-normalisation variants and optional bodySHA256 fallback). False otherwise. + +#### Throws + +- `InvalidArgumentException` — When $signingKey is missing. + +#### Source + +[`SignalWire/Security/WebhookValidator.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Security/WebhookValidator.php) + +Line 51. + +## Source + +[`SignalWire/Security/WebhookValidator.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Security/WebhookValidator.php) + +Line 26. diff --git a/fern/products/sdk-reference/php/core/utils/index.mdx b/fern/products/sdk-reference/php/core/utils/index.mdx new file mode 100644 index 0000000000..dab903524f --- /dev/null +++ b/fern/products/sdk-reference/php/core/utils/index.mdx @@ -0,0 +1,26 @@ +--- +slug: "/reference/php/core/utils" +title: "Utils" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "module" + language: "php" + qualified_name: "SignalWire\\Utils" + parent: "core" + module: "core" +--- +# `Utils` + +## Signature + +```php +namespace SignalWire\Utils +``` + +## Modules + + + + diff --git a/fern/products/sdk-reference/php/core/utils/utils/index.mdx b/fern/products/sdk-reference/php/core/utils/utils/index.mdx new file mode 100644 index 0000000000..824d1fc5fb --- /dev/null +++ b/fern/products/sdk-reference/php/core/utils/utils/index.mdx @@ -0,0 +1,30 @@ +--- +slug: "/reference/php/core/utils/utils" +title: "Utils" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "module" + language: "php" + qualified_name: "core.Utils.Utils" + parent: "SignalWire\\Utils" + module: "core.Utils" +--- +# `Utils` + +## Classes + + + + SchemaUtils — PHP port of signalwire.utils.schema\_utils.SchemaUtils. + + + + SchemaValidationError — PHP port of + + + + SSRF-prevention guard for user-supplied URLs. + + diff --git a/fern/products/sdk-reference/php/core/utils/utils/schema-utils/index.mdx b/fern/products/sdk-reference/php/core/utils/utils/schema-utils/index.mdx new file mode 100644 index 0000000000..353e62d9b8 --- /dev/null +++ b/fern/products/sdk-reference/php/core/utils/utils/schema-utils/index.mdx @@ -0,0 +1,345 @@ +--- +slug: "/reference/php/core/utils/utils/schema-utils" +title: "SchemaUtils" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Utils\\SchemaUtils" + parent: "core.Utils.Utils" + module: "core.Utils.Utils" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Utils/SchemaUtils.php" +--- +# `SchemaUtils` + +SchemaUtils — PHP port of signalwire.utils.schema\_utils.SchemaUtils. + +Loads the SWML JSON Schema, extracts verb metadata, and validates +either a single verb config or a complete SWML document. + +Construction rules mirror Python: + +- Pass schemaPath=null to use the bundled schema.json. +- schemaValidation=false disables validation (validate\_verb returns + valid=true for every call). +- The env var SWML\_SKIP\_SCHEMA\_VALIDATION=1/true/yes also disables + validation regardless of the constructor argument. + +The PHP port currently ships only the lightweight validator (verb +existence + required-property check). Full JSON Schema validation +can be wired in via justinrainbow/json-schema by extending +initFullValidator(). The lightweight contract matches Python's +\_validate\_verb\_lightweight() exactly. + +**Modifiers:** `final` + +## Signature + +```php +final class SchemaUtils +``` + +## Methods + +### \_\_construct + +Construct a SchemaUtils. + +#### Signature + +```php +public function __construct(?string $schemaPath = NULL, bool $schemaValidation = true) +``` + +#### Parameters + + + Path to a schema.json file; null for the bundled copy. + + + + Whether to enable schema validation (env override applies). + + +#### Source + +[`SignalWire/Utils/SchemaUtils.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Utils/SchemaUtils.php) + +Line 56. + +*** + +### generateMethodBody + +Generate a Python-style method body string for a verb. + +Mirrors Python's generate\_method\_body(verb\_name). + +#### Signature + +```php +public function generateMethodBody(string $verbName): string +``` + +#### Parameters + + + +#### Returns + +`string` + +#### Source + +[`SignalWire/Utils/SchemaUtils.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Utils/SchemaUtils.php) + +Line 344. + +*** + +### generateMethodSignature + +Generate a Python-style method signature string for a verb. + +Mirrors Python's generate\_method\_signature(verb\_name). + +#### Signature + +```php +public function generateMethodSignature(string $verbName): string +``` + +#### Parameters + + + +#### Returns + +`string` + +#### Source + +[`SignalWire/Utils/SchemaUtils.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Utils/SchemaUtils.php) + +Line 309. + +*** + +### getAllVerbNames + +Sorted list of all known verb names. + +Mirrors Python's get\_all\_verb\_names(). + +#### Signature + +```php +public function getAllVerbNames(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Utils/SchemaUtils.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Utils/SchemaUtils.php) + +Line 180. + +*** + +### getVerbParameters + +Parameter-definition block used by code-gen tooling. + +Mirrors Python's get\_verb\_parameters(verb\_name). + +#### Signature + +```php +public function getVerbParameters(string $verbName): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/Utils/SchemaUtils.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Utils/SchemaUtils.php) + +Line 232. + +*** + +### getVerbProperties + +The properties\[verb\_name] block for a verb, or \[] when unknown. + +Mirrors Python's get\_verb\_properties(verb\_name). + +#### Signature + +```php +public function getVerbProperties(string $verbName): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/Utils/SchemaUtils.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Utils/SchemaUtils.php) + +Line 193. + +*** + +### getVerbRequiredProperties + +The required list for a verb, or \[] when unknown / no required. + +Mirrors Python's get\_verb\_required\_properties(verb\_name). + +#### Signature + +```php +public function getVerbRequiredProperties(string $verbName): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/Utils/SchemaUtils.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Utils/SchemaUtils.php) + +Line 216. + +*** + +### isFullValidationAvailable + +Whether full JSON Schema validation is wired up. + +Mirrors Python's full\_validation\_available property. + +#### Signature + +```php +public function isFullValidationAvailable(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Utils/SchemaUtils.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Utils/SchemaUtils.php) + +Line 169. + +*** + +### loadSchema + +Read and parse the JSON Schema. Mirrors Python's load\_schema(). + +#### Signature + +```php +public function loadSchema(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Utils/SchemaUtils.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Utils/SchemaUtils.php) + +Line 79. + +*** + +### validateDocument + +Validate a complete SWML document. Mirrors Python's + +validate\_document(document). Returns (false, \['Schema validator +not initialized']) when no full validator is wired in. + +#### Signature + +```php +public function validateDocument(array $document): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/Utils/SchemaUtils.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Utils/SchemaUtils.php) + +Line 296. + +*** + +### validateVerb + +Validate a verb config against the schema. + +Mirrors Python's validate\_verb(verb\_name, verb\_config). + +#### Signature + +```php +public function validateVerb(string $verbName, array $verbConfig): array +``` + +#### Parameters + + + + + +#### Returns + +`array` — Tuple of (valid, errors). + +#### Source + +[`SignalWire/Utils/SchemaUtils.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Utils/SchemaUtils.php) + +Line 249. + +## Source + +[`SignalWire/Utils/SchemaUtils.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Utils/SchemaUtils.php) + +Line 33. diff --git a/fern/products/sdk-reference/php/core/utils/utils/schema-validation-error/index.mdx b/fern/products/sdk-reference/php/core/utils/utils/schema-validation-error/index.mdx new file mode 100644 index 0000000000..24449fcee1 --- /dev/null +++ b/fern/products/sdk-reference/php/core/utils/utils/schema-validation-error/index.mdx @@ -0,0 +1,109 @@ +--- +slug: "/reference/php/core/utils/utils/schema-validation-error" +title: "SchemaValidationError" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Utils\\SchemaValidationError" + parent: "core.Utils.Utils" + module: "core.Utils.Utils" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Utils/SchemaValidationError.php" +--- +# `SchemaValidationError` + +SchemaValidationError — PHP port of + +signalwire.utils.schema\_utils.SchemaValidationError. + +Thrown when SWML schema validation of a verb config fails. + +## Signature + +```php +class SchemaValidationError extends RuntimeException implements Stringable, Throwable +``` + +## Inheritance + +**Extends:** `RuntimeException` + +**Implements:** `Stringable`, `Throwable` + +## Methods + +### \_\_construct + +Construct a SchemaValidationError. Mirrors Python's + +SchemaValidationError(verb\_name, errors). + +#### Signature + +```php +public function __construct(string $verbName, array $errors) +``` + +#### Parameters + + + the verb whose validation failed + + + + human-readable error messages + + +#### Source + +[`SignalWire/Utils/SchemaValidationError.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Utils/SchemaValidationError.php) + +Line 34. + +*** + +### getErrors + +#### Signature + +```php +public function getErrors(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Utils/SchemaValidationError.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Utils/SchemaValidationError.php) + +Line 48. + +*** + +### getVerbName + +#### Signature + +```php +public function getVerbName(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Utils/SchemaValidationError.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Utils/SchemaValidationError.php) + +Line 42. + +## Source + +[`SignalWire/Utils/SchemaValidationError.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Utils/SchemaValidationError.php) + +Line 20. diff --git a/fern/products/sdk-reference/php/core/utils/utils/url-validator/index.mdx b/fern/products/sdk-reference/php/core/utils/utils/url-validator/index.mdx new file mode 100644 index 0000000000..19739825a0 --- /dev/null +++ b/fern/products/sdk-reference/php/core/utils/utils/url-validator/index.mdx @@ -0,0 +1,100 @@ +--- +slug: "/reference/php/core/utils/utils/url-validator" +title: "UrlValidator" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Utils\\UrlValidator" + parent: "core.Utils.Utils" + module: "core.Utils.Utils" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Utils/UrlValidator.php" +--- +# `UrlValidator` + +SSRF-prevention guard for user-supplied URLs. + +Mirrors Python's signalwire.utils.url\_validator.validate\_url: +rejects non-http(s) schemes, missing hostnames, and any URL whose +hostname resolves to a private / loopback / link-local / cloud-metadata +IP. The $allowPrivate parameter, OR the SWML\_ALLOW\_PRIVATE\_URLS env +var with value "1", "true" or "yes" (case-insensitive), bypasses the +IP-blocklist check. + +The static method validateUrl projects onto the Python free function +signalwire.utils.url\_validator.validate\_url via +scripts/enumerate\_signatures.py. + +**Modifiers:** `final` + +## Signature + +```php +final class UrlValidator +``` + +## Properties + + + Pluggable resolver. Tests inject a callable to keep the suite hermetic; production calls dns\_get\_record/gethostbynamel. Signature: function(string $hostname): ?array (array of IP strings, or null on resolution failure). + + +## Constants + + + +## Methods + +### validateUrl + +Validate that a URL is safe to fetch. + +**Modifiers:** `static` + +#### Signature + +```php +public static function validateUrl(string $url, bool $allowPrivate = false): bool +``` + +#### Parameters + + + URL to validate. + + + + When true, bypass the IP-blocklist check. + + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Utils/UrlValidator.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Utils/UrlValidator.php) + +Line 62. + +## Source + +[`SignalWire/Utils/UrlValidator.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Utils/UrlValidator.php) + +Line 30. diff --git a/fern/products/sdk-reference/php/index.mdx b/fern/products/sdk-reference/php/index.mdx index f91a497583..a99159ad87 100644 --- a/fern/products/sdk-reference/php/index.mdx +++ b/fern/products/sdk-reference/php/index.mdx @@ -10,18 +10,10 @@ lustri: ## Modules -- [`Builtin`](/docs/sdk-reference/reference/php/signal-wire/skills/builtin/builtin) -- [`Contexts`](/docs/sdk-reference/reference/php/signal-wire/contexts/contexts) -- [`Logging`](/docs/sdk-reference/reference/php/signal-wire/logging/logging) -- [`Namespaces`](/docs/sdk-reference/reference/php/signal-wire/rest/namespaces/namespaces) -- [`POM`](/docs/sdk-reference/reference/php/signal-wire/pom/pom) -- [`Relay`](/docs/sdk-reference/reference/php/signal-wire/relay/relay) -- [`REST`](/docs/sdk-reference/reference/php/signal-wire/rest/rest) -- [`Security`](/docs/sdk-reference/reference/php/signal-wire/security/security) -- [`Server`](/docs/sdk-reference/reference/php/signal-wire/server/server) -- [`Serverless`](/docs/sdk-reference/reference/php/signal-wire/serverless/serverless) -- [`Skills`](/docs/sdk-reference/reference/php/signal-wire/skills/skills) -- [`SWAIG`](/docs/sdk-reference/reference/php/signal-wire/swaig/swaig) -- [`SWML`](/docs/sdk-reference/reference/php/signal-wire/swml/swml) -- [`Utils`](/docs/sdk-reference/reference/php/signal-wire/utils/utils) +- [`agents`](/docs/sdk-reference/reference/php/agents) +- [`core`](/docs/sdk-reference/reference/php/core) +- [`Relay`](/docs/sdk-reference/reference/php/relay) +- [`relay`](/docs/sdk-reference/reference/php/relay) +- [`REST`](/docs/sdk-reference/reference/php/rest) +- [`rest`](/docs/sdk-reference/reference/php/rest) diff --git a/fern/products/sdk-reference/php/relay/index.mdx b/fern/products/sdk-reference/php/relay/index.mdx new file mode 100644 index 0000000000..e2f97038b2 --- /dev/null +++ b/fern/products/sdk-reference/php/relay/index.mdx @@ -0,0 +1,18 @@ +--- +slug: "/reference/php/relay" +title: "Relay" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "module" + language: "php" + qualified_name: "SignalWire\\Relay" +--- +# `Relay` + +## Signature + +```php +namespace SignalWire\Relay +``` diff --git a/fern/products/sdk-reference/php/relay/index__2.mdx b/fern/products/sdk-reference/php/relay/index__2.mdx new file mode 100644 index 0000000000..0e83449229 --- /dev/null +++ b/fern/products/sdk-reference/php/relay/index__2.mdx @@ -0,0 +1,18 @@ +--- +slug: "/reference/php/relay/index__2" +title: "relay" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "module" + language: "php" + qualified_name: "relay" +--- +# `relay` + +## Modules + + + + diff --git a/fern/products/sdk-reference/php/relay/relay/action/index.mdx b/fern/products/sdk-reference/php/relay/relay/action/index.mdx new file mode 100644 index 0000000000..8e1f8261ba --- /dev/null +++ b/fern/products/sdk-reference/php/relay/relay/action/index.mdx @@ -0,0 +1,409 @@ +--- +slug: "/reference/php/relay/relay/action" +title: "Action" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Relay\\Action" + parent: "relay.Relay" + module: "relay.Relay" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php" +--- +# `Action` + +Base class for all RELAY call actions (play, record, collect, etc.). + +An Action is the client-side handle returned when you start an +asynchronous operation on a call. It accumulates events, tracks +state, and resolves once the operation reaches a terminal state. + +## Signature + +```php +class Action +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct( + string $controlId, + string $callId, + string $nodeId, + object $client +) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 33. + +*** + +### executeSubcommand + +Send a sub-command RPC through the client. + +The payload always includes control\_id, call\_id, and node\_id so +the server knows which action instance to target. + +#### Signature + +```php +public function executeSubcommand(string $method, array $extraParams = array ( +)): void +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 211. + +*** + +### getCallId + +#### Signature + +```php +public function getCallId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 107. + +*** + +### getControlId + +#### Signature + +```php +public function getControlId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 102. + +*** + +### getEvents + +#### Signature + +```php +public function getEvents(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 97. + +*** + +### getNodeId + +#### Signature + +```php +public function getNodeId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 112. + +*** + +### getPayload + +#### Signature + +```php +public function getPayload(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 91. + +*** + +### getResult + +#### Signature + +```php +public function getResult() +``` + +#### Returns + +`mixed` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 81. + +*** + +### getState + +#### Signature + +```php +public function getState(): ?string +``` + +#### Returns + +`?string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 86. + +*** + +### getStopMethod + +Return the RELAY RPC method that stops this action. + +Subclasses MUST override this to return the correct method name +(e.g. 'calling.play.stop'). + +#### Signature + +```php +public function getStopMethod(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 200. + +*** + +### handleEvent + +Append an incoming event and update local state / payload. + +#### Signature + +```php +public function handleEvent(SignalWire\Relay\Event $event): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 144. + +*** + +### isDone + +#### Signature + +```php +public function isDone(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 75. + +*** + +### onCompleted + +Register a callback to fire when the action completes. + +If the action is already done the callback fires immediately. + +#### Signature + +```php +public function onCompleted(callable $cb): SignalWire\Relay\Action +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Relay\Action` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 126. + +*** + +### resolve + +Mark this action as completed. + +The optional $result is stored and the onCompleted callback is +fired exactly once. + +#### Signature + +```php +public function resolve($result = NULL): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 167. + +*** + +### stop + +Stop the running action by sending its stop sub-command. + +#### Signature + +```php +public function stop(): void +``` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 186. + +*** + +### wait + +Block until the action completes or $timeout seconds elapse. + +Each iteration calls $client->readOnce() so the event-loop +keeps processing inbound frames. + +Returns the resolving Event when the action completes (mirrors +Python's `return self._wait_event.wait()`). Returns null on +timeout. The numeric `$timeout` is interpreted as seconds and +accepts integers or floats. + +#### Signature + +```php +public function wait(int|float $timeout = 30): ?SignalWire\Relay\Event +``` + +#### Parameters + + + +#### Returns + +`?SignalWire\Relay\Event` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 58. + +## Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 16. diff --git a/fern/products/sdk-reference/php/relay/relay/ai-action/index.mdx b/fern/products/sdk-reference/php/relay/relay/ai-action/index.mdx new file mode 100644 index 0000000000..f8baab5d42 --- /dev/null +++ b/fern/products/sdk-reference/php/relay/relay/ai-action/index.mdx @@ -0,0 +1,404 @@ +--- +slug: "/reference/php/relay/relay/ai-action" +title: "AIAction" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Relay\\AIAction" + parent: "relay.Relay" + module: "relay.Relay" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php" +--- +# `AIAction` + +Handle for calling.ai operations. + +## Signature + +```php +class AIAction extends Action +``` + +## Inheritance + +**Extends:** [SignalWire\Relay\Action](/docs/sdk-reference/reference/php/relay/relay/action) + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct( + string $controlId, + string $callId, + string $nodeId, + object $client +) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 33. + +*** + +### executeSubcommand + +Send a sub-command RPC through the client. + +The payload always includes control\_id, call\_id, and node\_id so +the server knows which action instance to target. + +#### Signature + +```php +public function executeSubcommand(string $method, array $extraParams = array ( +)): void +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 211. + +*** + +### getCallId + +#### Signature + +```php +public function getCallId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 107. + +*** + +### getControlId + +#### Signature + +```php +public function getControlId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 102. + +*** + +### getEvents + +#### Signature + +```php +public function getEvents(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 97. + +*** + +### getNodeId + +#### Signature + +```php +public function getNodeId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 112. + +*** + +### getPayload + +#### Signature + +```php +public function getPayload(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 91. + +*** + +### getResult + +#### Signature + +```php +public function getResult() +``` + +#### Returns + +`mixed` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 81. + +*** + +### getState + +#### Signature + +```php +public function getState(): ?string +``` + +#### Returns + +`?string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 86. + +*** + +### getStopMethod + +#### Signature + +```php +public function getStopMethod(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 478. + +*** + +### handleEvent + +Append an incoming event and update local state / payload. + +#### Signature + +```php +public function handleEvent(SignalWire\Relay\Event $event): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 144. + +*** + +### isDone + +#### Signature + +```php +public function isDone(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 75. + +*** + +### onCompleted + +Register a callback to fire when the action completes. + +If the action is already done the callback fires immediately. + +#### Signature + +```php +public function onCompleted(callable $cb): SignalWire\Relay\Action +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Relay\Action` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 126. + +*** + +### resolve + +Mark this action as completed. + +The optional $result is stored and the onCompleted callback is +fired exactly once. + +#### Signature + +```php +public function resolve($result = NULL): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 167. + +*** + +### stop + +Stop the running action by sending its stop sub-command. + +#### Signature + +```php +public function stop(): void +``` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 186. + +*** + +### wait + +Block until the action completes or $timeout seconds elapse. + +Each iteration calls $client->readOnce() so the event-loop +keeps processing inbound frames. + +Returns the resolving Event when the action completes (mirrors +Python's `return self._wait_event.wait()`). Returns null on +timeout. The numeric `$timeout` is interpreted as seconds and +accepts integers or floats. + +#### Signature + +```php +public function wait(int|float $timeout = 30): ?SignalWire\Relay\Event +``` + +#### Parameters + + + +#### Returns + +`?SignalWire\Relay\Event` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 58. + +## Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 476. diff --git a/fern/products/sdk-reference/php/relay/relay/call/index.mdx b/fern/products/sdk-reference/php/relay/relay/call/index.mdx new file mode 100644 index 0000000000..c832def2f2 --- /dev/null +++ b/fern/products/sdk-reference/php/relay/relay/call/index.mdx @@ -0,0 +1,1813 @@ +--- +slug: "/reference/php/relay/relay/call" +title: "Call" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Relay\\Call" + parent: "relay.Relay" + module: "relay.Relay" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php" +--- +# `Call` + +Represents a RELAY voice call. + +Holds call-level state, dispatches server events to registered listeners +and to in-flight Action objects, and exposes every calling.\* RPC method +as a first-class PHP method. + +## Signature + +```php +class Call +``` + +## Properties + + + controlId => Action + + + + + + RELAY Client instance + + + + + + + + + + + + + + + + + + + + + + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(array $params, object $client) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 48. + +*** + +### ai + +#### Signature + +```php +public function ai(array $prompt, array $opts = array ( +)): SignalWire\Relay\AIAction +``` + +#### Parameters + + + AI prompt config. + + + + +#### Returns + +`SignalWire\Relay\AIAction` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 888. + +*** + +### aiHold + +#### Signature + +```php +public function aiHold(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 432. + +*** + +### aiMessage + +#### Signature + +```php +public function aiMessage(array $params): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 427. + +*** + +### aiUnhold + +#### Signature + +```php +public function aiUnhold(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 437. + +*** + +### amazonBedrock + +#### Signature + +```php +public function amazonBedrock(array $params): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 422. + +*** + +### answer + +#### Signature + +```php +public function answer(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 303. + +*** + +### bindDigit + +#### Signature + +```php +public function bindDigit(array $params): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 377. + +*** + +### callState + +The current call lifecycle state as a typed \{@see CallState\}, or null + +when the raw \{@see $state\} string is outside the known closed set +(a forward-compatible server value). + +Offered ALONGSIDE the bare-string \{@see $state\} property for parity with +the Python reference: `$call->state` stays the canonical string; +`$call->callState()` is the typed view for autocompletion + an +exhaustive `match` + `->isTerminal()`. PORT\_ADDITION. + +#### Signature + +```php +public function callState(): ?SignalWire\Relay\CallState +``` + +#### Returns + +`?SignalWire\Relay\CallState` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 178. + +*** + +### clearDigitBindings + +Clear all digit bindings, optionally filtered by realm. + +Mirrors Python's Call.clear\_digit\_bindings(\*, realm=None, \*\*kwargs). + +#### Signature + +```php +public function clearDigitBindings( + ?string $realm = NULL, + array $kwargs = array ( +) +): array +``` + +#### Parameters + + + Optional realm filter — restricts clearing to bindings registered under that realm. + + + + Additional params forwarded to the wire call. + + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 392. + +*** + +### collect + +Standalone collect (digits / speech / both). + +#### Signature + +```php +public function collect(array $opts = array ( +)): SignalWire\Relay\CollectAction +``` + +#### Parameters + + + \- \`\`digits\`\` / \`\`speech\`\` / \`\`initial\_timeout\`\` etc forwarded as-is + \- \`\`control\_id\`\` + \- \`\`start\_input\_timers\`\` (bool) + \- \`\`on\_completed\`\` callback + + +#### Returns + +`SignalWire\Relay\CollectAction` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 644. + +*** + +### connect + +#### Signature + +```php +public function connect(array $params): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 327. + +*** + +### denoise + +#### Signature + +```php +public function denoise(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 347. + +*** + +### denoiseStop + +#### Signature + +```php +public function denoiseStop(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 352. + +*** + +### detect + +#### Signature + +```php +public function detect( + array $detect, + array $opts = array ( +) +): SignalWire\Relay\DetectAction +``` + +#### Parameters + + + Detection request (`{type: 'machine'|'fax'|'digit', params: {...}}`). + + + + +#### Returns + +`SignalWire\Relay\DetectAction` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 725. + +*** + +### detectAnsweringMachine + +Detect human vs answering machine (AMD). Typed convenience over + +\{@see detect()\}. Mirrors Python's `Call.detect_answering_machine(*, +initial_timeout, end_silence_timeout, machine_voice_threshold, +machine_words_threshold, detect_interruptions, detect_message_end, +timeout, on_completed)`. Only the AMD keys the caller supplies are +emitted under `params` (matches Python's only-provided-keys behavior); +`timeout` rides at the top level. + +Wire shape: detect `{type:"machine", params:{...only-provided...}}` +with optional top-level `timeout`. + +#### Signature + +```php +public function detectAnsweringMachine( + array $opts = array ( +) +): SignalWire\Relay\DetectAction +``` + +#### Parameters + + + any of the AMD tuning keys above plus `timeout` / `control_id` / `on_completed`. + + +#### Returns + +`SignalWire\Relay\DetectAction` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 779. + +*** + +### detectDigit + +Detect DTMF digits. Typed convenience over \{@see detect()\}. + +Mirrors Python's `Call.detect_digit(*, digits, timeout, +on_completed)`. `digits` is nested under `params` only when +supplied; `timeout` rides at the top level via the generic detect +frame. + +Wire shape: detect `{type:"digit", params:{digits?}}` with optional +top-level `timeout`. + +#### Signature + +```php +public function detectDigit(array $opts = array ( +)): SignalWire\Relay\DetectAction +``` + +#### Parameters + + + `digits`/`timeout` plus `control_id` / `on_completed`. + + +#### Returns + +`SignalWire\Relay\DetectAction` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 749. + +*** + +### detectFax + +Detect a fax tone (CED/CNG). Typed convenience over \{@see detect()\}. + +Mirrors Python's `Call.detect_fax(*, tone, timeout, on_completed)`. +`tone` is nested under `params` only when supplied; `timeout` +rides at the top level. + +Wire shape: detect `{type:"fax", params:{tone?}}` with optional +top-level `timeout`. + +#### Signature + +```php +public function detectFax(array $opts = array ( +)): SignalWire\Relay\DetectAction +``` + +#### Parameters + + + `tone`/`timeout` plus `control_id` / `on_completed`. + + +#### Returns + +`SignalWire\Relay\DetectAction` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 815. + +*** + +### disconnect + +#### Signature + +```php +public function disconnect(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 332. + +*** + +### dispatchEvent + +Central event router invoked by the Client whenever a server event + +targets this call. + +#### Signature + +```php +public function dispatchEvent(SignalWire\Relay\Event $event): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 71. + +*** + +### echo + +#### Signature + +```php +public function echo(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 372. + +*** + +### hangup + +Hang up the call. `$reason` is forwarded as `reason` on the + +wire (RELAY accepts `hangup`, `busy`, `decline`, etc.). + +The on-wire method is `calling.end` (production), which historically +was named `calling.hangup` — we send `calling.end` to match the +RELAY schema set extracted from switchblade. + +#### Signature + +```php +public function hangup(?string $reason = NULL): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 316. + +*** + +### hold + +#### Signature + +```php +public function hold(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 337. + +*** + +### joinConference + +#### Signature + +```php +public function joinConference(array $params): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 362. + +*** + +### joinRoom + +#### Signature + +```php +public function joinRoom(array $params): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 412. + +*** + +### leaveConference + +#### Signature + +```php +public function leaveConference(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 367. + +*** + +### leaveRoom + +#### Signature + +```php +public function leaveRoom(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 417. + +*** + +### liveTranscribe + +#### Signature + +```php +public function liveTranscribe(array $params): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 402. + +*** + +### liveTranslate + +#### Signature + +```php +public function liveTranslate(array $params): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 407. + +*** + +### on + +Register a generic event listener on this call. + +#### Signature + +```php +public function on(callable $cb): SignalWire\Relay\Call +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Relay\Call` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 162. + +*** + +### pass + +#### Signature + +```php +public function pass(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 322. + +*** + +### pay + +#### Signature + +```php +public function pay( + string $paymentConnectorUrl, + array $opts = array ( +) +): SignalWire\Relay\PayAction +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire\Relay\PayAction` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 874. + +*** + +### play + +Start a calling.play action. + +#### Signature + +```php +public function play( + array $media, + array $opts = array ( +) +): SignalWire\Relay\PlayAction +``` + +#### Parameters + + + Play list (each entry is `{type:..., params:...}`). + + + + `control_id` (auto-generated when omitted), `on_completed` callback fired on terminal events. + + +#### Returns + +`SignalWire\Relay\PlayAction` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 526. + +*** + +### playAndCollect + +Play media then collect a response (digits, speech). + +#### Signature + +```php +public function playAndCollect( + array $media, + array $collect, + array $opts = array ( +) +): SignalWire\Relay\CollectAction +``` + +#### Parameters + + + + + + + +#### Returns + +`SignalWire\Relay\CollectAction` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 657. + +*** + +### playAudio + +Play an audio file from a URL. Typed convenience over \{@see play()\}. + +Mirrors Python's `Call.play_audio(url, *, volume, on_completed)`. + +Wire shape: play `[{type:"audio", params:{url}}]` with optional +top-level `volume`. + +#### Signature + +```php +public function playAudio( + string $url, + array $opts = array ( +) +): SignalWire\Relay\PlayAction +``` + +#### Parameters + + + + + `volume` plus `control_id` / `on_completed`. + + +#### Returns + +`SignalWire\Relay\PlayAction` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 576. + +*** + +### playRingtone + +Play a named ringtone by country code. Typed convenience over + +\{@see play()\}. Mirrors Python's `Call.play_ringtone(name, *, +duration, volume, on_completed)`. `duration` is nested under +`params` only when supplied; `volume` rides at the top level. + +Wire shape: play `[{type:"ringtone", params:{name, duration?}}]` with +optional top-level `volume`. + +#### Signature + +```php +public function playRingtone( + string $name, + array $opts = array ( +) +): SignalWire\Relay\PlayAction +``` + +#### Parameters + + + + + `duration`/`volume` plus `control_id` / `on_completed`. + + +#### Returns + +`SignalWire\Relay\PlayAction` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 612. + +*** + +### playSilence + +Play silence for `$duration` seconds. Typed convenience over + +\{@see play()\}. Mirrors Python's `Call.play_silence(duration, *, +on_completed)`. + +Wire shape: play `[{type:"silence", params:{duration}}]`. + +#### Signature + +```php +public function playSilence( + int|float $duration, + array $opts = array ( +) +): SignalWire\Relay\PlayAction +``` + +#### Parameters + + + + + `control_id` / `on_completed`. + + +#### Returns + +`SignalWire\Relay\PlayAction` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 591. + +*** + +### playTts + +Play text-to-speech. Typed convenience over \{@see play()\}. + +Restores the legacy `play_tts(text=...)` ergonomics so callers don't +hand-build the `{type:"tts", params:{...}}` media shape. Mirrors +Python's `Call.play_tts(text, *, language, gender, voice, volume, +on_completed)`. Optional `language` / `gender` / `voice` are +nested under `params` only when supplied; `volume` rides at the +top level via the generic play frame; `control_id` / `on_completed` +are honored from `$opts`. + +Wire shape: play `[{type:"tts", params:{text, language?, gender?, +voice?}}]` with optional top-level `volume`. + +#### Signature + +```php +public function playTts( + string $text, + array $opts = array ( +) +): SignalWire\Relay\PlayAction +``` + +#### Parameters + + + + + `language`/`gender`/`voice`/ `volume` plus the usual `control_id` / `on_completed`. + + +#### Returns + +`SignalWire\Relay\PlayAction` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 553. + +*** + +### promptAudio + +Play an audio file then collect input. Typed media over + +\{@see playAndCollect()\}. Mirrors Python's `Call.prompt_audio(url, +collect, *, volume, on_completed)`. + +Wire shape: play\_and\_collect `[{type:"audio", params:{url}}]` + the +given `collect` with optional top-level `volume`. + +#### Signature + +```php +public function promptAudio( + string $url, + array $collect, + array $opts = array ( +) +): SignalWire\Relay\CollectAction +``` + +#### Parameters + + + + + Collect spec (`digits`/`speech`/…). + + + + `volume` plus `control_id` / `on_completed`. + + +#### Returns + +`SignalWire\Relay\CollectAction` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 711. + +*** + +### promptTts + +Play TTS then collect input. Typed media over \{@see playAndCollect()\}. + +Mirrors Python's `Call.prompt_tts(text, collect, *, language, gender, +voice, volume, on_completed)`. Builds the same `{type:"tts"}` media +shape as \{@see playTts()\} and forwards the caller's `$collect` object +verbatim. + +Wire shape: play\_and\_collect `[{type:"tts", params:{text, language?, +gender?, voice?}}]` + the given `collect` with optional top-level +`volume`. + +#### Signature + +```php +public function promptTts( + string $text, + array $collect, + array $opts = array ( +) +): SignalWire\Relay\CollectAction +``` + +#### Parameters + + + + + Collect spec (`digits`/`speech`/…). + + + + `language`/`gender`/`voice`/ `volume` plus `control_id` / `on_completed`. + + +#### Returns + +`SignalWire\Relay\CollectAction` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 683. + +*** + +### queueEnter + +#### Signature + +```php +public function queueEnter(array $params): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 447. + +*** + +### queueLeave + +Remove the call from a named queue. + +Mirrors Python's Call.queue\_leave(queue\_name, \*, control\_id=None, +queue\_id=None, status\_url=None, \*\*kwargs). When called with no args +the legacy "leave the current queue" behavior is preserved. + +#### Signature + +```php +public function queueLeave( + ?string $queue_name = NULL, + ?string $control_id = NULL, + ?string $queue_id = NULL, + ?string $status_url = NULL, + array $kwargs = array ( +) +): array +``` + +#### Parameters + + + Name of the queue to leave. Required when also supplying control\_id / queue\_id; when null the legacy no-arg "leave-current" behavior is preserved. + + + + Optional control\_id; auto-generated when null and other named-args are supplied. + + + + Optional explicit queue\_id passed to the server. + + + + Optional status callback URL. + + + + Extra params merged onto the wire call. + + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 471. + +*** + +### receiveFax + +#### Signature + +```php +public function receiveFax(array $opts = array ( +)): SignalWire\Relay\FaxAction +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Relay\FaxAction` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 844. + +*** + +### record + +#### Signature + +```php +public function record( + array $audio, + array $opts = array ( +) +): SignalWire\Relay\RecordAction +``` + +#### Parameters + + + Recording config (`format`, etc.) + + + + +#### Returns + +`SignalWire\Relay\RecordAction` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 625. + +*** + +### refer + +#### Signature + +```php +public function refer(array $params): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 504. + +*** + +### resolveAllActions + +Mark every outstanding action as completed. Called when the call + +enters a terminal state (ended). + +#### Signature + +```php +public function resolveAllActions(): void +``` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 291. + +*** + +### sendDigits + +#### Signature + +```php +public function sendDigits(array $params): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 509. + +*** + +### sendFax + +#### Signature + +```php +public function sendFax( + string $document, + ?string $identity = NULL, + array $opts = array ( +) +): SignalWire\Relay\FaxAction +``` + +#### Parameters + + + + + + + +#### Returns + +`SignalWire\Relay\FaxAction` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 829. + +*** + +### stream + +#### Signature + +```php +public function stream( + string $url, + array $opts = array ( +) +): SignalWire\Relay\StreamAction +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire\Relay\StreamAction` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 868. + +*** + +### tap + +#### Signature + +```php +public function tap( + array $tap, + array $device, + array $opts = array ( +) +): SignalWire\Relay\TapAction +``` + +#### Parameters + + + Tap config. + + + + Tap delivery device. + + + + +#### Returns + +`SignalWire\Relay\TapAction` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 858. + +*** + +### transcribe + +#### Signature + +```php +public function transcribe(array $opts = array ( +)): SignalWire\Relay\TranscribeAction +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Relay\TranscribeAction` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 880. + +*** + +### transfer + +#### Signature + +```php +public function transfer(array $params): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 357. + +*** + +### unhold + +#### Signature + +```php +public function unhold(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 342. + +*** + +### userEvent + +#### Signature + +```php +public function userEvent(array $params): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 442. + +*** + +### waitForAnswered + +Wait until the call is answered (immediate if already answered or past + +it). Typed wait over the call lifecycle, mirroring Python's +`Call.wait_for_answered(timeout)`. + +#### Signature + +```php +public function waitForAnswered(int|float|null $timeout = NULL): bool +``` + +#### Parameters + + + +#### Returns + +`bool` — True once the call is answered (or already past it); false on timeout. + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 256. + +*** + +### waitForEnding + +Wait until the call is ending (immediate if already ending or past it). + +Typed wait over the call lifecycle, mirroring Python's +`Call.wait_for_ending(timeout)`. + +#### Signature + +```php +public function waitForEnding(int|float|null $timeout = NULL): bool +``` + +#### Parameters + + + +#### Returns + +`bool` — True once the call is ending (or already past it); false on timeout. + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 282. + +*** + +### waitForRinging + +Wait until the call is ringing (immediate if already ringing or past + +it). Typed wait over the call lifecycle, mirroring Python's +`Call.wait_for_ringing(timeout)`. + +#### Signature + +```php +public function waitForRinging(int|float|null $timeout = NULL): bool +``` + +#### Parameters + + + +#### Returns + +`bool` — True once the call is ringing (or already past it); false on timeout. + +#### Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 269. + +## Source + +[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) + +Line 16. diff --git a/fern/products/sdk-reference/php/relay/relay/client/index.mdx b/fern/products/sdk-reference/php/relay/relay/client/index.mdx new file mode 100644 index 0000000000..78f0ac1ea5 --- /dev/null +++ b/fern/products/sdk-reference/php/relay/relay/client/index.mdx @@ -0,0 +1,607 @@ +--- +slug: "/reference/php/relay/relay/client" +title: "Client" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Relay\\Client" + parent: "relay.Relay" + module: "relay.Relay" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Client.php" +--- +# `Client` + +RELAY Client – manages the WebSocket connection to SignalWire, sends + +JSON-RPC requests, and dispatches inbound events to the correct Call +or Message objects. + +The transport layer (WebSocket send/receive) is abstracted behind +thin methods so that unit tests can subclass or mock without needing +a real WebSocket extension. + +## Signature + +```php +class Client +``` + +## Properties + + + + + + + Optional path to a CA bundle (PEM) used to verify the server certificate on `wss://` connections. Sourced from the `ca_file` option or the `SIGNALWIRE_CA_FILE` / `SSL_CERT_FILE` env vars. Peer verification stays enabled regardless; this only selects which CA to trust (system store when null). + + + + callId => Call + + + + + + + + + + + + messageId => Message + + + + + + + + + + id => callbacks + + + + tag => dial promise + + + + + + + + + + + + + + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(array $options) +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/Client.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Client.php) + +Line 94. + +*** + +### authenticate + +Send the signalwire.connect RPC to authenticate and bind a session. + +Sends project/token both at the top level AND nested under +`authentication`. Python sends the nested form; the audit fixture +accepts either; sending both is forward-compatible (per +SUBAGENT\_PLAYBOOK lessons-learned). + +#### Signature + +```php +public function authenticate(): void +``` + +#### Source + +[`SignalWire/Relay/Client.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Client.php) + +Line 208. + +*** + +### connect + +Open the WebSocket connection and run the JSON-RPC `signalwire.connect` + +handshake. Throws on transport or auth failure. + +The transport URI is `://` (defaults to +`wss:///api/relay/ws`). Tests point SIGNALWIRE\_RELAY\_SCHEME +at `ws` and SIGNALWIRE\_RELAY\_HOST at the fixture's host:port. + +#### Signature + +```php +public function connect(): void +``` + +#### Source + +[`SignalWire/Relay/Client.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Client.php) + +Line 169. + +*** + +### dial + +Originate an outbound call, blocking until `calling.call.dial` + +resolves with a winner or fails. + +#### Signature + +```php +public function dial(array $devices, array $opts = array ( +)): SignalWire\Relay\Call +``` + +#### Parameters + + + Two-dimensional array of devices: each outer entry is one parallel "leg" of the dial, each inner entry is a serial step within that leg. Mirrors the Python `[[device, device], [device]]` shape. + + + + \- \`\`tag\`\`: explicit dial tag (UUID4 generated when omitted) + \- \`\`dial\_timeout\`\`: seconds to wait for the dial event (default 30.0) + \- \`\`max\_duration\`\`: max call lifetime in seconds, passed through + to \`\`calling.dial\`\`. + \- any other key is forwarded as a top-level param on the wire. + + +#### Returns + +`SignalWire\Relay\Call` + +#### Throws + +- `RelayError` — on dial failure or timeout. + +#### Source + +[`SignalWire/Relay/Client.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Client.php) + +Line 623. + +*** + +### disconnect + +Gracefully close the connection. + +#### Signature + +```php +public function disconnect(): void +``` + +#### Source + +[`SignalWire/Relay/Client.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Client.php) + +Line 263. + +*** + +### execute + +Send a JSON-RPC request and synchronously wait for the matching + +response. Returns the "result" portion of the response. + +#### Signature + +```php +public function execute(string $method, array $params = array ( +)): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Throws + +- `\RuntimeException` — on error responses or transport timeout. + +#### Source + +[`SignalWire/Relay/Client.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Client.php) + +Line 344. + +*** + +### getCall + +#### Signature + +```php +public function getCall(string $callId): ?SignalWire\Relay\Call +``` + +#### Parameters + + + +#### Returns + +`?SignalWire\Relay\Call` + +#### Source + +[`SignalWire/Relay/Client.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Client.php) + +Line 781. + +*** + +### getCalls + +#### Signature + +```php +public function getCalls(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Client.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Client.php) + +Line 789. + +*** + +### getMessages + +#### Signature + +```php +public function getMessages(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Client.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Client.php) + +Line 797. + +*** + +### handleEvent + +Route a signalwire.event payload to the appropriate handler. + +#### Signature + +```php +public function handleEvent(array $outerParams): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/Client.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Client.php) + +Line 511. + +*** + +### handleMessage + +Parse a raw JSON string from the server and route it. + +#### Signature + +```php +public function handleMessage(string $raw): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/Client.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Client.php) + +Line 464. + +*** + +### onCall + +Register a handler for inbound calls. + +#### Signature + +```php +public function onCall(callable $cb): SignalWire\Relay\Client +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Relay\Client` + +#### Source + +[`SignalWire/Relay/Client.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Client.php) + +Line 764. + +*** + +### onMessage + +Register a handler for inbound messages. + +#### Signature + +```php +public function onMessage(callable $cb): SignalWire\Relay\Client +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Relay\Client` + +#### Source + +[`SignalWire/Relay/Client.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Client.php) + +Line 773. + +*** + +### readOnce + +Read a single inbound frame from the WebSocket and dispatch it. + +Returns silently on a read timeout (no frame within $this->readTimeout +seconds — the run loop will call again). Throws on socket errors so +the run loop can trigger reconnect. + +#### Signature + +```php +public function readOnce(): void +``` + +#### Source + +[`SignalWire/Relay/Client.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Client.php) + +Line 420. + +*** + +### receive + +Subscribe to one or more inbound contexts so that events for those + +contexts are delivered to this client. + +#### Signature + +```php +public function receive(array $contexts): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/Client.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Client.php) + +Line 729. + +*** + +### reconnect + +Reconnect with exponential back-off (1 s -> 30 s cap). + +#### Signature + +```php +public function reconnect(): void +``` + +#### Source + +[`SignalWire/Relay/Client.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Client.php) + +Line 283. + +*** + +### run + +Main event loop – reads messages until disconnect. + +Auto-reconnects with exponential backoff on transport errors, +preserving authorization\_state across reconnects so the server +can fast-path the session resumption. + +#### Signature + +```php +public function run(): void +``` + +#### Source + +[`SignalWire/Relay/Client.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Client.php) + +Line 309. + +*** + +### send + +Encode and send a JSON message over the WebSocket. Throws if the + +socket is closed; the run loop catches and triggers reconnect. + +#### Signature + +```php +public function send(array $msg): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/Client.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Client.php) + +Line 402. + +*** + +### sendAck + +Send an acknowledgement (empty result) for a server-initiated request. + +Best-effort: an ACK that fails because the socket dropped during +the request handling is not propagated as an exception (the run +loop will already trigger reconnect on the next read). + +#### Signature + +```php +public function sendAck(string $id): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/Client.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Client.php) + +Line 444. + +*** + +### sendMessage + +Send an outbound message. + +#### Signature + +```php +public function sendMessage(array $params): SignalWire\Relay\Message +``` + +#### Parameters + + + Outbound messaging.send params (`to_number`, `from_number`, `body`, `media`, `tags`, `context`). + + +#### Returns + +`SignalWire\Relay\Message` — Tracking object for the message lifecycle. The Message starts in `queued` state; subsequent `messaging.state` events from the server progress it through `sent` / `delivered` / `undelivered` / `failed`. + +#### Source + +[`SignalWire/Relay/Client.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Client.php) + +Line 697. + +*** + +### unreceive + +Unsubscribe from one or more contexts. + +#### Signature + +```php +public function unreceive(array $contexts): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/Client.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Client.php) + +Line 747. + +## Source + +[`SignalWire/Relay/Client.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Client.php) + +Line 18. diff --git a/fern/products/sdk-reference/php/relay/relay/collect-action/index.mdx b/fern/products/sdk-reference/php/relay/relay/collect-action/index.mdx new file mode 100644 index 0000000000..780ecce2d3 --- /dev/null +++ b/fern/products/sdk-reference/php/relay/relay/collect-action/index.mdx @@ -0,0 +1,472 @@ +--- +slug: "/reference/php/relay/relay/collect-action" +title: "CollectAction" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Relay\\CollectAction" + parent: "relay.Relay" + module: "relay.Relay" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php" +--- +# `CollectAction` + +Handle for calling.collect (and play\_and\_collect) operations. + +Note: play\_and\_collect emits intermediate calling.call.play events +that must be silently ignored so they do not pollute the collect +action's state. + +## Signature + +```php +class CollectAction extends Action +``` + +## Inheritance + +**Extends:** [SignalWire\Relay\Action](/docs/sdk-reference/reference/php/relay/relay/action) + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct( + string $controlId, + string $callId, + string $nodeId, + object $client +) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 33. + +*** + +### executeSubcommand + +Send a sub-command RPC through the client. + +The payload always includes control\_id, call\_id, and node\_id so +the server knows which action instance to target. + +#### Signature + +```php +public function executeSubcommand(string $method, array $extraParams = array ( +)): void +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 211. + +*** + +### getCallId + +#### Signature + +```php +public function getCallId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 107. + +*** + +### getCollectResult + +Return the structured collect result from the payload. + +#### Signature + +```php +public function getCollectResult(): ?array +``` + +#### Returns + +`?array` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 360. + +*** + +### getControlId + +#### Signature + +```php +public function getControlId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 102. + +*** + +### getEvents + +#### Signature + +```php +public function getEvents(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 97. + +*** + +### getNodeId + +#### Signature + +```php +public function getNodeId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 112. + +*** + +### getPayload + +#### Signature + +```php +public function getPayload(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 91. + +*** + +### getResult + +#### Signature + +```php +public function getResult() +``` + +#### Returns + +`mixed` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 81. + +*** + +### getState + +#### Signature + +```php +public function getState(): ?string +``` + +#### Returns + +`?string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 86. + +*** + +### getStopMethod + +#### Signature + +```php +public function getStopMethod(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 343. + +*** + +### handleEvent + +Override: silently ignore intermediate play events that arrive + +during a play\_and\_collect operation. + +#### Signature + +```php +public function handleEvent(SignalWire\Relay\Event $event): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 369. + +*** + +### isDone + +#### Signature + +```php +public function isDone(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 75. + +*** + +### onCompleted + +Register a callback to fire when the action completes. + +If the action is already done the callback fires immediately. + +#### Signature + +```php +public function onCompleted(callable $cb): SignalWire\Relay\Action +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Relay\Action` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 126. + +*** + +### resolve + +Mark this action as completed. + +The optional $result is stored and the onCompleted callback is +fired exactly once. + +#### Signature + +```php +public function resolve($result = NULL): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 167. + +*** + +### setStopMethod + +#### Signature + +```php +public function setStopMethod(string $method): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 338. + +*** + +### startInputTimers + +Notify the server to start input timers now rather than waiting + +for the initial-timeout to expire naturally. + +#### Signature + +```php +public function startInputTimers(): void +``` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 352. + +*** + +### stop + +Stop the running action by sending its stop sub-command. + +#### Signature + +```php +public function stop(): void +``` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 186. + +*** + +### wait + +Block until the action completes or $timeout seconds elapse. + +Each iteration calls $client->readOnce() so the event-loop +keeps processing inbound frames. + +Returns the resolving Event when the action completes (mirrors +Python's `return self._wait_event.wait()`). Returns null on +timeout. The numeric `$timeout` is interpreted as seconds and +accepts integers or floats. + +#### Signature + +```php +public function wait(int|float $timeout = 30): ?SignalWire\Relay\Event +``` + +#### Parameters + + + +#### Returns + +`?SignalWire\Relay\Event` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 58. + +## Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 328. diff --git a/fern/products/sdk-reference/php/relay/relay/constants/index.mdx b/fern/products/sdk-reference/php/relay/relay/constants/index.mdx new file mode 100644 index 0000000000..14fffae16a --- /dev/null +++ b/fern/products/sdk-reference/php/relay/relay/constants/index.mdx @@ -0,0 +1,140 @@ +--- +slug: "/reference/php/relay/relay/constants" +title: "Constants" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Relay\\Constants" + parent: "relay.Relay" + module: "relay.Relay" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Constants.php" +--- +# `Constants` + +**Modifiers:** `final` + +## Signature + +```php +final class Constants +``` + +## Constants + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## Source + +[`SignalWire/Relay/Constants.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Constants.php) + +Line 7. diff --git a/fern/products/sdk-reference/php/relay/relay/detect-action/index.mdx b/fern/products/sdk-reference/php/relay/relay/detect-action/index.mdx new file mode 100644 index 0000000000..26b8d95524 --- /dev/null +++ b/fern/products/sdk-reference/php/relay/relay/detect-action/index.mdx @@ -0,0 +1,424 @@ +--- +slug: "/reference/php/relay/relay/detect-action" +title: "DetectAction" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Relay\\DetectAction" + parent: "relay.Relay" + module: "relay.Relay" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php" +--- +# `DetectAction` + +Handle for calling.detect operations (fax-tone, digit, machine, etc.). + +## Signature + +```php +class DetectAction extends Action +``` + +## Inheritance + +**Extends:** [SignalWire\Relay\Action](/docs/sdk-reference/reference/php/relay/relay/action) + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct( + string $controlId, + string $callId, + string $nodeId, + object $client +) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 33. + +*** + +### executeSubcommand + +Send a sub-command RPC through the client. + +The payload always includes control\_id, call\_id, and node\_id so +the server knows which action instance to target. + +#### Signature + +```php +public function executeSubcommand(string $method, array $extraParams = array ( +)): void +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 211. + +*** + +### getCallId + +#### Signature + +```php +public function getCallId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 107. + +*** + +### getControlId + +#### Signature + +```php +public function getControlId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 102. + +*** + +### getDetectResult + +#### Signature + +```php +public function getDetectResult(): ?array +``` + +#### Returns + +`?array` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 389. + +*** + +### getEvents + +#### Signature + +```php +public function getEvents(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 97. + +*** + +### getNodeId + +#### Signature + +```php +public function getNodeId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 112. + +*** + +### getPayload + +#### Signature + +```php +public function getPayload(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 91. + +*** + +### getResult + +#### Signature + +```php +public function getResult() +``` + +#### Returns + +`mixed` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 81. + +*** + +### getState + +#### Signature + +```php +public function getState(): ?string +``` + +#### Returns + +`?string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 86. + +*** + +### getStopMethod + +#### Signature + +```php +public function getStopMethod(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 384. + +*** + +### handleEvent + +Append an incoming event and update local state / payload. + +#### Signature + +```php +public function handleEvent(SignalWire\Relay\Event $event): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 144. + +*** + +### isDone + +#### Signature + +```php +public function isDone(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 75. + +*** + +### onCompleted + +Register a callback to fire when the action completes. + +If the action is already done the callback fires immediately. + +#### Signature + +```php +public function onCompleted(callable $cb): SignalWire\Relay\Action +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Relay\Action` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 126. + +*** + +### resolve + +Mark this action as completed. + +The optional $result is stored and the onCompleted callback is +fired exactly once. + +#### Signature + +```php +public function resolve($result = NULL): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 167. + +*** + +### stop + +Stop the running action by sending its stop sub-command. + +#### Signature + +```php +public function stop(): void +``` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 186. + +*** + +### wait + +Block until the action completes or $timeout seconds elapse. + +Each iteration calls $client->readOnce() so the event-loop +keeps processing inbound frames. + +Returns the resolving Event when the action completes (mirrors +Python's `return self._wait_event.wait()`). Returns null on +timeout. The numeric `$timeout` is interpreted as seconds and +accepts integers or floats. + +#### Signature + +```php +public function wait(int|float $timeout = 30): ?SignalWire\Relay\Event +``` + +#### Parameters + + + +#### Returns + +`?SignalWire\Relay\Event` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 58. + +## Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 382. diff --git a/fern/products/sdk-reference/php/relay/relay/device/index.mdx b/fern/products/sdk-reference/php/relay/relay/device/index.mdx new file mode 100644 index 0000000000..f5b6fd1789 --- /dev/null +++ b/fern/products/sdk-reference/php/relay/relay/device/index.mdx @@ -0,0 +1,211 @@ +--- +slug: "/reference/php/relay/relay/device" +title: "Device" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Relay\\Device" + parent: "relay.Relay" + module: "relay.Relay" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Device.php" +--- +# `Device` + +A RELAY `{type, params}` device descriptor, as an immutable typed value + +object. + +The device object is the single most-recurring blob in the RELAY calling +layer: it identifies WHERE a call leg, tap delivery, or referral goes +(a phone number, a SIP endpoint, a WebRTC client, an RTP sink, …) and rides +inside `calling.connect` / `calling.dial` / `calling.tap` / `calling.refer` +params. Its shape is grounded in the switchblade-extracted wire schemas +(`relay-protocol/calling.{connect,dial,tap,refer}.params.json`): an object +with a required `type` string and a `params` payload. + +The Python reference (and this port until now) passes that object as a raw +associative array. This value object types the SHAPE — readonly, +constructor-promoted (consistent with the Wave-A \{@see Event\} immutability +work) — while keeping `type` a bare `string`: the discriminant is NOT +schema-enumerated (the set of device types is open — phone / sip / webrtc / +rtp / agent / …), so per the idiom philosophy it stays a string, not an enum. + +It is purely ADDITIVE: every method that takes a device still accepts the +raw array; \{@see Device::toArray()\} produces the byte-identical +`['type' => …, 'params' => …]` wire array, so a `Device` is a drop-in for the +hand-written literal. PORT\_ADDITION — the Python reference has no equivalent. + +``` +// hand-written (still works): +['type' => 'phone', 'params' => ['to_number' => $to, 'from_number' => $frm]] + +// typed, identical on the wire: +(new Device('phone', ['to_number' => $to, 'from_number' => $frm]))->toArray() +Device::phone($to, $frm)->toArray(); // convenience for the common case +``` + +**Modifiers:** `final` + +## Signature + +```php +final class Device +``` + +## Properties + + + + + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(string $type, array $params = array ( +)) +``` + +#### Parameters + + + The device discriminant (`phone`, `sip`, `webrtc`, `rtp`, …). Kept a bare string — the set is open and not schema-enumerated. + + + + The device parameters (e.g. `to_number` / `from_number` for a phone, `to` for a SIP referral). + + +#### Source + +[`SignalWire/Relay/Device.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Device.php) + +Line 47. + +*** + +### phone + +Convenience constructor for the most common device: a PSTN phone leg. + +Mirrors the `['type' => 'phone', 'params' => ['to_number' => …, +'from_number' => …]]` literal callers hand-write today. + +**Modifiers:** `static` + +#### Signature + +```php +public static function phone( + string $toNumber, + string $fromNumber, + array $extra = array ( +) +): SignalWire\Relay\Device +``` + +#### Parameters + + + + + + + Additional `params` keys (e.g. `timeout`) merged after the numbers. + + +#### Returns + +`SignalWire\Relay\Device` + +#### Source + +[`SignalWire/Relay/Device.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Device.php) + +Line 78. + +*** + +### sip + +Convenience constructor for a SIP endpoint device. + +**Modifiers:** `static` + +#### Signature + +```php +public static function sip(string $to, array $extra = array ( +)): SignalWire\Relay\Device +``` + +#### Parameters + + + + + Additional `params` keys merged after the address (e.g. `from`, `headers`, `codecs`). + + +#### Returns + +`SignalWire\Relay\Device` + +#### Source + +[`SignalWire/Relay/Device.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Device.php) + +Line 92. + +*** + +### toArray + +Render the device to its wire array — byte-identical to the + +hand-written `['type' => …, 'params' => …]` literal (same keys, same +order). This is what \{@see Call::connect()\} / \{@see Client::dial()\} / +\{@see Call::tap()\} / \{@see Call::refer()\} put on the wire. + +#### Signature + +```php +public function toArray(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Device.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Device.php) + +Line 61. + +## Source + +[`SignalWire/Relay/Device.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Device.php) + +Line 38. diff --git a/fern/products/sdk-reference/php/relay/relay/event/index.mdx b/fern/products/sdk-reference/php/relay/relay/event/index.mdx new file mode 100644 index 0000000000..95e2fd79e3 --- /dev/null +++ b/fern/products/sdk-reference/php/relay/relay/event/index.mdx @@ -0,0 +1,307 @@ +--- +slug: "/reference/php/relay/relay/event" +title: "Event" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Relay\\Event" + parent: "relay.Relay" + module: "relay.Relay" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Event.php" +--- +# `Event` + +An immutable RELAY event value object. + +An Event carries the event type, its raw params, and a receive timestamp. +Once constructed it never changes — the three backing fields are +`readonly` (PHP 8.1), so an accidental write after construction is a hard +`\Error` rather than silent state corruption. This matches how the event is +actually used: handlers (`Call::dispatchEvent`, `Action::handleEvent`, +`Message::handleEvent`) only ever _read_ it. + +`eventType` and `params` are promoted constructor parameters; `timestamp` +is declared separately because its default is computed (`microtime(true)` +when the caller passes 0), which a promoted default expression cannot +express. + +The fields stay `private` (exposed only through the `get*` accessors) so the +public surface — and therefore the cross-port audit shape — is unchanged by +the immutability upgrade. + +## Signature + +```php +class Event +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(string $eventType, array $params, float $timestamp = 0.0) +``` + +#### Parameters + + + + + + + +#### Source + +[`SignalWire/Relay/Event.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Event.php) + +Line 30. + +*** + +### dialState + +The dial outcome carried by a `calling.call.dial` event as a typed + +\{@see DialState\}, read from the `dial_state` (or legacy `state`) param, +or null when absent / outside the known closed set (a forward-compatible +server value). + +Offered ALONGSIDE the raw `getParams()['dial_state']` string for parity: +the wire string stays available; `dialState()` is the typed view for +autocompletion + an exhaustive `match` + `->isTerminal()`. PORT\_ADDITION. + +#### Signature + +```php +public function dialState(): ?SignalWire\Relay\DialState +``` + +#### Returns + +`?SignalWire\Relay\DialState` + +#### Source + +[`SignalWire/Relay/Event.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Event.php) + +Line 88. + +*** + +### getCallId + +#### Signature + +```php +public function getCallId(): ?string +``` + +#### Returns + +`?string` + +#### Source + +[`SignalWire/Relay/Event.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Event.php) + +Line 53. + +*** + +### getControlId + +#### Signature + +```php +public function getControlId(): ?string +``` + +#### Returns + +`?string` + +#### Source + +[`SignalWire/Relay/Event.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Event.php) + +Line 63. + +*** + +### getEventType + +#### Signature + +```php +public function getEventType(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Event.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Event.php) + +Line 38. + +*** + +### getNodeId + +#### Signature + +```php +public function getNodeId(): ?string +``` + +#### Returns + +`?string` + +#### Source + +[`SignalWire/Relay/Event.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Event.php) + +Line 58. + +*** + +### getParams + +#### Signature + +```php +public function getParams(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Event.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Event.php) + +Line 48. + +*** + +### getState + +#### Signature + +```php +public function getState(): ?string +``` + +#### Returns + +`?string` + +#### Source + +[`SignalWire/Relay/Event.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Event.php) + +Line 73. + +*** + +### getTag + +#### Signature + +```php +public function getTag(): ?string +``` + +#### Returns + +`?string` + +#### Source + +[`SignalWire/Relay/Event.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Event.php) + +Line 68. + +*** + +### getTimestamp + +#### Signature + +```php +public function getTimestamp(): float +``` + +#### Returns + +`float` + +#### Source + +[`SignalWire/Relay/Event.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Event.php) + +Line 43. + +*** + +### parse + +**Modifiers:** `static` + +#### Signature + +```php +public static function parse(string $eventType, array $params): SignalWire\Relay\Event +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire\Relay\Event` + +#### Source + +[`SignalWire/Relay/Event.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Event.php) + +Line 103. + +*** + +### toArray + +#### Signature + +```php +public function toArray(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Event.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Event.php) + +Line 94. + +## Source + +[`SignalWire/Relay/Event.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Event.php) + +Line 26. diff --git a/fern/products/sdk-reference/php/relay/relay/fax-action/index.mdx b/fern/products/sdk-reference/php/relay/relay/fax-action/index.mdx new file mode 100644 index 0000000000..6a36b042de --- /dev/null +++ b/fern/products/sdk-reference/php/relay/relay/fax-action/index.mdx @@ -0,0 +1,429 @@ +--- +slug: "/reference/php/relay/relay/fax-action" +title: "FaxAction" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Relay\\FaxAction" + parent: "relay.Relay" + module: "relay.Relay" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php" +--- +# `FaxAction` + +Handle for calling.fax operations (send or receive). + +## Signature + +```php +class FaxAction extends Action +``` + +## Inheritance + +**Extends:** [SignalWire\Relay\Action](/docs/sdk-reference/reference/php/relay/relay/action) + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct( + string $controlId, + string $callId, + string $nodeId, + object $client, + string $faxType = 'send' +) +``` + +#### Parameters + + + + + + + + + + + 'send' or 'receive' + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 405. + +*** + +### executeSubcommand + +Send a sub-command RPC through the client. + +The payload always includes control\_id, call\_id, and node\_id so +the server knows which action instance to target. + +#### Signature + +```php +public function executeSubcommand(string $method, array $extraParams = array ( +)): void +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 211. + +*** + +### getCallId + +#### Signature + +```php +public function getCallId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 107. + +*** + +### getControlId + +#### Signature + +```php +public function getControlId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 102. + +*** + +### getEvents + +#### Signature + +```php +public function getEvents(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 97. + +*** + +### getFaxType + +#### Signature + +```php +public function getFaxType(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 416. + +*** + +### getNodeId + +#### Signature + +```php +public function getNodeId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 112. + +*** + +### getPayload + +#### Signature + +```php +public function getPayload(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 91. + +*** + +### getResult + +#### Signature + +```php +public function getResult() +``` + +#### Returns + +`mixed` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 81. + +*** + +### getState + +#### Signature + +```php +public function getState(): ?string +``` + +#### Returns + +`?string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 86. + +*** + +### getStopMethod + +#### Signature + +```php +public function getStopMethod(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 421. + +*** + +### handleEvent + +Append an incoming event and update local state / payload. + +#### Signature + +```php +public function handleEvent(SignalWire\Relay\Event $event): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 144. + +*** + +### isDone + +#### Signature + +```php +public function isDone(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 75. + +*** + +### onCompleted + +Register a callback to fire when the action completes. + +If the action is already done the callback fires immediately. + +#### Signature + +```php +public function onCompleted(callable $cb): SignalWire\Relay\Action +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Relay\Action` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 126. + +*** + +### resolve + +Mark this action as completed. + +The optional $result is stored and the onCompleted callback is +fired exactly once. + +#### Signature + +```php +public function resolve($result = NULL): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 167. + +*** + +### stop + +Stop the running action by sending its stop sub-command. + +#### Signature + +```php +public function stop(): void +``` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 186. + +*** + +### wait + +Block until the action completes or $timeout seconds elapse. + +Each iteration calls $client->readOnce() so the event-loop +keeps processing inbound frames. + +Returns the resolving Event when the action completes (mirrors +Python's `return self._wait_event.wait()`). Returns null on +timeout. The numeric `$timeout` is interpreted as seconds and +accepts integers or floats. + +#### Signature + +```php +public function wait(int|float $timeout = 30): ?SignalWire\Relay\Event +``` + +#### Parameters + + + +#### Returns + +`?SignalWire\Relay\Event` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 58. + +## Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 398. diff --git a/fern/products/sdk-reference/php/relay/relay/index.mdx b/fern/products/sdk-reference/php/relay/relay/index.mdx new file mode 100644 index 0000000000..31d9267e56 --- /dev/null +++ b/fern/products/sdk-reference/php/relay/relay/index.mdx @@ -0,0 +1,782 @@ +--- +slug: "/reference/php/relay/relay" +title: "Relay" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "module" + language: "php" + qualified_name: "relay.Relay" + parent: "relay" + module: "relay" +--- +# `Relay` + +## Classes + + + + Base class for all RELAY call actions (play, record, collect, etc.). + + + + Handle for calling.ai operations. + + + + Represents a RELAY voice call. + + + + RELAY Client – manages the WebSocket connection to SignalWire, sends + + + + Handle for calling.collect (and play\_and\_collect) operations. + + + + + + Handle for calling.detect operations (fax-tone, digit, machine, etc.). + + + + A RELAY `{type, params}` device descriptor, as an immutable typed value + + + + An immutable RELAY event value object. + + + + Handle for calling.fax operations (send or receive). + + + + Represents a RELAY messaging message (SMS / MMS). + + + + Handle for calling.pay operations. + + + + Handle for calling.play operations. + + + + Handle for calling.record operations. + + + + Exception type for RELAY-protocol-level failures. + + + + Handle for calling.stream operations. + + + + Handle for calling.tap operations. + + + + Handle for calling.transcribe operations. + + + + RELAY WebSocket transport. + + + +## Enums + +### CallState + +RELAY call lifecycle state, as a typed, compile-time-checked closed set. + +A call moves through these states over its lifetime: + +``` +created → ringing → answered → ending → ended +``` + +The five members are exactly the \{@see Constants\}::CALL\_STATE\_\* tokens +(grounded in the Python reference's `relay/constants.py` CALL\_STATES tuple); +each backing string IS the wire value the server emits in a +`calling.call.state` event's `call_state` / `state` field. \{@see Call\} +keeps the bare-string `$state` property for parity with the Python reference +(which models state as a plain `str`); this enum is offered ALONGSIDE it via +the typed \{@see Call::callState()\} accessor — autocompletion and an +exhaustive `match` at the call site, with the string preserved. + +``` +$call->state; // 'answered' (string, parity) +$call->callState(); // CallState::Answered (typed) +$call->callState()?->isTerminal(); // false +``` + +Server states can GROW (the wire vocabulary is owned by the server, not the +SDK), so \{@see CallState::tryFromWire()\} maps an unknown value to `null` +rather than throwing — a forward-compatible coerce. This is a PHP +PORT\_ADDITION: the Python reference uses a bare `str`. + +This is the CALL-state vocabulary ONLY. It is deliberately NOT unified with +\{@see DialState\} (dial-outcome) or \{@see MessageState\} (message-delivery) — +three distinct vocabularies that must never be conflated. + +#### Signature + +```php +final enum CallState implements UnitEnum, BackedEnum +``` + +#### Inheritance + +**Implements:** `UnitEnum`, `BackedEnum` + +#### Properties + + + + + +#### Constants + + + The call has been answered and is up. + + + + The call object exists but nothing has happened yet (the default). + + + + The call has ended — the one terminal state. + + + + The call is tearing down. + + + + The call is ringing the destination. + + +#### Variants + + + The call has been answered and is up. + + + + The call object exists but nothing has happened yet (the default). + + + + The call has ended — the one terminal state. + + + + The call is tearing down. + + + + The call is ringing the destination. + + +#### Methods + +##### cases + +**Modifiers:** `static` + +###### Signature + +```php +public static function cases(): array +``` + +###### Returns + +`array` + +*** + +##### from + +**Modifiers:** `static` + +###### Signature + +```php +public static function from(string|int $value): static +``` + +###### Parameters + + + +###### Returns + +`static` + +*** + +##### isTerminal + +True once the call has reached its terminal state. + +Terminal = \{@see CallState::Ended\} only, matching +\{@see Constants\}::CALL\_TERMINAL\_STATES (`['ended' => true]`). A terminal +state is what resolves every in-flight action on the call. + +###### Signature + +```php +public function isTerminal(): bool +``` + +###### Returns + +`bool` + +###### Source + +[`SignalWire/Relay/CallState.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/CallState.php) + +Line 60. + +*** + +##### tryFrom + +**Modifiers:** `static` + +###### Signature + +```php +public static function tryFrom(string|int $value): ?static +``` + +###### Parameters + + + +###### Returns + +`?static` + +*** + +##### tryFromWire + +Coerce a wire string (or null) to this enum, mapping any value outside + +the known closed set — or null — to null instead of throwing. + +Use this when reading a SERVER-emitted state: the wire vocabulary is +owned by the server and may grow, so an unrecognised value is not an +error — the caller falls back to the raw string. (Contrast PHP's +built-in \{@see CallState::from()\}, which throws \ValueError on a miss.) + +**Modifiers:** `static` + +###### Signature + +```php +public static function tryFromWire(?string $wire): ?SignalWire\Relay\CallState +``` + +###### Parameters + + + The raw `call_state` / `state` value from the wire. + + +###### Returns + +`?SignalWire\Relay\CallState` + +###### Source + +[`SignalWire/Relay/CallState.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/CallState.php) + +Line 76. + +#### Source + +[`SignalWire/Relay/CallState.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/CallState.php) + +Line 36. + +*** + +### DialState + +RELAY dial outcome state, as a typed, compile-time-checked closed set. + +A `calling.call.dial` event carries a `dial_state` (or legacy `state`) that +reports how the outbound dial is progressing: + +``` +dialing → (answered | failed | no_answer | busy) +``` + +The Python reference's `RelayClient` documents the core three +(`dialing | answered | failed`, see `relay/client.py`'s dial-event handler); +this port's \{@see Client::handleDialEvent()\} additionally treats the wire's +`no_answer` / `busy` as terminal failures, so they are modelled here too. +Each backing string IS the wire value. \{@see Constants\}::DIAL\_STATE\_\* keeps +the bare-string constants for parity (the Python reference reads +`dial_state` as a plain `str`); this enum is offered ALONGSIDE them. + +``` +DialState::Answered->value; // 'answered' (wire string) +DialState::tryFromWire('failed'); // DialState::Failed +DialState::Failed->isTerminal(); // true +DialState::Dialing->isTerminal(); // false (still in progress) +``` + +Server states can GROW, so \{@see DialState::tryFromWire()\} maps an unknown +value to `null` rather than throwing — a forward-compatible coerce. This is +a PHP PORT\_ADDITION: the Python reference uses a bare `str`. + +This is the DIAL-outcome vocabulary ONLY. It is deliberately NOT unified +with \{@see CallState\} (call-lifecycle) or \{@see MessageState\} +(message-delivery) — three distinct vocabularies that must never be +conflated. (Note `answered` appears in both CallState and DialState but +means different things — a call lifecycle phase vs a dial outcome — which is +exactly why the vocabularies are kept apart.) + +#### Signature + +```php +final enum DialState implements UnitEnum, BackedEnum +``` + +#### Inheritance + +**Implements:** `UnitEnum`, `BackedEnum` + +#### Properties + + + + + +#### Constants + + + A leg answered — the dial succeeded with a winner. + + + + Every leg returned busy. + + + + The dial is in progress, no leg has been picked yet. + + + + The dial failed outright. + + + + No leg answered before the dial timed out. + + +#### Variants + + + A leg answered — the dial succeeded with a winner. + + + + Every leg returned busy. + + + + The dial is in progress, no leg has been picked yet. + + + + The dial failed outright. + + + + No leg answered before the dial timed out. + + +#### Methods + +##### cases + +**Modifiers:** `static` + +###### Signature + +```php +public static function cases(): array +``` + +###### Returns + +`array` + +*** + +##### from + +**Modifiers:** `static` + +###### Signature + +```php +public static function from(string|int $value): static +``` + +###### Parameters + + + +###### Returns + +`static` + +*** + +##### isTerminal + +True once the dial has reached a terminal outcome. + +Terminal = any state other than \{@see DialState::Dialing\} — i.e. a +winner answered (\{@see DialState::Answered\}) or the dial gave up +(failed / no-answer / busy). This mirrors +\{@see Client::handleDialEvent()\}, which resolves (or rejects) the +pending dial on exactly these states and keeps waiting while `dialing`. + +###### Signature + +```php +public function isTerminal(): bool +``` + +###### Returns + +`bool` + +###### Source + +[`SignalWire/Relay/DialState.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/DialState.php) + +Line 65. + +*** + +##### tryFrom + +**Modifiers:** `static` + +###### Signature + +```php +public static function tryFrom(string|int $value): ?static +``` + +###### Parameters + + + +###### Returns + +`?static` + +*** + +##### tryFromWire + +Coerce a wire string (or null) to this enum, mapping any value outside + +the known closed set — or null — to null instead of throwing. + +Use this when reading a SERVER-emitted `dial_state`: the wire vocabulary +is owned by the server and may grow, so an unrecognised value is not an +error — the caller falls back to the raw string. (Contrast PHP's +built-in \{@see DialState::from()\}, which throws \ValueError on a miss.) + +**Modifiers:** `static` + +###### Signature + +```php +public static function tryFromWire(?string $wire): ?SignalWire\Relay\DialState +``` + +###### Parameters + + + The raw `dial_state` / `state` value from the wire. + + +###### Returns + +`?SignalWire\Relay\DialState` + +###### Source + +[`SignalWire/Relay/DialState.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/DialState.php) + +Line 81. + +#### Source + +[`SignalWire/Relay/DialState.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/DialState.php) + +Line 39. + +*** + +### MessageState + +RELAY message delivery state, as a typed, compile-time-checked closed set. + +A \{@see Message\} progresses through these states as the server reports +delivery via `messaging.state` events: + +``` +queued → initiated → sent → (delivered | undelivered | failed) +``` + +plus `received` for an inbound message. The seven members are exactly the +\{@see Constants\}::MESSAGE\_STATE\_\* tokens (grounded in the Python reference's +`relay/constants.py` MESSAGE\_STATE\_\* + MESSAGE\_TERMINAL\_STATES); each +backing string IS the wire value the server emits in the `message_state` / +`state` field. \{@see Message\} keeps the bare-string `getState()` accessor +for parity with the Python reference (which models state as a plain `str`); +this enum is offered ALONGSIDE it via the typed +\{@see Message::messageState()\} accessor. + +``` +$msg->getState(); // 'delivered' (string, parity) +$msg->messageState(); // MessageState::Delivered (typed) +$msg->messageState()?->isTerminal(); // true +``` + +Server states can GROW, so \{@see MessageState::tryFromWire()\} maps an +unknown value to `null` rather than throwing — a forward-compatible coerce. +This is a PHP PORT\_ADDITION: the Python reference uses a bare `str`. + +This is the MESSAGE-delivery vocabulary ONLY. It is deliberately NOT unified +with \{@see CallState\} (call-lifecycle) or \{@see DialState\} (dial-outcome) — +three distinct vocabularies that must never be conflated. (Note `failed` +appears in both MessageState and DialState but means different things — +message-delivery failure vs dial-outcome failure.) + +#### Signature + +```php +final enum MessageState implements UnitEnum, BackedEnum +``` + +#### Inheritance + +**Implements:** `UnitEnum`, `BackedEnum` + +#### Properties + + + + + +#### Constants + + + The message was delivered to the carrier/handset (terminal, success). + + + + The message failed to send (terminal, failure). + + + + Sending has been initiated. + + + + The message is queued for sending (the initial state). + + + + An inbound message was received. + + + + The message has left the platform. + + + + Delivery was attempted but not confirmed (terminal, failure). + + +#### Variants + + + The message was delivered to the carrier/handset (terminal, success). + + + + The message failed to send (terminal, failure). + + + + Sending has been initiated. + + + + The message is queued for sending (the initial state). + + + + An inbound message was received. + + + + The message has left the platform. + + + + Delivery was attempted but not confirmed (terminal, failure). + + +#### Methods + +##### cases + +**Modifiers:** `static` + +###### Signature + +```php +public static function cases(): array +``` + +###### Returns + +`array` + +*** + +##### from + +**Modifiers:** `static` + +###### Signature + +```php +public static function from(string|int $value): static +``` + +###### Parameters + + + +###### Returns + +`static` + +*** + +##### isTerminal + +True once the message has reached a terminal delivery state. + +Terminal = \{@see MessageState::Delivered\}, \{@see MessageState::Undelivered\}, +or \{@see MessageState::Failed\}, matching +\{@see Constants\}::MESSAGE\_TERMINAL\_STATES — the three states on which +\{@see Message::dispatchEvent()\} auto-resolves the message. Note `received` +is NOT terminal here (it mirrors the Python reference, whose +MESSAGE\_TERMINAL\_STATES excludes it). + +###### Signature + +```php +public function isTerminal(): bool +``` + +###### Returns + +`bool` + +###### Source + +[`SignalWire/Relay/MessageState.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/MessageState.php) + +Line 71. + +*** + +##### tryFrom + +**Modifiers:** `static` + +###### Signature + +```php +public static function tryFrom(string|int $value): ?static +``` + +###### Parameters + + + +###### Returns + +`?static` + +*** + +##### tryFromWire + +Coerce a wire string (or null) to this enum, mapping any value outside + +the known closed set — or null — to null instead of throwing. + +Use this when reading a SERVER-emitted `message_state`: the wire +vocabulary is owned by the server and may grow, so an unrecognised value +is not an error — the caller falls back to the raw string. (Contrast +PHP's built-in \{@see MessageState::from()\}, which throws \ValueError on a +miss.) + +**Modifiers:** `static` + +###### Signature + +```php +public static function tryFromWire(?string $wire): ?SignalWire\Relay\MessageState +``` + +###### Parameters + + + The raw `message_state` / `state` value from the wire. + + +###### Returns + +`?SignalWire\Relay\MessageState` + +###### Source + +[`SignalWire/Relay/MessageState.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/MessageState.php) + +Line 91. + +#### Source + +[`SignalWire/Relay/MessageState.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/MessageState.php) + +Line 38. diff --git a/fern/products/sdk-reference/php/relay/relay/message/index.mdx b/fern/products/sdk-reference/php/relay/relay/message/index.mdx new file mode 100644 index 0000000000..e3a998ddb8 --- /dev/null +++ b/fern/products/sdk-reference/php/relay/relay/message/index.mdx @@ -0,0 +1,499 @@ +--- +slug: "/reference/php/relay/relay/message" +title: "Message" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Relay\\Message" + parent: "relay.Relay" + module: "relay.Relay" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Message.php" +--- +# `Message` + +Represents a RELAY messaging message (SMS / MMS). + +A Message is created when you send or receive a message through the +RELAY messaging namespace. It accumulates state-change events and +resolves once the message reaches a terminal state (delivered, +undelivered, or failed). + +## Signature + +```php +class Message +``` + +## Methods + +### \_\_construct + +Build a Message from a params array (as returned by the server). + +Expected keys (all optional with sane defaults): +message\_id, context, direction, from\_number / from, +to\_number / to, body, media, tags, state, reason + +#### Signature + +```php +public function __construct(array $params = array ( +)) +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/Message.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Message.php) + +Line 46. + +*** + +### dispatchEvent + +Process an inbound event for this message. + +Updates state/reason, fires any registered event listeners, and +auto-resolves the message when it reaches a terminal state. + +Accepts both `state` and `message_state` keys on the event +payload — production RELAY emits `message_state` while older +fixtures use `state`. + +#### Signature + +```php +public function dispatchEvent(SignalWire\Relay\Event $event): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/Message.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Message.php) + +Line 74. + +*** + +### getBody + +#### Signature + +```php +public function getBody(): ?string +``` + +#### Returns + +`?string` + +#### Source + +[`SignalWire/Relay/Message.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Message.php) + +Line 205. + +*** + +### getContext + +#### Signature + +```php +public function getContext(): ?string +``` + +#### Returns + +`?string` + +#### Source + +[`SignalWire/Relay/Message.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Message.php) + +Line 185. + +*** + +### getDirection + +#### Signature + +```php +public function getDirection(): ?string +``` + +#### Returns + +`?string` + +#### Source + +[`SignalWire/Relay/Message.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Message.php) + +Line 190. + +*** + +### getFromNumber + +#### Signature + +```php +public function getFromNumber(): ?string +``` + +#### Returns + +`?string` + +#### Source + +[`SignalWire/Relay/Message.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Message.php) + +Line 195. + +*** + +### getMedia + +#### Signature + +```php +public function getMedia(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Message.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Message.php) + +Line 210. + +*** + +### getMessageId + +#### Signature + +```php +public function getMessageId(): ?string +``` + +#### Returns + +`?string` + +#### Source + +[`SignalWire/Relay/Message.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Message.php) + +Line 180. + +*** + +### getReason + +#### Signature + +```php +public function getReason(): ?string +``` + +#### Returns + +`?string` + +#### Source + +[`SignalWire/Relay/Message.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Message.php) + +Line 240. + +*** + +### getResult + +#### Signature + +```php +public function getResult() +``` + +#### Returns + +`mixed` + +#### Source + +[`SignalWire/Relay/Message.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Message.php) + +Line 246. + +*** + +### getState + +#### Signature + +```php +public function getState(): ?string +``` + +#### Returns + +`?string` + +#### Source + +[`SignalWire/Relay/Message.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Message.php) + +Line 220. + +*** + +### getTags + +#### Signature + +```php +public function getTags(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Message.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Message.php) + +Line 215. + +*** + +### getToNumber + +#### Signature + +```php +public function getToNumber(): ?string +``` + +#### Returns + +`?string` + +#### Source + +[`SignalWire/Relay/Message.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Message.php) + +Line 200. + +*** + +### handleEvent + +Alias for `dispatchEvent` so the Client's event router (which + +calls `handleEvent` for symmetry with Action) doesn't need a +special case. Both names route the same way. + +#### Signature + +```php +public function handleEvent(SignalWire\Relay\Event $event): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/Message.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Message.php) + +Line 112. + +*** + +### isDone + +#### Signature + +```php +public function isDone(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Relay/Message.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Message.php) + +Line 175. + +*** + +### messageState + +The current delivery state as a typed \{@see MessageState\}, or null when + +the raw \{@see getState()\} string is outside the known closed set +(a forward-compatible server value). + +Offered ALONGSIDE the bare-string \{@see getState()\} accessor for parity +with the Python reference: `getState()` stays the canonical string; +`messageState()` is the typed view for autocompletion + an exhaustive +`match` + `->isTerminal()`. PORT\_ADDITION. + +#### Signature + +```php +public function messageState(): ?SignalWire\Relay\MessageState +``` + +#### Returns + +`?SignalWire\Relay\MessageState` + +#### Source + +[`SignalWire/Relay/Message.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Message.php) + +Line 235. + +*** + +### on + +Register a listener that fires on every state-change event. + +#### Signature + +```php +public function on(callable $cb): SignalWire\Relay\Message +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Relay\Message` + +#### Source + +[`SignalWire/Relay/Message.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Message.php) + +Line 149. + +*** + +### onCompleted + +Register a callback to fire when the message reaches a terminal state. + +If the message is already complete the callback fires immediately. + +#### Signature + +```php +public function onCompleted(callable $cb): SignalWire\Relay\Message +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Relay\Message` + +#### Source + +[`SignalWire/Relay/Message.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Message.php) + +Line 160. + +*** + +### resolve + +Mark this message as completed. + +The optional $result is stored and the onCompleted callback fires +exactly once. + +#### Signature + +```php +public function resolve($result = NULL): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/Message.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Message.php) + +Line 263. + +*** + +### wait + +Block until the message completes or $timeout seconds elapse. + +The caller is expected to feed events into dispatchEvent() from +another mechanism (e.g. the client's read loop). This method +simply spins until completion. + +#### Signature + +```php +public function wait(int $timeout = 30) +``` + +#### Parameters + + + +#### Returns + +`mixed` — The resolved result, or null on timeout. + +#### Source + +[`SignalWire/Relay/Message.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Message.php) + +Line 130. + +## Source + +[`SignalWire/Relay/Message.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Message.php) + +Line 17. diff --git a/fern/products/sdk-reference/php/relay/relay/pay-action/index.mdx b/fern/products/sdk-reference/php/relay/relay/pay-action/index.mdx new file mode 100644 index 0000000000..5e57464d30 --- /dev/null +++ b/fern/products/sdk-reference/php/relay/relay/pay-action/index.mdx @@ -0,0 +1,404 @@ +--- +slug: "/reference/php/relay/relay/pay-action" +title: "PayAction" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Relay\\PayAction" + parent: "relay.Relay" + module: "relay.Relay" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php" +--- +# `PayAction` + +Handle for calling.pay operations. + +## Signature + +```php +class PayAction extends Action +``` + +## Inheritance + +**Extends:** [SignalWire\Relay\Action](/docs/sdk-reference/reference/php/relay/relay/action) + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct( + string $controlId, + string $callId, + string $nodeId, + object $client +) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 33. + +*** + +### executeSubcommand + +Send a sub-command RPC through the client. + +The payload always includes control\_id, call\_id, and node\_id so +the server knows which action instance to target. + +#### Signature + +```php +public function executeSubcommand(string $method, array $extraParams = array ( +)): void +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 211. + +*** + +### getCallId + +#### Signature + +```php +public function getCallId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 107. + +*** + +### getControlId + +#### Signature + +```php +public function getControlId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 102. + +*** + +### getEvents + +#### Signature + +```php +public function getEvents(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 97. + +*** + +### getNodeId + +#### Signature + +```php +public function getNodeId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 112. + +*** + +### getPayload + +#### Signature + +```php +public function getPayload(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 91. + +*** + +### getResult + +#### Signature + +```php +public function getResult() +``` + +#### Returns + +`mixed` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 81. + +*** + +### getState + +#### Signature + +```php +public function getState(): ?string +``` + +#### Returns + +`?string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 86. + +*** + +### getStopMethod + +#### Signature + +```php +public function getStopMethod(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 456. + +*** + +### handleEvent + +Append an incoming event and update local state / payload. + +#### Signature + +```php +public function handleEvent(SignalWire\Relay\Event $event): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 144. + +*** + +### isDone + +#### Signature + +```php +public function isDone(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 75. + +*** + +### onCompleted + +Register a callback to fire when the action completes. + +If the action is already done the callback fires immediately. + +#### Signature + +```php +public function onCompleted(callable $cb): SignalWire\Relay\Action +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Relay\Action` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 126. + +*** + +### resolve + +Mark this action as completed. + +The optional $result is stored and the onCompleted callback is +fired exactly once. + +#### Signature + +```php +public function resolve($result = NULL): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 167. + +*** + +### stop + +Stop the running action by sending its stop sub-command. + +#### Signature + +```php +public function stop(): void +``` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 186. + +*** + +### wait + +Block until the action completes or $timeout seconds elapse. + +Each iteration calls $client->readOnce() so the event-loop +keeps processing inbound frames. + +Returns the resolving Event when the action completes (mirrors +Python's `return self._wait_event.wait()`). Returns null on +timeout. The numeric `$timeout` is interpreted as seconds and +accepts integers or floats. + +#### Signature + +```php +public function wait(int|float $timeout = 30): ?SignalWire\Relay\Event +``` + +#### Parameters + + + +#### Returns + +`?SignalWire\Relay\Event` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 58. + +## Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 454. diff --git a/fern/products/sdk-reference/php/relay/relay/play-action/index.mdx b/fern/products/sdk-reference/php/relay/relay/play-action/index.mdx new file mode 100644 index 0000000000..7540057296 --- /dev/null +++ b/fern/products/sdk-reference/php/relay/relay/play-action/index.mdx @@ -0,0 +1,460 @@ +--- +slug: "/reference/php/relay/relay/play-action" +title: "PlayAction" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Relay\\PlayAction" + parent: "relay.Relay" + module: "relay.Relay" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php" +--- +# `PlayAction` + +Handle for calling.play operations. + +## Signature + +```php +class PlayAction extends Action +``` + +## Inheritance + +**Extends:** [SignalWire\Relay\Action](/docs/sdk-reference/reference/php/relay/relay/action) + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct( + string $controlId, + string $callId, + string $nodeId, + object $client +) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 33. + +*** + +### executeSubcommand + +Send a sub-command RPC through the client. + +The payload always includes control\_id, call\_id, and node\_id so +the server knows which action instance to target. + +#### Signature + +```php +public function executeSubcommand(string $method, array $extraParams = array ( +)): void +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 211. + +*** + +### getCallId + +#### Signature + +```php +public function getCallId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 107. + +*** + +### getControlId + +#### Signature + +```php +public function getControlId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 102. + +*** + +### getEvents + +#### Signature + +```php +public function getEvents(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 97. + +*** + +### getNodeId + +#### Signature + +```php +public function getNodeId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 112. + +*** + +### getPayload + +#### Signature + +```php +public function getPayload(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 91. + +*** + +### getResult + +#### Signature + +```php +public function getResult() +``` + +#### Returns + +`mixed` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 81. + +*** + +### getState + +#### Signature + +```php +public function getState(): ?string +``` + +#### Returns + +`?string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 86. + +*** + +### getStopMethod + +#### Signature + +```php +public function getStopMethod(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 251. + +*** + +### handleEvent + +Append an incoming event and update local state / payload. + +#### Signature + +```php +public function handleEvent(SignalWire\Relay\Event $event): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 144. + +*** + +### isDone + +#### Signature + +```php +public function isDone(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 75. + +*** + +### onCompleted + +Register a callback to fire when the action completes. + +If the action is already done the callback fires immediately. + +#### Signature + +```php +public function onCompleted(callable $cb): SignalWire\Relay\Action +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Relay\Action` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 126. + +*** + +### pause + +#### Signature + +```php +public function pause(): void +``` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 256. + +*** + +### resolve + +Mark this action as completed. + +The optional $result is stored and the onCompleted callback is +fired exactly once. + +#### Signature + +```php +public function resolve($result = NULL): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 167. + +*** + +### resume + +#### Signature + +```php +public function resume(): void +``` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 261. + +*** + +### stop + +Stop the running action by sending its stop sub-command. + +#### Signature + +```php +public function stop(): void +``` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 186. + +*** + +### volume + +Adjust playback volume. + +#### Signature + +```php +public function volume(float $db): void +``` + +#### Parameters + + + Volume adjustment in dB (e.g. -4.0 or 6.0). + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 271. + +*** + +### wait + +Block until the action completes or $timeout seconds elapse. + +Each iteration calls $client->readOnce() so the event-loop +keeps processing inbound frames. + +Returns the resolving Event when the action completes (mirrors +Python's `return self._wait_event.wait()`). Returns null on +timeout. The numeric `$timeout` is interpreted as seconds and +accepts integers or floats. + +#### Signature + +```php +public function wait(int|float $timeout = 30): ?SignalWire\Relay\Event +``` + +#### Parameters + + + +#### Returns + +`?SignalWire\Relay\Event` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 58. + +## Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 249. diff --git a/fern/products/sdk-reference/php/relay/relay/record-action/index.mdx b/fern/products/sdk-reference/php/relay/relay/record-action/index.mdx new file mode 100644 index 0000000000..ea1019f54c --- /dev/null +++ b/fern/products/sdk-reference/php/relay/relay/record-action/index.mdx @@ -0,0 +1,508 @@ +--- +slug: "/reference/php/relay/relay/record-action" +title: "RecordAction" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Relay\\RecordAction" + parent: "relay.Relay" + module: "relay.Relay" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php" +--- +# `RecordAction` + +Handle for calling.record operations. + +## Signature + +```php +class RecordAction extends Action +``` + +## Inheritance + +**Extends:** [SignalWire\Relay\Action](/docs/sdk-reference/reference/php/relay/relay/action) + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct( + string $controlId, + string $callId, + string $nodeId, + object $client +) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 33. + +*** + +### executeSubcommand + +Send a sub-command RPC through the client. + +The payload always includes control\_id, call\_id, and node\_id so +the server knows which action instance to target. + +#### Signature + +```php +public function executeSubcommand(string $method, array $extraParams = array ( +)): void +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 211. + +*** + +### getCallId + +#### Signature + +```php +public function getCallId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 107. + +*** + +### getControlId + +#### Signature + +```php +public function getControlId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 102. + +*** + +### getDuration + +#### Signature + +```php +public function getDuration(): ?float +``` + +#### Returns + +`?float` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 308. + +*** + +### getEvents + +#### Signature + +```php +public function getEvents(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 97. + +*** + +### getNodeId + +#### Signature + +```php +public function getNodeId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 112. + +*** + +### getPayload + +#### Signature + +```php +public function getPayload(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 91. + +*** + +### getResult + +#### Signature + +```php +public function getResult() +``` + +#### Returns + +`mixed` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 81. + +*** + +### getSize + +#### Signature + +```php +public function getSize(): ?int +``` + +#### Returns + +`?int` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 314. + +*** + +### getState + +#### Signature + +```php +public function getState(): ?string +``` + +#### Returns + +`?string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 86. + +*** + +### getStopMethod + +#### Signature + +```php +public function getStopMethod(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 284. + +*** + +### getUrl + +#### Signature + +```php +public function getUrl(): ?string +``` + +#### Returns + +`?string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 303. + +*** + +### handleEvent + +Append an incoming event and update local state / payload. + +#### Signature + +```php +public function handleEvent(SignalWire\Relay\Event $event): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 144. + +*** + +### isDone + +#### Signature + +```php +public function isDone(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 75. + +*** + +### onCompleted + +Register a callback to fire when the action completes. + +If the action is already done the callback fires immediately. + +#### Signature + +```php +public function onCompleted(callable $cb): SignalWire\Relay\Action +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Relay\Action` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 126. + +*** + +### pause + +#### Signature + +```php +public function pause(array $extra = array ( +)): void +``` + +#### Parameters + + + Additional params to merge onto the wire (e.g. `['behavior' => 'continuous']`). + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 293. + +*** + +### resolve + +Mark this action as completed. + +The optional $result is stored and the onCompleted callback is +fired exactly once. + +#### Signature + +```php +public function resolve($result = NULL): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 167. + +*** + +### resume + +#### Signature + +```php +public function resume(): void +``` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 298. + +*** + +### stop + +Stop the running action by sending its stop sub-command. + +#### Signature + +```php +public function stop(): void +``` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 186. + +*** + +### wait + +Block until the action completes or $timeout seconds elapse. + +Each iteration calls $client->readOnce() so the event-loop +keeps processing inbound frames. + +Returns the resolving Event when the action completes (mirrors +Python's `return self._wait_event.wait()`). Returns null on +timeout. The numeric `$timeout` is interpreted as seconds and +accepts integers or floats. + +#### Signature + +```php +public function wait(int|float $timeout = 30): ?SignalWire\Relay\Event +``` + +#### Parameters + + + +#### Returns + +`?SignalWire\Relay\Event` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 58. + +## Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 282. diff --git a/fern/products/sdk-reference/php/relay/relay/relay-error/index.mdx b/fern/products/sdk-reference/php/relay/relay/relay-error/index.mdx new file mode 100644 index 0000000000..5a33c7b779 --- /dev/null +++ b/fern/products/sdk-reference/php/relay/relay/relay-error/index.mdx @@ -0,0 +1,43 @@ +--- +slug: "/reference/php/relay/relay/relay-error" +title: "RelayError" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Relay\\RelayError" + parent: "relay.Relay" + module: "relay.Relay" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/RelayError.php" +--- +# `RelayError` + +Exception type for RELAY-protocol-level failures. + +Mirrors signalwire.relay.client.RelayError in the Python SDK: raised +when a JSON-RPC response carries an `error` field, when a dial +resolves to a failure outcome, or when an SDK-side timeout fires. + +The numeric code field carries the JSON-RPC error code where +applicable (e.g. -32601 method-not-found from the server) or an +SDK-defined sentinel (e.g. 408 for client-side timeout). + +## Signature + +```php +class RelayError extends RuntimeException implements Stringable, Throwable +``` + +## Inheritance + +**Extends:** `RuntimeException` + +**Implements:** `Stringable`, `Throwable` + +## Source + +[`SignalWire/Relay/RelayError.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/RelayError.php) + +Line 18. diff --git a/fern/products/sdk-reference/php/relay/relay/stream-action/index.mdx b/fern/products/sdk-reference/php/relay/relay/stream-action/index.mdx new file mode 100644 index 0000000000..33a35234f2 --- /dev/null +++ b/fern/products/sdk-reference/php/relay/relay/stream-action/index.mdx @@ -0,0 +1,404 @@ +--- +slug: "/reference/php/relay/relay/stream-action" +title: "StreamAction" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Relay\\StreamAction" + parent: "relay.Relay" + module: "relay.Relay" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php" +--- +# `StreamAction` + +Handle for calling.stream operations. + +## Signature + +```php +class StreamAction extends Action +``` + +## Inheritance + +**Extends:** [SignalWire\Relay\Action](/docs/sdk-reference/reference/php/relay/relay/action) + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct( + string $controlId, + string $callId, + string $nodeId, + object $client +) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 33. + +*** + +### executeSubcommand + +Send a sub-command RPC through the client. + +The payload always includes control\_id, call\_id, and node\_id so +the server knows which action instance to target. + +#### Signature + +```php +public function executeSubcommand(string $method, array $extraParams = array ( +)): void +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 211. + +*** + +### getCallId + +#### Signature + +```php +public function getCallId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 107. + +*** + +### getControlId + +#### Signature + +```php +public function getControlId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 102. + +*** + +### getEvents + +#### Signature + +```php +public function getEvents(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 97. + +*** + +### getNodeId + +#### Signature + +```php +public function getNodeId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 112. + +*** + +### getPayload + +#### Signature + +```php +public function getPayload(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 91. + +*** + +### getResult + +#### Signature + +```php +public function getResult() +``` + +#### Returns + +`mixed` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 81. + +*** + +### getState + +#### Signature + +```php +public function getState(): ?string +``` + +#### Returns + +`?string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 86. + +*** + +### getStopMethod + +#### Signature + +```php +public function getStopMethod(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 445. + +*** + +### handleEvent + +Append an incoming event and update local state / payload. + +#### Signature + +```php +public function handleEvent(SignalWire\Relay\Event $event): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 144. + +*** + +### isDone + +#### Signature + +```php +public function isDone(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 75. + +*** + +### onCompleted + +Register a callback to fire when the action completes. + +If the action is already done the callback fires immediately. + +#### Signature + +```php +public function onCompleted(callable $cb): SignalWire\Relay\Action +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Relay\Action` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 126. + +*** + +### resolve + +Mark this action as completed. + +The optional $result is stored and the onCompleted callback is +fired exactly once. + +#### Signature + +```php +public function resolve($result = NULL): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 167. + +*** + +### stop + +Stop the running action by sending its stop sub-command. + +#### Signature + +```php +public function stop(): void +``` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 186. + +*** + +### wait + +Block until the action completes or $timeout seconds elapse. + +Each iteration calls $client->readOnce() so the event-loop +keeps processing inbound frames. + +Returns the resolving Event when the action completes (mirrors +Python's `return self._wait_event.wait()`). Returns null on +timeout. The numeric `$timeout` is interpreted as seconds and +accepts integers or floats. + +#### Signature + +```php +public function wait(int|float $timeout = 30): ?SignalWire\Relay\Event +``` + +#### Parameters + + + +#### Returns + +`?SignalWire\Relay\Event` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 58. + +## Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 443. diff --git a/fern/products/sdk-reference/php/relay/relay/tap-action/index.mdx b/fern/products/sdk-reference/php/relay/relay/tap-action/index.mdx new file mode 100644 index 0000000000..bf29feaa59 --- /dev/null +++ b/fern/products/sdk-reference/php/relay/relay/tap-action/index.mdx @@ -0,0 +1,404 @@ +--- +slug: "/reference/php/relay/relay/tap-action" +title: "TapAction" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Relay\\TapAction" + parent: "relay.Relay" + module: "relay.Relay" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php" +--- +# `TapAction` + +Handle for calling.tap operations. + +## Signature + +```php +class TapAction extends Action +``` + +## Inheritance + +**Extends:** [SignalWire\Relay\Action](/docs/sdk-reference/reference/php/relay/relay/action) + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct( + string $controlId, + string $callId, + string $nodeId, + object $client +) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 33. + +*** + +### executeSubcommand + +Send a sub-command RPC through the client. + +The payload always includes control\_id, call\_id, and node\_id so +the server knows which action instance to target. + +#### Signature + +```php +public function executeSubcommand(string $method, array $extraParams = array ( +)): void +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 211. + +*** + +### getCallId + +#### Signature + +```php +public function getCallId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 107. + +*** + +### getControlId + +#### Signature + +```php +public function getControlId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 102. + +*** + +### getEvents + +#### Signature + +```php +public function getEvents(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 97. + +*** + +### getNodeId + +#### Signature + +```php +public function getNodeId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 112. + +*** + +### getPayload + +#### Signature + +```php +public function getPayload(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 91. + +*** + +### getResult + +#### Signature + +```php +public function getResult() +``` + +#### Returns + +`mixed` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 81. + +*** + +### getState + +#### Signature + +```php +public function getState(): ?string +``` + +#### Returns + +`?string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 86. + +*** + +### getStopMethod + +#### Signature + +```php +public function getStopMethod(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 434. + +*** + +### handleEvent + +Append an incoming event and update local state / payload. + +#### Signature + +```php +public function handleEvent(SignalWire\Relay\Event $event): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 144. + +*** + +### isDone + +#### Signature + +```php +public function isDone(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 75. + +*** + +### onCompleted + +Register a callback to fire when the action completes. + +If the action is already done the callback fires immediately. + +#### Signature + +```php +public function onCompleted(callable $cb): SignalWire\Relay\Action +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Relay\Action` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 126. + +*** + +### resolve + +Mark this action as completed. + +The optional $result is stored and the onCompleted callback is +fired exactly once. + +#### Signature + +```php +public function resolve($result = NULL): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 167. + +*** + +### stop + +Stop the running action by sending its stop sub-command. + +#### Signature + +```php +public function stop(): void +``` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 186. + +*** + +### wait + +Block until the action completes or $timeout seconds elapse. + +Each iteration calls $client->readOnce() so the event-loop +keeps processing inbound frames. + +Returns the resolving Event when the action completes (mirrors +Python's `return self._wait_event.wait()`). Returns null on +timeout. The numeric `$timeout` is interpreted as seconds and +accepts integers or floats. + +#### Signature + +```php +public function wait(int|float $timeout = 30): ?SignalWire\Relay\Event +``` + +#### Parameters + + + +#### Returns + +`?SignalWire\Relay\Event` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 58. + +## Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 432. diff --git a/fern/products/sdk-reference/php/relay/relay/transcribe-action/index.mdx b/fern/products/sdk-reference/php/relay/relay/transcribe-action/index.mdx new file mode 100644 index 0000000000..a357ae8183 --- /dev/null +++ b/fern/products/sdk-reference/php/relay/relay/transcribe-action/index.mdx @@ -0,0 +1,404 @@ +--- +slug: "/reference/php/relay/relay/transcribe-action" +title: "TranscribeAction" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Relay\\TranscribeAction" + parent: "relay.Relay" + module: "relay.Relay" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php" +--- +# `TranscribeAction` + +Handle for calling.transcribe operations. + +## Signature + +```php +class TranscribeAction extends Action +``` + +## Inheritance + +**Extends:** [SignalWire\Relay\Action](/docs/sdk-reference/reference/php/relay/relay/action) + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct( + string $controlId, + string $callId, + string $nodeId, + object $client +) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 33. + +*** + +### executeSubcommand + +Send a sub-command RPC through the client. + +The payload always includes control\_id, call\_id, and node\_id so +the server knows which action instance to target. + +#### Signature + +```php +public function executeSubcommand(string $method, array $extraParams = array ( +)): void +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 211. + +*** + +### getCallId + +#### Signature + +```php +public function getCallId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 107. + +*** + +### getControlId + +#### Signature + +```php +public function getControlId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 102. + +*** + +### getEvents + +#### Signature + +```php +public function getEvents(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 97. + +*** + +### getNodeId + +#### Signature + +```php +public function getNodeId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 112. + +*** + +### getPayload + +#### Signature + +```php +public function getPayload(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 91. + +*** + +### getResult + +#### Signature + +```php +public function getResult() +``` + +#### Returns + +`mixed` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 81. + +*** + +### getState + +#### Signature + +```php +public function getState(): ?string +``` + +#### Returns + +`?string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 86. + +*** + +### getStopMethod + +#### Signature + +```php +public function getStopMethod(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 467. + +*** + +### handleEvent + +Append an incoming event and update local state / payload. + +#### Signature + +```php +public function handleEvent(SignalWire\Relay\Event $event): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 144. + +*** + +### isDone + +#### Signature + +```php +public function isDone(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 75. + +*** + +### onCompleted + +Register a callback to fire when the action completes. + +If the action is already done the callback fires immediately. + +#### Signature + +```php +public function onCompleted(callable $cb): SignalWire\Relay\Action +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Relay\Action` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 126. + +*** + +### resolve + +Mark this action as completed. + +The optional $result is stored and the onCompleted callback is +fired exactly once. + +#### Signature + +```php +public function resolve($result = NULL): void +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 167. + +*** + +### stop + +Stop the running action by sending its stop sub-command. + +#### Signature + +```php +public function stop(): void +``` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 186. + +*** + +### wait + +Block until the action completes or $timeout seconds elapse. + +Each iteration calls $client->readOnce() so the event-loop +keeps processing inbound frames. + +Returns the resolving Event when the action completes (mirrors +Python's `return self._wait_event.wait()`). Returns null on +timeout. The numeric `$timeout` is interpreted as seconds and +accepts integers or floats. + +#### Signature + +```php +public function wait(int|float $timeout = 30): ?SignalWire\Relay\Event +``` + +#### Parameters + + + +#### Returns + +`?SignalWire\Relay\Event` + +#### Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 58. + +## Source + +[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) + +Line 465. diff --git a/fern/products/sdk-reference/php/relay/relay/web-socket/index.mdx b/fern/products/sdk-reference/php/relay/relay/web-socket/index.mdx new file mode 100644 index 0000000000..6b7e986667 --- /dev/null +++ b/fern/products/sdk-reference/php/relay/relay/web-socket/index.mdx @@ -0,0 +1,240 @@ +--- +slug: "/reference/php/relay/relay/web-socket" +title: "WebSocket" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\Relay\\WebSocket" + parent: "relay.Relay" + module: "relay.Relay" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/WebSocket.php" +--- +# `WebSocket` + +RELAY WebSocket transport. + +This is a thin adapter over the maintained \{@link \WebSocket\Client\} +(phrity/websocket) library. It deliberately keeps the same small public +surface the rest of the SDK depends on — connect / sendText / receive / +close / isConnected, plus the \{@see self::CLOSE\_FRAME\} sentinel — so that +\{@see Client\} (and its test subclasses overriding createSocket()) need no +changes. The previous implementation hand-rolled RFC 6455 framing on raw +PHP streams; that responsibility now belongs to phrity/websocket. + +Why phrity/websocket: + +- It performs a _real_, verified TLS handshake for `wss://` URIs. A + private CA (e.g. the porting-sdk test CA) is trusted by passing its + `cafile` through the stream \{@see \Phrity\Net\Context\} — peer + verification stays ON (no allow\_self\_signed, no verify\_peer=false). +- It owns frame masking/decoding, the upgrade handshake, the + Sec-WebSocket-Accept check, ping/pong, and close framing. + +Transport contract preserved for \{@see Client\}: + +- `receive()` returns the decoded text payload of the next data frame, + \{@see self::CLOSE\_FRAME\} when the peer closed, or `null` on read + timeout (socket still healthy). Ping/pong are consumed internally. +- Outbound application messages are always text frames (JSON-RPC). + +## Signature + +```php +class WebSocket +``` + +## Constants + + + Special marker the read loop uses to surface a remote close. + + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(?string $caFile = NULL) +``` + +#### Parameters + + + +#### Source + +[`SignalWire/Relay/WebSocket.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/WebSocket.php) + +Line 58. + +*** + +### close + +Send a close frame and tear down the socket. Best-effort. + +#### Signature + +```php +public function close(int $code = 1000, string $reason = ''): void +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/Relay/WebSocket.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/WebSocket.php) + +Line 153. + +*** + +### connect + +Open a WebSocket connection to the given URI. + +#### Signature + +```php +public function connect( + string $uri, + array $headers = array ( +), + float $timeout = 10.0, + ?string $caFile = NULL +): void +``` + +#### Parameters + + + ws:// or wss:// URI. + + + + Additional handshake headers. + + + + TCP-connect / read timeout (seconds). + + + + Optional CA bundle (PEM) for wss:// peer verification; overrides the value passed to the constructor. + + +#### Throws + +- `\InvalidArgumentException` — on an invalid/unsupported URI. +- `\RuntimeException` — on connection or handshake failure. + +#### Source + +[`SignalWire/Relay/WebSocket.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/WebSocket.php) + +Line 75. + +*** + +### isConnected + +#### Signature + +```php +public function isConnected(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Relay/WebSocket.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/WebSocket.php) + +Line 233. + +*** + +### receive + +Read one complete inbound data frame, blocking up to $timeout seconds. + +Returns: + +- the decoded payload string for a text/binary frame +- \{@see self::CLOSE\_FRAME\} for a close (or peer EOF) +- null on read timeout (socket still healthy) + +Ping frames are answered with a pong and skipped; pong frames are +consumed; the next non-control frame (within the deadline) is returned. + +#### Signature + +```php +public function receive(float $timeout = 5.0): ?string +``` + +#### Parameters + + + +#### Returns + +`?string` + +#### Throws + +- `\RuntimeException` — on a fatal socket error. + +#### Source + +[`SignalWire/Relay/WebSocket.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/WebSocket.php) + +Line 185. + +*** + +### sendText + +Send a UTF-8 text frame (the only application frame type RELAY uses). + +#### Signature + +```php +public function sendText(string $payload): void +``` + +#### Parameters + + + +#### Throws + +- `\RuntimeException` — if the socket is closed or the write fails. + +#### Source + +[`SignalWire/Relay/WebSocket.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/WebSocket.php) + +Line 137. + +## Source + +[`SignalWire/Relay/WebSocket.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/WebSocket.php) + +Line 43. diff --git a/fern/products/sdk-reference/php/rest/index.mdx b/fern/products/sdk-reference/php/rest/index.mdx new file mode 100644 index 0000000000..73bdf96a2c --- /dev/null +++ b/fern/products/sdk-reference/php/rest/index.mdx @@ -0,0 +1,18 @@ +--- +slug: "/reference/php/rest" +title: "REST" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "module" + language: "php" + qualified_name: "SignalWire\\REST" +--- +# `REST` + +## Signature + +```php +namespace SignalWire\REST +``` diff --git a/fern/products/sdk-reference/php/rest/index__2.mdx b/fern/products/sdk-reference/php/rest/index__2.mdx new file mode 100644 index 0000000000..b66353d9ab --- /dev/null +++ b/fern/products/sdk-reference/php/rest/index__2.mdx @@ -0,0 +1,20 @@ +--- +slug: "/reference/php/rest/index__2" +title: "rest" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "module" + language: "php" + qualified_name: "rest" +--- +# `rest` + +## Modules + + + + + + diff --git a/fern/products/sdk-reference/php/rest/namespaces/index.mdx b/fern/products/sdk-reference/php/rest/namespaces/index.mdx new file mode 100644 index 0000000000..ab3ed956c3 --- /dev/null +++ b/fern/products/sdk-reference/php/rest/namespaces/index.mdx @@ -0,0 +1,20 @@ +--- +slug: "/reference/php/rest/namespaces" +title: "Namespaces" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "module" + language: "php" + qualified_name: "rest.Namespaces" + parent: "rest" + module: "rest" +--- +# `Namespaces` + +## Modules + + + + diff --git a/fern/products/sdk-reference/php/rest/namespaces/namespaces/addresses/index.mdx b/fern/products/sdk-reference/php/rest/namespaces/namespaces/addresses/index.mdx new file mode 100644 index 0000000000..8c7375566e --- /dev/null +++ b/fern/products/sdk-reference/php/rest/namespaces/namespaces/addresses/index.mdx @@ -0,0 +1,175 @@ +--- +slug: "/reference/php/rest/namespaces/namespaces/addresses" +title: "Addresses" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\Addresses" + parent: "SignalWire\\REST\\Namespaces" + module: "rest.Namespaces.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Addresses.php" +--- +# `Addresses` + +Addresses namespace — list / create / get / delete (no update). + +## Signature + +```php +class Addresses +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http) +``` + +#### Parameters + + + +#### Source + +[`SignalWire/REST/Namespaces/Addresses.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Addresses.php) + +Line 17. + +*** + +### create + +#### Signature + +```php +public function create(array $body): array +``` + +#### Parameters + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Addresses.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Addresses.php) + +Line 34. + +*** + +### delete + +#### Signature + +```php +public function delete(string $addressId): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Addresses.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Addresses.php) + +Line 46. + +*** + +### get + +#### Signature + +```php +public function get(string $addressId): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Addresses.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Addresses.php) + +Line 40. + +*** + +### getBasePath + +#### Signature + +```php +public function getBasePath(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/Namespaces/Addresses.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Addresses.php) + +Line 22. + +*** + +### list + +#### Signature + +```php +public function list(array $params = array ( +)): array +``` + +#### Parameters + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Addresses.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Addresses.php) + +Line 28. + +## Source + +[`SignalWire/REST/Namespaces/Addresses.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Addresses.php) + +Line 12. diff --git a/fern/products/sdk-reference/php/rest/namespaces/namespaces/calling/index.mdx b/fern/products/sdk-reference/php/rest/namespaces/namespaces/calling/index.mdx new file mode 100644 index 0000000000..3da7b26962 --- /dev/null +++ b/fern/products/sdk-reference/php/rest/namespaces/namespaces/calling/index.mdx @@ -0,0 +1,1303 @@ +--- +slug: "/reference/php/rest/namespaces/namespaces/calling" +title: "Calling" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\Calling" + parent: "SignalWire\\REST\\Namespaces" + module: "rest.Namespaces.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php" +--- +# `Calling` + +Calling API namespace. + +Provides 37 call-control command methods that each POST to +/api/calling/calls with a JSON body containing the command name, +an optional call ID, and parameters. + +## Signature + +```php +class Calling +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $client, string $projectId) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 23. + +*** + +### aiHold + +#### Signature + +```php +public function aiHold(string $callId, array $params = array ( +)): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 285. + +*** + +### aiMessage + +#### Signature + +```php +public function aiMessage(string $callId, array $params = array ( +)): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 279. + +*** + +### aiStop + +#### Signature + +```php +public function aiStop(string $callId, array $params = array ( +)): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 297. + +*** + +### aiUnhold + +#### Signature + +```php +public function aiUnhold(string $callId, array $params = array ( +)): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 291. + +*** + +### collect + +#### Signature + +```php +public function collect(string $callId, array $params = array ( +)): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 177. + +*** + +### collectStartInputTimers + +#### Signature + +```php +public function collectStartInputTimers( + string $callId, + array $params = array ( +) +): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 189. + +*** + +### collectStop + +#### Signature + +```php +public function collectStop(string $callId, array $params = array ( +)): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 183. + +*** + +### denoise + +#### Signature + +```php +public function denoise(string $callId, array $params = array ( +)): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 247. + +*** + +### denoiseStop + +#### Signature + +```php +public function denoiseStop(string $callId, array $params = array ( +)): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 253. + +*** + +### detect + +#### Signature + +```php +public function detect(string $callId, array $params = array ( +)): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 199. + +*** + +### detectStop + +#### Signature + +```php +public function detectStop(string $callId, array $params = array ( +)): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 205. + +*** + +### dial + +#### Signature + +```php +public function dial(array $params = array ( +)): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 75. + +*** + +### disconnect + +#### Signature + +```php +public function disconnect(string $callId, array $params = array ( +)): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 105. + +*** + +### end + +#### Signature + +```php +public function end(string $callId, array $params = array ( +)): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 93. + +*** + +### getBasePath + +#### Signature + +```php +public function getBasePath(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 39. + +*** + +### getClient + +#### Signature + +```php +public function getClient(): SignalWire\REST\HttpClient +``` + +#### Returns + +`SignalWire\REST\HttpClient` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 29. + +*** + +### getProjectId + +#### Signature + +```php +public function getProjectId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 34. + +*** + +### liveTranscribe + +#### Signature + +```php +public function liveTranscribe(string $callId, array $params = array ( +)): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 307. + +*** + +### liveTranslate + +#### Signature + +```php +public function liveTranslate(string $callId, array $params = array ( +)): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 313. + +*** + +### play + +#### Signature + +```php +public function play(string $callId, array $params = array ( +)): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 115. + +*** + +### playPause + +#### Signature + +```php +public function playPause(string $callId, array $params = array ( +)): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 121. + +*** + +### playResume + +#### Signature + +```php +public function playResume(string $callId, array $params = array ( +)): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 127. + +*** + +### playStop + +#### Signature + +```php +public function playStop(string $callId, array $params = array ( +)): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 133. + +*** + +### playVolume + +#### Signature + +```php +public function playVolume(string $callId, array $params = array ( +)): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 139. + +*** + +### receiveFaxStop + +#### Signature + +```php +public function receiveFaxStop(string $callId, array $params = array ( +)): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 329. + +*** + +### record + +#### Signature + +```php +public function record(string $callId, array $params = array ( +)): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 149. + +*** + +### recordPause + +#### Signature + +```php +public function recordPause(string $callId, array $params = array ( +)): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 155. + +*** + +### recordResume + +#### Signature + +```php +public function recordResume(string $callId, array $params = array ( +)): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 161. + +*** + +### recordStop + +#### Signature + +```php +public function recordStop(string $callId, array $params = array ( +)): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 167. + +*** + +### refer + +#### Signature + +```php +public function refer(string $callId, array $params = array ( +)): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 339. + +*** + +### sendFaxStop + +#### Signature + +```php +public function sendFaxStop(string $callId, array $params = array ( +)): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 323. + +*** + +### stream + +#### Signature + +```php +public function stream(string $callId, array $params = array ( +)): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 231. + +*** + +### streamStop + +#### Signature + +```php +public function streamStop(string $callId, array $params = array ( +)): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 237. + +*** + +### tap + +#### Signature + +```php +public function tap(string $callId, array $params = array ( +)): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 215. + +*** + +### tapStop + +#### Signature + +```php +public function tapStop(string $callId, array $params = array ( +)): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 221. + +*** + +### transcribe + +#### Signature + +```php +public function transcribe(string $callId, array $params = array ( +)): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 263. + +*** + +### transcribeStop + +#### Signature + +```php +public function transcribeStop(string $callId, array $params = array ( +)): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 269. + +*** + +### transfer + +#### Signature + +```php +public function transfer(string $callId, array $params = array ( +)): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 99. + +*** + +### update + +Send the bare `update` command (no call\_id at body root; `id` is + +passed inside `params`). Mirrors Python's +`CallingNamespace.update(**params)`. + +#### Signature + +```php +public function update(array $params = array ( +)): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 87. + +*** + +### userEvent + +#### Signature + +```php +public function userEvent(string $callId, array $params = array ( +)): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 349. + +## Source + +[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) + +Line 16. diff --git a/fern/products/sdk-reference/php/rest/namespaces/namespaces/compat-accounts/index.mdx b/fern/products/sdk-reference/php/rest/namespaces/namespaces/compat-accounts/index.mdx new file mode 100644 index 0000000000..9c41d2c532 --- /dev/null +++ b/fern/products/sdk-reference/php/rest/namespaces/namespaces/compat-accounts/index.mdx @@ -0,0 +1,176 @@ +--- +slug: "/reference/php/rest/namespaces/namespaces/compat-accounts" +title: "CompatAccounts" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\CompatAccounts" + parent: "SignalWire\\REST\\Namespaces" + module: "rest.Namespaces.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatAccounts.php" +--- +# `CompatAccounts` + +Compat account / sub-project management. + +Mirrors Python `CompatAccounts`: the only resource that lives under +`/api/laml/2010-04-01/Accounts` (rather than `.../Accounts/{Sid}/...`). + +## Signature + +```php +class CompatAccounts +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http) +``` + +#### Parameters + + + +#### Source + +[`SignalWire/REST/Namespaces/CompatAccounts.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatAccounts.php) + +Line 20. + +*** + +### create + +#### Signature + +```php +public function create(array $body): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/CompatAccounts.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatAccounts.php) + +Line 43. + +*** + +### get + +#### Signature + +```php +public function get(string $sid): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/CompatAccounts.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatAccounts.php) + +Line 49. + +*** + +### getBasePath + +#### Signature + +```php +public function getBasePath(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/Namespaces/CompatAccounts.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatAccounts.php) + +Line 25. + +*** + +### list + +#### Signature + +```php +public function list(array $params = array ( +)): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/CompatAccounts.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatAccounts.php) + +Line 34. + +*** + +### update + +#### Signature + +```php +public function update(string $sid, array $body): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/CompatAccounts.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatAccounts.php) + +Line 58. + +## Source + +[`SignalWire/REST/Namespaces/CompatAccounts.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatAccounts.php) + +Line 15. diff --git a/fern/products/sdk-reference/php/rest/namespaces/namespaces/compat-conferences/index.mdx b/fern/products/sdk-reference/php/rest/namespaces/namespaces/compat-conferences/index.mdx new file mode 100644 index 0000000000..330af7f714 --- /dev/null +++ b/fern/products/sdk-reference/php/rest/namespaces/namespaces/compat-conferences/index.mdx @@ -0,0 +1,460 @@ +--- +slug: "/reference/php/rest/namespaces/namespaces/compat-conferences" +title: "CompatConferences" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\CompatConferences" + parent: "SignalWire\\REST\\Namespaces" + module: "rest.Namespaces.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatConferences.php" +--- +# `CompatConferences` + +Compat conference management with participants, recordings, and streams. + +## Signature + +```php +class CompatConferences +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http, string $basePath) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/REST/Namespaces/CompatConferences.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatConferences.php) + +Line 17. + +*** + +### deleteRecording + +#### Signature + +```php +public function deleteRecording(string $conferenceSid, string $recordingSid): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/CompatConferences.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatConferences.php) + +Line 115. + +*** + +### get + +#### Signature + +```php +public function get(string $sid): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/CompatConferences.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatConferences.php) + +Line 35. + +*** + +### getBasePath + +#### Signature + +```php +public function getBasePath(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/Namespaces/CompatConferences.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatConferences.php) + +Line 23. + +*** + +### getParticipant + +#### Signature + +```php +public function getParticipant(string $conferenceSid, string $callSid): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/CompatConferences.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatConferences.php) + +Line 60. + +*** + +### getRecording + +#### Signature + +```php +public function getRecording(string $conferenceSid, string $recordingSid): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/CompatConferences.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatConferences.php) + +Line 98. + +*** + +### list + +#### Signature + +```php +public function list(array $params = array ( +)): array +``` + +#### Parameters + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/CompatConferences.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatConferences.php) + +Line 29. + +*** + +### listParticipants + +#### Signature + +```php +public function listParticipants( + string $conferenceSid, + array $params = array ( +) +): array +``` + +#### Parameters + + + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/CompatConferences.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatConferences.php) + +Line 51. + +*** + +### listRecordings + +#### Signature + +```php +public function listRecordings(string $conferenceSid, array $params = array ( +)): array +``` + +#### Parameters + + + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/CompatConferences.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatConferences.php) + +Line 89. + +*** + +### removeParticipant + +#### Signature + +```php +public function removeParticipant(string $conferenceSid, string $callSid): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/CompatConferences.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatConferences.php) + +Line 77. + +*** + +### startStream + +#### Signature + +```php +public function startStream(string $conferenceSid, array $body): array +``` + +#### Parameters + + + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/CompatConferences.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatConferences.php) + +Line 127. + +*** + +### stopStream + +#### Signature + +```php +public function stopStream( + string $conferenceSid, + string $streamSid, + array $body +): array +``` + +#### Parameters + + + + + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/CompatConferences.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatConferences.php) + +Line 136. + +*** + +### update + +#### Signature + +```php +public function update(string $sid, array $body): array +``` + +#### Parameters + + + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/CompatConferences.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatConferences.php) + +Line 41. + +*** + +### updateParticipant + +#### Signature + +```php +public function updateParticipant( + string $conferenceSid, + string $callSid, + array $body +): array +``` + +#### Parameters + + + + + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/CompatConferences.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatConferences.php) + +Line 68. + +*** + +### updateRecording + +#### Signature + +```php +public function updateRecording( + string $conferenceSid, + string $recordingSid, + array $body +): array +``` + +#### Parameters + + + + + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/CompatConferences.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatConferences.php) + +Line 106. + +## Source + +[`SignalWire/REST/Namespaces/CompatConferences.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatConferences.php) + +Line 12. diff --git a/fern/products/sdk-reference/php/rest/namespaces/namespaces/compat-phone-numbers/index.mdx b/fern/products/sdk-reference/php/rest/namespaces/namespaces/compat-phone-numbers/index.mdx new file mode 100644 index 0000000000..4c87c1c5a0 --- /dev/null +++ b/fern/products/sdk-reference/php/rest/namespaces/namespaces/compat-phone-numbers/index.mdx @@ -0,0 +1,376 @@ +--- +slug: "/reference/php/rest/namespaces/namespaces/compat-phone-numbers" +title: "CompatPhoneNumbers" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\CompatPhoneNumbers" + parent: "SignalWire\\REST\\Namespaces" + module: "rest.Namespaces.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatPhoneNumbers.php" +--- +# `CompatPhoneNumbers` + +Compat IncomingPhoneNumbers + AvailablePhoneNumbers + ImportedPhoneNumbers + +management. + +The base path is the IncomingPhoneNumbers collection; the available / +imported variants live at sibling paths derived from the base. + +## Signature + +```php +class CompatPhoneNumbers +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http, string $basePath) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/REST/Namespaces/CompatPhoneNumbers.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatPhoneNumbers.php) + +Line 23. + +*** + +### delete + +#### Signature + +```php +public function delete(string $sid): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/CompatPhoneNumbers.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatPhoneNumbers.php) + +Line 73. + +*** + +### get + +#### Signature + +```php +public function get(string $sid): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/CompatPhoneNumbers.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatPhoneNumbers.php) + +Line 61. + +*** + +### getAvailableBase + +#### Signature + +```php +public function getAvailableBase(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/Namespaces/CompatPhoneNumbers.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatPhoneNumbers.php) + +Line 44. + +*** + +### getBasePath + +#### Signature + +```php +public function getBasePath(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/Namespaces/CompatPhoneNumbers.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatPhoneNumbers.php) + +Line 39. + +*** + +### getImportedBase + +#### Signature + +```php +public function getImportedBase(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/Namespaces/CompatPhoneNumbers.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatPhoneNumbers.php) + +Line 49. + +*** + +### importNumber + +#### Signature + +```php +public function importNumber(array $body): array +``` + +#### Parameters + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/CompatPhoneNumbers.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatPhoneNumbers.php) + +Line 85. + +*** + +### list + +#### Signature + +```php +public function list(array $params = array ( +)): array +``` + +#### Parameters + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/CompatPhoneNumbers.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatPhoneNumbers.php) + +Line 55. + +*** + +### listAvailableCountries + +#### Signature + +```php +public function listAvailableCountries(array $params = array ( +)): array +``` + +#### Parameters + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/CompatPhoneNumbers.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatPhoneNumbers.php) + +Line 91. + +*** + +### purchase + +#### Signature + +```php +public function purchase(array $body): array +``` + +#### Parameters + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/CompatPhoneNumbers.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatPhoneNumbers.php) + +Line 79. + +*** + +### searchLocal + +#### Signature + +```php +public function searchLocal(string $country, array $params = array ( +)): array +``` + +#### Parameters + + + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/CompatPhoneNumbers.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatPhoneNumbers.php) + +Line 97. + +*** + +### searchTollFree + +#### Signature + +```php +public function searchTollFree(string $country, array $params = array ( +)): array +``` + +#### Parameters + + + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/CompatPhoneNumbers.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatPhoneNumbers.php) + +Line 103. + +*** + +### update + +#### Signature + +```php +public function update(string $sid, array $body): array +``` + +#### Parameters + + + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/CompatPhoneNumbers.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatPhoneNumbers.php) + +Line 67. + +## Source + +[`SignalWire/REST/Namespaces/CompatPhoneNumbers.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatPhoneNumbers.php) + +Line 16. diff --git a/fern/products/sdk-reference/php/rest/namespaces/namespaces/compat-recordings/index.mdx b/fern/products/sdk-reference/php/rest/namespaces/namespaces/compat-recordings/index.mdx new file mode 100644 index 0000000000..d954171cc6 --- /dev/null +++ b/fern/products/sdk-reference/php/rest/namespaces/namespaces/compat-recordings/index.mdx @@ -0,0 +1,154 @@ +--- +slug: "/reference/php/rest/namespaces/namespaces/compat-recordings" +title: "CompatRecordings" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\CompatRecordings" + parent: "SignalWire\\REST\\Namespaces" + module: "rest.Namespaces.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatRecordings.php" +--- +# `CompatRecordings` + +Compat recording management. + +Account-scoped recordings — distinct from per-call recordings on +`CompatCalls`. Surface is list / get / delete only. + +## Signature + +```php +class CompatRecordings +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http, string $basePath) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/REST/Namespaces/CompatRecordings.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatRecordings.php) + +Line 20. + +*** + +### delete + +#### Signature + +```php +public function delete(string $sid): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/CompatRecordings.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatRecordings.php) + +Line 44. + +*** + +### get + +#### Signature + +```php +public function get(string $sid): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/CompatRecordings.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatRecordings.php) + +Line 38. + +*** + +### getBasePath + +#### Signature + +```php +public function getBasePath(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/Namespaces/CompatRecordings.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatRecordings.php) + +Line 26. + +*** + +### list + +#### Signature + +```php +public function list(array $params = array ( +)): array +``` + +#### Parameters + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/CompatRecordings.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatRecordings.php) + +Line 32. + +## Source + +[`SignalWire/REST/Namespaces/CompatRecordings.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatRecordings.php) + +Line 15. diff --git a/fern/products/sdk-reference/php/rest/namespaces/namespaces/compat-tokens/index.mdx b/fern/products/sdk-reference/php/rest/namespaces/namespaces/compat-tokens/index.mdx new file mode 100644 index 0000000000..6d14ec0d64 --- /dev/null +++ b/fern/products/sdk-reference/php/rest/namespaces/namespaces/compat-tokens/index.mdx @@ -0,0 +1,151 @@ +--- +slug: "/reference/php/rest/namespaces/namespaces/compat-tokens" +title: "CompatTokens" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\CompatTokens" + parent: "SignalWire\\REST\\Namespaces" + module: "rest.Namespaces.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatTokens.php" +--- +# `CompatTokens` + +Compat API token management. + +Surface is create / update (PATCH) / delete only. + +## Signature + +```php +class CompatTokens +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http, string $basePath) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/REST/Namespaces/CompatTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatTokens.php) + +Line 19. + +*** + +### create + +#### Signature + +```php +public function create(array $body): array +``` + +#### Parameters + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/CompatTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatTokens.php) + +Line 31. + +*** + +### delete + +#### Signature + +```php +public function delete(string $tokenId): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/CompatTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatTokens.php) + +Line 43. + +*** + +### getBasePath + +#### Signature + +```php +public function getBasePath(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/Namespaces/CompatTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatTokens.php) + +Line 25. + +*** + +### update + +#### Signature + +```php +public function update(string $tokenId, array $body): array +``` + +#### Parameters + + + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/CompatTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatTokens.php) + +Line 37. + +## Source + +[`SignalWire/REST/Namespaces/CompatTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatTokens.php) + +Line 14. diff --git a/fern/products/sdk-reference/php/rest/namespaces/namespaces/compat-transcriptions/index.mdx b/fern/products/sdk-reference/php/rest/namespaces/namespaces/compat-transcriptions/index.mdx new file mode 100644 index 0000000000..54691a0f9e --- /dev/null +++ b/fern/products/sdk-reference/php/rest/namespaces/namespaces/compat-transcriptions/index.mdx @@ -0,0 +1,153 @@ +--- +slug: "/reference/php/rest/namespaces/namespaces/compat-transcriptions" +title: "CompatTranscriptions" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\CompatTranscriptions" + parent: "SignalWire\\REST\\Namespaces" + module: "rest.Namespaces.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatTranscriptions.php" +--- +# `CompatTranscriptions` + +Compat transcription management. + +Account-scoped transcriptions. Surface is list / get / delete only. + +## Signature + +```php +class CompatTranscriptions +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http, string $basePath) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/REST/Namespaces/CompatTranscriptions.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatTranscriptions.php) + +Line 19. + +*** + +### delete + +#### Signature + +```php +public function delete(string $sid): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/CompatTranscriptions.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatTranscriptions.php) + +Line 43. + +*** + +### get + +#### Signature + +```php +public function get(string $sid): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/CompatTranscriptions.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatTranscriptions.php) + +Line 37. + +*** + +### getBasePath + +#### Signature + +```php +public function getBasePath(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/Namespaces/CompatTranscriptions.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatTranscriptions.php) + +Line 25. + +*** + +### list + +#### Signature + +```php +public function list(array $params = array ( +)): array +``` + +#### Parameters + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/CompatTranscriptions.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatTranscriptions.php) + +Line 31. + +## Source + +[`SignalWire/REST/Namespaces/CompatTranscriptions.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatTranscriptions.php) + +Line 14. diff --git a/fern/products/sdk-reference/php/rest/namespaces/namespaces/compat/index.mdx b/fern/products/sdk-reference/php/rest/namespaces/namespaces/compat/index.mdx new file mode 100644 index 0000000000..bca7d7a10c --- /dev/null +++ b/fern/products/sdk-reference/php/rest/namespaces/namespaces/compat/index.mdx @@ -0,0 +1,357 @@ +--- +slug: "/reference/php/rest/namespaces/namespaces/compat" +title: "Compat" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\Compat" + parent: "SignalWire\\REST\\Namespaces" + module: "rest.Namespaces.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Compat.php" +--- +# `Compat` + +Compatibility (Twilio-compatible LAML) API namespace. + +Mounted under `/api/laml/2010-04-01/Accounts/{AccountSid}` and exposes +the LAML-flavoured REST surface (Accounts, Calls, Messages, Faxes, +Conferences, IncomingPhoneNumbers + AvailablePhoneNumbers, Applications, +LamlBins, Queues, Recordings, Transcriptions, tokens) as object-style +sub-resources to mirror the Python `CompatNamespace` class. + +## Signature + +```php +class Compat +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http, string $accountSid) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/REST/Namespaces/Compat.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Compat.php) + +Line 38. + +*** + +### accounts + +#### Signature + +```php +public function accounts(): SignalWire\REST\Namespaces\CompatAccounts +``` + +#### Returns + +`SignalWire\REST\Namespaces\CompatAccounts` + +#### Source + +[`SignalWire/REST/Namespaces/Compat.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Compat.php) + +Line 73. + +*** + +### applications + +#### Signature + +```php +public function applications(): SignalWire\REST\Namespaces\CompatApplications +``` + +#### Returns + +`SignalWire\REST\Namespaces\CompatApplications` + +#### Source + +[`SignalWire/REST/Namespaces/Compat.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Compat.php) + +Line 103. + +*** + +### calls + +#### Signature + +```php +public function calls(): SignalWire\REST\Namespaces\CompatCalls +``` + +#### Returns + +`SignalWire\REST\Namespaces\CompatCalls` + +#### Source + +[`SignalWire/REST/Namespaces/Compat.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Compat.php) + +Line 78. + +*** + +### conferences + +#### Signature + +```php +public function conferences(): SignalWire\REST\Namespaces\CompatConferences +``` + +#### Returns + +`SignalWire\REST\Namespaces\CompatConferences` + +#### Source + +[`SignalWire/REST/Namespaces/Compat.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Compat.php) + +Line 93. + +*** + +### faxes + +#### Signature + +```php +public function faxes(): SignalWire\REST\Namespaces\CompatFaxes +``` + +#### Returns + +`SignalWire\REST\Namespaces\CompatFaxes` + +#### Source + +[`SignalWire/REST/Namespaces/Compat.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Compat.php) + +Line 88. + +*** + +### getAccountBase + +#### Signature + +```php +public function getAccountBase(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/Namespaces/Compat.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Compat.php) + +Line 63. + +*** + +### getAccountSid + +#### Signature + +```php +public function getAccountSid(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/Namespaces/Compat.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Compat.php) + +Line 58. + +*** + +### getHttp + +#### Signature + +```php +public function getHttp(): SignalWire\REST\HttpClient +``` + +#### Returns + +`SignalWire\REST\HttpClient` + +#### Source + +[`SignalWire/REST/Namespaces/Compat.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Compat.php) + +Line 68. + +*** + +### lamlBins + +#### Signature + +```php +public function lamlBins(): SignalWire\REST\Namespaces\CompatLamlBins +``` + +#### Returns + +`SignalWire\REST\Namespaces\CompatLamlBins` + +#### Source + +[`SignalWire/REST/Namespaces/Compat.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Compat.php) + +Line 108. + +*** + +### messages + +#### Signature + +```php +public function messages(): SignalWire\REST\Namespaces\CompatMessages +``` + +#### Returns + +`SignalWire\REST\Namespaces\CompatMessages` + +#### Source + +[`SignalWire/REST/Namespaces/Compat.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Compat.php) + +Line 83. + +*** + +### phoneNumbers + +#### Signature + +```php +public function phoneNumbers(): SignalWire\REST\Namespaces\CompatPhoneNumbers +``` + +#### Returns + +`SignalWire\REST\Namespaces\CompatPhoneNumbers` + +#### Source + +[`SignalWire/REST/Namespaces/Compat.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Compat.php) + +Line 98. + +*** + +### queues + +#### Signature + +```php +public function queues(): SignalWire\REST\Namespaces\CompatQueues +``` + +#### Returns + +`SignalWire\REST\Namespaces\CompatQueues` + +#### Source + +[`SignalWire/REST/Namespaces/Compat.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Compat.php) + +Line 113. + +*** + +### recordings + +#### Signature + +```php +public function recordings(): SignalWire\REST\Namespaces\CompatRecordings +``` + +#### Returns + +`SignalWire\REST\Namespaces\CompatRecordings` + +#### Source + +[`SignalWire/REST/Namespaces/Compat.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Compat.php) + +Line 118. + +*** + +### tokens + +#### Signature + +```php +public function tokens(): SignalWire\REST\Namespaces\CompatTokens +``` + +#### Returns + +`SignalWire\REST\Namespaces\CompatTokens` + +#### Source + +[`SignalWire/REST/Namespaces/Compat.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Compat.php) + +Line 128. + +*** + +### transcriptions + +#### Signature + +```php +public function transcriptions(): SignalWire\REST\Namespaces\CompatTranscriptions +``` + +#### Returns + +`SignalWire\REST\Namespaces\CompatTranscriptions` + +#### Source + +[`SignalWire/REST/Namespaces/Compat.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Compat.php) + +Line 123. + +## Source + +[`SignalWire/REST/Namespaces/Compat.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Compat.php) + +Line 19. diff --git a/fern/products/sdk-reference/php/rest/namespaces/namespaces/conference-logs/index.mdx b/fern/products/sdk-reference/php/rest/namespaces/namespaces/conference-logs/index.mdx new file mode 100644 index 0000000000..0d8936d0a3 --- /dev/null +++ b/fern/products/sdk-reference/php/rest/namespaces/namespaces/conference-logs/index.mdx @@ -0,0 +1,103 @@ +--- +slug: "/reference/php/rest/namespaces/namespaces/conference-logs" +title: "ConferenceLogs" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\ConferenceLogs" + parent: "SignalWire\\REST\\Namespaces" + module: "rest.Namespaces.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ConferenceLogs.php" +--- +# `ConferenceLogs` + +Conference log queries — list-only resource. + +## Signature + +```php +class ConferenceLogs +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http, string $basePath) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/REST/Namespaces/ConferenceLogs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ConferenceLogs.php) + +Line 17. + +*** + +### getBasePath + +#### Signature + +```php +public function getBasePath(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/Namespaces/ConferenceLogs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ConferenceLogs.php) + +Line 23. + +*** + +### list + +#### Signature + +```php +public function list(array $params = array ( +)): array +``` + +#### Parameters + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/ConferenceLogs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ConferenceLogs.php) + +Line 29. + +## Source + +[`SignalWire/REST/Namespaces/ConferenceLogs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ConferenceLogs.php) + +Line 12. diff --git a/fern/products/sdk-reference/php/rest/namespaces/namespaces/datasphere/index.mdx b/fern/products/sdk-reference/php/rest/namespaces/namespaces/datasphere/index.mdx new file mode 100644 index 0000000000..66525a4518 --- /dev/null +++ b/fern/products/sdk-reference/php/rest/namespaces/namespaces/datasphere/index.mdx @@ -0,0 +1,89 @@ +--- +slug: "/reference/php/rest/namespaces/namespaces/datasphere" +title: "Datasphere" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\Datasphere" + parent: "SignalWire\\REST\\Namespaces" + module: "rest.Namespaces.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Datasphere.php" +--- +# `Datasphere` + +Datasphere API namespace — exposes the documents sub-resource. + +## Signature + +```php +class Datasphere +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http) +``` + +#### Parameters + + + +#### Source + +[`SignalWire/REST/Namespaces/Datasphere.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Datasphere.php) + +Line 17. + +*** + +### documents + +#### Signature + +```php +public function documents(): SignalWire\REST\Namespaces\DatasphereDocuments +``` + +#### Returns + +`SignalWire\REST\Namespaces\DatasphereDocuments` + +#### Source + +[`SignalWire/REST/Namespaces/Datasphere.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Datasphere.php) + +Line 23. + +*** + +### getHttp + +#### Signature + +```php +public function getHttp(): SignalWire\REST\HttpClient +``` + +#### Returns + +`SignalWire\REST\HttpClient` + +#### Source + +[`SignalWire/REST/Namespaces/Datasphere.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Datasphere.php) + +Line 28. + +## Source + +[`SignalWire/REST/Namespaces/Datasphere.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Datasphere.php) + +Line 12. diff --git a/fern/products/sdk-reference/php/rest/namespaces/namespaces/fabric-addresses/index.mdx b/fern/products/sdk-reference/php/rest/namespaces/namespaces/fabric-addresses/index.mdx new file mode 100644 index 0000000000..4283aa1fa1 --- /dev/null +++ b/fern/products/sdk-reference/php/rest/namespaces/namespaces/fabric-addresses/index.mdx @@ -0,0 +1,127 @@ +--- +slug: "/reference/php/rest/namespaces/namespaces/fabric-addresses" +title: "FabricAddresses" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\FabricAddresses" + parent: "SignalWire\\REST\\Namespaces" + module: "rest.Namespaces.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricAddresses.php" +--- +# `FabricAddresses` + +Read-only fabric addresses (`/api/fabric/addresses`). + +## Signature + +```php +class FabricAddresses +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http, string $basePath) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/REST/Namespaces/FabricAddresses.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricAddresses.php) + +Line 17. + +*** + +### get + +#### Signature + +```php +public function get(string $addressId): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/FabricAddresses.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricAddresses.php) + +Line 35. + +*** + +### getBasePath + +#### Signature + +```php +public function getBasePath(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/Namespaces/FabricAddresses.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricAddresses.php) + +Line 23. + +*** + +### list + +#### Signature + +```php +public function list(array $params = array ( +)): array +``` + +#### Parameters + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/FabricAddresses.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricAddresses.php) + +Line 29. + +## Source + +[`SignalWire/REST/Namespaces/FabricAddresses.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricAddresses.php) + +Line 12. diff --git a/fern/products/sdk-reference/php/rest/namespaces/namespaces/fabric-generic-resources/index.mdx b/fern/products/sdk-reference/php/rest/namespaces/namespaces/fabric-generic-resources/index.mdx new file mode 100644 index 0000000000..3b371de4b0 --- /dev/null +++ b/fern/products/sdk-reference/php/rest/namespaces/namespaces/fabric-generic-resources/index.mdx @@ -0,0 +1,217 @@ +--- +slug: "/reference/php/rest/namespaces/namespaces/fabric-generic-resources" +title: "FabricGenericResources" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\FabricGenericResources" + parent: "SignalWire\\REST\\Namespaces" + module: "rest.Namespaces.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricGenericResources.php" +--- +# `FabricGenericResources` + +Generic operations across all fabric resource types + +(`/api/fabric/resources`). + +Mirrors Python `signalwire.rest.namespaces.fabric.GenericResources`. + +## Signature + +```php +class FabricGenericResources +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http, string $basePath) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/REST/Namespaces/FabricGenericResources.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricGenericResources.php) + +Line 20. + +*** + +### assignDomainApplication + +Bind a domain application to a fabric resource. + +#### Signature + +```php +public function assignDomainApplication(string $resourceId, array $body): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/FabricGenericResources.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricGenericResources.php) + +Line 64. + +*** + +### delete + +#### Signature + +```php +public function delete(string $resourceId): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/FabricGenericResources.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricGenericResources.php) + +Line 44. + +*** + +### get + +#### Signature + +```php +public function get(string $resourceId): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/FabricGenericResources.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricGenericResources.php) + +Line 38. + +*** + +### getBasePath + +#### Signature + +```php +public function getBasePath(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/Namespaces/FabricGenericResources.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricGenericResources.php) + +Line 26. + +*** + +### list + +#### Signature + +```php +public function list(array $params = array ( +)): array +``` + +#### Parameters + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/FabricGenericResources.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricGenericResources.php) + +Line 32. + +*** + +### listAddresses + +#### Signature + +```php +public function listAddresses(string $resourceId, array $params = array ( +)): array +``` + +#### Parameters + + + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/FabricGenericResources.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricGenericResources.php) + +Line 50. + +## Source + +[`SignalWire/REST/Namespaces/FabricGenericResources.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricGenericResources.php) + +Line 15. diff --git a/fern/products/sdk-reference/php/rest/namespaces/namespaces/fabric-tokens/index.mdx b/fern/products/sdk-reference/php/rest/namespaces/namespaces/fabric-tokens/index.mdx new file mode 100644 index 0000000000..b2d561a10c --- /dev/null +++ b/fern/products/sdk-reference/php/rest/namespaces/namespaces/fabric-tokens/index.mdx @@ -0,0 +1,210 @@ +--- +slug: "/reference/php/rest/namespaces/namespaces/fabric-tokens" +title: "FabricTokens" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\FabricTokens" + parent: "SignalWire\\REST\\Namespaces" + module: "rest.Namespaces.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricTokens.php" +--- +# `FabricTokens` + +Subscriber, guest, invite, and embed token creation under + +`/api/fabric/...`. + +Note: token endpoints sit under different sub-paths inside the Fabric +mount point (`subscribers/tokens`, `subscriber/invites`, `guests`, +`embeds`) — singular vs plural is API-specific so each helper has the +exact path the API expects. + +## Signature + +```php +class FabricTokens +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http, string $basePath) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/REST/Namespaces/FabricTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricTokens.php) + +Line 23. + +*** + +### createEmbedToken + +#### Signature + +```php +public function createEmbedToken(array $body): array +``` + +#### Parameters + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/FabricTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricTokens.php) + +Line 65. + +*** + +### createGuestToken + +#### Signature + +```php +public function createGuestToken(array $body): array +``` + +#### Parameters + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/FabricTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricTokens.php) + +Line 59. + +*** + +### createInviteToken + +Note the singular `subscriber` here — the invite endpoint uses + +`/api/fabric/subscriber/invites`, not `subscribers`. + +#### Signature + +```php +public function createInviteToken(array $body): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/FabricTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricTokens.php) + +Line 53. + +*** + +### createSubscriberToken + +#### Signature + +```php +public function createSubscriberToken(array $body): array +``` + +#### Parameters + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/FabricTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricTokens.php) + +Line 35. + +*** + +### getBasePath + +#### Signature + +```php +public function getBasePath(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/Namespaces/FabricTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricTokens.php) + +Line 29. + +*** + +### refreshSubscriberToken + +#### Signature + +```php +public function refreshSubscriberToken(array $body): array +``` + +#### Parameters + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/FabricTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricTokens.php) + +Line 41. + +## Source + +[`SignalWire/REST/Namespaces/FabricTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricTokens.php) + +Line 18. diff --git a/fern/products/sdk-reference/php/rest/namespaces/namespaces/fabric/index.mdx b/fern/products/sdk-reference/php/rest/namespaces/namespaces/fabric/index.mdx new file mode 100644 index 0000000000..3eace98e36 --- /dev/null +++ b/fern/products/sdk-reference/php/rest/namespaces/namespaces/fabric/index.mdx @@ -0,0 +1,535 @@ +--- +slug: "/reference/php/rest/namespaces/namespaces/fabric" +title: "Fabric" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\Fabric" + parent: "SignalWire\\REST\\Namespaces" + module: "rest.Namespaces.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php" +--- +# `Fabric` + +Fabric API namespace. + +Mirrors Python `signalwire.rest.namespaces.fabric.FabricNamespace`: +groups all Fabric sub-resources (subscribers, SIP endpoints, call flows, +SWML scripts, conference rooms, AI agents, etc.) under a single object. + +Sub-resources fall into a few buckets: + +- PUT-update CRUD: `swml_scripts`, `relay_applications`, + `call_flows`, `conference_rooms`, `freeswitch_connectors`, + `subscribers`, `sip_endpoints`, `cxml_scripts`, + `cxml_applications`. +- PATCH-update CRUD: `swml_webhooks`, `ai_agents`, `sip_gateways`, + `cxml_webhooks`. +- Special: `resources` (generic `/api/fabric/resources`), + `addresses` (read-only `/api/fabric/addresses`), `tokens` + (subscriber/guest/embed token creation). + +## Signature + +```php +class Fabric +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $client) +``` + +#### Parameters + + + +#### Source + +[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) + +Line 65. + +*** + +### addresses + +Read-only fabric addresses (`/api/fabric/addresses`). + +#### Signature + +```php +public function addresses(): SignalWire\REST\Namespaces\FabricAddresses +``` + +#### Returns + +`SignalWire\REST\Namespaces\FabricAddresses` + +#### Source + +[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) + +Line 250. + +*** + +### aiAgents + +#### Signature + +```php +public function aiAgents(): SignalWire\REST\CrudResource +``` + +#### Returns + +`SignalWire\REST\CrudResource` + +#### Source + +[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) + +Line 159. + +*** + +### callFlows + +#### Signature + +```php +public function callFlows(): SignalWire\REST\Namespaces\FabricCallFlows +``` + +#### Returns + +`SignalWire\REST\Namespaces\FabricCallFlows` + +#### Source + +[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) + +Line 95. + +*** + +### callQueues + +#### Signature + +```php +public function callQueues(): SignalWire\REST\CrudResource +``` + +#### Returns + +`SignalWire\REST\CrudResource` + +#### Source + +[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) + +Line 209. + +*** + +### conferenceRooms + +#### Signature + +```php +public function conferenceRooms(): SignalWire\REST\Namespaces\FabricConferenceRooms +``` + +#### Returns + +`SignalWire\REST\Namespaces\FabricConferenceRooms` + +#### Source + +[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) + +Line 119. + +*** + +### conversations + +#### Signature + +```php +public function conversations(): SignalWire\REST\CrudResource +``` + +#### Returns + +`SignalWire\REST\CrudResource` + +#### Source + +[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) + +Line 185. + +*** + +### cxmlApplications + +#### Signature + +```php +public function cxmlApplications(): SignalWire\REST\Namespaces\FabricCxmlApplications +``` + +#### Returns + +`SignalWire\REST\Namespaces\FabricCxmlApplications` + +#### Source + +[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) + +Line 143. + +*** + +### cxmlScripts + +#### Signature + +```php +public function cxmlScripts(): SignalWire\REST\CrudResource +``` + +#### Returns + +`SignalWire\REST\CrudResource` + +#### Source + +[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) + +Line 135. + +*** + +### cxmlWebhooks + +#### Signature + +```php +public function cxmlWebhooks(): SignalWire\REST\CrudResource +``` + +#### Returns + +`SignalWire\REST\CrudResource` + +#### Source + +[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) + +Line 175. + +*** + +### dialPlans + +#### Signature + +```php +public function dialPlans(): SignalWire\REST\CrudResource +``` + +#### Returns + +`SignalWire\REST\CrudResource` + +#### Source + +[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) + +Line 193. + +*** + +### freeclimbApps + +#### Signature + +```php +public function freeclimbApps(): SignalWire\REST\CrudResource +``` + +#### Returns + +`SignalWire\REST\CrudResource` + +#### Source + +[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) + +Line 201. + +*** + +### freeswitchConnectors + +#### Signature + +```php +public function freeswitchConnectors(): SignalWire\REST\CrudResource +``` + +#### Returns + +`SignalWire\REST\CrudResource` + +#### Source + +[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) + +Line 127. + +*** + +### getClient + +#### Signature + +```php +public function getClient(): SignalWire\REST\HttpClient +``` + +#### Returns + +`SignalWire\REST\HttpClient` + +#### Source + +[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) + +Line 70. + +*** + +### phoneNumbers + +#### Signature + +```php +public function phoneNumbers(): SignalWire\REST\CrudResource +``` + +#### Returns + +`SignalWire\REST\CrudResource` + +#### Source + +[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) + +Line 225. + +*** + +### relayApplications + +#### Signature + +```php +public function relayApplications(): SignalWire\REST\CrudResource +``` + +#### Returns + +`SignalWire\REST\CrudResource` + +#### Source + +[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) + +Line 111. + +*** + +### resources + +Generic operations across all fabric resource types + +(`/api/fabric/resources`). + +#### Signature + +```php +public function resources(): SignalWire\REST\Namespaces\FabricGenericResources +``` + +#### Returns + +`SignalWire\REST\Namespaces\FabricGenericResources` + +#### Source + +[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) + +Line 239. + +*** + +### sipEndpoints + +#### Signature + +```php +public function sipEndpoints(): SignalWire\REST\CrudResource +``` + +#### Returns + +`SignalWire\REST\CrudResource` + +#### Source + +[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) + +Line 87. + +*** + +### sipGateways + +#### Signature + +```php +public function sipGateways(): SignalWire\REST\CrudResource +``` + +#### Returns + +`SignalWire\REST\CrudResource` + +#### Source + +[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) + +Line 167. + +*** + +### sipProfiles + +#### Signature + +```php +public function sipProfiles(): SignalWire\REST\CrudResource +``` + +#### Returns + +`SignalWire\REST\CrudResource` + +#### Source + +[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) + +Line 217. + +*** + +### subscribers + +#### Signature + +```php +public function subscribers(): SignalWire\REST\Namespaces\FabricSubscribers +``` + +#### Returns + +`SignalWire\REST\Namespaces\FabricSubscribers` + +#### Source + +[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) + +Line 79. + +*** + +### swmlScripts + +#### Signature + +```php +public function swmlScripts(): SignalWire\REST\CrudResource +``` + +#### Returns + +`SignalWire\REST\CrudResource` + +#### Source + +[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) + +Line 103. + +*** + +### swmlWebhooks + +#### Signature + +```php +public function swmlWebhooks(): SignalWire\REST\CrudResource +``` + +#### Returns + +`SignalWire\REST\CrudResource` + +#### Source + +[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) + +Line 151. + +*** + +### tokens + +Subscriber / guest / invite / embed token creation + +(`/api/fabric/...`). + +#### Signature + +```php +public function tokens(): SignalWire\REST\Namespaces\FabricTokens +``` + +#### Returns + +`SignalWire\REST\Namespaces\FabricTokens` + +#### Source + +[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) + +Line 262. + +## Source + +[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) + +Line 28. diff --git a/fern/products/sdk-reference/php/rest/namespaces/namespaces/fax-logs/index.mdx b/fern/products/sdk-reference/php/rest/namespaces/namespaces/fax-logs/index.mdx new file mode 100644 index 0000000000..e217684b66 --- /dev/null +++ b/fern/products/sdk-reference/php/rest/namespaces/namespaces/fax-logs/index.mdx @@ -0,0 +1,127 @@ +--- +slug: "/reference/php/rest/namespaces/namespaces/fax-logs" +title: "FaxLogs" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\FaxLogs" + parent: "SignalWire\\REST\\Namespaces" + module: "rest.Namespaces.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FaxLogs.php" +--- +# `FaxLogs` + +Fax log queries — list + get by id. + +## Signature + +```php +class FaxLogs +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http, string $basePath) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/REST/Namespaces/FaxLogs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FaxLogs.php) + +Line 17. + +*** + +### get + +#### Signature + +```php +public function get(string $logId): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/FaxLogs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FaxLogs.php) + +Line 35. + +*** + +### getBasePath + +#### Signature + +```php +public function getBasePath(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/Namespaces/FaxLogs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FaxLogs.php) + +Line 23. + +*** + +### list + +#### Signature + +```php +public function list(array $params = array ( +)): array +``` + +#### Parameters + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/FaxLogs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FaxLogs.php) + +Line 29. + +## Source + +[`SignalWire/REST/Namespaces/FaxLogs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FaxLogs.php) + +Line 12. diff --git a/fern/products/sdk-reference/php/rest/namespaces/namespaces/imported-numbers/index.mdx b/fern/products/sdk-reference/php/rest/namespaces/namespaces/imported-numbers/index.mdx new file mode 100644 index 0000000000..2a1458425f --- /dev/null +++ b/fern/products/sdk-reference/php/rest/namespaces/namespaces/imported-numbers/index.mdx @@ -0,0 +1,97 @@ +--- +slug: "/reference/php/rest/namespaces/namespaces/imported-numbers" +title: "ImportedNumbers" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\ImportedNumbers" + parent: "SignalWire\\REST\\Namespaces" + module: "rest.Namespaces.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ImportedNumbers.php" +--- +# `ImportedNumbers` + +Imported phone numbers — create only (registers an externally-hosted + +number). + +## Signature + +```php +class ImportedNumbers +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http) +``` + +#### Parameters + + + +#### Source + +[`SignalWire/REST/Namespaces/ImportedNumbers.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ImportedNumbers.php) + +Line 18. + +*** + +### create + +#### Signature + +```php +public function create(array $body): array +``` + +#### Parameters + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/ImportedNumbers.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ImportedNumbers.php) + +Line 29. + +*** + +### getBasePath + +#### Signature + +```php +public function getBasePath(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/Namespaces/ImportedNumbers.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ImportedNumbers.php) + +Line 23. + +## Source + +[`SignalWire/REST/Namespaces/ImportedNumbers.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ImportedNumbers.php) + +Line 13. diff --git a/fern/products/sdk-reference/php/rest/namespaces/namespaces/index.mdx b/fern/products/sdk-reference/php/rest/namespaces/namespaces/index.mdx new file mode 100644 index 0000000000..8c1fab9279 --- /dev/null +++ b/fern/products/sdk-reference/php/rest/namespaces/namespaces/index.mdx @@ -0,0 +1,172 @@ +--- +slug: "/reference/php/rest/namespaces/namespaces" +title: "Namespaces" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "module" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces" + parent: "rest.Namespaces" + module: "rest.Namespaces" +--- +# `Namespaces` + +## Signature + +```php +namespace SignalWire\REST\Namespaces +``` + +## Classes + + + + Addresses namespace — list / create / get / delete (no update). + + + + Calling API namespace. + + + + Compatibility (Twilio-compatible LAML) API namespace. + + + + Compat account / sub-project management. + + + + Compat conference management with participants, recordings, and streams. + + + + Compat IncomingPhoneNumbers + AvailablePhoneNumbers + ImportedPhoneNumbers + + + + Compat recording management. + + + + Compat API token management. + + + + Compat transcription management. + + + + Conference log queries — list-only resource. + + + + Datasphere API namespace — exposes the documents sub-resource. + + + + Fabric API namespace. + + + + Read-only fabric addresses (`/api/fabric/addresses`). + + + + Generic operations across all fabric resource types + + + + Subscriber, guest, invite, and embed token creation under + + + + Fax log queries — list + get by id. + + + + Imported phone numbers — create only (registers an externally-hosted + + + + Logs namespace — message, voice, fax, and conference logs (read-only). + + + + Message log queries — list + get by id. + + + + Multi-factor authentication via SMS or phone call. + + + + Project API namespace — currently exposes the project tokens sub-resource. + + + + Project API token management — create / update (PATCH) / delete. + + + + Recordings — read-only list/get plus delete (no create or update). + + + + 10DLC Campaign Registry namespace — brands, campaigns, orders, numbers. + + + + 10DLC brand management — list, create, get, list\_campaigns, create\_campaign. + + + + 10DLC campaign management — get, update (PUT), list\_numbers, + + + + 10DLC number assignment management — release a number. + + + + 10DLC assignment order management — read-only, retrieve by id. + + + + Short codes management — read + update (PUT) only. + + + + Project SIP profile (singleton resource) — get + update (PUT). + + + + Video API namespace. + + + + Video conference token management — get + reset. + + + + Video room recording management — top-level recordings collection + + + + Video room session management. Read-only with several sub-collections + + + + Video room token generation. Surface is `create` only. + + + + Top-level video stream management — get / update (PUT) / delete. + + + + Voice log queries — list + get by id + per-id event sub-collection. + + diff --git a/fern/products/sdk-reference/php/rest/namespaces/namespaces/logs/index.mdx b/fern/products/sdk-reference/php/rest/namespaces/namespaces/logs/index.mdx new file mode 100644 index 0000000000..8e96d4b4f0 --- /dev/null +++ b/fern/products/sdk-reference/php/rest/namespaces/namespaces/logs/index.mdx @@ -0,0 +1,153 @@ +--- +slug: "/reference/php/rest/namespaces/namespaces/logs" +title: "Logs" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\Logs" + parent: "SignalWire\\REST\\Namespaces" + module: "rest.Namespaces.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Logs.php" +--- +# `Logs` + +Logs namespace — message, voice, fax, and conference logs (read-only). + +Mirrors Python `signalwire.rest.namespaces.logs.LogsNamespace`: each +sub-API lives at a different mount point because that's how the spec +docs slice them. + +## Signature + +```php +class Logs +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http) +``` + +#### Parameters + + + +#### Source + +[`SignalWire/REST/Namespaces/Logs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Logs.php) + +Line 25. + +*** + +### conferences + +#### Signature + +```php +public function conferences(): SignalWire\REST\Namespaces\ConferenceLogs +``` + +#### Returns + +`SignalWire\REST\Namespaces\ConferenceLogs` + +#### Source + +[`SignalWire/REST/Namespaces/Logs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Logs.php) + +Line 49. + +*** + +### fax + +#### Signature + +```php +public function fax(): SignalWire\REST\Namespaces\FaxLogs +``` + +#### Returns + +`SignalWire\REST\Namespaces\FaxLogs` + +#### Source + +[`SignalWire/REST/Namespaces/Logs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Logs.php) + +Line 44. + +*** + +### getHttp + +#### Signature + +```php +public function getHttp(): SignalWire\REST\HttpClient +``` + +#### Returns + +`SignalWire\REST\HttpClient` + +#### Source + +[`SignalWire/REST/Namespaces/Logs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Logs.php) + +Line 54. + +*** + +### messages + +#### Signature + +```php +public function messages(): SignalWire\REST\Namespaces\MessageLogs +``` + +#### Returns + +`SignalWire\REST\Namespaces\MessageLogs` + +#### Source + +[`SignalWire/REST/Namespaces/Logs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Logs.php) + +Line 34. + +*** + +### voice + +#### Signature + +```php +public function voice(): SignalWire\REST\Namespaces\VoiceLogs +``` + +#### Returns + +`SignalWire\REST\Namespaces\VoiceLogs` + +#### Source + +[`SignalWire/REST/Namespaces/Logs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Logs.php) + +Line 39. + +## Source + +[`SignalWire/REST/Namespaces/Logs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Logs.php) + +Line 16. diff --git a/fern/products/sdk-reference/php/rest/namespaces/namespaces/message-logs/index.mdx b/fern/products/sdk-reference/php/rest/namespaces/namespaces/message-logs/index.mdx new file mode 100644 index 0000000000..98e78665ea --- /dev/null +++ b/fern/products/sdk-reference/php/rest/namespaces/namespaces/message-logs/index.mdx @@ -0,0 +1,127 @@ +--- +slug: "/reference/php/rest/namespaces/namespaces/message-logs" +title: "MessageLogs" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\MessageLogs" + parent: "SignalWire\\REST\\Namespaces" + module: "rest.Namespaces.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/MessageLogs.php" +--- +# `MessageLogs` + +Message log queries — list + get by id. + +## Signature + +```php +class MessageLogs +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http, string $basePath) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/REST/Namespaces/MessageLogs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/MessageLogs.php) + +Line 17. + +*** + +### get + +#### Signature + +```php +public function get(string $logId): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/MessageLogs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/MessageLogs.php) + +Line 35. + +*** + +### getBasePath + +#### Signature + +```php +public function getBasePath(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/Namespaces/MessageLogs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/MessageLogs.php) + +Line 23. + +*** + +### list + +#### Signature + +```php +public function list(array $params = array ( +)): array +``` + +#### Parameters + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/MessageLogs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/MessageLogs.php) + +Line 29. + +## Source + +[`SignalWire/REST/Namespaces/MessageLogs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/MessageLogs.php) + +Line 12. diff --git a/fern/products/sdk-reference/php/rest/namespaces/namespaces/mfa/index.mdx b/fern/products/sdk-reference/php/rest/namespaces/namespaces/mfa/index.mdx new file mode 100644 index 0000000000..a94d90f0bd --- /dev/null +++ b/fern/products/sdk-reference/php/rest/namespaces/namespaces/mfa/index.mdx @@ -0,0 +1,149 @@ +--- +slug: "/reference/php/rest/namespaces/namespaces/mfa" +title: "Mfa" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\Mfa" + parent: "SignalWire\\REST\\Namespaces" + module: "rest.Namespaces.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Mfa.php" +--- +# `Mfa` + +Multi-factor authentication via SMS or phone call. + +## Signature + +```php +class Mfa +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http) +``` + +#### Parameters + + + +#### Source + +[`SignalWire/REST/Namespaces/Mfa.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Mfa.php) + +Line 17. + +*** + +### call + +#### Signature + +```php +public function call(array $body): array +``` + +#### Parameters + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Mfa.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Mfa.php) + +Line 34. + +*** + +### getBasePath + +#### Signature + +```php +public function getBasePath(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/Namespaces/Mfa.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Mfa.php) + +Line 22. + +*** + +### sms + +#### Signature + +```php +public function sms(array $body): array +``` + +#### Parameters + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Mfa.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Mfa.php) + +Line 28. + +*** + +### verify + +#### Signature + +```php +public function verify(string $requestId, array $body): array +``` + +#### Parameters + + + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Mfa.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Mfa.php) + +Line 40. + +## Source + +[`SignalWire/REST/Namespaces/Mfa.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Mfa.php) + +Line 12. diff --git a/fern/products/sdk-reference/php/rest/namespaces/namespaces/project-tokens/index.mdx b/fern/products/sdk-reference/php/rest/namespaces/namespaces/project-tokens/index.mdx new file mode 100644 index 0000000000..7ef8b3184d --- /dev/null +++ b/fern/products/sdk-reference/php/rest/namespaces/namespaces/project-tokens/index.mdx @@ -0,0 +1,147 @@ +--- +slug: "/reference/php/rest/namespaces/namespaces/project-tokens" +title: "ProjectTokens" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\ProjectTokens" + parent: "SignalWire\\REST\\Namespaces" + module: "rest.Namespaces.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ProjectTokens.php" +--- +# `ProjectTokens` + +Project API token management — create / update (PATCH) / delete. + +## Signature + +```php +class ProjectTokens +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http) +``` + +#### Parameters + + + +#### Source + +[`SignalWire/REST/Namespaces/ProjectTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ProjectTokens.php) + +Line 17. + +*** + +### create + +#### Signature + +```php +public function create(array $body): array +``` + +#### Parameters + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/ProjectTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ProjectTokens.php) + +Line 28. + +*** + +### delete + +#### Signature + +```php +public function delete(string $tokenId): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/ProjectTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ProjectTokens.php) + +Line 40. + +*** + +### getBasePath + +#### Signature + +```php +public function getBasePath(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/Namespaces/ProjectTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ProjectTokens.php) + +Line 22. + +*** + +### update + +#### Signature + +```php +public function update(string $tokenId, array $body): array +``` + +#### Parameters + + + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/ProjectTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ProjectTokens.php) + +Line 34. + +## Source + +[`SignalWire/REST/Namespaces/ProjectTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ProjectTokens.php) + +Line 12. diff --git a/fern/products/sdk-reference/php/rest/namespaces/namespaces/project/index.mdx b/fern/products/sdk-reference/php/rest/namespaces/namespaces/project/index.mdx new file mode 100644 index 0000000000..841b185a61 --- /dev/null +++ b/fern/products/sdk-reference/php/rest/namespaces/namespaces/project/index.mdx @@ -0,0 +1,89 @@ +--- +slug: "/reference/php/rest/namespaces/namespaces/project" +title: "Project" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\Project" + parent: "SignalWire\\REST\\Namespaces" + module: "rest.Namespaces.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Project.php" +--- +# `Project` + +Project API namespace — currently exposes the project tokens sub-resource. + +## Signature + +```php +class Project +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http) +``` + +#### Parameters + + + +#### Source + +[`SignalWire/REST/Namespaces/Project.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Project.php) + +Line 17. + +*** + +### getHttp + +#### Signature + +```php +public function getHttp(): SignalWire\REST\HttpClient +``` + +#### Returns + +`SignalWire\REST\HttpClient` + +#### Source + +[`SignalWire/REST/Namespaces/Project.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Project.php) + +Line 28. + +*** + +### tokens + +#### Signature + +```php +public function tokens(): SignalWire\REST\Namespaces\ProjectTokens +``` + +#### Returns + +`SignalWire\REST\Namespaces\ProjectTokens` + +#### Source + +[`SignalWire/REST/Namespaces/Project.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Project.php) + +Line 23. + +## Source + +[`SignalWire/REST/Namespaces/Project.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Project.php) + +Line 12. diff --git a/fern/products/sdk-reference/php/rest/namespaces/namespaces/recordings/index.mdx b/fern/products/sdk-reference/php/rest/namespaces/namespaces/recordings/index.mdx new file mode 100644 index 0000000000..36d2956f34 --- /dev/null +++ b/fern/products/sdk-reference/php/rest/namespaces/namespaces/recordings/index.mdx @@ -0,0 +1,149 @@ +--- +slug: "/reference/php/rest/namespaces/namespaces/recordings" +title: "Recordings" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\Recordings" + parent: "SignalWire\\REST\\Namespaces" + module: "rest.Namespaces.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Recordings.php" +--- +# `Recordings` + +Recordings — read-only list/get plus delete (no create or update). + +## Signature + +```php +class Recordings +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http) +``` + +#### Parameters + + + +#### Source + +[`SignalWire/REST/Namespaces/Recordings.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Recordings.php) + +Line 17. + +*** + +### delete + +#### Signature + +```php +public function delete(string $recordingId): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Recordings.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Recordings.php) + +Line 40. + +*** + +### get + +#### Signature + +```php +public function get(string $recordingId): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Recordings.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Recordings.php) + +Line 34. + +*** + +### getBasePath + +#### Signature + +```php +public function getBasePath(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/Namespaces/Recordings.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Recordings.php) + +Line 22. + +*** + +### list + +#### Signature + +```php +public function list(array $params = array ( +)): array +``` + +#### Parameters + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/Recordings.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Recordings.php) + +Line 28. + +## Source + +[`SignalWire/REST/Namespaces/Recordings.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Recordings.php) + +Line 12. diff --git a/fern/products/sdk-reference/php/rest/namespaces/namespaces/registry-brands/index.mdx b/fern/products/sdk-reference/php/rest/namespaces/namespaces/registry-brands/index.mdx new file mode 100644 index 0000000000..440b370af7 --- /dev/null +++ b/fern/products/sdk-reference/php/rest/namespaces/namespaces/registry-brands/index.mdx @@ -0,0 +1,215 @@ +--- +slug: "/reference/php/rest/namespaces/namespaces/registry-brands" +title: "RegistryBrands" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\RegistryBrands" + parent: "SignalWire\\REST\\Namespaces" + module: "rest.Namespaces.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryBrands.php" +--- +# `RegistryBrands` + +10DLC brand management — list, create, get, list\_campaigns, create\_campaign. + +## Signature + +```php +class RegistryBrands +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http, string $basePath) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/REST/Namespaces/RegistryBrands.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryBrands.php) + +Line 17. + +*** + +### create + +#### Signature + +```php +public function create(array $body): array +``` + +#### Parameters + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/RegistryBrands.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryBrands.php) + +Line 35. + +*** + +### createCampaign + +#### Signature + +```php +public function createCampaign(string $brandId, array $body): array +``` + +#### Parameters + + + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/RegistryBrands.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryBrands.php) + +Line 53. + +*** + +### get + +#### Signature + +```php +public function get(string $brandId): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/RegistryBrands.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryBrands.php) + +Line 41. + +*** + +### getBasePath + +#### Signature + +```php +public function getBasePath(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/Namespaces/RegistryBrands.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryBrands.php) + +Line 23. + +*** + +### list + +#### Signature + +```php +public function list(array $params = array ( +)): array +``` + +#### Parameters + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/RegistryBrands.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryBrands.php) + +Line 29. + +*** + +### listCampaigns + +#### Signature + +```php +public function listCampaigns(string $brandId, array $params = array ( +)): array +``` + +#### Parameters + + + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/RegistryBrands.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryBrands.php) + +Line 47. + +## Source + +[`SignalWire/REST/Namespaces/RegistryBrands.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryBrands.php) + +Line 12. diff --git a/fern/products/sdk-reference/php/rest/namespaces/namespaces/registry-campaigns/index.mdx b/fern/products/sdk-reference/php/rest/namespaces/namespaces/registry-campaigns/index.mdx new file mode 100644 index 0000000000..b3a56dcb25 --- /dev/null +++ b/fern/products/sdk-reference/php/rest/namespaces/namespaces/registry-campaigns/index.mdx @@ -0,0 +1,221 @@ +--- +slug: "/reference/php/rest/namespaces/namespaces/registry-campaigns" +title: "RegistryCampaigns" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\RegistryCampaigns" + parent: "SignalWire\\REST\\Namespaces" + module: "rest.Namespaces.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryCampaigns.php" +--- +# `RegistryCampaigns` + +10DLC campaign management — get, update (PUT), list\_numbers, + +list\_orders, create\_order. + +## Signature + +```php +class RegistryCampaigns +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http, string $basePath) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/REST/Namespaces/RegistryCampaigns.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryCampaigns.php) + +Line 18. + +*** + +### createOrder + +#### Signature + +```php +public function createOrder(string $campaignId, array $body): array +``` + +#### Parameters + + + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/RegistryCampaigns.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryCampaigns.php) + +Line 59. + +*** + +### get + +#### Signature + +```php +public function get(string $campaignId): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/RegistryCampaigns.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryCampaigns.php) + +Line 30. + +*** + +### getBasePath + +#### Signature + +```php +public function getBasePath(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/Namespaces/RegistryCampaigns.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryCampaigns.php) + +Line 24. + +*** + +### listNumbers + +#### Signature + +```php +public function listNumbers(string $campaignId, array $params = array ( +)): array +``` + +#### Parameters + + + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/RegistryCampaigns.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryCampaigns.php) + +Line 47. + +*** + +### listOrders + +#### Signature + +```php +public function listOrders(string $campaignId, array $params = array ( +)): array +``` + +#### Parameters + + + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/RegistryCampaigns.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryCampaigns.php) + +Line 53. + +*** + +### update + +Update uses PUT (not PATCH) to mirror the Python `RegistryCampaigns`. + +#### Signature + +```php +public function update(string $campaignId, array $body): array +``` + +#### Parameters + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/RegistryCampaigns.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryCampaigns.php) + +Line 41. + +## Source + +[`SignalWire/REST/Namespaces/RegistryCampaigns.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryCampaigns.php) + +Line 13. diff --git a/fern/products/sdk-reference/php/rest/namespaces/namespaces/registry-numbers/index.mdx b/fern/products/sdk-reference/php/rest/namespaces/namespaces/registry-numbers/index.mdx new file mode 100644 index 0000000000..9cef38ad84 --- /dev/null +++ b/fern/products/sdk-reference/php/rest/namespaces/namespaces/registry-numbers/index.mdx @@ -0,0 +1,95 @@ +--- +slug: "/reference/php/rest/namespaces/namespaces/registry-numbers" +title: "RegistryNumbers" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\RegistryNumbers" + parent: "SignalWire\\REST\\Namespaces" + module: "rest.Namespaces.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryNumbers.php" +--- +# `RegistryNumbers` + +10DLC number assignment management — release a number. + +## Signature + +```php +class RegistryNumbers +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http, string $basePath) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/REST/Namespaces/RegistryNumbers.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryNumbers.php) + +Line 17. + +*** + +### delete + +#### Signature + +```php +public function delete(string $numberId): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/RegistryNumbers.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryNumbers.php) + +Line 29. + +*** + +### getBasePath + +#### Signature + +```php +public function getBasePath(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/Namespaces/RegistryNumbers.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryNumbers.php) + +Line 23. + +## Source + +[`SignalWire/REST/Namespaces/RegistryNumbers.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryNumbers.php) + +Line 12. diff --git a/fern/products/sdk-reference/php/rest/namespaces/namespaces/registry-orders/index.mdx b/fern/products/sdk-reference/php/rest/namespaces/namespaces/registry-orders/index.mdx new file mode 100644 index 0000000000..fd0ae415f4 --- /dev/null +++ b/fern/products/sdk-reference/php/rest/namespaces/namespaces/registry-orders/index.mdx @@ -0,0 +1,95 @@ +--- +slug: "/reference/php/rest/namespaces/namespaces/registry-orders" +title: "RegistryOrders" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\RegistryOrders" + parent: "SignalWire\\REST\\Namespaces" + module: "rest.Namespaces.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryOrders.php" +--- +# `RegistryOrders` + +10DLC assignment order management — read-only, retrieve by id. + +## Signature + +```php +class RegistryOrders +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http, string $basePath) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/REST/Namespaces/RegistryOrders.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryOrders.php) + +Line 17. + +*** + +### get + +#### Signature + +```php +public function get(string $orderId): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/RegistryOrders.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryOrders.php) + +Line 29. + +*** + +### getBasePath + +#### Signature + +```php +public function getBasePath(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/Namespaces/RegistryOrders.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryOrders.php) + +Line 23. + +## Source + +[`SignalWire/REST/Namespaces/RegistryOrders.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryOrders.php) + +Line 12. diff --git a/fern/products/sdk-reference/php/rest/namespaces/namespaces/registry/index.mdx b/fern/products/sdk-reference/php/rest/namespaces/namespaces/registry/index.mdx new file mode 100644 index 0000000000..6b6745c266 --- /dev/null +++ b/fern/products/sdk-reference/php/rest/namespaces/namespaces/registry/index.mdx @@ -0,0 +1,152 @@ +--- +slug: "/reference/php/rest/namespaces/namespaces/registry" +title: "Registry" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\Registry" + parent: "SignalWire\\REST\\Namespaces" + module: "rest.Namespaces.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Registry.php" +--- +# `Registry` + +10DLC Campaign Registry namespace — brands, campaigns, orders, numbers. + +Mirrors Python `signalwire.rest.namespaces.registry.RegistryNamespace`. +All registry endpoints sit under `/api/relay/rest/registry/beta`. + +## Signature + +```php +class Registry +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http) +``` + +#### Parameters + + + +#### Source + +[`SignalWire/REST/Namespaces/Registry.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Registry.php) + +Line 25. + +*** + +### brands + +#### Signature + +```php +public function brands(): SignalWire\REST\Namespaces\RegistryBrands +``` + +#### Returns + +`SignalWire\REST\Namespaces\RegistryBrands` + +#### Source + +[`SignalWire/REST/Namespaces/Registry.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Registry.php) + +Line 34. + +*** + +### campaigns + +#### Signature + +```php +public function campaigns(): SignalWire\REST\Namespaces\RegistryCampaigns +``` + +#### Returns + +`SignalWire\REST\Namespaces\RegistryCampaigns` + +#### Source + +[`SignalWire/REST/Namespaces/Registry.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Registry.php) + +Line 39. + +*** + +### getHttp + +#### Signature + +```php +public function getHttp(): SignalWire\REST\HttpClient +``` + +#### Returns + +`SignalWire\REST\HttpClient` + +#### Source + +[`SignalWire/REST/Namespaces/Registry.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Registry.php) + +Line 54. + +*** + +### numbers + +#### Signature + +```php +public function numbers(): SignalWire\REST\Namespaces\RegistryNumbers +``` + +#### Returns + +`SignalWire\REST\Namespaces\RegistryNumbers` + +#### Source + +[`SignalWire/REST/Namespaces/Registry.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Registry.php) + +Line 49. + +*** + +### orders + +#### Signature + +```php +public function orders(): SignalWire\REST\Namespaces\RegistryOrders +``` + +#### Returns + +`SignalWire\REST\Namespaces\RegistryOrders` + +#### Source + +[`SignalWire/REST/Namespaces/Registry.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Registry.php) + +Line 44. + +## Source + +[`SignalWire/REST/Namespaces/Registry.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Registry.php) + +Line 15. diff --git a/fern/products/sdk-reference/php/rest/namespaces/namespaces/short-codes/index.mdx b/fern/products/sdk-reference/php/rest/namespaces/namespaces/short-codes/index.mdx new file mode 100644 index 0000000000..b384665d45 --- /dev/null +++ b/fern/products/sdk-reference/php/rest/namespaces/namespaces/short-codes/index.mdx @@ -0,0 +1,153 @@ +--- +slug: "/reference/php/rest/namespaces/namespaces/short-codes" +title: "ShortCodes" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\ShortCodes" + parent: "SignalWire\\REST\\Namespaces" + module: "rest.Namespaces.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ShortCodes.php" +--- +# `ShortCodes` + +Short codes management — read + update (PUT) only. + +## Signature + +```php +class ShortCodes +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http) +``` + +#### Parameters + + + +#### Source + +[`SignalWire/REST/Namespaces/ShortCodes.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ShortCodes.php) + +Line 17. + +*** + +### get + +#### Signature + +```php +public function get(string $shortCodeId): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/ShortCodes.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ShortCodes.php) + +Line 34. + +*** + +### getBasePath + +#### Signature + +```php +public function getBasePath(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/Namespaces/ShortCodes.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ShortCodes.php) + +Line 22. + +*** + +### list + +#### Signature + +```php +public function list(array $params = array ( +)): array +``` + +#### Parameters + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/ShortCodes.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ShortCodes.php) + +Line 28. + +*** + +### update + +#### Signature + +```php +public function update(string $shortCodeId, array $body): array +``` + +#### Parameters + + + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/ShortCodes.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ShortCodes.php) + +Line 40. + +## Source + +[`SignalWire/REST/Namespaces/ShortCodes.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ShortCodes.php) + +Line 12. diff --git a/fern/products/sdk-reference/php/rest/namespaces/namespaces/sip-profile/index.mdx b/fern/products/sdk-reference/php/rest/namespaces/namespaces/sip-profile/index.mdx new file mode 100644 index 0000000000..ade7031998 --- /dev/null +++ b/fern/products/sdk-reference/php/rest/namespaces/namespaces/sip-profile/index.mdx @@ -0,0 +1,115 @@ +--- +slug: "/reference/php/rest/namespaces/namespaces/sip-profile" +title: "SipProfile" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\SipProfile" + parent: "SignalWire\\REST\\Namespaces" + module: "rest.Namespaces.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/SipProfile.php" +--- +# `SipProfile` + +Project SIP profile (singleton resource) — get + update (PUT). + +## Signature + +```php +class SipProfile +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http) +``` + +#### Parameters + + + +#### Source + +[`SignalWire/REST/Namespaces/SipProfile.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/SipProfile.php) + +Line 17. + +*** + +### get + +#### Signature + +```php +public function get(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/SipProfile.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/SipProfile.php) + +Line 28. + +*** + +### getBasePath + +#### Signature + +```php +public function getBasePath(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/Namespaces/SipProfile.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/SipProfile.php) + +Line 22. + +*** + +### update + +#### Signature + +```php +public function update(array $body): array +``` + +#### Parameters + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/SipProfile.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/SipProfile.php) + +Line 34. + +## Source + +[`SignalWire/REST/Namespaces/SipProfile.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/SipProfile.php) + +Line 12. diff --git a/fern/products/sdk-reference/php/rest/namespaces/namespaces/video-conference-tokens/index.mdx b/fern/products/sdk-reference/php/rest/namespaces/namespaces/video-conference-tokens/index.mdx new file mode 100644 index 0000000000..cf6fc6b921 --- /dev/null +++ b/fern/products/sdk-reference/php/rest/namespaces/namespaces/video-conference-tokens/index.mdx @@ -0,0 +1,119 @@ +--- +slug: "/reference/php/rest/namespaces/namespaces/video-conference-tokens" +title: "VideoConferenceTokens" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\VideoConferenceTokens" + parent: "SignalWire\\REST\\Namespaces" + module: "rest.Namespaces.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoConferenceTokens.php" +--- +# `VideoConferenceTokens` + +Video conference token management — get + reset. + +## Signature + +```php +class VideoConferenceTokens +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http, string $basePath) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/REST/Namespaces/VideoConferenceTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoConferenceTokens.php) + +Line 17. + +*** + +### get + +#### Signature + +```php +public function get(string $tokenId): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/VideoConferenceTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoConferenceTokens.php) + +Line 29. + +*** + +### getBasePath + +#### Signature + +```php +public function getBasePath(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/Namespaces/VideoConferenceTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoConferenceTokens.php) + +Line 23. + +*** + +### reset + +#### Signature + +```php +public function reset(string $tokenId): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/VideoConferenceTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoConferenceTokens.php) + +Line 35. + +## Source + +[`SignalWire/REST/Namespaces/VideoConferenceTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoConferenceTokens.php) + +Line 12. diff --git a/fern/products/sdk-reference/php/rest/namespaces/namespaces/video-room-recordings/index.mdx b/fern/products/sdk-reference/php/rest/namespaces/namespaces/video-room-recordings/index.mdx new file mode 100644 index 0000000000..b815de972f --- /dev/null +++ b/fern/products/sdk-reference/php/rest/namespaces/namespaces/video-room-recordings/index.mdx @@ -0,0 +1,187 @@ +--- +slug: "/reference/php/rest/namespaces/namespaces/video-room-recordings" +title: "VideoRoomRecordings" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\VideoRoomRecordings" + parent: "SignalWire\\REST\\Namespaces" + module: "rest.Namespaces.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoRoomRecordings.php" +--- +# `VideoRoomRecordings` + +Video room recording management — top-level recordings collection + +(distinct from session-scoped recordings). + +## Signature + +```php +class VideoRoomRecordings +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http, string $basePath) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/REST/Namespaces/VideoRoomRecordings.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoRoomRecordings.php) + +Line 18. + +*** + +### delete + +#### Signature + +```php +public function delete(string $recordingId): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/VideoRoomRecordings.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoRoomRecordings.php) + +Line 42. + +*** + +### get + +#### Signature + +```php +public function get(string $recordingId): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/VideoRoomRecordings.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoRoomRecordings.php) + +Line 36. + +*** + +### getBasePath + +#### Signature + +```php +public function getBasePath(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/Namespaces/VideoRoomRecordings.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoRoomRecordings.php) + +Line 24. + +*** + +### list + +#### Signature + +```php +public function list(array $params = array ( +)): array +``` + +#### Parameters + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/VideoRoomRecordings.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoRoomRecordings.php) + +Line 30. + +*** + +### listEvents + +#### Signature + +```php +public function listEvents(string $recordingId, array $params = array ( +)): array +``` + +#### Parameters + + + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/VideoRoomRecordings.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoRoomRecordings.php) + +Line 48. + +## Source + +[`SignalWire/REST/Namespaces/VideoRoomRecordings.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoRoomRecordings.php) + +Line 13. diff --git a/fern/products/sdk-reference/php/rest/namespaces/namespaces/video-room-sessions/index.mdx b/fern/products/sdk-reference/php/rest/namespaces/namespaces/video-room-sessions/index.mdx new file mode 100644 index 0000000000..fc55ed4574 --- /dev/null +++ b/fern/products/sdk-reference/php/rest/namespaces/namespaces/video-room-sessions/index.mdx @@ -0,0 +1,231 @@ +--- +slug: "/reference/php/rest/namespaces/namespaces/video-room-sessions" +title: "VideoRoomSessions" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\VideoRoomSessions" + parent: "SignalWire\\REST\\Namespaces" + module: "rest.Namespaces.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoRoomSessions.php" +--- +# `VideoRoomSessions` + +Video room session management. Read-only with several sub-collections + +(events, members, recordings). + +## Signature + +```php +class VideoRoomSessions +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http, string $basePath) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/REST/Namespaces/VideoRoomSessions.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoRoomSessions.php) + +Line 18. + +*** + +### get + +#### Signature + +```php +public function get(string $sessionId): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/VideoRoomSessions.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoRoomSessions.php) + +Line 36. + +*** + +### getBasePath + +#### Signature + +```php +public function getBasePath(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/Namespaces/VideoRoomSessions.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoRoomSessions.php) + +Line 24. + +*** + +### list + +#### Signature + +```php +public function list(array $params = array ( +)): array +``` + +#### Parameters + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/VideoRoomSessions.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoRoomSessions.php) + +Line 30. + +*** + +### listEvents + +#### Signature + +```php +public function listEvents(string $sessionId, array $params = array ( +)): array +``` + +#### Parameters + + + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/VideoRoomSessions.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoRoomSessions.php) + +Line 42. + +*** + +### listMembers + +#### Signature + +```php +public function listMembers(string $sessionId, array $params = array ( +)): array +``` + +#### Parameters + + + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/VideoRoomSessions.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoRoomSessions.php) + +Line 48. + +*** + +### listRecordings + +#### Signature + +```php +public function listRecordings(string $sessionId, array $params = array ( +)): array +``` + +#### Parameters + + + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/VideoRoomSessions.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoRoomSessions.php) + +Line 54. + +## Source + +[`SignalWire/REST/Namespaces/VideoRoomSessions.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoRoomSessions.php) + +Line 13. diff --git a/fern/products/sdk-reference/php/rest/namespaces/namespaces/video-room-tokens/index.mdx b/fern/products/sdk-reference/php/rest/namespaces/namespaces/video-room-tokens/index.mdx new file mode 100644 index 0000000000..076963c6e2 --- /dev/null +++ b/fern/products/sdk-reference/php/rest/namespaces/namespaces/video-room-tokens/index.mdx @@ -0,0 +1,97 @@ +--- +slug: "/reference/php/rest/namespaces/namespaces/video-room-tokens" +title: "VideoRoomTokens" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\VideoRoomTokens" + parent: "SignalWire\\REST\\Namespaces" + module: "rest.Namespaces.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoRoomTokens.php" +--- +# `VideoRoomTokens` + +Video room token generation. Surface is `create` only. + +## Signature + +```php +class VideoRoomTokens +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http, string $basePath) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/REST/Namespaces/VideoRoomTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoRoomTokens.php) + +Line 17. + +*** + +### create + +#### Signature + +```php +public function create(array $body): array +``` + +#### Parameters + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/VideoRoomTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoRoomTokens.php) + +Line 29. + +*** + +### getBasePath + +#### Signature + +```php +public function getBasePath(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/Namespaces/VideoRoomTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoRoomTokens.php) + +Line 23. + +## Source + +[`SignalWire/REST/Namespaces/VideoRoomTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoRoomTokens.php) + +Line 12. diff --git a/fern/products/sdk-reference/php/rest/namespaces/namespaces/video-streams/index.mdx b/fern/products/sdk-reference/php/rest/namespaces/namespaces/video-streams/index.mdx new file mode 100644 index 0000000000..cbe09a8740 --- /dev/null +++ b/fern/products/sdk-reference/php/rest/namespaces/namespaces/video-streams/index.mdx @@ -0,0 +1,147 @@ +--- +slug: "/reference/php/rest/namespaces/namespaces/video-streams" +title: "VideoStreams" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\VideoStreams" + parent: "SignalWire\\REST\\Namespaces" + module: "rest.Namespaces.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoStreams.php" +--- +# `VideoStreams` + +Top-level video stream management — get / update (PUT) / delete. + +## Signature + +```php +class VideoStreams +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http, string $basePath) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/REST/Namespaces/VideoStreams.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoStreams.php) + +Line 17. + +*** + +### delete + +#### Signature + +```php +public function delete(string $streamId): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/VideoStreams.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoStreams.php) + +Line 41. + +*** + +### get + +#### Signature + +```php +public function get(string $streamId): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/VideoStreams.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoStreams.php) + +Line 29. + +*** + +### getBasePath + +#### Signature + +```php +public function getBasePath(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/Namespaces/VideoStreams.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoStreams.php) + +Line 23. + +*** + +### update + +#### Signature + +```php +public function update(string $streamId, array $body): array +``` + +#### Parameters + + + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/VideoStreams.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoStreams.php) + +Line 35. + +## Source + +[`SignalWire/REST/Namespaces/VideoStreams.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoStreams.php) + +Line 12. diff --git a/fern/products/sdk-reference/php/rest/namespaces/namespaces/video/index.mdx b/fern/products/sdk-reference/php/rest/namespaces/namespaces/video/index.mdx new file mode 100644 index 0000000000..c961a54d2c --- /dev/null +++ b/fern/products/sdk-reference/php/rest/namespaces/namespaces/video/index.mdx @@ -0,0 +1,213 @@ +--- +slug: "/reference/php/rest/namespaces/namespaces/video" +title: "Video" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\Video" + parent: "SignalWire\\REST\\Namespaces" + module: "rest.Namespaces.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Video.php" +--- +# `Video` + +Video API namespace. + +Mirrors Python `signalwire.rest.namespaces.video.VideoNamespace`: groups +the Video API sub-resources (rooms, room\_sessions, room\_recordings, +conferences, conference\_tokens, streams) under one object. + +## Signature + +```php +class Video +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http) +``` + +#### Parameters + + + +#### Source + +[`SignalWire/REST/Namespaces/Video.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Video.php) + +Line 29. + +*** + +### conferences + +#### Signature + +```php +public function conferences(): SignalWire\REST\Namespaces\VideoConferences +``` + +#### Returns + +`SignalWire\REST\Namespaces\VideoConferences` + +#### Source + +[`SignalWire/REST/Namespaces/Video.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Video.php) + +Line 67. + +*** + +### conferenceTokens + +#### Signature + +```php +public function conferenceTokens(): SignalWire\REST\Namespaces\VideoConferenceTokens +``` + +#### Returns + +`SignalWire\REST\Namespaces\VideoConferenceTokens` + +#### Source + +[`SignalWire/REST/Namespaces/Video.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Video.php) + +Line 72. + +*** + +### getHttp + +#### Signature + +```php +public function getHttp(): SignalWire\REST\HttpClient +``` + +#### Returns + +`SignalWire\REST\HttpClient` + +#### Source + +[`SignalWire/REST/Namespaces/Video.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Video.php) + +Line 42. + +*** + +### roomRecordings + +#### Signature + +```php +public function roomRecordings(): SignalWire\REST\Namespaces\VideoRoomRecordings +``` + +#### Returns + +`SignalWire\REST\Namespaces\VideoRoomRecordings` + +#### Source + +[`SignalWire/REST/Namespaces/Video.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Video.php) + +Line 62. + +*** + +### rooms + +#### Signature + +```php +public function rooms(): SignalWire\REST\Namespaces\VideoRooms +``` + +#### Returns + +`SignalWire\REST\Namespaces\VideoRooms` + +#### Source + +[`SignalWire/REST/Namespaces/Video.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Video.php) + +Line 47. + +*** + +### roomSessions + +#### Signature + +```php +public function roomSessions(): SignalWire\REST\Namespaces\VideoRoomSessions +``` + +#### Returns + +`SignalWire\REST\Namespaces\VideoRoomSessions` + +#### Source + +[`SignalWire/REST/Namespaces/Video.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Video.php) + +Line 57. + +*** + +### roomTokens + +#### Signature + +```php +public function roomTokens(): SignalWire\REST\Namespaces\VideoRoomTokens +``` + +#### Returns + +`SignalWire\REST\Namespaces\VideoRoomTokens` + +#### Source + +[`SignalWire/REST/Namespaces/Video.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Video.php) + +Line 52. + +*** + +### streams + +#### Signature + +```php +public function streams(): SignalWire\REST\Namespaces\VideoStreams +``` + +#### Returns + +`SignalWire\REST\Namespaces\VideoStreams` + +#### Source + +[`SignalWire/REST/Namespaces/Video.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Video.php) + +Line 77. + +## Source + +[`SignalWire/REST/Namespaces/Video.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Video.php) + +Line 17. diff --git a/fern/products/sdk-reference/php/rest/namespaces/namespaces/voice-logs/index.mdx b/fern/products/sdk-reference/php/rest/namespaces/namespaces/voice-logs/index.mdx new file mode 100644 index 0000000000..2d70b06248 --- /dev/null +++ b/fern/products/sdk-reference/php/rest/namespaces/namespaces/voice-logs/index.mdx @@ -0,0 +1,161 @@ +--- +slug: "/reference/php/rest/namespaces/namespaces/voice-logs" +title: "VoiceLogs" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\Namespaces\\VoiceLogs" + parent: "SignalWire\\REST\\Namespaces" + module: "rest.Namespaces.Namespaces" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VoiceLogs.php" +--- +# `VoiceLogs` + +Voice log queries — list + get by id + per-id event sub-collection. + +## Signature + +```php +class VoiceLogs +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http, string $basePath) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/REST/Namespaces/VoiceLogs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VoiceLogs.php) + +Line 17. + +*** + +### get + +#### Signature + +```php +public function get(string $logId): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/VoiceLogs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VoiceLogs.php) + +Line 35. + +*** + +### getBasePath + +#### Signature + +```php +public function getBasePath(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/Namespaces/VoiceLogs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VoiceLogs.php) + +Line 23. + +*** + +### list + +#### Signature + +```php +public function list(array $params = array ( +)): array +``` + +#### Parameters + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/VoiceLogs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VoiceLogs.php) + +Line 29. + +*** + +### listEvents + +#### Signature + +```php +public function listEvents(string $logId, array $params = array ( +)): array +``` + +#### Parameters + + + + + @return array\ + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/Namespaces/VoiceLogs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VoiceLogs.php) + +Line 41. + +## Source + +[`SignalWire/REST/Namespaces/VoiceLogs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VoiceLogs.php) + +Line 12. diff --git a/fern/products/sdk-reference/php/rest/rest/base-resource/index.mdx b/fern/products/sdk-reference/php/rest/rest/base-resource/index.mdx new file mode 100644 index 0000000000..602ba57be5 --- /dev/null +++ b/fern/products/sdk-reference/php/rest/rest/base-resource/index.mdx @@ -0,0 +1,97 @@ +--- +slug: "/reference/php/rest/rest/base-resource" +title: "BaseResource" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\BaseResource" + parent: "rest.REST" + module: "rest.REST" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php" +--- +# `BaseResource` + +Common base class for namespace and resource classes. + +Mirrors Python's signalwire.rest.\_base.BaseResource — minimal wrapper +around an HttpClient and a base path. CrudResource extends this for +standard REST collection+item access; namespace classes that want a +shared base path (without inheriting list/create/get/update/delete) +can subclass BaseResource directly. + +## Signature + +```php +class BaseResource +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $http, string $base_path) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) + +Line 21. + +*** + +### getBasePath + +#### Signature + +```php +public function getBasePath(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) + +Line 38. + +*** + +### getHttp + +#### Signature + +```php +public function getHttp(): SignalWire\REST\HttpClient +``` + +#### Returns + +`SignalWire\REST\HttpClient` + +#### Source + +[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) + +Line 43. + +## Source + +[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) + +Line 16. diff --git a/fern/products/sdk-reference/php/rest/rest/crud-resource/index.mdx b/fern/products/sdk-reference/php/rest/rest/crud-resource/index.mdx new file mode 100644 index 0000000000..4f7c89fcef --- /dev/null +++ b/fern/products/sdk-reference/php/rest/rest/crud-resource/index.mdx @@ -0,0 +1,262 @@ +--- +slug: "/reference/php/rest/rest/crud-resource" +title: "CrudResource" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\CrudResource" + parent: "rest.REST" + module: "rest.REST" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php" +--- +# `CrudResource` + +Generic CRUD wrapper around an HttpClient and a base API path. + +Provides list / create / get / update / delete for any REST resource that +follows the standard SignalWire collection+item URL pattern. + +## Signature + +```php +class CrudResource extends BaseResource +``` + +## Inheritance + +**Extends:** [SignalWire\REST\BaseResource](/docs/sdk-reference/reference/php/rest/rest/base-resource) + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $client, string $basePath) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) + +Line 59. + +*** + +### create + +Create a new resource (POST basePath). + +#### Signature + +```php +public function create(array $data): array +``` + +#### Parameters + + + JSON body. + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) + +Line 105. + +*** + +### delete + +Delete a resource by ID (DELETE basePath/\{id\}). + +#### Signature + +```php +public function delete(string $id): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) + +Line 136. + +*** + +### get + +Retrieve a single resource by ID (GET basePath/\{id\}). + +#### Signature + +```php +public function get(string $id): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) + +Line 115. + +*** + +### getBasePath + +#### Signature + +```php +public function getBasePath(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) + +Line 65. + +*** + +### getClient + +#### Signature + +```php +public function getClient(): SignalWire\REST\HttpClient +``` + +#### Returns + +`SignalWire\REST\HttpClient` + +#### Source + +[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) + +Line 70. + +*** + +### getHttp + +#### Signature + +```php +public function getHttp(): SignalWire\REST\HttpClient +``` + +#### Returns + +`SignalWire\REST\HttpClient` + +#### Source + +[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) + +Line 43. + +*** + +### list + +List resources (GET basePath). + +#### Signature + +```php +public function list(array $params = array ( +)): array +``` + +#### Parameters + + + Query-string parameters. + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) + +Line 94. + +*** + +### update + +Update a resource by ID (PUT basePath/\{id\}). + +#### Signature + +```php +public function update(string $id, array $data): array +``` + +#### Parameters + + + + + JSON body. + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) + +Line 126. + +## Source + +[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) + +Line 55. diff --git a/fern/products/sdk-reference/php/rest/rest/crud-with-addresses/index.mdx b/fern/products/sdk-reference/php/rest/rest/crud-with-addresses/index.mdx new file mode 100644 index 0000000000..0165207b1d --- /dev/null +++ b/fern/products/sdk-reference/php/rest/rest/crud-with-addresses/index.mdx @@ -0,0 +1,298 @@ +--- +slug: "/reference/php/rest/rest/crud-with-addresses" +title: "CrudWithAddresses" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\CrudWithAddresses" + parent: "rest.REST" + module: "rest.REST" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php" +--- +# `CrudWithAddresses` + +CRUD resource that also supports listing addresses for an item. + +Mirrors Python's signalwire.rest.\_base.CrudWithAddresses — adds +list\_addresses(resource\_id, \*\*params) on top of the standard CRUD set. + +## Signature + +```php +class CrudWithAddresses extends CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire\REST\CrudResource](/docs/sdk-reference/reference/php/rest/rest/crud-resource) + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct(SignalWire\REST\HttpClient $client, string $basePath) +``` + +#### Parameters + + + + + +#### Source + +[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) + +Line 59. + +*** + +### create + +Create a new resource (POST basePath). + +#### Signature + +```php +public function create(array $data): array +``` + +#### Parameters + + + JSON body. + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) + +Line 105. + +*** + +### delete + +Delete a resource by ID (DELETE basePath/\{id\}). + +#### Signature + +```php +public function delete(string $id): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) + +Line 136. + +*** + +### get + +Retrieve a single resource by ID (GET basePath/\{id\}). + +#### Signature + +```php +public function get(string $id): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) + +Line 115. + +*** + +### getBasePath + +#### Signature + +```php +public function getBasePath(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) + +Line 65. + +*** + +### getClient + +#### Signature + +```php +public function getClient(): SignalWire\REST\HttpClient +``` + +#### Returns + +`SignalWire\REST\HttpClient` + +#### Source + +[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) + +Line 70. + +*** + +### getHttp + +#### Signature + +```php +public function getHttp(): SignalWire\REST\HttpClient +``` + +#### Returns + +`SignalWire\REST\HttpClient` + +#### Source + +[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) + +Line 43. + +*** + +### list + +List resources (GET basePath). + +#### Signature + +```php +public function list(array $params = array ( +)): array +``` + +#### Parameters + + + Query-string parameters. + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) + +Line 94. + +*** + +### listAddresses + +List the addresses associated with a resource (GET basePath/\{id\}/addresses). + +#### Signature + +```php +public function listAddresses(string $resource_id, array $params = array ( +)): array +``` + +#### Parameters + + + + + Query-string parameters. + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) + +Line 156. + +*** + +### update + +Update a resource by ID (PUT basePath/\{id\}). + +#### Signature + +```php +public function update(string $id, array $data): array +``` + +#### Parameters + + + + + JSON body. + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) + +Line 126. + +## Source + +[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) + +Line 148. diff --git a/fern/products/sdk-reference/php/rest/rest/http-client/index.mdx b/fern/products/sdk-reference/php/rest/rest/http-client/index.mdx new file mode 100644 index 0000000000..f70c7c0a38 --- /dev/null +++ b/fern/products/sdk-reference/php/rest/rest/http-client/index.mdx @@ -0,0 +1,344 @@ +--- +slug: "/reference/php/rest/rest/http-client" +title: "HttpClient" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\HttpClient" + parent: "rest.REST" + module: "rest.REST" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/HttpClient.php" +--- +# `HttpClient` + +Low-level HTTP client for SignalWire REST APIs. + +Uses cURL for HTTP requests, Basic Auth with project\_id:token, +and returns parsed JSON responses as associative arrays. + +## Signature + +```php +class HttpClient +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct( + string $projectId, + string $token, + string $baseUrl, + ?string $caBundle = NULL +) +``` + +#### Parameters + + + + + + + + + Optional CA bundle (PEM) for HTTPS peer verification. Falls back to the SIGNALWIRE\_CA\_FILE / SSL\_CERT\_FILE env vars (PHP's cURL does not honor those env vars on its own). + + +#### Source + +[`SignalWire/REST/HttpClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/HttpClient.php) + +Line 38. + +*** + +### delete + +#### Signature + +```php +public function delete(string $path): array +``` + +#### Parameters + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/HttpClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/HttpClient.php) + +Line 129. + +*** + +### get + +#### Signature + +```php +public function get(string $path, array $params = array ( +)): array +``` + +#### Parameters + + + + + Query-string parameters. + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/HttpClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/HttpClient.php) + +Line 94. + +*** + +### getAuthHeader + +#### Signature + +```php +public function getAuthHeader(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/HttpClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/HttpClient.php) + +Line 81. + +*** + +### getBaseUrl + +#### Signature + +```php +public function getBaseUrl(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/HttpClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/HttpClient.php) + +Line 76. + +*** + +### getProjectId + +#### Signature + +```php +public function getProjectId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/HttpClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/HttpClient.php) + +Line 66. + +*** + +### getToken + +#### Signature + +```php +public function getToken(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/HttpClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/HttpClient.php) + +Line 71. + +*** + +### listAll + +Return a generator that follows `next` links automatically. + +Expects the API to return `{ "data": [...], "links": { "next": "..." } }` +or similar paginated envelope. Each yield is one page (array of items). + +#### Signature + +```php +public function listAll(string $path, array $params = array ( +)): Generator +``` + +#### Parameters + + + + + Initial query-string parameters. + + +#### Returns + +`Generator` + +#### Source + +[`SignalWire/REST/HttpClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/HttpClient.php) + +Line 147. + +*** + +### patch + +#### Signature + +```php +public function patch(string $path, array $data = array ( +)): array +``` + +#### Parameters + + + + + JSON body payload. + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/HttpClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/HttpClient.php) + +Line 121. + +*** + +### post + +#### Signature + +```php +public function post(string $path, array $data = array ( +)): array +``` + +#### Parameters + + + + + JSON body payload. + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/HttpClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/HttpClient.php) + +Line 103. + +*** + +### put + +#### Signature + +```php +public function put(string $path, array $data = array ( +)): array +``` + +#### Parameters + + + + + JSON body payload. + + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/HttpClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/HttpClient.php) + +Line 112. + +## Source + +[`SignalWire/REST/HttpClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/HttpClient.php) + +Line 13. diff --git a/fern/products/sdk-reference/php/rest/rest/index.mdx b/fern/products/sdk-reference/php/rest/rest/index.mdx new file mode 100644 index 0000000000..6984ab2016 --- /dev/null +++ b/fern/products/sdk-reference/php/rest/rest/index.mdx @@ -0,0 +1,46 @@ +--- +slug: "/reference/php/rest/rest" +title: "REST" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "module" + language: "php" + qualified_name: "rest.REST" + parent: "rest" + module: "rest" +--- +# `REST` + +## Classes + + + + Common base class for namespace and resource classes. + + + + Generic CRUD wrapper around an HttpClient and a base API path. + + + + CRUD resource that also supports listing addresses for an item. + + + + Low-level HTTP client for SignalWire REST APIs. + + + + Iterates items across paginated API responses. + + + + Top-level SignalWire REST client. + + + + Exception thrown when a SignalWire REST API request fails with a non-2xx status. + + diff --git a/fern/products/sdk-reference/php/rest/rest/paginated-iterator/index.mdx b/fern/products/sdk-reference/php/rest/rest/paginated-iterator/index.mdx new file mode 100644 index 0000000000..a914723c4b --- /dev/null +++ b/fern/products/sdk-reference/php/rest/rest/paginated-iterator/index.mdx @@ -0,0 +1,307 @@ +--- +slug: "/reference/php/rest/rest/paginated-iterator" +title: "PaginatedIterator" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\PaginatedIterator" + parent: "rest.REST" + module: "rest.REST" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/PaginatedIterator.php" +--- +# `PaginatedIterator` + +Iterates items across paginated API responses. + +Mirrors Python `signalwire.rest._pagination.PaginatedIterator`: walks +pages by following the `links.next` cursor and extracting query params +from the URL. + +Usage: +foreach (new PaginatedIterator($http, '/api/path', \['k' => 'v']) as $item) \{ +// ... +\} + +## Signature + +```php +class PaginatedIterator implements Iterator, Traversable +``` + +## Inheritance + +**Implements:** `Iterator`, `Traversable` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct( + SignalWire\REST\HttpClient $http, + string $path, + ?array $params = NULL, + string $dataKey = 'data' +) +``` + +#### Parameters + + + + + + + Initial query-string parameters. + + + + +#### Source + +[`SignalWire/REST/PaginatedIterator.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/PaginatedIterator.php) + +Line 35. + +*** + +### current + +#### Signature + +```php +public function current(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/PaginatedIterator.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/PaginatedIterator.php) + +Line 107. + +*** + +### getDataKey + +#### Signature + +```php +public function getDataKey(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/PaginatedIterator.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/PaginatedIterator.php) + +Line 63. + +*** + +### getHttp + +#### Signature + +```php +public function getHttp(): SignalWire\REST\HttpClient +``` + +#### Returns + +`SignalWire\REST\HttpClient` + +#### Source + +[`SignalWire/REST/PaginatedIterator.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/PaginatedIterator.php) + +Line 47. + +*** + +### getIndex + +#### Signature + +```php +public function getIndex(): int +``` + +#### Returns + +`int` + +#### Source + +[`SignalWire/REST/PaginatedIterator.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/PaginatedIterator.php) + +Line 73. + +*** + +### getItems + +#### Signature + +```php +public function getItems(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/PaginatedIterator.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/PaginatedIterator.php) + +Line 79. + +*** + +### getParams + +#### Signature + +```php +public function getParams(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/REST/PaginatedIterator.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/PaginatedIterator.php) + +Line 58. + +*** + +### getPath + +#### Signature + +```php +public function getPath(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/PaginatedIterator.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/PaginatedIterator.php) + +Line 52. + +*** + +### isDone + +#### Signature + +```php +public function isDone(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/REST/PaginatedIterator.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/PaginatedIterator.php) + +Line 68. + +*** + +### key + +#### Signature + +```php +public function key(): int +``` + +#### Returns + +`int` + +#### Source + +[`SignalWire/REST/PaginatedIterator.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/PaginatedIterator.php) + +Line 112. + +*** + +### next + +#### Signature + +```php +public function next(): void +``` + +#### Source + +[`SignalWire/REST/PaginatedIterator.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/PaginatedIterator.php) + +Line 117. + +*** + +### rewind + +#### Signature + +```php +public function rewind(): void +``` + +#### Source + +[`SignalWire/REST/PaginatedIterator.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/PaginatedIterator.php) + +Line 88. + +*** + +### valid + +#### Signature + +```php +public function valid(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/REST/PaginatedIterator.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/PaginatedIterator.php) + +Line 93. + +## Source + +[`SignalWire/REST/PaginatedIterator.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/PaginatedIterator.php) + +Line 19. diff --git a/fern/products/sdk-reference/php/rest/rest/rest-client/index.mdx b/fern/products/sdk-reference/php/rest/rest/rest-client/index.mdx new file mode 100644 index 0000000000..7c17e41bc9 --- /dev/null +++ b/fern/products/sdk-reference/php/rest/rest/rest-client/index.mdx @@ -0,0 +1,637 @@ +--- +slug: "/reference/php/rest/rest/rest-client" +title: "RestClient" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\RestClient" + parent: "rest.REST" + module: "rest.REST" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php" +--- +# `RestClient` + +Top-level SignalWire REST client. + +Provides lazy access to every API namespace (fabric, calling, +phone\_numbers, datasphere, video, compat, etc.). Credentials can be +supplied explicitly or pulled from environment variables. + +## Signature + +```php +class RestClient +``` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct( + string $projectId = '', + string $token = '', + string $space = '', + ?string $caBundle = NULL +) +``` + +#### Parameters + + + Project ID (falls back to SIGNALWIRE\_PROJECT\_ID env var). + + + + API token (falls back to SIGNALWIRE\_API\_TOKEN env var). + + + + Space host or full base URL. - "mycompany.signalwire.com" → https://mycompany.signalwire.com - "https://example.com:8080" → used verbatim - "http://127.0.0.1:8080" → used verbatim (test fixtures) Falls back to SIGNALWIRE\_SPACE env var. + + + + +#### Source + +[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) + +Line 73. + +*** + +### addresses + +Addresses (list / create / get / delete — no update). + +#### Signature + +```php +public function addresses(): SignalWire\REST\Namespaces\Addresses +``` + +#### Returns + +`SignalWire\REST\Namespaces\Addresses` + +#### Source + +[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) + +Line 200. + +*** + +### calling + +Calling API (37 call-control commands). + +#### Signature + +```php +public function calling(): SignalWire\REST\Namespaces\Calling +``` + +#### Returns + +`SignalWire\REST\Namespaces\Calling` + +#### Source + +[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) + +Line 147. + +*** + +### chat + +Chat tokens. + +#### Signature + +```php +public function chat(): SignalWire\REST\CrudResource +``` + +#### Returns + +`SignalWire\REST\CrudResource` + +#### Source + +[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) + +Line 326. + +*** + +### compat + +Compatibility (Twilio-compatible LaML) API. + +Returns a `Compat` namespace object exposing the LAML sub-resources +(calls, messages, faxes, conferences, phoneNumbers, recordings, ...). + +#### Signature + +```php +public function compat(): SignalWire\REST\Namespaces\Compat +``` + +#### Returns + +`SignalWire\REST\Namespaces\Compat` + +#### Source + +[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) + +Line 191. + +*** + +### datasphere + +Datasphere documents (CRUD + chunks + search). + +#### Signature + +```php +public function datasphere(): SignalWire\REST\Namespaces\Datasphere +``` + +#### Returns + +`SignalWire\REST\Namespaces\Datasphere` + +#### Source + +[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) + +Line 165. + +*** + +### fabric + +Fabric API (sub-resources: subscribers, sip\_endpoints, call\_flows, ...). + +#### Signature + +```php +public function fabric(): SignalWire\REST\Namespaces\Fabric +``` + +#### Returns + +`SignalWire\REST\Namespaces\Fabric` + +#### Source + +[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) + +Line 138. + +*** + +### getBaseUrl + +#### Signature + +```php +public function getBaseUrl(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) + +Line 123. + +*** + +### getHttp + +#### Signature + +```php +public function getHttp(): SignalWire\REST\HttpClient +``` + +#### Returns + +`SignalWire\REST\HttpClient` + +#### Source + +[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) + +Line 128. + +*** + +### getProjectId + +#### Signature + +```php +public function getProjectId(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) + +Line 108. + +*** + +### getSpace + +#### Signature + +```php +public function getSpace(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) + +Line 118. + +*** + +### getToken + +#### Signature + +```php +public function getToken(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) + +Line 113. + +*** + +### importedNumbers + +Imported phone numbers (create only). + +#### Signature + +```php +public function importedNumbers(): SignalWire\REST\Namespaces\ImportedNumbers +``` + +#### Returns + +`SignalWire\REST\Namespaces\ImportedNumbers` + +#### Source + +[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) + +Line 272. + +*** + +### logs + +Logs (messages, voice, fax, conferences). + +#### Signature + +```php +public function logs(): SignalWire\REST\Namespaces\Logs +``` + +#### Returns + +`SignalWire\REST\Namespaces\Logs` + +#### Source + +[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) + +Line 299. + +*** + +### lookup + +Phone number lookup. + +#### Signature + +```php +public function lookup(): SignalWire\REST\CrudResource +``` + +#### Returns + +`SignalWire\REST\CrudResource` + +#### Source + +[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) + +Line 254. + +*** + +### mfa + +Multi-factor authentication (sms / call / verify). + +#### Signature + +```php +public function mfa(): SignalWire\REST\Namespaces\Mfa +``` + +#### Returns + +`SignalWire\REST\Namespaces\Mfa` + +#### Source + +[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) + +Line 281. + +*** + +### numberGroups + +Number groups (CRUD + membership operations). + +#### Signature + +```php +public function numberGroups(): SignalWire\REST\Namespaces\NumberGroups +``` + +#### Returns + +`SignalWire\REST\Namespaces\NumberGroups` + +#### Source + +[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) + +Line 227. + +*** + +### phoneNumbers + +Phone numbers. + +#### Signature + +```php +public function phoneNumbers(): SignalWire\REST\CrudResource +``` + +#### Returns + +`SignalWire\REST\CrudResource` + +#### Source + +[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) + +Line 156. + +*** + +### project + +Project management (project tokens). + +#### Signature + +```php +public function project(): SignalWire\REST\Namespaces\Project +``` + +#### Returns + +`SignalWire\REST\Namespaces\Project` + +#### Source + +[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) + +Line 308. + +*** + +### pubsub + +PubSub tokens. + +#### Signature + +```php +public function pubsub(): SignalWire\REST\CrudResource +``` + +#### Returns + +`SignalWire\REST\CrudResource` + +#### Source + +[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) + +Line 317. + +*** + +### queues + +Queues (CRUD + member operations). + +#### Signature + +```php +public function queues(): SignalWire\REST\Namespaces\Queues +``` + +#### Returns + +`SignalWire\REST\Namespaces\Queues` + +#### Source + +[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) + +Line 209. + +*** + +### recordings + +Recordings (list / get / delete only). + +#### Signature + +```php +public function recordings(): SignalWire\REST\Namespaces\Recordings +``` + +#### Returns + +`SignalWire\REST\Namespaces\Recordings` + +#### Source + +[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) + +Line 218. + +*** + +### registry + +Registry (10DLC brands, campaigns, orders, numbers). + +#### Signature + +```php +public function registry(): SignalWire\REST\Namespaces\Registry +``` + +#### Returns + +`SignalWire\REST\Namespaces\Registry` + +#### Source + +[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) + +Line 290. + +*** + +### shortCodes + +Short codes (list / get / update only). + +#### Signature + +```php +public function shortCodes(): SignalWire\REST\Namespaces\ShortCodes +``` + +#### Returns + +`SignalWire\REST\Namespaces\ShortCodes` + +#### Source + +[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) + +Line 263. + +*** + +### sipProfile + +SIP profile (singleton, get + update). + +#### Signature + +```php +public function sipProfile(): SignalWire\REST\Namespaces\SipProfile +``` + +#### Returns + +`SignalWire\REST\Namespaces\SipProfile` + +#### Source + +[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) + +Line 245. + +*** + +### verifiedCallers + +Verified callers. + +#### Signature + +```php +public function verifiedCallers(): SignalWire\REST\CrudResource +``` + +#### Returns + +`SignalWire\REST\CrudResource` + +#### Source + +[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) + +Line 236. + +*** + +### video + +Video API namespace (rooms, room\_sessions, room\_recordings, + +conferences, conference\_tokens, streams). + +#### Signature + +```php +public function video(): SignalWire\REST\Namespaces\Video +``` + +#### Returns + +`SignalWire\REST\Namespaces\Video` + +#### Source + +[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) + +Line 177. + +## Source + +[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) + +Line 31. diff --git a/fern/products/sdk-reference/php/rest/rest/signal-wire-rest-error/index.mdx b/fern/products/sdk-reference/php/rest/rest/signal-wire-rest-error/index.mdx new file mode 100644 index 0000000000..c2f775216a --- /dev/null +++ b/fern/products/sdk-reference/php/rest/rest/signal-wire-rest-error/index.mdx @@ -0,0 +1,123 @@ +--- +slug: "/reference/php/rest/rest/signal-wire-rest-error" +title: "SignalWireRestError" +sdk_label: "PHP SDK" +icon: "php" +lustri: + auto_generated: true + kind: "class" + language: "php" + qualified_name: "SignalWire\\REST\\SignalWireRestError" + parent: "rest.REST" + module: "rest.REST" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/SignalWireRestError.php" +--- +# `SignalWireRestError` + +Exception thrown when a SignalWire REST API request fails with a non-2xx status. + +## Signature + +```php +class SignalWireRestError extends RuntimeException implements Throwable, Stringable +``` + +## Inheritance + +**Extends:** `RuntimeException` + +**Implements:** `Throwable`, `Stringable` + +## Methods + +### \_\_construct + +#### Signature + +```php +public function __construct( + string $message, + int $statusCode = 0, + string $responseBody = '' +) +``` + +#### Parameters + + + + + + + +#### Source + +[`SignalWire/REST/SignalWireRestError.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/SignalWireRestError.php) + +Line 15. + +*** + +### \_\_toString + +#### Signature + +```php +public function __toString(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/SignalWireRestError.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/SignalWireRestError.php) + +Line 33. + +*** + +### getResponseBody + +#### Signature + +```php +public function getResponseBody(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/REST/SignalWireRestError.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/SignalWireRestError.php) + +Line 28. + +*** + +### getStatusCode + +#### Signature + +```php +public function getStatusCode(): int +``` + +#### Returns + +`int` + +#### Source + +[`SignalWire/REST/SignalWireRestError.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/SignalWireRestError.php) + +Line 23. + +## Source + +[`SignalWire/REST/SignalWireRestError.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/SignalWireRestError.php) + +Line 10. diff --git a/fern/products/sdk-reference/php/signal-wire/contexts/contexts/context-builder/index.mdx b/fern/products/sdk-reference/php/signal-wire/contexts/contexts/context-builder/index.mdx deleted file mode 100644 index 25ad075566..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/contexts/contexts/context-builder/index.mdx +++ /dev/null @@ -1,287 +0,0 @@ ---- -slug: "/reference/php/signal-wire/contexts/contexts/context-builder" -title: "ContextBuilder" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\Contexts\\ContextBuilder" - parent: "SignalWire\\Contexts" - module: "SignalWire.Contexts" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php" ---- -# `ContextBuilder` - -Builder for multi-step, multi-context AI agent workflows. - -A ContextBuilder owns one or more Contexts; each Context owns an -ordered list of Steps. Only one context and one step is active at a -time. Per chat turn, the runtime injects the current step's -instructions as a system message, then asks the LLM for a response. - -## Native tools auto-injected by the runtime - -When a step (or its enclosing context) declares valid\_steps or -valid\_contexts, the runtime auto-injects two native tools so the -model can navigate the flow: - -- next\_step(step: enum) — present when valid\_steps is set -- change\_context(context: enum) — present when valid\_contexts is set - -A third native tool — gather\_submit — is injected during gather\_info -questioning. These three names are reserved: validate() rejects any -agent that defines a SWAIG tool with one of them. See the -RESERVED\_NATIVE\_TOOL\_NAMES constant. - -## Function whitelisting (Step::setFunctions) - -Each step may declare a functions whitelist. The whitelist is -applied in-memory at the start of each LLM turn. CRITICALLY: if a -step does NOT declare a functions field, it INHERITS the previous -step's active set. See Step::setFunctions for details and examples. - -## Signature - -```php -class ContextBuilder -``` - -## Methods - -### \_\_construct - -Construct a builder. The optional $agent reference mirrors Python's - -ContextBuilder(agent) so callers (typically AgentBase) can hand the -builder a reference to the owning agent for tool-name collision -checks during validate(). - -If $agent has a method named getRegisteredToolNames() returning an -array of strings, validate() will use it automatically — no -separate attachToolNameSupplier() call required. - -#### Signature - -```php -public function __construct(?object $agent = NULL) -``` - -#### Parameters - - - -#### Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 1090. - -*** - -### addContext - -Add a new context and return it for further configuration. - -#### Signature - -```php -public function addContext(string $name): SignalWire\Contexts\Context -``` - -#### Parameters - - - -#### Returns - -`SignalWire\Contexts\Context` - -#### Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 1128. - -*** - -### attachToolNameSupplier - -Attach a callable that returns registered SWAIG tool names so - -validate() can check them against RESERVED\_NATIVE\_TOOL\_NAMES. -Called internally by AgentBase::defineContexts(). - -#### Signature - -```php -public function attachToolNameSupplier( - callable $supplier -): SignalWire\Contexts\ContextBuilder -``` - -#### Parameters - - - () => array<string> - - -#### Returns - -`SignalWire\Contexts\ContextBuilder` - -#### Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 1107. - -*** - -### createSimpleContext - -Create a builder pre-populated with a single named context. - -**Modifiers:** `static` - -#### Signature - -```php -public static function createSimpleContext(string $name): SignalWire\Contexts\ContextBuilder -``` - -#### Parameters - - - -#### Returns - -`SignalWire\Contexts\ContextBuilder` - -#### Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 1343. - -*** - -### getContext - -Get an existing context by name, or null if not found. - -#### Signature - -```php -public function getContext(string $name): ?SignalWire\Contexts\Context -``` - -#### Parameters - - - -#### Returns - -`?SignalWire\Contexts\Context` - -#### Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 1149. - -*** - -### hasContexts - -#### Signature - -```php -public function hasContexts(): bool -``` - -#### Returns - -`bool` - -#### Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 1154. - -*** - -### reset - -Remove all contexts, returning the builder to its initial state. - -Use this in a dynamic config callback when you need to rebuild -contexts from scratch for a specific request. - -#### Signature - -```php -public function reset(): SignalWire\Contexts\ContextBuilder -``` - -#### Returns - -`SignalWire\Contexts\ContextBuilder` - -#### Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 1118. - -*** - -### toArray - -Serialize all contexts in order. Validates before converting. - -#### Signature - -```php -public function toArray(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 1323. - -*** - -### validate - -Validate the contexts configuration. - -#### Signature - -```php -public function validate(): array -``` - -#### Returns - -`array` — Array of error strings (empty if valid) - -#### Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 1164. - -## Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 1058. diff --git a/fern/products/sdk-reference/php/signal-wire/contexts/contexts/context/index.mdx b/fern/products/sdk-reference/php/signal-wire/contexts/contexts/context/index.mdx deleted file mode 100644 index e478b93d60..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/contexts/contexts/context/index.mdx +++ /dev/null @@ -1,809 +0,0 @@ ---- -slug: "/reference/php/signal-wire/contexts/contexts/context" -title: "Context" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\Contexts\\Context" - parent: "SignalWire\\Contexts" - module: "SignalWire.Contexts" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php" ---- -# `Context` - -## Signature - -```php -class Context -``` - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(string $name) -``` - -#### Parameters - - - -#### Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 587. - -*** - -### addBullets - -#### Signature - -```php -public function addBullets(string $title, array $bullets): SignalWire\Contexts\Context -``` - -#### Parameters - - - - - -#### Returns - -`SignalWire\Contexts\Context` - -#### Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 715. - -*** - -### addEnterFiller - -Add enter fillers for a specific language. - -Mirrors Python's Context.add\_enter\_filler(language\_code: str, fillers: -List\[str]) — pass a list of phrases to associate with this language code. - -#### Signature - -```php -public function addEnterFiller( - string $language_code, - array $fillers -): SignalWire\Contexts\Context -``` - -#### Parameters - - - Language code (e.g. "en-US", "es") or "default" for catch-all. - - - - List of filler phrases. - - -#### Returns - -`SignalWire\Contexts\Context` - -#### Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 880. - -*** - -### addExitFiller - -Add exit fillers for a specific language. - -Mirrors Python's Context.add\_exit\_filler(language\_code: str, fillers: -List\[str]) — pass a list of phrases to associate with this language code. - -#### Signature - -```php -public function addExitFiller( - string $language_code, - array $fillers -): SignalWire\Contexts\Context -``` - -#### Parameters - - - Language code (e.g. "en-US", "es") or "default" for catch-all. - - - - List of filler phrases. - - -#### Returns - -`SignalWire\Contexts\Context` - -#### Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 902. - -*** - -### addSection - -#### Signature - -```php -public function addSection(string $title, string $body): SignalWire\Contexts\Context -``` - -#### Parameters - - - - - -#### Returns - -`SignalWire\Contexts\Context` - -#### Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 704. - -*** - -### addStep - -Add a new step to this context. - -When called with only $name the returned Step can be configured with -the usual method-chaining API. When the optional keyword arguments are -supplied the step is fully configured in one call: - -#### Signature - -```php -public function addStep( - string $name, - ?string $task = NULL, - ?array $bullets = NULL, - ?string $criteria = NULL, - $functions = NULL, - ?array $valid_steps = NULL -): SignalWire\Contexts\Step -``` - -#### Parameters - - - Step name (must be unique within the context). - - - - Text for the "Task" section (≡ addSection("Task", $task)). - - - - List of bullet strings for the "Process" section (≡ addBullets("Process", $bullets)). Requires $task to also be set. - - - - Step-completion criteria (≡ setStepCriteria()). - - - - Tool names the step may call, or 'none' (≡ setFunctions()). - - - - Names of steps the agent may transition to (≡ setValidSteps()). - - -#### Returns - -`SignalWire\Contexts\Step` — The configured Step object for optional further chaining. - -#### Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 619. - -*** - -### addSystemBullets - -#### Signature - -```php -public function addSystemBullets( - string $title, - array $bullets -): SignalWire\Contexts\Context -``` - -#### Parameters - - - - - -#### Returns - -`SignalWire\Contexts\Context` - -#### Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 750. - -*** - -### addSystemSection - -#### Signature - -```php -public function addSystemSection( - string $title, - string $body -): SignalWire\Contexts\Context -``` - -#### Parameters - - - - - -#### Returns - -`SignalWire\Contexts\Context` - -#### Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 739. - -*** - -### getInitialStep - -#### Signature - -```php -public function getInitialStep(): ?string -``` - -#### Returns - -`?string` - -#### Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 777. - -*** - -### getName - -#### Signature - -```php -public function getName(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 592. - -*** - -### getStep - -#### Signature - -```php -public function getStep(string $name): ?SignalWire\Contexts\Step -``` - -#### Parameters - - - -#### Returns - -`?SignalWire\Contexts\Step` - -#### Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 659. - -*** - -### getStepOrder - -#### Signature - -```php -public function getStepOrder(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 927. - -*** - -### getSteps - -#### Signature - -```php -public function getSteps(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 919. - -*** - -### getValidContexts - -#### Signature - -```php -public function getValidContexts(): ?array -``` - -#### Returns - -`?array` - -#### Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 932. - -*** - -### moveStep - -#### Signature - -```php -public function moveStep(string $name, int $position): SignalWire\Contexts\Context -``` - -#### Parameters - - - - - -#### Returns - -`SignalWire\Contexts\Context` - -#### Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 676. - -*** - -### removeStep - -#### Signature - -```php -public function removeStep(string $name): SignalWire\Contexts\Context -``` - -#### Parameters - - - -#### Returns - -`SignalWire\Contexts\Context` - -#### Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 664. - -*** - -### setConsolidate - -#### Signature - -```php -public function setConsolidate(bool $consolidate): SignalWire\Contexts\Context -``` - -#### Parameters - - - -#### Returns - -`SignalWire\Contexts\Context` - -#### Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 800. - -*** - -### setEnterFillers - -Set fillers played by the AI when entering this context. - -#### Signature - -```php -public function setEnterFillers(array $enter_fillers): SignalWire\Contexts\Context -``` - -#### Parameters - - - Map of language code ("en-US" / "default") to a list of phrases. - - -#### Returns - -`SignalWire\Contexts\Context` - -#### Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 852. - -*** - -### setExitFillers - -Set fillers played by the AI when leaving this context. - -#### Signature - -```php -public function setExitFillers(array $exit_fillers): SignalWire\Contexts\Context -``` - -#### Parameters - - - Map of language code ("en-US" / "default") to a list of phrases. - - -#### Returns - -`SignalWire\Contexts\Context` - -#### Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 864. - -*** - -### setFullReset - -#### Signature - -```php -public function setFullReset(bool $fullReset): SignalWire\Contexts\Context -``` - -#### Parameters - - - -#### Returns - -`SignalWire\Contexts\Context` - -#### Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 806. - -*** - -### setInitialStep - -Set which step the context starts on when entered. - -By default, a context starts on its first step (index 0). Use -this to skip a preamble step on re-entry via change\_context. - -#### Signature - -```php -public function setInitialStep(string $stepName): SignalWire\Contexts\Context -``` - -#### Parameters - - - name of the step to start on. - - -#### Returns - -`SignalWire\Contexts\Context` - -#### Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 771. - -*** - -### setIsolated - -Mark this context as isolated — entering it wipes conversation - -history. - -When $isolated = true and the context is entered via -change\_context, the runtime wipes the conversation array. The -model starts fresh with only the new context's system\_prompt + -step instructions, with no memory of prior turns. - -EXCEPTION — reset overrides the wipe: -If the context also has a reset configuration (via -setConsolidate or setFullReset), the wipe is skipped in -favor of the reset behavior. Use reset with consolidate=true -to summarize prior history into a single message instead of -dropping it entirely. - -Use cases: switching to a sensitive billing flow that should -not see prior small-talk; handing off to a different agent -persona; resetting after a long off-topic detour. - -#### Signature - -```php -public function setIsolated(bool $isolated): SignalWire\Contexts\Context -``` - -#### Parameters - - - -#### Returns - -`SignalWire\Contexts\Context` - -#### Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 838. - -*** - -### setPostPrompt - -#### Signature - -```php -public function setPostPrompt(string $postPrompt): SignalWire\Contexts\Context -``` - -#### Parameters - - - -#### Returns - -`SignalWire\Contexts\Context` - -#### Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 794. - -*** - -### setPrompt - -#### Signature - -```php -public function setPrompt(string $prompt): SignalWire\Contexts\Context -``` - -#### Parameters - - - -#### Returns - -`SignalWire\Contexts\Context` - -#### Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 693. - -*** - -### setSystemPrompt - -#### Signature - -```php -public function setSystemPrompt(string $systemPrompt): SignalWire\Contexts\Context -``` - -#### Parameters - - - -#### Returns - -`SignalWire\Contexts\Context` - -#### Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 728. - -*** - -### setUserPrompt - -#### Signature - -```php -public function setUserPrompt(string $userPrompt): SignalWire\Contexts\Context -``` - -#### Parameters - - - -#### Returns - -`SignalWire\Contexts\Context` - -#### Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 812. - -*** - -### setValidContexts - -#### Signature - -```php -public function setValidContexts(array $contexts): SignalWire\Contexts\Context -``` - -#### Parameters - - - -#### Returns - -`SignalWire\Contexts\Context` - -#### Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 782. - -*** - -### setValidSteps - -#### Signature - -```php -public function setValidSteps(array $steps): SignalWire\Contexts\Context -``` - -#### Parameters - - - -#### Returns - -`SignalWire\Contexts\Context` - -#### Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 788. - -*** - -### toArray - -#### Signature - -```php -public function toArray(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 965. - -## Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 546. diff --git a/fern/products/sdk-reference/php/signal-wire/contexts/contexts/gather-info/index.mdx b/fern/products/sdk-reference/php/signal-wire/contexts/contexts/gather-info/index.mdx deleted file mode 100644 index 028cbbd477..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/contexts/contexts/gather-info/index.mdx +++ /dev/null @@ -1,161 +0,0 @@ ---- -slug: "/reference/php/signal-wire/contexts/contexts/gather-info" -title: "GatherInfo" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\Contexts\\GatherInfo" - parent: "SignalWire\\Contexts" - module: "SignalWire.Contexts" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php" ---- -# `GatherInfo` - -## Signature - -```php -class GatherInfo -``` - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct( - ?string $outputKey = NULL, - ?string $completionAction = NULL, - ?string $prompt = NULL -) -``` - -#### Parameters - - - - - - - -#### Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 99. - -*** - -### addQuestion - -Add a question to gather. - -#### Signature - -```php -public function addQuestion( - string $key, - string $question, - array $kwargs = array ( -) -): SignalWire\Contexts\GatherInfo -``` - -#### Parameters - - - Key name for storing the answer in global\_data. - - - - The question text to ask. - - - - Optional named arguments forwarded to GatherQuestion. - - -#### Returns - -`SignalWire\Contexts\GatherInfo` - -#### Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 117. - -*** - -### getCompletionAction - -#### Signature - -```php -public function getCompletionAction(): ?string -``` - -#### Returns - -`?string` - -#### Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 138. - -*** - -### getQuestions - -#### Signature - -```php -public function getQuestions(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 133. - -*** - -### toArray - -#### Signature - -```php -public function toArray(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 143. - -## Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 91. diff --git a/fern/products/sdk-reference/php/signal-wire/contexts/contexts/gather-question/index.mdx b/fern/products/sdk-reference/php/signal-wire/contexts/contexts/gather-question/index.mdx deleted file mode 100644 index 3607155dc5..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/contexts/contexts/gather-question/index.mdx +++ /dev/null @@ -1,116 +0,0 @@ ---- -slug: "/reference/php/signal-wire/contexts/contexts/gather-question" -title: "GatherQuestion" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\Contexts\\GatherQuestion" - parent: "SignalWire\\Contexts" - module: "SignalWire.Contexts" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php" ---- -# `GatherQuestion` - -## Signature - -```php -class GatherQuestion -``` - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct( - string $key, - string $question, - string $type = 'string', - bool $confirm = false, - ?string $prompt = NULL, - ?array $functions = NULL -) -``` - -#### Parameters - - - Key name for storing the answer in global\_data. - - - - The question text to ask. - - - - JSON schema type for the answer (default 'string'). - - - - If true, the model must confirm the answer. - - - - Extra instruction text appended after the question. - - - - Functions to unlock for this question. - - -#### Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 44. - -*** - -### getKey - -#### Signature - -```php -public function getKey(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 60. - -*** - -### toArray - -#### Signature - -```php -public function toArray(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 65. - -## Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 27. diff --git a/fern/products/sdk-reference/php/signal-wire/contexts/contexts/index.mdx b/fern/products/sdk-reference/php/signal-wire/contexts/contexts/index.mdx deleted file mode 100644 index 945dc0bd9d..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/contexts/contexts/index.mdx +++ /dev/null @@ -1,35 +0,0 @@ ---- -slug: "/reference/php/signal-wire/contexts/contexts" -title: "Contexts" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "module" - language: "php" - qualified_name: "SignalWire\\Contexts" - module: "SignalWire.Contexts" ---- -# `Contexts` - -## Signature - -```php -namespace SignalWire\Contexts -``` - -## Classes - - - - - - Builder for multi-step, multi-context AI agent workflows. - - - - - - - - diff --git a/fern/products/sdk-reference/php/signal-wire/contexts/contexts/step/index.mdx b/fern/products/sdk-reference/php/signal-wire/contexts/contexts/step/index.mdx deleted file mode 100644 index 6dc48bbff2..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/contexts/contexts/step/index.mdx +++ /dev/null @@ -1,668 +0,0 @@ ---- -slug: "/reference/php/signal-wire/contexts/contexts/step" -title: "Step" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\Contexts\\Step" - parent: "SignalWire\\Contexts" - module: "SignalWire.Contexts" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php" ---- -# `Step` - -## Signature - -```php -class Step -``` - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(string $name) -``` - -#### Parameters - - - -#### Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 197. - -*** - -### addBullets - -Add a POM section with bullet points. - -#### Signature - -```php -public function addBullets(string $title, array $bullets): SignalWire\Contexts\Step -``` - -#### Parameters - - - - - -#### Returns - -`SignalWire\Contexts\Step` - -#### Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 238. - -*** - -### addGatherQuestion - -Add a question to this step's gather\_info. Initializes - -gather\_info if not yet set. - -IMPORTANT — gather mode locks function access: -While the model is asking gather questions, the runtime -forcibly deactivates ALL of the step's other functions. The -only callable tools during a gather question are: - -``` -- gather_submit (the native answer-submission tool) -- Whatever names you pass in this question's 'functions' - option -``` - -next\_step and change\_context are also filtered out — the -model cannot navigate away until the gather completes. This -is by design: it forces a tight ask → submit → next-question -loop. - -If a question needs to call out to a tool (e.g. validate an -email, geocode a ZIP), list that tool name in this question's -'functions' option. Functions listed here are active ONLY for -this question. - -#### Signature - -```php -public function addGatherQuestion( - string $key, - string $question, - string $type = 'string', - bool $confirm = false, - ?string $prompt = NULL, - ?array $functions = NULL -): SignalWire\Contexts\Step -``` - -#### Parameters - - - - - - - - - - - - - -#### Returns - -`SignalWire\Contexts\Step` - -#### Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 392. - -*** - -### addSection - -Add a POM section with a body paragraph. - -#### Signature - -```php -public function addSection(string $title, string $body): SignalWire\Contexts\Step -``` - -#### Parameters - - - - - -#### Returns - -`SignalWire\Contexts\Step` - -#### Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 224. - -*** - -### clearSections - -Clear all content (both text and sections). - -#### Signature - -```php -public function clearSections(): SignalWire\Contexts\Step -``` - -#### Returns - -`SignalWire\Contexts\Step` - -#### Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 252. - -*** - -### getGatherInfo - -#### Signature - -```php -public function getGatherInfo(): ?SignalWire\Contexts\GatherInfo -``` - -#### Returns - -`?SignalWire\Contexts\GatherInfo` - -#### Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 450. - -*** - -### getName - -#### Signature - -```php -public function getName(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 202. - -*** - -### getValidContexts - -#### Signature - -```php -public function getValidContexts(): ?array -``` - -#### Returns - -`?array` - -#### Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 445. - -*** - -### getValidSteps - -#### Signature - -```php -public function getValidSteps(): ?array -``` - -#### Returns - -`?array` - -#### Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 440. - -*** - -### setEnd - -Mark this step as terminal for the step flow. - -IMPORTANT: $end = true does NOT end the conversation or hang up -the call. It exits step mode entirely after this step executes -— clearing the steps list, current step index, valid\_steps, and -valid\_contexts. The agent keeps running, but operates only -under the base system prompt and the context-level prompt; no -more step instructions are injected and no more next\_step tool -is offered. - -To actually end the call, call a hangup tool or define a -hangup hook. - -#### Signature - -```php -public function setEnd(bool $end): SignalWire\Contexts\Step -``` - -#### Parameters - - - -#### Returns - -`SignalWire\Contexts\Step` - -#### Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 329. - -*** - -### setFunctions - -Set which non-internal functions are callable while this step is - -active. - -IMPORTANT — inheritance behavior: -If you do NOT call this method, the step inherits whichever -function set was active on the previous step (or the previous -context's last step). The server-side runtime only resets the -active set when a step explicitly declares its `functions` -field. This is the most common source of bugs in multi-step -agents: forgetting setFunctions() on a later step lets the -previous step's tools leak through. Best practice is to call -setFunctions() explicitly on every step that should differ -from the previous one. - -Keep the per-step active set small: LLM tool selection accuracy -degrades noticeably past ~7-8 simultaneously-active tools per -call. Use per-step whitelisting to partition large tool -collections. - -Internal functions (e.g. gather\_submit, hangup hook) are ALWAYS -protected and cannot be deactivated by this whitelist. The -native navigation tools next\_step and change\_context are -injected automatically when setValidSteps / setValidContexts is -used; they are not affected by this list and do not need to -appear in it. - -#### Signature - -```php -public function setFunctions($functions): SignalWire\Contexts\Step -``` - -#### Parameters - - - One of: - - -#### Returns - -`SignalWire\Contexts\Step` - -#### Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 297. - -*** - -### setGatherInfo - -Initialize the gather\_info configuration for this step. Questions are - -presented one at a time via dynamic step instruction re-injection, -producing zero tool\_call/tool\_result entries in LLM-visible history. - -After calling this, use addGatherQuestion() to define questions. - -#### Signature - -```php -public function setGatherInfo( - ?string $output_key = NULL, - ?string $completion_action = NULL, - ?string $prompt = NULL -): SignalWire\Contexts\Step -``` - -#### Parameters - - - Key in global\_data to store answers under. - - - - Where to go when all questions are answered ('next\_step', a step name, or null). - - - - Preamble text injected once when entering the gather step. - - -#### Returns - -`SignalWire\Contexts\Step` - -#### Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 360. - -*** - -### setResetConsolidate - -#### Signature - -```php -public function setResetConsolidate(bool $consolidate): SignalWire\Contexts\Step -``` - -#### Parameters - - - -#### Returns - -`SignalWire\Contexts\Step` - -#### Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 426. - -*** - -### setResetFullReset - -#### Signature - -```php -public function setResetFullReset(bool $fullReset): SignalWire\Contexts\Step -``` - -#### Parameters - - - -#### Returns - -`SignalWire\Contexts\Step` - -#### Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 432. - -*** - -### setResetSystemPrompt - -#### Signature - -```php -public function setResetSystemPrompt(string $systemPrompt): SignalWire\Contexts\Step -``` - -#### Parameters - - - -#### Returns - -`SignalWire\Contexts\Step` - -#### Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 414. - -*** - -### setResetUserPrompt - -#### Signature - -```php -public function setResetUserPrompt(string $userPrompt): SignalWire\Contexts\Step -``` - -#### Parameters - - - -#### Returns - -`SignalWire\Contexts\Step` - -#### Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 420. - -*** - -### setSkipToNextStep - -#### Signature - -```php -public function setSkipToNextStep(bool $skip): SignalWire\Contexts\Step -``` - -#### Parameters - - - -#### Returns - -`SignalWire\Contexts\Step` - -#### Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 341. - -*** - -### setSkipUserTurn - -#### Signature - -```php -public function setSkipUserTurn(bool $skip): SignalWire\Contexts\Step -``` - -#### Parameters - - - -#### Returns - -`SignalWire\Contexts\Step` - -#### Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 335. - -*** - -### setStepCriteria - -#### Signature - -```php -public function setStepCriteria(string $criteria): SignalWire\Contexts\Step -``` - -#### Parameters - - - -#### Returns - -`SignalWire\Contexts\Step` - -#### Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 259. - -*** - -### setText - -Set the step's prompt text directly. Mutually exclusive with POM sections. - -#### Signature - -```php -public function setText(string $text): SignalWire\Contexts\Step -``` - -#### Parameters - - - -#### Returns - -`SignalWire\Contexts\Step` - -#### Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 210. - -*** - -### setValidContexts - -#### Signature - -```php -public function setValidContexts(array $contexts): SignalWire\Contexts\Step -``` - -#### Parameters - - - -#### Returns - -`SignalWire\Contexts\Step` - -#### Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 309. - -*** - -### setValidSteps - -#### Signature - -```php -public function setValidSteps(array $steps): SignalWire\Contexts\Step -``` - -#### Parameters - - - -#### Returns - -`SignalWire\Contexts\Step` - -#### Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 303. - -*** - -### toArray - -#### Signature - -```php -public function toArray(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 489. - -## Source - -[`SignalWire/Contexts/ContextBuilder.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Contexts/ContextBuilder.php) - -Line 169. diff --git a/fern/products/sdk-reference/php/signal-wire/data-map/data-map/index.mdx b/fern/products/sdk-reference/php/signal-wire/data-map/data-map/index.mdx deleted file mode 100644 index 8c3f491adc..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/data-map/data-map/index.mdx +++ /dev/null @@ -1,600 +0,0 @@ ---- -slug: "/reference/php/signal-wire/data-map/data-map" -title: "DataMap" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\DataMap" - module: "SignalWire.DataMap" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/DataMap/DataMap.php" ---- -# `DataMap` - -## Signature - -```php -class DataMap -``` - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(string $functionName) -``` - -#### Parameters - - - -#### Source - -[`SignalWire/DataMap/DataMap.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/DataMap/DataMap.php) - -Line 33. - -*** - -### body - -Set body on the last webhook. - -#### Signature - -```php -public function body(array $data): SignalWire\DataMap\DataMap -``` - -#### Parameters - - - -#### Returns - -`SignalWire\DataMap\DataMap` - -#### Source - -[`SignalWire/DataMap/DataMap.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/DataMap/DataMap.php) - -Line 199. - -*** - -### createExpressionTool - -Build a complete SWAIG function definition with expressions only. - -**Modifiers:** `static` - -#### Signature - -```php -public static function createExpressionTool( - string $name, - string $purpose, - array $parameters, - array $expressions -): array -``` - -#### Parameters - - - - - - - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/DataMap/DataMap.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/DataMap/DataMap.php) - -Line 379. - -*** - -### createSimpleApiTool - -Build a complete SWAIG function definition with a single webhook. - -**Modifiers:** `static` - -#### Signature - -```php -public static function createSimpleApiTool( - string $name, - string $purpose, - array $parameters, - string $method, - string $url, - mixed $output, - array $headers = array ( -) -): array -``` - -#### Parameters - - - - - - - - - - - - - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/DataMap/DataMap.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/DataMap/DataMap.php) - -Line 344. - -*** - -### description - -Alias for purpose(). Sets the LLM-facing tool description. - -This string is read by the model to decide WHEN to call this -tool. See purpose() for bad-vs-good examples. - -#### Signature - -```php -public function description(string $desc): SignalWire\DataMap\DataMap -``` - -#### Parameters - - - -#### Returns - -`SignalWire\DataMap\DataMap` - -#### Source - -[`SignalWire/DataMap/DataMap.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/DataMap/DataMap.php) - -Line 68. - -*** - -### errorKeys - -Set error\_keys on the last webhook. - -#### Signature - -```php -public function errorKeys(array $keys): SignalWire\DataMap\DataMap -``` - -#### Parameters - - - -#### Returns - -`SignalWire\DataMap\DataMap` - -#### Source - -[`SignalWire/DataMap/DataMap.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/DataMap/DataMap.php) - -Line 263. - -*** - -### expression - -Add an expression rule. - -#### Signature - -```php -public function expression( - string $testValue, - string $pattern, - mixed $output, - mixed $nomatchOutput = NULL -): SignalWire\DataMap\DataMap -``` - -#### Parameters - - - - - - - - - -#### Returns - -`SignalWire\DataMap\DataMap` - -#### Source - -[`SignalWire/DataMap/DataMap.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/DataMap/DataMap.php) - -Line 122. - -*** - -### fallbackOutput - -Set global fallback output. - -#### Signature - -```php -public function fallbackOutput(mixed $result): SignalWire\DataMap\DataMap -``` - -#### Parameters - - - FunctionResult, array, or string - - -#### Returns - -`SignalWire\DataMap\DataMap` - -#### Source - -[`SignalWire/DataMap/DataMap.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/DataMap/DataMap.php) - -Line 251. - -*** - -### foreach - -Set foreach on the last webhook. - -#### Signature - -```php -public function foreach(array $config): SignalWire\DataMap\DataMap -``` - -#### Parameters - - - -#### Returns - -`SignalWire\DataMap\DataMap` - -#### Source - -[`SignalWire/DataMap/DataMap.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/DataMap/DataMap.php) - -Line 225. - -*** - -### globalErrorKeys - -Set global error\_keys. - -#### Signature - -```php -public function globalErrorKeys(array $keys): SignalWire\DataMap\DataMap -``` - -#### Parameters - - - -#### Returns - -`SignalWire\DataMap\DataMap` - -#### Source - -[`SignalWire/DataMap/DataMap.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/DataMap/DataMap.php) - -Line 276. - -*** - -### output - -Set output on the last webhook. - -#### Signature - -```php -public function output(mixed $result): SignalWire\DataMap\DataMap -``` - -#### Parameters - - - FunctionResult, array, or string - - -#### Returns - -`SignalWire\DataMap\DataMap` - -#### Source - -[`SignalWire/DataMap/DataMap.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/DataMap/DataMap.php) - -Line 238. - -*** - -### parameter - -Add a parameter to this data-map tool — the `$description` is - -LLM-FACING. - -Each parameter description is rendered into the OpenAI tool -schema under parameters.properties.<name>.description and sent -to the model. The model uses it to decide HOW to fill in the -argument from user speech. It is prompt engineering, not -developer FYI. - -Bad vs good: - -BAD : ->parameter('city', 'string', 'the city') -GOOD: ->parameter('city', 'string', -'The name of the city to get weather for, e.g. ' -. '"San Francisco". Ask the user if they did not ' -. 'provide one. Include the state or country if the ' -. 'city name is ambiguous.') - -#### Signature - -```php -public function parameter( - string $name, - string $type, - string $description, - bool $required = false, - array $enum = array ( -) -): SignalWire\DataMap\DataMap -``` - -#### Parameters - - - - - - - - - - - -#### Returns - -`SignalWire\DataMap\DataMap` - -#### Source - -[`SignalWire/DataMap/DataMap.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/DataMap/DataMap.php) - -Line 94. - -*** - -### params - -Set params on the last webhook. - -#### Signature - -```php -public function params(array $data): SignalWire\DataMap\DataMap -``` - -#### Parameters - - - -#### Returns - -`SignalWire\DataMap\DataMap` - -#### Source - -[`SignalWire/DataMap/DataMap.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/DataMap/DataMap.php) - -Line 212. - -*** - -### purpose - -Set the LLM-facing tool description (the "purpose"). PROMPT - -ENGINEERING, not developer documentation. - -The description string is rendered into the OpenAI tool schema -`description` field on every LLM turn. The model reads it to -decide WHEN to call this tool. A vague purpose() is the #1 -cause of "the model has the right tool but doesn't call it" -failures with data-map tools. - -Bad vs good: - -BAD : ->purpose('weather api') -GOOD: ->purpose('Get the current weather conditions and ' -. 'forecast for a specific city. Use this ' -. 'whenever the user asks about weather, ' -. 'temperature, rain, or similar conditions ' -. 'in a named location.') - -#### Signature - -```php -public function purpose(string $desc): SignalWire\DataMap\DataMap -``` - -#### Parameters - - - -#### Returns - -`SignalWire\DataMap\DataMap` - -#### Source - -[`SignalWire/DataMap/DataMap.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/DataMap/DataMap.php) - -Line 57. - -*** - -### toSwaigFunction - -Serialize to a SWAIG function definition array. - -#### Signature - -```php -public function toSwaigFunction(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/DataMap/DataMap.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/DataMap/DataMap.php) - -Line 287. - -*** - -### webhook - -Add a webhook definition. - -#### Signature - -```php -public function webhook( - string $method, - string $url, - array $headers = array ( -), - string $formParam = '', - bool $inputArgsAsParams = false, - array $requireArgs = array ( -) -): SignalWire\DataMap\DataMap -``` - -#### Parameters - - - - - - - - - - - - - -#### Returns - -`SignalWire\DataMap\DataMap` - -#### Source - -[`SignalWire/DataMap/DataMap.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/DataMap/DataMap.php) - -Line 148. - -*** - -### webhookExpressions - -Set expressions on the last webhook. - -#### Signature - -```php -public function webhookExpressions(array $expressions): SignalWire\DataMap\DataMap -``` - -#### Parameters - - - -#### Returns - -`SignalWire\DataMap\DataMap` - -#### Source - -[`SignalWire/DataMap/DataMap.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/DataMap/DataMap.php) - -Line 186. - -## Source - -[`SignalWire/DataMap/DataMap.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/DataMap/DataMap.php) - -Line 9. diff --git a/fern/products/sdk-reference/php/signal-wire/logging/logging/index.mdx b/fern/products/sdk-reference/php/signal-wire/logging/logging/index.mdx deleted file mode 100644 index 6bde0c385a..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/logging/logging/index.mdx +++ /dev/null @@ -1,147 +0,0 @@ ---- -slug: "/reference/php/signal-wire/logging/logging" -title: "Logging" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "module" - language: "php" - qualified_name: "SignalWire\\Logging" - module: "SignalWire.Logging" ---- -# `Logging` - -## Signature - -```php -namespace SignalWire\Logging -``` - -## Classes - - - - - - Cross-language SDK contract for serverless / deployment-mode detection. - - - -## Enums - -### LogLevel - -Logger severity levels as a typed, compile-time-checked closed set. - -\{@see \SignalWire\Logging\Logger::setLevel()\} and \{@see Logger::shouldLog()\} -accept this enum OR a string. The enum gives editor autocompletion and makes -a typo fail at the call site (a bare string like `'wrn'` only fails silently -at runtime — `setLevel()` ignores unknown levels); strings keep parity with -the Python reference (which configures stdlib `logging` with bare names) and -remain available for callers reading a level out of config/env. - -``` -$logger->setLevel(LogLevel::Warn); // typed, autocompleted -$logger->setLevel('warn'); // string still works (parity) -``` - -The backing values are the exact lowercase strings the Logger keys on. - -#### Signature - -```php -final enum LogLevel implements UnitEnum, BackedEnum -``` - -#### Inheritance - -**Implements:** `UnitEnum`, `BackedEnum` - -#### Properties - - - - - -#### Constants - - - - - - - - - -#### Variants - - - - - - - - - -#### Methods - -##### cases - -**Modifiers:** `static` - -###### Signature - -```php -public static function cases(): array -``` - -###### Returns - -`array` - -*** - -##### from - -**Modifiers:** `static` - -###### Signature - -```php -public static function from(string|int $value): static -``` - -###### Parameters - - - -###### Returns - -`static` - -*** - -##### tryFrom - -**Modifiers:** `static` - -###### Signature - -```php -public static function tryFrom(string|int $value): ?static -``` - -###### Parameters - - - -###### Returns - -`?static` - -#### Source - -[`SignalWire/Logging/LogLevel.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Logging/LogLevel.php) - -Line 22. diff --git a/fern/products/sdk-reference/php/signal-wire/logging/logging/logger/index.mdx b/fern/products/sdk-reference/php/signal-wire/logging/logging/logger/index.mdx deleted file mode 100644 index 91113d3990..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/logging/logging/logger/index.mdx +++ /dev/null @@ -1,281 +0,0 @@ ---- -slug: "/reference/php/signal-wire/logging/logging/logger" -title: "Logger" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\Logging\\Logger" - parent: "SignalWire\\Logging" - module: "SignalWire.Logging" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Logging/Logger.php" ---- -# `Logger` - -## Signature - -```php -class Logger -``` - -## Methods - -### debug - -#### Signature - -```php -public function debug(string ...$messages): void -``` - -#### Parameters - - - -#### Source - -[`SignalWire/Logging/Logger.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Logging/Logger.php) - -Line 99. - -*** - -### error - -#### Signature - -```php -public function error(string ...$messages): void -``` - -#### Parameters - - - -#### Source - -[`SignalWire/Logging/Logger.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Logging/Logger.php) - -Line 114. - -*** - -### getLevel - -#### Signature - -```php -public function getLevel(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Logging/Logger.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Logging/Logger.php) - -Line 56. - -*** - -### getLogger - -**Modifiers:** `static` - -#### Signature - -```php -public static function getLogger(string $name = 'signalwire'): SignalWire\Logging\Logger -``` - -#### Parameters - - - -#### Returns - -`SignalWire\Logging\Logger` - -#### Source - -[`SignalWire/Logging/Logger.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Logging/Logger.php) - -Line 35. - -*** - -### getName - -#### Signature - -```php -public function getName(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Logging/Logger.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Logging/Logger.php) - -Line 51. - -*** - -### info - -#### Signature - -```php -public function info(string ...$messages): void -``` - -#### Parameters - - - -#### Source - -[`SignalWire/Logging/Logger.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Logging/Logger.php) - -Line 104. - -*** - -### isSuppressed - -#### Signature - -```php -public function isSuppressed(): bool -``` - -#### Returns - -`bool` - -#### Source - -[`SignalWire/Logging/Logger.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Logging/Logger.php) - -Line 74. - -*** - -### reset - -Reset all logger instances (for testing). - -**Modifiers:** `static` - -#### Signature - -```php -public static function reset(): void -``` - -#### Source - -[`SignalWire/Logging/Logger.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Logging/Logger.php) - -Line 46. - -*** - -### setLevel - -#### Signature - -```php -public function setLevel(SignalWire\Logging\LogLevel|string $level): void -``` - -#### Parameters - - - severity level — the typed \{@see LogLevel\} enum (typo-checked at the call site) or a bare string (parity with the Python reference). Unknown string levels are ignored, as before. - - -#### Source - -[`SignalWire/Logging/Logger.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Logging/Logger.php) - -Line 66. - -*** - -### setSuppressed - -#### Signature - -```php -public function setSuppressed(bool $suppressed): void -``` - -#### Parameters - - - -#### Source - -[`SignalWire/Logging/Logger.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Logging/Logger.php) - -Line 79. - -*** - -### shouldLog - -#### Signature - -```php -public function shouldLog(SignalWire\Logging\LogLevel|string $level): bool -``` - -#### Parameters - - - severity to test — the typed \{@see LogLevel\} enum or a bare string (parity with Python). - - -#### Returns - -`bool` - -#### Source - -[`SignalWire/Logging/Logger.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Logging/Logger.php) - -Line 88. - -*** - -### warn - -#### Signature - -```php -public function warn(string ...$messages): void -``` - -#### Parameters - - - -#### Source - -[`SignalWire/Logging/Logger.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Logging/Logger.php) - -Line 109. - -## Source - -[`SignalWire/Logging/Logger.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Logging/Logger.php) - -Line 7. diff --git a/fern/products/sdk-reference/php/signal-wire/logging/logging/logging-config/index.mdx b/fern/products/sdk-reference/php/signal-wire/logging/logging/logging-config/index.mdx deleted file mode 100644 index 2c8c9433d2..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/logging/logging/logging-config/index.mdx +++ /dev/null @@ -1,97 +0,0 @@ ---- -slug: "/reference/php/signal-wire/logging/logging/logging-config" -title: "LoggingConfig" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\Logging\\LoggingConfig" - parent: "SignalWire\\Logging" - module: "SignalWire.Logging" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Logging/LoggingConfig.php" ---- -# `LoggingConfig` - -Cross-language SDK contract for serverless / deployment-mode detection. - -Mirrors signalwire.core.logging\_config.get\_execution\_mode and -signalwire.utils.is\_serverless\_mode in the Python reference. Order -of precedence (FIRST match wins): - -1. GATEWAY\_INTERFACE -> 'cgi' -2. AWS\_LAMBDA\_FUNCTION\_NAME or LAMBDA\_TASK\_ROOT -> 'lambda' -3. FUNCTION\_TARGET, K\_SERVICE, or GOOGLE\_CLOUD\_PROJECT -> 'google\_cloud\_function' -4. AZURE\_FUNCTIONS\_ENVIRONMENT, FUNCTIONS\_WORKER\_RUNTIME, or - AzureWebJobsStorage -> 'azure\_function' -5. otherwise -> 'server' - -The static methods getExecutionMode() and isServerlessMode() project -onto the Python free functions - -- signalwire.core.logging\_config.get\_execution\_mode -- signalwire.utils.is\_serverless\_mode - via scripts/enumerate\_signatures.py FREE\_FUNCTION\_PROJECTIONS. - -**Modifiers:** `final` - -## Signature - -```php -final class LoggingConfig -``` - -## Methods - -### getExecutionMode - -Detect the SDK's deployment environment based on well-known - -environment variables. - -**Modifiers:** `static` - -#### Signature - -```php -public static function getExecutionMode(): string -``` - -#### Returns - -`string` — One of 'cgi', 'lambda', 'google\_cloud\_function', 'azure\_function', or 'server'. - -#### Source - -[`SignalWire/Logging/LoggingConfig.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Logging/LoggingConfig.php) - -Line 43. - -*** - -### isServerlessMode - -**Modifiers:** `static` - -#### Signature - -```php -public static function isServerlessMode(): bool -``` - -#### Returns - -`bool` — True when running in any serverless invocation environment (anything other than 'server'). - -#### Source - -[`SignalWire/Logging/LoggingConfig.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Logging/LoggingConfig.php) - -Line 72. - -## Source - -[`SignalWire/Logging/LoggingConfig.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Logging/LoggingConfig.php) - -Line 34. diff --git a/fern/products/sdk-reference/php/signal-wire/pom/pom/index.mdx b/fern/products/sdk-reference/php/signal-wire/pom/pom/index.mdx deleted file mode 100644 index 7187b6bcd3..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/pom/pom/index.mdx +++ /dev/null @@ -1,31 +0,0 @@ ---- -slug: "/reference/php/signal-wire/pom/pom" -title: "POM" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "module" - language: "php" - qualified_name: "SignalWire\\POM" - module: "SignalWire.POM" ---- -# `POM` - -## Signature - -```php -namespace SignalWire\POM -``` - -## Classes - - - - A structured data format for composing, organizing, and rendering prompt - - - - Represents a section in the Prompt Object Model. - - diff --git a/fern/products/sdk-reference/php/signal-wire/pom/pom/prompt-object-model/index.mdx b/fern/products/sdk-reference/php/signal-wire/pom/pom/prompt-object-model/index.mdx deleted file mode 100644 index af33efc0ab..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/pom/pom/prompt-object-model/index.mdx +++ /dev/null @@ -1,331 +0,0 @@ ---- -slug: "/reference/php/signal-wire/pom/pom/prompt-object-model" -title: "PromptObjectModel" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\POM\\PromptObjectModel" - parent: "SignalWire\\POM" - module: "SignalWire.POM" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/POM/PromptObjectModel.php" ---- -# `PromptObjectModel` - -A structured data format for composing, organizing, and rendering prompt - -instructions for large language models. - -Mirrors Python's `signalwire.pom.pom.PromptObjectModel`. Provides a -tree-based representation of nested sections, supporting JSON / YAML -serialization and Markdown / XML rendering. - -YAML support: a small bundled emitter and parser implement the subset of -PyYAML's default block style needed for round-tripping POM documents. -Composer-installed yaml extensions are not required. - -## Signature - -```php -class PromptObjectModel -``` - -## Properties - - - - - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(bool $debug = false) -``` - -#### Parameters - - - -#### Source - -[`SignalWire/POM/PromptObjectModel.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/POM/PromptObjectModel.php) - -Line 25. - -*** - -### addPomAsSubsection - -Add another PromptObjectModel as a subsection block under a target. - -#### Signature - -```php -public function addPomAsSubsection( - SignalWire\POM\Section|string $target, - SignalWire\POM\PromptObjectModel $pomToAdd -): void -``` - -#### Parameters - - - Either a section title or a Section instance. - - - - -#### Throws - -- `\InvalidArgumentException` — When the title cannot be resolved. - -#### Source - -[`SignalWire/POM/PromptObjectModel.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/POM/PromptObjectModel.php) - -Line 359. - -*** - -### addSection - -Add a top-level section to the model. - -#### Signature - -```php -public function addSection( - ?string $title = NULL, - array $params = array ( -) -): SignalWire\POM\Section -``` - -#### Parameters - - - - - -#### Returns - -`SignalWire\POM\Section` - -#### Throws - -- `\InvalidArgumentException` — If $title is null and there is already at least one section - -#### Source - -[`SignalWire/POM/PromptObjectModel.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/POM/PromptObjectModel.php) - -Line 181. - -*** - -### findSection - -Recursively search for a section by title. - -#### Signature - -```php -public function findSection(string $title): ?SignalWire\POM\Section -``` - -#### Parameters - - - -#### Returns - -`?SignalWire\POM\Section` - -#### Source - -[`SignalWire/POM/PromptObjectModel.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/POM/PromptObjectModel.php) - -Line 201. - -*** - -### fromJson - -Create a PromptObjectModel from a JSON string or a parsed array. - -**Modifiers:** `static` - -#### Signature - -```php -public static function fromJson(array|string $jsonData): SignalWire\POM\PromptObjectModel -``` - -#### Parameters - - - -#### Returns - -`SignalWire\POM\PromptObjectModel` - -#### Throws - -- `\InvalidArgumentException` — on malformed JSON or invalid structure - -#### Source - -[`SignalWire/POM/PromptObjectModel.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/POM/PromptObjectModel.php) - -Line 41. - -*** - -### fromYaml - -Create a PromptObjectModel from a YAML string or a parsed array. - -**Modifiers:** `static` - -#### Signature - -```php -public static function fromYaml(array|string $yamlData): SignalWire\POM\PromptObjectModel -``` - -#### Parameters - - - -#### Returns - -`SignalWire\POM\PromptObjectModel` - -#### Source - -[`SignalWire/POM/PromptObjectModel.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/POM/PromptObjectModel.php) - -Line 64. - -*** - -### renderMarkdown - -#### Signature - -```php -public function renderMarkdown(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/POM/PromptObjectModel.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/POM/PromptObjectModel.php) - -Line 289. - -*** - -### renderXml - -#### Signature - -```php -public function renderXml(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/POM/PromptObjectModel.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/POM/PromptObjectModel.php) - -Line 318. - -*** - -### toArray - -#### Signature - -```php -public function toArray(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/POM/PromptObjectModel.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/POM/PromptObjectModel.php) - -Line 230. - -*** - -### toJson - -Serialize the model as JSON. Matches Python `json.dumps(.., indent=2)`. - -#### Signature - -```php -public function toJson(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/POM/PromptObjectModel.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/POM/PromptObjectModel.php) - -Line 238. - -*** - -### toYaml - -Serialize the model as YAML. Matches PyYAML's default block style - -with `default_flow_style=False, sort_keys=False`. - -#### Signature - -```php -public function toYaml(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/POM/PromptObjectModel.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/POM/PromptObjectModel.php) - -Line 280. - -## Source - -[`SignalWire/POM/PromptObjectModel.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/POM/PromptObjectModel.php) - -Line 19. diff --git a/fern/products/sdk-reference/php/signal-wire/pom/pom/section/index.mdx b/fern/products/sdk-reference/php/signal-wire/pom/pom/section/index.mdx deleted file mode 100644 index 7ca6fac58c..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/pom/pom/section/index.mdx +++ /dev/null @@ -1,261 +0,0 @@ ---- -slug: "/reference/php/signal-wire/pom/pom/section" -title: "Section" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\POM\\Section" - parent: "SignalWire\\POM" - module: "SignalWire.POM" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/POM/Section.php" ---- -# `Section` - -Represents a section in the Prompt Object Model. - -Each section contains a title, optional body text, optional bullet -points, and any number of nested subsections. Mirrors Python's -`signalwire.pom.pom.Section` byte-for-byte for `render_markdown`, -`render_xml`, `to_dict` (and indirectly `to_json` / `to_yaml`). - -Python parity: signalwire/signalwire/pom/pom.py::Section - -Constructor params (`params` array — PHP idiom for kwargs): - -- title (?string) section title; null is permitted only on the - first top-level section of a PromptObjectModel -- body (string) paragraph text; default '' -- bullets (?list<string>) bullet items; default \[] -- numbered (?bool) null = inherit; true/false = explicit -- numberedBullets (bool) render bullets as "1. foo" instead of "- foo" - -## Signature - -```php -class Section -``` - -## Properties - - - - - - - - - - - - - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(?string $title = NULL, array $params = array ( -)) -``` - -#### Parameters - - - - - -#### Source - -[`SignalWire/POM/Section.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/POM/Section.php) - -Line 45. - -*** - -### addBody - -Add or replace the body text for this section. - -#### Signature - -```php -public function addBody(string $body): void -``` - -#### Parameters - - - -#### Source - -[`SignalWire/POM/Section.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/POM/Section.php) - -Line 72. - -*** - -### addBullets - -Append bullet points to this section. - -#### Signature - -```php -public function addBullets(array $bullets): void -``` - -#### Parameters - - - -#### Source - -[`SignalWire/POM/Section.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/POM/Section.php) - -Line 82. - -*** - -### addSubsection - -Add a subsection to this section. - -#### Signature - -```php -public function addSubsection( - string $title, - array $params = array ( -) -): SignalWire\POM\Section -``` - -#### Parameters - - - - - -#### Returns - -`SignalWire\POM\Section` - -#### Throws - -- `\InvalidArgumentException` — If $title is null - -#### Source - -[`SignalWire/POM/Section.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/POM/Section.php) - -Line 104. - -*** - -### renderMarkdown - -Render this section and all its subsections as Markdown. - -#### Signature - -```php -public function renderMarkdown(int $level = 2, ?array $sectionNumber = NULL): string -``` - -#### Parameters - - - heading level (default 2 -> ##) - - - - numbering breadcrumb - - -#### Returns - -`string` - -#### Source - -[`SignalWire/POM/Section.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/POM/Section.php) - -Line 155. - -*** - -### renderXml - -Render this section and all its subsections as XML. - -#### Signature - -```php -public function renderXml(int $indent = 0, ?array $sectionNumber = NULL): string -``` - -#### Parameters - - - indentation level (each = 2 spaces) - - - - numbering breadcrumb - - -#### Returns - -`string` - -#### Source - -[`SignalWire/POM/Section.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/POM/Section.php) - -Line 216. - -*** - -### toArray - -Convert the section to a dictionary representation. - -Key ordering (must match Python): title, body, bullets, subsections, -numbered, numberedBullets. - -#### Signature - -```php -public function toArray(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/POM/Section.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/POM/Section.php) - -Line 122. - -## Source - -[`SignalWire/POM/Section.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/POM/Section.php) - -Line 25. diff --git a/fern/products/sdk-reference/php/signal-wire/relay/relay/action/index.mdx b/fern/products/sdk-reference/php/signal-wire/relay/relay/action/index.mdx deleted file mode 100644 index 797d546e25..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/relay/relay/action/index.mdx +++ /dev/null @@ -1,409 +0,0 @@ ---- -slug: "/reference/php/signal-wire/relay/relay/action" -title: "Action" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\Relay\\Action" - parent: "SignalWire\\Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php" ---- -# `Action` - -Base class for all RELAY call actions (play, record, collect, etc.). - -An Action is the client-side handle returned when you start an -asynchronous operation on a call. It accumulates events, tracks -state, and resolves once the operation reaches a terminal state. - -## Signature - -```php -class Action -``` - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct( - string $controlId, - string $callId, - string $nodeId, - object $client -) -``` - -#### Parameters - - - - - - - - - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 33. - -*** - -### executeSubcommand - -Send a sub-command RPC through the client. - -The payload always includes control\_id, call\_id, and node\_id so -the server knows which action instance to target. - -#### Signature - -```php -public function executeSubcommand(string $method, array $extraParams = array ( -)): void -``` - -#### Parameters - - - - - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 211. - -*** - -### getCallId - -#### Signature - -```php -public function getCallId(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 107. - -*** - -### getControlId - -#### Signature - -```php -public function getControlId(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 102. - -*** - -### getEvents - -#### Signature - -```php -public function getEvents(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 97. - -*** - -### getNodeId - -#### Signature - -```php -public function getNodeId(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 112. - -*** - -### getPayload - -#### Signature - -```php -public function getPayload(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 91. - -*** - -### getResult - -#### Signature - -```php -public function getResult() -``` - -#### Returns - -`mixed` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 81. - -*** - -### getState - -#### Signature - -```php -public function getState(): ?string -``` - -#### Returns - -`?string` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 86. - -*** - -### getStopMethod - -Return the RELAY RPC method that stops this action. - -Subclasses MUST override this to return the correct method name -(e.g. 'calling.play.stop'). - -#### Signature - -```php -public function getStopMethod(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 200. - -*** - -### handleEvent - -Append an incoming event and update local state / payload. - -#### Signature - -```php -public function handleEvent(SignalWire\Relay\Event $event): void -``` - -#### Parameters - - - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 144. - -*** - -### isDone - -#### Signature - -```php -public function isDone(): bool -``` - -#### Returns - -`bool` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 75. - -*** - -### onCompleted - -Register a callback to fire when the action completes. - -If the action is already done the callback fires immediately. - -#### Signature - -```php -public function onCompleted(callable $cb): SignalWire\Relay\Action -``` - -#### Parameters - - - -#### Returns - -`SignalWire\Relay\Action` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 126. - -*** - -### resolve - -Mark this action as completed. - -The optional $result is stored and the onCompleted callback is -fired exactly once. - -#### Signature - -```php -public function resolve($result = NULL): void -``` - -#### Parameters - - - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 167. - -*** - -### stop - -Stop the running action by sending its stop sub-command. - -#### Signature - -```php -public function stop(): void -``` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 186. - -*** - -### wait - -Block until the action completes or $timeout seconds elapse. - -Each iteration calls $client->readOnce() so the event-loop -keeps processing inbound frames. - -Returns the resolving Event when the action completes (mirrors -Python's `return self._wait_event.wait()`). Returns null on -timeout. The numeric `$timeout` is interpreted as seconds and -accepts integers or floats. - -#### Signature - -```php -public function wait(int|float $timeout = 30): ?SignalWire\Relay\Event -``` - -#### Parameters - - - -#### Returns - -`?SignalWire\Relay\Event` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 58. - -## Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 16. diff --git a/fern/products/sdk-reference/php/signal-wire/relay/relay/ai-action/index.mdx b/fern/products/sdk-reference/php/signal-wire/relay/relay/ai-action/index.mdx deleted file mode 100644 index 5254d09837..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/relay/relay/ai-action/index.mdx +++ /dev/null @@ -1,404 +0,0 @@ ---- -slug: "/reference/php/signal-wire/relay/relay/ai-action" -title: "AIAction" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\Relay\\AIAction" - parent: "SignalWire\\Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php" ---- -# `AIAction` - -Handle for calling.ai operations. - -## Signature - -```php -class AIAction extends Action -``` - -## Inheritance - -**Extends:** [SignalWire\Relay\Action](/docs/sdk-reference/reference/php/signal-wire/relay/relay/action) - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct( - string $controlId, - string $callId, - string $nodeId, - object $client -) -``` - -#### Parameters - - - - - - - - - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 33. - -*** - -### executeSubcommand - -Send a sub-command RPC through the client. - -The payload always includes control\_id, call\_id, and node\_id so -the server knows which action instance to target. - -#### Signature - -```php -public function executeSubcommand(string $method, array $extraParams = array ( -)): void -``` - -#### Parameters - - - - - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 211. - -*** - -### getCallId - -#### Signature - -```php -public function getCallId(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 107. - -*** - -### getControlId - -#### Signature - -```php -public function getControlId(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 102. - -*** - -### getEvents - -#### Signature - -```php -public function getEvents(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 97. - -*** - -### getNodeId - -#### Signature - -```php -public function getNodeId(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 112. - -*** - -### getPayload - -#### Signature - -```php -public function getPayload(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 91. - -*** - -### getResult - -#### Signature - -```php -public function getResult() -``` - -#### Returns - -`mixed` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 81. - -*** - -### getState - -#### Signature - -```php -public function getState(): ?string -``` - -#### Returns - -`?string` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 86. - -*** - -### getStopMethod - -#### Signature - -```php -public function getStopMethod(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 478. - -*** - -### handleEvent - -Append an incoming event and update local state / payload. - -#### Signature - -```php -public function handleEvent(SignalWire\Relay\Event $event): void -``` - -#### Parameters - - - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 144. - -*** - -### isDone - -#### Signature - -```php -public function isDone(): bool -``` - -#### Returns - -`bool` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 75. - -*** - -### onCompleted - -Register a callback to fire when the action completes. - -If the action is already done the callback fires immediately. - -#### Signature - -```php -public function onCompleted(callable $cb): SignalWire\Relay\Action -``` - -#### Parameters - - - -#### Returns - -`SignalWire\Relay\Action` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 126. - -*** - -### resolve - -Mark this action as completed. - -The optional $result is stored and the onCompleted callback is -fired exactly once. - -#### Signature - -```php -public function resolve($result = NULL): void -``` - -#### Parameters - - - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 167. - -*** - -### stop - -Stop the running action by sending its stop sub-command. - -#### Signature - -```php -public function stop(): void -``` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 186. - -*** - -### wait - -Block until the action completes or $timeout seconds elapse. - -Each iteration calls $client->readOnce() so the event-loop -keeps processing inbound frames. - -Returns the resolving Event when the action completes (mirrors -Python's `return self._wait_event.wait()`). Returns null on -timeout. The numeric `$timeout` is interpreted as seconds and -accepts integers or floats. - -#### Signature - -```php -public function wait(int|float $timeout = 30): ?SignalWire\Relay\Event -``` - -#### Parameters - - - -#### Returns - -`?SignalWire\Relay\Event` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 58. - -## Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 476. diff --git a/fern/products/sdk-reference/php/signal-wire/relay/relay/call/index.mdx b/fern/products/sdk-reference/php/signal-wire/relay/relay/call/index.mdx deleted file mode 100644 index ad506c465f..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/relay/relay/call/index.mdx +++ /dev/null @@ -1,1813 +0,0 @@ ---- -slug: "/reference/php/signal-wire/relay/relay/call" -title: "Call" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\Relay\\Call" - parent: "SignalWire\\Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php" ---- -# `Call` - -Represents a RELAY voice call. - -Holds call-level state, dispatches server events to registered listeners -and to in-flight Action objects, and exposes every calling.\* RPC method -as a first-class PHP method. - -## Signature - -```php -class Call -``` - -## Properties - - - controlId => Action - - - - - - RELAY Client instance - - - - - - - - - - - - - - - - - - - - - - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(array $params, object $client) -``` - -#### Parameters - - - - - -#### Source - -[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) - -Line 48. - -*** - -### ai - -#### Signature - -```php -public function ai(array $prompt, array $opts = array ( -)): SignalWire\Relay\AIAction -``` - -#### Parameters - - - AI prompt config. - - - - -#### Returns - -`SignalWire\Relay\AIAction` - -#### Source - -[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) - -Line 888. - -*** - -### aiHold - -#### Signature - -```php -public function aiHold(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) - -Line 432. - -*** - -### aiMessage - -#### Signature - -```php -public function aiMessage(array $params): array -``` - -#### Parameters - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) - -Line 427. - -*** - -### aiUnhold - -#### Signature - -```php -public function aiUnhold(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) - -Line 437. - -*** - -### amazonBedrock - -#### Signature - -```php -public function amazonBedrock(array $params): array -``` - -#### Parameters - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) - -Line 422. - -*** - -### answer - -#### Signature - -```php -public function answer(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) - -Line 303. - -*** - -### bindDigit - -#### Signature - -```php -public function bindDigit(array $params): array -``` - -#### Parameters - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) - -Line 377. - -*** - -### callState - -The current call lifecycle state as a typed \{@see CallState\}, or null - -when the raw \{@see $state\} string is outside the known closed set -(a forward-compatible server value). - -Offered ALONGSIDE the bare-string \{@see $state\} property for parity with -the Python reference: `$call->state` stays the canonical string; -`$call->callState()` is the typed view for autocompletion + an -exhaustive `match` + `->isTerminal()`. PORT\_ADDITION. - -#### Signature - -```php -public function callState(): ?SignalWire\Relay\CallState -``` - -#### Returns - -`?SignalWire\Relay\CallState` - -#### Source - -[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) - -Line 178. - -*** - -### clearDigitBindings - -Clear all digit bindings, optionally filtered by realm. - -Mirrors Python's Call.clear\_digit\_bindings(\*, realm=None, \*\*kwargs). - -#### Signature - -```php -public function clearDigitBindings( - ?string $realm = NULL, - array $kwargs = array ( -) -): array -``` - -#### Parameters - - - Optional realm filter — restricts clearing to bindings registered under that realm. - - - - Additional params forwarded to the wire call. - - -#### Returns - -`array` - -#### Source - -[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) - -Line 392. - -*** - -### collect - -Standalone collect (digits / speech / both). - -#### Signature - -```php -public function collect(array $opts = array ( -)): SignalWire\Relay\CollectAction -``` - -#### Parameters - - - \- \`\`digits\`\` / \`\`speech\`\` / \`\`initial\_timeout\`\` etc forwarded as-is - \- \`\`control\_id\`\` - \- \`\`start\_input\_timers\`\` (bool) - \- \`\`on\_completed\`\` callback - - -#### Returns - -`SignalWire\Relay\CollectAction` - -#### Source - -[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) - -Line 644. - -*** - -### connect - -#### Signature - -```php -public function connect(array $params): array -``` - -#### Parameters - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) - -Line 327. - -*** - -### denoise - -#### Signature - -```php -public function denoise(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) - -Line 347. - -*** - -### denoiseStop - -#### Signature - -```php -public function denoiseStop(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) - -Line 352. - -*** - -### detect - -#### Signature - -```php -public function detect( - array $detect, - array $opts = array ( -) -): SignalWire\Relay\DetectAction -``` - -#### Parameters - - - Detection request (`{type: 'machine'|'fax'|'digit', params: {...}}`). - - - - -#### Returns - -`SignalWire\Relay\DetectAction` - -#### Source - -[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) - -Line 725. - -*** - -### detectAnsweringMachine - -Detect human vs answering machine (AMD). Typed convenience over - -\{@see detect()\}. Mirrors Python's `Call.detect_answering_machine(*, -initial_timeout, end_silence_timeout, machine_voice_threshold, -machine_words_threshold, detect_interruptions, detect_message_end, -timeout, on_completed)`. Only the AMD keys the caller supplies are -emitted under `params` (matches Python's only-provided-keys behavior); -`timeout` rides at the top level. - -Wire shape: detect `{type:"machine", params:{...only-provided...}}` -with optional top-level `timeout`. - -#### Signature - -```php -public function detectAnsweringMachine( - array $opts = array ( -) -): SignalWire\Relay\DetectAction -``` - -#### Parameters - - - any of the AMD tuning keys above plus `timeout` / `control_id` / `on_completed`. - - -#### Returns - -`SignalWire\Relay\DetectAction` - -#### Source - -[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) - -Line 779. - -*** - -### detectDigit - -Detect DTMF digits. Typed convenience over \{@see detect()\}. - -Mirrors Python's `Call.detect_digit(*, digits, timeout, -on_completed)`. `digits` is nested under `params` only when -supplied; `timeout` rides at the top level via the generic detect -frame. - -Wire shape: detect `{type:"digit", params:{digits?}}` with optional -top-level `timeout`. - -#### Signature - -```php -public function detectDigit(array $opts = array ( -)): SignalWire\Relay\DetectAction -``` - -#### Parameters - - - `digits`/`timeout` plus `control_id` / `on_completed`. - - -#### Returns - -`SignalWire\Relay\DetectAction` - -#### Source - -[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) - -Line 749. - -*** - -### detectFax - -Detect a fax tone (CED/CNG). Typed convenience over \{@see detect()\}. - -Mirrors Python's `Call.detect_fax(*, tone, timeout, on_completed)`. -`tone` is nested under `params` only when supplied; `timeout` -rides at the top level. - -Wire shape: detect `{type:"fax", params:{tone?}}` with optional -top-level `timeout`. - -#### Signature - -```php -public function detectFax(array $opts = array ( -)): SignalWire\Relay\DetectAction -``` - -#### Parameters - - - `tone`/`timeout` plus `control_id` / `on_completed`. - - -#### Returns - -`SignalWire\Relay\DetectAction` - -#### Source - -[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) - -Line 815. - -*** - -### disconnect - -#### Signature - -```php -public function disconnect(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) - -Line 332. - -*** - -### dispatchEvent - -Central event router invoked by the Client whenever a server event - -targets this call. - -#### Signature - -```php -public function dispatchEvent(SignalWire\Relay\Event $event): void -``` - -#### Parameters - - - -#### Source - -[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) - -Line 71. - -*** - -### echo - -#### Signature - -```php -public function echo(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) - -Line 372. - -*** - -### hangup - -Hang up the call. `$reason` is forwarded as `reason` on the - -wire (RELAY accepts `hangup`, `busy`, `decline`, etc.). - -The on-wire method is `calling.end` (production), which historically -was named `calling.hangup` — we send `calling.end` to match the -RELAY schema set extracted from switchblade. - -#### Signature - -```php -public function hangup(?string $reason = NULL): array -``` - -#### Parameters - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) - -Line 316. - -*** - -### hold - -#### Signature - -```php -public function hold(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) - -Line 337. - -*** - -### joinConference - -#### Signature - -```php -public function joinConference(array $params): array -``` - -#### Parameters - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) - -Line 362. - -*** - -### joinRoom - -#### Signature - -```php -public function joinRoom(array $params): array -``` - -#### Parameters - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) - -Line 412. - -*** - -### leaveConference - -#### Signature - -```php -public function leaveConference(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) - -Line 367. - -*** - -### leaveRoom - -#### Signature - -```php -public function leaveRoom(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) - -Line 417. - -*** - -### liveTranscribe - -#### Signature - -```php -public function liveTranscribe(array $params): array -``` - -#### Parameters - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) - -Line 402. - -*** - -### liveTranslate - -#### Signature - -```php -public function liveTranslate(array $params): array -``` - -#### Parameters - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) - -Line 407. - -*** - -### on - -Register a generic event listener on this call. - -#### Signature - -```php -public function on(callable $cb): SignalWire\Relay\Call -``` - -#### Parameters - - - -#### Returns - -`SignalWire\Relay\Call` - -#### Source - -[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) - -Line 162. - -*** - -### pass - -#### Signature - -```php -public function pass(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) - -Line 322. - -*** - -### pay - -#### Signature - -```php -public function pay( - string $paymentConnectorUrl, - array $opts = array ( -) -): SignalWire\Relay\PayAction -``` - -#### Parameters - - - - - -#### Returns - -`SignalWire\Relay\PayAction` - -#### Source - -[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) - -Line 874. - -*** - -### play - -Start a calling.play action. - -#### Signature - -```php -public function play( - array $media, - array $opts = array ( -) -): SignalWire\Relay\PlayAction -``` - -#### Parameters - - - Play list (each entry is `{type:..., params:...}`). - - - - `control_id` (auto-generated when omitted), `on_completed` callback fired on terminal events. - - -#### Returns - -`SignalWire\Relay\PlayAction` - -#### Source - -[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) - -Line 526. - -*** - -### playAndCollect - -Play media then collect a response (digits, speech). - -#### Signature - -```php -public function playAndCollect( - array $media, - array $collect, - array $opts = array ( -) -): SignalWire\Relay\CollectAction -``` - -#### Parameters - - - - - - - -#### Returns - -`SignalWire\Relay\CollectAction` - -#### Source - -[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) - -Line 657. - -*** - -### playAudio - -Play an audio file from a URL. Typed convenience over \{@see play()\}. - -Mirrors Python's `Call.play_audio(url, *, volume, on_completed)`. - -Wire shape: play `[{type:"audio", params:{url}}]` with optional -top-level `volume`. - -#### Signature - -```php -public function playAudio( - string $url, - array $opts = array ( -) -): SignalWire\Relay\PlayAction -``` - -#### Parameters - - - - - `volume` plus `control_id` / `on_completed`. - - -#### Returns - -`SignalWire\Relay\PlayAction` - -#### Source - -[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) - -Line 576. - -*** - -### playRingtone - -Play a named ringtone by country code. Typed convenience over - -\{@see play()\}. Mirrors Python's `Call.play_ringtone(name, *, -duration, volume, on_completed)`. `duration` is nested under -`params` only when supplied; `volume` rides at the top level. - -Wire shape: play `[{type:"ringtone", params:{name, duration?}}]` with -optional top-level `volume`. - -#### Signature - -```php -public function playRingtone( - string $name, - array $opts = array ( -) -): SignalWire\Relay\PlayAction -``` - -#### Parameters - - - - - `duration`/`volume` plus `control_id` / `on_completed`. - - -#### Returns - -`SignalWire\Relay\PlayAction` - -#### Source - -[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) - -Line 612. - -*** - -### playSilence - -Play silence for `$duration` seconds. Typed convenience over - -\{@see play()\}. Mirrors Python's `Call.play_silence(duration, *, -on_completed)`. - -Wire shape: play `[{type:"silence", params:{duration}}]`. - -#### Signature - -```php -public function playSilence( - int|float $duration, - array $opts = array ( -) -): SignalWire\Relay\PlayAction -``` - -#### Parameters - - - - - `control_id` / `on_completed`. - - -#### Returns - -`SignalWire\Relay\PlayAction` - -#### Source - -[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) - -Line 591. - -*** - -### playTts - -Play text-to-speech. Typed convenience over \{@see play()\}. - -Restores the legacy `play_tts(text=...)` ergonomics so callers don't -hand-build the `{type:"tts", params:{...}}` media shape. Mirrors -Python's `Call.play_tts(text, *, language, gender, voice, volume, -on_completed)`. Optional `language` / `gender` / `voice` are -nested under `params` only when supplied; `volume` rides at the -top level via the generic play frame; `control_id` / `on_completed` -are honored from `$opts`. - -Wire shape: play `[{type:"tts", params:{text, language?, gender?, -voice?}}]` with optional top-level `volume`. - -#### Signature - -```php -public function playTts( - string $text, - array $opts = array ( -) -): SignalWire\Relay\PlayAction -``` - -#### Parameters - - - - - `language`/`gender`/`voice`/ `volume` plus the usual `control_id` / `on_completed`. - - -#### Returns - -`SignalWire\Relay\PlayAction` - -#### Source - -[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) - -Line 553. - -*** - -### promptAudio - -Play an audio file then collect input. Typed media over - -\{@see playAndCollect()\}. Mirrors Python's `Call.prompt_audio(url, -collect, *, volume, on_completed)`. - -Wire shape: play\_and\_collect `[{type:"audio", params:{url}}]` + the -given `collect` with optional top-level `volume`. - -#### Signature - -```php -public function promptAudio( - string $url, - array $collect, - array $opts = array ( -) -): SignalWire\Relay\CollectAction -``` - -#### Parameters - - - - - Collect spec (`digits`/`speech`/…). - - - - `volume` plus `control_id` / `on_completed`. - - -#### Returns - -`SignalWire\Relay\CollectAction` - -#### Source - -[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) - -Line 711. - -*** - -### promptTts - -Play TTS then collect input. Typed media over \{@see playAndCollect()\}. - -Mirrors Python's `Call.prompt_tts(text, collect, *, language, gender, -voice, volume, on_completed)`. Builds the same `{type:"tts"}` media -shape as \{@see playTts()\} and forwards the caller's `$collect` object -verbatim. - -Wire shape: play\_and\_collect `[{type:"tts", params:{text, language?, -gender?, voice?}}]` + the given `collect` with optional top-level -`volume`. - -#### Signature - -```php -public function promptTts( - string $text, - array $collect, - array $opts = array ( -) -): SignalWire\Relay\CollectAction -``` - -#### Parameters - - - - - Collect spec (`digits`/`speech`/…). - - - - `language`/`gender`/`voice`/ `volume` plus `control_id` / `on_completed`. - - -#### Returns - -`SignalWire\Relay\CollectAction` - -#### Source - -[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) - -Line 683. - -*** - -### queueEnter - -#### Signature - -```php -public function queueEnter(array $params): array -``` - -#### Parameters - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) - -Line 447. - -*** - -### queueLeave - -Remove the call from a named queue. - -Mirrors Python's Call.queue\_leave(queue\_name, \*, control\_id=None, -queue\_id=None, status\_url=None, \*\*kwargs). When called with no args -the legacy "leave the current queue" behavior is preserved. - -#### Signature - -```php -public function queueLeave( - ?string $queue_name = NULL, - ?string $control_id = NULL, - ?string $queue_id = NULL, - ?string $status_url = NULL, - array $kwargs = array ( -) -): array -``` - -#### Parameters - - - Name of the queue to leave. Required when also supplying control\_id / queue\_id; when null the legacy no-arg "leave-current" behavior is preserved. - - - - Optional control\_id; auto-generated when null and other named-args are supplied. - - - - Optional explicit queue\_id passed to the server. - - - - Optional status callback URL. - - - - Extra params merged onto the wire call. - - -#### Returns - -`array` - -#### Source - -[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) - -Line 471. - -*** - -### receiveFax - -#### Signature - -```php -public function receiveFax(array $opts = array ( -)): SignalWire\Relay\FaxAction -``` - -#### Parameters - - - -#### Returns - -`SignalWire\Relay\FaxAction` - -#### Source - -[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) - -Line 844. - -*** - -### record - -#### Signature - -```php -public function record( - array $audio, - array $opts = array ( -) -): SignalWire\Relay\RecordAction -``` - -#### Parameters - - - Recording config (`format`, etc.) - - - - -#### Returns - -`SignalWire\Relay\RecordAction` - -#### Source - -[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) - -Line 625. - -*** - -### refer - -#### Signature - -```php -public function refer(array $params): array -``` - -#### Parameters - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) - -Line 504. - -*** - -### resolveAllActions - -Mark every outstanding action as completed. Called when the call - -enters a terminal state (ended). - -#### Signature - -```php -public function resolveAllActions(): void -``` - -#### Source - -[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) - -Line 291. - -*** - -### sendDigits - -#### Signature - -```php -public function sendDigits(array $params): array -``` - -#### Parameters - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) - -Line 509. - -*** - -### sendFax - -#### Signature - -```php -public function sendFax( - string $document, - ?string $identity = NULL, - array $opts = array ( -) -): SignalWire\Relay\FaxAction -``` - -#### Parameters - - - - - - - -#### Returns - -`SignalWire\Relay\FaxAction` - -#### Source - -[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) - -Line 829. - -*** - -### stream - -#### Signature - -```php -public function stream( - string $url, - array $opts = array ( -) -): SignalWire\Relay\StreamAction -``` - -#### Parameters - - - - - -#### Returns - -`SignalWire\Relay\StreamAction` - -#### Source - -[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) - -Line 868. - -*** - -### tap - -#### Signature - -```php -public function tap( - array $tap, - array $device, - array $opts = array ( -) -): SignalWire\Relay\TapAction -``` - -#### Parameters - - - Tap config. - - - - Tap delivery device. - - - - -#### Returns - -`SignalWire\Relay\TapAction` - -#### Source - -[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) - -Line 858. - -*** - -### transcribe - -#### Signature - -```php -public function transcribe(array $opts = array ( -)): SignalWire\Relay\TranscribeAction -``` - -#### Parameters - - - -#### Returns - -`SignalWire\Relay\TranscribeAction` - -#### Source - -[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) - -Line 880. - -*** - -### transfer - -#### Signature - -```php -public function transfer(array $params): array -``` - -#### Parameters - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) - -Line 357. - -*** - -### unhold - -#### Signature - -```php -public function unhold(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) - -Line 342. - -*** - -### userEvent - -#### Signature - -```php -public function userEvent(array $params): array -``` - -#### Parameters - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) - -Line 442. - -*** - -### waitForAnswered - -Wait until the call is answered (immediate if already answered or past - -it). Typed wait over the call lifecycle, mirroring Python's -`Call.wait_for_answered(timeout)`. - -#### Signature - -```php -public function waitForAnswered(int|float|null $timeout = NULL): bool -``` - -#### Parameters - - - -#### Returns - -`bool` — True once the call is answered (or already past it); false on timeout. - -#### Source - -[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) - -Line 256. - -*** - -### waitForEnding - -Wait until the call is ending (immediate if already ending or past it). - -Typed wait over the call lifecycle, mirroring Python's -`Call.wait_for_ending(timeout)`. - -#### Signature - -```php -public function waitForEnding(int|float|null $timeout = NULL): bool -``` - -#### Parameters - - - -#### Returns - -`bool` — True once the call is ending (or already past it); false on timeout. - -#### Source - -[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) - -Line 282. - -*** - -### waitForRinging - -Wait until the call is ringing (immediate if already ringing or past - -it). Typed wait over the call lifecycle, mirroring Python's -`Call.wait_for_ringing(timeout)`. - -#### Signature - -```php -public function waitForRinging(int|float|null $timeout = NULL): bool -``` - -#### Parameters - - - -#### Returns - -`bool` — True once the call is ringing (or already past it); false on timeout. - -#### Source - -[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) - -Line 269. - -## Source - -[`SignalWire/Relay/Call.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php) - -Line 16. diff --git a/fern/products/sdk-reference/php/signal-wire/relay/relay/client/index.mdx b/fern/products/sdk-reference/php/signal-wire/relay/relay/client/index.mdx deleted file mode 100644 index 45bd138322..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/relay/relay/client/index.mdx +++ /dev/null @@ -1,607 +0,0 @@ ---- -slug: "/reference/php/signal-wire/relay/relay/client" -title: "Client" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\Relay\\Client" - parent: "SignalWire\\Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Client.php" ---- -# `Client` - -RELAY Client – manages the WebSocket connection to SignalWire, sends - -JSON-RPC requests, and dispatches inbound events to the correct Call -or Message objects. - -The transport layer (WebSocket send/receive) is abstracted behind -thin methods so that unit tests can subclass or mock without needing -a real WebSocket extension. - -## Signature - -```php -class Client -``` - -## Properties - - - - - - - Optional path to a CA bundle (PEM) used to verify the server certificate on `wss://` connections. Sourced from the `ca_file` option or the `SIGNALWIRE_CA_FILE` / `SSL_CERT_FILE` env vars. Peer verification stays enabled regardless; this only selects which CA to trust (system store when null). - - - - callId => Call - - - - - - - - - - - - messageId => Message - - - - - - - - - - id => callbacks - - - - tag => dial promise - - - - - - - - - - - - - - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(array $options) -``` - -#### Parameters - - - -#### Source - -[`SignalWire/Relay/Client.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Client.php) - -Line 94. - -*** - -### authenticate - -Send the signalwire.connect RPC to authenticate and bind a session. - -Sends project/token both at the top level AND nested under -`authentication`. Python sends the nested form; the audit fixture -accepts either; sending both is forward-compatible (per -SUBAGENT\_PLAYBOOK lessons-learned). - -#### Signature - -```php -public function authenticate(): void -``` - -#### Source - -[`SignalWire/Relay/Client.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Client.php) - -Line 208. - -*** - -### connect - -Open the WebSocket connection and run the JSON-RPC `signalwire.connect` - -handshake. Throws on transport or auth failure. - -The transport URI is `://` (defaults to -`wss:///api/relay/ws`). Tests point SIGNALWIRE\_RELAY\_SCHEME -at `ws` and SIGNALWIRE\_RELAY\_HOST at the fixture's host:port. - -#### Signature - -```php -public function connect(): void -``` - -#### Source - -[`SignalWire/Relay/Client.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Client.php) - -Line 169. - -*** - -### dial - -Originate an outbound call, blocking until `calling.call.dial` - -resolves with a winner or fails. - -#### Signature - -```php -public function dial(array $devices, array $opts = array ( -)): SignalWire\Relay\Call -``` - -#### Parameters - - - Two-dimensional array of devices: each outer entry is one parallel "leg" of the dial, each inner entry is a serial step within that leg. Mirrors the Python `[[device, device], [device]]` shape. - - - - \- \`\`tag\`\`: explicit dial tag (UUID4 generated when omitted) - \- \`\`dial\_timeout\`\`: seconds to wait for the dial event (default 30.0) - \- \`\`max\_duration\`\`: max call lifetime in seconds, passed through - to \`\`calling.dial\`\`. - \- any other key is forwarded as a top-level param on the wire. - - -#### Returns - -`SignalWire\Relay\Call` - -#### Throws - -- `RelayError` — on dial failure or timeout. - -#### Source - -[`SignalWire/Relay/Client.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Client.php) - -Line 623. - -*** - -### disconnect - -Gracefully close the connection. - -#### Signature - -```php -public function disconnect(): void -``` - -#### Source - -[`SignalWire/Relay/Client.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Client.php) - -Line 263. - -*** - -### execute - -Send a JSON-RPC request and synchronously wait for the matching - -response. Returns the "result" portion of the response. - -#### Signature - -```php -public function execute(string $method, array $params = array ( -)): array -``` - -#### Parameters - - - - - -#### Returns - -`array` - -#### Throws - -- `\RuntimeException` — on error responses or transport timeout. - -#### Source - -[`SignalWire/Relay/Client.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Client.php) - -Line 344. - -*** - -### getCall - -#### Signature - -```php -public function getCall(string $callId): ?SignalWire\Relay\Call -``` - -#### Parameters - - - -#### Returns - -`?SignalWire\Relay\Call` - -#### Source - -[`SignalWire/Relay/Client.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Client.php) - -Line 781. - -*** - -### getCalls - -#### Signature - -```php -public function getCalls(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Relay/Client.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Client.php) - -Line 789. - -*** - -### getMessages - -#### Signature - -```php -public function getMessages(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Relay/Client.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Client.php) - -Line 797. - -*** - -### handleEvent - -Route a signalwire.event payload to the appropriate handler. - -#### Signature - -```php -public function handleEvent(array $outerParams): void -``` - -#### Parameters - - - -#### Source - -[`SignalWire/Relay/Client.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Client.php) - -Line 511. - -*** - -### handleMessage - -Parse a raw JSON string from the server and route it. - -#### Signature - -```php -public function handleMessage(string $raw): void -``` - -#### Parameters - - - -#### Source - -[`SignalWire/Relay/Client.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Client.php) - -Line 464. - -*** - -### onCall - -Register a handler for inbound calls. - -#### Signature - -```php -public function onCall(callable $cb): SignalWire\Relay\Client -``` - -#### Parameters - - - -#### Returns - -`SignalWire\Relay\Client` - -#### Source - -[`SignalWire/Relay/Client.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Client.php) - -Line 764. - -*** - -### onMessage - -Register a handler for inbound messages. - -#### Signature - -```php -public function onMessage(callable $cb): SignalWire\Relay\Client -``` - -#### Parameters - - - -#### Returns - -`SignalWire\Relay\Client` - -#### Source - -[`SignalWire/Relay/Client.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Client.php) - -Line 773. - -*** - -### readOnce - -Read a single inbound frame from the WebSocket and dispatch it. - -Returns silently on a read timeout (no frame within $this->readTimeout -seconds — the run loop will call again). Throws on socket errors so -the run loop can trigger reconnect. - -#### Signature - -```php -public function readOnce(): void -``` - -#### Source - -[`SignalWire/Relay/Client.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Client.php) - -Line 420. - -*** - -### receive - -Subscribe to one or more inbound contexts so that events for those - -contexts are delivered to this client. - -#### Signature - -```php -public function receive(array $contexts): void -``` - -#### Parameters - - - -#### Source - -[`SignalWire/Relay/Client.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Client.php) - -Line 729. - -*** - -### reconnect - -Reconnect with exponential back-off (1 s -> 30 s cap). - -#### Signature - -```php -public function reconnect(): void -``` - -#### Source - -[`SignalWire/Relay/Client.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Client.php) - -Line 283. - -*** - -### run - -Main event loop – reads messages until disconnect. - -Auto-reconnects with exponential backoff on transport errors, -preserving authorization\_state across reconnects so the server -can fast-path the session resumption. - -#### Signature - -```php -public function run(): void -``` - -#### Source - -[`SignalWire/Relay/Client.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Client.php) - -Line 309. - -*** - -### send - -Encode and send a JSON message over the WebSocket. Throws if the - -socket is closed; the run loop catches and triggers reconnect. - -#### Signature - -```php -public function send(array $msg): void -``` - -#### Parameters - - - -#### Source - -[`SignalWire/Relay/Client.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Client.php) - -Line 402. - -*** - -### sendAck - -Send an acknowledgement (empty result) for a server-initiated request. - -Best-effort: an ACK that fails because the socket dropped during -the request handling is not propagated as an exception (the run -loop will already trigger reconnect on the next read). - -#### Signature - -```php -public function sendAck(string $id): void -``` - -#### Parameters - - - -#### Source - -[`SignalWire/Relay/Client.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Client.php) - -Line 444. - -*** - -### sendMessage - -Send an outbound message. - -#### Signature - -```php -public function sendMessage(array $params): SignalWire\Relay\Message -``` - -#### Parameters - - - Outbound messaging.send params (`to_number`, `from_number`, `body`, `media`, `tags`, `context`). - - -#### Returns - -`SignalWire\Relay\Message` — Tracking object for the message lifecycle. The Message starts in `queued` state; subsequent `messaging.state` events from the server progress it through `sent` / `delivered` / `undelivered` / `failed`. - -#### Source - -[`SignalWire/Relay/Client.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Client.php) - -Line 697. - -*** - -### unreceive - -Unsubscribe from one or more contexts. - -#### Signature - -```php -public function unreceive(array $contexts): void -``` - -#### Parameters - - - -#### Source - -[`SignalWire/Relay/Client.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Client.php) - -Line 747. - -## Source - -[`SignalWire/Relay/Client.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Client.php) - -Line 18. diff --git a/fern/products/sdk-reference/php/signal-wire/relay/relay/collect-action/index.mdx b/fern/products/sdk-reference/php/signal-wire/relay/relay/collect-action/index.mdx deleted file mode 100644 index 283943776c..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/relay/relay/collect-action/index.mdx +++ /dev/null @@ -1,472 +0,0 @@ ---- -slug: "/reference/php/signal-wire/relay/relay/collect-action" -title: "CollectAction" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\Relay\\CollectAction" - parent: "SignalWire\\Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php" ---- -# `CollectAction` - -Handle for calling.collect (and play\_and\_collect) operations. - -Note: play\_and\_collect emits intermediate calling.call.play events -that must be silently ignored so they do not pollute the collect -action's state. - -## Signature - -```php -class CollectAction extends Action -``` - -## Inheritance - -**Extends:** [SignalWire\Relay\Action](/docs/sdk-reference/reference/php/signal-wire/relay/relay/action) - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct( - string $controlId, - string $callId, - string $nodeId, - object $client -) -``` - -#### Parameters - - - - - - - - - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 33. - -*** - -### executeSubcommand - -Send a sub-command RPC through the client. - -The payload always includes control\_id, call\_id, and node\_id so -the server knows which action instance to target. - -#### Signature - -```php -public function executeSubcommand(string $method, array $extraParams = array ( -)): void -``` - -#### Parameters - - - - - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 211. - -*** - -### getCallId - -#### Signature - -```php -public function getCallId(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 107. - -*** - -### getCollectResult - -Return the structured collect result from the payload. - -#### Signature - -```php -public function getCollectResult(): ?array -``` - -#### Returns - -`?array` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 360. - -*** - -### getControlId - -#### Signature - -```php -public function getControlId(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 102. - -*** - -### getEvents - -#### Signature - -```php -public function getEvents(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 97. - -*** - -### getNodeId - -#### Signature - -```php -public function getNodeId(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 112. - -*** - -### getPayload - -#### Signature - -```php -public function getPayload(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 91. - -*** - -### getResult - -#### Signature - -```php -public function getResult() -``` - -#### Returns - -`mixed` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 81. - -*** - -### getState - -#### Signature - -```php -public function getState(): ?string -``` - -#### Returns - -`?string` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 86. - -*** - -### getStopMethod - -#### Signature - -```php -public function getStopMethod(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 343. - -*** - -### handleEvent - -Override: silently ignore intermediate play events that arrive - -during a play\_and\_collect operation. - -#### Signature - -```php -public function handleEvent(SignalWire\Relay\Event $event): void -``` - -#### Parameters - - - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 369. - -*** - -### isDone - -#### Signature - -```php -public function isDone(): bool -``` - -#### Returns - -`bool` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 75. - -*** - -### onCompleted - -Register a callback to fire when the action completes. - -If the action is already done the callback fires immediately. - -#### Signature - -```php -public function onCompleted(callable $cb): SignalWire\Relay\Action -``` - -#### Parameters - - - -#### Returns - -`SignalWire\Relay\Action` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 126. - -*** - -### resolve - -Mark this action as completed. - -The optional $result is stored and the onCompleted callback is -fired exactly once. - -#### Signature - -```php -public function resolve($result = NULL): void -``` - -#### Parameters - - - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 167. - -*** - -### setStopMethod - -#### Signature - -```php -public function setStopMethod(string $method): void -``` - -#### Parameters - - - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 338. - -*** - -### startInputTimers - -Notify the server to start input timers now rather than waiting - -for the initial-timeout to expire naturally. - -#### Signature - -```php -public function startInputTimers(): void -``` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 352. - -*** - -### stop - -Stop the running action by sending its stop sub-command. - -#### Signature - -```php -public function stop(): void -``` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 186. - -*** - -### wait - -Block until the action completes or $timeout seconds elapse. - -Each iteration calls $client->readOnce() so the event-loop -keeps processing inbound frames. - -Returns the resolving Event when the action completes (mirrors -Python's `return self._wait_event.wait()`). Returns null on -timeout. The numeric `$timeout` is interpreted as seconds and -accepts integers or floats. - -#### Signature - -```php -public function wait(int|float $timeout = 30): ?SignalWire\Relay\Event -``` - -#### Parameters - - - -#### Returns - -`?SignalWire\Relay\Event` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 58. - -## Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 328. diff --git a/fern/products/sdk-reference/php/signal-wire/relay/relay/constants/index.mdx b/fern/products/sdk-reference/php/signal-wire/relay/relay/constants/index.mdx deleted file mode 100644 index 643b151594..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/relay/relay/constants/index.mdx +++ /dev/null @@ -1,140 +0,0 @@ ---- -slug: "/reference/php/signal-wire/relay/relay/constants" -title: "Constants" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\Relay\\Constants" - parent: "SignalWire\\Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Constants.php" ---- -# `Constants` - -**Modifiers:** `final` - -## Signature - -```php -final class Constants -``` - -## Constants - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -## Source - -[`SignalWire/Relay/Constants.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Constants.php) - -Line 7. diff --git a/fern/products/sdk-reference/php/signal-wire/relay/relay/detect-action/index.mdx b/fern/products/sdk-reference/php/signal-wire/relay/relay/detect-action/index.mdx deleted file mode 100644 index ae1491b932..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/relay/relay/detect-action/index.mdx +++ /dev/null @@ -1,424 +0,0 @@ ---- -slug: "/reference/php/signal-wire/relay/relay/detect-action" -title: "DetectAction" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\Relay\\DetectAction" - parent: "SignalWire\\Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php" ---- -# `DetectAction` - -Handle for calling.detect operations (fax-tone, digit, machine, etc.). - -## Signature - -```php -class DetectAction extends Action -``` - -## Inheritance - -**Extends:** [SignalWire\Relay\Action](/docs/sdk-reference/reference/php/signal-wire/relay/relay/action) - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct( - string $controlId, - string $callId, - string $nodeId, - object $client -) -``` - -#### Parameters - - - - - - - - - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 33. - -*** - -### executeSubcommand - -Send a sub-command RPC through the client. - -The payload always includes control\_id, call\_id, and node\_id so -the server knows which action instance to target. - -#### Signature - -```php -public function executeSubcommand(string $method, array $extraParams = array ( -)): void -``` - -#### Parameters - - - - - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 211. - -*** - -### getCallId - -#### Signature - -```php -public function getCallId(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 107. - -*** - -### getControlId - -#### Signature - -```php -public function getControlId(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 102. - -*** - -### getDetectResult - -#### Signature - -```php -public function getDetectResult(): ?array -``` - -#### Returns - -`?array` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 389. - -*** - -### getEvents - -#### Signature - -```php -public function getEvents(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 97. - -*** - -### getNodeId - -#### Signature - -```php -public function getNodeId(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 112. - -*** - -### getPayload - -#### Signature - -```php -public function getPayload(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 91. - -*** - -### getResult - -#### Signature - -```php -public function getResult() -``` - -#### Returns - -`mixed` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 81. - -*** - -### getState - -#### Signature - -```php -public function getState(): ?string -``` - -#### Returns - -`?string` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 86. - -*** - -### getStopMethod - -#### Signature - -```php -public function getStopMethod(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 384. - -*** - -### handleEvent - -Append an incoming event and update local state / payload. - -#### Signature - -```php -public function handleEvent(SignalWire\Relay\Event $event): void -``` - -#### Parameters - - - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 144. - -*** - -### isDone - -#### Signature - -```php -public function isDone(): bool -``` - -#### Returns - -`bool` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 75. - -*** - -### onCompleted - -Register a callback to fire when the action completes. - -If the action is already done the callback fires immediately. - -#### Signature - -```php -public function onCompleted(callable $cb): SignalWire\Relay\Action -``` - -#### Parameters - - - -#### Returns - -`SignalWire\Relay\Action` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 126. - -*** - -### resolve - -Mark this action as completed. - -The optional $result is stored and the onCompleted callback is -fired exactly once. - -#### Signature - -```php -public function resolve($result = NULL): void -``` - -#### Parameters - - - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 167. - -*** - -### stop - -Stop the running action by sending its stop sub-command. - -#### Signature - -```php -public function stop(): void -``` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 186. - -*** - -### wait - -Block until the action completes or $timeout seconds elapse. - -Each iteration calls $client->readOnce() so the event-loop -keeps processing inbound frames. - -Returns the resolving Event when the action completes (mirrors -Python's `return self._wait_event.wait()`). Returns null on -timeout. The numeric `$timeout` is interpreted as seconds and -accepts integers or floats. - -#### Signature - -```php -public function wait(int|float $timeout = 30): ?SignalWire\Relay\Event -``` - -#### Parameters - - - -#### Returns - -`?SignalWire\Relay\Event` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 58. - -## Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 382. diff --git a/fern/products/sdk-reference/php/signal-wire/relay/relay/device/index.mdx b/fern/products/sdk-reference/php/signal-wire/relay/relay/device/index.mdx deleted file mode 100644 index 8306c28591..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/relay/relay/device/index.mdx +++ /dev/null @@ -1,211 +0,0 @@ ---- -slug: "/reference/php/signal-wire/relay/relay/device" -title: "Device" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\Relay\\Device" - parent: "SignalWire\\Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Device.php" ---- -# `Device` - -A RELAY `{type, params}` device descriptor, as an immutable typed value - -object. - -The device object is the single most-recurring blob in the RELAY calling -layer: it identifies WHERE a call leg, tap delivery, or referral goes -(a phone number, a SIP endpoint, a WebRTC client, an RTP sink, …) and rides -inside `calling.connect` / `calling.dial` / `calling.tap` / `calling.refer` -params. Its shape is grounded in the switchblade-extracted wire schemas -(`relay-protocol/calling.{connect,dial,tap,refer}.params.json`): an object -with a required `type` string and a `params` payload. - -The Python reference (and this port until now) passes that object as a raw -associative array. This value object types the SHAPE — readonly, -constructor-promoted (consistent with the Wave-A \{@see Event\} immutability -work) — while keeping `type` a bare `string`: the discriminant is NOT -schema-enumerated (the set of device types is open — phone / sip / webrtc / -rtp / agent / …), so per the idiom philosophy it stays a string, not an enum. - -It is purely ADDITIVE: every method that takes a device still accepts the -raw array; \{@see Device::toArray()\} produces the byte-identical -`['type' => …, 'params' => …]` wire array, so a `Device` is a drop-in for the -hand-written literal. PORT\_ADDITION — the Python reference has no equivalent. - -``` -// hand-written (still works): -['type' => 'phone', 'params' => ['to_number' => $to, 'from_number' => $frm]] - -// typed, identical on the wire: -(new Device('phone', ['to_number' => $to, 'from_number' => $frm]))->toArray() -Device::phone($to, $frm)->toArray(); // convenience for the common case -``` - -**Modifiers:** `final` - -## Signature - -```php -final class Device -``` - -## Properties - - - - - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(string $type, array $params = array ( -)) -``` - -#### Parameters - - - The device discriminant (`phone`, `sip`, `webrtc`, `rtp`, …). Kept a bare string — the set is open and not schema-enumerated. - - - - The device parameters (e.g. `to_number` / `from_number` for a phone, `to` for a SIP referral). - - -#### Source - -[`SignalWire/Relay/Device.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Device.php) - -Line 47. - -*** - -### phone - -Convenience constructor for the most common device: a PSTN phone leg. - -Mirrors the `['type' => 'phone', 'params' => ['to_number' => …, -'from_number' => …]]` literal callers hand-write today. - -**Modifiers:** `static` - -#### Signature - -```php -public static function phone( - string $toNumber, - string $fromNumber, - array $extra = array ( -) -): SignalWire\Relay\Device -``` - -#### Parameters - - - - - - - Additional `params` keys (e.g. `timeout`) merged after the numbers. - - -#### Returns - -`SignalWire\Relay\Device` - -#### Source - -[`SignalWire/Relay/Device.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Device.php) - -Line 78. - -*** - -### sip - -Convenience constructor for a SIP endpoint device. - -**Modifiers:** `static` - -#### Signature - -```php -public static function sip(string $to, array $extra = array ( -)): SignalWire\Relay\Device -``` - -#### Parameters - - - - - Additional `params` keys merged after the address (e.g. `from`, `headers`, `codecs`). - - -#### Returns - -`SignalWire\Relay\Device` - -#### Source - -[`SignalWire/Relay/Device.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Device.php) - -Line 92. - -*** - -### toArray - -Render the device to its wire array — byte-identical to the - -hand-written `['type' => …, 'params' => …]` literal (same keys, same -order). This is what \{@see Call::connect()\} / \{@see Client::dial()\} / -\{@see Call::tap()\} / \{@see Call::refer()\} put on the wire. - -#### Signature - -```php -public function toArray(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Relay/Device.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Device.php) - -Line 61. - -## Source - -[`SignalWire/Relay/Device.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Device.php) - -Line 38. diff --git a/fern/products/sdk-reference/php/signal-wire/relay/relay/event/index.mdx b/fern/products/sdk-reference/php/signal-wire/relay/relay/event/index.mdx deleted file mode 100644 index ba61ce4e1b..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/relay/relay/event/index.mdx +++ /dev/null @@ -1,307 +0,0 @@ ---- -slug: "/reference/php/signal-wire/relay/relay/event" -title: "Event" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\Relay\\Event" - parent: "SignalWire\\Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Event.php" ---- -# `Event` - -An immutable RELAY event value object. - -An Event carries the event type, its raw params, and a receive timestamp. -Once constructed it never changes — the three backing fields are -`readonly` (PHP 8.1), so an accidental write after construction is a hard -`\Error` rather than silent state corruption. This matches how the event is -actually used: handlers (`Call::dispatchEvent`, `Action::handleEvent`, -`Message::handleEvent`) only ever _read_ it. - -`eventType` and `params` are promoted constructor parameters; `timestamp` -is declared separately because its default is computed (`microtime(true)` -when the caller passes 0), which a promoted default expression cannot -express. - -The fields stay `private` (exposed only through the `get*` accessors) so the -public surface — and therefore the cross-port audit shape — is unchanged by -the immutability upgrade. - -## Signature - -```php -class Event -``` - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(string $eventType, array $params, float $timestamp = 0.0) -``` - -#### Parameters - - - - - - - -#### Source - -[`SignalWire/Relay/Event.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Event.php) - -Line 30. - -*** - -### dialState - -The dial outcome carried by a `calling.call.dial` event as a typed - -\{@see DialState\}, read from the `dial_state` (or legacy `state`) param, -or null when absent / outside the known closed set (a forward-compatible -server value). - -Offered ALONGSIDE the raw `getParams()['dial_state']` string for parity: -the wire string stays available; `dialState()` is the typed view for -autocompletion + an exhaustive `match` + `->isTerminal()`. PORT\_ADDITION. - -#### Signature - -```php -public function dialState(): ?SignalWire\Relay\DialState -``` - -#### Returns - -`?SignalWire\Relay\DialState` - -#### Source - -[`SignalWire/Relay/Event.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Event.php) - -Line 88. - -*** - -### getCallId - -#### Signature - -```php -public function getCallId(): ?string -``` - -#### Returns - -`?string` - -#### Source - -[`SignalWire/Relay/Event.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Event.php) - -Line 53. - -*** - -### getControlId - -#### Signature - -```php -public function getControlId(): ?string -``` - -#### Returns - -`?string` - -#### Source - -[`SignalWire/Relay/Event.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Event.php) - -Line 63. - -*** - -### getEventType - -#### Signature - -```php -public function getEventType(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Relay/Event.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Event.php) - -Line 38. - -*** - -### getNodeId - -#### Signature - -```php -public function getNodeId(): ?string -``` - -#### Returns - -`?string` - -#### Source - -[`SignalWire/Relay/Event.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Event.php) - -Line 58. - -*** - -### getParams - -#### Signature - -```php -public function getParams(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Relay/Event.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Event.php) - -Line 48. - -*** - -### getState - -#### Signature - -```php -public function getState(): ?string -``` - -#### Returns - -`?string` - -#### Source - -[`SignalWire/Relay/Event.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Event.php) - -Line 73. - -*** - -### getTag - -#### Signature - -```php -public function getTag(): ?string -``` - -#### Returns - -`?string` - -#### Source - -[`SignalWire/Relay/Event.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Event.php) - -Line 68. - -*** - -### getTimestamp - -#### Signature - -```php -public function getTimestamp(): float -``` - -#### Returns - -`float` - -#### Source - -[`SignalWire/Relay/Event.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Event.php) - -Line 43. - -*** - -### parse - -**Modifiers:** `static` - -#### Signature - -```php -public static function parse(string $eventType, array $params): SignalWire\Relay\Event -``` - -#### Parameters - - - - - -#### Returns - -`SignalWire\Relay\Event` - -#### Source - -[`SignalWire/Relay/Event.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Event.php) - -Line 103. - -*** - -### toArray - -#### Signature - -```php -public function toArray(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Relay/Event.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Event.php) - -Line 94. - -## Source - -[`SignalWire/Relay/Event.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Event.php) - -Line 26. diff --git a/fern/products/sdk-reference/php/signal-wire/relay/relay/fax-action/index.mdx b/fern/products/sdk-reference/php/signal-wire/relay/relay/fax-action/index.mdx deleted file mode 100644 index aaa54f0593..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/relay/relay/fax-action/index.mdx +++ /dev/null @@ -1,429 +0,0 @@ ---- -slug: "/reference/php/signal-wire/relay/relay/fax-action" -title: "FaxAction" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\Relay\\FaxAction" - parent: "SignalWire\\Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php" ---- -# `FaxAction` - -Handle for calling.fax operations (send or receive). - -## Signature - -```php -class FaxAction extends Action -``` - -## Inheritance - -**Extends:** [SignalWire\Relay\Action](/docs/sdk-reference/reference/php/signal-wire/relay/relay/action) - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct( - string $controlId, - string $callId, - string $nodeId, - object $client, - string $faxType = 'send' -) -``` - -#### Parameters - - - - - - - - - - - 'send' or 'receive' - - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 405. - -*** - -### executeSubcommand - -Send a sub-command RPC through the client. - -The payload always includes control\_id, call\_id, and node\_id so -the server knows which action instance to target. - -#### Signature - -```php -public function executeSubcommand(string $method, array $extraParams = array ( -)): void -``` - -#### Parameters - - - - - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 211. - -*** - -### getCallId - -#### Signature - -```php -public function getCallId(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 107. - -*** - -### getControlId - -#### Signature - -```php -public function getControlId(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 102. - -*** - -### getEvents - -#### Signature - -```php -public function getEvents(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 97. - -*** - -### getFaxType - -#### Signature - -```php -public function getFaxType(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 416. - -*** - -### getNodeId - -#### Signature - -```php -public function getNodeId(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 112. - -*** - -### getPayload - -#### Signature - -```php -public function getPayload(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 91. - -*** - -### getResult - -#### Signature - -```php -public function getResult() -``` - -#### Returns - -`mixed` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 81. - -*** - -### getState - -#### Signature - -```php -public function getState(): ?string -``` - -#### Returns - -`?string` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 86. - -*** - -### getStopMethod - -#### Signature - -```php -public function getStopMethod(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 421. - -*** - -### handleEvent - -Append an incoming event and update local state / payload. - -#### Signature - -```php -public function handleEvent(SignalWire\Relay\Event $event): void -``` - -#### Parameters - - - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 144. - -*** - -### isDone - -#### Signature - -```php -public function isDone(): bool -``` - -#### Returns - -`bool` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 75. - -*** - -### onCompleted - -Register a callback to fire when the action completes. - -If the action is already done the callback fires immediately. - -#### Signature - -```php -public function onCompleted(callable $cb): SignalWire\Relay\Action -``` - -#### Parameters - - - -#### Returns - -`SignalWire\Relay\Action` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 126. - -*** - -### resolve - -Mark this action as completed. - -The optional $result is stored and the onCompleted callback is -fired exactly once. - -#### Signature - -```php -public function resolve($result = NULL): void -``` - -#### Parameters - - - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 167. - -*** - -### stop - -Stop the running action by sending its stop sub-command. - -#### Signature - -```php -public function stop(): void -``` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 186. - -*** - -### wait - -Block until the action completes or $timeout seconds elapse. - -Each iteration calls $client->readOnce() so the event-loop -keeps processing inbound frames. - -Returns the resolving Event when the action completes (mirrors -Python's `return self._wait_event.wait()`). Returns null on -timeout. The numeric `$timeout` is interpreted as seconds and -accepts integers or floats. - -#### Signature - -```php -public function wait(int|float $timeout = 30): ?SignalWire\Relay\Event -``` - -#### Parameters - - - -#### Returns - -`?SignalWire\Relay\Event` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 58. - -## Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 398. diff --git a/fern/products/sdk-reference/php/signal-wire/relay/relay/index.mdx b/fern/products/sdk-reference/php/signal-wire/relay/relay/index.mdx deleted file mode 100644 index 3ba6d6f18c..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/relay/relay/index.mdx +++ /dev/null @@ -1,787 +0,0 @@ ---- -slug: "/reference/php/signal-wire/relay/relay" -title: "Relay" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "module" - language: "php" - qualified_name: "SignalWire\\Relay" - module: "SignalWire.Relay" ---- -# `Relay` - -## Signature - -```php -namespace SignalWire\Relay -``` - -## Classes - - - - Base class for all RELAY call actions (play, record, collect, etc.). - - - - Handle for calling.ai operations. - - - - Represents a RELAY voice call. - - - - RELAY Client – manages the WebSocket connection to SignalWire, sends - - - - Handle for calling.collect (and play\_and\_collect) operations. - - - - - - Handle for calling.detect operations (fax-tone, digit, machine, etc.). - - - - A RELAY `{type, params}` device descriptor, as an immutable typed value - - - - An immutable RELAY event value object. - - - - Handle for calling.fax operations (send or receive). - - - - Represents a RELAY messaging message (SMS / MMS). - - - - Handle for calling.pay operations. - - - - Handle for calling.play operations. - - - - Handle for calling.record operations. - - - - Exception type for RELAY-protocol-level failures. - - - - Handle for calling.stream operations. - - - - Handle for calling.tap operations. - - - - Handle for calling.transcribe operations. - - - - RELAY WebSocket transport. - - - -## Enums - -### CallState - -RELAY call lifecycle state, as a typed, compile-time-checked closed set. - -A call moves through these states over its lifetime: - -``` -created → ringing → answered → ending → ended -``` - -The five members are exactly the \{@see Constants\}::CALL\_STATE\_\* tokens -(grounded in the Python reference's `relay/constants.py` CALL\_STATES tuple); -each backing string IS the wire value the server emits in a -`calling.call.state` event's `call_state` / `state` field. \{@see Call\} -keeps the bare-string `$state` property for parity with the Python reference -(which models state as a plain `str`); this enum is offered ALONGSIDE it via -the typed \{@see Call::callState()\} accessor — autocompletion and an -exhaustive `match` at the call site, with the string preserved. - -``` -$call->state; // 'answered' (string, parity) -$call->callState(); // CallState::Answered (typed) -$call->callState()?->isTerminal(); // false -``` - -Server states can GROW (the wire vocabulary is owned by the server, not the -SDK), so \{@see CallState::tryFromWire()\} maps an unknown value to `null` -rather than throwing — a forward-compatible coerce. This is a PHP -PORT\_ADDITION: the Python reference uses a bare `str`. - -This is the CALL-state vocabulary ONLY. It is deliberately NOT unified with -\{@see DialState\} (dial-outcome) or \{@see MessageState\} (message-delivery) — -three distinct vocabularies that must never be conflated. - -#### Signature - -```php -final enum CallState implements UnitEnum, BackedEnum -``` - -#### Inheritance - -**Implements:** `UnitEnum`, `BackedEnum` - -#### Properties - - - - - -#### Constants - - - The call has been answered and is up. - - - - The call object exists but nothing has happened yet (the default). - - - - The call has ended — the one terminal state. - - - - The call is tearing down. - - - - The call is ringing the destination. - - -#### Variants - - - The call has been answered and is up. - - - - The call object exists but nothing has happened yet (the default). - - - - The call has ended — the one terminal state. - - - - The call is tearing down. - - - - The call is ringing the destination. - - -#### Methods - -##### cases - -**Modifiers:** `static` - -###### Signature - -```php -public static function cases(): array -``` - -###### Returns - -`array` - -*** - -##### from - -**Modifiers:** `static` - -###### Signature - -```php -public static function from(string|int $value): static -``` - -###### Parameters - - - -###### Returns - -`static` - -*** - -##### isTerminal - -True once the call has reached its terminal state. - -Terminal = \{@see CallState::Ended\} only, matching -\{@see Constants\}::CALL\_TERMINAL\_STATES (`['ended' => true]`). A terminal -state is what resolves every in-flight action on the call. - -###### Signature - -```php -public function isTerminal(): bool -``` - -###### Returns - -`bool` - -###### Source - -[`SignalWire/Relay/CallState.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/CallState.php) - -Line 60. - -*** - -##### tryFrom - -**Modifiers:** `static` - -###### Signature - -```php -public static function tryFrom(string|int $value): ?static -``` - -###### Parameters - - - -###### Returns - -`?static` - -*** - -##### tryFromWire - -Coerce a wire string (or null) to this enum, mapping any value outside - -the known closed set — or null — to null instead of throwing. - -Use this when reading a SERVER-emitted state: the wire vocabulary is -owned by the server and may grow, so an unrecognised value is not an -error — the caller falls back to the raw string. (Contrast PHP's -built-in \{@see CallState::from()\}, which throws \ValueError on a miss.) - -**Modifiers:** `static` - -###### Signature - -```php -public static function tryFromWire(?string $wire): ?SignalWire\Relay\CallState -``` - -###### Parameters - - - The raw `call_state` / `state` value from the wire. - - -###### Returns - -`?SignalWire\Relay\CallState` - -###### Source - -[`SignalWire/Relay/CallState.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/CallState.php) - -Line 76. - -#### Source - -[`SignalWire/Relay/CallState.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/CallState.php) - -Line 36. - -*** - -### DialState - -RELAY dial outcome state, as a typed, compile-time-checked closed set. - -A `calling.call.dial` event carries a `dial_state` (or legacy `state`) that -reports how the outbound dial is progressing: - -``` -dialing → (answered | failed | no_answer | busy) -``` - -The Python reference's `RelayClient` documents the core three -(`dialing | answered | failed`, see `relay/client.py`'s dial-event handler); -this port's \{@see Client::handleDialEvent()\} additionally treats the wire's -`no_answer` / `busy` as terminal failures, so they are modelled here too. -Each backing string IS the wire value. \{@see Constants\}::DIAL\_STATE\_\* keeps -the bare-string constants for parity (the Python reference reads -`dial_state` as a plain `str`); this enum is offered ALONGSIDE them. - -``` -DialState::Answered->value; // 'answered' (wire string) -DialState::tryFromWire('failed'); // DialState::Failed -DialState::Failed->isTerminal(); // true -DialState::Dialing->isTerminal(); // false (still in progress) -``` - -Server states can GROW, so \{@see DialState::tryFromWire()\} maps an unknown -value to `null` rather than throwing — a forward-compatible coerce. This is -a PHP PORT\_ADDITION: the Python reference uses a bare `str`. - -This is the DIAL-outcome vocabulary ONLY. It is deliberately NOT unified -with \{@see CallState\} (call-lifecycle) or \{@see MessageState\} -(message-delivery) — three distinct vocabularies that must never be -conflated. (Note `answered` appears in both CallState and DialState but -means different things — a call lifecycle phase vs a dial outcome — which is -exactly why the vocabularies are kept apart.) - -#### Signature - -```php -final enum DialState implements UnitEnum, BackedEnum -``` - -#### Inheritance - -**Implements:** `UnitEnum`, `BackedEnum` - -#### Properties - - - - - -#### Constants - - - A leg answered — the dial succeeded with a winner. - - - - Every leg returned busy. - - - - The dial is in progress, no leg has been picked yet. - - - - The dial failed outright. - - - - No leg answered before the dial timed out. - - -#### Variants - - - A leg answered — the dial succeeded with a winner. - - - - Every leg returned busy. - - - - The dial is in progress, no leg has been picked yet. - - - - The dial failed outright. - - - - No leg answered before the dial timed out. - - -#### Methods - -##### cases - -**Modifiers:** `static` - -###### Signature - -```php -public static function cases(): array -``` - -###### Returns - -`array` - -*** - -##### from - -**Modifiers:** `static` - -###### Signature - -```php -public static function from(string|int $value): static -``` - -###### Parameters - - - -###### Returns - -`static` - -*** - -##### isTerminal - -True once the dial has reached a terminal outcome. - -Terminal = any state other than \{@see DialState::Dialing\} — i.e. a -winner answered (\{@see DialState::Answered\}) or the dial gave up -(failed / no-answer / busy). This mirrors -\{@see Client::handleDialEvent()\}, which resolves (or rejects) the -pending dial on exactly these states and keeps waiting while `dialing`. - -###### Signature - -```php -public function isTerminal(): bool -``` - -###### Returns - -`bool` - -###### Source - -[`SignalWire/Relay/DialState.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/DialState.php) - -Line 65. - -*** - -##### tryFrom - -**Modifiers:** `static` - -###### Signature - -```php -public static function tryFrom(string|int $value): ?static -``` - -###### Parameters - - - -###### Returns - -`?static` - -*** - -##### tryFromWire - -Coerce a wire string (or null) to this enum, mapping any value outside - -the known closed set — or null — to null instead of throwing. - -Use this when reading a SERVER-emitted `dial_state`: the wire vocabulary -is owned by the server and may grow, so an unrecognised value is not an -error — the caller falls back to the raw string. (Contrast PHP's -built-in \{@see DialState::from()\}, which throws \ValueError on a miss.) - -**Modifiers:** `static` - -###### Signature - -```php -public static function tryFromWire(?string $wire): ?SignalWire\Relay\DialState -``` - -###### Parameters - - - The raw `dial_state` / `state` value from the wire. - - -###### Returns - -`?SignalWire\Relay\DialState` - -###### Source - -[`SignalWire/Relay/DialState.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/DialState.php) - -Line 81. - -#### Source - -[`SignalWire/Relay/DialState.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/DialState.php) - -Line 39. - -*** - -### MessageState - -RELAY message delivery state, as a typed, compile-time-checked closed set. - -A \{@see Message\} progresses through these states as the server reports -delivery via `messaging.state` events: - -``` -queued → initiated → sent → (delivered | undelivered | failed) -``` - -plus `received` for an inbound message. The seven members are exactly the -\{@see Constants\}::MESSAGE\_STATE\_\* tokens (grounded in the Python reference's -`relay/constants.py` MESSAGE\_STATE\_\* + MESSAGE\_TERMINAL\_STATES); each -backing string IS the wire value the server emits in the `message_state` / -`state` field. \{@see Message\} keeps the bare-string `getState()` accessor -for parity with the Python reference (which models state as a plain `str`); -this enum is offered ALONGSIDE it via the typed -\{@see Message::messageState()\} accessor. - -``` -$msg->getState(); // 'delivered' (string, parity) -$msg->messageState(); // MessageState::Delivered (typed) -$msg->messageState()?->isTerminal(); // true -``` - -Server states can GROW, so \{@see MessageState::tryFromWire()\} maps an -unknown value to `null` rather than throwing — a forward-compatible coerce. -This is a PHP PORT\_ADDITION: the Python reference uses a bare `str`. - -This is the MESSAGE-delivery vocabulary ONLY. It is deliberately NOT unified -with \{@see CallState\} (call-lifecycle) or \{@see DialState\} (dial-outcome) — -three distinct vocabularies that must never be conflated. (Note `failed` -appears in both MessageState and DialState but means different things — -message-delivery failure vs dial-outcome failure.) - -#### Signature - -```php -final enum MessageState implements UnitEnum, BackedEnum -``` - -#### Inheritance - -**Implements:** `UnitEnum`, `BackedEnum` - -#### Properties - - - - - -#### Constants - - - The message was delivered to the carrier/handset (terminal, success). - - - - The message failed to send (terminal, failure). - - - - Sending has been initiated. - - - - The message is queued for sending (the initial state). - - - - An inbound message was received. - - - - The message has left the platform. - - - - Delivery was attempted but not confirmed (terminal, failure). - - -#### Variants - - - The message was delivered to the carrier/handset (terminal, success). - - - - The message failed to send (terminal, failure). - - - - Sending has been initiated. - - - - The message is queued for sending (the initial state). - - - - An inbound message was received. - - - - The message has left the platform. - - - - Delivery was attempted but not confirmed (terminal, failure). - - -#### Methods - -##### cases - -**Modifiers:** `static` - -###### Signature - -```php -public static function cases(): array -``` - -###### Returns - -`array` - -*** - -##### from - -**Modifiers:** `static` - -###### Signature - -```php -public static function from(string|int $value): static -``` - -###### Parameters - - - -###### Returns - -`static` - -*** - -##### isTerminal - -True once the message has reached a terminal delivery state. - -Terminal = \{@see MessageState::Delivered\}, \{@see MessageState::Undelivered\}, -or \{@see MessageState::Failed\}, matching -\{@see Constants\}::MESSAGE\_TERMINAL\_STATES — the three states on which -\{@see Message::dispatchEvent()\} auto-resolves the message. Note `received` -is NOT terminal here (it mirrors the Python reference, whose -MESSAGE\_TERMINAL\_STATES excludes it). - -###### Signature - -```php -public function isTerminal(): bool -``` - -###### Returns - -`bool` - -###### Source - -[`SignalWire/Relay/MessageState.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/MessageState.php) - -Line 71. - -*** - -##### tryFrom - -**Modifiers:** `static` - -###### Signature - -```php -public static function tryFrom(string|int $value): ?static -``` - -###### Parameters - - - -###### Returns - -`?static` - -*** - -##### tryFromWire - -Coerce a wire string (or null) to this enum, mapping any value outside - -the known closed set — or null — to null instead of throwing. - -Use this when reading a SERVER-emitted `message_state`: the wire -vocabulary is owned by the server and may grow, so an unrecognised value -is not an error — the caller falls back to the raw string. (Contrast -PHP's built-in \{@see MessageState::from()\}, which throws \ValueError on a -miss.) - -**Modifiers:** `static` - -###### Signature - -```php -public static function tryFromWire(?string $wire): ?SignalWire\Relay\MessageState -``` - -###### Parameters - - - The raw `message_state` / `state` value from the wire. - - -###### Returns - -`?SignalWire\Relay\MessageState` - -###### Source - -[`SignalWire/Relay/MessageState.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/MessageState.php) - -Line 91. - -#### Source - -[`SignalWire/Relay/MessageState.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/MessageState.php) - -Line 38. diff --git a/fern/products/sdk-reference/php/signal-wire/relay/relay/message/index.mdx b/fern/products/sdk-reference/php/signal-wire/relay/relay/message/index.mdx deleted file mode 100644 index 493d876114..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/relay/relay/message/index.mdx +++ /dev/null @@ -1,499 +0,0 @@ ---- -slug: "/reference/php/signal-wire/relay/relay/message" -title: "Message" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\Relay\\Message" - parent: "SignalWire\\Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Message.php" ---- -# `Message` - -Represents a RELAY messaging message (SMS / MMS). - -A Message is created when you send or receive a message through the -RELAY messaging namespace. It accumulates state-change events and -resolves once the message reaches a terminal state (delivered, -undelivered, or failed). - -## Signature - -```php -class Message -``` - -## Methods - -### \_\_construct - -Build a Message from a params array (as returned by the server). - -Expected keys (all optional with sane defaults): -message\_id, context, direction, from\_number / from, -to\_number / to, body, media, tags, state, reason - -#### Signature - -```php -public function __construct(array $params = array ( -)) -``` - -#### Parameters - - - -#### Source - -[`SignalWire/Relay/Message.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Message.php) - -Line 46. - -*** - -### dispatchEvent - -Process an inbound event for this message. - -Updates state/reason, fires any registered event listeners, and -auto-resolves the message when it reaches a terminal state. - -Accepts both `state` and `message_state` keys on the event -payload — production RELAY emits `message_state` while older -fixtures use `state`. - -#### Signature - -```php -public function dispatchEvent(SignalWire\Relay\Event $event): void -``` - -#### Parameters - - - -#### Source - -[`SignalWire/Relay/Message.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Message.php) - -Line 74. - -*** - -### getBody - -#### Signature - -```php -public function getBody(): ?string -``` - -#### Returns - -`?string` - -#### Source - -[`SignalWire/Relay/Message.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Message.php) - -Line 205. - -*** - -### getContext - -#### Signature - -```php -public function getContext(): ?string -``` - -#### Returns - -`?string` - -#### Source - -[`SignalWire/Relay/Message.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Message.php) - -Line 185. - -*** - -### getDirection - -#### Signature - -```php -public function getDirection(): ?string -``` - -#### Returns - -`?string` - -#### Source - -[`SignalWire/Relay/Message.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Message.php) - -Line 190. - -*** - -### getFromNumber - -#### Signature - -```php -public function getFromNumber(): ?string -``` - -#### Returns - -`?string` - -#### Source - -[`SignalWire/Relay/Message.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Message.php) - -Line 195. - -*** - -### getMedia - -#### Signature - -```php -public function getMedia(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Relay/Message.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Message.php) - -Line 210. - -*** - -### getMessageId - -#### Signature - -```php -public function getMessageId(): ?string -``` - -#### Returns - -`?string` - -#### Source - -[`SignalWire/Relay/Message.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Message.php) - -Line 180. - -*** - -### getReason - -#### Signature - -```php -public function getReason(): ?string -``` - -#### Returns - -`?string` - -#### Source - -[`SignalWire/Relay/Message.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Message.php) - -Line 240. - -*** - -### getResult - -#### Signature - -```php -public function getResult() -``` - -#### Returns - -`mixed` - -#### Source - -[`SignalWire/Relay/Message.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Message.php) - -Line 246. - -*** - -### getState - -#### Signature - -```php -public function getState(): ?string -``` - -#### Returns - -`?string` - -#### Source - -[`SignalWire/Relay/Message.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Message.php) - -Line 220. - -*** - -### getTags - -#### Signature - -```php -public function getTags(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Relay/Message.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Message.php) - -Line 215. - -*** - -### getToNumber - -#### Signature - -```php -public function getToNumber(): ?string -``` - -#### Returns - -`?string` - -#### Source - -[`SignalWire/Relay/Message.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Message.php) - -Line 200. - -*** - -### handleEvent - -Alias for `dispatchEvent` so the Client's event router (which - -calls `handleEvent` for symmetry with Action) doesn't need a -special case. Both names route the same way. - -#### Signature - -```php -public function handleEvent(SignalWire\Relay\Event $event): void -``` - -#### Parameters - - - -#### Source - -[`SignalWire/Relay/Message.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Message.php) - -Line 112. - -*** - -### isDone - -#### Signature - -```php -public function isDone(): bool -``` - -#### Returns - -`bool` - -#### Source - -[`SignalWire/Relay/Message.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Message.php) - -Line 175. - -*** - -### messageState - -The current delivery state as a typed \{@see MessageState\}, or null when - -the raw \{@see getState()\} string is outside the known closed set -(a forward-compatible server value). - -Offered ALONGSIDE the bare-string \{@see getState()\} accessor for parity -with the Python reference: `getState()` stays the canonical string; -`messageState()` is the typed view for autocompletion + an exhaustive -`match` + `->isTerminal()`. PORT\_ADDITION. - -#### Signature - -```php -public function messageState(): ?SignalWire\Relay\MessageState -``` - -#### Returns - -`?SignalWire\Relay\MessageState` - -#### Source - -[`SignalWire/Relay/Message.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Message.php) - -Line 235. - -*** - -### on - -Register a listener that fires on every state-change event. - -#### Signature - -```php -public function on(callable $cb): SignalWire\Relay\Message -``` - -#### Parameters - - - -#### Returns - -`SignalWire\Relay\Message` - -#### Source - -[`SignalWire/Relay/Message.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Message.php) - -Line 149. - -*** - -### onCompleted - -Register a callback to fire when the message reaches a terminal state. - -If the message is already complete the callback fires immediately. - -#### Signature - -```php -public function onCompleted(callable $cb): SignalWire\Relay\Message -``` - -#### Parameters - - - -#### Returns - -`SignalWire\Relay\Message` - -#### Source - -[`SignalWire/Relay/Message.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Message.php) - -Line 160. - -*** - -### resolve - -Mark this message as completed. - -The optional $result is stored and the onCompleted callback fires -exactly once. - -#### Signature - -```php -public function resolve($result = NULL): void -``` - -#### Parameters - - - -#### Source - -[`SignalWire/Relay/Message.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Message.php) - -Line 263. - -*** - -### wait - -Block until the message completes or $timeout seconds elapse. - -The caller is expected to feed events into dispatchEvent() from -another mechanism (e.g. the client's read loop). This method -simply spins until completion. - -#### Signature - -```php -public function wait(int $timeout = 30) -``` - -#### Parameters - - - -#### Returns - -`mixed` — The resolved result, or null on timeout. - -#### Source - -[`SignalWire/Relay/Message.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Message.php) - -Line 130. - -## Source - -[`SignalWire/Relay/Message.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Message.php) - -Line 17. diff --git a/fern/products/sdk-reference/php/signal-wire/relay/relay/pay-action/index.mdx b/fern/products/sdk-reference/php/signal-wire/relay/relay/pay-action/index.mdx deleted file mode 100644 index 9bb833a20e..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/relay/relay/pay-action/index.mdx +++ /dev/null @@ -1,404 +0,0 @@ ---- -slug: "/reference/php/signal-wire/relay/relay/pay-action" -title: "PayAction" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\Relay\\PayAction" - parent: "SignalWire\\Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php" ---- -# `PayAction` - -Handle for calling.pay operations. - -## Signature - -```php -class PayAction extends Action -``` - -## Inheritance - -**Extends:** [SignalWire\Relay\Action](/docs/sdk-reference/reference/php/signal-wire/relay/relay/action) - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct( - string $controlId, - string $callId, - string $nodeId, - object $client -) -``` - -#### Parameters - - - - - - - - - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 33. - -*** - -### executeSubcommand - -Send a sub-command RPC through the client. - -The payload always includes control\_id, call\_id, and node\_id so -the server knows which action instance to target. - -#### Signature - -```php -public function executeSubcommand(string $method, array $extraParams = array ( -)): void -``` - -#### Parameters - - - - - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 211. - -*** - -### getCallId - -#### Signature - -```php -public function getCallId(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 107. - -*** - -### getControlId - -#### Signature - -```php -public function getControlId(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 102. - -*** - -### getEvents - -#### Signature - -```php -public function getEvents(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 97. - -*** - -### getNodeId - -#### Signature - -```php -public function getNodeId(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 112. - -*** - -### getPayload - -#### Signature - -```php -public function getPayload(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 91. - -*** - -### getResult - -#### Signature - -```php -public function getResult() -``` - -#### Returns - -`mixed` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 81. - -*** - -### getState - -#### Signature - -```php -public function getState(): ?string -``` - -#### Returns - -`?string` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 86. - -*** - -### getStopMethod - -#### Signature - -```php -public function getStopMethod(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 456. - -*** - -### handleEvent - -Append an incoming event and update local state / payload. - -#### Signature - -```php -public function handleEvent(SignalWire\Relay\Event $event): void -``` - -#### Parameters - - - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 144. - -*** - -### isDone - -#### Signature - -```php -public function isDone(): bool -``` - -#### Returns - -`bool` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 75. - -*** - -### onCompleted - -Register a callback to fire when the action completes. - -If the action is already done the callback fires immediately. - -#### Signature - -```php -public function onCompleted(callable $cb): SignalWire\Relay\Action -``` - -#### Parameters - - - -#### Returns - -`SignalWire\Relay\Action` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 126. - -*** - -### resolve - -Mark this action as completed. - -The optional $result is stored and the onCompleted callback is -fired exactly once. - -#### Signature - -```php -public function resolve($result = NULL): void -``` - -#### Parameters - - - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 167. - -*** - -### stop - -Stop the running action by sending its stop sub-command. - -#### Signature - -```php -public function stop(): void -``` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 186. - -*** - -### wait - -Block until the action completes or $timeout seconds elapse. - -Each iteration calls $client->readOnce() so the event-loop -keeps processing inbound frames. - -Returns the resolving Event when the action completes (mirrors -Python's `return self._wait_event.wait()`). Returns null on -timeout. The numeric `$timeout` is interpreted as seconds and -accepts integers or floats. - -#### Signature - -```php -public function wait(int|float $timeout = 30): ?SignalWire\Relay\Event -``` - -#### Parameters - - - -#### Returns - -`?SignalWire\Relay\Event` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 58. - -## Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 454. diff --git a/fern/products/sdk-reference/php/signal-wire/relay/relay/play-action/index.mdx b/fern/products/sdk-reference/php/signal-wire/relay/relay/play-action/index.mdx deleted file mode 100644 index 635acdf031..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/relay/relay/play-action/index.mdx +++ /dev/null @@ -1,460 +0,0 @@ ---- -slug: "/reference/php/signal-wire/relay/relay/play-action" -title: "PlayAction" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\Relay\\PlayAction" - parent: "SignalWire\\Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php" ---- -# `PlayAction` - -Handle for calling.play operations. - -## Signature - -```php -class PlayAction extends Action -``` - -## Inheritance - -**Extends:** [SignalWire\Relay\Action](/docs/sdk-reference/reference/php/signal-wire/relay/relay/action) - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct( - string $controlId, - string $callId, - string $nodeId, - object $client -) -``` - -#### Parameters - - - - - - - - - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 33. - -*** - -### executeSubcommand - -Send a sub-command RPC through the client. - -The payload always includes control\_id, call\_id, and node\_id so -the server knows which action instance to target. - -#### Signature - -```php -public function executeSubcommand(string $method, array $extraParams = array ( -)): void -``` - -#### Parameters - - - - - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 211. - -*** - -### getCallId - -#### Signature - -```php -public function getCallId(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 107. - -*** - -### getControlId - -#### Signature - -```php -public function getControlId(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 102. - -*** - -### getEvents - -#### Signature - -```php -public function getEvents(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 97. - -*** - -### getNodeId - -#### Signature - -```php -public function getNodeId(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 112. - -*** - -### getPayload - -#### Signature - -```php -public function getPayload(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 91. - -*** - -### getResult - -#### Signature - -```php -public function getResult() -``` - -#### Returns - -`mixed` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 81. - -*** - -### getState - -#### Signature - -```php -public function getState(): ?string -``` - -#### Returns - -`?string` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 86. - -*** - -### getStopMethod - -#### Signature - -```php -public function getStopMethod(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 251. - -*** - -### handleEvent - -Append an incoming event and update local state / payload. - -#### Signature - -```php -public function handleEvent(SignalWire\Relay\Event $event): void -``` - -#### Parameters - - - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 144. - -*** - -### isDone - -#### Signature - -```php -public function isDone(): bool -``` - -#### Returns - -`bool` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 75. - -*** - -### onCompleted - -Register a callback to fire when the action completes. - -If the action is already done the callback fires immediately. - -#### Signature - -```php -public function onCompleted(callable $cb): SignalWire\Relay\Action -``` - -#### Parameters - - - -#### Returns - -`SignalWire\Relay\Action` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 126. - -*** - -### pause - -#### Signature - -```php -public function pause(): void -``` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 256. - -*** - -### resolve - -Mark this action as completed. - -The optional $result is stored and the onCompleted callback is -fired exactly once. - -#### Signature - -```php -public function resolve($result = NULL): void -``` - -#### Parameters - - - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 167. - -*** - -### resume - -#### Signature - -```php -public function resume(): void -``` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 261. - -*** - -### stop - -Stop the running action by sending its stop sub-command. - -#### Signature - -```php -public function stop(): void -``` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 186. - -*** - -### volume - -Adjust playback volume. - -#### Signature - -```php -public function volume(float $db): void -``` - -#### Parameters - - - Volume adjustment in dB (e.g. -4.0 or 6.0). - - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 271. - -*** - -### wait - -Block until the action completes or $timeout seconds elapse. - -Each iteration calls $client->readOnce() so the event-loop -keeps processing inbound frames. - -Returns the resolving Event when the action completes (mirrors -Python's `return self._wait_event.wait()`). Returns null on -timeout. The numeric `$timeout` is interpreted as seconds and -accepts integers or floats. - -#### Signature - -```php -public function wait(int|float $timeout = 30): ?SignalWire\Relay\Event -``` - -#### Parameters - - - -#### Returns - -`?SignalWire\Relay\Event` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 58. - -## Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 249. diff --git a/fern/products/sdk-reference/php/signal-wire/relay/relay/record-action/index.mdx b/fern/products/sdk-reference/php/signal-wire/relay/relay/record-action/index.mdx deleted file mode 100644 index f444dd8dcd..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/relay/relay/record-action/index.mdx +++ /dev/null @@ -1,508 +0,0 @@ ---- -slug: "/reference/php/signal-wire/relay/relay/record-action" -title: "RecordAction" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\Relay\\RecordAction" - parent: "SignalWire\\Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php" ---- -# `RecordAction` - -Handle for calling.record operations. - -## Signature - -```php -class RecordAction extends Action -``` - -## Inheritance - -**Extends:** [SignalWire\Relay\Action](/docs/sdk-reference/reference/php/signal-wire/relay/relay/action) - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct( - string $controlId, - string $callId, - string $nodeId, - object $client -) -``` - -#### Parameters - - - - - - - - - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 33. - -*** - -### executeSubcommand - -Send a sub-command RPC through the client. - -The payload always includes control\_id, call\_id, and node\_id so -the server knows which action instance to target. - -#### Signature - -```php -public function executeSubcommand(string $method, array $extraParams = array ( -)): void -``` - -#### Parameters - - - - - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 211. - -*** - -### getCallId - -#### Signature - -```php -public function getCallId(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 107. - -*** - -### getControlId - -#### Signature - -```php -public function getControlId(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 102. - -*** - -### getDuration - -#### Signature - -```php -public function getDuration(): ?float -``` - -#### Returns - -`?float` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 308. - -*** - -### getEvents - -#### Signature - -```php -public function getEvents(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 97. - -*** - -### getNodeId - -#### Signature - -```php -public function getNodeId(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 112. - -*** - -### getPayload - -#### Signature - -```php -public function getPayload(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 91. - -*** - -### getResult - -#### Signature - -```php -public function getResult() -``` - -#### Returns - -`mixed` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 81. - -*** - -### getSize - -#### Signature - -```php -public function getSize(): ?int -``` - -#### Returns - -`?int` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 314. - -*** - -### getState - -#### Signature - -```php -public function getState(): ?string -``` - -#### Returns - -`?string` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 86. - -*** - -### getStopMethod - -#### Signature - -```php -public function getStopMethod(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 284. - -*** - -### getUrl - -#### Signature - -```php -public function getUrl(): ?string -``` - -#### Returns - -`?string` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 303. - -*** - -### handleEvent - -Append an incoming event and update local state / payload. - -#### Signature - -```php -public function handleEvent(SignalWire\Relay\Event $event): void -``` - -#### Parameters - - - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 144. - -*** - -### isDone - -#### Signature - -```php -public function isDone(): bool -``` - -#### Returns - -`bool` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 75. - -*** - -### onCompleted - -Register a callback to fire when the action completes. - -If the action is already done the callback fires immediately. - -#### Signature - -```php -public function onCompleted(callable $cb): SignalWire\Relay\Action -``` - -#### Parameters - - - -#### Returns - -`SignalWire\Relay\Action` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 126. - -*** - -### pause - -#### Signature - -```php -public function pause(array $extra = array ( -)): void -``` - -#### Parameters - - - Additional params to merge onto the wire (e.g. `['behavior' => 'continuous']`). - - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 293. - -*** - -### resolve - -Mark this action as completed. - -The optional $result is stored and the onCompleted callback is -fired exactly once. - -#### Signature - -```php -public function resolve($result = NULL): void -``` - -#### Parameters - - - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 167. - -*** - -### resume - -#### Signature - -```php -public function resume(): void -``` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 298. - -*** - -### stop - -Stop the running action by sending its stop sub-command. - -#### Signature - -```php -public function stop(): void -``` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 186. - -*** - -### wait - -Block until the action completes or $timeout seconds elapse. - -Each iteration calls $client->readOnce() so the event-loop -keeps processing inbound frames. - -Returns the resolving Event when the action completes (mirrors -Python's `return self._wait_event.wait()`). Returns null on -timeout. The numeric `$timeout` is interpreted as seconds and -accepts integers or floats. - -#### Signature - -```php -public function wait(int|float $timeout = 30): ?SignalWire\Relay\Event -``` - -#### Parameters - - - -#### Returns - -`?SignalWire\Relay\Event` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 58. - -## Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 282. diff --git a/fern/products/sdk-reference/php/signal-wire/relay/relay/relay-error/index.mdx b/fern/products/sdk-reference/php/signal-wire/relay/relay/relay-error/index.mdx deleted file mode 100644 index 59a0a4401c..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/relay/relay/relay-error/index.mdx +++ /dev/null @@ -1,43 +0,0 @@ ---- -slug: "/reference/php/signal-wire/relay/relay/relay-error" -title: "RelayError" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\Relay\\RelayError" - parent: "SignalWire\\Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/RelayError.php" ---- -# `RelayError` - -Exception type for RELAY-protocol-level failures. - -Mirrors signalwire.relay.client.RelayError in the Python SDK: raised -when a JSON-RPC response carries an `error` field, when a dial -resolves to a failure outcome, or when an SDK-side timeout fires. - -The numeric code field carries the JSON-RPC error code where -applicable (e.g. -32601 method-not-found from the server) or an -SDK-defined sentinel (e.g. 408 for client-side timeout). - -## Signature - -```php -class RelayError extends RuntimeException implements Stringable, Throwable -``` - -## Inheritance - -**Extends:** `RuntimeException` - -**Implements:** `Stringable`, `Throwable` - -## Source - -[`SignalWire/Relay/RelayError.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/RelayError.php) - -Line 18. diff --git a/fern/products/sdk-reference/php/signal-wire/relay/relay/stream-action/index.mdx b/fern/products/sdk-reference/php/signal-wire/relay/relay/stream-action/index.mdx deleted file mode 100644 index 704bc69dae..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/relay/relay/stream-action/index.mdx +++ /dev/null @@ -1,404 +0,0 @@ ---- -slug: "/reference/php/signal-wire/relay/relay/stream-action" -title: "StreamAction" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\Relay\\StreamAction" - parent: "SignalWire\\Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php" ---- -# `StreamAction` - -Handle for calling.stream operations. - -## Signature - -```php -class StreamAction extends Action -``` - -## Inheritance - -**Extends:** [SignalWire\Relay\Action](/docs/sdk-reference/reference/php/signal-wire/relay/relay/action) - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct( - string $controlId, - string $callId, - string $nodeId, - object $client -) -``` - -#### Parameters - - - - - - - - - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 33. - -*** - -### executeSubcommand - -Send a sub-command RPC through the client. - -The payload always includes control\_id, call\_id, and node\_id so -the server knows which action instance to target. - -#### Signature - -```php -public function executeSubcommand(string $method, array $extraParams = array ( -)): void -``` - -#### Parameters - - - - - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 211. - -*** - -### getCallId - -#### Signature - -```php -public function getCallId(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 107. - -*** - -### getControlId - -#### Signature - -```php -public function getControlId(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 102. - -*** - -### getEvents - -#### Signature - -```php -public function getEvents(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 97. - -*** - -### getNodeId - -#### Signature - -```php -public function getNodeId(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 112. - -*** - -### getPayload - -#### Signature - -```php -public function getPayload(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 91. - -*** - -### getResult - -#### Signature - -```php -public function getResult() -``` - -#### Returns - -`mixed` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 81. - -*** - -### getState - -#### Signature - -```php -public function getState(): ?string -``` - -#### Returns - -`?string` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 86. - -*** - -### getStopMethod - -#### Signature - -```php -public function getStopMethod(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 445. - -*** - -### handleEvent - -Append an incoming event and update local state / payload. - -#### Signature - -```php -public function handleEvent(SignalWire\Relay\Event $event): void -``` - -#### Parameters - - - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 144. - -*** - -### isDone - -#### Signature - -```php -public function isDone(): bool -``` - -#### Returns - -`bool` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 75. - -*** - -### onCompleted - -Register a callback to fire when the action completes. - -If the action is already done the callback fires immediately. - -#### Signature - -```php -public function onCompleted(callable $cb): SignalWire\Relay\Action -``` - -#### Parameters - - - -#### Returns - -`SignalWire\Relay\Action` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 126. - -*** - -### resolve - -Mark this action as completed. - -The optional $result is stored and the onCompleted callback is -fired exactly once. - -#### Signature - -```php -public function resolve($result = NULL): void -``` - -#### Parameters - - - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 167. - -*** - -### stop - -Stop the running action by sending its stop sub-command. - -#### Signature - -```php -public function stop(): void -``` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 186. - -*** - -### wait - -Block until the action completes or $timeout seconds elapse. - -Each iteration calls $client->readOnce() so the event-loop -keeps processing inbound frames. - -Returns the resolving Event when the action completes (mirrors -Python's `return self._wait_event.wait()`). Returns null on -timeout. The numeric `$timeout` is interpreted as seconds and -accepts integers or floats. - -#### Signature - -```php -public function wait(int|float $timeout = 30): ?SignalWire\Relay\Event -``` - -#### Parameters - - - -#### Returns - -`?SignalWire\Relay\Event` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 58. - -## Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 443. diff --git a/fern/products/sdk-reference/php/signal-wire/relay/relay/tap-action/index.mdx b/fern/products/sdk-reference/php/signal-wire/relay/relay/tap-action/index.mdx deleted file mode 100644 index 50ba40582b..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/relay/relay/tap-action/index.mdx +++ /dev/null @@ -1,404 +0,0 @@ ---- -slug: "/reference/php/signal-wire/relay/relay/tap-action" -title: "TapAction" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\Relay\\TapAction" - parent: "SignalWire\\Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php" ---- -# `TapAction` - -Handle for calling.tap operations. - -## Signature - -```php -class TapAction extends Action -``` - -## Inheritance - -**Extends:** [SignalWire\Relay\Action](/docs/sdk-reference/reference/php/signal-wire/relay/relay/action) - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct( - string $controlId, - string $callId, - string $nodeId, - object $client -) -``` - -#### Parameters - - - - - - - - - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 33. - -*** - -### executeSubcommand - -Send a sub-command RPC through the client. - -The payload always includes control\_id, call\_id, and node\_id so -the server knows which action instance to target. - -#### Signature - -```php -public function executeSubcommand(string $method, array $extraParams = array ( -)): void -``` - -#### Parameters - - - - - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 211. - -*** - -### getCallId - -#### Signature - -```php -public function getCallId(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 107. - -*** - -### getControlId - -#### Signature - -```php -public function getControlId(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 102. - -*** - -### getEvents - -#### Signature - -```php -public function getEvents(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 97. - -*** - -### getNodeId - -#### Signature - -```php -public function getNodeId(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 112. - -*** - -### getPayload - -#### Signature - -```php -public function getPayload(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 91. - -*** - -### getResult - -#### Signature - -```php -public function getResult() -``` - -#### Returns - -`mixed` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 81. - -*** - -### getState - -#### Signature - -```php -public function getState(): ?string -``` - -#### Returns - -`?string` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 86. - -*** - -### getStopMethod - -#### Signature - -```php -public function getStopMethod(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 434. - -*** - -### handleEvent - -Append an incoming event and update local state / payload. - -#### Signature - -```php -public function handleEvent(SignalWire\Relay\Event $event): void -``` - -#### Parameters - - - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 144. - -*** - -### isDone - -#### Signature - -```php -public function isDone(): bool -``` - -#### Returns - -`bool` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 75. - -*** - -### onCompleted - -Register a callback to fire when the action completes. - -If the action is already done the callback fires immediately. - -#### Signature - -```php -public function onCompleted(callable $cb): SignalWire\Relay\Action -``` - -#### Parameters - - - -#### Returns - -`SignalWire\Relay\Action` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 126. - -*** - -### resolve - -Mark this action as completed. - -The optional $result is stored and the onCompleted callback is -fired exactly once. - -#### Signature - -```php -public function resolve($result = NULL): void -``` - -#### Parameters - - - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 167. - -*** - -### stop - -Stop the running action by sending its stop sub-command. - -#### Signature - -```php -public function stop(): void -``` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 186. - -*** - -### wait - -Block until the action completes or $timeout seconds elapse. - -Each iteration calls $client->readOnce() so the event-loop -keeps processing inbound frames. - -Returns the resolving Event when the action completes (mirrors -Python's `return self._wait_event.wait()`). Returns null on -timeout. The numeric `$timeout` is interpreted as seconds and -accepts integers or floats. - -#### Signature - -```php -public function wait(int|float $timeout = 30): ?SignalWire\Relay\Event -``` - -#### Parameters - - - -#### Returns - -`?SignalWire\Relay\Event` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 58. - -## Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 432. diff --git a/fern/products/sdk-reference/php/signal-wire/relay/relay/transcribe-action/index.mdx b/fern/products/sdk-reference/php/signal-wire/relay/relay/transcribe-action/index.mdx deleted file mode 100644 index c7a38f4e51..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/relay/relay/transcribe-action/index.mdx +++ /dev/null @@ -1,404 +0,0 @@ ---- -slug: "/reference/php/signal-wire/relay/relay/transcribe-action" -title: "TranscribeAction" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\Relay\\TranscribeAction" - parent: "SignalWire\\Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php" ---- -# `TranscribeAction` - -Handle for calling.transcribe operations. - -## Signature - -```php -class TranscribeAction extends Action -``` - -## Inheritance - -**Extends:** [SignalWire\Relay\Action](/docs/sdk-reference/reference/php/signal-wire/relay/relay/action) - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct( - string $controlId, - string $callId, - string $nodeId, - object $client -) -``` - -#### Parameters - - - - - - - - - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 33. - -*** - -### executeSubcommand - -Send a sub-command RPC through the client. - -The payload always includes control\_id, call\_id, and node\_id so -the server knows which action instance to target. - -#### Signature - -```php -public function executeSubcommand(string $method, array $extraParams = array ( -)): void -``` - -#### Parameters - - - - - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 211. - -*** - -### getCallId - -#### Signature - -```php -public function getCallId(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 107. - -*** - -### getControlId - -#### Signature - -```php -public function getControlId(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 102. - -*** - -### getEvents - -#### Signature - -```php -public function getEvents(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 97. - -*** - -### getNodeId - -#### Signature - -```php -public function getNodeId(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 112. - -*** - -### getPayload - -#### Signature - -```php -public function getPayload(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 91. - -*** - -### getResult - -#### Signature - -```php -public function getResult() -``` - -#### Returns - -`mixed` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 81. - -*** - -### getState - -#### Signature - -```php -public function getState(): ?string -``` - -#### Returns - -`?string` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 86. - -*** - -### getStopMethod - -#### Signature - -```php -public function getStopMethod(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 467. - -*** - -### handleEvent - -Append an incoming event and update local state / payload. - -#### Signature - -```php -public function handleEvent(SignalWire\Relay\Event $event): void -``` - -#### Parameters - - - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 144. - -*** - -### isDone - -#### Signature - -```php -public function isDone(): bool -``` - -#### Returns - -`bool` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 75. - -*** - -### onCompleted - -Register a callback to fire when the action completes. - -If the action is already done the callback fires immediately. - -#### Signature - -```php -public function onCompleted(callable $cb): SignalWire\Relay\Action -``` - -#### Parameters - - - -#### Returns - -`SignalWire\Relay\Action` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 126. - -*** - -### resolve - -Mark this action as completed. - -The optional $result is stored and the onCompleted callback is -fired exactly once. - -#### Signature - -```php -public function resolve($result = NULL): void -``` - -#### Parameters - - - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 167. - -*** - -### stop - -Stop the running action by sending its stop sub-command. - -#### Signature - -```php -public function stop(): void -``` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 186. - -*** - -### wait - -Block until the action completes or $timeout seconds elapse. - -Each iteration calls $client->readOnce() so the event-loop -keeps processing inbound frames. - -Returns the resolving Event when the action completes (mirrors -Python's `return self._wait_event.wait()`). Returns null on -timeout. The numeric `$timeout` is interpreted as seconds and -accepts integers or floats. - -#### Signature - -```php -public function wait(int|float $timeout = 30): ?SignalWire\Relay\Event -``` - -#### Parameters - - - -#### Returns - -`?SignalWire\Relay\Event` - -#### Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 58. - -## Source - -[`SignalWire/Relay/Action.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php) - -Line 465. diff --git a/fern/products/sdk-reference/php/signal-wire/relay/relay/web-socket/index.mdx b/fern/products/sdk-reference/php/signal-wire/relay/relay/web-socket/index.mdx deleted file mode 100644 index 1739b9198f..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/relay/relay/web-socket/index.mdx +++ /dev/null @@ -1,240 +0,0 @@ ---- -slug: "/reference/php/signal-wire/relay/relay/web-socket" -title: "WebSocket" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\Relay\\WebSocket" - parent: "SignalWire\\Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/WebSocket.php" ---- -# `WebSocket` - -RELAY WebSocket transport. - -This is a thin adapter over the maintained \{@link \WebSocket\Client\} -(phrity/websocket) library. It deliberately keeps the same small public -surface the rest of the SDK depends on — connect / sendText / receive / -close / isConnected, plus the \{@see self::CLOSE\_FRAME\} sentinel — so that -\{@see Client\} (and its test subclasses overriding createSocket()) need no -changes. The previous implementation hand-rolled RFC 6455 framing on raw -PHP streams; that responsibility now belongs to phrity/websocket. - -Why phrity/websocket: - -- It performs a _real_, verified TLS handshake for `wss://` URIs. A - private CA (e.g. the porting-sdk test CA) is trusted by passing its - `cafile` through the stream \{@see \Phrity\Net\Context\} — peer - verification stays ON (no allow\_self\_signed, no verify\_peer=false). -- It owns frame masking/decoding, the upgrade handshake, the - Sec-WebSocket-Accept check, ping/pong, and close framing. - -Transport contract preserved for \{@see Client\}: - -- `receive()` returns the decoded text payload of the next data frame, - \{@see self::CLOSE\_FRAME\} when the peer closed, or `null` on read - timeout (socket still healthy). Ping/pong are consumed internally. -- Outbound application messages are always text frames (JSON-RPC). - -## Signature - -```php -class WebSocket -``` - -## Constants - - - Special marker the read loop uses to surface a remote close. - - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(?string $caFile = NULL) -``` - -#### Parameters - - - -#### Source - -[`SignalWire/Relay/WebSocket.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/WebSocket.php) - -Line 58. - -*** - -### close - -Send a close frame and tear down the socket. Best-effort. - -#### Signature - -```php -public function close(int $code = 1000, string $reason = ''): void -``` - -#### Parameters - - - - - -#### Source - -[`SignalWire/Relay/WebSocket.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/WebSocket.php) - -Line 153. - -*** - -### connect - -Open a WebSocket connection to the given URI. - -#### Signature - -```php -public function connect( - string $uri, - array $headers = array ( -), - float $timeout = 10.0, - ?string $caFile = NULL -): void -``` - -#### Parameters - - - ws:// or wss:// URI. - - - - Additional handshake headers. - - - - TCP-connect / read timeout (seconds). - - - - Optional CA bundle (PEM) for wss:// peer verification; overrides the value passed to the constructor. - - -#### Throws - -- `\InvalidArgumentException` — on an invalid/unsupported URI. -- `\RuntimeException` — on connection or handshake failure. - -#### Source - -[`SignalWire/Relay/WebSocket.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/WebSocket.php) - -Line 75. - -*** - -### isConnected - -#### Signature - -```php -public function isConnected(): bool -``` - -#### Returns - -`bool` - -#### Source - -[`SignalWire/Relay/WebSocket.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/WebSocket.php) - -Line 233. - -*** - -### receive - -Read one complete inbound data frame, blocking up to $timeout seconds. - -Returns: - -- the decoded payload string for a text/binary frame -- \{@see self::CLOSE\_FRAME\} for a close (or peer EOF) -- null on read timeout (socket still healthy) - -Ping frames are answered with a pong and skipped; pong frames are -consumed; the next non-control frame (within the deadline) is returned. - -#### Signature - -```php -public function receive(float $timeout = 5.0): ?string -``` - -#### Parameters - - - -#### Returns - -`?string` - -#### Throws - -- `\RuntimeException` — on a fatal socket error. - -#### Source - -[`SignalWire/Relay/WebSocket.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/WebSocket.php) - -Line 185. - -*** - -### sendText - -Send a UTF-8 text frame (the only application frame type RELAY uses). - -#### Signature - -```php -public function sendText(string $payload): void -``` - -#### Parameters - - - -#### Throws - -- `\RuntimeException` — if the socket is closed or the write fails. - -#### Source - -[`SignalWire/Relay/WebSocket.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/WebSocket.php) - -Line 137. - -## Source - -[`SignalWire/Relay/WebSocket.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/WebSocket.php) - -Line 43. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/addresses/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/addresses/index.mdx deleted file mode 100644 index ee77d6dc63..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/addresses/index.mdx +++ /dev/null @@ -1,175 +0,0 @@ ---- -slug: "/reference/php/signal-wire/rest/namespaces/namespaces/addresses" -title: "Addresses" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\REST\\Namespaces\\Addresses" - parent: "SignalWire\\REST\\Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Addresses.php" ---- -# `Addresses` - -Addresses namespace — list / create / get / delete (no update). - -## Signature - -```php -class Addresses -``` - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(SignalWire\REST\HttpClient $http) -``` - -#### Parameters - - - -#### Source - -[`SignalWire/REST/Namespaces/Addresses.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Addresses.php) - -Line 17. - -*** - -### create - -#### Signature - -```php -public function create(array $body): array -``` - -#### Parameters - - - @return array\ - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/Addresses.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Addresses.php) - -Line 34. - -*** - -### delete - -#### Signature - -```php -public function delete(string $addressId): array -``` - -#### Parameters - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/Addresses.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Addresses.php) - -Line 46. - -*** - -### get - -#### Signature - -```php -public function get(string $addressId): array -``` - -#### Parameters - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/Addresses.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Addresses.php) - -Line 40. - -*** - -### getBasePath - -#### Signature - -```php -public function getBasePath(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/REST/Namespaces/Addresses.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Addresses.php) - -Line 22. - -*** - -### list - -#### Signature - -```php -public function list(array $params = array ( -)): array -``` - -#### Parameters - - - @return array\ - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/Addresses.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Addresses.php) - -Line 28. - -## Source - -[`SignalWire/REST/Namespaces/Addresses.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Addresses.php) - -Line 12. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/calling/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/calling/index.mdx deleted file mode 100644 index 83f57a39fc..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/calling/index.mdx +++ /dev/null @@ -1,1303 +0,0 @@ ---- -slug: "/reference/php/signal-wire/rest/namespaces/namespaces/calling" -title: "Calling" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\REST\\Namespaces\\Calling" - parent: "SignalWire\\REST\\Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php" ---- -# `Calling` - -Calling API namespace. - -Provides 37 call-control command methods that each POST to -/api/calling/calls with a JSON body containing the command name, -an optional call ID, and parameters. - -## Signature - -```php -class Calling -``` - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(SignalWire\REST\HttpClient $client, string $projectId) -``` - -#### Parameters - - - - - -#### Source - -[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) - -Line 23. - -*** - -### aiHold - -#### Signature - -```php -public function aiHold(string $callId, array $params = array ( -)): array -``` - -#### Parameters - - - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) - -Line 285. - -*** - -### aiMessage - -#### Signature - -```php -public function aiMessage(string $callId, array $params = array ( -)): array -``` - -#### Parameters - - - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) - -Line 279. - -*** - -### aiStop - -#### Signature - -```php -public function aiStop(string $callId, array $params = array ( -)): array -``` - -#### Parameters - - - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) - -Line 297. - -*** - -### aiUnhold - -#### Signature - -```php -public function aiUnhold(string $callId, array $params = array ( -)): array -``` - -#### Parameters - - - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) - -Line 291. - -*** - -### collect - -#### Signature - -```php -public function collect(string $callId, array $params = array ( -)): array -``` - -#### Parameters - - - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) - -Line 177. - -*** - -### collectStartInputTimers - -#### Signature - -```php -public function collectStartInputTimers( - string $callId, - array $params = array ( -) -): array -``` - -#### Parameters - - - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) - -Line 189. - -*** - -### collectStop - -#### Signature - -```php -public function collectStop(string $callId, array $params = array ( -)): array -``` - -#### Parameters - - - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) - -Line 183. - -*** - -### denoise - -#### Signature - -```php -public function denoise(string $callId, array $params = array ( -)): array -``` - -#### Parameters - - - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) - -Line 247. - -*** - -### denoiseStop - -#### Signature - -```php -public function denoiseStop(string $callId, array $params = array ( -)): array -``` - -#### Parameters - - - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) - -Line 253. - -*** - -### detect - -#### Signature - -```php -public function detect(string $callId, array $params = array ( -)): array -``` - -#### Parameters - - - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) - -Line 199. - -*** - -### detectStop - -#### Signature - -```php -public function detectStop(string $callId, array $params = array ( -)): array -``` - -#### Parameters - - - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) - -Line 205. - -*** - -### dial - -#### Signature - -```php -public function dial(array $params = array ( -)): array -``` - -#### Parameters - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) - -Line 75. - -*** - -### disconnect - -#### Signature - -```php -public function disconnect(string $callId, array $params = array ( -)): array -``` - -#### Parameters - - - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) - -Line 105. - -*** - -### end - -#### Signature - -```php -public function end(string $callId, array $params = array ( -)): array -``` - -#### Parameters - - - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) - -Line 93. - -*** - -### getBasePath - -#### Signature - -```php -public function getBasePath(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) - -Line 39. - -*** - -### getClient - -#### Signature - -```php -public function getClient(): SignalWire\REST\HttpClient -``` - -#### Returns - -`SignalWire\REST\HttpClient` - -#### Source - -[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) - -Line 29. - -*** - -### getProjectId - -#### Signature - -```php -public function getProjectId(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) - -Line 34. - -*** - -### liveTranscribe - -#### Signature - -```php -public function liveTranscribe(string $callId, array $params = array ( -)): array -``` - -#### Parameters - - - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) - -Line 307. - -*** - -### liveTranslate - -#### Signature - -```php -public function liveTranslate(string $callId, array $params = array ( -)): array -``` - -#### Parameters - - - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) - -Line 313. - -*** - -### play - -#### Signature - -```php -public function play(string $callId, array $params = array ( -)): array -``` - -#### Parameters - - - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) - -Line 115. - -*** - -### playPause - -#### Signature - -```php -public function playPause(string $callId, array $params = array ( -)): array -``` - -#### Parameters - - - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) - -Line 121. - -*** - -### playResume - -#### Signature - -```php -public function playResume(string $callId, array $params = array ( -)): array -``` - -#### Parameters - - - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) - -Line 127. - -*** - -### playStop - -#### Signature - -```php -public function playStop(string $callId, array $params = array ( -)): array -``` - -#### Parameters - - - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) - -Line 133. - -*** - -### playVolume - -#### Signature - -```php -public function playVolume(string $callId, array $params = array ( -)): array -``` - -#### Parameters - - - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) - -Line 139. - -*** - -### receiveFaxStop - -#### Signature - -```php -public function receiveFaxStop(string $callId, array $params = array ( -)): array -``` - -#### Parameters - - - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) - -Line 329. - -*** - -### record - -#### Signature - -```php -public function record(string $callId, array $params = array ( -)): array -``` - -#### Parameters - - - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) - -Line 149. - -*** - -### recordPause - -#### Signature - -```php -public function recordPause(string $callId, array $params = array ( -)): array -``` - -#### Parameters - - - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) - -Line 155. - -*** - -### recordResume - -#### Signature - -```php -public function recordResume(string $callId, array $params = array ( -)): array -``` - -#### Parameters - - - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) - -Line 161. - -*** - -### recordStop - -#### Signature - -```php -public function recordStop(string $callId, array $params = array ( -)): array -``` - -#### Parameters - - - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) - -Line 167. - -*** - -### refer - -#### Signature - -```php -public function refer(string $callId, array $params = array ( -)): array -``` - -#### Parameters - - - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) - -Line 339. - -*** - -### sendFaxStop - -#### Signature - -```php -public function sendFaxStop(string $callId, array $params = array ( -)): array -``` - -#### Parameters - - - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) - -Line 323. - -*** - -### stream - -#### Signature - -```php -public function stream(string $callId, array $params = array ( -)): array -``` - -#### Parameters - - - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) - -Line 231. - -*** - -### streamStop - -#### Signature - -```php -public function streamStop(string $callId, array $params = array ( -)): array -``` - -#### Parameters - - - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) - -Line 237. - -*** - -### tap - -#### Signature - -```php -public function tap(string $callId, array $params = array ( -)): array -``` - -#### Parameters - - - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) - -Line 215. - -*** - -### tapStop - -#### Signature - -```php -public function tapStop(string $callId, array $params = array ( -)): array -``` - -#### Parameters - - - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) - -Line 221. - -*** - -### transcribe - -#### Signature - -```php -public function transcribe(string $callId, array $params = array ( -)): array -``` - -#### Parameters - - - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) - -Line 263. - -*** - -### transcribeStop - -#### Signature - -```php -public function transcribeStop(string $callId, array $params = array ( -)): array -``` - -#### Parameters - - - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) - -Line 269. - -*** - -### transfer - -#### Signature - -```php -public function transfer(string $callId, array $params = array ( -)): array -``` - -#### Parameters - - - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) - -Line 99. - -*** - -### update - -Send the bare `update` command (no call\_id at body root; `id` is - -passed inside `params`). Mirrors Python's -`CallingNamespace.update(**params)`. - -#### Signature - -```php -public function update(array $params = array ( -)): array -``` - -#### Parameters - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) - -Line 87. - -*** - -### userEvent - -#### Signature - -```php -public function userEvent(string $callId, array $params = array ( -)): array -``` - -#### Parameters - - - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) - -Line 349. - -## Source - -[`SignalWire/REST/Namespaces/Calling.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Calling.php) - -Line 16. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/compat-accounts/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/compat-accounts/index.mdx deleted file mode 100644 index fee9d6b3c7..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/compat-accounts/index.mdx +++ /dev/null @@ -1,176 +0,0 @@ ---- -slug: "/reference/php/signal-wire/rest/namespaces/namespaces/compat-accounts" -title: "CompatAccounts" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\REST\\Namespaces\\CompatAccounts" - parent: "SignalWire\\REST\\Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatAccounts.php" ---- -# `CompatAccounts` - -Compat account / sub-project management. - -Mirrors Python `CompatAccounts`: the only resource that lives under -`/api/laml/2010-04-01/Accounts` (rather than `.../Accounts/{Sid}/...`). - -## Signature - -```php -class CompatAccounts -``` - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(SignalWire\REST\HttpClient $http) -``` - -#### Parameters - - - -#### Source - -[`SignalWire/REST/Namespaces/CompatAccounts.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatAccounts.php) - -Line 20. - -*** - -### create - -#### Signature - -```php -public function create(array $body): array -``` - -#### Parameters - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/CompatAccounts.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatAccounts.php) - -Line 43. - -*** - -### get - -#### Signature - -```php -public function get(string $sid): array -``` - -#### Parameters - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/CompatAccounts.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatAccounts.php) - -Line 49. - -*** - -### getBasePath - -#### Signature - -```php -public function getBasePath(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/REST/Namespaces/CompatAccounts.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatAccounts.php) - -Line 25. - -*** - -### list - -#### Signature - -```php -public function list(array $params = array ( -)): array -``` - -#### Parameters - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/CompatAccounts.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatAccounts.php) - -Line 34. - -*** - -### update - -#### Signature - -```php -public function update(string $sid, array $body): array -``` - -#### Parameters - - - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/CompatAccounts.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatAccounts.php) - -Line 58. - -## Source - -[`SignalWire/REST/Namespaces/CompatAccounts.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatAccounts.php) - -Line 15. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/compat-conferences/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/compat-conferences/index.mdx deleted file mode 100644 index 26f94abab0..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/compat-conferences/index.mdx +++ /dev/null @@ -1,460 +0,0 @@ ---- -slug: "/reference/php/signal-wire/rest/namespaces/namespaces/compat-conferences" -title: "CompatConferences" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\REST\\Namespaces\\CompatConferences" - parent: "SignalWire\\REST\\Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatConferences.php" ---- -# `CompatConferences` - -Compat conference management with participants, recordings, and streams. - -## Signature - -```php -class CompatConferences -``` - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(SignalWire\REST\HttpClient $http, string $basePath) -``` - -#### Parameters - - - - - -#### Source - -[`SignalWire/REST/Namespaces/CompatConferences.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatConferences.php) - -Line 17. - -*** - -### deleteRecording - -#### Signature - -```php -public function deleteRecording(string $conferenceSid, string $recordingSid): array -``` - -#### Parameters - - - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/CompatConferences.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatConferences.php) - -Line 115. - -*** - -### get - -#### Signature - -```php -public function get(string $sid): array -``` - -#### Parameters - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/CompatConferences.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatConferences.php) - -Line 35. - -*** - -### getBasePath - -#### Signature - -```php -public function getBasePath(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/REST/Namespaces/CompatConferences.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatConferences.php) - -Line 23. - -*** - -### getParticipant - -#### Signature - -```php -public function getParticipant(string $conferenceSid, string $callSid): array -``` - -#### Parameters - - - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/CompatConferences.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatConferences.php) - -Line 60. - -*** - -### getRecording - -#### Signature - -```php -public function getRecording(string $conferenceSid, string $recordingSid): array -``` - -#### Parameters - - - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/CompatConferences.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatConferences.php) - -Line 98. - -*** - -### list - -#### Signature - -```php -public function list(array $params = array ( -)): array -``` - -#### Parameters - - - @return array\ - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/CompatConferences.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatConferences.php) - -Line 29. - -*** - -### listParticipants - -#### Signature - -```php -public function listParticipants( - string $conferenceSid, - array $params = array ( -) -): array -``` - -#### Parameters - - - - - @return array\ - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/CompatConferences.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatConferences.php) - -Line 51. - -*** - -### listRecordings - -#### Signature - -```php -public function listRecordings(string $conferenceSid, array $params = array ( -)): array -``` - -#### Parameters - - - - - @return array\ - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/CompatConferences.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatConferences.php) - -Line 89. - -*** - -### removeParticipant - -#### Signature - -```php -public function removeParticipant(string $conferenceSid, string $callSid): array -``` - -#### Parameters - - - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/CompatConferences.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatConferences.php) - -Line 77. - -*** - -### startStream - -#### Signature - -```php -public function startStream(string $conferenceSid, array $body): array -``` - -#### Parameters - - - - - @return array\ - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/CompatConferences.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatConferences.php) - -Line 127. - -*** - -### stopStream - -#### Signature - -```php -public function stopStream( - string $conferenceSid, - string $streamSid, - array $body -): array -``` - -#### Parameters - - - - - - - @return array\ - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/CompatConferences.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatConferences.php) - -Line 136. - -*** - -### update - -#### Signature - -```php -public function update(string $sid, array $body): array -``` - -#### Parameters - - - - - @return array\ - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/CompatConferences.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatConferences.php) - -Line 41. - -*** - -### updateParticipant - -#### Signature - -```php -public function updateParticipant( - string $conferenceSid, - string $callSid, - array $body -): array -``` - -#### Parameters - - - - - - - @return array\ - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/CompatConferences.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatConferences.php) - -Line 68. - -*** - -### updateRecording - -#### Signature - -```php -public function updateRecording( - string $conferenceSid, - string $recordingSid, - array $body -): array -``` - -#### Parameters - - - - - - - @return array\ - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/CompatConferences.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatConferences.php) - -Line 106. - -## Source - -[`SignalWire/REST/Namespaces/CompatConferences.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatConferences.php) - -Line 12. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/compat-phone-numbers/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/compat-phone-numbers/index.mdx deleted file mode 100644 index d214026c7a..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/compat-phone-numbers/index.mdx +++ /dev/null @@ -1,376 +0,0 @@ ---- -slug: "/reference/php/signal-wire/rest/namespaces/namespaces/compat-phone-numbers" -title: "CompatPhoneNumbers" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\REST\\Namespaces\\CompatPhoneNumbers" - parent: "SignalWire\\REST\\Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatPhoneNumbers.php" ---- -# `CompatPhoneNumbers` - -Compat IncomingPhoneNumbers + AvailablePhoneNumbers + ImportedPhoneNumbers - -management. - -The base path is the IncomingPhoneNumbers collection; the available / -imported variants live at sibling paths derived from the base. - -## Signature - -```php -class CompatPhoneNumbers -``` - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(SignalWire\REST\HttpClient $http, string $basePath) -``` - -#### Parameters - - - - - -#### Source - -[`SignalWire/REST/Namespaces/CompatPhoneNumbers.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatPhoneNumbers.php) - -Line 23. - -*** - -### delete - -#### Signature - -```php -public function delete(string $sid): array -``` - -#### Parameters - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/CompatPhoneNumbers.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatPhoneNumbers.php) - -Line 73. - -*** - -### get - -#### Signature - -```php -public function get(string $sid): array -``` - -#### Parameters - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/CompatPhoneNumbers.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatPhoneNumbers.php) - -Line 61. - -*** - -### getAvailableBase - -#### Signature - -```php -public function getAvailableBase(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/REST/Namespaces/CompatPhoneNumbers.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatPhoneNumbers.php) - -Line 44. - -*** - -### getBasePath - -#### Signature - -```php -public function getBasePath(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/REST/Namespaces/CompatPhoneNumbers.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatPhoneNumbers.php) - -Line 39. - -*** - -### getImportedBase - -#### Signature - -```php -public function getImportedBase(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/REST/Namespaces/CompatPhoneNumbers.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatPhoneNumbers.php) - -Line 49. - -*** - -### importNumber - -#### Signature - -```php -public function importNumber(array $body): array -``` - -#### Parameters - - - @return array\ - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/CompatPhoneNumbers.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatPhoneNumbers.php) - -Line 85. - -*** - -### list - -#### Signature - -```php -public function list(array $params = array ( -)): array -``` - -#### Parameters - - - @return array\ - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/CompatPhoneNumbers.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatPhoneNumbers.php) - -Line 55. - -*** - -### listAvailableCountries - -#### Signature - -```php -public function listAvailableCountries(array $params = array ( -)): array -``` - -#### Parameters - - - @return array\ - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/CompatPhoneNumbers.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatPhoneNumbers.php) - -Line 91. - -*** - -### purchase - -#### Signature - -```php -public function purchase(array $body): array -``` - -#### Parameters - - - @return array\ - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/CompatPhoneNumbers.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatPhoneNumbers.php) - -Line 79. - -*** - -### searchLocal - -#### Signature - -```php -public function searchLocal(string $country, array $params = array ( -)): array -``` - -#### Parameters - - - - - @return array\ - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/CompatPhoneNumbers.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatPhoneNumbers.php) - -Line 97. - -*** - -### searchTollFree - -#### Signature - -```php -public function searchTollFree(string $country, array $params = array ( -)): array -``` - -#### Parameters - - - - - @return array\ - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/CompatPhoneNumbers.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatPhoneNumbers.php) - -Line 103. - -*** - -### update - -#### Signature - -```php -public function update(string $sid, array $body): array -``` - -#### Parameters - - - - - @return array\ - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/CompatPhoneNumbers.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatPhoneNumbers.php) - -Line 67. - -## Source - -[`SignalWire/REST/Namespaces/CompatPhoneNumbers.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatPhoneNumbers.php) - -Line 16. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/compat-recordings/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/compat-recordings/index.mdx deleted file mode 100644 index f771caf887..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/compat-recordings/index.mdx +++ /dev/null @@ -1,154 +0,0 @@ ---- -slug: "/reference/php/signal-wire/rest/namespaces/namespaces/compat-recordings" -title: "CompatRecordings" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\REST\\Namespaces\\CompatRecordings" - parent: "SignalWire\\REST\\Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatRecordings.php" ---- -# `CompatRecordings` - -Compat recording management. - -Account-scoped recordings — distinct from per-call recordings on -`CompatCalls`. Surface is list / get / delete only. - -## Signature - -```php -class CompatRecordings -``` - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(SignalWire\REST\HttpClient $http, string $basePath) -``` - -#### Parameters - - - - - -#### Source - -[`SignalWire/REST/Namespaces/CompatRecordings.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatRecordings.php) - -Line 20. - -*** - -### delete - -#### Signature - -```php -public function delete(string $sid): array -``` - -#### Parameters - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/CompatRecordings.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatRecordings.php) - -Line 44. - -*** - -### get - -#### Signature - -```php -public function get(string $sid): array -``` - -#### Parameters - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/CompatRecordings.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatRecordings.php) - -Line 38. - -*** - -### getBasePath - -#### Signature - -```php -public function getBasePath(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/REST/Namespaces/CompatRecordings.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatRecordings.php) - -Line 26. - -*** - -### list - -#### Signature - -```php -public function list(array $params = array ( -)): array -``` - -#### Parameters - - - @return array\ - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/CompatRecordings.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatRecordings.php) - -Line 32. - -## Source - -[`SignalWire/REST/Namespaces/CompatRecordings.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatRecordings.php) - -Line 15. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/compat-tokens/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/compat-tokens/index.mdx deleted file mode 100644 index f70e47c989..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/compat-tokens/index.mdx +++ /dev/null @@ -1,151 +0,0 @@ ---- -slug: "/reference/php/signal-wire/rest/namespaces/namespaces/compat-tokens" -title: "CompatTokens" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\REST\\Namespaces\\CompatTokens" - parent: "SignalWire\\REST\\Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatTokens.php" ---- -# `CompatTokens` - -Compat API token management. - -Surface is create / update (PATCH) / delete only. - -## Signature - -```php -class CompatTokens -``` - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(SignalWire\REST\HttpClient $http, string $basePath) -``` - -#### Parameters - - - - - -#### Source - -[`SignalWire/REST/Namespaces/CompatTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatTokens.php) - -Line 19. - -*** - -### create - -#### Signature - -```php -public function create(array $body): array -``` - -#### Parameters - - - @return array\ - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/CompatTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatTokens.php) - -Line 31. - -*** - -### delete - -#### Signature - -```php -public function delete(string $tokenId): array -``` - -#### Parameters - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/CompatTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatTokens.php) - -Line 43. - -*** - -### getBasePath - -#### Signature - -```php -public function getBasePath(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/REST/Namespaces/CompatTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatTokens.php) - -Line 25. - -*** - -### update - -#### Signature - -```php -public function update(string $tokenId, array $body): array -``` - -#### Parameters - - - - - @return array\ - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/CompatTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatTokens.php) - -Line 37. - -## Source - -[`SignalWire/REST/Namespaces/CompatTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatTokens.php) - -Line 14. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/compat-transcriptions/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/compat-transcriptions/index.mdx deleted file mode 100644 index 81caa784b2..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/compat-transcriptions/index.mdx +++ /dev/null @@ -1,153 +0,0 @@ ---- -slug: "/reference/php/signal-wire/rest/namespaces/namespaces/compat-transcriptions" -title: "CompatTranscriptions" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\REST\\Namespaces\\CompatTranscriptions" - parent: "SignalWire\\REST\\Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatTranscriptions.php" ---- -# `CompatTranscriptions` - -Compat transcription management. - -Account-scoped transcriptions. Surface is list / get / delete only. - -## Signature - -```php -class CompatTranscriptions -``` - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(SignalWire\REST\HttpClient $http, string $basePath) -``` - -#### Parameters - - - - - -#### Source - -[`SignalWire/REST/Namespaces/CompatTranscriptions.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatTranscriptions.php) - -Line 19. - -*** - -### delete - -#### Signature - -```php -public function delete(string $sid): array -``` - -#### Parameters - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/CompatTranscriptions.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatTranscriptions.php) - -Line 43. - -*** - -### get - -#### Signature - -```php -public function get(string $sid): array -``` - -#### Parameters - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/CompatTranscriptions.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatTranscriptions.php) - -Line 37. - -*** - -### getBasePath - -#### Signature - -```php -public function getBasePath(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/REST/Namespaces/CompatTranscriptions.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatTranscriptions.php) - -Line 25. - -*** - -### list - -#### Signature - -```php -public function list(array $params = array ( -)): array -``` - -#### Parameters - - - @return array\ - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/CompatTranscriptions.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatTranscriptions.php) - -Line 31. - -## Source - -[`SignalWire/REST/Namespaces/CompatTranscriptions.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/CompatTranscriptions.php) - -Line 14. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/compat/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/compat/index.mdx deleted file mode 100644 index ea8ebac94c..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/compat/index.mdx +++ /dev/null @@ -1,357 +0,0 @@ ---- -slug: "/reference/php/signal-wire/rest/namespaces/namespaces/compat" -title: "Compat" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\REST\\Namespaces\\Compat" - parent: "SignalWire\\REST\\Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Compat.php" ---- -# `Compat` - -Compatibility (Twilio-compatible LAML) API namespace. - -Mounted under `/api/laml/2010-04-01/Accounts/{AccountSid}` and exposes -the LAML-flavoured REST surface (Accounts, Calls, Messages, Faxes, -Conferences, IncomingPhoneNumbers + AvailablePhoneNumbers, Applications, -LamlBins, Queues, Recordings, Transcriptions, tokens) as object-style -sub-resources to mirror the Python `CompatNamespace` class. - -## Signature - -```php -class Compat -``` - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(SignalWire\REST\HttpClient $http, string $accountSid) -``` - -#### Parameters - - - - - -#### Source - -[`SignalWire/REST/Namespaces/Compat.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Compat.php) - -Line 38. - -*** - -### accounts - -#### Signature - -```php -public function accounts(): SignalWire\REST\Namespaces\CompatAccounts -``` - -#### Returns - -`SignalWire\REST\Namespaces\CompatAccounts` - -#### Source - -[`SignalWire/REST/Namespaces/Compat.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Compat.php) - -Line 73. - -*** - -### applications - -#### Signature - -```php -public function applications(): SignalWire\REST\Namespaces\CompatApplications -``` - -#### Returns - -`SignalWire\REST\Namespaces\CompatApplications` - -#### Source - -[`SignalWire/REST/Namespaces/Compat.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Compat.php) - -Line 103. - -*** - -### calls - -#### Signature - -```php -public function calls(): SignalWire\REST\Namespaces\CompatCalls -``` - -#### Returns - -`SignalWire\REST\Namespaces\CompatCalls` - -#### Source - -[`SignalWire/REST/Namespaces/Compat.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Compat.php) - -Line 78. - -*** - -### conferences - -#### Signature - -```php -public function conferences(): SignalWire\REST\Namespaces\CompatConferences -``` - -#### Returns - -`SignalWire\REST\Namespaces\CompatConferences` - -#### Source - -[`SignalWire/REST/Namespaces/Compat.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Compat.php) - -Line 93. - -*** - -### faxes - -#### Signature - -```php -public function faxes(): SignalWire\REST\Namespaces\CompatFaxes -``` - -#### Returns - -`SignalWire\REST\Namespaces\CompatFaxes` - -#### Source - -[`SignalWire/REST/Namespaces/Compat.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Compat.php) - -Line 88. - -*** - -### getAccountBase - -#### Signature - -```php -public function getAccountBase(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/REST/Namespaces/Compat.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Compat.php) - -Line 63. - -*** - -### getAccountSid - -#### Signature - -```php -public function getAccountSid(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/REST/Namespaces/Compat.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Compat.php) - -Line 58. - -*** - -### getHttp - -#### Signature - -```php -public function getHttp(): SignalWire\REST\HttpClient -``` - -#### Returns - -`SignalWire\REST\HttpClient` - -#### Source - -[`SignalWire/REST/Namespaces/Compat.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Compat.php) - -Line 68. - -*** - -### lamlBins - -#### Signature - -```php -public function lamlBins(): SignalWire\REST\Namespaces\CompatLamlBins -``` - -#### Returns - -`SignalWire\REST\Namespaces\CompatLamlBins` - -#### Source - -[`SignalWire/REST/Namespaces/Compat.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Compat.php) - -Line 108. - -*** - -### messages - -#### Signature - -```php -public function messages(): SignalWire\REST\Namespaces\CompatMessages -``` - -#### Returns - -`SignalWire\REST\Namespaces\CompatMessages` - -#### Source - -[`SignalWire/REST/Namespaces/Compat.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Compat.php) - -Line 83. - -*** - -### phoneNumbers - -#### Signature - -```php -public function phoneNumbers(): SignalWire\REST\Namespaces\CompatPhoneNumbers -``` - -#### Returns - -`SignalWire\REST\Namespaces\CompatPhoneNumbers` - -#### Source - -[`SignalWire/REST/Namespaces/Compat.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Compat.php) - -Line 98. - -*** - -### queues - -#### Signature - -```php -public function queues(): SignalWire\REST\Namespaces\CompatQueues -``` - -#### Returns - -`SignalWire\REST\Namespaces\CompatQueues` - -#### Source - -[`SignalWire/REST/Namespaces/Compat.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Compat.php) - -Line 113. - -*** - -### recordings - -#### Signature - -```php -public function recordings(): SignalWire\REST\Namespaces\CompatRecordings -``` - -#### Returns - -`SignalWire\REST\Namespaces\CompatRecordings` - -#### Source - -[`SignalWire/REST/Namespaces/Compat.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Compat.php) - -Line 118. - -*** - -### tokens - -#### Signature - -```php -public function tokens(): SignalWire\REST\Namespaces\CompatTokens -``` - -#### Returns - -`SignalWire\REST\Namespaces\CompatTokens` - -#### Source - -[`SignalWire/REST/Namespaces/Compat.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Compat.php) - -Line 128. - -*** - -### transcriptions - -#### Signature - -```php -public function transcriptions(): SignalWire\REST\Namespaces\CompatTranscriptions -``` - -#### Returns - -`SignalWire\REST\Namespaces\CompatTranscriptions` - -#### Source - -[`SignalWire/REST/Namespaces/Compat.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Compat.php) - -Line 123. - -## Source - -[`SignalWire/REST/Namespaces/Compat.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Compat.php) - -Line 19. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/conference-logs/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/conference-logs/index.mdx deleted file mode 100644 index 16befa93de..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/conference-logs/index.mdx +++ /dev/null @@ -1,103 +0,0 @@ ---- -slug: "/reference/php/signal-wire/rest/namespaces/namespaces/conference-logs" -title: "ConferenceLogs" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\REST\\Namespaces\\ConferenceLogs" - parent: "SignalWire\\REST\\Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ConferenceLogs.php" ---- -# `ConferenceLogs` - -Conference log queries — list-only resource. - -## Signature - -```php -class ConferenceLogs -``` - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(SignalWire\REST\HttpClient $http, string $basePath) -``` - -#### Parameters - - - - - -#### Source - -[`SignalWire/REST/Namespaces/ConferenceLogs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ConferenceLogs.php) - -Line 17. - -*** - -### getBasePath - -#### Signature - -```php -public function getBasePath(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/REST/Namespaces/ConferenceLogs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ConferenceLogs.php) - -Line 23. - -*** - -### list - -#### Signature - -```php -public function list(array $params = array ( -)): array -``` - -#### Parameters - - - @return array\ - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/ConferenceLogs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ConferenceLogs.php) - -Line 29. - -## Source - -[`SignalWire/REST/Namespaces/ConferenceLogs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ConferenceLogs.php) - -Line 12. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/datasphere/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/datasphere/index.mdx deleted file mode 100644 index 8036964fbd..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/datasphere/index.mdx +++ /dev/null @@ -1,89 +0,0 @@ ---- -slug: "/reference/php/signal-wire/rest/namespaces/namespaces/datasphere" -title: "Datasphere" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\REST\\Namespaces\\Datasphere" - parent: "SignalWire\\REST\\Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Datasphere.php" ---- -# `Datasphere` - -Datasphere API namespace — exposes the documents sub-resource. - -## Signature - -```php -class Datasphere -``` - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(SignalWire\REST\HttpClient $http) -``` - -#### Parameters - - - -#### Source - -[`SignalWire/REST/Namespaces/Datasphere.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Datasphere.php) - -Line 17. - -*** - -### documents - -#### Signature - -```php -public function documents(): SignalWire\REST\Namespaces\DatasphereDocuments -``` - -#### Returns - -`SignalWire\REST\Namespaces\DatasphereDocuments` - -#### Source - -[`SignalWire/REST/Namespaces/Datasphere.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Datasphere.php) - -Line 23. - -*** - -### getHttp - -#### Signature - -```php -public function getHttp(): SignalWire\REST\HttpClient -``` - -#### Returns - -`SignalWire\REST\HttpClient` - -#### Source - -[`SignalWire/REST/Namespaces/Datasphere.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Datasphere.php) - -Line 28. - -## Source - -[`SignalWire/REST/Namespaces/Datasphere.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Datasphere.php) - -Line 12. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/fabric-addresses/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/fabric-addresses/index.mdx deleted file mode 100644 index 3c870f4454..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/fabric-addresses/index.mdx +++ /dev/null @@ -1,127 +0,0 @@ ---- -slug: "/reference/php/signal-wire/rest/namespaces/namespaces/fabric-addresses" -title: "FabricAddresses" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\REST\\Namespaces\\FabricAddresses" - parent: "SignalWire\\REST\\Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricAddresses.php" ---- -# `FabricAddresses` - -Read-only fabric addresses (`/api/fabric/addresses`). - -## Signature - -```php -class FabricAddresses -``` - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(SignalWire\REST\HttpClient $http, string $basePath) -``` - -#### Parameters - - - - - -#### Source - -[`SignalWire/REST/Namespaces/FabricAddresses.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricAddresses.php) - -Line 17. - -*** - -### get - -#### Signature - -```php -public function get(string $addressId): array -``` - -#### Parameters - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/FabricAddresses.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricAddresses.php) - -Line 35. - -*** - -### getBasePath - -#### Signature - -```php -public function getBasePath(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/REST/Namespaces/FabricAddresses.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricAddresses.php) - -Line 23. - -*** - -### list - -#### Signature - -```php -public function list(array $params = array ( -)): array -``` - -#### Parameters - - - @return array\ - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/FabricAddresses.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricAddresses.php) - -Line 29. - -## Source - -[`SignalWire/REST/Namespaces/FabricAddresses.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricAddresses.php) - -Line 12. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/fabric-generic-resources/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/fabric-generic-resources/index.mdx deleted file mode 100644 index facc8270d4..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/fabric-generic-resources/index.mdx +++ /dev/null @@ -1,217 +0,0 @@ ---- -slug: "/reference/php/signal-wire/rest/namespaces/namespaces/fabric-generic-resources" -title: "FabricGenericResources" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\REST\\Namespaces\\FabricGenericResources" - parent: "SignalWire\\REST\\Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricGenericResources.php" ---- -# `FabricGenericResources` - -Generic operations across all fabric resource types - -(`/api/fabric/resources`). - -Mirrors Python `signalwire.rest.namespaces.fabric.GenericResources`. - -## Signature - -```php -class FabricGenericResources -``` - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(SignalWire\REST\HttpClient $http, string $basePath) -``` - -#### Parameters - - - - - -#### Source - -[`SignalWire/REST/Namespaces/FabricGenericResources.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricGenericResources.php) - -Line 20. - -*** - -### assignDomainApplication - -Bind a domain application to a fabric resource. - -#### Signature - -```php -public function assignDomainApplication(string $resourceId, array $body): array -``` - -#### Parameters - - - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/FabricGenericResources.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricGenericResources.php) - -Line 64. - -*** - -### delete - -#### Signature - -```php -public function delete(string $resourceId): array -``` - -#### Parameters - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/FabricGenericResources.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricGenericResources.php) - -Line 44. - -*** - -### get - -#### Signature - -```php -public function get(string $resourceId): array -``` - -#### Parameters - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/FabricGenericResources.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricGenericResources.php) - -Line 38. - -*** - -### getBasePath - -#### Signature - -```php -public function getBasePath(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/REST/Namespaces/FabricGenericResources.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricGenericResources.php) - -Line 26. - -*** - -### list - -#### Signature - -```php -public function list(array $params = array ( -)): array -``` - -#### Parameters - - - @return array\ - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/FabricGenericResources.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricGenericResources.php) - -Line 32. - -*** - -### listAddresses - -#### Signature - -```php -public function listAddresses(string $resourceId, array $params = array ( -)): array -``` - -#### Parameters - - - - - @return array\ - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/FabricGenericResources.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricGenericResources.php) - -Line 50. - -## Source - -[`SignalWire/REST/Namespaces/FabricGenericResources.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricGenericResources.php) - -Line 15. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/fabric-tokens/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/fabric-tokens/index.mdx deleted file mode 100644 index 8ebde3ba25..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/fabric-tokens/index.mdx +++ /dev/null @@ -1,210 +0,0 @@ ---- -slug: "/reference/php/signal-wire/rest/namespaces/namespaces/fabric-tokens" -title: "FabricTokens" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\REST\\Namespaces\\FabricTokens" - parent: "SignalWire\\REST\\Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricTokens.php" ---- -# `FabricTokens` - -Subscriber, guest, invite, and embed token creation under - -`/api/fabric/...`. - -Note: token endpoints sit under different sub-paths inside the Fabric -mount point (`subscribers/tokens`, `subscriber/invites`, `guests`, -`embeds`) — singular vs plural is API-specific so each helper has the -exact path the API expects. - -## Signature - -```php -class FabricTokens -``` - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(SignalWire\REST\HttpClient $http, string $basePath) -``` - -#### Parameters - - - - - -#### Source - -[`SignalWire/REST/Namespaces/FabricTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricTokens.php) - -Line 23. - -*** - -### createEmbedToken - -#### Signature - -```php -public function createEmbedToken(array $body): array -``` - -#### Parameters - - - @return array\ - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/FabricTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricTokens.php) - -Line 65. - -*** - -### createGuestToken - -#### Signature - -```php -public function createGuestToken(array $body): array -``` - -#### Parameters - - - @return array\ - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/FabricTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricTokens.php) - -Line 59. - -*** - -### createInviteToken - -Note the singular `subscriber` here — the invite endpoint uses - -`/api/fabric/subscriber/invites`, not `subscribers`. - -#### Signature - -```php -public function createInviteToken(array $body): array -``` - -#### Parameters - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/FabricTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricTokens.php) - -Line 53. - -*** - -### createSubscriberToken - -#### Signature - -```php -public function createSubscriberToken(array $body): array -``` - -#### Parameters - - - @return array\ - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/FabricTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricTokens.php) - -Line 35. - -*** - -### getBasePath - -#### Signature - -```php -public function getBasePath(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/REST/Namespaces/FabricTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricTokens.php) - -Line 29. - -*** - -### refreshSubscriberToken - -#### Signature - -```php -public function refreshSubscriberToken(array $body): array -``` - -#### Parameters - - - @return array\ - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/FabricTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricTokens.php) - -Line 41. - -## Source - -[`SignalWire/REST/Namespaces/FabricTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FabricTokens.php) - -Line 18. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/fabric/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/fabric/index.mdx deleted file mode 100644 index c0750e9870..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/fabric/index.mdx +++ /dev/null @@ -1,535 +0,0 @@ ---- -slug: "/reference/php/signal-wire/rest/namespaces/namespaces/fabric" -title: "Fabric" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\REST\\Namespaces\\Fabric" - parent: "SignalWire\\REST\\Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php" ---- -# `Fabric` - -Fabric API namespace. - -Mirrors Python `signalwire.rest.namespaces.fabric.FabricNamespace`: -groups all Fabric sub-resources (subscribers, SIP endpoints, call flows, -SWML scripts, conference rooms, AI agents, etc.) under a single object. - -Sub-resources fall into a few buckets: - -- PUT-update CRUD: `swml_scripts`, `relay_applications`, - `call_flows`, `conference_rooms`, `freeswitch_connectors`, - `subscribers`, `sip_endpoints`, `cxml_scripts`, - `cxml_applications`. -- PATCH-update CRUD: `swml_webhooks`, `ai_agents`, `sip_gateways`, - `cxml_webhooks`. -- Special: `resources` (generic `/api/fabric/resources`), - `addresses` (read-only `/api/fabric/addresses`), `tokens` - (subscriber/guest/embed token creation). - -## Signature - -```php -class Fabric -``` - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(SignalWire\REST\HttpClient $client) -``` - -#### Parameters - - - -#### Source - -[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) - -Line 65. - -*** - -### addresses - -Read-only fabric addresses (`/api/fabric/addresses`). - -#### Signature - -```php -public function addresses(): SignalWire\REST\Namespaces\FabricAddresses -``` - -#### Returns - -`SignalWire\REST\Namespaces\FabricAddresses` - -#### Source - -[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) - -Line 250. - -*** - -### aiAgents - -#### Signature - -```php -public function aiAgents(): SignalWire\REST\CrudResource -``` - -#### Returns - -`SignalWire\REST\CrudResource` - -#### Source - -[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) - -Line 159. - -*** - -### callFlows - -#### Signature - -```php -public function callFlows(): SignalWire\REST\Namespaces\FabricCallFlows -``` - -#### Returns - -`SignalWire\REST\Namespaces\FabricCallFlows` - -#### Source - -[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) - -Line 95. - -*** - -### callQueues - -#### Signature - -```php -public function callQueues(): SignalWire\REST\CrudResource -``` - -#### Returns - -`SignalWire\REST\CrudResource` - -#### Source - -[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) - -Line 209. - -*** - -### conferenceRooms - -#### Signature - -```php -public function conferenceRooms(): SignalWire\REST\Namespaces\FabricConferenceRooms -``` - -#### Returns - -`SignalWire\REST\Namespaces\FabricConferenceRooms` - -#### Source - -[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) - -Line 119. - -*** - -### conversations - -#### Signature - -```php -public function conversations(): SignalWire\REST\CrudResource -``` - -#### Returns - -`SignalWire\REST\CrudResource` - -#### Source - -[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) - -Line 185. - -*** - -### cxmlApplications - -#### Signature - -```php -public function cxmlApplications(): SignalWire\REST\Namespaces\FabricCxmlApplications -``` - -#### Returns - -`SignalWire\REST\Namespaces\FabricCxmlApplications` - -#### Source - -[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) - -Line 143. - -*** - -### cxmlScripts - -#### Signature - -```php -public function cxmlScripts(): SignalWire\REST\CrudResource -``` - -#### Returns - -`SignalWire\REST\CrudResource` - -#### Source - -[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) - -Line 135. - -*** - -### cxmlWebhooks - -#### Signature - -```php -public function cxmlWebhooks(): SignalWire\REST\CrudResource -``` - -#### Returns - -`SignalWire\REST\CrudResource` - -#### Source - -[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) - -Line 175. - -*** - -### dialPlans - -#### Signature - -```php -public function dialPlans(): SignalWire\REST\CrudResource -``` - -#### Returns - -`SignalWire\REST\CrudResource` - -#### Source - -[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) - -Line 193. - -*** - -### freeclimbApps - -#### Signature - -```php -public function freeclimbApps(): SignalWire\REST\CrudResource -``` - -#### Returns - -`SignalWire\REST\CrudResource` - -#### Source - -[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) - -Line 201. - -*** - -### freeswitchConnectors - -#### Signature - -```php -public function freeswitchConnectors(): SignalWire\REST\CrudResource -``` - -#### Returns - -`SignalWire\REST\CrudResource` - -#### Source - -[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) - -Line 127. - -*** - -### getClient - -#### Signature - -```php -public function getClient(): SignalWire\REST\HttpClient -``` - -#### Returns - -`SignalWire\REST\HttpClient` - -#### Source - -[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) - -Line 70. - -*** - -### phoneNumbers - -#### Signature - -```php -public function phoneNumbers(): SignalWire\REST\CrudResource -``` - -#### Returns - -`SignalWire\REST\CrudResource` - -#### Source - -[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) - -Line 225. - -*** - -### relayApplications - -#### Signature - -```php -public function relayApplications(): SignalWire\REST\CrudResource -``` - -#### Returns - -`SignalWire\REST\CrudResource` - -#### Source - -[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) - -Line 111. - -*** - -### resources - -Generic operations across all fabric resource types - -(`/api/fabric/resources`). - -#### Signature - -```php -public function resources(): SignalWire\REST\Namespaces\FabricGenericResources -``` - -#### Returns - -`SignalWire\REST\Namespaces\FabricGenericResources` - -#### Source - -[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) - -Line 239. - -*** - -### sipEndpoints - -#### Signature - -```php -public function sipEndpoints(): SignalWire\REST\CrudResource -``` - -#### Returns - -`SignalWire\REST\CrudResource` - -#### Source - -[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) - -Line 87. - -*** - -### sipGateways - -#### Signature - -```php -public function sipGateways(): SignalWire\REST\CrudResource -``` - -#### Returns - -`SignalWire\REST\CrudResource` - -#### Source - -[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) - -Line 167. - -*** - -### sipProfiles - -#### Signature - -```php -public function sipProfiles(): SignalWire\REST\CrudResource -``` - -#### Returns - -`SignalWire\REST\CrudResource` - -#### Source - -[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) - -Line 217. - -*** - -### subscribers - -#### Signature - -```php -public function subscribers(): SignalWire\REST\Namespaces\FabricSubscribers -``` - -#### Returns - -`SignalWire\REST\Namespaces\FabricSubscribers` - -#### Source - -[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) - -Line 79. - -*** - -### swmlScripts - -#### Signature - -```php -public function swmlScripts(): SignalWire\REST\CrudResource -``` - -#### Returns - -`SignalWire\REST\CrudResource` - -#### Source - -[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) - -Line 103. - -*** - -### swmlWebhooks - -#### Signature - -```php -public function swmlWebhooks(): SignalWire\REST\CrudResource -``` - -#### Returns - -`SignalWire\REST\CrudResource` - -#### Source - -[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) - -Line 151. - -*** - -### tokens - -Subscriber / guest / invite / embed token creation - -(`/api/fabric/...`). - -#### Signature - -```php -public function tokens(): SignalWire\REST\Namespaces\FabricTokens -``` - -#### Returns - -`SignalWire\REST\Namespaces\FabricTokens` - -#### Source - -[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) - -Line 262. - -## Source - -[`SignalWire/REST/Namespaces/Fabric.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Fabric.php) - -Line 28. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/fax-logs/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/fax-logs/index.mdx deleted file mode 100644 index 45ad8d9b86..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/fax-logs/index.mdx +++ /dev/null @@ -1,127 +0,0 @@ ---- -slug: "/reference/php/signal-wire/rest/namespaces/namespaces/fax-logs" -title: "FaxLogs" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\REST\\Namespaces\\FaxLogs" - parent: "SignalWire\\REST\\Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FaxLogs.php" ---- -# `FaxLogs` - -Fax log queries — list + get by id. - -## Signature - -```php -class FaxLogs -``` - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(SignalWire\REST\HttpClient $http, string $basePath) -``` - -#### Parameters - - - - - -#### Source - -[`SignalWire/REST/Namespaces/FaxLogs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FaxLogs.php) - -Line 17. - -*** - -### get - -#### Signature - -```php -public function get(string $logId): array -``` - -#### Parameters - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/FaxLogs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FaxLogs.php) - -Line 35. - -*** - -### getBasePath - -#### Signature - -```php -public function getBasePath(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/REST/Namespaces/FaxLogs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FaxLogs.php) - -Line 23. - -*** - -### list - -#### Signature - -```php -public function list(array $params = array ( -)): array -``` - -#### Parameters - - - @return array\ - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/FaxLogs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FaxLogs.php) - -Line 29. - -## Source - -[`SignalWire/REST/Namespaces/FaxLogs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/FaxLogs.php) - -Line 12. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/imported-numbers/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/imported-numbers/index.mdx deleted file mode 100644 index da99392a14..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/imported-numbers/index.mdx +++ /dev/null @@ -1,97 +0,0 @@ ---- -slug: "/reference/php/signal-wire/rest/namespaces/namespaces/imported-numbers" -title: "ImportedNumbers" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\REST\\Namespaces\\ImportedNumbers" - parent: "SignalWire\\REST\\Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ImportedNumbers.php" ---- -# `ImportedNumbers` - -Imported phone numbers — create only (registers an externally-hosted - -number). - -## Signature - -```php -class ImportedNumbers -``` - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(SignalWire\REST\HttpClient $http) -``` - -#### Parameters - - - -#### Source - -[`SignalWire/REST/Namespaces/ImportedNumbers.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ImportedNumbers.php) - -Line 18. - -*** - -### create - -#### Signature - -```php -public function create(array $body): array -``` - -#### Parameters - - - @return array\ - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/ImportedNumbers.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ImportedNumbers.php) - -Line 29. - -*** - -### getBasePath - -#### Signature - -```php -public function getBasePath(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/REST/Namespaces/ImportedNumbers.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ImportedNumbers.php) - -Line 23. - -## Source - -[`SignalWire/REST/Namespaces/ImportedNumbers.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ImportedNumbers.php) - -Line 13. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/index.mdx deleted file mode 100644 index 18811367c2..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/index.mdx +++ /dev/null @@ -1,171 +0,0 @@ ---- -slug: "/reference/php/signal-wire/rest/namespaces/namespaces" -title: "Namespaces" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "module" - language: "php" - qualified_name: "SignalWire\\REST\\Namespaces" - module: "SignalWire.REST.Namespaces" ---- -# `Namespaces` - -## Signature - -```php -namespace SignalWire\REST\Namespaces -``` - -## Classes - - - - Addresses namespace — list / create / get / delete (no update). - - - - Calling API namespace. - - - - Compatibility (Twilio-compatible LAML) API namespace. - - - - Compat account / sub-project management. - - - - Compat conference management with participants, recordings, and streams. - - - - Compat IncomingPhoneNumbers + AvailablePhoneNumbers + ImportedPhoneNumbers - - - - Compat recording management. - - - - Compat API token management. - - - - Compat transcription management. - - - - Conference log queries — list-only resource. - - - - Datasphere API namespace — exposes the documents sub-resource. - - - - Fabric API namespace. - - - - Read-only fabric addresses (`/api/fabric/addresses`). - - - - Generic operations across all fabric resource types - - - - Subscriber, guest, invite, and embed token creation under - - - - Fax log queries — list + get by id. - - - - Imported phone numbers — create only (registers an externally-hosted - - - - Logs namespace — message, voice, fax, and conference logs (read-only). - - - - Message log queries — list + get by id. - - - - Multi-factor authentication via SMS or phone call. - - - - Project API namespace — currently exposes the project tokens sub-resource. - - - - Project API token management — create / update (PATCH) / delete. - - - - Recordings — read-only list/get plus delete (no create or update). - - - - 10DLC Campaign Registry namespace — brands, campaigns, orders, numbers. - - - - 10DLC brand management — list, create, get, list\_campaigns, create\_campaign. - - - - 10DLC campaign management — get, update (PUT), list\_numbers, - - - - 10DLC number assignment management — release a number. - - - - 10DLC assignment order management — read-only, retrieve by id. - - - - Short codes management — read + update (PUT) only. - - - - Project SIP profile (singleton resource) — get + update (PUT). - - - - Video API namespace. - - - - Video conference token management — get + reset. - - - - Video room recording management — top-level recordings collection - - - - Video room session management. Read-only with several sub-collections - - - - Video room token generation. Surface is `create` only. - - - - Top-level video stream management — get / update (PUT) / delete. - - - - Voice log queries — list + get by id + per-id event sub-collection. - - diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/logs/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/logs/index.mdx deleted file mode 100644 index 890a5376d1..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/logs/index.mdx +++ /dev/null @@ -1,153 +0,0 @@ ---- -slug: "/reference/php/signal-wire/rest/namespaces/namespaces/logs" -title: "Logs" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\REST\\Namespaces\\Logs" - parent: "SignalWire\\REST\\Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Logs.php" ---- -# `Logs` - -Logs namespace — message, voice, fax, and conference logs (read-only). - -Mirrors Python `signalwire.rest.namespaces.logs.LogsNamespace`: each -sub-API lives at a different mount point because that's how the spec -docs slice them. - -## Signature - -```php -class Logs -``` - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(SignalWire\REST\HttpClient $http) -``` - -#### Parameters - - - -#### Source - -[`SignalWire/REST/Namespaces/Logs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Logs.php) - -Line 25. - -*** - -### conferences - -#### Signature - -```php -public function conferences(): SignalWire\REST\Namespaces\ConferenceLogs -``` - -#### Returns - -`SignalWire\REST\Namespaces\ConferenceLogs` - -#### Source - -[`SignalWire/REST/Namespaces/Logs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Logs.php) - -Line 49. - -*** - -### fax - -#### Signature - -```php -public function fax(): SignalWire\REST\Namespaces\FaxLogs -``` - -#### Returns - -`SignalWire\REST\Namespaces\FaxLogs` - -#### Source - -[`SignalWire/REST/Namespaces/Logs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Logs.php) - -Line 44. - -*** - -### getHttp - -#### Signature - -```php -public function getHttp(): SignalWire\REST\HttpClient -``` - -#### Returns - -`SignalWire\REST\HttpClient` - -#### Source - -[`SignalWire/REST/Namespaces/Logs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Logs.php) - -Line 54. - -*** - -### messages - -#### Signature - -```php -public function messages(): SignalWire\REST\Namespaces\MessageLogs -``` - -#### Returns - -`SignalWire\REST\Namespaces\MessageLogs` - -#### Source - -[`SignalWire/REST/Namespaces/Logs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Logs.php) - -Line 34. - -*** - -### voice - -#### Signature - -```php -public function voice(): SignalWire\REST\Namespaces\VoiceLogs -``` - -#### Returns - -`SignalWire\REST\Namespaces\VoiceLogs` - -#### Source - -[`SignalWire/REST/Namespaces/Logs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Logs.php) - -Line 39. - -## Source - -[`SignalWire/REST/Namespaces/Logs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Logs.php) - -Line 16. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/message-logs/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/message-logs/index.mdx deleted file mode 100644 index dd116dc77c..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/message-logs/index.mdx +++ /dev/null @@ -1,127 +0,0 @@ ---- -slug: "/reference/php/signal-wire/rest/namespaces/namespaces/message-logs" -title: "MessageLogs" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\REST\\Namespaces\\MessageLogs" - parent: "SignalWire\\REST\\Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/MessageLogs.php" ---- -# `MessageLogs` - -Message log queries — list + get by id. - -## Signature - -```php -class MessageLogs -``` - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(SignalWire\REST\HttpClient $http, string $basePath) -``` - -#### Parameters - - - - - -#### Source - -[`SignalWire/REST/Namespaces/MessageLogs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/MessageLogs.php) - -Line 17. - -*** - -### get - -#### Signature - -```php -public function get(string $logId): array -``` - -#### Parameters - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/MessageLogs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/MessageLogs.php) - -Line 35. - -*** - -### getBasePath - -#### Signature - -```php -public function getBasePath(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/REST/Namespaces/MessageLogs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/MessageLogs.php) - -Line 23. - -*** - -### list - -#### Signature - -```php -public function list(array $params = array ( -)): array -``` - -#### Parameters - - - @return array\ - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/MessageLogs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/MessageLogs.php) - -Line 29. - -## Source - -[`SignalWire/REST/Namespaces/MessageLogs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/MessageLogs.php) - -Line 12. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/mfa/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/mfa/index.mdx deleted file mode 100644 index df9356777f..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/mfa/index.mdx +++ /dev/null @@ -1,149 +0,0 @@ ---- -slug: "/reference/php/signal-wire/rest/namespaces/namespaces/mfa" -title: "Mfa" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\REST\\Namespaces\\Mfa" - parent: "SignalWire\\REST\\Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Mfa.php" ---- -# `Mfa` - -Multi-factor authentication via SMS or phone call. - -## Signature - -```php -class Mfa -``` - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(SignalWire\REST\HttpClient $http) -``` - -#### Parameters - - - -#### Source - -[`SignalWire/REST/Namespaces/Mfa.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Mfa.php) - -Line 17. - -*** - -### call - -#### Signature - -```php -public function call(array $body): array -``` - -#### Parameters - - - @return array\ - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/Mfa.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Mfa.php) - -Line 34. - -*** - -### getBasePath - -#### Signature - -```php -public function getBasePath(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/REST/Namespaces/Mfa.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Mfa.php) - -Line 22. - -*** - -### sms - -#### Signature - -```php -public function sms(array $body): array -``` - -#### Parameters - - - @return array\ - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/Mfa.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Mfa.php) - -Line 28. - -*** - -### verify - -#### Signature - -```php -public function verify(string $requestId, array $body): array -``` - -#### Parameters - - - - - @return array\ - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/Mfa.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Mfa.php) - -Line 40. - -## Source - -[`SignalWire/REST/Namespaces/Mfa.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Mfa.php) - -Line 12. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/project-tokens/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/project-tokens/index.mdx deleted file mode 100644 index 3dcbe82aa5..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/project-tokens/index.mdx +++ /dev/null @@ -1,147 +0,0 @@ ---- -slug: "/reference/php/signal-wire/rest/namespaces/namespaces/project-tokens" -title: "ProjectTokens" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\REST\\Namespaces\\ProjectTokens" - parent: "SignalWire\\REST\\Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ProjectTokens.php" ---- -# `ProjectTokens` - -Project API token management — create / update (PATCH) / delete. - -## Signature - -```php -class ProjectTokens -``` - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(SignalWire\REST\HttpClient $http) -``` - -#### Parameters - - - -#### Source - -[`SignalWire/REST/Namespaces/ProjectTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ProjectTokens.php) - -Line 17. - -*** - -### create - -#### Signature - -```php -public function create(array $body): array -``` - -#### Parameters - - - @return array\ - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/ProjectTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ProjectTokens.php) - -Line 28. - -*** - -### delete - -#### Signature - -```php -public function delete(string $tokenId): array -``` - -#### Parameters - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/ProjectTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ProjectTokens.php) - -Line 40. - -*** - -### getBasePath - -#### Signature - -```php -public function getBasePath(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/REST/Namespaces/ProjectTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ProjectTokens.php) - -Line 22. - -*** - -### update - -#### Signature - -```php -public function update(string $tokenId, array $body): array -``` - -#### Parameters - - - - - @return array\ - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/ProjectTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ProjectTokens.php) - -Line 34. - -## Source - -[`SignalWire/REST/Namespaces/ProjectTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ProjectTokens.php) - -Line 12. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/project/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/project/index.mdx deleted file mode 100644 index 0ad38ec33f..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/project/index.mdx +++ /dev/null @@ -1,89 +0,0 @@ ---- -slug: "/reference/php/signal-wire/rest/namespaces/namespaces/project" -title: "Project" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\REST\\Namespaces\\Project" - parent: "SignalWire\\REST\\Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Project.php" ---- -# `Project` - -Project API namespace — currently exposes the project tokens sub-resource. - -## Signature - -```php -class Project -``` - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(SignalWire\REST\HttpClient $http) -``` - -#### Parameters - - - -#### Source - -[`SignalWire/REST/Namespaces/Project.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Project.php) - -Line 17. - -*** - -### getHttp - -#### Signature - -```php -public function getHttp(): SignalWire\REST\HttpClient -``` - -#### Returns - -`SignalWire\REST\HttpClient` - -#### Source - -[`SignalWire/REST/Namespaces/Project.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Project.php) - -Line 28. - -*** - -### tokens - -#### Signature - -```php -public function tokens(): SignalWire\REST\Namespaces\ProjectTokens -``` - -#### Returns - -`SignalWire\REST\Namespaces\ProjectTokens` - -#### Source - -[`SignalWire/REST/Namespaces/Project.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Project.php) - -Line 23. - -## Source - -[`SignalWire/REST/Namespaces/Project.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Project.php) - -Line 12. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/recordings/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/recordings/index.mdx deleted file mode 100644 index d25762697e..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/recordings/index.mdx +++ /dev/null @@ -1,149 +0,0 @@ ---- -slug: "/reference/php/signal-wire/rest/namespaces/namespaces/recordings" -title: "Recordings" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\REST\\Namespaces\\Recordings" - parent: "SignalWire\\REST\\Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Recordings.php" ---- -# `Recordings` - -Recordings — read-only list/get plus delete (no create or update). - -## Signature - -```php -class Recordings -``` - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(SignalWire\REST\HttpClient $http) -``` - -#### Parameters - - - -#### Source - -[`SignalWire/REST/Namespaces/Recordings.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Recordings.php) - -Line 17. - -*** - -### delete - -#### Signature - -```php -public function delete(string $recordingId): array -``` - -#### Parameters - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/Recordings.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Recordings.php) - -Line 40. - -*** - -### get - -#### Signature - -```php -public function get(string $recordingId): array -``` - -#### Parameters - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/Recordings.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Recordings.php) - -Line 34. - -*** - -### getBasePath - -#### Signature - -```php -public function getBasePath(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/REST/Namespaces/Recordings.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Recordings.php) - -Line 22. - -*** - -### list - -#### Signature - -```php -public function list(array $params = array ( -)): array -``` - -#### Parameters - - - @return array\ - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/Recordings.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Recordings.php) - -Line 28. - -## Source - -[`SignalWire/REST/Namespaces/Recordings.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Recordings.php) - -Line 12. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/registry-brands/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/registry-brands/index.mdx deleted file mode 100644 index 08cf9423b9..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/registry-brands/index.mdx +++ /dev/null @@ -1,215 +0,0 @@ ---- -slug: "/reference/php/signal-wire/rest/namespaces/namespaces/registry-brands" -title: "RegistryBrands" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\REST\\Namespaces\\RegistryBrands" - parent: "SignalWire\\REST\\Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryBrands.php" ---- -# `RegistryBrands` - -10DLC brand management — list, create, get, list\_campaigns, create\_campaign. - -## Signature - -```php -class RegistryBrands -``` - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(SignalWire\REST\HttpClient $http, string $basePath) -``` - -#### Parameters - - - - - -#### Source - -[`SignalWire/REST/Namespaces/RegistryBrands.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryBrands.php) - -Line 17. - -*** - -### create - -#### Signature - -```php -public function create(array $body): array -``` - -#### Parameters - - - @return array\ - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/RegistryBrands.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryBrands.php) - -Line 35. - -*** - -### createCampaign - -#### Signature - -```php -public function createCampaign(string $brandId, array $body): array -``` - -#### Parameters - - - - - @return array\ - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/RegistryBrands.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryBrands.php) - -Line 53. - -*** - -### get - -#### Signature - -```php -public function get(string $brandId): array -``` - -#### Parameters - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/RegistryBrands.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryBrands.php) - -Line 41. - -*** - -### getBasePath - -#### Signature - -```php -public function getBasePath(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/REST/Namespaces/RegistryBrands.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryBrands.php) - -Line 23. - -*** - -### list - -#### Signature - -```php -public function list(array $params = array ( -)): array -``` - -#### Parameters - - - @return array\ - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/RegistryBrands.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryBrands.php) - -Line 29. - -*** - -### listCampaigns - -#### Signature - -```php -public function listCampaigns(string $brandId, array $params = array ( -)): array -``` - -#### Parameters - - - - - @return array\ - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/RegistryBrands.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryBrands.php) - -Line 47. - -## Source - -[`SignalWire/REST/Namespaces/RegistryBrands.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryBrands.php) - -Line 12. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/registry-campaigns/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/registry-campaigns/index.mdx deleted file mode 100644 index 42bdb21977..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/registry-campaigns/index.mdx +++ /dev/null @@ -1,221 +0,0 @@ ---- -slug: "/reference/php/signal-wire/rest/namespaces/namespaces/registry-campaigns" -title: "RegistryCampaigns" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\REST\\Namespaces\\RegistryCampaigns" - parent: "SignalWire\\REST\\Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryCampaigns.php" ---- -# `RegistryCampaigns` - -10DLC campaign management — get, update (PUT), list\_numbers, - -list\_orders, create\_order. - -## Signature - -```php -class RegistryCampaigns -``` - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(SignalWire\REST\HttpClient $http, string $basePath) -``` - -#### Parameters - - - - - -#### Source - -[`SignalWire/REST/Namespaces/RegistryCampaigns.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryCampaigns.php) - -Line 18. - -*** - -### createOrder - -#### Signature - -```php -public function createOrder(string $campaignId, array $body): array -``` - -#### Parameters - - - - - @return array\ - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/RegistryCampaigns.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryCampaigns.php) - -Line 59. - -*** - -### get - -#### Signature - -```php -public function get(string $campaignId): array -``` - -#### Parameters - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/RegistryCampaigns.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryCampaigns.php) - -Line 30. - -*** - -### getBasePath - -#### Signature - -```php -public function getBasePath(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/REST/Namespaces/RegistryCampaigns.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryCampaigns.php) - -Line 24. - -*** - -### listNumbers - -#### Signature - -```php -public function listNumbers(string $campaignId, array $params = array ( -)): array -``` - -#### Parameters - - - - - @return array\ - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/RegistryCampaigns.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryCampaigns.php) - -Line 47. - -*** - -### listOrders - -#### Signature - -```php -public function listOrders(string $campaignId, array $params = array ( -)): array -``` - -#### Parameters - - - - - @return array\ - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/RegistryCampaigns.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryCampaigns.php) - -Line 53. - -*** - -### update - -Update uses PUT (not PATCH) to mirror the Python `RegistryCampaigns`. - -#### Signature - -```php -public function update(string $campaignId, array $body): array -``` - -#### Parameters - - - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/RegistryCampaigns.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryCampaigns.php) - -Line 41. - -## Source - -[`SignalWire/REST/Namespaces/RegistryCampaigns.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryCampaigns.php) - -Line 13. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/registry-numbers/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/registry-numbers/index.mdx deleted file mode 100644 index 1ea90dab6b..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/registry-numbers/index.mdx +++ /dev/null @@ -1,95 +0,0 @@ ---- -slug: "/reference/php/signal-wire/rest/namespaces/namespaces/registry-numbers" -title: "RegistryNumbers" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\REST\\Namespaces\\RegistryNumbers" - parent: "SignalWire\\REST\\Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryNumbers.php" ---- -# `RegistryNumbers` - -10DLC number assignment management — release a number. - -## Signature - -```php -class RegistryNumbers -``` - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(SignalWire\REST\HttpClient $http, string $basePath) -``` - -#### Parameters - - - - - -#### Source - -[`SignalWire/REST/Namespaces/RegistryNumbers.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryNumbers.php) - -Line 17. - -*** - -### delete - -#### Signature - -```php -public function delete(string $numberId): array -``` - -#### Parameters - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/RegistryNumbers.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryNumbers.php) - -Line 29. - -*** - -### getBasePath - -#### Signature - -```php -public function getBasePath(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/REST/Namespaces/RegistryNumbers.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryNumbers.php) - -Line 23. - -## Source - -[`SignalWire/REST/Namespaces/RegistryNumbers.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryNumbers.php) - -Line 12. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/registry-orders/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/registry-orders/index.mdx deleted file mode 100644 index 76294a19c1..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/registry-orders/index.mdx +++ /dev/null @@ -1,95 +0,0 @@ ---- -slug: "/reference/php/signal-wire/rest/namespaces/namespaces/registry-orders" -title: "RegistryOrders" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\REST\\Namespaces\\RegistryOrders" - parent: "SignalWire\\REST\\Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryOrders.php" ---- -# `RegistryOrders` - -10DLC assignment order management — read-only, retrieve by id. - -## Signature - -```php -class RegistryOrders -``` - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(SignalWire\REST\HttpClient $http, string $basePath) -``` - -#### Parameters - - - - - -#### Source - -[`SignalWire/REST/Namespaces/RegistryOrders.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryOrders.php) - -Line 17. - -*** - -### get - -#### Signature - -```php -public function get(string $orderId): array -``` - -#### Parameters - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/RegistryOrders.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryOrders.php) - -Line 29. - -*** - -### getBasePath - -#### Signature - -```php -public function getBasePath(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/REST/Namespaces/RegistryOrders.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryOrders.php) - -Line 23. - -## Source - -[`SignalWire/REST/Namespaces/RegistryOrders.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/RegistryOrders.php) - -Line 12. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/registry/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/registry/index.mdx deleted file mode 100644 index 41543c2502..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/registry/index.mdx +++ /dev/null @@ -1,152 +0,0 @@ ---- -slug: "/reference/php/signal-wire/rest/namespaces/namespaces/registry" -title: "Registry" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\REST\\Namespaces\\Registry" - parent: "SignalWire\\REST\\Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Registry.php" ---- -# `Registry` - -10DLC Campaign Registry namespace — brands, campaigns, orders, numbers. - -Mirrors Python `signalwire.rest.namespaces.registry.RegistryNamespace`. -All registry endpoints sit under `/api/relay/rest/registry/beta`. - -## Signature - -```php -class Registry -``` - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(SignalWire\REST\HttpClient $http) -``` - -#### Parameters - - - -#### Source - -[`SignalWire/REST/Namespaces/Registry.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Registry.php) - -Line 25. - -*** - -### brands - -#### Signature - -```php -public function brands(): SignalWire\REST\Namespaces\RegistryBrands -``` - -#### Returns - -`SignalWire\REST\Namespaces\RegistryBrands` - -#### Source - -[`SignalWire/REST/Namespaces/Registry.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Registry.php) - -Line 34. - -*** - -### campaigns - -#### Signature - -```php -public function campaigns(): SignalWire\REST\Namespaces\RegistryCampaigns -``` - -#### Returns - -`SignalWire\REST\Namespaces\RegistryCampaigns` - -#### Source - -[`SignalWire/REST/Namespaces/Registry.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Registry.php) - -Line 39. - -*** - -### getHttp - -#### Signature - -```php -public function getHttp(): SignalWire\REST\HttpClient -``` - -#### Returns - -`SignalWire\REST\HttpClient` - -#### Source - -[`SignalWire/REST/Namespaces/Registry.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Registry.php) - -Line 54. - -*** - -### numbers - -#### Signature - -```php -public function numbers(): SignalWire\REST\Namespaces\RegistryNumbers -``` - -#### Returns - -`SignalWire\REST\Namespaces\RegistryNumbers` - -#### Source - -[`SignalWire/REST/Namespaces/Registry.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Registry.php) - -Line 49. - -*** - -### orders - -#### Signature - -```php -public function orders(): SignalWire\REST\Namespaces\RegistryOrders -``` - -#### Returns - -`SignalWire\REST\Namespaces\RegistryOrders` - -#### Source - -[`SignalWire/REST/Namespaces/Registry.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Registry.php) - -Line 44. - -## Source - -[`SignalWire/REST/Namespaces/Registry.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Registry.php) - -Line 15. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/short-codes/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/short-codes/index.mdx deleted file mode 100644 index 7f01721d82..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/short-codes/index.mdx +++ /dev/null @@ -1,153 +0,0 @@ ---- -slug: "/reference/php/signal-wire/rest/namespaces/namespaces/short-codes" -title: "ShortCodes" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\REST\\Namespaces\\ShortCodes" - parent: "SignalWire\\REST\\Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ShortCodes.php" ---- -# `ShortCodes` - -Short codes management — read + update (PUT) only. - -## Signature - -```php -class ShortCodes -``` - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(SignalWire\REST\HttpClient $http) -``` - -#### Parameters - - - -#### Source - -[`SignalWire/REST/Namespaces/ShortCodes.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ShortCodes.php) - -Line 17. - -*** - -### get - -#### Signature - -```php -public function get(string $shortCodeId): array -``` - -#### Parameters - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/ShortCodes.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ShortCodes.php) - -Line 34. - -*** - -### getBasePath - -#### Signature - -```php -public function getBasePath(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/REST/Namespaces/ShortCodes.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ShortCodes.php) - -Line 22. - -*** - -### list - -#### Signature - -```php -public function list(array $params = array ( -)): array -``` - -#### Parameters - - - @return array\ - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/ShortCodes.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ShortCodes.php) - -Line 28. - -*** - -### update - -#### Signature - -```php -public function update(string $shortCodeId, array $body): array -``` - -#### Parameters - - - - - @return array\ - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/ShortCodes.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ShortCodes.php) - -Line 40. - -## Source - -[`SignalWire/REST/Namespaces/ShortCodes.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/ShortCodes.php) - -Line 12. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/sip-profile/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/sip-profile/index.mdx deleted file mode 100644 index d307401a66..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/sip-profile/index.mdx +++ /dev/null @@ -1,115 +0,0 @@ ---- -slug: "/reference/php/signal-wire/rest/namespaces/namespaces/sip-profile" -title: "SipProfile" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\REST\\Namespaces\\SipProfile" - parent: "SignalWire\\REST\\Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/SipProfile.php" ---- -# `SipProfile` - -Project SIP profile (singleton resource) — get + update (PUT). - -## Signature - -```php -class SipProfile -``` - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(SignalWire\REST\HttpClient $http) -``` - -#### Parameters - - - -#### Source - -[`SignalWire/REST/Namespaces/SipProfile.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/SipProfile.php) - -Line 17. - -*** - -### get - -#### Signature - -```php -public function get(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/SipProfile.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/SipProfile.php) - -Line 28. - -*** - -### getBasePath - -#### Signature - -```php -public function getBasePath(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/REST/Namespaces/SipProfile.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/SipProfile.php) - -Line 22. - -*** - -### update - -#### Signature - -```php -public function update(array $body): array -``` - -#### Parameters - - - @return array\ - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/SipProfile.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/SipProfile.php) - -Line 34. - -## Source - -[`SignalWire/REST/Namespaces/SipProfile.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/SipProfile.php) - -Line 12. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/video-conference-tokens/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/video-conference-tokens/index.mdx deleted file mode 100644 index 0c14653a45..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/video-conference-tokens/index.mdx +++ /dev/null @@ -1,119 +0,0 @@ ---- -slug: "/reference/php/signal-wire/rest/namespaces/namespaces/video-conference-tokens" -title: "VideoConferenceTokens" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\REST\\Namespaces\\VideoConferenceTokens" - parent: "SignalWire\\REST\\Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoConferenceTokens.php" ---- -# `VideoConferenceTokens` - -Video conference token management — get + reset. - -## Signature - -```php -class VideoConferenceTokens -``` - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(SignalWire\REST\HttpClient $http, string $basePath) -``` - -#### Parameters - - - - - -#### Source - -[`SignalWire/REST/Namespaces/VideoConferenceTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoConferenceTokens.php) - -Line 17. - -*** - -### get - -#### Signature - -```php -public function get(string $tokenId): array -``` - -#### Parameters - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/VideoConferenceTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoConferenceTokens.php) - -Line 29. - -*** - -### getBasePath - -#### Signature - -```php -public function getBasePath(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/REST/Namespaces/VideoConferenceTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoConferenceTokens.php) - -Line 23. - -*** - -### reset - -#### Signature - -```php -public function reset(string $tokenId): array -``` - -#### Parameters - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/VideoConferenceTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoConferenceTokens.php) - -Line 35. - -## Source - -[`SignalWire/REST/Namespaces/VideoConferenceTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoConferenceTokens.php) - -Line 12. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/video-room-recordings/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/video-room-recordings/index.mdx deleted file mode 100644 index d67223d4c9..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/video-room-recordings/index.mdx +++ /dev/null @@ -1,187 +0,0 @@ ---- -slug: "/reference/php/signal-wire/rest/namespaces/namespaces/video-room-recordings" -title: "VideoRoomRecordings" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\REST\\Namespaces\\VideoRoomRecordings" - parent: "SignalWire\\REST\\Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoRoomRecordings.php" ---- -# `VideoRoomRecordings` - -Video room recording management — top-level recordings collection - -(distinct from session-scoped recordings). - -## Signature - -```php -class VideoRoomRecordings -``` - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(SignalWire\REST\HttpClient $http, string $basePath) -``` - -#### Parameters - - - - - -#### Source - -[`SignalWire/REST/Namespaces/VideoRoomRecordings.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoRoomRecordings.php) - -Line 18. - -*** - -### delete - -#### Signature - -```php -public function delete(string $recordingId): array -``` - -#### Parameters - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/VideoRoomRecordings.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoRoomRecordings.php) - -Line 42. - -*** - -### get - -#### Signature - -```php -public function get(string $recordingId): array -``` - -#### Parameters - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/VideoRoomRecordings.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoRoomRecordings.php) - -Line 36. - -*** - -### getBasePath - -#### Signature - -```php -public function getBasePath(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/REST/Namespaces/VideoRoomRecordings.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoRoomRecordings.php) - -Line 24. - -*** - -### list - -#### Signature - -```php -public function list(array $params = array ( -)): array -``` - -#### Parameters - - - @return array\ - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/VideoRoomRecordings.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoRoomRecordings.php) - -Line 30. - -*** - -### listEvents - -#### Signature - -```php -public function listEvents(string $recordingId, array $params = array ( -)): array -``` - -#### Parameters - - - - - @return array\ - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/VideoRoomRecordings.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoRoomRecordings.php) - -Line 48. - -## Source - -[`SignalWire/REST/Namespaces/VideoRoomRecordings.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoRoomRecordings.php) - -Line 13. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/video-room-sessions/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/video-room-sessions/index.mdx deleted file mode 100644 index 8d125fd135..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/video-room-sessions/index.mdx +++ /dev/null @@ -1,231 +0,0 @@ ---- -slug: "/reference/php/signal-wire/rest/namespaces/namespaces/video-room-sessions" -title: "VideoRoomSessions" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\REST\\Namespaces\\VideoRoomSessions" - parent: "SignalWire\\REST\\Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoRoomSessions.php" ---- -# `VideoRoomSessions` - -Video room session management. Read-only with several sub-collections - -(events, members, recordings). - -## Signature - -```php -class VideoRoomSessions -``` - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(SignalWire\REST\HttpClient $http, string $basePath) -``` - -#### Parameters - - - - - -#### Source - -[`SignalWire/REST/Namespaces/VideoRoomSessions.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoRoomSessions.php) - -Line 18. - -*** - -### get - -#### Signature - -```php -public function get(string $sessionId): array -``` - -#### Parameters - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/VideoRoomSessions.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoRoomSessions.php) - -Line 36. - -*** - -### getBasePath - -#### Signature - -```php -public function getBasePath(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/REST/Namespaces/VideoRoomSessions.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoRoomSessions.php) - -Line 24. - -*** - -### list - -#### Signature - -```php -public function list(array $params = array ( -)): array -``` - -#### Parameters - - - @return array\ - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/VideoRoomSessions.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoRoomSessions.php) - -Line 30. - -*** - -### listEvents - -#### Signature - -```php -public function listEvents(string $sessionId, array $params = array ( -)): array -``` - -#### Parameters - - - - - @return array\ - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/VideoRoomSessions.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoRoomSessions.php) - -Line 42. - -*** - -### listMembers - -#### Signature - -```php -public function listMembers(string $sessionId, array $params = array ( -)): array -``` - -#### Parameters - - - - - @return array\ - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/VideoRoomSessions.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoRoomSessions.php) - -Line 48. - -*** - -### listRecordings - -#### Signature - -```php -public function listRecordings(string $sessionId, array $params = array ( -)): array -``` - -#### Parameters - - - - - @return array\ - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/VideoRoomSessions.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoRoomSessions.php) - -Line 54. - -## Source - -[`SignalWire/REST/Namespaces/VideoRoomSessions.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoRoomSessions.php) - -Line 13. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/video-room-tokens/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/video-room-tokens/index.mdx deleted file mode 100644 index f2b83138d1..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/video-room-tokens/index.mdx +++ /dev/null @@ -1,97 +0,0 @@ ---- -slug: "/reference/php/signal-wire/rest/namespaces/namespaces/video-room-tokens" -title: "VideoRoomTokens" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\REST\\Namespaces\\VideoRoomTokens" - parent: "SignalWire\\REST\\Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoRoomTokens.php" ---- -# `VideoRoomTokens` - -Video room token generation. Surface is `create` only. - -## Signature - -```php -class VideoRoomTokens -``` - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(SignalWire\REST\HttpClient $http, string $basePath) -``` - -#### Parameters - - - - - -#### Source - -[`SignalWire/REST/Namespaces/VideoRoomTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoRoomTokens.php) - -Line 17. - -*** - -### create - -#### Signature - -```php -public function create(array $body): array -``` - -#### Parameters - - - @return array\ - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/VideoRoomTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoRoomTokens.php) - -Line 29. - -*** - -### getBasePath - -#### Signature - -```php -public function getBasePath(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/REST/Namespaces/VideoRoomTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoRoomTokens.php) - -Line 23. - -## Source - -[`SignalWire/REST/Namespaces/VideoRoomTokens.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoRoomTokens.php) - -Line 12. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/video-streams/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/video-streams/index.mdx deleted file mode 100644 index af385b21cb..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/video-streams/index.mdx +++ /dev/null @@ -1,147 +0,0 @@ ---- -slug: "/reference/php/signal-wire/rest/namespaces/namespaces/video-streams" -title: "VideoStreams" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\REST\\Namespaces\\VideoStreams" - parent: "SignalWire\\REST\\Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoStreams.php" ---- -# `VideoStreams` - -Top-level video stream management — get / update (PUT) / delete. - -## Signature - -```php -class VideoStreams -``` - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(SignalWire\REST\HttpClient $http, string $basePath) -``` - -#### Parameters - - - - - -#### Source - -[`SignalWire/REST/Namespaces/VideoStreams.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoStreams.php) - -Line 17. - -*** - -### delete - -#### Signature - -```php -public function delete(string $streamId): array -``` - -#### Parameters - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/VideoStreams.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoStreams.php) - -Line 41. - -*** - -### get - -#### Signature - -```php -public function get(string $streamId): array -``` - -#### Parameters - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/VideoStreams.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoStreams.php) - -Line 29. - -*** - -### getBasePath - -#### Signature - -```php -public function getBasePath(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/REST/Namespaces/VideoStreams.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoStreams.php) - -Line 23. - -*** - -### update - -#### Signature - -```php -public function update(string $streamId, array $body): array -``` - -#### Parameters - - - - - @return array\ - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/VideoStreams.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoStreams.php) - -Line 35. - -## Source - -[`SignalWire/REST/Namespaces/VideoStreams.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VideoStreams.php) - -Line 12. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/video/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/video/index.mdx deleted file mode 100644 index e49f841877..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/video/index.mdx +++ /dev/null @@ -1,213 +0,0 @@ ---- -slug: "/reference/php/signal-wire/rest/namespaces/namespaces/video" -title: "Video" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\REST\\Namespaces\\Video" - parent: "SignalWire\\REST\\Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Video.php" ---- -# `Video` - -Video API namespace. - -Mirrors Python `signalwire.rest.namespaces.video.VideoNamespace`: groups -the Video API sub-resources (rooms, room\_sessions, room\_recordings, -conferences, conference\_tokens, streams) under one object. - -## Signature - -```php -class Video -``` - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(SignalWire\REST\HttpClient $http) -``` - -#### Parameters - - - -#### Source - -[`SignalWire/REST/Namespaces/Video.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Video.php) - -Line 29. - -*** - -### conferences - -#### Signature - -```php -public function conferences(): SignalWire\REST\Namespaces\VideoConferences -``` - -#### Returns - -`SignalWire\REST\Namespaces\VideoConferences` - -#### Source - -[`SignalWire/REST/Namespaces/Video.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Video.php) - -Line 67. - -*** - -### conferenceTokens - -#### Signature - -```php -public function conferenceTokens(): SignalWire\REST\Namespaces\VideoConferenceTokens -``` - -#### Returns - -`SignalWire\REST\Namespaces\VideoConferenceTokens` - -#### Source - -[`SignalWire/REST/Namespaces/Video.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Video.php) - -Line 72. - -*** - -### getHttp - -#### Signature - -```php -public function getHttp(): SignalWire\REST\HttpClient -``` - -#### Returns - -`SignalWire\REST\HttpClient` - -#### Source - -[`SignalWire/REST/Namespaces/Video.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Video.php) - -Line 42. - -*** - -### roomRecordings - -#### Signature - -```php -public function roomRecordings(): SignalWire\REST\Namespaces\VideoRoomRecordings -``` - -#### Returns - -`SignalWire\REST\Namespaces\VideoRoomRecordings` - -#### Source - -[`SignalWire/REST/Namespaces/Video.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Video.php) - -Line 62. - -*** - -### rooms - -#### Signature - -```php -public function rooms(): SignalWire\REST\Namespaces\VideoRooms -``` - -#### Returns - -`SignalWire\REST\Namespaces\VideoRooms` - -#### Source - -[`SignalWire/REST/Namespaces/Video.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Video.php) - -Line 47. - -*** - -### roomSessions - -#### Signature - -```php -public function roomSessions(): SignalWire\REST\Namespaces\VideoRoomSessions -``` - -#### Returns - -`SignalWire\REST\Namespaces\VideoRoomSessions` - -#### Source - -[`SignalWire/REST/Namespaces/Video.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Video.php) - -Line 57. - -*** - -### roomTokens - -#### Signature - -```php -public function roomTokens(): SignalWire\REST\Namespaces\VideoRoomTokens -``` - -#### Returns - -`SignalWire\REST\Namespaces\VideoRoomTokens` - -#### Source - -[`SignalWire/REST/Namespaces/Video.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Video.php) - -Line 52. - -*** - -### streams - -#### Signature - -```php -public function streams(): SignalWire\REST\Namespaces\VideoStreams -``` - -#### Returns - -`SignalWire\REST\Namespaces\VideoStreams` - -#### Source - -[`SignalWire/REST/Namespaces/Video.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Video.php) - -Line 77. - -## Source - -[`SignalWire/REST/Namespaces/Video.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/Video.php) - -Line 17. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/voice-logs/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/voice-logs/index.mdx deleted file mode 100644 index e67d287f89..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/rest/namespaces/namespaces/voice-logs/index.mdx +++ /dev/null @@ -1,161 +0,0 @@ ---- -slug: "/reference/php/signal-wire/rest/namespaces/namespaces/voice-logs" -title: "VoiceLogs" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\REST\\Namespaces\\VoiceLogs" - parent: "SignalWire\\REST\\Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VoiceLogs.php" ---- -# `VoiceLogs` - -Voice log queries — list + get by id + per-id event sub-collection. - -## Signature - -```php -class VoiceLogs -``` - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(SignalWire\REST\HttpClient $http, string $basePath) -``` - -#### Parameters - - - - - -#### Source - -[`SignalWire/REST/Namespaces/VoiceLogs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VoiceLogs.php) - -Line 17. - -*** - -### get - -#### Signature - -```php -public function get(string $logId): array -``` - -#### Parameters - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/VoiceLogs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VoiceLogs.php) - -Line 35. - -*** - -### getBasePath - -#### Signature - -```php -public function getBasePath(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/REST/Namespaces/VoiceLogs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VoiceLogs.php) - -Line 23. - -*** - -### list - -#### Signature - -```php -public function list(array $params = array ( -)): array -``` - -#### Parameters - - - @return array\ - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/VoiceLogs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VoiceLogs.php) - -Line 29. - -*** - -### listEvents - -#### Signature - -```php -public function listEvents(string $logId, array $params = array ( -)): array -``` - -#### Parameters - - - - - @return array\ - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/Namespaces/VoiceLogs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VoiceLogs.php) - -Line 41. - -## Source - -[`SignalWire/REST/Namespaces/VoiceLogs.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/Namespaces/VoiceLogs.php) - -Line 12. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/rest/base-resource/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/rest/base-resource/index.mdx deleted file mode 100644 index abca126d0d..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/rest/rest/base-resource/index.mdx +++ /dev/null @@ -1,97 +0,0 @@ ---- -slug: "/reference/php/signal-wire/rest/rest/base-resource" -title: "BaseResource" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\REST\\BaseResource" - parent: "SignalWire\\REST" - module: "SignalWire.REST" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php" ---- -# `BaseResource` - -Common base class for namespace and resource classes. - -Mirrors Python's signalwire.rest.\_base.BaseResource — minimal wrapper -around an HttpClient and a base path. CrudResource extends this for -standard REST collection+item access; namespace classes that want a -shared base path (without inheriting list/create/get/update/delete) -can subclass BaseResource directly. - -## Signature - -```php -class BaseResource -``` - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(SignalWire\REST\HttpClient $http, string $base_path) -``` - -#### Parameters - - - - - -#### Source - -[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) - -Line 21. - -*** - -### getBasePath - -#### Signature - -```php -public function getBasePath(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) - -Line 38. - -*** - -### getHttp - -#### Signature - -```php -public function getHttp(): SignalWire\REST\HttpClient -``` - -#### Returns - -`SignalWire\REST\HttpClient` - -#### Source - -[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) - -Line 43. - -## Source - -[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) - -Line 16. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/rest/crud-resource/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/rest/crud-resource/index.mdx deleted file mode 100644 index c2ecdeb5a8..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/rest/rest/crud-resource/index.mdx +++ /dev/null @@ -1,262 +0,0 @@ ---- -slug: "/reference/php/signal-wire/rest/rest/crud-resource" -title: "CrudResource" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\REST\\CrudResource" - parent: "SignalWire\\REST" - module: "SignalWire.REST" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php" ---- -# `CrudResource` - -Generic CRUD wrapper around an HttpClient and a base API path. - -Provides list / create / get / update / delete for any REST resource that -follows the standard SignalWire collection+item URL pattern. - -## Signature - -```php -class CrudResource extends BaseResource -``` - -## Inheritance - -**Extends:** [SignalWire\REST\BaseResource](/docs/sdk-reference/reference/php/signal-wire/rest/rest/base-resource) - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(SignalWire\REST\HttpClient $client, string $basePath) -``` - -#### Parameters - - - - - -#### Source - -[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) - -Line 59. - -*** - -### create - -Create a new resource (POST basePath). - -#### Signature - -```php -public function create(array $data): array -``` - -#### Parameters - - - JSON body. - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) - -Line 105. - -*** - -### delete - -Delete a resource by ID (DELETE basePath/\{id\}). - -#### Signature - -```php -public function delete(string $id): array -``` - -#### Parameters - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) - -Line 136. - -*** - -### get - -Retrieve a single resource by ID (GET basePath/\{id\}). - -#### Signature - -```php -public function get(string $id): array -``` - -#### Parameters - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) - -Line 115. - -*** - -### getBasePath - -#### Signature - -```php -public function getBasePath(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) - -Line 65. - -*** - -### getClient - -#### Signature - -```php -public function getClient(): SignalWire\REST\HttpClient -``` - -#### Returns - -`SignalWire\REST\HttpClient` - -#### Source - -[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) - -Line 70. - -*** - -### getHttp - -#### Signature - -```php -public function getHttp(): SignalWire\REST\HttpClient -``` - -#### Returns - -`SignalWire\REST\HttpClient` - -#### Source - -[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) - -Line 43. - -*** - -### list - -List resources (GET basePath). - -#### Signature - -```php -public function list(array $params = array ( -)): array -``` - -#### Parameters - - - Query-string parameters. - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) - -Line 94. - -*** - -### update - -Update a resource by ID (PUT basePath/\{id\}). - -#### Signature - -```php -public function update(string $id, array $data): array -``` - -#### Parameters - - - - - JSON body. - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) - -Line 126. - -## Source - -[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) - -Line 55. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/rest/crud-with-addresses/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/rest/crud-with-addresses/index.mdx deleted file mode 100644 index 7ee65aa371..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/rest/rest/crud-with-addresses/index.mdx +++ /dev/null @@ -1,298 +0,0 @@ ---- -slug: "/reference/php/signal-wire/rest/rest/crud-with-addresses" -title: "CrudWithAddresses" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\REST\\CrudWithAddresses" - parent: "SignalWire\\REST" - module: "SignalWire.REST" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php" ---- -# `CrudWithAddresses` - -CRUD resource that also supports listing addresses for an item. - -Mirrors Python's signalwire.rest.\_base.CrudWithAddresses — adds -list\_addresses(resource\_id, \*\*params) on top of the standard CRUD set. - -## Signature - -```php -class CrudWithAddresses extends CrudResource -``` - -## Inheritance - -**Extends:** [SignalWire\REST\CrudResource](/docs/sdk-reference/reference/php/signal-wire/rest/rest/crud-resource) - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(SignalWire\REST\HttpClient $client, string $basePath) -``` - -#### Parameters - - - - - -#### Source - -[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) - -Line 59. - -*** - -### create - -Create a new resource (POST basePath). - -#### Signature - -```php -public function create(array $data): array -``` - -#### Parameters - - - JSON body. - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) - -Line 105. - -*** - -### delete - -Delete a resource by ID (DELETE basePath/\{id\}). - -#### Signature - -```php -public function delete(string $id): array -``` - -#### Parameters - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) - -Line 136. - -*** - -### get - -Retrieve a single resource by ID (GET basePath/\{id\}). - -#### Signature - -```php -public function get(string $id): array -``` - -#### Parameters - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) - -Line 115. - -*** - -### getBasePath - -#### Signature - -```php -public function getBasePath(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) - -Line 65. - -*** - -### getClient - -#### Signature - -```php -public function getClient(): SignalWire\REST\HttpClient -``` - -#### Returns - -`SignalWire\REST\HttpClient` - -#### Source - -[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) - -Line 70. - -*** - -### getHttp - -#### Signature - -```php -public function getHttp(): SignalWire\REST\HttpClient -``` - -#### Returns - -`SignalWire\REST\HttpClient` - -#### Source - -[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) - -Line 43. - -*** - -### list - -List resources (GET basePath). - -#### Signature - -```php -public function list(array $params = array ( -)): array -``` - -#### Parameters - - - Query-string parameters. - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) - -Line 94. - -*** - -### listAddresses - -List the addresses associated with a resource (GET basePath/\{id\}/addresses). - -#### Signature - -```php -public function listAddresses(string $resource_id, array $params = array ( -)): array -``` - -#### Parameters - - - - - Query-string parameters. - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) - -Line 156. - -*** - -### update - -Update a resource by ID (PUT basePath/\{id\}). - -#### Signature - -```php -public function update(string $id, array $data): array -``` - -#### Parameters - - - - - JSON body. - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) - -Line 126. - -## Source - -[`SignalWire/REST/CrudResource.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php) - -Line 148. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/rest/http-client/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/rest/http-client/index.mdx deleted file mode 100644 index eea5a9e65d..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/rest/rest/http-client/index.mdx +++ /dev/null @@ -1,344 +0,0 @@ ---- -slug: "/reference/php/signal-wire/rest/rest/http-client" -title: "HttpClient" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\REST\\HttpClient" - parent: "SignalWire\\REST" - module: "SignalWire.REST" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/HttpClient.php" ---- -# `HttpClient` - -Low-level HTTP client for SignalWire REST APIs. - -Uses cURL for HTTP requests, Basic Auth with project\_id:token, -and returns parsed JSON responses as associative arrays. - -## Signature - -```php -class HttpClient -``` - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct( - string $projectId, - string $token, - string $baseUrl, - ?string $caBundle = NULL -) -``` - -#### Parameters - - - - - - - - - Optional CA bundle (PEM) for HTTPS peer verification. Falls back to the SIGNALWIRE\_CA\_FILE / SSL\_CERT\_FILE env vars (PHP's cURL does not honor those env vars on its own). - - -#### Source - -[`SignalWire/REST/HttpClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/HttpClient.php) - -Line 38. - -*** - -### delete - -#### Signature - -```php -public function delete(string $path): array -``` - -#### Parameters - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/HttpClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/HttpClient.php) - -Line 129. - -*** - -### get - -#### Signature - -```php -public function get(string $path, array $params = array ( -)): array -``` - -#### Parameters - - - - - Query-string parameters. - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/HttpClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/HttpClient.php) - -Line 94. - -*** - -### getAuthHeader - -#### Signature - -```php -public function getAuthHeader(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/REST/HttpClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/HttpClient.php) - -Line 81. - -*** - -### getBaseUrl - -#### Signature - -```php -public function getBaseUrl(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/REST/HttpClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/HttpClient.php) - -Line 76. - -*** - -### getProjectId - -#### Signature - -```php -public function getProjectId(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/REST/HttpClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/HttpClient.php) - -Line 66. - -*** - -### getToken - -#### Signature - -```php -public function getToken(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/REST/HttpClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/HttpClient.php) - -Line 71. - -*** - -### listAll - -Return a generator that follows `next` links automatically. - -Expects the API to return `{ "data": [...], "links": { "next": "..." } }` -or similar paginated envelope. Each yield is one page (array of items). - -#### Signature - -```php -public function listAll(string $path, array $params = array ( -)): Generator -``` - -#### Parameters - - - - - Initial query-string parameters. - - -#### Returns - -`Generator` - -#### Source - -[`SignalWire/REST/HttpClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/HttpClient.php) - -Line 147. - -*** - -### patch - -#### Signature - -```php -public function patch(string $path, array $data = array ( -)): array -``` - -#### Parameters - - - - - JSON body payload. - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/HttpClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/HttpClient.php) - -Line 121. - -*** - -### post - -#### Signature - -```php -public function post(string $path, array $data = array ( -)): array -``` - -#### Parameters - - - - - JSON body payload. - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/HttpClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/HttpClient.php) - -Line 103. - -*** - -### put - -#### Signature - -```php -public function put(string $path, array $data = array ( -)): array -``` - -#### Parameters - - - - - JSON body payload. - - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/HttpClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/HttpClient.php) - -Line 112. - -## Source - -[`SignalWire/REST/HttpClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/HttpClient.php) - -Line 13. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/rest/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/rest/index.mdx deleted file mode 100644 index b9587de480..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/rest/rest/index.mdx +++ /dev/null @@ -1,51 +0,0 @@ ---- -slug: "/reference/php/signal-wire/rest/rest" -title: "REST" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "module" - language: "php" - qualified_name: "SignalWire\\REST" - module: "SignalWire.REST" ---- -# `REST` - -## Signature - -```php -namespace SignalWire\REST -``` - -## Classes - - - - Common base class for namespace and resource classes. - - - - Generic CRUD wrapper around an HttpClient and a base API path. - - - - CRUD resource that also supports listing addresses for an item. - - - - Low-level HTTP client for SignalWire REST APIs. - - - - Iterates items across paginated API responses. - - - - Top-level SignalWire REST client. - - - - Exception thrown when a SignalWire REST API request fails with a non-2xx status. - - diff --git a/fern/products/sdk-reference/php/signal-wire/rest/rest/paginated-iterator/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/rest/paginated-iterator/index.mdx deleted file mode 100644 index af8f40b380..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/rest/rest/paginated-iterator/index.mdx +++ /dev/null @@ -1,307 +0,0 @@ ---- -slug: "/reference/php/signal-wire/rest/rest/paginated-iterator" -title: "PaginatedIterator" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\REST\\PaginatedIterator" - parent: "SignalWire\\REST" - module: "SignalWire.REST" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/PaginatedIterator.php" ---- -# `PaginatedIterator` - -Iterates items across paginated API responses. - -Mirrors Python `signalwire.rest._pagination.PaginatedIterator`: walks -pages by following the `links.next` cursor and extracting query params -from the URL. - -Usage: -foreach (new PaginatedIterator($http, '/api/path', \['k' => 'v']) as $item) \{ -// ... -\} - -## Signature - -```php -class PaginatedIterator implements Iterator, Traversable -``` - -## Inheritance - -**Implements:** `Iterator`, `Traversable` - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct( - SignalWire\REST\HttpClient $http, - string $path, - ?array $params = NULL, - string $dataKey = 'data' -) -``` - -#### Parameters - - - - - - - Initial query-string parameters. - - - - -#### Source - -[`SignalWire/REST/PaginatedIterator.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/PaginatedIterator.php) - -Line 35. - -*** - -### current - -#### Signature - -```php -public function current(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/PaginatedIterator.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/PaginatedIterator.php) - -Line 107. - -*** - -### getDataKey - -#### Signature - -```php -public function getDataKey(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/REST/PaginatedIterator.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/PaginatedIterator.php) - -Line 63. - -*** - -### getHttp - -#### Signature - -```php -public function getHttp(): SignalWire\REST\HttpClient -``` - -#### Returns - -`SignalWire\REST\HttpClient` - -#### Source - -[`SignalWire/REST/PaginatedIterator.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/PaginatedIterator.php) - -Line 47. - -*** - -### getIndex - -#### Signature - -```php -public function getIndex(): int -``` - -#### Returns - -`int` - -#### Source - -[`SignalWire/REST/PaginatedIterator.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/PaginatedIterator.php) - -Line 73. - -*** - -### getItems - -#### Signature - -```php -public function getItems(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/PaginatedIterator.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/PaginatedIterator.php) - -Line 79. - -*** - -### getParams - -#### Signature - -```php -public function getParams(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/REST/PaginatedIterator.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/PaginatedIterator.php) - -Line 58. - -*** - -### getPath - -#### Signature - -```php -public function getPath(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/REST/PaginatedIterator.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/PaginatedIterator.php) - -Line 52. - -*** - -### isDone - -#### Signature - -```php -public function isDone(): bool -``` - -#### Returns - -`bool` - -#### Source - -[`SignalWire/REST/PaginatedIterator.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/PaginatedIterator.php) - -Line 68. - -*** - -### key - -#### Signature - -```php -public function key(): int -``` - -#### Returns - -`int` - -#### Source - -[`SignalWire/REST/PaginatedIterator.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/PaginatedIterator.php) - -Line 112. - -*** - -### next - -#### Signature - -```php -public function next(): void -``` - -#### Source - -[`SignalWire/REST/PaginatedIterator.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/PaginatedIterator.php) - -Line 117. - -*** - -### rewind - -#### Signature - -```php -public function rewind(): void -``` - -#### Source - -[`SignalWire/REST/PaginatedIterator.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/PaginatedIterator.php) - -Line 88. - -*** - -### valid - -#### Signature - -```php -public function valid(): bool -``` - -#### Returns - -`bool` - -#### Source - -[`SignalWire/REST/PaginatedIterator.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/PaginatedIterator.php) - -Line 93. - -## Source - -[`SignalWire/REST/PaginatedIterator.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/PaginatedIterator.php) - -Line 19. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/rest/rest-client/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/rest/rest-client/index.mdx deleted file mode 100644 index 8fde5fddd8..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/rest/rest/rest-client/index.mdx +++ /dev/null @@ -1,637 +0,0 @@ ---- -slug: "/reference/php/signal-wire/rest/rest/rest-client" -title: "RestClient" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\REST\\RestClient" - parent: "SignalWire\\REST" - module: "SignalWire.REST" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php" ---- -# `RestClient` - -Top-level SignalWire REST client. - -Provides lazy access to every API namespace (fabric, calling, -phone\_numbers, datasphere, video, compat, etc.). Credentials can be -supplied explicitly or pulled from environment variables. - -## Signature - -```php -class RestClient -``` - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct( - string $projectId = '', - string $token = '', - string $space = '', - ?string $caBundle = NULL -) -``` - -#### Parameters - - - Project ID (falls back to SIGNALWIRE\_PROJECT\_ID env var). - - - - API token (falls back to SIGNALWIRE\_API\_TOKEN env var). - - - - Space host or full base URL. - "mycompany.signalwire.com" → https://mycompany.signalwire.com - "https://example.com:8080" → used verbatim - "http://127.0.0.1:8080" → used verbatim (test fixtures) Falls back to SIGNALWIRE\_SPACE env var. - - - - -#### Source - -[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) - -Line 73. - -*** - -### addresses - -Addresses (list / create / get / delete — no update). - -#### Signature - -```php -public function addresses(): SignalWire\REST\Namespaces\Addresses -``` - -#### Returns - -`SignalWire\REST\Namespaces\Addresses` - -#### Source - -[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) - -Line 200. - -*** - -### calling - -Calling API (37 call-control commands). - -#### Signature - -```php -public function calling(): SignalWire\REST\Namespaces\Calling -``` - -#### Returns - -`SignalWire\REST\Namespaces\Calling` - -#### Source - -[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) - -Line 147. - -*** - -### chat - -Chat tokens. - -#### Signature - -```php -public function chat(): SignalWire\REST\CrudResource -``` - -#### Returns - -`SignalWire\REST\CrudResource` - -#### Source - -[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) - -Line 326. - -*** - -### compat - -Compatibility (Twilio-compatible LaML) API. - -Returns a `Compat` namespace object exposing the LAML sub-resources -(calls, messages, faxes, conferences, phoneNumbers, recordings, ...). - -#### Signature - -```php -public function compat(): SignalWire\REST\Namespaces\Compat -``` - -#### Returns - -`SignalWire\REST\Namespaces\Compat` - -#### Source - -[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) - -Line 191. - -*** - -### datasphere - -Datasphere documents (CRUD + chunks + search). - -#### Signature - -```php -public function datasphere(): SignalWire\REST\Namespaces\Datasphere -``` - -#### Returns - -`SignalWire\REST\Namespaces\Datasphere` - -#### Source - -[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) - -Line 165. - -*** - -### fabric - -Fabric API (sub-resources: subscribers, sip\_endpoints, call\_flows, ...). - -#### Signature - -```php -public function fabric(): SignalWire\REST\Namespaces\Fabric -``` - -#### Returns - -`SignalWire\REST\Namespaces\Fabric` - -#### Source - -[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) - -Line 138. - -*** - -### getBaseUrl - -#### Signature - -```php -public function getBaseUrl(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) - -Line 123. - -*** - -### getHttp - -#### Signature - -```php -public function getHttp(): SignalWire\REST\HttpClient -``` - -#### Returns - -`SignalWire\REST\HttpClient` - -#### Source - -[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) - -Line 128. - -*** - -### getProjectId - -#### Signature - -```php -public function getProjectId(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) - -Line 108. - -*** - -### getSpace - -#### Signature - -```php -public function getSpace(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) - -Line 118. - -*** - -### getToken - -#### Signature - -```php -public function getToken(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) - -Line 113. - -*** - -### importedNumbers - -Imported phone numbers (create only). - -#### Signature - -```php -public function importedNumbers(): SignalWire\REST\Namespaces\ImportedNumbers -``` - -#### Returns - -`SignalWire\REST\Namespaces\ImportedNumbers` - -#### Source - -[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) - -Line 272. - -*** - -### logs - -Logs (messages, voice, fax, conferences). - -#### Signature - -```php -public function logs(): SignalWire\REST\Namespaces\Logs -``` - -#### Returns - -`SignalWire\REST\Namespaces\Logs` - -#### Source - -[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) - -Line 299. - -*** - -### lookup - -Phone number lookup. - -#### Signature - -```php -public function lookup(): SignalWire\REST\CrudResource -``` - -#### Returns - -`SignalWire\REST\CrudResource` - -#### Source - -[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) - -Line 254. - -*** - -### mfa - -Multi-factor authentication (sms / call / verify). - -#### Signature - -```php -public function mfa(): SignalWire\REST\Namespaces\Mfa -``` - -#### Returns - -`SignalWire\REST\Namespaces\Mfa` - -#### Source - -[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) - -Line 281. - -*** - -### numberGroups - -Number groups (CRUD + membership operations). - -#### Signature - -```php -public function numberGroups(): SignalWire\REST\Namespaces\NumberGroups -``` - -#### Returns - -`SignalWire\REST\Namespaces\NumberGroups` - -#### Source - -[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) - -Line 227. - -*** - -### phoneNumbers - -Phone numbers. - -#### Signature - -```php -public function phoneNumbers(): SignalWire\REST\CrudResource -``` - -#### Returns - -`SignalWire\REST\CrudResource` - -#### Source - -[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) - -Line 156. - -*** - -### project - -Project management (project tokens). - -#### Signature - -```php -public function project(): SignalWire\REST\Namespaces\Project -``` - -#### Returns - -`SignalWire\REST\Namespaces\Project` - -#### Source - -[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) - -Line 308. - -*** - -### pubsub - -PubSub tokens. - -#### Signature - -```php -public function pubsub(): SignalWire\REST\CrudResource -``` - -#### Returns - -`SignalWire\REST\CrudResource` - -#### Source - -[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) - -Line 317. - -*** - -### queues - -Queues (CRUD + member operations). - -#### Signature - -```php -public function queues(): SignalWire\REST\Namespaces\Queues -``` - -#### Returns - -`SignalWire\REST\Namespaces\Queues` - -#### Source - -[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) - -Line 209. - -*** - -### recordings - -Recordings (list / get / delete only). - -#### Signature - -```php -public function recordings(): SignalWire\REST\Namespaces\Recordings -``` - -#### Returns - -`SignalWire\REST\Namespaces\Recordings` - -#### Source - -[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) - -Line 218. - -*** - -### registry - -Registry (10DLC brands, campaigns, orders, numbers). - -#### Signature - -```php -public function registry(): SignalWire\REST\Namespaces\Registry -``` - -#### Returns - -`SignalWire\REST\Namespaces\Registry` - -#### Source - -[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) - -Line 290. - -*** - -### shortCodes - -Short codes (list / get / update only). - -#### Signature - -```php -public function shortCodes(): SignalWire\REST\Namespaces\ShortCodes -``` - -#### Returns - -`SignalWire\REST\Namespaces\ShortCodes` - -#### Source - -[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) - -Line 263. - -*** - -### sipProfile - -SIP profile (singleton, get + update). - -#### Signature - -```php -public function sipProfile(): SignalWire\REST\Namespaces\SipProfile -``` - -#### Returns - -`SignalWire\REST\Namespaces\SipProfile` - -#### Source - -[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) - -Line 245. - -*** - -### verifiedCallers - -Verified callers. - -#### Signature - -```php -public function verifiedCallers(): SignalWire\REST\CrudResource -``` - -#### Returns - -`SignalWire\REST\CrudResource` - -#### Source - -[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) - -Line 236. - -*** - -### video - -Video API namespace (rooms, room\_sessions, room\_recordings, - -conferences, conference\_tokens, streams). - -#### Signature - -```php -public function video(): SignalWire\REST\Namespaces\Video -``` - -#### Returns - -`SignalWire\REST\Namespaces\Video` - -#### Source - -[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) - -Line 177. - -## Source - -[`SignalWire/REST/RestClient.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php) - -Line 31. diff --git a/fern/products/sdk-reference/php/signal-wire/rest/rest/signal-wire-rest-error/index.mdx b/fern/products/sdk-reference/php/signal-wire/rest/rest/signal-wire-rest-error/index.mdx deleted file mode 100644 index 0690d16ba0..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/rest/rest/signal-wire-rest-error/index.mdx +++ /dev/null @@ -1,123 +0,0 @@ ---- -slug: "/reference/php/signal-wire/rest/rest/signal-wire-rest-error" -title: "SignalWireRestError" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\REST\\SignalWireRestError" - parent: "SignalWire\\REST" - module: "SignalWire.REST" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/SignalWireRestError.php" ---- -# `SignalWireRestError` - -Exception thrown when a SignalWire REST API request fails with a non-2xx status. - -## Signature - -```php -class SignalWireRestError extends RuntimeException implements Throwable, Stringable -``` - -## Inheritance - -**Extends:** `RuntimeException` - -**Implements:** `Throwable`, `Stringable` - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct( - string $message, - int $statusCode = 0, - string $responseBody = '' -) -``` - -#### Parameters - - - - - - - -#### Source - -[`SignalWire/REST/SignalWireRestError.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/SignalWireRestError.php) - -Line 15. - -*** - -### \_\_toString - -#### Signature - -```php -public function __toString(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/REST/SignalWireRestError.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/SignalWireRestError.php) - -Line 33. - -*** - -### getResponseBody - -#### Signature - -```php -public function getResponseBody(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/REST/SignalWireRestError.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/SignalWireRestError.php) - -Line 28. - -*** - -### getStatusCode - -#### Signature - -```php -public function getStatusCode(): int -``` - -#### Returns - -`int` - -#### Source - -[`SignalWire/REST/SignalWireRestError.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/SignalWireRestError.php) - -Line 23. - -## Source - -[`SignalWire/REST/SignalWireRestError.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/SignalWireRestError.php) - -Line 10. diff --git a/fern/products/sdk-reference/php/signal-wire/security/security/index.mdx b/fern/products/sdk-reference/php/signal-wire/security/security/index.mdx deleted file mode 100644 index 320d8bf481..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/security/security/index.mdx +++ /dev/null @@ -1,33 +0,0 @@ ---- -slug: "/reference/php/signal-wire/security/security" -title: "Security" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "module" - language: "php" - qualified_name: "SignalWire\\Security" - module: "SignalWire.Security" ---- -# `Security` - -## Signature - -```php -namespace SignalWire\Security -``` - -## Classes - - - - - - Middleware that validates SignalWire webhook signatures before forwarding - - - - Webhook signature validation for SignalWire-signed HTTP requests. - - diff --git a/fern/products/sdk-reference/php/signal-wire/security/security/session-manager/index.mdx b/fern/products/sdk-reference/php/signal-wire/security/security/session-manager/index.mdx deleted file mode 100644 index a5bb51bd2a..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/security/security/session-manager/index.mdx +++ /dev/null @@ -1,249 +0,0 @@ ---- -slug: "/reference/php/signal-wire/security/security/session-manager" -title: "SessionManager" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\Security\\SessionManager" - parent: "SignalWire\\Security" - module: "SignalWire.Security" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Security/SessionManager.php" ---- -# `SessionManager` - -## Signature - -```php -class SessionManager -``` - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(int $tokenExpirySecs = 3600) -``` - -#### Parameters - - - Token lifetime in seconds (default 3600). - - -#### Throws - -- `RuntimeException` — If secure random bytes cannot be generated. - -#### Source - -[`SignalWire/Security/SessionManager.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Security/SessionManager.php) - -Line 19. - -*** - -### createSession - -Create or confirm a session, returning the call ID. - -#### Signature - -```php -public function createSession(?string $callId = NULL): string -``` - -#### Parameters - - - An existing call ID, or null to generate one. - - -#### Returns - -`string` — The call ID for this session. - -#### Source - -[`SignalWire/Security/SessionManager.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Security/SessionManager.php) - -Line 41. - -*** - -### createToolToken - -Alias for generateToken(). - -#### Signature - -```php -public function createToolToken(string $functionName, string $callId): string -``` - -#### Parameters - - - The function name to bind into the token. - - - - The call ID to bind into the token. - - -#### Returns - -`string` — A base64url-encoded token. - -#### Source - -[`SignalWire/Security/SessionManager.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Security/SessionManager.php) - -Line 79. - -*** - -### generateToken - -Generate an HMAC-SHA256 signed token for a given function and call. - -#### Signature - -```php -public function generateToken(string $functionName, string $callId): string -``` - -#### Parameters - - - The function name to bind into the token. - - - - The call ID to bind into the token. - - -#### Returns - -`string` — A base64url-encoded token. - -#### Source - -[`SignalWire/Security/SessionManager.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Security/SessionManager.php) - -Line 58. - -*** - -### getTokenExpirySecs - -Get the configured token expiry duration in seconds. - -#### Signature - -```php -public function getTokenExpirySecs(): int -``` - -#### Returns - -`int` — Token lifetime in seconds. - -#### Source - -[`SignalWire/Security/SessionManager.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Security/SessionManager.php) - -Line 154. - -*** - -### validateToken - -Validate a token against the expected call ID and function name. - -All comparisons use timing-safe equality checks to prevent side-channel attacks. - -#### Signature - -```php -public function validateToken( - string $callId, - string $functionName, - string $token -): bool -``` - -#### Parameters - - - The expected call ID. - - - - The expected function name. - - - - The base64url-encoded token to validate. - - -#### Returns - -`bool` — True if the token is valid and not expired. - -#### Source - -[`SignalWire/Security/SessionManager.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Security/SessionManager.php) - -Line 95. - -*** - -### validateToolToken - -Alias for validateToken() with reordered parameters. - -#### Signature - -```php -public function validateToolToken( - string $functionName, - string $token, - string $callId -): bool -``` - -#### Parameters - - - The expected function name. - - - - The base64url-encoded token to validate. - - - - The expected call ID. - - -#### Returns - -`bool` — True if the token is valid and not expired. - -#### Source - -[`SignalWire/Security/SessionManager.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Security/SessionManager.php) - -Line 144. - -## Source - -[`SignalWire/Security/SessionManager.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Security/SessionManager.php) - -Line 9. diff --git a/fern/products/sdk-reference/php/signal-wire/security/security/webhook-middleware/index.mdx b/fern/products/sdk-reference/php/signal-wire/security/security/webhook-middleware/index.mdx deleted file mode 100644 index 21c3faa910..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/security/security/webhook-middleware/index.mdx +++ /dev/null @@ -1,130 +0,0 @@ ---- -slug: "/reference/php/signal-wire/security/security/webhook-middleware" -title: "WebhookMiddleware" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\Security\\WebhookMiddleware" - parent: "SignalWire\\Security" - module: "SignalWire.Security" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Security/WebhookMiddleware.php" ---- -# `WebhookMiddleware` - -Middleware that validates SignalWire webhook signatures before forwarding - -the request to the next handler. - -The signalwire-php SDK does not use PSR-15 — it has its own internal -(method, path, headers, body) -> \[status, headers, body] handler shape. -This middleware mirrors that shape and is the canonical way to add -signature validation to any handleRequest pipeline. - -Usage: - -``` -$mw = new WebhookMiddleware($signingKey); -[$status, $headers, $body] = $mw->process( - $method, $url, $headers, $rawBody, - function ($method, $url, $headers, $rawBody) use ($svc) { - return $svc->handleRequest($method, parse_url($url, PHP_URL_PATH), $headers, $rawBody); - }, -); -``` - -Behaviour: - -- Reads X-SignalWire-Signature (or X-Twilio-Signature alias). -- On valid signature: forwards to $next, returns its result unchanged. -- On invalid signature: returns 403 Forbidden, never calls $next. -- On missing header: returns 403 Forbidden, never calls $next. -- Never logs / echoes the signing key, signature, or expected digest. - -**Modifiers:** `final` - -## Signature - -```php -final class WebhookMiddleware -``` - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(string $signingKey) -``` - -#### Parameters - - - -#### Source - -[`SignalWire/Security/WebhookMiddleware.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Security/WebhookMiddleware.php) - -Line 40. - -*** - -### process - -Run the middleware. On valid signature delegates to $next; on - -invalid / missing signature returns 403 directly. - -#### Signature - -```php -public function process( - string $method, - string $url, - array $headers, - string $rawBody, - callable $next -): array -``` - -#### Parameters - - - HTTP method. - - - - Full reconstructed URL the platform POSTed to (scheme + host + optional port + path + query). Caller is responsible for honouring proxy headers / SWML\_PROXY\_URL\_BASE before passing it in. - - - - Request headers (mixed case keys allowed). - - - - Raw request body bytes. - - - - Downstream handler. Signature: function(string $method, string $url, array $headers, string $rawBody): array - - -#### Returns - -`array` — \[status, headers, body]. - -#### Source - -[`SignalWire/Security/WebhookMiddleware.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Security/WebhookMiddleware.php) - -Line 66. - -## Source - -[`SignalWire/Security/WebhookMiddleware.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Security/WebhookMiddleware.php) - -Line 35. diff --git a/fern/products/sdk-reference/php/signal-wire/security/security/webhook-validator/index.mdx b/fern/products/sdk-reference/php/signal-wire/security/security/webhook-validator/index.mdx deleted file mode 100644 index 02cda0e5ee..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/security/security/webhook-validator/index.mdx +++ /dev/null @@ -1,154 +0,0 @@ ---- -slug: "/reference/php/signal-wire/security/security/webhook-validator" -title: "WebhookValidator" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\Security\\WebhookValidator" - parent: "SignalWire\\Security" - module: "SignalWire.Security" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Security/WebhookValidator.php" ---- -# `WebhookValidator` - -Webhook signature validation for SignalWire-signed HTTP requests. - -Implements both schemes from porting-sdk/webhooks.md: - -- Scheme A (RELAY/SWML/JSON): hex(HMAC-SHA1(key, url + rawBody)) -- Scheme B (Compat/cXML form): base64(HMAC-SHA1(key, url + sortedFormParams)) - with optional bodySHA256 query-param fallback for JSON-on-compat-surface. - -Public API: - -``` -WebhookValidator::validateWebhookSignature($key, $sig, $url, $rawBody): bool -WebhookValidator::validateRequest($key, $sig, $url, $paramsOrRawBody): bool -``` - -All comparisons use hash\_equals() (constant-time) so the secret is not -leaked across repeated requests. - -**Modifiers:** `final` - -## Signature - -```php -final class WebhookValidator -``` - -## Methods - -### validateRequest - -Legacy @signalwire/compatibility-api drop-in entry point. - -If $paramsOrRawBody is a string, delegates to validateWebhookSignature -(Scheme A then Scheme B with parsed form). If it is an array, treats -it as pre-parsed form params and runs Scheme B directly (with URL -port normalisation). - -**Modifiers:** `static` - -#### Signature - -```php -public static function validateRequest( - string $signingKey, - string $signature, - string $url, - mixed $paramsOrRawBody -): bool -``` - -#### Parameters - - - Customer's Signing Key. - - - - Header value. Empty returns false. - - - - Full URL SignalWire POSTed to. - - - - Raw body string OR pre-parsed form params (associative or list-of- \[key, value] pairs). - - -#### Returns - -`bool` — True on match, false otherwise. - -#### Throws - -- `InvalidArgumentException` — When $signingKey is missing or the 4th argument has an invalid type. - -#### Source - -[`SignalWire/Security/WebhookValidator.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Security/WebhookValidator.php) - -Line 118. - -*** - -### validateWebhookSignature - -Validate a SignalWire webhook signature against both schemes. - -**Modifiers:** `static` - -#### Signature - -```php -public static function validateWebhookSignature( - string $signingKey, - string $signature, - string $url, - string $rawBody -): bool -``` - -#### Parameters - - - Customer's Signing Key from the Dashboard. UTF-8 string, secret. Empty string raises InvalidArgumentException — that is a programming error, not a validation failure. - - - - The X-SignalWire-Signature header value (or X-Twilio-Signature for cXML compat). Empty / missing returns false without raising. - - - - The full URL SignalWire POSTed to (scheme, host, optional port, path, query). Must match what the platform saw — see the URL-reconstruction section of porting-sdk/webhooks.md. - - - - The raw request body bytes as a UTF-8 string, BEFORE any JSON / form parsing. Type-hinted string so a parsed array passed by mistake yields a TypeError. - - -#### Returns - -`bool` — True if the signature matches either Scheme A (hex JSON) or Scheme B (base64 form, with port-normalisation variants and optional bodySHA256 fallback). False otherwise. - -#### Throws - -- `InvalidArgumentException` — When $signingKey is missing. - -#### Source - -[`SignalWire/Security/WebhookValidator.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Security/WebhookValidator.php) - -Line 51. - -## Source - -[`SignalWire/Security/WebhookValidator.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Security/WebhookValidator.php) - -Line 26. diff --git a/fern/products/sdk-reference/php/signal-wire/server/server/agent-server/index.mdx b/fern/products/sdk-reference/php/signal-wire/server/server/agent-server/index.mdx deleted file mode 100644 index 89aa3650f4..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/server/server/agent-server/index.mdx +++ /dev/null @@ -1,477 +0,0 @@ ---- -slug: "/reference/php/signal-wire/server/server/agent-server" -title: "AgentServer" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\Server\\AgentServer" - parent: "SignalWire\\Server" - module: "SignalWire.Server" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php" ---- -# `AgentServer` - -## Signature - -```php -class AgentServer -``` - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct( - ?string $host = NULL, - ?int $port = NULL, - string $logLevel = 'info' -) -``` - -#### Parameters - - - - - - - -#### Source - -[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) - -Line 59. - -*** - -### getAgent - -Get an agent by route. - -#### Signature - -```php -public function getAgent(string $route): ?SignalWire\Agent\AgentBase -``` - -#### Parameters - - - -#### Returns - -`?SignalWire\Agent\AgentBase` - -#### Source - -[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) - -Line 119. - -*** - -### getAgents - -Get all registered routes (sorted). - -#### Signature - -```php -public function getAgents(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) - -Line 109. - -*** - -### getHost - -#### Signature - -```php -public function getHost(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) - -Line 424. - -*** - -### getPort - -#### Signature - -```php -public function getPort(): int -``` - -#### Returns - -`int` - -#### Source - -[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) - -Line 429. - -*** - -### getSipAutoMap - -#### Signature - -```php -public function getSipAutoMap(): bool -``` - -#### Returns - -`bool` - -#### Source - -[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) - -Line 178. - -*** - -### getSipRoute - -#### Signature - -```php -public function getSipRoute(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) - -Line 173. - -*** - -### getSipUsernameMapping - -Get the SIP username mapping. - -#### Signature - -```php -public function getSipUsernameMapping(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) - -Line 206. - -*** - -### handleRequest - -Handle an HTTP request and return \[status, headers, body]. - -#### Signature - -```php -public function handleRequest( - string $method, - string $path, - array $headers = array ( -), - ?string $body = NULL -): array -``` - -#### Parameters - - - - - - - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) - -Line 242. - -*** - -### isSipRoutingEnabled - -Check if SIP routing is enabled. - -#### Signature - -```php -public function isSipRoutingEnabled(): bool -``` - -#### Returns - -`bool` - -#### Source - -[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) - -Line 196. - -*** - -### register - -Register an agent at a route. - -#### Signature - -```php -public function register( - SignalWire\Agent\AgentBase $agent, - ?string $route = NULL -): SignalWire\Server\AgentServer -``` - -#### Parameters - - - - - -#### Returns - -`SignalWire\Server\AgentServer` - -#### Throws - -- `\RuntimeException` — If the route is already registered. - -#### Source - -[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) - -Line 79. - -*** - -### registerSipUsername - -Map a SIP username to a route. - -#### Signature - -```php -public function registerSipUsername( - string $username, - string $route -): SignalWire\Server\AgentServer -``` - -#### Parameters - - - - - -#### Returns - -`SignalWire\Server\AgentServer` - -#### Source - -[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) - -Line 186. - -*** - -### run - -Start the server (blocking). - -#### Signature - -```php -public function run(): void -``` - -#### Source - -[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) - -Line 296. - -*** - -### serve - -Start the server (blocking). - -Mirrors Python's AgentServer SSL handling: when `SWML_SSL_ENABLED` is -truthy and `SWML_SSL_CERT_PATH` / `SWML_SSL_KEY_PATH` point at a -readable cert + key, the server is served over verified HTTPS via a -Workerman SSL worker. Otherwise it falls back to PHP's built-in -(plaintext HTTP) server. - -#### Signature - -```php -public function serve(): void -``` - -#### Source - -[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) - -Line 310. - -*** - -### serveStatic - -Serve static files from a directory under a URL prefix. - -#### Signature - -```php -public function serveStatic( - string $directory, - string $urlPrefix -): SignalWire\Server\AgentServer -``` - -#### Parameters - - - - - -#### Returns - -`SignalWire\Server\AgentServer` - -#### Throws - -- `\RuntimeException` — If the directory does not exist. - -#### Source - -[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) - -Line 220. - -*** - -### setupSipRouting - -Set up central SIP-based routing for the server. - -Mirrors Python's AgentServer.setup\_sip\_routing(route, auto\_map). When -called with no args, defaults match Python: route="/sip", auto\_map=true. - -#### Signature - -```php -public function setupSipRouting( - string $route = '/sip', - bool $auto_map = true -): SignalWire\Server\AgentServer -``` - -#### Parameters - - - Path for SIP routing (default "/sip"). Leading slash is added if missing; trailing slash is stripped. - - - - If true, existing agents have their SIP usernames auto-derived from their route. - - -#### Returns - -`SignalWire\Server\AgentServer` - -#### Source - -[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) - -Line 141. - -*** - -### unregister - -Unregister an agent from a route. - -#### Signature - -```php -public function unregister(string $route): SignalWire\Server\AgentServer -``` - -#### Parameters - - - -#### Returns - -`SignalWire\Server\AgentServer` - -#### Source - -[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) - -Line 96. - -## Source - -[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) - -Line 10. diff --git a/fern/products/sdk-reference/php/signal-wire/server/server/index.mdx b/fern/products/sdk-reference/php/signal-wire/server/server/index.mdx deleted file mode 100644 index ab205999ce..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/server/server/index.mdx +++ /dev/null @@ -1,25 +0,0 @@ ---- -slug: "/reference/php/signal-wire/server/server" -title: "Server" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "module" - language: "php" - qualified_name: "SignalWire\\Server" - module: "SignalWire.Server" ---- -# `Server` - -## Signature - -```php -namespace SignalWire\Server -``` - -## Classes - - - - diff --git a/fern/products/sdk-reference/php/signal-wire/serverless/serverless/adapter/index.mdx b/fern/products/sdk-reference/php/signal-wire/serverless/serverless/adapter/index.mdx deleted file mode 100644 index 6938e5a13e..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/serverless/serverless/adapter/index.mdx +++ /dev/null @@ -1,259 +0,0 @@ ---- -slug: "/reference/php/signal-wire/serverless/serverless/adapter" -title: "Adapter" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\Serverless\\Adapter" - parent: "SignalWire\\Serverless" - module: "SignalWire.Serverless" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Serverless/Adapter.php" ---- -# `Adapter` - -Auto-detect and handle serverless environments (Lambda, GCF, Azure, CGI) - -or fall back to the built-in PHP server. - -## Signature - -```php -class Adapter -``` - -## Methods - -### detect - -Detect the current runtime environment. - -**Modifiers:** `static` - -#### Signature - -```php -public static function detect(): string -``` - -#### Returns - -`string` — One of 'lambda', 'gcf', 'azure', 'cgi', or 'server'. For a typed result, see \{@see detectMode()\}. - -#### Source - -[`SignalWire/Serverless/Adapter.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Serverless/Adapter.php) - -Line 19. - -*** - -### detectMode - -Detect the current runtime environment as a typed \{@see ExecutionMode\}. - -The typed counterpart to \{@see detect()\}: same detection logic and -precedence, but returns the enum (autocompletion, exhaustive `match`, -`->isServerless()`) instead of a bare string. `detectMode()->value` -equals `detect()`. - -**Modifiers:** `static` - -#### Signature - -```php -public static function detectMode(): SignalWire\Serverless\ExecutionMode -``` - -#### Returns - -`SignalWire\Serverless\ExecutionMode` - -#### Source - -[`SignalWire/Serverless/Adapter.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Serverless/Adapter.php) - -Line 32. - -*** - -### handleAzure - -Handle an Azure Functions invocation. - -Extracts method, path, headers, and body from the Azure request -array, calls agent->handleRequest(), and returns an Azure-compatible -response array. - -**Modifiers:** `static` - -#### Signature - -```php -public static function handleAzure(object $agent, array $request): array -``` - -#### Parameters - - - An AgentBase or Service instance with handleRequest(). - - - - The Azure Functions HTTP request array. - - -#### Returns - -`array` — Azure response format \{status, headers, body\}. - -#### Source - -[`SignalWire/Serverless/Adapter.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Serverless/Adapter.php) - -Line 141. - -*** - -### handleCgi - -Handle a CGI/FastCGI invocation. - -Reads REQUEST\_METHOD, PATH\_INFO, CONTENT\_TYPE from $_SERVER, -reads body from php://input, parses headers from HTTP_\* env vars, -and outputs the status line, headers, and body to stdout. - -**Modifiers:** `static` - -#### Signature - -```php -public static function handleCgi(object $agent): void -``` - -#### Parameters - - - An AgentBase or Service instance with handleRequest(). - - -#### Source - -[`SignalWire/Serverless/Adapter.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Serverless/Adapter.php) - -Line 171. - -*** - -### handleGcf - -Handle a Google Cloud Function invocation. - -Reads from php://input and $\_SERVER, calls agent->handleRequest(), -then outputs headers and body directly to the response stream. - -**Modifiers:** `static` - -#### Signature - -```php -public static function handleGcf(object $agent): void -``` - -#### Parameters - - - An AgentBase or Service instance with handleRequest(). - - -#### Source - -[`SignalWire/Serverless/Adapter.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Serverless/Adapter.php) - -Line 103. - -*** - -### handleLambda - -Handle an AWS Lambda (API Gateway) invocation. - -Extracts method, path, headers, and body from the API Gateway event -format, calls agent->handleRequest(), and returns an API Gateway -compatible response. - -**Modifiers:** `static` - -#### Signature - -```php -public static function handleLambda(object $agent, array $event, object $context): array -``` - -#### Parameters - - - An AgentBase or Service instance with handleRequest(). - - - - The API Gateway event payload. - - - - The Lambda context object. - - -#### Returns - -`array` — API Gateway response format \{statusCode, headers, body\}. - -#### Source - -[`SignalWire/Serverless/Adapter.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Serverless/Adapter.php) - -Line 65. - -*** - -### serve - -Auto-detect the runtime environment and serve the agent. - -For serverless environments, calls the appropriate handler. -For 'server', calls agent->run(). - -**Modifiers:** `static` - -#### Signature - -```php -public static function serve( - object $agent, - SignalWire\Serverless\ExecutionMode|string|null $mode = NULL -): void -``` - -#### Parameters - - - An AgentBase or Service instance. - - - - Optional explicit mode override. Pass an \{@see ExecutionMode\} (typed) or its backing string ('lambda'/'gcf'/'azure'/'cgi'/'server', for parity) to pin the dispatch instead of auto-detecting via \{@see detectMode()\}. An out-of-set string raises \ValueError. Defaults to null (auto-detect), preserving the original single-argument behaviour. - - -#### Source - -[`SignalWire/Serverless/Adapter.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Serverless/Adapter.php) - -Line 221. - -## Source - -[`SignalWire/Serverless/Adapter.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Serverless/Adapter.php) - -Line 11. diff --git a/fern/products/sdk-reference/php/signal-wire/serverless/serverless/index.mdx b/fern/products/sdk-reference/php/signal-wire/serverless/serverless/index.mdx deleted file mode 100644 index c74893b7cf..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/serverless/serverless/index.mdx +++ /dev/null @@ -1,247 +0,0 @@ ---- -slug: "/reference/php/signal-wire/serverless/serverless" -title: "Serverless" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "module" - language: "php" - qualified_name: "SignalWire\\Serverless" - module: "SignalWire.Serverless" ---- -# `Serverless` - -## Signature - -```php -namespace SignalWire\Serverless -``` - -## Classes - - - - Auto-detect and handle serverless environments (Lambda, GCF, Azure, CGI) - - - -## Enums - -### ExecutionMode - -The runtime environment \{@see Adapter\} detects, as a typed, backed enum. - -The five members are exactly the modes \{@see Adapter::detect()\} can return -(`lambda`, `gcf`, `azure`, `cgi`, `server`). The backing string of each case -IS that wire/dispatch token, so the enum and the legacy bare string are -interchangeable: - -``` -Adapter::detect(); // 'lambda' (string, parity) -Adapter::detectMode(); // ExecutionMode::Lambda (typed) -Adapter::detectMode()->value; // 'lambda' (round-trips) -ExecutionMode::from(Adapter::detect()); // ExecutionMode::Lambda -``` - -\{@see Adapter::serve()\} accepts an explicit `ExecutionMode|string|null` -override alongside auto-detection, so callers may pin the mode in a typed, -typo-checked way while the bare string still works for parity with the -stringly-typed original. - -This closed set is knowable from `Adapter::detect()`'s own implementation, so -per the idiom philosophy (knowable → type it) it is modelled as a native enum -_alongside_ the string rather than left as a magic-string literal. It is a PHP -PORT\_ADDITION — the Python reference has no equivalent (its serverless -handling lives in the broader `cli.simulation.mock_env` machinery). - -NOTE: this is the \{@see Adapter\} platform-detection vocabulary ONLY. It is -deliberately NOT unified with \{@see \SignalWire\Logging\LoggingConfig\}'s -execution-mode set (`cgi`/`lambda`/`google_cloud_function`/`azure_function`/ -`server`), which mirrors Python's `get_execution_mode` and uses different, -longer tokens. The two vocabularies must not be merged. - -#### Signature - -```php -final enum ExecutionMode implements UnitEnum, BackedEnum -``` - -#### Inheritance - -**Implements:** `UnitEnum`, `BackedEnum` - -#### Properties - - - - - -#### Constants - - - Azure Functions. - - - - CGI / FastCGI. - - - - Google Cloud Functions / Cloud Run. - - - - AWS Lambda (API Gateway / Lambda Function URL). - - - - The built-in PHP server (the default, non-serverless mode). - - -#### Variants - - - Azure Functions. - - - - CGI / FastCGI. - - - - Google Cloud Functions / Cloud Run. - - - - AWS Lambda (API Gateway / Lambda Function URL). - - - - The built-in PHP server (the default, non-serverless mode). - - -#### Methods - -##### cases - -**Modifiers:** `static` - -###### Signature - -```php -public static function cases(): array -``` - -###### Returns - -`array` - -*** - -##### coerce - -Coerce a mode given as either this enum or its backing string into the - -enum, validating the string against the closed set. - -Accepting `ExecutionMode|string` lets the public API take the typed enum -for safety while preserving the bare-string call style for parity. - -**Modifiers:** `static` - -###### Signature - -```php -public static function coerce( - SignalWire\Serverless\ExecutionMode|string $mode -): SignalWire\Serverless\ExecutionMode -``` - -###### Parameters - - - -###### Returns - -`SignalWire\Serverless\ExecutionMode` - -###### Throws - -- `\ValueError` — if $mode is a string outside the closed set. - -###### Source - -[`SignalWire/Serverless/ExecutionMode.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Serverless/ExecutionMode.php) - -Line 72. - -*** - -##### from - -**Modifiers:** `static` - -###### Signature - -```php -public static function from(string|int $value): static -``` - -###### Parameters - - - -###### Returns - -`static` - -*** - -##### isServerless - -True for every serverless invocation mode — anything other than the - -built-in \{@see ExecutionMode::Server\}. - -###### Signature - -```php -public function isServerless(): bool -``` - -###### Returns - -`bool` - -###### Source - -[`SignalWire/Serverless/ExecutionMode.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Serverless/ExecutionMode.php) - -Line 58. - -*** - -##### tryFrom - -**Modifiers:** `static` - -###### Signature - -```php -public static function tryFrom(string|int $value): ?static -``` - -###### Parameters - - - -###### Returns - -`?static` - -#### Source - -[`SignalWire/Serverless/ExecutionMode.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Serverless/ExecutionMode.php) - -Line 37. diff --git a/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/api-ninjas-trivia/index.mdx b/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/api-ninjas-trivia/index.mdx deleted file mode 100644 index d523a8b9c2..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/api-ninjas-trivia/index.mdx +++ /dev/null @@ -1,331 +0,0 @@ ---- -slug: "/reference/php/signal-wire/skills/builtin/builtin/api-ninjas-trivia" -title: "ApiNinjasTrivia" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\Skills\\Builtin\\ApiNinjasTrivia" - parent: "SignalWire\\Skills\\Builtin" - module: "SignalWire.Skills.Builtin" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/ApiNinjasTrivia.php" ---- -# `ApiNinjasTrivia` - -## Signature - -```php -class ApiNinjasTrivia extends SkillBase -``` - -## Inheritance - -**Extends:** [SignalWire\Skills\SkillBase](/docs/sdk-reference/reference/php/signal-wire/skills/skills/skill-base) - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(object $agent, array $params = array ( -)) -``` - -#### Parameters - - - - - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 13. - -*** - -### cleanup - -#### Signature - -```php -public function cleanup(): void -``` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 62. - -*** - -### getDescription - -#### Signature - -```php -public function getDescription(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/Builtin/ApiNinjasTrivia.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/ApiNinjasTrivia.php) - -Line 34. - -*** - -### getGlobalData - -#### Signature - -```php -public function getGlobalData(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 48. - -*** - -### getHints - -#### Signature - -```php -public function getHints(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 43. - -*** - -### getInstanceKey - -#### Signature - -```php -public function getInstanceKey(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 89. - -*** - -### getName - -#### Signature - -```php -public function getName(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/Builtin/ApiNinjasTrivia.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/ApiNinjasTrivia.php) - -Line 29. - -*** - -### getParameterSchema - -#### Signature - -```php -public function getParameterSchema(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 66. - -*** - -### getPromptSections - -#### Signature - -```php -public function getPromptSections(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 53. - -*** - -### getRequiredEnvVars - -#### Signature - -```php -public function getRequiredEnvVars(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 33. - -*** - -### getVersion - -#### Signature - -```php -public function getVersion(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 28. - -*** - -### registerTools - -#### Signature - -```php -public function registerTools(): void -``` - -#### Source - -[`SignalWire/Skills/Builtin/ApiNinjasTrivia.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/ApiNinjasTrivia.php) - -Line 53. - -*** - -### setup - -#### Signature - -```php -public function setup(): bool -``` - -#### Returns - -`bool` - -#### Source - -[`SignalWire/Skills/Builtin/ApiNinjasTrivia.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/ApiNinjasTrivia.php) - -Line 44. - -*** - -### supportsMultipleInstances - -#### Signature - -```php -public function supportsMultipleInstances(): bool -``` - -#### Returns - -`bool` - -#### Source - -[`SignalWire/Skills/Builtin/ApiNinjasTrivia.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/ApiNinjasTrivia.php) - -Line 39. - -*** - -### validateEnvVars - -#### Signature - -```php -public function validateEnvVars(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 100. - -## Source - -[`SignalWire/Skills/Builtin/ApiNinjasTrivia.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/ApiNinjasTrivia.php) - -Line 10. diff --git a/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/claude-skills/index.mdx b/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/claude-skills/index.mdx deleted file mode 100644 index 314c4702b8..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/claude-skills/index.mdx +++ /dev/null @@ -1,365 +0,0 @@ ---- -slug: "/reference/php/signal-wire/skills/builtin/builtin/claude-skills" -title: "ClaudeSkills" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\Skills\\Builtin\\ClaudeSkills" - parent: "SignalWire\\Skills\\Builtin" - module: "SignalWire.Skills.Builtin" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/ClaudeSkills.php" ---- -# `ClaudeSkills` - -Claude Skills loader. - -Mirrors signalwire-python's -`signalwire.skills.claude_skills.skill.ClaudeSkillsSkill`: - -- Walks `skills_path` for `/SKILL.md` files. -- Parses YAML frontmatter (name, description, argument-hint, - disable-model-invocation, user-invocable). -- Discovers companion `*.md` files inside each skill dir as - selectable sections. -- Registers one SWAIG tool per loadable skill with a `(arguments, - section)` parameter pair, where `section` enums over the - discovered companion docs. -- When invoked, returns the SKILL.md body (or the requested - section), with `$ARGUMENTS`, `$ARGUMENTS[N]`, `$N`, - `${CLAUDE_SKILL_DIR}` and `${CLAUDE_SESSION_ID}` substituted. - -Two deliberate omissions vs Python (each documented in -PORT\_OMISSIONS.md): - -- `allow_shell_injection`: Python preprocesses `!`cmd\`\` patterns - by shelling out. PHP prefers not to ship a hot path that - subprocess() any user-controlled string by default — Python - itself defaults this off too. The flag is accepted but the - processor is a no-op (the pattern is left in place); set - `allow_shell_injection=false` (the default) and the behavior - matches Python. -- YAML frontmatter parser: PHP has no first-class YAML in - core. Implemented a small tolerant subset that handles the - forms Claude Code itself emits (string scalars, bool, list of - strings on continuation lines). Skill files using deeply - nested YAML constructs aren't supported and will hit a - graceful "frontmatter parse failed" warning at load. - -## Signature - -```php -class ClaudeSkills extends SkillBase -``` - -## Inheritance - -**Extends:** [SignalWire\Skills\SkillBase](/docs/sdk-reference/reference/php/signal-wire/skills/skills/skill-base) - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(object $agent, array $params = array ( -)) -``` - -#### Parameters - - - - - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 13. - -*** - -### cleanup - -#### Signature - -```php -public function cleanup(): void -``` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 62. - -*** - -### getDescription - -#### Signature - -```php -public function getDescription(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/Builtin/ClaudeSkills.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/ClaudeSkills.php) - -Line 64. - -*** - -### getGlobalData - -#### Signature - -```php -public function getGlobalData(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 48. - -*** - -### getHints - -#### Signature - -```php -public function getHints(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/Builtin/ClaudeSkills.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/ClaudeSkills.php) - -Line 502. - -*** - -### getInstanceKey - -#### Signature - -```php -public function getInstanceKey(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 89. - -*** - -### getName - -#### Signature - -```php -public function getName(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/Builtin/ClaudeSkills.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/ClaudeSkills.php) - -Line 59. - -*** - -### getParameterSchema - -#### Signature - -```php -public function getParameterSchema(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 66. - -*** - -### getPromptSections - -#### Signature - -```php -public function getPromptSections(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/Builtin/ClaudeSkills.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/ClaudeSkills.php) - -Line 520. - -*** - -### getRequiredEnvVars - -#### Signature - -```php -public function getRequiredEnvVars(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 33. - -*** - -### getVersion - -#### Signature - -```php -public function getVersion(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 28. - -*** - -### registerTools - -#### Signature - -```php -public function registerTools(): void -``` - -#### Source - -[`SignalWire/Skills/Builtin/ClaudeSkills.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/ClaudeSkills.php) - -Line 108. - -*** - -### setup - -#### Signature - -```php -public function setup(): bool -``` - -#### Returns - -`bool` - -#### Source - -[`SignalWire/Skills/Builtin/ClaudeSkills.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/ClaudeSkills.php) - -Line 74. - -*** - -### supportsMultipleInstances - -#### Signature - -```php -public function supportsMultipleInstances(): bool -``` - -#### Returns - -`bool` - -#### Source - -[`SignalWire/Skills/Builtin/ClaudeSkills.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/ClaudeSkills.php) - -Line 69. - -*** - -### validateEnvVars - -#### Signature - -```php -public function validateEnvVars(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 100. - -## Source - -[`SignalWire/Skills/Builtin/ClaudeSkills.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/ClaudeSkills.php) - -Line 45. diff --git a/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/custom-skills/index.mdx b/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/custom-skills/index.mdx deleted file mode 100644 index 8f1d9c488c..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/custom-skills/index.mdx +++ /dev/null @@ -1,331 +0,0 @@ ---- -slug: "/reference/php/signal-wire/skills/builtin/builtin/custom-skills" -title: "CustomSkills" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\Skills\\Builtin\\CustomSkills" - parent: "SignalWire\\Skills\\Builtin" - module: "SignalWire.Skills.Builtin" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/CustomSkills.php" ---- -# `CustomSkills` - -## Signature - -```php -class CustomSkills extends SkillBase -``` - -## Inheritance - -**Extends:** [SignalWire\Skills\SkillBase](/docs/sdk-reference/reference/php/signal-wire/skills/skills/skill-base) - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(object $agent, array $params = array ( -)) -``` - -#### Parameters - - - - - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 13. - -*** - -### cleanup - -#### Signature - -```php -public function cleanup(): void -``` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 62. - -*** - -### getDescription - -#### Signature - -```php -public function getDescription(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/Builtin/CustomSkills.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/CustomSkills.php) - -Line 17. - -*** - -### getGlobalData - -#### Signature - -```php -public function getGlobalData(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 48. - -*** - -### getHints - -#### Signature - -```php -public function getHints(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 43. - -*** - -### getInstanceKey - -#### Signature - -```php -public function getInstanceKey(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 89. - -*** - -### getName - -#### Signature - -```php -public function getName(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/Builtin/CustomSkills.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/CustomSkills.php) - -Line 12. - -*** - -### getParameterSchema - -#### Signature - -```php -public function getParameterSchema(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 66. - -*** - -### getPromptSections - -#### Signature - -```php -public function getPromptSections(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 53. - -*** - -### getRequiredEnvVars - -#### Signature - -```php -public function getRequiredEnvVars(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 33. - -*** - -### getVersion - -#### Signature - -```php -public function getVersion(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 28. - -*** - -### registerTools - -#### Signature - -```php -public function registerTools(): void -``` - -#### Source - -[`SignalWire/Skills/Builtin/CustomSkills.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/CustomSkills.php) - -Line 32. - -*** - -### setup - -#### Signature - -```php -public function setup(): bool -``` - -#### Returns - -`bool` - -#### Source - -[`SignalWire/Skills/Builtin/CustomSkills.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/CustomSkills.php) - -Line 27. - -*** - -### supportsMultipleInstances - -#### Signature - -```php -public function supportsMultipleInstances(): bool -``` - -#### Returns - -`bool` - -#### Source - -[`SignalWire/Skills/Builtin/CustomSkills.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/CustomSkills.php) - -Line 22. - -*** - -### validateEnvVars - -#### Signature - -```php -public function validateEnvVars(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 100. - -## Source - -[`SignalWire/Skills/Builtin/CustomSkills.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/CustomSkills.php) - -Line 10. diff --git a/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/datasphere-serverless/index.mdx b/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/datasphere-serverless/index.mdx deleted file mode 100644 index 8d563dda4d..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/datasphere-serverless/index.mdx +++ /dev/null @@ -1,331 +0,0 @@ ---- -slug: "/reference/php/signal-wire/skills/builtin/builtin/datasphere-serverless" -title: "DatasphereServerless" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\Skills\\Builtin\\DatasphereServerless" - parent: "SignalWire\\Skills\\Builtin" - module: "SignalWire.Skills.Builtin" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/DatasphereServerless.php" ---- -# `DatasphereServerless` - -## Signature - -```php -class DatasphereServerless extends SkillBase -``` - -## Inheritance - -**Extends:** [SignalWire\Skills\SkillBase](/docs/sdk-reference/reference/php/signal-wire/skills/skills/skill-base) - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(object $agent, array $params = array ( -)) -``` - -#### Parameters - - - - - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 13. - -*** - -### cleanup - -#### Signature - -```php -public function cleanup(): void -``` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 62. - -*** - -### getDescription - -#### Signature - -```php -public function getDescription(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/Builtin/DatasphereServerless.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/DatasphereServerless.php) - -Line 17. - -*** - -### getGlobalData - -#### Signature - -```php -public function getGlobalData(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/Builtin/DatasphereServerless.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/DatasphereServerless.php) - -Line 116. - -*** - -### getHints - -#### Signature - -```php -public function getHints(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 43. - -*** - -### getInstanceKey - -#### Signature - -```php -public function getInstanceKey(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 89. - -*** - -### getName - -#### Signature - -```php -public function getName(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/Builtin/DatasphereServerless.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/DatasphereServerless.php) - -Line 12. - -*** - -### getParameterSchema - -#### Signature - -```php -public function getParameterSchema(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 66. - -*** - -### getPromptSections - -#### Signature - -```php -public function getPromptSections(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/Builtin/DatasphereServerless.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/DatasphereServerless.php) - -Line 125. - -*** - -### getRequiredEnvVars - -#### Signature - -```php -public function getRequiredEnvVars(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 33. - -*** - -### getVersion - -#### Signature - -```php -public function getVersion(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 28. - -*** - -### registerTools - -#### Signature - -```php -public function registerTools(): void -``` - -#### Source - -[`SignalWire/Skills/Builtin/DatasphereServerless.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/DatasphereServerless.php) - -Line 40. - -*** - -### setup - -#### Signature - -```php -public function setup(): bool -``` - -#### Returns - -`bool` - -#### Source - -[`SignalWire/Skills/Builtin/DatasphereServerless.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/DatasphereServerless.php) - -Line 27. - -*** - -### supportsMultipleInstances - -#### Signature - -```php -public function supportsMultipleInstances(): bool -``` - -#### Returns - -`bool` - -#### Source - -[`SignalWire/Skills/Builtin/DatasphereServerless.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/DatasphereServerless.php) - -Line 22. - -*** - -### validateEnvVars - -#### Signature - -```php -public function validateEnvVars(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 100. - -## Source - -[`SignalWire/Skills/Builtin/DatasphereServerless.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/DatasphereServerless.php) - -Line 10. diff --git a/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/datasphere/index.mdx b/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/datasphere/index.mdx deleted file mode 100644 index eaf245bf47..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/datasphere/index.mdx +++ /dev/null @@ -1,346 +0,0 @@ ---- -slug: "/reference/php/signal-wire/skills/builtin/builtin/datasphere" -title: "Datasphere" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\Skills\\Builtin\\Datasphere" - parent: "SignalWire\\Skills\\Builtin" - module: "SignalWire.Skills.Builtin" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Datasphere.php" ---- -# `Datasphere` - -SignalWire DataSphere knowledge-search skill. - -Mirrors signalwire-python's -`signalwire.skills.datasphere.skill.DataSphereSkill._search_knowledge_handler`: - -POST https://\{space\_name\}.signalwire.com/api/datasphere/documents/search -Auth: Basic project\_id:token -Body: \{ document\_id, query\_string, distance, count, \[tags, language, ...] \} - -The response carries `chunks: [{text, score, ...}]` (NOT `results`). -The handler stringifies the chunks the same way the Python skill does. - -Upstream URL override: `DATASPHERE_BASE_URL` for the audit fixture. -The path `/api/datasphere/documents/search` is preserved. - -## Signature - -```php -class Datasphere extends SkillBase -``` - -## Inheritance - -**Extends:** [SignalWire\Skills\SkillBase](/docs/sdk-reference/reference/php/signal-wire/skills/skills/skill-base) - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(object $agent, array $params = array ( -)) -``` - -#### Parameters - - - - - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 13. - -*** - -### cleanup - -#### Signature - -```php -public function cleanup(): void -``` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 62. - -*** - -### getDescription - -#### Signature - -```php -public function getDescription(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/Builtin/Datasphere.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Datasphere.php) - -Line 37. - -*** - -### getGlobalData - -#### Signature - -```php -public function getGlobalData(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/Builtin/Datasphere.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Datasphere.php) - -Line 202. - -*** - -### getHints - -#### Signature - -```php -public function getHints(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 43. - -*** - -### getInstanceKey - -#### Signature - -```php -public function getInstanceKey(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 89. - -*** - -### getName - -#### Signature - -```php -public function getName(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/Builtin/Datasphere.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Datasphere.php) - -Line 32. - -*** - -### getParameterSchema - -#### Signature - -```php -public function getParameterSchema(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 66. - -*** - -### getPromptSections - -#### Signature - -```php -public function getPromptSections(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/Builtin/Datasphere.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Datasphere.php) - -Line 211. - -*** - -### getRequiredEnvVars - -#### Signature - -```php -public function getRequiredEnvVars(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 33. - -*** - -### getVersion - -#### Signature - -```php -public function getVersion(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 28. - -*** - -### registerTools - -#### Signature - -```php -public function registerTools(): void -``` - -#### Source - -[`SignalWire/Skills/Builtin/Datasphere.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Datasphere.php) - -Line 58. - -*** - -### setup - -#### Signature - -```php -public function setup(): bool -``` - -#### Returns - -`bool` - -#### Source - -[`SignalWire/Skills/Builtin/Datasphere.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Datasphere.php) - -Line 47. - -*** - -### supportsMultipleInstances - -#### Signature - -```php -public function supportsMultipleInstances(): bool -``` - -#### Returns - -`bool` - -#### Source - -[`SignalWire/Skills/Builtin/Datasphere.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Datasphere.php) - -Line 42. - -*** - -### validateEnvVars - -#### Signature - -```php -public function validateEnvVars(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 100. - -## Source - -[`SignalWire/Skills/Builtin/Datasphere.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Datasphere.php) - -Line 27. diff --git a/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/datetime/index.mdx b/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/datetime/index.mdx deleted file mode 100644 index 8cd28a0f2d..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/datetime/index.mdx +++ /dev/null @@ -1,331 +0,0 @@ ---- -slug: "/reference/php/signal-wire/skills/builtin/builtin/datetime" -title: "Datetime" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\Skills\\Builtin\\Datetime" - parent: "SignalWire\\Skills\\Builtin" - module: "SignalWire.Skills.Builtin" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Datetime.php" ---- -# `Datetime` - -## Signature - -```php -class Datetime extends SkillBase -``` - -## Inheritance - -**Extends:** [SignalWire\Skills\SkillBase](/docs/sdk-reference/reference/php/signal-wire/skills/skills/skill-base) - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(object $agent, array $params = array ( -)) -``` - -#### Parameters - - - - - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 13. - -*** - -### cleanup - -#### Signature - -```php -public function cleanup(): void -``` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 62. - -*** - -### getDescription - -#### Signature - -```php -public function getDescription(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/Builtin/Datetime.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Datetime.php) - -Line 17. - -*** - -### getGlobalData - -#### Signature - -```php -public function getGlobalData(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 48. - -*** - -### getHints - -#### Signature - -```php -public function getHints(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 43. - -*** - -### getInstanceKey - -#### Signature - -```php -public function getInstanceKey(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 89. - -*** - -### getName - -#### Signature - -```php -public function getName(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/Builtin/Datetime.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Datetime.php) - -Line 12. - -*** - -### getParameterSchema - -#### Signature - -```php -public function getParameterSchema(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 66. - -*** - -### getPromptSections - -#### Signature - -```php -public function getPromptSections(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/Builtin/Datetime.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Datetime.php) - -Line 84. - -*** - -### getRequiredEnvVars - -#### Signature - -```php -public function getRequiredEnvVars(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 33. - -*** - -### getVersion - -#### Signature - -```php -public function getVersion(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 28. - -*** - -### registerTools - -#### Signature - -```php -public function registerTools(): void -``` - -#### Source - -[`SignalWire/Skills/Builtin/Datetime.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Datetime.php) - -Line 27. - -*** - -### setup - -#### Signature - -```php -public function setup(): bool -``` - -#### Returns - -`bool` - -#### Source - -[`SignalWire/Skills/Builtin/Datetime.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Datetime.php) - -Line 22. - -*** - -### supportsMultipleInstances - -#### Signature - -```php -public function supportsMultipleInstances(): bool -``` - -#### Returns - -`bool` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 38. - -*** - -### validateEnvVars - -#### Signature - -```php -public function validateEnvVars(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 100. - -## Source - -[`SignalWire/Skills/Builtin/Datetime.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Datetime.php) - -Line 10. diff --git a/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/google-maps/index.mdx b/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/google-maps/index.mdx deleted file mode 100644 index 27df099b4c..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/google-maps/index.mdx +++ /dev/null @@ -1,331 +0,0 @@ ---- -slug: "/reference/php/signal-wire/skills/builtin/builtin/google-maps" -title: "GoogleMaps" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\Skills\\Builtin\\GoogleMaps" - parent: "SignalWire\\Skills\\Builtin" - module: "SignalWire.Skills.Builtin" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/GoogleMaps.php" ---- -# `GoogleMaps` - -## Signature - -```php -class GoogleMaps extends SkillBase -``` - -## Inheritance - -**Extends:** [SignalWire\Skills\SkillBase](/docs/sdk-reference/reference/php/signal-wire/skills/skills/skill-base) - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(object $agent, array $params = array ( -)) -``` - -#### Parameters - - - - - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 13. - -*** - -### cleanup - -#### Signature - -```php -public function cleanup(): void -``` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 62. - -*** - -### getDescription - -#### Signature - -```php -public function getDescription(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/Builtin/GoogleMaps.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/GoogleMaps.php) - -Line 17. - -*** - -### getGlobalData - -#### Signature - -```php -public function getGlobalData(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 48. - -*** - -### getHints - -#### Signature - -```php -public function getHints(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/Builtin/GoogleMaps.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/GoogleMaps.php) - -Line 157. - -*** - -### getInstanceKey - -#### Signature - -```php -public function getInstanceKey(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 89. - -*** - -### getName - -#### Signature - -```php -public function getName(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/Builtin/GoogleMaps.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/GoogleMaps.php) - -Line 12. - -*** - -### getParameterSchema - -#### Signature - -```php -public function getParameterSchema(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 66. - -*** - -### getPromptSections - -#### Signature - -```php -public function getPromptSections(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/Builtin/GoogleMaps.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/GoogleMaps.php) - -Line 162. - -*** - -### getRequiredEnvVars - -#### Signature - -```php -public function getRequiredEnvVars(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 33. - -*** - -### getVersion - -#### Signature - -```php -public function getVersion(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 28. - -*** - -### registerTools - -#### Signature - -```php -public function registerTools(): void -``` - -#### Source - -[`SignalWire/Skills/Builtin/GoogleMaps.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/GoogleMaps.php) - -Line 31. - -*** - -### setup - -#### Signature - -```php -public function setup(): bool -``` - -#### Returns - -`bool` - -#### Source - -[`SignalWire/Skills/Builtin/GoogleMaps.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/GoogleMaps.php) - -Line 22. - -*** - -### supportsMultipleInstances - -#### Signature - -```php -public function supportsMultipleInstances(): bool -``` - -#### Returns - -`bool` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 38. - -*** - -### validateEnvVars - -#### Signature - -```php -public function validateEnvVars(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 100. - -## Source - -[`SignalWire/Skills/Builtin/GoogleMaps.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/GoogleMaps.php) - -Line 10. diff --git a/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/index.mdx b/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/index.mdx deleted file mode 100644 index 53bc966867..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/index.mdx +++ /dev/null @@ -1,73 +0,0 @@ ---- -slug: "/reference/php/signal-wire/skills/builtin/builtin" -title: "Builtin" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "module" - language: "php" - qualified_name: "SignalWire\\Skills\\Builtin" - module: "SignalWire.Skills.Builtin" ---- -# `Builtin` - -## Signature - -```php -namespace SignalWire\Skills\Builtin -``` - -## Classes - - - - - - Claude Skills loader. - - - - - - SignalWire DataSphere knowledge-search skill. - - - - - - - - - - - - - - - - MCP Gateway skill. - - - - Native vector search skill — network/remote mode only. - - - - - - Spider scraping skill. - - - - - - - - Web search skill backed by Google Custom Search. - - - - Wikipedia search skill backed by the public MediaWiki action API. - - diff --git a/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/info-gatherer/index.mdx b/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/info-gatherer/index.mdx deleted file mode 100644 index 60811195f3..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/info-gatherer/index.mdx +++ /dev/null @@ -1,331 +0,0 @@ ---- -slug: "/reference/php/signal-wire/skills/builtin/builtin/info-gatherer" -title: "InfoGatherer" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\Skills\\Builtin\\InfoGatherer" - parent: "SignalWire\\Skills\\Builtin" - module: "SignalWire.Skills.Builtin" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/InfoGatherer.php" ---- -# `InfoGatherer` - -## Signature - -```php -class InfoGatherer extends SkillBase -``` - -## Inheritance - -**Extends:** [SignalWire\Skills\SkillBase](/docs/sdk-reference/reference/php/signal-wire/skills/skills/skill-base) - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(object $agent, array $params = array ( -)) -``` - -#### Parameters - - - - - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 13. - -*** - -### cleanup - -#### Signature - -```php -public function cleanup(): void -``` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 62. - -*** - -### getDescription - -#### Signature - -```php -public function getDescription(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/Builtin/InfoGatherer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/InfoGatherer.php) - -Line 17. - -*** - -### getGlobalData - -#### Signature - -```php -public function getGlobalData(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/Builtin/InfoGatherer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/InfoGatherer.php) - -Line 156. - -*** - -### getHints - -#### Signature - -```php -public function getHints(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 43. - -*** - -### getInstanceKey - -#### Signature - -```php -public function getInstanceKey(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 89. - -*** - -### getName - -#### Signature - -```php -public function getName(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/Builtin/InfoGatherer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/InfoGatherer.php) - -Line 12. - -*** - -### getParameterSchema - -#### Signature - -```php -public function getParameterSchema(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 66. - -*** - -### getPromptSections - -#### Signature - -```php -public function getPromptSections(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/Builtin/InfoGatherer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/InfoGatherer.php) - -Line 170. - -*** - -### getRequiredEnvVars - -#### Signature - -```php -public function getRequiredEnvVars(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 33. - -*** - -### getVersion - -#### Signature - -```php -public function getVersion(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 28. - -*** - -### registerTools - -#### Signature - -```php -public function registerTools(): void -``` - -#### Source - -[`SignalWire/Skills/Builtin/InfoGatherer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/InfoGatherer.php) - -Line 36. - -*** - -### setup - -#### Signature - -```php -public function setup(): bool -``` - -#### Returns - -`bool` - -#### Source - -[`SignalWire/Skills/Builtin/InfoGatherer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/InfoGatherer.php) - -Line 27. - -*** - -### supportsMultipleInstances - -#### Signature - -```php -public function supportsMultipleInstances(): bool -``` - -#### Returns - -`bool` - -#### Source - -[`SignalWire/Skills/Builtin/InfoGatherer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/InfoGatherer.php) - -Line 22. - -*** - -### validateEnvVars - -#### Signature - -```php -public function validateEnvVars(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 100. - -## Source - -[`SignalWire/Skills/Builtin/InfoGatherer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/InfoGatherer.php) - -Line 10. diff --git a/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/joke/index.mdx b/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/joke/index.mdx deleted file mode 100644 index d16cdcce6b..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/joke/index.mdx +++ /dev/null @@ -1,331 +0,0 @@ ---- -slug: "/reference/php/signal-wire/skills/builtin/builtin/joke" -title: "Joke" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\Skills\\Builtin\\Joke" - parent: "SignalWire\\Skills\\Builtin" - module: "SignalWire.Skills.Builtin" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Joke.php" ---- -# `Joke` - -## Signature - -```php -class Joke extends SkillBase -``` - -## Inheritance - -**Extends:** [SignalWire\Skills\SkillBase](/docs/sdk-reference/reference/php/signal-wire/skills/skills/skill-base) - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(object $agent, array $params = array ( -)) -``` - -#### Parameters - - - - - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 13. - -*** - -### cleanup - -#### Signature - -```php -public function cleanup(): void -``` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 62. - -*** - -### getDescription - -#### Signature - -```php -public function getDescription(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/Builtin/Joke.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Joke.php) - -Line 17. - -*** - -### getGlobalData - -#### Signature - -```php -public function getGlobalData(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/Builtin/Joke.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Joke.php) - -Line 78. - -*** - -### getHints - -#### Signature - -```php -public function getHints(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 43. - -*** - -### getInstanceKey - -#### Signature - -```php -public function getInstanceKey(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 89. - -*** - -### getName - -#### Signature - -```php -public function getName(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/Builtin/Joke.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Joke.php) - -Line 12. - -*** - -### getParameterSchema - -#### Signature - -```php -public function getParameterSchema(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 66. - -*** - -### getPromptSections - -#### Signature - -```php -public function getPromptSections(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/Builtin/Joke.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Joke.php) - -Line 83. - -*** - -### getRequiredEnvVars - -#### Signature - -```php -public function getRequiredEnvVars(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 33. - -*** - -### getVersion - -#### Signature - -```php -public function getVersion(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 28. - -*** - -### registerTools - -#### Signature - -```php -public function registerTools(): void -``` - -#### Source - -[`SignalWire/Skills/Builtin/Joke.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Joke.php) - -Line 31. - -*** - -### setup - -#### Signature - -```php -public function setup(): bool -``` - -#### Returns - -`bool` - -#### Source - -[`SignalWire/Skills/Builtin/Joke.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Joke.php) - -Line 22. - -*** - -### supportsMultipleInstances - -#### Signature - -```php -public function supportsMultipleInstances(): bool -``` - -#### Returns - -`bool` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 38. - -*** - -### validateEnvVars - -#### Signature - -```php -public function validateEnvVars(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 100. - -## Source - -[`SignalWire/Skills/Builtin/Joke.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Joke.php) - -Line 10. diff --git a/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/math/index.mdx b/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/math/index.mdx deleted file mode 100644 index 08896bb65b..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/math/index.mdx +++ /dev/null @@ -1,331 +0,0 @@ ---- -slug: "/reference/php/signal-wire/skills/builtin/builtin/math" -title: "Math" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\Skills\\Builtin\\Math" - parent: "SignalWire\\Skills\\Builtin" - module: "SignalWire.Skills.Builtin" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Math.php" ---- -# `Math` - -## Signature - -```php -class Math extends SkillBase -``` - -## Inheritance - -**Extends:** [SignalWire\Skills\SkillBase](/docs/sdk-reference/reference/php/signal-wire/skills/skills/skill-base) - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(object $agent, array $params = array ( -)) -``` - -#### Parameters - - - - - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 13. - -*** - -### cleanup - -#### Signature - -```php -public function cleanup(): void -``` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 62. - -*** - -### getDescription - -#### Signature - -```php -public function getDescription(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/Builtin/Math.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Math.php) - -Line 17. - -*** - -### getGlobalData - -#### Signature - -```php -public function getGlobalData(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 48. - -*** - -### getHints - -#### Signature - -```php -public function getHints(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 43. - -*** - -### getInstanceKey - -#### Signature - -```php -public function getInstanceKey(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 89. - -*** - -### getName - -#### Signature - -```php -public function getName(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/Builtin/Math.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Math.php) - -Line 12. - -*** - -### getParameterSchema - -#### Signature - -```php -public function getParameterSchema(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 66. - -*** - -### getPromptSections - -#### Signature - -```php -public function getPromptSections(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/Builtin/Math.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Math.php) - -Line 79. - -*** - -### getRequiredEnvVars - -#### Signature - -```php -public function getRequiredEnvVars(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 33. - -*** - -### getVersion - -#### Signature - -```php -public function getVersion(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 28. - -*** - -### registerTools - -#### Signature - -```php -public function registerTools(): void -``` - -#### Source - -[`SignalWire/Skills/Builtin/Math.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Math.php) - -Line 27. - -*** - -### setup - -#### Signature - -```php -public function setup(): bool -``` - -#### Returns - -`bool` - -#### Source - -[`SignalWire/Skills/Builtin/Math.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Math.php) - -Line 22. - -*** - -### supportsMultipleInstances - -#### Signature - -```php -public function supportsMultipleInstances(): bool -``` - -#### Returns - -`bool` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 38. - -*** - -### validateEnvVars - -#### Signature - -```php -public function validateEnvVars(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 100. - -## Source - -[`SignalWire/Skills/Builtin/Math.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Math.php) - -Line 10. diff --git a/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/mcp-gateway/index.mdx b/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/mcp-gateway/index.mdx deleted file mode 100644 index 5e426f91fa..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/mcp-gateway/index.mdx +++ /dev/null @@ -1,351 +0,0 @@ ---- -slug: "/reference/php/signal-wire/skills/builtin/builtin/mcp-gateway" -title: "McpGateway" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\Skills\\Builtin\\McpGateway" - parent: "SignalWire\\Skills\\Builtin" - module: "SignalWire.Skills.Builtin" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/McpGateway.php" ---- -# `McpGateway` - -MCP Gateway skill. - -Mirrors signalwire-python's `signalwire.skills.mcp_gateway.skill`: - -POST \{gateway\_url\}/services/\{service\}/call -Auth: Bearer auth\_token OR Basic auth\_user:auth\_password -Body: \{ tool, arguments, session\_id, timeout, metadata \} -Response: \{ result \} — surfaced verbatim - -For session cleanup the Python skill issues `DELETE -/sessions/{session_id}` from the hangup-hook tool. The audit only -exercises the per-tool `call` path; the hangup hook is preserved -but does not block on the audit. - -No upstream URL override env var — the gateway URL is mandatory and -fully user-supplied (no third-party host to mock). The audit path -isn't probed for this skill (it's not in audit\_skills\_dispatch's -SKILL\_PROBES list as of this writing) but the implementation must -still be real because the surface is shipped to users. - -## Signature - -```php -class McpGateway extends SkillBase -``` - -## Inheritance - -**Extends:** [SignalWire\Skills\SkillBase](/docs/sdk-reference/reference/php/signal-wire/skills/skills/skill-base) - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(object $agent, array $params = array ( -)) -``` - -#### Parameters - - - - - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 13. - -*** - -### cleanup - -#### Signature - -```php -public function cleanup(): void -``` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 62. - -*** - -### getDescription - -#### Signature - -```php -public function getDescription(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/Builtin/McpGateway.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/McpGateway.php) - -Line 39. - -*** - -### getGlobalData - -#### Signature - -```php -public function getGlobalData(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/Builtin/McpGateway.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/McpGateway.php) - -Line 314. - -*** - -### getHints - -#### Signature - -```php -public function getHints(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/Builtin/McpGateway.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/McpGateway.php) - -Line 297. - -*** - -### getInstanceKey - -#### Signature - -```php -public function getInstanceKey(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 89. - -*** - -### getName - -#### Signature - -```php -public function getName(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/Builtin/McpGateway.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/McpGateway.php) - -Line 34. - -*** - -### getParameterSchema - -#### Signature - -```php -public function getParameterSchema(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 66. - -*** - -### getPromptSections - -#### Signature - -```php -public function getPromptSections(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/Builtin/McpGateway.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/McpGateway.php) - -Line 335. - -*** - -### getRequiredEnvVars - -#### Signature - -```php -public function getRequiredEnvVars(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 33. - -*** - -### getVersion - -#### Signature - -```php -public function getVersion(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 28. - -*** - -### registerTools - -#### Signature - -```php -public function registerTools(): void -``` - -#### Source - -[`SignalWire/Skills/Builtin/McpGateway.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/McpGateway.php) - -Line 56. - -*** - -### setup - -#### Signature - -```php -public function setup(): bool -``` - -#### Returns - -`bool` - -#### Source - -[`SignalWire/Skills/Builtin/McpGateway.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/McpGateway.php) - -Line 44. - -*** - -### supportsMultipleInstances - -#### Signature - -```php -public function supportsMultipleInstances(): bool -``` - -#### Returns - -`bool` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 38. - -*** - -### validateEnvVars - -#### Signature - -```php -public function validateEnvVars(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 100. - -## Source - -[`SignalWire/Skills/Builtin/McpGateway.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/McpGateway.php) - -Line 32. diff --git a/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/native-vector-search/index.mdx b/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/native-vector-search/index.mdx deleted file mode 100644 index 32bdc99bdd..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/native-vector-search/index.mdx +++ /dev/null @@ -1,347 +0,0 @@ ---- -slug: "/reference/php/signal-wire/skills/builtin/builtin/native-vector-search" -title: "NativeVectorSearch" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\Skills\\Builtin\\NativeVectorSearch" - parent: "SignalWire\\Skills\\Builtin" - module: "SignalWire.Skills.Builtin" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/NativeVectorSearch.php" ---- -# `NativeVectorSearch` - -Native vector search skill — network/remote mode only. - -Mirrors signalwire-python's -`signalwire.skills.native_vector_search.skill.NativeVectorSearchSkill`, -specifically the `_search_remote` branch: - -POST \{remote\_url\}/search -Auth: Optional Basic (parsed from remote\_url's user:pass@ if set) -Body: \{ query, index\_name, count, similarity\_threshold, tags \} -Response: \{ results: \[\{ content, score, metadata \}] \} - -The Python skill also supports a local SQLite/pgvector backend via -`signalwire.search`. PHP doesn't ship that backend; in remote mode -the SDK is just a thin HTTP client, which the audit verifies. Local -backend is recorded in PORT\_OMISSIONS.md. - -## Signature - -```php -class NativeVectorSearch extends SkillBase -``` - -## Inheritance - -**Extends:** [SignalWire\Skills\SkillBase](/docs/sdk-reference/reference/php/signal-wire/skills/skills/skill-base) - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(object $agent, array $params = array ( -)) -``` - -#### Parameters - - - - - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 13. - -*** - -### cleanup - -#### Signature - -```php -public function cleanup(): void -``` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 62. - -*** - -### getDescription - -#### Signature - -```php -public function getDescription(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/Builtin/NativeVectorSearch.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/NativeVectorSearch.php) - -Line 35. - -*** - -### getGlobalData - -#### Signature - -```php -public function getGlobalData(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 48. - -*** - -### getHints - -#### Signature - -```php -public function getHints(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/Builtin/NativeVectorSearch.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/NativeVectorSearch.php) - -Line 258. - -*** - -### getInstanceKey - -#### Signature - -```php -public function getInstanceKey(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 89. - -*** - -### getName - -#### Signature - -```php -public function getName(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/Builtin/NativeVectorSearch.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/NativeVectorSearch.php) - -Line 30. - -*** - -### getParameterSchema - -#### Signature - -```php -public function getParameterSchema(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 66. - -*** - -### getPromptSections - -#### Signature - -```php -public function getPromptSections(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 53. - -*** - -### getRequiredEnvVars - -#### Signature - -```php -public function getRequiredEnvVars(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 33. - -*** - -### getVersion - -#### Signature - -```php -public function getVersion(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 28. - -*** - -### registerTools - -#### Signature - -```php -public function registerTools(): void -``` - -#### Source - -[`SignalWire/Skills/Builtin/NativeVectorSearch.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/NativeVectorSearch.php) - -Line 54. - -*** - -### setup - -#### Signature - -```php -public function setup(): bool -``` - -#### Returns - -`bool` - -#### Source - -[`SignalWire/Skills/Builtin/NativeVectorSearch.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/NativeVectorSearch.php) - -Line 45. - -*** - -### supportsMultipleInstances - -#### Signature - -```php -public function supportsMultipleInstances(): bool -``` - -#### Returns - -`bool` - -#### Source - -[`SignalWire/Skills/Builtin/NativeVectorSearch.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/NativeVectorSearch.php) - -Line 40. - -*** - -### validateEnvVars - -#### Signature - -```php -public function validateEnvVars(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 100. - -## Source - -[`SignalWire/Skills/Builtin/NativeVectorSearch.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/NativeVectorSearch.php) - -Line 28. diff --git a/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/play-background-file/index.mdx b/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/play-background-file/index.mdx deleted file mode 100644 index 617edacc3e..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/play-background-file/index.mdx +++ /dev/null @@ -1,331 +0,0 @@ ---- -slug: "/reference/php/signal-wire/skills/builtin/builtin/play-background-file" -title: "PlayBackgroundFile" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\Skills\\Builtin\\PlayBackgroundFile" - parent: "SignalWire\\Skills\\Builtin" - module: "SignalWire.Skills.Builtin" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/PlayBackgroundFile.php" ---- -# `PlayBackgroundFile` - -## Signature - -```php -class PlayBackgroundFile extends SkillBase -``` - -## Inheritance - -**Extends:** [SignalWire\Skills\SkillBase](/docs/sdk-reference/reference/php/signal-wire/skills/skills/skill-base) - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(object $agent, array $params = array ( -)) -``` - -#### Parameters - - - - - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 13. - -*** - -### cleanup - -#### Signature - -```php -public function cleanup(): void -``` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 62. - -*** - -### getDescription - -#### Signature - -```php -public function getDescription(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/Builtin/PlayBackgroundFile.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/PlayBackgroundFile.php) - -Line 17. - -*** - -### getGlobalData - -#### Signature - -```php -public function getGlobalData(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 48. - -*** - -### getHints - -#### Signature - -```php -public function getHints(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 43. - -*** - -### getInstanceKey - -#### Signature - -```php -public function getInstanceKey(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 89. - -*** - -### getName - -#### Signature - -```php -public function getName(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/Builtin/PlayBackgroundFile.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/PlayBackgroundFile.php) - -Line 12. - -*** - -### getParameterSchema - -#### Signature - -```php -public function getParameterSchema(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 66. - -*** - -### getPromptSections - -#### Signature - -```php -public function getPromptSections(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 53. - -*** - -### getRequiredEnvVars - -#### Signature - -```php -public function getRequiredEnvVars(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 33. - -*** - -### getVersion - -#### Signature - -```php -public function getVersion(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 28. - -*** - -### registerTools - -#### Signature - -```php -public function registerTools(): void -``` - -#### Source - -[`SignalWire/Skills/Builtin/PlayBackgroundFile.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/PlayBackgroundFile.php) - -Line 36. - -*** - -### setup - -#### Signature - -```php -public function setup(): bool -``` - -#### Returns - -`bool` - -#### Source - -[`SignalWire/Skills/Builtin/PlayBackgroundFile.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/PlayBackgroundFile.php) - -Line 27. - -*** - -### supportsMultipleInstances - -#### Signature - -```php -public function supportsMultipleInstances(): bool -``` - -#### Returns - -`bool` - -#### Source - -[`SignalWire/Skills/Builtin/PlayBackgroundFile.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/PlayBackgroundFile.php) - -Line 22. - -*** - -### validateEnvVars - -#### Signature - -```php -public function validateEnvVars(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 100. - -## Source - -[`SignalWire/Skills/Builtin/PlayBackgroundFile.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/PlayBackgroundFile.php) - -Line 10. diff --git a/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/spider/index.mdx b/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/spider/index.mdx deleted file mode 100644 index a607ae3ca7..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/spider/index.mdx +++ /dev/null @@ -1,346 +0,0 @@ ---- -slug: "/reference/php/signal-wire/skills/builtin/builtin/spider" -title: "Spider" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\Skills\\Builtin\\Spider" - parent: "SignalWire\\Skills\\Builtin" - module: "SignalWire.Skills.Builtin" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Spider.php" ---- -# `Spider` - -Spider scraping skill. - -Mirrors signalwire-python's `signalwire.skills.spider.skill` (the -`_scrape_url_handler` / `_crawl_site_handler` paths). PHP doesn't -ship `lxml`, so HTML extraction uses a strip\_tags + regex pipeline -that handles the audit's canned `...` -sentinel and basic real-world pages — the Python version's quality -scorer and Reddit-aware extractor are not yet ported, but the -upstream contract (real GET, real text extraction) is met. - -Upstream URL override: `SPIDER_BASE_URL` for the audit fixture. -The audit fixture is a generic JSON server, so the response body -may either be a raw HTML string (production) or a JSON object with -an `_raw_html` field (audit fixture). We accept both. - -## Signature - -```php -class Spider extends SkillBase -``` - -## Inheritance - -**Extends:** [SignalWire\Skills\SkillBase](/docs/sdk-reference/reference/php/signal-wire/skills/skills/skill-base) - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(object $agent, array $params = array ( -)) -``` - -#### Parameters - - - - - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 13. - -*** - -### cleanup - -#### Signature - -```php -public function cleanup(): void -``` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 62. - -*** - -### getDescription - -#### Signature - -```php -public function getDescription(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/Builtin/Spider.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Spider.php) - -Line 36. - -*** - -### getGlobalData - -#### Signature - -```php -public function getGlobalData(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 48. - -*** - -### getHints - -#### Signature - -```php -public function getHints(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/Builtin/Spider.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Spider.php) - -Line 455. - -*** - -### getInstanceKey - -#### Signature - -```php -public function getInstanceKey(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 89. - -*** - -### getName - -#### Signature - -```php -public function getName(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/Builtin/Spider.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Spider.php) - -Line 31. - -*** - -### getParameterSchema - -#### Signature - -```php -public function getParameterSchema(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 66. - -*** - -### getPromptSections - -#### Signature - -```php -public function getPromptSections(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 53. - -*** - -### getRequiredEnvVars - -#### Signature - -```php -public function getRequiredEnvVars(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 33. - -*** - -### getVersion - -#### Signature - -```php -public function getVersion(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 28. - -*** - -### registerTools - -#### Signature - -```php -public function registerTools(): void -``` - -#### Source - -[`SignalWire/Skills/Builtin/Spider.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Spider.php) - -Line 51. - -*** - -### setup - -#### Signature - -```php -public function setup(): bool -``` - -#### Returns - -`bool` - -#### Source - -[`SignalWire/Skills/Builtin/Spider.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Spider.php) - -Line 46. - -*** - -### supportsMultipleInstances - -#### Signature - -```php -public function supportsMultipleInstances(): bool -``` - -#### Returns - -`bool` - -#### Source - -[`SignalWire/Skills/Builtin/Spider.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Spider.php) - -Line 41. - -*** - -### validateEnvVars - -#### Signature - -```php -public function validateEnvVars(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 100. - -## Source - -[`SignalWire/Skills/Builtin/Spider.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/Spider.php) - -Line 27. diff --git a/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/swml-transfer/index.mdx b/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/swml-transfer/index.mdx deleted file mode 100644 index d2c344d112..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/swml-transfer/index.mdx +++ /dev/null @@ -1,331 +0,0 @@ ---- -slug: "/reference/php/signal-wire/skills/builtin/builtin/swml-transfer" -title: "SwmlTransfer" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\Skills\\Builtin\\SwmlTransfer" - parent: "SignalWire\\Skills\\Builtin" - module: "SignalWire.Skills.Builtin" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/SwmlTransfer.php" ---- -# `SwmlTransfer` - -## Signature - -```php -class SwmlTransfer extends SkillBase -``` - -## Inheritance - -**Extends:** [SignalWire\Skills\SkillBase](/docs/sdk-reference/reference/php/signal-wire/skills/skills/skill-base) - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(object $agent, array $params = array ( -)) -``` - -#### Parameters - - - - - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 13. - -*** - -### cleanup - -#### Signature - -```php -public function cleanup(): void -``` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 62. - -*** - -### getDescription - -#### Signature - -```php -public function getDescription(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/Builtin/SwmlTransfer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/SwmlTransfer.php) - -Line 17. - -*** - -### getGlobalData - -#### Signature - -```php -public function getGlobalData(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 48. - -*** - -### getHints - -#### Signature - -```php -public function getHints(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/Builtin/SwmlTransfer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/SwmlTransfer.php) - -Line 131. - -*** - -### getInstanceKey - -#### Signature - -```php -public function getInstanceKey(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 89. - -*** - -### getName - -#### Signature - -```php -public function getName(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/Builtin/SwmlTransfer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/SwmlTransfer.php) - -Line 12. - -*** - -### getParameterSchema - -#### Signature - -```php -public function getParameterSchema(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 66. - -*** - -### getPromptSections - -#### Signature - -```php -public function getPromptSections(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/Builtin/SwmlTransfer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/SwmlTransfer.php) - -Line 150. - -*** - -### getRequiredEnvVars - -#### Signature - -```php -public function getRequiredEnvVars(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 33. - -*** - -### getVersion - -#### Signature - -```php -public function getVersion(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 28. - -*** - -### registerTools - -#### Signature - -```php -public function registerTools(): void -``` - -#### Source - -[`SignalWire/Skills/Builtin/SwmlTransfer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/SwmlTransfer.php) - -Line 36. - -*** - -### setup - -#### Signature - -```php -public function setup(): bool -``` - -#### Returns - -`bool` - -#### Source - -[`SignalWire/Skills/Builtin/SwmlTransfer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/SwmlTransfer.php) - -Line 27. - -*** - -### supportsMultipleInstances - -#### Signature - -```php -public function supportsMultipleInstances(): bool -``` - -#### Returns - -`bool` - -#### Source - -[`SignalWire/Skills/Builtin/SwmlTransfer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/SwmlTransfer.php) - -Line 22. - -*** - -### validateEnvVars - -#### Signature - -```php -public function validateEnvVars(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 100. - -## Source - -[`SignalWire/Skills/Builtin/SwmlTransfer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/SwmlTransfer.php) - -Line 10. diff --git a/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/weather-api/index.mdx b/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/weather-api/index.mdx deleted file mode 100644 index e01c107981..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/weather-api/index.mdx +++ /dev/null @@ -1,331 +0,0 @@ ---- -slug: "/reference/php/signal-wire/skills/builtin/builtin/weather-api" -title: "WeatherApi" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\Skills\\Builtin\\WeatherApi" - parent: "SignalWire\\Skills\\Builtin" - module: "SignalWire.Skills.Builtin" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WeatherApi.php" ---- -# `WeatherApi` - -## Signature - -```php -class WeatherApi extends SkillBase -``` - -## Inheritance - -**Extends:** [SignalWire\Skills\SkillBase](/docs/sdk-reference/reference/php/signal-wire/skills/skills/skill-base) - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(object $agent, array $params = array ( -)) -``` - -#### Parameters - - - - - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 13. - -*** - -### cleanup - -#### Signature - -```php -public function cleanup(): void -``` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 62. - -*** - -### getDescription - -#### Signature - -```php -public function getDescription(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/Builtin/WeatherApi.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WeatherApi.php) - -Line 17. - -*** - -### getGlobalData - -#### Signature - -```php -public function getGlobalData(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 48. - -*** - -### getHints - -#### Signature - -```php -public function getHints(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 43. - -*** - -### getInstanceKey - -#### Signature - -```php -public function getInstanceKey(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 89. - -*** - -### getName - -#### Signature - -```php -public function getName(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/Builtin/WeatherApi.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WeatherApi.php) - -Line 12. - -*** - -### getParameterSchema - -#### Signature - -```php -public function getParameterSchema(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 66. - -*** - -### getPromptSections - -#### Signature - -```php -public function getPromptSections(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 53. - -*** - -### getRequiredEnvVars - -#### Signature - -```php -public function getRequiredEnvVars(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 33. - -*** - -### getVersion - -#### Signature - -```php -public function getVersion(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 28. - -*** - -### registerTools - -#### Signature - -```php -public function registerTools(): void -``` - -#### Source - -[`SignalWire/Skills/Builtin/WeatherApi.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WeatherApi.php) - -Line 31. - -*** - -### setup - -#### Signature - -```php -public function setup(): bool -``` - -#### Returns - -`bool` - -#### Source - -[`SignalWire/Skills/Builtin/WeatherApi.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WeatherApi.php) - -Line 22. - -*** - -### supportsMultipleInstances - -#### Signature - -```php -public function supportsMultipleInstances(): bool -``` - -#### Returns - -`bool` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 38. - -*** - -### validateEnvVars - -#### Signature - -```php -public function validateEnvVars(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 100. - -## Source - -[`SignalWire/Skills/Builtin/WeatherApi.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WeatherApi.php) - -Line 10. diff --git a/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/web-search/index.mdx b/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/web-search/index.mdx deleted file mode 100644 index 280d2fdb5f..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/web-search/index.mdx +++ /dev/null @@ -1,368 +0,0 @@ ---- -slug: "/reference/php/signal-wire/skills/builtin/builtin/web-search" -title: "WebSearch" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\Skills\\Builtin\\WebSearch" - parent: "SignalWire\\Skills\\Builtin" - module: "SignalWire.Skills.Builtin" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WebSearch.php" ---- -# `WebSearch` - -Web search skill backed by Google Custom Search. - -Mirrors signalwire-python's `signalwire.skills.web_search.skill` -(the `WebSearchSkill.search_and_scrape_best` path). The Python -reference fetches CSE results, then scrapes each result URL and -quality-scores the extracted text with a Reddit-aware extractor, a -per-domain weight table, and a length/diversity scorer. The PHP port -issues the CSE call faithfully and scrapes each result page with a -lighter strip\_tags/regex extractor (the heavyweight BeautifulSoup -scorer and the per-domain quality table remain Python-specific and -are tracked in PORT\_OMISSIONS.md). When no scraped page clears the -quality threshold — or the overall deadline fires — the handler falls -back to formatting the CSE titles+snippets so the response is always -non-empty. - -Latency control (Python skill.py commits 51101da + 295745b — the -SignalWire kernel times out webhook responses around 55s, so the -handler MUST finish under that): - -- per\_page\_timeout (2.0s): cURL CURLOPT\_TIMEOUT on each page scrape. -- overall\_deadline (10.0s): wall-clock budget for the whole tool - call, tracked from microtime(true); once exceeded, remaining - scrapes are abandoned and we return whatever we have (or the - snippet fallback). -- snippets\_only (false): skip page scraping entirely and format the - CSE snippets directly. Sub-second response. -- parallel\_scrape (true): accepted for API/schema parity with - Python/Go/TS. PHP is single-threaded and true concurrent HTTP - would require curl\_multi (invasive, and parallelism is NOT part of - the latency contract), so scrapes run SEQUENTIALLY with strict - per-page + overall-deadline enforcement. See PORT\_ADDITIONS.md. - -Upstream URL override: `WEB_SEARCH_BASE_URL` (used by -audit\_skills\_dispatch.py to point at a local fixture). When set, -the URL is rewritten to the override host while the path -`/customsearch/v1` is preserved. - -## Signature - -```php -class WebSearch extends SkillBase -``` - -## Inheritance - -**Extends:** [SignalWire\Skills\SkillBase](/docs/sdk-reference/reference/php/signal-wire/skills/skills/skill-base) - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(object $agent, array $params = array ( -)) -``` - -#### Parameters - - - - - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 13. - -*** - -### cleanup - -#### Signature - -```php -public function cleanup(): void -``` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 62. - -*** - -### getDescription - -#### Signature - -```php -public function getDescription(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/Builtin/WebSearch.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WebSearch.php) - -Line 58. - -*** - -### getGlobalData - -#### Signature - -```php -public function getGlobalData(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/Builtin/WebSearch.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WebSearch.php) - -Line 545. - -*** - -### getHints - -#### Signature - -```php -public function getHints(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 43. - -*** - -### getInstanceKey - -#### Signature - -```php -public function getInstanceKey(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 89. - -*** - -### getName - -#### Signature - -```php -public function getName(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/Builtin/WebSearch.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WebSearch.php) - -Line 53. - -*** - -### getParameterSchema - -#### Signature - -```php -public function getParameterSchema(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/Builtin/WebSearch.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WebSearch.php) - -Line 81. - -*** - -### getPromptSections - -#### Signature - -```php -public function getPromptSections(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/Builtin/WebSearch.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WebSearch.php) - -Line 554. - -*** - -### getRequiredEnvVars - -#### Signature - -```php -public function getRequiredEnvVars(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 33. - -*** - -### getVersion - -#### Signature - -```php -public function getVersion(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/Builtin/WebSearch.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WebSearch.php) - -Line 63. - -*** - -### registerTools - -#### Signature - -```php -public function registerTools(): void -``` - -#### Source - -[`SignalWire/Skills/Builtin/WebSearch.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WebSearch.php) - -Line 152. - -*** - -### setup - -#### Signature - -```php -public function setup(): bool -``` - -#### Returns - -`bool` - -#### Source - -[`SignalWire/Skills/Builtin/WebSearch.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WebSearch.php) - -Line 73. - -*** - -### supportsMultipleInstances - -#### Signature - -```php -public function supportsMultipleInstances(): bool -``` - -#### Returns - -`bool` - -#### Source - -[`SignalWire/Skills/Builtin/WebSearch.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WebSearch.php) - -Line 68. - -*** - -### validateEnvVars - -#### Signature - -```php -public function validateEnvVars(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 100. - -## Source - -[`SignalWire/Skills/Builtin/WebSearch.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WebSearch.php) - -Line 48. diff --git a/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/wikipedia-search/index.mdx b/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/wikipedia-search/index.mdx deleted file mode 100644 index 7855f4c269..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/skills/builtin/builtin/wikipedia-search/index.mdx +++ /dev/null @@ -1,343 +0,0 @@ ---- -slug: "/reference/php/signal-wire/skills/builtin/builtin/wikipedia-search" -title: "WikipediaSearch" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\Skills\\Builtin\\WikipediaSearch" - parent: "SignalWire\\Skills\\Builtin" - module: "SignalWire.Skills.Builtin" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WikipediaSearch.php" ---- -# `WikipediaSearch` - -Wikipedia search skill backed by the public MediaWiki action API. - -Mirrors signalwire-python's -`signalwire.skills.wikipedia_search.skill.WikipediaSearchSkill.search_wiki`: - -1. GET en.wikipedia.org/w/api.php?action=query\&list=search\&srsearch=... -2. For each top result, GET ?action=query\&prop=extracts\&exintro&... - to fetch the article intro extract. - -Upstream URL override: `WIKIPEDIA_BASE_URL` for the audit fixture. -The path component (`/w/api.php`) is preserved. - -## Signature - -```php -class WikipediaSearch extends SkillBase -``` - -## Inheritance - -**Extends:** [SignalWire\Skills\SkillBase](/docs/sdk-reference/reference/php/signal-wire/skills/skills/skill-base) - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(object $agent, array $params = array ( -)) -``` - -#### Parameters - - - - - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 13. - -*** - -### cleanup - -#### Signature - -```php -public function cleanup(): void -``` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 62. - -*** - -### getDescription - -#### Signature - -```php -public function getDescription(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/Builtin/WikipediaSearch.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WikipediaSearch.php) - -Line 34. - -*** - -### getGlobalData - -#### Signature - -```php -public function getGlobalData(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 48. - -*** - -### getHints - -#### Signature - -```php -public function getHints(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 43. - -*** - -### getInstanceKey - -#### Signature - -```php -public function getInstanceKey(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 89. - -*** - -### getName - -#### Signature - -```php -public function getName(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/Builtin/WikipediaSearch.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WikipediaSearch.php) - -Line 29. - -*** - -### getParameterSchema - -#### Signature - -```php -public function getParameterSchema(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 66. - -*** - -### getPromptSections - -#### Signature - -```php -public function getPromptSections(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/Builtin/WikipediaSearch.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WikipediaSearch.php) - -Line 177. - -*** - -### getRequiredEnvVars - -#### Signature - -```php -public function getRequiredEnvVars(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 33. - -*** - -### getVersion - -#### Signature - -```php -public function getVersion(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 28. - -*** - -### registerTools - -#### Signature - -```php -public function registerTools(): void -``` - -#### Source - -[`SignalWire/Skills/Builtin/WikipediaSearch.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WikipediaSearch.php) - -Line 44. - -*** - -### setup - -#### Signature - -```php -public function setup(): bool -``` - -#### Returns - -`bool` - -#### Source - -[`SignalWire/Skills/Builtin/WikipediaSearch.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WikipediaSearch.php) - -Line 39. - -*** - -### supportsMultipleInstances - -#### Signature - -```php -public function supportsMultipleInstances(): bool -``` - -#### Returns - -`bool` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 38. - -*** - -### validateEnvVars - -#### Signature - -```php -public function validateEnvVars(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 100. - -## Source - -[`SignalWire/Skills/Builtin/WikipediaSearch.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/Builtin/WikipediaSearch.php) - -Line 24. diff --git a/fern/products/sdk-reference/php/signal-wire/skills/skills/http-helper/index.mdx b/fern/products/sdk-reference/php/signal-wire/skills/skills/http-helper/index.mdx deleted file mode 100644 index 0dddd997f5..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/skills/skills/http-helper/index.mdx +++ /dev/null @@ -1,232 +0,0 @@ ---- -slug: "/reference/php/signal-wire/skills/skills/http-helper" -title: "HttpHelper" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\Skills\\HttpHelper" - parent: "SignalWire\\Skills" - module: "SignalWire.Skills" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/HttpHelper.php" ---- -# `HttpHelper` - -Tiny HTTP helper for skill upstream calls. - -The REST client uses cURL behind a Basic-auth wrapper bound to -`https://` — that's the wrong shape for skills, which talk to -arbitrary third-party services with their own URL bases, headers, -and auth schemes. Each skill could call cURL inline, but they all -need the same handful of mechanics (URL building, headers, basic -auth, JSON encode/decode, base-URL override for testing). This -helper centralises that and gives skills a way to honor the -`_BASE_URL` env-var override that audit\_skills\_dispatch -relies on without each skill duplicating the env lookup. - -## Signature - -```php -class HttpHelper -``` - -## Constants - - - Default request timeout in seconds. - - -## Methods - -### applyBaseUrlOverride - -Look up a URL override env var and rewrite the URL host/scheme - -to point at the audit fixture when set. Skills call this with -the documented env name (e.g. `WEB_SEARCH_BASE_URL`) and the -production URL; the helper returns either the original URL or -an audit-fixture rewrite, preserving path + query. - -**Modifiers:** `static` - -#### Signature - -```php -public static function applyBaseUrlOverride(string $url, string $envVarName): string -``` - -#### Parameters - - - - - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/HttpHelper.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/HttpHelper.php) - -Line 75. - -*** - -### get - -Issue a GET. Returns \[status, body, parsed\_json\_or\_null]. - -**Modifiers:** `static` - -#### Signature - -```php -public static function get( - string $url, - array $headers = array ( -), - ?array $query = NULL, - ?array $basicAuth = NULL, - int $timeout = 15 -): array -``` - -#### Parameters - - - - - - - - - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/HttpHelper.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/HttpHelper.php) - -Line 31. - -*** - -### postJson - -Issue a POST with a JSON body. Returns \[status, body, parsed]. - -**Modifiers:** `static` - -#### Signature - -```php -public static function postJson( - string $url, - mixed $body, - array $headers = array ( -), - ?array $basicAuth = NULL, - int $timeout = 15 -): array -``` - -#### Parameters - - - - - - - - - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/HttpHelper.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/HttpHelper.php) - -Line 51. - -*** - -### request - -Inner request engine using cURL. Other skills may use this - -directly when they need PUT/DELETE; the GET / POST helpers -above cover the common cases. - -**Modifiers:** `static` - -#### Signature - -```php -public static function request( - string $method, - string $url, - array $headers = array ( -), - ?string $body = NULL, - ?array $basicAuth = NULL, - int $timeout = 15 -): array -``` - -#### Parameters - - - - - - - - - - - \[user, password] - - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/HttpHelper.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/HttpHelper.php) - -Line 104. - -## Source - -[`SignalWire/Skills/HttpHelper.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/HttpHelper.php) - -Line 20. diff --git a/fern/products/sdk-reference/php/signal-wire/skills/skills/index.mdx b/fern/products/sdk-reference/php/signal-wire/skills/skills/index.mdx deleted file mode 100644 index 20dc8871b6..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/skills/skills/index.mdx +++ /dev/null @@ -1,205 +0,0 @@ ---- -slug: "/reference/php/signal-wire/skills/skills" -title: "Skills" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "module" - language: "php" - qualified_name: "SignalWire\\Skills" - module: "SignalWire.Skills" ---- -# `Skills` - -## Signature - -```php -namespace SignalWire\Skills -``` - -## Classes - - - - Tiny HTTP helper for skill upstream calls. - - - - - - - - - -## Enums - -### SkillName - -Built-in skill names as a typed, compile-time-checked closed set. - -\{@see \SignalWire\Agent\AgentBase::addSkill()\} accepts this enum OR a string. -The enum gives editor autocompletion and makes a typo fail at the call site -(a bare string like `'datetiem'` only fails at runtime, on the server); -strings keep parity with the Python reference (which uses bare `str`) and -still allow custom / third-party skills that aren't built in. - -``` -$agent->addSkill(SkillName::Datetime); // typed, autocompleted -$agent->addSkill('datetime'); // string still works (parity) -$agent->addSkill('my_custom_skill'); // open set: custom skills ok -``` - -#### Signature - -```php -final enum SkillName implements UnitEnum, BackedEnum -``` - -#### Inheritance - -**Implements:** `UnitEnum`, `BackedEnum` - -#### Properties - - - - - -#### Constants - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -#### Variants - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -#### Methods - -##### cases - -**Modifiers:** `static` - -###### Signature - -```php -public static function cases(): array -``` - -###### Returns - -`array` - -*** - -##### from - -**Modifiers:** `static` - -###### Signature - -```php -public static function from(string|int $value): static -``` - -###### Parameters - - - -###### Returns - -`static` - -*** - -##### tryFrom - -**Modifiers:** `static` - -###### Signature - -```php -public static function tryFrom(string|int $value): ?static -``` - -###### Parameters - - - -###### Returns - -`?static` - -#### Source - -[`SignalWire/Skills/SkillName.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillName.php) - -Line 20. diff --git a/fern/products/sdk-reference/php/signal-wire/skills/skills/skill-base/index.mdx b/fern/products/sdk-reference/php/signal-wire/skills/skills/skill-base/index.mdx deleted file mode 100644 index e0f92b3156..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/skills/skills/skill-base/index.mdx +++ /dev/null @@ -1,337 +0,0 @@ ---- -slug: "/reference/php/signal-wire/skills/skills/skill-base" -title: "SkillBase" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\Skills\\SkillBase" - parent: "SignalWire\\Skills" - module: "SignalWire.Skills" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php" ---- -# `SkillBase` - -**Modifiers:** `abstract` - -## Signature - -```php -abstract class SkillBase -``` - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(object $agent, array $params = array ( -)) -``` - -#### Parameters - - - - - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 13. - -*** - -### cleanup - -#### Signature - -```php -public function cleanup(): void -``` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 62. - -*** - -### getDescription - -**Modifiers:** `abstract` - -#### Signature - -```php -public abstract function getDescription(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 26. - -*** - -### getGlobalData - -#### Signature - -```php -public function getGlobalData(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 48. - -*** - -### getHints - -#### Signature - -```php -public function getHints(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 43. - -*** - -### getInstanceKey - -#### Signature - -```php -public function getInstanceKey(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 89. - -*** - -### getName - -**Modifiers:** `abstract` - -#### Signature - -```php -public abstract function getName(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 24. - -*** - -### getParameterSchema - -#### Signature - -```php -public function getParameterSchema(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 66. - -*** - -### getPromptSections - -#### Signature - -```php -public function getPromptSections(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 53. - -*** - -### getRequiredEnvVars - -#### Signature - -```php -public function getRequiredEnvVars(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 33. - -*** - -### getVersion - -#### Signature - -```php -public function getVersion(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 28. - -*** - -### registerTools - -**Modifiers:** `abstract` - -#### Signature - -```php -public abstract function registerTools(): void -``` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 22. - -*** - -### setup - -**Modifiers:** `abstract` - -#### Signature - -```php -public abstract function setup(): bool -``` - -#### Returns - -`bool` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 20. - -*** - -### supportsMultipleInstances - -#### Signature - -```php -public function supportsMultipleInstances(): bool -``` - -#### Returns - -`bool` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 38. - -*** - -### validateEnvVars - -#### Signature - -```php -public function validateEnvVars(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 100. - -## Source - -[`SignalWire/Skills/SkillBase.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillBase.php) - -Line 7. diff --git a/fern/products/sdk-reference/php/signal-wire/skills/skills/skill-manager/index.mdx b/fern/products/sdk-reference/php/signal-wire/skills/skills/skill-manager/index.mdx deleted file mode 100644 index 84d96c8ace..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/skills/skills/skill-manager/index.mdx +++ /dev/null @@ -1,177 +0,0 @@ ---- -slug: "/reference/php/signal-wire/skills/skills/skill-manager" -title: "SkillManager" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\Skills\\SkillManager" - parent: "SignalWire\\Skills" - module: "SignalWire.Skills" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillManager.php" ---- -# `SkillManager` - -## Signature - -```php -class SkillManager -``` - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(object $agent) -``` - -#### Parameters - - - -#### Source - -[`SignalWire/Skills/SkillManager.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillManager.php) - -Line 13. - -*** - -### getSkill - -#### Signature - -```php -public function getSkill(string $key): ?SignalWire\Skills\SkillBase -``` - -#### Parameters - - - -#### Returns - -`?SignalWire\Skills\SkillBase` - -#### Source - -[`SignalWire/Skills/SkillManager.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillManager.php) - -Line 96. - -*** - -### hasSkill - -#### Signature - -```php -public function hasSkill(string $key): bool -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`SignalWire/Skills/SkillManager.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillManager.php) - -Line 91. - -*** - -### listSkills - -#### Signature - -```php -public function listSkills(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillManager.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillManager.php) - -Line 86. - -*** - -### loadSkill - -#### Signature - -```php -public function loadSkill( - string $skillName, - array $params = array ( -), - ?string $skillClass = NULL -): array -``` - -#### Parameters - - - - - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillManager.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillManager.php) - -Line 22. - -*** - -### unloadSkill - -#### Signature - -```php -public function unloadSkill(string $key): bool -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`SignalWire/Skills/SkillManager.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillManager.php) - -Line 74. - -## Source - -[`SignalWire/Skills/SkillManager.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillManager.php) - -Line 7. diff --git a/fern/products/sdk-reference/php/signal-wire/skills/skills/skill-registry/index.mdx b/fern/products/sdk-reference/php/signal-wire/skills/skills/skill-registry/index.mdx deleted file mode 100644 index ab85aa51ea..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/skills/skills/skill-registry/index.mdx +++ /dev/null @@ -1,220 +0,0 @@ ---- -slug: "/reference/php/signal-wire/skills/skills/skill-registry" -title: "SkillRegistry" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\Skills\\SkillRegistry" - parent: "SignalWire\\Skills" - module: "SignalWire.Skills" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillRegistry.php" ---- -# `SkillRegistry` - -## Signature - -```php -class SkillRegistry -``` - -## Methods - -### addSkillDirectory - -Add a directory to search for skills. - -Mirrors Python's -`signalwire.skills.registry.SkillRegistry.add_skill_directory`: -validate that the path exists and is a directory, then append it -(de-duplicated) to the external paths list. Throws -`InvalidArgumentException` (the PHP analog of Python's `ValueError`) -for invalid input. - -#### Signature - -```php -public function addSkillDirectory(string $path): void -``` - -#### Parameters - - - -#### Throws - -- `\InvalidArgumentException` — when the path doesn't exist or isn't a directory. - -#### Source - -[`SignalWire/Skills/SkillRegistry.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillRegistry.php) - -Line 107. - -*** - -### getAllSkillsSchema - -Get complete schema for all registered skills. - -Mirrors Python's instance-method -`SkillRegistry.get_all_skills_schema()` — returns an associative -array keyed by skill name where each entry contains metadata + -parameter schema. PHP skills don't carry rich Python-style -parameter introspection in v1, so the value defaults to a minimal -shape with the skill name; built-ins that expose -`getDescription` / `getVersion` get those merged in. - -#### Signature - -```php -public function getAllSkillsSchema(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillRegistry.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillRegistry.php) - -Line 144. - -*** - -### getExternalPaths - -Returns the registered external skill directories. - -Parity surface for Python's `_external_paths`. - -#### Signature - -```php -public function getExternalPaths(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillRegistry.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillRegistry.php) - -Line 126. - -*** - -### getFactory - -#### Signature - -```php -public function getFactory(string $name): ?string -``` - -#### Parameters - - - -#### Returns - -`?string` - -#### Source - -[`SignalWire/Skills/SkillRegistry.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillRegistry.php) - -Line 47. - -*** - -### instance - -**Modifiers:** `static` - -#### Signature - -```php -public static function instance(): SignalWire\Skills\SkillRegistry -``` - -#### Returns - -`SignalWire\Skills\SkillRegistry` - -#### Source - -[`SignalWire/Skills/SkillRegistry.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillRegistry.php) - -Line 80. - -*** - -### listSkills - -#### Signature - -```php -public function listSkills(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Skills/SkillRegistry.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillRegistry.php) - -Line 64. - -*** - -### registerSkill - -#### Signature - -```php -public function registerSkill(string $name, string $className): void -``` - -#### Parameters - - - - - -#### Source - -[`SignalWire/Skills/SkillRegistry.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillRegistry.php) - -Line 42. - -*** - -### reset - -**Modifiers:** `static` - -#### Signature - -```php -public static function reset(): void -``` - -#### Source - -[`SignalWire/Skills/SkillRegistry.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillRegistry.php) - -Line 89. - -## Source - -[`SignalWire/Skills/SkillRegistry.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Skills/SkillRegistry.php) - -Line 7. diff --git a/fern/products/sdk-reference/php/signal-wire/swaig/swaig/function-result/index.mdx b/fern/products/sdk-reference/php/signal-wire/swaig/swaig/function-result/index.mdx deleted file mode 100644 index 00b664e019..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/swaig/swaig/function-result/index.mdx +++ /dev/null @@ -1,1674 +0,0 @@ ---- -slug: "/reference/php/signal-wire/swaig/swaig/function-result" -title: "FunctionResult" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\SWAIG\\FunctionResult" - parent: "SignalWire\\SWAIG" - module: "SignalWire.SWAIG" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php" ---- -# `FunctionResult` - -## Signature - -```php -class FunctionResult -``` - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct(?string $response = '', bool $postProcess = false) -``` - -#### Parameters - - - - - -#### Source - -[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) - -Line 13. - -*** - -### addAction - -#### Signature - -```php -public function addAction(array $action): SignalWire\SWAIG\FunctionResult -``` - -#### Parameters - - - -#### Returns - -`SignalWire\SWAIG\FunctionResult` - -#### Source - -[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) - -Line 33. - -*** - -### addActions - -#### Signature - -```php -public function addActions(array $actions): SignalWire\SWAIG\FunctionResult -``` - -#### Parameters - - - -#### Returns - -`SignalWire\SWAIG\FunctionResult` - -#### Source - -[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) - -Line 39. - -*** - -### addDynamicHints - -#### Signature - -```php -public function addDynamicHints(array $hints): SignalWire\SWAIG\FunctionResult -``` - -#### Parameters - - - -#### Returns - -`SignalWire\SWAIG\FunctionResult` - -#### Source - -[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) - -Line 430. - -*** - -### clearDynamicHints - -#### Signature - -```php -public function clearDynamicHints(): SignalWire\SWAIG\FunctionResult -``` - -#### Returns - -`SignalWire\SWAIG\FunctionResult` - -#### Source - -[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) - -Line 436. - -*** - -### connect - -#### Signature - -```php -public function connect( - string $destination, - bool $final = true, - string $from = '' -): SignalWire\SWAIG\FunctionResult -``` - -#### Parameters - - - - - - - -#### Returns - -`SignalWire\SWAIG\FunctionResult` - -#### Source - -[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) - -Line 80. - -*** - -### createPaymentAction - -Create a payment action for use in payment prompts. - -Parity: \{"type": $actionType, "phrase": $phrase\}. - -**Modifiers:** `static` - -#### Signature - -```php -public static function createPaymentAction(string $actionType, string $phrase): array -``` - -#### Parameters - - - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) - -Line 1131. - -*** - -### createPaymentParameter - -Create a payment parameter (name/value pair) for \{@see FunctionResult::pay()\}. - -Parity: \{"name": $name, "value": $value\}. - -**Modifiers:** `static` - -#### Signature - -```php -public static function createPaymentParameter(string $name, string $value): array -``` - -#### Parameters - - - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) - -Line 1145. - -*** - -### createPaymentPrompt - -Create a payment-prompt structure for use with \{@see FunctionResult::pay()\}. - -Parity with the Python reference `create_payment_prompt`: -\{"for": $forSituation, "actions": $actions, "card\_type"?, "error\_type"?\}. - -**Modifiers:** `static` - -#### Signature - -```php -public static function createPaymentPrompt( - string $forSituation, - array $actions, - ?string $cardType = NULL, - ?string $errorType = NULL -): array -``` - -#### Parameters - - - - - actions with 'type'/'phrase' keys. - - - - space-separated card types. - - - - space-separated error types. - - -#### Returns - -`array` - -#### Source - -[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) - -Line 1104. - -*** - -### enableExtensiveData - -#### Signature - -```php -public function enableExtensiveData( - bool $enabled = true -): SignalWire\SWAIG\FunctionResult -``` - -#### Parameters - - - -#### Returns - -`SignalWire\SWAIG\FunctionResult` - -#### Source - -[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) - -Line 475. - -*** - -### enableFunctionsOnTimeout - -#### Signature - -```php -public function enableFunctionsOnTimeout( - bool $enabled = true -): SignalWire\SWAIG\FunctionResult -``` - -#### Parameters - - - -#### Returns - -`SignalWire\SWAIG\FunctionResult` - -#### Source - -[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) - -Line 468. - -*** - -### executeRpc - -Execute an RPC method on a call using SWML. - -Parity with the Python reference `execute_rpc`: the rpc params are -keyed \{method, call\_id?, node\_id?, params?\} (call\_id/node\_id are -TOP-LEVEL siblings of method/params, NOT nested inside params) and the -\{"execute\_rpc": ...\} verb is wrapped in a full SWML document. There is -no `jsonrpc` envelope — method strings are bare (e.g. "dial", not -"calling.dial"). - -#### Signature - -```php -public function executeRpc( - string $method, - ?array $params = NULL, - ?string $callId = NULL, - ?string $nodeId = NULL -): SignalWire\SWAIG\FunctionResult -``` - -#### Parameters - - - - - optional RPC method parameters. - - - - - - -#### Returns - -`SignalWire\SWAIG\FunctionResult` - -#### Source - -[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) - -Line 1010. - -*** - -### executeSwml - -Execute SWML content with optional transfer behavior. Parity with the - -Python reference `execute_swml`: a string is parsed to an array (on parse -failure it is wrapped as \{"raw\_swml": <text>\}); when $transfer is true the -key "transfer" => "true" is set INSIDE the SWML document; the action is -ALWAYS added under the "SWML" key (there is no separate transfer key). - -#### Signature - -```php -public function executeSwml( - $swmlContent, - bool $transfer = false -): SignalWire\SWAIG\FunctionResult -``` - -#### Parameters - - - SWML JSON string or already-decoded array. - - - - -#### Returns - -`SignalWire\SWAIG\FunctionResult` - -#### Source - -[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) - -Line 499. - -*** - -### hangup - -#### Signature - -```php -public function hangup(): SignalWire\SWAIG\FunctionResult -``` - -#### Returns - -`SignalWire\SWAIG\FunctionResult` - -#### Source - -[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) - -Line 129. - -*** - -### hold - -#### Signature - -```php -public function hold(int $timeout = 300): SignalWire\SWAIG\FunctionResult -``` - -#### Parameters - - - -#### Returns - -`SignalWire\SWAIG\FunctionResult` - -#### Source - -[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) - -Line 136. - -*** - -### joinConference - -Join an ad-hoc audio conference with RELAY and CXML calls using SWML. - -Full parity with signalwire-python core/function\_result.py -`join_conference`: 18 optional parameters, 7 validations, and the -same simple/full emission. When every parameter is at its default the -payload collapses to the bare conference-NAME string -(\{"join\_conference": "<name>"\}); otherwise it is the object form keyed -by snake\_case wire keys, with each key emitted only when it differs -from its default. The \{"join\_conference": ...\} payload is wrapped in a -full SWML document and emitted through \{@see FunctionResult::executeSwml()\} -— the same path Python's `record_call` uses — so it lands under the -"SWML" action key. - -Note: Python uses `wait_url` (SWML URL) for hold music; there is no -`hold_audio` parameter. (The previously-invented `holdAudio`/`hold_audio` -had no Python equivalent and was removed.) - -#### Signature - -```php -public function joinConference( - string $name, - bool $muted = false, - string $beep = 'true', - bool $startOnEnter = true, - bool $endOnExit = false, - ?string $waitUrl = NULL, - int $maxParticipants = 250, - string $record = 'do-not-record', - ?string $region = NULL, - string $trim = 'trim-silence', - ?string $coach = NULL, - ?string $statusCallbackEvent = NULL, - ?string $statusCallback = NULL, - string $statusCallbackMethod = 'POST', - ?string $recordingStatusCallback = NULL, - string $recordingStatusCallbackMethod = 'POST', - string $recordingStatusCallbackEvent = 'completed', - mixed $result = NULL -): SignalWire\SWAIG\FunctionResult -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Switch on return\_value when object \{\} or cond when array \[]; null to omit (parity with Python `Optional[Any]`). - - -#### Returns - -`SignalWire\SWAIG\FunctionResult` - -#### Throws - -- `\InvalidArgumentException` — on any of the 7 validation failures. - -#### Source - -[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) - -Line 554. - -*** - -### joinRoom - -#### Signature - -```php -public function joinRoom(string $name): SignalWire\SWAIG\FunctionResult -``` - -#### Parameters - - - -#### Returns - -`SignalWire\SWAIG\FunctionResult` - -#### Source - -[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) - -Line 721. - -*** - -### pay - -Process payment using the SWML pay action. - -Full parity with the Python reference `pay` (19 user-facing params): the -SWML document runs `{set:{ai_response}}` then `{pay:{...}}`. The wire key -for the collection method is `input` (NOT `input_method`); numeric and -boolean fields are stringified ("5"/"true"); `postal_code` is emitted as a -lowercased bool-string when a bool, or verbatim when a string. Optional -fields (status\_url/charge\_amount/description/parameters/prompts) are -emitted only when supplied. - -#### Signature - -```php -public function pay( - string $paymentConnectorUrl, - string $inputMethod = 'dtmf', - ?string $statusUrl = NULL, - string $paymentMethod = 'credit-card', - int $timeout = 5, - int $maxAttempts = 1, - bool $securityCode = true, - string|bool $postalCode = true, - int $minPostalCodeLength = 0, - string $tokenType = 'reusable', - ?string $chargeAmount = NULL, - string $currency = 'usd', - string $language = 'en-US', - string $voice = 'woman', - ?string $description = NULL, - string $validCardTypes = 'visa mastercard amex', - ?array $parameters = NULL, - ?array $prompts = NULL, - ?string $aiResponse = 'The payment status is ${pay_result}, do not mention anything else about collecting payment if successful.' -): SignalWire\SWAIG\FunctionResult -``` - -#### Parameters - - - - - - - - - - - - - - - - - prompt-for-postal (bool) or an actual postcode (string). - - - - - - - - - - - - - - - - - - - - name/value pairs for the connector. - - - - custom prompt configs. - - - - -#### Returns - -`SignalWire\SWAIG\FunctionResult` - -#### Source - -[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) - -Line 924. - -*** - -### playBackgroundFile - -#### Signature - -```php -public function playBackgroundFile( - string $filename, - bool $wait = false -): SignalWire\SWAIG\FunctionResult -``` - -#### Parameters - - - - - -#### Returns - -`SignalWire\SWAIG\FunctionResult` - -#### Source - -[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) - -Line 298. - -*** - -### recordCall - -Start background call recording using SWML. - -Full parity with the Python reference `record_call`: validates the -format (\{wav,mp3,mp4\}) and direction (\{speak,listen,both\}) closed sets, -ALWAYS emits stereo/format/direction/beep/input\_sensitivity, adds the -optional fields only when supplied, and wraps the \{"record\_call": ...\} -verb in a full SWML document emitted via \{@see FunctionResult::executeSwml()\} -(so it lands under the "SWML" action key). - -#### Signature - -```php -public function recordCall( - ?string $controlId = NULL, - bool $stereo = false, - SignalWire\SWAIG\RecordFormat|string $format = 'wav', - SignalWire\SWAIG\RecordDirection|string $direction = 'both', - ?string $terminators = NULL, - bool $beep = false, - float $inputSensitivity = 44.0, - ?float $initialTimeout = NULL, - ?float $endSilenceTimeout = NULL, - ?float $maxLength = NULL, - ?string $statusUrl = NULL -): SignalWire\SWAIG\FunctionResult -``` - -#### Parameters - - - - - - - recording container format — the typed \{@see RecordFormat\} enum (typo-checked at the call site) or a bare string (parity with Python's `record_call`). Normalized to the wire string ('wav'/'mp3'/'mp4'). 'mp4' is valid for the SWML `record_call` verb, distinct from the RELAY `record` action's 2-value format set. - - - - stream direction — the typed \{@see RecordDirection\} enum (typo-checked at the call site) or a bare string (parity with Python's `record_call`). Normalized to the wire string ('speak'/'listen'/'both'). Note `record_call` uses 'listen' where \{@see FunctionResult::tap()\} uses 'hear' — distinct closed sets. - - - - - - - - - - - - - - - - -#### Returns - -`SignalWire\SWAIG\FunctionResult` - -#### Throws - -- `\InvalidArgumentException` — on an invalid format or direction. - -#### Source - -[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) - -Line 339. - -*** - -### removeGlobalData - -#### Signature - -```php -public function removeGlobalData(array|string $keys): SignalWire\SWAIG\FunctionResult -``` - -#### Parameters - - - single key or list of keys to remove - - -#### Returns - -`SignalWire\SWAIG\FunctionResult` - -#### Source - -[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) - -Line 181. - -*** - -### removeMetadata - -#### Signature - -```php -public function removeMetadata(array|string $keys): SignalWire\SWAIG\FunctionResult -``` - -#### Parameters - - - single key or list of keys to remove - - -#### Returns - -`SignalWire\SWAIG\FunctionResult` - -#### Source - -[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) - -Line 198. - -*** - -### replaceInHistory - -After first send, replace the tool\_call+result pair in history. - -#### Signature - -```php -public function replaceInHistory( - string|bool $text = true -): SignalWire\SWAIG\FunctionResult -``` - -#### Parameters - - - String -> replace the tool\_call with an assistant message containing this text. True (default) -> remove the pair entirely. - - -#### Returns - -`SignalWire\SWAIG\FunctionResult` - -#### Source - -[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) - -Line 282. - -*** - -### rpcAiMessage - -Inject a message into an AI agent on another call using execute\_rpc. - -Parity: method="ai\_message", call\_id top-level, params=\{role, -message\_text\}. `role` defaults to "system". - -#### Signature - -```php -public function rpcAiMessage( - string $callId, - string $messageText, - string $role = 'system' -): SignalWire\SWAIG\FunctionResult -``` - -#### Parameters - - - - - - - -#### Returns - -`SignalWire\SWAIG\FunctionResult` - -#### Source - -[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) - -Line 1068. - -*** - -### rpcAiUnhold - -Unhold another call using execute\_rpc. - -Parity: method="ai\_unhold", call\_id top-level, params=\{\}. - -#### Signature - -```php -public function rpcAiUnhold(string $callId): SignalWire\SWAIG\FunctionResult -``` - -#### Parameters - - - -#### Returns - -`SignalWire\SWAIG\FunctionResult` - -#### Source - -[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) - -Line 1080. - -*** - -### rpcDial - -Dial out to a number with a destination SWML URL using execute\_rpc. - -Parity: method="dial", params=\{devices:\{type,params:\{to\_number, -from\_number\}\}, dest\_swml\}. - -#### Signature - -```php -public function rpcDial( - string $toNumber, - string $fromNumber, - string $destSwml, - string $deviceType = 'phone' -): SignalWire\SWAIG\FunctionResult -``` - -#### Parameters - - - - - - - - - -#### Returns - -`SignalWire\SWAIG\FunctionResult` - -#### Source - -[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) - -Line 1045. - -*** - -### say - -#### Signature - -```php -public function say(string $text): SignalWire\SWAIG\FunctionResult -``` - -#### Parameters - - - -#### Returns - -`SignalWire\SWAIG\FunctionResult` - -#### Source - -[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) - -Line 292. - -*** - -### sendSms - -Send a text message to a PSTN phone number using SWML. - -Full parity with the Python reference `send_sms`: either body or media -(or both) must be provided; the \{"send\_sms": ...\} verb is wrapped in a -full SWML document via executeSwml. Optional fields (body/media/tags/ -region) are emitted only when supplied. - -#### Signature - -```php -public function sendSms( - string $toNumber, - string $fromNumber, - ?string $body = NULL, - array $media = array ( -), - array $tags = array ( -), - ?string $region = NULL -): SignalWire\SWAIG\FunctionResult -``` - -#### Parameters - - - - - - - - - URLs to send (optional if $body is given). - - - - tags for UI searching. - - - - -#### Returns - -`SignalWire\SWAIG\FunctionResult` - -#### Throws - -- `\InvalidArgumentException` — if neither body nor media is provided. - -#### Source - -[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) - -Line 866. - -*** - -### setEndOfSpeechTimeout - -#### Signature - -```php -public function setEndOfSpeechTimeout(int $ms): SignalWire\SWAIG\FunctionResult -``` - -#### Parameters - - - -#### Returns - -`SignalWire\SWAIG\FunctionResult` - -#### Source - -[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) - -Line 446. - -*** - -### setMetadata - -#### Signature - -```php -public function setMetadata(array $data): SignalWire\SWAIG\FunctionResult -``` - -#### Parameters - - - -#### Returns - -`SignalWire\SWAIG\FunctionResult` - -#### Source - -[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) - -Line 189. - -*** - -### setPostProcess - -#### Signature - -```php -public function setPostProcess(bool $val): SignalWire\SWAIG\FunctionResult -``` - -#### Parameters - - - -#### Returns - -`SignalWire\SWAIG\FunctionResult` - -#### Source - -[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) - -Line 27. - -*** - -### setResponse - -#### Signature - -```php -public function setResponse(string $text): SignalWire\SWAIG\FunctionResult -``` - -#### Parameters - - - -#### Returns - -`SignalWire\SWAIG\FunctionResult` - -#### Source - -[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) - -Line 21. - -*** - -### setSpeechEventTimeout - -#### Signature - -```php -public function setSpeechEventTimeout(int $ms): SignalWire\SWAIG\FunctionResult -``` - -#### Parameters - - - -#### Returns - -`SignalWire\SWAIG\FunctionResult` - -#### Source - -[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) - -Line 452. - -*** - -### simulateUserInput - -#### Signature - -```php -public function simulateUserInput(string $text): SignalWire\SWAIG\FunctionResult -``` - -#### Parameters - - - -#### Returns - -`SignalWire\SWAIG\FunctionResult` - -#### Source - -[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) - -Line 1085. - -*** - -### sipRefer - -#### Signature - -```php -public function sipRefer(string $toUri): SignalWire\SWAIG\FunctionResult -``` - -#### Parameters - - - -#### Returns - -`SignalWire\SWAIG\FunctionResult` - -#### Source - -[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) - -Line 736. - -*** - -### stop - -#### Signature - -```php -public function stop(): SignalWire\SWAIG\FunctionResult -``` - -#### Returns - -`SignalWire\SWAIG\FunctionResult` - -#### Source - -[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) - -Line 164. - -*** - -### stopBackgroundFile - -#### Signature - -```php -public function stopBackgroundFile(): SignalWire\SWAIG\FunctionResult -``` - -#### Returns - -`SignalWire\SWAIG\FunctionResult` - -#### Source - -[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) - -Line 310. - -*** - -### stopRecordCall - -#### Signature - -```php -public function stopRecordCall( - ?string $controlId = NULL -): SignalWire\SWAIG\FunctionResult -``` - -#### Parameters - - - -#### Returns - -`SignalWire\SWAIG\FunctionResult` - -#### Source - -[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) - -Line 408. - -*** - -### stopTap - -#### Signature - -```php -public function stopTap(?string $controlId = NULL): SignalWire\SWAIG\FunctionResult -``` - -#### Parameters - - - -#### Returns - -`SignalWire\SWAIG\FunctionResult` - -#### Source - -[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) - -Line 834. - -*** - -### switchContext - -#### Signature - -```php -public function switchContext( - string $systemPrompt, - string $userPrompt = '', - bool $consolidate = false, - bool $fullReset = false, - bool $isolated = false -): SignalWire\SWAIG\FunctionResult -``` - -#### Parameters - - - - - - - - - - - -#### Returns - -`SignalWire\SWAIG\FunctionResult` - -#### Source - -[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) - -Line 238. - -*** - -### swmlChangeContext - -#### Signature - -```php -public function swmlChangeContext(string $contextName): SignalWire\SWAIG\FunctionResult -``` - -#### Parameters - - - -#### Returns - -`SignalWire\SWAIG\FunctionResult` - -#### Source - -[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) - -Line 231. - -*** - -### swmlChangeStep - -#### Signature - -```php -public function swmlChangeStep(string $stepName): SignalWire\SWAIG\FunctionResult -``` - -#### Parameters - - - -#### Returns - -`SignalWire\SWAIG\FunctionResult` - -#### Source - -[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) - -Line 224. - -*** - -### swmlTransfer - -Add a SWML transfer action with AI-response setup for when the transfer - -completes. Parity with the Python reference `swml_transfer`: builds a SWML -document whose `main` runs `{set:{ai_response}}` then `{transfer:{dest}}`, -and emits a top-level `transfer` = str($final).lower() that marks the call -(non-)final. `$final` defaults TRUE (permanent transfer), same as connect(). - -#### Signature - -```php -public function swmlTransfer( - string $dest, - string $aiResponse, - bool $final = true -): SignalWire\SWAIG\FunctionResult -``` - -#### Parameters - - - - - - - -#### Returns - -`SignalWire\SWAIG\FunctionResult` - -#### Source - -[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) - -Line 111. - -*** - -### swmlUserEvent - -#### Signature - -```php -public function swmlUserEvent(array $eventData): SignalWire\SWAIG\FunctionResult -``` - -#### Parameters - - - -#### Returns - -`SignalWire\SWAIG\FunctionResult` - -#### Source - -[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) - -Line 206. - -*** - -### tap - -Start background call tap using SWML. - -Full parity with the Python reference `tap`: validates direction -(\{speak,hear,both\}), codec (\{PCMU,PCMA\}) and rtp\_ptime (> 0); the only -always-emitted field is `uri`; control\_id/direction/codec/rtp\_ptime/ -status\_url are added only when they differ from their defaults; the -\{"tap": ...\} verb is wrapped in a full SWML document via executeSwml. - -#### Signature - -```php -public function tap( - string $uri, - ?string $controlId = NULL, - SignalWire\SWAIG\TapDirection|string $direction = 'both', - SignalWire\SWAIG\Codec|string $codec = 'PCMU', - int $rtpPtime = 20, - ?string $statusUrl = NULL -): SignalWire\SWAIG\FunctionResult -``` - -#### Parameters - - - - - - - stream direction — the typed \{@see TapDirection\} enum (typo-checked at the call site) or a bare string (parity with Python's `tap`). Normalized to the wire string ('speak'/'hear'/'both'). - - - - media codec — the typed \{@see Codec\} enum (typo-checked at the call site) or a bare string (parity with Python's `tap`). Normalized to the wire string ('PCMU'/'PCMA'). This is the SWAIG tap codec set only, NOT the larger RELAY stream/connect codec superset. - - - - - - -#### Returns - -`SignalWire\SWAIG\FunctionResult` - -#### Throws - -- `\InvalidArgumentException` — on invalid direction, codec, or rtp\_ptime. - -#### Source - -[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) - -Line 770. - -*** - -### toArray - -#### Signature - -```php -public function toArray(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) - -Line 47. - -*** - -### toggleFunctions - -#### Signature - -```php -public function toggleFunctions(array $toggles): SignalWire\SWAIG\FunctionResult -``` - -#### Parameters - - - -#### Returns - -`SignalWire\SWAIG\FunctionResult` - -#### Source - -[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) - -Line 458. - -*** - -### toJson - -#### Signature - -```php -public function toJson(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) - -Line 73. - -*** - -### updateGlobalData - -#### Signature - -```php -public function updateGlobalData(array $data): SignalWire\SWAIG\FunctionResult -``` - -#### Parameters - - - -#### Returns - -`SignalWire\SWAIG\FunctionResult` - -#### Source - -[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) - -Line 172. - -*** - -### updateSettings - -#### Signature - -```php -public function updateSettings(array $settings): SignalWire\SWAIG\FunctionResult -``` - -#### Parameters - - - -#### Returns - -`SignalWire\SWAIG\FunctionResult` - -#### Source - -[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) - -Line 481. - -*** - -### waitForUser - -#### Signature - -```php -public function waitForUser( - ?bool $enabled = NULL, - ?int $timeout = NULL, - bool $answerFirst = false -): SignalWire\SWAIG\FunctionResult -``` - -#### Parameters - - - - - - - -#### Returns - -`SignalWire\SWAIG\FunctionResult` - -#### Source - -[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) - -Line 145. - -## Source - -[`SignalWire/SWAIG/FunctionResult.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/FunctionResult.php) - -Line 7. diff --git a/fern/products/sdk-reference/php/signal-wire/swaig/swaig/index.mdx b/fern/products/sdk-reference/php/signal-wire/swaig/swaig/index.mdx deleted file mode 100644 index f96e97abee..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/swaig/swaig/index.mdx +++ /dev/null @@ -1,512 +0,0 @@ ---- -slug: "/reference/php/signal-wire/swaig/swaig" -title: "SWAIG" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "module" - language: "php" - qualified_name: "SignalWire\\SWAIG" - module: "SignalWire.SWAIG" ---- -# `SWAIG` - -## Signature - -```php -namespace SignalWire\SWAIG -``` - -## Classes - - - - - - Fluent, type-safe builder for a SWAIG tool's parameter schema. - - - -## Enums - -### Codec - -Media codec for call tapping, as a typed, compile-time-checked closed set. - -\{@see FunctionResult::tap()\} accepts this enum OR a string for its `$codec` -argument. The enum gives editor autocompletion and makes a typo fail at the -call site; strings keep parity with the Python reference (`tap` takes a bare -`str`). - -``` -$result->tap($uri, codec: Codec::Pcma); // typed -$result->tap($uri, codec: 'PCMA'); // string (parity) -``` - -The two members are the only codecs the Python reference's `tap` accepts -(`["PCMU", "PCMA"]`). The wire strings are upper-case and matching is -case-sensitive, mirroring the reference's literal list. - -NOTE: this is the SWAIG `tap` codec set ONLY. It is deliberately NOT shared -with the RELAY `stream`/`connect` codec superset -(`{PCMU,PCMA,OPUS,G729,G722,VP8,H264}`, comma-joinable) — those are a -distinct, larger vocabulary and must not be unified with this 2-value set. - -- `Pcmu` — `PCMU` (G.711 µ-law, the default). -- `Pcma` — `PCMA` (G.711 A-law). - -#### Signature - -```php -final enum Codec implements UnitEnum, BackedEnum -``` - -#### Inheritance - -**Implements:** `UnitEnum`, `BackedEnum` - -#### Properties - - - - - -#### Constants - - - - - -#### Variants - - - - - -#### Methods - -##### cases - -**Modifiers:** `static` - -###### Signature - -```php -public static function cases(): array -``` - -###### Returns - -`array` - -*** - -##### from - -**Modifiers:** `static` - -###### Signature - -```php -public static function from(string|int $value): static -``` - -###### Parameters - - - -###### Returns - -`static` - -*** - -##### tryFrom - -**Modifiers:** `static` - -###### Signature - -```php -public static function tryFrom(string|int $value): ?static -``` - -###### Parameters - - - -###### Returns - -`?static` - -#### Source - -[`SignalWire/SWAIG/Codec.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/Codec.php) - -Line 30. - -*** - -### RecordDirection - -Audio-stream direction for call recording, as a typed, compile-time-checked - -closed set. - -\{@see FunctionResult::recordCall()\} accepts this enum OR a string for its -`$direction` argument. The enum gives editor autocompletion and makes a typo -fail at the call site; strings keep parity with the Python reference -(`record_call` takes a bare `str`). - -``` -$result->recordCall(direction: RecordDirection::Listen); // typed -$result->recordCall(direction: 'listen'); // string (parity) -``` - -The three members are the only directions the Python reference's `record_call` -accepts (`["speak", "listen", "both"]`). Note this set uses `listen`, which -differs from \{@see TapDirection\} — the `tap` set uses `hear`. They are -deliberately separate enums because the reference validates two distinct lists. -The backing values are the exact wire strings. - -- `Speak` — audio the far end hears from the agent. -- `Listen` — audio the agent hears from the far end. -- `Both` — bidirectional (the default). - -#### Signature - -```php -final enum RecordDirection implements UnitEnum, BackedEnum -``` - -#### Inheritance - -**Implements:** `UnitEnum`, `BackedEnum` - -#### Properties - - - - - -#### Constants - - - - - - - -#### Variants - - - - - - - -#### Methods - -##### cases - -**Modifiers:** `static` - -###### Signature - -```php -public static function cases(): array -``` - -###### Returns - -`array` - -*** - -##### from - -**Modifiers:** `static` - -###### Signature - -```php -public static function from(string|int $value): static -``` - -###### Parameters - - - -###### Returns - -`static` - -*** - -##### tryFrom - -**Modifiers:** `static` - -###### Signature - -```php -public static function tryFrom(string|int $value): ?static -``` - -###### Parameters - - - -###### Returns - -`?static` - -#### Source - -[`SignalWire/SWAIG/RecordDirection.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/RecordDirection.php) - -Line 29. - -*** - -### RecordFormat - -Recording container format for call recording, as a typed, - -compile-time-checked closed set. - -\{@see FunctionResult::recordCall()\} accepts this enum OR a string for its -`$format` argument. The enum gives editor autocompletion and makes a typo -fail at the call site; strings keep parity with the Python reference -(`record_call` takes a bare `str`). - -``` -$result->recordCall(format: RecordFormat::Mp3); // typed -$result->recordCall(format: 'mp3'); // string (parity) -``` - -The three members are the only formats the Python reference's `record_call` -accepts (`["wav", "mp3", "mp4"]` — the SWML `record_call` verb schema; `mp4` -is valid here, distinct from the RELAY `record` action's 2-value -`audio.format` set). The backing values are the exact wire strings. - -- `Wav` — WAV container (the default). -- `Mp3` — MP3 container. -- `Mp4` — MP4 container. - -#### Signature - -```php -final enum RecordFormat implements UnitEnum, BackedEnum -``` - -#### Inheritance - -**Implements:** `UnitEnum`, `BackedEnum` - -#### Properties - - - - - -#### Constants - - - - - - - -#### Variants - - - - - - - -#### Methods - -##### cases - -**Modifiers:** `static` - -###### Signature - -```php -public static function cases(): array -``` - -###### Returns - -`array` - -*** - -##### from - -**Modifiers:** `static` - -###### Signature - -```php -public static function from(string|int $value): static -``` - -###### Parameters - - - -###### Returns - -`static` - -*** - -##### tryFrom - -**Modifiers:** `static` - -###### Signature - -```php -public static function tryFrom(string|int $value): ?static -``` - -###### Parameters - - - -###### Returns - -`?static` - -#### Source - -[`SignalWire/SWAIG/RecordFormat.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/RecordFormat.php) - -Line 28. - -*** - -### TapDirection - -Audio-stream direction for call tapping, as a typed, compile-time-checked - -closed set. - -\{@see FunctionResult::tap()\} accepts this enum OR a string for its -`$direction` argument. The enum gives editor autocompletion and makes a typo -fail at the call site; strings keep parity with the Python reference (`tap` -takes a bare `str`). - -``` -$result->tap($uri, direction: TapDirection::Speak); // typed -$result->tap($uri, direction: 'speak'); // string (parity) -``` - -The three members are the only directions the Python reference's `tap` accepts -(`["speak", "hear", "both"]`). Note this set uses `hear`, which differs from -\{@see RecordDirection\} — the `record_call` set uses `listen`. They are -deliberately separate enums because the reference validates two distinct lists. -The backing values are the exact wire strings. - -- `Speak` — audio the far end hears from the agent. -- `Hear` — audio the agent hears from the far end. -- `Both` — bidirectional (the default). - -#### Signature - -```php -final enum TapDirection implements UnitEnum, BackedEnum -``` - -#### Inheritance - -**Implements:** `UnitEnum`, `BackedEnum` - -#### Properties - - - - - -#### Constants - - - - - - - -#### Variants - - - - - - - -#### Methods - -##### cases - -**Modifiers:** `static` - -###### Signature - -```php -public static function cases(): array -``` - -###### Returns - -`array` - -*** - -##### from - -**Modifiers:** `static` - -###### Signature - -```php -public static function from(string|int $value): static -``` - -###### Parameters - - - -###### Returns - -`static` - -*** - -##### tryFrom - -**Modifiers:** `static` - -###### Signature - -```php -public static function tryFrom(string|int $value): ?static -``` - -###### Parameters - - - -###### Returns - -`?static` - -#### Source - -[`SignalWire/SWAIG/TapDirection.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/TapDirection.php) - -Line 29. diff --git a/fern/products/sdk-reference/php/signal-wire/swaig/swaig/parameter-schema/index.mdx b/fern/products/sdk-reference/php/signal-wire/swaig/swaig/parameter-schema/index.mdx deleted file mode 100644 index cce15968d9..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/swaig/swaig/parameter-schema/index.mdx +++ /dev/null @@ -1,535 +0,0 @@ ---- -slug: "/reference/php/signal-wire/swaig/swaig/parameter-schema" -title: "ParameterSchema" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\SWAIG\\ParameterSchema" - parent: "SignalWire\\SWAIG" - module: "SignalWire.SWAIG" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/ParameterSchema.php" ---- -# `ParameterSchema` - -Fluent, type-safe builder for a SWAIG tool's parameter schema. - -Defining a tool's parameters today means hand-writing the JSON-Schema -`properties` blob as a nested associative array — exactly the shape -\{@see \SignalWire\SWML\Service::defineTool()\} expects for its -`$parameters` argument: - -``` -$agent->defineTool('lookup', 'Look it up', [ - 'service' => ['type' => 'string', 'description' => 'The service'], - 'date' => ['type' => 'string', 'description' => 'YYYY-MM-DD'], -], $handler); -``` - -That untyped array is error-prone: a misspelled `'tpye'`, a wrong -nesting level, or an `enum` value that drifts from a closed set fails -silently at runtime (the model just sees a malformed schema). This -builder produces the **byte-identical** `properties` map type-safely — -one method per JSON-Schema property kind, with the kind, description, -and modifiers checked at the call site: - -``` -$params = ParameterSchema::create() - ->string('service', 'The service to look up') - ->string('date', 'YYYY-MM-DD') - ->enum('fmt', RecordFormat::cases(), 'Recording format') - ->required('service', 'date') - ->toArray(); // <- same array as the hand-written form - -$agent->defineTool('lookup', 'Look it up', $params, $handler); -``` - -This is a typed convenience over the SAME wire output, NOT a new -format. The untyped-array path keeps working unchanged; the builder is -purely additive (Python's reference takes a bare `Dict[str, Any]`, so -there is no Python equivalent — see PORT\_ADDITIONS.md). - -Two outputs, matching the two registration paths: - -- \{@see toArray()\} returns the bare `properties` map for the - `defineTool($name, $desc, $parameters, …)` slot. Per-`defineTool` - convention the schema-level `required` list has no home there, so - `required()` names are emitted as a per-property `'required' => true` - flag (the convention used by the built-in Math / WikipediaSearch - skills). -- \{@see toArgument()\} returns the full `argument` object - `{type: object, properties: {…}, required: […]}` for the - `registerSwaigFunction()` path, with `required` at the argument - level — byte-identical to the hand-written `argument` blocks (the - Joke / ApiNinjasTrivia / GoogleMaps skills). - -Each property carries a kind + description and accepts optional -modifiers (default, enum, format, nested items/object). Closed-set -enums integrate the Tier-1 typed enums -(\{@see RecordFormat\} / \{@see RecordDirection\} / \{@see TapDirection\} / -\{@see Codec\}) via \{@see enum()\} — pass `RecordFormat::cases()` and the -backing `->value` strings become the schema `enum` array. - -**Modifiers:** `final` - -## Signature - -```php -final class ParameterSchema -``` - -## Methods - -### array - -Add an `array` property whose elements are all of kind `$itemsKind` - -(`string`, `number`, `integer`, `boolean`, or `object`). - -For `object` items, pass a nested \{@see ParameterSchema\} via -`$opts['items_schema']` to describe the element shape. - -#### Signature - -```php -public function array( - string $name, - string $itemsKind, - string $description, - array $opts = array ( -) -): SignalWire\SWAIG\ParameterSchema -``` - -#### Parameters - - - - - - - - - -#### Returns - -`SignalWire\SWAIG\ParameterSchema` - -#### Source - -[`SignalWire/SWAIG/ParameterSchema.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/ParameterSchema.php) - -Line 164. - -*** - -### boolean - -Add a `boolean` property. - -#### Signature - -```php -public function boolean( - string $name, - string $description, - array $opts = array ( -) -): SignalWire\SWAIG\ParameterSchema -``` - -#### Parameters - - - - - - - -#### Returns - -`SignalWire\SWAIG\ParameterSchema` - -#### Source - -[`SignalWire/SWAIG/ParameterSchema.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/ParameterSchema.php) - -Line 121. - -*** - -### create - -Start a new, empty schema builder. - -**Modifiers:** `static` - -#### Signature - -```php -public static function create(): SignalWire\SWAIG\ParameterSchema -``` - -#### Returns - -`SignalWire\SWAIG\ParameterSchema` - -#### Source - -[`SignalWire/SWAIG/ParameterSchema.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/ParameterSchema.php) - -Line 81. - -*** - -### enum - -Add a closed-set `string` property whose value must be one of - -`$values`. - -The JSON-Schema kind is `string` with an `enum` constraint — the -wire shape the built-in skills already emit (e.g. Joke's -`{'type':'string','description':…,'enum':['jokes','dadjokes']}`). - -`$values` accepts: - -- a list of scalar wire values: `['jokes', 'dadjokes']`; -- the Tier-1 typed enums via `cases()`: `RecordFormat::cases()` — - each `\BackedEnum` is normalized to its backing `->value`, so - the typo-checked enum and the bare-string form produce the - SAME `enum` array. - -#### Signature - -```php -public function enum( - string $name, - array $values, - string $description, - array $opts = array ( -) -): SignalWire\SWAIG\ParameterSchema -``` - -#### Parameters - - - - - - - - - -#### Returns - -`SignalWire\SWAIG\ParameterSchema` - -#### Source - -[`SignalWire/SWAIG/ParameterSchema.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/ParameterSchema.php) - -Line 144. - -*** - -### integer - -Add an `integer` property. - -#### Signature - -```php -public function integer( - string $name, - string $description, - array $opts = array ( -) -): SignalWire\SWAIG\ParameterSchema -``` - -#### Parameters - - - - - - - -#### Returns - -`SignalWire\SWAIG\ParameterSchema` - -#### Source - -[`SignalWire/SWAIG/ParameterSchema.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/ParameterSchema.php) - -Line 111. - -*** - -### number - -Add a `number` property (JSON-Schema `number`: any numeric value). - -#### Signature - -```php -public function number( - string $name, - string $description, - array $opts = array ( -) -): SignalWire\SWAIG\ParameterSchema -``` - -#### Parameters - - - - - - - -#### Returns - -`SignalWire\SWAIG\ParameterSchema` - -#### Source - -[`SignalWire/SWAIG/ParameterSchema.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/ParameterSchema.php) - -Line 101. - -*** - -### object - -Add a nested `object` property described by another - -\{@see ParameterSchema\} (`$schema`). The nested schema's `required` -names are emitted at the nested-object level. - -#### Signature - -```php -public function object( - string $name, - SignalWire\SWAIG\ParameterSchema $schema, - string $description, - array $opts = array ( -) -): SignalWire\SWAIG\ParameterSchema -``` - -#### Parameters - - - - - - - - - -#### Returns - -`SignalWire\SWAIG\ParameterSchema` - -#### Source - -[`SignalWire/SWAIG/ParameterSchema.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/ParameterSchema.php) - -Line 194. - -*** - -### required - -Flag one or more already-declared (or yet-to-be-declared) property - -names as required. Idempotent; preserves first-seen order. - -#### Signature - -```php -public function required(string ...$names): SignalWire\SWAIG\ParameterSchema -``` - -#### Parameters - - - -#### Returns - -`SignalWire\SWAIG\ParameterSchema` - -#### Source - -[`SignalWire/SWAIG/ParameterSchema.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/ParameterSchema.php) - -Line 204. - -*** - -### requiredNames - -The required-property names, in declaration order. - -#### Signature - -```php -public function requiredNames(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/SWAIG/ParameterSchema.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/ParameterSchema.php) - -Line 270. - -*** - -### string - -Add a `string` property. - -#### Signature - -```php -public function string( - string $name, - string $description, - array $opts = array ( -) -): SignalWire\SWAIG\ParameterSchema -``` - -#### Parameters - - - - - - - -#### Returns - -`SignalWire\SWAIG\ParameterSchema` - -#### Source - -[`SignalWire/SWAIG/ParameterSchema.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/ParameterSchema.php) - -Line 91. - -*** - -### toArgument - -The full JSON-Schema `argument` object: - -`{type: 'object', properties: {…}}`, plus a top-level `required` -list when any names were flagged. - -Byte-identical to the hand-written `argument` blocks used with -\{@see \SignalWire\SWML\Service::registerSwaigFunction()\} (the Joke / -ApiNinjasTrivia / GoogleMaps skills). Here `required` lives at the -argument level, so individual properties are NOT marked — use this -form, not \{@see toArray()\}, when you want the schema-level list. - -#### Signature - -```php -public function toArgument(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/SWAIG/ParameterSchema.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/ParameterSchema.php) - -Line 253. - -*** - -### toArray - -The bare JSON-Schema `properties` map — the value - -\{@see \SignalWire\SWML\Service::defineTool()\} expects for its -`$parameters` argument. - -Byte-identical to the hand-written nested-array form. Because the -`defineTool` slot carries no schema-level `required`, names passed -to \{@see required()\} surface as a per-property `'required' => true` -flag on each matching property (the Math / WikipediaSearch skill -convention). Use \{@see toArgument()\} when you want the schema-level -`required` list instead. - -#### Signature - -```php -public function toArray(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/SWAIG/ParameterSchema.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/ParameterSchema.php) - -Line 228. - -## Source - -[`SignalWire/SWAIG/ParameterSchema.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWAIG/ParameterSchema.php) - -Line 62. diff --git a/fern/products/sdk-reference/php/signal-wire/swml/swml/document/index.mdx b/fern/products/sdk-reference/php/signal-wire/swml/swml/document/index.mdx deleted file mode 100644 index b6b8d8d7bc..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/swml/swml/document/index.mdx +++ /dev/null @@ -1,323 +0,0 @@ ---- -slug: "/reference/php/signal-wire/swml/swml/document" -title: "Document" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\SWML\\Document" - parent: "SignalWire\\SWML" - module: "SignalWire.SWML" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Document.php" ---- -# `Document` - -## Signature - -```php -class Document -``` - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct() -``` - -#### Source - -[`SignalWire/SWML/Document.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Document.php) - -Line 14. - -*** - -### addRawVerb - -Append a pre-formatted verb hash to a section. - -#### Signature - -```php -public function addRawVerb(string $section, array $verbHash): void -``` - -#### Parameters - - - - - -#### Source - -[`SignalWire/SWML/Document.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Document.php) - -Line 73. - -*** - -### addSection - -Add a new named section. Returns true if created, false if it already existed. - -#### Signature - -```php -public function addSection(string $name): bool -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`SignalWire/SWML/Document.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Document.php) - -Line 27. - -*** - -### addVerb - -Append a verb to the main section. - -#### Signature - -```php -public function addVerb(string $verbName, mixed $config): void -``` - -#### Parameters - - - - - -#### Source - -[`SignalWire/SWML/Document.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Document.php) - -Line 54. - -*** - -### addVerbToSection - -Append a verb to a named section. - -#### Signature - -```php -public function addVerbToSection( - string $section, - string $verbName, - mixed $config -): void -``` - -#### Parameters - - - - - - - -#### Source - -[`SignalWire/SWML/Document.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Document.php) - -Line 62. - -*** - -### clearSection - -Clear all verbs in a section. - -#### Signature - -```php -public function clearSection(string $section): void -``` - -#### Parameters - - - -#### Source - -[`SignalWire/SWML/Document.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Document.php) - -Line 84. - -*** - -### getVerbs - -Get a copy of the verbs for a section. - -#### Signature - -```php -public function getVerbs(string $section = 'main'): array -``` - -#### Parameters - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/SWML/Document.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Document.php) - -Line 46. - -*** - -### getVersion - -#### Signature - -```php -public function getVersion(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/SWML/Document.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Document.php) - -Line 19. - -*** - -### hasSection - -#### Signature - -```php -public function hasSection(string $name): bool -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`SignalWire/SWML/Document.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Document.php) - -Line 36. - -*** - -### render - -Compact JSON string. - -#### Signature - -```php -public function render(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/SWML/Document.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Document.php) - -Line 115. - -*** - -### renderPretty - -Pretty-printed JSON string. - -#### Signature - -```php -public function renderPretty(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/SWML/Document.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Document.php) - -Line 123. - -*** - -### reset - -Reset document to initial state. - -#### Signature - -```php -public function reset(): void -``` - -#### Source - -[`SignalWire/SWML/Document.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Document.php) - -Line 94. - -*** - -### toArray - -Return document as associative array. - -#### Signature - -```php -public function toArray(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/SWML/Document.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Document.php) - -Line 104. - -## Source - -[`SignalWire/SWML/Document.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Document.php) - -Line 7. diff --git a/fern/products/sdk-reference/php/signal-wire/swml/swml/index.mdx b/fern/products/sdk-reference/php/signal-wire/swml/swml/index.mdx deleted file mode 100644 index ed45b0589b..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/swml/swml/index.mdx +++ /dev/null @@ -1,29 +0,0 @@ ---- -slug: "/reference/php/signal-wire/swml/swml" -title: "SWML" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "module" - language: "php" - qualified_name: "SignalWire\\SWML" - module: "SignalWire.SWML" ---- -# `SWML` - -## Signature - -```php -namespace SignalWire\SWML -``` - -## Classes - - - - - - - - diff --git a/fern/products/sdk-reference/php/signal-wire/swml/swml/schema/index.mdx b/fern/products/sdk-reference/php/signal-wire/swml/swml/schema/index.mdx deleted file mode 100644 index 6dcf0a3cee..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/swml/swml/schema/index.mdx +++ /dev/null @@ -1,165 +0,0 @@ ---- -slug: "/reference/php/signal-wire/swml/swml/schema" -title: "Schema" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\SWML\\Schema" - parent: "SignalWire\\SWML" - module: "SignalWire.SWML" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Schema.php" ---- -# `Schema` - -## Signature - -```php -class Schema -``` - -## Methods - -### getVerb - -Get verb metadata, or null if not found. - -#### Signature - -```php -public function getVerb(string $name): ?array -``` - -#### Parameters - - - -#### Returns - -`?array` - -#### Source - -[`SignalWire/SWML/Schema.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Schema.php) - -Line 62. - -*** - -### getVerbNames - -Get sorted list of all verb names. - -#### Signature - -```php -public function getVerbNames(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/SWML/Schema.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Schema.php) - -Line 50. - -*** - -### instance - -**Modifiers:** `static` - -#### Signature - -```php -public static function instance(): SignalWire\SWML\Schema -``` - -#### Returns - -`SignalWire\SWML\Schema` - -#### Source - -[`SignalWire/SWML/Schema.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Schema.php) - -Line 21. - -*** - -### isValidVerb - -Check whether a verb name is valid. - -#### Signature - -```php -public function isValidVerb(string $name): bool -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`SignalWire/SWML/Schema.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Schema.php) - -Line 40. - -*** - -### reset - -Reset the singleton (for testing). - -**Modifiers:** `static` - -#### Signature - -```php -public static function reset(): void -``` - -#### Source - -[`SignalWire/SWML/Schema.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Schema.php) - -Line 32. - -*** - -### verbCount - -Number of verbs defined in the schema. - -#### Signature - -```php -public function verbCount(): int -``` - -#### Returns - -`int` - -#### Source - -[`SignalWire/SWML/Schema.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Schema.php) - -Line 70. - -## Source - -[`SignalWire/SWML/Schema.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Schema.php) - -Line 7. diff --git a/fern/products/sdk-reference/php/signal-wire/swml/swml/service/index.mdx b/fern/products/sdk-reference/php/signal-wire/swml/swml/service/index.mdx deleted file mode 100644 index 7e42522865..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/swml/swml/service/index.mdx +++ /dev/null @@ -1,958 +0,0 @@ ---- -slug: "/reference/php/signal-wire/swml/swml/service" -title: "Service" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\SWML\\Service" - parent: "SignalWire\\SWML" - module: "SignalWire.SWML" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php" ---- -# `Service` - -## Signature - -```php -class Service -``` - -## Methods - -### \_\_call - -Dynamic verb methods from schema. - -$service->answer('main', \['max\_duration' => 3600]); -$service->sleep('main', 2000); -$service->hangup(); - -#### Signature - -```php -public function __call(string $method, array $args): static -``` - -#### Parameters - - - - - -#### Returns - -`static` - -#### Source - -[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) - -Line 114. - -*** - -### \_\_construct - -#### Signature - -```php -public function __construct( - string $name, - string $route = '/', - ?string $host = NULL, - ?int $port = NULL, - ?string $basicAuthUser = NULL, - ?string $basicAuthPassword = NULL -) -``` - -#### Parameters - - - - - - - - - - - - - -#### Source - -[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) - -Line 50. - -*** - -### defineTool - -Define a SWAIG function the AI can call. - -Tool descriptions and parameter descriptions are LLM-facing prompt -engineering, not internal documentation. See PORTING\_GUIDE for guidance. - -#### Signature - -```php -public function defineTool( - string $name, - string $description, - array $parameters, - callable $handler, - bool $secure = false -): static -``` - -#### Parameters - - - - - - - - - - - -#### Returns - -`static` - -#### Source - -[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) - -Line 226. - -*** - -### defineTools - -Register multiple tool definitions at once. - -#### Signature - -```php -public function defineTools(array $toolDefs): static -``` - -#### Parameters - - - -#### Returns - -`static` - -#### Source - -[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) - -Line 268. - -*** - -### dispatchFromGlobals - -Dispatch the current PHP request (cli-server / php-fpm / mod\_php) to - -handleRequest() and write the response. Must be called inside a SAPI -that has populated $\_SERVER for the inbound request. - -#### Signature - -```php -public function dispatchFromGlobals(): void -``` - -#### Source - -[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) - -Line 773. - -*** - -### extractSipUsername - -Extract SIP username from a request body. - -Validates format: only \[a-zA-Z0-9.\_-], max 64 chars. - -**Modifiers:** `static` - -#### Signature - -```php -public static function extractSipUsername(?array $requestBody): ?string -``` - -#### Parameters - - - -#### Returns - -`?string` - -#### Source - -[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) - -Line 648. - -*** - -### getAllFunctions - -Snapshot of all registered SWAIG functions keyed by name. - -Python parity: `ToolRegistry.get_all_functions`. - -#### Signature - -```php -public function getAllFunctions(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) - -Line 306. - -*** - -### getBasicAuthCredentials - -#### Signature - -```php -public function getBasicAuthCredentials(): array -``` - -#### Returns - -`array` — \[user, password] - -#### Source - -[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) - -Line 161. - -*** - -### getBasicAuthCredentialsWithSource - -Get (user, password, source) where source is "provided", - -"environment", or "generated". Python parity: -AuthMixin.get\_basic\_auth\_credentials(include\_source=True). - -#### Signature - -```php -public function getBasicAuthCredentialsWithSource(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) - -Line 178. - -*** - -### getDocument - -#### Signature - -```php -public function getDocument(): SignalWire\SWML\Document -``` - -#### Returns - -`SignalWire\SWML\Document` - -#### Source - -[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) - -Line 444. - -*** - -### getFullUrl - -Build the full URL for this service. - -#### Signature - -```php -public function getFullUrl(bool $includeAuth = false): string -``` - -#### Parameters - - - -#### Returns - -`string` - -#### Source - -[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) - -Line 198. - -*** - -### getFunction - -Get a registered SWAIG function by name, or null when absent. - -Python parity: `ToolRegistry.get_function`. - -#### Signature - -```php -public function getFunction(string $name): ?array -``` - -#### Parameters - - - -#### Returns - -`?array` - -#### Source - -[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) - -Line 299. - -*** - -### getHost - -#### Signature - -```php -public function getHost(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) - -Line 434. - -*** - -### getName - -#### Signature - -```php -public function getName(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) - -Line 424. - -*** - -### getPort - -#### Signature - -```php -public function getPort(): int -``` - -#### Returns - -`int` - -#### Source - -[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) - -Line 439. - -*** - -### getProxyUrlBase - -Detect or construct the proxy URL base from request headers. - -#### Signature - -```php -public function getProxyUrlBase(array $headers = array ( -)): string -``` - -#### Parameters - - - -#### Returns - -`string` - -#### Source - -[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) - -Line 682. - -*** - -### getRoute - -#### Signature - -```php -public function getRoute(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) - -Line 429. - -*** - -### getSchemaUtils - -SchemaUtils helper bound to this Service. Mirrors Python's - -self.schema\_utils public instance attribute on SWMLService. -Built lazily on first access. - -#### Signature - -```php -public function getSchemaUtils(): SignalWire\Utils\SchemaUtils -``` - -#### Returns - -`SignalWire\Utils\SchemaUtils` - -#### Source - -[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) - -Line 454. - -*** - -### getToolNames - -Return the names of registered tools in the order they were - -registered. Stable ordering matters for CLI output and for -tests that rely on deterministic enumeration. - -#### Signature - -```php -public function getToolNames(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) - -Line 327. - -*** - -### getTools - -Return the registered SWAIG tool definitions. - -Used by introspection (CLI --list-tools, the skills audit -harness, and any test that needs to inspect what's been -registered without going through a HTTP round trip). - -#### Signature - -```php -public function getTools(): array -``` - -#### Returns - -`array` — name => tool definition - -#### Source - -[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) - -Line 285. - -*** - -### handleRequest - -Handle an HTTP request. Returns \[status, headers, body]. - -#### Signature - -```php -public function handleRequest( - string $method, - string $path, - array $headers = array ( -), - ?string $body = NULL -): array -``` - -#### Parameters - - - - - - - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) - -Line 489. - -*** - -### hasFunction - -Whether a SWAIG function with the given name is registered. - -Python parity: `ToolRegistry.has_function`. - -#### Signature - -```php -public function hasFunction(string $name): bool -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) - -Line 292. - -*** - -### onFunctionCall - -Dispatch a function call to the registered handler. - -#### Signature - -```php -public function onFunctionCall( - string $name, - array $args, - array $rawData -): ?SignalWire\SWAIG\FunctionResult -``` - -#### Parameters - - - - - - - -#### Returns - -`?SignalWire\SWAIG\FunctionResult` - -#### Source - -[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) - -Line 335. - -*** - -### onRequest - -Customization hook called when SWML is requested. Default - -delegates to \{@see onSwmlRequest()\}; subclasses typically -override `onSwmlRequest` rather than this method. - -Return null to use the default SWML rendering, or an array of -modifications to merge into the rendered document. - -Python parity: WebMixin.on\_request(request\_data, callback\_path). -The Python third `request` arg is FastAPI-specific and is not -mirrored. - -#### Signature - -```php -public function onRequest( - ?array $requestData = NULL, - ?string $callbackPath = NULL -): ?array -``` - -#### Parameters - - - - - -#### Returns - -`?array` - -#### Source - -[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) - -Line 402. - -*** - -### onSwmlRequest - -Customization point for subclasses to modify SWML based on - -request data. The default implementation returns null (no -modification). Subclasses override to inspect the body or -callback path and return an associative array of overrides. - -Python parity: WebMixin.on\_swml\_request(request\_data, callback\_path). - -#### Signature - -```php -public function onSwmlRequest( - ?array $requestData = NULL, - ?string $callbackPath = NULL -): ?array -``` - -#### Parameters - - - - - -#### Returns - -`?array` - -#### Source - -[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) - -Line 415. - -*** - -### registerRoutingCallback - -#### Signature - -```php -public function registerRoutingCallback(string $path, callable $callback): void -``` - -#### Parameters - - - - - -#### Source - -[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) - -Line 211. - -*** - -### registerSwaigFunction - -Register a raw SWAIG function definition (e.g. DataMap tools). - -#### Signature - -```php -public function registerSwaigFunction(array $funcDef): static -``` - -#### Parameters - - - -#### Returns - -`static` - -#### Source - -[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) - -Line 252. - -*** - -### removeFunction - -Remove a registered SWAIG function. True on success, false if absent. - -Python parity: `ToolRegistry.remove_function`. - -#### Signature - -```php -public function removeFunction(string $name): bool -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) - -Line 313. - -*** - -### render - -#### Signature - -```php -public function render(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) - -Line 462. - -*** - -### renderPretty - -#### Signature - -```php -public function renderPretty(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) - -Line 467. - -*** - -### renderSwml - -Render SWML for a request. Subclasses override this. - -#### Signature - -```php -public function renderSwml( - ?array $requestBody = NULL, - array $headers = array ( -) -): array -``` - -#### Parameters - - - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) - -Line 475. - -*** - -### run - -Run the service (alias for serve). - -#### Signature - -```php -public function run(): void -``` - -#### Source - -[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) - -Line 763. - -*** - -### serve - -Start serving using PHP's built-in server (blocking). - -In CLI mode: spawns `php -S host:port ` where entry-script -is the example file the user ran. The entry script is responsible for -(re)building the service and calling run() — under the cli-server SAPI, -run() dispatches from $\_SERVER instead of re-spawning. - -Under cli-server SAPI: directly dispatches the inbound request to -handleRequest() and writes the result to the response. - -#### Signature - -```php -public function serve(): void -``` - -#### Source - -[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) - -Line 731. - -*** - -### validateBasicAuth - -Validate provided basic-auth credentials against the configured ones - -using a constant-time comparison. Python parity: -AuthMixin.validate\_basic\_auth(username, password). - -#### Signature - -```php -public function validateBasicAuth(string $username, string $password): bool -``` - -#### Parameters - - - - - -#### Returns - -`bool` - -#### Source - -[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) - -Line 169. - -## Source - -[`SignalWire/SWML/Service.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SWML/Service.php) - -Line 11. diff --git a/fern/products/sdk-reference/php/signal-wire/utils/utils/index.mdx b/fern/products/sdk-reference/php/signal-wire/utils/utils/index.mdx deleted file mode 100644 index dc6cae9256..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/utils/utils/index.mdx +++ /dev/null @@ -1,35 +0,0 @@ ---- -slug: "/reference/php/signal-wire/utils/utils" -title: "Utils" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "module" - language: "php" - qualified_name: "SignalWire\\Utils" - module: "SignalWire.Utils" ---- -# `Utils` - -## Signature - -```php -namespace SignalWire\Utils -``` - -## Classes - - - - SchemaUtils — PHP port of signalwire.utils.schema\_utils.SchemaUtils. - - - - SchemaValidationError — PHP port of - - - - SSRF-prevention guard for user-supplied URLs. - - diff --git a/fern/products/sdk-reference/php/signal-wire/utils/utils/schema-utils/index.mdx b/fern/products/sdk-reference/php/signal-wire/utils/utils/schema-utils/index.mdx deleted file mode 100644 index c80e6869a2..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/utils/utils/schema-utils/index.mdx +++ /dev/null @@ -1,345 +0,0 @@ ---- -slug: "/reference/php/signal-wire/utils/utils/schema-utils" -title: "SchemaUtils" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\Utils\\SchemaUtils" - parent: "SignalWire\\Utils" - module: "SignalWire.Utils" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Utils/SchemaUtils.php" ---- -# `SchemaUtils` - -SchemaUtils — PHP port of signalwire.utils.schema\_utils.SchemaUtils. - -Loads the SWML JSON Schema, extracts verb metadata, and validates -either a single verb config or a complete SWML document. - -Construction rules mirror Python: - -- Pass schemaPath=null to use the bundled schema.json. -- schemaValidation=false disables validation (validate\_verb returns - valid=true for every call). -- The env var SWML\_SKIP\_SCHEMA\_VALIDATION=1/true/yes also disables - validation regardless of the constructor argument. - -The PHP port currently ships only the lightweight validator (verb -existence + required-property check). Full JSON Schema validation -can be wired in via justinrainbow/json-schema by extending -initFullValidator(). The lightweight contract matches Python's -\_validate\_verb\_lightweight() exactly. - -**Modifiers:** `final` - -## Signature - -```php -final class SchemaUtils -``` - -## Methods - -### \_\_construct - -Construct a SchemaUtils. - -#### Signature - -```php -public function __construct(?string $schemaPath = NULL, bool $schemaValidation = true) -``` - -#### Parameters - - - Path to a schema.json file; null for the bundled copy. - - - - Whether to enable schema validation (env override applies). - - -#### Source - -[`SignalWire/Utils/SchemaUtils.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Utils/SchemaUtils.php) - -Line 56. - -*** - -### generateMethodBody - -Generate a Python-style method body string for a verb. - -Mirrors Python's generate\_method\_body(verb\_name). - -#### Signature - -```php -public function generateMethodBody(string $verbName): string -``` - -#### Parameters - - - -#### Returns - -`string` - -#### Source - -[`SignalWire/Utils/SchemaUtils.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Utils/SchemaUtils.php) - -Line 344. - -*** - -### generateMethodSignature - -Generate a Python-style method signature string for a verb. - -Mirrors Python's generate\_method\_signature(verb\_name). - -#### Signature - -```php -public function generateMethodSignature(string $verbName): string -``` - -#### Parameters - - - -#### Returns - -`string` - -#### Source - -[`SignalWire/Utils/SchemaUtils.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Utils/SchemaUtils.php) - -Line 309. - -*** - -### getAllVerbNames - -Sorted list of all known verb names. - -Mirrors Python's get\_all\_verb\_names(). - -#### Signature - -```php -public function getAllVerbNames(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Utils/SchemaUtils.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Utils/SchemaUtils.php) - -Line 180. - -*** - -### getVerbParameters - -Parameter-definition block used by code-gen tooling. - -Mirrors Python's get\_verb\_parameters(verb\_name). - -#### Signature - -```php -public function getVerbParameters(string $verbName): array -``` - -#### Parameters - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/Utils/SchemaUtils.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Utils/SchemaUtils.php) - -Line 232. - -*** - -### getVerbProperties - -The properties\[verb\_name] block for a verb, or \[] when unknown. - -Mirrors Python's get\_verb\_properties(verb\_name). - -#### Signature - -```php -public function getVerbProperties(string $verbName): array -``` - -#### Parameters - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/Utils/SchemaUtils.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Utils/SchemaUtils.php) - -Line 193. - -*** - -### getVerbRequiredProperties - -The required list for a verb, or \[] when unknown / no required. - -Mirrors Python's get\_verb\_required\_properties(verb\_name). - -#### Signature - -```php -public function getVerbRequiredProperties(string $verbName): array -``` - -#### Parameters - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/Utils/SchemaUtils.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Utils/SchemaUtils.php) - -Line 216. - -*** - -### isFullValidationAvailable - -Whether full JSON Schema validation is wired up. - -Mirrors Python's full\_validation\_available property. - -#### Signature - -```php -public function isFullValidationAvailable(): bool -``` - -#### Returns - -`bool` - -#### Source - -[`SignalWire/Utils/SchemaUtils.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Utils/SchemaUtils.php) - -Line 169. - -*** - -### loadSchema - -Read and parse the JSON Schema. Mirrors Python's load\_schema(). - -#### Signature - -```php -public function loadSchema(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Utils/SchemaUtils.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Utils/SchemaUtils.php) - -Line 79. - -*** - -### validateDocument - -Validate a complete SWML document. Mirrors Python's - -validate\_document(document). Returns (false, \['Schema validator -not initialized']) when no full validator is wired in. - -#### Signature - -```php -public function validateDocument(array $document): array -``` - -#### Parameters - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/Utils/SchemaUtils.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Utils/SchemaUtils.php) - -Line 296. - -*** - -### validateVerb - -Validate a verb config against the schema. - -Mirrors Python's validate\_verb(verb\_name, verb\_config). - -#### Signature - -```php -public function validateVerb(string $verbName, array $verbConfig): array -``` - -#### Parameters - - - - - -#### Returns - -`array` — Tuple of (valid, errors). - -#### Source - -[`SignalWire/Utils/SchemaUtils.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Utils/SchemaUtils.php) - -Line 249. - -## Source - -[`SignalWire/Utils/SchemaUtils.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Utils/SchemaUtils.php) - -Line 33. diff --git a/fern/products/sdk-reference/php/signal-wire/utils/utils/schema-validation-error/index.mdx b/fern/products/sdk-reference/php/signal-wire/utils/utils/schema-validation-error/index.mdx deleted file mode 100644 index 94d83a39a5..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/utils/utils/schema-validation-error/index.mdx +++ /dev/null @@ -1,109 +0,0 @@ ---- -slug: "/reference/php/signal-wire/utils/utils/schema-validation-error" -title: "SchemaValidationError" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\Utils\\SchemaValidationError" - parent: "SignalWire\\Utils" - module: "SignalWire.Utils" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Utils/SchemaValidationError.php" ---- -# `SchemaValidationError` - -SchemaValidationError — PHP port of - -signalwire.utils.schema\_utils.SchemaValidationError. - -Thrown when SWML schema validation of a verb config fails. - -## Signature - -```php -class SchemaValidationError extends RuntimeException implements Stringable, Throwable -``` - -## Inheritance - -**Extends:** `RuntimeException` - -**Implements:** `Stringable`, `Throwable` - -## Methods - -### \_\_construct - -Construct a SchemaValidationError. Mirrors Python's - -SchemaValidationError(verb\_name, errors). - -#### Signature - -```php -public function __construct(string $verbName, array $errors) -``` - -#### Parameters - - - the verb whose validation failed - - - - human-readable error messages - - -#### Source - -[`SignalWire/Utils/SchemaValidationError.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Utils/SchemaValidationError.php) - -Line 34. - -*** - -### getErrors - -#### Signature - -```php -public function getErrors(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Utils/SchemaValidationError.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Utils/SchemaValidationError.php) - -Line 48. - -*** - -### getVerbName - -#### Signature - -```php -public function getVerbName(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Utils/SchemaValidationError.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Utils/SchemaValidationError.php) - -Line 42. - -## Source - -[`SignalWire/Utils/SchemaValidationError.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Utils/SchemaValidationError.php) - -Line 20. diff --git a/fern/products/sdk-reference/php/signal-wire/utils/utils/url-validator/index.mdx b/fern/products/sdk-reference/php/signal-wire/utils/utils/url-validator/index.mdx deleted file mode 100644 index 83097210a7..0000000000 --- a/fern/products/sdk-reference/php/signal-wire/utils/utils/url-validator/index.mdx +++ /dev/null @@ -1,100 +0,0 @@ ---- -slug: "/reference/php/signal-wire/utils/utils/url-validator" -title: "UrlValidator" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\Utils\\UrlValidator" - parent: "SignalWire\\Utils" - module: "SignalWire.Utils" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Utils/UrlValidator.php" ---- -# `UrlValidator` - -SSRF-prevention guard for user-supplied URLs. - -Mirrors Python's signalwire.utils.url\_validator.validate\_url: -rejects non-http(s) schemes, missing hostnames, and any URL whose -hostname resolves to a private / loopback / link-local / cloud-metadata -IP. The $allowPrivate parameter, OR the SWML\_ALLOW\_PRIVATE\_URLS env -var with value "1", "true" or "yes" (case-insensitive), bypasses the -IP-blocklist check. - -The static method validateUrl projects onto the Python free function -signalwire.utils.url\_validator.validate\_url via -scripts/enumerate\_signatures.py. - -**Modifiers:** `final` - -## Signature - -```php -final class UrlValidator -``` - -## Properties - - - Pluggable resolver. Tests inject a callable to keep the suite hermetic; production calls dns\_get\_record/gethostbynamel. Signature: function(string $hostname): ?array (array of IP strings, or null on resolution failure). - - -## Constants - - - -## Methods - -### validateUrl - -Validate that a URL is safe to fetch. - -**Modifiers:** `static` - -#### Signature - -```php -public static function validateUrl(string $url, bool $allowPrivate = false): bool -``` - -#### Parameters - - - URL to validate. - - - - When true, bypass the IP-blocklist check. - - -#### Returns - -`bool` - -#### Source - -[`SignalWire/Utils/UrlValidator.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Utils/UrlValidator.php) - -Line 62. - -## Source - -[`SignalWire/Utils/UrlValidator.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Utils/UrlValidator.php) - -Line 30. diff --git a/fern/products/sdk-reference/python/_meta.json b/fern/products/sdk-reference/python/_meta.json index c6cee27f71..705282ce7e 100644 --- a/fern/products/sdk-reference/python/_meta.json +++ b/fern/products/sdk-reference/python/_meta.json @@ -6,5 +6,5 @@ "format": "mdx", "platform": "fern", "base_slug": "/reference/python", - "item_count": 2478 + "item_count": 2483 } \ No newline at end of file diff --git a/fern/products/sdk-reference/python/agents/agent-base/index.mdx b/fern/products/sdk-reference/python/agents/agent-base/index.mdx new file mode 100644 index 0000000000..1c03e68267 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/agent-base/index.mdx @@ -0,0 +1,36 @@ +--- +slug: "/reference/python/agents/agent-base" +title: "agent_base" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.agent_base" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py" +--- +# `agent_base` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module agent_base +``` + +## Properties + + + +## Source + +[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) diff --git a/fern/products/sdk-reference/python/agents/agent-base/index__2.mdx b/fern/products/sdk-reference/python/agents/agent-base/index__2.mdx new file mode 100644 index 0000000000..6510e25560 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/agent-base/index__2.mdx @@ -0,0 +1,779 @@ +--- +slug: "/reference/python/agents/agent-base/index__2" +title: "AgentBase" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.core.agent_base.AgentBase" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py" +--- +# `AgentBase` + +Base class for all SignalWire AI Agents. + +This class extends SWMLService and provides enhanced functionality for building agents including: + +- Prompt building and customization +- SWML rendering +- SWAIG function definition and execution +- Web service for serving SWML and handling webhooks +- Security and session management + +Subclassing options: + +1. Simple override of get\_prompt() for raw text +2. Using prompt\_\* methods for structured prompts +3. Declarative PROMPT\_SECTIONS class attribute + +## Signature + +```python +class AgentBase(AuthMixin, WebMixin, SWMLService, PromptMixin, SkillMixin, AIConfigMixin, ServerlessMixin, StateMixin, MCPServerMixin) +``` + +## Inheritance + +**Extends:** [AuthMixin](/docs/sdk-reference/reference/python/agents/mixins/auth-mixin/auth-mixin), [WebMixin](/docs/sdk-reference/reference/python/agents/mixins/web-mixin/web-mixin), [SWMLService](/docs/sdk-reference/reference/python/agents/swml-service/index__2), [PromptMixin](/docs/sdk-reference/reference/python/agents/mixins/prompt-mixin/prompt-mixin), [SkillMixin](/docs/sdk-reference/reference/python/agents/mixins/skill-mixin/skill-mixin), [AIConfigMixin](/docs/sdk-reference/reference/python/agents/mixins/ai-config-mixin/ai-config-mixin), [ServerlessMixin](/docs/sdk-reference/reference/python/agents/mixins/serverless-mixin/serverless-mixin), [StateMixin](/docs/sdk-reference/reference/python/agents/mixins/state-mixin/state-mixin), [MCPServerMixin](/docs/sdk-reference/reference/python/agents/mixins/mcp-server-mixin/mcp-server-mixin) + +## Properties + + + + + + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +Initialize a new agent + +#### Signature + +```python +__init__( + name: str, + route: str = '/', + host: str = '0.0.0.0', + port: Optional[int] = None, + basic_auth: Optional[Tuple[str, str]] = None, + use_pom: bool = True, + token_expiry_secs: int = 3600, + auto_answer: bool = True, + record_call: bool = False, + record_format: str = 'mp4', + record_stereo: bool = True, + default_webhook_url: Optional[str] = None, + agent_id: Optional[str] = None, + native_functions: Optional[List[str]] = None, + schema_path: Optional[str] = None, + suppress_logs: bool = False, + enable_post_prompt_override: bool = False, + check_for_input_override: bool = False, + config_file: Optional[str] = None, + schema_validation: bool = True, + signing_key: Optional[str] = None, + trust_proxy_for_signature: bool = False +) +``` + +#### Parameters + + + Agent name/identifier + + + + HTTP route path for this agent + + + + Host to bind the web server to + + + + Port to bind the web server to + + + + Optional (username, password) tuple for basic auth + + + + Whether to use POM for prompt building + + + + Seconds until tokens expire + + + + Whether to automatically answer calls + + + + Whether to record calls + + + + Recording format + + + + Whether to record in stereo + + + + Optional default webhook URL for all SWAIG functions + + + + Optional unique ID for this agent, generated if not provided + + + + Optional list of native functions to include in the SWAIG object + + + + Optional path to the schema file + + + + Whether to suppress structured logs + + + + Whether to enable post-prompt override + + + + Whether to enable check-for-input override + + + + Optional path to configuration file + + + + Enable SWML schema validation. Default True. Can also be disabled via SWML\_SKIP\_SCHEMA\_VALIDATION=1 env var. + + + + Optional SignalWire Signing Key (from Dashboard → API Credentials). When set, webhook signature validation is enforced on POST /, /swaig, /post\_prompt — unsigned or invalidly-signed requests get a 403. Falls back to the SIGNALWIRE\_SIGNING\_KEY env var if not passed. See porting-sdk/webhooks.md for the contract. + + + + If True, honor X-Forwarded-Proto / X-Forwarded-Host when reconstructing the URL during signature validation. Default False — proxy headers are spoofable, so opt in only when you control the proxy chain. + + +#### Source + +[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) + +Line 108. + +*** + +### add\_answer\_verb + +Configure the answer verb. + +The answer verb connects the call. Use this method to customize +answer behavior, such as setting max\_duration. + +> \[!NOTE] +> +> ### Set maximum call duration to 1 hour +> +> agent.add\_answer\_verb(\{"max\_duration": 3600\}) + +#### Signature + +```python +add_answer_verb(config: Optional[Dict[str, Any]] = None) -> AgentBase +``` + +#### Parameters + + + Optional answer verb configuration (e.g., \{"max\_duration": 3600\}) + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) + +Line 536. + +*** + +### add\_post\_ai\_verb + +Add a verb to run after the AI conversation ends. + +Post-AI verbs run when the AI completes its conversation. Common uses +include clean disconnects, transfers, and logging. + +> \[!NOTE] +> +> ### Log call completion and hang up +> +> agent.add\_post\_ai\_verb("request", \{ +> "url": "https://api.example.com/call-complete", +> "method": "POST" +> \}) +> agent.add\_post\_ai\_verb("hangup", \{\}) + +#### Signature + +```python +add_post_ai_verb(verb_name: str, config: Dict[str, Any]) -> AgentBase +``` + +#### Parameters + + + The SWML verb name (e.g., "hangup", "transfer", "request") + + + + Verb configuration dictionary + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) + +Line 581. + +*** + +### add\_post\_answer\_verb + +Add a verb to run after the call is answered but before the AI starts. + +Post-answer verbs run after the call is connected. Common uses include +welcome messages, legal disclaimers, and hold music. + +> \[!NOTE] +> +> ### Play welcome message +> +> agent.add\_post\_answer\_verb("play", \{ +> "url": "say:Welcome to Acme Corporation." +> \}) +> +> ### Brief pause +> +> agent.add\_post\_answer\_verb("sleep", \{"time": 500\}) + +#### Signature + +```python +add_post_answer_verb(verb_name: str, config: Dict[str, Any]) -> AgentBase +``` + +#### Parameters + + + The SWML verb name (e.g., "play", "sleep") + + + + Verb configuration dictionary + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) + +Line 556. + +*** + +### add\_pre\_answer\_verb + +Add a verb to run before the call is answered. + +Pre-answer verbs execute while the call is still ringing. Only certain +verbs are safe to use before answering: + +> \[!NOTE] +> cond, if, eval, set, unset, hangup, send\_sms, sleep, +> stop\_record\_call, stop\_denoise, stop\_tap + +Verbs with auto\_answer option (play, connect): Must include +"auto\_answer": False in config to prevent automatic answering. + +> \[!NOTE] +> +> ### Play ringback tone before answering +> +> agent.add\_pre\_answer\_verb("play", \{ +> "urls": \["ring:us"], +> "auto\_answer": False +> \}) + +#### Signature + +```python +add_pre_answer_verb(verb_name: str, config: Dict[str, Any]) -> AgentBase +``` + +#### Parameters + + + The SWML verb name (e.g., "play", "sleep", "request") + + + + Verb configuration dictionary + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Throws + +- `ValueError` — If verb is not safe for pre-answer use + +#### Source + +[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) + +Line 488. + +*** + +### add\_swaig\_query\_params + +Add query parameters that will be included in all SWAIG webhook URLs + +This is particularly useful for preserving dynamic configuration state +across SWAIG callbacks. For example, if your dynamic config adds skills +based on query parameters, you can pass those same parameters through +to the SWAIG webhook so the same configuration is applied. + +> \[!NOTE] +> def dynamic\_config(query\_params, body\_params, headers, agent): +> if query\_params.get('tier') == 'premium': +> agent.add\_skill('advanced\_search') +> \# Preserve the tier param so SWAIG callbacks work +> agent.add\_swaig\_query\_params(\{'tier': 'premium'\}) + +#### Signature + +```python +add_swaig_query_params(params: Dict[str, str]) -> AgentBase +``` + +#### Parameters + + + Dictionary of query parameters to add to SWAIG URLs + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) + +Line 753. + +*** + +### auto\_map\_sip\_usernames + +Automatically register common SIP usernames based on this agent's +name and route + +#### Signature + +```python +auto_map_sip_usernames() -> AgentBase +``` + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) + +Line 700. + +*** + +### clear\_post\_ai\_verbs + +Remove all post-AI verbs. + +#### Signature + +```python +clear_post_ai_verbs() -> AgentBase +``` + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) + +Line 626. + +*** + +### clear\_post\_answer\_verbs + +Remove all post-answer verbs. + +#### Signature + +```python +clear_post_answer_verbs() -> AgentBase +``` + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) + +Line 616. + +*** + +### clear\_pre\_answer\_verbs + +Remove all pre-answer verbs. + +#### Signature + +```python +clear_pre_answer_verbs() -> AgentBase +``` + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) + +Line 606. + +*** + +### clear\_swaig\_query\_params + +Clear all SWAIG query parameters + +#### Signature + +```python +clear_swaig_query_params() -> AgentBase +``` + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) + +Line 779. + +*** + +### enable\_sip\_routing + +Enable SIP-based routing for this agent + +This allows the agent to automatically route SIP requests based on SIP usernames. +When enabled, an endpoint at the specified path is automatically created +that will handle SIP requests and deliver them to this agent. + +#### Signature + +```python +enable_sip_routing(auto_map: bool = True, path: str = '/sip') -> AgentBase +``` + +#### Parameters + + + Whether to automatically map common SIP usernames to this agent (based on the agent name and route path) + + + + The path to register the SIP routing endpoint (default: "/sip") + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) + +Line 638. + +*** + +### get\_full\_url + +Get the full URL for this agent's endpoint + +#### Signature + +```python +get_full_url(include_auth: bool = False) -> str +``` + +#### Parameters + + + Whether to include authentication credentials in the URL + + +#### Returns + +`str` — Full URL including host, port, and route (with auth if requested) + +#### Source + +[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) + +Line 351. + +*** + +### get\_name + +Get agent name + +#### Signature + +```python +get_name() -> str +``` + +#### Returns + +`str` — Agent name + +#### Source + +[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) + +Line 342. + +*** + +### on\_debug\_event + +Register a handler for debug webhook events. + +Use as a decorator to receive real-time debug events from the AI module +during calls. Requires enable\_debug\_events() to be called first. + +> \[!NOTE] +> event\_type (str): The event label (e.g. "barge", "llm\_error", "session\_start") +> data (dict): The full event payload including call\_id, label, and event-specific fields + +The handler may be sync or async. + +> \[!NOTE] +> @agent.on\_debug\_event +> def handle(event\_type, data): +> if event\_type == "barge": +> print(f"Barge detected: \{data.get('barge\_elapsed\_ms')\}ms") + +#### Signature + +```python +on_debug_event(handler: Callable) -> Callable +``` + +#### Parameters + + + Callback function with signature (event\_type: str, data: dict) + + +#### Returns + +`Callable` — The handler function (unchanged), for use as a decorator + +#### Source + +[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) + +Line 458. + +*** + +### on\_summary + +Called when a post-prompt summary is received + +#### Signature + +```python +on_summary( + summary: Optional[Dict[str, Any]], + raw_data: Optional[Dict[str, Any]] = None +) -> None +``` + +#### Parameters + + + The summary object or None if no summary was found + + + + The complete raw POST data from the request + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) + +Line 447. + +*** + +### register\_sip\_username + +Register a SIP username that should be routed to this agent + +#### Signature + +```python +register_sip_username(sip_username: str) -> AgentBase +``` + +#### Parameters + + + SIP username to register + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) + +Line 682. + +*** + +### set\_post\_prompt\_url + +Override the default post\_prompt\_url with a supplied URL string + +#### Signature + +```python +set_post_prompt_url(url: str) -> AgentBase +``` + +#### Parameters + + + The URL to use for post-prompt summary delivery + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) + +Line 740. + +*** + +### set\_web\_hook\_url + +Override the default web\_hook\_url with a supplied URL string + +#### Signature + +```python +set_web_hook_url(url: str) -> AgentBase +``` + +#### Parameters + + + The URL to use for SWAIG function webhooks + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) + +Line 727. + +## Source + +[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) + +Line 78. diff --git a/fern/products/sdk-reference/python/signalwire/agent-server/agent-server/add-security-headers.mdx b/fern/products/sdk-reference/python/agents/agent-server/add-security-headers.mdx similarity index 87% rename from fern/products/sdk-reference/python/signalwire/agent-server/agent-server/add-security-headers.mdx rename to fern/products/sdk-reference/python/agents/agent-server/add-security-headers.mdx index b5887cf098..89d68b6c8d 100644 --- a/fern/products/sdk-reference/python/signalwire/agent-server/agent-server/add-security-headers.mdx +++ b/fern/products/sdk-reference/python/agents/agent-server/add-security-headers.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/signalwire/agent-server/agent-server/add-security-headers" +slug: "/reference/python/agents/agent-server/add-security-headers" title: "add_security_headers" sdk_label: "Python SDK" icon: "python" @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.agent_server.AgentServer.__init__.add_security_headers" parent: "signalwire.agent_server.AgentServer.__init__" - module: "signalwire.agent_server" + module: "agents.AgentServer" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/agent_server.py" --- # `add_security_headers` diff --git a/fern/products/sdk-reference/python/agents/agent-server/index.mdx b/fern/products/sdk-reference/python/agents/agent-server/index.mdx new file mode 100644 index 0000000000..194213cf9f --- /dev/null +++ b/fern/products/sdk-reference/python/agents/agent-server/index.mdx @@ -0,0 +1,32 @@ +--- +slug: "/reference/python/agents/agent-server" +title: "agent_server" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.agent_server" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/agent_server.py" +--- +# `agent_server` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module agent_server +``` + +## Source + +[`signalwire/signalwire/agent_server.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/agent_server.py) diff --git a/fern/products/sdk-reference/python/agents/agent-server/index__2.mdx b/fern/products/sdk-reference/python/agents/agent-server/index__2.mdx new file mode 100644 index 0000000000..4b3c197323 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/agent-server/index__2.mdx @@ -0,0 +1,403 @@ +--- +slug: "/reference/python/agents/agent-server/index__2" +title: "AgentServer" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.agent_server.AgentServer" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/agent_server.py" +--- +# `AgentServer` + +Server for hosting multiple SignalWire AI Agents under a single FastAPI application. + +This allows you to run multiple agents on different routes of the same server, +which is useful for deployment and resource management. + +> \[!NOTE] +> server = AgentServer() +> server.register(SupportAgent(), "/support") +> server.register(SalesAgent(), "/sales") +> server.run() + +## Signature + +```python +class AgentServer +``` + +## Properties + + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +Initialize a new agent server + +#### Signature + +```python +__init__(host: str = '0.0.0.0', port: int = 3000, log_level: str = 'info') +``` + +#### Parameters + + + Host to bind the server to + + + + Port to bind the server to + + + + Logging level (debug, info, warning, error, critical) + + +#### Source + +[`signalwire/signalwire/agent_server.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/agent_server.py) + +Line 45. + +*** + +### get\_agent + +Get an agent by route + +#### Signature + +```python +get_agent(route: str) -> Optional[AgentBase] +``` + +#### Parameters + + + The route of the agent + + +#### Returns + +`Optional[AgentBase]` — The agent or None if not found + +#### Source + +[`signalwire/signalwire/agent_server.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/agent_server.py) + +Line 310. + +*** + +### get\_agents + +Get all registered agents + +#### Signature + +```python +get_agents() -> List[Tuple[str, AgentBase]] +``` + +#### Returns + +`List[Tuple[str, AgentBase]]` — List of (route, agent) tuples + +#### Source + +[`signalwire/signalwire/agent_server.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/agent_server.py) + +Line 301. + +*** + +### register + +Register an agent with the server + +#### Signature + +```python +register(agent: AgentBase, route: Optional[str] = None) -> None +``` + +#### Parameters + + + The agent to register + + + + Optional route to override the agent's default route + + +#### Returns + +`None` + +#### Throws + +- `ValueError` — If the route is already in use + +#### Source + +[`signalwire/signalwire/agent_server.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/agent_server.py) + +Line 102. + +*** + +### register\_global\_routing\_callback + +Register a routing callback across all agents + +This allows you to add unified routing logic to all agents at the same path. + +#### Signature + +```python +register_global_routing_callback( + callback_fn: Callable[Request, Dict[str, Any], Optional[str]], + path: str +) -> None +``` + +#### Parameters + + + The callback function to register + + + + The path to register the callback at + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/agent_server.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/agent_server.py) + +Line 652. + +*** + +### register\_sip\_username + +Register a mapping from SIP username to agent route + +#### Signature + +```python +register_sip_username(username: str, route: str) -> None +``` + +#### Parameters + + + The SIP username + + + + The route to the agent + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/agent_server.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/agent_server.py) + +Line 210. + +*** + +### run + +Universal run method that automatically detects environment and handles accordingly + +Detects execution mode and routes appropriately: + +- Server mode: Starts uvicorn server with FastAPI +- CGI mode: Uses same routing logic but outputs CGI headers +- Lambda mode: Uses same routing logic but returns Lambda response + +#### Signature + +```python +run( + event = None, + context = None, + host: Optional[str] = None, + port: Optional[int] = None +) -> Any +``` + +#### Parameters + + + Serverless event object (Lambda, Cloud Functions) + + + + Serverless context object (Lambda, Cloud Functions) + + + + Optional host to override the default (server mode only) + + + + Optional port to override the default (server mode only) + + +#### Returns + +`Any` — Response for serverless modes, None for server mode + +#### Source + +[`signalwire/signalwire/agent_server.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/agent_server.py) + +Line 328. + +*** + +### serve\_static\_files + +Serve static files from a directory. + +This method properly integrates static file serving with agent routes, +ensuring that agent routes take priority over static files. + +Unlike using StaticFiles.mount("/", ...) directly on self.app, this method +uses explicit route handlers that work correctly with agent routes. + +> \[!NOTE] +> server = AgentServer() +> server.register(SupportAgent(), "/support") +> server.serve\_static\_files("./web") # Serves at / +> +> ### /support -> SupportAgent +> +> ### /index.html -> ./web/index.html +> +> ### / -> ./web/index.html + +#### Signature + +```python +serve_static_files(directory: str, route: str = '/') -> None +``` + +#### Parameters + + + Path to the directory containing static files + + + + URL path prefix for static files (default: "/" for root) + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/agent_server.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/agent_server.py) + +Line 675. + +*** + +### setup\_sip\_routing + +Set up central SIP-based routing for the server + +This configures all agents to handle SIP requests at the specified path, +using a coordinated routing system where each agent checks if it can +handle SIP requests for specific usernames. + +#### Signature + +```python +setup_sip_routing(route: str = '/sip', auto_map: bool = True) -> None +``` + +#### Parameters + + + The path for SIP routing (default: "/sip") + + + + Whether to automatically map SIP usernames to agent routes + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/agent_server.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/agent_server.py) + +Line 147. + +*** + +### unregister + +Unregister an agent from the server + +#### Signature + +```python +unregister(route: str) -> bool +``` + +#### Parameters + + + The route of the agent to unregister + + +#### Returns + +`bool` — True if the agent was unregistered, False if not found + +#### Source + +[`signalwire/signalwire/agent_server.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/agent_server.py) + +Line 274. + +## Source + +[`signalwire/signalwire/agent_server.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/agent_server.py) + +Line 31. diff --git a/fern/products/sdk-reference/python/agents/agent/config/index.mdx b/fern/products/sdk-reference/python/agents/agent/config/index.mdx new file mode 100644 index 0000000000..86225c9596 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/agent/config/index.mdx @@ -0,0 +1,36 @@ +--- +slug: "/reference/python/agents/agent/config" +title: "config" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.agent.config" + parent: "signalwire.core.agent" + module: "agents.agent" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/config/__init__.py" +--- +# `config` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module config +``` + +## Properties + + + +## Source + +[`signalwire/signalwire/core/agent/config/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/config/__init__.py) diff --git a/fern/products/sdk-reference/python/agents/agent/deployment/handlers/index.mdx b/fern/products/sdk-reference/python/agents/agent/deployment/handlers/index.mdx new file mode 100644 index 0000000000..ef69179fe8 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/agent/deployment/handlers/index.mdx @@ -0,0 +1,32 @@ +--- +slug: "/reference/python/agents/agent/deployment/handlers" +title: "handlers" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.agent.deployment.handlers" + parent: "signalwire.core.agent.deployment" + module: "agents.agent.deployment" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/deployment/handlers/__init__.py" +--- +# `handlers` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module handlers +``` + +## Source + +[`signalwire/signalwire/core/agent/deployment/handlers/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/deployment/handlers/__init__.py) diff --git a/fern/products/sdk-reference/python/agents/agent/deployment/index.mdx b/fern/products/sdk-reference/python/agents/agent/deployment/index.mdx new file mode 100644 index 0000000000..14e794f324 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/agent/deployment/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/agents/agent/deployment" +title: "deployment" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.agent.deployment" + parent: "signalwire.core.agent" + module: "agents.agent" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/deployment/__init__.py" +--- +# `deployment` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module deployment +``` + +## Modules + + + + Copyright (c) 2025 SignalWire + + + +## Source + +[`signalwire/signalwire/core/agent/deployment/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/deployment/__init__.py) diff --git a/fern/products/sdk-reference/python/agents/agent/index.mdx b/fern/products/sdk-reference/python/agents/agent/index.mdx new file mode 100644 index 0000000000..a3c35d133c --- /dev/null +++ b/fern/products/sdk-reference/python/agents/agent/index.mdx @@ -0,0 +1,68 @@ +--- +slug: "/reference/python/agents/agent" +title: "agent" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.agent" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/__init__.py" +--- +# `agent` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module agent +``` + +## Properties + + + +## Modules + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + +## Source + +[`signalwire/signalwire/core/agent/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/__init__.py) diff --git a/fern/products/sdk-reference/python/agents/agent/prompt/index.mdx b/fern/products/sdk-reference/python/agents/agent/prompt/index.mdx new file mode 100644 index 0000000000..3d8193a41a --- /dev/null +++ b/fern/products/sdk-reference/python/agents/agent/prompt/index.mdx @@ -0,0 +1,44 @@ +--- +slug: "/reference/python/agents/agent/prompt" +title: "prompt" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.agent.prompt" + parent: "signalwire.core.agent" + module: "agents.agent" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/__init__.py" +--- +# `prompt` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module prompt +``` + +## Properties + + + +## Modules + + + + Copyright (c) 2025 SignalWire + + + +## Source + +[`signalwire/signalwire/core/agent/prompt/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/__init__.py) diff --git a/fern/products/sdk-reference/python/agents/agent/prompt/manager/index.mdx b/fern/products/sdk-reference/python/agents/agent/prompt/manager/index.mdx new file mode 100644 index 0000000000..5b13502b26 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/agent/prompt/manager/index.mdx @@ -0,0 +1,44 @@ +--- +slug: "/reference/python/agents/agent/prompt/manager" +title: "manager" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.agent.prompt.manager" + parent: "signalwire.core.agent.prompt" + module: "agents.agent.prompt" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py" +--- +# `manager` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module manager +``` + +## Properties + + + +## Classes + + + + Manages prompt building and configuration. + + + +## Source + +[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) diff --git a/fern/products/sdk-reference/python/agents/agent/prompt/manager/prompt-manager/index.mdx b/fern/products/sdk-reference/python/agents/agent/prompt/manager/prompt-manager/index.mdx new file mode 100644 index 0000000000..9895845a1c --- /dev/null +++ b/fern/products/sdk-reference/python/agents/agent/prompt/manager/prompt-manager/index.mdx @@ -0,0 +1,434 @@ +--- +slug: "/reference/python/agents/agent/prompt/manager/prompt-manager" +title: "PromptManager" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.core.agent.prompt.manager.PromptManager" + parent: "signalwire.core.agent.prompt.manager" + module: "agents.agent.prompt.manager" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py" +--- +# `PromptManager` + +Manages prompt building and configuration. + +## Signature + +```python +class PromptManager +``` + +## Properties + + + +## Methods + +### \_\_init\_\_ + +Initialize PromptManager with reference to parent agent. + +#### Signature + +```python +__init__(agent) +``` + +#### Parameters + + + Parent AgentBase instance + + +#### Source + +[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) + +Line 23. + +*** + +### define\_contexts + +Define contexts for the agent. + +#### Signature + +```python +define_contexts(contexts: Union[Dict[str, Any], Any]) -> None +``` + +#### Parameters + + + Context configuration (dict or ContextBuilder) + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) + +Line 73. + +*** + +### get\_contexts + +Get the contexts configuration. + +#### Signature + +```python +get_contexts() -> Optional[Dict[str, Any]] +``` + +#### Returns + +`Optional[Dict[str, Any]]` — Contexts dict or None + +#### Source + +[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) + +Line 300. + +*** + +### get\_post\_prompt + +Get the post-prompt text. + +#### Signature + +```python +get_post_prompt() -> Optional[str] +``` + +#### Returns + +`Optional[str]` — Post-prompt text or None + +#### Source + +[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) + +Line 291. + +*** + +### get\_prompt + +Get the prompt configuration. + +#### Signature + +```python +get_prompt() -> Optional[Union[str, List[Dict[str, Any]]]] +``` + +#### Returns + +`Optional[Union[str, List[Dict[str, Any]]]]` — Prompt text or sections or None + +#### Source + +[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) + +Line 273. + +*** + +### get\_raw\_prompt + +Get the raw prompt text if set. + +#### Signature + +```python +get_raw_prompt() -> Optional[str] +``` + +#### Returns + +`Optional[str]` — Raw prompt text or None + +#### Source + +[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) + +Line 282. + +*** + +### prompt\_add\_section + +Add a section to the prompt. + +#### Signature + +```python +prompt_add_section( + title: str, + body: str = '', + bullets: Optional[List[str]] = None, + numbered: bool = False, + numbered_bullets: bool = False, + subsections: Optional[List[Dict[str, Any]]] = None +) -> None +``` + +#### Parameters + + + Section title + + + + Optional section body text + + + + Optional list of bullet points + + + + Whether this section should be numbered + + + + Whether bullets should be numbered + + + + Optional list of subsection objects + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) + +Line 127. + +*** + +### prompt\_add\_subsection + +Add a subsection to an existing section (creating parent if needed). + +#### Signature + +```python +prompt_add_subsection( + parent_title: str, + title: str, + body: str = '', + bullets: Optional[List[str]] = None +) -> None +``` + +#### Parameters + + + Parent section title + + + + Subsection title + + + + Optional subsection body text + + + + Optional list of bullet points + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) + +Line 220. + +*** + +### prompt\_add\_to\_section + +Add content to an existing section (creating it if needed). + +#### Signature + +```python +prompt_add_to_section( + title: str, + body: Optional[str] = None, + bullet: Optional[str] = None, + bullets: Optional[List[str]] = None +) -> None +``` + +#### Parameters + + + Section title + + + + Optional text to append to section body + + + + Optional single bullet point to add + + + + Optional list of bullet points to add + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) + +Line 179. + +*** + +### prompt\_has\_section + +Check if a section exists in the prompt. + +#### Signature + +```python +prompt_has_section(title: str) -> bool +``` + +#### Parameters + + + Section title to check + + +#### Returns + +`bool` — True if section exists, False otherwise + +#### Source + +[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) + +Line 258. + +*** + +### set\_post\_prompt + +Set the post-prompt text. + +#### Signature + +```python +set_post_prompt(text: str) -> None +``` + +#### Parameters + + + Post-prompt text + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) + +Line 102. + +*** + +### set\_prompt\_pom + +Set the prompt as a POM dictionary. + +#### Signature + +```python +set_prompt_pom(pom: List[Dict[str, Any]]) -> None +``` + +#### Parameters + + + POM dictionary structure + + +#### Returns + +`None` + +#### Throws + +- `ValueError` — If use\_pom is False + +#### Source + +[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) + +Line 112. + +*** + +### set\_prompt\_text + +Set the agent's prompt as raw text. + +#### Signature + +```python +set_prompt_text(text: str) -> None +``` + +#### Parameters + + + Prompt text + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) + +Line 91. + +## Source + +[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) + +Line 20. diff --git a/fern/products/sdk-reference/python/agents/agent/routing/index.mdx b/fern/products/sdk-reference/python/agents/agent/routing/index.mdx new file mode 100644 index 0000000000..5c7847cc06 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/agent/routing/index.mdx @@ -0,0 +1,32 @@ +--- +slug: "/reference/python/agents/agent/routing" +title: "routing" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.agent.routing" + parent: "signalwire.core.agent" + module: "agents.agent" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/routing/__init__.py" +--- +# `routing` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module routing +``` + +## Source + +[`signalwire/signalwire/core/agent/routing/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/routing/__init__.py) diff --git a/fern/products/sdk-reference/python/agents/agent/security/index.mdx b/fern/products/sdk-reference/python/agents/agent/security/index.mdx new file mode 100644 index 0000000000..1eb5749c1e --- /dev/null +++ b/fern/products/sdk-reference/python/agents/agent/security/index.mdx @@ -0,0 +1,32 @@ +--- +slug: "/reference/python/agents/agent/security" +title: "security" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.agent.security" + parent: "signalwire.core.agent" + module: "agents.agent" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/security/__init__.py" +--- +# `security` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module security +``` + +## Source + +[`signalwire/signalwire/core/agent/security/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/security/__init__.py) diff --git a/fern/products/sdk-reference/python/agents/agent/swml/index.mdx b/fern/products/sdk-reference/python/agents/agent/swml/index.mdx new file mode 100644 index 0000000000..0e2e73dbc7 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/agent/swml/index.mdx @@ -0,0 +1,32 @@ +--- +slug: "/reference/python/agents/agent/swml" +title: "swml" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.agent.swml" + parent: "signalwire.core.agent" + module: "agents.agent" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/swml/__init__.py" +--- +# `swml` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module swml +``` + +## Source + +[`signalwire/signalwire/core/agent/swml/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/swml/__init__.py) diff --git a/fern/products/sdk-reference/python/agents/agent/tools/decorator/index.mdx b/fern/products/sdk-reference/python/agents/agent/tools/decorator/index.mdx new file mode 100644 index 0000000000..0fcb835997 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/agent/tools/decorator/index.mdx @@ -0,0 +1,44 @@ +--- +slug: "/reference/python/agents/agent/tools/decorator" +title: "decorator" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.agent.tools.decorator" + parent: "signalwire.core.agent.tools" + module: "agents.agent.tools" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/decorator.py" +--- +# `decorator` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module decorator +``` + +## Properties + + + +## Classes + + + + Handles tool decoration logic. + + + +## Source + +[`signalwire/signalwire/core/agent/tools/decorator.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/decorator.py) diff --git a/fern/products/sdk-reference/python/agents/agent/tools/decorator/tool-decorator/index.mdx b/fern/products/sdk-reference/python/agents/agent/tools/decorator/tool-decorator/index.mdx new file mode 100644 index 0000000000..d9dad9095f --- /dev/null +++ b/fern/products/sdk-reference/python/agents/agent/tools/decorator/tool-decorator/index.mdx @@ -0,0 +1,85 @@ +--- +slug: "/reference/python/agents/agent/tools/decorator/tool-decorator" +title: "ToolDecorator" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.core.agent.tools.decorator.ToolDecorator" + parent: "signalwire.core.agent.tools.decorator" + module: "agents.agent.tools.decorator" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/decorator.py" +--- +# `ToolDecorator` + +Handles tool decoration logic. + +## Signature + +```python +class ToolDecorator +``` + +## Methods + +### create\_class\_decorator + +Create class tool decorator. + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +create_class_decorator() +``` + +#### Returns + +Decorator function + +#### Source + +[`signalwire/signalwire/core/agent/tools/decorator.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/decorator.py) + +Line 132. + +*** + +### create\_instance\_decorator + +Create instance tool decorator. + +**Modifiers:** `static` + +#### Signature + +```python +@staticmethod +create_instance_decorator(registry) +``` + +#### Parameters + + + ToolRegistry instance to register with + + +#### Returns + +Decorator function + +#### Source + +[`signalwire/signalwire/core/agent/tools/decorator.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/decorator.py) + +Line 23. + +## Source + +[`signalwire/signalwire/core/agent/tools/decorator.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/decorator.py) + +Line 20. diff --git a/fern/products/sdk-reference/python/agents/agent/tools/index.mdx b/fern/products/sdk-reference/python/agents/agent/tools/index.mdx new file mode 100644 index 0000000000..59e831242a --- /dev/null +++ b/fern/products/sdk-reference/python/agents/agent/tools/index.mdx @@ -0,0 +1,52 @@ +--- +slug: "/reference/python/agents/agent/tools" +title: "tools" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.agent.tools" + parent: "signalwire.core.agent" + module: "agents.agent" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/__init__.py" +--- +# `tools` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module tools +``` + +## Properties + + + +## Modules + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + +## Source + +[`signalwire/signalwire/core/agent/tools/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/__init__.py) diff --git a/fern/products/sdk-reference/python/agents/agent/tools/registry/index.mdx b/fern/products/sdk-reference/python/agents/agent/tools/registry/index.mdx new file mode 100644 index 0000000000..edaaf81c16 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/agent/tools/registry/index.mdx @@ -0,0 +1,44 @@ +--- +slug: "/reference/python/agents/agent/tools/registry" +title: "registry" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.agent.tools.registry" + parent: "signalwire.core.agent.tools" + module: "agents.agent.tools" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/registry.py" +--- +# `registry` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module registry +``` + +## Properties + + + +## Classes + + + + Manages SWAIG function registration. + + + +## Source + +[`signalwire/signalwire/core/agent/tools/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/registry.py) diff --git a/fern/products/sdk-reference/python/agents/agent/tools/registry/tool-registry/index.mdx b/fern/products/sdk-reference/python/agents/agent/tools/registry/tool-registry/index.mdx new file mode 100644 index 0000000000..cd343d9f01 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/agent/tools/registry/tool-registry/index.mdx @@ -0,0 +1,309 @@ +--- +slug: "/reference/python/agents/agent/tools/registry/tool-registry" +title: "ToolRegistry" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.core.agent.tools.registry.ToolRegistry" + parent: "signalwire.core.agent.tools.registry" + module: "agents.agent.tools.registry" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/registry.py" +--- +# `ToolRegistry` + +Manages SWAIG function registration. + +## Signature + +```python +class ToolRegistry +``` + +## Properties + + + +## Methods + +### \_\_init\_\_ + +Initialize ToolRegistry with reference to parent agent. + +#### Signature + +```python +__init__(agent) +``` + +#### Parameters + + + Parent AgentBase instance + + +#### Source + +[`signalwire/signalwire/core/agent/tools/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/registry.py) + +Line 24. + +*** + +### define\_tool + +Define a SWAIG function that the AI can call. + +#### Signature + +```python +define_tool( + name: str, + description: str, + parameters: Dict[str, Any], + handler: Callable, + secure: bool = True, + fillers: Optional[Dict[str, List[str]]] = None, + wait_file: Optional[str] = None, + wait_file_loops: Optional[int] = None, + webhook_url: Optional[str] = None, + required: Optional[List[str]] = None, + is_typed_handler: bool = False, + **swaig_fields = {} +) -> None +``` + +#### Parameters + + + Function name (must be unique) + + + + Function description for the AI + + + + JSON Schema of parameters + + + + Function to call when invoked + + + + Whether to require token validation + + + + Optional dict mapping language codes to arrays of filler phrases (deprecated) + + + + Optional URL to audio file to play while function executes + + + + Optional number of times to loop the wait\_file + + + + Optional external webhook URL to use instead of local handling + + + + Optional list of required parameter names + + + + Whether the handler uses type-hinted parameters + + + + +#### Returns + +`None` + +#### Throws + +- `ValueError` — If tool name already exists + +#### Source + +[`signalwire/signalwire/core/agent/tools/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/registry.py) + +Line 35. + +*** + +### get\_all\_functions + +Get all registered functions. + +#### Signature + +```python +get_all_functions() -> Dict[str, Union[SWAIGFunction, Dict[str, Any]]] +``` + +#### Returns + +`Dict[str, Union[SWAIGFunction, Dict[str, Any]]]` — Dictionary of function name to function object/dict + +#### Source + +[`signalwire/signalwire/core/agent/tools/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/registry.py) + +Line 204. + +*** + +### get\_function + +Get a registered function by name. + +#### Signature + +```python +get_function(name: str) -> Optional[Union[SWAIGFunction, Dict[str, Any]]] +``` + +#### Parameters + + + Function name + + +#### Returns + +`Optional[Union[SWAIGFunction, Dict[str, Any]]]` — SWAIGFunction instance or raw function dict, or None if not found + +#### Source + +[`signalwire/signalwire/core/agent/tools/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/registry.py) + +Line 192. + +*** + +### has\_function + +Check if a function is registered. + +#### Signature + +```python +has_function(name: str) -> bool +``` + +#### Parameters + + + Function name + + +#### Returns + +`bool` — True if function exists, False otherwise + +#### Source + +[`signalwire/signalwire/core/agent/tools/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/registry.py) + +Line 213. + +*** + +### register\_class\_decorated\_tools + +Register tools defined with @AgentBase.tool class decorator. + +This method scans the class for methods decorated with @AgentBase.tool +and registers them automatically. If parameters are not explicitly +provided and the function has type-hinted parameters, the schema +is inferred from the type hints. + +#### Signature + +```python +register_class_decorated_tools() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/core/agent/tools/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/registry.py) + +Line 116. + +*** + +### register\_swaig\_function + +Register a raw SWAIG function dictionary (e.g., from DataMap.to\_swaig\_function()). + +#### Signature + +```python +register_swaig_function(function_dict: Dict[str, Any]) -> None +``` + +#### Parameters + + + Complete SWAIG function definition dictionary + + +#### Returns + +`None` + +#### Throws + +- `ValueError` — If function name missing or already exists + +#### Source + +[`signalwire/signalwire/core/agent/tools/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/registry.py) + +Line 90. + +*** + +### remove\_function + +Remove a registered function. + +#### Signature + +```python +remove_function(name: str) -> bool +``` + +#### Parameters + + + Function name + + +#### Returns + +`bool` — True if removed, False if not found + +#### Source + +[`signalwire/signalwire/core/agent/tools/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/registry.py) + +Line 225. + +## Source + +[`signalwire/signalwire/core/agent/tools/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/registry.py) + +Line 21. diff --git a/fern/products/sdk-reference/python/agents/agent/tools/type-inference/index.mdx b/fern/products/sdk-reference/python/agents/agent/tools/type-inference/index.mdx new file mode 100644 index 0000000000..2f4274443b --- /dev/null +++ b/fern/products/sdk-reference/python/agents/agent/tools/type-inference/index.mdx @@ -0,0 +1,99 @@ +--- +slug: "/reference/python/agents/agent/tools/type-inference" +title: "type_inference" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.agent.tools.type_inference" + parent: "signalwire.core.agent.tools" + module: "agents.agent.tools" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/type_inference.py" +--- +# `type_inference` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module type_inference +``` + +## Functions + +### create\_typed\_handler\_wrapper + +Wrap a typed handler function so it can be called with the standard +SWAIG calling convention (args\_dict, raw\_data). + +The wrapper unpacks the args dict into keyword arguments for the +original function. + +#### Signature + +```python +create_typed_handler_wrapper(func, has_raw_data: bool) +``` + +#### Parameters + + + The original typed handler function. + + + + If True, pass raw\_data as a keyword argument. + + +#### Returns + +A wrapper function with signature (args, raw\_data). + +#### Source + +[`signalwire/signalwire/core/agent/tools/type_inference.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/type_inference.py) + +Line 248. + +*** + +### infer\_schema + +Inspect a function's signature and type hints to infer a JSON Schema +for SWAIG tool parameters. + +#### Signature + +```python +infer_schema( + func +) -> Tuple[Dict[str, Dict], List[str], Optional[str], bool, bool] +``` + +#### Parameters + + + The function to inspect. + + +#### Returns + +`Tuple[Dict[str, Dict], List[str], Optional[str], bool, bool]` — A tuple of (parameters, required, description, is\_typed, has\_raw\_data): - parameters: dict mapping parameter names to JSON Schema property dicts - required: list of required parameter names - description: tool description from docstring (or None) - is\_typed: True if the function uses typed parameters (new style) - has\_raw\_data: True if the function accepts a `raw_data` parameter + +#### Source + +[`signalwire/signalwire/core/agent/tools/type_inference.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/type_inference.py) + +Line 147. + +## Source + +[`signalwire/signalwire/core/agent/tools/type_inference.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/type_inference.py) diff --git a/fern/products/sdk-reference/python/agents/auth-handler/index.mdx b/fern/products/sdk-reference/python/agents/auth-handler/index.mdx new file mode 100644 index 0000000000..118f821b7e --- /dev/null +++ b/fern/products/sdk-reference/python/agents/auth-handler/index.mdx @@ -0,0 +1,36 @@ +--- +slug: "/reference/python/agents/auth-handler" +title: "auth_handler" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.auth_handler" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/auth_handler.py" +--- +# `auth_handler` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module auth_handler +``` + +## Properties + + + +## Source + +[`signalwire/signalwire/core/auth_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/auth_handler.py) diff --git a/fern/products/sdk-reference/python/agents/auth-handler/index__2.mdx b/fern/products/sdk-reference/python/agents/auth-handler/index__2.mdx new file mode 100644 index 0000000000..a062237a7a --- /dev/null +++ b/fern/products/sdk-reference/python/agents/auth-handler/index__2.mdx @@ -0,0 +1,220 @@ +--- +slug: "/reference/python/agents/auth-handler/index__2" +title: "AuthHandler" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.core.auth_handler.AuthHandler" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/auth_handler.py" +--- +# `AuthHandler` + +Unified authentication handler supporting multiple auth methods. + +This class provides a clean pattern for handling Basic Auth, Bearer tokens, +and API keys across all SignalWire services. + +## Signature + +```python +class AuthHandler +``` + +## Properties + + + + + + + +## Methods + +### \_\_init\_\_ + +Initialize auth handler with security configuration. + +#### Signature + +```python +__init__(security_config: SecurityConfig) +``` + +#### Parameters + + + SecurityConfig instance with auth settings + + +#### Source + +[`signalwire/signalwire/core/auth_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/auth_handler.py) + +Line 38. + +*** + +### flask\_decorator + +Flask decorator for authentication. + +This provides compatibility with Flask-based services like MCP Gateway. + +#### Signature + +```python +flask_decorator(f: Callable) -> Callable +``` + +#### Parameters + + + +#### Returns + +`Callable` + +#### Source + +[`signalwire/signalwire/core/auth_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/auth_handler.py) + +Line 160. + +*** + +### get\_auth\_info + +Get information about configured auth methods + +#### Signature + +```python +get_auth_info() -> Dict[str, Any] +``` + +#### Returns + +`Dict[str, Any]` + +#### Source + +[`signalwire/signalwire/core/auth_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/auth_handler.py) + +Line 209. + +*** + +### get\_fastapi\_dependency + +Get FastAPI dependency for authentication. + +#### Signature + +```python +get_fastapi_dependency(optional: bool = False) +``` + +#### Parameters + + + If True, authentication is optional + + +#### Returns + +FastAPI dependency function + +#### Source + +[`signalwire/signalwire/core/auth_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/auth_handler.py) + +Line 114. + +*** + +### verify\_api\_key + +Verify API key + +#### Signature + +```python +verify_api_key(api_key: str) -> bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/core/auth_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/auth_handler.py) + +Line 106. + +*** + +### verify\_basic\_auth + +Verify basic auth credentials + +#### Signature + +```python +verify_basic_auth(credentials: HTTPBasicCredentials) -> bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/core/auth_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/auth_handler.py) + +Line 81. + +*** + +### verify\_bearer\_token + +Verify bearer token + +#### Signature + +```python +verify_bearer_token(credentials: HTTPAuthorizationCredentials) -> bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/core/auth_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/auth_handler.py) + +Line 96. + +## Source + +[`signalwire/signalwire/core/auth_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/auth_handler.py) + +Line 30. diff --git a/fern/products/sdk-reference/python/agents/cli/build-search/index.mdx b/fern/products/sdk-reference/python/agents/cli/build-search/index.mdx new file mode 100644 index 0000000000..4a6ac86672 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/cli/build-search/index.mdx @@ -0,0 +1,140 @@ +--- +slug: "/reference/python/agents/cli/build-search" +title: "build_search" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.cli.build_search" + parent: "signalwire.cli" + module: "agents.cli" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/build_search.py" +--- +# `build_search` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module build_search +``` + +## Functions + +### console\_entry\_point + +Console script entry point for pip installation + +#### Signature + +```python +console_entry_point() +``` + +#### Source + +[`signalwire/signalwire/cli/build_search.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/build_search.py) + +Line 1238. + +*** + +### main + +Main entry point for the build-search command + +#### Signature + +```python +main() +``` + +#### Source + +[`signalwire/signalwire/cli/build_search.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/build_search.py) + +Line 34. + +*** + +### migrate\_command + +Migrate search indexes between backends + +#### Signature + +```python +migrate_command() +``` + +#### Source + +[`signalwire/signalwire/cli/build_search.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/build_search.py) + +Line 967. + +*** + +### remote\_command + +Search via remote API endpoint + +#### Signature + +```python +remote_command() +``` + +#### Source + +[`signalwire/signalwire/cli/build_search.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/build_search.py) + +Line 1103. + +*** + +### search\_command + +Search within an existing search index + +#### Signature + +```python +search_command() +``` + +#### Source + +[`signalwire/signalwire/cli/build_search.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/build_search.py) + +Line 659. + +*** + +### validate\_command + +Validate an existing search index + +#### Signature + +```python +validate_command() +``` + +#### Source + +[`signalwire/signalwire/cli/build_search.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/build_search.py) + +Line 621. + +## Source + +[`signalwire/signalwire/cli/build_search.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/build_search.py) diff --git a/fern/products/sdk-reference/python/agents/cli/config/index.mdx b/fern/products/sdk-reference/python/agents/cli/config/index.mdx new file mode 100644 index 0000000000..8c1e9f59e1 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/cli/config/index.mdx @@ -0,0 +1,80 @@ +--- +slug: "/reference/python/agents/cli/config" +title: "config" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.cli.config" + parent: "signalwire.cli" + module: "agents.cli" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/config.py" +--- +# `config` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module config +``` + +## Constants + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## Source + +[`signalwire/signalwire/cli/config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/config.py) diff --git a/fern/products/sdk-reference/python/agents/cli/core/agent-loader/index.mdx b/fern/products/sdk-reference/python/agents/cli/core/agent-loader/index.mdx new file mode 100644 index 0000000000..7cbc92fe08 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/cli/core/agent-loader/index.mdx @@ -0,0 +1,186 @@ +--- +slug: "/reference/python/agents/cli/core/agent-loader" +title: "agent_loader" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.cli.core.agent_loader" + parent: "signalwire.cli.core" + module: "agents.cli.core" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/agent_loader.py" +--- +# `agent_loader` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module agent_loader +``` + +## Constants + + + + + + + +## Functions + +### discover\_agents\_in\_file + +Backward compatibility wrapper - discovers agents in a file + +#### Signature + +```python +discover_agents_in_file(agent_path: str) -> List[Dict[str, Any]] +``` + +#### Parameters + + + Path to the Python file containing agents + + +#### Returns + +`List[Dict[str, Any]]` — List of dictionaries with agent information + +#### Source + +[`signalwire/signalwire/cli/core/agent_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/agent_loader.py) + +Line 59. + +*** + +### discover\_services\_in\_file + +Discover all available SWML services (including agents) in a Python file without instantiating them + +#### Signature + +```python +discover_services_in_file(service_path: str) -> List[Dict[str, Any]] +``` + +#### Parameters + + + Path to the Python file containing services + + +#### Returns + +`List[Dict[str, Any]]` — List of dictionaries with service information + +#### Throws + +- `ImportError` — If the file cannot be imported +- `FileNotFoundError` — If the file doesn't exist + +#### Source + +[`signalwire/signalwire/cli/core/agent_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/agent_loader.py) + +Line 38. + +*** + +### load\_agent\_from\_file + +Load an agent from a Python file + +#### Signature + +```python +load_agent_from_file( + agent_path: str, + agent_class_name: Optional[str] = None +) -> AgentBase +``` + +#### Parameters + + + Path to the Python file containing the agent + + + + Optional name of the agent class to instantiate + + +#### Returns + +`AgentBase` — AgentBase instance + +#### Throws + +- `ImportError` — If the file cannot be imported +- `ValueError` — If no agent is found in the file + +#### Source + +[`signalwire/signalwire/cli/core/agent_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/agent_loader.py) + +Line 193. + +*** + +### load\_service\_from\_file + +Load a SWML service from a Python file + +#### Signature + +```python +load_service_from_file( + service_path: str, + service_identifier: Optional[str] = None, + prefer_route: bool = True +) -> SWMLService +``` + +#### Parameters + + + Path to the Python file containing the service + + + + Optional service identifier - can be class name or route + + + + If True, interpret identifier as route first, then class name + + +#### Returns + +`SWMLService` — SWMLService instance (could be AgentBase or basic SWMLService) + +#### Throws + +- `ImportError` — If the file cannot be imported +- `ValueError` — If no service is found in the file + +#### Source + +[`signalwire/signalwire/cli/core/agent_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/agent_loader.py) + +Line 170. + +## Source + +[`signalwire/signalwire/cli/core/agent_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/agent_loader.py) diff --git a/fern/products/sdk-reference/python/agents/cli/core/argparse-helpers/custom-argument-parser/index.mdx b/fern/products/sdk-reference/python/agents/cli/core/argparse-helpers/custom-argument-parser/index.mdx new file mode 100644 index 0000000000..4ca91e87fe --- /dev/null +++ b/fern/products/sdk-reference/python/agents/cli/core/argparse-helpers/custom-argument-parser/index.mdx @@ -0,0 +1,123 @@ +--- +slug: "/reference/python/agents/cli/core/argparse-helpers/custom-argument-parser" +title: "CustomArgumentParser" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.cli.core.argparse_helpers.CustomArgumentParser" + parent: "signalwire.cli.core.argparse_helpers" + module: "agents.cli.core.argparse_helpers" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/argparse_helpers.py" +--- +# `CustomArgumentParser` + +Custom ArgumentParser with better error handling + +## Signature + +```python +class CustomArgumentParser(argparse.ArgumentParser) +``` + +## Inheritance + +**Extends:** `argparse.ArgumentParser` + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(*args = (), **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/cli/core/argparse_helpers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/argparse_helpers.py) + +Line 23. + +*** + +### error + +Override error method to provide user-friendly error messages + +#### Signature + +```python +error(message) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/cli/core/argparse_helpers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/argparse_helpers.py) + +Line 33. + +*** + +### parse\_args + +Override parse\_args to provide custom error handling for missing arguments + +#### Signature + +```python +parse_args(args = None, namespace = None) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/cli/core/argparse_helpers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/argparse_helpers.py) + +Line 58. + +*** + +### print\_usage + +Override print\_usage to suppress output when we want custom error handling + +#### Signature + +```python +print_usage(file = None) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/cli/core/argparse_helpers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/argparse_helpers.py) + +Line 52. + +## Source + +[`signalwire/signalwire/cli/core/argparse_helpers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/argparse_helpers.py) + +Line 20. diff --git a/fern/products/sdk-reference/python/agents/cli/core/argparse-helpers/index.mdx b/fern/products/sdk-reference/python/agents/cli/core/argparse-helpers/index.mdx new file mode 100644 index 0000000000..b0313af5a9 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/cli/core/argparse-helpers/index.mdx @@ -0,0 +1,75 @@ +--- +slug: "/reference/python/agents/cli/core/argparse-helpers" +title: "argparse_helpers" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.cli.core.argparse_helpers" + parent: "signalwire.cli.core" + module: "agents.cli.core" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/argparse_helpers.py" +--- +# `argparse_helpers` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module argparse_helpers +``` + +## Classes + + + + Custom ArgumentParser with better error handling + + + +## Functions + +### parse\_function\_arguments + +Parse function arguments from command line with type coercion based on schema + +#### Signature + +```python +parse_function_arguments( + function_args_list: List[str], + func_schema: Dict[str, Any] +) -> Dict[str, Any] +``` + +#### Parameters + + + List of command line arguments after --args + + + + Function schema with parameter definitions + + +#### Returns + +`Dict[str, Any]` — Dictionary of parsed function arguments + +#### Source + +[`signalwire/signalwire/cli/core/argparse_helpers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/argparse_helpers.py) + +Line 82. + +## Source + +[`signalwire/signalwire/cli/core/argparse_helpers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/argparse_helpers.py) diff --git a/fern/products/sdk-reference/python/agents/cli/core/dynamic-config/index.mdx b/fern/products/sdk-reference/python/agents/cli/core/dynamic-config/index.mdx new file mode 100644 index 0000000000..ea4e577f72 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/cli/core/dynamic-config/index.mdx @@ -0,0 +1,72 @@ +--- +slug: "/reference/python/agents/cli/core/dynamic-config" +title: "dynamic_config" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.cli.core.dynamic_config" + parent: "signalwire.cli.core" + module: "agents.cli.core" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/dynamic_config.py" +--- +# `dynamic_config` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module dynamic_config +``` + +## Functions + +### apply\_dynamic\_config + +Apply dynamic configuration callback if the agent has one + +#### Signature + +```python +apply_dynamic_config( + agent: AgentBase, + mock_request: Optional[MockRequest] = None, + verbose: bool = False +) -> None +``` + +#### Parameters + + + The agent instance + + + + Optional mock request object + + + + Whether to print verbose output + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/cli/core/dynamic_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/dynamic_config.py) + +Line 22. + +## Source + +[`signalwire/signalwire/cli/core/dynamic_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/dynamic_config.py) diff --git a/fern/products/sdk-reference/python/agents/cli/core/index.mdx b/fern/products/sdk-reference/python/agents/cli/core/index.mdx new file mode 100644 index 0000000000..74ac178367 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/cli/core/index.mdx @@ -0,0 +1,52 @@ +--- +slug: "/reference/python/agents/cli/core" +title: "core" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.cli.core" + parent: "signalwire.cli" + module: "agents.cli" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/__init__.py" +--- +# `core` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module core +``` + +## Modules + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + +## Source + +[`signalwire/signalwire/cli/core/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/__init__.py) diff --git a/fern/products/sdk-reference/python/agents/cli/core/service-loader/index.mdx b/fern/products/sdk-reference/python/agents/cli/core/service-loader/index.mdx new file mode 100644 index 0000000000..c92eef3642 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/cli/core/service-loader/index.mdx @@ -0,0 +1,218 @@ +--- +slug: "/reference/python/agents/cli/core/service-loader" +title: "service_loader" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.cli.core.service_loader" + parent: "signalwire.cli.core" + module: "agents.cli.core" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/service_loader.py" +--- +# `service_loader` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module service_loader +``` + +## Constants + + + +## Classes + + + + Captures SWMLService instances when they try to run/serve + + + +## Functions + +### discover\_agents\_in\_file + +Backward compatibility wrapper + +#### Signature + +```python +discover_agents_in_file(agent_path: str) -> List[Dict[str, Any]] +``` + +#### Parameters + + + +#### Returns + +`List[Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/cli/core/service_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/service_loader.py) + +Line 282. + +*** + +### load\_agent\_from\_file + +Backward compatibility wrapper + +Note: This still uses the direct extraction approach for compatibility + +#### Signature + +```python +load_agent_from_file( + agent_path: str, + agent_class_name: Optional[str] = None, + suppress_output: bool = False +) -> AgentBase +``` + +#### Parameters + + + + + + + +#### Returns + +`AgentBase` + +#### Source + +[`signalwire/signalwire/cli/core/service_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/service_loader.py) + +Line 253. + +*** + +### load\_and\_simulate\_service + +Load a service file and simulate a request to it + +This is the main entry point that combines loading and request simulation + +#### Signature + +```python +load_and_simulate_service( + service_path: str, + route: Optional[str] = None, + method: str = 'POST', + body: Optional[dict] = None, + query_params: Optional[dict] = None, + headers: Optional[dict] = None, + suppress_output: bool = False +) -> dict +``` + +#### Parameters + + + Path to the service file + + + + Optional route to request (for multi-service files) + + + + HTTP method + + + + Request body + + + + Query parameters + + + + Request headers + + + + +#### Returns + +`dict` — The service's response + +#### Source + +[`signalwire/signalwire/cli/core/service_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/service_loader.py) + +Line 183. + +*** + +### simulate\_request\_to\_service + +Simulate a request to a SWMLService instance + +**Modifiers:** `async` + +#### Signature + +```python +async simulate_request_to_service( + service: SWMLService, + method: str = 'POST', + body: Optional[dict] = None, + query_params: Optional[dict] = None, + headers: Optional[dict] = None +) -> dict +``` + +#### Parameters + + + The SWMLService instance + + + + HTTP method (GET or POST) + + + + Request body for POST requests + + + + Query parameters + + + + Request headers + + +#### Returns + +`dict` — The service's response as a dict + +#### Source + +[`signalwire/signalwire/cli/core/service_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/service_loader.py) + +Line 135. + +## Source + +[`signalwire/signalwire/cli/core/service_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/service_loader.py) diff --git a/fern/products/sdk-reference/python/agents/cli/core/service-loader/service-capture/index.mdx b/fern/products/sdk-reference/python/agents/cli/core/service-loader/service-capture/index.mdx new file mode 100644 index 0000000000..e93973c8f9 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/cli/core/service-loader/service-capture/index.mdx @@ -0,0 +1,83 @@ +--- +slug: "/reference/python/agents/cli/core/service-loader/service-capture" +title: "ServiceCapture" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.cli.core.service_loader.ServiceCapture" + parent: "signalwire.cli.core.service_loader" + module: "agents.cli.core.service_loader" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/service_loader.py" +--- +# `ServiceCapture` + +Captures SWMLService instances when they try to run/serve + +## Signature + +```python +class ServiceCapture +``` + +## Properties + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__() +``` + +#### Source + +[`signalwire/signalwire/cli/core/service_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/service_loader.py) + +Line 40. + +*** + +### capture + +Execute a service file and capture any services that try to run + +#### Signature + +```python +capture(service_path: str, suppress_output: bool = False) -> List[SWMLService] +``` + +#### Parameters + + + Path to the Python file + + + + If True, suppress stdout during module execution + + +#### Returns + +`List[SWMLService]` — List of captured SWMLService instances + +#### Source + +[`signalwire/signalwire/cli/core/service_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/service_loader.py) + +Line 44. + +## Source + +[`signalwire/signalwire/cli/core/service_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/service_loader.py) + +Line 37. diff --git a/fern/products/sdk-reference/python/agents/cli/dokku/colors/index.mdx b/fern/products/sdk-reference/python/agents/cli/dokku/colors/index.mdx new file mode 100644 index 0000000000..fa003f4384 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/cli/dokku/colors/index.mdx @@ -0,0 +1,47 @@ +--- +slug: "/reference/python/agents/cli/dokku/colors" +title: "Colors" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.cli.dokku.Colors" + parent: "signalwire.cli.dokku" + module: "agents.cli.dokku" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/dokku.py" +--- +# `Colors` + +## Signature + +```python +class Colors +``` + +## Properties + + + + + + + + + + + + + + + + + + + +## Source + +[`signalwire/signalwire/cli/dokku.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/dokku.py) + +Line 34. diff --git a/fern/products/sdk-reference/python/agents/cli/dokku/dokku-project-generator/index.mdx b/fern/products/sdk-reference/python/agents/cli/dokku/dokku-project-generator/index.mdx new file mode 100644 index 0000000000..45c00fc294 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/cli/dokku/dokku-project-generator/index.mdx @@ -0,0 +1,85 @@ +--- +slug: "/reference/python/agents/cli/dokku/dokku-project-generator" +title: "DokkuProjectGenerator" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.cli.dokku.DokkuProjectGenerator" + parent: "signalwire.cli.dokku" + module: "agents.cli.dokku" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/dokku.py" +--- +# `DokkuProjectGenerator` + +Generates Dokku deployment files for SignalWire agents. + +## Signature + +```python +class DokkuProjectGenerator +``` + +## Properties + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(app_name: str, options: Dict[str, Any]) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/cli/dokku.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/dokku.py) + +Line 1816. + +*** + +### generate + +Generate the project files. + +#### Signature + +```python +generate() -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/cli/dokku.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/dokku.py) + +Line 1828. + +## Source + +[`signalwire/signalwire/cli/dokku.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/dokku.py) + +Line 1813. diff --git a/fern/products/sdk-reference/python/agents/cli/dokku/index.mdx b/fern/products/sdk-reference/python/agents/cli/dokku/index.mdx new file mode 100644 index 0000000000..28b3cfdb02 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/cli/dokku/index.mdx @@ -0,0 +1,390 @@ +--- +slug: "/reference/python/agents/cli/dokku" +title: "dokku" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.cli.dokku" + parent: "signalwire.cli" + module: "agents.cli" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/dokku.py" +--- +# `dokku` + +SignalWire Agent Dokku Deployment Tool + +CLI tool for deploying SignalWire agents to Dokku with support for: + +- Simple git push deployment +- Full CI/CD with GitHub Actions +- Service provisioning (PostgreSQL, Redis) +- Preview environments for PRs + +> \[!NOTE] +> sw-agent-dokku init myagent # Simple mode +> sw-agent-dokku init myagent --cicd # With GitHub Actions CI/CD +> sw-agent-dokku deploy # Deploy current directory +> sw-agent-dokku logs # Tail logs +> sw-agent-dokku config set KEY=value # Set environment variables +> sw-agent-dokku scale web=2 # Scale processes + +## Signature + +```python +module dokku +``` + +## Constants + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## Classes + + + + + + Generates Dokku deployment files for SignalWire agents. + + + +## Functions + +### cmd\_config + +Manage Dokku config. + +#### Signature + +```python +cmd_config(args) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/cli/dokku.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/dokku.py) + +Line 2158. + +*** + +### cmd\_deploy + +Deploy to Dokku. + +#### Signature + +```python +cmd_deploy(args) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/cli/dokku.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/dokku.py) + +Line 2071. + +*** + +### cmd\_init + +Initialize a new Dokku project. + +#### Signature + +```python +cmd_init(args) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/cli/dokku.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/dokku.py) + +Line 1970. + +*** + +### cmd\_logs + +Tail Dokku logs. + +#### Signature + +```python +cmd_logs(args) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/cli/dokku.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/dokku.py) + +Line 2136. + +*** + +### cmd\_scale + +Scale Dokku processes. + +#### Signature + +```python +cmd_scale(args) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/cli/dokku.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/dokku.py) + +Line 2186. + +*** + +### generate\_password + +#### Signature + +```python +generate_password(length: int = 32) -> str +``` + +#### Parameters + + + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/cli/dokku.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/dokku.py) + +Line 81. + +*** + +### main + +#### Signature + +```python +main() +``` + +#### Source + +[`signalwire/signalwire/cli/dokku.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/dokku.py) + +Line 2223. + +*** + +### print\_error + +#### Signature + +```python +print_error(msg: str) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/cli/dokku.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/dokku.py) + +Line 58. + +*** + +### print\_header + +#### Signature + +```python +print_header(msg: str) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/cli/dokku.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/dokku.py) + +Line 62. + +*** + +### print\_step + +#### Signature + +```python +print_step(msg: str) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/cli/dokku.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/dokku.py) + +Line 46. + +*** + +### print\_success + +#### Signature + +```python +print_success(msg: str) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/cli/dokku.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/dokku.py) + +Line 50. + +*** + +### print\_warning + +#### Signature + +```python +print_warning(msg: str) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/cli/dokku.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/dokku.py) + +Line 54. + +*** + +### prompt + +#### Signature + +```python +prompt(question: str, default: str = '') -> str +``` + +#### Parameters + + + + + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/cli/dokku.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/dokku.py) + +Line 66. + +*** + +### prompt\_yes\_no + +#### Signature + +```python +prompt_yes_no(question: str, default: bool = True) -> bool +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/cli/dokku.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/dokku.py) + +Line 73. + +## Source + +[`signalwire/signalwire/cli/dokku.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/dokku.py) diff --git a/fern/products/sdk-reference/python/agents/cli/execution/datamap-exec/index.mdx b/fern/products/sdk-reference/python/agents/cli/execution/datamap-exec/index.mdx new file mode 100644 index 0000000000..f3180070f1 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/cli/execution/datamap-exec/index.mdx @@ -0,0 +1,111 @@ +--- +slug: "/reference/python/agents/cli/execution/datamap-exec" +title: "datamap_exec" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.cli.execution.datamap_exec" + parent: "signalwire.cli.execution" + module: "agents.cli.execution" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/execution/datamap_exec.py" +--- +# `datamap_exec` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module datamap_exec +``` + +## Functions + +### execute\_datamap\_function + +Execute a DataMap function following the actual DataMap processing pipeline: + +1. Expressions (pattern matching) +2. Webhooks (try each sequentially until one succeeds) +3. Foreach (within successful webhook) +4. Output (from successful webhook) +5. Fallback output (if all webhooks fail) + +#### Signature + +```python +execute_datamap_function( + datamap_config: Dict[str, Any], + args: Dict[str, Any], + verbose: bool = False +) -> Dict[str, Any] +``` + +#### Parameters + + + DataMap configuration dictionary + + + + Function arguments + + + + Enable verbose output + + +#### Returns + +`Dict[str, Any]` — Function result (should be string or dict with 'response' key) + +#### Source + +[`signalwire/signalwire/cli/execution/datamap_exec.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/execution/datamap_exec.py) + +Line 124. + +*** + +### simple\_template\_expand + +Simple template expansion for DataMap testing +Supports both $\{key\} and %\{key\} syntax with nested object access and array indexing + +#### Signature + +```python +simple_template_expand(template: str, data: Dict[str, Any]) -> str +``` + +#### Parameters + + + Template string with $\{\} or %\{\} variables + + + + Data dictionary for expansion + + +#### Returns + +`str` — Expanded string + +#### Source + +[`signalwire/signalwire/cli/execution/datamap_exec.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/execution/datamap_exec.py) + +Line 22. + +## Source + +[`signalwire/signalwire/cli/execution/datamap_exec.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/execution/datamap_exec.py) diff --git a/fern/products/sdk-reference/python/agents/cli/execution/index.mdx b/fern/products/sdk-reference/python/agents/cli/execution/index.mdx new file mode 100644 index 0000000000..2a5b8a1d2f --- /dev/null +++ b/fern/products/sdk-reference/python/agents/cli/execution/index.mdx @@ -0,0 +1,44 @@ +--- +slug: "/reference/python/agents/cli/execution" +title: "execution" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.cli.execution" + parent: "signalwire.cli" + module: "agents.cli" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/execution/__init__.py" +--- +# `execution` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module execution +``` + +## Modules + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + +## Source + +[`signalwire/signalwire/cli/execution/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/execution/__init__.py) diff --git a/fern/products/sdk-reference/python/agents/cli/execution/webhook-exec/index.mdx b/fern/products/sdk-reference/python/agents/cli/execution/webhook-exec/index.mdx new file mode 100644 index 0000000000..d430fa4094 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/cli/execution/webhook-exec/index.mdx @@ -0,0 +1,83 @@ +--- +slug: "/reference/python/agents/cli/execution/webhook-exec" +title: "webhook_exec" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.cli.execution.webhook_exec" + parent: "signalwire.cli.execution" + module: "agents.cli.execution" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/execution/webhook_exec.py" +--- +# `webhook_exec` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module webhook_exec +``` + +## Functions + +### execute\_external\_webhook\_function + +Execute an external webhook SWAIG function by making an HTTP request to the external service. +This simulates what SignalWire would do when calling an external webhook function. + +#### Signature + +```python +execute_external_webhook_function( + func: SWAIGFunction, + function_name: str, + function_args: Dict[str, Any], + post_data: Dict[str, Any], + verbose: bool = False +) -> Dict[str, Any] +``` + +#### Parameters + + + The SWAIGFunction object with webhook\_url + + + + Name of the function being called + + + + Parsed function arguments + + + + Complete post data to send to the webhook + + + + Whether to show verbose output + + +#### Returns + +`Dict[str, Any]` — Response from the external webhook service + +#### Source + +[`signalwire/signalwire/cli/execution/webhook_exec.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/execution/webhook_exec.py) + +Line 24. + +## Source + +[`signalwire/signalwire/cli/execution/webhook_exec.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/execution/webhook_exec.py) diff --git a/fern/products/sdk-reference/python/agents/cli/index.mdx b/fern/products/sdk-reference/python/agents/cli/index.mdx new file mode 100644 index 0000000000..fe13797950 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/cli/index.mdx @@ -0,0 +1,84 @@ +--- +slug: "/reference/python/agents/cli" +title: "cli" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.cli" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/__init__.py" +--- +# `cli` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module cli +``` + +## Properties + + + +## Modules + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + SignalWire Agent Dokku Deployment Tool + + + + Copyright (c) 2025 SignalWire + + + + SignalWire Agent Project Generator + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + +## Source + +[`signalwire/signalwire/cli/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/__init__.py) diff --git a/fern/products/sdk-reference/python/agents/cli/init-project/colors/index.mdx b/fern/products/sdk-reference/python/agents/cli/init-project/colors/index.mdx new file mode 100644 index 0000000000..b8ce6c036c --- /dev/null +++ b/fern/products/sdk-reference/python/agents/cli/init-project/colors/index.mdx @@ -0,0 +1,45 @@ +--- +slug: "/reference/python/agents/cli/init-project/colors" +title: "Colors" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.cli.init_project.Colors" + parent: "signalwire.cli.init_project" + module: "agents.cli.init_project" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py" +--- +# `Colors` + +## Signature + +```python +class Colors +``` + +## Properties + + + + + + + + + + + + + + + + + +## Source + +[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) + +Line 38. diff --git a/fern/products/sdk-reference/python/agents/cli/init-project/index.mdx b/fern/products/sdk-reference/python/agents/cli/init-project/index.mdx new file mode 100644 index 0000000000..d2e47092e7 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/cli/init-project/index.mdx @@ -0,0 +1,558 @@ +--- +slug: "/reference/python/agents/cli/init-project" +title: "init_project" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.cli.init_project" + parent: "signalwire.cli" + module: "agents.cli" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py" +--- +# `init_project` + +SignalWire Agent Project Generator + +Interactive CLI tool to create new SignalWire agent projects with customizable features. + +> \[!NOTE] +> sw-agent-init # Interactive mode +> sw-agent-init myagent # Quick mode with project name +> sw-agent-init myagent --type full --no-venv + +## Signature + +```python +module init_project +``` + +## Constants + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## Classes + + + + + + Generates a new SignalWire agent project. + + + +## Functions + +### generate\_password + +Generate a secure random password. + +#### Signature + +```python +generate_password(length: int = 32) -> str +``` + +#### Parameters + + + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) + +Line 139. + +*** + +### get\_agent\_template + +Generate the main agent template based on type and features. + +#### Signature + +```python +get_agent_template(agent_type: str, features: Dict[str, bool]) -> str +``` + +#### Parameters + + + + + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) + +Line 1177. + +*** + +### get\_app\_template + +Generate the app.py template based on features. + +#### Signature + +```python +get_app_template(features: Dict[str, bool]) -> str +``` + +#### Parameters + + + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) + +Line 1329. + +*** + +### get\_env\_credentials + +Get SignalWire credentials from environment variables. + +#### Signature + +```python +get_env_credentials() -> Dict[str, str] +``` + +#### Returns + +`Dict[str, str]` + +#### Source + +[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) + +Line 130. + +*** + +### get\_readme\_template + +Generate README template. + +#### Signature + +```python +get_readme_template(project_name: str, features: Dict[str, bool]) -> str +``` + +#### Parameters + + + + + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) + +Line 1652. + +*** + +### get\_test\_template + +Generate test template. + +#### Signature + +```python +get_test_template(has_tool: bool) -> str +``` + +#### Parameters + + + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) + +Line 1525. + +*** + +### get\_web\_index\_template + +Generate a simple web UI template. + +#### Signature + +```python +get_web_index_template() -> str +``` + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) + +Line 1744. + +*** + +### main + +Main entry point. + +#### Signature + +```python +main() +``` + +#### Source + +[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) + +Line 2578. + +*** + +### mask\_token + +Mask a token showing only first 4 and last 3 characters. + +#### Signature + +```python +mask_token(token: str) -> str +``` + +#### Parameters + + + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) + +Line 123. + +*** + +### print\_error + +#### Signature + +```python +print_error(msg: str) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) + +Line 61. + +*** + +### print\_step + +#### Signature + +```python +print_step(msg: str) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) + +Line 49. + +*** + +### print\_success + +#### Signature + +```python +print_success(msg: str) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) + +Line 53. + +*** + +### print\_warning + +#### Signature + +```python +print_warning(msg: str) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) + +Line 57. + +*** + +### prompt + +Prompt user for input with optional default. + +#### Signature + +```python +prompt(question: str, default: str = '') -> str +``` + +#### Parameters + + + + + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) + +Line 65. + +*** + +### prompt\_multiselect + +Prompt user to toggle multiple options. Returns list of booleans. + +#### Signature + +```python +prompt_multiselect( + question: str, + options: List[str], + defaults: List[bool] +) -> List[bool] +``` + +#### Parameters + + + + + + + +#### Returns + +`List[bool]` + +#### Source + +[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) + +Line 101. + +*** + +### prompt\_select + +Prompt user to select from numbered options. Returns 1-based index. + +#### Signature + +```python +prompt_select(question: str, options: List[str], default: int = 1) -> int +``` + +#### Parameters + + + + + + + +#### Returns + +`int` + +#### Source + +[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) + +Line 83. + +*** + +### prompt\_yes\_no + +Prompt user for yes/no answer. + +#### Signature + +```python +prompt_yes_no(question: str, default: bool = True) -> bool +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) + +Line 74. + +*** + +### run\_interactive + +Run interactive prompts and return configuration. + +#### Signature + +```python +run_interactive() -> Dict[str, Any] +``` + +#### Returns + +`Dict[str, Any]` + +#### Source + +[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) + +Line 2388. + +*** + +### run\_quick + +Run in quick mode with minimal prompts. + +#### Signature + +```python +run_quick(project_name: str, args: Any) -> Dict[str, Any] +``` + +#### Parameters + + + + + +#### Returns + +`Dict[str, Any]` + +#### Source + +[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) + +Line 2511. + +## Source + +[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) diff --git a/fern/products/sdk-reference/python/agents/cli/init-project/project-generator/index.mdx b/fern/products/sdk-reference/python/agents/cli/init-project/project-generator/index.mdx new file mode 100644 index 0000000000..749f87c22b --- /dev/null +++ b/fern/products/sdk-reference/python/agents/cli/init-project/project-generator/index.mdx @@ -0,0 +1,87 @@ +--- +slug: "/reference/python/agents/cli/init-project/project-generator" +title: "ProjectGenerator" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.cli.init_project.ProjectGenerator" + parent: "signalwire.cli.init_project" + module: "agents.cli.init_project" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py" +--- +# `ProjectGenerator` + +Generates a new SignalWire agent project. + +## Signature + +```python +class ProjectGenerator +``` + +## Properties + + + + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(config: Dict[str, Any]) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) + +Line 1850. + +*** + +### generate + +Generate the project. Returns True on success. + +#### Signature + +```python +generate() -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) + +Line 1859. + +## Source + +[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) + +Line 1847. diff --git a/fern/products/sdk-reference/python/agents/cli/output/index.mdx b/fern/products/sdk-reference/python/agents/cli/output/index.mdx new file mode 100644 index 0000000000..77353fdc51 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/cli/output/index.mdx @@ -0,0 +1,44 @@ +--- +slug: "/reference/python/agents/cli/output" +title: "output" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.cli.output" + parent: "signalwire.cli" + module: "agents.cli" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/output/__init__.py" +--- +# `output` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module output +``` + +## Modules + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + +## Source + +[`signalwire/signalwire/cli/output/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/output/__init__.py) diff --git a/fern/products/sdk-reference/python/agents/cli/output/output-formatter/index.mdx b/fern/products/sdk-reference/python/agents/cli/output/output-formatter/index.mdx new file mode 100644 index 0000000000..37f8094608 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/cli/output/output-formatter/index.mdx @@ -0,0 +1,92 @@ +--- +slug: "/reference/python/agents/cli/output/output-formatter" +title: "output_formatter" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.cli.output.output_formatter" + parent: "signalwire.cli.output" + module: "agents.cli.output" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/output/output_formatter.py" +--- +# `output_formatter` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module output_formatter +``` + +## Functions + +### display\_agent\_tools + +Display the available SWAIG functions for an agent + +#### Signature + +```python +display_agent_tools(agent: AgentBase, verbose: bool = False) -> None +``` + +#### Parameters + + + The agent instance + + + + Whether to show verbose details + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/cli/output/output_formatter.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/output/output_formatter.py) + +Line 23. + +*** + +### format\_result + +Format the result of a SWAIG function call for display + +#### Signature + +```python +format_result(result: Any) -> str +``` + +#### Parameters + + + The result from the SWAIG function + + +#### Returns + +`str` — Formatted string representation + +#### Source + +[`signalwire/signalwire/cli/output/output_formatter.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/output/output_formatter.py) + +Line 220. + +## Source + +[`signalwire/signalwire/cli/output/output_formatter.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/output/output_formatter.py) diff --git a/fern/products/sdk-reference/python/agents/cli/output/swml-dump/index.mdx b/fern/products/sdk-reference/python/agents/cli/output/swml-dump/index.mdx new file mode 100644 index 0000000000..45cb6cb5e9 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/cli/output/swml-dump/index.mdx @@ -0,0 +1,86 @@ +--- +slug: "/reference/python/agents/cli/output/swml-dump" +title: "swml_dump" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.cli.output.swml_dump" + parent: "signalwire.cli.output" + module: "agents.cli.output" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/output/swml_dump.py" +--- +# `swml_dump` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module swml_dump +``` + +## Properties + + + +## Functions + +### handle\_dump\_swml + +Handle SWML dumping with fake post\_data and mock request support + +#### Signature + +```python +handle_dump_swml(agent: AgentBase, args: argparse.Namespace) -> int +``` + +#### Parameters + + + The loaded agent instance + + + + Parsed CLI arguments + + +#### Returns + +`int` — Exit code (0 for success, 1 for error) + +#### Source + +[`signalwire/signalwire/cli/output/swml_dump.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/output/swml_dump.py) + +Line 53. + +*** + +### setup\_output\_suppression + +Set up output suppression for SWML dumping + +#### Signature + +```python +setup_output_suppression() +``` + +#### Source + +[`signalwire/signalwire/cli/output/swml_dump.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/output/swml_dump.py) + +Line 33. + +## Source + +[`signalwire/signalwire/cli/output/swml_dump.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/output/swml_dump.py) diff --git a/fern/products/sdk-reference/python/agents/cli/simulation/data-generation/index.mdx b/fern/products/sdk-reference/python/agents/cli/simulation/data-generation/index.mdx new file mode 100644 index 0000000000..67a84d4b61 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/cli/simulation/data-generation/index.mdx @@ -0,0 +1,275 @@ +--- +slug: "/reference/python/agents/cli/simulation/data-generation" +title: "data_generation" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.cli.simulation.data_generation" + parent: "signalwire.cli.simulation" + module: "agents.cli.simulation" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/data_generation.py" +--- +# `data_generation` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module data_generation +``` + +## Functions + +### adapt\_for\_call\_type + +Adapt call data structure based on call type (sip vs webrtc) + +#### Signature + +```python +adapt_for_call_type(call_data: Dict[str, Any], call_type: str) -> Dict[str, Any] +``` + +#### Parameters + + + Base call data structure + + + + "sip" or "webrtc" + + +#### Returns + +`Dict[str, Any]` — Adapted call data with appropriate addresses and metadata + +#### Source + +[`signalwire/signalwire/cli/simulation/data_generation.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/data_generation.py) + +Line 48. + +*** + +### generate\_comprehensive\_post\_data + +Generate comprehensive post\_data that matches what SignalWire would send + +#### Signature + +```python +generate_comprehensive_post_data( + function_name: str, + args: Dict[str, Any], + custom_data: Optional[Dict[str, Any]] = None +) -> Dict[str, Any] +``` + +#### Parameters + + + Name of the SWAIG function being called + + + + Function arguments + + + + Optional custom data to override defaults + + +#### Returns + +`Dict[str, Any]` — Complete post\_data dict with all possible keys + +#### Source + +[`signalwire/signalwire/cli/simulation/data_generation.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/data_generation.py) + +Line 143. + +*** + +### generate\_fake\_node\_id + +Generate a fake node ID for testing + +#### Signature + +```python +generate_fake_node_id() -> str +``` + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/cli/simulation/data_generation.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/data_generation.py) + +Line 27. + +*** + +### generate\_fake\_sip\_from + +Generate a fake 'from' address based on call type + +#### Signature + +```python +generate_fake_sip_from(call_type: str) -> str +``` + +#### Parameters + + + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/cli/simulation/data_generation.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/data_generation.py) + +Line 32. + +*** + +### generate\_fake\_sip\_to + +Generate a fake 'to' address based on call type + +#### Signature + +```python +generate_fake_sip_to(call_type: str) -> str +``` + +#### Parameters + + + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/cli/simulation/data_generation.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/data_generation.py) + +Line 40. + +*** + +### generate\_fake\_swml\_post\_data + +Generate fake SWML post\_data that matches real SignalWire structure + +#### Signature + +```python +generate_fake_swml_post_data( + call_type: str = 'webrtc', + call_direction: str = 'inbound', + call_state: str = 'created' +) -> Dict[str, Any] +``` + +#### Parameters + + + "sip" or "webrtc" (default: webrtc) + + + + "inbound" or "outbound" (default: inbound) + + + + Call state (default: created) + + +#### Returns + +`Dict[str, Any]` — Fake post\_data dict with call, vars, and envs structure + +#### Source + +[`signalwire/signalwire/cli/simulation/data_generation.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/data_generation.py) + +Line 85. + +*** + +### generate\_fake\_uuid + +Generate a fake UUID for testing + +#### Signature + +```python +generate_fake_uuid() -> str +``` + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/cli/simulation/data_generation.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/data_generation.py) + +Line 22. + +*** + +### generate\_minimal\_post\_data + +Generate minimal post\_data with only essential keys + +#### Signature + +```python +generate_minimal_post_data( + function_name: str, + args: Dict[str, Any] +) -> Dict[str, Any] +``` + +#### Parameters + + + Name of the SWAIG function being called + + + + Function arguments + + +#### Returns + +`Dict[str, Any]` — Minimal post\_data dict + +#### Source + +[`signalwire/signalwire/cli/simulation/data_generation.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/data_generation.py) + +Line 358. + +## Source + +[`signalwire/signalwire/cli/simulation/data_generation.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/data_generation.py) diff --git a/fern/products/sdk-reference/python/agents/cli/simulation/data-overrides/index.mdx b/fern/products/sdk-reference/python/agents/cli/simulation/data-overrides/index.mdx new file mode 100644 index 0000000000..b84bbee4ec --- /dev/null +++ b/fern/products/sdk-reference/python/agents/cli/simulation/data-overrides/index.mdx @@ -0,0 +1,171 @@ +--- +slug: "/reference/python/agents/cli/simulation/data-overrides" +title: "data_overrides" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.cli.simulation.data_overrides" + parent: "signalwire.cli.simulation" + module: "agents.cli.simulation" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/data_overrides.py" +--- +# `data_overrides` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module data_overrides +``` + +## Functions + +### apply\_convenience\_mappings + +Apply convenience CLI arguments to data structure + +#### Signature + +```python +apply_convenience_mappings( + data: Dict[str, Any], + args: argparse.Namespace +) -> Dict[str, Any] +``` + +#### Parameters + + + Data dictionary to modify + + + + Parsed CLI arguments + + +#### Returns + +`Dict[str, Any]` — Modified data dictionary + +#### Source + +[`signalwire/signalwire/cli/simulation/data_overrides.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/data_overrides.py) + +Line 117. + +*** + +### apply\_overrides + +Apply override values to data using dot notation paths + +#### Signature + +```python +apply_overrides( + data: Dict[str, Any], + overrides: List[str], + json_overrides: List[str] +) -> Dict[str, Any] +``` + +#### Parameters + + + Data dictionary to modify + + + + List of "path=value" strings + + + + List of "path=json\_value" strings + + +#### Returns + +`Dict[str, Any]` — Modified data dictionary + +#### Source + +[`signalwire/signalwire/cli/simulation/data_overrides.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/data_overrides.py) + +Line 80. + +*** + +### parse\_value + +Parse a string value into appropriate Python type + +#### Signature + +```python +parse_value(value_str: str) -> Any +``` + +#### Parameters + + + String representation of value + + +#### Returns + +`Any` — Parsed value (str, int, float, bool, None, or JSON object) + +#### Source + +[`signalwire/signalwire/cli/simulation/data_overrides.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/data_overrides.py) + +Line 43. + +*** + +### set\_nested\_value + +Set a nested value using dot notation path + +#### Signature + +```python +set_nested_value(data: Dict[str, Any], path: str, value: Any) -> None +``` + +#### Parameters + + + Dictionary to modify + + + + Dot-notation path (e.g., "call.call\_id" or "vars.userVariables.custom") + + + + Value to set + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/cli/simulation/data_overrides.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/data_overrides.py) + +Line 21. + +## Source + +[`signalwire/signalwire/cli/simulation/data_overrides.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/data_overrides.py) diff --git a/fern/products/sdk-reference/python/agents/cli/simulation/index.mdx b/fern/products/sdk-reference/python/agents/cli/simulation/index.mdx new file mode 100644 index 0000000000..fb5de32815 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/cli/simulation/index.mdx @@ -0,0 +1,48 @@ +--- +slug: "/reference/python/agents/cli/simulation" +title: "simulation" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.cli.simulation" + parent: "signalwire.cli" + module: "agents.cli" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/__init__.py" +--- +# `simulation` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module simulation +``` + +## Modules + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + +## Source + +[`signalwire/signalwire/cli/simulation/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/__init__.py) diff --git a/fern/products/sdk-reference/python/agents/cli/simulation/mock-env/index.mdx b/fern/products/sdk-reference/python/agents/cli/simulation/mock-env/index.mdx new file mode 100644 index 0000000000..e763fa6837 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/cli/simulation/mock-env/index.mdx @@ -0,0 +1,122 @@ +--- +slug: "/reference/python/agents/cli/simulation/mock-env" +title: "mock_env" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.cli.simulation.mock_env" + parent: "signalwire.cli.simulation" + module: "agents.cli.simulation" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py" +--- +# `mock_env` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module mock_env +``` + +## Classes + + + + Mock FastAPI Headers (case-insensitive dict-like) + + + + Mock FastAPI QueryParams (simple dict-like) + + + + Mock FastAPI Request object for dynamic agent testing + + + + Mock FastAPI URL object + + + + Manages serverless environment simulation for different platforms + + + +## Functions + +### create\_mock\_request + +Factory function to create a mock FastAPI Request object + +#### Signature + +```python +create_mock_request( + method: str = 'POST', + url: str = 'http://localhost:8080/swml', + headers: Optional[Dict[str, str]] = None, + query_params: Optional[Dict[str, str]] = None, + body: Optional[Dict[str, Any]] = None +) -> MockRequest +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`MockRequest` + +#### Source + +[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) + +Line 128. + +*** + +### load\_env\_file + +Load environment variables from a file + +#### Signature + +```python +load_env_file(env_file_path: str) -> Dict[str, str] +``` + +#### Parameters + + + +#### Returns + +`Dict[str, str]` + +#### Source + +[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) + +Line 269. + +## Source + +[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) diff --git a/fern/products/sdk-reference/python/agents/cli/simulation/mock-env/mock-headers/index.mdx b/fern/products/sdk-reference/python/agents/cli/simulation/mock-env/mock-headers/index.mdx new file mode 100644 index 0000000000..a3753b402d --- /dev/null +++ b/fern/products/sdk-reference/python/agents/cli/simulation/mock-env/mock-headers/index.mdx @@ -0,0 +1,171 @@ +--- +slug: "/reference/python/agents/cli/simulation/mock-env/mock-headers" +title: "MockHeaders" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.cli.simulation.mock_env.MockHeaders" + parent: "signalwire.cli.simulation.mock_env" + module: "agents.cli.simulation.mock_env" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py" +--- +# `MockHeaders` + +Mock FastAPI Headers (case-insensitive dict-like) + +## Signature + +```python +class MockHeaders +``` + +## Methods + +### \_\_contains\_\_ + +#### Signature + +```python +__contains__(key: str) -> bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) + +Line 60. + +*** + +### \_\_getitem\_\_ + +#### Signature + +```python +__getitem__(key: str) -> str +``` + +#### Parameters + + + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) + +Line 57. + +*** + +### \_\_init\_\_ + +#### Signature + +```python +__init__(headers: Optional[Dict[str, str]] = None) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) + +Line 47. + +*** + +### get + +#### Signature + +```python +get(key: str, default: Optional[str] = None) -> Optional[str] +``` + +#### Parameters + + + + + +#### Returns + +`Optional[str]` + +#### Source + +[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) + +Line 54. + +*** + +### items + +#### Signature + +```python +items() +``` + +#### Source + +[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) + +Line 63. + +*** + +### keys + +#### Signature + +```python +keys() +``` + +#### Source + +[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) + +Line 66. + +*** + +### values + +#### Signature + +```python +values() +``` + +#### Source + +[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) + +Line 69. + +## Source + +[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) + +Line 45. diff --git a/fern/products/sdk-reference/python/agents/cli/simulation/mock-env/mock-query-params/index.mdx b/fern/products/sdk-reference/python/agents/cli/simulation/mock-env/mock-query-params/index.mdx new file mode 100644 index 0000000000..dd188ad756 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/cli/simulation/mock-env/mock-query-params/index.mdx @@ -0,0 +1,171 @@ +--- +slug: "/reference/python/agents/cli/simulation/mock-env/mock-query-params" +title: "MockQueryParams" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.cli.simulation.mock_env.MockQueryParams" + parent: "signalwire.cli.simulation.mock_env" + module: "agents.cli.simulation.mock_env" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py" +--- +# `MockQueryParams` + +Mock FastAPI QueryParams (simple dict-like) + +## Signature + +```python +class MockQueryParams +``` + +## Methods + +### \_\_contains\_\_ + +#### Signature + +```python +__contains__(key: str) -> bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) + +Line 32. + +*** + +### \_\_getitem\_\_ + +#### Signature + +```python +__getitem__(key: str) -> str +``` + +#### Parameters + + + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) + +Line 29. + +*** + +### \_\_init\_\_ + +#### Signature + +```python +__init__(params: Optional[Dict[str, str]] = None) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) + +Line 23. + +*** + +### get + +#### Signature + +```python +get(key: str, default: Optional[str] = None) -> Optional[str] +``` + +#### Parameters + + + + + +#### Returns + +`Optional[str]` + +#### Source + +[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) + +Line 26. + +*** + +### items + +#### Signature + +```python +items() +``` + +#### Source + +[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) + +Line 35. + +*** + +### keys + +#### Signature + +```python +keys() +``` + +#### Source + +[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) + +Line 38. + +*** + +### values + +#### Signature + +```python +values() +``` + +#### Source + +[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) + +Line 41. + +## Source + +[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) + +Line 21. diff --git a/fern/products/sdk-reference/python/agents/cli/simulation/mock-env/mock-request/index.mdx b/fern/products/sdk-reference/python/agents/cli/simulation/mock-env/mock-request/index.mdx new file mode 100644 index 0000000000..454f5a7bc0 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/cli/simulation/mock-env/mock-request/index.mdx @@ -0,0 +1,141 @@ +--- +slug: "/reference/python/agents/cli/simulation/mock-env/mock-request" +title: "MockRequest" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.cli.simulation.mock_env.MockRequest" + parent: "signalwire.cli.simulation.mock_env" + module: "agents.cli.simulation.mock_env" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py" +--- +# `MockRequest` + +Mock FastAPI Request object for dynamic agent testing + +## Signature + +```python +class MockRequest +``` + +## Properties + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + method: str = 'POST', + url: str = 'http://localhost:8080/swml', + headers: Optional[Dict[str, str]] = None, + query_params: Optional[Dict[str, str]] = None, + json_body: Optional[Dict[str, Any]] = None +) +``` + +#### Parameters + + + + + + + + + + + +#### Source + +[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) + +Line 102. + +*** + +### body + +Return the raw body bytes + +**Modifiers:** `async` + +#### Signature + +```python +async body() -> bytes +``` + +#### Returns + +`bytes` + +#### Source + +[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) + +Line 119. + +*** + +### client + +Mock client property + +#### Signature + +```python +client() +``` + +#### Source + +[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) + +Line 123. + +*** + +### json + +Return the JSON body + +**Modifiers:** `async` + +#### Signature + +```python +async json() -> Dict[str, Any] +``` + +#### Returns + +`Dict[str, Any]` + +#### Source + +[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) + +Line 115. + +## Source + +[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) + +Line 100. diff --git a/fern/products/sdk-reference/python/agents/cli/simulation/mock-env/mock-url/index.mdx b/fern/products/sdk-reference/python/agents/cli/simulation/mock-env/mock-url/index.mdx new file mode 100644 index 0000000000..67a286a382 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/cli/simulation/mock-env/mock-url/index.mdx @@ -0,0 +1,75 @@ +--- +slug: "/reference/python/agents/cli/simulation/mock-env/mock-url" +title: "MockURL" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.cli.simulation.mock_env.MockURL" + parent: "signalwire.cli.simulation.mock_env" + module: "agents.cli.simulation.mock_env" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py" +--- +# `MockURL` + +Mock FastAPI URL object + +## Signature + +```python +class MockURL +``` + +## Properties + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(url: str = 'http://localhost:8080/swml') +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) + +Line 75. + +*** + +### \_\_str\_\_ + +#### Signature + +```python +__str__() +``` + +#### Source + +[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) + +Line 96. + +## Source + +[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) + +Line 73. diff --git a/fern/products/sdk-reference/python/agents/cli/simulation/mock-env/serverless-simulator/index.mdx b/fern/products/sdk-reference/python/agents/cli/simulation/mock-env/serverless-simulator/index.mdx new file mode 100644 index 0000000000..2f0601114c --- /dev/null +++ b/fern/products/sdk-reference/python/agents/cli/simulation/mock-env/serverless-simulator/index.mdx @@ -0,0 +1,155 @@ +--- +slug: "/reference/python/agents/cli/simulation/mock-env/serverless-simulator" +title: "ServerlessSimulator" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.cli.simulation.mock_env.ServerlessSimulator" + parent: "signalwire.cli.simulation.mock_env" + module: "agents.cli.simulation.mock_env" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py" +--- +# `ServerlessSimulator` + +Manages serverless environment simulation for different platforms + +## Signature + +```python +class ServerlessSimulator +``` + +## Properties + + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(platform: str, overrides: Optional[Dict[str, str]] = None) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) + +Line 170. + +*** + +### activate + +Apply serverless environment simulation + +#### Signature + +```python +activate(verbose: bool = False) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) + +Line 178. + +*** + +### add\_override + +Add an environment variable override + +#### Signature + +```python +add_override(key: str, value: str) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) + +Line 256. + +*** + +### deactivate + +Restore original environment + +#### Signature + +```python +deactivate(verbose: bool = False) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) + +Line 227. + +*** + +### get\_current\_env + +Get the current environment that would be applied + +#### Signature + +```python +get_current_env() -> Dict[str, str] +``` + +#### Returns + +`Dict[str, str]` + +#### Source + +[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) + +Line 262. + +## Source + +[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) + +Line 139. diff --git a/fern/products/sdk-reference/python/agents/cli/swaig-test-wrapper/index.mdx b/fern/products/sdk-reference/python/agents/cli/swaig-test-wrapper/index.mdx new file mode 100644 index 0000000000..39eb6c1df2 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/cli/swaig-test-wrapper/index.mdx @@ -0,0 +1,50 @@ +--- +slug: "/reference/python/agents/cli/swaig-test-wrapper" +title: "swaig_test_wrapper" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.cli.swaig_test_wrapper" + parent: "signalwire.cli" + module: "agents.cli" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/swaig_test_wrapper.py" +--- +# `swaig_test_wrapper` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module swaig_test_wrapper +``` + +## Functions + +### main + +Main entry point for the swaig-test command + +#### Signature + +```python +main() +``` + +#### Source + +[`signalwire/signalwire/cli/swaig_test_wrapper.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/swaig_test_wrapper.py) + +Line 21. + +## Source + +[`signalwire/signalwire/cli/swaig_test_wrapper.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/swaig_test_wrapper.py) diff --git a/fern/products/sdk-reference/python/agents/cli/test-swaig/index.mdx b/fern/products/sdk-reference/python/agents/cli/test-swaig/index.mdx new file mode 100644 index 0000000000..e91370796e --- /dev/null +++ b/fern/products/sdk-reference/python/agents/cli/test-swaig/index.mdx @@ -0,0 +1,104 @@ +--- +slug: "/reference/python/agents/cli/test-swaig" +title: "test_swaig" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.cli.test_swaig" + parent: "signalwire.cli" + module: "agents.cli" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/test_swaig.py" +--- +# `test_swaig` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module test_swaig +``` + +## Functions + +### console\_entry\_point + +Console script entry point for pip installation + +#### Signature + +```python +console_entry_point() +``` + +#### Source + +[`signalwire/signalwire/cli/test_swaig.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/test_swaig.py) + +Line 800. + +*** + +### main + +Main entry point for the CLI tool + +#### Signature + +```python +main() +``` + +#### Source + +[`signalwire/signalwire/cli/test_swaig.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/test_swaig.py) + +Line 222. + +*** + +### print\_help\_examples + +Print comprehensive usage examples + +#### Signature + +```python +print_help_examples() +``` + +#### Source + +[`signalwire/signalwire/cli/test_swaig.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/test_swaig.py) + +Line 95. + +*** + +### print\_help\_platforms + +Print detailed help for serverless platform options + +#### Signature + +```python +print_help_platforms() +``` + +#### Source + +[`signalwire/signalwire/cli/test_swaig.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/test_swaig.py) + +Line 51. + +## Source + +[`signalwire/signalwire/cli/test_swaig.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/test_swaig.py) diff --git a/fern/products/sdk-reference/python/agents/cli/types/agent-info/index.mdx b/fern/products/sdk-reference/python/agents/cli/types/agent-info/index.mdx new file mode 100644 index 0000000000..17d246fe46 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/cli/types/agent-info/index.mdx @@ -0,0 +1,43 @@ +--- +slug: "/reference/python/agents/cli/types/agent-info" +title: "AgentInfo" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.cli.types.AgentInfo" + parent: "signalwire.cli.types" + module: "agents.cli.types" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/types.py" +--- +# `AgentInfo` + +Information about a discovered agent + +## Signature + +```python +class AgentInfo(TypedDict) +``` + +## Inheritance + +**Extends:** `TypedDict` + +## Properties + + + + + + + + + +## Source + +[`signalwire/signalwire/cli/types.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/types.py) + +Line 67. diff --git a/fern/products/sdk-reference/python/agents/cli/types/call-data/index.mdx b/fern/products/sdk-reference/python/agents/cli/types/call-data/index.mdx new file mode 100644 index 0000000000..62cbbaf56c --- /dev/null +++ b/fern/products/sdk-reference/python/agents/cli/types/call-data/index.mdx @@ -0,0 +1,65 @@ +--- +slug: "/reference/python/agents/cli/types/call-data" +title: "CallData" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.cli.types.CallData" + parent: "signalwire.cli.types" + module: "agents.cli.types" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/types.py" +--- +# `CallData` + +Call data structure for SWML post\_data + +## Signature + +```python +class CallData(TypedDict) +``` + +## Inheritance + +**Extends:** `TypedDict` + +## Properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## Source + +[`signalwire/signalwire/cli/types.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/types.py) + +Line 18. diff --git a/fern/products/sdk-reference/python/agents/cli/types/data-map-config/index.mdx b/fern/products/sdk-reference/python/agents/cli/types/data-map-config/index.mdx new file mode 100644 index 0000000000..0a2020221d --- /dev/null +++ b/fern/products/sdk-reference/python/agents/cli/types/data-map-config/index.mdx @@ -0,0 +1,43 @@ +--- +slug: "/reference/python/agents/cli/types/data-map-config" +title: "DataMapConfig" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.cli.types.DataMapConfig" + parent: "signalwire.cli.types" + module: "agents.cli.types" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/types.py" +--- +# `DataMapConfig` + +DataMap function configuration + +## Signature + +```python +class DataMapConfig(TypedDict) +``` + +## Inheritance + +**Extends:** `TypedDict` + +## Properties + + + + + + + + + +## Source + +[`signalwire/signalwire/cli/types.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/types.py) + +Line 59. diff --git a/fern/products/sdk-reference/python/agents/cli/types/function-info/index.mdx b/fern/products/sdk-reference/python/agents/cli/types/function-info/index.mdx new file mode 100644 index 0000000000..27c162c660 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/cli/types/function-info/index.mdx @@ -0,0 +1,45 @@ +--- +slug: "/reference/python/agents/cli/types/function-info" +title: "FunctionInfo" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.cli.types.FunctionInfo" + parent: "signalwire.cli.types" + module: "agents.cli.types" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/types.py" +--- +# `FunctionInfo` + +Information about a SWAIG function + +## Signature + +```python +class FunctionInfo(TypedDict) +``` + +## Inheritance + +**Extends:** `TypedDict` + +## Properties + + + + + + + + + + + +## Source + +[`signalwire/signalwire/cli/types.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/types.py) + +Line 75. diff --git a/fern/products/sdk-reference/python/agents/cli/types/index.mdx b/fern/products/sdk-reference/python/agents/cli/types/index.mdx new file mode 100644 index 0000000000..84b884c3a7 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/cli/types/index.mdx @@ -0,0 +1,60 @@ +--- +slug: "/reference/python/agents/cli/types" +title: "types" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.cli.types" + parent: "signalwire.cli" + module: "agents.cli" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/types.py" +--- +# `types` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module types +``` + +## Classes + + + + Information about a discovered agent + + + + Call data structure for SWML post\_data + + + + DataMap function configuration + + + + Information about a SWAIG function + + + + Complete post\_data structure for SWML requests + + + + Variables data structure for SWML post\_data + + + +## Source + +[`signalwire/signalwire/cli/types.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/types.py) diff --git a/fern/products/sdk-reference/python/agents/cli/types/post-data/index.mdx b/fern/products/sdk-reference/python/agents/cli/types/post-data/index.mdx new file mode 100644 index 0000000000..07d9805c3b --- /dev/null +++ b/fern/products/sdk-reference/python/agents/cli/types/post-data/index.mdx @@ -0,0 +1,57 @@ +--- +slug: "/reference/python/agents/cli/types/post-data" +title: "PostData" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.cli.types.PostData" + parent: "signalwire.cli.types" + module: "agents.cli.types" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/types.py" +--- +# `PostData` + +Complete post\_data structure for SWML requests + +## Signature + +```python +class PostData(TypedDict) +``` + +## Inheritance + +**Extends:** `TypedDict` + +## Properties + + + + + + + + + + + + + + + + + + + + + + + +## Source + +[`signalwire/signalwire/cli/types.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/types.py) + +Line 44. diff --git a/fern/products/sdk-reference/python/agents/cli/types/vars-data/index.mdx b/fern/products/sdk-reference/python/agents/cli/types/vars-data/index.mdx new file mode 100644 index 0000000000..b08b5d76f9 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/cli/types/vars-data/index.mdx @@ -0,0 +1,41 @@ +--- +slug: "/reference/python/agents/cli/types/vars-data" +title: "VarsData" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.cli.types.VarsData" + parent: "signalwire.cli.types" + module: "agents.cli.types" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/types.py" +--- +# `VarsData` + +Variables data structure for SWML post\_data + +## Signature + +```python +class VarsData(TypedDict) +``` + +## Inheritance + +**Extends:** `TypedDict` + +## Properties + + + + + + + +## Source + +[`signalwire/signalwire/cli/types.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/types.py) + +Line 37. diff --git a/fern/products/sdk-reference/python/agents/config-loader/index.mdx b/fern/products/sdk-reference/python/agents/config-loader/index.mdx new file mode 100644 index 0000000000..d841711a14 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/config-loader/index.mdx @@ -0,0 +1,36 @@ +--- +slug: "/reference/python/agents/config-loader" +title: "config_loader" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.config_loader" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/config_loader.py" +--- +# `config_loader` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module config_loader +``` + +## Properties + + + +## Source + +[`signalwire/signalwire/core/config_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/config_loader.py) diff --git a/fern/products/sdk-reference/python/agents/config-loader/index__2.mdx b/fern/products/sdk-reference/python/agents/config-loader/index__2.mdx new file mode 100644 index 0000000000..2c671bba6e --- /dev/null +++ b/fern/products/sdk-reference/python/agents/config-loader/index__2.mdx @@ -0,0 +1,293 @@ +--- +slug: "/reference/python/agents/config-loader/index__2" +title: "ConfigLoader" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.core.config_loader.ConfigLoader" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/config_loader.py" +--- +# `ConfigLoader` + +Configuration loader with environment variable substitution. + +Supports $\{VAR|default\} syntax for referencing environment variables +within JSON configuration files. This provides a clean pattern for +configuration across all SignalWire services. + +## Signature + +```python +class ConfigLoader +``` + +## Properties + + + +## Methods + +### \_\_init\_\_ + +Initialize config loader. + +#### Signature + +```python +__init__(config_paths: Optional[List[str]] = None) +``` + +#### Parameters + + + Optional list of config file paths to check. If not provided, uses default search paths. + + +#### Source + +[`signalwire/signalwire/core/config_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/config_loader.py) + +Line 28. + +*** + +### find\_config\_file + +Static method to find a config file for a service. + +**Modifiers:** `static` + +#### Signature + +```python +@staticmethod +find_config_file( + service_name: Optional[str] = None, + additional_paths: Optional[List[str]] = None +) -> Optional[str] +``` + +#### Parameters + + + Optional service name for service-specific config + + + + Additional paths to check + + +#### Returns + +`Optional[str]` — Path to the first config file found, or None + +#### Source + +[`signalwire/signalwire/core/config_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/config_loader.py) + +Line 224. + +*** + +### get + +Get a configuration value by dot-notation path. + +#### Signature + +```python +get(key_path: str, default: Any = None) -> Any +``` + +#### Parameters + + + Dot-separated path (e.g., "security.ssl\_enabled") + + + + Default value if path not found + + +#### Returns + +`Any` — The configuration value with variables substituted + +#### Source + +[`signalwire/signalwire/core/config_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/config_loader.py) + +Line 129. + +*** + +### get\_config + +Get the raw configuration (before substitution). + +#### Signature + +```python +get_config() -> Dict[str, Any] +``` + +#### Returns + +`Dict[str, Any]` + +#### Source + +[`signalwire/signalwire/core/config_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/config_loader.py) + +Line 73. + +*** + +### get\_config\_file + +Get the path of the loaded config file. + +#### Signature + +```python +get_config_file() -> Optional[str] +``` + +#### Returns + +`Optional[str]` + +#### Source + +[`signalwire/signalwire/core/config_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/config_loader.py) + +Line 69. + +*** + +### get\_section + +Get an entire configuration section. + +#### Signature + +```python +get_section(section: str) -> Dict[str, Any] +``` + +#### Parameters + + + The section name (e.g., "security", "server") + + +#### Returns + +`Dict[str, Any]` — The configuration section with all variables substituted + +#### Source + +[`signalwire/signalwire/core/config_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/config_loader.py) + +Line 156. + +*** + +### has\_config + +Check if a configuration was loaded. + +#### Signature + +```python +has_config() -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/core/config_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/config_loader.py) + +Line 65. + +*** + +### merge\_with\_env + +Merge configuration with environment variables. + +Config file takes precedence over environment variables, +but config can reference env vars via substitution. + +#### Signature + +```python +merge_with_env(env_prefix: str = 'SWML_') -> Dict[str, Any] +``` + +#### Parameters + + + Prefix for environment variables to consider + + +#### Returns + +`Dict[str, Any]` — Merged configuration dictionary + +#### Source + +[`signalwire/signalwire/core/config_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/config_loader.py) + +Line 171. + +*** + +### substitute\_vars + +Recursively substitute environment variables in configuration values. + +Supports $\{VAR|default\} syntax where: + +- VAR is the environment variable name +- default is the fallback value if VAR is not set + +#### Signature + +```python +substitute_vars(value: Any, max_depth: int = 10) -> Any +``` + +#### Parameters + + + The value to process (can be string, dict, list, etc.) + + + + Maximum recursion depth to prevent infinite loops + + +#### Returns + +`Any` — The value with all environment variables substituted + +#### Source + +[`signalwire/signalwire/core/config_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/config_loader.py) + +Line 77. + +## Source + +[`signalwire/signalwire/core/config_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/config_loader.py) + +Line 19. diff --git a/fern/products/sdk-reference/python/agents/contexts/context-builder/index.mdx b/fern/products/sdk-reference/python/agents/contexts/context-builder/index.mdx new file mode 100644 index 0000000000..7f7d0753cf --- /dev/null +++ b/fern/products/sdk-reference/python/agents/contexts/context-builder/index.mdx @@ -0,0 +1,240 @@ +--- +slug: "/reference/python/agents/contexts/context-builder" +title: "ContextBuilder" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.core.contexts.ContextBuilder" + parent: "signalwire.core.contexts" + module: "agents.contexts" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py" +--- +# `ContextBuilder` + +Builder for multi-step, multi-context AI agent workflows. + +A ContextBuilder owns one or more Contexts; each Context owns an ordered +list of Steps. Only one context and one step is active at a time. Per +chat turn, the runtime injects the current step's instructions as a +system message, then asks the LLM for a response. + +## Native tools auto-injected by the runtime + +When a step (or its enclosing context) declares `valid_steps` or +`valid_contexts`, the runtime auto-injects two native tools so the model +can navigate the flow: + +- `next_step(step: enum)` — present when valid\_steps is set +- `change_context(context: enum)` — present when valid\_contexts is set + +Their `enum` schemas are rewritten on every turn to match whatever +valid\_steps / valid\_contexts apply to the current step. You do NOT need +to define these tools yourself; they appear automatically. + +A third native tool — `gather_submit` — is injected during gather\_info +questioning (see Step.set\_gather\_info / add\_gather\_question). + +These three names — `next_step`, `change_context`, `gather_submit` +— are reserved. ContextBuilder.validate() will reject any agent that +defines a SWAIG tool with one of these names. + +## Function whitelisting (Step.set\_functions) + +Each step may declare a `functions` whitelist. The whitelist is applied +in-memory at the start of each LLM turn. CRITICALLY: if a step does NOT +declare a `functions` field, it INHERITS the previous step's active set. +See Step.set\_functions() for details and examples. + +## Validation + +Call validate() (or to\_dict(), which calls it) to check that: + +- At least one context is defined +- A single context must be named "default" +- Every context has at least one step +- valid\_steps references resolve to real step names (or "next") +- valid\_contexts references resolve to real context names +- gather\_info questions are non-empty and have unique keys +- gather\_info completion\_action targets a reachable step +- No user-defined SWAIG tool collides with a reserved native name + +## Signature + +```python +class ContextBuilder +``` + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(agent) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 1154. + +*** + +### add\_context + +Add a new context + +#### Signature + +```python +add_context(name: str) -> Context +``` + +#### Parameters + + + Context name + + +#### Returns + +`Context` — Context object for method chaining + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 1182. + +*** + +### get\_context + +Get an existing context by name for inspection or modification. + +#### Signature + +```python +get_context(name: str) -> Optional[Context] +``` + +#### Parameters + + + Context name + + +#### Returns + +`Optional[Context]` — Context object if found, None otherwise + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 1203. + +*** + +### reset + +Remove all contexts, returning the builder to its initial state. + +Use this in a dynamic config callback when you need to rebuild +contexts from scratch for a specific request — e.g. skipping a +greeting context on transfers. + +Example:: + +``` +def on_dynamic_config(query, body, headers, agent): + if query.get("transfer"): + agent.define_contexts().reset() + ctx = agent.define_contexts().add_context("default") + ctx.add_step("route").set_text("Route the caller.") +``` + +#### Signature + +```python +reset() -> ContextBuilder +``` + +#### Returns + +`ContextBuilder` — Self for method chaining. + +#### Examples + +```python +def on_dynamic_config(query, body, headers, agent): + if query.get("transfer"): + agent.define_contexts().reset() + ctx = agent.define_contexts().add_context("default") + ctx.add_step("route").set_text("Route the caller.") +``` + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 1159. + +*** + +### to\_dict + +Convert all contexts to dictionary for SWML generation + +#### Signature + +```python +to_dict() -> Dict[str, Any] +``` + +#### Returns + +`Dict[str, Any]` + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 1339. + +*** + +### validate + +Validate the contexts configuration + +#### Signature + +```python +validate() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 1215. + +## Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 1105. diff --git a/fern/products/sdk-reference/python/agents/contexts/context/index.mdx b/fern/products/sdk-reference/python/agents/contexts/context/index.mdx new file mode 100644 index 0000000000..9d18c5a556 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/contexts/context/index.mdx @@ -0,0 +1,816 @@ +--- +slug: "/reference/python/agents/contexts/context" +title: "Context" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.core.contexts.Context" + parent: "signalwire.core.contexts" + module: "agents.contexts" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py" +--- +# `Context` + +A single context containing an ordered list of steps. + +## Conversation history across context switches + +By default (`isolated=False`), switching from one context to another +via `change_context` PRESERVES the entire conversation history. The +user's prior turns and the model's prior responses remain visible +on the next LLM call. The only thing that changes is which step +instructions get injected. + +A common confusion: "the AI re-asked for information the user already +gave." If you see this, history loss is almost never the cause — +history is preserved unless you set `isolated=True`. The real cause +is usually one of: + +- The destination step's `text` literally tells the model to ask + ("Ask the user for their account number"). The model follows + instructions; rephrase to "Confirm the user's account number" + or have the step instructions check global\_data first. +- The relevant info was never extracted into global\_data, so + $\{var\} expansion has nothing to inject and the step prompt + looks generic. Add a webhook that captures the field. +- You explicitly called `set_isolated(True)` on the destination + context. Isolated contexts wipe the conversation array on entry. + Pair with `set_consolidate(True)` if you want a summary instead. + +See Context.set\_isolated() for the wipe semantics, and the SDK's +FunctionResult.swml\_change\_step / swml\_change\_context docstrings +for how to communicate transition intent through tool response text +and global\_data. + +## Signature + +```python +class Context +``` + +## Properties + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(name: str) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 571. + +*** + +### add\_bullets + +Add a POM section with bullet points to the context prompt + +#### Signature + +```python +add_bullets(title: str, bullets: List[str]) -> Context +``` + +#### Parameters + + + Section title + + + + List of bullet points + + +#### Returns + +`Context` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 916. + +*** + +### add\_enter\_filler + +Add enter fillers for a specific language + +#### Signature + +```python +add_enter_filler(language_code: str, fillers: List[str]) -> Context +``` + +#### Parameters + + + Language code (e.g., "en-US", "es") or "default" for catch-all + + + + List of filler phrases for entering this context + + +#### Returns + +`Context` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 962. + +*** + +### add\_exit\_filler + +Add exit fillers for a specific language + +#### Signature + +```python +add_exit_filler(language_code: str, fillers: List[str]) -> Context +``` + +#### Parameters + + + Language code (e.g., "en-US", "es") or "default" for catch-all + + + + List of filler phrases for exiting this context + + +#### Returns + +`Context` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 979. + +*** + +### add\_section + +Add a POM section to the context prompt + +#### Signature + +```python +add_section(title: str, body: str) -> Context +``` + +#### Parameters + + + Section title + + + + Section body text + + +#### Returns + +`Context` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 900. + +*** + +### add\_step + +Add a new step to this context. + +When called with only `name` the returned Step can be configured +with the usual method-chaining API. When the optional keyword +arguments are supplied the step is fully configured in one call: + +#### Signature + +```python +add_step( + name: str, + *, + task: Optional[str] = None, + bullets: Optional[List[str]] = None, + criteria: Optional[str] = None, + functions: Optional[Union[str, List[str]]] = None, + valid_steps: Optional[List[str]] = None +) -> Step +``` + +#### Parameters + + + Step name (must be unique within the context). + + + + Text for the "Task" section (equivalent to `step.add_section("Task", task)`). + + + + List of bullet strings for the "Process" section (equivalent to `step.add_bullets("Process", bullets)`). Requires _task_ to also be set. + + + + Step-completion criteria (equivalent to `step.set_step_criteria(criteria)`). + + + + Tool names the step may call, or `"none"` (equivalent to `step.set_functions(functions)`). + + + + Names of steps the agent may transition to (equivalent to `step.set_valid_steps(valid_steps)`). + + +#### Returns + +`Step` — The configured Step object for optional further chaining. + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 596. + +*** + +### add\_system\_bullets + +Add a POM section with bullet points to the system prompt + +#### Signature + +```python +add_system_bullets(title: str, bullets: List[str]) -> Context +``` + +#### Parameters + + + Section title + + + + List of bullet points + + +#### Returns + +`Context` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 869. + +*** + +### add\_system\_section + +Add a POM section to the system prompt + +#### Signature + +```python +add_system_section(title: str, body: str) -> Context +``` + +#### Parameters + + + Section title + + + + Section body text + + +#### Returns + +`Context` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 853. + +*** + +### get\_step + +Get an existing step by name for inspection or modification. + +#### Signature + +```python +get_step(name: str) -> Optional[Step] +``` + +#### Parameters + + + Step name + + +#### Returns + +`Optional[Step]` — Step object if found, None otherwise + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 653. + +*** + +### move\_step + +Move an existing step to a specific position in the step order. + +#### Signature + +```python +move_step(name: str, position: int) -> Context +``` + +#### Parameters + + + Step name to move + + + + Target index in the step order (0 = first) + + +#### Returns + +`Context` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 680. + +*** + +### remove\_step + +Remove a step from this context entirely. + +#### Signature + +```python +remove_step(name: str) -> Context +``` + +#### Parameters + + + Step name to remove + + +#### Returns + +`Context` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 665. + +*** + +### set\_consolidate + +Set whether to consolidate conversation history when entering this context + +#### Signature + +```python +set_consolidate(consolidate: bool) -> Context +``` + +#### Parameters + + + Whether to consolidate previous conversation + + +#### Returns + +`Context` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 781. + +*** + +### set\_enter\_fillers + +Set fillers that the AI says when entering this context + +#### Signature + +```python +set_enter_fillers(enter_fillers: Dict[str, List[str]]) -> Context +``` + +#### Parameters + + + Dictionary mapping language codes (or "default") to lists of filler phrases Example: \{"en-US": \["Welcome...", "Hello..."], "default": \["Entering..."]\} + + +#### Returns + +`Context` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 932. + +*** + +### set\_exit\_fillers + +Set fillers that the AI says when exiting this context + +#### Signature + +```python +set_exit_fillers(exit_fillers: Dict[str, List[str]]) -> Context +``` + +#### Parameters + + + Dictionary mapping language codes (or "default") to lists of filler phrases Example: \{"en-US": \["Goodbye...", "Thank you..."], "default": \["Exiting..."]\} + + +#### Returns + +`Context` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 947. + +*** + +### set\_full\_reset + +Set whether to do full reset when entering this context + +#### Signature + +```python +set_full_reset(full_reset: bool) -> Context +``` + +#### Parameters + + + Whether to completely rewrite system prompt vs inject + + +#### Returns + +`Context` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 794. + +*** + +### set\_initial\_step + +Set which step the context starts on when entered. + +By default, a context starts on its first step (index 0). If the +context has a preamble step that should only run on first entry +(e.g. a greeting), later entries via `change_context` can skip +it by setting `initial_step` to the name of the step to start +from instead. + +`initial_step` is honoured both at conversation creation (when +the context is first activated) and when switching to this context +via `change_context` during the conversation. + +> \[!NOTE] +> ctx = contexts.add\_context("support") +> ctx.add\_step("greeting").set\_text("Welcome!") +> ctx.add\_step("triage").set\_text("What do you need help with?") +> ctx.set\_initial\_step("triage") # skip greeting on re-entry + +#### Signature + +```python +set_initial_step(step_name: str) -> Context +``` + +#### Parameters + + + Name of the step to start on. Must exist in this context's step list; validated by ContextBuilder.validate(). + + +#### Returns + +`Context` — Self for method chaining. + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 723. + +*** + +### set\_isolated + +Mark this context as isolated — entering it wipes conversation history. + +When `isolated=True` and the context is entered via change\_context, +the runtime calls ai\_conversation\_restart() and the entire conversation +array is wiped. The model starts fresh with only the new context's +system\_prompt + step instructions, with no memory of prior turns. + +EXCEPTION — `reset` overrides the wipe: +If the context also has a `reset` configuration (set via the +Step.set\_reset\_\*() methods on a step that switches into this +context, or via set\_consolidate() / set\_full\_reset() on the +context itself), the wipe is skipped in favor of the reset +behavior. Use `reset` with `consolidate=True` to summarize prior +history into a single message instead of dropping it entirely. + +> \[!NOTE] +> +> - Switching to a sensitive billing flow that should not see +> prior small-talk +> - Handing off to a different agent persona +> - Resetting after a long off-topic detour + +#### Signature + +```python +set_isolated(isolated: bool) -> Context +``` + +#### Parameters + + + True to wipe conversation history on context entry (subject to the reset exception above). + + +#### Returns + +`Context` — Self for method chaining. + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 820. + +*** + +### set\_post\_prompt + +Set post prompt override for this context + +#### Signature + +```python +set_post_prompt(post_prompt: str) -> Context +``` + +#### Parameters + + + Post prompt text to use when this context is active + + +#### Returns + +`Context` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 753. + +*** + +### set\_prompt + +Set the context's prompt text directly + +#### Signature + +```python +set_prompt(prompt: str) -> Context +``` + +#### Parameters + + + The prompt text for this context + + +#### Returns + +`Context` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 885. + +*** + +### set\_system\_prompt + +Set system prompt for context switching (triggers context reset) + +#### Signature + +```python +set_system_prompt(system_prompt: str) -> Context +``` + +#### Parameters + + + New system prompt for when this context is entered + + +#### Returns + +`Context` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 766. + +*** + +### set\_user\_prompt + +Set user prompt to inject when entering this context + +#### Signature + +```python +set_user_prompt(user_prompt: str) -> Context +``` + +#### Parameters + + + User message to inject for context + + +#### Returns + +`Context` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 807. + +*** + +### set\_valid\_contexts + +Set which contexts can be navigated to from this context + +#### Signature + +```python +set_valid_contexts(contexts: List[str]) -> Context +``` + +#### Parameters + + + List of valid context names + + +#### Returns + +`Context` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 697. + +*** + +### set\_valid\_steps + +Set which steps can be navigated to from any step in this context + +#### Signature + +```python +set_valid_steps(steps: List[str]) -> Context +``` + +#### Parameters + + + List of valid step names (include "next" for sequential flow) + + +#### Returns + +`Context` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 710. + +*** + +### to\_dict + +Convert context to dictionary for SWML generation + +#### Signature + +```python +to_dict() -> Dict[str, Any] +``` + +#### Returns + +`Dict[str, Any]` + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 1040. + +## Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 538. diff --git a/fern/products/sdk-reference/python/agents/contexts/gather-info/index.mdx b/fern/products/sdk-reference/python/agents/contexts/gather-info/index.mdx new file mode 100644 index 0000000000..43651e59e0 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/contexts/gather-info/index.mdx @@ -0,0 +1,117 @@ +--- +slug: "/reference/python/agents/contexts/gather-info" +title: "GatherInfo" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.core.contexts.GatherInfo" + parent: "signalwire.core.contexts" + module: "agents.contexts" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py" +--- +# `GatherInfo` + +Configuration for gathering information in a step via the C-side gather\_info system. + +This produces zero tool\_call/tool\_result entries in LLM-visible history, +instead using dynamic step instruction re-injection to present one question +at a time. + +## Signature + +```python +class GatherInfo +``` + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + output_key: Optional[str] = None, + completion_action: Optional[str] = None, + prompt: Optional[str] = None +) +``` + +#### Parameters + + + + + + + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 59. + +*** + +### add\_question + +Add a question to gather. + +#### Signature + +```python +add_question(key: str, question: str, **kwargs = {}) -> GatherInfo +``` + +#### Parameters + + + Key name for storing the answer in global\_data + + + + The question text to ask + + + + +#### Returns + +`GatherInfo` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 67. + +*** + +### to\_dict + +Convert to dictionary for SWML generation + +#### Signature + +```python +to_dict() -> Dict[str, Any] +``` + +#### Returns + +`Dict[str, Any]` + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 90. + +## Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 51. diff --git a/fern/products/sdk-reference/python/agents/contexts/gather-question/index.mdx b/fern/products/sdk-reference/python/agents/contexts/gather-question/index.mdx new file mode 100644 index 0000000000..0be79c4330 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/contexts/gather-question/index.mdx @@ -0,0 +1,102 @@ +--- +slug: "/reference/python/agents/contexts/gather-question" +title: "GatherQuestion" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.core.contexts.GatherQuestion" + parent: "signalwire.core.contexts" + module: "agents.contexts" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py" +--- +# `GatherQuestion` + +Represents a single question in a gather\_info configuration + +## Signature + +```python +class GatherQuestion +``` + +## Properties + + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + key: str, + question: str, + type: str = 'string', + confirm: bool = False, + prompt: Optional[str] = None, + functions: Optional[List[str]] = None +) +``` + +#### Parameters + + + + + + + + + + + + + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 27. + +*** + +### to\_dict + +Convert question to dictionary for SWML generation + +#### Signature + +```python +to_dict() -> Dict[str, Any] +``` + +#### Returns + +`Dict[str, Any]` + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 37. + +## Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 24. diff --git a/fern/products/sdk-reference/python/agents/contexts/index.mdx b/fern/products/sdk-reference/python/agents/contexts/index.mdx new file mode 100644 index 0000000000..3cb2e7268e --- /dev/null +++ b/fern/products/sdk-reference/python/agents/contexts/index.mdx @@ -0,0 +1,92 @@ +--- +slug: "/reference/python/agents/contexts" +title: "contexts" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.contexts" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py" +--- +# `contexts` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module contexts +``` + +## Constants + + + + + + + +## Classes + + + + A single context containing an ordered list of steps. + + + + Builder for multi-step, multi-context AI agent workflows. + + + + Configuration for gathering information in a step via the C-side gather\_info system. + + + + Represents a single question in a gather\_info configuration + + + + Represents a single step within a context + + + +## Functions + +### create\_simple\_context + +Helper function to create a simple single context + +#### Signature + +```python +create_simple_context(name: str = 'default') -> Context +``` + +#### Parameters + + + Context name (defaults to "default") + + +#### Returns + +`Context` — Context object for method chaining + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 1350. + +## Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) diff --git a/fern/products/sdk-reference/python/agents/contexts/step/index.mdx b/fern/products/sdk-reference/python/agents/contexts/step/index.mdx new file mode 100644 index 0000000000..90d53c2b19 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/contexts/step/index.mdx @@ -0,0 +1,714 @@ +--- +slug: "/reference/python/agents/contexts/step" +title: "Step" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.core.contexts.Step" + parent: "signalwire.core.contexts" + module: "agents.contexts" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py" +--- +# `Step` + +Represents a single step within a context + +## Signature + +```python +class Step +``` + +## Properties + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(name: str) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 107. + +*** + +### add\_bullets + +Add a POM section with bullet points + +#### Signature + +```python +add_bullets(title: str, bullets: List[str]) -> Step +``` + +#### Parameters + + + Section title + + + + List of bullet points + + +#### Returns + +`Step` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 163. + +*** + +### add\_gather\_question + +Add a question to this step's gather\_info configuration. +set\_gather\_info() must be called before this method. + +IMPORTANT — gather mode locks function access: +While the model is asking gather questions, the runtime forcibly +deactivates ALL of the step's other functions. The only callable +tools during a gather question are: + +``` + - `gather_submit` (the native answer-submission tool) + - Whatever names you list in this question's `functions` arg + +`next_step` and `change_context` are also filtered out — the model +cannot navigate away until the gather completes. This is by design: +it forces a tight ask → submit → next-question loop. + +If a question needs to call out to a tool (e.g. validate an email, +geocode a ZIP), list that tool name in this question's `functions`. +Functions listed here are active ONLY for this question. +``` + +#### Signature + +```python +add_gather_question( + key: str, + question: str, + type: str = 'string', + confirm: bool = False, + prompt: Optional[str] = None, + functions: Optional[List[str]] = None +) -> Step +``` + +#### Parameters + + + Key name for storing the answer in global\_data. + + + + The question text the model is instructed to ask. + + + + JSON schema type for the answer ("string", "integer", "number", "boolean"). Default: "string". + + + + If True, the model must read the answer back and obtain explicit user confirmation before submitting (the gather\_submit schema gains a required `confirmed_by_user` parameter). + + + + Extra instruction text appended after the question. + + + + Names of functions to unlock for this question only. These are activated on top of `gather_submit`. All other step functions remain locked out. + + +#### Returns + +`Step` — Self for method chaining. + +#### Examples + +```python + - `gather_submit` (the native answer-submission tool) + - Whatever names you list in this question's `functions` arg + +`next_step` and `change_context` are also filtered out — the model +cannot navigate away until the gather completes. This is by design: +it forces a tight ask → submit → next-question loop. + +If a question needs to call out to a tool (e.g. validate an email, +geocode a ZIP), list that tool name in this question's `functions`. +Functions listed here are active ONLY for this question. +``` + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 358. + +*** + +### add\_section + +Add a POM section to the step + +#### Signature + +```python +add_section(title: str, body: str) -> Step +``` + +#### Parameters + + + Section title + + + + Section body text + + +#### Returns + +`Step` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 147. + +*** + +### clear\_sections + +Remove all POM sections and direct text from this step, allowing it +to be repopulated with new content. + +#### Signature + +```python +clear_sections() -> Step +``` + +#### Returns + +`Step` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 404. + +*** + +### set\_end + +Mark this step as terminal for the step flow. + +IMPORTANT: `end=True` does NOT end the conversation or hang up the +call. It exits step mode entirely after this step executes — clearing +the steps list, current step index, valid\_steps, and valid\_contexts. +The agent keeps running, but operates only under the base system +prompt and the context-level prompt; no more step instructions are +injected and no more `next_step` tool is offered. + +To actually end the call, call a hangup tool or define a hangup\_hook. + +Combine with `set_reset_*()` if you also want to reset/consolidate +the conversation when this step exits. + +#### Signature + +```python +set_end(end: bool) -> Step +``` + +#### Parameters + + + True to exit step mode after this step. + + +#### Returns + +`Step` — Self for method chaining. + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 278. + +*** + +### set\_functions + +Set which non-internal functions are callable while this step is active. + +IMPORTANT — keep the per-step active set small: +LLM tool selection accuracy degrades noticeably once the +per-call tool list grows past ~7-8 entries. Symptoms: the model +has the right tool available, the user's request clearly matches +it, but the model doesn't call it (or calls a near-neighbor +instead). Same prompt may pass on rerun. This is the LLM's +native tool-selection behavior — not something the SDK can fix. + +``` +Mitigations: + - Whitelist only the tools the current step actually needs. + A 4-tool step is more reliable than a 12-tool step. + - Split a busy step into two narrower steps so the relevant + tools are partitioned by phase of the conversation. + - Remember that `next_step` and `change_context` are + auto-injected when valid_steps / valid_contexts are set — + they count against the budget too. Don't list them in + `functions`; the runtime adds them separately. +``` + +IMPORTANT — inheritance behavior: +If you do NOT call this method, the step inherits whichever function +set was active on the previous step (or the previous context's last +step). The server-side runtime only resets the active set when a +step explicitly declares its `functions` field. This is by design, +but it is the most common source of bugs in multi-step agents: +forgetting set\_functions() on a later step lets the previous step's +tools leak through. + +``` +Best practice: call set_functions() explicitly on every step that +should have a different toolset than the previous one. +``` + +Internal functions (`startup_hook`, `hangup_hook`, `check_for_input`, +`summarize_conversation`, `gather_submit`, `get_ideal_strategy`) are +ALWAYS protected and cannot be deactivated by this whitelist. + +The native navigation tools `next_step` and `change_context` are +injected automatically when valid\_steps / valid\_contexts is set; they +are not affected by this list and do not need to appear in it. + +step.set\_functions(\["lookup\_account", "check\_balance"]) # whitelist +step.set\_functions(\[]) # disable all +step.set\_functions("none") # disable all (alt) + +#### Signature + +```python +set_functions(functions: Union[str, List[str]]) -> Step +``` + +#### Parameters + + + One of: + + +#### Returns + +`Step` — Self for method chaining. + +#### Examples + + + + ```python + Mitigations: + - Whitelist only the tools the current step actually needs. + A 4-tool step is more reliable than a 12-tool step. + - Split a busy step into two narrower steps so the relevant + tools are partitioned by phase of the conversation. + - Remember that `next_step` and `change_context` are + auto-injected when valid_steps / valid_contexts are set — + they count against the budget too. Don't list them in + `functions`; the runtime adds them separately. + ``` + + + + ```python + Best practice: call set_functions() explicitly on every step that + should have a different toolset than the previous one. + ``` + + + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 192. + +*** + +### set\_gather\_info + +Enable info gathering for this step. Questions are presented one at a time +via dynamic step instruction re-injection, producing zero tool\_call/tool\_result +entries in LLM-visible history. + +After calling this, use add\_gather\_question() to define questions. + +#### Signature + +```python +set_gather_info( + output_key: Optional[str] = None, + completion_action: Optional[str] = None, + prompt: Optional[str] = None +) -> Step +``` + +#### Parameters + + + Key in global\_data to store answers under (default: top-level) + + + + Where to go when all questions are answered. Can be: + + + + Preamble text injected once when entering the gather step, giving the model personality/context for why it is asking these questions + + +#### Returns + +`Step` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 329. + +*** + +### set\_reset\_consolidate + +Set whether to consolidate conversation when this step switches contexts + +#### Signature + +```python +set_reset_consolidate(consolidate: bool) -> Step +``` + +#### Parameters + + + Whether to consolidate previous conversation + + +#### Returns + +`Step` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 442. + +*** + +### set\_reset\_full\_reset + +Set whether to do full reset when this step switches contexts + +#### Signature + +```python +set_reset_full_reset(full_reset: bool) -> Step +``` + +#### Parameters + + + Whether to completely rewrite system prompt vs inject + + +#### Returns + +`Step` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 455. + +*** + +### set\_reset\_system\_prompt + +Set system prompt for context switching when this step navigates to a context + +#### Signature + +```python +set_reset_system_prompt(system_prompt: str) -> Step +``` + +#### Parameters + + + New system prompt for context switching + + +#### Returns + +`Step` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 416. + +*** + +### set\_reset\_user\_prompt + +Set user prompt for context switching when this step navigates to a context + +#### Signature + +```python +set_reset_user_prompt(user_prompt: str) -> Step +``` + +#### Parameters + + + User message to inject for context switching + + +#### Returns + +`Step` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 429. + +*** + +### set\_skip\_to\_next\_step + +Set whether to automatically advance to the next step + +#### Signature + +```python +set_skip_to_next_step(skip: bool) -> Step +``` + +#### Parameters + + + Whether to skip to the next step automatically + + +#### Returns + +`Step` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 316. + +*** + +### set\_skip\_user\_turn + +Set whether to skip waiting for user input after this step + +#### Signature + +```python +set_skip_user_turn(skip: bool) -> Step +``` + +#### Parameters + + + Whether to skip the user turn after this step + + +#### Returns + +`Step` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 303. + +*** + +### set\_step\_criteria + +Set the criteria for determining when this step is complete + +#### Signature + +```python +set_step_criteria(criteria: str) -> Step +``` + +#### Parameters + + + Description of step completion criteria + + +#### Returns + +`Step` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 179. + +*** + +### set\_text + +Set the step's prompt text directly + +#### Signature + +```python +set_text(text: str) -> Step +``` + +#### Parameters + + + The prompt text for this step + + +#### Returns + +`Step` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 132. + +*** + +### set\_valid\_contexts + +Set which contexts can be navigated to from this step + +#### Signature + +```python +set_valid_contexts(contexts: List[str]) -> Step +``` + +#### Parameters + + + List of valid context names + + +#### Returns + +`Step` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 265. + +*** + +### set\_valid\_steps + +Set which steps can be navigated to from this step + +#### Signature + +```python +set_valid_steps(steps: List[str]) -> Step +``` + +#### Parameters + + + List of valid step names (include "next" for sequential flow) + + +#### Returns + +`Step` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 252. + +*** + +### to\_dict + +Convert step to dictionary for SWML generation + +#### Signature + +```python +to_dict() -> Dict[str, Any] +``` + +#### Returns + +`Dict[str, Any]` + +#### Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 490. + +## Source + +[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) + +Line 104. diff --git a/fern/products/sdk-reference/python/agents/data-map/index.mdx b/fern/products/sdk-reference/python/agents/data-map/index.mdx new file mode 100644 index 0000000000..4e16f488e2 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/data-map/index.mdx @@ -0,0 +1,137 @@ +--- +slug: "/reference/python/agents/data-map" +title: "data_map" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.data_map" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py" +--- +# `data_map` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module data_map +``` + +## Functions + +### create\_expression\_tool + +Create an expression-based tool for pattern matching responses + +#### Signature + +```python +create_expression_tool( + name: str, + patterns: Dict[str, Tuple[str, FunctionResult]], + parameters: Optional[Dict[str, Dict]] = None +) -> DataMap +``` + +#### Parameters + + + Function name + + + + Dictionary mapping test\_values to (pattern, FunctionResult) tuples + + + + Optional parameter definitions + + +#### Returns + +`DataMap` — Configured DataMap object + +#### Source + +[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) + +Line 490. + +*** + +### create\_simple\_api\_tool + +Create a simple API tool with minimal configuration + +#### Signature + +```python +create_simple_api_tool( + name: str, + url: str, + response_template: str, + parameters: Optional[Dict[str, Dict]] = None, + method: str = 'GET', + headers: Optional[Dict[str, str]] = None, + body: Optional[Dict[str, Any]] = None, + error_keys: Optional[List[str]] = None +) -> DataMap +``` + +#### Parameters + + + Function name + + + + API endpoint URL + + + + Template for formatting the response + + + + Optional parameter definitions + + + + HTTP method (default: GET) + + + + Optional HTTP headers + + + + Optional request body (for POST/PUT) + + + + Optional list of error indicator keys + + +#### Returns + +`DataMap` — Configured DataMap object + +#### Source + +[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) + +Line 439. + +## Source + +[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) diff --git a/fern/products/sdk-reference/python/agents/data-map/index__2.mdx b/fern/products/sdk-reference/python/agents/data-map/index__2.mdx new file mode 100644 index 0000000000..edf8c698e1 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/data-map/index__2.mdx @@ -0,0 +1,660 @@ +--- +slug: "/reference/python/agents/data-map/index__2" +title: "DataMap" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.core.data_map.DataMap" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py" +--- +# `DataMap` + +Builder class for creating SWAIG data\_map configurations. + +This provides a fluent interface for building data\_map tools that execute +on the SignalWire server without requiring webhook endpoints. Works similar +to FunctionResult but for building data\_map structures. + +> \[!NOTE] +> +> # Simple API call - output goes inside webhook +> +> data\_map = (DataMap('get\_weather') +> .purpose('Get current weather information') +> .parameter('location', 'string', 'City name', required=True) +> .webhook('GET', 'https://api.weather.com/v1/current?key=API\_KEY\&q=$\{location\}') +> .output(FunctionResult('Weather in $\{location\}: $\{response.current.condition.text\}, $\{response.current.temp\_f\}°F')) +> ) +> +> # Multiple webhooks with fallback +> +> data\_map = (DataMap('search\_multi') +> .purpose('Search with fallback APIs') +> .parameter('query', 'string', 'Search query', required=True) +> .webhook('GET', 'https://api.primary.com/search?q=$\{query\}') +> .output(FunctionResult('Primary result: $\{response.title\}')) +> .webhook('GET', 'https://api.fallback.com/search?q=$\{query\}') +> .output(FunctionResult('Fallback result: $\{response.title\}')) +> .fallback\_output(FunctionResult('Sorry, all search APIs are unavailable')) +> ) +> +> # Expression-based responses (no API calls) +> +> data\_map = (DataMap('file\_control') +> .purpose('Control file playback') +> .parameter('command', 'string', 'Playback command') +> .parameter('filename', 'string', 'File to control', required=False) +> .expression('$\{args.command\}', r'start._', FunctionResult().add\_action('start\_playbook', \{'file': '$\{args.filename\}'\})) +> .expression('$\{args.command\}', r'stop._', FunctionResult().add\_action('stop\_playback', True)) +> ) +> +> # API with array processing +> +> data\_map = (DataMap('search\_docs') +> .purpose('Search documentation') +> .parameter('query', 'string', 'Search query', required=True) +> .webhook('POST', 'https://api.docs.com/search', headers=\{'Authorization': 'Bearer TOKEN'\}) +> .body(\{'query': '$\{query\}', 'limit': 3\}) +> .output(FunctionResult('Found: $\{response.results\[0].title\} - $\{response.results\[0].summary\}')) +> .foreach('$\{response.results\}') +> ) + +## Signature + +```python +class DataMap +``` + +## Examples + +```python +# Multiple webhooks with fallback +data_map = (DataMap('search_multi') + .purpose('Search with fallback APIs') + .parameter('query', 'string', 'Search query', required=True) + .webhook('GET', 'https://api.primary.com/search?q=${query}') + .output(FunctionResult('Primary result: ${response.title}')) + .webhook('GET', 'https://api.fallback.com/search?q=${query}') + .output(FunctionResult('Fallback result: ${response.title}')) + .fallback_output(FunctionResult('Sorry, all search APIs are unavailable')) +) + +# Expression-based responses (no API calls) +data_map = (DataMap('file_control') + .purpose('Control file playback') + .parameter('command', 'string', 'Playback command') + .parameter('filename', 'string', 'File to control', required=False) + .expression('${args.command}', r'start.*', FunctionResult().add_action('start_playbook', {'file': '${args.filename}'})) + .expression('${args.command}', r'stop.*', FunctionResult().add_action('stop_playback', True)) +) + +# API with array processing +data_map = (DataMap('search_docs') + .purpose('Search documentation') + .parameter('query', 'string', 'Search query', required=True) + .webhook('POST', 'https://api.docs.com/search', headers={'Authorization': 'Bearer TOKEN'}) + .body({'query': '${query}', 'limit': 3}) + .output(FunctionResult('Found: ${response.results[0].title} - ${response.results[0].summary}')) + .foreach('${response.results}') +) +``` + +## Properties + + + +## Methods + +### \_\_init\_\_ + +Initialize a new DataMap builder + +#### Signature + +```python +__init__(function_name: str) +``` + +#### Parameters + + + Name of the SWAIG function this data\_map will create + + +#### Source + +[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) + +Line 67. + +*** + +### body + +Set request body for the last added webhook (POST/PUT requests) + +#### Signature + +```python +body(data: Dict[str, Any]) -> DataMap +``` + +#### Parameters + + + Request body data (can include $\{variable\} substitutions) + + +#### Returns + +`DataMap` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) + +Line 255. + +*** + +### description + +Set the function description (alias for purpose). + +See purpose() for guidance on writing description text the LLM +can act on. + +#### Signature + +```python +description(description: str) -> DataMap +``` + +#### Parameters + + + LLM-facing description of what this function does and when to use it. + + +#### Returns + +`DataMap` — Self for method chaining. + +#### Source + +[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) + +Line 110. + +*** + +### error\_keys + +Set error keys for the most recent webhook (if webhooks exist) or top-level + +#### Signature + +```python +error_keys(keys: List[str]) -> DataMap +``` + +#### Parameters + + + List of JSON keys whose presence indicates an error + + +#### Returns + +`DataMap` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) + +Line 356. + +*** + +### expression + +Add an expression pattern for pattern-based responses + +#### Signature + +```python +expression( + test_value: str, + pattern: Union[str, Pattern], + output: FunctionResult, + nomatch_output: Optional[FunctionResult] = None +) -> DataMap +``` + +#### Parameters + + + Template string to test (e.g., "$\{args.command\}") + + + + Regex pattern string or compiled Pattern object to match against + + + + FunctionResult to return when pattern matches + + + + Optional FunctionResult to return when pattern doesn't match + + +#### Returns + +`DataMap` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) + +Line 173. + +*** + +### fallback\_output + +Set a fallback output result at the top level (used when all webhooks fail) + +#### Signature + +```python +fallback_output(result: FunctionResult) -> DataMap +``` + +#### Parameters + + + FunctionResult defining the fallback response + + +#### Returns + +`DataMap` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) + +Line 343. + +*** + +### foreach + +Process an array from the webhook response using foreach mechanism + +``` + Args: + foreach_config: Either: + - Dict: Foreach configuration with keys: + - input_key: Key in API response containing the array + - output_key: Name for the built string variable + - max: Maximum number of items to process (optional) + - append: Template string to append for each item + + Returns: + Self for method chaining + + Example: + .foreach({ + "input_key": "results", + "output_key": "formatted_results", + "max": 3, + "append": "Result: ${this.title} - ${this.summary} +``` + +" +\}) + +#### Signature + +```python +foreach(foreach_config: Dict[str, Any]) -> DataMap +``` + +#### Parameters + + + +#### Returns + +`DataMap` + +#### Examples + +```python + Args: + foreach_config: Either: + - Dict: Foreach configuration with keys: + - input_key: Key in API response containing the array + - output_key: Name for the built string variable + - max: Maximum number of items to process (optional) + - append: Template string to append for each item + + Returns: + Self for method chaining + + Example: + .foreach({ + "input_key": "results", + "output_key": "formatted_results", + "max": 3, + "append": "Result: ${this.title} - ${this.summary} +``` + +#### Source + +[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) + +Line 287. + +*** + +### global\_error\_keys + +Set top-level error keys (applies to all webhooks) + +#### Signature + +```python +global_error_keys(keys: List[str]) -> DataMap +``` + +#### Parameters + + + List of JSON keys whose presence indicates an error + + +#### Returns + +`DataMap` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) + +Line 374. + +*** + +### output + +Set the output result for the most recent webhook + +#### Signature + +```python +output(result: FunctionResult) -> DataMap +``` + +#### Parameters + + + FunctionResult defining the response for this webhook + + +#### Returns + +`DataMap` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) + +Line 327. + +*** + +### parameter + +Add a function parameter. + +Just like the function-level `description`, this parameter +`description` is sent to the LLM as part of the tool schema and +is read by the model when deciding HOW to fill in the argument. +Write it as an instruction to the model: + +- Bad: "the id" +- Good: "The customer's 8-digit account number, no dashes or + spaces. Ask the user if they don't provide it." + +#### Signature + +```python +parameter( + name: str, + param_type: str, + description: str, + required: bool = False, + enum: Optional[List[str]] = None +) -> DataMap +``` + +#### Parameters + + + Parameter name. Becomes a key in the tool schema's `properties` object and is what the model emits. + + + + JSON schema type (string, number, boolean, array, object). + + + + LLM-facing parameter description. See above — this should tell the model what value to put here, in what format, and where to source it. + + + + Whether parameter is required. + + + + Optional list of allowed values. The model will only emit values from this list. + + +#### Returns + +`DataMap` — Self for method chaining. + +#### Source + +[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) + +Line 126. + +*** + +### params + +Set request params for the last added webhook (alias for body) + +#### Signature + +```python +params(data: Dict[str, Any]) -> DataMap +``` + +#### Parameters + + + Request params data (can include $\{variable\} substitutions) + + +#### Returns + +`DataMap` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) + +Line 271. + +*** + +### purpose + +Set the function description that the LLM will read. + +A DataMap creates a SWAIG function that gets sent to the model in +OpenAI tool-schema format. This `description` field is what the +model reads on every turn to decide WHEN to call the tool. It is +prompt-engineered text, not developer documentation: + +- Bad: "Search function" +- Good: "Search the company's knowledge base for help articles + matching a user query. Use this when the user asks a + product or how-to question that the base prompt does + not cover." + +Vague descriptions are the most common cause of "the model has +the right tool but doesn't call it" failures. + +#### Signature + +```python +purpose(description: str) -> DataMap +``` + +#### Parameters + + + LLM-facing description of what this function does and when to use it. See above. + + +#### Returns + +`DataMap` — Self for method chaining. + +#### Source + +[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) + +Line 82. + +*** + +### to\_swaig\_function + +Convert this DataMap to a SWAIG function definition + +#### Signature + +```python +to_swaig_function() -> Dict[str, Any] +``` + +#### Returns + +`Dict[str, Any]` — Dictionary with function definition and data\_map instead of url + +#### Source + +[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) + +Line 387. + +*** + +### webhook + +Add a webhook API call + +#### Signature + +```python +webhook( + method: str, + url: str, + headers: Optional[Dict[str, str]] = None, + form_param: Optional[str] = None, + input_args_as_params: bool = False, + require_args: Optional[List[str]] = None +) -> DataMap +``` + +#### Parameters + + + HTTP method (GET, POST, PUT, DELETE, etc.) + + + + API endpoint URL (can include $\{variable\} substitutions) + + + + Optional HTTP headers + + + + Send JSON body as single form parameter with this name + + + + Merge function arguments into params + + + + Only execute if these arguments are present + + +#### Returns + +`DataMap` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) + +Line 204. + +*** + +### webhook\_expressions + +Add expressions that run after the most recent webhook completes + +#### Signature + +```python +webhook_expressions(expressions: List[Dict[str, Any]]) -> DataMap +``` + +#### Parameters + + + List of expression definitions to check post-webhook + + +#### Returns + +`DataMap` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) + +Line 239. + +## Source + +[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) + +Line 19. diff --git a/fern/products/sdk-reference/python/agents/function-result/index.mdx b/fern/products/sdk-reference/python/agents/function-result/index.mdx new file mode 100644 index 0000000000..77b9740b36 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/function-result/index.mdx @@ -0,0 +1,36 @@ +--- +slug: "/reference/python/agents/function-result" +title: "function_result" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.function_result" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py" +--- +# `function_result` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module function_result +``` + +## Properties + + + +## Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) diff --git a/fern/products/sdk-reference/python/agents/function-result/index__2.mdx b/fern/products/sdk-reference/python/agents/function-result/index__2.mdx new file mode 100644 index 0000000000..3b568f299a --- /dev/null +++ b/fern/products/sdk-reference/python/agents/function-result/index__2.mdx @@ -0,0 +1,2253 @@ +--- +slug: "/reference/python/agents/function-result/index__2" +title: "FunctionResult" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.core.function_result.FunctionResult" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py" +--- +# `FunctionResult` + +Wrapper around SWAIG function responses that handles proper formatting +of response text and actions. + +The result object has three main components: + +1. response: Text the AI should say back to the user +2. action: List of structured actions to execute +3. post\_process: Whether to let AI take another turn before executing actions + +Post-processing behavior: + +- post\_process=False (default): Execute actions immediately after AI response +- post\_process=True: Let AI respond to user one more time, then execute actions + +This is useful for confirmation workflows like: +"I'll transfer you to sales. Do you have any other questions first?" +(AI can handle follow-up, then execute the transfer) + +> \[!NOTE] +> return FunctionResult("Found your order") +> +> # With actions +> +> return ( +> FunctionResult("I'll transfer you to support") +> .add\_action("transfer", \{"dest": "support"\}) +> ) +> +> # With simple action value +> +> return ( +> FunctionResult("I'll confirm that") +> .add\_action("confirm", True) +> ) +> +> # With multiple actions +> +> return ( +> FunctionResult("Processing your request") +> .add\_actions(\[ +> \{"set\_global\_data": \{"key": "value"\}\}, +> \{"play": \{"url": "music.mp3"\}\} +> ]) +> ) +> +> # With post-processing enabled +> +> return ( +> FunctionResult("Let me transfer you to billing", post\_process=True) +> .connect("+15551234567", final=True) +> ) +> +> # Using the connect helper +> +> return ( +> FunctionResult("I'll transfer you to our sales team now") +> .connect("sales@company.com", final=False, from\_addr="+15559876543") +> ) + +## Signature + +```python +class FunctionResult +``` + +## Examples + +```python +# With actions +return ( + FunctionResult("I'll transfer you to support") + .add_action("transfer", {"dest": "support"}) +) + +# With simple action value +return ( + FunctionResult("I'll confirm that") + .add_action("confirm", True) +) + +# With multiple actions +return ( + FunctionResult("Processing your request") + .add_actions([ + {"set_global_data": {"key": "value"}}, + {"play": {"url": "music.mp3"}} + ]) +) + +# With post-processing enabled +return ( + FunctionResult("Let me transfer you to billing", post_process=True) + .connect("+15551234567", final=True) +) + +# Using the connect helper +return ( + FunctionResult("I'll transfer you to our sales team now") + .connect("sales@company.com", final=False, from_addr="+15559876543") +) +``` + +## Properties + + + + + + + +## Methods + +### \_\_init\_\_ + +Initialize a new SWAIG function result + +#### Signature + +```python +__init__(response: Optional[str] = None, post_process: bool = False) +``` + +#### Parameters + + + Optional natural language response to include + + + + Whether to let AI take another turn before executing actions. Defaults to False (execute actions immediately after response). + + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 71. + +*** + +### add\_action + +Add a structured action to the response + +#### Signature + +```python +add_action(name: str, data: Any) -> FunctionResult +``` + +#### Parameters + + + The name/type of the action (e.g., "play", "transfer") + + + + The data for the action - can be a string, boolean, object, or array + + +#### Returns + +`FunctionResult` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 114. + +*** + +### add\_actions + +Add multiple structured actions to the response + +#### Signature + +```python +add_actions(actions: List[Dict[str, Any]]) -> FunctionResult +``` + +#### Parameters + + + List of action objects to add to the response + + +#### Returns + +`FunctionResult` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 128. + +*** + +### add\_dynamic\_hints + +Add dynamic speech recognition hints during a call. + +Hints improve speech recognition accuracy for domain-specific terms. +Each hint can be a simple string or a pronunciation pattern object. + +> \[!NOTE] +> result = ( +> FunctionResult("I'll listen for that name") +> .add\_dynamic\_hints(\[ +> "Cabby", +> \{"pattern": "cab bee", "replace": "Cabby", "ignore\_case": True\} +> ]) +> ) + +#### Signature + +```python +add_dynamic_hints(hints: List[Union[str, Dict[str, Any]]]) -> FunctionResult +``` + +#### Parameters + + + List of hints, where each entry is either: + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 525. + +*** + +### clear\_dynamic\_hints + +Clear all dynamic speech recognition hints. + +Removes all hints previously added via add\_dynamic\_hints(). + +#### Signature + +```python +clear_dynamic_hints() -> FunctionResult +``` + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 554. + +*** + +### connect + +Add a connect action to transfer/connect the call to another destination. + +This is a convenience method that abstracts the SWML connect verb, so users +don't need to manually construct SWML documents. + +Transfer behavior: + +- final=True: Permanent transfer - call exits the agent completely, + SWML replaces the agent and call continues there +- final=False: Temporary transfer - if far end hangs up, call returns + to the agent to continue the conversation + +> \[!NOTE] +> +> ### Permanent transfer to a phone number +> +> result.connect("+15551234567", final=True) +> +> ### Temporary transfer to SIP address with custom caller ID +> +> result.connect("support@company.com", final=False, from\_addr="+15559876543") + +#### Signature + +```python +connect( + destination: str, + final: bool = True, + from_addr: Optional[str] = None +) -> FunctionResult +``` + +#### Parameters + + + Where to connect the call (phone number, SIP address, etc.) + + + + Whether this is a permanent transfer (True) or temporary (False). Defaults to True for permanent transfers. + + + + Optional caller ID override (phone number or SIP address). If None, uses the current call's from address. + + +#### Returns + +`FunctionResult` — Self for method chaining + +#### Examples + +```python +# Temporary transfer to SIP address with custom caller ID +result.connect("support@company.com", final=False, from_addr="+15559876543") +``` + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 141. + +*** + +### create\_payment\_action + +Create a payment action for use in payment prompts. + +**Modifiers:** `static` + +#### Signature + +```python +@staticmethod +create_payment_action(action_type: str, phrase: str) -> Dict[str, str] +``` + +#### Parameters + + + "Say" for text-to-speech or "Play" for audio file + + + + Sentence to say or URL to play + + +#### Returns + +`Dict[str, str]` — Dictionary representing the action + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 1472. + +*** + +### create\_payment\_parameter + +Create a payment parameter for use with pay() method. + +**Modifiers:** `static` + +#### Signature + +```python +@staticmethod +create_payment_parameter(name: str, value: str) -> Dict[str, str] +``` + +#### Parameters + + + Parameter name + + + + Parameter value + + +#### Returns + +`Dict[str, str]` — Dictionary representing the parameter + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 1489. + +*** + +### create\_payment\_prompt + +Create a payment prompt structure for use with pay() method. + +**Modifiers:** `static` + +#### Signature + +```python +@staticmethod +create_payment_prompt( + for_situation: str, + actions: List[Dict[str, str]], + card_type: Optional[str] = None, + error_type: Optional[str] = None +) -> Dict[str, Any] +``` + +#### Parameters + + + Situation to use prompt for (e.g., "payment-card-number") + + + + List of actions with 'type' and 'phrase' keys + + + + Space-separated card types for this prompt + + + + Space-separated error types for this prompt + + +#### Returns + +`Dict[str, Any]` — Dictionary representing the prompt structure + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 1444. + +*** + +### enable\_extensive\_data + +Send full data to LLM for this turn only, then use smaller replacement +in subsequent turns. + +#### Signature + +```python +enable_extensive_data(enabled: bool = True) -> FunctionResult +``` + +#### Parameters + + + Whether to send extensive data this turn only + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 652. + +*** + +### enable\_functions\_on\_timeout + +Enable function calls on speaker timeout. + +#### Signature + +```python +enable_functions_on_timeout(enabled: bool = True) -> FunctionResult +``` + +#### Parameters + + + Whether to enable functions on timeout + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 640. + +*** + +### execute\_rpc + +Execute an RPC method on a call using SWML. + +This is a generic helper for executing RPC commands. For common operations, +consider using the specific helpers: rpc\_dial(), rpc\_ai\_message(), rpc\_ai\_unhold(). + +> \[!NOTE] +> result = ( +> FunctionResult("Executing RPC") +> .execute\_rpc( +> method="ai\_message", +> call\_id="some-call-id", +> params=\{"role": "system", "message\_text": "Hello"\} +> ) +> ) + +#### Signature + +```python +execute_rpc( + method: str, + params: Optional[Dict[str, Any]] = None, + call_id: Optional[str] = None, + node_id: Optional[str] = None +) -> FunctionResult +``` + +#### Parameters + + + The RPC method to execute (e.g., "dial", "ai\_message", "ai\_unhold") + + + + Parameters for the RPC method (optional) + + + + Target call ID for the RPC (optional) + + + + Target node ID for the RPC (optional) + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 1290. + +*** + +### execute\_swml + +Execute SWML content with optional transfer behavior. + +#### Signature + +```python +execute_swml(swml_content, transfer: bool = False) -> FunctionResult +``` + +#### Parameters + + + Can be: + + + + Boolean - whether call should exit agent after execution + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 396. + +*** + +### hangup + +Terminate the call. + +#### Signature + +```python +hangup() -> FunctionResult +``` + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 433. + +*** + +### hold + +Put the call on hold with optional timeout. + +#### Signature + +```python +hold(timeout: int = 300) -> FunctionResult +``` + +#### Parameters + + + Timeout in seconds (max 900, default 300) + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 442. + +*** + +### join\_conference + +Join an ad-hoc audio conference with RELAY and CXML calls using SWML. + +This is a virtual helper that generates SWML to join audio conferences +with extensive configuration options for call management and recording. + +#### Signature + +```python +join_conference( + name: str, + muted: bool = False, + beep: str = 'true', + start_on_enter: bool = True, + end_on_exit: bool = False, + wait_url: Optional[str] = None, + max_participants: int = 250, + record: str = 'do-not-record', + region: Optional[str] = None, + trim: str = 'trim-silence', + coach: Optional[str] = None, + status_callback_event: Optional[str] = None, + status_callback: Optional[str] = None, + status_callback_method: str = 'POST', + recording_status_callback: Optional[str] = None, + recording_status_callback_method: str = 'POST', + recording_status_callback_event: str = 'completed', + result: Optional[Any] = None +) -> FunctionResult +``` + +#### Parameters + + + Name of conference (required) + + + + Whether to join muted (default: False) + + + + Beep configuration - "true", "false", "onEnter", "onExit" (default: "true") + + + + Whether conference starts when this participant enters (default: True) + + + + Whether conference ends when this participant exits (default: False) + + + + SWML URL for hold music (default: None for default hold music) + + + + Maximum participants \<= 250 (default: 250) + + + + Recording mode - "do-not-record", "record-from-start" (default: "do-not-record") + + + + Conference region (default: None) + + + + Trim silence - "trim-silence", "do-not-trim" (default: "trim-silence") + + + + SWML Call ID or CXML CallSid for coaching (default: None) + + + + Events to report - "start end join leave mute hold modify speaker announcement" (default: None) + + + + URL for status callbacks (default: None) + + + + HTTP method - "GET", "POST" (default: "POST") + + + + URL for recording status callbacks (default: None) + + + + HTTP method - "GET", "POST" (default: "POST") + + + + Recording events - "in-progress completed absent" (default: "completed") + + + + Switch on return\_value when object \{\} or cond when array \[] (default: None) + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Throws + +- `ValueError` — If beep value is invalid or max\_participants exceeds 250 + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 1049. + +*** + +### join\_room + +Join a RELAY room using SWML. + +This is a virtual helper that generates SWML to join a RELAY room, +which enables multi-party communication and collaboration. + +#### Signature + +```python +join_room(name: str) -> FunctionResult +``` + +#### Parameters + + + The name of the room to join (required) + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 991. + +*** + +### pay + +Process payment using SWML pay action. + +This is a virtual helper that generates SWML for payment processing. + +#### Signature + +```python +pay( + payment_connector_url: str, + input_method: str = 'dtmf', + status_url: Optional[str] = None, + payment_method: str = 'credit-card', + timeout: int = 5, + max_attempts: int = 1, + security_code: bool = True, + postal_code: Union[bool, str] = True, + min_postal_code_length: int = 0, + token_type: str = 'reusable', + charge_amount: Optional[str] = None, + currency: str = 'usd', + language: str = 'en-US', + voice: str = 'woman', + description: Optional[str] = None, + valid_card_types: str = 'visa mastercard amex', + parameters: Optional[List[Dict[str, str]]] = None, + prompts: Optional[List[Dict[str, Any]]] = None, + ai_response: Optional[str] = 'The payment status is ${pay_result}, do not mention anything else about collecting payment if successful.' +) -> FunctionResult +``` + +#### Parameters + + + URL to make payment requests to (required) + + + + Method to collect payment details. The SWML pay verb only accepts "dtmf" (schema `input` is `const: "dtmf"`); the earlier "voice" option was never valid. + + + + URL for status change notifications + + + + Payment method ("credit-card" currently supported) + + + + Seconds to wait for next digit (default: 5) + + + + Number of retry attempts (default: 1) + + + + Whether to prompt for security code (default: True) + + + + Whether to prompt for postal code, or actual postcode + + + + Minimum postal code digits (default: 0) + + + + Payment type ("one-time" or "reusable", default: "reusable") + + + + Amount to charge as decimal string + + + + Currency code (default: "usd") + + + + Language for prompts (default: "en-US") + + + + TTS voice to use (default: "woman") + + + + Custom payment description + + + + Space-separated card types (default: "visa mastercard amex") + + + + Array of name/value pairs for payment connector + + + + Array of custom prompt configurations + + + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 797. + +*** + +### play\_background\_file + +Play audio or video file in background. + +#### Signature + +```python +play_background_file(filename: str, wait: bool = False) -> FunctionResult +``` + +#### Parameters + + + Audio/video filename/path + + + + Whether to suppress attention-getting behavior during playback + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 500. + +*** + +### record\_call + +Start background call recording using SWML. + +This is a virtual helper that generates SWML to start recording the call +in the background. Unlike foreground recording, the script continues +executing while recording happens in the background. + +#### Signature + +```python +record_call( + control_id: Optional[str] = None, + stereo: bool = False, + format: Literal['wav', 'mp3', 'mp4'] = 'wav', + direction: Literal['speak', 'listen', 'both'] = 'both', + terminators: Optional[str] = None, + beep: bool = False, + input_sensitivity: float = 44.0, + initial_timeout: Optional[float] = None, + end_silence_timeout: Optional[float] = None, + max_length: Optional[float] = None, + status_url: Optional[str] = None +) -> FunctionResult +``` + +#### Parameters + + + Identifier for this recording (for use with stop\_record\_call) + + + + Record in stereo (default: False) + + + + Recording format - "wav", "mp3", or "mp4" (default: "wav") + + + + Audio direction - "speak", "listen", or "both" (default: "both") + + + + Digits that stop recording when pressed + + + + Play beep before recording (default: False) + + + + Input sensitivity for recording (default: 44.0) + + + + Time in seconds to wait for speech start (for voicemail-style recording) + + + + Time in seconds to wait in silence before ending (for voicemail-style recording) + + + + Maximum recording length in seconds + + + + URL to send recording status events to + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 885. + +*** + +### remove\_global\_data + +Remove global agent data variables. + +#### Signature + +```python +remove_global_data(keys: Union[str, List[str]]) -> FunctionResult +``` + +#### Parameters + + + Single key string or list of keys to remove + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 592. + +*** + +### remove\_metadata + +Remove metadata from current function's meta\_data\_token scope. + +#### Signature + +```python +remove_metadata(keys: Union[str, List[str]]) -> FunctionResult +``` + +#### Parameters + + + Single key string or list of keys to remove + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 616. + +*** + +### replace\_in\_history + +After first send, replace tool\_call+result pair in conversation history. + +#### Signature + +```python +replace_in_history(text: Union[str, bool] = True) -> FunctionResult +``` + +#### Parameters + + + String = replace tool\_call with an assistant message containing this text. True = remove the tool\_call+result pair from history entirely. + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 665. + +*** + +### rpc\_ai\_message + +Inject a message into an AI agent on another call using execute\_rpc. + +This is useful for cross-call communication, such as notifying a held +caller's AI agent about a status change or instructing it to relay +a message. + +> \[!NOTE] +> result = ( +> FunctionResult("I'll let them know.") +> .rpc\_ai\_message( +> call\_id=original\_call\_id, +> message\_text="The person you were trying to reach is unavailable. Please take a message." +> ) +> ) + +#### Signature + +```python +rpc_ai_message( + call_id: str, + message_text: str, + role: str = 'system' +) -> FunctionResult +``` + +#### Parameters + + + The call ID of the target call + + + + The message text to inject into the AI conversation + + + + The role for the message, typically "system" (default: "system") + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 1383. + +*** + +### rpc\_ai\_unhold + +Unhold another call using execute\_rpc. + +This releases a call from hold state, typically used after injecting +a message to the held caller's AI agent. + +> \[!NOTE] +> result = ( +> FunctionResult("Understood, I'll let them know.") +> .rpc\_ai\_message(call\_id, "No one is available. Please take a message.") +> .rpc\_ai\_unhold(call\_id) +> ) + +#### Signature + +```python +rpc_ai_unhold(call_id: str) -> FunctionResult +``` + +#### Parameters + + + The call ID of the call to unhold + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 1418. + +*** + +### rpc\_dial + +Dial out to a number with a destination SWML URL using execute\_rpc. + +This is commonly used in call screening scenarios where you place a caller +on hold and dial out to a human, with the dest\_swml specifying what agent +handles the outbound leg. + +> \[!NOTE] +> result = ( +> FunctionResult("Please hold while I connect you.") +> .hold(timeout=120) +> .rpc\_dial( +> to\_number="+15551234567", +> from\_number="+15559876543", +> dest\_swml="https://example.com/call-agent?caller=John" +> ) +> ) + +#### Signature + +```python +rpc_dial( + to_number: str, + from_number: str, + dest_swml: str, + device_type: str = 'phone' +) -> FunctionResult +``` + +#### Parameters + + + Phone number to dial (E.164 format) + + + + Caller ID to use (E.164 format) + + + + URL to the SWML that handles the outbound call + + + + Device type, typically "phone" (default: "phone") + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 1340. + +*** + +### say + +Make the agent speak specific text. + +#### Signature + +```python +say(text: str) -> FunctionResult +``` + +#### Parameters + + + Text for agent to speak + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 488. + +*** + +### send\_sms + +Send a text message to a PSTN phone number using SWML. + +This is a virtual helper that generates SWML to send SMS messages. +Either body or media (or both) must be provided. + +#### Signature + +```python +send_sms( + to_number: str, + from_number: str, + body: Optional[str] = None, + media: Optional[List[str]] = None, + tags: Optional[List[str]] = None, + region: Optional[str] = None +) -> FunctionResult +``` + +#### Parameters + + + Phone number in E.164 format to send to + + + + Phone number in E.164 format to send from + + + + Body text of the message (optional if media provided) + + + + Array of URLs to send in the message (optional if body provided) + + + + Array of tags to associate with the message for UI searching + + + + Region to originate the message from + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Throws + +- `ValueError` — If neither body nor media is provided + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 741. + +*** + +### set\_end\_of\_speech\_timeout + +Adjust end of speech timeout - milliseconds of silence after speaking +has been detected to finalize speech recognition. + +#### Signature + +```python +set_end_of_speech_timeout(milliseconds: int) -> FunctionResult +``` + +#### Parameters + + + Timeout in milliseconds + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 566. + +*** + +### set\_metadata + +Set metadata scoped to current function's meta\_data\_token. + +#### Signature + +```python +set_metadata(data: Dict[str, Any]) -> FunctionResult +``` + +#### Parameters + + + Dictionary of key-value pairs for metadata + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 604. + +*** + +### set\_post\_process + +Set whether to enable post-processing for this result. + +Post-processing allows the AI to take one more turn with the user +before executing any actions. This is useful for confirmation workflows. + +#### Signature + +```python +set_post_process(post_process: bool) -> FunctionResult +``` + +#### Parameters + + + True to let AI respond once more before executing actions, False to execute actions immediately after the response. + + +#### Returns + +`FunctionResult` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 97. + +*** + +### set\_response + +Set the natural language response text + +#### Signature + +```python +set_response(response: str) -> FunctionResult +``` + +#### Parameters + + + The text the AI should say + + +#### Returns + +`FunctionResult` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 84. + +*** + +### set\_speech\_event\_timeout + +Adjust speech event timeout - milliseconds since last speech detection +event to finalize recognition. Works better in noisy environments. + +#### Signature + +```python +set_speech_event_timeout(milliseconds: int) -> FunctionResult +``` + +#### Parameters + + + Timeout in milliseconds + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 579. + +*** + +### simulate\_user\_input + +Queue simulated user input. + +#### Signature + +```python +simulate_user_input(text: str) -> FunctionResult +``` + +#### Parameters + + + Text to simulate as user input + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 729. + +*** + +### sip\_refer + +Send SIP REFER to a SIP call using SWML. + +This is a virtual helper that generates SWML to send a SIP REFER +message, which is used for call transfer in SIP environments. + +#### Signature + +```python +sip_refer(to_uri: str) -> FunctionResult +``` + +#### Parameters + + + The SIP URI to send the REFER to (required) + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 1020. + +*** + +### stop + +Stop the agent execution. + +#### Signature + +```python +stop() -> FunctionResult +``` + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 479. + +*** + +### stop\_background\_file + +Stop currently playing background file. + +#### Signature + +```python +stop_background_file() -> FunctionResult +``` + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 516. + +*** + +### stop\_record\_call + +Stop an active background call recording using SWML. + +This is a virtual helper that generates SWML to stop a recording that +was started with record\_call(). + +#### Signature + +```python +stop_record_call(control_id: Optional[str] = None) -> FunctionResult +``` + +#### Parameters + + + Identifier for the recording to stop. If not provided, the most recent recording will be stopped. + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 959. + +*** + +### stop\_tap + +Stop an active tap stream using SWML. + +This is a virtual helper that generates SWML to stop a tap stream +that was started with tap(). + +#### Signature + +```python +stop_tap(control_id: Optional[str] = None) -> FunctionResult +``` + +#### Parameters + + + ID of the tap to stop (optional) If not set, the last tap started will be stopped + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 1256. + +*** + +### switch\_context + +Change agent context/prompt during conversation. + +#### Signature + +```python +switch_context( + system_prompt: Optional[str] = None, + user_prompt: Optional[str] = None, + consolidate: bool = False, + full_reset: bool = False +) -> FunctionResult +``` + +#### Parameters + + + New system prompt + + + + User message to add + + + + Whether to summarize existing conversation + + + + Whether to do complete context reset + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 699. + +*** + +### swml\_change\_context + +Force the conversation into a different context. + +Webhook-triggered context changes bypass any `valid_contexts` clamp. +Step state resets (cur\_step = 0) on entry. The new context's first +step's instructions are injected on the next turn. + +#### Communicating intent to the destination context + +Same pattern as swml\_change\_step: the model reads your FunctionResult's +`response` text as the tool result before it sees the destination +context's first step. Put your reason there: + +``` +FunctionResult( + "I'm transferring you to billing because your question is " + "about an invoice charge." +).swml_change_context("billing") +``` + +For structured carry-over, use update\_global\_data() and reference the +values via $\{var\} expansion in the destination context's step text. + +Note that conversation history is preserved across context switches +unless the destination context is marked `isolated=True`. The model +retains everything the user said in the previous context — you do +not need to re-state it. + +> \[!NOTE] +> result = ( +> FunctionResult("Transferring you to technical support.") +> .update\_global\_data(\{"original\_issue": user\_problem\}) +> .swml\_change\_context("technical\_support") +> ) + +#### Signature + +```python +swml_change_context(context_name: str) -> FunctionResult +``` + +#### Parameters + + + Name of the context to switch to. Must exist in the agent's context map. + + +#### Returns + +`FunctionResult` — Self for method chaining. + +#### Examples + +```python +FunctionResult( + "I'm transferring you to billing because your question is " + "about an invoice charge." +).swml_change_context("billing") +``` + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 353. + +*** + +### swml\_change\_step + +Force the conversation into a specific step in the current context. + +This is a workflow-level transition driven by your webhook, not by the +model. Webhook-triggered step changes bypass any `valid_steps` clamp +on the current step (the model's `next_step` tool is the constrained +path; this is the unconstrained one). Use it when something the user +said unambiguously requires moving the flow forward. + +#### Communicating intent to the destination step + +When the model arrives at the new step, the next thing it sees in +history is the tool result that contained this action — i.e., your +FunctionResult's `response` text. Put your "why" there. The model +reads it before the new step's injected instructions: + +``` +FunctionResult( + "Premium plan confirmed. Now collecting payment details." +).swml_change_step("collect_payment") +``` + +For structured data the destination step needs (account number, +plan tier, etc.), pair this with `update_global_data()` and reference +the values from the destination step's `text` via $\{var\} expansion: + +``` +(FunctionResult("Premium plan confirmed.") + .update_global_data({"plan": "premium", "billing_cycle": "annual"}) + .swml_change_step("collect_payment")) +``` + +And in the destination step's text: + +``` +step.set_text( + "Collect payment for the ${plan} plan, billed ${billing_cycle}. " + "Confirm the amount with the user before proceeding." +) +``` + +> \[!NOTE] +> result = ( +> FunctionResult("Starting a new hand") +> .update\_global\_data(\{"chips": 1000\}) +> .swml\_change\_step("betting") +> ) + +#### Signature + +```python +swml_change_step(step_name: str) -> FunctionResult +``` + +#### Parameters + + + Name of the step to transition to. The step must exist in the current context. + + +#### Returns + +`FunctionResult` — Self for method chaining. + +#### Examples + + + + ```python + FunctionResult( + "Premium plan confirmed. Now collecting payment details." + ).swml_change_step("collect_payment") + ``` + + + + ```python + (FunctionResult("Premium plan confirmed.") + .update_global_data({"plan": "premium", "billing_cycle": "annual"}) + .swml_change_step("collect_payment")) + ``` + + + + ```python + step.set_text( + "Collect payment for the ${plan} plan, billed ${billing_cycle}. " + "Confirm the amount with the user before proceeding." + ) + ``` + + + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 301. + +*** + +### swml\_transfer + +Add a SWML transfer action with AI response setup for when transfer completes. + +This is a virtual helper that generates SWML to transfer the call to another +destination and sets up an AI response for when the transfer completes and +control returns to the agent. + +For transfers, you typically want to enable post-processing so the AI speaks +the response first before executing the transfer. + +> \[!NOTE] +> +> ### Permanent transfer (default) +> +> result = ( +> FunctionResult("I'm transferring you to support", post\_process=True) +> .swml\_transfer( +> "https://support.example.com/swml", +> "Goodbye!" # Won't be used since final=True by default +> ) +> ) +> +> ### Temporary transfer with return +> +> result.swml\_transfer( +> dest, +> "The support call is complete. How else can I help?", +> final=False +> ) + +#### Signature + +```python +swml_transfer(dest: str, ai_response: str, final: bool = True) -> FunctionResult +``` + +#### Parameters + + + Destination URL for the transfer (SWML endpoint, SIP address, etc.) + + + + Message the AI should say when transfer completes and control returns + + + + Whether this is a permanent transfer (True) or temporary (False). Defaults to True for permanent transfers (same as connect method). + + +#### Returns + +`FunctionResult` — Self for method chaining + +#### Examples + +```python +# Temporary transfer with return +result.swml_transfer( + dest, + "The support call is complete. How else can I help?", + final=False +) +``` + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 191. + +*** + +### swml\_user\_event + +Send a user event through SWML to update the client UI. + +This is a convenience method for sending user events to connected clients, +commonly used for real-time UI updates in interactive applications. + +> \[!NOTE] +> result = ( +> FunctionResult("You have blackjack!") +> .swml\_user\_event(\{ +> "type": "cards\_dealt", +> "player\_hand": player\_cards, +> "dealer\_hand": dealer\_cards, +> "player\_score": 21 +> \}) +> ) + +#### Signature + +```python +swml_user_event(event_data: Dict[str, Any]) -> FunctionResult +``` + +#### Parameters + + + Dictionary containing the event type and any associated data Example: \{"type": "cards\_dealt", "player\_hand": \[...], "score": 21\} + + +#### Returns + +`FunctionResult` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 263. + +*** + +### tap + +Start background call tap using SWML. + +This is a virtual helper that generates SWML to start background call tapping. +Media is streamed over Websocket or RTP to customer controlled URI. + +#### Signature + +```python +tap( + uri: str, + control_id: Optional[str] = None, + direction: Literal['speak', 'hear', 'both'] = 'both', + codec: Literal['PCMU', 'PCMA'] = 'PCMU', + rtp_ptime: int = 20, + status_url: Optional[str] = None +) -> FunctionResult +``` + +#### Parameters + + + Destination of tap media stream (required) Formats: rtp://IP:port, ws://example.com, or wss://example.com + + + + Identifier for this tap to use with stop\_tap (optional) Default is generated and stored in tap\_control\_id variable + + + + Direction of audio to tap (default: "both") "speak" = what party says "hear" = what party hears\ + "both" = what party hears and says + + + + Codec for tap media stream - "PCMU" or "PCMA" (default: "PCMU") + + + + Packetization time in milliseconds for RTP (default: 20) + + + + URL for status change requests (optional) + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Throws + +- `ValueError` — If direction or codec values are invalid + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 1186. + +*** + +### to\_dict + +Convert to the JSON structure expected by SWAIG + +The result must have at least one of: + +- 'response': Text to be spoken by the AI +- 'action': Array of action objects + +Optional: + +- 'post\_process': Boolean controlling when actions execute + +#### Signature + +```python +to_dict() -> Dict[str, Any] +``` + +#### Returns + +`Dict[str, Any]` — Dictionary in SWAIG function response format + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 1506. + +*** + +### toggle\_functions + +Enable/disable specific SWAIG functions. + +#### Signature + +```python +toggle_functions(function_toggles: List[Dict[str, Any]]) -> FunctionResult +``` + +#### Parameters + + + List of dicts with 'function' and 'active' keys + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 628. + +*** + +### update\_global\_data + +Update global agent data variables. + +This is a convenience method that abstracts the set\_global\_data action. +Global data persists across the entire agent session and is available +in prompt variables and can be accessed by all functions. + +#### Signature + +```python +update_global_data(data: Dict[str, Any]) -> FunctionResult +``` + +#### Parameters + + + Dictionary of key-value pairs to set/update in global data + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 247. + +*** + +### update\_settings + +Update agent runtime settings. + +Supported settings: + +- frequency-penalty: Float (-2.0 to 2.0) +- presence-penalty: Float (-2.0 to 2.0) +- max-tokens: Integer (0 to 4096) +- top-p: Float (0.0 to 1.0) +- confidence: Float (0.0 to 1.0) +- barge-confidence: Float (0.0 to 1.0) +- temperature: Float (0.0 to 2.0, clamped to 1.5) + +#### Signature + +```python +update_settings(settings: Dict[str, Any]) -> FunctionResult +``` + +#### Parameters + + + Dictionary of settings to update + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 678. + +*** + +### wait\_for\_user + +Control how agent waits for user input. + +#### Signature + +```python +wait_for_user( + enabled: Optional[bool] = None, + timeout: Optional[int] = None, + answer_first: bool = False +) -> FunctionResult +``` + +#### Parameters + + + Boolean to enable/disable waiting + + + + Number of seconds to wait + + + + Special "answer\_first" mode + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 456. + +## Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 17. diff --git a/fern/products/sdk-reference/python/agents/gateway-service/index.mdx b/fern/products/sdk-reference/python/agents/gateway-service/index.mdx new file mode 100644 index 0000000000..887a09d763 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/gateway-service/index.mdx @@ -0,0 +1,22 @@ +--- +slug: "/reference/python/agents/gateway-service" +title: "gateway_service" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "agents.gateway_service" + parent: "agents" + module: "agents" +--- +# `gateway_service` + +## Classes + + + + Main gateway service class + + diff --git a/fern/products/sdk-reference/python/agents/gateway-service/mcp-gateway/index.mdx b/fern/products/sdk-reference/python/agents/gateway-service/mcp-gateway/index.mdx new file mode 100644 index 0000000000..721425d97a --- /dev/null +++ b/fern/products/sdk-reference/python/agents/gateway-service/mcp-gateway/index.mdx @@ -0,0 +1,105 @@ +--- +slug: "/reference/python/agents/gateway-service/mcp-gateway" +title: "MCPGateway" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.mcp_gateway.gateway_service.MCPGateway" + parent: "agents.gateway_service" + module: "agents.gateway_service" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/gateway_service.py" +--- +# `MCPGateway` + +Main gateway service class + +## Signature + +```python +class MCPGateway +``` + +## Properties + + + + + + + + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(config_path: str = 'config.json') +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/mcp_gateway/gateway_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/gateway_service.py) + +Line 55. + +*** + +### run + +Run the gateway service + +#### Signature + +```python +run() +``` + +#### Source + +[`signalwire/signalwire/mcp_gateway/gateway_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/gateway_service.py) + +Line 478. + +*** + +### shutdown + +Shutdown the gateway service + +#### Signature + +```python +shutdown() +``` + +#### Source + +[`signalwire/signalwire/mcp_gateway/gateway_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/gateway_service.py) + +Line 520. + +## Source + +[`signalwire/signalwire/mcp_gateway/gateway_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/gateway_service.py) + +Line 52. diff --git a/fern/products/sdk-reference/python/signalwire/mcp-gateway/gateway-service/mcp-gateway/set-security-headers.mdx b/fern/products/sdk-reference/python/agents/gateway-service/mcp-gateway/set-security-headers.mdx similarity index 84% rename from fern/products/sdk-reference/python/signalwire/mcp-gateway/gateway-service/mcp-gateway/set-security-headers.mdx rename to fern/products/sdk-reference/python/agents/gateway-service/mcp-gateway/set-security-headers.mdx index f3cbf656ab..b96aea9031 100644 --- a/fern/products/sdk-reference/python/signalwire/mcp-gateway/gateway-service/mcp-gateway/set-security-headers.mdx +++ b/fern/products/sdk-reference/python/agents/gateway-service/mcp-gateway/set-security-headers.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/signalwire/mcp-gateway/gateway-service/mcp-gateway/set-security-headers" +slug: "/reference/python/agents/gateway-service/mcp-gateway/set-security-headers" title: "set_security_headers" sdk_label: "Python SDK" icon: "python" @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.mcp_gateway.gateway_service.MCPGateway.__init__.set_security_headers" parent: "signalwire.mcp_gateway.gateway_service.MCPGateway.__init__" - module: "signalwire.mcp_gateway.gateway_service" + module: "agents.gateway_service.MCPGateway" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/gateway_service.py" --- # `set_security_headers` diff --git a/fern/products/sdk-reference/python/agents/index.mdx b/fern/products/sdk-reference/python/agents/index.mdx new file mode 100644 index 0000000000..371436b5a3 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/index.mdx @@ -0,0 +1,176 @@ +--- +slug: "/reference/python/agents" +title: "agents" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "agents" +--- +# `agents` + +## Classes + + + + Base class for all SignalWire AI Agents. + + + + Server for hosting multiple SignalWire AI Agents under a single FastAPI application. + + + + Unified authentication handler supporting multiple auth methods. + + + + Configuration loader with environment variable substitution. + + + + Builder class for creating SWAIG data\_map configurations. + + + + Wrapper around SWAIG function responses that handles proper formatting of response text and actions. + + + + Builder class for creating structured prompts using the Prompt Object Model. + + + + Abstract base class for all agent skills + + + + Manages loading and lifecycle of agent skills + + + + Represents a SWAIG function — i.e., a tool the AI model can call. + + + + Fluent builder for SWML documents + + + + Renders SWML documents for SignalWire AI Agents with AI and SWAIG components + + + + Base class for creating and serving SWML documents. + + + +## Modules + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + diff --git a/fern/products/sdk-reference/python/agents/livewire/agent-handoff/index.mdx b/fern/products/sdk-reference/python/agents/livewire/agent-handoff/index.mdx new file mode 100644 index 0000000000..02b5a2494d --- /dev/null +++ b/fern/products/sdk-reference/python/agents/livewire/agent-handoff/index.mdx @@ -0,0 +1,57 @@ +--- +slug: "/reference/python/agents/livewire/agent-handoff" +title: "AgentHandoff" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.livewire.AgentHandoff" + parent: "signalwire.livewire" + module: "agents.livewire" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py" +--- +# `AgentHandoff` + +Signals a handoff to another agent in multi-agent scenarios. + +## Signature + +```python +class AgentHandoff +``` + +## Properties + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(agent, *, returns = None) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 153. + +## Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 150. diff --git a/fern/products/sdk-reference/python/agents/livewire/agent-server/index.mdx b/fern/products/sdk-reference/python/agents/livewire/agent-server/index.mdx new file mode 100644 index 0000000000..9d20d7ce6f --- /dev/null +++ b/fern/products/sdk-reference/python/agents/livewire/agent-server/index.mdx @@ -0,0 +1,90 @@ +--- +slug: "/reference/python/agents/livewire/agent-server" +title: "AgentServer" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.livewire.AgentServer" + parent: "signalwire.livewire" + module: "agents.livewire" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py" +--- +# `AgentServer` + +Mirrors a livekit AgentServer -- registers entrypoints and starts. + +## Signature + +```python +class AgentServer +``` + +## Properties + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(**kwargs = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 686. + +*** + +### rtc\_session + +Decorator that registers the session entrypoint. + +#### Signature + +```python +rtc_session( + func = None, + *, + agent_name: str = '', + type: str = 'room', + on_request = None, + on_session_end = None +) +``` + +#### Parameters + + + + + + + + + + + +#### Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 691. + +## Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 683. diff --git a/fern/products/sdk-reference/python/agents/livewire/agent-session/index.mdx b/fern/products/sdk-reference/python/agents/livewire/agent-session/index.mdx new file mode 100644 index 0000000000..bdbb7d175e --- /dev/null +++ b/fern/products/sdk-reference/python/agents/livewire/agent-session/index.mdx @@ -0,0 +1,211 @@ +--- +slug: "/reference/python/agents/livewire/agent-session" +title: "AgentSession" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.livewire.AgentSession" + parent: "signalwire.livewire" + module: "agents.livewire" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py" +--- +# `AgentSession` + +Mirrors a livekit AgentSession -- orchestrator that binds an Agent +to the SignalWire platform. + +## Signature + +```python +class AgentSession +``` + +## Properties + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + *, + stt: Any = None, + tts: Any = None, + llm: Any = None, + vad: Any = None, + turn_detection: Any = None, + tools: Optional[List[Any]] = None, + mcp_servers: Any = None, + userdata: Any = None, + allow_interruptions: bool = True, + min_interruption_duration: float = 0.5, + min_endpointing_delay: float = 0.5, + max_endpointing_delay: float = 3.0, + max_tool_steps: int = 3, + preemptive_generation: bool = False +) +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#### Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 407. + +*** + +### generate\_reply + +Trigger the agent to generate a reply. On SignalWire the prompt +handles this; if _instructions_ is provided they are noted. + +#### Signature + +```python +generate_reply(*, instructions: Optional[str] = None) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 514. + +*** + +### interrupt + +Noop -- SignalWire handles barge-in automatically. + +#### Signature + +```python +interrupt() +``` + +#### Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 520. + +*** + +### say + +Queue text to be spoken by the agent. + +#### Signature + +```python +say(text: str) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 510. + +*** + +### start + +Bind to an Agent and prepare the underlying SignalWire AgentBase. + +**Modifiers:** `async` + +#### Signature + +```python +async start(agent: Agent, *, room = None, record: bool = False) +``` + +#### Parameters + + + + + + + +#### Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 504. + +*** + +### update\_agent + +Swap in a new Agent. + +#### Signature + +```python +update_agent(agent: Agent) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 528. + +## Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 403. diff --git a/fern/products/sdk-reference/python/agents/livewire/agent/index.mdx b/fern/products/sdk-reference/python/agents/livewire/agent/index.mdx new file mode 100644 index 0000000000..7129d1391b --- /dev/null +++ b/fern/products/sdk-reference/python/agents/livewire/agent/index.mdx @@ -0,0 +1,285 @@ +--- +slug: "/reference/python/agents/livewire/agent" +title: "Agent" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.livewire.Agent" + parent: "signalwire.livewire" + module: "agents.livewire" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py" +--- +# `Agent` + +Mirrors a livekit Agent -- holds instructions and tool definitions. + +## Signature + +```python +class Agent +``` + +## Properties + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + *, + instructions: str = '', + tools: Optional[List[Any]] = None, + chat_ctx: Any = NOT_GIVEN, + stt: Any = NOT_GIVEN, + tts: Any = NOT_GIVEN, + llm: Any = NOT_GIVEN, + vad: Any = NOT_GIVEN, + turn_detection: Any = NOT_GIVEN, + mcp_servers: Any = NOT_GIVEN, + allow_interruptions: Any = NOT_GIVEN, + min_endpointing_delay: Any = NOT_GIVEN, + max_endpointing_delay: Any = NOT_GIVEN +) +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + + + +#### Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 274. + +*** + +### llm\_node + +Noop -- SignalWire handles LLM in its control plane. + +**Modifiers:** `async` + +#### Signature + +```python +async llm_node(chat_ctx = None, tools = None, model_settings = None) +``` + +#### Parameters + + + + + + + +#### Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 370. + +*** + +### on\_enter + +Called when the agent enters. Override in subclass. + +**Modifiers:** `async` + +#### Signature + +```python +async on_enter() +``` + +#### Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 346. + +*** + +### on\_exit + +Called when the agent exits. Override in subclass. + +**Modifiers:** `async` + +#### Signature + +```python +async on_exit() +``` + +#### Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 350. + +*** + +### on\_user\_turn\_completed + +Called when the user finishes speaking. Override in subclass. + +**Modifiers:** `async` + +#### Signature + +```python +async on_user_turn_completed(turn_ctx = None, new_message = None) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 354. + +*** + +### stt\_node + +Noop -- SignalWire handles STT in its control plane. + +**Modifiers:** `async` + +#### Signature + +```python +async stt_node(audio = None, model_settings = None) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 362. + +*** + +### tts\_node + +Noop -- SignalWire handles TTS in its control plane. + +**Modifiers:** `async` + +#### Signature + +```python +async tts_node(text = None, model_settings = None) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 378. + +*** + +### update\_instructions + +Update the agent's instructions mid-session. + +**Modifiers:** `async` + +#### Signature + +```python +async update_instructions(instructions: str) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 390. + +*** + +### update\_tools + +Update the agent's tool list mid-session. + +**Modifiers:** `async` + +#### Signature + +```python +async update_tools(tools: List[Any]) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 394. + +## Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 271. diff --git a/fern/products/sdk-reference/python/agents/livewire/chat-context/index.mdx b/fern/products/sdk-reference/python/agents/livewire/chat-context/index.mdx new file mode 100644 index 0000000000..9f44580765 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/livewire/chat-context/index.mdx @@ -0,0 +1,71 @@ +--- +slug: "/reference/python/agents/livewire/chat-context" +title: "ChatContext" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.livewire.ChatContext" + parent: "signalwire.livewire" + module: "agents.livewire" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py" +--- +# `ChatContext` + +Minimal stub mirroring livekit ChatContext. + +## Signature + +```python +class ChatContext +``` + +## Properties + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__() +``` + +#### Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 165. + +*** + +### append + +#### Signature + +```python +append(*, role: str = 'user', text: str = '') +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 168. + +## Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 162. diff --git a/fern/products/sdk-reference/python/agents/livewire/index.mdx b/fern/products/sdk-reference/python/agents/livewire/index.mdx new file mode 100644 index 0000000000..44dbe4e280 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/livewire/index.mdx @@ -0,0 +1,179 @@ +--- +slug: "/reference/python/agents/livewire" +title: "livewire" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.livewire" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py" +--- +# `livewire` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module livewire +``` + +## Properties + + + + + + + + + + + +## Constants + + + + + + + +## Classes + + + + Mirrors a livekit Agent -- holds instructions and tool definitions. + + + + Signals a handoff to another agent in multi-agent scenarios. + + + + Mirrors a livekit AgentServer -- registers entrypoints and starts. + + + + Mirrors a livekit AgentSession -- orchestrator that binds an Agent to the SignalWire platform. + + + + Minimal stub mirroring livekit ChatContext. + + + + Stub for livekit inference.LLM. + + + + Stub for livekit inference.STT. + + + + Stub for livekit inference.TTS. + + + + Mirrors a livekit JobContext -- provides room and connection info. + + + + Mirrors a livekit JobProcess -- used for prewarm/setup. + + + + Stub -- SignalWire doesn't use the LiveKit room abstraction. + + + + Mirrors livekit RunContext -- available inside tool handlers. + + + + Signals that a tool should not trigger another LLM reply. + + + + Signals a tool execution error. + + + +## Modules + + + + Copyright (c) 2025 SignalWire + + + +## Functions + +### function\_tool + +Mirrors the livekit `@function_tool` decorator. + +Wraps a plain function so it can be passed into `Agent(tools=[...])`. +Parameters are extracted from type-hints; the docstring is used as the +description when _description_ is not provided explicitly. + +#### Signature + +```python +function_tool( + func = None, + *, + name: Optional[str] = None, + description: Optional[str] = None +) +``` + +#### Parameters + + + + + + + +#### Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 177. + +*** + +### run\_app + +Print banner, print a random tip, run the agent. + +This is the main entry point -- mirrors `livekit.agents.cli.run_app`. + +#### Signature + +```python +run_app(server: AgentServer) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 799. + +## Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) diff --git a/fern/products/sdk-reference/python/agents/livewire/inference-llm/index.mdx b/fern/products/sdk-reference/python/agents/livewire/inference-llm/index.mdx new file mode 100644 index 0000000000..25de976f6a --- /dev/null +++ b/fern/products/sdk-reference/python/agents/livewire/inference-llm/index.mdx @@ -0,0 +1,55 @@ +--- +slug: "/reference/python/agents/livewire/inference-llm" +title: "InferenceLLM" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.livewire.InferenceLLM" + parent: "signalwire.livewire" + module: "agents.livewire" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py" +--- +# `InferenceLLM` + +Stub for livekit inference.LLM. + +## Signature + +```python +class InferenceLLM +``` + +## Properties + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(model: str = '', **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 751. + +## Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 748. diff --git a/fern/products/sdk-reference/python/agents/livewire/inference-stt/index.mdx b/fern/products/sdk-reference/python/agents/livewire/inference-stt/index.mdx new file mode 100644 index 0000000000..7c1c789849 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/livewire/inference-stt/index.mdx @@ -0,0 +1,55 @@ +--- +slug: "/reference/python/agents/livewire/inference-stt" +title: "InferenceSTT" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.livewire.InferenceSTT" + parent: "signalwire.livewire" + module: "agents.livewire" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py" +--- +# `InferenceSTT` + +Stub for livekit inference.STT. + +## Signature + +```python +class InferenceSTT +``` + +## Properties + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(model: str = '', **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 739. + +## Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 736. diff --git a/fern/products/sdk-reference/python/agents/livewire/inference-tts/index.mdx b/fern/products/sdk-reference/python/agents/livewire/inference-tts/index.mdx new file mode 100644 index 0000000000..096cea8ed6 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/livewire/inference-tts/index.mdx @@ -0,0 +1,55 @@ +--- +slug: "/reference/python/agents/livewire/inference-tts" +title: "InferenceTTS" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.livewire.InferenceTTS" + parent: "signalwire.livewire" + module: "agents.livewire" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py" +--- +# `InferenceTTS` + +Stub for livekit inference.TTS. + +## Signature + +```python +class InferenceTTS +``` + +## Properties + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(model: str = '', **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 758. + +## Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 755. diff --git a/fern/products/sdk-reference/python/agents/livewire/job-context/index.mdx b/fern/products/sdk-reference/python/agents/livewire/job-context/index.mdx new file mode 100644 index 0000000000..cedb5dcf75 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/livewire/job-context/index.mdx @@ -0,0 +1,96 @@ +--- +slug: "/reference/python/agents/livewire/job-context" +title: "JobContext" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.livewire.JobContext" + parent: "signalwire.livewire" + module: "agents.livewire" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py" +--- +# `JobContext` + +Mirrors a livekit JobContext -- provides room and connection info. + +## Signature + +```python +class JobContext +``` + +## Properties + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__() +``` + +#### Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 656. + +*** + +### connect + +Noop -- SignalWire agents connect automatically when the platform +invokes the SWML endpoint. + +**Modifiers:** `async` + +#### Signature + +```python +async connect() +``` + +#### Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 661. + +*** + +### wait\_for\_participant + +Noop -- SignalWire handles participant management automatically. + +**Modifiers:** `async` + +#### Signature + +```python +async wait_for_participant(*, identity = None) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 670. + +## Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 653. diff --git a/fern/products/sdk-reference/python/agents/livewire/job-process/index.mdx b/fern/products/sdk-reference/python/agents/livewire/job-process/index.mdx new file mode 100644 index 0000000000..000fa2f2a8 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/livewire/job-process/index.mdx @@ -0,0 +1,49 @@ +--- +slug: "/reference/python/agents/livewire/job-process" +title: "JobProcess" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.livewire.JobProcess" + parent: "signalwire.livewire" + module: "agents.livewire" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py" +--- +# `JobProcess` + +Mirrors a livekit JobProcess -- used for prewarm/setup. + +## Signature + +```python +class JobProcess +``` + +## Properties + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__() +``` + +#### Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 649. + +## Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 646. diff --git a/fern/products/sdk-reference/python/agents/livewire/plugins/cartesia-tts/index.mdx b/fern/products/sdk-reference/python/agents/livewire/plugins/cartesia-tts/index.mdx new file mode 100644 index 0000000000..2ac58aed9d --- /dev/null +++ b/fern/products/sdk-reference/python/agents/livewire/plugins/cartesia-tts/index.mdx @@ -0,0 +1,49 @@ +--- +slug: "/reference/python/agents/livewire/plugins/cartesia-tts" +title: "CartesiaTTS" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.livewire.plugins.CartesiaTTS" + parent: "signalwire.livewire.plugins" + module: "agents.livewire.plugins" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/plugins.py" +--- +# `CartesiaTTS` + +Stub for livekit Cartesia TTS plugin. + +## Signature + +```python +class CartesiaTTS +``` + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(**kwargs: Any = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/livewire/plugins.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/plugins.py) + +Line 85. + +## Source + +[`signalwire/signalwire/livewire/plugins.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/plugins.py) + +Line 82. diff --git a/fern/products/sdk-reference/python/agents/livewire/plugins/deepgram-stt/index.mdx b/fern/products/sdk-reference/python/agents/livewire/plugins/deepgram-stt/index.mdx new file mode 100644 index 0000000000..cf717af3e6 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/livewire/plugins/deepgram-stt/index.mdx @@ -0,0 +1,49 @@ +--- +slug: "/reference/python/agents/livewire/plugins/deepgram-stt" +title: "DeepgramSTT" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.livewire.plugins.DeepgramSTT" + parent: "signalwire.livewire.plugins" + module: "agents.livewire.plugins" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/plugins.py" +--- +# `DeepgramSTT` + +Stub for livekit Deepgram STT plugin. + +## Signature + +```python +class DeepgramSTT +``` + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(**kwargs: Any = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/livewire/plugins.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/plugins.py) + +Line 52. + +## Source + +[`signalwire/signalwire/livewire/plugins.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/plugins.py) + +Line 49. diff --git a/fern/products/sdk-reference/python/agents/livewire/plugins/eleven-labs-tts/index.mdx b/fern/products/sdk-reference/python/agents/livewire/plugins/eleven-labs-tts/index.mdx new file mode 100644 index 0000000000..55f86ffafe --- /dev/null +++ b/fern/products/sdk-reference/python/agents/livewire/plugins/eleven-labs-tts/index.mdx @@ -0,0 +1,49 @@ +--- +slug: "/reference/python/agents/livewire/plugins/eleven-labs-tts" +title: "ElevenLabsTTS" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.livewire.plugins.ElevenLabsTTS" + parent: "signalwire.livewire.plugins" + module: "agents.livewire.plugins" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/plugins.py" +--- +# `ElevenLabsTTS` + +Stub for livekit ElevenLabs TTS plugin. + +## Signature + +```python +class ElevenLabsTTS +``` + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(**kwargs: Any = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/livewire/plugins.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/plugins.py) + +Line 97. + +## Source + +[`signalwire/signalwire/livewire/plugins.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/plugins.py) + +Line 94. diff --git a/fern/products/sdk-reference/python/agents/livewire/plugins/index.mdx b/fern/products/sdk-reference/python/agents/livewire/plugins/index.mdx new file mode 100644 index 0000000000..f32fc1e47d --- /dev/null +++ b/fern/products/sdk-reference/python/agents/livewire/plugins/index.mdx @@ -0,0 +1,56 @@ +--- +slug: "/reference/python/agents/livewire/plugins" +title: "plugins" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.livewire.plugins" + parent: "signalwire.livewire" + module: "agents.livewire" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/plugins.py" +--- +# `plugins` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module plugins +``` + +## Classes + + + + Stub for livekit Cartesia TTS plugin. + + + + Stub for livekit Deepgram STT plugin. + + + + Stub for livekit ElevenLabs TTS plugin. + + + + Stub for livekit OpenAI LLM plugin. + + + + Stub for livekit Silero VAD plugin. + + + +## Source + +[`signalwire/signalwire/livewire/plugins.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/plugins.py) diff --git a/fern/products/sdk-reference/python/agents/livewire/plugins/open-aillm/index.mdx b/fern/products/sdk-reference/python/agents/livewire/plugins/open-aillm/index.mdx new file mode 100644 index 0000000000..2fbb96bdf3 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/livewire/plugins/open-aillm/index.mdx @@ -0,0 +1,53 @@ +--- +slug: "/reference/python/agents/livewire/plugins/open-aillm" +title: "OpenAILLM" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.livewire.plugins.OpenAILLM" + parent: "signalwire.livewire.plugins" + module: "agents.livewire.plugins" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/plugins.py" +--- +# `OpenAILLM` + +Stub for livekit OpenAI LLM plugin. + +## Signature + +```python +class OpenAILLM +``` + +## Properties + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(**kwargs: Any = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/livewire/plugins.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/plugins.py) + +Line 68. + +## Source + +[`signalwire/signalwire/livewire/plugins.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/plugins.py) + +Line 65. diff --git a/fern/products/sdk-reference/python/agents/livewire/plugins/silero-vad/index.mdx b/fern/products/sdk-reference/python/agents/livewire/plugins/silero-vad/index.mdx new file mode 100644 index 0000000000..76a7ae4d32 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/livewire/plugins/silero-vad/index.mdx @@ -0,0 +1,70 @@ +--- +slug: "/reference/python/agents/livewire/plugins/silero-vad" +title: "SileroVAD" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.livewire.plugins.SileroVAD" + parent: "signalwire.livewire.plugins" + module: "agents.livewire.plugins" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/plugins.py" +--- +# `SileroVAD` + +Stub for livekit Silero VAD plugin. + +## Signature + +```python +class SileroVAD +``` + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(**kwargs: Any = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/livewire/plugins.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/plugins.py) + +Line 113. + +*** + +### load + +Mirrors the SileroVAD.load() factory. + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +load() +``` + +#### Source + +[`signalwire/signalwire/livewire/plugins.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/plugins.py) + +Line 121. + +## Source + +[`signalwire/signalwire/livewire/plugins.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/plugins.py) + +Line 110. diff --git a/fern/products/sdk-reference/python/agents/livewire/room/index.mdx b/fern/products/sdk-reference/python/agents/livewire/room/index.mdx new file mode 100644 index 0000000000..80df93e191 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/livewire/room/index.mdx @@ -0,0 +1,33 @@ +--- +slug: "/reference/python/agents/livewire/room" +title: "Room" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.livewire.Room" + parent: "signalwire.livewire" + module: "agents.livewire" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py" +--- +# `Room` + +Stub -- SignalWire doesn't use the LiveKit room abstraction. + +## Signature + +```python +class Room +``` + +## Properties + + + +## Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 641. diff --git a/fern/products/sdk-reference/python/agents/livewire/run-context/index.mdx b/fern/products/sdk-reference/python/agents/livewire/run-context/index.mdx new file mode 100644 index 0000000000..e76b367360 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/livewire/run-context/index.mdx @@ -0,0 +1,63 @@ +--- +slug: "/reference/python/agents/livewire/run-context" +title: "RunContext" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.livewire.RunContext" + parent: "signalwire.livewire" + module: "agents.livewire" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py" +--- +# `RunContext` + +Mirrors livekit RunContext -- available inside tool handlers. + +## Signature + +```python +class RunContext +``` + +## Properties + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(session = None, *, speech_handle = None, function_call = None) +``` + +#### Parameters + + + + + + + +#### Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 255. + +## Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 252. diff --git a/fern/products/sdk-reference/python/agents/livewire/stop-response/index.mdx b/fern/products/sdk-reference/python/agents/livewire/stop-response/index.mdx new file mode 100644 index 0000000000..7bf5f074a0 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/livewire/stop-response/index.mdx @@ -0,0 +1,33 @@ +--- +slug: "/reference/python/agents/livewire/stop-response" +title: "StopResponse" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.livewire.StopResponse" + parent: "signalwire.livewire" + module: "agents.livewire" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py" +--- +# `StopResponse` + +Signals that a tool should not trigger another LLM reply. + +## Signature + +```python +class StopResponse(Exception) +``` + +## Inheritance + +**Extends:** `Exception` + +## Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 140. diff --git a/fern/products/sdk-reference/python/agents/livewire/tool-error/index.mdx b/fern/products/sdk-reference/python/agents/livewire/tool-error/index.mdx new file mode 100644 index 0000000000..3fb93983f7 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/livewire/tool-error/index.mdx @@ -0,0 +1,33 @@ +--- +slug: "/reference/python/agents/livewire/tool-error" +title: "ToolError" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.livewire.ToolError" + parent: "signalwire.livewire" + module: "agents.livewire" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py" +--- +# `ToolError` + +Signals a tool execution error. + +## Signature + +```python +class ToolError(Exception) +``` + +## Inheritance + +**Extends:** `Exception` + +## Source + +[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) + +Line 145. diff --git a/fern/products/sdk-reference/python/agents/mcp-gateway/gateway-service/index.mdx b/fern/products/sdk-reference/python/agents/mcp-gateway/gateway-service/index.mdx new file mode 100644 index 0000000000..64bdb887b3 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/mcp-gateway/gateway-service/index.mdx @@ -0,0 +1,54 @@ +--- +slug: "/reference/python/agents/mcp-gateway/gateway-service" +title: "gateway_service" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.mcp_gateway.gateway_service" + parent: "signalwire.mcp_gateway" + module: "agents.mcp_gateway" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/gateway_service.py" +--- +# `gateway_service` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module gateway_service +``` + +## Properties + + + +## Functions + +### main + +Main entry point + +#### Signature + +```python +main() +``` + +#### Source + +[`signalwire/signalwire/mcp_gateway/gateway_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/gateway_service.py) + +Line 557. + +## Source + +[`signalwire/signalwire/mcp_gateway/gateway_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/gateway_service.py) diff --git a/fern/products/sdk-reference/python/agents/mcp-gateway/index.mdx b/fern/products/sdk-reference/python/agents/mcp-gateway/index.mdx new file mode 100644 index 0000000000..cd76b310d7 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/mcp-gateway/index.mdx @@ -0,0 +1,52 @@ +--- +slug: "/reference/python/agents/mcp-gateway" +title: "mcp_gateway" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.mcp_gateway" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/__init__.py" +--- +# `mcp_gateway` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module mcp_gateway +``` + +## Properties + + + +## Modules + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + +## Source + +[`signalwire/signalwire/mcp_gateway/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/__init__.py) diff --git a/fern/products/sdk-reference/python/agents/mcp-gateway/mcp-manager/index.mdx b/fern/products/sdk-reference/python/agents/mcp-gateway/mcp-manager/index.mdx new file mode 100644 index 0000000000..9c0cb4528f --- /dev/null +++ b/fern/products/sdk-reference/python/agents/mcp-gateway/mcp-manager/index.mdx @@ -0,0 +1,52 @@ +--- +slug: "/reference/python/agents/mcp-gateway/mcp-manager" +title: "mcp_manager" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.mcp_gateway.mcp_manager" + parent: "signalwire.mcp_gateway" + module: "agents.mcp_gateway" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py" +--- +# `mcp_manager` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module mcp_manager +``` + +## Properties + + + +## Classes + + + + Client for communicating with a single MCP server process + + + + Manages multiple MCP services and their lifecycles + + + + Configuration for an MCP service + + + +## Source + +[`signalwire/signalwire/mcp_gateway/mcp_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py) diff --git a/fern/products/sdk-reference/python/agents/mcp-gateway/mcp-manager/mcp-client/index.mdx b/fern/products/sdk-reference/python/agents/mcp-gateway/mcp-manager/mcp-client/index.mdx new file mode 100644 index 0000000000..371c1bae0c --- /dev/null +++ b/fern/products/sdk-reference/python/agents/mcp-gateway/mcp-manager/mcp-client/index.mdx @@ -0,0 +1,191 @@ +--- +slug: "/reference/python/agents/mcp-gateway/mcp-manager/mcp-client" +title: "MCPClient" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.mcp_gateway.mcp_manager.MCPClient" + parent: "signalwire.mcp_gateway.mcp_manager" + module: "agents.mcp_gateway.mcp_manager" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py" +--- +# `MCPClient` + +Client for communicating with a single MCP server process + +## Signature + +```python +class MCPClient +``` + +## Properties + + + + + + + + + + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(service: MCPService, sandbox_base_dir: str = './sandbox') +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/mcp_gateway/mcp_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py) + +Line 62. + +*** + +### call\_method + +Call an RPC method and wait for response + +#### Signature + +```python +call_method(method: str, params: Dict[str, Any]) -> Any +``` + +#### Parameters + + + + + +#### Returns + +`Any` + +#### Source + +[`signalwire/signalwire/mcp_gateway/mcp_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py) + +Line 282. + +*** + +### call\_tool + +Call a tool on the MCP server + +#### Signature + +```python +call_tool(tool_name: str, arguments: Dict[str, Any]) -> Dict[str, Any] +``` + +#### Parameters + + + + + +#### Returns + +`Dict[str, Any]` + +#### Source + +[`signalwire/signalwire/mcp_gateway/mcp_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py) + +Line 275. + +*** + +### get\_tools + +Get the list of available tools + +#### Signature + +```python +get_tools() -> List[Dict[str, Any]] +``` + +#### Returns + +`List[Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/mcp_gateway/mcp_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py) + +Line 321. + +*** + +### start + +Start the MCP server process and initialize connection + +#### Signature + +```python +start() -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/mcp_gateway/mcp_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py) + +Line 163. + +*** + +### stop + +Stop the MCP server process and clean up sandbox + +#### Signature + +```python +stop() +``` + +#### Source + +[`signalwire/signalwire/mcp_gateway/mcp_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py) + +Line 213. + +## Source + +[`signalwire/signalwire/mcp_gateway/mcp_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py) + +Line 59. diff --git a/fern/products/sdk-reference/python/agents/mcp-gateway/mcp-manager/mcp-manager/index.mdx b/fern/products/sdk-reference/python/agents/mcp-gateway/mcp-manager/mcp-manager/index.mdx new file mode 100644 index 0000000000..b8cef2ed26 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/mcp-gateway/mcp-manager/mcp-manager/index.mdx @@ -0,0 +1,199 @@ +--- +slug: "/reference/python/agents/mcp-gateway/mcp-manager/mcp-manager" +title: "MCPManager" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.mcp_gateway.mcp_manager.MCPManager" + parent: "signalwire.mcp_gateway.mcp_manager" + module: "agents.mcp_gateway.mcp_manager" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py" +--- +# `MCPManager` + +Manages multiple MCP services and their lifecycles + +## Signature + +```python +class MCPManager +``` + +## Properties + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(config: Dict[str, Any]) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/mcp_gateway/mcp_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py) + +Line 412. + +*** + +### create\_client + +Create a new MCP client for a service + +#### Signature + +```python +create_client(service_name: str) -> MCPClient +``` + +#### Parameters + + + +#### Returns + +`MCPClient` + +#### Source + +[`signalwire/signalwire/mcp_gateway/mcp_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py) + +Line 465. + +*** + +### get\_service + +Get a service definition by name + +#### Signature + +```python +get_service(service_name: str) -> Optional[MCPService] +``` + +#### Parameters + + + +#### Returns + +`Optional[MCPService]` + +#### Source + +[`signalwire/signalwire/mcp_gateway/mcp_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py) + +Line 448. + +*** + +### get\_service\_tools + +Get tools for a service by starting a temporary instance + +#### Signature + +```python +get_service_tools(service_name: str) -> List[Dict[str, Any]] +``` + +#### Parameters + + + +#### Returns + +`List[Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/mcp_gateway/mcp_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py) + +Line 484. + +*** + +### list\_services + +List all available services + +#### Signature + +```python +list_services() -> Dict[str, Dict[str, Any]] +``` + +#### Returns + +`Dict[str, Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/mcp_gateway/mcp_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py) + +Line 452. + +*** + +### shutdown + +Shutdown all active MCP clients + +#### Signature + +```python +shutdown() +``` + +#### Source + +[`signalwire/signalwire/mcp_gateway/mcp_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py) + +Line 519. + +*** + +### validate\_services + +Validate that all services can be started + +#### Signature + +```python +validate_services() -> Dict[str, bool] +``` + +#### Returns + +`Dict[str, bool]` + +#### Source + +[`signalwire/signalwire/mcp_gateway/mcp_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py) + +Line 499. + +## Source + +[`signalwire/signalwire/mcp_gateway/mcp_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py) + +Line 409. diff --git a/fern/products/sdk-reference/python/agents/mcp-gateway/mcp-manager/mcp-service/index.mdx b/fern/products/sdk-reference/python/agents/mcp-gateway/mcp-manager/mcp-service/index.mdx new file mode 100644 index 0000000000..20c07bc06b --- /dev/null +++ b/fern/products/sdk-reference/python/agents/mcp-gateway/mcp-manager/mcp-service/index.mdx @@ -0,0 +1,113 @@ +--- +slug: "/reference/python/agents/mcp-gateway/mcp-manager/mcp-service" +title: "MCPService" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.mcp_gateway.mcp_manager.MCPService" + parent: "signalwire.mcp_gateway.mcp_manager" + module: "agents.mcp_gateway.mcp_manager" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py" +--- +# `MCPService` + +Configuration for an MCP service + +**Modifiers:** `dataclass` + +**Decorators:** `@dataclass` + +## Signature + +```python +class MCPService +``` + +## Properties + + + + + + + + + + + +## Methods + +### \_\_hash\_\_ + +#### Signature + +```python +__hash__() +``` + +#### Source + +[`signalwire/signalwire/mcp_gateway/mcp_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py) + +Line 55. + +*** + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + name: str, + command: List[str], + description: str, + enabled: bool = True, + sandbox_config: Dict[str, Any] = None +) -> None +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/mcp_gateway/mcp_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py) + +*** + +### \_\_post\_init\_\_ + +#### Signature + +```python +__post_init__() +``` + +#### Source + +[`signalwire/signalwire/mcp_gateway/mcp_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py) + +Line 46. + +## Source + +[`signalwire/signalwire/mcp_gateway/mcp_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py) + +Line 37. diff --git a/fern/products/sdk-reference/python/agents/mcp-gateway/session-manager/index.mdx b/fern/products/sdk-reference/python/agents/mcp-gateway/session-manager/index.mdx new file mode 100644 index 0000000000..e0f0dc7eae --- /dev/null +++ b/fern/products/sdk-reference/python/agents/mcp-gateway/session-manager/index.mdx @@ -0,0 +1,48 @@ +--- +slug: "/reference/python/agents/mcp-gateway/session-manager" +title: "session_manager" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.mcp_gateway.session_manager" + parent: "signalwire.mcp_gateway" + module: "agents.mcp_gateway" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/session_manager.py" +--- +# `session_manager` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module session_manager +``` + +## Properties + + + +## Classes + + + + Represents an active MCP session + + + + Manages MCP server sessions with automatic cleanup + + + +## Source + +[`signalwire/signalwire/mcp_gateway/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/session_manager.py) diff --git a/fern/products/sdk-reference/python/agents/mcp-gateway/session-manager/session-manager/index.mdx b/fern/products/sdk-reference/python/agents/mcp-gateway/session-manager/session-manager/index.mdx new file mode 100644 index 0000000000..4e0c4f292a --- /dev/null +++ b/fern/products/sdk-reference/python/agents/mcp-gateway/session-manager/session-manager/index.mdx @@ -0,0 +1,227 @@ +--- +slug: "/reference/python/agents/mcp-gateway/session-manager/session-manager" +title: "SessionManager" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.mcp_gateway.session_manager.SessionManager" + parent: "signalwire.mcp_gateway.session_manager" + module: "agents.mcp_gateway.session_manager" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/session_manager.py" +--- +# `SessionManager` + +Manages MCP server sessions with automatic cleanup + +## Signature + +```python +class SessionManager +``` + +## Properties + + + + + + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(config: Dict[str, Any], max_total_sessions: int = 500) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/mcp_gateway/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/session_manager.py) + +Line 57. + +*** + +### close\_session + +Close and remove a session + +#### Signature + +```python +close_session(session_id: str) -> bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/mcp_gateway/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/session_manager.py) + +Line 126. + +*** + +### create\_session + +Create and register a new session + +#### Signature + +```python +create_session( + session_id: str, + service_name: str, + process: Any, + timeout: Optional[int] = None, + metadata: Optional[Dict[str, Any]] = None +) -> Session +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`Session` + +#### Source + +[`signalwire/signalwire/mcp_gateway/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/session_manager.py) + +Line 73. + +*** + +### get\_service\_session\_count + +Get number of active sessions for a service + +#### Signature + +```python +get_service_session_count(service_name: str) -> int +``` + +#### Parameters + + + +#### Returns + +`int` + +#### Source + +[`signalwire/signalwire/mcp_gateway/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/session_manager.py) + +Line 168. + +*** + +### get\_session + +Get an active session by ID + +#### Signature + +```python +get_session(session_id: str) -> Optional[Session] +``` + +#### Parameters + + + +#### Returns + +`Optional[Session]` + +#### Source + +[`signalwire/signalwire/mcp_gateway/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/session_manager.py) + +Line 105. + +*** + +### list\_sessions + +List all active sessions with their info + +#### Signature + +```python +list_sessions() -> Dict[str, Dict[str, Any]] +``` + +#### Returns + +`Dict[str, Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/mcp_gateway/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/session_manager.py) + +Line 146. + +*** + +### shutdown + +Shutdown all sessions and cleanup + +#### Signature + +```python +shutdown() +``` + +#### Source + +[`signalwire/signalwire/mcp_gateway/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/session_manager.py) + +Line 203. + +## Source + +[`signalwire/signalwire/mcp_gateway/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/session_manager.py) + +Line 54. diff --git a/fern/products/sdk-reference/python/agents/mcp-gateway/session-manager/session/index.mdx b/fern/products/sdk-reference/python/agents/mcp-gateway/session-manager/session/index.mdx new file mode 100644 index 0000000000..efcadbadbd --- /dev/null +++ b/fern/products/sdk-reference/python/agents/mcp-gateway/session-manager/session/index.mdx @@ -0,0 +1,117 @@ +--- +slug: "/reference/python/agents/mcp-gateway/session-manager/session" +title: "Session" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.mcp_gateway.session_manager.Session" + parent: "signalwire.mcp_gateway.session_manager" + module: "agents.mcp_gateway.session_manager" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/session_manager.py" +--- +# `Session` + +Represents an active MCP session + +**Modifiers:** `dataclass` + +**Decorators:** `@dataclass` + +## Signature + +```python +class Session +``` + +## Properties + + + + + Check if the underlying MCP client is still running + + + + Check if session has expired based on timeout + + + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + session_id: str, + service_name: str, + process: Any, + created_at: datetime = datetime.now(), + last_accessed: datetime = datetime.now(), + timeout: int = 300, + metadata: Dict[str, Any] = dict() +) -> None +``` + +#### Parameters + + + + + + + + + + + + + + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/mcp_gateway/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/session_manager.py) + +*** + +### touch + +Update last accessed time + +#### Signature + +```python +touch() +``` + +#### Source + +[`signalwire/signalwire/mcp_gateway/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/session_manager.py) + +Line 49. + +## Source + +[`signalwire/signalwire/mcp_gateway/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/session_manager.py) + +Line 28. diff --git a/fern/products/sdk-reference/python/agents/mixins/ai-config-mixin/ai-config-mixin/index.mdx b/fern/products/sdk-reference/python/agents/mixins/ai-config-mixin/ai-config-mixin/index.mdx new file mode 100644 index 0000000000..152b64bea0 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/mixins/ai-config-mixin/ai-config-mixin/index.mdx @@ -0,0 +1,963 @@ +--- +slug: "/reference/python/agents/mixins/ai-config-mixin/ai-config-mixin" +title: "AIConfigMixin" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.core.mixins.ai_config_mixin.AIConfigMixin" + parent: "signalwire.core.mixins.ai_config_mixin" + module: "agents.mixins.ai_config_mixin" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py" +--- +# `AIConfigMixin` + +Mixin class containing all AI configuration methods for AgentBase + +## Signature + +```python +class AIConfigMixin +``` + +## Properties + + + +## Methods + +### add\_function\_include + +Add a remote function include to the SWAIG configuration + +#### Signature + +```python +add_function_include( + url: str, + functions: List[str], + meta_data: Optional[Dict[str, Any]] = None +) -> AgentBase +``` + +#### Parameters + + + URL to fetch remote functions from + + + + List of function names to include + + + + Optional metadata to include with the function include + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 502. + +*** + +### add\_hint + +Add a simple string hint to help the AI agent understand certain words better + +#### Signature + +```python +add_hint(hint: str) -> AgentBase +``` + +#### Parameters + + + The hint string to add + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 19. + +*** + +### add\_hints + +Add multiple string hints + +#### Signature + +```python +add_hints(hints: List[str]) -> AgentBase +``` + +#### Parameters + + + List of hint strings + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 33. + +*** + +### add\_internal\_filler + +Add internal fillers for a single internal function and language. + +See set\_internal\_fillers() for the complete list of supported +function\_name values and an explanation of what fillers do. + +> \[!NOTE] +> agent.add\_internal\_filler( +> "change\_context", "en-US", +> \["Let me switch over to that...", "One moment..."] +> ) + +#### Signature + +```python +add_internal_filler( + function_name: str, + language_code: str, + fillers: List[str] +) -> AgentBase +``` + +#### Parameters + + + One of the supported internal function names (see SUPPORTED\_INTERNAL\_FILLER\_NAMES). Common values: 'next\_step', 'change\_context', 'check\_time', 'wait\_for\_user', 'hangup'. Names outside the supported set log a warning and are ignored by the runtime. + + + + Language code (e.g. 'en-US', 'es', 'fr'). + + + + List of filler phrases for this function and language. + + +#### Returns + +`AgentBase` — Self for method chaining. + +#### Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 425. + +*** + +### add\_language + +Add a language configuration to support multilingual conversations + +### Simple voice name + +agent.add\_language("English", "en-US", "en-US-Neural2-F") + +### Explicit parameters + +agent.add\_language("English", "en-US", "josh", engine="elevenlabs", model="eleven\_turbo\_v2\_5") + +### Combined format + +agent.add\_language("English", "en-US", "elevenlabs.josh:eleven\_turbo\_v2\_5") + +### Per-language params (engine-specific knobs) + +agent.add\_language("English", "en-US", "josh", +engine="elevenlabs", +params=\{"stability": 0.5, "similarity\_boost": 0.75\}) + +#### Signature + +```python +add_language( + name: str, + code: str, + voice: str, + speech_fillers: Optional[List[str]] = None, + function_fillers: Optional[List[str]] = None, + engine: Optional[str] = None, + model: Optional[str] = None, + params: Optional[Dict[str, Any]] = None +) -> AgentBase +``` + +#### Parameters + + + Name of the language (e.g., "English", "French") + + + + Language code (e.g., "en-US", "fr-FR") + + + + TTS voice to use. Can be a simple name (e.g., "en-US-Neural2-F") or a combined format "engine.voice:model" (e.g., "elevenlabs.josh:eleven\_turbo\_v2\_5") + + + + Optional list of filler phrases for natural speech + + + + Optional list of filler phrases during function calls + + + + Optional explicit engine name (e.g., "elevenlabs", "rime") + + + + Optional explicit model name (e.g., "eleven\_turbo\_v2\_5", "arcana") + + + + Optional per-language params dict (engine-specific tuning, voice settings, etc.). Emitted as the language object's `params` key in SWML. + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Examples + +```python +# Explicit parameters +agent.add_language("English", "en-US", "josh", engine="elevenlabs", model="eleven_turbo_v2_5") + +# Combined format +agent.add_language("English", "en-US", "elevenlabs.josh:eleven_turbo_v2_5") + +# Per-language params (engine-specific knobs) +agent.add_language("English", "en-US", "josh", + engine="elevenlabs", + params={"stability": 0.5, "similarity_boost": 0.75}) +``` + +#### Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 75. + +*** + +### add\_mcp\_server + +Add an external MCP server for tool discovery and invocation. + +Tools are discovered via the MCP protocol at session start and +registered as SWAIG functions. Resources are optionally fetched +into global\_data. + +#### Signature + +```python +add_mcp_server( + url: str, + headers: Optional[Dict[str, str]] = None, + resources: bool = False, + resource_vars: Optional[Dict[str, str]] = None +) -> AgentBase +``` + +#### Parameters + + + MCP server HTTP endpoint URL + + + + Optional HTTP headers (e.g. \{"Authorization": "Bearer sk-xxx"\}) + + + + Whether to fetch resources into global\_data + + + + Variables for URI template substitution (e.g. \{"caller\_id": "$\{caller\_id\_number\}"\}) + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 546. + +*** + +### add\_pattern\_hint + +Add a complex hint with pattern matching + +#### Signature + +```python +add_pattern_hint( + hint: str, + pattern: str, + replace: str, + ignore_case: bool = False +) -> AgentBase +``` + +#### Parameters + + + The hint to match + + + + Regular expression pattern + + + + Text to replace the hint with + + + + Whether to ignore case when matching + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 49. + +*** + +### add\_pronunciation + +Add a pronunciation rule to help the AI speak certain words correctly + +#### Signature + +```python +add_pronunciation( + replace: str, + with_text: str, + ignore_case: bool = False +) -> AgentBase +``` + +#### Parameters + + + The expression to replace + + + + The phonetic spelling to use instead + + + + Whether to ignore case when matching + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 217. + +*** + +### enable\_debug\_events + +Enable debug event webhook for this agent. + +When enabled, the AI module will POST real-time debug events to a +/debug\_events endpoint on this agent during calls. Events are +automatically logged via the agent's structured logger, and can +optionally be handled with a custom callback via on\_debug\_event(). + +> \[!NOTE] +> agent = AgentBase("my\_agent") +> agent.enable\_debug\_events(level=1) +> +> @agent.on\_debug\_event +> def handle\_debug(event\_type, data): +> if event\_type == "llm\_error": +> alert\_ops\_team(data) + +#### Signature + +```python +enable_debug_events(level: int = 1) -> AgentBase +``` + +#### Parameters + + + Debug event verbosity level. 1 = high-level events (barge, errors, session start/end, step changes) 2+ = adds high-volume events (every LLM request/response, conversation\_add) + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Examples + +```python +@agent.on_debug_event +def handle_debug(event_type, data): + if event_type == "llm_error": + alert_ops_team(data) +``` + +#### Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 472. + +*** + +### enable\_mcp\_server + +Expose this agent's @tool functions as an MCP server endpoint. + +Adds a /mcp route that speaks JSON-RPC 2.0 (MCP protocol). +Other MCP clients (Claude Desktop, other agents, etc.) can +connect and use the same tools. The agent's SWML output also +references this endpoint for native MCP tool discovery. + +#### Signature + +```python +enable_mcp_server() -> AgentBase +``` + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 574. + +*** + +### get\_language\_params + +Read the per-language `params` dict for a previously-added language. + +#### Signature + +```python +get_language_params(code: str) -> Optional[Dict[str, Any]] +``` + +#### Parameters + + + Language code as previously passed to `add_language`. + + +#### Returns + +`Optional[Dict[str, Any]]` — The params dict if set, `None` otherwise (including when the code is unknown). + +#### Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 188. + +*** + +### set\_function\_includes + +Set the complete list of function includes + +#### Signature + +```python +set_function_includes(includes: List[Dict[str, Any]]) -> AgentBase +``` + +#### Parameters + + + List of include objects, each with url and functions properties + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 525. + +*** + +### set\_global\_data + +Merge data into the global data available to the AI throughout the conversation. + +This merges (not replaces) so that skills and other callers can each +contribute keys without clobbering each other. + +#### Signature + +```python +set_global_data(data: Dict[str, Any]) -> AgentBase +``` + +#### Parameters + + + Dictionary of global data to merge + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 286. + +*** + +### set\_internal\_fillers + +Set internal fillers for native SWAIG functions. + +Internal fillers are short phrases the AI agent speaks (via TTS) while +an internal/native function is running, so the caller doesn't hear +dead air during transitions or background work. + +Supported function names (matches the SWAIGInternalFiller schema): + +``` +hangup — when the agent is hanging up +check_time — when checking the time +wait_for_user — when waiting for user input +wait_seconds — during deliberate pauses +adjust_response_latency — when adjusting response timing +next_step — transitioning between steps in prompt.contexts +change_context — switching between contexts in prompt.contexts +get_visual_input — processing visual input (enable_vision=True) +get_ideal_strategy — thinking (enable_thinking=True) +``` + +Notably NOT supported: change\_step, gather\_submit, or arbitrary +user-defined SWAIG function names. The runtime only honors fillers +for the names listed above; everything else is silently ignored at +the SWML level. This method warns at registration time if you pass +an unknown name so you catch the typo early. + +Without internal fillers, callers hear dead air during context +switches and other internal transitions — set this on every agent +that uses contexts/steps with audio. + +> \[!NOTE] +> agent.set\_internal\_fillers(\{ +> "next\_step": \{ +> "en-US": \["Moving to the next step...", "Great, let's continue..."], +> "es": \["Pasando al siguiente paso...", "Excelente, continuemos..."] +> \}, +> "change\_context": \{ +> "en-US": \["Let me switch modes...", "One moment..."] +> \}, +> "check\_time": \{ +> "en-US": \["Let me check the time...", "Getting the current time..."] +> \} +> \}) + +#### Signature + +```python +set_internal_fillers( + internal_fillers: Dict[str, Dict[str, List[str]]] +) -> AgentBase +``` + +#### Parameters + + + Dictionary mapping function names to language-specific filler phrases. Format: \{"function\_name": \{"language\_code": \["phrase1", "phrase2"]\}\} + + +#### Returns + +`AgentBase` — Self for method chaining. + +#### Examples + +```python +hangup — when the agent is hanging up +check_time — when checking the time +wait_for_user — when waiting for user input +wait_seconds — during deliberate pauses +adjust_response_latency — when adjusting response timing +next_step — transitioning between steps in prompt.contexts +change_context — switching between contexts in prompt.contexts +get_visual_input — processing visual input (enable_vision=True) +get_ideal_strategy — thinking (enable_thinking=True) +``` + +#### Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 353. + +*** + +### set\_language\_params + +Set (or replace) the per-language `params` dict on an already-added +language. Useful when language entries are built up via add\_language() +first and engine-specific tuning is added later (e.g., from a config +loader). Returns self for chaining. + +#### Signature + +```python +set_language_params(code: str, params: Dict[str, Any]) -> AgentBase +``` + +#### Parameters + + + Language code as previously passed to `add_language` (e.g. `"en-US"`). + + + + Engine-specific params dict to attach. Empty dict removes the key. + + +#### Returns + +`AgentBase` — Self for method chaining. No-op if the code isn't found. + +#### Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 165. + +*** + +### set\_languages + +Set all language configurations at once + +#### Signature + +```python +set_languages(languages: List[Dict[str, Any]]) -> AgentBase +``` + +#### Parameters + + + List of language configuration dictionaries + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 203. + +*** + +### set\_native\_functions + +Set the list of native functions to enable + +#### Signature + +```python +set_native_functions(function_names: List[str]) -> AgentBase +``` + +#### Parameters + + + List of native function names + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 323. + +*** + +### set\_param + +Set a single AI parameter + +#### Signature + +```python +set_param(key: str, value: Any) -> AgentBase +``` + +#### Parameters + + + Parameter name + + + + Parameter value + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 257. + +*** + +### set\_params + +Set multiple AI parameters at once + +#### Signature + +```python +set_params(params: Dict[str, Any]) -> AgentBase +``` + +#### Parameters + + + Dictionary of parameter name/value pairs + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 272. + +*** + +### set\_post\_prompt\_llm\_params + +Set LLM parameters for the post-prompt. + +Accepts any parameters which will be passed through to the SignalWire server. +The server will validate and apply parameters based on the target model's capabilities. + +> \[!NOTE] +> model: The AI model to use (gpt-4o-mini, gpt-4.1-mini, gpt-4.1-nano, nova-micro, nova-lite, qwen3-235b-A22b-instruct) +> temperature: Randomness setting. Lower values make output more deterministic. +> top\_p: Alternative to temperature. Controls nucleus sampling. +> presence\_penalty: Topic diversity. Positive values encourage new topics. +> frequency\_penalty: Repetition control. Positive values reduce repetition. + +Note: Parameters are model-specific and will be validated by the server. +Invalid parameters for the selected model will be handled/ignored by the server. +barge\_confidence is not applicable to post-prompt. + +> \[!NOTE] +> agent.set\_post\_prompt\_llm\_params( +> model="gpt-4o-mini", +> temperature=0.5, # More deterministic for post-prompt +> top\_p=0.9 +> ) + +#### Signature + +```python +set_post_prompt_llm_params(**params = {}) -> AgentBase +``` + +#### Parameters + + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 624. + +*** + +### set\_prompt\_llm\_params + +Set LLM parameters for the main prompt. + +Accepts any parameters which will be passed through to the SignalWire server. +The server will validate and apply parameters based on the target model's capabilities. + +> \[!NOTE] +> model: The AI model to use (gpt-4o-mini, gpt-4.1-mini, gpt-4.1-nano, nova-micro, nova-lite, qwen3-235b-A22b-instruct) +> temperature: Randomness setting. Lower values make output more deterministic. +> top\_p: Alternative to temperature. Controls nucleus sampling. +> barge\_confidence: ASR confidence to interrupt. Higher values make it harder to interrupt. +> presence\_penalty: Topic diversity. Positive values encourage new topics. +> frequency\_penalty: Repetition control. Positive values reduce repetition. + +Note: Parameters are model-specific and will be validated by the server. +Invalid parameters for the selected model will be handled/ignored by the server. + +> \[!NOTE] +> agent.set\_prompt\_llm\_params( +> model="nova-micro", # Using Amazon's nova-micro model +> temperature=0.7, +> top\_p=0.9, +> barge\_confidence=0.6 +> ) + +#### Signature + +```python +set_prompt_llm_params(**params = {}) -> AgentBase +``` + +#### Parameters + + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 589. + +*** + +### set\_pronunciations + +Set all pronunciation rules at once + +#### Signature + +```python +set_pronunciations(pronunciations: List[Dict[str, Any]]) -> AgentBase +``` + +#### Parameters + + + List of pronunciation rule dictionaries + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 243. + +*** + +### update\_global\_data + +Update the global data with new values + +#### Signature + +```python +update_global_data(data: Dict[str, Any]) -> AgentBase +``` + +#### Parameters + + + Dictionary of global data to update + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 306. + +## Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 14. diff --git a/fern/products/sdk-reference/python/agents/mixins/ai-config-mixin/index.mdx b/fern/products/sdk-reference/python/agents/mixins/ai-config-mixin/index.mdx new file mode 100644 index 0000000000..7b4f021289 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/mixins/ai-config-mixin/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/agents/mixins/ai-config-mixin" +title: "ai_config_mixin" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.mixins.ai_config_mixin" + parent: "signalwire.core.mixins" + module: "agents.mixins" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py" +--- +# `ai_config_mixin` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module ai_config_mixin +``` + +## Classes + + + + Mixin class containing all AI configuration methods for AgentBase + + + +## Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) diff --git a/fern/products/sdk-reference/python/agents/mixins/auth-mixin/auth-mixin/index.mdx b/fern/products/sdk-reference/python/agents/mixins/auth-mixin/auth-mixin/index.mdx new file mode 100644 index 0000000000..8934767413 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/mixins/auth-mixin/auth-mixin/index.mdx @@ -0,0 +1,93 @@ +--- +slug: "/reference/python/agents/mixins/auth-mixin/auth-mixin" +title: "AuthMixin" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.core.mixins.auth_mixin.AuthMixin" + parent: "signalwire.core.mixins.auth_mixin" + module: "agents.mixins.auth_mixin" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/auth_mixin.py" +--- +# `AuthMixin` + +Mixin class containing all authentication-related methods for AgentBase + +## Signature + +```python +class AuthMixin +``` + +## Methods + +### get\_basic\_auth\_credentials + +Get the basic auth credentials + +#### Signature + +```python +get_basic_auth_credentials( + include_source: bool = False +) -> Union[Tuple[str, str], Tuple[str, str, str]] +``` + +#### Parameters + + + Whether to include the source of the credentials + + +#### Returns + +`Union[Tuple[str, str], Tuple[str, str, str]]` — If include\_source is False: (username, password) tuple If include\_source is True: (username, password, source) tuple, where source is one of: "provided", "environment", or "generated" + +#### Source + +[`signalwire/signalwire/core/mixins/auth_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/auth_mixin.py) + +Line 42. + +*** + +### validate\_basic\_auth + +Validate basic auth credentials + +This method can be overridden by subclasses. + +#### Signature + +```python +validate_basic_auth(username: str, password: str) -> bool +``` + +#### Parameters + + + Username from request + + + + Password from request + + +#### Returns + +`bool` — True if valid, False otherwise + +#### Source + +[`signalwire/signalwire/core/mixins/auth_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/auth_mixin.py) + +Line 24. + +## Source + +[`signalwire/signalwire/core/mixins/auth_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/auth_mixin.py) + +Line 19. diff --git a/fern/products/sdk-reference/python/agents/mixins/auth-mixin/index.mdx b/fern/products/sdk-reference/python/agents/mixins/auth-mixin/index.mdx new file mode 100644 index 0000000000..3f3c00d921 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/mixins/auth-mixin/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/agents/mixins/auth-mixin" +title: "auth_mixin" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.mixins.auth_mixin" + parent: "signalwire.core.mixins" + module: "agents.mixins" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/auth_mixin.py" +--- +# `auth_mixin` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module auth_mixin +``` + +## Classes + + + + Mixin class containing all authentication-related methods for AgentBase + + + +## Source + +[`signalwire/signalwire/core/mixins/auth_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/auth_mixin.py) diff --git a/fern/products/sdk-reference/python/agents/mixins/index.mdx b/fern/products/sdk-reference/python/agents/mixins/index.mdx new file mode 100644 index 0000000000..89b3f1d1bb --- /dev/null +++ b/fern/products/sdk-reference/python/agents/mixins/index.mdx @@ -0,0 +1,76 @@ +--- +slug: "/reference/python/agents/mixins" +title: "mixins" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.mixins" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/__init__.py" +--- +# `mixins` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module mixins +``` + +## Properties + + + +## Modules + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + +## Source + +[`signalwire/signalwire/core/mixins/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/__init__.py) diff --git a/fern/products/sdk-reference/python/agents/mixins/mcp-server-mixin/index.mdx b/fern/products/sdk-reference/python/agents/mixins/mcp-server-mixin/index.mdx new file mode 100644 index 0000000000..bacc4efc89 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/mixins/mcp-server-mixin/index.mdx @@ -0,0 +1,44 @@ +--- +slug: "/reference/python/agents/mixins/mcp-server-mixin" +title: "mcp_server_mixin" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.mixins.mcp_server_mixin" + parent: "signalwire.core.mixins" + module: "agents.mixins" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/mcp_server_mixin.py" +--- +# `mcp_server_mixin` + +Copyright (c) 2025 SignalWire + +MCP Server Mixin for AgentBase + +Exposes @tool decorated functions as an MCP server endpoint at /mcp. +Handles the MCP JSON-RPC 2.0 protocol: initialize, tools/list, tools/call. + +## Signature + +```python +module mcp_server_mixin +``` + +## Properties + + + +## Classes + + + + Mixin that adds MCP server endpoint to an agent + + + +## Source + +[`signalwire/signalwire/core/mixins/mcp_server_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/mcp_server_mixin.py) diff --git a/fern/products/sdk-reference/python/agents/mixins/mcp-server-mixin/mcp-server-mixin/index.mdx b/fern/products/sdk-reference/python/agents/mixins/mcp-server-mixin/mcp-server-mixin/index.mdx new file mode 100644 index 0000000000..cb86faf5bd --- /dev/null +++ b/fern/products/sdk-reference/python/agents/mixins/mcp-server-mixin/mcp-server-mixin/index.mdx @@ -0,0 +1,29 @@ +--- +slug: "/reference/python/agents/mixins/mcp-server-mixin/mcp-server-mixin" +title: "MCPServerMixin" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.core.mixins.mcp_server_mixin.MCPServerMixin" + parent: "signalwire.core.mixins.mcp_server_mixin" + module: "agents.mixins.mcp_server_mixin" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/mcp_server_mixin.py" +--- +# `MCPServerMixin` + +Mixin that adds MCP server endpoint to an agent + +## Signature + +```python +class MCPServerMixin +``` + +## Source + +[`signalwire/signalwire/core/mixins/mcp_server_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/mcp_server_mixin.py) + +Line 18. diff --git a/fern/products/sdk-reference/python/agents/mixins/prompt-mixin/index.mdx b/fern/products/sdk-reference/python/agents/mixins/prompt-mixin/index.mdx new file mode 100644 index 0000000000..3eb0c08b6e --- /dev/null +++ b/fern/products/sdk-reference/python/agents/mixins/prompt-mixin/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/agents/mixins/prompt-mixin" +title: "prompt_mixin" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.mixins.prompt_mixin" + parent: "signalwire.core.mixins" + module: "agents.mixins" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/prompt_mixin.py" +--- +# `prompt_mixin` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module prompt_mixin +``` + +## Classes + + + + Mixin class containing all prompt-related methods for AgentBase + + + +## Source + +[`signalwire/signalwire/core/mixins/prompt_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/prompt_mixin.py) diff --git a/fern/products/sdk-reference/python/agents/mixins/prompt-mixin/prompt-mixin/index.mdx b/fern/products/sdk-reference/python/agents/mixins/prompt-mixin/prompt-mixin/index.mdx new file mode 100644 index 0000000000..17a1cb7afa --- /dev/null +++ b/fern/products/sdk-reference/python/agents/mixins/prompt-mixin/prompt-mixin/index.mdx @@ -0,0 +1,414 @@ +--- +slug: "/reference/python/agents/mixins/prompt-mixin/prompt-mixin" +title: "PromptMixin" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.core.mixins.prompt_mixin.PromptMixin" + parent: "signalwire.core.mixins.prompt_mixin" + module: "agents.mixins.prompt_mixin" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/prompt_mixin.py" +--- +# `PromptMixin` + +Mixin class containing all prompt-related methods for AgentBase + +## Signature + +```python +class PromptMixin +``` + +## Properties + + + Get the ContextBuilder for this agent + + +## Methods + +### define\_contexts + +Define contexts and steps for this agent (alternative to POM/prompt) + +> \[!NOTE] +> Contexts can coexist with traditional prompts. The restriction is only +> that you can't mix POM sections with raw text in the main prompt. + +#### Signature + +```python +define_contexts(contexts = None) -> Union[AgentBase, ContextBuilder] +``` + +#### Parameters + + + Optional context configuration (dict or ContextBuilder) + + +#### Returns + +`Union[AgentBase, ContextBuilder]` — ContextBuilder for method chaining if no contexts provided + +#### Source + +[`signalwire/signalwire/core/mixins/prompt_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/prompt_mixin.py) + +Line 121. + +*** + +### get\_post\_prompt + +Get the post-prompt for the agent + +#### Signature + +```python +get_post_prompt() -> Optional[str] +``` + +#### Returns + +`Optional[str]` — Post-prompt text or None if not set + +#### Source + +[`signalwire/signalwire/core/mixins/prompt_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/prompt_mixin.py) + +Line 374. + +*** + +### get\_prompt + +Get the prompt for the agent + +#### Signature + +```python +get_prompt() -> Union[str, List[Dict[str, Any]]] +``` + +#### Returns + +`Union[str, List[Dict[str, Any]]]` — Either a string prompt or a POM object as list of dicts + +#### Source + +[`signalwire/signalwire/core/mixins/prompt_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/prompt_mixin.py) + +Line 327. + +*** + +### prompt\_add\_section + +Add a section to the prompt + +#### Signature + +```python +prompt_add_section( + title: str, + body: str = '', + bullets: Optional[List[str]] = None, + numbered: bool = False, + numbered_bullets: bool = False, + subsections: Optional[List[Dict[str, Any]]] = None +) -> AgentBase +``` + +#### Parameters + + + Section title + + + + Optional section body text + + + + Optional list of bullet points + + + + Whether this section should be numbered + + + + Whether bullets should be numbered + + + + Optional list of subsection objects + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/prompt_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/prompt_mixin.py) + +Line 228. + +*** + +### prompt\_add\_subsection + +Add a subsection to an existing section (creating parent if needed) + +#### Signature + +```python +prompt_add_subsection( + parent_title: str, + title: str, + body: str = '', + bullets: Optional[List[str]] = None +) -> AgentBase +``` + +#### Parameters + + + Parent section title + + + + Subsection title + + + + Optional subsection body text + + + + Optional list of bullet points + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/prompt_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/prompt_mixin.py) + +Line 288. + +*** + +### prompt\_add\_to\_section + +Add content to an existing section (creating it if needed) + +#### Signature + +```python +prompt_add_to_section( + title: str, + body: Optional[str] = None, + bullet: Optional[str] = None, + bullets: Optional[List[str]] = None +) -> AgentBase +``` + +#### Parameters + + + Section title + + + + Optional text to append to section body + + + + Optional single bullet point to add + + + + Optional list of bullet points to add + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/prompt_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/prompt_mixin.py) + +Line 261. + +*** + +### prompt\_has\_section + +Check if a section exists in the prompt + +#### Signature + +```python +prompt_has_section(title: str) -> bool +``` + +#### Parameters + + + Section title to check + + +#### Returns + +`bool` — True if section exists, False otherwise + +#### Source + +[`signalwire/signalwire/core/mixins/prompt_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/prompt_mixin.py) + +Line 315. + +*** + +### reset\_contexts + +Remove all contexts, returning the agent to a no-contexts state. + +This is a convenience wrapper around `define_contexts().reset()`. +Use it in a dynamic config callback when you need to rebuild +contexts from scratch for a specific request. + +Example:: + +``` +def on_dynamic_config(query, body, headers, agent): + if query.get("transfer"): + agent.reset_contexts() + ctx = agent.define_contexts().add_context("default") + ctx.add_step("route").set_text("Route the caller.") +``` + +#### Signature + +```python +reset_contexts() -> AgentBase +``` + +#### Returns + +`AgentBase` — Self for method chaining. + +#### Examples + +```python +def on_dynamic_config(query, body, headers, agent): + if query.get("transfer"): + agent.reset_contexts() + ctx = agent.define_contexts().add_context("default") + ctx.add_step("route").set_text("Route the caller.") +``` + +#### Source + +[`signalwire/signalwire/core/mixins/prompt_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/prompt_mixin.py) + +Line 157. + +*** + +### set\_post\_prompt + +Set the post-prompt text for summary generation + +#### Signature + +```python +set_post_prompt(text: str) -> AgentBase +``` + +#### Parameters + + + The post-prompt text + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/prompt_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/prompt_mixin.py) + +Line 202. + +*** + +### set\_prompt\_pom + +Set the prompt as a POM dictionary + +#### Signature + +```python +set_prompt_pom(pom: List[Dict[str, Any]]) -> AgentBase +``` + +#### Parameters + + + POM dictionary structure + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/prompt_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/prompt_mixin.py) + +Line 215. + +*** + +### set\_prompt\_text + +Set the prompt as raw text instead of using POM + +#### Signature + +```python +set_prompt_text(text: str) -> AgentBase +``` + +#### Parameters + + + The raw prompt text + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/prompt_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/prompt_mixin.py) + +Line 189. + +## Source + +[`signalwire/signalwire/core/mixins/prompt_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/prompt_mixin.py) + +Line 19. diff --git a/fern/products/sdk-reference/python/agents/mixins/serverless-mixin/index.mdx b/fern/products/sdk-reference/python/agents/mixins/serverless-mixin/index.mdx new file mode 100644 index 0000000000..36c5d44922 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/mixins/serverless-mixin/index.mdx @@ -0,0 +1,44 @@ +--- +slug: "/reference/python/agents/mixins/serverless-mixin" +title: "serverless_mixin" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.mixins.serverless_mixin" + parent: "signalwire.core.mixins" + module: "agents.mixins" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/serverless_mixin.py" +--- +# `serverless_mixin` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module serverless_mixin +``` + +## Constants + + + +## Classes + + + + Mixin class containing all serverless/cloud platform methods for AgentBase + + + +## Source + +[`signalwire/signalwire/core/mixins/serverless_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/serverless_mixin.py) diff --git a/fern/products/sdk-reference/python/agents/mixins/serverless-mixin/serverless-mixin/index.mdx b/fern/products/sdk-reference/python/agents/mixins/serverless-mixin/serverless-mixin/index.mdx new file mode 100644 index 0000000000..2b4d96bc16 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/mixins/serverless-mixin/serverless-mixin/index.mdx @@ -0,0 +1,65 @@ +--- +slug: "/reference/python/agents/mixins/serverless-mixin/serverless-mixin" +title: "ServerlessMixin" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.core.mixins.serverless_mixin.ServerlessMixin" + parent: "signalwire.core.mixins.serverless_mixin" + module: "agents.mixins.serverless_mixin" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/serverless_mixin.py" +--- +# `ServerlessMixin` + +Mixin class containing all serverless/cloud platform methods for AgentBase + +## Signature + +```python +class ServerlessMixin +``` + +## Methods + +### handle\_serverless\_request + +Handle serverless environment requests (CGI, Lambda, Cloud Functions) + +#### Signature + +```python +handle_serverless_request(event = None, context = None, mode = None) +``` + +#### Parameters + + + Serverless event object (Lambda, Cloud Functions) + + + + Serverless context object (Lambda, Cloud Functions) + + + + Override execution mode (from force\_mode in run()) + + +#### Returns + +Response appropriate for the serverless platform + +#### Source + +[`signalwire/signalwire/core/mixins/serverless_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/serverless_mixin.py) + +Line 28. + +## Source + +[`signalwire/signalwire/core/mixins/serverless_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/serverless_mixin.py) + +Line 23. diff --git a/fern/products/sdk-reference/python/agents/mixins/skill-mixin/index.mdx b/fern/products/sdk-reference/python/agents/mixins/skill-mixin/index.mdx new file mode 100644 index 0000000000..8a6809b6d3 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/mixins/skill-mixin/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/agents/mixins/skill-mixin" +title: "skill_mixin" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.mixins.skill_mixin" + parent: "signalwire.core.mixins" + module: "agents.mixins" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/skill_mixin.py" +--- +# `skill_mixin` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module skill_mixin +``` + +## Classes + + + + Mixin class containing all skill management methods for AgentBase + + + +## Source + +[`signalwire/signalwire/core/mixins/skill_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/skill_mixin.py) diff --git a/fern/products/sdk-reference/python/agents/mixins/skill-mixin/skill-mixin/index.mdx b/fern/products/sdk-reference/python/agents/mixins/skill-mixin/skill-mixin/index.mdx new file mode 100644 index 0000000000..f60e77b88b --- /dev/null +++ b/fern/products/sdk-reference/python/agents/mixins/skill-mixin/skill-mixin/index.mdx @@ -0,0 +1,139 @@ +--- +slug: "/reference/python/agents/mixins/skill-mixin/skill-mixin" +title: "SkillMixin" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.core.mixins.skill_mixin.SkillMixin" + parent: "signalwire.core.mixins.skill_mixin" + module: "agents.mixins.skill_mixin" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/skill_mixin.py" +--- +# `SkillMixin` + +Mixin class containing all skill management methods for AgentBase + +## Signature + +```python +class SkillMixin +``` + +## Methods + +### add\_skill + +Add a skill to this agent + +#### Signature + +```python +add_skill(skill_name: str, params: Optional[Dict[str, Any]] = None) -> AgentBase +``` + +#### Parameters + + + Name of the skill to add + + + + Optional parameters to pass to the skill for configuration + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Throws + +- `ValueError` — If skill not found or failed to load with detailed error message + +#### Source + +[`signalwire/signalwire/core/mixins/skill_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/skill_mixin.py) + +Line 18. + +*** + +### has\_skill + +Check if skill is loaded + +#### Signature + +```python +has_skill(skill_name: str) -> bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/core/mixins/skill_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/skill_mixin.py) + +Line 53. + +*** + +### list\_skills + +List currently loaded skills + +#### Signature + +```python +list_skills() -> List[str] +``` + +#### Returns + +`List[str]` + +#### Source + +[`signalwire/signalwire/core/mixins/skill_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/skill_mixin.py) + +Line 49. + +*** + +### remove\_skill + +Remove a skill from this agent + +#### Signature + +```python +remove_skill(skill_name: str) -> AgentBase +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`signalwire/signalwire/core/mixins/skill_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/skill_mixin.py) + +Line 44. + +## Source + +[`signalwire/signalwire/core/mixins/skill_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/skill_mixin.py) + +Line 13. diff --git a/fern/products/sdk-reference/python/agents/mixins/state-mixin/index.mdx b/fern/products/sdk-reference/python/agents/mixins/state-mixin/index.mdx new file mode 100644 index 0000000000..1a95788a26 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/mixins/state-mixin/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/agents/mixins/state-mixin" +title: "state_mixin" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.mixins.state_mixin" + parent: "signalwire.core.mixins" + module: "agents.mixins" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/state_mixin.py" +--- +# `state_mixin` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module state_mixin +``` + +## Classes + + + + Mixin class containing all state and session management methods for AgentBase + + + +## Source + +[`signalwire/signalwire/core/mixins/state_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/state_mixin.py) diff --git a/fern/products/sdk-reference/python/agents/mixins/state-mixin/state-mixin/index.mdx b/fern/products/sdk-reference/python/agents/mixins/state-mixin/state-mixin/index.mdx new file mode 100644 index 0000000000..07ae3324fd --- /dev/null +++ b/fern/products/sdk-reference/python/agents/mixins/state-mixin/state-mixin/index.mdx @@ -0,0 +1,65 @@ +--- +slug: "/reference/python/agents/mixins/state-mixin/state-mixin" +title: "StateMixin" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.core.mixins.state_mixin.StateMixin" + parent: "signalwire.core.mixins.state_mixin" + module: "agents.mixins.state_mixin" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/state_mixin.py" +--- +# `StateMixin` + +Mixin class containing all state and session management methods for AgentBase + +## Signature + +```python +class StateMixin +``` + +## Methods + +### validate\_tool\_token + +Validate a tool token + +#### Signature + +```python +validate_tool_token(function_name: str, token: str, call_id: str) -> bool +``` + +#### Parameters + + + Name of the function/tool + + + + Token to validate + + + + Call ID for the session + + +#### Returns + +`bool` — True if token is valid, False otherwise + +#### Source + +[`signalwire/signalwire/core/mixins/state_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/state_mixin.py) + +Line 43. + +## Source + +[`signalwire/signalwire/core/mixins/state_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/state_mixin.py) + +Line 15. diff --git a/fern/products/sdk-reference/python/agents/mixins/tool-mixin/index.mdx b/fern/products/sdk-reference/python/agents/mixins/tool-mixin/index.mdx new file mode 100644 index 0000000000..431bdf479b --- /dev/null +++ b/fern/products/sdk-reference/python/agents/mixins/tool-mixin/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/agents/mixins/tool-mixin" +title: "tool_mixin" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.mixins.tool_mixin" + parent: "signalwire.core.mixins" + module: "agents.mixins" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/tool_mixin.py" +--- +# `tool_mixin` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module tool_mixin +``` + +## Classes + + + + Mixin class containing all tool/function-related methods for AgentBase + + + +## Source + +[`signalwire/signalwire/core/mixins/tool_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/tool_mixin.py) diff --git a/fern/products/sdk-reference/python/agents/mixins/tool-mixin/tool-mixin/index.mdx b/fern/products/sdk-reference/python/agents/mixins/tool-mixin/tool-mixin/index.mdx new file mode 100644 index 0000000000..eab0e3179a --- /dev/null +++ b/fern/products/sdk-reference/python/agents/mixins/tool-mixin/tool-mixin/index.mdx @@ -0,0 +1,309 @@ +--- +slug: "/reference/python/agents/mixins/tool-mixin/tool-mixin" +title: "ToolMixin" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.core.mixins.tool_mixin.ToolMixin" + parent: "signalwire.core.mixins.tool_mixin" + module: "agents.mixins.tool_mixin" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/tool_mixin.py" +--- +# `ToolMixin` + +Mixin class containing all tool/function-related methods for AgentBase + +## Signature + +```python +class ToolMixin +``` + +## Methods + +### define\_tool + +Define a SWAIG function the AI can call. + +#### How this becomes a tool the model sees + +SWAIG functions are NOT a separate concept from "LLM tools" — they +ARE the tools, exposed to the model in exactly the same shape as +native OpenAI / Anthropic tool calling. Under the hood, the SDK +renders each SWAIG function into an OpenAI-format tool schema: + +``` +{"type": "function", "function": { + "name": "", + "description": "", + "parameters": {} +}} +``` + +That schema is sent to the model on every turn. The model reads +the `description` field and the per-parameter `description` +strings inside `parameters` to decide WHEN to call this tool and +HOW to fill in the arguments. + +Treat description text as prompt engineering, not as developer +documentation: + +- Bad: "Lookup function" + +- Bad: "Internal helper for account fetching" + +- Good: "Look up a customer's account details by their account + number. Use this BEFORE quoting any account-specific + information (balance, plan, status, billing date)." + +- Bad parameter: "the id" + +- Good parameter: "The customer's account number, exactly 8 + digits, no dashes or spaces. Ask the user if + they don't provide it." + +Vague descriptions are the #1 cause of "the model has the right +tool but doesn't call it" failures. Be specific about WHEN to +use the tool, what makes it the right choice over alternatives, +and any preconditions on the arguments. + +Tool count matters too: LLM tool selection accuracy degrades past +\~7-8 simultaneously-active tools per call. If you have many tools, +partition them across steps using Step.set\_functions() so only +the relevant subset is active at any moment. + +> \[!NOTE] +> agent.define\_tool( +> name="lookup\_account", +> description=( +> "Look up a customer's account details by their account " +> "number. Use this BEFORE quoting any account-specific " +> "information. Do not call it for general questions about " +> "the product." +> ), +> parameters=\{ +> "type": "object", +> "properties": \{ +> "account\_number": \{ +> "type": "string", +> "description": ( +> "The customer's 8-digit account number, " +> "no dashes. Ask the user if not provided." +> ), +> \} +> \}, +> "required": \["account\_number"], +> \}, +> handler=self.handle\_lookup\_account, +> ) + +#### Signature + +```python +define_tool( + name: str, + description: str, + parameters: Dict[str, Any], + handler: Callable, + secure: bool = True, + fillers: Optional[Dict[str, List[str]]] = None, + webhook_url: Optional[str] = None, + required: Optional[List[str]] = None, + is_typed_handler: bool = False, + **swaig_fields = {} +) -> AgentBase +``` + +#### Parameters + + + Function name. Must be unique across all SWAIG functions on this agent. Becomes the `name` field in the OpenAI tool schema and is what the model emits when it picks this tool. Use snake\_case; the model picks up naming conventions from this field too. + + + + The function description as the LLM will read it. See above — this is prompt-engineered text, not internal docs. Explain what the tool does, when to use it, and what NOT to use it for if there are sibling tools the model might confuse it with. + + + + JSON Schema for the function's arguments. The per-property `description` fields inside the schema are also LLM-facing — give every parameter a description that tells the model how to fill it in (format, source, constraints). + + + + Python callable invoked when the model calls this tool. Receives parsed args and the raw request data. Should return a FunctionResult or dict; anything else logs a warning and is stringified. + + + + Whether to require SWAIG token validation on the webhook callback. + + + + Optional dict mapping language codes to arrays of filler phrases the AI speaks while the function executes. Format: \{"en-US": \["one moment...", "checking..."]\} + + + + Optional external webhook URL. If set, the SDK does not handle the call locally — the model's tool call is forwarded to this URL. + + + + Optional list of required parameter names. May also be set inside `parameters["required"]`. + + + + Whether the handler uses type-hinted parameters (auto-wrapped from inferred schema). + + + + +#### Returns + +`AgentBase` — Self for method chaining. + +#### Examples + +```python +{"type": "function", "function": { + "name": "", + "description": "", + "parameters": {} +}} +``` + +#### Source + +[`signalwire/signalwire/core/mixins/tool_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/tool_mixin.py) + +Line 26. + +*** + +### define\_tools + +Define the tools this agent can use + +This method can be overridden by subclasses. + +#### Signature + +```python +define_tools() -> List[SWAIGFunction] +``` + +#### Returns + +`List[SWAIGFunction]` — List of SWAIGFunction objects or raw dictionaries (for data\_map tools) + +#### Source + +[`signalwire/signalwire/core/mixins/tool_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/tool_mixin.py) + +Line 200. + +*** + +### on\_function\_call + +Called when a SWAIG function is invoked + +#### Signature + +```python +on_function_call( + name: str, + args: Dict[str, Any], + raw_data: Optional[Dict[str, Any]] = None +) -> Any +``` + +#### Parameters + + + Function name + + + + Function arguments + + + + Raw request data + + +#### Returns + +`Any` — Function result + +#### Source + +[`signalwire/signalwire/core/mixins/tool_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/tool_mixin.py) + +Line 219. + +*** + +### register\_swaig\_function + +Register a raw SWAIG function dictionary (e.g., from DataMap.to\_swaig\_function()) + +#### Signature + +```python +register_swaig_function(function_dict: Dict[str, Any]) -> AgentBase +``` + +#### Parameters + + + Complete SWAIG function definition dictionary + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/tool_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/tool_mixin.py) + +Line 162. + +*** + +### tool + +Class method decorator for defining SWAIG tools + +Used as: + +@AgentBase.tool(name="example\_function", parameters=\{...\}) +def example\_function(self, param1): +\# ... + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +tool(name = None, **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/core/mixins/tool_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/tool_mixin.py) + +Line 187. + +## Source + +[`signalwire/signalwire/core/mixins/tool_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/tool_mixin.py) + +Line 21. diff --git a/fern/products/sdk-reference/python/agents/mixins/web-mixin/index.mdx b/fern/products/sdk-reference/python/agents/mixins/web-mixin/index.mdx new file mode 100644 index 0000000000..10699f150b --- /dev/null +++ b/fern/products/sdk-reference/python/agents/mixins/web-mixin/index.mdx @@ -0,0 +1,44 @@ +--- +slug: "/reference/python/agents/mixins/web-mixin" +title: "web_mixin" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.mixins.web_mixin" + parent: "signalwire.core.mixins" + module: "agents.mixins" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/web_mixin.py" +--- +# `web_mixin` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module web_mixin +``` + +## Constants + + + +## Classes + + + + Mixin class containing all web server and routing-related methods for AgentBase + + + +## Source + +[`signalwire/signalwire/core/mixins/web_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/web_mixin.py) diff --git a/fern/products/sdk-reference/python/agents/mixins/web-mixin/web-mixin/index.mdx b/fern/products/sdk-reference/python/agents/mixins/web-mixin/web-mixin/index.mdx new file mode 100644 index 0000000000..a633ef01d1 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/mixins/web-mixin/web-mixin/index.mdx @@ -0,0 +1,405 @@ +--- +slug: "/reference/python/agents/mixins/web-mixin/web-mixin" +title: "WebMixin" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.core.mixins.web_mixin.WebMixin" + parent: "signalwire.core.mixins.web_mixin" + module: "agents.mixins.web_mixin" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/web_mixin.py" +--- +# `WebMixin` + +Mixin class containing all web server and routing-related methods for AgentBase + +## Signature + +```python +class WebMixin +``` + +## Methods + +### as\_router + +Get a FastAPI router for this agent + +#### Signature + +```python +as_router() -> APIRouter +``` + +#### Returns + +`APIRouter` — FastAPI router + +#### Source + +[`signalwire/signalwire/core/mixins/web_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/web_mixin.py) + +Line 133. + +*** + +### enable\_debug\_routes + +Enable debug routes for testing and development + +#### Signature + +```python +enable_debug_routes() -> AgentBase +``` + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/web_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/web_mixin.py) + +Line 1244. + +*** + +### get\_app + +Get the FastAPI application instance for deployment adapters like Lambda/Mangum + +This method ensures the FastAPI app is properly initialized and configured, +then returns it for use with deployment adapters like Mangum for AWS Lambda. + +#### Signature + +```python +get_app() +``` + +#### Returns + +The configured FastAPI application instance + +#### Source + +[`signalwire/signalwire/core/mixins/web_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/web_mixin.py) + +Line 41. + +*** + +### manual\_set\_proxy\_url + +Manually set the proxy URL base for webhook callbacks + +This can be called at runtime to set or update the proxy URL + +#### Signature + +```python +manual_set_proxy_url(proxy_url: str) -> AgentBase +``` + +#### Parameters + + + The base URL to use for webhooks (e.g., https://example.ngrok.io) + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/web_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/web_mixin.py) + +Line 1191. + +*** + +### on\_request + +Called when SWML is requested, with request data when available + +This method overrides SWMLService's on\_request to properly handle SWML generation +for AI Agents. + +#### Signature + +```python +on_request( + request_data: Optional[dict] = None, + callback_path: Optional[str] = None +) -> Optional[dict] +``` + +#### Parameters + + + Optional dictionary containing the parsed POST body + + + + Optional callback path + + +#### Returns + +`Optional[dict]` — None to use the default SWML rendering (which will call \_render\_swml) + +#### Source + +[`signalwire/signalwire/core/mixins/web_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/web_mixin.py) + +Line 1079. + +*** + +### on\_swml\_request + +Customization point for subclasses to modify SWML based on request data + +#### Signature + +```python +on_swml_request( + request_data: Optional[dict] = None, + callback_path: Optional[str] = None, + request: Optional[Request] = None +) -> Optional[dict] +``` + +#### Parameters + + + Optional dictionary containing the parsed POST body + + + + Optional callback path + + + + Optional FastAPI Request object for accessing query params, headers, etc. + + +#### Returns + +`Optional[dict]` — Optional dict with modifications to apply to the SWML document + +#### Source + +[`signalwire/signalwire/core/mixins/web_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/web_mixin.py) + +Line 1100. + +*** + +### register\_routing\_callback + +Register a callback function that will be called to determine routing +based on POST data. + +When a routing callback is registered, an endpoint at the specified path is automatically +created that will handle requests. This endpoint will use the callback to +determine if the request should be processed by this service or redirected. + +The callback should take a request object and request body dictionary and return: + +- A route string if it should be routed to a different endpoint +- None if normal processing should continue + +#### Signature + +```python +register_routing_callback( + callback_fn: Callable[Request, Dict[str, Any], Optional[str]], + path: str = '/sip' +) -> None +``` + +#### Parameters + + + The callback function to register + + + + The path where this callback should be registered (default: "/sip") + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/core/mixins/web_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/web_mixin.py) + +Line 1131. + +*** + +### run + +Smart run method that automatically detects environment and handles accordingly + +#### Signature + +```python +run( + event = None, + context = None, + force_mode = None, + host: Optional[str] = None, + port: Optional[int] = None +) +``` + +#### Parameters + + + Serverless event object (Lambda, Cloud Functions) + + + + Serverless context object (Lambda, Cloud Functions) + + + + Override automatic mode detection for testing + + + + Host override for server mode + + + + Port override for server mode + + +#### Returns + +Response for serverless modes, None for server mode + +#### Source + +[`signalwire/signalwire/core/mixins/web_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/web_mixin.py) + +Line 305. + +*** + +### serve + +Start a web server for this agent + +#### Signature + +```python +serve(host: Optional[str] = None, port: Optional[int] = None) -> None +``` + +#### Parameters + + + Optional host to override the default + + + + Optional port to override the default + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/core/mixins/web_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/web_mixin.py) + +Line 153. + +*** + +### set\_dynamic\_config\_callback + +Set a callback function for dynamic agent configuration + +This callback receives the actual agent instance, allowing you to dynamically +configure ANY aspect of the agent including adding skills, modifying prompts, +changing parameters, etc. based on request data. + +> \[!NOTE] +> def my\_config(query\_params, body\_params, headers, agent): +> if query\_params.get('tier') == 'premium': +> agent.add\_skill("advanced\_search") +> agent.add\_language("English", "en-US", "premium\_voice") +> agent.set\_params(\{"end\_of\_speech\_timeout": 500\}) +> agent.set\_global\_data(\{"tier": query\_params.get('tier', 'standard')\}) +> +> my\_agent.set\_dynamic\_config\_callback(my\_config) + +#### Signature + +```python +set_dynamic_config_callback( + callback: Callable[dict, dict, dict, AgentBase, None] +) -> AgentBase +``` + +#### Parameters + + + Function that takes (query\_params, body\_params, headers, agent) and configures the agent using any available methods like: - agent.add\_skill(...) - agent.add\_language(...) - agent.prompt\_add\_section(...) - agent.set\_params(...) - agent.set\_global\_data(...) - agent.define\_tool(...) + + +#### Returns + +`AgentBase` + +#### Examples + +```python +my_agent.set_dynamic_config_callback(my_config) +``` + +#### Source + +[`signalwire/signalwire/core/mixins/web_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/web_mixin.py) + +Line 1160. + +*** + +### setup\_graceful\_shutdown + +Setup signal handlers for graceful shutdown (useful for Kubernetes) + +#### Signature + +```python +setup_graceful_shutdown() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/core/mixins/web_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/web_mixin.py) + +Line 1218. + +## Source + +[`signalwire/signalwire/core/mixins/web_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/web_mixin.py) + +Line 36. diff --git a/fern/products/sdk-reference/python/agents/pom-builder/index.mdx b/fern/products/sdk-reference/python/agents/pom-builder/index.mdx new file mode 100644 index 0000000000..5f2a4b5f5e --- /dev/null +++ b/fern/products/sdk-reference/python/agents/pom-builder/index.mdx @@ -0,0 +1,32 @@ +--- +slug: "/reference/python/agents/pom-builder" +title: "pom_builder" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.pom_builder" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/pom_builder.py" +--- +# `pom_builder` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module pom_builder +``` + +## Source + +[`signalwire/signalwire/core/pom_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/pom_builder.py) diff --git a/fern/products/sdk-reference/python/agents/pom-builder/index__2.mdx b/fern/products/sdk-reference/python/agents/pom-builder/index__2.mdx new file mode 100644 index 0000000000..4df93e3cb8 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/pom-builder/index__2.mdx @@ -0,0 +1,381 @@ +--- +slug: "/reference/python/agents/pom-builder/index__2" +title: "PomBuilder" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.core.pom_builder.PomBuilder" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/pom_builder.py" +--- +# `PomBuilder` + +Builder class for creating structured prompts using the Prompt Object Model. + +This class is a flexible wrapper around the POM API that allows for: + +- Dynamic creation of sections on demand +- Adding content to existing sections +- Nesting subsections +- Rendering to markdown or XML + +Unlike previous implementations, there are no predefined section types - +you can create any section structure that fits your needs. + +## Signature + +```python +class PomBuilder +``` + +## Properties + + + +## Methods + +### \_\_init\_\_ + +Initialize a new POM builder with an empty POM + +#### Signature + +```python +__init__() +``` + +#### Source + +[`signalwire/signalwire/core/pom_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/pom_builder.py) + +Line 33. + +*** + +### add\_section + +Add a new section to the POM + +#### Signature + +```python +add_section( + title: str, + body: str = '', + bullets: Optional[List[str]] = None, + numbered: bool = False, + numbered_bullets: bool = False, + subsections: Optional[List[Dict[str, Any]]] = None +) -> PomBuilder +``` + +#### Parameters + + + Section title + + + + Optional body text + + + + Optional list of bullet points + + + + Whether to number this section + + + + Whether to number bullet points + + + + Optional list of subsection objects + + +#### Returns + +`PomBuilder` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/pom_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/pom_builder.py) + +Line 38. + +*** + +### add\_subsection + +Add a subsection to an existing section, creating the parent if needed + +#### Signature + +```python +add_subsection( + parent_title: str, + title: str, + body: str = '', + bullets: Optional[List[str]] = None +) -> PomBuilder +``` + +#### Parameters + + + Title of the parent section + + + + Title for the new subsection + + + + Optional body text + + + + Optional list of bullet points + + +#### Returns + +`PomBuilder` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/pom_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/pom_builder.py) + +Line 115. + +*** + +### add\_to\_section + +Add content to an existing section + +#### Signature + +```python +add_to_section( + title: str, + body: Optional[str] = None, + bullet: Optional[str] = None, + bullets: Optional[List[str]] = None +) -> PomBuilder +``` + +#### Parameters + + + Section title + + + + Text to append to the section body + + + + Single bullet to add + + + + List of bullets to add + + +#### Returns + +`PomBuilder` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/pom_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/pom_builder.py) + +Line 80. + +*** + +### from\_sections + +Create a PomBuilder from a list of section dictionaries + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +from_sections(sections: List[Dict[str, Any]]) -> PomBuilder +``` + +#### Parameters + + + List of section definition dictionaries + + +#### Returns + +`PomBuilder` — A new PomBuilder instance with the sections added + +#### Source + +[`signalwire/signalwire/core/pom_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/pom_builder.py) + +Line 181. + +*** + +### get\_section + +Get a section by title + +#### Signature + +```python +get_section(title: str) -> Optional[Section] +``` + +#### Parameters + + + Section title + + +#### Returns + +`Optional[Section]` — Section object or None if not found + +#### Source + +[`signalwire/signalwire/core/pom_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/pom_builder.py) + +Line 153. + +*** + +### has\_section + +Check if a section with the given title exists + +#### Signature + +```python +has_section(title: str) -> bool +``` + +#### Parameters + + + Section title to check + + +#### Returns + +`bool` — True if the section exists, False otherwise + +#### Source + +[`signalwire/signalwire/core/pom_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/pom_builder.py) + +Line 141. + +*** + +### render\_markdown + +Render the POM as markdown + +#### Signature + +```python +render_markdown() -> str +``` + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/core/pom_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/pom_builder.py) + +Line 165. + +*** + +### render\_xml + +Render the POM as XML + +#### Signature + +```python +render_xml() -> str +``` + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/core/pom_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/pom_builder.py) + +Line 169. + +*** + +### to\_dict + +Convert the POM to a list of section dictionaries + +#### Signature + +```python +to_dict() -> List[Dict[str, Any]] +``` + +#### Returns + +`List[Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/core/pom_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/pom_builder.py) + +Line 173. + +*** + +### to\_json + +Convert the POM to a JSON string + +#### Signature + +```python +to_json() -> str +``` + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/core/pom_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/pom_builder.py) + +Line 177. + +## Source + +[`signalwire/signalwire/core/pom_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/pom_builder.py) + +Line 19. diff --git a/fern/products/sdk-reference/python/agents/pom/index.mdx b/fern/products/sdk-reference/python/agents/pom/index.mdx new file mode 100644 index 0000000000..bc7df6df1c --- /dev/null +++ b/fern/products/sdk-reference/python/agents/pom/index.mdx @@ -0,0 +1,46 @@ +--- +slug: "/reference/python/agents/pom" +title: "pom" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.pom" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/__init__.py" +--- +# `pom` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module pom +``` + +## Properties + + + +## Modules + + + + + + POM Tool - Command line utility for working with Prompt Object Model files + + + +## Source + +[`signalwire/signalwire/pom/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/__init__.py) diff --git a/fern/products/sdk-reference/python/agents/pom/index__2.mdx b/fern/products/sdk-reference/python/agents/pom/index__2.mdx new file mode 100644 index 0000000000..ff0d50b2e9 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/pom/index__2.mdx @@ -0,0 +1,25 @@ +--- +slug: "/reference/python/agents/pom/index__2" +title: "pom" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.pom.pom" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py" +--- +# `pom` + +## Signature + +```python +module pom +``` + +## Source + +[`signalwire/signalwire/pom/pom.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py) diff --git a/fern/products/sdk-reference/python/agents/pom/pom-tool/index.mdx b/fern/products/sdk-reference/python/agents/pom/pom-tool/index.mdx new file mode 100644 index 0000000000..83f9605f55 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/pom/pom-tool/index.mdx @@ -0,0 +1,123 @@ +--- +slug: "/reference/python/agents/pom/pom-tool" +title: "pom_tool" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.pom.pom_tool" + parent: "signalwire.pom" + module: "agents.pom" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom_tool.py" +--- +# `pom_tool` + +POM Tool - Command line utility for working with Prompt Object Model files + +> \[!NOTE] +> pom\_tool \ \[--output=<format>] \[--outfile=<file>] \[--merge\_pom="<section name>:<filename>"] +> pom\_tool (-h | --help) + +> \[!NOTE] +> -h --help Show this help message +> \--output=<format> Output format: md, xml, json, yaml \[default: md] +> \--outfile=<file> Output file (if not specified, prints to stdout) +> \--merge\_pom=<arg> Merge another POM into a section: "<section name>:<filename>" + +## Signature + +```python +module pom_tool +``` + +## Functions + +### detect\_file\_format + +Detect if the file is JSON or YAML based on extension and content. + +#### Signature + +```python +detect_file_format(file_path) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/pom/pom_tool.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom_tool.py) + +Line 23. + +*** + +### load\_pom + +Load a POM from a file, auto-detecting the format. + +#### Signature + +```python +load_pom(file_path) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/pom/pom_tool.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom_tool.py) + +Line 55. + +*** + +### main + +Main entry point for the POM tool. + +#### Signature + +```python +main() +``` + +#### Source + +[`signalwire/signalwire/pom/pom_tool.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom_tool.py) + +Line 80. + +*** + +### render\_pom + +Render the POM in the specified format. + +#### Signature + +```python +render_pom(pom, output_format) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/pom/pom_tool.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom_tool.py) + +Line 67. + +## Source + +[`signalwire/signalwire/pom/pom_tool.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom_tool.py) diff --git a/fern/products/sdk-reference/python/agents/pom/pom/index.mdx b/fern/products/sdk-reference/python/agents/pom/pom/index.mdx new file mode 100644 index 0000000000..434dceaee4 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/pom/pom/index.mdx @@ -0,0 +1,26 @@ +--- +slug: "/reference/python/agents/pom/pom" +title: "pom" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "agents.pom.pom" + parent: "signalwire.pom" + module: "agents.pom" +--- +# `pom` + +## Classes + + + + A structured data format for composing, organizing, and rendering prompt instructions for large language models. + + + + Represents a section in the Prompt Object Model. + + diff --git a/fern/products/sdk-reference/python/agents/pom/pom/prompt-object-model/index.mdx b/fern/products/sdk-reference/python/agents/pom/pom/prompt-object-model/index.mdx new file mode 100644 index 0000000000..c6dfe557b1 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/pom/pom/prompt-object-model/index.mdx @@ -0,0 +1,364 @@ +--- +slug: "/reference/python/agents/pom/pom/prompt-object-model" +title: "PromptObjectModel" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.pom.pom.PromptObjectModel" + parent: "agents.pom.pom" + module: "agents.pom.pom" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py" +--- +# `PromptObjectModel` + +A structured data format for composing, organizing, and rendering prompt +instructions for large language models. + +The Prompt Object Model provides a tree-based representation of a prompt +document composed of nested sections, each of which can include a title, +body text, bullet points, and arbitrarily nested subsections. + +This class supports both machine-readability (via JSON/YAML) and structured +rendering (via Markdown/XML), making it ideal for prompt templating, modular +editing, and traceable documentation. + +## Signature + +```python +class PromptObjectModel +``` + +## Properties + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(debug: bool = False) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/pom/pom.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py) + +Line 359. + +*** + +### add\_pom\_as\_subsection + +Add another PromptObjectModel as a subsection to a section with the given title or section object. + +#### Signature + +```python +add_pom_as_subsection( + target: Union[str, Section], + pom_to_add: PromptObjectModel +) +``` + +#### Parameters + + + The title of the section or the Section object to which the POM should be added as a subsection. + + + + The PromptObjectModel to add as a subsection. + + +#### Throws + +- `ValueError` — If no section with the target title is found (when target is a string). + +#### Source + +[`signalwire/signalwire/pom/pom.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py) + +Line 519. + +*** + +### add\_section + +Add a top-level section to the model. + +#### Signature + +```python +add_section( + title: Optional[str] = None, + *, + body: str = '', + bullets: Optional[Union[List[str], str]] = None, + numbered: Optional[bool] = None, + numberedBullets: bool = False +) -> Section +``` + +#### Parameters + + + The title of the section + + + + Optional body text for the section + + + + Optional list of bullet points or a single string + + + + Whether this section should be numbered + + + + Whether bullets should be numbered + + +#### Returns + +`Section` — The newly created Section object + +#### Throws + +- `ValueError` — If a section without a title is added after the first section + +#### Source + +[`signalwire/signalwire/pom/pom.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py) + +Line 363. + +*** + +### find\_section + +Find a section by its title. + +Performs a recursive search through all sections and subsections. + +#### Signature + +```python +find_section(title: str) -> Optional[Section] +``` + +#### Parameters + + + The title to search for + + +#### Returns + +`Optional[Section]` — The Section object if found, None otherwise + +#### Source + +[`signalwire/signalwire/pom/pom.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py) + +Line 397. + +*** + +### from\_json + +Create a PromptObjectModel instance from JSON data. + +**Modifiers:** `static` + +#### Signature + +```python +@staticmethod +from_json(json_data: Union[str, dict]) -> PromptObjectModel +``` + +#### Parameters + + + Either a JSON string or a parsed dictionary + + +#### Returns + +`PromptObjectModel` — A new PromptObjectModel populated with the data from the JSON + +#### Throws + +- `ValueError` — If the JSON is not properly formatted + +#### Source + +[`signalwire/signalwire/pom/pom.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py) + +Line 247. + +*** + +### from\_yaml + +Create a PromptObjectModel instance from YAML data. + +**Modifiers:** `static` + +#### Signature + +```python +@staticmethod +from_yaml(yaml_data: Union[str, dict]) -> PromptObjectModel +``` + +#### Parameters + + + Either a YAML string or a parsed dictionary + + +#### Returns + +`PromptObjectModel` — A new PromptObjectModel populated with the data from the YAML + +#### Throws + +- `ValueError` — If the YAML is not properly formatted + +#### Source + +[`signalwire/signalwire/pom/pom.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py) + +Line 268. + +*** + +### render\_markdown + +Render the entire model as markdown. + +#### Signature + +```python +render_markdown() -> str +``` + +#### Returns + +`str` — A string containing the markdown representation + +#### Source + +[`signalwire/signalwire/pom/pom.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py) + +Line 448. + +*** + +### render\_xml + +Render the entire model as XML. + +#### Signature + +```python +render_xml() -> str +``` + +#### Returns + +`str` — A string containing the XML representation + +#### Source + +[`signalwire/signalwire/pom/pom.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py) + +Line 488. + +*** + +### to\_dict + +Convert the entire model to a list of dictionaries. + +#### Signature + +```python +to_dict() -> List[dict] +``` + +#### Returns + +`List[dict]` — A list of dictionaries representing the model + +#### Source + +[`signalwire/signalwire/pom/pom.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py) + +Line 439. + +*** + +### to\_json + +Convert the entire model to a JSON string. + +#### Signature + +```python +to_json() -> str +``` + +#### Returns + +`str` — A JSON string representation of the model + +#### Source + +[`signalwire/signalwire/pom/pom.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py) + +Line 419. + +*** + +### to\_yaml + +Convert the entire model to a YAML string. + +#### Signature + +```python +to_yaml() -> str +``` + +#### Returns + +`str` — A YAML string representation of the model + +#### Source + +[`signalwire/signalwire/pom/pom.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py) + +Line 428. + +## Source + +[`signalwire/signalwire/pom/pom.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py) + +Line 234. diff --git a/fern/products/sdk-reference/python/agents/pom/pom/section/index.mdx b/fern/products/sdk-reference/python/agents/pom/pom/section/index.mdx new file mode 100644 index 0000000000..77eb5f5589 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/pom/pom/section/index.mdx @@ -0,0 +1,277 @@ +--- +slug: "/reference/python/agents/pom/pom/section" +title: "Section" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.pom.pom.Section" + parent: "agents.pom.pom" + module: "agents.pom.pom" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py" +--- +# `Section` + +Represents a section in the Prompt Object Model. + +Each section contains a title, optional body text, optional bullet points, +and can have any number of nested subsections. + +## Signature + +```python +class Section +``` + +## Properties + + + A paragraph of text associated with the section. + + + + Bullet-pointed items. + + + + Whether this section should be numbered. + + + + Whether bullets should be numbered instead of using bullet points. + + + + Nested sections with the same structure. + + + + The name of the section. + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + title: Optional[str] = None, + *, + body: str = '', + bullets: Optional[List[str]] = None, + numbered: Optional[bool] = None, + numberedBullets: bool = False +) +``` + +#### Parameters + + + + + + + + + + + +#### Source + +[`signalwire/signalwire/pom/pom.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py) + +Line 20. + +*** + +### add\_body + +Add or replace the body text for this section. + +#### Signature + +```python +add_body(body: str) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/pom/pom.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py) + +Line 39. + +*** + +### add\_bullets + +Add bullet points to this section. + +#### Signature + +```python +add_bullets(bullets: List[str]) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/pom/pom.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py) + +Line 45. + +*** + +### add\_subsection + +Add a subsection to this section. + +#### Signature + +```python +add_subsection( + title: str, + *, + body: str = '', + bullets: Optional[List[str]] = None, + numbered: bool = False, + numberedBullets: bool = False +) -> Section +``` + +#### Parameters + + + The title of the subsection + + + + Optional body text for the subsection + + + + Optional list of bullet points + + + + Whether this section should be numbered + + + + Whether bullets should be numbered + + +#### Returns + +`Section` — The newly created Section object + +#### Throws + +- `ValueError` — If the title is None or if the section has neither a body nor bullets + +#### Source + +[`signalwire/signalwire/pom/pom.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py) + +Line 51. + +*** + +### render\_markdown + +Render this section and all its subsections as markdown. + +#### Signature + +```python +render_markdown( + level: int = 2, + section_number: Optional[List[int]] = None +) -> str +``` + +#### Parameters + + + The heading level to start with (default: 2, which corresponds to ##) + + + + The current section number for numbered sections + + +#### Returns + +`str` — A string containing the markdown representation + +#### Source + +[`signalwire/signalwire/pom/pom.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py) + +Line 103. + +*** + +### render\_xml + +Render this section and all its subsections as XML. + +#### Signature + +```python +render_xml(indent: int = 0, section_number: Optional[List[int]] = None) -> str +``` + +#### Parameters + + + The indentation level to start with (default: 0) + + + + The current section number for numbered sections + + +#### Returns + +`str` — A string containing the XML representation + +#### Source + +[`signalwire/signalwire/pom/pom.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py) + +Line 164. + +*** + +### to\_dict + +Convert the section to a dictionary representation. + +#### Signature + +```python +to_dict() +``` + +#### Source + +[`signalwire/signalwire/pom/pom.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py) + +Line 79. + +## Source + +[`signalwire/signalwire/pom/pom.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py) + +Line 5. diff --git a/fern/products/sdk-reference/python/agents/prefabs/concierge/concierge-agent/index.mdx b/fern/products/sdk-reference/python/agents/prefabs/concierge/concierge-agent/index.mdx new file mode 100644 index 0000000000..e6b6eed60b --- /dev/null +++ b/fern/products/sdk-reference/python/agents/prefabs/concierge/concierge-agent/index.mdx @@ -0,0 +1,210 @@ +--- +slug: "/reference/python/agents/prefabs/concierge/concierge-agent" +title: "ConciergeAgent" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.prefabs.concierge.ConciergeAgent" + parent: "signalwire.prefabs.concierge" + module: "agents.prefabs.concierge" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/concierge.py" +--- +# `ConciergeAgent` + +A prefab agent designed to act as a virtual concierge, providing information +and services to users. + +This agent will: + +1. Welcome users and explain available services +2. Answer questions about amenities, hours, and directions +3. Help with bookings and reservations +4. Provide personalized recommendations + +> \[!NOTE] +> agent = ConciergeAgent( +> venue\_name="Grand Hotel", +> services=\["room service", "spa bookings", "restaurant reservations"], +> amenities=\{ +> "pool": \{"hours": "7 AM - 10 PM", "location": "2nd Floor"\}, +> "gym": \{"hours": "24 hours", "location": "3rd Floor"\} +> \} +> ) + +## Signature + +```python +class ConciergeAgent(AgentBase) +``` + +## Inheritance + +**Extends:** [AgentBase](/docs/sdk-reference/reference/python/agents/agent-base/index__2) + +## Properties + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +Initialize a concierge agent + +#### Signature + +```python +__init__( + venue_name: str, + services: List[str], + amenities: Dict[str, Dict[str, str]], + hours_of_operation: Optional[Dict[str, str]] = None, + special_instructions: Optional[List[str]] = None, + welcome_message: Optional[str] = None, + name: str = 'concierge', + route: str = '/concierge', + **kwargs = {} +) +``` + +#### Parameters + + + Name of the venue or business + + + + List of services offered + + + + Dictionary of amenities with details + + + + Optional dictionary of operating hours + + + + Optional list of special instructions + + + + Optional custom welcome message + + + + Agent name for the route + + + + HTTP route for this agent + + + + +#### Source + +[`signalwire/signalwire/prefabs/concierge.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/concierge.py) + +Line 45. + +*** + +### check\_availability + +Check availability for a service on a specific date and time + +This is a simulated function that would typically connect to a real booking system. +In this example, it returns a mock availability response. + +**Decorators:** `@AgentBase.tool(Any, Any, Any)` + +#### Signature + +```python +check_availability(args, raw_data) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/prefabs/concierge.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/concierge.py) + +Line 184. + +*** + +### get\_directions + +Provide directions to a specific location or amenity + +**Decorators:** `@AgentBase.tool(Any, Any, Any)` + +#### Signature + +```python +get_directions(args, raw_data) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/prefabs/concierge.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/concierge.py) + +Line 226. + +*** + +### on\_summary + +Process the interaction summary + +#### Signature + +```python +on_summary(summary, raw_data = None) +``` + +#### Parameters + + + Summary data from the conversation + + + + The complete raw POST data from the request + + +#### Source + +[`signalwire/signalwire/prefabs/concierge.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/concierge.py) + +Line 253. + +## Source + +[`signalwire/signalwire/prefabs/concierge.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/concierge.py) + +Line 23. diff --git a/fern/products/sdk-reference/python/agents/prefabs/concierge/index.mdx b/fern/products/sdk-reference/python/agents/prefabs/concierge/index.mdx new file mode 100644 index 0000000000..49cf9267f7 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/prefabs/concierge/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/agents/prefabs/concierge" +title: "concierge" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.prefabs.concierge" + parent: "signalwire.prefabs" + module: "agents.prefabs" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/concierge.py" +--- +# `concierge` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module concierge +``` + +## Classes + + + + A prefab agent designed to act as a virtual concierge, providing information and services to users. + + + +## Source + +[`signalwire/signalwire/prefabs/concierge.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/concierge.py) diff --git a/fern/products/sdk-reference/python/agents/prefabs/faq-bot/faq-bot-agent/index.mdx b/fern/products/sdk-reference/python/agents/prefabs/faq-bot/faq-bot-agent/index.mdx new file mode 100644 index 0000000000..afabdecdbb --- /dev/null +++ b/fern/products/sdk-reference/python/agents/prefabs/faq-bot/faq-bot-agent/index.mdx @@ -0,0 +1,168 @@ +--- +slug: "/reference/python/agents/prefabs/faq-bot/faq-bot-agent" +title: "FAQBotAgent" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.prefabs.faq_bot.FAQBotAgent" + parent: "signalwire.prefabs.faq_bot" + module: "agents.prefabs.faq_bot" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/faq_bot.py" +--- +# `FAQBotAgent` + +A prefab agent designed to answer frequently asked questions based on +a provided list of question/answer pairs. + +This agent will: + +1. Match user questions against the FAQ database +2. Provide the most relevant answer +3. Suggest other relevant questions when appropriate + +> \[!NOTE] +> agent = FAQBotAgent( +> faqs=\[ +> \{ +> "question": "What is SignalWire?", +> "answer": "SignalWire is a developer-friendly cloud communications platform." +> \}, +> \{ +> "question": "How much does it cost?", +> "answer": "SignalWire offers pay-as-you-go pricing with no monthly fees." +> \} +> ] +> ) + +## Signature + +```python +class FAQBotAgent(AgentBase) +``` + +## Inheritance + +**Extends:** [AgentBase](/docs/sdk-reference/reference/python/agents/agent-base/index__2) + +## Properties + + + + + + + +## Methods + +### \_\_init\_\_ + +Initialize an FAQ bot agent + +#### Signature + +```python +__init__( + faqs: List[Dict[str, str]], + suggest_related: bool = True, + persona: Optional[str] = None, + name: str = 'faq_bot', + route: str = '/faq', + **kwargs = {} +) +``` + +#### Parameters + + + List of FAQ items, each with: + + + + Whether to suggest related questions + + + + Optional custom personality description + + + + Agent name for the route + + + + HTTP route for this agent + + + + +#### Source + +[`signalwire/signalwire/prefabs/faq_bot.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/faq_bot.py) + +Line 47. + +*** + +### on\_summary + +Process the interaction summary + +#### Signature + +```python +on_summary(summary, raw_data = None) +``` + +#### Parameters + + + Summary data from the conversation + + + + The complete raw POST data from the request + + +#### Source + +[`signalwire/signalwire/prefabs/faq_bot.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/faq_bot.py) + +Line 287. + +*** + +### search\_faqs + +Search for FAQs matching a specific query or category + +This function helps find relevant FAQs based on a search query or category. +It returns matching FAQs in order of relevance. + +**Decorators:** `@AgentBase.tool(Any, Any, Any)` + +#### Signature + +```python +search_faqs(args, raw_data) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/prefabs/faq_bot.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/faq_bot.py) + +Line 216. + +## Source + +[`signalwire/signalwire/prefabs/faq_bot.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/faq_bot.py) + +Line 22. diff --git a/fern/products/sdk-reference/python/agents/prefabs/faq-bot/index.mdx b/fern/products/sdk-reference/python/agents/prefabs/faq-bot/index.mdx new file mode 100644 index 0000000000..e249b85a88 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/prefabs/faq-bot/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/agents/prefabs/faq-bot" +title: "faq_bot" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.prefabs.faq_bot" + parent: "signalwire.prefabs" + module: "agents.prefabs" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/faq_bot.py" +--- +# `faq_bot` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module faq_bot +``` + +## Classes + + + + A prefab agent designed to answer frequently asked questions based on a provided list of question/answer pairs. + + + +## Source + +[`signalwire/signalwire/prefabs/faq_bot.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/faq_bot.py) diff --git a/fern/products/sdk-reference/python/agents/prefabs/index.mdx b/fern/products/sdk-reference/python/agents/prefabs/index.mdx new file mode 100644 index 0000000000..7c2318acc9 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/prefabs/index.mdx @@ -0,0 +1,60 @@ +--- +slug: "/reference/python/agents/prefabs" +title: "prefabs" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.prefabs" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/__init__.py" +--- +# `prefabs` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module prefabs +``` + +## Properties + + + +## Modules + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + +## Source + +[`signalwire/signalwire/prefabs/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/__init__.py) diff --git a/fern/products/sdk-reference/python/agents/prefabs/info-gatherer/index.mdx b/fern/products/sdk-reference/python/agents/prefabs/info-gatherer/index.mdx new file mode 100644 index 0000000000..c1f36687c9 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/prefabs/info-gatherer/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/agents/prefabs/info-gatherer" +title: "info_gatherer" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.prefabs.info_gatherer" + parent: "signalwire.prefabs" + module: "agents.prefabs" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/info_gatherer.py" +--- +# `info_gatherer` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module info_gatherer +``` + +## Classes + + + + A prefab agent designed to collect answers to a series of questions. + + + +## Source + +[`signalwire/signalwire/prefabs/info_gatherer.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/info_gatherer.py) diff --git a/fern/products/sdk-reference/python/agents/prefabs/info-gatherer/info-gatherer-agent/index.mdx b/fern/products/sdk-reference/python/agents/prefabs/info-gatherer/info-gatherer-agent/index.mdx new file mode 100644 index 0000000000..5ce83e98ef --- /dev/null +++ b/fern/products/sdk-reference/python/agents/prefabs/info-gatherer/info-gatherer-agent/index.mdx @@ -0,0 +1,222 @@ +--- +slug: "/reference/python/agents/prefabs/info-gatherer/info-gatherer-agent" +title: "InfoGathererAgent" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.prefabs.info_gatherer.InfoGathererAgent" + parent: "signalwire.prefabs.info_gatherer" + module: "agents.prefabs.info_gatherer" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/info_gatherer.py" +--- +# `InfoGathererAgent` + +A prefab agent designed to collect answers to a series of questions. + +This agent will: + +1. Ask if the user is ready to begin +2. Ask each question in sequence +3. Store the answers for later use + +> \[!NOTE] +> agent = InfoGathererAgent( +> questions=\[ +> \{"key\_name": "full\_name", "question\_text": "What is your full name?"\}, +> \{"key\_name": "email", "question\_text": "What is your email address?", "confirm": True\}, +> \{"key\_name": "reason", "question\_text": "How can I help you today?"\} +> ] +> ) + +## Signature + +```python +class InfoGathererAgent(AgentBase) +``` + +## Inheritance + +**Extends:** [AgentBase](/docs/sdk-reference/reference/python/agents/agent-base/index__2) + +## Methods + +### \_\_init\_\_ + +Initialize an information gathering agent + +#### Signature + +```python +__init__( + questions: Optional[List[Dict[str, str]]] = None, + name: str = 'info_gatherer', + route: str = '/info_gatherer', + **kwargs = {} +) +``` + +#### Parameters + + + Optional list of questions to ask. If None, questions will be determined dynamically via a callback function. Each question dict should have: + + + + Agent name for the route + + + + HTTP route for this agent + + + + +#### Source + +[`signalwire/signalwire/prefabs/info_gatherer.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/info_gatherer.py) + +Line 43. + +*** + +### on\_swml\_request + +Handle dynamic configuration using the callback function + +This method is called when SWML is requested and allows us to configure +the agent just-in-time using the provided callback. + +#### Signature + +```python +on_swml_request(request_data = None, callback_path = None, request = None) +``` + +#### Parameters + + + + + + + +#### Source + +[`signalwire/signalwire/prefabs/info_gatherer.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/info_gatherer.py) + +Line 158. + +*** + +### set\_question\_callback + +Set a callback function for dynamic question configuration + +> \[!NOTE] +> def my\_question\_callback(query\_params, body\_params, headers): +> question\_set = query\_params.get('set', 'default') +> if question\_set == 'support': +> return \[ +> \{"key\_name": "name", "question\_text": "What is your name?"\}, +> \{"key\_name": "issue", "question\_text": "What's the issue?"\} +> ] +> else: +> return \[\{"key\_name": "name", "question\_text": "What is your name?"\}] +> +> agent.set\_question\_callback(my\_question\_callback) + +#### Signature + +```python +set_question_callback( + callback: Callable[dict, dict, dict, List[Dict[str, str]]] +) +``` + +#### Parameters + + + Function that takes (query\_params, body\_params, headers) and returns a list of question dictionaries. Each question dict should have: - key\_name: Identifier for storing the answer - question\_text: The actual question to ask the user - confirm: (Optional) If True, agent will confirm answer before submitting + + +#### Examples + +```python +agent.set_question_callback(my_question_callback) +``` + +#### Source + +[`signalwire/signalwire/prefabs/info_gatherer.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/info_gatherer.py) + +Line 93. + +*** + +### start\_questions + +Start the question sequence by retrieving the first question + +This function gets the current question index from global\_data +and returns the corresponding question. + +**Decorators:** `@AgentBase.tool(Any, Any, Any)` + +#### Signature + +```python +start_questions(args, raw_data) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/prefabs/info_gatherer.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/info_gatherer.py) + +Line 258. + +*** + +### submit\_answer + +Submit an answer to the current question and move to the next one + +This function: + +1. Stores the answer in global\_data +2. Increments the question index +3. Returns the next question or completion message + +**Decorators:** `@AgentBase.tool(Any, Any, Any)` + +#### Signature + +```python +submit_answer(args, raw_data) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/prefabs/info_gatherer.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/info_gatherer.py) + +Line 296. + +## Source + +[`signalwire/signalwire/prefabs/info_gatherer.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/info_gatherer.py) + +Line 24. diff --git a/fern/products/sdk-reference/python/agents/prefabs/receptionist/index.mdx b/fern/products/sdk-reference/python/agents/prefabs/receptionist/index.mdx new file mode 100644 index 0000000000..6513033fc3 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/prefabs/receptionist/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/agents/prefabs/receptionist" +title: "receptionist" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.prefabs.receptionist" + parent: "signalwire.prefabs" + module: "agents.prefabs" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/receptionist.py" +--- +# `receptionist` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module receptionist +``` + +## Classes + + + + A prefab agent designed to act as a receptionist that: 1. Greets callers 2. Collects basic information about their needs 3. Transfers them to the appropriate department + + + +## Source + +[`signalwire/signalwire/prefabs/receptionist.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/receptionist.py) diff --git a/fern/products/sdk-reference/python/agents/prefabs/receptionist/receptionist-agent/index.mdx b/fern/products/sdk-reference/python/agents/prefabs/receptionist/receptionist-agent/index.mdx new file mode 100644 index 0000000000..84f4f097bc --- /dev/null +++ b/fern/products/sdk-reference/python/agents/prefabs/receptionist/receptionist-agent/index.mdx @@ -0,0 +1,122 @@ +--- +slug: "/reference/python/agents/prefabs/receptionist/receptionist-agent" +title: "ReceptionistAgent" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.prefabs.receptionist.ReceptionistAgent" + parent: "signalwire.prefabs.receptionist" + module: "agents.prefabs.receptionist" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/receptionist.py" +--- +# `ReceptionistAgent` + +A prefab agent designed to act as a receptionist that: + +1. Greets callers +2. Collects basic information about their needs +3. Transfers them to the appropriate department + +> \[!NOTE] +> agent = ReceptionistAgent( +> departments=\[ +> \{"name": "sales", "description": "For product inquiries, pricing, and purchasing", "number": "+15551235555"\}, +> \{"name": "support", "description": "For technical help and troubleshooting", "number": "+15551236666"\} +> ] +> ) + +## Signature + +```python +class ReceptionistAgent(AgentBase) +``` + +## Inheritance + +**Extends:** [AgentBase](/docs/sdk-reference/reference/python/agents/agent-base/index__2) + +## Methods + +### \_\_init\_\_ + +Initialize a receptionist agent + +#### Signature + +```python +__init__( + departments: List[Dict[str, str]], + name: str = 'receptionist', + route: str = '/receptionist', + greeting: str = 'Thank you for calling. How can I help you today?', + voice: str = 'rime.spore', + **kwargs = {} +) +``` + +#### Parameters + + + List of departments to transfer to, each with: + + + + Agent name for the route + + + + HTTP route for this agent + + + + Initial greeting message + + + + Voice ID to use + + + + +#### Source + +[`signalwire/signalwire/prefabs/receptionist.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/receptionist.py) + +Line 37. + +*** + +### on\_summary + +Process the conversation summary + +#### Signature + +```python +on_summary(summary, raw_data = None) +``` + +#### Parameters + + + Summary data from the conversation + + + + The complete raw POST data from the request + + +#### Source + +[`signalwire/signalwire/prefabs/receptionist.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/receptionist.py) + +Line 278. + +## Source + +[`signalwire/signalwire/prefabs/receptionist.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/receptionist.py) + +Line 21. diff --git a/fern/products/sdk-reference/python/agents/prefabs/survey/index.mdx b/fern/products/sdk-reference/python/agents/prefabs/survey/index.mdx new file mode 100644 index 0000000000..14282c125f --- /dev/null +++ b/fern/products/sdk-reference/python/agents/prefabs/survey/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/agents/prefabs/survey" +title: "survey" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.prefabs.survey" + parent: "signalwire.prefabs" + module: "agents.prefabs" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/survey.py" +--- +# `survey` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module survey +``` + +## Classes + + + + A prefab agent designed to conduct automated surveys with users. + + + +## Source + +[`signalwire/signalwire/prefabs/survey.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/survey.py) diff --git a/fern/products/sdk-reference/python/agents/prefabs/survey/survey-agent/index.mdx b/fern/products/sdk-reference/python/agents/prefabs/survey/survey-agent/index.mdx new file mode 100644 index 0000000000..11adbbbd53 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/prefabs/survey/survey-agent/index.mdx @@ -0,0 +1,225 @@ +--- +slug: "/reference/python/agents/prefabs/survey/survey-agent" +title: "SurveyAgent" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.prefabs.survey.SurveyAgent" + parent: "signalwire.prefabs.survey" + module: "agents.prefabs.survey" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/survey.py" +--- +# `SurveyAgent` + +A prefab agent designed to conduct automated surveys with users. + +This agent will: + +1. Introduce the survey purpose and structure +2. Ask predefined questions in sequence +3. Collect and validate responses +4. Provide a summary of collected responses + +> \[!NOTE] +> agent = SurveyAgent( +> survey\_name="Customer Satisfaction Survey", +> introduction="We'd like to get your feedback on your recent experience.", +> questions=\[ +> \{ +> "id": "satisfaction", +> "text": "How satisfied were you with our service?", +> "type": "rating", +> "scale": 5, +> "required": True +> \}, +> \{ +> "id": "comments", +> "text": "Do you have any additional comments?", +> "type": "open\_ended", +> "required": False +> \} +> ] +> ) + +## Signature + +```python +class SurveyAgent(AgentBase) +``` + +## Inheritance + +**Extends:** [AgentBase](/docs/sdk-reference/reference/python/agents/agent-base/index__2) + +## Properties + + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +Initialize a survey agent + +#### Signature + +```python +__init__( + survey_name: str, + questions: List[Dict[str, Any]], + introduction: Optional[str] = None, + conclusion: Optional[str] = None, + brand_name: Optional[str] = None, + max_retries: int = 2, + name: str = 'survey', + route: str = '/survey', + **kwargs = {} +) +``` + +#### Parameters + + + Name of the survey + + + + List of question objects with the following keys: + + + + Optional custom introduction message + + + + Optional custom conclusion message + + + + Optional brand or company name + + + + Maximum number of times to retry invalid answers + + + + Name for the agent (default: "survey") + + + + HTTP route for the agent (default: "/survey") + + + + +#### Source + +[`signalwire/signalwire/prefabs/survey.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/survey.py) + +Line 55. + +*** + +### log\_response + +Log a validated response to a survey question + +This function would typically connect to a database or API to store the response. +In this example, it just acknowledges that the response was received. + +**Decorators:** `@AgentBase.tool(Any, Any, Any)` + +#### Signature + +```python +log_response(args, raw_data) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/prefabs/survey.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/survey.py) + +Line 314. + +*** + +### on\_summary + +Process the survey results summary + +#### Signature + +```python +on_summary(summary, raw_data = None) +``` + +#### Parameters + + + Summary data containing survey responses + + + + The complete raw POST data from the request + + +#### Source + +[`signalwire/signalwire/prefabs/survey.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/survey.py) + +Line 351. + +*** + +### validate\_response + +Validate if a response meets the requirements for a specific question + +This function checks if a user's response is valid for the specified question +based on the question type and constraints. + +**Decorators:** `@AgentBase.tool(Any, Any, Any)` + +#### Signature + +```python +validate_response(args, raw_data) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/prefabs/survey.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/survey.py) + +Line 246. + +## Source + +[`signalwire/signalwire/prefabs/survey.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/survey.py) + +Line 23. diff --git a/fern/products/sdk-reference/python/agents/search/document-processor/document-processor/index.mdx b/fern/products/sdk-reference/python/agents/search/document-processor/document-processor/index.mdx new file mode 100644 index 0000000000..99addf6cde --- /dev/null +++ b/fern/products/sdk-reference/python/agents/search/document-processor/document-processor/index.mdx @@ -0,0 +1,151 @@ +--- +slug: "/reference/python/agents/search/document-processor/document-processor" +title: "DocumentProcessor" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.search.document_processor.DocumentProcessor" + parent: "signalwire.search.document_processor" + module: "agents.search.document_processor" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/document_processor.py" +--- +# `DocumentProcessor` + +Enhanced document processor with smart chunking capabilities + +## Signature + +```python +class DocumentProcessor +``` + +## Properties + + + + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +Initialize document processor + +#### Signature + +```python +__init__( + chunking_strategy: str = 'sentence', + max_sentences_per_chunk: int = 5, + chunk_size: int = 50, + chunk_overlap: int = 10, + split_newlines: Optional[int] = None, + index_nlp_backend: str = 'nltk', + verbose: bool = False, + semantic_threshold: float = 0.5, + topic_threshold: float = 0.3 +) +``` + +#### Parameters + + + Strategy for chunking documents: + + + + For sentence strategy (default: 5) + + + + For sliding strategy - words per chunk (default: 50) + + + + For sliding strategy - overlap in words (default: 10) + + + + For sentence strategy - split on multiple newlines (optional) + + + + NLP backend for indexing (default: 'nltk') + + + + Whether to enable verbose logging (default: False) + + + + Similarity threshold for semantic chunking (default: 0.5) + + + + Similarity threshold for topic chunking (default: 0.3) + + +#### Source + +[`signalwire/signalwire/search/document_processor.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/document_processor.py) + +Line 82. + +*** + +### create\_chunks + +Create chunks from document content using specified chunking strategy + +#### Signature + +```python +create_chunks( + content: str, + filename: str, + file_type: str +) -> List[Dict[str, Any]] +``` + +#### Parameters + + + Document content (string) - should be the actual content, not a file path + + + + Name of the file (for metadata) + + + + File extension/type + + +#### Returns + +`List[Dict[str, Any]]` — List of chunk dictionaries + +#### Source + +[`signalwire/signalwire/search/document_processor.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/document_processor.py) + +Line 128. + +## Source + +[`signalwire/signalwire/search/document_processor.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/document_processor.py) + +Line 79. diff --git a/fern/products/sdk-reference/python/agents/search/document-processor/index.mdx b/fern/products/sdk-reference/python/agents/search/document-processor/index.mdx new file mode 100644 index 0000000000..99e51707ec --- /dev/null +++ b/fern/products/sdk-reference/python/agents/search/document-processor/index.mdx @@ -0,0 +1,49 @@ +--- +slug: "/reference/python/agents/search/document-processor" +title: "DocumentProcessor" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.search.DocumentProcessor" + parent: "signalwire.search" + module: "agents.search" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/__init__.py" +--- +# `DocumentProcessor` + +## Signature + +```python +class DocumentProcessor +``` + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(*args = (), **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/search/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/__init__.py) + +Line 115. + +## Source + +[`signalwire/signalwire/search/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/__init__.py) + +Line 114. diff --git a/fern/products/sdk-reference/python/agents/search/document-processor/index__2.mdx b/fern/products/sdk-reference/python/agents/search/document-processor/index__2.mdx new file mode 100644 index 0000000000..89de4f6eb2 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/search/document-processor/index__2.mdx @@ -0,0 +1,44 @@ +--- +slug: "/reference/python/agents/search/document-processor/index__2" +title: "document_processor" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.search.document_processor" + parent: "signalwire.search" + module: "agents.search" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/document_processor.py" +--- +# `document_processor` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module document_processor +``` + +## Properties + + + +## Classes + + + + Enhanced document processor with smart chunking capabilities + + + +## Source + +[`signalwire/signalwire/search/document_processor.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/document_processor.py) diff --git a/fern/products/sdk-reference/python/agents/search/index-builder/index-builder/index.mdx b/fern/products/sdk-reference/python/agents/search/index-builder/index-builder/index.mdx new file mode 100644 index 0000000000..31ba9086a7 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/search/index-builder/index-builder/index.mdx @@ -0,0 +1,271 @@ +--- +slug: "/reference/python/agents/search/index-builder/index-builder" +title: "IndexBuilder" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.search.index_builder.IndexBuilder" + parent: "signalwire.search.index_builder" + module: "agents.search.index_builder" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/index_builder.py" +--- +# `IndexBuilder` + +Build searchable indexes from document directories + +## Signature + +```python +class IndexBuilder +``` + +## Properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +Initialize the index builder + +#### Signature + +```python +__init__( + model_name: str = 'sentence-transformers/all-mpnet-base-v2', + chunking_strategy: str = 'sentence', + max_sentences_per_chunk: int = 5, + chunk_size: int = 50, + chunk_overlap: int = 10, + split_newlines: Optional[int] = None, + index_nlp_backend: str = 'nltk', + verbose: bool = False, + semantic_threshold: float = 0.5, + topic_threshold: float = 0.3, + backend: str = 'sqlite', + connection_string: Optional[str] = None +) +``` + +#### Parameters + + + Name of the sentence transformer model to use + + + + Strategy for chunking documents ('sentence', 'sliding', 'paragraph', 'page', 'semantic', 'topic', 'qa', 'json') + + + + For sentence strategy (default: 5) + + + + For sliding strategy - words per chunk (default: 50) + + + + For sliding strategy - overlap in words (default: 10) + + + + For sentence strategy - split on multiple newlines (optional) + + + + NLP backend for indexing (default: 'nltk') + + + + Whether to enable verbose logging (default: False) + + + + Similarity threshold for semantic chunking (default: 0.5) + + + + Similarity threshold for topic chunking (default: 0.3) + + + + Storage backend ('sqlite' or 'pgvector') (default: 'sqlite') + + + + PostgreSQL connection string for pgvector backend + + +#### Source + +[`signalwire/signalwire/search/index_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/index_builder.py) + +Line 38. + +*** + +### build\_index + +Build complete search index from a single directory + +#### Signature + +```python +build_index( + source_dir: str, + output_file: str, + file_types: List[str], + exclude_patterns: Optional[List[str]] = None, + languages: List[str] = None, + tags: Optional[List[str]] = None +) +``` + +#### Parameters + + + Directory to scan for documents + + + + Output .swsearch file path + + + + List of file extensions to include + + + + Glob patterns to exclude + + + + List of languages to support + + + + Global tags to add to all chunks + + +#### Source + +[`signalwire/signalwire/search/index_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/index_builder.py) + +Line 283. + +*** + +### build\_index\_from\_sources + +Build complete search index from multiple sources (files and directories) + +#### Signature + +```python +build_index_from_sources( + sources: List[Path], + output_file: str, + file_types: List[str], + exclude_patterns: Optional[List[str]] = None, + languages: List[str] = None, + tags: Optional[List[str]] = None, + overwrite: bool = False +) +``` + +#### Parameters + + + List of Path objects (files and/or directories) + + + + Output .swsearch file path + + + + List of file extensions to include for directories + + + + Glob patterns to exclude + + + + List of languages to support + + + + Global tags to add to all chunks + + + + +#### Source + +[`signalwire/signalwire/search/index_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/index_builder.py) + +Line 164. + +*** + +### validate\_index + +Validate an existing search index + +#### Signature + +```python +validate_index(index_file: str) -> Dict[str, Any] +``` + +#### Parameters + + + +#### Returns + +`Dict[str, Any]` + +#### Source + +[`signalwire/signalwire/search/index_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/index_builder.py) + +Line 687. + +## Source + +[`signalwire/signalwire/search/index_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/index_builder.py) + +Line 35. diff --git a/fern/products/sdk-reference/python/agents/search/index-builder/index.mdx b/fern/products/sdk-reference/python/agents/search/index-builder/index.mdx new file mode 100644 index 0000000000..3fa1107e47 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/search/index-builder/index.mdx @@ -0,0 +1,49 @@ +--- +slug: "/reference/python/agents/search/index-builder" +title: "IndexBuilder" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.search.IndexBuilder" + parent: "signalwire.search" + module: "agents.search" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/__init__.py" +--- +# `IndexBuilder` + +## Signature + +```python +class IndexBuilder +``` + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(*args = (), **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/search/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/__init__.py) + +Line 119. + +## Source + +[`signalwire/signalwire/search/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/__init__.py) + +Line 118. diff --git a/fern/products/sdk-reference/python/agents/search/index-builder/index__2.mdx b/fern/products/sdk-reference/python/agents/search/index-builder/index__2.mdx new file mode 100644 index 0000000000..9cc2796a19 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/search/index-builder/index__2.mdx @@ -0,0 +1,44 @@ +--- +slug: "/reference/python/agents/search/index-builder/index__2" +title: "index_builder" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.search.index_builder" + parent: "signalwire.search" + module: "agents.search" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/index_builder.py" +--- +# `index_builder` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module index_builder +``` + +## Properties + + + +## Classes + + + + Build searchable indexes from document directories + + + +## Source + +[`signalwire/signalwire/search/index_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/index_builder.py) diff --git a/fern/products/sdk-reference/python/agents/search/index.mdx b/fern/products/sdk-reference/python/agents/search/index.mdx new file mode 100644 index 0000000000..719b442dbb --- /dev/null +++ b/fern/products/sdk-reference/python/agents/search/index.mdx @@ -0,0 +1,128 @@ +--- +slug: "/reference/python/agents/search" +title: "search" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.search" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/__init__.py" +--- +# `search` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module search +``` + +## Properties + + + +## Classes + + + + + + + + + + + +## Modules + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + +## Functions + +### preprocess\_document\_content + +#### Signature + +```python +preprocess_document_content(*args = (), **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/search/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/__init__.py) + +Line 111. + +*** + +### preprocess\_query + +#### Signature + +```python +preprocess_query(*args = (), **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/search/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/__init__.py) + +Line 108. + +## Source + +[`signalwire/signalwire/search/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/__init__.py) diff --git a/fern/products/sdk-reference/python/agents/search/migration/index.mdx b/fern/products/sdk-reference/python/agents/search/migration/index.mdx new file mode 100644 index 0000000000..05a7229762 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/search/migration/index.mdx @@ -0,0 +1,44 @@ +--- +slug: "/reference/python/agents/search/migration" +title: "migration" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.search.migration" + parent: "signalwire.search" + module: "agents.search" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/migration.py" +--- +# `migration` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module migration +``` + +## Properties + + + +## Classes + + + + Migrate search indexes between different backends + + + +## Source + +[`signalwire/signalwire/search/migration.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/migration.py) diff --git a/fern/products/sdk-reference/python/agents/search/migration/search-index-migrator/index.mdx b/fern/products/sdk-reference/python/agents/search/migration/search-index-migrator/index.mdx new file mode 100644 index 0000000000..21627fdcd6 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/search/migration/search-index-migrator/index.mdx @@ -0,0 +1,180 @@ +--- +slug: "/reference/python/agents/search/migration/search-index-migrator" +title: "SearchIndexMigrator" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.search.migration.SearchIndexMigrator" + parent: "signalwire.search.migration" + module: "agents.search.migration" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/migration.py" +--- +# `SearchIndexMigrator` + +Migrate search indexes between different backends + +## Signature + +```python +class SearchIndexMigrator +``` + +## Properties + + + +## Methods + +### \_\_init\_\_ + +Initialize the migrator + +#### Signature + +```python +__init__(verbose: bool = False) +``` + +#### Parameters + + + Enable verbose output + + +#### Source + +[`signalwire/signalwire/search/migration.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/migration.py) + +Line 29. + +*** + +### get\_index\_info + +Get information about a search index + +#### Signature + +```python +get_index_info(index_path: str) -> Dict[str, Any] +``` + +#### Parameters + + + Path to index file or pgvector collection identifier + + +#### Returns + +`Dict[str, Any]` — Index information including type, config, and statistics + +#### Source + +[`signalwire/signalwire/search/migration.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/migration.py) + +Line 382. + +*** + +### migrate\_pgvector\_to\_sqlite + +Migrate a pgvector collection to SQLite .swsearch format + +#### Signature + +```python +migrate_pgvector_to_sqlite( + connection_string: str, + collection_name: str, + output_path: str, + batch_size: int = 100 +) -> Dict[str, Any] +``` + +#### Parameters + + + PostgreSQL connection string + + + + Name of the pgvector collection + + + + Output .swsearch file path + + + + Number of chunks to fetch at once + + +#### Returns + +`Dict[str, Any]` — Migration statistics + +#### Source + +[`signalwire/signalwire/search/migration.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/migration.py) + +Line 237. + +*** + +### migrate\_sqlite\_to\_pgvector + +Migrate a .swsearch SQLite index to pgvector + +#### Signature + +```python +migrate_sqlite_to_pgvector( + sqlite_path: str, + connection_string: str, + collection_name: str, + overwrite: bool = False, + batch_size: int = 100 +) -> Dict[str, Any] +``` + +#### Parameters + + + Path to .swsearch file + + + + PostgreSQL connection string + + + + Name for the pgvector collection + + + + Whether to overwrite existing collection + + + + Number of chunks to insert at once + + +#### Returns + +`Dict[str, Any]` — Migration statistics + +#### Source + +[`signalwire/signalwire/search/migration.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/migration.py) + +Line 38. + +## Source + +[`signalwire/signalwire/search/migration.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/migration.py) + +Line 26. diff --git a/fern/products/sdk-reference/python/agents/search/models/index.mdx b/fern/products/sdk-reference/python/agents/search/models/index.mdx new file mode 100644 index 0000000000..55b8fa8739 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/search/models/index.mdx @@ -0,0 +1,66 @@ +--- +slug: "/reference/python/agents/search/models" +title: "models" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.search.models" + parent: "signalwire.search" + module: "agents.search" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/models.py" +--- +# `models` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module models +``` + +## Constants + + + + + +## Functions + +### resolve\_model\_alias + +Resolve model alias to full model name + +#### Signature + +```python +resolve_model_alias(model_name: str) -> str +``` + +#### Parameters + + + Model name or alias (mini, base, large) + + +#### Returns + +`str` — Full model name + +#### Source + +[`signalwire/signalwire/search/models.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/models.py) + +Line 20. + +## Source + +[`signalwire/signalwire/search/models.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/models.py) diff --git a/fern/products/sdk-reference/python/agents/search/pgvector-backend/index.mdx b/fern/products/sdk-reference/python/agents/search/pgvector-backend/index.mdx new file mode 100644 index 0000000000..ee4b7eb594 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/search/pgvector-backend/index.mdx @@ -0,0 +1,52 @@ +--- +slug: "/reference/python/agents/search/pgvector-backend" +title: "pgvector_backend" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.search.pgvector_backend" + parent: "signalwire.search" + module: "agents.search" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/pgvector_backend.py" +--- +# `pgvector_backend` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module pgvector_backend +``` + +## Properties + + + +## Constants + + + +## Classes + + + + PostgreSQL pgvector backend for search indexing and retrieval + + + + PostgreSQL pgvector backend for search operations + + + +## Source + +[`signalwire/signalwire/search/pgvector_backend.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/pgvector_backend.py) diff --git a/fern/products/sdk-reference/python/agents/search/pgvector-backend/pg-vector-backend/index.mdx b/fern/products/sdk-reference/python/agents/search/pgvector-backend/pg-vector-backend/index.mdx new file mode 100644 index 0000000000..10c9ee83dd --- /dev/null +++ b/fern/products/sdk-reference/python/agents/search/pgvector-backend/pg-vector-backend/index.mdx @@ -0,0 +1,211 @@ +--- +slug: "/reference/python/agents/search/pgvector-backend/pg-vector-backend" +title: "PgVectorBackend" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.search.pgvector_backend.PgVectorBackend" + parent: "signalwire.search.pgvector_backend" + module: "agents.search.pgvector_backend" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/pgvector_backend.py" +--- +# `PgVectorBackend` + +PostgreSQL pgvector backend for search indexing and retrieval + +## Signature + +```python +class PgVectorBackend +``` + +## Properties + + + + + +## Methods + +### \_\_init\_\_ + +Initialize pgvector backend + +#### Signature + +```python +__init__(connection_string: str) +``` + +#### Parameters + + + PostgreSQL connection string + + +#### Source + +[`signalwire/signalwire/search/pgvector_backend.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/pgvector_backend.py) + +Line 45. + +*** + +### close + +Close database connection + +#### Signature + +```python +close() +``` + +#### Source + +[`signalwire/signalwire/search/pgvector_backend.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/pgvector_backend.py) + +Line 396. + +*** + +### create\_schema + +Create database schema for a collection + +#### Signature + +```python +create_schema(collection_name: str, embedding_dim: int = 768) +``` + +#### Parameters + + + Name of the collection + + + + Dimension of embeddings + + +#### Source + +[`signalwire/signalwire/search/pgvector_backend.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/pgvector_backend.py) + +Line 84. + +*** + +### delete\_collection + +Delete a collection and its data + +#### Signature + +```python +delete_collection(collection_name: str) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/search/pgvector_backend.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/pgvector_backend.py) + +Line 378. + +*** + +### get\_stats + +Get statistics for a collection + +#### Signature + +```python +get_stats(collection_name: str) -> Dict[str, Any] +``` + +#### Parameters + + + +#### Returns + +`Dict[str, Any]` + +#### Source + +[`signalwire/signalwire/search/pgvector_backend.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/pgvector_backend.py) + +Line 328. + +*** + +### list\_collections + +List all collections in the database + +#### Signature + +```python +list_collections() -> List[str] +``` + +#### Returns + +`List[str]` + +#### Source + +[`signalwire/signalwire/search/pgvector_backend.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/pgvector_backend.py) + +Line 370. + +*** + +### store\_chunks + +Store document chunks in the database + +#### Signature + +```python +store_chunks( + chunks: List[Dict[str, Any]], + collection_name: str, + config: Dict[str, Any] +) +``` + +#### Parameters + + + List of processed chunks with embeddings + + + + Name of the collection + + + + Configuration metadata + + +#### Source + +[`signalwire/signalwire/search/pgvector_backend.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/pgvector_backend.py) + +Line 209. + +## Source + +[`signalwire/signalwire/search/pgvector_backend.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/pgvector_backend.py) + +Line 42. diff --git a/fern/products/sdk-reference/python/agents/search/pgvector-backend/pg-vector-search-backend/index.mdx b/fern/products/sdk-reference/python/agents/search/pgvector-backend/pg-vector-search-backend/index.mdx new file mode 100644 index 0000000000..6c093b289c --- /dev/null +++ b/fern/products/sdk-reference/python/agents/search/pgvector-backend/pg-vector-search-backend/index.mdx @@ -0,0 +1,230 @@ +--- +slug: "/reference/python/agents/search/pgvector-backend/pg-vector-search-backend" +title: "PgVectorSearchBackend" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.search.pgvector_backend.PgVectorSearchBackend" + parent: "signalwire.search.pgvector_backend" + module: "agents.search.pgvector_backend" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/pgvector_backend.py" +--- +# `PgVectorSearchBackend` + +PostgreSQL pgvector backend for search operations + +## Signature + +```python +class PgVectorSearchBackend +``` + +## Properties + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +Initialize search backend + +#### Signature + +```python +__init__(connection_string: str, collection_name: str) +``` + +#### Parameters + + + PostgreSQL connection string + + + + Name of the collection to search + + +#### Source + +[`signalwire/signalwire/search/pgvector_backend.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/pgvector_backend.py) + +Line 406. + +*** + +### close + +Close database connection + +#### Signature + +```python +close() +``` + +#### Source + +[`signalwire/signalwire/search/pgvector_backend.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/pgvector_backend.py) + +Line 1010. + +*** + +### fetch\_candidates + +Fetch raw candidates with per-source signal scores. + +Runs vector/keyword/metadata/filename searches, applies similarity +threshold to raw vector scores pre-merge (keeps threshold intuitive), +and merges into a candidate list keyed by chunk id. Does NOT compute +final scores, boost exact matches, dedupe, or apply diversity - +those run uniformly in SearchEngine for every backend. + +Result shape per candidate (matches sqlite path): +\{ +'id', 'content', 'metadata': \{filename, section, tags, \*\*custom\}, +'search\_type', 'vector\_score' (if vector matched), +'vector\_distance' (if vector matched), +'sources': \{source\_type: True, ...\}, +'source\_scores': \{source\_type: raw\_score, ...\}, +\} + +#### Signature + +```python +fetch_candidates( + query_vector: List[float], + enhanced_text: str, + count: int, + similarity_threshold: float = 0.0, + tags: Optional[List[str]] = None, + original_query: Optional[str] = None +) -> List[Dict[str, Any]] +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`List[Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/search/pgvector_backend.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/pgvector_backend.py) + +Line 847. + +*** + +### get\_stats + +Get statistics for the collection + +#### Signature + +```python +get_stats() -> Dict[str, Any] +``` + +#### Returns + +`Dict[str, Any]` + +#### Source + +[`signalwire/signalwire/search/pgvector_backend.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/pgvector_backend.py) + +Line 1003. + +*** + +### search + +Perform hybrid search (vector + keyword + metadata). + +NOTE: As of the unified-pipeline refactor, production traffic flows +through SearchEngine.search() which calls fetch\_candidates() here +and then runs all post-processing (scoring, dedup, diversity) in +SearchEngine. This method remains as a self-contained search path +for direct backend use and test coverage, but does NOT receive the +SearchEngine's exact-match boost, filename diversity, or match-type +diversity logic. For consistent behavior, call SearchEngine.search(). + +#### Signature + +```python +search( + query_vector: List[float], + enhanced_text: str, + count: int = 5, + similarity_threshold: float = 0.0, + tags: Optional[List[str]] = None, + keyword_weight: Optional[float] = None +) -> List[Dict[str, Any]] +``` + +#### Parameters + + + Embedding vector for the query + + + + Processed query text for keyword search + + + + Number of results to return + + + + Minimum similarity score + + + + Filter by tags + + + + Manual keyword weight (0.0-1.0). If None, uses default weighting + + +#### Returns + +`List[Dict[str, Any]]` — List of search results with scores and metadata + +#### Source + +[`signalwire/signalwire/search/pgvector_backend.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/pgvector_backend.py) + +Line 471. + +## Source + +[`signalwire/signalwire/search/pgvector_backend.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/pgvector_backend.py) + +Line 403. diff --git a/fern/products/sdk-reference/python/agents/search/query-processor/index.mdx b/fern/products/sdk-reference/python/agents/search/query-processor/index.mdx new file mode 100644 index 0000000000..7a7c5310ed --- /dev/null +++ b/fern/products/sdk-reference/python/agents/search/query-processor/index.mdx @@ -0,0 +1,362 @@ +--- +slug: "/reference/python/agents/search/query-processor" +title: "query_processor" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.search.query_processor" + parent: "signalwire.search" + module: "agents.search" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/query_processor.py" +--- +# `query_processor` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module query_processor +``` + +## Properties + + + + + + + +## Functions + +### detect\_language + +Detect language of input text +Simple implementation - can be enhanced with langdetect library + +#### Signature + +```python +detect_language(text: str) -> str +``` + +#### Parameters + + + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/search/query_processor.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/query_processor.py) + +Line 25. + +*** + +### ensure\_nltk\_resources + +Download required NLTK resources if not already present + +#### Signature + +```python +ensure_nltk_resources() +``` + +#### Source + +[`signalwire/signalwire/search/query_processor.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/query_processor.py) + +Line 195. + +*** + +### get\_synonyms + +Get synonyms for a word using WordNet + +#### Signature + +```python +get_synonyms(word: str, pos_tag: str, max_synonyms: int = 5) -> List[str] +``` + +#### Parameters + + + + + + + +#### Returns + +`List[str]` + +#### Source + +[`signalwire/signalwire/search/query_processor.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/query_processor.py) + +Line 236. + +*** + +### get\_wordnet\_pos + +Map spaCy POS tags to WordNet POS tags. + +#### Signature + +```python +get_wordnet_pos(spacy_pos) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/search/query_processor.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/query_processor.py) + +Line 232. + +*** + +### load\_spacy\_model + +Load spaCy model for the given language +Returns None if spaCy is not available or model not found + +#### Signature + +```python +load_spacy_model(language: str) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/search/query_processor.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/query_processor.py) + +Line 44. + +*** + +### preprocess\_document\_content + +Preprocess document content for better searchability + +#### Signature + +```python +preprocess_document_content( + content: str, + language: str = 'en', + nlp_backend: str = None, + index_nlp_backend: str = 'nltk' +) -> Dict[str, Any] +``` + +#### Parameters + + + Document content to process + + + + Language code for processing + + + + DEPRECATED - use index\_nlp\_backend instead + + + + NLP backend for document processing ('nltk' for fast, 'spacy' for better quality) + + +#### Returns + +`Dict[str, Any]` — Dict containing enhanced text and extracted keywords + +#### Source + +[`signalwire/signalwire/search/query_processor.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/query_processor.py) + +Line 462. + +*** + +### preprocess\_query + +Advanced query preprocessing with language detection, POS tagging, synonym expansion, and vectorization + +#### Signature + +```python +preprocess_query( + query: str, + language: str = 'en', + pos_to_expand: Optional[List[str]] = None, + max_synonyms: int = 5, + debug: bool = False, + vector: bool = False, + vectorize_query_param: bool = False, + nlp_backend: str = None, + query_nlp_backend: str = 'nltk', + model_name: str = None, + preserve_original: bool = True +) -> Dict[str, Any] +``` + +#### Parameters + + + Input query string + + + + Language code ('en', 'es', etc.) or 'auto' for detection + + + + List of POS tags to expand with synonyms + + + + Maximum synonyms per word + + + + Enable debug output + + + + Include vector embedding in output + + + + If True, just vectorize without other processing + + + + DEPRECATED - use query\_nlp\_backend instead + + + + NLP backend for query processing ('nltk' for fast, 'spacy' for better quality) + + + + + + +#### Returns + +`Dict[str, Any]` — Dict containing processed query, language, POS tags, and optionally vector + +#### Source + +[`signalwire/signalwire/search/query_processor.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/query_processor.py) + +Line 276. + +*** + +### remove\_duplicate\_words + +Remove duplicate words from the input string while preserving the order and punctuation. + +#### Signature + +```python +remove_duplicate_words(input_string: str) -> str +``` + +#### Parameters + + + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/search/query_processor.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/query_processor.py) + +Line 255. + +*** + +### set\_global\_model + +Legacy function - adds model to cache instead of setting globally + +#### Signature + +```python +set_global_model(model) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/search/query_processor.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/query_processor.py) + +Line 86. + +*** + +### vectorize\_query + +Vectorize query using sentence transformers +Returns numpy array of embeddings + +#### Signature + +```python +vectorize_query(query: str, model = None, model_name: str = None) +``` + +#### Parameters + + + Query string to vectorize + + + + Optional pre-loaded model instance. If not provided, uses cached model. + + + + Optional model name to use if loading a new model + + +#### Source + +[`signalwire/signalwire/search/query_processor.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/query_processor.py) + +Line 145. + +## Source + +[`signalwire/signalwire/search/query_processor.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/query_processor.py) diff --git a/fern/products/sdk-reference/python/agents/search/search-engine/index.mdx b/fern/products/sdk-reference/python/agents/search/search-engine/index.mdx new file mode 100644 index 0000000000..8c54eb71f2 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/search/search-engine/index.mdx @@ -0,0 +1,49 @@ +--- +slug: "/reference/python/agents/search/search-engine" +title: "SearchEngine" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.search.SearchEngine" + parent: "signalwire.search" + module: "agents.search" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/__init__.py" +--- +# `SearchEngine` + +## Signature + +```python +class SearchEngine +``` + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(*args = (), **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/search/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/__init__.py) + +Line 123. + +## Source + +[`signalwire/signalwire/search/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/__init__.py) + +Line 122. diff --git a/fern/products/sdk-reference/python/agents/search/search-engine/index__2.mdx b/fern/products/sdk-reference/python/agents/search/search-engine/index__2.mdx new file mode 100644 index 0000000000..da946a3a5a --- /dev/null +++ b/fern/products/sdk-reference/python/agents/search/search-engine/index__2.mdx @@ -0,0 +1,46 @@ +--- +slug: "/reference/python/agents/search/search-engine/index__2" +title: "search_engine" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.search.search_engine" + parent: "signalwire.search" + module: "agents.search" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_engine.py" +--- +# `search_engine` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module search_engine +``` + +## Properties + + + + + +## Classes + + + + Hybrid search engine for vector and keyword search + + + +## Source + +[`signalwire/signalwire/search/search_engine.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_engine.py) diff --git a/fern/products/sdk-reference/python/agents/search/search-engine/search-engine/index.mdx b/fern/products/sdk-reference/python/agents/search/search-engine/search-engine/index.mdx new file mode 100644 index 0000000000..289bb603de --- /dev/null +++ b/fern/products/sdk-reference/python/agents/search/search-engine/search-engine/index.mdx @@ -0,0 +1,180 @@ +--- +slug: "/reference/python/agents/search/search-engine/search-engine" +title: "SearchEngine" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.search.search_engine.SearchEngine" + parent: "signalwire.search.search_engine" + module: "agents.search.search_engine" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_engine.py" +--- +# `SearchEngine` + +Hybrid search engine for vector and keyword search + +## Signature + +```python +class SearchEngine +``` + +## Properties + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +Initialize search engine + +#### Signature + +```python +__init__( + backend: str = 'sqlite', + index_path: Optional[str] = None, + connection_string: Optional[str] = None, + collection_name: Optional[str] = None, + model = None +) +``` + +#### Parameters + + + Storage backend ('sqlite' or 'pgvector') + + + + Path to .swsearch file (for sqlite backend) + + + + PostgreSQL connection string (for pgvector backend) + + + + Collection name (for pgvector backend) + + + + Optional sentence transformer model + + +#### Source + +[`signalwire/signalwire/search/search_engine.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_engine.py) + +Line 30. + +*** + +### get\_stats + +Get statistics about the search index + +#### Signature + +```python +get_stats() -> Dict[str, Any] +``` + +#### Returns + +`Dict[str, Any]` + +#### Source + +[`signalwire/signalwire/search/search_engine.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_engine.py) + +Line 1346. + +*** + +### search + +Unified hybrid search: backends fetch candidates, SearchEngine post-processes. + +> \[!NOTE] +> +> 1. fetch\_candidates(k = count \* search\_multiplier) — per-source signals +> 2. \_process\_candidates — score / boost / dedupe / diversity +> 3. return top `count` + +Backends (sqlite, pgvector, future) only implement candidate fetching. +All quality logic (max-signal scoring with agreement boost, exact-match +boosting, content dedup, filename diversity, match-type diversity) runs +once here and therefore applies to every backend uniformly. + +#### Signature + +```python +search( + query_vector: List[float], + enhanced_text: str, + count: int = 3, + similarity_threshold: float = 0.0, + tags: Optional[List[str]] = None, + keyword_weight: Optional[float] = None, + original_query: Optional[str] = None +) -> List[Dict[str, Any]] +``` + +#### Parameters + + + Embedding vector for the query + + + + Processed query text for keyword search + + + + Number of results to return + + + + Minimum similarity score (applied to raw vector pre-merge so the threshold is intuitive) + + + + Filter by tags + + + + Accepted for API stability; scoring is max-signal-wins with agreement boost, so this is no-op currently + + + + Original query for exact matching / filename match + + +#### Returns + +`List[Dict[str, Any]]` — List of search results with scores and metadata + +#### Source + +[`signalwire/signalwire/search/search_engine.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_engine.py) + +Line 79. + +## Source + +[`signalwire/signalwire/search/search_engine.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_engine.py) + +Line 27. diff --git a/fern/products/sdk-reference/python/agents/search/search-service/index.mdx b/fern/products/sdk-reference/python/agents/search/search-service/index.mdx new file mode 100644 index 0000000000..07c4f68df3 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/search/search-service/index.mdx @@ -0,0 +1,49 @@ +--- +slug: "/reference/python/agents/search/search-service" +title: "SearchService" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.search.SearchService" + parent: "signalwire.search" + module: "agents.search" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/__init__.py" +--- +# `SearchService` + +## Signature + +```python +class SearchService +``` + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(*args = (), **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/search/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/__init__.py) + +Line 127. + +## Source + +[`signalwire/signalwire/search/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/__init__.py) + +Line 126. diff --git a/fern/products/sdk-reference/python/agents/search/search-service/index__2.mdx b/fern/products/sdk-reference/python/agents/search/search-service/index__2.mdx new file mode 100644 index 0000000000..87c18bcf2a --- /dev/null +++ b/fern/products/sdk-reference/python/agents/search/search-service/index__2.mdx @@ -0,0 +1,50 @@ +--- +slug: "/reference/python/agents/search/search-service/index__2" +title: "search_service" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.search.search_service" + parent: "signalwire.search" + module: "agents.search" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_service.py" +--- +# `search_service` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module search_service +``` + +## Properties + + + +## Classes + + + + + + + + + + Local search service with HTTP API supporting both SQLite and pgvector backends + + + +## Source + +[`signalwire/signalwire/search/search_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_service.py) diff --git a/fern/products/sdk-reference/python/agents/search/search-service/search-request/index.mdx b/fern/products/sdk-reference/python/agents/search/search-service/search-request/index.mdx new file mode 100644 index 0000000000..b23f14559c --- /dev/null +++ b/fern/products/sdk-reference/python/agents/search/search-service/search-request/index.mdx @@ -0,0 +1,78 @@ +--- +slug: "/reference/python/agents/search/search-service/search-request" +title: "SearchRequest" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.search.search_service.SearchRequest" + parent: "signalwire.search.search_service" + module: "agents.search.search_service" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_service.py" +--- +# `SearchRequest` + +## Signature + +```python +class SearchRequest +``` + +## Properties + + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + query: str, + index_name: str = 'default', + count: int = 3, + similarity_threshold: float = 0.0, + tags: Optional[List[str]] = None, + language: Optional[str] = None +) +``` + +#### Parameters + + + + + + + + + + + + + +#### Source + +[`signalwire/signalwire/search/search_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_service.py) + +Line 68. + +## Source + +[`signalwire/signalwire/search/search_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_service.py) + +Line 67. diff --git a/fern/products/sdk-reference/python/agents/search/search-service/search-response/index.mdx b/fern/products/sdk-reference/python/agents/search/search-service/search-response/index.mdx new file mode 100644 index 0000000000..6e7817e0e7 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/search/search-service/search-response/index.mdx @@ -0,0 +1,58 @@ +--- +slug: "/reference/python/agents/search/search-service/search-response" +title: "SearchResponse" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.search.search_service.SearchResponse" + parent: "signalwire.search.search_service" + module: "agents.search.search_service" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_service.py" +--- +# `SearchResponse` + +## Signature + +```python +class SearchResponse +``` + +## Properties + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + results: List[SearchResult], + query_analysis: Optional[Dict[str, Any]] = None +) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/search/search_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_service.py) + +Line 85. + +## Source + +[`signalwire/signalwire/search/search_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_service.py) + +Line 84. diff --git a/fern/products/sdk-reference/python/agents/search/search-service/search-result/index.mdx b/fern/products/sdk-reference/python/agents/search/search-service/search-result/index.mdx new file mode 100644 index 0000000000..873d856085 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/search/search-service/search-result/index.mdx @@ -0,0 +1,59 @@ +--- +slug: "/reference/python/agents/search/search-service/search-result" +title: "SearchResult" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.search.search_service.SearchResult" + parent: "signalwire.search.search_service" + module: "agents.search.search_service" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_service.py" +--- +# `SearchResult` + +## Signature + +```python +class SearchResult +``` + +## Properties + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(content: str, score: float, metadata: Dict[str, Any]) +``` + +#### Parameters + + + + + + + +#### Source + +[`signalwire/signalwire/search/search_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_service.py) + +Line 79. + +## Source + +[`signalwire/signalwire/search/search_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_service.py) + +Line 78. diff --git a/fern/products/sdk-reference/python/agents/search/search-service/search-service/index.mdx b/fern/products/sdk-reference/python/agents/search/search-service/search-service/index.mdx new file mode 100644 index 0000000000..0f52095545 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/search/search-service/search-service/index.mdx @@ -0,0 +1,186 @@ +--- +slug: "/reference/python/agents/search/search-service/search-service" +title: "SearchService" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.search.search_service.SearchService" + parent: "signalwire.search.search_service" + module: "agents.search.search_service" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_service.py" +--- +# `SearchService` + +Local search service with HTTP API supporting both SQLite and pgvector backends + +## Signature + +```python +class SearchService +``` + +## Properties + + + + + + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + port: int = 8001, + indexes: Dict[str, str] = None, + basic_auth: Optional[Tuple[str, str]] = None, + config_file: Optional[str] = None, + backend: str = 'sqlite', + connection_string: Optional[str] = None +) +``` + +#### Parameters + + + + + + + + + + + + + +#### Source + +[`signalwire/signalwire/search/search_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_service.py) + +Line 103. + +*** + +### search\_direct + +Direct search method (non-async) for programmatic use + +#### Signature + +```python +search_direct( + query: str, + index_name: str = 'default', + count: int = 3, + distance: float = 0.0, + tags: Optional[List[str]] = None, + language: Optional[str] = None +) -> Dict[str, Any] +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`Dict[str, Any]` + +#### Source + +[`signalwire/signalwire/search/search_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_service.py) + +Line 483. + +*** + +### start + +Start the service with optional HTTPS support. + +#### Signature + +```python +start( + host: str = '0.0.0.0', + port: Optional[int] = None, + ssl_cert: Optional[str] = None, + ssl_key: Optional[str] = None +) +``` + +#### Parameters + + + Host to bind to (default: "0.0.0.0") + + + + Port to bind to (default: self.port) + + + + Path to SSL certificate file (overrides environment) + + + + Path to SSL key file (overrides environment) + + +#### Source + +[`signalwire/signalwire/search/search_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_service.py) + +Line 521. + +*** + +### stop + +Stop the service (placeholder for cleanup) + +#### Signature + +```python +stop() +``` + +#### Source + +[`signalwire/signalwire/search/search_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_service.py) + +Line 585. + +## Source + +[`signalwire/signalwire/search/search_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_service.py) + +Line 100. diff --git a/fern/products/sdk-reference/python/agents/skill-base/index.mdx b/fern/products/sdk-reference/python/agents/skill-base/index.mdx new file mode 100644 index 0000000000..23f4525607 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/skill-base/index.mdx @@ -0,0 +1,32 @@ +--- +slug: "/reference/python/agents/skill-base" +title: "skill_base" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.skill_base" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py" +--- +# `skill_base` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module skill_base +``` + +## Source + +[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) diff --git a/fern/products/sdk-reference/python/agents/skill-base/index__2.mdx b/fern/products/sdk-reference/python/agents/skill-base/index__2.mdx new file mode 100644 index 0000000000..ab6747c97a --- /dev/null +++ b/fern/products/sdk-reference/python/agents/skill-base/index__2.mdx @@ -0,0 +1,436 @@ +--- +slug: "/reference/python/agents/skill-base/index__2" +title: "SkillBase" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.core.skill_base.SkillBase" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py" +--- +# `SkillBase` + +Abstract base class for all agent skills + +## Signature + +```python +class SkillBase(ABC) +``` + +## Inheritance + +**Extends:** `ABC` + +## Properties + + + + + + + + + + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(agent: AgentBase, params: Optional[Dict[str, Any]] = None) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) + +Line 32. + +*** + +### cleanup + +Cleanup when skill is removed or agent shuts down + +#### Signature + +```python +cleanup() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) + +Line 99. + +*** + +### define\_tool + +Wrapper method that automatically includes swaig\_fields when defining tools. + +This method delegates to self.agent.define\_tool() but automatically merges +any swaig\_fields configured for this skill. Skills should use this method +instead of calling self.agent.define\_tool() directly. + +#### Signature + +```python +define_tool(**kwargs = {}) -> None +``` + +#### Parameters + + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) + +Line 58. + +*** + +### get\_global\_data + +Return data to add to agent's global context + +#### Signature + +```python +get_global_data() -> Dict[str, Any] +``` + +#### Returns + +`Dict[str, Any]` + +#### Source + +[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) + +Line 84. + +*** + +### get\_hints + +Return speech recognition hints for this skill + +#### Signature + +```python +get_hints() -> List[str] +``` + +#### Returns + +`List[str]` + +#### Source + +[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) + +Line 80. + +*** + +### get\_instance\_key + +Get the key used to track this skill instance + +For skills that support multiple instances (SUPPORTS\_MULTIPLE\_INSTANCES = True), +this method can be overridden to provide a unique key for each instance. + +Default implementation: + +- If SUPPORTS\_MULTIPLE\_INSTANCES is False: returns SKILL\_NAME +- If SUPPORTS\_MULTIPLE\_INSTANCES is True: returns SKILL\_NAME + "\_" + tool\_name + (where tool\_name comes from params\['tool\_name'] or defaults to the skill name) + +#### Signature + +```python +get_instance_key() -> str +``` + +#### Returns + +`str` — Unique key for this skill instance + +#### Source + +[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) + +Line 126. + +*** + +### get\_parameter\_schema + +Get the parameter schema for this skill + +This method returns metadata about all parameters the skill accepts, +including their types, descriptions, default values, and whether they +are required or should be hidden (e.g., API keys). + +The base implementation provides common parameters available to all skills. +Subclasses should override this method and merge their specific parameters +with the base schema. + +> \[!NOTE] +> \{ +> "tool\_name": \{ +> "type": "string", +> "description": "Name for the tool when using multiple instances", +> "default": "my\_skill", +> "required": False +> \}, +> "api\_key": \{ +> "type": "string", +> "description": "API key for the service", +> "required": True, +> "hidden": True, +> "env\_var": "MY\_API\_KEY" +> \} +> \} + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +get_parameter_schema() -> Dict[str, Dict[str, Any]] +``` + +#### Returns + +`Dict[str, Dict[str, Any]]` — Dict\[str, Dict\[str, Any]]: Parameter schema where keys are parameter names and values are dictionaries containing: + +#### Source + +[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) + +Line 197. + +*** + +### get\_prompt\_sections + +Return prompt sections to add to agent. +Returns empty list if skip\_prompt is set to True in params. + +#### Signature + +```python +get_prompt_sections() -> List[Dict[str, Any]] +``` + +#### Returns + +`List[Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) + +Line 88. + +*** + +### get\_skill\_data + +Read this skill instance's namespaced data from raw\_data global\_data. + +#### Signature + +```python +get_skill_data(raw_data: Dict[str, Any]) -> Dict[str, Any] +``` + +#### Parameters + + + The raw\_data dict passed to SWAIG function handlers, expected to contain a 'global\_data' key. + + +#### Returns + +`Dict[str, Any]` — The skill's namespaced state, or empty dict if not found. + +#### Source + +[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) + +Line 164. + +*** + +### register\_tools + +Register SWAIG tools with the agent + +**Modifiers:** `abstract` + +#### Signature + +```python +register_tools() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) + +Line 53. + +*** + +### setup + +Setup the skill (validate env vars, initialize APIs, etc.) +Returns True if setup successful, False otherwise + +**Modifiers:** `abstract` + +#### Signature + +```python +setup() -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) + +Line 45. + +*** + +### update\_skill\_data + +Write this skill instance's namespaced data into a FunctionResult. + +Wraps the data under the skill's namespace key and calls +result.update\_global\_data(). + +#### Signature + +```python +update_skill_data( + result: FunctionResult, + data: Dict[str, Any] +) -> FunctionResult +``` + +#### Parameters + + + The FunctionResult to add the global\_data update to. + + + + The skill state dict to store under the namespace. + + +#### Returns + +`FunctionResult` — The result, for method chaining. + +#### Source + +[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) + +Line 179. + +*** + +### validate\_env\_vars + +Check if all required environment variables are set + +#### Signature + +```python +validate_env_vars() -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) + +Line 103. + +*** + +### validate\_packages + +Check if all required packages are available + +#### Signature + +```python +validate_packages() -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) + +Line 112. + +## Source + +[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) + +Line 19. diff --git a/fern/products/sdk-reference/python/agents/skill-manager/index.mdx b/fern/products/sdk-reference/python/agents/skill-manager/index.mdx new file mode 100644 index 0000000000..a7ee1fef1b --- /dev/null +++ b/fern/products/sdk-reference/python/agents/skill-manager/index.mdx @@ -0,0 +1,32 @@ +--- +slug: "/reference/python/agents/skill-manager" +title: "skill_manager" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.skill_manager" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_manager.py" +--- +# `skill_manager` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module skill_manager +``` + +## Source + +[`signalwire/signalwire/core/skill_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_manager.py) diff --git a/fern/products/sdk-reference/python/agents/skill-manager/index__2.mdx b/fern/products/sdk-reference/python/agents/skill-manager/index__2.mdx new file mode 100644 index 0000000000..f33a85e162 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/skill-manager/index__2.mdx @@ -0,0 +1,203 @@ +--- +slug: "/reference/python/agents/skill-manager/index__2" +title: "SkillManager" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.core.skill_manager.SkillManager" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_manager.py" +--- +# `SkillManager` + +Manages loading and lifecycle of agent skills + +## Signature + +```python +class SkillManager +``` + +## Properties + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(agent) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/core/skill_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_manager.py) + +Line 17. + +*** + +### get\_skill + +Get a loaded skill instance by identifier + +#### Signature + +```python +get_skill(skill_identifier: str) -> Optional[SkillBase] +``` + +#### Parameters + + + Either a skill name or an instance key + + +#### Returns + +`Optional[SkillBase]` — The skill instance if found, None otherwise + +#### Source + +[`signalwire/signalwire/core/skill_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_manager.py) + +Line 228. + +*** + +### has\_skill + +Check if skill is currently loaded + +#### Signature + +```python +has_skill(skill_identifier: str) -> bool +``` + +#### Parameters + + + Either a skill name or an instance key + + +#### Returns + +`bool` — True if loaded, False otherwise + +#### Source + +[`signalwire/signalwire/core/skill_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_manager.py) + +Line 212. + +*** + +### list\_loaded\_skills + +List instance keys of currently loaded skills + +#### Signature + +```python +list_loaded_skills() -> List[str] +``` + +#### Returns + +`List[str]` + +#### Source + +[`signalwire/signalwire/core/skill_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_manager.py) + +Line 208. + +*** + +### load\_skill + +Load and setup a skill by name + +#### Signature + +```python +load_skill( + skill_name: str, + skill_class: Type[SkillBase] = None, + params: Optional[Dict[str, Any]] = None +) -> tuple[bool, str] +``` + +#### Parameters + + + Name of the skill to load + + + + Optional skill class (if not provided, will try to find it) + + + + Optional parameters to pass to the skill + + +#### Returns + +`tuple[bool, str]` — (success, error\_message) - error\_message is empty string if successful + +#### Source + +[`signalwire/signalwire/core/skill_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_manager.py) + +Line 22. + +*** + +### unload\_skill + +Unload a skill and cleanup + +#### Signature + +```python +unload_skill(skill_identifier: str) -> bool +``` + +#### Parameters + + + Either a skill name or an instance key + + +#### Returns + +`bool` — True if successfully unloaded, False otherwise + +#### Source + +[`signalwire/signalwire/core/skill_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_manager.py) + +Line 176. + +## Source + +[`signalwire/signalwire/core/skill_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_manager.py) + +Line 14. diff --git a/fern/products/sdk-reference/python/agents/skills/api-ninjas-trivia/index.mdx b/fern/products/sdk-reference/python/agents/skills/api-ninjas-trivia/index.mdx new file mode 100644 index 0000000000..95865aee96 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/skills/api-ninjas-trivia/index.mdx @@ -0,0 +1,44 @@ +--- +slug: "/reference/python/agents/skills/api-ninjas-trivia" +title: "api_ninjas_trivia" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.api_ninjas_trivia" + parent: "signalwire.skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/api_ninjas_trivia/__init__.py" +--- +# `api_ninjas_trivia` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module api_ninjas_trivia +``` + +## Properties + + + +## Modules + + + + Copyright (c) 2025 SignalWire + + + +## Source + +[`signalwire/signalwire/skills/api_ninjas_trivia/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/api_ninjas_trivia/__init__.py) diff --git a/fern/products/sdk-reference/python/agents/skills/api-ninjas-trivia/skill/api-ninjas-trivia-skill/index.mdx b/fern/products/sdk-reference/python/agents/skills/api-ninjas-trivia/skill/api-ninjas-trivia-skill/index.mdx new file mode 100644 index 0000000000..ba2b760880 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/skills/api-ninjas-trivia/skill/api-ninjas-trivia-skill/index.mdx @@ -0,0 +1,227 @@ +--- +slug: "/reference/python/agents/skills/api-ninjas-trivia/skill/api-ninjas-trivia-skill" +title: "ApiNinjasTriviaSkill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.skills.api_ninjas_trivia.skill.ApiNinjasTriviaSkill" + parent: "signalwire.skills.api_ninjas_trivia.skill" + module: "agents.skills.api_ninjas_trivia.skill" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/api_ninjas_trivia/skill.py" +--- +# `ApiNinjasTriviaSkill` + +Skill for getting trivia questions from API Ninjas with configurable categories. + +Supports multiple instances with different tool names and category combinations. +Uses DataMap for serverless execution with dynamic enum generation. + +Configuration: + +- tool\_name: Custom name for the generated SWAIG function +- api\_key: API Ninjas API key +- categories: Array of category strings to enable + +Available categories: + +- artliterature: Art and Literature +- language: Language +- sciencenature: Science and Nature +- general: General Knowledge +- fooddrink: Food and Drink +- peopleplaces: People and Places +- geography: Geography +- historyholidays: History and Holidays +- entertainment: Entertainment +- toysgames: Toys and Games +- music: Music +- mathematics: Mathematics +- religionmythology: Religion and Mythology +- sportsleisure: Sports and Leisure + +> \[!NOTE] +> agent.add\_skill("api\_ninjas\_trivia", \{ +> "tool\_name": "get\_science\_trivia", +> "api\_key": "your\_api\_key", +> "categories": \["sciencenature", "mathematics", "general"] +> \}) + +## Signature + +```python +class ApiNinjasTriviaSkill(SkillBase) +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/python/agents/skill-base/index__2) + +## Properties + + + + + + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +Initialize the skill with configuration parameters. + +#### Signature + +```python +__init__(agent, params: Dict[str, Any] = None) +``` + +#### Parameters + + + The agent instance this skill belongs to + + + + Configuration dictionary containing: + + +#### Source + +[`signalwire/signalwire/skills/api_ninjas_trivia/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/api_ninjas_trivia/skill.py) + +Line 81. + +*** + +### get\_instance\_key + +Generate a unique instance key for this skill configuration. + +#### Signature + +```python +get_instance_key() -> str +``` + +#### Returns + +`str` — Unique key combining skill name and tool name + +#### Source + +[`signalwire/signalwire/skills/api_ninjas_trivia/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/api_ninjas_trivia/skill.py) + +Line 139. + +*** + +### get\_parameter\_schema + +Get the parameter schema for the API Ninjas Trivia skill. + +Returns parameter definitions for GUI configuration. + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +get_parameter_schema() -> Dict[str, Dict[str, Any]] +``` + +#### Returns + +`Dict[str, Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/api_ninjas_trivia/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/api_ninjas_trivia/skill.py) + +Line 203. + +*** + +### get\_tools + +Generate the SWAIG tool with DataMap webhook. + +#### Signature + +```python +get_tools() -> List[Dict[str, Any]] +``` + +#### Returns + +`List[Dict[str, Any]]` — List containing the generated tool configuration + +#### Source + +[`signalwire/signalwire/skills/api_ninjas_trivia/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/api_ninjas_trivia/skill.py) + +Line 148. + +*** + +### register\_tools + +Register SWAIG tools with the agent + +#### Signature + +```python +register_tools() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/skills/api_ninjas_trivia/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/api_ninjas_trivia/skill.py) + +Line 130. + +*** + +### setup + +Setup the skill - validates API key is available. + +#### Signature + +```python +setup() -> bool +``` + +#### Returns + +`bool` — True if setup successful + +#### Source + +[`signalwire/signalwire/skills/api_ninjas_trivia/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/api_ninjas_trivia/skill.py) + +Line 120. + +## Source + +[`signalwire/signalwire/skills/api_ninjas_trivia/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/api_ninjas_trivia/skill.py) + +Line 22. diff --git a/fern/products/sdk-reference/python/agents/skills/api-ninjas-trivia/skill/index.mdx b/fern/products/sdk-reference/python/agents/skills/api-ninjas-trivia/skill/index.mdx new file mode 100644 index 0000000000..82e89d46b1 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/skills/api-ninjas-trivia/skill/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/agents/skills/api-ninjas-trivia/skill" +title: "skill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.api_ninjas_trivia.skill" + parent: "signalwire.skills.api_ninjas_trivia" + module: "agents.skills.api_ninjas_trivia" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/api_ninjas_trivia/skill.py" +--- +# `skill` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module skill +``` + +## Classes + + + + Skill for getting trivia questions from API Ninjas with configurable categories. + + + +## Source + +[`signalwire/signalwire/skills/api_ninjas_trivia/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/api_ninjas_trivia/skill.py) diff --git a/fern/products/sdk-reference/python/agents/skills/claude-skills/index.mdx b/fern/products/sdk-reference/python/agents/skills/claude-skills/index.mdx new file mode 100644 index 0000000000..b7a906eb8b --- /dev/null +++ b/fern/products/sdk-reference/python/agents/skills/claude-skills/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/agents/skills/claude-skills" +title: "claude_skills" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.claude_skills" + parent: "signalwire.skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/claude_skills/__init__.py" +--- +# `claude_skills` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module claude_skills +``` + +## Modules + + + + Copyright (c) 2025 SignalWire + + + +## Source + +[`signalwire/signalwire/skills/claude_skills/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/claude_skills/__init__.py) diff --git a/fern/products/sdk-reference/python/agents/skills/claude-skills/skill/claude-skills-skill/index.mdx b/fern/products/sdk-reference/python/agents/skills/claude-skills/skill/claude-skills-skill/index.mdx new file mode 100644 index 0000000000..48732bcde4 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/skills/claude-skills/skill/claude-skills-skill/index.mdx @@ -0,0 +1,182 @@ +--- +slug: "/reference/python/agents/skills/claude-skills/skill/claude-skills-skill" +title: "ClaudeSkillsSkill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.skills.claude_skills.skill.ClaudeSkillsSkill" + parent: "signalwire.skills.claude_skills.skill" + module: "agents.skills.claude_skills.skill" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/claude_skills/skill.py" +--- +# `ClaudeSkillsSkill` + +Load Claude-style SKILL.md files as SignalWire agent tools. + +This skill parses Claude Code skill directories and makes them available +as SWAIG tools that the AI can call. Each Claude skill becomes a tool +that returns the skill's instructions when invoked. + +> ## \[!NOTE] +> +> name: skill-name +> description: When to use this skill +> ----------------------------------- +> +> Markdown instructions here... +> Use $ARGUMENTS for passed args. + +## Signature + +```python +class ClaudeSkillsSkill(SkillBase) +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/python/agents/skill-base/index__2) + +## Examples + +```python +Markdown instructions here... +Use $ARGUMENTS for passed args. +``` + +## Properties + + + + + + + + + + + + + +## Methods + +### get\_hints + +Return speech recognition hints based on loaded skills. + +#### Signature + +```python +get_hints() -> List[str] +``` + +#### Returns + +`List[str]` + +#### Source + +[`signalwire/signalwire/skills/claude_skills/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/claude_skills/skill.py) + +Line 610. + +*** + +### get\_instance\_key + +Return unique key for this skill instance. + +#### Signature + +```python +get_instance_key() -> str +``` + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/skills/claude_skills/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/claude_skills/skill.py) + +Line 667. + +*** + +### get\_parameter\_schema + +Get the parameter schema for the Claude skills loader. + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +get_parameter_schema() -> Dict[str, Dict[str, Any]] +``` + +#### Returns + +`Dict[str, Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/claude_skills/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/claude_skills/skill.py) + +Line 673. + +*** + +### register\_tools + +Register a SWAIG tool for each discovered Claude skill. + +#### Signature + +```python +register_tools() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/skills/claude_skills/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/claude_skills/skill.py) + +Line 518. + +*** + +### setup + +Setup the Claude skills loader. + +Discovers and parses all SKILL.md files in the configured directory. + +#### Signature + +```python +setup() -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/skills/claude_skills/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/claude_skills/skill.py) + +Line 63. + +## Source + +[`signalwire/signalwire/skills/claude_skills/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/claude_skills/skill.py) + +Line 38. diff --git a/fern/products/sdk-reference/python/agents/skills/claude-skills/skill/index.mdx b/fern/products/sdk-reference/python/agents/skills/claude-skills/skill/index.mdx new file mode 100644 index 0000000000..d41dd4c240 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/skills/claude-skills/skill/index.mdx @@ -0,0 +1,44 @@ +--- +slug: "/reference/python/agents/skills/claude-skills/skill" +title: "skill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.claude_skills.skill" + parent: "signalwire.skills.claude_skills" + module: "agents.skills.claude_skills" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/claude_skills/skill.py" +--- +# `skill` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module skill +``` + +## Properties + + + +## Classes + + + + Load Claude-style SKILL.md files as SignalWire agent tools. + + + +## Source + +[`signalwire/signalwire/skills/claude_skills/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/claude_skills/skill.py) diff --git a/fern/products/sdk-reference/python/agents/skills/datasphere-serverless/index.mdx b/fern/products/sdk-reference/python/agents/skills/datasphere-serverless/index.mdx new file mode 100644 index 0000000000..da6405325c --- /dev/null +++ b/fern/products/sdk-reference/python/agents/skills/datasphere-serverless/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/agents/skills/datasphere-serverless" +title: "datasphere_serverless" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.datasphere_serverless" + parent: "signalwire.skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere_serverless/__init__.py" +--- +# `datasphere_serverless` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module datasphere_serverless +``` + +## Modules + + + + Copyright (c) 2025 SignalWire + + + +## Source + +[`signalwire/signalwire/skills/datasphere_serverless/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere_serverless/__init__.py) diff --git a/fern/products/sdk-reference/python/agents/skills/datasphere-serverless/skill/data-sphere-serverless-skill/index.mdx b/fern/products/sdk-reference/python/agents/skills/datasphere-serverless/skill/data-sphere-serverless-skill/index.mdx new file mode 100644 index 0000000000..a72961322c --- /dev/null +++ b/fern/products/sdk-reference/python/agents/skills/datasphere-serverless/skill/data-sphere-serverless-skill/index.mdx @@ -0,0 +1,206 @@ +--- +slug: "/reference/python/agents/skills/datasphere-serverless/skill/data-sphere-serverless-skill" +title: "DataSphereServerlessSkill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.skills.datasphere_serverless.skill.DataSphereServerlessSkill" + parent: "signalwire.skills.datasphere_serverless.skill" + module: "agents.skills.datasphere_serverless.skill" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere_serverless/skill.py" +--- +# `DataSphereServerlessSkill` + +SignalWire DataSphere knowledge search using DataMap (serverless execution) + +## Signature + +```python +class DataSphereServerlessSkill(SkillBase) +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/python/agents/skill-base/index__2) + +## Properties + + + + + + + + + + + + + +## Methods + +### get\_global\_data + +Return global data for agent context + +#### Signature + +```python +get_global_data() -> Dict[str, Any] +``` + +#### Returns + +`Dict[str, Any]` + +#### Source + +[`signalwire/signalwire/skills/datasphere_serverless/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere_serverless/skill.py) + +Line 216. + +*** + +### get\_hints + +Return speech recognition hints + +#### Signature + +```python +get_hints() -> List[str] +``` + +#### Returns + +`List[str]` + +#### Source + +[`signalwire/signalwire/skills/datasphere_serverless/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere_serverless/skill.py) + +Line 212. + +*** + +### get\_instance\_key + +Get the key used to track this skill instance + +For DataSphere Serverless, we use 'search\_knowledge' as the default tool name + +#### Signature + +```python +get_instance_key() -> str +``` + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/skills/datasphere_serverless/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere_serverless/skill.py) + +Line 111. + +*** + +### get\_parameter\_schema + +Get parameter schema for DataSphere Serverless skill + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +get_parameter_schema() -> Dict[str, Dict[str, Any]] +``` + +#### Returns + +`Dict[str, Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/datasphere_serverless/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere_serverless/skill.py) + +Line 29. + +*** + +### get\_prompt\_sections + +Return prompt sections to add to agent + +#### Signature + +```python +get_prompt_sections() -> List[Dict[str, Any]] +``` + +#### Returns + +`List[Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/datasphere_serverless/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere_serverless/skill.py) + +Line 224. + +*** + +### register\_tools + +Register knowledge search tool using DataMap + +#### Signature + +```python +register_tools() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/skills/datasphere_serverless/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere_serverless/skill.py) + +Line 161. + +*** + +### setup + +Setup the datasphere serverless skill + +#### Signature + +```python +setup() -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/skills/datasphere_serverless/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere_serverless/skill.py) + +Line 120. + +## Source + +[`signalwire/signalwire/skills/datasphere_serverless/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere_serverless/skill.py) + +Line 17. diff --git a/fern/products/sdk-reference/python/agents/skills/datasphere-serverless/skill/index.mdx b/fern/products/sdk-reference/python/agents/skills/datasphere-serverless/skill/index.mdx new file mode 100644 index 0000000000..f90272fb78 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/skills/datasphere-serverless/skill/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/agents/skills/datasphere-serverless/skill" +title: "skill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.datasphere_serverless.skill" + parent: "signalwire.skills.datasphere_serverless" + module: "agents.skills.datasphere_serverless" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere_serverless/skill.py" +--- +# `skill` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module skill +``` + +## Classes + + + + SignalWire DataSphere knowledge search using DataMap (serverless execution) + + + +## Source + +[`signalwire/signalwire/skills/datasphere_serverless/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere_serverless/skill.py) diff --git a/fern/products/sdk-reference/python/agents/skills/datasphere/index.mdx b/fern/products/sdk-reference/python/agents/skills/datasphere/index.mdx new file mode 100644 index 0000000000..5009612f5f --- /dev/null +++ b/fern/products/sdk-reference/python/agents/skills/datasphere/index.mdx @@ -0,0 +1,44 @@ +--- +slug: "/reference/python/agents/skills/datasphere" +title: "datasphere" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.datasphere" + parent: "signalwire.skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere/__init__.py" +--- +# `datasphere` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module datasphere +``` + +## Properties + + + +## Modules + + + + Copyright (c) 2025 SignalWire + + + +## Source + +[`signalwire/signalwire/skills/datasphere/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere/__init__.py) diff --git a/fern/products/sdk-reference/python/agents/skills/datasphere/skill/data-sphere-skill/index.mdx b/fern/products/sdk-reference/python/agents/skills/datasphere/skill/data-sphere-skill/index.mdx new file mode 100644 index 0000000000..c03735e3e6 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/skills/datasphere/skill/data-sphere-skill/index.mdx @@ -0,0 +1,228 @@ +--- +slug: "/reference/python/agents/skills/datasphere/skill/data-sphere-skill" +title: "DataSphereSkill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.skills.datasphere.skill.DataSphereSkill" + parent: "signalwire.skills.datasphere.skill" + module: "agents.skills.datasphere.skill" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere/skill.py" +--- +# `DataSphereSkill` + +SignalWire DataSphere knowledge search capability + +## Signature + +```python +class DataSphereSkill(SkillBase) +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/python/agents/skill-base/index__2) + +## Properties + + + + + + + + + + + + + +## Methods + +### cleanup + +Clean up resources when skill is unloaded. + +#### Signature + +```python +cleanup() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/skills/datasphere/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere/skill.py) + +Line 280. + +*** + +### get\_global\_data + +Return global data for agent context + +#### Signature + +```python +get_global_data() -> Dict[str, Any] +``` + +#### Returns + +`Dict[str, Any]` + +#### Source + +[`signalwire/signalwire/skills/datasphere/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere/skill.py) + +Line 294. + +*** + +### get\_hints + +Return speech recognition hints + +#### Signature + +```python +get_hints() -> List[str] +``` + +#### Returns + +`List[str]` + +#### Source + +[`signalwire/signalwire/skills/datasphere/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere/skill.py) + +Line 285. + +*** + +### get\_instance\_key + +Get the key used to track this skill instance + +For DataSphere, we use 'search\_knowledge' as the default tool name instead of 'datasphere' + +#### Signature + +```python +get_instance_key() -> str +``` + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/skills/datasphere/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere/skill.py) + +Line 111. + +*** + +### get\_parameter\_schema + +Get parameter schema for DataSphere skill + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +get_parameter_schema() -> Dict[str, Dict[str, Any]] +``` + +#### Returns + +`Dict[str, Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/datasphere/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere/skill.py) + +Line 29. + +*** + +### get\_prompt\_sections + +Return prompt sections to add to agent + +#### Signature + +```python +get_prompt_sections() -> List[Dict[str, Any]] +``` + +#### Returns + +`List[Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/datasphere/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere/skill.py) + +Line 302. + +*** + +### register\_tools + +Register knowledge search tool with the agent + +#### Signature + +```python +register_tools() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/skills/datasphere/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere/skill.py) + +Line 160. + +*** + +### setup + +Setup the datasphere skill + +#### Signature + +```python +setup() -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/skills/datasphere/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere/skill.py) + +Line 120. + +## Source + +[`signalwire/signalwire/skills/datasphere/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere/skill.py) + +Line 17. diff --git a/fern/products/sdk-reference/python/agents/skills/datasphere/skill/index.mdx b/fern/products/sdk-reference/python/agents/skills/datasphere/skill/index.mdx new file mode 100644 index 0000000000..2db97f0785 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/skills/datasphere/skill/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/agents/skills/datasphere/skill" +title: "skill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.datasphere.skill" + parent: "signalwire.skills.datasphere" + module: "agents.skills.datasphere" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere/skill.py" +--- +# `skill` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module skill +``` + +## Classes + + + + SignalWire DataSphere knowledge search capability + + + +## Source + +[`signalwire/signalwire/skills/datasphere/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere/skill.py) diff --git a/fern/products/sdk-reference/python/agents/skills/datetime/index.mdx b/fern/products/sdk-reference/python/agents/skills/datetime/index.mdx new file mode 100644 index 0000000000..5e482f1034 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/skills/datetime/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/agents/skills/datetime" +title: "datetime" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.datetime" + parent: "signalwire.skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datetime/__init__.py" +--- +# `datetime` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module datetime +``` + +## Modules + + + + Copyright (c) 2025 SignalWire + + + +## Source + +[`signalwire/signalwire/skills/datetime/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datetime/__init__.py) diff --git a/fern/products/sdk-reference/python/agents/skills/datetime/skill/date-time-skill/index.mdx b/fern/products/sdk-reference/python/agents/skills/datetime/skill/date-time-skill/index.mdx new file mode 100644 index 0000000000..a43f934c94 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/skills/datetime/skill/date-time-skill/index.mdx @@ -0,0 +1,161 @@ +--- +slug: "/reference/python/agents/skills/datetime/skill/date-time-skill" +title: "DateTimeSkill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.skills.datetime.skill.DateTimeSkill" + parent: "signalwire.skills.datetime.skill" + module: "agents.skills.datetime.skill" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datetime/skill.py" +--- +# `DateTimeSkill` + +Provides current date, time, and timezone information + +## Signature + +```python +class DateTimeSkill(SkillBase) +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/python/agents/skill-base/index__2) + +## Properties + + + + + + + + + + + +## Methods + +### get\_hints + +Return speech recognition hints + +#### Signature + +```python +get_hints() -> List[str] +``` + +#### Returns + +`List[str]` + +#### Source + +[`signalwire/signalwire/skills/datetime/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datetime/skill.py) + +Line 93. + +*** + +### get\_parameter\_schema + +Get the parameter schema for the datetime skill + +The datetime skill has no custom parameters - it inherits only +the base parameters from SkillBase. + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +get_parameter_schema() -> Dict[str, Dict[str, Any]] +``` + +#### Returns + +`Dict[str, Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/datetime/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datetime/skill.py) + +Line 113. + +*** + +### get\_prompt\_sections + +Return prompt sections to add to agent + +#### Signature + +```python +get_prompt_sections() -> List[Dict[str, Any]] +``` + +#### Returns + +`List[Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/datetime/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datetime/skill.py) + +Line 99. + +*** + +### register\_tools + +Register datetime tools with the agent + +#### Signature + +```python +register_tools() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/skills/datetime/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datetime/skill.py) + +Line 30. + +*** + +### setup + +Setup the datetime skill + +#### Signature + +```python +setup() -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/skills/datetime/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datetime/skill.py) + +Line 26. + +## Source + +[`signalwire/signalwire/skills/datetime/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datetime/skill.py) + +Line 17. diff --git a/fern/products/sdk-reference/python/agents/skills/datetime/skill/index.mdx b/fern/products/sdk-reference/python/agents/skills/datetime/skill/index.mdx new file mode 100644 index 0000000000..ebf7fe6cdc --- /dev/null +++ b/fern/products/sdk-reference/python/agents/skills/datetime/skill/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/agents/skills/datetime/skill" +title: "skill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.datetime.skill" + parent: "signalwire.skills.datetime" + module: "agents.skills.datetime" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datetime/skill.py" +--- +# `skill` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module skill +``` + +## Classes + + + + Provides current date, time, and timezone information + + + +## Source + +[`signalwire/signalwire/skills/datetime/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datetime/skill.py) diff --git a/fern/products/sdk-reference/python/agents/skills/google-maps/index.mdx b/fern/products/sdk-reference/python/agents/skills/google-maps/index.mdx new file mode 100644 index 0000000000..7ec2961e59 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/skills/google-maps/index.mdx @@ -0,0 +1,35 @@ +--- +slug: "/reference/python/agents/skills/google-maps" +title: "google_maps" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.google_maps" + parent: "signalwire.skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/google_maps/__init__.py" +--- +# `google_maps` + +Google Maps skill for SignalWire Agents + +## Signature + +```python +module google_maps +``` + +## Modules + + + + Copyright (c) 2025 SignalWire + + + +## Source + +[`signalwire/signalwire/skills/google_maps/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/google_maps/__init__.py) diff --git a/fern/products/sdk-reference/python/agents/skills/google-maps/skill/google-maps-client/index.mdx b/fern/products/sdk-reference/python/agents/skills/google-maps/skill/google-maps-client/index.mdx new file mode 100644 index 0000000000..42d1480e5f --- /dev/null +++ b/fern/products/sdk-reference/python/agents/skills/google-maps/skill/google-maps-client/index.mdx @@ -0,0 +1,118 @@ +--- +slug: "/reference/python/agents/skills/google-maps/skill/google-maps-client" +title: "GoogleMapsClient" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.skills.google_maps.skill.GoogleMapsClient" + parent: "signalwire.skills.google_maps.skill" + module: "agents.skills.google_maps.skill" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/google_maps/skill.py" +--- +# `GoogleMapsClient` + +## Signature + +```python +class GoogleMapsClient +``` + +## Properties + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(api_key) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/skills/google_maps/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/google_maps/skill.py) + +Line 117. + +*** + +### compute\_route + +Compute route using Google Routes API. + +Returns: \{"distance\_meters": int, "duration\_seconds": int\} or None + +#### Signature + +```python +compute_route(origin_lat, origin_lng, dest_lat, dest_lng) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`signalwire/signalwire/skills/google_maps/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/google_maps/skill.py) + +Line 316. + +*** + +### validate\_address + +Validate and geocode an address or business name. + +When bias\_lat/bias\_lng are provided (destination search with known pickup): + +1. First tries Nearby Search with rankby=distance to find the CLOSEST + matching business (e.g. "Walmart" → nearest Walmart to pickup). +2. Falls back to Autocomplete with location bias (no strictbounds) for + street addresses or if Nearby Search finds nothing. + +Without bias coords (pickup search): uses plain Autocomplete. + +Returns: \{"address": str, "lat": float, "lng": float\} or None + +#### Signature + +```python +validate_address(input_text, bias_lat = None, bias_lng = None) +``` + +#### Parameters + + + + + + + +#### Source + +[`signalwire/signalwire/skills/google_maps/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/google_maps/skill.py) + +Line 120. + +## Source + +[`signalwire/signalwire/skills/google_maps/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/google_maps/skill.py) + +Line 116. diff --git a/fern/products/sdk-reference/python/agents/skills/google-maps/skill/google-maps-skill/index.mdx b/fern/products/sdk-reference/python/agents/skills/google-maps/skill/google-maps-skill/index.mdx new file mode 100644 index 0000000000..644c43b24f --- /dev/null +++ b/fern/products/sdk-reference/python/agents/skills/google-maps/skill/google-maps-skill/index.mdx @@ -0,0 +1,158 @@ +--- +slug: "/reference/python/agents/skills/google-maps/skill/google-maps-skill" +title: "GoogleMapsSkill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.skills.google_maps.skill.GoogleMapsSkill" + parent: "signalwire.skills.google_maps.skill" + module: "agents.skills.google_maps.skill" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/google_maps/skill.py" +--- +# `GoogleMapsSkill` + +Validate addresses and compute driving routes using Google Maps + +## Signature + +```python +class GoogleMapsSkill(SkillBase) +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/python/agents/skill-base/index__2) + +## Properties + + + + + + + + + + + +## Methods + +### get\_hints + +Return speech recognition hints + +#### Signature + +```python +get_hints() -> List[str] +``` + +#### Returns + +`List[str]` + +#### Source + +[`signalwire/signalwire/skills/google_maps/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/google_maps/skill.py) + +Line 530. + +*** + +### get\_parameter\_schema + +Get parameter schema for google\_maps skill + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +get_parameter_schema() -> Dict[str, Dict[str, Any]] +``` + +#### Returns + +`Dict[str, Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/google_maps/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/google_maps/skill.py) + +Line 387. + +*** + +### get\_prompt\_sections + +Return prompt sections to add to agent + +#### Signature + +```python +get_prompt_sections() -> List[Dict[str, Any]] +``` + +#### Returns + +`List[Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/google_maps/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/google_maps/skill.py) + +Line 534. + +*** + +### register\_tools + +Register address lookup and route computation tools + +#### Signature + +```python +register_tools() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/skills/google_maps/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/google_maps/skill.py) + +Line 429. + +*** + +### setup + +Setup the Google Maps skill + +#### Signature + +```python +setup() -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/skills/google_maps/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/google_maps/skill.py) + +Line 414. + +## Source + +[`signalwire/signalwire/skills/google_maps/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/google_maps/skill.py) + +Line 378. diff --git a/fern/products/sdk-reference/python/agents/skills/google-maps/skill/index.mdx b/fern/products/sdk-reference/python/agents/skills/google-maps/skill/index.mdx new file mode 100644 index 0000000000..212abe6c82 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/skills/google-maps/skill/index.mdx @@ -0,0 +1,46 @@ +--- +slug: "/reference/python/agents/skills/google-maps/skill" +title: "skill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.google_maps.skill" + parent: "signalwire.skills.google_maps" + module: "agents.skills.google_maps" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/google_maps/skill.py" +--- +# `skill` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module skill +``` + +## Properties + + + +## Classes + + + + + + Validate addresses and compute driving routes using Google Maps + + + +## Source + +[`signalwire/signalwire/skills/google_maps/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/google_maps/skill.py) diff --git a/fern/products/sdk-reference/python/agents/skills/index.mdx b/fern/products/sdk-reference/python/agents/skills/index.mdx new file mode 100644 index 0000000000..152db3de29 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/skills/index.mdx @@ -0,0 +1,112 @@ +--- +slug: "/reference/python/agents/skills" +title: "skills" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/__init__.py" +--- +# `skills` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module skills +``` + +## Properties + + + +## Modules + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Google Maps skill for SignalWire Agents + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + +## Source + +[`signalwire/signalwire/skills/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/__init__.py) diff --git a/fern/products/sdk-reference/python/agents/skills/info-gatherer/index.mdx b/fern/products/sdk-reference/python/agents/skills/info-gatherer/index.mdx new file mode 100644 index 0000000000..df27f3dc99 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/skills/info-gatherer/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/agents/skills/info-gatherer" +title: "info_gatherer" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.info_gatherer" + parent: "signalwire.skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/info_gatherer/__init__.py" +--- +# `info_gatherer` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module info_gatherer +``` + +## Modules + + + + Copyright (c) 2025 SignalWire + + + +## Source + +[`signalwire/signalwire/skills/info_gatherer/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/info_gatherer/__init__.py) diff --git a/fern/products/sdk-reference/python/agents/skills/info-gatherer/skill/index.mdx b/fern/products/sdk-reference/python/agents/skills/info-gatherer/skill/index.mdx new file mode 100644 index 0000000000..dc002fe6bf --- /dev/null +++ b/fern/products/sdk-reference/python/agents/skills/info-gatherer/skill/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/agents/skills/info-gatherer/skill" +title: "skill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.info_gatherer.skill" + parent: "signalwire.skills.info_gatherer" + module: "agents.skills.info_gatherer" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/info_gatherer/skill.py" +--- +# `skill` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module skill +``` + +## Classes + + + + Skill that guides an AI agent through a series of questions, collecting and storing answers in namespaced global\_data. + + + +## Source + +[`signalwire/signalwire/skills/info_gatherer/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/info_gatherer/skill.py) diff --git a/fern/products/sdk-reference/python/agents/skills/info-gatherer/skill/info-gatherer-skill/index.mdx b/fern/products/sdk-reference/python/agents/skills/info-gatherer/skill/info-gatherer-skill/index.mdx new file mode 100644 index 0000000000..9536a75572 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/skills/info-gatherer/skill/info-gatherer-skill/index.mdx @@ -0,0 +1,155 @@ +--- +slug: "/reference/python/agents/skills/info-gatherer/skill/info-gatherer-skill" +title: "InfoGathererSkill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.skills.info_gatherer.skill.InfoGathererSkill" + parent: "signalwire.skills.info_gatherer.skill" + module: "agents.skills.info_gatherer.skill" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/info_gatherer/skill.py" +--- +# `InfoGathererSkill` + +Skill that guides an AI agent through a series of questions, collecting +and storing answers in namespaced global\_data. + +Supports multiple instances with different prefixes so several +question sets can coexist on a single agent (e.g. "intake" and +"medical" questionnaires running side by side). + +## Signature + +```python +class InfoGathererSkill(SkillBase) +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/python/agents/skill-base/index__2) + +## Properties + + + + + + + + + + + + + +## Methods + +### get\_global\_data + +#### Signature + +```python +get_global_data() -> Dict[str, Any] +``` + +#### Returns + +`Dict[str, Any]` + +#### Source + +[`signalwire/signalwire/skills/info_gatherer/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/info_gatherer/skill.py) + +Line 127. + +*** + +### get\_instance\_key + +#### Signature + +```python +get_instance_key() -> str +``` + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/skills/info_gatherer/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/info_gatherer/skill.py) + +Line 81. + +*** + +### get\_parameter\_schema + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +get_parameter_schema() -> Dict[str, Dict[str, Any]] +``` + +#### Returns + +`Dict[str, Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/info_gatherer/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/info_gatherer/skill.py) + +Line 33. + +*** + +### register\_tools + +#### Signature + +```python +register_tools() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/skills/info_gatherer/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/info_gatherer/skill.py) + +Line 162. + +*** + +### setup + +#### Signature + +```python +setup() -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/skills/info_gatherer/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/info_gatherer/skill.py) + +Line 91. + +## Source + +[`signalwire/signalwire/skills/info_gatherer/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/info_gatherer/skill.py) + +Line 16. diff --git a/fern/products/sdk-reference/python/agents/skills/joke/index.mdx b/fern/products/sdk-reference/python/agents/skills/joke/index.mdx new file mode 100644 index 0000000000..2bb1d6269e --- /dev/null +++ b/fern/products/sdk-reference/python/agents/skills/joke/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/agents/skills/joke" +title: "joke" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.joke" + parent: "signalwire.skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/joke/__init__.py" +--- +# `joke` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module joke +``` + +## Modules + + + + Copyright (c) 2025 SignalWire + + + +## Source + +[`signalwire/signalwire/skills/joke/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/joke/__init__.py) diff --git a/fern/products/sdk-reference/python/agents/skills/joke/skill/index.mdx b/fern/products/sdk-reference/python/agents/skills/joke/skill/index.mdx new file mode 100644 index 0000000000..0f44807791 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/skills/joke/skill/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/agents/skills/joke/skill" +title: "skill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.joke.skill" + parent: "signalwire.skills.joke" + module: "agents.skills.joke" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/joke/skill.py" +--- +# `skill` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module skill +``` + +## Classes + + + + Joke telling capability using API Ninjas with DataMap + + + +## Source + +[`signalwire/signalwire/skills/joke/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/joke/skill.py) diff --git a/fern/products/sdk-reference/python/agents/skills/joke/skill/joke-skill/index.mdx b/fern/products/sdk-reference/python/agents/skills/joke/skill/joke-skill/index.mdx new file mode 100644 index 0000000000..aa3cdd5c9a --- /dev/null +++ b/fern/products/sdk-reference/python/agents/skills/joke/skill/joke-skill/index.mdx @@ -0,0 +1,180 @@ +--- +slug: "/reference/python/agents/skills/joke/skill/joke-skill" +title: "JokeSkill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.skills.joke.skill.JokeSkill" + parent: "signalwire.skills.joke.skill" + module: "agents.skills.joke.skill" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/joke/skill.py" +--- +# `JokeSkill` + +Joke telling capability using API Ninjas with DataMap + +## Signature + +```python +class JokeSkill(SkillBase) +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/python/agents/skill-base/index__2) + +## Properties + + + + + + + + + + + +## Methods + +### get\_global\_data + +Return global data to be available in DataMap variables + +#### Signature + +```python +get_global_data() -> Dict[str, Any] +``` + +#### Returns + +`Dict[str, Any]` + +#### Source + +[`signalwire/signalwire/skills/joke/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/joke/skill.py) + +Line 91. + +*** + +### get\_hints + +Return speech recognition hints + +#### Signature + +```python +get_hints() -> List[str] +``` + +#### Returns + +`List[str]` + +#### Source + +[`signalwire/signalwire/skills/joke/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/joke/skill.py) + +Line 82. + +*** + +### get\_parameter\_schema + +Get parameter schema for joke skill + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +get_parameter_schema() -> Dict[str, Dict[str, Any]] +``` + +#### Returns + +`Dict[str, Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/joke/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/joke/skill.py) + +Line 26. + +*** + +### get\_prompt\_sections + +Return prompt sections to add to agent + +#### Signature + +```python +get_prompt_sections() -> List[Dict[str, Any]] +``` + +#### Returns + +`List[Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/joke/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/joke/skill.py) + +Line 97. + +*** + +### register\_tools + +Register joke tool using DataMap + +#### Signature + +```python +register_tools() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/skills/joke/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/joke/skill.py) + +Line 64. + +*** + +### setup + +Setup the joke skill + +#### Signature + +```python +setup() -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/skills/joke/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/joke/skill.py) + +Line 47. + +## Source + +[`signalwire/signalwire/skills/joke/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/joke/skill.py) + +Line 17. diff --git a/fern/products/sdk-reference/python/agents/skills/math/index.mdx b/fern/products/sdk-reference/python/agents/skills/math/index.mdx new file mode 100644 index 0000000000..210b1a9525 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/skills/math/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/agents/skills/math" +title: "math" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.math" + parent: "signalwire.skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/math/__init__.py" +--- +# `math` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module math +``` + +## Modules + + + + Copyright (c) 2025 SignalWire + + + +## Source + +[`signalwire/signalwire/skills/math/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/math/__init__.py) diff --git a/fern/products/sdk-reference/python/agents/skills/math/skill/index.mdx b/fern/products/sdk-reference/python/agents/skills/math/skill/index.mdx new file mode 100644 index 0000000000..82f8400a56 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/skills/math/skill/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/agents/skills/math/skill" +title: "skill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.math.skill" + parent: "signalwire.skills.math" + module: "agents.skills.math" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/math/skill.py" +--- +# `skill` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module skill +``` + +## Classes + + + + Provides basic mathematical calculation capabilities + + + +## Source + +[`signalwire/signalwire/skills/math/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/math/skill.py) diff --git a/fern/products/sdk-reference/python/agents/skills/math/skill/math-skill/index.mdx b/fern/products/sdk-reference/python/agents/skills/math/skill/math-skill/index.mdx new file mode 100644 index 0000000000..972c671dc4 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/skills/math/skill/math-skill/index.mdx @@ -0,0 +1,161 @@ +--- +slug: "/reference/python/agents/skills/math/skill/math-skill" +title: "MathSkill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.skills.math.skill.MathSkill" + parent: "signalwire.skills.math.skill" + module: "agents.skills.math.skill" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/math/skill.py" +--- +# `MathSkill` + +Provides basic mathematical calculation capabilities + +## Signature + +```python +class MathSkill(SkillBase) +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/python/agents/skill-base/index__2) + +## Properties + + + + + + + + + + + +## Methods + +### get\_hints + +Return speech recognition hints + +#### Signature + +```python +get_hints() -> List[str] +``` + +#### Returns + +`List[str]` + +#### Source + +[`signalwire/signalwire/skills/math/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/math/skill.py) + +Line 108. + +*** + +### get\_parameter\_schema + +Get the parameter schema for the math skill + +The math skill has no custom parameters - it inherits only +the base parameters from SkillBase. + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +get_parameter_schema() -> Dict[str, Dict[str, Any]] +``` + +#### Returns + +`Dict[str, Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/math/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/math/skill.py) + +Line 131. + +*** + +### get\_prompt\_sections + +Return prompt sections to add to agent + +#### Signature + +```python +get_prompt_sections() -> List[Dict[str, Any]] +``` + +#### Returns + +`List[Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/math/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/math/skill.py) + +Line 117. + +*** + +### register\_tools + +Register math tools with the agent + +#### Signature + +```python +register_tools() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/skills/math/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/math/skill.py) + +Line 30. + +*** + +### setup + +Setup the math skill + +#### Signature + +```python +setup() -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/skills/math/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/math/skill.py) + +Line 26. + +## Source + +[`signalwire/signalwire/skills/math/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/math/skill.py) + +Line 17. diff --git a/fern/products/sdk-reference/python/agents/skills/mcp-gateway/index.mdx b/fern/products/sdk-reference/python/agents/skills/mcp-gateway/index.mdx new file mode 100644 index 0000000000..563d9b5cb6 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/skills/mcp-gateway/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/agents/skills/mcp-gateway" +title: "mcp_gateway" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.mcp_gateway" + parent: "signalwire.skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/mcp_gateway/__init__.py" +--- +# `mcp_gateway` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module mcp_gateway +``` + +## Modules + + + + Copyright (c) 2025 SignalWire + + + +## Source + +[`signalwire/signalwire/skills/mcp_gateway/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/mcp_gateway/__init__.py) diff --git a/fern/products/sdk-reference/python/agents/skills/mcp-gateway/skill/index.mdx b/fern/products/sdk-reference/python/agents/skills/mcp-gateway/skill/index.mdx new file mode 100644 index 0000000000..07530d5a4a --- /dev/null +++ b/fern/products/sdk-reference/python/agents/skills/mcp-gateway/skill/index.mdx @@ -0,0 +1,44 @@ +--- +slug: "/reference/python/agents/skills/mcp-gateway/skill" +title: "skill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.mcp_gateway.skill" + parent: "signalwire.skills.mcp_gateway" + module: "agents.skills.mcp_gateway" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/mcp_gateway/skill.py" +--- +# `skill` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module skill +``` + +## Properties + + + +## Classes + + + + MCP Gateway Skill - Bridge MCP servers with SWAIG functions + + + +## Source + +[`signalwire/signalwire/skills/mcp_gateway/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/mcp_gateway/skill.py) diff --git a/fern/products/sdk-reference/python/agents/skills/mcp-gateway/skill/mcp-gateway-skill/index.mdx b/fern/products/sdk-reference/python/agents/skills/mcp-gateway/skill/mcp-gateway-skill/index.mdx new file mode 100644 index 0000000000..0229cc555f --- /dev/null +++ b/fern/products/sdk-reference/python/agents/skills/mcp-gateway/skill/mcp-gateway-skill/index.mdx @@ -0,0 +1,183 @@ +--- +slug: "/reference/python/agents/skills/mcp-gateway/skill/mcp-gateway-skill" +title: "MCPGatewaySkill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.skills.mcp_gateway.skill.MCPGatewaySkill" + parent: "signalwire.skills.mcp_gateway.skill" + module: "agents.skills.mcp_gateway.skill" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/mcp_gateway/skill.py" +--- +# `MCPGatewaySkill` + +MCP Gateway Skill - Bridge MCP servers with SWAIG functions + +This skill connects SignalWire agents to MCP (Model Context Protocol) servers +through a gateway service, dynamically creating SWAIG functions for MCP tools. + +## Signature + +```python +class MCPGatewaySkill(SkillBase) +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/python/agents/skill-base/index__2) + +## Properties + + + + + + + + + + + +## Methods + +### get\_global\_data + +Return global data for DataMap variables + +#### Signature + +```python +get_global_data() -> Dict[str, Any] +``` + +#### Returns + +`Dict[str, Any]` + +#### Source + +[`signalwire/signalwire/skills/mcp_gateway/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/mcp_gateway/skill.py) + +Line 392. + +*** + +### get\_hints + +Return speech recognition hints + +#### Signature + +```python +get_hints() -> List[str] +``` + +#### Returns + +`List[str]` + +#### Source + +[`signalwire/signalwire/skills/mcp_gateway/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/mcp_gateway/skill.py) + +Line 381. + +*** + +### get\_parameter\_schema + +Get parameter schema for MCP Gateway skill + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +get_parameter_schema() -> Dict[str, Dict[str, Any]] +``` + +#### Returns + +`Dict[str, Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/mcp_gateway/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/mcp_gateway/skill.py) + +Line 36. + +*** + +### get\_prompt\_sections + +Return prompt sections to add to agent + +#### Signature + +```python +get_prompt_sections() -> List[Dict[str, Any]] +``` + +#### Returns + +`List[Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/mcp_gateway/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/mcp_gateway/skill.py) + +Line 401. + +*** + +### register\_tools + +Register SWAIG tools from MCP services + +#### Signature + +```python +register_tools() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/skills/mcp_gateway/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/mcp_gateway/skill.py) + +Line 185. + +*** + +### setup + +Setup and validate skill configuration + +#### Signature + +```python +setup() -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/skills/mcp_gateway/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/mcp_gateway/skill.py) + +Line 118. + +## Source + +[`signalwire/signalwire/skills/mcp_gateway/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/mcp_gateway/skill.py) + +Line 22. diff --git a/fern/products/sdk-reference/python/agents/skills/native-vector-search/index.mdx b/fern/products/sdk-reference/python/agents/skills/native-vector-search/index.mdx new file mode 100644 index 0000000000..16c163f823 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/skills/native-vector-search/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/agents/skills/native-vector-search" +title: "native_vector_search" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.native_vector_search" + parent: "signalwire.skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/native_vector_search/__init__.py" +--- +# `native_vector_search` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module native_vector_search +``` + +## Modules + + + + Copyright (c) 2025 SignalWire + + + +## Source + +[`signalwire/signalwire/skills/native_vector_search/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/native_vector_search/__init__.py) diff --git a/fern/products/sdk-reference/python/agents/skills/native-vector-search/skill/index.mdx b/fern/products/sdk-reference/python/agents/skills/native-vector-search/skill/index.mdx new file mode 100644 index 0000000000..9ce4eb8b26 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/skills/native-vector-search/skill/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/agents/skills/native-vector-search/skill" +title: "skill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.native_vector_search.skill" + parent: "signalwire.skills.native_vector_search" + module: "agents.skills.native_vector_search" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/native_vector_search/skill.py" +--- +# `skill` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module skill +``` + +## Classes + + + + Native vector search capability using local document indexes or remote search servers + + + +## Source + +[`signalwire/signalwire/skills/native_vector_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/native_vector_search/skill.py) diff --git a/fern/products/sdk-reference/python/agents/skills/native-vector-search/skill/native-vector-search-skill/index.mdx b/fern/products/sdk-reference/python/agents/skills/native-vector-search/skill/native-vector-search-skill/index.mdx new file mode 100644 index 0000000000..eece036140 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/skills/native-vector-search/skill/native-vector-search-skill/index.mdx @@ -0,0 +1,234 @@ +--- +slug: "/reference/python/agents/skills/native-vector-search/skill/native-vector-search-skill" +title: "NativeVectorSearchSkill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.skills.native_vector_search.skill.NativeVectorSearchSkill" + parent: "signalwire.skills.native_vector_search.skill" + module: "agents.skills.native_vector_search.skill" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/native_vector_search/skill.py" +--- +# `NativeVectorSearchSkill` + +Native vector search capability using local document indexes or remote search servers + +## Signature + +```python +class NativeVectorSearchSkill(SkillBase) +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/python/agents/skill-base/index__2) + +## Properties + + + + + + + + + + + + + +## Methods + +### cleanup + +Cleanup when skill is removed or agent shuts down + +#### Signature + +```python +cleanup() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/skills/native_vector_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/native_vector_search/skill.py) + +Line 818. + +*** + +### get\_global\_data + +Return data to add to agent's global context + +#### Signature + +```python +get_global_data() -> Dict[str, Any] +``` + +#### Returns + +`Dict[str, Any]` + +#### Source + +[`signalwire/signalwire/skills/native_vector_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/native_vector_search/skill.py) + +Line 783. + +*** + +### get\_hints + +Return speech recognition hints for this skill + +#### Signature + +```python +get_hints() -> List[str] +``` + +#### Returns + +`List[str]` + +#### Source + +[`signalwire/signalwire/skills/native_vector_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/native_vector_search/skill.py) + +Line 767. + +*** + +### get\_instance\_key + +Get the key used to track this skill instance + +For native vector search, we use the tool name to differentiate instances + +#### Signature + +```python +get_instance_key() -> str +``` + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/skills/native_vector_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/native_vector_search/skill.py) + +Line 231. + +*** + +### get\_parameter\_schema + +Get parameter schema for Native Vector Search skill + +This skill supports three modes of operation: + +1. Network Mode: Set 'remote\_url' to connect to a remote search server +2. Local pgvector: Set backend='pgvector' with connection\_string and collection\_name +3. Local SQLite: Set 'index\_file' to use a local .swsearch file (default) + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +get_parameter_schema() -> Dict[str, Dict[str, Any]] +``` + +#### Returns + +`Dict[str, Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/native_vector_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/native_vector_search/skill.py) + +Line 31. + +*** + +### get\_prompt\_sections + +Return prompt sections to add to agent + +#### Signature + +```python +get_prompt_sections() -> List[Dict[str, Any]] +``` + +#### Returns + +`List[Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/native_vector_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/native_vector_search/skill.py) + +Line 796. + +*** + +### register\_tools + +Register native vector search tool with the agent + +#### Signature + +```python +register_tools() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/skills/native_vector_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/native_vector_search/skill.py) + +Line 468. + +*** + +### setup + +Setup the native vector search skill + +#### Signature + +```python +setup() -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/skills/native_vector_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/native_vector_search/skill.py) + +Line 241. + +## Source + +[`signalwire/signalwire/skills/native_vector_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/native_vector_search/skill.py) + +Line 19. diff --git a/fern/products/sdk-reference/python/agents/skills/play-background-file/index.mdx b/fern/products/sdk-reference/python/agents/skills/play-background-file/index.mdx new file mode 100644 index 0000000000..c5fa1bd487 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/skills/play-background-file/index.mdx @@ -0,0 +1,44 @@ +--- +slug: "/reference/python/agents/skills/play-background-file" +title: "play_background_file" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.play_background_file" + parent: "signalwire.skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/play_background_file/__init__.py" +--- +# `play_background_file` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module play_background_file +``` + +## Properties + + + +## Modules + + + + Copyright (c) 2025 SignalWire + + + +## Source + +[`signalwire/signalwire/skills/play_background_file/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/play_background_file/__init__.py) diff --git a/fern/products/sdk-reference/python/agents/skills/play-background-file/skill/index.mdx b/fern/products/sdk-reference/python/agents/skills/play-background-file/skill/index.mdx new file mode 100644 index 0000000000..ea8dedb6d8 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/skills/play-background-file/skill/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/agents/skills/play-background-file/skill" +title: "skill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.play_background_file.skill" + parent: "signalwire.skills.play_background_file" + module: "agents.skills.play_background_file" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/play_background_file/skill.py" +--- +# `skill` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module skill +``` + +## Classes + + + + Skill for playing background files (audio/video) with configurable tool names. + + + +## Source + +[`signalwire/signalwire/skills/play_background_file/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/play_background_file/skill.py) diff --git a/fern/products/sdk-reference/python/agents/skills/play-background-file/skill/play-background-file-skill/index.mdx b/fern/products/sdk-reference/python/agents/skills/play-background-file/skill/play-background-file-skill/index.mdx new file mode 100644 index 0000000000..8e5fc5ce41 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/skills/play-background-file/skill/play-background-file-skill/index.mdx @@ -0,0 +1,207 @@ +--- +slug: "/reference/python/agents/skills/play-background-file/skill/play-background-file-skill" +title: "PlayBackgroundFileSkill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.skills.play_background_file.skill.PlayBackgroundFileSkill" + parent: "signalwire.skills.play_background_file.skill" + module: "agents.skills.play_background_file.skill" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/play_background_file/skill.py" +--- +# `PlayBackgroundFileSkill` + +Skill for playing background files (audio/video) with configurable tool names. + +Supports multiple instances with different tool names and file collections. +Uses DataMap for serverless execution with dynamic enum generation. + +Configuration: + +- tool\_name: Custom name for the generated SWAIG function +- files: Array of file objects with key, description, url, and optional wait + +> \[!NOTE] +> agent.add\_skill("play\_background\_file", \{ +> "tool\_name": "play\_testimonial", +> "files": \[ +> \{ +> "key": "massey", +> "description": "Customer success story from Massey Energy", +> "url": "https://example.com/massey.mp4", +> "wait": True +> \} +> ] +> \}) + +## Signature + +```python +class PlayBackgroundFileSkill(SkillBase) +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/python/agents/skill-base/index__2) + +## Properties + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +Initialize the skill with configuration parameters. + +#### Signature + +```python +__init__(agent, params: Dict[str, Any] = None) +``` + +#### Parameters + + + The agent instance this skill belongs to + + + + Configuration dictionary containing: + + +#### Source + +[`signalwire/signalwire/skills/play_background_file/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/play_background_file/skill.py) + +Line 87. + +*** + +### get\_instance\_key + +Generate a unique instance key for this skill configuration. + +#### Signature + +```python +get_instance_key() -> str +``` + +#### Returns + +`str` — Unique key combining skill name and tool name + +#### Source + +[`signalwire/signalwire/skills/play_background_file/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/play_background_file/skill.py) + +Line 131. + +*** + +### get\_parameter\_schema + +Get parameter schema for Play Background File skill + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +get_parameter_schema() -> Dict[str, Dict[str, Any]] +``` + +#### Returns + +`Dict[str, Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/play_background_file/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/play_background_file/skill.py) + +Line 51. + +*** + +### get\_tools + +Generate the SWAIG tool with DataMap expressions. + +#### Signature + +```python +get_tools() -> List[Dict[str, Any]] +``` + +#### Returns + +`List[Dict[str, Any]]` — List containing the generated tool configuration + +#### Source + +[`signalwire/signalwire/skills/play_background_file/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/play_background_file/skill.py) + +Line 158. + +*** + +### register\_tools + +Register SWAIG tools with the agent + +#### Signature + +```python +register_tools() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/skills/play_background_file/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/play_background_file/skill.py) + +Line 149. + +*** + +### setup + +Setup the skill - no external dependencies needed. + +#### Signature + +```python +setup() -> bool +``` + +#### Returns + +`bool` — True if setup successful + +#### Source + +[`signalwire/signalwire/skills/play_background_file/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/play_background_file/skill.py) + +Line 140. + +## Source + +[`signalwire/signalwire/skills/play_background_file/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/play_background_file/skill.py) + +Line 22. diff --git a/fern/products/sdk-reference/python/agents/skills/registry/index.mdx b/fern/products/sdk-reference/python/agents/skills/registry/index.mdx new file mode 100644 index 0000000000..b9ac9b7a1a --- /dev/null +++ b/fern/products/sdk-reference/python/agents/skills/registry/index.mdx @@ -0,0 +1,44 @@ +--- +slug: "/reference/python/agents/skills/registry" +title: "registry" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.registry" + parent: "signalwire.skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/registry.py" +--- +# `registry` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module registry +``` + +## Properties + + + +## Classes + + + + Global registry for on-demand skill loading + + + +## Source + +[`signalwire/signalwire/skills/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/registry.py) diff --git a/fern/products/sdk-reference/python/agents/skills/registry/skill-registry/index.mdx b/fern/products/sdk-reference/python/agents/skills/registry/skill-registry/index.mdx new file mode 100644 index 0000000000..2e7005b00e --- /dev/null +++ b/fern/products/sdk-reference/python/agents/skills/registry/skill-registry/index.mdx @@ -0,0 +1,276 @@ +--- +slug: "/reference/python/agents/skills/registry/skill-registry" +title: "SkillRegistry" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.skills.registry.SkillRegistry" + parent: "signalwire.skills.registry" + module: "agents.skills.registry" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/registry.py" +--- +# `SkillRegistry` + +Global registry for on-demand skill loading + +## Signature + +```python +class SkillRegistry +``` + +## Properties + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__() +``` + +#### Source + +[`signalwire/signalwire/skills/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/registry.py) + +Line 25. + +*** + +### add\_skill\_directory + +Add a directory to search for skills + +This allows third-party skill collections to be registered by path. +Skills in these directories should follow the same structure as built-in skills: + +- Each skill in its own subdirectory +- skill.py file containing the skill class + +> \[!NOTE] +> skill\_registry.add\_skill\_directory('/opt/custom\_skills') +> +> ### Now agent.add\_skill('my\_custom\_skill') will search in this directory + +#### Signature + +```python +add_skill_directory(path: str) -> None +``` + +#### Parameters + + + Path to directory containing skill subdirectories + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/skills/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/registry.py) + +Line 353. + +*** + +### discover\_skills + +Discover and return all available skills. + +Skills load on-demand, so there is nothing to eagerly register; this +scans the skills package and returns metadata for everything +discoverable, so callers can enumerate what is available. + +#### Signature + +```python +discover_skills() -> List[Dict[str, str]] +``` + +#### Returns + +`List[Dict[str, str]]` + +#### Source + +[`signalwire/signalwire/skills/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/registry.py) + +Line 122. + +*** + +### get\_all\_skills\_schema + +Get complete schema for all available skills including parameter metadata + +This method scans all available skills and returns a comprehensive schema +that includes skill metadata and parameter definitions suitable for GUI +configuration or API documentation. + +> \[!NOTE] +> \{ +> "web\_search": \{ +> "name": "web\_search", +> "description": "Search the web for information", +> "version": "1.0.0", +> "supports\_multiple\_instances": True, +> "required\_packages": \["bs4", "requests"], +> "required\_env\_vars": \[], +> "parameters": \{ +> "api\_key": \{ +> "type": "string", +> "description": "Google API key", +> "required": True, +> "hidden": True, +> "env\_var": "GOOGLE\_SEARCH\_API\_KEY" +> \}, +> ... +> \}, +> "source": "built-in" +> \} +> \} + +#### Signature + +```python +get_all_skills_schema() -> Dict[str, Dict[str, Any]] +``` + +#### Returns + +`Dict[str, Dict[str, Any]]` — Dict\[str, Dict\[str, Any]]: Complete skill schema where keys are skill names and values contain: + +#### Source + +[`signalwire/signalwire/skills/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/registry.py) + +Line 232. + +*** + +### get\_skill\_class + +Get skill class by name, loading on-demand if needed + +#### Signature + +```python +get_skill_class(skill_name: str) -> Optional[Type[SkillBase]] +``` + +#### Parameters + + + +#### Returns + +`Optional[Type[SkillBase]]` + +#### Source + +[`signalwire/signalwire/skills/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/registry.py) + +Line 199. + +*** + +### list\_all\_skill\_sources + +List all skill sources and the skills available from each + +Returns a dictionary mapping source types to lists of skill names: +\{ +'built-in': \['datetime', 'math', ...], +'external\_paths': \['custom\_skill1', ...], +'entry\_points': \['weather', ...], +'registered': \['my\_skill', ...] +\} + +#### Signature + +```python +list_all_skill_sources() -> Dict[str, List[str]] +``` + +#### Returns + +`Dict[str, List[str]]` + +#### Source + +[`signalwire/signalwire/skills/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/registry.py) + +Line 439. + +*** + +### list\_skills + +List all available skills by scanning directories (only when explicitly requested) + +#### Signature + +```python +list_skills() -> List[Dict[str, str]] +``` + +#### Returns + +`List[Dict[str, str]]` + +#### Source + +[`signalwire/signalwire/skills/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/registry.py) + +Line 208. + +*** + +### register\_skill + +Register a skill class directly + +This allows third-party code to register skill classes without +requiring them to be in a specific directory structure. + +> \[!NOTE] +> from my\_custom\_skills import MyWeatherSkill +> skill\_registry.register\_skill(MyWeatherSkill) + +#### Signature + +```python +register_skill(skill_class: Type[SkillBase]) -> None +``` + +#### Parameters + + + A class that inherits from SkillBase + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/skills/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/registry.py) + +Line 135. + +## Source + +[`signalwire/signalwire/skills/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/registry.py) + +Line 22. diff --git a/fern/products/sdk-reference/python/agents/skills/spider/index.mdx b/fern/products/sdk-reference/python/agents/skills/spider/index.mdx new file mode 100644 index 0000000000..3ceafac5d3 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/skills/spider/index.mdx @@ -0,0 +1,44 @@ +--- +slug: "/reference/python/agents/skills/spider" +title: "spider" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.spider" + parent: "signalwire.skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/spider/__init__.py" +--- +# `spider` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module spider +``` + +## Properties + + + +## Modules + + + + Copyright (c) 2025 SignalWire + + + +## Source + +[`signalwire/signalwire/skills/spider/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/spider/__init__.py) diff --git a/fern/products/sdk-reference/python/agents/skills/spider/skill/index.mdx b/fern/products/sdk-reference/python/agents/skills/spider/skill/index.mdx new file mode 100644 index 0000000000..2b83e82c1d --- /dev/null +++ b/fern/products/sdk-reference/python/agents/skills/spider/skill/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/agents/skills/spider/skill" +title: "skill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.spider.skill" + parent: "signalwire.skills.spider" + module: "agents.skills.spider" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/spider/skill.py" +--- +# `skill` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module skill +``` + +## Classes + + + + Fast web scraping skill optimized for speed and token efficiency. + + + +## Source + +[`signalwire/signalwire/skills/spider/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/spider/skill.py) diff --git a/fern/products/sdk-reference/python/agents/skills/spider/skill/spider-skill/index.mdx b/fern/products/sdk-reference/python/agents/skills/spider/skill/spider-skill/index.mdx new file mode 100644 index 0000000000..00b52fea9a --- /dev/null +++ b/fern/products/sdk-reference/python/agents/skills/spider/skill/spider-skill/index.mdx @@ -0,0 +1,238 @@ +--- +slug: "/reference/python/agents/skills/spider/skill/spider-skill" +title: "SpiderSkill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.skills.spider.skill.SpiderSkill" + parent: "signalwire.skills.spider.skill" + module: "agents.skills.spider.skill" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/spider/skill.py" +--- +# `SpiderSkill` + +Fast web scraping skill optimized for speed and token efficiency. + +## Signature + +```python +class SpiderSkill(SkillBase) +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/python/agents/skill-base/index__2) + +## Properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +Initialize the spider skill with configuration parameters. + +#### Signature + +```python +__init__(agent, params: Dict[str, Any]) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/skills/spider/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/spider/skill.py) + +Line 150. + +*** + +### cleanup + +Clean up resources when skill is unloaded. + +#### Signature + +```python +cleanup() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/skills/spider/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/spider/skill.py) + +Line 620. + +*** + +### get\_hints + +Return speech recognition hints for this skill. + +#### Signature + +```python +get_hints() -> List[str] +``` + +#### Returns + +`List[str]` + +#### Source + +[`signalwire/signalwire/skills/spider/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/spider/skill.py) + +Line 613. + +*** + +### get\_instance\_key + +Return unique key for this skill instance. + +#### Signature + +```python +get_instance_key() -> str +``` + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/skills/spider/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/spider/skill.py) + +Line 191. + +*** + +### get\_parameter\_schema + +Get parameter schema for Spider skill + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +get_parameter_schema() -> Dict[str, Dict[str, Any]] +``` + +#### Returns + +`Dict[str, Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/spider/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/spider/skill.py) + +Line 37. + +*** + +### register\_tools + +Register the web scraping tools with the agent. + +#### Signature + +```python +register_tools() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/skills/spider/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/spider/skill.py) + +Line 229. + +*** + +### setup + +Validate configuration and setup the skill. + +#### Signature + +```python +setup() -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/skills/spider/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/spider/skill.py) + +Line 196. + +## Source + +[`signalwire/signalwire/skills/spider/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/spider/skill.py) + +Line 24. diff --git a/fern/products/sdk-reference/python/agents/skills/swml-transfer/index.mdx b/fern/products/sdk-reference/python/agents/skills/swml-transfer/index.mdx new file mode 100644 index 0000000000..c952e99b1a --- /dev/null +++ b/fern/products/sdk-reference/python/agents/skills/swml-transfer/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/agents/skills/swml-transfer" +title: "swml_transfer" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.swml_transfer" + parent: "signalwire.skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/swml_transfer/__init__.py" +--- +# `swml_transfer` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module swml_transfer +``` + +## Modules + + + + Copyright (c) 2025 SignalWire + + + +## Source + +[`signalwire/signalwire/skills/swml_transfer/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/swml_transfer/__init__.py) diff --git a/fern/products/sdk-reference/python/agents/skills/swml-transfer/skill/index.mdx b/fern/products/sdk-reference/python/agents/skills/swml-transfer/skill/index.mdx new file mode 100644 index 0000000000..273d9caae8 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/skills/swml-transfer/skill/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/agents/skills/swml-transfer/skill" +title: "skill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.swml_transfer.skill" + parent: "signalwire.skills.swml_transfer" + module: "agents.skills.swml_transfer" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/swml_transfer/skill.py" +--- +# `skill` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module skill +``` + +## Classes + + + + Skill for transferring calls between agents using SWML with pattern matching + + + +## Source + +[`signalwire/signalwire/skills/swml_transfer/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/swml_transfer/skill.py) diff --git a/fern/products/sdk-reference/python/agents/skills/swml-transfer/skill/swml-transfer-skill/index.mdx b/fern/products/sdk-reference/python/agents/skills/swml-transfer/skill/swml-transfer-skill/index.mdx new file mode 100644 index 0000000000..0486570348 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/skills/swml-transfer/skill/swml-transfer-skill/index.mdx @@ -0,0 +1,184 @@ +--- +slug: "/reference/python/agents/skills/swml-transfer/skill/swml-transfer-skill" +title: "SWMLTransferSkill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.skills.swml_transfer.skill.SWMLTransferSkill" + parent: "signalwire.skills.swml_transfer.skill" + module: "agents.skills.swml_transfer.skill" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/swml_transfer/skill.py" +--- +# `SWMLTransferSkill` + +Skill for transferring calls between agents using SWML with pattern matching + +## Signature + +```python +class SWMLTransferSkill(SkillBase) +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/python/agents/skill-base/index__2) + +## Properties + + + + + + + + + + + + + +## Methods + +### get\_hints + +Return speech recognition hints + +#### Signature + +```python +get_hints() -> List[str] +``` + +#### Returns + +`List[str]` + +#### Source + +[`signalwire/signalwire/skills/swml_transfer/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/swml_transfer/skill.py) + +Line 266. + +*** + +### get\_instance\_key + +Get the key used to track this skill instance + +For SWML transfer, we use the tool name to differentiate instances + +#### Signature + +```python +get_instance_key() -> str +``` + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/skills/swml_transfer/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/swml_transfer/skill.py) + +Line 120. + +*** + +### get\_parameter\_schema + +Get parameter schema for SWML Transfer skill + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +get_parameter_schema() -> Dict[str, Dict[str, Any]] +``` + +#### Returns + +`Dict[str, Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/swml_transfer/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/swml_transfer/skill.py) + +Line 30. + +*** + +### get\_prompt\_sections + +Return prompt sections to add to agent + +#### Signature + +```python +get_prompt_sections() -> List[Dict[str, Any]] +``` + +#### Returns + +`List[Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/swml_transfer/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/swml_transfer/skill.py) + +Line 297. + +*** + +### register\_tools + +Register the transfer tool with pattern matching + +#### Signature + +```python +register_tools() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/skills/swml_transfer/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/swml_transfer/skill.py) + +Line 180. + +*** + +### setup + +Setup and validate skill configuration + +#### Signature + +```python +setup() -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/skills/swml_transfer/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/swml_transfer/skill.py) + +Line 129. + +## Source + +[`signalwire/signalwire/skills/swml_transfer/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/swml_transfer/skill.py) + +Line 18. diff --git a/fern/products/sdk-reference/python/agents/skills/weather-api/index.mdx b/fern/products/sdk-reference/python/agents/skills/weather-api/index.mdx new file mode 100644 index 0000000000..596a6a03b0 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/skills/weather-api/index.mdx @@ -0,0 +1,44 @@ +--- +slug: "/reference/python/agents/skills/weather-api" +title: "weather_api" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.weather_api" + parent: "signalwire.skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/weather_api/__init__.py" +--- +# `weather_api` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module weather_api +``` + +## Properties + + + +## Modules + + + + Copyright (c) 2025 SignalWire + + + +## Source + +[`signalwire/signalwire/skills/weather_api/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/weather_api/__init__.py) diff --git a/fern/products/sdk-reference/python/agents/skills/weather-api/skill/index.mdx b/fern/products/sdk-reference/python/agents/skills/weather-api/skill/index.mdx new file mode 100644 index 0000000000..e3a9ed619d --- /dev/null +++ b/fern/products/sdk-reference/python/agents/skills/weather-api/skill/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/agents/skills/weather-api/skill" +title: "skill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.weather_api.skill" + parent: "signalwire.skills.weather_api" + module: "agents.skills.weather_api" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/weather_api/skill.py" +--- +# `skill` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module skill +``` + +## Classes + + + + Skill for getting weather information from WeatherAPI.com. + + + +## Source + +[`signalwire/signalwire/skills/weather_api/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/weather_api/skill.py) diff --git a/fern/products/sdk-reference/python/agents/skills/weather-api/skill/weather-api-skill/index.mdx b/fern/products/sdk-reference/python/agents/skills/weather-api/skill/weather-api-skill/index.mdx new file mode 100644 index 0000000000..803f0f1b80 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/skills/weather-api/skill/weather-api-skill/index.mdx @@ -0,0 +1,184 @@ +--- +slug: "/reference/python/agents/skills/weather-api/skill/weather-api-skill" +title: "WeatherApiSkill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.skills.weather_api.skill.WeatherApiSkill" + parent: "signalwire.skills.weather_api.skill" + module: "agents.skills.weather_api.skill" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/weather_api/skill.py" +--- +# `WeatherApiSkill` + +Skill for getting weather information from WeatherAPI.com. + +Provides current weather data with configurable temperature units and +TTS-optimized natural language responses. + +Configuration: + +- tool\_name: Custom name for the generated SWAIG function +- api\_key: WeatherAPI.com API key +- temperature\_unit: "fahrenheit" or "celsius" for temperature display + +> \[!NOTE] +> agent.add\_skill("weather\_api", \{ +> "tool\_name": "get\_weather", +> "api\_key": "your\_weatherapi\_key", +> "temperature\_unit": "fahrenheit" +> \}) + +## Signature + +```python +class WeatherApiSkill(SkillBase) +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/python/agents/skill-base/index__2) + +## Properties + + + + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +Initialize the skill with configuration parameters. + +#### Signature + +```python +__init__(agent, params: Dict[str, Any] = None) +``` + +#### Parameters + + + The agent instance this skill belongs to + + + + Configuration dictionary containing: + + +#### Source + +[`signalwire/signalwire/skills/weather_api/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/weather_api/skill.py) + +Line 75. + +*** + +### get\_parameter\_schema + +Get parameter schema for weather API skill + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +get_parameter_schema() -> Dict[str, Dict[str, Any]] +``` + +#### Returns + +`Dict[str, Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/weather_api/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/weather_api/skill.py) + +Line 47. + +*** + +### get\_tools + +Generate the SWAIG tool with DataMap webhook. + +#### Signature + +```python +get_tools() -> List[Dict[str, Any]] +``` + +#### Returns + +`List[Dict[str, Any]]` — List containing the generated tool configuration + +#### Source + +[`signalwire/signalwire/skills/weather_api/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/weather_api/skill.py) + +Line 125. + +*** + +### register\_tools + +Register SWAIG tools with the agent + +#### Signature + +```python +register_tools() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/skills/weather_api/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/weather_api/skill.py) + +Line 116. + +*** + +### setup + +Setup the skill - validates API key is available. + +#### Signature + +```python +setup() -> bool +``` + +#### Returns + +`bool` — True if setup successful + +#### Source + +[`signalwire/signalwire/skills/weather_api/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/weather_api/skill.py) + +Line 106. + +## Source + +[`signalwire/signalwire/skills/weather_api/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/weather_api/skill.py) + +Line 22. diff --git a/fern/products/sdk-reference/python/agents/skills/web-search/index.mdx b/fern/products/sdk-reference/python/agents/skills/web-search/index.mdx new file mode 100644 index 0000000000..8977c71a0c --- /dev/null +++ b/fern/products/sdk-reference/python/agents/skills/web-search/index.mdx @@ -0,0 +1,48 @@ +--- +slug: "/reference/python/agents/skills/web-search" +title: "web_search" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.web_search" + parent: "signalwire.skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/__init__.py" +--- +# `web_search` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module web_search +``` + +## Modules + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + +## Source + +[`signalwire/signalwire/skills/web_search/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/__init__.py) diff --git a/fern/products/sdk-reference/python/agents/skills/web-search/skill-improved/google-search-scraper/index.mdx b/fern/products/sdk-reference/python/agents/skills/web-search/skill-improved/google-search-scraper/index.mdx new file mode 100644 index 0000000000..eb24200489 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/skills/web-search/skill-improved/google-search-scraper/index.mdx @@ -0,0 +1,205 @@ +--- +slug: "/reference/python/agents/skills/web-search/skill-improved/google-search-scraper" +title: "GoogleSearchScraper" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.skills.web_search.skill_improved.GoogleSearchScraper" + parent: "signalwire.skills.web_search.skill_improved" + module: "agents.skills.web_search.skill_improved" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_improved.py" +--- +# `GoogleSearchScraper` + +Google Search and Web Scraping functionality with quality scoring + +## Signature + +```python +class GoogleSearchScraper +``` + +## Properties + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(api_key: str, search_engine_id: str, max_content_length: int = 32768) +``` + +#### Parameters + + + + + + + +#### Source + +[`signalwire/signalwire/skills/web_search/skill_improved.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_improved.py) + +Line 25. + +*** + +### extract\_text\_from\_url + +Scrape a URL and extract readable text content with quality metrics + +#### Signature + +```python +extract_text_from_url( + url: str, + content_limit: int = None, + timeout: int = 10 +) -> Tuple[str, Dict[str, Any]] +``` + +#### Parameters + + + + + + + +#### Returns + +`Tuple[str, Dict[str, Any]]` — Tuple of (text\_content, quality\_metrics) + +#### Source + +[`signalwire/signalwire/skills/web_search/skill_improved.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_improved.py) + +Line 66. + +*** + +### search\_and\_scrape + +Backward compatible method that uses the improved search + +#### Signature + +```python +search_and_scrape(query: str, num_results: int = 3, delay: float = 0.5) -> str +``` + +#### Parameters + + + + + + + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/skills/web_search/skill_improved.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_improved.py) + +Line 328. + +*** + +### search\_and\_scrape\_best + +Search and scrape with quality filtering + +#### Signature + +```python +search_and_scrape_best( + query: str, + num_results: int = 3, + oversample_factor: float = 2.5, + delay: float = 0.5, + min_quality_score: float = 0.3 +) -> str +``` + +#### Parameters + + + Search query + + + + Number of best results to return + + + + How many extra results to fetch (e.g., 2.5 = fetch 2.5x) + + + + Delay between requests + + + + Minimum quality score to include a result + + +#### Returns + +`str` — Formatted string with the best N results + +#### Source + +[`signalwire/signalwire/skills/web_search/skill_improved.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_improved.py) + +Line 243. + +*** + +### search\_google + +Search Google using Custom Search JSON API + +#### Signature + +```python +search_google(query: str, num_results: int = 5) -> list +``` + +#### Parameters + + + + + +#### Returns + +`list` + +#### Source + +[`signalwire/signalwire/skills/web_search/skill_improved.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_improved.py) + +Line 34. + +## Source + +[`signalwire/signalwire/skills/web_search/skill_improved.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_improved.py) + +Line 22. diff --git a/fern/products/sdk-reference/python/agents/skills/web-search/skill-improved/index.mdx b/fern/products/sdk-reference/python/agents/skills/web-search/skill-improved/index.mdx new file mode 100644 index 0000000000..f8c26b35b7 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/skills/web-search/skill-improved/index.mdx @@ -0,0 +1,44 @@ +--- +slug: "/reference/python/agents/skills/web-search/skill-improved" +title: "skill_improved" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.web_search.skill_improved" + parent: "signalwire.skills.web_search" + module: "agents.skills.web_search" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_improved.py" +--- +# `skill_improved` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module skill_improved +``` + +## Classes + + + + Google Search and Web Scraping functionality with quality scoring + + + + Web search capability using Google Custom Search API with quality filtering + + + +## Source + +[`signalwire/signalwire/skills/web_search/skill_improved.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_improved.py) diff --git a/fern/products/sdk-reference/python/agents/skills/web-search/skill-improved/web-search-skill/index.mdx b/fern/products/sdk-reference/python/agents/skills/web-search/skill-improved/web-search-skill/index.mdx new file mode 100644 index 0000000000..4ea0acad7c --- /dev/null +++ b/fern/products/sdk-reference/python/agents/skills/web-search/skill-improved/web-search-skill/index.mdx @@ -0,0 +1,204 @@ +--- +slug: "/reference/python/agents/skills/web-search/skill-improved/web-search-skill" +title: "WebSearchSkill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.skills.web_search.skill_improved.WebSearchSkill" + parent: "signalwire.skills.web_search.skill_improved" + module: "agents.skills.web_search.skill_improved" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_improved.py" +--- +# `WebSearchSkill` + +Web search capability using Google Custom Search API with quality filtering + +## Signature + +```python +class WebSearchSkill(SkillBase) +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/python/agents/skill-base/index__2) + +## Properties + + + + + + + + + + + + + +## Methods + +### get\_global\_data + +Return global data for agent context + +#### Signature + +```python +get_global_data() -> Dict[str, Any] +``` + +#### Returns + +`Dict[str, Any]` + +#### Source + +[`signalwire/signalwire/skills/web_search/skill_improved.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_improved.py) + +Line 457. + +*** + +### get\_hints + +Return speech recognition hints + +#### Signature + +```python +get_hints() -> List[str] +``` + +#### Returns + +`List[str]` + +#### Source + +[`signalwire/signalwire/skills/web_search/skill_improved.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_improved.py) + +Line 453. + +*** + +### get\_instance\_key + +Get the key used to track this skill instance + +#### Signature + +```python +get_instance_key() -> str +``` + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/skills/web_search/skill_improved.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_improved.py) + +Line 353. + +*** + +### get\_parameter\_schema + +Get the parameter schema for the web search skill + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +get_parameter_schema() -> Dict[str, Dict[str, Any]] +``` + +#### Returns + +`Dict[str, Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/web_search/skill_improved.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_improved.py) + +Line 480. + +*** + +### get\_prompt\_sections + +Return prompt sections to add to agent + +#### Signature + +```python +get_prompt_sections() -> List[Dict[str, Any]] +``` + +#### Returns + +`List[Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/web_search/skill_improved.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_improved.py) + +Line 465. + +*** + +### register\_tools + +Register web search tool with the agent + +#### Signature + +```python +register_tools() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/skills/web_search/skill_improved.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_improved.py) + +Line 402. + +*** + +### setup + +Setup the web search skill + +#### Signature + +```python +setup() -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/skills/web_search/skill_improved.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_improved.py) + +Line 359. + +## Source + +[`signalwire/signalwire/skills/web_search/skill_improved.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_improved.py) + +Line 341. diff --git a/fern/products/sdk-reference/python/agents/skills/web-search/skill-original/google-search-scraper/index.mdx b/fern/products/sdk-reference/python/agents/skills/web-search/skill-original/google-search-scraper/index.mdx new file mode 100644 index 0000000000..aacedf8e44 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/skills/web-search/skill-original/google-search-scraper/index.mdx @@ -0,0 +1,164 @@ +--- +slug: "/reference/python/agents/skills/web-search/skill-original/google-search-scraper" +title: "GoogleSearchScraper" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.skills.web_search.skill_original.GoogleSearchScraper" + parent: "signalwire.skills.web_search.skill_original" + module: "agents.skills.web_search.skill_original" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_original.py" +--- +# `GoogleSearchScraper` + +Google Search and Web Scraping functionality + +## Signature + +```python +class GoogleSearchScraper +``` + +## Properties + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(api_key: str, search_engine_id: str, max_content_length: int = 32768) +``` + +#### Parameters + + + + + + + +#### Source + +[`signalwire/signalwire/skills/web_search/skill_original.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_original.py) + +Line 24. + +*** + +### extract\_text\_from\_url + +Scrape a URL and extract readable text content + +#### Signature + +```python +extract_text_from_url( + url: str, + content_limit: int = None, + timeout: int = 10 +) -> str +``` + +#### Parameters + + + URL to scrape + + + + Maximum characters to return (uses self.max\_content\_length if not provided) + + + + Request timeout in seconds + + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/skills/web_search/skill_original.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_original.py) + +Line 65. + +*** + +### search\_and\_scrape + +Main function: search Google and scrape the resulting pages + +Dynamically calculates per-result content limit based on total max\_content\_length +and number of results to ensure total response stays within bounds. + +#### Signature + +```python +search_and_scrape(query: str, num_results: int = 3, delay: float = 0.5) -> str +``` + +#### Parameters + + + + + + + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/skills/web_search/skill_original.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_original.py) + +Line 100. + +*** + +### search\_google + +Search Google using Custom Search JSON API + +#### Signature + +```python +search_google(query: str, num_results: int = 5) -> list +``` + +#### Parameters + + + + + +#### Returns + +`list` + +#### Source + +[`signalwire/signalwire/skills/web_search/skill_original.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_original.py) + +Line 33. + +## Source + +[`signalwire/signalwire/skills/web_search/skill_original.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_original.py) + +Line 21. diff --git a/fern/products/sdk-reference/python/agents/skills/web-search/skill-original/index.mdx b/fern/products/sdk-reference/python/agents/skills/web-search/skill-original/index.mdx new file mode 100644 index 0000000000..7fb7d22e1b --- /dev/null +++ b/fern/products/sdk-reference/python/agents/skills/web-search/skill-original/index.mdx @@ -0,0 +1,44 @@ +--- +slug: "/reference/python/agents/skills/web-search/skill-original" +title: "skill_original" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.web_search.skill_original" + parent: "signalwire.skills.web_search" + module: "agents.skills.web_search" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_original.py" +--- +# `skill_original` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module skill_original +``` + +## Classes + + + + Google Search and Web Scraping functionality + + + + Web search capability using Google Custom Search API + + + +## Source + +[`signalwire/signalwire/skills/web_search/skill_original.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_original.py) diff --git a/fern/products/sdk-reference/python/agents/skills/web-search/skill-original/web-search-skill/index.mdx b/fern/products/sdk-reference/python/agents/skills/web-search/skill-original/web-search-skill/index.mdx new file mode 100644 index 0000000000..d483571222 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/skills/web-search/skill-original/web-search-skill/index.mdx @@ -0,0 +1,209 @@ +--- +slug: "/reference/python/agents/skills/web-search/skill-original/web-search-skill" +title: "WebSearchSkill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.skills.web_search.skill_original.WebSearchSkill" + parent: "signalwire.skills.web_search.skill_original" + module: "agents.skills.web_search.skill_original" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_original.py" +--- +# `WebSearchSkill` + +Web search capability using Google Custom Search API + +## Signature + +```python +class WebSearchSkill(SkillBase) +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/python/agents/skill-base/index__2) + +## Properties + + + + + + + + + + + + + +## Methods + +### get\_global\_data + +Return global data for agent context + +#### Signature + +```python +get_global_data() -> Dict[str, Any] +``` + +#### Returns + +`Dict[str, Any]` + +#### Source + +[`signalwire/signalwire/skills/web_search/skill_original.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_original.py) + +Line 265. + +*** + +### get\_hints + +Return speech recognition hints + +#### Signature + +```python +get_hints() -> List[str] +``` + +#### Returns + +`List[str]` + +#### Source + +[`signalwire/signalwire/skills/web_search/skill_original.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_original.py) + +Line 256. + +*** + +### get\_instance\_key + +Get the key used to track this skill instance + +For web search, we use the search\_engine\_id to differentiate instances + +#### Signature + +```python +get_instance_key() -> str +``` + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/skills/web_search/skill_original.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_original.py) + +Line 158. + +*** + +### get\_parameter\_schema + +Get the parameter schema for the web search skill + +Returns all configurable parameters for web search including +API credentials, search settings, and response customization. + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +get_parameter_schema() -> Dict[str, Dict[str, Any]] +``` + +#### Returns + +`Dict[str, Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/web_search/skill_original.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_original.py) + +Line 287. + +*** + +### get\_prompt\_sections + +Return prompt sections to add to agent + +#### Signature + +```python +get_prompt_sections() -> List[Dict[str, Any]] +``` + +#### Returns + +`List[Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/web_search/skill_original.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_original.py) + +Line 272. + +*** + +### register\_tools + +Register web search tool with the agent + +#### Signature + +```python +register_tools() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/skills/web_search/skill_original.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_original.py) + +Line 206. + +*** + +### setup + +Setup the web search skill + +#### Signature + +```python +setup() -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/skills/web_search/skill_original.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_original.py) + +Line 168. + +## Source + +[`signalwire/signalwire/skills/web_search/skill_original.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_original.py) + +Line 146. diff --git a/fern/products/sdk-reference/python/agents/skills/web-search/skill/google-search-scraper/index.mdx b/fern/products/sdk-reference/python/agents/skills/web-search/skill/google-search-scraper/index.mdx new file mode 100644 index 0000000000..6400d499a6 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/skills/web-search/skill/google-search-scraper/index.mdx @@ -0,0 +1,319 @@ +--- +slug: "/reference/python/agents/skills/web-search/skill/google-search-scraper" +title: "GoogleSearchScraper" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.skills.web_search.skill.GoogleSearchScraper" + parent: "signalwire.skills.web_search.skill" + module: "agents.skills.web_search.skill" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill.py" +--- +# `GoogleSearchScraper` + +Google Search and Web Scraping functionality with quality scoring + +## Signature + +```python +class GoogleSearchScraper +``` + +## Properties + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(api_key: str, search_engine_id: str, max_content_length: int = 32768) +``` + +#### Parameters + + + + + + + +#### Source + +[`signalwire/signalwire/skills/web_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill.py) + +Line 25. + +*** + +### extract\_html\_content + +Original HTML extraction method (renamed from extract\_text\_from\_url) + +#### Signature + +```python +extract_html_content( + url: str, + content_limit: int = None, + timeout: int = 10 +) -> Tuple[str, Dict[str, Any]] +``` + +#### Parameters + + + + + + + +#### Returns + +`Tuple[str, Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/web_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill.py) + +Line 204. + +*** + +### extract\_reddit\_content + +Extract Reddit content using JSON API for better quality + +#### Signature + +```python +extract_reddit_content( + url: str, + content_limit: int = None, + timeout: int = 10 +) -> Tuple[str, Dict[str, Any]] +``` + +#### Parameters + + + + + + + +#### Returns + +`Tuple[str, Dict[str, Any]]` — Tuple of (text\_content, quality\_metrics) + +#### Source + +[`signalwire/signalwire/skills/web_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill.py) + +Line 71. + +*** + +### extract\_text\_from\_url + +Main extraction method that routes to appropriate extractor + +#### Signature + +```python +extract_text_from_url( + url: str, + content_limit: int = None, + timeout: int = 10 +) -> Tuple[str, Dict[str, Any]] +``` + +#### Parameters + + + + + + + +#### Returns + +`Tuple[str, Dict[str, Any]]` — Tuple of (text\_content, quality\_metrics) + +#### Source + +[`signalwire/signalwire/skills/web_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill.py) + +Line 192. + +*** + +### is\_reddit\_url + +Check if URL is from Reddit + +#### Signature + +```python +is_reddit_url(url: str) -> bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/skills/web_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill.py) + +Line 66. + +*** + +### search\_and\_scrape + +Backward compatible method that uses the improved search + +#### Signature + +```python +search_and_scrape(query: str, num_results: int = 3, delay: float = 0.5) -> str +``` + +#### Parameters + + + + + + + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/skills/web_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill.py) + +Line 607. + +*** + +### search\_and\_scrape\_best + +Search and scrape with quality filtering and source diversity. + +#### Signature + +```python +search_and_scrape_best( + query: str, + num_results: int = 3, + oversample_factor: float = 4.0, + delay: float = 0.5, + min_quality_score: float = 0.2, + per_page_timeout: float = 2.0, + overall_deadline: float = 10.0, + parallel_scrape: bool = True, + snippets_only: bool = False +) -> str +``` + +#### Parameters + + + Search query + + + + Number of best results to return + + + + How many extra results to fetch (e.g., 4.0 = fetch 4x) + + + + Delay between scrape requests (ignored in parallel mode) + + + + Minimum quality score to include a result + + + + Max seconds to wait on each page scrape + + + + Wall-clock budget (seconds) for the whole call. Anything not yet returned by this deadline is abandoned. + + + + Run all page scrapes concurrently in a thread pool + + + + Skip page scraping entirely; format the CSE snippets directly. Use for fast voice answers when full page content is not required. + + +#### Returns + +`str` — Formatted string with the best N results from diverse sources + +#### Source + +[`signalwire/signalwire/skills/web_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill.py) + +Line 442. + +*** + +### search\_google + +Search Google using Custom Search JSON API + +#### Signature + +```python +search_google(query: str, num_results: int = 5) -> list +``` + +#### Parameters + + + + + +#### Returns + +`list` + +#### Source + +[`signalwire/signalwire/skills/web_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill.py) + +Line 34. + +## Source + +[`signalwire/signalwire/skills/web_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill.py) + +Line 22. diff --git a/fern/products/sdk-reference/python/agents/skills/web-search/skill/index.mdx b/fern/products/sdk-reference/python/agents/skills/web-search/skill/index.mdx new file mode 100644 index 0000000000..1b42b30e8d --- /dev/null +++ b/fern/products/sdk-reference/python/agents/skills/web-search/skill/index.mdx @@ -0,0 +1,44 @@ +--- +slug: "/reference/python/agents/skills/web-search/skill" +title: "skill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.web_search.skill" + parent: "signalwire.skills.web_search" + module: "agents.skills.web_search" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill.py" +--- +# `skill` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module skill +``` + +## Classes + + + + Google Search and Web Scraping functionality with quality scoring + + + + Web search capability using Google Custom Search API with quality filtering + + + +## Source + +[`signalwire/signalwire/skills/web_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill.py) diff --git a/fern/products/sdk-reference/python/agents/skills/web-search/skill/web-search-skill/index.mdx b/fern/products/sdk-reference/python/agents/skills/web-search/skill/web-search-skill/index.mdx new file mode 100644 index 0000000000..2ad7c2b5c3 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/skills/web-search/skill/web-search-skill/index.mdx @@ -0,0 +1,204 @@ +--- +slug: "/reference/python/agents/skills/web-search/skill/web-search-skill" +title: "WebSearchSkill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.skills.web_search.skill.WebSearchSkill" + parent: "signalwire.skills.web_search.skill" + module: "agents.skills.web_search.skill" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill.py" +--- +# `WebSearchSkill` + +Web search capability using Google Custom Search API with quality filtering + +## Signature + +```python +class WebSearchSkill(SkillBase) +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/python/agents/skill-base/index__2) + +## Properties + + + + + + + + + + + + + +## Methods + +### get\_global\_data + +Return global data for agent context + +#### Signature + +```python +get_global_data() -> Dict[str, Any] +``` + +#### Returns + +`Dict[str, Any]` + +#### Source + +[`signalwire/signalwire/skills/web_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill.py) + +Line 768. + +*** + +### get\_hints + +Return speech recognition hints + +#### Signature + +```python +get_hints() -> List[str] +``` + +#### Returns + +`List[str]` + +#### Source + +[`signalwire/signalwire/skills/web_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill.py) + +Line 764. + +*** + +### get\_instance\_key + +Get the key used to track this skill instance + +#### Signature + +```python +get_instance_key() -> str +``` + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/skills/web_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill.py) + +Line 632. + +*** + +### get\_parameter\_schema + +Get the parameter schema for the web search skill + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +get_parameter_schema() -> Dict[str, Dict[str, Any]] +``` + +#### Returns + +`Dict[str, Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/web_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill.py) + +Line 791. + +*** + +### get\_prompt\_sections + +Return prompt sections to add to agent + +#### Signature + +```python +get_prompt_sections() -> List[Dict[str, Any]] +``` + +#### Returns + +`List[Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/web_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill.py) + +Line 776. + +*** + +### register\_tools + +Register web search tool with the agent + +#### Signature + +```python +register_tools() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/skills/web_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill.py) + +Line 705. + +*** + +### setup + +Setup the web search skill + +#### Signature + +```python +setup() -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/skills/web_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill.py) + +Line 638. + +## Source + +[`signalwire/signalwire/skills/web_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill.py) + +Line 620. diff --git a/fern/products/sdk-reference/python/agents/skills/wikipedia-search/index.mdx b/fern/products/sdk-reference/python/agents/skills/wikipedia-search/index.mdx new file mode 100644 index 0000000000..7c1b2058d0 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/skills/wikipedia-search/index.mdx @@ -0,0 +1,44 @@ +--- +slug: "/reference/python/agents/skills/wikipedia-search" +title: "wikipedia_search" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.wikipedia_search" + parent: "signalwire.skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/wikipedia_search/__init__.py" +--- +# `wikipedia_search` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module wikipedia_search +``` + +## Properties + + + +## Modules + + + + Copyright (c) 2025 SignalWire + + + +## Source + +[`signalwire/signalwire/skills/wikipedia_search/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/wikipedia_search/__init__.py) diff --git a/fern/products/sdk-reference/python/agents/skills/wikipedia-search/skill/index.mdx b/fern/products/sdk-reference/python/agents/skills/wikipedia-search/skill/index.mdx new file mode 100644 index 0000000000..176220c106 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/skills/wikipedia-search/skill/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/agents/skills/wikipedia-search/skill" +title: "skill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.skills.wikipedia_search.skill" + parent: "signalwire.skills.wikipedia_search" + module: "agents.skills.wikipedia_search" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/wikipedia_search/skill.py" +--- +# `skill` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module skill +``` + +## Classes + + + + Skill for searching Wikipedia articles and retrieving content. + + + +## Source + +[`signalwire/signalwire/skills/wikipedia_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/wikipedia_search/skill.py) diff --git a/fern/products/sdk-reference/python/agents/skills/wikipedia-search/skill/wikipedia-search-skill/index.mdx b/fern/products/sdk-reference/python/agents/skills/wikipedia-search/skill/wikipedia-search-skill/index.mdx new file mode 100644 index 0000000000..9e41c7f2be --- /dev/null +++ b/fern/products/sdk-reference/python/agents/skills/wikipedia-search/skill/wikipedia-search-skill/index.mdx @@ -0,0 +1,191 @@ +--- +slug: "/reference/python/agents/skills/wikipedia-search/skill/wikipedia-search-skill" +title: "WikipediaSearchSkill" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.skills.wikipedia_search.skill.WikipediaSearchSkill" + parent: "signalwire.skills.wikipedia_search.skill" + module: "agents.skills.wikipedia_search.skill" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/wikipedia_search/skill.py" +--- +# `WikipediaSearchSkill` + +Skill for searching Wikipedia articles and retrieving content. + +This skill uses the Wikipedia API to search for articles and retrieve +their introductory content, similar to getting a summary of a topic. + +## Signature + +```python +class WikipediaSearchSkill(SkillBase) +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/python/agents/skill-base/index__2) + +## Properties + + + + + + + + + + + + + +## Methods + +### get\_hints + +Return speech recognition hints for better accuracy. + +#### Signature + +```python +get_hints() -> list +``` + +#### Returns + +`list` — List of words/phrases to help with speech recognition + +#### Source + +[`signalwire/signalwire/skills/wikipedia_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/wikipedia_search/skill.py) + +Line 198. + +*** + +### get\_parameter\_schema + +Get parameter schema for Wikipedia search skill + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +get_parameter_schema() -> Dict[str, Dict[str, Any]] +``` + +#### Returns + +`Dict[str, Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/wikipedia_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/wikipedia_search/skill.py) + +Line 40. + +*** + +### get\_prompt\_sections + +Return additional context for the agent prompt. + +#### Signature + +```python +get_prompt_sections() -> list +``` + +#### Returns + +`list` — List of prompt sections to add to the agent + +#### Source + +[`signalwire/signalwire/skills/wikipedia_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/wikipedia_search/skill.py) + +Line 181. + +*** + +### register\_tools + +Register the SWAIG tool for Wikipedia search. + +#### Signature + +```python +register_tools() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/skills/wikipedia_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/wikipedia_search/skill.py) + +Line 83. + +*** + +### search\_wiki + +Search Wikipedia for articles matching the query. + +#### Signature + +```python +search_wiki(query: str) -> str +``` + +#### Parameters + + + The search term to look up + + +#### Returns + +`str` — String containing the Wikipedia article content or error message + +#### Source + +[`signalwire/signalwire/skills/wikipedia_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/wikipedia_search/skill.py) + +Line 110. + +*** + +### setup + +Setup the Wikipedia search skill. + +#### Signature + +```python +setup() -> bool +``` + +#### Returns + +`bool` — True if setup successful, False otherwise + +#### Source + +[`signalwire/signalwire/skills/wikipedia_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/wikipedia_search/skill.py) + +Line 62. + +## Source + +[`signalwire/signalwire/skills/wikipedia_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/wikipedia_search/skill.py) + +Line 22. diff --git a/fern/products/sdk-reference/python/agents/swaig-function/index.mdx b/fern/products/sdk-reference/python/agents/swaig-function/index.mdx new file mode 100644 index 0000000000..9be0e39f8e --- /dev/null +++ b/fern/products/sdk-reference/python/agents/swaig-function/index.mdx @@ -0,0 +1,32 @@ +--- +slug: "/reference/python/agents/swaig-function" +title: "swaig_function" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.swaig_function" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swaig_function.py" +--- +# `swaig_function` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module swaig_function +``` + +## Source + +[`signalwire/signalwire/core/swaig_function.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swaig_function.py) diff --git a/fern/products/sdk-reference/python/agents/swaig-function/index__2.mdx b/fern/products/sdk-reference/python/agents/swaig-function/index__2.mdx new file mode 100644 index 0000000000..9b26cf9ded --- /dev/null +++ b/fern/products/sdk-reference/python/agents/swaig-function/index__2.mdx @@ -0,0 +1,302 @@ +--- +slug: "/reference/python/agents/swaig-function/index__2" +title: "SWAIGFunction" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.core.swaig_function.SWAIGFunction" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swaig_function.py" +--- +# `SWAIGFunction` + +Represents a SWAIG function — i.e., a tool the AI model can call. + +A SWAIG function is exactly the same concept as a "tool" in native +OpenAI / Anthropic tool calling. Each SWAIGFunction is rendered into +the OpenAI tool schema format and sent to the model on every turn: + +``` +{"type": "function", "function": { + "name": self.name, + "description": self.description, + "parameters": self.parameters, +}} +``` + +The model parses `description` (and the `description` inside each +parameter) to decide WHEN to call the tool and HOW to fill in the +arguments. Both fields are prompt-engineered text — the quality of +your descriptions directly drives tool-selection accuracy. + +Use AgentBase.define\_tool() to create one (it builds the +SWAIGFunction for you and registers it). Use the @agent.tool() +decorator for the same thing in class-based agents. + +## Signature + +```python +class SWAIGFunction +``` + +## Examples + +```python +{"type": "function", "function": { + "name": self.name, + "description": self.description, + "parameters": self.parameters, +}} +``` + +## Properties + + + + + + + + + + + + + + + + + + + + + + + + + + + +## Methods + +### \_\_call\_\_ + +Call the underlying handler function + +#### Signature + +```python +__call__(*args = (), **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/core/swaig_function.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swaig_function.py) + +Line 133. + +*** + +### \_\_init\_\_ + +Initialize a new SWAIG function. + +#### Signature + +```python +__init__( + name: str, + handler: Callable, + description: str, + parameters: Dict[str, Dict] = None, + secure: bool = False, + fillers: Optional[Dict[str, List[str]]] = None, + wait_file: Optional[str] = None, + wait_file_loops: Optional[int] = None, + webhook_url: Optional[str] = None, + required: Optional[List[str]] = None, + is_typed_handler: bool = False, + **extra_swaig_fields = {} +) +``` + +#### Parameters + + + Function name. Becomes the `name` field in the OpenAI tool schema sent to the model — what the model emits when it decides to call this tool. + + + + Python callable invoked when the model calls this tool. + + + + LLM-facing description. The model reads this on every turn to decide whether to call the tool. Be specific about WHEN to use it and what makes it the right choice over sibling tools — vague descriptions are the most common cause of "model has the right tool but doesn't call it" failures. + + + + JSON Schema for the arguments. Per-property `description` strings inside the schema are also LLM-facing — write them as instructions to the model on how to fill in each argument. + + + + Whether this function requires SWAIG token validation. + + + + Optional dictionary of filler phrases by language code (deprecated, use wait\_file). + + + + Optional URL to audio file to play while function executes. + + + + Optional number of times to loop the wait\_file. + + + + Optional external webhook URL to use instead of local handling. + + + + Optional list of required parameter names. + + + + Whether the handler uses type-hinted parameters (auto-wrapped). + + + + +#### Source + +[`signalwire/signalwire/core/swaig_function.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swaig_function.py) + +Line 44. + +*** + +### execute + +Execute the function with the given arguments + +#### Signature + +```python +execute( + args: Dict[str, Any], + raw_data: Optional[Dict[str, Any]] = None +) -> Dict[str, Any] +``` + +#### Parameters + + + Parsed arguments for the function + + + + Optional raw request data + + +#### Returns + +`Dict[str, Any]` — Function result as a dictionary (from FunctionResult.to\_dict()) + +#### Source + +[`signalwire/signalwire/core/swaig_function.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swaig_function.py) + +Line 139. + +*** + +### to\_swaig + +Convert this function to a SWAIG-compatible JSON object for SWML + +#### Signature + +```python +to_swaig( + base_url: str, + token: Optional[str] = None, + call_id: Optional[str] = None, + include_auth: bool = True +) -> Dict[str, Any] +``` + +#### Parameters + + + Base URL for the webhook + + + + Optional auth token to include + + + + Optional call ID for session tracking + + + + Whether to include auth credentials in URL + + +#### Returns + +`Dict[str, Any]` — Dictionary representation for the SWAIG array in SWML + +#### Source + +[`signalwire/signalwire/core/swaig_function.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swaig_function.py) + +Line 234. + +*** + +### validate\_args + +Validate the arguments against the parameter schema. + +Uses jsonschema\_rs if available for fast validation, falls back to +jsonschema if available, otherwise skips validation. + +#### Signature + +```python +validate_args(args: Dict[str, Any]) -> tuple +``` + +#### Parameters + + + Arguments to validate + + +#### Returns + +`tuple` — Tuple of (is\_valid: bool, errors: list\[str]) If no validation library is available, returns (True, \[]) + +#### Source + +[`signalwire/signalwire/core/swaig_function.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swaig_function.py) + +Line 180. + +## Source + +[`signalwire/signalwire/core/swaig_function.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swaig_function.py) + +Line 21. diff --git a/fern/products/sdk-reference/python/agents/swml-builder/index.mdx b/fern/products/sdk-reference/python/agents/swml-builder/index.mdx new file mode 100644 index 0000000000..d8a56540fa --- /dev/null +++ b/fern/products/sdk-reference/python/agents/swml-builder/index.mdx @@ -0,0 +1,36 @@ +--- +slug: "/reference/python/agents/swml-builder" +title: "swml_builder" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.swml_builder" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_builder.py" +--- +# `swml_builder` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module swml_builder +``` + +## Constants + + + +## Source + +[`signalwire/signalwire/core/swml_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_builder.py) diff --git a/fern/products/sdk-reference/python/agents/swml-builder/index__2.mdx b/fern/products/sdk-reference/python/agents/swml-builder/index__2.mdx new file mode 100644 index 0000000000..a9ac2e688a --- /dev/null +++ b/fern/products/sdk-reference/python/agents/swml-builder/index__2.mdx @@ -0,0 +1,414 @@ +--- +slug: "/reference/python/agents/swml-builder/index__2" +title: "SWMLBuilder" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.core.swml_builder.SWMLBuilder" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_builder.py" +--- +# `SWMLBuilder` + +Fluent builder for SWML documents + +This class provides a fluent interface for building SWML documents +by chaining method calls. It delegates to an underlying SWMLService +instance for the actual document creation. + +## Signature + +```python +class SWMLBuilder +``` + +## Properties + + + +## Methods + +### \_\_getattr\_\_ + +Dynamically generate and return SWML verb methods when accessed + +This method is called when an attribute lookup fails through the normal +mechanisms. It checks if the attribute name corresponds to a SWML verb +defined in the schema, and if so, dynamically creates a method for that verb. + +#### Signature + +```python +__getattr__(name: str) -> Any +``` + +#### Parameters + + + The name of the attribute being accessed + + +#### Returns + +`Any` — The dynamically created verb method if name is a valid SWML verb, otherwise raises AttributeError + +#### Throws + +- `AttributeError` — If name is not a valid SWML verb + +#### Source + +[`signalwire/signalwire/core/swml_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_builder.py) + +Line 326. + +*** + +### \_\_init\_\_ + +Initialize with a SWMLService instance + +#### Signature + +```python +__init__(service: SWMLService) +``` + +#### Parameters + + + The SWMLService to delegate to + + +#### Source + +[`signalwire/signalwire/core/swml_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_builder.py) + +Line 39. + +*** + +### add\_section + +Add a new section to the document + +#### Signature + +```python +add_section(section_name: str) -> Self +``` + +#### Parameters + + + Name of the section to add + + +#### Returns + +`Self` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/swml_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_builder.py) + +Line 206. + +*** + +### ai + +Add an 'ai' verb to the main section + +#### Signature + +```python +ai( + prompt_text: Optional[str] = None, + prompt_pom: Optional[List[Dict[str, Any]]] = None, + post_prompt: Optional[str] = None, + post_prompt_url: Optional[str] = None, + swaig: Optional[Dict[str, Any]] = None, + **kwargs = {} +) -> Self +``` + +#### Parameters + + + Text prompt for the AI (mutually exclusive with prompt\_pom) + + + + POM structure for the AI prompt (mutually exclusive with prompt\_text) + + + + Optional post-prompt text + + + + Optional URL for post-prompt processing + + + + Optional SWAIG configuration + + + + +#### Returns + +`Self` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/swml_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_builder.py) + +Line 89. + +*** + +### answer + +Add an 'answer' verb to the main section + +#### Signature + +```python +answer(max_duration: Optional[int] = None, codecs: Optional[str] = None) -> Self +``` + +#### Parameters + + + Maximum duration in seconds + + + + Comma-separated list of codecs + + +#### Returns + +`Self` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/swml_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_builder.py) + +Line 54. + +*** + +### build + +Build and return the SWML document + +#### Signature + +```python +build() -> Dict[str, Any] +``` + +#### Returns + +`Dict[str, Any]` — The complete SWML document as a dictionary + +#### Source + +[`signalwire/signalwire/core/swml_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_builder.py) + +Line 219. + +*** + +### hangup + +Add a 'hangup' verb to the main section + +#### Signature + +```python +hangup(reason: Optional[str] = None) -> Self +``` + +#### Parameters + + + Optional reason for hangup + + +#### Returns + +`Self` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/swml_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_builder.py) + +Line 73. + +*** + +### play + +Add a 'play' verb to the main section + +#### Signature + +```python +play( + url: Optional[str] = None, + urls: Optional[List[str]] = None, + volume: Optional[float] = None, + say_voice: Optional[str] = None, + say_language: Optional[str] = None, + say_gender: Optional[str] = None, + auto_answer: Optional[bool] = None +) -> Self +``` + +#### Parameters + + + Single URL to play (mutually exclusive with urls) + + + + List of URLs to play (mutually exclusive with url) + + + + Volume level (-40 to 40) + + + + Voice for text-to-speech + + + + Language for text-to-speech + + + + Gender for text-to-speech + + + + Whether to auto-answer the call + + +#### Returns + +`Self` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/swml_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_builder.py) + +Line 132. + +*** + +### render + +Build and render the SWML document as a JSON string + +#### Signature + +```python +render() -> str +``` + +#### Returns + +`str` — The complete SWML document as a JSON string + +#### Source + +[`signalwire/signalwire/core/swml_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_builder.py) + +Line 228. + +*** + +### reset + +Reset the document to an empty state + +#### Signature + +```python +reset() -> Self +``` + +#### Returns + +`Self` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/swml_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_builder.py) + +Line 237. + +*** + +### say + +Add a 'play' verb with say: prefix for text-to-speech + +#### Signature + +```python +say( + text: str, + voice: Optional[str] = None, + language: Optional[str] = None, + gender: Optional[str] = None, + volume: Optional[float] = None +) -> Self +``` + +#### Parameters + + + Text to speak + + + + Voice for text-to-speech + + + + Language for text-to-speech + + + + Gender for text-to-speech + + + + Volume level (-40 to 40) + + +#### Returns + +`Self` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/swml_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_builder.py) + +Line 178. + +## Source + +[`signalwire/signalwire/core/swml_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_builder.py) + +Line 30. diff --git a/fern/products/sdk-reference/python/agents/swml-handler/ai-verb-handler/index.mdx b/fern/products/sdk-reference/python/agents/swml-handler/ai-verb-handler/index.mdx new file mode 100644 index 0000000000..3d58968167 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/swml-handler/ai-verb-handler/index.mdx @@ -0,0 +1,144 @@ +--- +slug: "/reference/python/agents/swml-handler/ai-verb-handler" +title: "AIVerbHandler" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.core.swml_handler.AIVerbHandler" + parent: "signalwire.core.swml_handler" + module: "agents.swml_handler" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_handler.py" +--- +# `AIVerbHandler` + +Handler for the SWML 'ai' verb + +The 'ai' verb is complex and requires specialized handling, particularly +for managing prompts, SWAIG functions, and AI configurations. + +## Signature + +```python +class AIVerbHandler(SWMLVerbHandler) +``` + +## Inheritance + +**Extends:** [SWMLVerbHandler](/docs/sdk-reference/reference/python/agents/swml-handler/swml-verb-handler) + +## Methods + +### build\_config + +Build a configuration for the AI verb + +#### Signature + +```python +build_config( + prompt_text: Optional[str] = None, + prompt_pom: Optional[List[Dict[str, Any]]] = None, + contexts: Optional[Dict[str, Any]] = None, + post_prompt: Optional[str] = None, + post_prompt_url: Optional[str] = None, + swaig: Optional[Dict[str, Any]] = None, + **kwargs = {} +) -> Dict[str, Any] +``` + +#### Parameters + + + Text prompt for the AI (mutually exclusive with prompt\_pom) + + + + POM structure for the AI prompt (mutually exclusive with prompt\_text) + + + + Optional contexts and steps configuration (can be combined with text or pom) + + + + Optional post-prompt text + + + + Optional URL for post-prompt processing + + + + Optional SWAIG configuration + + + + +#### Returns + +`Dict[str, Any]` — AI verb configuration dictionary + +#### Source + +[`signalwire/signalwire/core/swml_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_handler.py) + +Line 132. + +*** + +### get\_verb\_name + +Get the name of the verb this handler handles + +#### Signature + +```python +get_verb_name() -> str +``` + +#### Returns + +`str` — "ai" as the verb name + +#### Source + +[`signalwire/signalwire/core/swml_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_handler.py) + +Line 75. + +*** + +### validate\_config + +Validate the configuration for the AI verb + +#### Signature + +```python +validate_config(config: Dict[str, Any]) -> Tuple[bool, List[str]] +``` + +#### Parameters + + + The configuration dictionary for the AI verb + + +#### Returns + +`Tuple[bool, List[str]]` — (is\_valid, error\_messages) tuple + +#### Source + +[`signalwire/signalwire/core/swml_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_handler.py) + +Line 84. + +## Source + +[`signalwire/signalwire/core/swml_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_handler.py) + +Line 67. diff --git a/fern/products/sdk-reference/python/agents/swml-handler/index.mdx b/fern/products/sdk-reference/python/agents/swml-handler/index.mdx new file mode 100644 index 0000000000..3839876e0a --- /dev/null +++ b/fern/products/sdk-reference/python/agents/swml-handler/index.mdx @@ -0,0 +1,48 @@ +--- +slug: "/reference/python/agents/swml-handler" +title: "swml_handler" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.swml_handler" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_handler.py" +--- +# `swml_handler` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module swml_handler +``` + +## Classes + + + + Handler for the SWML 'ai' verb + + + + Base interface for SWML verb handlers + + + + Registry for SWML verb handlers + + + +## Source + +[`signalwire/signalwire/core/swml_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_handler.py) diff --git a/fern/products/sdk-reference/python/agents/swml-handler/swml-verb-handler/index.mdx b/fern/products/sdk-reference/python/agents/swml-handler/swml-verb-handler/index.mdx new file mode 100644 index 0000000000..daef4f90c4 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/swml-handler/swml-verb-handler/index.mdx @@ -0,0 +1,119 @@ +--- +slug: "/reference/python/agents/swml-handler/swml-verb-handler" +title: "SWMLVerbHandler" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.core.swml_handler.SWMLVerbHandler" + parent: "signalwire.core.swml_handler" + module: "agents.swml_handler" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_handler.py" +--- +# `SWMLVerbHandler` + +Base interface for SWML verb handlers + +This abstract class defines the interface that all SWML verb handlers +must implement. Verb handlers provide specialized logic for complex +SWML verbs that cannot be handled generically. + +## Signature + +```python +class SWMLVerbHandler(ABC) +``` + +## Inheritance + +**Extends:** `ABC` + +## Methods + +### build\_config + +Build a configuration for this verb from the provided arguments + +**Modifiers:** `abstract` + +#### Signature + +```python +build_config(**kwargs = {}) -> Dict[str, Any] +``` + +#### Parameters + + + +#### Returns + +`Dict[str, Any]` — Configuration dictionary + +#### Source + +[`signalwire/signalwire/core/swml_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_handler.py) + +Line 53. + +*** + +### get\_verb\_name + +Get the name of the verb this handler handles + +**Modifiers:** `abstract` + +#### Signature + +```python +get_verb_name() -> str +``` + +#### Returns + +`str` — The verb name as a string + +#### Source + +[`signalwire/signalwire/core/swml_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_handler.py) + +Line 30. + +*** + +### validate\_config + +Validate the configuration for this verb + +**Modifiers:** `abstract` + +#### Signature + +```python +validate_config(config: Dict[str, Any]) -> Tuple[bool, List[str]] +``` + +#### Parameters + + + The configuration dictionary for this verb + + +#### Returns + +`Tuple[bool, List[str]]` — (is\_valid, error\_messages) tuple + +#### Source + +[`signalwire/signalwire/core/swml_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_handler.py) + +Line 40. + +## Source + +[`signalwire/signalwire/core/swml_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_handler.py) + +Line 21. diff --git a/fern/products/sdk-reference/python/agents/swml-handler/verb-handler-registry/index.mdx b/fern/products/sdk-reference/python/agents/swml-handler/verb-handler-registry/index.mdx new file mode 100644 index 0000000000..c631dc11b4 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/swml-handler/verb-handler-registry/index.mdx @@ -0,0 +1,134 @@ +--- +slug: "/reference/python/agents/swml-handler/verb-handler-registry" +title: "VerbHandlerRegistry" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.core.swml_handler.VerbHandlerRegistry" + parent: "signalwire.core.swml_handler" + module: "agents.swml_handler" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_handler.py" +--- +# `VerbHandlerRegistry` + +Registry for SWML verb handlers + +This class maintains a registry of handlers for special SWML verbs +and provides methods for accessing and using them. + +## Signature + +```python +class VerbHandlerRegistry +``` + +## Methods + +### \_\_init\_\_ + +Initialize the registry with default handlers + +#### Signature + +```python +__init__() +``` + +#### Source + +[`signalwire/signalwire/core/swml_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_handler.py) + +Line 218. + +*** + +### get\_handler + +Get the handler for a specific verb + +#### Signature + +```python +get_handler(verb_name: str) -> Optional[SWMLVerbHandler] +``` + +#### Parameters + + + The name of the verb + + +#### Returns + +`Optional[SWMLVerbHandler]` — The handler if found, None otherwise + +#### Source + +[`signalwire/signalwire/core/swml_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_handler.py) + +Line 235. + +*** + +### has\_handler + +Check if a handler exists for a specific verb + +#### Signature + +```python +has_handler(verb_name: str) -> bool +``` + +#### Parameters + + + The name of the verb + + +#### Returns + +`bool` — True if a handler exists, False otherwise + +#### Source + +[`signalwire/signalwire/core/swml_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_handler.py) + +Line 247. + +*** + +### register\_handler + +Register a new verb handler + +#### Signature + +```python +register_handler(handler: SWMLVerbHandler) -> None +``` + +#### Parameters + + + The handler to register + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/core/swml_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_handler.py) + +Line 225. + +## Source + +[`signalwire/signalwire/core/swml_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_handler.py) + +Line 210. diff --git a/fern/products/sdk-reference/python/agents/swml-renderer/index.mdx b/fern/products/sdk-reference/python/agents/swml-renderer/index.mdx new file mode 100644 index 0000000000..5bb8dacb7f --- /dev/null +++ b/fern/products/sdk-reference/python/agents/swml-renderer/index.mdx @@ -0,0 +1,32 @@ +--- +slug: "/reference/python/agents/swml-renderer" +title: "swml_renderer" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.swml_renderer" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_renderer.py" +--- +# `swml_renderer` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module swml_renderer +``` + +## Source + +[`signalwire/signalwire/core/swml_renderer.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_renderer.py) diff --git a/fern/products/sdk-reference/python/agents/swml-renderer/index__2.mdx b/fern/products/sdk-reference/python/agents/swml-renderer/index__2.mdx new file mode 100644 index 0000000000..e7ce46938c --- /dev/null +++ b/fern/products/sdk-reference/python/agents/swml-renderer/index__2.mdx @@ -0,0 +1,182 @@ +--- +slug: "/reference/python/agents/swml-renderer/index__2" +title: "SwmlRenderer" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.core.swml_renderer.SwmlRenderer" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_renderer.py" +--- +# `SwmlRenderer` + +Renders SWML documents for SignalWire AI Agents with AI and SWAIG components + +This class provides methods for rendering SWML documents using the SWMLService architecture. + +## Signature + +```python +class SwmlRenderer +``` + +## Methods + +### render\_function\_response\_swml + +Generate a SWML document for a function response + +**Modifiers:** `static` + +#### Signature + +```python +@staticmethod +render_function_response_swml( + response_text: str, + service: SWMLService, + actions: Optional[List[Dict[str, Any]]] = None, + format: str = 'json' +) -> str +``` + +#### Parameters + + + Text response to include in the document + + + + SWMLService instance to use + + + + Optional list of actions to perform + + + + Output format (json or yaml) + + +#### Returns + +`str` — SWML document as a string + +#### Source + +[`signalwire/signalwire/core/swml_renderer.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_renderer.py) + +Line 150. + +*** + +### render\_swml + +Generate a complete SWML document with AI configuration + +**Modifiers:** `static` + +#### Signature + +```python +@staticmethod +render_swml( + prompt: Union[str, List[Dict[str, Any]]], + service: SWMLService, + post_prompt: Optional[str] = None, + post_prompt_url: Optional[str] = None, + swaig_functions: Optional[List[Dict[str, Any]]] = None, + startup_hook_url: Optional[str] = None, + hangup_hook_url: Optional[str] = None, + prompt_is_pom: bool = False, + params: Optional[Dict[str, Any]] = None, + add_answer: bool = False, + record_call: bool = False, + record_format: str = 'mp4', + record_stereo: bool = True, + format: str = 'json', + default_webhook_url: Optional[str] = None +) -> str +``` + +#### Parameters + + + AI prompt text or POM structure + + + + SWMLService instance to use for document building + + + + Optional post-prompt text + + + + Optional post-prompt URL + + + + List of SWAIG function definitions + + + + Optional startup hook URL + + + + Optional hangup hook URL + + + + Whether prompt is POM format + + + + Additional AI verb parameters + + + + Whether to add answer verb + + + + Whether to add record\_call verb + + + + Recording format + + + + Whether to record in stereo + + + + Output format (json or yaml) + + + + Default webhook URL for SWAIG functions + + +#### Returns + +`str` — SWML document as a string + +#### Source + +[`signalwire/signalwire/core/swml_renderer.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_renderer.py) + +Line 28. + +## Source + +[`signalwire/signalwire/core/swml_renderer.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_renderer.py) + +Line 21. diff --git a/fern/products/sdk-reference/python/agents/swml-service/index.mdx b/fern/products/sdk-reference/python/agents/swml-service/index.mdx new file mode 100644 index 0000000000..4e9478c9e3 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/swml-service/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/agents/swml-service" +title: "swml_service" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.swml_service" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py" +--- +# `swml_service` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module swml_service +``` + +## Properties + + + +## Constants + + + +## Source + +[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) diff --git a/fern/products/sdk-reference/python/agents/swml-service/index__2.mdx b/fern/products/sdk-reference/python/agents/swml-service/index__2.mdx new file mode 100644 index 0000000000..4ee0f2a427 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/swml-service/index__2.mdx @@ -0,0 +1,639 @@ +--- +slug: "/reference/python/agents/swml-service/index__2" +title: "SWMLService" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.core.swml_service.SWMLService" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py" +--- +# `SWMLService` + +Base class for creating and serving SWML documents. + +This class provides core functionality for: + +- Loading and validating SWML schema +- Creating SWML documents +- Setting up web endpoints for serving SWML +- Managing authentication +- Registering SWML functions + +It serves as the foundation for more specialized services like AgentBase. + +## Signature + +```python +class SWMLService(ToolMixin) +``` + +## Inheritance + +**Extends:** [ToolMixin](/docs/sdk-reference/reference/python/agents/mixins/tool-mixin/tool-mixin) + +## Properties + + + + + Check if full JSON Schema validation is enabled. + + + + + + + + + + + + + + + + + + + + + + + + +## Methods + +### \_\_getattr\_\_ + +Dynamically generate and return SWML verb methods when accessed + +This method is called when an attribute lookup fails through the normal +mechanisms. It checks if the attribute name corresponds to a SWML verb +defined in the schema, and if so, dynamically creates a method for that verb. + +#### Signature + +```python +__getattr__(name: str) -> Any +``` + +#### Parameters + + + The name of the attribute being accessed + + +#### Returns + +`Any` — The dynamically created verb method if name is a valid SWML verb, otherwise raises AttributeError + +#### Throws + +- `AttributeError` — If name is not a valid SWML verb + +#### Source + +[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) + +Line 256. + +*** + +### \_\_init\_\_ + +Initialize a new SWML service + +#### Signature + +```python +__init__( + name: str, + route: str = '/', + host: str = '0.0.0.0', + port: Optional[int] = None, + basic_auth: Optional[Tuple[str, str]] = None, + schema_path: Optional[str] = None, + config_file: Optional[str] = None, + schema_validation: bool = True +) +``` + +#### Parameters + + + Service name/identifier + + + + HTTP route path for this service + + + + Host to bind the web server to + + + + Port to bind the web server to + + + + Optional (username, password) tuple for basic auth + + + + Optional path to the schema file + + + + Optional path to configuration file + + + + Enable schema validation. Default True. Can also be disabled via SWML\_SKIP\_SCHEMA\_VALIDATION=1 env var. + + +#### Source + +[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) + +Line 70. + +*** + +### add\_section + +Add a new section to the document + +#### Signature + +```python +add_section(section_name: str) -> bool +``` + +#### Parameters + + + Name of the section to add + + +#### Returns + +`bool` — True if the section was added, False if it already exists + +#### Source + +[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) + +Line 473. + +*** + +### add\_verb + +Add a verb to the main section of the current document + +#### Signature + +```python +add_verb(verb_name: str, config: Union[Dict[str, Any], int]) -> bool +``` + +#### Parameters + + + The name of the verb to add + + + + Configuration for the verb or direct value for certain verbs (e.g., sleep) + + +#### Returns + +`bool` — True if the verb was added successfully, False otherwise + +#### Source + +[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) + +Line 433. + +*** + +### add\_verb\_to\_section + +Add a verb to a specific section + +#### Signature + +```python +add_verb_to_section( + section_name: str, + verb_name: str, + config: Union[Dict[str, Any], int] +) -> bool +``` + +#### Parameters + + + Name of the section to add to + + + + The name of the verb to add + + + + Configuration for the verb or direct value for certain verbs (e.g., sleep) + + +#### Returns + +`bool` — True if the verb was added successfully, False otherwise + +#### Source + +[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) + +Line 489. + +*** + +### as\_router + +Create a FastAPI router for this service + +#### Signature + +```python +as_router() -> APIRouter +``` + +#### Returns + +`APIRouter` — FastAPI router + +#### Source + +[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) + +Line 561. + +*** + +### extract\_sip\_username + +Extract SIP username from request body + +This extracts the username portion of a SIP URI from the 'to' field +in the call data of a request body. + +**Modifiers:** `static` + +#### Signature + +```python +@staticmethod +extract_sip_username(request_body: Dict[str, Any]) -> Optional[str] +``` + +#### Parameters + + + The parsed JSON body of the request + + +#### Returns + +`Optional[str]` — The extracted SIP username, or None if not found + +#### Source + +[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) + +Line 821. + +*** + +### get\_basic\_auth\_credentials + +Get the basic auth credentials + +#### Signature + +```python +get_basic_auth_credentials( + include_source: bool = False +) -> Union[Tuple[str, str], Tuple[str, str, str]] +``` + +#### Parameters + + + Whether to include the source of the credentials + + +#### Returns + +`Union[Tuple[str, str], Tuple[str, str, str]]` — (username, password) tuple or (username, password, source) tuple if include\_source is True + +#### Source + +[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) + +Line 1133. + +*** + +### get\_document + +Get the current SWML document + +#### Signature + +```python +get_document() -> Dict[str, Any] +``` + +#### Returns + +`Dict[str, Any]` — The current SWML document as a dictionary + +#### Source + +[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) + +Line 534. + +*** + +### manual\_set\_proxy\_url + +Manually set the proxy URL base for webhook callbacks + +This can be called at runtime to set or update the proxy URL + +#### Signature + +```python +manual_set_proxy_url(proxy_url: str) -> None +``` + +#### Parameters + + + The base URL to use for webhooks (e.g., https://example.ngrok.io) + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) + +Line 1399. + +*** + +### on\_request + +Called when SWML is requested, with request data when available + +Subclasses can override this to inspect or modify SWML based on the request + +#### Signature + +```python +on_request( + request_data: Optional[dict] = None, + callback_path: Optional[str] = None +) -> Optional[dict] +``` + +#### Parameters + + + Optional dictionary containing the parsed POST body + + + + Optional callback path + + +#### Returns + +`Optional[dict]` — Optional dict to modify/augment the SWML document + +#### Source + +[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) + +Line 941. + +*** + +### register\_routing\_callback + +Register a callback function that will be called to determine routing +based on POST data. + +When a routing callback is registered, an endpoint at the specified path is automatically +created that will handle requests. This endpoint will use the callback to +determine if the request should be processed by this service or redirected. + +The callback should take a request object and request body dictionary and return: + +- A route string if it should be routed to a different endpoint +- None if normal processing should continue + +#### Signature + +```python +register_routing_callback( + callback_fn: Callable[Request, Dict[str, Any], Optional[str]], + path: str = '/sip' +) -> None +``` + +#### Parameters + + + The callback function to register + + + + The path where this callback should be registered (default: "/sip") + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) + +Line 795. + +*** + +### register\_verb\_handler + +Register a custom verb handler + +#### Signature + +```python +register_verb_handler(handler: SWMLVerbHandler) -> None +``` + +#### Parameters + + + The verb handler to register + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) + +Line 552. + +*** + +### render\_document + +Render the current SWML document as a JSON string + +#### Signature + +```python +render_document() -> str +``` + +#### Returns + +`str` — The current SWML document as a JSON string + +#### Source + +[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) + +Line 543. + +*** + +### reset\_document + +Reset the current document to an empty state + +#### Signature + +```python +reset_document() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) + +Line 427. + +*** + +### serve + +Start a web server for this service + +#### Signature + +```python +serve( + host: Optional[str] = None, + port: Optional[int] = None, + ssl_cert: Optional[str] = None, + ssl_key: Optional[str] = None, + ssl_enabled: Optional[bool] = None, + domain: Optional[str] = None +) -> None +``` + +#### Parameters + + + Host to bind to (defaults to self.host) + + + + Port to bind to (defaults to self.port) + + + + Path to SSL certificate file + + + + Path to SSL key file + + + + Whether to enable SSL + + + + Domain name for SSL certificate + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) + +Line 957. + +*** + +### stop + +Stop the web server + +#### Signature + +```python +stop() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) + +Line 1098. + +## Source + +[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) + +Line 56. diff --git a/fern/products/sdk-reference/python/agents/web/index.mdx b/fern/products/sdk-reference/python/agents/web/index.mdx new file mode 100644 index 0000000000..5c5e834e9e --- /dev/null +++ b/fern/products/sdk-reference/python/agents/web/index.mdx @@ -0,0 +1,44 @@ +--- +slug: "/reference/python/agents/web" +title: "web" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.web" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/web/__init__.py" +--- +# `web` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module web +``` + +## Properties + + + +## Modules + + + + Copyright (c) 2025 SignalWire + + + +## Source + +[`signalwire/signalwire/web/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/web/__init__.py) diff --git a/fern/products/sdk-reference/python/agents/web/web-service/index.mdx b/fern/products/sdk-reference/python/agents/web/web-service/index.mdx new file mode 100644 index 0000000000..df2178e7e4 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/web/web-service/index.mdx @@ -0,0 +1,44 @@ +--- +slug: "/reference/python/agents/web/web-service" +title: "web_service" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.web.web_service" + parent: "signalwire.web" + module: "agents.web" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/web/web_service.py" +--- +# `web_service` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module web_service +``` + +## Properties + + + +## Classes + + + + Static file serving service with HTTP API + + + +## Source + +[`signalwire/signalwire/web/web_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/web/web_service.py) diff --git a/fern/products/sdk-reference/python/agents/web/web-service/web-service/index.mdx b/fern/products/sdk-reference/python/agents/web/web-service/web-service/index.mdx new file mode 100644 index 0000000000..74a6ef53da --- /dev/null +++ b/fern/products/sdk-reference/python/agents/web/web-service/web-service/index.mdx @@ -0,0 +1,234 @@ +--- +slug: "/reference/python/agents/web/web-service/web-service" +title: "WebService" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.web.web_service.WebService" + parent: "signalwire.web.web_service" + module: "agents.web.web_service" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/web/web_service.py" +--- +# `WebService` + +Static file serving service with HTTP API + +## Signature + +```python +class WebService +``` + +## Properties + + + + + + + + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +Initialize WebService + +#### Signature + +```python +__init__( + port: int = 8002, + directories: Dict[str, str] = None, + basic_auth: Optional[Tuple[str, str]] = None, + config_file: Optional[str] = None, + enable_directory_browsing: bool = False, + allowed_extensions: Optional[list] = None, + blocked_extensions: Optional[list] = None, + max_file_size: int = 100 * 1024 * 1024, + enable_cors: bool = True +) +``` + +#### Parameters + + + Port to bind to (default: 8002) + + + + Dict mapping URL paths to local directories + + + + Optional tuple of (username, password) + + + + Optional configuration file path + + + + Allow directory listing + + + + List of allowed file extensions (e.g., \['.html', '.css']) + + + + List of blocked extensions (e.g., \['.env', '.git']) + + + + Maximum file size in bytes to serve + + + + Enable CORS support + + +#### Source + +[`signalwire/signalwire/web/web_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/web/web_service.py) + +Line 44. + +*** + +### add\_directory + +Add a new directory to serve + +#### Signature + +```python +add_directory(route: str, directory: str) -> None +``` + +#### Parameters + + + URL path to mount at (e.g., "/docs") + + + + Local directory path to serve + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/web/web_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/web/web_service.py) + +Line 461. + +*** + +### remove\_directory + +Remove a directory from being served + +#### Signature + +```python +remove_directory(route: str) -> None +``` + +#### Parameters + + + URL path to remove + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/web/web_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/web/web_service.py) + +Line 487. + +*** + +### start + +Start the service with optional HTTPS support + +#### Signature + +```python +start( + host: str = '0.0.0.0', + port: Optional[int] = None, + ssl_cert: Optional[str] = None, + ssl_key: Optional[str] = None +) +``` + +#### Parameters + + + Host to bind to (default: "0.0.0.0") + + + + Port to bind to (default: self.port) + + + + Path to SSL certificate file (overrides environment) + + + + Path to SSL key file (overrides environment) + + +#### Source + +[`signalwire/signalwire/web/web_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/web/web_service.py) + +Line 501. + +*** + +### stop + +Stop the service (placeholder for cleanup) + +#### Signature + +```python +stop() +``` + +#### Source + +[`signalwire/signalwire/web/web_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/web/web_service.py) + +Line 566. + +## Source + +[`signalwire/signalwire/web/web_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/web/web_service.py) + +Line 41. diff --git a/fern/products/sdk-reference/python/core/index.mdx b/fern/products/sdk-reference/python/core/index.mdx new file mode 100644 index 0000000000..fd7a653bdf --- /dev/null +++ b/fern/products/sdk-reference/python/core/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/core" +title: "core" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "core" +--- +# `core` + +## Classes + + + + Unified security configuration for SignalWire services. + + + +## Modules + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + diff --git a/fern/products/sdk-reference/python/core/logging-config/index.mdx b/fern/products/sdk-reference/python/core/logging-config/index.mdx new file mode 100644 index 0000000000..5080345ae9 --- /dev/null +++ b/fern/products/sdk-reference/python/core/logging-config/index.mdx @@ -0,0 +1,154 @@ +--- +slug: "/reference/python/core/logging-config" +title: "logging_config" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.logging_config" + parent: "core" + module: "core" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/logging_config.py" +--- +# `logging_config` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module logging_config +``` + +## Functions + +### configure\_logging + +Configure logging system once, globally, based on environment variables + +> \[!NOTE] +> SIGNALWIRE\_LOG\_MODE: off, stderr, default, auto +> SIGNALWIRE\_LOG\_LEVEL: debug, info, warning, error, critical +> SIGNALWIRE\_LOG\_FORMAT: console, json (default: console) + +#### Signature + +```python +configure_logging() +``` + +#### Source + +[`signalwire/signalwire/core/logging_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/logging_config.py) + +Line 98. + +*** + +### get\_execution\_mode + +Determine the execution mode based on environment variables + +#### Signature + +```python +get_execution_mode() +``` + +#### Returns + +'server', 'cgi', 'lambda', 'google\_cloud\_function', 'azure\_function', or 'unknown' + +#### Source + +[`signalwire/signalwire/core/logging_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/logging_config.py) + +Line 44. + +*** + +### get\_logger + +Get a logger instance for the specified name with structured logging support + +This is the single entry point for all logging in the SDK. +All modules should use this instead of direct logging module usage. + +#### Signature + +```python +get_logger(name) +``` + +#### Parameters + + + Logger name, typically **name** + + +#### Returns + +A structlog BoundLogger that supports .bind(), .info(), .debug(), etc. + +#### Source + +[`signalwire/signalwire/core/logging_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/logging_config.py) + +Line 280. + +*** + +### reset\_logging\_configuration + +Reset the logging configuration flag to allow reconfiguration + +This is useful when environment variables change after initial configuration. + +#### Signature + +```python +reset_logging_configuration() +``` + +#### Source + +[`signalwire/signalwire/core/logging_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/logging_config.py) + +Line 75. + +*** + +### strip\_control\_chars + +Strip control characters from log event values to prevent log injection. + +#### Signature + +```python +strip_control_chars(logger, method_name, event_dict) +``` + +#### Parameters + + + + + + + +#### Source + +[`signalwire/signalwire/core/logging_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/logging_config.py) + +Line 33. + +## Source + +[`signalwire/signalwire/core/logging_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/logging_config.py) diff --git a/fern/products/sdk-reference/python/core/security-config/index.mdx b/fern/products/sdk-reference/python/core/security-config/index.mdx new file mode 100644 index 0000000000..9a5a4eb262 --- /dev/null +++ b/fern/products/sdk-reference/python/core/security-config/index.mdx @@ -0,0 +1,38 @@ +--- +slug: "/reference/python/core/security-config" +title: "security_config" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.security_config" + parent: "core" + module: "core" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security_config.py" +--- +# `security_config` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module security_config +``` + +## Properties + + + + + +## Source + +[`signalwire/signalwire/core/security_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security_config.py) diff --git a/fern/products/sdk-reference/python/core/security-config/index__2.mdx b/fern/products/sdk-reference/python/core/security-config/index__2.mdx new file mode 100644 index 0000000000..85aa157ed4 --- /dev/null +++ b/fern/products/sdk-reference/python/core/security-config/index__2.mdx @@ -0,0 +1,310 @@ +--- +slug: "/reference/python/core/security-config/index__2" +title: "SecurityConfig" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.core.security_config.SecurityConfig" + parent: "core" + module: "core" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security_config.py" +--- +# `SecurityConfig` + +Unified security configuration for SignalWire services. + +This class provides centralized security settings that can be used by +both SWML and Search services, ensuring consistent security behavior. + +## Signature + +```python +class SecurityConfig +``` + +## Properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +Initialize security configuration. + +#### Signature + +```python +__init__(config_file: Optional[str] = None, service_name: Optional[str] = None) +``` + +#### Parameters + + + Optional path to config file + + + + Optional service name for finding service-specific config + + +#### Source + +[`signalwire/signalwire/core/security_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security_config.py) + +Line 60. + +*** + +### get\_basic\_auth + +Get basic auth credentials, generating if not set. + +If no basic auth password is configured (e.g. SWML\_BASIC\_AUTH\_PASSWORD +env var is unset and the SDK caller didn't pass one explicitly), the +SDK falls back to a random password generated via secrets.token\_urlsafe. +That password lives only in memory and is regenerated on every process +start, so any external caller (tests, RPC clients, MCP) that doesn't +share the auto-generated value will get HTTP 401. + +We log a warning the first time the auto-generated fallback fires so +the failure mode is visible in logs instead of silently breaking +external callers. Set SWML\_BASIC\_AUTH\_USER / SWML\_BASIC\_AUTH\_PASSWORD +(or load .env before constructing the agent) to suppress the warning. + +#### Signature + +```python +get_basic_auth() -> Tuple[str, str] +``` + +#### Returns + +`Tuple[str, str]` — Tuple of (username, password) + +#### Source + +[`signalwire/signalwire/core/security_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security_config.py) + +Line 247. + +*** + +### get\_cors\_config + +Get CORS configuration for FastAPI. + +#### Signature + +```python +get_cors_config() -> Dict[str, Any] +``` + +#### Returns + +`Dict[str, Any]` — Dictionary of CORS settings + +#### Source + +[`signalwire/signalwire/core/security_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security_config.py) + +Line 328. + +*** + +### get\_security\_headers + +Get security headers to add to responses. + +#### Signature + +```python +get_security_headers(is_https: bool = False) -> Dict[str, str] +``` + +#### Parameters + + + Whether the connection is over HTTPS + + +#### Returns + +`Dict[str, str]` — Dictionary of security headers + +#### Source + +[`signalwire/signalwire/core/security_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security_config.py) + +Line 290. + +*** + +### get\_ssl\_context\_kwargs + +Get SSL context kwargs for uvicorn. + +#### Signature + +```python +get_ssl_context_kwargs() -> Dict[str, Any] +``` + +#### Returns + +`Dict[str, Any]` — Dictionary of SSL parameters for uvicorn + +#### Source + +[`signalwire/signalwire/core/security_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security_config.py) + +Line 226. + +*** + +### get\_url\_scheme + +Get the URL scheme based on SSL configuration + +#### Signature + +```python +get_url_scheme() -> str +``` + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/core/security_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security_config.py) + +Line 342. + +*** + +### load\_from\_env + +Load configuration from environment variables + +#### Signature + +```python +load_from_env() +``` + +#### Source + +[`signalwire/signalwire/core/security_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security_config.py) + +Line 168. + +*** + +### log\_config + +Log the current security configuration + +#### Signature + +```python +log_config(service_name: str) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/core/security_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security_config.py) + +Line 346. + +*** + +### should\_allow\_host + +Check if a host is allowed. + +#### Signature + +```python +should_allow_host(host: str) -> bool +``` + +#### Parameters + + + The host to check + + +#### Returns + +`bool` — True if the host is allowed + +#### Source + +[`signalwire/signalwire/core/security_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security_config.py) + +Line 313. + +*** + +### validate\_ssl\_config + +Validate SSL configuration. + +#### Signature + +```python +validate_ssl_config() -> Tuple[bool, Optional[str]] +``` + +#### Returns + +`Tuple[bool, Optional[str]]` — Tuple of (is\_valid, error\_message) + +#### Source + +[`signalwire/signalwire/core/security_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security_config.py) + +Line 202. + +## Source + +[`signalwire/signalwire/core/security_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security_config.py) + +Line 19. diff --git a/fern/products/sdk-reference/python/core/security/index.mdx b/fern/products/sdk-reference/python/core/security/index.mdx new file mode 100644 index 0000000000..6b61bdb131 --- /dev/null +++ b/fern/products/sdk-reference/python/core/security/index.mdx @@ -0,0 +1,52 @@ +--- +slug: "/reference/python/core/security" +title: "security" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.security" + parent: "core" + module: "core" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/__init__.py" +--- +# `security` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module security +``` + +## Properties + + + +## Modules + + + + Copyright (c) 2025 SignalWire + + + + FastAPI middleware / dependency for SignalWire webhook signature validation. + + + + Webhook signature validation for SignalWire-signed HTTP requests. + + + +## Source + +[`signalwire/signalwire/core/security/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/__init__.py) diff --git a/fern/products/sdk-reference/python/core/security/session-manager/index.mdx b/fern/products/sdk-reference/python/core/security/session-manager/index.mdx new file mode 100644 index 0000000000..d8582a23af --- /dev/null +++ b/fern/products/sdk-reference/python/core/security/session-manager/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/core/security/session-manager" +title: "session_manager" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.security.session_manager" + parent: "signalwire.core.security" + module: "core.security" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/session_manager.py" +--- +# `session_manager` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module session_manager +``` + +## Classes + + + + Manages security tokens for function calls + + + +## Source + +[`signalwire/signalwire/core/security/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/session_manager.py) diff --git a/fern/products/sdk-reference/python/core/security/session-manager/session-manager/index.mdx b/fern/products/sdk-reference/python/core/security/session-manager/session-manager/index.mdx new file mode 100644 index 0000000000..2092ebfc71 --- /dev/null +++ b/fern/products/sdk-reference/python/core/security/session-manager/session-manager/index.mdx @@ -0,0 +1,370 @@ +--- +slug: "/reference/python/core/security/session-manager/session-manager" +title: "SessionManager" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.core.security.session_manager.SessionManager" + parent: "signalwire.core.security.session_manager" + module: "core.security.session_manager" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/session_manager.py" +--- +# `SessionManager` + +Manages security tokens for function calls + +This implementation is completely stateless - it does not track call sessions +or store any information in memory. All validation is done using cryptographic +signatures with the tokens containing all necessary information. + +## Signature + +```python +class SessionManager +``` + +## Properties + + + + + +## Methods + +### \_\_init\_\_ + +Initialize the session manager + +#### Signature + +```python +__init__(token_expiry_secs: int = 900, secret_key: Optional[str] = None) +``` + +#### Parameters + + + Seconds until tokens expire (default: 15 minutes) + + + + Secret key for signing tokens (generated if not provided) + + +#### Source + +[`signalwire/signalwire/core/security/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/session_manager.py) + +Line 31. + +*** + +### activate\_session + +Legacy method, does nothing but returns success + +#### Signature + +```python +activate_session(call_id: str) -> bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/core/security/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/session_manager.py) + +Line 184. + +*** + +### create\_session + +Create a new session ID if one isn't provided + +#### Signature + +```python +create_session(call_id: Optional[str] = None) -> str +``` + +#### Parameters + + + Optional call ID, generated if not provided + + +#### Returns + +`str` — The call\_id for the session + +#### Source + +[`signalwire/signalwire/core/security/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/session_manager.py) + +Line 44. + +*** + +### create\_tool\_token + +Alias for generate\_token to maintain backward compatibility + +#### Signature + +```python +create_tool_token(function_name: str, call_id: str) -> str +``` + +#### Parameters + + + Name of the function to generate a token for + + + + Call session ID + + +#### Returns + +`str` — A secure token + +#### Source + +[`signalwire/signalwire/core/security/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/session_manager.py) + +Line 92. + +*** + +### debug\_token + +Debug a token without validating it + +This method decodes the token and extracts its components for debugging purposes +without performing validation. Requires \_debug\_mode to be True. + +#### Signature + +```python +debug_token(token: str) -> Dict[str, Any] +``` + +#### Parameters + + + The token to debug + + +#### Returns + +`Dict[str, Any]` — Dictionary with token components and analysis + +#### Source + +[`signalwire/signalwire/core/security/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/session_manager.py) + +Line 208. + +*** + +### end\_session + +Legacy method, does nothing but returns success + +#### Signature + +```python +end_session(call_id: str) -> bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/core/security/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/session_manager.py) + +Line 190. + +*** + +### generate\_token + +Generate a secure self-contained token for a function call + +#### Signature + +```python +generate_token(function_name: str, call_id: str) -> str +``` + +#### Parameters + + + Name of the function to generate a token for + + + + Call session ID + + +#### Returns + +`str` — A secure token + +#### Source + +[`signalwire/signalwire/core/security/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/session_manager.py) + +Line 60. + +*** + +### get\_session\_metadata + +Legacy method, always returns empty metadata + +#### Signature + +```python +get_session_metadata(call_id: str) -> Optional[Dict[str, Any]] +``` + +#### Parameters + + + +#### Returns + +`Optional[Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/core/security/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/session_manager.py) + +Line 196. + +*** + +### set\_session\_metadata + +Legacy method, does nothing but returns success + +#### Signature + +```python +set_session_metadata(call_id: str, key: str, value: Any) -> bool +``` + +#### Parameters + + + + + + + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/core/security/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/session_manager.py) + +Line 202. + +*** + +### validate\_token + +Validate a function call token + +#### Signature + +```python +validate_token(call_id: str, function_name: str, token: str) -> bool +``` + +#### Parameters + + + Call session ID + + + + Name of the function being called + + + + Token to validate + + +#### Returns + +`bool` — True if valid, False otherwise + +#### Source + +[`signalwire/signalwire/core/security/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/session_manager.py) + +Line 105. + +*** + +### validate\_tool\_token + +Alias for validate\_token to maintain backward compatibility + +#### Signature + +```python +validate_tool_token(function_name: str, token: str, call_id: str) -> bool +``` + +#### Parameters + + + Name of the function being called + + + + Token to validate + + + + Call session ID + + +#### Returns + +`bool` — True if valid, False otherwise + +#### Source + +[`signalwire/signalwire/core/security/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/session_manager.py) + +Line 167. + +## Source + +[`signalwire/signalwire/core/security/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/session_manager.py) + +Line 23. diff --git a/fern/products/sdk-reference/python/core/security/webhook-middleware/index.mdx b/fern/products/sdk-reference/python/core/security/webhook-middleware/index.mdx new file mode 100644 index 0000000000..cc4ad2098d --- /dev/null +++ b/fern/products/sdk-reference/python/core/security/webhook-middleware/index.mdx @@ -0,0 +1,140 @@ +--- +slug: "/reference/python/core/security/webhook-middleware" +title: "webhook_middleware" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.security.webhook_middleware" + parent: "signalwire.core.security" + module: "core.security" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/webhook_middleware.py" +--- +# `webhook_middleware` + +FastAPI middleware / dependency for SignalWire webhook signature validation. + +Copyright (c) 2025 SignalWire. Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +This module ships a small, framework-aware adapter around +:func:`signalwire.core.security.webhook_validator.validate_webhook_signature`. + +Why a custom dependency rather than a vanilla `Depends` on `request.body()`? + +- We MUST capture the raw bytes BEFORE FastAPI's JSON parser consumes the + stream — re-serialization changes whitespace and key order, which breaks + the Scheme A digest. The dependency stashes the raw body on + `request.state.raw_body` so the downstream handler can re-parse without + re-reading the stream. +- Reverse-proxy / ngrok deployments need the URL the platform POSTed to, + which differs from the URL the SDK sees. The dependency honors + `X-Forwarded-Proto` / `X-Forwarded-Host` when `trust_proxy=True`, + plus the `SWML_PROXY_URL_BASE` env var, with `request.url` as last + resort. +- The legacy cXML/Compatibility scheme used the `X-Twilio-Signature` + header. We accept it as an alias of `X-SignalWire-Signature` so users + migrating from the legacy SDK can keep their callers unchanged. + +Usage:: + +``` +from signalwire.core.security.webhook_middleware import ( + make_webhook_validation_dependency, +) + +dep = make_webhook_validation_dependency(signing_key="PSK...") + +@app.post("/webhook", dependencies=[Depends(dep)]) +async def webhook(request: Request): + body = request.state.raw_body # bytes; re-parse if you need JSON +``` + +## Signature + +```python +module webhook_middleware +``` + +## Examples + +```python +from signalwire.core.security.webhook_middleware import ( + make_webhook_validation_dependency, +) + +dep = make_webhook_validation_dependency(signing_key="PSK...") + +@app.post("/webhook", dependencies=[Depends(dep)]) +async def webhook(request: Request): + body = request.state.raw_body # bytes; re-parse if you need JSON +``` + +## Properties + + + +## Constants + + + + + +## Functions + +### make\_webhook\_validation\_dependency + +Build a FastAPI dependency that enforces signature validation. + +The returned coroutine: + +1. Reads `await request.body()` and stashes the bytes on + `request.state.raw_body`. +2. Pulls the `X-SignalWire-Signature` header (or the Twilio alias). +3. Reconstructs the public URL (proxy headers / env / fallback). +4. Calls :func:`validate_webhook_signature`. +5. On invalid signature: raises `HTTPException(403)` to short-circuit + the handler. FastAPI's `dependencies=[Depends(...)]` only honors + short-circuiting via raised exceptions — returning a Response from a + dependency does not stop the endpoint. +6. On valid: returns `None` so the handler runs as normal. + +#### Signature + +```python +make_webhook_validation_dependency( + signing_key: str, + *, + trust_proxy: bool = False +) -> Callable[Request, Response, Awaitable[Optional[Response]]] +``` + +#### Parameters + + + The customer's Signing Key. Required, non-empty. + + + + If True, honor `X-Forwarded-Proto` / `X-Forwarded-Host` when reconstructing the URL. Default False — proxy headers are spoofable, so opt in only when you control the proxy. + + +#### Returns + +`Callable[Request, Response, Awaitable[Optional[Response]]]` — Async callable suitable for `Depends(...)`. + +#### Throws + +- `ValueError` — at construction time if `signing_key` is empty. + +#### Source + +[`signalwire/signalwire/core/security/webhook_middleware.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/webhook_middleware.py) + +Line 88. + +## Source + +[`signalwire/signalwire/core/security/webhook_middleware.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/webhook_middleware.py) diff --git a/fern/products/sdk-reference/python/core/security/webhook-validator/index.mdx b/fern/products/sdk-reference/python/core/security/webhook-validator/index.mdx new file mode 100644 index 0000000000..40e02e7f4f --- /dev/null +++ b/fern/products/sdk-reference/python/core/security/webhook-validator/index.mdx @@ -0,0 +1,154 @@ +--- +slug: "/reference/python/core/security/webhook-validator" +title: "webhook_validator" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.core.security.webhook_validator" + parent: "signalwire.core.security" + module: "core.security" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/webhook_validator.py" +--- +# `webhook_validator` + +Webhook signature validation for SignalWire-signed HTTP requests. + +Copyright (c) 2025 SignalWire. Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +Implements both schemes from porting-sdk/webhooks.md: + +- Scheme A (RELAY/SWML/JSON): hex(HMAC-SHA1(key, url + raw\_body)) +- Scheme B (Compat/cXML form): base64(HMAC-SHA1(key, url + sortedFormParams)) + with optional bodySHA256 query-param fallback for JSON-on-compat-surface. + +> \[!NOTE] +> validate\_webhook\_signature(signing\_key, signature, url, raw\_body) -> bool +> validate\_request(signing\_key, signature, url, params\_or\_raw\_body) -> bool + +All comparisons use `hmac.compare_digest` (constant-time) so the secret +is not leaked over repeated requests. + +## Signature + +```python +module webhook_validator +``` + +## Properties + + + +## Functions + +### validate\_request + +Legacy `@signalwire/compatibility-api` drop-in entry point. + +If `params_or_raw_body` is a string, delegates to +:func:`validate_webhook_signature` (Scheme A then Scheme B with parsed form). + +If it's a mapping or a list of (key, value) tuples, treats it as +pre-parsed form params and runs Scheme B directly (with URL port +normalization and optional bodySHA256 fallback). + +#### Signature + +```python +validate_request( + signing_key: str, + signature: str, + url: str, + params_or_raw_body: Union[str, Mapping[str, Any], List[Tuple[str, Any]], None] +) -> bool +``` + +#### Parameters + + + Customer's Signing Key. Missing raises `ValueError`. + + + + Header value. Missing / empty returns False. + + + + Full URL SignalWire POSTed to. + + + + `str` raw body OR pre-parsed form params. + + +#### Returns + +`bool` — True on match, False otherwise. + +#### Throws + +- `ValueError` — when `signing_key` is missing. +- `TypeError` — when `params_or_raw_body` is neither a string nor a mapping/list (e.g. a parsed JSON dict-like that's been rejected). + +#### Source + +[`signalwire/signalwire/core/security/webhook_validator.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/webhook_validator.py) + +Line 268. + +*** + +### validate\_webhook\_signature + +Validate a SignalWire webhook signature against both schemes. + +#### Signature + +```python +validate_webhook_signature( + signing_key: str, + signature: str, + url: str, + raw_body: str +) -> bool +``` + +#### Parameters + + + Customer's Signing Key from the Dashboard. UTF-8 string, secret. `None` / empty raises `ValueError` — that's a programming error, not a validation failure. + + + + The `X-SignalWire-Signature` header value (or `X-Twilio-Signature` for cXML compat). Missing / empty returns False without raising. + + + + The full URL SignalWire POSTed to (scheme, host, optional port, path, query). Must match what the platform saw — see the `URL reconstruction` section of porting-sdk/webhooks.md. + + + + The raw request body bytes as a UTF-8 string, BEFORE any JSON / form parsing. Must be a `str` — passing a parsed dict raises `TypeError`. + + +#### Returns + +`bool` — True if the signature matches either Scheme A (hex JSON) or Scheme B (base64 form, with port-normalization variants and optional bodySHA256 fallback). False otherwise. + +#### Throws + +- `ValueError` — when `signing_key` is missing. +- `TypeError` — when `raw_body` is not a string. + +#### Source + +[`signalwire/signalwire/core/security/webhook_validator.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/webhook_validator.py) + +Line 198. + +## Source + +[`signalwire/signalwire/core/security/webhook_validator.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/webhook_validator.py) diff --git a/fern/products/sdk-reference/python/core/utils/index.mdx b/fern/products/sdk-reference/python/core/utils/index.mdx new file mode 100644 index 0000000000..6bc5c89fd3 --- /dev/null +++ b/fern/products/sdk-reference/python/core/utils/index.mdx @@ -0,0 +1,82 @@ +--- +slug: "/reference/python/core/utils" +title: "utils" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.utils" + parent: "core" + module: "core" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/__init__.py" +--- +# `utils` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module utils +``` + +## Properties + + + +## Modules + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + +## Functions + +### is\_serverless\_mode + +Check if running in any serverless environment. + +#### Signature + +```python +is_serverless_mode() -> bool +``` + +#### Returns + +`bool` — True if in serverless mode, False if in server mode + +#### Source + +[`signalwire/signalwire/utils/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/__init__.py) + +Line 14. + +## Source + +[`signalwire/signalwire/utils/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/__init__.py) diff --git a/fern/products/sdk-reference/python/core/utils/pom-utils/index.mdx b/fern/products/sdk-reference/python/core/utils/pom-utils/index.mdx new file mode 100644 index 0000000000..8dcd426a4a --- /dev/null +++ b/fern/products/sdk-reference/python/core/utils/pom-utils/index.mdx @@ -0,0 +1,32 @@ +--- +slug: "/reference/python/core/utils/pom-utils" +title: "pom_utils" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.utils.pom_utils" + parent: "signalwire.utils" + module: "core.utils" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/pom_utils.py" +--- +# `pom_utils` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module pom_utils +``` + +## Source + +[`signalwire/signalwire/utils/pom_utils.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/pom_utils.py) diff --git a/fern/products/sdk-reference/python/core/utils/schema-utils/index.mdx b/fern/products/sdk-reference/python/core/utils/schema-utils/index.mdx new file mode 100644 index 0000000000..c2ced59cae --- /dev/null +++ b/fern/products/sdk-reference/python/core/utils/schema-utils/index.mdx @@ -0,0 +1,48 @@ +--- +slug: "/reference/python/core/utils/schema-utils" +title: "schema_utils" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.utils.schema_utils" + parent: "signalwire.utils" + module: "core.utils" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/schema_utils.py" +--- +# `schema_utils` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module schema_utils +``` + +## Properties + + + +## Classes + + + + Utility class for loading and working with SWML schemas + + + + Raised when SWML schema validation fails. + + + +## Source + +[`signalwire/signalwire/utils/schema_utils.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/schema_utils.py) diff --git a/fern/products/sdk-reference/python/core/utils/schema-utils/schema-utils/index.mdx b/fern/products/sdk-reference/python/core/utils/schema-utils/schema-utils/index.mdx new file mode 100644 index 0000000000..f08c5175ee --- /dev/null +++ b/fern/products/sdk-reference/python/core/utils/schema-utils/schema-utils/index.mdx @@ -0,0 +1,321 @@ +--- +slug: "/reference/python/core/utils/schema-utils/schema-utils" +title: "SchemaUtils" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.utils.schema_utils.SchemaUtils" + parent: "signalwire.utils.schema_utils" + module: "core.utils.schema_utils" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/schema_utils.py" +--- +# `SchemaUtils` + +Utility class for loading and working with SWML schemas + +## Signature + +```python +class SchemaUtils +``` + +## Properties + + + Check if full JSON Schema validation is available. + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +Initialize the schema utilities. + +#### Signature + +```python +__init__(schema_path: Optional[str] = None, schema_validation: bool = True) +``` + +#### Parameters + + + Path to the schema file + + + + Enable schema validation. Can also be disabled via SWML\_SKIP\_SCHEMA\_VALIDATION=1 environment variable. + + +#### Source + +[`signalwire/signalwire/utils/schema_utils.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/schema_utils.py) + +Line 45. + +*** + +### generate\_method\_body + +Generate the method body implementation for a verb + +#### Signature + +```python +generate_method_body(verb_name: str) -> str +``` + +#### Parameters + + + The name of the verb + + +#### Returns + +`str` — The method body as a string + +#### Source + +[`signalwire/signalwire/utils/schema_utils.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/schema_utils.py) + +Line 460. + +*** + +### generate\_method\_signature + +Generate a Python method signature for a verb + +#### Signature + +```python +generate_method_signature(verb_name: str) -> str +``` + +#### Parameters + + + The name of the verb + + +#### Returns + +`str` — A Python method signature string + +#### Source + +[`signalwire/signalwire/utils/schema_utils.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/schema_utils.py) + +Line 403. + +*** + +### get\_all\_verb\_names + +Get all verb names defined in the schema + +#### Signature + +```python +get_all_verb_names() -> List[str] +``` + +#### Returns + +`List[str]` — List of verb names + +#### Source + +[`signalwire/signalwire/utils/schema_utils.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/schema_utils.py) + +Line 379. + +*** + +### get\_verb\_parameters + +Get the parameter definitions for a specific verb + +#### Signature + +```python +get_verb_parameters(verb_name: str) -> Dict[str, Any] +``` + +#### Parameters + + + The name of the verb (e.g., "ai", "answer", etc.) + + +#### Returns + +`Dict[str, Any]` — Dictionary mapping parameter names to their definitions + +#### Source + +[`signalwire/signalwire/utils/schema_utils.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/schema_utils.py) + +Line 388. + +*** + +### get\_verb\_properties + +Get the properties for a specific verb + +#### Signature + +```python +get_verb_properties(verb_name: str) -> Dict[str, Any] +``` + +#### Parameters + + + The name of the verb (e.g., "ai", "answer", etc.) + + +#### Returns + +`Dict[str, Any]` — The properties for the verb or an empty dict if not found + +#### Source + +[`signalwire/signalwire/utils/schema_utils.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/schema_utils.py) + +Line 227. + +*** + +### get\_verb\_required\_properties + +Get the required properties for a specific verb + +#### Signature + +```python +get_verb_required_properties(verb_name: str) -> List[str] +``` + +#### Parameters + + + The name of the verb (e.g., "ai", "answer", etc.) + + +#### Returns + +`List[str]` — List of required property names for the verb or an empty list if not found + +#### Source + +[`signalwire/signalwire/utils/schema_utils.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/schema_utils.py) + +Line 243. + +*** + +### load\_schema + +Load the JSON schema from the specified path + +#### Signature + +```python +load_schema() -> Dict[str, Any] +``` + +#### Returns + +`Dict[str, Any]` — The schema as a dictionary + +#### Source + +[`signalwire/signalwire/utils/schema_utils.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/schema_utils.py) + +Line 148. + +*** + +### validate\_document + +Validate a complete SWML document against the schema. + +#### Signature + +```python +validate_document(document: Dict[str, Any]) -> Tuple[bool, List[str]] +``` + +#### Parameters + + + The complete SWML document to validate + + +#### Returns + +`Tuple[bool, List[str]]` — (is\_valid, error\_messages) tuple + +#### Source + +[`signalwire/signalwire/utils/schema_utils.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/schema_utils.py) + +Line 357. + +*** + +### validate\_verb + +Validate a verb configuration against the schema. + +Performs full JSON Schema validation including type checking and nested +object validation using jsonschema-rs. + +#### Signature + +```python +validate_verb( + verb_name: str, + verb_config: Dict[str, Any] +) -> Tuple[bool, List[str]] +``` + +#### Parameters + + + The name of the verb (e.g., "ai", "answer", etc.) + + + + The configuration for the verb + + +#### Returns + +`Tuple[bool, List[str]]` — (is\_valid, error\_messages) tuple + +#### Source + +[`signalwire/signalwire/utils/schema_utils.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/schema_utils.py) + +Line 260. + +## Source + +[`signalwire/signalwire/utils/schema_utils.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/schema_utils.py) + +Line 40. diff --git a/fern/products/sdk-reference/python/core/utils/schema-utils/schema-validation-error/index.mdx b/fern/products/sdk-reference/python/core/utils/schema-utils/schema-validation-error/index.mdx new file mode 100644 index 0000000000..4b55522517 --- /dev/null +++ b/fern/products/sdk-reference/python/core/utils/schema-utils/schema-validation-error/index.mdx @@ -0,0 +1,61 @@ +--- +slug: "/reference/python/core/utils/schema-utils/schema-validation-error" +title: "SchemaValidationError" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.utils.schema_utils.SchemaValidationError" + parent: "signalwire.utils.schema_utils" + module: "core.utils.schema_utils" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/schema_utils.py" +--- +# `SchemaValidationError` + +Raised when SWML schema validation fails. + +## Signature + +```python +class SchemaValidationError(Exception) +``` + +## Inheritance + +**Extends:** `Exception` + +## Properties + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(verb_name: str, errors: List[str]) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/utils/schema_utils.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/schema_utils.py) + +Line 30. + +## Source + +[`signalwire/signalwire/utils/schema_utils.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/schema_utils.py) + +Line 27. diff --git a/fern/products/sdk-reference/python/core/utils/token-generators/index.mdx b/fern/products/sdk-reference/python/core/utils/token-generators/index.mdx new file mode 100644 index 0000000000..f8340c2c66 --- /dev/null +++ b/fern/products/sdk-reference/python/core/utils/token-generators/index.mdx @@ -0,0 +1,32 @@ +--- +slug: "/reference/python/core/utils/token-generators" +title: "token_generators" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.utils.token_generators" + parent: "signalwire.utils" + module: "core.utils" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/token_generators.py" +--- +# `token_generators` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module token_generators +``` + +## Source + +[`signalwire/signalwire/utils/token_generators.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/token_generators.py) diff --git a/fern/products/sdk-reference/python/core/utils/url-validator/index.mdx b/fern/products/sdk-reference/python/core/utils/url-validator/index.mdx new file mode 100644 index 0000000000..8d896e7c3f --- /dev/null +++ b/fern/products/sdk-reference/python/core/utils/url-validator/index.mdx @@ -0,0 +1,68 @@ +--- +slug: "/reference/python/core/utils/url-validator" +title: "url_validator" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.utils.url_validator" + parent: "signalwire.utils" + module: "core.utils" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/url_validator.py" +--- +# `url_validator` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module url_validator +``` + +## Properties + + + +## Functions + +### validate\_url + +Validate that a URL is safe to fetch (not pointing to private/internal resources). + +#### Signature + +```python +validate_url(url: str, allow_private: bool = False) -> bool +``` + +#### Parameters + + + The URL to validate + + + + If True, allow private IP ranges (default: False) + + +#### Returns + +`bool` — True if the URL is safe to fetch, False otherwise + +#### Source + +[`signalwire/signalwire/utils/url_validator.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/url_validator.py) + +Line 34. + +## Source + +[`signalwire/signalwire/utils/url_validator.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/url_validator.py) diff --git a/fern/products/sdk-reference/python/core/utils/validators/index.mdx b/fern/products/sdk-reference/python/core/utils/validators/index.mdx new file mode 100644 index 0000000000..3117abd2c7 --- /dev/null +++ b/fern/products/sdk-reference/python/core/utils/validators/index.mdx @@ -0,0 +1,32 @@ +--- +slug: "/reference/python/core/utils/validators" +title: "validators" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.utils.validators" + parent: "signalwire.utils" + module: "core.utils" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/validators.py" +--- +# `validators` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module validators +``` + +## Source + +[`signalwire/signalwire/utils/validators.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/validators.py) diff --git a/fern/products/sdk-reference/python/index.mdx b/fern/products/sdk-reference/python/index.mdx index e32f140e72..d1a4cf642c 100644 --- a/fern/products/sdk-reference/python/index.mdx +++ b/fern/products/sdk-reference/python/index.mdx @@ -10,5 +10,9 @@ lustri: ## Modules +- [`agents`](/docs/sdk-reference/reference/python/agents) +- [`core`](/docs/sdk-reference/reference/python/core) +- [`relay`](/docs/sdk-reference/reference/python/relay) +- [`rest`](/docs/sdk-reference/reference/python/rest) - [`signalwire`](/docs/sdk-reference/reference/python/signalwire) diff --git a/fern/products/sdk-reference/python/relay/call/action/index.mdx b/fern/products/sdk-reference/python/relay/call/action/index.mdx new file mode 100644 index 0000000000..fadc380473 --- /dev/null +++ b/fern/products/sdk-reference/python/relay/call/action/index.mdx @@ -0,0 +1,103 @@ +--- +slug: "/reference/python/relay/call/action" +title: "Action" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.call.Action" + parent: "relay.call" + module: "relay.call" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py" +--- +# `Action` + +Base class for async action handles (play, record, detect, etc.). + +Holds a control\_id and back-reference to the Call. Resolves when the +server sends a terminal event for this control\_id. + +## Signature + +```python +class Action +``` + +## Properties + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + call: 'Call', + control_id: str, + terminal_event: str, + terminal_states: tuple[str, ...] +) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 54. + +*** + +### wait + +Wait for the action to complete. Returns the terminal event. + +**Modifiers:** `async` + +#### Signature + +```python +async wait(timeout: Optional[float] = None) -> RelayEvent +``` + +#### Parameters + + + +#### Returns + +`RelayEvent` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 84. + +## Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 47. diff --git a/fern/products/sdk-reference/python/relay/call/ai-action/index.mdx b/fern/products/sdk-reference/python/relay/call/ai-action/index.mdx new file mode 100644 index 0000000000..0c1300ba86 --- /dev/null +++ b/fern/products/sdk-reference/python/relay/call/ai-action/index.mdx @@ -0,0 +1,77 @@ +--- +slug: "/reference/python/relay/call/ai-action" +title: "AIAction" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.call.AIAction" + parent: "relay.call" + module: "relay.call" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py" +--- +# `AIAction` + +Handle for an active AI agent session. + +## Signature + +```python +class AIAction(Action) +``` + +## Inheritance + +**Extends:** [Action](/docs/sdk-reference/reference/python/relay/call/action) + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(call: 'Call', control_id: str) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 273. + +*** + +### stop + +**Modifiers:** `async` + +#### Signature + +```python +async stop() -> dict +``` + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 280. + +## Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 270. diff --git a/fern/products/sdk-reference/python/relay/call/collect-action/index.mdx b/fern/products/sdk-reference/python/relay/call/collect-action/index.mdx new file mode 100644 index 0000000000..941349994d --- /dev/null +++ b/fern/products/sdk-reference/python/relay/call/collect-action/index.mdx @@ -0,0 +1,127 @@ +--- +slug: "/reference/python/relay/call/collect-action" +title: "CollectAction" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.call.CollectAction" + parent: "relay.call" + module: "relay.call" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py" +--- +# `CollectAction` + +Handle for play\_and\_collect or standalone collect. + +## Signature + +```python +class CollectAction(Action) +``` + +## Inheritance + +**Extends:** [Action](/docs/sdk-reference/reference/python/relay/call/action) + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(call: 'Call', control_id: str) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 158. + +*** + +### start\_input\_timers + +Start the initial\_timeout timer on an active collect. + +**Modifiers:** `async` + +#### Signature + +```python +async start_input_timers() -> dict +``` + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 182. + +*** + +### stop + +**Modifiers:** `async` + +#### Signature + +```python +async stop() -> dict +``` + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 173. + +*** + +### volume + +**Modifiers:** `async` + +#### Signature + +```python +async volume(volume: float) -> dict +``` + +#### Parameters + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 177. + +## Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 155. diff --git a/fern/products/sdk-reference/python/relay/call/detect-action/index.mdx b/fern/products/sdk-reference/python/relay/call/detect-action/index.mdx new file mode 100644 index 0000000000..674ef7027f --- /dev/null +++ b/fern/products/sdk-reference/python/relay/call/detect-action/index.mdx @@ -0,0 +1,77 @@ +--- +slug: "/reference/python/relay/call/detect-action" +title: "DetectAction" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.call.DetectAction" + parent: "relay.call" + module: "relay.call" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py" +--- +# `DetectAction` + +Handle for an active detect operation. + +## Signature + +```python +class DetectAction(Action) +``` + +## Inheritance + +**Extends:** [Action](/docs/sdk-reference/reference/python/relay/call/action) + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(call: 'Call', control_id: str) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 140. + +*** + +### stop + +**Modifiers:** `async` + +#### Signature + +```python +async stop() -> dict +``` + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 151. + +## Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 137. diff --git a/fern/products/sdk-reference/python/relay/call/fax-action/index.mdx b/fern/products/sdk-reference/python/relay/call/fax-action/index.mdx new file mode 100644 index 0000000000..b2e09bff51 --- /dev/null +++ b/fern/products/sdk-reference/python/relay/call/fax-action/index.mdx @@ -0,0 +1,79 @@ +--- +slug: "/reference/python/relay/call/fax-action" +title: "FaxAction" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.call.FaxAction" + parent: "relay.call" + module: "relay.call" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py" +--- +# `FaxAction` + +Handle for an active send\_fax or receive\_fax operation. + +## Signature + +```python +class FaxAction(Action) +``` + +## Inheritance + +**Extends:** [Action](/docs/sdk-reference/reference/python/relay/call/action) + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(call: 'Call', control_id: str, method_prefix: str) +``` + +#### Parameters + + + + + + + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 216. + +*** + +### stop + +**Modifiers:** `async` + +#### Signature + +```python +async stop() -> dict +``` + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 221. + +## Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 213. diff --git a/fern/products/sdk-reference/python/relay/call/index.mdx b/fern/products/sdk-reference/python/relay/call/index.mdx new file mode 100644 index 0000000000..5e7280a4df --- /dev/null +++ b/fern/products/sdk-reference/python/relay/call/index.mdx @@ -0,0 +1,2292 @@ +--- +slug: "/reference/python/relay/call" +title: "call" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.call" + parent: "signalwire.relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py" +--- +# `call` + +Represents a live RELAY call. + +Created by RelayClient on inbound `calling.call.receive` events or +outbound `dial`/`begin` responses. + +## Signature + +```python +class Call +``` + +## Properties + + + + + + + + + + + + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + client: 'RelayClient', + call_id: str, + node_id: str, + project_id: str, + context: str, + *, + tag: str = '', + direction: str = '', + device: Optional[dict[str, Any]] = None, + state: str = '', + segment_id: str = '' +) +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 295. + +*** + +### \_\_repr\_\_ + +#### Signature + +```python +__repr__() -> str +``` + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 1527. + +*** + +### ai + +Start an AI agent session on the call. Returns an AIAction. + +**Modifiers:** `async` + +#### Signature + +```python +async ai( + *, + control_id: Optional[str] = None, + agent: Optional[str] = None, + prompt: Optional[dict[str, Any]] = None, + post_prompt: Optional[dict[str, Any]] = None, + post_prompt_url: Optional[str] = None, + post_prompt_auth_user: Optional[str] = None, + post_prompt_auth_password: Optional[str] = None, + global_data: Optional[dict[str, Any]] = None, + pronounce: Optional[list[dict[str, Any]]] = None, + hints: Optional[list[str]] = None, + languages: Optional[list[dict[str, Any]]] = None, + SWAIG: Optional[dict[str, Any]] = None, + ai_params: Optional[dict[str, Any]] = None, + on_completed: Optional[Callable[RelayEvent, Any]] = None, + **kwargs: Any = {} +) -> AIAction +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`AIAction` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 1332. + +*** + +### ai\_hold + +Put an AI agent session on hold. + +**Modifiers:** `async` + +#### Signature + +```python +async ai_hold( + *, + timeout: Optional[str] = None, + prompt: Optional[str] = None, + **kwargs: Any = {} +) -> dict +``` + +#### Parameters + + + + + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 1432. + +*** + +### ai\_message + +Send a message to an active AI agent session. + +**Modifiers:** `async` + +#### Signature + +```python +async ai_message( + *, + message_text: Optional[str] = None, + role: Optional[str] = None, + reset: Optional[dict[str, Any]] = None, + global_data: Optional[dict[str, Any]] = None, + **kwargs: Any = {} +) -> dict +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 1410. + +*** + +### ai\_unhold + +Resume an AI agent session from hold. + +**Modifiers:** `async` + +#### Signature + +```python +async ai_unhold(*, prompt: Optional[str] = None, **kwargs: Any = {}) -> dict +``` + +#### Parameters + + + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 1448. + +*** + +### amazon\_bedrock + +Connect to an Amazon Bedrock AI agent. + +**Modifiers:** `async` + +#### Signature + +```python +async amazon_bedrock( + *, + prompt: Optional[Any] = None, + SWAIG: Optional[dict[str, Any]] = None, + ai_params: Optional[dict[str, Any]] = None, + global_data: Optional[dict[str, Any]] = None, + post_prompt: Optional[dict[str, Any]] = None, + post_prompt_url: Optional[str] = None, + **kwargs: Any = {} +) -> dict +``` + +#### Parameters + + + + + + + + + + + + + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 1382. + +*** + +### answer + +Answer an inbound call. + +**Modifiers:** `async` + +#### Signature + +```python +async answer(**kwargs: Any = {}) -> dict +``` + +#### Parameters + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 482. + +*** + +### bind\_digit + +Bind a DTMF digit sequence to trigger a RELAY method. + +**Modifiers:** `async` + +#### Signature + +```python +async bind_digit( + digits: str, + bind_method: str, + *, + bind_params: Optional[dict[str, Any]] = None, + realm: Optional[str] = None, + max_triggers: Optional[int] = None, + **kwargs: Any = {} +) -> dict +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 1241. + +*** + +### clear\_digit\_bindings + +Clear all digit bindings, optionally filtered by realm. + +**Modifiers:** `async` + +#### Signature + +```python +async clear_digit_bindings( + *, + realm: Optional[str] = None, + **kwargs: Any = {} +) -> dict +``` + +#### Parameters + + + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 1265. + +*** + +### collect + +Collect digit/speech input without playing media. + +**Modifiers:** `async` + +#### Signature + +```python +async collect( + *, + digits: Optional[dict[str, Any]] = None, + speech: Optional[dict[str, Any]] = None, + initial_timeout: Optional[float] = None, + partial_results: Optional[bool] = None, + continuous: Optional[bool] = None, + send_start_of_input: Optional[bool] = None, + start_input_timers: Optional[bool] = None, + control_id: Optional[str] = None, + on_completed: Optional[Callable[RelayEvent, Any]] = None, + **kwargs: Any = {} +) -> StandaloneCollectAction +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`StandaloneCollectAction` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 779. + +*** + +### connect + +Bridge the call to one or more destinations. + +**Modifiers:** `async` + +#### Signature + +```python +async connect( + devices: list[list[dict[str, Any]]], + *, + ringback: Optional[list[dict[str, Any]]] = None, + tag: Optional[str] = None, + max_duration: Optional[int] = None, + max_price_per_minute: Optional[float] = None, + status_url: Optional[str] = None, + **kwargs: Any = {} +) -> dict +``` + +#### Parameters + + + + + + + + + + + + + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 818. + +*** + +### denoise + +Start noise reduction on the call. + +**Modifiers:** `async` + +#### Signature + +```python +async denoise() -> dict +``` + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 1188. + +*** + +### denoise\_stop + +Stop noise reduction on the call. + +**Modifiers:** `async` + +#### Signature + +```python +async denoise_stop() -> dict +``` + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 1192. + +*** + +### detect + +Start audio detection (machine, fax, digit). Returns a DetectAction. + +**Modifiers:** `async` + +#### Signature + +```python +async detect( + detect: dict[str, Any], + *, + timeout: Optional[float] = None, + control_id: Optional[str] = None, + on_completed: Optional[Callable[RelayEvent, Any]] = None, + **kwargs: Any = {} +) -> DetectAction +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`DetectAction` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 868. + +*** + +### detect\_answering\_machine + +Detect human vs answering machine (AMD). Typed convenience over :meth:`detect`. + +**Modifiers:** `async` + +#### Signature + +```python +async detect_answering_machine( + *, + initial_timeout: Optional[float] = None, + end_silence_timeout: Optional[float] = None, + machine_voice_threshold: Optional[float] = None, + machine_words_threshold: Optional[int] = None, + detect_interruptions: Optional[bool] = None, + detect_message_end: Optional[bool] = None, + timeout: Optional[float] = None, + on_completed: Optional[Callable[RelayEvent, Any]] = None +) -> DetectAction +``` + +#### Parameters + + + + + + + + + + + + + + + + + +#### Returns + +`DetectAction` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 609. + +*** + +### detect\_digit + +Detect DTMF digits. Typed convenience over :meth:`detect`. + +**Modifiers:** `async` + +#### Signature + +```python +async detect_digit( + *, + digits: Optional[str] = None, + timeout: Optional[float] = None, + on_completed: Optional[Callable[RelayEvent, Any]] = None +) -> DetectAction +``` + +#### Parameters + + + + + + + +#### Returns + +`DetectAction` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 594. + +*** + +### detect\_fax + +Detect a fax tone (CED/CNG). Typed convenience over :meth:`detect`. + +**Modifiers:** `async` + +#### Signature + +```python +async detect_fax( + *, + tone: Optional[str] = None, + timeout: Optional[float] = None, + on_completed: Optional[Callable[RelayEvent, Any]] = None +) -> DetectAction +``` + +#### Parameters + + + + + + + +#### Returns + +`DetectAction` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 637. + +*** + +### disconnect + +Disconnect (unbridge) a connected call. + +**Modifiers:** `async` + +#### Signature + +```python +async disconnect() -> dict +``` + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 844. + +*** + +### echo + +Echo audio back to the caller (useful for testing). + +**Modifiers:** `async` + +#### Signature + +```python +async echo( + *, + timeout: Optional[float] = None, + status_url: Optional[str] = None, + **kwargs: Any = {} +) -> dict +``` + +#### Parameters + + + + + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 1221. + +*** + +### hangup + +End/hang up the call. + +**Modifiers:** `async` + +#### Signature + +```python +async hangup(reason: str = 'hangup') -> dict +``` + +#### Parameters + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 486. + +*** + +### hold + +Put the call on hold. + +**Modifiers:** `async` + +#### Signature + +```python +async hold() -> dict +``` + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 1176. + +*** + +### join\_conference + +Join an ad-hoc audio conference. + +**Modifiers:** `async` + +#### Signature + +```python +async join_conference( + name: str, + *, + muted: Optional[bool] = None, + beep: Optional[str] = None, + start_on_enter: Optional[bool] = None, + end_on_exit: Optional[bool] = None, + wait_url: Optional[str] = None, + max_participants: Optional[int] = None, + record: Optional[str] = None, + region: Optional[str] = None, + trim: Optional[str] = None, + coach: Optional[str] = None, + status_callback: Optional[str] = None, + status_callback_event: Optional[str] = None, + status_callback_event_type: Optional[str] = None, + status_callback_method: Optional[str] = None, + recording_status_callback: Optional[str] = None, + recording_status_callback_event: Optional[str] = None, + recording_status_callback_event_type: Optional[str] = None, + recording_status_callback_method: Optional[str] = None, + stream_obj: Optional[dict[str, Any]] = None, + **kwargs: Any = {} +) -> dict +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 1098. + +*** + +### join\_room + +Join a video/audio room. + +**Modifiers:** `async` + +#### Signature + +```python +async join_room( + name: str, + *, + status_url: Optional[str] = None, + **kwargs: Any = {} +) -> dict +``` + +#### Parameters + + + + + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 1310. + +*** + +### leave\_conference + +Leave an audio conference. + +**Modifiers:** `async` + +#### Signature + +```python +async leave_conference(conference_id: str, **kwargs: Any = {}) -> dict +``` + +#### Parameters + + + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 1166. + +*** + +### leave\_room + +Leave the current room. + +**Modifiers:** `async` + +#### Signature + +```python +async leave_room(**kwargs: Any = {}) -> dict +``` + +#### Parameters + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 1324. + +*** + +### live\_transcribe + +Start or stop live transcription on the call. + +**Modifiers:** `async` + +#### Signature + +```python +async live_transcribe(action: dict[str, Any], **kwargs: Any = {}) -> dict +``` + +#### Parameters + + + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 1282. + +*** + +### live\_translate + +Start or stop live translation on the call. + +**Modifiers:** `async` + +#### Signature + +```python +async live_translate( + action: dict[str, Any], + *, + status_url: Optional[str] = None, + **kwargs: Any = {} +) -> dict +``` + +#### Parameters + + + + + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 1292. + +*** + +### on + +Register an event listener for this call. + +#### Signature + +```python +on(event_type: str, handler: EventHandler) -> None +``` + +#### Parameters + + + + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 361. + +*** + +### pass\_ + +Decline control of an inbound call, returning it to routing. + +**Modifiers:** `async` + +#### Signature + +```python +async pass_() -> dict +``` + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 490. + +*** + +### pay + +Start a payment collection. Returns a PayAction. + +**Modifiers:** `async` + +#### Signature + +```python +async pay( + payment_connector_url: str, + *, + control_id: Optional[str] = None, + input_method: Optional[str] = None, + status_url: Optional[str] = None, + payment_method: Optional[str] = None, + timeout: Optional[str] = None, + max_attempts: Optional[str] = None, + security_code: Optional[str] = None, + postal_code: Optional[str] = None, + min_postal_code_length: Optional[str] = None, + token_type: Optional[str] = None, + charge_amount: Optional[str] = None, + currency: Optional[str] = None, + language: Optional[str] = None, + voice: Optional[str] = None, + description: Optional[str] = None, + valid_card_types: Optional[str] = None, + parameters: Optional[list[dict[str, Any]]] = None, + prompts: Optional[list[dict[str, Any]]] = None, + on_completed: Optional[Callable[RelayEvent, Any]] = None, + **kwargs: Any = {} +) -> PayAction +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`PayAction` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 908. + +*** + +### play + +Play audio content. Returns a PlayAction for stop/pause/resume/wait. + +**Modifiers:** `async` + +#### Signature + +```python +async play( + media: list[dict[str, Any]], + *, + volume: Optional[float] = None, + direction: Optional[str] = None, + loop: Optional[int] = None, + control_id: Optional[str] = None, + on_completed: Optional[Callable[RelayEvent, Any]] = None, + **kwargs: Any = {} +) -> PlayAction +``` + +#### Parameters + + + + + + + + + + + + + + + +#### Returns + +`PlayAction` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 498. + +*** + +### play\_and\_collect + +Play audio and collect digit/speech input. + +**Modifiers:** `async` + +#### Signature + +```python +async play_and_collect( + media: list[dict[str, Any]], + collect: dict[str, Any], + *, + volume: Optional[float] = None, + control_id: Optional[str] = None, + on_completed: Optional[Callable[RelayEvent, Any]] = None, + **kwargs: Any = {} +) -> CollectAction +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`CollectAction` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 756. + +*** + +### play\_audio + +Play an audio file from a URL. Typed convenience over :meth:`play`. + +**Modifiers:** `async` + +#### Signature + +```python +async play_audio( + url: str, + *, + volume: Optional[float] = None, + on_completed: Optional[Callable[RelayEvent, Any]] = None +) -> PlayAction +``` + +#### Parameters + + + + + + + +#### Returns + +`PlayAction` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 548. + +*** + +### play\_ringtone + +Play a named ringtone by country code. Typed convenience over :meth:`play`. + +**Modifiers:** `async` + +#### Signature + +```python +async play_ringtone( + name: str, + *, + duration: Optional[float] = None, + volume: Optional[float] = None, + on_completed: Optional[Callable[RelayEvent, Any]] = None +) -> PlayAction +``` + +#### Parameters + + + + + + + + + +#### Returns + +`PlayAction` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 574. + +*** + +### play\_silence + +Play silence for `duration` seconds. Typed convenience over :meth:`play`. + +**Modifiers:** `async` + +#### Signature + +```python +async play_silence( + duration: float, + *, + on_completed: Optional[Callable[RelayEvent, Any]] = None +) -> PlayAction +``` + +#### Parameters + + + + + +#### Returns + +`PlayAction` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 562. + +*** + +### play\_tts + +Play text-to-speech. Typed convenience over :meth:`play`. + +Restores the legacy `call.play_tts(text=...)` ergonomics so callers +don't hand-build the `{"type": "tts", "params": {...}}` media shape. + +**Modifiers:** `async` + +#### Signature + +```python +async play_tts( + text: str, + *, + language: Optional[str] = None, + gender: Optional[str] = None, + voice: Optional[str] = None, + volume: Optional[float] = None, + on_completed: Optional[Callable[RelayEvent, Any]] = None +) -> PlayAction +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`PlayAction` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 522. + +*** + +### prompt\_audio + +Play an audio file then collect input. Typed media over :meth:`play_and_collect`. + +**Modifiers:** `async` + +#### Signature + +```python +async prompt_audio( + url: str, + collect: dict[str, Any], + *, + volume: Optional[float] = None, + on_completed: Optional[Callable[RelayEvent, Any]] = None +) -> CollectAction +``` + +#### Parameters + + + + + + + + + +#### Returns + +`CollectAction` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 679. + +*** + +### prompt\_tts + +Play TTS then collect input. Typed media over :meth:`play_and_collect`. + +**Modifiers:** `async` + +#### Signature + +```python +async prompt_tts( + text: str, + collect: dict[str, Any], + *, + language: Optional[str] = None, + gender: Optional[str] = None, + voice: Optional[str] = None, + volume: Optional[float] = None, + on_completed: Optional[Callable[RelayEvent, Any]] = None +) -> CollectAction +``` + +#### Parameters + + + + + + + + + + + + + + + +#### Returns + +`CollectAction` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 656. + +*** + +### queue\_enter + +Place the call in a queue. + +**Modifiers:** `async` + +#### Signature + +```python +async queue_enter( + queue_name: str, + *, + control_id: Optional[str] = None, + status_url: Optional[str] = None, + **kwargs: Any = {} +) -> dict +``` + +#### Parameters + + + + + + + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 1482. + +*** + +### queue\_leave + +Remove the call from a queue. + +**Modifiers:** `async` + +#### Signature + +```python +async queue_leave( + queue_name: str, + *, + control_id: Optional[str] = None, + queue_id: Optional[str] = None, + status_url: Optional[str] = None, + **kwargs: Any = {} +) -> dict +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 1501. + +*** + +### receive\_fax + +Receive a fax. Returns a FaxAction. + +**Modifiers:** `async` + +#### Signature + +```python +async receive_fax( + *, + control_id: Optional[str] = None, + on_completed: Optional[Callable[RelayEvent, Any]] = None, + **kwargs: Any = {} +) -> FaxAction +``` + +#### Parameters + + + + + + + +#### Returns + +`FaxAction` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 1002. + +*** + +### record + +Record audio from the call. Returns a RecordAction. + +**Modifiers:** `async` + +#### Signature + +```python +async record( + audio: Optional[dict[str, Any]] = None, + *, + control_id: Optional[str] = None, + on_completed: Optional[Callable[RelayEvent, Any]] = None, + **kwargs: Any = {} +) -> RecordAction +``` + +#### Parameters + + + + + + + + + +#### Returns + +`RecordAction` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 736. + +*** + +### refer + +Transfer a SIP call to an external SIP endpoint via REFER. + +**Modifiers:** `async` + +#### Signature + +```python +async refer( + device: dict[str, Any], + *, + status_url: Optional[str] = None, + **kwargs: Any = {} +) -> dict +``` + +#### Parameters + + + + + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 890. + +*** + +### send\_digits + +Send DTMF digits on the call. + +**Modifiers:** `async` + +#### Signature + +```python +async send_digits(digits: str, *, control_id: Optional[str] = None) -> dict +``` + +#### Parameters + + + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 852. + +*** + +### send\_fax + +Send a fax document. Returns a FaxAction. + +**Modifiers:** `async` + +#### Signature + +```python +async send_fax( + document: str, + *, + identity: Optional[str] = None, + header_info: Optional[str] = None, + control_id: Optional[str] = None, + on_completed: Optional[Callable[RelayEvent, Any]] = None, + **kwargs: Any = {} +) -> FaxAction +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`FaxAction` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 981. + +*** + +### stream + +Start streaming call audio to a WebSocket endpoint. Returns a StreamAction. + +**Modifiers:** `async` + +#### Signature + +```python +async stream( + url: str, + *, + name: Optional[str] = None, + codec: Optional[str] = None, + track: Optional[str] = None, + status_url: Optional[str] = None, + status_url_method: Optional[str] = None, + authorization_bearer_token: Optional[str] = None, + custom_parameters: Optional[dict[str, Any]] = None, + control_id: Optional[str] = None, + on_completed: Optional[Callable[RelayEvent, Any]] = None, + **kwargs: Any = {} +) -> StreamAction +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`StreamAction` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 1044. + +*** + +### tap + +Intercept call media and stream it. Returns a TapAction. + +**Modifiers:** `async` + +#### Signature + +```python +async tap( + tap: dict[str, Any], + device: dict[str, Any], + *, + control_id: Optional[str] = None, + on_completed: Optional[Callable[RelayEvent, Any]] = None, + **kwargs: Any = {} +) -> TapAction +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`TapAction` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 1020. + +*** + +### transcribe + +Start transcribing the call. Returns a TranscribeAction. + +**Modifiers:** `async` + +#### Signature + +```python +async transcribe( + *, + control_id: Optional[str] = None, + status_url: Optional[str] = None, + on_completed: Optional[Callable[RelayEvent, Any]] = None, + **kwargs: Any = {} +) -> TranscribeAction +``` + +#### Parameters + + + + + + + + + +#### Returns + +`TranscribeAction` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 1200. + +*** + +### transfer + +Transfer call control to another RELAY app or SWML script. + +**Modifiers:** `async` + +#### Signature + +```python +async transfer(dest: str, **kwargs: Any = {}) -> dict +``` + +#### Parameters + + + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 1084. + +*** + +### unhold + +Release the call from hold. + +**Modifiers:** `async` + +#### Signature + +```python +async unhold() -> dict +``` + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 1180. + +*** + +### user\_event + +Send a custom user-defined event. + +**Modifiers:** `async` + +#### Signature + +```python +async user_event(*, event: Optional[str] = None, **kwargs: Any = {}) -> dict +``` + +#### Parameters + + + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 1465. + +*** + +### wait\_for + +Wait for a specific event, optionally filtered by predicate. + +**Modifiers:** `async` + +#### Signature + +```python +async wait_for( + event_type: str, + predicate: Optional[Callable[RelayEvent, bool]] = None, + timeout: Optional[float] = None +) -> RelayEvent +``` + +#### Parameters + + + + + + + +#### Returns + +`RelayEvent` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 395. + +*** + +### wait\_for\_answered + +Wait until the call is answered (immediate if already answered or past it). + +**Modifiers:** `async` + +#### Signature + +```python +async wait_for_answered(timeout: Optional[float] = None) -> RelayEvent +``` + +#### Parameters + + + +#### Returns + +`RelayEvent` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 720. + +*** + +### wait\_for\_ended + +Wait for the call to reach the ended state. + +**Modifiers:** `async` + +#### Signature + +```python +async wait_for_ended(timeout: Optional[float] = None) -> RelayEvent +``` + +#### Parameters + + + +#### Returns + +`RelayEvent` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 423. + +*** + +### wait\_for\_ending + +Wait until the call is ending (immediate if already ending or past it). + +**Modifiers:** `async` + +#### Signature + +```python +async wait_for_ending(timeout: Optional[float] = None) -> RelayEvent +``` + +#### Parameters + + + +#### Returns + +`RelayEvent` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 728. + +*** + +### wait\_for\_ringing + +Wait until the call is ringing (immediate if already ringing or past it). + +**Modifiers:** `async` + +#### Signature + +```python +async wait_for_ringing(timeout: Optional[float] = None) -> RelayEvent +``` + +#### Parameters + + + +#### Returns + +`RelayEvent` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 724. + +## Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 288. diff --git a/fern/products/sdk-reference/python/relay/call/index__2.mdx b/fern/products/sdk-reference/python/relay/call/index__2.mdx new file mode 100644 index 0000000000..90cac9f603 --- /dev/null +++ b/fern/products/sdk-reference/python/relay/call/index__2.mdx @@ -0,0 +1,66 @@ +--- +slug: "/reference/python/relay/call/index__2" +title: "call" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "relay.call" + parent: "signalwire.relay" + module: "relay" +--- +# `call` + +## Classes + + + + Base class for async action handles (play, record, detect, etc.). + + + + Handle for an active AI agent session. + + + + Handle for play\_and\_collect or standalone collect. + + + + Handle for an active detect operation. + + + + Handle for an active send\_fax or receive\_fax operation. + + + + Handle for an active pay operation. + + + + Handle for an active play operation. + + + + Handle for an active record operation. + + + + Handle for standalone calling.collect (without play). + + + + Handle for an active stream operation. + + + + Handle for an active tap operation. + + + + Handle for an active transcribe operation. + + diff --git a/fern/products/sdk-reference/python/relay/call/pay-action/index.mdx b/fern/products/sdk-reference/python/relay/call/pay-action/index.mdx new file mode 100644 index 0000000000..de252008b5 --- /dev/null +++ b/fern/products/sdk-reference/python/relay/call/pay-action/index.mdx @@ -0,0 +1,77 @@ +--- +slug: "/reference/python/relay/call/pay-action" +title: "PayAction" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.call.PayAction" + parent: "relay.call" + module: "relay.call" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py" +--- +# `PayAction` + +Handle for an active pay operation. + +## Signature + +```python +class PayAction(Action) +``` + +## Inheritance + +**Extends:** [Action](/docs/sdk-reference/reference/python/relay/call/action) + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(call: 'Call', control_id: str) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 251. + +*** + +### stop + +**Modifiers:** `async` + +#### Signature + +```python +async stop() -> dict +``` + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 255. + +## Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 248. diff --git a/fern/products/sdk-reference/python/relay/call/play-action/index.mdx b/fern/products/sdk-reference/python/relay/call/play-action/index.mdx new file mode 100644 index 0000000000..cb34ceaad8 --- /dev/null +++ b/fern/products/sdk-reference/python/relay/call/play-action/index.mdx @@ -0,0 +1,147 @@ +--- +slug: "/reference/python/relay/call/play-action" +title: "PlayAction" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.call.PlayAction" + parent: "relay.call" + module: "relay.call" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py" +--- +# `PlayAction` + +Handle for an active play operation. + +## Signature + +```python +class PlayAction(Action) +``` + +## Inheritance + +**Extends:** [Action](/docs/sdk-reference/reference/python/relay/call/action) + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(call: 'Call', control_id: str) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 98. + +*** + +### pause + +**Modifiers:** `async` + +#### Signature + +```python +async pause() -> dict +``` + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 105. + +*** + +### resume + +**Modifiers:** `async` + +#### Signature + +```python +async resume() -> dict +``` + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 108. + +*** + +### stop + +**Modifiers:** `async` + +#### Signature + +```python +async stop() -> dict +``` + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 102. + +*** + +### volume + +**Modifiers:** `async` + +#### Signature + +```python +async volume(volume: float) -> dict +``` + +#### Parameters + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 111. + +## Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 95. diff --git a/fern/products/sdk-reference/python/relay/call/record-action/index.mdx b/fern/products/sdk-reference/python/relay/call/record-action/index.mdx new file mode 100644 index 0000000000..efba2bffe6 --- /dev/null +++ b/fern/products/sdk-reference/python/relay/call/record-action/index.mdx @@ -0,0 +1,125 @@ +--- +slug: "/reference/python/relay/call/record-action" +title: "RecordAction" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.call.RecordAction" + parent: "relay.call" + module: "relay.call" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py" +--- +# `RecordAction` + +Handle for an active record operation. + +## Signature + +```python +class RecordAction(Action) +``` + +## Inheritance + +**Extends:** [Action](/docs/sdk-reference/reference/python/relay/call/action) + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(call: 'Call', control_id: str) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 120. + +*** + +### pause + +**Modifiers:** `async` + +#### Signature + +```python +async pause(behavior: Optional[str] = None) -> dict +``` + +#### Parameters + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 127. + +*** + +### resume + +**Modifiers:** `async` + +#### Signature + +```python +async resume() -> dict +``` + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 133. + +*** + +### stop + +**Modifiers:** `async` + +#### Signature + +```python +async stop() -> dict +``` + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 124. + +## Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 117. diff --git a/fern/products/sdk-reference/python/relay/call/standalone-collect-action/index.mdx b/fern/products/sdk-reference/python/relay/call/standalone-collect-action/index.mdx new file mode 100644 index 0000000000..96cd5b107e --- /dev/null +++ b/fern/products/sdk-reference/python/relay/call/standalone-collect-action/index.mdx @@ -0,0 +1,101 @@ +--- +slug: "/reference/python/relay/call/standalone-collect-action" +title: "StandaloneCollectAction" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.call.StandaloneCollectAction" + parent: "relay.call" + module: "relay.call" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py" +--- +# `StandaloneCollectAction` + +Handle for standalone calling.collect (without play). + +## Signature + +```python +class StandaloneCollectAction(Action) +``` + +## Inheritance + +**Extends:** [Action](/docs/sdk-reference/reference/python/relay/call/action) + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(call: 'Call', control_id: str) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 191. + +*** + +### start\_input\_timers + +Start the initial\_timeout timer on an active collect. + +**Modifiers:** `async` + +#### Signature + +```python +async start_input_timers() -> dict +``` + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 207. + +*** + +### stop + +**Modifiers:** `async` + +#### Signature + +```python +async stop() -> dict +``` + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 203. + +## Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 188. diff --git a/fern/products/sdk-reference/python/relay/call/stream-action/index.mdx b/fern/products/sdk-reference/python/relay/call/stream-action/index.mdx new file mode 100644 index 0000000000..05ad9e6173 --- /dev/null +++ b/fern/products/sdk-reference/python/relay/call/stream-action/index.mdx @@ -0,0 +1,77 @@ +--- +slug: "/reference/python/relay/call/stream-action" +title: "StreamAction" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.call.StreamAction" + parent: "relay.call" + module: "relay.call" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py" +--- +# `StreamAction` + +Handle for an active stream operation. + +## Signature + +```python +class StreamAction(Action) +``` + +## Inheritance + +**Extends:** [Action](/docs/sdk-reference/reference/python/relay/call/action) + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(call: 'Call', control_id: str) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 240. + +*** + +### stop + +**Modifiers:** `async` + +#### Signature + +```python +async stop() -> dict +``` + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 244. + +## Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 237. diff --git a/fern/products/sdk-reference/python/relay/call/tap-action/index.mdx b/fern/products/sdk-reference/python/relay/call/tap-action/index.mdx new file mode 100644 index 0000000000..961a49b042 --- /dev/null +++ b/fern/products/sdk-reference/python/relay/call/tap-action/index.mdx @@ -0,0 +1,77 @@ +--- +slug: "/reference/python/relay/call/tap-action" +title: "TapAction" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.call.TapAction" + parent: "relay.call" + module: "relay.call" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py" +--- +# `TapAction` + +Handle for an active tap operation. + +## Signature + +```python +class TapAction(Action) +``` + +## Inheritance + +**Extends:** [Action](/docs/sdk-reference/reference/python/relay/call/action) + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(call: 'Call', control_id: str) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 229. + +*** + +### stop + +**Modifiers:** `async` + +#### Signature + +```python +async stop() -> dict +``` + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 233. + +## Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 226. diff --git a/fern/products/sdk-reference/python/relay/call/transcribe-action/index.mdx b/fern/products/sdk-reference/python/relay/call/transcribe-action/index.mdx new file mode 100644 index 0000000000..339444ba01 --- /dev/null +++ b/fern/products/sdk-reference/python/relay/call/transcribe-action/index.mdx @@ -0,0 +1,77 @@ +--- +slug: "/reference/python/relay/call/transcribe-action" +title: "TranscribeAction" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.call.TranscribeAction" + parent: "relay.call" + module: "relay.call" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py" +--- +# `TranscribeAction` + +Handle for an active transcribe operation. + +## Signature + +```python +class TranscribeAction(Action) +``` + +## Inheritance + +**Extends:** [Action](/docs/sdk-reference/reference/python/relay/call/action) + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(call: 'Call', control_id: str) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 262. + +*** + +### stop + +**Modifiers:** `async` + +#### Signature + +```python +async stop() -> dict +``` + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 266. + +## Source + +[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) + +Line 259. diff --git a/fern/products/sdk-reference/python/relay/client/index.mdx b/fern/products/sdk-reference/python/relay/client/index.mdx new file mode 100644 index 0000000000..27aaabc862 --- /dev/null +++ b/fern/products/sdk-reference/python/relay/client/index.mdx @@ -0,0 +1,65 @@ +--- +slug: "/reference/python/relay/client" +title: "client" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.relay.client" + parent: "signalwire.relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/client.py" +--- +# `client` + +RelayClient — WebSocket + JSON-RPC 2.0 protocol + event dispatch. + +One instance = one persistent WebSocket connection to SignalWire RELAY. + +Architecture notes (mirrors the JS SDK): + +- JSON-RPC requests are tracked by `id` in `_pending`; responses resolve + the corresponding Future. +- `signalwire.event` messages are acknowledged back to the server (event ACK) + and then dispatched by `event_type` → Call object → Action object. +- Each Action registers with a `control_id` and listens for its own + event\_type (e.g. `calling.call.play`). Actions filter events by + `control_id` so multiple concurrent actions on the same call work. +- Result code checking accepts any 2xx (matching the JS SDK regex /^2\[0-9]\[0-9]$/). + `signalwire.connect` responses skip code checking entirely. +- Execute has a configurable timeout (default 10s) to detect half-open connections. +- Requests made while disconnected are queued and flushed after re-auth. +- Server pings are tracked; if no ping arrives within the check interval the + connection is assumed half-open and force-closed for reconnect. + +## Signature + +```python +module client +``` + +## Properties + + + + + + + +## Classes + + + + Manages a WebSocket connection to SignalWire RELAY. + + + + Error returned by the RELAY server. + + + +## Source + +[`signalwire/signalwire/relay/client.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/client.py) diff --git a/fern/products/sdk-reference/python/relay/client/relay-client/index.mdx b/fern/products/sdk-reference/python/relay/client/relay-client/index.mdx new file mode 100644 index 0000000000..a5f48cf4bc --- /dev/null +++ b/fern/products/sdk-reference/python/relay/client/relay-client/index.mdx @@ -0,0 +1,526 @@ +--- +slug: "/reference/python/relay/client/relay-client" +title: "RelayClient" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.client.RelayClient" + parent: "signalwire.relay.client" + module: "relay.client" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/client.py" +--- +# `RelayClient` + +Manages a WebSocket connection to SignalWire RELAY. + +Usage:: + +``` +client = RelayClient(project="...", token="...", contexts=["default"]) + +@client.on_call +async def handle(call): + await call.answer() + await call.hangup() + +client.run() +``` + +## Signature + +```python +class RelayClient +``` + +## Examples + +```python +client = RelayClient(project="...", token="...", contexts=["default"]) + +@client.on_call +async def handle(call): + await call.answer() + await call.hangup() + +client.run() +``` + +## Properties + + + + + + + + + + + Server-assigned protocol string from the connect response. + + + + +## Methods + +### \_\_aenter\_\_ + +**Modifiers:** `async` + +#### Signature + +```python +async __aenter__() -> 'RelayClient' +``` + +#### Returns + +`'RelayClient'` + +#### Source + +[`signalwire/signalwire/relay/client.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/client.py) + +Line 186. + +*** + +### \_\_aexit\_\_ + +**Modifiers:** `async` + +#### Signature + +```python +async __aexit__(*exc: Any = ()) -> None +``` + +#### Parameters + + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/relay/client.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/client.py) + +Line 190. + +*** + +### \_\_del\_\_ + +#### Signature + +```python +__del__() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/relay/client.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/client.py) + +Line 183. + +*** + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + project: Optional[str] = None, + token: Optional[str] = None, + jwt_token: Optional[str] = None, + host: Optional[str] = None, + contexts: Optional[list[str]] = None, + max_active_calls: Optional[int] = None +) +``` + +#### Parameters + + + + + + + + + + + + + +#### Source + +[`signalwire/signalwire/relay/client.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/client.py) + +Line 106. + +*** + +### connect + +Connect to RELAY and authenticate. + +**Modifiers:** `async` + +#### Signature + +```python +async connect() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/relay/client.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/client.py) + +Line 216. + +*** + +### dial + +Initiate an outbound call using dial. Returns a Call object. + +The `calling.dial` RPC response only contains +`{"code": "200", "message": "Dialing"}` — no call\_id. The real +call\_id and node\_id arrive via `calling.call.dial` events +matched by `tag`. This method waits for that event so the +returned Call always has valid identifiers. + +**Modifiers:** `async` + +#### Signature + +```python +async dial( + devices: list[list[dict[str, Any]]], + *, + tag: Optional[str] = None, + max_duration: Optional[int] = None, + dial_timeout: Optional[float] = None +) -> Call +``` + +#### Parameters + + + Array of device lists (serial/parallel dial). + + + + Client-provided tag for event correlation. Auto-generated if not supplied. + + + + Optional max call duration in minutes. + + + + How long (seconds) to wait for the dial to complete before raising TimeoutError. Defaults to 120s. + + +#### Returns + +`Call` + +#### Source + +[`signalwire/signalwire/relay/client.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/client.py) + +Line 343. + +*** + +### disconnect + +Cleanly close the connection. + +**Modifiers:** `async` + +#### Signature + +```python +async disconnect() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/relay/client.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/client.py) + +Line 286. + +*** + +### execute + +Send a JSON-RPC request and await the response. + +For calling methods, `method` is the full name (e.g. +`"calling.answer"`, `"calling.play"`) with `node_id` +and `call_id` in `params`. + +If the connection is not ready, the request is queued and sent +after re-authentication completes. + +**Modifiers:** `async` + +#### Signature + +```python +async execute(method: str, params: dict[str, Any]) -> dict +``` + +#### Parameters + + + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/relay/client.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/client.py) + +Line 331. + +*** + +### on\_call + +Register the inbound call handler (decorator). + +#### Signature + +```python +on_call(handler: CallHandler) -> CallHandler +``` + +#### Parameters + + + +#### Returns + +`CallHandler` + +#### Source + +[`signalwire/signalwire/relay/client.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/client.py) + +Line 202. + +*** + +### on\_message + +Register the inbound message handler (decorator). + +#### Signature + +```python +on_message(handler: MessageHandler) -> MessageHandler +``` + +#### Parameters + + + +#### Returns + +`MessageHandler` + +#### Source + +[`signalwire/signalwire/relay/client.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/client.py) + +Line 207. + +*** + +### receive + +Subscribe to additional contexts for inbound events. + +Sends `signalwire.receive` on the assigned protocol to start +receiving inbound calls on the given contexts. Can be called +after `connect()` to dynamically add contexts without reconnecting. + +**Modifiers:** `async` + +#### Signature + +```python +async receive(contexts: list[str]) -> None +``` + +#### Parameters + + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/relay/client.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/client.py) + +Line 481. + +*** + +### run + +Blocking entry point — runs the event loop until interrupted. + +#### Signature + +```python +run() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/relay/client.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/client.py) + +Line 512. + +*** + +### send\_message + +Send an outbound SMS/MMS message. + +At least one of `body` or `media` must be provided. + +Returns a Message object that tracks state changes. Use +`await message.wait()` to block until delivery confirmation +(or failure). + +**Modifiers:** `async` + +#### Signature + +```python +async send_message( + *, + to_number: str, + from_number: str, + context: Optional[str] = None, + body: Optional[str] = None, + media: Optional[list[str]] = None, + tags: Optional[list[str]] = None, + region: Optional[str] = None, + on_completed: Optional[Callable] = None +) -> Message +``` + +#### Parameters + + + Destination phone number in E.164 format. + + + + Sender phone number in E.164 format. + + + + Context for receiving state events. Defaults to the relay protocol. + + + + Text body of the message. + + + + List of media URLs for MMS. + + + + Optional tags for the message. + + + + Optional origination region. + + + + Optional callback fired when a terminal state (delivered/undelivered/failed) is reached. + + +#### Returns + +`Message` + +#### Source + +[`signalwire/signalwire/relay/client.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/client.py) + +Line 406. + +*** + +### unreceive + +Unsubscribe from contexts for inbound events. + +Sends `signalwire.unreceive` to stop receiving inbound calls +on the given contexts. + +**Modifiers:** `async` + +#### Signature + +```python +async unreceive(contexts: list[str]) -> None +``` + +#### Parameters + + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/relay/client.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/client.py) + +Line 495. + +## Source + +[`signalwire/signalwire/relay/client.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/client.py) + +Line 91. diff --git a/fern/products/sdk-reference/python/relay/client/relay-error/index.mdx b/fern/products/sdk-reference/python/relay/client/relay-error/index.mdx new file mode 100644 index 0000000000..51021e23d7 --- /dev/null +++ b/fern/products/sdk-reference/python/relay/client/relay-error/index.mdx @@ -0,0 +1,61 @@ +--- +slug: "/reference/python/relay/client/relay-error" +title: "RelayError" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.client.RelayError" + parent: "signalwire.relay.client" + module: "relay.client" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/client.py" +--- +# `RelayError` + +Error returned by the RELAY server. + +## Signature + +```python +class RelayError(Exception) +``` + +## Inheritance + +**Extends:** `Exception` + +## Properties + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(code: int, message: str) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/relay/client.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/client.py) + +Line 1109. + +## Source + +[`signalwire/signalwire/relay/client.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/client.py) + +Line 1106. diff --git a/fern/products/sdk-reference/python/relay/constants/index.mdx b/fern/products/sdk-reference/python/relay/constants/index.mdx new file mode 100644 index 0000000000..c425a3310c --- /dev/null +++ b/fern/products/sdk-reference/python/relay/constants/index.mdx @@ -0,0 +1,183 @@ +--- +slug: "/reference/python/relay/constants" +title: "constants" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.relay.constants" + parent: "signalwire.relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/constants.py" +--- +# `constants` + +Protocol constants for the SignalWire RELAY calling API. + +## Signature + +```python +module constants +``` + +## Constants + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## Source + +[`signalwire/signalwire/relay/constants.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/constants.py) diff --git a/fern/products/sdk-reference/python/relay/event/call-receive-event/index.mdx b/fern/products/sdk-reference/python/relay/event/call-receive-event/index.mdx new file mode 100644 index 0000000000..b572a0a3a5 --- /dev/null +++ b/fern/products/sdk-reference/python/relay/event/call-receive-event/index.mdx @@ -0,0 +1,139 @@ +--- +slug: "/reference/python/relay/event/call-receive-event" +title: "CallReceiveEvent" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.event.CallReceiveEvent" + parent: "signalwire.relay.event" + module: "relay.event" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" +--- +# `CallReceiveEvent` + +Event for calling.call.receive — inbound call notification. + +**Modifiers:** `dataclass` + +**Decorators:** `@dataclass` + +## Signature + +```python +class CallReceiveEvent(RelayEvent) +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/python/relay/event/relay-event) + +## Properties + + + + + + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + event_type: str, + params: dict[str, Any], + call_id: str = '', + timestamp: float = 0.0, + call_state: str = '', + direction: str = '', + device: dict[str, Any] = dict(), + node_id: str = '', + project_id: str = '', + context: str = '', + segment_id: str = '', + tag: str = '' +) -> None +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +*** + +### from\_payload + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +from_payload(payload: dict[str, Any]) -> 'CallReceiveEvent' +``` + +#### Parameters + + + +#### Returns + +`'CallReceiveEvent'` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 72. + +## Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 59. diff --git a/fern/products/sdk-reference/python/relay/event/call-state-event/index.mdx b/fern/products/sdk-reference/python/relay/event/call-state-event/index.mdx new file mode 100644 index 0000000000..90e440adc0 --- /dev/null +++ b/fern/products/sdk-reference/python/relay/event/call-state-event/index.mdx @@ -0,0 +1,119 @@ +--- +slug: "/reference/python/relay/event/call-state-event" +title: "CallStateEvent" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.event.CallStateEvent" + parent: "signalwire.relay.event" + module: "relay.event" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" +--- +# `CallStateEvent` + +Event for calling.call.state. + +**Modifiers:** `dataclass` + +**Decorators:** `@dataclass` + +## Signature + +```python +class CallStateEvent(RelayEvent) +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/python/relay/event/relay-event) + +## Properties + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + event_type: str, + params: dict[str, Any], + call_id: str = '', + timestamp: float = 0.0, + call_state: str = '', + end_reason: str = '', + direction: str = '', + device: dict[str, Any] = dict() +) -> None +``` + +#### Parameters + + + + + + + + + + + + + + + + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +*** + +### from\_payload + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +from_payload(payload: dict[str, Any]) -> 'CallStateEvent' +``` + +#### Parameters + + + +#### Returns + +`'CallStateEvent'` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 43. + +## Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 34. diff --git a/fern/products/sdk-reference/python/relay/event/calling-error-event/index.mdx b/fern/products/sdk-reference/python/relay/event/calling-error-event/index.mdx new file mode 100644 index 0000000000..9650038d5d --- /dev/null +++ b/fern/products/sdk-reference/python/relay/event/calling-error-event/index.mdx @@ -0,0 +1,109 @@ +--- +slug: "/reference/python/relay/event/calling-error-event" +title: "CallingErrorEvent" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.event.CallingErrorEvent" + parent: "signalwire.relay.event" + module: "relay.event" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" +--- +# `CallingErrorEvent` + +Event for calling.error. + +**Modifiers:** `dataclass` + +**Decorators:** `@dataclass` + +## Signature + +```python +class CallingErrorEvent(RelayEvent) +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/python/relay/event/relay-event) + +## Properties + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + event_type: str, + params: dict[str, Any], + call_id: str = '', + timestamp: float = 0.0, + code: str = '', + message: str = '' +) -> None +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +*** + +### from\_payload + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +from_payload(payload: dict[str, Any]) -> 'CallingErrorEvent' +``` + +#### Parameters + + + +#### Returns + +`'CallingErrorEvent'` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 516. + +## Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 509. diff --git a/fern/products/sdk-reference/python/relay/event/collect-event/index.mdx b/fern/products/sdk-reference/python/relay/event/collect-event/index.mdx new file mode 100644 index 0000000000..64d57e4b3d --- /dev/null +++ b/fern/products/sdk-reference/python/relay/event/collect-event/index.mdx @@ -0,0 +1,119 @@ +--- +slug: "/reference/python/relay/event/collect-event" +title: "CollectEvent" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.event.CollectEvent" + parent: "signalwire.relay.event" + module: "relay.event" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" +--- +# `CollectEvent` + +Event for calling.call.collect. + +**Modifiers:** `dataclass` + +**Decorators:** `@dataclass` + +## Signature + +```python +class CollectEvent(RelayEvent) +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/python/relay/event/relay-event) + +## Properties + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + event_type: str, + params: dict[str, Any], + call_id: str = '', + timestamp: float = 0.0, + control_id: str = '', + state: str = '', + result: dict[str, Any] = dict(), + final: Optional[bool] = None +) -> None +``` + +#### Parameters + + + + + + + + + + + + + + + + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +*** + +### from\_payload + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +from_payload(payload: dict[str, Any]) -> 'CollectEvent' +``` + +#### Parameters + + + +#### Returns + +`'CollectEvent'` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 152. + +## Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 143. diff --git a/fern/products/sdk-reference/python/relay/event/conference-event/index.mdx b/fern/products/sdk-reference/python/relay/event/conference-event/index.mdx new file mode 100644 index 0000000000..ef4a48d60d --- /dev/null +++ b/fern/products/sdk-reference/python/relay/event/conference-event/index.mdx @@ -0,0 +1,114 @@ +--- +slug: "/reference/python/relay/event/conference-event" +title: "ConferenceEvent" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.event.ConferenceEvent" + parent: "signalwire.relay.event" + module: "relay.event" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" +--- +# `ConferenceEvent` + +Event for calling.conference. + +**Modifiers:** `dataclass` + +**Decorators:** `@dataclass` + +## Signature + +```python +class ConferenceEvent(RelayEvent) +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/python/relay/event/relay-event) + +## Properties + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + event_type: str, + params: dict[str, Any], + call_id: str = '', + timestamp: float = 0.0, + conference_id: str = '', + name: str = '', + status: str = '' +) -> None +``` + +#### Parameters + + + + + + + + + + + + + + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +*** + +### from\_payload + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +from_payload(payload: dict[str, Any]) -> 'ConferenceEvent' +``` + +#### Parameters + + + +#### Returns + +`'ConferenceEvent'` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 494. + +## Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 486. diff --git a/fern/products/sdk-reference/python/relay/event/connect-event/index.mdx b/fern/products/sdk-reference/python/relay/event/connect-event/index.mdx new file mode 100644 index 0000000000..4c5e99f24b --- /dev/null +++ b/fern/products/sdk-reference/python/relay/event/connect-event/index.mdx @@ -0,0 +1,109 @@ +--- +slug: "/reference/python/relay/event/connect-event" +title: "ConnectEvent" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.event.ConnectEvent" + parent: "signalwire.relay.event" + module: "relay.event" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" +--- +# `ConnectEvent` + +Event for calling.call.connect. + +**Modifiers:** `dataclass` + +**Decorators:** `@dataclass` + +## Signature + +```python +class ConnectEvent(RelayEvent) +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/python/relay/event/relay-event) + +## Properties + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + event_type: str, + params: dict[str, Any], + call_id: str = '', + timestamp: float = 0.0, + connect_state: str = '', + peer: dict[str, Any] = dict() +) -> None +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +*** + +### from\_payload + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +from_payload(payload: dict[str, Any]) -> 'ConnectEvent' +``` + +#### Parameters + + + +#### Returns + +`'ConnectEvent'` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 175. + +## Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 168. diff --git a/fern/products/sdk-reference/python/relay/event/denoise-event/index.mdx b/fern/products/sdk-reference/python/relay/event/denoise-event/index.mdx new file mode 100644 index 0000000000..814fd73c5f --- /dev/null +++ b/fern/products/sdk-reference/python/relay/event/denoise-event/index.mdx @@ -0,0 +1,104 @@ +--- +slug: "/reference/python/relay/event/denoise-event" +title: "DenoiseEvent" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.event.DenoiseEvent" + parent: "signalwire.relay.event" + module: "relay.event" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" +--- +# `DenoiseEvent` + +Event for calling.call.denoise. + +**Modifiers:** `dataclass` + +**Decorators:** `@dataclass` + +## Signature + +```python +class DenoiseEvent(RelayEvent) +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/python/relay/event/relay-event) + +## Properties + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + event_type: str, + params: dict[str, Any], + call_id: str = '', + timestamp: float = 0.0, + denoised: bool = False +) -> None +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +*** + +### from\_payload + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +from_payload(payload: dict[str, Any]) -> 'DenoiseEvent' +``` + +#### Parameters + + + +#### Returns + +`'DenoiseEvent'` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 356. + +## Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 350. diff --git a/fern/products/sdk-reference/python/relay/event/detect-event/index.mdx b/fern/products/sdk-reference/python/relay/event/detect-event/index.mdx new file mode 100644 index 0000000000..e8547b824d --- /dev/null +++ b/fern/products/sdk-reference/python/relay/event/detect-event/index.mdx @@ -0,0 +1,109 @@ +--- +slug: "/reference/python/relay/event/detect-event" +title: "DetectEvent" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.event.DetectEvent" + parent: "signalwire.relay.event" + module: "relay.event" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" +--- +# `DetectEvent` + +Event for calling.call.detect. + +**Modifiers:** `dataclass` + +**Decorators:** `@dataclass` + +## Signature + +```python +class DetectEvent(RelayEvent) +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/python/relay/event/relay-event) + +## Properties + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + event_type: str, + params: dict[str, Any], + call_id: str = '', + timestamp: float = 0.0, + control_id: str = '', + detect: dict[str, Any] = dict() +) -> None +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +*** + +### from\_payload + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +from_payload(payload: dict[str, Any]) -> 'DetectEvent' +``` + +#### Parameters + + + +#### Returns + +`'DetectEvent'` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 196. + +## Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 189. diff --git a/fern/products/sdk-reference/python/relay/event/dial-event/index.mdx b/fern/products/sdk-reference/python/relay/event/dial-event/index.mdx new file mode 100644 index 0000000000..c34ca9ea21 --- /dev/null +++ b/fern/products/sdk-reference/python/relay/event/dial-event/index.mdx @@ -0,0 +1,114 @@ +--- +slug: "/reference/python/relay/event/dial-event" +title: "DialEvent" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.event.DialEvent" + parent: "signalwire.relay.event" + module: "relay.event" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" +--- +# `DialEvent` + +Event for calling.call.dial. + +**Modifiers:** `dataclass` + +**Decorators:** `@dataclass` + +## Signature + +```python +class DialEvent(RelayEvent) +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/python/relay/event/relay-event) + +## Properties + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + event_type: str, + params: dict[str, Any], + call_id: str = '', + timestamp: float = 0.0, + tag: str = '', + dial_state: str = '', + call: dict[str, Any] = dict() +) -> None +``` + +#### Parameters + + + + + + + + + + + + + + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +*** + +### from\_payload + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +from_payload(payload: dict[str, Any]) -> 'DialEvent' +``` + +#### Parameters + + + +#### Returns + +`'DialEvent'` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 310. + +## Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 302. diff --git a/fern/products/sdk-reference/python/relay/event/echo-event/index.mdx b/fern/products/sdk-reference/python/relay/event/echo-event/index.mdx new file mode 100644 index 0000000000..e5770d91d9 --- /dev/null +++ b/fern/products/sdk-reference/python/relay/event/echo-event/index.mdx @@ -0,0 +1,104 @@ +--- +slug: "/reference/python/relay/event/echo-event" +title: "EchoEvent" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.event.EchoEvent" + parent: "signalwire.relay.event" + module: "relay.event" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" +--- +# `EchoEvent` + +Event for calling.call.echo. + +**Modifiers:** `dataclass` + +**Decorators:** `@dataclass` + +## Signature + +```python +class EchoEvent(RelayEvent) +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/python/relay/event/relay-event) + +## Properties + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + event_type: str, + params: dict[str, Any], + call_id: str = '', + timestamp: float = 0.0, + state: str = '' +) -> None +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +*** + +### from\_payload + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +from_payload(payload: dict[str, Any]) -> 'EchoEvent' +``` + +#### Parameters + + + +#### Returns + +`'EchoEvent'` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 425. + +## Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 419. diff --git a/fern/products/sdk-reference/python/relay/event/fax-event/index.mdx b/fern/products/sdk-reference/python/relay/event/fax-event/index.mdx new file mode 100644 index 0000000000..31c92fc236 --- /dev/null +++ b/fern/products/sdk-reference/python/relay/event/fax-event/index.mdx @@ -0,0 +1,109 @@ +--- +slug: "/reference/python/relay/event/fax-event" +title: "FaxEvent" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.event.FaxEvent" + parent: "signalwire.relay.event" + module: "relay.event" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" +--- +# `FaxEvent` + +Event for calling.call.fax. + +**Modifiers:** `dataclass` + +**Decorators:** `@dataclass` + +## Signature + +```python +class FaxEvent(RelayEvent) +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/python/relay/event/relay-event) + +## Properties + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + event_type: str, + params: dict[str, Any], + call_id: str = '', + timestamp: float = 0.0, + control_id: str = '', + fax: dict[str, Any] = dict() +) -> None +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +*** + +### from\_payload + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +from_payload(payload: dict[str, Any]) -> 'FaxEvent' +``` + +#### Parameters + + + +#### Returns + +`'FaxEvent'` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 217. + +## Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 210. diff --git a/fern/products/sdk-reference/python/relay/event/hold-event/index.mdx b/fern/products/sdk-reference/python/relay/event/hold-event/index.mdx new file mode 100644 index 0000000000..1d2f11344f --- /dev/null +++ b/fern/products/sdk-reference/python/relay/event/hold-event/index.mdx @@ -0,0 +1,104 @@ +--- +slug: "/reference/python/relay/event/hold-event" +title: "HoldEvent" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.event.HoldEvent" + parent: "signalwire.relay.event" + module: "relay.event" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" +--- +# `HoldEvent` + +Event for calling.call.hold. + +**Modifiers:** `dataclass` + +**Decorators:** `@dataclass` + +## Signature + +```python +class HoldEvent(RelayEvent) +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/python/relay/event/relay-event) + +## Properties + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + event_type: str, + params: dict[str, Any], + call_id: str = '', + timestamp: float = 0.0, + state: str = '' +) -> None +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +*** + +### from\_payload + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +from_payload(payload: dict[str, Any]) -> 'HoldEvent' +``` + +#### Parameters + + + +#### Returns + +`'HoldEvent'` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 473. + +## Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 467. diff --git a/fern/products/sdk-reference/python/relay/event/index.mdx b/fern/products/sdk-reference/python/relay/event/index.mdx new file mode 100644 index 0000000000..f1f952e69a --- /dev/null +++ b/fern/products/sdk-reference/python/relay/event/index.mdx @@ -0,0 +1,160 @@ +--- +slug: "/reference/python/relay/event" +title: "event" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.relay.event" + parent: "signalwire.relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" +--- +# `event` + +Typed event wrappers for RELAY calling events. + +These are convenience dataclasses over raw event dicts. All Call event handlers +also accept the raw dict, so these are optional. + +## Signature + +```python +module event +``` + +## Constants + + + +## Classes + + + + Event for calling.error. + + + + Event for calling.call.receive — inbound call notification. + + + + Event for calling.call.state. + + + + Event for calling.call.collect. + + + + Event for calling.conference. + + + + Event for calling.call.connect. + + + + Event for calling.call.denoise. + + + + Event for calling.call.detect. + + + + Event for calling.call.dial. + + + + Event for calling.call.echo. + + + + Event for calling.call.fax. + + + + Event for calling.call.hold. + + + + Event for messaging.receive — inbound message notification. + + + + Event for messaging.state — outbound message state change. + + + + Event for calling.call.pay. + + + + Event for calling.call.play. + + + + Event for calling.call.queue. + + + + Event for calling.call.record. + + + + Event for calling.call.refer. + + + + Base event — wraps the raw params dict from a signalwire.event message. + + + + Event for calling.call.send\_digits. + + + + Event for calling.call.stream. + + + + Event for calling.call.tap. + + + + Event for calling.call.transcribe. + + + +## Functions + +### parse\_event + +Parse a raw signalwire.event params dict into a typed event object. + +#### Signature + +```python +parse_event(payload: dict[str, Any]) -> RelayEvent +``` + +#### Parameters + + + +#### Returns + +`RelayEvent` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 634. + +## Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) diff --git a/fern/products/sdk-reference/python/relay/event/message-receive-event/index.mdx b/fern/products/sdk-reference/python/relay/event/message-receive-event/index.mdx new file mode 100644 index 0000000000..fa4e7f1dc5 --- /dev/null +++ b/fern/products/sdk-reference/python/relay/event/message-receive-event/index.mdx @@ -0,0 +1,149 @@ +--- +slug: "/reference/python/relay/event/message-receive-event" +title: "MessageReceiveEvent" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.event.MessageReceiveEvent" + parent: "signalwire.relay.event" + module: "relay.event" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" +--- +# `MessageReceiveEvent` + +Event for messaging.receive — inbound message notification. + +**Modifiers:** `dataclass` + +**Decorators:** `@dataclass` + +## Signature + +```python +class MessageReceiveEvent(RelayEvent) +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/python/relay/event/relay-event) + +## Properties + + + + + + + + + + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + event_type: str, + params: dict[str, Any], + call_id: str = '', + timestamp: float = 0.0, + message_id: str = '', + context: str = '', + direction: str = '', + from_number: str = '', + to_number: str = '', + body: str = '', + media: list[str] = list(), + segments: int = 0, + message_state: str = '', + tags: list[str] = list() +) -> None +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +*** + +### from\_payload + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +from_payload(payload: dict[str, Any]) -> 'MessageReceiveEvent' +``` + +#### Parameters + + + +#### Returns + +`'MessageReceiveEvent'` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 545. + +## Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 530. diff --git a/fern/products/sdk-reference/python/relay/event/message-state-event/index.mdx b/fern/products/sdk-reference/python/relay/event/message-state-event/index.mdx new file mode 100644 index 0000000000..9b341b48bf --- /dev/null +++ b/fern/products/sdk-reference/python/relay/event/message-state-event/index.mdx @@ -0,0 +1,154 @@ +--- +slug: "/reference/python/relay/event/message-state-event" +title: "MessageStateEvent" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.event.MessageStateEvent" + parent: "signalwire.relay.event" + module: "relay.event" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" +--- +# `MessageStateEvent` + +Event for messaging.state — outbound message state change. + +**Modifiers:** `dataclass` + +**Decorators:** `@dataclass` + +## Signature + +```python +class MessageStateEvent(RelayEvent) +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/python/relay/event/relay-event) + +## Properties + + + + + + + + + + + + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + event_type: str, + params: dict[str, Any], + call_id: str = '', + timestamp: float = 0.0, + message_id: str = '', + context: str = '', + direction: str = '', + from_number: str = '', + to_number: str = '', + body: str = '', + media: list[str] = list(), + segments: int = 0, + message_state: str = '', + reason: str = '', + tags: list[str] = list() +) -> None +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +*** + +### from\_payload + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +from_payload(payload: dict[str, Any]) -> 'MessageStateEvent' +``` + +#### Parameters + + + +#### Returns + +`'MessageStateEvent'` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 583. + +## Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 567. diff --git a/fern/products/sdk-reference/python/relay/event/pay-event/index.mdx b/fern/products/sdk-reference/python/relay/event/pay-event/index.mdx new file mode 100644 index 0000000000..7e1656908d --- /dev/null +++ b/fern/products/sdk-reference/python/relay/event/pay-event/index.mdx @@ -0,0 +1,109 @@ +--- +slug: "/reference/python/relay/event/pay-event" +title: "PayEvent" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.event.PayEvent" + parent: "signalwire.relay.event" + module: "relay.event" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" +--- +# `PayEvent` + +Event for calling.call.pay. + +**Modifiers:** `dataclass` + +**Decorators:** `@dataclass` + +## Signature + +```python +class PayEvent(RelayEvent) +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/python/relay/event/relay-event) + +## Properties + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + event_type: str, + params: dict[str, Any], + call_id: str = '', + timestamp: float = 0.0, + control_id: str = '', + state: str = '' +) -> None +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +*** + +### from\_payload + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +from_payload(payload: dict[str, Any]) -> 'PayEvent' +``` + +#### Parameters + + + +#### Returns + +`'PayEvent'` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 376. + +## Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 369. diff --git a/fern/products/sdk-reference/python/relay/event/play-event/index.mdx b/fern/products/sdk-reference/python/relay/event/play-event/index.mdx new file mode 100644 index 0000000000..2557d0466a --- /dev/null +++ b/fern/products/sdk-reference/python/relay/event/play-event/index.mdx @@ -0,0 +1,109 @@ +--- +slug: "/reference/python/relay/event/play-event" +title: "PlayEvent" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.event.PlayEvent" + parent: "signalwire.relay.event" + module: "relay.event" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" +--- +# `PlayEvent` + +Event for calling.call.play. + +**Modifiers:** `dataclass` + +**Decorators:** `@dataclass` + +## Signature + +```python +class PlayEvent(RelayEvent) +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/python/relay/event/relay-event) + +## Properties + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + event_type: str, + params: dict[str, Any], + call_id: str = '', + timestamp: float = 0.0, + control_id: str = '', + state: str = '' +) -> None +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +*** + +### from\_payload + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +from_payload(payload: dict[str, Any]) -> 'PlayEvent' +``` + +#### Parameters + + + +#### Returns + +`'PlayEvent'` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 99. + +## Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 92. diff --git a/fern/products/sdk-reference/python/relay/event/queue-event/index.mdx b/fern/products/sdk-reference/python/relay/event/queue-event/index.mdx new file mode 100644 index 0000000000..96d3274282 --- /dev/null +++ b/fern/products/sdk-reference/python/relay/event/queue-event/index.mdx @@ -0,0 +1,129 @@ +--- +slug: "/reference/python/relay/event/queue-event" +title: "QueueEvent" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.event.QueueEvent" + parent: "signalwire.relay.event" + module: "relay.event" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" +--- +# `QueueEvent` + +Event for calling.call.queue. + +**Modifiers:** `dataclass` + +**Decorators:** `@dataclass` + +## Signature + +```python +class QueueEvent(RelayEvent) +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/python/relay/event/relay-event) + +## Properties + + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + event_type: str, + params: dict[str, Any], + call_id: str = '', + timestamp: float = 0.0, + control_id: str = '', + status: str = '', + queue_id: str = '', + queue_name: str = '', + position: int = 0, + size: int = 0 +) -> None +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +*** + +### from\_payload + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +from_payload(payload: dict[str, Any]) -> 'QueueEvent' +``` + +#### Parameters + + + +#### Returns + +`'QueueEvent'` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 401. + +## Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 390. diff --git a/fern/products/sdk-reference/python/relay/event/record-event/index.mdx b/fern/products/sdk-reference/python/relay/event/record-event/index.mdx new file mode 100644 index 0000000000..c14cef3079 --- /dev/null +++ b/fern/products/sdk-reference/python/relay/event/record-event/index.mdx @@ -0,0 +1,129 @@ +--- +slug: "/reference/python/relay/event/record-event" +title: "RecordEvent" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.event.RecordEvent" + parent: "signalwire.relay.event" + module: "relay.event" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" +--- +# `RecordEvent` + +Event for calling.call.record. + +**Modifiers:** `dataclass` + +**Decorators:** `@dataclass` + +## Signature + +```python +class RecordEvent(RelayEvent) +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/python/relay/event/relay-event) + +## Properties + + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + event_type: str, + params: dict[str, Any], + call_id: str = '', + timestamp: float = 0.0, + control_id: str = '', + state: str = '', + url: str = '', + duration: float = 0.0, + size: int = 0, + record: dict[str, Any] = dict() +) -> None +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +*** + +### from\_payload + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +from_payload(payload: dict[str, Any]) -> 'RecordEvent' +``` + +#### Parameters + + + +#### Returns + +`'RecordEvent'` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 124. + +## Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 113. diff --git a/fern/products/sdk-reference/python/relay/event/refer-event/index.mdx b/fern/products/sdk-reference/python/relay/event/refer-event/index.mdx new file mode 100644 index 0000000000..dd39d906f9 --- /dev/null +++ b/fern/products/sdk-reference/python/relay/event/refer-event/index.mdx @@ -0,0 +1,119 @@ +--- +slug: "/reference/python/relay/event/refer-event" +title: "ReferEvent" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.event.ReferEvent" + parent: "signalwire.relay.event" + module: "relay.event" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" +--- +# `ReferEvent` + +Event for calling.call.refer. + +**Modifiers:** `dataclass` + +**Decorators:** `@dataclass` + +## Signature + +```python +class ReferEvent(RelayEvent) +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/python/relay/event/relay-event) + +## Properties + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + event_type: str, + params: dict[str, Any], + call_id: str = '', + timestamp: float = 0.0, + state: str = '', + sip_refer_to: str = '', + sip_refer_response_code: str = '', + sip_notify_response_code: str = '' +) -> None +``` + +#### Parameters + + + + + + + + + + + + + + + + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +*** + +### from\_payload + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +from_payload(payload: dict[str, Any]) -> 'ReferEvent' +``` + +#### Parameters + + + +#### Returns + +`'ReferEvent'` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 334. + +## Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 325. diff --git a/fern/products/sdk-reference/python/relay/event/relay-event/index.mdx b/fern/products/sdk-reference/python/relay/event/relay-event/index.mdx new file mode 100644 index 0000000000..89ba0adc2a --- /dev/null +++ b/fern/products/sdk-reference/python/relay/event/relay-event/index.mdx @@ -0,0 +1,103 @@ +--- +slug: "/reference/python/relay/event/relay-event" +title: "RelayEvent" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.event.RelayEvent" + parent: "signalwire.relay.event" + module: "relay.event" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" +--- +# `RelayEvent` + +Base event — wraps the raw params dict from a signalwire.event message. + +**Modifiers:** `dataclass` + +**Decorators:** `@dataclass` + +## Signature + +```python +class RelayEvent +``` + +## Properties + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + event_type: str, + params: dict[str, Any], + call_id: str = '', + timestamp: float = 0.0 +) -> None +``` + +#### Parameters + + + + + + + + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +*** + +### from\_payload + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +from_payload(payload: dict[str, Any]) -> 'RelayEvent' +``` + +#### Parameters + + + +#### Returns + +`'RelayEvent'` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 22. + +## Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 13. diff --git a/fern/products/sdk-reference/python/relay/event/send-digits-event/index.mdx b/fern/products/sdk-reference/python/relay/event/send-digits-event/index.mdx new file mode 100644 index 0000000000..3f64c625c6 --- /dev/null +++ b/fern/products/sdk-reference/python/relay/event/send-digits-event/index.mdx @@ -0,0 +1,109 @@ +--- +slug: "/reference/python/relay/event/send-digits-event" +title: "SendDigitsEvent" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.event.SendDigitsEvent" + parent: "signalwire.relay.event" + module: "relay.event" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" +--- +# `SendDigitsEvent` + +Event for calling.call.send\_digits. + +**Modifiers:** `dataclass` + +**Decorators:** `@dataclass` + +## Signature + +```python +class SendDigitsEvent(RelayEvent) +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/python/relay/event/relay-event) + +## Properties + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + event_type: str, + params: dict[str, Any], + call_id: str = '', + timestamp: float = 0.0, + control_id: str = '', + state: str = '' +) -> None +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +*** + +### from\_payload + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +from_payload(payload: dict[str, Any]) -> 'SendDigitsEvent' +``` + +#### Parameters + + + +#### Returns + +`'SendDigitsEvent'` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 288. + +## Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 281. diff --git a/fern/products/sdk-reference/python/relay/event/stream-event/index.mdx b/fern/products/sdk-reference/python/relay/event/stream-event/index.mdx new file mode 100644 index 0000000000..6850015a8c --- /dev/null +++ b/fern/products/sdk-reference/python/relay/event/stream-event/index.mdx @@ -0,0 +1,119 @@ +--- +slug: "/reference/python/relay/event/stream-event" +title: "StreamEvent" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.event.StreamEvent" + parent: "signalwire.relay.event" + module: "relay.event" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" +--- +# `StreamEvent` + +Event for calling.call.stream. + +**Modifiers:** `dataclass` + +**Decorators:** `@dataclass` + +## Signature + +```python +class StreamEvent(RelayEvent) +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/python/relay/event/relay-event) + +## Properties + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + event_type: str, + params: dict[str, Any], + call_id: str = '', + timestamp: float = 0.0, + control_id: str = '', + state: str = '', + url: str = '', + name: str = '' +) -> None +``` + +#### Parameters + + + + + + + + + + + + + + + + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +*** + +### from\_payload + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +from_payload(payload: dict[str, Any]) -> 'StreamEvent' +``` + +#### Parameters + + + +#### Returns + +`'StreamEvent'` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 265. + +## Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 256. diff --git a/fern/products/sdk-reference/python/relay/event/tap-event/index.mdx b/fern/products/sdk-reference/python/relay/event/tap-event/index.mdx new file mode 100644 index 0000000000..e44742a3bb --- /dev/null +++ b/fern/products/sdk-reference/python/relay/event/tap-event/index.mdx @@ -0,0 +1,119 @@ +--- +slug: "/reference/python/relay/event/tap-event" +title: "TapEvent" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.event.TapEvent" + parent: "signalwire.relay.event" + module: "relay.event" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" +--- +# `TapEvent` + +Event for calling.call.tap. + +**Modifiers:** `dataclass` + +**Decorators:** `@dataclass` + +## Signature + +```python +class TapEvent(RelayEvent) +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/python/relay/event/relay-event) + +## Properties + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + event_type: str, + params: dict[str, Any], + call_id: str = '', + timestamp: float = 0.0, + control_id: str = '', + state: str = '', + tap: dict[str, Any] = dict(), + device: dict[str, Any] = dict() +) -> None +``` + +#### Parameters + + + + + + + + + + + + + + + + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +*** + +### from\_payload + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +from_payload(payload: dict[str, Any]) -> 'TapEvent' +``` + +#### Parameters + + + +#### Returns + +`'TapEvent'` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 240. + +## Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 231. diff --git a/fern/products/sdk-reference/python/relay/event/transcribe-event/index.mdx b/fern/products/sdk-reference/python/relay/event/transcribe-event/index.mdx new file mode 100644 index 0000000000..aa7c0ccd3b --- /dev/null +++ b/fern/products/sdk-reference/python/relay/event/transcribe-event/index.mdx @@ -0,0 +1,129 @@ +--- +slug: "/reference/python/relay/event/transcribe-event" +title: "TranscribeEvent" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.event.TranscribeEvent" + parent: "signalwire.relay.event" + module: "relay.event" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" +--- +# `TranscribeEvent` + +Event for calling.call.transcribe. + +**Modifiers:** `dataclass` + +**Decorators:** `@dataclass` + +## Signature + +```python +class TranscribeEvent(RelayEvent) +``` + +## Inheritance + +**Extends:** [RelayEvent](/docs/sdk-reference/reference/python/relay/event/relay-event) + +## Properties + + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + event_type: str, + params: dict[str, Any], + call_id: str = '', + timestamp: float = 0.0, + control_id: str = '', + state: str = '', + url: str = '', + recording_id: str = '', + duration: float = 0.0, + size: int = 0 +) -> None +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +*** + +### from\_payload + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +from_payload(payload: dict[str, Any]) -> 'TranscribeEvent' +``` + +#### Parameters + + + +#### Returns + +`'TranscribeEvent'` + +#### Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 449. + +## Source + +[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) + +Line 438. diff --git a/fern/products/sdk-reference/python/relay/index.mdx b/fern/products/sdk-reference/python/relay/index.mdx new file mode 100644 index 0000000000..cd2e05467a --- /dev/null +++ b/fern/products/sdk-reference/python/relay/index.mdx @@ -0,0 +1,59 @@ +--- +slug: "/reference/python/relay" +title: "relay" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.relay" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/__init__.py" +--- +# `relay` + +SignalWire RELAY client — real-time call control over WebSocket. + +## Signature + +```python +module relay +``` + +## Properties + + + +## Classes + + + + Represents a live RELAY call. + + + + Represents a single SMS/MMS message. + + + +## Modules + + + + + + RelayClient — WebSocket + JSON-RPC 2.0 protocol + event dispatch. + + + + Protocol constants for the SignalWire RELAY calling API. + + + + Typed event wrappers for RELAY calling events. + + + +## Source + +[`signalwire/signalwire/relay/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/__init__.py) diff --git a/fern/products/sdk-reference/python/relay/message/index.mdx b/fern/products/sdk-reference/python/relay/message/index.mdx new file mode 100644 index 0000000000..4bb5885f60 --- /dev/null +++ b/fern/products/sdk-reference/python/relay/message/index.mdx @@ -0,0 +1,196 @@ +--- +slug: "/reference/python/relay/message" +title: "message" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.relay.message" + parent: "signalwire.relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/message.py" +--- +# `message` + +Represents a single SMS/MMS message. + +For outbound messages, use `await message.wait()` to block until a +terminal state (delivered, undelivered, failed) is reached. + +## Signature + +```python +class Message +``` + +## Properties + + + + + + + + + + + True if the message has reached a terminal state. + + + + + + + + + + + + The terminal RelayEvent, or None if not yet done. + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__( + *, + message_id: str = '', + context: str = '', + direction: str = '', + from_number: str = '', + to_number: str = '', + body: str = '', + media: Optional[list[str]] = None, + segments: int = 0, + state: str = '', + reason: str = '', + tags: Optional[list[str]] = None +) +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + +#### Source + +[`signalwire/signalwire/relay/message.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/message.py) + +Line 28. + +*** + +### \_\_repr\_\_ + +#### Signature + +```python +__repr__() -> str +``` + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/relay/message.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/message.py) + +Line 123. + +*** + +### on + +Register an event listener for state changes on this message. + +#### Signature + +```python +on(handler: Callable) -> None +``` + +#### Parameters + + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/relay/message.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/message.py) + +Line 72. + +*** + +### wait + +Block until the message reaches a terminal state. + +Returns the terminal RelayEvent. Raises asyncio.TimeoutError if +timeout is specified and exceeded. + +**Modifiers:** `async` + +#### Signature + +```python +async wait(timeout: Optional[float] = None) -> RelayEvent +``` + +#### Parameters + + + +#### Returns + +`RelayEvent` + +#### Source + +[`signalwire/signalwire/relay/message.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/message.py) + +Line 76. + +## Source + +[`signalwire/signalwire/relay/message.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/message.py) + +Line 21. diff --git a/fern/products/sdk-reference/python/rest/call-handler/index.mdx b/fern/products/sdk-reference/python/rest/call-handler/index.mdx new file mode 100644 index 0000000000..522df80a95 --- /dev/null +++ b/fern/products/sdk-reference/python/rest/call-handler/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/rest/call-handler" +title: "call_handler" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.rest.call_handler" + parent: "signalwire.rest" + module: "rest" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/call_handler.py" +--- +# `call_handler` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module call_handler +``` + +## Classes + + + + `call_handler` values for `phone_numbers.update`. + + + +## Source + +[`signalwire/signalwire/rest/call_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/call_handler.py) diff --git a/fern/products/sdk-reference/python/rest/call-handler/phone-call-handler/index.mdx b/fern/products/sdk-reference/python/rest/call-handler/phone-call-handler/index.mdx new file mode 100644 index 0000000000..863c39d370 --- /dev/null +++ b/fern/products/sdk-reference/python/rest/call-handler/phone-call-handler/index.mdx @@ -0,0 +1,80 @@ +--- +slug: "/reference/python/rest/call-handler/phone-call-handler" +title: "PhoneCallHandler" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.call_handler.PhoneCallHandler" + parent: "signalwire.rest.call_handler" + module: "rest.call_handler" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/call_handler.py" +--- +# `PhoneCallHandler` + +`call_handler` values for `phone_numbers.update`. + +Each value is a `str` subclass, so passing the enum member directly into +`phone_numbers.update(..., call_handler=PhoneCallHandler.RELAY_SCRIPT)` +serializes to the wire value without `.value` indirection. + +\================= ============================= ======================= +Enum member Companion field (required) Auto-creates resource +\================= ============================= ======================= +RELAY\_SCRIPT call\_relay\_script\_url swml\_webhook +LAML\_WEBHOOKS call\_request\_url cxml\_webhook +LAML\_APPLICATION call\_laml\_application\_id cxml\_application +AI\_AGENT call\_ai\_agent\_id ai\_agent +CALL\_FLOW call\_flow\_id call\_flow +RELAY\_APPLICATION call\_relay\_application relay\_application +RELAY\_TOPIC call\_relay\_topic (routes via RELAY) +RELAY\_CONTEXT call\_relay\_context (legacy, prefer topic) +RELAY\_CONNECTOR (connector config) (internal) +VIDEO\_ROOM call\_video\_room\_id (routes to Video API) +DIALOGFLOW call\_dialogflow\_agent\_id (none) +\================= ============================= ======================= + +Note: `LAML_WEBHOOKS` (wire value `laml_webhooks`) produces a **cXML** +handler, not a generic webhook. For SWML, use `RELAY_SCRIPT`. + +## Signature + +```python +class PhoneCallHandler(str, Enum) +``` + +## Inheritance + +**Extends:** `str`, `Enum` + +## Properties + + + + + + + + + + + + + + + + + + + + + + + +## Source + +[`signalwire/signalwire/rest/call_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/call_handler.py) + +Line 25. diff --git a/fern/products/sdk-reference/python/rest/client/index.mdx b/fern/products/sdk-reference/python/rest/client/index.mdx new file mode 100644 index 0000000000..43dcd7e2f6 --- /dev/null +++ b/fern/products/sdk-reference/python/rest/client/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/rest/client" +title: "client" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.rest.client" + parent: "signalwire.rest" + module: "rest" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/client.py" +--- +# `client` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module client +``` + +## Classes + + + + REST client for the SignalWire platform APIs. + + + +## Source + +[`signalwire/signalwire/rest/client.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/client.py) diff --git a/fern/products/sdk-reference/python/rest/client/rest-client/index.mdx b/fern/products/sdk-reference/python/rest/client/rest-client/index.mdx new file mode 100644 index 0000000000..593cd86557 --- /dev/null +++ b/fern/products/sdk-reference/python/rest/client/rest-client/index.mdx @@ -0,0 +1,133 @@ +--- +slug: "/reference/python/rest/client/rest-client" +title: "RestClient" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.client.RestClient" + parent: "signalwire.rest.client" + module: "rest.client" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/client.py" +--- +# `RestClient` + +REST client for the SignalWire platform APIs. + +> \[!NOTE] +> client = RestClient( +> project="your-project-id", +> token="your-api-token", +> host="your-space.signalwire.com", +> ) +> +> # Or use environment variables: +> +> # SIGNALWIRE\_PROJECT\_ID, SIGNALWIRE\_API\_TOKEN, SIGNALWIRE\_SPACE +> +> client = RestClient() +> +> # Use namespaced resources +> +> client.fabric.ai\_agents.list() +> client.calling.play(call\_id, play=\[...]) +> client.phone\_numbers.search(area\_code="512") +> client.video.rooms.create(name="standup") +> client.compat.calls.list() + +## Signature + +```python +class RestClient +``` + +## Examples + +```python +# Or use environment variables: +# SIGNALWIRE_PROJECT_ID, SIGNALWIRE_API_TOKEN, SIGNALWIRE_SPACE +client = RestClient() + +# Use namespaced resources +client.fabric.ai_agents.list() +client.calling.play(call_id, play=[...]) +client.phone_numbers.search(area_code="512") +client.video.rooms.create(name="standup") +client.compat.calls.list() +``` + +## Properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(project = None, token = None, host = None) +``` + +#### Parameters + + + + + + + +#### Source + +[`signalwire/signalwire/rest/client.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/client.py) + +Line 61. + +## Source + +[`signalwire/signalwire/rest/client.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/client.py) + +Line 39. diff --git a/fern/products/sdk-reference/python/rest/index.mdx b/fern/products/sdk-reference/python/rest/index.mdx new file mode 100644 index 0000000000..c52c8a2219 --- /dev/null +++ b/fern/products/sdk-reference/python/rest/index.mdx @@ -0,0 +1,50 @@ +--- +slug: "/reference/python/rest" +title: "rest" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.rest" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/__init__.py" +--- +# `rest` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module rest +``` + +## Properties + + + +## Modules + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + +## Source + +[`signalwire/signalwire/rest/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/__init__.py) diff --git a/fern/products/sdk-reference/python/rest/namespaces/addresses/addresses-resource/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/addresses/addresses-resource/index.mdx new file mode 100644 index 0000000000..a0e09d4b00 --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/addresses/addresses-resource/index.mdx @@ -0,0 +1,133 @@ +--- +slug: "/reference/python/rest/namespaces/addresses/addresses-resource" +title: "AddressesResource" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.addresses.AddressesResource" + parent: "signalwire.rest.namespaces.addresses" + module: "rest.namespaces.addresses" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/addresses.py" +--- +# `AddressesResource` + +Address management (no update endpoint). + +## Signature + +```python +class AddressesResource(BaseResource) +``` + +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(http) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/addresses.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/addresses.py) + +Line 20. + +*** + +### create + +#### Signature + +```python +create(**kwargs = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/addresses.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/addresses.py) + +Line 26. + +*** + +### delete + +#### Signature + +```python +delete(address_id) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/addresses.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/addresses.py) + +Line 32. + +*** + +### get + +#### Signature + +```python +get(address_id) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/addresses.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/addresses.py) + +Line 29. + +*** + +### list + +#### Signature + +```python +list(**params = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/addresses.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/addresses.py) + +Line 23. + +## Source + +[`signalwire/signalwire/rest/namespaces/addresses.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/addresses.py) + +Line 17. diff --git a/fern/products/sdk-reference/python/rest/namespaces/addresses/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/addresses/index.mdx new file mode 100644 index 0000000000..70eb494dbe --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/addresses/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/rest/namespaces/addresses" +title: "addresses" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.rest.namespaces.addresses" + parent: "signalwire.rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/addresses.py" +--- +# `addresses` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module addresses +``` + +## Classes + + + + Address management (no update endpoint). + + + +## Source + +[`signalwire/signalwire/rest/namespaces/addresses.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/addresses.py) diff --git a/fern/products/sdk-reference/python/rest/namespaces/calling/calling-namespace/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/calling/calling-namespace/index.mdx new file mode 100644 index 0000000000..6611970dcf --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/calling/calling-namespace/index.mdx @@ -0,0 +1,863 @@ +--- +slug: "/reference/python/rest/namespaces/calling/calling-namespace" +title: "CallingNamespace" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.calling.CallingNamespace" + parent: "signalwire.rest.namespaces.calling" + module: "rest.namespaces.calling" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py" +--- +# `CallingNamespace` + +REST call control — all 37 commands dispatched via single POST endpoint. + +## Signature + +```python +class CallingNamespace(BaseResource) +``` + +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(http) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 22. + +*** + +### ai\_hold + +#### Signature + +```python +ai_hold(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 125. + +*** + +### ai\_message + +#### Signature + +```python +ai_message(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 122. + +*** + +### ai\_stop + +#### Signature + +```python +ai_stop(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 131. + +*** + +### ai\_unhold + +#### Signature + +```python +ai_unhold(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 128. + +*** + +### collect + +#### Signature + +```python +collect(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 77. + +*** + +### collect\_start\_input\_timers + +#### Signature + +```python +collect_start_input_timers(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 83. + +*** + +### collect\_stop + +#### Signature + +```python +collect_stop(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 80. + +*** + +### denoise + +#### Signature + +```python +denoise(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 108. + +*** + +### denoise\_stop + +#### Signature + +```python +denoise_stop(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 111. + +*** + +### detect + +#### Signature + +```python +detect(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 87. + +*** + +### detect\_stop + +#### Signature + +```python +detect_stop(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 90. + +*** + +### dial + +#### Signature + +```python +dial(**params = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 32. + +*** + +### disconnect + +#### Signature + +```python +disconnect(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 44. + +*** + +### end + +#### Signature + +```python +end(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 38. + +*** + +### live\_transcribe + +#### Signature + +```python +live_transcribe(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 135. + +*** + +### live\_translate + +#### Signature + +```python +live_translate(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 138. + +*** + +### play + +#### Signature + +```python +play(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 48. + +*** + +### play\_pause + +#### Signature + +```python +play_pause(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 51. + +*** + +### play\_resume + +#### Signature + +```python +play_resume(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 54. + +*** + +### play\_stop + +#### Signature + +```python +play_stop(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 57. + +*** + +### play\_volume + +#### Signature + +```python +play_volume(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 60. + +*** + +### receive\_fax\_stop + +#### Signature + +```python +receive_fax_stop(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 145. + +*** + +### record + +#### Signature + +```python +record(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 64. + +*** + +### record\_pause + +#### Signature + +```python +record_pause(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 67. + +*** + +### record\_resume + +#### Signature + +```python +record_resume(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 70. + +*** + +### record\_stop + +#### Signature + +```python +record_stop(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 73. + +*** + +### refer + +#### Signature + +```python +refer(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 149. + +*** + +### send\_fax\_stop + +#### Signature + +```python +send_fax_stop(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 142. + +*** + +### stream + +#### Signature + +```python +stream(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 101. + +*** + +### stream\_stop + +#### Signature + +```python +stream_stop(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 104. + +*** + +### tap + +#### Signature + +```python +tap(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 94. + +*** + +### tap\_stop + +#### Signature + +```python +tap_stop(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 97. + +*** + +### transcribe + +#### Signature + +```python +transcribe(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 115. + +*** + +### transcribe\_stop + +#### Signature + +```python +transcribe_stop(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 118. + +*** + +### transfer + +#### Signature + +```python +transfer(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 41. + +*** + +### update + +#### Signature + +```python +update(**params = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 35. + +*** + +### user\_event + +#### Signature + +```python +user_event(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 153. + +## Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 19. diff --git a/fern/products/sdk-reference/python/rest/namespaces/calling/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/calling/index.mdx new file mode 100644 index 0000000000..acad569ac7 --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/calling/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/rest/namespaces/calling" +title: "calling" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.rest.namespaces.calling" + parent: "signalwire.rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py" +--- +# `calling` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module calling +``` + +## Classes + + + + REST call control — all 37 commands dispatched via single POST endpoint. + + + +## Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) diff --git a/fern/products/sdk-reference/python/rest/namespaces/chat/chat-resource/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/chat/chat-resource/index.mdx new file mode 100644 index 0000000000..e581ea5032 --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/chat/chat-resource/index.mdx @@ -0,0 +1,73 @@ +--- +slug: "/reference/python/rest/namespaces/chat/chat-resource" +title: "ChatResource" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.chat.ChatResource" + parent: "signalwire.rest.namespaces.chat" + module: "rest.namespaces.chat" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/chat.py" +--- +# `ChatResource` + +Chat token generation. + +## Signature + +```python +class ChatResource(BaseResource) +``` + +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(http) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/chat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/chat.py) + +Line 20. + +*** + +### create\_token + +#### Signature + +```python +create_token(**kwargs = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/chat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/chat.py) + +Line 23. + +## Source + +[`signalwire/signalwire/rest/namespaces/chat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/chat.py) + +Line 17. diff --git a/fern/products/sdk-reference/python/rest/namespaces/chat/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/chat/index.mdx new file mode 100644 index 0000000000..b8fc40edca --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/chat/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/rest/namespaces/chat" +title: "chat" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.rest.namespaces.chat" + parent: "signalwire.rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/chat.py" +--- +# `chat` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module chat +``` + +## Classes + + + + Chat token generation. + + + +## Source + +[`signalwire/signalwire/rest/namespaces/chat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/chat.py) diff --git a/fern/products/sdk-reference/python/rest/namespaces/compat/compat-accounts/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/compat/compat-accounts/index.mdx new file mode 100644 index 0000000000..e9fe7ab8c3 --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/compat/compat-accounts/index.mdx @@ -0,0 +1,135 @@ +--- +slug: "/reference/python/rest/namespaces/compat/compat-accounts" +title: "CompatAccounts" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.compat.CompatAccounts" + parent: "signalwire.rest.namespaces.compat" + module: "rest.namespaces.compat" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py" +--- +# `CompatAccounts` + +Compat account/subproject management. + +## Signature + +```python +class CompatAccounts(BaseResource) +``` + +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(http) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 20. + +*** + +### create + +#### Signature + +```python +create(**kwargs = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 26. + +*** + +### get + +#### Signature + +```python +get(sid) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 29. + +*** + +### list + +#### Signature + +```python +list(**params = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 23. + +*** + +### update + +#### Signature + +```python +update(sid, **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 32. + +## Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 17. diff --git a/fern/products/sdk-reference/python/rest/namespaces/compat/compat-applications/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/compat/compat-applications/index.mdx new file mode 100644 index 0000000000..3125807d20 --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/compat/compat-applications/index.mdx @@ -0,0 +1,55 @@ +--- +slug: "/reference/python/rest/namespaces/compat/compat-applications" +title: "CompatApplications" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.compat.CompatApplications" + parent: "signalwire.rest.namespaces.compat" + module: "rest.namespaces.compat" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py" +--- +# `CompatApplications` + +Compat application management. + +## Signature + +```python +class CompatApplications(CrudResource) +``` + +## Inheritance + +**Extends:** `CrudResource` + +## Methods + +### update + +#### Signature + +```python +update(sid, **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 187. + +## Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 184. diff --git a/fern/products/sdk-reference/python/rest/namespaces/compat/compat-calls/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/compat/compat-calls/index.mdx new file mode 100644 index 0000000000..b5dc295ef4 --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/compat/compat-calls/index.mdx @@ -0,0 +1,147 @@ +--- +slug: "/reference/python/rest/namespaces/compat/compat-calls" +title: "CompatCalls" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.compat.CompatCalls" + parent: "signalwire.rest.namespaces.compat" + module: "rest.namespaces.compat" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py" +--- +# `CompatCalls` + +Compat call management with recording and stream sub-resources. + +## Signature + +```python +class CompatCalls(CrudResource) +``` + +## Inheritance + +**Extends:** `CrudResource` + +## Methods + +### start\_recording + +#### Signature + +```python +start_recording(call_sid, **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 42. + +*** + +### start\_stream + +#### Signature + +```python +start_stream(call_sid, **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 48. + +*** + +### stop\_stream + +#### Signature + +```python +stop_stream(call_sid, stream_sid, **kwargs = {}) +``` + +#### Parameters + + + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 51. + +*** + +### update + +#### Signature + +```python +update(sid, **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 39. + +*** + +### update\_recording + +#### Signature + +```python +update_recording(call_sid, recording_sid, **kwargs = {}) +``` + +#### Parameters + + + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 45. + +## Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 36. diff --git a/fern/products/sdk-reference/python/rest/namespaces/compat/compat-conferences/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/compat/compat-conferences/index.mdx new file mode 100644 index 0000000000..918da49a4a --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/compat/compat-conferences/index.mdx @@ -0,0 +1,321 @@ +--- +slug: "/reference/python/rest/namespaces/compat/compat-conferences" +title: "CompatConferences" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.compat.CompatConferences" + parent: "signalwire.rest.namespaces.compat" + module: "rest.namespaces.compat" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py" +--- +# `CompatConferences` + +Compat conference management with participants, recordings, and streams. + +## Signature + +```python +class CompatConferences(BaseResource) +``` + +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### delete\_recording + +#### Signature + +```python +delete_recording(conference_sid, recording_sid) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 134. + +*** + +### get + +#### Signature + +```python +get(sid) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 93. + +*** + +### get\_participant + +#### Signature + +```python +get_participant(conference_sid, call_sid) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 106. + +*** + +### get\_recording + +#### Signature + +```python +get_recording(conference_sid, recording_sid) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 125. + +*** + +### list + +#### Signature + +```python +list(**params = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 90. + +*** + +### list\_participants + +#### Signature + +```python +list_participants(conference_sid, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 100. + +*** + +### list\_recordings + +#### Signature + +```python +list_recordings(conference_sid, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 119. + +*** + +### remove\_participant + +#### Signature + +```python +remove_participant(conference_sid, call_sid) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 115. + +*** + +### start\_stream + +#### Signature + +```python +start_stream(conference_sid, **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 138. + +*** + +### stop\_stream + +#### Signature + +```python +stop_stream(conference_sid, stream_sid, **kwargs = {}) +``` + +#### Parameters + + + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 141. + +*** + +### update + +#### Signature + +```python +update(sid, **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 96. + +*** + +### update\_participant + +#### Signature + +```python +update_participant(conference_sid, call_sid, **kwargs = {}) +``` + +#### Parameters + + + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 109. + +*** + +### update\_recording + +#### Signature + +```python +update_recording(conference_sid, recording_sid, **kwargs = {}) +``` + +#### Parameters + + + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 128. + +## Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 87. diff --git a/fern/products/sdk-reference/python/rest/namespaces/compat/compat-faxes/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/compat/compat-faxes/index.mdx new file mode 100644 index 0000000000..3785a7b1da --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/compat/compat-faxes/index.mdx @@ -0,0 +1,121 @@ +--- +slug: "/reference/python/rest/namespaces/compat/compat-faxes" +title: "CompatFaxes" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.compat.CompatFaxes" + parent: "signalwire.rest.namespaces.compat" + module: "rest.namespaces.compat" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py" +--- +# `CompatFaxes` + +Compat fax management with media sub-resources. + +## Signature + +```python +class CompatFaxes(CrudResource) +``` + +## Inheritance + +**Extends:** `CrudResource` + +## Methods + +### delete\_media + +#### Signature + +```python +delete_media(fax_sid, media_sid) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 83. + +*** + +### get\_media + +#### Signature + +```python +get_media(fax_sid, media_sid) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 80. + +*** + +### list\_media + +#### Signature + +```python +list_media(fax_sid, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 77. + +*** + +### update + +#### Signature + +```python +update(sid, **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 74. + +## Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 71. diff --git a/fern/products/sdk-reference/python/rest/namespaces/compat/compat-laml-bins/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/compat/compat-laml-bins/index.mdx new file mode 100644 index 0000000000..a72efb126d --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/compat/compat-laml-bins/index.mdx @@ -0,0 +1,55 @@ +--- +slug: "/reference/python/rest/namespaces/compat/compat-laml-bins" +title: "CompatLamlBins" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.compat.CompatLamlBins" + parent: "signalwire.rest.namespaces.compat" + module: "rest.namespaces.compat" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py" +--- +# `CompatLamlBins` + +Compat cXML/LaML script management. + +## Signature + +```python +class CompatLamlBins(CrudResource) +``` + +## Inheritance + +**Extends:** `CrudResource` + +## Methods + +### update + +#### Signature + +```python +update(sid, **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 194. + +## Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 191. diff --git a/fern/products/sdk-reference/python/rest/namespaces/compat/compat-messages/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/compat/compat-messages/index.mdx new file mode 100644 index 0000000000..a370c220e6 --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/compat/compat-messages/index.mdx @@ -0,0 +1,121 @@ +--- +slug: "/reference/python/rest/namespaces/compat/compat-messages" +title: "CompatMessages" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.compat.CompatMessages" + parent: "signalwire.rest.namespaces.compat" + module: "rest.namespaces.compat" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py" +--- +# `CompatMessages` + +Compat message management with media sub-resources. + +## Signature + +```python +class CompatMessages(CrudResource) +``` + +## Inheritance + +**Extends:** `CrudResource` + +## Methods + +### delete\_media + +#### Signature + +```python +delete_media(message_sid, media_sid) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 67. + +*** + +### get\_media + +#### Signature + +```python +get_media(message_sid, media_sid) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 64. + +*** + +### list\_media + +#### Signature + +```python +list_media(message_sid, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 61. + +*** + +### update + +#### Signature + +```python +update(sid, **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 58. + +## Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 55. diff --git a/fern/products/sdk-reference/python/rest/namespaces/compat/compat-namespace/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/compat/compat-namespace/index.mdx new file mode 100644 index 0000000000..e0d4c68931 --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/compat/compat-namespace/index.mdx @@ -0,0 +1,77 @@ +--- +slug: "/reference/python/rest/namespaces/compat/compat-namespace" +title: "CompatNamespace" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.compat.CompatNamespace" + parent: "signalwire.rest.namespaces.compat" + module: "rest.namespaces.compat" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py" +--- +# `CompatNamespace` + +Twilio-compatible LAML API namespace with AccountSid scoping. + +## Signature + +```python +class CompatNamespace +``` + +## Properties + + + + + + + + + + + + + + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(http, account_sid) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 256. + +## Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 253. diff --git a/fern/products/sdk-reference/python/rest/namespaces/compat/compat-phone-numbers/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/compat/compat-phone-numbers/index.mdx new file mode 100644 index 0000000000..72d5b45f20 --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/compat/compat-phone-numbers/index.mdx @@ -0,0 +1,241 @@ +--- +slug: "/reference/python/rest/namespaces/compat/compat-phone-numbers" +title: "CompatPhoneNumbers" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.compat.CompatPhoneNumbers" + parent: "signalwire.rest.namespaces.compat" + module: "rest.namespaces.compat" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py" +--- +# `CompatPhoneNumbers` + +Compat phone number management. + +## Signature + +```python +class CompatPhoneNumbers(BaseResource) +``` + +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(http, base) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 151. + +*** + +### delete + +#### Signature + +```python +delete(sid) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 167. + +*** + +### get + +#### Signature + +```python +get(sid) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 161. + +*** + +### import\_number + +#### Signature + +```python +import_number(**kwargs = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 170. + +*** + +### list + +#### Signature + +```python +list(**params = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 155. + +*** + +### list\_available\_countries + +#### Signature + +```python +list_available_countries(**params = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 174. + +*** + +### purchase + +#### Signature + +```python +purchase(**kwargs = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 158. + +*** + +### search\_local + +#### Signature + +```python +search_local(country, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 177. + +*** + +### search\_toll\_free + +#### Signature + +```python +search_toll_free(country, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 180. + +*** + +### update + +#### Signature + +```python +update(sid, **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 164. + +## Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 148. diff --git a/fern/products/sdk-reference/python/rest/namespaces/compat/compat-queues/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/compat/compat-queues/index.mdx new file mode 100644 index 0000000000..ecc8f303fa --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/compat/compat-queues/index.mdx @@ -0,0 +1,123 @@ +--- +slug: "/reference/python/rest/namespaces/compat/compat-queues" +title: "CompatQueues" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.compat.CompatQueues" + parent: "signalwire.rest.namespaces.compat" + module: "rest.namespaces.compat" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py" +--- +# `CompatQueues` + +Compat queue management with members. + +## Signature + +```python +class CompatQueues(CrudResource) +``` + +## Inheritance + +**Extends:** `CrudResource` + +## Methods + +### dequeue\_member + +#### Signature + +```python +dequeue_member(queue_sid, call_sid, **kwargs = {}) +``` + +#### Parameters + + + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 210. + +*** + +### get\_member + +#### Signature + +```python +get_member(queue_sid, call_sid) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 207. + +*** + +### list\_members + +#### Signature + +```python +list_members(queue_sid, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 204. + +*** + +### update + +#### Signature + +```python +update(sid, **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 201. + +## Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 198. diff --git a/fern/products/sdk-reference/python/rest/namespaces/compat/compat-recordings/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/compat/compat-recordings/index.mdx new file mode 100644 index 0000000000..621b9d67c8 --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/compat/compat-recordings/index.mdx @@ -0,0 +1,93 @@ +--- +slug: "/reference/python/rest/namespaces/compat/compat-recordings" +title: "CompatRecordings" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.compat.CompatRecordings" + parent: "signalwire.rest.namespaces.compat" + module: "rest.namespaces.compat" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py" +--- +# `CompatRecordings` + +Compat recording management. + +## Signature + +```python +class CompatRecordings(BaseResource) +``` + +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### delete + +#### Signature + +```python +delete(sid) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 223. + +*** + +### get + +#### Signature + +```python +get(sid) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 220. + +*** + +### list + +#### Signature + +```python +list(**params = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 217. + +## Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 214. diff --git a/fern/products/sdk-reference/python/rest/namespaces/compat/compat-tokens/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/compat/compat-tokens/index.mdx new file mode 100644 index 0000000000..71a2e6e782 --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/compat/compat-tokens/index.mdx @@ -0,0 +1,95 @@ +--- +slug: "/reference/python/rest/namespaces/compat/compat-tokens" +title: "CompatTokens" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.compat.CompatTokens" + parent: "signalwire.rest.namespaces.compat" + module: "rest.namespaces.compat" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py" +--- +# `CompatTokens` + +Compat API token management. + +## Signature + +```python +class CompatTokens(BaseResource) +``` + +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### create + +#### Signature + +```python +create(**kwargs = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 243. + +*** + +### delete + +#### Signature + +```python +delete(token_id) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 249. + +*** + +### update + +#### Signature + +```python +update(token_id, **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 246. + +## Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 240. diff --git a/fern/products/sdk-reference/python/rest/namespaces/compat/compat-transcriptions/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/compat/compat-transcriptions/index.mdx new file mode 100644 index 0000000000..8c8dbfc363 --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/compat/compat-transcriptions/index.mdx @@ -0,0 +1,93 @@ +--- +slug: "/reference/python/rest/namespaces/compat/compat-transcriptions" +title: "CompatTranscriptions" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.compat.CompatTranscriptions" + parent: "signalwire.rest.namespaces.compat" + module: "rest.namespaces.compat" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py" +--- +# `CompatTranscriptions` + +Compat transcription management. + +## Signature + +```python +class CompatTranscriptions(BaseResource) +``` + +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### delete + +#### Signature + +```python +delete(sid) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 236. + +*** + +### get + +#### Signature + +```python +get(sid) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 233. + +*** + +### list + +#### Signature + +```python +list(**params = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 230. + +## Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) + +Line 227. diff --git a/fern/products/sdk-reference/python/rest/namespaces/compat/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/compat/index.mdx new file mode 100644 index 0000000000..260f034645 --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/compat/index.mdx @@ -0,0 +1,88 @@ +--- +slug: "/reference/python/rest/namespaces/compat" +title: "compat" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.rest.namespaces.compat" + parent: "signalwire.rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py" +--- +# `compat` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module compat +``` + +## Classes + + + + Compat account/subproject management. + + + + Compat application management. + + + + Compat call management with recording and stream sub-resources. + + + + Compat conference management with participants, recordings, and streams. + + + + Compat fax management with media sub-resources. + + + + Compat cXML/LaML script management. + + + + Compat message management with media sub-resources. + + + + Twilio-compatible LAML API namespace with AccountSid scoping. + + + + Compat phone number management. + + + + Compat queue management with members. + + + + Compat recording management. + + + + Compat API token management. + + + + Compat transcription management. + + + +## Source + +[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) diff --git a/fern/products/sdk-reference/python/rest/namespaces/datasphere/datasphere-documents/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/datasphere/datasphere-documents/index.mdx new file mode 100644 index 0000000000..be23eab292 --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/datasphere/datasphere-documents/index.mdx @@ -0,0 +1,139 @@ +--- +slug: "/reference/python/rest/namespaces/datasphere/datasphere-documents" +title: "DatasphereDocuments" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.datasphere.DatasphereDocuments" + parent: "signalwire.rest.namespaces.datasphere" + module: "rest.namespaces.datasphere" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/datasphere.py" +--- +# `DatasphereDocuments` + +Document management with search and chunk operations. + +## Signature + +```python +class DatasphereDocuments(CrudResource) +``` + +## Inheritance + +**Extends:** `CrudResource` + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(http) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/datasphere.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/datasphere.py) + +Line 20. + +*** + +### delete\_chunk + +#### Signature + +```python +delete_chunk(document_id, chunk_id) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/datasphere.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/datasphere.py) + +Line 32. + +*** + +### get\_chunk + +#### Signature + +```python +get_chunk(document_id, chunk_id) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/datasphere.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/datasphere.py) + +Line 29. + +*** + +### list\_chunks + +#### Signature + +```python +list_chunks(document_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/datasphere.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/datasphere.py) + +Line 26. + +*** + +### search + +#### Signature + +```python +search(**kwargs = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/datasphere.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/datasphere.py) + +Line 23. + +## Source + +[`signalwire/signalwire/rest/namespaces/datasphere.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/datasphere.py) + +Line 17. diff --git a/fern/products/sdk-reference/python/rest/namespaces/datasphere/datasphere-namespace/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/datasphere/datasphere-namespace/index.mdx new file mode 100644 index 0000000000..d7b3046796 --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/datasphere/datasphere-namespace/index.mdx @@ -0,0 +1,53 @@ +--- +slug: "/reference/python/rest/namespaces/datasphere/datasphere-namespace" +title: "DatasphereNamespace" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.datasphere.DatasphereNamespace" + parent: "signalwire.rest.namespaces.datasphere" + module: "rest.namespaces.datasphere" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/datasphere.py" +--- +# `DatasphereNamespace` + +Datasphere API namespace. + +## Signature + +```python +class DatasphereNamespace +``` + +## Properties + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(http) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/datasphere.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/datasphere.py) + +Line 39. + +## Source + +[`signalwire/signalwire/rest/namespaces/datasphere.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/datasphere.py) + +Line 36. diff --git a/fern/products/sdk-reference/python/rest/namespaces/datasphere/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/datasphere/index.mdx new file mode 100644 index 0000000000..5ca74809a5 --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/datasphere/index.mdx @@ -0,0 +1,44 @@ +--- +slug: "/reference/python/rest/namespaces/datasphere" +title: "datasphere" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.rest.namespaces.datasphere" + parent: "signalwire.rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/datasphere.py" +--- +# `datasphere` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module datasphere +``` + +## Classes + + + + Document management with search and chunk operations. + + + + Datasphere API namespace. + + + +## Source + +[`signalwire/signalwire/rest/namespaces/datasphere.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/datasphere.py) diff --git a/fern/products/sdk-reference/python/rest/namespaces/fabric/auto-materialized-webhook/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/fabric/auto-materialized-webhook/index.mdx new file mode 100644 index 0000000000..4d93cd3255 --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/fabric/auto-materialized-webhook/index.mdx @@ -0,0 +1,59 @@ +--- +slug: "/reference/python/rest/namespaces/fabric/auto-materialized-webhook" +title: "AutoMaterializedWebhook" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.fabric.AutoMaterializedWebhook" + parent: "signalwire.rest.namespaces.fabric" + module: "rest.namespaces.fabric" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py" +--- +# `AutoMaterializedWebhook` + +Fabric webhook resource that's normally auto-created by phone\_numbers.set\_\*. + +Exposed for backwards compatibility. The binding model for these resources +is on the phone number (see `phone_numbers.set_swml_webhook` / +`set_cxml_webhook`) — setting `call_handler` on a phone number +auto-materializes the webhook. Calling `create` here produces an orphan +resource that isn't bound to any phone number. + +## Signature + +```python +class AutoMaterializedWebhook(FabricResource) +``` + +## Inheritance + +**Extends:** [FabricResource](/docs/sdk-reference/reference/python/rest/namespaces/fabric/fabric-resource) + +## Methods + +### create + +#### Signature + +```python +create(**kwargs = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 41. + +## Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 29. diff --git a/fern/products/sdk-reference/python/rest/namespaces/fabric/call-flows-resource/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/fabric/call-flows-resource/index.mdx new file mode 100644 index 0000000000..95e268ef2f --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/fabric/call-flows-resource/index.mdx @@ -0,0 +1,101 @@ +--- +slug: "/reference/python/rest/namespaces/fabric/call-flows-resource" +title: "CallFlowsResource" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.fabric.CallFlowsResource" + parent: "signalwire.rest.namespaces.fabric" + module: "rest.namespaces.fabric" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py" +--- +# `CallFlowsResource` + +Call flows with version management. + +Note: call\_flow (singular) is used in address/version paths per the API spec. + +## Signature + +```python +class CallFlowsResource(FabricResourcePUT) +``` + +## Inheritance + +**Extends:** [FabricResourcePUT](/docs/sdk-reference/reference/python/rest/namespaces/fabric/fabric-resource-put) + +## Methods + +### deploy\_version + +#### Signature + +```python +deploy_version(resource_id, **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 76. + +*** + +### list\_addresses + +#### Signature + +```python +list_addresses(resource_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 67. + +*** + +### list\_versions + +#### Signature + +```python +list_versions(resource_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 72. + +## Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 61. diff --git a/fern/products/sdk-reference/python/rest/namespaces/fabric/conference-rooms-resource/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/fabric/conference-rooms-resource/index.mdx new file mode 100644 index 0000000000..1ce0ef96c9 --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/fabric/conference-rooms-resource/index.mdx @@ -0,0 +1,55 @@ +--- +slug: "/reference/python/rest/namespaces/fabric/conference-rooms-resource" +title: "ConferenceRoomsResource" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.fabric.ConferenceRoomsResource" + parent: "signalwire.rest.namespaces.fabric" + module: "rest.namespaces.fabric" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py" +--- +# `ConferenceRoomsResource` + +Conference rooms — uses singular 'conference\_room' for sub-resource paths. + +## Signature + +```python +class ConferenceRoomsResource(FabricResourcePUT) +``` + +## Inheritance + +**Extends:** [FabricResourcePUT](/docs/sdk-reference/reference/python/rest/namespaces/fabric/fabric-resource-put) + +## Methods + +### list\_addresses + +#### Signature + +```python +list_addresses(resource_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 84. + +## Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 81. diff --git a/fern/products/sdk-reference/python/rest/namespaces/fabric/cxml-applications-resource/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/fabric/cxml-applications-resource/index.mdx new file mode 100644 index 0000000000..54dbfc1d24 --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/fabric/cxml-applications-resource/index.mdx @@ -0,0 +1,53 @@ +--- +slug: "/reference/python/rest/namespaces/fabric/cxml-applications-resource" +title: "CxmlApplicationsResource" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.fabric.CxmlApplicationsResource" + parent: "signalwire.rest.namespaces.fabric" + module: "rest.namespaces.fabric" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py" +--- +# `CxmlApplicationsResource` + +cXML applications — no create method (read/update/delete only). + +## Signature + +```python +class CxmlApplicationsResource(FabricResourcePUT) +``` + +## Inheritance + +**Extends:** [FabricResourcePUT](/docs/sdk-reference/reference/python/rest/namespaces/fabric/fabric-resource-put) + +## Methods + +### create + +#### Signature + +```python +create(**kwargs = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 124. + +## Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 121. diff --git a/fern/products/sdk-reference/python/rest/namespaces/fabric/cxml-webhooks-resource/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/fabric/cxml-webhooks-resource/index.mdx new file mode 100644 index 0000000000..5e34368f66 --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/fabric/cxml-webhooks-resource/index.mdx @@ -0,0 +1,31 @@ +--- +slug: "/reference/python/rest/namespaces/fabric/cxml-webhooks-resource" +title: "CxmlWebhooksResource" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.fabric.CxmlWebhooksResource" + parent: "signalwire.rest.namespaces.fabric" + module: "rest.namespaces.fabric" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py" +--- +# `CxmlWebhooksResource` + +## Signature + +```python +class CxmlWebhooksResource(AutoMaterializedWebhook) +``` + +## Inheritance + +**Extends:** [AutoMaterializedWebhook](/docs/sdk-reference/reference/python/rest/namespaces/fabric/auto-materialized-webhook) + +## Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 57. diff --git a/fern/products/sdk-reference/python/rest/namespaces/fabric/fabric-addresses/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/fabric/fabric-addresses/index.mdx new file mode 100644 index 0000000000..4b308597bf --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/fabric/fabric-addresses/index.mdx @@ -0,0 +1,73 @@ +--- +slug: "/reference/python/rest/namespaces/fabric/fabric-addresses" +title: "FabricAddresses" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.fabric.FabricAddresses" + parent: "signalwire.rest.namespaces.fabric" + module: "rest.namespaces.fabric" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py" +--- +# `FabricAddresses` + +Read-only fabric addresses. + +## Signature + +```python +class FabricAddresses(BaseResource) +``` + +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### get + +#### Signature + +```python +get(address_id) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 178. + +*** + +### list + +#### Signature + +```python +list(**params = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 175. + +## Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 172. diff --git a/fern/products/sdk-reference/python/rest/namespaces/fabric/fabric-namespace/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/fabric/fabric-namespace/index.mdx new file mode 100644 index 0000000000..6837a86da7 --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/fabric/fabric-namespace/index.mdx @@ -0,0 +1,83 @@ +--- +slug: "/reference/python/rest/namespaces/fabric/fabric-namespace" +title: "FabricNamespace" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.fabric.FabricNamespace" + parent: "signalwire.rest.namespaces.fabric" + module: "rest.namespaces.fabric" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py" +--- +# `FabricNamespace` + +Fabric API namespace grouping all resource types. + +## Signature + +```python +class FabricNamespace +``` + +## Properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(http) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 207. + +## Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 204. diff --git a/fern/products/sdk-reference/python/rest/namespaces/fabric/fabric-resource-put/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/fabric/fabric-resource-put/index.mdx new file mode 100644 index 0000000000..ccbcff569f --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/fabric/fabric-resource-put/index.mdx @@ -0,0 +1,33 @@ +--- +slug: "/reference/python/rest/namespaces/fabric/fabric-resource-put" +title: "FabricResourcePUT" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.fabric.FabricResourcePUT" + parent: "signalwire.rest.namespaces.fabric" + module: "rest.namespaces.fabric" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py" +--- +# `FabricResourcePUT` + +Fabric resource that uses PUT for updates. + +## Signature + +```python +class FabricResourcePUT(CrudWithAddresses) +``` + +## Inheritance + +**Extends:** `CrudWithAddresses` + +## Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 24. diff --git a/fern/products/sdk-reference/python/rest/namespaces/fabric/fabric-resource/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/fabric/fabric-resource/index.mdx new file mode 100644 index 0000000000..43bce17cd4 --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/fabric/fabric-resource/index.mdx @@ -0,0 +1,33 @@ +--- +slug: "/reference/python/rest/namespaces/fabric/fabric-resource" +title: "FabricResource" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.fabric.FabricResource" + parent: "signalwire.rest.namespaces.fabric" + module: "rest.namespaces.fabric" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py" +--- +# `FabricResource` + +Standard fabric resource with CRUD + addresses. + +## Signature + +```python +class FabricResource(CrudWithAddresses) +``` + +## Inheritance + +**Extends:** `CrudWithAddresses` + +## Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 19. diff --git a/fern/products/sdk-reference/python/rest/namespaces/fabric/fabric-tokens/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/fabric/fabric-tokens/index.mdx new file mode 100644 index 0000000000..bd776192be --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/fabric/fabric-tokens/index.mdx @@ -0,0 +1,153 @@ +--- +slug: "/reference/python/rest/namespaces/fabric/fabric-tokens" +title: "FabricTokens" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.fabric.FabricTokens" + parent: "signalwire.rest.namespaces.fabric" + module: "rest.namespaces.fabric" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py" +--- +# `FabricTokens` + +Subscriber, guest, invite, and embed token creation. + +## Signature + +```python +class FabricTokens(BaseResource) +``` + +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(http) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 185. + +*** + +### create\_embed\_token + +#### Signature + +```python +create_embed_token(**kwargs = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 200. + +*** + +### create\_guest\_token + +#### Signature + +```python +create_guest_token(**kwargs = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 197. + +*** + +### create\_invite\_token + +#### Signature + +```python +create_invite_token(**kwargs = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 194. + +*** + +### create\_subscriber\_token + +#### Signature + +```python +create_subscriber_token(**kwargs = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 188. + +*** + +### refresh\_subscriber\_token + +#### Signature + +```python +refresh_subscriber_token(**kwargs = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 191. + +## Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 182. diff --git a/fern/products/sdk-reference/python/rest/namespaces/fabric/generic-resources/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/fabric/generic-resources/index.mdx new file mode 100644 index 0000000000..c4d85fc959 --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/fabric/generic-resources/index.mdx @@ -0,0 +1,169 @@ +--- +slug: "/reference/python/rest/namespaces/fabric/generic-resources" +title: "GenericResources" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.fabric.GenericResources" + parent: "signalwire.rest.namespaces.fabric" + module: "rest.namespaces.fabric" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py" +--- +# `GenericResources` + +Generic resource operations across all fabric resource types. + +## Signature + +```python +class GenericResources(BaseResource) +``` + +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### assign\_domain\_application + +#### Signature + +```python +assign_domain_application(resource_id, **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 168. + +*** + +### assign\_phone\_route + +Deprecated for the common binding cases. Use `phone_numbers.set_*` helpers. + +This endpoint (`POST /api/fabric/resources/{id}/phone_routes`) accepts +only a narrow set of legacy resource types as the attach target. It +**does not work** for `swml_webhook` / `cxml_webhook` / `ai_agent` +bindings — those are configured on the phone number and the Fabric +resource is auto-materialized (see `phone_numbers.set_swml_webhook` +etc.). The authoritative list of accepting resource types lives in the +OpenAPI spec; routing here for those types returns 404 or 422. + +#### Signature + +```python +assign_phone_route(resource_id, **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 146. + +*** + +### delete + +#### Signature + +```python +delete(resource_id) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 137. + +*** + +### get + +#### Signature + +```python +get(resource_id) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 134. + +*** + +### list + +#### Signature + +```python +list(**params = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 131. + +*** + +### list\_addresses + +#### Signature + +```python +list_addresses(resource_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 140. + +## Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 128. diff --git a/fern/products/sdk-reference/python/rest/namespaces/fabric/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/fabric/index.mdx new file mode 100644 index 0000000000..7130fd89f7 --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/fabric/index.mdx @@ -0,0 +1,84 @@ +--- +slug: "/reference/python/rest/namespaces/fabric" +title: "fabric" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.rest.namespaces.fabric" + parent: "signalwire.rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py" +--- +# `fabric` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module fabric +``` + +## Classes + + + + Fabric webhook resource that's normally auto-created by phone\_numbers.set\_\*. + + + + Call flows with version management. + + + + Conference rooms — uses singular 'conference\_room' for sub-resource paths. + + + + cXML applications — no create method (read/update/delete only). + + + + + + Read-only fabric addresses. + + + + Fabric API namespace grouping all resource types. + + + + Standard fabric resource with CRUD + addresses. + + + + Fabric resource that uses PUT for updates. + + + + Subscriber, guest, invite, and embed token creation. + + + + Generic resource operations across all fabric resource types. + + + + Subscribers with SIP endpoint management. + + + + + +## Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) diff --git a/fern/products/sdk-reference/python/rest/namespaces/fabric/subscribers-resource/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/fabric/subscribers-resource/index.mdx new file mode 100644 index 0000000000..ff9a3cff87 --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/fabric/subscribers-resource/index.mdx @@ -0,0 +1,145 @@ +--- +slug: "/reference/python/rest/namespaces/fabric/subscribers-resource" +title: "SubscribersResource" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.fabric.SubscribersResource" + parent: "signalwire.rest.namespaces.fabric" + module: "rest.namespaces.fabric" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py" +--- +# `SubscribersResource` + +Subscribers with SIP endpoint management. + +## Signature + +```python +class SubscribersResource(FabricResourcePUT) +``` + +## Inheritance + +**Extends:** [FabricResourcePUT](/docs/sdk-reference/reference/python/rest/namespaces/fabric/fabric-resource-put) + +## Methods + +### create\_sip\_endpoint + +#### Signature + +```python +create_sip_endpoint(subscriber_id, **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 98. + +*** + +### delete\_sip\_endpoint + +#### Signature + +```python +delete_sip_endpoint(subscriber_id, endpoint_id) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 115. + +*** + +### get\_sip\_endpoint + +#### Signature + +```python +get_sip_endpoint(subscriber_id, endpoint_id) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 104. + +*** + +### list\_sip\_endpoints + +#### Signature + +```python +list_sip_endpoints(subscriber_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 92. + +*** + +### update\_sip\_endpoint + +#### Signature + +```python +update_sip_endpoint(subscriber_id, endpoint_id, **kwargs = {}) +``` + +#### Parameters + + + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 109. + +## Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 89. diff --git a/fern/products/sdk-reference/python/rest/namespaces/fabric/swml-webhooks-resource/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/fabric/swml-webhooks-resource/index.mdx new file mode 100644 index 0000000000..35ab53a8e2 --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/fabric/swml-webhooks-resource/index.mdx @@ -0,0 +1,31 @@ +--- +slug: "/reference/python/rest/namespaces/fabric/swml-webhooks-resource" +title: "SwmlWebhooksResource" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.fabric.SwmlWebhooksResource" + parent: "signalwire.rest.namespaces.fabric" + module: "rest.namespaces.fabric" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py" +--- +# `SwmlWebhooksResource` + +## Signature + +```python +class SwmlWebhooksResource(AutoMaterializedWebhook) +``` + +## Inheritance + +**Extends:** [AutoMaterializedWebhook](/docs/sdk-reference/reference/python/rest/namespaces/fabric/auto-materialized-webhook) + +## Source + +[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) + +Line 53. diff --git a/fern/products/sdk-reference/python/rest/namespaces/imported-numbers/imported-numbers-resource/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/imported-numbers/imported-numbers-resource/index.mdx new file mode 100644 index 0000000000..cbb34e8c8d --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/imported-numbers/imported-numbers-resource/index.mdx @@ -0,0 +1,73 @@ +--- +slug: "/reference/python/rest/namespaces/imported-numbers/imported-numbers-resource" +title: "ImportedNumbersResource" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.imported_numbers.ImportedNumbersResource" + parent: "signalwire.rest.namespaces.imported_numbers" + module: "rest.namespaces.imported_numbers" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/imported_numbers.py" +--- +# `ImportedNumbersResource` + +Import externally-hosted phone numbers. + +## Signature + +```python +class ImportedNumbersResource(BaseResource) +``` + +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(http) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/imported_numbers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/imported_numbers.py) + +Line 20. + +*** + +### create + +#### Signature + +```python +create(**kwargs = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/imported_numbers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/imported_numbers.py) + +Line 23. + +## Source + +[`signalwire/signalwire/rest/namespaces/imported_numbers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/imported_numbers.py) + +Line 17. diff --git a/fern/products/sdk-reference/python/rest/namespaces/imported-numbers/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/imported-numbers/index.mdx new file mode 100644 index 0000000000..1f39c838ba --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/imported-numbers/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/rest/namespaces/imported-numbers" +title: "imported_numbers" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.rest.namespaces.imported_numbers" + parent: "signalwire.rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/imported_numbers.py" +--- +# `imported_numbers` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module imported_numbers +``` + +## Classes + + + + Import externally-hosted phone numbers. + + + +## Source + +[`signalwire/signalwire/rest/namespaces/imported_numbers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/imported_numbers.py) diff --git a/fern/products/sdk-reference/python/rest/namespaces/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/index.mdx new file mode 100644 index 0000000000..d5042005b8 --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/index.mdx @@ -0,0 +1,120 @@ +--- +slug: "/reference/python/rest/namespaces" +title: "namespaces" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.rest.namespaces" + parent: "signalwire.rest" + module: "rest" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/__init__.py" +--- +# `namespaces` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module namespaces +``` + +## Modules + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + +## Source + +[`signalwire/signalwire/rest/namespaces/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/__init__.py) diff --git a/fern/products/sdk-reference/python/rest/namespaces/logs/conference-logs/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/logs/conference-logs/index.mdx new file mode 100644 index 0000000000..5d48553be2 --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/logs/conference-logs/index.mdx @@ -0,0 +1,53 @@ +--- +slug: "/reference/python/rest/namespaces/logs/conference-logs" +title: "ConferenceLogs" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.logs.ConferenceLogs" + parent: "signalwire.rest.namespaces.logs" + module: "rest.namespaces.logs" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/logs.py" +--- +# `ConferenceLogs` + +Conference log queries. + +## Signature + +```python +class ConferenceLogs(BaseResource) +``` + +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### list + +#### Signature + +```python +list(**params = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/logs.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/logs.py) + +Line 53. + +## Source + +[`signalwire/signalwire/rest/namespaces/logs.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/logs.py) + +Line 50. diff --git a/fern/products/sdk-reference/python/rest/namespaces/logs/fax-logs/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/logs/fax-logs/index.mdx new file mode 100644 index 0000000000..88b49148a3 --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/logs/fax-logs/index.mdx @@ -0,0 +1,73 @@ +--- +slug: "/reference/python/rest/namespaces/logs/fax-logs" +title: "FaxLogs" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.logs.FaxLogs" + parent: "signalwire.rest.namespaces.logs" + module: "rest.namespaces.logs" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/logs.py" +--- +# `FaxLogs` + +Fax log queries. + +## Signature + +```python +class FaxLogs(BaseResource) +``` + +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### get + +#### Signature + +```python +get(log_id) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/logs.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/logs.py) + +Line 46. + +*** + +### list + +#### Signature + +```python +list(**params = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/logs.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/logs.py) + +Line 43. + +## Source + +[`signalwire/signalwire/rest/namespaces/logs.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/logs.py) + +Line 40. diff --git a/fern/products/sdk-reference/python/rest/namespaces/logs/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/logs/index.mdx new file mode 100644 index 0000000000..a81bb36f91 --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/logs/index.mdx @@ -0,0 +1,56 @@ +--- +slug: "/reference/python/rest/namespaces/logs" +title: "logs" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.rest.namespaces.logs" + parent: "signalwire.rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/logs.py" +--- +# `logs` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module logs +``` + +## Classes + + + + Conference log queries. + + + + Fax log queries. + + + + Logs API namespace. + + + + Message log queries. + + + + Voice log queries. + + + +## Source + +[`signalwire/signalwire/rest/namespaces/logs.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/logs.py) diff --git a/fern/products/sdk-reference/python/rest/namespaces/logs/logs-namespace/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/logs/logs-namespace/index.mdx new file mode 100644 index 0000000000..5ff5fa78cb --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/logs/logs-namespace/index.mdx @@ -0,0 +1,59 @@ +--- +slug: "/reference/python/rest/namespaces/logs/logs-namespace" +title: "LogsNamespace" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.logs.LogsNamespace" + parent: "signalwire.rest.namespaces.logs" + module: "rest.namespaces.logs" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/logs.py" +--- +# `LogsNamespace` + +Logs API namespace. + +## Signature + +```python +class LogsNamespace +``` + +## Properties + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(http) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/logs.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/logs.py) + +Line 60. + +## Source + +[`signalwire/signalwire/rest/namespaces/logs.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/logs.py) + +Line 57. diff --git a/fern/products/sdk-reference/python/rest/namespaces/logs/message-logs/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/logs/message-logs/index.mdx new file mode 100644 index 0000000000..dddf0df728 --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/logs/message-logs/index.mdx @@ -0,0 +1,73 @@ +--- +slug: "/reference/python/rest/namespaces/logs/message-logs" +title: "MessageLogs" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.logs.MessageLogs" + parent: "signalwire.rest.namespaces.logs" + module: "rest.namespaces.logs" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/logs.py" +--- +# `MessageLogs` + +Message log queries. + +## Signature + +```python +class MessageLogs(BaseResource) +``` + +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### get + +#### Signature + +```python +get(log_id) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/logs.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/logs.py) + +Line 23. + +*** + +### list + +#### Signature + +```python +list(**params = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/logs.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/logs.py) + +Line 20. + +## Source + +[`signalwire/signalwire/rest/namespaces/logs.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/logs.py) + +Line 17. diff --git a/fern/products/sdk-reference/python/rest/namespaces/logs/voice-logs/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/logs/voice-logs/index.mdx new file mode 100644 index 0000000000..75f1f4bdcb --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/logs/voice-logs/index.mdx @@ -0,0 +1,95 @@ +--- +slug: "/reference/python/rest/namespaces/logs/voice-logs" +title: "VoiceLogs" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.logs.VoiceLogs" + parent: "signalwire.rest.namespaces.logs" + module: "rest.namespaces.logs" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/logs.py" +--- +# `VoiceLogs` + +Voice log queries. + +## Signature + +```python +class VoiceLogs(BaseResource) +``` + +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### get + +#### Signature + +```python +get(log_id) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/logs.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/logs.py) + +Line 33. + +*** + +### list + +#### Signature + +```python +list(**params = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/logs.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/logs.py) + +Line 30. + +*** + +### list\_events + +#### Signature + +```python +list_events(log_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/logs.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/logs.py) + +Line 36. + +## Source + +[`signalwire/signalwire/rest/namespaces/logs.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/logs.py) + +Line 27. diff --git a/fern/products/sdk-reference/python/rest/namespaces/lookup/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/lookup/index.mdx new file mode 100644 index 0000000000..1401c95e04 --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/lookup/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/rest/namespaces/lookup" +title: "lookup" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.rest.namespaces.lookup" + parent: "signalwire.rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/lookup.py" +--- +# `lookup` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module lookup +``` + +## Classes + + + + Phone number lookup (carrier, CNAM). + + + +## Source + +[`signalwire/signalwire/rest/namespaces/lookup.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/lookup.py) diff --git a/fern/products/sdk-reference/python/rest/namespaces/lookup/lookup-resource/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/lookup/lookup-resource/index.mdx new file mode 100644 index 0000000000..fee81c240e --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/lookup/lookup-resource/index.mdx @@ -0,0 +1,75 @@ +--- +slug: "/reference/python/rest/namespaces/lookup/lookup-resource" +title: "LookupResource" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.lookup.LookupResource" + parent: "signalwire.rest.namespaces.lookup" + module: "rest.namespaces.lookup" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/lookup.py" +--- +# `LookupResource` + +Phone number lookup (carrier, CNAM). + +## Signature + +```python +class LookupResource(BaseResource) +``` + +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(http) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/lookup.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/lookup.py) + +Line 20. + +*** + +### phone\_number + +#### Signature + +```python +phone_number(e164, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/lookup.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/lookup.py) + +Line 23. + +## Source + +[`signalwire/signalwire/rest/namespaces/lookup.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/lookup.py) + +Line 17. diff --git a/fern/products/sdk-reference/python/rest/namespaces/mfa/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/mfa/index.mdx new file mode 100644 index 0000000000..56e4a4e458 --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/mfa/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/rest/namespaces/mfa" +title: "mfa" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.rest.namespaces.mfa" + parent: "signalwire.rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/mfa.py" +--- +# `mfa` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module mfa +``` + +## Classes + + + + Multi-factor authentication via SMS or phone call. + + + +## Source + +[`signalwire/signalwire/rest/namespaces/mfa.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/mfa.py) diff --git a/fern/products/sdk-reference/python/rest/namespaces/mfa/mfa-resource/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/mfa/mfa-resource/index.mdx new file mode 100644 index 0000000000..deecbc3f68 --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/mfa/mfa-resource/index.mdx @@ -0,0 +1,115 @@ +--- +slug: "/reference/python/rest/namespaces/mfa/mfa-resource" +title: "MfaResource" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.mfa.MfaResource" + parent: "signalwire.rest.namespaces.mfa" + module: "rest.namespaces.mfa" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/mfa.py" +--- +# `MfaResource` + +Multi-factor authentication via SMS or phone call. + +## Signature + +```python +class MfaResource(BaseResource) +``` + +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(http) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/mfa.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/mfa.py) + +Line 20. + +*** + +### call + +#### Signature + +```python +call(**kwargs = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/mfa.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/mfa.py) + +Line 26. + +*** + +### sms + +#### Signature + +```python +sms(**kwargs = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/mfa.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/mfa.py) + +Line 23. + +*** + +### verify + +#### Signature + +```python +verify(request_id, **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/mfa.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/mfa.py) + +Line 29. + +## Source + +[`signalwire/signalwire/rest/namespaces/mfa.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/mfa.py) + +Line 17. diff --git a/fern/products/sdk-reference/python/rest/namespaces/number-groups/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/number-groups/index.mdx new file mode 100644 index 0000000000..f4d0c324ff --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/number-groups/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/rest/namespaces/number-groups" +title: "number_groups" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.rest.namespaces.number_groups" + parent: "signalwire.rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/number_groups.py" +--- +# `number_groups` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module number_groups +``` + +## Classes + + + + Number group management with membership operations. + + + +## Source + +[`signalwire/signalwire/rest/namespaces/number_groups.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/number_groups.py) diff --git a/fern/products/sdk-reference/python/rest/namespaces/number-groups/number-groups-resource/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/number-groups/number-groups-resource/index.mdx new file mode 100644 index 0000000000..df41d2d986 --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/number-groups/number-groups-resource/index.mdx @@ -0,0 +1,137 @@ +--- +slug: "/reference/python/rest/namespaces/number-groups/number-groups-resource" +title: "NumberGroupsResource" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.number_groups.NumberGroupsResource" + parent: "signalwire.rest.namespaces.number_groups" + module: "rest.namespaces.number_groups" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/number_groups.py" +--- +# `NumberGroupsResource` + +Number group management with membership operations. + +## Signature + +```python +class NumberGroupsResource(CrudResource) +``` + +## Inheritance + +**Extends:** `CrudResource` + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(http) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/number_groups.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/number_groups.py) + +Line 22. + +*** + +### add\_membership + +#### Signature + +```python +add_membership(group_id, **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/number_groups.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/number_groups.py) + +Line 31. + +*** + +### delete\_membership + +#### Signature + +```python +delete_membership(membership_id) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/number_groups.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/number_groups.py) + +Line 40. + +*** + +### get\_membership + +#### Signature + +```python +get_membership(membership_id) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/number_groups.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/number_groups.py) + +Line 37. + +*** + +### list\_memberships + +#### Signature + +```python +list_memberships(group_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/number_groups.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/number_groups.py) + +Line 25. + +## Source + +[`signalwire/signalwire/rest/namespaces/number_groups.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/number_groups.py) + +Line 17. diff --git a/fern/products/sdk-reference/python/rest/namespaces/phone-numbers/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/phone-numbers/index.mdx new file mode 100644 index 0000000000..2fc1297b63 --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/phone-numbers/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/rest/namespaces/phone-numbers" +title: "phone_numbers" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.rest.namespaces.phone_numbers" + parent: "signalwire.rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/phone_numbers.py" +--- +# `phone_numbers` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module phone_numbers +``` + +## Classes + + + + Phone number management. + + + +## Source + +[`signalwire/signalwire/rest/namespaces/phone_numbers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/phone_numbers.py) diff --git a/fern/products/sdk-reference/python/rest/namespaces/phone-numbers/phone-numbers-resource/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/phone-numbers/phone-numbers-resource/index.mdx new file mode 100644 index 0000000000..6a861b4164 --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/phone-numbers/phone-numbers-resource/index.mdx @@ -0,0 +1,330 @@ +--- +slug: "/reference/python/rest/namespaces/phone-numbers/phone-numbers-resource" +title: "PhoneNumbersResource" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.phone_numbers.PhoneNumbersResource" + parent: "signalwire.rest.namespaces.phone_numbers" + module: "rest.namespaces.phone_numbers" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/phone_numbers.py" +--- +# `PhoneNumbersResource` + +Phone number management. + +Supports the standard CRUD surface plus typed helpers for binding an +inbound call to a handler (SWML webhook, cXML webhook, AI agent, call +flow, RELAY application/topic). The binding model is: set +`call_handler` + the handler-specific companion field on the phone +number; the server auto-materializes the matching Fabric resource. +See :mod:`signalwire.rest.call_handler` for the enum, and the +porting-sdk's `phone-binding.md` for the full model. + +## Signature + +```python +class PhoneNumbersResource(CrudResource) +``` + +## Inheritance + +**Extends:** `CrudResource` + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(http) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/phone_numbers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/phone_numbers.py) + +Line 34. + +*** + +### search + +#### Signature + +```python +search(**params = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/phone_numbers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/phone_numbers.py) + +Line 37. + +*** + +### set\_ai\_agent + +Route inbound calls to an AI Agent Fabric resource by ID. + +#### Signature + +```python +set_ai_agent(resource_id: str, agent_id: str, **extra = {}) -> dict +``` + +#### Parameters + + + + + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/rest/namespaces/phone_numbers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/phone_numbers.py) + +Line 95. + +*** + +### set\_call\_flow + +Route inbound calls to a Call Flow by ID. + +`version` accepts `"working_copy"` or `"current_deployed"` +(server default when omitted). + +#### Signature + +```python +set_call_flow( + resource_id: str, + flow_id: str, + version: Optional[str] = None, + **extra = {} +) -> dict +``` + +#### Parameters + + + + + + + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/rest/namespaces/phone_numbers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/phone_numbers.py) + +Line 104. + +*** + +### set\_cxml\_application + +Route inbound calls to an existing cXML application by ID. + +#### Signature + +```python +set_cxml_application( + resource_id: str, + application_id: str, + **extra = {} +) -> dict +``` + +#### Parameters + + + + + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/rest/namespaces/phone_numbers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/phone_numbers.py) + +Line 86. + +*** + +### set\_cxml\_webhook + +Route inbound calls to a cXML (Twilio-compat / LAML) webhook. + +Despite the wire value `laml_webhooks` being plural, this creates +a single `cxml_webhook` Fabric resource. `fallback_url` is used +when the primary URL fails; `status_callback_url` receives call +status updates. + +#### Signature + +```python +set_cxml_webhook( + resource_id: str, + url: str, + fallback_url: Optional[str] = None, + status_callback_url: Optional[str] = None, + **extra = {} +) -> dict +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/rest/namespaces/phone_numbers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/phone_numbers.py) + +Line 60. + +*** + +### set\_relay\_application + +Route inbound calls to a named RELAY application. + +#### Signature + +```python +set_relay_application(resource_id: str, name: str, **extra = {}) -> dict +``` + +#### Parameters + + + + + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/rest/namespaces/phone_numbers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/phone_numbers.py) + +Line 125. + +*** + +### set\_relay\_topic + +Route inbound calls to a RELAY topic (client subscription). + +#### Signature + +```python +set_relay_topic( + resource_id: str, + topic: str, + status_callback_url: Optional[str] = None, + **extra = {} +) -> dict +``` + +#### Parameters + + + + + + + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/rest/namespaces/phone_numbers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/phone_numbers.py) + +Line 134. + +*** + +### set\_swml\_webhook + +Route inbound calls to an SWML webhook URL. + +Your backend returns an SWML document per call. The server +auto-creates a `swml_webhook` Fabric resource keyed off this URL. + +#### Signature + +```python +set_swml_webhook(resource_id: str, url: str, **extra = {}) -> dict +``` + +#### Parameters + + + + + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/rest/namespaces/phone_numbers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/phone_numbers.py) + +Line 47. + +## Source + +[`signalwire/signalwire/rest/namespaces/phone_numbers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/phone_numbers.py) + +Line 20. diff --git a/fern/products/sdk-reference/python/rest/namespaces/project/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/project/index.mdx new file mode 100644 index 0000000000..5c7a396ef3 --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/project/index.mdx @@ -0,0 +1,44 @@ +--- +slug: "/reference/python/rest/namespaces/project" +title: "project" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.rest.namespaces.project" + parent: "signalwire.rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/project.py" +--- +# `project` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module project +``` + +## Classes + + + + Project API namespace. + + + + Project API token management. + + + +## Source + +[`signalwire/signalwire/rest/namespaces/project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/project.py) diff --git a/fern/products/sdk-reference/python/rest/namespaces/project/project-namespace/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/project/project-namespace/index.mdx new file mode 100644 index 0000000000..6b7ea34994 --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/project/project-namespace/index.mdx @@ -0,0 +1,53 @@ +--- +slug: "/reference/python/rest/namespaces/project/project-namespace" +title: "ProjectNamespace" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.project.ProjectNamespace" + parent: "signalwire.rest.namespaces.project" + module: "rest.namespaces.project" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/project.py" +--- +# `ProjectNamespace` + +Project API namespace. + +## Signature + +```python +class ProjectNamespace +``` + +## Properties + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(http) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/project.py) + +Line 36. + +## Source + +[`signalwire/signalwire/rest/namespaces/project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/project.py) + +Line 33. diff --git a/fern/products/sdk-reference/python/rest/namespaces/project/project-tokens/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/project/project-tokens/index.mdx new file mode 100644 index 0000000000..8911e88150 --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/project/project-tokens/index.mdx @@ -0,0 +1,115 @@ +--- +slug: "/reference/python/rest/namespaces/project/project-tokens" +title: "ProjectTokens" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.project.ProjectTokens" + parent: "signalwire.rest.namespaces.project" + module: "rest.namespaces.project" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/project.py" +--- +# `ProjectTokens` + +Project API token management. + +## Signature + +```python +class ProjectTokens(BaseResource) +``` + +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(http) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/project.py) + +Line 20. + +*** + +### create + +#### Signature + +```python +create(**kwargs = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/project.py) + +Line 23. + +*** + +### delete + +#### Signature + +```python +delete(token_id) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/project.py) + +Line 29. + +*** + +### update + +#### Signature + +```python +update(token_id, **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/project.py) + +Line 26. + +## Source + +[`signalwire/signalwire/rest/namespaces/project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/project.py) + +Line 17. diff --git a/fern/products/sdk-reference/python/rest/namespaces/pubsub/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/pubsub/index.mdx new file mode 100644 index 0000000000..21f38c4f64 --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/pubsub/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/rest/namespaces/pubsub" +title: "pubsub" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.rest.namespaces.pubsub" + parent: "signalwire.rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/pubsub.py" +--- +# `pubsub` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module pubsub +``` + +## Classes + + + + PubSub token generation. + + + +## Source + +[`signalwire/signalwire/rest/namespaces/pubsub.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/pubsub.py) diff --git a/fern/products/sdk-reference/python/rest/namespaces/pubsub/pub-sub-resource/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/pubsub/pub-sub-resource/index.mdx new file mode 100644 index 0000000000..236b793634 --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/pubsub/pub-sub-resource/index.mdx @@ -0,0 +1,73 @@ +--- +slug: "/reference/python/rest/namespaces/pubsub/pub-sub-resource" +title: "PubSubResource" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.pubsub.PubSubResource" + parent: "signalwire.rest.namespaces.pubsub" + module: "rest.namespaces.pubsub" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/pubsub.py" +--- +# `PubSubResource` + +PubSub token generation. + +## Signature + +```python +class PubSubResource(BaseResource) +``` + +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(http) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/pubsub.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/pubsub.py) + +Line 20. + +*** + +### create\_token + +#### Signature + +```python +create_token(**kwargs = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/pubsub.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/pubsub.py) + +Line 23. + +## Source + +[`signalwire/signalwire/rest/namespaces/pubsub.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/pubsub.py) + +Line 17. diff --git a/fern/products/sdk-reference/python/rest/namespaces/queues/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/queues/index.mdx new file mode 100644 index 0000000000..355b515274 --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/queues/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/rest/namespaces/queues" +title: "queues" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.rest.namespaces.queues" + parent: "signalwire.rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/queues.py" +--- +# `queues` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module queues +``` + +## Classes + + + + Queue management with member operations. + + + +## Source + +[`signalwire/signalwire/rest/namespaces/queues.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/queues.py) diff --git a/fern/products/sdk-reference/python/rest/namespaces/queues/queues-resource/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/queues/queues-resource/index.mdx new file mode 100644 index 0000000000..bac9fabf4d --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/queues/queues-resource/index.mdx @@ -0,0 +1,117 @@ +--- +slug: "/reference/python/rest/namespaces/queues/queues-resource" +title: "QueuesResource" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.queues.QueuesResource" + parent: "signalwire.rest.namespaces.queues" + module: "rest.namespaces.queues" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/queues.py" +--- +# `QueuesResource` + +Queue management with member operations. + +## Signature + +```python +class QueuesResource(CrudResource) +``` + +## Inheritance + +**Extends:** `CrudResource` + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(http) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/queues.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/queues.py) + +Line 22. + +*** + +### get\_member + +#### Signature + +```python +get_member(queue_id, member_id) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/queues.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/queues.py) + +Line 31. + +*** + +### get\_next\_member + +#### Signature + +```python +get_next_member(queue_id) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/queues.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/queues.py) + +Line 28. + +*** + +### list\_members + +#### Signature + +```python +list_members(queue_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/queues.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/queues.py) + +Line 25. + +## Source + +[`signalwire/signalwire/rest/namespaces/queues.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/queues.py) + +Line 17. diff --git a/fern/products/sdk-reference/python/rest/namespaces/recordings/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/recordings/index.mdx new file mode 100644 index 0000000000..f8776834e3 --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/recordings/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/rest/namespaces/recordings" +title: "recordings" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.rest.namespaces.recordings" + parent: "signalwire.rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/recordings.py" +--- +# `recordings` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module recordings +``` + +## Classes + + + + Recording management (read-only + delete). + + + +## Source + +[`signalwire/signalwire/rest/namespaces/recordings.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/recordings.py) diff --git a/fern/products/sdk-reference/python/rest/namespaces/recordings/recordings-resource/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/recordings/recordings-resource/index.mdx new file mode 100644 index 0000000000..be382eb7bd --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/recordings/recordings-resource/index.mdx @@ -0,0 +1,113 @@ +--- +slug: "/reference/python/rest/namespaces/recordings/recordings-resource" +title: "RecordingsResource" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.recordings.RecordingsResource" + parent: "signalwire.rest.namespaces.recordings" + module: "rest.namespaces.recordings" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/recordings.py" +--- +# `RecordingsResource` + +Recording management (read-only + delete). + +## Signature + +```python +class RecordingsResource(BaseResource) +``` + +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(http) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/recordings.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/recordings.py) + +Line 20. + +*** + +### delete + +#### Signature + +```python +delete(recording_id) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/recordings.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/recordings.py) + +Line 29. + +*** + +### get + +#### Signature + +```python +get(recording_id) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/recordings.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/recordings.py) + +Line 26. + +*** + +### list + +#### Signature + +```python +list(**params = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/recordings.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/recordings.py) + +Line 23. + +## Source + +[`signalwire/signalwire/rest/namespaces/recordings.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/recordings.py) + +Line 17. diff --git a/fern/products/sdk-reference/python/rest/namespaces/registry/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/registry/index.mdx new file mode 100644 index 0000000000..44e87b10f5 --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/registry/index.mdx @@ -0,0 +1,56 @@ +--- +slug: "/reference/python/rest/namespaces/registry" +title: "registry" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.rest.namespaces.registry" + parent: "signalwire.rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py" +--- +# `registry` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module registry +``` + +## Classes + + + + 10DLC brand management. + + + + 10DLC campaign management. + + + + 10DLC Campaign Registry namespace. + + + + 10DLC number assignment management. + + + + 10DLC assignment order management. + + + +## Source + +[`signalwire/signalwire/rest/namespaces/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py) diff --git a/fern/products/sdk-reference/python/rest/namespaces/registry/registry-brands/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/registry/registry-brands/index.mdx new file mode 100644 index 0000000000..9138d55d3b --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/registry/registry-brands/index.mdx @@ -0,0 +1,137 @@ +--- +slug: "/reference/python/rest/namespaces/registry/registry-brands" +title: "RegistryBrands" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.registry.RegistryBrands" + parent: "signalwire.rest.namespaces.registry" + module: "rest.namespaces.registry" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py" +--- +# `RegistryBrands` + +10DLC brand management. + +## Signature + +```python +class RegistryBrands(BaseResource) +``` + +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### create + +#### Signature + +```python +create(**kwargs = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py) + +Line 23. + +*** + +### create\_campaign + +#### Signature + +```python +create_campaign(brand_id, **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py) + +Line 32. + +*** + +### get + +#### Signature + +```python +get(brand_id) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py) + +Line 26. + +*** + +### list + +#### Signature + +```python +list(**params = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py) + +Line 20. + +*** + +### list\_campaigns + +#### Signature + +```python +list_campaigns(brand_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py) + +Line 29. + +## Source + +[`signalwire/signalwire/rest/namespaces/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py) + +Line 17. diff --git a/fern/products/sdk-reference/python/rest/namespaces/registry/registry-campaigns/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/registry/registry-campaigns/index.mdx new file mode 100644 index 0000000000..ec90698d08 --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/registry/registry-campaigns/index.mdx @@ -0,0 +1,141 @@ +--- +slug: "/reference/python/rest/namespaces/registry/registry-campaigns" +title: "RegistryCampaigns" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.registry.RegistryCampaigns" + parent: "signalwire.rest.namespaces.registry" + module: "rest.namespaces.registry" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py" +--- +# `RegistryCampaigns` + +10DLC campaign management. + +## Signature + +```python +class RegistryCampaigns(BaseResource) +``` + +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### create\_order + +#### Signature + +```python +create_order(campaign_id, **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py) + +Line 51. + +*** + +### get + +#### Signature + +```python +get(campaign_id) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py) + +Line 39. + +*** + +### list\_numbers + +#### Signature + +```python +list_numbers(campaign_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py) + +Line 45. + +*** + +### list\_orders + +#### Signature + +```python +list_orders(campaign_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py) + +Line 48. + +*** + +### update + +#### Signature + +```python +update(campaign_id, **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py) + +Line 42. + +## Source + +[`signalwire/signalwire/rest/namespaces/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py) + +Line 36. diff --git a/fern/products/sdk-reference/python/rest/namespaces/registry/registry-namespace/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/registry/registry-namespace/index.mdx new file mode 100644 index 0000000000..0cca43394b --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/registry/registry-namespace/index.mdx @@ -0,0 +1,59 @@ +--- +slug: "/reference/python/rest/namespaces/registry/registry-namespace" +title: "RegistryNamespace" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.registry.RegistryNamespace" + parent: "signalwire.rest.namespaces.registry" + module: "rest.namespaces.registry" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py" +--- +# `RegistryNamespace` + +10DLC Campaign Registry namespace. + +## Signature + +```python +class RegistryNamespace +``` + +## Properties + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(http) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py) + +Line 72. + +## Source + +[`signalwire/signalwire/rest/namespaces/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py) + +Line 69. diff --git a/fern/products/sdk-reference/python/rest/namespaces/registry/registry-numbers/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/registry/registry-numbers/index.mdx new file mode 100644 index 0000000000..f77b1b5f90 --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/registry/registry-numbers/index.mdx @@ -0,0 +1,53 @@ +--- +slug: "/reference/python/rest/namespaces/registry/registry-numbers" +title: "RegistryNumbers" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.registry.RegistryNumbers" + parent: "signalwire.rest.namespaces.registry" + module: "rest.namespaces.registry" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py" +--- +# `RegistryNumbers` + +10DLC number assignment management. + +## Signature + +```python +class RegistryNumbers(BaseResource) +``` + +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### delete + +#### Signature + +```python +delete(number_id) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py) + +Line 65. + +## Source + +[`signalwire/signalwire/rest/namespaces/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py) + +Line 62. diff --git a/fern/products/sdk-reference/python/rest/namespaces/registry/registry-orders/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/registry/registry-orders/index.mdx new file mode 100644 index 0000000000..9755a2ed14 --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/registry/registry-orders/index.mdx @@ -0,0 +1,53 @@ +--- +slug: "/reference/python/rest/namespaces/registry/registry-orders" +title: "RegistryOrders" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.registry.RegistryOrders" + parent: "signalwire.rest.namespaces.registry" + module: "rest.namespaces.registry" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py" +--- +# `RegistryOrders` + +10DLC assignment order management. + +## Signature + +```python +class RegistryOrders(BaseResource) +``` + +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### get + +#### Signature + +```python +get(order_id) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py) + +Line 58. + +## Source + +[`signalwire/signalwire/rest/namespaces/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py) + +Line 55. diff --git a/fern/products/sdk-reference/python/rest/namespaces/short-codes/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/short-codes/index.mdx new file mode 100644 index 0000000000..c6f188fdd3 --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/short-codes/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/rest/namespaces/short-codes" +title: "short_codes" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.rest.namespaces.short_codes" + parent: "signalwire.rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/short_codes.py" +--- +# `short_codes` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module short_codes +``` + +## Classes + + + + Short code management (read + update only). + + + +## Source + +[`signalwire/signalwire/rest/namespaces/short_codes.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/short_codes.py) diff --git a/fern/products/sdk-reference/python/rest/namespaces/short-codes/short-codes-resource/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/short-codes/short-codes-resource/index.mdx new file mode 100644 index 0000000000..d0f64fbc6d --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/short-codes/short-codes-resource/index.mdx @@ -0,0 +1,115 @@ +--- +slug: "/reference/python/rest/namespaces/short-codes/short-codes-resource" +title: "ShortCodesResource" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.short_codes.ShortCodesResource" + parent: "signalwire.rest.namespaces.short_codes" + module: "rest.namespaces.short_codes" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/short_codes.py" +--- +# `ShortCodesResource` + +Short code management (read + update only). + +## Signature + +```python +class ShortCodesResource(BaseResource) +``` + +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(http) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/short_codes.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/short_codes.py) + +Line 20. + +*** + +### get + +#### Signature + +```python +get(short_code_id) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/short_codes.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/short_codes.py) + +Line 26. + +*** + +### list + +#### Signature + +```python +list(**params = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/short_codes.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/short_codes.py) + +Line 23. + +*** + +### update + +#### Signature + +```python +update(short_code_id, **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/short_codes.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/short_codes.py) + +Line 29. + +## Source + +[`signalwire/signalwire/rest/namespaces/short_codes.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/short_codes.py) + +Line 17. diff --git a/fern/products/sdk-reference/python/rest/namespaces/sip-profile/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/sip-profile/index.mdx new file mode 100644 index 0000000000..f4d79ec58a --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/sip-profile/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/rest/namespaces/sip-profile" +title: "sip_profile" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.rest.namespaces.sip_profile" + parent: "signalwire.rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/sip_profile.py" +--- +# `sip_profile` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module sip_profile +``` + +## Classes + + + + Project SIP profile (singleton resource). + + + +## Source + +[`signalwire/signalwire/rest/namespaces/sip_profile.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/sip_profile.py) diff --git a/fern/products/sdk-reference/python/rest/namespaces/sip-profile/sip-profile-resource/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/sip-profile/sip-profile-resource/index.mdx new file mode 100644 index 0000000000..4c41e1154c --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/sip-profile/sip-profile-resource/index.mdx @@ -0,0 +1,89 @@ +--- +slug: "/reference/python/rest/namespaces/sip-profile/sip-profile-resource" +title: "SipProfileResource" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.sip_profile.SipProfileResource" + parent: "signalwire.rest.namespaces.sip_profile" + module: "rest.namespaces.sip_profile" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/sip_profile.py" +--- +# `SipProfileResource` + +Project SIP profile (singleton resource). + +## Signature + +```python +class SipProfileResource(BaseResource) +``` + +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(http) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/sip_profile.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/sip_profile.py) + +Line 20. + +*** + +### get + +#### Signature + +```python +get() +``` + +#### Source + +[`signalwire/signalwire/rest/namespaces/sip_profile.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/sip_profile.py) + +Line 23. + +*** + +### update + +#### Signature + +```python +update(**kwargs = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/sip_profile.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/sip_profile.py) + +Line 26. + +## Source + +[`signalwire/signalwire/rest/namespaces/sip_profile.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/sip_profile.py) + +Line 17. diff --git a/fern/products/sdk-reference/python/rest/namespaces/verified-callers/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/verified-callers/index.mdx new file mode 100644 index 0000000000..9f781ee64a --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/verified-callers/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/python/rest/namespaces/verified-callers" +title: "verified_callers" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.rest.namespaces.verified_callers" + parent: "signalwire.rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/verified_callers.py" +--- +# `verified_callers` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module verified_callers +``` + +## Classes + + + + Verified caller ID management with verification flow. + + + +## Source + +[`signalwire/signalwire/rest/namespaces/verified_callers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/verified_callers.py) diff --git a/fern/products/sdk-reference/python/rest/namespaces/verified-callers/verified-callers-resource/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/verified-callers/verified-callers-resource/index.mdx new file mode 100644 index 0000000000..6665125114 --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/verified-callers/verified-callers-resource/index.mdx @@ -0,0 +1,95 @@ +--- +slug: "/reference/python/rest/namespaces/verified-callers/verified-callers-resource" +title: "VerifiedCallersResource" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.verified_callers.VerifiedCallersResource" + parent: "signalwire.rest.namespaces.verified_callers" + module: "rest.namespaces.verified_callers" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/verified_callers.py" +--- +# `VerifiedCallersResource` + +Verified caller ID management with verification flow. + +## Signature + +```python +class VerifiedCallersResource(CrudResource) +``` + +## Inheritance + +**Extends:** `CrudResource` + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(http) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/verified_callers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/verified_callers.py) + +Line 22. + +*** + +### redial\_verification + +#### Signature + +```python +redial_verification(caller_id) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/verified_callers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/verified_callers.py) + +Line 25. + +*** + +### submit\_verification + +#### Signature + +```python +submit_verification(caller_id, **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/verified_callers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/verified_callers.py) + +Line 28. + +## Source + +[`signalwire/signalwire/rest/namespaces/verified_callers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/verified_callers.py) + +Line 17. diff --git a/fern/products/sdk-reference/python/rest/namespaces/video/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/video/index.mdx new file mode 100644 index 0000000000..2e848a8510 --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/video/index.mdx @@ -0,0 +1,68 @@ +--- +slug: "/reference/python/rest/namespaces/video" +title: "video" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "signalwire.rest.namespaces.video" + parent: "signalwire.rest.namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py" +--- +# `video` + +Copyright (c) 2025 SignalWire + +This file is part of the SignalWire SDK. + +Licensed under the MIT License. +See LICENSE file in the project root for full license information. + +## Signature + +```python +module video +``` + +## Classes + + + + Video conference management with tokens and streams. + + + + Video conference token management. + + + + Video API namespace. + + + + Video room recording management. + + + + Video room management with streams. + + + + Video room session management. + + + + Video room token generation. + + + + Video stream management. + + + +## Source + +[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) diff --git a/fern/products/sdk-reference/python/rest/namespaces/video/video-conference-tokens/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/video/video-conference-tokens/index.mdx new file mode 100644 index 0000000000..78253fef8a --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/video/video-conference-tokens/index.mdx @@ -0,0 +1,73 @@ +--- +slug: "/reference/python/rest/namespaces/video/video-conference-tokens" +title: "VideoConferenceTokens" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.video.VideoConferenceTokens" + parent: "signalwire.rest.namespaces.video" + module: "rest.namespaces.video" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py" +--- +# `VideoConferenceTokens` + +Video conference token management. + +## Signature + +```python +class VideoConferenceTokens(BaseResource) +``` + +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### get + +#### Signature + +```python +get(token_id) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) + +Line 92. + +*** + +### reset + +#### Signature + +```python +reset(token_id) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) + +Line 95. + +## Source + +[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) + +Line 89. diff --git a/fern/products/sdk-reference/python/rest/namespaces/video/video-conferences/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/video/video-conferences/index.mdx new file mode 100644 index 0000000000..1e9cd1fd2c --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/video/video-conferences/index.mdx @@ -0,0 +1,99 @@ +--- +slug: "/reference/python/rest/namespaces/video/video-conferences" +title: "VideoConferences" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.video.VideoConferences" + parent: "signalwire.rest.namespaces.video" + module: "rest.namespaces.video" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py" +--- +# `VideoConferences` + +Video conference management with tokens and streams. + +## Signature + +```python +class VideoConferences(CrudResource) +``` + +## Inheritance + +**Extends:** `CrudResource` + +## Methods + +### create\_stream + +#### Signature + +```python +create_stream(conference_id, **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) + +Line 85. + +*** + +### list\_conference\_tokens + +#### Signature + +```python +list_conference_tokens(conference_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) + +Line 76. + +*** + +### list\_streams + +#### Signature + +```python +list_streams(conference_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) + +Line 82. + +## Source + +[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) + +Line 71. diff --git a/fern/products/sdk-reference/python/rest/namespaces/video/video-namespace/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/video/video-namespace/index.mdx new file mode 100644 index 0000000000..c4e137bdc6 --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/video/video-namespace/index.mdx @@ -0,0 +1,65 @@ +--- +slug: "/reference/python/rest/namespaces/video/video-namespace" +title: "VideoNamespace" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.video.VideoNamespace" + parent: "signalwire.rest.namespaces.video" + module: "rest.namespaces.video" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py" +--- +# `VideoNamespace` + +Video API namespace. + +## Signature + +```python +class VideoNamespace +``` + +## Properties + + + + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(http) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) + +Line 115. + +## Source + +[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) + +Line 112. diff --git a/fern/products/sdk-reference/python/rest/namespaces/video/video-room-recordings/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/video/video-room-recordings/index.mdx new file mode 100644 index 0000000000..a0fcb82a35 --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/video/video-room-recordings/index.mdx @@ -0,0 +1,115 @@ +--- +slug: "/reference/python/rest/namespaces/video/video-room-recordings" +title: "VideoRoomRecordings" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.video.VideoRoomRecordings" + parent: "signalwire.rest.namespaces.video" + module: "rest.namespaces.video" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py" +--- +# `VideoRoomRecordings` + +Video room recording management. + +## Signature + +```python +class VideoRoomRecordings(BaseResource) +``` + +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### delete + +#### Signature + +```python +delete(recording_id) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) + +Line 64. + +*** + +### get + +#### Signature + +```python +get(recording_id) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) + +Line 61. + +*** + +### list + +#### Signature + +```python +list(**params = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) + +Line 58. + +*** + +### list\_events + +#### Signature + +```python +list_events(recording_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) + +Line 67. + +## Source + +[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) + +Line 55. diff --git a/fern/products/sdk-reference/python/rest/namespaces/video/video-room-sessions/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/video/video-room-sessions/index.mdx new file mode 100644 index 0000000000..3635143b24 --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/video/video-room-sessions/index.mdx @@ -0,0 +1,139 @@ +--- +slug: "/reference/python/rest/namespaces/video/video-room-sessions" +title: "VideoRoomSessions" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.video.VideoRoomSessions" + parent: "signalwire.rest.namespaces.video" + module: "rest.namespaces.video" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py" +--- +# `VideoRoomSessions` + +Video room session management. + +## Signature + +```python +class VideoRoomSessions(BaseResource) +``` + +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### get + +#### Signature + +```python +get(session_id) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) + +Line 42. + +*** + +### list + +#### Signature + +```python +list(**params = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) + +Line 39. + +*** + +### list\_events + +#### Signature + +```python +list_events(session_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) + +Line 45. + +*** + +### list\_members + +#### Signature + +```python +list_members(session_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) + +Line 48. + +*** + +### list\_recordings + +#### Signature + +```python +list_recordings(session_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) + +Line 51. + +## Source + +[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) + +Line 36. diff --git a/fern/products/sdk-reference/python/rest/namespaces/video/video-room-tokens/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/video/video-room-tokens/index.mdx new file mode 100644 index 0000000000..3d8410efbe --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/video/video-room-tokens/index.mdx @@ -0,0 +1,53 @@ +--- +slug: "/reference/python/rest/namespaces/video/video-room-tokens" +title: "VideoRoomTokens" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.video.VideoRoomTokens" + parent: "signalwire.rest.namespaces.video" + module: "rest.namespaces.video" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py" +--- +# `VideoRoomTokens` + +Video room token generation. + +## Signature + +```python +class VideoRoomTokens(BaseResource) +``` + +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### create + +#### Signature + +```python +create(**kwargs = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) + +Line 32. + +## Source + +[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) + +Line 29. diff --git a/fern/products/sdk-reference/python/rest/namespaces/video/video-rooms/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/video/video-rooms/index.mdx new file mode 100644 index 0000000000..610042de98 --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/video/video-rooms/index.mdx @@ -0,0 +1,77 @@ +--- +slug: "/reference/python/rest/namespaces/video/video-rooms" +title: "VideoRooms" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.video.VideoRooms" + parent: "signalwire.rest.namespaces.video" + module: "rest.namespaces.video" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py" +--- +# `VideoRooms` + +Video room management with streams. + +## Signature + +```python +class VideoRooms(CrudResource) +``` + +## Inheritance + +**Extends:** `CrudResource` + +## Methods + +### create\_stream + +#### Signature + +```python +create_stream(room_id, **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) + +Line 25. + +*** + +### list\_streams + +#### Signature + +```python +list_streams(room_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) + +Line 22. + +## Source + +[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) + +Line 17. diff --git a/fern/products/sdk-reference/python/rest/namespaces/video/video-streams/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/video/video-streams/index.mdx new file mode 100644 index 0000000000..15735b3a72 --- /dev/null +++ b/fern/products/sdk-reference/python/rest/namespaces/video/video-streams/index.mdx @@ -0,0 +1,95 @@ +--- +slug: "/reference/python/rest/namespaces/video/video-streams" +title: "VideoStreams" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "class" + language: "python" + qualified_name: "signalwire.rest.namespaces.video.VideoStreams" + parent: "signalwire.rest.namespaces.video" + module: "rest.namespaces.video" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py" +--- +# `VideoStreams` + +Video stream management. + +## Signature + +```python +class VideoStreams(BaseResource) +``` + +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### delete + +#### Signature + +```python +delete(stream_id) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) + +Line 108. + +*** + +### get + +#### Signature + +```python +get(stream_id) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) + +Line 102. + +*** + +### update + +#### Signature + +```python +update(stream_id, **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) + +Line 105. + +## Source + +[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) + +Line 99. diff --git a/fern/products/sdk-reference/python/signalwire/agent-server/agent-server/index.mdx b/fern/products/sdk-reference/python/signalwire/agent-server/agent-server/index.mdx deleted file mode 100644 index 9249f14392..0000000000 --- a/fern/products/sdk-reference/python/signalwire/agent-server/agent-server/index.mdx +++ /dev/null @@ -1,403 +0,0 @@ ---- -slug: "/reference/python/signalwire/agent-server/agent-server" -title: "AgentServer" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.agent_server.AgentServer" - parent: "signalwire.agent_server" - module: "signalwire.agent_server" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/agent_server.py" ---- -# `AgentServer` - -Server for hosting multiple SignalWire AI Agents under a single FastAPI application. - -This allows you to run multiple agents on different routes of the same server, -which is useful for deployment and resource management. - -> \[!NOTE] -> server = AgentServer() -> server.register(SupportAgent(), "/support") -> server.register(SalesAgent(), "/sales") -> server.run() - -## Signature - -```python -class AgentServer -``` - -## Properties - - - - - - - - - - - - - -## Methods - -### \_\_init\_\_ - -Initialize a new agent server - -#### Signature - -```python -__init__(host: str = '0.0.0.0', port: int = 3000, log_level: str = 'info') -``` - -#### Parameters - - - Host to bind the server to - - - - Port to bind the server to - - - - Logging level (debug, info, warning, error, critical) - - -#### Source - -[`signalwire/signalwire/agent_server.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/agent_server.py) - -Line 45. - -*** - -### get\_agent - -Get an agent by route - -#### Signature - -```python -get_agent(route: str) -> Optional[AgentBase] -``` - -#### Parameters - - - The route of the agent - - -#### Returns - -`Optional[AgentBase]` — The agent or None if not found - -#### Source - -[`signalwire/signalwire/agent_server.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/agent_server.py) - -Line 310. - -*** - -### get\_agents - -Get all registered agents - -#### Signature - -```python -get_agents() -> List[Tuple[str, AgentBase]] -``` - -#### Returns - -`List[Tuple[str, AgentBase]]` — List of (route, agent) tuples - -#### Source - -[`signalwire/signalwire/agent_server.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/agent_server.py) - -Line 301. - -*** - -### register - -Register an agent with the server - -#### Signature - -```python -register(agent: AgentBase, route: Optional[str] = None) -> None -``` - -#### Parameters - - - The agent to register - - - - Optional route to override the agent's default route - - -#### Returns - -`None` - -#### Throws - -- `ValueError` — If the route is already in use - -#### Source - -[`signalwire/signalwire/agent_server.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/agent_server.py) - -Line 102. - -*** - -### register\_global\_routing\_callback - -Register a routing callback across all agents - -This allows you to add unified routing logic to all agents at the same path. - -#### Signature - -```python -register_global_routing_callback( - callback_fn: Callable[Request, Dict[str, Any], Optional[str]], - path: str -) -> None -``` - -#### Parameters - - - The callback function to register - - - - The path to register the callback at - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/agent_server.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/agent_server.py) - -Line 652. - -*** - -### register\_sip\_username - -Register a mapping from SIP username to agent route - -#### Signature - -```python -register_sip_username(username: str, route: str) -> None -``` - -#### Parameters - - - The SIP username - - - - The route to the agent - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/agent_server.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/agent_server.py) - -Line 210. - -*** - -### run - -Universal run method that automatically detects environment and handles accordingly - -Detects execution mode and routes appropriately: - -- Server mode: Starts uvicorn server with FastAPI -- CGI mode: Uses same routing logic but outputs CGI headers -- Lambda mode: Uses same routing logic but returns Lambda response - -#### Signature - -```python -run( - event = None, - context = None, - host: Optional[str] = None, - port: Optional[int] = None -) -> Any -``` - -#### Parameters - - - Serverless event object (Lambda, Cloud Functions) - - - - Serverless context object (Lambda, Cloud Functions) - - - - Optional host to override the default (server mode only) - - - - Optional port to override the default (server mode only) - - -#### Returns - -`Any` — Response for serverless modes, None for server mode - -#### Source - -[`signalwire/signalwire/agent_server.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/agent_server.py) - -Line 328. - -*** - -### serve\_static\_files - -Serve static files from a directory. - -This method properly integrates static file serving with agent routes, -ensuring that agent routes take priority over static files. - -Unlike using StaticFiles.mount("/", ...) directly on self.app, this method -uses explicit route handlers that work correctly with agent routes. - -> \[!NOTE] -> server = AgentServer() -> server.register(SupportAgent(), "/support") -> server.serve\_static\_files("./web") # Serves at / -> -> ### /support -> SupportAgent -> -> ### /index.html -> ./web/index.html -> -> ### / -> ./web/index.html - -#### Signature - -```python -serve_static_files(directory: str, route: str = '/') -> None -``` - -#### Parameters - - - Path to the directory containing static files - - - - URL path prefix for static files (default: "/" for root) - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/agent_server.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/agent_server.py) - -Line 675. - -*** - -### setup\_sip\_routing - -Set up central SIP-based routing for the server - -This configures all agents to handle SIP requests at the specified path, -using a coordinated routing system where each agent checks if it can -handle SIP requests for specific usernames. - -#### Signature - -```python -setup_sip_routing(route: str = '/sip', auto_map: bool = True) -> None -``` - -#### Parameters - - - The path for SIP routing (default: "/sip") - - - - Whether to automatically map SIP usernames to agent routes - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/agent_server.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/agent_server.py) - -Line 147. - -*** - -### unregister - -Unregister an agent from the server - -#### Signature - -```python -unregister(route: str) -> bool -``` - -#### Parameters - - - The route of the agent to unregister - - -#### Returns - -`bool` — True if the agent was unregistered, False if not found - -#### Source - -[`signalwire/signalwire/agent_server.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/agent_server.py) - -Line 274. - -## Source - -[`signalwire/signalwire/agent_server.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/agent_server.py) - -Line 31. diff --git a/fern/products/sdk-reference/python/signalwire/agent-server/index.mdx b/fern/products/sdk-reference/python/signalwire/agent-server/index.mdx deleted file mode 100644 index f8ffa07256..0000000000 --- a/fern/products/sdk-reference/python/signalwire/agent-server/index.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -slug: "/reference/python/signalwire/agent-server" -title: "agent_server" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.agent_server" - parent: "signalwire" - module: "signalwire" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/agent_server.py" ---- -# `agent_server` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module agent_server -``` - -## Classes - - - - Server for hosting multiple SignalWire AI Agents under a single FastAPI application. - - - -## Source - -[`signalwire/signalwire/agent_server.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/agent_server.py) diff --git a/fern/products/sdk-reference/python/signalwire/cli/build-search/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/build-search/index.mdx deleted file mode 100644 index 52de4851b6..0000000000 --- a/fern/products/sdk-reference/python/signalwire/cli/build-search/index.mdx +++ /dev/null @@ -1,140 +0,0 @@ ---- -slug: "/reference/python/signalwire/cli/build-search" -title: "build_search" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.cli.build_search" - parent: "signalwire.cli" - module: "signalwire.cli" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/build_search.py" ---- -# `build_search` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module build_search -``` - -## Functions - -### console\_entry\_point - -Console script entry point for pip installation - -#### Signature - -```python -console_entry_point() -``` - -#### Source - -[`signalwire/signalwire/cli/build_search.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/build_search.py) - -Line 1238. - -*** - -### main - -Main entry point for the build-search command - -#### Signature - -```python -main() -``` - -#### Source - -[`signalwire/signalwire/cli/build_search.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/build_search.py) - -Line 34. - -*** - -### migrate\_command - -Migrate search indexes between backends - -#### Signature - -```python -migrate_command() -``` - -#### Source - -[`signalwire/signalwire/cli/build_search.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/build_search.py) - -Line 967. - -*** - -### remote\_command - -Search via remote API endpoint - -#### Signature - -```python -remote_command() -``` - -#### Source - -[`signalwire/signalwire/cli/build_search.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/build_search.py) - -Line 1103. - -*** - -### search\_command - -Search within an existing search index - -#### Signature - -```python -search_command() -``` - -#### Source - -[`signalwire/signalwire/cli/build_search.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/build_search.py) - -Line 659. - -*** - -### validate\_command - -Validate an existing search index - -#### Signature - -```python -validate_command() -``` - -#### Source - -[`signalwire/signalwire/cli/build_search.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/build_search.py) - -Line 621. - -## Source - -[`signalwire/signalwire/cli/build_search.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/build_search.py) diff --git a/fern/products/sdk-reference/python/signalwire/cli/config/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/config/index.mdx deleted file mode 100644 index e10c749376..0000000000 --- a/fern/products/sdk-reference/python/signalwire/cli/config/index.mdx +++ /dev/null @@ -1,80 +0,0 @@ ---- -slug: "/reference/python/signalwire/cli/config" -title: "config" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.cli.config" - parent: "signalwire.cli" - module: "signalwire.cli" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/config.py" ---- -# `config` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module config -``` - -## Constants - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -## Source - -[`signalwire/signalwire/cli/config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/config.py) diff --git a/fern/products/sdk-reference/python/signalwire/cli/core/agent-loader/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/core/agent-loader/index.mdx deleted file mode 100644 index fefe7afd3f..0000000000 --- a/fern/products/sdk-reference/python/signalwire/cli/core/agent-loader/index.mdx +++ /dev/null @@ -1,186 +0,0 @@ ---- -slug: "/reference/python/signalwire/cli/core/agent-loader" -title: "agent_loader" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.cli.core.agent_loader" - parent: "signalwire.cli.core" - module: "signalwire.cli.core" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/agent_loader.py" ---- -# `agent_loader` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module agent_loader -``` - -## Constants - - - - - - - -## Functions - -### discover\_agents\_in\_file - -Backward compatibility wrapper - discovers agents in a file - -#### Signature - -```python -discover_agents_in_file(agent_path: str) -> List[Dict[str, Any]] -``` - -#### Parameters - - - Path to the Python file containing agents - - -#### Returns - -`List[Dict[str, Any]]` — List of dictionaries with agent information - -#### Source - -[`signalwire/signalwire/cli/core/agent_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/agent_loader.py) - -Line 59. - -*** - -### discover\_services\_in\_file - -Discover all available SWML services (including agents) in a Python file without instantiating them - -#### Signature - -```python -discover_services_in_file(service_path: str) -> List[Dict[str, Any]] -``` - -#### Parameters - - - Path to the Python file containing services - - -#### Returns - -`List[Dict[str, Any]]` — List of dictionaries with service information - -#### Throws - -- `ImportError` — If the file cannot be imported -- `FileNotFoundError` — If the file doesn't exist - -#### Source - -[`signalwire/signalwire/cli/core/agent_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/agent_loader.py) - -Line 38. - -*** - -### load\_agent\_from\_file - -Load an agent from a Python file - -#### Signature - -```python -load_agent_from_file( - agent_path: str, - agent_class_name: Optional[str] = None -) -> AgentBase -``` - -#### Parameters - - - Path to the Python file containing the agent - - - - Optional name of the agent class to instantiate - - -#### Returns - -`AgentBase` — AgentBase instance - -#### Throws - -- `ImportError` — If the file cannot be imported -- `ValueError` — If no agent is found in the file - -#### Source - -[`signalwire/signalwire/cli/core/agent_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/agent_loader.py) - -Line 193. - -*** - -### load\_service\_from\_file - -Load a SWML service from a Python file - -#### Signature - -```python -load_service_from_file( - service_path: str, - service_identifier: Optional[str] = None, - prefer_route: bool = True -) -> SWMLService -``` - -#### Parameters - - - Path to the Python file containing the service - - - - Optional service identifier - can be class name or route - - - - If True, interpret identifier as route first, then class name - - -#### Returns - -`SWMLService` — SWMLService instance (could be AgentBase or basic SWMLService) - -#### Throws - -- `ImportError` — If the file cannot be imported -- `ValueError` — If no service is found in the file - -#### Source - -[`signalwire/signalwire/cli/core/agent_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/agent_loader.py) - -Line 170. - -## Source - -[`signalwire/signalwire/cli/core/agent_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/agent_loader.py) diff --git a/fern/products/sdk-reference/python/signalwire/cli/core/argparse-helpers/custom-argument-parser/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/core/argparse-helpers/custom-argument-parser/index.mdx deleted file mode 100644 index 6a183c242f..0000000000 --- a/fern/products/sdk-reference/python/signalwire/cli/core/argparse-helpers/custom-argument-parser/index.mdx +++ /dev/null @@ -1,123 +0,0 @@ ---- -slug: "/reference/python/signalwire/cli/core/argparse-helpers/custom-argument-parser" -title: "CustomArgumentParser" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.cli.core.argparse_helpers.CustomArgumentParser" - parent: "signalwire.cli.core.argparse_helpers" - module: "signalwire.cli.core.argparse_helpers" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/argparse_helpers.py" ---- -# `CustomArgumentParser` - -Custom ArgumentParser with better error handling - -## Signature - -```python -class CustomArgumentParser(argparse.ArgumentParser) -``` - -## Inheritance - -**Extends:** `argparse.ArgumentParser` - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(*args = (), **kwargs = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/cli/core/argparse_helpers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/argparse_helpers.py) - -Line 23. - -*** - -### error - -Override error method to provide user-friendly error messages - -#### Signature - -```python -error(message) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/cli/core/argparse_helpers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/argparse_helpers.py) - -Line 33. - -*** - -### parse\_args - -Override parse\_args to provide custom error handling for missing arguments - -#### Signature - -```python -parse_args(args = None, namespace = None) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/cli/core/argparse_helpers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/argparse_helpers.py) - -Line 58. - -*** - -### print\_usage - -Override print\_usage to suppress output when we want custom error handling - -#### Signature - -```python -print_usage(file = None) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/cli/core/argparse_helpers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/argparse_helpers.py) - -Line 52. - -## Source - -[`signalwire/signalwire/cli/core/argparse_helpers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/argparse_helpers.py) - -Line 20. diff --git a/fern/products/sdk-reference/python/signalwire/cli/core/argparse-helpers/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/core/argparse-helpers/index.mdx deleted file mode 100644 index 9ea189b848..0000000000 --- a/fern/products/sdk-reference/python/signalwire/cli/core/argparse-helpers/index.mdx +++ /dev/null @@ -1,75 +0,0 @@ ---- -slug: "/reference/python/signalwire/cli/core/argparse-helpers" -title: "argparse_helpers" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.cli.core.argparse_helpers" - parent: "signalwire.cli.core" - module: "signalwire.cli.core" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/argparse_helpers.py" ---- -# `argparse_helpers` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module argparse_helpers -``` - -## Classes - - - - Custom ArgumentParser with better error handling - - - -## Functions - -### parse\_function\_arguments - -Parse function arguments from command line with type coercion based on schema - -#### Signature - -```python -parse_function_arguments( - function_args_list: List[str], - func_schema: Dict[str, Any] -) -> Dict[str, Any] -``` - -#### Parameters - - - List of command line arguments after --args - - - - Function schema with parameter definitions - - -#### Returns - -`Dict[str, Any]` — Dictionary of parsed function arguments - -#### Source - -[`signalwire/signalwire/cli/core/argparse_helpers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/argparse_helpers.py) - -Line 82. - -## Source - -[`signalwire/signalwire/cli/core/argparse_helpers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/argparse_helpers.py) diff --git a/fern/products/sdk-reference/python/signalwire/cli/core/dynamic-config/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/core/dynamic-config/index.mdx deleted file mode 100644 index 42b2f277b5..0000000000 --- a/fern/products/sdk-reference/python/signalwire/cli/core/dynamic-config/index.mdx +++ /dev/null @@ -1,72 +0,0 @@ ---- -slug: "/reference/python/signalwire/cli/core/dynamic-config" -title: "dynamic_config" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.cli.core.dynamic_config" - parent: "signalwire.cli.core" - module: "signalwire.cli.core" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/dynamic_config.py" ---- -# `dynamic_config` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module dynamic_config -``` - -## Functions - -### apply\_dynamic\_config - -Apply dynamic configuration callback if the agent has one - -#### Signature - -```python -apply_dynamic_config( - agent: AgentBase, - mock_request: Optional[MockRequest] = None, - verbose: bool = False -) -> None -``` - -#### Parameters - - - The agent instance - - - - Optional mock request object - - - - Whether to print verbose output - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/cli/core/dynamic_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/dynamic_config.py) - -Line 22. - -## Source - -[`signalwire/signalwire/cli/core/dynamic_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/dynamic_config.py) diff --git a/fern/products/sdk-reference/python/signalwire/cli/core/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/core/index.mdx deleted file mode 100644 index 18825713f6..0000000000 --- a/fern/products/sdk-reference/python/signalwire/cli/core/index.mdx +++ /dev/null @@ -1,52 +0,0 @@ ---- -slug: "/reference/python/signalwire/cli/core" -title: "core" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.cli.core" - parent: "signalwire.cli" - module: "signalwire.cli" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/__init__.py" ---- -# `core` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module core -``` - -## Modules - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - -## Source - -[`signalwire/signalwire/cli/core/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/cli/core/service-loader/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/core/service-loader/index.mdx deleted file mode 100644 index 925c6b734c..0000000000 --- a/fern/products/sdk-reference/python/signalwire/cli/core/service-loader/index.mdx +++ /dev/null @@ -1,218 +0,0 @@ ---- -slug: "/reference/python/signalwire/cli/core/service-loader" -title: "service_loader" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.cli.core.service_loader" - parent: "signalwire.cli.core" - module: "signalwire.cli.core" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/service_loader.py" ---- -# `service_loader` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module service_loader -``` - -## Constants - - - -## Classes - - - - Captures SWMLService instances when they try to run/serve - - - -## Functions - -### discover\_agents\_in\_file - -Backward compatibility wrapper - -#### Signature - -```python -discover_agents_in_file(agent_path: str) -> List[Dict[str, Any]] -``` - -#### Parameters - - - -#### Returns - -`List[Dict[str, Any]]` - -#### Source - -[`signalwire/signalwire/cli/core/service_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/service_loader.py) - -Line 282. - -*** - -### load\_agent\_from\_file - -Backward compatibility wrapper - -Note: This still uses the direct extraction approach for compatibility - -#### Signature - -```python -load_agent_from_file( - agent_path: str, - agent_class_name: Optional[str] = None, - suppress_output: bool = False -) -> AgentBase -``` - -#### Parameters - - - - - - - -#### Returns - -`AgentBase` - -#### Source - -[`signalwire/signalwire/cli/core/service_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/service_loader.py) - -Line 253. - -*** - -### load\_and\_simulate\_service - -Load a service file and simulate a request to it - -This is the main entry point that combines loading and request simulation - -#### Signature - -```python -load_and_simulate_service( - service_path: str, - route: Optional[str] = None, - method: str = 'POST', - body: Optional[dict] = None, - query_params: Optional[dict] = None, - headers: Optional[dict] = None, - suppress_output: bool = False -) -> dict -``` - -#### Parameters - - - Path to the service file - - - - Optional route to request (for multi-service files) - - - - HTTP method - - - - Request body - - - - Query parameters - - - - Request headers - - - - -#### Returns - -`dict` — The service's response - -#### Source - -[`signalwire/signalwire/cli/core/service_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/service_loader.py) - -Line 183. - -*** - -### simulate\_request\_to\_service - -Simulate a request to a SWMLService instance - -**Modifiers:** `async` - -#### Signature - -```python -async simulate_request_to_service( - service: SWMLService, - method: str = 'POST', - body: Optional[dict] = None, - query_params: Optional[dict] = None, - headers: Optional[dict] = None -) -> dict -``` - -#### Parameters - - - The SWMLService instance - - - - HTTP method (GET or POST) - - - - Request body for POST requests - - - - Query parameters - - - - Request headers - - -#### Returns - -`dict` — The service's response as a dict - -#### Source - -[`signalwire/signalwire/cli/core/service_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/service_loader.py) - -Line 135. - -## Source - -[`signalwire/signalwire/cli/core/service_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/service_loader.py) diff --git a/fern/products/sdk-reference/python/signalwire/cli/core/service-loader/service-capture/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/core/service-loader/service-capture/index.mdx deleted file mode 100644 index 670ecc071b..0000000000 --- a/fern/products/sdk-reference/python/signalwire/cli/core/service-loader/service-capture/index.mdx +++ /dev/null @@ -1,83 +0,0 @@ ---- -slug: "/reference/python/signalwire/cli/core/service-loader/service-capture" -title: "ServiceCapture" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.cli.core.service_loader.ServiceCapture" - parent: "signalwire.cli.core.service_loader" - module: "signalwire.cli.core.service_loader" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/service_loader.py" ---- -# `ServiceCapture` - -Captures SWMLService instances when they try to run/serve - -## Signature - -```python -class ServiceCapture -``` - -## Properties - - - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__() -``` - -#### Source - -[`signalwire/signalwire/cli/core/service_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/service_loader.py) - -Line 40. - -*** - -### capture - -Execute a service file and capture any services that try to run - -#### Signature - -```python -capture(service_path: str, suppress_output: bool = False) -> List[SWMLService] -``` - -#### Parameters - - - Path to the Python file - - - - If True, suppress stdout during module execution - - -#### Returns - -`List[SWMLService]` — List of captured SWMLService instances - -#### Source - -[`signalwire/signalwire/cli/core/service_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/service_loader.py) - -Line 44. - -## Source - -[`signalwire/signalwire/cli/core/service_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/service_loader.py) - -Line 37. diff --git a/fern/products/sdk-reference/python/signalwire/cli/dokku/colors/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/dokku/colors/index.mdx deleted file mode 100644 index b3a5aa4639..0000000000 --- a/fern/products/sdk-reference/python/signalwire/cli/dokku/colors/index.mdx +++ /dev/null @@ -1,47 +0,0 @@ ---- -slug: "/reference/python/signalwire/cli/dokku/colors" -title: "Colors" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.cli.dokku.Colors" - parent: "signalwire.cli.dokku" - module: "signalwire.cli.dokku" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/dokku.py" ---- -# `Colors` - -## Signature - -```python -class Colors -``` - -## Properties - - - - - - - - - - - - - - - - - - - -## Source - -[`signalwire/signalwire/cli/dokku.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/dokku.py) - -Line 34. diff --git a/fern/products/sdk-reference/python/signalwire/cli/dokku/dokku-project-generator/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/dokku/dokku-project-generator/index.mdx deleted file mode 100644 index b713ee7dd5..0000000000 --- a/fern/products/sdk-reference/python/signalwire/cli/dokku/dokku-project-generator/index.mdx +++ /dev/null @@ -1,85 +0,0 @@ ---- -slug: "/reference/python/signalwire/cli/dokku/dokku-project-generator" -title: "DokkuProjectGenerator" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.cli.dokku.DokkuProjectGenerator" - parent: "signalwire.cli.dokku" - module: "signalwire.cli.dokku" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/dokku.py" ---- -# `DokkuProjectGenerator` - -Generates Dokku deployment files for SignalWire agents. - -## Signature - -```python -class DokkuProjectGenerator -``` - -## Properties - - - - - - - - - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(app_name: str, options: Dict[str, Any]) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/cli/dokku.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/dokku.py) - -Line 1816. - -*** - -### generate - -Generate the project files. - -#### Signature - -```python -generate() -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`signalwire/signalwire/cli/dokku.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/dokku.py) - -Line 1828. - -## Source - -[`signalwire/signalwire/cli/dokku.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/dokku.py) - -Line 1813. diff --git a/fern/products/sdk-reference/python/signalwire/cli/dokku/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/dokku/index.mdx deleted file mode 100644 index 92d6bafe3f..0000000000 --- a/fern/products/sdk-reference/python/signalwire/cli/dokku/index.mdx +++ /dev/null @@ -1,390 +0,0 @@ ---- -slug: "/reference/python/signalwire/cli/dokku" -title: "dokku" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.cli.dokku" - parent: "signalwire.cli" - module: "signalwire.cli" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/dokku.py" ---- -# `dokku` - -SignalWire Agent Dokku Deployment Tool - -CLI tool for deploying SignalWire agents to Dokku with support for: - -- Simple git push deployment -- Full CI/CD with GitHub Actions -- Service provisioning (PostgreSQL, Redis) -- Preview environments for PRs - -> \[!NOTE] -> sw-agent-dokku init myagent # Simple mode -> sw-agent-dokku init myagent --cicd # With GitHub Actions CI/CD -> sw-agent-dokku deploy # Deploy current directory -> sw-agent-dokku logs # Tail logs -> sw-agent-dokku config set KEY=value # Set environment variables -> sw-agent-dokku scale web=2 # Scale processes - -## Signature - -```python -module dokku -``` - -## Constants - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -## Classes - - - - - - Generates Dokku deployment files for SignalWire agents. - - - -## Functions - -### cmd\_config - -Manage Dokku config. - -#### Signature - -```python -cmd_config(args) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/cli/dokku.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/dokku.py) - -Line 2158. - -*** - -### cmd\_deploy - -Deploy to Dokku. - -#### Signature - -```python -cmd_deploy(args) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/cli/dokku.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/dokku.py) - -Line 2071. - -*** - -### cmd\_init - -Initialize a new Dokku project. - -#### Signature - -```python -cmd_init(args) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/cli/dokku.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/dokku.py) - -Line 1970. - -*** - -### cmd\_logs - -Tail Dokku logs. - -#### Signature - -```python -cmd_logs(args) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/cli/dokku.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/dokku.py) - -Line 2136. - -*** - -### cmd\_scale - -Scale Dokku processes. - -#### Signature - -```python -cmd_scale(args) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/cli/dokku.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/dokku.py) - -Line 2186. - -*** - -### generate\_password - -#### Signature - -```python -generate_password(length: int = 32) -> str -``` - -#### Parameters - - - -#### Returns - -`str` - -#### Source - -[`signalwire/signalwire/cli/dokku.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/dokku.py) - -Line 81. - -*** - -### main - -#### Signature - -```python -main() -``` - -#### Source - -[`signalwire/signalwire/cli/dokku.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/dokku.py) - -Line 2223. - -*** - -### print\_error - -#### Signature - -```python -print_error(msg: str) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/cli/dokku.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/dokku.py) - -Line 58. - -*** - -### print\_header - -#### Signature - -```python -print_header(msg: str) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/cli/dokku.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/dokku.py) - -Line 62. - -*** - -### print\_step - -#### Signature - -```python -print_step(msg: str) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/cli/dokku.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/dokku.py) - -Line 46. - -*** - -### print\_success - -#### Signature - -```python -print_success(msg: str) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/cli/dokku.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/dokku.py) - -Line 50. - -*** - -### print\_warning - -#### Signature - -```python -print_warning(msg: str) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/cli/dokku.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/dokku.py) - -Line 54. - -*** - -### prompt - -#### Signature - -```python -prompt(question: str, default: str = '') -> str -``` - -#### Parameters - - - - - -#### Returns - -`str` - -#### Source - -[`signalwire/signalwire/cli/dokku.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/dokku.py) - -Line 66. - -*** - -### prompt\_yes\_no - -#### Signature - -```python -prompt_yes_no(question: str, default: bool = True) -> bool -``` - -#### Parameters - - - - - -#### Returns - -`bool` - -#### Source - -[`signalwire/signalwire/cli/dokku.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/dokku.py) - -Line 73. - -## Source - -[`signalwire/signalwire/cli/dokku.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/dokku.py) diff --git a/fern/products/sdk-reference/python/signalwire/cli/execution/datamap-exec/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/execution/datamap-exec/index.mdx deleted file mode 100644 index ff2a87bf82..0000000000 --- a/fern/products/sdk-reference/python/signalwire/cli/execution/datamap-exec/index.mdx +++ /dev/null @@ -1,111 +0,0 @@ ---- -slug: "/reference/python/signalwire/cli/execution/datamap-exec" -title: "datamap_exec" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.cli.execution.datamap_exec" - parent: "signalwire.cli.execution" - module: "signalwire.cli.execution" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/execution/datamap_exec.py" ---- -# `datamap_exec` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module datamap_exec -``` - -## Functions - -### execute\_datamap\_function - -Execute a DataMap function following the actual DataMap processing pipeline: - -1. Expressions (pattern matching) -2. Webhooks (try each sequentially until one succeeds) -3. Foreach (within successful webhook) -4. Output (from successful webhook) -5. Fallback output (if all webhooks fail) - -#### Signature - -```python -execute_datamap_function( - datamap_config: Dict[str, Any], - args: Dict[str, Any], - verbose: bool = False -) -> Dict[str, Any] -``` - -#### Parameters - - - DataMap configuration dictionary - - - - Function arguments - - - - Enable verbose output - - -#### Returns - -`Dict[str, Any]` — Function result (should be string or dict with 'response' key) - -#### Source - -[`signalwire/signalwire/cli/execution/datamap_exec.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/execution/datamap_exec.py) - -Line 124. - -*** - -### simple\_template\_expand - -Simple template expansion for DataMap testing -Supports both $\{key\} and %\{key\} syntax with nested object access and array indexing - -#### Signature - -```python -simple_template_expand(template: str, data: Dict[str, Any]) -> str -``` - -#### Parameters - - - Template string with $\{\} or %\{\} variables - - - - Data dictionary for expansion - - -#### Returns - -`str` — Expanded string - -#### Source - -[`signalwire/signalwire/cli/execution/datamap_exec.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/execution/datamap_exec.py) - -Line 22. - -## Source - -[`signalwire/signalwire/cli/execution/datamap_exec.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/execution/datamap_exec.py) diff --git a/fern/products/sdk-reference/python/signalwire/cli/execution/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/execution/index.mdx deleted file mode 100644 index 35d6511250..0000000000 --- a/fern/products/sdk-reference/python/signalwire/cli/execution/index.mdx +++ /dev/null @@ -1,44 +0,0 @@ ---- -slug: "/reference/python/signalwire/cli/execution" -title: "execution" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.cli.execution" - parent: "signalwire.cli" - module: "signalwire.cli" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/execution/__init__.py" ---- -# `execution` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module execution -``` - -## Modules - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - -## Source - -[`signalwire/signalwire/cli/execution/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/execution/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/cli/execution/webhook-exec/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/execution/webhook-exec/index.mdx deleted file mode 100644 index ad4a9bbc04..0000000000 --- a/fern/products/sdk-reference/python/signalwire/cli/execution/webhook-exec/index.mdx +++ /dev/null @@ -1,83 +0,0 @@ ---- -slug: "/reference/python/signalwire/cli/execution/webhook-exec" -title: "webhook_exec" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.cli.execution.webhook_exec" - parent: "signalwire.cli.execution" - module: "signalwire.cli.execution" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/execution/webhook_exec.py" ---- -# `webhook_exec` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module webhook_exec -``` - -## Functions - -### execute\_external\_webhook\_function - -Execute an external webhook SWAIG function by making an HTTP request to the external service. -This simulates what SignalWire would do when calling an external webhook function. - -#### Signature - -```python -execute_external_webhook_function( - func: SWAIGFunction, - function_name: str, - function_args: Dict[str, Any], - post_data: Dict[str, Any], - verbose: bool = False -) -> Dict[str, Any] -``` - -#### Parameters - - - The SWAIGFunction object with webhook\_url - - - - Name of the function being called - - - - Parsed function arguments - - - - Complete post data to send to the webhook - - - - Whether to show verbose output - - -#### Returns - -`Dict[str, Any]` — Response from the external webhook service - -#### Source - -[`signalwire/signalwire/cli/execution/webhook_exec.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/execution/webhook_exec.py) - -Line 24. - -## Source - -[`signalwire/signalwire/cli/execution/webhook_exec.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/execution/webhook_exec.py) diff --git a/fern/products/sdk-reference/python/signalwire/cli/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/index.mdx deleted file mode 100644 index 80a6dc7f5f..0000000000 --- a/fern/products/sdk-reference/python/signalwire/cli/index.mdx +++ /dev/null @@ -1,84 +0,0 @@ ---- -slug: "/reference/python/signalwire/cli" -title: "cli" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.cli" - parent: "signalwire" - module: "signalwire" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/__init__.py" ---- -# `cli` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module cli -``` - -## Properties - - - -## Modules - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - SignalWire Agent Dokku Deployment Tool - - - - Copyright (c) 2025 SignalWire - - - - SignalWire Agent Project Generator - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - -## Source - -[`signalwire/signalwire/cli/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/cli/init-project/colors/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/init-project/colors/index.mdx deleted file mode 100644 index bd6672b56c..0000000000 --- a/fern/products/sdk-reference/python/signalwire/cli/init-project/colors/index.mdx +++ /dev/null @@ -1,45 +0,0 @@ ---- -slug: "/reference/python/signalwire/cli/init-project/colors" -title: "Colors" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.cli.init_project.Colors" - parent: "signalwire.cli.init_project" - module: "signalwire.cli.init_project" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py" ---- -# `Colors` - -## Signature - -```python -class Colors -``` - -## Properties - - - - - - - - - - - - - - - - - -## Source - -[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) - -Line 38. diff --git a/fern/products/sdk-reference/python/signalwire/cli/init-project/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/init-project/index.mdx deleted file mode 100644 index a1de82e117..0000000000 --- a/fern/products/sdk-reference/python/signalwire/cli/init-project/index.mdx +++ /dev/null @@ -1,558 +0,0 @@ ---- -slug: "/reference/python/signalwire/cli/init-project" -title: "init_project" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.cli.init_project" - parent: "signalwire.cli" - module: "signalwire.cli" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py" ---- -# `init_project` - -SignalWire Agent Project Generator - -Interactive CLI tool to create new SignalWire agent projects with customizable features. - -> \[!NOTE] -> sw-agent-init # Interactive mode -> sw-agent-init myagent # Quick mode with project name -> sw-agent-init myagent --type full --no-venv - -## Signature - -```python -module init_project -``` - -## Constants - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -## Classes - - - - - - Generates a new SignalWire agent project. - - - -## Functions - -### generate\_password - -Generate a secure random password. - -#### Signature - -```python -generate_password(length: int = 32) -> str -``` - -#### Parameters - - - -#### Returns - -`str` - -#### Source - -[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) - -Line 139. - -*** - -### get\_agent\_template - -Generate the main agent template based on type and features. - -#### Signature - -```python -get_agent_template(agent_type: str, features: Dict[str, bool]) -> str -``` - -#### Parameters - - - - - -#### Returns - -`str` - -#### Source - -[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) - -Line 1177. - -*** - -### get\_app\_template - -Generate the app.py template based on features. - -#### Signature - -```python -get_app_template(features: Dict[str, bool]) -> str -``` - -#### Parameters - - - -#### Returns - -`str` - -#### Source - -[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) - -Line 1329. - -*** - -### get\_env\_credentials - -Get SignalWire credentials from environment variables. - -#### Signature - -```python -get_env_credentials() -> Dict[str, str] -``` - -#### Returns - -`Dict[str, str]` - -#### Source - -[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) - -Line 130. - -*** - -### get\_readme\_template - -Generate README template. - -#### Signature - -```python -get_readme_template(project_name: str, features: Dict[str, bool]) -> str -``` - -#### Parameters - - - - - -#### Returns - -`str` - -#### Source - -[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) - -Line 1652. - -*** - -### get\_test\_template - -Generate test template. - -#### Signature - -```python -get_test_template(has_tool: bool) -> str -``` - -#### Parameters - - - -#### Returns - -`str` - -#### Source - -[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) - -Line 1525. - -*** - -### get\_web\_index\_template - -Generate a simple web UI template. - -#### Signature - -```python -get_web_index_template() -> str -``` - -#### Returns - -`str` - -#### Source - -[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) - -Line 1744. - -*** - -### main - -Main entry point. - -#### Signature - -```python -main() -``` - -#### Source - -[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) - -Line 2578. - -*** - -### mask\_token - -Mask a token showing only first 4 and last 3 characters. - -#### Signature - -```python -mask_token(token: str) -> str -``` - -#### Parameters - - - -#### Returns - -`str` - -#### Source - -[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) - -Line 123. - -*** - -### print\_error - -#### Signature - -```python -print_error(msg: str) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) - -Line 61. - -*** - -### print\_step - -#### Signature - -```python -print_step(msg: str) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) - -Line 49. - -*** - -### print\_success - -#### Signature - -```python -print_success(msg: str) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) - -Line 53. - -*** - -### print\_warning - -#### Signature - -```python -print_warning(msg: str) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) - -Line 57. - -*** - -### prompt - -Prompt user for input with optional default. - -#### Signature - -```python -prompt(question: str, default: str = '') -> str -``` - -#### Parameters - - - - - -#### Returns - -`str` - -#### Source - -[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) - -Line 65. - -*** - -### prompt\_multiselect - -Prompt user to toggle multiple options. Returns list of booleans. - -#### Signature - -```python -prompt_multiselect( - question: str, - options: List[str], - defaults: List[bool] -) -> List[bool] -``` - -#### Parameters - - - - - - - -#### Returns - -`List[bool]` - -#### Source - -[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) - -Line 101. - -*** - -### prompt\_select - -Prompt user to select from numbered options. Returns 1-based index. - -#### Signature - -```python -prompt_select(question: str, options: List[str], default: int = 1) -> int -``` - -#### Parameters - - - - - - - -#### Returns - -`int` - -#### Source - -[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) - -Line 83. - -*** - -### prompt\_yes\_no - -Prompt user for yes/no answer. - -#### Signature - -```python -prompt_yes_no(question: str, default: bool = True) -> bool -``` - -#### Parameters - - - - - -#### Returns - -`bool` - -#### Source - -[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) - -Line 74. - -*** - -### run\_interactive - -Run interactive prompts and return configuration. - -#### Signature - -```python -run_interactive() -> Dict[str, Any] -``` - -#### Returns - -`Dict[str, Any]` - -#### Source - -[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) - -Line 2388. - -*** - -### run\_quick - -Run in quick mode with minimal prompts. - -#### Signature - -```python -run_quick(project_name: str, args: Any) -> Dict[str, Any] -``` - -#### Parameters - - - - - -#### Returns - -`Dict[str, Any]` - -#### Source - -[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) - -Line 2511. - -## Source - -[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) diff --git a/fern/products/sdk-reference/python/signalwire/cli/init-project/project-generator/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/init-project/project-generator/index.mdx deleted file mode 100644 index f61db57d05..0000000000 --- a/fern/products/sdk-reference/python/signalwire/cli/init-project/project-generator/index.mdx +++ /dev/null @@ -1,87 +0,0 @@ ---- -slug: "/reference/python/signalwire/cli/init-project/project-generator" -title: "ProjectGenerator" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.cli.init_project.ProjectGenerator" - parent: "signalwire.cli.init_project" - module: "signalwire.cli.init_project" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py" ---- -# `ProjectGenerator` - -Generates a new SignalWire agent project. - -## Signature - -```python -class ProjectGenerator -``` - -## Properties - - - - - - - - - - - - - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(config: Dict[str, Any]) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) - -Line 1850. - -*** - -### generate - -Generate the project. Returns True on success. - -#### Signature - -```python -generate() -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) - -Line 1859. - -## Source - -[`signalwire/signalwire/cli/init_project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/init_project.py) - -Line 1847. diff --git a/fern/products/sdk-reference/python/signalwire/cli/output/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/output/index.mdx deleted file mode 100644 index 8993c5e747..0000000000 --- a/fern/products/sdk-reference/python/signalwire/cli/output/index.mdx +++ /dev/null @@ -1,44 +0,0 @@ ---- -slug: "/reference/python/signalwire/cli/output" -title: "output" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.cli.output" - parent: "signalwire.cli" - module: "signalwire.cli" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/output/__init__.py" ---- -# `output` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module output -``` - -## Modules - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - -## Source - -[`signalwire/signalwire/cli/output/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/output/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/cli/output/output-formatter/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/output/output-formatter/index.mdx deleted file mode 100644 index 50613ec2c1..0000000000 --- a/fern/products/sdk-reference/python/signalwire/cli/output/output-formatter/index.mdx +++ /dev/null @@ -1,92 +0,0 @@ ---- -slug: "/reference/python/signalwire/cli/output/output-formatter" -title: "output_formatter" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.cli.output.output_formatter" - parent: "signalwire.cli.output" - module: "signalwire.cli.output" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/output/output_formatter.py" ---- -# `output_formatter` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module output_formatter -``` - -## Functions - -### display\_agent\_tools - -Display the available SWAIG functions for an agent - -#### Signature - -```python -display_agent_tools(agent: AgentBase, verbose: bool = False) -> None -``` - -#### Parameters - - - The agent instance - - - - Whether to show verbose details - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/cli/output/output_formatter.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/output/output_formatter.py) - -Line 23. - -*** - -### format\_result - -Format the result of a SWAIG function call for display - -#### Signature - -```python -format_result(result: Any) -> str -``` - -#### Parameters - - - The result from the SWAIG function - - -#### Returns - -`str` — Formatted string representation - -#### Source - -[`signalwire/signalwire/cli/output/output_formatter.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/output/output_formatter.py) - -Line 220. - -## Source - -[`signalwire/signalwire/cli/output/output_formatter.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/output/output_formatter.py) diff --git a/fern/products/sdk-reference/python/signalwire/cli/output/swml-dump/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/output/swml-dump/index.mdx deleted file mode 100644 index ff684a5f9e..0000000000 --- a/fern/products/sdk-reference/python/signalwire/cli/output/swml-dump/index.mdx +++ /dev/null @@ -1,86 +0,0 @@ ---- -slug: "/reference/python/signalwire/cli/output/swml-dump" -title: "swml_dump" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.cli.output.swml_dump" - parent: "signalwire.cli.output" - module: "signalwire.cli.output" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/output/swml_dump.py" ---- -# `swml_dump` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module swml_dump -``` - -## Properties - - - -## Functions - -### handle\_dump\_swml - -Handle SWML dumping with fake post\_data and mock request support - -#### Signature - -```python -handle_dump_swml(agent: AgentBase, args: argparse.Namespace) -> int -``` - -#### Parameters - - - The loaded agent instance - - - - Parsed CLI arguments - - -#### Returns - -`int` — Exit code (0 for success, 1 for error) - -#### Source - -[`signalwire/signalwire/cli/output/swml_dump.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/output/swml_dump.py) - -Line 53. - -*** - -### setup\_output\_suppression - -Set up output suppression for SWML dumping - -#### Signature - -```python -setup_output_suppression() -``` - -#### Source - -[`signalwire/signalwire/cli/output/swml_dump.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/output/swml_dump.py) - -Line 33. - -## Source - -[`signalwire/signalwire/cli/output/swml_dump.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/output/swml_dump.py) diff --git a/fern/products/sdk-reference/python/signalwire/cli/simulation/data-generation/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/simulation/data-generation/index.mdx deleted file mode 100644 index dcca48fa31..0000000000 --- a/fern/products/sdk-reference/python/signalwire/cli/simulation/data-generation/index.mdx +++ /dev/null @@ -1,275 +0,0 @@ ---- -slug: "/reference/python/signalwire/cli/simulation/data-generation" -title: "data_generation" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.cli.simulation.data_generation" - parent: "signalwire.cli.simulation" - module: "signalwire.cli.simulation" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/data_generation.py" ---- -# `data_generation` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module data_generation -``` - -## Functions - -### adapt\_for\_call\_type - -Adapt call data structure based on call type (sip vs webrtc) - -#### Signature - -```python -adapt_for_call_type(call_data: Dict[str, Any], call_type: str) -> Dict[str, Any] -``` - -#### Parameters - - - Base call data structure - - - - "sip" or "webrtc" - - -#### Returns - -`Dict[str, Any]` — Adapted call data with appropriate addresses and metadata - -#### Source - -[`signalwire/signalwire/cli/simulation/data_generation.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/data_generation.py) - -Line 48. - -*** - -### generate\_comprehensive\_post\_data - -Generate comprehensive post\_data that matches what SignalWire would send - -#### Signature - -```python -generate_comprehensive_post_data( - function_name: str, - args: Dict[str, Any], - custom_data: Optional[Dict[str, Any]] = None -) -> Dict[str, Any] -``` - -#### Parameters - - - Name of the SWAIG function being called - - - - Function arguments - - - - Optional custom data to override defaults - - -#### Returns - -`Dict[str, Any]` — Complete post\_data dict with all possible keys - -#### Source - -[`signalwire/signalwire/cli/simulation/data_generation.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/data_generation.py) - -Line 143. - -*** - -### generate\_fake\_node\_id - -Generate a fake node ID for testing - -#### Signature - -```python -generate_fake_node_id() -> str -``` - -#### Returns - -`str` - -#### Source - -[`signalwire/signalwire/cli/simulation/data_generation.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/data_generation.py) - -Line 27. - -*** - -### generate\_fake\_sip\_from - -Generate a fake 'from' address based on call type - -#### Signature - -```python -generate_fake_sip_from(call_type: str) -> str -``` - -#### Parameters - - - -#### Returns - -`str` - -#### Source - -[`signalwire/signalwire/cli/simulation/data_generation.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/data_generation.py) - -Line 32. - -*** - -### generate\_fake\_sip\_to - -Generate a fake 'to' address based on call type - -#### Signature - -```python -generate_fake_sip_to(call_type: str) -> str -``` - -#### Parameters - - - -#### Returns - -`str` - -#### Source - -[`signalwire/signalwire/cli/simulation/data_generation.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/data_generation.py) - -Line 40. - -*** - -### generate\_fake\_swml\_post\_data - -Generate fake SWML post\_data that matches real SignalWire structure - -#### Signature - -```python -generate_fake_swml_post_data( - call_type: str = 'webrtc', - call_direction: str = 'inbound', - call_state: str = 'created' -) -> Dict[str, Any] -``` - -#### Parameters - - - "sip" or "webrtc" (default: webrtc) - - - - "inbound" or "outbound" (default: inbound) - - - - Call state (default: created) - - -#### Returns - -`Dict[str, Any]` — Fake post\_data dict with call, vars, and envs structure - -#### Source - -[`signalwire/signalwire/cli/simulation/data_generation.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/data_generation.py) - -Line 85. - -*** - -### generate\_fake\_uuid - -Generate a fake UUID for testing - -#### Signature - -```python -generate_fake_uuid() -> str -``` - -#### Returns - -`str` - -#### Source - -[`signalwire/signalwire/cli/simulation/data_generation.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/data_generation.py) - -Line 22. - -*** - -### generate\_minimal\_post\_data - -Generate minimal post\_data with only essential keys - -#### Signature - -```python -generate_minimal_post_data( - function_name: str, - args: Dict[str, Any] -) -> Dict[str, Any] -``` - -#### Parameters - - - Name of the SWAIG function being called - - - - Function arguments - - -#### Returns - -`Dict[str, Any]` — Minimal post\_data dict - -#### Source - -[`signalwire/signalwire/cli/simulation/data_generation.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/data_generation.py) - -Line 358. - -## Source - -[`signalwire/signalwire/cli/simulation/data_generation.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/data_generation.py) diff --git a/fern/products/sdk-reference/python/signalwire/cli/simulation/data-overrides/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/simulation/data-overrides/index.mdx deleted file mode 100644 index 1b59630101..0000000000 --- a/fern/products/sdk-reference/python/signalwire/cli/simulation/data-overrides/index.mdx +++ /dev/null @@ -1,171 +0,0 @@ ---- -slug: "/reference/python/signalwire/cli/simulation/data-overrides" -title: "data_overrides" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.cli.simulation.data_overrides" - parent: "signalwire.cli.simulation" - module: "signalwire.cli.simulation" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/data_overrides.py" ---- -# `data_overrides` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module data_overrides -``` - -## Functions - -### apply\_convenience\_mappings - -Apply convenience CLI arguments to data structure - -#### Signature - -```python -apply_convenience_mappings( - data: Dict[str, Any], - args: argparse.Namespace -) -> Dict[str, Any] -``` - -#### Parameters - - - Data dictionary to modify - - - - Parsed CLI arguments - - -#### Returns - -`Dict[str, Any]` — Modified data dictionary - -#### Source - -[`signalwire/signalwire/cli/simulation/data_overrides.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/data_overrides.py) - -Line 117. - -*** - -### apply\_overrides - -Apply override values to data using dot notation paths - -#### Signature - -```python -apply_overrides( - data: Dict[str, Any], - overrides: List[str], - json_overrides: List[str] -) -> Dict[str, Any] -``` - -#### Parameters - - - Data dictionary to modify - - - - List of "path=value" strings - - - - List of "path=json\_value" strings - - -#### Returns - -`Dict[str, Any]` — Modified data dictionary - -#### Source - -[`signalwire/signalwire/cli/simulation/data_overrides.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/data_overrides.py) - -Line 80. - -*** - -### parse\_value - -Parse a string value into appropriate Python type - -#### Signature - -```python -parse_value(value_str: str) -> Any -``` - -#### Parameters - - - String representation of value - - -#### Returns - -`Any` — Parsed value (str, int, float, bool, None, or JSON object) - -#### Source - -[`signalwire/signalwire/cli/simulation/data_overrides.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/data_overrides.py) - -Line 43. - -*** - -### set\_nested\_value - -Set a nested value using dot notation path - -#### Signature - -```python -set_nested_value(data: Dict[str, Any], path: str, value: Any) -> None -``` - -#### Parameters - - - Dictionary to modify - - - - Dot-notation path (e.g., "call.call\_id" or "vars.userVariables.custom") - - - - Value to set - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/cli/simulation/data_overrides.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/data_overrides.py) - -Line 21. - -## Source - -[`signalwire/signalwire/cli/simulation/data_overrides.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/data_overrides.py) diff --git a/fern/products/sdk-reference/python/signalwire/cli/simulation/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/simulation/index.mdx deleted file mode 100644 index 842003cc67..0000000000 --- a/fern/products/sdk-reference/python/signalwire/cli/simulation/index.mdx +++ /dev/null @@ -1,48 +0,0 @@ ---- -slug: "/reference/python/signalwire/cli/simulation" -title: "simulation" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.cli.simulation" - parent: "signalwire.cli" - module: "signalwire.cli" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/__init__.py" ---- -# `simulation` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module simulation -``` - -## Modules - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - -## Source - -[`signalwire/signalwire/cli/simulation/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/cli/simulation/mock-env/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/simulation/mock-env/index.mdx deleted file mode 100644 index 613a9994cb..0000000000 --- a/fern/products/sdk-reference/python/signalwire/cli/simulation/mock-env/index.mdx +++ /dev/null @@ -1,122 +0,0 @@ ---- -slug: "/reference/python/signalwire/cli/simulation/mock-env" -title: "mock_env" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.cli.simulation.mock_env" - parent: "signalwire.cli.simulation" - module: "signalwire.cli.simulation" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py" ---- -# `mock_env` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module mock_env -``` - -## Classes - - - - Mock FastAPI Headers (case-insensitive dict-like) - - - - Mock FastAPI QueryParams (simple dict-like) - - - - Mock FastAPI Request object for dynamic agent testing - - - - Mock FastAPI URL object - - - - Manages serverless environment simulation for different platforms - - - -## Functions - -### create\_mock\_request - -Factory function to create a mock FastAPI Request object - -#### Signature - -```python -create_mock_request( - method: str = 'POST', - url: str = 'http://localhost:8080/swml', - headers: Optional[Dict[str, str]] = None, - query_params: Optional[Dict[str, str]] = None, - body: Optional[Dict[str, Any]] = None -) -> MockRequest -``` - -#### Parameters - - - - - - - - - - - -#### Returns - -`MockRequest` - -#### Source - -[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) - -Line 128. - -*** - -### load\_env\_file - -Load environment variables from a file - -#### Signature - -```python -load_env_file(env_file_path: str) -> Dict[str, str] -``` - -#### Parameters - - - -#### Returns - -`Dict[str, str]` - -#### Source - -[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) - -Line 269. - -## Source - -[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) diff --git a/fern/products/sdk-reference/python/signalwire/cli/simulation/mock-env/mock-headers/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/simulation/mock-env/mock-headers/index.mdx deleted file mode 100644 index c5b61bd734..0000000000 --- a/fern/products/sdk-reference/python/signalwire/cli/simulation/mock-env/mock-headers/index.mdx +++ /dev/null @@ -1,171 +0,0 @@ ---- -slug: "/reference/python/signalwire/cli/simulation/mock-env/mock-headers" -title: "MockHeaders" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.cli.simulation.mock_env.MockHeaders" - parent: "signalwire.cli.simulation.mock_env" - module: "signalwire.cli.simulation.mock_env" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py" ---- -# `MockHeaders` - -Mock FastAPI Headers (case-insensitive dict-like) - -## Signature - -```python -class MockHeaders -``` - -## Methods - -### \_\_contains\_\_ - -#### Signature - -```python -__contains__(key: str) -> bool -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) - -Line 60. - -*** - -### \_\_getitem\_\_ - -#### Signature - -```python -__getitem__(key: str) -> str -``` - -#### Parameters - - - -#### Returns - -`str` - -#### Source - -[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) - -Line 57. - -*** - -### \_\_init\_\_ - -#### Signature - -```python -__init__(headers: Optional[Dict[str, str]] = None) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) - -Line 47. - -*** - -### get - -#### Signature - -```python -get(key: str, default: Optional[str] = None) -> Optional[str] -``` - -#### Parameters - - - - - -#### Returns - -`Optional[str]` - -#### Source - -[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) - -Line 54. - -*** - -### items - -#### Signature - -```python -items() -``` - -#### Source - -[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) - -Line 63. - -*** - -### keys - -#### Signature - -```python -keys() -``` - -#### Source - -[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) - -Line 66. - -*** - -### values - -#### Signature - -```python -values() -``` - -#### Source - -[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) - -Line 69. - -## Source - -[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) - -Line 45. diff --git a/fern/products/sdk-reference/python/signalwire/cli/simulation/mock-env/mock-query-params/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/simulation/mock-env/mock-query-params/index.mdx deleted file mode 100644 index e49458d0f2..0000000000 --- a/fern/products/sdk-reference/python/signalwire/cli/simulation/mock-env/mock-query-params/index.mdx +++ /dev/null @@ -1,171 +0,0 @@ ---- -slug: "/reference/python/signalwire/cli/simulation/mock-env/mock-query-params" -title: "MockQueryParams" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.cli.simulation.mock_env.MockQueryParams" - parent: "signalwire.cli.simulation.mock_env" - module: "signalwire.cli.simulation.mock_env" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py" ---- -# `MockQueryParams` - -Mock FastAPI QueryParams (simple dict-like) - -## Signature - -```python -class MockQueryParams -``` - -## Methods - -### \_\_contains\_\_ - -#### Signature - -```python -__contains__(key: str) -> bool -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) - -Line 32. - -*** - -### \_\_getitem\_\_ - -#### Signature - -```python -__getitem__(key: str) -> str -``` - -#### Parameters - - - -#### Returns - -`str` - -#### Source - -[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) - -Line 29. - -*** - -### \_\_init\_\_ - -#### Signature - -```python -__init__(params: Optional[Dict[str, str]] = None) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) - -Line 23. - -*** - -### get - -#### Signature - -```python -get(key: str, default: Optional[str] = None) -> Optional[str] -``` - -#### Parameters - - - - - -#### Returns - -`Optional[str]` - -#### Source - -[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) - -Line 26. - -*** - -### items - -#### Signature - -```python -items() -``` - -#### Source - -[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) - -Line 35. - -*** - -### keys - -#### Signature - -```python -keys() -``` - -#### Source - -[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) - -Line 38. - -*** - -### values - -#### Signature - -```python -values() -``` - -#### Source - -[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) - -Line 41. - -## Source - -[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) - -Line 21. diff --git a/fern/products/sdk-reference/python/signalwire/cli/simulation/mock-env/mock-request/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/simulation/mock-env/mock-request/index.mdx deleted file mode 100644 index 2543ca68a8..0000000000 --- a/fern/products/sdk-reference/python/signalwire/cli/simulation/mock-env/mock-request/index.mdx +++ /dev/null @@ -1,141 +0,0 @@ ---- -slug: "/reference/python/signalwire/cli/simulation/mock-env/mock-request" -title: "MockRequest" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.cli.simulation.mock_env.MockRequest" - parent: "signalwire.cli.simulation.mock_env" - module: "signalwire.cli.simulation.mock_env" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py" ---- -# `MockRequest` - -Mock FastAPI Request object for dynamic agent testing - -## Signature - -```python -class MockRequest -``` - -## Properties - - - - - - - - - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__( - method: str = 'POST', - url: str = 'http://localhost:8080/swml', - headers: Optional[Dict[str, str]] = None, - query_params: Optional[Dict[str, str]] = None, - json_body: Optional[Dict[str, Any]] = None -) -``` - -#### Parameters - - - - - - - - - - - -#### Source - -[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) - -Line 102. - -*** - -### body - -Return the raw body bytes - -**Modifiers:** `async` - -#### Signature - -```python -async body() -> bytes -``` - -#### Returns - -`bytes` - -#### Source - -[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) - -Line 119. - -*** - -### client - -Mock client property - -#### Signature - -```python -client() -``` - -#### Source - -[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) - -Line 123. - -*** - -### json - -Return the JSON body - -**Modifiers:** `async` - -#### Signature - -```python -async json() -> Dict[str, Any] -``` - -#### Returns - -`Dict[str, Any]` - -#### Source - -[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) - -Line 115. - -## Source - -[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) - -Line 100. diff --git a/fern/products/sdk-reference/python/signalwire/cli/simulation/mock-env/mock-url/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/simulation/mock-env/mock-url/index.mdx deleted file mode 100644 index dc2b8841b4..0000000000 --- a/fern/products/sdk-reference/python/signalwire/cli/simulation/mock-env/mock-url/index.mdx +++ /dev/null @@ -1,75 +0,0 @@ ---- -slug: "/reference/python/signalwire/cli/simulation/mock-env/mock-url" -title: "MockURL" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.cli.simulation.mock_env.MockURL" - parent: "signalwire.cli.simulation.mock_env" - module: "signalwire.cli.simulation.mock_env" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py" ---- -# `MockURL` - -Mock FastAPI URL object - -## Signature - -```python -class MockURL -``` - -## Properties - - - - - - - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(url: str = 'http://localhost:8080/swml') -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) - -Line 75. - -*** - -### \_\_str\_\_ - -#### Signature - -```python -__str__() -``` - -#### Source - -[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) - -Line 96. - -## Source - -[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) - -Line 73. diff --git a/fern/products/sdk-reference/python/signalwire/cli/simulation/mock-env/serverless-simulator/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/simulation/mock-env/serverless-simulator/index.mdx deleted file mode 100644 index 47e1565f57..0000000000 --- a/fern/products/sdk-reference/python/signalwire/cli/simulation/mock-env/serverless-simulator/index.mdx +++ /dev/null @@ -1,155 +0,0 @@ ---- -slug: "/reference/python/signalwire/cli/simulation/mock-env/serverless-simulator" -title: "ServerlessSimulator" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.cli.simulation.mock_env.ServerlessSimulator" - parent: "signalwire.cli.simulation.mock_env" - module: "signalwire.cli.simulation.mock_env" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py" ---- -# `ServerlessSimulator` - -Manages serverless environment simulation for different platforms - -## Signature - -```python -class ServerlessSimulator -``` - -## Properties - - - - - - - - - - - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(platform: str, overrides: Optional[Dict[str, str]] = None) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) - -Line 170. - -*** - -### activate - -Apply serverless environment simulation - -#### Signature - -```python -activate(verbose: bool = False) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) - -Line 178. - -*** - -### add\_override - -Add an environment variable override - -#### Signature - -```python -add_override(key: str, value: str) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) - -Line 256. - -*** - -### deactivate - -Restore original environment - -#### Signature - -```python -deactivate(verbose: bool = False) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) - -Line 227. - -*** - -### get\_current\_env - -Get the current environment that would be applied - -#### Signature - -```python -get_current_env() -> Dict[str, str] -``` - -#### Returns - -`Dict[str, str]` - -#### Source - -[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) - -Line 262. - -## Source - -[`signalwire/signalwire/cli/simulation/mock_env.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/simulation/mock_env.py) - -Line 139. diff --git a/fern/products/sdk-reference/python/signalwire/cli/swaig-test-wrapper/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/swaig-test-wrapper/index.mdx deleted file mode 100644 index 57961fc799..0000000000 --- a/fern/products/sdk-reference/python/signalwire/cli/swaig-test-wrapper/index.mdx +++ /dev/null @@ -1,50 +0,0 @@ ---- -slug: "/reference/python/signalwire/cli/swaig-test-wrapper" -title: "swaig_test_wrapper" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.cli.swaig_test_wrapper" - parent: "signalwire.cli" - module: "signalwire.cli" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/swaig_test_wrapper.py" ---- -# `swaig_test_wrapper` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module swaig_test_wrapper -``` - -## Functions - -### main - -Main entry point for the swaig-test command - -#### Signature - -```python -main() -``` - -#### Source - -[`signalwire/signalwire/cli/swaig_test_wrapper.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/swaig_test_wrapper.py) - -Line 21. - -## Source - -[`signalwire/signalwire/cli/swaig_test_wrapper.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/swaig_test_wrapper.py) diff --git a/fern/products/sdk-reference/python/signalwire/cli/test-swaig/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/test-swaig/index.mdx deleted file mode 100644 index de6b03284f..0000000000 --- a/fern/products/sdk-reference/python/signalwire/cli/test-swaig/index.mdx +++ /dev/null @@ -1,104 +0,0 @@ ---- -slug: "/reference/python/signalwire/cli/test-swaig" -title: "test_swaig" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.cli.test_swaig" - parent: "signalwire.cli" - module: "signalwire.cli" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/test_swaig.py" ---- -# `test_swaig` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module test_swaig -``` - -## Functions - -### console\_entry\_point - -Console script entry point for pip installation - -#### Signature - -```python -console_entry_point() -``` - -#### Source - -[`signalwire/signalwire/cli/test_swaig.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/test_swaig.py) - -Line 800. - -*** - -### main - -Main entry point for the CLI tool - -#### Signature - -```python -main() -``` - -#### Source - -[`signalwire/signalwire/cli/test_swaig.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/test_swaig.py) - -Line 222. - -*** - -### print\_help\_examples - -Print comprehensive usage examples - -#### Signature - -```python -print_help_examples() -``` - -#### Source - -[`signalwire/signalwire/cli/test_swaig.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/test_swaig.py) - -Line 95. - -*** - -### print\_help\_platforms - -Print detailed help for serverless platform options - -#### Signature - -```python -print_help_platforms() -``` - -#### Source - -[`signalwire/signalwire/cli/test_swaig.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/test_swaig.py) - -Line 51. - -## Source - -[`signalwire/signalwire/cli/test_swaig.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/test_swaig.py) diff --git a/fern/products/sdk-reference/python/signalwire/cli/types/agent-info/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/types/agent-info/index.mdx deleted file mode 100644 index 33f9d9bbf5..0000000000 --- a/fern/products/sdk-reference/python/signalwire/cli/types/agent-info/index.mdx +++ /dev/null @@ -1,43 +0,0 @@ ---- -slug: "/reference/python/signalwire/cli/types/agent-info" -title: "AgentInfo" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.cli.types.AgentInfo" - parent: "signalwire.cli.types" - module: "signalwire.cli.types" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/types.py" ---- -# `AgentInfo` - -Information about a discovered agent - -## Signature - -```python -class AgentInfo(TypedDict) -``` - -## Inheritance - -**Extends:** `TypedDict` - -## Properties - - - - - - - - - -## Source - -[`signalwire/signalwire/cli/types.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/types.py) - -Line 67. diff --git a/fern/products/sdk-reference/python/signalwire/cli/types/call-data/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/types/call-data/index.mdx deleted file mode 100644 index 74ccd9ed6a..0000000000 --- a/fern/products/sdk-reference/python/signalwire/cli/types/call-data/index.mdx +++ /dev/null @@ -1,65 +0,0 @@ ---- -slug: "/reference/python/signalwire/cli/types/call-data" -title: "CallData" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.cli.types.CallData" - parent: "signalwire.cli.types" - module: "signalwire.cli.types" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/types.py" ---- -# `CallData` - -Call data structure for SWML post\_data - -## Signature - -```python -class CallData(TypedDict) -``` - -## Inheritance - -**Extends:** `TypedDict` - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -## Source - -[`signalwire/signalwire/cli/types.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/types.py) - -Line 18. diff --git a/fern/products/sdk-reference/python/signalwire/cli/types/data-map-config/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/types/data-map-config/index.mdx deleted file mode 100644 index cb8f98e8c9..0000000000 --- a/fern/products/sdk-reference/python/signalwire/cli/types/data-map-config/index.mdx +++ /dev/null @@ -1,43 +0,0 @@ ---- -slug: "/reference/python/signalwire/cli/types/data-map-config" -title: "DataMapConfig" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.cli.types.DataMapConfig" - parent: "signalwire.cli.types" - module: "signalwire.cli.types" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/types.py" ---- -# `DataMapConfig` - -DataMap function configuration - -## Signature - -```python -class DataMapConfig(TypedDict) -``` - -## Inheritance - -**Extends:** `TypedDict` - -## Properties - - - - - - - - - -## Source - -[`signalwire/signalwire/cli/types.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/types.py) - -Line 59. diff --git a/fern/products/sdk-reference/python/signalwire/cli/types/function-info/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/types/function-info/index.mdx deleted file mode 100644 index 170115f7ed..0000000000 --- a/fern/products/sdk-reference/python/signalwire/cli/types/function-info/index.mdx +++ /dev/null @@ -1,45 +0,0 @@ ---- -slug: "/reference/python/signalwire/cli/types/function-info" -title: "FunctionInfo" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.cli.types.FunctionInfo" - parent: "signalwire.cli.types" - module: "signalwire.cli.types" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/types.py" ---- -# `FunctionInfo` - -Information about a SWAIG function - -## Signature - -```python -class FunctionInfo(TypedDict) -``` - -## Inheritance - -**Extends:** `TypedDict` - -## Properties - - - - - - - - - - - -## Source - -[`signalwire/signalwire/cli/types.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/types.py) - -Line 75. diff --git a/fern/products/sdk-reference/python/signalwire/cli/types/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/types/index.mdx deleted file mode 100644 index b45c369540..0000000000 --- a/fern/products/sdk-reference/python/signalwire/cli/types/index.mdx +++ /dev/null @@ -1,60 +0,0 @@ ---- -slug: "/reference/python/signalwire/cli/types" -title: "types" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.cli.types" - parent: "signalwire.cli" - module: "signalwire.cli" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/types.py" ---- -# `types` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module types -``` - -## Classes - - - - Information about a discovered agent - - - - Call data structure for SWML post\_data - - - - DataMap function configuration - - - - Information about a SWAIG function - - - - Complete post\_data structure for SWML requests - - - - Variables data structure for SWML post\_data - - - -## Source - -[`signalwire/signalwire/cli/types.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/types.py) diff --git a/fern/products/sdk-reference/python/signalwire/cli/types/post-data/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/types/post-data/index.mdx deleted file mode 100644 index 2487e8ec5c..0000000000 --- a/fern/products/sdk-reference/python/signalwire/cli/types/post-data/index.mdx +++ /dev/null @@ -1,57 +0,0 @@ ---- -slug: "/reference/python/signalwire/cli/types/post-data" -title: "PostData" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.cli.types.PostData" - parent: "signalwire.cli.types" - module: "signalwire.cli.types" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/types.py" ---- -# `PostData` - -Complete post\_data structure for SWML requests - -## Signature - -```python -class PostData(TypedDict) -``` - -## Inheritance - -**Extends:** `TypedDict` - -## Properties - - - - - - - - - - - - - - - - - - - - - - - -## Source - -[`signalwire/signalwire/cli/types.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/types.py) - -Line 44. diff --git a/fern/products/sdk-reference/python/signalwire/cli/types/vars-data/index.mdx b/fern/products/sdk-reference/python/signalwire/cli/types/vars-data/index.mdx deleted file mode 100644 index 2bc387bc8b..0000000000 --- a/fern/products/sdk-reference/python/signalwire/cli/types/vars-data/index.mdx +++ /dev/null @@ -1,41 +0,0 @@ ---- -slug: "/reference/python/signalwire/cli/types/vars-data" -title: "VarsData" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.cli.types.VarsData" - parent: "signalwire.cli.types" - module: "signalwire.cli.types" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/types.py" ---- -# `VarsData` - -Variables data structure for SWML post\_data - -## Signature - -```python -class VarsData(TypedDict) -``` - -## Inheritance - -**Extends:** `TypedDict` - -## Properties - - - - - - - -## Source - -[`signalwire/signalwire/cli/types.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/types.py) - -Line 37. diff --git a/fern/products/sdk-reference/python/signalwire/core/agent-base/agent-base/index.mdx b/fern/products/sdk-reference/python/signalwire/core/agent-base/agent-base/index.mdx deleted file mode 100644 index d75dd6da2f..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/agent-base/agent-base/index.mdx +++ /dev/null @@ -1,779 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/agent-base/agent-base" -title: "AgentBase" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.core.agent_base.AgentBase" - parent: "signalwire.core.agent_base" - module: "signalwire.core.agent_base" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py" ---- -# `AgentBase` - -Base class for all SignalWire AI Agents. - -This class extends SWMLService and provides enhanced functionality for building agents including: - -- Prompt building and customization -- SWML rendering -- SWAIG function definition and execution -- Web service for serving SWML and handling webhooks -- Security and session management - -Subclassing options: - -1. Simple override of get\_prompt() for raw text -2. Using prompt\_\* methods for structured prompts -3. Declarative PROMPT\_SECTIONS class attribute - -## Signature - -```python -class AgentBase(AuthMixin, WebMixin, SWMLService, PromptMixin, SkillMixin, AIConfigMixin, ServerlessMixin, StateMixin, MCPServerMixin) -``` - -## Inheritance - -**Extends:** [AuthMixin](/docs/sdk-reference/reference/python/signalwire/core/mixins/auth-mixin/auth-mixin), [WebMixin](/docs/sdk-reference/reference/python/signalwire/core/mixins/web-mixin/web-mixin), [SWMLService](/docs/sdk-reference/reference/python/signalwire/core/swml-service/swml-service), [PromptMixin](/docs/sdk-reference/reference/python/signalwire/core/mixins/prompt-mixin/prompt-mixin), [SkillMixin](/docs/sdk-reference/reference/python/signalwire/core/mixins/skill-mixin/skill-mixin), [AIConfigMixin](/docs/sdk-reference/reference/python/signalwire/core/mixins/ai-config-mixin/ai-config-mixin), [ServerlessMixin](/docs/sdk-reference/reference/python/signalwire/core/mixins/serverless-mixin/serverless-mixin), [StateMixin](/docs/sdk-reference/reference/python/signalwire/core/mixins/state-mixin/state-mixin), [MCPServerMixin](/docs/sdk-reference/reference/python/signalwire/core/mixins/mcp-server-mixin/mcp-server-mixin) - -## Properties - - - - - - - - - - - - - - - - - -## Methods - -### \_\_init\_\_ - -Initialize a new agent - -#### Signature - -```python -__init__( - name: str, - route: str = '/', - host: str = '0.0.0.0', - port: Optional[int] = None, - basic_auth: Optional[Tuple[str, str]] = None, - use_pom: bool = True, - token_expiry_secs: int = 3600, - auto_answer: bool = True, - record_call: bool = False, - record_format: str = 'mp4', - record_stereo: bool = True, - default_webhook_url: Optional[str] = None, - agent_id: Optional[str] = None, - native_functions: Optional[List[str]] = None, - schema_path: Optional[str] = None, - suppress_logs: bool = False, - enable_post_prompt_override: bool = False, - check_for_input_override: bool = False, - config_file: Optional[str] = None, - schema_validation: bool = True, - signing_key: Optional[str] = None, - trust_proxy_for_signature: bool = False -) -``` - -#### Parameters - - - Agent name/identifier - - - - HTTP route path for this agent - - - - Host to bind the web server to - - - - Port to bind the web server to - - - - Optional (username, password) tuple for basic auth - - - - Whether to use POM for prompt building - - - - Seconds until tokens expire - - - - Whether to automatically answer calls - - - - Whether to record calls - - - - Recording format - - - - Whether to record in stereo - - - - Optional default webhook URL for all SWAIG functions - - - - Optional unique ID for this agent, generated if not provided - - - - Optional list of native functions to include in the SWAIG object - - - - Optional path to the schema file - - - - Whether to suppress structured logs - - - - Whether to enable post-prompt override - - - - Whether to enable check-for-input override - - - - Optional path to configuration file - - - - Enable SWML schema validation. Default True. Can also be disabled via SWML\_SKIP\_SCHEMA\_VALIDATION=1 env var. - - - - Optional SignalWire Signing Key (from Dashboard → API Credentials). When set, webhook signature validation is enforced on POST /, /swaig, /post\_prompt — unsigned or invalidly-signed requests get a 403. Falls back to the SIGNALWIRE\_SIGNING\_KEY env var if not passed. See porting-sdk/webhooks.md for the contract. - - - - If True, honor X-Forwarded-Proto / X-Forwarded-Host when reconstructing the URL during signature validation. Default False — proxy headers are spoofable, so opt in only when you control the proxy chain. - - -#### Source - -[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) - -Line 108. - -*** - -### add\_answer\_verb - -Configure the answer verb. - -The answer verb connects the call. Use this method to customize -answer behavior, such as setting max\_duration. - -> \[!NOTE] -> -> ### Set maximum call duration to 1 hour -> -> agent.add\_answer\_verb(\{"max\_duration": 3600\}) - -#### Signature - -```python -add_answer_verb(config: Optional[Dict[str, Any]] = None) -> AgentBase -``` - -#### Parameters - - - Optional answer verb configuration (e.g., \{"max\_duration": 3600\}) - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) - -Line 536. - -*** - -### add\_post\_ai\_verb - -Add a verb to run after the AI conversation ends. - -Post-AI verbs run when the AI completes its conversation. Common uses -include clean disconnects, transfers, and logging. - -> \[!NOTE] -> -> ### Log call completion and hang up -> -> agent.add\_post\_ai\_verb("request", \{ -> "url": "https://api.example.com/call-complete", -> "method": "POST" -> \}) -> agent.add\_post\_ai\_verb("hangup", \{\}) - -#### Signature - -```python -add_post_ai_verb(verb_name: str, config: Dict[str, Any]) -> AgentBase -``` - -#### Parameters - - - The SWML verb name (e.g., "hangup", "transfer", "request") - - - - Verb configuration dictionary - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) - -Line 581. - -*** - -### add\_post\_answer\_verb - -Add a verb to run after the call is answered but before the AI starts. - -Post-answer verbs run after the call is connected. Common uses include -welcome messages, legal disclaimers, and hold music. - -> \[!NOTE] -> -> ### Play welcome message -> -> agent.add\_post\_answer\_verb("play", \{ -> "url": "say:Welcome to Acme Corporation." -> \}) -> -> ### Brief pause -> -> agent.add\_post\_answer\_verb("sleep", \{"time": 500\}) - -#### Signature - -```python -add_post_answer_verb(verb_name: str, config: Dict[str, Any]) -> AgentBase -``` - -#### Parameters - - - The SWML verb name (e.g., "play", "sleep") - - - - Verb configuration dictionary - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) - -Line 556. - -*** - -### add\_pre\_answer\_verb - -Add a verb to run before the call is answered. - -Pre-answer verbs execute while the call is still ringing. Only certain -verbs are safe to use before answering: - -> \[!NOTE] -> cond, if, eval, set, unset, hangup, send\_sms, sleep, -> stop\_record\_call, stop\_denoise, stop\_tap - -Verbs with auto\_answer option (play, connect): Must include -"auto\_answer": False in config to prevent automatic answering. - -> \[!NOTE] -> -> ### Play ringback tone before answering -> -> agent.add\_pre\_answer\_verb("play", \{ -> "urls": \["ring:us"], -> "auto\_answer": False -> \}) - -#### Signature - -```python -add_pre_answer_verb(verb_name: str, config: Dict[str, Any]) -> AgentBase -``` - -#### Parameters - - - The SWML verb name (e.g., "play", "sleep", "request") - - - - Verb configuration dictionary - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Throws - -- `ValueError` — If verb is not safe for pre-answer use - -#### Source - -[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) - -Line 488. - -*** - -### add\_swaig\_query\_params - -Add query parameters that will be included in all SWAIG webhook URLs - -This is particularly useful for preserving dynamic configuration state -across SWAIG callbacks. For example, if your dynamic config adds skills -based on query parameters, you can pass those same parameters through -to the SWAIG webhook so the same configuration is applied. - -> \[!NOTE] -> def dynamic\_config(query\_params, body\_params, headers, agent): -> if query\_params.get('tier') == 'premium': -> agent.add\_skill('advanced\_search') -> \# Preserve the tier param so SWAIG callbacks work -> agent.add\_swaig\_query\_params(\{'tier': 'premium'\}) - -#### Signature - -```python -add_swaig_query_params(params: Dict[str, str]) -> AgentBase -``` - -#### Parameters - - - Dictionary of query parameters to add to SWAIG URLs - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) - -Line 753. - -*** - -### auto\_map\_sip\_usernames - -Automatically register common SIP usernames based on this agent's -name and route - -#### Signature - -```python -auto_map_sip_usernames() -> AgentBase -``` - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) - -Line 700. - -*** - -### clear\_post\_ai\_verbs - -Remove all post-AI verbs. - -#### Signature - -```python -clear_post_ai_verbs() -> AgentBase -``` - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) - -Line 626. - -*** - -### clear\_post\_answer\_verbs - -Remove all post-answer verbs. - -#### Signature - -```python -clear_post_answer_verbs() -> AgentBase -``` - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) - -Line 616. - -*** - -### clear\_pre\_answer\_verbs - -Remove all pre-answer verbs. - -#### Signature - -```python -clear_pre_answer_verbs() -> AgentBase -``` - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) - -Line 606. - -*** - -### clear\_swaig\_query\_params - -Clear all SWAIG query parameters - -#### Signature - -```python -clear_swaig_query_params() -> AgentBase -``` - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) - -Line 779. - -*** - -### enable\_sip\_routing - -Enable SIP-based routing for this agent - -This allows the agent to automatically route SIP requests based on SIP usernames. -When enabled, an endpoint at the specified path is automatically created -that will handle SIP requests and deliver them to this agent. - -#### Signature - -```python -enable_sip_routing(auto_map: bool = True, path: str = '/sip') -> AgentBase -``` - -#### Parameters - - - Whether to automatically map common SIP usernames to this agent (based on the agent name and route path) - - - - The path to register the SIP routing endpoint (default: "/sip") - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) - -Line 638. - -*** - -### get\_full\_url - -Get the full URL for this agent's endpoint - -#### Signature - -```python -get_full_url(include_auth: bool = False) -> str -``` - -#### Parameters - - - Whether to include authentication credentials in the URL - - -#### Returns - -`str` — Full URL including host, port, and route (with auth if requested) - -#### Source - -[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) - -Line 351. - -*** - -### get\_name - -Get agent name - -#### Signature - -```python -get_name() -> str -``` - -#### Returns - -`str` — Agent name - -#### Source - -[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) - -Line 342. - -*** - -### on\_debug\_event - -Register a handler for debug webhook events. - -Use as a decorator to receive real-time debug events from the AI module -during calls. Requires enable\_debug\_events() to be called first. - -> \[!NOTE] -> event\_type (str): The event label (e.g. "barge", "llm\_error", "session\_start") -> data (dict): The full event payload including call\_id, label, and event-specific fields - -The handler may be sync or async. - -> \[!NOTE] -> @agent.on\_debug\_event -> def handle(event\_type, data): -> if event\_type == "barge": -> print(f"Barge detected: \{data.get('barge\_elapsed\_ms')\}ms") - -#### Signature - -```python -on_debug_event(handler: Callable) -> Callable -``` - -#### Parameters - - - Callback function with signature (event\_type: str, data: dict) - - -#### Returns - -`Callable` — The handler function (unchanged), for use as a decorator - -#### Source - -[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) - -Line 458. - -*** - -### on\_summary - -Called when a post-prompt summary is received - -#### Signature - -```python -on_summary( - summary: Optional[Dict[str, Any]], - raw_data: Optional[Dict[str, Any]] = None -) -> None -``` - -#### Parameters - - - The summary object or None if no summary was found - - - - The complete raw POST data from the request - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) - -Line 447. - -*** - -### register\_sip\_username - -Register a SIP username that should be routed to this agent - -#### Signature - -```python -register_sip_username(sip_username: str) -> AgentBase -``` - -#### Parameters - - - SIP username to register - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) - -Line 682. - -*** - -### set\_post\_prompt\_url - -Override the default post\_prompt\_url with a supplied URL string - -#### Signature - -```python -set_post_prompt_url(url: str) -> AgentBase -``` - -#### Parameters - - - The URL to use for post-prompt summary delivery - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) - -Line 740. - -*** - -### set\_web\_hook\_url - -Override the default web\_hook\_url with a supplied URL string - -#### Signature - -```python -set_web_hook_url(url: str) -> AgentBase -``` - -#### Parameters - - - The URL to use for SWAIG function webhooks - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) - -Line 727. - -## Source - -[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) - -Line 78. diff --git a/fern/products/sdk-reference/python/signalwire/core/agent-base/index.mdx b/fern/products/sdk-reference/python/signalwire/core/agent-base/index.mdx deleted file mode 100644 index 109b39d598..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/agent-base/index.mdx +++ /dev/null @@ -1,44 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/agent-base" -title: "agent_base" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.core.agent_base" - parent: "signalwire.core" - module: "signalwire.core" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py" ---- -# `agent_base` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module agent_base -``` - -## Properties - - - -## Classes - - - - Base class for all SignalWire AI Agents. - - - -## Source - -[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/agent/config/index.mdx b/fern/products/sdk-reference/python/signalwire/core/agent/config/index.mdx deleted file mode 100644 index 99c927c957..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/agent/config/index.mdx +++ /dev/null @@ -1,36 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/agent/config" -title: "config" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.core.agent.config" - parent: "signalwire.core.agent" - module: "signalwire.core.agent" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/config/__init__.py" ---- -# `config` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module config -``` - -## Properties - - - -## Source - -[`signalwire/signalwire/core/agent/config/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/config/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/agent/deployment/handlers/index.mdx b/fern/products/sdk-reference/python/signalwire/core/agent/deployment/handlers/index.mdx deleted file mode 100644 index 3a66848798..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/agent/deployment/handlers/index.mdx +++ /dev/null @@ -1,32 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/agent/deployment/handlers" -title: "handlers" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.core.agent.deployment.handlers" - parent: "signalwire.core.agent.deployment" - module: "signalwire.core.agent.deployment" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/deployment/handlers/__init__.py" ---- -# `handlers` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module handlers -``` - -## Source - -[`signalwire/signalwire/core/agent/deployment/handlers/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/deployment/handlers/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/agent/deployment/index.mdx b/fern/products/sdk-reference/python/signalwire/core/agent/deployment/index.mdx deleted file mode 100644 index f513ec6933..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/agent/deployment/index.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/agent/deployment" -title: "deployment" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.core.agent.deployment" - parent: "signalwire.core.agent" - module: "signalwire.core.agent" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/deployment/__init__.py" ---- -# `deployment` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module deployment -``` - -## Modules - - - - Copyright (c) 2025 SignalWire - - - -## Source - -[`signalwire/signalwire/core/agent/deployment/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/deployment/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/agent/index.mdx b/fern/products/sdk-reference/python/signalwire/core/agent/index.mdx deleted file mode 100644 index 2ae5b9e15a..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/agent/index.mdx +++ /dev/null @@ -1,68 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/agent" -title: "agent" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.core.agent" - parent: "signalwire.core" - module: "signalwire.core" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/__init__.py" ---- -# `agent` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module agent -``` - -## Properties - - - -## Modules - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - -## Source - -[`signalwire/signalwire/core/agent/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/agent/prompt/index.mdx b/fern/products/sdk-reference/python/signalwire/core/agent/prompt/index.mdx deleted file mode 100644 index ff8f923ed3..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/agent/prompt/index.mdx +++ /dev/null @@ -1,44 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/agent/prompt" -title: "prompt" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.core.agent.prompt" - parent: "signalwire.core.agent" - module: "signalwire.core.agent" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/__init__.py" ---- -# `prompt` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module prompt -``` - -## Properties - - - -## Modules - - - - Copyright (c) 2025 SignalWire - - - -## Source - -[`signalwire/signalwire/core/agent/prompt/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/agent/prompt/manager/index.mdx b/fern/products/sdk-reference/python/signalwire/core/agent/prompt/manager/index.mdx deleted file mode 100644 index 5d00864bc2..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/agent/prompt/manager/index.mdx +++ /dev/null @@ -1,44 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/agent/prompt/manager" -title: "manager" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.core.agent.prompt.manager" - parent: "signalwire.core.agent.prompt" - module: "signalwire.core.agent.prompt" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py" ---- -# `manager` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module manager -``` - -## Properties - - - -## Classes - - - - Manages prompt building and configuration. - - - -## Source - -[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/agent/prompt/manager/prompt-manager/index.mdx b/fern/products/sdk-reference/python/signalwire/core/agent/prompt/manager/prompt-manager/index.mdx deleted file mode 100644 index 9a1e2783cd..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/agent/prompt/manager/prompt-manager/index.mdx +++ /dev/null @@ -1,434 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/agent/prompt/manager/prompt-manager" -title: "PromptManager" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.core.agent.prompt.manager.PromptManager" - parent: "signalwire.core.agent.prompt.manager" - module: "signalwire.core.agent.prompt.manager" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py" ---- -# `PromptManager` - -Manages prompt building and configuration. - -## Signature - -```python -class PromptManager -``` - -## Properties - - - -## Methods - -### \_\_init\_\_ - -Initialize PromptManager with reference to parent agent. - -#### Signature - -```python -__init__(agent) -``` - -#### Parameters - - - Parent AgentBase instance - - -#### Source - -[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) - -Line 23. - -*** - -### define\_contexts - -Define contexts for the agent. - -#### Signature - -```python -define_contexts(contexts: Union[Dict[str, Any], Any]) -> None -``` - -#### Parameters - - - Context configuration (dict or ContextBuilder) - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) - -Line 73. - -*** - -### get\_contexts - -Get the contexts configuration. - -#### Signature - -```python -get_contexts() -> Optional[Dict[str, Any]] -``` - -#### Returns - -`Optional[Dict[str, Any]]` — Contexts dict or None - -#### Source - -[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) - -Line 300. - -*** - -### get\_post\_prompt - -Get the post-prompt text. - -#### Signature - -```python -get_post_prompt() -> Optional[str] -``` - -#### Returns - -`Optional[str]` — Post-prompt text or None - -#### Source - -[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) - -Line 291. - -*** - -### get\_prompt - -Get the prompt configuration. - -#### Signature - -```python -get_prompt() -> Optional[Union[str, List[Dict[str, Any]]]] -``` - -#### Returns - -`Optional[Union[str, List[Dict[str, Any]]]]` — Prompt text or sections or None - -#### Source - -[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) - -Line 273. - -*** - -### get\_raw\_prompt - -Get the raw prompt text if set. - -#### Signature - -```python -get_raw_prompt() -> Optional[str] -``` - -#### Returns - -`Optional[str]` — Raw prompt text or None - -#### Source - -[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) - -Line 282. - -*** - -### prompt\_add\_section - -Add a section to the prompt. - -#### Signature - -```python -prompt_add_section( - title: str, - body: str = '', - bullets: Optional[List[str]] = None, - numbered: bool = False, - numbered_bullets: bool = False, - subsections: Optional[List[Dict[str, Any]]] = None -) -> None -``` - -#### Parameters - - - Section title - - - - Optional section body text - - - - Optional list of bullet points - - - - Whether this section should be numbered - - - - Whether bullets should be numbered - - - - Optional list of subsection objects - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) - -Line 127. - -*** - -### prompt\_add\_subsection - -Add a subsection to an existing section (creating parent if needed). - -#### Signature - -```python -prompt_add_subsection( - parent_title: str, - title: str, - body: str = '', - bullets: Optional[List[str]] = None -) -> None -``` - -#### Parameters - - - Parent section title - - - - Subsection title - - - - Optional subsection body text - - - - Optional list of bullet points - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) - -Line 220. - -*** - -### prompt\_add\_to\_section - -Add content to an existing section (creating it if needed). - -#### Signature - -```python -prompt_add_to_section( - title: str, - body: Optional[str] = None, - bullet: Optional[str] = None, - bullets: Optional[List[str]] = None -) -> None -``` - -#### Parameters - - - Section title - - - - Optional text to append to section body - - - - Optional single bullet point to add - - - - Optional list of bullet points to add - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) - -Line 179. - -*** - -### prompt\_has\_section - -Check if a section exists in the prompt. - -#### Signature - -```python -prompt_has_section(title: str) -> bool -``` - -#### Parameters - - - Section title to check - - -#### Returns - -`bool` — True if section exists, False otherwise - -#### Source - -[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) - -Line 258. - -*** - -### set\_post\_prompt - -Set the post-prompt text. - -#### Signature - -```python -set_post_prompt(text: str) -> None -``` - -#### Parameters - - - Post-prompt text - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) - -Line 102. - -*** - -### set\_prompt\_pom - -Set the prompt as a POM dictionary. - -#### Signature - -```python -set_prompt_pom(pom: List[Dict[str, Any]]) -> None -``` - -#### Parameters - - - POM dictionary structure - - -#### Returns - -`None` - -#### Throws - -- `ValueError` — If use\_pom is False - -#### Source - -[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) - -Line 112. - -*** - -### set\_prompt\_text - -Set the agent's prompt as raw text. - -#### Signature - -```python -set_prompt_text(text: str) -> None -``` - -#### Parameters - - - Prompt text - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) - -Line 91. - -## Source - -[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) - -Line 20. diff --git a/fern/products/sdk-reference/python/signalwire/core/agent/routing/index.mdx b/fern/products/sdk-reference/python/signalwire/core/agent/routing/index.mdx deleted file mode 100644 index c4c479a5d7..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/agent/routing/index.mdx +++ /dev/null @@ -1,32 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/agent/routing" -title: "routing" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.core.agent.routing" - parent: "signalwire.core.agent" - module: "signalwire.core.agent" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/routing/__init__.py" ---- -# `routing` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module routing -``` - -## Source - -[`signalwire/signalwire/core/agent/routing/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/routing/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/agent/security/index.mdx b/fern/products/sdk-reference/python/signalwire/core/agent/security/index.mdx deleted file mode 100644 index c0bb8eb1a3..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/agent/security/index.mdx +++ /dev/null @@ -1,32 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/agent/security" -title: "security" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.core.agent.security" - parent: "signalwire.core.agent" - module: "signalwire.core.agent" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/security/__init__.py" ---- -# `security` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module security -``` - -## Source - -[`signalwire/signalwire/core/agent/security/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/security/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/agent/swml/index.mdx b/fern/products/sdk-reference/python/signalwire/core/agent/swml/index.mdx deleted file mode 100644 index aaaeac9ce2..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/agent/swml/index.mdx +++ /dev/null @@ -1,32 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/agent/swml" -title: "swml" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.core.agent.swml" - parent: "signalwire.core.agent" - module: "signalwire.core.agent" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/swml/__init__.py" ---- -# `swml` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module swml -``` - -## Source - -[`signalwire/signalwire/core/agent/swml/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/swml/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/agent/tools/decorator/index.mdx b/fern/products/sdk-reference/python/signalwire/core/agent/tools/decorator/index.mdx deleted file mode 100644 index 74ef4378cd..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/agent/tools/decorator/index.mdx +++ /dev/null @@ -1,44 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/agent/tools/decorator" -title: "decorator" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.core.agent.tools.decorator" - parent: "signalwire.core.agent.tools" - module: "signalwire.core.agent.tools" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/decorator.py" ---- -# `decorator` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module decorator -``` - -## Properties - - - -## Classes - - - - Handles tool decoration logic. - - - -## Source - -[`signalwire/signalwire/core/agent/tools/decorator.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/decorator.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/agent/tools/decorator/tool-decorator/index.mdx b/fern/products/sdk-reference/python/signalwire/core/agent/tools/decorator/tool-decorator/index.mdx deleted file mode 100644 index 4f66700e58..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/agent/tools/decorator/tool-decorator/index.mdx +++ /dev/null @@ -1,85 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/agent/tools/decorator/tool-decorator" -title: "ToolDecorator" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.core.agent.tools.decorator.ToolDecorator" - parent: "signalwire.core.agent.tools.decorator" - module: "signalwire.core.agent.tools.decorator" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/decorator.py" ---- -# `ToolDecorator` - -Handles tool decoration logic. - -## Signature - -```python -class ToolDecorator -``` - -## Methods - -### create\_class\_decorator - -Create class tool decorator. - -**Modifiers:** `classmethod` - -#### Signature - -```python -@classmethod -create_class_decorator() -``` - -#### Returns - -Decorator function - -#### Source - -[`signalwire/signalwire/core/agent/tools/decorator.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/decorator.py) - -Line 132. - -*** - -### create\_instance\_decorator - -Create instance tool decorator. - -**Modifiers:** `static` - -#### Signature - -```python -@staticmethod -create_instance_decorator(registry) -``` - -#### Parameters - - - ToolRegistry instance to register with - - -#### Returns - -Decorator function - -#### Source - -[`signalwire/signalwire/core/agent/tools/decorator.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/decorator.py) - -Line 23. - -## Source - -[`signalwire/signalwire/core/agent/tools/decorator.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/decorator.py) - -Line 20. diff --git a/fern/products/sdk-reference/python/signalwire/core/agent/tools/index.mdx b/fern/products/sdk-reference/python/signalwire/core/agent/tools/index.mdx deleted file mode 100644 index fa63cadb09..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/agent/tools/index.mdx +++ /dev/null @@ -1,52 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/agent/tools" -title: "tools" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.core.agent.tools" - parent: "signalwire.core.agent" - module: "signalwire.core.agent" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/__init__.py" ---- -# `tools` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module tools -``` - -## Properties - - - -## Modules - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - -## Source - -[`signalwire/signalwire/core/agent/tools/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/agent/tools/registry/index.mdx b/fern/products/sdk-reference/python/signalwire/core/agent/tools/registry/index.mdx deleted file mode 100644 index 5ffc67b78b..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/agent/tools/registry/index.mdx +++ /dev/null @@ -1,44 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/agent/tools/registry" -title: "registry" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.core.agent.tools.registry" - parent: "signalwire.core.agent.tools" - module: "signalwire.core.agent.tools" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/registry.py" ---- -# `registry` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module registry -``` - -## Properties - - - -## Classes - - - - Manages SWAIG function registration. - - - -## Source - -[`signalwire/signalwire/core/agent/tools/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/registry.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/agent/tools/registry/tool-registry/index.mdx b/fern/products/sdk-reference/python/signalwire/core/agent/tools/registry/tool-registry/index.mdx deleted file mode 100644 index 1b7f23a31d..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/agent/tools/registry/tool-registry/index.mdx +++ /dev/null @@ -1,309 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/agent/tools/registry/tool-registry" -title: "ToolRegistry" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.core.agent.tools.registry.ToolRegistry" - parent: "signalwire.core.agent.tools.registry" - module: "signalwire.core.agent.tools.registry" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/registry.py" ---- -# `ToolRegistry` - -Manages SWAIG function registration. - -## Signature - -```python -class ToolRegistry -``` - -## Properties - - - -## Methods - -### \_\_init\_\_ - -Initialize ToolRegistry with reference to parent agent. - -#### Signature - -```python -__init__(agent) -``` - -#### Parameters - - - Parent AgentBase instance - - -#### Source - -[`signalwire/signalwire/core/agent/tools/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/registry.py) - -Line 24. - -*** - -### define\_tool - -Define a SWAIG function that the AI can call. - -#### Signature - -```python -define_tool( - name: str, - description: str, - parameters: Dict[str, Any], - handler: Callable, - secure: bool = True, - fillers: Optional[Dict[str, List[str]]] = None, - wait_file: Optional[str] = None, - wait_file_loops: Optional[int] = None, - webhook_url: Optional[str] = None, - required: Optional[List[str]] = None, - is_typed_handler: bool = False, - **swaig_fields = {} -) -> None -``` - -#### Parameters - - - Function name (must be unique) - - - - Function description for the AI - - - - JSON Schema of parameters - - - - Function to call when invoked - - - - Whether to require token validation - - - - Optional dict mapping language codes to arrays of filler phrases (deprecated) - - - - Optional URL to audio file to play while function executes - - - - Optional number of times to loop the wait\_file - - - - Optional external webhook URL to use instead of local handling - - - - Optional list of required parameter names - - - - Whether the handler uses type-hinted parameters - - - - -#### Returns - -`None` - -#### Throws - -- `ValueError` — If tool name already exists - -#### Source - -[`signalwire/signalwire/core/agent/tools/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/registry.py) - -Line 35. - -*** - -### get\_all\_functions - -Get all registered functions. - -#### Signature - -```python -get_all_functions() -> Dict[str, Union[SWAIGFunction, Dict[str, Any]]] -``` - -#### Returns - -`Dict[str, Union[SWAIGFunction, Dict[str, Any]]]` — Dictionary of function name to function object/dict - -#### Source - -[`signalwire/signalwire/core/agent/tools/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/registry.py) - -Line 204. - -*** - -### get\_function - -Get a registered function by name. - -#### Signature - -```python -get_function(name: str) -> Optional[Union[SWAIGFunction, Dict[str, Any]]] -``` - -#### Parameters - - - Function name - - -#### Returns - -`Optional[Union[SWAIGFunction, Dict[str, Any]]]` — SWAIGFunction instance or raw function dict, or None if not found - -#### Source - -[`signalwire/signalwire/core/agent/tools/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/registry.py) - -Line 192. - -*** - -### has\_function - -Check if a function is registered. - -#### Signature - -```python -has_function(name: str) -> bool -``` - -#### Parameters - - - Function name - - -#### Returns - -`bool` — True if function exists, False otherwise - -#### Source - -[`signalwire/signalwire/core/agent/tools/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/registry.py) - -Line 213. - -*** - -### register\_class\_decorated\_tools - -Register tools defined with @AgentBase.tool class decorator. - -This method scans the class for methods decorated with @AgentBase.tool -and registers them automatically. If parameters are not explicitly -provided and the function has type-hinted parameters, the schema -is inferred from the type hints. - -#### Signature - -```python -register_class_decorated_tools() -> None -``` - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/core/agent/tools/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/registry.py) - -Line 116. - -*** - -### register\_swaig\_function - -Register a raw SWAIG function dictionary (e.g., from DataMap.to\_swaig\_function()). - -#### Signature - -```python -register_swaig_function(function_dict: Dict[str, Any]) -> None -``` - -#### Parameters - - - Complete SWAIG function definition dictionary - - -#### Returns - -`None` - -#### Throws - -- `ValueError` — If function name missing or already exists - -#### Source - -[`signalwire/signalwire/core/agent/tools/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/registry.py) - -Line 90. - -*** - -### remove\_function - -Remove a registered function. - -#### Signature - -```python -remove_function(name: str) -> bool -``` - -#### Parameters - - - Function name - - -#### Returns - -`bool` — True if removed, False if not found - -#### Source - -[`signalwire/signalwire/core/agent/tools/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/registry.py) - -Line 225. - -## Source - -[`signalwire/signalwire/core/agent/tools/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/registry.py) - -Line 21. diff --git a/fern/products/sdk-reference/python/signalwire/core/agent/tools/type-inference/index.mdx b/fern/products/sdk-reference/python/signalwire/core/agent/tools/type-inference/index.mdx deleted file mode 100644 index f8b1ebe897..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/agent/tools/type-inference/index.mdx +++ /dev/null @@ -1,99 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/agent/tools/type-inference" -title: "type_inference" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.core.agent.tools.type_inference" - parent: "signalwire.core.agent.tools" - module: "signalwire.core.agent.tools" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/type_inference.py" ---- -# `type_inference` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module type_inference -``` - -## Functions - -### create\_typed\_handler\_wrapper - -Wrap a typed handler function so it can be called with the standard -SWAIG calling convention (args\_dict, raw\_data). - -The wrapper unpacks the args dict into keyword arguments for the -original function. - -#### Signature - -```python -create_typed_handler_wrapper(func, has_raw_data: bool) -``` - -#### Parameters - - - The original typed handler function. - - - - If True, pass raw\_data as a keyword argument. - - -#### Returns - -A wrapper function with signature (args, raw\_data). - -#### Source - -[`signalwire/signalwire/core/agent/tools/type_inference.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/type_inference.py) - -Line 248. - -*** - -### infer\_schema - -Inspect a function's signature and type hints to infer a JSON Schema -for SWAIG tool parameters. - -#### Signature - -```python -infer_schema( - func -) -> Tuple[Dict[str, Dict], List[str], Optional[str], bool, bool] -``` - -#### Parameters - - - The function to inspect. - - -#### Returns - -`Tuple[Dict[str, Dict], List[str], Optional[str], bool, bool]` — A tuple of (parameters, required, description, is\_typed, has\_raw\_data): - parameters: dict mapping parameter names to JSON Schema property dicts - required: list of required parameter names - description: tool description from docstring (or None) - is\_typed: True if the function uses typed parameters (new style) - has\_raw\_data: True if the function accepts a `raw_data` parameter - -#### Source - -[`signalwire/signalwire/core/agent/tools/type_inference.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/type_inference.py) - -Line 147. - -## Source - -[`signalwire/signalwire/core/agent/tools/type_inference.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/type_inference.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/auth-handler/auth-handler/index.mdx b/fern/products/sdk-reference/python/signalwire/core/auth-handler/auth-handler/index.mdx deleted file mode 100644 index be79cc0910..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/auth-handler/auth-handler/index.mdx +++ /dev/null @@ -1,220 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/auth-handler/auth-handler" -title: "AuthHandler" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.core.auth_handler.AuthHandler" - parent: "signalwire.core.auth_handler" - module: "signalwire.core.auth_handler" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/auth_handler.py" ---- -# `AuthHandler` - -Unified authentication handler supporting multiple auth methods. - -This class provides a clean pattern for handling Basic Auth, Bearer tokens, -and API keys across all SignalWire services. - -## Signature - -```python -class AuthHandler -``` - -## Properties - - - - - - - -## Methods - -### \_\_init\_\_ - -Initialize auth handler with security configuration. - -#### Signature - -```python -__init__(security_config: SecurityConfig) -``` - -#### Parameters - - - SecurityConfig instance with auth settings - - -#### Source - -[`signalwire/signalwire/core/auth_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/auth_handler.py) - -Line 38. - -*** - -### flask\_decorator - -Flask decorator for authentication. - -This provides compatibility with Flask-based services like MCP Gateway. - -#### Signature - -```python -flask_decorator(f: Callable) -> Callable -``` - -#### Parameters - - - -#### Returns - -`Callable` - -#### Source - -[`signalwire/signalwire/core/auth_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/auth_handler.py) - -Line 160. - -*** - -### get\_auth\_info - -Get information about configured auth methods - -#### Signature - -```python -get_auth_info() -> Dict[str, Any] -``` - -#### Returns - -`Dict[str, Any]` - -#### Source - -[`signalwire/signalwire/core/auth_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/auth_handler.py) - -Line 209. - -*** - -### get\_fastapi\_dependency - -Get FastAPI dependency for authentication. - -#### Signature - -```python -get_fastapi_dependency(optional: bool = False) -``` - -#### Parameters - - - If True, authentication is optional - - -#### Returns - -FastAPI dependency function - -#### Source - -[`signalwire/signalwire/core/auth_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/auth_handler.py) - -Line 114. - -*** - -### verify\_api\_key - -Verify API key - -#### Signature - -```python -verify_api_key(api_key: str) -> bool -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`signalwire/signalwire/core/auth_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/auth_handler.py) - -Line 106. - -*** - -### verify\_basic\_auth - -Verify basic auth credentials - -#### Signature - -```python -verify_basic_auth(credentials: HTTPBasicCredentials) -> bool -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`signalwire/signalwire/core/auth_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/auth_handler.py) - -Line 81. - -*** - -### verify\_bearer\_token - -Verify bearer token - -#### Signature - -```python -verify_bearer_token(credentials: HTTPAuthorizationCredentials) -> bool -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`signalwire/signalwire/core/auth_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/auth_handler.py) - -Line 96. - -## Source - -[`signalwire/signalwire/core/auth_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/auth_handler.py) - -Line 30. diff --git a/fern/products/sdk-reference/python/signalwire/core/auth-handler/index.mdx b/fern/products/sdk-reference/python/signalwire/core/auth-handler/index.mdx deleted file mode 100644 index f63f9b6ecb..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/auth-handler/index.mdx +++ /dev/null @@ -1,44 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/auth-handler" -title: "auth_handler" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.core.auth_handler" - parent: "signalwire.core" - module: "signalwire.core" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/auth_handler.py" ---- -# `auth_handler` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module auth_handler -``` - -## Properties - - - -## Classes - - - - Unified authentication handler supporting multiple auth methods. - - - -## Source - -[`signalwire/signalwire/core/auth_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/auth_handler.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/config-loader/config-loader/index.mdx b/fern/products/sdk-reference/python/signalwire/core/config-loader/config-loader/index.mdx deleted file mode 100644 index adf0a53eec..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/config-loader/config-loader/index.mdx +++ /dev/null @@ -1,293 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/config-loader/config-loader" -title: "ConfigLoader" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.core.config_loader.ConfigLoader" - parent: "signalwire.core.config_loader" - module: "signalwire.core.config_loader" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/config_loader.py" ---- -# `ConfigLoader` - -Configuration loader with environment variable substitution. - -Supports $\{VAR|default\} syntax for referencing environment variables -within JSON configuration files. This provides a clean pattern for -configuration across all SignalWire services. - -## Signature - -```python -class ConfigLoader -``` - -## Properties - - - -## Methods - -### \_\_init\_\_ - -Initialize config loader. - -#### Signature - -```python -__init__(config_paths: Optional[List[str]] = None) -``` - -#### Parameters - - - Optional list of config file paths to check. If not provided, uses default search paths. - - -#### Source - -[`signalwire/signalwire/core/config_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/config_loader.py) - -Line 28. - -*** - -### find\_config\_file - -Static method to find a config file for a service. - -**Modifiers:** `static` - -#### Signature - -```python -@staticmethod -find_config_file( - service_name: Optional[str] = None, - additional_paths: Optional[List[str]] = None -) -> Optional[str] -``` - -#### Parameters - - - Optional service name for service-specific config - - - - Additional paths to check - - -#### Returns - -`Optional[str]` — Path to the first config file found, or None - -#### Source - -[`signalwire/signalwire/core/config_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/config_loader.py) - -Line 224. - -*** - -### get - -Get a configuration value by dot-notation path. - -#### Signature - -```python -get(key_path: str, default: Any = None) -> Any -``` - -#### Parameters - - - Dot-separated path (e.g., "security.ssl\_enabled") - - - - Default value if path not found - - -#### Returns - -`Any` — The configuration value with variables substituted - -#### Source - -[`signalwire/signalwire/core/config_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/config_loader.py) - -Line 129. - -*** - -### get\_config - -Get the raw configuration (before substitution). - -#### Signature - -```python -get_config() -> Dict[str, Any] -``` - -#### Returns - -`Dict[str, Any]` - -#### Source - -[`signalwire/signalwire/core/config_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/config_loader.py) - -Line 73. - -*** - -### get\_config\_file - -Get the path of the loaded config file. - -#### Signature - -```python -get_config_file() -> Optional[str] -``` - -#### Returns - -`Optional[str]` - -#### Source - -[`signalwire/signalwire/core/config_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/config_loader.py) - -Line 69. - -*** - -### get\_section - -Get an entire configuration section. - -#### Signature - -```python -get_section(section: str) -> Dict[str, Any] -``` - -#### Parameters - - - The section name (e.g., "security", "server") - - -#### Returns - -`Dict[str, Any]` — The configuration section with all variables substituted - -#### Source - -[`signalwire/signalwire/core/config_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/config_loader.py) - -Line 156. - -*** - -### has\_config - -Check if a configuration was loaded. - -#### Signature - -```python -has_config() -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`signalwire/signalwire/core/config_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/config_loader.py) - -Line 65. - -*** - -### merge\_with\_env - -Merge configuration with environment variables. - -Config file takes precedence over environment variables, -but config can reference env vars via substitution. - -#### Signature - -```python -merge_with_env(env_prefix: str = 'SWML_') -> Dict[str, Any] -``` - -#### Parameters - - - Prefix for environment variables to consider - - -#### Returns - -`Dict[str, Any]` — Merged configuration dictionary - -#### Source - -[`signalwire/signalwire/core/config_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/config_loader.py) - -Line 171. - -*** - -### substitute\_vars - -Recursively substitute environment variables in configuration values. - -Supports $\{VAR|default\} syntax where: - -- VAR is the environment variable name -- default is the fallback value if VAR is not set - -#### Signature - -```python -substitute_vars(value: Any, max_depth: int = 10) -> Any -``` - -#### Parameters - - - The value to process (can be string, dict, list, etc.) - - - - Maximum recursion depth to prevent infinite loops - - -#### Returns - -`Any` — The value with all environment variables substituted - -#### Source - -[`signalwire/signalwire/core/config_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/config_loader.py) - -Line 77. - -## Source - -[`signalwire/signalwire/core/config_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/config_loader.py) - -Line 19. diff --git a/fern/products/sdk-reference/python/signalwire/core/config-loader/index.mdx b/fern/products/sdk-reference/python/signalwire/core/config-loader/index.mdx deleted file mode 100644 index eb55685c06..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/config-loader/index.mdx +++ /dev/null @@ -1,44 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/config-loader" -title: "config_loader" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.core.config_loader" - parent: "signalwire.core" - module: "signalwire.core" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/config_loader.py" ---- -# `config_loader` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module config_loader -``` - -## Properties - - - -## Classes - - - - Configuration loader with environment variable substitution. - - - -## Source - -[`signalwire/signalwire/core/config_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/config_loader.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/contexts/context-builder/index.mdx b/fern/products/sdk-reference/python/signalwire/core/contexts/context-builder/index.mdx deleted file mode 100644 index bbffa31a53..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/contexts/context-builder/index.mdx +++ /dev/null @@ -1,240 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/contexts/context-builder" -title: "ContextBuilder" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.core.contexts.ContextBuilder" - parent: "signalwire.core.contexts" - module: "signalwire.core.contexts" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py" ---- -# `ContextBuilder` - -Builder for multi-step, multi-context AI agent workflows. - -A ContextBuilder owns one or more Contexts; each Context owns an ordered -list of Steps. Only one context and one step is active at a time. Per -chat turn, the runtime injects the current step's instructions as a -system message, then asks the LLM for a response. - -## Native tools auto-injected by the runtime - -When a step (or its enclosing context) declares `valid_steps` or -`valid_contexts`, the runtime auto-injects two native tools so the model -can navigate the flow: - -- `next_step(step: enum)` — present when valid\_steps is set -- `change_context(context: enum)` — present when valid\_contexts is set - -Their `enum` schemas are rewritten on every turn to match whatever -valid\_steps / valid\_contexts apply to the current step. You do NOT need -to define these tools yourself; they appear automatically. - -A third native tool — `gather_submit` — is injected during gather\_info -questioning (see Step.set\_gather\_info / add\_gather\_question). - -These three names — `next_step`, `change_context`, `gather_submit` -— are reserved. ContextBuilder.validate() will reject any agent that -defines a SWAIG tool with one of these names. - -## Function whitelisting (Step.set\_functions) - -Each step may declare a `functions` whitelist. The whitelist is applied -in-memory at the start of each LLM turn. CRITICALLY: if a step does NOT -declare a `functions` field, it INHERITS the previous step's active set. -See Step.set\_functions() for details and examples. - -## Validation - -Call validate() (or to\_dict(), which calls it) to check that: - -- At least one context is defined -- A single context must be named "default" -- Every context has at least one step -- valid\_steps references resolve to real step names (or "next") -- valid\_contexts references resolve to real context names -- gather\_info questions are non-empty and have unique keys -- gather\_info completion\_action targets a reachable step -- No user-defined SWAIG tool collides with a reserved native name - -## Signature - -```python -class ContextBuilder -``` - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(agent) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) - -Line 1154. - -*** - -### add\_context - -Add a new context - -#### Signature - -```python -add_context(name: str) -> Context -``` - -#### Parameters - - - Context name - - -#### Returns - -`Context` — Context object for method chaining - -#### Source - -[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) - -Line 1182. - -*** - -### get\_context - -Get an existing context by name for inspection or modification. - -#### Signature - -```python -get_context(name: str) -> Optional[Context] -``` - -#### Parameters - - - Context name - - -#### Returns - -`Optional[Context]` — Context object if found, None otherwise - -#### Source - -[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) - -Line 1203. - -*** - -### reset - -Remove all contexts, returning the builder to its initial state. - -Use this in a dynamic config callback when you need to rebuild -contexts from scratch for a specific request — e.g. skipping a -greeting context on transfers. - -Example:: - -``` -def on_dynamic_config(query, body, headers, agent): - if query.get("transfer"): - agent.define_contexts().reset() - ctx = agent.define_contexts().add_context("default") - ctx.add_step("route").set_text("Route the caller.") -``` - -#### Signature - -```python -reset() -> ContextBuilder -``` - -#### Returns - -`ContextBuilder` — Self for method chaining. - -#### Examples - -```python -def on_dynamic_config(query, body, headers, agent): - if query.get("transfer"): - agent.define_contexts().reset() - ctx = agent.define_contexts().add_context("default") - ctx.add_step("route").set_text("Route the caller.") -``` - -#### Source - -[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) - -Line 1159. - -*** - -### to\_dict - -Convert all contexts to dictionary for SWML generation - -#### Signature - -```python -to_dict() -> Dict[str, Any] -``` - -#### Returns - -`Dict[str, Any]` - -#### Source - -[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) - -Line 1339. - -*** - -### validate - -Validate the contexts configuration - -#### Signature - -```python -validate() -> None -``` - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) - -Line 1215. - -## Source - -[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) - -Line 1105. diff --git a/fern/products/sdk-reference/python/signalwire/core/contexts/context/index.mdx b/fern/products/sdk-reference/python/signalwire/core/contexts/context/index.mdx deleted file mode 100644 index 42db5226f8..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/contexts/context/index.mdx +++ /dev/null @@ -1,816 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/contexts/context" -title: "Context" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.core.contexts.Context" - parent: "signalwire.core.contexts" - module: "signalwire.core.contexts" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py" ---- -# `Context` - -A single context containing an ordered list of steps. - -## Conversation history across context switches - -By default (`isolated=False`), switching from one context to another -via `change_context` PRESERVES the entire conversation history. The -user's prior turns and the model's prior responses remain visible -on the next LLM call. The only thing that changes is which step -instructions get injected. - -A common confusion: "the AI re-asked for information the user already -gave." If you see this, history loss is almost never the cause — -history is preserved unless you set `isolated=True`. The real cause -is usually one of: - -- The destination step's `text` literally tells the model to ask - ("Ask the user for their account number"). The model follows - instructions; rephrase to "Confirm the user's account number" - or have the step instructions check global\_data first. -- The relevant info was never extracted into global\_data, so - $\{var\} expansion has nothing to inject and the step prompt - looks generic. Add a webhook that captures the field. -- You explicitly called `set_isolated(True)` on the destination - context. Isolated contexts wipe the conversation array on entry. - Pair with `set_consolidate(True)` if you want a summary instead. - -See Context.set\_isolated() for the wipe semantics, and the SDK's -FunctionResult.swml\_change\_step / swml\_change\_context docstrings -for how to communicate transition intent through tool response text -and global\_data. - -## Signature - -```python -class Context -``` - -## Properties - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(name: str) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) - -Line 571. - -*** - -### add\_bullets - -Add a POM section with bullet points to the context prompt - -#### Signature - -```python -add_bullets(title: str, bullets: List[str]) -> Context -``` - -#### Parameters - - - Section title - - - - List of bullet points - - -#### Returns - -`Context` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) - -Line 916. - -*** - -### add\_enter\_filler - -Add enter fillers for a specific language - -#### Signature - -```python -add_enter_filler(language_code: str, fillers: List[str]) -> Context -``` - -#### Parameters - - - Language code (e.g., "en-US", "es") or "default" for catch-all - - - - List of filler phrases for entering this context - - -#### Returns - -`Context` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) - -Line 962. - -*** - -### add\_exit\_filler - -Add exit fillers for a specific language - -#### Signature - -```python -add_exit_filler(language_code: str, fillers: List[str]) -> Context -``` - -#### Parameters - - - Language code (e.g., "en-US", "es") or "default" for catch-all - - - - List of filler phrases for exiting this context - - -#### Returns - -`Context` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) - -Line 979. - -*** - -### add\_section - -Add a POM section to the context prompt - -#### Signature - -```python -add_section(title: str, body: str) -> Context -``` - -#### Parameters - - - Section title - - - - Section body text - - -#### Returns - -`Context` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) - -Line 900. - -*** - -### add\_step - -Add a new step to this context. - -When called with only `name` the returned Step can be configured -with the usual method-chaining API. When the optional keyword -arguments are supplied the step is fully configured in one call: - -#### Signature - -```python -add_step( - name: str, - *, - task: Optional[str] = None, - bullets: Optional[List[str]] = None, - criteria: Optional[str] = None, - functions: Optional[Union[str, List[str]]] = None, - valid_steps: Optional[List[str]] = None -) -> Step -``` - -#### Parameters - - - Step name (must be unique within the context). - - - - Text for the "Task" section (equivalent to `step.add_section("Task", task)`). - - - - List of bullet strings for the "Process" section (equivalent to `step.add_bullets("Process", bullets)`). Requires _task_ to also be set. - - - - Step-completion criteria (equivalent to `step.set_step_criteria(criteria)`). - - - - Tool names the step may call, or `"none"` (equivalent to `step.set_functions(functions)`). - - - - Names of steps the agent may transition to (equivalent to `step.set_valid_steps(valid_steps)`). - - -#### Returns - -`Step` — The configured Step object for optional further chaining. - -#### Source - -[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) - -Line 596. - -*** - -### add\_system\_bullets - -Add a POM section with bullet points to the system prompt - -#### Signature - -```python -add_system_bullets(title: str, bullets: List[str]) -> Context -``` - -#### Parameters - - - Section title - - - - List of bullet points - - -#### Returns - -`Context` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) - -Line 869. - -*** - -### add\_system\_section - -Add a POM section to the system prompt - -#### Signature - -```python -add_system_section(title: str, body: str) -> Context -``` - -#### Parameters - - - Section title - - - - Section body text - - -#### Returns - -`Context` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) - -Line 853. - -*** - -### get\_step - -Get an existing step by name for inspection or modification. - -#### Signature - -```python -get_step(name: str) -> Optional[Step] -``` - -#### Parameters - - - Step name - - -#### Returns - -`Optional[Step]` — Step object if found, None otherwise - -#### Source - -[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) - -Line 653. - -*** - -### move\_step - -Move an existing step to a specific position in the step order. - -#### Signature - -```python -move_step(name: str, position: int) -> Context -``` - -#### Parameters - - - Step name to move - - - - Target index in the step order (0 = first) - - -#### Returns - -`Context` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) - -Line 680. - -*** - -### remove\_step - -Remove a step from this context entirely. - -#### Signature - -```python -remove_step(name: str) -> Context -``` - -#### Parameters - - - Step name to remove - - -#### Returns - -`Context` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) - -Line 665. - -*** - -### set\_consolidate - -Set whether to consolidate conversation history when entering this context - -#### Signature - -```python -set_consolidate(consolidate: bool) -> Context -``` - -#### Parameters - - - Whether to consolidate previous conversation - - -#### Returns - -`Context` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) - -Line 781. - -*** - -### set\_enter\_fillers - -Set fillers that the AI says when entering this context - -#### Signature - -```python -set_enter_fillers(enter_fillers: Dict[str, List[str]]) -> Context -``` - -#### Parameters - - - Dictionary mapping language codes (or "default") to lists of filler phrases Example: \{"en-US": \["Welcome...", "Hello..."], "default": \["Entering..."]\} - - -#### Returns - -`Context` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) - -Line 932. - -*** - -### set\_exit\_fillers - -Set fillers that the AI says when exiting this context - -#### Signature - -```python -set_exit_fillers(exit_fillers: Dict[str, List[str]]) -> Context -``` - -#### Parameters - - - Dictionary mapping language codes (or "default") to lists of filler phrases Example: \{"en-US": \["Goodbye...", "Thank you..."], "default": \["Exiting..."]\} - - -#### Returns - -`Context` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) - -Line 947. - -*** - -### set\_full\_reset - -Set whether to do full reset when entering this context - -#### Signature - -```python -set_full_reset(full_reset: bool) -> Context -``` - -#### Parameters - - - Whether to completely rewrite system prompt vs inject - - -#### Returns - -`Context` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) - -Line 794. - -*** - -### set\_initial\_step - -Set which step the context starts on when entered. - -By default, a context starts on its first step (index 0). If the -context has a preamble step that should only run on first entry -(e.g. a greeting), later entries via `change_context` can skip -it by setting `initial_step` to the name of the step to start -from instead. - -`initial_step` is honoured both at conversation creation (when -the context is first activated) and when switching to this context -via `change_context` during the conversation. - -> \[!NOTE] -> ctx = contexts.add\_context("support") -> ctx.add\_step("greeting").set\_text("Welcome!") -> ctx.add\_step("triage").set\_text("What do you need help with?") -> ctx.set\_initial\_step("triage") # skip greeting on re-entry - -#### Signature - -```python -set_initial_step(step_name: str) -> Context -``` - -#### Parameters - - - Name of the step to start on. Must exist in this context's step list; validated by ContextBuilder.validate(). - - -#### Returns - -`Context` — Self for method chaining. - -#### Source - -[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) - -Line 723. - -*** - -### set\_isolated - -Mark this context as isolated — entering it wipes conversation history. - -When `isolated=True` and the context is entered via change\_context, -the runtime calls ai\_conversation\_restart() and the entire conversation -array is wiped. The model starts fresh with only the new context's -system\_prompt + step instructions, with no memory of prior turns. - -EXCEPTION — `reset` overrides the wipe: -If the context also has a `reset` configuration (set via the -Step.set\_reset\_\*() methods on a step that switches into this -context, or via set\_consolidate() / set\_full\_reset() on the -context itself), the wipe is skipped in favor of the reset -behavior. Use `reset` with `consolidate=True` to summarize prior -history into a single message instead of dropping it entirely. - -> \[!NOTE] -> -> - Switching to a sensitive billing flow that should not see -> prior small-talk -> - Handing off to a different agent persona -> - Resetting after a long off-topic detour - -#### Signature - -```python -set_isolated(isolated: bool) -> Context -``` - -#### Parameters - - - True to wipe conversation history on context entry (subject to the reset exception above). - - -#### Returns - -`Context` — Self for method chaining. - -#### Source - -[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) - -Line 820. - -*** - -### set\_post\_prompt - -Set post prompt override for this context - -#### Signature - -```python -set_post_prompt(post_prompt: str) -> Context -``` - -#### Parameters - - - Post prompt text to use when this context is active - - -#### Returns - -`Context` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) - -Line 753. - -*** - -### set\_prompt - -Set the context's prompt text directly - -#### Signature - -```python -set_prompt(prompt: str) -> Context -``` - -#### Parameters - - - The prompt text for this context - - -#### Returns - -`Context` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) - -Line 885. - -*** - -### set\_system\_prompt - -Set system prompt for context switching (triggers context reset) - -#### Signature - -```python -set_system_prompt(system_prompt: str) -> Context -``` - -#### Parameters - - - New system prompt for when this context is entered - - -#### Returns - -`Context` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) - -Line 766. - -*** - -### set\_user\_prompt - -Set user prompt to inject when entering this context - -#### Signature - -```python -set_user_prompt(user_prompt: str) -> Context -``` - -#### Parameters - - - User message to inject for context - - -#### Returns - -`Context` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) - -Line 807. - -*** - -### set\_valid\_contexts - -Set which contexts can be navigated to from this context - -#### Signature - -```python -set_valid_contexts(contexts: List[str]) -> Context -``` - -#### Parameters - - - List of valid context names - - -#### Returns - -`Context` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) - -Line 697. - -*** - -### set\_valid\_steps - -Set which steps can be navigated to from any step in this context - -#### Signature - -```python -set_valid_steps(steps: List[str]) -> Context -``` - -#### Parameters - - - List of valid step names (include "next" for sequential flow) - - -#### Returns - -`Context` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) - -Line 710. - -*** - -### to\_dict - -Convert context to dictionary for SWML generation - -#### Signature - -```python -to_dict() -> Dict[str, Any] -``` - -#### Returns - -`Dict[str, Any]` - -#### Source - -[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) - -Line 1040. - -## Source - -[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) - -Line 538. diff --git a/fern/products/sdk-reference/python/signalwire/core/contexts/gather-info/index.mdx b/fern/products/sdk-reference/python/signalwire/core/contexts/gather-info/index.mdx deleted file mode 100644 index 735d83f279..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/contexts/gather-info/index.mdx +++ /dev/null @@ -1,117 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/contexts/gather-info" -title: "GatherInfo" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.core.contexts.GatherInfo" - parent: "signalwire.core.contexts" - module: "signalwire.core.contexts" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py" ---- -# `GatherInfo` - -Configuration for gathering information in a step via the C-side gather\_info system. - -This produces zero tool\_call/tool\_result entries in LLM-visible history, -instead using dynamic step instruction re-injection to present one question -at a time. - -## Signature - -```python -class GatherInfo -``` - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__( - output_key: Optional[str] = None, - completion_action: Optional[str] = None, - prompt: Optional[str] = None -) -``` - -#### Parameters - - - - - - - -#### Source - -[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) - -Line 59. - -*** - -### add\_question - -Add a question to gather. - -#### Signature - -```python -add_question(key: str, question: str, **kwargs = {}) -> GatherInfo -``` - -#### Parameters - - - Key name for storing the answer in global\_data - - - - The question text to ask - - - - -#### Returns - -`GatherInfo` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) - -Line 67. - -*** - -### to\_dict - -Convert to dictionary for SWML generation - -#### Signature - -```python -to_dict() -> Dict[str, Any] -``` - -#### Returns - -`Dict[str, Any]` - -#### Source - -[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) - -Line 90. - -## Source - -[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) - -Line 51. diff --git a/fern/products/sdk-reference/python/signalwire/core/contexts/gather-question/index.mdx b/fern/products/sdk-reference/python/signalwire/core/contexts/gather-question/index.mdx deleted file mode 100644 index 8e38394f33..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/contexts/gather-question/index.mdx +++ /dev/null @@ -1,102 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/contexts/gather-question" -title: "GatherQuestion" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.core.contexts.GatherQuestion" - parent: "signalwire.core.contexts" - module: "signalwire.core.contexts" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py" ---- -# `GatherQuestion` - -Represents a single question in a gather\_info configuration - -## Signature - -```python -class GatherQuestion -``` - -## Properties - - - - - - - - - - - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__( - key: str, - question: str, - type: str = 'string', - confirm: bool = False, - prompt: Optional[str] = None, - functions: Optional[List[str]] = None -) -``` - -#### Parameters - - - - - - - - - - - - - -#### Source - -[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) - -Line 27. - -*** - -### to\_dict - -Convert question to dictionary for SWML generation - -#### Signature - -```python -to_dict() -> Dict[str, Any] -``` - -#### Returns - -`Dict[str, Any]` - -#### Source - -[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) - -Line 37. - -## Source - -[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) - -Line 24. diff --git a/fern/products/sdk-reference/python/signalwire/core/contexts/index.mdx b/fern/products/sdk-reference/python/signalwire/core/contexts/index.mdx deleted file mode 100644 index 6fbebe854f..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/contexts/index.mdx +++ /dev/null @@ -1,92 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/contexts" -title: "contexts" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.core.contexts" - parent: "signalwire.core" - module: "signalwire.core" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py" ---- -# `contexts` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module contexts -``` - -## Constants - - - - - - - -## Classes - - - - A single context containing an ordered list of steps. - - - - Builder for multi-step, multi-context AI agent workflows. - - - - Configuration for gathering information in a step via the C-side gather\_info system. - - - - Represents a single question in a gather\_info configuration - - - - Represents a single step within a context - - - -## Functions - -### create\_simple\_context - -Helper function to create a simple single context - -#### Signature - -```python -create_simple_context(name: str = 'default') -> Context -``` - -#### Parameters - - - Context name (defaults to "default") - - -#### Returns - -`Context` — Context object for method chaining - -#### Source - -[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) - -Line 1350. - -## Source - -[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/contexts/step/index.mdx b/fern/products/sdk-reference/python/signalwire/core/contexts/step/index.mdx deleted file mode 100644 index b29c3b9e08..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/contexts/step/index.mdx +++ /dev/null @@ -1,714 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/contexts/step" -title: "Step" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.core.contexts.Step" - parent: "signalwire.core.contexts" - module: "signalwire.core.contexts" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py" ---- -# `Step` - -Represents a single step within a context - -## Signature - -```python -class Step -``` - -## Properties - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(name: str) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) - -Line 107. - -*** - -### add\_bullets - -Add a POM section with bullet points - -#### Signature - -```python -add_bullets(title: str, bullets: List[str]) -> Step -``` - -#### Parameters - - - Section title - - - - List of bullet points - - -#### Returns - -`Step` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) - -Line 163. - -*** - -### add\_gather\_question - -Add a question to this step's gather\_info configuration. -set\_gather\_info() must be called before this method. - -IMPORTANT — gather mode locks function access: -While the model is asking gather questions, the runtime forcibly -deactivates ALL of the step's other functions. The only callable -tools during a gather question are: - -``` - - `gather_submit` (the native answer-submission tool) - - Whatever names you list in this question's `functions` arg - -`next_step` and `change_context` are also filtered out — the model -cannot navigate away until the gather completes. This is by design: -it forces a tight ask → submit → next-question loop. - -If a question needs to call out to a tool (e.g. validate an email, -geocode a ZIP), list that tool name in this question's `functions`. -Functions listed here are active ONLY for this question. -``` - -#### Signature - -```python -add_gather_question( - key: str, - question: str, - type: str = 'string', - confirm: bool = False, - prompt: Optional[str] = None, - functions: Optional[List[str]] = None -) -> Step -``` - -#### Parameters - - - Key name for storing the answer in global\_data. - - - - The question text the model is instructed to ask. - - - - JSON schema type for the answer ("string", "integer", "number", "boolean"). Default: "string". - - - - If True, the model must read the answer back and obtain explicit user confirmation before submitting (the gather\_submit schema gains a required `confirmed_by_user` parameter). - - - - Extra instruction text appended after the question. - - - - Names of functions to unlock for this question only. These are activated on top of `gather_submit`. All other step functions remain locked out. - - -#### Returns - -`Step` — Self for method chaining. - -#### Examples - -```python - - `gather_submit` (the native answer-submission tool) - - Whatever names you list in this question's `functions` arg - -`next_step` and `change_context` are also filtered out — the model -cannot navigate away until the gather completes. This is by design: -it forces a tight ask → submit → next-question loop. - -If a question needs to call out to a tool (e.g. validate an email, -geocode a ZIP), list that tool name in this question's `functions`. -Functions listed here are active ONLY for this question. -``` - -#### Source - -[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) - -Line 358. - -*** - -### add\_section - -Add a POM section to the step - -#### Signature - -```python -add_section(title: str, body: str) -> Step -``` - -#### Parameters - - - Section title - - - - Section body text - - -#### Returns - -`Step` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) - -Line 147. - -*** - -### clear\_sections - -Remove all POM sections and direct text from this step, allowing it -to be repopulated with new content. - -#### Signature - -```python -clear_sections() -> Step -``` - -#### Returns - -`Step` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) - -Line 404. - -*** - -### set\_end - -Mark this step as terminal for the step flow. - -IMPORTANT: `end=True` does NOT end the conversation or hang up the -call. It exits step mode entirely after this step executes — clearing -the steps list, current step index, valid\_steps, and valid\_contexts. -The agent keeps running, but operates only under the base system -prompt and the context-level prompt; no more step instructions are -injected and no more `next_step` tool is offered. - -To actually end the call, call a hangup tool or define a hangup\_hook. - -Combine with `set_reset_*()` if you also want to reset/consolidate -the conversation when this step exits. - -#### Signature - -```python -set_end(end: bool) -> Step -``` - -#### Parameters - - - True to exit step mode after this step. - - -#### Returns - -`Step` — Self for method chaining. - -#### Source - -[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) - -Line 278. - -*** - -### set\_functions - -Set which non-internal functions are callable while this step is active. - -IMPORTANT — keep the per-step active set small: -LLM tool selection accuracy degrades noticeably once the -per-call tool list grows past ~7-8 entries. Symptoms: the model -has the right tool available, the user's request clearly matches -it, but the model doesn't call it (or calls a near-neighbor -instead). Same prompt may pass on rerun. This is the LLM's -native tool-selection behavior — not something the SDK can fix. - -``` -Mitigations: - - Whitelist only the tools the current step actually needs. - A 4-tool step is more reliable than a 12-tool step. - - Split a busy step into two narrower steps so the relevant - tools are partitioned by phase of the conversation. - - Remember that `next_step` and `change_context` are - auto-injected when valid_steps / valid_contexts are set — - they count against the budget too. Don't list them in - `functions`; the runtime adds them separately. -``` - -IMPORTANT — inheritance behavior: -If you do NOT call this method, the step inherits whichever function -set was active on the previous step (or the previous context's last -step). The server-side runtime only resets the active set when a -step explicitly declares its `functions` field. This is by design, -but it is the most common source of bugs in multi-step agents: -forgetting set\_functions() on a later step lets the previous step's -tools leak through. - -``` -Best practice: call set_functions() explicitly on every step that -should have a different toolset than the previous one. -``` - -Internal functions (`startup_hook`, `hangup_hook`, `check_for_input`, -`summarize_conversation`, `gather_submit`, `get_ideal_strategy`) are -ALWAYS protected and cannot be deactivated by this whitelist. - -The native navigation tools `next_step` and `change_context` are -injected automatically when valid\_steps / valid\_contexts is set; they -are not affected by this list and do not need to appear in it. - -step.set\_functions(\["lookup\_account", "check\_balance"]) # whitelist -step.set\_functions(\[]) # disable all -step.set\_functions("none") # disable all (alt) - -#### Signature - -```python -set_functions(functions: Union[str, List[str]]) -> Step -``` - -#### Parameters - - - One of: - - -#### Returns - -`Step` — Self for method chaining. - -#### Examples - - - - ```python - Mitigations: - - Whitelist only the tools the current step actually needs. - A 4-tool step is more reliable than a 12-tool step. - - Split a busy step into two narrower steps so the relevant - tools are partitioned by phase of the conversation. - - Remember that `next_step` and `change_context` are - auto-injected when valid_steps / valid_contexts are set — - they count against the budget too. Don't list them in - `functions`; the runtime adds them separately. - ``` - - - - ```python - Best practice: call set_functions() explicitly on every step that - should have a different toolset than the previous one. - ``` - - - -#### Source - -[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) - -Line 192. - -*** - -### set\_gather\_info - -Enable info gathering for this step. Questions are presented one at a time -via dynamic step instruction re-injection, producing zero tool\_call/tool\_result -entries in LLM-visible history. - -After calling this, use add\_gather\_question() to define questions. - -#### Signature - -```python -set_gather_info( - output_key: Optional[str] = None, - completion_action: Optional[str] = None, - prompt: Optional[str] = None -) -> Step -``` - -#### Parameters - - - Key in global\_data to store answers under (default: top-level) - - - - Where to go when all questions are answered. Can be: - - - - Preamble text injected once when entering the gather step, giving the model personality/context for why it is asking these questions - - -#### Returns - -`Step` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) - -Line 329. - -*** - -### set\_reset\_consolidate - -Set whether to consolidate conversation when this step switches contexts - -#### Signature - -```python -set_reset_consolidate(consolidate: bool) -> Step -``` - -#### Parameters - - - Whether to consolidate previous conversation - - -#### Returns - -`Step` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) - -Line 442. - -*** - -### set\_reset\_full\_reset - -Set whether to do full reset when this step switches contexts - -#### Signature - -```python -set_reset_full_reset(full_reset: bool) -> Step -``` - -#### Parameters - - - Whether to completely rewrite system prompt vs inject - - -#### Returns - -`Step` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) - -Line 455. - -*** - -### set\_reset\_system\_prompt - -Set system prompt for context switching when this step navigates to a context - -#### Signature - -```python -set_reset_system_prompt(system_prompt: str) -> Step -``` - -#### Parameters - - - New system prompt for context switching - - -#### Returns - -`Step` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) - -Line 416. - -*** - -### set\_reset\_user\_prompt - -Set user prompt for context switching when this step navigates to a context - -#### Signature - -```python -set_reset_user_prompt(user_prompt: str) -> Step -``` - -#### Parameters - - - User message to inject for context switching - - -#### Returns - -`Step` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) - -Line 429. - -*** - -### set\_skip\_to\_next\_step - -Set whether to automatically advance to the next step - -#### Signature - -```python -set_skip_to_next_step(skip: bool) -> Step -``` - -#### Parameters - - - Whether to skip to the next step automatically - - -#### Returns - -`Step` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) - -Line 316. - -*** - -### set\_skip\_user\_turn - -Set whether to skip waiting for user input after this step - -#### Signature - -```python -set_skip_user_turn(skip: bool) -> Step -``` - -#### Parameters - - - Whether to skip the user turn after this step - - -#### Returns - -`Step` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) - -Line 303. - -*** - -### set\_step\_criteria - -Set the criteria for determining when this step is complete - -#### Signature - -```python -set_step_criteria(criteria: str) -> Step -``` - -#### Parameters - - - Description of step completion criteria - - -#### Returns - -`Step` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) - -Line 179. - -*** - -### set\_text - -Set the step's prompt text directly - -#### Signature - -```python -set_text(text: str) -> Step -``` - -#### Parameters - - - The prompt text for this step - - -#### Returns - -`Step` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) - -Line 132. - -*** - -### set\_valid\_contexts - -Set which contexts can be navigated to from this step - -#### Signature - -```python -set_valid_contexts(contexts: List[str]) -> Step -``` - -#### Parameters - - - List of valid context names - - -#### Returns - -`Step` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) - -Line 265. - -*** - -### set\_valid\_steps - -Set which steps can be navigated to from this step - -#### Signature - -```python -set_valid_steps(steps: List[str]) -> Step -``` - -#### Parameters - - - List of valid step names (include "next" for sequential flow) - - -#### Returns - -`Step` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) - -Line 252. - -*** - -### to\_dict - -Convert step to dictionary for SWML generation - -#### Signature - -```python -to_dict() -> Dict[str, Any] -``` - -#### Returns - -`Dict[str, Any]` - -#### Source - -[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) - -Line 490. - -## Source - -[`signalwire/signalwire/core/contexts.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/contexts.py) - -Line 104. diff --git a/fern/products/sdk-reference/python/signalwire/core/data-map/data-map/index.mdx b/fern/products/sdk-reference/python/signalwire/core/data-map/data-map/index.mdx deleted file mode 100644 index 2c805677cc..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/data-map/data-map/index.mdx +++ /dev/null @@ -1,660 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/data-map/data-map" -title: "DataMap" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.core.data_map.DataMap" - parent: "signalwire.core.data_map" - module: "signalwire.core.data_map" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py" ---- -# `DataMap` - -Builder class for creating SWAIG data\_map configurations. - -This provides a fluent interface for building data\_map tools that execute -on the SignalWire server without requiring webhook endpoints. Works similar -to FunctionResult but for building data\_map structures. - -> \[!NOTE] -> -> # Simple API call - output goes inside webhook -> -> data\_map = (DataMap('get\_weather') -> .purpose('Get current weather information') -> .parameter('location', 'string', 'City name', required=True) -> .webhook('GET', 'https://api.weather.com/v1/current?key=API\_KEY\&q=$\{location\}') -> .output(FunctionResult('Weather in $\{location\}: $\{response.current.condition.text\}, $\{response.current.temp\_f\}°F')) -> ) -> -> # Multiple webhooks with fallback -> -> data\_map = (DataMap('search\_multi') -> .purpose('Search with fallback APIs') -> .parameter('query', 'string', 'Search query', required=True) -> .webhook('GET', 'https://api.primary.com/search?q=$\{query\}') -> .output(FunctionResult('Primary result: $\{response.title\}')) -> .webhook('GET', 'https://api.fallback.com/search?q=$\{query\}') -> .output(FunctionResult('Fallback result: $\{response.title\}')) -> .fallback\_output(FunctionResult('Sorry, all search APIs are unavailable')) -> ) -> -> # Expression-based responses (no API calls) -> -> data\_map = (DataMap('file\_control') -> .purpose('Control file playback') -> .parameter('command', 'string', 'Playback command') -> .parameter('filename', 'string', 'File to control', required=False) -> .expression('$\{args.command\}', r'start._', FunctionResult().add\_action('start\_playbook', \{'file': '$\{args.filename\}'\})) -> .expression('$\{args.command\}', r'stop._', FunctionResult().add\_action('stop\_playback', True)) -> ) -> -> # API with array processing -> -> data\_map = (DataMap('search\_docs') -> .purpose('Search documentation') -> .parameter('query', 'string', 'Search query', required=True) -> .webhook('POST', 'https://api.docs.com/search', headers=\{'Authorization': 'Bearer TOKEN'\}) -> .body(\{'query': '$\{query\}', 'limit': 3\}) -> .output(FunctionResult('Found: $\{response.results\[0].title\} - $\{response.results\[0].summary\}')) -> .foreach('$\{response.results\}') -> ) - -## Signature - -```python -class DataMap -``` - -## Examples - -```python -# Multiple webhooks with fallback -data_map = (DataMap('search_multi') - .purpose('Search with fallback APIs') - .parameter('query', 'string', 'Search query', required=True) - .webhook('GET', 'https://api.primary.com/search?q=${query}') - .output(FunctionResult('Primary result: ${response.title}')) - .webhook('GET', 'https://api.fallback.com/search?q=${query}') - .output(FunctionResult('Fallback result: ${response.title}')) - .fallback_output(FunctionResult('Sorry, all search APIs are unavailable')) -) - -# Expression-based responses (no API calls) -data_map = (DataMap('file_control') - .purpose('Control file playback') - .parameter('command', 'string', 'Playback command') - .parameter('filename', 'string', 'File to control', required=False) - .expression('${args.command}', r'start.*', FunctionResult().add_action('start_playbook', {'file': '${args.filename}'})) - .expression('${args.command}', r'stop.*', FunctionResult().add_action('stop_playback', True)) -) - -# API with array processing -data_map = (DataMap('search_docs') - .purpose('Search documentation') - .parameter('query', 'string', 'Search query', required=True) - .webhook('POST', 'https://api.docs.com/search', headers={'Authorization': 'Bearer TOKEN'}) - .body({'query': '${query}', 'limit': 3}) - .output(FunctionResult('Found: ${response.results[0].title} - ${response.results[0].summary}')) - .foreach('${response.results}') -) -``` - -## Properties - - - -## Methods - -### \_\_init\_\_ - -Initialize a new DataMap builder - -#### Signature - -```python -__init__(function_name: str) -``` - -#### Parameters - - - Name of the SWAIG function this data\_map will create - - -#### Source - -[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) - -Line 67. - -*** - -### body - -Set request body for the last added webhook (POST/PUT requests) - -#### Signature - -```python -body(data: Dict[str, Any]) -> DataMap -``` - -#### Parameters - - - Request body data (can include $\{variable\} substitutions) - - -#### Returns - -`DataMap` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) - -Line 255. - -*** - -### description - -Set the function description (alias for purpose). - -See purpose() for guidance on writing description text the LLM -can act on. - -#### Signature - -```python -description(description: str) -> DataMap -``` - -#### Parameters - - - LLM-facing description of what this function does and when to use it. - - -#### Returns - -`DataMap` — Self for method chaining. - -#### Source - -[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) - -Line 110. - -*** - -### error\_keys - -Set error keys for the most recent webhook (if webhooks exist) or top-level - -#### Signature - -```python -error_keys(keys: List[str]) -> DataMap -``` - -#### Parameters - - - List of JSON keys whose presence indicates an error - - -#### Returns - -`DataMap` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) - -Line 356. - -*** - -### expression - -Add an expression pattern for pattern-based responses - -#### Signature - -```python -expression( - test_value: str, - pattern: Union[str, Pattern], - output: FunctionResult, - nomatch_output: Optional[FunctionResult] = None -) -> DataMap -``` - -#### Parameters - - - Template string to test (e.g., "$\{args.command\}") - - - - Regex pattern string or compiled Pattern object to match against - - - - FunctionResult to return when pattern matches - - - - Optional FunctionResult to return when pattern doesn't match - - -#### Returns - -`DataMap` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) - -Line 173. - -*** - -### fallback\_output - -Set a fallback output result at the top level (used when all webhooks fail) - -#### Signature - -```python -fallback_output(result: FunctionResult) -> DataMap -``` - -#### Parameters - - - FunctionResult defining the fallback response - - -#### Returns - -`DataMap` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) - -Line 343. - -*** - -### foreach - -Process an array from the webhook response using foreach mechanism - -``` - Args: - foreach_config: Either: - - Dict: Foreach configuration with keys: - - input_key: Key in API response containing the array - - output_key: Name for the built string variable - - max: Maximum number of items to process (optional) - - append: Template string to append for each item - - Returns: - Self for method chaining - - Example: - .foreach({ - "input_key": "results", - "output_key": "formatted_results", - "max": 3, - "append": "Result: ${this.title} - ${this.summary} -``` - -" -\}) - -#### Signature - -```python -foreach(foreach_config: Dict[str, Any]) -> DataMap -``` - -#### Parameters - - - -#### Returns - -`DataMap` - -#### Examples - -```python - Args: - foreach_config: Either: - - Dict: Foreach configuration with keys: - - input_key: Key in API response containing the array - - output_key: Name for the built string variable - - max: Maximum number of items to process (optional) - - append: Template string to append for each item - - Returns: - Self for method chaining - - Example: - .foreach({ - "input_key": "results", - "output_key": "formatted_results", - "max": 3, - "append": "Result: ${this.title} - ${this.summary} -``` - -#### Source - -[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) - -Line 287. - -*** - -### global\_error\_keys - -Set top-level error keys (applies to all webhooks) - -#### Signature - -```python -global_error_keys(keys: List[str]) -> DataMap -``` - -#### Parameters - - - List of JSON keys whose presence indicates an error - - -#### Returns - -`DataMap` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) - -Line 374. - -*** - -### output - -Set the output result for the most recent webhook - -#### Signature - -```python -output(result: FunctionResult) -> DataMap -``` - -#### Parameters - - - FunctionResult defining the response for this webhook - - -#### Returns - -`DataMap` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) - -Line 327. - -*** - -### parameter - -Add a function parameter. - -Just like the function-level `description`, this parameter -`description` is sent to the LLM as part of the tool schema and -is read by the model when deciding HOW to fill in the argument. -Write it as an instruction to the model: - -- Bad: "the id" -- Good: "The customer's 8-digit account number, no dashes or - spaces. Ask the user if they don't provide it." - -#### Signature - -```python -parameter( - name: str, - param_type: str, - description: str, - required: bool = False, - enum: Optional[List[str]] = None -) -> DataMap -``` - -#### Parameters - - - Parameter name. Becomes a key in the tool schema's `properties` object and is what the model emits. - - - - JSON schema type (string, number, boolean, array, object). - - - - LLM-facing parameter description. See above — this should tell the model what value to put here, in what format, and where to source it. - - - - Whether parameter is required. - - - - Optional list of allowed values. The model will only emit values from this list. - - -#### Returns - -`DataMap` — Self for method chaining. - -#### Source - -[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) - -Line 126. - -*** - -### params - -Set request params for the last added webhook (alias for body) - -#### Signature - -```python -params(data: Dict[str, Any]) -> DataMap -``` - -#### Parameters - - - Request params data (can include $\{variable\} substitutions) - - -#### Returns - -`DataMap` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) - -Line 271. - -*** - -### purpose - -Set the function description that the LLM will read. - -A DataMap creates a SWAIG function that gets sent to the model in -OpenAI tool-schema format. This `description` field is what the -model reads on every turn to decide WHEN to call the tool. It is -prompt-engineered text, not developer documentation: - -- Bad: "Search function" -- Good: "Search the company's knowledge base for help articles - matching a user query. Use this when the user asks a - product or how-to question that the base prompt does - not cover." - -Vague descriptions are the most common cause of "the model has -the right tool but doesn't call it" failures. - -#### Signature - -```python -purpose(description: str) -> DataMap -``` - -#### Parameters - - - LLM-facing description of what this function does and when to use it. See above. - - -#### Returns - -`DataMap` — Self for method chaining. - -#### Source - -[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) - -Line 82. - -*** - -### to\_swaig\_function - -Convert this DataMap to a SWAIG function definition - -#### Signature - -```python -to_swaig_function() -> Dict[str, Any] -``` - -#### Returns - -`Dict[str, Any]` — Dictionary with function definition and data\_map instead of url - -#### Source - -[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) - -Line 387. - -*** - -### webhook - -Add a webhook API call - -#### Signature - -```python -webhook( - method: str, - url: str, - headers: Optional[Dict[str, str]] = None, - form_param: Optional[str] = None, - input_args_as_params: bool = False, - require_args: Optional[List[str]] = None -) -> DataMap -``` - -#### Parameters - - - HTTP method (GET, POST, PUT, DELETE, etc.) - - - - API endpoint URL (can include $\{variable\} substitutions) - - - - Optional HTTP headers - - - - Send JSON body as single form parameter with this name - - - - Merge function arguments into params - - - - Only execute if these arguments are present - - -#### Returns - -`DataMap` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) - -Line 204. - -*** - -### webhook\_expressions - -Add expressions that run after the most recent webhook completes - -#### Signature - -```python -webhook_expressions(expressions: List[Dict[str, Any]]) -> DataMap -``` - -#### Parameters - - - List of expression definitions to check post-webhook - - -#### Returns - -`DataMap` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) - -Line 239. - -## Source - -[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) - -Line 19. diff --git a/fern/products/sdk-reference/python/signalwire/core/data-map/index.mdx b/fern/products/sdk-reference/python/signalwire/core/data-map/index.mdx deleted file mode 100644 index d55d0cbe5f..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/data-map/index.mdx +++ /dev/null @@ -1,145 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/data-map" -title: "data_map" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.core.data_map" - parent: "signalwire.core" - module: "signalwire.core" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py" ---- -# `data_map` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module data_map -``` - -## Classes - - - - Builder class for creating SWAIG data\_map configurations. - - - -## Functions - -### create\_expression\_tool - -Create an expression-based tool for pattern matching responses - -#### Signature - -```python -create_expression_tool( - name: str, - patterns: Dict[str, Tuple[str, FunctionResult]], - parameters: Optional[Dict[str, Dict]] = None -) -> DataMap -``` - -#### Parameters - - - Function name - - - - Dictionary mapping test\_values to (pattern, FunctionResult) tuples - - - - Optional parameter definitions - - -#### Returns - -`DataMap` — Configured DataMap object - -#### Source - -[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) - -Line 490. - -*** - -### create\_simple\_api\_tool - -Create a simple API tool with minimal configuration - -#### Signature - -```python -create_simple_api_tool( - name: str, - url: str, - response_template: str, - parameters: Optional[Dict[str, Dict]] = None, - method: str = 'GET', - headers: Optional[Dict[str, str]] = None, - body: Optional[Dict[str, Any]] = None, - error_keys: Optional[List[str]] = None -) -> DataMap -``` - -#### Parameters - - - Function name - - - - API endpoint URL - - - - Template for formatting the response - - - - Optional parameter definitions - - - - HTTP method (default: GET) - - - - Optional HTTP headers - - - - Optional request body (for POST/PUT) - - - - Optional list of error indicator keys - - -#### Returns - -`DataMap` — Configured DataMap object - -#### Source - -[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) - -Line 439. - -## Source - -[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/function-result/function-result/index.mdx b/fern/products/sdk-reference/python/signalwire/core/function-result/function-result/index.mdx deleted file mode 100644 index 73dd951c7d..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/function-result/function-result/index.mdx +++ /dev/null @@ -1,2253 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/function-result/function-result" -title: "FunctionResult" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.core.function_result.FunctionResult" - parent: "signalwire.core.function_result" - module: "signalwire.core.function_result" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py" ---- -# `FunctionResult` - -Wrapper around SWAIG function responses that handles proper formatting -of response text and actions. - -The result object has three main components: - -1. response: Text the AI should say back to the user -2. action: List of structured actions to execute -3. post\_process: Whether to let AI take another turn before executing actions - -Post-processing behavior: - -- post\_process=False (default): Execute actions immediately after AI response -- post\_process=True: Let AI respond to user one more time, then execute actions - -This is useful for confirmation workflows like: -"I'll transfer you to sales. Do you have any other questions first?" -(AI can handle follow-up, then execute the transfer) - -> \[!NOTE] -> return FunctionResult("Found your order") -> -> # With actions -> -> return ( -> FunctionResult("I'll transfer you to support") -> .add\_action("transfer", \{"dest": "support"\}) -> ) -> -> # With simple action value -> -> return ( -> FunctionResult("I'll confirm that") -> .add\_action("confirm", True) -> ) -> -> # With multiple actions -> -> return ( -> FunctionResult("Processing your request") -> .add\_actions(\[ -> \{"set\_global\_data": \{"key": "value"\}\}, -> \{"play": \{"url": "music.mp3"\}\} -> ]) -> ) -> -> # With post-processing enabled -> -> return ( -> FunctionResult("Let me transfer you to billing", post\_process=True) -> .connect("+15551234567", final=True) -> ) -> -> # Using the connect helper -> -> return ( -> FunctionResult("I'll transfer you to our sales team now") -> .connect("sales@company.com", final=False, from\_addr="+15559876543") -> ) - -## Signature - -```python -class FunctionResult -``` - -## Examples - -```python -# With actions -return ( - FunctionResult("I'll transfer you to support") - .add_action("transfer", {"dest": "support"}) -) - -# With simple action value -return ( - FunctionResult("I'll confirm that") - .add_action("confirm", True) -) - -# With multiple actions -return ( - FunctionResult("Processing your request") - .add_actions([ - {"set_global_data": {"key": "value"}}, - {"play": {"url": "music.mp3"}} - ]) -) - -# With post-processing enabled -return ( - FunctionResult("Let me transfer you to billing", post_process=True) - .connect("+15551234567", final=True) -) - -# Using the connect helper -return ( - FunctionResult("I'll transfer you to our sales team now") - .connect("sales@company.com", final=False, from_addr="+15559876543") -) -``` - -## Properties - - - - - - - -## Methods - -### \_\_init\_\_ - -Initialize a new SWAIG function result - -#### Signature - -```python -__init__(response: Optional[str] = None, post_process: bool = False) -``` - -#### Parameters - - - Optional natural language response to include - - - - Whether to let AI take another turn before executing actions. Defaults to False (execute actions immediately after response). - - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 71. - -*** - -### add\_action - -Add a structured action to the response - -#### Signature - -```python -add_action(name: str, data: Any) -> FunctionResult -``` - -#### Parameters - - - The name/type of the action (e.g., "play", "transfer") - - - - The data for the action - can be a string, boolean, object, or array - - -#### Returns - -`FunctionResult` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 114. - -*** - -### add\_actions - -Add multiple structured actions to the response - -#### Signature - -```python -add_actions(actions: List[Dict[str, Any]]) -> FunctionResult -``` - -#### Parameters - - - List of action objects to add to the response - - -#### Returns - -`FunctionResult` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 128. - -*** - -### add\_dynamic\_hints - -Add dynamic speech recognition hints during a call. - -Hints improve speech recognition accuracy for domain-specific terms. -Each hint can be a simple string or a pronunciation pattern object. - -> \[!NOTE] -> result = ( -> FunctionResult("I'll listen for that name") -> .add\_dynamic\_hints(\[ -> "Cabby", -> \{"pattern": "cab bee", "replace": "Cabby", "ignore\_case": True\} -> ]) -> ) - -#### Signature - -```python -add_dynamic_hints(hints: List[Union[str, Dict[str, Any]]]) -> FunctionResult -``` - -#### Parameters - - - List of hints, where each entry is either: - - -#### Returns - -`FunctionResult` — self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 525. - -*** - -### clear\_dynamic\_hints - -Clear all dynamic speech recognition hints. - -Removes all hints previously added via add\_dynamic\_hints(). - -#### Signature - -```python -clear_dynamic_hints() -> FunctionResult -``` - -#### Returns - -`FunctionResult` — self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 554. - -*** - -### connect - -Add a connect action to transfer/connect the call to another destination. - -This is a convenience method that abstracts the SWML connect verb, so users -don't need to manually construct SWML documents. - -Transfer behavior: - -- final=True: Permanent transfer - call exits the agent completely, - SWML replaces the agent and call continues there -- final=False: Temporary transfer - if far end hangs up, call returns - to the agent to continue the conversation - -> \[!NOTE] -> -> ### Permanent transfer to a phone number -> -> result.connect("+15551234567", final=True) -> -> ### Temporary transfer to SIP address with custom caller ID -> -> result.connect("support@company.com", final=False, from\_addr="+15559876543") - -#### Signature - -```python -connect( - destination: str, - final: bool = True, - from_addr: Optional[str] = None -) -> FunctionResult -``` - -#### Parameters - - - Where to connect the call (phone number, SIP address, etc.) - - - - Whether this is a permanent transfer (True) or temporary (False). Defaults to True for permanent transfers. - - - - Optional caller ID override (phone number or SIP address). If None, uses the current call's from address. - - -#### Returns - -`FunctionResult` — Self for method chaining - -#### Examples - -```python -# Temporary transfer to SIP address with custom caller ID -result.connect("support@company.com", final=False, from_addr="+15559876543") -``` - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 141. - -*** - -### create\_payment\_action - -Create a payment action for use in payment prompts. - -**Modifiers:** `static` - -#### Signature - -```python -@staticmethod -create_payment_action(action_type: str, phrase: str) -> Dict[str, str] -``` - -#### Parameters - - - "Say" for text-to-speech or "Play" for audio file - - - - Sentence to say or URL to play - - -#### Returns - -`Dict[str, str]` — Dictionary representing the action - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 1472. - -*** - -### create\_payment\_parameter - -Create a payment parameter for use with pay() method. - -**Modifiers:** `static` - -#### Signature - -```python -@staticmethod -create_payment_parameter(name: str, value: str) -> Dict[str, str] -``` - -#### Parameters - - - Parameter name - - - - Parameter value - - -#### Returns - -`Dict[str, str]` — Dictionary representing the parameter - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 1489. - -*** - -### create\_payment\_prompt - -Create a payment prompt structure for use with pay() method. - -**Modifiers:** `static` - -#### Signature - -```python -@staticmethod -create_payment_prompt( - for_situation: str, - actions: List[Dict[str, str]], - card_type: Optional[str] = None, - error_type: Optional[str] = None -) -> Dict[str, Any] -``` - -#### Parameters - - - Situation to use prompt for (e.g., "payment-card-number") - - - - List of actions with 'type' and 'phrase' keys - - - - Space-separated card types for this prompt - - - - Space-separated error types for this prompt - - -#### Returns - -`Dict[str, Any]` — Dictionary representing the prompt structure - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 1444. - -*** - -### enable\_extensive\_data - -Send full data to LLM for this turn only, then use smaller replacement -in subsequent turns. - -#### Signature - -```python -enable_extensive_data(enabled: bool = True) -> FunctionResult -``` - -#### Parameters - - - Whether to send extensive data this turn only - - -#### Returns - -`FunctionResult` — self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 652. - -*** - -### enable\_functions\_on\_timeout - -Enable function calls on speaker timeout. - -#### Signature - -```python -enable_functions_on_timeout(enabled: bool = True) -> FunctionResult -``` - -#### Parameters - - - Whether to enable functions on timeout - - -#### Returns - -`FunctionResult` — self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 640. - -*** - -### execute\_rpc - -Execute an RPC method on a call using SWML. - -This is a generic helper for executing RPC commands. For common operations, -consider using the specific helpers: rpc\_dial(), rpc\_ai\_message(), rpc\_ai\_unhold(). - -> \[!NOTE] -> result = ( -> FunctionResult("Executing RPC") -> .execute\_rpc( -> method="ai\_message", -> call\_id="some-call-id", -> params=\{"role": "system", "message\_text": "Hello"\} -> ) -> ) - -#### Signature - -```python -execute_rpc( - method: str, - params: Optional[Dict[str, Any]] = None, - call_id: Optional[str] = None, - node_id: Optional[str] = None -) -> FunctionResult -``` - -#### Parameters - - - The RPC method to execute (e.g., "dial", "ai\_message", "ai\_unhold") - - - - Parameters for the RPC method (optional) - - - - Target call ID for the RPC (optional) - - - - Target node ID for the RPC (optional) - - -#### Returns - -`FunctionResult` — self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 1290. - -*** - -### execute\_swml - -Execute SWML content with optional transfer behavior. - -#### Signature - -```python -execute_swml(swml_content, transfer: bool = False) -> FunctionResult -``` - -#### Parameters - - - Can be: - - - - Boolean - whether call should exit agent after execution - - -#### Returns - -`FunctionResult` — self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 396. - -*** - -### hangup - -Terminate the call. - -#### Signature - -```python -hangup() -> FunctionResult -``` - -#### Returns - -`FunctionResult` — self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 433. - -*** - -### hold - -Put the call on hold with optional timeout. - -#### Signature - -```python -hold(timeout: int = 300) -> FunctionResult -``` - -#### Parameters - - - Timeout in seconds (max 900, default 300) - - -#### Returns - -`FunctionResult` — self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 442. - -*** - -### join\_conference - -Join an ad-hoc audio conference with RELAY and CXML calls using SWML. - -This is a virtual helper that generates SWML to join audio conferences -with extensive configuration options for call management and recording. - -#### Signature - -```python -join_conference( - name: str, - muted: bool = False, - beep: str = 'true', - start_on_enter: bool = True, - end_on_exit: bool = False, - wait_url: Optional[str] = None, - max_participants: int = 250, - record: str = 'do-not-record', - region: Optional[str] = None, - trim: str = 'trim-silence', - coach: Optional[str] = None, - status_callback_event: Optional[str] = None, - status_callback: Optional[str] = None, - status_callback_method: str = 'POST', - recording_status_callback: Optional[str] = None, - recording_status_callback_method: str = 'POST', - recording_status_callback_event: str = 'completed', - result: Optional[Any] = None -) -> FunctionResult -``` - -#### Parameters - - - Name of conference (required) - - - - Whether to join muted (default: False) - - - - Beep configuration - "true", "false", "onEnter", "onExit" (default: "true") - - - - Whether conference starts when this participant enters (default: True) - - - - Whether conference ends when this participant exits (default: False) - - - - SWML URL for hold music (default: None for default hold music) - - - - Maximum participants \<= 250 (default: 250) - - - - Recording mode - "do-not-record", "record-from-start" (default: "do-not-record") - - - - Conference region (default: None) - - - - Trim silence - "trim-silence", "do-not-trim" (default: "trim-silence") - - - - SWML Call ID or CXML CallSid for coaching (default: None) - - - - Events to report - "start end join leave mute hold modify speaker announcement" (default: None) - - - - URL for status callbacks (default: None) - - - - HTTP method - "GET", "POST" (default: "POST") - - - - URL for recording status callbacks (default: None) - - - - HTTP method - "GET", "POST" (default: "POST") - - - - Recording events - "in-progress completed absent" (default: "completed") - - - - Switch on return\_value when object \{\} or cond when array \[] (default: None) - - -#### Returns - -`FunctionResult` — self for method chaining - -#### Throws - -- `ValueError` — If beep value is invalid or max\_participants exceeds 250 - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 1049. - -*** - -### join\_room - -Join a RELAY room using SWML. - -This is a virtual helper that generates SWML to join a RELAY room, -which enables multi-party communication and collaboration. - -#### Signature - -```python -join_room(name: str) -> FunctionResult -``` - -#### Parameters - - - The name of the room to join (required) - - -#### Returns - -`FunctionResult` — self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 991. - -*** - -### pay - -Process payment using SWML pay action. - -This is a virtual helper that generates SWML for payment processing. - -#### Signature - -```python -pay( - payment_connector_url: str, - input_method: str = 'dtmf', - status_url: Optional[str] = None, - payment_method: str = 'credit-card', - timeout: int = 5, - max_attempts: int = 1, - security_code: bool = True, - postal_code: Union[bool, str] = True, - min_postal_code_length: int = 0, - token_type: str = 'reusable', - charge_amount: Optional[str] = None, - currency: str = 'usd', - language: str = 'en-US', - voice: str = 'woman', - description: Optional[str] = None, - valid_card_types: str = 'visa mastercard amex', - parameters: Optional[List[Dict[str, str]]] = None, - prompts: Optional[List[Dict[str, Any]]] = None, - ai_response: Optional[str] = 'The payment status is ${pay_result}, do not mention anything else about collecting payment if successful.' -) -> FunctionResult -``` - -#### Parameters - - - URL to make payment requests to (required) - - - - Method to collect payment details. The SWML pay verb only accepts "dtmf" (schema `input` is `const: "dtmf"`); the earlier "voice" option was never valid. - - - - URL for status change notifications - - - - Payment method ("credit-card" currently supported) - - - - Seconds to wait for next digit (default: 5) - - - - Number of retry attempts (default: 1) - - - - Whether to prompt for security code (default: True) - - - - Whether to prompt for postal code, or actual postcode - - - - Minimum postal code digits (default: 0) - - - - Payment type ("one-time" or "reusable", default: "reusable") - - - - Amount to charge as decimal string - - - - Currency code (default: "usd") - - - - Language for prompts (default: "en-US") - - - - TTS voice to use (default: "woman") - - - - Custom payment description - - - - Space-separated card types (default: "visa mastercard amex") - - - - Array of name/value pairs for payment connector - - - - Array of custom prompt configurations - - - - -#### Returns - -`FunctionResult` — self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 797. - -*** - -### play\_background\_file - -Play audio or video file in background. - -#### Signature - -```python -play_background_file(filename: str, wait: bool = False) -> FunctionResult -``` - -#### Parameters - - - Audio/video filename/path - - - - Whether to suppress attention-getting behavior during playback - - -#### Returns - -`FunctionResult` — self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 500. - -*** - -### record\_call - -Start background call recording using SWML. - -This is a virtual helper that generates SWML to start recording the call -in the background. Unlike foreground recording, the script continues -executing while recording happens in the background. - -#### Signature - -```python -record_call( - control_id: Optional[str] = None, - stereo: bool = False, - format: Literal['wav', 'mp3', 'mp4'] = 'wav', - direction: Literal['speak', 'listen', 'both'] = 'both', - terminators: Optional[str] = None, - beep: bool = False, - input_sensitivity: float = 44.0, - initial_timeout: Optional[float] = None, - end_silence_timeout: Optional[float] = None, - max_length: Optional[float] = None, - status_url: Optional[str] = None -) -> FunctionResult -``` - -#### Parameters - - - Identifier for this recording (for use with stop\_record\_call) - - - - Record in stereo (default: False) - - - - Recording format - "wav", "mp3", or "mp4" (default: "wav") - - - - Audio direction - "speak", "listen", or "both" (default: "both") - - - - Digits that stop recording when pressed - - - - Play beep before recording (default: False) - - - - Input sensitivity for recording (default: 44.0) - - - - Time in seconds to wait for speech start (for voicemail-style recording) - - - - Time in seconds to wait in silence before ending (for voicemail-style recording) - - - - Maximum recording length in seconds - - - - URL to send recording status events to - - -#### Returns - -`FunctionResult` — self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 885. - -*** - -### remove\_global\_data - -Remove global agent data variables. - -#### Signature - -```python -remove_global_data(keys: Union[str, List[str]]) -> FunctionResult -``` - -#### Parameters - - - Single key string or list of keys to remove - - -#### Returns - -`FunctionResult` — self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 592. - -*** - -### remove\_metadata - -Remove metadata from current function's meta\_data\_token scope. - -#### Signature - -```python -remove_metadata(keys: Union[str, List[str]]) -> FunctionResult -``` - -#### Parameters - - - Single key string or list of keys to remove - - -#### Returns - -`FunctionResult` — self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 616. - -*** - -### replace\_in\_history - -After first send, replace tool\_call+result pair in conversation history. - -#### Signature - -```python -replace_in_history(text: Union[str, bool] = True) -> FunctionResult -``` - -#### Parameters - - - String = replace tool\_call with an assistant message containing this text. True = remove the tool\_call+result pair from history entirely. - - -#### Returns - -`FunctionResult` — self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 665. - -*** - -### rpc\_ai\_message - -Inject a message into an AI agent on another call using execute\_rpc. - -This is useful for cross-call communication, such as notifying a held -caller's AI agent about a status change or instructing it to relay -a message. - -> \[!NOTE] -> result = ( -> FunctionResult("I'll let them know.") -> .rpc\_ai\_message( -> call\_id=original\_call\_id, -> message\_text="The person you were trying to reach is unavailable. Please take a message." -> ) -> ) - -#### Signature - -```python -rpc_ai_message( - call_id: str, - message_text: str, - role: str = 'system' -) -> FunctionResult -``` - -#### Parameters - - - The call ID of the target call - - - - The message text to inject into the AI conversation - - - - The role for the message, typically "system" (default: "system") - - -#### Returns - -`FunctionResult` — self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 1383. - -*** - -### rpc\_ai\_unhold - -Unhold another call using execute\_rpc. - -This releases a call from hold state, typically used after injecting -a message to the held caller's AI agent. - -> \[!NOTE] -> result = ( -> FunctionResult("Understood, I'll let them know.") -> .rpc\_ai\_message(call\_id, "No one is available. Please take a message.") -> .rpc\_ai\_unhold(call\_id) -> ) - -#### Signature - -```python -rpc_ai_unhold(call_id: str) -> FunctionResult -``` - -#### Parameters - - - The call ID of the call to unhold - - -#### Returns - -`FunctionResult` — self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 1418. - -*** - -### rpc\_dial - -Dial out to a number with a destination SWML URL using execute\_rpc. - -This is commonly used in call screening scenarios where you place a caller -on hold and dial out to a human, with the dest\_swml specifying what agent -handles the outbound leg. - -> \[!NOTE] -> result = ( -> FunctionResult("Please hold while I connect you.") -> .hold(timeout=120) -> .rpc\_dial( -> to\_number="+15551234567", -> from\_number="+15559876543", -> dest\_swml="https://example.com/call-agent?caller=John" -> ) -> ) - -#### Signature - -```python -rpc_dial( - to_number: str, - from_number: str, - dest_swml: str, - device_type: str = 'phone' -) -> FunctionResult -``` - -#### Parameters - - - Phone number to dial (E.164 format) - - - - Caller ID to use (E.164 format) - - - - URL to the SWML that handles the outbound call - - - - Device type, typically "phone" (default: "phone") - - -#### Returns - -`FunctionResult` — self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 1340. - -*** - -### say - -Make the agent speak specific text. - -#### Signature - -```python -say(text: str) -> FunctionResult -``` - -#### Parameters - - - Text for agent to speak - - -#### Returns - -`FunctionResult` — self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 488. - -*** - -### send\_sms - -Send a text message to a PSTN phone number using SWML. - -This is a virtual helper that generates SWML to send SMS messages. -Either body or media (or both) must be provided. - -#### Signature - -```python -send_sms( - to_number: str, - from_number: str, - body: Optional[str] = None, - media: Optional[List[str]] = None, - tags: Optional[List[str]] = None, - region: Optional[str] = None -) -> FunctionResult -``` - -#### Parameters - - - Phone number in E.164 format to send to - - - - Phone number in E.164 format to send from - - - - Body text of the message (optional if media provided) - - - - Array of URLs to send in the message (optional if body provided) - - - - Array of tags to associate with the message for UI searching - - - - Region to originate the message from - - -#### Returns - -`FunctionResult` — self for method chaining - -#### Throws - -- `ValueError` — If neither body nor media is provided - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 741. - -*** - -### set\_end\_of\_speech\_timeout - -Adjust end of speech timeout - milliseconds of silence after speaking -has been detected to finalize speech recognition. - -#### Signature - -```python -set_end_of_speech_timeout(milliseconds: int) -> FunctionResult -``` - -#### Parameters - - - Timeout in milliseconds - - -#### Returns - -`FunctionResult` — self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 566. - -*** - -### set\_metadata - -Set metadata scoped to current function's meta\_data\_token. - -#### Signature - -```python -set_metadata(data: Dict[str, Any]) -> FunctionResult -``` - -#### Parameters - - - Dictionary of key-value pairs for metadata - - -#### Returns - -`FunctionResult` — self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 604. - -*** - -### set\_post\_process - -Set whether to enable post-processing for this result. - -Post-processing allows the AI to take one more turn with the user -before executing any actions. This is useful for confirmation workflows. - -#### Signature - -```python -set_post_process(post_process: bool) -> FunctionResult -``` - -#### Parameters - - - True to let AI respond once more before executing actions, False to execute actions immediately after the response. - - -#### Returns - -`FunctionResult` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 97. - -*** - -### set\_response - -Set the natural language response text - -#### Signature - -```python -set_response(response: str) -> FunctionResult -``` - -#### Parameters - - - The text the AI should say - - -#### Returns - -`FunctionResult` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 84. - -*** - -### set\_speech\_event\_timeout - -Adjust speech event timeout - milliseconds since last speech detection -event to finalize recognition. Works better in noisy environments. - -#### Signature - -```python -set_speech_event_timeout(milliseconds: int) -> FunctionResult -``` - -#### Parameters - - - Timeout in milliseconds - - -#### Returns - -`FunctionResult` — self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 579. - -*** - -### simulate\_user\_input - -Queue simulated user input. - -#### Signature - -```python -simulate_user_input(text: str) -> FunctionResult -``` - -#### Parameters - - - Text to simulate as user input - - -#### Returns - -`FunctionResult` — self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 729. - -*** - -### sip\_refer - -Send SIP REFER to a SIP call using SWML. - -This is a virtual helper that generates SWML to send a SIP REFER -message, which is used for call transfer in SIP environments. - -#### Signature - -```python -sip_refer(to_uri: str) -> FunctionResult -``` - -#### Parameters - - - The SIP URI to send the REFER to (required) - - -#### Returns - -`FunctionResult` — self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 1020. - -*** - -### stop - -Stop the agent execution. - -#### Signature - -```python -stop() -> FunctionResult -``` - -#### Returns - -`FunctionResult` — self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 479. - -*** - -### stop\_background\_file - -Stop currently playing background file. - -#### Signature - -```python -stop_background_file() -> FunctionResult -``` - -#### Returns - -`FunctionResult` — self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 516. - -*** - -### stop\_record\_call - -Stop an active background call recording using SWML. - -This is a virtual helper that generates SWML to stop a recording that -was started with record\_call(). - -#### Signature - -```python -stop_record_call(control_id: Optional[str] = None) -> FunctionResult -``` - -#### Parameters - - - Identifier for the recording to stop. If not provided, the most recent recording will be stopped. - - -#### Returns - -`FunctionResult` — self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 959. - -*** - -### stop\_tap - -Stop an active tap stream using SWML. - -This is a virtual helper that generates SWML to stop a tap stream -that was started with tap(). - -#### Signature - -```python -stop_tap(control_id: Optional[str] = None) -> FunctionResult -``` - -#### Parameters - - - ID of the tap to stop (optional) If not set, the last tap started will be stopped - - -#### Returns - -`FunctionResult` — self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 1256. - -*** - -### switch\_context - -Change agent context/prompt during conversation. - -#### Signature - -```python -switch_context( - system_prompt: Optional[str] = None, - user_prompt: Optional[str] = None, - consolidate: bool = False, - full_reset: bool = False -) -> FunctionResult -``` - -#### Parameters - - - New system prompt - - - - User message to add - - - - Whether to summarize existing conversation - - - - Whether to do complete context reset - - -#### Returns - -`FunctionResult` — self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 699. - -*** - -### swml\_change\_context - -Force the conversation into a different context. - -Webhook-triggered context changes bypass any `valid_contexts` clamp. -Step state resets (cur\_step = 0) on entry. The new context's first -step's instructions are injected on the next turn. - -#### Communicating intent to the destination context - -Same pattern as swml\_change\_step: the model reads your FunctionResult's -`response` text as the tool result before it sees the destination -context's first step. Put your reason there: - -``` -FunctionResult( - "I'm transferring you to billing because your question is " - "about an invoice charge." -).swml_change_context("billing") -``` - -For structured carry-over, use update\_global\_data() and reference the -values via $\{var\} expansion in the destination context's step text. - -Note that conversation history is preserved across context switches -unless the destination context is marked `isolated=True`. The model -retains everything the user said in the previous context — you do -not need to re-state it. - -> \[!NOTE] -> result = ( -> FunctionResult("Transferring you to technical support.") -> .update\_global\_data(\{"original\_issue": user\_problem\}) -> .swml\_change\_context("technical\_support") -> ) - -#### Signature - -```python -swml_change_context(context_name: str) -> FunctionResult -``` - -#### Parameters - - - Name of the context to switch to. Must exist in the agent's context map. - - -#### Returns - -`FunctionResult` — Self for method chaining. - -#### Examples - -```python -FunctionResult( - "I'm transferring you to billing because your question is " - "about an invoice charge." -).swml_change_context("billing") -``` - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 353. - -*** - -### swml\_change\_step - -Force the conversation into a specific step in the current context. - -This is a workflow-level transition driven by your webhook, not by the -model. Webhook-triggered step changes bypass any `valid_steps` clamp -on the current step (the model's `next_step` tool is the constrained -path; this is the unconstrained one). Use it when something the user -said unambiguously requires moving the flow forward. - -#### Communicating intent to the destination step - -When the model arrives at the new step, the next thing it sees in -history is the tool result that contained this action — i.e., your -FunctionResult's `response` text. Put your "why" there. The model -reads it before the new step's injected instructions: - -``` -FunctionResult( - "Premium plan confirmed. Now collecting payment details." -).swml_change_step("collect_payment") -``` - -For structured data the destination step needs (account number, -plan tier, etc.), pair this with `update_global_data()` and reference -the values from the destination step's `text` via $\{var\} expansion: - -``` -(FunctionResult("Premium plan confirmed.") - .update_global_data({"plan": "premium", "billing_cycle": "annual"}) - .swml_change_step("collect_payment")) -``` - -And in the destination step's text: - -``` -step.set_text( - "Collect payment for the ${plan} plan, billed ${billing_cycle}. " - "Confirm the amount with the user before proceeding." -) -``` - -> \[!NOTE] -> result = ( -> FunctionResult("Starting a new hand") -> .update\_global\_data(\{"chips": 1000\}) -> .swml\_change\_step("betting") -> ) - -#### Signature - -```python -swml_change_step(step_name: str) -> FunctionResult -``` - -#### Parameters - - - Name of the step to transition to. The step must exist in the current context. - - -#### Returns - -`FunctionResult` — Self for method chaining. - -#### Examples - - - - ```python - FunctionResult( - "Premium plan confirmed. Now collecting payment details." - ).swml_change_step("collect_payment") - ``` - - - - ```python - (FunctionResult("Premium plan confirmed.") - .update_global_data({"plan": "premium", "billing_cycle": "annual"}) - .swml_change_step("collect_payment")) - ``` - - - - ```python - step.set_text( - "Collect payment for the ${plan} plan, billed ${billing_cycle}. " - "Confirm the amount with the user before proceeding." - ) - ``` - - - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 301. - -*** - -### swml\_transfer - -Add a SWML transfer action with AI response setup for when transfer completes. - -This is a virtual helper that generates SWML to transfer the call to another -destination and sets up an AI response for when the transfer completes and -control returns to the agent. - -For transfers, you typically want to enable post-processing so the AI speaks -the response first before executing the transfer. - -> \[!NOTE] -> -> ### Permanent transfer (default) -> -> result = ( -> FunctionResult("I'm transferring you to support", post\_process=True) -> .swml\_transfer( -> "https://support.example.com/swml", -> "Goodbye!" # Won't be used since final=True by default -> ) -> ) -> -> ### Temporary transfer with return -> -> result.swml\_transfer( -> dest, -> "The support call is complete. How else can I help?", -> final=False -> ) - -#### Signature - -```python -swml_transfer(dest: str, ai_response: str, final: bool = True) -> FunctionResult -``` - -#### Parameters - - - Destination URL for the transfer (SWML endpoint, SIP address, etc.) - - - - Message the AI should say when transfer completes and control returns - - - - Whether this is a permanent transfer (True) or temporary (False). Defaults to True for permanent transfers (same as connect method). - - -#### Returns - -`FunctionResult` — Self for method chaining - -#### Examples - -```python -# Temporary transfer with return -result.swml_transfer( - dest, - "The support call is complete. How else can I help?", - final=False -) -``` - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 191. - -*** - -### swml\_user\_event - -Send a user event through SWML to update the client UI. - -This is a convenience method for sending user events to connected clients, -commonly used for real-time UI updates in interactive applications. - -> \[!NOTE] -> result = ( -> FunctionResult("You have blackjack!") -> .swml\_user\_event(\{ -> "type": "cards\_dealt", -> "player\_hand": player\_cards, -> "dealer\_hand": dealer\_cards, -> "player\_score": 21 -> \}) -> ) - -#### Signature - -```python -swml_user_event(event_data: Dict[str, Any]) -> FunctionResult -``` - -#### Parameters - - - Dictionary containing the event type and any associated data Example: \{"type": "cards\_dealt", "player\_hand": \[...], "score": 21\} - - -#### Returns - -`FunctionResult` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 263. - -*** - -### tap - -Start background call tap using SWML. - -This is a virtual helper that generates SWML to start background call tapping. -Media is streamed over Websocket or RTP to customer controlled URI. - -#### Signature - -```python -tap( - uri: str, - control_id: Optional[str] = None, - direction: Literal['speak', 'hear', 'both'] = 'both', - codec: Literal['PCMU', 'PCMA'] = 'PCMU', - rtp_ptime: int = 20, - status_url: Optional[str] = None -) -> FunctionResult -``` - -#### Parameters - - - Destination of tap media stream (required) Formats: rtp://IP:port, ws://example.com, or wss://example.com - - - - Identifier for this tap to use with stop\_tap (optional) Default is generated and stored in tap\_control\_id variable - - - - Direction of audio to tap (default: "both") "speak" = what party says "hear" = what party hears\ - "both" = what party hears and says - - - - Codec for tap media stream - "PCMU" or "PCMA" (default: "PCMU") - - - - Packetization time in milliseconds for RTP (default: 20) - - - - URL for status change requests (optional) - - -#### Returns - -`FunctionResult` — self for method chaining - -#### Throws - -- `ValueError` — If direction or codec values are invalid - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 1186. - -*** - -### to\_dict - -Convert to the JSON structure expected by SWAIG - -The result must have at least one of: - -- 'response': Text to be spoken by the AI -- 'action': Array of action objects - -Optional: - -- 'post\_process': Boolean controlling when actions execute - -#### Signature - -```python -to_dict() -> Dict[str, Any] -``` - -#### Returns - -`Dict[str, Any]` — Dictionary in SWAIG function response format - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 1506. - -*** - -### toggle\_functions - -Enable/disable specific SWAIG functions. - -#### Signature - -```python -toggle_functions(function_toggles: List[Dict[str, Any]]) -> FunctionResult -``` - -#### Parameters - - - List of dicts with 'function' and 'active' keys - - -#### Returns - -`FunctionResult` — self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 628. - -*** - -### update\_global\_data - -Update global agent data variables. - -This is a convenience method that abstracts the set\_global\_data action. -Global data persists across the entire agent session and is available -in prompt variables and can be accessed by all functions. - -#### Signature - -```python -update_global_data(data: Dict[str, Any]) -> FunctionResult -``` - -#### Parameters - - - Dictionary of key-value pairs to set/update in global data - - -#### Returns - -`FunctionResult` — self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 247. - -*** - -### update\_settings - -Update agent runtime settings. - -Supported settings: - -- frequency-penalty: Float (-2.0 to 2.0) -- presence-penalty: Float (-2.0 to 2.0) -- max-tokens: Integer (0 to 4096) -- top-p: Float (0.0 to 1.0) -- confidence: Float (0.0 to 1.0) -- barge-confidence: Float (0.0 to 1.0) -- temperature: Float (0.0 to 2.0, clamped to 1.5) - -#### Signature - -```python -update_settings(settings: Dict[str, Any]) -> FunctionResult -``` - -#### Parameters - - - Dictionary of settings to update - - -#### Returns - -`FunctionResult` — self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 678. - -*** - -### wait\_for\_user - -Control how agent waits for user input. - -#### Signature - -```python -wait_for_user( - enabled: Optional[bool] = None, - timeout: Optional[int] = None, - answer_first: bool = False -) -> FunctionResult -``` - -#### Parameters - - - Boolean to enable/disable waiting - - - - Number of seconds to wait - - - - Special "answer\_first" mode - - -#### Returns - -`FunctionResult` — self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 456. - -## Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 17. diff --git a/fern/products/sdk-reference/python/signalwire/core/function-result/index.mdx b/fern/products/sdk-reference/python/signalwire/core/function-result/index.mdx deleted file mode 100644 index 2dd57448e3..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/function-result/index.mdx +++ /dev/null @@ -1,44 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/function-result" -title: "function_result" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.core.function_result" - parent: "signalwire.core" - module: "signalwire.core" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py" ---- -# `function_result` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module function_result -``` - -## Properties - - - -## Classes - - - - Wrapper around SWAIG function responses that handles proper formatting of response text and actions. - - - -## Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/index.mdx b/fern/products/sdk-reference/python/signalwire/core/index.mdx index d6bf9fabca..ff6d0bbf6e 100644 --- a/fern/products/sdk-reference/python/signalwire/core/index.mdx +++ b/fern/products/sdk-reference/python/signalwire/core/index.mdx @@ -31,86 +31,6 @@ module core -## Modules - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - ## Source [`signalwire/signalwire/core/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/logging-config/index.mdx b/fern/products/sdk-reference/python/signalwire/core/logging-config/index.mdx deleted file mode 100644 index 51d3fb6bff..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/logging-config/index.mdx +++ /dev/null @@ -1,154 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/logging-config" -title: "logging_config" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.core.logging_config" - parent: "signalwire.core" - module: "signalwire.core" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/logging_config.py" ---- -# `logging_config` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module logging_config -``` - -## Functions - -### configure\_logging - -Configure logging system once, globally, based on environment variables - -> \[!NOTE] -> SIGNALWIRE\_LOG\_MODE: off, stderr, default, auto -> SIGNALWIRE\_LOG\_LEVEL: debug, info, warning, error, critical -> SIGNALWIRE\_LOG\_FORMAT: console, json (default: console) - -#### Signature - -```python -configure_logging() -``` - -#### Source - -[`signalwire/signalwire/core/logging_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/logging_config.py) - -Line 98. - -*** - -### get\_execution\_mode - -Determine the execution mode based on environment variables - -#### Signature - -```python -get_execution_mode() -``` - -#### Returns - -'server', 'cgi', 'lambda', 'google\_cloud\_function', 'azure\_function', or 'unknown' - -#### Source - -[`signalwire/signalwire/core/logging_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/logging_config.py) - -Line 44. - -*** - -### get\_logger - -Get a logger instance for the specified name with structured logging support - -This is the single entry point for all logging in the SDK. -All modules should use this instead of direct logging module usage. - -#### Signature - -```python -get_logger(name) -``` - -#### Parameters - - - Logger name, typically **name** - - -#### Returns - -A structlog BoundLogger that supports .bind(), .info(), .debug(), etc. - -#### Source - -[`signalwire/signalwire/core/logging_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/logging_config.py) - -Line 280. - -*** - -### reset\_logging\_configuration - -Reset the logging configuration flag to allow reconfiguration - -This is useful when environment variables change after initial configuration. - -#### Signature - -```python -reset_logging_configuration() -``` - -#### Source - -[`signalwire/signalwire/core/logging_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/logging_config.py) - -Line 75. - -*** - -### strip\_control\_chars - -Strip control characters from log event values to prevent log injection. - -#### Signature - -```python -strip_control_chars(logger, method_name, event_dict) -``` - -#### Parameters - - - - - - - -#### Source - -[`signalwire/signalwire/core/logging_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/logging_config.py) - -Line 33. - -## Source - -[`signalwire/signalwire/core/logging_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/logging_config.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/mixins/ai-config-mixin/ai-config-mixin/index.mdx b/fern/products/sdk-reference/python/signalwire/core/mixins/ai-config-mixin/ai-config-mixin/index.mdx deleted file mode 100644 index ce7e7e3020..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/mixins/ai-config-mixin/ai-config-mixin/index.mdx +++ /dev/null @@ -1,963 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/mixins/ai-config-mixin/ai-config-mixin" -title: "AIConfigMixin" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.core.mixins.ai_config_mixin.AIConfigMixin" - parent: "signalwire.core.mixins.ai_config_mixin" - module: "signalwire.core.mixins.ai_config_mixin" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py" ---- -# `AIConfigMixin` - -Mixin class containing all AI configuration methods for AgentBase - -## Signature - -```python -class AIConfigMixin -``` - -## Properties - - - -## Methods - -### add\_function\_include - -Add a remote function include to the SWAIG configuration - -#### Signature - -```python -add_function_include( - url: str, - functions: List[str], - meta_data: Optional[Dict[str, Any]] = None -) -> AgentBase -``` - -#### Parameters - - - URL to fetch remote functions from - - - - List of function names to include - - - - Optional metadata to include with the function include - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) - -Line 502. - -*** - -### add\_hint - -Add a simple string hint to help the AI agent understand certain words better - -#### Signature - -```python -add_hint(hint: str) -> AgentBase -``` - -#### Parameters - - - The hint string to add - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) - -Line 19. - -*** - -### add\_hints - -Add multiple string hints - -#### Signature - -```python -add_hints(hints: List[str]) -> AgentBase -``` - -#### Parameters - - - List of hint strings - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) - -Line 33. - -*** - -### add\_internal\_filler - -Add internal fillers for a single internal function and language. - -See set\_internal\_fillers() for the complete list of supported -function\_name values and an explanation of what fillers do. - -> \[!NOTE] -> agent.add\_internal\_filler( -> "change\_context", "en-US", -> \["Let me switch over to that...", "One moment..."] -> ) - -#### Signature - -```python -add_internal_filler( - function_name: str, - language_code: str, - fillers: List[str] -) -> AgentBase -``` - -#### Parameters - - - One of the supported internal function names (see SUPPORTED\_INTERNAL\_FILLER\_NAMES). Common values: 'next\_step', 'change\_context', 'check\_time', 'wait\_for\_user', 'hangup'. Names outside the supported set log a warning and are ignored by the runtime. - - - - Language code (e.g. 'en-US', 'es', 'fr'). - - - - List of filler phrases for this function and language. - - -#### Returns - -`AgentBase` — Self for method chaining. - -#### Source - -[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) - -Line 425. - -*** - -### add\_language - -Add a language configuration to support multilingual conversations - -### Simple voice name - -agent.add\_language("English", "en-US", "en-US-Neural2-F") - -### Explicit parameters - -agent.add\_language("English", "en-US", "josh", engine="elevenlabs", model="eleven\_turbo\_v2\_5") - -### Combined format - -agent.add\_language("English", "en-US", "elevenlabs.josh:eleven\_turbo\_v2\_5") - -### Per-language params (engine-specific knobs) - -agent.add\_language("English", "en-US", "josh", -engine="elevenlabs", -params=\{"stability": 0.5, "similarity\_boost": 0.75\}) - -#### Signature - -```python -add_language( - name: str, - code: str, - voice: str, - speech_fillers: Optional[List[str]] = None, - function_fillers: Optional[List[str]] = None, - engine: Optional[str] = None, - model: Optional[str] = None, - params: Optional[Dict[str, Any]] = None -) -> AgentBase -``` - -#### Parameters - - - Name of the language (e.g., "English", "French") - - - - Language code (e.g., "en-US", "fr-FR") - - - - TTS voice to use. Can be a simple name (e.g., "en-US-Neural2-F") or a combined format "engine.voice:model" (e.g., "elevenlabs.josh:eleven\_turbo\_v2\_5") - - - - Optional list of filler phrases for natural speech - - - - Optional list of filler phrases during function calls - - - - Optional explicit engine name (e.g., "elevenlabs", "rime") - - - - Optional explicit model name (e.g., "eleven\_turbo\_v2\_5", "arcana") - - - - Optional per-language params dict (engine-specific tuning, voice settings, etc.). Emitted as the language object's `params` key in SWML. - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Examples - -```python -# Explicit parameters -agent.add_language("English", "en-US", "josh", engine="elevenlabs", model="eleven_turbo_v2_5") - -# Combined format -agent.add_language("English", "en-US", "elevenlabs.josh:eleven_turbo_v2_5") - -# Per-language params (engine-specific knobs) -agent.add_language("English", "en-US", "josh", - engine="elevenlabs", - params={"stability": 0.5, "similarity_boost": 0.75}) -``` - -#### Source - -[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) - -Line 75. - -*** - -### add\_mcp\_server - -Add an external MCP server for tool discovery and invocation. - -Tools are discovered via the MCP protocol at session start and -registered as SWAIG functions. Resources are optionally fetched -into global\_data. - -#### Signature - -```python -add_mcp_server( - url: str, - headers: Optional[Dict[str, str]] = None, - resources: bool = False, - resource_vars: Optional[Dict[str, str]] = None -) -> AgentBase -``` - -#### Parameters - - - MCP server HTTP endpoint URL - - - - Optional HTTP headers (e.g. \{"Authorization": "Bearer sk-xxx"\}) - - - - Whether to fetch resources into global\_data - - - - Variables for URI template substitution (e.g. \{"caller\_id": "$\{caller\_id\_number\}"\}) - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) - -Line 546. - -*** - -### add\_pattern\_hint - -Add a complex hint with pattern matching - -#### Signature - -```python -add_pattern_hint( - hint: str, - pattern: str, - replace: str, - ignore_case: bool = False -) -> AgentBase -``` - -#### Parameters - - - The hint to match - - - - Regular expression pattern - - - - Text to replace the hint with - - - - Whether to ignore case when matching - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) - -Line 49. - -*** - -### add\_pronunciation - -Add a pronunciation rule to help the AI speak certain words correctly - -#### Signature - -```python -add_pronunciation( - replace: str, - with_text: str, - ignore_case: bool = False -) -> AgentBase -``` - -#### Parameters - - - The expression to replace - - - - The phonetic spelling to use instead - - - - Whether to ignore case when matching - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) - -Line 217. - -*** - -### enable\_debug\_events - -Enable debug event webhook for this agent. - -When enabled, the AI module will POST real-time debug events to a -/debug\_events endpoint on this agent during calls. Events are -automatically logged via the agent's structured logger, and can -optionally be handled with a custom callback via on\_debug\_event(). - -> \[!NOTE] -> agent = AgentBase("my\_agent") -> agent.enable\_debug\_events(level=1) -> -> @agent.on\_debug\_event -> def handle\_debug(event\_type, data): -> if event\_type == "llm\_error": -> alert\_ops\_team(data) - -#### Signature - -```python -enable_debug_events(level: int = 1) -> AgentBase -``` - -#### Parameters - - - Debug event verbosity level. 1 = high-level events (barge, errors, session start/end, step changes) 2+ = adds high-volume events (every LLM request/response, conversation\_add) - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Examples - -```python -@agent.on_debug_event -def handle_debug(event_type, data): - if event_type == "llm_error": - alert_ops_team(data) -``` - -#### Source - -[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) - -Line 472. - -*** - -### enable\_mcp\_server - -Expose this agent's @tool functions as an MCP server endpoint. - -Adds a /mcp route that speaks JSON-RPC 2.0 (MCP protocol). -Other MCP clients (Claude Desktop, other agents, etc.) can -connect and use the same tools. The agent's SWML output also -references this endpoint for native MCP tool discovery. - -#### Signature - -```python -enable_mcp_server() -> AgentBase -``` - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) - -Line 574. - -*** - -### get\_language\_params - -Read the per-language `params` dict for a previously-added language. - -#### Signature - -```python -get_language_params(code: str) -> Optional[Dict[str, Any]] -``` - -#### Parameters - - - Language code as previously passed to `add_language`. - - -#### Returns - -`Optional[Dict[str, Any]]` — The params dict if set, `None` otherwise (including when the code is unknown). - -#### Source - -[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) - -Line 188. - -*** - -### set\_function\_includes - -Set the complete list of function includes - -#### Signature - -```python -set_function_includes(includes: List[Dict[str, Any]]) -> AgentBase -``` - -#### Parameters - - - List of include objects, each with url and functions properties - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) - -Line 525. - -*** - -### set\_global\_data - -Merge data into the global data available to the AI throughout the conversation. - -This merges (not replaces) so that skills and other callers can each -contribute keys without clobbering each other. - -#### Signature - -```python -set_global_data(data: Dict[str, Any]) -> AgentBase -``` - -#### Parameters - - - Dictionary of global data to merge - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) - -Line 286. - -*** - -### set\_internal\_fillers - -Set internal fillers for native SWAIG functions. - -Internal fillers are short phrases the AI agent speaks (via TTS) while -an internal/native function is running, so the caller doesn't hear -dead air during transitions or background work. - -Supported function names (matches the SWAIGInternalFiller schema): - -``` -hangup — when the agent is hanging up -check_time — when checking the time -wait_for_user — when waiting for user input -wait_seconds — during deliberate pauses -adjust_response_latency — when adjusting response timing -next_step — transitioning between steps in prompt.contexts -change_context — switching between contexts in prompt.contexts -get_visual_input — processing visual input (enable_vision=True) -get_ideal_strategy — thinking (enable_thinking=True) -``` - -Notably NOT supported: change\_step, gather\_submit, or arbitrary -user-defined SWAIG function names. The runtime only honors fillers -for the names listed above; everything else is silently ignored at -the SWML level. This method warns at registration time if you pass -an unknown name so you catch the typo early. - -Without internal fillers, callers hear dead air during context -switches and other internal transitions — set this on every agent -that uses contexts/steps with audio. - -> \[!NOTE] -> agent.set\_internal\_fillers(\{ -> "next\_step": \{ -> "en-US": \["Moving to the next step...", "Great, let's continue..."], -> "es": \["Pasando al siguiente paso...", "Excelente, continuemos..."] -> \}, -> "change\_context": \{ -> "en-US": \["Let me switch modes...", "One moment..."] -> \}, -> "check\_time": \{ -> "en-US": \["Let me check the time...", "Getting the current time..."] -> \} -> \}) - -#### Signature - -```python -set_internal_fillers( - internal_fillers: Dict[str, Dict[str, List[str]]] -) -> AgentBase -``` - -#### Parameters - - - Dictionary mapping function names to language-specific filler phrases. Format: \{"function\_name": \{"language\_code": \["phrase1", "phrase2"]\}\} - - -#### Returns - -`AgentBase` — Self for method chaining. - -#### Examples - -```python -hangup — when the agent is hanging up -check_time — when checking the time -wait_for_user — when waiting for user input -wait_seconds — during deliberate pauses -adjust_response_latency — when adjusting response timing -next_step — transitioning between steps in prompt.contexts -change_context — switching between contexts in prompt.contexts -get_visual_input — processing visual input (enable_vision=True) -get_ideal_strategy — thinking (enable_thinking=True) -``` - -#### Source - -[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) - -Line 353. - -*** - -### set\_language\_params - -Set (or replace) the per-language `params` dict on an already-added -language. Useful when language entries are built up via add\_language() -first and engine-specific tuning is added later (e.g., from a config -loader). Returns self for chaining. - -#### Signature - -```python -set_language_params(code: str, params: Dict[str, Any]) -> AgentBase -``` - -#### Parameters - - - Language code as previously passed to `add_language` (e.g. `"en-US"`). - - - - Engine-specific params dict to attach. Empty dict removes the key. - - -#### Returns - -`AgentBase` — Self for method chaining. No-op if the code isn't found. - -#### Source - -[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) - -Line 165. - -*** - -### set\_languages - -Set all language configurations at once - -#### Signature - -```python -set_languages(languages: List[Dict[str, Any]]) -> AgentBase -``` - -#### Parameters - - - List of language configuration dictionaries - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) - -Line 203. - -*** - -### set\_native\_functions - -Set the list of native functions to enable - -#### Signature - -```python -set_native_functions(function_names: List[str]) -> AgentBase -``` - -#### Parameters - - - List of native function names - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) - -Line 323. - -*** - -### set\_param - -Set a single AI parameter - -#### Signature - -```python -set_param(key: str, value: Any) -> AgentBase -``` - -#### Parameters - - - Parameter name - - - - Parameter value - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) - -Line 257. - -*** - -### set\_params - -Set multiple AI parameters at once - -#### Signature - -```python -set_params(params: Dict[str, Any]) -> AgentBase -``` - -#### Parameters - - - Dictionary of parameter name/value pairs - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) - -Line 272. - -*** - -### set\_post\_prompt\_llm\_params - -Set LLM parameters for the post-prompt. - -Accepts any parameters which will be passed through to the SignalWire server. -The server will validate and apply parameters based on the target model's capabilities. - -> \[!NOTE] -> model: The AI model to use (gpt-4o-mini, gpt-4.1-mini, gpt-4.1-nano, nova-micro, nova-lite, qwen3-235b-A22b-instruct) -> temperature: Randomness setting. Lower values make output more deterministic. -> top\_p: Alternative to temperature. Controls nucleus sampling. -> presence\_penalty: Topic diversity. Positive values encourage new topics. -> frequency\_penalty: Repetition control. Positive values reduce repetition. - -Note: Parameters are model-specific and will be validated by the server. -Invalid parameters for the selected model will be handled/ignored by the server. -barge\_confidence is not applicable to post-prompt. - -> \[!NOTE] -> agent.set\_post\_prompt\_llm\_params( -> model="gpt-4o-mini", -> temperature=0.5, # More deterministic for post-prompt -> top\_p=0.9 -> ) - -#### Signature - -```python -set_post_prompt_llm_params(**params = {}) -> AgentBase -``` - -#### Parameters - - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) - -Line 624. - -*** - -### set\_prompt\_llm\_params - -Set LLM parameters for the main prompt. - -Accepts any parameters which will be passed through to the SignalWire server. -The server will validate and apply parameters based on the target model's capabilities. - -> \[!NOTE] -> model: The AI model to use (gpt-4o-mini, gpt-4.1-mini, gpt-4.1-nano, nova-micro, nova-lite, qwen3-235b-A22b-instruct) -> temperature: Randomness setting. Lower values make output more deterministic. -> top\_p: Alternative to temperature. Controls nucleus sampling. -> barge\_confidence: ASR confidence to interrupt. Higher values make it harder to interrupt. -> presence\_penalty: Topic diversity. Positive values encourage new topics. -> frequency\_penalty: Repetition control. Positive values reduce repetition. - -Note: Parameters are model-specific and will be validated by the server. -Invalid parameters for the selected model will be handled/ignored by the server. - -> \[!NOTE] -> agent.set\_prompt\_llm\_params( -> model="nova-micro", # Using Amazon's nova-micro model -> temperature=0.7, -> top\_p=0.9, -> barge\_confidence=0.6 -> ) - -#### Signature - -```python -set_prompt_llm_params(**params = {}) -> AgentBase -``` - -#### Parameters - - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) - -Line 589. - -*** - -### set\_pronunciations - -Set all pronunciation rules at once - -#### Signature - -```python -set_pronunciations(pronunciations: List[Dict[str, Any]]) -> AgentBase -``` - -#### Parameters - - - List of pronunciation rule dictionaries - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) - -Line 243. - -*** - -### update\_global\_data - -Update the global data with new values - -#### Signature - -```python -update_global_data(data: Dict[str, Any]) -> AgentBase -``` - -#### Parameters - - - Dictionary of global data to update - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) - -Line 306. - -## Source - -[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) - -Line 14. diff --git a/fern/products/sdk-reference/python/signalwire/core/mixins/ai-config-mixin/index.mdx b/fern/products/sdk-reference/python/signalwire/core/mixins/ai-config-mixin/index.mdx deleted file mode 100644 index cf510052b1..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/mixins/ai-config-mixin/index.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/mixins/ai-config-mixin" -title: "ai_config_mixin" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.core.mixins.ai_config_mixin" - parent: "signalwire.core.mixins" - module: "signalwire.core.mixins" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py" ---- -# `ai_config_mixin` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module ai_config_mixin -``` - -## Classes - - - - Mixin class containing all AI configuration methods for AgentBase - - - -## Source - -[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/mixins/auth-mixin/auth-mixin/index.mdx b/fern/products/sdk-reference/python/signalwire/core/mixins/auth-mixin/auth-mixin/index.mdx deleted file mode 100644 index f6db8d43e5..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/mixins/auth-mixin/auth-mixin/index.mdx +++ /dev/null @@ -1,93 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/mixins/auth-mixin/auth-mixin" -title: "AuthMixin" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.core.mixins.auth_mixin.AuthMixin" - parent: "signalwire.core.mixins.auth_mixin" - module: "signalwire.core.mixins.auth_mixin" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/auth_mixin.py" ---- -# `AuthMixin` - -Mixin class containing all authentication-related methods for AgentBase - -## Signature - -```python -class AuthMixin -``` - -## Methods - -### get\_basic\_auth\_credentials - -Get the basic auth credentials - -#### Signature - -```python -get_basic_auth_credentials( - include_source: bool = False -) -> Union[Tuple[str, str], Tuple[str, str, str]] -``` - -#### Parameters - - - Whether to include the source of the credentials - - -#### Returns - -`Union[Tuple[str, str], Tuple[str, str, str]]` — If include\_source is False: (username, password) tuple If include\_source is True: (username, password, source) tuple, where source is one of: "provided", "environment", or "generated" - -#### Source - -[`signalwire/signalwire/core/mixins/auth_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/auth_mixin.py) - -Line 42. - -*** - -### validate\_basic\_auth - -Validate basic auth credentials - -This method can be overridden by subclasses. - -#### Signature - -```python -validate_basic_auth(username: str, password: str) -> bool -``` - -#### Parameters - - - Username from request - - - - Password from request - - -#### Returns - -`bool` — True if valid, False otherwise - -#### Source - -[`signalwire/signalwire/core/mixins/auth_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/auth_mixin.py) - -Line 24. - -## Source - -[`signalwire/signalwire/core/mixins/auth_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/auth_mixin.py) - -Line 19. diff --git a/fern/products/sdk-reference/python/signalwire/core/mixins/auth-mixin/index.mdx b/fern/products/sdk-reference/python/signalwire/core/mixins/auth-mixin/index.mdx deleted file mode 100644 index 45b0d5cf6e..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/mixins/auth-mixin/index.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/mixins/auth-mixin" -title: "auth_mixin" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.core.mixins.auth_mixin" - parent: "signalwire.core.mixins" - module: "signalwire.core.mixins" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/auth_mixin.py" ---- -# `auth_mixin` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module auth_mixin -``` - -## Classes - - - - Mixin class containing all authentication-related methods for AgentBase - - - -## Source - -[`signalwire/signalwire/core/mixins/auth_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/auth_mixin.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/mixins/index.mdx b/fern/products/sdk-reference/python/signalwire/core/mixins/index.mdx deleted file mode 100644 index 8758d7d052..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/mixins/index.mdx +++ /dev/null @@ -1,76 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/mixins" -title: "mixins" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.core.mixins" - parent: "signalwire.core" - module: "signalwire.core" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/__init__.py" ---- -# `mixins` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module mixins -``` - -## Properties - - - -## Modules - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - -## Source - -[`signalwire/signalwire/core/mixins/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/mixins/mcp-server-mixin/index.mdx b/fern/products/sdk-reference/python/signalwire/core/mixins/mcp-server-mixin/index.mdx deleted file mode 100644 index 80abd8abb1..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/mixins/mcp-server-mixin/index.mdx +++ /dev/null @@ -1,44 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/mixins/mcp-server-mixin" -title: "mcp_server_mixin" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.core.mixins.mcp_server_mixin" - parent: "signalwire.core.mixins" - module: "signalwire.core.mixins" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/mcp_server_mixin.py" ---- -# `mcp_server_mixin` - -Copyright (c) 2025 SignalWire - -MCP Server Mixin for AgentBase - -Exposes @tool decorated functions as an MCP server endpoint at /mcp. -Handles the MCP JSON-RPC 2.0 protocol: initialize, tools/list, tools/call. - -## Signature - -```python -module mcp_server_mixin -``` - -## Properties - - - -## Classes - - - - Mixin that adds MCP server endpoint to an agent - - - -## Source - -[`signalwire/signalwire/core/mixins/mcp_server_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/mcp_server_mixin.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/mixins/mcp-server-mixin/mcp-server-mixin/index.mdx b/fern/products/sdk-reference/python/signalwire/core/mixins/mcp-server-mixin/mcp-server-mixin/index.mdx deleted file mode 100644 index d2b138ab30..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/mixins/mcp-server-mixin/mcp-server-mixin/index.mdx +++ /dev/null @@ -1,29 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/mixins/mcp-server-mixin/mcp-server-mixin" -title: "MCPServerMixin" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.core.mixins.mcp_server_mixin.MCPServerMixin" - parent: "signalwire.core.mixins.mcp_server_mixin" - module: "signalwire.core.mixins.mcp_server_mixin" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/mcp_server_mixin.py" ---- -# `MCPServerMixin` - -Mixin that adds MCP server endpoint to an agent - -## Signature - -```python -class MCPServerMixin -``` - -## Source - -[`signalwire/signalwire/core/mixins/mcp_server_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/mcp_server_mixin.py) - -Line 18. diff --git a/fern/products/sdk-reference/python/signalwire/core/mixins/prompt-mixin/index.mdx b/fern/products/sdk-reference/python/signalwire/core/mixins/prompt-mixin/index.mdx deleted file mode 100644 index d47f15aa79..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/mixins/prompt-mixin/index.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/mixins/prompt-mixin" -title: "prompt_mixin" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.core.mixins.prompt_mixin" - parent: "signalwire.core.mixins" - module: "signalwire.core.mixins" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/prompt_mixin.py" ---- -# `prompt_mixin` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module prompt_mixin -``` - -## Classes - - - - Mixin class containing all prompt-related methods for AgentBase - - - -## Source - -[`signalwire/signalwire/core/mixins/prompt_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/prompt_mixin.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/mixins/prompt-mixin/prompt-mixin/index.mdx b/fern/products/sdk-reference/python/signalwire/core/mixins/prompt-mixin/prompt-mixin/index.mdx deleted file mode 100644 index 6bfe1bdfe8..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/mixins/prompt-mixin/prompt-mixin/index.mdx +++ /dev/null @@ -1,414 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/mixins/prompt-mixin/prompt-mixin" -title: "PromptMixin" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.core.mixins.prompt_mixin.PromptMixin" - parent: "signalwire.core.mixins.prompt_mixin" - module: "signalwire.core.mixins.prompt_mixin" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/prompt_mixin.py" ---- -# `PromptMixin` - -Mixin class containing all prompt-related methods for AgentBase - -## Signature - -```python -class PromptMixin -``` - -## Properties - - - Get the ContextBuilder for this agent - - -## Methods - -### define\_contexts - -Define contexts and steps for this agent (alternative to POM/prompt) - -> \[!NOTE] -> Contexts can coexist with traditional prompts. The restriction is only -> that you can't mix POM sections with raw text in the main prompt. - -#### Signature - -```python -define_contexts(contexts = None) -> Union[AgentBase, ContextBuilder] -``` - -#### Parameters - - - Optional context configuration (dict or ContextBuilder) - - -#### Returns - -`Union[AgentBase, ContextBuilder]` — ContextBuilder for method chaining if no contexts provided - -#### Source - -[`signalwire/signalwire/core/mixins/prompt_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/prompt_mixin.py) - -Line 121. - -*** - -### get\_post\_prompt - -Get the post-prompt for the agent - -#### Signature - -```python -get_post_prompt() -> Optional[str] -``` - -#### Returns - -`Optional[str]` — Post-prompt text or None if not set - -#### Source - -[`signalwire/signalwire/core/mixins/prompt_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/prompt_mixin.py) - -Line 374. - -*** - -### get\_prompt - -Get the prompt for the agent - -#### Signature - -```python -get_prompt() -> Union[str, List[Dict[str, Any]]] -``` - -#### Returns - -`Union[str, List[Dict[str, Any]]]` — Either a string prompt or a POM object as list of dicts - -#### Source - -[`signalwire/signalwire/core/mixins/prompt_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/prompt_mixin.py) - -Line 327. - -*** - -### prompt\_add\_section - -Add a section to the prompt - -#### Signature - -```python -prompt_add_section( - title: str, - body: str = '', - bullets: Optional[List[str]] = None, - numbered: bool = False, - numbered_bullets: bool = False, - subsections: Optional[List[Dict[str, Any]]] = None -) -> AgentBase -``` - -#### Parameters - - - Section title - - - - Optional section body text - - - - Optional list of bullet points - - - - Whether this section should be numbered - - - - Whether bullets should be numbered - - - - Optional list of subsection objects - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/mixins/prompt_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/prompt_mixin.py) - -Line 228. - -*** - -### prompt\_add\_subsection - -Add a subsection to an existing section (creating parent if needed) - -#### Signature - -```python -prompt_add_subsection( - parent_title: str, - title: str, - body: str = '', - bullets: Optional[List[str]] = None -) -> AgentBase -``` - -#### Parameters - - - Parent section title - - - - Subsection title - - - - Optional subsection body text - - - - Optional list of bullet points - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/mixins/prompt_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/prompt_mixin.py) - -Line 288. - -*** - -### prompt\_add\_to\_section - -Add content to an existing section (creating it if needed) - -#### Signature - -```python -prompt_add_to_section( - title: str, - body: Optional[str] = None, - bullet: Optional[str] = None, - bullets: Optional[List[str]] = None -) -> AgentBase -``` - -#### Parameters - - - Section title - - - - Optional text to append to section body - - - - Optional single bullet point to add - - - - Optional list of bullet points to add - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/mixins/prompt_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/prompt_mixin.py) - -Line 261. - -*** - -### prompt\_has\_section - -Check if a section exists in the prompt - -#### Signature - -```python -prompt_has_section(title: str) -> bool -``` - -#### Parameters - - - Section title to check - - -#### Returns - -`bool` — True if section exists, False otherwise - -#### Source - -[`signalwire/signalwire/core/mixins/prompt_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/prompt_mixin.py) - -Line 315. - -*** - -### reset\_contexts - -Remove all contexts, returning the agent to a no-contexts state. - -This is a convenience wrapper around `define_contexts().reset()`. -Use it in a dynamic config callback when you need to rebuild -contexts from scratch for a specific request. - -Example:: - -``` -def on_dynamic_config(query, body, headers, agent): - if query.get("transfer"): - agent.reset_contexts() - ctx = agent.define_contexts().add_context("default") - ctx.add_step("route").set_text("Route the caller.") -``` - -#### Signature - -```python -reset_contexts() -> AgentBase -``` - -#### Returns - -`AgentBase` — Self for method chaining. - -#### Examples - -```python -def on_dynamic_config(query, body, headers, agent): - if query.get("transfer"): - agent.reset_contexts() - ctx = agent.define_contexts().add_context("default") - ctx.add_step("route").set_text("Route the caller.") -``` - -#### Source - -[`signalwire/signalwire/core/mixins/prompt_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/prompt_mixin.py) - -Line 157. - -*** - -### set\_post\_prompt - -Set the post-prompt text for summary generation - -#### Signature - -```python -set_post_prompt(text: str) -> AgentBase -``` - -#### Parameters - - - The post-prompt text - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/mixins/prompt_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/prompt_mixin.py) - -Line 202. - -*** - -### set\_prompt\_pom - -Set the prompt as a POM dictionary - -#### Signature - -```python -set_prompt_pom(pom: List[Dict[str, Any]]) -> AgentBase -``` - -#### Parameters - - - POM dictionary structure - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/mixins/prompt_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/prompt_mixin.py) - -Line 215. - -*** - -### set\_prompt\_text - -Set the prompt as raw text instead of using POM - -#### Signature - -```python -set_prompt_text(text: str) -> AgentBase -``` - -#### Parameters - - - The raw prompt text - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/mixins/prompt_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/prompt_mixin.py) - -Line 189. - -## Source - -[`signalwire/signalwire/core/mixins/prompt_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/prompt_mixin.py) - -Line 19. diff --git a/fern/products/sdk-reference/python/signalwire/core/mixins/serverless-mixin/index.mdx b/fern/products/sdk-reference/python/signalwire/core/mixins/serverless-mixin/index.mdx deleted file mode 100644 index ac734a5e86..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/mixins/serverless-mixin/index.mdx +++ /dev/null @@ -1,44 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/mixins/serverless-mixin" -title: "serverless_mixin" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.core.mixins.serverless_mixin" - parent: "signalwire.core.mixins" - module: "signalwire.core.mixins" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/serverless_mixin.py" ---- -# `serverless_mixin` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module serverless_mixin -``` - -## Constants - - - -## Classes - - - - Mixin class containing all serverless/cloud platform methods for AgentBase - - - -## Source - -[`signalwire/signalwire/core/mixins/serverless_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/serverless_mixin.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/mixins/serverless-mixin/serverless-mixin/index.mdx b/fern/products/sdk-reference/python/signalwire/core/mixins/serverless-mixin/serverless-mixin/index.mdx deleted file mode 100644 index baafe80410..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/mixins/serverless-mixin/serverless-mixin/index.mdx +++ /dev/null @@ -1,65 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/mixins/serverless-mixin/serverless-mixin" -title: "ServerlessMixin" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.core.mixins.serverless_mixin.ServerlessMixin" - parent: "signalwire.core.mixins.serverless_mixin" - module: "signalwire.core.mixins.serverless_mixin" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/serverless_mixin.py" ---- -# `ServerlessMixin` - -Mixin class containing all serverless/cloud platform methods for AgentBase - -## Signature - -```python -class ServerlessMixin -``` - -## Methods - -### handle\_serverless\_request - -Handle serverless environment requests (CGI, Lambda, Cloud Functions) - -#### Signature - -```python -handle_serverless_request(event = None, context = None, mode = None) -``` - -#### Parameters - - - Serverless event object (Lambda, Cloud Functions) - - - - Serverless context object (Lambda, Cloud Functions) - - - - Override execution mode (from force\_mode in run()) - - -#### Returns - -Response appropriate for the serverless platform - -#### Source - -[`signalwire/signalwire/core/mixins/serverless_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/serverless_mixin.py) - -Line 28. - -## Source - -[`signalwire/signalwire/core/mixins/serverless_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/serverless_mixin.py) - -Line 23. diff --git a/fern/products/sdk-reference/python/signalwire/core/mixins/skill-mixin/index.mdx b/fern/products/sdk-reference/python/signalwire/core/mixins/skill-mixin/index.mdx deleted file mode 100644 index f6201fd467..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/mixins/skill-mixin/index.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/mixins/skill-mixin" -title: "skill_mixin" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.core.mixins.skill_mixin" - parent: "signalwire.core.mixins" - module: "signalwire.core.mixins" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/skill_mixin.py" ---- -# `skill_mixin` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module skill_mixin -``` - -## Classes - - - - Mixin class containing all skill management methods for AgentBase - - - -## Source - -[`signalwire/signalwire/core/mixins/skill_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/skill_mixin.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/mixins/skill-mixin/skill-mixin/index.mdx b/fern/products/sdk-reference/python/signalwire/core/mixins/skill-mixin/skill-mixin/index.mdx deleted file mode 100644 index 9acf84fb83..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/mixins/skill-mixin/skill-mixin/index.mdx +++ /dev/null @@ -1,139 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/mixins/skill-mixin/skill-mixin" -title: "SkillMixin" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.core.mixins.skill_mixin.SkillMixin" - parent: "signalwire.core.mixins.skill_mixin" - module: "signalwire.core.mixins.skill_mixin" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/skill_mixin.py" ---- -# `SkillMixin` - -Mixin class containing all skill management methods for AgentBase - -## Signature - -```python -class SkillMixin -``` - -## Methods - -### add\_skill - -Add a skill to this agent - -#### Signature - -```python -add_skill(skill_name: str, params: Optional[Dict[str, Any]] = None) -> AgentBase -``` - -#### Parameters - - - Name of the skill to add - - - - Optional parameters to pass to the skill for configuration - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Throws - -- `ValueError` — If skill not found or failed to load with detailed error message - -#### Source - -[`signalwire/signalwire/core/mixins/skill_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/skill_mixin.py) - -Line 18. - -*** - -### has\_skill - -Check if skill is loaded - -#### Signature - -```python -has_skill(skill_name: str) -> bool -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`signalwire/signalwire/core/mixins/skill_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/skill_mixin.py) - -Line 53. - -*** - -### list\_skills - -List currently loaded skills - -#### Signature - -```python -list_skills() -> List[str] -``` - -#### Returns - -`List[str]` - -#### Source - -[`signalwire/signalwire/core/mixins/skill_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/skill_mixin.py) - -Line 49. - -*** - -### remove\_skill - -Remove a skill from this agent - -#### Signature - -```python -remove_skill(skill_name: str) -> AgentBase -``` - -#### Parameters - - - -#### Returns - -`AgentBase` - -#### Source - -[`signalwire/signalwire/core/mixins/skill_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/skill_mixin.py) - -Line 44. - -## Source - -[`signalwire/signalwire/core/mixins/skill_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/skill_mixin.py) - -Line 13. diff --git a/fern/products/sdk-reference/python/signalwire/core/mixins/state-mixin/index.mdx b/fern/products/sdk-reference/python/signalwire/core/mixins/state-mixin/index.mdx deleted file mode 100644 index 4de3d0f7b6..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/mixins/state-mixin/index.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/mixins/state-mixin" -title: "state_mixin" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.core.mixins.state_mixin" - parent: "signalwire.core.mixins" - module: "signalwire.core.mixins" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/state_mixin.py" ---- -# `state_mixin` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module state_mixin -``` - -## Classes - - - - Mixin class containing all state and session management methods for AgentBase - - - -## Source - -[`signalwire/signalwire/core/mixins/state_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/state_mixin.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/mixins/state-mixin/state-mixin/index.mdx b/fern/products/sdk-reference/python/signalwire/core/mixins/state-mixin/state-mixin/index.mdx deleted file mode 100644 index 6eea6c5a80..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/mixins/state-mixin/state-mixin/index.mdx +++ /dev/null @@ -1,65 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/mixins/state-mixin/state-mixin" -title: "StateMixin" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.core.mixins.state_mixin.StateMixin" - parent: "signalwire.core.mixins.state_mixin" - module: "signalwire.core.mixins.state_mixin" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/state_mixin.py" ---- -# `StateMixin` - -Mixin class containing all state and session management methods for AgentBase - -## Signature - -```python -class StateMixin -``` - -## Methods - -### validate\_tool\_token - -Validate a tool token - -#### Signature - -```python -validate_tool_token(function_name: str, token: str, call_id: str) -> bool -``` - -#### Parameters - - - Name of the function/tool - - - - Token to validate - - - - Call ID for the session - - -#### Returns - -`bool` — True if token is valid, False otherwise - -#### Source - -[`signalwire/signalwire/core/mixins/state_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/state_mixin.py) - -Line 43. - -## Source - -[`signalwire/signalwire/core/mixins/state_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/state_mixin.py) - -Line 15. diff --git a/fern/products/sdk-reference/python/signalwire/core/mixins/tool-mixin/index.mdx b/fern/products/sdk-reference/python/signalwire/core/mixins/tool-mixin/index.mdx deleted file mode 100644 index 1d394bec64..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/mixins/tool-mixin/index.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/mixins/tool-mixin" -title: "tool_mixin" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.core.mixins.tool_mixin" - parent: "signalwire.core.mixins" - module: "signalwire.core.mixins" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/tool_mixin.py" ---- -# `tool_mixin` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module tool_mixin -``` - -## Classes - - - - Mixin class containing all tool/function-related methods for AgentBase - - - -## Source - -[`signalwire/signalwire/core/mixins/tool_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/tool_mixin.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/mixins/tool-mixin/tool-mixin/index.mdx b/fern/products/sdk-reference/python/signalwire/core/mixins/tool-mixin/tool-mixin/index.mdx deleted file mode 100644 index 9fcb70fec7..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/mixins/tool-mixin/tool-mixin/index.mdx +++ /dev/null @@ -1,309 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/mixins/tool-mixin/tool-mixin" -title: "ToolMixin" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.core.mixins.tool_mixin.ToolMixin" - parent: "signalwire.core.mixins.tool_mixin" - module: "signalwire.core.mixins.tool_mixin" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/tool_mixin.py" ---- -# `ToolMixin` - -Mixin class containing all tool/function-related methods for AgentBase - -## Signature - -```python -class ToolMixin -``` - -## Methods - -### define\_tool - -Define a SWAIG function the AI can call. - -#### How this becomes a tool the model sees - -SWAIG functions are NOT a separate concept from "LLM tools" — they -ARE the tools, exposed to the model in exactly the same shape as -native OpenAI / Anthropic tool calling. Under the hood, the SDK -renders each SWAIG function into an OpenAI-format tool schema: - -``` -{"type": "function", "function": { - "name": "", - "description": "", - "parameters": {} -}} -``` - -That schema is sent to the model on every turn. The model reads -the `description` field and the per-parameter `description` -strings inside `parameters` to decide WHEN to call this tool and -HOW to fill in the arguments. - -Treat description text as prompt engineering, not as developer -documentation: - -- Bad: "Lookup function" - -- Bad: "Internal helper for account fetching" - -- Good: "Look up a customer's account details by their account - number. Use this BEFORE quoting any account-specific - information (balance, plan, status, billing date)." - -- Bad parameter: "the id" - -- Good parameter: "The customer's account number, exactly 8 - digits, no dashes or spaces. Ask the user if - they don't provide it." - -Vague descriptions are the #1 cause of "the model has the right -tool but doesn't call it" failures. Be specific about WHEN to -use the tool, what makes it the right choice over alternatives, -and any preconditions on the arguments. - -Tool count matters too: LLM tool selection accuracy degrades past -\~7-8 simultaneously-active tools per call. If you have many tools, -partition them across steps using Step.set\_functions() so only -the relevant subset is active at any moment. - -> \[!NOTE] -> agent.define\_tool( -> name="lookup\_account", -> description=( -> "Look up a customer's account details by their account " -> "number. Use this BEFORE quoting any account-specific " -> "information. Do not call it for general questions about " -> "the product." -> ), -> parameters=\{ -> "type": "object", -> "properties": \{ -> "account\_number": \{ -> "type": "string", -> "description": ( -> "The customer's 8-digit account number, " -> "no dashes. Ask the user if not provided." -> ), -> \} -> \}, -> "required": \["account\_number"], -> \}, -> handler=self.handle\_lookup\_account, -> ) - -#### Signature - -```python -define_tool( - name: str, - description: str, - parameters: Dict[str, Any], - handler: Callable, - secure: bool = True, - fillers: Optional[Dict[str, List[str]]] = None, - webhook_url: Optional[str] = None, - required: Optional[List[str]] = None, - is_typed_handler: bool = False, - **swaig_fields = {} -) -> AgentBase -``` - -#### Parameters - - - Function name. Must be unique across all SWAIG functions on this agent. Becomes the `name` field in the OpenAI tool schema and is what the model emits when it picks this tool. Use snake\_case; the model picks up naming conventions from this field too. - - - - The function description as the LLM will read it. See above — this is prompt-engineered text, not internal docs. Explain what the tool does, when to use it, and what NOT to use it for if there are sibling tools the model might confuse it with. - - - - JSON Schema for the function's arguments. The per-property `description` fields inside the schema are also LLM-facing — give every parameter a description that tells the model how to fill it in (format, source, constraints). - - - - Python callable invoked when the model calls this tool. Receives parsed args and the raw request data. Should return a FunctionResult or dict; anything else logs a warning and is stringified. - - - - Whether to require SWAIG token validation on the webhook callback. - - - - Optional dict mapping language codes to arrays of filler phrases the AI speaks while the function executes. Format: \{"en-US": \["one moment...", "checking..."]\} - - - - Optional external webhook URL. If set, the SDK does not handle the call locally — the model's tool call is forwarded to this URL. - - - - Optional list of required parameter names. May also be set inside `parameters["required"]`. - - - - Whether the handler uses type-hinted parameters (auto-wrapped from inferred schema). - - - - -#### Returns - -`AgentBase` — Self for method chaining. - -#### Examples - -```python -{"type": "function", "function": { - "name": "", - "description": "", - "parameters": {} -}} -``` - -#### Source - -[`signalwire/signalwire/core/mixins/tool_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/tool_mixin.py) - -Line 26. - -*** - -### define\_tools - -Define the tools this agent can use - -This method can be overridden by subclasses. - -#### Signature - -```python -define_tools() -> List[SWAIGFunction] -``` - -#### Returns - -`List[SWAIGFunction]` — List of SWAIGFunction objects or raw dictionaries (for data\_map tools) - -#### Source - -[`signalwire/signalwire/core/mixins/tool_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/tool_mixin.py) - -Line 200. - -*** - -### on\_function\_call - -Called when a SWAIG function is invoked - -#### Signature - -```python -on_function_call( - name: str, - args: Dict[str, Any], - raw_data: Optional[Dict[str, Any]] = None -) -> Any -``` - -#### Parameters - - - Function name - - - - Function arguments - - - - Raw request data - - -#### Returns - -`Any` — Function result - -#### Source - -[`signalwire/signalwire/core/mixins/tool_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/tool_mixin.py) - -Line 219. - -*** - -### register\_swaig\_function - -Register a raw SWAIG function dictionary (e.g., from DataMap.to\_swaig\_function()) - -#### Signature - -```python -register_swaig_function(function_dict: Dict[str, Any]) -> AgentBase -``` - -#### Parameters - - - Complete SWAIG function definition dictionary - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/mixins/tool_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/tool_mixin.py) - -Line 162. - -*** - -### tool - -Class method decorator for defining SWAIG tools - -Used as: - -@AgentBase.tool(name="example\_function", parameters=\{...\}) -def example\_function(self, param1): -\# ... - -**Modifiers:** `classmethod` - -#### Signature - -```python -@classmethod -tool(name = None, **kwargs = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/core/mixins/tool_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/tool_mixin.py) - -Line 187. - -## Source - -[`signalwire/signalwire/core/mixins/tool_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/tool_mixin.py) - -Line 21. diff --git a/fern/products/sdk-reference/python/signalwire/core/mixins/web-mixin/index.mdx b/fern/products/sdk-reference/python/signalwire/core/mixins/web-mixin/index.mdx deleted file mode 100644 index 8793c05613..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/mixins/web-mixin/index.mdx +++ /dev/null @@ -1,44 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/mixins/web-mixin" -title: "web_mixin" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.core.mixins.web_mixin" - parent: "signalwire.core.mixins" - module: "signalwire.core.mixins" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/web_mixin.py" ---- -# `web_mixin` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module web_mixin -``` - -## Constants - - - -## Classes - - - - Mixin class containing all web server and routing-related methods for AgentBase - - - -## Source - -[`signalwire/signalwire/core/mixins/web_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/web_mixin.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/mixins/web-mixin/web-mixin/index.mdx b/fern/products/sdk-reference/python/signalwire/core/mixins/web-mixin/web-mixin/index.mdx deleted file mode 100644 index 7fcba36c55..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/mixins/web-mixin/web-mixin/index.mdx +++ /dev/null @@ -1,405 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/mixins/web-mixin/web-mixin" -title: "WebMixin" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.core.mixins.web_mixin.WebMixin" - parent: "signalwire.core.mixins.web_mixin" - module: "signalwire.core.mixins.web_mixin" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/web_mixin.py" ---- -# `WebMixin` - -Mixin class containing all web server and routing-related methods for AgentBase - -## Signature - -```python -class WebMixin -``` - -## Methods - -### as\_router - -Get a FastAPI router for this agent - -#### Signature - -```python -as_router() -> APIRouter -``` - -#### Returns - -`APIRouter` — FastAPI router - -#### Source - -[`signalwire/signalwire/core/mixins/web_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/web_mixin.py) - -Line 133. - -*** - -### enable\_debug\_routes - -Enable debug routes for testing and development - -#### Signature - -```python -enable_debug_routes() -> AgentBase -``` - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/mixins/web_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/web_mixin.py) - -Line 1244. - -*** - -### get\_app - -Get the FastAPI application instance for deployment adapters like Lambda/Mangum - -This method ensures the FastAPI app is properly initialized and configured, -then returns it for use with deployment adapters like Mangum for AWS Lambda. - -#### Signature - -```python -get_app() -``` - -#### Returns - -The configured FastAPI application instance - -#### Source - -[`signalwire/signalwire/core/mixins/web_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/web_mixin.py) - -Line 41. - -*** - -### manual\_set\_proxy\_url - -Manually set the proxy URL base for webhook callbacks - -This can be called at runtime to set or update the proxy URL - -#### Signature - -```python -manual_set_proxy_url(proxy_url: str) -> AgentBase -``` - -#### Parameters - - - The base URL to use for webhooks (e.g., https://example.ngrok.io) - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/mixins/web_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/web_mixin.py) - -Line 1191. - -*** - -### on\_request - -Called when SWML is requested, with request data when available - -This method overrides SWMLService's on\_request to properly handle SWML generation -for AI Agents. - -#### Signature - -```python -on_request( - request_data: Optional[dict] = None, - callback_path: Optional[str] = None -) -> Optional[dict] -``` - -#### Parameters - - - Optional dictionary containing the parsed POST body - - - - Optional callback path - - -#### Returns - -`Optional[dict]` — None to use the default SWML rendering (which will call \_render\_swml) - -#### Source - -[`signalwire/signalwire/core/mixins/web_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/web_mixin.py) - -Line 1079. - -*** - -### on\_swml\_request - -Customization point for subclasses to modify SWML based on request data - -#### Signature - -```python -on_swml_request( - request_data: Optional[dict] = None, - callback_path: Optional[str] = None, - request: Optional[Request] = None -) -> Optional[dict] -``` - -#### Parameters - - - Optional dictionary containing the parsed POST body - - - - Optional callback path - - - - Optional FastAPI Request object for accessing query params, headers, etc. - - -#### Returns - -`Optional[dict]` — Optional dict with modifications to apply to the SWML document - -#### Source - -[`signalwire/signalwire/core/mixins/web_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/web_mixin.py) - -Line 1100. - -*** - -### register\_routing\_callback - -Register a callback function that will be called to determine routing -based on POST data. - -When a routing callback is registered, an endpoint at the specified path is automatically -created that will handle requests. This endpoint will use the callback to -determine if the request should be processed by this service or redirected. - -The callback should take a request object and request body dictionary and return: - -- A route string if it should be routed to a different endpoint -- None if normal processing should continue - -#### Signature - -```python -register_routing_callback( - callback_fn: Callable[Request, Dict[str, Any], Optional[str]], - path: str = '/sip' -) -> None -``` - -#### Parameters - - - The callback function to register - - - - The path where this callback should be registered (default: "/sip") - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/core/mixins/web_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/web_mixin.py) - -Line 1131. - -*** - -### run - -Smart run method that automatically detects environment and handles accordingly - -#### Signature - -```python -run( - event = None, - context = None, - force_mode = None, - host: Optional[str] = None, - port: Optional[int] = None -) -``` - -#### Parameters - - - Serverless event object (Lambda, Cloud Functions) - - - - Serverless context object (Lambda, Cloud Functions) - - - - Override automatic mode detection for testing - - - - Host override for server mode - - - - Port override for server mode - - -#### Returns - -Response for serverless modes, None for server mode - -#### Source - -[`signalwire/signalwire/core/mixins/web_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/web_mixin.py) - -Line 305. - -*** - -### serve - -Start a web server for this agent - -#### Signature - -```python -serve(host: Optional[str] = None, port: Optional[int] = None) -> None -``` - -#### Parameters - - - Optional host to override the default - - - - Optional port to override the default - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/core/mixins/web_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/web_mixin.py) - -Line 153. - -*** - -### set\_dynamic\_config\_callback - -Set a callback function for dynamic agent configuration - -This callback receives the actual agent instance, allowing you to dynamically -configure ANY aspect of the agent including adding skills, modifying prompts, -changing parameters, etc. based on request data. - -> \[!NOTE] -> def my\_config(query\_params, body\_params, headers, agent): -> if query\_params.get('tier') == 'premium': -> agent.add\_skill("advanced\_search") -> agent.add\_language("English", "en-US", "premium\_voice") -> agent.set\_params(\{"end\_of\_speech\_timeout": 500\}) -> agent.set\_global\_data(\{"tier": query\_params.get('tier', 'standard')\}) -> -> my\_agent.set\_dynamic\_config\_callback(my\_config) - -#### Signature - -```python -set_dynamic_config_callback( - callback: Callable[dict, dict, dict, AgentBase, None] -) -> AgentBase -``` - -#### Parameters - - - Function that takes (query\_params, body\_params, headers, agent) and configures the agent using any available methods like: - agent.add\_skill(...) - agent.add\_language(...) - agent.prompt\_add\_section(...) - agent.set\_params(...) - agent.set\_global\_data(...) - agent.define\_tool(...) - - -#### Returns - -`AgentBase` - -#### Examples - -```python -my_agent.set_dynamic_config_callback(my_config) -``` - -#### Source - -[`signalwire/signalwire/core/mixins/web_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/web_mixin.py) - -Line 1160. - -*** - -### setup\_graceful\_shutdown - -Setup signal handlers for graceful shutdown (useful for Kubernetes) - -#### Signature - -```python -setup_graceful_shutdown() -> None -``` - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/core/mixins/web_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/web_mixin.py) - -Line 1218. - -## Source - -[`signalwire/signalwire/core/mixins/web_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/web_mixin.py) - -Line 36. diff --git a/fern/products/sdk-reference/python/signalwire/core/pom-builder/index.mdx b/fern/products/sdk-reference/python/signalwire/core/pom-builder/index.mdx deleted file mode 100644 index 010398abc9..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/pom-builder/index.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/pom-builder" -title: "pom_builder" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.core.pom_builder" - parent: "signalwire.core" - module: "signalwire.core" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/pom_builder.py" ---- -# `pom_builder` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module pom_builder -``` - -## Classes - - - - Builder class for creating structured prompts using the Prompt Object Model. - - - -## Source - -[`signalwire/signalwire/core/pom_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/pom_builder.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/pom-builder/pom-builder/index.mdx b/fern/products/sdk-reference/python/signalwire/core/pom-builder/pom-builder/index.mdx deleted file mode 100644 index a33975d3c7..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/pom-builder/pom-builder/index.mdx +++ /dev/null @@ -1,381 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/pom-builder/pom-builder" -title: "PomBuilder" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.core.pom_builder.PomBuilder" - parent: "signalwire.core.pom_builder" - module: "signalwire.core.pom_builder" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/pom_builder.py" ---- -# `PomBuilder` - -Builder class for creating structured prompts using the Prompt Object Model. - -This class is a flexible wrapper around the POM API that allows for: - -- Dynamic creation of sections on demand -- Adding content to existing sections -- Nesting subsections -- Rendering to markdown or XML - -Unlike previous implementations, there are no predefined section types - -you can create any section structure that fits your needs. - -## Signature - -```python -class PomBuilder -``` - -## Properties - - - -## Methods - -### \_\_init\_\_ - -Initialize a new POM builder with an empty POM - -#### Signature - -```python -__init__() -``` - -#### Source - -[`signalwire/signalwire/core/pom_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/pom_builder.py) - -Line 33. - -*** - -### add\_section - -Add a new section to the POM - -#### Signature - -```python -add_section( - title: str, - body: str = '', - bullets: Optional[List[str]] = None, - numbered: bool = False, - numbered_bullets: bool = False, - subsections: Optional[List[Dict[str, Any]]] = None -) -> PomBuilder -``` - -#### Parameters - - - Section title - - - - Optional body text - - - - Optional list of bullet points - - - - Whether to number this section - - - - Whether to number bullet points - - - - Optional list of subsection objects - - -#### Returns - -`PomBuilder` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/pom_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/pom_builder.py) - -Line 38. - -*** - -### add\_subsection - -Add a subsection to an existing section, creating the parent if needed - -#### Signature - -```python -add_subsection( - parent_title: str, - title: str, - body: str = '', - bullets: Optional[List[str]] = None -) -> PomBuilder -``` - -#### Parameters - - - Title of the parent section - - - - Title for the new subsection - - - - Optional body text - - - - Optional list of bullet points - - -#### Returns - -`PomBuilder` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/pom_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/pom_builder.py) - -Line 115. - -*** - -### add\_to\_section - -Add content to an existing section - -#### Signature - -```python -add_to_section( - title: str, - body: Optional[str] = None, - bullet: Optional[str] = None, - bullets: Optional[List[str]] = None -) -> PomBuilder -``` - -#### Parameters - - - Section title - - - - Text to append to the section body - - - - Single bullet to add - - - - List of bullets to add - - -#### Returns - -`PomBuilder` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/pom_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/pom_builder.py) - -Line 80. - -*** - -### from\_sections - -Create a PomBuilder from a list of section dictionaries - -**Modifiers:** `classmethod` - -#### Signature - -```python -@classmethod -from_sections(sections: List[Dict[str, Any]]) -> PomBuilder -``` - -#### Parameters - - - List of section definition dictionaries - - -#### Returns - -`PomBuilder` — A new PomBuilder instance with the sections added - -#### Source - -[`signalwire/signalwire/core/pom_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/pom_builder.py) - -Line 181. - -*** - -### get\_section - -Get a section by title - -#### Signature - -```python -get_section(title: str) -> Optional[Section] -``` - -#### Parameters - - - Section title - - -#### Returns - -`Optional[Section]` — Section object or None if not found - -#### Source - -[`signalwire/signalwire/core/pom_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/pom_builder.py) - -Line 153. - -*** - -### has\_section - -Check if a section with the given title exists - -#### Signature - -```python -has_section(title: str) -> bool -``` - -#### Parameters - - - Section title to check - - -#### Returns - -`bool` — True if the section exists, False otherwise - -#### Source - -[`signalwire/signalwire/core/pom_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/pom_builder.py) - -Line 141. - -*** - -### render\_markdown - -Render the POM as markdown - -#### Signature - -```python -render_markdown() -> str -``` - -#### Returns - -`str` - -#### Source - -[`signalwire/signalwire/core/pom_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/pom_builder.py) - -Line 165. - -*** - -### render\_xml - -Render the POM as XML - -#### Signature - -```python -render_xml() -> str -``` - -#### Returns - -`str` - -#### Source - -[`signalwire/signalwire/core/pom_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/pom_builder.py) - -Line 169. - -*** - -### to\_dict - -Convert the POM to a list of section dictionaries - -#### Signature - -```python -to_dict() -> List[Dict[str, Any]] -``` - -#### Returns - -`List[Dict[str, Any]]` - -#### Source - -[`signalwire/signalwire/core/pom_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/pom_builder.py) - -Line 173. - -*** - -### to\_json - -Convert the POM to a JSON string - -#### Signature - -```python -to_json() -> str -``` - -#### Returns - -`str` - -#### Source - -[`signalwire/signalwire/core/pom_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/pom_builder.py) - -Line 177. - -## Source - -[`signalwire/signalwire/core/pom_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/pom_builder.py) - -Line 19. diff --git a/fern/products/sdk-reference/python/signalwire/core/security-config/index.mdx b/fern/products/sdk-reference/python/signalwire/core/security-config/index.mdx deleted file mode 100644 index ae500e88d1..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/security-config/index.mdx +++ /dev/null @@ -1,46 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/security-config" -title: "security_config" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.core.security_config" - parent: "signalwire.core" - module: "signalwire.core" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security_config.py" ---- -# `security_config` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module security_config -``` - -## Properties - - - - - -## Classes - - - - Unified security configuration for SignalWire services. - - - -## Source - -[`signalwire/signalwire/core/security_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security_config.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/security-config/security-config/index.mdx b/fern/products/sdk-reference/python/signalwire/core/security-config/security-config/index.mdx deleted file mode 100644 index c81b9b16f6..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/security-config/security-config/index.mdx +++ /dev/null @@ -1,310 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/security-config/security-config" -title: "SecurityConfig" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.core.security_config.SecurityConfig" - parent: "signalwire.core.security_config" - module: "signalwire.core.security_config" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security_config.py" ---- -# `SecurityConfig` - -Unified security configuration for SignalWire services. - -This class provides centralized security settings that can be used by -both SWML and Search services, ensuring consistent security behavior. - -## Signature - -```python -class SecurityConfig -``` - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -## Methods - -### \_\_init\_\_ - -Initialize security configuration. - -#### Signature - -```python -__init__(config_file: Optional[str] = None, service_name: Optional[str] = None) -``` - -#### Parameters - - - Optional path to config file - - - - Optional service name for finding service-specific config - - -#### Source - -[`signalwire/signalwire/core/security_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security_config.py) - -Line 60. - -*** - -### get\_basic\_auth - -Get basic auth credentials, generating if not set. - -If no basic auth password is configured (e.g. SWML\_BASIC\_AUTH\_PASSWORD -env var is unset and the SDK caller didn't pass one explicitly), the -SDK falls back to a random password generated via secrets.token\_urlsafe. -That password lives only in memory and is regenerated on every process -start, so any external caller (tests, RPC clients, MCP) that doesn't -share the auto-generated value will get HTTP 401. - -We log a warning the first time the auto-generated fallback fires so -the failure mode is visible in logs instead of silently breaking -external callers. Set SWML\_BASIC\_AUTH\_USER / SWML\_BASIC\_AUTH\_PASSWORD -(or load .env before constructing the agent) to suppress the warning. - -#### Signature - -```python -get_basic_auth() -> Tuple[str, str] -``` - -#### Returns - -`Tuple[str, str]` — Tuple of (username, password) - -#### Source - -[`signalwire/signalwire/core/security_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security_config.py) - -Line 247. - -*** - -### get\_cors\_config - -Get CORS configuration for FastAPI. - -#### Signature - -```python -get_cors_config() -> Dict[str, Any] -``` - -#### Returns - -`Dict[str, Any]` — Dictionary of CORS settings - -#### Source - -[`signalwire/signalwire/core/security_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security_config.py) - -Line 328. - -*** - -### get\_security\_headers - -Get security headers to add to responses. - -#### Signature - -```python -get_security_headers(is_https: bool = False) -> Dict[str, str] -``` - -#### Parameters - - - Whether the connection is over HTTPS - - -#### Returns - -`Dict[str, str]` — Dictionary of security headers - -#### Source - -[`signalwire/signalwire/core/security_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security_config.py) - -Line 290. - -*** - -### get\_ssl\_context\_kwargs - -Get SSL context kwargs for uvicorn. - -#### Signature - -```python -get_ssl_context_kwargs() -> Dict[str, Any] -``` - -#### Returns - -`Dict[str, Any]` — Dictionary of SSL parameters for uvicorn - -#### Source - -[`signalwire/signalwire/core/security_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security_config.py) - -Line 226. - -*** - -### get\_url\_scheme - -Get the URL scheme based on SSL configuration - -#### Signature - -```python -get_url_scheme() -> str -``` - -#### Returns - -`str` - -#### Source - -[`signalwire/signalwire/core/security_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security_config.py) - -Line 342. - -*** - -### load\_from\_env - -Load configuration from environment variables - -#### Signature - -```python -load_from_env() -``` - -#### Source - -[`signalwire/signalwire/core/security_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security_config.py) - -Line 168. - -*** - -### log\_config - -Log the current security configuration - -#### Signature - -```python -log_config(service_name: str) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/core/security_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security_config.py) - -Line 346. - -*** - -### should\_allow\_host - -Check if a host is allowed. - -#### Signature - -```python -should_allow_host(host: str) -> bool -``` - -#### Parameters - - - The host to check - - -#### Returns - -`bool` — True if the host is allowed - -#### Source - -[`signalwire/signalwire/core/security_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security_config.py) - -Line 313. - -*** - -### validate\_ssl\_config - -Validate SSL configuration. - -#### Signature - -```python -validate_ssl_config() -> Tuple[bool, Optional[str]] -``` - -#### Returns - -`Tuple[bool, Optional[str]]` — Tuple of (is\_valid, error\_message) - -#### Source - -[`signalwire/signalwire/core/security_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security_config.py) - -Line 202. - -## Source - -[`signalwire/signalwire/core/security_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security_config.py) - -Line 19. diff --git a/fern/products/sdk-reference/python/signalwire/core/security/index.mdx b/fern/products/sdk-reference/python/signalwire/core/security/index.mdx deleted file mode 100644 index b43879a0ec..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/security/index.mdx +++ /dev/null @@ -1,52 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/security" -title: "security" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.core.security" - parent: "signalwire.core" - module: "signalwire.core" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/__init__.py" ---- -# `security` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module security -``` - -## Properties - - - -## Modules - - - - Copyright (c) 2025 SignalWire - - - - FastAPI middleware / dependency for SignalWire webhook signature validation. - - - - Webhook signature validation for SignalWire-signed HTTP requests. - - - -## Source - -[`signalwire/signalwire/core/security/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/security/session-manager/index.mdx b/fern/products/sdk-reference/python/signalwire/core/security/session-manager/index.mdx deleted file mode 100644 index a06f36646b..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/security/session-manager/index.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/security/session-manager" -title: "session_manager" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.core.security.session_manager" - parent: "signalwire.core.security" - module: "signalwire.core.security" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/session_manager.py" ---- -# `session_manager` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module session_manager -``` - -## Classes - - - - Manages security tokens for function calls - - - -## Source - -[`signalwire/signalwire/core/security/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/session_manager.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/security/session-manager/session-manager/index.mdx b/fern/products/sdk-reference/python/signalwire/core/security/session-manager/session-manager/index.mdx deleted file mode 100644 index a01dde36fc..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/security/session-manager/session-manager/index.mdx +++ /dev/null @@ -1,370 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/security/session-manager/session-manager" -title: "SessionManager" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.core.security.session_manager.SessionManager" - parent: "signalwire.core.security.session_manager" - module: "signalwire.core.security.session_manager" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/session_manager.py" ---- -# `SessionManager` - -Manages security tokens for function calls - -This implementation is completely stateless - it does not track call sessions -or store any information in memory. All validation is done using cryptographic -signatures with the tokens containing all necessary information. - -## Signature - -```python -class SessionManager -``` - -## Properties - - - - - -## Methods - -### \_\_init\_\_ - -Initialize the session manager - -#### Signature - -```python -__init__(token_expiry_secs: int = 900, secret_key: Optional[str] = None) -``` - -#### Parameters - - - Seconds until tokens expire (default: 15 minutes) - - - - Secret key for signing tokens (generated if not provided) - - -#### Source - -[`signalwire/signalwire/core/security/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/session_manager.py) - -Line 31. - -*** - -### activate\_session - -Legacy method, does nothing but returns success - -#### Signature - -```python -activate_session(call_id: str) -> bool -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`signalwire/signalwire/core/security/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/session_manager.py) - -Line 184. - -*** - -### create\_session - -Create a new session ID if one isn't provided - -#### Signature - -```python -create_session(call_id: Optional[str] = None) -> str -``` - -#### Parameters - - - Optional call ID, generated if not provided - - -#### Returns - -`str` — The call\_id for the session - -#### Source - -[`signalwire/signalwire/core/security/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/session_manager.py) - -Line 44. - -*** - -### create\_tool\_token - -Alias for generate\_token to maintain backward compatibility - -#### Signature - -```python -create_tool_token(function_name: str, call_id: str) -> str -``` - -#### Parameters - - - Name of the function to generate a token for - - - - Call session ID - - -#### Returns - -`str` — A secure token - -#### Source - -[`signalwire/signalwire/core/security/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/session_manager.py) - -Line 92. - -*** - -### debug\_token - -Debug a token without validating it - -This method decodes the token and extracts its components for debugging purposes -without performing validation. Requires \_debug\_mode to be True. - -#### Signature - -```python -debug_token(token: str) -> Dict[str, Any] -``` - -#### Parameters - - - The token to debug - - -#### Returns - -`Dict[str, Any]` — Dictionary with token components and analysis - -#### Source - -[`signalwire/signalwire/core/security/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/session_manager.py) - -Line 208. - -*** - -### end\_session - -Legacy method, does nothing but returns success - -#### Signature - -```python -end_session(call_id: str) -> bool -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`signalwire/signalwire/core/security/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/session_manager.py) - -Line 190. - -*** - -### generate\_token - -Generate a secure self-contained token for a function call - -#### Signature - -```python -generate_token(function_name: str, call_id: str) -> str -``` - -#### Parameters - - - Name of the function to generate a token for - - - - Call session ID - - -#### Returns - -`str` — A secure token - -#### Source - -[`signalwire/signalwire/core/security/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/session_manager.py) - -Line 60. - -*** - -### get\_session\_metadata - -Legacy method, always returns empty metadata - -#### Signature - -```python -get_session_metadata(call_id: str) -> Optional[Dict[str, Any]] -``` - -#### Parameters - - - -#### Returns - -`Optional[Dict[str, Any]]` - -#### Source - -[`signalwire/signalwire/core/security/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/session_manager.py) - -Line 196. - -*** - -### set\_session\_metadata - -Legacy method, does nothing but returns success - -#### Signature - -```python -set_session_metadata(call_id: str, key: str, value: Any) -> bool -``` - -#### Parameters - - - - - - - -#### Returns - -`bool` - -#### Source - -[`signalwire/signalwire/core/security/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/session_manager.py) - -Line 202. - -*** - -### validate\_token - -Validate a function call token - -#### Signature - -```python -validate_token(call_id: str, function_name: str, token: str) -> bool -``` - -#### Parameters - - - Call session ID - - - - Name of the function being called - - - - Token to validate - - -#### Returns - -`bool` — True if valid, False otherwise - -#### Source - -[`signalwire/signalwire/core/security/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/session_manager.py) - -Line 105. - -*** - -### validate\_tool\_token - -Alias for validate\_token to maintain backward compatibility - -#### Signature - -```python -validate_tool_token(function_name: str, token: str, call_id: str) -> bool -``` - -#### Parameters - - - Name of the function being called - - - - Token to validate - - - - Call session ID - - -#### Returns - -`bool` — True if valid, False otherwise - -#### Source - -[`signalwire/signalwire/core/security/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/session_manager.py) - -Line 167. - -## Source - -[`signalwire/signalwire/core/security/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/session_manager.py) - -Line 23. diff --git a/fern/products/sdk-reference/python/signalwire/core/security/webhook-middleware/index.mdx b/fern/products/sdk-reference/python/signalwire/core/security/webhook-middleware/index.mdx deleted file mode 100644 index 91c19e3a37..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/security/webhook-middleware/index.mdx +++ /dev/null @@ -1,140 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/security/webhook-middleware" -title: "webhook_middleware" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.core.security.webhook_middleware" - parent: "signalwire.core.security" - module: "signalwire.core.security" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/webhook_middleware.py" ---- -# `webhook_middleware` - -FastAPI middleware / dependency for SignalWire webhook signature validation. - -Copyright (c) 2025 SignalWire. Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -This module ships a small, framework-aware adapter around -:func:`signalwire.core.security.webhook_validator.validate_webhook_signature`. - -Why a custom dependency rather than a vanilla `Depends` on `request.body()`? - -- We MUST capture the raw bytes BEFORE FastAPI's JSON parser consumes the - stream — re-serialization changes whitespace and key order, which breaks - the Scheme A digest. The dependency stashes the raw body on - `request.state.raw_body` so the downstream handler can re-parse without - re-reading the stream. -- Reverse-proxy / ngrok deployments need the URL the platform POSTed to, - which differs from the URL the SDK sees. The dependency honors - `X-Forwarded-Proto` / `X-Forwarded-Host` when `trust_proxy=True`, - plus the `SWML_PROXY_URL_BASE` env var, with `request.url` as last - resort. -- The legacy cXML/Compatibility scheme used the `X-Twilio-Signature` - header. We accept it as an alias of `X-SignalWire-Signature` so users - migrating from the legacy SDK can keep their callers unchanged. - -Usage:: - -``` -from signalwire.core.security.webhook_middleware import ( - make_webhook_validation_dependency, -) - -dep = make_webhook_validation_dependency(signing_key="PSK...") - -@app.post("/webhook", dependencies=[Depends(dep)]) -async def webhook(request: Request): - body = request.state.raw_body # bytes; re-parse if you need JSON -``` - -## Signature - -```python -module webhook_middleware -``` - -## Examples - -```python -from signalwire.core.security.webhook_middleware import ( - make_webhook_validation_dependency, -) - -dep = make_webhook_validation_dependency(signing_key="PSK...") - -@app.post("/webhook", dependencies=[Depends(dep)]) -async def webhook(request: Request): - body = request.state.raw_body # bytes; re-parse if you need JSON -``` - -## Properties - - - -## Constants - - - - - -## Functions - -### make\_webhook\_validation\_dependency - -Build a FastAPI dependency that enforces signature validation. - -The returned coroutine: - -1. Reads `await request.body()` and stashes the bytes on - `request.state.raw_body`. -2. Pulls the `X-SignalWire-Signature` header (or the Twilio alias). -3. Reconstructs the public URL (proxy headers / env / fallback). -4. Calls :func:`validate_webhook_signature`. -5. On invalid signature: raises `HTTPException(403)` to short-circuit - the handler. FastAPI's `dependencies=[Depends(...)]` only honors - short-circuiting via raised exceptions — returning a Response from a - dependency does not stop the endpoint. -6. On valid: returns `None` so the handler runs as normal. - -#### Signature - -```python -make_webhook_validation_dependency( - signing_key: str, - *, - trust_proxy: bool = False -) -> Callable[Request, Response, Awaitable[Optional[Response]]] -``` - -#### Parameters - - - The customer's Signing Key. Required, non-empty. - - - - If True, honor `X-Forwarded-Proto` / `X-Forwarded-Host` when reconstructing the URL. Default False — proxy headers are spoofable, so opt in only when you control the proxy. - - -#### Returns - -`Callable[Request, Response, Awaitable[Optional[Response]]]` — Async callable suitable for `Depends(...)`. - -#### Throws - -- `ValueError` — at construction time if `signing_key` is empty. - -#### Source - -[`signalwire/signalwire/core/security/webhook_middleware.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/webhook_middleware.py) - -Line 88. - -## Source - -[`signalwire/signalwire/core/security/webhook_middleware.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/webhook_middleware.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/security/webhook-validator/index.mdx b/fern/products/sdk-reference/python/signalwire/core/security/webhook-validator/index.mdx deleted file mode 100644 index bcc98787f1..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/security/webhook-validator/index.mdx +++ /dev/null @@ -1,154 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/security/webhook-validator" -title: "webhook_validator" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.core.security.webhook_validator" - parent: "signalwire.core.security" - module: "signalwire.core.security" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/webhook_validator.py" ---- -# `webhook_validator` - -Webhook signature validation for SignalWire-signed HTTP requests. - -Copyright (c) 2025 SignalWire. Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -Implements both schemes from porting-sdk/webhooks.md: - -- Scheme A (RELAY/SWML/JSON): hex(HMAC-SHA1(key, url + raw\_body)) -- Scheme B (Compat/cXML form): base64(HMAC-SHA1(key, url + sortedFormParams)) - with optional bodySHA256 query-param fallback for JSON-on-compat-surface. - -> \[!NOTE] -> validate\_webhook\_signature(signing\_key, signature, url, raw\_body) -> bool -> validate\_request(signing\_key, signature, url, params\_or\_raw\_body) -> bool - -All comparisons use `hmac.compare_digest` (constant-time) so the secret -is not leaked over repeated requests. - -## Signature - -```python -module webhook_validator -``` - -## Properties - - - -## Functions - -### validate\_request - -Legacy `@signalwire/compatibility-api` drop-in entry point. - -If `params_or_raw_body` is a string, delegates to -:func:`validate_webhook_signature` (Scheme A then Scheme B with parsed form). - -If it's a mapping or a list of (key, value) tuples, treats it as -pre-parsed form params and runs Scheme B directly (with URL port -normalization and optional bodySHA256 fallback). - -#### Signature - -```python -validate_request( - signing_key: str, - signature: str, - url: str, - params_or_raw_body: Union[str, Mapping[str, Any], List[Tuple[str, Any]], None] -) -> bool -``` - -#### Parameters - - - Customer's Signing Key. Missing raises `ValueError`. - - - - Header value. Missing / empty returns False. - - - - Full URL SignalWire POSTed to. - - - - `str` raw body OR pre-parsed form params. - - -#### Returns - -`bool` — True on match, False otherwise. - -#### Throws - -- `ValueError` — when `signing_key` is missing. -- `TypeError` — when `params_or_raw_body` is neither a string nor a mapping/list (e.g. a parsed JSON dict-like that's been rejected). - -#### Source - -[`signalwire/signalwire/core/security/webhook_validator.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/webhook_validator.py) - -Line 268. - -*** - -### validate\_webhook\_signature - -Validate a SignalWire webhook signature against both schemes. - -#### Signature - -```python -validate_webhook_signature( - signing_key: str, - signature: str, - url: str, - raw_body: str -) -> bool -``` - -#### Parameters - - - Customer's Signing Key from the Dashboard. UTF-8 string, secret. `None` / empty raises `ValueError` — that's a programming error, not a validation failure. - - - - The `X-SignalWire-Signature` header value (or `X-Twilio-Signature` for cXML compat). Missing / empty returns False without raising. - - - - The full URL SignalWire POSTed to (scheme, host, optional port, path, query). Must match what the platform saw — see the `URL reconstruction` section of porting-sdk/webhooks.md. - - - - The raw request body bytes as a UTF-8 string, BEFORE any JSON / form parsing. Must be a `str` — passing a parsed dict raises `TypeError`. - - -#### Returns - -`bool` — True if the signature matches either Scheme A (hex JSON) or Scheme B (base64 form, with port-normalization variants and optional bodySHA256 fallback). False otherwise. - -#### Throws - -- `ValueError` — when `signing_key` is missing. -- `TypeError` — when `raw_body` is not a string. - -#### Source - -[`signalwire/signalwire/core/security/webhook_validator.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/webhook_validator.py) - -Line 198. - -## Source - -[`signalwire/signalwire/core/security/webhook_validator.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/webhook_validator.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/skill-base/index.mdx b/fern/products/sdk-reference/python/signalwire/core/skill-base/index.mdx deleted file mode 100644 index 21232b5e6f..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/skill-base/index.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/skill-base" -title: "skill_base" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.core.skill_base" - parent: "signalwire.core" - module: "signalwire.core" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py" ---- -# `skill_base` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module skill_base -``` - -## Classes - - - - Abstract base class for all agent skills - - - -## Source - -[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/skill-base/skill-base/index.mdx b/fern/products/sdk-reference/python/signalwire/core/skill-base/skill-base/index.mdx deleted file mode 100644 index 6c58149de2..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/skill-base/skill-base/index.mdx +++ /dev/null @@ -1,436 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/skill-base/skill-base" -title: "SkillBase" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.core.skill_base.SkillBase" - parent: "signalwire.core.skill_base" - module: "signalwire.core.skill_base" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py" ---- -# `SkillBase` - -Abstract base class for all agent skills - -## Signature - -```python -class SkillBase(ABC) -``` - -## Inheritance - -**Extends:** `ABC` - -## Properties - - - - - - - - - - - - - - - - - - - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(agent: AgentBase, params: Optional[Dict[str, Any]] = None) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) - -Line 32. - -*** - -### cleanup - -Cleanup when skill is removed or agent shuts down - -#### Signature - -```python -cleanup() -> None -``` - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) - -Line 99. - -*** - -### define\_tool - -Wrapper method that automatically includes swaig\_fields when defining tools. - -This method delegates to self.agent.define\_tool() but automatically merges -any swaig\_fields configured for this skill. Skills should use this method -instead of calling self.agent.define\_tool() directly. - -#### Signature - -```python -define_tool(**kwargs = {}) -> None -``` - -#### Parameters - - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) - -Line 58. - -*** - -### get\_global\_data - -Return data to add to agent's global context - -#### Signature - -```python -get_global_data() -> Dict[str, Any] -``` - -#### Returns - -`Dict[str, Any]` - -#### Source - -[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) - -Line 84. - -*** - -### get\_hints - -Return speech recognition hints for this skill - -#### Signature - -```python -get_hints() -> List[str] -``` - -#### Returns - -`List[str]` - -#### Source - -[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) - -Line 80. - -*** - -### get\_instance\_key - -Get the key used to track this skill instance - -For skills that support multiple instances (SUPPORTS\_MULTIPLE\_INSTANCES = True), -this method can be overridden to provide a unique key for each instance. - -Default implementation: - -- If SUPPORTS\_MULTIPLE\_INSTANCES is False: returns SKILL\_NAME -- If SUPPORTS\_MULTIPLE\_INSTANCES is True: returns SKILL\_NAME + "\_" + tool\_name - (where tool\_name comes from params\['tool\_name'] or defaults to the skill name) - -#### Signature - -```python -get_instance_key() -> str -``` - -#### Returns - -`str` — Unique key for this skill instance - -#### Source - -[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) - -Line 126. - -*** - -### get\_parameter\_schema - -Get the parameter schema for this skill - -This method returns metadata about all parameters the skill accepts, -including their types, descriptions, default values, and whether they -are required or should be hidden (e.g., API keys). - -The base implementation provides common parameters available to all skills. -Subclasses should override this method and merge their specific parameters -with the base schema. - -> \[!NOTE] -> \{ -> "tool\_name": \{ -> "type": "string", -> "description": "Name for the tool when using multiple instances", -> "default": "my\_skill", -> "required": False -> \}, -> "api\_key": \{ -> "type": "string", -> "description": "API key for the service", -> "required": True, -> "hidden": True, -> "env\_var": "MY\_API\_KEY" -> \} -> \} - -**Modifiers:** `classmethod` - -#### Signature - -```python -@classmethod -get_parameter_schema() -> Dict[str, Dict[str, Any]] -``` - -#### Returns - -`Dict[str, Dict[str, Any]]` — Dict\[str, Dict\[str, Any]]: Parameter schema where keys are parameter names and values are dictionaries containing: - -#### Source - -[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) - -Line 197. - -*** - -### get\_prompt\_sections - -Return prompt sections to add to agent. -Returns empty list if skip\_prompt is set to True in params. - -#### Signature - -```python -get_prompt_sections() -> List[Dict[str, Any]] -``` - -#### Returns - -`List[Dict[str, Any]]` - -#### Source - -[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) - -Line 88. - -*** - -### get\_skill\_data - -Read this skill instance's namespaced data from raw\_data global\_data. - -#### Signature - -```python -get_skill_data(raw_data: Dict[str, Any]) -> Dict[str, Any] -``` - -#### Parameters - - - The raw\_data dict passed to SWAIG function handlers, expected to contain a 'global\_data' key. - - -#### Returns - -`Dict[str, Any]` — The skill's namespaced state, or empty dict if not found. - -#### Source - -[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) - -Line 164. - -*** - -### register\_tools - -Register SWAIG tools with the agent - -**Modifiers:** `abstract` - -#### Signature - -```python -register_tools() -> None -``` - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) - -Line 53. - -*** - -### setup - -Setup the skill (validate env vars, initialize APIs, etc.) -Returns True if setup successful, False otherwise - -**Modifiers:** `abstract` - -#### Signature - -```python -setup() -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) - -Line 45. - -*** - -### update\_skill\_data - -Write this skill instance's namespaced data into a FunctionResult. - -Wraps the data under the skill's namespace key and calls -result.update\_global\_data(). - -#### Signature - -```python -update_skill_data( - result: FunctionResult, - data: Dict[str, Any] -) -> FunctionResult -``` - -#### Parameters - - - The FunctionResult to add the global\_data update to. - - - - The skill state dict to store under the namespace. - - -#### Returns - -`FunctionResult` — The result, for method chaining. - -#### Source - -[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) - -Line 179. - -*** - -### validate\_env\_vars - -Check if all required environment variables are set - -#### Signature - -```python -validate_env_vars() -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) - -Line 103. - -*** - -### validate\_packages - -Check if all required packages are available - -#### Signature - -```python -validate_packages() -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) - -Line 112. - -## Source - -[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) - -Line 19. diff --git a/fern/products/sdk-reference/python/signalwire/core/skill-manager/index.mdx b/fern/products/sdk-reference/python/signalwire/core/skill-manager/index.mdx deleted file mode 100644 index 71e79dea7a..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/skill-manager/index.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/skill-manager" -title: "skill_manager" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.core.skill_manager" - parent: "signalwire.core" - module: "signalwire.core" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_manager.py" ---- -# `skill_manager` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module skill_manager -``` - -## Classes - - - - Manages loading and lifecycle of agent skills - - - -## Source - -[`signalwire/signalwire/core/skill_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_manager.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/skill-manager/skill-manager/index.mdx b/fern/products/sdk-reference/python/signalwire/core/skill-manager/skill-manager/index.mdx deleted file mode 100644 index a6f2f12ce7..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/skill-manager/skill-manager/index.mdx +++ /dev/null @@ -1,203 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/skill-manager/skill-manager" -title: "SkillManager" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.core.skill_manager.SkillManager" - parent: "signalwire.core.skill_manager" - module: "signalwire.core.skill_manager" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_manager.py" ---- -# `SkillManager` - -Manages loading and lifecycle of agent skills - -## Signature - -```python -class SkillManager -``` - -## Properties - - - - - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(agent) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/core/skill_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_manager.py) - -Line 17. - -*** - -### get\_skill - -Get a loaded skill instance by identifier - -#### Signature - -```python -get_skill(skill_identifier: str) -> Optional[SkillBase] -``` - -#### Parameters - - - Either a skill name or an instance key - - -#### Returns - -`Optional[SkillBase]` — The skill instance if found, None otherwise - -#### Source - -[`signalwire/signalwire/core/skill_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_manager.py) - -Line 228. - -*** - -### has\_skill - -Check if skill is currently loaded - -#### Signature - -```python -has_skill(skill_identifier: str) -> bool -``` - -#### Parameters - - - Either a skill name or an instance key - - -#### Returns - -`bool` — True if loaded, False otherwise - -#### Source - -[`signalwire/signalwire/core/skill_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_manager.py) - -Line 212. - -*** - -### list\_loaded\_skills - -List instance keys of currently loaded skills - -#### Signature - -```python -list_loaded_skills() -> List[str] -``` - -#### Returns - -`List[str]` - -#### Source - -[`signalwire/signalwire/core/skill_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_manager.py) - -Line 208. - -*** - -### load\_skill - -Load and setup a skill by name - -#### Signature - -```python -load_skill( - skill_name: str, - skill_class: Type[SkillBase] = None, - params: Optional[Dict[str, Any]] = None -) -> tuple[bool, str] -``` - -#### Parameters - - - Name of the skill to load - - - - Optional skill class (if not provided, will try to find it) - - - - Optional parameters to pass to the skill - - -#### Returns - -`tuple[bool, str]` — (success, error\_message) - error\_message is empty string if successful - -#### Source - -[`signalwire/signalwire/core/skill_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_manager.py) - -Line 22. - -*** - -### unload\_skill - -Unload a skill and cleanup - -#### Signature - -```python -unload_skill(skill_identifier: str) -> bool -``` - -#### Parameters - - - Either a skill name or an instance key - - -#### Returns - -`bool` — True if successfully unloaded, False otherwise - -#### Source - -[`signalwire/signalwire/core/skill_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_manager.py) - -Line 176. - -## Source - -[`signalwire/signalwire/core/skill_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_manager.py) - -Line 14. diff --git a/fern/products/sdk-reference/python/signalwire/core/swaig-function/index.mdx b/fern/products/sdk-reference/python/signalwire/core/swaig-function/index.mdx deleted file mode 100644 index 87a16ca4e1..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/swaig-function/index.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/swaig-function" -title: "swaig_function" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.core.swaig_function" - parent: "signalwire.core" - module: "signalwire.core" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swaig_function.py" ---- -# `swaig_function` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module swaig_function -``` - -## Classes - - - - Represents a SWAIG function — i.e., a tool the AI model can call. - - - -## Source - -[`signalwire/signalwire/core/swaig_function.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swaig_function.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/swaig-function/swaig-function/index.mdx b/fern/products/sdk-reference/python/signalwire/core/swaig-function/swaig-function/index.mdx deleted file mode 100644 index dd12c1ca4e..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/swaig-function/swaig-function/index.mdx +++ /dev/null @@ -1,302 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/swaig-function/swaig-function" -title: "SWAIGFunction" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.core.swaig_function.SWAIGFunction" - parent: "signalwire.core.swaig_function" - module: "signalwire.core.swaig_function" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swaig_function.py" ---- -# `SWAIGFunction` - -Represents a SWAIG function — i.e., a tool the AI model can call. - -A SWAIG function is exactly the same concept as a "tool" in native -OpenAI / Anthropic tool calling. Each SWAIGFunction is rendered into -the OpenAI tool schema format and sent to the model on every turn: - -``` -{"type": "function", "function": { - "name": self.name, - "description": self.description, - "parameters": self.parameters, -}} -``` - -The model parses `description` (and the `description` inside each -parameter) to decide WHEN to call the tool and HOW to fill in the -arguments. Both fields are prompt-engineered text — the quality of -your descriptions directly drives tool-selection accuracy. - -Use AgentBase.define\_tool() to create one (it builds the -SWAIGFunction for you and registers it). Use the @agent.tool() -decorator for the same thing in class-based agents. - -## Signature - -```python -class SWAIGFunction -``` - -## Examples - -```python -{"type": "function", "function": { - "name": self.name, - "description": self.description, - "parameters": self.parameters, -}} -``` - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - -## Methods - -### \_\_call\_\_ - -Call the underlying handler function - -#### Signature - -```python -__call__(*args = (), **kwargs = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/core/swaig_function.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swaig_function.py) - -Line 133. - -*** - -### \_\_init\_\_ - -Initialize a new SWAIG function. - -#### Signature - -```python -__init__( - name: str, - handler: Callable, - description: str, - parameters: Dict[str, Dict] = None, - secure: bool = False, - fillers: Optional[Dict[str, List[str]]] = None, - wait_file: Optional[str] = None, - wait_file_loops: Optional[int] = None, - webhook_url: Optional[str] = None, - required: Optional[List[str]] = None, - is_typed_handler: bool = False, - **extra_swaig_fields = {} -) -``` - -#### Parameters - - - Function name. Becomes the `name` field in the OpenAI tool schema sent to the model — what the model emits when it decides to call this tool. - - - - Python callable invoked when the model calls this tool. - - - - LLM-facing description. The model reads this on every turn to decide whether to call the tool. Be specific about WHEN to use it and what makes it the right choice over sibling tools — vague descriptions are the most common cause of "model has the right tool but doesn't call it" failures. - - - - JSON Schema for the arguments. Per-property `description` strings inside the schema are also LLM-facing — write them as instructions to the model on how to fill in each argument. - - - - Whether this function requires SWAIG token validation. - - - - Optional dictionary of filler phrases by language code (deprecated, use wait\_file). - - - - Optional URL to audio file to play while function executes. - - - - Optional number of times to loop the wait\_file. - - - - Optional external webhook URL to use instead of local handling. - - - - Optional list of required parameter names. - - - - Whether the handler uses type-hinted parameters (auto-wrapped). - - - - -#### Source - -[`signalwire/signalwire/core/swaig_function.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swaig_function.py) - -Line 44. - -*** - -### execute - -Execute the function with the given arguments - -#### Signature - -```python -execute( - args: Dict[str, Any], - raw_data: Optional[Dict[str, Any]] = None -) -> Dict[str, Any] -``` - -#### Parameters - - - Parsed arguments for the function - - - - Optional raw request data - - -#### Returns - -`Dict[str, Any]` — Function result as a dictionary (from FunctionResult.to\_dict()) - -#### Source - -[`signalwire/signalwire/core/swaig_function.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swaig_function.py) - -Line 139. - -*** - -### to\_swaig - -Convert this function to a SWAIG-compatible JSON object for SWML - -#### Signature - -```python -to_swaig( - base_url: str, - token: Optional[str] = None, - call_id: Optional[str] = None, - include_auth: bool = True -) -> Dict[str, Any] -``` - -#### Parameters - - - Base URL for the webhook - - - - Optional auth token to include - - - - Optional call ID for session tracking - - - - Whether to include auth credentials in URL - - -#### Returns - -`Dict[str, Any]` — Dictionary representation for the SWAIG array in SWML - -#### Source - -[`signalwire/signalwire/core/swaig_function.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swaig_function.py) - -Line 234. - -*** - -### validate\_args - -Validate the arguments against the parameter schema. - -Uses jsonschema\_rs if available for fast validation, falls back to -jsonschema if available, otherwise skips validation. - -#### Signature - -```python -validate_args(args: Dict[str, Any]) -> tuple -``` - -#### Parameters - - - Arguments to validate - - -#### Returns - -`tuple` — Tuple of (is\_valid: bool, errors: list\[str]) If no validation library is available, returns (True, \[]) - -#### Source - -[`signalwire/signalwire/core/swaig_function.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swaig_function.py) - -Line 180. - -## Source - -[`signalwire/signalwire/core/swaig_function.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swaig_function.py) - -Line 21. diff --git a/fern/products/sdk-reference/python/signalwire/core/swml-builder/index.mdx b/fern/products/sdk-reference/python/signalwire/core/swml-builder/index.mdx deleted file mode 100644 index d395efd66e..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/swml-builder/index.mdx +++ /dev/null @@ -1,44 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/swml-builder" -title: "swml_builder" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.core.swml_builder" - parent: "signalwire.core" - module: "signalwire.core" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_builder.py" ---- -# `swml_builder` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module swml_builder -``` - -## Constants - - - -## Classes - - - - Fluent builder for SWML documents - - - -## Source - -[`signalwire/signalwire/core/swml_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_builder.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/swml-builder/swml-builder/index.mdx b/fern/products/sdk-reference/python/signalwire/core/swml-builder/swml-builder/index.mdx deleted file mode 100644 index 47ccf1f187..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/swml-builder/swml-builder/index.mdx +++ /dev/null @@ -1,414 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/swml-builder/swml-builder" -title: "SWMLBuilder" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.core.swml_builder.SWMLBuilder" - parent: "signalwire.core.swml_builder" - module: "signalwire.core.swml_builder" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_builder.py" ---- -# `SWMLBuilder` - -Fluent builder for SWML documents - -This class provides a fluent interface for building SWML documents -by chaining method calls. It delegates to an underlying SWMLService -instance for the actual document creation. - -## Signature - -```python -class SWMLBuilder -``` - -## Properties - - - -## Methods - -### \_\_getattr\_\_ - -Dynamically generate and return SWML verb methods when accessed - -This method is called when an attribute lookup fails through the normal -mechanisms. It checks if the attribute name corresponds to a SWML verb -defined in the schema, and if so, dynamically creates a method for that verb. - -#### Signature - -```python -__getattr__(name: str) -> Any -``` - -#### Parameters - - - The name of the attribute being accessed - - -#### Returns - -`Any` — The dynamically created verb method if name is a valid SWML verb, otherwise raises AttributeError - -#### Throws - -- `AttributeError` — If name is not a valid SWML verb - -#### Source - -[`signalwire/signalwire/core/swml_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_builder.py) - -Line 326. - -*** - -### \_\_init\_\_ - -Initialize with a SWMLService instance - -#### Signature - -```python -__init__(service: SWMLService) -``` - -#### Parameters - - - The SWMLService to delegate to - - -#### Source - -[`signalwire/signalwire/core/swml_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_builder.py) - -Line 39. - -*** - -### add\_section - -Add a new section to the document - -#### Signature - -```python -add_section(section_name: str) -> Self -``` - -#### Parameters - - - Name of the section to add - - -#### Returns - -`Self` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/swml_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_builder.py) - -Line 206. - -*** - -### ai - -Add an 'ai' verb to the main section - -#### Signature - -```python -ai( - prompt_text: Optional[str] = None, - prompt_pom: Optional[List[Dict[str, Any]]] = None, - post_prompt: Optional[str] = None, - post_prompt_url: Optional[str] = None, - swaig: Optional[Dict[str, Any]] = None, - **kwargs = {} -) -> Self -``` - -#### Parameters - - - Text prompt for the AI (mutually exclusive with prompt\_pom) - - - - POM structure for the AI prompt (mutually exclusive with prompt\_text) - - - - Optional post-prompt text - - - - Optional URL for post-prompt processing - - - - Optional SWAIG configuration - - - - -#### Returns - -`Self` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/swml_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_builder.py) - -Line 89. - -*** - -### answer - -Add an 'answer' verb to the main section - -#### Signature - -```python -answer(max_duration: Optional[int] = None, codecs: Optional[str] = None) -> Self -``` - -#### Parameters - - - Maximum duration in seconds - - - - Comma-separated list of codecs - - -#### Returns - -`Self` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/swml_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_builder.py) - -Line 54. - -*** - -### build - -Build and return the SWML document - -#### Signature - -```python -build() -> Dict[str, Any] -``` - -#### Returns - -`Dict[str, Any]` — The complete SWML document as a dictionary - -#### Source - -[`signalwire/signalwire/core/swml_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_builder.py) - -Line 219. - -*** - -### hangup - -Add a 'hangup' verb to the main section - -#### Signature - -```python -hangup(reason: Optional[str] = None) -> Self -``` - -#### Parameters - - - Optional reason for hangup - - -#### Returns - -`Self` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/swml_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_builder.py) - -Line 73. - -*** - -### play - -Add a 'play' verb to the main section - -#### Signature - -```python -play( - url: Optional[str] = None, - urls: Optional[List[str]] = None, - volume: Optional[float] = None, - say_voice: Optional[str] = None, - say_language: Optional[str] = None, - say_gender: Optional[str] = None, - auto_answer: Optional[bool] = None -) -> Self -``` - -#### Parameters - - - Single URL to play (mutually exclusive with urls) - - - - List of URLs to play (mutually exclusive with url) - - - - Volume level (-40 to 40) - - - - Voice for text-to-speech - - - - Language for text-to-speech - - - - Gender for text-to-speech - - - - Whether to auto-answer the call - - -#### Returns - -`Self` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/swml_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_builder.py) - -Line 132. - -*** - -### render - -Build and render the SWML document as a JSON string - -#### Signature - -```python -render() -> str -``` - -#### Returns - -`str` — The complete SWML document as a JSON string - -#### Source - -[`signalwire/signalwire/core/swml_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_builder.py) - -Line 228. - -*** - -### reset - -Reset the document to an empty state - -#### Signature - -```python -reset() -> Self -``` - -#### Returns - -`Self` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/swml_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_builder.py) - -Line 237. - -*** - -### say - -Add a 'play' verb with say: prefix for text-to-speech - -#### Signature - -```python -say( - text: str, - voice: Optional[str] = None, - language: Optional[str] = None, - gender: Optional[str] = None, - volume: Optional[float] = None -) -> Self -``` - -#### Parameters - - - Text to speak - - - - Voice for text-to-speech - - - - Language for text-to-speech - - - - Gender for text-to-speech - - - - Volume level (-40 to 40) - - -#### Returns - -`Self` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/swml_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_builder.py) - -Line 178. - -## Source - -[`signalwire/signalwire/core/swml_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_builder.py) - -Line 30. diff --git a/fern/products/sdk-reference/python/signalwire/core/swml-handler/ai-verb-handler/index.mdx b/fern/products/sdk-reference/python/signalwire/core/swml-handler/ai-verb-handler/index.mdx deleted file mode 100644 index b48f51823f..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/swml-handler/ai-verb-handler/index.mdx +++ /dev/null @@ -1,144 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/swml-handler/ai-verb-handler" -title: "AIVerbHandler" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.core.swml_handler.AIVerbHandler" - parent: "signalwire.core.swml_handler" - module: "signalwire.core.swml_handler" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_handler.py" ---- -# `AIVerbHandler` - -Handler for the SWML 'ai' verb - -The 'ai' verb is complex and requires specialized handling, particularly -for managing prompts, SWAIG functions, and AI configurations. - -## Signature - -```python -class AIVerbHandler(SWMLVerbHandler) -``` - -## Inheritance - -**Extends:** [SWMLVerbHandler](/docs/sdk-reference/reference/python/signalwire/core/swml-handler/swml-verb-handler) - -## Methods - -### build\_config - -Build a configuration for the AI verb - -#### Signature - -```python -build_config( - prompt_text: Optional[str] = None, - prompt_pom: Optional[List[Dict[str, Any]]] = None, - contexts: Optional[Dict[str, Any]] = None, - post_prompt: Optional[str] = None, - post_prompt_url: Optional[str] = None, - swaig: Optional[Dict[str, Any]] = None, - **kwargs = {} -) -> Dict[str, Any] -``` - -#### Parameters - - - Text prompt for the AI (mutually exclusive with prompt\_pom) - - - - POM structure for the AI prompt (mutually exclusive with prompt\_text) - - - - Optional contexts and steps configuration (can be combined with text or pom) - - - - Optional post-prompt text - - - - Optional URL for post-prompt processing - - - - Optional SWAIG configuration - - - - -#### Returns - -`Dict[str, Any]` — AI verb configuration dictionary - -#### Source - -[`signalwire/signalwire/core/swml_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_handler.py) - -Line 132. - -*** - -### get\_verb\_name - -Get the name of the verb this handler handles - -#### Signature - -```python -get_verb_name() -> str -``` - -#### Returns - -`str` — "ai" as the verb name - -#### Source - -[`signalwire/signalwire/core/swml_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_handler.py) - -Line 75. - -*** - -### validate\_config - -Validate the configuration for the AI verb - -#### Signature - -```python -validate_config(config: Dict[str, Any]) -> Tuple[bool, List[str]] -``` - -#### Parameters - - - The configuration dictionary for the AI verb - - -#### Returns - -`Tuple[bool, List[str]]` — (is\_valid, error\_messages) tuple - -#### Source - -[`signalwire/signalwire/core/swml_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_handler.py) - -Line 84. - -## Source - -[`signalwire/signalwire/core/swml_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_handler.py) - -Line 67. diff --git a/fern/products/sdk-reference/python/signalwire/core/swml-handler/index.mdx b/fern/products/sdk-reference/python/signalwire/core/swml-handler/index.mdx deleted file mode 100644 index db7ad0947a..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/swml-handler/index.mdx +++ /dev/null @@ -1,48 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/swml-handler" -title: "swml_handler" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.core.swml_handler" - parent: "signalwire.core" - module: "signalwire.core" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_handler.py" ---- -# `swml_handler` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module swml_handler -``` - -## Classes - - - - Handler for the SWML 'ai' verb - - - - Base interface for SWML verb handlers - - - - Registry for SWML verb handlers - - - -## Source - -[`signalwire/signalwire/core/swml_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_handler.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/swml-handler/swml-verb-handler/index.mdx b/fern/products/sdk-reference/python/signalwire/core/swml-handler/swml-verb-handler/index.mdx deleted file mode 100644 index db38133f3f..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/swml-handler/swml-verb-handler/index.mdx +++ /dev/null @@ -1,119 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/swml-handler/swml-verb-handler" -title: "SWMLVerbHandler" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.core.swml_handler.SWMLVerbHandler" - parent: "signalwire.core.swml_handler" - module: "signalwire.core.swml_handler" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_handler.py" ---- -# `SWMLVerbHandler` - -Base interface for SWML verb handlers - -This abstract class defines the interface that all SWML verb handlers -must implement. Verb handlers provide specialized logic for complex -SWML verbs that cannot be handled generically. - -## Signature - -```python -class SWMLVerbHandler(ABC) -``` - -## Inheritance - -**Extends:** `ABC` - -## Methods - -### build\_config - -Build a configuration for this verb from the provided arguments - -**Modifiers:** `abstract` - -#### Signature - -```python -build_config(**kwargs = {}) -> Dict[str, Any] -``` - -#### Parameters - - - -#### Returns - -`Dict[str, Any]` — Configuration dictionary - -#### Source - -[`signalwire/signalwire/core/swml_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_handler.py) - -Line 53. - -*** - -### get\_verb\_name - -Get the name of the verb this handler handles - -**Modifiers:** `abstract` - -#### Signature - -```python -get_verb_name() -> str -``` - -#### Returns - -`str` — The verb name as a string - -#### Source - -[`signalwire/signalwire/core/swml_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_handler.py) - -Line 30. - -*** - -### validate\_config - -Validate the configuration for this verb - -**Modifiers:** `abstract` - -#### Signature - -```python -validate_config(config: Dict[str, Any]) -> Tuple[bool, List[str]] -``` - -#### Parameters - - - The configuration dictionary for this verb - - -#### Returns - -`Tuple[bool, List[str]]` — (is\_valid, error\_messages) tuple - -#### Source - -[`signalwire/signalwire/core/swml_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_handler.py) - -Line 40. - -## Source - -[`signalwire/signalwire/core/swml_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_handler.py) - -Line 21. diff --git a/fern/products/sdk-reference/python/signalwire/core/swml-handler/verb-handler-registry/index.mdx b/fern/products/sdk-reference/python/signalwire/core/swml-handler/verb-handler-registry/index.mdx deleted file mode 100644 index fdcdf78396..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/swml-handler/verb-handler-registry/index.mdx +++ /dev/null @@ -1,134 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/swml-handler/verb-handler-registry" -title: "VerbHandlerRegistry" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.core.swml_handler.VerbHandlerRegistry" - parent: "signalwire.core.swml_handler" - module: "signalwire.core.swml_handler" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_handler.py" ---- -# `VerbHandlerRegistry` - -Registry for SWML verb handlers - -This class maintains a registry of handlers for special SWML verbs -and provides methods for accessing and using them. - -## Signature - -```python -class VerbHandlerRegistry -``` - -## Methods - -### \_\_init\_\_ - -Initialize the registry with default handlers - -#### Signature - -```python -__init__() -``` - -#### Source - -[`signalwire/signalwire/core/swml_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_handler.py) - -Line 218. - -*** - -### get\_handler - -Get the handler for a specific verb - -#### Signature - -```python -get_handler(verb_name: str) -> Optional[SWMLVerbHandler] -``` - -#### Parameters - - - The name of the verb - - -#### Returns - -`Optional[SWMLVerbHandler]` — The handler if found, None otherwise - -#### Source - -[`signalwire/signalwire/core/swml_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_handler.py) - -Line 235. - -*** - -### has\_handler - -Check if a handler exists for a specific verb - -#### Signature - -```python -has_handler(verb_name: str) -> bool -``` - -#### Parameters - - - The name of the verb - - -#### Returns - -`bool` — True if a handler exists, False otherwise - -#### Source - -[`signalwire/signalwire/core/swml_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_handler.py) - -Line 247. - -*** - -### register\_handler - -Register a new verb handler - -#### Signature - -```python -register_handler(handler: SWMLVerbHandler) -> None -``` - -#### Parameters - - - The handler to register - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/core/swml_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_handler.py) - -Line 225. - -## Source - -[`signalwire/signalwire/core/swml_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_handler.py) - -Line 210. diff --git a/fern/products/sdk-reference/python/signalwire/core/swml-renderer/index.mdx b/fern/products/sdk-reference/python/signalwire/core/swml-renderer/index.mdx deleted file mode 100644 index c2fcdca3a1..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/swml-renderer/index.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/swml-renderer" -title: "swml_renderer" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.core.swml_renderer" - parent: "signalwire.core" - module: "signalwire.core" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_renderer.py" ---- -# `swml_renderer` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module swml_renderer -``` - -## Classes - - - - Renders SWML documents for SignalWire AI Agents with AI and SWAIG components - - - -## Source - -[`signalwire/signalwire/core/swml_renderer.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_renderer.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/swml-renderer/swml-renderer/index.mdx b/fern/products/sdk-reference/python/signalwire/core/swml-renderer/swml-renderer/index.mdx deleted file mode 100644 index 74e71a97a4..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/swml-renderer/swml-renderer/index.mdx +++ /dev/null @@ -1,182 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/swml-renderer/swml-renderer" -title: "SwmlRenderer" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.core.swml_renderer.SwmlRenderer" - parent: "signalwire.core.swml_renderer" - module: "signalwire.core.swml_renderer" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_renderer.py" ---- -# `SwmlRenderer` - -Renders SWML documents for SignalWire AI Agents with AI and SWAIG components - -This class provides methods for rendering SWML documents using the SWMLService architecture. - -## Signature - -```python -class SwmlRenderer -``` - -## Methods - -### render\_function\_response\_swml - -Generate a SWML document for a function response - -**Modifiers:** `static` - -#### Signature - -```python -@staticmethod -render_function_response_swml( - response_text: str, - service: SWMLService, - actions: Optional[List[Dict[str, Any]]] = None, - format: str = 'json' -) -> str -``` - -#### Parameters - - - Text response to include in the document - - - - SWMLService instance to use - - - - Optional list of actions to perform - - - - Output format (json or yaml) - - -#### Returns - -`str` — SWML document as a string - -#### Source - -[`signalwire/signalwire/core/swml_renderer.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_renderer.py) - -Line 150. - -*** - -### render\_swml - -Generate a complete SWML document with AI configuration - -**Modifiers:** `static` - -#### Signature - -```python -@staticmethod -render_swml( - prompt: Union[str, List[Dict[str, Any]]], - service: SWMLService, - post_prompt: Optional[str] = None, - post_prompt_url: Optional[str] = None, - swaig_functions: Optional[List[Dict[str, Any]]] = None, - startup_hook_url: Optional[str] = None, - hangup_hook_url: Optional[str] = None, - prompt_is_pom: bool = False, - params: Optional[Dict[str, Any]] = None, - add_answer: bool = False, - record_call: bool = False, - record_format: str = 'mp4', - record_stereo: bool = True, - format: str = 'json', - default_webhook_url: Optional[str] = None -) -> str -``` - -#### Parameters - - - AI prompt text or POM structure - - - - SWMLService instance to use for document building - - - - Optional post-prompt text - - - - Optional post-prompt URL - - - - List of SWAIG function definitions - - - - Optional startup hook URL - - - - Optional hangup hook URL - - - - Whether prompt is POM format - - - - Additional AI verb parameters - - - - Whether to add answer verb - - - - Whether to add record\_call verb - - - - Recording format - - - - Whether to record in stereo - - - - Output format (json or yaml) - - - - Default webhook URL for SWAIG functions - - -#### Returns - -`str` — SWML document as a string - -#### Source - -[`signalwire/signalwire/core/swml_renderer.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_renderer.py) - -Line 28. - -## Source - -[`signalwire/signalwire/core/swml_renderer.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_renderer.py) - -Line 21. diff --git a/fern/products/sdk-reference/python/signalwire/core/swml-service/index.mdx b/fern/products/sdk-reference/python/signalwire/core/swml-service/index.mdx deleted file mode 100644 index 9dc4bc9a00..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/swml-service/index.mdx +++ /dev/null @@ -1,48 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/swml-service" -title: "swml_service" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.core.swml_service" - parent: "signalwire.core" - module: "signalwire.core" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py" ---- -# `swml_service` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module swml_service -``` - -## Properties - - - -## Constants - - - -## Classes - - - - Base class for creating and serving SWML documents. - - - -## Source - -[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) diff --git a/fern/products/sdk-reference/python/signalwire/core/swml-service/swml-service/index.mdx b/fern/products/sdk-reference/python/signalwire/core/swml-service/swml-service/index.mdx deleted file mode 100644 index 450c5d60eb..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/swml-service/swml-service/index.mdx +++ /dev/null @@ -1,639 +0,0 @@ ---- -slug: "/reference/python/signalwire/core/swml-service/swml-service" -title: "SWMLService" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.core.swml_service.SWMLService" - parent: "signalwire.core.swml_service" - module: "signalwire.core.swml_service" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py" ---- -# `SWMLService` - -Base class for creating and serving SWML documents. - -This class provides core functionality for: - -- Loading and validating SWML schema -- Creating SWML documents -- Setting up web endpoints for serving SWML -- Managing authentication -- Registering SWML functions - -It serves as the foundation for more specialized services like AgentBase. - -## Signature - -```python -class SWMLService(ToolMixin) -``` - -## Inheritance - -**Extends:** [ToolMixin](/docs/sdk-reference/reference/python/signalwire/core/mixins/tool-mixin/tool-mixin) - -## Properties - - - - - Check if full JSON Schema validation is enabled. - - - - - - - - - - - - - - - - - - - - - - - - -## Methods - -### \_\_getattr\_\_ - -Dynamically generate and return SWML verb methods when accessed - -This method is called when an attribute lookup fails through the normal -mechanisms. It checks if the attribute name corresponds to a SWML verb -defined in the schema, and if so, dynamically creates a method for that verb. - -#### Signature - -```python -__getattr__(name: str) -> Any -``` - -#### Parameters - - - The name of the attribute being accessed - - -#### Returns - -`Any` — The dynamically created verb method if name is a valid SWML verb, otherwise raises AttributeError - -#### Throws - -- `AttributeError` — If name is not a valid SWML verb - -#### Source - -[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) - -Line 256. - -*** - -### \_\_init\_\_ - -Initialize a new SWML service - -#### Signature - -```python -__init__( - name: str, - route: str = '/', - host: str = '0.0.0.0', - port: Optional[int] = None, - basic_auth: Optional[Tuple[str, str]] = None, - schema_path: Optional[str] = None, - config_file: Optional[str] = None, - schema_validation: bool = True -) -``` - -#### Parameters - - - Service name/identifier - - - - HTTP route path for this service - - - - Host to bind the web server to - - - - Port to bind the web server to - - - - Optional (username, password) tuple for basic auth - - - - Optional path to the schema file - - - - Optional path to configuration file - - - - Enable schema validation. Default True. Can also be disabled via SWML\_SKIP\_SCHEMA\_VALIDATION=1 env var. - - -#### Source - -[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) - -Line 70. - -*** - -### add\_section - -Add a new section to the document - -#### Signature - -```python -add_section(section_name: str) -> bool -``` - -#### Parameters - - - Name of the section to add - - -#### Returns - -`bool` — True if the section was added, False if it already exists - -#### Source - -[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) - -Line 473. - -*** - -### add\_verb - -Add a verb to the main section of the current document - -#### Signature - -```python -add_verb(verb_name: str, config: Union[Dict[str, Any], int]) -> bool -``` - -#### Parameters - - - The name of the verb to add - - - - Configuration for the verb or direct value for certain verbs (e.g., sleep) - - -#### Returns - -`bool` — True if the verb was added successfully, False otherwise - -#### Source - -[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) - -Line 433. - -*** - -### add\_verb\_to\_section - -Add a verb to a specific section - -#### Signature - -```python -add_verb_to_section( - section_name: str, - verb_name: str, - config: Union[Dict[str, Any], int] -) -> bool -``` - -#### Parameters - - - Name of the section to add to - - - - The name of the verb to add - - - - Configuration for the verb or direct value for certain verbs (e.g., sleep) - - -#### Returns - -`bool` — True if the verb was added successfully, False otherwise - -#### Source - -[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) - -Line 489. - -*** - -### as\_router - -Create a FastAPI router for this service - -#### Signature - -```python -as_router() -> APIRouter -``` - -#### Returns - -`APIRouter` — FastAPI router - -#### Source - -[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) - -Line 561. - -*** - -### extract\_sip\_username - -Extract SIP username from request body - -This extracts the username portion of a SIP URI from the 'to' field -in the call data of a request body. - -**Modifiers:** `static` - -#### Signature - -```python -@staticmethod -extract_sip_username(request_body: Dict[str, Any]) -> Optional[str] -``` - -#### Parameters - - - The parsed JSON body of the request - - -#### Returns - -`Optional[str]` — The extracted SIP username, or None if not found - -#### Source - -[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) - -Line 821. - -*** - -### get\_basic\_auth\_credentials - -Get the basic auth credentials - -#### Signature - -```python -get_basic_auth_credentials( - include_source: bool = False -) -> Union[Tuple[str, str], Tuple[str, str, str]] -``` - -#### Parameters - - - Whether to include the source of the credentials - - -#### Returns - -`Union[Tuple[str, str], Tuple[str, str, str]]` — (username, password) tuple or (username, password, source) tuple if include\_source is True - -#### Source - -[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) - -Line 1133. - -*** - -### get\_document - -Get the current SWML document - -#### Signature - -```python -get_document() -> Dict[str, Any] -``` - -#### Returns - -`Dict[str, Any]` — The current SWML document as a dictionary - -#### Source - -[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) - -Line 534. - -*** - -### manual\_set\_proxy\_url - -Manually set the proxy URL base for webhook callbacks - -This can be called at runtime to set or update the proxy URL - -#### Signature - -```python -manual_set_proxy_url(proxy_url: str) -> None -``` - -#### Parameters - - - The base URL to use for webhooks (e.g., https://example.ngrok.io) - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) - -Line 1399. - -*** - -### on\_request - -Called when SWML is requested, with request data when available - -Subclasses can override this to inspect or modify SWML based on the request - -#### Signature - -```python -on_request( - request_data: Optional[dict] = None, - callback_path: Optional[str] = None -) -> Optional[dict] -``` - -#### Parameters - - - Optional dictionary containing the parsed POST body - - - - Optional callback path - - -#### Returns - -`Optional[dict]` — Optional dict to modify/augment the SWML document - -#### Source - -[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) - -Line 941. - -*** - -### register\_routing\_callback - -Register a callback function that will be called to determine routing -based on POST data. - -When a routing callback is registered, an endpoint at the specified path is automatically -created that will handle requests. This endpoint will use the callback to -determine if the request should be processed by this service or redirected. - -The callback should take a request object and request body dictionary and return: - -- A route string if it should be routed to a different endpoint -- None if normal processing should continue - -#### Signature - -```python -register_routing_callback( - callback_fn: Callable[Request, Dict[str, Any], Optional[str]], - path: str = '/sip' -) -> None -``` - -#### Parameters - - - The callback function to register - - - - The path where this callback should be registered (default: "/sip") - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) - -Line 795. - -*** - -### register\_verb\_handler - -Register a custom verb handler - -#### Signature - -```python -register_verb_handler(handler: SWMLVerbHandler) -> None -``` - -#### Parameters - - - The verb handler to register - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) - -Line 552. - -*** - -### render\_document - -Render the current SWML document as a JSON string - -#### Signature - -```python -render_document() -> str -``` - -#### Returns - -`str` — The current SWML document as a JSON string - -#### Source - -[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) - -Line 543. - -*** - -### reset\_document - -Reset the current document to an empty state - -#### Signature - -```python -reset_document() -> None -``` - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) - -Line 427. - -*** - -### serve - -Start a web server for this service - -#### Signature - -```python -serve( - host: Optional[str] = None, - port: Optional[int] = None, - ssl_cert: Optional[str] = None, - ssl_key: Optional[str] = None, - ssl_enabled: Optional[bool] = None, - domain: Optional[str] = None -) -> None -``` - -#### Parameters - - - Host to bind to (defaults to self.host) - - - - Port to bind to (defaults to self.port) - - - - Path to SSL certificate file - - - - Path to SSL key file - - - - Whether to enable SSL - - - - Domain name for SSL certificate - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) - -Line 957. - -*** - -### stop - -Stop the web server - -#### Signature - -```python -stop() -> None -``` - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) - -Line 1098. - -## Source - -[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) - -Line 56. diff --git a/fern/products/sdk-reference/python/signalwire/index.mdx b/fern/products/sdk-reference/python/signalwire/index.mdx index 4b1372e213..3b8dbc226d 100644 --- a/fern/products/sdk-reference/python/signalwire/index.mdx +++ b/fern/products/sdk-reference/python/signalwire/index.mdx @@ -34,57 +34,9 @@ module signalwire ## Modules - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - Copyright (c) 2025 SignalWire - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - SignalWire RELAY client — real-time call control over WebSocket. - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - ## Functions diff --git a/fern/products/sdk-reference/python/signalwire/livewire/agent-handoff/index.mdx b/fern/products/sdk-reference/python/signalwire/livewire/agent-handoff/index.mdx deleted file mode 100644 index fc553469bb..0000000000 --- a/fern/products/sdk-reference/python/signalwire/livewire/agent-handoff/index.mdx +++ /dev/null @@ -1,57 +0,0 @@ ---- -slug: "/reference/python/signalwire/livewire/agent-handoff" -title: "AgentHandoff" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.livewire.AgentHandoff" - parent: "signalwire.livewire" - module: "signalwire.livewire" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py" ---- -# `AgentHandoff` - -Signals a handoff to another agent in multi-agent scenarios. - -## Signature - -```python -class AgentHandoff -``` - -## Properties - - - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(agent, *, returns = None) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) - -Line 153. - -## Source - -[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) - -Line 150. diff --git a/fern/products/sdk-reference/python/signalwire/livewire/agent-server/index.mdx b/fern/products/sdk-reference/python/signalwire/livewire/agent-server/index.mdx deleted file mode 100644 index 295efb1f64..0000000000 --- a/fern/products/sdk-reference/python/signalwire/livewire/agent-server/index.mdx +++ /dev/null @@ -1,90 +0,0 @@ ---- -slug: "/reference/python/signalwire/livewire/agent-server" -title: "AgentServer" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.livewire.AgentServer" - parent: "signalwire.livewire" - module: "signalwire.livewire" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py" ---- -# `AgentServer` - -Mirrors a livekit AgentServer -- registers entrypoints and starts. - -## Signature - -```python -class AgentServer -``` - -## Properties - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(**kwargs = {}) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) - -Line 686. - -*** - -### rtc\_session - -Decorator that registers the session entrypoint. - -#### Signature - -```python -rtc_session( - func = None, - *, - agent_name: str = '', - type: str = 'room', - on_request = None, - on_session_end = None -) -``` - -#### Parameters - - - - - - - - - - - -#### Source - -[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) - -Line 691. - -## Source - -[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) - -Line 683. diff --git a/fern/products/sdk-reference/python/signalwire/livewire/agent-session/index.mdx b/fern/products/sdk-reference/python/signalwire/livewire/agent-session/index.mdx deleted file mode 100644 index 7343ca0a06..0000000000 --- a/fern/products/sdk-reference/python/signalwire/livewire/agent-session/index.mdx +++ /dev/null @@ -1,211 +0,0 @@ ---- -slug: "/reference/python/signalwire/livewire/agent-session" -title: "AgentSession" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.livewire.AgentSession" - parent: "signalwire.livewire" - module: "signalwire.livewire" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py" ---- -# `AgentSession` - -Mirrors a livekit AgentSession -- orchestrator that binds an Agent -to the SignalWire platform. - -## Signature - -```python -class AgentSession -``` - -## Properties - - - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__( - *, - stt: Any = None, - tts: Any = None, - llm: Any = None, - vad: Any = None, - turn_detection: Any = None, - tools: Optional[List[Any]] = None, - mcp_servers: Any = None, - userdata: Any = None, - allow_interruptions: bool = True, - min_interruption_duration: float = 0.5, - min_endpointing_delay: float = 0.5, - max_endpointing_delay: float = 3.0, - max_tool_steps: int = 3, - preemptive_generation: bool = False -) -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -#### Source - -[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) - -Line 407. - -*** - -### generate\_reply - -Trigger the agent to generate a reply. On SignalWire the prompt -handles this; if _instructions_ is provided they are noted. - -#### Signature - -```python -generate_reply(*, instructions: Optional[str] = None) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) - -Line 514. - -*** - -### interrupt - -Noop -- SignalWire handles barge-in automatically. - -#### Signature - -```python -interrupt() -``` - -#### Source - -[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) - -Line 520. - -*** - -### say - -Queue text to be spoken by the agent. - -#### Signature - -```python -say(text: str) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) - -Line 510. - -*** - -### start - -Bind to an Agent and prepare the underlying SignalWire AgentBase. - -**Modifiers:** `async` - -#### Signature - -```python -async start(agent: Agent, *, room = None, record: bool = False) -``` - -#### Parameters - - - - - - - -#### Source - -[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) - -Line 504. - -*** - -### update\_agent - -Swap in a new Agent. - -#### Signature - -```python -update_agent(agent: Agent) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) - -Line 528. - -## Source - -[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) - -Line 403. diff --git a/fern/products/sdk-reference/python/signalwire/livewire/agent/index.mdx b/fern/products/sdk-reference/python/signalwire/livewire/agent/index.mdx deleted file mode 100644 index febd6f84a1..0000000000 --- a/fern/products/sdk-reference/python/signalwire/livewire/agent/index.mdx +++ /dev/null @@ -1,285 +0,0 @@ ---- -slug: "/reference/python/signalwire/livewire/agent" -title: "Agent" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.livewire.Agent" - parent: "signalwire.livewire" - module: "signalwire.livewire" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py" ---- -# `Agent` - -Mirrors a livekit Agent -- holds instructions and tool definitions. - -## Signature - -```python -class Agent -``` - -## Properties - - - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__( - *, - instructions: str = '', - tools: Optional[List[Any]] = None, - chat_ctx: Any = NOT_GIVEN, - stt: Any = NOT_GIVEN, - tts: Any = NOT_GIVEN, - llm: Any = NOT_GIVEN, - vad: Any = NOT_GIVEN, - turn_detection: Any = NOT_GIVEN, - mcp_servers: Any = NOT_GIVEN, - allow_interruptions: Any = NOT_GIVEN, - min_endpointing_delay: Any = NOT_GIVEN, - max_endpointing_delay: Any = NOT_GIVEN -) -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - -#### Source - -[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) - -Line 274. - -*** - -### llm\_node - -Noop -- SignalWire handles LLM in its control plane. - -**Modifiers:** `async` - -#### Signature - -```python -async llm_node(chat_ctx = None, tools = None, model_settings = None) -``` - -#### Parameters - - - - - - - -#### Source - -[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) - -Line 370. - -*** - -### on\_enter - -Called when the agent enters. Override in subclass. - -**Modifiers:** `async` - -#### Signature - -```python -async on_enter() -``` - -#### Source - -[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) - -Line 346. - -*** - -### on\_exit - -Called when the agent exits. Override in subclass. - -**Modifiers:** `async` - -#### Signature - -```python -async on_exit() -``` - -#### Source - -[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) - -Line 350. - -*** - -### on\_user\_turn\_completed - -Called when the user finishes speaking. Override in subclass. - -**Modifiers:** `async` - -#### Signature - -```python -async on_user_turn_completed(turn_ctx = None, new_message = None) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) - -Line 354. - -*** - -### stt\_node - -Noop -- SignalWire handles STT in its control plane. - -**Modifiers:** `async` - -#### Signature - -```python -async stt_node(audio = None, model_settings = None) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) - -Line 362. - -*** - -### tts\_node - -Noop -- SignalWire handles TTS in its control plane. - -**Modifiers:** `async` - -#### Signature - -```python -async tts_node(text = None, model_settings = None) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) - -Line 378. - -*** - -### update\_instructions - -Update the agent's instructions mid-session. - -**Modifiers:** `async` - -#### Signature - -```python -async update_instructions(instructions: str) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) - -Line 390. - -*** - -### update\_tools - -Update the agent's tool list mid-session. - -**Modifiers:** `async` - -#### Signature - -```python -async update_tools(tools: List[Any]) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) - -Line 394. - -## Source - -[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) - -Line 271. diff --git a/fern/products/sdk-reference/python/signalwire/livewire/chat-context/index.mdx b/fern/products/sdk-reference/python/signalwire/livewire/chat-context/index.mdx deleted file mode 100644 index afd0ae8865..0000000000 --- a/fern/products/sdk-reference/python/signalwire/livewire/chat-context/index.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -slug: "/reference/python/signalwire/livewire/chat-context" -title: "ChatContext" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.livewire.ChatContext" - parent: "signalwire.livewire" - module: "signalwire.livewire" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py" ---- -# `ChatContext` - -Minimal stub mirroring livekit ChatContext. - -## Signature - -```python -class ChatContext -``` - -## Properties - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__() -``` - -#### Source - -[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) - -Line 165. - -*** - -### append - -#### Signature - -```python -append(*, role: str = 'user', text: str = '') -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) - -Line 168. - -## Source - -[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) - -Line 162. diff --git a/fern/products/sdk-reference/python/signalwire/livewire/index.mdx b/fern/products/sdk-reference/python/signalwire/livewire/index.mdx deleted file mode 100644 index 9979a91fd6..0000000000 --- a/fern/products/sdk-reference/python/signalwire/livewire/index.mdx +++ /dev/null @@ -1,179 +0,0 @@ ---- -slug: "/reference/python/signalwire/livewire" -title: "livewire" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.livewire" - parent: "signalwire" - module: "signalwire" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py" ---- -# `livewire` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module livewire -``` - -## Properties - - - - - - - - - - - -## Constants - - - - - - - -## Classes - - - - Mirrors a livekit Agent -- holds instructions and tool definitions. - - - - Signals a handoff to another agent in multi-agent scenarios. - - - - Mirrors a livekit AgentServer -- registers entrypoints and starts. - - - - Mirrors a livekit AgentSession -- orchestrator that binds an Agent to the SignalWire platform. - - - - Minimal stub mirroring livekit ChatContext. - - - - Stub for livekit inference.LLM. - - - - Stub for livekit inference.STT. - - - - Stub for livekit inference.TTS. - - - - Mirrors a livekit JobContext -- provides room and connection info. - - - - Mirrors a livekit JobProcess -- used for prewarm/setup. - - - - Stub -- SignalWire doesn't use the LiveKit room abstraction. - - - - Mirrors livekit RunContext -- available inside tool handlers. - - - - Signals that a tool should not trigger another LLM reply. - - - - Signals a tool execution error. - - - -## Modules - - - - Copyright (c) 2025 SignalWire - - - -## Functions - -### function\_tool - -Mirrors the livekit `@function_tool` decorator. - -Wraps a plain function so it can be passed into `Agent(tools=[...])`. -Parameters are extracted from type-hints; the docstring is used as the -description when _description_ is not provided explicitly. - -#### Signature - -```python -function_tool( - func = None, - *, - name: Optional[str] = None, - description: Optional[str] = None -) -``` - -#### Parameters - - - - - - - -#### Source - -[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) - -Line 177. - -*** - -### run\_app - -Print banner, print a random tip, run the agent. - -This is the main entry point -- mirrors `livekit.agents.cli.run_app`. - -#### Signature - -```python -run_app(server: AgentServer) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) - -Line 799. - -## Source - -[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/livewire/inference-llm/index.mdx b/fern/products/sdk-reference/python/signalwire/livewire/inference-llm/index.mdx deleted file mode 100644 index 8271745f8b..0000000000 --- a/fern/products/sdk-reference/python/signalwire/livewire/inference-llm/index.mdx +++ /dev/null @@ -1,55 +0,0 @@ ---- -slug: "/reference/python/signalwire/livewire/inference-llm" -title: "InferenceLLM" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.livewire.InferenceLLM" - parent: "signalwire.livewire" - module: "signalwire.livewire" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py" ---- -# `InferenceLLM` - -Stub for livekit inference.LLM. - -## Signature - -```python -class InferenceLLM -``` - -## Properties - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(model: str = '', **kwargs = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) - -Line 751. - -## Source - -[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) - -Line 748. diff --git a/fern/products/sdk-reference/python/signalwire/livewire/inference-stt/index.mdx b/fern/products/sdk-reference/python/signalwire/livewire/inference-stt/index.mdx deleted file mode 100644 index dc71d468bb..0000000000 --- a/fern/products/sdk-reference/python/signalwire/livewire/inference-stt/index.mdx +++ /dev/null @@ -1,55 +0,0 @@ ---- -slug: "/reference/python/signalwire/livewire/inference-stt" -title: "InferenceSTT" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.livewire.InferenceSTT" - parent: "signalwire.livewire" - module: "signalwire.livewire" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py" ---- -# `InferenceSTT` - -Stub for livekit inference.STT. - -## Signature - -```python -class InferenceSTT -``` - -## Properties - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(model: str = '', **kwargs = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) - -Line 739. - -## Source - -[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) - -Line 736. diff --git a/fern/products/sdk-reference/python/signalwire/livewire/inference-tts/index.mdx b/fern/products/sdk-reference/python/signalwire/livewire/inference-tts/index.mdx deleted file mode 100644 index 74d87d0f2e..0000000000 --- a/fern/products/sdk-reference/python/signalwire/livewire/inference-tts/index.mdx +++ /dev/null @@ -1,55 +0,0 @@ ---- -slug: "/reference/python/signalwire/livewire/inference-tts" -title: "InferenceTTS" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.livewire.InferenceTTS" - parent: "signalwire.livewire" - module: "signalwire.livewire" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py" ---- -# `InferenceTTS` - -Stub for livekit inference.TTS. - -## Signature - -```python -class InferenceTTS -``` - -## Properties - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(model: str = '', **kwargs = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) - -Line 758. - -## Source - -[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) - -Line 755. diff --git a/fern/products/sdk-reference/python/signalwire/livewire/job-context/index.mdx b/fern/products/sdk-reference/python/signalwire/livewire/job-context/index.mdx deleted file mode 100644 index d260fb402b..0000000000 --- a/fern/products/sdk-reference/python/signalwire/livewire/job-context/index.mdx +++ /dev/null @@ -1,96 +0,0 @@ ---- -slug: "/reference/python/signalwire/livewire/job-context" -title: "JobContext" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.livewire.JobContext" - parent: "signalwire.livewire" - module: "signalwire.livewire" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py" ---- -# `JobContext` - -Mirrors a livekit JobContext -- provides room and connection info. - -## Signature - -```python -class JobContext -``` - -## Properties - - - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__() -``` - -#### Source - -[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) - -Line 656. - -*** - -### connect - -Noop -- SignalWire agents connect automatically when the platform -invokes the SWML endpoint. - -**Modifiers:** `async` - -#### Signature - -```python -async connect() -``` - -#### Source - -[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) - -Line 661. - -*** - -### wait\_for\_participant - -Noop -- SignalWire handles participant management automatically. - -**Modifiers:** `async` - -#### Signature - -```python -async wait_for_participant(*, identity = None) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) - -Line 670. - -## Source - -[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) - -Line 653. diff --git a/fern/products/sdk-reference/python/signalwire/livewire/job-process/index.mdx b/fern/products/sdk-reference/python/signalwire/livewire/job-process/index.mdx deleted file mode 100644 index dde44c5473..0000000000 --- a/fern/products/sdk-reference/python/signalwire/livewire/job-process/index.mdx +++ /dev/null @@ -1,49 +0,0 @@ ---- -slug: "/reference/python/signalwire/livewire/job-process" -title: "JobProcess" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.livewire.JobProcess" - parent: "signalwire.livewire" - module: "signalwire.livewire" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py" ---- -# `JobProcess` - -Mirrors a livekit JobProcess -- used for prewarm/setup. - -## Signature - -```python -class JobProcess -``` - -## Properties - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__() -``` - -#### Source - -[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) - -Line 649. - -## Source - -[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) - -Line 646. diff --git a/fern/products/sdk-reference/python/signalwire/livewire/plugins/cartesia-tts/index.mdx b/fern/products/sdk-reference/python/signalwire/livewire/plugins/cartesia-tts/index.mdx deleted file mode 100644 index 92bfa90b3b..0000000000 --- a/fern/products/sdk-reference/python/signalwire/livewire/plugins/cartesia-tts/index.mdx +++ /dev/null @@ -1,49 +0,0 @@ ---- -slug: "/reference/python/signalwire/livewire/plugins/cartesia-tts" -title: "CartesiaTTS" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.livewire.plugins.CartesiaTTS" - parent: "signalwire.livewire.plugins" - module: "signalwire.livewire.plugins" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/plugins.py" ---- -# `CartesiaTTS` - -Stub for livekit Cartesia TTS plugin. - -## Signature - -```python -class CartesiaTTS -``` - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(**kwargs: Any = {}) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/livewire/plugins.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/plugins.py) - -Line 85. - -## Source - -[`signalwire/signalwire/livewire/plugins.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/plugins.py) - -Line 82. diff --git a/fern/products/sdk-reference/python/signalwire/livewire/plugins/deepgram-stt/index.mdx b/fern/products/sdk-reference/python/signalwire/livewire/plugins/deepgram-stt/index.mdx deleted file mode 100644 index b5a7fc295f..0000000000 --- a/fern/products/sdk-reference/python/signalwire/livewire/plugins/deepgram-stt/index.mdx +++ /dev/null @@ -1,49 +0,0 @@ ---- -slug: "/reference/python/signalwire/livewire/plugins/deepgram-stt" -title: "DeepgramSTT" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.livewire.plugins.DeepgramSTT" - parent: "signalwire.livewire.plugins" - module: "signalwire.livewire.plugins" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/plugins.py" ---- -# `DeepgramSTT` - -Stub for livekit Deepgram STT plugin. - -## Signature - -```python -class DeepgramSTT -``` - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(**kwargs: Any = {}) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/livewire/plugins.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/plugins.py) - -Line 52. - -## Source - -[`signalwire/signalwire/livewire/plugins.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/plugins.py) - -Line 49. diff --git a/fern/products/sdk-reference/python/signalwire/livewire/plugins/eleven-labs-tts/index.mdx b/fern/products/sdk-reference/python/signalwire/livewire/plugins/eleven-labs-tts/index.mdx deleted file mode 100644 index 4063e282b6..0000000000 --- a/fern/products/sdk-reference/python/signalwire/livewire/plugins/eleven-labs-tts/index.mdx +++ /dev/null @@ -1,49 +0,0 @@ ---- -slug: "/reference/python/signalwire/livewire/plugins/eleven-labs-tts" -title: "ElevenLabsTTS" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.livewire.plugins.ElevenLabsTTS" - parent: "signalwire.livewire.plugins" - module: "signalwire.livewire.plugins" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/plugins.py" ---- -# `ElevenLabsTTS` - -Stub for livekit ElevenLabs TTS plugin. - -## Signature - -```python -class ElevenLabsTTS -``` - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(**kwargs: Any = {}) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/livewire/plugins.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/plugins.py) - -Line 97. - -## Source - -[`signalwire/signalwire/livewire/plugins.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/plugins.py) - -Line 94. diff --git a/fern/products/sdk-reference/python/signalwire/livewire/plugins/index.mdx b/fern/products/sdk-reference/python/signalwire/livewire/plugins/index.mdx deleted file mode 100644 index c929d06eb0..0000000000 --- a/fern/products/sdk-reference/python/signalwire/livewire/plugins/index.mdx +++ /dev/null @@ -1,56 +0,0 @@ ---- -slug: "/reference/python/signalwire/livewire/plugins" -title: "plugins" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.livewire.plugins" - parent: "signalwire.livewire" - module: "signalwire.livewire" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/plugins.py" ---- -# `plugins` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module plugins -``` - -## Classes - - - - Stub for livekit Cartesia TTS plugin. - - - - Stub for livekit Deepgram STT plugin. - - - - Stub for livekit ElevenLabs TTS plugin. - - - - Stub for livekit OpenAI LLM plugin. - - - - Stub for livekit Silero VAD plugin. - - - -## Source - -[`signalwire/signalwire/livewire/plugins.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/plugins.py) diff --git a/fern/products/sdk-reference/python/signalwire/livewire/plugins/open-aillm/index.mdx b/fern/products/sdk-reference/python/signalwire/livewire/plugins/open-aillm/index.mdx deleted file mode 100644 index 4c0771d9f4..0000000000 --- a/fern/products/sdk-reference/python/signalwire/livewire/plugins/open-aillm/index.mdx +++ /dev/null @@ -1,53 +0,0 @@ ---- -slug: "/reference/python/signalwire/livewire/plugins/open-aillm" -title: "OpenAILLM" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.livewire.plugins.OpenAILLM" - parent: "signalwire.livewire.plugins" - module: "signalwire.livewire.plugins" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/plugins.py" ---- -# `OpenAILLM` - -Stub for livekit OpenAI LLM plugin. - -## Signature - -```python -class OpenAILLM -``` - -## Properties - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(**kwargs: Any = {}) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/livewire/plugins.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/plugins.py) - -Line 68. - -## Source - -[`signalwire/signalwire/livewire/plugins.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/plugins.py) - -Line 65. diff --git a/fern/products/sdk-reference/python/signalwire/livewire/plugins/silero-vad/index.mdx b/fern/products/sdk-reference/python/signalwire/livewire/plugins/silero-vad/index.mdx deleted file mode 100644 index a2b73bcdcd..0000000000 --- a/fern/products/sdk-reference/python/signalwire/livewire/plugins/silero-vad/index.mdx +++ /dev/null @@ -1,70 +0,0 @@ ---- -slug: "/reference/python/signalwire/livewire/plugins/silero-vad" -title: "SileroVAD" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.livewire.plugins.SileroVAD" - parent: "signalwire.livewire.plugins" - module: "signalwire.livewire.plugins" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/plugins.py" ---- -# `SileroVAD` - -Stub for livekit Silero VAD plugin. - -## Signature - -```python -class SileroVAD -``` - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(**kwargs: Any = {}) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/livewire/plugins.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/plugins.py) - -Line 113. - -*** - -### load - -Mirrors the SileroVAD.load() factory. - -**Modifiers:** `classmethod` - -#### Signature - -```python -@classmethod -load() -``` - -#### Source - -[`signalwire/signalwire/livewire/plugins.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/plugins.py) - -Line 121. - -## Source - -[`signalwire/signalwire/livewire/plugins.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/plugins.py) - -Line 110. diff --git a/fern/products/sdk-reference/python/signalwire/livewire/room/index.mdx b/fern/products/sdk-reference/python/signalwire/livewire/room/index.mdx deleted file mode 100644 index 3d64c75d27..0000000000 --- a/fern/products/sdk-reference/python/signalwire/livewire/room/index.mdx +++ /dev/null @@ -1,33 +0,0 @@ ---- -slug: "/reference/python/signalwire/livewire/room" -title: "Room" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.livewire.Room" - parent: "signalwire.livewire" - module: "signalwire.livewire" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py" ---- -# `Room` - -Stub -- SignalWire doesn't use the LiveKit room abstraction. - -## Signature - -```python -class Room -``` - -## Properties - - - -## Source - -[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) - -Line 641. diff --git a/fern/products/sdk-reference/python/signalwire/livewire/run-context/index.mdx b/fern/products/sdk-reference/python/signalwire/livewire/run-context/index.mdx deleted file mode 100644 index 29e29a0e1d..0000000000 --- a/fern/products/sdk-reference/python/signalwire/livewire/run-context/index.mdx +++ /dev/null @@ -1,63 +0,0 @@ ---- -slug: "/reference/python/signalwire/livewire/run-context" -title: "RunContext" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.livewire.RunContext" - parent: "signalwire.livewire" - module: "signalwire.livewire" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py" ---- -# `RunContext` - -Mirrors livekit RunContext -- available inside tool handlers. - -## Signature - -```python -class RunContext -``` - -## Properties - - - - - - - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(session = None, *, speech_handle = None, function_call = None) -``` - -#### Parameters - - - - - - - -#### Source - -[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) - -Line 255. - -## Source - -[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) - -Line 252. diff --git a/fern/products/sdk-reference/python/signalwire/livewire/stop-response/index.mdx b/fern/products/sdk-reference/python/signalwire/livewire/stop-response/index.mdx deleted file mode 100644 index ab42b1d085..0000000000 --- a/fern/products/sdk-reference/python/signalwire/livewire/stop-response/index.mdx +++ /dev/null @@ -1,33 +0,0 @@ ---- -slug: "/reference/python/signalwire/livewire/stop-response" -title: "StopResponse" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.livewire.StopResponse" - parent: "signalwire.livewire" - module: "signalwire.livewire" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py" ---- -# `StopResponse` - -Signals that a tool should not trigger another LLM reply. - -## Signature - -```python -class StopResponse(Exception) -``` - -## Inheritance - -**Extends:** `Exception` - -## Source - -[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) - -Line 140. diff --git a/fern/products/sdk-reference/python/signalwire/livewire/tool-error/index.mdx b/fern/products/sdk-reference/python/signalwire/livewire/tool-error/index.mdx deleted file mode 100644 index c659793062..0000000000 --- a/fern/products/sdk-reference/python/signalwire/livewire/tool-error/index.mdx +++ /dev/null @@ -1,33 +0,0 @@ ---- -slug: "/reference/python/signalwire/livewire/tool-error" -title: "ToolError" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.livewire.ToolError" - parent: "signalwire.livewire" - module: "signalwire.livewire" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py" ---- -# `ToolError` - -Signals a tool execution error. - -## Signature - -```python -class ToolError(Exception) -``` - -## Inheritance - -**Extends:** `Exception` - -## Source - -[`signalwire/signalwire/livewire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/livewire/__init__.py) - -Line 145. diff --git a/fern/products/sdk-reference/python/signalwire/mcp-gateway/gateway-service/index.mdx b/fern/products/sdk-reference/python/signalwire/mcp-gateway/gateway-service/index.mdx deleted file mode 100644 index 1833266f79..0000000000 --- a/fern/products/sdk-reference/python/signalwire/mcp-gateway/gateway-service/index.mdx +++ /dev/null @@ -1,62 +0,0 @@ ---- -slug: "/reference/python/signalwire/mcp-gateway/gateway-service" -title: "gateway_service" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.mcp_gateway.gateway_service" - parent: "signalwire.mcp_gateway" - module: "signalwire.mcp_gateway" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/gateway_service.py" ---- -# `gateway_service` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module gateway_service -``` - -## Properties - - - -## Classes - - - - Main gateway service class - - - -## Functions - -### main - -Main entry point - -#### Signature - -```python -main() -``` - -#### Source - -[`signalwire/signalwire/mcp_gateway/gateway_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/gateway_service.py) - -Line 557. - -## Source - -[`signalwire/signalwire/mcp_gateway/gateway_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/gateway_service.py) diff --git a/fern/products/sdk-reference/python/signalwire/mcp-gateway/gateway-service/mcp-gateway/index.mdx b/fern/products/sdk-reference/python/signalwire/mcp-gateway/gateway-service/mcp-gateway/index.mdx deleted file mode 100644 index 40229c175f..0000000000 --- a/fern/products/sdk-reference/python/signalwire/mcp-gateway/gateway-service/mcp-gateway/index.mdx +++ /dev/null @@ -1,105 +0,0 @@ ---- -slug: "/reference/python/signalwire/mcp-gateway/gateway-service/mcp-gateway" -title: "MCPGateway" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.mcp_gateway.gateway_service.MCPGateway" - parent: "signalwire.mcp_gateway.gateway_service" - module: "signalwire.mcp_gateway.gateway_service" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/gateway_service.py" ---- -# `MCPGateway` - -Main gateway service class - -## Signature - -```python -class MCPGateway -``` - -## Properties - - - - - - - - - - - - - - - - - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(config_path: str = 'config.json') -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/mcp_gateway/gateway_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/gateway_service.py) - -Line 55. - -*** - -### run - -Run the gateway service - -#### Signature - -```python -run() -``` - -#### Source - -[`signalwire/signalwire/mcp_gateway/gateway_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/gateway_service.py) - -Line 478. - -*** - -### shutdown - -Shutdown the gateway service - -#### Signature - -```python -shutdown() -``` - -#### Source - -[`signalwire/signalwire/mcp_gateway/gateway_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/gateway_service.py) - -Line 520. - -## Source - -[`signalwire/signalwire/mcp_gateway/gateway_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/gateway_service.py) - -Line 52. diff --git a/fern/products/sdk-reference/python/signalwire/mcp-gateway/index.mdx b/fern/products/sdk-reference/python/signalwire/mcp-gateway/index.mdx deleted file mode 100644 index 7e77c3d3ac..0000000000 --- a/fern/products/sdk-reference/python/signalwire/mcp-gateway/index.mdx +++ /dev/null @@ -1,52 +0,0 @@ ---- -slug: "/reference/python/signalwire/mcp-gateway" -title: "mcp_gateway" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.mcp_gateway" - parent: "signalwire" - module: "signalwire" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/__init__.py" ---- -# `mcp_gateway` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module mcp_gateway -``` - -## Properties - - - -## Modules - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - -## Source - -[`signalwire/signalwire/mcp_gateway/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/mcp-gateway/mcp-manager/index.mdx b/fern/products/sdk-reference/python/signalwire/mcp-gateway/mcp-manager/index.mdx deleted file mode 100644 index daed38d9b4..0000000000 --- a/fern/products/sdk-reference/python/signalwire/mcp-gateway/mcp-manager/index.mdx +++ /dev/null @@ -1,52 +0,0 @@ ---- -slug: "/reference/python/signalwire/mcp-gateway/mcp-manager" -title: "mcp_manager" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.mcp_gateway.mcp_manager" - parent: "signalwire.mcp_gateway" - module: "signalwire.mcp_gateway" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py" ---- -# `mcp_manager` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module mcp_manager -``` - -## Properties - - - -## Classes - - - - Client for communicating with a single MCP server process - - - - Manages multiple MCP services and their lifecycles - - - - Configuration for an MCP service - - - -## Source - -[`signalwire/signalwire/mcp_gateway/mcp_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py) diff --git a/fern/products/sdk-reference/python/signalwire/mcp-gateway/mcp-manager/mcp-client/index.mdx b/fern/products/sdk-reference/python/signalwire/mcp-gateway/mcp-manager/mcp-client/index.mdx deleted file mode 100644 index 824a609493..0000000000 --- a/fern/products/sdk-reference/python/signalwire/mcp-gateway/mcp-manager/mcp-client/index.mdx +++ /dev/null @@ -1,191 +0,0 @@ ---- -slug: "/reference/python/signalwire/mcp-gateway/mcp-manager/mcp-client" -title: "MCPClient" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.mcp_gateway.mcp_manager.MCPClient" - parent: "signalwire.mcp_gateway.mcp_manager" - module: "signalwire.mcp_gateway.mcp_manager" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py" ---- -# `MCPClient` - -Client for communicating with a single MCP server process - -## Signature - -```python -class MCPClient -``` - -## Properties - - - - - - - - - - - - - - - - - - - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(service: MCPService, sandbox_base_dir: str = './sandbox') -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/mcp_gateway/mcp_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py) - -Line 62. - -*** - -### call\_method - -Call an RPC method and wait for response - -#### Signature - -```python -call_method(method: str, params: Dict[str, Any]) -> Any -``` - -#### Parameters - - - - - -#### Returns - -`Any` - -#### Source - -[`signalwire/signalwire/mcp_gateway/mcp_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py) - -Line 282. - -*** - -### call\_tool - -Call a tool on the MCP server - -#### Signature - -```python -call_tool(tool_name: str, arguments: Dict[str, Any]) -> Dict[str, Any] -``` - -#### Parameters - - - - - -#### Returns - -`Dict[str, Any]` - -#### Source - -[`signalwire/signalwire/mcp_gateway/mcp_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py) - -Line 275. - -*** - -### get\_tools - -Get the list of available tools - -#### Signature - -```python -get_tools() -> List[Dict[str, Any]] -``` - -#### Returns - -`List[Dict[str, Any]]` - -#### Source - -[`signalwire/signalwire/mcp_gateway/mcp_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py) - -Line 321. - -*** - -### start - -Start the MCP server process and initialize connection - -#### Signature - -```python -start() -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`signalwire/signalwire/mcp_gateway/mcp_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py) - -Line 163. - -*** - -### stop - -Stop the MCP server process and clean up sandbox - -#### Signature - -```python -stop() -``` - -#### Source - -[`signalwire/signalwire/mcp_gateway/mcp_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py) - -Line 213. - -## Source - -[`signalwire/signalwire/mcp_gateway/mcp_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py) - -Line 59. diff --git a/fern/products/sdk-reference/python/signalwire/mcp-gateway/mcp-manager/mcp-manager/index.mdx b/fern/products/sdk-reference/python/signalwire/mcp-gateway/mcp-manager/mcp-manager/index.mdx deleted file mode 100644 index e14c16f58d..0000000000 --- a/fern/products/sdk-reference/python/signalwire/mcp-gateway/mcp-manager/mcp-manager/index.mdx +++ /dev/null @@ -1,199 +0,0 @@ ---- -slug: "/reference/python/signalwire/mcp-gateway/mcp-manager/mcp-manager" -title: "MCPManager" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.mcp_gateway.mcp_manager.MCPManager" - parent: "signalwire.mcp_gateway.mcp_manager" - module: "signalwire.mcp_gateway.mcp_manager" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py" ---- -# `MCPManager` - -Manages multiple MCP services and their lifecycles - -## Signature - -```python -class MCPManager -``` - -## Properties - - - - - - - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(config: Dict[str, Any]) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/mcp_gateway/mcp_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py) - -Line 412. - -*** - -### create\_client - -Create a new MCP client for a service - -#### Signature - -```python -create_client(service_name: str) -> MCPClient -``` - -#### Parameters - - - -#### Returns - -`MCPClient` - -#### Source - -[`signalwire/signalwire/mcp_gateway/mcp_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py) - -Line 465. - -*** - -### get\_service - -Get a service definition by name - -#### Signature - -```python -get_service(service_name: str) -> Optional[MCPService] -``` - -#### Parameters - - - -#### Returns - -`Optional[MCPService]` - -#### Source - -[`signalwire/signalwire/mcp_gateway/mcp_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py) - -Line 448. - -*** - -### get\_service\_tools - -Get tools for a service by starting a temporary instance - -#### Signature - -```python -get_service_tools(service_name: str) -> List[Dict[str, Any]] -``` - -#### Parameters - - - -#### Returns - -`List[Dict[str, Any]]` - -#### Source - -[`signalwire/signalwire/mcp_gateway/mcp_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py) - -Line 484. - -*** - -### list\_services - -List all available services - -#### Signature - -```python -list_services() -> Dict[str, Dict[str, Any]] -``` - -#### Returns - -`Dict[str, Dict[str, Any]]` - -#### Source - -[`signalwire/signalwire/mcp_gateway/mcp_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py) - -Line 452. - -*** - -### shutdown - -Shutdown all active MCP clients - -#### Signature - -```python -shutdown() -``` - -#### Source - -[`signalwire/signalwire/mcp_gateway/mcp_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py) - -Line 519. - -*** - -### validate\_services - -Validate that all services can be started - -#### Signature - -```python -validate_services() -> Dict[str, bool] -``` - -#### Returns - -`Dict[str, bool]` - -#### Source - -[`signalwire/signalwire/mcp_gateway/mcp_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py) - -Line 499. - -## Source - -[`signalwire/signalwire/mcp_gateway/mcp_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py) - -Line 409. diff --git a/fern/products/sdk-reference/python/signalwire/mcp-gateway/mcp-manager/mcp-service/index.mdx b/fern/products/sdk-reference/python/signalwire/mcp-gateway/mcp-manager/mcp-service/index.mdx deleted file mode 100644 index 541d443b18..0000000000 --- a/fern/products/sdk-reference/python/signalwire/mcp-gateway/mcp-manager/mcp-service/index.mdx +++ /dev/null @@ -1,113 +0,0 @@ ---- -slug: "/reference/python/signalwire/mcp-gateway/mcp-manager/mcp-service" -title: "MCPService" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.mcp_gateway.mcp_manager.MCPService" - parent: "signalwire.mcp_gateway.mcp_manager" - module: "signalwire.mcp_gateway.mcp_manager" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py" ---- -# `MCPService` - -Configuration for an MCP service - -**Modifiers:** `dataclass` - -**Decorators:** `@dataclass` - -## Signature - -```python -class MCPService -``` - -## Properties - - - - - - - - - - - -## Methods - -### \_\_hash\_\_ - -#### Signature - -```python -__hash__() -``` - -#### Source - -[`signalwire/signalwire/mcp_gateway/mcp_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py) - -Line 55. - -*** - -### \_\_init\_\_ - -#### Signature - -```python -__init__( - name: str, - command: List[str], - description: str, - enabled: bool = True, - sandbox_config: Dict[str, Any] = None -) -> None -``` - -#### Parameters - - - - - - - - - - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/mcp_gateway/mcp_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py) - -*** - -### \_\_post\_init\_\_ - -#### Signature - -```python -__post_init__() -``` - -#### Source - -[`signalwire/signalwire/mcp_gateway/mcp_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py) - -Line 46. - -## Source - -[`signalwire/signalwire/mcp_gateway/mcp_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/mcp_manager.py) - -Line 37. diff --git a/fern/products/sdk-reference/python/signalwire/mcp-gateway/session-manager/index.mdx b/fern/products/sdk-reference/python/signalwire/mcp-gateway/session-manager/index.mdx deleted file mode 100644 index 0796149674..0000000000 --- a/fern/products/sdk-reference/python/signalwire/mcp-gateway/session-manager/index.mdx +++ /dev/null @@ -1,48 +0,0 @@ ---- -slug: "/reference/python/signalwire/mcp-gateway/session-manager" -title: "session_manager" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.mcp_gateway.session_manager" - parent: "signalwire.mcp_gateway" - module: "signalwire.mcp_gateway" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/session_manager.py" ---- -# `session_manager` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module session_manager -``` - -## Properties - - - -## Classes - - - - Represents an active MCP session - - - - Manages MCP server sessions with automatic cleanup - - - -## Source - -[`signalwire/signalwire/mcp_gateway/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/session_manager.py) diff --git a/fern/products/sdk-reference/python/signalwire/mcp-gateway/session-manager/session-manager/index.mdx b/fern/products/sdk-reference/python/signalwire/mcp-gateway/session-manager/session-manager/index.mdx deleted file mode 100644 index 2252b7259f..0000000000 --- a/fern/products/sdk-reference/python/signalwire/mcp-gateway/session-manager/session-manager/index.mdx +++ /dev/null @@ -1,227 +0,0 @@ ---- -slug: "/reference/python/signalwire/mcp-gateway/session-manager/session-manager" -title: "SessionManager" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.mcp_gateway.session_manager.SessionManager" - parent: "signalwire.mcp_gateway.session_manager" - module: "signalwire.mcp_gateway.session_manager" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/session_manager.py" ---- -# `SessionManager` - -Manages MCP server sessions with automatic cleanup - -## Signature - -```python -class SessionManager -``` - -## Properties - - - - - - - - - - - - - - - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(config: Dict[str, Any], max_total_sessions: int = 500) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/mcp_gateway/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/session_manager.py) - -Line 57. - -*** - -### close\_session - -Close and remove a session - -#### Signature - -```python -close_session(session_id: str) -> bool -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`signalwire/signalwire/mcp_gateway/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/session_manager.py) - -Line 126. - -*** - -### create\_session - -Create and register a new session - -#### Signature - -```python -create_session( - session_id: str, - service_name: str, - process: Any, - timeout: Optional[int] = None, - metadata: Optional[Dict[str, Any]] = None -) -> Session -``` - -#### Parameters - - - - - - - - - - - -#### Returns - -`Session` - -#### Source - -[`signalwire/signalwire/mcp_gateway/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/session_manager.py) - -Line 73. - -*** - -### get\_service\_session\_count - -Get number of active sessions for a service - -#### Signature - -```python -get_service_session_count(service_name: str) -> int -``` - -#### Parameters - - - -#### Returns - -`int` - -#### Source - -[`signalwire/signalwire/mcp_gateway/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/session_manager.py) - -Line 168. - -*** - -### get\_session - -Get an active session by ID - -#### Signature - -```python -get_session(session_id: str) -> Optional[Session] -``` - -#### Parameters - - - -#### Returns - -`Optional[Session]` - -#### Source - -[`signalwire/signalwire/mcp_gateway/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/session_manager.py) - -Line 105. - -*** - -### list\_sessions - -List all active sessions with their info - -#### Signature - -```python -list_sessions() -> Dict[str, Dict[str, Any]] -``` - -#### Returns - -`Dict[str, Dict[str, Any]]` - -#### Source - -[`signalwire/signalwire/mcp_gateway/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/session_manager.py) - -Line 146. - -*** - -### shutdown - -Shutdown all sessions and cleanup - -#### Signature - -```python -shutdown() -``` - -#### Source - -[`signalwire/signalwire/mcp_gateway/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/session_manager.py) - -Line 203. - -## Source - -[`signalwire/signalwire/mcp_gateway/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/session_manager.py) - -Line 54. diff --git a/fern/products/sdk-reference/python/signalwire/mcp-gateway/session-manager/session/index.mdx b/fern/products/sdk-reference/python/signalwire/mcp-gateway/session-manager/session/index.mdx deleted file mode 100644 index db3c5b905b..0000000000 --- a/fern/products/sdk-reference/python/signalwire/mcp-gateway/session-manager/session/index.mdx +++ /dev/null @@ -1,117 +0,0 @@ ---- -slug: "/reference/python/signalwire/mcp-gateway/session-manager/session" -title: "Session" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.mcp_gateway.session_manager.Session" - parent: "signalwire.mcp_gateway.session_manager" - module: "signalwire.mcp_gateway.session_manager" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/session_manager.py" ---- -# `Session` - -Represents an active MCP session - -**Modifiers:** `dataclass` - -**Decorators:** `@dataclass` - -## Signature - -```python -class Session -``` - -## Properties - - - - - Check if the underlying MCP client is still running - - - - Check if session has expired based on timeout - - - - - - - - - - - - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__( - session_id: str, - service_name: str, - process: Any, - created_at: datetime = datetime.now(), - last_accessed: datetime = datetime.now(), - timeout: int = 300, - metadata: Dict[str, Any] = dict() -) -> None -``` - -#### Parameters - - - - - - - - - - - - - - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/mcp_gateway/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/session_manager.py) - -*** - -### touch - -Update last accessed time - -#### Signature - -```python -touch() -``` - -#### Source - -[`signalwire/signalwire/mcp_gateway/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/session_manager.py) - -Line 49. - -## Source - -[`signalwire/signalwire/mcp_gateway/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/session_manager.py) - -Line 28. diff --git a/fern/products/sdk-reference/python/signalwire/pom/index.mdx b/fern/products/sdk-reference/python/signalwire/pom/index.mdx deleted file mode 100644 index bd3f2641e9..0000000000 --- a/fern/products/sdk-reference/python/signalwire/pom/index.mdx +++ /dev/null @@ -1,46 +0,0 @@ ---- -slug: "/reference/python/signalwire/pom" -title: "pom" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.pom" - parent: "signalwire" - module: "signalwire" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/__init__.py" ---- -# `pom` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module pom -``` - -## Properties - - - -## Modules - - - - - - POM Tool - Command line utility for working with Prompt Object Model files - - - -## Source - -[`signalwire/signalwire/pom/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/pom/pom-tool/index.mdx b/fern/products/sdk-reference/python/signalwire/pom/pom-tool/index.mdx deleted file mode 100644 index d2138dd926..0000000000 --- a/fern/products/sdk-reference/python/signalwire/pom/pom-tool/index.mdx +++ /dev/null @@ -1,123 +0,0 @@ ---- -slug: "/reference/python/signalwire/pom/pom-tool" -title: "pom_tool" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.pom.pom_tool" - parent: "signalwire.pom" - module: "signalwire.pom" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom_tool.py" ---- -# `pom_tool` - -POM Tool - Command line utility for working with Prompt Object Model files - -> \[!NOTE] -> pom\_tool \ \[--output=<format>] \[--outfile=<file>] \[--merge\_pom="<section name>:<filename>"] -> pom\_tool (-h | --help) - -> \[!NOTE] -> -h --help Show this help message -> \--output=<format> Output format: md, xml, json, yaml \[default: md] -> \--outfile=<file> Output file (if not specified, prints to stdout) -> \--merge\_pom=<arg> Merge another POM into a section: "<section name>:<filename>" - -## Signature - -```python -module pom_tool -``` - -## Functions - -### detect\_file\_format - -Detect if the file is JSON or YAML based on extension and content. - -#### Signature - -```python -detect_file_format(file_path) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/pom/pom_tool.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom_tool.py) - -Line 23. - -*** - -### load\_pom - -Load a POM from a file, auto-detecting the format. - -#### Signature - -```python -load_pom(file_path) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/pom/pom_tool.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom_tool.py) - -Line 55. - -*** - -### main - -Main entry point for the POM tool. - -#### Signature - -```python -main() -``` - -#### Source - -[`signalwire/signalwire/pom/pom_tool.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom_tool.py) - -Line 80. - -*** - -### render\_pom - -Render the POM in the specified format. - -#### Signature - -```python -render_pom(pom, output_format) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/pom/pom_tool.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom_tool.py) - -Line 67. - -## Source - -[`signalwire/signalwire/pom/pom_tool.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom_tool.py) diff --git a/fern/products/sdk-reference/python/signalwire/pom/pom/index.mdx b/fern/products/sdk-reference/python/signalwire/pom/pom/index.mdx deleted file mode 100644 index 02ecd381d7..0000000000 --- a/fern/products/sdk-reference/python/signalwire/pom/pom/index.mdx +++ /dev/null @@ -1,37 +0,0 @@ ---- -slug: "/reference/python/signalwire/pom/pom" -title: "pom" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.pom.pom" - parent: "signalwire.pom" - module: "signalwire.pom" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py" ---- -# `pom` - -## Signature - -```python -module pom -``` - -## Classes - - - - A structured data format for composing, organizing, and rendering prompt instructions for large language models. - - - - Represents a section in the Prompt Object Model. - - - -## Source - -[`signalwire/signalwire/pom/pom.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py) diff --git a/fern/products/sdk-reference/python/signalwire/pom/pom/prompt-object-model/index.mdx b/fern/products/sdk-reference/python/signalwire/pom/pom/prompt-object-model/index.mdx deleted file mode 100644 index 37b1508a1f..0000000000 --- a/fern/products/sdk-reference/python/signalwire/pom/pom/prompt-object-model/index.mdx +++ /dev/null @@ -1,364 +0,0 @@ ---- -slug: "/reference/python/signalwire/pom/pom/prompt-object-model" -title: "PromptObjectModel" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.pom.pom.PromptObjectModel" - parent: "signalwire.pom.pom" - module: "signalwire.pom.pom" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py" ---- -# `PromptObjectModel` - -A structured data format for composing, organizing, and rendering prompt -instructions for large language models. - -The Prompt Object Model provides a tree-based representation of a prompt -document composed of nested sections, each of which can include a title, -body text, bullet points, and arbitrarily nested subsections. - -This class supports both machine-readability (via JSON/YAML) and structured -rendering (via Markdown/XML), making it ideal for prompt templating, modular -editing, and traceable documentation. - -## Signature - -```python -class PromptObjectModel -``` - -## Properties - - - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(debug: bool = False) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/pom/pom.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py) - -Line 359. - -*** - -### add\_pom\_as\_subsection - -Add another PromptObjectModel as a subsection to a section with the given title or section object. - -#### Signature - -```python -add_pom_as_subsection( - target: Union[str, Section], - pom_to_add: PromptObjectModel -) -``` - -#### Parameters - - - The title of the section or the Section object to which the POM should be added as a subsection. - - - - The PromptObjectModel to add as a subsection. - - -#### Throws - -- `ValueError` — If no section with the target title is found (when target is a string). - -#### Source - -[`signalwire/signalwire/pom/pom.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py) - -Line 519. - -*** - -### add\_section - -Add a top-level section to the model. - -#### Signature - -```python -add_section( - title: Optional[str] = None, - *, - body: str = '', - bullets: Optional[Union[List[str], str]] = None, - numbered: Optional[bool] = None, - numberedBullets: bool = False -) -> Section -``` - -#### Parameters - - - The title of the section - - - - Optional body text for the section - - - - Optional list of bullet points or a single string - - - - Whether this section should be numbered - - - - Whether bullets should be numbered - - -#### Returns - -`Section` — The newly created Section object - -#### Throws - -- `ValueError` — If a section without a title is added after the first section - -#### Source - -[`signalwire/signalwire/pom/pom.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py) - -Line 363. - -*** - -### find\_section - -Find a section by its title. - -Performs a recursive search through all sections and subsections. - -#### Signature - -```python -find_section(title: str) -> Optional[Section] -``` - -#### Parameters - - - The title to search for - - -#### Returns - -`Optional[Section]` — The Section object if found, None otherwise - -#### Source - -[`signalwire/signalwire/pom/pom.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py) - -Line 397. - -*** - -### from\_json - -Create a PromptObjectModel instance from JSON data. - -**Modifiers:** `static` - -#### Signature - -```python -@staticmethod -from_json(json_data: Union[str, dict]) -> PromptObjectModel -``` - -#### Parameters - - - Either a JSON string or a parsed dictionary - - -#### Returns - -`PromptObjectModel` — A new PromptObjectModel populated with the data from the JSON - -#### Throws - -- `ValueError` — If the JSON is not properly formatted - -#### Source - -[`signalwire/signalwire/pom/pom.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py) - -Line 247. - -*** - -### from\_yaml - -Create a PromptObjectModel instance from YAML data. - -**Modifiers:** `static` - -#### Signature - -```python -@staticmethod -from_yaml(yaml_data: Union[str, dict]) -> PromptObjectModel -``` - -#### Parameters - - - Either a YAML string or a parsed dictionary - - -#### Returns - -`PromptObjectModel` — A new PromptObjectModel populated with the data from the YAML - -#### Throws - -- `ValueError` — If the YAML is not properly formatted - -#### Source - -[`signalwire/signalwire/pom/pom.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py) - -Line 268. - -*** - -### render\_markdown - -Render the entire model as markdown. - -#### Signature - -```python -render_markdown() -> str -``` - -#### Returns - -`str` — A string containing the markdown representation - -#### Source - -[`signalwire/signalwire/pom/pom.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py) - -Line 448. - -*** - -### render\_xml - -Render the entire model as XML. - -#### Signature - -```python -render_xml() -> str -``` - -#### Returns - -`str` — A string containing the XML representation - -#### Source - -[`signalwire/signalwire/pom/pom.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py) - -Line 488. - -*** - -### to\_dict - -Convert the entire model to a list of dictionaries. - -#### Signature - -```python -to_dict() -> List[dict] -``` - -#### Returns - -`List[dict]` — A list of dictionaries representing the model - -#### Source - -[`signalwire/signalwire/pom/pom.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py) - -Line 439. - -*** - -### to\_json - -Convert the entire model to a JSON string. - -#### Signature - -```python -to_json() -> str -``` - -#### Returns - -`str` — A JSON string representation of the model - -#### Source - -[`signalwire/signalwire/pom/pom.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py) - -Line 419. - -*** - -### to\_yaml - -Convert the entire model to a YAML string. - -#### Signature - -```python -to_yaml() -> str -``` - -#### Returns - -`str` — A YAML string representation of the model - -#### Source - -[`signalwire/signalwire/pom/pom.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py) - -Line 428. - -## Source - -[`signalwire/signalwire/pom/pom.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py) - -Line 234. diff --git a/fern/products/sdk-reference/python/signalwire/pom/pom/section/index.mdx b/fern/products/sdk-reference/python/signalwire/pom/pom/section/index.mdx deleted file mode 100644 index a1d3780f29..0000000000 --- a/fern/products/sdk-reference/python/signalwire/pom/pom/section/index.mdx +++ /dev/null @@ -1,277 +0,0 @@ ---- -slug: "/reference/python/signalwire/pom/pom/section" -title: "Section" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.pom.pom.Section" - parent: "signalwire.pom.pom" - module: "signalwire.pom.pom" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py" ---- -# `Section` - -Represents a section in the Prompt Object Model. - -Each section contains a title, optional body text, optional bullet points, -and can have any number of nested subsections. - -## Signature - -```python -class Section -``` - -## Properties - - - A paragraph of text associated with the section. - - - - Bullet-pointed items. - - - - Whether this section should be numbered. - - - - Whether bullets should be numbered instead of using bullet points. - - - - Nested sections with the same structure. - - - - The name of the section. - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__( - title: Optional[str] = None, - *, - body: str = '', - bullets: Optional[List[str]] = None, - numbered: Optional[bool] = None, - numberedBullets: bool = False -) -``` - -#### Parameters - - - - - - - - - - - -#### Source - -[`signalwire/signalwire/pom/pom.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py) - -Line 20. - -*** - -### add\_body - -Add or replace the body text for this section. - -#### Signature - -```python -add_body(body: str) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/pom/pom.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py) - -Line 39. - -*** - -### add\_bullets - -Add bullet points to this section. - -#### Signature - -```python -add_bullets(bullets: List[str]) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/pom/pom.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py) - -Line 45. - -*** - -### add\_subsection - -Add a subsection to this section. - -#### Signature - -```python -add_subsection( - title: str, - *, - body: str = '', - bullets: Optional[List[str]] = None, - numbered: bool = False, - numberedBullets: bool = False -) -> Section -``` - -#### Parameters - - - The title of the subsection - - - - Optional body text for the subsection - - - - Optional list of bullet points - - - - Whether this section should be numbered - - - - Whether bullets should be numbered - - -#### Returns - -`Section` — The newly created Section object - -#### Throws - -- `ValueError` — If the title is None or if the section has neither a body nor bullets - -#### Source - -[`signalwire/signalwire/pom/pom.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py) - -Line 51. - -*** - -### render\_markdown - -Render this section and all its subsections as markdown. - -#### Signature - -```python -render_markdown( - level: int = 2, - section_number: Optional[List[int]] = None -) -> str -``` - -#### Parameters - - - The heading level to start with (default: 2, which corresponds to ##) - - - - The current section number for numbered sections - - -#### Returns - -`str` — A string containing the markdown representation - -#### Source - -[`signalwire/signalwire/pom/pom.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py) - -Line 103. - -*** - -### render\_xml - -Render this section and all its subsections as XML. - -#### Signature - -```python -render_xml(indent: int = 0, section_number: Optional[List[int]] = None) -> str -``` - -#### Parameters - - - The indentation level to start with (default: 0) - - - - The current section number for numbered sections - - -#### Returns - -`str` — A string containing the XML representation - -#### Source - -[`signalwire/signalwire/pom/pom.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py) - -Line 164. - -*** - -### to\_dict - -Convert the section to a dictionary representation. - -#### Signature - -```python -to_dict() -``` - -#### Source - -[`signalwire/signalwire/pom/pom.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py) - -Line 79. - -## Source - -[`signalwire/signalwire/pom/pom.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/pom/pom.py) - -Line 5. diff --git a/fern/products/sdk-reference/python/signalwire/prefabs/concierge/concierge-agent/index.mdx b/fern/products/sdk-reference/python/signalwire/prefabs/concierge/concierge-agent/index.mdx deleted file mode 100644 index 4a547a2861..0000000000 --- a/fern/products/sdk-reference/python/signalwire/prefabs/concierge/concierge-agent/index.mdx +++ /dev/null @@ -1,210 +0,0 @@ ---- -slug: "/reference/python/signalwire/prefabs/concierge/concierge-agent" -title: "ConciergeAgent" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.prefabs.concierge.ConciergeAgent" - parent: "signalwire.prefabs.concierge" - module: "signalwire.prefabs.concierge" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/concierge.py" ---- -# `ConciergeAgent` - -A prefab agent designed to act as a virtual concierge, providing information -and services to users. - -This agent will: - -1. Welcome users and explain available services -2. Answer questions about amenities, hours, and directions -3. Help with bookings and reservations -4. Provide personalized recommendations - -> \[!NOTE] -> agent = ConciergeAgent( -> venue\_name="Grand Hotel", -> services=\["room service", "spa bookings", "restaurant reservations"], -> amenities=\{ -> "pool": \{"hours": "7 AM - 10 PM", "location": "2nd Floor"\}, -> "gym": \{"hours": "24 hours", "location": "3rd Floor"\} -> \} -> ) - -## Signature - -```python -class ConciergeAgent(AgentBase) -``` - -## Inheritance - -**Extends:** [AgentBase](/docs/sdk-reference/reference/python/signalwire/core/agent-base/agent-base) - -## Properties - - - - - - - - - - - -## Methods - -### \_\_init\_\_ - -Initialize a concierge agent - -#### Signature - -```python -__init__( - venue_name: str, - services: List[str], - amenities: Dict[str, Dict[str, str]], - hours_of_operation: Optional[Dict[str, str]] = None, - special_instructions: Optional[List[str]] = None, - welcome_message: Optional[str] = None, - name: str = 'concierge', - route: str = '/concierge', - **kwargs = {} -) -``` - -#### Parameters - - - Name of the venue or business - - - - List of services offered - - - - Dictionary of amenities with details - - - - Optional dictionary of operating hours - - - - Optional list of special instructions - - - - Optional custom welcome message - - - - Agent name for the route - - - - HTTP route for this agent - - - - -#### Source - -[`signalwire/signalwire/prefabs/concierge.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/concierge.py) - -Line 45. - -*** - -### check\_availability - -Check availability for a service on a specific date and time - -This is a simulated function that would typically connect to a real booking system. -In this example, it returns a mock availability response. - -**Decorators:** `@AgentBase.tool(Any, Any, Any)` - -#### Signature - -```python -check_availability(args, raw_data) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/prefabs/concierge.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/concierge.py) - -Line 184. - -*** - -### get\_directions - -Provide directions to a specific location or amenity - -**Decorators:** `@AgentBase.tool(Any, Any, Any)` - -#### Signature - -```python -get_directions(args, raw_data) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/prefabs/concierge.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/concierge.py) - -Line 226. - -*** - -### on\_summary - -Process the interaction summary - -#### Signature - -```python -on_summary(summary, raw_data = None) -``` - -#### Parameters - - - Summary data from the conversation - - - - The complete raw POST data from the request - - -#### Source - -[`signalwire/signalwire/prefabs/concierge.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/concierge.py) - -Line 253. - -## Source - -[`signalwire/signalwire/prefabs/concierge.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/concierge.py) - -Line 23. diff --git a/fern/products/sdk-reference/python/signalwire/prefabs/concierge/index.mdx b/fern/products/sdk-reference/python/signalwire/prefabs/concierge/index.mdx deleted file mode 100644 index ca1673a89d..0000000000 --- a/fern/products/sdk-reference/python/signalwire/prefabs/concierge/index.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -slug: "/reference/python/signalwire/prefabs/concierge" -title: "concierge" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.prefabs.concierge" - parent: "signalwire.prefabs" - module: "signalwire.prefabs" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/concierge.py" ---- -# `concierge` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module concierge -``` - -## Classes - - - - A prefab agent designed to act as a virtual concierge, providing information and services to users. - - - -## Source - -[`signalwire/signalwire/prefabs/concierge.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/concierge.py) diff --git a/fern/products/sdk-reference/python/signalwire/prefabs/faq-bot/faq-bot-agent/index.mdx b/fern/products/sdk-reference/python/signalwire/prefabs/faq-bot/faq-bot-agent/index.mdx deleted file mode 100644 index 2b8d6f6c73..0000000000 --- a/fern/products/sdk-reference/python/signalwire/prefabs/faq-bot/faq-bot-agent/index.mdx +++ /dev/null @@ -1,168 +0,0 @@ ---- -slug: "/reference/python/signalwire/prefabs/faq-bot/faq-bot-agent" -title: "FAQBotAgent" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.prefabs.faq_bot.FAQBotAgent" - parent: "signalwire.prefabs.faq_bot" - module: "signalwire.prefabs.faq_bot" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/faq_bot.py" ---- -# `FAQBotAgent` - -A prefab agent designed to answer frequently asked questions based on -a provided list of question/answer pairs. - -This agent will: - -1. Match user questions against the FAQ database -2. Provide the most relevant answer -3. Suggest other relevant questions when appropriate - -> \[!NOTE] -> agent = FAQBotAgent( -> faqs=\[ -> \{ -> "question": "What is SignalWire?", -> "answer": "SignalWire is a developer-friendly cloud communications platform." -> \}, -> \{ -> "question": "How much does it cost?", -> "answer": "SignalWire offers pay-as-you-go pricing with no monthly fees." -> \} -> ] -> ) - -## Signature - -```python -class FAQBotAgent(AgentBase) -``` - -## Inheritance - -**Extends:** [AgentBase](/docs/sdk-reference/reference/python/signalwire/core/agent-base/agent-base) - -## Properties - - - - - - - -## Methods - -### \_\_init\_\_ - -Initialize an FAQ bot agent - -#### Signature - -```python -__init__( - faqs: List[Dict[str, str]], - suggest_related: bool = True, - persona: Optional[str] = None, - name: str = 'faq_bot', - route: str = '/faq', - **kwargs = {} -) -``` - -#### Parameters - - - List of FAQ items, each with: - - - - Whether to suggest related questions - - - - Optional custom personality description - - - - Agent name for the route - - - - HTTP route for this agent - - - - -#### Source - -[`signalwire/signalwire/prefabs/faq_bot.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/faq_bot.py) - -Line 47. - -*** - -### on\_summary - -Process the interaction summary - -#### Signature - -```python -on_summary(summary, raw_data = None) -``` - -#### Parameters - - - Summary data from the conversation - - - - The complete raw POST data from the request - - -#### Source - -[`signalwire/signalwire/prefabs/faq_bot.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/faq_bot.py) - -Line 287. - -*** - -### search\_faqs - -Search for FAQs matching a specific query or category - -This function helps find relevant FAQs based on a search query or category. -It returns matching FAQs in order of relevance. - -**Decorators:** `@AgentBase.tool(Any, Any, Any)` - -#### Signature - -```python -search_faqs(args, raw_data) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/prefabs/faq_bot.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/faq_bot.py) - -Line 216. - -## Source - -[`signalwire/signalwire/prefabs/faq_bot.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/faq_bot.py) - -Line 22. diff --git a/fern/products/sdk-reference/python/signalwire/prefabs/faq-bot/index.mdx b/fern/products/sdk-reference/python/signalwire/prefabs/faq-bot/index.mdx deleted file mode 100644 index 8e82944ab7..0000000000 --- a/fern/products/sdk-reference/python/signalwire/prefabs/faq-bot/index.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -slug: "/reference/python/signalwire/prefabs/faq-bot" -title: "faq_bot" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.prefabs.faq_bot" - parent: "signalwire.prefabs" - module: "signalwire.prefabs" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/faq_bot.py" ---- -# `faq_bot` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module faq_bot -``` - -## Classes - - - - A prefab agent designed to answer frequently asked questions based on a provided list of question/answer pairs. - - - -## Source - -[`signalwire/signalwire/prefabs/faq_bot.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/faq_bot.py) diff --git a/fern/products/sdk-reference/python/signalwire/prefabs/index.mdx b/fern/products/sdk-reference/python/signalwire/prefabs/index.mdx deleted file mode 100644 index c3d7c605da..0000000000 --- a/fern/products/sdk-reference/python/signalwire/prefabs/index.mdx +++ /dev/null @@ -1,60 +0,0 @@ ---- -slug: "/reference/python/signalwire/prefabs" -title: "prefabs" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.prefabs" - parent: "signalwire" - module: "signalwire" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/__init__.py" ---- -# `prefabs` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module prefabs -``` - -## Properties - - - -## Modules - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - -## Source - -[`signalwire/signalwire/prefabs/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/prefabs/info-gatherer/index.mdx b/fern/products/sdk-reference/python/signalwire/prefabs/info-gatherer/index.mdx deleted file mode 100644 index f1e909602b..0000000000 --- a/fern/products/sdk-reference/python/signalwire/prefabs/info-gatherer/index.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -slug: "/reference/python/signalwire/prefabs/info-gatherer" -title: "info_gatherer" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.prefabs.info_gatherer" - parent: "signalwire.prefabs" - module: "signalwire.prefabs" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/info_gatherer.py" ---- -# `info_gatherer` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module info_gatherer -``` - -## Classes - - - - A prefab agent designed to collect answers to a series of questions. - - - -## Source - -[`signalwire/signalwire/prefabs/info_gatherer.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/info_gatherer.py) diff --git a/fern/products/sdk-reference/python/signalwire/prefabs/info-gatherer/info-gatherer-agent/index.mdx b/fern/products/sdk-reference/python/signalwire/prefabs/info-gatherer/info-gatherer-agent/index.mdx deleted file mode 100644 index b2408f17a3..0000000000 --- a/fern/products/sdk-reference/python/signalwire/prefabs/info-gatherer/info-gatherer-agent/index.mdx +++ /dev/null @@ -1,222 +0,0 @@ ---- -slug: "/reference/python/signalwire/prefabs/info-gatherer/info-gatherer-agent" -title: "InfoGathererAgent" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.prefabs.info_gatherer.InfoGathererAgent" - parent: "signalwire.prefabs.info_gatherer" - module: "signalwire.prefabs.info_gatherer" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/info_gatherer.py" ---- -# `InfoGathererAgent` - -A prefab agent designed to collect answers to a series of questions. - -This agent will: - -1. Ask if the user is ready to begin -2. Ask each question in sequence -3. Store the answers for later use - -> \[!NOTE] -> agent = InfoGathererAgent( -> questions=\[ -> \{"key\_name": "full\_name", "question\_text": "What is your full name?"\}, -> \{"key\_name": "email", "question\_text": "What is your email address?", "confirm": True\}, -> \{"key\_name": "reason", "question\_text": "How can I help you today?"\} -> ] -> ) - -## Signature - -```python -class InfoGathererAgent(AgentBase) -``` - -## Inheritance - -**Extends:** [AgentBase](/docs/sdk-reference/reference/python/signalwire/core/agent-base/agent-base) - -## Methods - -### \_\_init\_\_ - -Initialize an information gathering agent - -#### Signature - -```python -__init__( - questions: Optional[List[Dict[str, str]]] = None, - name: str = 'info_gatherer', - route: str = '/info_gatherer', - **kwargs = {} -) -``` - -#### Parameters - - - Optional list of questions to ask. If None, questions will be determined dynamically via a callback function. Each question dict should have: - - - - Agent name for the route - - - - HTTP route for this agent - - - - -#### Source - -[`signalwire/signalwire/prefabs/info_gatherer.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/info_gatherer.py) - -Line 43. - -*** - -### on\_swml\_request - -Handle dynamic configuration using the callback function - -This method is called when SWML is requested and allows us to configure -the agent just-in-time using the provided callback. - -#### Signature - -```python -on_swml_request(request_data = None, callback_path = None, request = None) -``` - -#### Parameters - - - - - - - -#### Source - -[`signalwire/signalwire/prefabs/info_gatherer.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/info_gatherer.py) - -Line 158. - -*** - -### set\_question\_callback - -Set a callback function for dynamic question configuration - -> \[!NOTE] -> def my\_question\_callback(query\_params, body\_params, headers): -> question\_set = query\_params.get('set', 'default') -> if question\_set == 'support': -> return \[ -> \{"key\_name": "name", "question\_text": "What is your name?"\}, -> \{"key\_name": "issue", "question\_text": "What's the issue?"\} -> ] -> else: -> return \[\{"key\_name": "name", "question\_text": "What is your name?"\}] -> -> agent.set\_question\_callback(my\_question\_callback) - -#### Signature - -```python -set_question_callback( - callback: Callable[dict, dict, dict, List[Dict[str, str]]] -) -``` - -#### Parameters - - - Function that takes (query\_params, body\_params, headers) and returns a list of question dictionaries. Each question dict should have: - key\_name: Identifier for storing the answer - question\_text: The actual question to ask the user - confirm: (Optional) If True, agent will confirm answer before submitting - - -#### Examples - -```python -agent.set_question_callback(my_question_callback) -``` - -#### Source - -[`signalwire/signalwire/prefabs/info_gatherer.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/info_gatherer.py) - -Line 93. - -*** - -### start\_questions - -Start the question sequence by retrieving the first question - -This function gets the current question index from global\_data -and returns the corresponding question. - -**Decorators:** `@AgentBase.tool(Any, Any, Any)` - -#### Signature - -```python -start_questions(args, raw_data) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/prefabs/info_gatherer.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/info_gatherer.py) - -Line 258. - -*** - -### submit\_answer - -Submit an answer to the current question and move to the next one - -This function: - -1. Stores the answer in global\_data -2. Increments the question index -3. Returns the next question or completion message - -**Decorators:** `@AgentBase.tool(Any, Any, Any)` - -#### Signature - -```python -submit_answer(args, raw_data) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/prefabs/info_gatherer.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/info_gatherer.py) - -Line 296. - -## Source - -[`signalwire/signalwire/prefabs/info_gatherer.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/info_gatherer.py) - -Line 24. diff --git a/fern/products/sdk-reference/python/signalwire/prefabs/receptionist/index.mdx b/fern/products/sdk-reference/python/signalwire/prefabs/receptionist/index.mdx deleted file mode 100644 index f5634b7370..0000000000 --- a/fern/products/sdk-reference/python/signalwire/prefabs/receptionist/index.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -slug: "/reference/python/signalwire/prefabs/receptionist" -title: "receptionist" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.prefabs.receptionist" - parent: "signalwire.prefabs" - module: "signalwire.prefabs" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/receptionist.py" ---- -# `receptionist` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module receptionist -``` - -## Classes - - - - A prefab agent designed to act as a receptionist that: 1. Greets callers 2. Collects basic information about their needs 3. Transfers them to the appropriate department - - - -## Source - -[`signalwire/signalwire/prefabs/receptionist.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/receptionist.py) diff --git a/fern/products/sdk-reference/python/signalwire/prefabs/receptionist/receptionist-agent/index.mdx b/fern/products/sdk-reference/python/signalwire/prefabs/receptionist/receptionist-agent/index.mdx deleted file mode 100644 index 37b4d88c95..0000000000 --- a/fern/products/sdk-reference/python/signalwire/prefabs/receptionist/receptionist-agent/index.mdx +++ /dev/null @@ -1,122 +0,0 @@ ---- -slug: "/reference/python/signalwire/prefabs/receptionist/receptionist-agent" -title: "ReceptionistAgent" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.prefabs.receptionist.ReceptionistAgent" - parent: "signalwire.prefabs.receptionist" - module: "signalwire.prefabs.receptionist" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/receptionist.py" ---- -# `ReceptionistAgent` - -A prefab agent designed to act as a receptionist that: - -1. Greets callers -2. Collects basic information about their needs -3. Transfers them to the appropriate department - -> \[!NOTE] -> agent = ReceptionistAgent( -> departments=\[ -> \{"name": "sales", "description": "For product inquiries, pricing, and purchasing", "number": "+15551235555"\}, -> \{"name": "support", "description": "For technical help and troubleshooting", "number": "+15551236666"\} -> ] -> ) - -## Signature - -```python -class ReceptionistAgent(AgentBase) -``` - -## Inheritance - -**Extends:** [AgentBase](/docs/sdk-reference/reference/python/signalwire/core/agent-base/agent-base) - -## Methods - -### \_\_init\_\_ - -Initialize a receptionist agent - -#### Signature - -```python -__init__( - departments: List[Dict[str, str]], - name: str = 'receptionist', - route: str = '/receptionist', - greeting: str = 'Thank you for calling. How can I help you today?', - voice: str = 'rime.spore', - **kwargs = {} -) -``` - -#### Parameters - - - List of departments to transfer to, each with: - - - - Agent name for the route - - - - HTTP route for this agent - - - - Initial greeting message - - - - Voice ID to use - - - - -#### Source - -[`signalwire/signalwire/prefabs/receptionist.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/receptionist.py) - -Line 37. - -*** - -### on\_summary - -Process the conversation summary - -#### Signature - -```python -on_summary(summary, raw_data = None) -``` - -#### Parameters - - - Summary data from the conversation - - - - The complete raw POST data from the request - - -#### Source - -[`signalwire/signalwire/prefabs/receptionist.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/receptionist.py) - -Line 278. - -## Source - -[`signalwire/signalwire/prefabs/receptionist.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/receptionist.py) - -Line 21. diff --git a/fern/products/sdk-reference/python/signalwire/prefabs/survey/index.mdx b/fern/products/sdk-reference/python/signalwire/prefabs/survey/index.mdx deleted file mode 100644 index 58cb90509f..0000000000 --- a/fern/products/sdk-reference/python/signalwire/prefabs/survey/index.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -slug: "/reference/python/signalwire/prefabs/survey" -title: "survey" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.prefabs.survey" - parent: "signalwire.prefabs" - module: "signalwire.prefabs" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/survey.py" ---- -# `survey` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module survey -``` - -## Classes - - - - A prefab agent designed to conduct automated surveys with users. - - - -## Source - -[`signalwire/signalwire/prefabs/survey.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/survey.py) diff --git a/fern/products/sdk-reference/python/signalwire/prefabs/survey/survey-agent/index.mdx b/fern/products/sdk-reference/python/signalwire/prefabs/survey/survey-agent/index.mdx deleted file mode 100644 index 234f315adf..0000000000 --- a/fern/products/sdk-reference/python/signalwire/prefabs/survey/survey-agent/index.mdx +++ /dev/null @@ -1,225 +0,0 @@ ---- -slug: "/reference/python/signalwire/prefabs/survey/survey-agent" -title: "SurveyAgent" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.prefabs.survey.SurveyAgent" - parent: "signalwire.prefabs.survey" - module: "signalwire.prefabs.survey" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/survey.py" ---- -# `SurveyAgent` - -A prefab agent designed to conduct automated surveys with users. - -This agent will: - -1. Introduce the survey purpose and structure -2. Ask predefined questions in sequence -3. Collect and validate responses -4. Provide a summary of collected responses - -> \[!NOTE] -> agent = SurveyAgent( -> survey\_name="Customer Satisfaction Survey", -> introduction="We'd like to get your feedback on your recent experience.", -> questions=\[ -> \{ -> "id": "satisfaction", -> "text": "How satisfied were you with our service?", -> "type": "rating", -> "scale": 5, -> "required": True -> \}, -> \{ -> "id": "comments", -> "text": "Do you have any additional comments?", -> "type": "open\_ended", -> "required": False -> \} -> ] -> ) - -## Signature - -```python -class SurveyAgent(AgentBase) -``` - -## Inheritance - -**Extends:** [AgentBase](/docs/sdk-reference/reference/python/signalwire/core/agent-base/agent-base) - -## Properties - - - - - - - - - - - - - -## Methods - -### \_\_init\_\_ - -Initialize a survey agent - -#### Signature - -```python -__init__( - survey_name: str, - questions: List[Dict[str, Any]], - introduction: Optional[str] = None, - conclusion: Optional[str] = None, - brand_name: Optional[str] = None, - max_retries: int = 2, - name: str = 'survey', - route: str = '/survey', - **kwargs = {} -) -``` - -#### Parameters - - - Name of the survey - - - - List of question objects with the following keys: - - - - Optional custom introduction message - - - - Optional custom conclusion message - - - - Optional brand or company name - - - - Maximum number of times to retry invalid answers - - - - Name for the agent (default: "survey") - - - - HTTP route for the agent (default: "/survey") - - - - -#### Source - -[`signalwire/signalwire/prefabs/survey.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/survey.py) - -Line 55. - -*** - -### log\_response - -Log a validated response to a survey question - -This function would typically connect to a database or API to store the response. -In this example, it just acknowledges that the response was received. - -**Decorators:** `@AgentBase.tool(Any, Any, Any)` - -#### Signature - -```python -log_response(args, raw_data) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/prefabs/survey.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/survey.py) - -Line 314. - -*** - -### on\_summary - -Process the survey results summary - -#### Signature - -```python -on_summary(summary, raw_data = None) -``` - -#### Parameters - - - Summary data containing survey responses - - - - The complete raw POST data from the request - - -#### Source - -[`signalwire/signalwire/prefabs/survey.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/survey.py) - -Line 351. - -*** - -### validate\_response - -Validate if a response meets the requirements for a specific question - -This function checks if a user's response is valid for the specified question -based on the question type and constraints. - -**Decorators:** `@AgentBase.tool(Any, Any, Any)` - -#### Signature - -```python -validate_response(args, raw_data) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/prefabs/survey.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/survey.py) - -Line 246. - -## Source - -[`signalwire/signalwire/prefabs/survey.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/survey.py) - -Line 23. diff --git a/fern/products/sdk-reference/python/signalwire/relay/call/action/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/call/action/index.mdx deleted file mode 100644 index f782e5c414..0000000000 --- a/fern/products/sdk-reference/python/signalwire/relay/call/action/index.mdx +++ /dev/null @@ -1,103 +0,0 @@ ---- -slug: "/reference/python/signalwire/relay/call/action" -title: "Action" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.relay.call.Action" - parent: "signalwire.relay.call" - module: "signalwire.relay.call" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py" ---- -# `Action` - -Base class for async action handles (play, record, detect, etc.). - -Holds a control\_id and back-reference to the Call. Resolves when the -server sends a terminal event for this control\_id. - -## Signature - -```python -class Action -``` - -## Properties - - - - - - - - - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__( - call: 'Call', - control_id: str, - terminal_event: str, - terminal_states: tuple[str, ...] -) -``` - -#### Parameters - - - - - - - - - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 54. - -*** - -### wait - -Wait for the action to complete. Returns the terminal event. - -**Modifiers:** `async` - -#### Signature - -```python -async wait(timeout: Optional[float] = None) -> RelayEvent -``` - -#### Parameters - - - -#### Returns - -`RelayEvent` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 84. - -## Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 47. diff --git a/fern/products/sdk-reference/python/signalwire/relay/call/ai-action/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/call/ai-action/index.mdx deleted file mode 100644 index 709a0c459f..0000000000 --- a/fern/products/sdk-reference/python/signalwire/relay/call/ai-action/index.mdx +++ /dev/null @@ -1,77 +0,0 @@ ---- -slug: "/reference/python/signalwire/relay/call/ai-action" -title: "AIAction" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.relay.call.AIAction" - parent: "signalwire.relay.call" - module: "signalwire.relay.call" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py" ---- -# `AIAction` - -Handle for an active AI agent session. - -## Signature - -```python -class AIAction(Action) -``` - -## Inheritance - -**Extends:** [Action](/docs/sdk-reference/reference/python/signalwire/relay/call/action) - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(call: 'Call', control_id: str) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 273. - -*** - -### stop - -**Modifiers:** `async` - -#### Signature - -```python -async stop() -> dict -``` - -#### Returns - -`dict` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 280. - -## Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 270. diff --git a/fern/products/sdk-reference/python/signalwire/relay/call/collect-action/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/call/collect-action/index.mdx deleted file mode 100644 index 609e63acf0..0000000000 --- a/fern/products/sdk-reference/python/signalwire/relay/call/collect-action/index.mdx +++ /dev/null @@ -1,127 +0,0 @@ ---- -slug: "/reference/python/signalwire/relay/call/collect-action" -title: "CollectAction" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.relay.call.CollectAction" - parent: "signalwire.relay.call" - module: "signalwire.relay.call" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py" ---- -# `CollectAction` - -Handle for play\_and\_collect or standalone collect. - -## Signature - -```python -class CollectAction(Action) -``` - -## Inheritance - -**Extends:** [Action](/docs/sdk-reference/reference/python/signalwire/relay/call/action) - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(call: 'Call', control_id: str) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 158. - -*** - -### start\_input\_timers - -Start the initial\_timeout timer on an active collect. - -**Modifiers:** `async` - -#### Signature - -```python -async start_input_timers() -> dict -``` - -#### Returns - -`dict` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 182. - -*** - -### stop - -**Modifiers:** `async` - -#### Signature - -```python -async stop() -> dict -``` - -#### Returns - -`dict` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 173. - -*** - -### volume - -**Modifiers:** `async` - -#### Signature - -```python -async volume(volume: float) -> dict -``` - -#### Parameters - - - -#### Returns - -`dict` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 177. - -## Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 155. diff --git a/fern/products/sdk-reference/python/signalwire/relay/call/detect-action/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/call/detect-action/index.mdx deleted file mode 100644 index e185301c9f..0000000000 --- a/fern/products/sdk-reference/python/signalwire/relay/call/detect-action/index.mdx +++ /dev/null @@ -1,77 +0,0 @@ ---- -slug: "/reference/python/signalwire/relay/call/detect-action" -title: "DetectAction" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.relay.call.DetectAction" - parent: "signalwire.relay.call" - module: "signalwire.relay.call" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py" ---- -# `DetectAction` - -Handle for an active detect operation. - -## Signature - -```python -class DetectAction(Action) -``` - -## Inheritance - -**Extends:** [Action](/docs/sdk-reference/reference/python/signalwire/relay/call/action) - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(call: 'Call', control_id: str) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 140. - -*** - -### stop - -**Modifiers:** `async` - -#### Signature - -```python -async stop() -> dict -``` - -#### Returns - -`dict` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 151. - -## Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 137. diff --git a/fern/products/sdk-reference/python/signalwire/relay/call/fax-action/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/call/fax-action/index.mdx deleted file mode 100644 index e970868448..0000000000 --- a/fern/products/sdk-reference/python/signalwire/relay/call/fax-action/index.mdx +++ /dev/null @@ -1,79 +0,0 @@ ---- -slug: "/reference/python/signalwire/relay/call/fax-action" -title: "FaxAction" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.relay.call.FaxAction" - parent: "signalwire.relay.call" - module: "signalwire.relay.call" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py" ---- -# `FaxAction` - -Handle for an active send\_fax or receive\_fax operation. - -## Signature - -```python -class FaxAction(Action) -``` - -## Inheritance - -**Extends:** [Action](/docs/sdk-reference/reference/python/signalwire/relay/call/action) - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(call: 'Call', control_id: str, method_prefix: str) -``` - -#### Parameters - - - - - - - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 216. - -*** - -### stop - -**Modifiers:** `async` - -#### Signature - -```python -async stop() -> dict -``` - -#### Returns - -`dict` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 221. - -## Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 213. diff --git a/fern/products/sdk-reference/python/signalwire/relay/call/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/call/index.mdx deleted file mode 100644 index bd3f92a2ad..0000000000 --- a/fern/products/sdk-reference/python/signalwire/relay/call/index.mdx +++ /dev/null @@ -1,2344 +0,0 @@ ---- -slug: "/reference/python/signalwire/relay/call" -title: "call" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.relay.call" - parent: "signalwire.relay" - module: "signalwire.relay" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py" ---- -# `call` - -Represents a live RELAY call. - -Created by RelayClient on inbound `calling.call.receive` events or -outbound `dial`/`begin` responses. - -## Signature - -```python -class Call -``` - -## Properties - - - - - - - - - - - - - - - - - - - - - - - -## Classes - - - - Base class for async action handles (play, record, detect, etc.). - - - - Handle for an active AI agent session. - - - - Handle for play\_and\_collect or standalone collect. - - - - Handle for an active detect operation. - - - - Handle for an active send\_fax or receive\_fax operation. - - - - Handle for an active pay operation. - - - - Handle for an active play operation. - - - - Handle for an active record operation. - - - - Handle for standalone calling.collect (without play). - - - - Handle for an active stream operation. - - - - Handle for an active tap operation. - - - - Handle for an active transcribe operation. - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__( - client: 'RelayClient', - call_id: str, - node_id: str, - project_id: str, - context: str, - *, - tag: str = '', - direction: str = '', - device: Optional[dict[str, Any]] = None, - state: str = '', - segment_id: str = '' -) -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 295. - -*** - -### \_\_repr\_\_ - -#### Signature - -```python -__repr__() -> str -``` - -#### Returns - -`str` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 1527. - -*** - -### ai - -Start an AI agent session on the call. Returns an AIAction. - -**Modifiers:** `async` - -#### Signature - -```python -async ai( - *, - control_id: Optional[str] = None, - agent: Optional[str] = None, - prompt: Optional[dict[str, Any]] = None, - post_prompt: Optional[dict[str, Any]] = None, - post_prompt_url: Optional[str] = None, - post_prompt_auth_user: Optional[str] = None, - post_prompt_auth_password: Optional[str] = None, - global_data: Optional[dict[str, Any]] = None, - pronounce: Optional[list[dict[str, Any]]] = None, - hints: Optional[list[str]] = None, - languages: Optional[list[dict[str, Any]]] = None, - SWAIG: Optional[dict[str, Any]] = None, - ai_params: Optional[dict[str, Any]] = None, - on_completed: Optional[Callable[RelayEvent, Any]] = None, - **kwargs: Any = {} -) -> AIAction -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -#### Returns - -`AIAction` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 1332. - -*** - -### ai\_hold - -Put an AI agent session on hold. - -**Modifiers:** `async` - -#### Signature - -```python -async ai_hold( - *, - timeout: Optional[str] = None, - prompt: Optional[str] = None, - **kwargs: Any = {} -) -> dict -``` - -#### Parameters - - - - - - - -#### Returns - -`dict` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 1432. - -*** - -### ai\_message - -Send a message to an active AI agent session. - -**Modifiers:** `async` - -#### Signature - -```python -async ai_message( - *, - message_text: Optional[str] = None, - role: Optional[str] = None, - reset: Optional[dict[str, Any]] = None, - global_data: Optional[dict[str, Any]] = None, - **kwargs: Any = {} -) -> dict -``` - -#### Parameters - - - - - - - - - - - -#### Returns - -`dict` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 1410. - -*** - -### ai\_unhold - -Resume an AI agent session from hold. - -**Modifiers:** `async` - -#### Signature - -```python -async ai_unhold(*, prompt: Optional[str] = None, **kwargs: Any = {}) -> dict -``` - -#### Parameters - - - - - -#### Returns - -`dict` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 1448. - -*** - -### amazon\_bedrock - -Connect to an Amazon Bedrock AI agent. - -**Modifiers:** `async` - -#### Signature - -```python -async amazon_bedrock( - *, - prompt: Optional[Any] = None, - SWAIG: Optional[dict[str, Any]] = None, - ai_params: Optional[dict[str, Any]] = None, - global_data: Optional[dict[str, Any]] = None, - post_prompt: Optional[dict[str, Any]] = None, - post_prompt_url: Optional[str] = None, - **kwargs: Any = {} -) -> dict -``` - -#### Parameters - - - - - - - - - - - - - - - -#### Returns - -`dict` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 1382. - -*** - -### answer - -Answer an inbound call. - -**Modifiers:** `async` - -#### Signature - -```python -async answer(**kwargs: Any = {}) -> dict -``` - -#### Parameters - - - -#### Returns - -`dict` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 482. - -*** - -### bind\_digit - -Bind a DTMF digit sequence to trigger a RELAY method. - -**Modifiers:** `async` - -#### Signature - -```python -async bind_digit( - digits: str, - bind_method: str, - *, - bind_params: Optional[dict[str, Any]] = None, - realm: Optional[str] = None, - max_triggers: Optional[int] = None, - **kwargs: Any = {} -) -> dict -``` - -#### Parameters - - - - - - - - - - - - - -#### Returns - -`dict` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 1241. - -*** - -### clear\_digit\_bindings - -Clear all digit bindings, optionally filtered by realm. - -**Modifiers:** `async` - -#### Signature - -```python -async clear_digit_bindings( - *, - realm: Optional[str] = None, - **kwargs: Any = {} -) -> dict -``` - -#### Parameters - - - - - -#### Returns - -`dict` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 1265. - -*** - -### collect - -Collect digit/speech input without playing media. - -**Modifiers:** `async` - -#### Signature - -```python -async collect( - *, - digits: Optional[dict[str, Any]] = None, - speech: Optional[dict[str, Any]] = None, - initial_timeout: Optional[float] = None, - partial_results: Optional[bool] = None, - continuous: Optional[bool] = None, - send_start_of_input: Optional[bool] = None, - start_input_timers: Optional[bool] = None, - control_id: Optional[str] = None, - on_completed: Optional[Callable[RelayEvent, Any]] = None, - **kwargs: Any = {} -) -> StandaloneCollectAction -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - - -#### Returns - -`StandaloneCollectAction` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 779. - -*** - -### connect - -Bridge the call to one or more destinations. - -**Modifiers:** `async` - -#### Signature - -```python -async connect( - devices: list[list[dict[str, Any]]], - *, - ringback: Optional[list[dict[str, Any]]] = None, - tag: Optional[str] = None, - max_duration: Optional[int] = None, - max_price_per_minute: Optional[float] = None, - status_url: Optional[str] = None, - **kwargs: Any = {} -) -> dict -``` - -#### Parameters - - - - - - - - - - - - - - - -#### Returns - -`dict` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 818. - -*** - -### denoise - -Start noise reduction on the call. - -**Modifiers:** `async` - -#### Signature - -```python -async denoise() -> dict -``` - -#### Returns - -`dict` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 1188. - -*** - -### denoise\_stop - -Stop noise reduction on the call. - -**Modifiers:** `async` - -#### Signature - -```python -async denoise_stop() -> dict -``` - -#### Returns - -`dict` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 1192. - -*** - -### detect - -Start audio detection (machine, fax, digit). Returns a DetectAction. - -**Modifiers:** `async` - -#### Signature - -```python -async detect( - detect: dict[str, Any], - *, - timeout: Optional[float] = None, - control_id: Optional[str] = None, - on_completed: Optional[Callable[RelayEvent, Any]] = None, - **kwargs: Any = {} -) -> DetectAction -``` - -#### Parameters - - - - - - - - - - - -#### Returns - -`DetectAction` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 868. - -*** - -### detect\_answering\_machine - -Detect human vs answering machine (AMD). Typed convenience over :meth:`detect`. - -**Modifiers:** `async` - -#### Signature - -```python -async detect_answering_machine( - *, - initial_timeout: Optional[float] = None, - end_silence_timeout: Optional[float] = None, - machine_voice_threshold: Optional[float] = None, - machine_words_threshold: Optional[int] = None, - detect_interruptions: Optional[bool] = None, - detect_message_end: Optional[bool] = None, - timeout: Optional[float] = None, - on_completed: Optional[Callable[RelayEvent, Any]] = None -) -> DetectAction -``` - -#### Parameters - - - - - - - - - - - - - - - - - -#### Returns - -`DetectAction` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 609. - -*** - -### detect\_digit - -Detect DTMF digits. Typed convenience over :meth:`detect`. - -**Modifiers:** `async` - -#### Signature - -```python -async detect_digit( - *, - digits: Optional[str] = None, - timeout: Optional[float] = None, - on_completed: Optional[Callable[RelayEvent, Any]] = None -) -> DetectAction -``` - -#### Parameters - - - - - - - -#### Returns - -`DetectAction` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 594. - -*** - -### detect\_fax - -Detect a fax tone (CED/CNG). Typed convenience over :meth:`detect`. - -**Modifiers:** `async` - -#### Signature - -```python -async detect_fax( - *, - tone: Optional[str] = None, - timeout: Optional[float] = None, - on_completed: Optional[Callable[RelayEvent, Any]] = None -) -> DetectAction -``` - -#### Parameters - - - - - - - -#### Returns - -`DetectAction` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 637. - -*** - -### disconnect - -Disconnect (unbridge) a connected call. - -**Modifiers:** `async` - -#### Signature - -```python -async disconnect() -> dict -``` - -#### Returns - -`dict` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 844. - -*** - -### echo - -Echo audio back to the caller (useful for testing). - -**Modifiers:** `async` - -#### Signature - -```python -async echo( - *, - timeout: Optional[float] = None, - status_url: Optional[str] = None, - **kwargs: Any = {} -) -> dict -``` - -#### Parameters - - - - - - - -#### Returns - -`dict` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 1221. - -*** - -### hangup - -End/hang up the call. - -**Modifiers:** `async` - -#### Signature - -```python -async hangup(reason: str = 'hangup') -> dict -``` - -#### Parameters - - - -#### Returns - -`dict` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 486. - -*** - -### hold - -Put the call on hold. - -**Modifiers:** `async` - -#### Signature - -```python -async hold() -> dict -``` - -#### Returns - -`dict` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 1176. - -*** - -### join\_conference - -Join an ad-hoc audio conference. - -**Modifiers:** `async` - -#### Signature - -```python -async join_conference( - name: str, - *, - muted: Optional[bool] = None, - beep: Optional[str] = None, - start_on_enter: Optional[bool] = None, - end_on_exit: Optional[bool] = None, - wait_url: Optional[str] = None, - max_participants: Optional[int] = None, - record: Optional[str] = None, - region: Optional[str] = None, - trim: Optional[str] = None, - coach: Optional[str] = None, - status_callback: Optional[str] = None, - status_callback_event: Optional[str] = None, - status_callback_event_type: Optional[str] = None, - status_callback_method: Optional[str] = None, - recording_status_callback: Optional[str] = None, - recording_status_callback_event: Optional[str] = None, - recording_status_callback_event_type: Optional[str] = None, - recording_status_callback_method: Optional[str] = None, - stream_obj: Optional[dict[str, Any]] = None, - **kwargs: Any = {} -) -> dict -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -#### Returns - -`dict` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 1098. - -*** - -### join\_room - -Join a video/audio room. - -**Modifiers:** `async` - -#### Signature - -```python -async join_room( - name: str, - *, - status_url: Optional[str] = None, - **kwargs: Any = {} -) -> dict -``` - -#### Parameters - - - - - - - -#### Returns - -`dict` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 1310. - -*** - -### leave\_conference - -Leave an audio conference. - -**Modifiers:** `async` - -#### Signature - -```python -async leave_conference(conference_id: str, **kwargs: Any = {}) -> dict -``` - -#### Parameters - - - - - -#### Returns - -`dict` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 1166. - -*** - -### leave\_room - -Leave the current room. - -**Modifiers:** `async` - -#### Signature - -```python -async leave_room(**kwargs: Any = {}) -> dict -``` - -#### Parameters - - - -#### Returns - -`dict` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 1324. - -*** - -### live\_transcribe - -Start or stop live transcription on the call. - -**Modifiers:** `async` - -#### Signature - -```python -async live_transcribe(action: dict[str, Any], **kwargs: Any = {}) -> dict -``` - -#### Parameters - - - - - -#### Returns - -`dict` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 1282. - -*** - -### live\_translate - -Start or stop live translation on the call. - -**Modifiers:** `async` - -#### Signature - -```python -async live_translate( - action: dict[str, Any], - *, - status_url: Optional[str] = None, - **kwargs: Any = {} -) -> dict -``` - -#### Parameters - - - - - - - -#### Returns - -`dict` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 1292. - -*** - -### on - -Register an event listener for this call. - -#### Signature - -```python -on(event_type: str, handler: EventHandler) -> None -``` - -#### Parameters - - - - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 361. - -*** - -### pass\_ - -Decline control of an inbound call, returning it to routing. - -**Modifiers:** `async` - -#### Signature - -```python -async pass_() -> dict -``` - -#### Returns - -`dict` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 490. - -*** - -### pay - -Start a payment collection. Returns a PayAction. - -**Modifiers:** `async` - -#### Signature - -```python -async pay( - payment_connector_url: str, - *, - control_id: Optional[str] = None, - input_method: Optional[str] = None, - status_url: Optional[str] = None, - payment_method: Optional[str] = None, - timeout: Optional[str] = None, - max_attempts: Optional[str] = None, - security_code: Optional[str] = None, - postal_code: Optional[str] = None, - min_postal_code_length: Optional[str] = None, - token_type: Optional[str] = None, - charge_amount: Optional[str] = None, - currency: Optional[str] = None, - language: Optional[str] = None, - voice: Optional[str] = None, - description: Optional[str] = None, - valid_card_types: Optional[str] = None, - parameters: Optional[list[dict[str, Any]]] = None, - prompts: Optional[list[dict[str, Any]]] = None, - on_completed: Optional[Callable[RelayEvent, Any]] = None, - **kwargs: Any = {} -) -> PayAction -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -#### Returns - -`PayAction` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 908. - -*** - -### play - -Play audio content. Returns a PlayAction for stop/pause/resume/wait. - -**Modifiers:** `async` - -#### Signature - -```python -async play( - media: list[dict[str, Any]], - *, - volume: Optional[float] = None, - direction: Optional[str] = None, - loop: Optional[int] = None, - control_id: Optional[str] = None, - on_completed: Optional[Callable[RelayEvent, Any]] = None, - **kwargs: Any = {} -) -> PlayAction -``` - -#### Parameters - - - - - - - - - - - - - - - -#### Returns - -`PlayAction` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 498. - -*** - -### play\_and\_collect - -Play audio and collect digit/speech input. - -**Modifiers:** `async` - -#### Signature - -```python -async play_and_collect( - media: list[dict[str, Any]], - collect: dict[str, Any], - *, - volume: Optional[float] = None, - control_id: Optional[str] = None, - on_completed: Optional[Callable[RelayEvent, Any]] = None, - **kwargs: Any = {} -) -> CollectAction -``` - -#### Parameters - - - - - - - - - - - - - -#### Returns - -`CollectAction` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 756. - -*** - -### play\_audio - -Play an audio file from a URL. Typed convenience over :meth:`play`. - -**Modifiers:** `async` - -#### Signature - -```python -async play_audio( - url: str, - *, - volume: Optional[float] = None, - on_completed: Optional[Callable[RelayEvent, Any]] = None -) -> PlayAction -``` - -#### Parameters - - - - - - - -#### Returns - -`PlayAction` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 548. - -*** - -### play\_ringtone - -Play a named ringtone by country code. Typed convenience over :meth:`play`. - -**Modifiers:** `async` - -#### Signature - -```python -async play_ringtone( - name: str, - *, - duration: Optional[float] = None, - volume: Optional[float] = None, - on_completed: Optional[Callable[RelayEvent, Any]] = None -) -> PlayAction -``` - -#### Parameters - - - - - - - - - -#### Returns - -`PlayAction` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 574. - -*** - -### play\_silence - -Play silence for `duration` seconds. Typed convenience over :meth:`play`. - -**Modifiers:** `async` - -#### Signature - -```python -async play_silence( - duration: float, - *, - on_completed: Optional[Callable[RelayEvent, Any]] = None -) -> PlayAction -``` - -#### Parameters - - - - - -#### Returns - -`PlayAction` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 562. - -*** - -### play\_tts - -Play text-to-speech. Typed convenience over :meth:`play`. - -Restores the legacy `call.play_tts(text=...)` ergonomics so callers -don't hand-build the `{"type": "tts", "params": {...}}` media shape. - -**Modifiers:** `async` - -#### Signature - -```python -async play_tts( - text: str, - *, - language: Optional[str] = None, - gender: Optional[str] = None, - voice: Optional[str] = None, - volume: Optional[float] = None, - on_completed: Optional[Callable[RelayEvent, Any]] = None -) -> PlayAction -``` - -#### Parameters - - - - - - - - - - - - - -#### Returns - -`PlayAction` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 522. - -*** - -### prompt\_audio - -Play an audio file then collect input. Typed media over :meth:`play_and_collect`. - -**Modifiers:** `async` - -#### Signature - -```python -async prompt_audio( - url: str, - collect: dict[str, Any], - *, - volume: Optional[float] = None, - on_completed: Optional[Callable[RelayEvent, Any]] = None -) -> CollectAction -``` - -#### Parameters - - - - - - - - - -#### Returns - -`CollectAction` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 679. - -*** - -### prompt\_tts - -Play TTS then collect input. Typed media over :meth:`play_and_collect`. - -**Modifiers:** `async` - -#### Signature - -```python -async prompt_tts( - text: str, - collect: dict[str, Any], - *, - language: Optional[str] = None, - gender: Optional[str] = None, - voice: Optional[str] = None, - volume: Optional[float] = None, - on_completed: Optional[Callable[RelayEvent, Any]] = None -) -> CollectAction -``` - -#### Parameters - - - - - - - - - - - - - - - -#### Returns - -`CollectAction` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 656. - -*** - -### queue\_enter - -Place the call in a queue. - -**Modifiers:** `async` - -#### Signature - -```python -async queue_enter( - queue_name: str, - *, - control_id: Optional[str] = None, - status_url: Optional[str] = None, - **kwargs: Any = {} -) -> dict -``` - -#### Parameters - - - - - - - - - -#### Returns - -`dict` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 1482. - -*** - -### queue\_leave - -Remove the call from a queue. - -**Modifiers:** `async` - -#### Signature - -```python -async queue_leave( - queue_name: str, - *, - control_id: Optional[str] = None, - queue_id: Optional[str] = None, - status_url: Optional[str] = None, - **kwargs: Any = {} -) -> dict -``` - -#### Parameters - - - - - - - - - - - -#### Returns - -`dict` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 1501. - -*** - -### receive\_fax - -Receive a fax. Returns a FaxAction. - -**Modifiers:** `async` - -#### Signature - -```python -async receive_fax( - *, - control_id: Optional[str] = None, - on_completed: Optional[Callable[RelayEvent, Any]] = None, - **kwargs: Any = {} -) -> FaxAction -``` - -#### Parameters - - - - - - - -#### Returns - -`FaxAction` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 1002. - -*** - -### record - -Record audio from the call. Returns a RecordAction. - -**Modifiers:** `async` - -#### Signature - -```python -async record( - audio: Optional[dict[str, Any]] = None, - *, - control_id: Optional[str] = None, - on_completed: Optional[Callable[RelayEvent, Any]] = None, - **kwargs: Any = {} -) -> RecordAction -``` - -#### Parameters - - - - - - - - - -#### Returns - -`RecordAction` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 736. - -*** - -### refer - -Transfer a SIP call to an external SIP endpoint via REFER. - -**Modifiers:** `async` - -#### Signature - -```python -async refer( - device: dict[str, Any], - *, - status_url: Optional[str] = None, - **kwargs: Any = {} -) -> dict -``` - -#### Parameters - - - - - - - -#### Returns - -`dict` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 890. - -*** - -### send\_digits - -Send DTMF digits on the call. - -**Modifiers:** `async` - -#### Signature - -```python -async send_digits(digits: str, *, control_id: Optional[str] = None) -> dict -``` - -#### Parameters - - - - - -#### Returns - -`dict` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 852. - -*** - -### send\_fax - -Send a fax document. Returns a FaxAction. - -**Modifiers:** `async` - -#### Signature - -```python -async send_fax( - document: str, - *, - identity: Optional[str] = None, - header_info: Optional[str] = None, - control_id: Optional[str] = None, - on_completed: Optional[Callable[RelayEvent, Any]] = None, - **kwargs: Any = {} -) -> FaxAction -``` - -#### Parameters - - - - - - - - - - - - - -#### Returns - -`FaxAction` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 981. - -*** - -### stream - -Start streaming call audio to a WebSocket endpoint. Returns a StreamAction. - -**Modifiers:** `async` - -#### Signature - -```python -async stream( - url: str, - *, - name: Optional[str] = None, - codec: Optional[str] = None, - track: Optional[str] = None, - status_url: Optional[str] = None, - status_url_method: Optional[str] = None, - authorization_bearer_token: Optional[str] = None, - custom_parameters: Optional[dict[str, Any]] = None, - control_id: Optional[str] = None, - on_completed: Optional[Callable[RelayEvent, Any]] = None, - **kwargs: Any = {} -) -> StreamAction -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - -#### Returns - -`StreamAction` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 1044. - -*** - -### tap - -Intercept call media and stream it. Returns a TapAction. - -**Modifiers:** `async` - -#### Signature - -```python -async tap( - tap: dict[str, Any], - device: dict[str, Any], - *, - control_id: Optional[str] = None, - on_completed: Optional[Callable[RelayEvent, Any]] = None, - **kwargs: Any = {} -) -> TapAction -``` - -#### Parameters - - - - - - - - - - - -#### Returns - -`TapAction` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 1020. - -*** - -### transcribe - -Start transcribing the call. Returns a TranscribeAction. - -**Modifiers:** `async` - -#### Signature - -```python -async transcribe( - *, - control_id: Optional[str] = None, - status_url: Optional[str] = None, - on_completed: Optional[Callable[RelayEvent, Any]] = None, - **kwargs: Any = {} -) -> TranscribeAction -``` - -#### Parameters - - - - - - - - - -#### Returns - -`TranscribeAction` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 1200. - -*** - -### transfer - -Transfer call control to another RELAY app or SWML script. - -**Modifiers:** `async` - -#### Signature - -```python -async transfer(dest: str, **kwargs: Any = {}) -> dict -``` - -#### Parameters - - - - - -#### Returns - -`dict` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 1084. - -*** - -### unhold - -Release the call from hold. - -**Modifiers:** `async` - -#### Signature - -```python -async unhold() -> dict -``` - -#### Returns - -`dict` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 1180. - -*** - -### user\_event - -Send a custom user-defined event. - -**Modifiers:** `async` - -#### Signature - -```python -async user_event(*, event: Optional[str] = None, **kwargs: Any = {}) -> dict -``` - -#### Parameters - - - - - -#### Returns - -`dict` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 1465. - -*** - -### wait\_for - -Wait for a specific event, optionally filtered by predicate. - -**Modifiers:** `async` - -#### Signature - -```python -async wait_for( - event_type: str, - predicate: Optional[Callable[RelayEvent, bool]] = None, - timeout: Optional[float] = None -) -> RelayEvent -``` - -#### Parameters - - - - - - - -#### Returns - -`RelayEvent` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 395. - -*** - -### wait\_for\_answered - -Wait until the call is answered (immediate if already answered or past it). - -**Modifiers:** `async` - -#### Signature - -```python -async wait_for_answered(timeout: Optional[float] = None) -> RelayEvent -``` - -#### Parameters - - - -#### Returns - -`RelayEvent` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 720. - -*** - -### wait\_for\_ended - -Wait for the call to reach the ended state. - -**Modifiers:** `async` - -#### Signature - -```python -async wait_for_ended(timeout: Optional[float] = None) -> RelayEvent -``` - -#### Parameters - - - -#### Returns - -`RelayEvent` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 423. - -*** - -### wait\_for\_ending - -Wait until the call is ending (immediate if already ending or past it). - -**Modifiers:** `async` - -#### Signature - -```python -async wait_for_ending(timeout: Optional[float] = None) -> RelayEvent -``` - -#### Parameters - - - -#### Returns - -`RelayEvent` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 728. - -*** - -### wait\_for\_ringing - -Wait until the call is ringing (immediate if already ringing or past it). - -**Modifiers:** `async` - -#### Signature - -```python -async wait_for_ringing(timeout: Optional[float] = None) -> RelayEvent -``` - -#### Parameters - - - -#### Returns - -`RelayEvent` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 724. - -## Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 288. diff --git a/fern/products/sdk-reference/python/signalwire/relay/call/pay-action/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/call/pay-action/index.mdx deleted file mode 100644 index bf79be530b..0000000000 --- a/fern/products/sdk-reference/python/signalwire/relay/call/pay-action/index.mdx +++ /dev/null @@ -1,77 +0,0 @@ ---- -slug: "/reference/python/signalwire/relay/call/pay-action" -title: "PayAction" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.relay.call.PayAction" - parent: "signalwire.relay.call" - module: "signalwire.relay.call" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py" ---- -# `PayAction` - -Handle for an active pay operation. - -## Signature - -```python -class PayAction(Action) -``` - -## Inheritance - -**Extends:** [Action](/docs/sdk-reference/reference/python/signalwire/relay/call/action) - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(call: 'Call', control_id: str) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 251. - -*** - -### stop - -**Modifiers:** `async` - -#### Signature - -```python -async stop() -> dict -``` - -#### Returns - -`dict` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 255. - -## Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 248. diff --git a/fern/products/sdk-reference/python/signalwire/relay/call/play-action/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/call/play-action/index.mdx deleted file mode 100644 index 08f7fce79a..0000000000 --- a/fern/products/sdk-reference/python/signalwire/relay/call/play-action/index.mdx +++ /dev/null @@ -1,147 +0,0 @@ ---- -slug: "/reference/python/signalwire/relay/call/play-action" -title: "PlayAction" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.relay.call.PlayAction" - parent: "signalwire.relay.call" - module: "signalwire.relay.call" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py" ---- -# `PlayAction` - -Handle for an active play operation. - -## Signature - -```python -class PlayAction(Action) -``` - -## Inheritance - -**Extends:** [Action](/docs/sdk-reference/reference/python/signalwire/relay/call/action) - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(call: 'Call', control_id: str) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 98. - -*** - -### pause - -**Modifiers:** `async` - -#### Signature - -```python -async pause() -> dict -``` - -#### Returns - -`dict` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 105. - -*** - -### resume - -**Modifiers:** `async` - -#### Signature - -```python -async resume() -> dict -``` - -#### Returns - -`dict` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 108. - -*** - -### stop - -**Modifiers:** `async` - -#### Signature - -```python -async stop() -> dict -``` - -#### Returns - -`dict` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 102. - -*** - -### volume - -**Modifiers:** `async` - -#### Signature - -```python -async volume(volume: float) -> dict -``` - -#### Parameters - - - -#### Returns - -`dict` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 111. - -## Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 95. diff --git a/fern/products/sdk-reference/python/signalwire/relay/call/record-action/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/call/record-action/index.mdx deleted file mode 100644 index a55c7839d8..0000000000 --- a/fern/products/sdk-reference/python/signalwire/relay/call/record-action/index.mdx +++ /dev/null @@ -1,125 +0,0 @@ ---- -slug: "/reference/python/signalwire/relay/call/record-action" -title: "RecordAction" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.relay.call.RecordAction" - parent: "signalwire.relay.call" - module: "signalwire.relay.call" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py" ---- -# `RecordAction` - -Handle for an active record operation. - -## Signature - -```python -class RecordAction(Action) -``` - -## Inheritance - -**Extends:** [Action](/docs/sdk-reference/reference/python/signalwire/relay/call/action) - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(call: 'Call', control_id: str) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 120. - -*** - -### pause - -**Modifiers:** `async` - -#### Signature - -```python -async pause(behavior: Optional[str] = None) -> dict -``` - -#### Parameters - - - -#### Returns - -`dict` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 127. - -*** - -### resume - -**Modifiers:** `async` - -#### Signature - -```python -async resume() -> dict -``` - -#### Returns - -`dict` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 133. - -*** - -### stop - -**Modifiers:** `async` - -#### Signature - -```python -async stop() -> dict -``` - -#### Returns - -`dict` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 124. - -## Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 117. diff --git a/fern/products/sdk-reference/python/signalwire/relay/call/standalone-collect-action/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/call/standalone-collect-action/index.mdx deleted file mode 100644 index fe3573a388..0000000000 --- a/fern/products/sdk-reference/python/signalwire/relay/call/standalone-collect-action/index.mdx +++ /dev/null @@ -1,101 +0,0 @@ ---- -slug: "/reference/python/signalwire/relay/call/standalone-collect-action" -title: "StandaloneCollectAction" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.relay.call.StandaloneCollectAction" - parent: "signalwire.relay.call" - module: "signalwire.relay.call" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py" ---- -# `StandaloneCollectAction` - -Handle for standalone calling.collect (without play). - -## Signature - -```python -class StandaloneCollectAction(Action) -``` - -## Inheritance - -**Extends:** [Action](/docs/sdk-reference/reference/python/signalwire/relay/call/action) - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(call: 'Call', control_id: str) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 191. - -*** - -### start\_input\_timers - -Start the initial\_timeout timer on an active collect. - -**Modifiers:** `async` - -#### Signature - -```python -async start_input_timers() -> dict -``` - -#### Returns - -`dict` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 207. - -*** - -### stop - -**Modifiers:** `async` - -#### Signature - -```python -async stop() -> dict -``` - -#### Returns - -`dict` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 203. - -## Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 188. diff --git a/fern/products/sdk-reference/python/signalwire/relay/call/stream-action/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/call/stream-action/index.mdx deleted file mode 100644 index e4aac7bcea..0000000000 --- a/fern/products/sdk-reference/python/signalwire/relay/call/stream-action/index.mdx +++ /dev/null @@ -1,77 +0,0 @@ ---- -slug: "/reference/python/signalwire/relay/call/stream-action" -title: "StreamAction" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.relay.call.StreamAction" - parent: "signalwire.relay.call" - module: "signalwire.relay.call" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py" ---- -# `StreamAction` - -Handle for an active stream operation. - -## Signature - -```python -class StreamAction(Action) -``` - -## Inheritance - -**Extends:** [Action](/docs/sdk-reference/reference/python/signalwire/relay/call/action) - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(call: 'Call', control_id: str) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 240. - -*** - -### stop - -**Modifiers:** `async` - -#### Signature - -```python -async stop() -> dict -``` - -#### Returns - -`dict` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 244. - -## Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 237. diff --git a/fern/products/sdk-reference/python/signalwire/relay/call/tap-action/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/call/tap-action/index.mdx deleted file mode 100644 index 987d311082..0000000000 --- a/fern/products/sdk-reference/python/signalwire/relay/call/tap-action/index.mdx +++ /dev/null @@ -1,77 +0,0 @@ ---- -slug: "/reference/python/signalwire/relay/call/tap-action" -title: "TapAction" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.relay.call.TapAction" - parent: "signalwire.relay.call" - module: "signalwire.relay.call" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py" ---- -# `TapAction` - -Handle for an active tap operation. - -## Signature - -```python -class TapAction(Action) -``` - -## Inheritance - -**Extends:** [Action](/docs/sdk-reference/reference/python/signalwire/relay/call/action) - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(call: 'Call', control_id: str) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 229. - -*** - -### stop - -**Modifiers:** `async` - -#### Signature - -```python -async stop() -> dict -``` - -#### Returns - -`dict` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 233. - -## Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 226. diff --git a/fern/products/sdk-reference/python/signalwire/relay/call/transcribe-action/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/call/transcribe-action/index.mdx deleted file mode 100644 index 8340ec78e2..0000000000 --- a/fern/products/sdk-reference/python/signalwire/relay/call/transcribe-action/index.mdx +++ /dev/null @@ -1,77 +0,0 @@ ---- -slug: "/reference/python/signalwire/relay/call/transcribe-action" -title: "TranscribeAction" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.relay.call.TranscribeAction" - parent: "signalwire.relay.call" - module: "signalwire.relay.call" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py" ---- -# `TranscribeAction` - -Handle for an active transcribe operation. - -## Signature - -```python -class TranscribeAction(Action) -``` - -## Inheritance - -**Extends:** [Action](/docs/sdk-reference/reference/python/signalwire/relay/call/action) - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(call: 'Call', control_id: str) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 262. - -*** - -### stop - -**Modifiers:** `async` - -#### Signature - -```python -async stop() -> dict -``` - -#### Returns - -`dict` - -#### Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 266. - -## Source - -[`signalwire/signalwire/relay/call.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py) - -Line 259. diff --git a/fern/products/sdk-reference/python/signalwire/relay/client/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/client/index.mdx deleted file mode 100644 index 1f895d9394..0000000000 --- a/fern/products/sdk-reference/python/signalwire/relay/client/index.mdx +++ /dev/null @@ -1,65 +0,0 @@ ---- -slug: "/reference/python/signalwire/relay/client" -title: "client" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.relay.client" - parent: "signalwire.relay" - module: "signalwire.relay" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/client.py" ---- -# `client` - -RelayClient — WebSocket + JSON-RPC 2.0 protocol + event dispatch. - -One instance = one persistent WebSocket connection to SignalWire RELAY. - -Architecture notes (mirrors the JS SDK): - -- JSON-RPC requests are tracked by `id` in `_pending`; responses resolve - the corresponding Future. -- `signalwire.event` messages are acknowledged back to the server (event ACK) - and then dispatched by `event_type` → Call object → Action object. -- Each Action registers with a `control_id` and listens for its own - event\_type (e.g. `calling.call.play`). Actions filter events by - `control_id` so multiple concurrent actions on the same call work. -- Result code checking accepts any 2xx (matching the JS SDK regex /^2\[0-9]\[0-9]$/). - `signalwire.connect` responses skip code checking entirely. -- Execute has a configurable timeout (default 10s) to detect half-open connections. -- Requests made while disconnected are queued and flushed after re-auth. -- Server pings are tracked; if no ping arrives within the check interval the - connection is assumed half-open and force-closed for reconnect. - -## Signature - -```python -module client -``` - -## Properties - - - - - - - -## Classes - - - - Manages a WebSocket connection to SignalWire RELAY. - - - - Error returned by the RELAY server. - - - -## Source - -[`signalwire/signalwire/relay/client.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/client.py) diff --git a/fern/products/sdk-reference/python/signalwire/relay/client/relay-client/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/client/relay-client/index.mdx deleted file mode 100644 index fe4d2cbc35..0000000000 --- a/fern/products/sdk-reference/python/signalwire/relay/client/relay-client/index.mdx +++ /dev/null @@ -1,526 +0,0 @@ ---- -slug: "/reference/python/signalwire/relay/client/relay-client" -title: "RelayClient" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.relay.client.RelayClient" - parent: "signalwire.relay.client" - module: "signalwire.relay.client" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/client.py" ---- -# `RelayClient` - -Manages a WebSocket connection to SignalWire RELAY. - -Usage:: - -``` -client = RelayClient(project="...", token="...", contexts=["default"]) - -@client.on_call -async def handle(call): - await call.answer() - await call.hangup() - -client.run() -``` - -## Signature - -```python -class RelayClient -``` - -## Examples - -```python -client = RelayClient(project="...", token="...", contexts=["default"]) - -@client.on_call -async def handle(call): - await call.answer() - await call.hangup() - -client.run() -``` - -## Properties - - - - - - - - - - - Server-assigned protocol string from the connect response. - - - - -## Methods - -### \_\_aenter\_\_ - -**Modifiers:** `async` - -#### Signature - -```python -async __aenter__() -> 'RelayClient' -``` - -#### Returns - -`'RelayClient'` - -#### Source - -[`signalwire/signalwire/relay/client.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/client.py) - -Line 186. - -*** - -### \_\_aexit\_\_ - -**Modifiers:** `async` - -#### Signature - -```python -async __aexit__(*exc: Any = ()) -> None -``` - -#### Parameters - - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/relay/client.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/client.py) - -Line 190. - -*** - -### \_\_del\_\_ - -#### Signature - -```python -__del__() -> None -``` - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/relay/client.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/client.py) - -Line 183. - -*** - -### \_\_init\_\_ - -#### Signature - -```python -__init__( - project: Optional[str] = None, - token: Optional[str] = None, - jwt_token: Optional[str] = None, - host: Optional[str] = None, - contexts: Optional[list[str]] = None, - max_active_calls: Optional[int] = None -) -``` - -#### Parameters - - - - - - - - - - - - - -#### Source - -[`signalwire/signalwire/relay/client.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/client.py) - -Line 106. - -*** - -### connect - -Connect to RELAY and authenticate. - -**Modifiers:** `async` - -#### Signature - -```python -async connect() -> None -``` - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/relay/client.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/client.py) - -Line 216. - -*** - -### dial - -Initiate an outbound call using dial. Returns a Call object. - -The `calling.dial` RPC response only contains -`{"code": "200", "message": "Dialing"}` — no call\_id. The real -call\_id and node\_id arrive via `calling.call.dial` events -matched by `tag`. This method waits for that event so the -returned Call always has valid identifiers. - -**Modifiers:** `async` - -#### Signature - -```python -async dial( - devices: list[list[dict[str, Any]]], - *, - tag: Optional[str] = None, - max_duration: Optional[int] = None, - dial_timeout: Optional[float] = None -) -> Call -``` - -#### Parameters - - - Array of device lists (serial/parallel dial). - - - - Client-provided tag for event correlation. Auto-generated if not supplied. - - - - Optional max call duration in minutes. - - - - How long (seconds) to wait for the dial to complete before raising TimeoutError. Defaults to 120s. - - -#### Returns - -`Call` - -#### Source - -[`signalwire/signalwire/relay/client.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/client.py) - -Line 343. - -*** - -### disconnect - -Cleanly close the connection. - -**Modifiers:** `async` - -#### Signature - -```python -async disconnect() -> None -``` - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/relay/client.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/client.py) - -Line 286. - -*** - -### execute - -Send a JSON-RPC request and await the response. - -For calling methods, `method` is the full name (e.g. -`"calling.answer"`, `"calling.play"`) with `node_id` -and `call_id` in `params`. - -If the connection is not ready, the request is queued and sent -after re-authentication completes. - -**Modifiers:** `async` - -#### Signature - -```python -async execute(method: str, params: dict[str, Any]) -> dict -``` - -#### Parameters - - - - - -#### Returns - -`dict` - -#### Source - -[`signalwire/signalwire/relay/client.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/client.py) - -Line 331. - -*** - -### on\_call - -Register the inbound call handler (decorator). - -#### Signature - -```python -on_call(handler: CallHandler) -> CallHandler -``` - -#### Parameters - - - -#### Returns - -`CallHandler` - -#### Source - -[`signalwire/signalwire/relay/client.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/client.py) - -Line 202. - -*** - -### on\_message - -Register the inbound message handler (decorator). - -#### Signature - -```python -on_message(handler: MessageHandler) -> MessageHandler -``` - -#### Parameters - - - -#### Returns - -`MessageHandler` - -#### Source - -[`signalwire/signalwire/relay/client.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/client.py) - -Line 207. - -*** - -### receive - -Subscribe to additional contexts for inbound events. - -Sends `signalwire.receive` on the assigned protocol to start -receiving inbound calls on the given contexts. Can be called -after `connect()` to dynamically add contexts without reconnecting. - -**Modifiers:** `async` - -#### Signature - -```python -async receive(contexts: list[str]) -> None -``` - -#### Parameters - - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/relay/client.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/client.py) - -Line 481. - -*** - -### run - -Blocking entry point — runs the event loop until interrupted. - -#### Signature - -```python -run() -> None -``` - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/relay/client.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/client.py) - -Line 512. - -*** - -### send\_message - -Send an outbound SMS/MMS message. - -At least one of `body` or `media` must be provided. - -Returns a Message object that tracks state changes. Use -`await message.wait()` to block until delivery confirmation -(or failure). - -**Modifiers:** `async` - -#### Signature - -```python -async send_message( - *, - to_number: str, - from_number: str, - context: Optional[str] = None, - body: Optional[str] = None, - media: Optional[list[str]] = None, - tags: Optional[list[str]] = None, - region: Optional[str] = None, - on_completed: Optional[Callable] = None -) -> Message -``` - -#### Parameters - - - Destination phone number in E.164 format. - - - - Sender phone number in E.164 format. - - - - Context for receiving state events. Defaults to the relay protocol. - - - - Text body of the message. - - - - List of media URLs for MMS. - - - - Optional tags for the message. - - - - Optional origination region. - - - - Optional callback fired when a terminal state (delivered/undelivered/failed) is reached. - - -#### Returns - -`Message` - -#### Source - -[`signalwire/signalwire/relay/client.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/client.py) - -Line 406. - -*** - -### unreceive - -Unsubscribe from contexts for inbound events. - -Sends `signalwire.unreceive` to stop receiving inbound calls -on the given contexts. - -**Modifiers:** `async` - -#### Signature - -```python -async unreceive(contexts: list[str]) -> None -``` - -#### Parameters - - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/relay/client.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/client.py) - -Line 495. - -## Source - -[`signalwire/signalwire/relay/client.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/client.py) - -Line 91. diff --git a/fern/products/sdk-reference/python/signalwire/relay/client/relay-error/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/client/relay-error/index.mdx deleted file mode 100644 index eb28142568..0000000000 --- a/fern/products/sdk-reference/python/signalwire/relay/client/relay-error/index.mdx +++ /dev/null @@ -1,61 +0,0 @@ ---- -slug: "/reference/python/signalwire/relay/client/relay-error" -title: "RelayError" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.relay.client.RelayError" - parent: "signalwire.relay.client" - module: "signalwire.relay.client" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/client.py" ---- -# `RelayError` - -Error returned by the RELAY server. - -## Signature - -```python -class RelayError(Exception) -``` - -## Inheritance - -**Extends:** `Exception` - -## Properties - - - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(code: int, message: str) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/relay/client.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/client.py) - -Line 1109. - -## Source - -[`signalwire/signalwire/relay/client.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/client.py) - -Line 1106. diff --git a/fern/products/sdk-reference/python/signalwire/relay/constants/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/constants/index.mdx deleted file mode 100644 index a69b061985..0000000000 --- a/fern/products/sdk-reference/python/signalwire/relay/constants/index.mdx +++ /dev/null @@ -1,183 +0,0 @@ ---- -slug: "/reference/python/signalwire/relay/constants" -title: "constants" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.relay.constants" - parent: "signalwire.relay" - module: "signalwire.relay" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/constants.py" ---- -# `constants` - -Protocol constants for the SignalWire RELAY calling API. - -## Signature - -```python -module constants -``` - -## Constants - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -## Source - -[`signalwire/signalwire/relay/constants.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/constants.py) diff --git a/fern/products/sdk-reference/python/signalwire/relay/event/call-receive-event/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/event/call-receive-event/index.mdx deleted file mode 100644 index 04ce72dd69..0000000000 --- a/fern/products/sdk-reference/python/signalwire/relay/event/call-receive-event/index.mdx +++ /dev/null @@ -1,139 +0,0 @@ ---- -slug: "/reference/python/signalwire/relay/event/call-receive-event" -title: "CallReceiveEvent" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.relay.event.CallReceiveEvent" - parent: "signalwire.relay.event" - module: "signalwire.relay.event" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" ---- -# `CallReceiveEvent` - -Event for calling.call.receive — inbound call notification. - -**Modifiers:** `dataclass` - -**Decorators:** `@dataclass` - -## Signature - -```python -class CallReceiveEvent(RelayEvent) -``` - -## Inheritance - -**Extends:** [RelayEvent](/docs/sdk-reference/reference/python/signalwire/relay/event/relay-event) - -## Properties - - - - - - - - - - - - - - - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__( - event_type: str, - params: dict[str, Any], - call_id: str = '', - timestamp: float = 0.0, - call_state: str = '', - direction: str = '', - device: dict[str, Any] = dict(), - node_id: str = '', - project_id: str = '', - context: str = '', - segment_id: str = '', - tag: str = '' -) -> None -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -*** - -### from\_payload - -**Modifiers:** `classmethod` - -#### Signature - -```python -@classmethod -from_payload(payload: dict[str, Any]) -> 'CallReceiveEvent' -``` - -#### Parameters - - - -#### Returns - -`'CallReceiveEvent'` - -#### Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -Line 72. - -## Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -Line 59. diff --git a/fern/products/sdk-reference/python/signalwire/relay/event/call-state-event/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/event/call-state-event/index.mdx deleted file mode 100644 index c321fcdcb4..0000000000 --- a/fern/products/sdk-reference/python/signalwire/relay/event/call-state-event/index.mdx +++ /dev/null @@ -1,119 +0,0 @@ ---- -slug: "/reference/python/signalwire/relay/event/call-state-event" -title: "CallStateEvent" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.relay.event.CallStateEvent" - parent: "signalwire.relay.event" - module: "signalwire.relay.event" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" ---- -# `CallStateEvent` - -Event for calling.call.state. - -**Modifiers:** `dataclass` - -**Decorators:** `@dataclass` - -## Signature - -```python -class CallStateEvent(RelayEvent) -``` - -## Inheritance - -**Extends:** [RelayEvent](/docs/sdk-reference/reference/python/signalwire/relay/event/relay-event) - -## Properties - - - - - - - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__( - event_type: str, - params: dict[str, Any], - call_id: str = '', - timestamp: float = 0.0, - call_state: str = '', - end_reason: str = '', - direction: str = '', - device: dict[str, Any] = dict() -) -> None -``` - -#### Parameters - - - - - - - - - - - - - - - - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -*** - -### from\_payload - -**Modifiers:** `classmethod` - -#### Signature - -```python -@classmethod -from_payload(payload: dict[str, Any]) -> 'CallStateEvent' -``` - -#### Parameters - - - -#### Returns - -`'CallStateEvent'` - -#### Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -Line 43. - -## Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -Line 34. diff --git a/fern/products/sdk-reference/python/signalwire/relay/event/calling-error-event/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/event/calling-error-event/index.mdx deleted file mode 100644 index 0914acc3b1..0000000000 --- a/fern/products/sdk-reference/python/signalwire/relay/event/calling-error-event/index.mdx +++ /dev/null @@ -1,109 +0,0 @@ ---- -slug: "/reference/python/signalwire/relay/event/calling-error-event" -title: "CallingErrorEvent" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.relay.event.CallingErrorEvent" - parent: "signalwire.relay.event" - module: "signalwire.relay.event" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" ---- -# `CallingErrorEvent` - -Event for calling.error. - -**Modifiers:** `dataclass` - -**Decorators:** `@dataclass` - -## Signature - -```python -class CallingErrorEvent(RelayEvent) -``` - -## Inheritance - -**Extends:** [RelayEvent](/docs/sdk-reference/reference/python/signalwire/relay/event/relay-event) - -## Properties - - - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__( - event_type: str, - params: dict[str, Any], - call_id: str = '', - timestamp: float = 0.0, - code: str = '', - message: str = '' -) -> None -``` - -#### Parameters - - - - - - - - - - - - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -*** - -### from\_payload - -**Modifiers:** `classmethod` - -#### Signature - -```python -@classmethod -from_payload(payload: dict[str, Any]) -> 'CallingErrorEvent' -``` - -#### Parameters - - - -#### Returns - -`'CallingErrorEvent'` - -#### Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -Line 516. - -## Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -Line 509. diff --git a/fern/products/sdk-reference/python/signalwire/relay/event/collect-event/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/event/collect-event/index.mdx deleted file mode 100644 index 88e3dfd736..0000000000 --- a/fern/products/sdk-reference/python/signalwire/relay/event/collect-event/index.mdx +++ /dev/null @@ -1,119 +0,0 @@ ---- -slug: "/reference/python/signalwire/relay/event/collect-event" -title: "CollectEvent" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.relay.event.CollectEvent" - parent: "signalwire.relay.event" - module: "signalwire.relay.event" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" ---- -# `CollectEvent` - -Event for calling.call.collect. - -**Modifiers:** `dataclass` - -**Decorators:** `@dataclass` - -## Signature - -```python -class CollectEvent(RelayEvent) -``` - -## Inheritance - -**Extends:** [RelayEvent](/docs/sdk-reference/reference/python/signalwire/relay/event/relay-event) - -## Properties - - - - - - - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__( - event_type: str, - params: dict[str, Any], - call_id: str = '', - timestamp: float = 0.0, - control_id: str = '', - state: str = '', - result: dict[str, Any] = dict(), - final: Optional[bool] = None -) -> None -``` - -#### Parameters - - - - - - - - - - - - - - - - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -*** - -### from\_payload - -**Modifiers:** `classmethod` - -#### Signature - -```python -@classmethod -from_payload(payload: dict[str, Any]) -> 'CollectEvent' -``` - -#### Parameters - - - -#### Returns - -`'CollectEvent'` - -#### Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -Line 152. - -## Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -Line 143. diff --git a/fern/products/sdk-reference/python/signalwire/relay/event/conference-event/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/event/conference-event/index.mdx deleted file mode 100644 index 566521a4bc..0000000000 --- a/fern/products/sdk-reference/python/signalwire/relay/event/conference-event/index.mdx +++ /dev/null @@ -1,114 +0,0 @@ ---- -slug: "/reference/python/signalwire/relay/event/conference-event" -title: "ConferenceEvent" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.relay.event.ConferenceEvent" - parent: "signalwire.relay.event" - module: "signalwire.relay.event" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" ---- -# `ConferenceEvent` - -Event for calling.conference. - -**Modifiers:** `dataclass` - -**Decorators:** `@dataclass` - -## Signature - -```python -class ConferenceEvent(RelayEvent) -``` - -## Inheritance - -**Extends:** [RelayEvent](/docs/sdk-reference/reference/python/signalwire/relay/event/relay-event) - -## Properties - - - - - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__( - event_type: str, - params: dict[str, Any], - call_id: str = '', - timestamp: float = 0.0, - conference_id: str = '', - name: str = '', - status: str = '' -) -> None -``` - -#### Parameters - - - - - - - - - - - - - - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -*** - -### from\_payload - -**Modifiers:** `classmethod` - -#### Signature - -```python -@classmethod -from_payload(payload: dict[str, Any]) -> 'ConferenceEvent' -``` - -#### Parameters - - - -#### Returns - -`'ConferenceEvent'` - -#### Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -Line 494. - -## Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -Line 486. diff --git a/fern/products/sdk-reference/python/signalwire/relay/event/connect-event/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/event/connect-event/index.mdx deleted file mode 100644 index 6b3d65b107..0000000000 --- a/fern/products/sdk-reference/python/signalwire/relay/event/connect-event/index.mdx +++ /dev/null @@ -1,109 +0,0 @@ ---- -slug: "/reference/python/signalwire/relay/event/connect-event" -title: "ConnectEvent" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.relay.event.ConnectEvent" - parent: "signalwire.relay.event" - module: "signalwire.relay.event" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" ---- -# `ConnectEvent` - -Event for calling.call.connect. - -**Modifiers:** `dataclass` - -**Decorators:** `@dataclass` - -## Signature - -```python -class ConnectEvent(RelayEvent) -``` - -## Inheritance - -**Extends:** [RelayEvent](/docs/sdk-reference/reference/python/signalwire/relay/event/relay-event) - -## Properties - - - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__( - event_type: str, - params: dict[str, Any], - call_id: str = '', - timestamp: float = 0.0, - connect_state: str = '', - peer: dict[str, Any] = dict() -) -> None -``` - -#### Parameters - - - - - - - - - - - - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -*** - -### from\_payload - -**Modifiers:** `classmethod` - -#### Signature - -```python -@classmethod -from_payload(payload: dict[str, Any]) -> 'ConnectEvent' -``` - -#### Parameters - - - -#### Returns - -`'ConnectEvent'` - -#### Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -Line 175. - -## Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -Line 168. diff --git a/fern/products/sdk-reference/python/signalwire/relay/event/denoise-event/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/event/denoise-event/index.mdx deleted file mode 100644 index 08f0d56839..0000000000 --- a/fern/products/sdk-reference/python/signalwire/relay/event/denoise-event/index.mdx +++ /dev/null @@ -1,104 +0,0 @@ ---- -slug: "/reference/python/signalwire/relay/event/denoise-event" -title: "DenoiseEvent" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.relay.event.DenoiseEvent" - parent: "signalwire.relay.event" - module: "signalwire.relay.event" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" ---- -# `DenoiseEvent` - -Event for calling.call.denoise. - -**Modifiers:** `dataclass` - -**Decorators:** `@dataclass` - -## Signature - -```python -class DenoiseEvent(RelayEvent) -``` - -## Inheritance - -**Extends:** [RelayEvent](/docs/sdk-reference/reference/python/signalwire/relay/event/relay-event) - -## Properties - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__( - event_type: str, - params: dict[str, Any], - call_id: str = '', - timestamp: float = 0.0, - denoised: bool = False -) -> None -``` - -#### Parameters - - - - - - - - - - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -*** - -### from\_payload - -**Modifiers:** `classmethod` - -#### Signature - -```python -@classmethod -from_payload(payload: dict[str, Any]) -> 'DenoiseEvent' -``` - -#### Parameters - - - -#### Returns - -`'DenoiseEvent'` - -#### Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -Line 356. - -## Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -Line 350. diff --git a/fern/products/sdk-reference/python/signalwire/relay/event/detect-event/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/event/detect-event/index.mdx deleted file mode 100644 index a93699f684..0000000000 --- a/fern/products/sdk-reference/python/signalwire/relay/event/detect-event/index.mdx +++ /dev/null @@ -1,109 +0,0 @@ ---- -slug: "/reference/python/signalwire/relay/event/detect-event" -title: "DetectEvent" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.relay.event.DetectEvent" - parent: "signalwire.relay.event" - module: "signalwire.relay.event" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" ---- -# `DetectEvent` - -Event for calling.call.detect. - -**Modifiers:** `dataclass` - -**Decorators:** `@dataclass` - -## Signature - -```python -class DetectEvent(RelayEvent) -``` - -## Inheritance - -**Extends:** [RelayEvent](/docs/sdk-reference/reference/python/signalwire/relay/event/relay-event) - -## Properties - - - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__( - event_type: str, - params: dict[str, Any], - call_id: str = '', - timestamp: float = 0.0, - control_id: str = '', - detect: dict[str, Any] = dict() -) -> None -``` - -#### Parameters - - - - - - - - - - - - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -*** - -### from\_payload - -**Modifiers:** `classmethod` - -#### Signature - -```python -@classmethod -from_payload(payload: dict[str, Any]) -> 'DetectEvent' -``` - -#### Parameters - - - -#### Returns - -`'DetectEvent'` - -#### Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -Line 196. - -## Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -Line 189. diff --git a/fern/products/sdk-reference/python/signalwire/relay/event/dial-event/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/event/dial-event/index.mdx deleted file mode 100644 index 7e5fa0740e..0000000000 --- a/fern/products/sdk-reference/python/signalwire/relay/event/dial-event/index.mdx +++ /dev/null @@ -1,114 +0,0 @@ ---- -slug: "/reference/python/signalwire/relay/event/dial-event" -title: "DialEvent" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.relay.event.DialEvent" - parent: "signalwire.relay.event" - module: "signalwire.relay.event" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" ---- -# `DialEvent` - -Event for calling.call.dial. - -**Modifiers:** `dataclass` - -**Decorators:** `@dataclass` - -## Signature - -```python -class DialEvent(RelayEvent) -``` - -## Inheritance - -**Extends:** [RelayEvent](/docs/sdk-reference/reference/python/signalwire/relay/event/relay-event) - -## Properties - - - - - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__( - event_type: str, - params: dict[str, Any], - call_id: str = '', - timestamp: float = 0.0, - tag: str = '', - dial_state: str = '', - call: dict[str, Any] = dict() -) -> None -``` - -#### Parameters - - - - - - - - - - - - - - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -*** - -### from\_payload - -**Modifiers:** `classmethod` - -#### Signature - -```python -@classmethod -from_payload(payload: dict[str, Any]) -> 'DialEvent' -``` - -#### Parameters - - - -#### Returns - -`'DialEvent'` - -#### Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -Line 310. - -## Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -Line 302. diff --git a/fern/products/sdk-reference/python/signalwire/relay/event/echo-event/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/event/echo-event/index.mdx deleted file mode 100644 index 06cf0f7df9..0000000000 --- a/fern/products/sdk-reference/python/signalwire/relay/event/echo-event/index.mdx +++ /dev/null @@ -1,104 +0,0 @@ ---- -slug: "/reference/python/signalwire/relay/event/echo-event" -title: "EchoEvent" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.relay.event.EchoEvent" - parent: "signalwire.relay.event" - module: "signalwire.relay.event" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" ---- -# `EchoEvent` - -Event for calling.call.echo. - -**Modifiers:** `dataclass` - -**Decorators:** `@dataclass` - -## Signature - -```python -class EchoEvent(RelayEvent) -``` - -## Inheritance - -**Extends:** [RelayEvent](/docs/sdk-reference/reference/python/signalwire/relay/event/relay-event) - -## Properties - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__( - event_type: str, - params: dict[str, Any], - call_id: str = '', - timestamp: float = 0.0, - state: str = '' -) -> None -``` - -#### Parameters - - - - - - - - - - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -*** - -### from\_payload - -**Modifiers:** `classmethod` - -#### Signature - -```python -@classmethod -from_payload(payload: dict[str, Any]) -> 'EchoEvent' -``` - -#### Parameters - - - -#### Returns - -`'EchoEvent'` - -#### Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -Line 425. - -## Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -Line 419. diff --git a/fern/products/sdk-reference/python/signalwire/relay/event/fax-event/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/event/fax-event/index.mdx deleted file mode 100644 index b04f3a9cd3..0000000000 --- a/fern/products/sdk-reference/python/signalwire/relay/event/fax-event/index.mdx +++ /dev/null @@ -1,109 +0,0 @@ ---- -slug: "/reference/python/signalwire/relay/event/fax-event" -title: "FaxEvent" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.relay.event.FaxEvent" - parent: "signalwire.relay.event" - module: "signalwire.relay.event" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" ---- -# `FaxEvent` - -Event for calling.call.fax. - -**Modifiers:** `dataclass` - -**Decorators:** `@dataclass` - -## Signature - -```python -class FaxEvent(RelayEvent) -``` - -## Inheritance - -**Extends:** [RelayEvent](/docs/sdk-reference/reference/python/signalwire/relay/event/relay-event) - -## Properties - - - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__( - event_type: str, - params: dict[str, Any], - call_id: str = '', - timestamp: float = 0.0, - control_id: str = '', - fax: dict[str, Any] = dict() -) -> None -``` - -#### Parameters - - - - - - - - - - - - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -*** - -### from\_payload - -**Modifiers:** `classmethod` - -#### Signature - -```python -@classmethod -from_payload(payload: dict[str, Any]) -> 'FaxEvent' -``` - -#### Parameters - - - -#### Returns - -`'FaxEvent'` - -#### Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -Line 217. - -## Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -Line 210. diff --git a/fern/products/sdk-reference/python/signalwire/relay/event/hold-event/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/event/hold-event/index.mdx deleted file mode 100644 index e0a85ad9e2..0000000000 --- a/fern/products/sdk-reference/python/signalwire/relay/event/hold-event/index.mdx +++ /dev/null @@ -1,104 +0,0 @@ ---- -slug: "/reference/python/signalwire/relay/event/hold-event" -title: "HoldEvent" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.relay.event.HoldEvent" - parent: "signalwire.relay.event" - module: "signalwire.relay.event" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" ---- -# `HoldEvent` - -Event for calling.call.hold. - -**Modifiers:** `dataclass` - -**Decorators:** `@dataclass` - -## Signature - -```python -class HoldEvent(RelayEvent) -``` - -## Inheritance - -**Extends:** [RelayEvent](/docs/sdk-reference/reference/python/signalwire/relay/event/relay-event) - -## Properties - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__( - event_type: str, - params: dict[str, Any], - call_id: str = '', - timestamp: float = 0.0, - state: str = '' -) -> None -``` - -#### Parameters - - - - - - - - - - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -*** - -### from\_payload - -**Modifiers:** `classmethod` - -#### Signature - -```python -@classmethod -from_payload(payload: dict[str, Any]) -> 'HoldEvent' -``` - -#### Parameters - - - -#### Returns - -`'HoldEvent'` - -#### Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -Line 473. - -## Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -Line 467. diff --git a/fern/products/sdk-reference/python/signalwire/relay/event/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/event/index.mdx deleted file mode 100644 index 15bb03d8ea..0000000000 --- a/fern/products/sdk-reference/python/signalwire/relay/event/index.mdx +++ /dev/null @@ -1,160 +0,0 @@ ---- -slug: "/reference/python/signalwire/relay/event" -title: "event" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.relay.event" - parent: "signalwire.relay" - module: "signalwire.relay" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" ---- -# `event` - -Typed event wrappers for RELAY calling events. - -These are convenience dataclasses over raw event dicts. All Call event handlers -also accept the raw dict, so these are optional. - -## Signature - -```python -module event -``` - -## Constants - - - -## Classes - - - - Event for calling.error. - - - - Event for calling.call.receive — inbound call notification. - - - - Event for calling.call.state. - - - - Event for calling.call.collect. - - - - Event for calling.conference. - - - - Event for calling.call.connect. - - - - Event for calling.call.denoise. - - - - Event for calling.call.detect. - - - - Event for calling.call.dial. - - - - Event for calling.call.echo. - - - - Event for calling.call.fax. - - - - Event for calling.call.hold. - - - - Event for messaging.receive — inbound message notification. - - - - Event for messaging.state — outbound message state change. - - - - Event for calling.call.pay. - - - - Event for calling.call.play. - - - - Event for calling.call.queue. - - - - Event for calling.call.record. - - - - Event for calling.call.refer. - - - - Base event — wraps the raw params dict from a signalwire.event message. - - - - Event for calling.call.send\_digits. - - - - Event for calling.call.stream. - - - - Event for calling.call.tap. - - - - Event for calling.call.transcribe. - - - -## Functions - -### parse\_event - -Parse a raw signalwire.event params dict into a typed event object. - -#### Signature - -```python -parse_event(payload: dict[str, Any]) -> RelayEvent -``` - -#### Parameters - - - -#### Returns - -`RelayEvent` - -#### Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -Line 634. - -## Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) diff --git a/fern/products/sdk-reference/python/signalwire/relay/event/message-receive-event/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/event/message-receive-event/index.mdx deleted file mode 100644 index 9160e3e032..0000000000 --- a/fern/products/sdk-reference/python/signalwire/relay/event/message-receive-event/index.mdx +++ /dev/null @@ -1,149 +0,0 @@ ---- -slug: "/reference/python/signalwire/relay/event/message-receive-event" -title: "MessageReceiveEvent" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.relay.event.MessageReceiveEvent" - parent: "signalwire.relay.event" - module: "signalwire.relay.event" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" ---- -# `MessageReceiveEvent` - -Event for messaging.receive — inbound message notification. - -**Modifiers:** `dataclass` - -**Decorators:** `@dataclass` - -## Signature - -```python -class MessageReceiveEvent(RelayEvent) -``` - -## Inheritance - -**Extends:** [RelayEvent](/docs/sdk-reference/reference/python/signalwire/relay/event/relay-event) - -## Properties - - - - - - - - - - - - - - - - - - - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__( - event_type: str, - params: dict[str, Any], - call_id: str = '', - timestamp: float = 0.0, - message_id: str = '', - context: str = '', - direction: str = '', - from_number: str = '', - to_number: str = '', - body: str = '', - media: list[str] = list(), - segments: int = 0, - message_state: str = '', - tags: list[str] = list() -) -> None -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -*** - -### from\_payload - -**Modifiers:** `classmethod` - -#### Signature - -```python -@classmethod -from_payload(payload: dict[str, Any]) -> 'MessageReceiveEvent' -``` - -#### Parameters - - - -#### Returns - -`'MessageReceiveEvent'` - -#### Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -Line 545. - -## Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -Line 530. diff --git a/fern/products/sdk-reference/python/signalwire/relay/event/message-state-event/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/event/message-state-event/index.mdx deleted file mode 100644 index f101c21419..0000000000 --- a/fern/products/sdk-reference/python/signalwire/relay/event/message-state-event/index.mdx +++ /dev/null @@ -1,154 +0,0 @@ ---- -slug: "/reference/python/signalwire/relay/event/message-state-event" -title: "MessageStateEvent" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.relay.event.MessageStateEvent" - parent: "signalwire.relay.event" - module: "signalwire.relay.event" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" ---- -# `MessageStateEvent` - -Event for messaging.state — outbound message state change. - -**Modifiers:** `dataclass` - -**Decorators:** `@dataclass` - -## Signature - -```python -class MessageStateEvent(RelayEvent) -``` - -## Inheritance - -**Extends:** [RelayEvent](/docs/sdk-reference/reference/python/signalwire/relay/event/relay-event) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__( - event_type: str, - params: dict[str, Any], - call_id: str = '', - timestamp: float = 0.0, - message_id: str = '', - context: str = '', - direction: str = '', - from_number: str = '', - to_number: str = '', - body: str = '', - media: list[str] = list(), - segments: int = 0, - message_state: str = '', - reason: str = '', - tags: list[str] = list() -) -> None -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -*** - -### from\_payload - -**Modifiers:** `classmethod` - -#### Signature - -```python -@classmethod -from_payload(payload: dict[str, Any]) -> 'MessageStateEvent' -``` - -#### Parameters - - - -#### Returns - -`'MessageStateEvent'` - -#### Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -Line 583. - -## Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -Line 567. diff --git a/fern/products/sdk-reference/python/signalwire/relay/event/pay-event/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/event/pay-event/index.mdx deleted file mode 100644 index ef44d38721..0000000000 --- a/fern/products/sdk-reference/python/signalwire/relay/event/pay-event/index.mdx +++ /dev/null @@ -1,109 +0,0 @@ ---- -slug: "/reference/python/signalwire/relay/event/pay-event" -title: "PayEvent" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.relay.event.PayEvent" - parent: "signalwire.relay.event" - module: "signalwire.relay.event" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" ---- -# `PayEvent` - -Event for calling.call.pay. - -**Modifiers:** `dataclass` - -**Decorators:** `@dataclass` - -## Signature - -```python -class PayEvent(RelayEvent) -``` - -## Inheritance - -**Extends:** [RelayEvent](/docs/sdk-reference/reference/python/signalwire/relay/event/relay-event) - -## Properties - - - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__( - event_type: str, - params: dict[str, Any], - call_id: str = '', - timestamp: float = 0.0, - control_id: str = '', - state: str = '' -) -> None -``` - -#### Parameters - - - - - - - - - - - - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -*** - -### from\_payload - -**Modifiers:** `classmethod` - -#### Signature - -```python -@classmethod -from_payload(payload: dict[str, Any]) -> 'PayEvent' -``` - -#### Parameters - - - -#### Returns - -`'PayEvent'` - -#### Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -Line 376. - -## Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -Line 369. diff --git a/fern/products/sdk-reference/python/signalwire/relay/event/play-event/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/event/play-event/index.mdx deleted file mode 100644 index d84c14bb0f..0000000000 --- a/fern/products/sdk-reference/python/signalwire/relay/event/play-event/index.mdx +++ /dev/null @@ -1,109 +0,0 @@ ---- -slug: "/reference/python/signalwire/relay/event/play-event" -title: "PlayEvent" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.relay.event.PlayEvent" - parent: "signalwire.relay.event" - module: "signalwire.relay.event" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" ---- -# `PlayEvent` - -Event for calling.call.play. - -**Modifiers:** `dataclass` - -**Decorators:** `@dataclass` - -## Signature - -```python -class PlayEvent(RelayEvent) -``` - -## Inheritance - -**Extends:** [RelayEvent](/docs/sdk-reference/reference/python/signalwire/relay/event/relay-event) - -## Properties - - - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__( - event_type: str, - params: dict[str, Any], - call_id: str = '', - timestamp: float = 0.0, - control_id: str = '', - state: str = '' -) -> None -``` - -#### Parameters - - - - - - - - - - - - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -*** - -### from\_payload - -**Modifiers:** `classmethod` - -#### Signature - -```python -@classmethod -from_payload(payload: dict[str, Any]) -> 'PlayEvent' -``` - -#### Parameters - - - -#### Returns - -`'PlayEvent'` - -#### Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -Line 99. - -## Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -Line 92. diff --git a/fern/products/sdk-reference/python/signalwire/relay/event/queue-event/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/event/queue-event/index.mdx deleted file mode 100644 index 729f44d10d..0000000000 --- a/fern/products/sdk-reference/python/signalwire/relay/event/queue-event/index.mdx +++ /dev/null @@ -1,129 +0,0 @@ ---- -slug: "/reference/python/signalwire/relay/event/queue-event" -title: "QueueEvent" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.relay.event.QueueEvent" - parent: "signalwire.relay.event" - module: "signalwire.relay.event" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" ---- -# `QueueEvent` - -Event for calling.call.queue. - -**Modifiers:** `dataclass` - -**Decorators:** `@dataclass` - -## Signature - -```python -class QueueEvent(RelayEvent) -``` - -## Inheritance - -**Extends:** [RelayEvent](/docs/sdk-reference/reference/python/signalwire/relay/event/relay-event) - -## Properties - - - - - - - - - - - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__( - event_type: str, - params: dict[str, Any], - call_id: str = '', - timestamp: float = 0.0, - control_id: str = '', - status: str = '', - queue_id: str = '', - queue_name: str = '', - position: int = 0, - size: int = 0 -) -> None -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -*** - -### from\_payload - -**Modifiers:** `classmethod` - -#### Signature - -```python -@classmethod -from_payload(payload: dict[str, Any]) -> 'QueueEvent' -``` - -#### Parameters - - - -#### Returns - -`'QueueEvent'` - -#### Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -Line 401. - -## Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -Line 390. diff --git a/fern/products/sdk-reference/python/signalwire/relay/event/record-event/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/event/record-event/index.mdx deleted file mode 100644 index d286d4be93..0000000000 --- a/fern/products/sdk-reference/python/signalwire/relay/event/record-event/index.mdx +++ /dev/null @@ -1,129 +0,0 @@ ---- -slug: "/reference/python/signalwire/relay/event/record-event" -title: "RecordEvent" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.relay.event.RecordEvent" - parent: "signalwire.relay.event" - module: "signalwire.relay.event" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" ---- -# `RecordEvent` - -Event for calling.call.record. - -**Modifiers:** `dataclass` - -**Decorators:** `@dataclass` - -## Signature - -```python -class RecordEvent(RelayEvent) -``` - -## Inheritance - -**Extends:** [RelayEvent](/docs/sdk-reference/reference/python/signalwire/relay/event/relay-event) - -## Properties - - - - - - - - - - - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__( - event_type: str, - params: dict[str, Any], - call_id: str = '', - timestamp: float = 0.0, - control_id: str = '', - state: str = '', - url: str = '', - duration: float = 0.0, - size: int = 0, - record: dict[str, Any] = dict() -) -> None -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -*** - -### from\_payload - -**Modifiers:** `classmethod` - -#### Signature - -```python -@classmethod -from_payload(payload: dict[str, Any]) -> 'RecordEvent' -``` - -#### Parameters - - - -#### Returns - -`'RecordEvent'` - -#### Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -Line 124. - -## Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -Line 113. diff --git a/fern/products/sdk-reference/python/signalwire/relay/event/refer-event/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/event/refer-event/index.mdx deleted file mode 100644 index d3c6083eba..0000000000 --- a/fern/products/sdk-reference/python/signalwire/relay/event/refer-event/index.mdx +++ /dev/null @@ -1,119 +0,0 @@ ---- -slug: "/reference/python/signalwire/relay/event/refer-event" -title: "ReferEvent" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.relay.event.ReferEvent" - parent: "signalwire.relay.event" - module: "signalwire.relay.event" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" ---- -# `ReferEvent` - -Event for calling.call.refer. - -**Modifiers:** `dataclass` - -**Decorators:** `@dataclass` - -## Signature - -```python -class ReferEvent(RelayEvent) -``` - -## Inheritance - -**Extends:** [RelayEvent](/docs/sdk-reference/reference/python/signalwire/relay/event/relay-event) - -## Properties - - - - - - - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__( - event_type: str, - params: dict[str, Any], - call_id: str = '', - timestamp: float = 0.0, - state: str = '', - sip_refer_to: str = '', - sip_refer_response_code: str = '', - sip_notify_response_code: str = '' -) -> None -``` - -#### Parameters - - - - - - - - - - - - - - - - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -*** - -### from\_payload - -**Modifiers:** `classmethod` - -#### Signature - -```python -@classmethod -from_payload(payload: dict[str, Any]) -> 'ReferEvent' -``` - -#### Parameters - - - -#### Returns - -`'ReferEvent'` - -#### Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -Line 334. - -## Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -Line 325. diff --git a/fern/products/sdk-reference/python/signalwire/relay/event/relay-event/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/event/relay-event/index.mdx deleted file mode 100644 index cfc92ca7d1..0000000000 --- a/fern/products/sdk-reference/python/signalwire/relay/event/relay-event/index.mdx +++ /dev/null @@ -1,103 +0,0 @@ ---- -slug: "/reference/python/signalwire/relay/event/relay-event" -title: "RelayEvent" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.relay.event.RelayEvent" - parent: "signalwire.relay.event" - module: "signalwire.relay.event" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" ---- -# `RelayEvent` - -Base event — wraps the raw params dict from a signalwire.event message. - -**Modifiers:** `dataclass` - -**Decorators:** `@dataclass` - -## Signature - -```python -class RelayEvent -``` - -## Properties - - - - - - - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__( - event_type: str, - params: dict[str, Any], - call_id: str = '', - timestamp: float = 0.0 -) -> None -``` - -#### Parameters - - - - - - - - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -*** - -### from\_payload - -**Modifiers:** `classmethod` - -#### Signature - -```python -@classmethod -from_payload(payload: dict[str, Any]) -> 'RelayEvent' -``` - -#### Parameters - - - -#### Returns - -`'RelayEvent'` - -#### Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -Line 22. - -## Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -Line 13. diff --git a/fern/products/sdk-reference/python/signalwire/relay/event/send-digits-event/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/event/send-digits-event/index.mdx deleted file mode 100644 index 63d6d52d39..0000000000 --- a/fern/products/sdk-reference/python/signalwire/relay/event/send-digits-event/index.mdx +++ /dev/null @@ -1,109 +0,0 @@ ---- -slug: "/reference/python/signalwire/relay/event/send-digits-event" -title: "SendDigitsEvent" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.relay.event.SendDigitsEvent" - parent: "signalwire.relay.event" - module: "signalwire.relay.event" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" ---- -# `SendDigitsEvent` - -Event for calling.call.send\_digits. - -**Modifiers:** `dataclass` - -**Decorators:** `@dataclass` - -## Signature - -```python -class SendDigitsEvent(RelayEvent) -``` - -## Inheritance - -**Extends:** [RelayEvent](/docs/sdk-reference/reference/python/signalwire/relay/event/relay-event) - -## Properties - - - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__( - event_type: str, - params: dict[str, Any], - call_id: str = '', - timestamp: float = 0.0, - control_id: str = '', - state: str = '' -) -> None -``` - -#### Parameters - - - - - - - - - - - - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -*** - -### from\_payload - -**Modifiers:** `classmethod` - -#### Signature - -```python -@classmethod -from_payload(payload: dict[str, Any]) -> 'SendDigitsEvent' -``` - -#### Parameters - - - -#### Returns - -`'SendDigitsEvent'` - -#### Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -Line 288. - -## Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -Line 281. diff --git a/fern/products/sdk-reference/python/signalwire/relay/event/stream-event/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/event/stream-event/index.mdx deleted file mode 100644 index 4919e0ef55..0000000000 --- a/fern/products/sdk-reference/python/signalwire/relay/event/stream-event/index.mdx +++ /dev/null @@ -1,119 +0,0 @@ ---- -slug: "/reference/python/signalwire/relay/event/stream-event" -title: "StreamEvent" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.relay.event.StreamEvent" - parent: "signalwire.relay.event" - module: "signalwire.relay.event" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" ---- -# `StreamEvent` - -Event for calling.call.stream. - -**Modifiers:** `dataclass` - -**Decorators:** `@dataclass` - -## Signature - -```python -class StreamEvent(RelayEvent) -``` - -## Inheritance - -**Extends:** [RelayEvent](/docs/sdk-reference/reference/python/signalwire/relay/event/relay-event) - -## Properties - - - - - - - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__( - event_type: str, - params: dict[str, Any], - call_id: str = '', - timestamp: float = 0.0, - control_id: str = '', - state: str = '', - url: str = '', - name: str = '' -) -> None -``` - -#### Parameters - - - - - - - - - - - - - - - - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -*** - -### from\_payload - -**Modifiers:** `classmethod` - -#### Signature - -```python -@classmethod -from_payload(payload: dict[str, Any]) -> 'StreamEvent' -``` - -#### Parameters - - - -#### Returns - -`'StreamEvent'` - -#### Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -Line 265. - -## Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -Line 256. diff --git a/fern/products/sdk-reference/python/signalwire/relay/event/tap-event/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/event/tap-event/index.mdx deleted file mode 100644 index 06549d8d27..0000000000 --- a/fern/products/sdk-reference/python/signalwire/relay/event/tap-event/index.mdx +++ /dev/null @@ -1,119 +0,0 @@ ---- -slug: "/reference/python/signalwire/relay/event/tap-event" -title: "TapEvent" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.relay.event.TapEvent" - parent: "signalwire.relay.event" - module: "signalwire.relay.event" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" ---- -# `TapEvent` - -Event for calling.call.tap. - -**Modifiers:** `dataclass` - -**Decorators:** `@dataclass` - -## Signature - -```python -class TapEvent(RelayEvent) -``` - -## Inheritance - -**Extends:** [RelayEvent](/docs/sdk-reference/reference/python/signalwire/relay/event/relay-event) - -## Properties - - - - - - - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__( - event_type: str, - params: dict[str, Any], - call_id: str = '', - timestamp: float = 0.0, - control_id: str = '', - state: str = '', - tap: dict[str, Any] = dict(), - device: dict[str, Any] = dict() -) -> None -``` - -#### Parameters - - - - - - - - - - - - - - - - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -*** - -### from\_payload - -**Modifiers:** `classmethod` - -#### Signature - -```python -@classmethod -from_payload(payload: dict[str, Any]) -> 'TapEvent' -``` - -#### Parameters - - - -#### Returns - -`'TapEvent'` - -#### Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -Line 240. - -## Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -Line 231. diff --git a/fern/products/sdk-reference/python/signalwire/relay/event/transcribe-event/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/event/transcribe-event/index.mdx deleted file mode 100644 index 874a7a5584..0000000000 --- a/fern/products/sdk-reference/python/signalwire/relay/event/transcribe-event/index.mdx +++ /dev/null @@ -1,129 +0,0 @@ ---- -slug: "/reference/python/signalwire/relay/event/transcribe-event" -title: "TranscribeEvent" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.relay.event.TranscribeEvent" - parent: "signalwire.relay.event" - module: "signalwire.relay.event" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py" ---- -# `TranscribeEvent` - -Event for calling.call.transcribe. - -**Modifiers:** `dataclass` - -**Decorators:** `@dataclass` - -## Signature - -```python -class TranscribeEvent(RelayEvent) -``` - -## Inheritance - -**Extends:** [RelayEvent](/docs/sdk-reference/reference/python/signalwire/relay/event/relay-event) - -## Properties - - - - - - - - - - - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__( - event_type: str, - params: dict[str, Any], - call_id: str = '', - timestamp: float = 0.0, - control_id: str = '', - state: str = '', - url: str = '', - recording_id: str = '', - duration: float = 0.0, - size: int = 0 -) -> None -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -*** - -### from\_payload - -**Modifiers:** `classmethod` - -#### Signature - -```python -@classmethod -from_payload(payload: dict[str, Any]) -> 'TranscribeEvent' -``` - -#### Parameters - - - -#### Returns - -`'TranscribeEvent'` - -#### Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -Line 449. - -## Source - -[`signalwire/signalwire/relay/event.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/event.py) - -Line 438. diff --git a/fern/products/sdk-reference/python/signalwire/relay/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/index.mdx deleted file mode 100644 index 00e4e6e6a5..0000000000 --- a/fern/products/sdk-reference/python/signalwire/relay/index.mdx +++ /dev/null @@ -1,59 +0,0 @@ ---- -slug: "/reference/python/signalwire/relay" -title: "relay" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.relay" - parent: "signalwire" - module: "signalwire" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/__init__.py" ---- -# `relay` - -SignalWire RELAY client — real-time call control over WebSocket. - -## Signature - -```python -module relay -``` - -## Properties - - - -## Classes - - - - Represents a live RELAY call. - - - - Represents a single SMS/MMS message. - - - -## Modules - - - - RelayClient — WebSocket + JSON-RPC 2.0 protocol + event dispatch. - - - - Protocol constants for the SignalWire RELAY calling API. - - - - Typed event wrappers for RELAY calling events. - - - -## Source - -[`signalwire/signalwire/relay/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/relay/message/index.mdx b/fern/products/sdk-reference/python/signalwire/relay/message/index.mdx deleted file mode 100644 index 75cabea3c2..0000000000 --- a/fern/products/sdk-reference/python/signalwire/relay/message/index.mdx +++ /dev/null @@ -1,196 +0,0 @@ ---- -slug: "/reference/python/signalwire/relay/message" -title: "message" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.relay.message" - parent: "signalwire.relay" - module: "signalwire.relay" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/message.py" ---- -# `message` - -Represents a single SMS/MMS message. - -For outbound messages, use `await message.wait()` to block until a -terminal state (delivered, undelivered, failed) is reached. - -## Signature - -```python -class Message -``` - -## Properties - - - - - - - - - - - True if the message has reached a terminal state. - - - - - - - - - - - - The terminal RelayEvent, or None if not yet done. - - - - - - - - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__( - *, - message_id: str = '', - context: str = '', - direction: str = '', - from_number: str = '', - to_number: str = '', - body: str = '', - media: Optional[list[str]] = None, - segments: int = 0, - state: str = '', - reason: str = '', - tags: Optional[list[str]] = None -) -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - -#### Source - -[`signalwire/signalwire/relay/message.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/message.py) - -Line 28. - -*** - -### \_\_repr\_\_ - -#### Signature - -```python -__repr__() -> str -``` - -#### Returns - -`str` - -#### Source - -[`signalwire/signalwire/relay/message.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/message.py) - -Line 123. - -*** - -### on - -Register an event listener for state changes on this message. - -#### Signature - -```python -on(handler: Callable) -> None -``` - -#### Parameters - - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/relay/message.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/message.py) - -Line 72. - -*** - -### wait - -Block until the message reaches a terminal state. - -Returns the terminal RelayEvent. Raises asyncio.TimeoutError if -timeout is specified and exceeded. - -**Modifiers:** `async` - -#### Signature - -```python -async wait(timeout: Optional[float] = None) -> RelayEvent -``` - -#### Parameters - - - -#### Returns - -`RelayEvent` - -#### Source - -[`signalwire/signalwire/relay/message.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/message.py) - -Line 76. - -## Source - -[`signalwire/signalwire/relay/message.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/message.py) - -Line 21. diff --git a/fern/products/sdk-reference/python/signalwire/rest/call-handler/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/call-handler/index.mdx deleted file mode 100644 index ff04a17838..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/call-handler/index.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/call-handler" -title: "call_handler" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.rest.call_handler" - parent: "signalwire.rest" - module: "signalwire.rest" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/call_handler.py" ---- -# `call_handler` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module call_handler -``` - -## Classes - - - - `call_handler` values for `phone_numbers.update`. - - - -## Source - -[`signalwire/signalwire/rest/call_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/call_handler.py) diff --git a/fern/products/sdk-reference/python/signalwire/rest/call-handler/phone-call-handler/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/call-handler/phone-call-handler/index.mdx deleted file mode 100644 index 168570dd38..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/call-handler/phone-call-handler/index.mdx +++ /dev/null @@ -1,80 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/call-handler/phone-call-handler" -title: "PhoneCallHandler" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.call_handler.PhoneCallHandler" - parent: "signalwire.rest.call_handler" - module: "signalwire.rest.call_handler" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/call_handler.py" ---- -# `PhoneCallHandler` - -`call_handler` values for `phone_numbers.update`. - -Each value is a `str` subclass, so passing the enum member directly into -`phone_numbers.update(..., call_handler=PhoneCallHandler.RELAY_SCRIPT)` -serializes to the wire value without `.value` indirection. - -\================= ============================= ======================= -Enum member Companion field (required) Auto-creates resource -\================= ============================= ======================= -RELAY\_SCRIPT call\_relay\_script\_url swml\_webhook -LAML\_WEBHOOKS call\_request\_url cxml\_webhook -LAML\_APPLICATION call\_laml\_application\_id cxml\_application -AI\_AGENT call\_ai\_agent\_id ai\_agent -CALL\_FLOW call\_flow\_id call\_flow -RELAY\_APPLICATION call\_relay\_application relay\_application -RELAY\_TOPIC call\_relay\_topic (routes via RELAY) -RELAY\_CONTEXT call\_relay\_context (legacy, prefer topic) -RELAY\_CONNECTOR (connector config) (internal) -VIDEO\_ROOM call\_video\_room\_id (routes to Video API) -DIALOGFLOW call\_dialogflow\_agent\_id (none) -\================= ============================= ======================= - -Note: `LAML_WEBHOOKS` (wire value `laml_webhooks`) produces a **cXML** -handler, not a generic webhook. For SWML, use `RELAY_SCRIPT`. - -## Signature - -```python -class PhoneCallHandler(str, Enum) -``` - -## Inheritance - -**Extends:** `str`, `Enum` - -## Properties - - - - - - - - - - - - - - - - - - - - - - - -## Source - -[`signalwire/signalwire/rest/call_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/call_handler.py) - -Line 25. diff --git a/fern/products/sdk-reference/python/signalwire/rest/client/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/client/index.mdx deleted file mode 100644 index 337451dc63..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/client/index.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/client" -title: "client" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.rest.client" - parent: "signalwire.rest" - module: "signalwire.rest" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/client.py" ---- -# `client` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module client -``` - -## Classes - - - - REST client for the SignalWire platform APIs. - - - -## Source - -[`signalwire/signalwire/rest/client.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/client.py) diff --git a/fern/products/sdk-reference/python/signalwire/rest/client/rest-client/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/client/rest-client/index.mdx deleted file mode 100644 index 2b0d21b5fa..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/client/rest-client/index.mdx +++ /dev/null @@ -1,133 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/client/rest-client" -title: "RestClient" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.client.RestClient" - parent: "signalwire.rest.client" - module: "signalwire.rest.client" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/client.py" ---- -# `RestClient` - -REST client for the SignalWire platform APIs. - -> \[!NOTE] -> client = RestClient( -> project="your-project-id", -> token="your-api-token", -> host="your-space.signalwire.com", -> ) -> -> # Or use environment variables: -> -> # SIGNALWIRE\_PROJECT\_ID, SIGNALWIRE\_API\_TOKEN, SIGNALWIRE\_SPACE -> -> client = RestClient() -> -> # Use namespaced resources -> -> client.fabric.ai\_agents.list() -> client.calling.play(call\_id, play=\[...]) -> client.phone\_numbers.search(area\_code="512") -> client.video.rooms.create(name="standup") -> client.compat.calls.list() - -## Signature - -```python -class RestClient -``` - -## Examples - -```python -# Or use environment variables: -# SIGNALWIRE_PROJECT_ID, SIGNALWIRE_API_TOKEN, SIGNALWIRE_SPACE -client = RestClient() - -# Use namespaced resources -client.fabric.ai_agents.list() -client.calling.play(call_id, play=[...]) -client.phone_numbers.search(area_code="512") -client.video.rooms.create(name="standup") -client.compat.calls.list() -``` - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(project = None, token = None, host = None) -``` - -#### Parameters - - - - - - - -#### Source - -[`signalwire/signalwire/rest/client.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/client.py) - -Line 61. - -## Source - -[`signalwire/signalwire/rest/client.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/client.py) - -Line 39. diff --git a/fern/products/sdk-reference/python/signalwire/rest/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/index.mdx deleted file mode 100644 index bdfbe03b2c..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/index.mdx +++ /dev/null @@ -1,52 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest" -title: "rest" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.rest" - parent: "signalwire" - module: "signalwire" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/__init__.py" ---- -# `rest` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module rest -``` - -## Properties - - - -## Modules - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - -## Source - -[`signalwire/signalwire/rest/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/addresses/addresses-resource/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/addresses/addresses-resource/index.mdx deleted file mode 100644 index e80490e620..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/addresses/addresses-resource/index.mdx +++ /dev/null @@ -1,133 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/addresses/addresses-resource" -title: "AddressesResource" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.addresses.AddressesResource" - parent: "signalwire.rest.namespaces.addresses" - module: "signalwire.rest.namespaces.addresses" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/addresses.py" ---- -# `AddressesResource` - -Address management (no update endpoint). - -## Signature - -```python -class AddressesResource(BaseResource) -``` - -## Inheritance - -**Extends:** `BaseResource` - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(http) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/addresses.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/addresses.py) - -Line 20. - -*** - -### create - -#### Signature - -```python -create(**kwargs = {}) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/addresses.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/addresses.py) - -Line 26. - -*** - -### delete - -#### Signature - -```python -delete(address_id) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/addresses.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/addresses.py) - -Line 32. - -*** - -### get - -#### Signature - -```python -get(address_id) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/addresses.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/addresses.py) - -Line 29. - -*** - -### list - -#### Signature - -```python -list(**params = {}) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/addresses.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/addresses.py) - -Line 23. - -## Source - -[`signalwire/signalwire/rest/namespaces/addresses.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/addresses.py) - -Line 17. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/addresses/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/addresses/index.mdx deleted file mode 100644 index 37b6c0a0b2..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/addresses/index.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/addresses" -title: "addresses" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.rest.namespaces.addresses" - parent: "signalwire.rest.namespaces" - module: "signalwire.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/addresses.py" ---- -# `addresses` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module addresses -``` - -## Classes - - - - Address management (no update endpoint). - - - -## Source - -[`signalwire/signalwire/rest/namespaces/addresses.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/addresses.py) diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/calling/calling-namespace/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/calling/calling-namespace/index.mdx deleted file mode 100644 index 4e93578ae8..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/calling/calling-namespace/index.mdx +++ /dev/null @@ -1,863 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/calling/calling-namespace" -title: "CallingNamespace" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.calling.CallingNamespace" - parent: "signalwire.rest.namespaces.calling" - module: "signalwire.rest.namespaces.calling" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py" ---- -# `CallingNamespace` - -REST call control — all 37 commands dispatched via single POST endpoint. - -## Signature - -```python -class CallingNamespace(BaseResource) -``` - -## Inheritance - -**Extends:** `BaseResource` - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(http) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 22. - -*** - -### ai\_hold - -#### Signature - -```python -ai_hold(call_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 125. - -*** - -### ai\_message - -#### Signature - -```python -ai_message(call_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 122. - -*** - -### ai\_stop - -#### Signature - -```python -ai_stop(call_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 131. - -*** - -### ai\_unhold - -#### Signature - -```python -ai_unhold(call_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 128. - -*** - -### collect - -#### Signature - -```python -collect(call_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 77. - -*** - -### collect\_start\_input\_timers - -#### Signature - -```python -collect_start_input_timers(call_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 83. - -*** - -### collect\_stop - -#### Signature - -```python -collect_stop(call_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 80. - -*** - -### denoise - -#### Signature - -```python -denoise(call_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 108. - -*** - -### denoise\_stop - -#### Signature - -```python -denoise_stop(call_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 111. - -*** - -### detect - -#### Signature - -```python -detect(call_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 87. - -*** - -### detect\_stop - -#### Signature - -```python -detect_stop(call_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 90. - -*** - -### dial - -#### Signature - -```python -dial(**params = {}) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 32. - -*** - -### disconnect - -#### Signature - -```python -disconnect(call_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 44. - -*** - -### end - -#### Signature - -```python -end(call_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 38. - -*** - -### live\_transcribe - -#### Signature - -```python -live_transcribe(call_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 135. - -*** - -### live\_translate - -#### Signature - -```python -live_translate(call_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 138. - -*** - -### play - -#### Signature - -```python -play(call_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 48. - -*** - -### play\_pause - -#### Signature - -```python -play_pause(call_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 51. - -*** - -### play\_resume - -#### Signature - -```python -play_resume(call_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 54. - -*** - -### play\_stop - -#### Signature - -```python -play_stop(call_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 57. - -*** - -### play\_volume - -#### Signature - -```python -play_volume(call_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 60. - -*** - -### receive\_fax\_stop - -#### Signature - -```python -receive_fax_stop(call_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 145. - -*** - -### record - -#### Signature - -```python -record(call_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 64. - -*** - -### record\_pause - -#### Signature - -```python -record_pause(call_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 67. - -*** - -### record\_resume - -#### Signature - -```python -record_resume(call_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 70. - -*** - -### record\_stop - -#### Signature - -```python -record_stop(call_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 73. - -*** - -### refer - -#### Signature - -```python -refer(call_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 149. - -*** - -### send\_fax\_stop - -#### Signature - -```python -send_fax_stop(call_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 142. - -*** - -### stream - -#### Signature - -```python -stream(call_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 101. - -*** - -### stream\_stop - -#### Signature - -```python -stream_stop(call_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 104. - -*** - -### tap - -#### Signature - -```python -tap(call_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 94. - -*** - -### tap\_stop - -#### Signature - -```python -tap_stop(call_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 97. - -*** - -### transcribe - -#### Signature - -```python -transcribe(call_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 115. - -*** - -### transcribe\_stop - -#### Signature - -```python -transcribe_stop(call_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 118. - -*** - -### transfer - -#### Signature - -```python -transfer(call_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 41. - -*** - -### update - -#### Signature - -```python -update(**params = {}) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 35. - -*** - -### user\_event - -#### Signature - -```python -user_event(call_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 153. - -## Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 19. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/calling/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/calling/index.mdx deleted file mode 100644 index efc716bfa1..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/calling/index.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/calling" -title: "calling" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.rest.namespaces.calling" - parent: "signalwire.rest.namespaces" - module: "signalwire.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py" ---- -# `calling` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module calling -``` - -## Classes - - - - REST call control — all 37 commands dispatched via single POST endpoint. - - - -## Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/chat/chat-resource/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/chat/chat-resource/index.mdx deleted file mode 100644 index 855b2c3df6..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/chat/chat-resource/index.mdx +++ /dev/null @@ -1,73 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/chat/chat-resource" -title: "ChatResource" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.chat.ChatResource" - parent: "signalwire.rest.namespaces.chat" - module: "signalwire.rest.namespaces.chat" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/chat.py" ---- -# `ChatResource` - -Chat token generation. - -## Signature - -```python -class ChatResource(BaseResource) -``` - -## Inheritance - -**Extends:** `BaseResource` - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(http) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/chat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/chat.py) - -Line 20. - -*** - -### create\_token - -#### Signature - -```python -create_token(**kwargs = {}) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/chat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/chat.py) - -Line 23. - -## Source - -[`signalwire/signalwire/rest/namespaces/chat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/chat.py) - -Line 17. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/chat/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/chat/index.mdx deleted file mode 100644 index ba7ca3d40e..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/chat/index.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/chat" -title: "chat" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.rest.namespaces.chat" - parent: "signalwire.rest.namespaces" - module: "signalwire.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/chat.py" ---- -# `chat` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module chat -``` - -## Classes - - - - Chat token generation. - - - -## Source - -[`signalwire/signalwire/rest/namespaces/chat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/chat.py) diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-accounts/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-accounts/index.mdx deleted file mode 100644 index 503651949a..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-accounts/index.mdx +++ /dev/null @@ -1,135 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/compat/compat-accounts" -title: "CompatAccounts" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.compat.CompatAccounts" - parent: "signalwire.rest.namespaces.compat" - module: "signalwire.rest.namespaces.compat" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py" ---- -# `CompatAccounts` - -Compat account/subproject management. - -## Signature - -```python -class CompatAccounts(BaseResource) -``` - -## Inheritance - -**Extends:** `BaseResource` - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(http) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) - -Line 20. - -*** - -### create - -#### Signature - -```python -create(**kwargs = {}) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) - -Line 26. - -*** - -### get - -#### Signature - -```python -get(sid) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) - -Line 29. - -*** - -### list - -#### Signature - -```python -list(**params = {}) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) - -Line 23. - -*** - -### update - -#### Signature - -```python -update(sid, **kwargs = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) - -Line 32. - -## Source - -[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) - -Line 17. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-applications/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-applications/index.mdx deleted file mode 100644 index 5052e63b67..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-applications/index.mdx +++ /dev/null @@ -1,55 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/compat/compat-applications" -title: "CompatApplications" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.compat.CompatApplications" - parent: "signalwire.rest.namespaces.compat" - module: "signalwire.rest.namespaces.compat" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py" ---- -# `CompatApplications` - -Compat application management. - -## Signature - -```python -class CompatApplications(CrudResource) -``` - -## Inheritance - -**Extends:** `CrudResource` - -## Methods - -### update - -#### Signature - -```python -update(sid, **kwargs = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) - -Line 187. - -## Source - -[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) - -Line 184. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-calls/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-calls/index.mdx deleted file mode 100644 index 3e677cd66c..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-calls/index.mdx +++ /dev/null @@ -1,147 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/compat/compat-calls" -title: "CompatCalls" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.compat.CompatCalls" - parent: "signalwire.rest.namespaces.compat" - module: "signalwire.rest.namespaces.compat" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py" ---- -# `CompatCalls` - -Compat call management with recording and stream sub-resources. - -## Signature - -```python -class CompatCalls(CrudResource) -``` - -## Inheritance - -**Extends:** `CrudResource` - -## Methods - -### start\_recording - -#### Signature - -```python -start_recording(call_sid, **kwargs = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) - -Line 42. - -*** - -### start\_stream - -#### Signature - -```python -start_stream(call_sid, **kwargs = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) - -Line 48. - -*** - -### stop\_stream - -#### Signature - -```python -stop_stream(call_sid, stream_sid, **kwargs = {}) -``` - -#### Parameters - - - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) - -Line 51. - -*** - -### update - -#### Signature - -```python -update(sid, **kwargs = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) - -Line 39. - -*** - -### update\_recording - -#### Signature - -```python -update_recording(call_sid, recording_sid, **kwargs = {}) -``` - -#### Parameters - - - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) - -Line 45. - -## Source - -[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) - -Line 36. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-conferences/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-conferences/index.mdx deleted file mode 100644 index c0808b9fa9..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-conferences/index.mdx +++ /dev/null @@ -1,321 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/compat/compat-conferences" -title: "CompatConferences" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.compat.CompatConferences" - parent: "signalwire.rest.namespaces.compat" - module: "signalwire.rest.namespaces.compat" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py" ---- -# `CompatConferences` - -Compat conference management with participants, recordings, and streams. - -## Signature - -```python -class CompatConferences(BaseResource) -``` - -## Inheritance - -**Extends:** `BaseResource` - -## Methods - -### delete\_recording - -#### Signature - -```python -delete_recording(conference_sid, recording_sid) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) - -Line 134. - -*** - -### get - -#### Signature - -```python -get(sid) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) - -Line 93. - -*** - -### get\_participant - -#### Signature - -```python -get_participant(conference_sid, call_sid) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) - -Line 106. - -*** - -### get\_recording - -#### Signature - -```python -get_recording(conference_sid, recording_sid) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) - -Line 125. - -*** - -### list - -#### Signature - -```python -list(**params = {}) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) - -Line 90. - -*** - -### list\_participants - -#### Signature - -```python -list_participants(conference_sid, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) - -Line 100. - -*** - -### list\_recordings - -#### Signature - -```python -list_recordings(conference_sid, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) - -Line 119. - -*** - -### remove\_participant - -#### Signature - -```python -remove_participant(conference_sid, call_sid) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) - -Line 115. - -*** - -### start\_stream - -#### Signature - -```python -start_stream(conference_sid, **kwargs = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) - -Line 138. - -*** - -### stop\_stream - -#### Signature - -```python -stop_stream(conference_sid, stream_sid, **kwargs = {}) -``` - -#### Parameters - - - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) - -Line 141. - -*** - -### update - -#### Signature - -```python -update(sid, **kwargs = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) - -Line 96. - -*** - -### update\_participant - -#### Signature - -```python -update_participant(conference_sid, call_sid, **kwargs = {}) -``` - -#### Parameters - - - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) - -Line 109. - -*** - -### update\_recording - -#### Signature - -```python -update_recording(conference_sid, recording_sid, **kwargs = {}) -``` - -#### Parameters - - - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) - -Line 128. - -## Source - -[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) - -Line 87. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-faxes/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-faxes/index.mdx deleted file mode 100644 index 6309e16f45..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-faxes/index.mdx +++ /dev/null @@ -1,121 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/compat/compat-faxes" -title: "CompatFaxes" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.compat.CompatFaxes" - parent: "signalwire.rest.namespaces.compat" - module: "signalwire.rest.namespaces.compat" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py" ---- -# `CompatFaxes` - -Compat fax management with media sub-resources. - -## Signature - -```python -class CompatFaxes(CrudResource) -``` - -## Inheritance - -**Extends:** `CrudResource` - -## Methods - -### delete\_media - -#### Signature - -```python -delete_media(fax_sid, media_sid) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) - -Line 83. - -*** - -### get\_media - -#### Signature - -```python -get_media(fax_sid, media_sid) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) - -Line 80. - -*** - -### list\_media - -#### Signature - -```python -list_media(fax_sid, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) - -Line 77. - -*** - -### update - -#### Signature - -```python -update(sid, **kwargs = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) - -Line 74. - -## Source - -[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) - -Line 71. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-laml-bins/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-laml-bins/index.mdx deleted file mode 100644 index 92d6125f36..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-laml-bins/index.mdx +++ /dev/null @@ -1,55 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/compat/compat-laml-bins" -title: "CompatLamlBins" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.compat.CompatLamlBins" - parent: "signalwire.rest.namespaces.compat" - module: "signalwire.rest.namespaces.compat" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py" ---- -# `CompatLamlBins` - -Compat cXML/LaML script management. - -## Signature - -```python -class CompatLamlBins(CrudResource) -``` - -## Inheritance - -**Extends:** `CrudResource` - -## Methods - -### update - -#### Signature - -```python -update(sid, **kwargs = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) - -Line 194. - -## Source - -[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) - -Line 191. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-messages/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-messages/index.mdx deleted file mode 100644 index b3844bbf7f..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-messages/index.mdx +++ /dev/null @@ -1,121 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/compat/compat-messages" -title: "CompatMessages" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.compat.CompatMessages" - parent: "signalwire.rest.namespaces.compat" - module: "signalwire.rest.namespaces.compat" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py" ---- -# `CompatMessages` - -Compat message management with media sub-resources. - -## Signature - -```python -class CompatMessages(CrudResource) -``` - -## Inheritance - -**Extends:** `CrudResource` - -## Methods - -### delete\_media - -#### Signature - -```python -delete_media(message_sid, media_sid) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) - -Line 67. - -*** - -### get\_media - -#### Signature - -```python -get_media(message_sid, media_sid) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) - -Line 64. - -*** - -### list\_media - -#### Signature - -```python -list_media(message_sid, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) - -Line 61. - -*** - -### update - -#### Signature - -```python -update(sid, **kwargs = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) - -Line 58. - -## Source - -[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) - -Line 55. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-namespace/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-namespace/index.mdx deleted file mode 100644 index 8bcdc99b03..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-namespace/index.mdx +++ /dev/null @@ -1,77 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/compat/compat-namespace" -title: "CompatNamespace" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.compat.CompatNamespace" - parent: "signalwire.rest.namespaces.compat" - module: "signalwire.rest.namespaces.compat" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py" ---- -# `CompatNamespace` - -Twilio-compatible LAML API namespace with AccountSid scoping. - -## Signature - -```python -class CompatNamespace -``` - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(http, account_sid) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) - -Line 256. - -## Source - -[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) - -Line 253. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-phone-numbers/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-phone-numbers/index.mdx deleted file mode 100644 index df887b7bba..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-phone-numbers/index.mdx +++ /dev/null @@ -1,241 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/compat/compat-phone-numbers" -title: "CompatPhoneNumbers" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.compat.CompatPhoneNumbers" - parent: "signalwire.rest.namespaces.compat" - module: "signalwire.rest.namespaces.compat" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py" ---- -# `CompatPhoneNumbers` - -Compat phone number management. - -## Signature - -```python -class CompatPhoneNumbers(BaseResource) -``` - -## Inheritance - -**Extends:** `BaseResource` - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(http, base) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) - -Line 151. - -*** - -### delete - -#### Signature - -```python -delete(sid) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) - -Line 167. - -*** - -### get - -#### Signature - -```python -get(sid) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) - -Line 161. - -*** - -### import\_number - -#### Signature - -```python -import_number(**kwargs = {}) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) - -Line 170. - -*** - -### list - -#### Signature - -```python -list(**params = {}) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) - -Line 155. - -*** - -### list\_available\_countries - -#### Signature - -```python -list_available_countries(**params = {}) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) - -Line 174. - -*** - -### purchase - -#### Signature - -```python -purchase(**kwargs = {}) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) - -Line 158. - -*** - -### search\_local - -#### Signature - -```python -search_local(country, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) - -Line 177. - -*** - -### search\_toll\_free - -#### Signature - -```python -search_toll_free(country, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) - -Line 180. - -*** - -### update - -#### Signature - -```python -update(sid, **kwargs = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) - -Line 164. - -## Source - -[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) - -Line 148. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-queues/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-queues/index.mdx deleted file mode 100644 index a851dd75d8..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-queues/index.mdx +++ /dev/null @@ -1,123 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/compat/compat-queues" -title: "CompatQueues" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.compat.CompatQueues" - parent: "signalwire.rest.namespaces.compat" - module: "signalwire.rest.namespaces.compat" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py" ---- -# `CompatQueues` - -Compat queue management with members. - -## Signature - -```python -class CompatQueues(CrudResource) -``` - -## Inheritance - -**Extends:** `CrudResource` - -## Methods - -### dequeue\_member - -#### Signature - -```python -dequeue_member(queue_sid, call_sid, **kwargs = {}) -``` - -#### Parameters - - - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) - -Line 210. - -*** - -### get\_member - -#### Signature - -```python -get_member(queue_sid, call_sid) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) - -Line 207. - -*** - -### list\_members - -#### Signature - -```python -list_members(queue_sid, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) - -Line 204. - -*** - -### update - -#### Signature - -```python -update(sid, **kwargs = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) - -Line 201. - -## Source - -[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) - -Line 198. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-recordings/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-recordings/index.mdx deleted file mode 100644 index 40e79e44b3..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-recordings/index.mdx +++ /dev/null @@ -1,93 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/compat/compat-recordings" -title: "CompatRecordings" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.compat.CompatRecordings" - parent: "signalwire.rest.namespaces.compat" - module: "signalwire.rest.namespaces.compat" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py" ---- -# `CompatRecordings` - -Compat recording management. - -## Signature - -```python -class CompatRecordings(BaseResource) -``` - -## Inheritance - -**Extends:** `BaseResource` - -## Methods - -### delete - -#### Signature - -```python -delete(sid) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) - -Line 223. - -*** - -### get - -#### Signature - -```python -get(sid) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) - -Line 220. - -*** - -### list - -#### Signature - -```python -list(**params = {}) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) - -Line 217. - -## Source - -[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) - -Line 214. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-tokens/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-tokens/index.mdx deleted file mode 100644 index 846062a631..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-tokens/index.mdx +++ /dev/null @@ -1,95 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/compat/compat-tokens" -title: "CompatTokens" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.compat.CompatTokens" - parent: "signalwire.rest.namespaces.compat" - module: "signalwire.rest.namespaces.compat" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py" ---- -# `CompatTokens` - -Compat API token management. - -## Signature - -```python -class CompatTokens(BaseResource) -``` - -## Inheritance - -**Extends:** `BaseResource` - -## Methods - -### create - -#### Signature - -```python -create(**kwargs = {}) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) - -Line 243. - -*** - -### delete - -#### Signature - -```python -delete(token_id) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) - -Line 249. - -*** - -### update - -#### Signature - -```python -update(token_id, **kwargs = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) - -Line 246. - -## Source - -[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) - -Line 240. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-transcriptions/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-transcriptions/index.mdx deleted file mode 100644 index 2714c99854..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/compat-transcriptions/index.mdx +++ /dev/null @@ -1,93 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/compat/compat-transcriptions" -title: "CompatTranscriptions" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.compat.CompatTranscriptions" - parent: "signalwire.rest.namespaces.compat" - module: "signalwire.rest.namespaces.compat" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py" ---- -# `CompatTranscriptions` - -Compat transcription management. - -## Signature - -```python -class CompatTranscriptions(BaseResource) -``` - -## Inheritance - -**Extends:** `BaseResource` - -## Methods - -### delete - -#### Signature - -```python -delete(sid) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) - -Line 236. - -*** - -### get - -#### Signature - -```python -get(sid) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) - -Line 233. - -*** - -### list - -#### Signature - -```python -list(**params = {}) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) - -Line 230. - -## Source - -[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) - -Line 227. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/index.mdx deleted file mode 100644 index 70187f1799..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/compat/index.mdx +++ /dev/null @@ -1,88 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/compat" -title: "compat" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.rest.namespaces.compat" - parent: "signalwire.rest.namespaces" - module: "signalwire.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py" ---- -# `compat` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module compat -``` - -## Classes - - - - Compat account/subproject management. - - - - Compat application management. - - - - Compat call management with recording and stream sub-resources. - - - - Compat conference management with participants, recordings, and streams. - - - - Compat fax management with media sub-resources. - - - - Compat cXML/LaML script management. - - - - Compat message management with media sub-resources. - - - - Twilio-compatible LAML API namespace with AccountSid scoping. - - - - Compat phone number management. - - - - Compat queue management with members. - - - - Compat recording management. - - - - Compat API token management. - - - - Compat transcription management. - - - -## Source - -[`signalwire/signalwire/rest/namespaces/compat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py) diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/datasphere/datasphere-documents/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/datasphere/datasphere-documents/index.mdx deleted file mode 100644 index a551172a48..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/datasphere/datasphere-documents/index.mdx +++ /dev/null @@ -1,139 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/datasphere/datasphere-documents" -title: "DatasphereDocuments" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.datasphere.DatasphereDocuments" - parent: "signalwire.rest.namespaces.datasphere" - module: "signalwire.rest.namespaces.datasphere" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/datasphere.py" ---- -# `DatasphereDocuments` - -Document management with search and chunk operations. - -## Signature - -```python -class DatasphereDocuments(CrudResource) -``` - -## Inheritance - -**Extends:** `CrudResource` - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(http) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/datasphere.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/datasphere.py) - -Line 20. - -*** - -### delete\_chunk - -#### Signature - -```python -delete_chunk(document_id, chunk_id) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/datasphere.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/datasphere.py) - -Line 32. - -*** - -### get\_chunk - -#### Signature - -```python -get_chunk(document_id, chunk_id) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/datasphere.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/datasphere.py) - -Line 29. - -*** - -### list\_chunks - -#### Signature - -```python -list_chunks(document_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/datasphere.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/datasphere.py) - -Line 26. - -*** - -### search - -#### Signature - -```python -search(**kwargs = {}) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/datasphere.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/datasphere.py) - -Line 23. - -## Source - -[`signalwire/signalwire/rest/namespaces/datasphere.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/datasphere.py) - -Line 17. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/datasphere/datasphere-namespace/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/datasphere/datasphere-namespace/index.mdx deleted file mode 100644 index caa1716d22..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/datasphere/datasphere-namespace/index.mdx +++ /dev/null @@ -1,53 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/datasphere/datasphere-namespace" -title: "DatasphereNamespace" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.datasphere.DatasphereNamespace" - parent: "signalwire.rest.namespaces.datasphere" - module: "signalwire.rest.namespaces.datasphere" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/datasphere.py" ---- -# `DatasphereNamespace` - -Datasphere API namespace. - -## Signature - -```python -class DatasphereNamespace -``` - -## Properties - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(http) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/datasphere.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/datasphere.py) - -Line 39. - -## Source - -[`signalwire/signalwire/rest/namespaces/datasphere.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/datasphere.py) - -Line 36. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/datasphere/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/datasphere/index.mdx deleted file mode 100644 index c977de38fa..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/datasphere/index.mdx +++ /dev/null @@ -1,44 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/datasphere" -title: "datasphere" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.rest.namespaces.datasphere" - parent: "signalwire.rest.namespaces" - module: "signalwire.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/datasphere.py" ---- -# `datasphere` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module datasphere -``` - -## Classes - - - - Document management with search and chunk operations. - - - - Datasphere API namespace. - - - -## Source - -[`signalwire/signalwire/rest/namespaces/datasphere.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/datasphere.py) diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/auto-materialized-webhook/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/auto-materialized-webhook/index.mdx deleted file mode 100644 index 7b2b8efb93..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/auto-materialized-webhook/index.mdx +++ /dev/null @@ -1,59 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/fabric/auto-materialized-webhook" -title: "AutoMaterializedWebhook" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.fabric.AutoMaterializedWebhook" - parent: "signalwire.rest.namespaces.fabric" - module: "signalwire.rest.namespaces.fabric" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py" ---- -# `AutoMaterializedWebhook` - -Fabric webhook resource that's normally auto-created by phone\_numbers.set\_\*. - -Exposed for backwards compatibility. The binding model for these resources -is on the phone number (see `phone_numbers.set_swml_webhook` / -`set_cxml_webhook`) — setting `call_handler` on a phone number -auto-materializes the webhook. Calling `create` here produces an orphan -resource that isn't bound to any phone number. - -## Signature - -```python -class AutoMaterializedWebhook(FabricResource) -``` - -## Inheritance - -**Extends:** [FabricResource](/docs/sdk-reference/reference/python/signalwire/rest/namespaces/fabric/fabric-resource) - -## Methods - -### create - -#### Signature - -```python -create(**kwargs = {}) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) - -Line 41. - -## Source - -[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) - -Line 29. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/call-flows-resource/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/call-flows-resource/index.mdx deleted file mode 100644 index bc93568e45..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/call-flows-resource/index.mdx +++ /dev/null @@ -1,101 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/fabric/call-flows-resource" -title: "CallFlowsResource" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.fabric.CallFlowsResource" - parent: "signalwire.rest.namespaces.fabric" - module: "signalwire.rest.namespaces.fabric" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py" ---- -# `CallFlowsResource` - -Call flows with version management. - -Note: call\_flow (singular) is used in address/version paths per the API spec. - -## Signature - -```python -class CallFlowsResource(FabricResourcePUT) -``` - -## Inheritance - -**Extends:** [FabricResourcePUT](/docs/sdk-reference/reference/python/signalwire/rest/namespaces/fabric/fabric-resource-put) - -## Methods - -### deploy\_version - -#### Signature - -```python -deploy_version(resource_id, **kwargs = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) - -Line 76. - -*** - -### list\_addresses - -#### Signature - -```python -list_addresses(resource_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) - -Line 67. - -*** - -### list\_versions - -#### Signature - -```python -list_versions(resource_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) - -Line 72. - -## Source - -[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) - -Line 61. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/conference-rooms-resource/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/conference-rooms-resource/index.mdx deleted file mode 100644 index e05ac064d7..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/conference-rooms-resource/index.mdx +++ /dev/null @@ -1,55 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/fabric/conference-rooms-resource" -title: "ConferenceRoomsResource" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.fabric.ConferenceRoomsResource" - parent: "signalwire.rest.namespaces.fabric" - module: "signalwire.rest.namespaces.fabric" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py" ---- -# `ConferenceRoomsResource` - -Conference rooms — uses singular 'conference\_room' for sub-resource paths. - -## Signature - -```python -class ConferenceRoomsResource(FabricResourcePUT) -``` - -## Inheritance - -**Extends:** [FabricResourcePUT](/docs/sdk-reference/reference/python/signalwire/rest/namespaces/fabric/fabric-resource-put) - -## Methods - -### list\_addresses - -#### Signature - -```python -list_addresses(resource_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) - -Line 84. - -## Source - -[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) - -Line 81. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/cxml-applications-resource/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/cxml-applications-resource/index.mdx deleted file mode 100644 index f2c129918b..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/cxml-applications-resource/index.mdx +++ /dev/null @@ -1,53 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/fabric/cxml-applications-resource" -title: "CxmlApplicationsResource" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.fabric.CxmlApplicationsResource" - parent: "signalwire.rest.namespaces.fabric" - module: "signalwire.rest.namespaces.fabric" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py" ---- -# `CxmlApplicationsResource` - -cXML applications — no create method (read/update/delete only). - -## Signature - -```python -class CxmlApplicationsResource(FabricResourcePUT) -``` - -## Inheritance - -**Extends:** [FabricResourcePUT](/docs/sdk-reference/reference/python/signalwire/rest/namespaces/fabric/fabric-resource-put) - -## Methods - -### create - -#### Signature - -```python -create(**kwargs = {}) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) - -Line 124. - -## Source - -[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) - -Line 121. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/cxml-webhooks-resource/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/cxml-webhooks-resource/index.mdx deleted file mode 100644 index 7fd7766fa0..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/cxml-webhooks-resource/index.mdx +++ /dev/null @@ -1,31 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/fabric/cxml-webhooks-resource" -title: "CxmlWebhooksResource" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.fabric.CxmlWebhooksResource" - parent: "signalwire.rest.namespaces.fabric" - module: "signalwire.rest.namespaces.fabric" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py" ---- -# `CxmlWebhooksResource` - -## Signature - -```python -class CxmlWebhooksResource(AutoMaterializedWebhook) -``` - -## Inheritance - -**Extends:** [AutoMaterializedWebhook](/docs/sdk-reference/reference/python/signalwire/rest/namespaces/fabric/auto-materialized-webhook) - -## Source - -[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) - -Line 57. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/fabric-addresses/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/fabric-addresses/index.mdx deleted file mode 100644 index c196537826..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/fabric-addresses/index.mdx +++ /dev/null @@ -1,73 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/fabric/fabric-addresses" -title: "FabricAddresses" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.fabric.FabricAddresses" - parent: "signalwire.rest.namespaces.fabric" - module: "signalwire.rest.namespaces.fabric" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py" ---- -# `FabricAddresses` - -Read-only fabric addresses. - -## Signature - -```python -class FabricAddresses(BaseResource) -``` - -## Inheritance - -**Extends:** `BaseResource` - -## Methods - -### get - -#### Signature - -```python -get(address_id) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) - -Line 178. - -*** - -### list - -#### Signature - -```python -list(**params = {}) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) - -Line 175. - -## Source - -[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) - -Line 172. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/fabric-namespace/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/fabric-namespace/index.mdx deleted file mode 100644 index 497505f140..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/fabric-namespace/index.mdx +++ /dev/null @@ -1,83 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/fabric/fabric-namespace" -title: "FabricNamespace" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.fabric.FabricNamespace" - parent: "signalwire.rest.namespaces.fabric" - module: "signalwire.rest.namespaces.fabric" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py" ---- -# `FabricNamespace` - -Fabric API namespace grouping all resource types. - -## Signature - -```python -class FabricNamespace -``` - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(http) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) - -Line 207. - -## Source - -[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) - -Line 204. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/fabric-resource-put/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/fabric-resource-put/index.mdx deleted file mode 100644 index df98434f74..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/fabric-resource-put/index.mdx +++ /dev/null @@ -1,33 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/fabric/fabric-resource-put" -title: "FabricResourcePUT" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.fabric.FabricResourcePUT" - parent: "signalwire.rest.namespaces.fabric" - module: "signalwire.rest.namespaces.fabric" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py" ---- -# `FabricResourcePUT` - -Fabric resource that uses PUT for updates. - -## Signature - -```python -class FabricResourcePUT(CrudWithAddresses) -``` - -## Inheritance - -**Extends:** `CrudWithAddresses` - -## Source - -[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) - -Line 24. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/fabric-resource/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/fabric-resource/index.mdx deleted file mode 100644 index b6c3e51e63..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/fabric-resource/index.mdx +++ /dev/null @@ -1,33 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/fabric/fabric-resource" -title: "FabricResource" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.fabric.FabricResource" - parent: "signalwire.rest.namespaces.fabric" - module: "signalwire.rest.namespaces.fabric" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py" ---- -# `FabricResource` - -Standard fabric resource with CRUD + addresses. - -## Signature - -```python -class FabricResource(CrudWithAddresses) -``` - -## Inheritance - -**Extends:** `CrudWithAddresses` - -## Source - -[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) - -Line 19. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/fabric-tokens/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/fabric-tokens/index.mdx deleted file mode 100644 index 6708cf8513..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/fabric-tokens/index.mdx +++ /dev/null @@ -1,153 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/fabric/fabric-tokens" -title: "FabricTokens" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.fabric.FabricTokens" - parent: "signalwire.rest.namespaces.fabric" - module: "signalwire.rest.namespaces.fabric" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py" ---- -# `FabricTokens` - -Subscriber, guest, invite, and embed token creation. - -## Signature - -```python -class FabricTokens(BaseResource) -``` - -## Inheritance - -**Extends:** `BaseResource` - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(http) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) - -Line 185. - -*** - -### create\_embed\_token - -#### Signature - -```python -create_embed_token(**kwargs = {}) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) - -Line 200. - -*** - -### create\_guest\_token - -#### Signature - -```python -create_guest_token(**kwargs = {}) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) - -Line 197. - -*** - -### create\_invite\_token - -#### Signature - -```python -create_invite_token(**kwargs = {}) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) - -Line 194. - -*** - -### create\_subscriber\_token - -#### Signature - -```python -create_subscriber_token(**kwargs = {}) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) - -Line 188. - -*** - -### refresh\_subscriber\_token - -#### Signature - -```python -refresh_subscriber_token(**kwargs = {}) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) - -Line 191. - -## Source - -[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) - -Line 182. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/generic-resources/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/generic-resources/index.mdx deleted file mode 100644 index fe5c3efe8a..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/generic-resources/index.mdx +++ /dev/null @@ -1,169 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/fabric/generic-resources" -title: "GenericResources" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.fabric.GenericResources" - parent: "signalwire.rest.namespaces.fabric" - module: "signalwire.rest.namespaces.fabric" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py" ---- -# `GenericResources` - -Generic resource operations across all fabric resource types. - -## Signature - -```python -class GenericResources(BaseResource) -``` - -## Inheritance - -**Extends:** `BaseResource` - -## Methods - -### assign\_domain\_application - -#### Signature - -```python -assign_domain_application(resource_id, **kwargs = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) - -Line 168. - -*** - -### assign\_phone\_route - -Deprecated for the common binding cases. Use `phone_numbers.set_*` helpers. - -This endpoint (`POST /api/fabric/resources/{id}/phone_routes`) accepts -only a narrow set of legacy resource types as the attach target. It -**does not work** for `swml_webhook` / `cxml_webhook` / `ai_agent` -bindings — those are configured on the phone number and the Fabric -resource is auto-materialized (see `phone_numbers.set_swml_webhook` -etc.). The authoritative list of accepting resource types lives in the -OpenAPI spec; routing here for those types returns 404 or 422. - -#### Signature - -```python -assign_phone_route(resource_id, **kwargs = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) - -Line 146. - -*** - -### delete - -#### Signature - -```python -delete(resource_id) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) - -Line 137. - -*** - -### get - -#### Signature - -```python -get(resource_id) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) - -Line 134. - -*** - -### list - -#### Signature - -```python -list(**params = {}) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) - -Line 131. - -*** - -### list\_addresses - -#### Signature - -```python -list_addresses(resource_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) - -Line 140. - -## Source - -[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) - -Line 128. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/index.mdx deleted file mode 100644 index 12a0f85347..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/index.mdx +++ /dev/null @@ -1,84 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/fabric" -title: "fabric" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.rest.namespaces.fabric" - parent: "signalwire.rest.namespaces" - module: "signalwire.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py" ---- -# `fabric` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module fabric -``` - -## Classes - - - - Fabric webhook resource that's normally auto-created by phone\_numbers.set\_\*. - - - - Call flows with version management. - - - - Conference rooms — uses singular 'conference\_room' for sub-resource paths. - - - - cXML applications — no create method (read/update/delete only). - - - - - - Read-only fabric addresses. - - - - Fabric API namespace grouping all resource types. - - - - Standard fabric resource with CRUD + addresses. - - - - Fabric resource that uses PUT for updates. - - - - Subscriber, guest, invite, and embed token creation. - - - - Generic resource operations across all fabric resource types. - - - - Subscribers with SIP endpoint management. - - - - - -## Source - -[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/subscribers-resource/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/subscribers-resource/index.mdx deleted file mode 100644 index 290a8130f3..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/subscribers-resource/index.mdx +++ /dev/null @@ -1,145 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/fabric/subscribers-resource" -title: "SubscribersResource" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.fabric.SubscribersResource" - parent: "signalwire.rest.namespaces.fabric" - module: "signalwire.rest.namespaces.fabric" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py" ---- -# `SubscribersResource` - -Subscribers with SIP endpoint management. - -## Signature - -```python -class SubscribersResource(FabricResourcePUT) -``` - -## Inheritance - -**Extends:** [FabricResourcePUT](/docs/sdk-reference/reference/python/signalwire/rest/namespaces/fabric/fabric-resource-put) - -## Methods - -### create\_sip\_endpoint - -#### Signature - -```python -create_sip_endpoint(subscriber_id, **kwargs = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) - -Line 98. - -*** - -### delete\_sip\_endpoint - -#### Signature - -```python -delete_sip_endpoint(subscriber_id, endpoint_id) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) - -Line 115. - -*** - -### get\_sip\_endpoint - -#### Signature - -```python -get_sip_endpoint(subscriber_id, endpoint_id) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) - -Line 104. - -*** - -### list\_sip\_endpoints - -#### Signature - -```python -list_sip_endpoints(subscriber_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) - -Line 92. - -*** - -### update\_sip\_endpoint - -#### Signature - -```python -update_sip_endpoint(subscriber_id, endpoint_id, **kwargs = {}) -``` - -#### Parameters - - - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) - -Line 109. - -## Source - -[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) - -Line 89. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/swml-webhooks-resource/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/swml-webhooks-resource/index.mdx deleted file mode 100644 index 6e2f28c94e..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/fabric/swml-webhooks-resource/index.mdx +++ /dev/null @@ -1,31 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/fabric/swml-webhooks-resource" -title: "SwmlWebhooksResource" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.fabric.SwmlWebhooksResource" - parent: "signalwire.rest.namespaces.fabric" - module: "signalwire.rest.namespaces.fabric" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py" ---- -# `SwmlWebhooksResource` - -## Signature - -```python -class SwmlWebhooksResource(AutoMaterializedWebhook) -``` - -## Inheritance - -**Extends:** [AutoMaterializedWebhook](/docs/sdk-reference/reference/python/signalwire/rest/namespaces/fabric/auto-materialized-webhook) - -## Source - -[`signalwire/signalwire/rest/namespaces/fabric.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py) - -Line 53. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/imported-numbers/imported-numbers-resource/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/imported-numbers/imported-numbers-resource/index.mdx deleted file mode 100644 index b75a6c54e7..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/imported-numbers/imported-numbers-resource/index.mdx +++ /dev/null @@ -1,73 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/imported-numbers/imported-numbers-resource" -title: "ImportedNumbersResource" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.imported_numbers.ImportedNumbersResource" - parent: "signalwire.rest.namespaces.imported_numbers" - module: "signalwire.rest.namespaces.imported_numbers" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/imported_numbers.py" ---- -# `ImportedNumbersResource` - -Import externally-hosted phone numbers. - -## Signature - -```python -class ImportedNumbersResource(BaseResource) -``` - -## Inheritance - -**Extends:** `BaseResource` - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(http) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/imported_numbers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/imported_numbers.py) - -Line 20. - -*** - -### create - -#### Signature - -```python -create(**kwargs = {}) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/imported_numbers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/imported_numbers.py) - -Line 23. - -## Source - -[`signalwire/signalwire/rest/namespaces/imported_numbers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/imported_numbers.py) - -Line 17. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/imported-numbers/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/imported-numbers/index.mdx deleted file mode 100644 index 5216a4f7e0..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/imported-numbers/index.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/imported-numbers" -title: "imported_numbers" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.rest.namespaces.imported_numbers" - parent: "signalwire.rest.namespaces" - module: "signalwire.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/imported_numbers.py" ---- -# `imported_numbers` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module imported_numbers -``` - -## Classes - - - - Import externally-hosted phone numbers. - - - -## Source - -[`signalwire/signalwire/rest/namespaces/imported_numbers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/imported_numbers.py) diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/index.mdx deleted file mode 100644 index 3d74e91b87..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/index.mdx +++ /dev/null @@ -1,120 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces" -title: "namespaces" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.rest.namespaces" - parent: "signalwire.rest" - module: "signalwire.rest" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/__init__.py" ---- -# `namespaces` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module namespaces -``` - -## Modules - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - -## Source - -[`signalwire/signalwire/rest/namespaces/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/logs/conference-logs/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/logs/conference-logs/index.mdx deleted file mode 100644 index 412bebfd74..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/logs/conference-logs/index.mdx +++ /dev/null @@ -1,53 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/logs/conference-logs" -title: "ConferenceLogs" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.logs.ConferenceLogs" - parent: "signalwire.rest.namespaces.logs" - module: "signalwire.rest.namespaces.logs" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/logs.py" ---- -# `ConferenceLogs` - -Conference log queries. - -## Signature - -```python -class ConferenceLogs(BaseResource) -``` - -## Inheritance - -**Extends:** `BaseResource` - -## Methods - -### list - -#### Signature - -```python -list(**params = {}) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/logs.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/logs.py) - -Line 53. - -## Source - -[`signalwire/signalwire/rest/namespaces/logs.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/logs.py) - -Line 50. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/logs/fax-logs/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/logs/fax-logs/index.mdx deleted file mode 100644 index 115dd0201d..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/logs/fax-logs/index.mdx +++ /dev/null @@ -1,73 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/logs/fax-logs" -title: "FaxLogs" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.logs.FaxLogs" - parent: "signalwire.rest.namespaces.logs" - module: "signalwire.rest.namespaces.logs" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/logs.py" ---- -# `FaxLogs` - -Fax log queries. - -## Signature - -```python -class FaxLogs(BaseResource) -``` - -## Inheritance - -**Extends:** `BaseResource` - -## Methods - -### get - -#### Signature - -```python -get(log_id) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/logs.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/logs.py) - -Line 46. - -*** - -### list - -#### Signature - -```python -list(**params = {}) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/logs.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/logs.py) - -Line 43. - -## Source - -[`signalwire/signalwire/rest/namespaces/logs.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/logs.py) - -Line 40. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/logs/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/logs/index.mdx deleted file mode 100644 index adf709662a..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/logs/index.mdx +++ /dev/null @@ -1,56 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/logs" -title: "logs" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.rest.namespaces.logs" - parent: "signalwire.rest.namespaces" - module: "signalwire.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/logs.py" ---- -# `logs` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module logs -``` - -## Classes - - - - Conference log queries. - - - - Fax log queries. - - - - Logs API namespace. - - - - Message log queries. - - - - Voice log queries. - - - -## Source - -[`signalwire/signalwire/rest/namespaces/logs.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/logs.py) diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/logs/logs-namespace/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/logs/logs-namespace/index.mdx deleted file mode 100644 index 8b5343fe5c..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/logs/logs-namespace/index.mdx +++ /dev/null @@ -1,59 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/logs/logs-namespace" -title: "LogsNamespace" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.logs.LogsNamespace" - parent: "signalwire.rest.namespaces.logs" - module: "signalwire.rest.namespaces.logs" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/logs.py" ---- -# `LogsNamespace` - -Logs API namespace. - -## Signature - -```python -class LogsNamespace -``` - -## Properties - - - - - - - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(http) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/logs.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/logs.py) - -Line 60. - -## Source - -[`signalwire/signalwire/rest/namespaces/logs.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/logs.py) - -Line 57. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/logs/message-logs/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/logs/message-logs/index.mdx deleted file mode 100644 index 768969b036..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/logs/message-logs/index.mdx +++ /dev/null @@ -1,73 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/logs/message-logs" -title: "MessageLogs" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.logs.MessageLogs" - parent: "signalwire.rest.namespaces.logs" - module: "signalwire.rest.namespaces.logs" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/logs.py" ---- -# `MessageLogs` - -Message log queries. - -## Signature - -```python -class MessageLogs(BaseResource) -``` - -## Inheritance - -**Extends:** `BaseResource` - -## Methods - -### get - -#### Signature - -```python -get(log_id) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/logs.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/logs.py) - -Line 23. - -*** - -### list - -#### Signature - -```python -list(**params = {}) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/logs.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/logs.py) - -Line 20. - -## Source - -[`signalwire/signalwire/rest/namespaces/logs.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/logs.py) - -Line 17. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/logs/voice-logs/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/logs/voice-logs/index.mdx deleted file mode 100644 index c065d3f487..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/logs/voice-logs/index.mdx +++ /dev/null @@ -1,95 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/logs/voice-logs" -title: "VoiceLogs" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.logs.VoiceLogs" - parent: "signalwire.rest.namespaces.logs" - module: "signalwire.rest.namespaces.logs" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/logs.py" ---- -# `VoiceLogs` - -Voice log queries. - -## Signature - -```python -class VoiceLogs(BaseResource) -``` - -## Inheritance - -**Extends:** `BaseResource` - -## Methods - -### get - -#### Signature - -```python -get(log_id) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/logs.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/logs.py) - -Line 33. - -*** - -### list - -#### Signature - -```python -list(**params = {}) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/logs.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/logs.py) - -Line 30. - -*** - -### list\_events - -#### Signature - -```python -list_events(log_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/logs.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/logs.py) - -Line 36. - -## Source - -[`signalwire/signalwire/rest/namespaces/logs.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/logs.py) - -Line 27. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/lookup/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/lookup/index.mdx deleted file mode 100644 index d501e29044..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/lookup/index.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/lookup" -title: "lookup" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.rest.namespaces.lookup" - parent: "signalwire.rest.namespaces" - module: "signalwire.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/lookup.py" ---- -# `lookup` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module lookup -``` - -## Classes - - - - Phone number lookup (carrier, CNAM). - - - -## Source - -[`signalwire/signalwire/rest/namespaces/lookup.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/lookup.py) diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/lookup/lookup-resource/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/lookup/lookup-resource/index.mdx deleted file mode 100644 index b88684dde3..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/lookup/lookup-resource/index.mdx +++ /dev/null @@ -1,75 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/lookup/lookup-resource" -title: "LookupResource" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.lookup.LookupResource" - parent: "signalwire.rest.namespaces.lookup" - module: "signalwire.rest.namespaces.lookup" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/lookup.py" ---- -# `LookupResource` - -Phone number lookup (carrier, CNAM). - -## Signature - -```python -class LookupResource(BaseResource) -``` - -## Inheritance - -**Extends:** `BaseResource` - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(http) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/lookup.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/lookup.py) - -Line 20. - -*** - -### phone\_number - -#### Signature - -```python -phone_number(e164, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/lookup.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/lookup.py) - -Line 23. - -## Source - -[`signalwire/signalwire/rest/namespaces/lookup.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/lookup.py) - -Line 17. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/mfa/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/mfa/index.mdx deleted file mode 100644 index 9550715e84..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/mfa/index.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/mfa" -title: "mfa" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.rest.namespaces.mfa" - parent: "signalwire.rest.namespaces" - module: "signalwire.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/mfa.py" ---- -# `mfa` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module mfa -``` - -## Classes - - - - Multi-factor authentication via SMS or phone call. - - - -## Source - -[`signalwire/signalwire/rest/namespaces/mfa.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/mfa.py) diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/mfa/mfa-resource/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/mfa/mfa-resource/index.mdx deleted file mode 100644 index f5b2ae74a3..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/mfa/mfa-resource/index.mdx +++ /dev/null @@ -1,115 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/mfa/mfa-resource" -title: "MfaResource" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.mfa.MfaResource" - parent: "signalwire.rest.namespaces.mfa" - module: "signalwire.rest.namespaces.mfa" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/mfa.py" ---- -# `MfaResource` - -Multi-factor authentication via SMS or phone call. - -## Signature - -```python -class MfaResource(BaseResource) -``` - -## Inheritance - -**Extends:** `BaseResource` - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(http) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/mfa.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/mfa.py) - -Line 20. - -*** - -### call - -#### Signature - -```python -call(**kwargs = {}) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/mfa.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/mfa.py) - -Line 26. - -*** - -### sms - -#### Signature - -```python -sms(**kwargs = {}) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/mfa.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/mfa.py) - -Line 23. - -*** - -### verify - -#### Signature - -```python -verify(request_id, **kwargs = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/mfa.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/mfa.py) - -Line 29. - -## Source - -[`signalwire/signalwire/rest/namespaces/mfa.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/mfa.py) - -Line 17. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/number-groups/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/number-groups/index.mdx deleted file mode 100644 index 02756081fe..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/number-groups/index.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/number-groups" -title: "number_groups" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.rest.namespaces.number_groups" - parent: "signalwire.rest.namespaces" - module: "signalwire.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/number_groups.py" ---- -# `number_groups` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module number_groups -``` - -## Classes - - - - Number group management with membership operations. - - - -## Source - -[`signalwire/signalwire/rest/namespaces/number_groups.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/number_groups.py) diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/number-groups/number-groups-resource/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/number-groups/number-groups-resource/index.mdx deleted file mode 100644 index 2b9af1f93f..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/number-groups/number-groups-resource/index.mdx +++ /dev/null @@ -1,137 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/number-groups/number-groups-resource" -title: "NumberGroupsResource" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.number_groups.NumberGroupsResource" - parent: "signalwire.rest.namespaces.number_groups" - module: "signalwire.rest.namespaces.number_groups" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/number_groups.py" ---- -# `NumberGroupsResource` - -Number group management with membership operations. - -## Signature - -```python -class NumberGroupsResource(CrudResource) -``` - -## Inheritance - -**Extends:** `CrudResource` - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(http) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/number_groups.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/number_groups.py) - -Line 22. - -*** - -### add\_membership - -#### Signature - -```python -add_membership(group_id, **kwargs = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/number_groups.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/number_groups.py) - -Line 31. - -*** - -### delete\_membership - -#### Signature - -```python -delete_membership(membership_id) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/number_groups.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/number_groups.py) - -Line 40. - -*** - -### get\_membership - -#### Signature - -```python -get_membership(membership_id) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/number_groups.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/number_groups.py) - -Line 37. - -*** - -### list\_memberships - -#### Signature - -```python -list_memberships(group_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/number_groups.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/number_groups.py) - -Line 25. - -## Source - -[`signalwire/signalwire/rest/namespaces/number_groups.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/number_groups.py) - -Line 17. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/phone-numbers/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/phone-numbers/index.mdx deleted file mode 100644 index 704e5a777e..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/phone-numbers/index.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/phone-numbers" -title: "phone_numbers" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.rest.namespaces.phone_numbers" - parent: "signalwire.rest.namespaces" - module: "signalwire.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/phone_numbers.py" ---- -# `phone_numbers` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module phone_numbers -``` - -## Classes - - - - Phone number management. - - - -## Source - -[`signalwire/signalwire/rest/namespaces/phone_numbers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/phone_numbers.py) diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/phone-numbers/phone-numbers-resource/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/phone-numbers/phone-numbers-resource/index.mdx deleted file mode 100644 index 789dbf6551..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/phone-numbers/phone-numbers-resource/index.mdx +++ /dev/null @@ -1,330 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/phone-numbers/phone-numbers-resource" -title: "PhoneNumbersResource" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.phone_numbers.PhoneNumbersResource" - parent: "signalwire.rest.namespaces.phone_numbers" - module: "signalwire.rest.namespaces.phone_numbers" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/phone_numbers.py" ---- -# `PhoneNumbersResource` - -Phone number management. - -Supports the standard CRUD surface plus typed helpers for binding an -inbound call to a handler (SWML webhook, cXML webhook, AI agent, call -flow, RELAY application/topic). The binding model is: set -`call_handler` + the handler-specific companion field on the phone -number; the server auto-materializes the matching Fabric resource. -See :mod:`signalwire.rest.call_handler` for the enum, and the -porting-sdk's `phone-binding.md` for the full model. - -## Signature - -```python -class PhoneNumbersResource(CrudResource) -``` - -## Inheritance - -**Extends:** `CrudResource` - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(http) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/phone_numbers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/phone_numbers.py) - -Line 34. - -*** - -### search - -#### Signature - -```python -search(**params = {}) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/phone_numbers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/phone_numbers.py) - -Line 37. - -*** - -### set\_ai\_agent - -Route inbound calls to an AI Agent Fabric resource by ID. - -#### Signature - -```python -set_ai_agent(resource_id: str, agent_id: str, **extra = {}) -> dict -``` - -#### Parameters - - - - - - - -#### Returns - -`dict` - -#### Source - -[`signalwire/signalwire/rest/namespaces/phone_numbers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/phone_numbers.py) - -Line 95. - -*** - -### set\_call\_flow - -Route inbound calls to a Call Flow by ID. - -`version` accepts `"working_copy"` or `"current_deployed"` -(server default when omitted). - -#### Signature - -```python -set_call_flow( - resource_id: str, - flow_id: str, - version: Optional[str] = None, - **extra = {} -) -> dict -``` - -#### Parameters - - - - - - - - - -#### Returns - -`dict` - -#### Source - -[`signalwire/signalwire/rest/namespaces/phone_numbers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/phone_numbers.py) - -Line 104. - -*** - -### set\_cxml\_application - -Route inbound calls to an existing cXML application by ID. - -#### Signature - -```python -set_cxml_application( - resource_id: str, - application_id: str, - **extra = {} -) -> dict -``` - -#### Parameters - - - - - - - -#### Returns - -`dict` - -#### Source - -[`signalwire/signalwire/rest/namespaces/phone_numbers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/phone_numbers.py) - -Line 86. - -*** - -### set\_cxml\_webhook - -Route inbound calls to a cXML (Twilio-compat / LAML) webhook. - -Despite the wire value `laml_webhooks` being plural, this creates -a single `cxml_webhook` Fabric resource. `fallback_url` is used -when the primary URL fails; `status_callback_url` receives call -status updates. - -#### Signature - -```python -set_cxml_webhook( - resource_id: str, - url: str, - fallback_url: Optional[str] = None, - status_callback_url: Optional[str] = None, - **extra = {} -) -> dict -``` - -#### Parameters - - - - - - - - - - - -#### Returns - -`dict` - -#### Source - -[`signalwire/signalwire/rest/namespaces/phone_numbers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/phone_numbers.py) - -Line 60. - -*** - -### set\_relay\_application - -Route inbound calls to a named RELAY application. - -#### Signature - -```python -set_relay_application(resource_id: str, name: str, **extra = {}) -> dict -``` - -#### Parameters - - - - - - - -#### Returns - -`dict` - -#### Source - -[`signalwire/signalwire/rest/namespaces/phone_numbers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/phone_numbers.py) - -Line 125. - -*** - -### set\_relay\_topic - -Route inbound calls to a RELAY topic (client subscription). - -#### Signature - -```python -set_relay_topic( - resource_id: str, - topic: str, - status_callback_url: Optional[str] = None, - **extra = {} -) -> dict -``` - -#### Parameters - - - - - - - - - -#### Returns - -`dict` - -#### Source - -[`signalwire/signalwire/rest/namespaces/phone_numbers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/phone_numbers.py) - -Line 134. - -*** - -### set\_swml\_webhook - -Route inbound calls to an SWML webhook URL. - -Your backend returns an SWML document per call. The server -auto-creates a `swml_webhook` Fabric resource keyed off this URL. - -#### Signature - -```python -set_swml_webhook(resource_id: str, url: str, **extra = {}) -> dict -``` - -#### Parameters - - - - - - - -#### Returns - -`dict` - -#### Source - -[`signalwire/signalwire/rest/namespaces/phone_numbers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/phone_numbers.py) - -Line 47. - -## Source - -[`signalwire/signalwire/rest/namespaces/phone_numbers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/phone_numbers.py) - -Line 20. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/project/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/project/index.mdx deleted file mode 100644 index a1b0c54f0e..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/project/index.mdx +++ /dev/null @@ -1,44 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/project" -title: "project" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.rest.namespaces.project" - parent: "signalwire.rest.namespaces" - module: "signalwire.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/project.py" ---- -# `project` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module project -``` - -## Classes - - - - Project API namespace. - - - - Project API token management. - - - -## Source - -[`signalwire/signalwire/rest/namespaces/project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/project.py) diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/project/project-namespace/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/project/project-namespace/index.mdx deleted file mode 100644 index b5343865db..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/project/project-namespace/index.mdx +++ /dev/null @@ -1,53 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/project/project-namespace" -title: "ProjectNamespace" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.project.ProjectNamespace" - parent: "signalwire.rest.namespaces.project" - module: "signalwire.rest.namespaces.project" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/project.py" ---- -# `ProjectNamespace` - -Project API namespace. - -## Signature - -```python -class ProjectNamespace -``` - -## Properties - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(http) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/project.py) - -Line 36. - -## Source - -[`signalwire/signalwire/rest/namespaces/project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/project.py) - -Line 33. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/project/project-tokens/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/project/project-tokens/index.mdx deleted file mode 100644 index 143af35534..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/project/project-tokens/index.mdx +++ /dev/null @@ -1,115 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/project/project-tokens" -title: "ProjectTokens" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.project.ProjectTokens" - parent: "signalwire.rest.namespaces.project" - module: "signalwire.rest.namespaces.project" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/project.py" ---- -# `ProjectTokens` - -Project API token management. - -## Signature - -```python -class ProjectTokens(BaseResource) -``` - -## Inheritance - -**Extends:** `BaseResource` - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(http) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/project.py) - -Line 20. - -*** - -### create - -#### Signature - -```python -create(**kwargs = {}) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/project.py) - -Line 23. - -*** - -### delete - -#### Signature - -```python -delete(token_id) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/project.py) - -Line 29. - -*** - -### update - -#### Signature - -```python -update(token_id, **kwargs = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/project.py) - -Line 26. - -## Source - -[`signalwire/signalwire/rest/namespaces/project.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/project.py) - -Line 17. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/pubsub/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/pubsub/index.mdx deleted file mode 100644 index b60a8caeca..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/pubsub/index.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/pubsub" -title: "pubsub" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.rest.namespaces.pubsub" - parent: "signalwire.rest.namespaces" - module: "signalwire.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/pubsub.py" ---- -# `pubsub` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module pubsub -``` - -## Classes - - - - PubSub token generation. - - - -## Source - -[`signalwire/signalwire/rest/namespaces/pubsub.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/pubsub.py) diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/pubsub/pub-sub-resource/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/pubsub/pub-sub-resource/index.mdx deleted file mode 100644 index 9cafd2822f..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/pubsub/pub-sub-resource/index.mdx +++ /dev/null @@ -1,73 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/pubsub/pub-sub-resource" -title: "PubSubResource" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.pubsub.PubSubResource" - parent: "signalwire.rest.namespaces.pubsub" - module: "signalwire.rest.namespaces.pubsub" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/pubsub.py" ---- -# `PubSubResource` - -PubSub token generation. - -## Signature - -```python -class PubSubResource(BaseResource) -``` - -## Inheritance - -**Extends:** `BaseResource` - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(http) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/pubsub.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/pubsub.py) - -Line 20. - -*** - -### create\_token - -#### Signature - -```python -create_token(**kwargs = {}) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/pubsub.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/pubsub.py) - -Line 23. - -## Source - -[`signalwire/signalwire/rest/namespaces/pubsub.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/pubsub.py) - -Line 17. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/queues/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/queues/index.mdx deleted file mode 100644 index 8323fafe26..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/queues/index.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/queues" -title: "queues" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.rest.namespaces.queues" - parent: "signalwire.rest.namespaces" - module: "signalwire.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/queues.py" ---- -# `queues` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module queues -``` - -## Classes - - - - Queue management with member operations. - - - -## Source - -[`signalwire/signalwire/rest/namespaces/queues.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/queues.py) diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/queues/queues-resource/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/queues/queues-resource/index.mdx deleted file mode 100644 index afee10bc92..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/queues/queues-resource/index.mdx +++ /dev/null @@ -1,117 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/queues/queues-resource" -title: "QueuesResource" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.queues.QueuesResource" - parent: "signalwire.rest.namespaces.queues" - module: "signalwire.rest.namespaces.queues" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/queues.py" ---- -# `QueuesResource` - -Queue management with member operations. - -## Signature - -```python -class QueuesResource(CrudResource) -``` - -## Inheritance - -**Extends:** `CrudResource` - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(http) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/queues.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/queues.py) - -Line 22. - -*** - -### get\_member - -#### Signature - -```python -get_member(queue_id, member_id) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/queues.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/queues.py) - -Line 31. - -*** - -### get\_next\_member - -#### Signature - -```python -get_next_member(queue_id) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/queues.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/queues.py) - -Line 28. - -*** - -### list\_members - -#### Signature - -```python -list_members(queue_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/queues.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/queues.py) - -Line 25. - -## Source - -[`signalwire/signalwire/rest/namespaces/queues.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/queues.py) - -Line 17. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/recordings/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/recordings/index.mdx deleted file mode 100644 index c372a5b768..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/recordings/index.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/recordings" -title: "recordings" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.rest.namespaces.recordings" - parent: "signalwire.rest.namespaces" - module: "signalwire.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/recordings.py" ---- -# `recordings` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module recordings -``` - -## Classes - - - - Recording management (read-only + delete). - - - -## Source - -[`signalwire/signalwire/rest/namespaces/recordings.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/recordings.py) diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/recordings/recordings-resource/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/recordings/recordings-resource/index.mdx deleted file mode 100644 index 9070ed6c02..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/recordings/recordings-resource/index.mdx +++ /dev/null @@ -1,113 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/recordings/recordings-resource" -title: "RecordingsResource" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.recordings.RecordingsResource" - parent: "signalwire.rest.namespaces.recordings" - module: "signalwire.rest.namespaces.recordings" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/recordings.py" ---- -# `RecordingsResource` - -Recording management (read-only + delete). - -## Signature - -```python -class RecordingsResource(BaseResource) -``` - -## Inheritance - -**Extends:** `BaseResource` - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(http) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/recordings.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/recordings.py) - -Line 20. - -*** - -### delete - -#### Signature - -```python -delete(recording_id) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/recordings.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/recordings.py) - -Line 29. - -*** - -### get - -#### Signature - -```python -get(recording_id) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/recordings.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/recordings.py) - -Line 26. - -*** - -### list - -#### Signature - -```python -list(**params = {}) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/recordings.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/recordings.py) - -Line 23. - -## Source - -[`signalwire/signalwire/rest/namespaces/recordings.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/recordings.py) - -Line 17. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/registry/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/registry/index.mdx deleted file mode 100644 index 48b987d42a..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/registry/index.mdx +++ /dev/null @@ -1,56 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/registry" -title: "registry" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.rest.namespaces.registry" - parent: "signalwire.rest.namespaces" - module: "signalwire.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py" ---- -# `registry` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module registry -``` - -## Classes - - - - 10DLC brand management. - - - - 10DLC campaign management. - - - - 10DLC Campaign Registry namespace. - - - - 10DLC number assignment management. - - - - 10DLC assignment order management. - - - -## Source - -[`signalwire/signalwire/rest/namespaces/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py) diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/registry/registry-brands/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/registry/registry-brands/index.mdx deleted file mode 100644 index c4b91c00df..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/registry/registry-brands/index.mdx +++ /dev/null @@ -1,137 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/registry/registry-brands" -title: "RegistryBrands" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.registry.RegistryBrands" - parent: "signalwire.rest.namespaces.registry" - module: "signalwire.rest.namespaces.registry" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py" ---- -# `RegistryBrands` - -10DLC brand management. - -## Signature - -```python -class RegistryBrands(BaseResource) -``` - -## Inheritance - -**Extends:** `BaseResource` - -## Methods - -### create - -#### Signature - -```python -create(**kwargs = {}) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py) - -Line 23. - -*** - -### create\_campaign - -#### Signature - -```python -create_campaign(brand_id, **kwargs = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py) - -Line 32. - -*** - -### get - -#### Signature - -```python -get(brand_id) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py) - -Line 26. - -*** - -### list - -#### Signature - -```python -list(**params = {}) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py) - -Line 20. - -*** - -### list\_campaigns - -#### Signature - -```python -list_campaigns(brand_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py) - -Line 29. - -## Source - -[`signalwire/signalwire/rest/namespaces/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py) - -Line 17. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/registry/registry-campaigns/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/registry/registry-campaigns/index.mdx deleted file mode 100644 index 1ca265154b..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/registry/registry-campaigns/index.mdx +++ /dev/null @@ -1,141 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/registry/registry-campaigns" -title: "RegistryCampaigns" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.registry.RegistryCampaigns" - parent: "signalwire.rest.namespaces.registry" - module: "signalwire.rest.namespaces.registry" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py" ---- -# `RegistryCampaigns` - -10DLC campaign management. - -## Signature - -```python -class RegistryCampaigns(BaseResource) -``` - -## Inheritance - -**Extends:** `BaseResource` - -## Methods - -### create\_order - -#### Signature - -```python -create_order(campaign_id, **kwargs = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py) - -Line 51. - -*** - -### get - -#### Signature - -```python -get(campaign_id) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py) - -Line 39. - -*** - -### list\_numbers - -#### Signature - -```python -list_numbers(campaign_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py) - -Line 45. - -*** - -### list\_orders - -#### Signature - -```python -list_orders(campaign_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py) - -Line 48. - -*** - -### update - -#### Signature - -```python -update(campaign_id, **kwargs = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py) - -Line 42. - -## Source - -[`signalwire/signalwire/rest/namespaces/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py) - -Line 36. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/registry/registry-namespace/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/registry/registry-namespace/index.mdx deleted file mode 100644 index 7bb9c56981..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/registry/registry-namespace/index.mdx +++ /dev/null @@ -1,59 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/registry/registry-namespace" -title: "RegistryNamespace" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.registry.RegistryNamespace" - parent: "signalwire.rest.namespaces.registry" - module: "signalwire.rest.namespaces.registry" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py" ---- -# `RegistryNamespace` - -10DLC Campaign Registry namespace. - -## Signature - -```python -class RegistryNamespace -``` - -## Properties - - - - - - - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(http) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py) - -Line 72. - -## Source - -[`signalwire/signalwire/rest/namespaces/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py) - -Line 69. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/registry/registry-numbers/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/registry/registry-numbers/index.mdx deleted file mode 100644 index a80ed4e9a1..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/registry/registry-numbers/index.mdx +++ /dev/null @@ -1,53 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/registry/registry-numbers" -title: "RegistryNumbers" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.registry.RegistryNumbers" - parent: "signalwire.rest.namespaces.registry" - module: "signalwire.rest.namespaces.registry" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py" ---- -# `RegistryNumbers` - -10DLC number assignment management. - -## Signature - -```python -class RegistryNumbers(BaseResource) -``` - -## Inheritance - -**Extends:** `BaseResource` - -## Methods - -### delete - -#### Signature - -```python -delete(number_id) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py) - -Line 65. - -## Source - -[`signalwire/signalwire/rest/namespaces/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py) - -Line 62. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/registry/registry-orders/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/registry/registry-orders/index.mdx deleted file mode 100644 index d54e36dad3..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/registry/registry-orders/index.mdx +++ /dev/null @@ -1,53 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/registry/registry-orders" -title: "RegistryOrders" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.registry.RegistryOrders" - parent: "signalwire.rest.namespaces.registry" - module: "signalwire.rest.namespaces.registry" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py" ---- -# `RegistryOrders` - -10DLC assignment order management. - -## Signature - -```python -class RegistryOrders(BaseResource) -``` - -## Inheritance - -**Extends:** `BaseResource` - -## Methods - -### get - -#### Signature - -```python -get(order_id) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py) - -Line 58. - -## Source - -[`signalwire/signalwire/rest/namespaces/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py) - -Line 55. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/short-codes/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/short-codes/index.mdx deleted file mode 100644 index 160a0c9a98..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/short-codes/index.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/short-codes" -title: "short_codes" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.rest.namespaces.short_codes" - parent: "signalwire.rest.namespaces" - module: "signalwire.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/short_codes.py" ---- -# `short_codes` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module short_codes -``` - -## Classes - - - - Short code management (read + update only). - - - -## Source - -[`signalwire/signalwire/rest/namespaces/short_codes.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/short_codes.py) diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/short-codes/short-codes-resource/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/short-codes/short-codes-resource/index.mdx deleted file mode 100644 index 301fd2db8c..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/short-codes/short-codes-resource/index.mdx +++ /dev/null @@ -1,115 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/short-codes/short-codes-resource" -title: "ShortCodesResource" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.short_codes.ShortCodesResource" - parent: "signalwire.rest.namespaces.short_codes" - module: "signalwire.rest.namespaces.short_codes" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/short_codes.py" ---- -# `ShortCodesResource` - -Short code management (read + update only). - -## Signature - -```python -class ShortCodesResource(BaseResource) -``` - -## Inheritance - -**Extends:** `BaseResource` - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(http) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/short_codes.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/short_codes.py) - -Line 20. - -*** - -### get - -#### Signature - -```python -get(short_code_id) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/short_codes.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/short_codes.py) - -Line 26. - -*** - -### list - -#### Signature - -```python -list(**params = {}) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/short_codes.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/short_codes.py) - -Line 23. - -*** - -### update - -#### Signature - -```python -update(short_code_id, **kwargs = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/short_codes.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/short_codes.py) - -Line 29. - -## Source - -[`signalwire/signalwire/rest/namespaces/short_codes.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/short_codes.py) - -Line 17. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/sip-profile/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/sip-profile/index.mdx deleted file mode 100644 index 07e9622c2e..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/sip-profile/index.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/sip-profile" -title: "sip_profile" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.rest.namespaces.sip_profile" - parent: "signalwire.rest.namespaces" - module: "signalwire.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/sip_profile.py" ---- -# `sip_profile` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module sip_profile -``` - -## Classes - - - - Project SIP profile (singleton resource). - - - -## Source - -[`signalwire/signalwire/rest/namespaces/sip_profile.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/sip_profile.py) diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/sip-profile/sip-profile-resource/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/sip-profile/sip-profile-resource/index.mdx deleted file mode 100644 index 9a77e5e287..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/sip-profile/sip-profile-resource/index.mdx +++ /dev/null @@ -1,89 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/sip-profile/sip-profile-resource" -title: "SipProfileResource" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.sip_profile.SipProfileResource" - parent: "signalwire.rest.namespaces.sip_profile" - module: "signalwire.rest.namespaces.sip_profile" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/sip_profile.py" ---- -# `SipProfileResource` - -Project SIP profile (singleton resource). - -## Signature - -```python -class SipProfileResource(BaseResource) -``` - -## Inheritance - -**Extends:** `BaseResource` - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(http) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/sip_profile.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/sip_profile.py) - -Line 20. - -*** - -### get - -#### Signature - -```python -get() -``` - -#### Source - -[`signalwire/signalwire/rest/namespaces/sip_profile.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/sip_profile.py) - -Line 23. - -*** - -### update - -#### Signature - -```python -update(**kwargs = {}) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/sip_profile.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/sip_profile.py) - -Line 26. - -## Source - -[`signalwire/signalwire/rest/namespaces/sip_profile.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/sip_profile.py) - -Line 17. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/verified-callers/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/verified-callers/index.mdx deleted file mode 100644 index 2157a9e0d3..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/verified-callers/index.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/verified-callers" -title: "verified_callers" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.rest.namespaces.verified_callers" - parent: "signalwire.rest.namespaces" - module: "signalwire.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/verified_callers.py" ---- -# `verified_callers` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module verified_callers -``` - -## Classes - - - - Verified caller ID management with verification flow. - - - -## Source - -[`signalwire/signalwire/rest/namespaces/verified_callers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/verified_callers.py) diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/verified-callers/verified-callers-resource/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/verified-callers/verified-callers-resource/index.mdx deleted file mode 100644 index 87652ccd90..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/verified-callers/verified-callers-resource/index.mdx +++ /dev/null @@ -1,95 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/verified-callers/verified-callers-resource" -title: "VerifiedCallersResource" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.verified_callers.VerifiedCallersResource" - parent: "signalwire.rest.namespaces.verified_callers" - module: "signalwire.rest.namespaces.verified_callers" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/verified_callers.py" ---- -# `VerifiedCallersResource` - -Verified caller ID management with verification flow. - -## Signature - -```python -class VerifiedCallersResource(CrudResource) -``` - -## Inheritance - -**Extends:** `CrudResource` - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(http) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/verified_callers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/verified_callers.py) - -Line 22. - -*** - -### redial\_verification - -#### Signature - -```python -redial_verification(caller_id) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/verified_callers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/verified_callers.py) - -Line 25. - -*** - -### submit\_verification - -#### Signature - -```python -submit_verification(caller_id, **kwargs = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/verified_callers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/verified_callers.py) - -Line 28. - -## Source - -[`signalwire/signalwire/rest/namespaces/verified_callers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/verified_callers.py) - -Line 17. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/video/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/video/index.mdx deleted file mode 100644 index 1256a3a351..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/video/index.mdx +++ /dev/null @@ -1,68 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/video" -title: "video" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.rest.namespaces.video" - parent: "signalwire.rest.namespaces" - module: "signalwire.rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py" ---- -# `video` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module video -``` - -## Classes - - - - Video conference management with tokens and streams. - - - - Video conference token management. - - - - Video API namespace. - - - - Video room recording management. - - - - Video room management with streams. - - - - Video room session management. - - - - Video room token generation. - - - - Video stream management. - - - -## Source - -[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/video/video-conference-tokens/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/video/video-conference-tokens/index.mdx deleted file mode 100644 index a7c6931c39..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/video/video-conference-tokens/index.mdx +++ /dev/null @@ -1,73 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/video/video-conference-tokens" -title: "VideoConferenceTokens" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.video.VideoConferenceTokens" - parent: "signalwire.rest.namespaces.video" - module: "signalwire.rest.namespaces.video" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py" ---- -# `VideoConferenceTokens` - -Video conference token management. - -## Signature - -```python -class VideoConferenceTokens(BaseResource) -``` - -## Inheritance - -**Extends:** `BaseResource` - -## Methods - -### get - -#### Signature - -```python -get(token_id) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) - -Line 92. - -*** - -### reset - -#### Signature - -```python -reset(token_id) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) - -Line 95. - -## Source - -[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) - -Line 89. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/video/video-conferences/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/video/video-conferences/index.mdx deleted file mode 100644 index 18172605bf..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/video/video-conferences/index.mdx +++ /dev/null @@ -1,99 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/video/video-conferences" -title: "VideoConferences" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.video.VideoConferences" - parent: "signalwire.rest.namespaces.video" - module: "signalwire.rest.namespaces.video" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py" ---- -# `VideoConferences` - -Video conference management with tokens and streams. - -## Signature - -```python -class VideoConferences(CrudResource) -``` - -## Inheritance - -**Extends:** `CrudResource` - -## Methods - -### create\_stream - -#### Signature - -```python -create_stream(conference_id, **kwargs = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) - -Line 85. - -*** - -### list\_conference\_tokens - -#### Signature - -```python -list_conference_tokens(conference_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) - -Line 76. - -*** - -### list\_streams - -#### Signature - -```python -list_streams(conference_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) - -Line 82. - -## Source - -[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) - -Line 71. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/video/video-namespace/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/video/video-namespace/index.mdx deleted file mode 100644 index a92e0a9914..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/video/video-namespace/index.mdx +++ /dev/null @@ -1,65 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/video/video-namespace" -title: "VideoNamespace" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.video.VideoNamespace" - parent: "signalwire.rest.namespaces.video" - module: "signalwire.rest.namespaces.video" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py" ---- -# `VideoNamespace` - -Video API namespace. - -## Signature - -```python -class VideoNamespace -``` - -## Properties - - - - - - - - - - - - - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(http) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) - -Line 115. - -## Source - -[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) - -Line 112. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/video/video-room-recordings/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/video/video-room-recordings/index.mdx deleted file mode 100644 index fdf83aec37..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/video/video-room-recordings/index.mdx +++ /dev/null @@ -1,115 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/video/video-room-recordings" -title: "VideoRoomRecordings" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.video.VideoRoomRecordings" - parent: "signalwire.rest.namespaces.video" - module: "signalwire.rest.namespaces.video" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py" ---- -# `VideoRoomRecordings` - -Video room recording management. - -## Signature - -```python -class VideoRoomRecordings(BaseResource) -``` - -## Inheritance - -**Extends:** `BaseResource` - -## Methods - -### delete - -#### Signature - -```python -delete(recording_id) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) - -Line 64. - -*** - -### get - -#### Signature - -```python -get(recording_id) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) - -Line 61. - -*** - -### list - -#### Signature - -```python -list(**params = {}) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) - -Line 58. - -*** - -### list\_events - -#### Signature - -```python -list_events(recording_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) - -Line 67. - -## Source - -[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) - -Line 55. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/video/video-room-sessions/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/video/video-room-sessions/index.mdx deleted file mode 100644 index d96e670345..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/video/video-room-sessions/index.mdx +++ /dev/null @@ -1,139 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/video/video-room-sessions" -title: "VideoRoomSessions" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.video.VideoRoomSessions" - parent: "signalwire.rest.namespaces.video" - module: "signalwire.rest.namespaces.video" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py" ---- -# `VideoRoomSessions` - -Video room session management. - -## Signature - -```python -class VideoRoomSessions(BaseResource) -``` - -## Inheritance - -**Extends:** `BaseResource` - -## Methods - -### get - -#### Signature - -```python -get(session_id) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) - -Line 42. - -*** - -### list - -#### Signature - -```python -list(**params = {}) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) - -Line 39. - -*** - -### list\_events - -#### Signature - -```python -list_events(session_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) - -Line 45. - -*** - -### list\_members - -#### Signature - -```python -list_members(session_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) - -Line 48. - -*** - -### list\_recordings - -#### Signature - -```python -list_recordings(session_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) - -Line 51. - -## Source - -[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) - -Line 36. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/video/video-room-tokens/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/video/video-room-tokens/index.mdx deleted file mode 100644 index 34e219f9c6..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/video/video-room-tokens/index.mdx +++ /dev/null @@ -1,53 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/video/video-room-tokens" -title: "VideoRoomTokens" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.video.VideoRoomTokens" - parent: "signalwire.rest.namespaces.video" - module: "signalwire.rest.namespaces.video" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py" ---- -# `VideoRoomTokens` - -Video room token generation. - -## Signature - -```python -class VideoRoomTokens(BaseResource) -``` - -## Inheritance - -**Extends:** `BaseResource` - -## Methods - -### create - -#### Signature - -```python -create(**kwargs = {}) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) - -Line 32. - -## Source - -[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) - -Line 29. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/video/video-rooms/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/video/video-rooms/index.mdx deleted file mode 100644 index 0711a41a0c..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/video/video-rooms/index.mdx +++ /dev/null @@ -1,77 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/video/video-rooms" -title: "VideoRooms" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.video.VideoRooms" - parent: "signalwire.rest.namespaces.video" - module: "signalwire.rest.namespaces.video" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py" ---- -# `VideoRooms` - -Video room management with streams. - -## Signature - -```python -class VideoRooms(CrudResource) -``` - -## Inheritance - -**Extends:** `CrudResource` - -## Methods - -### create\_stream - -#### Signature - -```python -create_stream(room_id, **kwargs = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) - -Line 25. - -*** - -### list\_streams - -#### Signature - -```python -list_streams(room_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) - -Line 22. - -## Source - -[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) - -Line 17. diff --git a/fern/products/sdk-reference/python/signalwire/rest/namespaces/video/video-streams/index.mdx b/fern/products/sdk-reference/python/signalwire/rest/namespaces/video/video-streams/index.mdx deleted file mode 100644 index ba5dff9670..0000000000 --- a/fern/products/sdk-reference/python/signalwire/rest/namespaces/video/video-streams/index.mdx +++ /dev/null @@ -1,95 +0,0 @@ ---- -slug: "/reference/python/signalwire/rest/namespaces/video/video-streams" -title: "VideoStreams" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.video.VideoStreams" - parent: "signalwire.rest.namespaces.video" - module: "signalwire.rest.namespaces.video" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py" ---- -# `VideoStreams` - -Video stream management. - -## Signature - -```python -class VideoStreams(BaseResource) -``` - -## Inheritance - -**Extends:** `BaseResource` - -## Methods - -### delete - -#### Signature - -```python -delete(stream_id) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) - -Line 108. - -*** - -### get - -#### Signature - -```python -get(stream_id) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) - -Line 102. - -*** - -### update - -#### Signature - -```python -update(stream_id, **kwargs = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) - -Line 105. - -## Source - -[`signalwire/signalwire/rest/namespaces/video.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py) - -Line 99. diff --git a/fern/products/sdk-reference/python/signalwire/search/document-processor/document-processor/index.mdx b/fern/products/sdk-reference/python/signalwire/search/document-processor/document-processor/index.mdx deleted file mode 100644 index d92ae081c1..0000000000 --- a/fern/products/sdk-reference/python/signalwire/search/document-processor/document-processor/index.mdx +++ /dev/null @@ -1,151 +0,0 @@ ---- -slug: "/reference/python/signalwire/search/document-processor/document-processor" -title: "DocumentProcessor" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.search.document_processor.DocumentProcessor" - parent: "signalwire.search.document_processor" - module: "signalwire.search.document_processor" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/document_processor.py" ---- -# `DocumentProcessor` - -Enhanced document processor with smart chunking capabilities - -## Signature - -```python -class DocumentProcessor -``` - -## Properties - - - - - - - - - - - - - - - -## Methods - -### \_\_init\_\_ - -Initialize document processor - -#### Signature - -```python -__init__( - chunking_strategy: str = 'sentence', - max_sentences_per_chunk: int = 5, - chunk_size: int = 50, - chunk_overlap: int = 10, - split_newlines: Optional[int] = None, - index_nlp_backend: str = 'nltk', - verbose: bool = False, - semantic_threshold: float = 0.5, - topic_threshold: float = 0.3 -) -``` - -#### Parameters - - - Strategy for chunking documents: - - - - For sentence strategy (default: 5) - - - - For sliding strategy - words per chunk (default: 50) - - - - For sliding strategy - overlap in words (default: 10) - - - - For sentence strategy - split on multiple newlines (optional) - - - - NLP backend for indexing (default: 'nltk') - - - - Whether to enable verbose logging (default: False) - - - - Similarity threshold for semantic chunking (default: 0.5) - - - - Similarity threshold for topic chunking (default: 0.3) - - -#### Source - -[`signalwire/signalwire/search/document_processor.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/document_processor.py) - -Line 82. - -*** - -### create\_chunks - -Create chunks from document content using specified chunking strategy - -#### Signature - -```python -create_chunks( - content: str, - filename: str, - file_type: str -) -> List[Dict[str, Any]] -``` - -#### Parameters - - - Document content (string) - should be the actual content, not a file path - - - - Name of the file (for metadata) - - - - File extension/type - - -#### Returns - -`List[Dict[str, Any]]` — List of chunk dictionaries - -#### Source - -[`signalwire/signalwire/search/document_processor.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/document_processor.py) - -Line 128. - -## Source - -[`signalwire/signalwire/search/document_processor.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/document_processor.py) - -Line 79. diff --git a/fern/products/sdk-reference/python/signalwire/search/document-processor/index.mdx b/fern/products/sdk-reference/python/signalwire/search/document-processor/index.mdx deleted file mode 100644 index 541d7f97cc..0000000000 --- a/fern/products/sdk-reference/python/signalwire/search/document-processor/index.mdx +++ /dev/null @@ -1,49 +0,0 @@ ---- -slug: "/reference/python/signalwire/search/document-processor" -title: "DocumentProcessor" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.search.DocumentProcessor" - parent: "signalwire.search" - module: "signalwire.search" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/__init__.py" ---- -# `DocumentProcessor` - -## Signature - -```python -class DocumentProcessor -``` - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(*args = (), **kwargs = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/search/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/__init__.py) - -Line 115. - -## Source - -[`signalwire/signalwire/search/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/__init__.py) - -Line 114. diff --git a/fern/products/sdk-reference/python/signalwire/search/document-processor/index__2.mdx b/fern/products/sdk-reference/python/signalwire/search/document-processor/index__2.mdx deleted file mode 100644 index fad23a2e25..0000000000 --- a/fern/products/sdk-reference/python/signalwire/search/document-processor/index__2.mdx +++ /dev/null @@ -1,44 +0,0 @@ ---- -slug: "/reference/python/signalwire/search/document-processor/index__2" -title: "document_processor" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.search.document_processor" - parent: "signalwire.search" - module: "signalwire.search" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/document_processor.py" ---- -# `document_processor` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module document_processor -``` - -## Properties - - - -## Classes - - - - Enhanced document processor with smart chunking capabilities - - - -## Source - -[`signalwire/signalwire/search/document_processor.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/document_processor.py) diff --git a/fern/products/sdk-reference/python/signalwire/search/index-builder/index-builder/index.mdx b/fern/products/sdk-reference/python/signalwire/search/index-builder/index-builder/index.mdx deleted file mode 100644 index d93b46501a..0000000000 --- a/fern/products/sdk-reference/python/signalwire/search/index-builder/index-builder/index.mdx +++ /dev/null @@ -1,271 +0,0 @@ ---- -slug: "/reference/python/signalwire/search/index-builder/index-builder" -title: "IndexBuilder" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.search.index_builder.IndexBuilder" - parent: "signalwire.search.index_builder" - module: "signalwire.search.index_builder" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/index_builder.py" ---- -# `IndexBuilder` - -Build searchable indexes from document directories - -## Signature - -```python -class IndexBuilder -``` - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -## Methods - -### \_\_init\_\_ - -Initialize the index builder - -#### Signature - -```python -__init__( - model_name: str = 'sentence-transformers/all-mpnet-base-v2', - chunking_strategy: str = 'sentence', - max_sentences_per_chunk: int = 5, - chunk_size: int = 50, - chunk_overlap: int = 10, - split_newlines: Optional[int] = None, - index_nlp_backend: str = 'nltk', - verbose: bool = False, - semantic_threshold: float = 0.5, - topic_threshold: float = 0.3, - backend: str = 'sqlite', - connection_string: Optional[str] = None -) -``` - -#### Parameters - - - Name of the sentence transformer model to use - - - - Strategy for chunking documents ('sentence', 'sliding', 'paragraph', 'page', 'semantic', 'topic', 'qa', 'json') - - - - For sentence strategy (default: 5) - - - - For sliding strategy - words per chunk (default: 50) - - - - For sliding strategy - overlap in words (default: 10) - - - - For sentence strategy - split on multiple newlines (optional) - - - - NLP backend for indexing (default: 'nltk') - - - - Whether to enable verbose logging (default: False) - - - - Similarity threshold for semantic chunking (default: 0.5) - - - - Similarity threshold for topic chunking (default: 0.3) - - - - Storage backend ('sqlite' or 'pgvector') (default: 'sqlite') - - - - PostgreSQL connection string for pgvector backend - - -#### Source - -[`signalwire/signalwire/search/index_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/index_builder.py) - -Line 38. - -*** - -### build\_index - -Build complete search index from a single directory - -#### Signature - -```python -build_index( - source_dir: str, - output_file: str, - file_types: List[str], - exclude_patterns: Optional[List[str]] = None, - languages: List[str] = None, - tags: Optional[List[str]] = None -) -``` - -#### Parameters - - - Directory to scan for documents - - - - Output .swsearch file path - - - - List of file extensions to include - - - - Glob patterns to exclude - - - - List of languages to support - - - - Global tags to add to all chunks - - -#### Source - -[`signalwire/signalwire/search/index_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/index_builder.py) - -Line 283. - -*** - -### build\_index\_from\_sources - -Build complete search index from multiple sources (files and directories) - -#### Signature - -```python -build_index_from_sources( - sources: List[Path], - output_file: str, - file_types: List[str], - exclude_patterns: Optional[List[str]] = None, - languages: List[str] = None, - tags: Optional[List[str]] = None, - overwrite: bool = False -) -``` - -#### Parameters - - - List of Path objects (files and/or directories) - - - - Output .swsearch file path - - - - List of file extensions to include for directories - - - - Glob patterns to exclude - - - - List of languages to support - - - - Global tags to add to all chunks - - - - -#### Source - -[`signalwire/signalwire/search/index_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/index_builder.py) - -Line 164. - -*** - -### validate\_index - -Validate an existing search index - -#### Signature - -```python -validate_index(index_file: str) -> Dict[str, Any] -``` - -#### Parameters - - - -#### Returns - -`Dict[str, Any]` - -#### Source - -[`signalwire/signalwire/search/index_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/index_builder.py) - -Line 687. - -## Source - -[`signalwire/signalwire/search/index_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/index_builder.py) - -Line 35. diff --git a/fern/products/sdk-reference/python/signalwire/search/index-builder/index.mdx b/fern/products/sdk-reference/python/signalwire/search/index-builder/index.mdx deleted file mode 100644 index 6e3bdc3907..0000000000 --- a/fern/products/sdk-reference/python/signalwire/search/index-builder/index.mdx +++ /dev/null @@ -1,49 +0,0 @@ ---- -slug: "/reference/python/signalwire/search/index-builder" -title: "IndexBuilder" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.search.IndexBuilder" - parent: "signalwire.search" - module: "signalwire.search" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/__init__.py" ---- -# `IndexBuilder` - -## Signature - -```python -class IndexBuilder -``` - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(*args = (), **kwargs = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/search/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/__init__.py) - -Line 119. - -## Source - -[`signalwire/signalwire/search/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/__init__.py) - -Line 118. diff --git a/fern/products/sdk-reference/python/signalwire/search/index-builder/index__2.mdx b/fern/products/sdk-reference/python/signalwire/search/index-builder/index__2.mdx deleted file mode 100644 index 22b9e760a7..0000000000 --- a/fern/products/sdk-reference/python/signalwire/search/index-builder/index__2.mdx +++ /dev/null @@ -1,44 +0,0 @@ ---- -slug: "/reference/python/signalwire/search/index-builder/index__2" -title: "index_builder" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.search.index_builder" - parent: "signalwire.search" - module: "signalwire.search" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/index_builder.py" ---- -# `index_builder` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module index_builder -``` - -## Properties - - - -## Classes - - - - Build searchable indexes from document directories - - - -## Source - -[`signalwire/signalwire/search/index_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/index_builder.py) diff --git a/fern/products/sdk-reference/python/signalwire/search/index.mdx b/fern/products/sdk-reference/python/signalwire/search/index.mdx deleted file mode 100644 index a4a2d1c936..0000000000 --- a/fern/products/sdk-reference/python/signalwire/search/index.mdx +++ /dev/null @@ -1,128 +0,0 @@ ---- -slug: "/reference/python/signalwire/search" -title: "search" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.search" - parent: "signalwire" - module: "signalwire" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/__init__.py" ---- -# `search` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module search -``` - -## Properties - - - -## Classes - - - - - - - - - - - -## Modules - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - -## Functions - -### preprocess\_document\_content - -#### Signature - -```python -preprocess_document_content(*args = (), **kwargs = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/search/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/__init__.py) - -Line 111. - -*** - -### preprocess\_query - -#### Signature - -```python -preprocess_query(*args = (), **kwargs = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/search/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/__init__.py) - -Line 108. - -## Source - -[`signalwire/signalwire/search/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/search/migration/index.mdx b/fern/products/sdk-reference/python/signalwire/search/migration/index.mdx deleted file mode 100644 index 1f74a8ef7d..0000000000 --- a/fern/products/sdk-reference/python/signalwire/search/migration/index.mdx +++ /dev/null @@ -1,44 +0,0 @@ ---- -slug: "/reference/python/signalwire/search/migration" -title: "migration" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.search.migration" - parent: "signalwire.search" - module: "signalwire.search" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/migration.py" ---- -# `migration` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module migration -``` - -## Properties - - - -## Classes - - - - Migrate search indexes between different backends - - - -## Source - -[`signalwire/signalwire/search/migration.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/migration.py) diff --git a/fern/products/sdk-reference/python/signalwire/search/migration/search-index-migrator/index.mdx b/fern/products/sdk-reference/python/signalwire/search/migration/search-index-migrator/index.mdx deleted file mode 100644 index e6aa7e3377..0000000000 --- a/fern/products/sdk-reference/python/signalwire/search/migration/search-index-migrator/index.mdx +++ /dev/null @@ -1,180 +0,0 @@ ---- -slug: "/reference/python/signalwire/search/migration/search-index-migrator" -title: "SearchIndexMigrator" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.search.migration.SearchIndexMigrator" - parent: "signalwire.search.migration" - module: "signalwire.search.migration" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/migration.py" ---- -# `SearchIndexMigrator` - -Migrate search indexes between different backends - -## Signature - -```python -class SearchIndexMigrator -``` - -## Properties - - - -## Methods - -### \_\_init\_\_ - -Initialize the migrator - -#### Signature - -```python -__init__(verbose: bool = False) -``` - -#### Parameters - - - Enable verbose output - - -#### Source - -[`signalwire/signalwire/search/migration.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/migration.py) - -Line 29. - -*** - -### get\_index\_info - -Get information about a search index - -#### Signature - -```python -get_index_info(index_path: str) -> Dict[str, Any] -``` - -#### Parameters - - - Path to index file or pgvector collection identifier - - -#### Returns - -`Dict[str, Any]` — Index information including type, config, and statistics - -#### Source - -[`signalwire/signalwire/search/migration.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/migration.py) - -Line 382. - -*** - -### migrate\_pgvector\_to\_sqlite - -Migrate a pgvector collection to SQLite .swsearch format - -#### Signature - -```python -migrate_pgvector_to_sqlite( - connection_string: str, - collection_name: str, - output_path: str, - batch_size: int = 100 -) -> Dict[str, Any] -``` - -#### Parameters - - - PostgreSQL connection string - - - - Name of the pgvector collection - - - - Output .swsearch file path - - - - Number of chunks to fetch at once - - -#### Returns - -`Dict[str, Any]` — Migration statistics - -#### Source - -[`signalwire/signalwire/search/migration.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/migration.py) - -Line 237. - -*** - -### migrate\_sqlite\_to\_pgvector - -Migrate a .swsearch SQLite index to pgvector - -#### Signature - -```python -migrate_sqlite_to_pgvector( - sqlite_path: str, - connection_string: str, - collection_name: str, - overwrite: bool = False, - batch_size: int = 100 -) -> Dict[str, Any] -``` - -#### Parameters - - - Path to .swsearch file - - - - PostgreSQL connection string - - - - Name for the pgvector collection - - - - Whether to overwrite existing collection - - - - Number of chunks to insert at once - - -#### Returns - -`Dict[str, Any]` — Migration statistics - -#### Source - -[`signalwire/signalwire/search/migration.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/migration.py) - -Line 38. - -## Source - -[`signalwire/signalwire/search/migration.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/migration.py) - -Line 26. diff --git a/fern/products/sdk-reference/python/signalwire/search/models/index.mdx b/fern/products/sdk-reference/python/signalwire/search/models/index.mdx deleted file mode 100644 index f9e3e41356..0000000000 --- a/fern/products/sdk-reference/python/signalwire/search/models/index.mdx +++ /dev/null @@ -1,66 +0,0 @@ ---- -slug: "/reference/python/signalwire/search/models" -title: "models" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.search.models" - parent: "signalwire.search" - module: "signalwire.search" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/models.py" ---- -# `models` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module models -``` - -## Constants - - - - - -## Functions - -### resolve\_model\_alias - -Resolve model alias to full model name - -#### Signature - -```python -resolve_model_alias(model_name: str) -> str -``` - -#### Parameters - - - Model name or alias (mini, base, large) - - -#### Returns - -`str` — Full model name - -#### Source - -[`signalwire/signalwire/search/models.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/models.py) - -Line 20. - -## Source - -[`signalwire/signalwire/search/models.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/models.py) diff --git a/fern/products/sdk-reference/python/signalwire/search/pgvector-backend/index.mdx b/fern/products/sdk-reference/python/signalwire/search/pgvector-backend/index.mdx deleted file mode 100644 index deca302af2..0000000000 --- a/fern/products/sdk-reference/python/signalwire/search/pgvector-backend/index.mdx +++ /dev/null @@ -1,52 +0,0 @@ ---- -slug: "/reference/python/signalwire/search/pgvector-backend" -title: "pgvector_backend" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.search.pgvector_backend" - parent: "signalwire.search" - module: "signalwire.search" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/pgvector_backend.py" ---- -# `pgvector_backend` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module pgvector_backend -``` - -## Properties - - - -## Constants - - - -## Classes - - - - PostgreSQL pgvector backend for search indexing and retrieval - - - - PostgreSQL pgvector backend for search operations - - - -## Source - -[`signalwire/signalwire/search/pgvector_backend.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/pgvector_backend.py) diff --git a/fern/products/sdk-reference/python/signalwire/search/pgvector-backend/pg-vector-backend/index.mdx b/fern/products/sdk-reference/python/signalwire/search/pgvector-backend/pg-vector-backend/index.mdx deleted file mode 100644 index fd33ddb763..0000000000 --- a/fern/products/sdk-reference/python/signalwire/search/pgvector-backend/pg-vector-backend/index.mdx +++ /dev/null @@ -1,211 +0,0 @@ ---- -slug: "/reference/python/signalwire/search/pgvector-backend/pg-vector-backend" -title: "PgVectorBackend" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.search.pgvector_backend.PgVectorBackend" - parent: "signalwire.search.pgvector_backend" - module: "signalwire.search.pgvector_backend" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/pgvector_backend.py" ---- -# `PgVectorBackend` - -PostgreSQL pgvector backend for search indexing and retrieval - -## Signature - -```python -class PgVectorBackend -``` - -## Properties - - - - - -## Methods - -### \_\_init\_\_ - -Initialize pgvector backend - -#### Signature - -```python -__init__(connection_string: str) -``` - -#### Parameters - - - PostgreSQL connection string - - -#### Source - -[`signalwire/signalwire/search/pgvector_backend.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/pgvector_backend.py) - -Line 45. - -*** - -### close - -Close database connection - -#### Signature - -```python -close() -``` - -#### Source - -[`signalwire/signalwire/search/pgvector_backend.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/pgvector_backend.py) - -Line 396. - -*** - -### create\_schema - -Create database schema for a collection - -#### Signature - -```python -create_schema(collection_name: str, embedding_dim: int = 768) -``` - -#### Parameters - - - Name of the collection - - - - Dimension of embeddings - - -#### Source - -[`signalwire/signalwire/search/pgvector_backend.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/pgvector_backend.py) - -Line 84. - -*** - -### delete\_collection - -Delete a collection and its data - -#### Signature - -```python -delete_collection(collection_name: str) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/search/pgvector_backend.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/pgvector_backend.py) - -Line 378. - -*** - -### get\_stats - -Get statistics for a collection - -#### Signature - -```python -get_stats(collection_name: str) -> Dict[str, Any] -``` - -#### Parameters - - - -#### Returns - -`Dict[str, Any]` - -#### Source - -[`signalwire/signalwire/search/pgvector_backend.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/pgvector_backend.py) - -Line 328. - -*** - -### list\_collections - -List all collections in the database - -#### Signature - -```python -list_collections() -> List[str] -``` - -#### Returns - -`List[str]` - -#### Source - -[`signalwire/signalwire/search/pgvector_backend.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/pgvector_backend.py) - -Line 370. - -*** - -### store\_chunks - -Store document chunks in the database - -#### Signature - -```python -store_chunks( - chunks: List[Dict[str, Any]], - collection_name: str, - config: Dict[str, Any] -) -``` - -#### Parameters - - - List of processed chunks with embeddings - - - - Name of the collection - - - - Configuration metadata - - -#### Source - -[`signalwire/signalwire/search/pgvector_backend.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/pgvector_backend.py) - -Line 209. - -## Source - -[`signalwire/signalwire/search/pgvector_backend.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/pgvector_backend.py) - -Line 42. diff --git a/fern/products/sdk-reference/python/signalwire/search/pgvector-backend/pg-vector-search-backend/index.mdx b/fern/products/sdk-reference/python/signalwire/search/pgvector-backend/pg-vector-search-backend/index.mdx deleted file mode 100644 index e62907d0c2..0000000000 --- a/fern/products/sdk-reference/python/signalwire/search/pgvector-backend/pg-vector-search-backend/index.mdx +++ /dev/null @@ -1,230 +0,0 @@ ---- -slug: "/reference/python/signalwire/search/pgvector-backend/pg-vector-search-backend" -title: "PgVectorSearchBackend" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.search.pgvector_backend.PgVectorSearchBackend" - parent: "signalwire.search.pgvector_backend" - module: "signalwire.search.pgvector_backend" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/pgvector_backend.py" ---- -# `PgVectorSearchBackend` - -PostgreSQL pgvector backend for search operations - -## Signature - -```python -class PgVectorSearchBackend -``` - -## Properties - - - - - - - - - - - -## Methods - -### \_\_init\_\_ - -Initialize search backend - -#### Signature - -```python -__init__(connection_string: str, collection_name: str) -``` - -#### Parameters - - - PostgreSQL connection string - - - - Name of the collection to search - - -#### Source - -[`signalwire/signalwire/search/pgvector_backend.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/pgvector_backend.py) - -Line 406. - -*** - -### close - -Close database connection - -#### Signature - -```python -close() -``` - -#### Source - -[`signalwire/signalwire/search/pgvector_backend.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/pgvector_backend.py) - -Line 1010. - -*** - -### fetch\_candidates - -Fetch raw candidates with per-source signal scores. - -Runs vector/keyword/metadata/filename searches, applies similarity -threshold to raw vector scores pre-merge (keeps threshold intuitive), -and merges into a candidate list keyed by chunk id. Does NOT compute -final scores, boost exact matches, dedupe, or apply diversity - -those run uniformly in SearchEngine for every backend. - -Result shape per candidate (matches sqlite path): -\{ -'id', 'content', 'metadata': \{filename, section, tags, \*\*custom\}, -'search\_type', 'vector\_score' (if vector matched), -'vector\_distance' (if vector matched), -'sources': \{source\_type: True, ...\}, -'source\_scores': \{source\_type: raw\_score, ...\}, -\} - -#### Signature - -```python -fetch_candidates( - query_vector: List[float], - enhanced_text: str, - count: int, - similarity_threshold: float = 0.0, - tags: Optional[List[str]] = None, - original_query: Optional[str] = None -) -> List[Dict[str, Any]] -``` - -#### Parameters - - - - - - - - - - - - - -#### Returns - -`List[Dict[str, Any]]` - -#### Source - -[`signalwire/signalwire/search/pgvector_backend.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/pgvector_backend.py) - -Line 847. - -*** - -### get\_stats - -Get statistics for the collection - -#### Signature - -```python -get_stats() -> Dict[str, Any] -``` - -#### Returns - -`Dict[str, Any]` - -#### Source - -[`signalwire/signalwire/search/pgvector_backend.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/pgvector_backend.py) - -Line 1003. - -*** - -### search - -Perform hybrid search (vector + keyword + metadata). - -NOTE: As of the unified-pipeline refactor, production traffic flows -through SearchEngine.search() which calls fetch\_candidates() here -and then runs all post-processing (scoring, dedup, diversity) in -SearchEngine. This method remains as a self-contained search path -for direct backend use and test coverage, but does NOT receive the -SearchEngine's exact-match boost, filename diversity, or match-type -diversity logic. For consistent behavior, call SearchEngine.search(). - -#### Signature - -```python -search( - query_vector: List[float], - enhanced_text: str, - count: int = 5, - similarity_threshold: float = 0.0, - tags: Optional[List[str]] = None, - keyword_weight: Optional[float] = None -) -> List[Dict[str, Any]] -``` - -#### Parameters - - - Embedding vector for the query - - - - Processed query text for keyword search - - - - Number of results to return - - - - Minimum similarity score - - - - Filter by tags - - - - Manual keyword weight (0.0-1.0). If None, uses default weighting - - -#### Returns - -`List[Dict[str, Any]]` — List of search results with scores and metadata - -#### Source - -[`signalwire/signalwire/search/pgvector_backend.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/pgvector_backend.py) - -Line 471. - -## Source - -[`signalwire/signalwire/search/pgvector_backend.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/pgvector_backend.py) - -Line 403. diff --git a/fern/products/sdk-reference/python/signalwire/search/query-processor/index.mdx b/fern/products/sdk-reference/python/signalwire/search/query-processor/index.mdx deleted file mode 100644 index 36dd239447..0000000000 --- a/fern/products/sdk-reference/python/signalwire/search/query-processor/index.mdx +++ /dev/null @@ -1,362 +0,0 @@ ---- -slug: "/reference/python/signalwire/search/query-processor" -title: "query_processor" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.search.query_processor" - parent: "signalwire.search" - module: "signalwire.search" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/query_processor.py" ---- -# `query_processor` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module query_processor -``` - -## Properties - - - - - - - -## Functions - -### detect\_language - -Detect language of input text -Simple implementation - can be enhanced with langdetect library - -#### Signature - -```python -detect_language(text: str) -> str -``` - -#### Parameters - - - -#### Returns - -`str` - -#### Source - -[`signalwire/signalwire/search/query_processor.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/query_processor.py) - -Line 25. - -*** - -### ensure\_nltk\_resources - -Download required NLTK resources if not already present - -#### Signature - -```python -ensure_nltk_resources() -``` - -#### Source - -[`signalwire/signalwire/search/query_processor.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/query_processor.py) - -Line 195. - -*** - -### get\_synonyms - -Get synonyms for a word using WordNet - -#### Signature - -```python -get_synonyms(word: str, pos_tag: str, max_synonyms: int = 5) -> List[str] -``` - -#### Parameters - - - - - - - -#### Returns - -`List[str]` - -#### Source - -[`signalwire/signalwire/search/query_processor.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/query_processor.py) - -Line 236. - -*** - -### get\_wordnet\_pos - -Map spaCy POS tags to WordNet POS tags. - -#### Signature - -```python -get_wordnet_pos(spacy_pos) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/search/query_processor.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/query_processor.py) - -Line 232. - -*** - -### load\_spacy\_model - -Load spaCy model for the given language -Returns None if spaCy is not available or model not found - -#### Signature - -```python -load_spacy_model(language: str) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/search/query_processor.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/query_processor.py) - -Line 44. - -*** - -### preprocess\_document\_content - -Preprocess document content for better searchability - -#### Signature - -```python -preprocess_document_content( - content: str, - language: str = 'en', - nlp_backend: str = None, - index_nlp_backend: str = 'nltk' -) -> Dict[str, Any] -``` - -#### Parameters - - - Document content to process - - - - Language code for processing - - - - DEPRECATED - use index\_nlp\_backend instead - - - - NLP backend for document processing ('nltk' for fast, 'spacy' for better quality) - - -#### Returns - -`Dict[str, Any]` — Dict containing enhanced text and extracted keywords - -#### Source - -[`signalwire/signalwire/search/query_processor.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/query_processor.py) - -Line 462. - -*** - -### preprocess\_query - -Advanced query preprocessing with language detection, POS tagging, synonym expansion, and vectorization - -#### Signature - -```python -preprocess_query( - query: str, - language: str = 'en', - pos_to_expand: Optional[List[str]] = None, - max_synonyms: int = 5, - debug: bool = False, - vector: bool = False, - vectorize_query_param: bool = False, - nlp_backend: str = None, - query_nlp_backend: str = 'nltk', - model_name: str = None, - preserve_original: bool = True -) -> Dict[str, Any] -``` - -#### Parameters - - - Input query string - - - - Language code ('en', 'es', etc.) or 'auto' for detection - - - - List of POS tags to expand with synonyms - - - - Maximum synonyms per word - - - - Enable debug output - - - - Include vector embedding in output - - - - If True, just vectorize without other processing - - - - DEPRECATED - use query\_nlp\_backend instead - - - - NLP backend for query processing ('nltk' for fast, 'spacy' for better quality) - - - - - - -#### Returns - -`Dict[str, Any]` — Dict containing processed query, language, POS tags, and optionally vector - -#### Source - -[`signalwire/signalwire/search/query_processor.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/query_processor.py) - -Line 276. - -*** - -### remove\_duplicate\_words - -Remove duplicate words from the input string while preserving the order and punctuation. - -#### Signature - -```python -remove_duplicate_words(input_string: str) -> str -``` - -#### Parameters - - - -#### Returns - -`str` - -#### Source - -[`signalwire/signalwire/search/query_processor.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/query_processor.py) - -Line 255. - -*** - -### set\_global\_model - -Legacy function - adds model to cache instead of setting globally - -#### Signature - -```python -set_global_model(model) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/search/query_processor.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/query_processor.py) - -Line 86. - -*** - -### vectorize\_query - -Vectorize query using sentence transformers -Returns numpy array of embeddings - -#### Signature - -```python -vectorize_query(query: str, model = None, model_name: str = None) -``` - -#### Parameters - - - Query string to vectorize - - - - Optional pre-loaded model instance. If not provided, uses cached model. - - - - Optional model name to use if loading a new model - - -#### Source - -[`signalwire/signalwire/search/query_processor.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/query_processor.py) - -Line 145. - -## Source - -[`signalwire/signalwire/search/query_processor.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/query_processor.py) diff --git a/fern/products/sdk-reference/python/signalwire/search/search-engine/index.mdx b/fern/products/sdk-reference/python/signalwire/search/search-engine/index.mdx deleted file mode 100644 index a2b5b88ff8..0000000000 --- a/fern/products/sdk-reference/python/signalwire/search/search-engine/index.mdx +++ /dev/null @@ -1,49 +0,0 @@ ---- -slug: "/reference/python/signalwire/search/search-engine" -title: "SearchEngine" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.search.SearchEngine" - parent: "signalwire.search" - module: "signalwire.search" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/__init__.py" ---- -# `SearchEngine` - -## Signature - -```python -class SearchEngine -``` - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(*args = (), **kwargs = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/search/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/__init__.py) - -Line 123. - -## Source - -[`signalwire/signalwire/search/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/__init__.py) - -Line 122. diff --git a/fern/products/sdk-reference/python/signalwire/search/search-engine/index__2.mdx b/fern/products/sdk-reference/python/signalwire/search/search-engine/index__2.mdx deleted file mode 100644 index 42b45f0f1c..0000000000 --- a/fern/products/sdk-reference/python/signalwire/search/search-engine/index__2.mdx +++ /dev/null @@ -1,46 +0,0 @@ ---- -slug: "/reference/python/signalwire/search/search-engine/index__2" -title: "search_engine" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.search.search_engine" - parent: "signalwire.search" - module: "signalwire.search" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_engine.py" ---- -# `search_engine` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module search_engine -``` - -## Properties - - - - - -## Classes - - - - Hybrid search engine for vector and keyword search - - - -## Source - -[`signalwire/signalwire/search/search_engine.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_engine.py) diff --git a/fern/products/sdk-reference/python/signalwire/search/search-engine/search-engine/index.mdx b/fern/products/sdk-reference/python/signalwire/search/search-engine/search-engine/index.mdx deleted file mode 100644 index 8d0c9e27e6..0000000000 --- a/fern/products/sdk-reference/python/signalwire/search/search-engine/search-engine/index.mdx +++ /dev/null @@ -1,180 +0,0 @@ ---- -slug: "/reference/python/signalwire/search/search-engine/search-engine" -title: "SearchEngine" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.search.search_engine.SearchEngine" - parent: "signalwire.search.search_engine" - module: "signalwire.search.search_engine" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_engine.py" ---- -# `SearchEngine` - -Hybrid search engine for vector and keyword search - -## Signature - -```python -class SearchEngine -``` - -## Properties - - - - - - - - - - - -## Methods - -### \_\_init\_\_ - -Initialize search engine - -#### Signature - -```python -__init__( - backend: str = 'sqlite', - index_path: Optional[str] = None, - connection_string: Optional[str] = None, - collection_name: Optional[str] = None, - model = None -) -``` - -#### Parameters - - - Storage backend ('sqlite' or 'pgvector') - - - - Path to .swsearch file (for sqlite backend) - - - - PostgreSQL connection string (for pgvector backend) - - - - Collection name (for pgvector backend) - - - - Optional sentence transformer model - - -#### Source - -[`signalwire/signalwire/search/search_engine.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_engine.py) - -Line 30. - -*** - -### get\_stats - -Get statistics about the search index - -#### Signature - -```python -get_stats() -> Dict[str, Any] -``` - -#### Returns - -`Dict[str, Any]` - -#### Source - -[`signalwire/signalwire/search/search_engine.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_engine.py) - -Line 1346. - -*** - -### search - -Unified hybrid search: backends fetch candidates, SearchEngine post-processes. - -> \[!NOTE] -> -> 1. fetch\_candidates(k = count \* search\_multiplier) — per-source signals -> 2. \_process\_candidates — score / boost / dedupe / diversity -> 3. return top `count` - -Backends (sqlite, pgvector, future) only implement candidate fetching. -All quality logic (max-signal scoring with agreement boost, exact-match -boosting, content dedup, filename diversity, match-type diversity) runs -once here and therefore applies to every backend uniformly. - -#### Signature - -```python -search( - query_vector: List[float], - enhanced_text: str, - count: int = 3, - similarity_threshold: float = 0.0, - tags: Optional[List[str]] = None, - keyword_weight: Optional[float] = None, - original_query: Optional[str] = None -) -> List[Dict[str, Any]] -``` - -#### Parameters - - - Embedding vector for the query - - - - Processed query text for keyword search - - - - Number of results to return - - - - Minimum similarity score (applied to raw vector pre-merge so the threshold is intuitive) - - - - Filter by tags - - - - Accepted for API stability; scoring is max-signal-wins with agreement boost, so this is no-op currently - - - - Original query for exact matching / filename match - - -#### Returns - -`List[Dict[str, Any]]` — List of search results with scores and metadata - -#### Source - -[`signalwire/signalwire/search/search_engine.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_engine.py) - -Line 79. - -## Source - -[`signalwire/signalwire/search/search_engine.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_engine.py) - -Line 27. diff --git a/fern/products/sdk-reference/python/signalwire/search/search-service/index.mdx b/fern/products/sdk-reference/python/signalwire/search/search-service/index.mdx deleted file mode 100644 index 38d1b08ce5..0000000000 --- a/fern/products/sdk-reference/python/signalwire/search/search-service/index.mdx +++ /dev/null @@ -1,49 +0,0 @@ ---- -slug: "/reference/python/signalwire/search/search-service" -title: "SearchService" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.search.SearchService" - parent: "signalwire.search" - module: "signalwire.search" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/__init__.py" ---- -# `SearchService` - -## Signature - -```python -class SearchService -``` - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(*args = (), **kwargs = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/search/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/__init__.py) - -Line 127. - -## Source - -[`signalwire/signalwire/search/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/__init__.py) - -Line 126. diff --git a/fern/products/sdk-reference/python/signalwire/search/search-service/index__2.mdx b/fern/products/sdk-reference/python/signalwire/search/search-service/index__2.mdx deleted file mode 100644 index 8c61afbb57..0000000000 --- a/fern/products/sdk-reference/python/signalwire/search/search-service/index__2.mdx +++ /dev/null @@ -1,50 +0,0 @@ ---- -slug: "/reference/python/signalwire/search/search-service/index__2" -title: "search_service" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.search.search_service" - parent: "signalwire.search" - module: "signalwire.search" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_service.py" ---- -# `search_service` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module search_service -``` - -## Properties - - - -## Classes - - - - - - - - - - Local search service with HTTP API supporting both SQLite and pgvector backends - - - -## Source - -[`signalwire/signalwire/search/search_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_service.py) diff --git a/fern/products/sdk-reference/python/signalwire/search/search-service/search-request/index.mdx b/fern/products/sdk-reference/python/signalwire/search/search-service/search-request/index.mdx deleted file mode 100644 index 52631c4c1f..0000000000 --- a/fern/products/sdk-reference/python/signalwire/search/search-service/search-request/index.mdx +++ /dev/null @@ -1,78 +0,0 @@ ---- -slug: "/reference/python/signalwire/search/search-service/search-request" -title: "SearchRequest" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.search.search_service.SearchRequest" - parent: "signalwire.search.search_service" - module: "signalwire.search.search_service" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_service.py" ---- -# `SearchRequest` - -## Signature - -```python -class SearchRequest -``` - -## Properties - - - - - - - - - - - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__( - query: str, - index_name: str = 'default', - count: int = 3, - similarity_threshold: float = 0.0, - tags: Optional[List[str]] = None, - language: Optional[str] = None -) -``` - -#### Parameters - - - - - - - - - - - - - -#### Source - -[`signalwire/signalwire/search/search_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_service.py) - -Line 68. - -## Source - -[`signalwire/signalwire/search/search_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_service.py) - -Line 67. diff --git a/fern/products/sdk-reference/python/signalwire/search/search-service/search-response/index.mdx b/fern/products/sdk-reference/python/signalwire/search/search-service/search-response/index.mdx deleted file mode 100644 index dbbd247148..0000000000 --- a/fern/products/sdk-reference/python/signalwire/search/search-service/search-response/index.mdx +++ /dev/null @@ -1,58 +0,0 @@ ---- -slug: "/reference/python/signalwire/search/search-service/search-response" -title: "SearchResponse" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.search.search_service.SearchResponse" - parent: "signalwire.search.search_service" - module: "signalwire.search.search_service" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_service.py" ---- -# `SearchResponse` - -## Signature - -```python -class SearchResponse -``` - -## Properties - - - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__( - results: List[SearchResult], - query_analysis: Optional[Dict[str, Any]] = None -) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/search/search_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_service.py) - -Line 85. - -## Source - -[`signalwire/signalwire/search/search_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_service.py) - -Line 84. diff --git a/fern/products/sdk-reference/python/signalwire/search/search-service/search-result/index.mdx b/fern/products/sdk-reference/python/signalwire/search/search-service/search-result/index.mdx deleted file mode 100644 index 3904110bbb..0000000000 --- a/fern/products/sdk-reference/python/signalwire/search/search-service/search-result/index.mdx +++ /dev/null @@ -1,59 +0,0 @@ ---- -slug: "/reference/python/signalwire/search/search-service/search-result" -title: "SearchResult" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.search.search_service.SearchResult" - parent: "signalwire.search.search_service" - module: "signalwire.search.search_service" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_service.py" ---- -# `SearchResult` - -## Signature - -```python -class SearchResult -``` - -## Properties - - - - - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(content: str, score: float, metadata: Dict[str, Any]) -``` - -#### Parameters - - - - - - - -#### Source - -[`signalwire/signalwire/search/search_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_service.py) - -Line 79. - -## Source - -[`signalwire/signalwire/search/search_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_service.py) - -Line 78. diff --git a/fern/products/sdk-reference/python/signalwire/search/search-service/search-service/index.mdx b/fern/products/sdk-reference/python/signalwire/search/search-service/search-service/index.mdx deleted file mode 100644 index a5cd7ba53b..0000000000 --- a/fern/products/sdk-reference/python/signalwire/search/search-service/search-service/index.mdx +++ /dev/null @@ -1,186 +0,0 @@ ---- -slug: "/reference/python/signalwire/search/search-service/search-service" -title: "SearchService" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.search.search_service.SearchService" - parent: "signalwire.search.search_service" - module: "signalwire.search.search_service" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_service.py" ---- -# `SearchService` - -Local search service with HTTP API supporting both SQLite and pgvector backends - -## Signature - -```python -class SearchService -``` - -## Properties - - - - - - - - - - - - - - - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__( - port: int = 8001, - indexes: Dict[str, str] = None, - basic_auth: Optional[Tuple[str, str]] = None, - config_file: Optional[str] = None, - backend: str = 'sqlite', - connection_string: Optional[str] = None -) -``` - -#### Parameters - - - - - - - - - - - - - -#### Source - -[`signalwire/signalwire/search/search_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_service.py) - -Line 103. - -*** - -### search\_direct - -Direct search method (non-async) for programmatic use - -#### Signature - -```python -search_direct( - query: str, - index_name: str = 'default', - count: int = 3, - distance: float = 0.0, - tags: Optional[List[str]] = None, - language: Optional[str] = None -) -> Dict[str, Any] -``` - -#### Parameters - - - - - - - - - - - - - -#### Returns - -`Dict[str, Any]` - -#### Source - -[`signalwire/signalwire/search/search_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_service.py) - -Line 483. - -*** - -### start - -Start the service with optional HTTPS support. - -#### Signature - -```python -start( - host: str = '0.0.0.0', - port: Optional[int] = None, - ssl_cert: Optional[str] = None, - ssl_key: Optional[str] = None -) -``` - -#### Parameters - - - Host to bind to (default: "0.0.0.0") - - - - Port to bind to (default: self.port) - - - - Path to SSL certificate file (overrides environment) - - - - Path to SSL key file (overrides environment) - - -#### Source - -[`signalwire/signalwire/search/search_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_service.py) - -Line 521. - -*** - -### stop - -Stop the service (placeholder for cleanup) - -#### Signature - -```python -stop() -``` - -#### Source - -[`signalwire/signalwire/search/search_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_service.py) - -Line 585. - -## Source - -[`signalwire/signalwire/search/search_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_service.py) - -Line 100. diff --git a/fern/products/sdk-reference/python/signalwire/skills/api-ninjas-trivia/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/api-ninjas-trivia/index.mdx deleted file mode 100644 index 6ae109a07b..0000000000 --- a/fern/products/sdk-reference/python/signalwire/skills/api-ninjas-trivia/index.mdx +++ /dev/null @@ -1,44 +0,0 @@ ---- -slug: "/reference/python/signalwire/skills/api-ninjas-trivia" -title: "api_ninjas_trivia" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.skills.api_ninjas_trivia" - parent: "signalwire.skills" - module: "signalwire.skills" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/api_ninjas_trivia/__init__.py" ---- -# `api_ninjas_trivia` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module api_ninjas_trivia -``` - -## Properties - - - -## Modules - - - - Copyright (c) 2025 SignalWire - - - -## Source - -[`signalwire/signalwire/skills/api_ninjas_trivia/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/api_ninjas_trivia/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/api-ninjas-trivia/skill/api-ninjas-trivia-skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/api-ninjas-trivia/skill/api-ninjas-trivia-skill/index.mdx deleted file mode 100644 index 1362fab3ae..0000000000 --- a/fern/products/sdk-reference/python/signalwire/skills/api-ninjas-trivia/skill/api-ninjas-trivia-skill/index.mdx +++ /dev/null @@ -1,227 +0,0 @@ ---- -slug: "/reference/python/signalwire/skills/api-ninjas-trivia/skill/api-ninjas-trivia-skill" -title: "ApiNinjasTriviaSkill" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.skills.api_ninjas_trivia.skill.ApiNinjasTriviaSkill" - parent: "signalwire.skills.api_ninjas_trivia.skill" - module: "signalwire.skills.api_ninjas_trivia.skill" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/api_ninjas_trivia/skill.py" ---- -# `ApiNinjasTriviaSkill` - -Skill for getting trivia questions from API Ninjas with configurable categories. - -Supports multiple instances with different tool names and category combinations. -Uses DataMap for serverless execution with dynamic enum generation. - -Configuration: - -- tool\_name: Custom name for the generated SWAIG function -- api\_key: API Ninjas API key -- categories: Array of category strings to enable - -Available categories: - -- artliterature: Art and Literature -- language: Language -- sciencenature: Science and Nature -- general: General Knowledge -- fooddrink: Food and Drink -- peopleplaces: People and Places -- geography: Geography -- historyholidays: History and Holidays -- entertainment: Entertainment -- toysgames: Toys and Games -- music: Music -- mathematics: Mathematics -- religionmythology: Religion and Mythology -- sportsleisure: Sports and Leisure - -> \[!NOTE] -> agent.add\_skill("api\_ninjas\_trivia", \{ -> "tool\_name": "get\_science\_trivia", -> "api\_key": "your\_api\_key", -> "categories": \["sciencenature", "mathematics", "general"] -> \}) - -## Signature - -```python -class ApiNinjasTriviaSkill(SkillBase) -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/python/signalwire/core/skill-base/skill-base) - -## Properties - - - - - - - - - - - - - - - - - -## Methods - -### \_\_init\_\_ - -Initialize the skill with configuration parameters. - -#### Signature - -```python -__init__(agent, params: Dict[str, Any] = None) -``` - -#### Parameters - - - The agent instance this skill belongs to - - - - Configuration dictionary containing: - - -#### Source - -[`signalwire/signalwire/skills/api_ninjas_trivia/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/api_ninjas_trivia/skill.py) - -Line 81. - -*** - -### get\_instance\_key - -Generate a unique instance key for this skill configuration. - -#### Signature - -```python -get_instance_key() -> str -``` - -#### Returns - -`str` — Unique key combining skill name and tool name - -#### Source - -[`signalwire/signalwire/skills/api_ninjas_trivia/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/api_ninjas_trivia/skill.py) - -Line 139. - -*** - -### get\_parameter\_schema - -Get the parameter schema for the API Ninjas Trivia skill. - -Returns parameter definitions for GUI configuration. - -**Modifiers:** `classmethod` - -#### Signature - -```python -@classmethod -get_parameter_schema() -> Dict[str, Dict[str, Any]] -``` - -#### Returns - -`Dict[str, Dict[str, Any]]` - -#### Source - -[`signalwire/signalwire/skills/api_ninjas_trivia/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/api_ninjas_trivia/skill.py) - -Line 203. - -*** - -### get\_tools - -Generate the SWAIG tool with DataMap webhook. - -#### Signature - -```python -get_tools() -> List[Dict[str, Any]] -``` - -#### Returns - -`List[Dict[str, Any]]` — List containing the generated tool configuration - -#### Source - -[`signalwire/signalwire/skills/api_ninjas_trivia/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/api_ninjas_trivia/skill.py) - -Line 148. - -*** - -### register\_tools - -Register SWAIG tools with the agent - -#### Signature - -```python -register_tools() -> None -``` - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/skills/api_ninjas_trivia/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/api_ninjas_trivia/skill.py) - -Line 130. - -*** - -### setup - -Setup the skill - validates API key is available. - -#### Signature - -```python -setup() -> bool -``` - -#### Returns - -`bool` — True if setup successful - -#### Source - -[`signalwire/signalwire/skills/api_ninjas_trivia/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/api_ninjas_trivia/skill.py) - -Line 120. - -## Source - -[`signalwire/signalwire/skills/api_ninjas_trivia/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/api_ninjas_trivia/skill.py) - -Line 22. diff --git a/fern/products/sdk-reference/python/signalwire/skills/api-ninjas-trivia/skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/api-ninjas-trivia/skill/index.mdx deleted file mode 100644 index 790afd86cc..0000000000 --- a/fern/products/sdk-reference/python/signalwire/skills/api-ninjas-trivia/skill/index.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -slug: "/reference/python/signalwire/skills/api-ninjas-trivia/skill" -title: "skill" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.skills.api_ninjas_trivia.skill" - parent: "signalwire.skills.api_ninjas_trivia" - module: "signalwire.skills.api_ninjas_trivia" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/api_ninjas_trivia/skill.py" ---- -# `skill` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module skill -``` - -## Classes - - - - Skill for getting trivia questions from API Ninjas with configurable categories. - - - -## Source - -[`signalwire/signalwire/skills/api_ninjas_trivia/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/api_ninjas_trivia/skill.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/claude-skills/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/claude-skills/index.mdx deleted file mode 100644 index 08b1e9b7f8..0000000000 --- a/fern/products/sdk-reference/python/signalwire/skills/claude-skills/index.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -slug: "/reference/python/signalwire/skills/claude-skills" -title: "claude_skills" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.skills.claude_skills" - parent: "signalwire.skills" - module: "signalwire.skills" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/claude_skills/__init__.py" ---- -# `claude_skills` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module claude_skills -``` - -## Modules - - - - Copyright (c) 2025 SignalWire - - - -## Source - -[`signalwire/signalwire/skills/claude_skills/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/claude_skills/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/claude-skills/skill/claude-skills-skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/claude-skills/skill/claude-skills-skill/index.mdx deleted file mode 100644 index 867c168ee4..0000000000 --- a/fern/products/sdk-reference/python/signalwire/skills/claude-skills/skill/claude-skills-skill/index.mdx +++ /dev/null @@ -1,182 +0,0 @@ ---- -slug: "/reference/python/signalwire/skills/claude-skills/skill/claude-skills-skill" -title: "ClaudeSkillsSkill" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.skills.claude_skills.skill.ClaudeSkillsSkill" - parent: "signalwire.skills.claude_skills.skill" - module: "signalwire.skills.claude_skills.skill" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/claude_skills/skill.py" ---- -# `ClaudeSkillsSkill` - -Load Claude-style SKILL.md files as SignalWire agent tools. - -This skill parses Claude Code skill directories and makes them available -as SWAIG tools that the AI can call. Each Claude skill becomes a tool -that returns the skill's instructions when invoked. - -> ## \[!NOTE] -> -> name: skill-name -> description: When to use this skill -> ----------------------------------- -> -> Markdown instructions here... -> Use $ARGUMENTS for passed args. - -## Signature - -```python -class ClaudeSkillsSkill(SkillBase) -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/python/signalwire/core/skill-base/skill-base) - -## Examples - -```python -Markdown instructions here... -Use $ARGUMENTS for passed args. -``` - -## Properties - - - - - - - - - - - - - -## Methods - -### get\_hints - -Return speech recognition hints based on loaded skills. - -#### Signature - -```python -get_hints() -> List[str] -``` - -#### Returns - -`List[str]` - -#### Source - -[`signalwire/signalwire/skills/claude_skills/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/claude_skills/skill.py) - -Line 610. - -*** - -### get\_instance\_key - -Return unique key for this skill instance. - -#### Signature - -```python -get_instance_key() -> str -``` - -#### Returns - -`str` - -#### Source - -[`signalwire/signalwire/skills/claude_skills/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/claude_skills/skill.py) - -Line 667. - -*** - -### get\_parameter\_schema - -Get the parameter schema for the Claude skills loader. - -**Modifiers:** `classmethod` - -#### Signature - -```python -@classmethod -get_parameter_schema() -> Dict[str, Dict[str, Any]] -``` - -#### Returns - -`Dict[str, Dict[str, Any]]` - -#### Source - -[`signalwire/signalwire/skills/claude_skills/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/claude_skills/skill.py) - -Line 673. - -*** - -### register\_tools - -Register a SWAIG tool for each discovered Claude skill. - -#### Signature - -```python -register_tools() -> None -``` - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/skills/claude_skills/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/claude_skills/skill.py) - -Line 518. - -*** - -### setup - -Setup the Claude skills loader. - -Discovers and parses all SKILL.md files in the configured directory. - -#### Signature - -```python -setup() -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`signalwire/signalwire/skills/claude_skills/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/claude_skills/skill.py) - -Line 63. - -## Source - -[`signalwire/signalwire/skills/claude_skills/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/claude_skills/skill.py) - -Line 38. diff --git a/fern/products/sdk-reference/python/signalwire/skills/claude-skills/skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/claude-skills/skill/index.mdx deleted file mode 100644 index e522cd9629..0000000000 --- a/fern/products/sdk-reference/python/signalwire/skills/claude-skills/skill/index.mdx +++ /dev/null @@ -1,44 +0,0 @@ ---- -slug: "/reference/python/signalwire/skills/claude-skills/skill" -title: "skill" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.skills.claude_skills.skill" - parent: "signalwire.skills.claude_skills" - module: "signalwire.skills.claude_skills" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/claude_skills/skill.py" ---- -# `skill` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module skill -``` - -## Properties - - - -## Classes - - - - Load Claude-style SKILL.md files as SignalWire agent tools. - - - -## Source - -[`signalwire/signalwire/skills/claude_skills/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/claude_skills/skill.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/datasphere-serverless/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/datasphere-serverless/index.mdx deleted file mode 100644 index 48688c2e42..0000000000 --- a/fern/products/sdk-reference/python/signalwire/skills/datasphere-serverless/index.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -slug: "/reference/python/signalwire/skills/datasphere-serverless" -title: "datasphere_serverless" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.skills.datasphere_serverless" - parent: "signalwire.skills" - module: "signalwire.skills" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere_serverless/__init__.py" ---- -# `datasphere_serverless` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module datasphere_serverless -``` - -## Modules - - - - Copyright (c) 2025 SignalWire - - - -## Source - -[`signalwire/signalwire/skills/datasphere_serverless/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere_serverless/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/datasphere-serverless/skill/data-sphere-serverless-skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/datasphere-serverless/skill/data-sphere-serverless-skill/index.mdx deleted file mode 100644 index a65872bcdc..0000000000 --- a/fern/products/sdk-reference/python/signalwire/skills/datasphere-serverless/skill/data-sphere-serverless-skill/index.mdx +++ /dev/null @@ -1,206 +0,0 @@ ---- -slug: "/reference/python/signalwire/skills/datasphere-serverless/skill/data-sphere-serverless-skill" -title: "DataSphereServerlessSkill" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.skills.datasphere_serverless.skill.DataSphereServerlessSkill" - parent: "signalwire.skills.datasphere_serverless.skill" - module: "signalwire.skills.datasphere_serverless.skill" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere_serverless/skill.py" ---- -# `DataSphereServerlessSkill` - -SignalWire DataSphere knowledge search using DataMap (serverless execution) - -## Signature - -```python -class DataSphereServerlessSkill(SkillBase) -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/python/signalwire/core/skill-base/skill-base) - -## Properties - - - - - - - - - - - - - -## Methods - -### get\_global\_data - -Return global data for agent context - -#### Signature - -```python -get_global_data() -> Dict[str, Any] -``` - -#### Returns - -`Dict[str, Any]` - -#### Source - -[`signalwire/signalwire/skills/datasphere_serverless/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere_serverless/skill.py) - -Line 216. - -*** - -### get\_hints - -Return speech recognition hints - -#### Signature - -```python -get_hints() -> List[str] -``` - -#### Returns - -`List[str]` - -#### Source - -[`signalwire/signalwire/skills/datasphere_serverless/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere_serverless/skill.py) - -Line 212. - -*** - -### get\_instance\_key - -Get the key used to track this skill instance - -For DataSphere Serverless, we use 'search\_knowledge' as the default tool name - -#### Signature - -```python -get_instance_key() -> str -``` - -#### Returns - -`str` - -#### Source - -[`signalwire/signalwire/skills/datasphere_serverless/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere_serverless/skill.py) - -Line 111. - -*** - -### get\_parameter\_schema - -Get parameter schema for DataSphere Serverless skill - -**Modifiers:** `classmethod` - -#### Signature - -```python -@classmethod -get_parameter_schema() -> Dict[str, Dict[str, Any]] -``` - -#### Returns - -`Dict[str, Dict[str, Any]]` - -#### Source - -[`signalwire/signalwire/skills/datasphere_serverless/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere_serverless/skill.py) - -Line 29. - -*** - -### get\_prompt\_sections - -Return prompt sections to add to agent - -#### Signature - -```python -get_prompt_sections() -> List[Dict[str, Any]] -``` - -#### Returns - -`List[Dict[str, Any]]` - -#### Source - -[`signalwire/signalwire/skills/datasphere_serverless/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere_serverless/skill.py) - -Line 224. - -*** - -### register\_tools - -Register knowledge search tool using DataMap - -#### Signature - -```python -register_tools() -> None -``` - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/skills/datasphere_serverless/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere_serverless/skill.py) - -Line 161. - -*** - -### setup - -Setup the datasphere serverless skill - -#### Signature - -```python -setup() -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`signalwire/signalwire/skills/datasphere_serverless/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere_serverless/skill.py) - -Line 120. - -## Source - -[`signalwire/signalwire/skills/datasphere_serverless/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere_serverless/skill.py) - -Line 17. diff --git a/fern/products/sdk-reference/python/signalwire/skills/datasphere-serverless/skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/datasphere-serverless/skill/index.mdx deleted file mode 100644 index 65f5e4ab1d..0000000000 --- a/fern/products/sdk-reference/python/signalwire/skills/datasphere-serverless/skill/index.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -slug: "/reference/python/signalwire/skills/datasphere-serverless/skill" -title: "skill" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.skills.datasphere_serverless.skill" - parent: "signalwire.skills.datasphere_serverless" - module: "signalwire.skills.datasphere_serverless" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere_serverless/skill.py" ---- -# `skill` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module skill -``` - -## Classes - - - - SignalWire DataSphere knowledge search using DataMap (serverless execution) - - - -## Source - -[`signalwire/signalwire/skills/datasphere_serverless/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere_serverless/skill.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/datasphere/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/datasphere/index.mdx deleted file mode 100644 index 82b9f9b327..0000000000 --- a/fern/products/sdk-reference/python/signalwire/skills/datasphere/index.mdx +++ /dev/null @@ -1,44 +0,0 @@ ---- -slug: "/reference/python/signalwire/skills/datasphere" -title: "datasphere" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.skills.datasphere" - parent: "signalwire.skills" - module: "signalwire.skills" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere/__init__.py" ---- -# `datasphere` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module datasphere -``` - -## Properties - - - -## Modules - - - - Copyright (c) 2025 SignalWire - - - -## Source - -[`signalwire/signalwire/skills/datasphere/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/datasphere/skill/data-sphere-skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/datasphere/skill/data-sphere-skill/index.mdx deleted file mode 100644 index b6c9ecb735..0000000000 --- a/fern/products/sdk-reference/python/signalwire/skills/datasphere/skill/data-sphere-skill/index.mdx +++ /dev/null @@ -1,228 +0,0 @@ ---- -slug: "/reference/python/signalwire/skills/datasphere/skill/data-sphere-skill" -title: "DataSphereSkill" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.skills.datasphere.skill.DataSphereSkill" - parent: "signalwire.skills.datasphere.skill" - module: "signalwire.skills.datasphere.skill" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere/skill.py" ---- -# `DataSphereSkill` - -SignalWire DataSphere knowledge search capability - -## Signature - -```python -class DataSphereSkill(SkillBase) -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/python/signalwire/core/skill-base/skill-base) - -## Properties - - - - - - - - - - - - - -## Methods - -### cleanup - -Clean up resources when skill is unloaded. - -#### Signature - -```python -cleanup() -> None -``` - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/skills/datasphere/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere/skill.py) - -Line 280. - -*** - -### get\_global\_data - -Return global data for agent context - -#### Signature - -```python -get_global_data() -> Dict[str, Any] -``` - -#### Returns - -`Dict[str, Any]` - -#### Source - -[`signalwire/signalwire/skills/datasphere/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere/skill.py) - -Line 294. - -*** - -### get\_hints - -Return speech recognition hints - -#### Signature - -```python -get_hints() -> List[str] -``` - -#### Returns - -`List[str]` - -#### Source - -[`signalwire/signalwire/skills/datasphere/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere/skill.py) - -Line 285. - -*** - -### get\_instance\_key - -Get the key used to track this skill instance - -For DataSphere, we use 'search\_knowledge' as the default tool name instead of 'datasphere' - -#### Signature - -```python -get_instance_key() -> str -``` - -#### Returns - -`str` - -#### Source - -[`signalwire/signalwire/skills/datasphere/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere/skill.py) - -Line 111. - -*** - -### get\_parameter\_schema - -Get parameter schema for DataSphere skill - -**Modifiers:** `classmethod` - -#### Signature - -```python -@classmethod -get_parameter_schema() -> Dict[str, Dict[str, Any]] -``` - -#### Returns - -`Dict[str, Dict[str, Any]]` - -#### Source - -[`signalwire/signalwire/skills/datasphere/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere/skill.py) - -Line 29. - -*** - -### get\_prompt\_sections - -Return prompt sections to add to agent - -#### Signature - -```python -get_prompt_sections() -> List[Dict[str, Any]] -``` - -#### Returns - -`List[Dict[str, Any]]` - -#### Source - -[`signalwire/signalwire/skills/datasphere/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere/skill.py) - -Line 302. - -*** - -### register\_tools - -Register knowledge search tool with the agent - -#### Signature - -```python -register_tools() -> None -``` - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/skills/datasphere/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere/skill.py) - -Line 160. - -*** - -### setup - -Setup the datasphere skill - -#### Signature - -```python -setup() -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`signalwire/signalwire/skills/datasphere/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere/skill.py) - -Line 120. - -## Source - -[`signalwire/signalwire/skills/datasphere/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere/skill.py) - -Line 17. diff --git a/fern/products/sdk-reference/python/signalwire/skills/datasphere/skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/datasphere/skill/index.mdx deleted file mode 100644 index 0404cd7956..0000000000 --- a/fern/products/sdk-reference/python/signalwire/skills/datasphere/skill/index.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -slug: "/reference/python/signalwire/skills/datasphere/skill" -title: "skill" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.skills.datasphere.skill" - parent: "signalwire.skills.datasphere" - module: "signalwire.skills.datasphere" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere/skill.py" ---- -# `skill` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module skill -``` - -## Classes - - - - SignalWire DataSphere knowledge search capability - - - -## Source - -[`signalwire/signalwire/skills/datasphere/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere/skill.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/datetime/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/datetime/index.mdx deleted file mode 100644 index 00785820b7..0000000000 --- a/fern/products/sdk-reference/python/signalwire/skills/datetime/index.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -slug: "/reference/python/signalwire/skills/datetime" -title: "datetime" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.skills.datetime" - parent: "signalwire.skills" - module: "signalwire.skills" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datetime/__init__.py" ---- -# `datetime` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module datetime -``` - -## Modules - - - - Copyright (c) 2025 SignalWire - - - -## Source - -[`signalwire/signalwire/skills/datetime/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datetime/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/datetime/skill/date-time-skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/datetime/skill/date-time-skill/index.mdx deleted file mode 100644 index 912685fd2b..0000000000 --- a/fern/products/sdk-reference/python/signalwire/skills/datetime/skill/date-time-skill/index.mdx +++ /dev/null @@ -1,161 +0,0 @@ ---- -slug: "/reference/python/signalwire/skills/datetime/skill/date-time-skill" -title: "DateTimeSkill" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.skills.datetime.skill.DateTimeSkill" - parent: "signalwire.skills.datetime.skill" - module: "signalwire.skills.datetime.skill" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datetime/skill.py" ---- -# `DateTimeSkill` - -Provides current date, time, and timezone information - -## Signature - -```python -class DateTimeSkill(SkillBase) -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/python/signalwire/core/skill-base/skill-base) - -## Properties - - - - - - - - - - - -## Methods - -### get\_hints - -Return speech recognition hints - -#### Signature - -```python -get_hints() -> List[str] -``` - -#### Returns - -`List[str]` - -#### Source - -[`signalwire/signalwire/skills/datetime/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datetime/skill.py) - -Line 93. - -*** - -### get\_parameter\_schema - -Get the parameter schema for the datetime skill - -The datetime skill has no custom parameters - it inherits only -the base parameters from SkillBase. - -**Modifiers:** `classmethod` - -#### Signature - -```python -@classmethod -get_parameter_schema() -> Dict[str, Dict[str, Any]] -``` - -#### Returns - -`Dict[str, Dict[str, Any]]` - -#### Source - -[`signalwire/signalwire/skills/datetime/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datetime/skill.py) - -Line 113. - -*** - -### get\_prompt\_sections - -Return prompt sections to add to agent - -#### Signature - -```python -get_prompt_sections() -> List[Dict[str, Any]] -``` - -#### Returns - -`List[Dict[str, Any]]` - -#### Source - -[`signalwire/signalwire/skills/datetime/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datetime/skill.py) - -Line 99. - -*** - -### register\_tools - -Register datetime tools with the agent - -#### Signature - -```python -register_tools() -> None -``` - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/skills/datetime/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datetime/skill.py) - -Line 30. - -*** - -### setup - -Setup the datetime skill - -#### Signature - -```python -setup() -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`signalwire/signalwire/skills/datetime/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datetime/skill.py) - -Line 26. - -## Source - -[`signalwire/signalwire/skills/datetime/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datetime/skill.py) - -Line 17. diff --git a/fern/products/sdk-reference/python/signalwire/skills/datetime/skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/datetime/skill/index.mdx deleted file mode 100644 index 6f20aab45e..0000000000 --- a/fern/products/sdk-reference/python/signalwire/skills/datetime/skill/index.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -slug: "/reference/python/signalwire/skills/datetime/skill" -title: "skill" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.skills.datetime.skill" - parent: "signalwire.skills.datetime" - module: "signalwire.skills.datetime" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datetime/skill.py" ---- -# `skill` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module skill -``` - -## Classes - - - - Provides current date, time, and timezone information - - - -## Source - -[`signalwire/signalwire/skills/datetime/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datetime/skill.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/google-maps/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/google-maps/index.mdx deleted file mode 100644 index a48b3324cf..0000000000 --- a/fern/products/sdk-reference/python/signalwire/skills/google-maps/index.mdx +++ /dev/null @@ -1,35 +0,0 @@ ---- -slug: "/reference/python/signalwire/skills/google-maps" -title: "google_maps" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.skills.google_maps" - parent: "signalwire.skills" - module: "signalwire.skills" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/google_maps/__init__.py" ---- -# `google_maps` - -Google Maps skill for SignalWire Agents - -## Signature - -```python -module google_maps -``` - -## Modules - - - - Copyright (c) 2025 SignalWire - - - -## Source - -[`signalwire/signalwire/skills/google_maps/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/google_maps/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/google-maps/skill/google-maps-client/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/google-maps/skill/google-maps-client/index.mdx deleted file mode 100644 index d9ded96ab8..0000000000 --- a/fern/products/sdk-reference/python/signalwire/skills/google-maps/skill/google-maps-client/index.mdx +++ /dev/null @@ -1,118 +0,0 @@ ---- -slug: "/reference/python/signalwire/skills/google-maps/skill/google-maps-client" -title: "GoogleMapsClient" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.skills.google_maps.skill.GoogleMapsClient" - parent: "signalwire.skills.google_maps.skill" - module: "signalwire.skills.google_maps.skill" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/google_maps/skill.py" ---- -# `GoogleMapsClient` - -## Signature - -```python -class GoogleMapsClient -``` - -## Properties - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(api_key) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/skills/google_maps/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/google_maps/skill.py) - -Line 117. - -*** - -### compute\_route - -Compute route using Google Routes API. - -Returns: \{"distance\_meters": int, "duration\_seconds": int\} or None - -#### Signature - -```python -compute_route(origin_lat, origin_lng, dest_lat, dest_lng) -``` - -#### Parameters - - - - - - - - - -#### Source - -[`signalwire/signalwire/skills/google_maps/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/google_maps/skill.py) - -Line 316. - -*** - -### validate\_address - -Validate and geocode an address or business name. - -When bias\_lat/bias\_lng are provided (destination search with known pickup): - -1. First tries Nearby Search with rankby=distance to find the CLOSEST - matching business (e.g. "Walmart" → nearest Walmart to pickup). -2. Falls back to Autocomplete with location bias (no strictbounds) for - street addresses or if Nearby Search finds nothing. - -Without bias coords (pickup search): uses plain Autocomplete. - -Returns: \{"address": str, "lat": float, "lng": float\} or None - -#### Signature - -```python -validate_address(input_text, bias_lat = None, bias_lng = None) -``` - -#### Parameters - - - - - - - -#### Source - -[`signalwire/signalwire/skills/google_maps/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/google_maps/skill.py) - -Line 120. - -## Source - -[`signalwire/signalwire/skills/google_maps/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/google_maps/skill.py) - -Line 116. diff --git a/fern/products/sdk-reference/python/signalwire/skills/google-maps/skill/google-maps-skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/google-maps/skill/google-maps-skill/index.mdx deleted file mode 100644 index c774c96632..0000000000 --- a/fern/products/sdk-reference/python/signalwire/skills/google-maps/skill/google-maps-skill/index.mdx +++ /dev/null @@ -1,158 +0,0 @@ ---- -slug: "/reference/python/signalwire/skills/google-maps/skill/google-maps-skill" -title: "GoogleMapsSkill" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.skills.google_maps.skill.GoogleMapsSkill" - parent: "signalwire.skills.google_maps.skill" - module: "signalwire.skills.google_maps.skill" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/google_maps/skill.py" ---- -# `GoogleMapsSkill` - -Validate addresses and compute driving routes using Google Maps - -## Signature - -```python -class GoogleMapsSkill(SkillBase) -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/python/signalwire/core/skill-base/skill-base) - -## Properties - - - - - - - - - - - -## Methods - -### get\_hints - -Return speech recognition hints - -#### Signature - -```python -get_hints() -> List[str] -``` - -#### Returns - -`List[str]` - -#### Source - -[`signalwire/signalwire/skills/google_maps/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/google_maps/skill.py) - -Line 530. - -*** - -### get\_parameter\_schema - -Get parameter schema for google\_maps skill - -**Modifiers:** `classmethod` - -#### Signature - -```python -@classmethod -get_parameter_schema() -> Dict[str, Dict[str, Any]] -``` - -#### Returns - -`Dict[str, Dict[str, Any]]` - -#### Source - -[`signalwire/signalwire/skills/google_maps/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/google_maps/skill.py) - -Line 387. - -*** - -### get\_prompt\_sections - -Return prompt sections to add to agent - -#### Signature - -```python -get_prompt_sections() -> List[Dict[str, Any]] -``` - -#### Returns - -`List[Dict[str, Any]]` - -#### Source - -[`signalwire/signalwire/skills/google_maps/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/google_maps/skill.py) - -Line 534. - -*** - -### register\_tools - -Register address lookup and route computation tools - -#### Signature - -```python -register_tools() -> None -``` - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/skills/google_maps/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/google_maps/skill.py) - -Line 429. - -*** - -### setup - -Setup the Google Maps skill - -#### Signature - -```python -setup() -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`signalwire/signalwire/skills/google_maps/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/google_maps/skill.py) - -Line 414. - -## Source - -[`signalwire/signalwire/skills/google_maps/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/google_maps/skill.py) - -Line 378. diff --git a/fern/products/sdk-reference/python/signalwire/skills/google-maps/skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/google-maps/skill/index.mdx deleted file mode 100644 index 26fa341bae..0000000000 --- a/fern/products/sdk-reference/python/signalwire/skills/google-maps/skill/index.mdx +++ /dev/null @@ -1,46 +0,0 @@ ---- -slug: "/reference/python/signalwire/skills/google-maps/skill" -title: "skill" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.skills.google_maps.skill" - parent: "signalwire.skills.google_maps" - module: "signalwire.skills.google_maps" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/google_maps/skill.py" ---- -# `skill` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module skill -``` - -## Properties - - - -## Classes - - - - - - Validate addresses and compute driving routes using Google Maps - - - -## Source - -[`signalwire/signalwire/skills/google_maps/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/google_maps/skill.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/index.mdx deleted file mode 100644 index 74d5c76c56..0000000000 --- a/fern/products/sdk-reference/python/signalwire/skills/index.mdx +++ /dev/null @@ -1,112 +0,0 @@ ---- -slug: "/reference/python/signalwire/skills" -title: "skills" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.skills" - parent: "signalwire" - module: "signalwire" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/__init__.py" ---- -# `skills` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module skills -``` - -## Properties - - - -## Modules - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Google Maps skill for SignalWire Agents - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - -## Source - -[`signalwire/signalwire/skills/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/info-gatherer/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/info-gatherer/index.mdx deleted file mode 100644 index f63588edf7..0000000000 --- a/fern/products/sdk-reference/python/signalwire/skills/info-gatherer/index.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -slug: "/reference/python/signalwire/skills/info-gatherer" -title: "info_gatherer" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.skills.info_gatherer" - parent: "signalwire.skills" - module: "signalwire.skills" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/info_gatherer/__init__.py" ---- -# `info_gatherer` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module info_gatherer -``` - -## Modules - - - - Copyright (c) 2025 SignalWire - - - -## Source - -[`signalwire/signalwire/skills/info_gatherer/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/info_gatherer/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/info-gatherer/skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/info-gatherer/skill/index.mdx deleted file mode 100644 index 1587e1a3c9..0000000000 --- a/fern/products/sdk-reference/python/signalwire/skills/info-gatherer/skill/index.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -slug: "/reference/python/signalwire/skills/info-gatherer/skill" -title: "skill" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.skills.info_gatherer.skill" - parent: "signalwire.skills.info_gatherer" - module: "signalwire.skills.info_gatherer" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/info_gatherer/skill.py" ---- -# `skill` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module skill -``` - -## Classes - - - - Skill that guides an AI agent through a series of questions, collecting and storing answers in namespaced global\_data. - - - -## Source - -[`signalwire/signalwire/skills/info_gatherer/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/info_gatherer/skill.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/info-gatherer/skill/info-gatherer-skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/info-gatherer/skill/info-gatherer-skill/index.mdx deleted file mode 100644 index eab10c79ba..0000000000 --- a/fern/products/sdk-reference/python/signalwire/skills/info-gatherer/skill/info-gatherer-skill/index.mdx +++ /dev/null @@ -1,155 +0,0 @@ ---- -slug: "/reference/python/signalwire/skills/info-gatherer/skill/info-gatherer-skill" -title: "InfoGathererSkill" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.skills.info_gatherer.skill.InfoGathererSkill" - parent: "signalwire.skills.info_gatherer.skill" - module: "signalwire.skills.info_gatherer.skill" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/info_gatherer/skill.py" ---- -# `InfoGathererSkill` - -Skill that guides an AI agent through a series of questions, collecting -and storing answers in namespaced global\_data. - -Supports multiple instances with different prefixes so several -question sets can coexist on a single agent (e.g. "intake" and -"medical" questionnaires running side by side). - -## Signature - -```python -class InfoGathererSkill(SkillBase) -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/python/signalwire/core/skill-base/skill-base) - -## Properties - - - - - - - - - - - - - -## Methods - -### get\_global\_data - -#### Signature - -```python -get_global_data() -> Dict[str, Any] -``` - -#### Returns - -`Dict[str, Any]` - -#### Source - -[`signalwire/signalwire/skills/info_gatherer/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/info_gatherer/skill.py) - -Line 127. - -*** - -### get\_instance\_key - -#### Signature - -```python -get_instance_key() -> str -``` - -#### Returns - -`str` - -#### Source - -[`signalwire/signalwire/skills/info_gatherer/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/info_gatherer/skill.py) - -Line 81. - -*** - -### get\_parameter\_schema - -**Modifiers:** `classmethod` - -#### Signature - -```python -@classmethod -get_parameter_schema() -> Dict[str, Dict[str, Any]] -``` - -#### Returns - -`Dict[str, Dict[str, Any]]` - -#### Source - -[`signalwire/signalwire/skills/info_gatherer/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/info_gatherer/skill.py) - -Line 33. - -*** - -### register\_tools - -#### Signature - -```python -register_tools() -> None -``` - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/skills/info_gatherer/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/info_gatherer/skill.py) - -Line 162. - -*** - -### setup - -#### Signature - -```python -setup() -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`signalwire/signalwire/skills/info_gatherer/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/info_gatherer/skill.py) - -Line 91. - -## Source - -[`signalwire/signalwire/skills/info_gatherer/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/info_gatherer/skill.py) - -Line 16. diff --git a/fern/products/sdk-reference/python/signalwire/skills/joke/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/joke/index.mdx deleted file mode 100644 index ad156f678f..0000000000 --- a/fern/products/sdk-reference/python/signalwire/skills/joke/index.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -slug: "/reference/python/signalwire/skills/joke" -title: "joke" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.skills.joke" - parent: "signalwire.skills" - module: "signalwire.skills" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/joke/__init__.py" ---- -# `joke` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module joke -``` - -## Modules - - - - Copyright (c) 2025 SignalWire - - - -## Source - -[`signalwire/signalwire/skills/joke/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/joke/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/joke/skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/joke/skill/index.mdx deleted file mode 100644 index 6821efb017..0000000000 --- a/fern/products/sdk-reference/python/signalwire/skills/joke/skill/index.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -slug: "/reference/python/signalwire/skills/joke/skill" -title: "skill" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.skills.joke.skill" - parent: "signalwire.skills.joke" - module: "signalwire.skills.joke" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/joke/skill.py" ---- -# `skill` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module skill -``` - -## Classes - - - - Joke telling capability using API Ninjas with DataMap - - - -## Source - -[`signalwire/signalwire/skills/joke/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/joke/skill.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/joke/skill/joke-skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/joke/skill/joke-skill/index.mdx deleted file mode 100644 index 40ae1b8a94..0000000000 --- a/fern/products/sdk-reference/python/signalwire/skills/joke/skill/joke-skill/index.mdx +++ /dev/null @@ -1,180 +0,0 @@ ---- -slug: "/reference/python/signalwire/skills/joke/skill/joke-skill" -title: "JokeSkill" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.skills.joke.skill.JokeSkill" - parent: "signalwire.skills.joke.skill" - module: "signalwire.skills.joke.skill" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/joke/skill.py" ---- -# `JokeSkill` - -Joke telling capability using API Ninjas with DataMap - -## Signature - -```python -class JokeSkill(SkillBase) -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/python/signalwire/core/skill-base/skill-base) - -## Properties - - - - - - - - - - - -## Methods - -### get\_global\_data - -Return global data to be available in DataMap variables - -#### Signature - -```python -get_global_data() -> Dict[str, Any] -``` - -#### Returns - -`Dict[str, Any]` - -#### Source - -[`signalwire/signalwire/skills/joke/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/joke/skill.py) - -Line 91. - -*** - -### get\_hints - -Return speech recognition hints - -#### Signature - -```python -get_hints() -> List[str] -``` - -#### Returns - -`List[str]` - -#### Source - -[`signalwire/signalwire/skills/joke/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/joke/skill.py) - -Line 82. - -*** - -### get\_parameter\_schema - -Get parameter schema for joke skill - -**Modifiers:** `classmethod` - -#### Signature - -```python -@classmethod -get_parameter_schema() -> Dict[str, Dict[str, Any]] -``` - -#### Returns - -`Dict[str, Dict[str, Any]]` - -#### Source - -[`signalwire/signalwire/skills/joke/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/joke/skill.py) - -Line 26. - -*** - -### get\_prompt\_sections - -Return prompt sections to add to agent - -#### Signature - -```python -get_prompt_sections() -> List[Dict[str, Any]] -``` - -#### Returns - -`List[Dict[str, Any]]` - -#### Source - -[`signalwire/signalwire/skills/joke/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/joke/skill.py) - -Line 97. - -*** - -### register\_tools - -Register joke tool using DataMap - -#### Signature - -```python -register_tools() -> None -``` - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/skills/joke/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/joke/skill.py) - -Line 64. - -*** - -### setup - -Setup the joke skill - -#### Signature - -```python -setup() -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`signalwire/signalwire/skills/joke/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/joke/skill.py) - -Line 47. - -## Source - -[`signalwire/signalwire/skills/joke/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/joke/skill.py) - -Line 17. diff --git a/fern/products/sdk-reference/python/signalwire/skills/math/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/math/index.mdx deleted file mode 100644 index 418da0cc74..0000000000 --- a/fern/products/sdk-reference/python/signalwire/skills/math/index.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -slug: "/reference/python/signalwire/skills/math" -title: "math" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.skills.math" - parent: "signalwire.skills" - module: "signalwire.skills" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/math/__init__.py" ---- -# `math` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module math -``` - -## Modules - - - - Copyright (c) 2025 SignalWire - - - -## Source - -[`signalwire/signalwire/skills/math/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/math/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/math/skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/math/skill/index.mdx deleted file mode 100644 index 7f4c11e743..0000000000 --- a/fern/products/sdk-reference/python/signalwire/skills/math/skill/index.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -slug: "/reference/python/signalwire/skills/math/skill" -title: "skill" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.skills.math.skill" - parent: "signalwire.skills.math" - module: "signalwire.skills.math" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/math/skill.py" ---- -# `skill` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module skill -``` - -## Classes - - - - Provides basic mathematical calculation capabilities - - - -## Source - -[`signalwire/signalwire/skills/math/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/math/skill.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/math/skill/math-skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/math/skill/math-skill/index.mdx deleted file mode 100644 index 5e7671bb8b..0000000000 --- a/fern/products/sdk-reference/python/signalwire/skills/math/skill/math-skill/index.mdx +++ /dev/null @@ -1,161 +0,0 @@ ---- -slug: "/reference/python/signalwire/skills/math/skill/math-skill" -title: "MathSkill" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.skills.math.skill.MathSkill" - parent: "signalwire.skills.math.skill" - module: "signalwire.skills.math.skill" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/math/skill.py" ---- -# `MathSkill` - -Provides basic mathematical calculation capabilities - -## Signature - -```python -class MathSkill(SkillBase) -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/python/signalwire/core/skill-base/skill-base) - -## Properties - - - - - - - - - - - -## Methods - -### get\_hints - -Return speech recognition hints - -#### Signature - -```python -get_hints() -> List[str] -``` - -#### Returns - -`List[str]` - -#### Source - -[`signalwire/signalwire/skills/math/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/math/skill.py) - -Line 108. - -*** - -### get\_parameter\_schema - -Get the parameter schema for the math skill - -The math skill has no custom parameters - it inherits only -the base parameters from SkillBase. - -**Modifiers:** `classmethod` - -#### Signature - -```python -@classmethod -get_parameter_schema() -> Dict[str, Dict[str, Any]] -``` - -#### Returns - -`Dict[str, Dict[str, Any]]` - -#### Source - -[`signalwire/signalwire/skills/math/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/math/skill.py) - -Line 131. - -*** - -### get\_prompt\_sections - -Return prompt sections to add to agent - -#### Signature - -```python -get_prompt_sections() -> List[Dict[str, Any]] -``` - -#### Returns - -`List[Dict[str, Any]]` - -#### Source - -[`signalwire/signalwire/skills/math/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/math/skill.py) - -Line 117. - -*** - -### register\_tools - -Register math tools with the agent - -#### Signature - -```python -register_tools() -> None -``` - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/skills/math/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/math/skill.py) - -Line 30. - -*** - -### setup - -Setup the math skill - -#### Signature - -```python -setup() -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`signalwire/signalwire/skills/math/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/math/skill.py) - -Line 26. - -## Source - -[`signalwire/signalwire/skills/math/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/math/skill.py) - -Line 17. diff --git a/fern/products/sdk-reference/python/signalwire/skills/mcp-gateway/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/mcp-gateway/index.mdx deleted file mode 100644 index 7bc7a45f33..0000000000 --- a/fern/products/sdk-reference/python/signalwire/skills/mcp-gateway/index.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -slug: "/reference/python/signalwire/skills/mcp-gateway" -title: "mcp_gateway" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.skills.mcp_gateway" - parent: "signalwire.skills" - module: "signalwire.skills" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/mcp_gateway/__init__.py" ---- -# `mcp_gateway` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module mcp_gateway -``` - -## Modules - - - - Copyright (c) 2025 SignalWire - - - -## Source - -[`signalwire/signalwire/skills/mcp_gateway/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/mcp_gateway/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/mcp-gateway/skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/mcp-gateway/skill/index.mdx deleted file mode 100644 index 3516dcf714..0000000000 --- a/fern/products/sdk-reference/python/signalwire/skills/mcp-gateway/skill/index.mdx +++ /dev/null @@ -1,44 +0,0 @@ ---- -slug: "/reference/python/signalwire/skills/mcp-gateway/skill" -title: "skill" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.skills.mcp_gateway.skill" - parent: "signalwire.skills.mcp_gateway" - module: "signalwire.skills.mcp_gateway" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/mcp_gateway/skill.py" ---- -# `skill` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module skill -``` - -## Properties - - - -## Classes - - - - MCP Gateway Skill - Bridge MCP servers with SWAIG functions - - - -## Source - -[`signalwire/signalwire/skills/mcp_gateway/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/mcp_gateway/skill.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/mcp-gateway/skill/mcp-gateway-skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/mcp-gateway/skill/mcp-gateway-skill/index.mdx deleted file mode 100644 index 2c3f2a4777..0000000000 --- a/fern/products/sdk-reference/python/signalwire/skills/mcp-gateway/skill/mcp-gateway-skill/index.mdx +++ /dev/null @@ -1,183 +0,0 @@ ---- -slug: "/reference/python/signalwire/skills/mcp-gateway/skill/mcp-gateway-skill" -title: "MCPGatewaySkill" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.skills.mcp_gateway.skill.MCPGatewaySkill" - parent: "signalwire.skills.mcp_gateway.skill" - module: "signalwire.skills.mcp_gateway.skill" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/mcp_gateway/skill.py" ---- -# `MCPGatewaySkill` - -MCP Gateway Skill - Bridge MCP servers with SWAIG functions - -This skill connects SignalWire agents to MCP (Model Context Protocol) servers -through a gateway service, dynamically creating SWAIG functions for MCP tools. - -## Signature - -```python -class MCPGatewaySkill(SkillBase) -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/python/signalwire/core/skill-base/skill-base) - -## Properties - - - - - - - - - - - -## Methods - -### get\_global\_data - -Return global data for DataMap variables - -#### Signature - -```python -get_global_data() -> Dict[str, Any] -``` - -#### Returns - -`Dict[str, Any]` - -#### Source - -[`signalwire/signalwire/skills/mcp_gateway/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/mcp_gateway/skill.py) - -Line 392. - -*** - -### get\_hints - -Return speech recognition hints - -#### Signature - -```python -get_hints() -> List[str] -``` - -#### Returns - -`List[str]` - -#### Source - -[`signalwire/signalwire/skills/mcp_gateway/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/mcp_gateway/skill.py) - -Line 381. - -*** - -### get\_parameter\_schema - -Get parameter schema for MCP Gateway skill - -**Modifiers:** `classmethod` - -#### Signature - -```python -@classmethod -get_parameter_schema() -> Dict[str, Dict[str, Any]] -``` - -#### Returns - -`Dict[str, Dict[str, Any]]` - -#### Source - -[`signalwire/signalwire/skills/mcp_gateway/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/mcp_gateway/skill.py) - -Line 36. - -*** - -### get\_prompt\_sections - -Return prompt sections to add to agent - -#### Signature - -```python -get_prompt_sections() -> List[Dict[str, Any]] -``` - -#### Returns - -`List[Dict[str, Any]]` - -#### Source - -[`signalwire/signalwire/skills/mcp_gateway/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/mcp_gateway/skill.py) - -Line 401. - -*** - -### register\_tools - -Register SWAIG tools from MCP services - -#### Signature - -```python -register_tools() -> None -``` - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/skills/mcp_gateway/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/mcp_gateway/skill.py) - -Line 185. - -*** - -### setup - -Setup and validate skill configuration - -#### Signature - -```python -setup() -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`signalwire/signalwire/skills/mcp_gateway/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/mcp_gateway/skill.py) - -Line 118. - -## Source - -[`signalwire/signalwire/skills/mcp_gateway/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/mcp_gateway/skill.py) - -Line 22. diff --git a/fern/products/sdk-reference/python/signalwire/skills/native-vector-search/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/native-vector-search/index.mdx deleted file mode 100644 index a694711b22..0000000000 --- a/fern/products/sdk-reference/python/signalwire/skills/native-vector-search/index.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -slug: "/reference/python/signalwire/skills/native-vector-search" -title: "native_vector_search" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.skills.native_vector_search" - parent: "signalwire.skills" - module: "signalwire.skills" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/native_vector_search/__init__.py" ---- -# `native_vector_search` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module native_vector_search -``` - -## Modules - - - - Copyright (c) 2025 SignalWire - - - -## Source - -[`signalwire/signalwire/skills/native_vector_search/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/native_vector_search/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/native-vector-search/skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/native-vector-search/skill/index.mdx deleted file mode 100644 index 0111d68ba7..0000000000 --- a/fern/products/sdk-reference/python/signalwire/skills/native-vector-search/skill/index.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -slug: "/reference/python/signalwire/skills/native-vector-search/skill" -title: "skill" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.skills.native_vector_search.skill" - parent: "signalwire.skills.native_vector_search" - module: "signalwire.skills.native_vector_search" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/native_vector_search/skill.py" ---- -# `skill` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module skill -``` - -## Classes - - - - Native vector search capability using local document indexes or remote search servers - - - -## Source - -[`signalwire/signalwire/skills/native_vector_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/native_vector_search/skill.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/native-vector-search/skill/native-vector-search-skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/native-vector-search/skill/native-vector-search-skill/index.mdx deleted file mode 100644 index e59357ff9a..0000000000 --- a/fern/products/sdk-reference/python/signalwire/skills/native-vector-search/skill/native-vector-search-skill/index.mdx +++ /dev/null @@ -1,234 +0,0 @@ ---- -slug: "/reference/python/signalwire/skills/native-vector-search/skill/native-vector-search-skill" -title: "NativeVectorSearchSkill" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.skills.native_vector_search.skill.NativeVectorSearchSkill" - parent: "signalwire.skills.native_vector_search.skill" - module: "signalwire.skills.native_vector_search.skill" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/native_vector_search/skill.py" ---- -# `NativeVectorSearchSkill` - -Native vector search capability using local document indexes or remote search servers - -## Signature - -```python -class NativeVectorSearchSkill(SkillBase) -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/python/signalwire/core/skill-base/skill-base) - -## Properties - - - - - - - - - - - - - -## Methods - -### cleanup - -Cleanup when skill is removed or agent shuts down - -#### Signature - -```python -cleanup() -> None -``` - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/skills/native_vector_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/native_vector_search/skill.py) - -Line 818. - -*** - -### get\_global\_data - -Return data to add to agent's global context - -#### Signature - -```python -get_global_data() -> Dict[str, Any] -``` - -#### Returns - -`Dict[str, Any]` - -#### Source - -[`signalwire/signalwire/skills/native_vector_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/native_vector_search/skill.py) - -Line 783. - -*** - -### get\_hints - -Return speech recognition hints for this skill - -#### Signature - -```python -get_hints() -> List[str] -``` - -#### Returns - -`List[str]` - -#### Source - -[`signalwire/signalwire/skills/native_vector_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/native_vector_search/skill.py) - -Line 767. - -*** - -### get\_instance\_key - -Get the key used to track this skill instance - -For native vector search, we use the tool name to differentiate instances - -#### Signature - -```python -get_instance_key() -> str -``` - -#### Returns - -`str` - -#### Source - -[`signalwire/signalwire/skills/native_vector_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/native_vector_search/skill.py) - -Line 231. - -*** - -### get\_parameter\_schema - -Get parameter schema for Native Vector Search skill - -This skill supports three modes of operation: - -1. Network Mode: Set 'remote\_url' to connect to a remote search server -2. Local pgvector: Set backend='pgvector' with connection\_string and collection\_name -3. Local SQLite: Set 'index\_file' to use a local .swsearch file (default) - -**Modifiers:** `classmethod` - -#### Signature - -```python -@classmethod -get_parameter_schema() -> Dict[str, Dict[str, Any]] -``` - -#### Returns - -`Dict[str, Dict[str, Any]]` - -#### Source - -[`signalwire/signalwire/skills/native_vector_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/native_vector_search/skill.py) - -Line 31. - -*** - -### get\_prompt\_sections - -Return prompt sections to add to agent - -#### Signature - -```python -get_prompt_sections() -> List[Dict[str, Any]] -``` - -#### Returns - -`List[Dict[str, Any]]` - -#### Source - -[`signalwire/signalwire/skills/native_vector_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/native_vector_search/skill.py) - -Line 796. - -*** - -### register\_tools - -Register native vector search tool with the agent - -#### Signature - -```python -register_tools() -> None -``` - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/skills/native_vector_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/native_vector_search/skill.py) - -Line 468. - -*** - -### setup - -Setup the native vector search skill - -#### Signature - -```python -setup() -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`signalwire/signalwire/skills/native_vector_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/native_vector_search/skill.py) - -Line 241. - -## Source - -[`signalwire/signalwire/skills/native_vector_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/native_vector_search/skill.py) - -Line 19. diff --git a/fern/products/sdk-reference/python/signalwire/skills/play-background-file/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/play-background-file/index.mdx deleted file mode 100644 index 8a7517a6e6..0000000000 --- a/fern/products/sdk-reference/python/signalwire/skills/play-background-file/index.mdx +++ /dev/null @@ -1,44 +0,0 @@ ---- -slug: "/reference/python/signalwire/skills/play-background-file" -title: "play_background_file" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.skills.play_background_file" - parent: "signalwire.skills" - module: "signalwire.skills" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/play_background_file/__init__.py" ---- -# `play_background_file` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module play_background_file -``` - -## Properties - - - -## Modules - - - - Copyright (c) 2025 SignalWire - - - -## Source - -[`signalwire/signalwire/skills/play_background_file/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/play_background_file/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/play-background-file/skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/play-background-file/skill/index.mdx deleted file mode 100644 index 9e99c004e6..0000000000 --- a/fern/products/sdk-reference/python/signalwire/skills/play-background-file/skill/index.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -slug: "/reference/python/signalwire/skills/play-background-file/skill" -title: "skill" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.skills.play_background_file.skill" - parent: "signalwire.skills.play_background_file" - module: "signalwire.skills.play_background_file" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/play_background_file/skill.py" ---- -# `skill` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module skill -``` - -## Classes - - - - Skill for playing background files (audio/video) with configurable tool names. - - - -## Source - -[`signalwire/signalwire/skills/play_background_file/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/play_background_file/skill.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/play-background-file/skill/play-background-file-skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/play-background-file/skill/play-background-file-skill/index.mdx deleted file mode 100644 index ea107fdb2f..0000000000 --- a/fern/products/sdk-reference/python/signalwire/skills/play-background-file/skill/play-background-file-skill/index.mdx +++ /dev/null @@ -1,207 +0,0 @@ ---- -slug: "/reference/python/signalwire/skills/play-background-file/skill/play-background-file-skill" -title: "PlayBackgroundFileSkill" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.skills.play_background_file.skill.PlayBackgroundFileSkill" - parent: "signalwire.skills.play_background_file.skill" - module: "signalwire.skills.play_background_file.skill" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/play_background_file/skill.py" ---- -# `PlayBackgroundFileSkill` - -Skill for playing background files (audio/video) with configurable tool names. - -Supports multiple instances with different tool names and file collections. -Uses DataMap for serverless execution with dynamic enum generation. - -Configuration: - -- tool\_name: Custom name for the generated SWAIG function -- files: Array of file objects with key, description, url, and optional wait - -> \[!NOTE] -> agent.add\_skill("play\_background\_file", \{ -> "tool\_name": "play\_testimonial", -> "files": \[ -> \{ -> "key": "massey", -> "description": "Customer success story from Massey Energy", -> "url": "https://example.com/massey.mp4", -> "wait": True -> \} -> ] -> \}) - -## Signature - -```python -class PlayBackgroundFileSkill(SkillBase) -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/python/signalwire/core/skill-base/skill-base) - -## Properties - - - - - - - - - - - -## Methods - -### \_\_init\_\_ - -Initialize the skill with configuration parameters. - -#### Signature - -```python -__init__(agent, params: Dict[str, Any] = None) -``` - -#### Parameters - - - The agent instance this skill belongs to - - - - Configuration dictionary containing: - - -#### Source - -[`signalwire/signalwire/skills/play_background_file/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/play_background_file/skill.py) - -Line 87. - -*** - -### get\_instance\_key - -Generate a unique instance key for this skill configuration. - -#### Signature - -```python -get_instance_key() -> str -``` - -#### Returns - -`str` — Unique key combining skill name and tool name - -#### Source - -[`signalwire/signalwire/skills/play_background_file/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/play_background_file/skill.py) - -Line 131. - -*** - -### get\_parameter\_schema - -Get parameter schema for Play Background File skill - -**Modifiers:** `classmethod` - -#### Signature - -```python -@classmethod -get_parameter_schema() -> Dict[str, Dict[str, Any]] -``` - -#### Returns - -`Dict[str, Dict[str, Any]]` - -#### Source - -[`signalwire/signalwire/skills/play_background_file/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/play_background_file/skill.py) - -Line 51. - -*** - -### get\_tools - -Generate the SWAIG tool with DataMap expressions. - -#### Signature - -```python -get_tools() -> List[Dict[str, Any]] -``` - -#### Returns - -`List[Dict[str, Any]]` — List containing the generated tool configuration - -#### Source - -[`signalwire/signalwire/skills/play_background_file/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/play_background_file/skill.py) - -Line 158. - -*** - -### register\_tools - -Register SWAIG tools with the agent - -#### Signature - -```python -register_tools() -> None -``` - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/skills/play_background_file/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/play_background_file/skill.py) - -Line 149. - -*** - -### setup - -Setup the skill - no external dependencies needed. - -#### Signature - -```python -setup() -> bool -``` - -#### Returns - -`bool` — True if setup successful - -#### Source - -[`signalwire/signalwire/skills/play_background_file/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/play_background_file/skill.py) - -Line 140. - -## Source - -[`signalwire/signalwire/skills/play_background_file/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/play_background_file/skill.py) - -Line 22. diff --git a/fern/products/sdk-reference/python/signalwire/skills/registry/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/registry/index.mdx deleted file mode 100644 index 9a51d738f4..0000000000 --- a/fern/products/sdk-reference/python/signalwire/skills/registry/index.mdx +++ /dev/null @@ -1,44 +0,0 @@ ---- -slug: "/reference/python/signalwire/skills/registry" -title: "registry" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.skills.registry" - parent: "signalwire.skills" - module: "signalwire.skills" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/registry.py" ---- -# `registry` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module registry -``` - -## Properties - - - -## Classes - - - - Global registry for on-demand skill loading - - - -## Source - -[`signalwire/signalwire/skills/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/registry.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/registry/skill-registry/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/registry/skill-registry/index.mdx deleted file mode 100644 index fa232db0bb..0000000000 --- a/fern/products/sdk-reference/python/signalwire/skills/registry/skill-registry/index.mdx +++ /dev/null @@ -1,276 +0,0 @@ ---- -slug: "/reference/python/signalwire/skills/registry/skill-registry" -title: "SkillRegistry" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.skills.registry.SkillRegistry" - parent: "signalwire.skills.registry" - module: "signalwire.skills.registry" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/registry.py" ---- -# `SkillRegistry` - -Global registry for on-demand skill loading - -## Signature - -```python -class SkillRegistry -``` - -## Properties - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__() -``` - -#### Source - -[`signalwire/signalwire/skills/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/registry.py) - -Line 25. - -*** - -### add\_skill\_directory - -Add a directory to search for skills - -This allows third-party skill collections to be registered by path. -Skills in these directories should follow the same structure as built-in skills: - -- Each skill in its own subdirectory -- skill.py file containing the skill class - -> \[!NOTE] -> skill\_registry.add\_skill\_directory('/opt/custom\_skills') -> -> ### Now agent.add\_skill('my\_custom\_skill') will search in this directory - -#### Signature - -```python -add_skill_directory(path: str) -> None -``` - -#### Parameters - - - Path to directory containing skill subdirectories - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/skills/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/registry.py) - -Line 353. - -*** - -### discover\_skills - -Discover and return all available skills. - -Skills load on-demand, so there is nothing to eagerly register; this -scans the skills package and returns metadata for everything -discoverable, so callers can enumerate what is available. - -#### Signature - -```python -discover_skills() -> List[Dict[str, str]] -``` - -#### Returns - -`List[Dict[str, str]]` - -#### Source - -[`signalwire/signalwire/skills/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/registry.py) - -Line 122. - -*** - -### get\_all\_skills\_schema - -Get complete schema for all available skills including parameter metadata - -This method scans all available skills and returns a comprehensive schema -that includes skill metadata and parameter definitions suitable for GUI -configuration or API documentation. - -> \[!NOTE] -> \{ -> "web\_search": \{ -> "name": "web\_search", -> "description": "Search the web for information", -> "version": "1.0.0", -> "supports\_multiple\_instances": True, -> "required\_packages": \["bs4", "requests"], -> "required\_env\_vars": \[], -> "parameters": \{ -> "api\_key": \{ -> "type": "string", -> "description": "Google API key", -> "required": True, -> "hidden": True, -> "env\_var": "GOOGLE\_SEARCH\_API\_KEY" -> \}, -> ... -> \}, -> "source": "built-in" -> \} -> \} - -#### Signature - -```python -get_all_skills_schema() -> Dict[str, Dict[str, Any]] -``` - -#### Returns - -`Dict[str, Dict[str, Any]]` — Dict\[str, Dict\[str, Any]]: Complete skill schema where keys are skill names and values contain: - -#### Source - -[`signalwire/signalwire/skills/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/registry.py) - -Line 232. - -*** - -### get\_skill\_class - -Get skill class by name, loading on-demand if needed - -#### Signature - -```python -get_skill_class(skill_name: str) -> Optional[Type[SkillBase]] -``` - -#### Parameters - - - -#### Returns - -`Optional[Type[SkillBase]]` - -#### Source - -[`signalwire/signalwire/skills/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/registry.py) - -Line 199. - -*** - -### list\_all\_skill\_sources - -List all skill sources and the skills available from each - -Returns a dictionary mapping source types to lists of skill names: -\{ -'built-in': \['datetime', 'math', ...], -'external\_paths': \['custom\_skill1', ...], -'entry\_points': \['weather', ...], -'registered': \['my\_skill', ...] -\} - -#### Signature - -```python -list_all_skill_sources() -> Dict[str, List[str]] -``` - -#### Returns - -`Dict[str, List[str]]` - -#### Source - -[`signalwire/signalwire/skills/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/registry.py) - -Line 439. - -*** - -### list\_skills - -List all available skills by scanning directories (only when explicitly requested) - -#### Signature - -```python -list_skills() -> List[Dict[str, str]] -``` - -#### Returns - -`List[Dict[str, str]]` - -#### Source - -[`signalwire/signalwire/skills/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/registry.py) - -Line 208. - -*** - -### register\_skill - -Register a skill class directly - -This allows third-party code to register skill classes without -requiring them to be in a specific directory structure. - -> \[!NOTE] -> from my\_custom\_skills import MyWeatherSkill -> skill\_registry.register\_skill(MyWeatherSkill) - -#### Signature - -```python -register_skill(skill_class: Type[SkillBase]) -> None -``` - -#### Parameters - - - A class that inherits from SkillBase - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/skills/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/registry.py) - -Line 135. - -## Source - -[`signalwire/signalwire/skills/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/registry.py) - -Line 22. diff --git a/fern/products/sdk-reference/python/signalwire/skills/spider/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/spider/index.mdx deleted file mode 100644 index 56de394ceb..0000000000 --- a/fern/products/sdk-reference/python/signalwire/skills/spider/index.mdx +++ /dev/null @@ -1,44 +0,0 @@ ---- -slug: "/reference/python/signalwire/skills/spider" -title: "spider" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.skills.spider" - parent: "signalwire.skills" - module: "signalwire.skills" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/spider/__init__.py" ---- -# `spider` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module spider -``` - -## Properties - - - -## Modules - - - - Copyright (c) 2025 SignalWire - - - -## Source - -[`signalwire/signalwire/skills/spider/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/spider/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/spider/skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/spider/skill/index.mdx deleted file mode 100644 index 542fca5f6e..0000000000 --- a/fern/products/sdk-reference/python/signalwire/skills/spider/skill/index.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -slug: "/reference/python/signalwire/skills/spider/skill" -title: "skill" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.skills.spider.skill" - parent: "signalwire.skills.spider" - module: "signalwire.skills.spider" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/spider/skill.py" ---- -# `skill` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module skill -``` - -## Classes - - - - Fast web scraping skill optimized for speed and token efficiency. - - - -## Source - -[`signalwire/signalwire/skills/spider/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/spider/skill.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/spider/skill/spider-skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/spider/skill/spider-skill/index.mdx deleted file mode 100644 index f4306067a5..0000000000 --- a/fern/products/sdk-reference/python/signalwire/skills/spider/skill/spider-skill/index.mdx +++ /dev/null @@ -1,238 +0,0 @@ ---- -slug: "/reference/python/signalwire/skills/spider/skill/spider-skill" -title: "SpiderSkill" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.skills.spider.skill.SpiderSkill" - parent: "signalwire.skills.spider.skill" - module: "signalwire.skills.spider.skill" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/spider/skill.py" ---- -# `SpiderSkill` - -Fast web scraping skill optimized for speed and token efficiency. - -## Signature - -```python -class SpiderSkill(SkillBase) -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/python/signalwire/core/skill-base/skill-base) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -## Methods - -### \_\_init\_\_ - -Initialize the spider skill with configuration parameters. - -#### Signature - -```python -__init__(agent, params: Dict[str, Any]) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/skills/spider/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/spider/skill.py) - -Line 150. - -*** - -### cleanup - -Clean up resources when skill is unloaded. - -#### Signature - -```python -cleanup() -> None -``` - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/skills/spider/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/spider/skill.py) - -Line 620. - -*** - -### get\_hints - -Return speech recognition hints for this skill. - -#### Signature - -```python -get_hints() -> List[str] -``` - -#### Returns - -`List[str]` - -#### Source - -[`signalwire/signalwire/skills/spider/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/spider/skill.py) - -Line 613. - -*** - -### get\_instance\_key - -Return unique key for this skill instance. - -#### Signature - -```python -get_instance_key() -> str -``` - -#### Returns - -`str` - -#### Source - -[`signalwire/signalwire/skills/spider/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/spider/skill.py) - -Line 191. - -*** - -### get\_parameter\_schema - -Get parameter schema for Spider skill - -**Modifiers:** `classmethod` - -#### Signature - -```python -@classmethod -get_parameter_schema() -> Dict[str, Dict[str, Any]] -``` - -#### Returns - -`Dict[str, Dict[str, Any]]` - -#### Source - -[`signalwire/signalwire/skills/spider/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/spider/skill.py) - -Line 37. - -*** - -### register\_tools - -Register the web scraping tools with the agent. - -#### Signature - -```python -register_tools() -> None -``` - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/skills/spider/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/spider/skill.py) - -Line 229. - -*** - -### setup - -Validate configuration and setup the skill. - -#### Signature - -```python -setup() -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`signalwire/signalwire/skills/spider/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/spider/skill.py) - -Line 196. - -## Source - -[`signalwire/signalwire/skills/spider/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/spider/skill.py) - -Line 24. diff --git a/fern/products/sdk-reference/python/signalwire/skills/swml-transfer/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/swml-transfer/index.mdx deleted file mode 100644 index 40ce76451d..0000000000 --- a/fern/products/sdk-reference/python/signalwire/skills/swml-transfer/index.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -slug: "/reference/python/signalwire/skills/swml-transfer" -title: "swml_transfer" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.skills.swml_transfer" - parent: "signalwire.skills" - module: "signalwire.skills" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/swml_transfer/__init__.py" ---- -# `swml_transfer` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module swml_transfer -``` - -## Modules - - - - Copyright (c) 2025 SignalWire - - - -## Source - -[`signalwire/signalwire/skills/swml_transfer/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/swml_transfer/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/swml-transfer/skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/swml-transfer/skill/index.mdx deleted file mode 100644 index 2e95c2ef14..0000000000 --- a/fern/products/sdk-reference/python/signalwire/skills/swml-transfer/skill/index.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -slug: "/reference/python/signalwire/skills/swml-transfer/skill" -title: "skill" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.skills.swml_transfer.skill" - parent: "signalwire.skills.swml_transfer" - module: "signalwire.skills.swml_transfer" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/swml_transfer/skill.py" ---- -# `skill` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module skill -``` - -## Classes - - - - Skill for transferring calls between agents using SWML with pattern matching - - - -## Source - -[`signalwire/signalwire/skills/swml_transfer/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/swml_transfer/skill.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/swml-transfer/skill/swml-transfer-skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/swml-transfer/skill/swml-transfer-skill/index.mdx deleted file mode 100644 index a66b9f7a42..0000000000 --- a/fern/products/sdk-reference/python/signalwire/skills/swml-transfer/skill/swml-transfer-skill/index.mdx +++ /dev/null @@ -1,184 +0,0 @@ ---- -slug: "/reference/python/signalwire/skills/swml-transfer/skill/swml-transfer-skill" -title: "SWMLTransferSkill" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.skills.swml_transfer.skill.SWMLTransferSkill" - parent: "signalwire.skills.swml_transfer.skill" - module: "signalwire.skills.swml_transfer.skill" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/swml_transfer/skill.py" ---- -# `SWMLTransferSkill` - -Skill for transferring calls between agents using SWML with pattern matching - -## Signature - -```python -class SWMLTransferSkill(SkillBase) -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/python/signalwire/core/skill-base/skill-base) - -## Properties - - - - - - - - - - - - - -## Methods - -### get\_hints - -Return speech recognition hints - -#### Signature - -```python -get_hints() -> List[str] -``` - -#### Returns - -`List[str]` - -#### Source - -[`signalwire/signalwire/skills/swml_transfer/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/swml_transfer/skill.py) - -Line 266. - -*** - -### get\_instance\_key - -Get the key used to track this skill instance - -For SWML transfer, we use the tool name to differentiate instances - -#### Signature - -```python -get_instance_key() -> str -``` - -#### Returns - -`str` - -#### Source - -[`signalwire/signalwire/skills/swml_transfer/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/swml_transfer/skill.py) - -Line 120. - -*** - -### get\_parameter\_schema - -Get parameter schema for SWML Transfer skill - -**Modifiers:** `classmethod` - -#### Signature - -```python -@classmethod -get_parameter_schema() -> Dict[str, Dict[str, Any]] -``` - -#### Returns - -`Dict[str, Dict[str, Any]]` - -#### Source - -[`signalwire/signalwire/skills/swml_transfer/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/swml_transfer/skill.py) - -Line 30. - -*** - -### get\_prompt\_sections - -Return prompt sections to add to agent - -#### Signature - -```python -get_prompt_sections() -> List[Dict[str, Any]] -``` - -#### Returns - -`List[Dict[str, Any]]` - -#### Source - -[`signalwire/signalwire/skills/swml_transfer/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/swml_transfer/skill.py) - -Line 297. - -*** - -### register\_tools - -Register the transfer tool with pattern matching - -#### Signature - -```python -register_tools() -> None -``` - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/skills/swml_transfer/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/swml_transfer/skill.py) - -Line 180. - -*** - -### setup - -Setup and validate skill configuration - -#### Signature - -```python -setup() -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`signalwire/signalwire/skills/swml_transfer/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/swml_transfer/skill.py) - -Line 129. - -## Source - -[`signalwire/signalwire/skills/swml_transfer/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/swml_transfer/skill.py) - -Line 18. diff --git a/fern/products/sdk-reference/python/signalwire/skills/weather-api/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/weather-api/index.mdx deleted file mode 100644 index 697ff0fc97..0000000000 --- a/fern/products/sdk-reference/python/signalwire/skills/weather-api/index.mdx +++ /dev/null @@ -1,44 +0,0 @@ ---- -slug: "/reference/python/signalwire/skills/weather-api" -title: "weather_api" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.skills.weather_api" - parent: "signalwire.skills" - module: "signalwire.skills" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/weather_api/__init__.py" ---- -# `weather_api` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module weather_api -``` - -## Properties - - - -## Modules - - - - Copyright (c) 2025 SignalWire - - - -## Source - -[`signalwire/signalwire/skills/weather_api/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/weather_api/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/weather-api/skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/weather-api/skill/index.mdx deleted file mode 100644 index 28ff2a35b0..0000000000 --- a/fern/products/sdk-reference/python/signalwire/skills/weather-api/skill/index.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -slug: "/reference/python/signalwire/skills/weather-api/skill" -title: "skill" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.skills.weather_api.skill" - parent: "signalwire.skills.weather_api" - module: "signalwire.skills.weather_api" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/weather_api/skill.py" ---- -# `skill` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module skill -``` - -## Classes - - - - Skill for getting weather information from WeatherAPI.com. - - - -## Source - -[`signalwire/signalwire/skills/weather_api/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/weather_api/skill.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/weather-api/skill/weather-api-skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/weather-api/skill/weather-api-skill/index.mdx deleted file mode 100644 index edc044020b..0000000000 --- a/fern/products/sdk-reference/python/signalwire/skills/weather-api/skill/weather-api-skill/index.mdx +++ /dev/null @@ -1,184 +0,0 @@ ---- -slug: "/reference/python/signalwire/skills/weather-api/skill/weather-api-skill" -title: "WeatherApiSkill" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.skills.weather_api.skill.WeatherApiSkill" - parent: "signalwire.skills.weather_api.skill" - module: "signalwire.skills.weather_api.skill" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/weather_api/skill.py" ---- -# `WeatherApiSkill` - -Skill for getting weather information from WeatherAPI.com. - -Provides current weather data with configurable temperature units and -TTS-optimized natural language responses. - -Configuration: - -- tool\_name: Custom name for the generated SWAIG function -- api\_key: WeatherAPI.com API key -- temperature\_unit: "fahrenheit" or "celsius" for temperature display - -> \[!NOTE] -> agent.add\_skill("weather\_api", \{ -> "tool\_name": "get\_weather", -> "api\_key": "your\_weatherapi\_key", -> "temperature\_unit": "fahrenheit" -> \}) - -## Signature - -```python -class WeatherApiSkill(SkillBase) -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/python/signalwire/core/skill-base/skill-base) - -## Properties - - - - - - - - - - - - - - - -## Methods - -### \_\_init\_\_ - -Initialize the skill with configuration parameters. - -#### Signature - -```python -__init__(agent, params: Dict[str, Any] = None) -``` - -#### Parameters - - - The agent instance this skill belongs to - - - - Configuration dictionary containing: - - -#### Source - -[`signalwire/signalwire/skills/weather_api/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/weather_api/skill.py) - -Line 75. - -*** - -### get\_parameter\_schema - -Get parameter schema for weather API skill - -**Modifiers:** `classmethod` - -#### Signature - -```python -@classmethod -get_parameter_schema() -> Dict[str, Dict[str, Any]] -``` - -#### Returns - -`Dict[str, Dict[str, Any]]` - -#### Source - -[`signalwire/signalwire/skills/weather_api/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/weather_api/skill.py) - -Line 47. - -*** - -### get\_tools - -Generate the SWAIG tool with DataMap webhook. - -#### Signature - -```python -get_tools() -> List[Dict[str, Any]] -``` - -#### Returns - -`List[Dict[str, Any]]` — List containing the generated tool configuration - -#### Source - -[`signalwire/signalwire/skills/weather_api/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/weather_api/skill.py) - -Line 125. - -*** - -### register\_tools - -Register SWAIG tools with the agent - -#### Signature - -```python -register_tools() -> None -``` - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/skills/weather_api/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/weather_api/skill.py) - -Line 116. - -*** - -### setup - -Setup the skill - validates API key is available. - -#### Signature - -```python -setup() -> bool -``` - -#### Returns - -`bool` — True if setup successful - -#### Source - -[`signalwire/signalwire/skills/weather_api/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/weather_api/skill.py) - -Line 106. - -## Source - -[`signalwire/signalwire/skills/weather_api/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/weather_api/skill.py) - -Line 22. diff --git a/fern/products/sdk-reference/python/signalwire/skills/web-search/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/web-search/index.mdx deleted file mode 100644 index 60d34dce71..0000000000 --- a/fern/products/sdk-reference/python/signalwire/skills/web-search/index.mdx +++ /dev/null @@ -1,48 +0,0 @@ ---- -slug: "/reference/python/signalwire/skills/web-search" -title: "web_search" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.skills.web_search" - parent: "signalwire.skills" - module: "signalwire.skills" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/__init__.py" ---- -# `web_search` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module web_search -``` - -## Modules - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - -## Source - -[`signalwire/signalwire/skills/web_search/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/web-search/skill-improved/google-search-scraper/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/web-search/skill-improved/google-search-scraper/index.mdx deleted file mode 100644 index 0f836e986d..0000000000 --- a/fern/products/sdk-reference/python/signalwire/skills/web-search/skill-improved/google-search-scraper/index.mdx +++ /dev/null @@ -1,205 +0,0 @@ ---- -slug: "/reference/python/signalwire/skills/web-search/skill-improved/google-search-scraper" -title: "GoogleSearchScraper" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.skills.web_search.skill_improved.GoogleSearchScraper" - parent: "signalwire.skills.web_search.skill_improved" - module: "signalwire.skills.web_search.skill_improved" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_improved.py" ---- -# `GoogleSearchScraper` - -Google Search and Web Scraping functionality with quality scoring - -## Signature - -```python -class GoogleSearchScraper -``` - -## Properties - - - - - - - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(api_key: str, search_engine_id: str, max_content_length: int = 32768) -``` - -#### Parameters - - - - - - - -#### Source - -[`signalwire/signalwire/skills/web_search/skill_improved.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_improved.py) - -Line 25. - -*** - -### extract\_text\_from\_url - -Scrape a URL and extract readable text content with quality metrics - -#### Signature - -```python -extract_text_from_url( - url: str, - content_limit: int = None, - timeout: int = 10 -) -> Tuple[str, Dict[str, Any]] -``` - -#### Parameters - - - - - - - -#### Returns - -`Tuple[str, Dict[str, Any]]` — Tuple of (text\_content, quality\_metrics) - -#### Source - -[`signalwire/signalwire/skills/web_search/skill_improved.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_improved.py) - -Line 66. - -*** - -### search\_and\_scrape - -Backward compatible method that uses the improved search - -#### Signature - -```python -search_and_scrape(query: str, num_results: int = 3, delay: float = 0.5) -> str -``` - -#### Parameters - - - - - - - -#### Returns - -`str` - -#### Source - -[`signalwire/signalwire/skills/web_search/skill_improved.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_improved.py) - -Line 328. - -*** - -### search\_and\_scrape\_best - -Search and scrape with quality filtering - -#### Signature - -```python -search_and_scrape_best( - query: str, - num_results: int = 3, - oversample_factor: float = 2.5, - delay: float = 0.5, - min_quality_score: float = 0.3 -) -> str -``` - -#### Parameters - - - Search query - - - - Number of best results to return - - - - How many extra results to fetch (e.g., 2.5 = fetch 2.5x) - - - - Delay between requests - - - - Minimum quality score to include a result - - -#### Returns - -`str` — Formatted string with the best N results - -#### Source - -[`signalwire/signalwire/skills/web_search/skill_improved.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_improved.py) - -Line 243. - -*** - -### search\_google - -Search Google using Custom Search JSON API - -#### Signature - -```python -search_google(query: str, num_results: int = 5) -> list -``` - -#### Parameters - - - - - -#### Returns - -`list` - -#### Source - -[`signalwire/signalwire/skills/web_search/skill_improved.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_improved.py) - -Line 34. - -## Source - -[`signalwire/signalwire/skills/web_search/skill_improved.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_improved.py) - -Line 22. diff --git a/fern/products/sdk-reference/python/signalwire/skills/web-search/skill-improved/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/web-search/skill-improved/index.mdx deleted file mode 100644 index 4dd87e8871..0000000000 --- a/fern/products/sdk-reference/python/signalwire/skills/web-search/skill-improved/index.mdx +++ /dev/null @@ -1,44 +0,0 @@ ---- -slug: "/reference/python/signalwire/skills/web-search/skill-improved" -title: "skill_improved" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.skills.web_search.skill_improved" - parent: "signalwire.skills.web_search" - module: "signalwire.skills.web_search" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_improved.py" ---- -# `skill_improved` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module skill_improved -``` - -## Classes - - - - Google Search and Web Scraping functionality with quality scoring - - - - Web search capability using Google Custom Search API with quality filtering - - - -## Source - -[`signalwire/signalwire/skills/web_search/skill_improved.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_improved.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/web-search/skill-improved/web-search-skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/web-search/skill-improved/web-search-skill/index.mdx deleted file mode 100644 index 31ef14eece..0000000000 --- a/fern/products/sdk-reference/python/signalwire/skills/web-search/skill-improved/web-search-skill/index.mdx +++ /dev/null @@ -1,204 +0,0 @@ ---- -slug: "/reference/python/signalwire/skills/web-search/skill-improved/web-search-skill" -title: "WebSearchSkill" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.skills.web_search.skill_improved.WebSearchSkill" - parent: "signalwire.skills.web_search.skill_improved" - module: "signalwire.skills.web_search.skill_improved" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_improved.py" ---- -# `WebSearchSkill` - -Web search capability using Google Custom Search API with quality filtering - -## Signature - -```python -class WebSearchSkill(SkillBase) -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/python/signalwire/core/skill-base/skill-base) - -## Properties - - - - - - - - - - - - - -## Methods - -### get\_global\_data - -Return global data for agent context - -#### Signature - -```python -get_global_data() -> Dict[str, Any] -``` - -#### Returns - -`Dict[str, Any]` - -#### Source - -[`signalwire/signalwire/skills/web_search/skill_improved.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_improved.py) - -Line 457. - -*** - -### get\_hints - -Return speech recognition hints - -#### Signature - -```python -get_hints() -> List[str] -``` - -#### Returns - -`List[str]` - -#### Source - -[`signalwire/signalwire/skills/web_search/skill_improved.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_improved.py) - -Line 453. - -*** - -### get\_instance\_key - -Get the key used to track this skill instance - -#### Signature - -```python -get_instance_key() -> str -``` - -#### Returns - -`str` - -#### Source - -[`signalwire/signalwire/skills/web_search/skill_improved.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_improved.py) - -Line 353. - -*** - -### get\_parameter\_schema - -Get the parameter schema for the web search skill - -**Modifiers:** `classmethod` - -#### Signature - -```python -@classmethod -get_parameter_schema() -> Dict[str, Dict[str, Any]] -``` - -#### Returns - -`Dict[str, Dict[str, Any]]` - -#### Source - -[`signalwire/signalwire/skills/web_search/skill_improved.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_improved.py) - -Line 480. - -*** - -### get\_prompt\_sections - -Return prompt sections to add to agent - -#### Signature - -```python -get_prompt_sections() -> List[Dict[str, Any]] -``` - -#### Returns - -`List[Dict[str, Any]]` - -#### Source - -[`signalwire/signalwire/skills/web_search/skill_improved.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_improved.py) - -Line 465. - -*** - -### register\_tools - -Register web search tool with the agent - -#### Signature - -```python -register_tools() -> None -``` - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/skills/web_search/skill_improved.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_improved.py) - -Line 402. - -*** - -### setup - -Setup the web search skill - -#### Signature - -```python -setup() -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`signalwire/signalwire/skills/web_search/skill_improved.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_improved.py) - -Line 359. - -## Source - -[`signalwire/signalwire/skills/web_search/skill_improved.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_improved.py) - -Line 341. diff --git a/fern/products/sdk-reference/python/signalwire/skills/web-search/skill-original/google-search-scraper/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/web-search/skill-original/google-search-scraper/index.mdx deleted file mode 100644 index 38af428baf..0000000000 --- a/fern/products/sdk-reference/python/signalwire/skills/web-search/skill-original/google-search-scraper/index.mdx +++ /dev/null @@ -1,164 +0,0 @@ ---- -slug: "/reference/python/signalwire/skills/web-search/skill-original/google-search-scraper" -title: "GoogleSearchScraper" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.skills.web_search.skill_original.GoogleSearchScraper" - parent: "signalwire.skills.web_search.skill_original" - module: "signalwire.skills.web_search.skill_original" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_original.py" ---- -# `GoogleSearchScraper` - -Google Search and Web Scraping functionality - -## Signature - -```python -class GoogleSearchScraper -``` - -## Properties - - - - - - - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(api_key: str, search_engine_id: str, max_content_length: int = 32768) -``` - -#### Parameters - - - - - - - -#### Source - -[`signalwire/signalwire/skills/web_search/skill_original.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_original.py) - -Line 24. - -*** - -### extract\_text\_from\_url - -Scrape a URL and extract readable text content - -#### Signature - -```python -extract_text_from_url( - url: str, - content_limit: int = None, - timeout: int = 10 -) -> str -``` - -#### Parameters - - - URL to scrape - - - - Maximum characters to return (uses self.max\_content\_length if not provided) - - - - Request timeout in seconds - - -#### Returns - -`str` - -#### Source - -[`signalwire/signalwire/skills/web_search/skill_original.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_original.py) - -Line 65. - -*** - -### search\_and\_scrape - -Main function: search Google and scrape the resulting pages - -Dynamically calculates per-result content limit based on total max\_content\_length -and number of results to ensure total response stays within bounds. - -#### Signature - -```python -search_and_scrape(query: str, num_results: int = 3, delay: float = 0.5) -> str -``` - -#### Parameters - - - - - - - -#### Returns - -`str` - -#### Source - -[`signalwire/signalwire/skills/web_search/skill_original.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_original.py) - -Line 100. - -*** - -### search\_google - -Search Google using Custom Search JSON API - -#### Signature - -```python -search_google(query: str, num_results: int = 5) -> list -``` - -#### Parameters - - - - - -#### Returns - -`list` - -#### Source - -[`signalwire/signalwire/skills/web_search/skill_original.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_original.py) - -Line 33. - -## Source - -[`signalwire/signalwire/skills/web_search/skill_original.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_original.py) - -Line 21. diff --git a/fern/products/sdk-reference/python/signalwire/skills/web-search/skill-original/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/web-search/skill-original/index.mdx deleted file mode 100644 index 24298e2e6b..0000000000 --- a/fern/products/sdk-reference/python/signalwire/skills/web-search/skill-original/index.mdx +++ /dev/null @@ -1,44 +0,0 @@ ---- -slug: "/reference/python/signalwire/skills/web-search/skill-original" -title: "skill_original" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.skills.web_search.skill_original" - parent: "signalwire.skills.web_search" - module: "signalwire.skills.web_search" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_original.py" ---- -# `skill_original` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module skill_original -``` - -## Classes - - - - Google Search and Web Scraping functionality - - - - Web search capability using Google Custom Search API - - - -## Source - -[`signalwire/signalwire/skills/web_search/skill_original.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_original.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/web-search/skill-original/web-search-skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/web-search/skill-original/web-search-skill/index.mdx deleted file mode 100644 index 8fceb03f68..0000000000 --- a/fern/products/sdk-reference/python/signalwire/skills/web-search/skill-original/web-search-skill/index.mdx +++ /dev/null @@ -1,209 +0,0 @@ ---- -slug: "/reference/python/signalwire/skills/web-search/skill-original/web-search-skill" -title: "WebSearchSkill" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.skills.web_search.skill_original.WebSearchSkill" - parent: "signalwire.skills.web_search.skill_original" - module: "signalwire.skills.web_search.skill_original" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_original.py" ---- -# `WebSearchSkill` - -Web search capability using Google Custom Search API - -## Signature - -```python -class WebSearchSkill(SkillBase) -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/python/signalwire/core/skill-base/skill-base) - -## Properties - - - - - - - - - - - - - -## Methods - -### get\_global\_data - -Return global data for agent context - -#### Signature - -```python -get_global_data() -> Dict[str, Any] -``` - -#### Returns - -`Dict[str, Any]` - -#### Source - -[`signalwire/signalwire/skills/web_search/skill_original.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_original.py) - -Line 265. - -*** - -### get\_hints - -Return speech recognition hints - -#### Signature - -```python -get_hints() -> List[str] -``` - -#### Returns - -`List[str]` - -#### Source - -[`signalwire/signalwire/skills/web_search/skill_original.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_original.py) - -Line 256. - -*** - -### get\_instance\_key - -Get the key used to track this skill instance - -For web search, we use the search\_engine\_id to differentiate instances - -#### Signature - -```python -get_instance_key() -> str -``` - -#### Returns - -`str` - -#### Source - -[`signalwire/signalwire/skills/web_search/skill_original.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_original.py) - -Line 158. - -*** - -### get\_parameter\_schema - -Get the parameter schema for the web search skill - -Returns all configurable parameters for web search including -API credentials, search settings, and response customization. - -**Modifiers:** `classmethod` - -#### Signature - -```python -@classmethod -get_parameter_schema() -> Dict[str, Dict[str, Any]] -``` - -#### Returns - -`Dict[str, Dict[str, Any]]` - -#### Source - -[`signalwire/signalwire/skills/web_search/skill_original.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_original.py) - -Line 287. - -*** - -### get\_prompt\_sections - -Return prompt sections to add to agent - -#### Signature - -```python -get_prompt_sections() -> List[Dict[str, Any]] -``` - -#### Returns - -`List[Dict[str, Any]]` - -#### Source - -[`signalwire/signalwire/skills/web_search/skill_original.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_original.py) - -Line 272. - -*** - -### register\_tools - -Register web search tool with the agent - -#### Signature - -```python -register_tools() -> None -``` - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/skills/web_search/skill_original.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_original.py) - -Line 206. - -*** - -### setup - -Setup the web search skill - -#### Signature - -```python -setup() -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`signalwire/signalwire/skills/web_search/skill_original.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_original.py) - -Line 168. - -## Source - -[`signalwire/signalwire/skills/web_search/skill_original.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill_original.py) - -Line 146. diff --git a/fern/products/sdk-reference/python/signalwire/skills/web-search/skill/google-search-scraper/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/web-search/skill/google-search-scraper/index.mdx deleted file mode 100644 index e1b3604ea3..0000000000 --- a/fern/products/sdk-reference/python/signalwire/skills/web-search/skill/google-search-scraper/index.mdx +++ /dev/null @@ -1,319 +0,0 @@ ---- -slug: "/reference/python/signalwire/skills/web-search/skill/google-search-scraper" -title: "GoogleSearchScraper" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.skills.web_search.skill.GoogleSearchScraper" - parent: "signalwire.skills.web_search.skill" - module: "signalwire.skills.web_search.skill" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill.py" ---- -# `GoogleSearchScraper` - -Google Search and Web Scraping functionality with quality scoring - -## Signature - -```python -class GoogleSearchScraper -``` - -## Properties - - - - - - - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(api_key: str, search_engine_id: str, max_content_length: int = 32768) -``` - -#### Parameters - - - - - - - -#### Source - -[`signalwire/signalwire/skills/web_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill.py) - -Line 25. - -*** - -### extract\_html\_content - -Original HTML extraction method (renamed from extract\_text\_from\_url) - -#### Signature - -```python -extract_html_content( - url: str, - content_limit: int = None, - timeout: int = 10 -) -> Tuple[str, Dict[str, Any]] -``` - -#### Parameters - - - - - - - -#### Returns - -`Tuple[str, Dict[str, Any]]` - -#### Source - -[`signalwire/signalwire/skills/web_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill.py) - -Line 204. - -*** - -### extract\_reddit\_content - -Extract Reddit content using JSON API for better quality - -#### Signature - -```python -extract_reddit_content( - url: str, - content_limit: int = None, - timeout: int = 10 -) -> Tuple[str, Dict[str, Any]] -``` - -#### Parameters - - - - - - - -#### Returns - -`Tuple[str, Dict[str, Any]]` — Tuple of (text\_content, quality\_metrics) - -#### Source - -[`signalwire/signalwire/skills/web_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill.py) - -Line 71. - -*** - -### extract\_text\_from\_url - -Main extraction method that routes to appropriate extractor - -#### Signature - -```python -extract_text_from_url( - url: str, - content_limit: int = None, - timeout: int = 10 -) -> Tuple[str, Dict[str, Any]] -``` - -#### Parameters - - - - - - - -#### Returns - -`Tuple[str, Dict[str, Any]]` — Tuple of (text\_content, quality\_metrics) - -#### Source - -[`signalwire/signalwire/skills/web_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill.py) - -Line 192. - -*** - -### is\_reddit\_url - -Check if URL is from Reddit - -#### Signature - -```python -is_reddit_url(url: str) -> bool -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`signalwire/signalwire/skills/web_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill.py) - -Line 66. - -*** - -### search\_and\_scrape - -Backward compatible method that uses the improved search - -#### Signature - -```python -search_and_scrape(query: str, num_results: int = 3, delay: float = 0.5) -> str -``` - -#### Parameters - - - - - - - -#### Returns - -`str` - -#### Source - -[`signalwire/signalwire/skills/web_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill.py) - -Line 607. - -*** - -### search\_and\_scrape\_best - -Search and scrape with quality filtering and source diversity. - -#### Signature - -```python -search_and_scrape_best( - query: str, - num_results: int = 3, - oversample_factor: float = 4.0, - delay: float = 0.5, - min_quality_score: float = 0.2, - per_page_timeout: float = 2.0, - overall_deadline: float = 10.0, - parallel_scrape: bool = True, - snippets_only: bool = False -) -> str -``` - -#### Parameters - - - Search query - - - - Number of best results to return - - - - How many extra results to fetch (e.g., 4.0 = fetch 4x) - - - - Delay between scrape requests (ignored in parallel mode) - - - - Minimum quality score to include a result - - - - Max seconds to wait on each page scrape - - - - Wall-clock budget (seconds) for the whole call. Anything not yet returned by this deadline is abandoned. - - - - Run all page scrapes concurrently in a thread pool - - - - Skip page scraping entirely; format the CSE snippets directly. Use for fast voice answers when full page content is not required. - - -#### Returns - -`str` — Formatted string with the best N results from diverse sources - -#### Source - -[`signalwire/signalwire/skills/web_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill.py) - -Line 442. - -*** - -### search\_google - -Search Google using Custom Search JSON API - -#### Signature - -```python -search_google(query: str, num_results: int = 5) -> list -``` - -#### Parameters - - - - - -#### Returns - -`list` - -#### Source - -[`signalwire/signalwire/skills/web_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill.py) - -Line 34. - -## Source - -[`signalwire/signalwire/skills/web_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill.py) - -Line 22. diff --git a/fern/products/sdk-reference/python/signalwire/skills/web-search/skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/web-search/skill/index.mdx deleted file mode 100644 index 9985cdb753..0000000000 --- a/fern/products/sdk-reference/python/signalwire/skills/web-search/skill/index.mdx +++ /dev/null @@ -1,44 +0,0 @@ ---- -slug: "/reference/python/signalwire/skills/web-search/skill" -title: "skill" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.skills.web_search.skill" - parent: "signalwire.skills.web_search" - module: "signalwire.skills.web_search" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill.py" ---- -# `skill` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module skill -``` - -## Classes - - - - Google Search and Web Scraping functionality with quality scoring - - - - Web search capability using Google Custom Search API with quality filtering - - - -## Source - -[`signalwire/signalwire/skills/web_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/web-search/skill/web-search-skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/web-search/skill/web-search-skill/index.mdx deleted file mode 100644 index bad643e2b4..0000000000 --- a/fern/products/sdk-reference/python/signalwire/skills/web-search/skill/web-search-skill/index.mdx +++ /dev/null @@ -1,204 +0,0 @@ ---- -slug: "/reference/python/signalwire/skills/web-search/skill/web-search-skill" -title: "WebSearchSkill" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.skills.web_search.skill.WebSearchSkill" - parent: "signalwire.skills.web_search.skill" - module: "signalwire.skills.web_search.skill" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill.py" ---- -# `WebSearchSkill` - -Web search capability using Google Custom Search API with quality filtering - -## Signature - -```python -class WebSearchSkill(SkillBase) -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/python/signalwire/core/skill-base/skill-base) - -## Properties - - - - - - - - - - - - - -## Methods - -### get\_global\_data - -Return global data for agent context - -#### Signature - -```python -get_global_data() -> Dict[str, Any] -``` - -#### Returns - -`Dict[str, Any]` - -#### Source - -[`signalwire/signalwire/skills/web_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill.py) - -Line 768. - -*** - -### get\_hints - -Return speech recognition hints - -#### Signature - -```python -get_hints() -> List[str] -``` - -#### Returns - -`List[str]` - -#### Source - -[`signalwire/signalwire/skills/web_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill.py) - -Line 764. - -*** - -### get\_instance\_key - -Get the key used to track this skill instance - -#### Signature - -```python -get_instance_key() -> str -``` - -#### Returns - -`str` - -#### Source - -[`signalwire/signalwire/skills/web_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill.py) - -Line 632. - -*** - -### get\_parameter\_schema - -Get the parameter schema for the web search skill - -**Modifiers:** `classmethod` - -#### Signature - -```python -@classmethod -get_parameter_schema() -> Dict[str, Dict[str, Any]] -``` - -#### Returns - -`Dict[str, Dict[str, Any]]` - -#### Source - -[`signalwire/signalwire/skills/web_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill.py) - -Line 791. - -*** - -### get\_prompt\_sections - -Return prompt sections to add to agent - -#### Signature - -```python -get_prompt_sections() -> List[Dict[str, Any]] -``` - -#### Returns - -`List[Dict[str, Any]]` - -#### Source - -[`signalwire/signalwire/skills/web_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill.py) - -Line 776. - -*** - -### register\_tools - -Register web search tool with the agent - -#### Signature - -```python -register_tools() -> None -``` - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/skills/web_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill.py) - -Line 705. - -*** - -### setup - -Setup the web search skill - -#### Signature - -```python -setup() -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`signalwire/signalwire/skills/web_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill.py) - -Line 638. - -## Source - -[`signalwire/signalwire/skills/web_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/web_search/skill.py) - -Line 620. diff --git a/fern/products/sdk-reference/python/signalwire/skills/wikipedia-search/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/wikipedia-search/index.mdx deleted file mode 100644 index e7ee197825..0000000000 --- a/fern/products/sdk-reference/python/signalwire/skills/wikipedia-search/index.mdx +++ /dev/null @@ -1,44 +0,0 @@ ---- -slug: "/reference/python/signalwire/skills/wikipedia-search" -title: "wikipedia_search" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.skills.wikipedia_search" - parent: "signalwire.skills" - module: "signalwire.skills" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/wikipedia_search/__init__.py" ---- -# `wikipedia_search` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module wikipedia_search -``` - -## Properties - - - -## Modules - - - - Copyright (c) 2025 SignalWire - - - -## Source - -[`signalwire/signalwire/skills/wikipedia_search/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/wikipedia_search/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/wikipedia-search/skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/wikipedia-search/skill/index.mdx deleted file mode 100644 index 9b325893c6..0000000000 --- a/fern/products/sdk-reference/python/signalwire/skills/wikipedia-search/skill/index.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -slug: "/reference/python/signalwire/skills/wikipedia-search/skill" -title: "skill" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.skills.wikipedia_search.skill" - parent: "signalwire.skills.wikipedia_search" - module: "signalwire.skills.wikipedia_search" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/wikipedia_search/skill.py" ---- -# `skill` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module skill -``` - -## Classes - - - - Skill for searching Wikipedia articles and retrieving content. - - - -## Source - -[`signalwire/signalwire/skills/wikipedia_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/wikipedia_search/skill.py) diff --git a/fern/products/sdk-reference/python/signalwire/skills/wikipedia-search/skill/wikipedia-search-skill/index.mdx b/fern/products/sdk-reference/python/signalwire/skills/wikipedia-search/skill/wikipedia-search-skill/index.mdx deleted file mode 100644 index d00c5fd478..0000000000 --- a/fern/products/sdk-reference/python/signalwire/skills/wikipedia-search/skill/wikipedia-search-skill/index.mdx +++ /dev/null @@ -1,191 +0,0 @@ ---- -slug: "/reference/python/signalwire/skills/wikipedia-search/skill/wikipedia-search-skill" -title: "WikipediaSearchSkill" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.skills.wikipedia_search.skill.WikipediaSearchSkill" - parent: "signalwire.skills.wikipedia_search.skill" - module: "signalwire.skills.wikipedia_search.skill" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/wikipedia_search/skill.py" ---- -# `WikipediaSearchSkill` - -Skill for searching Wikipedia articles and retrieving content. - -This skill uses the Wikipedia API to search for articles and retrieve -their introductory content, similar to getting a summary of a topic. - -## Signature - -```python -class WikipediaSearchSkill(SkillBase) -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/python/signalwire/core/skill-base/skill-base) - -## Properties - - - - - - - - - - - - - -## Methods - -### get\_hints - -Return speech recognition hints for better accuracy. - -#### Signature - -```python -get_hints() -> list -``` - -#### Returns - -`list` — List of words/phrases to help with speech recognition - -#### Source - -[`signalwire/signalwire/skills/wikipedia_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/wikipedia_search/skill.py) - -Line 198. - -*** - -### get\_parameter\_schema - -Get parameter schema for Wikipedia search skill - -**Modifiers:** `classmethod` - -#### Signature - -```python -@classmethod -get_parameter_schema() -> Dict[str, Dict[str, Any]] -``` - -#### Returns - -`Dict[str, Dict[str, Any]]` - -#### Source - -[`signalwire/signalwire/skills/wikipedia_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/wikipedia_search/skill.py) - -Line 40. - -*** - -### get\_prompt\_sections - -Return additional context for the agent prompt. - -#### Signature - -```python -get_prompt_sections() -> list -``` - -#### Returns - -`list` — List of prompt sections to add to the agent - -#### Source - -[`signalwire/signalwire/skills/wikipedia_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/wikipedia_search/skill.py) - -Line 181. - -*** - -### register\_tools - -Register the SWAIG tool for Wikipedia search. - -#### Signature - -```python -register_tools() -> None -``` - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/skills/wikipedia_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/wikipedia_search/skill.py) - -Line 83. - -*** - -### search\_wiki - -Search Wikipedia for articles matching the query. - -#### Signature - -```python -search_wiki(query: str) -> str -``` - -#### Parameters - - - The search term to look up - - -#### Returns - -`str` — String containing the Wikipedia article content or error message - -#### Source - -[`signalwire/signalwire/skills/wikipedia_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/wikipedia_search/skill.py) - -Line 110. - -*** - -### setup - -Setup the Wikipedia search skill. - -#### Signature - -```python -setup() -> bool -``` - -#### Returns - -`bool` — True if setup successful, False otherwise - -#### Source - -[`signalwire/signalwire/skills/wikipedia_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/wikipedia_search/skill.py) - -Line 62. - -## Source - -[`signalwire/signalwire/skills/wikipedia_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/wikipedia_search/skill.py) - -Line 22. diff --git a/fern/products/sdk-reference/python/signalwire/utils/index.mdx b/fern/products/sdk-reference/python/signalwire/utils/index.mdx deleted file mode 100644 index 11037cef26..0000000000 --- a/fern/products/sdk-reference/python/signalwire/utils/index.mdx +++ /dev/null @@ -1,82 +0,0 @@ ---- -slug: "/reference/python/signalwire/utils" -title: "utils" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.utils" - parent: "signalwire" - module: "signalwire" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/__init__.py" ---- -# `utils` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module utils -``` - -## Properties - - - -## Modules - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - -## Functions - -### is\_serverless\_mode - -Check if running in any serverless environment. - -#### Signature - -```python -is_serverless_mode() -> bool -``` - -#### Returns - -`bool` — True if in serverless mode, False if in server mode - -#### Source - -[`signalwire/signalwire/utils/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/__init__.py) - -Line 14. - -## Source - -[`signalwire/signalwire/utils/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/utils/pom-utils/index.mdx b/fern/products/sdk-reference/python/signalwire/utils/pom-utils/index.mdx deleted file mode 100644 index 75db294754..0000000000 --- a/fern/products/sdk-reference/python/signalwire/utils/pom-utils/index.mdx +++ /dev/null @@ -1,32 +0,0 @@ ---- -slug: "/reference/python/signalwire/utils/pom-utils" -title: "pom_utils" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.utils.pom_utils" - parent: "signalwire.utils" - module: "signalwire.utils" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/pom_utils.py" ---- -# `pom_utils` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module pom_utils -``` - -## Source - -[`signalwire/signalwire/utils/pom_utils.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/pom_utils.py) diff --git a/fern/products/sdk-reference/python/signalwire/utils/schema-utils/index.mdx b/fern/products/sdk-reference/python/signalwire/utils/schema-utils/index.mdx deleted file mode 100644 index 7ebd76daf8..0000000000 --- a/fern/products/sdk-reference/python/signalwire/utils/schema-utils/index.mdx +++ /dev/null @@ -1,48 +0,0 @@ ---- -slug: "/reference/python/signalwire/utils/schema-utils" -title: "schema_utils" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.utils.schema_utils" - parent: "signalwire.utils" - module: "signalwire.utils" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/schema_utils.py" ---- -# `schema_utils` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module schema_utils -``` - -## Properties - - - -## Classes - - - - Utility class for loading and working with SWML schemas - - - - Raised when SWML schema validation fails. - - - -## Source - -[`signalwire/signalwire/utils/schema_utils.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/schema_utils.py) diff --git a/fern/products/sdk-reference/python/signalwire/utils/schema-utils/schema-utils/index.mdx b/fern/products/sdk-reference/python/signalwire/utils/schema-utils/schema-utils/index.mdx deleted file mode 100644 index f56063cb19..0000000000 --- a/fern/products/sdk-reference/python/signalwire/utils/schema-utils/schema-utils/index.mdx +++ /dev/null @@ -1,321 +0,0 @@ ---- -slug: "/reference/python/signalwire/utils/schema-utils/schema-utils" -title: "SchemaUtils" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.utils.schema_utils.SchemaUtils" - parent: "signalwire.utils.schema_utils" - module: "signalwire.utils.schema_utils" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/schema_utils.py" ---- -# `SchemaUtils` - -Utility class for loading and working with SWML schemas - -## Signature - -```python -class SchemaUtils -``` - -## Properties - - - Check if full JSON Schema validation is available. - - - - - - - - - - -## Methods - -### \_\_init\_\_ - -Initialize the schema utilities. - -#### Signature - -```python -__init__(schema_path: Optional[str] = None, schema_validation: bool = True) -``` - -#### Parameters - - - Path to the schema file - - - - Enable schema validation. Can also be disabled via SWML\_SKIP\_SCHEMA\_VALIDATION=1 environment variable. - - -#### Source - -[`signalwire/signalwire/utils/schema_utils.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/schema_utils.py) - -Line 45. - -*** - -### generate\_method\_body - -Generate the method body implementation for a verb - -#### Signature - -```python -generate_method_body(verb_name: str) -> str -``` - -#### Parameters - - - The name of the verb - - -#### Returns - -`str` — The method body as a string - -#### Source - -[`signalwire/signalwire/utils/schema_utils.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/schema_utils.py) - -Line 460. - -*** - -### generate\_method\_signature - -Generate a Python method signature for a verb - -#### Signature - -```python -generate_method_signature(verb_name: str) -> str -``` - -#### Parameters - - - The name of the verb - - -#### Returns - -`str` — A Python method signature string - -#### Source - -[`signalwire/signalwire/utils/schema_utils.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/schema_utils.py) - -Line 403. - -*** - -### get\_all\_verb\_names - -Get all verb names defined in the schema - -#### Signature - -```python -get_all_verb_names() -> List[str] -``` - -#### Returns - -`List[str]` — List of verb names - -#### Source - -[`signalwire/signalwire/utils/schema_utils.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/schema_utils.py) - -Line 379. - -*** - -### get\_verb\_parameters - -Get the parameter definitions for a specific verb - -#### Signature - -```python -get_verb_parameters(verb_name: str) -> Dict[str, Any] -``` - -#### Parameters - - - The name of the verb (e.g., "ai", "answer", etc.) - - -#### Returns - -`Dict[str, Any]` — Dictionary mapping parameter names to their definitions - -#### Source - -[`signalwire/signalwire/utils/schema_utils.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/schema_utils.py) - -Line 388. - -*** - -### get\_verb\_properties - -Get the properties for a specific verb - -#### Signature - -```python -get_verb_properties(verb_name: str) -> Dict[str, Any] -``` - -#### Parameters - - - The name of the verb (e.g., "ai", "answer", etc.) - - -#### Returns - -`Dict[str, Any]` — The properties for the verb or an empty dict if not found - -#### Source - -[`signalwire/signalwire/utils/schema_utils.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/schema_utils.py) - -Line 227. - -*** - -### get\_verb\_required\_properties - -Get the required properties for a specific verb - -#### Signature - -```python -get_verb_required_properties(verb_name: str) -> List[str] -``` - -#### Parameters - - - The name of the verb (e.g., "ai", "answer", etc.) - - -#### Returns - -`List[str]` — List of required property names for the verb or an empty list if not found - -#### Source - -[`signalwire/signalwire/utils/schema_utils.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/schema_utils.py) - -Line 243. - -*** - -### load\_schema - -Load the JSON schema from the specified path - -#### Signature - -```python -load_schema() -> Dict[str, Any] -``` - -#### Returns - -`Dict[str, Any]` — The schema as a dictionary - -#### Source - -[`signalwire/signalwire/utils/schema_utils.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/schema_utils.py) - -Line 148. - -*** - -### validate\_document - -Validate a complete SWML document against the schema. - -#### Signature - -```python -validate_document(document: Dict[str, Any]) -> Tuple[bool, List[str]] -``` - -#### Parameters - - - The complete SWML document to validate - - -#### Returns - -`Tuple[bool, List[str]]` — (is\_valid, error\_messages) tuple - -#### Source - -[`signalwire/signalwire/utils/schema_utils.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/schema_utils.py) - -Line 357. - -*** - -### validate\_verb - -Validate a verb configuration against the schema. - -Performs full JSON Schema validation including type checking and nested -object validation using jsonschema-rs. - -#### Signature - -```python -validate_verb( - verb_name: str, - verb_config: Dict[str, Any] -) -> Tuple[bool, List[str]] -``` - -#### Parameters - - - The name of the verb (e.g., "ai", "answer", etc.) - - - - The configuration for the verb - - -#### Returns - -`Tuple[bool, List[str]]` — (is\_valid, error\_messages) tuple - -#### Source - -[`signalwire/signalwire/utils/schema_utils.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/schema_utils.py) - -Line 260. - -## Source - -[`signalwire/signalwire/utils/schema_utils.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/schema_utils.py) - -Line 40. diff --git a/fern/products/sdk-reference/python/signalwire/utils/schema-utils/schema-validation-error/index.mdx b/fern/products/sdk-reference/python/signalwire/utils/schema-utils/schema-validation-error/index.mdx deleted file mode 100644 index c9192a5634..0000000000 --- a/fern/products/sdk-reference/python/signalwire/utils/schema-utils/schema-validation-error/index.mdx +++ /dev/null @@ -1,61 +0,0 @@ ---- -slug: "/reference/python/signalwire/utils/schema-utils/schema-validation-error" -title: "SchemaValidationError" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.utils.schema_utils.SchemaValidationError" - parent: "signalwire.utils.schema_utils" - module: "signalwire.utils.schema_utils" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/schema_utils.py" ---- -# `SchemaValidationError` - -Raised when SWML schema validation fails. - -## Signature - -```python -class SchemaValidationError(Exception) -``` - -## Inheritance - -**Extends:** `Exception` - -## Properties - - - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(verb_name: str, errors: List[str]) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/utils/schema_utils.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/schema_utils.py) - -Line 30. - -## Source - -[`signalwire/signalwire/utils/schema_utils.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/schema_utils.py) - -Line 27. diff --git a/fern/products/sdk-reference/python/signalwire/utils/token-generators/index.mdx b/fern/products/sdk-reference/python/signalwire/utils/token-generators/index.mdx deleted file mode 100644 index 71aaa4a9e4..0000000000 --- a/fern/products/sdk-reference/python/signalwire/utils/token-generators/index.mdx +++ /dev/null @@ -1,32 +0,0 @@ ---- -slug: "/reference/python/signalwire/utils/token-generators" -title: "token_generators" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.utils.token_generators" - parent: "signalwire.utils" - module: "signalwire.utils" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/token_generators.py" ---- -# `token_generators` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module token_generators -``` - -## Source - -[`signalwire/signalwire/utils/token_generators.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/token_generators.py) diff --git a/fern/products/sdk-reference/python/signalwire/utils/url-validator/index.mdx b/fern/products/sdk-reference/python/signalwire/utils/url-validator/index.mdx deleted file mode 100644 index 180bba6447..0000000000 --- a/fern/products/sdk-reference/python/signalwire/utils/url-validator/index.mdx +++ /dev/null @@ -1,68 +0,0 @@ ---- -slug: "/reference/python/signalwire/utils/url-validator" -title: "url_validator" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.utils.url_validator" - parent: "signalwire.utils" - module: "signalwire.utils" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/url_validator.py" ---- -# `url_validator` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module url_validator -``` - -## Properties - - - -## Functions - -### validate\_url - -Validate that a URL is safe to fetch (not pointing to private/internal resources). - -#### Signature - -```python -validate_url(url: str, allow_private: bool = False) -> bool -``` - -#### Parameters - - - The URL to validate - - - - If True, allow private IP ranges (default: False) - - -#### Returns - -`bool` — True if the URL is safe to fetch, False otherwise - -#### Source - -[`signalwire/signalwire/utils/url_validator.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/url_validator.py) - -Line 34. - -## Source - -[`signalwire/signalwire/utils/url_validator.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/url_validator.py) diff --git a/fern/products/sdk-reference/python/signalwire/utils/validators/index.mdx b/fern/products/sdk-reference/python/signalwire/utils/validators/index.mdx deleted file mode 100644 index 81407e3cc3..0000000000 --- a/fern/products/sdk-reference/python/signalwire/utils/validators/index.mdx +++ /dev/null @@ -1,32 +0,0 @@ ---- -slug: "/reference/python/signalwire/utils/validators" -title: "validators" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.utils.validators" - parent: "signalwire.utils" - module: "signalwire.utils" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/validators.py" ---- -# `validators` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module validators -``` - -## Source - -[`signalwire/signalwire/utils/validators.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/utils/validators.py) diff --git a/fern/products/sdk-reference/python/signalwire/web/index.mdx b/fern/products/sdk-reference/python/signalwire/web/index.mdx deleted file mode 100644 index e8b769038d..0000000000 --- a/fern/products/sdk-reference/python/signalwire/web/index.mdx +++ /dev/null @@ -1,44 +0,0 @@ ---- -slug: "/reference/python/signalwire/web" -title: "web" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.web" - parent: "signalwire" - module: "signalwire" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/web/__init__.py" ---- -# `web` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module web -``` - -## Properties - - - -## Modules - - - - Copyright (c) 2025 SignalWire - - - -## Source - -[`signalwire/signalwire/web/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/web/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/web/web-service/index.mdx b/fern/products/sdk-reference/python/signalwire/web/web-service/index.mdx deleted file mode 100644 index 1c00b97924..0000000000 --- a/fern/products/sdk-reference/python/signalwire/web/web-service/index.mdx +++ /dev/null @@ -1,44 +0,0 @@ ---- -slug: "/reference/python/signalwire/web/web-service" -title: "web_service" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.web.web_service" - parent: "signalwire.web" - module: "signalwire.web" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/web/web_service.py" ---- -# `web_service` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module web_service -``` - -## Properties - - - -## Classes - - - - Static file serving service with HTTP API - - - -## Source - -[`signalwire/signalwire/web/web_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/web/web_service.py) diff --git a/fern/products/sdk-reference/python/signalwire/web/web-service/web-service/index.mdx b/fern/products/sdk-reference/python/signalwire/web/web-service/web-service/index.mdx deleted file mode 100644 index 27adfc8221..0000000000 --- a/fern/products/sdk-reference/python/signalwire/web/web-service/web-service/index.mdx +++ /dev/null @@ -1,234 +0,0 @@ ---- -slug: "/reference/python/signalwire/web/web-service/web-service" -title: "WebService" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.web.web_service.WebService" - parent: "signalwire.web.web_service" - module: "signalwire.web.web_service" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/web/web_service.py" ---- -# `WebService` - -Static file serving service with HTTP API - -## Signature - -```python -class WebService -``` - -## Properties - - - - - - - - - - - - - - - - - - - -## Methods - -### \_\_init\_\_ - -Initialize WebService - -#### Signature - -```python -__init__( - port: int = 8002, - directories: Dict[str, str] = None, - basic_auth: Optional[Tuple[str, str]] = None, - config_file: Optional[str] = None, - enable_directory_browsing: bool = False, - allowed_extensions: Optional[list] = None, - blocked_extensions: Optional[list] = None, - max_file_size: int = 100 * 1024 * 1024, - enable_cors: bool = True -) -``` - -#### Parameters - - - Port to bind to (default: 8002) - - - - Dict mapping URL paths to local directories - - - - Optional tuple of (username, password) - - - - Optional configuration file path - - - - Allow directory listing - - - - List of allowed file extensions (e.g., \['.html', '.css']) - - - - List of blocked extensions (e.g., \['.env', '.git']) - - - - Maximum file size in bytes to serve - - - - Enable CORS support - - -#### Source - -[`signalwire/signalwire/web/web_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/web/web_service.py) - -Line 44. - -*** - -### add\_directory - -Add a new directory to serve - -#### Signature - -```python -add_directory(route: str, directory: str) -> None -``` - -#### Parameters - - - URL path to mount at (e.g., "/docs") - - - - Local directory path to serve - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/web/web_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/web/web_service.py) - -Line 461. - -*** - -### remove\_directory - -Remove a directory from being served - -#### Signature - -```python -remove_directory(route: str) -> None -``` - -#### Parameters - - - URL path to remove - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/web/web_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/web/web_service.py) - -Line 487. - -*** - -### start - -Start the service with optional HTTPS support - -#### Signature - -```python -start( - host: str = '0.0.0.0', - port: Optional[int] = None, - ssl_cert: Optional[str] = None, - ssl_key: Optional[str] = None -) -``` - -#### Parameters - - - Host to bind to (default: "0.0.0.0") - - - - Port to bind to (default: self.port) - - - - Path to SSL certificate file (overrides environment) - - - - Path to SSL key file (overrides environment) - - -#### Source - -[`signalwire/signalwire/web/web_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/web/web_service.py) - -Line 501. - -*** - -### stop - -Stop the service (placeholder for cleanup) - -#### Signature - -```python -stop() -``` - -#### Source - -[`signalwire/signalwire/web/web_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/web/web_service.py) - -Line 566. - -## Source - -[`signalwire/signalwire/web/web_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/web/web_service.py) - -Line 41. diff --git a/fern/products/sdk-reference/ruby/_meta.json b/fern/products/sdk-reference/ruby/_meta.json index 31ed89c584..d57355e159 100644 --- a/fern/products/sdk-reference/ruby/_meta.json +++ b/fern/products/sdk-reference/ruby/_meta.json @@ -6,5 +6,5 @@ "format": "mdx", "platform": "fern", "base_slug": "/reference/ruby", - "item_count": 1778 + "item_count": 1784 } \ No newline at end of file diff --git a/fern/products/sdk-reference/ruby/agents/agent-base/agent-body-limit-middleware/index.mdx b/fern/products/sdk-reference/ruby/agents/agent-base/agent-body-limit-middleware/index.mdx new file mode 100644 index 0000000000..8f4f13a6cc --- /dev/null +++ b/fern/products/sdk-reference/ruby/agents/agent-base/agent-body-limit-middleware/index.mdx @@ -0,0 +1,78 @@ +--- +slug: "/reference/ruby/agents/agent-base/agent-body-limit-middleware" +title: "AgentBodyLimitMiddleware" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::AgentBase::AgentBodyLimitMiddleware" + parent: "agents.AgentBase" + module: "agents.AgentBase" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb" + visibility: "public" +--- +# `AgentBodyLimitMiddleware` + +## Signature + +```ruby +class AgentBodyLimitMiddleware < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### call + +#### Signature + +```ruby +def call(env) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 2220. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(app, max_size) +``` + +#### Parameters + + + + + +#### Returns + +`AgentBodyLimitMiddleware` — a new instance of AgentBodyLimitMiddleware + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 2215. + +## Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 2214. diff --git a/fern/products/sdk-reference/ruby/agents/agent-base/agent-security-headers-middleware/index.mdx b/fern/products/sdk-reference/ruby/agents/agent-base/agent-security-headers-middleware/index.mdx new file mode 100644 index 0000000000..59aa2b084a --- /dev/null +++ b/fern/products/sdk-reference/ruby/agents/agent-base/agent-security-headers-middleware/index.mdx @@ -0,0 +1,90 @@ +--- +slug: "/reference/ruby/agents/agent-base/agent-security-headers-middleware" +title: "AgentSecurityHeadersMiddleware" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::AgentBase::AgentSecurityHeadersMiddleware" + parent: "agents.AgentBase" + module: "agents.AgentBase" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb" + visibility: "public" +--- +# `AgentSecurityHeadersMiddleware` + +\================================================================== +Rack Middleware +=============== + +## Signature + +```ruby +class AgentSecurityHeadersMiddleware < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Constants + + + +## Methods + +### call + +#### Signature + +```ruby +def call(env) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 2207. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(app) +``` + +#### Parameters + + + +#### Returns + +`AgentSecurityHeadersMiddleware` — a new instance of AgentSecurityHeadersMiddleware + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 2203. + +## Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 2196. diff --git a/fern/products/sdk-reference/ruby/agents/agent-base/agent-timing-safe-basic-auth/index.mdx b/fern/products/sdk-reference/ruby/agents/agent-base/agent-timing-safe-basic-auth/index.mdx new file mode 100644 index 0000000000..7c1a96648b --- /dev/null +++ b/fern/products/sdk-reference/ruby/agents/agent-base/agent-timing-safe-basic-auth/index.mdx @@ -0,0 +1,78 @@ +--- +slug: "/reference/ruby/agents/agent-base/agent-timing-safe-basic-auth" +title: "AgentTimingSafeBasicAuth" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::AgentBase::AgentTimingSafeBasicAuth" + parent: "agents.AgentBase" + module: "agents.AgentBase" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb" + visibility: "public" +--- +# `AgentTimingSafeBasicAuth` + +## Signature + +```ruby +class AgentTimingSafeBasicAuth < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### call + +#### Signature + +```ruby +def call(env) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 2235. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(app, agent) +``` + +#### Parameters + + + + + +#### Returns + +`AgentTimingSafeBasicAuth` — a new instance of AgentTimingSafeBasicAuth + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 2230. + +## Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 2229. diff --git a/fern/products/sdk-reference/ruby/agents/agent-base/index.mdx b/fern/products/sdk-reference/ruby/agents/agent-base/index.mdx new file mode 100644 index 0000000000..c58350044a --- /dev/null +++ b/fern/products/sdk-reference/ruby/agents/agent-base/index.mdx @@ -0,0 +1,2578 @@ +--- +slug: "/reference/ruby/agents/agent-base" +title: "AgentBase" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::AgentBase" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb" + visibility: "public" +--- +# `AgentBase` + +Central agent class that composes SWML rendering, tool dispatch, +prompt management, AI config, and HTTP serving. + +AgentBase extends SWMLService with agent-specific capabilities: + +- Prompt management (POM sections and raw text) +- Tool (SWAIG function) registration & dispatch +- AI configuration (hints, languages, pronunciations, params) +- Verb management (pre/post answer, post-AI) +- Context & step workflows +- Skill integration +- Dynamic configuration via per-request ephemeral copies + +All configuration methods return +self+ for method chaining. + +## Signature + +```ruby +class AgentBase < SignalWire::SWML::Service +``` + +## Inheritance + +**Extends:** [SignalWire::SWML::Service](/docs/sdk-reference/reference/ruby/agents/swml/service) + +## Constants + + + Maximum request body size (1 MB) + + + + The complete set of internal SWAIG function names that accept fillers, matching the SWAIGInternalFiller schema definition. Any name outside this set is silently ignored by the runtime — +set\_internal\_fillers+ and +add\_internal\_filler+ warn if you pass an unknown name. Notable absences: +change\_step+, +gather\_submit+, or arbitrary user-defined SWAIG function names are NOT supported. + + +## Methods + +### add\_answer\_verb + +#### Signature + +```ruby +def add_answer_verb(config) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1089. + +*** + +### add\_function\_include + +#### Signature + +```ruby +def add_function_include(url, functions, meta_data: nil) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1053. + +*** + +### add\_hint + +### ================================================================== AI Config methods + +#### Signature + +```ruby +def add_hint(hint) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 749. + +*** + +### add\_hints + +#### Signature + +```ruby +def add_hints(hints) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 754. + +*** + +### add\_internal\_filler + +Add internal fillers for a single internal function and language. + +See +set\_internal\_fillers+ for the complete list of supported ++func\_name+ values (SUPPORTED\_INTERNAL\_FILLER\_NAMES) and what +fillers do. Names outside the supported set log a warning and are +stored but the runtime will not play them. + +#### Signature + +```ruby +def add_internal_filler(func_name, lang_code, fillers) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1030. + +*** + +### add\_language + +Add a language configuration. + +Python parity: `add_language(name, code, voice, speech_fillers=None, +function_fillers=None, engine=None, model=None)`. Ruby supports +both the Python-style positional shape AND the original +`add_language(config)` hash form. + +Voice argument can be either a simple voice id (`"en-US-Neural2-F"`) +or a combined `"engine.voice:model"` string +(`"elevenlabs.josh:eleven_turbo_v2_5"`); the combined form is +parsed into `engine`/`voice`/`model` keys when `engine` +and `model` aren't supplied explicitly. + +#### Signature + + + + ```ruby + add_language(config) + ``` + + + + ```ruby + add_language(name, code, voice, speech_fillers: nil, + ``` + + + +#### Parameters (Overload 1) + + + preformed language config + + +#### Parameters (Overload 2) + + + language name (e.g. `"English"`) + + + + BCP47 language code (e.g. `"en-US"`) + + + + voice id or `engine.voice:model` string + + + + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 844. + +*** + +### add\_mcp\_server + +Add an external MCP server for tool discovery and invocation. + +#### Signature + +```ruby +def add_mcp_server(url, headers: nil, resources: false, resource_vars: nil) +``` + +#### Parameters + + + MCP server HTTP endpoint URL + + + + + + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1406. + +*** + +### add\_pattern\_hint + +Add a complex (pattern-matched) hint. + +Python parity: +`add_pattern_hint(hint, pattern, replace, ignore_case=False)`. +Ruby supports both the Python-style positional form and the +legacy keyword form (`add_pattern_hint(pattern, hint:, language:)`) +for backward compat. + +#### Signature + + + + ```ruby + add_pattern_hint(hint, pattern, replace, ignore_case: false) + ``` + + + + ```ruby + add_pattern_hint(pattern, hint:, language: 'en-US') + ``` + + + +#### Parameters (Overload 1) + + + hint to match + + + + regex pattern + + + + replacement text + + + + +#### Parameters (Overload 2) + + + + + + + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 776. + +*** + +### add\_post\_ai\_verb + +#### Signature + +```ruby +def add_post_ai_verb(verb_name, config) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1104. + +*** + +### add\_post\_answer\_verb + +#### Signature + +```ruby +def add_post_answer_verb(verb_name, config) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1094. + +*** + +### add\_pre\_answer\_verb + +### ================================================================== Verb management + +#### Signature + +```ruby +def add_pre_answer_verb(verb_name, config) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1079. + +*** + +### add\_pronunciation + +#### Signature + +```ruby +def add_pronunciation(phrase, pronunciation, language_code: 'en-US') +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 929. + +*** + +### add\_skill + +Load and register a skill by name. + +#### Signature + +```ruby +def add_skill(skill_name, params = {}) +``` + +#### Parameters + + + + + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1193. + +*** + +### add\_swaig\_query\_params + +#### Signature + +```ruby +def add_swaig_query_params(params) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1282. + +*** + +### agent\_id + +Python parity: + +- `logger` — agent-specific structured logger (Python: `self.log`). +- `skill_manager` — owning SkillManager (Python's `self.skill_manager`). +- `agent_id` — UUID identifier from constructor or auto-generated. +- `default_webhook_url` — base URL for SWAIG webhook fallbacks. +- `native_functions` — names of built-in SWAIG functions to advertise. +- `use_pom` — whether prompt-object-model rendering is enabled. + +#### Signature + +```ruby +attr_reader agent_id -> Object +``` + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 50. + +*** + +### as\_rack\_app + +Return a Rack-compatible application for mounting. + +#### Signature + +```ruby +def rack_app +``` + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1688. + +*** + +### auto\_map\_sip\_usernames + +Automatically register common SIP usernames based on this agent's +name and route. + +Python parity: `AgentBase.auto_map_sip_usernames` derives SIP +usernames from the agent name and route (lower-cased, stripped to +`[a-z0-9_]`) plus a no-vowels variant of the name, registering +each via \{#register\_sip\_username\}. Duplicates are skipped so the +registered set matches Python's set-backed dedup. + +#### Signature + +```ruby +def auto_map_sip_usernames +``` + +#### Returns + +`self` — for method chaining + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1323. + +*** + +### clear\_post\_ai\_verbs + +#### Signature + +```ruby +def clear_post_ai_verbs +``` + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1109. + +*** + +### clear\_post\_answer\_verbs + +#### Signature + +```ruby +def clear_post_answer_verbs +``` + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1099. + +*** + +### clear\_pre\_answer\_verbs + +#### Signature + +```ruby +def clear_pre_answer_verbs +``` + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1084. + +*** + +### clear\_swaig\_query\_params + +#### Signature + +```ruby +def clear_swaig_query_params +``` + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1287. + +*** + +### contexts + +Define / retrieve the ContextBuilder for this agent. + +Python parity: `define_contexts(contexts)` accepts either a +`ContextBuilder` (calls `.to_dict()` to materialise) or a +raw `dict` and stores it on the agent. Ruby supports both +forms PLUS the original lazy-getter idiom: + +1. **Lazy getter** (Ruby idiom) — `agent.define_contexts` + returns the existing builder, creating one if needed. +2. **Override with builder** — `agent.define_contexts(other_cb)` + replaces the current builder with the supplied one (Python + parity). +3. **Override with hash** — `agent.define_contexts({...})` + builds a fresh builder using the provided contexts hash + (Python parity for raw-dict input). + +#### Signature + +```ruby +def define_contexts(contexts = nil) +``` + +#### Returns + +`SignalWire::Contexts::ContextBuilder` — the active builder + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 468. + +*** + +### create\_tool\_token + +Mint a per-call SWAIG-function token via the agent's SessionManager. + +Python parity: state\_mixin.StateMixin#\_create\_tool\_token — +delegates to SessionManager#create\_token and returns "" on any +raised error (Python rescues all exceptions and returns ""). + +#### Signature + +```ruby +def create_tool_token(tool_name, call_id) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 681. + +*** + +### default\_webhook\_url + +Python parity: + +- `logger` — agent-specific structured logger (Python: `self.log`). +- `skill_manager` — owning SkillManager (Python's `self.skill_manager`). +- `agent_id` — UUID identifier from constructor or auto-generated. +- `default_webhook_url` — base URL for SWAIG webhook fallbacks. +- `native_functions` — names of built-in SWAIG functions to advertise. +- `use_pom` — whether prompt-object-model rendering is enabled. + +#### Signature + +```ruby +attr_reader default_webhook_url -> Object +``` + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 50. + +*** + +### define\_contexts + +Define / retrieve the ContextBuilder for this agent. + +Python parity: `define_contexts(contexts)` accepts either a +`ContextBuilder` (calls `.to_dict()` to materialise) or a +raw `dict` and stores it on the agent. Ruby supports both +forms PLUS the original lazy-getter idiom: + +1. **Lazy getter** (Ruby idiom) — `agent.define_contexts` + returns the existing builder, creating one if needed. +2. **Override with builder** — `agent.define_contexts(other_cb)` + replaces the current builder with the supplied one (Python + parity). +3. **Override with hash** — `agent.define_contexts({...})` + builds a fresh builder using the provided contexts hash + (Python parity for raw-dict input). + +#### Signature + +```ruby +def define_contexts(contexts = nil) +``` + +#### Parameters + + + optional override + + +#### Returns + +`SignalWire::Contexts::ContextBuilder` — the active builder + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1137. + +*** + +### define\_tool + +Register a SWAIG tool (function) that the AI can invoke during a +call. + +\== How this becomes a tool the model sees + +A SWAIG function is _exactly the same concept_ as a "tool" in +native OpenAI / Anthropic tool calling. On every LLM turn, the +SDK renders each registered SWAIG function into the OpenAI tool +schema: + +``` +{ + "type": "function", + "function": { + "name": "your_name_here", + "description": "your description text", + "parameters": { ... your JSON schema ... } + } +} +``` + +That schema is sent to the model as part of the same API call +that produces the next assistant message. The model reads: + +- the function +description+ to decide WHEN to call this tool +- each parameter +description+ (inside +parameters+) to decide + HOW to fill in that argument from the user's utterance + +This means _descriptions are prompt engineering_, not developer +comments. A vague description is the #1 cause of "the model has +the right tool but doesn't call it" failures. + +\== Bad vs good descriptions + +BAD : description: "Lookup function" +GOOD: description: "Look up a customer's account details by " \ +"account number. Use this BEFORE quoting " \ +"any account-specific info (balance, plan, " \ +"status). Do not use for general product " \ +"questions." + +BAD : parameters: \{ id: \{ type: 'string', description: 'the id' \} \} +GOOD: parameters: \{ account\_number: \{ type: 'string', +description: "The customer's 8-digit account " \ +"number, no dashes or spaces. Ask the user if they " \ +"don't provide it." \} \} + +\== Tool count matters + +LLM tool selection accuracy degrades past ~7-8 +simultaneously-active tools per call. Use +Contexts::Step#set\_functions to partition tools across steps so +only the relevant subset is active at any moment. + +Define a SWAIG tool. + +Python parity: +`define_tool(name, description, parameters, handler, +secure=True, fillers=None, wait_file=None, wait_file_loops=None, +webhook_url=None, required=None, is_typed_handler=False, **swaig_fields)`. + +#### Signature + +```ruby +def define_tool(name:, description:, parameters: {}, handler: nil, secure: false, fillers: nil, wait_file: nil, wait_file_loops: nil, webhook_url: nil, required: nil, is_typed_handler: false, swaig_fields: nil, &block) +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + +#### Yields + +- `args, raw_data` — the tool handler +- `args, raw_data` — tool handler body (alternative to passing `handler:`) + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 617. + +*** + +### define\_tools + +Return an array of all tool definitions (for SWML rendering). + +#### Signature + +```ruby +def define_tools +``` + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 671. + +*** + +### enable\_debug\_events + +#### Signature + +```ruby +def enable_debug_events(level = 1) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1047. + +*** + +### enable\_debug\_routes + +#### Signature + +```ruby +def enable_debug_routes +``` + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1292. + +*** + +### enable\_mcp\_server + +Expose this agent's tools as an MCP server endpoint at /mcp. + +#### Signature + +```ruby +def enable_mcp_server +``` + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1418. + +*** + +### enable\_sip\_routing + +### ================================================================== SIP + +#### Signature + +```ruby +def enable_sip_routing(auto_map: true, path: '/sip') +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1301. + +*** + +### extract\_sip\_username + +Extract a SIP username from a SIP URI string. + +Parses URIs of the form "sip:user@domain" and returns the user part. +Handles optional "sip:" or "sips:" scheme prefixes. + +#### Signature + +```ruby +def extract_sip_username(sip_uri) +``` + +#### Parameters + + + a SIP URI, e.g. "sip:alice@example.com" + + +#### Returns + +`String | nil` — the username, or nil if the URI cannot be parsed + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1352. + +*** + +### extract\_sip\_username\_from\_request + +Extract the SIP username from request body data. + +Looks for SIP URI in common request body fields +(e.g., "to", "from", "sip\_uri", "call.to", "call.from"). + +#### Signature + +```ruby +def extract_sip_username_from_request(request_data) +``` + +#### Parameters + + + the parsed request body + + +#### Returns + +`String | nil` — the extracted SIP username, or nil + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1375. + +*** + +### function\_includes= + +#### Signature + +```ruby +def function_includes=(includes) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 470. + +*** + +### get\_basic\_auth\_credentials + +Get the configured basic-auth credentials. + +Python parity: `get_basic_auth_credentials(include_source=False)`. +When `include_source` is true, returns a 3-tuple `[user, +pass, source]` (`"environment"` / `"auto-generated"` / +`"provided"`). Otherwise returns `[user, pass]`. + +#### Signature + +```ruby +def get_basic_auth_credentials(include_source: false) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1769. + +*** + +### get\_language\_params + +Read the per-language `params` hash for a previously-added +language. + +#### Signature + +```ruby +def get_language_params(code) +``` + +#### Parameters + + + language code as previously passed to `add_language`. + + +#### Returns + +`Hash | nil` — the params hash if set, `nil` otherwise (including when the code is unknown). + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 917. + +*** + +### global\_data= + +#### Signature + +```ruby +def global_data=(data) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 474. + +*** + +### handle\_additional\_route + +#### Signature + +```ruby +def handle_additional_route(sub_path, request_data, env) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 2118. + +*** + +### has\_skill? + +#### Signature + +```ruby +def has_skill?(skill_name) +``` + +#### Parameters + + + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1254. + +*** + +### initialize + +*** + +#### Construction + +#### Signature + +```ruby +def initialize(name: 'agent', route: '/', host: '0.0.0.0', port: nil, basic_auth: nil, use_pom: true, token_expiry_secs: 3600, auto_answer: true, record_call: false, record_format: 'mp4', record_stereo: true, default_webhook_url: nil, agent_id: nil, native_functions: nil, schema_path: nil, suppress_logs: false, enable_post_prompt_override: false, check_for_input_override: false, config_file: nil, schema_validation: true, signing_key: nil, trust_proxy_for_signature: false) +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`AgentBase` — a new instance of AgentBase + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 60. + +*** + +### internal\_fillers= + +#### Signature + +```ruby +def internal_fillers=(fillers) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 478. + +*** + +### languages= + +#### Signature + +```ruby +def languages=(languages) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 482. + +*** + +### list\_skills + +#### Signature + +```ruby +def list_skills +``` + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1250. + +*** + +### list\_tool\_names + +Return the names of all registered SWAIG tools in insertion +order. Used by ContextBuilder#validate! to detect collisions with +reserved native tool names. + +#### Signature + +```ruby +def list_tool_names +``` + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1184. + +*** + +### logger + +Python parity: + +- `logger` — agent-specific structured logger (Python: `self.log`). +- `skill_manager` — owning SkillManager (Python's `self.skill_manager`). +- `agent_id` — UUID identifier from constructor or auto-generated. +- `default_webhook_url` — base URL for SWAIG webhook fallbacks. +- `native_functions` — names of built-in SWAIG functions to advertise. +- `use_pom` — whether prompt-object-model rendering is enabled. + +#### Signature + +```ruby +attr_reader logger -> Object +``` + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 50. + +*** + +### manual\_set\_proxy\_url + +#### Signature + +```ruby +def manual_set_proxy_url(url) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1267. + +*** + +### native\_functions + +Python parity: + +- `logger` — agent-specific structured logger (Python: `self.log`). +- `skill_manager` — owning SkillManager (Python's `self.skill_manager`). +- `agent_id` — UUID identifier from constructor or auto-generated. +- `default_webhook_url` — base URL for SWAIG webhook fallbacks. +- `native_functions` — names of built-in SWAIG functions to advertise. +- `use_pom` — whether prompt-object-model rendering is enabled. + +#### Signature + +```ruby +attr_accessor native_functions <-> Object +``` + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 50. + +*** + +### native\_functions= + +#### Signature + +```ruby +attr_accessor native_functions= <-> Object +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 486. + +*** + +### on\_debug\_event + +#### Signature + +```ruby +def on_debug_event(&block) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1560. + +*** + +### on\_function\_call + +Dispatch a function call to the registered handler. + +#### Signature + +```ruby +def on_function_call(name, args, raw_data) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 701. + +*** + +### on\_summary + +Python parity: `on_summary(self, summary, raw_data=None)` is a +virtual hook called when a post-prompt summary is received. +Ruby supports two equivalent shapes: + +1. **Registration** (Ruby idiom) — pass a block to install a + callback. The block receives `(summary, raw_data)` when a + summary is delivered. `on_summary { |sum, raw| ... }` +2. **Override** (Python idiom) — subclass and override + `on_summary(summary, raw_data = nil)`. Default + implementation calls the registered block (if any) and + otherwise no-ops. + +#### Signature + +```ruby +def on_summary(summary = nil, raw_data = nil, &block) +``` + +#### Parameters + + + the post-prompt summary + + + + the complete raw POST data + + + + +#### Yields + +- `summary, raw_data` — optional callback registration + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1550. + +*** + +### params= + +#### Signature + +```ruby +def params=(params) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 490. + +*** + +### pom + +Read-only snapshot of the agent's POM as a typed +\{SignalWire::POM::PromptObjectModel\} instance. + +Python parity: `agent.pom` instance attribute (agent\_base.py +line 209) is a `PromptObjectModel` instance. Returns `nil` when +raw-text prompt mode is in effect (`set_prompt_text` was called) +— mirrors Python's `self.pom = None when use_pom=False`. + +The returned PromptObjectModel is a fresh build of the agent's +current section state, so caller mutations do not leak into agent +state. Use `agent.pom.to_h` to retrieve the legacy +array-of-hashes representation. + +#### Signature + +```ruby +def pom +``` + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 373. + +*** + +### post\_prompt + +Returns the post-prompt text whatever set\_post\_prompt stored, or +nil when no post-prompt has been set. + +Mirrors Python's PromptManager#get\_post\_prompt / +PromptMixin#get\_post\_prompt — used by SWML rendering when a +post-prompt is configured. +Post-prompt text. Clean symmetric reader/writer pair — the showcase case. + +#### Signature + +```ruby +def get_post_prompt +``` + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 451. + +*** + +### post\_prompt\_url= + +#### Signature + +```ruby +def post_prompt_url=(url) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 494. + +*** + +### post\_prompt= + +#### Signature + +```ruby +def post_prompt=(text) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 452. + +*** + +### prompt + +Return the current prompt: either a string (text mode) or an array (POM). +Reader: the effective prompt (string in text mode, POM array otherwise). +Alias of #get\_prompt. Reader-only — `get_prompt` is a _computed_ getter +(raw text vs POM), so there is no symmetric writer; set the raw text via +\#prompt\_text= or build a POM. This raw-vs-rendered asymmetry is the main +edge case the migration doc calls out. + +#### Signature + +```ruby +def get_prompt +``` + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 440. + +*** + +### prompt\_add\_section + +Add a POM section. + +Python parity: +`prompt_add_section(title, body="", bullets=None, +numbered=False, numbered_bullets=False, subsections=None)`. + +#### Signature + +```ruby +def prompt_add_section(title, body = nil, bullets: nil, numbered: false, numbered_bullets: false, subsections: nil) +``` + +#### Parameters + + + section title + + + + optional body text + + + + + + + + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 270. + +*** + +### prompt\_add\_subsection + +Add a subsection under a parent section. + +#### Signature + +```ruby +def prompt_add_subsection(parent_title, title, body = nil, bullets: nil) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 334. + +*** + +### prompt\_add\_to\_section + +Append content to an existing POM section, creating it if absent. + +Python parity: +`prompt_add_to_section(title, body=None, bullet=None, +bullets=None)`. Supports appending body text, a single bullet, +or a list of bullets. + +**Backwards compat:** the original Ruby signature was +`prompt_add_to_section(title, text)`. When called with two +positional arguments the second becomes `body`; this preserves +existing call sites while still supporting Python's keyword form. + +#### Signature + +```ruby +def prompt_add_to_section(title, body_arg = nil, body: nil, bullet: nil, bullets: nil) +``` + +#### Parameters + + + section title + + + + + + + + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 310. + +*** + +### prompt\_has\_section? + +Check whether a POM section with the given title exists. + +#### Signature + +```ruby +def prompt_has_section?(title) +``` + +#### Parameters + + + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 347. + +*** + +### prompt\_pom= + +#### Signature + +```ruby +def prompt_pom=(pom) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 498. + +*** + +### prompt\_text + +Returns the raw prompt text whatever set\_prompt\_text stored, or +nil when no raw prompt has been set. Distinct from #get\_prompt +which may return the POM array when use\_pom is true. + +Mirrors Python's PromptManager#get\_raw\_prompt. +Raw prompt text (whatever #set\_prompt\_text stored). Symmetric pair. + +#### Signature + +```ruby +def get_raw_prompt +``` + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 443. + +*** + +### prompt\_text= + +Writer returns the assigned value (Ruby `=` semantics), not self, so it +can't chain — but `=` writers are never chained anyway. + +#### Signature + +```ruby +def prompt_text=(text) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 446. + +*** + +### pronunciations= + +#### Signature + +```ruby +def pronunciations=(pronunciations) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 502. + +*** + +### rack\_app + +Return a Rack-compatible application for mounting. + +#### Signature + +```ruby +def rack_app +``` + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1684. + +*** + +### register\_sip\_username + +#### Signature + +```ruby +def register_sip_username(username) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1308. + +*** + +### register\_swaig\_function + +Register a raw SWAIG function definition (e.g. from DataMap#to\_swaig\_function). + +#### Signature + +```ruby +def register_swaig_function(func_def) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 663. + +*** + +### remove\_skill + +#### Signature + +```ruby +def remove_skill(skill_name) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1244. + +*** + +### render\_swml + +Build the complete SWML document hash. + +#### Signature + +```ruby +def render_swml(request_data = nil, request: nil) +``` + +#### Parameters + + + parsed request body + + + + +#### Returns + +`Hash` + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1699. + +*** + +### reset\_contexts + +Remove all contexts, returning the agent to a no-contexts state. +This is a convenience wrapper around +define\_contexts.reset+. +Use it in a dynamic config callback when you need to rebuild +contexts from scratch for a specific request. + +#### Signature + +```ruby +def reset_contexts +``` + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1176. + +*** + +### run + +Universal run method — mirrors Python's +`WebMixin.run(event=None, context=None, force_mode=None, +host=None, port=None)`. + +Detects execution mode (server / lambda / cgi) and routes +accordingly. `force_mode` overrides auto-detection. + +#### Signature + +```ruby +def run(event: nil, context: nil, force_mode: nil, host: nil, port: nil) +``` + +#### Parameters + + + + + + + + + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1578. + +*** + +### serve + +Start the HTTP server (blocking). + +Python parity: `serve(host=None, port=None)`. `host` / +`port` overrides default to constructor-supplied values. + +#### Signature + +```ruby +def serve(host: nil, port: nil) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1644. + +*** + +### set\_dynamic\_config\_callback + +### ================================================================== Web / HTTP configuration + +#### Signature + +```ruby +def set_dynamic_config_callback(callable = nil, &block) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1262. + +*** + +### set\_function\_includes + +#### Signature + +```ruby +def set_function_includes(includes) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1060. + +*** + +### set\_global\_data + +#### Signature + +```ruby +def set_global_data(data) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 953. + +*** + +### set\_internal\_fillers + +Set internal fillers for native SWAIG functions. + +Internal fillers are short phrases the AI agent speaks (via TTS) +while an internal/native function is running, so the caller +doesn't hear dead air during transitions or background work. + +Supported function names (match the SWAIGInternalFiller schema): ++hangup+, +check\_time+, +wait\_for\_user+, +wait\_seconds+, ++adjust\_response\_latency+, +next\_step+, +change\_context+, ++get\_visual\_input+, +get\_ideal\_strategy+. See +SUPPORTED\_INTERNAL\_FILLER\_NAMES. + +Notably NOT supported: +change\_step+, +gather\_submit+, or +arbitrary user-defined SWAIG function names. The runtime only +honors fillers for the names listed above; everything else is +silently ignored at the SWML level. This method warns at +registration time if you pass an unknown name so you catch the +typo early. + +Expected format: +\{ function\_name => \{ language\_code => \[phrases] \} \}+ + +#### Signature + +```ruby +def set_internal_fillers(fillers) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1008. + +*** + +### set\_language\_params + +Set (or replace) the per-language `params` dict on an +already-added language. Useful when language entries are built up +via add\_language first and engine-specific tuning is added later +(e.g. from a config loader). Returns self for chaining. + +#### Signature + +```ruby +def set_language_params(code, params) +``` + +#### Parameters + + + language code as previously passed to `add_language` (e.g. `"en-US"`). + + + + engine-specific params hash to attach. Empty hash removes the key. + + +#### Returns + +`self` — No-op if the code isn't found. + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 898. + +*** + +### set\_languages + +#### Signature + +```ruby +def set_languages(languages) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 924. + +*** + +### set\_native\_functions + +#### Signature + +```ruby +def set_native_functions(names) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 962. + +*** + +### set\_param + +#### Signature + +```ruby +def set_param(key, value) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 941. + +*** + +### set\_params + +#### Signature + +```ruby +def set_params(params) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 946. + +*** + +### set\_post\_prompt + +Set post-prompt text. + +#### Signature + +```ruby +def set_post_prompt(text) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 244. + +*** + +### set\_post\_prompt\_llm\_params + +#### Signature + +```ruby +def set_post_prompt_llm_params(**params) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1070. + +*** + +### set\_post\_prompt\_url + +#### Signature + +```ruby +def set_post_prompt_url(url) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1277. + +*** + +### set\_prompt\_llm\_params + +#### Signature + +```ruby +def set_prompt_llm_params(**params) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1065. + +*** + +### set\_prompt\_pom + +Set POM array directly. + +#### Signature + +```ruby +def set_prompt_pom(pom) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 250. + +*** + +### set\_prompt\_text + +Set prompt as raw text. Clears any POM state. + +#### Signature + +```ruby +def set_prompt_text(text) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 236. + +*** + +### set\_pronunciations + +#### Signature + +```ruby +def set_pronunciations(pronunciations) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 936. + +*** + +### set\_web\_hook\_url + +#### Signature + +```ruby +def set_web_hook_url(url) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 1272. + +*** + +### signing\_key + +Python parity: + +- `logger` — agent-specific structured logger (Python: `self.log`). +- `skill_manager` — owning SkillManager (Python's `self.skill_manager`). +- `agent_id` — UUID identifier from constructor or auto-generated. +- `default_webhook_url` — base URL for SWAIG webhook fallbacks. +- `native_functions` — names of built-in SWAIG functions to advertise. +- `use_pom` — whether prompt-object-model rendering is enabled. + +#### Signature + +```ruby +attr_reader signing_key -> Object +``` + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 50. + +*** + +### skill\_manager + +Python parity: + +- `logger` — agent-specific structured logger (Python: `self.log`). +- `skill_manager` — owning SkillManager (Python's `self.skill_manager`). +- `agent_id` — UUID identifier from constructor or auto-generated. +- `default_webhook_url` — base URL for SWAIG webhook fallbacks. +- `native_functions` — names of built-in SWAIG functions to advertise. +- `use_pom` — whether prompt-object-model rendering is enabled. + +#### Signature + +```ruby +attr_reader skill_manager -> Object +``` + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 50. + +*** + +### update\_global\_data + +#### Signature + +```ruby +def update_global_data(data) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 958. + +*** + +### use\_pom + +Python parity: + +- `logger` — agent-specific structured logger (Python: `self.log`). +- `skill_manager` — owning SkillManager (Python's `self.skill_manager`). +- `agent_id` — UUID identifier from constructor or auto-generated. +- `default_webhook_url` — base URL for SWAIG webhook fallbacks. +- `native_functions` — names of built-in SWAIG functions to advertise. +- `use_pom` — whether prompt-object-model rendering is enabled. + +#### Signature + +```ruby +attr_reader use_pom -> Object +``` + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 50. + +*** + +### validate\_tool\_token + +Validate a per-call SWAIG-function token. Returns false when the +function is not registered, when the SessionManager rejects the +token, or on any underlying exception. + +Python parity: state\_mixin.StateMixin#validate\_tool\_token — +rejects unknown function names up-front and rescues exceptions. + +#### Signature + +```ruby +def validate_tool_token(function_name, token, call_id) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 693. + +*** + +### web\_hook\_url= + +#### Signature + +```ruby +def web_hook_url=(url) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 506. + +## Source + +[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) + +Line 42. diff --git a/fern/products/sdk-reference/ruby/agents/agent-base/index__2.mdx b/fern/products/sdk-reference/ruby/agents/agent-base/index__2.mdx new file mode 100644 index 0000000000..e7274f008b --- /dev/null +++ b/fern/products/sdk-reference/ruby/agents/agent-base/index__2.mdx @@ -0,0 +1,26 @@ +--- +slug: "/reference/ruby/agents/agent-base/index__2" +title: "AgentBase" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "module" + language: "ruby" + qualified_name: "agents.AgentBase" + parent: "agents" + module: "agents" +--- +# `AgentBase` + +## Classes + + + + + + \================================================================== Rack Middleware ================================================================== + + + + diff --git a/fern/products/sdk-reference/ruby/agents/agent-server/index.mdx b/fern/products/sdk-reference/ruby/agents/agent-server/index.mdx new file mode 100644 index 0000000000..b2da171500 --- /dev/null +++ b/fern/products/sdk-reference/ruby/agents/agent-server/index.mdx @@ -0,0 +1,487 @@ +--- +slug: "/reference/ruby/agents/agent-server" +title: "AgentServer" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::AgentServer" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/server/agent_server.rb" + visibility: "public" +--- +# `AgentServer` + +Multi-agent hosting on a single Rack application. + +server = AgentServer.new(host: '0.0.0.0', port: 3000) +server.register(my\_agent, route: '/agent1') +server.register(my\_agent2, route: '/agent2') +server.run + +## Signature + +```ruby +class AgentServer < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Constants + + + MIME types for static file serving. + + + + Security headers applied to static file responses. + + +## Methods + +### app + +Public Rack application — Python parity: `server.app` exposes +the underlying FastAPI instance. Ruby exposes the cached Rack +app (a Proc) so callers can mount it on their own server or +pass it to Rack-compatible test harnesses. + +#### Signature + +```ruby +def app +``` + +#### Source + +[`lib/signalwire/server/agent_server.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/server/agent_server.rb) + +Line 27. + +*** + +### get\_agent + +Get a specific agent by route. + +#### Signature + +```ruby +def get_agent(route) +``` + +#### Parameters + + + +#### Returns + +`Object | nil` + +#### Source + +[`lib/signalwire/server/agent_server.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/server/agent_server.rb) + +Line 154. + +*** + +### get\_agents + +Get all registered agents. + +#### Signature + +```ruby +def get_agents +``` + +#### Returns + +`Hash` — route => agent + +#### Source + +[`lib/signalwire/server/agent_server.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/server/agent_server.rb) + +Line 147. + +*** + +### host + +Returns the value of attribute host. + +#### Signature + +```ruby +attr_reader host -> Object +``` + +#### Source + +[`lib/signalwire/server/agent_server.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/server/agent_server.rb) + +Line 21. + +*** + +### initialize + +Construct an AgentServer. + +Python parity: `AgentServer(host, port, log_level)` — +`log_level` controls the AgentServer's logger verbosity. The +Ruby port maps it through `SignalWire::Logging.logger` so the +WARN/INFO/DEBUG semantics match Python's `logging` levels. + +#### Signature + +```ruby +def initialize(host: '0.0.0.0', port: 3000, log_level: 'info') +``` + +#### Parameters + + + + + + + +#### Returns + +`AgentServer` — a new instance of AgentServer + +#### Source + +[`lib/signalwire/server/agent_server.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/server/agent_server.rb) + +Line 74. + +*** + +### log\_level + +Returns the value of attribute log\_level. + +#### Signature + +```ruby +attr_reader log_level -> Object +``` + +#### Source + +[`lib/signalwire/server/agent_server.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/server/agent_server.rb) + +Line 21. + +*** + +### logger + +Returns the value of attribute logger. + +#### Signature + +```ruby +attr_reader logger -> Object +``` + +#### Source + +[`lib/signalwire/server/agent_server.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/server/agent_server.rb) + +Line 21. + +*** + +### port + +Returns the value of attribute port. + +#### Signature + +```ruby +attr_reader port -> Object +``` + +#### Source + +[`lib/signalwire/server/agent_server.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/server/agent_server.rb) + +Line 21. + +*** + +### rack\_app + +Build a Rack application that routes requests to the appropriate agent. + +#### Signature + +```ruby +def rack_app +``` + +#### Returns + +`Proc` — a Rack-compatible app + +#### Source + +[`lib/signalwire/server/agent_server.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/server/agent_server.rb) + +Line 340. + +*** + +### register + +Register an agent at a given route. + +#### Signature + +```ruby +def register(agent, route: nil) +``` + +#### Parameters + + + an agent object (e.g. AgentBase or prefab) + + + + +#### Source + +[`lib/signalwire/server/agent_server.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/server/agent_server.rb) + +Line 126. + +*** + +### register\_global\_routing\_callback + +Register a routing callback across all agents. + +Python parity: +`AgentServer.register_global_routing_callback(callback_fn, path)`. +Adds unified routing logic to every registered agent at the same +path. The +path+ is normalized (leading slash ensured, trailing +slash stripped) and the callback is registered on each agent that +exposes +register\_routing\_callback+. + +The callback may be supplied either as a Ruby block or as a +callable (Proc/lambda) +callback\_fn+ positional argument, matching +Python's function-valued first parameter. + +#### Signature + +```ruby +def register_global_routing_callback(callback_fn = nil, path:, &block) +``` + +#### Parameters + + + the routing callback (Proc/lambda) + + + + + + +#### Returns + +`self` + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/server/agent_server.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/server/agent_server.rb) + +Line 191. + +*** + +### register\_sip\_username + +Register a SIP username mapping to a route. + +#### Signature + +```ruby +def register_sip_username(username, route) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/server/agent_server.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/server/agent_server.rb) + +Line 209. + +*** + +### run + +Universal run method — mirrors Python's +`AgentServer.run(event=None, context=None, host=None, port=None)`. + +Detects execution mode and routes appropriately: + +- **Server mode** — starts WEBrick (Ruby's stdlib HTTP server) + bound to `host`/`port` (overrides honoured if supplied). +- **Lambda mode** (`AWS_LAMBDA_FUNCTION_NAME` env var present) + — invokes `_handle_lambda_request(event, context)` and + returns the Lambda response Hash. +- **CGI mode** (`GATEWAY_INTERFACE` env var present) — invokes + `_handle_cgi_request` and returns the CGI response String. + +#### Signature + +```ruby +def run(event: nil, context: nil, host: nil, port: nil) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`Object | nil` — response for serverless modes, nil for server mode (blocking until shutdown). + +#### Source + +[`lib/signalwire/server/agent_server.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/server/agent_server.rb) + +Line 249. + +*** + +### serve\_static\_files + +Serve static files from a directory at a given route. + +#### Signature + +```ruby +def serve_static_files(directory, route) +``` + +#### Parameters + + + absolute or relative path to the directory + + + + the URL prefix to serve files at + + +#### Returns + +`self` + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/server/agent_server.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/server/agent_server.rb) + +Line 220. + +*** + +### setup\_sip\_routing + +Set up SIP-based routing. + +#### Signature + +```ruby +def setup_sip_routing(route: '/sip', auto_map: true) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/server/agent_server.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/server/agent_server.rb) + +Line 162. + +*** + +### unregister + +Unregister an agent by route. + +#### Signature + +```ruby +def unregister(route) +``` + +#### Parameters + + + +#### Returns + +`Object | nil` — the removed agent + +#### Source + +[`lib/signalwire/server/agent_server.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/server/agent_server.rb) + +Line 140. + +## Source + +[`lib/signalwire/server/agent_server.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/server/agent_server.rb) + +Line 20. diff --git a/fern/products/sdk-reference/ruby/agents/contexts/context-builder/index.mdx b/fern/products/sdk-reference/ruby/agents/contexts/context-builder/index.mdx new file mode 100644 index 0000000000..9a5b8f506c --- /dev/null +++ b/fern/products/sdk-reference/ruby/agents/contexts/context-builder/index.mdx @@ -0,0 +1,231 @@ +--- +slug: "/reference/ruby/agents/contexts/context-builder" +title: "ContextBuilder" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Contexts::ContextBuilder" + parent: "SignalWire::Contexts" + module: "agents.Contexts" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb" + visibility: "public" +--- +# `ContextBuilder` + +Builder for multi-step, multi-context AI agent workflows. + +A ContextBuilder owns one or more Contexts; each Context owns an +ordered list of Steps. Only one context and one step is active at +a time. Per chat turn, the runtime injects the current step's +instructions as a system message, then asks the LLM for a +response. + +\== Native tools auto-injected by the runtime + +When a step (or its enclosing context) declares +valid\_steps+ or ++valid\_contexts+, the runtime auto-injects two native tools so +the model can navigate the flow: + +- +next\_step(step: enum)+ — present when valid\_steps is set +- +change\_context(context: enum)+ — present when valid\_contexts is set + +Their +enum+ schemas are rewritten on every turn to match +whatever valid\_steps / valid\_contexts apply to the current step. +You do NOT need to define these tools yourself; they appear +automatically. + +A third native tool — +gather\_submit+ — is injected during +gather\_info questioning (see Step#set\_gather\_info / +Step#add\_gather\_question). + +These three names — +next\_step+, +change\_context+, ++gather\_submit+ — are reserved. +validate!+ will reject any agent +that defines a SWAIG tool with one of these names. See +RESERVED\_NATIVE\_TOOL\_NAMES. + +\== Function whitelisting (Step#set\_functions) + +Each step may declare a +functions+ whitelist. The whitelist is +applied in-memory at the start of each LLM turn. CRITICALLY: if a +step does NOT declare a +functions+ field, it INHERITS the +previous step's active set. See Step#set\_functions for details +and examples. + +## Signature + +```ruby +class ContextBuilder < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### add\_context + +Add a new context. Returns the Context object. + +#### Signature + +```ruby +def add_context(name) +``` + +#### Parameters + + + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 804. + +*** + +### attach\_agent + +Attach an agent reference so +validate!+ can check +user-defined tool names against RESERVED\_NATIVE\_TOOL\_NAMES. +Called internally by AgentBase#define\_contexts. + +#### Signature + +```ruby +def attach_agent(agent) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 789. + +*** + +### get\_context + +Get an existing context by name. Returns Context or nil. + +#### Signature + +```ruby +def get_context(name) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 815. + +*** + +### initialize + +Python parity: `ContextBuilder.__init__(self, agent)` accepts +an owning agent so `validate!` can introspect registered +SWAIG tools when checking for reserved-name collisions. +Ruby allows nil for standalone use (tests, idiom of building +a builder before attaching). + +#### Signature + +```ruby +def initialize(agent = nil) +``` + +#### Parameters + + + +#### Returns + +`ContextBuilder` — a new instance of ContextBuilder + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 780. + +*** + +### reset + +Remove all contexts, returning the builder to its initial state. +Use this in a dynamic config callback when you need to rebuild +contexts from scratch for a specific request. + +#### Signature + +```ruby +def reset +``` + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 797. + +*** + +### to\_h + +#### Signature + +```ruby +def to_h +``` + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 954. + +*** + +### validate! + +Validate the full configuration. Raises ArgumentError on problems. + +#### Signature + +```ruby +def validate! +``` + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 820. + +## Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 774. diff --git a/fern/products/sdk-reference/ruby/agents/contexts/context/index.mdx b/fern/products/sdk-reference/ruby/agents/contexts/context/index.mdx new file mode 100644 index 0000000000..9992d3f2d6 --- /dev/null +++ b/fern/products/sdk-reference/ruby/agents/contexts/context/index.mdx @@ -0,0 +1,929 @@ +--- +slug: "/reference/ruby/agents/contexts/context" +title: "Context" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Contexts::Context" + parent: "SignalWire::Contexts" + module: "agents.Contexts" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb" + visibility: "public" +--- +# `Context` + +Represents a single context containing multiple steps. + +## Signature + +```ruby +class Context < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### \_initial\_step + +#### Signature + +```ruby +def _initial_step +``` + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 709. + +*** + +### \_step\_order + +#### Signature + +```ruby +def _step_order +``` + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 708. + +*** + +### add\_bullets + +Add a POM section with bullets to the context prompt. + +#### Signature + +```ruby +def add_bullets(title, bullets) +``` + +#### Parameters + + + + + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 568. + +*** + +### add\_enter\_filler + +#### Signature + +```ruby +def add_enter_filler(lang_code, fillers) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 601. + +*** + +### add\_exit\_filler + +#### Signature + +```ruby +def add_exit_filler(lang_code, fillers) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 609. + +*** + +### add\_section + +Add a POM section to the context prompt. + +#### Signature + +```ruby +def add_section(title, body) +``` + +#### Parameters + + + + + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 560. + +*** + +### add\_step + +Add a new step. Returns the new Step object (not self). + +Python parity: `Context.add_step(name, *, task=None, bullets=None, +criteria=None, functions=None, valid_steps=None)`. The optional +keyword arguments give a one-call configuration shortcut: + +ctx.add\_step("greet", +task: "Greet the caller", +bullets: \["Say hi", "Ask how can I help"], +criteria: "User has been greeted", +functions: \["weather"], +valid\_steps: \["help"]) + +Without the optional args this stays the bare `add_step("greet")` +form that returns a Step for further fluent configuration. + +#### Signature + +```ruby +def add_step(name, task: nil, bullets: nil, criteria: nil, functions: nil, valid_steps: nil) +``` + +#### Parameters + + + + + + + + + + + + + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 440. + +*** + +### add\_system\_bullets + +Add a POM section with bullets to the system prompt. + +#### Signature + +```ruby +def add_system_bullets(title, bullets) +``` + +#### Parameters + + + + + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 584. + +*** + +### add\_system\_section + +Add a POM section to the system prompt. + +#### Signature + +```ruby +def add_system_section(title, body) +``` + +#### Parameters + + + + + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 576. + +*** + +### consolidate= + +#### Signature + +```ruby +def consolidate=(v) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 681. + +*** + +### enter\_fillers= + +#### Signature + +```ruby +def enter_fillers=(v) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 697. + +*** + +### exit\_fillers= + +#### Signature + +```ruby +def exit_fillers=(v) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 701. + +*** + +### full\_reset= + +#### Signature + +```ruby +def full_reset=(v) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 685. + +*** + +### get\_step + +Get an existing step by name. Returns Step or nil. + +#### Signature + +```ruby +def get_step(name) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 459. + +*** + +### initial\_step= + +\--- Idiomatic Ruby accessors (additive aliases over the get\_/set\_ originals) --- + +Writers use the block `def x=(v); set_x(v); end` form so the RHS is +returned (Ruby `=` semantics), not `self`. The chainable `set_*` +originals stay available and untouched. + +Skipped: get\_step / get\_context (take a required `name` arg — lookups, +not bare accessors). + +#### Signature + +```ruby +def initial_step=(v) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 657. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(name) +``` + +#### Parameters + + + +#### Returns + +`Context` — a new instance of Context + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 397. + +*** + +### isolated= + +#### Signature + +```ruby +def isolated=(v) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 693. + +*** + +### move\_step + +Move an existing step to a specific position. Returns self. + +#### Signature + +```ruby +def move_step(name, position) +``` + +#### Parameters + + + + + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 473. + +*** + +### name + +Returns the value of attribute name. + +#### Signature + +```ruby +attr_reader name -> Object +``` + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 395. + +*** + +### post\_prompt= + +#### Signature + +```ruby +def post_prompt=(v) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 669. + +*** + +### prompt= + +#### Signature + +```ruby +def prompt=(v) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 677. + +*** + +### remove\_step + +Remove a step by name. Returns self. + +#### Signature + +```ruby +def remove_step(name) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 464. + +*** + +### set\_consolidate + +#### Signature + +```ruby +def set_consolidate(val) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 521. + +*** + +### set\_enter\_fillers + +#### Signature + +```ruby +def set_enter_fillers(fillers) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 591. + +*** + +### set\_exit\_fillers + +#### Signature + +```ruby +def set_exit_fillers(fillers) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 596. + +*** + +### set\_full\_reset + +#### Signature + +```ruby +def set_full_reset(val) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 526. + +*** + +### set\_initial\_step + +Set which step the context starts on when entered. + +By default, a context starts on its first step (index 0). Use +this to skip a preamble step on re-entry via +change\_context+. + +#### Signature + +```ruby +def set_initial_step(step_name) +``` + +#### Parameters + + + name of the step to start on. + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 487. + +*** + +### set\_isolated + +Mark this context as isolated — entering it wipes conversation +history. + +When +val+ = true and the context is entered via change\_context, +the runtime wipes the conversation array. The model starts +fresh with only the new context's system\_prompt + step +instructions, with no memory of prior turns. + +EXCEPTION — reset overrides the wipe: +If the context also has a reset configuration (via ++set\_consolidate+ or +set\_full\_reset+), the wipe is skipped in +favor of the reset behavior. Use reset with consolidate=true +to summarize prior history into a single message instead of +dropping it entirely. + +Use cases: switching to a sensitive billing flow that should +not see prior small-talk; handing off to a different agent +persona; resetting after a long off-topic detour. + +#### Signature + +```ruby +def set_isolated(val) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 554. + +*** + +### set\_post\_prompt + +#### Signature + +```ruby +def set_post_prompt(prompt) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 502. + +*** + +### set\_prompt + +#### Signature + +```ruby +def set_prompt(prompt) +``` + +#### Parameters + + + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 514. + +*** + +### set\_system\_prompt + +#### Signature + +```ruby +def set_system_prompt(prompt) +``` + +#### Parameters + + + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 507. + +*** + +### set\_user\_prompt + +#### Signature + +```ruby +def set_user_prompt(prompt) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 531. + +*** + +### set\_valid\_contexts + +#### Signature + +```ruby +def set_valid_contexts(contexts) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 492. + +*** + +### set\_valid\_steps + +#### Signature + +```ruby +def set_valid_steps(steps) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 497. + +*** + +### system\_prompt= + +#### Signature + +```ruby +def system_prompt=(v) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 673. + +*** + +### to\_h + +#### Signature + +```ruby +def to_h +``` + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 617. + +*** + +### user\_prompt= + +#### Signature + +```ruby +def user_prompt=(v) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 689. + +*** + +### valid\_contexts= + +#### Signature + +```ruby +def valid_contexts=(v) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 661. + +*** + +### valid\_steps= + +#### Signature + +```ruby +def valid_steps=(v) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 665. + +## Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 394. diff --git a/fern/products/sdk-reference/ruby/agents/contexts/gather-info/index.mdx b/fern/products/sdk-reference/ruby/agents/contexts/gather-info/index.mdx new file mode 100644 index 0000000000..e09f1884c9 --- /dev/null +++ b/fern/products/sdk-reference/ruby/agents/contexts/gather-info/index.mdx @@ -0,0 +1,252 @@ +--- +slug: "/reference/ruby/agents/contexts/gather-info" +title: "GatherInfo" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Contexts::GatherInfo" + parent: "SignalWire::Contexts" + module: "agents.Contexts" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb" + visibility: "public" +--- +# `GatherInfo` + +Configuration for gathering information in a step via the C-side gather\_info system. + +## Signature + +```ruby +class GatherInfo < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### add\_question + +Add a question. Returns +self+ for chaining. + +#### Signature + +```ruby +def add_question(key:, question:, **opts) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 63. + +*** + +### completion\_action + +Returns the value of attribute completion\_action. + +#### Signature + +```ruby +attr_accessor completion_action <-> Object +``` + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 52. + +*** + +### completion\_action= + +Sets the attribute completion\_action + +#### Signature + +```ruby +attr_accessor completion_action= <-> Object +``` + +#### Parameters + + + the value to set the attribute completion\_action to. + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 52. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(output_key: nil, completion_action: nil, prompt: nil) +``` + +#### Parameters + + + + + + + +#### Returns + +`GatherInfo` — a new instance of GatherInfo + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 55. + +*** + +### output\_key + +Returns the value of attribute output\_key. + +#### Signature + +```ruby +attr_accessor output_key <-> Object +``` + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 52. + +*** + +### output\_key= + +Sets the attribute output\_key + +#### Signature + +```ruby +attr_accessor output_key= <-> Object +``` + +#### Parameters + + + the value to set the attribute output\_key to. + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 52. + +*** + +### prompt + +Returns the value of attribute prompt. + +#### Signature + +```ruby +attr_accessor prompt <-> Object +``` + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 52. + +*** + +### prompt= + +Sets the attribute prompt + +#### Signature + +```ruby +attr_accessor prompt= <-> Object +``` + +#### Parameters + + + the value to set the attribute prompt to. + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 52. + +*** + +### questions + +Returns the value of attribute questions. + +#### Signature + +```ruby +attr_reader questions -> Object +``` + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 53. + +*** + +### to\_h + +#### Signature + +```ruby +def to_h +``` + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 75. + +## Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 51. diff --git a/fern/products/sdk-reference/ruby/agents/contexts/gather-question/index.mdx b/fern/products/sdk-reference/ruby/agents/contexts/gather-question/index.mdx new file mode 100644 index 0000000000..fe809ea356 --- /dev/null +++ b/fern/products/sdk-reference/ruby/agents/contexts/gather-question/index.mdx @@ -0,0 +1,336 @@ +--- +slug: "/reference/ruby/agents/contexts/gather-question" +title: "GatherQuestion" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Contexts::GatherQuestion" + parent: "SignalWire::Contexts" + module: "agents.Contexts" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb" + visibility: "public" +--- +# `GatherQuestion` + +Represents a single question in a gather\_info configuration. + +## Signature + +```ruby +class GatherQuestion < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### confirm + +Returns the value of attribute confirm. + +#### Signature + +```ruby +attr_accessor confirm <-> Object +``` + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 29. + +*** + +### confirm= + +Sets the attribute confirm + +#### Signature + +```ruby +attr_accessor confirm= <-> Object +``` + +#### Parameters + + + the value to set the attribute confirm to. + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 29. + +*** + +### functions + +Returns the value of attribute functions. + +#### Signature + +```ruby +attr_accessor functions <-> Object +``` + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 29. + +*** + +### functions= + +Sets the attribute functions + +#### Signature + +```ruby +attr_accessor functions= <-> Object +``` + +#### Parameters + + + the value to set the attribute functions to. + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 29. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(key:, question:, type: 'string', confirm: false, prompt: nil, functions: nil) +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`GatherQuestion` — a new instance of GatherQuestion + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 31. + +*** + +### key + +Returns the value of attribute key. + +#### Signature + +```ruby +attr_accessor key <-> Object +``` + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 29. + +*** + +### key= + +Sets the attribute key + +#### Signature + +```ruby +attr_accessor key= <-> Object +``` + +#### Parameters + + + the value to set the attribute key to. + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 29. + +*** + +### prompt + +Returns the value of attribute prompt. + +#### Signature + +```ruby +attr_accessor prompt <-> Object +``` + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 29. + +*** + +### prompt= + +Sets the attribute prompt + +#### Signature + +```ruby +attr_accessor prompt= <-> Object +``` + +#### Parameters + + + the value to set the attribute prompt to. + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 29. + +*** + +### question + +Returns the value of attribute question. + +#### Signature + +```ruby +attr_accessor question <-> Object +``` + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 29. + +*** + +### question= + +Sets the attribute question + +#### Signature + +```ruby +attr_accessor question= <-> Object +``` + +#### Parameters + + + the value to set the attribute question to. + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 29. + +*** + +### to\_h + +#### Signature + +```ruby +def to_h +``` + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 40. + +*** + +### type + +Returns the value of attribute type. + +#### Signature + +```ruby +attr_accessor type <-> Object +``` + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 29. + +*** + +### type= + +Sets the attribute type + +#### Signature + +```ruby +attr_accessor type= <-> Object +``` + +#### Parameters + + + the value to set the attribute type to. + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 29. + +## Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 28. diff --git a/fern/products/sdk-reference/ruby/agents/contexts/index.mdx b/fern/products/sdk-reference/ruby/agents/contexts/index.mdx new file mode 100644 index 0000000000..d0f83f86ea --- /dev/null +++ b/fern/products/sdk-reference/ruby/agents/contexts/index.mdx @@ -0,0 +1,84 @@ +--- +slug: "/reference/ruby/agents/contexts" +title: "Contexts" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "module" + language: "ruby" + qualified_name: "SignalWire::Contexts" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb" + visibility: "public" +--- +# `Contexts` + +## Signature + +```ruby +module Contexts +``` + +## Constants + + + + + + + Reserved tool names auto-injected by the runtime when contexts/steps are present. User-defined SWAIG tools must not collide with these names. ContextBuilder#validate! rejects any agent that registers a user tool sharing one of these names — the runtime would never call the user tool because the native one wins. + + +## Classes + + + + Represents a single context containing multiple steps. + + + + Builder for multi-step, multi-context AI agent workflows. + + + + Configuration for gathering information in a step via the C-side gather\_info system. + + + + Represents a single question in a gather\_info configuration. + + + + Represents a single step within a context. + + + +## Methods + +### create\_simple\_context + +Helper to create a standalone context (not via ContextBuilder). + +#### Signature + +```ruby +def create_simple_context(name = 'default') +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 965. + +## Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 9. diff --git a/fern/products/sdk-reference/ruby/agents/contexts/step/index.mdx b/fern/products/sdk-reference/ruby/agents/contexts/step/index.mdx new file mode 100644 index 0000000000..3c19b9f1ab --- /dev/null +++ b/fern/products/sdk-reference/ruby/agents/contexts/step/index.mdx @@ -0,0 +1,772 @@ +--- +slug: "/reference/ruby/agents/contexts/step" +title: "Step" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Contexts::Step" + parent: "SignalWire::Contexts" + module: "agents.Contexts" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb" + visibility: "public" +--- +# `Step` + +Represents a single step within a context. + +All mutator methods return +self+ for fluent chaining. + +## Signature + +```ruby +class Step < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### add\_bullets + +Add a POM section with bullet points. Mutually exclusive with +set\_text+. + +#### Signature + +```ruby +def add_bullets(title, bullets) +``` + +#### Parameters + + + + + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 131. + +*** + +### add\_gather\_question + +Add a question to this step's gather\_info configuration. ++set\_gather\_info+ must be called first. + +IMPORTANT — gather mode locks function access: +While the model is asking gather questions, the runtime +forcibly deactivates ALL of the step's other functions. The +only callable tools during a gather question are: + +``` +- +gather_submit+ (the native answer-submission tool) +- Whatever names you pass in this question's +functions:+ + option +``` + ++next\_step+ and +change\_context+ are also filtered out — the +model cannot navigate away until the gather completes. This +is by design: it forces a tight ask → submit → next-question +loop. + +If a question needs to call out to a tool (e.g. validate an +email, geocode a ZIP), pass that tool name in this question's ++functions:+ option. Functions listed here are active ONLY for +this question. +Python parity: `add_gather_question(key, question, type='string', +confirm=False, prompt=None, functions=None)`. Ruby exposes the +same parameter set as keyword args. + +#### Signature + +```ruby +def add_gather_question(key:, question:, type: 'string', confirm: false, prompt: nil, functions: nil) +``` + +#### Parameters + + + + + + + + + + + + + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 251. + +*** + +### add\_section + +Add a POM section (title + body). Mutually exclusive with +set\_text+. + +#### Signature + +```ruby +def add_section(title, body) +``` + +#### Parameters + + + + + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 123. + +*** + +### clear\_sections + +Remove all POM sections and direct text. + +#### Signature + +```ruby +def clear_sections +``` + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 267. + +*** + +### functions= + +#### Signature + +```ruby +def functions=(v) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 335. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(name) +``` + +#### Parameters + + + +#### Returns + +`Step` — a new instance of Step + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 92. + +*** + +### name + +Returns the value of attribute name. + +#### Signature + +```ruby +attr_reader name -> Object +``` + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 90. + +*** + +### reset\_consolidate= + +#### Signature + +```ruby +def reset_consolidate=(v) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 363. + +*** + +### reset\_full\_reset= + +#### Signature + +```ruby +def reset_full_reset=(v) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 367. + +*** + +### reset\_system\_prompt= + +#### Signature + +```ruby +def reset_system_prompt=(v) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 355. + +*** + +### reset\_user\_prompt= + +#### Signature + +```ruby +def reset_user_prompt=(v) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 359. + +*** + +### set\_end + +Mark this step as terminal for the step flow. + +IMPORTANT: +is\_end+ = true does NOT end the conversation or hang +up the call. It exits step mode entirely after this step +executes — clearing the steps list, current step index, +valid\_steps, and valid\_contexts. The agent keeps running, but +operates only under the base system prompt and the +context-level prompt; no more step instructions are injected +and no more +next\_step+ tool is offered. + +To actually end the call, call a hangup tool or define a +hangup hook. + +#### Signature + +```ruby +def set_end(is_end) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 201. + +*** + +### set\_functions + +Set which non-internal functions are callable while this step is +active. + +IMPORTANT — inheritance behavior: +If you do NOT call this method, the step inherits whichever +function set was active on the previous step (or the previous +context's last step). The server-side runtime only resets the +active set when a step explicitly declares its +functions+ +field. This is the most common source of bugs in multi-step +agents: forgetting +set\_functions+ on a later step lets the +previous step's tools leak through. Best practice is to call ++set\_functions+ explicitly on every step that should differ +from the previous one. + +Keep the per-step active set small: LLM tool selection accuracy +degrades noticeably past ~7-8 simultaneously-active tools per +call. Use per-step whitelisting to partition large tool +collections. + +Internal functions (e.g. +gather\_submit+, hangup hook) are +ALWAYS protected and cannot be deactivated by this whitelist. +The native navigation tools +next\_step+ and +change\_context+ are +injected automatically when +set\_valid\_steps+/+set\_valid\_contexts+ +is used; they are not affected by this list and do not need to +appear in it. + +#### Signature + +```ruby +def set_functions(functions) +``` + +#### Parameters + + + one of: + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 174. + +*** + +### set\_gather\_info + +Enable info gathering for this step. Returns +self+. +After calling this, use +add\_gather\_question+ to define questions. + +#### Signature + +```ruby +def set_gather_info(output_key: nil, completion_action: nil, prompt: nil) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 218. + +*** + +### set\_reset\_consolidate + +#### Signature + +```ruby +def set_reset_consolidate(val) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 283. + +*** + +### set\_reset\_full\_reset + +#### Signature + +```ruby +def set_reset_full_reset(val) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 288. + +*** + +### set\_reset\_system\_prompt + +#### Signature + +```ruby +def set_reset_system_prompt(prompt) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 273. + +*** + +### set\_reset\_user\_prompt + +#### Signature + +```ruby +def set_reset_user_prompt(prompt) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 278. + +*** + +### set\_skip\_to\_next\_step + +#### Signature + +```ruby +def set_skip_to_next_step(skip) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 211. + +*** + +### set\_skip\_user\_turn + +#### Signature + +```ruby +def set_skip_user_turn(skip) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 206. + +*** + +### set\_step\_criteria + +#### Signature + +```ruby +def set_step_criteria(criteria) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 138. + +*** + +### set\_text + +Set the step's prompt text directly. Mutually exclusive with POM sections. + +#### Signature + +```ruby +def set_text(text) +``` + +#### Parameters + + + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 115. + +*** + +### set\_valid\_contexts + +#### Signature + +```ruby +def set_valid_contexts(contexts) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 184. + +*** + +### set\_valid\_steps + +#### Signature + +```ruby +def set_valid_steps(steps) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 179. + +*** + +### skip\_to\_next\_step= + +#### Signature + +```ruby +def skip_to_next_step=(v) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 351. + +*** + +### skip\_user\_turn= + +#### Signature + +```ruby +def skip_user_turn=(v) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 347. + +*** + +### step\_criteria= + +#### Signature + +```ruby +def step_criteria=(v) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 331. + +*** + +### text= + +\--- Idiomatic Ruby accessors (additive aliases over the get\_/set\_ originals) --- + +Writers use the block `def x=(v); set_x(v); end` form so the RHS is +returned (Ruby `=` semantics), not `self`. The chainable `set_*` +originals stay available and untouched. + +Skipped: set\_end (`end=` is a Ruby keyword, illegal method name); +set\_gather\_info (keyword args, not a single-value setter). + +#### Signature + +```ruby +def text=(v) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 327. + +*** + +### to\_h + +#### Signature + +```ruby +def to_h +``` + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 293. + +*** + +### valid\_contexts= + +#### Signature + +```ruby +def valid_contexts=(v) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 343. + +*** + +### valid\_steps= + +#### Signature + +```ruby +def valid_steps=(v) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 339. + +## Source + +[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) + +Line 89. diff --git a/fern/products/sdk-reference/ruby/agents/data-map/index.mdx b/fern/products/sdk-reference/ruby/agents/data-map/index.mdx new file mode 100644 index 0000000000..0e35bc2915 --- /dev/null +++ b/fern/products/sdk-reference/ruby/agents/data-map/index.mdx @@ -0,0 +1,561 @@ +--- +slug: "/reference/ruby/agents/data-map" +title: "DataMap" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::DataMap" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/datamap/data_map.rb" + visibility: "public" +--- +# `DataMap` + +Fluent builder for server-side DataMap tools. + +DataMap tools execute on SignalWire servers without requiring webhook +endpoints. This class provides a chainable API for building data\_map +configurations that become SWAIG function definitions. + +All mutator methods return +self+ so calls can be chained: + +dm = DataMap.new('get\_weather') +.purpose('Get current weather') +.parameter('location', 'string', 'City name', required: true) +.webhook('GET', 'https://api.weather.com/v1/current?q=$\{location\}') +.output(Swaig::FunctionResult.new('Weather: $\{response.current.temp\_f\}F')) + +## Signature + +```ruby +class DataMap < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### body + +Set the request body for the most-recently-added webhook (POST / PUT). + +#### Signature + +```ruby +def body(data) +``` + +#### Parameters + + + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/datamap/data_map.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/datamap/data_map.rb) + +Line 156. + +*** + +### create\_expression\_tool + +Build an expression-only tool (no HTTP calls). + +#### Signature + +```ruby +def create_expression_tool(name:, patterns:, parameters: nil) +``` + +#### Parameters + + + + + + + +#### Returns + +`DataMap` + +#### Source + +[`lib/signalwire/datamap/data_map.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/datamap/data_map.rb) + +Line 294. + +*** + +### create\_simple\_api\_tool + +Build a simple API-calling tool in one shot. + +#### Signature + +```ruby +def create_simple_api_tool(name:, url:, response_template:, parameters: nil, method: 'GET', headers: nil, body: nil, error_keys: nil) +``` + +#### Parameters + + + + + + + + + + + + + + + + + +#### Returns + +`DataMap` + +#### Source + +[`lib/signalwire/datamap/data_map.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/datamap/data_map.rb) + +Line 266. + +*** + +### description + +Alias for +purpose+. Sets the LLM-facing tool description. This +string is read by the model to decide WHEN to call this tool. +See +purpose+ for bad-vs-good examples. + +#### Signature + +```ruby +def description(desc) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/datamap/data_map.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/datamap/data_map.rb) + +Line 64. + +*** + +### error\_keys + +Set error keys on the most-recently-added webhook, or at the top level +if no webhook has been added yet. + +#### Signature + +```ruby +def error_keys(keys) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/datamap/data_map.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/datamap/data_map.rb) + +Line 206. + +*** + +### expression + +Add an expression (pattern-matching rule). + +#### Signature + +```ruby +def expression(test_value, pattern, output, nomatch_output: nil) +``` + +#### Parameters + + + template string to test, e.g. "$\{args.command\}" + + + + regex pattern to match against + + + + result when pattern matches + + + + +#### Source + +[`lib/signalwire/datamap/data_map.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/datamap/data_map.rb) + +Line 107. + +*** + +### fallback\_output + +Set a fallback output used when all webhooks fail. + +#### Signature + +```ruby +def fallback_output(result) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/datamap/data_map.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/datamap/data_map.rb) + +Line 199. + +*** + +### foreach + +Configure array processing on the most-recently-added webhook response. + +#### Signature + +```ruby +def foreach(config) +``` + +#### Parameters + + + must include keys: input\_key, output\_key, append. Optional: max. + + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/datamap/data_map.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/datamap/data_map.rb) + +Line 174. + +*** + +### function\_name + +Returns the value of attribute function\_name. + +#### Signature + +```ruby +attr_reader function_name -> Object +``` + +#### Source + +[`lib/signalwire/datamap/data_map.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/datamap/data_map.rb) + +Line 26. + +*** + +### global\_error\_keys + +Set top-level error keys (applies to all webhooks). + +#### Signature + +```ruby +def global_error_keys(keys) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/datamap/data_map.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/datamap/data_map.rb) + +Line 216. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(function_name) +``` + +#### Parameters + + + +#### Returns + +`DataMap` — a new instance of DataMap + +#### Source + +[`lib/signalwire/datamap/data_map.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/datamap/data_map.rb) + +Line 28. + +*** + +### output + +Set the output result for the most-recently-added webhook. + +#### Signature + +```ruby +def output(result) +``` + +#### Parameters + + + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/datamap/data_map.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/datamap/data_map.rb) + +Line 189. + +*** + +### parameter + +Add a typed parameter to the function signature — the +desc+ is +LLM-FACING. + +Each parameter description is rendered into the OpenAI tool +schema under +parameters.properties.<name>.description+ and sent +to the model. The model uses it to decide HOW to fill in the +argument from user speech. It is prompt engineering, not +developer FYI. + +\== Bad vs good + +BAD : .parameter("city", "string", "the city") +GOOD: .parameter("city", "string", +"The name of the city to get weather for, e.g. " \ +"'San Francisco'. Ask the user if they did not " \ +"provide one. Include the state or country if the " \ +"city name is ambiguous.") + +#### Signature + +```ruby +def parameter(name, type, desc, required: false, enum: nil) +``` + +#### Parameters + + + + + JSON-Schema type (string, number, boolean, array, object) + + + + LLM-facing prompt-engineering description telling the model how to extract this value from the user's utterance + + + + + + +#### Source + +[`lib/signalwire/datamap/data_map.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/datamap/data_map.rb) + +Line 93. + +*** + +### params + +Set request params for the most-recently-added webhook. + +#### Signature + +```ruby +def params(data) +``` + +#### Parameters + + + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/datamap/data_map.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/datamap/data_map.rb) + +Line 164. + +*** + +### purpose + +Set the LLM-facing tool description (a.k.a. "purpose"). _PROMPT +ENGINEERING_, not developer documentation. + +The description string is rendered into the OpenAI tool schema ++description+ field on every LLM turn. The model reads it to +decide WHEN to call this tool. A vague +purpose+ is the #1 cause +of "the model has the right tool but doesn't call it" failures +with data-map tools. + +\== Bad vs good + +BAD : .purpose("weather api") +GOOD: .purpose("Get the current weather conditions and " \ +"forecast for a specific city. Use this " \ +"whenever the user asks about weather, " \ +"temperature, rain, or similar conditions in a " \ +"named location.") + +#### Signature + +```ruby +def purpose(desc) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/datamap/data_map.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/datamap/data_map.rb) + +Line 56. + +*** + +### to\_swaig\_function + +Serialize this DataMap into a complete SWAIG function definition Hash. + +#### Signature + +```ruby +def to_swaig_function +``` + +#### Returns + +`Hash` — with keys: "function", "description", "parameters", "data\_map" + +#### Source + +[`lib/signalwire/datamap/data_map.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/datamap/data_map.rb) + +Line 224. + +*** + +### webhook + +Add a webhook (HTTP call) to the data\_map pipeline. + +#### Signature + +```ruby +def webhook(method, url, headers: nil, form_param: nil, input_args_as_params: false, require_args: nil) +``` + +#### Parameters + + + HTTP method (GET, POST, PUT, DELETE, etc.) + + + + endpoint URL (may contain $\{variable\} substitutions) + + + + + + + + + + +#### Source + +[`lib/signalwire/datamap/data_map.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/datamap/data_map.rb) + +Line 134. + +*** + +### webhook\_expressions + +Add expressions to run after the most-recently-added webhook completes. + +#### Signature + +```ruby +def webhook_expressions(expressions) +``` + +#### Parameters + + + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/datamap/data_map.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/datamap/data_map.rb) + +Line 148. + +## Source + +[`lib/signalwire/datamap/data_map.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/datamap/data_map.rb) + +Line 25. diff --git a/fern/products/sdk-reference/ruby/agents/index.mdx b/fern/products/sdk-reference/ruby/agents/index.mdx new file mode 100644 index 0000000000..7b93923a7a --- /dev/null +++ b/fern/products/sdk-reference/ruby/agents/index.mdx @@ -0,0 +1,52 @@ +--- +slug: "/reference/ruby/agents" +title: "agents" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "module" + language: "ruby" + qualified_name: "agents" +--- +# `agents` + +## Classes + + + + Central agent class that composes SWML rendering, tool dispatch, prompt management, AI config, and HTTP serving. + + + + Multi-agent hosting on a single Rack application. + + + + Fluent builder for server-side DataMap tools. + + + +## Modules + + + + + + + + + + + + Runtime environment detection. + + + + + + + + + + diff --git a/fern/products/sdk-reference/ruby/agents/pom/index.mdx b/fern/products/sdk-reference/ruby/agents/pom/index.mdx new file mode 100644 index 0000000000..99cfad1baf --- /dev/null +++ b/fern/products/sdk-reference/ruby/agents/pom/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/ruby/agents/pom" +title: "POM" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "module" + language: "ruby" + qualified_name: "SignalWire::POM" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/section.rb" + visibility: "public" +--- +# `POM` + +## Signature + +```ruby +module POM +``` + +## Classes + + + + A structured data format for composing, organising, and rendering prompt instructions for large language models. + + + + Represents a section in the Prompt Object Model. + + + +## Source + +[`lib/signalwire/pom/section.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/section.rb) + +Line 4. diff --git a/fern/products/sdk-reference/ruby/agents/pom/prompt-object-model/index.mdx b/fern/products/sdk-reference/ruby/agents/pom/prompt-object-model/index.mdx new file mode 100644 index 0000000000..b888166751 --- /dev/null +++ b/fern/products/sdk-reference/ruby/agents/pom/prompt-object-model/index.mdx @@ -0,0 +1,446 @@ +--- +slug: "/reference/ruby/agents/pom/prompt-object-model" +title: "PromptObjectModel" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::POM::PromptObjectModel" + parent: "SignalWire::POM" + module: "agents.POM" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/prompt_object_model.rb" + visibility: "public" +--- +# `PromptObjectModel` + +A structured data format for composing, organising, and rendering +prompt instructions for large language models. + +The Prompt Object Model provides a tree-based representation of a +prompt document composed of nested Section objects, each of which +can include a title, body text, bullet points, and arbitrarily +nested subsections. + +Mirrors Python's `signalwire.pom.pom.PromptObjectModel`. The +rendered output (Markdown / XML / JSON / YAML) is byte-for-byte +identical to the Python reference so cross-language POM documents +interoperate. + +## Signature + +```ruby +class PromptObjectModel < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### \_build\_section + +Internal: build a Section (recursively) from a Hash section +descriptor. Mirrors Python's `build_section` inner helper. + +#### Signature + +```ruby +def _build_section(hash, is_subsection: false) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/pom/prompt_object_model.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/prompt_object_model.rb) + +Line 71. + +*** + +### \_from\_array + +Internal: build a PromptObjectModel from a raw Array of Hash +section descriptors. Mirrors Python's `_from_dict` (which +confusingly takes a list, not a dict). + +#### Signature + +```ruby +def _from_array(data) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/pom/prompt_object_model.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/prompt_object_model.rb) + +Line 53. + +*** + +### add\_pom\_as\_subsection + +Add another PromptObjectModel as a subsection of an existing +section identified either by title or by Section reference. + +Mirrors Python's +`PromptObjectModel.add_pom_as_subsection(target, pom_to_add)`. + +#### Signature + +```ruby +def add_pom_as_subsection(target, pom_to_add) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/pom/prompt_object_model.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/prompt_object_model.rb) + +Line 252. + +*** + +### add\_section + +Add a top-level section to the model and return the new Section. + +Mirrors Python's `PromptObjectModel.add_section`. If +bullets+ +is a String it is wrapped into a single-element Array (Python +parity). Raises ArgumentError when +title+ is nil and the model +already has at least one section (only the first section may +be untitled). + +#### Signature + +```ruby +def add_section(title = nil, body: '', bullets: nil, numbered: nil, numbered_bullets: false) +``` + +#### Parameters + + + + + + + + + + + +#### Source + +[`lib/signalwire/pom/prompt_object_model.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/prompt_object_model.rb) + +Line 126. + +*** + +### debug + +Returns the value of attribute debug. + +#### Signature + +```ruby +attr_accessor debug <-> Object +``` + +#### Source + +[`lib/signalwire/pom/prompt_object_model.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/prompt_object_model.rb) + +Line 23. + +*** + +### debug= + +Sets the attribute debug + +#### Signature + +```ruby +attr_accessor debug= <-> Object +``` + +#### Parameters + + + the value to set the attribute debug to. + + +#### Source + +[`lib/signalwire/pom/prompt_object_model.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/prompt_object_model.rb) + +Line 23. + +*** + +### find\_section + +Find a section by title, recursing into subsections. Returns ++nil+ when the title is not present anywhere in the tree. + +#### Signature + +```ruby +def find_section(title) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/pom/prompt_object_model.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/prompt_object_model.rb) + +Line 141. + +*** + +### from\_json + +Build a PromptObjectModel from JSON. + ++json\_data+ may be either a JSON string or an already-parsed +Array. Mirrors Python's +`PromptObjectModel.from_json(json_data: Union[str, dict])`. + +#### Signature + +```ruby +def from_json(json_data) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/pom/prompt_object_model.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/prompt_object_model.rb) + +Line 35. + +*** + +### from\_yaml + +Build a PromptObjectModel from YAML. + ++yaml\_data+ may be either a YAML string or an already-parsed +Array. Mirrors Python's +`PromptObjectModel.from_yaml(yaml_data: Union[str, dict])`. + +#### Signature + +```ruby +def from_yaml(yaml_data) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/pom/prompt_object_model.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/prompt_object_model.rb) + +Line 45. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(debug: false) +``` + +#### Parameters + + + +#### Returns + +`PromptObjectModel` — a new instance of PromptObjectModel + +#### Source + +[`lib/signalwire/pom/prompt_object_model.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/prompt_object_model.rb) + +Line 25. + +*** + +### render\_markdown + +Render the entire model as Markdown. Output is byte-for-byte +identical to Python's `PromptObjectModel.render_markdown`. + +#### Signature + +```ruby +def render_markdown +``` + +#### Source + +[`lib/signalwire/pom/prompt_object_model.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/prompt_object_model.rb) + +Line 185. + +*** + +### render\_xml + +Render the entire model as XML. Output is byte-for-byte identical +to Python's `PromptObjectModel.render_xml`. + +#### Signature + +```ruby +def render_xml +``` + +#### Source + +[`lib/signalwire/pom/prompt_object_model.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/prompt_object_model.rb) + +Line 222. + +*** + +### sections + +Returns the value of attribute sections. + +#### Signature + +```ruby +attr_accessor sections <-> Object +``` + +#### Source + +[`lib/signalwire/pom/prompt_object_model.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/prompt_object_model.rb) + +Line 23. + +*** + +### sections= + +Sets the attribute sections + +#### Signature + +```ruby +attr_accessor sections= <-> Object +``` + +#### Parameters + + + the value to set the attribute sections to. + + +#### Source + +[`lib/signalwire/pom/prompt_object_model.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/prompt_object_model.rb) + +Line 23. + +*** + +### to\_h + +Convert the model to an Array of Hash section descriptors. +Mirrors Python's `PromptObjectModel.to_dict` (Ruby idiom uses +`to_h`). + +#### Signature + +```ruby +def to_h +``` + +#### Source + +[`lib/signalwire/pom/prompt_object_model.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/prompt_object_model.rb) + +Line 179. + +*** + +### to\_json + +Convert the model to a JSON string. Output matches Python's +`json.dumps(..., indent=2)` byte-for-byte, with one +special case: an empty model serializes to `"[]"` (Ruby's +default `JSON.pretty_generate([])` emits `"[\n\n]"`). + +#### Signature + +```ruby +def to_json(*_args) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/pom/prompt_object_model.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/prompt_object_model.rb) + +Line 158. + +*** + +### to\_yaml + +Convert the model to a YAML string. Output matches Python's +`yaml.dump(..., default_flow_style=False, sort_keys=False)` +byte-for-byte. Ruby's `YAML.dump` prepends `---\n`; we strip +it. The empty-list case (Ruby emits `--- []\n`) is normalised +to Python's `[]\n`. + +#### Signature + +```ruby +def to_yaml +``` + +#### Source + +[`lib/signalwire/pom/prompt_object_model.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/prompt_object_model.rb) + +Line 169. + +## Source + +[`lib/signalwire/pom/prompt_object_model.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/prompt_object_model.rb) + +Line 22. diff --git a/fern/products/sdk-reference/ruby/agents/pom/section/index.mdx b/fern/products/sdk-reference/ruby/agents/pom/section/index.mdx new file mode 100644 index 0000000000..9cd48f7eff --- /dev/null +++ b/fern/products/sdk-reference/ruby/agents/pom/section/index.mdx @@ -0,0 +1,499 @@ +--- +slug: "/reference/ruby/agents/pom/section" +title: "Section" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::POM::Section" + parent: "SignalWire::POM" + module: "agents.POM" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/section.rb" + visibility: "public" +--- +# `Section` + +Represents a section in the Prompt Object Model. + +Each section contains a title, optional body text, optional bullet +points, and can have any number of nested subsections. + +Mirrors Python's `signalwire.pom.pom.Section` exactly. See +`signalwire-python/signalwire/signalwire/pom/pom.py` for the +source-of-truth specification; rendering output (markdown / XML / +JSON / YAML) must match Python byte-for-byte so cross-language POM +documents are interoperable. + +Attributes: + +- +title+ — the name of the section. +- +body+ — a paragraph of text associated with the section. +- +bullets+ — bullet-pointed items (Array<String>). +- +subsections+ — nested Section objects. +- +numbered+ — whether this section should be numbered. +- +numbered\_bullets+ — whether bullets should be numbered (rendered + to/from the JSON/YAML key +numberedBullets+ for Python parity). + +## Signature + +```ruby +class Section < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### add\_body + +Add or replace the body text for this section. Mirrors Python's +`Section.add_body` (which is documented to "Add or replace"). + +#### Signature + +```ruby +def add_body(body) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/pom/section.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/section.rb) + +Line 55. + +*** + +### add\_bullets + +Append bullet points to this section. Does not replace existing +bullets — mirrors Python's `self.bullets.extend(bullets)`. + +#### Signature + +```ruby +def add_bullets(bullets) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/pom/section.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/section.rb) + +Line 65. + +*** + +### add\_subsection + +Add a subsection to this section, returning the new Section. + +Raises ArgumentError when +title+ is nil (Python raises +`ValueError("Subsections must have a title")`; Ruby idiom +is ArgumentError for invalid arguments). + +#### Signature + +```ruby +def add_subsection(title, body: '', bullets: nil, numbered: false, numbered_bullets: false) +``` + +#### Parameters + + + + + + + + + + + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/pom/section.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/section.rb) + +Line 78. + +*** + +### body + +Returns the value of attribute body. + +#### Signature + +```ruby +attr_accessor body <-> Object +``` + +#### Source + +[`lib/signalwire/pom/section.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/section.rb) + +Line 25. + +*** + +### body= + +Sets the attribute body + +#### Signature + +```ruby +attr_accessor body= <-> Object +``` + +#### Parameters + + + the value to set the attribute body to. + + +#### Source + +[`lib/signalwire/pom/section.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/section.rb) + +Line 25. + +*** + +### bullets + +Returns the value of attribute bullets. + +#### Signature + +```ruby +attr_accessor bullets <-> Object +``` + +#### Source + +[`lib/signalwire/pom/section.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/section.rb) + +Line 25. + +*** + +### bullets= + +Sets the attribute bullets + +#### Signature + +```ruby +attr_accessor bullets= <-> Object +``` + +#### Parameters + + + the value to set the attribute bullets to. + + +#### Source + +[`lib/signalwire/pom/section.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/section.rb) + +Line 25. + +*** + +### initialize + +Construct a Section. + +All arguments after +title+ are keyword arguments mirroring the +Python `Section.__init__` signature. `numbered_bullets` is +snake\_case in Ruby; the camelCase `numberedBullets` form used +by Python's JSON/YAML serialization is preserved on the wire. + +#### Signature + +```ruby +def initialize(title = nil, body: '', bullets: nil, numbered: nil, numbered_bullets: false) +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`Section` — a new instance of Section + +#### Source + +[`lib/signalwire/pom/section.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/section.rb) + +Line 33. + +*** + +### numbered + +Returns the value of attribute numbered. + +#### Signature + +```ruby +attr_accessor numbered <-> Object +``` + +#### Source + +[`lib/signalwire/pom/section.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/section.rb) + +Line 25. + +*** + +### numbered\_bullets + +Returns the value of attribute numbered\_bullets. + +#### Signature + +```ruby +attr_accessor numbered_bullets <-> Object +``` + +#### Source + +[`lib/signalwire/pom/section.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/section.rb) + +Line 25. + +*** + +### numbered\_bullets= + +Sets the attribute numbered\_bullets + +#### Signature + +```ruby +attr_accessor numbered_bullets= <-> Object +``` + +#### Parameters + + + the value to set the attribute numbered\_bullets to. + + +#### Source + +[`lib/signalwire/pom/section.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/section.rb) + +Line 25. + +*** + +### numbered= + +Sets the attribute numbered + +#### Signature + +```ruby +attr_accessor numbered= <-> Object +``` + +#### Parameters + + + the value to set the attribute numbered to. + + +#### Source + +[`lib/signalwire/pom/section.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/section.rb) + +Line 25. + +*** + +### render\_markdown + +Render this section and all its subsections as Markdown. The +output is byte-for-byte identical to Python's +`Section.render_markdown`. + +#### Signature + +```ruby +def render_markdown(level: 2, section_number: nil) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/pom/section.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/section.rb) + +Line 104. + +*** + +### render\_xml + +Render this section and all its subsections as XML. Output is +byte-for-byte identical to Python's `Section.render_xml`. + +#### Signature + +```ruby +def render_xml(indent: 0, section_number: nil) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/pom/section.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/section.rb) + +Line 150. + +*** + +### subsections + +Returns the value of attribute subsections. + +#### Signature + +```ruby +attr_accessor subsections <-> Object +``` + +#### Source + +[`lib/signalwire/pom/section.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/section.rb) + +Line 25. + +*** + +### subsections= + +Sets the attribute subsections + +#### Signature + +```ruby +attr_accessor subsections= <-> Object +``` + +#### Parameters + + + the value to set the attribute subsections to. + + +#### Source + +[`lib/signalwire/pom/section.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/section.rb) + +Line 25. + +*** + +### title + +Returns the value of attribute title. + +#### Signature + +```ruby +attr_accessor title <-> Object +``` + +#### Source + +[`lib/signalwire/pom/section.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/section.rb) + +Line 25. + +*** + +### title= + +Sets the attribute title + +#### Signature + +```ruby +attr_accessor title= <-> Object +``` + +#### Parameters + + + the value to set the attribute title to. + + +#### Source + +[`lib/signalwire/pom/section.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/section.rb) + +Line 25. + +*** + +### to\_h + +Convert the section to a Hash representation suitable for JSON or +YAML serialization. Keys are emitted in the same order as Python +so cross-port string comparisons line up. + +#### Signature + +```ruby +def to_h +``` + +#### Source + +[`lib/signalwire/pom/section.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/section.rb) + +Line 90. + +## Source + +[`lib/signalwire/pom/section.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/section.rb) + +Line 24. diff --git a/fern/products/sdk-reference/ruby/agents/prefabs/concierge/index.mdx b/fern/products/sdk-reference/ruby/agents/prefabs/concierge/index.mdx new file mode 100644 index 0000000000..8fc6a865d9 --- /dev/null +++ b/fern/products/sdk-reference/ruby/agents/prefabs/concierge/index.mdx @@ -0,0 +1,368 @@ +--- +slug: "/reference/ruby/agents/prefabs/concierge" +title: "Concierge" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Prefabs::Concierge" + parent: "SignalWire::Prefabs" + module: "agents.Prefabs" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/concierge.rb" + visibility: "public" +--- +# `Concierge` + +Prefab agent for providing virtual concierge services. + +agent = Concierge.new( +venue\_name: 'Grand Hotel', +services: \['room service', 'spa bookings'], +amenities: \{ 'pool' => \{ 'hours' => '7 AM - 10 PM', 'location' => '2nd Floor' \} \} +) + +## Signature + +```ruby +class Concierge < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### amenities + +Returns the value of attribute amenities. + +#### Signature + +```ruby +attr_reader amenities -> Object +``` + +#### Source + +[`lib/signalwire/prefabs/concierge.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/concierge.rb) + +Line 23. + +*** + +### check\_availability + +Tool: check\_availability — Python parity +(signalwire.prefabs.concierge.ConciergeAgent#check\_availability). + +Simulated booking lookup: confirms availability when the requested +service is one of the venue's offered services, otherwise lists the +available services. + +#### Signature + +```ruby +def check_availability(args, _raw_data) +``` + +#### Parameters + + + expects "service", "date", "time" + + + + +#### Returns + +`Swaig::FunctionResult` + +#### Source + +[`lib/signalwire/prefabs/concierge.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/concierge.rb) + +Line 102. + +*** + +### get\_directions + +Tool: get\_directions — Python parity +(signalwire.prefabs.concierge.ConciergeAgent#get\_directions). + +Returns directions to an amenity when that amenity declares a +"location" detail, otherwise points the caller at the front desk. + +#### Signature + +```ruby +def get_directions(args, _raw_data) +``` + +#### Parameters + + + expects "location" + + + + +#### Returns + +`Swaig::FunctionResult` + +#### Source + +[`lib/signalwire/prefabs/concierge.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/concierge.rb) + +Line 128. + +*** + +### global\_data + +#### Signature + +```ruby +def global_data +``` + +#### Source + +[`lib/signalwire/prefabs/concierge.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/concierge.rb) + +Line 64. + +*** + +### handle\_amenity\_info + +#### Signature + +```ruby +def handle_amenity_info(args, _raw_data) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/prefabs/concierge.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/concierge.rb) + +Line 72. + +*** + +### handle\_service\_info + +#### Signature + +```ruby +def handle_service_info(args, _raw_data) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/prefabs/concierge.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/concierge.rb) + +Line 83. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(venue_name:, services:, amenities:, hours_of_operation: nil, special_instructions: nil, welcome_message: nil, name: 'concierge', route: '/concierge', **_opts) +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + +#### Returns + +`Concierge` — a new instance of Concierge + +#### Source + +[`lib/signalwire/prefabs/concierge.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/concierge.rb) + +Line 25. + +*** + +### name + +Returns the value of attribute name. + +#### Signature + +```ruby +attr_reader name -> Object +``` + +#### Source + +[`lib/signalwire/prefabs/concierge.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/concierge.rb) + +Line 23. + +*** + +### on\_summary + +Lifecycle hook: on\_summary — Python parity +(signalwire.prefabs.concierge.ConciergeAgent#on\_summary). + +Processes the post-prompt interaction summary. Structured (Hash) +summaries are logged as pretty JSON; anything else is logged as-is. +Subclasses may override to persist or forward the interaction. + +#### Signature + +```ruby +def on_summary(summary, _raw_data = nil) +``` + +#### Parameters + + + conversation summary + + + + full raw POST data + + +#### Returns + +`void` + +#### Source + +[`lib/signalwire/prefabs/concierge.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/concierge.rb) + +Line 156. + +*** + +### prompt\_sections + +#### Signature + +```ruby +def prompt_sections +``` + +#### Source + +[`lib/signalwire/prefabs/concierge.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/concierge.rb) + +Line 42. + +*** + +### route + +Returns the value of attribute route. + +#### Signature + +```ruby +attr_reader route -> Object +``` + +#### Source + +[`lib/signalwire/prefabs/concierge.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/concierge.rb) + +Line 23. + +*** + +### services + +Returns the value of attribute services. + +#### Signature + +```ruby +attr_reader services -> Object +``` + +#### Source + +[`lib/signalwire/prefabs/concierge.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/concierge.rb) + +Line 23. + +*** + +### tools + +#### Signature + +```ruby +def tools +``` + +#### Source + +[`lib/signalwire/prefabs/concierge.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/concierge.rb) + +Line 38. + +*** + +### venue\_name + +Returns the value of attribute venue\_name. + +#### Signature + +```ruby +attr_reader venue_name -> Object +``` + +#### Source + +[`lib/signalwire/prefabs/concierge.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/concierge.rb) + +Line 23. + +## Source + +[`lib/signalwire/prefabs/concierge.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/concierge.rb) + +Line 22. diff --git a/fern/products/sdk-reference/ruby/agents/prefabs/faq-bot/index.mdx b/fern/products/sdk-reference/ruby/agents/prefabs/faq-bot/index.mdx new file mode 100644 index 0000000000..bcfbe6659f --- /dev/null +++ b/fern/products/sdk-reference/ruby/agents/prefabs/faq-bot/index.mdx @@ -0,0 +1,238 @@ +--- +slug: "/reference/ruby/agents/prefabs/faq-bot" +title: "FaqBot" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Prefabs::FaqBot" + parent: "SignalWire::Prefabs" + module: "agents.Prefabs" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/faq_bot.rb" + visibility: "public" +--- +# `FaqBot` + +Prefab agent for answering frequently asked questions. + +agent = FaqBot.new( +faqs: \[ +\{ 'question' => 'What is SignalWire?', 'answer' => 'A cloud communications platform.' \} +] +) + +## Signature + +```ruby +class FaqBot < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### faqs + +Returns the value of attribute faqs. + +#### Signature + +```ruby +attr_reader faqs -> Object +``` + +#### Source + +[`lib/signalwire/prefabs/faq_bot.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/faq_bot.rb) + +Line 23. + +*** + +### global\_data + +#### Signature + +```ruby +def global_data +``` + +#### Source + +[`lib/signalwire/prefabs/faq_bot.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/faq_bot.rb) + +Line 51. + +*** + +### handle\_search + +#### Signature + +```ruby +def handle_search(args, _raw_data) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/prefabs/faq_bot.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/faq_bot.rb) + +Line 58. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(faqs:, suggest_related: true, persona: nil, name: 'faq_bot', route: '/faq', **_opts) +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`FaqBot` — a new instance of FaqBot + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/prefabs/faq_bot.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/faq_bot.rb) + +Line 25. + +*** + +### name + +Returns the value of attribute name. + +#### Signature + +```ruby +attr_reader name -> Object +``` + +#### Source + +[`lib/signalwire/prefabs/faq_bot.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/faq_bot.rb) + +Line 23. + +*** + +### on\_summary + +Lifecycle hook: on\_summary — Python parity +(signalwire.prefabs.faq\_bot.FAQBotAgent#on\_summary). + +Logs the post-prompt interaction summary; structured (Hash) summaries +are emitted as pretty JSON. Subclasses may override to persist. + +#### Signature + +```ruby +def on_summary(summary, _raw_data = nil) +``` + +#### Parameters + + + conversation summary + + + + full raw POST data + + +#### Returns + +`void` + +#### Source + +[`lib/signalwire/prefabs/faq_bot.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/faq_bot.rb) + +Line 77. + +*** + +### prompt\_sections + +#### Signature + +```ruby +def prompt_sections +``` + +#### Source + +[`lib/signalwire/prefabs/faq_bot.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/faq_bot.rb) + +Line 40. + +*** + +### route + +Returns the value of attribute route. + +#### Signature + +```ruby +attr_reader route -> Object +``` + +#### Source + +[`lib/signalwire/prefabs/faq_bot.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/faq_bot.rb) + +Line 23. + +*** + +### tools + +#### Signature + +```ruby +def tools +``` + +#### Source + +[`lib/signalwire/prefabs/faq_bot.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/faq_bot.rb) + +Line 36. + +## Source + +[`lib/signalwire/prefabs/faq_bot.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/faq_bot.rb) + +Line 22. diff --git a/fern/products/sdk-reference/ruby/agents/prefabs/index.mdx b/fern/products/sdk-reference/ruby/agents/prefabs/index.mdx new file mode 100644 index 0000000000..2418b639f1 --- /dev/null +++ b/fern/products/sdk-reference/ruby/agents/prefabs/index.mdx @@ -0,0 +1,52 @@ +--- +slug: "/reference/ruby/agents/prefabs" +title: "Prefabs" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "module" + language: "ruby" + qualified_name: "SignalWire::Prefabs" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/survey.rb" + visibility: "public" +--- +# `Prefabs` + +## Signature + +```ruby +module Prefabs +``` + +## Classes + + + + Prefab agent for providing virtual concierge services. + + + + Prefab agent for answering frequently asked questions. + + + + Prefab agent for collecting answers to a series of questions. + + + + Prefab agent for greeting callers and transferring them to departments. + + + + Prefab agent for conducting automated surveys. + + + +## Source + +[`lib/signalwire/prefabs/survey.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/survey.rb) + +Line 13. diff --git a/fern/products/sdk-reference/ruby/agents/prefabs/info-gatherer/index.mdx b/fern/products/sdk-reference/ruby/agents/prefabs/info-gatherer/index.mdx new file mode 100644 index 0000000000..f9962d56d3 --- /dev/null +++ b/fern/products/sdk-reference/ruby/agents/prefabs/info-gatherer/index.mdx @@ -0,0 +1,306 @@ +--- +slug: "/reference/ruby/agents/prefabs/info-gatherer" +title: "InfoGatherer" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Prefabs::InfoGatherer" + parent: "SignalWire::Prefabs" + module: "agents.Prefabs" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/info_gatherer.rb" + visibility: "public" +--- +# `InfoGatherer` + +Prefab agent for collecting answers to a series of questions. + +agent = InfoGatherer.new( +questions: \[ +\{ 'key\_name' => 'full\_name', 'question\_text' => 'What is your full name?' \}, +\{ 'key\_name' => 'email', 'question\_text' => 'Email?', 'confirm' => true \} +] +) + +## Signature + +```ruby +class InfoGatherer < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Constants + + + Fallback questions used in dynamic mode when no callback is registered or the callback raises (mirrors Python's fallback list). + + +## Methods + +### global\_data + +Global data for initial state. + +#### Signature + +```ruby +def global_data +``` + +#### Source + +[`lib/signalwire/prefabs/info_gatherer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/info_gatherer.rb) + +Line 79. + +*** + +### handle\_start + +Tool handler: start\_questions + +#### Signature + +```ruby +def handle_start(_args, _raw_data) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/prefabs/info_gatherer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/info_gatherer.rb) + +Line 90. + +*** + +### handle\_submit + +Tool handler: submit\_answer + +#### Signature + +```ruby +def handle_submit(args, _raw_data) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/prefabs/info_gatherer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/info_gatherer.rb) + +Line 100. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(questions: nil, name: 'info_gatherer', route: '/info_gatherer', **_opts) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`InfoGatherer` — a new instance of InfoGatherer + +#### Source + +[`lib/signalwire/prefabs/info_gatherer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/info_gatherer.rb) + +Line 33. + +*** + +### name + +Returns the value of attribute name. + +#### Signature + +```ruby +attr_reader name -> Object +``` + +#### Source + +[`lib/signalwire/prefabs/info_gatherer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/info_gatherer.rb) + +Line 29. + +*** + +### on\_swml\_request + +Lifecycle hook: on\_swml\_request — Python parity +(InfoGathererAgent#on\_swml\_request). In dynamic mode, invokes the +registered question callback (or a fallback) and returns a +\{ 'global\_data' => \{...\} \} Hash that AgentBase merges into the SWML +response. In static mode this is a no-op (returns nil). + +#### Signature + +```ruby +def on_swml_request(request_data = nil, _callback_path = nil, request: nil) +``` + +#### Parameters + + + parsed request body + + + + + + +#### Returns + +`Hash | nil` + +#### Source + +[`lib/signalwire/prefabs/info_gatherer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/info_gatherer.rb) + +Line 116. + +*** + +### prompt\_sections + +Build the prompt sections. + +#### Signature + +```ruby +def prompt_sections +``` + +#### Source + +[`lib/signalwire/prefabs/info_gatherer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/info_gatherer.rb) + +Line 68. + +*** + +### questions + +Returns the value of attribute questions. + +#### Signature + +```ruby +attr_reader questions -> Object +``` + +#### Source + +[`lib/signalwire/prefabs/info_gatherer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/info_gatherer.rb) + +Line 29. + +*** + +### route + +Returns the value of attribute route. + +#### Signature + +```ruby +attr_reader route -> Object +``` + +#### Source + +[`lib/signalwire/prefabs/info_gatherer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/info_gatherer.rb) + +Line 29. + +*** + +### set\_question\_callback + +Register a callback for dynamic, per-request question configuration — +Python parity (InfoGathererAgent#set\_question\_callback). The callback +receives (query\_params, body\_params, headers) and returns the list of +questions to ask on that call. + +#### Signature + +```ruby +def set_question_callback(callback) +``` + +#### Parameters + + + callable taking three Hash args, returning an Array of question Hashes + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/prefabs/info_gatherer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/info_gatherer.rb) + +Line 57. + +*** + +### tools + +Tool definitions this prefab provides. + +#### Signature + +```ruby +def tools +``` + +#### Source + +[`lib/signalwire/prefabs/info_gatherer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/info_gatherer.rb) + +Line 63. + +## Source + +[`lib/signalwire/prefabs/info_gatherer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/info_gatherer.rb) + +Line 21. diff --git a/fern/products/sdk-reference/ruby/agents/prefabs/receptionist/index.mdx b/fern/products/sdk-reference/ruby/agents/prefabs/receptionist/index.mdx new file mode 100644 index 0000000000..58d6eed0fe --- /dev/null +++ b/fern/products/sdk-reference/ruby/agents/prefabs/receptionist/index.mdx @@ -0,0 +1,256 @@ +--- +slug: "/reference/ruby/agents/prefabs/receptionist" +title: "Receptionist" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Prefabs::Receptionist" + parent: "SignalWire::Prefabs" + module: "agents.Prefabs" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/receptionist.rb" + visibility: "public" +--- +# `Receptionist` + +Prefab agent for greeting callers and transferring them to departments. + +agent = Receptionist.new( +departments: \[ +\{ 'name' => 'sales', 'description' => 'Product inquiries', 'number' => '+15551235555' \}, +\{ 'name' => 'support', 'description' => 'Technical help', 'number' => '+15551236666' \} +] +) + +## Signature + +```ruby +class Receptionist < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### departments + +Returns the value of attribute departments. + +#### Signature + +```ruby +attr_reader departments -> Object +``` + +#### Source + +[`lib/signalwire/prefabs/receptionist.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/receptionist.rb) + +Line 22. + +*** + +### global\_data + +#### Signature + +```ruby +def global_data +``` + +#### Source + +[`lib/signalwire/prefabs/receptionist.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/receptionist.rb) + +Line 54. + +*** + +### greeting + +Returns the value of attribute greeting. + +#### Signature + +```ruby +attr_reader greeting -> Object +``` + +#### Source + +[`lib/signalwire/prefabs/receptionist.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/receptionist.rb) + +Line 22. + +*** + +### handle\_transfer + +#### Signature + +```ruby +def handle_transfer(args, _raw_data) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/prefabs/receptionist.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/receptionist.rb) + +Line 61. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(departments:, name: 'receptionist', route: '/receptionist', greeting: 'Thank you for calling. How can I help you today?', **_opts) +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`Receptionist` — a new instance of Receptionist + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/prefabs/receptionist.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/receptionist.rb) + +Line 24. + +*** + +### name + +Returns the value of attribute name. + +#### Signature + +```ruby +attr_reader name -> Object +``` + +#### Source + +[`lib/signalwire/prefabs/receptionist.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/receptionist.rb) + +Line 22. + +*** + +### on\_summary + +Lifecycle hook: on\_summary — Python parity +(signalwire.prefabs.receptionist.ReceptionistAgent#on\_summary). + +No-op extension point: the base receptionist does not process the +transfer summary. Subclasses override this to handle the summary +(mirrors Python's `def on_summary(...): pass`). + +#### Signature + +```ruby +def on_summary(_summary, _raw_data = nil) +``` + +#### Parameters + + + conversation summary + + + + full raw POST data + + +#### Returns + +`void` + +#### Source + +[`lib/signalwire/prefabs/receptionist.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/receptionist.rb) + +Line 83. + +*** + +### prompt\_sections + +#### Signature + +```ruby +def prompt_sections +``` + +#### Source + +[`lib/signalwire/prefabs/receptionist.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/receptionist.rb) + +Line 43. + +*** + +### route + +Returns the value of attribute route. + +#### Signature + +```ruby +attr_reader route -> Object +``` + +#### Source + +[`lib/signalwire/prefabs/receptionist.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/receptionist.rb) + +Line 22. + +*** + +### tools + +#### Signature + +```ruby +def tools +``` + +#### Source + +[`lib/signalwire/prefabs/receptionist.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/receptionist.rb) + +Line 39. + +## Source + +[`lib/signalwire/prefabs/receptionist.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/receptionist.rb) + +Line 21. diff --git a/fern/products/sdk-reference/ruby/agents/prefabs/survey/index.mdx b/fern/products/sdk-reference/ruby/agents/prefabs/survey/index.mdx new file mode 100644 index 0000000000..32f52f0a32 --- /dev/null +++ b/fern/products/sdk-reference/ruby/agents/prefabs/survey/index.mdx @@ -0,0 +1,373 @@ +--- +slug: "/reference/ruby/agents/prefabs/survey" +title: "Survey" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Prefabs::Survey" + parent: "SignalWire::Prefabs" + module: "agents.Prefabs" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/survey.rb" + visibility: "public" +--- +# `Survey` + +Prefab agent for conducting automated surveys. + +agent = Survey.new( +survey\_name: 'Customer Satisfaction', +questions: \[ +\{ 'id' => 'satisfaction', 'text' => 'How satisfied were you?', 'type' => 'rating', 'scale' => 5 \} +] +) + +## Signature + +```ruby +class Survey < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### global\_data + +#### Signature + +```ruby +def global_data +``` + +#### Source + +[`lib/signalwire/prefabs/survey.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/survey.rb) + +Line 52. + +*** + +### handle\_start + +#### Signature + +```ruby +def handle_start(_args, _raw_data) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/prefabs/survey.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/survey.rb) + +Line 63. + +*** + +### handle\_submit + +#### Signature + +```ruby +def handle_submit(args, _raw_data) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/prefabs/survey.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/survey.rb) + +Line 68. + +*** + +### handle\_summary + +#### Signature + +```ruby +def handle_summary(_args, _raw_data) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/prefabs/survey.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/survey.rb) + +Line 72. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(survey_name:, questions:, introduction: nil, conclusion: nil, name: 'survey', route: '/survey', **_opts) +``` + +#### Parameters + + + + + + + + + + + + + + + +#### Returns + +`Survey` — a new instance of Survey + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/prefabs/survey.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/survey.rb) + +Line 26. + +*** + +### log\_response + +Tool: log\_response — Python parity +(signalwire.prefabs.survey.SurveyAgent#log\_response). + +Acknowledges that a validated response has been recorded, naming the +question by its text. A real implementation would persist the answer. + +#### Signature + +```ruby +def log_response(args, _raw_data) +``` + +#### Parameters + + + expects "question\_id", "response" + + + + +#### Returns + +`Swaig::FunctionResult` + +#### Source + +[`lib/signalwire/prefabs/survey.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/survey.rb) + +Line 126. + +*** + +### name + +Returns the value of attribute name. + +#### Signature + +```ruby +attr_reader name -> Object +``` + +#### Source + +[`lib/signalwire/prefabs/survey.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/survey.rb) + +Line 24. + +*** + +### on\_summary + +Lifecycle hook: on\_summary — Python parity +(signalwire.prefabs.survey.SurveyAgent#on\_summary). + +Logs the completed survey results; structured (Hash) summaries are +emitted as pretty JSON. Subclasses override to store responses or +trigger follow-up actions. + +#### Signature + +```ruby +def on_summary(summary, _raw_data = nil) +``` + +#### Parameters + + + survey responses summary + + + + full raw POST data + + +#### Returns + +`void` + +#### Source + +[`lib/signalwire/prefabs/survey.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/survey.rb) + +Line 144. + +*** + +### prompt\_sections + +#### Signature + +```ruby +def prompt_sections +``` + +#### Source + +[`lib/signalwire/prefabs/survey.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/survey.rb) + +Line 42. + +*** + +### questions + +Returns the value of attribute questions. + +#### Signature + +```ruby +attr_reader questions -> Object +``` + +#### Source + +[`lib/signalwire/prefabs/survey.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/survey.rb) + +Line 24. + +*** + +### route + +Returns the value of attribute route. + +#### Signature + +```ruby +attr_reader route -> Object +``` + +#### Source + +[`lib/signalwire/prefabs/survey.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/survey.rb) + +Line 24. + +*** + +### survey\_name + +Returns the value of attribute survey\_name. + +#### Signature + +```ruby +attr_reader survey_name -> Object +``` + +#### Source + +[`lib/signalwire/prefabs/survey.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/survey.rb) + +Line 24. + +*** + +### tools + +#### Signature + +```ruby +def tools +``` + +#### Source + +[`lib/signalwire/prefabs/survey.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/survey.rb) + +Line 38. + +*** + +### validate\_response + +Tool: validate\_response — Python parity +(signalwire.prefabs.survey.SurveyAgent#validate\_response). + +Validates a user's answer against the constraints of the identified +question (rating range, multiple-choice options, yes/no, required +open-ended) and returns a human-readable validity message. + +#### Signature + +```ruby +def validate_response(args, _raw_data) +``` + +#### Parameters + + + expects "question\_id", "response" + + + + +#### Returns + +`Swaig::FunctionResult` + +#### Source + +[`lib/signalwire/prefabs/survey.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/survey.rb) + +Line 85. + +## Source + +[`lib/signalwire/prefabs/survey.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/survey.rb) + +Line 23. diff --git a/fern/products/sdk-reference/ruby/agents/runtime/index.mdx b/fern/products/sdk-reference/ruby/agents/runtime/index.mdx new file mode 100644 index 0000000000..f49158a018 --- /dev/null +++ b/fern/products/sdk-reference/ruby/agents/runtime/index.mdx @@ -0,0 +1,148 @@ +--- +slug: "/reference/ruby/agents/runtime" +title: "Runtime" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "module" + language: "ruby" + qualified_name: "SignalWire::Runtime" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/runtime.rb" + visibility: "public" +--- +# `Runtime` + +Runtime environment detection. + +Detects the execution environment (plain server, AWS Lambda, CGI, +Google Cloud Functions, Azure Functions) by inspecting well-known +environment variables set by each platform. + +This is the Ruby counterpart to the Python SDK's ++signalwire.core.logging\_config.get\_execution\_mode+. + +## Signature + +```ruby +module Runtime +``` + +## Constants + + + +## Methods + +### execution\_mode + +Determine the current execution mode. + +Returns one of: + +- +:cgi+ - running under a CGI gateway (GATEWAY\_INTERFACE is set) +- +:lambda+ - running under AWS Lambda +- +:google\_cloud\_function+ - Google Cloud Functions / Cloud Run +- +:azure\_function+ - Azure Functions +- +:server+ - long-running HTTP server (the default) + +Detection order matters: CGI is checked before Lambda because a +Lambda function invoked through an emulator that also sets +GATEWAY\_INTERFACE should still be treated as CGI. + +#### Signature + +```ruby +def execution_mode +``` + +#### Returns + +`Symbol` — one of the values in \{MODES\} + +#### Source + +[`lib/signalwire/runtime.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/runtime.rb) + +Line 34. + +*** + +### lambda\_base\_url + +Construct the base URL for the current Lambda function. + +Prefers +AWS\_LAMBDA\_FUNCTION\_URL+ when set; otherwise falls back to +the standard Function URL shape built from +AWS\_LAMBDA\_FUNCTION\_NAME+ +and +AWS\_REGION+. Returns +nil+ when neither signal is present. + +The returned URL never has a trailing slash and never contains a +path component, so callers must append the agent's route themselves. + +#### Signature + +```ruby +def lambda_base_url +``` + +#### Returns + +`String | nil` + +#### Source + +[`lib/signalwire/runtime.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/runtime.rb) + +Line 85. + +*** + +### lambda? + +True when the SDK is running inside AWS Lambda. + +#### Signature + +```ruby +def lambda? +``` + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/runtime.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/runtime.rb) + +Line 63. + +*** + +### serverless? + +True when the SDK is running inside any serverless platform. + +#### Signature + +```ruby +def serverless? +``` + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/runtime.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/runtime.rb) + +Line 69. + +## Source + +[`lib/signalwire/runtime.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/runtime.rb) + +Line 17. diff --git a/fern/products/sdk-reference/ruby/agents/serverless/index.mdx b/fern/products/sdk-reference/ruby/agents/serverless/index.mdx new file mode 100644 index 0000000000..a8741f72a8 --- /dev/null +++ b/fern/products/sdk-reference/ruby/agents/serverless/index.mdx @@ -0,0 +1,36 @@ +--- +slug: "/reference/ruby/agents/serverless" +title: "Serverless" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "module" + language: "ruby" + qualified_name: "SignalWire::Serverless" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/serverless/lambda_handler.rb" + visibility: "public" +--- +# `Serverless` + +## Signature + +```ruby +module Serverless +``` + +## Classes + + + + Adapter that lets an AWS Lambda function invoke a Rack application. + + + +## Source + +[`lib/signalwire/serverless/lambda_handler.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/serverless/lambda_handler.rb) + +Line 14. diff --git a/fern/products/sdk-reference/ruby/agents/serverless/lambda-handler/index.mdx b/fern/products/sdk-reference/ruby/agents/serverless/lambda-handler/index.mdx new file mode 100644 index 0000000000..84fcbc8ce6 --- /dev/null +++ b/fern/products/sdk-reference/ruby/agents/serverless/lambda-handler/index.mdx @@ -0,0 +1,151 @@ +--- +slug: "/reference/ruby/agents/serverless/lambda-handler" +title: "LambdaHandler" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Serverless::LambdaHandler" + parent: "SignalWire::Serverless" + module: "agents.Serverless" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/serverless/lambda_handler.rb" + visibility: "public" +--- +# `LambdaHandler` + +Adapter that lets an AWS Lambda function invoke a Rack application. + +Typical usage from a Lambda entrypoint file: + +require 'signalwire' + +AGENT = SignalWire::AgentBase.new(name: 'my-agent', route: '/') + +# ...configure AGENT... + +HANDLER = SignalWire::Serverless::LambdaHandler.new(AGENT.rack\_app) + +def handler(event:, context:) +HANDLER.call(event, context) +end + +The adapter accepts events from either Lambda Function URLs / API +Gateway HTTP API (payload format v2) or the classic API Gateway REST +API (payload format v1) and returns a response in the matching +shape. Any triple returned by the Rack app (status, headers, body) +is translated into the +\{statusCode:, headers:, body:\}+ shape +expected by Lambda. + +The adapter never reaches out to the network and has no gem +dependencies beyond what the SignalWire SDK already requires, so it +can be bundled directly into a Lambda zip. + +## Signature + +```ruby +class LambdaHandler < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### call + +Invoke the wrapped Rack application with a Lambda event. + +#### Signature + +```ruby +def call(event, _context = nil) +``` + +#### Parameters + + + the Lambda invocation event + + + + the Lambda context (ignored) + + +#### Returns + +`Hash` — a Lambda-shaped response hash + +#### Source + +[`lib/signalwire/serverless/lambda_handler.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/serverless/lambda_handler.rb) + +Line 53. + +*** + +### for + +Class-level convenience so consumers can use ++SignalWire::Serverless::LambdaHandler.for(agent)+ without +duplicating +.rack\_app+ at the call site. + +#### Signature + +```ruby +def for(agent_or_app) +``` + +#### Parameters + + + either an AgentBase (responds to +rack\_app+) or any Rack-compatible application + + +#### Returns + +`LambdaHandler` + +#### Source + +[`lib/signalwire/serverless/lambda_handler.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/serverless/lambda_handler.rb) + +Line 71. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(app) +``` + +#### Parameters + + + a Rack-compatible application + + +#### Returns + +`LambdaHandler` — a new instance of LambdaHandler + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/serverless/lambda_handler.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/serverless/lambda_handler.rb) + +Line 42. + +## Source + +[`lib/signalwire/serverless/lambda_handler.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/serverless/lambda_handler.rb) + +Line 40. diff --git a/fern/products/sdk-reference/ruby/agents/skills/builtin/api-ninjas-trivia-skill/index.mdx b/fern/products/sdk-reference/ruby/agents/skills/builtin/api-ninjas-trivia-skill/index.mdx new file mode 100644 index 0000000000..20002222f6 --- /dev/null +++ b/fern/products/sdk-reference/ruby/agents/skills/builtin/api-ninjas-trivia-skill/index.mdx @@ -0,0 +1,158 @@ +--- +slug: "/reference/ruby/agents/skills/builtin/api-ninjas-trivia-skill" +title: "ApiNinjasTriviaSkill" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Skills::Builtin::ApiNinjasTriviaSkill" + parent: "SignalWire::Skills::Builtin" + module: "agents.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/api_ninjas_trivia.rb" + visibility: "public" +--- +# `ApiNinjasTriviaSkill` + +## Signature + +```ruby +class ApiNinjasTriviaSkill < SignalWire::Skills::SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/ruby/agents/skills/skill-base) + +## Constants + + + +## Methods + +### description + +#### Signature + +```ruby +def description +``` + +#### Source + +[`lib/signalwire/skills/builtin/api_ninjas_trivia.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/api_ninjas_trivia.rb) + +Line 28. + +*** + +### get\_parameter\_schema + +#### Signature + +```ruby +def get_parameter_schema +``` + +#### Source + +[`lib/signalwire/skills/builtin/api_ninjas_trivia.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/api_ninjas_trivia.rb) + +Line 86. + +*** + +### instance\_key + +#### Signature + +```ruby +def instance_key +``` + +#### Source + +[`lib/signalwire/skills/builtin/api_ninjas_trivia.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/api_ninjas_trivia.rb) + +Line 41. + +*** + +### name + +#### Signature + +```ruby +def name +``` + +#### Source + +[`lib/signalwire/skills/builtin/api_ninjas_trivia.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/api_ninjas_trivia.rb) + +Line 27. + +*** + +### register\_tools + +#### Signature + +```ruby +def register_tools +``` + +#### Source + +[`lib/signalwire/skills/builtin/api_ninjas_trivia.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/api_ninjas_trivia.rb) + +Line 43. + +*** + +### setup + +#### Signature + +```ruby +def setup +``` + +#### Source + +[`lib/signalwire/skills/builtin/api_ninjas_trivia.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/api_ninjas_trivia.rb) + +Line 31. + +*** + +### supports\_multiple\_instances? + +#### Signature + +```ruby +def supports_multiple_instances? +``` + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/skills/builtin/api_ninjas_trivia.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/api_ninjas_trivia.rb) + +Line 29. + +## Source + +[`lib/signalwire/skills/builtin/api_ninjas_trivia.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/api_ninjas_trivia.rb) + +Line 9. diff --git a/fern/products/sdk-reference/ruby/agents/skills/builtin/claude-skills-skill/index.mdx b/fern/products/sdk-reference/ruby/agents/skills/builtin/claude-skills-skill/index.mdx new file mode 100644 index 0000000000..71a434c429 --- /dev/null +++ b/fern/products/sdk-reference/ruby/agents/skills/builtin/claude-skills-skill/index.mdx @@ -0,0 +1,182 @@ +--- +slug: "/reference/ruby/agents/skills/builtin/claude-skills-skill" +title: "ClaudeSkillsSkill" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Skills::Builtin::ClaudeSkillsSkill" + parent: "SignalWire::Skills::Builtin" + module: "agents.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/claude_skills.rb" + visibility: "public" +--- +# `ClaudeSkillsSkill` + +Loads Claude SKILL.md files as agent tools. + +## Signature + +```ruby +class ClaudeSkillsSkill < SignalWire::Skills::SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/ruby/agents/skills/skill-base) + +## Methods + +### description + +#### Signature + +```ruby +def description +``` + +#### Source + +[`lib/signalwire/skills/builtin/claude_skills.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/claude_skills.rb) + +Line 12. + +*** + +### get\_hints + +#### Signature + +```ruby +def get_hints +``` + +#### Source + +[`lib/signalwire/skills/builtin/claude_skills.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/claude_skills.rb) + +Line 46. + +*** + +### get\_parameter\_schema + +#### Signature + +```ruby +def get_parameter_schema +``` + +#### Source + +[`lib/signalwire/skills/builtin/claude_skills.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/claude_skills.rb) + +Line 56. + +*** + +### get\_prompt\_sections + +#### Signature + +```ruby +def get_prompt_sections +``` + +#### Source + +[`lib/signalwire/skills/builtin/claude_skills.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/claude_skills.rb) + +Line 50. + +*** + +### instance\_key + +#### Signature + +```ruby +def instance_key +``` + +#### Source + +[`lib/signalwire/skills/builtin/claude_skills.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/claude_skills.rb) + +Line 29. + +*** + +### name + +#### Signature + +```ruby +def name +``` + +#### Source + +[`lib/signalwire/skills/builtin/claude_skills.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/claude_skills.rb) + +Line 11. + +*** + +### register\_tools + +#### Signature + +```ruby +def register_tools +``` + +#### Source + +[`lib/signalwire/skills/builtin/claude_skills.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/claude_skills.rb) + +Line 31. + +*** + +### setup + +#### Signature + +```ruby +def setup +``` + +#### Source + +[`lib/signalwire/skills/builtin/claude_skills.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/claude_skills.rb) + +Line 15. + +*** + +### supports\_multiple\_instances? + +#### Signature + +```ruby +def supports_multiple_instances? +``` + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/skills/builtin/claude_skills.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/claude_skills.rb) + +Line 13. + +## Source + +[`lib/signalwire/skills/builtin/claude_skills.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/claude_skills.rb) + +Line 10. diff --git a/fern/products/sdk-reference/ruby/agents/skills/builtin/custom-skills-skill/index.mdx b/fern/products/sdk-reference/ruby/agents/skills/builtin/custom-skills-skill/index.mdx new file mode 100644 index 0000000000..eade6992b9 --- /dev/null +++ b/fern/products/sdk-reference/ruby/agents/skills/builtin/custom-skills-skill/index.mdx @@ -0,0 +1,150 @@ +--- +slug: "/reference/ruby/agents/skills/builtin/custom-skills-skill" +title: "CustomSkillsSkill" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Skills::Builtin::CustomSkillsSkill" + parent: "SignalWire::Skills::Builtin" + module: "agents.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/custom_skills.rb" + visibility: "public" +--- +# `CustomSkillsSkill` + +User-defined custom tools. + +## Signature + +```ruby +class CustomSkillsSkill < SignalWire::Skills::SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/ruby/agents/skills/skill-base) + +## Methods + +### description + +#### Signature + +```ruby +def description +``` + +#### Source + +[`lib/signalwire/skills/builtin/custom_skills.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/custom_skills.rb) + +Line 12. + +*** + +### get\_parameter\_schema + +#### Signature + +```ruby +def get_parameter_schema +``` + +#### Source + +[`lib/signalwire/skills/builtin/custom_skills.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/custom_skills.rb) + +Line 42. + +*** + +### instance\_key + +#### Signature + +```ruby +def instance_key +``` + +#### Source + +[`lib/signalwire/skills/builtin/custom_skills.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/custom_skills.rb) + +Line 21. + +*** + +### name + +#### Signature + +```ruby +def name +``` + +#### Source + +[`lib/signalwire/skills/builtin/custom_skills.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/custom_skills.rb) + +Line 11. + +*** + +### register\_tools + +#### Signature + +```ruby +def register_tools +``` + +#### Source + +[`lib/signalwire/skills/builtin/custom_skills.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/custom_skills.rb) + +Line 26. + +*** + +### setup + +#### Signature + +```ruby +def setup +``` + +#### Source + +[`lib/signalwire/skills/builtin/custom_skills.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/custom_skills.rb) + +Line 15. + +*** + +### supports\_multiple\_instances? + +#### Signature + +```ruby +def supports_multiple_instances? +``` + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/skills/builtin/custom_skills.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/custom_skills.rb) + +Line 13. + +## Source + +[`lib/signalwire/skills/builtin/custom_skills.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/custom_skills.rb) + +Line 10. diff --git a/fern/products/sdk-reference/ruby/agents/skills/builtin/datasphere-serverless-skill/index.mdx b/fern/products/sdk-reference/ruby/agents/skills/builtin/datasphere-serverless-skill/index.mdx new file mode 100644 index 0000000000..30688a97c3 --- /dev/null +++ b/fern/products/sdk-reference/ruby/agents/skills/builtin/datasphere-serverless-skill/index.mdx @@ -0,0 +1,180 @@ +--- +slug: "/reference/ruby/agents/skills/builtin/datasphere-serverless-skill" +title: "DatasphereServerlessSkill" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Skills::Builtin::DatasphereServerlessSkill" + parent: "SignalWire::Skills::Builtin" + module: "agents.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datasphere_serverless.rb" + visibility: "public" +--- +# `DatasphereServerlessSkill` + +## Signature + +```ruby +class DatasphereServerlessSkill < SignalWire::Skills::SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/ruby/agents/skills/skill-base) + +## Methods + +### description + +#### Signature + +```ruby +def description +``` + +#### Source + +[`lib/signalwire/skills/builtin/datasphere_serverless.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datasphere_serverless.rb) + +Line 14. + +*** + +### get\_global\_data + +#### Signature + +```ruby +def get_global_data +``` + +#### Source + +[`lib/signalwire/skills/builtin/datasphere_serverless.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datasphere_serverless.rb) + +Line 67. + +*** + +### get\_parameter\_schema + +#### Signature + +```ruby +def get_parameter_schema +``` + +#### Source + +[`lib/signalwire/skills/builtin/datasphere_serverless.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datasphere_serverless.rb) + +Line 90. + +*** + +### get\_prompt\_sections + +#### Signature + +```ruby +def get_prompt_sections +``` + +#### Source + +[`lib/signalwire/skills/builtin/datasphere_serverless.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datasphere_serverless.rb) + +Line 75. + +*** + +### instance\_key + +#### Signature + +```ruby +def instance_key +``` + +#### Source + +[`lib/signalwire/skills/builtin/datasphere_serverless.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datasphere_serverless.rb) + +Line 37. + +*** + +### name + +#### Signature + +```ruby +def name +``` + +#### Source + +[`lib/signalwire/skills/builtin/datasphere_serverless.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datasphere_serverless.rb) + +Line 13. + +*** + +### register\_tools + +#### Signature + +```ruby +def register_tools +``` + +#### Source + +[`lib/signalwire/skills/builtin/datasphere_serverless.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datasphere_serverless.rb) + +Line 39. + +*** + +### setup + +#### Signature + +```ruby +def setup +``` + +#### Source + +[`lib/signalwire/skills/builtin/datasphere_serverless.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datasphere_serverless.rb) + +Line 17. + +*** + +### supports\_multiple\_instances? + +#### Signature + +```ruby +def supports_multiple_instances? +``` + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/skills/builtin/datasphere_serverless.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datasphere_serverless.rb) + +Line 15. + +## Source + +[`lib/signalwire/skills/builtin/datasphere_serverless.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datasphere_serverless.rb) + +Line 12. diff --git a/fern/products/sdk-reference/ruby/agents/skills/builtin/datasphere-skill/index.mdx b/fern/products/sdk-reference/ruby/agents/skills/builtin/datasphere-skill/index.mdx new file mode 100644 index 0000000000..b4f589cbbf --- /dev/null +++ b/fern/products/sdk-reference/ruby/agents/skills/builtin/datasphere-skill/index.mdx @@ -0,0 +1,180 @@ +--- +slug: "/reference/ruby/agents/skills/builtin/datasphere-skill" +title: "DatasphereSkill" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Skills::Builtin::DatasphereSkill" + parent: "SignalWire::Skills::Builtin" + module: "agents.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datasphere.rb" + visibility: "public" +--- +# `DatasphereSkill` + +## Signature + +```ruby +class DatasphereSkill < SignalWire::Skills::SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/ruby/agents/skills/skill-base) + +## Methods + +### description + +#### Signature + +```ruby +def description +``` + +#### Source + +[`lib/signalwire/skills/builtin/datasphere.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datasphere.rb) + +Line 16. + +*** + +### get\_global\_data + +#### Signature + +```ruby +def get_global_data +``` + +#### Source + +[`lib/signalwire/skills/builtin/datasphere.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datasphere.rb) + +Line 63. + +*** + +### get\_parameter\_schema + +#### Signature + +```ruby +def get_parameter_schema +``` + +#### Source + +[`lib/signalwire/skills/builtin/datasphere.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datasphere.rb) + +Line 86. + +*** + +### get\_prompt\_sections + +#### Signature + +```ruby +def get_prompt_sections +``` + +#### Source + +[`lib/signalwire/skills/builtin/datasphere.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datasphere.rb) + +Line 71. + +*** + +### instance\_key + +#### Signature + +```ruby +def instance_key +``` + +#### Source + +[`lib/signalwire/skills/builtin/datasphere.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datasphere.rb) + +Line 48. + +*** + +### name + +#### Signature + +```ruby +def name +``` + +#### Source + +[`lib/signalwire/skills/builtin/datasphere.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datasphere.rb) + +Line 15. + +*** + +### register\_tools + +#### Signature + +```ruby +def register_tools +``` + +#### Source + +[`lib/signalwire/skills/builtin/datasphere.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datasphere.rb) + +Line 50. + +*** + +### setup + +#### Signature + +```ruby +def setup +``` + +#### Source + +[`lib/signalwire/skills/builtin/datasphere.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datasphere.rb) + +Line 19. + +*** + +### supports\_multiple\_instances? + +#### Signature + +```ruby +def supports_multiple_instances? +``` + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/skills/builtin/datasphere.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datasphere.rb) + +Line 17. + +## Source + +[`lib/signalwire/skills/builtin/datasphere.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datasphere.rb) + +Line 14. diff --git a/fern/products/sdk-reference/ruby/agents/skills/builtin/date-time-skill/index.mdx b/fern/products/sdk-reference/ruby/agents/skills/builtin/date-time-skill/index.mdx new file mode 100644 index 0000000000..3c6d63ed24 --- /dev/null +++ b/fern/products/sdk-reference/ruby/agents/skills/builtin/date-time-skill/index.mdx @@ -0,0 +1,137 @@ +--- +slug: "/reference/ruby/agents/skills/builtin/date-time-skill" +title: "DateTimeSkill" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Skills::Builtin::DateTimeSkill" + parent: "SignalWire::Skills::Builtin" + module: "agents.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datetime.rb" + visibility: "public" +--- +# `DateTimeSkill` + +## Signature + +```ruby +class DateTimeSkill < SignalWire::Skills::SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/ruby/agents/skills/skill-base) + +## Methods + +### description + +#### Signature + +```ruby +def description +``` + +#### Source + +[`lib/signalwire/skills/builtin/datetime.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datetime.rb) + +Line 11. + +*** + +### get\_parameter\_schema + +Python parity: `DateTimeSkill.get_parameter_schema` returns only the +base-class schema (the datetime skill adds no custom parameters). + +#### Signature + +```ruby +def get_parameter_schema +``` + +#### Source + +[`lib/signalwire/skills/builtin/datetime.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datetime.rb) + +Line 29. + +*** + +### get\_prompt\_sections + +#### Signature + +```ruby +def get_prompt_sections +``` + +#### Source + +[`lib/signalwire/skills/builtin/datetime.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datetime.rb) + +Line 54. + +*** + +### name + +#### Signature + +```ruby +def name +``` + +#### Source + +[`lib/signalwire/skills/builtin/datetime.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datetime.rb) + +Line 10. + +*** + +### register\_tools + +#### Signature + +```ruby +def register_tools +``` + +#### Source + +[`lib/signalwire/skills/builtin/datetime.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datetime.rb) + +Line 33. + +*** + +### setup + +Python parity: `DateTimeSkill.setup` -> `self.validate_packages()`. +Python validates that `pytz` is importable before the skill is +usable. Ruby resolves timezones through the stdlib `time`/`date` +libraries (no third-party dependency), so setup here verifies those +are loadable and returns whether the skill is ready. + +#### Signature + +```ruby +def setup +``` + +#### Source + +[`lib/signalwire/skills/builtin/datetime.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datetime.rb) + +Line 18. + +## Source + +[`lib/signalwire/skills/builtin/datetime.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datetime.rb) + +Line 9. diff --git a/fern/products/sdk-reference/ruby/agents/skills/builtin/google-maps-skill/index.mdx b/fern/products/sdk-reference/ruby/agents/skills/builtin/google-maps-skill/index.mdx new file mode 100644 index 0000000000..5067a1731e --- /dev/null +++ b/fern/products/sdk-reference/ruby/agents/skills/builtin/google-maps-skill/index.mdx @@ -0,0 +1,144 @@ +--- +slug: "/reference/ruby/agents/skills/builtin/google-maps-skill" +title: "GoogleMapsSkill" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Skills::Builtin::GoogleMapsSkill" + parent: "SignalWire::Skills::Builtin" + module: "agents.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/google_maps.rb" + visibility: "public" +--- +# `GoogleMapsSkill` + +## Signature + +```ruby +class GoogleMapsSkill < SignalWire::Skills::SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/ruby/agents/skills/skill-base) + +## Methods + +### description + +#### Signature + +```ruby +def description +``` + +#### Source + +[`lib/signalwire/skills/builtin/google_maps.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/google_maps.rb) + +Line 15. + +*** + +### get\_hints + +#### Signature + +```ruby +def get_hints +``` + +#### Source + +[`lib/signalwire/skills/builtin/google_maps.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/google_maps.rb) + +Line 51. + +*** + +### get\_parameter\_schema + +#### Signature + +```ruby +def get_parameter_schema +``` + +#### Source + +[`lib/signalwire/skills/builtin/google_maps.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/google_maps.rb) + +Line 70. + +*** + +### get\_prompt\_sections + +#### Signature + +```ruby +def get_prompt_sections +``` + +#### Source + +[`lib/signalwire/skills/builtin/google_maps.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/google_maps.rb) + +Line 55. + +*** + +### name + +#### Signature + +```ruby +def name +``` + +#### Source + +[`lib/signalwire/skills/builtin/google_maps.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/google_maps.rb) + +Line 14. + +*** + +### register\_tools + +#### Signature + +```ruby +def register_tools +``` + +#### Source + +[`lib/signalwire/skills/builtin/google_maps.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/google_maps.rb) + +Line 25. + +*** + +### setup + +#### Signature + +```ruby +def setup +``` + +#### Source + +[`lib/signalwire/skills/builtin/google_maps.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/google_maps.rb) + +Line 17. + +## Source + +[`lib/signalwire/skills/builtin/google_maps.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/google_maps.rb) + +Line 13. diff --git a/fern/products/sdk-reference/ruby/agents/skills/builtin/index.mdx b/fern/products/sdk-reference/ruby/agents/skills/builtin/index.mdx new file mode 100644 index 0000000000..4547bf1bab --- /dev/null +++ b/fern/products/sdk-reference/ruby/agents/skills/builtin/index.mdx @@ -0,0 +1,76 @@ +--- +slug: "/reference/ruby/agents/skills/builtin" +title: "Builtin" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "module" + language: "ruby" + qualified_name: "SignalWire::Skills::Builtin" + parent: "SignalWire::Skills" + module: "agents.Skills" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/joke.rb" + visibility: "public" +--- +# `Builtin` + +## Signature + +```ruby +module Builtin +``` + +## Classes + + + + + + Loads Claude SKILL.md files as agent tools. + + + + User-defined custom tools. + + + + + + + + + + + + + + + + + + Bridge MCP servers with SWAIG functions. + + + + Network/remote mode only (as per porting manifest). + + + + + + + + + + + + + + + +## Source + +[`lib/signalwire/skills/builtin/joke.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/joke.rb) + +Line 9. diff --git a/fern/products/sdk-reference/ruby/agents/skills/builtin/info-gatherer-skill/index.mdx b/fern/products/sdk-reference/ruby/agents/skills/builtin/info-gatherer-skill/index.mdx new file mode 100644 index 0000000000..9226109d83 --- /dev/null +++ b/fern/products/sdk-reference/ruby/agents/skills/builtin/info-gatherer-skill/index.mdx @@ -0,0 +1,180 @@ +--- +slug: "/reference/ruby/agents/skills/builtin/info-gatherer-skill" +title: "InfoGathererSkill" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Skills::Builtin::InfoGathererSkill" + parent: "SignalWire::Skills::Builtin" + module: "agents.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/info_gatherer.rb" + visibility: "public" +--- +# `InfoGathererSkill` + +## Signature + +```ruby +class InfoGathererSkill < SignalWire::Skills::SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/ruby/agents/skills/skill-base) + +## Methods + +### description + +#### Signature + +```ruby +def description +``` + +#### Source + +[`lib/signalwire/skills/builtin/info_gatherer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/info_gatherer.rb) + +Line 11. + +*** + +### get\_global\_data + +#### Signature + +```ruby +def get_global_data +``` + +#### Source + +[`lib/signalwire/skills/builtin/info_gatherer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/info_gatherer.rb) + +Line 63. + +*** + +### get\_parameter\_schema + +#### Signature + +```ruby +def get_parameter_schema +``` + +#### Source + +[`lib/signalwire/skills/builtin/info_gatherer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/info_gatherer.rb) + +Line 84. + +*** + +### get\_prompt\_sections + +#### Signature + +```ruby +def get_prompt_sections +``` + +#### Source + +[`lib/signalwire/skills/builtin/info_gatherer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/info_gatherer.rb) + +Line 73. + +*** + +### instance\_key + +#### Signature + +```ruby +def instance_key +``` + +#### Source + +[`lib/signalwire/skills/builtin/info_gatherer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/info_gatherer.rb) + +Line 38. + +*** + +### name + +#### Signature + +```ruby +def name +``` + +#### Source + +[`lib/signalwire/skills/builtin/info_gatherer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/info_gatherer.rb) + +Line 10. + +*** + +### register\_tools + +#### Signature + +```ruby +def register_tools +``` + +#### Source + +[`lib/signalwire/skills/builtin/info_gatherer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/info_gatherer.rb) + +Line 43. + +*** + +### setup + +#### Signature + +```ruby +def setup +``` + +#### Source + +[`lib/signalwire/skills/builtin/info_gatherer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/info_gatherer.rb) + +Line 14. + +*** + +### supports\_multiple\_instances? + +#### Signature + +```ruby +def supports_multiple_instances? +``` + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/skills/builtin/info_gatherer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/info_gatherer.rb) + +Line 12. + +## Source + +[`lib/signalwire/skills/builtin/info_gatherer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/info_gatherer.rb) + +Line 9. diff --git a/fern/products/sdk-reference/ruby/agents/skills/builtin/joke-skill/index.mdx b/fern/products/sdk-reference/ruby/agents/skills/builtin/joke-skill/index.mdx new file mode 100644 index 0000000000..1766c1ccbf --- /dev/null +++ b/fern/products/sdk-reference/ruby/agents/skills/builtin/joke-skill/index.mdx @@ -0,0 +1,144 @@ +--- +slug: "/reference/ruby/agents/skills/builtin/joke-skill" +title: "JokeSkill" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Skills::Builtin::JokeSkill" + parent: "SignalWire::Skills::Builtin" + module: "agents.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/joke.rb" + visibility: "public" +--- +# `JokeSkill` + +## Signature + +```ruby +class JokeSkill < SignalWire::Skills::SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/ruby/agents/skills/skill-base) + +## Methods + +### description + +#### Signature + +```ruby +def description +``` + +#### Source + +[`lib/signalwire/skills/builtin/joke.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/joke.rb) + +Line 12. + +*** + +### get\_global\_data + +#### Signature + +```ruby +def get_global_data +``` + +#### Source + +[`lib/signalwire/skills/builtin/joke.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/joke.rb) + +Line 34. + +*** + +### get\_parameter\_schema + +#### Signature + +```ruby +def get_parameter_schema +``` + +#### Source + +[`lib/signalwire/skills/builtin/joke.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/joke.rb) + +Line 52. + +*** + +### get\_prompt\_sections + +#### Signature + +```ruby +def get_prompt_sections +``` + +#### Source + +[`lib/signalwire/skills/builtin/joke.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/joke.rb) + +Line 38. + +*** + +### name + +#### Signature + +```ruby +def name +``` + +#### Source + +[`lib/signalwire/skills/builtin/joke.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/joke.rb) + +Line 11. + +*** + +### register\_tools + +#### Signature + +```ruby +def register_tools +``` + +#### Source + +[`lib/signalwire/skills/builtin/joke.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/joke.rb) + +Line 21. + +*** + +### setup + +#### Signature + +```ruby +def setup +``` + +#### Source + +[`lib/signalwire/skills/builtin/joke.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/joke.rb) + +Line 14. + +## Source + +[`lib/signalwire/skills/builtin/joke.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/joke.rb) + +Line 10. diff --git a/fern/products/sdk-reference/ruby/agents/skills/builtin/math-skill/index.mdx b/fern/products/sdk-reference/ruby/agents/skills/builtin/math-skill/index.mdx new file mode 100644 index 0000000000..70a9e11ca3 --- /dev/null +++ b/fern/products/sdk-reference/ruby/agents/skills/builtin/math-skill/index.mdx @@ -0,0 +1,135 @@ +--- +slug: "/reference/ruby/agents/skills/builtin/math-skill" +title: "MathSkill" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Skills::Builtin::MathSkill" + parent: "SignalWire::Skills::Builtin" + module: "agents.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/math.rb" + visibility: "public" +--- +# `MathSkill` + +## Signature + +```ruby +class MathSkill < SignalWire::Skills::SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/ruby/agents/skills/skill-base) + +## Methods + +### description + +#### Signature + +```ruby +def description +``` + +#### Source + +[`lib/signalwire/skills/builtin/math.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/math.rb) + +Line 11. + +*** + +### get\_parameter\_schema + +Python parity: `MathSkill.get_parameter_schema` returns only the +base-class schema (the math skill adds no custom parameters). + +#### Signature + +```ruby +def get_parameter_schema +``` + +#### Source + +[`lib/signalwire/skills/builtin/math.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/math.rb) + +Line 22. + +*** + +### get\_prompt\_sections + +#### Signature + +```ruby +def get_prompt_sections +``` + +#### Source + +[`lib/signalwire/skills/builtin/math.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/math.rb) + +Line 39. + +*** + +### name + +#### Signature + +```ruby +def name +``` + +#### Source + +[`lib/signalwire/skills/builtin/math.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/math.rb) + +Line 10. + +*** + +### register\_tools + +#### Signature + +```ruby +def register_tools +``` + +#### Source + +[`lib/signalwire/skills/builtin/math.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/math.rb) + +Line 26. + +*** + +### setup + +Python parity: `MathSkill.setup` -> `return True`. The math skill +has no external packages or environment to validate; it is always +ready once constructed. + +#### Signature + +```ruby +def setup +``` + +#### Source + +[`lib/signalwire/skills/builtin/math.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/math.rb) + +Line 16. + +## Source + +[`lib/signalwire/skills/builtin/math.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/math.rb) + +Line 9. diff --git a/fern/products/sdk-reference/ruby/agents/skills/builtin/mcp-gateway-skill/index.mdx b/fern/products/sdk-reference/ruby/agents/skills/builtin/mcp-gateway-skill/index.mdx new file mode 100644 index 0000000000..b8bdd2dbcc --- /dev/null +++ b/fern/products/sdk-reference/ruby/agents/skills/builtin/mcp-gateway-skill/index.mdx @@ -0,0 +1,162 @@ +--- +slug: "/reference/ruby/agents/skills/builtin/mcp-gateway-skill" +title: "McpGatewaySkill" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Skills::Builtin::McpGatewaySkill" + parent: "SignalWire::Skills::Builtin" + module: "agents.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/mcp_gateway.rb" + visibility: "public" +--- +# `McpGatewaySkill` + +Bridge MCP servers with SWAIG functions. + +## Signature + +```ruby +class McpGatewaySkill < SignalWire::Skills::SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/ruby/agents/skills/skill-base) + +## Methods + +### description + +#### Signature + +```ruby +def description +``` + +#### Source + +[`lib/signalwire/skills/builtin/mcp_gateway.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/mcp_gateway.rb) + +Line 16. + +*** + +### get\_global\_data + +#### Signature + +```ruby +def get_global_data +``` + +#### Source + +[`lib/signalwire/skills/builtin/mcp_gateway.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/mcp_gateway.rb) + +Line 53. + +*** + +### get\_hints + +#### Signature + +```ruby +def get_hints +``` + +#### Source + +[`lib/signalwire/skills/builtin/mcp_gateway.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/mcp_gateway.rb) + +Line 47. + +*** + +### get\_parameter\_schema + +#### Signature + +```ruby +def get_parameter_schema +``` + +#### Source + +[`lib/signalwire/skills/builtin/mcp_gateway.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/mcp_gateway.rb) + +Line 72. + +*** + +### get\_prompt\_sections + +#### Signature + +```ruby +def get_prompt_sections +``` + +#### Source + +[`lib/signalwire/skills/builtin/mcp_gateway.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/mcp_gateway.rb) + +Line 61. + +*** + +### name + +#### Signature + +```ruby +def name +``` + +#### Source + +[`lib/signalwire/skills/builtin/mcp_gateway.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/mcp_gateway.rb) + +Line 15. + +*** + +### register\_tools + +#### Signature + +```ruby +def register_tools +``` + +#### Source + +[`lib/signalwire/skills/builtin/mcp_gateway.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/mcp_gateway.rb) + +Line 34. + +*** + +### setup + +#### Signature + +```ruby +def setup +``` + +#### Source + +[`lib/signalwire/skills/builtin/mcp_gateway.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/mcp_gateway.rb) + +Line 18. + +## Source + +[`lib/signalwire/skills/builtin/mcp_gateway.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/mcp_gateway.rb) + +Line 14. diff --git a/fern/products/sdk-reference/ruby/agents/skills/builtin/native-vector-search-skill/index.mdx b/fern/products/sdk-reference/ruby/agents/skills/builtin/native-vector-search-skill/index.mdx new file mode 100644 index 0000000000..9387e34173 --- /dev/null +++ b/fern/products/sdk-reference/ruby/agents/skills/builtin/native-vector-search-skill/index.mdx @@ -0,0 +1,166 @@ +--- +slug: "/reference/ruby/agents/skills/builtin/native-vector-search-skill" +title: "NativeVectorSearchSkill" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Skills::Builtin::NativeVectorSearchSkill" + parent: "SignalWire::Skills::Builtin" + module: "agents.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/native_vector_search.rb" + visibility: "public" +--- +# `NativeVectorSearchSkill` + +Network/remote mode only (as per porting manifest). + +## Signature + +```ruby +class NativeVectorSearchSkill < SignalWire::Skills::SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/ruby/agents/skills/skill-base) + +## Methods + +### description + +#### Signature + +```ruby +def description +``` + +#### Source + +[`lib/signalwire/skills/builtin/native_vector_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/native_vector_search.rb) + +Line 16. + +*** + +### get\_hints + +#### Signature + +```ruby +def get_hints +``` + +#### Source + +[`lib/signalwire/skills/builtin/native_vector_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/native_vector_search.rb) + +Line 49. + +*** + +### get\_parameter\_schema + +#### Signature + +```ruby +def get_parameter_schema +``` + +#### Source + +[`lib/signalwire/skills/builtin/native_vector_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/native_vector_search.rb) + +Line 55. + +*** + +### instance\_key + +#### Signature + +```ruby +def instance_key +``` + +#### Source + +[`lib/signalwire/skills/builtin/native_vector_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/native_vector_search.rb) + +Line 33. + +*** + +### name + +#### Signature + +```ruby +def name +``` + +#### Source + +[`lib/signalwire/skills/builtin/native_vector_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/native_vector_search.rb) + +Line 15. + +*** + +### register\_tools + +#### Signature + +```ruby +def register_tools +``` + +#### Source + +[`lib/signalwire/skills/builtin/native_vector_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/native_vector_search.rb) + +Line 35. + +*** + +### setup + +#### Signature + +```ruby +def setup +``` + +#### Source + +[`lib/signalwire/skills/builtin/native_vector_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/native_vector_search.rb) + +Line 19. + +*** + +### supports\_multiple\_instances? + +#### Signature + +```ruby +def supports_multiple_instances? +``` + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/skills/builtin/native_vector_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/native_vector_search.rb) + +Line 17. + +## Source + +[`lib/signalwire/skills/builtin/native_vector_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/native_vector_search.rb) + +Line 14. diff --git a/fern/products/sdk-reference/ruby/agents/skills/builtin/play-background-file-skill/index.mdx b/fern/products/sdk-reference/ruby/agents/skills/builtin/play-background-file-skill/index.mdx new file mode 100644 index 0000000000..fca31fb691 --- /dev/null +++ b/fern/products/sdk-reference/ruby/agents/skills/builtin/play-background-file-skill/index.mdx @@ -0,0 +1,148 @@ +--- +slug: "/reference/ruby/agents/skills/builtin/play-background-file-skill" +title: "PlayBackgroundFileSkill" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Skills::Builtin::PlayBackgroundFileSkill" + parent: "SignalWire::Skills::Builtin" + module: "agents.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/play_background_file.rb" + visibility: "public" +--- +# `PlayBackgroundFileSkill` + +## Signature + +```ruby +class PlayBackgroundFileSkill < SignalWire::Skills::SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/ruby/agents/skills/skill-base) + +## Methods + +### description + +#### Signature + +```ruby +def description +``` + +#### Source + +[`lib/signalwire/skills/builtin/play_background_file.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/play_background_file.rb) + +Line 11. + +*** + +### get\_parameter\_schema + +#### Signature + +```ruby +def get_parameter_schema +``` + +#### Source + +[`lib/signalwire/skills/builtin/play_background_file.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/play_background_file.rb) + +Line 73. + +*** + +### instance\_key + +#### Signature + +```ruby +def instance_key +``` + +#### Source + +[`lib/signalwire/skills/builtin/play_background_file.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/play_background_file.rb) + +Line 25. + +*** + +### name + +#### Signature + +```ruby +def name +``` + +#### Source + +[`lib/signalwire/skills/builtin/play_background_file.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/play_background_file.rb) + +Line 10. + +*** + +### register\_tools + +#### Signature + +```ruby +def register_tools +``` + +#### Source + +[`lib/signalwire/skills/builtin/play_background_file.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/play_background_file.rb) + +Line 27. + +*** + +### setup + +#### Signature + +```ruby +def setup +``` + +#### Source + +[`lib/signalwire/skills/builtin/play_background_file.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/play_background_file.rb) + +Line 14. + +*** + +### supports\_multiple\_instances? + +#### Signature + +```ruby +def supports_multiple_instances? +``` + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/skills/builtin/play_background_file.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/play_background_file.rb) + +Line 12. + +## Source + +[`lib/signalwire/skills/builtin/play_background_file.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/play_background_file.rb) + +Line 9. diff --git a/fern/products/sdk-reference/ruby/agents/skills/builtin/spider-skill/index.mdx b/fern/products/sdk-reference/ruby/agents/skills/builtin/spider-skill/index.mdx new file mode 100644 index 0000000000..fa6163a334 --- /dev/null +++ b/fern/products/sdk-reference/ruby/agents/skills/builtin/spider-skill/index.mdx @@ -0,0 +1,186 @@ +--- +slug: "/reference/ruby/agents/skills/builtin/spider-skill" +title: "SpiderSkill" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Skills::Builtin::SpiderSkill" + parent: "SignalWire::Skills::Builtin" + module: "agents.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/spider.rb" + visibility: "public" +--- +# `SpiderSkill` + +## Signature + +```ruby +class SpiderSkill < SignalWire::Skills::SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/ruby/agents/skills/skill-base) + +## Methods + +### cleanup + +Python parity: `SpiderSkill.cleanup` closes the HTTP session, clears +the response cache, and logs. Ruby opens a fresh Net::HTTP connection +per request (no persistent session to close), so teardown here drops +the response cache and logs that the skill was cleaned up. Safe to +call more than once. + +#### Signature + +```ruby +def cleanup +``` + +#### Source + +[`lib/signalwire/skills/builtin/spider.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/spider.rb) + +Line 35. + +*** + +### description + +#### Signature + +```ruby +def description +``` + +#### Source + +[`lib/signalwire/skills/builtin/spider.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/spider.rb) + +Line 14. + +*** + +### get\_hints + +#### Signature + +```ruby +def get_hints +``` + +#### Source + +[`lib/signalwire/skills/builtin/spider.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/spider.rb) + +Line 69. + +*** + +### get\_parameter\_schema + +#### Signature + +```ruby +def get_parameter_schema +``` + +#### Source + +[`lib/signalwire/skills/builtin/spider.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/spider.rb) + +Line 73. + +*** + +### instance\_key + +#### Signature + +```ruby +def instance_key +``` + +#### Source + +[`lib/signalwire/skills/builtin/spider.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/spider.rb) + +Line 42. + +*** + +### name + +#### Signature + +```ruby +def name +``` + +#### Source + +[`lib/signalwire/skills/builtin/spider.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/spider.rb) + +Line 13. + +*** + +### register\_tools + +#### Signature + +```ruby +def register_tools +``` + +#### Source + +[`lib/signalwire/skills/builtin/spider.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/spider.rb) + +Line 46. + +*** + +### setup + +#### Signature + +```ruby +def setup +``` + +#### Source + +[`lib/signalwire/skills/builtin/spider.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/spider.rb) + +Line 17. + +*** + +### supports\_multiple\_instances? + +#### Signature + +```ruby +def supports_multiple_instances? +``` + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/skills/builtin/spider.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/spider.rb) + +Line 15. + +## Source + +[`lib/signalwire/skills/builtin/spider.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/spider.rb) + +Line 12. diff --git a/fern/products/sdk-reference/ruby/agents/skills/builtin/swml-transfer-skill/index.mdx b/fern/products/sdk-reference/ruby/agents/skills/builtin/swml-transfer-skill/index.mdx new file mode 100644 index 0000000000..32af6a18c6 --- /dev/null +++ b/fern/products/sdk-reference/ruby/agents/skills/builtin/swml-transfer-skill/index.mdx @@ -0,0 +1,180 @@ +--- +slug: "/reference/ruby/agents/skills/builtin/swml-transfer-skill" +title: "SwmlTransferSkill" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Skills::Builtin::SwmlTransferSkill" + parent: "SignalWire::Skills::Builtin" + module: "agents.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/swml_transfer.rb" + visibility: "public" +--- +# `SwmlTransferSkill` + +## Signature + +```ruby +class SwmlTransferSkill < SignalWire::Skills::SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/ruby/agents/skills/skill-base) + +## Methods + +### description + +#### Signature + +```ruby +def description +``` + +#### Source + +[`lib/signalwire/skills/builtin/swml_transfer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/swml_transfer.rb) + +Line 12. + +*** + +### get\_hints + +#### Signature + +```ruby +def get_hints +``` + +#### Source + +[`lib/signalwire/skills/builtin/swml_transfer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/swml_transfer.rb) + +Line 69. + +*** + +### get\_parameter\_schema + +#### Signature + +```ruby +def get_parameter_schema +``` + +#### Source + +[`lib/signalwire/skills/builtin/swml_transfer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/swml_transfer.rb) + +Line 102. + +*** + +### get\_prompt\_sections + +#### Signature + +```ruby +def get_prompt_sections +``` + +#### Source + +[`lib/signalwire/skills/builtin/swml_transfer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/swml_transfer.rb) + +Line 83. + +*** + +### instance\_key + +#### Signature + +```ruby +def instance_key +``` + +#### Source + +[`lib/signalwire/skills/builtin/swml_transfer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/swml_transfer.rb) + +Line 38. + +*** + +### name + +#### Signature + +```ruby +def name +``` + +#### Source + +[`lib/signalwire/skills/builtin/swml_transfer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/swml_transfer.rb) + +Line 11. + +*** + +### register\_tools + +#### Signature + +```ruby +def register_tools +``` + +#### Source + +[`lib/signalwire/skills/builtin/swml_transfer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/swml_transfer.rb) + +Line 40. + +*** + +### setup + +#### Signature + +```ruby +def setup +``` + +#### Source + +[`lib/signalwire/skills/builtin/swml_transfer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/swml_transfer.rb) + +Line 15. + +*** + +### supports\_multiple\_instances? + +#### Signature + +```ruby +def supports_multiple_instances? +``` + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/skills/builtin/swml_transfer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/swml_transfer.rb) + +Line 13. + +## Source + +[`lib/signalwire/skills/builtin/swml_transfer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/swml_transfer.rb) + +Line 10. diff --git a/fern/products/sdk-reference/ruby/agents/skills/builtin/weather-api-skill/index.mdx b/fern/products/sdk-reference/ruby/agents/skills/builtin/weather-api-skill/index.mdx new file mode 100644 index 0000000000..0a983caabb --- /dev/null +++ b/fern/products/sdk-reference/ruby/agents/skills/builtin/weather-api-skill/index.mdx @@ -0,0 +1,112 @@ +--- +slug: "/reference/ruby/agents/skills/builtin/weather-api-skill" +title: "WeatherApiSkill" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Skills::Builtin::WeatherApiSkill" + parent: "SignalWire::Skills::Builtin" + module: "agents.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/weather_api.rb" + visibility: "public" +--- +# `WeatherApiSkill` + +## Signature + +```ruby +class WeatherApiSkill < SignalWire::Skills::SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/ruby/agents/skills/skill-base) + +## Methods + +### description + +#### Signature + +```ruby +def description +``` + +#### Source + +[`lib/signalwire/skills/builtin/weather_api.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/weather_api.rb) + +Line 12. + +*** + +### get\_parameter\_schema + +#### Signature + +```ruby +def get_parameter_schema +``` + +#### Source + +[`lib/signalwire/skills/builtin/weather_api.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/weather_api.rb) + +Line 78. + +*** + +### name + +#### Signature + +```ruby +def name +``` + +#### Source + +[`lib/signalwire/skills/builtin/weather_api.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/weather_api.rb) + +Line 11. + +*** + +### register\_tools + +#### Signature + +```ruby +def register_tools +``` + +#### Source + +[`lib/signalwire/skills/builtin/weather_api.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/weather_api.rb) + +Line 22. + +*** + +### setup + +#### Signature + +```ruby +def setup +``` + +#### Source + +[`lib/signalwire/skills/builtin/weather_api.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/weather_api.rb) + +Line 14. + +## Source + +[`lib/signalwire/skills/builtin/weather_api.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/weather_api.rb) + +Line 10. diff --git a/fern/products/sdk-reference/ruby/agents/skills/builtin/web-search-skill/index.mdx b/fern/products/sdk-reference/ruby/agents/skills/builtin/web-search-skill/index.mdx new file mode 100644 index 0000000000..6275987121 --- /dev/null +++ b/fern/products/sdk-reference/ruby/agents/skills/builtin/web-search-skill/index.mdx @@ -0,0 +1,196 @@ +--- +slug: "/reference/ruby/agents/skills/builtin/web-search-skill" +title: "WebSearchSkill" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Skills::Builtin::WebSearchSkill" + parent: "SignalWire::Skills::Builtin" + module: "agents.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/web_search.rb" + visibility: "public" +--- +# `WebSearchSkill` + +## Signature + +```ruby +class WebSearchSkill < SignalWire::Skills::SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/ruby/agents/skills/skill-base) + +## Methods + +### description + +#### Signature + +```ruby +def description +``` + +#### Source + +[`lib/signalwire/skills/builtin/web_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/web_search.rb) + +Line 15. + +*** + +### get\_global\_data + +#### Signature + +```ruby +def get_global_data +``` + +#### Source + +[`lib/signalwire/skills/builtin/web_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/web_search.rb) + +Line 77. + +*** + +### get\_parameter\_schema + +#### Signature + +```ruby +def get_parameter_schema +``` + +#### Source + +[`lib/signalwire/skills/builtin/web_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/web_search.rb) + +Line 96. + +*** + +### get\_prompt\_sections + +#### Signature + +```ruby +def get_prompt_sections +``` + +#### Source + +[`lib/signalwire/skills/builtin/web_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/web_search.rb) + +Line 81. + +*** + +### instance\_key + +#### Signature + +```ruby +def instance_key +``` + +#### Source + +[`lib/signalwire/skills/builtin/web_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/web_search.rb) + +Line 62. + +*** + +### name + +#### Signature + +```ruby +def name +``` + +#### Source + +[`lib/signalwire/skills/builtin/web_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/web_search.rb) + +Line 14. + +*** + +### register\_tools + +#### Signature + +```ruby +def register_tools +``` + +#### Source + +[`lib/signalwire/skills/builtin/web_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/web_search.rb) + +Line 64. + +*** + +### setup + +#### Signature + +```ruby +def setup +``` + +#### Source + +[`lib/signalwire/skills/builtin/web_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/web_search.rb) + +Line 19. + +*** + +### supports\_multiple\_instances? + +#### Signature + +```ruby +def supports_multiple_instances? +``` + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/skills/builtin/web_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/web_search.rb) + +Line 17. + +*** + +### version + +#### Signature + +```ruby +def version +``` + +#### Source + +[`lib/signalwire/skills/builtin/web_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/web_search.rb) + +Line 16. + +## Source + +[`lib/signalwire/skills/builtin/web_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/web_search.rb) + +Line 13. diff --git a/fern/products/sdk-reference/ruby/agents/skills/builtin/wikipedia-search-skill/index.mdx b/fern/products/sdk-reference/ruby/agents/skills/builtin/wikipedia-search-skill/index.mdx new file mode 100644 index 0000000000..e630e7e9ae --- /dev/null +++ b/fern/products/sdk-reference/ruby/agents/skills/builtin/wikipedia-search-skill/index.mdx @@ -0,0 +1,156 @@ +--- +slug: "/reference/ruby/agents/skills/builtin/wikipedia-search-skill" +title: "WikipediaSearchSkill" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Skills::Builtin::WikipediaSearchSkill" + parent: "SignalWire::Skills::Builtin" + module: "agents.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/wikipedia_search.rb" + visibility: "public" +--- +# `WikipediaSearchSkill` + +## Signature + +```ruby +class WikipediaSearchSkill < SignalWire::Skills::SkillBase +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/ruby/agents/skills/skill-base) + +## Methods + +### description + +#### Signature + +```ruby +def description +``` + +#### Source + +[`lib/signalwire/skills/builtin/wikipedia_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/wikipedia_search.rb) + +Line 15. + +*** + +### get\_parameter\_schema + +#### Signature + +```ruby +def get_parameter_schema +``` + +#### Source + +[`lib/signalwire/skills/builtin/wikipedia_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/wikipedia_search.rb) + +Line 51. + +*** + +### get\_prompt\_sections + +#### Signature + +```ruby +def get_prompt_sections +``` + +#### Source + +[`lib/signalwire/skills/builtin/wikipedia_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/wikipedia_search.rb) + +Line 37. + +*** + +### name + +#### Signature + +```ruby +def name +``` + +#### Source + +[`lib/signalwire/skills/builtin/wikipedia_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/wikipedia_search.rb) + +Line 14. + +*** + +### register\_tools + +#### Signature + +```ruby +def register_tools +``` + +#### Source + +[`lib/signalwire/skills/builtin/wikipedia_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/wikipedia_search.rb) + +Line 24. + +*** + +### search\_wiki + +Python parity: `WikipediaSearchSkill.search_wiki(query)` — the +extracted helper that performs the two-step Wikipedia API lookup +(search, then per-title extract) and returns the formatted article +text (or the no-results message). Public so callers/tests can invoke +the lookup directly, matching Python where the tool handler delegates +to this method. `@num_results`/`@no_results_msg` are populated by +\#setup; fall back to defaults if called before setup. + +#### Signature + +```ruby +def search_wiki(query) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/skills/builtin/wikipedia_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/wikipedia_search.rb) + +Line 65. + +*** + +### setup + +#### Signature + +```ruby +def setup +``` + +#### Source + +[`lib/signalwire/skills/builtin/wikipedia_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/wikipedia_search.rb) + +Line 17. + +## Source + +[`lib/signalwire/skills/builtin/wikipedia_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/wikipedia_search.rb) + +Line 13. diff --git a/fern/products/sdk-reference/ruby/agents/skills/index.mdx b/fern/products/sdk-reference/ruby/agents/skills/index.mdx new file mode 100644 index 0000000000..eccdd80a37 --- /dev/null +++ b/fern/products/sdk-reference/ruby/agents/skills/index.mdx @@ -0,0 +1,54 @@ +--- +slug: "/reference/ruby/agents/skills" +title: "Skills" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "module" + language: "ruby" + qualified_name: "SignalWire::Skills" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb" + visibility: "public" +--- +# `Skills` + +## Signature + +```ruby +module Skills +``` + +## Classes + + + + Base class for all skills. Subclasses override the metadata methods and +register\_tools+ to supply tool hashes. + + + + Thread-safe lifecycle manager for loaded skill instances. + + + + Global registry mapping skill names to factory lambdas. + + + +## Modules + + + + + + Named constants for the skills that ship built in with this gem. + + + +## Source + +[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) + +Line 12. diff --git a/fern/products/sdk-reference/ruby/agents/skills/skill-base/index.mdx b/fern/products/sdk-reference/ruby/agents/skills/skill-base/index.mdx new file mode 100644 index 0000000000..1189a8d345 --- /dev/null +++ b/fern/products/sdk-reference/ruby/agents/skills/skill-base/index.mdx @@ -0,0 +1,548 @@ +--- +slug: "/reference/ruby/agents/skills/skill-base" +title: "SkillBase" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Skills::SkillBase" + parent: "SignalWire::Skills" + module: "agents.Skills" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb" + visibility: "public" +--- +# `SkillBase` + +Base class for all skills. Subclasses override the metadata methods +and +register\_tools+ to supply tool hashes. + +## Signature + +```ruby +class SkillBase < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### agent + +Python parity: + +- `params` — params hash passed at construction +- `agent` — owning AgentBase instance (or nil for standalone) +- `logger` — namespaced logger `signalwire.skills.` +- `swaig_fields` — extra SWAIG fields merged into tool defs; + pulled out of `params` if provided + +#### Signature + +```ruby +attr_reader agent -> Object +``` + +#### Source + +[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) + +Line 22. + +*** + +### cleanup + +Called when the skill is unloaded. + +#### Signature + +```ruby +def cleanup +``` + +#### Source + +[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) + +Line 72. + +*** + +### description + +#### Signature + +```ruby +def description +``` + +#### Throws + +- `NotImplementedError` + +#### Source + +[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) + +Line 25. + +*** + +### get\_global\_data + +Global data to merge into the agent. + +#### Signature + +```ruby +def get_global_data +``` + +#### Source + +[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) + +Line 66. + +*** + +### get\_hints + +Speech recognition hints. + +#### Signature + +```ruby +def get_hints +``` + +#### Source + +[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) + +Line 63. + +*** + +### get\_param + +Helper to get a param with env-var fallback. + +#### Signature + +```ruby +def get_param(key, env_var: nil, default: nil) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) + +Line 153. + +*** + +### get\_parameter\_schema + +Parameter schema for GUI / validation. + +#### Signature + +```ruby +def get_parameter_schema +``` + +#### Source + +[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) + +Line 78. + +*** + +### get\_prompt\_sections + +Prompt sections to add to the agent. + +#### Signature + +```ruby +def get_prompt_sections +``` + +#### Source + +[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) + +Line 69. + +*** + +### get\_skill\_data + +Read this skill instance's namespaced data out of a raw\_data hash. + +Python parity: `SkillBase.get_skill_data(raw_data)` — reads +`raw_data["global_data"][namespace]` and returns it (or an +empty hash when absent). +raw\_data+ is the per-call data hash +SWAIG handlers receive; +global\_data+ is its agent-state bucket. +Tolerates symbol or string keys for `global_data`. + +#### Signature + +```ruby +def get_skill_data(raw_data) +``` + +#### Parameters + + + the raw\_data passed to a SWAIG handler. + + +#### Returns + +`Hash` — the namespaced skill state, or +\{\}+ if not present. + +#### Source + +[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) + +Line 90. + +*** + +### initialize + +Python parity: `SkillBase.__init__(self, agent, params=None)`. +First positional arg is the owning AgentBase (or nil for +standalone). The second is the params hash. We accept the legacy +1-arg form for backwards compatibility (`DateTimeSkill.new({...})`). + +#### Signature + +```ruby +def initialize(agent = nil, params = nil) +``` + +#### Parameters + + + + + +#### Returns + +`SkillBase` — a new instance of SkillBase + +#### Source + +[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) + +Line 38. + +*** + +### instance\_key + +Unique key for tracking this skill instance. + +#### Signature + +```ruby +def instance_key +``` + +#### Source + +[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) + +Line 75. + +*** + +### logger + +Python parity: + +- `params` — params hash passed at construction +- `agent` — owning AgentBase instance (or nil for standalone) +- `logger` — namespaced logger `signalwire.skills.` +- `swaig_fields` — extra SWAIG fields merged into tool defs; + pulled out of `params` if provided + +#### Signature + +```ruby +attr_reader logger -> Object +``` + +#### Source + +[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) + +Line 22. + +*** + +### name + +#### Signature + +```ruby +def name +``` + +#### Throws + +- `NotImplementedError` + +#### Source + +[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) + +Line 24. + +*** + +### params + +Python parity: + +- `params` — params hash passed at construction +- `agent` — owning AgentBase instance (or nil for standalone) +- `logger` — namespaced logger `signalwire.skills.` +- `swaig_fields` — extra SWAIG fields merged into tool defs; + pulled out of `params` if provided + +#### Signature + +```ruby +attr_reader params -> Object +``` + +#### Source + +[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) + +Line 22. + +*** + +### register\_tools + +Return an Array of tool definition hashes. Each hash should have: +:name, :description, :parameters, :handler (lambda/proc) + +#### Signature + +```ruby +def register_tools +``` + +#### Source + +[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) + +Line 60. + +*** + +### required\_env\_vars + +#### Signature + +```ruby +def required_env_vars +``` + +#### Source + +[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) + +Line 27. + +*** + +### setup + +Called once after construction. Return +true+ if the skill is ready. + +#### Signature + +```ruby +def setup +``` + +#### Source + +[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) + +Line 56. + +*** + +### supports\_multiple\_instances? + +#### Signature + +```ruby +def supports_multiple_instances? +``` + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) + +Line 32. + +*** + +### swaig\_fields + +Python parity: + +- `params` — params hash passed at construction +- `agent` — owning AgentBase instance (or nil for standalone) +- `logger` — namespaced logger `signalwire.skills.` +- `swaig_fields` — extra SWAIG fields merged into tool defs; + pulled out of `params` if provided + +#### Signature + +```ruby +attr_reader swaig_fields -> Object +``` + +#### Source + +[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) + +Line 22. + +*** + +### update\_skill\_data + +Write this skill instance's namespaced data into a FunctionResult. + +Python parity: `SkillBase.update_skill_data(result, data)` — +wraps +data+ under the skill namespace and calls +`result.update_global_data`. Returns +result+ so callers can +chain (mirrors Python returning the result). + +#### Signature + +```ruby +def update_skill_data(result, data) +``` + +#### Parameters + + + + + the skill state to persist under the namespace. + + +#### Returns + +`SignalWire::Swaig::FunctionResult` — +result+, for chaining. + +#### Source + +[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) + +Line 106. + +*** + +### validate\_env\_vars + +Check that every required environment variable is set. + +Python parity: `SkillBase.validate_env_vars` — returns +false+ +(and logs the missing names) when any entry of \{#required\_env\_vars\} +is absent or empty in +ENV+, otherwise +true+. + +#### Signature + +```ruby +def validate_env_vars +``` + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) + +Line 118. + +*** + +### validate\_packages + +Check that every required gem is loadable. + +Python parity: `SkillBase.validate_packages` (Python imports the +module; Ruby +require+s the gem). Returns +false+ (and logs the +missing names) when any entry of \{#required\_packages\} can't be ++require+d, otherwise +true+. A successful +require+ leaves the +gem loaded — matching Python's `importlib.import_module`. + +#### Signature + +```ruby +def validate_packages +``` + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) + +Line 136. + +*** + +### version + +#### Signature + +```ruby +def version +``` + +#### Source + +[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) + +Line 26. + +## Source + +[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) + +Line 15. diff --git a/fern/products/sdk-reference/ruby/agents/skills/skill-manager/index.mdx b/fern/products/sdk-reference/ruby/agents/skills/skill-manager/index.mdx new file mode 100644 index 0000000000..c39222d724 --- /dev/null +++ b/fern/products/sdk-reference/ruby/agents/skills/skill-manager/index.mdx @@ -0,0 +1,276 @@ +--- +slug: "/reference/ruby/agents/skills/skill-manager" +title: "SkillManager" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Skills::SkillManager" + parent: "SignalWire::Skills" + module: "agents.Skills" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_manager.rb" + visibility: "public" +--- +# `SkillManager` + +Thread-safe lifecycle manager for loaded skill instances. + +manager = SkillManager.new +manager.load('datetime', DateTimeSkill.new) +manager.get('datetime') #=> <DateTimeSkill> +manager.unload('datetime') + +## Signature + +```ruby +class SkillManager < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### agent + +Python parity: + +- `agent` — owning AgentBase instance (or nil) +- `logger` — namespaced logger + +#### Signature + +```ruby +attr_reader agent -> Object +``` + +#### Source + +[`lib/signalwire/skills/skill_manager.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_manager.rb) + +Line 25. + +*** + +### clear + +Unload all skills. + +#### Signature + +```ruby +def clear +``` + +#### Source + +[`lib/signalwire/skills/skill_manager.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_manager.rb) + +Line 89. + +*** + +### get + +Retrieve a loaded skill. + +#### Signature + +```ruby +def get(key) +``` + +#### Parameters + + + +#### Returns + +`SkillBase | nil` + +#### Source + +[`lib/signalwire/skills/skill_manager.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_manager.rb) + +Line 69. + +*** + +### initialize + +Python parity: `SkillManager.__init__(self, agent)` — +SkillManager keeps a back-pointer to its agent so loaded +skills can attach prompt sections / SWAIG tools directly. +Ruby allows nil for standalone use (tests, registry tools). + +#### Signature + +```ruby +def initialize(agent = nil) +``` + +#### Parameters + + + +#### Returns + +`SkillManager` — a new instance of SkillManager + +#### Source + +[`lib/signalwire/skills/skill_manager.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_manager.rb) + +Line 31. + +*** + +### load + +Load a skill instance. Calls +setup+ on the skill; raises if it fails. + +#### Signature + +```ruby +def load(key, skill) +``` + +#### Parameters + + + the instance key + + + + the skill instance + + +#### Returns + +`SkillBase` — the loaded skill + +#### Source + +[`lib/signalwire/skills/skill_manager.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_manager.rb) + +Line 42. + +*** + +### loaded\_keys + +#### Signature + +```ruby +def loaded_keys +``` + +#### Returns + +`Array` + +#### Source + +[`lib/signalwire/skills/skill_manager.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_manager.rb) + +Line 79. + +*** + +### loaded? + +#### Signature + +```ruby +def loaded?(key) +``` + +#### Parameters + + + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/skills/skill_manager.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_manager.rb) + +Line 74. + +*** + +### logger + +Python parity: + +- `agent` — owning AgentBase instance (or nil) +- `logger` — namespaced logger + +#### Signature + +```ruby +attr_reader logger -> Object +``` + +#### Source + +[`lib/signalwire/skills/skill_manager.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_manager.rb) + +Line 25. + +*** + +### size + +#### Signature + +```ruby +def size +``` + +#### Returns + +`Integer` + +#### Source + +[`lib/signalwire/skills/skill_manager.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_manager.rb) + +Line 84. + +*** + +### unload + +Unload a skill by instance key. Calls +cleanup+ on it. + +#### Signature + +```ruby +def unload(key) +``` + +#### Parameters + + + +#### Returns + +`SkillBase | nil` — the removed skill, or nil + +#### Source + +[`lib/signalwire/skills/skill_manager.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_manager.rb) + +Line 58. + +## Source + +[`lib/signalwire/skills/skill_manager.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_manager.rb) + +Line 21. diff --git a/fern/products/sdk-reference/ruby/agents/skills/skill-name/index.mdx b/fern/products/sdk-reference/ruby/agents/skills/skill-name/index.mdx new file mode 100644 index 0000000000..7f681f1a49 --- /dev/null +++ b/fern/products/sdk-reference/ruby/agents/skills/skill-name/index.mdx @@ -0,0 +1,130 @@ +--- +slug: "/reference/ruby/agents/skills/skill-name" +title: "SkillName" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "module" + language: "ruby" + qualified_name: "SignalWire::Skills::SkillName" + parent: "SignalWire::Skills" + module: "agents.Skills" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_name.rb" + visibility: "public" +--- +# `SkillName` + +Named constants for the skills that ship built in with this gem. + +Skill names are an open _string_ set in the Python reference +(`add_skill` takes a bare +str+), which keeps parity and lets callers +load custom / third-party skills. \{SkillName\} gives the built-in +skills a named alternative so a typo — +add\_skill("datetiem")+ — has a +canonical constant to reach for instead, while the string path stays +available for parity and custom skills. + +Each constant's value IS the snake\_case wire name the +\{SkillRegistry\} is keyed by (the same string a skill reports from its ++#name+), so these are interchangeable: + +agent.add\_skill(SignalWire::Skills::SkillName::DATETIME) # named +agent.add\_skill("datetime") # string (parity) +agent.add\_skill("my\_custom\_skill") # open set: custom ok + +Single source of truth: \{ALL\} is exactly the set the registry +registers and that +AgentBase#add\_skill+ validates against +(+SkillRegistry.builtin\_skill\_names+ is derived from \{ALL\}). The +spec proves the two never drift. + +Idiom note: mirrors +SignalWire::Relay+'s constants module — flat ++NAME = 'value'+ string constants grouped into a frozen +ALL+ array. + +## Signature + +```ruby +module SkillName +``` + +## Constants + + + Every built-in skill name, sorted to match +SkillRegistry.builtin\_skill\_names+ (which sorts the +builtin/+ directory listing). This is the single source of truth for the built-in set. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## Methods + +### builtin? + +#### Signature + +```ruby +def builtin?(name) +``` + +#### Parameters + + + a candidate skill name + + +#### Returns + +`Boolean` — true when +name+ is one of the built-in skills. Custom / third-party skill names return false (the set is open). + +#### Source + +[`lib/signalwire/skills/skill_name.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_name.rb) + +Line 82. + +## Source + +[`lib/signalwire/skills/skill_name.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_name.rb) + +Line 34. diff --git a/fern/products/sdk-reference/ruby/agents/skills/skill-registry/index.mdx b/fern/products/sdk-reference/ruby/agents/skills/skill-registry/index.mdx new file mode 100644 index 0000000000..3078eaeb04 --- /dev/null +++ b/fern/products/sdk-reference/ruby/agents/skills/skill-registry/index.mdx @@ -0,0 +1,587 @@ +--- +slug: "/reference/ruby/agents/skills/skill-registry" +title: "SkillRegistry" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Skills::SkillRegistry" + parent: "SignalWire::Skills" + module: "agents.Skills" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_registry.rb" + visibility: "public" +--- +# `SkillRegistry` + +Global registry mapping skill names to factory lambdas. + +SkillRegistry.register('datetime') \{ |params| DateTimeSkill.new(params) \} +factory = SkillRegistry.get\_factory('datetime') +skill = factory.call(\{ 'timezone' => 'UTC' \}) + +## Signature + +```ruby +class SkillRegistry < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### add\_skill\_directory + +Add a directory to search for skills. + +Mirrors Python's `SkillRegistry.add_skill_directory`: validate +that the path exists and is a directory, then append it +(de-duplicated) to `@external_paths`. Raises `ArgumentError` +(the Ruby analog of Python's `ValueError`) for invalid input. + +#### Signature + +```ruby +def add_skill_directory(path) +``` + +#### Parameters + + + absolute or relative path to a directory + + +#### Returns + +`void` + +#### Throws + +- `ArgumentError` — when the path doesn't exist or isn't a directory. + +#### Source + +[`lib/signalwire/skills/skill_registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_registry.rb) + +Line 53. + +*** + +### builtin\_skill\_names + +Skill names this gem ships as built-ins. + +Single source of truth: this returns \{SkillName::ALL\}, the named +constant set. The +builtin/+ directory is the runtime origin of +the actual factories (one file per skill, each calling ++SkillRegistry.register+ on require); the spec asserts the +directory listing and \{SkillName::ALL\} stay identical so the +named set can never silently drift from what gets registered. + +#### Signature + +```ruby +def builtin_skill_names +``` + +#### Returns + +`Array` + +#### Source + +[`lib/signalwire/skills/skill_registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_registry.rb) + +Line 253. + +*** + +### discover\_skills + +Ensure built-in skills are discovered/registered (instance form). + +Python parity: `SkillRegistry.discover_skills` is a deprecated +no-op there because skills load on-demand. Ruby ships its +built-ins explicitly, so the faithful equivalent is to make sure +they're registered — idempotent, since \{register\_builtins!\} just +re-requires the (already loaded) built-in files. Returns the +registered skill names so callers can confirm discovery ran. + +#### Signature + +```ruby +def discover_skills +``` + +#### Returns + +`Array` — currently registered skill names. + +#### Source + +[`lib/signalwire/skills/skill_registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_registry.rb) + +Line 102. + +*** + +### discover\_skills + +Ensure built-in skills are registered and return their names. + +Python parity: `SkillRegistry.discover_skills` (a no-op there +since skills load on-demand). Ruby ships built-ins explicitly, +so this guarantees they're registered via \{register\_builtins!\} +(idempotent) and returns the registered skill names. + +#### Signature + +```ruby +def discover_skills +``` + +#### Returns + +`Array` — currently registered skill names. + +#### Source + +[`lib/signalwire/skills/skill_registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_registry.rb) + +Line 268. + +*** + +### external\_paths + +External skill directories registered via #add\_skill\_directory. +Mirrors Python's `_external_paths` accessor surface. + +#### Signature + +```ruby +attr_reader external_paths -> Object +``` + +#### Source + +[`lib/signalwire/skills/skill_registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_registry.rb) + +Line 40. + +*** + +### get\_all\_skills\_schema + +Get complete schema for all registered skills (instance form). + +Mirrors Python's instance-method +`SkillRegistry.get_all_skills_schema()` — returns a hash keyed +by skill name, each value containing parameter metadata. Ruby +skills don't carry rich Python-style parameter introspection in +v1, so the value defaults to a minimal shape with the skill +name; built-ins that expose `parameter_schema` get richer +detail. + +#### Signature + +```ruby +def get_all_skills_schema +``` + +#### Returns + +`Hash{String => Hash}` + +#### Source + +[`lib/signalwire/skills/skill_registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_registry.rb) + +Line 76. + +*** + +### get\_all\_skills\_schema + +Get complete schema for all registered skills. + +Mirrors Python's +`SkillRegistry.get_all_skills_schema()` — returns a hash +keyed by skill name, with each value containing parameter +metadata. Ruby skills don't carry rich Python-style parameter +introspection in v1, so the value defaults to a minimal shape +with the skill name; built-in skills that expose +`parameter_schema` get richer detail. + +#### Signature + +```ruby +def get_all_skills_schema +``` + +#### Returns + +`Hash{String => Hash}` + +#### Source + +[`lib/signalwire/skills/skill_registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_registry.rb) + +Line 323. + +*** + +### get\_factory + +Get the factory for a skill. + +#### Signature + +```ruby +def get_factory(skill_name) +``` + +#### Parameters + + + +#### Returns + +`Proc | nil` + +#### Source + +[`lib/signalwire/skills/skill_registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_registry.rb) + +Line 191. + +*** + +### initialize + +Per-instance state for the skill-directory parity surface; the +class-method API above is preserved for backwards compatibility, +but `add_skill_directory` mirrors Python's instance-method shape +exactly (Python's `signalwire.skills.registry.SkillRegistry`). + +#### Signature + +```ruby +def initialize +``` + +#### Returns + +`SkillRegistry` — a new instance of SkillRegistry + +#### Source + +[`lib/signalwire/skills/skill_registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_registry.rb) + +Line 28. + +*** + +### last\_registered + +The most recently registered skill name (instance form). + +#### Signature + +```ruby +attr_reader last_registered -> Object +``` + +#### Source + +[`lib/signalwire/skills/skill_registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_registry.rb) + +Line 167. + +*** + +### list\_all\_skill\_sources + +List skill sources and the skills available from each (instance form). + +Python parity: `SkillRegistry.list_all_skill_sources` returns a +hash mapping source type to skill names. This instance form folds +in any directories registered via \{#add\_skill\_directory\}. + +#### Signature + +```ruby +def list_all_skill_sources +``` + +#### Returns + +`Hash{String => Array}` + +#### Source + +[`lib/signalwire/skills/skill_registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_registry.rb) + +Line 113. + +*** + +### list\_all\_skill\_sources + +List all skill sources and the skills available from each. + +Python parity: `SkillRegistry.list_all_skill_sources` returns +a hash keyed by source type. Ruby has no Python-style entry +points, so that bucket is always empty; +registered+ holds any +skill that isn't a shipped built-in (e.g. registered via +\{register\_skill\}). +external\_paths+ folds in skill subdirectory +names found under any directories passed in. + +#### Signature + +```ruby +def list_all_skill_sources(external_paths: []) +``` + +#### Parameters + + + +#### Returns + +`Hash{String => Array}` + +#### Source + +[`lib/signalwire/skills/skill_registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_registry.rb) + +Line 285. + +*** + +### list\_skills + +List all registered skill names (instance form). + +Python parity: `SkillRegistry.list_skills(self)` returns a list of +dictionaries describing each skill. Ruby v1 returns the +registered names plus available metadata (description / version) +when the factory can be instantiated without arguments. + +#### Signature + +```ruby +def list_skills +``` + +#### Returns + +`Array` + +#### Source + +[`lib/signalwire/skills/skill_registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_registry.rb) + +Line 88. + +*** + +### list\_skills + +List all registered skill names. + +#### Signature + +```ruby +def list_skills +``` + +#### Returns + +`Array` + +#### Source + +[`lib/signalwire/skills/skill_registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_registry.rb) + +Line 197. + +*** + +### logger + +Python parity: `self.logger = get_logger("skill_registry")`. +Per-instance logger; the class-level API uses the same name. + +#### Signature + +```ruby +attr_reader logger -> Object +``` + +#### Source + +[`lib/signalwire/skills/skill_registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_registry.rb) + +Line 36. + +*** + +### register + +Register a skill factory. + +#### Signature + +```ruby +def register(skill_name, &block) +``` + +#### Parameters + + + + + +#### Yields + +- `params` — block that receives params hash and returns a SkillBase + +#### Source + +[`lib/signalwire/skills/skill_registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_registry.rb) + +Line 173. + +*** + +### register\_builtins! + +Register all built-in skills. Called at load time. + +#### Signature + +```ruby +def register_builtins! +``` + +#### Source + +[`lib/signalwire/skills/skill_registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_registry.rb) + +Line 237. + +*** + +### register\_skill + +Register a skill class or factory (instance form). + +Python parity: `SkillRegistry.register_skill(self, skill_class)` +accepts a SkillBase subclass and stores its factory. Ruby +accepts either a class with a `new(params)` constructor, a +`Proc` /`Lambda`, or a 2-arg `(name, factory)` form for +explicit naming. Returns `self` for chaining. + +#### Signature + +```ruby +def register_skill(skill_class_or_name, factory = nil) +``` + +#### Parameters + + + either a SkillBase subclass (Python style) or a string skill name (legacy 2-arg form). + + + + explicit factory when first arg is a string (legacy form). + + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/skills/skill_registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_registry.rb) + +Line 130. + +*** + +### register\_skill + +Register with an explicit lambda / proc instead of a block. + +#### Signature + +```ruby +def register_skill(skill_name, factory) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/skills/skill_registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_registry.rb) + +Line 182. + +*** + +### registered? + +Check if a skill is registered. + +#### Signature + +```ruby +def registered?(skill_name) +``` + +#### Parameters + + + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/skills/skill_registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_registry.rb) + +Line 227. + +*** + +### reset! + +Clear all registrations (primarily for testing). + +#### Signature + +```ruby +def reset! +``` + +#### Source + +[`lib/signalwire/skills/skill_registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_registry.rb) + +Line 232. + +## Source + +[`lib/signalwire/skills/skill_registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_registry.rb) + +Line 20. diff --git a/fern/products/sdk-reference/ruby/agents/swaig/codec/index.mdx b/fern/products/sdk-reference/ruby/agents/swaig/codec/index.mdx new file mode 100644 index 0000000000..97513f5a1e --- /dev/null +++ b/fern/products/sdk-reference/ruby/agents/swaig/codec/index.mdx @@ -0,0 +1,44 @@ +--- +slug: "/reference/ruby/agents/swaig/codec" +title: "Codec" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "module" + language: "ruby" + qualified_name: "SignalWire::Swaig::Codec" + parent: "SignalWire::Swaig" + module: "agents.Swaig" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb" + visibility: "public" +--- +# `Codec` + +RTP payload codec for the +tap+ verb. + +This is the 2-value SWAIG tap codec only. It is DELIBERATELY NOT the +broader RELAY +stream+/+connect+ device-codec superset (which adds +OPUS/G729/G722/VP8/H264). Never reuse this constant there. + +## Signature + +```ruby +module Codec +``` + +## Constants + + + Every valid +tap+ codec, in wire order. + + + + + + +## Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 72. diff --git a/fern/products/sdk-reference/ruby/agents/swaig/function-result/index.mdx b/fern/products/sdk-reference/ruby/agents/swaig/function-result/index.mdx new file mode 100644 index 0000000000..fdc7c09e7f --- /dev/null +++ b/fern/products/sdk-reference/ruby/agents/swaig/function-result/index.mdx @@ -0,0 +1,1760 @@ +--- +slug: "/reference/ruby/agents/swaig/function-result" +title: "FunctionResult" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Swaig::FunctionResult" + parent: "SignalWire::Swaig" + module: "agents.Swaig" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb" + visibility: "public" +--- +# `FunctionResult` + +Response builder that tool handlers return. +All mutating methods return +self+ for fluent chaining. + +result = FunctionResult.new("Found your order") +.update\_global\_data("order\_id" => "12345") +.say("Let me look that up") + +The result object has three main components: + +1. response - Text the AI should say back to the user +2. action - List of structured actions to execute +3. post\_process - Whether to let AI take another turn before executing actions + +## Signature + +```ruby +class FunctionResult < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### action + +Returns the value of attribute action. + +#### Signature + +```ruby +attr_accessor action <-> Object +``` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 93. + +*** + +### action= + +Sets the attribute action + +#### Signature + +```ruby +attr_accessor action= <-> Object +``` + +#### Parameters + + + the value to set the attribute action to. + + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 93. + +*** + +### add\_action + +Add a single structured action. + +#### Signature + +```ruby +def add_action(name, data) +``` + +#### Parameters + + + action key + + + + action value + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 125. + +*** + +### add\_actions + +Add multiple structured actions at once. + +#### Signature + +```ruby +def add_actions(actions) +``` + +#### Parameters + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 133. + +*** + +### add\_dynamic\_hints + +Add dynamic speech recognition hints. + +#### Signature + +```ruby +def add_dynamic_hints(hints) +``` + +#### Parameters + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 410. + +*** + +### clear\_dynamic\_hints + +Clear all dynamic speech recognition hints. + +#### Signature + +```ruby +def clear_dynamic_hints +``` + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 416. + +*** + +### connect + +Connect / transfer the call to another destination. + +#### Signature + +```ruby +def connect(destination, final: true, from_addr: nil) +``` + +#### Parameters + + + phone number, SIP address, etc. + + + + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 148. + +*** + +### create\_payment\_action + +Create a payment action for use inside payment prompts. + +#### Signature + +```ruby +def create_payment_action(action_type, phrase) +``` + +#### Parameters + + + "Say" or "Play" + + + + +#### Returns + +`Hash` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 819. + +*** + +### create\_payment\_parameter + +Create a payment parameter for use with +pay+. + +#### Signature + +```ruby +def create_payment_parameter(name, value) +``` + +#### Parameters + + + + + +#### Returns + +`Hash` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 828. + +*** + +### create\_payment\_prompt + +Create a payment prompt structure for use with +pay+. + +#### Signature + +```ruby +def create_payment_prompt(for_situation, actions, card_type: nil, error_type: nil) +``` + +#### Parameters + + + e.g. "payment-card-number" + + + + actions with "type" and "phrase" keys + + + + + + +#### Returns + +`Hash` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 804. + +*** + +### enable\_extensive\_data + +Send full data to LLM for this turn only. + +#### Signature + +```ruby +def enable_extensive_data(enabled = true) +``` + +#### Parameters + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 452. + +*** + +### enable\_functions\_on\_timeout + +Enable function calls on speaker timeout. + +#### Signature + +```ruby +def enable_functions_on_timeout(enabled = true) +``` + +#### Parameters + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 445. + +*** + +### end\_of\_speech\_timeout= + +\--- Idiomatic Ruby accessors (additive aliases over set\_\* originals) --- + +#### Signature + +```ruby +def end_of_speech_timeout=(v) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 863. + +*** + +### execute\_rpc + +Execute a generic RPC method via SWML. + +#### Signature + +```ruby +def execute_rpc(method, params: nil, call_id: nil, node_id: nil) +``` + +#### Parameters + + + RPC method name + + + + + + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 726. + +*** + +### execute\_swml + +Execute SWML content with optional transfer. + +#### Signature + +```ruby +def execute_swml(swml_content, transfer: false) +``` + +#### Parameters + + + SWML data structure or JSON string + + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 472. + +*** + +### hangup + +Terminate the call. + +#### Signature + +```ruby +def hangup +``` + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 192. + +*** + +### hold + +Put the call on hold. + +#### Signature + +```ruby +def hold(timeout = 300) +``` + +#### Parameters + + + seconds, clamped to 0..900 + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 199. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(response = nil, post_process: false) +``` + +#### Parameters + + + text the AI speaks back to the user + + + + +#### Returns + +`FunctionResult` — a new instance of FunctionResult + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 97. + +*** + +### join\_conference + +Join an ad-hoc audio conference via SWML. + +#### Signature + +```ruby +def join_conference(name, muted: false, beep: "true", start_on_enter: true, end_on_exit: false, wait_url: nil, max_participants: 250, record: "do-not-record", region: nil, trim: "trim-silence", coach: nil, status_callback_event: nil, status_callback: nil, status_callback_method: "POST", recording_status_callback: nil, recording_status_callback_method: "POST", recording_status_callback_event: "completed", result: nil) +``` + +#### Parameters + + + conference name (required) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`self` + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 498. + +*** + +### join\_room + +Join a RELAY room via SWML. + +#### Signature + +```ruby +def join_room(name) +``` + +#### Parameters + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 574. + +*** + +### metadata= + +#### Signature + +```ruby +def metadata=(v) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 867. + +*** + +### pay + +Process payment using SWML pay action. + +#### Signature + +```ruby +def pay(payment_connector_url:, input_method: "dtmf", status_url: nil, payment_method: "credit-card", timeout: 5, max_attempts: 1, security_code: true, postal_code: true, min_postal_code_length: 0, token_type: "reusable", charge_amount: nil, currency: "usd", language: "en-US", voice: "woman", description: nil, valid_card_types: "visa mastercard amex", parameters: nil, prompts: nil, ai_response: 'The payment status is ${pay_result}, do not mention anything else about collecting payment if successful.') +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 672. + +*** + +### play\_background\_file + +Play audio/video file in the background. + +#### Signature + +```ruby +def play_background_file(filename, wait: false) +``` + +#### Parameters + + + audio/video filename or URL + + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 340. + +*** + +### post\_process + +Returns the value of attribute post\_process. + +#### Signature + +```ruby +attr_accessor post_process <-> Object +``` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 93. + +*** + +### post\_process= + +Sets the attribute post\_process + +#### Signature + +```ruby +attr_accessor post_process= <-> Object +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 93. + +*** + +### record\_call + +Start background call recording via SWML. + +#### Signature + +```ruby +def record_call(control_id: nil, stereo: false, format: RecordFormat::WAV, direction: RecordDirection::BOTH, terminators: nil, beep: false, input_sensitivity: 44.0, initial_timeout: nil, end_silence_timeout: nil, max_length: nil, status_url: nil) +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`self` + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 361. + +*** + +### remove\_global\_data + +Remove global agent data variables. + +#### Signature + +```ruby +def remove_global_data(keys) +``` + +#### Parameters + + + key(s) to remove + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 243. + +*** + +### remove\_metadata + +Remove metadata from current function's scope. + +#### Signature + +```ruby +def remove_metadata(keys) +``` + +#### Parameters + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 257. + +*** + +### replace\_in\_history + +Replace the tool\_call + result pair in conversation history. + +#### Signature + +```ruby +def replace_in_history(text = true) +``` + +#### Parameters + + + replacement text, or +true+ to remove entirely + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 320. + +*** + +### response + +Returns the value of attribute response. + +#### Signature + +```ruby +attr_accessor response <-> Object +``` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 93. + +*** + +### response= + +Sets the attribute response + +#### Signature + +```ruby +attr_accessor response= <-> Object +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 93. + +*** + +### rpc\_ai\_message + +Inject a message into an AI agent on another call. + +#### Signature + +```ruby +def rpc_ai_message(call_id, message_text, role: "system") +``` + +#### Parameters + + + + + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 768. + +*** + +### rpc\_ai\_unhold + +Unhold another call via RPC. + +#### Signature + +```ruby +def rpc_ai_unhold(call_id) +``` + +#### Parameters + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 782. + +*** + +### rpc\_dial + +Dial out to a number via RPC. + +#### Signature + +```ruby +def rpc_dial(to_number:, from_number:, dest_swml:, device_type: "phone") +``` + +#### Parameters + + + + + + + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 746. + +*** + +### say + +Make the agent speak specific text. + +#### Signature + +```ruby +def say(text) +``` + +#### Parameters + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 331. + +*** + +### send\_sms + +Send an SMS message via SWML. + +#### Signature + +```ruby +def send_sms(to_number:, from_number:, body: nil, media: nil, tags: nil, region: nil) +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`self` + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 645. + +*** + +### set\_end\_of\_speech\_timeout + +Adjust end-of-speech timeout. + +#### Signature + +```ruby +def set_end_of_speech_timeout(milliseconds) +``` + +#### Parameters + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 424. + +*** + +### set\_metadata + +Set metadata scoped to current function's meta\_data\_token. + +#### Signature + +```ruby +def set_metadata(data) +``` + +#### Parameters + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 250. + +*** + +### set\_post\_process + +Enable / disable post-processing. + +#### Signature + +```ruby +def set_post_process(val) +``` + +#### Parameters + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 116. + +*** + +### set\_response + +Set the natural-language response text. + +#### Signature + +```ruby +def set_response(text) +``` + +#### Parameters + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 109. + +*** + +### set\_speech\_event\_timeout + +Adjust speech event timeout. + +#### Signature + +```ruby +def set_speech_event_timeout(milliseconds) +``` + +#### Parameters + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 431. + +*** + +### simulate\_user\_input + +Queue simulated user input. + +#### Signature + +```ruby +def simulate_user_input(text) +``` + +#### Parameters + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 789. + +*** + +### sip\_refer + +Send SIP REFER via SWML. + +#### Signature + +```ruby +def sip_refer(to_uri) +``` + +#### Parameters + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 585. + +*** + +### speech\_event\_timeout= + +#### Signature + +```ruby +def speech_event_timeout=(v) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 879. + +*** + +### stop + +Stop agent execution. + +#### Signature + +```ruby +def stop +``` + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 225. + +*** + +### stop\_background\_file + +Stop currently playing background file. + +#### Signature + +```ruby +def stop_background_file +``` + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 350. + +*** + +### stop\_record\_call + +Stop an active background call recording. + +#### Signature + +```ruby +def stop_record_call(control_id: nil) +``` + +#### Parameters + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 392. + +*** + +### stop\_tap + +Stop an active tap stream via SWML. + +#### Signature + +```ruby +def stop_tap(control_id: nil) +``` + +#### Parameters + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 625. + +*** + +### switch\_context + +Switch agent context/prompt during conversation. + +When only +system\_prompt+ is provided and all flags are false, emits +a simple string context switch. Otherwise emits the full object form. + +#### Signature + +```ruby +def switch_context(system_prompt: nil, user_prompt: nil, consolidate: false, full_reset: false, isolated: false) +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 301. + +*** + +### swml\_change\_context + +Change the conversation context. + +#### Signature + +```ruby +def swml_change_context(context_name) +``` + +#### Parameters + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 286. + +*** + +### swml\_change\_step + +Change the conversation step. + +#### Signature + +```ruby +def swml_change_step(step_name) +``` + +#### Parameters + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 279. + +*** + +### swml\_transfer + +Transfer via SWML with an AI response when transfer completes. + +#### Signature + +```ruby +def swml_transfer(dest, ai_response, final: true) +``` + +#### Parameters + + + destination URL for the transfer + + + + message AI says when transfer completes + + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 172. + +*** + +### swml\_user\_event + +Send a user event through SWML. + +#### Signature + +```ruby +def swml_user_event(event_data) +``` + +#### Parameters + + + event payload + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 264. + +*** + +### tap + +Start a background call tap via SWML. + +#### Signature + +```ruby +def tap(uri, control_id: nil, direction: TapDirection::BOTH, codec: Codec::PCMU, rtp_ptime: 20, status_url: nil) +``` + +#### Parameters + + + destination URI (rtp://, ws://, wss://) + + + + + + + + + + + + +#### Returns + +`self` + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 602. + +*** + +### to\_h + +Convert to the Hash structure expected by SWAIG. + +Rules: + +- +response+ always included (string) +- +action+ only included if at least one action exists +- +post\_process+ only included if +true+ and actions exist + +#### Signature + +```ruby +def to_h +``` + +#### Returns + +`Hash` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 844. + +*** + +### to\_json + +#### Signature + +```ruby +def to_json(*args) +``` + +#### Parameters + + + +#### Returns + +`String` — JSON representation + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 858. + +*** + +### toggle\_functions + +Enable / disable specific SWAIG functions. + +#### Signature + +```ruby +def toggle_functions(toggles) +``` + +#### Parameters + + + each with "function" and "active" keys + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 438. + +*** + +### update\_global\_data + +Update global agent data variables. + +#### Signature + +```ruby +def update_global_data(data) +``` + +#### Parameters + + + key-value pairs to set/update + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 236. + +*** + +### update\_settings + +Update agent runtime settings (temperature, top\_p, etc.). + +#### Signature + +```ruby +def update_settings(settings) +``` + +#### Parameters + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 459. + +*** + +### wait\_for\_user + +Control how the agent waits for user input. + +#### Signature + +```ruby +def wait_for_user(enabled: nil, timeout: nil, answer_first: false) +``` + +#### Parameters + + + + + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 210. + +## Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 92. diff --git a/fern/products/sdk-reference/ruby/agents/swaig/index.mdx b/fern/products/sdk-reference/ruby/agents/swaig/index.mdx new file mode 100644 index 0000000000..66c757dd90 --- /dev/null +++ b/fern/products/sdk-reference/ruby/agents/swaig/index.mdx @@ -0,0 +1,60 @@ +--- +slug: "/reference/ruby/agents/swaig" +title: "Swaig" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "module" + language: "ruby" + qualified_name: "SignalWire::Swaig" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb" + visibility: "public" +--- +# `Swaig` + +## Signature + +```ruby +module Swaig +``` + +## Classes + + + + Response builder that tool handlers return. All mutating methods return +self+ for fluent chaining. + + + + \------------------------------------------------------------------ ParameterSchema — a typed, block-DSL builder for SWAIG tool parameters (the Tier-2 idiom flagship for the Ruby port; see porting-sdk/IDIOM\_PASS\_JOURNAL.md §4). + + + +## Modules + + + + RTP payload codec for the +tap+ verb. + + + + Channel selection for the +record\_call+ verb. + + + + Audio container format for the +record\_call+ verb. + + + + Channel selection for the +tap+ verb. + + + +## Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 11. diff --git a/fern/products/sdk-reference/ruby/agents/swaig/parameter-schema/index.mdx b/fern/products/sdk-reference/ruby/agents/swaig/parameter-schema/index.mdx new file mode 100644 index 0000000000..d7c30a6cb9 --- /dev/null +++ b/fern/products/sdk-reference/ruby/agents/swaig/parameter-schema/index.mdx @@ -0,0 +1,614 @@ +--- +slug: "/reference/ruby/agents/swaig/parameter-schema" +title: "ParameterSchema" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Swaig::ParameterSchema" + parent: "SignalWire::Swaig" + module: "agents.Swaig" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/parameter_schema.rb" + visibility: "public" +--- +# `ParameterSchema` + +*** + +ParameterSchema — a typed, block-DSL builder for SWAIG tool +parameters (the Tier-2 idiom flagship for the Ruby port; see +porting-sdk/IDIOM\_PASS\_JOURNAL.md §4). + +Defining a SWAIG tool's +parameters+ in the Python reference (and in +the existing Ruby path) means hand-writing a JSON-Schema blob as +nested Hashes: + +``` +define_tool(name: "lookup", description: "...", parameters: { + "service" => { "type" => "string", "description" => "The service" }, + "date" => { "type" => "string", "description" => "YYYY-MM-DD" } +}, required: %w[service date]) +``` + ++ParameterSchema+ is a _typed convenience over the SAME wire output_: +the Hash it produces is BYTE-IDENTICAL to the normalised hand-written +form (a +\{ 'type' => 'object', 'properties' => \{...\}, 'required' => +\[...] \}+ object — +required+ omitted when empty). It is NOT a new +format; the untyped Hash path stays fully supported. This is purely +additive (a PORT\_ADDITION). + +The idiom is a Ruby block DSL — the most natural way to render nested +structure readably: + +``` +params = SignalWire::Swaig::ParameterSchema.build do + string :service, 'The service to look up' + string :date, 'Appointment date, YYYY-MM-DD' + enum :fmt, RecordFormat::ALL, 'Audio container format' + integer :count, 'How many results', default: 10 + array :tags, 'Search tags', of: :string + object :filter, 'Structured filter' do + string :status, 'open|closed' + end + required :service, :date +end + +# params is the same Hash a hand-written schema would produce: +# { 'type' => 'object', 'properties' => { ... }, 'required' => [...] } +``` + +The +enum+ kind integrates the Tier-1 frozen closed-set constants +(\{RecordFormat\}, \{RecordDirection\}, \{TapDirection\}, \{Codec\}) — pass +any of their +ALL+ arrays (or any literal array) as the closed set and +it lands in the schema as +"enum" => \[...]+. + +Supported property kinds: +string+, +number+, +integer+, +boolean+, ++enum+ (closed set), +array+ (of a kind), +object+ (nested). Every +kind accepts +description+ plus optional +required:+ / +default:+ / ++enum:+ / +format:+. + +The result Hash is plain JSON-Schema — feed it straight to ++define\_tool(parameters:)+. Because the kind methods return +self+ a +fluent style works too: + +``` +ParameterSchema.new.string(:q, 'query').require(:q).to_h +``` + +*** + +## Signature + +```ruby +class ParameterSchema < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Constants + + + + + + + + + + + + + JSON-Schema "type" keyword each builder method emits. + + +## Methods + +### array + +Add an +array+ property. The element kind is given by +of:+ (a JSON +type string like +'string'+ / +:integer+), producing an +items+ +subschema. When +of:+ names +object+ (or +:object+) a block may +define the element object's properties. + +array :tags, 'Search tags', of: :string +\#=> properties.tags == \{ 'type' => 'array', +\# 'description' => '...', 'items' => \{ 'type' => 'string' \} \} + +``` +array :people, 'Attendees', of: :object do + string :name, 'Full name' +end +``` + +#### Signature + +```ruby +def array(name, description = nil, of: nil, required: false, default: nil, enum: nil, &block) +``` + +#### Parameters + + + property name + + + + LLM-facing description + + + + + + + + + + + + +#### Returns + +`self` + +#### Yields + +- nested element-object property DSL (only when +of: :object+) + +#### Source + +[`lib/signalwire/swaig/parameter_schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/parameter_schema.rb) + +Line 173. + +*** + +### boolean + +Add a +boolean+ property. Same options as \{#string\}. + +#### Signature + +```ruby +def boolean(name, description = nil, required: false, default: nil) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/parameter_schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/parameter_schema.rb) + +Line 125. + +*** + +### build + +Build a schema with the block DSL. The block runs in the builder's +instance context, so the bare +string :x, '...'+ verbs resolve to +this object's methods. + +schema = ParameterSchema.build do +string :name, 'Caller name' +required :name +end #=> Hash + +#### Signature + +```ruby +def build(&block) +``` + +#### Parameters + + + +#### Returns + +`Hash` — the JSON-Schema parameters object (byte-identical to the equivalent hand-written + normalised +parameters+ Hash) + +#### Yields + +- DSL body evaluated against a fresh \{ParameterSchema\} + +#### Source + +[`lib/signalwire/swaig/parameter_schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/parameter_schema.rb) + +Line 88. + +*** + +### enum + +Add a closed-set property (a +string+-typed schema carrying an ++enum+ list). Integrates the Tier-1 frozen vocabularies — pass ++RecordFormat::ALL+, +TapDirection::ALL+, +Codec::ALL+, etc. (or any +literal array) as the +values+ closed set. + +enum :fmt, RecordFormat::ALL, 'Audio container format' +\#=> properties.fmt == \{ 'type' => 'string', +\# 'description' => '...', 'enum' => \['wav','mp3','mp4'] \} + +#### Signature + +```ruby +def enum(name, values, description = nil, required: false, default: nil, type: STRING) +``` + +#### Parameters + + + property name + + + + the closed set (e.g. a constant module's +ALL+) + + + + LLM-facing description + + + + + + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/parameter_schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/parameter_schema.rb) + +Line 146. + +*** + +### initialize + +#### Signature + +```ruby +def initialize +``` + +#### Returns + +`ParameterSchema` — a new instance of ParameterSchema + +#### Source + +[`lib/signalwire/swaig/parameter_schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/parameter_schema.rb) + +Line 94. + +*** + +### integer + +Add an +integer+ property. Same options as \{#string\}. + +#### Signature + +```ruby +def integer(name, description = nil, required: false, default: nil, enum: nil, format: nil) +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/parameter_schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/parameter_schema.rb) + +Line 119. + +*** + +### number + +Add a +number+ (floating-point) property. Same options as \{#string\}. + +#### Signature + +```ruby +def number(name, description = nil, required: false, default: nil, enum: nil, format: nil) +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/parameter_schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/parameter_schema.rb) + +Line 113. + +*** + +### object + +Add a nested +object+ property whose sub-properties are defined in +the block (a recursively-evaluated \{ParameterSchema\}). + +object :address, 'Mailing address' do +string :street, 'Street line' +string :zip, 'Postal code' +required :street +end + +The nested object's own +required+ list (from a nested +required+ +call) is carried inside the sub-schema, exactly as a hand-written +nested object would render. + +#### Signature + +```ruby +def object(name, description = nil, required: false, &block) +``` + +#### Parameters + + + property name + + + + LLM-facing description + + + + + + +#### Returns + +`self` + +#### Yields + +- nested property DSL + +#### Source + +[`lib/signalwire/swaig/parameter_schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/parameter_schema.rb) + +Line 210. + +*** + +### require + +Singular alias of \{#required\} for fluent single-property chains +(+.string(:q,'..').require(:q)+). Avoids reading as a plural when +only one name is passed. + +#### Signature + +```ruby +def require(*names) +``` + +#### Parameters + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/parameter_schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/parameter_schema.rb) + +Line 244. + +*** + +### required + +Mark one or more already-declared (or to-be-declared) properties as +required. Names are de-duplicated, preserving first-seen order — the +same shape +define\_tool(required:)+ produces. + +required :service, :date + +#### Signature + +```ruby +def required(*names) +``` + +#### Parameters + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/parameter_schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/parameter_schema.rb) + +Line 232. + +*** + +### string + +Add a +string+ property. + +#### Signature + +```ruby +def string(name, description = nil, required: false, default: nil, enum: nil, format: nil) +``` + +#### Parameters + + + property name (rendered as a String key) + + + + LLM-facing description + + + + + + + + + + +#### Returns + +`self` + +#### Source + +[`lib/signalwire/swaig/parameter_schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/parameter_schema.rb) + +Line 107. + +*** + +### to\_h + +Render the JSON-Schema parameters object. + +Shape (byte-identical to a hand-written + normalised schema): + +- always +'type' => 'object'+ +- +'properties' => \{...\}+ (insertion-ordered) +- +'required' => \[...]+ ONLY when at least one name is required + (omitted entirely otherwise — matching +define\_tool+, which only + writes +required+ when the supplied Array is non-empty) + +#### Signature + +```ruby +def to_h +``` + +#### Returns + +`Hash` + +#### Source + +[`lib/signalwire/swaig/parameter_schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/parameter_schema.rb) + +Line 258. + +*** + +### to\_hash + +Render the JSON-Schema parameters object. + +Shape (byte-identical to a hand-written + normalised schema): + +- always +'type' => 'object'+ +- +'properties' => \{...\}+ (insertion-ordered) +- +'required' => \[...]+ ONLY when at least one name is required + (omitted entirely otherwise — matching +define\_tool+, which only + writes +required+ when the supplied Array is non-empty) + +#### Signature + +```ruby +def to_h +``` + +#### Returns + +`Hash` + +#### Source + +[`lib/signalwire/swaig/parameter_schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/parameter_schema.rb) + +Line 266. + +*** + +### to\_json + +#### Signature + +```ruby +def to_json(*args) +``` + +#### Parameters + + + +#### Returns + +`String` — JSON serialization of \{#to\_h\} + +#### Source + +[`lib/signalwire/swaig/parameter_schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/parameter_schema.rb) + +Line 269. + +## Source + +[`lib/signalwire/swaig/parameter_schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/parameter_schema.rb) + +Line 67. diff --git a/fern/products/sdk-reference/ruby/agents/swaig/record-direction/index.mdx b/fern/products/sdk-reference/ruby/agents/swaig/record-direction/index.mdx new file mode 100644 index 0000000000..5d3c4bfbb7 --- /dev/null +++ b/fern/products/sdk-reference/ruby/agents/swaig/record-direction/index.mdx @@ -0,0 +1,46 @@ +--- +slug: "/reference/ruby/agents/swaig/record-direction" +title: "RecordDirection" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "module" + language: "ruby" + qualified_name: "SignalWire::Swaig::RecordDirection" + parent: "SignalWire::Swaig" + module: "agents.Swaig" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb" + visibility: "public" +--- +# `RecordDirection` + +Channel selection for the +record\_call+ verb. + +DISTINCT from \{TapDirection\}: record uses +listen+, tap uses +hear+. +Never share a constant between the two — Python validates two +different lists, and conflating them is a known bug generator. + +## Signature + +```ruby +module RecordDirection +``` + +## Constants + + + Every valid +record\_call+ direction, in wire order. + + + + + + + + +## Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 44. diff --git a/fern/products/sdk-reference/ruby/agents/swaig/record-format/index.mdx b/fern/products/sdk-reference/ruby/agents/swaig/record-format/index.mdx new file mode 100644 index 0000000000..ca9640b74b --- /dev/null +++ b/fern/products/sdk-reference/ruby/agents/swaig/record-format/index.mdx @@ -0,0 +1,42 @@ +--- +slug: "/reference/ruby/agents/swaig/record-format" +title: "RecordFormat" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "module" + language: "ruby" + qualified_name: "SignalWire::Swaig::RecordFormat" + parent: "SignalWire::Swaig" + module: "agents.Swaig" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb" + visibility: "public" +--- +# `RecordFormat` + +Audio container format for the +record\_call+ verb. + +## Signature + +```ruby +module RecordFormat +``` + +## Constants + + + Every valid +record\_call+ format, in wire order. + + + + + + + + +## Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 30. diff --git a/fern/products/sdk-reference/ruby/agents/swaig/tap-direction/index.mdx b/fern/products/sdk-reference/ruby/agents/swaig/tap-direction/index.mdx new file mode 100644 index 0000000000..5935a7ebee --- /dev/null +++ b/fern/products/sdk-reference/ruby/agents/swaig/tap-direction/index.mdx @@ -0,0 +1,46 @@ +--- +slug: "/reference/ruby/agents/swaig/tap-direction" +title: "TapDirection" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "module" + language: "ruby" + qualified_name: "SignalWire::Swaig::TapDirection" + parent: "SignalWire::Swaig" + module: "agents.Swaig" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb" + visibility: "public" +--- +# `TapDirection` + +Channel selection for the +tap+ verb. + +DISTINCT from \{RecordDirection\}: tap uses +hear+, record uses ++listen+. Also distinct from the RELAY play/record/tap direction +vocabulary. Never unify. + +## Signature + +```ruby +module TapDirection +``` + +## Constants + + + Every valid +tap+ direction, in wire order. + + + + + + + + +## Source + +[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) + +Line 58. diff --git a/fern/products/sdk-reference/ruby/agents/swml/document/index.mdx b/fern/products/sdk-reference/ruby/agents/swml/document/index.mdx new file mode 100644 index 0000000000..7f04e4857b --- /dev/null +++ b/fern/products/sdk-reference/ruby/agents/swml/document/index.mdx @@ -0,0 +1,283 @@ +--- +slug: "/reference/ruby/agents/swml/document" +title: "Document" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::SWML::Document" + parent: "SignalWire::SWML" + module: "agents.SWML" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/document.rb" + visibility: "public" +--- +# `Document` + +## Signature + +```ruby +class Document < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### add\_section + +Add a new named section. Returns true if created, false if it already exists. + +#### Signature + +```ruby +def add_section(name) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/swml/document.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/document.rb) + +Line 24. + +*** + +### add\_verb + +Append a verb to the _main_ section. + +add\_verb('answer', \{\}) +add\_verb('sleep', 2000) + +#### Signature + +```ruby +def add_verb(verb_name, config) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/swml/document.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/document.rb) + +Line 43. + +*** + +### add\_verb\_to\_section + +Append a verb to an arbitrary section. + +#### Signature + +```ruby +def add_verb_to_section(section, verb_name, config) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/swml/document.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/document.rb) + +Line 48. + +*** + +### get\_verbs + +Return the list of verb hashes for a section. + +#### Signature + +```ruby +def get_verbs(section = 'main') +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/swml/document.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/document.rb) + +Line 61. + +*** + +### has\_section? + +Check whether a section exists. + +#### Signature + +```ruby +def has_section?(name) +``` + +#### Parameters + + + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/swml/document.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/document.rb) + +Line 35. + +*** + +### initialize + +#### Signature + +```ruby +def initialize +``` + +#### Returns + +`Document` — a new instance of Document + +#### Source + +[`lib/signalwire/swml/document.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/document.rb) + +Line 10. + +*** + +### render + +Compact JSON string. + +#### Signature + +```ruby +def render +``` + +#### Source + +[`lib/signalwire/swml/document.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/document.rb) + +Line 74. + +*** + +### render\_pretty + +Pretty-printed JSON string. + +#### Signature + +```ruby +def render_pretty +``` + +#### Source + +[`lib/signalwire/swml/document.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/document.rb) + +Line 79. + +*** + +### reset + +Reset the document to its initial empty state. + +#### Signature + +```ruby +def reset +``` + +#### Source + +[`lib/signalwire/swml/document.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/document.rb) + +Line 17. + +*** + +### sections + +Returns the value of attribute sections. + +#### Signature + +```ruby +attr_reader sections -> Object +``` + +#### Source + +[`lib/signalwire/swml/document.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/document.rb) + +Line 8. + +*** + +### to\_h + +Produce a plain Ruby hash suitable for JSON serialization. + +#### Signature + +```ruby +def to_h +``` + +#### Source + +[`lib/signalwire/swml/document.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/document.rb) + +Line 66. + +*** + +### version + +Returns the value of attribute version. + +#### Signature + +```ruby +attr_reader version -> Object +``` + +#### Source + +[`lib/signalwire/swml/document.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/document.rb) + +Line 8. + +## Source + +[`lib/signalwire/swml/document.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/document.rb) + +Line 7. diff --git a/fern/products/sdk-reference/ruby/agents/swml/index.mdx b/fern/products/sdk-reference/ruby/agents/swml/index.mdx new file mode 100644 index 0000000000..a3af54dc85 --- /dev/null +++ b/fern/products/sdk-reference/ruby/agents/swml/index.mdx @@ -0,0 +1,80 @@ +--- +slug: "/reference/ruby/agents/swml" +title: "SWML" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "module" + language: "ruby" + qualified_name: "SignalWire::SWML" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/schema.rb" + visibility: "public" +--- +# `SWML` + +## Signature + +```ruby +module SWML +``` + +## Classes + + + + + + + + + +## Modules + + + + + +## Methods + +### reset\_schema! + +Allow resetting for tests + +#### Signature + +```ruby +def reset_schema! +``` + +#### Source + +[`lib/signalwire/swml/schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/schema.rb) + +Line 77. + +*** + +### schema + +Module-level singleton so the schema is loaded at most once. + +#### Signature + +```ruby +def schema +``` + +#### Source + +[`lib/signalwire/swml/schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/schema.rb) + +Line 72. + +## Source + +[`lib/signalwire/swml/schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/schema.rb) + +Line 6. diff --git a/fern/products/sdk-reference/ruby/agents/swml/schema/index.mdx b/fern/products/sdk-reference/ruby/agents/swml/schema/index.mdx new file mode 100644 index 0000000000..930cdb0211 --- /dev/null +++ b/fern/products/sdk-reference/ruby/agents/swml/schema/index.mdx @@ -0,0 +1,154 @@ +--- +slug: "/reference/ruby/agents/swml/schema" +title: "Schema" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::SWML::Schema" + parent: "SignalWire::SWML" + module: "agents.SWML" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/schema.rb" + visibility: "public" +--- +# `Schema` + +## Signature + +```ruby +class Schema < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### get\_verb + +Return the full definition hash for a verb, or nil. + +#### Signature + +```ruby +def get_verb(name) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/swml/schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/schema.rb) + +Line 31. + +*** + +### initialize + +#### Signature + +```ruby +def initialize +``` + +#### Returns + +`Schema` — a new instance of Schema + +#### Source + +[`lib/signalwire/swml/schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/schema.rb) + +Line 10. + +*** + +### valid\_verb? + +Is +name+ a recognised SWML verb? + +#### Signature + +```ruby +def valid_verb?(name) +``` + +#### Parameters + + + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/swml/schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/schema.rb) + +Line 16. + +*** + +### verb\_count + +How many verbs are defined in the schema. + +#### Signature + +```ruby +def verb_count +``` + +#### Source + +[`lib/signalwire/swml/schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/schema.rb) + +Line 26. + +*** + +### verb\_names + +Sorted list of all known verb names. + +#### Signature + +```ruby +def verb_names +``` + +#### Source + +[`lib/signalwire/swml/schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/schema.rb) + +Line 21. + +*** + +### verbs + +Returns the value of attribute verbs. + +#### Signature + +```ruby +attr_reader verbs -> Object +``` + +#### Source + +[`lib/signalwire/swml/schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/schema.rb) + +Line 8. + +## Source + +[`lib/signalwire/swml/schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/schema.rb) + +Line 7. diff --git a/fern/products/sdk-reference/ruby/agents/swml/service/index.mdx b/fern/products/sdk-reference/ruby/agents/swml/service/index.mdx new file mode 100644 index 0000000000..b4ad877a47 --- /dev/null +++ b/fern/products/sdk-reference/ruby/agents/swml/service/index.mdx @@ -0,0 +1,993 @@ +--- +slug: "/reference/ruby/agents/swml/service" +title: "Service" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::SWML::Service" + parent: "SignalWire::SWML" + module: "agents.SWML" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb" + visibility: "public" +--- +# `Service` + +## Signature + +```ruby +class Service < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Constants + + + Maximum request body size enforced on /swaig and the main route (1 MB). + + +## Methods + +### all\_functions + +\--- Idiomatic Ruby accessors/predicates (additive aliases) --- +def-wrappers (not alias\_method) so placement is independent of where +the get\_\* target is defined in the class body. + +#### Signature + +```ruby +def all_functions +``` + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 156. + +*** + +### basic\_auth\_credentials\_with\_source + +#### Signature + +```ruby +def basic_auth_credentials_with_source +``` + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 157. + +*** + +### config\_file + +Python parity: + +- `name`, `route`, `host`, `port` — surface from + SWMLService. +- `schema_path` — path to the SWML schema file (or nil to use + the gem-bundled default). +- `config_file` — optional TOML/YAML config file path. +- `schema_validation` — boolean flag mirroring Python's + `self._schema_validation`. `SWML_SKIP_SCHEMA_VALIDATION=1` + env var forces this to false. + +#### Signature + +```ruby +attr_reader config_file -> Object +``` + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 23. + +*** + +### define\_tool + +Define a SWAIG function the AI can call. Tool descriptions and +parameter descriptions are LLM-facing prompt engineering — see +PORTING\_GUIDE for guidance. + +#### Signature + +```ruby +def define_tool(name:, description:, parameters: {}, secure: false, &handler) +``` + +#### Parameters + + + + + + + + + + + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 98. + +*** + +### define\_tools + +Return an array of all tool definitions (for SWML rendering). + +#### Signature + +```ruby +def define_tools +``` + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 120. + +*** + +### document + +Expose the underlying document (useful for tests and subclasses). + +#### Signature + +```ruby +def document +``` + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 380. + +*** + +### execute\_verb + +Execute a SWML verb, adding it to the current document. + +For most verbs the config is a keyword-args Hash. +The +sleep+ verb is special: it also accepts a bare Integer. + +#### Signature + +```ruby +def execute_verb(verb_name, args = [], kwargs = {}) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 242. + +*** + +### function? + +Ruby `?`-predicate form of has\_function. + +#### Signature + +```ruby +def function?(name) +``` + +#### Parameters + + + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 159. + +*** + +### get\_basic\_auth\_credentials + +Get the configured basic-auth credentials. + +Python parity: `get_basic_auth_credentials(include_source=False)`. +When `include_source` is true, returns a 3-tuple `[user, +pass, source]` where `source` is one of `"environment"`, +`"auto-generated"`, or `"provided"`. Otherwise returns the +2-tuple `[user, pass]`. + +#### Signature + +```ruby +def get_basic_auth_credentials(include_source: false) +``` + +#### Parameters + + + +#### Returns + +`Array(String, String)` — or \[Array(String, String, String)] + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 277. + +*** + +### get\_full\_url + +Build the full URL for this service. + +get\_full\_url # => "http://0.0.0.0:3000/" +get\_full\_url(include\_auth: true) # => "http://user:pass@0.0.0.0:3000/" + +#### Signature + +```ruby +def get_full_url(include_auth: false) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 320. + +*** + +### get\_function + +Get a registered SWAIG function by name, or nil when absent. +(Python parity: ToolRegistry#get\_function.) + +#### Signature + +```ruby +def get_function(name) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 163. + +*** + +### handle\_additional\_route + +Extension point: register additional Rack routes after Service +mounts /health, /ready, /swaig, and the main route. AgentBase uses +this to add /post\_prompt, /debug\_events, /mcp. + +#### Signature + +```ruby +def handle_additional_route(_sub_path, _request_data, _env) +``` + +#### Parameters + + + + + + + +#### Returns + +`Array | nil` — A Rack response triple, or nil if not handled + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 216. + +*** + +### host + +Python parity: + +- `name`, `route`, `host`, `port` — surface from + SWMLService. +- `schema_path` — path to the SWML schema file (or nil to use + the gem-bundled default). +- `config_file` — optional TOML/YAML config file path. +- `schema_validation` — boolean flag mirroring Python's + `self._schema_validation`. `SWML_SKIP_SCHEMA_VALIDATION=1` + env var forces this to false. + +#### Signature + +```ruby +attr_reader host -> Object +``` + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 23. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(name:, route: '/', host: '0.0.0.0', port: nil, basic_auth: nil, schema_path: nil, config_file: nil, schema_validation: true) +``` + +#### Parameters + + + + + + + + + + + + + + + + + +#### Returns + +`Service` — a new instance of Service + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 34. + +*** + +### list\_tool\_names + +List registered SWAIG tool names in registration order. + +#### Signature + +```ruby +def list_tool_names +``` + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 141. + +*** + +### method\_missing + +*** + +#### Verb auto-vivification via method\_missing + +#### Signature + +```ruby +def method_missing(method_name, *args, **kwargs) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 224. + +*** + +### name + +Python parity: + +- `name`, `route`, `host`, `port` — surface from + SWMLService. +- `schema_path` — path to the SWML schema file (or nil to use + the gem-bundled default). +- `config_file` — optional TOML/YAML config file path. +- `schema_validation` — boolean flag mirroring Python's + `self._schema_validation`. `SWML_SKIP_SCHEMA_VALIDATION=1` + env var forces this to false. + +#### Signature + +```ruby +attr_reader name -> Object +``` + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 23. + +*** + +### on\_function\_call + +Dispatch a function call to the registered handler. Default plain +implementation — AgentBase overrides with token validation. + +#### Signature + +```ruby +def on_function_call(name, args, raw_data) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 127. + +*** + +### on\_request + +Customization hook called when SWML is requested. Default +delegates to \{#on\_swml\_request\} and returns its result. +Subclasses typically override +on\_swml\_request+ rather than +this method. + +Return +nil+ to use the default SWML rendering, or a Hash of +modifications to merge into the document. + +Python parity: WebMixin#on\_request(request\_data, callback\_path). +The Python third +request+ argument is FastAPI-specific and +intentionally not mirrored. +Python parity: `on_request(request_data, callback_path)`. The +third Python parameter (`request`) — a FastAPI `Request` — +is propagated through Ruby as the optional `request:` keyword +so subclasses can read query/header info when a Rack-style +request is available. Default: delegate to `on_swml_request`. + +#### Signature + +```ruby +def on_request(request_data = nil, callback_path = nil, request: nil) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 351. + +*** + +### on\_swml\_request + +Customization point for subclasses to modify SWML based on +request data. The default returns nil (no modification). + +Python parity: +`on_swml_request(request_data, callback_path, request)`. The +`request:` keyword carries the Rack request (or FastAPI +`Request` analogue) for subclasses that need query params +or headers. + +#### Signature + +```ruby +def on_swml_request(request_data = nil, callback_path = nil, request: nil) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 363. + +*** + +### port + +Python parity: + +- `name`, `route`, `host`, `port` — surface from + SWMLService. +- `schema_path` — path to the SWML schema file (or nil to use + the gem-bundled default). +- `config_file` — optional TOML/YAML config file path. +- `schema_validation` — boolean flag mirroring Python's + `self._schema_validation`. `SWML_SKIP_SCHEMA_VALIDATION=1` + env var forces this to false. + +#### Signature + +```ruby +attr_reader port -> Object +``` + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 23. + +*** + +### rack\_app + +Returns a Rack-compatible application. + +#### Signature + +```ruby +def rack_app +``` + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 399. + +*** + +### register\_routing\_callback + +*** + +#### Routing callbacks & request handling + +#### Signature + +```ruby +def register_routing_callback(path, &block) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 331. + +*** + +### register\_swaig\_function + +Register a raw SWAIG function definition (e.g. from DataMap#to\_swaig\_function). + +#### Signature + +```ruby +def register_swaig_function(func_def) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 112. + +*** + +### remove\_function + +Remove a registered SWAIG function. Returns true on success, +false when the function was not registered. +(Python parity: ToolRegistry#remove\_function.) + +#### Signature + +```ruby +def remove_function(name) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 181. + +*** + +### render + +*** + +#### Render the current SWML document + +#### Signature + +```ruby +def render +``` + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 371. + +*** + +### render\_main\_swml + +Extension point: handle GET /swaig (returns the SWML document by +default). AgentBase overrides to render with prompts + dynamic config. + +#### Signature + +```ruby +def render_main_swml(_request_data = nil, request: nil) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 204. + +*** + +### render\_pretty + +#### Signature + +```ruby +def render_pretty +``` + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 375. + +*** + +### respond\_to\_missing? + +#### Signature + +```ruby +def respond_to_missing?(method_name, include_private = false) +``` + +#### Parameters + + + + + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 234. + +*** + +### route + +Python parity: + +- `name`, `route`, `host`, `port` — surface from + SWMLService. +- `schema_path` — path to the SWML schema file (or nil to use + the gem-bundled default). +- `config_file` — optional TOML/YAML config file path. +- `schema_validation` — boolean flag mirroring Python's + `self._schema_validation`. `SWML_SKIP_SCHEMA_VALIDATION=1` + env var forces this to false. + +#### Signature + +```ruby +attr_reader route -> Object +``` + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 23. + +*** + +### schema\_path + +Python parity: + +- `name`, `route`, `host`, `port` — surface from + SWMLService. +- `schema_path` — path to the SWML schema file (or nil to use + the gem-bundled default). +- `config_file` — optional TOML/YAML config file path. +- `schema_validation` — boolean flag mirroring Python's + `self._schema_validation`. `SWML_SKIP_SCHEMA_VALIDATION=1` + env var forces this to false. + +#### Signature + +```ruby +attr_reader schema_path -> Object +``` + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 23. + +*** + +### schema\_utils + +SchemaUtils helper bound to this Service. Mirrors Python's +self.schema\_utils public instance attribute on SWMLService. +Built lazily on first access. + +#### Signature + +```ruby +def schema_utils +``` + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 387. + +*** + +### schema\_validation + +Python parity: + +- `name`, `route`, `host`, `port` — surface from + SWMLService. +- `schema_path` — path to the SWML schema file (or nil to use + the gem-bundled default). +- `config_file` — optional TOML/YAML config file path. +- `schema_validation` — boolean flag mirroring Python's + `self._schema_validation`. `SWML_SKIP_SCHEMA_VALIDATION=1` + env var forces this to false. + +#### Signature + +```ruby +attr_reader schema_validation -> Object +``` + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 23. + +*** + +### serve + +Start serving (blocking). + +Python parity: +`serve(host=None, port=None, ssl_cert=None, ssl_key=None, +ssl_enabled=None, domain=None)`. When SSL parameters are +supplied the server is started with HTTPS bindings; otherwise +plain HTTP. `host`/`port` overrides default to the +constructor-provided values. + +#### Signature + +```ruby +def serve(host: nil, port: nil, ssl_cert: nil, ssl_key: nil, ssl_enabled: nil, domain: nil) +``` + +#### Parameters + + + + + + + + + + + + + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 418. + +*** + +### stop + +Gracefully stop the server. + +#### Signature + +```ruby +def stop +``` + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 465. + +*** + +### swaig\_pre\_dispatch + +Extension point: invoked between argument parsing and function +dispatch on POST /swaig. Returns \[target, short\_circuit]. If +short\_circuit is non-nil, it's returned as the SWAIG response +without calling on\_function\_call. AgentBase overrides to add +session-token validation and ephemeral dynamic-config copies. + +#### Signature + +```ruby +def swaig_pre_dispatch(_request_data, _func_name, _env) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 198. + +*** + +### validate\_basic\_auth + +Validate provided basic-auth credentials against the configured ones +using a constant-time comparison. +Python parity: AuthMixin#validate\_basic\_auth(username, password). + +#### Signature + +```ruby +def validate_basic_auth(username, password) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 297. + +## Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 13. diff --git a/fern/products/sdk-reference/ruby/agents/swml/service/index__2.mdx b/fern/products/sdk-reference/ruby/agents/swml/service/index__2.mdx new file mode 100644 index 0000000000..4d09d11ee4 --- /dev/null +++ b/fern/products/sdk-reference/ruby/agents/swml/service/index__2.mdx @@ -0,0 +1,26 @@ +--- +slug: "/reference/ruby/agents/swml/service/index__2" +title: "Service" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "module" + language: "ruby" + qualified_name: "agents.SWML.Service" + parent: "SignalWire::SWML" + module: "agents.SWML" +--- +# `Service` + +## Classes + + + + \------------------------------------------------------------------ Middleware: security headers ------------------------------------------------------------------ + + + + \------------------------------------------------------------------ Middleware: timing-safe Basic-Auth ------------------------------------------------------------------ + + diff --git a/fern/products/sdk-reference/ruby/agents/swml/service/security-headers-middleware/index.mdx b/fern/products/sdk-reference/ruby/agents/swml/service/security-headers-middleware/index.mdx new file mode 100644 index 0000000000..6b6161f207 --- /dev/null +++ b/fern/products/sdk-reference/ruby/agents/swml/service/security-headers-middleware/index.mdx @@ -0,0 +1,90 @@ +--- +slug: "/reference/ruby/agents/swml/service/security-headers-middleware" +title: "SecurityHeadersMiddleware" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::SWML::Service::SecurityHeadersMiddleware" + parent: "agents.SWML.Service" + module: "agents.SWML.Service" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb" + visibility: "public" +--- +# `SecurityHeadersMiddleware` + +*** + +## Middleware: security headers + +## Signature + +```ruby +class SecurityHeadersMiddleware < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Constants + + + +## Methods + +### call + +#### Signature + +```ruby +def call(env) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 633. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(app) +``` + +#### Parameters + + + +#### Returns + +`SecurityHeadersMiddleware` — a new instance of SecurityHeadersMiddleware + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 629. + +## Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 622. diff --git a/fern/products/sdk-reference/ruby/agents/swml/service/timing-safe-basic-auth/index.mdx b/fern/products/sdk-reference/ruby/agents/swml/service/timing-safe-basic-auth/index.mdx new file mode 100644 index 0000000000..8c45b49cd4 --- /dev/null +++ b/fern/products/sdk-reference/ruby/agents/swml/service/timing-safe-basic-auth/index.mdx @@ -0,0 +1,82 @@ +--- +slug: "/reference/ruby/agents/swml/service/timing-safe-basic-auth" +title: "TimingSafeBasicAuth" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::SWML::Service::TimingSafeBasicAuth" + parent: "agents.SWML.Service" + module: "agents.SWML.Service" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb" + visibility: "public" +--- +# `TimingSafeBasicAuth` + +*** + +## Middleware: timing-safe Basic-Auth + +## Signature + +```ruby +class TimingSafeBasicAuth < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### call + +#### Signature + +```ruby +def call(env) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 649. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(app, service) +``` + +#### Parameters + + + + + +#### Returns + +`TimingSafeBasicAuth` — a new instance of TimingSafeBasicAuth + +#### Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 644. + +## Source + +[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) + +Line 643. diff --git a/fern/products/sdk-reference/ruby/core/core/index.mdx b/fern/products/sdk-reference/ruby/core/core/index.mdx new file mode 100644 index 0000000000..f186581c36 --- /dev/null +++ b/fern/products/sdk-reference/ruby/core/core/index.mdx @@ -0,0 +1,34 @@ +--- +slug: "/reference/ruby/core/core" +title: "Core" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "module" + language: "ruby" + qualified_name: "SignalWire::Core" + parent: "core" + module: "core" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/core/logging_config.rb" + visibility: "public" +--- +# `Core` + +## Signature + +```ruby +module Core +``` + +## Modules + + + + + +## Source + +[`lib/signalwire/core/logging_config.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/core/logging_config.rb) + +Line 19. diff --git a/fern/products/sdk-reference/ruby/core/core/logging-config/index.mdx b/fern/products/sdk-reference/ruby/core/core/logging-config/index.mdx new file mode 100644 index 0000000000..1b4b10f4b5 --- /dev/null +++ b/fern/products/sdk-reference/ruby/core/core/logging-config/index.mdx @@ -0,0 +1,51 @@ +--- +slug: "/reference/ruby/core/core/logging-config" +title: "LoggingConfig" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "module" + language: "ruby" + qualified_name: "SignalWire::Core::LoggingConfig" + parent: "SignalWire::Core" + module: "core.Core" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/core/logging_config.rb" + visibility: "public" +--- +# `LoggingConfig` + +## Signature + +```ruby +module LoggingConfig +``` + +## Methods + +### get\_execution\_mode + +Detect the SDK's deployment environment based on well-known +environment variables. + +#### Signature + +```ruby +def get_execution_mode +``` + +#### Returns + +`String` — one of 'cgi', 'lambda', 'google\_cloud\_function', 'azure\_function', or 'server'. + +#### Source + +[`lib/signalwire/core/logging_config.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/core/logging_config.rb) + +Line 28. + +## Source + +[`lib/signalwire/core/logging_config.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/core/logging_config.rb) + +Line 20. diff --git a/fern/products/sdk-reference/ruby/core/index.mdx b/fern/products/sdk-reference/ruby/core/index.mdx new file mode 100644 index 0000000000..d255f517f6 --- /dev/null +++ b/fern/products/sdk-reference/ruby/core/index.mdx @@ -0,0 +1,24 @@ +--- +slug: "/reference/ruby/core" +title: "core" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "module" + language: "ruby" + qualified_name: "core" +--- +# `core` + +## Modules + + + + + + + + + + diff --git a/fern/products/sdk-reference/ruby/core/logging/index.mdx b/fern/products/sdk-reference/ruby/core/logging/index.mdx new file mode 100644 index 0000000000..1e2cc73921 --- /dev/null +++ b/fern/products/sdk-reference/ruby/core/logging/index.mdx @@ -0,0 +1,144 @@ +--- +slug: "/reference/ruby/core/logging" +title: "Logging" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "module" + language: "ruby" + qualified_name: "SignalWire::Logging" + parent: "core" + module: "core" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/logging.rb" + visibility: "public" +--- +# `Logging` + +## Signature + +```ruby +module Logging +``` + +## Constants + + + +## Classes + + + + \------------------------------------------------------------------- + + + +## Methods + +### global\_level + +Returns the current global log level, derived from: + +1. SIGNALWIRE\_LOG\_MODE=off -> :off (suppresses everything) +2. SIGNALWIRE\_LOG\_LEVEL env -> the named level +3. Default -> :info + +#### Signature + +```ruby +def global_level +``` + +#### Source + +[`lib/signalwire/logging.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/logging.rb) + +Line 11. + +*** + +### global\_level= + +#### Signature + +```ruby +def global_level=(level) +``` + +#### Parameters + + + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/logging.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/logging.rb) + +Line 15. + +*** + +### logger + +Convenience factory + +#### Signature + +```ruby +def logger(name) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/logging.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/logging.rb) + +Line 31. + +*** + +### reset! + +#### Signature + +```ruby +def reset! +``` + +#### Source + +[`lib/signalwire/logging.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/logging.rb) + +Line 22. + +*** + +### suppressed? + +#### Signature + +```ruby +def suppressed? +``` + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/logging.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/logging.rb) + +Line 26. + +## Source + +[`lib/signalwire/logging.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/logging.rb) + +Line 4. diff --git a/fern/products/sdk-reference/ruby/core/logging/logger/index.mdx b/fern/products/sdk-reference/ruby/core/logging/logger/index.mdx new file mode 100644 index 0000000000..de7e72904c --- /dev/null +++ b/fern/products/sdk-reference/ruby/core/logging/logger/index.mdx @@ -0,0 +1,156 @@ +--- +slug: "/reference/ruby/core/logging/logger" +title: "Logger" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Logging::Logger" + parent: "SignalWire::Logging" + module: "core.Logging" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/logging.rb" + visibility: "public" +--- +# `Logger` + +*** + +## Signature + +```ruby +class Logger < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### debug + +#### Signature + +```ruby +def debug(msg) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/logging.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/logging.rb) + +Line 44. + +*** + +### error + +#### Signature + +```ruby +def error(msg) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/logging.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/logging.rb) + +Line 56. + +*** + +### info + +#### Signature + +```ruby +def info(msg) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/logging.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/logging.rb) + +Line 48. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(name) +``` + +#### Parameters + + + +#### Returns + +`Logger` — a new instance of Logger + +#### Source + +[`lib/signalwire/logging.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/logging.rb) + +Line 39. + +*** + +### name + +Returns the value of attribute name. + +#### Signature + +```ruby +attr_reader name -> Object +``` + +#### Source + +[`lib/signalwire/logging.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/logging.rb) + +Line 37. + +*** + +### warn + +#### Signature + +```ruby +def warn(msg) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/logging.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/logging.rb) + +Line 52. + +## Source + +[`lib/signalwire/logging.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/logging.rb) + +Line 36. diff --git a/fern/products/sdk-reference/ruby/core/security/index.mdx b/fern/products/sdk-reference/ruby/core/security/index.mdx new file mode 100644 index 0000000000..723c51bf0b --- /dev/null +++ b/fern/products/sdk-reference/ruby/core/security/index.mdx @@ -0,0 +1,48 @@ +--- +slug: "/reference/ruby/core/security" +title: "Security" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "module" + language: "ruby" + qualified_name: "SignalWire::Security" + parent: "core" + module: "core" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/security/session_manager.rb" + visibility: "public" +--- +# `Security` + +## Signature + +```ruby +module Security +``` + +## Classes + + + + Stateless HMAC-SHA256 session manager for secure SWAIG tool tokens. + + + + Rack middleware that rejects webhook requests with bad signatures. + + + +## Modules + + + + Stateless validator for SignalWire-signed webhook requests. + + + +## Source + +[`lib/signalwire/security/session_manager.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/security/session_manager.rb) + +Line 14. diff --git a/fern/products/sdk-reference/ruby/core/security/session-manager/index.mdx b/fern/products/sdk-reference/ruby/core/security/session-manager/index.mdx new file mode 100644 index 0000000000..fc277694d1 --- /dev/null +++ b/fern/products/sdk-reference/ruby/core/security/session-manager/index.mdx @@ -0,0 +1,350 @@ +--- +slug: "/reference/ruby/core/security/session-manager" +title: "SessionManager" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Security::SessionManager" + parent: "SignalWire::Security" + module: "core.Security" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/security/session_manager.rb" + visibility: "public" +--- +# `SessionManager` + +Stateless HMAC-SHA256 session manager for secure SWAIG tool tokens. + +Tokens are self-contained: all information needed for validation is +encoded inside the token itself. No server-side session state is stored. + +mgr = SessionManager.new(token\_expiry\_secs: 900) +token = mgr.create\_token("lookup\_order", "call-abc-123") +mgr.validate\_token("lookup\_order", token, "call-abc-123") # => true + +## Signature + +```ruby +class SessionManager < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### activate\_session + +Legacy lifecycle hook retained for API compatibility with the Python +reference. The session manager is stateless with respect to +activation, so this accepts the call ID and reports success. + +#### Signature + +```ruby +def activate_session(_call_id) +``` + +#### Parameters + + + +#### Returns + +`Boolean` — always +true+ + +#### Source + +[`lib/signalwire/security/session_manager.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/security/session_manager.rb) + +Line 126. + +*** + +### create\_session + +Return the given +call\_id+, or generate a new URL-safe session +identifier when none is supplied. + +Matches the Python reference's stateless +create\_session+: the SDK +does not persist sessions, it just mints an identifier callers can +thread through subsequent token operations. + +#### Signature + +```ruby +def create_session(call_id = nil) +``` + +#### Parameters + + + existing call ID to reuse + + +#### Returns + +`String` — the resolved call ID + +#### Source + +[`lib/signalwire/security/session_manager.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/security/session_manager.rb) + +Line 113. + +*** + +### create\_token + +Create a secure, self-contained token for a function call. + +Token format (before Base64): +call\_id.function\_name.expiry\_timestamp.nonce.hmac\_hex + +#### Signature + +```ruby +def create_token(function_name, call_id) +``` + +#### Parameters + + + + + +#### Returns + +`String` — URL-safe Base64-encoded token + +#### Source + +[`lib/signalwire/security/session_manager.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/security/session_manager.rb) + +Line 50. + +*** + +### debug\_mode= + +When set true, \{#debug\_token\} decodes token internals instead of +returning +\{ "error" => "debug mode not enabled" \}+. Mirrors the +Python reference's +\_debug\_mode+ attribute (off by default). Exposed +as a writer only — there is no corresponding reader on the Python +surface, so none is projected here. + +#### Signature + +```ruby +attr_writer debug_mode==(value: Object) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/security/session_manager.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/security/session_manager.rb) + +Line 30. + +*** + +### debug\_token + +Decode a token's components for inspection WITHOUT validating it. + +Requires \{#debug\_mode=\} to have been set +true+; otherwise returns ++\{ "error" => "debug mode not enabled" \}+, matching the Python +reference. The returned structure mirrors Python's nested ++components+/+status+ shape (call\_id and signature truncated to +8 chars + "..." when longer). + +#### Signature + +```ruby +def debug_token(token) +``` + +#### Parameters + + + +#### Returns + +`Hash` — decoded components/status, or an error/malformed hash + +#### Source + +[`lib/signalwire/security/session_manager.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/security/session_manager.rb) + +Line 181. + +*** + +### end\_session + +Legacy lifecycle hook retained for API compatibility with the Python +reference. Clears any metadata accumulated for the session and +reports success. + +#### Signature + +```ruby +def end_session(call_id) +``` + +#### Parameters + + + +#### Returns + +`Boolean` — always +true+ + +#### Source + +[`lib/signalwire/security/session_manager.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/security/session_manager.rb) + +Line 136. + +*** + +### get\_session\_metadata + +Fetch the metadata hash stored for +call\_id+. + +The Python reference is stateless and always returns +\{\}+; this port +keeps a real per-session store (matching the TypeScript port) so the +getter/setter pair round-trips, but still returns an empty hash for +unknown sessions — callers never get +nil+. + +#### Signature + +```ruby +def get_session_metadata(call_id) +``` + +#### Parameters + + + +#### Returns + +`Hash` — the session's metadata, or +\{\}+ if none is stored + +#### Source + +[`lib/signalwire/security/session_manager.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/security/session_manager.rb) + +Line 150. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(token_expiry_secs: 3600, secret_key: nil) +``` + +#### Parameters + + + + + +#### Returns + +`SessionManager` — a new instance of SessionManager + +#### Source + +[`lib/signalwire/security/session_manager.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/security/session_manager.rb) + +Line 34. + +*** + +### set\_session\_metadata + +Store a single +key+/+value+ pair in +call\_id+'s metadata, merging +with anything already recorded for that session. + +Signature mirrors the Python reference's ++set\_session\_metadata(call\_id, key, value)+. + +#### Signature + +```ruby +def set_session_metadata(call_id, key, value) +``` + +#### Parameters + + + + + + + +#### Returns + +`Boolean` — always +true+ + +#### Source + +[`lib/signalwire/security/session_manager.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/security/session_manager.rb) + +Line 165. + +*** + +### validate\_token + +Validate a function-call token. + +Checks: + +1. Correct Base64 / structure (5 dot-separated parts) +2. HMAC signature (timing-safe comparison) +3. Function name matches +4. Call ID matches +5. Token not expired + +#### Signature + +```ruby +def validate_token(function_name, token, call_id) +``` + +#### Parameters + + + + + the token to validate + + + + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/security/session_manager.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/security/session_manager.rb) + +Line 74. + +## Source + +[`lib/signalwire/security/session_manager.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/security/session_manager.rb) + +Line 24. diff --git a/fern/products/sdk-reference/ruby/core/security/webhook-middleware/index.mdx b/fern/products/sdk-reference/ruby/core/security/webhook-middleware/index.mdx new file mode 100644 index 0000000000..09b07acc38 --- /dev/null +++ b/fern/products/sdk-reference/ruby/core/security/webhook-middleware/index.mdx @@ -0,0 +1,86 @@ +--- +slug: "/reference/ruby/core/security/webhook-middleware" +title: "WebhookMiddleware" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Security::WebhookMiddleware" + parent: "SignalWire::Security" + module: "core.Security" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/security/webhook_middleware.rb" + visibility: "public" +--- +# `WebhookMiddleware` + +Rack middleware that rejects webhook requests with bad signatures. + +Configure with the customer's Signing Key (and optional `trust_proxy` +to honor X-Forwarded headers). Mount upstream of any body-parsing +middleware so the raw bytes survive intact. + +## Signature + +```ruby +class WebhookMiddleware < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Constants + + + Key under which the captured raw body is stashed on the request env. + + + + + + +## Methods + +### initialize + +#### Signature + +```ruby +def initialize(app, signing_key:, trust_proxy: false, paths: nil, methods: ['POST']) +``` + +#### Parameters + + + the wrapped Rack app. + + + + + + + + + + +#### Returns + +`WebhookMiddleware` — a new instance of WebhookMiddleware + +#### Throws + +- `ArgumentError` — when `signing_key` is missing. + +#### Source + +[`lib/signalwire/security/webhook_middleware.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/security/webhook_middleware.rb) + +Line 66. + +## Source + +[`lib/signalwire/security/webhook_middleware.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/security/webhook_middleware.rb) + +Line 47. diff --git a/fern/products/sdk-reference/ruby/core/security/webhook-validator/index.mdx b/fern/products/sdk-reference/ruby/core/security/webhook-validator/index.mdx new file mode 100644 index 0000000000..6b5ffd66d4 --- /dev/null +++ b/fern/products/sdk-reference/ruby/core/security/webhook-validator/index.mdx @@ -0,0 +1,129 @@ +--- +slug: "/reference/ruby/core/security/webhook-validator" +title: "WebhookValidator" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "module" + language: "ruby" + qualified_name: "SignalWire::Security::WebhookValidator" + parent: "SignalWire::Security" + module: "core.Security" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/security/webhook_validator.rb" + visibility: "public" +--- +# `WebhookValidator` + +Stateless validator for SignalWire-signed webhook requests. + +Both Scheme A (JSON, hex digest) and Scheme B (form-encoded, base64 +digest with bodySHA256 fallback) per porting-sdk/webhooks.md are +tried by the combined entry point. + +The two public entry points are exposed via `module_function` so +they can be invoked as `WebhookValidator.validate_webhook_signature(...)`. +All internal helpers are deliberately `_`-prefixed and private so +they don't pollute the public surface (`audit_no_cheat_tests` and +`signature_dump.rb` skip `_`-prefixed methods). + +## Signature + +```ruby +module WebhookValidator +``` + +## Methods + +### validate\_request + +Legacy `@signalwire/compatibility-api` drop-in entry point. + +If `params_or_raw_body` is a `String`, delegates to +\{validate\_webhook\_signature\} (Scheme A then Scheme B with parsed form). + +If it's a `Hash` or an array of (key, value) pairs, treats it as +pre-parsed form params and runs Scheme B directly (with URL port +normalization and optional bodySHA256 fallback). + +#### Signature + +```ruby +def validate_request(signing_key, signature, url, params_or_raw_body) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`Boolean` + +#### Throws + +- `ArgumentError` — when `signing_key` is missing. +- `TypeError` — when `params_or_raw_body` is neither a String, Hash, nor an array of pairs. + +#### Source + +[`lib/signalwire/security/webhook_validator.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/security/webhook_validator.rb) + +Line 121. + +*** + +### validate\_webhook\_signature + +Validate a SignalWire webhook signature against both schemes. + +#### Signature + +```ruby +def validate_webhook_signature(signing_key, signature, url, raw_body) +``` + +#### Parameters + + + Customer's Signing Key from the Dashboard. UTF-8 string, secret. `nil` / empty raises `ArgumentError` — that's a programming error, not a validation failure. + + + + The `X-SignalWire-Signature` header value (or `X-Twilio-Signature` for cXML compat). Missing / empty returns false without raising. + + + + The full URL SignalWire POSTed to (scheme, host, optional port, path, query). Must match what the platform saw — see the URL reconstruction section of porting-sdk/webhooks.md. + + + + The raw request body bytes as a UTF-8 string, BEFORE any JSON / form parsing. Must be a `String` — passing a parsed Hash raises `TypeError`. + + +#### Returns + +`Boolean` — true if the signature matches either Scheme A or Scheme B (with port-normalization variants and optional bodySHA256 fallback). false otherwise. + +#### Throws + +- `ArgumentError` — when `signing_key` is missing. +- `TypeError` — when `raw_body` is not a String. + +#### Source + +[`lib/signalwire/security/webhook_validator.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/security/webhook_validator.rb) + +Line 67. + +## Source + +[`lib/signalwire/security/webhook_validator.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/security/webhook_validator.rb) + +Line 45. diff --git a/fern/products/sdk-reference/ruby/core/utils/index.mdx b/fern/products/sdk-reference/ruby/core/utils/index.mdx new file mode 100644 index 0000000000..65767124de --- /dev/null +++ b/fern/products/sdk-reference/ruby/core/utils/index.mdx @@ -0,0 +1,66 @@ +--- +slug: "/reference/ruby/core/utils" +title: "Utils" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "module" + language: "ruby" + qualified_name: "SignalWire::Utils" + parent: "core" + module: "core" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/serverless.rb" + visibility: "public" +--- +# `Utils` + +## Signature + +```ruby +module Utils +``` + +## Classes + + + + SchemaUtils — Ruby port of signalwire.utils.schema\_utils.SchemaUtils. + + + + SchemaValidationError — Ruby port of signalwire.utils.schema\_utils.SchemaValidationError. + + + +## Modules + + + + SSRF-prevention guard for user-supplied URLs. + + + +## Methods + +### serverless? + +Idiomatic Ruby `?`-predicate alias of is\_serverless\_mode. + +#### Signature + +```ruby +def serverless? +``` + +#### Source + +[`lib/signalwire/utils/serverless.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/serverless.rb) + +Line 22. + +## Source + +[`lib/signalwire/utils/serverless.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/serverless.rb) + +Line 11. diff --git a/fern/products/sdk-reference/ruby/core/utils/schema-utils/index.mdx b/fern/products/sdk-reference/ruby/core/utils/schema-utils/index.mdx new file mode 100644 index 0000000000..a664965773 --- /dev/null +++ b/fern/products/sdk-reference/ruby/core/utils/schema-utils/index.mdx @@ -0,0 +1,352 @@ +--- +slug: "/reference/ruby/core/utils/schema-utils" +title: "SchemaUtils" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Utils::SchemaUtils" + parent: "SignalWire::Utils" + module: "core.Utils" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/schema_utils.rb" + visibility: "public" +--- +# `SchemaUtils` + +SchemaUtils — Ruby port of signalwire.utils.schema\_utils.SchemaUtils. + +Loads the SWML JSON Schema, extracts verb metadata, and validates +either a single verb config or a complete SWML document. + +Construction rules mirror Python: + +- Pass schema\_path: nil to use the bundled schema.json. +- schema\_validation: false disables validation (validate\_verb returns + true for every call). +- The env var SWML\_SKIP\_SCHEMA\_VALIDATION=1/true/yes also disables + validation regardless of the constructor argument. + +The Ruby port currently ships only the lightweight validator (verb +existence + required-property check). Full JSON Schema validation +can be wired in via the `json_schemer` gem by extending +init\_full\_validator. The lightweight contract matches Python's +\_validate\_verb\_lightweight() exactly. + +## Signature + +```ruby +class SchemaUtils < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### full\_validation\_available? + +Whether full JSON Schema validation is wired up. +Mirrors Python's full\_validation\_available property. + +#### Signature + +```ruby +def full_validation_available? +``` + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/utils/schema_utils.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/schema_utils.rb) + +Line 70. + +*** + +### generate\_method\_body + +Generate a Python-style method body string for a verb. +Mirrors Python's generate\_method\_body(verb\_name). + +#### Signature + +```ruby +def generate_method_body(verb_name) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/utils/schema_utils.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/schema_utils.rb) + +Line 188. + +*** + +### generate\_method\_signature + +Generate a Python-style method signature string for a verb. +Mirrors Python's generate\_method\_signature(verb\_name). + +#### Signature + +```ruby +def generate_method_signature(verb_name) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/utils/schema_utils.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/schema_utils.rb) + +Line 159. + +*** + +### get\_all\_verb\_names + +Sorted list of all known verb names. +Mirrors Python's get\_all\_verb\_names(). + +#### Signature + +```ruby +def get_all_verb_names +``` + +#### Source + +[`lib/signalwire/utils/schema_utils.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/schema_utils.rb) + +Line 87. + +*** + +### get\_verb\_parameters + +Parameter-definition block used by code-gen tooling. +Mirrors Python's get\_verb\_parameters(verb\_name). + +#### Signature + +```ruby +def get_verb_parameters(verb_name) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/utils/schema_utils.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/schema_utils.rb) + +Line 118. + +*** + +### get\_verb\_properties + +The properties\[verb\_name] block for a verb, or \{\} when unknown. +Mirrors Python's get\_verb\_properties(verb\_name). + +#### Signature + +```ruby +def get_verb_properties(verb_name) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/utils/schema_utils.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/schema_utils.rb) + +Line 93. + +*** + +### get\_verb\_required\_properties + +The required list for a verb, or \[] when unknown / no required. +Mirrors Python's get\_verb\_required\_properties(verb\_name). + +#### Signature + +```ruby +def get_verb_required_properties(verb_name) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/utils/schema_utils.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/schema_utils.rb) + +Line 108. + +*** + +### initialize + +Construct a SchemaUtils. + +#### Signature + +```ruby +def initialize(schema_path = nil, schema_validation = true) +``` + +#### Parameters + + + path to a schema.json file; nil for the bundled copy at lib/signalwire/swml/schema.json. + + + + enable/disable schema validation. + + +#### Returns + +`SchemaUtils` — a new instance of SchemaUtils + +#### Source + +[`lib/signalwire/utils/schema_utils.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/schema_utils.rb) + +Line 58. + +*** + +### load\_schema + +Read and parse the JSON Schema. Mirrors Python's load\_schema(). + +#### Signature + +```ruby +def load_schema +``` + +#### Source + +[`lib/signalwire/utils/schema_utils.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/schema_utils.rb) + +Line 75. + +*** + +### schema + +#### Signature + +```ruby +attr_reader schema -> Hash{String=>Object} +``` + +#### Returns + +`Hash{String=>Object}` — parsed JSON Schema document + +#### Source + +[`lib/signalwire/utils/schema_utils.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/schema_utils.rb) + +Line 48. + +*** + +### schema\_path + +#### Signature + +```ruby +attr_reader schema_path -> String | nil +``` + +#### Returns + +`String | nil` — resolved schema path (nil = embedded default) + +#### Source + +[`lib/signalwire/utils/schema_utils.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/schema_utils.rb) + +Line 51. + +*** + +### validate\_document + +Validate a complete SWML document. +Mirrors Python's validate\_document(document). Returns +(false, \['Schema validator not initialized']) when no full +validator is wired in. + +#### Signature + +```ruby +def validate_document(document) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/utils/schema_utils.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/schema_utils.rb) + +Line 148. + +*** + +### validate\_verb + +Validate a verb config against the schema. +Mirrors Python's validate\_verb(verb\_name, verb\_config). + +#### Signature + +```ruby +def validate_verb(verb_name, verb_config) +``` + +#### Parameters + + + + + +#### Returns + +`Array(Boolean, Array)` — (valid, errors) tuple. + +#### Source + +[`lib/signalwire/utils/schema_utils.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/schema_utils.rb) + +Line 130. + +## Source + +[`lib/signalwire/utils/schema_utils.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/schema_utils.rb) + +Line 46. diff --git a/fern/products/sdk-reference/ruby/core/utils/schema-validation-error/index.mdx b/fern/products/sdk-reference/ruby/core/utils/schema-validation-error/index.mdx new file mode 100644 index 0000000000..c968b947fd --- /dev/null +++ b/fern/products/sdk-reference/ruby/core/utils/schema-validation-error/index.mdx @@ -0,0 +1,102 @@ +--- +slug: "/reference/ruby/core/utils/schema-validation-error" +title: "SchemaValidationError" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Utils::SchemaValidationError" + parent: "SignalWire::Utils" + module: "core.Utils" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/schema_utils.rb" + visibility: "public" +--- +# `SchemaValidationError` + +SchemaValidationError — Ruby port of +signalwire.utils.schema\_utils.SchemaValidationError. + +Raised when SWML schema validation of a verb config fails. + +## Signature + +```ruby +class SchemaValidationError < StandardError +``` + +## Inheritance + +**Extends:** `StandardError` + +## Methods + +### errors + +Returns the value of attribute errors. + +#### Signature + +```ruby +attr_reader errors -> Object +``` + +#### Source + +[`lib/signalwire/utils/schema_utils.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/schema_utils.rb) + +Line 17. + +*** + +### initialize + +Construct a SchemaValidationError. Mirrors Python's +SchemaValidationError(verb\_name, errors). + +#### Signature + +```ruby +def initialize(verb_name, errors) +``` + +#### Parameters + + + + + +#### Returns + +`SchemaValidationError` — a new instance of SchemaValidationError + +#### Source + +[`lib/signalwire/utils/schema_utils.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/schema_utils.rb) + +Line 21. + +*** + +### verb\_name + +Returns the value of attribute verb\_name. + +#### Signature + +```ruby +attr_reader verb_name -> Object +``` + +#### Source + +[`lib/signalwire/utils/schema_utils.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/schema_utils.rb) + +Line 17. + +## Source + +[`lib/signalwire/utils/schema_utils.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/schema_utils.rb) + +Line 16. diff --git a/fern/products/sdk-reference/ruby/core/utils/url-validator/index.mdx b/fern/products/sdk-reference/ruby/core/utils/url-validator/index.mdx new file mode 100644 index 0000000000..1ff82ecadf --- /dev/null +++ b/fern/products/sdk-reference/ruby/core/utils/url-validator/index.mdx @@ -0,0 +1,131 @@ +--- +slug: "/reference/ruby/core/utils/url-validator" +title: "UrlValidator" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "module" + language: "ruby" + qualified_name: "SignalWire::Utils::UrlValidator" + parent: "SignalWire::Utils" + module: "core.Utils" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/url_validator.rb" + visibility: "public" +--- +# `UrlValidator` + +SSRF-prevention guard for user-supplied URLs. + +Mirrors Python's signalwire.utils.url\_validator.validate\_url: +rejects non-http(s) schemes, missing hostnames, and any URL whose +hostname resolves to a private / loopback / link-local / cloud- +metadata IP. When +allow\_private+ is true, OR the ++SWML\_ALLOW\_PRIVATE\_URLS+ env var is set to "1", "true" or "yes" +(case-insensitive), the IP-blocklist check is skipped. + +The method UrlValidator.validate\_url projects onto the Python free +function signalwire.utils.url\_validator.validate\_url via +scripts/enumerate\_signatures.py. + +## Signature + +```ruby +module UrlValidator +``` + +## Constants + + + Cross-port SSRF block list. Order matches the Python reference. + + + + +## Methods + +### \_resolver + +Pluggable resolver hook. Tests inject a lambda to keep the suite +hermetic; production calls Resolv.getaddresses. Underscore prefix +keeps it out of the public surface inventory — the Python +reference only exposes `validate_url` at this module level. + +#### Signature + +```ruby +def _resolver +``` + +#### Source + +[`lib/signalwire/utils/url_validator.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/url_validator.rb) + +Line 48. + +*** + +### \_resolver= + +#### Signature + +```ruby +def _resolver=(value) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/utils/url_validator.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/url_validator.rb) + +Line 52. + +*** + +### validate\_url + +Validate that a URL is safe to fetch. + +#### Signature + +```ruby +def validate_url(url, allow_private = false) +``` + +#### Parameters + + + URL to validate + + + + when true, bypass the IP-blocklist check + + +#### Returns + +`Boolean` — true if the URL is safe to fetch + +#### Source + +[`lib/signalwire/utils/url_validator.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/url_validator.rb) + +Line 61. + +## Source + +[`lib/signalwire/utils/url_validator.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/url_validator.rb) + +Line 28. diff --git a/fern/products/sdk-reference/ruby/index.mdx b/fern/products/sdk-reference/ruby/index.mdx index 4652c79949..fc9648a4d8 100644 --- a/fern/products/sdk-reference/ruby/index.mdx +++ b/fern/products/sdk-reference/ruby/index.mdx @@ -10,5 +10,11 @@ lustri: ## Modules +- [`agents`](/docs/sdk-reference/reference/ruby/agents) +- [`core`](/docs/sdk-reference/reference/ruby/core) +- [`Relay`](/docs/sdk-reference/reference/ruby/relay) +- [`relay`](/docs/sdk-reference/reference/ruby/relay) +- [`REST`](/docs/sdk-reference/reference/ruby/rest) +- [`rest`](/docs/sdk-reference/reference/ruby/rest) - [`SignalWire`](/docs/sdk-reference/reference/ruby/signal-wire) diff --git a/fern/products/sdk-reference/ruby/relay/action-timeout-error/index.mdx b/fern/products/sdk-reference/ruby/relay/action-timeout-error/index.mdx new file mode 100644 index 0000000000..46e45cf40b --- /dev/null +++ b/fern/products/sdk-reference/ruby/relay/action-timeout-error/index.mdx @@ -0,0 +1,34 @@ +--- +slug: "/reference/ruby/relay/action-timeout-error" +title: "ActionTimeoutError" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::ActionTimeoutError" + parent: "relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb" + visibility: "public" +--- +# `ActionTimeoutError` + +Raised when an action times out waiting for completion. + +## Signature + +```ruby +class ActionTimeoutError < StandardError +``` + +## Inheritance + +**Extends:** `StandardError` + +## Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 8. diff --git a/fern/products/sdk-reference/ruby/relay/action/index.mdx b/fern/products/sdk-reference/ruby/relay/action/index.mdx new file mode 100644 index 0000000000..7873e96f0e --- /dev/null +++ b/fern/products/sdk-reference/ruby/relay/action/index.mdx @@ -0,0 +1,292 @@ +--- +slug: "/reference/ruby/relay/action" +title: "Action" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::Action" + parent: "relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb" + visibility: "public" +--- +# `Action` + +Base class for async action handles (play, record, detect, etc.). + +Holds a control\_id and back-reference to the Call. Resolves when the +server sends a terminal event for this control\_id. + +Uses Ruby's Queue for blocking wait semantics. + +## Signature + +```ruby +class Action < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### \_check\_event + +Called by Call when an event matches our control\_id. + +#### Signature + +```ruby +def _check_event(event) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 42. + +*** + +### \_resolve + +Mark the action as completed and fire the on\_completed callback. + +#### Signature + +```ruby +def _resolve(event) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 50. + +*** + +### \_set\_on\_completed + +Called internally to set the on\_completed callback from options. + +#### Signature + +```ruby +def _set_on_completed(callback) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 37. + +*** + +### call + +Returns the value of attribute call. + +#### Signature + +```ruby +attr_reader call -> Object +``` + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 17. + +*** + +### completed + +Returns the value of attribute completed. + +#### Signature + +```ruby +attr_reader completed -> Object +``` + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 17. + +*** + +### control\_id + +Returns the value of attribute control\_id. + +#### Signature + +```ruby +attr_reader control_id -> Object +``` + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 17. + +*** + +### done? + +#### Signature + +```ruby +def done? +``` + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 89. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(call, control_id, terminal_event, terminal_states) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`Action` — a new instance of Action + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 19. + +*** + +### is\_done? + +#### Signature + +```ruby +def done? +``` + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 93. + +*** + +### on\_completed + +Set the on\_completed callback. + +#### Signature + +```ruby +def on_completed(&block) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 32. + +*** + +### result + +Returns the value of attribute result. + +#### Signature + +```ruby +attr_reader result -> Object +``` + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 17. + +*** + +### wait + +Wait for the action to complete. Returns the terminal event. +Raises ActionTimeoutError if timeout is specified and exceeded. + +#### Signature + +```ruby +def wait(timeout: nil) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 69. + +## Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 16. diff --git a/fern/products/sdk-reference/ruby/relay/ai-action/index.mdx b/fern/products/sdk-reference/ruby/relay/ai-action/index.mdx new file mode 100644 index 0000000000..73b82f8d6e --- /dev/null +++ b/fern/products/sdk-reference/ruby/relay/ai-action/index.mdx @@ -0,0 +1,76 @@ +--- +slug: "/reference/ruby/relay/ai-action" +title: "AIAction" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::AIAction" + parent: "relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb" + visibility: "public" +--- +# `AIAction` + +Handle for an active AI agent session. + +## Signature + +```ruby +class AIAction < SignalWire::Relay::Action +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::Action](/docs/sdk-reference/reference/ruby/relay/action) + +## Methods + +### initialize + +#### Signature + +```ruby +def initialize(call, control_id) +``` + +#### Parameters + + + + + +#### Returns + +`AIAction` — a new instance of AIAction + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 282. + +*** + +### stop + +#### Signature + +```ruby +def stop +``` + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 286. + +## Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 281. diff --git a/fern/products/sdk-reference/ruby/relay/call-receive-event/index.mdx b/fern/products/sdk-reference/ruby/relay/call-receive-event/index.mdx new file mode 100644 index 0000000000..b06084e164 --- /dev/null +++ b/fern/products/sdk-reference/ruby/relay/call-receive-event/index.mdx @@ -0,0 +1,238 @@ +--- +slug: "/reference/ruby/relay/call-receive-event" +title: "CallReceiveEvent" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::CallReceiveEvent" + parent: "relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" + visibility: "public" +--- +# `CallReceiveEvent` + +calling.call.receive + +## Signature + +```ruby +class CallReceiveEvent < SignalWire::Relay::RelayEvent +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::RelayEvent](/docs/sdk-reference/reference/ruby/relay/relay-event) + +## Methods + +### call\_state + +Returns the value of attribute call\_state. + +#### Signature + +```ruby +attr_reader call_state -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 164. + +*** + +### context + +Returns the value of attribute context. + +#### Signature + +```ruby +attr_reader context -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 164. + +*** + +### device + +Returns the value of attribute device. + +#### Signature + +```ruby +attr_reader device -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 164. + +*** + +### direction + +Returns the value of attribute direction. + +#### Signature + +```ruby +attr_reader direction -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 164. + +*** + +### from\_payload + +#### Signature + +```ruby +def from_payload(payload) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 167. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(call_state: '', direction: '', device: {}, node_id: '', project_id: '', context: '', segment_id: '', tag: '', **base) +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + +#### Returns + +`CallReceiveEvent` — a new instance of CallReceiveEvent + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 184. + +*** + +### node\_id + +Returns the value of attribute node\_id. + +#### Signature + +```ruby +attr_reader node_id -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 164. + +*** + +### project\_id + +Returns the value of attribute project\_id. + +#### Signature + +```ruby +attr_reader project_id -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 164. + +*** + +### segment\_id + +Returns the value of attribute segment\_id. + +#### Signature + +```ruby +attr_reader segment_id -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 164. + +*** + +### tag + +Returns the value of attribute tag. + +#### Signature + +```ruby +attr_reader tag -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 164. + +## Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 163. diff --git a/fern/products/sdk-reference/ruby/relay/call-state-event/index.mdx b/fern/products/sdk-reference/ruby/relay/call-state-event/index.mdx new file mode 100644 index 0000000000..e487dd5a66 --- /dev/null +++ b/fern/products/sdk-reference/ruby/relay/call-state-event/index.mdx @@ -0,0 +1,182 @@ +--- +slug: "/reference/ruby/relay/call-state-event" +title: "CallStateEvent" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::CallStateEvent" + parent: "relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" + visibility: "public" +--- +# `CallStateEvent` + +calling.call.state + +## Signature + +```ruby +class CallStateEvent < SignalWire::Relay::RelayEvent +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::RelayEvent](/docs/sdk-reference/reference/ruby/relay/relay-event) + +## Methods + +### call\_state + +Returns the value of attribute call\_state. + +#### Signature + +```ruby +attr_reader call_state -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 122. + +*** + +### device + +Returns the value of attribute device. + +#### Signature + +```ruby +attr_reader device -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 122. + +*** + +### direction + +Returns the value of attribute direction. + +#### Signature + +```ruby +attr_reader direction -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 122. + +*** + +### end\_reason + +Returns the value of attribute end\_reason. + +#### Signature + +```ruby +attr_reader end_reason -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 122. + +*** + +### from\_payload + +#### Signature + +```ruby +def from_payload(payload) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 124. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(call_state: '', end_reason: '', direction: '', device: {}, **base) +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`CallStateEvent` — a new instance of CallStateEvent + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 137. + +*** + +### terminal? + +Typed predicate over \{#call\_state\}, alongside the bare string. +Agrees with \{CallState.terminal?\} — true exactly when the call has +ended (\{CallState::ENDED\}). + +#### Signature + +```ruby +def terminal? +``` + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 150. + +## Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 121. diff --git a/fern/products/sdk-reference/ruby/relay/call-state/index.mdx b/fern/products/sdk-reference/ruby/relay/call-state/index.mdx new file mode 100644 index 0000000000..0c812d0cf8 --- /dev/null +++ b/fern/products/sdk-reference/ruby/relay/call-state/index.mdx @@ -0,0 +1,107 @@ +--- +slug: "/reference/ruby/relay/call-state" +title: "CallState" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "module" + language: "ruby" + qualified_name: "SignalWire::Relay::CallState" + parent: "relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/constants.rb" + visibility: "public" +--- +# `CallState` + +Named, frozen view over the call-state vocabulary. Additive: the wire +value stays a bare String everywhere (the events carry +call\_state+ as a +String, +Call#state+ is a String), and the flat +CALL\_STATE\_\*+ constants +above remain the single source of the literals. This module wraps them +with the Wave-A/Tier-1 idiom — a frozen +ALL+ ordered list, a frozen ++TERMINAL+ set, and a +terminal?+ predicate — so callers can ask ++CallState.terminal?(state)+ instead of hard-coding +== "ended"+. + +Grounded in +signalwire/relay/constants.py+ (+CALL\_STATES+) — the same +closed, server-emitted lifecycle the Python reference enumerates. +ended+ +is the one terminal state (the call is gone; \{Call#wait\_for\_ended\} +resolves on it). + +## Signature + +```ruby +module CallState +``` + +## Constants + + + + + + + + + + + + + + + +## Methods + +### terminal? + +#### Signature + +```ruby +def terminal?(state) +``` + +#### Parameters + + + a +call\_state+ string. + + +#### Returns + +`Boolean` — true when +state+ is a terminal call state. + +#### Source + +[`lib/signalwire/relay/constants.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/constants.rb) + +Line 62. + +*** + +### valid? + +#### Signature + +```ruby +def valid?(state) +``` + +#### Parameters + + + +#### Returns + +`Boolean` — true when +state+ is a known call state. + +#### Source + +[`lib/signalwire/relay/constants.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/constants.rb) + +Line 68. + +## Source + +[`lib/signalwire/relay/constants.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/constants.rb) + +Line 47. diff --git a/fern/products/sdk-reference/ruby/relay/call/index.mdx b/fern/products/sdk-reference/ruby/relay/call/index.mdx new file mode 100644 index 0000000000..ea61372d80 --- /dev/null +++ b/fern/products/sdk-reference/ruby/relay/call/index.mdx @@ -0,0 +1,1873 @@ +--- +slug: "/reference/ruby/relay/call" +title: "Call" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::Call" + parent: "relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb" + visibility: "public" +--- +# `Call` + +Represents a live RELAY call. + +Created by RelayClient on inbound calling.call.receive events or +outbound dial responses. + +## Signature + +```ruby +class Call < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### \_dispatch\_event + +Called by RelayClient when an event arrives for this call. + +#### Signature + +```ruby +def _dispatch_event(payload) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 80. + +*** + +### \_execute + +Send a calling.<method> JSON-RPC request for this call. + +#### Signature + +```ruby +def _execute(method, extra_params = nil) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 49. + +*** + +### \_start\_action + +*** + +#### Action helper + +#### Signature + +```ruby +def _start_action(action, method, params, on_completed: nil) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 251. + +*** + +### \_wait\_for\_state + +Block until the call reaches +target+, returning immediately if the +call is already at or past that state. Backs the typed +wait\_for\_\*+ +helpers below. Mirrors Python's +Call.\_wait\_for\_state+: states are +ordered created \< ringing \< answered \< ending \< ended, and a call +already at/past the target resolves with a synthetic state event +(matching the legacy SDK's short-circuit). + +#### Signature + +```ruby +def _wait_for_state(target, timeout) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 147. + +*** + +### ai + +*** + +#### AI (returns AIAction) + +#### Signature + +```ruby +def ai(control_id: nil, on_completed: nil, **kwargs) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 746. + +*** + +### ai\_hold + +#### Signature + +```ruby +def ai_hold(**kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 466. + +*** + +### ai\_message + +*** + +#### AI + +#### Signature + +```ruby +def ai_message(**kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 462. + +*** + +### ai\_unhold + +#### Signature + +```ruby +def ai_unhold(**kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 470. + +*** + +### amazon\_bedrock + +#### Signature + +```ruby +def amazon_bedrock(**kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 474. + +*** + +### answer + +*** + +#### Call lifecycle methods + +#### Signature + +```ruby +def answer(**kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 282. + +*** + +### bind\_digit + +*** + +#### Digit binding + +#### Signature + +```ruby +def bind_digit(digits:, bind_method:, **kwargs) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 368. + +*** + +### call\_id + +Returns the value of attribute call\_id. + +#### Signature + +```ruby +attr_reader call_id -> Object +``` + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 16. + +*** + +### clear\_digit\_bindings + +#### Signature + +```ruby +def clear_digit_bindings(**kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 374. + +*** + +### collect + +#### Signature + +```ruby +def collect(collect_opts, control_id: nil, on_completed: nil, **kwargs) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 572. + +*** + +### connect + +*** + +#### Connect + +#### Signature + +```ruby +def connect(devices:, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 298. + +*** + +### context + +Returns the value of attribute context. + +#### Signature + +```ruby +attr_reader context -> Object +``` + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 16. + +*** + +### denoise + +*** + +#### Denoise + +#### Signature + +```ruby +def denoise +``` + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 324. + +*** + +### denoise\_stop + +#### Signature + +```ruby +def denoise_stop +``` + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 328. + +*** + +### detect + +*** + +#### Detect + +#### Signature + +```ruby +def detect(detect_opts, timeout: nil, control_id: nil, on_completed: nil, **kwargs) +``` + +#### Parameters + + + + + + + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 614. + +*** + +### detect\_answering\_machine + +Detect human vs answering machine (AMD). Typed convenience over +\#detect. Mirrors Python's +Call.detect\_answering\_machine(\*, +initial\_timeout, end\_silence\_timeout, machine\_voice\_threshold, +machine\_words\_threshold, detect\_interruptions, detect\_message\_end, +timeout, on\_completed)+. + +Wire shape: detect \{ 'type' => 'machine', 'params' => \{ ...only the +provided fields... \} \} with an optional top-level +timeout+. + +#### Signature + +```ruby +def detect_answering_machine(initial_timeout: nil, end_silence_timeout: nil, machine_voice_threshold: nil, machine_words_threshold: nil, detect_interruptions: nil, detect_message_end: nil, timeout: nil, on_completed: nil) +``` + +#### Parameters + + + + + + + + + + + + + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 645. + +*** + +### detect\_digit + +Detect DTMF digits. Typed convenience over #detect. +Mirrors Python's +Call.detect\_digit(\*, digits, timeout, +on\_completed)+. + +Wire shape: detect \{ 'type' => 'digit', 'params' => \{ digits? \} \} with +an optional top-level +timeout+. + +#### Signature + +```ruby +def detect_digit(digits: nil, timeout: nil, on_completed: nil) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 630. + +*** + +### detect\_fax + +Detect a fax tone (CED/CNG). Typed convenience over #detect. +Mirrors Python's +Call.detect\_fax(\*, tone, timeout, on\_completed)+. + +Wire shape: detect \{ 'type' => 'fax', 'params' => \{ tone? \} \} with an +optional top-level +timeout+. + +#### Signature + +```ruby +def detect_fax(tone: nil, timeout: nil, on_completed: nil) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 667. + +*** + +### device + +Returns the value of attribute device. + +#### Signature + +```ruby +attr_reader device -> Object +``` + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 16. + +*** + +### direction + +Returns the value of attribute direction. + +#### Signature + +```ruby +attr_reader direction -> Object +``` + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 16. + +*** + +### disconnect + +#### Signature + +```ruby +def disconnect +``` + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 304. + +*** + +### echo + +*** + +#### Echo + +#### Signature + +```ruby +def echo(**kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 360. + +*** + +### ended? + +#### Signature + +```ruby +def ended? +``` + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 137. + +*** + +### hangup + +#### Signature + +```ruby +def hangup(reason: 'hangup') +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 286. + +*** + +### hold + +*** + +#### Hold / Unhold + +#### Signature + +```ruby +def hold +``` + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 312. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(client, call_id:, node_id:, project_id: '', context: '', tag: '', direction: '', device: {}, state: '', segment_id: '') +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`Call` — a new instance of Call + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 20. + +*** + +### inspect + +#### Signature + +```ruby +def inspect +``` + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 758. + +*** + +### join\_conference + +*** + +#### Conference + +#### Signature + +```ruby +def join_conference(name:, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 346. + +*** + +### join\_room + +*** + +#### Room + +#### Signature + +```ruby +def join_room(name:, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 437. + +*** + +### leave\_conference + +#### Signature + +```ruby +def leave_conference(conference_id:) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 352. + +*** + +### leave\_room + +#### Signature + +```ruby +def leave_room +``` + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 443. + +*** + +### live\_transcribe + +*** + +#### Live transcribe / translate + +#### Signature + +```ruby +def live_transcribe(action:, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 421. + +*** + +### live\_translate + +#### Signature + +```ruby +def live_translate(action:, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 427. + +*** + +### node\_id + +Returns the value of attribute node\_id. + +#### Signature + +```ruby +attr_reader node_id -> Object +``` + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 16. + +*** + +### on + +Register an event listener for this call. + +#### Signature + +```ruby +def on(event_type, &handler) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 73. + +*** + +### pass\_call + +#### Signature + +```ruby +def pass_call +``` + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 290. + +*** + +### pay + +*** + +#### Pay + +#### Signature + +```ruby +def pay(payment_connector_url:, control_id: nil, on_completed: nil, **kwargs) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 734. + +*** + +### play + +*** + +#### Audio playback (returns PlayAction) + +#### Signature + +```ruby +def play(media, volume: nil, direction: nil, loop_count: nil, control_id: nil, on_completed: nil, **kwargs) +``` + +#### Parameters + + + + + + + + + + + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 482. + +*** + +### play\_and\_collect + +*** + +#### Input collection + +#### Signature + +```ruby +def play_and_collect(media, collect, volume: nil, control_id: nil, on_completed: nil, **kwargs) +``` + +#### Parameters + + + + + + + + + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 562. + +*** + +### play\_audio + +Play an audio file from a URL. Typed convenience over #play. +Mirrors Python's +Call.play\_audio(url, \*, volume, on\_completed)+. + +Wire shape: play \[\{ 'type' => 'audio', 'params' => \{ 'url' \} \}] with an +optional top-level +volume+. + +#### Signature + +```ruby +def play_audio(url, volume: nil, on_completed: nil) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 518. + +*** + +### play\_ringtone + +Play a named ringtone by country code. Typed convenience over #play. +Mirrors Python's +Call.play\_ringtone(name, \*, duration, volume, +on\_completed)+. + +Wire shape: play \[\{ 'type' => 'ringtone', 'params' => \{ 'name', +duration? \} \}] with an optional top-level +volume+. + +#### Signature + +```ruby +def play_ringtone(name, duration: nil, volume: nil, on_completed: nil) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 538. + +*** + +### play\_silence + +Play silence for +duration+ seconds. Typed convenience over #play. +Mirrors Python's +Call.play\_silence(duration, \*, on\_completed)+. + +Wire shape: play \[\{ 'type' => 'silence', 'params' => \{ 'duration' \} \}]. + +#### Signature + +```ruby +def play_silence(duration, on_completed: nil) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 527. + +*** + +### play\_tts + +Play text-to-speech. Typed convenience over #play. + +Restores the legacy +call.play\_tts(text)+ ergonomics so callers don't +hand-build the +\{ 'type' => 'tts', 'params' => \{...\} \}+ media shape. +Mirrors Python's +Call.play\_tts(text, \*, language, gender, voice, +volume, on\_completed)+. + +Wire shape: play \[\{ 'type' => 'tts', 'params' => \{ 'text', language?, +gender?, voice? \} \}] with an optional top-level +volume+. + +#### Signature + +```ruby +def play_tts(text, language: nil, gender: nil, voice: nil, volume: nil, on_completed: nil) +``` + +#### Parameters + + + + + + + + + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 503. + +*** + +### project\_id + +Returns the value of attribute project\_id. + +#### Signature + +```ruby +attr_reader project_id -> Object +``` + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 16. + +*** + +### prompt\_audio + +Play an audio file then collect input. Typed media over +\#play\_and\_collect. Mirrors Python's +Call.prompt\_audio(url, collect, +\*, volume, on\_completed)+. + +Wire shape: play\_and\_collect \[\{ 'type' => 'audio', 'params' => +\{ 'url' \} \}] with the given +collect+ object and an optional top-level ++volume+. + +#### Signature + +```ruby +def prompt_audio(url, collect, volume: nil, on_completed: nil) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 605. + +*** + +### prompt\_tts + +Play TTS then collect input. Typed media over #play\_and\_collect. +Mirrors Python's +Call.prompt\_tts(text, collect, \*, language, gender, +voice, volume, on\_completed)+. + +Wire shape: play\_and\_collect \[\{ 'type' => 'tts', 'params' => \{ 'text', +language?, gender?, voice? \} \}] with the given +collect+ object and an +optional top-level +volume+. + +#### Signature + +```ruby +def prompt_tts(text, collect, language: nil, gender: nil, voice: nil, volume: nil, on_completed: nil) +``` + +#### Parameters + + + + + + + + + + + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 588. + +*** + +### queue\_enter + +*** + +#### Queue + +#### Signature + +```ruby +def queue_enter(queue_name:, control_id: nil, **kwargs) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 382. + +*** + +### queue\_leave + +#### Signature + +```ruby +def queue_leave(queue_name:, control_id: nil, **kwargs) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 389. + +*** + +### receive\_fax + +#### Signature + +```ruby +def receive_fax(control_id: nil, on_completed: nil, **kwargs) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 686. + +*** + +### record + +*** + +#### Recording (returns RecordAction) + +#### Signature + +```ruby +def record(audio: nil, control_id: nil, on_completed: nil, **kwargs) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 549. + +*** + +### refer + +*** + +#### Refer (SIP REFER) + +#### Signature + +```ruby +def refer(device:, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 400. + +*** + +### segment\_id + +Returns the value of attribute segment\_id. + +#### Signature + +```ruby +attr_reader segment_id -> Object +``` + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 16. + +*** + +### send\_digits + +*** + +#### Send digits + +#### Signature + +```ruby +def send_digits(digits:, control_id: nil, **kwargs) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 410. + +*** + +### send\_fax + +*** + +#### Fax + +#### Signature + +```ruby +def send_fax(document:, control_id: nil, on_completed: nil, **kwargs) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 678. + +*** + +### state + +Returns the value of attribute state. + +#### Signature + +```ruby +attr_accessor state <-> Object +``` + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 18. + +*** + +### state= + +Sets the attribute state + +#### Signature + +```ruby +attr_accessor state= <-> Object +``` + +#### Parameters + + + the value to set the attribute state to. + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 18. + +*** + +### stream + +*** + +#### Stream + +#### Signature + +```ruby +def stream(url:, control_id: nil, on_completed: nil, **kwargs) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 710. + +*** + +### tag + +Returns the value of attribute tag. + +#### Signature + +```ruby +attr_reader tag -> Object +``` + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 16. + +*** + +### tap\_audio + +*** + +#### Tap + +#### Signature + +```ruby +def tap_audio(tap_opts, device:, control_id: nil, on_completed: nil, **kwargs) +``` + +#### Parameters + + + + + + + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 698. + +*** + +### to\_s + +#### Signature + +```ruby +def to_s +``` + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 754. + +*** + +### transcribe + +*** + +#### Transcribe + +#### Signature + +```ruby +def transcribe(control_id: nil, on_completed: nil, **kwargs) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 722. + +*** + +### transfer + +*** + +#### Transfer + +#### Signature + +```ruby +def transfer(dest:, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 336. + +*** + +### unhold + +#### Signature + +```ruby +def unhold +``` + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 316. + +*** + +### user\_event + +*** + +#### User events + +#### Signature + +```ruby +def user_event(event: nil, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 451. + +*** + +### wait\_for + +Wait for a specific event, optionally filtered by a predicate. + +Python parity: `Call.wait_for(event_type, predicate=None, +timeout=None)`. Registers a one-shot listener for +event\_type+ and +blocks until the first matching event arrives (or +timeout+ seconds +elapse). When +predicate+ is supplied, only events for which it +returns truthy satisfy the wait. The Python coroutine resolves an +asyncio future; the Ruby port blocks the calling thread on a +ConditionVariable, mirroring +#wait\_for\_ended+'s synchronization +model. + +#### Signature + +```ruby +def wait_for(event_type, predicate: nil, timeout: nil) +``` + +#### Parameters + + + the RELAY event type to wait for + + + + + + +#### Returns + +`RelayEvent | nil` — the matching event, or +nil+ on timeout + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 205. + +*** + +### wait\_for\_answered + +Wait until the call is answered (immediate if already answered or past +it). Typed wait over #wait\_for. Mirrors Python's ++Call.wait\_for\_answered(timeout)+. + +#### Signature + +```ruby +def wait_for_answered(timeout: nil) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 172. + +*** + +### wait\_for\_ended + +Wait for the call to reach the ended state. + +#### Signature + +```ruby +def wait_for_ended(timeout: nil) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 119. + +*** + +### wait\_for\_ending + +Wait until the call is ending (immediate if already ending or past +it). Typed wait over #wait\_for. Mirrors Python's ++Call.wait\_for\_ending(timeout)+. + +#### Signature + +```ruby +def wait_for_ending(timeout: nil) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 186. + +*** + +### wait\_for\_ringing + +Wait until the call is ringing (immediate if already ringing or past +it). Typed wait over #wait\_for. Mirrors Python's ++Call.wait\_for\_ringing(timeout)+. + +#### Signature + +```ruby +def wait_for_ringing(timeout: nil) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 179. + +## Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 15. diff --git a/fern/products/sdk-reference/ruby/relay/calling-error-event/index.mdx b/fern/products/sdk-reference/ruby/relay/calling-error-event/index.mdx new file mode 100644 index 0000000000..8c70bd2aa7 --- /dev/null +++ b/fern/products/sdk-reference/ruby/relay/calling-error-event/index.mdx @@ -0,0 +1,118 @@ +--- +slug: "/reference/ruby/relay/calling-error-event" +title: "CallingErrorEvent" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::CallingErrorEvent" + parent: "relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" + visibility: "public" +--- +# `CallingErrorEvent` + +calling.error + +## Signature + +```ruby +class CallingErrorEvent < SignalWire::Relay::RelayEvent +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::RelayEvent](/docs/sdk-reference/reference/ruby/relay/relay-event) + +## Methods + +### code + +Returns the value of attribute code. + +#### Signature + +```ruby +attr_reader code -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 780. + +*** + +### from\_payload + +#### Signature + +```ruby +def from_payload(payload) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 782. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(code: '', message: '', **base) +``` + +#### Parameters + + + + + + + +#### Returns + +`CallingErrorEvent` — a new instance of CallingErrorEvent + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 793. + +*** + +### message + +Returns the value of attribute message. + +#### Signature + +```ruby +attr_reader message -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 780. + +## Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 779. diff --git a/fern/products/sdk-reference/ruby/relay/client/index.mdx b/fern/products/sdk-reference/ruby/relay/client/index.mdx new file mode 100644 index 0000000000..bea12fe97b --- /dev/null +++ b/fern/products/sdk-reference/ruby/relay/client/index.mdx @@ -0,0 +1,522 @@ +--- +slug: "/reference/ruby/relay/client" +title: "Client" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::Client" + parent: "relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb" + visibility: "public" +--- +# `Client` + +RelayClient -- WebSocket + JSON-RPC 2.0 protocol + event dispatch. + +One instance = one persistent WebSocket connection to SignalWire RELAY. + +Implements the 4 correlation mechanisms: + +1. JSON-RPC id -> pending hash with ConditionVariable +2. call\_id -> Call routing +3. control\_id -> Action tracking per Call +4. tag -> dial correlation + +## Signature + +```ruby +class Client < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### \_authorization\_state + +Return the SDK's tracked authorization-state blob (Python parity: ++RelayClient.\_authorization\_state+). Captured from ++signalwire.authorization.state+ events for use on reconnect. + +#### Signature + +```ruby +def _authorization_state +``` + +#### Source + +[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) + +Line 157. + +*** + +### \_calls\_snapshot + +Return the current call\_id -> Call registry (a snapshot copy). +Test/audit-only surface for asserting on internal routing state; +the Python reference exposes the same via +RelayClient.\_calls+. + +#### Signature + +```ruby +def _calls_snapshot +``` + +#### Source + +[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) + +Line 142. + +*** + +### \_connected? + +True when the client believes the WebSocket is open. Exposed for +tests that need to assert the recv loop is still alive after an +injected error / handler exception. + +#### Signature + +```ruby +def _connected? +``` + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) + +Line 164. + +*** + +### \_set\_protocol + +Test/reconnect surface: stamp a previously issued protocol +string before calling +run+ so the next signalwire.connect frame +carries it (the production server replies with ++session\_restored: true+). Mirrors Python's +RelayClient.\_relay\_protocol = ...+. + +#### Signature + +```ruby +def _set_protocol(value) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) + +Line 150. + +*** + +### dial + +Dial outbound call(s). Returns a Call object. + +#### Signature + +```ruby +def dial(devices, timeout: 120, tag: nil, **kwargs) +``` + +#### Parameters + + + + + + + + + +#### Throws + +- `RelayError` + +#### Source + +[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) + +Line 213. + +*** + +### execute + +Send a JSON-RPC request and wait for the response. +Returns the result hash. Raises RelayError on error. + +#### Signature + +```ruby +def execute(method, params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) + +Line 309. + +*** + +### host + +Returns the value of attribute host. + +#### Signature + +```ruby +attr_reader host -> Object +``` + +#### Source + +[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) + +Line 38. + +*** + +### initialize + +Python parity: +`RelayClient(project=None, token=None, jwt_token=None, +host=None, contexts=None, max_active_calls=None)`. Ruby v1 +accepted `space:` for the same purpose; both keyword names +are honoured for backwards compat. `host` is the canonical +Python name and now drives the WebSocket endpoint. + +#### Signature + +```ruby +def initialize(project: nil, token: nil, jwt_token: nil, host: nil, contexts: ['default'], max_active_calls: nil, space: nil) +``` + +#### Parameters + + + + + + + + + + + + + + + +#### Returns + +`Client` — a new instance of Client + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) + +Line 58. + +*** + +### max\_active\_calls + +Returns the value of attribute max\_active\_calls. + +#### Signature + +```ruby +attr_reader max_active_calls -> Object +``` + +#### Source + +[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) + +Line 38. + +*** + +### on\_call + +Register inbound call handler. + +#### Signature + +```ruby +def on_call(&block) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) + +Line 114. + +*** + +### on\_event + +Register a generic inbound-event handler. Called for every ++signalwire.event+ frame BEFORE the type-specific handlers +(call/message/dial) run. Used by integration probes (e.g. the +audit harness) that need to react to raw events. + +#### Signature + +```ruby +def on_event(&block) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) + +Line 127. + +*** + +### on\_message + +Register inbound message handler. + +#### Signature + +```ruby +def on_message(&block) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) + +Line 119. + +*** + +### project\_id + +Returns the value of attribute project\_id. + +#### Signature + +```ruby +attr_reader project_id -> Object +``` + +#### Source + +[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) + +Line 38. + +*** + +### protocol + +Returns the value of attribute protocol. + +#### Signature + +```ruby +attr_reader protocol -> Object +``` + +#### Source + +[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) + +Line 38. + +*** + +### receive + +*** + +#### Dynamic context subscription + +#### Signature + +```ruby +def receive(contexts) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) + +Line 295. + +*** + +### run + +Connect, authenticate, subscribe, and enter the read loop. +Blocks until stop is called. + +#### Signature + +```ruby +def run +``` + +#### Source + +[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) + +Line 170. + +*** + +### send\_json + +Send an arbitrary JSON-RPC frame to the server. Public surface for +tests, the audit harness, and one-off RELAY methods that don't +have a high-level wrapper. Returns nothing; outbound failures are +silently ignored (matching +\_send\_json+ semantics). + +#### Signature + +```ruby +def send_json(msg) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) + +Line 135. + +*** + +### send\_message + +Send an SMS/MMS message. Returns a Message object. + +Mirrors Python's RelayClient.send\_message keyword-only signature +exactly. At least one of body: or media: is required. + +#### Signature + +```ruby +def send_message(to_number:, from_number:, context: nil, body: nil, media: nil, tags: nil, region: nil, on_completed: nil) +``` + +#### Parameters + + + + + + + + + + + + + + + + + +#### Source + +[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) + +Line 255. + +*** + +### stop + +Graceful shutdown. + +#### Signature + +```ruby +def stop +``` + +#### Source + +[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) + +Line 194. + +*** + +### unreceive + +#### Signature + +```ruby +def unreceive(contexts) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) + +Line 299. + +## Source + +[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) + +Line 37. diff --git a/fern/products/sdk-reference/ruby/relay/collect-action/index.mdx b/fern/products/sdk-reference/ruby/relay/collect-action/index.mdx new file mode 100644 index 0000000000..bcfc76f1d4 --- /dev/null +++ b/fern/products/sdk-reference/ruby/relay/collect-action/index.mdx @@ -0,0 +1,135 @@ +--- +slug: "/reference/ruby/relay/collect-action" +title: "CollectAction" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::CollectAction" + parent: "relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb" + visibility: "public" +--- +# `CollectAction` + +Handle for play\_and\_collect or standalone collect. + +## Signature + +```ruby +class CollectAction < SignalWire::Relay::Action +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::Action](/docs/sdk-reference/reference/ruby/relay/action) + +## Methods + +### \_check\_event + +play\_and\_collect shares a control\_id across play and collect +phases. Only resolve on collect events, not play events. + +#### Signature + +```ruby +def _check_event(event) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 172. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(call, control_id) +``` + +#### Parameters + + + + + +#### Returns + +`CollectAction` — a new instance of CollectAction + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 165. + +*** + +### start\_input\_timers + +#### Signature + +```ruby +def start_input_timers +``` + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 193. + +*** + +### stop + +#### Signature + +```ruby +def stop +``` + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 183. + +*** + +### volume + +#### Signature + +```ruby +def volume(vol) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 187. + +## Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 164. diff --git a/fern/products/sdk-reference/ruby/relay/collect-config/index.mdx b/fern/products/sdk-reference/ruby/relay/collect-config/index.mdx new file mode 100644 index 0000000000..b2939be2ca --- /dev/null +++ b/fern/products/sdk-reference/ruby/relay/collect-config/index.mdx @@ -0,0 +1,430 @@ +--- +slug: "/reference/ruby/relay/collect-config" +title: "CollectConfig" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::CollectConfig" + parent: "relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/collect_config.rb" + visibility: "public" +--- +# `CollectConfig` + +A typed RELAY +collect+ configuration: the known-shape options object the +input-collection wrappers (\{Call#collect\}, \{Call#play\_and\_collect\}, +\{Call#prompt\_tts\}, \{Call#prompt\_audio\}) currently take as a raw Hash and +pass through verbatim onto the +calling.collect+ / ++calling.play\_and\_collect+ wire frame. + +The shape is fully grounded in ++porting-sdk/relay-protocol/calling.collect.params.json+: a +digits+ +sub-object (+max+, +min+, +digit\_timeout+, +terminators+), a +speech+ +sub-object (+end\_silence\_timeout+, +hints+, +language+, +model+, ++speech\_timeout+), and top-level toggles (+initial\_timeout+, ++partial\_results+, +continuous+, +send\_start\_of\_input+, ++start\_input\_timers+). +CollectConfig+ types that shape so callers stop +hand-building nested Hashes. + +**No closed-set enum is folded in here:** the collect shape carries _no_ +schema-enumerated value sets — +terminators+ is a free DTMF string, ++language+/+model+ are open vocabularies (ASR language tags / model +names). Inventing an enum would contradict the wire contract. (This is +why ruby's named Tier-3 collect item types only the _shape_; the Tier-1 +enum integration lives in the record/tap/SWAIG items, where the sets +genuinely _are_ closed.) + +This is **additive**: every wrapper still accepts a raw Hash. A ++CollectConfig+ yields the _identical_ wire Hash via \{#to\_h\} (string +keys, only the provided fields present — unset optionals are omitted, so +the frame is byte identical to the hand-built literal the wrapper tests +assert). + +Idiomatic Ruby value object, consistent with the Wave-A relay-event +idioms: Ruby 3.0 pattern matching (+#deconstruct\_keys+), value ++#==+/+#eql?+/+#hash+, and +#to\_h+/+#to\_json+ projections. + +## Signature + +```ruby +class CollectConfig < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Examples + + + + ```ruby + cfg = SignalWire::Relay::CollectConfig.new( + digits: { max: 4, terminators: "#" }, initial_timeout: 5.0 + ) + call.collect(cfg.to_h) + ``` + + + + ```ruby + cfg = SignalWire::Relay::CollectConfig.new( + speech: { end_silence_timeout: 1.0, language: "en-US" } + ) + call.prompt_tts("Say something", cfg.to_h) + ``` + + + +## Methods + +### == + +Value equality: same projected wire shape. + +#### Signature + +```ruby +def ==(other) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/collect_config.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/collect_config.rb) + +Line 127. + +*** + +### continuous + +#### Signature + +```ruby +attr_reader continuous -> Numeric | nil +``` + +#### Returns + +`Numeric | nil` + +#### Source + +[`lib/signalwire/relay/collect_config.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/collect_config.rb) + +Line 59. + +*** + +### deconstruct\_keys + +Ruby 3.0 hash pattern-matching hook. Returns symbol-keyed config with +only the _set_ fields (mirroring \{#to\_h\}'s omit-when-nil contract); a +subset of +keys+ returns only those that are both requested and set. + +#### Signature + +```ruby +def deconstruct_keys(keys) +``` + +#### Parameters + + + +#### Returns + +`Hash{Symbol => Object}` + +#### Source + +[`lib/signalwire/relay/collect_config.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/collect_config.rb) + +Line 112. + +*** + +### digits + +#### Signature + +```ruby +attr_reader digits -> Hash | nil +``` + +#### Returns + +`Hash | nil` — the +digits+ sub-config, or nil. + +#### Source + +[`lib/signalwire/relay/collect_config.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/collect_config.rb) + +Line 53. + +*** + +### eql? + +Value equality: same projected wire shape. + +#### Signature + +```ruby +def ==(other) +``` + +#### Source + +[`lib/signalwire/relay/collect_config.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/collect_config.rb) + +Line 130. + +*** + +### hash + +Hash key parity with \{#==\}. + +#### Signature + +```ruby +def hash +``` + +#### Source + +[`lib/signalwire/relay/collect_config.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/collect_config.rb) + +Line 133. + +*** + +### initial\_timeout + +#### Signature + +```ruby +attr_reader initial_timeout -> Numeric | nil +``` + +#### Returns + +`Numeric | nil` + +#### Source + +[`lib/signalwire/relay/collect_config.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/collect_config.rb) + +Line 59. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(digits: nil, speech: nil, initial_timeout: nil, partial_results: nil, continuous: nil, send_start_of_input: nil, start_input_timers: nil) +``` + +#### Parameters + + + + + + + + + + + + + + + +#### Returns + +`CollectConfig` — a new instance of CollectConfig + +#### Source + +[`lib/signalwire/relay/collect_config.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/collect_config.rb) + +Line 71. + +*** + +### inspect + +#### Signature + +```ruby +def to_s +``` + +#### Source + +[`lib/signalwire/relay/collect_config.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/collect_config.rb) + +Line 140. + +*** + +### partial\_results + +#### Signature + +```ruby +attr_reader partial_results -> Numeric | nil +``` + +#### Returns + +`Numeric | nil` + +#### Source + +[`lib/signalwire/relay/collect_config.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/collect_config.rb) + +Line 59. + +*** + +### send\_start\_of\_input + +#### Signature + +```ruby +attr_reader send_start_of_input -> Numeric | nil +``` + +#### Returns + +`Numeric | nil` + +#### Source + +[`lib/signalwire/relay/collect_config.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/collect_config.rb) + +Line 59. + +*** + +### speech + +#### Signature + +```ruby +attr_reader speech -> Hash | nil +``` + +#### Returns + +`Hash | nil` — the +speech+ sub-config, or nil. + +#### Source + +[`lib/signalwire/relay/collect_config.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/collect_config.rb) + +Line 56. + +*** + +### start\_input\_timers + +#### Signature + +```ruby +attr_reader start_input_timers -> Numeric | nil +``` + +#### Returns + +`Numeric | nil` + +#### Source + +[`lib/signalwire/relay/collect_config.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/collect_config.rb) + +Line 59. + +*** + +### to\_h + +The wire Hash, string-keyed, with **only the provided fields present** +(unset optionals omitted). +digits+/+speech+ sub-Hashes are +key-stringified one level deep. Byte identical to the collect literal a +caller would hand-write and the wrapper tests assert on the journal. + +#### Signature + +```ruby +def to_h +``` + +#### Returns + +`Hash{String => Object}` + +#### Source + +[`lib/signalwire/relay/collect_config.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/collect_config.rb) + +Line 89. + +*** + +### to\_json + +#### Signature + +```ruby +def to_json(*args) +``` + +#### Parameters + + + +#### Returns + +`String` — JSON serialization of \{#to\_h\}. + +#### Source + +[`lib/signalwire/relay/collect_config.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/collect_config.rb) + +Line 102. + +*** + +### to\_s + +#### Signature + +```ruby +def to_s +``` + +#### Source + +[`lib/signalwire/relay/collect_config.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/collect_config.rb) + +Line 137. + +## Source + +[`lib/signalwire/relay/collect_config.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/collect_config.rb) + +Line 51. diff --git a/fern/products/sdk-reference/ruby/relay/collect-event/index.mdx b/fern/products/sdk-reference/ruby/relay/collect-event/index.mdx new file mode 100644 index 0000000000..f78944807a --- /dev/null +++ b/fern/products/sdk-reference/ruby/relay/collect-event/index.mdx @@ -0,0 +1,158 @@ +--- +slug: "/reference/ruby/relay/collect-event" +title: "CollectEvent" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::CollectEvent" + parent: "relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" + visibility: "public" +--- +# `CollectEvent` + +calling.call.collect + +## Signature + +```ruby +class CollectEvent < SignalWire::Relay::RelayEvent +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::RelayEvent](/docs/sdk-reference/reference/ruby/relay/relay-event) + +## Methods + +### control\_id + +Returns the value of attribute control\_id. + +#### Signature + +```ruby +attr_reader control_id -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 274. + +*** + +### final + +Returns the value of attribute final. + +#### Signature + +```ruby +attr_reader final -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 274. + +*** + +### from\_payload + +#### Signature + +```ruby +def from_payload(payload) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 276. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(control_id: '', state: '', result_data: {}, final: nil, **base) +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`CollectEvent` — a new instance of CollectEvent + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 289. + +*** + +### result\_data + +Returns the value of attribute result\_data. + +#### Signature + +```ruby +attr_reader result_data -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 274. + +*** + +### state + +Returns the value of attribute state. + +#### Signature + +```ruby +attr_reader state -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 274. + +## Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 273. diff --git a/fern/products/sdk-reference/ruby/relay/conference-event/index.mdx b/fern/products/sdk-reference/ruby/relay/conference-event/index.mdx new file mode 100644 index 0000000000..8e414d2d60 --- /dev/null +++ b/fern/products/sdk-reference/ruby/relay/conference-event/index.mdx @@ -0,0 +1,138 @@ +--- +slug: "/reference/ruby/relay/conference-event" +title: "ConferenceEvent" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::ConferenceEvent" + parent: "relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" + visibility: "public" +--- +# `ConferenceEvent` + +calling.conference + +## Signature + +```ruby +class ConferenceEvent < SignalWire::Relay::RelayEvent +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::RelayEvent](/docs/sdk-reference/reference/ruby/relay/relay-event) + +## Methods + +### conference\_id + +Returns the value of attribute conference\_id. + +#### Signature + +```ruby +attr_reader conference_id -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 750. + +*** + +### from\_payload + +#### Signature + +```ruby +def from_payload(payload) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 752. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(conference_id: '', name: '', status: '', **base) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`ConferenceEvent` — a new instance of ConferenceEvent + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 764. + +*** + +### name + +Returns the value of attribute name. + +#### Signature + +```ruby +attr_reader name -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 750. + +*** + +### status + +Returns the value of attribute status. + +#### Signature + +```ruby +attr_reader status -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 750. + +## Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 749. diff --git a/fern/products/sdk-reference/ruby/relay/connect-event/index.mdx b/fern/products/sdk-reference/ruby/relay/connect-event/index.mdx new file mode 100644 index 0000000000..b33296ddf2 --- /dev/null +++ b/fern/products/sdk-reference/ruby/relay/connect-event/index.mdx @@ -0,0 +1,118 @@ +--- +slug: "/reference/ruby/relay/connect-event" +title: "ConnectEvent" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::ConnectEvent" + parent: "relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" + visibility: "public" +--- +# `ConnectEvent` + +calling.call.connect + +## Signature + +```ruby +class ConnectEvent < SignalWire::Relay::RelayEvent +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::RelayEvent](/docs/sdk-reference/reference/ruby/relay/relay-event) + +## Methods + +### connect\_state + +Returns the value of attribute connect\_state. + +#### Signature + +```ruby +attr_reader connect_state -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 307. + +*** + +### from\_payload + +#### Signature + +```ruby +def from_payload(payload) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 309. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(connect_state: '', peer: {}, **base) +``` + +#### Parameters + + + + + + + +#### Returns + +`ConnectEvent` — a new instance of ConnectEvent + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 320. + +*** + +### peer + +Returns the value of attribute peer. + +#### Signature + +```ruby +attr_reader peer -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 307. + +## Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 306. diff --git a/fern/products/sdk-reference/ruby/relay/denoise-event/index.mdx b/fern/products/sdk-reference/ruby/relay/denoise-event/index.mdx new file mode 100644 index 0000000000..1ccb50a3c1 --- /dev/null +++ b/fern/products/sdk-reference/ruby/relay/denoise-event/index.mdx @@ -0,0 +1,98 @@ +--- +slug: "/reference/ruby/relay/denoise-event" +title: "DenoiseEvent" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::DenoiseEvent" + parent: "relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" + visibility: "public" +--- +# `DenoiseEvent` + +calling.call.denoise + +## Signature + +```ruby +class DenoiseEvent < SignalWire::Relay::RelayEvent +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::RelayEvent](/docs/sdk-reference/reference/ruby/relay/relay-event) + +## Methods + +### denoised + +Returns the value of attribute denoised. + +#### Signature + +```ruby +attr_reader denoised -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 568. + +*** + +### from\_payload + +#### Signature + +```ruby +def from_payload(payload) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 570. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(denoised: false, **base) +``` + +#### Parameters + + + + + +#### Returns + +`DenoiseEvent` — a new instance of DenoiseEvent + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 580. + +## Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 567. diff --git a/fern/products/sdk-reference/ruby/relay/detect-action/index.mdx b/fern/products/sdk-reference/ruby/relay/detect-action/index.mdx new file mode 100644 index 0000000000..9434f2b0e4 --- /dev/null +++ b/fern/products/sdk-reference/ruby/relay/detect-action/index.mdx @@ -0,0 +1,99 @@ +--- +slug: "/reference/ruby/relay/detect-action" +title: "DetectAction" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::DetectAction" + parent: "relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb" + visibility: "public" +--- +# `DetectAction` + +Handle for an active detect operation. + +## Signature + +```ruby +class DetectAction < SignalWire::Relay::Action +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::Action](/docs/sdk-reference/reference/ruby/relay/action) + +## Methods + +### \_check\_event + +Detect delivers results continuously. Resolve on first result or +when finished/error. + +#### Signature + +```ruby +def _check_event(event) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 150. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(call, control_id) +``` + +#### Parameters + + + + + +#### Returns + +`DetectAction` — a new instance of DetectAction + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 144. + +*** + +### stop + +#### Signature + +```ruby +def stop +``` + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 158. + +## Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 143. diff --git a/fern/products/sdk-reference/ruby/relay/detect-event/index.mdx b/fern/products/sdk-reference/ruby/relay/detect-event/index.mdx new file mode 100644 index 0000000000..7dd9228879 --- /dev/null +++ b/fern/products/sdk-reference/ruby/relay/detect-event/index.mdx @@ -0,0 +1,118 @@ +--- +slug: "/reference/ruby/relay/detect-event" +title: "DetectEvent" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::DetectEvent" + parent: "relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" + visibility: "public" +--- +# `DetectEvent` + +calling.call.detect + +## Signature + +```ruby +class DetectEvent < SignalWire::Relay::RelayEvent +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::RelayEvent](/docs/sdk-reference/reference/ruby/relay/relay-event) + +## Methods + +### control\_id + +Returns the value of attribute control\_id. + +#### Signature + +```ruby +attr_reader control_id -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 335. + +*** + +### detect + +Returns the value of attribute detect. + +#### Signature + +```ruby +attr_reader detect -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 335. + +*** + +### from\_payload + +#### Signature + +```ruby +def from_payload(payload) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 337. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(control_id: '', detect: {}, **base) +``` + +#### Parameters + + + + + + + +#### Returns + +`DetectEvent` — a new instance of DetectEvent + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 348. + +## Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 334. diff --git a/fern/products/sdk-reference/ruby/relay/device/index.mdx b/fern/products/sdk-reference/ruby/relay/device/index.mdx new file mode 100644 index 0000000000..a300d58311 --- /dev/null +++ b/fern/products/sdk-reference/ruby/relay/device/index.mdx @@ -0,0 +1,400 @@ +--- +slug: "/reference/ruby/relay/device" +title: "Device" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::Device" + parent: "relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/device.rb" + visibility: "public" +--- +# `Device` + +A typed RELAY +device+ descriptor: the +\{ "type" => ..., "params" => \{...\} \}+ +object handed to \{Call#connect\}, \{Call#refer\}, \{Call#tap\_audio\}, and +\{Client#dial\} (where it nests inside the +devices+ list-of-lists). + +Across the relay layer this is the single highest-traffic untyped blob: +a phone/sip/agora device is hand-built as a raw Hash at every call site. ++Device+ types the _shape_ — a +type+ discriminant plus a free-form ++params+ map — while leaving +type+ a String, because the discriminant +("phone", "sip", "agora", …) is **not** schema-enumerated in ++porting-sdk/relay-protocol/calling.\{connect,refer,dial,tap\}.params.json+ +(each declares +type+ as a bare +"string"+). Typing it as an enum would +invent a closed set the wire contract does not promise. + +This is **additive**: every relay method still accepts a raw Hash. A ++Device+ is a convenience that yields the _identical_ wire Hash via +\{#to\_h\}, so callers can build one and pass +device.to\_h+ (or pass the ++Device+ where a +#to\_h+-coercible value is expected). The wire shape is ++\{ "type" => <type>, "params" => <params> \}+ with **string** keys, byte +identical to the hand-written literal. + +Idiomatic Ruby value object, consistent with the Wave-A relay-event +idioms (\{RelayEvent\}): Ruby 3.0 pattern matching +(+#deconstruct\_keys+/+#deconstruct+), value +#==+/+#eql?+/+#hash+ so two +devices carrying the same data are interchangeable Set members / Hash +keys, plus +#to\_h+/+#to\_json+ projections. + +## Signature + +```ruby +class Device < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Examples + + + + ```ruby + dev = SignalWire::Relay::Device.phone(to: "+15551112222", from: "+15553334444") + client.dial([[dev.to_h]], tag: "t1") + ``` + + + + ```ruby + case dev + in { type: "phone", params: { to_number: } } + puts "dialing #{to_number}" + end + ``` + + + +## Methods + +### == + +Value equality: same +type+ and same +params+. + +#### Signature + +```ruby +def ==(other) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/device.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/device.rb) + +Line 124. + +*** + +### deconstruct + +Ruby 3.0 array pattern-matching hook, e.g. +in \[type, params]+. + +#### Signature + +```ruby +def deconstruct +``` + +#### Returns + +`Array(String, Hash)` + +#### Source + +[`lib/signalwire/relay/device.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/device.rb) + +Line 119. + +*** + +### deconstruct\_keys + +Ruby 3.0 hash pattern-matching hook, e.g. ++in \{ type: "phone", params: \}+. Returns symbol-keyed +\{ type:, params: \}+ +(idiomatic for Ruby pattern matching); when the matcher requests a +subset of +keys+, only those are returned. + +#### Signature + +```ruby +def deconstruct_keys(keys) +``` + +#### Parameters + + + +#### Returns + +`Hash{Symbol => Object}` + +#### Source + +[`lib/signalwire/relay/device.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/device.rb) + +Line 109. + +*** + +### eql? + +Value equality: same +type+ and same +params+. + +#### Signature + +```ruby +def ==(other) +``` + +#### Source + +[`lib/signalwire/relay/device.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/device.rb) + +Line 127. + +*** + +### hash + +Hash key parity with \{#==\}: equal devices share a hash bucket. + +#### Signature + +```ruby +def hash +``` + +#### Source + +[`lib/signalwire/relay/device.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/device.rb) + +Line 130. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(type, params = {}) +``` + +#### Parameters + + + the device discriminant. + + + + device-specific parameters. Keys are stringified for the wire on \{#to\_h\} so callers may pass symbol keys ergonomically. + + +#### Returns + +`Device` — a new instance of Device + +#### Source + +[`lib/signalwire/relay/device.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/device.rb) + +Line 54. + +*** + +### inspect + +#### Signature + +```ruby +def to_s +``` + +#### Source + +[`lib/signalwire/relay/device.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/device.rb) + +Line 137. + +*** + +### params + +#### Signature + +```ruby +attr_reader params -> Hash +``` + +#### Returns + +`Hash` — the device-specific parameters (string-keyed on the wire). + +#### Source + +[`lib/signalwire/relay/device.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/device.rb) + +Line 49. + +*** + +### phone + +Build a +phone+ device. Convenience over +new("phone", …)+ that builds +the canonical +\{ to\_number:, from\_number:, timeout? \}+ params, omitting ++timeout+ when unset (so the wire shape matches a hand-built literal). + +#### Signature + +```ruby +def phone(to:, from: nil, timeout: nil) +``` + +#### Parameters + + + + + + + +#### Returns + +`Device` + +#### Source + +[`lib/signalwire/relay/device.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/device.rb) + +Line 67. + +*** + +### sip + +Build a +sip+ device. Convenience over +new("sip", …)+. + +#### Signature + +```ruby +def sip(to:, from: nil, headers: nil) +``` + +#### Parameters + + + + + + + +#### Returns + +`Device` + +#### Source + +[`lib/signalwire/relay/device.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/device.rb) + +Line 80. + +*** + +### to\_h + +The wire Hash: +\{ "type" => <type>, "params" => <params> \}+ with string +keys, byte identical to the hand-written device literal. Symbol keys in ++params+ are stringified (one level) so a +Device+ built with symbol +params still serializes the wire spelling. + +#### Signature + +```ruby +def to_h +``` + +#### Returns + +`Hash{String => Object}` + +#### Source + +[`lib/signalwire/relay/device.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/device.rb) + +Line 93. + +*** + +### to\_json + +#### Signature + +```ruby +def to_json(*args) +``` + +#### Parameters + + + +#### Returns + +`String` — JSON serialization of \{#to\_h\}. + +#### Source + +[`lib/signalwire/relay/device.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/device.rb) + +Line 98. + +*** + +### to\_s + +#### Signature + +```ruby +def to_s +``` + +#### Source + +[`lib/signalwire/relay/device.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/device.rb) + +Line 134. + +*** + +### type + +#### Signature + +```ruby +attr_reader type -> String +``` + +#### Returns + +`String` — the device discriminant ("phone", "sip", "agora", …); a free String, not a closed enum (the wire contract does not promise a fixed set). + +#### Source + +[`lib/signalwire/relay/device.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/device.rb) + +Line 46. + +## Source + +[`lib/signalwire/relay/device.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/device.rb) + +Line 42. diff --git a/fern/products/sdk-reference/ruby/relay/dial-event/index.mdx b/fern/products/sdk-reference/ruby/relay/dial-event/index.mdx new file mode 100644 index 0000000000..c9d7c5935d --- /dev/null +++ b/fern/products/sdk-reference/ruby/relay/dial-event/index.mdx @@ -0,0 +1,202 @@ +--- +slug: "/reference/ruby/relay/dial-event" +title: "DialEvent" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::DialEvent" + parent: "relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" + visibility: "public" +--- +# `DialEvent` + +calling.call.dial + +## Signature + +```ruby +class DialEvent < SignalWire::Relay::RelayEvent +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::RelayEvent](/docs/sdk-reference/reference/ruby/relay/relay-event) + +## Methods + +### answered? + +#### Signature + +```ruby +def answered? +``` + +#### Returns + +`Boolean` — true when the dial succeeded (\{DialState::ANSWERED\}). + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 514. + +*** + +### call\_data + +Returns the value of attribute call\_data. + +#### Signature + +```ruby +attr_reader call_data -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 483. + +*** + +### dial\_state + +Returns the value of attribute dial\_state. + +#### Signature + +```ruby +attr_reader dial_state -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 483. + +*** + +### failed? + +#### Signature + +```ruby +def failed? +``` + +#### Returns + +`Boolean` — true when the dial failed (\{DialState::FAILED\}). + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 519. + +*** + +### from\_payload + +#### Signature + +```ruby +def from_payload(payload) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 485. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(tag: '', dial_state: '', call_data: {}, **base) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`DialEvent` — a new instance of DialEvent + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 497. + +*** + +### tag + +Returns the value of attribute tag. + +#### Signature + +```ruby +attr_reader tag -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 483. + +*** + +### terminal? + +Typed predicate over \{#dial\_state\}, alongside the bare string. +Agrees with \{DialState.terminal?\} — true when the dial has resolved +(answered or failed). + +#### Signature + +```ruby +def terminal? +``` + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 509. + +## Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 482. diff --git a/fern/products/sdk-reference/ruby/relay/dial-state/index.mdx b/fern/products/sdk-reference/ruby/relay/dial-state/index.mdx new file mode 100644 index 0000000000..781fad6b5d --- /dev/null +++ b/fern/products/sdk-reference/ruby/relay/dial-state/index.mdx @@ -0,0 +1,117 @@ +--- +slug: "/reference/ruby/relay/dial-state" +title: "DialState" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "module" + language: "ruby" + qualified_name: "SignalWire::Relay::DialState" + parent: "relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/constants.rb" + visibility: "public" +--- +# `DialState` + +Named, frozen view over the outbound-dial vocabulary. Unlike call/message +states, the reference exposes _no_ flat dial-state constants — the values +are grounded in +signalwire/relay/client.py+'s ++_handle\_dial\_event+ docstring ("`dial_state` — `dialing` | +`answered` | `failed`") and the mock dial-dance. This module names +them (+DIAL\_STATE_\*+ above are the single source) and adds +ALL+ + ++TERMINAL+ + +terminal?+. + +Both +answered+ and +failed+ are terminal: \{Client#dial\} resolves to a +\{Call\} on +answered+ and raises \{RelayError\} on +failed+; +dialing+ is +the only in-flight state. + +## Signature + +```ruby +module DialState +``` + +## Constants + + + + + + + + + + + +## Methods + +### terminal? + +#### Signature + +```ruby +def terminal?(state) +``` + +#### Parameters + + + a +dial\_state+ string. + + +#### Returns + +`Boolean` — true when +state+ resolves the dial. + +#### Source + +[`lib/signalwire/relay/constants.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/constants.rb) + +Line 126. + +*** + +### valid? + +#### Signature + +```ruby +def valid?(state) +``` + +#### Parameters + + + +#### Returns + +`Boolean` — true when +state+ is a known dial state. + +#### Source + +[`lib/signalwire/relay/constants.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/constants.rb) + +Line 132. + +## Source + +[`lib/signalwire/relay/constants.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/constants.rb) + +Line 106. diff --git a/fern/products/sdk-reference/ruby/relay/echo-event/index.mdx b/fern/products/sdk-reference/ruby/relay/echo-event/index.mdx new file mode 100644 index 0000000000..37006f418b --- /dev/null +++ b/fern/products/sdk-reference/ruby/relay/echo-event/index.mdx @@ -0,0 +1,98 @@ +--- +slug: "/reference/ruby/relay/echo-event" +title: "EchoEvent" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::EchoEvent" + parent: "relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" + visibility: "public" +--- +# `EchoEvent` + +calling.call.echo + +## Signature + +```ruby +class EchoEvent < SignalWire::Relay::RelayEvent +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::RelayEvent](/docs/sdk-reference/reference/ruby/relay/relay-event) + +## Methods + +### from\_payload + +#### Signature + +```ruby +def from_payload(payload) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 662. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(state: '', **base) +``` + +#### Parameters + + + + + +#### Returns + +`EchoEvent` — a new instance of EchoEvent + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 672. + +*** + +### state + +Returns the value of attribute state. + +#### Signature + +```ruby +attr_reader state -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 660. + +## Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 659. diff --git a/fern/products/sdk-reference/ruby/relay/fax-action/index.mdx b/fern/products/sdk-reference/ruby/relay/fax-action/index.mdx new file mode 100644 index 0000000000..b55c006298 --- /dev/null +++ b/fern/products/sdk-reference/ruby/relay/fax-action/index.mdx @@ -0,0 +1,78 @@ +--- +slug: "/reference/ruby/relay/fax-action" +title: "FaxAction" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::FaxAction" + parent: "relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb" + visibility: "public" +--- +# `FaxAction` + +Handle for send\_fax or receive\_fax. + +## Signature + +```ruby +class FaxAction < SignalWire::Relay::Action +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::Action](/docs/sdk-reference/reference/ruby/relay/action) + +## Methods + +### initialize + +#### Signature + +```ruby +def initialize(call, control_id, method_prefix) +``` + +#### Parameters + + + + + + + +#### Returns + +`FaxAction` — a new instance of FaxAction + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 226. + +*** + +### stop + +#### Signature + +```ruby +def stop +``` + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 231. + +## Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 225. diff --git a/fern/products/sdk-reference/ruby/relay/fax-event/index.mdx b/fern/products/sdk-reference/ruby/relay/fax-event/index.mdx new file mode 100644 index 0000000000..dd93495156 --- /dev/null +++ b/fern/products/sdk-reference/ruby/relay/fax-event/index.mdx @@ -0,0 +1,118 @@ +--- +slug: "/reference/ruby/relay/fax-event" +title: "FaxEvent" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::FaxEvent" + parent: "relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" + visibility: "public" +--- +# `FaxEvent` + +calling.call.fax + +## Signature + +```ruby +class FaxEvent < SignalWire::Relay::RelayEvent +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::RelayEvent](/docs/sdk-reference/reference/ruby/relay/relay-event) + +## Methods + +### control\_id + +Returns the value of attribute control\_id. + +#### Signature + +```ruby +attr_reader control_id -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 363. + +*** + +### fax + +Returns the value of attribute fax. + +#### Signature + +```ruby +attr_reader fax -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 363. + +*** + +### from\_payload + +#### Signature + +```ruby +def from_payload(payload) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 365. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(control_id: '', fax: {}, **base) +``` + +#### Parameters + + + + + + + +#### Returns + +`FaxEvent` — a new instance of FaxEvent + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 376. + +## Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 362. diff --git a/fern/products/sdk-reference/ruby/relay/hold-event/index.mdx b/fern/products/sdk-reference/ruby/relay/hold-event/index.mdx new file mode 100644 index 0000000000..f234f9ac39 --- /dev/null +++ b/fern/products/sdk-reference/ruby/relay/hold-event/index.mdx @@ -0,0 +1,98 @@ +--- +slug: "/reference/ruby/relay/hold-event" +title: "HoldEvent" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::HoldEvent" + parent: "relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" + visibility: "public" +--- +# `HoldEvent` + +calling.call.hold + +## Signature + +```ruby +class HoldEvent < SignalWire::Relay::RelayEvent +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::RelayEvent](/docs/sdk-reference/reference/ruby/relay/relay-event) + +## Methods + +### from\_payload + +#### Signature + +```ruby +def from_payload(payload) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 726. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(state: '', **base) +``` + +#### Parameters + + + + + +#### Returns + +`HoldEvent` — a new instance of HoldEvent + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 736. + +*** + +### state + +Returns the value of attribute state. + +#### Signature + +```ruby +attr_reader state -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 724. + +## Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 723. diff --git a/fern/products/sdk-reference/ruby/relay/index.mdx b/fern/products/sdk-reference/ruby/relay/index.mdx new file mode 100644 index 0000000000..0d5021a582 --- /dev/null +++ b/fern/products/sdk-reference/ruby/relay/index.mdx @@ -0,0 +1,267 @@ +--- +slug: "/reference/ruby/relay" +title: "Relay" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "module" + language: "ruby" + qualified_name: "SignalWire::Relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb" + visibility: "public" +--- +# `Relay` + +## Signature + +```ruby +module Relay +``` + +## Constants + + + + + + + Call states + + + + + + + + + + + + + + Connect states + + + + + + + + Default host + + + + + + + + Detect types + + + + + + Dial states (the +dial\_state+ field on calling.call.dial events) + + + + + + + + + + + + + + + + End reasons + + + + + + + + + + Authorization state event + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Event types — calling + + + + + + + + + + + + Map event\_type string to typed event class + + + + + + Messaging event types + + + + + + + + + + + + Message states + + + + + + + + + + + + JSON-RPC methods + + + + + + + + + + + + + + + + + + + + Play states + + + + Protocol version sent during signalwire.connect + + + + + + + + Reconnect settings + + + + + + + + + + Record states + + + + + + Join room states + + + + + + +## Methods + +### parse\_event + +Parse a raw signalwire.event params hash into a typed event object. + +#### Signature + +```ruby +def parse_event(payload) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 945. + +## Source + +[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) + +Line 10. diff --git a/fern/products/sdk-reference/ruby/relay/index__2.mdx b/fern/products/sdk-reference/ruby/relay/index__2.mdx new file mode 100644 index 0000000000..6f23d883c4 --- /dev/null +++ b/fern/products/sdk-reference/ruby/relay/index__2.mdx @@ -0,0 +1,204 @@ +--- +slug: "/reference/ruby/relay/index__2" +title: "relay" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "module" + language: "ruby" + qualified_name: "relay" +--- +# `relay` + +## Classes + + + + Base class for async action handles (play, record, detect, etc.). + + + + Raised when an action times out waiting for completion. + + + + Handle for an active AI agent session. + + + + Represents a live RELAY call. + + + + calling.error + + + + calling.call.receive + + + + calling.call.state + + + + RelayClient -- WebSocket + JSON-RPC 2.0 protocol + event dispatch. + + + + Handle for play\_and\_collect or standalone collect. + + + + A typed RELAY +collect+ configuration: the known-shape options object the input-collection wrappers (\{Call#collect\}, \{Call#play\_and\_collect\}, \{Call#prompt\_tts\}, \{Call#prompt\_audio\}) currently take as a raw Hash and pass through verbatim onto the +calling.collect+ / +calling.play\_and\_collect+ wire frame. + + + + calling.call.collect + + + + calling.conference + + + + calling.call.connect + + + + calling.call.denoise + + + + Handle for an active detect operation. + + + + calling.call.detect + + + + A typed RELAY +device+ descriptor: the +\{ "type" => ..., "params" => \{...\} \}+ object handed to \{Call#connect\}, \{Call#refer\}, \{Call#tap\_audio\}, and \{Client#dial\} (where it nests inside the +devices+ list-of-lists). + + + + calling.call.dial + + + + calling.call.echo + + + + Handle for send\_fax or receive\_fax. + + + + calling.call.fax + + + + calling.call.hold + + + + Represents a single SMS/MMS message. + + + + messaging.receive + + + + messaging.state + + + + Handle for an active pay operation. + + + + calling.call.pay + + + + Handle for an active play operation. + + + + calling.call.play + + + + calling.call.queue + + + + Handle for an active record operation. + + + + calling.call.record + + + + calling.call.refer + + + + Raised for RELAY JSON-RPC errors. + + + + Base event wrapper for raw signalwire.event payloads. Subclasses provide typed accessors for specific event types. + + + + calling.call.send\_digits + + + + Handle for standalone calling.collect (without play). + + + + Handle for an active stream operation. + + + + calling.call.stream + + + + Handle for an active tap operation. + + + + calling.call.tap + + + + Handle for an active transcribe operation. + + + + calling.call.transcribe + + + +## Modules + + + + Named, frozen view over the call-state vocabulary. Additive: the wire value stays a bare String everywhere (the events carry +call\_state+ as a String, +Call#state+ is a String), and the flat +CALL\_STATE\_\*+ constants above remain the single source of the literals. This module wraps them with the Wave-A/Tier-1 idiom — a frozen +ALL+ ordered list, a frozen +TERMINAL+ set, and a +terminal?+ predicate — so callers can ask +CallState.terminal?(state)+ instead of hard-coding +== "ended"+. + + + + Named, frozen view over the outbound-dial vocabulary. Unlike call/message states, the reference exposes _no_ flat dial-state constants — the values are grounded in +signalwire/relay/client.py+'s +_handle\_dial\_event+ docstring ("`dial_state` — `dialing` | `answered` | `failed`") and the mock dial-dance. This module names them (+DIAL\_STATE_\*+ above are the single source) and adds +ALL+ + +TERMINAL+ + +terminal?+. + + + + Named, frozen view over the messaging-state vocabulary. Additive: the wire value stays a bare String (+Message#state+, the +message\_state+ event field). Wraps the flat +MESSAGE\_STATE\_\*+ constants (the single source of the literals) with +ALL+ + +TERMINAL+ + +terminal?+, so callers can ask +MessageState.terminal?(state)+ instead of re-deriving the set. + + diff --git a/fern/products/sdk-reference/ruby/relay/message-receive-event/index.mdx b/fern/products/sdk-reference/ruby/relay/message-receive-event/index.mdx new file mode 100644 index 0000000000..b8a901eb8e --- /dev/null +++ b/fern/products/sdk-reference/ruby/relay/message-receive-event/index.mdx @@ -0,0 +1,278 @@ +--- +slug: "/reference/ruby/relay/message-receive-event" +title: "MessageReceiveEvent" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::MessageReceiveEvent" + parent: "relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" + visibility: "public" +--- +# `MessageReceiveEvent` + +messaging.receive + +## Signature + +```ruby +class MessageReceiveEvent < SignalWire::Relay::RelayEvent +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::RelayEvent](/docs/sdk-reference/reference/ruby/relay/relay-event) + +## Methods + +### body + +Returns the value of attribute body. + +#### Signature + +```ruby +attr_reader body -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 808. + +*** + +### context + +Returns the value of attribute context. + +#### Signature + +```ruby +attr_reader context -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 808. + +*** + +### direction + +Returns the value of attribute direction. + +#### Signature + +```ruby +attr_reader direction -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 808. + +*** + +### from\_number + +Returns the value of attribute from\_number. + +#### Signature + +```ruby +attr_reader from_number -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 808. + +*** + +### from\_payload + +#### Signature + +```ruby +def from_payload(payload) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 811. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(message_id: '', context: '', direction: '', from_number: '', to_number: '', body: '', media: [], segments: 0, message_state: '', tags: [], **base) +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`MessageReceiveEvent` — a new instance of MessageReceiveEvent + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 830. + +*** + +### media + +Returns the value of attribute media. + +#### Signature + +```ruby +attr_reader media -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 808. + +*** + +### message\_id + +Returns the value of attribute message\_id. + +#### Signature + +```ruby +attr_reader message_id -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 808. + +*** + +### message\_state + +Returns the value of attribute message\_state. + +#### Signature + +```ruby +attr_reader message_state -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 808. + +*** + +### segments + +Returns the value of attribute segments. + +#### Signature + +```ruby +attr_reader segments -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 808. + +*** + +### tags + +Returns the value of attribute tags. + +#### Signature + +```ruby +attr_reader tags -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 808. + +*** + +### to\_number + +Returns the value of attribute to\_number. + +#### Signature + +```ruby +attr_reader to_number -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 808. + +## Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 807. diff --git a/fern/products/sdk-reference/ruby/relay/message-state-event/index.mdx b/fern/products/sdk-reference/ruby/relay/message-state-event/index.mdx new file mode 100644 index 0000000000..65d48fff2a --- /dev/null +++ b/fern/products/sdk-reference/ruby/relay/message-state-event/index.mdx @@ -0,0 +1,322 @@ +--- +slug: "/reference/ruby/relay/message-state-event" +title: "MessageStateEvent" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::MessageStateEvent" + parent: "relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" + visibility: "public" +--- +# `MessageStateEvent` + +messaging.state + +## Signature + +```ruby +class MessageStateEvent < SignalWire::Relay::RelayEvent +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::RelayEvent](/docs/sdk-reference/reference/ruby/relay/relay-event) + +## Methods + +### body + +Returns the value of attribute body. + +#### Signature + +```ruby +attr_reader body -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 858. + +*** + +### context + +Returns the value of attribute context. + +#### Signature + +```ruby +attr_reader context -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 858. + +*** + +### direction + +Returns the value of attribute direction. + +#### Signature + +```ruby +attr_reader direction -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 858. + +*** + +### from\_number + +Returns the value of attribute from\_number. + +#### Signature + +```ruby +attr_reader from_number -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 858. + +*** + +### from\_payload + +#### Signature + +```ruby +def from_payload(payload) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 861. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(message_id: '', context: '', direction: '', from_number: '', to_number: '', body: '', media: [], segments: 0, message_state: '', reason: '', tags: [], **base) +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`MessageStateEvent` — a new instance of MessageStateEvent + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 881. + +*** + +### media + +Returns the value of attribute media. + +#### Signature + +```ruby +attr_reader media -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 858. + +*** + +### message\_id + +Returns the value of attribute message\_id. + +#### Signature + +```ruby +attr_reader message_id -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 858. + +*** + +### message\_state + +Returns the value of attribute message\_state. + +#### Signature + +```ruby +attr_reader message_state -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 858. + +*** + +### reason + +Returns the value of attribute reason. + +#### Signature + +```ruby +attr_reader reason -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 858. + +*** + +### segments + +Returns the value of attribute segments. + +#### Signature + +```ruby +attr_reader segments -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 858. + +*** + +### tags + +Returns the value of attribute tags. + +#### Signature + +```ruby +attr_reader tags -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 858. + +*** + +### terminal? + +Typed predicate over \{#message\_state\}, alongside the bare string. +Agrees with \{MessageState.terminal?\} — true when the message has +reached a final delivery outcome (delivered / undelivered / failed). + +#### Signature + +```ruby +def terminal? +``` + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 903. + +*** + +### to\_number + +Returns the value of attribute to\_number. + +#### Signature + +```ruby +attr_reader to_number -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 858. + +## Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 857. diff --git a/fern/products/sdk-reference/ruby/relay/message-state/index.mdx b/fern/products/sdk-reference/ruby/relay/message-state/index.mdx new file mode 100644 index 0000000000..ea1e548967 --- /dev/null +++ b/fern/products/sdk-reference/ruby/relay/message-state/index.mdx @@ -0,0 +1,116 @@ +--- +slug: "/reference/ruby/relay/message-state" +title: "MessageState" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "module" + language: "ruby" + qualified_name: "SignalWire::Relay::MessageState" + parent: "relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/constants.rb" + visibility: "public" +--- +# `MessageState` + +Named, frozen view over the messaging-state vocabulary. Additive: the +wire value stays a bare String (+Message#state+, the +message\_state+ +event field). Wraps the flat +MESSAGE\_STATE\_\*+ constants (the single +source of the literals) with +ALL+ + +TERMINAL+ + +terminal?+, so callers +can ask +MessageState.terminal?(state)+ instead of re-deriving the set. + +Grounded in +signalwire/relay/constants.py+: the terminal set is ++MESSAGE\_TERMINAL\_STATES+ (\{delivered, undelivered, failed\}) — the same +set the Python reference uses to resolve a sent message's final outcome. + +## Signature + +```ruby +module MessageState +``` + +## Constants + + + + + + + + + + + + + + + + + + + +## Methods + +### terminal? + +#### Signature + +```ruby +def terminal?(state) +``` + +#### Parameters + + + a +message\_state+ string. + + +#### Returns + +`Boolean` — true when +state+ is a terminal messaging state. + +#### Source + +[`lib/signalwire/relay/constants.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/constants.rb) + +Line 212. + +*** + +### valid? + +#### Signature + +```ruby +def valid?(state) +``` + +#### Parameters + + + +#### Returns + +`Boolean` — true when +state+ is a known messaging state. + +#### Source + +[`lib/signalwire/relay/constants.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/constants.rb) + +Line 218. + +## Source + +[`lib/signalwire/relay/constants.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/constants.rb) + +Line 187. diff --git a/fern/products/sdk-reference/ruby/relay/message/index.mdx b/fern/products/sdk-reference/ruby/relay/message/index.mdx new file mode 100644 index 0000000000..9978e8986b --- /dev/null +++ b/fern/products/sdk-reference/ruby/relay/message/index.mdx @@ -0,0 +1,677 @@ +--- +slug: "/reference/ruby/relay/message" +title: "Message" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::Message" + parent: "relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb" + visibility: "public" +--- +# `Message` + +Represents a single SMS/MMS message. + +For outbound messages, use message.wait to block until a terminal state +(delivered, undelivered, failed) is reached. + +## Signature + +```ruby +class Message < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### \_dispatch\_event + +Handle a messaging.state event for this message. + +#### Signature + +```ruby +def _dispatch_event(payload) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) + +Line 99. + +*** + +### \_set\_on\_completed + +Set the on\_completed callback from options. + +#### Signature + +```ruby +def _set_on_completed(callback) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) + +Line 47. + +*** + +### == + +Value equality over the message's data (ignores completion state). + +#### Signature + +```ruby +def ==(other) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) + +Line 173. + +*** + +### body + +Returns the value of attribute body. + +#### Signature + +```ruby +attr_reader body -> Object +``` + +#### Source + +[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) + +Line 13. + +*** + +### context + +Returns the value of attribute context. + +#### Signature + +```ruby +attr_reader context -> Object +``` + +#### Source + +[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) + +Line 13. + +*** + +### deconstruct + +Array pattern matching: the stable identity triple. + +#### Signature + +```ruby +def deconstruct +``` + +#### Returns + +`Array` + +#### Source + +[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) + +Line 168. + +*** + +### deconstruct\_keys + +Ruby 3.0 pattern matching: +case msg; in \{ direction:, body: \}+. + +#### Signature + +```ruby +def deconstruct_keys(keys) +``` + +#### Parameters + + + +#### Returns + +`Hash{Symbol => Object}` + +#### Source + +[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) + +Line 157. + +*** + +### direction + +Returns the value of attribute direction. + +#### Signature + +```ruby +attr_reader direction -> Object +``` + +#### Source + +[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) + +Line 13. + +*** + +### done? + +#### Signature + +```ruby +def done? +``` + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) + +Line 56. + +*** + +### eql? + +Value equality over the message's data (ignores completion state). + +#### Signature + +```ruby +def ==(other) +``` + +#### Source + +[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) + +Line 176. + +*** + +### from\_number + +Returns the value of attribute from\_number. + +#### Signature + +```ruby +attr_reader from_number -> Object +``` + +#### Source + +[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) + +Line 13. + +*** + +### hash + +Hash parity with \{#==\} so equal messages share a bucket. + +#### Signature + +```ruby +def hash +``` + +#### Source + +[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) + +Line 179. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(message_id: '', context: '', direction: '', from_number: '', to_number: '', body: '', media: nil, segments: 0, state: '', reason: '', tags: nil) +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`Message` — a new instance of Message + +#### Source + +[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) + +Line 17. + +*** + +### inspect + +#### Signature + +```ruby +def inspect +``` + +#### Source + +[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) + +Line 126. + +*** + +### is\_done? + +#### Signature + +```ruby +def done? +``` + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) + +Line 60. + +*** + +### media + +Returns the value of attribute media. + +#### Signature + +```ruby +attr_reader media -> Object +``` + +#### Source + +[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) + +Line 13. + +*** + +### message\_id + +Returns the value of attribute message\_id. + +#### Signature + +```ruby +attr_reader message_id -> Object +``` + +#### Source + +[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) + +Line 13. + +*** + +### on\_completed + +Set the on\_completed callback. + +#### Signature + +```ruby +def on_completed(&block) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) + +Line 42. + +*** + +### on\_event + +Register an event listener for state changes. + +#### Signature + +```ruby +def on_event(&handler) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) + +Line 52. + +*** + +### reason + +Returns the value of attribute reason. + +#### Signature + +```ruby +attr_reader reason -> Object +``` + +#### Source + +[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) + +Line 13. + +*** + +### result + +#### Signature + +```ruby +def result +``` + +#### Source + +[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) + +Line 72. + +*** + +### segments + +Returns the value of attribute segments. + +#### Signature + +```ruby +attr_reader segments -> Object +``` + +#### Source + +[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) + +Line 13. + +*** + +### state + +Returns the value of attribute state. + +#### Signature + +```ruby +attr_accessor state <-> Object +``` + +#### Source + +[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) + +Line 15. + +*** + +### state= + +Sets the attribute state + +#### Signature + +```ruby +attr_accessor state= <-> Object +``` + +#### Parameters + + + the value to set the attribute state to. + + +#### Source + +[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) + +Line 15. + +*** + +### tags + +Returns the value of attribute tags. + +#### Signature + +```ruby +attr_reader tags -> Object +``` + +#### Source + +[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) + +Line 13. + +*** + +### terminal? + +Typed predicate over \{#state\}, alongside the bare string. Agrees with +\{MessageState.terminal?\} — true once the message has reached a final +delivery outcome (delivered / undelivered / failed), which is exactly +when \{#wait\} unblocks. + +#### Signature + +```ruby +def terminal? +``` + +#### Returns + +`Boolean` + +#### Source + +[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) + +Line 68. + +*** + +### to\_h + +Semantic Hash view of the message's value fields (the completion +machinery — mutex/condition/callbacks — is excluded). Symbol keys, +idiomatic for Ruby. @return \[Hash\{Symbol => Object\}] + +#### Signature + +```ruby +def to_h +``` + +#### Source + +[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) + +Line 133. + +*** + +### to\_json + +#### Signature + +```ruby +def to_json(*args) +``` + +#### Parameters + + + +#### Returns + +`String` — JSON serialization of \{#to\_h\}. + +#### Source + +[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) + +Line 150. + +*** + +### to\_number + +Returns the value of attribute to\_number. + +#### Signature + +```ruby +attr_reader to_number -> Object +``` + +#### Source + +[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) + +Line 13. + +*** + +### to\_s + +#### Signature + +```ruby +def to_s +``` + +#### Source + +[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) + +Line 121. + +*** + +### wait + +Wait for the message to reach a terminal state. +Raises ActionTimeoutError if timeout exceeded. + +#### Signature + +```ruby +def wait(timeout: nil) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) + +Line 78. + +## Source + +[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) + +Line 12. diff --git a/fern/products/sdk-reference/ruby/relay/pay-action/index.mdx b/fern/products/sdk-reference/ruby/relay/pay-action/index.mdx new file mode 100644 index 0000000000..2829d714c1 --- /dev/null +++ b/fern/products/sdk-reference/ruby/relay/pay-action/index.mdx @@ -0,0 +1,76 @@ +--- +slug: "/reference/ruby/relay/pay-action" +title: "PayAction" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::PayAction" + parent: "relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb" + visibility: "public" +--- +# `PayAction` + +Handle for an active pay operation. + +## Signature + +```ruby +class PayAction < SignalWire::Relay::Action +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::Action](/docs/sdk-reference/reference/ruby/relay/action) + +## Methods + +### initialize + +#### Signature + +```ruby +def initialize(call, control_id) +``` + +#### Parameters + + + + + +#### Returns + +`PayAction` — a new instance of PayAction + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 260. + +*** + +### stop + +#### Signature + +```ruby +def stop +``` + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 264. + +## Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 259. diff --git a/fern/products/sdk-reference/ruby/relay/pay-event/index.mdx b/fern/products/sdk-reference/ruby/relay/pay-event/index.mdx new file mode 100644 index 0000000000..aca2177de1 --- /dev/null +++ b/fern/products/sdk-reference/ruby/relay/pay-event/index.mdx @@ -0,0 +1,118 @@ +--- +slug: "/reference/ruby/relay/pay-event" +title: "PayEvent" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::PayEvent" + parent: "relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" + visibility: "public" +--- +# `PayEvent` + +calling.call.pay + +## Signature + +```ruby +class PayEvent < SignalWire::Relay::RelayEvent +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::RelayEvent](/docs/sdk-reference/reference/ruby/relay/relay-event) + +## Methods + +### control\_id + +Returns the value of attribute control\_id. + +#### Signature + +```ruby +attr_reader control_id -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 594. + +*** + +### from\_payload + +#### Signature + +```ruby +def from_payload(payload) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 596. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(control_id: '', state: '', **base) +``` + +#### Parameters + + + + + + + +#### Returns + +`PayEvent` — a new instance of PayEvent + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 607. + +*** + +### state + +Returns the value of attribute state. + +#### Signature + +```ruby +attr_reader state -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 594. + +## Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 593. diff --git a/fern/products/sdk-reference/ruby/relay/play-action/index.mdx b/fern/products/sdk-reference/ruby/relay/play-action/index.mdx new file mode 100644 index 0000000000..daaa98ad66 --- /dev/null +++ b/fern/products/sdk-reference/ruby/relay/play-action/index.mdx @@ -0,0 +1,128 @@ +--- +slug: "/reference/ruby/relay/play-action" +title: "PlayAction" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::PlayAction" + parent: "relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb" + visibility: "public" +--- +# `PlayAction` + +Handle for an active play operation. + +## Signature + +```ruby +class PlayAction < SignalWire::Relay::Action +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::Action](/docs/sdk-reference/reference/ruby/relay/action) + +## Methods + +### initialize + +#### Signature + +```ruby +def initialize(call, control_id) +``` + +#### Parameters + + + + + +#### Returns + +`PlayAction` — a new instance of PlayAction + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 98. + +*** + +### pause + +#### Signature + +```ruby +def pause +``` + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 107. + +*** + +### resume + +#### Signature + +```ruby +def resume +``` + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 111. + +*** + +### stop + +#### Signature + +```ruby +def stop +``` + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 103. + +*** + +### volume + +#### Signature + +```ruby +def volume(vol) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 115. + +## Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 97. diff --git a/fern/products/sdk-reference/ruby/relay/play-event/index.mdx b/fern/products/sdk-reference/ruby/relay/play-event/index.mdx new file mode 100644 index 0000000000..c65e622a8a --- /dev/null +++ b/fern/products/sdk-reference/ruby/relay/play-event/index.mdx @@ -0,0 +1,118 @@ +--- +slug: "/reference/ruby/relay/play-event" +title: "PlayEvent" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::PlayEvent" + parent: "relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" + visibility: "public" +--- +# `PlayEvent` + +calling.call.play + +## Signature + +```ruby +class PlayEvent < SignalWire::Relay::RelayEvent +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::RelayEvent](/docs/sdk-reference/reference/ruby/relay/relay-event) + +## Methods + +### control\_id + +Returns the value of attribute control\_id. + +#### Signature + +```ruby +attr_reader control_id -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 208. + +*** + +### from\_payload + +#### Signature + +```ruby +def from_payload(payload) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 210. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(control_id: '', state: '', **base) +``` + +#### Parameters + + + + + + + +#### Returns + +`PlayEvent` — a new instance of PlayEvent + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 221. + +*** + +### state + +Returns the value of attribute state. + +#### Signature + +```ruby +attr_reader state -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 208. + +## Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 207. diff --git a/fern/products/sdk-reference/ruby/relay/queue-event/index.mdx b/fern/products/sdk-reference/ruby/relay/queue-event/index.mdx new file mode 100644 index 0000000000..6eb7c224b2 --- /dev/null +++ b/fern/products/sdk-reference/ruby/relay/queue-event/index.mdx @@ -0,0 +1,198 @@ +--- +slug: "/reference/ruby/relay/queue-event" +title: "QueueEvent" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::QueueEvent" + parent: "relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" + visibility: "public" +--- +# `QueueEvent` + +calling.call.queue + +## Signature + +```ruby +class QueueEvent < SignalWire::Relay::RelayEvent +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::RelayEvent](/docs/sdk-reference/reference/ruby/relay/relay-event) + +## Methods + +### control\_id + +Returns the value of attribute control\_id. + +#### Signature + +```ruby +attr_reader control_id -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 622. + +*** + +### from\_payload + +#### Signature + +```ruby +def from_payload(payload) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 624. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(control_id: '', status: '', queue_id: '', queue_name: '', position: 0, size: 0, **base) +``` + +#### Parameters + + + + + + + + + + + + + + + +#### Returns + +`QueueEvent` — a new instance of QueueEvent + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 639. + +*** + +### position + +Returns the value of attribute position. + +#### Signature + +```ruby +attr_reader position -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 622. + +*** + +### queue\_id + +Returns the value of attribute queue\_id. + +#### Signature + +```ruby +attr_reader queue_id -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 622. + +*** + +### queue\_name + +Returns the value of attribute queue\_name. + +#### Signature + +```ruby +attr_reader queue_name -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 622. + +*** + +### size + +Returns the value of attribute size. + +#### Signature + +```ruby +attr_reader size -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 622. + +*** + +### status + +Returns the value of attribute status. + +#### Signature + +```ruby +attr_reader status -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 622. + +## Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 621. diff --git a/fern/products/sdk-reference/ruby/relay/record-action/index.mdx b/fern/products/sdk-reference/ruby/relay/record-action/index.mdx new file mode 100644 index 0000000000..995e7a4ab8 --- /dev/null +++ b/fern/products/sdk-reference/ruby/relay/record-action/index.mdx @@ -0,0 +1,112 @@ +--- +slug: "/reference/ruby/relay/record-action" +title: "RecordAction" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::RecordAction" + parent: "relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb" + visibility: "public" +--- +# `RecordAction` + +Handle for an active record operation. + +## Signature + +```ruby +class RecordAction < SignalWire::Relay::Action +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::Action](/docs/sdk-reference/reference/ruby/relay/action) + +## Methods + +### initialize + +#### Signature + +```ruby +def initialize(call, control_id) +``` + +#### Parameters + + + + + +#### Returns + +`RecordAction` — a new instance of RecordAction + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 122. + +*** + +### pause + +#### Signature + +```ruby +def pause(behavior: nil) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 131. + +*** + +### resume + +#### Signature + +```ruby +def resume +``` + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 137. + +*** + +### stop + +#### Signature + +```ruby +def stop +``` + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 127. + +## Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 121. diff --git a/fern/products/sdk-reference/ruby/relay/record-event/index.mdx b/fern/products/sdk-reference/ruby/relay/record-event/index.mdx new file mode 100644 index 0000000000..3444e11a33 --- /dev/null +++ b/fern/products/sdk-reference/ruby/relay/record-event/index.mdx @@ -0,0 +1,198 @@ +--- +slug: "/reference/ruby/relay/record-event" +title: "RecordEvent" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::RecordEvent" + parent: "relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" + visibility: "public" +--- +# `RecordEvent` + +calling.call.record + +## Signature + +```ruby +class RecordEvent < SignalWire::Relay::RelayEvent +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::RelayEvent](/docs/sdk-reference/reference/ruby/relay/relay-event) + +## Methods + +### control\_id + +Returns the value of attribute control\_id. + +#### Signature + +```ruby +attr_reader control_id -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 236. + +*** + +### duration + +Returns the value of attribute duration. + +#### Signature + +```ruby +attr_reader duration -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 236. + +*** + +### from\_payload + +#### Signature + +```ruby +def from_payload(payload) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 238. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(control_id: '', state: '', url: '', duration: 0.0, size: 0, record: {}, **base) +``` + +#### Parameters + + + + + + + + + + + + + + + +#### Returns + +`RecordEvent` — a new instance of RecordEvent + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 254. + +*** + +### record + +Returns the value of attribute record. + +#### Signature + +```ruby +attr_reader record -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 236. + +*** + +### size + +Returns the value of attribute size. + +#### Signature + +```ruby +attr_reader size -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 236. + +*** + +### state + +Returns the value of attribute state. + +#### Signature + +```ruby +attr_reader state -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 236. + +*** + +### url + +Returns the value of attribute url. + +#### Signature + +```ruby +attr_reader url -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 236. + +## Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 235. diff --git a/fern/products/sdk-reference/ruby/relay/refer-event/index.mdx b/fern/products/sdk-reference/ruby/relay/refer-event/index.mdx new file mode 100644 index 0000000000..273e4fecc1 --- /dev/null +++ b/fern/products/sdk-reference/ruby/relay/refer-event/index.mdx @@ -0,0 +1,158 @@ +--- +slug: "/reference/ruby/relay/refer-event" +title: "ReferEvent" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::ReferEvent" + parent: "relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" + visibility: "public" +--- +# `ReferEvent` + +calling.call.refer + +## Signature + +```ruby +class ReferEvent < SignalWire::Relay::RelayEvent +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::RelayEvent](/docs/sdk-reference/reference/ruby/relay/relay-event) + +## Methods + +### from\_payload + +#### Signature + +```ruby +def from_payload(payload) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 535. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(state: '', sip_refer_to: '', sip_refer_response_code: '', sip_notify_response_code: '', **base) +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`ReferEvent` — a new instance of ReferEvent + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 548. + +*** + +### sip\_notify\_response\_code + +Returns the value of attribute sip\_notify\_response\_code. + +#### Signature + +```ruby +attr_reader sip_notify_response_code -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 532. + +*** + +### sip\_refer\_response\_code + +Returns the value of attribute sip\_refer\_response\_code. + +#### Signature + +```ruby +attr_reader sip_refer_response_code -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 532. + +*** + +### sip\_refer\_to + +Returns the value of attribute sip\_refer\_to. + +#### Signature + +```ruby +attr_reader sip_refer_to -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 532. + +*** + +### state + +Returns the value of attribute state. + +#### Signature + +```ruby +attr_reader state -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 532. + +## Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 531. diff --git a/fern/products/sdk-reference/ruby/relay/relay-error/index.mdx b/fern/products/sdk-reference/ruby/relay/relay-error/index.mdx new file mode 100644 index 0000000000..2f0fe189ca --- /dev/null +++ b/fern/products/sdk-reference/ruby/relay/relay-error/index.mdx @@ -0,0 +1,96 @@ +--- +slug: "/reference/ruby/relay/relay-error" +title: "RelayError" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::RelayError" + parent: "relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb" + visibility: "public" +--- +# `RelayError` + +Raised for RELAY JSON-RPC errors. + +## Signature + +```ruby +class RelayError < StandardError +``` + +## Inheritance + +**Extends:** `StandardError` + +## Methods + +### code + +Returns the value of attribute code. + +#### Signature + +```ruby +attr_reader code -> Object +``` + +#### Source + +[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) + +Line 19. + +*** + +### error\_message + +Returns the value of attribute error\_message. + +#### Signature + +```ruby +attr_reader error_message -> Object +``` + +#### Source + +[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) + +Line 19. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(code, message) +``` + +#### Parameters + + + + + +#### Returns + +`RelayError` — a new instance of RelayError + +#### Source + +[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) + +Line 21. + +## Source + +[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) + +Line 18. diff --git a/fern/products/sdk-reference/ruby/relay/relay-event/index.mdx b/fern/products/sdk-reference/ruby/relay/relay-event/index.mdx new file mode 100644 index 0000000000..14410230a5 --- /dev/null +++ b/fern/products/sdk-reference/ruby/relay/relay-event/index.mdx @@ -0,0 +1,344 @@ +--- +slug: "/reference/ruby/relay/relay-event" +title: "RelayEvent" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::RelayEvent" + parent: "relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" + visibility: "public" +--- +# `RelayEvent` + +Base event wrapper for raw signalwire.event payloads. +Subclasses provide typed accessors for specific event types. + +Idiomatic Ruby surface (defined once here, inherited by every typed +subclass so the cross-language audit only counts it on the base): + +- +#to\_h+ / +#to\_json+ — a clean, semantic Hash/JSON view of the + event (the common +event\_type+/+call\_id+/+timestamp+ fields plus + whatever typed fields the subclass declares). +- +#deconstruct\_keys+ / +#deconstruct+ — Ruby 3.0 pattern matching, + so callers can write + case event + in \{ event\_type: "calling.call.state", call\_state: \} + ... + end +- value +#==+ / +#eql?+ / +#hash+ — two events carrying the same + semantic data compare equal and hash equal, so events work as + Set members and Hash keys. + +Subclasses contribute their typed fields by overriding the private ++#\_event\_fields+ hook (underscore-prefixed, so it stays off the +public surface); they never redefine +#to\_h+/+#==+/etc. themselves. + +## Signature + +```ruby +class RelayEvent < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### == + +Value equality: same concrete class carrying the same semantic data. +Exact-class (not +is\_a?+) so a typed event never equals a bare ++RelayEvent+ that happens to share the envelope. + +#### Signature + +```ruby +def ==(other) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 98. + +*** + +### call\_id + +Returns the value of attribute call\_id. + +#### Signature + +```ruby +attr_reader call_id -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 31. + +*** + +### deconstruct + +Ruby 3.0 array pattern-matching hook for +in \[a, b, c]+. The stable, +cross-event positional triple is the envelope: event type, call id, +timestamp. + +#### Signature + +```ruby +def deconstruct +``` + +#### Returns + +`Array` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 91. + +*** + +### deconstruct\_keys + +Ruby 3.0 pattern-matching hook for +in \{ key: \}+ / +in \{ key: \}+. +Returns the same Symbol-keyed map as \{#to\_h\}. When the matcher +requests a specific subset of +keys+, only those are computed/returned +(the contract +deconstruct\_keys+ promises the pattern matcher). + +#### Signature + +```ruby +def deconstruct_keys(keys) +``` + +#### Parameters + + + keys the pattern is matching, or nil + + +#### Returns + +`Hash{Symbol => Object}` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 77. + +*** + +### eql? + +Value equality: same concrete class carrying the same semantic data. +Exact-class (not +is\_a?+) so a typed event never equals a bare ++RelayEvent+ that happens to share the envelope. + +#### Signature + +```ruby +def ==(other) +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 101. + +*** + +### event\_type + +Returns the value of attribute event\_type. + +#### Signature + +```ruby +attr_reader event_type -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 31. + +*** + +### from\_payload + +#### Signature + +```ruby +def from_payload(payload) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 40. + +*** + +### hash + +Hash key parity with \{#==\}: equal events share a hash bucket, so they +behave correctly as Set members and Hash keys. + +#### Signature + +```ruby +def hash +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 105. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(event_type:, params: {}, call_id: '', timestamp: 0.0) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`RelayEvent` — a new instance of RelayEvent + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 33. + +*** + +### params + +Returns the value of attribute params. + +#### Signature + +```ruby +attr_reader params -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 31. + +*** + +### timestamp + +Returns the value of attribute timestamp. + +#### Signature + +```ruby +attr_reader timestamp -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 31. + +*** + +### to\_h + +Semantic Hash view: the shared envelope fields plus the subclass's +typed fields. Raw +params+ are intentionally excluded — +#to\_h+ is +the friendly, typed projection, not the wire frame (which stays +available via +#params+). Keys are symbols, idiomatic for Ruby. + +#### Signature + +```ruby +def to_h +``` + +#### Returns + +`Hash{Symbol => Object}` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 57. + +*** + +### to\_json + +#### Signature + +```ruby +def to_json(*args) +``` + +#### Parameters + + + +#### Returns + +`String` — JSON serialization of \{#to\_h\}. + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 66. + +## Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 30. diff --git a/fern/products/sdk-reference/ruby/relay/send-digits-event/index.mdx b/fern/products/sdk-reference/ruby/relay/send-digits-event/index.mdx new file mode 100644 index 0000000000..c74f704d07 --- /dev/null +++ b/fern/products/sdk-reference/ruby/relay/send-digits-event/index.mdx @@ -0,0 +1,118 @@ +--- +slug: "/reference/ruby/relay/send-digits-event" +title: "SendDigitsEvent" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::SendDigitsEvent" + parent: "relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" + visibility: "public" +--- +# `SendDigitsEvent` + +calling.call.send\_digits + +## Signature + +```ruby +class SendDigitsEvent < SignalWire::Relay::RelayEvent +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::RelayEvent](/docs/sdk-reference/reference/ruby/relay/relay-event) + +## Methods + +### control\_id + +Returns the value of attribute control\_id. + +#### Signature + +```ruby +attr_reader control_id -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 455. + +*** + +### from\_payload + +#### Signature + +```ruby +def from_payload(payload) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 457. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(control_id: '', state: '', **base) +``` + +#### Parameters + + + + + + + +#### Returns + +`SendDigitsEvent` — a new instance of SendDigitsEvent + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 468. + +*** + +### state + +Returns the value of attribute state. + +#### Signature + +```ruby +attr_reader state -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 455. + +## Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 454. diff --git a/fern/products/sdk-reference/ruby/relay/standalone-collect-action/index.mdx b/fern/products/sdk-reference/ruby/relay/standalone-collect-action/index.mdx new file mode 100644 index 0000000000..94f2baaf57 --- /dev/null +++ b/fern/products/sdk-reference/ruby/relay/standalone-collect-action/index.mdx @@ -0,0 +1,112 @@ +--- +slug: "/reference/ruby/relay/standalone-collect-action" +title: "StandaloneCollectAction" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::StandaloneCollectAction" + parent: "relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb" + visibility: "public" +--- +# `StandaloneCollectAction` + +Handle for standalone calling.collect (without play). + +## Signature + +```ruby +class StandaloneCollectAction < SignalWire::Relay::Action +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::Action](/docs/sdk-reference/reference/ruby/relay/action) + +## Methods + +### \_check\_event + +#### Signature + +```ruby +def _check_event(event) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 205. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(call, control_id) +``` + +#### Parameters + + + + + +#### Returns + +`StandaloneCollectAction` — a new instance of StandaloneCollectAction + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 200. + +*** + +### start\_input\_timers + +#### Signature + +```ruby +def start_input_timers +``` + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 219. + +*** + +### stop + +#### Signature + +```ruby +def stop +``` + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 215. + +## Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 199. diff --git a/fern/products/sdk-reference/ruby/relay/stream-action/index.mdx b/fern/products/sdk-reference/ruby/relay/stream-action/index.mdx new file mode 100644 index 0000000000..7a1a323ad5 --- /dev/null +++ b/fern/products/sdk-reference/ruby/relay/stream-action/index.mdx @@ -0,0 +1,76 @@ +--- +slug: "/reference/ruby/relay/stream-action" +title: "StreamAction" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::StreamAction" + parent: "relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb" + visibility: "public" +--- +# `StreamAction` + +Handle for an active stream operation. + +## Signature + +```ruby +class StreamAction < SignalWire::Relay::Action +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::Action](/docs/sdk-reference/reference/ruby/relay/action) + +## Methods + +### initialize + +#### Signature + +```ruby +def initialize(call, control_id) +``` + +#### Parameters + + + + + +#### Returns + +`StreamAction` — a new instance of StreamAction + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 249. + +*** + +### stop + +#### Signature + +```ruby +def stop +``` + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 253. + +## Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 248. diff --git a/fern/products/sdk-reference/ruby/relay/stream-event/index.mdx b/fern/products/sdk-reference/ruby/relay/stream-event/index.mdx new file mode 100644 index 0000000000..47407d4add --- /dev/null +++ b/fern/products/sdk-reference/ruby/relay/stream-event/index.mdx @@ -0,0 +1,158 @@ +--- +slug: "/reference/ruby/relay/stream-event" +title: "StreamEvent" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::StreamEvent" + parent: "relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" + visibility: "public" +--- +# `StreamEvent` + +calling.call.stream + +## Signature + +```ruby +class StreamEvent < SignalWire::Relay::RelayEvent +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::RelayEvent](/docs/sdk-reference/reference/ruby/relay/relay-event) + +## Methods + +### control\_id + +Returns the value of attribute control\_id. + +#### Signature + +```ruby +attr_reader control_id -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 423. + +*** + +### from\_payload + +#### Signature + +```ruby +def from_payload(payload) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 425. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(control_id: '', state: '', url: '', name: '', **base) +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`StreamEvent` — a new instance of StreamEvent + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 438. + +*** + +### name + +Returns the value of attribute name. + +#### Signature + +```ruby +attr_reader name -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 423. + +*** + +### state + +Returns the value of attribute state. + +#### Signature + +```ruby +attr_reader state -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 423. + +*** + +### url + +Returns the value of attribute url. + +#### Signature + +```ruby +attr_reader url -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 423. + +## Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 422. diff --git a/fern/products/sdk-reference/ruby/relay/tap-action/index.mdx b/fern/products/sdk-reference/ruby/relay/tap-action/index.mdx new file mode 100644 index 0000000000..e032df1105 --- /dev/null +++ b/fern/products/sdk-reference/ruby/relay/tap-action/index.mdx @@ -0,0 +1,76 @@ +--- +slug: "/reference/ruby/relay/tap-action" +title: "TapAction" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::TapAction" + parent: "relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb" + visibility: "public" +--- +# `TapAction` + +Handle for an active tap operation. + +## Signature + +```ruby +class TapAction < SignalWire::Relay::Action +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::Action](/docs/sdk-reference/reference/ruby/relay/action) + +## Methods + +### initialize + +#### Signature + +```ruby +def initialize(call, control_id) +``` + +#### Parameters + + + + + +#### Returns + +`TapAction` — a new instance of TapAction + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 238. + +*** + +### stop + +#### Signature + +```ruby +def stop +``` + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 242. + +## Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 237. diff --git a/fern/products/sdk-reference/ruby/relay/tap-event/index.mdx b/fern/products/sdk-reference/ruby/relay/tap-event/index.mdx new file mode 100644 index 0000000000..07c1048768 --- /dev/null +++ b/fern/products/sdk-reference/ruby/relay/tap-event/index.mdx @@ -0,0 +1,158 @@ +--- +slug: "/reference/ruby/relay/tap-event" +title: "TapEvent" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::TapEvent" + parent: "relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" + visibility: "public" +--- +# `TapEvent` + +calling.call.tap + +## Signature + +```ruby +class TapEvent < SignalWire::Relay::RelayEvent +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::RelayEvent](/docs/sdk-reference/reference/ruby/relay/relay-event) + +## Methods + +### control\_id + +Returns the value of attribute control\_id. + +#### Signature + +```ruby +attr_reader control_id -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 391. + +*** + +### device + +Returns the value of attribute device. + +#### Signature + +```ruby +attr_reader device -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 391. + +*** + +### from\_payload + +#### Signature + +```ruby +def from_payload(payload) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 393. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(control_id: '', state: '', tap: {}, device: {}, **base) +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`TapEvent` — a new instance of TapEvent + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 406. + +*** + +### state + +Returns the value of attribute state. + +#### Signature + +```ruby +attr_reader state -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 391. + +*** + +### tap + +Returns the value of attribute tap. + +#### Signature + +```ruby +attr_reader tap -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 391. + +## Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 390. diff --git a/fern/products/sdk-reference/ruby/relay/transcribe-action/index.mdx b/fern/products/sdk-reference/ruby/relay/transcribe-action/index.mdx new file mode 100644 index 0000000000..a4fd0b5630 --- /dev/null +++ b/fern/products/sdk-reference/ruby/relay/transcribe-action/index.mdx @@ -0,0 +1,76 @@ +--- +slug: "/reference/ruby/relay/transcribe-action" +title: "TranscribeAction" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::TranscribeAction" + parent: "relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb" + visibility: "public" +--- +# `TranscribeAction` + +Handle for an active transcribe operation. + +## Signature + +```ruby +class TranscribeAction < SignalWire::Relay::Action +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::Action](/docs/sdk-reference/reference/ruby/relay/action) + +## Methods + +### initialize + +#### Signature + +```ruby +def initialize(call, control_id) +``` + +#### Parameters + + + + + +#### Returns + +`TranscribeAction` — a new instance of TranscribeAction + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 271. + +*** + +### stop + +#### Signature + +```ruby +def stop +``` + +#### Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 275. + +## Source + +[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) + +Line 270. diff --git a/fern/products/sdk-reference/ruby/relay/transcribe-event/index.mdx b/fern/products/sdk-reference/ruby/relay/transcribe-event/index.mdx new file mode 100644 index 0000000000..a16040401e --- /dev/null +++ b/fern/products/sdk-reference/ruby/relay/transcribe-event/index.mdx @@ -0,0 +1,198 @@ +--- +slug: "/reference/ruby/relay/transcribe-event" +title: "TranscribeEvent" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::Relay::TranscribeEvent" + parent: "relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" + visibility: "public" +--- +# `TranscribeEvent` + +calling.call.transcribe + +## Signature + +```ruby +class TranscribeEvent < SignalWire::Relay::RelayEvent +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::RelayEvent](/docs/sdk-reference/reference/ruby/relay/relay-event) + +## Methods + +### control\_id + +Returns the value of attribute control\_id. + +#### Signature + +```ruby +attr_reader control_id -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 686. + +*** + +### duration + +Returns the value of attribute duration. + +#### Signature + +```ruby +attr_reader duration -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 686. + +*** + +### from\_payload + +#### Signature + +```ruby +def from_payload(payload) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 688. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(control_id: '', state: '', url: '', recording_id: '', duration: 0.0, size: 0, **base) +``` + +#### Parameters + + + + + + + + + + + + + + + +#### Returns + +`TranscribeEvent` — a new instance of TranscribeEvent + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 703. + +*** + +### recording\_id + +Returns the value of attribute recording\_id. + +#### Signature + +```ruby +attr_reader recording_id -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 686. + +*** + +### size + +Returns the value of attribute size. + +#### Signature + +```ruby +attr_reader size -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 686. + +*** + +### state + +Returns the value of attribute state. + +#### Signature + +```ruby +attr_reader state -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 686. + +*** + +### url + +Returns the value of attribute url. + +#### Signature + +```ruby +attr_reader url -> Object +``` + +#### Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 686. + +## Source + +[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) + +Line 685. diff --git a/fern/products/sdk-reference/ruby/rest/base-resource/index.mdx b/fern/products/sdk-reference/ruby/rest/base-resource/index.mdx new file mode 100644 index 0000000000..6c2cad4e4d --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/base-resource/index.mdx @@ -0,0 +1,60 @@ +--- +slug: "/reference/ruby/rest/base-resource" +title: "BaseResource" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::BaseResource" + parent: "rest" + module: "rest" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb" + visibility: "public" +--- +# `BaseResource` + +Base for all namespace/resource classes. + +## Signature + +```ruby +class BaseResource < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### initialize + +#### Signature + +```ruby +def initialize(http, base_path) +``` + +#### Parameters + + + + + +#### Returns + +`BaseResource` — a new instance of BaseResource + +#### Source + +[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) + +Line 138. + +## Source + +[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) + +Line 137. diff --git a/fern/products/sdk-reference/ruby/rest/crud-resource/index.mdx b/fern/products/sdk-reference/ruby/rest/crud-resource/index.mdx new file mode 100644 index 0000000000..4a9cafe088 --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/crud-resource/index.mdx @@ -0,0 +1,172 @@ +--- +slug: "/reference/ruby/rest/crud-resource" +title: "CrudResource" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::CrudResource" + parent: "rest" + module: "rest" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb" + visibility: "public" +--- +# `CrudResource` + +Standard CRUD resource with list/create/get/update/delete. + +## Signature + +```ruby +class CrudResource < SignalWire::REST::BaseResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/rest/base-resource) + +## Methods + +### create + +#### Signature + +```ruby +def create(**kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) + +Line 164. + +*** + +### delete + +#### Signature + +```ruby +def delete(resource_id) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) + +Line 177. + +*** + +### get + +#### Signature + +```ruby +def get(resource_id) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) + +Line 168. + +*** + +### list + +#### Signature + +```ruby +def list(**params) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) + +Line 160. + +*** + +### update + +#### Signature + +```ruby +def update(resource_id, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) + +Line 172. + +*** + +### update\_method + +#### Signature + +```ruby +def update_method +``` + +#### Source + +[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) + +Line 152. + +*** + +### update\_method= + +#### Signature + +```ruby +def update_method=(m) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) + +Line 156. + +## Source + +[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) + +Line 151. diff --git a/fern/products/sdk-reference/ruby/rest/crud-with-addresses/index.mdx b/fern/products/sdk-reference/ruby/rest/crud-with-addresses/index.mdx new file mode 100644 index 0000000000..3747780e04 --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/crud-with-addresses/index.mdx @@ -0,0 +1,60 @@ +--- +slug: "/reference/ruby/rest/crud-with-addresses" +title: "CrudWithAddresses" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::CrudWithAddresses" + parent: "rest" + module: "rest" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb" + visibility: "public" +--- +# `CrudWithAddresses` + +CRUD resource that also supports listing the addresses bound to a +resource. Mirrors Python's +signalwire.rest.\_base.CrudWithAddresses+: +it adds a single +list\_addresses+ helper on top of the standard +list/create/get/update/delete surface, issuing ++GET \{base\_path\}/\{resource\_id\}/addresses+. + +## Signature + +```ruby +class CrudWithAddresses < SignalWire::REST::CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::CrudResource](/docs/sdk-reference/reference/ruby/rest/crud-resource) + +## Methods + +### list\_addresses + +#### Signature + +```ruby +def list_addresses(resource_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) + +Line 188. + +## Source + +[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) + +Line 187. diff --git a/fern/products/sdk-reference/ruby/rest/http-client/index.mdx b/fern/products/sdk-reference/ruby/rest/http-client/index.mdx new file mode 100644 index 0000000000..2e9622c89d --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/http-client/index.mdx @@ -0,0 +1,222 @@ +--- +slug: "/reference/ruby/rest/http-client" +title: "HttpClient" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::HttpClient" + parent: "rest" + module: "rest" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb" + visibility: "public" +--- +# `HttpClient` + +Thin wrapper around Net::HTTP with Basic Auth and JSON handling. + +## Signature + +```ruby +class HttpClient < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### base\_url + +Returns the value of attribute base\_url. + +#### Signature + +```ruby +attr_reader base_url -> Object +``` + +#### Source + +[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) + +Line 26. + +*** + +### delete + +#### Signature + +```ruby +def delete(path) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) + +Line 72. + +*** + +### get + +#### Signature + +```ruby +def get(path, params = nil) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) + +Line 56. + +*** + +### initialize + ++base\_url+ overrides the derived +https://\{space\}+ value when set, +which is how the audit fixture and tests point the client at a +loopback server. Pass either +space+ ("acme") / a host +("acme.signalwire.com") OR an explicit +base\_url+ ("`http://127.0.0.1:NNNN`"). + ++ca\_file+ (optional) names a PEM CA bundle to trust for HTTPS, for +private-CA / pinned-CA deployments. When set, requests verify the peer +(VERIFY\_PEER) against a store seeded from the OpenSSL defaults (which +honor SSL\_CERT\_FILE) plus that bundle. When unset, Net::HTTP's default +verification (system store, VERIFY\_PEER) applies unchanged. HTTPS is +always verified either way — there is no VERIFY\_NONE path. + +#### Signature + +```ruby +def initialize(project_id, token, space, base_url: nil, ca_file: nil) +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`HttpClient` — a new instance of HttpClient + +#### Source + +[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) + +Line 39. + +*** + +### patch + +#### Signature + +```ruby +def patch(path, body = nil) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) + +Line 68. + +*** + +### post + +#### Signature + +```ruby +def post(path, body = nil, params: nil) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) + +Line 60. + +*** + +### project\_id + +#### Signature + +```ruby +def project_id +``` + +#### Source + +[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) + +Line 52. + +*** + +### put + +#### Signature + +```ruby +def put(path, body = nil) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) + +Line 64. + +## Source + +[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) + +Line 25. diff --git a/fern/products/sdk-reference/ruby/rest/index.mdx b/fern/products/sdk-reference/ruby/rest/index.mdx new file mode 100644 index 0000000000..ff692b6929 --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/index.mdx @@ -0,0 +1,26 @@ +--- +slug: "/reference/ruby/rest" +title: "REST" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "module" + language: "ruby" + qualified_name: "SignalWire::REST" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/pagination.rb" + visibility: "public" +--- +# `REST` + +## Signature + +```ruby +module REST +``` + +## Source + +[`lib/signalwire/rest/pagination.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/pagination.rb) + +Line 4. diff --git a/fern/products/sdk-reference/ruby/rest/index__2.mdx b/fern/products/sdk-reference/ruby/rest/index__2.mdx new file mode 100644 index 0000000000..1ad7072bfd --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/index__2.mdx @@ -0,0 +1,54 @@ +--- +slug: "/reference/ruby/rest/index__2" +title: "rest" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "module" + language: "ruby" + qualified_name: "rest" +--- +# `rest` + +## Classes + + + + Base for all namespace/resource classes. + + + + Standard CRUD resource with list/create/get/update/delete. + + + + CRUD resource that also supports listing the addresses bound to a resource. Mirrors Python's +signalwire.rest.\_base.CrudWithAddresses+: it adds a single +list\_addresses+ helper on top of the standard list/create/get/update/delete surface, issuing +GET \{base\_path\}/\{resource\_id\}/addresses+. + + + + Thin wrapper around Net::HTTP with Basic Auth and JSON handling. + + + + Iterates items across paginated API responses. + + + + REST client for the SignalWire platform APIs. + + + + Raised when the SignalWire REST API returns a non-2xx response. + + + +## Modules + + + + + + PhoneCallHandler -- enum-like constants of the +call\_handler+ values accepted by +phone\_numbers.update+. + + diff --git a/fern/products/sdk-reference/ruby/rest/namespaces/addresses-resource/index.mdx b/fern/products/sdk-reference/ruby/rest/namespaces/addresses-resource/index.mdx new file mode 100644 index 0000000000..57fe6087fa --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/namespaces/addresses-resource/index.mdx @@ -0,0 +1,138 @@ +--- +slug: "/reference/ruby/rest/namespaces/addresses-resource" +title: "AddressesResource" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::AddressesResource" + parent: "SignalWire::REST::Namespaces" + module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/addresses.rb" + visibility: "public" +--- +# `AddressesResource` + +Address management (no update endpoint). + +## Signature + +```ruby +class AddressesResource < SignalWire::REST::BaseResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/rest/base-resource) + +## Methods + +### create + +#### Signature + +```ruby +def create(**kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/addresses.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/addresses.rb) + +Line 13. + +*** + +### delete + +#### Signature + +```ruby +def delete(address_id) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/addresses.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/addresses.rb) + +Line 15. + +*** + +### get + +#### Signature + +```ruby +def get(address_id) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/addresses.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/addresses.rb) + +Line 14. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(http) +``` + +#### Parameters + + + +#### Returns + +`AddressesResource` — a new instance of AddressesResource + +#### Source + +[`lib/signalwire/rest/namespaces/addresses.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/addresses.rb) + +Line 8. + +*** + +### list + +#### Signature + +```ruby +def list(**params) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/addresses.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/addresses.rb) + +Line 12. + +## Source + +[`lib/signalwire/rest/namespaces/addresses.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/addresses.rb) + +Line 7. diff --git a/fern/products/sdk-reference/ruby/rest/namespaces/auto-materialized-webhook/index.mdx b/fern/products/sdk-reference/ruby/rest/namespaces/auto-materialized-webhook/index.mdx new file mode 100644 index 0000000000..601c3cc952 --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/namespaces/auto-materialized-webhook/index.mdx @@ -0,0 +1,71 @@ +--- +slug: "/reference/ruby/rest/namespaces/auto-materialized-webhook" +title: "AutoMaterializedWebhook" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::AutoMaterializedWebhook" + parent: "SignalWire::REST::Namespaces" + module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb" + visibility: "public" +--- +# `AutoMaterializedWebhook` + +Fabric webhook resource that's normally auto-created by ++phone\_numbers.set\_\*\_webhook+. Exposed for backwards compatibility. + +The binding model for these resources is on the phone number (see ++phone\_numbers.set\_swml\_webhook+ / +set\_cxml\_webhook+) -- setting ++call\_handler+ on a phone number auto-materializes the webhook +Fabric resource. Calling +create+ directly here produces an orphan +resource that isn't bound to any phone number. + +## Signature + +```ruby +class AutoMaterializedWebhook < SignalWire::REST::Namespaces::FabricResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::Namespaces::FabricResource](/docs/sdk-reference/reference/ruby/rest/namespaces/fabric-resource) + +## Constants + + + Subclasses override to advertise the correct helper in the warning. + + +## Methods + +### create + + + **Deprecated.** Creating a webhook Fabric resource directly produces an orphan that isn't bound to any phone number. Use the matching +phone\_numbers.set\_\*\_webhook+ helper instead; it updates the phone number and the server auto-materializes the resource. See porting-sdk's +phone-binding.md+. + + +#### Signature + +```ruby +def create(**kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 35. + +## Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 26. diff --git a/fern/products/sdk-reference/ruby/rest/namespaces/call-flows-resource/index.mdx b/fern/products/sdk-reference/ruby/rest/namespaces/call-flows-resource/index.mdx new file mode 100644 index 0000000000..0cfcf78b32 --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/namespaces/call-flows-resource/index.mdx @@ -0,0 +1,100 @@ +--- +slug: "/reference/ruby/rest/namespaces/call-flows-resource" +title: "CallFlowsResource" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::CallFlowsResource" + parent: "SignalWire::REST::Namespaces" + module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb" + visibility: "public" +--- +# `CallFlowsResource` + +Call flows with version management. + +## Signature + +```ruby +class CallFlowsResource < SignalWire::REST::Namespaces::FabricResourcePUT +``` + +## Inheritance + +**Extends:** [SignalWire::REST::Namespaces::FabricResourcePUT](/docs/sdk-reference/reference/ruby/rest/namespaces/fabric-resource-put) + +## Methods + +### deploy\_version + +#### Signature + +```ruby +def deploy_version(resource_id, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 70. + +*** + +### list\_addresses + +#### Signature + +```ruby +def list_addresses(resource_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 60. + +*** + +### list\_versions + +#### Signature + +```ruby +def list_versions(resource_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 65. + +## Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 59. diff --git a/fern/products/sdk-reference/ruby/rest/namespaces/calling-namespace/index.mdx b/fern/products/sdk-reference/ruby/rest/namespaces/calling-namespace/index.mdx new file mode 100644 index 0000000000..2a45e71184 --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/namespaces/calling-namespace/index.mdx @@ -0,0 +1,896 @@ +--- +slug: "/reference/ruby/rest/namespaces/calling-namespace" +title: "CallingNamespace" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::CallingNamespace" + parent: "SignalWire::REST::Namespaces" + module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb" + visibility: "public" +--- +# `CallingNamespace` + +REST call control -- all 37 commands dispatched via single POST endpoint. + +## Signature + +```ruby +class CallingNamespace < SignalWire::REST::BaseResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/rest/base-resource) + +## Methods + +### ai\_hold + +#### Signature + +```ruby +def ai_hold(call_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 129. + +*** + +### ai\_message + +AI + +#### Signature + +```ruby +def ai_message(call_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 125. + +*** + +### ai\_stop + +#### Signature + +```ruby +def ai_stop(call_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 137. + +*** + +### ai\_unhold + +#### Signature + +```ruby +def ai_unhold(call_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 133. + +*** + +### collect + +Collect + +#### Signature + +```ruby +def collect(call_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 67. + +*** + +### collect\_start\_input\_timers + +#### Signature + +```ruby +def collect_start_input_timers(call_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 75. + +*** + +### collect\_stop + +#### Signature + +```ruby +def collect_stop(call_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 71. + +*** + +### denoise + +Denoise + +#### Signature + +```ruby +def denoise(call_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 107. + +*** + +### denoise\_stop + +#### Signature + +```ruby +def denoise_stop(call_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 111. + +*** + +### detect + +Detect + +#### Signature + +```ruby +def detect(call_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 80. + +*** + +### detect\_stop + +#### Signature + +```ruby +def detect_stop(call_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 84. + +*** + +### dial + +Call lifecycle + +#### Signature + +```ruby +def dial(**params) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 13. + +*** + +### disconnect + +#### Signature + +```ruby +def disconnect(call_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 24. + +*** + +### end\_call + +#### Signature + +```ruby +def end_call(call_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 16. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(http) +``` + +#### Parameters + + + +#### Returns + +`CallingNamespace` — a new instance of CallingNamespace + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 8. + +*** + +### live\_transcribe + +Live transcribe / translate + +#### Signature + +```ruby +def live_transcribe(call_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 142. + +*** + +### live\_translate + +#### Signature + +```ruby +def live_translate(call_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 146. + +*** + +### play + +Play + +#### Signature + +```ruby +def play(call_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 29. + +*** + +### play\_pause + +#### Signature + +```ruby +def play_pause(call_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 33. + +*** + +### play\_resume + +#### Signature + +```ruby +def play_resume(call_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 37. + +*** + +### play\_stop + +#### Signature + +```ruby +def play_stop(call_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 41. + +*** + +### play\_volume + +#### Signature + +```ruby +def play_volume(call_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 45. + +*** + +### receive\_fax\_stop + +#### Signature + +```ruby +def receive_fax_stop(call_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 155. + +*** + +### record + +Record + +#### Signature + +```ruby +def record(call_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 50. + +*** + +### record\_pause + +#### Signature + +```ruby +def record_pause(call_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 54. + +*** + +### record\_resume + +#### Signature + +```ruby +def record_resume(call_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 58. + +*** + +### record\_stop + +#### Signature + +```ruby +def record_stop(call_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 62. + +*** + +### refer + +SIP + +#### Signature + +```ruby +def refer(call_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 160. + +*** + +### send\_fax\_stop + +Fax + +#### Signature + +```ruby +def send_fax_stop(call_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 151. + +*** + +### stream + +Stream + +#### Signature + +```ruby +def stream(call_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 98. + +*** + +### stream\_stop + +#### Signature + +```ruby +def stream_stop(call_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 102. + +*** + +### tap + +Tap + +#### Signature + +```ruby +def tap(call_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 89. + +*** + +### tap\_stop + +#### Signature + +```ruby +def tap_stop(call_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 93. + +*** + +### transcribe + +Transcribe + +#### Signature + +```ruby +def transcribe(call_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 116. + +*** + +### transcribe\_stop + +#### Signature + +```ruby +def transcribe_stop(call_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 120. + +*** + +### transfer + +#### Signature + +```ruby +def transfer(call_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 20. + +*** + +### update + +#### Signature + +```ruby +def update(**params) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 14. + +*** + +### user\_event + +Custom events + +#### Signature + +```ruby +def user_event(call_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 165. + +## Source + +[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) + +Line 7. diff --git a/fern/products/sdk-reference/ruby/rest/namespaces/chat-resource/index.mdx b/fern/products/sdk-reference/ruby/rest/namespaces/chat-resource/index.mdx new file mode 100644 index 0000000000..d177709ed8 --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/namespaces/chat-resource/index.mdx @@ -0,0 +1,78 @@ +--- +slug: "/reference/ruby/rest/namespaces/chat-resource" +title: "ChatResource" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::ChatResource" + parent: "SignalWire::REST::Namespaces" + module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/chat.rb" + visibility: "public" +--- +# `ChatResource` + +Chat token generation. + +## Signature + +```ruby +class ChatResource < SignalWire::REST::BaseResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/rest/base-resource) + +## Methods + +### create\_token + +#### Signature + +```ruby +def create_token(**kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/chat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/chat.rb) + +Line 12. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(http) +``` + +#### Parameters + + + +#### Returns + +`ChatResource` — a new instance of ChatResource + +#### Source + +[`lib/signalwire/rest/namespaces/chat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/chat.rb) + +Line 8. + +## Source + +[`lib/signalwire/rest/namespaces/chat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/chat.rb) + +Line 7. diff --git a/fern/products/sdk-reference/ruby/rest/namespaces/compat-accounts/index.mdx b/fern/products/sdk-reference/ruby/rest/namespaces/compat-accounts/index.mdx new file mode 100644 index 0000000000..feedb94890 --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/namespaces/compat-accounts/index.mdx @@ -0,0 +1,140 @@ +--- +slug: "/reference/ruby/rest/namespaces/compat-accounts" +title: "CompatAccounts" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::CompatAccounts" + parent: "SignalWire::REST::Namespaces" + module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb" + visibility: "public" +--- +# `CompatAccounts` + +Compat account/subproject management. + +## Signature + +```ruby +class CompatAccounts < SignalWire::REST::BaseResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/rest/base-resource) + +## Methods + +### create + +#### Signature + +```ruby +def create(**kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 13. + +*** + +### get + +#### Signature + +```ruby +def get(sid) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 14. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(http) +``` + +#### Parameters + + + +#### Returns + +`CompatAccounts` — a new instance of CompatAccounts + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 8. + +*** + +### list + +#### Signature + +```ruby +def list(**params) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 12. + +*** + +### update + +#### Signature + +```ruby +def update(sid, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 15. + +## Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 7. diff --git a/fern/products/sdk-reference/ruby/rest/namespaces/compat-applications/index.mdx b/fern/products/sdk-reference/ruby/rest/namespaces/compat-applications/index.mdx new file mode 100644 index 0000000000..261c18c1eb --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/namespaces/compat-applications/index.mdx @@ -0,0 +1,56 @@ +--- +slug: "/reference/ruby/rest/namespaces/compat-applications" +title: "CompatApplications" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::CompatApplications" + parent: "SignalWire::REST::Namespaces" + module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb" + visibility: "public" +--- +# `CompatApplications` + +Compat application management. + +## Signature + +```ruby +class CompatApplications < SignalWire::REST::CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::CrudResource](/docs/sdk-reference/reference/ruby/rest/crud-resource) + +## Methods + +### update + +#### Signature + +```ruby +def update(sid, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 158. + +## Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 157. diff --git a/fern/products/sdk-reference/ruby/rest/namespaces/compat-calls/index.mdx b/fern/products/sdk-reference/ruby/rest/namespaces/compat-calls/index.mdx new file mode 100644 index 0000000000..fed4f8f8d1 --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/namespaces/compat-calls/index.mdx @@ -0,0 +1,148 @@ +--- +slug: "/reference/ruby/rest/namespaces/compat-calls" +title: "CompatCalls" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::CompatCalls" + parent: "SignalWire::REST::Namespaces" + module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb" + visibility: "public" +--- +# `CompatCalls` + +Compat call management with recording and stream sub-resources. + +## Signature + +```ruby +class CompatCalls < SignalWire::REST::CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::CrudResource](/docs/sdk-reference/reference/ruby/rest/crud-resource) + +## Methods + +### start\_recording + +#### Signature + +```ruby +def start_recording(call_sid, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 24. + +*** + +### start\_stream + +#### Signature + +```ruby +def start_stream(call_sid, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 32. + +*** + +### stop\_stream + +#### Signature + +```ruby +def stop_stream(call_sid, stream_sid, **kwargs) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 36. + +*** + +### update + +#### Signature + +```ruby +def update(sid, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 20. + +*** + +### update\_recording + +#### Signature + +```ruby +def update_recording(call_sid, recording_sid, **kwargs) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 28. + +## Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 19. diff --git a/fern/products/sdk-reference/ruby/rest/namespaces/compat-conferences/index.mdx b/fern/products/sdk-reference/ruby/rest/namespaces/compat-conferences/index.mdx new file mode 100644 index 0000000000..63d0dab863 --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/namespaces/compat-conferences/index.mdx @@ -0,0 +1,328 @@ +--- +slug: "/reference/ruby/rest/namespaces/compat-conferences" +title: "CompatConferences" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::CompatConferences" + parent: "SignalWire::REST::Namespaces" + module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb" + visibility: "public" +--- +# `CompatConferences` + +Compat conference management. + +## Signature + +```ruby +class CompatConferences < SignalWire::REST::BaseResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/rest/base-resource) + +## Methods + +### delete\_recording + +#### Signature + +```ruby +def delete_recording(conference_sid, recording_sid) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 111. + +*** + +### get + +#### Signature + +```ruby +def get(sid) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 78. + +*** + +### get\_participant + +#### Signature + +```ruby +def get_participant(conference_sid, call_sid) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 86. + +*** + +### get\_recording + +#### Signature + +```ruby +def get_recording(conference_sid, recording_sid) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 103. + +*** + +### list + +#### Signature + +```ruby +def list(**params) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 77. + +*** + +### list\_participants + +Participants + +#### Signature + +```ruby +def list_participants(conference_sid, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 82. + +*** + +### list\_recordings + +Conference recordings + +#### Signature + +```ruby +def list_recordings(conference_sid, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 99. + +*** + +### remove\_participant + +#### Signature + +```ruby +def remove_participant(conference_sid, call_sid) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 94. + +*** + +### start\_stream + +Conference streams + +#### Signature + +```ruby +def start_stream(conference_sid, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 116. + +*** + +### stop\_stream + +#### Signature + +```ruby +def stop_stream(conference_sid, stream_sid, **kwargs) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 120. + +*** + +### update + +#### Signature + +```ruby +def update(sid, **kw) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 79. + +*** + +### update\_participant + +#### Signature + +```ruby +def update_participant(conference_sid, call_sid, **kwargs) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 90. + +*** + +### update\_recording + +#### Signature + +```ruby +def update_recording(conference_sid, recording_sid, **kwargs) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 107. + +## Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 76. diff --git a/fern/products/sdk-reference/ruby/rest/namespaces/compat-faxes/index.mdx b/fern/products/sdk-reference/ruby/rest/namespaces/compat-faxes/index.mdx new file mode 100644 index 0000000000..86bc346336 --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/namespaces/compat-faxes/index.mdx @@ -0,0 +1,122 @@ +--- +slug: "/reference/ruby/rest/namespaces/compat-faxes" +title: "CompatFaxes" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::CompatFaxes" + parent: "SignalWire::REST::Namespaces" + module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb" + visibility: "public" +--- +# `CompatFaxes` + +Compat fax management with media sub-resources. + +## Signature + +```ruby +class CompatFaxes < SignalWire::REST::CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::CrudResource](/docs/sdk-reference/reference/ruby/rest/crud-resource) + +## Methods + +### delete\_media + +#### Signature + +```ruby +def delete_media(fax_sid, media_sid) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 70. + +*** + +### get\_media + +#### Signature + +```ruby +def get_media(fax_sid, media_sid) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 66. + +*** + +### list\_media + +#### Signature + +```ruby +def list_media(fax_sid, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 62. + +*** + +### update + +#### Signature + +```ruby +def update(sid, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 60. + +## Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 59. diff --git a/fern/products/sdk-reference/ruby/rest/namespaces/compat-laml-bins/index.mdx b/fern/products/sdk-reference/ruby/rest/namespaces/compat-laml-bins/index.mdx new file mode 100644 index 0000000000..30a7eb033b --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/namespaces/compat-laml-bins/index.mdx @@ -0,0 +1,56 @@ +--- +slug: "/reference/ruby/rest/namespaces/compat-laml-bins" +title: "CompatLamlBins" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::CompatLamlBins" + parent: "SignalWire::REST::Namespaces" + module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb" + visibility: "public" +--- +# `CompatLamlBins` + +Compat cXML/LaML script management. + +## Signature + +```ruby +class CompatLamlBins < SignalWire::REST::CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::CrudResource](/docs/sdk-reference/reference/ruby/rest/crud-resource) + +## Methods + +### update + +#### Signature + +```ruby +def update(sid, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 163. + +## Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 162. diff --git a/fern/products/sdk-reference/ruby/rest/namespaces/compat-messages/index.mdx b/fern/products/sdk-reference/ruby/rest/namespaces/compat-messages/index.mdx new file mode 100644 index 0000000000..67e74cdbce --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/namespaces/compat-messages/index.mdx @@ -0,0 +1,122 @@ +--- +slug: "/reference/ruby/rest/namespaces/compat-messages" +title: "CompatMessages" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::CompatMessages" + parent: "SignalWire::REST::Namespaces" + module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb" + visibility: "public" +--- +# `CompatMessages` + +Compat message management with media sub-resources. + +## Signature + +```ruby +class CompatMessages < SignalWire::REST::CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::CrudResource](/docs/sdk-reference/reference/ruby/rest/crud-resource) + +## Methods + +### delete\_media + +#### Signature + +```ruby +def delete_media(message_sid, media_sid) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 53. + +*** + +### get\_media + +#### Signature + +```ruby +def get_media(message_sid, media_sid) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 49. + +*** + +### list\_media + +#### Signature + +```ruby +def list_media(message_sid, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 45. + +*** + +### update + +#### Signature + +```ruby +def update(sid, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 43. + +## Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 42. diff --git a/fern/products/sdk-reference/ruby/rest/namespaces/compat-namespace/index.mdx b/fern/products/sdk-reference/ruby/rest/namespaces/compat-namespace/index.mdx new file mode 100644 index 0000000000..7a89a78dda --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/namespaces/compat-namespace/index.mdx @@ -0,0 +1,276 @@ +--- +slug: "/reference/ruby/rest/namespaces/compat-namespace" +title: "CompatNamespace" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::CompatNamespace" + parent: "SignalWire::REST::Namespaces" + module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb" + visibility: "public" +--- +# `CompatNamespace` + +Twilio-compatible LAML API namespace. + +## Signature + +```ruby +class CompatNamespace < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### accounts + +Returns the value of attribute accounts. + +#### Signature + +```ruby +attr_reader accounts -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 206. + +*** + +### applications + +Returns the value of attribute applications. + +#### Signature + +```ruby +attr_reader applications -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 206. + +*** + +### calls + +Returns the value of attribute calls. + +#### Signature + +```ruby +attr_reader calls -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 206. + +*** + +### conferences + +Returns the value of attribute conferences. + +#### Signature + +```ruby +attr_reader conferences -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 206. + +*** + +### faxes + +Returns the value of attribute faxes. + +#### Signature + +```ruby +attr_reader faxes -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 206. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(http, account_sid) +``` + +#### Parameters + + + + + +#### Returns + +`CompatNamespace` — a new instance of CompatNamespace + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 210. + +*** + +### laml\_bins + +Returns the value of attribute laml\_bins. + +#### Signature + +```ruby +attr_reader laml_bins -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 206. + +*** + +### messages + +Returns the value of attribute messages. + +#### Signature + +```ruby +attr_reader messages -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 206. + +*** + +### phone\_numbers + +Returns the value of attribute phone\_numbers. + +#### Signature + +```ruby +attr_reader phone_numbers -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 206. + +*** + +### queues + +Returns the value of attribute queues. + +#### Signature + +```ruby +attr_reader queues -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 206. + +*** + +### recordings + +Returns the value of attribute recordings. + +#### Signature + +```ruby +attr_reader recordings -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 206. + +*** + +### tokens + +Returns the value of attribute tokens. + +#### Signature + +```ruby +attr_reader tokens -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 206. + +*** + +### transcriptions + +Returns the value of attribute transcriptions. + +#### Signature + +```ruby +attr_reader transcriptions -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 206. + +## Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 205. diff --git a/fern/products/sdk-reference/ruby/rest/namespaces/compat-phone-numbers/index.mdx b/fern/products/sdk-reference/ruby/rest/namespaces/compat-phone-numbers/index.mdx new file mode 100644 index 0000000000..0e071f0060 --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/namespaces/compat-phone-numbers/index.mdx @@ -0,0 +1,246 @@ +--- +slug: "/reference/ruby/rest/namespaces/compat-phone-numbers" +title: "CompatPhoneNumbers" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::CompatPhoneNumbers" + parent: "SignalWire::REST::Namespaces" + module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb" + visibility: "public" +--- +# `CompatPhoneNumbers` + +Compat phone number management. + +## Signature + +```ruby +class CompatPhoneNumbers < SignalWire::REST::BaseResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/rest/base-resource) + +## Methods + +### delete + +#### Signature + +```ruby +def delete(sid) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 136. + +*** + +### get + +#### Signature + +```ruby +def get(sid) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 134. + +*** + +### import\_number + +#### Signature + +```ruby +def import_number(**kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 138. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(http, base) +``` + +#### Parameters + + + + + +#### Returns + +`CompatPhoneNumbers` — a new instance of CompatPhoneNumbers + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 127. + +*** + +### list + +#### Signature + +```ruby +def list(**params) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 132. + +*** + +### list\_available\_countries + +#### Signature + +```ruby +def list_available_countries(**params) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 143. + +*** + +### purchase + +#### Signature + +```ruby +def purchase(**kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 133. + +*** + +### search\_local + +#### Signature + +```ruby +def search_local(country, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 147. + +*** + +### search\_toll\_free + +#### Signature + +```ruby +def search_toll_free(country, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 151. + +*** + +### update + +#### Signature + +```ruby +def update(sid, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 135. + +## Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 126. diff --git a/fern/products/sdk-reference/ruby/rest/namespaces/compat-queues/index.mdx b/fern/products/sdk-reference/ruby/rest/namespaces/compat-queues/index.mdx new file mode 100644 index 0000000000..e970fc315d --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/namespaces/compat-queues/index.mdx @@ -0,0 +1,124 @@ +--- +slug: "/reference/ruby/rest/namespaces/compat-queues" +title: "CompatQueues" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::CompatQueues" + parent: "SignalWire::REST::Namespaces" + module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb" + visibility: "public" +--- +# `CompatQueues` + +Compat queue management with members. + +## Signature + +```ruby +class CompatQueues < SignalWire::REST::CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::CrudResource](/docs/sdk-reference/reference/ruby/rest/crud-resource) + +## Methods + +### dequeue\_member + +#### Signature + +```ruby +def dequeue_member(queue_sid, call_sid, **kwargs) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 178. + +*** + +### get\_member + +#### Signature + +```ruby +def get_member(queue_sid, call_sid) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 174. + +*** + +### list\_members + +#### Signature + +```ruby +def list_members(queue_sid, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 170. + +*** + +### update + +#### Signature + +```ruby +def update(sid, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 168. + +## Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 167. diff --git a/fern/products/sdk-reference/ruby/rest/namespaces/compat-recordings/index.mdx b/fern/products/sdk-reference/ruby/rest/namespaces/compat-recordings/index.mdx new file mode 100644 index 0000000000..1c5846a4a6 --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/namespaces/compat-recordings/index.mdx @@ -0,0 +1,94 @@ +--- +slug: "/reference/ruby/rest/namespaces/compat-recordings" +title: "CompatRecordings" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::CompatRecordings" + parent: "SignalWire::REST::Namespaces" + module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb" + visibility: "public" +--- +# `CompatRecordings` + +Compat recording management. + +## Signature + +```ruby +class CompatRecordings < SignalWire::REST::BaseResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/rest/base-resource) + +## Methods + +### delete + +#### Signature + +```ruby +def delete(sid) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 187. + +*** + +### get + +#### Signature + +```ruby +def get(sid) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 186. + +*** + +### list + +#### Signature + +```ruby +def list(**params) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 185. + +## Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 184. diff --git a/fern/products/sdk-reference/ruby/rest/namespaces/compat-tokens/index.mdx b/fern/products/sdk-reference/ruby/rest/namespaces/compat-tokens/index.mdx new file mode 100644 index 0000000000..2c7b273813 --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/namespaces/compat-tokens/index.mdx @@ -0,0 +1,96 @@ +--- +slug: "/reference/ruby/rest/namespaces/compat-tokens" +title: "CompatTokens" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::CompatTokens" + parent: "SignalWire::REST::Namespaces" + module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb" + visibility: "public" +--- +# `CompatTokens` + +Compat API token management. + +## Signature + +```ruby +class CompatTokens < SignalWire::REST::BaseResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/rest/base-resource) + +## Methods + +### create + +#### Signature + +```ruby +def create(**kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 199. + +*** + +### delete + +#### Signature + +```ruby +def delete(token_id) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 201. + +*** + +### update + +#### Signature + +```ruby +def update(token_id, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 200. + +## Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 198. diff --git a/fern/products/sdk-reference/ruby/rest/namespaces/compat-transcriptions/index.mdx b/fern/products/sdk-reference/ruby/rest/namespaces/compat-transcriptions/index.mdx new file mode 100644 index 0000000000..89f241475d --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/namespaces/compat-transcriptions/index.mdx @@ -0,0 +1,94 @@ +--- +slug: "/reference/ruby/rest/namespaces/compat-transcriptions" +title: "CompatTranscriptions" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::CompatTranscriptions" + parent: "SignalWire::REST::Namespaces" + module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb" + visibility: "public" +--- +# `CompatTranscriptions` + +Compat transcription management. + +## Signature + +```ruby +class CompatTranscriptions < SignalWire::REST::BaseResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/rest/base-resource) + +## Methods + +### delete + +#### Signature + +```ruby +def delete(sid) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 194. + +*** + +### get + +#### Signature + +```ruby +def get(sid) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 193. + +*** + +### list + +#### Signature + +```ruby +def list(**params) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 192. + +## Source + +[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) + +Line 191. diff --git a/fern/products/sdk-reference/ruby/rest/namespaces/conference-logs/index.mdx b/fern/products/sdk-reference/ruby/rest/namespaces/conference-logs/index.mdx new file mode 100644 index 0000000000..c5cb69d33b --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/namespaces/conference-logs/index.mdx @@ -0,0 +1,54 @@ +--- +slug: "/reference/ruby/rest/namespaces/conference-logs" +title: "ConferenceLogs" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::ConferenceLogs" + parent: "SignalWire::REST::Namespaces" + module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/logs.rb" + visibility: "public" +--- +# `ConferenceLogs` + +Conference log queries. + +## Signature + +```ruby +class ConferenceLogs < SignalWire::REST::BaseResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/rest/base-resource) + +## Methods + +### list + +#### Signature + +```ruby +def list(**params) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/logs.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/logs.rb) + +Line 30. + +## Source + +[`lib/signalwire/rest/namespaces/logs.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/logs.rb) + +Line 29. diff --git a/fern/products/sdk-reference/ruby/rest/namespaces/conference-rooms-resource/index.mdx b/fern/products/sdk-reference/ruby/rest/namespaces/conference-rooms-resource/index.mdx new file mode 100644 index 0000000000..3908058ec2 --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/namespaces/conference-rooms-resource/index.mdx @@ -0,0 +1,56 @@ +--- +slug: "/reference/ruby/rest/namespaces/conference-rooms-resource" +title: "ConferenceRoomsResource" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::ConferenceRoomsResource" + parent: "SignalWire::REST::Namespaces" + module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb" + visibility: "public" +--- +# `ConferenceRoomsResource` + +Conference rooms -- uses singular 'conference\_room' for sub-resource paths. + +## Signature + +```ruby +class ConferenceRoomsResource < SignalWire::REST::Namespaces::FabricResourcePUT +``` + +## Inheritance + +**Extends:** [SignalWire::REST::Namespaces::FabricResourcePUT](/docs/sdk-reference/reference/ruby/rest/namespaces/fabric-resource-put) + +## Methods + +### list\_addresses + +#### Signature + +```ruby +def list_addresses(resource_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 78. + +## Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 77. diff --git a/fern/products/sdk-reference/ruby/rest/namespaces/cxml-applications-resource/index.mdx b/fern/products/sdk-reference/ruby/rest/namespaces/cxml-applications-resource/index.mdx new file mode 100644 index 0000000000..60382a7dcc --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/namespaces/cxml-applications-resource/index.mdx @@ -0,0 +1,58 @@ +--- +slug: "/reference/ruby/rest/namespaces/cxml-applications-resource" +title: "CxmlApplicationsResource" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::CxmlApplicationsResource" + parent: "SignalWire::REST::Namespaces" + module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb" + visibility: "public" +--- +# `CxmlApplicationsResource` + +cXML applications -- no create method. + +## Signature + +```ruby +class CxmlApplicationsResource < SignalWire::REST::Namespaces::FabricResourcePUT +``` + +## Inheritance + +**Extends:** [SignalWire::REST::Namespaces::FabricResourcePUT](/docs/sdk-reference/reference/ruby/rest/namespaces/fabric-resource-put) + +## Methods + +### create + +#### Signature + +```ruby +def create(**_kwargs) +``` + +#### Parameters + + + +#### Throws + +- `NotImplementedError` + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 109. + +## Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 108. diff --git a/fern/products/sdk-reference/ruby/rest/namespaces/cxml-webhooks-resource/index.mdx b/fern/products/sdk-reference/ruby/rest/namespaces/cxml-webhooks-resource/index.mdx new file mode 100644 index 0000000000..5c5824f4f5 --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/namespaces/cxml-webhooks-resource/index.mdx @@ -0,0 +1,38 @@ +--- +slug: "/reference/ruby/rest/namespaces/cxml-webhooks-resource" +title: "CxmlWebhooksResource" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::CxmlWebhooksResource" + parent: "SignalWire::REST::Namespaces" + module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb" + visibility: "public" +--- +# `CxmlWebhooksResource` + +cXML webhooks -- auto-materialized by +phone\_numbers.set\_cxml\_webhook+. + +## Signature + +```ruby +class CxmlWebhooksResource < SignalWire::REST::Namespaces::AutoMaterializedWebhook +``` + +## Inheritance + +**Extends:** [SignalWire::REST::Namespaces::AutoMaterializedWebhook](/docs/sdk-reference/reference/ruby/rest/namespaces/auto-materialized-webhook) + +## Constants + + + +## Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 54. diff --git a/fern/products/sdk-reference/ruby/rest/namespaces/datasphere-documents/index.mdx b/fern/products/sdk-reference/ruby/rest/namespaces/datasphere-documents/index.mdx new file mode 100644 index 0000000000..04c7e3f424 --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/namespaces/datasphere-documents/index.mdx @@ -0,0 +1,144 @@ +--- +slug: "/reference/ruby/rest/namespaces/datasphere-documents" +title: "DatasphereDocuments" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::DatasphereDocuments" + parent: "SignalWire::REST::Namespaces" + module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/datasphere.rb" + visibility: "public" +--- +# `DatasphereDocuments` + +Document management with search and chunk operations. + +## Signature + +```ruby +class DatasphereDocuments < SignalWire::REST::CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::CrudResource](/docs/sdk-reference/reference/ruby/rest/crud-resource) + +## Methods + +### delete\_chunk + +#### Signature + +```ruby +def delete_chunk(document_id, chunk_id) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/datasphere.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/datasphere.rb) + +Line 24. + +*** + +### get\_chunk + +#### Signature + +```ruby +def get_chunk(document_id, chunk_id) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/datasphere.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/datasphere.rb) + +Line 20. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(http) +``` + +#### Parameters + + + +#### Returns + +`DatasphereDocuments` — a new instance of DatasphereDocuments + +#### Source + +[`lib/signalwire/rest/namespaces/datasphere.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/datasphere.rb) + +Line 8. + +*** + +### list\_chunks + +#### Signature + +```ruby +def list_chunks(document_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/datasphere.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/datasphere.rb) + +Line 16. + +*** + +### search + +#### Signature + +```ruby +def search(**kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/datasphere.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/datasphere.rb) + +Line 12. + +## Source + +[`lib/signalwire/rest/namespaces/datasphere.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/datasphere.rb) + +Line 7. diff --git a/fern/products/sdk-reference/ruby/rest/namespaces/datasphere-namespace/index.mdx b/fern/products/sdk-reference/ruby/rest/namespaces/datasphere-namespace/index.mdx new file mode 100644 index 0000000000..468d58c670 --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/namespaces/datasphere-namespace/index.mdx @@ -0,0 +1,76 @@ +--- +slug: "/reference/ruby/rest/namespaces/datasphere-namespace" +title: "DatasphereNamespace" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::DatasphereNamespace" + parent: "SignalWire::REST::Namespaces" + module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/datasphere.rb" + visibility: "public" +--- +# `DatasphereNamespace` + +Datasphere API namespace. + +## Signature + +```ruby +class DatasphereNamespace < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### documents + +Returns the value of attribute documents. + +#### Signature + +```ruby +attr_reader documents -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/datasphere.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/datasphere.rb) + +Line 31. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(http) +``` + +#### Parameters + + + +#### Returns + +`DatasphereNamespace` — a new instance of DatasphereNamespace + +#### Source + +[`lib/signalwire/rest/namespaces/datasphere.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/datasphere.rb) + +Line 33. + +## Source + +[`lib/signalwire/rest/namespaces/datasphere.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/datasphere.rb) + +Line 30. diff --git a/fern/products/sdk-reference/ruby/rest/namespaces/fabric-addresses/index.mdx b/fern/products/sdk-reference/ruby/rest/namespaces/fabric-addresses/index.mdx new file mode 100644 index 0000000000..35bc090b4c --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/namespaces/fabric-addresses/index.mdx @@ -0,0 +1,74 @@ +--- +slug: "/reference/ruby/rest/namespaces/fabric-addresses" +title: "FabricAddresses" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::FabricAddresses" + parent: "SignalWire::REST::Namespaces" + module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb" + visibility: "public" +--- +# `FabricAddresses` + +Read-only fabric addresses. + +## Signature + +```ruby +class FabricAddresses < SignalWire::REST::BaseResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/rest/base-resource) + +## Methods + +### get + +#### Signature + +```ruby +def get(address_id) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 164. + +*** + +### list + +#### Signature + +```ruby +def list(**params) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 160. + +## Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 159. diff --git a/fern/products/sdk-reference/ruby/rest/namespaces/fabric-namespace/index.mdx b/fern/products/sdk-reference/ruby/rest/namespaces/fabric-namespace/index.mdx new file mode 100644 index 0000000000..42038ef306 --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/namespaces/fabric-namespace/index.mdx @@ -0,0 +1,346 @@ +--- +slug: "/reference/ruby/rest/namespaces/fabric-namespace" +title: "FabricNamespace" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::FabricNamespace" + parent: "SignalWire::REST::Namespaces" + module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb" + visibility: "public" +--- +# `FabricNamespace` + +Fabric API namespace grouping all resource types. + +## Signature + +```ruby +class FabricNamespace < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### addresses + +Returns the value of attribute addresses. + +#### Signature + +```ruby +attr_reader addresses -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 198. + +*** + +### ai\_agents + +Returns the value of attribute ai\_agents. + +#### Signature + +```ruby +attr_reader ai_agents -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 198. + +*** + +### call\_flows + +Returns the value of attribute call\_flows. + +#### Signature + +```ruby +attr_reader call_flows -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 198. + +*** + +### conference\_rooms + +Returns the value of attribute conference\_rooms. + +#### Signature + +```ruby +attr_reader conference_rooms -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 198. + +*** + +### cxml\_applications + +Returns the value of attribute cxml\_applications. + +#### Signature + +```ruby +attr_reader cxml_applications -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 198. + +*** + +### cxml\_scripts + +Returns the value of attribute cxml\_scripts. + +#### Signature + +```ruby +attr_reader cxml_scripts -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 198. + +*** + +### cxml\_webhooks + +Returns the value of attribute cxml\_webhooks. + +#### Signature + +```ruby +attr_reader cxml_webhooks -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 198. + +*** + +### freeswitch\_connectors + +Returns the value of attribute freeswitch\_connectors. + +#### Signature + +```ruby +attr_reader freeswitch_connectors -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 198. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(http) +``` + +#### Parameters + + + +#### Returns + +`FabricNamespace` — a new instance of FabricNamespace + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 204. + +*** + +### relay\_applications + +Returns the value of attribute relay\_applications. + +#### Signature + +```ruby +attr_reader relay_applications -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 198. + +*** + +### resources + +Returns the value of attribute resources. + +#### Signature + +```ruby +attr_reader resources -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 198. + +*** + +### sip\_endpoints + +Returns the value of attribute sip\_endpoints. + +#### Signature + +```ruby +attr_reader sip_endpoints -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 198. + +*** + +### sip\_gateways + +Returns the value of attribute sip\_gateways. + +#### Signature + +```ruby +attr_reader sip_gateways -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 198. + +*** + +### subscribers + +Returns the value of attribute subscribers. + +#### Signature + +```ruby +attr_reader subscribers -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 198. + +*** + +### swml\_scripts + +Returns the value of attribute swml\_scripts. + +#### Signature + +```ruby +attr_reader swml_scripts -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 198. + +*** + +### swml\_webhooks + +Returns the value of attribute swml\_webhooks. + +#### Signature + +```ruby +attr_reader swml_webhooks -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 198. + +*** + +### tokens + +Returns the value of attribute tokens. + +#### Signature + +```ruby +attr_reader tokens -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 198. + +## Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 197. diff --git a/fern/products/sdk-reference/ruby/rest/namespaces/fabric-resource-put/index.mdx b/fern/products/sdk-reference/ruby/rest/namespaces/fabric-resource-put/index.mdx new file mode 100644 index 0000000000..cefd5f4d23 --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/namespaces/fabric-resource-put/index.mdx @@ -0,0 +1,34 @@ +--- +slug: "/reference/ruby/rest/namespaces/fabric-resource-put" +title: "FabricResourcePUT" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::FabricResourcePUT" + parent: "SignalWire::REST::Namespaces" + module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb" + visibility: "public" +--- +# `FabricResourcePUT` + +Fabric resource that uses PUT for updates. + +## Signature + +```ruby +class FabricResourcePUT < SignalWire::REST::Namespaces::FabricResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::Namespaces::FabricResource](/docs/sdk-reference/reference/ruby/rest/namespaces/fabric-resource) + +## Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 14. diff --git a/fern/products/sdk-reference/ruby/rest/namespaces/fabric-resource/index.mdx b/fern/products/sdk-reference/ruby/rest/namespaces/fabric-resource/index.mdx new file mode 100644 index 0000000000..add7a6df76 --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/namespaces/fabric-resource/index.mdx @@ -0,0 +1,37 @@ +--- +slug: "/reference/ruby/rest/namespaces/fabric-resource" +title: "FabricResource" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::FabricResource" + parent: "SignalWire::REST::Namespaces" + module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb" + visibility: "public" +--- +# `FabricResource` + +Standard fabric resource with CRUD + addresses. Inherits the ++list\_addresses+ helper from +CrudWithAddresses+ (matching Python's ++FabricResource(CrudWithAddresses)+ hierarchy); subclasses that use a +singular sub-resource path override +list\_addresses+ below. + +## Signature + +```ruby +class FabricResource < SignalWire::REST::CrudWithAddresses +``` + +## Inheritance + +**Extends:** [SignalWire::REST::CrudWithAddresses](/docs/sdk-reference/reference/ruby/rest/crud-with-addresses) + +## Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 10. diff --git a/fern/products/sdk-reference/ruby/rest/namespaces/fabric-tokens/index.mdx b/fern/products/sdk-reference/ruby/rest/namespaces/fabric-tokens/index.mdx new file mode 100644 index 0000000000..d8593c4e32 --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/namespaces/fabric-tokens/index.mdx @@ -0,0 +1,158 @@ +--- +slug: "/reference/ruby/rest/namespaces/fabric-tokens" +title: "FabricTokens" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::FabricTokens" + parent: "SignalWire::REST::Namespaces" + module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb" + visibility: "public" +--- +# `FabricTokens` + +Subscriber, guest, invite, and embed token creation. + +## Signature + +```ruby +class FabricTokens < SignalWire::REST::BaseResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/rest/base-resource) + +## Methods + +### create\_embed\_token + +#### Signature + +```ruby +def create_embed_token(**kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 191. + +*** + +### create\_guest\_token + +#### Signature + +```ruby +def create_guest_token(**kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 187. + +*** + +### create\_invite\_token + +#### Signature + +```ruby +def create_invite_token(**kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 183. + +*** + +### create\_subscriber\_token + +#### Signature + +```ruby +def create_subscriber_token(**kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 175. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(http) +``` + +#### Parameters + + + +#### Returns + +`FabricTokens` — a new instance of FabricTokens + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 171. + +*** + +### refresh\_subscriber\_token + +#### Signature + +```ruby +def refresh_subscriber_token(**kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 179. + +## Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 170. diff --git a/fern/products/sdk-reference/ruby/rest/namespaces/fax-logs/index.mdx b/fern/products/sdk-reference/ruby/rest/namespaces/fax-logs/index.mdx new file mode 100644 index 0000000000..c5939165ec --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/namespaces/fax-logs/index.mdx @@ -0,0 +1,74 @@ +--- +slug: "/reference/ruby/rest/namespaces/fax-logs" +title: "FaxLogs" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::FaxLogs" + parent: "SignalWire::REST::Namespaces" + module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/logs.rb" + visibility: "public" +--- +# `FaxLogs` + +Fax log queries. + +## Signature + +```ruby +class FaxLogs < SignalWire::REST::BaseResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/rest/base-resource) + +## Methods + +### get + +#### Signature + +```ruby +def get(log_id) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/logs.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/logs.rb) + +Line 25. + +*** + +### list + +#### Signature + +```ruby +def list(**params) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/logs.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/logs.rb) + +Line 24. + +## Source + +[`lib/signalwire/rest/namespaces/logs.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/logs.rb) + +Line 23. diff --git a/fern/products/sdk-reference/ruby/rest/namespaces/generic-resources/index.mdx b/fern/products/sdk-reference/ruby/rest/namespaces/generic-resources/index.mdx new file mode 100644 index 0000000000..3748c30a00 --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/namespaces/generic-resources/index.mdx @@ -0,0 +1,172 @@ +--- +slug: "/reference/ruby/rest/namespaces/generic-resources" +title: "GenericResources" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::GenericResources" + parent: "SignalWire::REST::Namespaces" + module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb" + visibility: "public" +--- +# `GenericResources` + +Generic resource operations across all fabric resource types. + +## Signature + +```ruby +class GenericResources < SignalWire::REST::BaseResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/rest/base-resource) + +## Methods + +### assign\_domain\_application + +#### Signature + +```ruby +def assign_domain_application(resource_id, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 153. + +*** + +### assign\_phone\_route + + + **Deprecated.** For the common binding cases use +phone\_numbers.set\_\*+ helpers. + + +This endpoint (+POST /api/fabric/resources/\{id\}/phone\_routes+) accepts +only a narrow set of legacy resource types as the attach target. It +_does not work_ for +swml\_webhook+ / +cxml\_webhook+ / +ai\_agent+ +bindings -- those are configured on the phone number and the Fabric +resource is auto-materialized (see +phone\_numbers.set\_swml\_webhook+ +etc.). The authoritative list of accepting resource types lives in +the OpenAPI spec; routing here for those types returns 404 or 422. + +#### Signature + +```ruby +def assign_phone_route(resource_id, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 141. + +*** + +### delete + +#### Signature + +```ruby +def delete(resource_id) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 124. + +*** + +### get + +#### Signature + +```ruby +def get(resource_id) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 120. + +*** + +### list + +#### Signature + +```ruby +def list(**params) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 116. + +*** + +### list\_addresses + +#### Signature + +```ruby +def list_addresses(resource_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 128. + +## Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 115. diff --git a/fern/products/sdk-reference/ruby/rest/namespaces/imported-numbers-resource/index.mdx b/fern/products/sdk-reference/ruby/rest/namespaces/imported-numbers-resource/index.mdx new file mode 100644 index 0000000000..57502a28f4 --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/namespaces/imported-numbers-resource/index.mdx @@ -0,0 +1,78 @@ +--- +slug: "/reference/ruby/rest/namespaces/imported-numbers-resource" +title: "ImportedNumbersResource" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::ImportedNumbersResource" + parent: "SignalWire::REST::Namespaces" + module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/imported_numbers.rb" + visibility: "public" +--- +# `ImportedNumbersResource` + +Import externally-hosted phone numbers. + +## Signature + +```ruby +class ImportedNumbersResource < SignalWire::REST::BaseResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/rest/base-resource) + +## Methods + +### create + +#### Signature + +```ruby +def create(**kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/imported_numbers.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/imported_numbers.rb) + +Line 12. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(http) +``` + +#### Parameters + + + +#### Returns + +`ImportedNumbersResource` — a new instance of ImportedNumbersResource + +#### Source + +[`lib/signalwire/rest/namespaces/imported_numbers.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/imported_numbers.rb) + +Line 8. + +## Source + +[`lib/signalwire/rest/namespaces/imported_numbers.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/imported_numbers.rb) + +Line 7. diff --git a/fern/products/sdk-reference/ruby/rest/namespaces/index.mdx b/fern/products/sdk-reference/ruby/rest/namespaces/index.mdx new file mode 100644 index 0000000000..3a5edca9ee --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/namespaces/index.mdx @@ -0,0 +1,280 @@ +--- +slug: "/reference/ruby/rest/namespaces" +title: "Namespaces" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "module" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces" + parent: "rest" + module: "rest" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/mfa.rb" + visibility: "public" +--- +# `Namespaces` + +## Signature + +```ruby +module Namespaces +``` + +## Classes + + + + Address management (no update endpoint). + + + + Fabric webhook resource that's normally auto-created by +phone\_numbers.set\_\*\_webhook+. Exposed for backwards compatibility. + + + + Call flows with version management. + + + + REST call control -- all 37 commands dispatched via single POST endpoint. + + + + Chat token generation. + + + + Compat account/subproject management. + + + + Compat application management. + + + + Compat call management with recording and stream sub-resources. + + + + Compat conference management. + + + + Compat fax management with media sub-resources. + + + + Compat cXML/LaML script management. + + + + Compat message management with media sub-resources. + + + + Twilio-compatible LAML API namespace. + + + + Compat phone number management. + + + + Compat queue management with members. + + + + Compat recording management. + + + + Compat API token management. + + + + Compat transcription management. + + + + Conference log queries. + + + + Conference rooms -- uses singular 'conference\_room' for sub-resource paths. + + + + cXML applications -- no create method. + + + + cXML webhooks -- auto-materialized by +phone\_numbers.set\_cxml\_webhook+. + + + + Document management with search and chunk operations. + + + + Datasphere API namespace. + + + + Read-only fabric addresses. + + + + Fabric API namespace grouping all resource types. + + + + Standard fabric resource with CRUD + addresses. Inherits the +list\_addresses+ helper from +CrudWithAddresses+ (matching Python's +FabricResource(CrudWithAddresses)+ hierarchy); subclasses that use a singular sub-resource path override +list\_addresses+ below. + + + + Fabric resource that uses PUT for updates. + + + + Subscriber, guest, invite, and embed token creation. + + + + Fax log queries. + + + + Generic resource operations across all fabric resource types. + + + + Import externally-hosted phone numbers. + + + + Logs API namespace. + + + + Phone number lookup (carrier, CNAM). + + + + Message log queries. + + + + Multi-factor authentication via SMS or phone call. + + + + Number group management with membership operations. + + + + Phone number management. + + + + Project API namespace. + + + + Project API token management. + + + + PubSub token generation. + + + + Queue management with member operations. + + + + Recording management (read-only + delete). + + + + 10DLC brand management. + + + + 10DLC campaign management. + + + + 10DLC Campaign Registry namespace. + + + + 10DLC number assignment management. + + + + 10DLC assignment order management. + + + + Short code management (read + update only). + + + + Project SIP profile (singleton resource). + + + + Subscribers with SIP endpoint management. + + + + SWML webhooks -- auto-materialized by +phone\_numbers.set\_swml\_webhook+. + + + + Verified caller ID management with verification flow. + + + + Video conference management with tokens and streams. + + + + Video conference token management. + + + + Video API namespace. + + + + Video room recording management. + + + + Video room management with streams. + + + + Video room session management. + + + + Video room token generation. + + + + Video stream management. + + + + Voice log queries. + + + +## Source + +[`lib/signalwire/rest/namespaces/mfa.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/mfa.rb) + +Line 5. diff --git a/fern/products/sdk-reference/ruby/rest/namespaces/logs-namespace/index.mdx b/fern/products/sdk-reference/ruby/rest/namespaces/logs-namespace/index.mdx new file mode 100644 index 0000000000..74ca575a8e --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/namespaces/logs-namespace/index.mdx @@ -0,0 +1,130 @@ +--- +slug: "/reference/ruby/rest/namespaces/logs-namespace" +title: "LogsNamespace" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::LogsNamespace" + parent: "SignalWire::REST::Namespaces" + module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/logs.rb" + visibility: "public" +--- +# `LogsNamespace` + +Logs API namespace. + +## Signature + +```ruby +class LogsNamespace < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### conferences + +Returns the value of attribute conferences. + +#### Signature + +```ruby +attr_reader conferences -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/logs.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/logs.rb) + +Line 35. + +*** + +### fax + +Returns the value of attribute fax. + +#### Signature + +```ruby +attr_reader fax -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/logs.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/logs.rb) + +Line 35. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(http) +``` + +#### Parameters + + + +#### Returns + +`LogsNamespace` — a new instance of LogsNamespace + +#### Source + +[`lib/signalwire/rest/namespaces/logs.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/logs.rb) + +Line 37. + +*** + +### messages + +Returns the value of attribute messages. + +#### Signature + +```ruby +attr_reader messages -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/logs.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/logs.rb) + +Line 35. + +*** + +### voice + +Returns the value of attribute voice. + +#### Signature + +```ruby +attr_reader voice -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/logs.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/logs.rb) + +Line 35. + +## Source + +[`lib/signalwire/rest/namespaces/logs.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/logs.rb) + +Line 34. diff --git a/fern/products/sdk-reference/ruby/rest/namespaces/lookup-resource/index.mdx b/fern/products/sdk-reference/ruby/rest/namespaces/lookup-resource/index.mdx new file mode 100644 index 0000000000..150987839c --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/namespaces/lookup-resource/index.mdx @@ -0,0 +1,80 @@ +--- +slug: "/reference/ruby/rest/namespaces/lookup-resource" +title: "LookupResource" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::LookupResource" + parent: "SignalWire::REST::Namespaces" + module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/lookup.rb" + visibility: "public" +--- +# `LookupResource` + +Phone number lookup (carrier, CNAM). + +## Signature + +```ruby +class LookupResource < SignalWire::REST::BaseResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/rest/base-resource) + +## Methods + +### initialize + +#### Signature + +```ruby +def initialize(http) +``` + +#### Parameters + + + +#### Returns + +`LookupResource` — a new instance of LookupResource + +#### Source + +[`lib/signalwire/rest/namespaces/lookup.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/lookup.rb) + +Line 8. + +*** + +### phone\_number + +#### Signature + +```ruby +def phone_number(e164, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/lookup.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/lookup.rb) + +Line 12. + +## Source + +[`lib/signalwire/rest/namespaces/lookup.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/lookup.rb) + +Line 7. diff --git a/fern/products/sdk-reference/ruby/rest/namespaces/message-logs/index.mdx b/fern/products/sdk-reference/ruby/rest/namespaces/message-logs/index.mdx new file mode 100644 index 0000000000..c671a3432a --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/namespaces/message-logs/index.mdx @@ -0,0 +1,74 @@ +--- +slug: "/reference/ruby/rest/namespaces/message-logs" +title: "MessageLogs" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::MessageLogs" + parent: "SignalWire::REST::Namespaces" + module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/logs.rb" + visibility: "public" +--- +# `MessageLogs` + +Message log queries. + +## Signature + +```ruby +class MessageLogs < SignalWire::REST::BaseResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/rest/base-resource) + +## Methods + +### get + +#### Signature + +```ruby +def get(log_id) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/logs.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/logs.rb) + +Line 9. + +*** + +### list + +#### Signature + +```ruby +def list(**params) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/logs.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/logs.rb) + +Line 8. + +## Source + +[`lib/signalwire/rest/namespaces/logs.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/logs.rb) + +Line 7. diff --git a/fern/products/sdk-reference/ruby/rest/namespaces/mfa-resource/index.mdx b/fern/products/sdk-reference/ruby/rest/namespaces/mfa-resource/index.mdx new file mode 100644 index 0000000000..484860cad3 --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/namespaces/mfa-resource/index.mdx @@ -0,0 +1,120 @@ +--- +slug: "/reference/ruby/rest/namespaces/mfa-resource" +title: "MfaResource" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::MfaResource" + parent: "SignalWire::REST::Namespaces" + module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/mfa.rb" + visibility: "public" +--- +# `MfaResource` + +Multi-factor authentication via SMS or phone call. + +## Signature + +```ruby +class MfaResource < SignalWire::REST::BaseResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/rest/base-resource) + +## Methods + +### call + +#### Signature + +```ruby +def call(**kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/mfa.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/mfa.rb) + +Line 16. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(http) +``` + +#### Parameters + + + +#### Returns + +`MfaResource` — a new instance of MfaResource + +#### Source + +[`lib/signalwire/rest/namespaces/mfa.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/mfa.rb) + +Line 8. + +*** + +### sms + +#### Signature + +```ruby +def sms(**kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/mfa.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/mfa.rb) + +Line 12. + +*** + +### verify + +#### Signature + +```ruby +def verify(request_id, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/mfa.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/mfa.rb) + +Line 20. + +## Source + +[`lib/signalwire/rest/namespaces/mfa.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/mfa.rb) + +Line 7. diff --git a/fern/products/sdk-reference/ruby/rest/namespaces/number-groups-resource/index.mdx b/fern/products/sdk-reference/ruby/rest/namespaces/number-groups-resource/index.mdx new file mode 100644 index 0000000000..22d164dae8 --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/namespaces/number-groups-resource/index.mdx @@ -0,0 +1,142 @@ +--- +slug: "/reference/ruby/rest/namespaces/number-groups-resource" +title: "NumberGroupsResource" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::NumberGroupsResource" + parent: "SignalWire::REST::Namespaces" + module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/number_groups.rb" + visibility: "public" +--- +# `NumberGroupsResource` + +Number group management with membership operations. + +## Signature + +```ruby +class NumberGroupsResource < SignalWire::REST::CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::CrudResource](/docs/sdk-reference/reference/ruby/rest/crud-resource) + +## Methods + +### add\_membership + +#### Signature + +```ruby +def add_membership(group_id, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/number_groups.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/number_groups.rb) + +Line 18. + +*** + +### delete\_membership + +#### Signature + +```ruby +def delete_membership(membership_id) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/number_groups.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/number_groups.rb) + +Line 26. + +*** + +### get\_membership + +#### Signature + +```ruby +def get_membership(membership_id) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/number_groups.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/number_groups.rb) + +Line 22. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(http) +``` + +#### Parameters + + + +#### Returns + +`NumberGroupsResource` — a new instance of NumberGroupsResource + +#### Source + +[`lib/signalwire/rest/namespaces/number_groups.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/number_groups.rb) + +Line 10. + +*** + +### list\_memberships + +#### Signature + +```ruby +def list_memberships(group_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/number_groups.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/number_groups.rb) + +Line 14. + +## Source + +[`lib/signalwire/rest/namespaces/number_groups.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/number_groups.rb) + +Line 7. diff --git a/fern/products/sdk-reference/ruby/rest/namespaces/phone-numbers-resource/index.mdx b/fern/products/sdk-reference/ruby/rest/namespaces/phone-numbers-resource/index.mdx new file mode 100644 index 0000000000..d5c6d5beec --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/namespaces/phone-numbers-resource/index.mdx @@ -0,0 +1,295 @@ +--- +slug: "/reference/ruby/rest/namespaces/phone-numbers-resource" +title: "PhoneNumbersResource" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::PhoneNumbersResource" + parent: "SignalWire::REST::Namespaces" + module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/phone_numbers.rb" + visibility: "public" +--- +# `PhoneNumbersResource` + +Phone number management. + +Supports the standard CRUD surface plus typed helpers for binding an +inbound call to a handler (SWML webhook, cXML webhook, AI agent, call +flow, RELAY application/topic). The binding model is: set ++call\_handler+ and the handler-specific companion field on the phone +number; the server auto-materializes the matching Fabric resource. +See +SignalWire::REST::PhoneCallHandler+ for the enum, and the +porting-sdk's +phone-binding.md+ for the full model. + +## Signature + +```ruby +class PhoneNumbersResource < SignalWire::REST::CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::CrudResource](/docs/sdk-reference/reference/ruby/rest/crud-resource) + +## Methods + +### initialize + +#### Signature + +```ruby +def initialize(http) +``` + +#### Parameters + + + +#### Returns + +`PhoneNumbersResource` — a new instance of PhoneNumbersResource + +#### Source + +[`lib/signalwire/rest/namespaces/phone_numbers.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/phone_numbers.rb) + +Line 20. + +*** + +### search + +#### Signature + +```ruby +def search(**params) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/phone_numbers.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/phone_numbers.rb) + +Line 24. + +*** + +### set\_ai\_agent + +Route inbound calls to an AI Agent Fabric resource by ID. + +#### Signature + +```ruby +def set_ai_agent(sid, agent_id:, **extra) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/phone_numbers.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/phone_numbers.rb) + +Line 80. + +*** + +### set\_call\_flow + +Route inbound calls to a Call Flow by ID. + ++version+ accepts +"working\_copy"+ or +"current\_deployed"+ (server +default when omitted). + +#### Signature + +```ruby +def set_call_flow(sid, flow_id:, version: nil, **extra) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/phone_numbers.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/phone_numbers.rb) + +Line 93. + +*** + +### set\_cxml\_application + +Route inbound calls to an existing cXML application by ID. + +#### Signature + +```ruby +def set_cxml_application(sid, application_id:, **extra) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/phone_numbers.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/phone_numbers.rb) + +Line 70. + +*** + +### set\_cxml\_webhook + +Route inbound calls to a cXML (Twilio-compat / LAML) webhook. + +Despite the wire value +laml\_webhooks+ being plural, this creates a +single +cxml\_webhook+ Fabric resource. +fallback\_url+ is used when +the primary URL fails; +status\_callback\_url+ receives call status +updates. + +#### Signature + +```ruby +def set_cxml_webhook(sid, url:, fallback_url: nil, status_callback_url: nil, **extra) +``` + +#### Parameters + + + + + + + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/phone_numbers.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/phone_numbers.rb) + +Line 59. + +*** + +### set\_relay\_application + +Route inbound calls to a named RELAY application. + +#### Signature + +```ruby +def set_relay_application(sid, name:, **extra) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/phone_numbers.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/phone_numbers.rb) + +Line 103. + +*** + +### set\_relay\_topic + +Route inbound calls to a RELAY topic (client subscription). + +#### Signature + +```ruby +def set_relay_topic(sid, topic:, status_callback_url: nil, **extra) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/phone_numbers.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/phone_numbers.rb) + +Line 113. + +*** + +### set\_swml\_webhook + +Route inbound calls to an SWML webhook URL. + +Your backend returns an SWML document per call. The server +auto-creates a +swml\_webhook+ Fabric resource keyed off this URL. + +#### Signature + +```ruby +def set_swml_webhook(sid, url:, **extra) +``` + +#### Parameters + + + the phone number SID (e.g. +pn-...+) + + + + + + additional fields passed to +update+ + + +#### Returns + +`Hash` — the updated phone number representation + +#### Source + +[`lib/signalwire/rest/namespaces/phone_numbers.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/phone_numbers.rb) + +Line 44. + +## Source + +[`lib/signalwire/rest/namespaces/phone_numbers.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/phone_numbers.rb) + +Line 17. diff --git a/fern/products/sdk-reference/ruby/rest/namespaces/project-namespace/index.mdx b/fern/products/sdk-reference/ruby/rest/namespaces/project-namespace/index.mdx new file mode 100644 index 0000000000..0a4ed4f71c --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/namespaces/project-namespace/index.mdx @@ -0,0 +1,76 @@ +--- +slug: "/reference/ruby/rest/namespaces/project-namespace" +title: "ProjectNamespace" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::ProjectNamespace" + parent: "SignalWire::REST::Namespaces" + module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/project.rb" + visibility: "public" +--- +# `ProjectNamespace` + +Project API namespace. + +## Signature + +```ruby +class ProjectNamespace < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### initialize + +#### Signature + +```ruby +def initialize(http) +``` + +#### Parameters + + + +#### Returns + +`ProjectNamespace` — a new instance of ProjectNamespace + +#### Source + +[`lib/signalwire/rest/namespaces/project.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/project.rb) + +Line 27. + +*** + +### tokens + +Returns the value of attribute tokens. + +#### Signature + +```ruby +attr_reader tokens -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/project.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/project.rb) + +Line 25. + +## Source + +[`lib/signalwire/rest/namespaces/project.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/project.rb) + +Line 24. diff --git a/fern/products/sdk-reference/ruby/rest/namespaces/project-tokens/index.mdx b/fern/products/sdk-reference/ruby/rest/namespaces/project-tokens/index.mdx new file mode 100644 index 0000000000..5bd9bda35d --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/namespaces/project-tokens/index.mdx @@ -0,0 +1,120 @@ +--- +slug: "/reference/ruby/rest/namespaces/project-tokens" +title: "ProjectTokens" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::ProjectTokens" + parent: "SignalWire::REST::Namespaces" + module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/project.rb" + visibility: "public" +--- +# `ProjectTokens` + +Project API token management. + +## Signature + +```ruby +class ProjectTokens < SignalWire::REST::BaseResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/rest/base-resource) + +## Methods + +### create + +#### Signature + +```ruby +def create(**kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/project.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/project.rb) + +Line 12. + +*** + +### delete + +#### Signature + +```ruby +def delete(token_id) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/project.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/project.rb) + +Line 18. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(http) +``` + +#### Parameters + + + +#### Returns + +`ProjectTokens` — a new instance of ProjectTokens + +#### Source + +[`lib/signalwire/rest/namespaces/project.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/project.rb) + +Line 8. + +*** + +### update + +#### Signature + +```ruby +def update(token_id, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/project.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/project.rb) + +Line 14. + +## Source + +[`lib/signalwire/rest/namespaces/project.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/project.rb) + +Line 7. diff --git a/fern/products/sdk-reference/ruby/rest/namespaces/pub-sub-resource/index.mdx b/fern/products/sdk-reference/ruby/rest/namespaces/pub-sub-resource/index.mdx new file mode 100644 index 0000000000..d549f5c506 --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/namespaces/pub-sub-resource/index.mdx @@ -0,0 +1,78 @@ +--- +slug: "/reference/ruby/rest/namespaces/pub-sub-resource" +title: "PubSubResource" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::PubSubResource" + parent: "SignalWire::REST::Namespaces" + module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/pubsub.rb" + visibility: "public" +--- +# `PubSubResource` + +PubSub token generation. + +## Signature + +```ruby +class PubSubResource < SignalWire::REST::BaseResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/rest/base-resource) + +## Methods + +### create\_token + +#### Signature + +```ruby +def create_token(**kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/pubsub.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/pubsub.rb) + +Line 12. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(http) +``` + +#### Parameters + + + +#### Returns + +`PubSubResource` — a new instance of PubSubResource + +#### Source + +[`lib/signalwire/rest/namespaces/pubsub.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/pubsub.rb) + +Line 8. + +## Source + +[`lib/signalwire/rest/namespaces/pubsub.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/pubsub.rb) + +Line 7. diff --git a/fern/products/sdk-reference/ruby/rest/namespaces/queues-resource/index.mdx b/fern/products/sdk-reference/ruby/rest/namespaces/queues-resource/index.mdx new file mode 100644 index 0000000000..1e61b8b76b --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/namespaces/queues-resource/index.mdx @@ -0,0 +1,122 @@ +--- +slug: "/reference/ruby/rest/namespaces/queues-resource" +title: "QueuesResource" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::QueuesResource" + parent: "SignalWire::REST::Namespaces" + module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/queues.rb" + visibility: "public" +--- +# `QueuesResource` + +Queue management with member operations. + +## Signature + +```ruby +class QueuesResource < SignalWire::REST::CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::CrudResource](/docs/sdk-reference/reference/ruby/rest/crud-resource) + +## Methods + +### get\_member + +#### Signature + +```ruby +def get_member(queue_id, member_id) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/queues.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/queues.rb) + +Line 22. + +*** + +### get\_next\_member + +#### Signature + +```ruby +def get_next_member(queue_id) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/queues.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/queues.rb) + +Line 18. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(http) +``` + +#### Parameters + + + +#### Returns + +`QueuesResource` — a new instance of QueuesResource + +#### Source + +[`lib/signalwire/rest/namespaces/queues.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/queues.rb) + +Line 10. + +*** + +### list\_members + +#### Signature + +```ruby +def list_members(queue_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/queues.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/queues.rb) + +Line 14. + +## Source + +[`lib/signalwire/rest/namespaces/queues.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/queues.rb) + +Line 7. diff --git a/fern/products/sdk-reference/ruby/rest/namespaces/recordings-resource/index.mdx b/fern/products/sdk-reference/ruby/rest/namespaces/recordings-resource/index.mdx new file mode 100644 index 0000000000..1856675b01 --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/namespaces/recordings-resource/index.mdx @@ -0,0 +1,118 @@ +--- +slug: "/reference/ruby/rest/namespaces/recordings-resource" +title: "RecordingsResource" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::RecordingsResource" + parent: "SignalWire::REST::Namespaces" + module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/recordings.rb" + visibility: "public" +--- +# `RecordingsResource` + +Recording management (read-only + delete). + +## Signature + +```ruby +class RecordingsResource < SignalWire::REST::BaseResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/rest/base-resource) + +## Methods + +### delete + +#### Signature + +```ruby +def delete(recording_id) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/recordings.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/recordings.rb) + +Line 14. + +*** + +### get + +#### Signature + +```ruby +def get(recording_id) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/recordings.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/recordings.rb) + +Line 13. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(http) +``` + +#### Parameters + + + +#### Returns + +`RecordingsResource` — a new instance of RecordingsResource + +#### Source + +[`lib/signalwire/rest/namespaces/recordings.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/recordings.rb) + +Line 8. + +*** + +### list + +#### Signature + +```ruby +def list(**params) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/recordings.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/recordings.rb) + +Line 12. + +## Source + +[`lib/signalwire/rest/namespaces/recordings.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/recordings.rb) + +Line 7. diff --git a/fern/products/sdk-reference/ruby/rest/namespaces/registry-brands/index.mdx b/fern/products/sdk-reference/ruby/rest/namespaces/registry-brands/index.mdx new file mode 100644 index 0000000000..23dc15ab84 --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/namespaces/registry-brands/index.mdx @@ -0,0 +1,138 @@ +--- +slug: "/reference/ruby/rest/namespaces/registry-brands" +title: "RegistryBrands" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::RegistryBrands" + parent: "SignalWire::REST::Namespaces" + module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb" + visibility: "public" +--- +# `RegistryBrands` + +10DLC brand management. + +## Signature + +```ruby +class RegistryBrands < SignalWire::REST::BaseResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/rest/base-resource) + +## Methods + +### create + +#### Signature + +```ruby +def create(**kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb) + +Line 9. + +*** + +### create\_campaign + +#### Signature + +```ruby +def create_campaign(brand_id, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb) + +Line 16. + +*** + +### get + +#### Signature + +```ruby +def get(brand_id) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb) + +Line 10. + +*** + +### list + +#### Signature + +```ruby +def list(**params) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb) + +Line 8. + +*** + +### list\_campaigns + +#### Signature + +```ruby +def list_campaigns(brand_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb) + +Line 12. + +## Source + +[`lib/signalwire/rest/namespaces/registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb) + +Line 7. diff --git a/fern/products/sdk-reference/ruby/rest/namespaces/registry-campaigns/index.mdx b/fern/products/sdk-reference/ruby/rest/namespaces/registry-campaigns/index.mdx new file mode 100644 index 0000000000..a9d8b4130f --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/namespaces/registry-campaigns/index.mdx @@ -0,0 +1,142 @@ +--- +slug: "/reference/ruby/rest/namespaces/registry-campaigns" +title: "RegistryCampaigns" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::RegistryCampaigns" + parent: "SignalWire::REST::Namespaces" + module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb" + visibility: "public" +--- +# `RegistryCampaigns` + +10DLC campaign management. + +## Signature + +```ruby +class RegistryCampaigns < SignalWire::REST::BaseResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/rest/base-resource) + +## Methods + +### create\_order + +#### Signature + +```ruby +def create_order(campaign_id, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb) + +Line 34. + +*** + +### get + +#### Signature + +```ruby +def get(campaign_id) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb) + +Line 23. + +*** + +### list\_numbers + +#### Signature + +```ruby +def list_numbers(campaign_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb) + +Line 26. + +*** + +### list\_orders + +#### Signature + +```ruby +def list_orders(campaign_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb) + +Line 30. + +*** + +### update + +#### Signature + +```ruby +def update(campaign_id, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb) + +Line 24. + +## Source + +[`lib/signalwire/rest/namespaces/registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb) + +Line 22. diff --git a/fern/products/sdk-reference/ruby/rest/namespaces/registry-namespace/index.mdx b/fern/products/sdk-reference/ruby/rest/namespaces/registry-namespace/index.mdx new file mode 100644 index 0000000000..8f96a571b6 --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/namespaces/registry-namespace/index.mdx @@ -0,0 +1,130 @@ +--- +slug: "/reference/ruby/rest/namespaces/registry-namespace" +title: "RegistryNamespace" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::RegistryNamespace" + parent: "SignalWire::REST::Namespaces" + module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb" + visibility: "public" +--- +# `RegistryNamespace` + +10DLC Campaign Registry namespace. + +## Signature + +```ruby +class RegistryNamespace < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### brands + +Returns the value of attribute brands. + +#### Signature + +```ruby +attr_reader brands -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb) + +Line 55. + +*** + +### campaigns + +Returns the value of attribute campaigns. + +#### Signature + +```ruby +attr_reader campaigns -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb) + +Line 55. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(http) +``` + +#### Parameters + + + +#### Returns + +`RegistryNamespace` — a new instance of RegistryNamespace + +#### Source + +[`lib/signalwire/rest/namespaces/registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb) + +Line 57. + +*** + +### numbers + +Returns the value of attribute numbers. + +#### Signature + +```ruby +attr_reader numbers -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb) + +Line 55. + +*** + +### orders + +Returns the value of attribute orders. + +#### Signature + +```ruby +attr_reader orders -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb) + +Line 55. + +## Source + +[`lib/signalwire/rest/namespaces/registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb) + +Line 54. diff --git a/fern/products/sdk-reference/ruby/rest/namespaces/registry-numbers/index.mdx b/fern/products/sdk-reference/ruby/rest/namespaces/registry-numbers/index.mdx new file mode 100644 index 0000000000..2b20e26c7a --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/namespaces/registry-numbers/index.mdx @@ -0,0 +1,54 @@ +--- +slug: "/reference/ruby/rest/namespaces/registry-numbers" +title: "RegistryNumbers" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::RegistryNumbers" + parent: "SignalWire::REST::Namespaces" + module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb" + visibility: "public" +--- +# `RegistryNumbers` + +10DLC number assignment management. + +## Signature + +```ruby +class RegistryNumbers < SignalWire::REST::BaseResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/rest/base-resource) + +## Methods + +### delete + +#### Signature + +```ruby +def delete(number_id) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb) + +Line 48. + +## Source + +[`lib/signalwire/rest/namespaces/registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb) + +Line 47. diff --git a/fern/products/sdk-reference/ruby/rest/namespaces/registry-orders/index.mdx b/fern/products/sdk-reference/ruby/rest/namespaces/registry-orders/index.mdx new file mode 100644 index 0000000000..2560ae9f5c --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/namespaces/registry-orders/index.mdx @@ -0,0 +1,54 @@ +--- +slug: "/reference/ruby/rest/namespaces/registry-orders" +title: "RegistryOrders" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::RegistryOrders" + parent: "SignalWire::REST::Namespaces" + module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb" + visibility: "public" +--- +# `RegistryOrders` + +10DLC assignment order management. + +## Signature + +```ruby +class RegistryOrders < SignalWire::REST::BaseResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/rest/base-resource) + +## Methods + +### get + +#### Signature + +```ruby +def get(order_id) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb) + +Line 41. + +## Source + +[`lib/signalwire/rest/namespaces/registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb) + +Line 40. diff --git a/fern/products/sdk-reference/ruby/rest/namespaces/short-codes-resource/index.mdx b/fern/products/sdk-reference/ruby/rest/namespaces/short-codes-resource/index.mdx new file mode 100644 index 0000000000..592ee92402 --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/namespaces/short-codes-resource/index.mdx @@ -0,0 +1,120 @@ +--- +slug: "/reference/ruby/rest/namespaces/short-codes-resource" +title: "ShortCodesResource" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::ShortCodesResource" + parent: "SignalWire::REST::Namespaces" + module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/short_codes.rb" + visibility: "public" +--- +# `ShortCodesResource` + +Short code management (read + update only). + +## Signature + +```ruby +class ShortCodesResource < SignalWire::REST::BaseResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/rest/base-resource) + +## Methods + +### get + +#### Signature + +```ruby +def get(short_code_id) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/short_codes.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/short_codes.rb) + +Line 16. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(http) +``` + +#### Parameters + + + +#### Returns + +`ShortCodesResource` — a new instance of ShortCodesResource + +#### Source + +[`lib/signalwire/rest/namespaces/short_codes.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/short_codes.rb) + +Line 8. + +*** + +### list + +#### Signature + +```ruby +def list(**params) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/short_codes.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/short_codes.rb) + +Line 12. + +*** + +### update + +#### Signature + +```ruby +def update(short_code_id, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/short_codes.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/short_codes.rb) + +Line 20. + +## Source + +[`lib/signalwire/rest/namespaces/short_codes.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/short_codes.rb) + +Line 7. diff --git a/fern/products/sdk-reference/ruby/rest/namespaces/sip-profile-resource/index.mdx b/fern/products/sdk-reference/ruby/rest/namespaces/sip-profile-resource/index.mdx new file mode 100644 index 0000000000..599935fee6 --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/namespaces/sip-profile-resource/index.mdx @@ -0,0 +1,94 @@ +--- +slug: "/reference/ruby/rest/namespaces/sip-profile-resource" +title: "SipProfileResource" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::SipProfileResource" + parent: "SignalWire::REST::Namespaces" + module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/sip_profile.rb" + visibility: "public" +--- +# `SipProfileResource` + +Project SIP profile (singleton resource). + +## Signature + +```ruby +class SipProfileResource < SignalWire::REST::BaseResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/rest/base-resource) + +## Methods + +### get + +#### Signature + +```ruby +def get +``` + +#### Source + +[`lib/signalwire/rest/namespaces/sip_profile.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/sip_profile.rb) + +Line 12. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(http) +``` + +#### Parameters + + + +#### Returns + +`SipProfileResource` — a new instance of SipProfileResource + +#### Source + +[`lib/signalwire/rest/namespaces/sip_profile.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/sip_profile.rb) + +Line 8. + +*** + +### update + +#### Signature + +```ruby +def update(**kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/sip_profile.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/sip_profile.rb) + +Line 16. + +## Source + +[`lib/signalwire/rest/namespaces/sip_profile.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/sip_profile.rb) + +Line 7. diff --git a/fern/products/sdk-reference/ruby/rest/namespaces/subscribers-resource/index.mdx b/fern/products/sdk-reference/ruby/rest/namespaces/subscribers-resource/index.mdx new file mode 100644 index 0000000000..3288963eb2 --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/namespaces/subscribers-resource/index.mdx @@ -0,0 +1,146 @@ +--- +slug: "/reference/ruby/rest/namespaces/subscribers-resource" +title: "SubscribersResource" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::SubscribersResource" + parent: "SignalWire::REST::Namespaces" + module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb" + visibility: "public" +--- +# `SubscribersResource` + +Subscribers with SIP endpoint management. + +## Signature + +```ruby +class SubscribersResource < SignalWire::REST::Namespaces::FabricResourcePUT +``` + +## Inheritance + +**Extends:** [SignalWire::REST::Namespaces::FabricResourcePUT](/docs/sdk-reference/reference/ruby/rest/namespaces/fabric-resource-put) + +## Methods + +### create\_sip\_endpoint + +#### Signature + +```ruby +def create_sip_endpoint(subscriber_id, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 90. + +*** + +### delete\_sip\_endpoint + +#### Signature + +```ruby +def delete_sip_endpoint(subscriber_id, endpoint_id) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 102. + +*** + +### get\_sip\_endpoint + +#### Signature + +```ruby +def get_sip_endpoint(subscriber_id, endpoint_id) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 94. + +*** + +### list\_sip\_endpoints + +#### Signature + +```ruby +def list_sip_endpoints(subscriber_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 86. + +*** + +### update\_sip\_endpoint + +#### Signature + +```ruby +def update_sip_endpoint(subscriber_id, endpoint_id, **kwargs) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 98. + +## Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 85. diff --git a/fern/products/sdk-reference/ruby/rest/namespaces/swml-webhooks-resource/index.mdx b/fern/products/sdk-reference/ruby/rest/namespaces/swml-webhooks-resource/index.mdx new file mode 100644 index 0000000000..b8faa5cda4 --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/namespaces/swml-webhooks-resource/index.mdx @@ -0,0 +1,38 @@ +--- +slug: "/reference/ruby/rest/namespaces/swml-webhooks-resource" +title: "SwmlWebhooksResource" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::SwmlWebhooksResource" + parent: "SignalWire::REST::Namespaces" + module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb" + visibility: "public" +--- +# `SwmlWebhooksResource` + +SWML webhooks -- auto-materialized by +phone\_numbers.set\_swml\_webhook+. + +## Signature + +```ruby +class SwmlWebhooksResource < SignalWire::REST::Namespaces::AutoMaterializedWebhook +``` + +## Inheritance + +**Extends:** [SignalWire::REST::Namespaces::AutoMaterializedWebhook](/docs/sdk-reference/reference/ruby/rest/namespaces/auto-materialized-webhook) + +## Constants + + + +## Source + +[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) + +Line 49. diff --git a/fern/products/sdk-reference/ruby/rest/namespaces/verified-callers-resource/index.mdx b/fern/products/sdk-reference/ruby/rest/namespaces/verified-callers-resource/index.mdx new file mode 100644 index 0000000000..b477241662 --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/namespaces/verified-callers-resource/index.mdx @@ -0,0 +1,100 @@ +--- +slug: "/reference/ruby/rest/namespaces/verified-callers-resource" +title: "VerifiedCallersResource" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::VerifiedCallersResource" + parent: "SignalWire::REST::Namespaces" + module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/verified_callers.rb" + visibility: "public" +--- +# `VerifiedCallersResource` + +Verified caller ID management with verification flow. + +## Signature + +```ruby +class VerifiedCallersResource < SignalWire::REST::CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::CrudResource](/docs/sdk-reference/reference/ruby/rest/crud-resource) + +## Methods + +### initialize + +#### Signature + +```ruby +def initialize(http) +``` + +#### Parameters + + + +#### Returns + +`VerifiedCallersResource` — a new instance of VerifiedCallersResource + +#### Source + +[`lib/signalwire/rest/namespaces/verified_callers.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/verified_callers.rb) + +Line 10. + +*** + +### redial\_verification + +#### Signature + +```ruby +def redial_verification(caller_id) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/verified_callers.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/verified_callers.rb) + +Line 14. + +*** + +### submit\_verification + +#### Signature + +```ruby +def submit_verification(caller_id, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/verified_callers.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/verified_callers.rb) + +Line 18. + +## Source + +[`lib/signalwire/rest/namespaces/verified_callers.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/verified_callers.rb) + +Line 7. diff --git a/fern/products/sdk-reference/ruby/rest/namespaces/video-conference-tokens/index.mdx b/fern/products/sdk-reference/ruby/rest/namespaces/video-conference-tokens/index.mdx new file mode 100644 index 0000000000..103523d2d9 --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/namespaces/video-conference-tokens/index.mdx @@ -0,0 +1,74 @@ +--- +slug: "/reference/ruby/rest/namespaces/video-conference-tokens" +title: "VideoConferenceTokens" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::VideoConferenceTokens" + parent: "SignalWire::REST::Namespaces" + module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb" + visibility: "public" +--- +# `VideoConferenceTokens` + +Video conference token management. + +## Signature + +```ruby +class VideoConferenceTokens < SignalWire::REST::BaseResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/rest/base-resource) + +## Methods + +### get + +#### Signature + +```ruby +def get(token_id) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 87. + +*** + +### reset + +#### Signature + +```ruby +def reset(token_id) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 91. + +## Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 86. diff --git a/fern/products/sdk-reference/ruby/rest/namespaces/video-conferences/index.mdx b/fern/products/sdk-reference/ruby/rest/namespaces/video-conferences/index.mdx new file mode 100644 index 0000000000..db17cd010a --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/namespaces/video-conferences/index.mdx @@ -0,0 +1,100 @@ +--- +slug: "/reference/ruby/rest/namespaces/video-conferences" +title: "VideoConferences" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::VideoConferences" + parent: "SignalWire::REST::Namespaces" + module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb" + visibility: "public" +--- +# `VideoConferences` + +Video conference management with tokens and streams. + +## Signature + +```ruby +class VideoConferences < SignalWire::REST::CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::CrudResource](/docs/sdk-reference/reference/ruby/rest/crud-resource) + +## Methods + +### create\_stream + +#### Signature + +```ruby +def create_stream(conference_id, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 80. + +*** + +### list\_conference\_tokens + +#### Signature + +```ruby +def list_conference_tokens(conference_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 72. + +*** + +### list\_streams + +#### Signature + +```ruby +def list_streams(conference_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 76. + +## Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 69. diff --git a/fern/products/sdk-reference/ruby/rest/namespaces/video-namespace/index.mdx b/fern/products/sdk-reference/ruby/rest/namespaces/video-namespace/index.mdx new file mode 100644 index 0000000000..76807a1a50 --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/namespaces/video-namespace/index.mdx @@ -0,0 +1,184 @@ +--- +slug: "/reference/ruby/rest/namespaces/video-namespace" +title: "VideoNamespace" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::VideoNamespace" + parent: "SignalWire::REST::Namespaces" + module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb" + visibility: "public" +--- +# `VideoNamespace` + +Video API namespace. + +## Signature + +```ruby +class VideoNamespace < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### conference\_tokens + +Returns the value of attribute conference\_tokens. + +#### Signature + +```ruby +attr_reader conference_tokens -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 113. + +*** + +### conferences + +Returns the value of attribute conferences. + +#### Signature + +```ruby +attr_reader conferences -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 113. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(http) +``` + +#### Parameters + + + +#### Returns + +`VideoNamespace` — a new instance of VideoNamespace + +#### Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 116. + +*** + +### room\_recordings + +Returns the value of attribute room\_recordings. + +#### Signature + +```ruby +attr_reader room_recordings -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 113. + +*** + +### room\_sessions + +Returns the value of attribute room\_sessions. + +#### Signature + +```ruby +attr_reader room_sessions -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 113. + +*** + +### room\_tokens + +Returns the value of attribute room\_tokens. + +#### Signature + +```ruby +attr_reader room_tokens -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 113. + +*** + +### rooms + +Returns the value of attribute rooms. + +#### Signature + +```ruby +attr_reader rooms -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 113. + +*** + +### streams + +Returns the value of attribute streams. + +#### Signature + +```ruby +attr_reader streams -> Object +``` + +#### Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 113. + +## Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 112. diff --git a/fern/products/sdk-reference/ruby/rest/namespaces/video-room-recordings/index.mdx b/fern/products/sdk-reference/ruby/rest/namespaces/video-room-recordings/index.mdx new file mode 100644 index 0000000000..b1f117044c --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/namespaces/video-room-recordings/index.mdx @@ -0,0 +1,116 @@ +--- +slug: "/reference/ruby/rest/namespaces/video-room-recordings" +title: "VideoRoomRecordings" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::VideoRoomRecordings" + parent: "SignalWire::REST::Namespaces" + module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb" + visibility: "public" +--- +# `VideoRoomRecordings` + +Video room recording management. + +## Signature + +```ruby +class VideoRoomRecordings < SignalWire::REST::BaseResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/rest/base-resource) + +## Methods + +### delete + +#### Signature + +```ruby +def delete(recording_id) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 59. + +*** + +### get + +#### Signature + +```ruby +def get(recording_id) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 55. + +*** + +### list + +#### Signature + +```ruby +def list(**params) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 51. + +*** + +### list\_events + +#### Signature + +```ruby +def list_events(recording_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 63. + +## Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 50. diff --git a/fern/products/sdk-reference/ruby/rest/namespaces/video-room-sessions/index.mdx b/fern/products/sdk-reference/ruby/rest/namespaces/video-room-sessions/index.mdx new file mode 100644 index 0000000000..4d97d1275f --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/namespaces/video-room-sessions/index.mdx @@ -0,0 +1,140 @@ +--- +slug: "/reference/ruby/rest/namespaces/video-room-sessions" +title: "VideoRoomSessions" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::VideoRoomSessions" + parent: "SignalWire::REST::Namespaces" + module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb" + visibility: "public" +--- +# `VideoRoomSessions` + +Video room session management. + +## Signature + +```ruby +class VideoRoomSessions < SignalWire::REST::BaseResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/rest/base-resource) + +## Methods + +### get + +#### Signature + +```ruby +def get(session_id) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 32. + +*** + +### list + +#### Signature + +```ruby +def list(**params) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 28. + +*** + +### list\_events + +#### Signature + +```ruby +def list_events(session_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 36. + +*** + +### list\_members + +#### Signature + +```ruby +def list_members(session_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 40. + +*** + +### list\_recordings + +#### Signature + +```ruby +def list_recordings(session_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 44. + +## Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 27. diff --git a/fern/products/sdk-reference/ruby/rest/namespaces/video-room-tokens/index.mdx b/fern/products/sdk-reference/ruby/rest/namespaces/video-room-tokens/index.mdx new file mode 100644 index 0000000000..0aa7b1b539 --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/namespaces/video-room-tokens/index.mdx @@ -0,0 +1,54 @@ +--- +slug: "/reference/ruby/rest/namespaces/video-room-tokens" +title: "VideoRoomTokens" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::VideoRoomTokens" + parent: "SignalWire::REST::Namespaces" + module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb" + visibility: "public" +--- +# `VideoRoomTokens` + +Video room token generation. + +## Signature + +```ruby +class VideoRoomTokens < SignalWire::REST::BaseResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/rest/base-resource) + +## Methods + +### create + +#### Signature + +```ruby +def create(**kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 21. + +## Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 20. diff --git a/fern/products/sdk-reference/ruby/rest/namespaces/video-rooms/index.mdx b/fern/products/sdk-reference/ruby/rest/namespaces/video-rooms/index.mdx new file mode 100644 index 0000000000..df57babdd5 --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/namespaces/video-rooms/index.mdx @@ -0,0 +1,78 @@ +--- +slug: "/reference/ruby/rest/namespaces/video-rooms" +title: "VideoRooms" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::VideoRooms" + parent: "SignalWire::REST::Namespaces" + module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb" + visibility: "public" +--- +# `VideoRooms` + +Video room management with streams. + +## Signature + +```ruby +class VideoRooms < SignalWire::REST::CrudResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::CrudResource](/docs/sdk-reference/reference/ruby/rest/crud-resource) + +## Methods + +### create\_stream + +#### Signature + +```ruby +def create_stream(room_id, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 14. + +*** + +### list\_streams + +#### Signature + +```ruby +def list_streams(room_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 10. + +## Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 7. diff --git a/fern/products/sdk-reference/ruby/rest/namespaces/video-streams/index.mdx b/fern/products/sdk-reference/ruby/rest/namespaces/video-streams/index.mdx new file mode 100644 index 0000000000..aa2a5e5a77 --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/namespaces/video-streams/index.mdx @@ -0,0 +1,96 @@ +--- +slug: "/reference/ruby/rest/namespaces/video-streams" +title: "VideoStreams" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::VideoStreams" + parent: "SignalWire::REST::Namespaces" + module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb" + visibility: "public" +--- +# `VideoStreams` + +Video stream management. + +## Signature + +```ruby +class VideoStreams < SignalWire::REST::BaseResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/rest/base-resource) + +## Methods + +### delete + +#### Signature + +```ruby +def delete(stream_id) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 106. + +*** + +### get + +#### Signature + +```ruby +def get(stream_id) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 98. + +*** + +### update + +#### Signature + +```ruby +def update(stream_id, **kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 102. + +## Source + +[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) + +Line 97. diff --git a/fern/products/sdk-reference/ruby/rest/namespaces/voice-logs/index.mdx b/fern/products/sdk-reference/ruby/rest/namespaces/voice-logs/index.mdx new file mode 100644 index 0000000000..41f87f077b --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/namespaces/voice-logs/index.mdx @@ -0,0 +1,96 @@ +--- +slug: "/reference/ruby/rest/namespaces/voice-logs" +title: "VoiceLogs" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::Namespaces::VoiceLogs" + parent: "SignalWire::REST::Namespaces" + module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/logs.rb" + visibility: "public" +--- +# `VoiceLogs` + +Voice log queries. + +## Signature + +```ruby +class VoiceLogs < SignalWire::REST::BaseResource +``` + +## Inheritance + +**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/rest/base-resource) + +## Methods + +### get + +#### Signature + +```ruby +def get(log_id) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/logs.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/logs.rb) + +Line 15. + +*** + +### list + +#### Signature + +```ruby +def list(**params) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/rest/namespaces/logs.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/logs.rb) + +Line 14. + +*** + +### list\_events + +#### Signature + +```ruby +def list_events(log_id, **params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/signalwire/rest/namespaces/logs.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/logs.rb) + +Line 17. + +## Source + +[`lib/signalwire/rest/namespaces/logs.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/logs.rb) + +Line 13. diff --git a/fern/products/sdk-reference/ruby/rest/paginated-iterator/index.mdx b/fern/products/sdk-reference/ruby/rest/paginated-iterator/index.mdx new file mode 100644 index 0000000000..1ff4ed452b --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/paginated-iterator/index.mdx @@ -0,0 +1,283 @@ +--- +slug: "/reference/ruby/rest/paginated-iterator" +title: "PaginatedIterator" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::PaginatedIterator" + parent: "rest" + module: "rest" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/pagination.rb" + visibility: "public" +--- +# `PaginatedIterator` + +Iterates items across paginated API responses. + +Mirrors the Python PaginatedIterator (signalwire.rest.\_pagination): +the constructor records http/path/params/data\_key without fetching; +iteration walks pages by following the +links.next+ cursor. + +Usage: +iter = SignalWire::REST::PaginatedIterator.new(http, '/api/path', +params: \{\}, data\_key: 'data') +iter.each \{ |item| ... \} + +The iterator is single-pass (matching Python's **next** semantics); +use #to\_a to collect every item across all pages. + +## Signature + +```ruby +class PaginatedIterator < Object +``` + +## Inheritance + +**Extends:** `Object` + +**Mixins:** `Enumerable` + +## Methods + +### \_\_iter\_\_ + +Equivalent of Python's +**iter**+: returns the iterator itself. + +#### Signature + +```ruby +def __iter__ +``` + +#### Source + +[`lib/signalwire/rest/pagination.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/pagination.rb) + +Line 52. + +*** + +### \_\_next\_\_ + +Equivalent of Python's +**next**+: returns the next item across pages, +raising +StopIteration+ when the iterator is exhausted (mirroring +Python's raise-StopIteration contract rather than the +:**stop**+ +sentinel used internally by +#each+). + +#### Signature + +```ruby +def __next__ +``` + +#### Throws + +- `StopIteration` + +#### Source + +[`lib/signalwire/rest/pagination.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/pagination.rb) + +Line 60. + +*** + +### data\_key + +Returns the value of attribute data\_key. + +#### Signature + +```ruby +attr_reader data_key -> Object +``` + +#### Source + +[`lib/signalwire/rest/pagination.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/pagination.rb) + +Line 21. + +*** + +### done + +Returns the value of attribute done. + +#### Signature + +```ruby +attr_reader done -> Object +``` + +#### Source + +[`lib/signalwire/rest/pagination.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/pagination.rb) + +Line 21. + +*** + +### each + +#### Signature + +```ruby +def each +``` + +#### Source + +[`lib/signalwire/rest/pagination.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/pagination.rb) + +Line 34. + +*** + +### http + +Returns the value of attribute http. + +#### Signature + +```ruby +attr_reader http -> Object +``` + +#### Source + +[`lib/signalwire/rest/pagination.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/pagination.rb) + +Line 21. + +*** + +### index + +Returns the value of attribute index. + +#### Signature + +```ruby +attr_reader index -> Object +``` + +#### Source + +[`lib/signalwire/rest/pagination.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/pagination.rb) + +Line 21. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(http, path, params = nil, data_key = 'data') +``` + +#### Parameters + + + + + + + + + +#### Returns + +`PaginatedIterator` — a new instance of PaginatedIterator + +#### Source + +[`lib/signalwire/rest/pagination.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/pagination.rb) + +Line 23. + +*** + +### items + +Returns the value of attribute items. + +#### Signature + +```ruby +attr_reader items -> Object +``` + +#### Source + +[`lib/signalwire/rest/pagination.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/pagination.rb) + +Line 21. + +*** + +### next\_item + +Equivalent of Python's **next**. Returns the sentinel +:**stop**+ +when exhausted (Ruby has no StopIteration error idiom for plain +Enumerable), but the public surface is +#each+. + +#### Signature + +```ruby +def next_item +``` + +#### Source + +[`lib/signalwire/rest/pagination.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/pagination.rb) + +Line 70. + +*** + +### params + +Returns the value of attribute params. + +#### Signature + +```ruby +attr_reader params -> Object +``` + +#### Source + +[`lib/signalwire/rest/pagination.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/pagination.rb) + +Line 21. + +*** + +### path + +Returns the value of attribute path. + +#### Signature + +```ruby +attr_reader path -> Object +``` + +#### Source + +[`lib/signalwire/rest/pagination.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/pagination.rb) + +Line 21. + +## Source + +[`lib/signalwire/rest/pagination.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/pagination.rb) + +Line 18. diff --git a/fern/products/sdk-reference/ruby/rest/phone-call-handler/index.mdx b/fern/products/sdk-reference/ruby/rest/phone-call-handler/index.mdx new file mode 100644 index 0000000000..f3fa5abc50 --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/phone-call-handler/index.mdx @@ -0,0 +1,93 @@ +--- +slug: "/reference/ruby/rest/phone-call-handler" +title: "PhoneCallHandler" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "module" + language: "ruby" + qualified_name: "SignalWire::REST::PhoneCallHandler" + parent: "rest" + module: "rest" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/phone_call_handler.rb" + visibility: "public" +--- +# `PhoneCallHandler` + +PhoneCallHandler -- enum-like constants of the +call\_handler+ values +accepted by +phone\_numbers.update+. + +Named +PhoneCallHandler+ (not +CallHandler+) to avoid colliding with +the RELAY client's inbound-call-handler callback (+Relay::Client#on\_call+). + +Setting a phone number's +call\_handler+ together with the handler-specific +companion field routes inbound calls and auto-materializes the matching +Fabric resource on the server. See the high-level helpers on ++SignalWire::REST::Namespaces::PhoneNumbersResource+. + +\=== Mapping + +Constant | Companion field (required) | Auto-creates resource +\------------------+--------------------------------+---------------------- +RELAY\_SCRIPT | call\_relay\_script\_url | swml\_webhook +LAML\_WEBHOOKS | call\_request\_url | cxml\_webhook +LAML\_APPLICATION | call\_laml\_application\_id | cxml\_application +AI\_AGENT | call\_ai\_agent\_id | ai\_agent +CALL\_FLOW | call\_flow\_id | call\_flow +RELAY\_APPLICATION | call\_relay\_application | relay\_application +RELAY\_TOPIC | call\_relay\_topic | (routes via RELAY) +RELAY\_CONTEXT | call\_relay\_context | (legacy, prefer topic) +RELAY\_CONNECTOR | (connector config) | (internal) +VIDEO\_ROOM | call\_video\_room\_id | (routes to Video API) +DIALOGFLOW | call\_dialogflow\_agent\_id | (none) + +Note: +LAML\_WEBHOOKS+ (wire value +laml\_webhooks+) produces a _cXML_ +handler despite the plural name, not a generic webhook. For SWML, use ++RELAY\_SCRIPT+. + +## Signature + +```ruby +module PhoneCallHandler +``` + +## Constants + + + + + All supported wire values, in the same order as the constants. + + + + + + + + + + + + + + + + + + + + + + +## Source + +[`lib/signalwire/rest/phone_call_handler.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/phone_call_handler.rb) + +Line 35. diff --git a/fern/products/sdk-reference/ruby/rest/rest-client/index.mdx b/fern/products/sdk-reference/ruby/rest/rest-client/index.mdx new file mode 100644 index 0000000000..3b935bca4a --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/rest-client/index.mdx @@ -0,0 +1,507 @@ +--- +slug: "/reference/ruby/rest/rest-client" +title: "RestClient" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::RestClient" + parent: "rest" + module: "rest" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb" + visibility: "public" +--- +# `RestClient` + +REST client for the SignalWire platform APIs. + +Usage: +client = SignalWire::REST::RestClient.new( +project: 'your-project-id', +token: 'your-api-token', +host: 'your-space.signalwire.com' +) + +# Or use environment variables: + +# SIGNALWIRE\_PROJECT\_ID, SIGNALWIRE\_API\_TOKEN, SIGNALWIRE\_SPACE + +client = SignalWire::REST::RestClient.new + +# Use namespaced resources + +client.fabric.ai\_agents.list +client.calling.play(call\_id, play: \[...]) +client.phone\_numbers.search(area\_code: '512') +client.video.rooms.create(name: 'standup') +client.compat.calls.list + +## Signature + +```ruby +class RestClient < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### addresses + +Returns the value of attribute addresses. + +#### Signature + +```ruby +attr_reader addresses -> Object +``` + +#### Source + +[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) + +Line 50. + +*** + +### calling + +Returns the value of attribute calling. + +#### Signature + +```ruby +attr_reader calling -> Object +``` + +#### Source + +[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) + +Line 50. + +*** + +### chat + +Returns the value of attribute chat. + +#### Signature + +```ruby +attr_reader chat -> Object +``` + +#### Source + +[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) + +Line 50. + +*** + +### compat + +Returns the value of attribute compat. + +#### Signature + +```ruby +attr_reader compat -> Object +``` + +#### Source + +[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) + +Line 50. + +*** + +### datasphere + +Returns the value of attribute datasphere. + +#### Signature + +```ruby +attr_reader datasphere -> Object +``` + +#### Source + +[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) + +Line 50. + +*** + +### fabric + +Returns the value of attribute fabric. + +#### Signature + +```ruby +attr_reader fabric -> Object +``` + +#### Source + +[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) + +Line 50. + +*** + +### http + +Returns the value of attribute http. + +#### Signature + +```ruby +attr_reader http -> Object +``` + +#### Source + +[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) + +Line 50. + +*** + +### imported\_numbers + +Returns the value of attribute imported\_numbers. + +#### Signature + +```ruby +attr_reader imported_numbers -> Object +``` + +#### Source + +[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) + +Line 50. + +*** + +### initialize + ++base\_url+ overrides the derived +https://\{space\}+ default. The +audit harness uses this to point at the local fixture server. ++ca\_file+ (optional) names a PEM CA bundle to trust for HTTPS in +addition to the system store — for private-CA deployments; forwarded +to the underlying HttpClient. + +#### Signature + +```ruby +def initialize(project: nil, token: nil, host: nil, base_url: nil, ca_file: nil) +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`RestClient` — a new instance of RestClient + +#### Source + +[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) + +Line 61. + +*** + +### logs + +Returns the value of attribute logs. + +#### Signature + +```ruby +attr_reader logs -> Object +``` + +#### Source + +[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) + +Line 50. + +*** + +### lookup + +Returns the value of attribute lookup. + +#### Signature + +```ruby +attr_reader lookup -> Object +``` + +#### Source + +[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) + +Line 50. + +*** + +### mfa + +Returns the value of attribute mfa. + +#### Signature + +```ruby +attr_reader mfa -> Object +``` + +#### Source + +[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) + +Line 50. + +*** + +### number\_groups + +Returns the value of attribute number\_groups. + +#### Signature + +```ruby +attr_reader number_groups -> Object +``` + +#### Source + +[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) + +Line 50. + +*** + +### phone\_numbers + +Returns the value of attribute phone\_numbers. + +#### Signature + +```ruby +attr_reader phone_numbers -> Object +``` + +#### Source + +[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) + +Line 50. + +*** + +### project + +Returns the value of attribute project. + +#### Signature + +```ruby +attr_reader project -> Object +``` + +#### Source + +[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) + +Line 50. + +*** + +### project\_id + +Returns the value of attribute project\_id. + +#### Signature + +```ruby +attr_reader project_id -> Object +``` + +#### Source + +[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) + +Line 50. + +*** + +### pubsub + +Returns the value of attribute pubsub. + +#### Signature + +```ruby +attr_reader pubsub -> Object +``` + +#### Source + +[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) + +Line 50. + +*** + +### queues + +Returns the value of attribute queues. + +#### Signature + +```ruby +attr_reader queues -> Object +``` + +#### Source + +[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) + +Line 50. + +*** + +### recordings + +Returns the value of attribute recordings. + +#### Signature + +```ruby +attr_reader recordings -> Object +``` + +#### Source + +[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) + +Line 50. + +*** + +### registry + +Returns the value of attribute registry. + +#### Signature + +```ruby +attr_reader registry -> Object +``` + +#### Source + +[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) + +Line 50. + +*** + +### short\_codes + +Returns the value of attribute short\_codes. + +#### Signature + +```ruby +attr_reader short_codes -> Object +``` + +#### Source + +[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) + +Line 50. + +*** + +### sip\_profile + +Returns the value of attribute sip\_profile. + +#### Signature + +```ruby +attr_reader sip_profile -> Object +``` + +#### Source + +[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) + +Line 50. + +*** + +### verified\_callers + +Returns the value of attribute verified\_callers. + +#### Signature + +```ruby +attr_reader verified_callers -> Object +``` + +#### Source + +[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) + +Line 50. + +*** + +### video + +Returns the value of attribute video. + +#### Signature + +```ruby +attr_reader video -> Object +``` + +#### Source + +[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) + +Line 50. + +## Source + +[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) + +Line 49. diff --git a/fern/products/sdk-reference/ruby/rest/signal-wire-rest-error/index.mdx b/fern/products/sdk-reference/ruby/rest/signal-wire-rest-error/index.mdx new file mode 100644 index 0000000000..a77f45aeaa --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest/signal-wire-rest-error/index.mdx @@ -0,0 +1,136 @@ +--- +slug: "/reference/ruby/rest/signal-wire-rest-error" +title: "SignalWireRestError" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "class" + language: "ruby" + qualified_name: "SignalWire::REST::SignalWireRestError" + parent: "rest" + module: "rest" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb" + visibility: "public" +--- +# `SignalWireRestError` + +Raised when the SignalWire REST API returns a non-2xx response. + +## Signature + +```ruby +class SignalWireRestError < StandardError +``` + +## Inheritance + +**Extends:** `StandardError` + +## Methods + +### body + +Returns the value of attribute body. + +#### Signature + +```ruby +attr_reader body -> Object +``` + +#### Source + +[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) + +Line 13. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(status_code, body, url, method_name = 'GET') +``` + +#### Parameters + + + + + + + + + +#### Returns + +`SignalWireRestError` — a new instance of SignalWireRestError + +#### Source + +[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) + +Line 15. + +*** + +### method\_name + +Returns the value of attribute method\_name. + +#### Signature + +```ruby +attr_reader method_name -> Object +``` + +#### Source + +[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) + +Line 13. + +*** + +### status\_code + +Returns the value of attribute status\_code. + +#### Signature + +```ruby +attr_reader status_code -> Object +``` + +#### Source + +[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) + +Line 13. + +*** + +### url + +Returns the value of attribute url. + +#### Signature + +```ruby +attr_reader url -> Object +``` + +#### Source + +[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) + +Line 13. + +## Source + +[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) + +Line 12. diff --git a/fern/products/sdk-reference/ruby/signal-wire/agent-base/agent-body-limit-middleware/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/agent-base/agent-body-limit-middleware/index.mdx deleted file mode 100644 index 3e266e6f07..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/agent-base/agent-body-limit-middleware/index.mdx +++ /dev/null @@ -1,78 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/agent-base/agent-body-limit-middleware" -title: "AgentBodyLimitMiddleware" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::AgentBase::AgentBodyLimitMiddleware" - parent: "SignalWire::AgentBase" - module: "SignalWire.AgentBase" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb" - visibility: "public" ---- -# `AgentBodyLimitMiddleware` - -## Signature - -```ruby -class AgentBodyLimitMiddleware < Object -``` - -## Inheritance - -**Extends:** `Object` - -## Methods - -### call - -#### Signature - -```ruby -def call(env) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 2220. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(app, max_size) -``` - -#### Parameters - - - - - -#### Returns - -`AgentBodyLimitMiddleware` — a new instance of AgentBodyLimitMiddleware - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 2215. - -## Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 2214. diff --git a/fern/products/sdk-reference/ruby/signal-wire/agent-base/agent-security-headers-middleware/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/agent-base/agent-security-headers-middleware/index.mdx deleted file mode 100644 index 93d1701b85..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/agent-base/agent-security-headers-middleware/index.mdx +++ /dev/null @@ -1,90 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/agent-base/agent-security-headers-middleware" -title: "AgentSecurityHeadersMiddleware" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::AgentBase::AgentSecurityHeadersMiddleware" - parent: "SignalWire::AgentBase" - module: "SignalWire.AgentBase" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb" - visibility: "public" ---- -# `AgentSecurityHeadersMiddleware` - -\================================================================== -Rack Middleware -=============== - -## Signature - -```ruby -class AgentSecurityHeadersMiddleware < Object -``` - -## Inheritance - -**Extends:** `Object` - -## Constants - - - -## Methods - -### call - -#### Signature - -```ruby -def call(env) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 2207. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(app) -``` - -#### Parameters - - - -#### Returns - -`AgentSecurityHeadersMiddleware` — a new instance of AgentSecurityHeadersMiddleware - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 2203. - -## Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 2196. diff --git a/fern/products/sdk-reference/ruby/signal-wire/agent-base/agent-timing-safe-basic-auth/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/agent-base/agent-timing-safe-basic-auth/index.mdx deleted file mode 100644 index 2e510a9099..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/agent-base/agent-timing-safe-basic-auth/index.mdx +++ /dev/null @@ -1,78 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/agent-base/agent-timing-safe-basic-auth" -title: "AgentTimingSafeBasicAuth" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::AgentBase::AgentTimingSafeBasicAuth" - parent: "SignalWire::AgentBase" - module: "SignalWire.AgentBase" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb" - visibility: "public" ---- -# `AgentTimingSafeBasicAuth` - -## Signature - -```ruby -class AgentTimingSafeBasicAuth < Object -``` - -## Inheritance - -**Extends:** `Object` - -## Methods - -### call - -#### Signature - -```ruby -def call(env) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 2235. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(app, agent) -``` - -#### Parameters - - - - - -#### Returns - -`AgentTimingSafeBasicAuth` — a new instance of AgentTimingSafeBasicAuth - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 2230. - -## Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 2229. diff --git a/fern/products/sdk-reference/ruby/signal-wire/agent-base/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/agent-base/index.mdx deleted file mode 100644 index 66b374b6a8..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/agent-base/index.mdx +++ /dev/null @@ -1,2590 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/agent-base" -title: "AgentBase" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::AgentBase" - parent: "SignalWire" - module: "SignalWire" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb" - visibility: "public" ---- -# `AgentBase` - -Central agent class that composes SWML rendering, tool dispatch, -prompt management, AI config, and HTTP serving. - -AgentBase extends SWMLService with agent-specific capabilities: - -- Prompt management (POM sections and raw text) -- Tool (SWAIG function) registration & dispatch -- AI configuration (hints, languages, pronunciations, params) -- Verb management (pre/post answer, post-AI) -- Context & step workflows -- Skill integration -- Dynamic configuration via per-request ephemeral copies - -All configuration methods return +self+ for method chaining. - -## Signature - -```ruby -class AgentBase < SignalWire::SWML::Service -``` - -## Inheritance - -**Extends:** [SignalWire::SWML::Service](/docs/sdk-reference/reference/ruby/signal-wire/swml/service) - -## Constants - - - Maximum request body size (1 MB) - - - - The complete set of internal SWAIG function names that accept fillers, matching the SWAIGInternalFiller schema definition. Any name outside this set is silently ignored by the runtime — +set\_internal\_fillers+ and +add\_internal\_filler+ warn if you pass an unknown name. Notable absences: +change\_step+, +gather\_submit+, or arbitrary user-defined SWAIG function names are NOT supported. - - -## Classes - - - - - - \================================================================== Rack Middleware ================================================================== - - - - - -## Methods - -### add\_answer\_verb - -#### Signature - -```ruby -def add_answer_verb(config) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 1089. - -*** - -### add\_function\_include - -#### Signature - -```ruby -def add_function_include(url, functions, meta_data: nil) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 1053. - -*** - -### add\_hint - -### ================================================================== AI Config methods - -#### Signature - -```ruby -def add_hint(hint) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 749. - -*** - -### add\_hints - -#### Signature - -```ruby -def add_hints(hints) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 754. - -*** - -### add\_internal\_filler - -Add internal fillers for a single internal function and language. - -See +set\_internal\_fillers+ for the complete list of supported -+func\_name+ values (SUPPORTED\_INTERNAL\_FILLER\_NAMES) and what -fillers do. Names outside the supported set log a warning and are -stored but the runtime will not play them. - -#### Signature - -```ruby -def add_internal_filler(func_name, lang_code, fillers) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 1030. - -*** - -### add\_language - -Add a language configuration. - -Python parity: `add_language(name, code, voice, speech_fillers=None, -function_fillers=None, engine=None, model=None)`. Ruby supports -both the Python-style positional shape AND the original -`add_language(config)` hash form. - -Voice argument can be either a simple voice id (`"en-US-Neural2-F"`) -or a combined `"engine.voice:model"` string -(`"elevenlabs.josh:eleven_turbo_v2_5"`); the combined form is -parsed into `engine`/`voice`/`model` keys when `engine` -and `model` aren't supplied explicitly. - -#### Signature - - - - ```ruby - add_language(config) - ``` - - - - ```ruby - add_language(name, code, voice, speech_fillers: nil, - ``` - - - -#### Parameters (Overload 1) - - - preformed language config - - -#### Parameters (Overload 2) - - - language name (e.g. `"English"`) - - - - BCP47 language code (e.g. `"en-US"`) - - - - voice id or `engine.voice:model` string - - - - -#### Throws - -- `ArgumentError` - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 844. - -*** - -### add\_mcp\_server - -Add an external MCP server for tool discovery and invocation. - -#### Signature - -```ruby -def add_mcp_server(url, headers: nil, resources: false, resource_vars: nil) -``` - -#### Parameters - - - MCP server HTTP endpoint URL - - - - - - - - -#### Returns - -`self` - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 1406. - -*** - -### add\_pattern\_hint - -Add a complex (pattern-matched) hint. - -Python parity: -`add_pattern_hint(hint, pattern, replace, ignore_case=False)`. -Ruby supports both the Python-style positional form and the -legacy keyword form (`add_pattern_hint(pattern, hint:, language:)`) -for backward compat. - -#### Signature - - - - ```ruby - add_pattern_hint(hint, pattern, replace, ignore_case: false) - ``` - - - - ```ruby - add_pattern_hint(pattern, hint:, language: 'en-US') - ``` - - - -#### Parameters (Overload 1) - - - hint to match - - - - regex pattern - - - - replacement text - - - - -#### Parameters (Overload 2) - - - - - - - -#### Throws - -- `ArgumentError` - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 776. - -*** - -### add\_post\_ai\_verb - -#### Signature - -```ruby -def add_post_ai_verb(verb_name, config) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 1104. - -*** - -### add\_post\_answer\_verb - -#### Signature - -```ruby -def add_post_answer_verb(verb_name, config) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 1094. - -*** - -### add\_pre\_answer\_verb - -### ================================================================== Verb management - -#### Signature - -```ruby -def add_pre_answer_verb(verb_name, config) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 1079. - -*** - -### add\_pronunciation - -#### Signature - -```ruby -def add_pronunciation(phrase, pronunciation, language_code: 'en-US') -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 929. - -*** - -### add\_skill - -Load and register a skill by name. - -#### Signature - -```ruby -def add_skill(skill_name, params = {}) -``` - -#### Parameters - - - - - -#### Throws - -- `ArgumentError` - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 1193. - -*** - -### add\_swaig\_query\_params - -#### Signature - -```ruby -def add_swaig_query_params(params) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 1282. - -*** - -### agent\_id - -Python parity: - -- `logger` — agent-specific structured logger (Python: `self.log`). -- `skill_manager` — owning SkillManager (Python's `self.skill_manager`). -- `agent_id` — UUID identifier from constructor or auto-generated. -- `default_webhook_url` — base URL for SWAIG webhook fallbacks. -- `native_functions` — names of built-in SWAIG functions to advertise. -- `use_pom` — whether prompt-object-model rendering is enabled. - -#### Signature - -```ruby -attr_reader agent_id -> Object -``` - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 50. - -*** - -### as\_rack\_app - -Return a Rack-compatible application for mounting. - -#### Signature - -```ruby -def rack_app -``` - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 1688. - -*** - -### auto\_map\_sip\_usernames - -Automatically register common SIP usernames based on this agent's -name and route. - -Python parity: `AgentBase.auto_map_sip_usernames` derives SIP -usernames from the agent name and route (lower-cased, stripped to -`[a-z0-9_]`) plus a no-vowels variant of the name, registering -each via \{#register\_sip\_username\}. Duplicates are skipped so the -registered set matches Python's set-backed dedup. - -#### Signature - -```ruby -def auto_map_sip_usernames -``` - -#### Returns - -`self` — for method chaining - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 1323. - -*** - -### clear\_post\_ai\_verbs - -#### Signature - -```ruby -def clear_post_ai_verbs -``` - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 1109. - -*** - -### clear\_post\_answer\_verbs - -#### Signature - -```ruby -def clear_post_answer_verbs -``` - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 1099. - -*** - -### clear\_pre\_answer\_verbs - -#### Signature - -```ruby -def clear_pre_answer_verbs -``` - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 1084. - -*** - -### clear\_swaig\_query\_params - -#### Signature - -```ruby -def clear_swaig_query_params -``` - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 1287. - -*** - -### contexts - -Define / retrieve the ContextBuilder for this agent. - -Python parity: `define_contexts(contexts)` accepts either a -`ContextBuilder` (calls `.to_dict()` to materialise) or a -raw `dict` and stores it on the agent. Ruby supports both -forms PLUS the original lazy-getter idiom: - -1. **Lazy getter** (Ruby idiom) — `agent.define_contexts` - returns the existing builder, creating one if needed. -2. **Override with builder** — `agent.define_contexts(other_cb)` - replaces the current builder with the supplied one (Python - parity). -3. **Override with hash** — `agent.define_contexts({...})` - builds a fresh builder using the provided contexts hash - (Python parity for raw-dict input). - -#### Signature - -```ruby -def define_contexts(contexts = nil) -``` - -#### Returns - -`SignalWire::Contexts::ContextBuilder` — the active builder - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 468. - -*** - -### create\_tool\_token - -Mint a per-call SWAIG-function token via the agent's SessionManager. - -Python parity: state\_mixin.StateMixin#\_create\_tool\_token — -delegates to SessionManager#create\_token and returns "" on any -raised error (Python rescues all exceptions and returns ""). - -#### Signature - -```ruby -def create_tool_token(tool_name, call_id) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 681. - -*** - -### default\_webhook\_url - -Python parity: - -- `logger` — agent-specific structured logger (Python: `self.log`). -- `skill_manager` — owning SkillManager (Python's `self.skill_manager`). -- `agent_id` — UUID identifier from constructor or auto-generated. -- `default_webhook_url` — base URL for SWAIG webhook fallbacks. -- `native_functions` — names of built-in SWAIG functions to advertise. -- `use_pom` — whether prompt-object-model rendering is enabled. - -#### Signature - -```ruby -attr_reader default_webhook_url -> Object -``` - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 50. - -*** - -### define\_contexts - -Define / retrieve the ContextBuilder for this agent. - -Python parity: `define_contexts(contexts)` accepts either a -`ContextBuilder` (calls `.to_dict()` to materialise) or a -raw `dict` and stores it on the agent. Ruby supports both -forms PLUS the original lazy-getter idiom: - -1. **Lazy getter** (Ruby idiom) — `agent.define_contexts` - returns the existing builder, creating one if needed. -2. **Override with builder** — `agent.define_contexts(other_cb)` - replaces the current builder with the supplied one (Python - parity). -3. **Override with hash** — `agent.define_contexts({...})` - builds a fresh builder using the provided contexts hash - (Python parity for raw-dict input). - -#### Signature - -```ruby -def define_contexts(contexts = nil) -``` - -#### Parameters - - - optional override - - -#### Returns - -`SignalWire::Contexts::ContextBuilder` — the active builder - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 1137. - -*** - -### define\_tool - -Register a SWAIG tool (function) that the AI can invoke during a -call. - -\== How this becomes a tool the model sees - -A SWAIG function is _exactly the same concept_ as a "tool" in -native OpenAI / Anthropic tool calling. On every LLM turn, the -SDK renders each registered SWAIG function into the OpenAI tool -schema: - -``` -{ - "type": "function", - "function": { - "name": "your_name_here", - "description": "your description text", - "parameters": { ... your JSON schema ... } - } -} -``` - -That schema is sent to the model as part of the same API call -that produces the next assistant message. The model reads: - -- the function +description+ to decide WHEN to call this tool -- each parameter +description+ (inside +parameters+) to decide - HOW to fill in that argument from the user's utterance - -This means _descriptions are prompt engineering_, not developer -comments. A vague description is the #1 cause of "the model has -the right tool but doesn't call it" failures. - -\== Bad vs good descriptions - -BAD : description: "Lookup function" -GOOD: description: "Look up a customer's account details by " \ -"account number. Use this BEFORE quoting " \ -"any account-specific info (balance, plan, " \ -"status). Do not use for general product " \ -"questions." - -BAD : parameters: \{ id: \{ type: 'string', description: 'the id' \} \} -GOOD: parameters: \{ account\_number: \{ type: 'string', -description: "The customer's 8-digit account " \ -"number, no dashes or spaces. Ask the user if they " \ -"don't provide it." \} \} - -\== Tool count matters - -LLM tool selection accuracy degrades past ~7-8 -simultaneously-active tools per call. Use -Contexts::Step#set\_functions to partition tools across steps so -only the relevant subset is active at any moment. - -Define a SWAIG tool. - -Python parity: -`define_tool(name, description, parameters, handler, -secure=True, fillers=None, wait_file=None, wait_file_loops=None, -webhook_url=None, required=None, is_typed_handler=False, **swaig_fields)`. - -#### Signature - -```ruby -def define_tool(name:, description:, parameters: {}, handler: nil, secure: false, fillers: nil, wait_file: nil, wait_file_loops: nil, webhook_url: nil, required: nil, is_typed_handler: false, swaig_fields: nil, &block) -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - -#### Yields - -- `args, raw_data` — the tool handler -- `args, raw_data` — tool handler body (alternative to passing `handler:`) - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 617. - -*** - -### define\_tools - -Return an array of all tool definitions (for SWML rendering). - -#### Signature - -```ruby -def define_tools -``` - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 671. - -*** - -### enable\_debug\_events - -#### Signature - -```ruby -def enable_debug_events(level = 1) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 1047. - -*** - -### enable\_debug\_routes - -#### Signature - -```ruby -def enable_debug_routes -``` - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 1292. - -*** - -### enable\_mcp\_server - -Expose this agent's tools as an MCP server endpoint at /mcp. - -#### Signature - -```ruby -def enable_mcp_server -``` - -#### Returns - -`self` - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 1418. - -*** - -### enable\_sip\_routing - -### ================================================================== SIP - -#### Signature - -```ruby -def enable_sip_routing(auto_map: true, path: '/sip') -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 1301. - -*** - -### extract\_sip\_username - -Extract a SIP username from a SIP URI string. - -Parses URIs of the form "sip:user@domain" and returns the user part. -Handles optional "sip:" or "sips:" scheme prefixes. - -#### Signature - -```ruby -def extract_sip_username(sip_uri) -``` - -#### Parameters - - - a SIP URI, e.g. "sip:alice@example.com" - - -#### Returns - -`String | nil` — the username, or nil if the URI cannot be parsed - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 1352. - -*** - -### extract\_sip\_username\_from\_request - -Extract the SIP username from request body data. - -Looks for SIP URI in common request body fields -(e.g., "to", "from", "sip\_uri", "call.to", "call.from"). - -#### Signature - -```ruby -def extract_sip_username_from_request(request_data) -``` - -#### Parameters - - - the parsed request body - - -#### Returns - -`String | nil` — the extracted SIP username, or nil - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 1375. - -*** - -### function\_includes= - -#### Signature - -```ruby -def function_includes=(includes) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 470. - -*** - -### get\_basic\_auth\_credentials - -Get the configured basic-auth credentials. - -Python parity: `get_basic_auth_credentials(include_source=False)`. -When `include_source` is true, returns a 3-tuple `[user, -pass, source]` (`"environment"` / `"auto-generated"` / -`"provided"`). Otherwise returns `[user, pass]`. - -#### Signature - -```ruby -def get_basic_auth_credentials(include_source: false) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 1769. - -*** - -### get\_language\_params - -Read the per-language `params` hash for a previously-added -language. - -#### Signature - -```ruby -def get_language_params(code) -``` - -#### Parameters - - - language code as previously passed to `add_language`. - - -#### Returns - -`Hash | nil` — the params hash if set, `nil` otherwise (including when the code is unknown). - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 917. - -*** - -### global\_data= - -#### Signature - -```ruby -def global_data=(data) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 474. - -*** - -### handle\_additional\_route - -#### Signature - -```ruby -def handle_additional_route(sub_path, request_data, env) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 2118. - -*** - -### has\_skill? - -#### Signature - -```ruby -def has_skill?(skill_name) -``` - -#### Parameters - - - -#### Returns - -`Boolean` - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 1254. - -*** - -### initialize - -*** - -#### Construction - -#### Signature - -```ruby -def initialize(name: 'agent', route: '/', host: '0.0.0.0', port: nil, basic_auth: nil, use_pom: true, token_expiry_secs: 3600, auto_answer: true, record_call: false, record_format: 'mp4', record_stereo: true, default_webhook_url: nil, agent_id: nil, native_functions: nil, schema_path: nil, suppress_logs: false, enable_post_prompt_override: false, check_for_input_override: false, config_file: nil, schema_validation: true, signing_key: nil, trust_proxy_for_signature: false) -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -#### Returns - -`AgentBase` — a new instance of AgentBase - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 60. - -*** - -### internal\_fillers= - -#### Signature - -```ruby -def internal_fillers=(fillers) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 478. - -*** - -### languages= - -#### Signature - -```ruby -def languages=(languages) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 482. - -*** - -### list\_skills - -#### Signature - -```ruby -def list_skills -``` - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 1250. - -*** - -### list\_tool\_names - -Return the names of all registered SWAIG tools in insertion -order. Used by ContextBuilder#validate! to detect collisions with -reserved native tool names. - -#### Signature - -```ruby -def list_tool_names -``` - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 1184. - -*** - -### logger - -Python parity: - -- `logger` — agent-specific structured logger (Python: `self.log`). -- `skill_manager` — owning SkillManager (Python's `self.skill_manager`). -- `agent_id` — UUID identifier from constructor or auto-generated. -- `default_webhook_url` — base URL for SWAIG webhook fallbacks. -- `native_functions` — names of built-in SWAIG functions to advertise. -- `use_pom` — whether prompt-object-model rendering is enabled. - -#### Signature - -```ruby -attr_reader logger -> Object -``` - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 50. - -*** - -### manual\_set\_proxy\_url - -#### Signature - -```ruby -def manual_set_proxy_url(url) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 1267. - -*** - -### native\_functions - -Python parity: - -- `logger` — agent-specific structured logger (Python: `self.log`). -- `skill_manager` — owning SkillManager (Python's `self.skill_manager`). -- `agent_id` — UUID identifier from constructor or auto-generated. -- `default_webhook_url` — base URL for SWAIG webhook fallbacks. -- `native_functions` — names of built-in SWAIG functions to advertise. -- `use_pom` — whether prompt-object-model rendering is enabled. - -#### Signature - -```ruby -attr_accessor native_functions <-> Object -``` - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 50. - -*** - -### native\_functions= - -#### Signature - -```ruby -attr_accessor native_functions= <-> Object -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 486. - -*** - -### on\_debug\_event - -#### Signature - -```ruby -def on_debug_event(&block) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 1560. - -*** - -### on\_function\_call - -Dispatch a function call to the registered handler. - -#### Signature - -```ruby -def on_function_call(name, args, raw_data) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 701. - -*** - -### on\_summary - -Python parity: `on_summary(self, summary, raw_data=None)` is a -virtual hook called when a post-prompt summary is received. -Ruby supports two equivalent shapes: - -1. **Registration** (Ruby idiom) — pass a block to install a - callback. The block receives `(summary, raw_data)` when a - summary is delivered. `on_summary { |sum, raw| ... }` -2. **Override** (Python idiom) — subclass and override - `on_summary(summary, raw_data = nil)`. Default - implementation calls the registered block (if any) and - otherwise no-ops. - -#### Signature - -```ruby -def on_summary(summary = nil, raw_data = nil, &block) -``` - -#### Parameters - - - the post-prompt summary - - - - the complete raw POST data - - - - -#### Yields - -- `summary, raw_data` — optional callback registration - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 1550. - -*** - -### params= - -#### Signature - -```ruby -def params=(params) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 490. - -*** - -### pom - -Read-only snapshot of the agent's POM as a typed -\{SignalWire::POM::PromptObjectModel\} instance. - -Python parity: `agent.pom` instance attribute (agent\_base.py -line 209) is a `PromptObjectModel` instance. Returns `nil` when -raw-text prompt mode is in effect (`set_prompt_text` was called) -— mirrors Python's `self.pom = None when use_pom=False`. - -The returned PromptObjectModel is a fresh build of the agent's -current section state, so caller mutations do not leak into agent -state. Use `agent.pom.to_h` to retrieve the legacy -array-of-hashes representation. - -#### Signature - -```ruby -def pom -``` - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 373. - -*** - -### post\_prompt - -Returns the post-prompt text whatever set\_post\_prompt stored, or -nil when no post-prompt has been set. - -Mirrors Python's PromptManager#get\_post\_prompt / -PromptMixin#get\_post\_prompt — used by SWML rendering when a -post-prompt is configured. -Post-prompt text. Clean symmetric reader/writer pair — the showcase case. - -#### Signature - -```ruby -def get_post_prompt -``` - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 451. - -*** - -### post\_prompt\_url= - -#### Signature - -```ruby -def post_prompt_url=(url) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 494. - -*** - -### post\_prompt= - -#### Signature - -```ruby -def post_prompt=(text) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 452. - -*** - -### prompt - -Return the current prompt: either a string (text mode) or an array (POM). -Reader: the effective prompt (string in text mode, POM array otherwise). -Alias of #get\_prompt. Reader-only — `get_prompt` is a _computed_ getter -(raw text vs POM), so there is no symmetric writer; set the raw text via -\#prompt\_text= or build a POM. This raw-vs-rendered asymmetry is the main -edge case the migration doc calls out. - -#### Signature - -```ruby -def get_prompt -``` - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 440. - -*** - -### prompt\_add\_section - -Add a POM section. - -Python parity: -`prompt_add_section(title, body="", bullets=None, -numbered=False, numbered_bullets=False, subsections=None)`. - -#### Signature - -```ruby -def prompt_add_section(title, body = nil, bullets: nil, numbered: false, numbered_bullets: false, subsections: nil) -``` - -#### Parameters - - - section title - - - - optional body text - - - - - - - - - - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 270. - -*** - -### prompt\_add\_subsection - -Add a subsection under a parent section. - -#### Signature - -```ruby -def prompt_add_subsection(parent_title, title, body = nil, bullets: nil) -``` - -#### Parameters - - - - - - - - - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 334. - -*** - -### prompt\_add\_to\_section - -Append content to an existing POM section, creating it if absent. - -Python parity: -`prompt_add_to_section(title, body=None, bullet=None, -bullets=None)`. Supports appending body text, a single bullet, -or a list of bullets. - -**Backwards compat:** the original Ruby signature was -`prompt_add_to_section(title, text)`. When called with two -positional arguments the second becomes `body`; this preserves -existing call sites while still supporting Python's keyword form. - -#### Signature - -```ruby -def prompt_add_to_section(title, body_arg = nil, body: nil, bullet: nil, bullets: nil) -``` - -#### Parameters - - - section title - - - - - - - - - - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 310. - -*** - -### prompt\_has\_section? - -Check whether a POM section with the given title exists. - -#### Signature - -```ruby -def prompt_has_section?(title) -``` - -#### Parameters - - - -#### Returns - -`Boolean` - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 347. - -*** - -### prompt\_pom= - -#### Signature - -```ruby -def prompt_pom=(pom) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 498. - -*** - -### prompt\_text - -Returns the raw prompt text whatever set\_prompt\_text stored, or -nil when no raw prompt has been set. Distinct from #get\_prompt -which may return the POM array when use\_pom is true. - -Mirrors Python's PromptManager#get\_raw\_prompt. -Raw prompt text (whatever #set\_prompt\_text stored). Symmetric pair. - -#### Signature - -```ruby -def get_raw_prompt -``` - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 443. - -*** - -### prompt\_text= - -Writer returns the assigned value (Ruby `=` semantics), not self, so it -can't chain — but `=` writers are never chained anyway. - -#### Signature - -```ruby -def prompt_text=(text) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 446. - -*** - -### pronunciations= - -#### Signature - -```ruby -def pronunciations=(pronunciations) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 502. - -*** - -### rack\_app - -Return a Rack-compatible application for mounting. - -#### Signature - -```ruby -def rack_app -``` - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 1684. - -*** - -### register\_sip\_username - -#### Signature - -```ruby -def register_sip_username(username) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 1308. - -*** - -### register\_swaig\_function - -Register a raw SWAIG function definition (e.g. from DataMap#to\_swaig\_function). - -#### Signature - -```ruby -def register_swaig_function(func_def) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 663. - -*** - -### remove\_skill - -#### Signature - -```ruby -def remove_skill(skill_name) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 1244. - -*** - -### render\_swml - -Build the complete SWML document hash. - -#### Signature - -```ruby -def render_swml(request_data = nil, request: nil) -``` - -#### Parameters - - - parsed request body - - - - -#### Returns - -`Hash` - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 1699. - -*** - -### reset\_contexts - -Remove all contexts, returning the agent to a no-contexts state. -This is a convenience wrapper around +define\_contexts.reset+. -Use it in a dynamic config callback when you need to rebuild -contexts from scratch for a specific request. - -#### Signature - -```ruby -def reset_contexts -``` - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 1176. - -*** - -### run - -Universal run method — mirrors Python's -`WebMixin.run(event=None, context=None, force_mode=None, -host=None, port=None)`. - -Detects execution mode (server / lambda / cgi) and routes -accordingly. `force_mode` overrides auto-detection. - -#### Signature - -```ruby -def run(event: nil, context: nil, force_mode: nil, host: nil, port: nil) -``` - -#### Parameters - - - - - - - - - - - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 1578. - -*** - -### serve - -Start the HTTP server (blocking). - -Python parity: `serve(host=None, port=None)`. `host` / -`port` overrides default to constructor-supplied values. - -#### Signature - -```ruby -def serve(host: nil, port: nil) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 1644. - -*** - -### set\_dynamic\_config\_callback - -### ================================================================== Web / HTTP configuration - -#### Signature - -```ruby -def set_dynamic_config_callback(callable = nil, &block) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 1262. - -*** - -### set\_function\_includes - -#### Signature - -```ruby -def set_function_includes(includes) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 1060. - -*** - -### set\_global\_data - -#### Signature - -```ruby -def set_global_data(data) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 953. - -*** - -### set\_internal\_fillers - -Set internal fillers for native SWAIG functions. - -Internal fillers are short phrases the AI agent speaks (via TTS) -while an internal/native function is running, so the caller -doesn't hear dead air during transitions or background work. - -Supported function names (match the SWAIGInternalFiller schema): -+hangup+, +check\_time+, +wait\_for\_user+, +wait\_seconds+, -+adjust\_response\_latency+, +next\_step+, +change\_context+, -+get\_visual\_input+, +get\_ideal\_strategy+. See -SUPPORTED\_INTERNAL\_FILLER\_NAMES. - -Notably NOT supported: +change\_step+, +gather\_submit+, or -arbitrary user-defined SWAIG function names. The runtime only -honors fillers for the names listed above; everything else is -silently ignored at the SWML level. This method warns at -registration time if you pass an unknown name so you catch the -typo early. - -Expected format: +\{ function\_name => \{ language\_code => \[phrases] \} \}+ - -#### Signature - -```ruby -def set_internal_fillers(fillers) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 1008. - -*** - -### set\_language\_params - -Set (or replace) the per-language `params` dict on an -already-added language. Useful when language entries are built up -via add\_language first and engine-specific tuning is added later -(e.g. from a config loader). Returns self for chaining. - -#### Signature - -```ruby -def set_language_params(code, params) -``` - -#### Parameters - - - language code as previously passed to `add_language` (e.g. `"en-US"`). - - - - engine-specific params hash to attach. Empty hash removes the key. - - -#### Returns - -`self` — No-op if the code isn't found. - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 898. - -*** - -### set\_languages - -#### Signature - -```ruby -def set_languages(languages) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 924. - -*** - -### set\_native\_functions - -#### Signature - -```ruby -def set_native_functions(names) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 962. - -*** - -### set\_param - -#### Signature - -```ruby -def set_param(key, value) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 941. - -*** - -### set\_params - -#### Signature - -```ruby -def set_params(params) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 946. - -*** - -### set\_post\_prompt - -Set post-prompt text. - -#### Signature - -```ruby -def set_post_prompt(text) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 244. - -*** - -### set\_post\_prompt\_llm\_params - -#### Signature - -```ruby -def set_post_prompt_llm_params(**params) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 1070. - -*** - -### set\_post\_prompt\_url - -#### Signature - -```ruby -def set_post_prompt_url(url) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 1277. - -*** - -### set\_prompt\_llm\_params - -#### Signature - -```ruby -def set_prompt_llm_params(**params) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 1065. - -*** - -### set\_prompt\_pom - -Set POM array directly. - -#### Signature - -```ruby -def set_prompt_pom(pom) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 250. - -*** - -### set\_prompt\_text - -Set prompt as raw text. Clears any POM state. - -#### Signature - -```ruby -def set_prompt_text(text) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 236. - -*** - -### set\_pronunciations - -#### Signature - -```ruby -def set_pronunciations(pronunciations) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 936. - -*** - -### set\_web\_hook\_url - -#### Signature - -```ruby -def set_web_hook_url(url) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 1272. - -*** - -### signing\_key - -Python parity: - -- `logger` — agent-specific structured logger (Python: `self.log`). -- `skill_manager` — owning SkillManager (Python's `self.skill_manager`). -- `agent_id` — UUID identifier from constructor or auto-generated. -- `default_webhook_url` — base URL for SWAIG webhook fallbacks. -- `native_functions` — names of built-in SWAIG functions to advertise. -- `use_pom` — whether prompt-object-model rendering is enabled. - -#### Signature - -```ruby -attr_reader signing_key -> Object -``` - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 50. - -*** - -### skill\_manager - -Python parity: - -- `logger` — agent-specific structured logger (Python: `self.log`). -- `skill_manager` — owning SkillManager (Python's `self.skill_manager`). -- `agent_id` — UUID identifier from constructor or auto-generated. -- `default_webhook_url` — base URL for SWAIG webhook fallbacks. -- `native_functions` — names of built-in SWAIG functions to advertise. -- `use_pom` — whether prompt-object-model rendering is enabled. - -#### Signature - -```ruby -attr_reader skill_manager -> Object -``` - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 50. - -*** - -### update\_global\_data - -#### Signature - -```ruby -def update_global_data(data) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 958. - -*** - -### use\_pom - -Python parity: - -- `logger` — agent-specific structured logger (Python: `self.log`). -- `skill_manager` — owning SkillManager (Python's `self.skill_manager`). -- `agent_id` — UUID identifier from constructor or auto-generated. -- `default_webhook_url` — base URL for SWAIG webhook fallbacks. -- `native_functions` — names of built-in SWAIG functions to advertise. -- `use_pom` — whether prompt-object-model rendering is enabled. - -#### Signature - -```ruby -attr_reader use_pom -> Object -``` - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 50. - -*** - -### validate\_tool\_token - -Validate a per-call SWAIG-function token. Returns false when the -function is not registered, when the SessionManager rejects the -token, or on any underlying exception. - -Python parity: state\_mixin.StateMixin#validate\_tool\_token — -rejects unknown function names up-front and rescues exceptions. - -#### Signature - -```ruby -def validate_tool_token(function_name, token, call_id) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 693. - -*** - -### web\_hook\_url= - -#### Signature - -```ruby -def web_hook_url=(url) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 506. - -## Source - -[`lib/signalwire/agent/agent_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb) - -Line 42. diff --git a/fern/products/sdk-reference/ruby/signal-wire/agent-server/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/agent-server/index.mdx deleted file mode 100644 index c39666840f..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/agent-server/index.mdx +++ /dev/null @@ -1,487 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/agent-server" -title: "AgentServer" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::AgentServer" - parent: "SignalWire" - module: "SignalWire" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/server/agent_server.rb" - visibility: "public" ---- -# `AgentServer` - -Multi-agent hosting on a single Rack application. - -server = AgentServer.new(host: '0.0.0.0', port: 3000) -server.register(my\_agent, route: '/agent1') -server.register(my\_agent2, route: '/agent2') -server.run - -## Signature - -```ruby -class AgentServer < Object -``` - -## Inheritance - -**Extends:** `Object` - -## Constants - - - MIME types for static file serving. - - - - Security headers applied to static file responses. - - -## Methods - -### app - -Public Rack application — Python parity: `server.app` exposes -the underlying FastAPI instance. Ruby exposes the cached Rack -app (a Proc) so callers can mount it on their own server or -pass it to Rack-compatible test harnesses. - -#### Signature - -```ruby -def app -``` - -#### Source - -[`lib/signalwire/server/agent_server.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/server/agent_server.rb) - -Line 27. - -*** - -### get\_agent - -Get a specific agent by route. - -#### Signature - -```ruby -def get_agent(route) -``` - -#### Parameters - - - -#### Returns - -`Object | nil` - -#### Source - -[`lib/signalwire/server/agent_server.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/server/agent_server.rb) - -Line 154. - -*** - -### get\_agents - -Get all registered agents. - -#### Signature - -```ruby -def get_agents -``` - -#### Returns - -`Hash` — route => agent - -#### Source - -[`lib/signalwire/server/agent_server.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/server/agent_server.rb) - -Line 147. - -*** - -### host - -Returns the value of attribute host. - -#### Signature - -```ruby -attr_reader host -> Object -``` - -#### Source - -[`lib/signalwire/server/agent_server.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/server/agent_server.rb) - -Line 21. - -*** - -### initialize - -Construct an AgentServer. - -Python parity: `AgentServer(host, port, log_level)` — -`log_level` controls the AgentServer's logger verbosity. The -Ruby port maps it through `SignalWire::Logging.logger` so the -WARN/INFO/DEBUG semantics match Python's `logging` levels. - -#### Signature - -```ruby -def initialize(host: '0.0.0.0', port: 3000, log_level: 'info') -``` - -#### Parameters - - - - - - - -#### Returns - -`AgentServer` — a new instance of AgentServer - -#### Source - -[`lib/signalwire/server/agent_server.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/server/agent_server.rb) - -Line 74. - -*** - -### log\_level - -Returns the value of attribute log\_level. - -#### Signature - -```ruby -attr_reader log_level -> Object -``` - -#### Source - -[`lib/signalwire/server/agent_server.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/server/agent_server.rb) - -Line 21. - -*** - -### logger - -Returns the value of attribute logger. - -#### Signature - -```ruby -attr_reader logger -> Object -``` - -#### Source - -[`lib/signalwire/server/agent_server.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/server/agent_server.rb) - -Line 21. - -*** - -### port - -Returns the value of attribute port. - -#### Signature - -```ruby -attr_reader port -> Object -``` - -#### Source - -[`lib/signalwire/server/agent_server.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/server/agent_server.rb) - -Line 21. - -*** - -### rack\_app - -Build a Rack application that routes requests to the appropriate agent. - -#### Signature - -```ruby -def rack_app -``` - -#### Returns - -`Proc` — a Rack-compatible app - -#### Source - -[`lib/signalwire/server/agent_server.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/server/agent_server.rb) - -Line 340. - -*** - -### register - -Register an agent at a given route. - -#### Signature - -```ruby -def register(agent, route: nil) -``` - -#### Parameters - - - an agent object (e.g. AgentBase or prefab) - - - - -#### Source - -[`lib/signalwire/server/agent_server.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/server/agent_server.rb) - -Line 126. - -*** - -### register\_global\_routing\_callback - -Register a routing callback across all agents. - -Python parity: -`AgentServer.register_global_routing_callback(callback_fn, path)`. -Adds unified routing logic to every registered agent at the same -path. The +path+ is normalized (leading slash ensured, trailing -slash stripped) and the callback is registered on each agent that -exposes +register\_routing\_callback+. - -The callback may be supplied either as a Ruby block or as a -callable (Proc/lambda) +callback\_fn+ positional argument, matching -Python's function-valued first parameter. - -#### Signature - -```ruby -def register_global_routing_callback(callback_fn = nil, path:, &block) -``` - -#### Parameters - - - the routing callback (Proc/lambda) - - - - - - -#### Returns - -`self` - -#### Throws - -- `ArgumentError` - -#### Source - -[`lib/signalwire/server/agent_server.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/server/agent_server.rb) - -Line 191. - -*** - -### register\_sip\_username - -Register a SIP username mapping to a route. - -#### Signature - -```ruby -def register_sip_username(username, route) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/server/agent_server.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/server/agent_server.rb) - -Line 209. - -*** - -### run - -Universal run method — mirrors Python's -`AgentServer.run(event=None, context=None, host=None, port=None)`. - -Detects execution mode and routes appropriately: - -- **Server mode** — starts WEBrick (Ruby's stdlib HTTP server) - bound to `host`/`port` (overrides honoured if supplied). -- **Lambda mode** (`AWS_LAMBDA_FUNCTION_NAME` env var present) - — invokes `_handle_lambda_request(event, context)` and - returns the Lambda response Hash. -- **CGI mode** (`GATEWAY_INTERFACE` env var present) — invokes - `_handle_cgi_request` and returns the CGI response String. - -#### Signature - -```ruby -def run(event: nil, context: nil, host: nil, port: nil) -``` - -#### Parameters - - - - - - - - - -#### Returns - -`Object | nil` — response for serverless modes, nil for server mode (blocking until shutdown). - -#### Source - -[`lib/signalwire/server/agent_server.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/server/agent_server.rb) - -Line 249. - -*** - -### serve\_static\_files - -Serve static files from a directory at a given route. - -#### Signature - -```ruby -def serve_static_files(directory, route) -``` - -#### Parameters - - - absolute or relative path to the directory - - - - the URL prefix to serve files at - - -#### Returns - -`self` - -#### Throws - -- `ArgumentError` - -#### Source - -[`lib/signalwire/server/agent_server.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/server/agent_server.rb) - -Line 220. - -*** - -### setup\_sip\_routing - -Set up SIP-based routing. - -#### Signature - -```ruby -def setup_sip_routing(route: '/sip', auto_map: true) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/server/agent_server.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/server/agent_server.rb) - -Line 162. - -*** - -### unregister - -Unregister an agent by route. - -#### Signature - -```ruby -def unregister(route) -``` - -#### Parameters - - - -#### Returns - -`Object | nil` — the removed agent - -#### Source - -[`lib/signalwire/server/agent_server.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/server/agent_server.rb) - -Line 140. - -## Source - -[`lib/signalwire/server/agent_server.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/server/agent_server.rb) - -Line 20. diff --git a/fern/products/sdk-reference/ruby/signal-wire/contexts/context-builder/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/contexts/context-builder/index.mdx deleted file mode 100644 index 7f7b63238e..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/contexts/context-builder/index.mdx +++ /dev/null @@ -1,231 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/contexts/context-builder" -title: "ContextBuilder" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Contexts::ContextBuilder" - parent: "SignalWire::Contexts" - module: "SignalWire.Contexts" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb" - visibility: "public" ---- -# `ContextBuilder` - -Builder for multi-step, multi-context AI agent workflows. - -A ContextBuilder owns one or more Contexts; each Context owns an -ordered list of Steps. Only one context and one step is active at -a time. Per chat turn, the runtime injects the current step's -instructions as a system message, then asks the LLM for a -response. - -\== Native tools auto-injected by the runtime - -When a step (or its enclosing context) declares +valid\_steps+ or -+valid\_contexts+, the runtime auto-injects two native tools so -the model can navigate the flow: - -- +next\_step(step: enum)+ — present when valid\_steps is set -- +change\_context(context: enum)+ — present when valid\_contexts is set - -Their +enum+ schemas are rewritten on every turn to match -whatever valid\_steps / valid\_contexts apply to the current step. -You do NOT need to define these tools yourself; they appear -automatically. - -A third native tool — +gather\_submit+ — is injected during -gather\_info questioning (see Step#set\_gather\_info / -Step#add\_gather\_question). - -These three names — +next\_step+, +change\_context+, -+gather\_submit+ — are reserved. +validate!+ will reject any agent -that defines a SWAIG tool with one of these names. See -RESERVED\_NATIVE\_TOOL\_NAMES. - -\== Function whitelisting (Step#set\_functions) - -Each step may declare a +functions+ whitelist. The whitelist is -applied in-memory at the start of each LLM turn. CRITICALLY: if a -step does NOT declare a +functions+ field, it INHERITS the -previous step's active set. See Step#set\_functions for details -and examples. - -## Signature - -```ruby -class ContextBuilder < Object -``` - -## Inheritance - -**Extends:** `Object` - -## Methods - -### add\_context - -Add a new context. Returns the Context object. - -#### Signature - -```ruby -def add_context(name) -``` - -#### Parameters - - - -#### Throws - -- `ArgumentError` - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 804. - -*** - -### attach\_agent - -Attach an agent reference so +validate!+ can check -user-defined tool names against RESERVED\_NATIVE\_TOOL\_NAMES. -Called internally by AgentBase#define\_contexts. - -#### Signature - -```ruby -def attach_agent(agent) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 789. - -*** - -### get\_context - -Get an existing context by name. Returns Context or nil. - -#### Signature - -```ruby -def get_context(name) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 815. - -*** - -### initialize - -Python parity: `ContextBuilder.__init__(self, agent)` accepts -an owning agent so `validate!` can introspect registered -SWAIG tools when checking for reserved-name collisions. -Ruby allows nil for standalone use (tests, idiom of building -a builder before attaching). - -#### Signature - -```ruby -def initialize(agent = nil) -``` - -#### Parameters - - - -#### Returns - -`ContextBuilder` — a new instance of ContextBuilder - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 780. - -*** - -### reset - -Remove all contexts, returning the builder to its initial state. -Use this in a dynamic config callback when you need to rebuild -contexts from scratch for a specific request. - -#### Signature - -```ruby -def reset -``` - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 797. - -*** - -### to\_h - -#### Signature - -```ruby -def to_h -``` - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 954. - -*** - -### validate! - -Validate the full configuration. Raises ArgumentError on problems. - -#### Signature - -```ruby -def validate! -``` - -#### Throws - -- `ArgumentError` - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 820. - -## Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 774. diff --git a/fern/products/sdk-reference/ruby/signal-wire/contexts/context/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/contexts/context/index.mdx deleted file mode 100644 index 3ffe0d16e8..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/contexts/context/index.mdx +++ /dev/null @@ -1,929 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/contexts/context" -title: "Context" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Contexts::Context" - parent: "SignalWire::Contexts" - module: "SignalWire.Contexts" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb" - visibility: "public" ---- -# `Context` - -Represents a single context containing multiple steps. - -## Signature - -```ruby -class Context < Object -``` - -## Inheritance - -**Extends:** `Object` - -## Methods - -### \_initial\_step - -#### Signature - -```ruby -def _initial_step -``` - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 709. - -*** - -### \_step\_order - -#### Signature - -```ruby -def _step_order -``` - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 708. - -*** - -### add\_bullets - -Add a POM section with bullets to the context prompt. - -#### Signature - -```ruby -def add_bullets(title, bullets) -``` - -#### Parameters - - - - - -#### Throws - -- `ArgumentError` - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 568. - -*** - -### add\_enter\_filler - -#### Signature - -```ruby -def add_enter_filler(lang_code, fillers) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 601. - -*** - -### add\_exit\_filler - -#### Signature - -```ruby -def add_exit_filler(lang_code, fillers) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 609. - -*** - -### add\_section - -Add a POM section to the context prompt. - -#### Signature - -```ruby -def add_section(title, body) -``` - -#### Parameters - - - - - -#### Throws - -- `ArgumentError` - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 560. - -*** - -### add\_step - -Add a new step. Returns the new Step object (not self). - -Python parity: `Context.add_step(name, *, task=None, bullets=None, -criteria=None, functions=None, valid_steps=None)`. The optional -keyword arguments give a one-call configuration shortcut: - -ctx.add\_step("greet", -task: "Greet the caller", -bullets: \["Say hi", "Ask how can I help"], -criteria: "User has been greeted", -functions: \["weather"], -valid\_steps: \["help"]) - -Without the optional args this stays the bare `add_step("greet")` -form that returns a Step for further fluent configuration. - -#### Signature - -```ruby -def add_step(name, task: nil, bullets: nil, criteria: nil, functions: nil, valid_steps: nil) -``` - -#### Parameters - - - - - - - - - - - - - -#### Throws - -- `ArgumentError` - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 440. - -*** - -### add\_system\_bullets - -Add a POM section with bullets to the system prompt. - -#### Signature - -```ruby -def add_system_bullets(title, bullets) -``` - -#### Parameters - - - - - -#### Throws - -- `ArgumentError` - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 584. - -*** - -### add\_system\_section - -Add a POM section to the system prompt. - -#### Signature - -```ruby -def add_system_section(title, body) -``` - -#### Parameters - - - - - -#### Throws - -- `ArgumentError` - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 576. - -*** - -### consolidate= - -#### Signature - -```ruby -def consolidate=(v) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 681. - -*** - -### enter\_fillers= - -#### Signature - -```ruby -def enter_fillers=(v) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 697. - -*** - -### exit\_fillers= - -#### Signature - -```ruby -def exit_fillers=(v) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 701. - -*** - -### full\_reset= - -#### Signature - -```ruby -def full_reset=(v) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 685. - -*** - -### get\_step - -Get an existing step by name. Returns Step or nil. - -#### Signature - -```ruby -def get_step(name) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 459. - -*** - -### initial\_step= - -\--- Idiomatic Ruby accessors (additive aliases over the get\_/set\_ originals) --- - -Writers use the block `def x=(v); set_x(v); end` form so the RHS is -returned (Ruby `=` semantics), not `self`. The chainable `set_*` -originals stay available and untouched. - -Skipped: get\_step / get\_context (take a required `name` arg — lookups, -not bare accessors). - -#### Signature - -```ruby -def initial_step=(v) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 657. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(name) -``` - -#### Parameters - - - -#### Returns - -`Context` — a new instance of Context - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 397. - -*** - -### isolated= - -#### Signature - -```ruby -def isolated=(v) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 693. - -*** - -### move\_step - -Move an existing step to a specific position. Returns self. - -#### Signature - -```ruby -def move_step(name, position) -``` - -#### Parameters - - - - - -#### Throws - -- `ArgumentError` - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 473. - -*** - -### name - -Returns the value of attribute name. - -#### Signature - -```ruby -attr_reader name -> Object -``` - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 395. - -*** - -### post\_prompt= - -#### Signature - -```ruby -def post_prompt=(v) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 669. - -*** - -### prompt= - -#### Signature - -```ruby -def prompt=(v) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 677. - -*** - -### remove\_step - -Remove a step by name. Returns self. - -#### Signature - -```ruby -def remove_step(name) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 464. - -*** - -### set\_consolidate - -#### Signature - -```ruby -def set_consolidate(val) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 521. - -*** - -### set\_enter\_fillers - -#### Signature - -```ruby -def set_enter_fillers(fillers) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 591. - -*** - -### set\_exit\_fillers - -#### Signature - -```ruby -def set_exit_fillers(fillers) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 596. - -*** - -### set\_full\_reset - -#### Signature - -```ruby -def set_full_reset(val) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 526. - -*** - -### set\_initial\_step - -Set which step the context starts on when entered. - -By default, a context starts on its first step (index 0). Use -this to skip a preamble step on re-entry via +change\_context+. - -#### Signature - -```ruby -def set_initial_step(step_name) -``` - -#### Parameters - - - name of the step to start on. - - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 487. - -*** - -### set\_isolated - -Mark this context as isolated — entering it wipes conversation -history. - -When +val+ = true and the context is entered via change\_context, -the runtime wipes the conversation array. The model starts -fresh with only the new context's system\_prompt + step -instructions, with no memory of prior turns. - -EXCEPTION — reset overrides the wipe: -If the context also has a reset configuration (via -+set\_consolidate+ or +set\_full\_reset+), the wipe is skipped in -favor of the reset behavior. Use reset with consolidate=true -to summarize prior history into a single message instead of -dropping it entirely. - -Use cases: switching to a sensitive billing flow that should -not see prior small-talk; handing off to a different agent -persona; resetting after a long off-topic detour. - -#### Signature - -```ruby -def set_isolated(val) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 554. - -*** - -### set\_post\_prompt - -#### Signature - -```ruby -def set_post_prompt(prompt) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 502. - -*** - -### set\_prompt - -#### Signature - -```ruby -def set_prompt(prompt) -``` - -#### Parameters - - - -#### Throws - -- `ArgumentError` - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 514. - -*** - -### set\_system\_prompt - -#### Signature - -```ruby -def set_system_prompt(prompt) -``` - -#### Parameters - - - -#### Throws - -- `ArgumentError` - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 507. - -*** - -### set\_user\_prompt - -#### Signature - -```ruby -def set_user_prompt(prompt) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 531. - -*** - -### set\_valid\_contexts - -#### Signature - -```ruby -def set_valid_contexts(contexts) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 492. - -*** - -### set\_valid\_steps - -#### Signature - -```ruby -def set_valid_steps(steps) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 497. - -*** - -### system\_prompt= - -#### Signature - -```ruby -def system_prompt=(v) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 673. - -*** - -### to\_h - -#### Signature - -```ruby -def to_h -``` - -#### Throws - -- `ArgumentError` - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 617. - -*** - -### user\_prompt= - -#### Signature - -```ruby -def user_prompt=(v) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 689. - -*** - -### valid\_contexts= - -#### Signature - -```ruby -def valid_contexts=(v) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 661. - -*** - -### valid\_steps= - -#### Signature - -```ruby -def valid_steps=(v) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 665. - -## Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 394. diff --git a/fern/products/sdk-reference/ruby/signal-wire/contexts/gather-info/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/contexts/gather-info/index.mdx deleted file mode 100644 index a745481c67..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/contexts/gather-info/index.mdx +++ /dev/null @@ -1,252 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/contexts/gather-info" -title: "GatherInfo" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Contexts::GatherInfo" - parent: "SignalWire::Contexts" - module: "SignalWire.Contexts" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb" - visibility: "public" ---- -# `GatherInfo` - -Configuration for gathering information in a step via the C-side gather\_info system. - -## Signature - -```ruby -class GatherInfo < Object -``` - -## Inheritance - -**Extends:** `Object` - -## Methods - -### add\_question - -Add a question. Returns +self+ for chaining. - -#### Signature - -```ruby -def add_question(key:, question:, **opts) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 63. - -*** - -### completion\_action - -Returns the value of attribute completion\_action. - -#### Signature - -```ruby -attr_accessor completion_action <-> Object -``` - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 52. - -*** - -### completion\_action= - -Sets the attribute completion\_action - -#### Signature - -```ruby -attr_accessor completion_action= <-> Object -``` - -#### Parameters - - - the value to set the attribute completion\_action to. - - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 52. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(output_key: nil, completion_action: nil, prompt: nil) -``` - -#### Parameters - - - - - - - -#### Returns - -`GatherInfo` — a new instance of GatherInfo - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 55. - -*** - -### output\_key - -Returns the value of attribute output\_key. - -#### Signature - -```ruby -attr_accessor output_key <-> Object -``` - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 52. - -*** - -### output\_key= - -Sets the attribute output\_key - -#### Signature - -```ruby -attr_accessor output_key= <-> Object -``` - -#### Parameters - - - the value to set the attribute output\_key to. - - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 52. - -*** - -### prompt - -Returns the value of attribute prompt. - -#### Signature - -```ruby -attr_accessor prompt <-> Object -``` - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 52. - -*** - -### prompt= - -Sets the attribute prompt - -#### Signature - -```ruby -attr_accessor prompt= <-> Object -``` - -#### Parameters - - - the value to set the attribute prompt to. - - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 52. - -*** - -### questions - -Returns the value of attribute questions. - -#### Signature - -```ruby -attr_reader questions -> Object -``` - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 53. - -*** - -### to\_h - -#### Signature - -```ruby -def to_h -``` - -#### Throws - -- `ArgumentError` - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 75. - -## Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 51. diff --git a/fern/products/sdk-reference/ruby/signal-wire/contexts/gather-question/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/contexts/gather-question/index.mdx deleted file mode 100644 index 52cf0d0651..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/contexts/gather-question/index.mdx +++ /dev/null @@ -1,336 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/contexts/gather-question" -title: "GatherQuestion" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Contexts::GatherQuestion" - parent: "SignalWire::Contexts" - module: "SignalWire.Contexts" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb" - visibility: "public" ---- -# `GatherQuestion` - -Represents a single question in a gather\_info configuration. - -## Signature - -```ruby -class GatherQuestion < Object -``` - -## Inheritance - -**Extends:** `Object` - -## Methods - -### confirm - -Returns the value of attribute confirm. - -#### Signature - -```ruby -attr_accessor confirm <-> Object -``` - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 29. - -*** - -### confirm= - -Sets the attribute confirm - -#### Signature - -```ruby -attr_accessor confirm= <-> Object -``` - -#### Parameters - - - the value to set the attribute confirm to. - - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 29. - -*** - -### functions - -Returns the value of attribute functions. - -#### Signature - -```ruby -attr_accessor functions <-> Object -``` - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 29. - -*** - -### functions= - -Sets the attribute functions - -#### Signature - -```ruby -attr_accessor functions= <-> Object -``` - -#### Parameters - - - the value to set the attribute functions to. - - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 29. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(key:, question:, type: 'string', confirm: false, prompt: nil, functions: nil) -``` - -#### Parameters - - - - - - - - - - - - - -#### Returns - -`GatherQuestion` — a new instance of GatherQuestion - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 31. - -*** - -### key - -Returns the value of attribute key. - -#### Signature - -```ruby -attr_accessor key <-> Object -``` - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 29. - -*** - -### key= - -Sets the attribute key - -#### Signature - -```ruby -attr_accessor key= <-> Object -``` - -#### Parameters - - - the value to set the attribute key to. - - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 29. - -*** - -### prompt - -Returns the value of attribute prompt. - -#### Signature - -```ruby -attr_accessor prompt <-> Object -``` - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 29. - -*** - -### prompt= - -Sets the attribute prompt - -#### Signature - -```ruby -attr_accessor prompt= <-> Object -``` - -#### Parameters - - - the value to set the attribute prompt to. - - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 29. - -*** - -### question - -Returns the value of attribute question. - -#### Signature - -```ruby -attr_accessor question <-> Object -``` - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 29. - -*** - -### question= - -Sets the attribute question - -#### Signature - -```ruby -attr_accessor question= <-> Object -``` - -#### Parameters - - - the value to set the attribute question to. - - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 29. - -*** - -### to\_h - -#### Signature - -```ruby -def to_h -``` - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 40. - -*** - -### type - -Returns the value of attribute type. - -#### Signature - -```ruby -attr_accessor type <-> Object -``` - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 29. - -*** - -### type= - -Sets the attribute type - -#### Signature - -```ruby -attr_accessor type= <-> Object -``` - -#### Parameters - - - the value to set the attribute type to. - - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 29. - -## Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 28. diff --git a/fern/products/sdk-reference/ruby/signal-wire/contexts/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/contexts/index.mdx deleted file mode 100644 index 0423d0f548..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/contexts/index.mdx +++ /dev/null @@ -1,84 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/contexts" -title: "Contexts" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "module" - language: "ruby" - qualified_name: "SignalWire::Contexts" - parent: "SignalWire" - module: "SignalWire" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb" - visibility: "public" ---- -# `Contexts` - -## Signature - -```ruby -module Contexts -``` - -## Constants - - - - - - - Reserved tool names auto-injected by the runtime when contexts/steps are present. User-defined SWAIG tools must not collide with these names. ContextBuilder#validate! rejects any agent that registers a user tool sharing one of these names — the runtime would never call the user tool because the native one wins. - - -## Classes - - - - Represents a single context containing multiple steps. - - - - Builder for multi-step, multi-context AI agent workflows. - - - - Configuration for gathering information in a step via the C-side gather\_info system. - - - - Represents a single question in a gather\_info configuration. - - - - Represents a single step within a context. - - - -## Methods - -### create\_simple\_context - -Helper to create a standalone context (not via ContextBuilder). - -#### Signature - -```ruby -def create_simple_context(name = 'default') -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 965. - -## Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 9. diff --git a/fern/products/sdk-reference/ruby/signal-wire/contexts/step/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/contexts/step/index.mdx deleted file mode 100644 index 139217a7c6..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/contexts/step/index.mdx +++ /dev/null @@ -1,772 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/contexts/step" -title: "Step" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Contexts::Step" - parent: "SignalWire::Contexts" - module: "SignalWire.Contexts" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb" - visibility: "public" ---- -# `Step` - -Represents a single step within a context. - -All mutator methods return +self+ for fluent chaining. - -## Signature - -```ruby -class Step < Object -``` - -## Inheritance - -**Extends:** `Object` - -## Methods - -### add\_bullets - -Add a POM section with bullet points. Mutually exclusive with +set\_text+. - -#### Signature - -```ruby -def add_bullets(title, bullets) -``` - -#### Parameters - - - - - -#### Throws - -- `ArgumentError` - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 131. - -*** - -### add\_gather\_question - -Add a question to this step's gather\_info configuration. -+set\_gather\_info+ must be called first. - -IMPORTANT — gather mode locks function access: -While the model is asking gather questions, the runtime -forcibly deactivates ALL of the step's other functions. The -only callable tools during a gather question are: - -``` -- +gather_submit+ (the native answer-submission tool) -- Whatever names you pass in this question's +functions:+ - option -``` - -+next\_step+ and +change\_context+ are also filtered out — the -model cannot navigate away until the gather completes. This -is by design: it forces a tight ask → submit → next-question -loop. - -If a question needs to call out to a tool (e.g. validate an -email, geocode a ZIP), pass that tool name in this question's -+functions:+ option. Functions listed here are active ONLY for -this question. -Python parity: `add_gather_question(key, question, type='string', -confirm=False, prompt=None, functions=None)`. Ruby exposes the -same parameter set as keyword args. - -#### Signature - -```ruby -def add_gather_question(key:, question:, type: 'string', confirm: false, prompt: nil, functions: nil) -``` - -#### Parameters - - - - - - - - - - - - - -#### Throws - -- `ArgumentError` - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 251. - -*** - -### add\_section - -Add a POM section (title + body). Mutually exclusive with +set\_text+. - -#### Signature - -```ruby -def add_section(title, body) -``` - -#### Parameters - - - - - -#### Throws - -- `ArgumentError` - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 123. - -*** - -### clear\_sections - -Remove all POM sections and direct text. - -#### Signature - -```ruby -def clear_sections -``` - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 267. - -*** - -### functions= - -#### Signature - -```ruby -def functions=(v) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 335. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(name) -``` - -#### Parameters - - - -#### Returns - -`Step` — a new instance of Step - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 92. - -*** - -### name - -Returns the value of attribute name. - -#### Signature - -```ruby -attr_reader name -> Object -``` - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 90. - -*** - -### reset\_consolidate= - -#### Signature - -```ruby -def reset_consolidate=(v) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 363. - -*** - -### reset\_full\_reset= - -#### Signature - -```ruby -def reset_full_reset=(v) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 367. - -*** - -### reset\_system\_prompt= - -#### Signature - -```ruby -def reset_system_prompt=(v) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 355. - -*** - -### reset\_user\_prompt= - -#### Signature - -```ruby -def reset_user_prompt=(v) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 359. - -*** - -### set\_end - -Mark this step as terminal for the step flow. - -IMPORTANT: +is\_end+ = true does NOT end the conversation or hang -up the call. It exits step mode entirely after this step -executes — clearing the steps list, current step index, -valid\_steps, and valid\_contexts. The agent keeps running, but -operates only under the base system prompt and the -context-level prompt; no more step instructions are injected -and no more +next\_step+ tool is offered. - -To actually end the call, call a hangup tool or define a -hangup hook. - -#### Signature - -```ruby -def set_end(is_end) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 201. - -*** - -### set\_functions - -Set which non-internal functions are callable while this step is -active. - -IMPORTANT — inheritance behavior: -If you do NOT call this method, the step inherits whichever -function set was active on the previous step (or the previous -context's last step). The server-side runtime only resets the -active set when a step explicitly declares its +functions+ -field. This is the most common source of bugs in multi-step -agents: forgetting +set\_functions+ on a later step lets the -previous step's tools leak through. Best practice is to call -+set\_functions+ explicitly on every step that should differ -from the previous one. - -Keep the per-step active set small: LLM tool selection accuracy -degrades noticeably past ~7-8 simultaneously-active tools per -call. Use per-step whitelisting to partition large tool -collections. - -Internal functions (e.g. +gather\_submit+, hangup hook) are -ALWAYS protected and cannot be deactivated by this whitelist. -The native navigation tools +next\_step+ and +change\_context+ are -injected automatically when +set\_valid\_steps+/+set\_valid\_contexts+ -is used; they are not affected by this list and do not need to -appear in it. - -#### Signature - -```ruby -def set_functions(functions) -``` - -#### Parameters - - - one of: - - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 174. - -*** - -### set\_gather\_info - -Enable info gathering for this step. Returns +self+. -After calling this, use +add\_gather\_question+ to define questions. - -#### Signature - -```ruby -def set_gather_info(output_key: nil, completion_action: nil, prompt: nil) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 218. - -*** - -### set\_reset\_consolidate - -#### Signature - -```ruby -def set_reset_consolidate(val) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 283. - -*** - -### set\_reset\_full\_reset - -#### Signature - -```ruby -def set_reset_full_reset(val) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 288. - -*** - -### set\_reset\_system\_prompt - -#### Signature - -```ruby -def set_reset_system_prompt(prompt) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 273. - -*** - -### set\_reset\_user\_prompt - -#### Signature - -```ruby -def set_reset_user_prompt(prompt) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 278. - -*** - -### set\_skip\_to\_next\_step - -#### Signature - -```ruby -def set_skip_to_next_step(skip) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 211. - -*** - -### set\_skip\_user\_turn - -#### Signature - -```ruby -def set_skip_user_turn(skip) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 206. - -*** - -### set\_step\_criteria - -#### Signature - -```ruby -def set_step_criteria(criteria) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 138. - -*** - -### set\_text - -Set the step's prompt text directly. Mutually exclusive with POM sections. - -#### Signature - -```ruby -def set_text(text) -``` - -#### Parameters - - - -#### Throws - -- `ArgumentError` - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 115. - -*** - -### set\_valid\_contexts - -#### Signature - -```ruby -def set_valid_contexts(contexts) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 184. - -*** - -### set\_valid\_steps - -#### Signature - -```ruby -def set_valid_steps(steps) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 179. - -*** - -### skip\_to\_next\_step= - -#### Signature - -```ruby -def skip_to_next_step=(v) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 351. - -*** - -### skip\_user\_turn= - -#### Signature - -```ruby -def skip_user_turn=(v) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 347. - -*** - -### step\_criteria= - -#### Signature - -```ruby -def step_criteria=(v) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 331. - -*** - -### text= - -\--- Idiomatic Ruby accessors (additive aliases over the get\_/set\_ originals) --- - -Writers use the block `def x=(v); set_x(v); end` form so the RHS is -returned (Ruby `=` semantics), not `self`. The chainable `set_*` -originals stay available and untouched. - -Skipped: set\_end (`end=` is a Ruby keyword, illegal method name); -set\_gather\_info (keyword args, not a single-value setter). - -#### Signature - -```ruby -def text=(v) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 327. - -*** - -### to\_h - -#### Signature - -```ruby -def to_h -``` - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 293. - -*** - -### valid\_contexts= - -#### Signature - -```ruby -def valid_contexts=(v) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 343. - -*** - -### valid\_steps= - -#### Signature - -```ruby -def valid_steps=(v) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 339. - -## Source - -[`lib/signalwire/contexts/context_builder.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/contexts/context_builder.rb) - -Line 89. diff --git a/fern/products/sdk-reference/ruby/signal-wire/core/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/core/index.mdx deleted file mode 100644 index f4478f2f60..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/core/index.mdx +++ /dev/null @@ -1,34 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/core" -title: "Core" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "module" - language: "ruby" - qualified_name: "SignalWire::Core" - parent: "SignalWire" - module: "SignalWire" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/core/logging_config.rb" - visibility: "public" ---- -# `Core` - -## Signature - -```ruby -module Core -``` - -## Modules - - - - - -## Source - -[`lib/signalwire/core/logging_config.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/core/logging_config.rb) - -Line 19. diff --git a/fern/products/sdk-reference/ruby/signal-wire/core/logging-config/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/core/logging-config/index.mdx deleted file mode 100644 index 4e06b6cccb..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/core/logging-config/index.mdx +++ /dev/null @@ -1,51 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/core/logging-config" -title: "LoggingConfig" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "module" - language: "ruby" - qualified_name: "SignalWire::Core::LoggingConfig" - parent: "SignalWire::Core" - module: "SignalWire.Core" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/core/logging_config.rb" - visibility: "public" ---- -# `LoggingConfig` - -## Signature - -```ruby -module LoggingConfig -``` - -## Methods - -### get\_execution\_mode - -Detect the SDK's deployment environment based on well-known -environment variables. - -#### Signature - -```ruby -def get_execution_mode -``` - -#### Returns - -`String` — one of 'cgi', 'lambda', 'google\_cloud\_function', 'azure\_function', or 'server'. - -#### Source - -[`lib/signalwire/core/logging_config.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/core/logging_config.rb) - -Line 28. - -## Source - -[`lib/signalwire/core/logging_config.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/core/logging_config.rb) - -Line 20. diff --git a/fern/products/sdk-reference/ruby/signal-wire/data-map/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/data-map/index.mdx deleted file mode 100644 index 4bf2af8285..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/data-map/index.mdx +++ /dev/null @@ -1,561 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/data-map" -title: "DataMap" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::DataMap" - parent: "SignalWire" - module: "SignalWire" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/datamap/data_map.rb" - visibility: "public" ---- -# `DataMap` - -Fluent builder for server-side DataMap tools. - -DataMap tools execute on SignalWire servers without requiring webhook -endpoints. This class provides a chainable API for building data\_map -configurations that become SWAIG function definitions. - -All mutator methods return +self+ so calls can be chained: - -dm = DataMap.new('get\_weather') -.purpose('Get current weather') -.parameter('location', 'string', 'City name', required: true) -.webhook('GET', 'https://api.weather.com/v1/current?q=$\{location\}') -.output(Swaig::FunctionResult.new('Weather: $\{response.current.temp\_f\}F')) - -## Signature - -```ruby -class DataMap < Object -``` - -## Inheritance - -**Extends:** `Object` - -## Methods - -### body - -Set the request body for the most-recently-added webhook (POST / PUT). - -#### Signature - -```ruby -def body(data) -``` - -#### Parameters - - - -#### Throws - -- `ArgumentError` - -#### Source - -[`lib/signalwire/datamap/data_map.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/datamap/data_map.rb) - -Line 156. - -*** - -### create\_expression\_tool - -Build an expression-only tool (no HTTP calls). - -#### Signature - -```ruby -def create_expression_tool(name:, patterns:, parameters: nil) -``` - -#### Parameters - - - - - - - -#### Returns - -`DataMap` - -#### Source - -[`lib/signalwire/datamap/data_map.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/datamap/data_map.rb) - -Line 294. - -*** - -### create\_simple\_api\_tool - -Build a simple API-calling tool in one shot. - -#### Signature - -```ruby -def create_simple_api_tool(name:, url:, response_template:, parameters: nil, method: 'GET', headers: nil, body: nil, error_keys: nil) -``` - -#### Parameters - - - - - - - - - - - - - - - - - -#### Returns - -`DataMap` - -#### Source - -[`lib/signalwire/datamap/data_map.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/datamap/data_map.rb) - -Line 266. - -*** - -### description - -Alias for +purpose+. Sets the LLM-facing tool description. This -string is read by the model to decide WHEN to call this tool. -See +purpose+ for bad-vs-good examples. - -#### Signature - -```ruby -def description(desc) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/datamap/data_map.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/datamap/data_map.rb) - -Line 64. - -*** - -### error\_keys - -Set error keys on the most-recently-added webhook, or at the top level -if no webhook has been added yet. - -#### Signature - -```ruby -def error_keys(keys) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/datamap/data_map.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/datamap/data_map.rb) - -Line 206. - -*** - -### expression - -Add an expression (pattern-matching rule). - -#### Signature - -```ruby -def expression(test_value, pattern, output, nomatch_output: nil) -``` - -#### Parameters - - - template string to test, e.g. "$\{args.command\}" - - - - regex pattern to match against - - - - result when pattern matches - - - - -#### Source - -[`lib/signalwire/datamap/data_map.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/datamap/data_map.rb) - -Line 107. - -*** - -### fallback\_output - -Set a fallback output used when all webhooks fail. - -#### Signature - -```ruby -def fallback_output(result) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/datamap/data_map.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/datamap/data_map.rb) - -Line 199. - -*** - -### foreach - -Configure array processing on the most-recently-added webhook response. - -#### Signature - -```ruby -def foreach(config) -``` - -#### Parameters - - - must include keys: input\_key, output\_key, append. Optional: max. - - -#### Throws - -- `ArgumentError` - -#### Source - -[`lib/signalwire/datamap/data_map.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/datamap/data_map.rb) - -Line 174. - -*** - -### function\_name - -Returns the value of attribute function\_name. - -#### Signature - -```ruby -attr_reader function_name -> Object -``` - -#### Source - -[`lib/signalwire/datamap/data_map.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/datamap/data_map.rb) - -Line 26. - -*** - -### global\_error\_keys - -Set top-level error keys (applies to all webhooks). - -#### Signature - -```ruby -def global_error_keys(keys) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/datamap/data_map.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/datamap/data_map.rb) - -Line 216. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(function_name) -``` - -#### Parameters - - - -#### Returns - -`DataMap` — a new instance of DataMap - -#### Source - -[`lib/signalwire/datamap/data_map.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/datamap/data_map.rb) - -Line 28. - -*** - -### output - -Set the output result for the most-recently-added webhook. - -#### Signature - -```ruby -def output(result) -``` - -#### Parameters - - - -#### Throws - -- `ArgumentError` - -#### Source - -[`lib/signalwire/datamap/data_map.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/datamap/data_map.rb) - -Line 189. - -*** - -### parameter - -Add a typed parameter to the function signature — the +desc+ is -LLM-FACING. - -Each parameter description is rendered into the OpenAI tool -schema under +parameters.properties.<name>.description+ and sent -to the model. The model uses it to decide HOW to fill in the -argument from user speech. It is prompt engineering, not -developer FYI. - -\== Bad vs good - -BAD : .parameter("city", "string", "the city") -GOOD: .parameter("city", "string", -"The name of the city to get weather for, e.g. " \ -"'San Francisco'. Ask the user if they did not " \ -"provide one. Include the state or country if the " \ -"city name is ambiguous.") - -#### Signature - -```ruby -def parameter(name, type, desc, required: false, enum: nil) -``` - -#### Parameters - - - - - JSON-Schema type (string, number, boolean, array, object) - - - - LLM-facing prompt-engineering description telling the model how to extract this value from the user's utterance - - - - - - -#### Source - -[`lib/signalwire/datamap/data_map.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/datamap/data_map.rb) - -Line 93. - -*** - -### params - -Set request params for the most-recently-added webhook. - -#### Signature - -```ruby -def params(data) -``` - -#### Parameters - - - -#### Throws - -- `ArgumentError` - -#### Source - -[`lib/signalwire/datamap/data_map.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/datamap/data_map.rb) - -Line 164. - -*** - -### purpose - -Set the LLM-facing tool description (a.k.a. "purpose"). _PROMPT -ENGINEERING_, not developer documentation. - -The description string is rendered into the OpenAI tool schema -+description+ field on every LLM turn. The model reads it to -decide WHEN to call this tool. A vague +purpose+ is the #1 cause -of "the model has the right tool but doesn't call it" failures -with data-map tools. - -\== Bad vs good - -BAD : .purpose("weather api") -GOOD: .purpose("Get the current weather conditions and " \ -"forecast for a specific city. Use this " \ -"whenever the user asks about weather, " \ -"temperature, rain, or similar conditions in a " \ -"named location.") - -#### Signature - -```ruby -def purpose(desc) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/datamap/data_map.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/datamap/data_map.rb) - -Line 56. - -*** - -### to\_swaig\_function - -Serialize this DataMap into a complete SWAIG function definition Hash. - -#### Signature - -```ruby -def to_swaig_function -``` - -#### Returns - -`Hash` — with keys: "function", "description", "parameters", "data\_map" - -#### Source - -[`lib/signalwire/datamap/data_map.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/datamap/data_map.rb) - -Line 224. - -*** - -### webhook - -Add a webhook (HTTP call) to the data\_map pipeline. - -#### Signature - -```ruby -def webhook(method, url, headers: nil, form_param: nil, input_args_as_params: false, require_args: nil) -``` - -#### Parameters - - - HTTP method (GET, POST, PUT, DELETE, etc.) - - - - endpoint URL (may contain $\{variable\} substitutions) - - - - - - - - - - -#### Source - -[`lib/signalwire/datamap/data_map.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/datamap/data_map.rb) - -Line 134. - -*** - -### webhook\_expressions - -Add expressions to run after the most-recently-added webhook completes. - -#### Signature - -```ruby -def webhook_expressions(expressions) -``` - -#### Parameters - - - -#### Throws - -- `ArgumentError` - -#### Source - -[`lib/signalwire/datamap/data_map.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/datamap/data_map.rb) - -Line 148. - -## Source - -[`lib/signalwire/datamap/data_map.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/datamap/data_map.rb) - -Line 25. diff --git a/fern/products/sdk-reference/ruby/signal-wire/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/index.mdx index f5351ff46f..3c31eaa096 100644 --- a/fern/products/sdk-reference/ruby/signal-wire/index.mdx +++ b/fern/products/sdk-reference/ruby/signal-wire/index.mdx @@ -28,56 +28,6 @@ module SignalWire -## Classes - - - - Central agent class that composes SWML rendering, tool dispatch, prompt management, AI config, and HTTP serving. - - - - Multi-agent hosting on a single Rack application. - - - - Fluent builder for server-side DataMap tools. - - - -## Modules - - - - - - - - - - - - - - - - - - Runtime environment detection. - - - - - - - - - - - - - - - ## Methods ### add\_skill\_directory diff --git a/fern/products/sdk-reference/ruby/signal-wire/logging/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/logging/index.mdx deleted file mode 100644 index e0bd276920..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/logging/index.mdx +++ /dev/null @@ -1,144 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/logging" -title: "Logging" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "module" - language: "ruby" - qualified_name: "SignalWire::Logging" - parent: "SignalWire" - module: "SignalWire" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/logging.rb" - visibility: "public" ---- -# `Logging` - -## Signature - -```ruby -module Logging -``` - -## Constants - - - -## Classes - - - - \------------------------------------------------------------------- - - - -## Methods - -### global\_level - -Returns the current global log level, derived from: - -1. SIGNALWIRE\_LOG\_MODE=off -> :off (suppresses everything) -2. SIGNALWIRE\_LOG\_LEVEL env -> the named level -3. Default -> :info - -#### Signature - -```ruby -def global_level -``` - -#### Source - -[`lib/signalwire/logging.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/logging.rb) - -Line 11. - -*** - -### global\_level= - -#### Signature - -```ruby -def global_level=(level) -``` - -#### Parameters - - - -#### Throws - -- `ArgumentError` - -#### Source - -[`lib/signalwire/logging.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/logging.rb) - -Line 15. - -*** - -### logger - -Convenience factory - -#### Signature - -```ruby -def logger(name) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/logging.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/logging.rb) - -Line 31. - -*** - -### reset! - -#### Signature - -```ruby -def reset! -``` - -#### Source - -[`lib/signalwire/logging.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/logging.rb) - -Line 22. - -*** - -### suppressed? - -#### Signature - -```ruby -def suppressed? -``` - -#### Returns - -`Boolean` - -#### Source - -[`lib/signalwire/logging.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/logging.rb) - -Line 26. - -## Source - -[`lib/signalwire/logging.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/logging.rb) - -Line 4. diff --git a/fern/products/sdk-reference/ruby/signal-wire/logging/logger/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/logging/logger/index.mdx deleted file mode 100644 index f5eea642a5..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/logging/logger/index.mdx +++ /dev/null @@ -1,156 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/logging/logger" -title: "Logger" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Logging::Logger" - parent: "SignalWire::Logging" - module: "SignalWire.Logging" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/logging.rb" - visibility: "public" ---- -# `Logger` - -*** - -## Signature - -```ruby -class Logger < Object -``` - -## Inheritance - -**Extends:** `Object` - -## Methods - -### debug - -#### Signature - -```ruby -def debug(msg) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/logging.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/logging.rb) - -Line 44. - -*** - -### error - -#### Signature - -```ruby -def error(msg) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/logging.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/logging.rb) - -Line 56. - -*** - -### info - -#### Signature - -```ruby -def info(msg) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/logging.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/logging.rb) - -Line 48. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(name) -``` - -#### Parameters - - - -#### Returns - -`Logger` — a new instance of Logger - -#### Source - -[`lib/signalwire/logging.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/logging.rb) - -Line 39. - -*** - -### name - -Returns the value of attribute name. - -#### Signature - -```ruby -attr_reader name -> Object -``` - -#### Source - -[`lib/signalwire/logging.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/logging.rb) - -Line 37. - -*** - -### warn - -#### Signature - -```ruby -def warn(msg) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/logging.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/logging.rb) - -Line 52. - -## Source - -[`lib/signalwire/logging.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/logging.rb) - -Line 36. diff --git a/fern/products/sdk-reference/ruby/signal-wire/pom/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/pom/index.mdx deleted file mode 100644 index 518f54d496..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/pom/index.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/pom" -title: "POM" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "module" - language: "ruby" - qualified_name: "SignalWire::POM" - parent: "SignalWire" - module: "SignalWire" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/section.rb" - visibility: "public" ---- -# `POM` - -## Signature - -```ruby -module POM -``` - -## Classes - - - - A structured data format for composing, organising, and rendering prompt instructions for large language models. - - - - Represents a section in the Prompt Object Model. - - - -## Source - -[`lib/signalwire/pom/section.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/section.rb) - -Line 4. diff --git a/fern/products/sdk-reference/ruby/signal-wire/pom/prompt-object-model/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/pom/prompt-object-model/index.mdx deleted file mode 100644 index 597587cc2e..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/pom/prompt-object-model/index.mdx +++ /dev/null @@ -1,446 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/pom/prompt-object-model" -title: "PromptObjectModel" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::POM::PromptObjectModel" - parent: "SignalWire::POM" - module: "SignalWire.POM" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/prompt_object_model.rb" - visibility: "public" ---- -# `PromptObjectModel` - -A structured data format for composing, organising, and rendering -prompt instructions for large language models. - -The Prompt Object Model provides a tree-based representation of a -prompt document composed of nested Section objects, each of which -can include a title, body text, bullet points, and arbitrarily -nested subsections. - -Mirrors Python's `signalwire.pom.pom.PromptObjectModel`. The -rendered output (Markdown / XML / JSON / YAML) is byte-for-byte -identical to the Python reference so cross-language POM documents -interoperate. - -## Signature - -```ruby -class PromptObjectModel < Object -``` - -## Inheritance - -**Extends:** `Object` - -## Methods - -### \_build\_section - -Internal: build a Section (recursively) from a Hash section -descriptor. Mirrors Python's `build_section` inner helper. - -#### Signature - -```ruby -def _build_section(hash, is_subsection: false) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/pom/prompt_object_model.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/prompt_object_model.rb) - -Line 71. - -*** - -### \_from\_array - -Internal: build a PromptObjectModel from a raw Array of Hash -section descriptors. Mirrors Python's `_from_dict` (which -confusingly takes a list, not a dict). - -#### Signature - -```ruby -def _from_array(data) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/pom/prompt_object_model.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/prompt_object_model.rb) - -Line 53. - -*** - -### add\_pom\_as\_subsection - -Add another PromptObjectModel as a subsection of an existing -section identified either by title or by Section reference. - -Mirrors Python's -`PromptObjectModel.add_pom_as_subsection(target, pom_to_add)`. - -#### Signature - -```ruby -def add_pom_as_subsection(target, pom_to_add) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/pom/prompt_object_model.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/prompt_object_model.rb) - -Line 252. - -*** - -### add\_section - -Add a top-level section to the model and return the new Section. - -Mirrors Python's `PromptObjectModel.add_section`. If +bullets+ -is a String it is wrapped into a single-element Array (Python -parity). Raises ArgumentError when +title+ is nil and the model -already has at least one section (only the first section may -be untitled). - -#### Signature - -```ruby -def add_section(title = nil, body: '', bullets: nil, numbered: nil, numbered_bullets: false) -``` - -#### Parameters - - - - - - - - - - - -#### Source - -[`lib/signalwire/pom/prompt_object_model.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/prompt_object_model.rb) - -Line 126. - -*** - -### debug - -Returns the value of attribute debug. - -#### Signature - -```ruby -attr_accessor debug <-> Object -``` - -#### Source - -[`lib/signalwire/pom/prompt_object_model.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/prompt_object_model.rb) - -Line 23. - -*** - -### debug= - -Sets the attribute debug - -#### Signature - -```ruby -attr_accessor debug= <-> Object -``` - -#### Parameters - - - the value to set the attribute debug to. - - -#### Source - -[`lib/signalwire/pom/prompt_object_model.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/prompt_object_model.rb) - -Line 23. - -*** - -### find\_section - -Find a section by title, recursing into subsections. Returns -+nil+ when the title is not present anywhere in the tree. - -#### Signature - -```ruby -def find_section(title) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/pom/prompt_object_model.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/prompt_object_model.rb) - -Line 141. - -*** - -### from\_json - -Build a PromptObjectModel from JSON. - -+json\_data+ may be either a JSON string or an already-parsed -Array. Mirrors Python's -`PromptObjectModel.from_json(json_data: Union[str, dict])`. - -#### Signature - -```ruby -def from_json(json_data) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/pom/prompt_object_model.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/prompt_object_model.rb) - -Line 35. - -*** - -### from\_yaml - -Build a PromptObjectModel from YAML. - -+yaml\_data+ may be either a YAML string or an already-parsed -Array. Mirrors Python's -`PromptObjectModel.from_yaml(yaml_data: Union[str, dict])`. - -#### Signature - -```ruby -def from_yaml(yaml_data) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/pom/prompt_object_model.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/prompt_object_model.rb) - -Line 45. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(debug: false) -``` - -#### Parameters - - - -#### Returns - -`PromptObjectModel` — a new instance of PromptObjectModel - -#### Source - -[`lib/signalwire/pom/prompt_object_model.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/prompt_object_model.rb) - -Line 25. - -*** - -### render\_markdown - -Render the entire model as Markdown. Output is byte-for-byte -identical to Python's `PromptObjectModel.render_markdown`. - -#### Signature - -```ruby -def render_markdown -``` - -#### Source - -[`lib/signalwire/pom/prompt_object_model.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/prompt_object_model.rb) - -Line 185. - -*** - -### render\_xml - -Render the entire model as XML. Output is byte-for-byte identical -to Python's `PromptObjectModel.render_xml`. - -#### Signature - -```ruby -def render_xml -``` - -#### Source - -[`lib/signalwire/pom/prompt_object_model.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/prompt_object_model.rb) - -Line 222. - -*** - -### sections - -Returns the value of attribute sections. - -#### Signature - -```ruby -attr_accessor sections <-> Object -``` - -#### Source - -[`lib/signalwire/pom/prompt_object_model.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/prompt_object_model.rb) - -Line 23. - -*** - -### sections= - -Sets the attribute sections - -#### Signature - -```ruby -attr_accessor sections= <-> Object -``` - -#### Parameters - - - the value to set the attribute sections to. - - -#### Source - -[`lib/signalwire/pom/prompt_object_model.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/prompt_object_model.rb) - -Line 23. - -*** - -### to\_h - -Convert the model to an Array of Hash section descriptors. -Mirrors Python's `PromptObjectModel.to_dict` (Ruby idiom uses -`to_h`). - -#### Signature - -```ruby -def to_h -``` - -#### Source - -[`lib/signalwire/pom/prompt_object_model.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/prompt_object_model.rb) - -Line 179. - -*** - -### to\_json - -Convert the model to a JSON string. Output matches Python's -`json.dumps(..., indent=2)` byte-for-byte, with one -special case: an empty model serializes to `"[]"` (Ruby's -default `JSON.pretty_generate([])` emits `"[\n\n]"`). - -#### Signature - -```ruby -def to_json(*_args) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/pom/prompt_object_model.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/prompt_object_model.rb) - -Line 158. - -*** - -### to\_yaml - -Convert the model to a YAML string. Output matches Python's -`yaml.dump(..., default_flow_style=False, sort_keys=False)` -byte-for-byte. Ruby's `YAML.dump` prepends `---\n`; we strip -it. The empty-list case (Ruby emits `--- []\n`) is normalised -to Python's `[]\n`. - -#### Signature - -```ruby -def to_yaml -``` - -#### Source - -[`lib/signalwire/pom/prompt_object_model.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/prompt_object_model.rb) - -Line 169. - -## Source - -[`lib/signalwire/pom/prompt_object_model.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/prompt_object_model.rb) - -Line 22. diff --git a/fern/products/sdk-reference/ruby/signal-wire/pom/section/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/pom/section/index.mdx deleted file mode 100644 index 43bc3766d4..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/pom/section/index.mdx +++ /dev/null @@ -1,499 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/pom/section" -title: "Section" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::POM::Section" - parent: "SignalWire::POM" - module: "SignalWire.POM" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/section.rb" - visibility: "public" ---- -# `Section` - -Represents a section in the Prompt Object Model. - -Each section contains a title, optional body text, optional bullet -points, and can have any number of nested subsections. - -Mirrors Python's `signalwire.pom.pom.Section` exactly. See -`signalwire-python/signalwire/signalwire/pom/pom.py` for the -source-of-truth specification; rendering output (markdown / XML / -JSON / YAML) must match Python byte-for-byte so cross-language POM -documents are interoperable. - -Attributes: - -- +title+ — the name of the section. -- +body+ — a paragraph of text associated with the section. -- +bullets+ — bullet-pointed items (Array<String>). -- +subsections+ — nested Section objects. -- +numbered+ — whether this section should be numbered. -- +numbered\_bullets+ — whether bullets should be numbered (rendered - to/from the JSON/YAML key +numberedBullets+ for Python parity). - -## Signature - -```ruby -class Section < Object -``` - -## Inheritance - -**Extends:** `Object` - -## Methods - -### add\_body - -Add or replace the body text for this section. Mirrors Python's -`Section.add_body` (which is documented to "Add or replace"). - -#### Signature - -```ruby -def add_body(body) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/pom/section.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/section.rb) - -Line 55. - -*** - -### add\_bullets - -Append bullet points to this section. Does not replace existing -bullets — mirrors Python's `self.bullets.extend(bullets)`. - -#### Signature - -```ruby -def add_bullets(bullets) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/pom/section.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/section.rb) - -Line 65. - -*** - -### add\_subsection - -Add a subsection to this section, returning the new Section. - -Raises ArgumentError when +title+ is nil (Python raises -`ValueError("Subsections must have a title")`; Ruby idiom -is ArgumentError for invalid arguments). - -#### Signature - -```ruby -def add_subsection(title, body: '', bullets: nil, numbered: false, numbered_bullets: false) -``` - -#### Parameters - - - - - - - - - - - -#### Throws - -- `ArgumentError` - -#### Source - -[`lib/signalwire/pom/section.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/section.rb) - -Line 78. - -*** - -### body - -Returns the value of attribute body. - -#### Signature - -```ruby -attr_accessor body <-> Object -``` - -#### Source - -[`lib/signalwire/pom/section.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/section.rb) - -Line 25. - -*** - -### body= - -Sets the attribute body - -#### Signature - -```ruby -attr_accessor body= <-> Object -``` - -#### Parameters - - - the value to set the attribute body to. - - -#### Source - -[`lib/signalwire/pom/section.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/section.rb) - -Line 25. - -*** - -### bullets - -Returns the value of attribute bullets. - -#### Signature - -```ruby -attr_accessor bullets <-> Object -``` - -#### Source - -[`lib/signalwire/pom/section.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/section.rb) - -Line 25. - -*** - -### bullets= - -Sets the attribute bullets - -#### Signature - -```ruby -attr_accessor bullets= <-> Object -``` - -#### Parameters - - - the value to set the attribute bullets to. - - -#### Source - -[`lib/signalwire/pom/section.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/section.rb) - -Line 25. - -*** - -### initialize - -Construct a Section. - -All arguments after +title+ are keyword arguments mirroring the -Python `Section.__init__` signature. `numbered_bullets` is -snake\_case in Ruby; the camelCase `numberedBullets` form used -by Python's JSON/YAML serialization is preserved on the wire. - -#### Signature - -```ruby -def initialize(title = nil, body: '', bullets: nil, numbered: nil, numbered_bullets: false) -``` - -#### Parameters - - - - - - - - - - - -#### Returns - -`Section` — a new instance of Section - -#### Source - -[`lib/signalwire/pom/section.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/section.rb) - -Line 33. - -*** - -### numbered - -Returns the value of attribute numbered. - -#### Signature - -```ruby -attr_accessor numbered <-> Object -``` - -#### Source - -[`lib/signalwire/pom/section.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/section.rb) - -Line 25. - -*** - -### numbered\_bullets - -Returns the value of attribute numbered\_bullets. - -#### Signature - -```ruby -attr_accessor numbered_bullets <-> Object -``` - -#### Source - -[`lib/signalwire/pom/section.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/section.rb) - -Line 25. - -*** - -### numbered\_bullets= - -Sets the attribute numbered\_bullets - -#### Signature - -```ruby -attr_accessor numbered_bullets= <-> Object -``` - -#### Parameters - - - the value to set the attribute numbered\_bullets to. - - -#### Source - -[`lib/signalwire/pom/section.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/section.rb) - -Line 25. - -*** - -### numbered= - -Sets the attribute numbered - -#### Signature - -```ruby -attr_accessor numbered= <-> Object -``` - -#### Parameters - - - the value to set the attribute numbered to. - - -#### Source - -[`lib/signalwire/pom/section.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/section.rb) - -Line 25. - -*** - -### render\_markdown - -Render this section and all its subsections as Markdown. The -output is byte-for-byte identical to Python's -`Section.render_markdown`. - -#### Signature - -```ruby -def render_markdown(level: 2, section_number: nil) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/pom/section.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/section.rb) - -Line 104. - -*** - -### render\_xml - -Render this section and all its subsections as XML. Output is -byte-for-byte identical to Python's `Section.render_xml`. - -#### Signature - -```ruby -def render_xml(indent: 0, section_number: nil) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/pom/section.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/section.rb) - -Line 150. - -*** - -### subsections - -Returns the value of attribute subsections. - -#### Signature - -```ruby -attr_accessor subsections <-> Object -``` - -#### Source - -[`lib/signalwire/pom/section.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/section.rb) - -Line 25. - -*** - -### subsections= - -Sets the attribute subsections - -#### Signature - -```ruby -attr_accessor subsections= <-> Object -``` - -#### Parameters - - - the value to set the attribute subsections to. - - -#### Source - -[`lib/signalwire/pom/section.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/section.rb) - -Line 25. - -*** - -### title - -Returns the value of attribute title. - -#### Signature - -```ruby -attr_accessor title <-> Object -``` - -#### Source - -[`lib/signalwire/pom/section.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/section.rb) - -Line 25. - -*** - -### title= - -Sets the attribute title - -#### Signature - -```ruby -attr_accessor title= <-> Object -``` - -#### Parameters - - - the value to set the attribute title to. - - -#### Source - -[`lib/signalwire/pom/section.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/section.rb) - -Line 25. - -*** - -### to\_h - -Convert the section to a Hash representation suitable for JSON or -YAML serialization. Keys are emitted in the same order as Python -so cross-port string comparisons line up. - -#### Signature - -```ruby -def to_h -``` - -#### Source - -[`lib/signalwire/pom/section.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/section.rb) - -Line 90. - -## Source - -[`lib/signalwire/pom/section.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/pom/section.rb) - -Line 24. diff --git a/fern/products/sdk-reference/ruby/signal-wire/prefabs/concierge/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/prefabs/concierge/index.mdx deleted file mode 100644 index 5456da4a0e..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/prefabs/concierge/index.mdx +++ /dev/null @@ -1,368 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/prefabs/concierge" -title: "Concierge" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Prefabs::Concierge" - parent: "SignalWire::Prefabs" - module: "SignalWire.Prefabs" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/concierge.rb" - visibility: "public" ---- -# `Concierge` - -Prefab agent for providing virtual concierge services. - -agent = Concierge.new( -venue\_name: 'Grand Hotel', -services: \['room service', 'spa bookings'], -amenities: \{ 'pool' => \{ 'hours' => '7 AM - 10 PM', 'location' => '2nd Floor' \} \} -) - -## Signature - -```ruby -class Concierge < Object -``` - -## Inheritance - -**Extends:** `Object` - -## Methods - -### amenities - -Returns the value of attribute amenities. - -#### Signature - -```ruby -attr_reader amenities -> Object -``` - -#### Source - -[`lib/signalwire/prefabs/concierge.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/concierge.rb) - -Line 23. - -*** - -### check\_availability - -Tool: check\_availability — Python parity -(signalwire.prefabs.concierge.ConciergeAgent#check\_availability). - -Simulated booking lookup: confirms availability when the requested -service is one of the venue's offered services, otherwise lists the -available services. - -#### Signature - -```ruby -def check_availability(args, _raw_data) -``` - -#### Parameters - - - expects "service", "date", "time" - - - - -#### Returns - -`Swaig::FunctionResult` - -#### Source - -[`lib/signalwire/prefabs/concierge.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/concierge.rb) - -Line 102. - -*** - -### get\_directions - -Tool: get\_directions — Python parity -(signalwire.prefabs.concierge.ConciergeAgent#get\_directions). - -Returns directions to an amenity when that amenity declares a -"location" detail, otherwise points the caller at the front desk. - -#### Signature - -```ruby -def get_directions(args, _raw_data) -``` - -#### Parameters - - - expects "location" - - - - -#### Returns - -`Swaig::FunctionResult` - -#### Source - -[`lib/signalwire/prefabs/concierge.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/concierge.rb) - -Line 128. - -*** - -### global\_data - -#### Signature - -```ruby -def global_data -``` - -#### Source - -[`lib/signalwire/prefabs/concierge.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/concierge.rb) - -Line 64. - -*** - -### handle\_amenity\_info - -#### Signature - -```ruby -def handle_amenity_info(args, _raw_data) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/prefabs/concierge.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/concierge.rb) - -Line 72. - -*** - -### handle\_service\_info - -#### Signature - -```ruby -def handle_service_info(args, _raw_data) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/prefabs/concierge.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/concierge.rb) - -Line 83. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(venue_name:, services:, amenities:, hours_of_operation: nil, special_instructions: nil, welcome_message: nil, name: 'concierge', route: '/concierge', **_opts) -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - -#### Returns - -`Concierge` — a new instance of Concierge - -#### Source - -[`lib/signalwire/prefabs/concierge.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/concierge.rb) - -Line 25. - -*** - -### name - -Returns the value of attribute name. - -#### Signature - -```ruby -attr_reader name -> Object -``` - -#### Source - -[`lib/signalwire/prefabs/concierge.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/concierge.rb) - -Line 23. - -*** - -### on\_summary - -Lifecycle hook: on\_summary — Python parity -(signalwire.prefabs.concierge.ConciergeAgent#on\_summary). - -Processes the post-prompt interaction summary. Structured (Hash) -summaries are logged as pretty JSON; anything else is logged as-is. -Subclasses may override to persist or forward the interaction. - -#### Signature - -```ruby -def on_summary(summary, _raw_data = nil) -``` - -#### Parameters - - - conversation summary - - - - full raw POST data - - -#### Returns - -`void` - -#### Source - -[`lib/signalwire/prefabs/concierge.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/concierge.rb) - -Line 156. - -*** - -### prompt\_sections - -#### Signature - -```ruby -def prompt_sections -``` - -#### Source - -[`lib/signalwire/prefabs/concierge.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/concierge.rb) - -Line 42. - -*** - -### route - -Returns the value of attribute route. - -#### Signature - -```ruby -attr_reader route -> Object -``` - -#### Source - -[`lib/signalwire/prefabs/concierge.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/concierge.rb) - -Line 23. - -*** - -### services - -Returns the value of attribute services. - -#### Signature - -```ruby -attr_reader services -> Object -``` - -#### Source - -[`lib/signalwire/prefabs/concierge.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/concierge.rb) - -Line 23. - -*** - -### tools - -#### Signature - -```ruby -def tools -``` - -#### Source - -[`lib/signalwire/prefabs/concierge.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/concierge.rb) - -Line 38. - -*** - -### venue\_name - -Returns the value of attribute venue\_name. - -#### Signature - -```ruby -attr_reader venue_name -> Object -``` - -#### Source - -[`lib/signalwire/prefabs/concierge.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/concierge.rb) - -Line 23. - -## Source - -[`lib/signalwire/prefabs/concierge.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/concierge.rb) - -Line 22. diff --git a/fern/products/sdk-reference/ruby/signal-wire/prefabs/faq-bot/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/prefabs/faq-bot/index.mdx deleted file mode 100644 index be0475be2f..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/prefabs/faq-bot/index.mdx +++ /dev/null @@ -1,238 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/prefabs/faq-bot" -title: "FaqBot" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Prefabs::FaqBot" - parent: "SignalWire::Prefabs" - module: "SignalWire.Prefabs" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/faq_bot.rb" - visibility: "public" ---- -# `FaqBot` - -Prefab agent for answering frequently asked questions. - -agent = FaqBot.new( -faqs: \[ -\{ 'question' => 'What is SignalWire?', 'answer' => 'A cloud communications platform.' \} -] -) - -## Signature - -```ruby -class FaqBot < Object -``` - -## Inheritance - -**Extends:** `Object` - -## Methods - -### faqs - -Returns the value of attribute faqs. - -#### Signature - -```ruby -attr_reader faqs -> Object -``` - -#### Source - -[`lib/signalwire/prefabs/faq_bot.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/faq_bot.rb) - -Line 23. - -*** - -### global\_data - -#### Signature - -```ruby -def global_data -``` - -#### Source - -[`lib/signalwire/prefabs/faq_bot.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/faq_bot.rb) - -Line 51. - -*** - -### handle\_search - -#### Signature - -```ruby -def handle_search(args, _raw_data) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/prefabs/faq_bot.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/faq_bot.rb) - -Line 58. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(faqs:, suggest_related: true, persona: nil, name: 'faq_bot', route: '/faq', **_opts) -``` - -#### Parameters - - - - - - - - - - - - - -#### Returns - -`FaqBot` — a new instance of FaqBot - -#### Throws - -- `ArgumentError` - -#### Source - -[`lib/signalwire/prefabs/faq_bot.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/faq_bot.rb) - -Line 25. - -*** - -### name - -Returns the value of attribute name. - -#### Signature - -```ruby -attr_reader name -> Object -``` - -#### Source - -[`lib/signalwire/prefabs/faq_bot.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/faq_bot.rb) - -Line 23. - -*** - -### on\_summary - -Lifecycle hook: on\_summary — Python parity -(signalwire.prefabs.faq\_bot.FAQBotAgent#on\_summary). - -Logs the post-prompt interaction summary; structured (Hash) summaries -are emitted as pretty JSON. Subclasses may override to persist. - -#### Signature - -```ruby -def on_summary(summary, _raw_data = nil) -``` - -#### Parameters - - - conversation summary - - - - full raw POST data - - -#### Returns - -`void` - -#### Source - -[`lib/signalwire/prefabs/faq_bot.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/faq_bot.rb) - -Line 77. - -*** - -### prompt\_sections - -#### Signature - -```ruby -def prompt_sections -``` - -#### Source - -[`lib/signalwire/prefabs/faq_bot.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/faq_bot.rb) - -Line 40. - -*** - -### route - -Returns the value of attribute route. - -#### Signature - -```ruby -attr_reader route -> Object -``` - -#### Source - -[`lib/signalwire/prefabs/faq_bot.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/faq_bot.rb) - -Line 23. - -*** - -### tools - -#### Signature - -```ruby -def tools -``` - -#### Source - -[`lib/signalwire/prefabs/faq_bot.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/faq_bot.rb) - -Line 36. - -## Source - -[`lib/signalwire/prefabs/faq_bot.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/faq_bot.rb) - -Line 22. diff --git a/fern/products/sdk-reference/ruby/signal-wire/prefabs/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/prefabs/index.mdx deleted file mode 100644 index 5a13120346..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/prefabs/index.mdx +++ /dev/null @@ -1,52 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/prefabs" -title: "Prefabs" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "module" - language: "ruby" - qualified_name: "SignalWire::Prefabs" - parent: "SignalWire" - module: "SignalWire" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/survey.rb" - visibility: "public" ---- -# `Prefabs` - -## Signature - -```ruby -module Prefabs -``` - -## Classes - - - - Prefab agent for providing virtual concierge services. - - - - Prefab agent for answering frequently asked questions. - - - - Prefab agent for collecting answers to a series of questions. - - - - Prefab agent for greeting callers and transferring them to departments. - - - - Prefab agent for conducting automated surveys. - - - -## Source - -[`lib/signalwire/prefabs/survey.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/survey.rb) - -Line 13. diff --git a/fern/products/sdk-reference/ruby/signal-wire/prefabs/info-gatherer/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/prefabs/info-gatherer/index.mdx deleted file mode 100644 index 5e58b825a7..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/prefabs/info-gatherer/index.mdx +++ /dev/null @@ -1,306 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/prefabs/info-gatherer" -title: "InfoGatherer" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Prefabs::InfoGatherer" - parent: "SignalWire::Prefabs" - module: "SignalWire.Prefabs" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/info_gatherer.rb" - visibility: "public" ---- -# `InfoGatherer` - -Prefab agent for collecting answers to a series of questions. - -agent = InfoGatherer.new( -questions: \[ -\{ 'key\_name' => 'full\_name', 'question\_text' => 'What is your full name?' \}, -\{ 'key\_name' => 'email', 'question\_text' => 'Email?', 'confirm' => true \} -] -) - -## Signature - -```ruby -class InfoGatherer < Object -``` - -## Inheritance - -**Extends:** `Object` - -## Constants - - - Fallback questions used in dynamic mode when no callback is registered or the callback raises (mirrors Python's fallback list). - - -## Methods - -### global\_data - -Global data for initial state. - -#### Signature - -```ruby -def global_data -``` - -#### Source - -[`lib/signalwire/prefabs/info_gatherer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/info_gatherer.rb) - -Line 79. - -*** - -### handle\_start - -Tool handler: start\_questions - -#### Signature - -```ruby -def handle_start(_args, _raw_data) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/prefabs/info_gatherer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/info_gatherer.rb) - -Line 90. - -*** - -### handle\_submit - -Tool handler: submit\_answer - -#### Signature - -```ruby -def handle_submit(args, _raw_data) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/prefabs/info_gatherer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/info_gatherer.rb) - -Line 100. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(questions: nil, name: 'info_gatherer', route: '/info_gatherer', **_opts) -``` - -#### Parameters - - - - - - - - - -#### Returns - -`InfoGatherer` — a new instance of InfoGatherer - -#### Source - -[`lib/signalwire/prefabs/info_gatherer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/info_gatherer.rb) - -Line 33. - -*** - -### name - -Returns the value of attribute name. - -#### Signature - -```ruby -attr_reader name -> Object -``` - -#### Source - -[`lib/signalwire/prefabs/info_gatherer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/info_gatherer.rb) - -Line 29. - -*** - -### on\_swml\_request - -Lifecycle hook: on\_swml\_request — Python parity -(InfoGathererAgent#on\_swml\_request). In dynamic mode, invokes the -registered question callback (or a fallback) and returns a -\{ 'global\_data' => \{...\} \} Hash that AgentBase merges into the SWML -response. In static mode this is a no-op (returns nil). - -#### Signature - -```ruby -def on_swml_request(request_data = nil, _callback_path = nil, request: nil) -``` - -#### Parameters - - - parsed request body - - - - - - -#### Returns - -`Hash | nil` - -#### Source - -[`lib/signalwire/prefabs/info_gatherer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/info_gatherer.rb) - -Line 116. - -*** - -### prompt\_sections - -Build the prompt sections. - -#### Signature - -```ruby -def prompt_sections -``` - -#### Source - -[`lib/signalwire/prefabs/info_gatherer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/info_gatherer.rb) - -Line 68. - -*** - -### questions - -Returns the value of attribute questions. - -#### Signature - -```ruby -attr_reader questions -> Object -``` - -#### Source - -[`lib/signalwire/prefabs/info_gatherer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/info_gatherer.rb) - -Line 29. - -*** - -### route - -Returns the value of attribute route. - -#### Signature - -```ruby -attr_reader route -> Object -``` - -#### Source - -[`lib/signalwire/prefabs/info_gatherer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/info_gatherer.rb) - -Line 29. - -*** - -### set\_question\_callback - -Register a callback for dynamic, per-request question configuration — -Python parity (InfoGathererAgent#set\_question\_callback). The callback -receives (query\_params, body\_params, headers) and returns the list of -questions to ask on that call. - -#### Signature - -```ruby -def set_question_callback(callback) -``` - -#### Parameters - - - callable taking three Hash args, returning an Array of question Hashes - - -#### Returns - -`self` - -#### Source - -[`lib/signalwire/prefabs/info_gatherer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/info_gatherer.rb) - -Line 57. - -*** - -### tools - -Tool definitions this prefab provides. - -#### Signature - -```ruby -def tools -``` - -#### Source - -[`lib/signalwire/prefabs/info_gatherer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/info_gatherer.rb) - -Line 63. - -## Source - -[`lib/signalwire/prefabs/info_gatherer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/info_gatherer.rb) - -Line 21. diff --git a/fern/products/sdk-reference/ruby/signal-wire/prefabs/receptionist/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/prefabs/receptionist/index.mdx deleted file mode 100644 index f963b0fa1d..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/prefabs/receptionist/index.mdx +++ /dev/null @@ -1,256 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/prefabs/receptionist" -title: "Receptionist" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Prefabs::Receptionist" - parent: "SignalWire::Prefabs" - module: "SignalWire.Prefabs" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/receptionist.rb" - visibility: "public" ---- -# `Receptionist` - -Prefab agent for greeting callers and transferring them to departments. - -agent = Receptionist.new( -departments: \[ -\{ 'name' => 'sales', 'description' => 'Product inquiries', 'number' => '+15551235555' \}, -\{ 'name' => 'support', 'description' => 'Technical help', 'number' => '+15551236666' \} -] -) - -## Signature - -```ruby -class Receptionist < Object -``` - -## Inheritance - -**Extends:** `Object` - -## Methods - -### departments - -Returns the value of attribute departments. - -#### Signature - -```ruby -attr_reader departments -> Object -``` - -#### Source - -[`lib/signalwire/prefabs/receptionist.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/receptionist.rb) - -Line 22. - -*** - -### global\_data - -#### Signature - -```ruby -def global_data -``` - -#### Source - -[`lib/signalwire/prefabs/receptionist.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/receptionist.rb) - -Line 54. - -*** - -### greeting - -Returns the value of attribute greeting. - -#### Signature - -```ruby -attr_reader greeting -> Object -``` - -#### Source - -[`lib/signalwire/prefabs/receptionist.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/receptionist.rb) - -Line 22. - -*** - -### handle\_transfer - -#### Signature - -```ruby -def handle_transfer(args, _raw_data) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/prefabs/receptionist.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/receptionist.rb) - -Line 61. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(departments:, name: 'receptionist', route: '/receptionist', greeting: 'Thank you for calling. How can I help you today?', **_opts) -``` - -#### Parameters - - - - - - - - - - - -#### Returns - -`Receptionist` — a new instance of Receptionist - -#### Throws - -- `ArgumentError` - -#### Source - -[`lib/signalwire/prefabs/receptionist.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/receptionist.rb) - -Line 24. - -*** - -### name - -Returns the value of attribute name. - -#### Signature - -```ruby -attr_reader name -> Object -``` - -#### Source - -[`lib/signalwire/prefabs/receptionist.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/receptionist.rb) - -Line 22. - -*** - -### on\_summary - -Lifecycle hook: on\_summary — Python parity -(signalwire.prefabs.receptionist.ReceptionistAgent#on\_summary). - -No-op extension point: the base receptionist does not process the -transfer summary. Subclasses override this to handle the summary -(mirrors Python's `def on_summary(...): pass`). - -#### Signature - -```ruby -def on_summary(_summary, _raw_data = nil) -``` - -#### Parameters - - - conversation summary - - - - full raw POST data - - -#### Returns - -`void` - -#### Source - -[`lib/signalwire/prefabs/receptionist.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/receptionist.rb) - -Line 83. - -*** - -### prompt\_sections - -#### Signature - -```ruby -def prompt_sections -``` - -#### Source - -[`lib/signalwire/prefabs/receptionist.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/receptionist.rb) - -Line 43. - -*** - -### route - -Returns the value of attribute route. - -#### Signature - -```ruby -attr_reader route -> Object -``` - -#### Source - -[`lib/signalwire/prefabs/receptionist.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/receptionist.rb) - -Line 22. - -*** - -### tools - -#### Signature - -```ruby -def tools -``` - -#### Source - -[`lib/signalwire/prefabs/receptionist.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/receptionist.rb) - -Line 39. - -## Source - -[`lib/signalwire/prefabs/receptionist.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/receptionist.rb) - -Line 21. diff --git a/fern/products/sdk-reference/ruby/signal-wire/prefabs/survey/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/prefabs/survey/index.mdx deleted file mode 100644 index 730b2f99b4..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/prefabs/survey/index.mdx +++ /dev/null @@ -1,373 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/prefabs/survey" -title: "Survey" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Prefabs::Survey" - parent: "SignalWire::Prefabs" - module: "SignalWire.Prefabs" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/survey.rb" - visibility: "public" ---- -# `Survey` - -Prefab agent for conducting automated surveys. - -agent = Survey.new( -survey\_name: 'Customer Satisfaction', -questions: \[ -\{ 'id' => 'satisfaction', 'text' => 'How satisfied were you?', 'type' => 'rating', 'scale' => 5 \} -] -) - -## Signature - -```ruby -class Survey < Object -``` - -## Inheritance - -**Extends:** `Object` - -## Methods - -### global\_data - -#### Signature - -```ruby -def global_data -``` - -#### Source - -[`lib/signalwire/prefabs/survey.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/survey.rb) - -Line 52. - -*** - -### handle\_start - -#### Signature - -```ruby -def handle_start(_args, _raw_data) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/prefabs/survey.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/survey.rb) - -Line 63. - -*** - -### handle\_submit - -#### Signature - -```ruby -def handle_submit(args, _raw_data) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/prefabs/survey.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/survey.rb) - -Line 68. - -*** - -### handle\_summary - -#### Signature - -```ruby -def handle_summary(_args, _raw_data) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/prefabs/survey.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/survey.rb) - -Line 72. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(survey_name:, questions:, introduction: nil, conclusion: nil, name: 'survey', route: '/survey', **_opts) -``` - -#### Parameters - - - - - - - - - - - - - - - -#### Returns - -`Survey` — a new instance of Survey - -#### Throws - -- `ArgumentError` - -#### Source - -[`lib/signalwire/prefabs/survey.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/survey.rb) - -Line 26. - -*** - -### log\_response - -Tool: log\_response — Python parity -(signalwire.prefabs.survey.SurveyAgent#log\_response). - -Acknowledges that a validated response has been recorded, naming the -question by its text. A real implementation would persist the answer. - -#### Signature - -```ruby -def log_response(args, _raw_data) -``` - -#### Parameters - - - expects "question\_id", "response" - - - - -#### Returns - -`Swaig::FunctionResult` - -#### Source - -[`lib/signalwire/prefabs/survey.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/survey.rb) - -Line 126. - -*** - -### name - -Returns the value of attribute name. - -#### Signature - -```ruby -attr_reader name -> Object -``` - -#### Source - -[`lib/signalwire/prefabs/survey.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/survey.rb) - -Line 24. - -*** - -### on\_summary - -Lifecycle hook: on\_summary — Python parity -(signalwire.prefabs.survey.SurveyAgent#on\_summary). - -Logs the completed survey results; structured (Hash) summaries are -emitted as pretty JSON. Subclasses override to store responses or -trigger follow-up actions. - -#### Signature - -```ruby -def on_summary(summary, _raw_data = nil) -``` - -#### Parameters - - - survey responses summary - - - - full raw POST data - - -#### Returns - -`void` - -#### Source - -[`lib/signalwire/prefabs/survey.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/survey.rb) - -Line 144. - -*** - -### prompt\_sections - -#### Signature - -```ruby -def prompt_sections -``` - -#### Source - -[`lib/signalwire/prefabs/survey.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/survey.rb) - -Line 42. - -*** - -### questions - -Returns the value of attribute questions. - -#### Signature - -```ruby -attr_reader questions -> Object -``` - -#### Source - -[`lib/signalwire/prefabs/survey.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/survey.rb) - -Line 24. - -*** - -### route - -Returns the value of attribute route. - -#### Signature - -```ruby -attr_reader route -> Object -``` - -#### Source - -[`lib/signalwire/prefabs/survey.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/survey.rb) - -Line 24. - -*** - -### survey\_name - -Returns the value of attribute survey\_name. - -#### Signature - -```ruby -attr_reader survey_name -> Object -``` - -#### Source - -[`lib/signalwire/prefabs/survey.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/survey.rb) - -Line 24. - -*** - -### tools - -#### Signature - -```ruby -def tools -``` - -#### Source - -[`lib/signalwire/prefabs/survey.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/survey.rb) - -Line 38. - -*** - -### validate\_response - -Tool: validate\_response — Python parity -(signalwire.prefabs.survey.SurveyAgent#validate\_response). - -Validates a user's answer against the constraints of the identified -question (rating range, multiple-choice options, yes/no, required -open-ended) and returns a human-readable validity message. - -#### Signature - -```ruby -def validate_response(args, _raw_data) -``` - -#### Parameters - - - expects "question\_id", "response" - - - - -#### Returns - -`Swaig::FunctionResult` - -#### Source - -[`lib/signalwire/prefabs/survey.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/survey.rb) - -Line 85. - -## Source - -[`lib/signalwire/prefabs/survey.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/prefabs/survey.rb) - -Line 23. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/action-timeout-error/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/action-timeout-error/index.mdx deleted file mode 100644 index 4da016ae3b..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/relay/action-timeout-error/index.mdx +++ /dev/null @@ -1,34 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/relay/action-timeout-error" -title: "ActionTimeoutError" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Relay::ActionTimeoutError" - parent: "SignalWire::Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb" - visibility: "public" ---- -# `ActionTimeoutError` - -Raised when an action times out waiting for completion. - -## Signature - -```ruby -class ActionTimeoutError < StandardError -``` - -## Inheritance - -**Extends:** `StandardError` - -## Source - -[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) - -Line 8. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/action/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/action/index.mdx deleted file mode 100644 index d1422f7a90..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/relay/action/index.mdx +++ /dev/null @@ -1,292 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/relay/action" -title: "Action" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Relay::Action" - parent: "SignalWire::Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb" - visibility: "public" ---- -# `Action` - -Base class for async action handles (play, record, detect, etc.). - -Holds a control\_id and back-reference to the Call. Resolves when the -server sends a terminal event for this control\_id. - -Uses Ruby's Queue for blocking wait semantics. - -## Signature - -```ruby -class Action < Object -``` - -## Inheritance - -**Extends:** `Object` - -## Methods - -### \_check\_event - -Called by Call when an event matches our control\_id. - -#### Signature - -```ruby -def _check_event(event) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) - -Line 42. - -*** - -### \_resolve - -Mark the action as completed and fire the on\_completed callback. - -#### Signature - -```ruby -def _resolve(event) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) - -Line 50. - -*** - -### \_set\_on\_completed - -Called internally to set the on\_completed callback from options. - -#### Signature - -```ruby -def _set_on_completed(callback) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) - -Line 37. - -*** - -### call - -Returns the value of attribute call. - -#### Signature - -```ruby -attr_reader call -> Object -``` - -#### Source - -[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) - -Line 17. - -*** - -### completed - -Returns the value of attribute completed. - -#### Signature - -```ruby -attr_reader completed -> Object -``` - -#### Source - -[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) - -Line 17. - -*** - -### control\_id - -Returns the value of attribute control\_id. - -#### Signature - -```ruby -attr_reader control_id -> Object -``` - -#### Source - -[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) - -Line 17. - -*** - -### done? - -#### Signature - -```ruby -def done? -``` - -#### Returns - -`Boolean` - -#### Source - -[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) - -Line 89. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(call, control_id, terminal_event, terminal_states) -``` - -#### Parameters - - - - - - - - - -#### Returns - -`Action` — a new instance of Action - -#### Source - -[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) - -Line 19. - -*** - -### is\_done? - -#### Signature - -```ruby -def done? -``` - -#### Returns - -`Boolean` - -#### Source - -[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) - -Line 93. - -*** - -### on\_completed - -Set the on\_completed callback. - -#### Signature - -```ruby -def on_completed(&block) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) - -Line 32. - -*** - -### result - -Returns the value of attribute result. - -#### Signature - -```ruby -attr_reader result -> Object -``` - -#### Source - -[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) - -Line 17. - -*** - -### wait - -Wait for the action to complete. Returns the terminal event. -Raises ActionTimeoutError if timeout is specified and exceeded. - -#### Signature - -```ruby -def wait(timeout: nil) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) - -Line 69. - -## Source - -[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) - -Line 16. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/ai-action/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/ai-action/index.mdx deleted file mode 100644 index feab7bc2f4..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/relay/ai-action/index.mdx +++ /dev/null @@ -1,76 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/relay/ai-action" -title: "AIAction" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Relay::AIAction" - parent: "SignalWire::Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb" - visibility: "public" ---- -# `AIAction` - -Handle for an active AI agent session. - -## Signature - -```ruby -class AIAction < SignalWire::Relay::Action -``` - -## Inheritance - -**Extends:** [SignalWire::Relay::Action](/docs/sdk-reference/reference/ruby/signal-wire/relay/action) - -## Methods - -### initialize - -#### Signature - -```ruby -def initialize(call, control_id) -``` - -#### Parameters - - - - - -#### Returns - -`AIAction` — a new instance of AIAction - -#### Source - -[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) - -Line 282. - -*** - -### stop - -#### Signature - -```ruby -def stop -``` - -#### Source - -[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) - -Line 286. - -## Source - -[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) - -Line 281. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/call-receive-event/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/call-receive-event/index.mdx deleted file mode 100644 index 555e44ca36..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/relay/call-receive-event/index.mdx +++ /dev/null @@ -1,238 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/relay/call-receive-event" -title: "CallReceiveEvent" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Relay::CallReceiveEvent" - parent: "SignalWire::Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" - visibility: "public" ---- -# `CallReceiveEvent` - -calling.call.receive - -## Signature - -```ruby -class CallReceiveEvent < SignalWire::Relay::RelayEvent -``` - -## Inheritance - -**Extends:** [SignalWire::Relay::RelayEvent](/docs/sdk-reference/reference/ruby/signal-wire/relay/relay-event) - -## Methods - -### call\_state - -Returns the value of attribute call\_state. - -#### Signature - -```ruby -attr_reader call_state -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 164. - -*** - -### context - -Returns the value of attribute context. - -#### Signature - -```ruby -attr_reader context -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 164. - -*** - -### device - -Returns the value of attribute device. - -#### Signature - -```ruby -attr_reader device -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 164. - -*** - -### direction - -Returns the value of attribute direction. - -#### Signature - -```ruby -attr_reader direction -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 164. - -*** - -### from\_payload - -#### Signature - -```ruby -def from_payload(payload) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 167. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(call_state: '', direction: '', device: {}, node_id: '', project_id: '', context: '', segment_id: '', tag: '', **base) -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - -#### Returns - -`CallReceiveEvent` — a new instance of CallReceiveEvent - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 184. - -*** - -### node\_id - -Returns the value of attribute node\_id. - -#### Signature - -```ruby -attr_reader node_id -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 164. - -*** - -### project\_id - -Returns the value of attribute project\_id. - -#### Signature - -```ruby -attr_reader project_id -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 164. - -*** - -### segment\_id - -Returns the value of attribute segment\_id. - -#### Signature - -```ruby -attr_reader segment_id -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 164. - -*** - -### tag - -Returns the value of attribute tag. - -#### Signature - -```ruby -attr_reader tag -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 164. - -## Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 163. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/call-state-event/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/call-state-event/index.mdx deleted file mode 100644 index 94d6d847b4..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/relay/call-state-event/index.mdx +++ /dev/null @@ -1,182 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/relay/call-state-event" -title: "CallStateEvent" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Relay::CallStateEvent" - parent: "SignalWire::Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" - visibility: "public" ---- -# `CallStateEvent` - -calling.call.state - -## Signature - -```ruby -class CallStateEvent < SignalWire::Relay::RelayEvent -``` - -## Inheritance - -**Extends:** [SignalWire::Relay::RelayEvent](/docs/sdk-reference/reference/ruby/signal-wire/relay/relay-event) - -## Methods - -### call\_state - -Returns the value of attribute call\_state. - -#### Signature - -```ruby -attr_reader call_state -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 122. - -*** - -### device - -Returns the value of attribute device. - -#### Signature - -```ruby -attr_reader device -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 122. - -*** - -### direction - -Returns the value of attribute direction. - -#### Signature - -```ruby -attr_reader direction -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 122. - -*** - -### end\_reason - -Returns the value of attribute end\_reason. - -#### Signature - -```ruby -attr_reader end_reason -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 122. - -*** - -### from\_payload - -#### Signature - -```ruby -def from_payload(payload) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 124. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(call_state: '', end_reason: '', direction: '', device: {}, **base) -``` - -#### Parameters - - - - - - - - - - - -#### Returns - -`CallStateEvent` — a new instance of CallStateEvent - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 137. - -*** - -### terminal? - -Typed predicate over \{#call\_state\}, alongside the bare string. -Agrees with \{CallState.terminal?\} — true exactly when the call has -ended (\{CallState::ENDED\}). - -#### Signature - -```ruby -def terminal? -``` - -#### Returns - -`Boolean` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 150. - -## Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 121. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/call-state/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/call-state/index.mdx deleted file mode 100644 index 670ed16ec5..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/relay/call-state/index.mdx +++ /dev/null @@ -1,107 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/relay/call-state" -title: "CallState" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "module" - language: "ruby" - qualified_name: "SignalWire::Relay::CallState" - parent: "SignalWire::Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/constants.rb" - visibility: "public" ---- -# `CallState` - -Named, frozen view over the call-state vocabulary. Additive: the wire -value stays a bare String everywhere (the events carry +call\_state+ as a -String, +Call#state+ is a String), and the flat +CALL\_STATE\_\*+ constants -above remain the single source of the literals. This module wraps them -with the Wave-A/Tier-1 idiom — a frozen +ALL+ ordered list, a frozen -+TERMINAL+ set, and a +terminal?+ predicate — so callers can ask -+CallState.terminal?(state)+ instead of hard-coding +== "ended"+. - -Grounded in +signalwire/relay/constants.py+ (+CALL\_STATES+) — the same -closed, server-emitted lifecycle the Python reference enumerates. +ended+ -is the one terminal state (the call is gone; \{Call#wait\_for\_ended\} -resolves on it). - -## Signature - -```ruby -module CallState -``` - -## Constants - - - - - - - - - - - - - - - -## Methods - -### terminal? - -#### Signature - -```ruby -def terminal?(state) -``` - -#### Parameters - - - a +call\_state+ string. - - -#### Returns - -`Boolean` — true when +state+ is a terminal call state. - -#### Source - -[`lib/signalwire/relay/constants.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/constants.rb) - -Line 62. - -*** - -### valid? - -#### Signature - -```ruby -def valid?(state) -``` - -#### Parameters - - - -#### Returns - -`Boolean` — true when +state+ is a known call state. - -#### Source - -[`lib/signalwire/relay/constants.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/constants.rb) - -Line 68. - -## Source - -[`lib/signalwire/relay/constants.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/constants.rb) - -Line 47. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/call/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/call/index.mdx deleted file mode 100644 index 553fb930ec..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/relay/call/index.mdx +++ /dev/null @@ -1,1873 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/relay/call" -title: "Call" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Relay::Call" - parent: "SignalWire::Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb" - visibility: "public" ---- -# `Call` - -Represents a live RELAY call. - -Created by RelayClient on inbound calling.call.receive events or -outbound dial responses. - -## Signature - -```ruby -class Call < Object -``` - -## Inheritance - -**Extends:** `Object` - -## Methods - -### \_dispatch\_event - -Called by RelayClient when an event arrives for this call. - -#### Signature - -```ruby -def _dispatch_event(payload) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 80. - -*** - -### \_execute - -Send a calling.<method> JSON-RPC request for this call. - -#### Signature - -```ruby -def _execute(method, extra_params = nil) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 49. - -*** - -### \_start\_action - -*** - -#### Action helper - -#### Signature - -```ruby -def _start_action(action, method, params, on_completed: nil) -``` - -#### Parameters - - - - - - - - - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 251. - -*** - -### \_wait\_for\_state - -Block until the call reaches +target+, returning immediately if the -call is already at or past that state. Backs the typed +wait\_for\_\*+ -helpers below. Mirrors Python's +Call.\_wait\_for\_state+: states are -ordered created \< ringing \< answered \< ending \< ended, and a call -already at/past the target resolves with a synthetic state event -(matching the legacy SDK's short-circuit). - -#### Signature - -```ruby -def _wait_for_state(target, timeout) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 147. - -*** - -### ai - -*** - -#### AI (returns AIAction) - -#### Signature - -```ruby -def ai(control_id: nil, on_completed: nil, **kwargs) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 746. - -*** - -### ai\_hold - -#### Signature - -```ruby -def ai_hold(**kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 466. - -*** - -### ai\_message - -*** - -#### AI - -#### Signature - -```ruby -def ai_message(**kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 462. - -*** - -### ai\_unhold - -#### Signature - -```ruby -def ai_unhold(**kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 470. - -*** - -### amazon\_bedrock - -#### Signature - -```ruby -def amazon_bedrock(**kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 474. - -*** - -### answer - -*** - -#### Call lifecycle methods - -#### Signature - -```ruby -def answer(**kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 282. - -*** - -### bind\_digit - -*** - -#### Digit binding - -#### Signature - -```ruby -def bind_digit(digits:, bind_method:, **kwargs) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 368. - -*** - -### call\_id - -Returns the value of attribute call\_id. - -#### Signature - -```ruby -attr_reader call_id -> Object -``` - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 16. - -*** - -### clear\_digit\_bindings - -#### Signature - -```ruby -def clear_digit_bindings(**kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 374. - -*** - -### collect - -#### Signature - -```ruby -def collect(collect_opts, control_id: nil, on_completed: nil, **kwargs) -``` - -#### Parameters - - - - - - - - - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 572. - -*** - -### connect - -*** - -#### Connect - -#### Signature - -```ruby -def connect(devices:, **kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 298. - -*** - -### context - -Returns the value of attribute context. - -#### Signature - -```ruby -attr_reader context -> Object -``` - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 16. - -*** - -### denoise - -*** - -#### Denoise - -#### Signature - -```ruby -def denoise -``` - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 324. - -*** - -### denoise\_stop - -#### Signature - -```ruby -def denoise_stop -``` - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 328. - -*** - -### detect - -*** - -#### Detect - -#### Signature - -```ruby -def detect(detect_opts, timeout: nil, control_id: nil, on_completed: nil, **kwargs) -``` - -#### Parameters - - - - - - - - - - - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 614. - -*** - -### detect\_answering\_machine - -Detect human vs answering machine (AMD). Typed convenience over -\#detect. Mirrors Python's +Call.detect\_answering\_machine(\*, -initial\_timeout, end\_silence\_timeout, machine\_voice\_threshold, -machine\_words\_threshold, detect\_interruptions, detect\_message\_end, -timeout, on\_completed)+. - -Wire shape: detect \{ 'type' => 'machine', 'params' => \{ ...only the -provided fields... \} \} with an optional top-level +timeout+. - -#### Signature - -```ruby -def detect_answering_machine(initial_timeout: nil, end_silence_timeout: nil, machine_voice_threshold: nil, machine_words_threshold: nil, detect_interruptions: nil, detect_message_end: nil, timeout: nil, on_completed: nil) -``` - -#### Parameters - - - - - - - - - - - - - - - - - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 645. - -*** - -### detect\_digit - -Detect DTMF digits. Typed convenience over #detect. -Mirrors Python's +Call.detect\_digit(\*, digits, timeout, -on\_completed)+. - -Wire shape: detect \{ 'type' => 'digit', 'params' => \{ digits? \} \} with -an optional top-level +timeout+. - -#### Signature - -```ruby -def detect_digit(digits: nil, timeout: nil, on_completed: nil) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 630. - -*** - -### detect\_fax - -Detect a fax tone (CED/CNG). Typed convenience over #detect. -Mirrors Python's +Call.detect\_fax(\*, tone, timeout, on\_completed)+. - -Wire shape: detect \{ 'type' => 'fax', 'params' => \{ tone? \} \} with an -optional top-level +timeout+. - -#### Signature - -```ruby -def detect_fax(tone: nil, timeout: nil, on_completed: nil) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 667. - -*** - -### device - -Returns the value of attribute device. - -#### Signature - -```ruby -attr_reader device -> Object -``` - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 16. - -*** - -### direction - -Returns the value of attribute direction. - -#### Signature - -```ruby -attr_reader direction -> Object -``` - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 16. - -*** - -### disconnect - -#### Signature - -```ruby -def disconnect -``` - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 304. - -*** - -### echo - -*** - -#### Echo - -#### Signature - -```ruby -def echo(**kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 360. - -*** - -### ended? - -#### Signature - -```ruby -def ended? -``` - -#### Returns - -`Boolean` - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 137. - -*** - -### hangup - -#### Signature - -```ruby -def hangup(reason: 'hangup') -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 286. - -*** - -### hold - -*** - -#### Hold / Unhold - -#### Signature - -```ruby -def hold -``` - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 312. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(client, call_id:, node_id:, project_id: '', context: '', tag: '', direction: '', device: {}, state: '', segment_id: '') -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - - -#### Returns - -`Call` — a new instance of Call - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 20. - -*** - -### inspect - -#### Signature - -```ruby -def inspect -``` - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 758. - -*** - -### join\_conference - -*** - -#### Conference - -#### Signature - -```ruby -def join_conference(name:, **kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 346. - -*** - -### join\_room - -*** - -#### Room - -#### Signature - -```ruby -def join_room(name:, **kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 437. - -*** - -### leave\_conference - -#### Signature - -```ruby -def leave_conference(conference_id:) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 352. - -*** - -### leave\_room - -#### Signature - -```ruby -def leave_room -``` - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 443. - -*** - -### live\_transcribe - -*** - -#### Live transcribe / translate - -#### Signature - -```ruby -def live_transcribe(action:, **kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 421. - -*** - -### live\_translate - -#### Signature - -```ruby -def live_translate(action:, **kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 427. - -*** - -### node\_id - -Returns the value of attribute node\_id. - -#### Signature - -```ruby -attr_reader node_id -> Object -``` - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 16. - -*** - -### on - -Register an event listener for this call. - -#### Signature - -```ruby -def on(event_type, &handler) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 73. - -*** - -### pass\_call - -#### Signature - -```ruby -def pass_call -``` - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 290. - -*** - -### pay - -*** - -#### Pay - -#### Signature - -```ruby -def pay(payment_connector_url:, control_id: nil, on_completed: nil, **kwargs) -``` - -#### Parameters - - - - - - - - - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 734. - -*** - -### play - -*** - -#### Audio playback (returns PlayAction) - -#### Signature - -```ruby -def play(media, volume: nil, direction: nil, loop_count: nil, control_id: nil, on_completed: nil, **kwargs) -``` - -#### Parameters - - - - - - - - - - - - - - - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 482. - -*** - -### play\_and\_collect - -*** - -#### Input collection - -#### Signature - -```ruby -def play_and_collect(media, collect, volume: nil, control_id: nil, on_completed: nil, **kwargs) -``` - -#### Parameters - - - - - - - - - - - - - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 562. - -*** - -### play\_audio - -Play an audio file from a URL. Typed convenience over #play. -Mirrors Python's +Call.play\_audio(url, \*, volume, on\_completed)+. - -Wire shape: play \[\{ 'type' => 'audio', 'params' => \{ 'url' \} \}] with an -optional top-level +volume+. - -#### Signature - -```ruby -def play_audio(url, volume: nil, on_completed: nil) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 518. - -*** - -### play\_ringtone - -Play a named ringtone by country code. Typed convenience over #play. -Mirrors Python's +Call.play\_ringtone(name, \*, duration, volume, -on\_completed)+. - -Wire shape: play \[\{ 'type' => 'ringtone', 'params' => \{ 'name', -duration? \} \}] with an optional top-level +volume+. - -#### Signature - -```ruby -def play_ringtone(name, duration: nil, volume: nil, on_completed: nil) -``` - -#### Parameters - - - - - - - - - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 538. - -*** - -### play\_silence - -Play silence for +duration+ seconds. Typed convenience over #play. -Mirrors Python's +Call.play\_silence(duration, \*, on\_completed)+. - -Wire shape: play \[\{ 'type' => 'silence', 'params' => \{ 'duration' \} \}]. - -#### Signature - -```ruby -def play_silence(duration, on_completed: nil) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 527. - -*** - -### play\_tts - -Play text-to-speech. Typed convenience over #play. - -Restores the legacy +call.play\_tts(text)+ ergonomics so callers don't -hand-build the +\{ 'type' => 'tts', 'params' => \{...\} \}+ media shape. -Mirrors Python's +Call.play\_tts(text, \*, language, gender, voice, -volume, on\_completed)+. - -Wire shape: play \[\{ 'type' => 'tts', 'params' => \{ 'text', language?, -gender?, voice? \} \}] with an optional top-level +volume+. - -#### Signature - -```ruby -def play_tts(text, language: nil, gender: nil, voice: nil, volume: nil, on_completed: nil) -``` - -#### Parameters - - - - - - - - - - - - - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 503. - -*** - -### project\_id - -Returns the value of attribute project\_id. - -#### Signature - -```ruby -attr_reader project_id -> Object -``` - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 16. - -*** - -### prompt\_audio - -Play an audio file then collect input. Typed media over -\#play\_and\_collect. Mirrors Python's +Call.prompt\_audio(url, collect, -\*, volume, on\_completed)+. - -Wire shape: play\_and\_collect \[\{ 'type' => 'audio', 'params' => -\{ 'url' \} \}] with the given +collect+ object and an optional top-level -+volume+. - -#### Signature - -```ruby -def prompt_audio(url, collect, volume: nil, on_completed: nil) -``` - -#### Parameters - - - - - - - - - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 605. - -*** - -### prompt\_tts - -Play TTS then collect input. Typed media over #play\_and\_collect. -Mirrors Python's +Call.prompt\_tts(text, collect, \*, language, gender, -voice, volume, on\_completed)+. - -Wire shape: play\_and\_collect \[\{ 'type' => 'tts', 'params' => \{ 'text', -language?, gender?, voice? \} \}] with the given +collect+ object and an -optional top-level +volume+. - -#### Signature - -```ruby -def prompt_tts(text, collect, language: nil, gender: nil, voice: nil, volume: nil, on_completed: nil) -``` - -#### Parameters - - - - - - - - - - - - - - - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 588. - -*** - -### queue\_enter - -*** - -#### Queue - -#### Signature - -```ruby -def queue_enter(queue_name:, control_id: nil, **kwargs) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 382. - -*** - -### queue\_leave - -#### Signature - -```ruby -def queue_leave(queue_name:, control_id: nil, **kwargs) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 389. - -*** - -### receive\_fax - -#### Signature - -```ruby -def receive_fax(control_id: nil, on_completed: nil, **kwargs) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 686. - -*** - -### record - -*** - -#### Recording (returns RecordAction) - -#### Signature - -```ruby -def record(audio: nil, control_id: nil, on_completed: nil, **kwargs) -``` - -#### Parameters - - - - - - - - - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 549. - -*** - -### refer - -*** - -#### Refer (SIP REFER) - -#### Signature - -```ruby -def refer(device:, **kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 400. - -*** - -### segment\_id - -Returns the value of attribute segment\_id. - -#### Signature - -```ruby -attr_reader segment_id -> Object -``` - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 16. - -*** - -### send\_digits - -*** - -#### Send digits - -#### Signature - -```ruby -def send_digits(digits:, control_id: nil, **kwargs) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 410. - -*** - -### send\_fax - -*** - -#### Fax - -#### Signature - -```ruby -def send_fax(document:, control_id: nil, on_completed: nil, **kwargs) -``` - -#### Parameters - - - - - - - - - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 678. - -*** - -### state - -Returns the value of attribute state. - -#### Signature - -```ruby -attr_accessor state <-> Object -``` - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 18. - -*** - -### state= - -Sets the attribute state - -#### Signature - -```ruby -attr_accessor state= <-> Object -``` - -#### Parameters - - - the value to set the attribute state to. - - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 18. - -*** - -### stream - -*** - -#### Stream - -#### Signature - -```ruby -def stream(url:, control_id: nil, on_completed: nil, **kwargs) -``` - -#### Parameters - - - - - - - - - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 710. - -*** - -### tag - -Returns the value of attribute tag. - -#### Signature - -```ruby -attr_reader tag -> Object -``` - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 16. - -*** - -### tap\_audio - -*** - -#### Tap - -#### Signature - -```ruby -def tap_audio(tap_opts, device:, control_id: nil, on_completed: nil, **kwargs) -``` - -#### Parameters - - - - - - - - - - - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 698. - -*** - -### to\_s - -#### Signature - -```ruby -def to_s -``` - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 754. - -*** - -### transcribe - -*** - -#### Transcribe - -#### Signature - -```ruby -def transcribe(control_id: nil, on_completed: nil, **kwargs) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 722. - -*** - -### transfer - -*** - -#### Transfer - -#### Signature - -```ruby -def transfer(dest:, **kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 336. - -*** - -### unhold - -#### Signature - -```ruby -def unhold -``` - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 316. - -*** - -### user\_event - -*** - -#### User events - -#### Signature - -```ruby -def user_event(event: nil, **kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 451. - -*** - -### wait\_for - -Wait for a specific event, optionally filtered by a predicate. - -Python parity: `Call.wait_for(event_type, predicate=None, -timeout=None)`. Registers a one-shot listener for +event\_type+ and -blocks until the first matching event arrives (or +timeout+ seconds -elapse). When +predicate+ is supplied, only events for which it -returns truthy satisfy the wait. The Python coroutine resolves an -asyncio future; the Ruby port blocks the calling thread on a -ConditionVariable, mirroring +#wait\_for\_ended+'s synchronization -model. - -#### Signature - -```ruby -def wait_for(event_type, predicate: nil, timeout: nil) -``` - -#### Parameters - - - the RELAY event type to wait for - - - - - - -#### Returns - -`RelayEvent | nil` — the matching event, or +nil+ on timeout - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 205. - -*** - -### wait\_for\_answered - -Wait until the call is answered (immediate if already answered or past -it). Typed wait over #wait\_for. Mirrors Python's -+Call.wait\_for\_answered(timeout)+. - -#### Signature - -```ruby -def wait_for_answered(timeout: nil) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 172. - -*** - -### wait\_for\_ended - -Wait for the call to reach the ended state. - -#### Signature - -```ruby -def wait_for_ended(timeout: nil) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 119. - -*** - -### wait\_for\_ending - -Wait until the call is ending (immediate if already ending or past -it). Typed wait over #wait\_for. Mirrors Python's -+Call.wait\_for\_ending(timeout)+. - -#### Signature - -```ruby -def wait_for_ending(timeout: nil) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 186. - -*** - -### wait\_for\_ringing - -Wait until the call is ringing (immediate if already ringing or past -it). Typed wait over #wait\_for. Mirrors Python's -+Call.wait\_for\_ringing(timeout)+. - -#### Signature - -```ruby -def wait_for_ringing(timeout: nil) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 179. - -## Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 15. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/calling-error-event/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/calling-error-event/index.mdx deleted file mode 100644 index e794de5136..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/relay/calling-error-event/index.mdx +++ /dev/null @@ -1,118 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/relay/calling-error-event" -title: "CallingErrorEvent" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Relay::CallingErrorEvent" - parent: "SignalWire::Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" - visibility: "public" ---- -# `CallingErrorEvent` - -calling.error - -## Signature - -```ruby -class CallingErrorEvent < SignalWire::Relay::RelayEvent -``` - -## Inheritance - -**Extends:** [SignalWire::Relay::RelayEvent](/docs/sdk-reference/reference/ruby/signal-wire/relay/relay-event) - -## Methods - -### code - -Returns the value of attribute code. - -#### Signature - -```ruby -attr_reader code -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 780. - -*** - -### from\_payload - -#### Signature - -```ruby -def from_payload(payload) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 782. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(code: '', message: '', **base) -``` - -#### Parameters - - - - - - - -#### Returns - -`CallingErrorEvent` — a new instance of CallingErrorEvent - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 793. - -*** - -### message - -Returns the value of attribute message. - -#### Signature - -```ruby -attr_reader message -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 780. - -## Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 779. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/client/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/client/index.mdx deleted file mode 100644 index 00fa34d84e..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/relay/client/index.mdx +++ /dev/null @@ -1,522 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/relay/client" -title: "Client" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Relay::Client" - parent: "SignalWire::Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb" - visibility: "public" ---- -# `Client` - -RelayClient -- WebSocket + JSON-RPC 2.0 protocol + event dispatch. - -One instance = one persistent WebSocket connection to SignalWire RELAY. - -Implements the 4 correlation mechanisms: - -1. JSON-RPC id -> pending hash with ConditionVariable -2. call\_id -> Call routing -3. control\_id -> Action tracking per Call -4. tag -> dial correlation - -## Signature - -```ruby -class Client < Object -``` - -## Inheritance - -**Extends:** `Object` - -## Methods - -### \_authorization\_state - -Return the SDK's tracked authorization-state blob (Python parity: -+RelayClient.\_authorization\_state+). Captured from -+signalwire.authorization.state+ events for use on reconnect. - -#### Signature - -```ruby -def _authorization_state -``` - -#### Source - -[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) - -Line 157. - -*** - -### \_calls\_snapshot - -Return the current call\_id -> Call registry (a snapshot copy). -Test/audit-only surface for asserting on internal routing state; -the Python reference exposes the same via +RelayClient.\_calls+. - -#### Signature - -```ruby -def _calls_snapshot -``` - -#### Source - -[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) - -Line 142. - -*** - -### \_connected? - -True when the client believes the WebSocket is open. Exposed for -tests that need to assert the recv loop is still alive after an -injected error / handler exception. - -#### Signature - -```ruby -def _connected? -``` - -#### Returns - -`Boolean` - -#### Source - -[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) - -Line 164. - -*** - -### \_set\_protocol - -Test/reconnect surface: stamp a previously issued protocol -string before calling +run+ so the next signalwire.connect frame -carries it (the production server replies with -+session\_restored: true+). Mirrors Python's +RelayClient.\_relay\_protocol = ...+. - -#### Signature - -```ruby -def _set_protocol(value) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) - -Line 150. - -*** - -### dial - -Dial outbound call(s). Returns a Call object. - -#### Signature - -```ruby -def dial(devices, timeout: 120, tag: nil, **kwargs) -``` - -#### Parameters - - - - - - - - - -#### Throws - -- `RelayError` - -#### Source - -[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) - -Line 213. - -*** - -### execute - -Send a JSON-RPC request and wait for the response. -Returns the result hash. Raises RelayError on error. - -#### Signature - -```ruby -def execute(method, params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) - -Line 309. - -*** - -### host - -Returns the value of attribute host. - -#### Signature - -```ruby -attr_reader host -> Object -``` - -#### Source - -[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) - -Line 38. - -*** - -### initialize - -Python parity: -`RelayClient(project=None, token=None, jwt_token=None, -host=None, contexts=None, max_active_calls=None)`. Ruby v1 -accepted `space:` for the same purpose; both keyword names -are honoured for backwards compat. `host` is the canonical -Python name and now drives the WebSocket endpoint. - -#### Signature - -```ruby -def initialize(project: nil, token: nil, jwt_token: nil, host: nil, contexts: ['default'], max_active_calls: nil, space: nil) -``` - -#### Parameters - - - - - - - - - - - - - - - -#### Returns - -`Client` — a new instance of Client - -#### Throws - -- `ArgumentError` - -#### Source - -[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) - -Line 58. - -*** - -### max\_active\_calls - -Returns the value of attribute max\_active\_calls. - -#### Signature - -```ruby -attr_reader max_active_calls -> Object -``` - -#### Source - -[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) - -Line 38. - -*** - -### on\_call - -Register inbound call handler. - -#### Signature - -```ruby -def on_call(&block) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) - -Line 114. - -*** - -### on\_event - -Register a generic inbound-event handler. Called for every -+signalwire.event+ frame BEFORE the type-specific handlers -(call/message/dial) run. Used by integration probes (e.g. the -audit harness) that need to react to raw events. - -#### Signature - -```ruby -def on_event(&block) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) - -Line 127. - -*** - -### on\_message - -Register inbound message handler. - -#### Signature - -```ruby -def on_message(&block) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) - -Line 119. - -*** - -### project\_id - -Returns the value of attribute project\_id. - -#### Signature - -```ruby -attr_reader project_id -> Object -``` - -#### Source - -[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) - -Line 38. - -*** - -### protocol - -Returns the value of attribute protocol. - -#### Signature - -```ruby -attr_reader protocol -> Object -``` - -#### Source - -[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) - -Line 38. - -*** - -### receive - -*** - -#### Dynamic context subscription - -#### Signature - -```ruby -def receive(contexts) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) - -Line 295. - -*** - -### run - -Connect, authenticate, subscribe, and enter the read loop. -Blocks until stop is called. - -#### Signature - -```ruby -def run -``` - -#### Source - -[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) - -Line 170. - -*** - -### send\_json - -Send an arbitrary JSON-RPC frame to the server. Public surface for -tests, the audit harness, and one-off RELAY methods that don't -have a high-level wrapper. Returns nothing; outbound failures are -silently ignored (matching +\_send\_json+ semantics). - -#### Signature - -```ruby -def send_json(msg) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) - -Line 135. - -*** - -### send\_message - -Send an SMS/MMS message. Returns a Message object. - -Mirrors Python's RelayClient.send\_message keyword-only signature -exactly. At least one of body: or media: is required. - -#### Signature - -```ruby -def send_message(to_number:, from_number:, context: nil, body: nil, media: nil, tags: nil, region: nil, on_completed: nil) -``` - -#### Parameters - - - - - - - - - - - - - - - - - -#### Source - -[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) - -Line 255. - -*** - -### stop - -Graceful shutdown. - -#### Signature - -```ruby -def stop -``` - -#### Source - -[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) - -Line 194. - -*** - -### unreceive - -#### Signature - -```ruby -def unreceive(contexts) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) - -Line 299. - -## Source - -[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) - -Line 37. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/collect-action/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/collect-action/index.mdx deleted file mode 100644 index b5d7491a8c..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/relay/collect-action/index.mdx +++ /dev/null @@ -1,135 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/relay/collect-action" -title: "CollectAction" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Relay::CollectAction" - parent: "SignalWire::Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb" - visibility: "public" ---- -# `CollectAction` - -Handle for play\_and\_collect or standalone collect. - -## Signature - -```ruby -class CollectAction < SignalWire::Relay::Action -``` - -## Inheritance - -**Extends:** [SignalWire::Relay::Action](/docs/sdk-reference/reference/ruby/signal-wire/relay/action) - -## Methods - -### \_check\_event - -play\_and\_collect shares a control\_id across play and collect -phases. Only resolve on collect events, not play events. - -#### Signature - -```ruby -def _check_event(event) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) - -Line 172. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(call, control_id) -``` - -#### Parameters - - - - - -#### Returns - -`CollectAction` — a new instance of CollectAction - -#### Source - -[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) - -Line 165. - -*** - -### start\_input\_timers - -#### Signature - -```ruby -def start_input_timers -``` - -#### Source - -[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) - -Line 193. - -*** - -### stop - -#### Signature - -```ruby -def stop -``` - -#### Source - -[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) - -Line 183. - -*** - -### volume - -#### Signature - -```ruby -def volume(vol) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) - -Line 187. - -## Source - -[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) - -Line 164. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/collect-config/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/collect-config/index.mdx deleted file mode 100644 index b54d386413..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/relay/collect-config/index.mdx +++ /dev/null @@ -1,430 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/relay/collect-config" -title: "CollectConfig" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Relay::CollectConfig" - parent: "SignalWire::Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/collect_config.rb" - visibility: "public" ---- -# `CollectConfig` - -A typed RELAY +collect+ configuration: the known-shape options object the -input-collection wrappers (\{Call#collect\}, \{Call#play\_and\_collect\}, -\{Call#prompt\_tts\}, \{Call#prompt\_audio\}) currently take as a raw Hash and -pass through verbatim onto the +calling.collect+ / -+calling.play\_and\_collect+ wire frame. - -The shape is fully grounded in -+porting-sdk/relay-protocol/calling.collect.params.json+: a +digits+ -sub-object (+max+, +min+, +digit\_timeout+, +terminators+), a +speech+ -sub-object (+end\_silence\_timeout+, +hints+, +language+, +model+, -+speech\_timeout+), and top-level toggles (+initial\_timeout+, -+partial\_results+, +continuous+, +send\_start\_of\_input+, -+start\_input\_timers+). +CollectConfig+ types that shape so callers stop -hand-building nested Hashes. - -**No closed-set enum is folded in here:** the collect shape carries _no_ -schema-enumerated value sets — +terminators+ is a free DTMF string, -+language+/+model+ are open vocabularies (ASR language tags / model -names). Inventing an enum would contradict the wire contract. (This is -why ruby's named Tier-3 collect item types only the _shape_; the Tier-1 -enum integration lives in the record/tap/SWAIG items, where the sets -genuinely _are_ closed.) - -This is **additive**: every wrapper still accepts a raw Hash. A -+CollectConfig+ yields the _identical_ wire Hash via \{#to\_h\} (string -keys, only the provided fields present — unset optionals are omitted, so -the frame is byte identical to the hand-built literal the wrapper tests -assert). - -Idiomatic Ruby value object, consistent with the Wave-A relay-event -idioms: Ruby 3.0 pattern matching (+#deconstruct\_keys+), value -+#==+/+#eql?+/+#hash+, and +#to\_h+/+#to\_json+ projections. - -## Signature - -```ruby -class CollectConfig < Object -``` - -## Inheritance - -**Extends:** `Object` - -## Examples - - - - ```ruby - cfg = SignalWire::Relay::CollectConfig.new( - digits: { max: 4, terminators: "#" }, initial_timeout: 5.0 - ) - call.collect(cfg.to_h) - ``` - - - - ```ruby - cfg = SignalWire::Relay::CollectConfig.new( - speech: { end_silence_timeout: 1.0, language: "en-US" } - ) - call.prompt_tts("Say something", cfg.to_h) - ``` - - - -## Methods - -### == - -Value equality: same projected wire shape. - -#### Signature - -```ruby -def ==(other) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/relay/collect_config.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/collect_config.rb) - -Line 127. - -*** - -### continuous - -#### Signature - -```ruby -attr_reader continuous -> Numeric | nil -``` - -#### Returns - -`Numeric | nil` - -#### Source - -[`lib/signalwire/relay/collect_config.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/collect_config.rb) - -Line 59. - -*** - -### deconstruct\_keys - -Ruby 3.0 hash pattern-matching hook. Returns symbol-keyed config with -only the _set_ fields (mirroring \{#to\_h\}'s omit-when-nil contract); a -subset of +keys+ returns only those that are both requested and set. - -#### Signature - -```ruby -def deconstruct_keys(keys) -``` - -#### Parameters - - - -#### Returns - -`Hash{Symbol => Object}` - -#### Source - -[`lib/signalwire/relay/collect_config.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/collect_config.rb) - -Line 112. - -*** - -### digits - -#### Signature - -```ruby -attr_reader digits -> Hash | nil -``` - -#### Returns - -`Hash | nil` — the +digits+ sub-config, or nil. - -#### Source - -[`lib/signalwire/relay/collect_config.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/collect_config.rb) - -Line 53. - -*** - -### eql? - -Value equality: same projected wire shape. - -#### Signature - -```ruby -def ==(other) -``` - -#### Source - -[`lib/signalwire/relay/collect_config.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/collect_config.rb) - -Line 130. - -*** - -### hash - -Hash key parity with \{#==\}. - -#### Signature - -```ruby -def hash -``` - -#### Source - -[`lib/signalwire/relay/collect_config.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/collect_config.rb) - -Line 133. - -*** - -### initial\_timeout - -#### Signature - -```ruby -attr_reader initial_timeout -> Numeric | nil -``` - -#### Returns - -`Numeric | nil` - -#### Source - -[`lib/signalwire/relay/collect_config.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/collect_config.rb) - -Line 59. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(digits: nil, speech: nil, initial_timeout: nil, partial_results: nil, continuous: nil, send_start_of_input: nil, start_input_timers: nil) -``` - -#### Parameters - - - - - - - - - - - - - - - -#### Returns - -`CollectConfig` — a new instance of CollectConfig - -#### Source - -[`lib/signalwire/relay/collect_config.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/collect_config.rb) - -Line 71. - -*** - -### inspect - -#### Signature - -```ruby -def to_s -``` - -#### Source - -[`lib/signalwire/relay/collect_config.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/collect_config.rb) - -Line 140. - -*** - -### partial\_results - -#### Signature - -```ruby -attr_reader partial_results -> Numeric | nil -``` - -#### Returns - -`Numeric | nil` - -#### Source - -[`lib/signalwire/relay/collect_config.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/collect_config.rb) - -Line 59. - -*** - -### send\_start\_of\_input - -#### Signature - -```ruby -attr_reader send_start_of_input -> Numeric | nil -``` - -#### Returns - -`Numeric | nil` - -#### Source - -[`lib/signalwire/relay/collect_config.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/collect_config.rb) - -Line 59. - -*** - -### speech - -#### Signature - -```ruby -attr_reader speech -> Hash | nil -``` - -#### Returns - -`Hash | nil` — the +speech+ sub-config, or nil. - -#### Source - -[`lib/signalwire/relay/collect_config.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/collect_config.rb) - -Line 56. - -*** - -### start\_input\_timers - -#### Signature - -```ruby -attr_reader start_input_timers -> Numeric | nil -``` - -#### Returns - -`Numeric | nil` - -#### Source - -[`lib/signalwire/relay/collect_config.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/collect_config.rb) - -Line 59. - -*** - -### to\_h - -The wire Hash, string-keyed, with **only the provided fields present** -(unset optionals omitted). +digits+/+speech+ sub-Hashes are -key-stringified one level deep. Byte identical to the collect literal a -caller would hand-write and the wrapper tests assert on the journal. - -#### Signature - -```ruby -def to_h -``` - -#### Returns - -`Hash{String => Object}` - -#### Source - -[`lib/signalwire/relay/collect_config.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/collect_config.rb) - -Line 89. - -*** - -### to\_json - -#### Signature - -```ruby -def to_json(*args) -``` - -#### Parameters - - - -#### Returns - -`String` — JSON serialization of \{#to\_h\}. - -#### Source - -[`lib/signalwire/relay/collect_config.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/collect_config.rb) - -Line 102. - -*** - -### to\_s - -#### Signature - -```ruby -def to_s -``` - -#### Source - -[`lib/signalwire/relay/collect_config.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/collect_config.rb) - -Line 137. - -## Source - -[`lib/signalwire/relay/collect_config.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/collect_config.rb) - -Line 51. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/collect-event/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/collect-event/index.mdx deleted file mode 100644 index 62a8d157a2..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/relay/collect-event/index.mdx +++ /dev/null @@ -1,158 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/relay/collect-event" -title: "CollectEvent" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Relay::CollectEvent" - parent: "SignalWire::Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" - visibility: "public" ---- -# `CollectEvent` - -calling.call.collect - -## Signature - -```ruby -class CollectEvent < SignalWire::Relay::RelayEvent -``` - -## Inheritance - -**Extends:** [SignalWire::Relay::RelayEvent](/docs/sdk-reference/reference/ruby/signal-wire/relay/relay-event) - -## Methods - -### control\_id - -Returns the value of attribute control\_id. - -#### Signature - -```ruby -attr_reader control_id -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 274. - -*** - -### final - -Returns the value of attribute final. - -#### Signature - -```ruby -attr_reader final -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 274. - -*** - -### from\_payload - -#### Signature - -```ruby -def from_payload(payload) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 276. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(control_id: '', state: '', result_data: {}, final: nil, **base) -``` - -#### Parameters - - - - - - - - - - - -#### Returns - -`CollectEvent` — a new instance of CollectEvent - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 289. - -*** - -### result\_data - -Returns the value of attribute result\_data. - -#### Signature - -```ruby -attr_reader result_data -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 274. - -*** - -### state - -Returns the value of attribute state. - -#### Signature - -```ruby -attr_reader state -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 274. - -## Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 273. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/conference-event/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/conference-event/index.mdx deleted file mode 100644 index 701993987d..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/relay/conference-event/index.mdx +++ /dev/null @@ -1,138 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/relay/conference-event" -title: "ConferenceEvent" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Relay::ConferenceEvent" - parent: "SignalWire::Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" - visibility: "public" ---- -# `ConferenceEvent` - -calling.conference - -## Signature - -```ruby -class ConferenceEvent < SignalWire::Relay::RelayEvent -``` - -## Inheritance - -**Extends:** [SignalWire::Relay::RelayEvent](/docs/sdk-reference/reference/ruby/signal-wire/relay/relay-event) - -## Methods - -### conference\_id - -Returns the value of attribute conference\_id. - -#### Signature - -```ruby -attr_reader conference_id -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 750. - -*** - -### from\_payload - -#### Signature - -```ruby -def from_payload(payload) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 752. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(conference_id: '', name: '', status: '', **base) -``` - -#### Parameters - - - - - - - - - -#### Returns - -`ConferenceEvent` — a new instance of ConferenceEvent - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 764. - -*** - -### name - -Returns the value of attribute name. - -#### Signature - -```ruby -attr_reader name -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 750. - -*** - -### status - -Returns the value of attribute status. - -#### Signature - -```ruby -attr_reader status -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 750. - -## Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 749. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/connect-event/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/connect-event/index.mdx deleted file mode 100644 index 535fb76754..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/relay/connect-event/index.mdx +++ /dev/null @@ -1,118 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/relay/connect-event" -title: "ConnectEvent" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Relay::ConnectEvent" - parent: "SignalWire::Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" - visibility: "public" ---- -# `ConnectEvent` - -calling.call.connect - -## Signature - -```ruby -class ConnectEvent < SignalWire::Relay::RelayEvent -``` - -## Inheritance - -**Extends:** [SignalWire::Relay::RelayEvent](/docs/sdk-reference/reference/ruby/signal-wire/relay/relay-event) - -## Methods - -### connect\_state - -Returns the value of attribute connect\_state. - -#### Signature - -```ruby -attr_reader connect_state -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 307. - -*** - -### from\_payload - -#### Signature - -```ruby -def from_payload(payload) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 309. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(connect_state: '', peer: {}, **base) -``` - -#### Parameters - - - - - - - -#### Returns - -`ConnectEvent` — a new instance of ConnectEvent - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 320. - -*** - -### peer - -Returns the value of attribute peer. - -#### Signature - -```ruby -attr_reader peer -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 307. - -## Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 306. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/denoise-event/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/denoise-event/index.mdx deleted file mode 100644 index ddeb49e6e5..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/relay/denoise-event/index.mdx +++ /dev/null @@ -1,98 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/relay/denoise-event" -title: "DenoiseEvent" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Relay::DenoiseEvent" - parent: "SignalWire::Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" - visibility: "public" ---- -# `DenoiseEvent` - -calling.call.denoise - -## Signature - -```ruby -class DenoiseEvent < SignalWire::Relay::RelayEvent -``` - -## Inheritance - -**Extends:** [SignalWire::Relay::RelayEvent](/docs/sdk-reference/reference/ruby/signal-wire/relay/relay-event) - -## Methods - -### denoised - -Returns the value of attribute denoised. - -#### Signature - -```ruby -attr_reader denoised -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 568. - -*** - -### from\_payload - -#### Signature - -```ruby -def from_payload(payload) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 570. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(denoised: false, **base) -``` - -#### Parameters - - - - - -#### Returns - -`DenoiseEvent` — a new instance of DenoiseEvent - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 580. - -## Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 567. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/detect-action/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/detect-action/index.mdx deleted file mode 100644 index 1f82e47a0d..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/relay/detect-action/index.mdx +++ /dev/null @@ -1,99 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/relay/detect-action" -title: "DetectAction" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Relay::DetectAction" - parent: "SignalWire::Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb" - visibility: "public" ---- -# `DetectAction` - -Handle for an active detect operation. - -## Signature - -```ruby -class DetectAction < SignalWire::Relay::Action -``` - -## Inheritance - -**Extends:** [SignalWire::Relay::Action](/docs/sdk-reference/reference/ruby/signal-wire/relay/action) - -## Methods - -### \_check\_event - -Detect delivers results continuously. Resolve on first result or -when finished/error. - -#### Signature - -```ruby -def _check_event(event) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) - -Line 150. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(call, control_id) -``` - -#### Parameters - - - - - -#### Returns - -`DetectAction` — a new instance of DetectAction - -#### Source - -[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) - -Line 144. - -*** - -### stop - -#### Signature - -```ruby -def stop -``` - -#### Source - -[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) - -Line 158. - -## Source - -[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) - -Line 143. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/detect-event/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/detect-event/index.mdx deleted file mode 100644 index bdbdb7a774..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/relay/detect-event/index.mdx +++ /dev/null @@ -1,118 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/relay/detect-event" -title: "DetectEvent" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Relay::DetectEvent" - parent: "SignalWire::Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" - visibility: "public" ---- -# `DetectEvent` - -calling.call.detect - -## Signature - -```ruby -class DetectEvent < SignalWire::Relay::RelayEvent -``` - -## Inheritance - -**Extends:** [SignalWire::Relay::RelayEvent](/docs/sdk-reference/reference/ruby/signal-wire/relay/relay-event) - -## Methods - -### control\_id - -Returns the value of attribute control\_id. - -#### Signature - -```ruby -attr_reader control_id -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 335. - -*** - -### detect - -Returns the value of attribute detect. - -#### Signature - -```ruby -attr_reader detect -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 335. - -*** - -### from\_payload - -#### Signature - -```ruby -def from_payload(payload) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 337. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(control_id: '', detect: {}, **base) -``` - -#### Parameters - - - - - - - -#### Returns - -`DetectEvent` — a new instance of DetectEvent - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 348. - -## Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 334. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/device/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/device/index.mdx deleted file mode 100644 index 2274f0a463..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/relay/device/index.mdx +++ /dev/null @@ -1,400 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/relay/device" -title: "Device" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Relay::Device" - parent: "SignalWire::Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/device.rb" - visibility: "public" ---- -# `Device` - -A typed RELAY +device+ descriptor: the +\{ "type" => ..., "params" => \{...\} \}+ -object handed to \{Call#connect\}, \{Call#refer\}, \{Call#tap\_audio\}, and -\{Client#dial\} (where it nests inside the +devices+ list-of-lists). - -Across the relay layer this is the single highest-traffic untyped blob: -a phone/sip/agora device is hand-built as a raw Hash at every call site. -+Device+ types the _shape_ — a +type+ discriminant plus a free-form -+params+ map — while leaving +type+ a String, because the discriminant -("phone", "sip", "agora", …) is **not** schema-enumerated in -+porting-sdk/relay-protocol/calling.\{connect,refer,dial,tap\}.params.json+ -(each declares +type+ as a bare +"string"+). Typing it as an enum would -invent a closed set the wire contract does not promise. - -This is **additive**: every relay method still accepts a raw Hash. A -+Device+ is a convenience that yields the _identical_ wire Hash via -\{#to\_h\}, so callers can build one and pass +device.to\_h+ (or pass the -+Device+ where a +#to\_h+-coercible value is expected). The wire shape is -+\{ "type" => <type>, "params" => <params> \}+ with **string** keys, byte -identical to the hand-written literal. - -Idiomatic Ruby value object, consistent with the Wave-A relay-event -idioms (\{RelayEvent\}): Ruby 3.0 pattern matching -(+#deconstruct\_keys+/+#deconstruct+), value +#==+/+#eql?+/+#hash+ so two -devices carrying the same data are interchangeable Set members / Hash -keys, plus +#to\_h+/+#to\_json+ projections. - -## Signature - -```ruby -class Device < Object -``` - -## Inheritance - -**Extends:** `Object` - -## Examples - - - - ```ruby - dev = SignalWire::Relay::Device.phone(to: "+15551112222", from: "+15553334444") - client.dial([[dev.to_h]], tag: "t1") - ``` - - - - ```ruby - case dev - in { type: "phone", params: { to_number: } } - puts "dialing #{to_number}" - end - ``` - - - -## Methods - -### == - -Value equality: same +type+ and same +params+. - -#### Signature - -```ruby -def ==(other) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/relay/device.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/device.rb) - -Line 124. - -*** - -### deconstruct - -Ruby 3.0 array pattern-matching hook, e.g. +in \[type, params]+. - -#### Signature - -```ruby -def deconstruct -``` - -#### Returns - -`Array(String, Hash)` - -#### Source - -[`lib/signalwire/relay/device.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/device.rb) - -Line 119. - -*** - -### deconstruct\_keys - -Ruby 3.0 hash pattern-matching hook, e.g. -+in \{ type: "phone", params: \}+. Returns symbol-keyed +\{ type:, params: \}+ -(idiomatic for Ruby pattern matching); when the matcher requests a -subset of +keys+, only those are returned. - -#### Signature - -```ruby -def deconstruct_keys(keys) -``` - -#### Parameters - - - -#### Returns - -`Hash{Symbol => Object}` - -#### Source - -[`lib/signalwire/relay/device.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/device.rb) - -Line 109. - -*** - -### eql? - -Value equality: same +type+ and same +params+. - -#### Signature - -```ruby -def ==(other) -``` - -#### Source - -[`lib/signalwire/relay/device.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/device.rb) - -Line 127. - -*** - -### hash - -Hash key parity with \{#==\}: equal devices share a hash bucket. - -#### Signature - -```ruby -def hash -``` - -#### Source - -[`lib/signalwire/relay/device.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/device.rb) - -Line 130. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(type, params = {}) -``` - -#### Parameters - - - the device discriminant. - - - - device-specific parameters. Keys are stringified for the wire on \{#to\_h\} so callers may pass symbol keys ergonomically. - - -#### Returns - -`Device` — a new instance of Device - -#### Source - -[`lib/signalwire/relay/device.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/device.rb) - -Line 54. - -*** - -### inspect - -#### Signature - -```ruby -def to_s -``` - -#### Source - -[`lib/signalwire/relay/device.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/device.rb) - -Line 137. - -*** - -### params - -#### Signature - -```ruby -attr_reader params -> Hash -``` - -#### Returns - -`Hash` — the device-specific parameters (string-keyed on the wire). - -#### Source - -[`lib/signalwire/relay/device.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/device.rb) - -Line 49. - -*** - -### phone - -Build a +phone+ device. Convenience over +new("phone", …)+ that builds -the canonical +\{ to\_number:, from\_number:, timeout? \}+ params, omitting -+timeout+ when unset (so the wire shape matches a hand-built literal). - -#### Signature - -```ruby -def phone(to:, from: nil, timeout: nil) -``` - -#### Parameters - - - - - - - -#### Returns - -`Device` - -#### Source - -[`lib/signalwire/relay/device.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/device.rb) - -Line 67. - -*** - -### sip - -Build a +sip+ device. Convenience over +new("sip", …)+. - -#### Signature - -```ruby -def sip(to:, from: nil, headers: nil) -``` - -#### Parameters - - - - - - - -#### Returns - -`Device` - -#### Source - -[`lib/signalwire/relay/device.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/device.rb) - -Line 80. - -*** - -### to\_h - -The wire Hash: +\{ "type" => <type>, "params" => <params> \}+ with string -keys, byte identical to the hand-written device literal. Symbol keys in -+params+ are stringified (one level) so a +Device+ built with symbol -params still serializes the wire spelling. - -#### Signature - -```ruby -def to_h -``` - -#### Returns - -`Hash{String => Object}` - -#### Source - -[`lib/signalwire/relay/device.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/device.rb) - -Line 93. - -*** - -### to\_json - -#### Signature - -```ruby -def to_json(*args) -``` - -#### Parameters - - - -#### Returns - -`String` — JSON serialization of \{#to\_h\}. - -#### Source - -[`lib/signalwire/relay/device.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/device.rb) - -Line 98. - -*** - -### to\_s - -#### Signature - -```ruby -def to_s -``` - -#### Source - -[`lib/signalwire/relay/device.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/device.rb) - -Line 134. - -*** - -### type - -#### Signature - -```ruby -attr_reader type -> String -``` - -#### Returns - -`String` — the device discriminant ("phone", "sip", "agora", …); a free String, not a closed enum (the wire contract does not promise a fixed set). - -#### Source - -[`lib/signalwire/relay/device.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/device.rb) - -Line 46. - -## Source - -[`lib/signalwire/relay/device.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/device.rb) - -Line 42. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/dial-event/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/dial-event/index.mdx deleted file mode 100644 index cdcb92e5db..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/relay/dial-event/index.mdx +++ /dev/null @@ -1,202 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/relay/dial-event" -title: "DialEvent" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Relay::DialEvent" - parent: "SignalWire::Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" - visibility: "public" ---- -# `DialEvent` - -calling.call.dial - -## Signature - -```ruby -class DialEvent < SignalWire::Relay::RelayEvent -``` - -## Inheritance - -**Extends:** [SignalWire::Relay::RelayEvent](/docs/sdk-reference/reference/ruby/signal-wire/relay/relay-event) - -## Methods - -### answered? - -#### Signature - -```ruby -def answered? -``` - -#### Returns - -`Boolean` — true when the dial succeeded (\{DialState::ANSWERED\}). - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 514. - -*** - -### call\_data - -Returns the value of attribute call\_data. - -#### Signature - -```ruby -attr_reader call_data -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 483. - -*** - -### dial\_state - -Returns the value of attribute dial\_state. - -#### Signature - -```ruby -attr_reader dial_state -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 483. - -*** - -### failed? - -#### Signature - -```ruby -def failed? -``` - -#### Returns - -`Boolean` — true when the dial failed (\{DialState::FAILED\}). - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 519. - -*** - -### from\_payload - -#### Signature - -```ruby -def from_payload(payload) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 485. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(tag: '', dial_state: '', call_data: {}, **base) -``` - -#### Parameters - - - - - - - - - -#### Returns - -`DialEvent` — a new instance of DialEvent - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 497. - -*** - -### tag - -Returns the value of attribute tag. - -#### Signature - -```ruby -attr_reader tag -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 483. - -*** - -### terminal? - -Typed predicate over \{#dial\_state\}, alongside the bare string. -Agrees with \{DialState.terminal?\} — true when the dial has resolved -(answered or failed). - -#### Signature - -```ruby -def terminal? -``` - -#### Returns - -`Boolean` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 509. - -## Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 482. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/dial-state/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/dial-state/index.mdx deleted file mode 100644 index d24b67157c..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/relay/dial-state/index.mdx +++ /dev/null @@ -1,117 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/relay/dial-state" -title: "DialState" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "module" - language: "ruby" - qualified_name: "SignalWire::Relay::DialState" - parent: "SignalWire::Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/constants.rb" - visibility: "public" ---- -# `DialState` - -Named, frozen view over the outbound-dial vocabulary. Unlike call/message -states, the reference exposes _no_ flat dial-state constants — the values -are grounded in +signalwire/relay/client.py+'s -+_handle\_dial\_event+ docstring ("`dial_state` — `dialing` | -`answered` | `failed`") and the mock dial-dance. This module names -them (+DIAL\_STATE_\*+ above are the single source) and adds +ALL+ + -+TERMINAL+ + +terminal?+. - -Both +answered+ and +failed+ are terminal: \{Client#dial\} resolves to a -\{Call\} on +answered+ and raises \{RelayError\} on +failed+; +dialing+ is -the only in-flight state. - -## Signature - -```ruby -module DialState -``` - -## Constants - - - - - - - - - - - -## Methods - -### terminal? - -#### Signature - -```ruby -def terminal?(state) -``` - -#### Parameters - - - a +dial\_state+ string. - - -#### Returns - -`Boolean` — true when +state+ resolves the dial. - -#### Source - -[`lib/signalwire/relay/constants.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/constants.rb) - -Line 126. - -*** - -### valid? - -#### Signature - -```ruby -def valid?(state) -``` - -#### Parameters - - - -#### Returns - -`Boolean` — true when +state+ is a known dial state. - -#### Source - -[`lib/signalwire/relay/constants.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/constants.rb) - -Line 132. - -## Source - -[`lib/signalwire/relay/constants.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/constants.rb) - -Line 106. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/echo-event/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/echo-event/index.mdx deleted file mode 100644 index ec466e9f28..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/relay/echo-event/index.mdx +++ /dev/null @@ -1,98 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/relay/echo-event" -title: "EchoEvent" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Relay::EchoEvent" - parent: "SignalWire::Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" - visibility: "public" ---- -# `EchoEvent` - -calling.call.echo - -## Signature - -```ruby -class EchoEvent < SignalWire::Relay::RelayEvent -``` - -## Inheritance - -**Extends:** [SignalWire::Relay::RelayEvent](/docs/sdk-reference/reference/ruby/signal-wire/relay/relay-event) - -## Methods - -### from\_payload - -#### Signature - -```ruby -def from_payload(payload) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 662. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(state: '', **base) -``` - -#### Parameters - - - - - -#### Returns - -`EchoEvent` — a new instance of EchoEvent - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 672. - -*** - -### state - -Returns the value of attribute state. - -#### Signature - -```ruby -attr_reader state -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 660. - -## Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 659. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/fax-action/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/fax-action/index.mdx deleted file mode 100644 index 59e4b659a0..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/relay/fax-action/index.mdx +++ /dev/null @@ -1,78 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/relay/fax-action" -title: "FaxAction" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Relay::FaxAction" - parent: "SignalWire::Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb" - visibility: "public" ---- -# `FaxAction` - -Handle for send\_fax or receive\_fax. - -## Signature - -```ruby -class FaxAction < SignalWire::Relay::Action -``` - -## Inheritance - -**Extends:** [SignalWire::Relay::Action](/docs/sdk-reference/reference/ruby/signal-wire/relay/action) - -## Methods - -### initialize - -#### Signature - -```ruby -def initialize(call, control_id, method_prefix) -``` - -#### Parameters - - - - - - - -#### Returns - -`FaxAction` — a new instance of FaxAction - -#### Source - -[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) - -Line 226. - -*** - -### stop - -#### Signature - -```ruby -def stop -``` - -#### Source - -[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) - -Line 231. - -## Source - -[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) - -Line 225. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/fax-event/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/fax-event/index.mdx deleted file mode 100644 index 2d3cf8d634..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/relay/fax-event/index.mdx +++ /dev/null @@ -1,118 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/relay/fax-event" -title: "FaxEvent" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Relay::FaxEvent" - parent: "SignalWire::Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" - visibility: "public" ---- -# `FaxEvent` - -calling.call.fax - -## Signature - -```ruby -class FaxEvent < SignalWire::Relay::RelayEvent -``` - -## Inheritance - -**Extends:** [SignalWire::Relay::RelayEvent](/docs/sdk-reference/reference/ruby/signal-wire/relay/relay-event) - -## Methods - -### control\_id - -Returns the value of attribute control\_id. - -#### Signature - -```ruby -attr_reader control_id -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 363. - -*** - -### fax - -Returns the value of attribute fax. - -#### Signature - -```ruby -attr_reader fax -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 363. - -*** - -### from\_payload - -#### Signature - -```ruby -def from_payload(payload) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 365. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(control_id: '', fax: {}, **base) -``` - -#### Parameters - - - - - - - -#### Returns - -`FaxEvent` — a new instance of FaxEvent - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 376. - -## Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 362. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/hold-event/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/hold-event/index.mdx deleted file mode 100644 index 40a3f6707f..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/relay/hold-event/index.mdx +++ /dev/null @@ -1,98 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/relay/hold-event" -title: "HoldEvent" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Relay::HoldEvent" - parent: "SignalWire::Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" - visibility: "public" ---- -# `HoldEvent` - -calling.call.hold - -## Signature - -```ruby -class HoldEvent < SignalWire::Relay::RelayEvent -``` - -## Inheritance - -**Extends:** [SignalWire::Relay::RelayEvent](/docs/sdk-reference/reference/ruby/signal-wire/relay/relay-event) - -## Methods - -### from\_payload - -#### Signature - -```ruby -def from_payload(payload) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 726. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(state: '', **base) -``` - -#### Parameters - - - - - -#### Returns - -`HoldEvent` — a new instance of HoldEvent - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 736. - -*** - -### state - -Returns the value of attribute state. - -#### Signature - -```ruby -attr_reader state -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 724. - -## Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 723. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/index.mdx deleted file mode 100644 index e9109ea5f5..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/relay/index.mdx +++ /dev/null @@ -1,461 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/relay" -title: "Relay" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "module" - language: "ruby" - qualified_name: "SignalWire::Relay" - parent: "SignalWire" - module: "SignalWire" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb" - visibility: "public" ---- -# `Relay` - -## Signature - -```ruby -module Relay -``` - -## Constants - - - - - - - Call states - - - - - - - - - - - - - - Connect states - - - - - - - - Default host - - - - - - - - Detect types - - - - - - Dial states (the +dial\_state+ field on calling.call.dial events) - - - - - - - - - - - - - - - - End reasons - - - - - - - - - - Authorization state event - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Event types — calling - - - - - - - - - - - - Map event\_type string to typed event class - - - - - - Messaging event types - - - - - - - - - - - - Message states - - - - - - - - - - - - JSON-RPC methods - - - - - - - - - - - - - - - - - - - - Play states - - - - Protocol version sent during signalwire.connect - - - - - - - - Reconnect settings - - - - - - - - - - Record states - - - - - - Join room states - - - - - - -## Classes - - - - Base class for async action handles (play, record, detect, etc.). - - - - Raised when an action times out waiting for completion. - - - - Handle for an active AI agent session. - - - - Represents a live RELAY call. - - - - calling.error - - - - calling.call.receive - - - - calling.call.state - - - - RelayClient -- WebSocket + JSON-RPC 2.0 protocol + event dispatch. - - - - Handle for play\_and\_collect or standalone collect. - - - - A typed RELAY +collect+ configuration: the known-shape options object the input-collection wrappers (\{Call#collect\}, \{Call#play\_and\_collect\}, \{Call#prompt\_tts\}, \{Call#prompt\_audio\}) currently take as a raw Hash and pass through verbatim onto the +calling.collect+ / +calling.play\_and\_collect+ wire frame. - - - - calling.call.collect - - - - calling.conference - - - - calling.call.connect - - - - calling.call.denoise - - - - Handle for an active detect operation. - - - - calling.call.detect - - - - A typed RELAY +device+ descriptor: the +\{ "type" => ..., "params" => \{...\} \}+ object handed to \{Call#connect\}, \{Call#refer\}, \{Call#tap\_audio\}, and \{Client#dial\} (where it nests inside the +devices+ list-of-lists). - - - - calling.call.dial - - - - calling.call.echo - - - - Handle for send\_fax or receive\_fax. - - - - calling.call.fax - - - - calling.call.hold - - - - Represents a single SMS/MMS message. - - - - messaging.receive - - - - messaging.state - - - - Handle for an active pay operation. - - - - calling.call.pay - - - - Handle for an active play operation. - - - - calling.call.play - - - - calling.call.queue - - - - Handle for an active record operation. - - - - calling.call.record - - - - calling.call.refer - - - - Raised for RELAY JSON-RPC errors. - - - - Base event wrapper for raw signalwire.event payloads. Subclasses provide typed accessors for specific event types. - - - - calling.call.send\_digits - - - - Handle for standalone calling.collect (without play). - - - - Handle for an active stream operation. - - - - calling.call.stream - - - - Handle for an active tap operation. - - - - calling.call.tap - - - - Handle for an active transcribe operation. - - - - calling.call.transcribe - - - -## Modules - - - - Named, frozen view over the call-state vocabulary. Additive: the wire value stays a bare String everywhere (the events carry +call\_state+ as a String, +Call#state+ is a String), and the flat +CALL\_STATE\_\*+ constants above remain the single source of the literals. This module wraps them with the Wave-A/Tier-1 idiom — a frozen +ALL+ ordered list, a frozen +TERMINAL+ set, and a +terminal?+ predicate — so callers can ask +CallState.terminal?(state)+ instead of hard-coding +== "ended"+. - - - - Named, frozen view over the outbound-dial vocabulary. Unlike call/message states, the reference exposes _no_ flat dial-state constants — the values are grounded in +signalwire/relay/client.py+'s +_handle\_dial\_event+ docstring ("`dial_state` — `dialing` | `answered` | `failed`") and the mock dial-dance. This module names them (+DIAL\_STATE_\*+ above are the single source) and adds +ALL+ + +TERMINAL+ + +terminal?+. - - - - Named, frozen view over the messaging-state vocabulary. Additive: the wire value stays a bare String (+Message#state+, the +message\_state+ event field). Wraps the flat +MESSAGE\_STATE\_\*+ constants (the single source of the literals) with +ALL+ + +TERMINAL+ + +terminal?+, so callers can ask +MessageState.terminal?(state)+ instead of re-deriving the set. - - - -## Methods - -### parse\_event - -Parse a raw signalwire.event params hash into a typed event object. - -#### Signature - -```ruby -def parse_event(payload) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 945. - -## Source - -[`lib/signalwire/relay/call.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb) - -Line 10. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/message-receive-event/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/message-receive-event/index.mdx deleted file mode 100644 index 15d524b0a4..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/relay/message-receive-event/index.mdx +++ /dev/null @@ -1,278 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/relay/message-receive-event" -title: "MessageReceiveEvent" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Relay::MessageReceiveEvent" - parent: "SignalWire::Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" - visibility: "public" ---- -# `MessageReceiveEvent` - -messaging.receive - -## Signature - -```ruby -class MessageReceiveEvent < SignalWire::Relay::RelayEvent -``` - -## Inheritance - -**Extends:** [SignalWire::Relay::RelayEvent](/docs/sdk-reference/reference/ruby/signal-wire/relay/relay-event) - -## Methods - -### body - -Returns the value of attribute body. - -#### Signature - -```ruby -attr_reader body -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 808. - -*** - -### context - -Returns the value of attribute context. - -#### Signature - -```ruby -attr_reader context -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 808. - -*** - -### direction - -Returns the value of attribute direction. - -#### Signature - -```ruby -attr_reader direction -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 808. - -*** - -### from\_number - -Returns the value of attribute from\_number. - -#### Signature - -```ruby -attr_reader from_number -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 808. - -*** - -### from\_payload - -#### Signature - -```ruby -def from_payload(payload) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 811. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(message_id: '', context: '', direction: '', from_number: '', to_number: '', body: '', media: [], segments: 0, message_state: '', tags: [], **base) -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - -#### Returns - -`MessageReceiveEvent` — a new instance of MessageReceiveEvent - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 830. - -*** - -### media - -Returns the value of attribute media. - -#### Signature - -```ruby -attr_reader media -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 808. - -*** - -### message\_id - -Returns the value of attribute message\_id. - -#### Signature - -```ruby -attr_reader message_id -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 808. - -*** - -### message\_state - -Returns the value of attribute message\_state. - -#### Signature - -```ruby -attr_reader message_state -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 808. - -*** - -### segments - -Returns the value of attribute segments. - -#### Signature - -```ruby -attr_reader segments -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 808. - -*** - -### tags - -Returns the value of attribute tags. - -#### Signature - -```ruby -attr_reader tags -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 808. - -*** - -### to\_number - -Returns the value of attribute to\_number. - -#### Signature - -```ruby -attr_reader to_number -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 808. - -## Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 807. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/message-state-event/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/message-state-event/index.mdx deleted file mode 100644 index dd923fb26e..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/relay/message-state-event/index.mdx +++ /dev/null @@ -1,322 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/relay/message-state-event" -title: "MessageStateEvent" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Relay::MessageStateEvent" - parent: "SignalWire::Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" - visibility: "public" ---- -# `MessageStateEvent` - -messaging.state - -## Signature - -```ruby -class MessageStateEvent < SignalWire::Relay::RelayEvent -``` - -## Inheritance - -**Extends:** [SignalWire::Relay::RelayEvent](/docs/sdk-reference/reference/ruby/signal-wire/relay/relay-event) - -## Methods - -### body - -Returns the value of attribute body. - -#### Signature - -```ruby -attr_reader body -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 858. - -*** - -### context - -Returns the value of attribute context. - -#### Signature - -```ruby -attr_reader context -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 858. - -*** - -### direction - -Returns the value of attribute direction. - -#### Signature - -```ruby -attr_reader direction -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 858. - -*** - -### from\_number - -Returns the value of attribute from\_number. - -#### Signature - -```ruby -attr_reader from_number -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 858. - -*** - -### from\_payload - -#### Signature - -```ruby -def from_payload(payload) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 861. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(message_id: '', context: '', direction: '', from_number: '', to_number: '', body: '', media: [], segments: 0, message_state: '', reason: '', tags: [], **base) -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - -#### Returns - -`MessageStateEvent` — a new instance of MessageStateEvent - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 881. - -*** - -### media - -Returns the value of attribute media. - -#### Signature - -```ruby -attr_reader media -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 858. - -*** - -### message\_id - -Returns the value of attribute message\_id. - -#### Signature - -```ruby -attr_reader message_id -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 858. - -*** - -### message\_state - -Returns the value of attribute message\_state. - -#### Signature - -```ruby -attr_reader message_state -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 858. - -*** - -### reason - -Returns the value of attribute reason. - -#### Signature - -```ruby -attr_reader reason -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 858. - -*** - -### segments - -Returns the value of attribute segments. - -#### Signature - -```ruby -attr_reader segments -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 858. - -*** - -### tags - -Returns the value of attribute tags. - -#### Signature - -```ruby -attr_reader tags -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 858. - -*** - -### terminal? - -Typed predicate over \{#message\_state\}, alongside the bare string. -Agrees with \{MessageState.terminal?\} — true when the message has -reached a final delivery outcome (delivered / undelivered / failed). - -#### Signature - -```ruby -def terminal? -``` - -#### Returns - -`Boolean` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 903. - -*** - -### to\_number - -Returns the value of attribute to\_number. - -#### Signature - -```ruby -attr_reader to_number -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 858. - -## Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 857. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/message-state/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/message-state/index.mdx deleted file mode 100644 index 1efa269f51..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/relay/message-state/index.mdx +++ /dev/null @@ -1,116 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/relay/message-state" -title: "MessageState" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "module" - language: "ruby" - qualified_name: "SignalWire::Relay::MessageState" - parent: "SignalWire::Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/constants.rb" - visibility: "public" ---- -# `MessageState` - -Named, frozen view over the messaging-state vocabulary. Additive: the -wire value stays a bare String (+Message#state+, the +message\_state+ -event field). Wraps the flat +MESSAGE\_STATE\_\*+ constants (the single -source of the literals) with +ALL+ + +TERMINAL+ + +terminal?+, so callers -can ask +MessageState.terminal?(state)+ instead of re-deriving the set. - -Grounded in +signalwire/relay/constants.py+: the terminal set is -+MESSAGE\_TERMINAL\_STATES+ (\{delivered, undelivered, failed\}) — the same -set the Python reference uses to resolve a sent message's final outcome. - -## Signature - -```ruby -module MessageState -``` - -## Constants - - - - - - - - - - - - - - - - - - - -## Methods - -### terminal? - -#### Signature - -```ruby -def terminal?(state) -``` - -#### Parameters - - - a +message\_state+ string. - - -#### Returns - -`Boolean` — true when +state+ is a terminal messaging state. - -#### Source - -[`lib/signalwire/relay/constants.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/constants.rb) - -Line 212. - -*** - -### valid? - -#### Signature - -```ruby -def valid?(state) -``` - -#### Parameters - - - -#### Returns - -`Boolean` — true when +state+ is a known messaging state. - -#### Source - -[`lib/signalwire/relay/constants.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/constants.rb) - -Line 218. - -## Source - -[`lib/signalwire/relay/constants.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/constants.rb) - -Line 187. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/message/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/message/index.mdx deleted file mode 100644 index 1e9537d07c..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/relay/message/index.mdx +++ /dev/null @@ -1,677 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/relay/message" -title: "Message" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Relay::Message" - parent: "SignalWire::Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb" - visibility: "public" ---- -# `Message` - -Represents a single SMS/MMS message. - -For outbound messages, use message.wait to block until a terminal state -(delivered, undelivered, failed) is reached. - -## Signature - -```ruby -class Message < Object -``` - -## Inheritance - -**Extends:** `Object` - -## Methods - -### \_dispatch\_event - -Handle a messaging.state event for this message. - -#### Signature - -```ruby -def _dispatch_event(payload) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) - -Line 99. - -*** - -### \_set\_on\_completed - -Set the on\_completed callback from options. - -#### Signature - -```ruby -def _set_on_completed(callback) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) - -Line 47. - -*** - -### == - -Value equality over the message's data (ignores completion state). - -#### Signature - -```ruby -def ==(other) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) - -Line 173. - -*** - -### body - -Returns the value of attribute body. - -#### Signature - -```ruby -attr_reader body -> Object -``` - -#### Source - -[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) - -Line 13. - -*** - -### context - -Returns the value of attribute context. - -#### Signature - -```ruby -attr_reader context -> Object -``` - -#### Source - -[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) - -Line 13. - -*** - -### deconstruct - -Array pattern matching: the stable identity triple. - -#### Signature - -```ruby -def deconstruct -``` - -#### Returns - -`Array` - -#### Source - -[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) - -Line 168. - -*** - -### deconstruct\_keys - -Ruby 3.0 pattern matching: +case msg; in \{ direction:, body: \}+. - -#### Signature - -```ruby -def deconstruct_keys(keys) -``` - -#### Parameters - - - -#### Returns - -`Hash{Symbol => Object}` - -#### Source - -[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) - -Line 157. - -*** - -### direction - -Returns the value of attribute direction. - -#### Signature - -```ruby -attr_reader direction -> Object -``` - -#### Source - -[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) - -Line 13. - -*** - -### done? - -#### Signature - -```ruby -def done? -``` - -#### Returns - -`Boolean` - -#### Source - -[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) - -Line 56. - -*** - -### eql? - -Value equality over the message's data (ignores completion state). - -#### Signature - -```ruby -def ==(other) -``` - -#### Source - -[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) - -Line 176. - -*** - -### from\_number - -Returns the value of attribute from\_number. - -#### Signature - -```ruby -attr_reader from_number -> Object -``` - -#### Source - -[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) - -Line 13. - -*** - -### hash - -Hash parity with \{#==\} so equal messages share a bucket. - -#### Signature - -```ruby -def hash -``` - -#### Source - -[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) - -Line 179. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(message_id: '', context: '', direction: '', from_number: '', to_number: '', body: '', media: nil, segments: 0, state: '', reason: '', tags: nil) -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - -#### Returns - -`Message` — a new instance of Message - -#### Source - -[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) - -Line 17. - -*** - -### inspect - -#### Signature - -```ruby -def inspect -``` - -#### Source - -[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) - -Line 126. - -*** - -### is\_done? - -#### Signature - -```ruby -def done? -``` - -#### Returns - -`Boolean` - -#### Source - -[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) - -Line 60. - -*** - -### media - -Returns the value of attribute media. - -#### Signature - -```ruby -attr_reader media -> Object -``` - -#### Source - -[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) - -Line 13. - -*** - -### message\_id - -Returns the value of attribute message\_id. - -#### Signature - -```ruby -attr_reader message_id -> Object -``` - -#### Source - -[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) - -Line 13. - -*** - -### on\_completed - -Set the on\_completed callback. - -#### Signature - -```ruby -def on_completed(&block) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) - -Line 42. - -*** - -### on\_event - -Register an event listener for state changes. - -#### Signature - -```ruby -def on_event(&handler) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) - -Line 52. - -*** - -### reason - -Returns the value of attribute reason. - -#### Signature - -```ruby -attr_reader reason -> Object -``` - -#### Source - -[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) - -Line 13. - -*** - -### result - -#### Signature - -```ruby -def result -``` - -#### Source - -[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) - -Line 72. - -*** - -### segments - -Returns the value of attribute segments. - -#### Signature - -```ruby -attr_reader segments -> Object -``` - -#### Source - -[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) - -Line 13. - -*** - -### state - -Returns the value of attribute state. - -#### Signature - -```ruby -attr_accessor state <-> Object -``` - -#### Source - -[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) - -Line 15. - -*** - -### state= - -Sets the attribute state - -#### Signature - -```ruby -attr_accessor state= <-> Object -``` - -#### Parameters - - - the value to set the attribute state to. - - -#### Source - -[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) - -Line 15. - -*** - -### tags - -Returns the value of attribute tags. - -#### Signature - -```ruby -attr_reader tags -> Object -``` - -#### Source - -[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) - -Line 13. - -*** - -### terminal? - -Typed predicate over \{#state\}, alongside the bare string. Agrees with -\{MessageState.terminal?\} — true once the message has reached a final -delivery outcome (delivered / undelivered / failed), which is exactly -when \{#wait\} unblocks. - -#### Signature - -```ruby -def terminal? -``` - -#### Returns - -`Boolean` - -#### Source - -[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) - -Line 68. - -*** - -### to\_h - -Semantic Hash view of the message's value fields (the completion -machinery — mutex/condition/callbacks — is excluded). Symbol keys, -idiomatic for Ruby. @return \[Hash\{Symbol => Object\}] - -#### Signature - -```ruby -def to_h -``` - -#### Source - -[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) - -Line 133. - -*** - -### to\_json - -#### Signature - -```ruby -def to_json(*args) -``` - -#### Parameters - - - -#### Returns - -`String` — JSON serialization of \{#to\_h\}. - -#### Source - -[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) - -Line 150. - -*** - -### to\_number - -Returns the value of attribute to\_number. - -#### Signature - -```ruby -attr_reader to_number -> Object -``` - -#### Source - -[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) - -Line 13. - -*** - -### to\_s - -#### Signature - -```ruby -def to_s -``` - -#### Source - -[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) - -Line 121. - -*** - -### wait - -Wait for the message to reach a terminal state. -Raises ActionTimeoutError if timeout exceeded. - -#### Signature - -```ruby -def wait(timeout: nil) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) - -Line 78. - -## Source - -[`lib/signalwire/relay/message.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb) - -Line 12. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/pay-action/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/pay-action/index.mdx deleted file mode 100644 index 55e86c82e7..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/relay/pay-action/index.mdx +++ /dev/null @@ -1,76 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/relay/pay-action" -title: "PayAction" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Relay::PayAction" - parent: "SignalWire::Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb" - visibility: "public" ---- -# `PayAction` - -Handle for an active pay operation. - -## Signature - -```ruby -class PayAction < SignalWire::Relay::Action -``` - -## Inheritance - -**Extends:** [SignalWire::Relay::Action](/docs/sdk-reference/reference/ruby/signal-wire/relay/action) - -## Methods - -### initialize - -#### Signature - -```ruby -def initialize(call, control_id) -``` - -#### Parameters - - - - - -#### Returns - -`PayAction` — a new instance of PayAction - -#### Source - -[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) - -Line 260. - -*** - -### stop - -#### Signature - -```ruby -def stop -``` - -#### Source - -[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) - -Line 264. - -## Source - -[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) - -Line 259. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/pay-event/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/pay-event/index.mdx deleted file mode 100644 index c7f78b2f02..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/relay/pay-event/index.mdx +++ /dev/null @@ -1,118 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/relay/pay-event" -title: "PayEvent" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Relay::PayEvent" - parent: "SignalWire::Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" - visibility: "public" ---- -# `PayEvent` - -calling.call.pay - -## Signature - -```ruby -class PayEvent < SignalWire::Relay::RelayEvent -``` - -## Inheritance - -**Extends:** [SignalWire::Relay::RelayEvent](/docs/sdk-reference/reference/ruby/signal-wire/relay/relay-event) - -## Methods - -### control\_id - -Returns the value of attribute control\_id. - -#### Signature - -```ruby -attr_reader control_id -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 594. - -*** - -### from\_payload - -#### Signature - -```ruby -def from_payload(payload) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 596. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(control_id: '', state: '', **base) -``` - -#### Parameters - - - - - - - -#### Returns - -`PayEvent` — a new instance of PayEvent - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 607. - -*** - -### state - -Returns the value of attribute state. - -#### Signature - -```ruby -attr_reader state -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 594. - -## Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 593. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/play-action/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/play-action/index.mdx deleted file mode 100644 index 3ecdc3080e..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/relay/play-action/index.mdx +++ /dev/null @@ -1,128 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/relay/play-action" -title: "PlayAction" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Relay::PlayAction" - parent: "SignalWire::Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb" - visibility: "public" ---- -# `PlayAction` - -Handle for an active play operation. - -## Signature - -```ruby -class PlayAction < SignalWire::Relay::Action -``` - -## Inheritance - -**Extends:** [SignalWire::Relay::Action](/docs/sdk-reference/reference/ruby/signal-wire/relay/action) - -## Methods - -### initialize - -#### Signature - -```ruby -def initialize(call, control_id) -``` - -#### Parameters - - - - - -#### Returns - -`PlayAction` — a new instance of PlayAction - -#### Source - -[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) - -Line 98. - -*** - -### pause - -#### Signature - -```ruby -def pause -``` - -#### Source - -[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) - -Line 107. - -*** - -### resume - -#### Signature - -```ruby -def resume -``` - -#### Source - -[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) - -Line 111. - -*** - -### stop - -#### Signature - -```ruby -def stop -``` - -#### Source - -[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) - -Line 103. - -*** - -### volume - -#### Signature - -```ruby -def volume(vol) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) - -Line 115. - -## Source - -[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) - -Line 97. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/play-event/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/play-event/index.mdx deleted file mode 100644 index c1366b9466..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/relay/play-event/index.mdx +++ /dev/null @@ -1,118 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/relay/play-event" -title: "PlayEvent" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Relay::PlayEvent" - parent: "SignalWire::Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" - visibility: "public" ---- -# `PlayEvent` - -calling.call.play - -## Signature - -```ruby -class PlayEvent < SignalWire::Relay::RelayEvent -``` - -## Inheritance - -**Extends:** [SignalWire::Relay::RelayEvent](/docs/sdk-reference/reference/ruby/signal-wire/relay/relay-event) - -## Methods - -### control\_id - -Returns the value of attribute control\_id. - -#### Signature - -```ruby -attr_reader control_id -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 208. - -*** - -### from\_payload - -#### Signature - -```ruby -def from_payload(payload) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 210. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(control_id: '', state: '', **base) -``` - -#### Parameters - - - - - - - -#### Returns - -`PlayEvent` — a new instance of PlayEvent - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 221. - -*** - -### state - -Returns the value of attribute state. - -#### Signature - -```ruby -attr_reader state -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 208. - -## Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 207. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/queue-event/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/queue-event/index.mdx deleted file mode 100644 index 4f4d165f39..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/relay/queue-event/index.mdx +++ /dev/null @@ -1,198 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/relay/queue-event" -title: "QueueEvent" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Relay::QueueEvent" - parent: "SignalWire::Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" - visibility: "public" ---- -# `QueueEvent` - -calling.call.queue - -## Signature - -```ruby -class QueueEvent < SignalWire::Relay::RelayEvent -``` - -## Inheritance - -**Extends:** [SignalWire::Relay::RelayEvent](/docs/sdk-reference/reference/ruby/signal-wire/relay/relay-event) - -## Methods - -### control\_id - -Returns the value of attribute control\_id. - -#### Signature - -```ruby -attr_reader control_id -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 622. - -*** - -### from\_payload - -#### Signature - -```ruby -def from_payload(payload) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 624. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(control_id: '', status: '', queue_id: '', queue_name: '', position: 0, size: 0, **base) -``` - -#### Parameters - - - - - - - - - - - - - - - -#### Returns - -`QueueEvent` — a new instance of QueueEvent - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 639. - -*** - -### position - -Returns the value of attribute position. - -#### Signature - -```ruby -attr_reader position -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 622. - -*** - -### queue\_id - -Returns the value of attribute queue\_id. - -#### Signature - -```ruby -attr_reader queue_id -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 622. - -*** - -### queue\_name - -Returns the value of attribute queue\_name. - -#### Signature - -```ruby -attr_reader queue_name -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 622. - -*** - -### size - -Returns the value of attribute size. - -#### Signature - -```ruby -attr_reader size -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 622. - -*** - -### status - -Returns the value of attribute status. - -#### Signature - -```ruby -attr_reader status -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 622. - -## Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 621. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/record-action/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/record-action/index.mdx deleted file mode 100644 index 093ef8f83e..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/relay/record-action/index.mdx +++ /dev/null @@ -1,112 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/relay/record-action" -title: "RecordAction" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Relay::RecordAction" - parent: "SignalWire::Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb" - visibility: "public" ---- -# `RecordAction` - -Handle for an active record operation. - -## Signature - -```ruby -class RecordAction < SignalWire::Relay::Action -``` - -## Inheritance - -**Extends:** [SignalWire::Relay::Action](/docs/sdk-reference/reference/ruby/signal-wire/relay/action) - -## Methods - -### initialize - -#### Signature - -```ruby -def initialize(call, control_id) -``` - -#### Parameters - - - - - -#### Returns - -`RecordAction` — a new instance of RecordAction - -#### Source - -[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) - -Line 122. - -*** - -### pause - -#### Signature - -```ruby -def pause(behavior: nil) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) - -Line 131. - -*** - -### resume - -#### Signature - -```ruby -def resume -``` - -#### Source - -[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) - -Line 137. - -*** - -### stop - -#### Signature - -```ruby -def stop -``` - -#### Source - -[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) - -Line 127. - -## Source - -[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) - -Line 121. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/record-event/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/record-event/index.mdx deleted file mode 100644 index 14703b7448..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/relay/record-event/index.mdx +++ /dev/null @@ -1,198 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/relay/record-event" -title: "RecordEvent" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Relay::RecordEvent" - parent: "SignalWire::Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" - visibility: "public" ---- -# `RecordEvent` - -calling.call.record - -## Signature - -```ruby -class RecordEvent < SignalWire::Relay::RelayEvent -``` - -## Inheritance - -**Extends:** [SignalWire::Relay::RelayEvent](/docs/sdk-reference/reference/ruby/signal-wire/relay/relay-event) - -## Methods - -### control\_id - -Returns the value of attribute control\_id. - -#### Signature - -```ruby -attr_reader control_id -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 236. - -*** - -### duration - -Returns the value of attribute duration. - -#### Signature - -```ruby -attr_reader duration -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 236. - -*** - -### from\_payload - -#### Signature - -```ruby -def from_payload(payload) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 238. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(control_id: '', state: '', url: '', duration: 0.0, size: 0, record: {}, **base) -``` - -#### Parameters - - - - - - - - - - - - - - - -#### Returns - -`RecordEvent` — a new instance of RecordEvent - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 254. - -*** - -### record - -Returns the value of attribute record. - -#### Signature - -```ruby -attr_reader record -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 236. - -*** - -### size - -Returns the value of attribute size. - -#### Signature - -```ruby -attr_reader size -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 236. - -*** - -### state - -Returns the value of attribute state. - -#### Signature - -```ruby -attr_reader state -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 236. - -*** - -### url - -Returns the value of attribute url. - -#### Signature - -```ruby -attr_reader url -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 236. - -## Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 235. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/refer-event/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/refer-event/index.mdx deleted file mode 100644 index 963cd0d9e8..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/relay/refer-event/index.mdx +++ /dev/null @@ -1,158 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/relay/refer-event" -title: "ReferEvent" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Relay::ReferEvent" - parent: "SignalWire::Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" - visibility: "public" ---- -# `ReferEvent` - -calling.call.refer - -## Signature - -```ruby -class ReferEvent < SignalWire::Relay::RelayEvent -``` - -## Inheritance - -**Extends:** [SignalWire::Relay::RelayEvent](/docs/sdk-reference/reference/ruby/signal-wire/relay/relay-event) - -## Methods - -### from\_payload - -#### Signature - -```ruby -def from_payload(payload) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 535. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(state: '', sip_refer_to: '', sip_refer_response_code: '', sip_notify_response_code: '', **base) -``` - -#### Parameters - - - - - - - - - - - -#### Returns - -`ReferEvent` — a new instance of ReferEvent - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 548. - -*** - -### sip\_notify\_response\_code - -Returns the value of attribute sip\_notify\_response\_code. - -#### Signature - -```ruby -attr_reader sip_notify_response_code -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 532. - -*** - -### sip\_refer\_response\_code - -Returns the value of attribute sip\_refer\_response\_code. - -#### Signature - -```ruby -attr_reader sip_refer_response_code -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 532. - -*** - -### sip\_refer\_to - -Returns the value of attribute sip\_refer\_to. - -#### Signature - -```ruby -attr_reader sip_refer_to -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 532. - -*** - -### state - -Returns the value of attribute state. - -#### Signature - -```ruby -attr_reader state -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 532. - -## Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 531. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/relay-error/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/relay-error/index.mdx deleted file mode 100644 index 40bba9451e..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/relay/relay-error/index.mdx +++ /dev/null @@ -1,96 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/relay/relay-error" -title: "RelayError" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Relay::RelayError" - parent: "SignalWire::Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb" - visibility: "public" ---- -# `RelayError` - -Raised for RELAY JSON-RPC errors. - -## Signature - -```ruby -class RelayError < StandardError -``` - -## Inheritance - -**Extends:** `StandardError` - -## Methods - -### code - -Returns the value of attribute code. - -#### Signature - -```ruby -attr_reader code -> Object -``` - -#### Source - -[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) - -Line 19. - -*** - -### error\_message - -Returns the value of attribute error\_message. - -#### Signature - -```ruby -attr_reader error_message -> Object -``` - -#### Source - -[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) - -Line 19. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(code, message) -``` - -#### Parameters - - - - - -#### Returns - -`RelayError` — a new instance of RelayError - -#### Source - -[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) - -Line 21. - -## Source - -[`lib/signalwire/relay/client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb) - -Line 18. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/relay-event/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/relay-event/index.mdx deleted file mode 100644 index a9d9c5d0e2..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/relay/relay-event/index.mdx +++ /dev/null @@ -1,344 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/relay/relay-event" -title: "RelayEvent" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Relay::RelayEvent" - parent: "SignalWire::Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" - visibility: "public" ---- -# `RelayEvent` - -Base event wrapper for raw signalwire.event payloads. -Subclasses provide typed accessors for specific event types. - -Idiomatic Ruby surface (defined once here, inherited by every typed -subclass so the cross-language audit only counts it on the base): - -- +#to\_h+ / +#to\_json+ — a clean, semantic Hash/JSON view of the - event (the common +event\_type+/+call\_id+/+timestamp+ fields plus - whatever typed fields the subclass declares). -- +#deconstruct\_keys+ / +#deconstruct+ — Ruby 3.0 pattern matching, - so callers can write - case event - in \{ event\_type: "calling.call.state", call\_state: \} - ... - end -- value +#==+ / +#eql?+ / +#hash+ — two events carrying the same - semantic data compare equal and hash equal, so events work as - Set members and Hash keys. - -Subclasses contribute their typed fields by overriding the private -+#\_event\_fields+ hook (underscore-prefixed, so it stays off the -public surface); they never redefine +#to\_h+/+#==+/etc. themselves. - -## Signature - -```ruby -class RelayEvent < Object -``` - -## Inheritance - -**Extends:** `Object` - -## Methods - -### == - -Value equality: same concrete class carrying the same semantic data. -Exact-class (not +is\_a?+) so a typed event never equals a bare -+RelayEvent+ that happens to share the envelope. - -#### Signature - -```ruby -def ==(other) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 98. - -*** - -### call\_id - -Returns the value of attribute call\_id. - -#### Signature - -```ruby -attr_reader call_id -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 31. - -*** - -### deconstruct - -Ruby 3.0 array pattern-matching hook for +in \[a, b, c]+. The stable, -cross-event positional triple is the envelope: event type, call id, -timestamp. - -#### Signature - -```ruby -def deconstruct -``` - -#### Returns - -`Array` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 91. - -*** - -### deconstruct\_keys - -Ruby 3.0 pattern-matching hook for +in \{ key: \}+ / +in \{ key: \}+. -Returns the same Symbol-keyed map as \{#to\_h\}. When the matcher -requests a specific subset of +keys+, only those are computed/returned -(the contract +deconstruct\_keys+ promises the pattern matcher). - -#### Signature - -```ruby -def deconstruct_keys(keys) -``` - -#### Parameters - - - keys the pattern is matching, or nil - - -#### Returns - -`Hash{Symbol => Object}` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 77. - -*** - -### eql? - -Value equality: same concrete class carrying the same semantic data. -Exact-class (not +is\_a?+) so a typed event never equals a bare -+RelayEvent+ that happens to share the envelope. - -#### Signature - -```ruby -def ==(other) -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 101. - -*** - -### event\_type - -Returns the value of attribute event\_type. - -#### Signature - -```ruby -attr_reader event_type -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 31. - -*** - -### from\_payload - -#### Signature - -```ruby -def from_payload(payload) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 40. - -*** - -### hash - -Hash key parity with \{#==\}: equal events share a hash bucket, so they -behave correctly as Set members and Hash keys. - -#### Signature - -```ruby -def hash -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 105. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(event_type:, params: {}, call_id: '', timestamp: 0.0) -``` - -#### Parameters - - - - - - - - - -#### Returns - -`RelayEvent` — a new instance of RelayEvent - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 33. - -*** - -### params - -Returns the value of attribute params. - -#### Signature - -```ruby -attr_reader params -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 31. - -*** - -### timestamp - -Returns the value of attribute timestamp. - -#### Signature - -```ruby -attr_reader timestamp -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 31. - -*** - -### to\_h - -Semantic Hash view: the shared envelope fields plus the subclass's -typed fields. Raw +params+ are intentionally excluded — +#to\_h+ is -the friendly, typed projection, not the wire frame (which stays -available via +#params+). Keys are symbols, idiomatic for Ruby. - -#### Signature - -```ruby -def to_h -``` - -#### Returns - -`Hash{Symbol => Object}` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 57. - -*** - -### to\_json - -#### Signature - -```ruby -def to_json(*args) -``` - -#### Parameters - - - -#### Returns - -`String` — JSON serialization of \{#to\_h\}. - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 66. - -## Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 30. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/send-digits-event/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/send-digits-event/index.mdx deleted file mode 100644 index 905c7c3435..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/relay/send-digits-event/index.mdx +++ /dev/null @@ -1,118 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/relay/send-digits-event" -title: "SendDigitsEvent" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Relay::SendDigitsEvent" - parent: "SignalWire::Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" - visibility: "public" ---- -# `SendDigitsEvent` - -calling.call.send\_digits - -## Signature - -```ruby -class SendDigitsEvent < SignalWire::Relay::RelayEvent -``` - -## Inheritance - -**Extends:** [SignalWire::Relay::RelayEvent](/docs/sdk-reference/reference/ruby/signal-wire/relay/relay-event) - -## Methods - -### control\_id - -Returns the value of attribute control\_id. - -#### Signature - -```ruby -attr_reader control_id -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 455. - -*** - -### from\_payload - -#### Signature - -```ruby -def from_payload(payload) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 457. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(control_id: '', state: '', **base) -``` - -#### Parameters - - - - - - - -#### Returns - -`SendDigitsEvent` — a new instance of SendDigitsEvent - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 468. - -*** - -### state - -Returns the value of attribute state. - -#### Signature - -```ruby -attr_reader state -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 455. - -## Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 454. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/standalone-collect-action/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/standalone-collect-action/index.mdx deleted file mode 100644 index 2bd26d2a6c..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/relay/standalone-collect-action/index.mdx +++ /dev/null @@ -1,112 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/relay/standalone-collect-action" -title: "StandaloneCollectAction" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Relay::StandaloneCollectAction" - parent: "SignalWire::Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb" - visibility: "public" ---- -# `StandaloneCollectAction` - -Handle for standalone calling.collect (without play). - -## Signature - -```ruby -class StandaloneCollectAction < SignalWire::Relay::Action -``` - -## Inheritance - -**Extends:** [SignalWire::Relay::Action](/docs/sdk-reference/reference/ruby/signal-wire/relay/action) - -## Methods - -### \_check\_event - -#### Signature - -```ruby -def _check_event(event) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) - -Line 205. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(call, control_id) -``` - -#### Parameters - - - - - -#### Returns - -`StandaloneCollectAction` — a new instance of StandaloneCollectAction - -#### Source - -[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) - -Line 200. - -*** - -### start\_input\_timers - -#### Signature - -```ruby -def start_input_timers -``` - -#### Source - -[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) - -Line 219. - -*** - -### stop - -#### Signature - -```ruby -def stop -``` - -#### Source - -[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) - -Line 215. - -## Source - -[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) - -Line 199. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/stream-action/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/stream-action/index.mdx deleted file mode 100644 index 7f7a30483b..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/relay/stream-action/index.mdx +++ /dev/null @@ -1,76 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/relay/stream-action" -title: "StreamAction" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Relay::StreamAction" - parent: "SignalWire::Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb" - visibility: "public" ---- -# `StreamAction` - -Handle for an active stream operation. - -## Signature - -```ruby -class StreamAction < SignalWire::Relay::Action -``` - -## Inheritance - -**Extends:** [SignalWire::Relay::Action](/docs/sdk-reference/reference/ruby/signal-wire/relay/action) - -## Methods - -### initialize - -#### Signature - -```ruby -def initialize(call, control_id) -``` - -#### Parameters - - - - - -#### Returns - -`StreamAction` — a new instance of StreamAction - -#### Source - -[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) - -Line 249. - -*** - -### stop - -#### Signature - -```ruby -def stop -``` - -#### Source - -[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) - -Line 253. - -## Source - -[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) - -Line 248. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/stream-event/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/stream-event/index.mdx deleted file mode 100644 index 9f45644214..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/relay/stream-event/index.mdx +++ /dev/null @@ -1,158 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/relay/stream-event" -title: "StreamEvent" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Relay::StreamEvent" - parent: "SignalWire::Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" - visibility: "public" ---- -# `StreamEvent` - -calling.call.stream - -## Signature - -```ruby -class StreamEvent < SignalWire::Relay::RelayEvent -``` - -## Inheritance - -**Extends:** [SignalWire::Relay::RelayEvent](/docs/sdk-reference/reference/ruby/signal-wire/relay/relay-event) - -## Methods - -### control\_id - -Returns the value of attribute control\_id. - -#### Signature - -```ruby -attr_reader control_id -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 423. - -*** - -### from\_payload - -#### Signature - -```ruby -def from_payload(payload) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 425. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(control_id: '', state: '', url: '', name: '', **base) -``` - -#### Parameters - - - - - - - - - - - -#### Returns - -`StreamEvent` — a new instance of StreamEvent - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 438. - -*** - -### name - -Returns the value of attribute name. - -#### Signature - -```ruby -attr_reader name -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 423. - -*** - -### state - -Returns the value of attribute state. - -#### Signature - -```ruby -attr_reader state -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 423. - -*** - -### url - -Returns the value of attribute url. - -#### Signature - -```ruby -attr_reader url -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 423. - -## Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 422. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/tap-action/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/tap-action/index.mdx deleted file mode 100644 index 59fee3ebdd..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/relay/tap-action/index.mdx +++ /dev/null @@ -1,76 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/relay/tap-action" -title: "TapAction" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Relay::TapAction" - parent: "SignalWire::Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb" - visibility: "public" ---- -# `TapAction` - -Handle for an active tap operation. - -## Signature - -```ruby -class TapAction < SignalWire::Relay::Action -``` - -## Inheritance - -**Extends:** [SignalWire::Relay::Action](/docs/sdk-reference/reference/ruby/signal-wire/relay/action) - -## Methods - -### initialize - -#### Signature - -```ruby -def initialize(call, control_id) -``` - -#### Parameters - - - - - -#### Returns - -`TapAction` — a new instance of TapAction - -#### Source - -[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) - -Line 238. - -*** - -### stop - -#### Signature - -```ruby -def stop -``` - -#### Source - -[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) - -Line 242. - -## Source - -[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) - -Line 237. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/tap-event/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/tap-event/index.mdx deleted file mode 100644 index 9306228fa1..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/relay/tap-event/index.mdx +++ /dev/null @@ -1,158 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/relay/tap-event" -title: "TapEvent" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Relay::TapEvent" - parent: "SignalWire::Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" - visibility: "public" ---- -# `TapEvent` - -calling.call.tap - -## Signature - -```ruby -class TapEvent < SignalWire::Relay::RelayEvent -``` - -## Inheritance - -**Extends:** [SignalWire::Relay::RelayEvent](/docs/sdk-reference/reference/ruby/signal-wire/relay/relay-event) - -## Methods - -### control\_id - -Returns the value of attribute control\_id. - -#### Signature - -```ruby -attr_reader control_id -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 391. - -*** - -### device - -Returns the value of attribute device. - -#### Signature - -```ruby -attr_reader device -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 391. - -*** - -### from\_payload - -#### Signature - -```ruby -def from_payload(payload) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 393. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(control_id: '', state: '', tap: {}, device: {}, **base) -``` - -#### Parameters - - - - - - - - - - - -#### Returns - -`TapEvent` — a new instance of TapEvent - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 406. - -*** - -### state - -Returns the value of attribute state. - -#### Signature - -```ruby -attr_reader state -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 391. - -*** - -### tap - -Returns the value of attribute tap. - -#### Signature - -```ruby -attr_reader tap -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 391. - -## Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 390. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/transcribe-action/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/transcribe-action/index.mdx deleted file mode 100644 index a9685e5161..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/relay/transcribe-action/index.mdx +++ /dev/null @@ -1,76 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/relay/transcribe-action" -title: "TranscribeAction" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Relay::TranscribeAction" - parent: "SignalWire::Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb" - visibility: "public" ---- -# `TranscribeAction` - -Handle for an active transcribe operation. - -## Signature - -```ruby -class TranscribeAction < SignalWire::Relay::Action -``` - -## Inheritance - -**Extends:** [SignalWire::Relay::Action](/docs/sdk-reference/reference/ruby/signal-wire/relay/action) - -## Methods - -### initialize - -#### Signature - -```ruby -def initialize(call, control_id) -``` - -#### Parameters - - - - - -#### Returns - -`TranscribeAction` — a new instance of TranscribeAction - -#### Source - -[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) - -Line 271. - -*** - -### stop - -#### Signature - -```ruby -def stop -``` - -#### Source - -[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) - -Line 275. - -## Source - -[`lib/signalwire/relay/action.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb) - -Line 270. diff --git a/fern/products/sdk-reference/ruby/signal-wire/relay/transcribe-event/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/relay/transcribe-event/index.mdx deleted file mode 100644 index 8f0ee86078..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/relay/transcribe-event/index.mdx +++ /dev/null @@ -1,198 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/relay/transcribe-event" -title: "TranscribeEvent" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Relay::TranscribeEvent" - parent: "SignalWire::Relay" - module: "SignalWire.Relay" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" - visibility: "public" ---- -# `TranscribeEvent` - -calling.call.transcribe - -## Signature - -```ruby -class TranscribeEvent < SignalWire::Relay::RelayEvent -``` - -## Inheritance - -**Extends:** [SignalWire::Relay::RelayEvent](/docs/sdk-reference/reference/ruby/signal-wire/relay/relay-event) - -## Methods - -### control\_id - -Returns the value of attribute control\_id. - -#### Signature - -```ruby -attr_reader control_id -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 686. - -*** - -### duration - -Returns the value of attribute duration. - -#### Signature - -```ruby -attr_reader duration -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 686. - -*** - -### from\_payload - -#### Signature - -```ruby -def from_payload(payload) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 688. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(control_id: '', state: '', url: '', recording_id: '', duration: 0.0, size: 0, **base) -``` - -#### Parameters - - - - - - - - - - - - - - - -#### Returns - -`TranscribeEvent` — a new instance of TranscribeEvent - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 703. - -*** - -### recording\_id - -Returns the value of attribute recording\_id. - -#### Signature - -```ruby -attr_reader recording_id -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 686. - -*** - -### size - -Returns the value of attribute size. - -#### Signature - -```ruby -attr_reader size -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 686. - -*** - -### state - -Returns the value of attribute state. - -#### Signature - -```ruby -attr_reader state -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 686. - -*** - -### url - -Returns the value of attribute url. - -#### Signature - -```ruby -attr_reader url -> Object -``` - -#### Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 686. - -## Source - -[`lib/signalwire/relay/relay_event.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb) - -Line 685. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/base-resource/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/base-resource/index.mdx deleted file mode 100644 index cbfe927431..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/base-resource/index.mdx +++ /dev/null @@ -1,60 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest/base-resource" -title: "BaseResource" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::REST::BaseResource" - parent: "SignalWire::REST" - module: "SignalWire.REST" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb" - visibility: "public" ---- -# `BaseResource` - -Base for all namespace/resource classes. - -## Signature - -```ruby -class BaseResource < Object -``` - -## Inheritance - -**Extends:** `Object` - -## Methods - -### initialize - -#### Signature - -```ruby -def initialize(http, base_path) -``` - -#### Parameters - - - - - -#### Returns - -`BaseResource` — a new instance of BaseResource - -#### Source - -[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) - -Line 138. - -## Source - -[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) - -Line 137. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/crud-resource/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/crud-resource/index.mdx deleted file mode 100644 index e67ade838e..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/crud-resource/index.mdx +++ /dev/null @@ -1,172 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest/crud-resource" -title: "CrudResource" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::REST::CrudResource" - parent: "SignalWire::REST" - module: "SignalWire.REST" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb" - visibility: "public" ---- -# `CrudResource` - -Standard CRUD resource with list/create/get/update/delete. - -## Signature - -```ruby -class CrudResource < SignalWire::REST::BaseResource -``` - -## Inheritance - -**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/base-resource) - -## Methods - -### create - -#### Signature - -```ruby -def create(**kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) - -Line 164. - -*** - -### delete - -#### Signature - -```ruby -def delete(resource_id) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) - -Line 177. - -*** - -### get - -#### Signature - -```ruby -def get(resource_id) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) - -Line 168. - -*** - -### list - -#### Signature - -```ruby -def list(**params) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) - -Line 160. - -*** - -### update - -#### Signature - -```ruby -def update(resource_id, **kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) - -Line 172. - -*** - -### update\_method - -#### Signature - -```ruby -def update_method -``` - -#### Source - -[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) - -Line 152. - -*** - -### update\_method= - -#### Signature - -```ruby -def update_method=(m) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) - -Line 156. - -## Source - -[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) - -Line 151. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/crud-with-addresses/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/crud-with-addresses/index.mdx deleted file mode 100644 index d808b9548f..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/crud-with-addresses/index.mdx +++ /dev/null @@ -1,60 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest/crud-with-addresses" -title: "CrudWithAddresses" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::REST::CrudWithAddresses" - parent: "SignalWire::REST" - module: "SignalWire.REST" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb" - visibility: "public" ---- -# `CrudWithAddresses` - -CRUD resource that also supports listing the addresses bound to a -resource. Mirrors Python's +signalwire.rest.\_base.CrudWithAddresses+: -it adds a single +list\_addresses+ helper on top of the standard -list/create/get/update/delete surface, issuing -+GET \{base\_path\}/\{resource\_id\}/addresses+. - -## Signature - -```ruby -class CrudWithAddresses < SignalWire::REST::CrudResource -``` - -## Inheritance - -**Extends:** [SignalWire::REST::CrudResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/crud-resource) - -## Methods - -### list\_addresses - -#### Signature - -```ruby -def list_addresses(resource_id, **params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) - -Line 188. - -## Source - -[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) - -Line 187. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/http-client/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/http-client/index.mdx deleted file mode 100644 index d71edf9eaa..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/http-client/index.mdx +++ /dev/null @@ -1,222 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest/http-client" -title: "HttpClient" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::REST::HttpClient" - parent: "SignalWire::REST" - module: "SignalWire.REST" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb" - visibility: "public" ---- -# `HttpClient` - -Thin wrapper around Net::HTTP with Basic Auth and JSON handling. - -## Signature - -```ruby -class HttpClient < Object -``` - -## Inheritance - -**Extends:** `Object` - -## Methods - -### base\_url - -Returns the value of attribute base\_url. - -#### Signature - -```ruby -attr_reader base_url -> Object -``` - -#### Source - -[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) - -Line 26. - -*** - -### delete - -#### Signature - -```ruby -def delete(path) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) - -Line 72. - -*** - -### get - -#### Signature - -```ruby -def get(path, params = nil) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) - -Line 56. - -*** - -### initialize - -+base\_url+ overrides the derived +https://\{space\}+ value when set, -which is how the audit fixture and tests point the client at a -loopback server. Pass either +space+ ("acme") / a host -("acme.signalwire.com") OR an explicit +base\_url+ ("`http://127.0.0.1:NNNN`"). - -+ca\_file+ (optional) names a PEM CA bundle to trust for HTTPS, for -private-CA / pinned-CA deployments. When set, requests verify the peer -(VERIFY\_PEER) against a store seeded from the OpenSSL defaults (which -honor SSL\_CERT\_FILE) plus that bundle. When unset, Net::HTTP's default -verification (system store, VERIFY\_PEER) applies unchanged. HTTPS is -always verified either way — there is no VERIFY\_NONE path. - -#### Signature - -```ruby -def initialize(project_id, token, space, base_url: nil, ca_file: nil) -``` - -#### Parameters - - - - - - - - - - - -#### Returns - -`HttpClient` — a new instance of HttpClient - -#### Source - -[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) - -Line 39. - -*** - -### patch - -#### Signature - -```ruby -def patch(path, body = nil) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) - -Line 68. - -*** - -### post - -#### Signature - -```ruby -def post(path, body = nil, params: nil) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) - -Line 60. - -*** - -### project\_id - -#### Signature - -```ruby -def project_id -``` - -#### Source - -[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) - -Line 52. - -*** - -### put - -#### Signature - -```ruby -def put(path, body = nil) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) - -Line 64. - -## Source - -[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) - -Line 25. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/index.mdx deleted file mode 100644 index 16f00615c8..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/index.mdx +++ /dev/null @@ -1,70 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest" -title: "REST" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "module" - language: "ruby" - qualified_name: "SignalWire::REST" - parent: "SignalWire" - module: "SignalWire" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/pagination.rb" - visibility: "public" ---- -# `REST` - -## Signature - -```ruby -module REST -``` - -## Classes - - - - Base for all namespace/resource classes. - - - - Standard CRUD resource with list/create/get/update/delete. - - - - CRUD resource that also supports listing the addresses bound to a resource. Mirrors Python's +signalwire.rest.\_base.CrudWithAddresses+: it adds a single +list\_addresses+ helper on top of the standard list/create/get/update/delete surface, issuing +GET \{base\_path\}/\{resource\_id\}/addresses+. - - - - Thin wrapper around Net::HTTP with Basic Auth and JSON handling. - - - - Iterates items across paginated API responses. - - - - REST client for the SignalWire platform APIs. - - - - Raised when the SignalWire REST API returns a non-2xx response. - - - -## Modules - - - - - - PhoneCallHandler -- enum-like constants of the +call\_handler+ values accepted by +phone\_numbers.update+. - - - -## Source - -[`lib/signalwire/rest/pagination.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/pagination.rb) - -Line 4. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/addresses-resource/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/addresses-resource/index.mdx deleted file mode 100644 index 7b84b9180e..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/addresses-resource/index.mdx +++ /dev/null @@ -1,138 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest/namespaces/addresses-resource" -title: "AddressesResource" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::REST::Namespaces::AddressesResource" - parent: "SignalWire::REST::Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/addresses.rb" - visibility: "public" ---- -# `AddressesResource` - -Address management (no update endpoint). - -## Signature - -```ruby -class AddressesResource < SignalWire::REST::BaseResource -``` - -## Inheritance - -**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/base-resource) - -## Methods - -### create - -#### Signature - -```ruby -def create(**kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/addresses.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/addresses.rb) - -Line 13. - -*** - -### delete - -#### Signature - -```ruby -def delete(address_id) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/addresses.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/addresses.rb) - -Line 15. - -*** - -### get - -#### Signature - -```ruby -def get(address_id) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/addresses.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/addresses.rb) - -Line 14. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(http) -``` - -#### Parameters - - - -#### Returns - -`AddressesResource` — a new instance of AddressesResource - -#### Source - -[`lib/signalwire/rest/namespaces/addresses.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/addresses.rb) - -Line 8. - -*** - -### list - -#### Signature - -```ruby -def list(**params) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/addresses.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/addresses.rb) - -Line 12. - -## Source - -[`lib/signalwire/rest/namespaces/addresses.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/addresses.rb) - -Line 7. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/auto-materialized-webhook/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/auto-materialized-webhook/index.mdx deleted file mode 100644 index c83b0ea34e..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/auto-materialized-webhook/index.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest/namespaces/auto-materialized-webhook" -title: "AutoMaterializedWebhook" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::REST::Namespaces::AutoMaterializedWebhook" - parent: "SignalWire::REST::Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb" - visibility: "public" ---- -# `AutoMaterializedWebhook` - -Fabric webhook resource that's normally auto-created by -+phone\_numbers.set\_\*\_webhook+. Exposed for backwards compatibility. - -The binding model for these resources is on the phone number (see -+phone\_numbers.set\_swml\_webhook+ / +set\_cxml\_webhook+) -- setting -+call\_handler+ on a phone number auto-materializes the webhook -Fabric resource. Calling +create+ directly here produces an orphan -resource that isn't bound to any phone number. - -## Signature - -```ruby -class AutoMaterializedWebhook < SignalWire::REST::Namespaces::FabricResource -``` - -## Inheritance - -**Extends:** [SignalWire::REST::Namespaces::FabricResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/namespaces/fabric-resource) - -## Constants - - - Subclasses override to advertise the correct helper in the warning. - - -## Methods - -### create - - - **Deprecated.** Creating a webhook Fabric resource directly produces an orphan that isn't bound to any phone number. Use the matching +phone\_numbers.set\_\*\_webhook+ helper instead; it updates the phone number and the server auto-materializes the resource. See porting-sdk's +phone-binding.md+. - - -#### Signature - -```ruby -def create(**kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) - -Line 35. - -## Source - -[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) - -Line 26. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/call-flows-resource/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/call-flows-resource/index.mdx deleted file mode 100644 index d5d8284f90..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/call-flows-resource/index.mdx +++ /dev/null @@ -1,100 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest/namespaces/call-flows-resource" -title: "CallFlowsResource" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::REST::Namespaces::CallFlowsResource" - parent: "SignalWire::REST::Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb" - visibility: "public" ---- -# `CallFlowsResource` - -Call flows with version management. - -## Signature - -```ruby -class CallFlowsResource < SignalWire::REST::Namespaces::FabricResourcePUT -``` - -## Inheritance - -**Extends:** [SignalWire::REST::Namespaces::FabricResourcePUT](/docs/sdk-reference/reference/ruby/signal-wire/rest/namespaces/fabric-resource-put) - -## Methods - -### deploy\_version - -#### Signature - -```ruby -def deploy_version(resource_id, **kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) - -Line 70. - -*** - -### list\_addresses - -#### Signature - -```ruby -def list_addresses(resource_id, **params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) - -Line 60. - -*** - -### list\_versions - -#### Signature - -```ruby -def list_versions(resource_id, **params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) - -Line 65. - -## Source - -[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) - -Line 59. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/calling-namespace/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/calling-namespace/index.mdx deleted file mode 100644 index cc9acb96c8..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/calling-namespace/index.mdx +++ /dev/null @@ -1,896 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest/namespaces/calling-namespace" -title: "CallingNamespace" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::REST::Namespaces::CallingNamespace" - parent: "SignalWire::REST::Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb" - visibility: "public" ---- -# `CallingNamespace` - -REST call control -- all 37 commands dispatched via single POST endpoint. - -## Signature - -```ruby -class CallingNamespace < SignalWire::REST::BaseResource -``` - -## Inheritance - -**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/base-resource) - -## Methods - -### ai\_hold - -#### Signature - -```ruby -def ai_hold(call_id, **params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) - -Line 129. - -*** - -### ai\_message - -AI - -#### Signature - -```ruby -def ai_message(call_id, **params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) - -Line 125. - -*** - -### ai\_stop - -#### Signature - -```ruby -def ai_stop(call_id, **params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) - -Line 137. - -*** - -### ai\_unhold - -#### Signature - -```ruby -def ai_unhold(call_id, **params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) - -Line 133. - -*** - -### collect - -Collect - -#### Signature - -```ruby -def collect(call_id, **params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) - -Line 67. - -*** - -### collect\_start\_input\_timers - -#### Signature - -```ruby -def collect_start_input_timers(call_id, **params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) - -Line 75. - -*** - -### collect\_stop - -#### Signature - -```ruby -def collect_stop(call_id, **params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) - -Line 71. - -*** - -### denoise - -Denoise - -#### Signature - -```ruby -def denoise(call_id, **params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) - -Line 107. - -*** - -### denoise\_stop - -#### Signature - -```ruby -def denoise_stop(call_id, **params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) - -Line 111. - -*** - -### detect - -Detect - -#### Signature - -```ruby -def detect(call_id, **params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) - -Line 80. - -*** - -### detect\_stop - -#### Signature - -```ruby -def detect_stop(call_id, **params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) - -Line 84. - -*** - -### dial - -Call lifecycle - -#### Signature - -```ruby -def dial(**params) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) - -Line 13. - -*** - -### disconnect - -#### Signature - -```ruby -def disconnect(call_id, **params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) - -Line 24. - -*** - -### end\_call - -#### Signature - -```ruby -def end_call(call_id, **params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) - -Line 16. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(http) -``` - -#### Parameters - - - -#### Returns - -`CallingNamespace` — a new instance of CallingNamespace - -#### Source - -[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) - -Line 8. - -*** - -### live\_transcribe - -Live transcribe / translate - -#### Signature - -```ruby -def live_transcribe(call_id, **params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) - -Line 142. - -*** - -### live\_translate - -#### Signature - -```ruby -def live_translate(call_id, **params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) - -Line 146. - -*** - -### play - -Play - -#### Signature - -```ruby -def play(call_id, **params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) - -Line 29. - -*** - -### play\_pause - -#### Signature - -```ruby -def play_pause(call_id, **params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) - -Line 33. - -*** - -### play\_resume - -#### Signature - -```ruby -def play_resume(call_id, **params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) - -Line 37. - -*** - -### play\_stop - -#### Signature - -```ruby -def play_stop(call_id, **params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) - -Line 41. - -*** - -### play\_volume - -#### Signature - -```ruby -def play_volume(call_id, **params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) - -Line 45. - -*** - -### receive\_fax\_stop - -#### Signature - -```ruby -def receive_fax_stop(call_id, **params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) - -Line 155. - -*** - -### record - -Record - -#### Signature - -```ruby -def record(call_id, **params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) - -Line 50. - -*** - -### record\_pause - -#### Signature - -```ruby -def record_pause(call_id, **params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) - -Line 54. - -*** - -### record\_resume - -#### Signature - -```ruby -def record_resume(call_id, **params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) - -Line 58. - -*** - -### record\_stop - -#### Signature - -```ruby -def record_stop(call_id, **params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) - -Line 62. - -*** - -### refer - -SIP - -#### Signature - -```ruby -def refer(call_id, **params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) - -Line 160. - -*** - -### send\_fax\_stop - -Fax - -#### Signature - -```ruby -def send_fax_stop(call_id, **params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) - -Line 151. - -*** - -### stream - -Stream - -#### Signature - -```ruby -def stream(call_id, **params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) - -Line 98. - -*** - -### stream\_stop - -#### Signature - -```ruby -def stream_stop(call_id, **params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) - -Line 102. - -*** - -### tap - -Tap - -#### Signature - -```ruby -def tap(call_id, **params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) - -Line 89. - -*** - -### tap\_stop - -#### Signature - -```ruby -def tap_stop(call_id, **params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) - -Line 93. - -*** - -### transcribe - -Transcribe - -#### Signature - -```ruby -def transcribe(call_id, **params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) - -Line 116. - -*** - -### transcribe\_stop - -#### Signature - -```ruby -def transcribe_stop(call_id, **params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) - -Line 120. - -*** - -### transfer - -#### Signature - -```ruby -def transfer(call_id, **params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) - -Line 20. - -*** - -### update - -#### Signature - -```ruby -def update(**params) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) - -Line 14. - -*** - -### user\_event - -Custom events - -#### Signature - -```ruby -def user_event(call_id, **params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) - -Line 165. - -## Source - -[`lib/signalwire/rest/namespaces/calling.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/calling.rb) - -Line 7. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/chat-resource/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/chat-resource/index.mdx deleted file mode 100644 index 40631c8849..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/chat-resource/index.mdx +++ /dev/null @@ -1,78 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest/namespaces/chat-resource" -title: "ChatResource" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::REST::Namespaces::ChatResource" - parent: "SignalWire::REST::Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/chat.rb" - visibility: "public" ---- -# `ChatResource` - -Chat token generation. - -## Signature - -```ruby -class ChatResource < SignalWire::REST::BaseResource -``` - -## Inheritance - -**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/base-resource) - -## Methods - -### create\_token - -#### Signature - -```ruby -def create_token(**kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/chat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/chat.rb) - -Line 12. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(http) -``` - -#### Parameters - - - -#### Returns - -`ChatResource` — a new instance of ChatResource - -#### Source - -[`lib/signalwire/rest/namespaces/chat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/chat.rb) - -Line 8. - -## Source - -[`lib/signalwire/rest/namespaces/chat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/chat.rb) - -Line 7. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-accounts/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-accounts/index.mdx deleted file mode 100644 index efb56b7a54..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-accounts/index.mdx +++ /dev/null @@ -1,140 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest/namespaces/compat-accounts" -title: "CompatAccounts" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::REST::Namespaces::CompatAccounts" - parent: "SignalWire::REST::Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb" - visibility: "public" ---- -# `CompatAccounts` - -Compat account/subproject management. - -## Signature - -```ruby -class CompatAccounts < SignalWire::REST::BaseResource -``` - -## Inheritance - -**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/base-resource) - -## Methods - -### create - -#### Signature - -```ruby -def create(**kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 13. - -*** - -### get - -#### Signature - -```ruby -def get(sid) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 14. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(http) -``` - -#### Parameters - - - -#### Returns - -`CompatAccounts` — a new instance of CompatAccounts - -#### Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 8. - -*** - -### list - -#### Signature - -```ruby -def list(**params) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 12. - -*** - -### update - -#### Signature - -```ruby -def update(sid, **kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 15. - -## Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 7. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-applications/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-applications/index.mdx deleted file mode 100644 index b323880465..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-applications/index.mdx +++ /dev/null @@ -1,56 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest/namespaces/compat-applications" -title: "CompatApplications" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::REST::Namespaces::CompatApplications" - parent: "SignalWire::REST::Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb" - visibility: "public" ---- -# `CompatApplications` - -Compat application management. - -## Signature - -```ruby -class CompatApplications < SignalWire::REST::CrudResource -``` - -## Inheritance - -**Extends:** [SignalWire::REST::CrudResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/crud-resource) - -## Methods - -### update - -#### Signature - -```ruby -def update(sid, **kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 158. - -## Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 157. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-calls/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-calls/index.mdx deleted file mode 100644 index 92d3cb0146..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-calls/index.mdx +++ /dev/null @@ -1,148 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest/namespaces/compat-calls" -title: "CompatCalls" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::REST::Namespaces::CompatCalls" - parent: "SignalWire::REST::Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb" - visibility: "public" ---- -# `CompatCalls` - -Compat call management with recording and stream sub-resources. - -## Signature - -```ruby -class CompatCalls < SignalWire::REST::CrudResource -``` - -## Inheritance - -**Extends:** [SignalWire::REST::CrudResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/crud-resource) - -## Methods - -### start\_recording - -#### Signature - -```ruby -def start_recording(call_sid, **kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 24. - -*** - -### start\_stream - -#### Signature - -```ruby -def start_stream(call_sid, **kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 32. - -*** - -### stop\_stream - -#### Signature - -```ruby -def stop_stream(call_sid, stream_sid, **kwargs) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 36. - -*** - -### update - -#### Signature - -```ruby -def update(sid, **kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 20. - -*** - -### update\_recording - -#### Signature - -```ruby -def update_recording(call_sid, recording_sid, **kwargs) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 28. - -## Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 19. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-conferences/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-conferences/index.mdx deleted file mode 100644 index 505edb7d49..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-conferences/index.mdx +++ /dev/null @@ -1,328 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest/namespaces/compat-conferences" -title: "CompatConferences" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::REST::Namespaces::CompatConferences" - parent: "SignalWire::REST::Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb" - visibility: "public" ---- -# `CompatConferences` - -Compat conference management. - -## Signature - -```ruby -class CompatConferences < SignalWire::REST::BaseResource -``` - -## Inheritance - -**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/base-resource) - -## Methods - -### delete\_recording - -#### Signature - -```ruby -def delete_recording(conference_sid, recording_sid) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 111. - -*** - -### get - -#### Signature - -```ruby -def get(sid) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 78. - -*** - -### get\_participant - -#### Signature - -```ruby -def get_participant(conference_sid, call_sid) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 86. - -*** - -### get\_recording - -#### Signature - -```ruby -def get_recording(conference_sid, recording_sid) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 103. - -*** - -### list - -#### Signature - -```ruby -def list(**params) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 77. - -*** - -### list\_participants - -Participants - -#### Signature - -```ruby -def list_participants(conference_sid, **params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 82. - -*** - -### list\_recordings - -Conference recordings - -#### Signature - -```ruby -def list_recordings(conference_sid, **params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 99. - -*** - -### remove\_participant - -#### Signature - -```ruby -def remove_participant(conference_sid, call_sid) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 94. - -*** - -### start\_stream - -Conference streams - -#### Signature - -```ruby -def start_stream(conference_sid, **kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 116. - -*** - -### stop\_stream - -#### Signature - -```ruby -def stop_stream(conference_sid, stream_sid, **kwargs) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 120. - -*** - -### update - -#### Signature - -```ruby -def update(sid, **kw) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 79. - -*** - -### update\_participant - -#### Signature - -```ruby -def update_participant(conference_sid, call_sid, **kwargs) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 90. - -*** - -### update\_recording - -#### Signature - -```ruby -def update_recording(conference_sid, recording_sid, **kwargs) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 107. - -## Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 76. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-faxes/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-faxes/index.mdx deleted file mode 100644 index 4f5cdae381..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-faxes/index.mdx +++ /dev/null @@ -1,122 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest/namespaces/compat-faxes" -title: "CompatFaxes" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::REST::Namespaces::CompatFaxes" - parent: "SignalWire::REST::Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb" - visibility: "public" ---- -# `CompatFaxes` - -Compat fax management with media sub-resources. - -## Signature - -```ruby -class CompatFaxes < SignalWire::REST::CrudResource -``` - -## Inheritance - -**Extends:** [SignalWire::REST::CrudResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/crud-resource) - -## Methods - -### delete\_media - -#### Signature - -```ruby -def delete_media(fax_sid, media_sid) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 70. - -*** - -### get\_media - -#### Signature - -```ruby -def get_media(fax_sid, media_sid) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 66. - -*** - -### list\_media - -#### Signature - -```ruby -def list_media(fax_sid, **params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 62. - -*** - -### update - -#### Signature - -```ruby -def update(sid, **kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 60. - -## Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 59. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-laml-bins/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-laml-bins/index.mdx deleted file mode 100644 index 1f359f6310..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-laml-bins/index.mdx +++ /dev/null @@ -1,56 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest/namespaces/compat-laml-bins" -title: "CompatLamlBins" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::REST::Namespaces::CompatLamlBins" - parent: "SignalWire::REST::Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb" - visibility: "public" ---- -# `CompatLamlBins` - -Compat cXML/LaML script management. - -## Signature - -```ruby -class CompatLamlBins < SignalWire::REST::CrudResource -``` - -## Inheritance - -**Extends:** [SignalWire::REST::CrudResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/crud-resource) - -## Methods - -### update - -#### Signature - -```ruby -def update(sid, **kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 163. - -## Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 162. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-messages/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-messages/index.mdx deleted file mode 100644 index 3b117f1b90..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-messages/index.mdx +++ /dev/null @@ -1,122 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest/namespaces/compat-messages" -title: "CompatMessages" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::REST::Namespaces::CompatMessages" - parent: "SignalWire::REST::Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb" - visibility: "public" ---- -# `CompatMessages` - -Compat message management with media sub-resources. - -## Signature - -```ruby -class CompatMessages < SignalWire::REST::CrudResource -``` - -## Inheritance - -**Extends:** [SignalWire::REST::CrudResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/crud-resource) - -## Methods - -### delete\_media - -#### Signature - -```ruby -def delete_media(message_sid, media_sid) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 53. - -*** - -### get\_media - -#### Signature - -```ruby -def get_media(message_sid, media_sid) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 49. - -*** - -### list\_media - -#### Signature - -```ruby -def list_media(message_sid, **params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 45. - -*** - -### update - -#### Signature - -```ruby -def update(sid, **kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 43. - -## Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 42. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-namespace/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-namespace/index.mdx deleted file mode 100644 index e3978b7938..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-namespace/index.mdx +++ /dev/null @@ -1,276 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest/namespaces/compat-namespace" -title: "CompatNamespace" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::REST::Namespaces::CompatNamespace" - parent: "SignalWire::REST::Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb" - visibility: "public" ---- -# `CompatNamespace` - -Twilio-compatible LAML API namespace. - -## Signature - -```ruby -class CompatNamespace < Object -``` - -## Inheritance - -**Extends:** `Object` - -## Methods - -### accounts - -Returns the value of attribute accounts. - -#### Signature - -```ruby -attr_reader accounts -> Object -``` - -#### Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 206. - -*** - -### applications - -Returns the value of attribute applications. - -#### Signature - -```ruby -attr_reader applications -> Object -``` - -#### Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 206. - -*** - -### calls - -Returns the value of attribute calls. - -#### Signature - -```ruby -attr_reader calls -> Object -``` - -#### Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 206. - -*** - -### conferences - -Returns the value of attribute conferences. - -#### Signature - -```ruby -attr_reader conferences -> Object -``` - -#### Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 206. - -*** - -### faxes - -Returns the value of attribute faxes. - -#### Signature - -```ruby -attr_reader faxes -> Object -``` - -#### Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 206. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(http, account_sid) -``` - -#### Parameters - - - - - -#### Returns - -`CompatNamespace` — a new instance of CompatNamespace - -#### Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 210. - -*** - -### laml\_bins - -Returns the value of attribute laml\_bins. - -#### Signature - -```ruby -attr_reader laml_bins -> Object -``` - -#### Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 206. - -*** - -### messages - -Returns the value of attribute messages. - -#### Signature - -```ruby -attr_reader messages -> Object -``` - -#### Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 206. - -*** - -### phone\_numbers - -Returns the value of attribute phone\_numbers. - -#### Signature - -```ruby -attr_reader phone_numbers -> Object -``` - -#### Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 206. - -*** - -### queues - -Returns the value of attribute queues. - -#### Signature - -```ruby -attr_reader queues -> Object -``` - -#### Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 206. - -*** - -### recordings - -Returns the value of attribute recordings. - -#### Signature - -```ruby -attr_reader recordings -> Object -``` - -#### Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 206. - -*** - -### tokens - -Returns the value of attribute tokens. - -#### Signature - -```ruby -attr_reader tokens -> Object -``` - -#### Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 206. - -*** - -### transcriptions - -Returns the value of attribute transcriptions. - -#### Signature - -```ruby -attr_reader transcriptions -> Object -``` - -#### Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 206. - -## Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 205. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-phone-numbers/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-phone-numbers/index.mdx deleted file mode 100644 index 8a06b684a1..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-phone-numbers/index.mdx +++ /dev/null @@ -1,246 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest/namespaces/compat-phone-numbers" -title: "CompatPhoneNumbers" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::REST::Namespaces::CompatPhoneNumbers" - parent: "SignalWire::REST::Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb" - visibility: "public" ---- -# `CompatPhoneNumbers` - -Compat phone number management. - -## Signature - -```ruby -class CompatPhoneNumbers < SignalWire::REST::BaseResource -``` - -## Inheritance - -**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/base-resource) - -## Methods - -### delete - -#### Signature - -```ruby -def delete(sid) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 136. - -*** - -### get - -#### Signature - -```ruby -def get(sid) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 134. - -*** - -### import\_number - -#### Signature - -```ruby -def import_number(**kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 138. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(http, base) -``` - -#### Parameters - - - - - -#### Returns - -`CompatPhoneNumbers` — a new instance of CompatPhoneNumbers - -#### Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 127. - -*** - -### list - -#### Signature - -```ruby -def list(**params) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 132. - -*** - -### list\_available\_countries - -#### Signature - -```ruby -def list_available_countries(**params) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 143. - -*** - -### purchase - -#### Signature - -```ruby -def purchase(**kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 133. - -*** - -### search\_local - -#### Signature - -```ruby -def search_local(country, **params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 147. - -*** - -### search\_toll\_free - -#### Signature - -```ruby -def search_toll_free(country, **params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 151. - -*** - -### update - -#### Signature - -```ruby -def update(sid, **kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 135. - -## Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 126. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-queues/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-queues/index.mdx deleted file mode 100644 index bda9f2e0eb..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-queues/index.mdx +++ /dev/null @@ -1,124 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest/namespaces/compat-queues" -title: "CompatQueues" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::REST::Namespaces::CompatQueues" - parent: "SignalWire::REST::Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb" - visibility: "public" ---- -# `CompatQueues` - -Compat queue management with members. - -## Signature - -```ruby -class CompatQueues < SignalWire::REST::CrudResource -``` - -## Inheritance - -**Extends:** [SignalWire::REST::CrudResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/crud-resource) - -## Methods - -### dequeue\_member - -#### Signature - -```ruby -def dequeue_member(queue_sid, call_sid, **kwargs) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 178. - -*** - -### get\_member - -#### Signature - -```ruby -def get_member(queue_sid, call_sid) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 174. - -*** - -### list\_members - -#### Signature - -```ruby -def list_members(queue_sid, **params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 170. - -*** - -### update - -#### Signature - -```ruby -def update(sid, **kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 168. - -## Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 167. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-recordings/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-recordings/index.mdx deleted file mode 100644 index ba57226cf9..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-recordings/index.mdx +++ /dev/null @@ -1,94 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest/namespaces/compat-recordings" -title: "CompatRecordings" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::REST::Namespaces::CompatRecordings" - parent: "SignalWire::REST::Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb" - visibility: "public" ---- -# `CompatRecordings` - -Compat recording management. - -## Signature - -```ruby -class CompatRecordings < SignalWire::REST::BaseResource -``` - -## Inheritance - -**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/base-resource) - -## Methods - -### delete - -#### Signature - -```ruby -def delete(sid) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 187. - -*** - -### get - -#### Signature - -```ruby -def get(sid) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 186. - -*** - -### list - -#### Signature - -```ruby -def list(**params) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 185. - -## Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 184. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-tokens/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-tokens/index.mdx deleted file mode 100644 index 4aa8c60d5b..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-tokens/index.mdx +++ /dev/null @@ -1,96 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest/namespaces/compat-tokens" -title: "CompatTokens" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::REST::Namespaces::CompatTokens" - parent: "SignalWire::REST::Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb" - visibility: "public" ---- -# `CompatTokens` - -Compat API token management. - -## Signature - -```ruby -class CompatTokens < SignalWire::REST::BaseResource -``` - -## Inheritance - -**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/base-resource) - -## Methods - -### create - -#### Signature - -```ruby -def create(**kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 199. - -*** - -### delete - -#### Signature - -```ruby -def delete(token_id) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 201. - -*** - -### update - -#### Signature - -```ruby -def update(token_id, **kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 200. - -## Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 198. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-transcriptions/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-transcriptions/index.mdx deleted file mode 100644 index 520ce2304c..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/compat-transcriptions/index.mdx +++ /dev/null @@ -1,94 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest/namespaces/compat-transcriptions" -title: "CompatTranscriptions" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::REST::Namespaces::CompatTranscriptions" - parent: "SignalWire::REST::Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb" - visibility: "public" ---- -# `CompatTranscriptions` - -Compat transcription management. - -## Signature - -```ruby -class CompatTranscriptions < SignalWire::REST::BaseResource -``` - -## Inheritance - -**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/base-resource) - -## Methods - -### delete - -#### Signature - -```ruby -def delete(sid) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 194. - -*** - -### get - -#### Signature - -```ruby -def get(sid) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 193. - -*** - -### list - -#### Signature - -```ruby -def list(**params) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 192. - -## Source - -[`lib/signalwire/rest/namespaces/compat.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/compat.rb) - -Line 191. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/conference-logs/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/conference-logs/index.mdx deleted file mode 100644 index 62a6d74c92..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/conference-logs/index.mdx +++ /dev/null @@ -1,54 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest/namespaces/conference-logs" -title: "ConferenceLogs" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::REST::Namespaces::ConferenceLogs" - parent: "SignalWire::REST::Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/logs.rb" - visibility: "public" ---- -# `ConferenceLogs` - -Conference log queries. - -## Signature - -```ruby -class ConferenceLogs < SignalWire::REST::BaseResource -``` - -## Inheritance - -**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/base-resource) - -## Methods - -### list - -#### Signature - -```ruby -def list(**params) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/logs.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/logs.rb) - -Line 30. - -## Source - -[`lib/signalwire/rest/namespaces/logs.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/logs.rb) - -Line 29. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/conference-rooms-resource/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/conference-rooms-resource/index.mdx deleted file mode 100644 index 4885af404e..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/conference-rooms-resource/index.mdx +++ /dev/null @@ -1,56 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest/namespaces/conference-rooms-resource" -title: "ConferenceRoomsResource" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::REST::Namespaces::ConferenceRoomsResource" - parent: "SignalWire::REST::Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb" - visibility: "public" ---- -# `ConferenceRoomsResource` - -Conference rooms -- uses singular 'conference\_room' for sub-resource paths. - -## Signature - -```ruby -class ConferenceRoomsResource < SignalWire::REST::Namespaces::FabricResourcePUT -``` - -## Inheritance - -**Extends:** [SignalWire::REST::Namespaces::FabricResourcePUT](/docs/sdk-reference/reference/ruby/signal-wire/rest/namespaces/fabric-resource-put) - -## Methods - -### list\_addresses - -#### Signature - -```ruby -def list_addresses(resource_id, **params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) - -Line 78. - -## Source - -[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) - -Line 77. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/cxml-applications-resource/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/cxml-applications-resource/index.mdx deleted file mode 100644 index 7bafc829c5..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/cxml-applications-resource/index.mdx +++ /dev/null @@ -1,58 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest/namespaces/cxml-applications-resource" -title: "CxmlApplicationsResource" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::REST::Namespaces::CxmlApplicationsResource" - parent: "SignalWire::REST::Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb" - visibility: "public" ---- -# `CxmlApplicationsResource` - -cXML applications -- no create method. - -## Signature - -```ruby -class CxmlApplicationsResource < SignalWire::REST::Namespaces::FabricResourcePUT -``` - -## Inheritance - -**Extends:** [SignalWire::REST::Namespaces::FabricResourcePUT](/docs/sdk-reference/reference/ruby/signal-wire/rest/namespaces/fabric-resource-put) - -## Methods - -### create - -#### Signature - -```ruby -def create(**_kwargs) -``` - -#### Parameters - - - -#### Throws - -- `NotImplementedError` - -#### Source - -[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) - -Line 109. - -## Source - -[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) - -Line 108. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/cxml-webhooks-resource/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/cxml-webhooks-resource/index.mdx deleted file mode 100644 index 300bf57547..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/cxml-webhooks-resource/index.mdx +++ /dev/null @@ -1,38 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest/namespaces/cxml-webhooks-resource" -title: "CxmlWebhooksResource" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::REST::Namespaces::CxmlWebhooksResource" - parent: "SignalWire::REST::Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb" - visibility: "public" ---- -# `CxmlWebhooksResource` - -cXML webhooks -- auto-materialized by +phone\_numbers.set\_cxml\_webhook+. - -## Signature - -```ruby -class CxmlWebhooksResource < SignalWire::REST::Namespaces::AutoMaterializedWebhook -``` - -## Inheritance - -**Extends:** [SignalWire::REST::Namespaces::AutoMaterializedWebhook](/docs/sdk-reference/reference/ruby/signal-wire/rest/namespaces/auto-materialized-webhook) - -## Constants - - - -## Source - -[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) - -Line 54. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/datasphere-documents/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/datasphere-documents/index.mdx deleted file mode 100644 index 23d3a5704a..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/datasphere-documents/index.mdx +++ /dev/null @@ -1,144 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest/namespaces/datasphere-documents" -title: "DatasphereDocuments" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::REST::Namespaces::DatasphereDocuments" - parent: "SignalWire::REST::Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/datasphere.rb" - visibility: "public" ---- -# `DatasphereDocuments` - -Document management with search and chunk operations. - -## Signature - -```ruby -class DatasphereDocuments < SignalWire::REST::CrudResource -``` - -## Inheritance - -**Extends:** [SignalWire::REST::CrudResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/crud-resource) - -## Methods - -### delete\_chunk - -#### Signature - -```ruby -def delete_chunk(document_id, chunk_id) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/datasphere.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/datasphere.rb) - -Line 24. - -*** - -### get\_chunk - -#### Signature - -```ruby -def get_chunk(document_id, chunk_id) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/datasphere.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/datasphere.rb) - -Line 20. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(http) -``` - -#### Parameters - - - -#### Returns - -`DatasphereDocuments` — a new instance of DatasphereDocuments - -#### Source - -[`lib/signalwire/rest/namespaces/datasphere.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/datasphere.rb) - -Line 8. - -*** - -### list\_chunks - -#### Signature - -```ruby -def list_chunks(document_id, **params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/datasphere.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/datasphere.rb) - -Line 16. - -*** - -### search - -#### Signature - -```ruby -def search(**kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/datasphere.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/datasphere.rb) - -Line 12. - -## Source - -[`lib/signalwire/rest/namespaces/datasphere.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/datasphere.rb) - -Line 7. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/datasphere-namespace/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/datasphere-namespace/index.mdx deleted file mode 100644 index 410c234290..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/datasphere-namespace/index.mdx +++ /dev/null @@ -1,76 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest/namespaces/datasphere-namespace" -title: "DatasphereNamespace" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::REST::Namespaces::DatasphereNamespace" - parent: "SignalWire::REST::Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/datasphere.rb" - visibility: "public" ---- -# `DatasphereNamespace` - -Datasphere API namespace. - -## Signature - -```ruby -class DatasphereNamespace < Object -``` - -## Inheritance - -**Extends:** `Object` - -## Methods - -### documents - -Returns the value of attribute documents. - -#### Signature - -```ruby -attr_reader documents -> Object -``` - -#### Source - -[`lib/signalwire/rest/namespaces/datasphere.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/datasphere.rb) - -Line 31. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(http) -``` - -#### Parameters - - - -#### Returns - -`DatasphereNamespace` — a new instance of DatasphereNamespace - -#### Source - -[`lib/signalwire/rest/namespaces/datasphere.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/datasphere.rb) - -Line 33. - -## Source - -[`lib/signalwire/rest/namespaces/datasphere.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/datasphere.rb) - -Line 30. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/fabric-addresses/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/fabric-addresses/index.mdx deleted file mode 100644 index bf50fdd70e..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/fabric-addresses/index.mdx +++ /dev/null @@ -1,74 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest/namespaces/fabric-addresses" -title: "FabricAddresses" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::REST::Namespaces::FabricAddresses" - parent: "SignalWire::REST::Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb" - visibility: "public" ---- -# `FabricAddresses` - -Read-only fabric addresses. - -## Signature - -```ruby -class FabricAddresses < SignalWire::REST::BaseResource -``` - -## Inheritance - -**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/base-resource) - -## Methods - -### get - -#### Signature - -```ruby -def get(address_id) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) - -Line 164. - -*** - -### list - -#### Signature - -```ruby -def list(**params) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) - -Line 160. - -## Source - -[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) - -Line 159. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/fabric-namespace/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/fabric-namespace/index.mdx deleted file mode 100644 index e82d903ce7..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/fabric-namespace/index.mdx +++ /dev/null @@ -1,346 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest/namespaces/fabric-namespace" -title: "FabricNamespace" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::REST::Namespaces::FabricNamespace" - parent: "SignalWire::REST::Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb" - visibility: "public" ---- -# `FabricNamespace` - -Fabric API namespace grouping all resource types. - -## Signature - -```ruby -class FabricNamespace < Object -``` - -## Inheritance - -**Extends:** `Object` - -## Methods - -### addresses - -Returns the value of attribute addresses. - -#### Signature - -```ruby -attr_reader addresses -> Object -``` - -#### Source - -[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) - -Line 198. - -*** - -### ai\_agents - -Returns the value of attribute ai\_agents. - -#### Signature - -```ruby -attr_reader ai_agents -> Object -``` - -#### Source - -[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) - -Line 198. - -*** - -### call\_flows - -Returns the value of attribute call\_flows. - -#### Signature - -```ruby -attr_reader call_flows -> Object -``` - -#### Source - -[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) - -Line 198. - -*** - -### conference\_rooms - -Returns the value of attribute conference\_rooms. - -#### Signature - -```ruby -attr_reader conference_rooms -> Object -``` - -#### Source - -[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) - -Line 198. - -*** - -### cxml\_applications - -Returns the value of attribute cxml\_applications. - -#### Signature - -```ruby -attr_reader cxml_applications -> Object -``` - -#### Source - -[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) - -Line 198. - -*** - -### cxml\_scripts - -Returns the value of attribute cxml\_scripts. - -#### Signature - -```ruby -attr_reader cxml_scripts -> Object -``` - -#### Source - -[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) - -Line 198. - -*** - -### cxml\_webhooks - -Returns the value of attribute cxml\_webhooks. - -#### Signature - -```ruby -attr_reader cxml_webhooks -> Object -``` - -#### Source - -[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) - -Line 198. - -*** - -### freeswitch\_connectors - -Returns the value of attribute freeswitch\_connectors. - -#### Signature - -```ruby -attr_reader freeswitch_connectors -> Object -``` - -#### Source - -[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) - -Line 198. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(http) -``` - -#### Parameters - - - -#### Returns - -`FabricNamespace` — a new instance of FabricNamespace - -#### Source - -[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) - -Line 204. - -*** - -### relay\_applications - -Returns the value of attribute relay\_applications. - -#### Signature - -```ruby -attr_reader relay_applications -> Object -``` - -#### Source - -[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) - -Line 198. - -*** - -### resources - -Returns the value of attribute resources. - -#### Signature - -```ruby -attr_reader resources -> Object -``` - -#### Source - -[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) - -Line 198. - -*** - -### sip\_endpoints - -Returns the value of attribute sip\_endpoints. - -#### Signature - -```ruby -attr_reader sip_endpoints -> Object -``` - -#### Source - -[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) - -Line 198. - -*** - -### sip\_gateways - -Returns the value of attribute sip\_gateways. - -#### Signature - -```ruby -attr_reader sip_gateways -> Object -``` - -#### Source - -[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) - -Line 198. - -*** - -### subscribers - -Returns the value of attribute subscribers. - -#### Signature - -```ruby -attr_reader subscribers -> Object -``` - -#### Source - -[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) - -Line 198. - -*** - -### swml\_scripts - -Returns the value of attribute swml\_scripts. - -#### Signature - -```ruby -attr_reader swml_scripts -> Object -``` - -#### Source - -[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) - -Line 198. - -*** - -### swml\_webhooks - -Returns the value of attribute swml\_webhooks. - -#### Signature - -```ruby -attr_reader swml_webhooks -> Object -``` - -#### Source - -[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) - -Line 198. - -*** - -### tokens - -Returns the value of attribute tokens. - -#### Signature - -```ruby -attr_reader tokens -> Object -``` - -#### Source - -[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) - -Line 198. - -## Source - -[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) - -Line 197. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/fabric-resource-put/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/fabric-resource-put/index.mdx deleted file mode 100644 index 2b1f170e82..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/fabric-resource-put/index.mdx +++ /dev/null @@ -1,34 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest/namespaces/fabric-resource-put" -title: "FabricResourcePUT" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::REST::Namespaces::FabricResourcePUT" - parent: "SignalWire::REST::Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb" - visibility: "public" ---- -# `FabricResourcePUT` - -Fabric resource that uses PUT for updates. - -## Signature - -```ruby -class FabricResourcePUT < SignalWire::REST::Namespaces::FabricResource -``` - -## Inheritance - -**Extends:** [SignalWire::REST::Namespaces::FabricResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/namespaces/fabric-resource) - -## Source - -[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) - -Line 14. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/fabric-resource/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/fabric-resource/index.mdx deleted file mode 100644 index a8bb4f728c..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/fabric-resource/index.mdx +++ /dev/null @@ -1,37 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest/namespaces/fabric-resource" -title: "FabricResource" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::REST::Namespaces::FabricResource" - parent: "SignalWire::REST::Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb" - visibility: "public" ---- -# `FabricResource` - -Standard fabric resource with CRUD + addresses. Inherits the -+list\_addresses+ helper from +CrudWithAddresses+ (matching Python's -+FabricResource(CrudWithAddresses)+ hierarchy); subclasses that use a -singular sub-resource path override +list\_addresses+ below. - -## Signature - -```ruby -class FabricResource < SignalWire::REST::CrudWithAddresses -``` - -## Inheritance - -**Extends:** [SignalWire::REST::CrudWithAddresses](/docs/sdk-reference/reference/ruby/signal-wire/rest/crud-with-addresses) - -## Source - -[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) - -Line 10. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/fabric-tokens/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/fabric-tokens/index.mdx deleted file mode 100644 index 8cb4e1f77d..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/fabric-tokens/index.mdx +++ /dev/null @@ -1,158 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest/namespaces/fabric-tokens" -title: "FabricTokens" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::REST::Namespaces::FabricTokens" - parent: "SignalWire::REST::Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb" - visibility: "public" ---- -# `FabricTokens` - -Subscriber, guest, invite, and embed token creation. - -## Signature - -```ruby -class FabricTokens < SignalWire::REST::BaseResource -``` - -## Inheritance - -**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/base-resource) - -## Methods - -### create\_embed\_token - -#### Signature - -```ruby -def create_embed_token(**kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) - -Line 191. - -*** - -### create\_guest\_token - -#### Signature - -```ruby -def create_guest_token(**kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) - -Line 187. - -*** - -### create\_invite\_token - -#### Signature - -```ruby -def create_invite_token(**kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) - -Line 183. - -*** - -### create\_subscriber\_token - -#### Signature - -```ruby -def create_subscriber_token(**kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) - -Line 175. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(http) -``` - -#### Parameters - - - -#### Returns - -`FabricTokens` — a new instance of FabricTokens - -#### Source - -[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) - -Line 171. - -*** - -### refresh\_subscriber\_token - -#### Signature - -```ruby -def refresh_subscriber_token(**kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) - -Line 179. - -## Source - -[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) - -Line 170. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/fax-logs/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/fax-logs/index.mdx deleted file mode 100644 index 9640d54aec..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/fax-logs/index.mdx +++ /dev/null @@ -1,74 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest/namespaces/fax-logs" -title: "FaxLogs" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::REST::Namespaces::FaxLogs" - parent: "SignalWire::REST::Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/logs.rb" - visibility: "public" ---- -# `FaxLogs` - -Fax log queries. - -## Signature - -```ruby -class FaxLogs < SignalWire::REST::BaseResource -``` - -## Inheritance - -**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/base-resource) - -## Methods - -### get - -#### Signature - -```ruby -def get(log_id) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/logs.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/logs.rb) - -Line 25. - -*** - -### list - -#### Signature - -```ruby -def list(**params) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/logs.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/logs.rb) - -Line 24. - -## Source - -[`lib/signalwire/rest/namespaces/logs.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/logs.rb) - -Line 23. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/generic-resources/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/generic-resources/index.mdx deleted file mode 100644 index 36c114de6c..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/generic-resources/index.mdx +++ /dev/null @@ -1,172 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest/namespaces/generic-resources" -title: "GenericResources" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::REST::Namespaces::GenericResources" - parent: "SignalWire::REST::Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb" - visibility: "public" ---- -# `GenericResources` - -Generic resource operations across all fabric resource types. - -## Signature - -```ruby -class GenericResources < SignalWire::REST::BaseResource -``` - -## Inheritance - -**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/base-resource) - -## Methods - -### assign\_domain\_application - -#### Signature - -```ruby -def assign_domain_application(resource_id, **kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) - -Line 153. - -*** - -### assign\_phone\_route - - - **Deprecated.** For the common binding cases use +phone\_numbers.set\_\*+ helpers. - - -This endpoint (+POST /api/fabric/resources/\{id\}/phone\_routes+) accepts -only a narrow set of legacy resource types as the attach target. It -_does not work_ for +swml\_webhook+ / +cxml\_webhook+ / +ai\_agent+ -bindings -- those are configured on the phone number and the Fabric -resource is auto-materialized (see +phone\_numbers.set\_swml\_webhook+ -etc.). The authoritative list of accepting resource types lives in -the OpenAPI spec; routing here for those types returns 404 or 422. - -#### Signature - -```ruby -def assign_phone_route(resource_id, **kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) - -Line 141. - -*** - -### delete - -#### Signature - -```ruby -def delete(resource_id) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) - -Line 124. - -*** - -### get - -#### Signature - -```ruby -def get(resource_id) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) - -Line 120. - -*** - -### list - -#### Signature - -```ruby -def list(**params) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) - -Line 116. - -*** - -### list\_addresses - -#### Signature - -```ruby -def list_addresses(resource_id, **params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) - -Line 128. - -## Source - -[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) - -Line 115. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/imported-numbers-resource/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/imported-numbers-resource/index.mdx deleted file mode 100644 index 463d39baf1..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/imported-numbers-resource/index.mdx +++ /dev/null @@ -1,78 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest/namespaces/imported-numbers-resource" -title: "ImportedNumbersResource" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::REST::Namespaces::ImportedNumbersResource" - parent: "SignalWire::REST::Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/imported_numbers.rb" - visibility: "public" ---- -# `ImportedNumbersResource` - -Import externally-hosted phone numbers. - -## Signature - -```ruby -class ImportedNumbersResource < SignalWire::REST::BaseResource -``` - -## Inheritance - -**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/base-resource) - -## Methods - -### create - -#### Signature - -```ruby -def create(**kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/imported_numbers.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/imported_numbers.rb) - -Line 12. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(http) -``` - -#### Parameters - - - -#### Returns - -`ImportedNumbersResource` — a new instance of ImportedNumbersResource - -#### Source - -[`lib/signalwire/rest/namespaces/imported_numbers.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/imported_numbers.rb) - -Line 8. - -## Source - -[`lib/signalwire/rest/namespaces/imported_numbers.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/imported_numbers.rb) - -Line 7. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/index.mdx deleted file mode 100644 index 362a54b364..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/index.mdx +++ /dev/null @@ -1,280 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest/namespaces" -title: "Namespaces" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "module" - language: "ruby" - qualified_name: "SignalWire::REST::Namespaces" - parent: "SignalWire::REST" - module: "SignalWire.REST" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/mfa.rb" - visibility: "public" ---- -# `Namespaces` - -## Signature - -```ruby -module Namespaces -``` - -## Classes - - - - Address management (no update endpoint). - - - - Fabric webhook resource that's normally auto-created by +phone\_numbers.set\_\*\_webhook+. Exposed for backwards compatibility. - - - - Call flows with version management. - - - - REST call control -- all 37 commands dispatched via single POST endpoint. - - - - Chat token generation. - - - - Compat account/subproject management. - - - - Compat application management. - - - - Compat call management with recording and stream sub-resources. - - - - Compat conference management. - - - - Compat fax management with media sub-resources. - - - - Compat cXML/LaML script management. - - - - Compat message management with media sub-resources. - - - - Twilio-compatible LAML API namespace. - - - - Compat phone number management. - - - - Compat queue management with members. - - - - Compat recording management. - - - - Compat API token management. - - - - Compat transcription management. - - - - Conference log queries. - - - - Conference rooms -- uses singular 'conference\_room' for sub-resource paths. - - - - cXML applications -- no create method. - - - - cXML webhooks -- auto-materialized by +phone\_numbers.set\_cxml\_webhook+. - - - - Document management with search and chunk operations. - - - - Datasphere API namespace. - - - - Read-only fabric addresses. - - - - Fabric API namespace grouping all resource types. - - - - Standard fabric resource with CRUD + addresses. Inherits the +list\_addresses+ helper from +CrudWithAddresses+ (matching Python's +FabricResource(CrudWithAddresses)+ hierarchy); subclasses that use a singular sub-resource path override +list\_addresses+ below. - - - - Fabric resource that uses PUT for updates. - - - - Subscriber, guest, invite, and embed token creation. - - - - Fax log queries. - - - - Generic resource operations across all fabric resource types. - - - - Import externally-hosted phone numbers. - - - - Logs API namespace. - - - - Phone number lookup (carrier, CNAM). - - - - Message log queries. - - - - Multi-factor authentication via SMS or phone call. - - - - Number group management with membership operations. - - - - Phone number management. - - - - Project API namespace. - - - - Project API token management. - - - - PubSub token generation. - - - - Queue management with member operations. - - - - Recording management (read-only + delete). - - - - 10DLC brand management. - - - - 10DLC campaign management. - - - - 10DLC Campaign Registry namespace. - - - - 10DLC number assignment management. - - - - 10DLC assignment order management. - - - - Short code management (read + update only). - - - - Project SIP profile (singleton resource). - - - - Subscribers with SIP endpoint management. - - - - SWML webhooks -- auto-materialized by +phone\_numbers.set\_swml\_webhook+. - - - - Verified caller ID management with verification flow. - - - - Video conference management with tokens and streams. - - - - Video conference token management. - - - - Video API namespace. - - - - Video room recording management. - - - - Video room management with streams. - - - - Video room session management. - - - - Video room token generation. - - - - Video stream management. - - - - Voice log queries. - - - -## Source - -[`lib/signalwire/rest/namespaces/mfa.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/mfa.rb) - -Line 5. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/logs-namespace/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/logs-namespace/index.mdx deleted file mode 100644 index b4be9ddf7f..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/logs-namespace/index.mdx +++ /dev/null @@ -1,130 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest/namespaces/logs-namespace" -title: "LogsNamespace" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::REST::Namespaces::LogsNamespace" - parent: "SignalWire::REST::Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/logs.rb" - visibility: "public" ---- -# `LogsNamespace` - -Logs API namespace. - -## Signature - -```ruby -class LogsNamespace < Object -``` - -## Inheritance - -**Extends:** `Object` - -## Methods - -### conferences - -Returns the value of attribute conferences. - -#### Signature - -```ruby -attr_reader conferences -> Object -``` - -#### Source - -[`lib/signalwire/rest/namespaces/logs.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/logs.rb) - -Line 35. - -*** - -### fax - -Returns the value of attribute fax. - -#### Signature - -```ruby -attr_reader fax -> Object -``` - -#### Source - -[`lib/signalwire/rest/namespaces/logs.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/logs.rb) - -Line 35. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(http) -``` - -#### Parameters - - - -#### Returns - -`LogsNamespace` — a new instance of LogsNamespace - -#### Source - -[`lib/signalwire/rest/namespaces/logs.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/logs.rb) - -Line 37. - -*** - -### messages - -Returns the value of attribute messages. - -#### Signature - -```ruby -attr_reader messages -> Object -``` - -#### Source - -[`lib/signalwire/rest/namespaces/logs.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/logs.rb) - -Line 35. - -*** - -### voice - -Returns the value of attribute voice. - -#### Signature - -```ruby -attr_reader voice -> Object -``` - -#### Source - -[`lib/signalwire/rest/namespaces/logs.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/logs.rb) - -Line 35. - -## Source - -[`lib/signalwire/rest/namespaces/logs.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/logs.rb) - -Line 34. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/lookup-resource/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/lookup-resource/index.mdx deleted file mode 100644 index a66b60f379..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/lookup-resource/index.mdx +++ /dev/null @@ -1,80 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest/namespaces/lookup-resource" -title: "LookupResource" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::REST::Namespaces::LookupResource" - parent: "SignalWire::REST::Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/lookup.rb" - visibility: "public" ---- -# `LookupResource` - -Phone number lookup (carrier, CNAM). - -## Signature - -```ruby -class LookupResource < SignalWire::REST::BaseResource -``` - -## Inheritance - -**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/base-resource) - -## Methods - -### initialize - -#### Signature - -```ruby -def initialize(http) -``` - -#### Parameters - - - -#### Returns - -`LookupResource` — a new instance of LookupResource - -#### Source - -[`lib/signalwire/rest/namespaces/lookup.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/lookup.rb) - -Line 8. - -*** - -### phone\_number - -#### Signature - -```ruby -def phone_number(e164, **params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/lookup.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/lookup.rb) - -Line 12. - -## Source - -[`lib/signalwire/rest/namespaces/lookup.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/lookup.rb) - -Line 7. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/message-logs/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/message-logs/index.mdx deleted file mode 100644 index b86f8d1ced..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/message-logs/index.mdx +++ /dev/null @@ -1,74 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest/namespaces/message-logs" -title: "MessageLogs" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::REST::Namespaces::MessageLogs" - parent: "SignalWire::REST::Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/logs.rb" - visibility: "public" ---- -# `MessageLogs` - -Message log queries. - -## Signature - -```ruby -class MessageLogs < SignalWire::REST::BaseResource -``` - -## Inheritance - -**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/base-resource) - -## Methods - -### get - -#### Signature - -```ruby -def get(log_id) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/logs.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/logs.rb) - -Line 9. - -*** - -### list - -#### Signature - -```ruby -def list(**params) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/logs.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/logs.rb) - -Line 8. - -## Source - -[`lib/signalwire/rest/namespaces/logs.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/logs.rb) - -Line 7. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/mfa-resource/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/mfa-resource/index.mdx deleted file mode 100644 index a16ed42c22..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/mfa-resource/index.mdx +++ /dev/null @@ -1,120 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest/namespaces/mfa-resource" -title: "MfaResource" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::REST::Namespaces::MfaResource" - parent: "SignalWire::REST::Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/mfa.rb" - visibility: "public" ---- -# `MfaResource` - -Multi-factor authentication via SMS or phone call. - -## Signature - -```ruby -class MfaResource < SignalWire::REST::BaseResource -``` - -## Inheritance - -**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/base-resource) - -## Methods - -### call - -#### Signature - -```ruby -def call(**kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/mfa.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/mfa.rb) - -Line 16. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(http) -``` - -#### Parameters - - - -#### Returns - -`MfaResource` — a new instance of MfaResource - -#### Source - -[`lib/signalwire/rest/namespaces/mfa.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/mfa.rb) - -Line 8. - -*** - -### sms - -#### Signature - -```ruby -def sms(**kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/mfa.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/mfa.rb) - -Line 12. - -*** - -### verify - -#### Signature - -```ruby -def verify(request_id, **kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/mfa.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/mfa.rb) - -Line 20. - -## Source - -[`lib/signalwire/rest/namespaces/mfa.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/mfa.rb) - -Line 7. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/number-groups-resource/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/number-groups-resource/index.mdx deleted file mode 100644 index 56a42838d6..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/number-groups-resource/index.mdx +++ /dev/null @@ -1,142 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest/namespaces/number-groups-resource" -title: "NumberGroupsResource" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::REST::Namespaces::NumberGroupsResource" - parent: "SignalWire::REST::Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/number_groups.rb" - visibility: "public" ---- -# `NumberGroupsResource` - -Number group management with membership operations. - -## Signature - -```ruby -class NumberGroupsResource < SignalWire::REST::CrudResource -``` - -## Inheritance - -**Extends:** [SignalWire::REST::CrudResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/crud-resource) - -## Methods - -### add\_membership - -#### Signature - -```ruby -def add_membership(group_id, **kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/number_groups.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/number_groups.rb) - -Line 18. - -*** - -### delete\_membership - -#### Signature - -```ruby -def delete_membership(membership_id) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/number_groups.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/number_groups.rb) - -Line 26. - -*** - -### get\_membership - -#### Signature - -```ruby -def get_membership(membership_id) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/number_groups.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/number_groups.rb) - -Line 22. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(http) -``` - -#### Parameters - - - -#### Returns - -`NumberGroupsResource` — a new instance of NumberGroupsResource - -#### Source - -[`lib/signalwire/rest/namespaces/number_groups.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/number_groups.rb) - -Line 10. - -*** - -### list\_memberships - -#### Signature - -```ruby -def list_memberships(group_id, **params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/number_groups.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/number_groups.rb) - -Line 14. - -## Source - -[`lib/signalwire/rest/namespaces/number_groups.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/number_groups.rb) - -Line 7. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/phone-numbers-resource/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/phone-numbers-resource/index.mdx deleted file mode 100644 index ca97cf5f0c..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/phone-numbers-resource/index.mdx +++ /dev/null @@ -1,295 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest/namespaces/phone-numbers-resource" -title: "PhoneNumbersResource" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::REST::Namespaces::PhoneNumbersResource" - parent: "SignalWire::REST::Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/phone_numbers.rb" - visibility: "public" ---- -# `PhoneNumbersResource` - -Phone number management. - -Supports the standard CRUD surface plus typed helpers for binding an -inbound call to a handler (SWML webhook, cXML webhook, AI agent, call -flow, RELAY application/topic). The binding model is: set -+call\_handler+ and the handler-specific companion field on the phone -number; the server auto-materializes the matching Fabric resource. -See +SignalWire::REST::PhoneCallHandler+ for the enum, and the -porting-sdk's +phone-binding.md+ for the full model. - -## Signature - -```ruby -class PhoneNumbersResource < SignalWire::REST::CrudResource -``` - -## Inheritance - -**Extends:** [SignalWire::REST::CrudResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/crud-resource) - -## Methods - -### initialize - -#### Signature - -```ruby -def initialize(http) -``` - -#### Parameters - - - -#### Returns - -`PhoneNumbersResource` — a new instance of PhoneNumbersResource - -#### Source - -[`lib/signalwire/rest/namespaces/phone_numbers.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/phone_numbers.rb) - -Line 20. - -*** - -### search - -#### Signature - -```ruby -def search(**params) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/phone_numbers.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/phone_numbers.rb) - -Line 24. - -*** - -### set\_ai\_agent - -Route inbound calls to an AI Agent Fabric resource by ID. - -#### Signature - -```ruby -def set_ai_agent(sid, agent_id:, **extra) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/phone_numbers.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/phone_numbers.rb) - -Line 80. - -*** - -### set\_call\_flow - -Route inbound calls to a Call Flow by ID. - -+version+ accepts +"working\_copy"+ or +"current\_deployed"+ (server -default when omitted). - -#### Signature - -```ruby -def set_call_flow(sid, flow_id:, version: nil, **extra) -``` - -#### Parameters - - - - - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/phone_numbers.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/phone_numbers.rb) - -Line 93. - -*** - -### set\_cxml\_application - -Route inbound calls to an existing cXML application by ID. - -#### Signature - -```ruby -def set_cxml_application(sid, application_id:, **extra) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/phone_numbers.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/phone_numbers.rb) - -Line 70. - -*** - -### set\_cxml\_webhook - -Route inbound calls to a cXML (Twilio-compat / LAML) webhook. - -Despite the wire value +laml\_webhooks+ being plural, this creates a -single +cxml\_webhook+ Fabric resource. +fallback\_url+ is used when -the primary URL fails; +status\_callback\_url+ receives call status -updates. - -#### Signature - -```ruby -def set_cxml_webhook(sid, url:, fallback_url: nil, status_callback_url: nil, **extra) -``` - -#### Parameters - - - - - - - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/phone_numbers.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/phone_numbers.rb) - -Line 59. - -*** - -### set\_relay\_application - -Route inbound calls to a named RELAY application. - -#### Signature - -```ruby -def set_relay_application(sid, name:, **extra) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/phone_numbers.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/phone_numbers.rb) - -Line 103. - -*** - -### set\_relay\_topic - -Route inbound calls to a RELAY topic (client subscription). - -#### Signature - -```ruby -def set_relay_topic(sid, topic:, status_callback_url: nil, **extra) -``` - -#### Parameters - - - - - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/phone_numbers.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/phone_numbers.rb) - -Line 113. - -*** - -### set\_swml\_webhook - -Route inbound calls to an SWML webhook URL. - -Your backend returns an SWML document per call. The server -auto-creates a +swml\_webhook+ Fabric resource keyed off this URL. - -#### Signature - -```ruby -def set_swml_webhook(sid, url:, **extra) -``` - -#### Parameters - - - the phone number SID (e.g. +pn-...+) - - - - - - additional fields passed to +update+ - - -#### Returns - -`Hash` — the updated phone number representation - -#### Source - -[`lib/signalwire/rest/namespaces/phone_numbers.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/phone_numbers.rb) - -Line 44. - -## Source - -[`lib/signalwire/rest/namespaces/phone_numbers.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/phone_numbers.rb) - -Line 17. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/project-namespace/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/project-namespace/index.mdx deleted file mode 100644 index 54c950506c..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/project-namespace/index.mdx +++ /dev/null @@ -1,76 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest/namespaces/project-namespace" -title: "ProjectNamespace" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::REST::Namespaces::ProjectNamespace" - parent: "SignalWire::REST::Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/project.rb" - visibility: "public" ---- -# `ProjectNamespace` - -Project API namespace. - -## Signature - -```ruby -class ProjectNamespace < Object -``` - -## Inheritance - -**Extends:** `Object` - -## Methods - -### initialize - -#### Signature - -```ruby -def initialize(http) -``` - -#### Parameters - - - -#### Returns - -`ProjectNamespace` — a new instance of ProjectNamespace - -#### Source - -[`lib/signalwire/rest/namespaces/project.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/project.rb) - -Line 27. - -*** - -### tokens - -Returns the value of attribute tokens. - -#### Signature - -```ruby -attr_reader tokens -> Object -``` - -#### Source - -[`lib/signalwire/rest/namespaces/project.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/project.rb) - -Line 25. - -## Source - -[`lib/signalwire/rest/namespaces/project.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/project.rb) - -Line 24. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/project-tokens/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/project-tokens/index.mdx deleted file mode 100644 index 2499d89502..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/project-tokens/index.mdx +++ /dev/null @@ -1,120 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest/namespaces/project-tokens" -title: "ProjectTokens" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::REST::Namespaces::ProjectTokens" - parent: "SignalWire::REST::Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/project.rb" - visibility: "public" ---- -# `ProjectTokens` - -Project API token management. - -## Signature - -```ruby -class ProjectTokens < SignalWire::REST::BaseResource -``` - -## Inheritance - -**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/base-resource) - -## Methods - -### create - -#### Signature - -```ruby -def create(**kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/project.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/project.rb) - -Line 12. - -*** - -### delete - -#### Signature - -```ruby -def delete(token_id) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/project.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/project.rb) - -Line 18. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(http) -``` - -#### Parameters - - - -#### Returns - -`ProjectTokens` — a new instance of ProjectTokens - -#### Source - -[`lib/signalwire/rest/namespaces/project.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/project.rb) - -Line 8. - -*** - -### update - -#### Signature - -```ruby -def update(token_id, **kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/project.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/project.rb) - -Line 14. - -## Source - -[`lib/signalwire/rest/namespaces/project.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/project.rb) - -Line 7. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/pub-sub-resource/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/pub-sub-resource/index.mdx deleted file mode 100644 index 5801d168d8..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/pub-sub-resource/index.mdx +++ /dev/null @@ -1,78 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest/namespaces/pub-sub-resource" -title: "PubSubResource" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::REST::Namespaces::PubSubResource" - parent: "SignalWire::REST::Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/pubsub.rb" - visibility: "public" ---- -# `PubSubResource` - -PubSub token generation. - -## Signature - -```ruby -class PubSubResource < SignalWire::REST::BaseResource -``` - -## Inheritance - -**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/base-resource) - -## Methods - -### create\_token - -#### Signature - -```ruby -def create_token(**kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/pubsub.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/pubsub.rb) - -Line 12. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(http) -``` - -#### Parameters - - - -#### Returns - -`PubSubResource` — a new instance of PubSubResource - -#### Source - -[`lib/signalwire/rest/namespaces/pubsub.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/pubsub.rb) - -Line 8. - -## Source - -[`lib/signalwire/rest/namespaces/pubsub.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/pubsub.rb) - -Line 7. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/queues-resource/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/queues-resource/index.mdx deleted file mode 100644 index 7763cf64e7..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/queues-resource/index.mdx +++ /dev/null @@ -1,122 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest/namespaces/queues-resource" -title: "QueuesResource" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::REST::Namespaces::QueuesResource" - parent: "SignalWire::REST::Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/queues.rb" - visibility: "public" ---- -# `QueuesResource` - -Queue management with member operations. - -## Signature - -```ruby -class QueuesResource < SignalWire::REST::CrudResource -``` - -## Inheritance - -**Extends:** [SignalWire::REST::CrudResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/crud-resource) - -## Methods - -### get\_member - -#### Signature - -```ruby -def get_member(queue_id, member_id) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/queues.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/queues.rb) - -Line 22. - -*** - -### get\_next\_member - -#### Signature - -```ruby -def get_next_member(queue_id) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/queues.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/queues.rb) - -Line 18. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(http) -``` - -#### Parameters - - - -#### Returns - -`QueuesResource` — a new instance of QueuesResource - -#### Source - -[`lib/signalwire/rest/namespaces/queues.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/queues.rb) - -Line 10. - -*** - -### list\_members - -#### Signature - -```ruby -def list_members(queue_id, **params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/queues.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/queues.rb) - -Line 14. - -## Source - -[`lib/signalwire/rest/namespaces/queues.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/queues.rb) - -Line 7. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/recordings-resource/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/recordings-resource/index.mdx deleted file mode 100644 index cd268d6363..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/recordings-resource/index.mdx +++ /dev/null @@ -1,118 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest/namespaces/recordings-resource" -title: "RecordingsResource" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::REST::Namespaces::RecordingsResource" - parent: "SignalWire::REST::Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/recordings.rb" - visibility: "public" ---- -# `RecordingsResource` - -Recording management (read-only + delete). - -## Signature - -```ruby -class RecordingsResource < SignalWire::REST::BaseResource -``` - -## Inheritance - -**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/base-resource) - -## Methods - -### delete - -#### Signature - -```ruby -def delete(recording_id) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/recordings.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/recordings.rb) - -Line 14. - -*** - -### get - -#### Signature - -```ruby -def get(recording_id) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/recordings.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/recordings.rb) - -Line 13. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(http) -``` - -#### Parameters - - - -#### Returns - -`RecordingsResource` — a new instance of RecordingsResource - -#### Source - -[`lib/signalwire/rest/namespaces/recordings.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/recordings.rb) - -Line 8. - -*** - -### list - -#### Signature - -```ruby -def list(**params) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/recordings.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/recordings.rb) - -Line 12. - -## Source - -[`lib/signalwire/rest/namespaces/recordings.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/recordings.rb) - -Line 7. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/registry-brands/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/registry-brands/index.mdx deleted file mode 100644 index 45c106c570..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/registry-brands/index.mdx +++ /dev/null @@ -1,138 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest/namespaces/registry-brands" -title: "RegistryBrands" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::REST::Namespaces::RegistryBrands" - parent: "SignalWire::REST::Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb" - visibility: "public" ---- -# `RegistryBrands` - -10DLC brand management. - -## Signature - -```ruby -class RegistryBrands < SignalWire::REST::BaseResource -``` - -## Inheritance - -**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/base-resource) - -## Methods - -### create - -#### Signature - -```ruby -def create(**kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb) - -Line 9. - -*** - -### create\_campaign - -#### Signature - -```ruby -def create_campaign(brand_id, **kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb) - -Line 16. - -*** - -### get - -#### Signature - -```ruby -def get(brand_id) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb) - -Line 10. - -*** - -### list - -#### Signature - -```ruby -def list(**params) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb) - -Line 8. - -*** - -### list\_campaigns - -#### Signature - -```ruby -def list_campaigns(brand_id, **params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb) - -Line 12. - -## Source - -[`lib/signalwire/rest/namespaces/registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb) - -Line 7. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/registry-campaigns/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/registry-campaigns/index.mdx deleted file mode 100644 index f03e899acb..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/registry-campaigns/index.mdx +++ /dev/null @@ -1,142 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest/namespaces/registry-campaigns" -title: "RegistryCampaigns" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::REST::Namespaces::RegistryCampaigns" - parent: "SignalWire::REST::Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb" - visibility: "public" ---- -# `RegistryCampaigns` - -10DLC campaign management. - -## Signature - -```ruby -class RegistryCampaigns < SignalWire::REST::BaseResource -``` - -## Inheritance - -**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/base-resource) - -## Methods - -### create\_order - -#### Signature - -```ruby -def create_order(campaign_id, **kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb) - -Line 34. - -*** - -### get - -#### Signature - -```ruby -def get(campaign_id) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb) - -Line 23. - -*** - -### list\_numbers - -#### Signature - -```ruby -def list_numbers(campaign_id, **params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb) - -Line 26. - -*** - -### list\_orders - -#### Signature - -```ruby -def list_orders(campaign_id, **params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb) - -Line 30. - -*** - -### update - -#### Signature - -```ruby -def update(campaign_id, **kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb) - -Line 24. - -## Source - -[`lib/signalwire/rest/namespaces/registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb) - -Line 22. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/registry-namespace/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/registry-namespace/index.mdx deleted file mode 100644 index 47cdf1ae11..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/registry-namespace/index.mdx +++ /dev/null @@ -1,130 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest/namespaces/registry-namespace" -title: "RegistryNamespace" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::REST::Namespaces::RegistryNamespace" - parent: "SignalWire::REST::Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb" - visibility: "public" ---- -# `RegistryNamespace` - -10DLC Campaign Registry namespace. - -## Signature - -```ruby -class RegistryNamespace < Object -``` - -## Inheritance - -**Extends:** `Object` - -## Methods - -### brands - -Returns the value of attribute brands. - -#### Signature - -```ruby -attr_reader brands -> Object -``` - -#### Source - -[`lib/signalwire/rest/namespaces/registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb) - -Line 55. - -*** - -### campaigns - -Returns the value of attribute campaigns. - -#### Signature - -```ruby -attr_reader campaigns -> Object -``` - -#### Source - -[`lib/signalwire/rest/namespaces/registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb) - -Line 55. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(http) -``` - -#### Parameters - - - -#### Returns - -`RegistryNamespace` — a new instance of RegistryNamespace - -#### Source - -[`lib/signalwire/rest/namespaces/registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb) - -Line 57. - -*** - -### numbers - -Returns the value of attribute numbers. - -#### Signature - -```ruby -attr_reader numbers -> Object -``` - -#### Source - -[`lib/signalwire/rest/namespaces/registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb) - -Line 55. - -*** - -### orders - -Returns the value of attribute orders. - -#### Signature - -```ruby -attr_reader orders -> Object -``` - -#### Source - -[`lib/signalwire/rest/namespaces/registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb) - -Line 55. - -## Source - -[`lib/signalwire/rest/namespaces/registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb) - -Line 54. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/registry-numbers/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/registry-numbers/index.mdx deleted file mode 100644 index b9c676ce3e..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/registry-numbers/index.mdx +++ /dev/null @@ -1,54 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest/namespaces/registry-numbers" -title: "RegistryNumbers" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::REST::Namespaces::RegistryNumbers" - parent: "SignalWire::REST::Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb" - visibility: "public" ---- -# `RegistryNumbers` - -10DLC number assignment management. - -## Signature - -```ruby -class RegistryNumbers < SignalWire::REST::BaseResource -``` - -## Inheritance - -**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/base-resource) - -## Methods - -### delete - -#### Signature - -```ruby -def delete(number_id) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb) - -Line 48. - -## Source - -[`lib/signalwire/rest/namespaces/registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb) - -Line 47. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/registry-orders/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/registry-orders/index.mdx deleted file mode 100644 index e7b176b108..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/registry-orders/index.mdx +++ /dev/null @@ -1,54 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest/namespaces/registry-orders" -title: "RegistryOrders" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::REST::Namespaces::RegistryOrders" - parent: "SignalWire::REST::Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb" - visibility: "public" ---- -# `RegistryOrders` - -10DLC assignment order management. - -## Signature - -```ruby -class RegistryOrders < SignalWire::REST::BaseResource -``` - -## Inheritance - -**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/base-resource) - -## Methods - -### get - -#### Signature - -```ruby -def get(order_id) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb) - -Line 41. - -## Source - -[`lib/signalwire/rest/namespaces/registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/registry.rb) - -Line 40. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/short-codes-resource/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/short-codes-resource/index.mdx deleted file mode 100644 index ec5a177957..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/short-codes-resource/index.mdx +++ /dev/null @@ -1,120 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest/namespaces/short-codes-resource" -title: "ShortCodesResource" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::REST::Namespaces::ShortCodesResource" - parent: "SignalWire::REST::Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/short_codes.rb" - visibility: "public" ---- -# `ShortCodesResource` - -Short code management (read + update only). - -## Signature - -```ruby -class ShortCodesResource < SignalWire::REST::BaseResource -``` - -## Inheritance - -**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/base-resource) - -## Methods - -### get - -#### Signature - -```ruby -def get(short_code_id) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/short_codes.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/short_codes.rb) - -Line 16. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(http) -``` - -#### Parameters - - - -#### Returns - -`ShortCodesResource` — a new instance of ShortCodesResource - -#### Source - -[`lib/signalwire/rest/namespaces/short_codes.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/short_codes.rb) - -Line 8. - -*** - -### list - -#### Signature - -```ruby -def list(**params) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/short_codes.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/short_codes.rb) - -Line 12. - -*** - -### update - -#### Signature - -```ruby -def update(short_code_id, **kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/short_codes.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/short_codes.rb) - -Line 20. - -## Source - -[`lib/signalwire/rest/namespaces/short_codes.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/short_codes.rb) - -Line 7. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/sip-profile-resource/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/sip-profile-resource/index.mdx deleted file mode 100644 index 53b0da8981..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/sip-profile-resource/index.mdx +++ /dev/null @@ -1,94 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest/namespaces/sip-profile-resource" -title: "SipProfileResource" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::REST::Namespaces::SipProfileResource" - parent: "SignalWire::REST::Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/sip_profile.rb" - visibility: "public" ---- -# `SipProfileResource` - -Project SIP profile (singleton resource). - -## Signature - -```ruby -class SipProfileResource < SignalWire::REST::BaseResource -``` - -## Inheritance - -**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/base-resource) - -## Methods - -### get - -#### Signature - -```ruby -def get -``` - -#### Source - -[`lib/signalwire/rest/namespaces/sip_profile.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/sip_profile.rb) - -Line 12. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(http) -``` - -#### Parameters - - - -#### Returns - -`SipProfileResource` — a new instance of SipProfileResource - -#### Source - -[`lib/signalwire/rest/namespaces/sip_profile.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/sip_profile.rb) - -Line 8. - -*** - -### update - -#### Signature - -```ruby -def update(**kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/sip_profile.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/sip_profile.rb) - -Line 16. - -## Source - -[`lib/signalwire/rest/namespaces/sip_profile.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/sip_profile.rb) - -Line 7. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/subscribers-resource/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/subscribers-resource/index.mdx deleted file mode 100644 index 495ffb5b94..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/subscribers-resource/index.mdx +++ /dev/null @@ -1,146 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest/namespaces/subscribers-resource" -title: "SubscribersResource" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::REST::Namespaces::SubscribersResource" - parent: "SignalWire::REST::Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb" - visibility: "public" ---- -# `SubscribersResource` - -Subscribers with SIP endpoint management. - -## Signature - -```ruby -class SubscribersResource < SignalWire::REST::Namespaces::FabricResourcePUT -``` - -## Inheritance - -**Extends:** [SignalWire::REST::Namespaces::FabricResourcePUT](/docs/sdk-reference/reference/ruby/signal-wire/rest/namespaces/fabric-resource-put) - -## Methods - -### create\_sip\_endpoint - -#### Signature - -```ruby -def create_sip_endpoint(subscriber_id, **kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) - -Line 90. - -*** - -### delete\_sip\_endpoint - -#### Signature - -```ruby -def delete_sip_endpoint(subscriber_id, endpoint_id) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) - -Line 102. - -*** - -### get\_sip\_endpoint - -#### Signature - -```ruby -def get_sip_endpoint(subscriber_id, endpoint_id) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) - -Line 94. - -*** - -### list\_sip\_endpoints - -#### Signature - -```ruby -def list_sip_endpoints(subscriber_id, **params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) - -Line 86. - -*** - -### update\_sip\_endpoint - -#### Signature - -```ruby -def update_sip_endpoint(subscriber_id, endpoint_id, **kwargs) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) - -Line 98. - -## Source - -[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) - -Line 85. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/swml-webhooks-resource/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/swml-webhooks-resource/index.mdx deleted file mode 100644 index 9ac3e3648b..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/swml-webhooks-resource/index.mdx +++ /dev/null @@ -1,38 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest/namespaces/swml-webhooks-resource" -title: "SwmlWebhooksResource" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::REST::Namespaces::SwmlWebhooksResource" - parent: "SignalWire::REST::Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb" - visibility: "public" ---- -# `SwmlWebhooksResource` - -SWML webhooks -- auto-materialized by +phone\_numbers.set\_swml\_webhook+. - -## Signature - -```ruby -class SwmlWebhooksResource < SignalWire::REST::Namespaces::AutoMaterializedWebhook -``` - -## Inheritance - -**Extends:** [SignalWire::REST::Namespaces::AutoMaterializedWebhook](/docs/sdk-reference/reference/ruby/signal-wire/rest/namespaces/auto-materialized-webhook) - -## Constants - - - -## Source - -[`lib/signalwire/rest/namespaces/fabric.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/fabric.rb) - -Line 49. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/verified-callers-resource/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/verified-callers-resource/index.mdx deleted file mode 100644 index 51a6f17b32..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/verified-callers-resource/index.mdx +++ /dev/null @@ -1,100 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest/namespaces/verified-callers-resource" -title: "VerifiedCallersResource" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::REST::Namespaces::VerifiedCallersResource" - parent: "SignalWire::REST::Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/verified_callers.rb" - visibility: "public" ---- -# `VerifiedCallersResource` - -Verified caller ID management with verification flow. - -## Signature - -```ruby -class VerifiedCallersResource < SignalWire::REST::CrudResource -``` - -## Inheritance - -**Extends:** [SignalWire::REST::CrudResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/crud-resource) - -## Methods - -### initialize - -#### Signature - -```ruby -def initialize(http) -``` - -#### Parameters - - - -#### Returns - -`VerifiedCallersResource` — a new instance of VerifiedCallersResource - -#### Source - -[`lib/signalwire/rest/namespaces/verified_callers.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/verified_callers.rb) - -Line 10. - -*** - -### redial\_verification - -#### Signature - -```ruby -def redial_verification(caller_id) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/verified_callers.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/verified_callers.rb) - -Line 14. - -*** - -### submit\_verification - -#### Signature - -```ruby -def submit_verification(caller_id, **kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/verified_callers.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/verified_callers.rb) - -Line 18. - -## Source - -[`lib/signalwire/rest/namespaces/verified_callers.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/verified_callers.rb) - -Line 7. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/video-conference-tokens/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/video-conference-tokens/index.mdx deleted file mode 100644 index caa057285b..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/video-conference-tokens/index.mdx +++ /dev/null @@ -1,74 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest/namespaces/video-conference-tokens" -title: "VideoConferenceTokens" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::REST::Namespaces::VideoConferenceTokens" - parent: "SignalWire::REST::Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb" - visibility: "public" ---- -# `VideoConferenceTokens` - -Video conference token management. - -## Signature - -```ruby -class VideoConferenceTokens < SignalWire::REST::BaseResource -``` - -## Inheritance - -**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/base-resource) - -## Methods - -### get - -#### Signature - -```ruby -def get(token_id) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) - -Line 87. - -*** - -### reset - -#### Signature - -```ruby -def reset(token_id) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) - -Line 91. - -## Source - -[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) - -Line 86. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/video-conferences/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/video-conferences/index.mdx deleted file mode 100644 index 59f126ca74..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/video-conferences/index.mdx +++ /dev/null @@ -1,100 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest/namespaces/video-conferences" -title: "VideoConferences" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::REST::Namespaces::VideoConferences" - parent: "SignalWire::REST::Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb" - visibility: "public" ---- -# `VideoConferences` - -Video conference management with tokens and streams. - -## Signature - -```ruby -class VideoConferences < SignalWire::REST::CrudResource -``` - -## Inheritance - -**Extends:** [SignalWire::REST::CrudResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/crud-resource) - -## Methods - -### create\_stream - -#### Signature - -```ruby -def create_stream(conference_id, **kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) - -Line 80. - -*** - -### list\_conference\_tokens - -#### Signature - -```ruby -def list_conference_tokens(conference_id, **params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) - -Line 72. - -*** - -### list\_streams - -#### Signature - -```ruby -def list_streams(conference_id, **params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) - -Line 76. - -## Source - -[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) - -Line 69. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/video-namespace/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/video-namespace/index.mdx deleted file mode 100644 index 5feb7940cb..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/video-namespace/index.mdx +++ /dev/null @@ -1,184 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest/namespaces/video-namespace" -title: "VideoNamespace" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::REST::Namespaces::VideoNamespace" - parent: "SignalWire::REST::Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb" - visibility: "public" ---- -# `VideoNamespace` - -Video API namespace. - -## Signature - -```ruby -class VideoNamespace < Object -``` - -## Inheritance - -**Extends:** `Object` - -## Methods - -### conference\_tokens - -Returns the value of attribute conference\_tokens. - -#### Signature - -```ruby -attr_reader conference_tokens -> Object -``` - -#### Source - -[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) - -Line 113. - -*** - -### conferences - -Returns the value of attribute conferences. - -#### Signature - -```ruby -attr_reader conferences -> Object -``` - -#### Source - -[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) - -Line 113. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(http) -``` - -#### Parameters - - - -#### Returns - -`VideoNamespace` — a new instance of VideoNamespace - -#### Source - -[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) - -Line 116. - -*** - -### room\_recordings - -Returns the value of attribute room\_recordings. - -#### Signature - -```ruby -attr_reader room_recordings -> Object -``` - -#### Source - -[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) - -Line 113. - -*** - -### room\_sessions - -Returns the value of attribute room\_sessions. - -#### Signature - -```ruby -attr_reader room_sessions -> Object -``` - -#### Source - -[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) - -Line 113. - -*** - -### room\_tokens - -Returns the value of attribute room\_tokens. - -#### Signature - -```ruby -attr_reader room_tokens -> Object -``` - -#### Source - -[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) - -Line 113. - -*** - -### rooms - -Returns the value of attribute rooms. - -#### Signature - -```ruby -attr_reader rooms -> Object -``` - -#### Source - -[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) - -Line 113. - -*** - -### streams - -Returns the value of attribute streams. - -#### Signature - -```ruby -attr_reader streams -> Object -``` - -#### Source - -[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) - -Line 113. - -## Source - -[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) - -Line 112. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/video-room-recordings/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/video-room-recordings/index.mdx deleted file mode 100644 index 01fc5afd7d..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/video-room-recordings/index.mdx +++ /dev/null @@ -1,116 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest/namespaces/video-room-recordings" -title: "VideoRoomRecordings" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::REST::Namespaces::VideoRoomRecordings" - parent: "SignalWire::REST::Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb" - visibility: "public" ---- -# `VideoRoomRecordings` - -Video room recording management. - -## Signature - -```ruby -class VideoRoomRecordings < SignalWire::REST::BaseResource -``` - -## Inheritance - -**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/base-resource) - -## Methods - -### delete - -#### Signature - -```ruby -def delete(recording_id) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) - -Line 59. - -*** - -### get - -#### Signature - -```ruby -def get(recording_id) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) - -Line 55. - -*** - -### list - -#### Signature - -```ruby -def list(**params) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) - -Line 51. - -*** - -### list\_events - -#### Signature - -```ruby -def list_events(recording_id, **params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) - -Line 63. - -## Source - -[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) - -Line 50. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/video-room-sessions/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/video-room-sessions/index.mdx deleted file mode 100644 index 27e7ed0e51..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/video-room-sessions/index.mdx +++ /dev/null @@ -1,140 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest/namespaces/video-room-sessions" -title: "VideoRoomSessions" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::REST::Namespaces::VideoRoomSessions" - parent: "SignalWire::REST::Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb" - visibility: "public" ---- -# `VideoRoomSessions` - -Video room session management. - -## Signature - -```ruby -class VideoRoomSessions < SignalWire::REST::BaseResource -``` - -## Inheritance - -**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/base-resource) - -## Methods - -### get - -#### Signature - -```ruby -def get(session_id) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) - -Line 32. - -*** - -### list - -#### Signature - -```ruby -def list(**params) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) - -Line 28. - -*** - -### list\_events - -#### Signature - -```ruby -def list_events(session_id, **params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) - -Line 36. - -*** - -### list\_members - -#### Signature - -```ruby -def list_members(session_id, **params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) - -Line 40. - -*** - -### list\_recordings - -#### Signature - -```ruby -def list_recordings(session_id, **params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) - -Line 44. - -## Source - -[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) - -Line 27. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/video-room-tokens/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/video-room-tokens/index.mdx deleted file mode 100644 index 3c713e0004..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/video-room-tokens/index.mdx +++ /dev/null @@ -1,54 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest/namespaces/video-room-tokens" -title: "VideoRoomTokens" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::REST::Namespaces::VideoRoomTokens" - parent: "SignalWire::REST::Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb" - visibility: "public" ---- -# `VideoRoomTokens` - -Video room token generation. - -## Signature - -```ruby -class VideoRoomTokens < SignalWire::REST::BaseResource -``` - -## Inheritance - -**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/base-resource) - -## Methods - -### create - -#### Signature - -```ruby -def create(**kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) - -Line 21. - -## Source - -[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) - -Line 20. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/video-rooms/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/video-rooms/index.mdx deleted file mode 100644 index 722f42b71d..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/video-rooms/index.mdx +++ /dev/null @@ -1,78 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest/namespaces/video-rooms" -title: "VideoRooms" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::REST::Namespaces::VideoRooms" - parent: "SignalWire::REST::Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb" - visibility: "public" ---- -# `VideoRooms` - -Video room management with streams. - -## Signature - -```ruby -class VideoRooms < SignalWire::REST::CrudResource -``` - -## Inheritance - -**Extends:** [SignalWire::REST::CrudResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/crud-resource) - -## Methods - -### create\_stream - -#### Signature - -```ruby -def create_stream(room_id, **kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) - -Line 14. - -*** - -### list\_streams - -#### Signature - -```ruby -def list_streams(room_id, **params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) - -Line 10. - -## Source - -[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) - -Line 7. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/video-streams/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/video-streams/index.mdx deleted file mode 100644 index be7e8e4710..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/video-streams/index.mdx +++ /dev/null @@ -1,96 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest/namespaces/video-streams" -title: "VideoStreams" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::REST::Namespaces::VideoStreams" - parent: "SignalWire::REST::Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb" - visibility: "public" ---- -# `VideoStreams` - -Video stream management. - -## Signature - -```ruby -class VideoStreams < SignalWire::REST::BaseResource -``` - -## Inheritance - -**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/base-resource) - -## Methods - -### delete - -#### Signature - -```ruby -def delete(stream_id) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) - -Line 106. - -*** - -### get - -#### Signature - -```ruby -def get(stream_id) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) - -Line 98. - -*** - -### update - -#### Signature - -```ruby -def update(stream_id, **kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) - -Line 102. - -## Source - -[`lib/signalwire/rest/namespaces/video.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/video.rb) - -Line 97. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/voice-logs/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/voice-logs/index.mdx deleted file mode 100644 index 1e15d3baa7..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/namespaces/voice-logs/index.mdx +++ /dev/null @@ -1,96 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest/namespaces/voice-logs" -title: "VoiceLogs" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::REST::Namespaces::VoiceLogs" - parent: "SignalWire::REST::Namespaces" - module: "SignalWire.REST.Namespaces" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/logs.rb" - visibility: "public" ---- -# `VoiceLogs` - -Voice log queries. - -## Signature - -```ruby -class VoiceLogs < SignalWire::REST::BaseResource -``` - -## Inheritance - -**Extends:** [SignalWire::REST::BaseResource](/docs/sdk-reference/reference/ruby/signal-wire/rest/base-resource) - -## Methods - -### get - -#### Signature - -```ruby -def get(log_id) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/logs.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/logs.rb) - -Line 15. - -*** - -### list - -#### Signature - -```ruby -def list(**params) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/rest/namespaces/logs.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/logs.rb) - -Line 14. - -*** - -### list\_events - -#### Signature - -```ruby -def list_events(log_id, **params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/rest/namespaces/logs.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/logs.rb) - -Line 17. - -## Source - -[`lib/signalwire/rest/namespaces/logs.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/logs.rb) - -Line 13. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/paginated-iterator/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/paginated-iterator/index.mdx deleted file mode 100644 index af15d0b199..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/paginated-iterator/index.mdx +++ /dev/null @@ -1,283 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest/paginated-iterator" -title: "PaginatedIterator" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::REST::PaginatedIterator" - parent: "SignalWire::REST" - module: "SignalWire.REST" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/pagination.rb" - visibility: "public" ---- -# `PaginatedIterator` - -Iterates items across paginated API responses. - -Mirrors the Python PaginatedIterator (signalwire.rest.\_pagination): -the constructor records http/path/params/data\_key without fetching; -iteration walks pages by following the +links.next+ cursor. - -Usage: -iter = SignalWire::REST::PaginatedIterator.new(http, '/api/path', -params: \{\}, data\_key: 'data') -iter.each \{ |item| ... \} - -The iterator is single-pass (matching Python's **next** semantics); -use #to\_a to collect every item across all pages. - -## Signature - -```ruby -class PaginatedIterator < Object -``` - -## Inheritance - -**Extends:** `Object` - -**Mixins:** `Enumerable` - -## Methods - -### \_\_iter\_\_ - -Equivalent of Python's +**iter**+: returns the iterator itself. - -#### Signature - -```ruby -def __iter__ -``` - -#### Source - -[`lib/signalwire/rest/pagination.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/pagination.rb) - -Line 52. - -*** - -### \_\_next\_\_ - -Equivalent of Python's +**next**+: returns the next item across pages, -raising +StopIteration+ when the iterator is exhausted (mirroring -Python's raise-StopIteration contract rather than the +:**stop**+ -sentinel used internally by +#each+). - -#### Signature - -```ruby -def __next__ -``` - -#### Throws - -- `StopIteration` - -#### Source - -[`lib/signalwire/rest/pagination.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/pagination.rb) - -Line 60. - -*** - -### data\_key - -Returns the value of attribute data\_key. - -#### Signature - -```ruby -attr_reader data_key -> Object -``` - -#### Source - -[`lib/signalwire/rest/pagination.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/pagination.rb) - -Line 21. - -*** - -### done - -Returns the value of attribute done. - -#### Signature - -```ruby -attr_reader done -> Object -``` - -#### Source - -[`lib/signalwire/rest/pagination.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/pagination.rb) - -Line 21. - -*** - -### each - -#### Signature - -```ruby -def each -``` - -#### Source - -[`lib/signalwire/rest/pagination.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/pagination.rb) - -Line 34. - -*** - -### http - -Returns the value of attribute http. - -#### Signature - -```ruby -attr_reader http -> Object -``` - -#### Source - -[`lib/signalwire/rest/pagination.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/pagination.rb) - -Line 21. - -*** - -### index - -Returns the value of attribute index. - -#### Signature - -```ruby -attr_reader index -> Object -``` - -#### Source - -[`lib/signalwire/rest/pagination.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/pagination.rb) - -Line 21. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(http, path, params = nil, data_key = 'data') -``` - -#### Parameters - - - - - - - - - -#### Returns - -`PaginatedIterator` — a new instance of PaginatedIterator - -#### Source - -[`lib/signalwire/rest/pagination.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/pagination.rb) - -Line 23. - -*** - -### items - -Returns the value of attribute items. - -#### Signature - -```ruby -attr_reader items -> Object -``` - -#### Source - -[`lib/signalwire/rest/pagination.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/pagination.rb) - -Line 21. - -*** - -### next\_item - -Equivalent of Python's **next**. Returns the sentinel +:**stop**+ -when exhausted (Ruby has no StopIteration error idiom for plain -Enumerable), but the public surface is +#each+. - -#### Signature - -```ruby -def next_item -``` - -#### Source - -[`lib/signalwire/rest/pagination.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/pagination.rb) - -Line 70. - -*** - -### params - -Returns the value of attribute params. - -#### Signature - -```ruby -attr_reader params -> Object -``` - -#### Source - -[`lib/signalwire/rest/pagination.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/pagination.rb) - -Line 21. - -*** - -### path - -Returns the value of attribute path. - -#### Signature - -```ruby -attr_reader path -> Object -``` - -#### Source - -[`lib/signalwire/rest/pagination.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/pagination.rb) - -Line 21. - -## Source - -[`lib/signalwire/rest/pagination.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/pagination.rb) - -Line 18. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/phone-call-handler/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/phone-call-handler/index.mdx deleted file mode 100644 index 79c6a6f10f..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/phone-call-handler/index.mdx +++ /dev/null @@ -1,93 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest/phone-call-handler" -title: "PhoneCallHandler" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "module" - language: "ruby" - qualified_name: "SignalWire::REST::PhoneCallHandler" - parent: "SignalWire::REST" - module: "SignalWire.REST" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/phone_call_handler.rb" - visibility: "public" ---- -# `PhoneCallHandler` - -PhoneCallHandler -- enum-like constants of the +call\_handler+ values -accepted by +phone\_numbers.update+. - -Named +PhoneCallHandler+ (not +CallHandler+) to avoid colliding with -the RELAY client's inbound-call-handler callback (+Relay::Client#on\_call+). - -Setting a phone number's +call\_handler+ together with the handler-specific -companion field routes inbound calls and auto-materializes the matching -Fabric resource on the server. See the high-level helpers on -+SignalWire::REST::Namespaces::PhoneNumbersResource+. - -\=== Mapping - -Constant | Companion field (required) | Auto-creates resource -\------------------+--------------------------------+---------------------- -RELAY\_SCRIPT | call\_relay\_script\_url | swml\_webhook -LAML\_WEBHOOKS | call\_request\_url | cxml\_webhook -LAML\_APPLICATION | call\_laml\_application\_id | cxml\_application -AI\_AGENT | call\_ai\_agent\_id | ai\_agent -CALL\_FLOW | call\_flow\_id | call\_flow -RELAY\_APPLICATION | call\_relay\_application | relay\_application -RELAY\_TOPIC | call\_relay\_topic | (routes via RELAY) -RELAY\_CONTEXT | call\_relay\_context | (legacy, prefer topic) -RELAY\_CONNECTOR | (connector config) | (internal) -VIDEO\_ROOM | call\_video\_room\_id | (routes to Video API) -DIALOGFLOW | call\_dialogflow\_agent\_id | (none) - -Note: +LAML\_WEBHOOKS+ (wire value +laml\_webhooks+) produces a _cXML_ -handler despite the plural name, not a generic webhook. For SWML, use -+RELAY\_SCRIPT+. - -## Signature - -```ruby -module PhoneCallHandler -``` - -## Constants - - - - - All supported wire values, in the same order as the constants. - - - - - - - - - - - - - - - - - - - - - - -## Source - -[`lib/signalwire/rest/phone_call_handler.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/phone_call_handler.rb) - -Line 35. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/rest-client/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/rest-client/index.mdx deleted file mode 100644 index a103d27d8d..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/rest-client/index.mdx +++ /dev/null @@ -1,507 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest/rest-client" -title: "RestClient" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::REST::RestClient" - parent: "SignalWire::REST" - module: "SignalWire.REST" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb" - visibility: "public" ---- -# `RestClient` - -REST client for the SignalWire platform APIs. - -Usage: -client = SignalWire::REST::RestClient.new( -project: 'your-project-id', -token: 'your-api-token', -host: 'your-space.signalwire.com' -) - -# Or use environment variables: - -# SIGNALWIRE\_PROJECT\_ID, SIGNALWIRE\_API\_TOKEN, SIGNALWIRE\_SPACE - -client = SignalWire::REST::RestClient.new - -# Use namespaced resources - -client.fabric.ai\_agents.list -client.calling.play(call\_id, play: \[...]) -client.phone\_numbers.search(area\_code: '512') -client.video.rooms.create(name: 'standup') -client.compat.calls.list - -## Signature - -```ruby -class RestClient < Object -``` - -## Inheritance - -**Extends:** `Object` - -## Methods - -### addresses - -Returns the value of attribute addresses. - -#### Signature - -```ruby -attr_reader addresses -> Object -``` - -#### Source - -[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) - -Line 50. - -*** - -### calling - -Returns the value of attribute calling. - -#### Signature - -```ruby -attr_reader calling -> Object -``` - -#### Source - -[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) - -Line 50. - -*** - -### chat - -Returns the value of attribute chat. - -#### Signature - -```ruby -attr_reader chat -> Object -``` - -#### Source - -[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) - -Line 50. - -*** - -### compat - -Returns the value of attribute compat. - -#### Signature - -```ruby -attr_reader compat -> Object -``` - -#### Source - -[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) - -Line 50. - -*** - -### datasphere - -Returns the value of attribute datasphere. - -#### Signature - -```ruby -attr_reader datasphere -> Object -``` - -#### Source - -[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) - -Line 50. - -*** - -### fabric - -Returns the value of attribute fabric. - -#### Signature - -```ruby -attr_reader fabric -> Object -``` - -#### Source - -[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) - -Line 50. - -*** - -### http - -Returns the value of attribute http. - -#### Signature - -```ruby -attr_reader http -> Object -``` - -#### Source - -[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) - -Line 50. - -*** - -### imported\_numbers - -Returns the value of attribute imported\_numbers. - -#### Signature - -```ruby -attr_reader imported_numbers -> Object -``` - -#### Source - -[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) - -Line 50. - -*** - -### initialize - -+base\_url+ overrides the derived +https://\{space\}+ default. The -audit harness uses this to point at the local fixture server. -+ca\_file+ (optional) names a PEM CA bundle to trust for HTTPS in -addition to the system store — for private-CA deployments; forwarded -to the underlying HttpClient. - -#### Signature - -```ruby -def initialize(project: nil, token: nil, host: nil, base_url: nil, ca_file: nil) -``` - -#### Parameters - - - - - - - - - - - -#### Returns - -`RestClient` — a new instance of RestClient - -#### Source - -[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) - -Line 61. - -*** - -### logs - -Returns the value of attribute logs. - -#### Signature - -```ruby -attr_reader logs -> Object -``` - -#### Source - -[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) - -Line 50. - -*** - -### lookup - -Returns the value of attribute lookup. - -#### Signature - -```ruby -attr_reader lookup -> Object -``` - -#### Source - -[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) - -Line 50. - -*** - -### mfa - -Returns the value of attribute mfa. - -#### Signature - -```ruby -attr_reader mfa -> Object -``` - -#### Source - -[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) - -Line 50. - -*** - -### number\_groups - -Returns the value of attribute number\_groups. - -#### Signature - -```ruby -attr_reader number_groups -> Object -``` - -#### Source - -[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) - -Line 50. - -*** - -### phone\_numbers - -Returns the value of attribute phone\_numbers. - -#### Signature - -```ruby -attr_reader phone_numbers -> Object -``` - -#### Source - -[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) - -Line 50. - -*** - -### project - -Returns the value of attribute project. - -#### Signature - -```ruby -attr_reader project -> Object -``` - -#### Source - -[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) - -Line 50. - -*** - -### project\_id - -Returns the value of attribute project\_id. - -#### Signature - -```ruby -attr_reader project_id -> Object -``` - -#### Source - -[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) - -Line 50. - -*** - -### pubsub - -Returns the value of attribute pubsub. - -#### Signature - -```ruby -attr_reader pubsub -> Object -``` - -#### Source - -[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) - -Line 50. - -*** - -### queues - -Returns the value of attribute queues. - -#### Signature - -```ruby -attr_reader queues -> Object -``` - -#### Source - -[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) - -Line 50. - -*** - -### recordings - -Returns the value of attribute recordings. - -#### Signature - -```ruby -attr_reader recordings -> Object -``` - -#### Source - -[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) - -Line 50. - -*** - -### registry - -Returns the value of attribute registry. - -#### Signature - -```ruby -attr_reader registry -> Object -``` - -#### Source - -[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) - -Line 50. - -*** - -### short\_codes - -Returns the value of attribute short\_codes. - -#### Signature - -```ruby -attr_reader short_codes -> Object -``` - -#### Source - -[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) - -Line 50. - -*** - -### sip\_profile - -Returns the value of attribute sip\_profile. - -#### Signature - -```ruby -attr_reader sip_profile -> Object -``` - -#### Source - -[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) - -Line 50. - -*** - -### verified\_callers - -Returns the value of attribute verified\_callers. - -#### Signature - -```ruby -attr_reader verified_callers -> Object -``` - -#### Source - -[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) - -Line 50. - -*** - -### video - -Returns the value of attribute video. - -#### Signature - -```ruby -attr_reader video -> Object -``` - -#### Source - -[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) - -Line 50. - -## Source - -[`lib/signalwire/rest/rest_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb) - -Line 49. diff --git a/fern/products/sdk-reference/ruby/signal-wire/rest/signal-wire-rest-error/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/rest/signal-wire-rest-error/index.mdx deleted file mode 100644 index 9052689221..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/rest/signal-wire-rest-error/index.mdx +++ /dev/null @@ -1,136 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/rest/signal-wire-rest-error" -title: "SignalWireRestError" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::REST::SignalWireRestError" - parent: "SignalWire::REST" - module: "SignalWire.REST" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb" - visibility: "public" ---- -# `SignalWireRestError` - -Raised when the SignalWire REST API returns a non-2xx response. - -## Signature - -```ruby -class SignalWireRestError < StandardError -``` - -## Inheritance - -**Extends:** `StandardError` - -## Methods - -### body - -Returns the value of attribute body. - -#### Signature - -```ruby -attr_reader body -> Object -``` - -#### Source - -[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) - -Line 13. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(status_code, body, url, method_name = 'GET') -``` - -#### Parameters - - - - - - - - - -#### Returns - -`SignalWireRestError` — a new instance of SignalWireRestError - -#### Source - -[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) - -Line 15. - -*** - -### method\_name - -Returns the value of attribute method\_name. - -#### Signature - -```ruby -attr_reader method_name -> Object -``` - -#### Source - -[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) - -Line 13. - -*** - -### status\_code - -Returns the value of attribute status\_code. - -#### Signature - -```ruby -attr_reader status_code -> Object -``` - -#### Source - -[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) - -Line 13. - -*** - -### url - -Returns the value of attribute url. - -#### Signature - -```ruby -attr_reader url -> Object -``` - -#### Source - -[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) - -Line 13. - -## Source - -[`lib/signalwire/rest/http_client.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb) - -Line 12. diff --git a/fern/products/sdk-reference/ruby/signal-wire/runtime/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/runtime/index.mdx deleted file mode 100644 index 18daa71aa1..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/runtime/index.mdx +++ /dev/null @@ -1,148 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/runtime" -title: "Runtime" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "module" - language: "ruby" - qualified_name: "SignalWire::Runtime" - parent: "SignalWire" - module: "SignalWire" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/runtime.rb" - visibility: "public" ---- -# `Runtime` - -Runtime environment detection. - -Detects the execution environment (plain server, AWS Lambda, CGI, -Google Cloud Functions, Azure Functions) by inspecting well-known -environment variables set by each platform. - -This is the Ruby counterpart to the Python SDK's -+signalwire.core.logging\_config.get\_execution\_mode+. - -## Signature - -```ruby -module Runtime -``` - -## Constants - - - -## Methods - -### execution\_mode - -Determine the current execution mode. - -Returns one of: - -- +:cgi+ - running under a CGI gateway (GATEWAY\_INTERFACE is set) -- +:lambda+ - running under AWS Lambda -- +:google\_cloud\_function+ - Google Cloud Functions / Cloud Run -- +:azure\_function+ - Azure Functions -- +:server+ - long-running HTTP server (the default) - -Detection order matters: CGI is checked before Lambda because a -Lambda function invoked through an emulator that also sets -GATEWAY\_INTERFACE should still be treated as CGI. - -#### Signature - -```ruby -def execution_mode -``` - -#### Returns - -`Symbol` — one of the values in \{MODES\} - -#### Source - -[`lib/signalwire/runtime.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/runtime.rb) - -Line 34. - -*** - -### lambda\_base\_url - -Construct the base URL for the current Lambda function. - -Prefers +AWS\_LAMBDA\_FUNCTION\_URL+ when set; otherwise falls back to -the standard Function URL shape built from +AWS\_LAMBDA\_FUNCTION\_NAME+ -and +AWS\_REGION+. Returns +nil+ when neither signal is present. - -The returned URL never has a trailing slash and never contains a -path component, so callers must append the agent's route themselves. - -#### Signature - -```ruby -def lambda_base_url -``` - -#### Returns - -`String | nil` - -#### Source - -[`lib/signalwire/runtime.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/runtime.rb) - -Line 85. - -*** - -### lambda? - -True when the SDK is running inside AWS Lambda. - -#### Signature - -```ruby -def lambda? -``` - -#### Returns - -`Boolean` - -#### Source - -[`lib/signalwire/runtime.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/runtime.rb) - -Line 63. - -*** - -### serverless? - -True when the SDK is running inside any serverless platform. - -#### Signature - -```ruby -def serverless? -``` - -#### Returns - -`Boolean` - -#### Source - -[`lib/signalwire/runtime.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/runtime.rb) - -Line 69. - -## Source - -[`lib/signalwire/runtime.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/runtime.rb) - -Line 17. diff --git a/fern/products/sdk-reference/ruby/signal-wire/security/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/security/index.mdx deleted file mode 100644 index 8b7230f741..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/security/index.mdx +++ /dev/null @@ -1,48 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/security" -title: "Security" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "module" - language: "ruby" - qualified_name: "SignalWire::Security" - parent: "SignalWire" - module: "SignalWire" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/security/session_manager.rb" - visibility: "public" ---- -# `Security` - -## Signature - -```ruby -module Security -``` - -## Classes - - - - Stateless HMAC-SHA256 session manager for secure SWAIG tool tokens. - - - - Rack middleware that rejects webhook requests with bad signatures. - - - -## Modules - - - - Stateless validator for SignalWire-signed webhook requests. - - - -## Source - -[`lib/signalwire/security/session_manager.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/security/session_manager.rb) - -Line 14. diff --git a/fern/products/sdk-reference/ruby/signal-wire/security/session-manager/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/security/session-manager/index.mdx deleted file mode 100644 index b6992260c8..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/security/session-manager/index.mdx +++ /dev/null @@ -1,350 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/security/session-manager" -title: "SessionManager" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Security::SessionManager" - parent: "SignalWire::Security" - module: "SignalWire.Security" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/security/session_manager.rb" - visibility: "public" ---- -# `SessionManager` - -Stateless HMAC-SHA256 session manager for secure SWAIG tool tokens. - -Tokens are self-contained: all information needed for validation is -encoded inside the token itself. No server-side session state is stored. - -mgr = SessionManager.new(token\_expiry\_secs: 900) -token = mgr.create\_token("lookup\_order", "call-abc-123") -mgr.validate\_token("lookup\_order", token, "call-abc-123") # => true - -## Signature - -```ruby -class SessionManager < Object -``` - -## Inheritance - -**Extends:** `Object` - -## Methods - -### activate\_session - -Legacy lifecycle hook retained for API compatibility with the Python -reference. The session manager is stateless with respect to -activation, so this accepts the call ID and reports success. - -#### Signature - -```ruby -def activate_session(_call_id) -``` - -#### Parameters - - - -#### Returns - -`Boolean` — always +true+ - -#### Source - -[`lib/signalwire/security/session_manager.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/security/session_manager.rb) - -Line 126. - -*** - -### create\_session - -Return the given +call\_id+, or generate a new URL-safe session -identifier when none is supplied. - -Matches the Python reference's stateless +create\_session+: the SDK -does not persist sessions, it just mints an identifier callers can -thread through subsequent token operations. - -#### Signature - -```ruby -def create_session(call_id = nil) -``` - -#### Parameters - - - existing call ID to reuse - - -#### Returns - -`String` — the resolved call ID - -#### Source - -[`lib/signalwire/security/session_manager.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/security/session_manager.rb) - -Line 113. - -*** - -### create\_token - -Create a secure, self-contained token for a function call. - -Token format (before Base64): -call\_id.function\_name.expiry\_timestamp.nonce.hmac\_hex - -#### Signature - -```ruby -def create_token(function_name, call_id) -``` - -#### Parameters - - - - - -#### Returns - -`String` — URL-safe Base64-encoded token - -#### Source - -[`lib/signalwire/security/session_manager.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/security/session_manager.rb) - -Line 50. - -*** - -### debug\_mode= - -When set true, \{#debug\_token\} decodes token internals instead of -returning +\{ "error" => "debug mode not enabled" \}+. Mirrors the -Python reference's +\_debug\_mode+ attribute (off by default). Exposed -as a writer only — there is no corresponding reader on the Python -surface, so none is projected here. - -#### Signature - -```ruby -attr_writer debug_mode==(value: Object) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/security/session_manager.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/security/session_manager.rb) - -Line 30. - -*** - -### debug\_token - -Decode a token's components for inspection WITHOUT validating it. - -Requires \{#debug\_mode=\} to have been set +true+; otherwise returns -+\{ "error" => "debug mode not enabled" \}+, matching the Python -reference. The returned structure mirrors Python's nested -+components+/+status+ shape (call\_id and signature truncated to -8 chars + "..." when longer). - -#### Signature - -```ruby -def debug_token(token) -``` - -#### Parameters - - - -#### Returns - -`Hash` — decoded components/status, or an error/malformed hash - -#### Source - -[`lib/signalwire/security/session_manager.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/security/session_manager.rb) - -Line 181. - -*** - -### end\_session - -Legacy lifecycle hook retained for API compatibility with the Python -reference. Clears any metadata accumulated for the session and -reports success. - -#### Signature - -```ruby -def end_session(call_id) -``` - -#### Parameters - - - -#### Returns - -`Boolean` — always +true+ - -#### Source - -[`lib/signalwire/security/session_manager.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/security/session_manager.rb) - -Line 136. - -*** - -### get\_session\_metadata - -Fetch the metadata hash stored for +call\_id+. - -The Python reference is stateless and always returns +\{\}+; this port -keeps a real per-session store (matching the TypeScript port) so the -getter/setter pair round-trips, but still returns an empty hash for -unknown sessions — callers never get +nil+. - -#### Signature - -```ruby -def get_session_metadata(call_id) -``` - -#### Parameters - - - -#### Returns - -`Hash` — the session's metadata, or +\{\}+ if none is stored - -#### Source - -[`lib/signalwire/security/session_manager.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/security/session_manager.rb) - -Line 150. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(token_expiry_secs: 3600, secret_key: nil) -``` - -#### Parameters - - - - - -#### Returns - -`SessionManager` — a new instance of SessionManager - -#### Source - -[`lib/signalwire/security/session_manager.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/security/session_manager.rb) - -Line 34. - -*** - -### set\_session\_metadata - -Store a single +key+/+value+ pair in +call\_id+'s metadata, merging -with anything already recorded for that session. - -Signature mirrors the Python reference's -+set\_session\_metadata(call\_id, key, value)+. - -#### Signature - -```ruby -def set_session_metadata(call_id, key, value) -``` - -#### Parameters - - - - - - - -#### Returns - -`Boolean` — always +true+ - -#### Source - -[`lib/signalwire/security/session_manager.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/security/session_manager.rb) - -Line 165. - -*** - -### validate\_token - -Validate a function-call token. - -Checks: - -1. Correct Base64 / structure (5 dot-separated parts) -2. HMAC signature (timing-safe comparison) -3. Function name matches -4. Call ID matches -5. Token not expired - -#### Signature - -```ruby -def validate_token(function_name, token, call_id) -``` - -#### Parameters - - - - - the token to validate - - - - -#### Returns - -`Boolean` - -#### Source - -[`lib/signalwire/security/session_manager.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/security/session_manager.rb) - -Line 74. - -## Source - -[`lib/signalwire/security/session_manager.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/security/session_manager.rb) - -Line 24. diff --git a/fern/products/sdk-reference/ruby/signal-wire/security/webhook-middleware/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/security/webhook-middleware/index.mdx deleted file mode 100644 index 2b14c13f88..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/security/webhook-middleware/index.mdx +++ /dev/null @@ -1,86 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/security/webhook-middleware" -title: "WebhookMiddleware" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Security::WebhookMiddleware" - parent: "SignalWire::Security" - module: "SignalWire.Security" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/security/webhook_middleware.rb" - visibility: "public" ---- -# `WebhookMiddleware` - -Rack middleware that rejects webhook requests with bad signatures. - -Configure with the customer's Signing Key (and optional `trust_proxy` -to honor X-Forwarded headers). Mount upstream of any body-parsing -middleware so the raw bytes survive intact. - -## Signature - -```ruby -class WebhookMiddleware < Object -``` - -## Inheritance - -**Extends:** `Object` - -## Constants - - - Key under which the captured raw body is stashed on the request env. - - - - - - -## Methods - -### initialize - -#### Signature - -```ruby -def initialize(app, signing_key:, trust_proxy: false, paths: nil, methods: ['POST']) -``` - -#### Parameters - - - the wrapped Rack app. - - - - - - - - - - -#### Returns - -`WebhookMiddleware` — a new instance of WebhookMiddleware - -#### Throws - -- `ArgumentError` — when `signing_key` is missing. - -#### Source - -[`lib/signalwire/security/webhook_middleware.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/security/webhook_middleware.rb) - -Line 66. - -## Source - -[`lib/signalwire/security/webhook_middleware.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/security/webhook_middleware.rb) - -Line 47. diff --git a/fern/products/sdk-reference/ruby/signal-wire/security/webhook-validator/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/security/webhook-validator/index.mdx deleted file mode 100644 index 22c7b1c04f..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/security/webhook-validator/index.mdx +++ /dev/null @@ -1,129 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/security/webhook-validator" -title: "WebhookValidator" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "module" - language: "ruby" - qualified_name: "SignalWire::Security::WebhookValidator" - parent: "SignalWire::Security" - module: "SignalWire.Security" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/security/webhook_validator.rb" - visibility: "public" ---- -# `WebhookValidator` - -Stateless validator for SignalWire-signed webhook requests. - -Both Scheme A (JSON, hex digest) and Scheme B (form-encoded, base64 -digest with bodySHA256 fallback) per porting-sdk/webhooks.md are -tried by the combined entry point. - -The two public entry points are exposed via `module_function` so -they can be invoked as `WebhookValidator.validate_webhook_signature(...)`. -All internal helpers are deliberately `_`-prefixed and private so -they don't pollute the public surface (`audit_no_cheat_tests` and -`signature_dump.rb` skip `_`-prefixed methods). - -## Signature - -```ruby -module WebhookValidator -``` - -## Methods - -### validate\_request - -Legacy `@signalwire/compatibility-api` drop-in entry point. - -If `params_or_raw_body` is a `String`, delegates to -\{validate\_webhook\_signature\} (Scheme A then Scheme B with parsed form). - -If it's a `Hash` or an array of (key, value) pairs, treats it as -pre-parsed form params and runs Scheme B directly (with URL port -normalization and optional bodySHA256 fallback). - -#### Signature - -```ruby -def validate_request(signing_key, signature, url, params_or_raw_body) -``` - -#### Parameters - - - - - - - - - -#### Returns - -`Boolean` - -#### Throws - -- `ArgumentError` — when `signing_key` is missing. -- `TypeError` — when `params_or_raw_body` is neither a String, Hash, nor an array of pairs. - -#### Source - -[`lib/signalwire/security/webhook_validator.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/security/webhook_validator.rb) - -Line 121. - -*** - -### validate\_webhook\_signature - -Validate a SignalWire webhook signature against both schemes. - -#### Signature - -```ruby -def validate_webhook_signature(signing_key, signature, url, raw_body) -``` - -#### Parameters - - - Customer's Signing Key from the Dashboard. UTF-8 string, secret. `nil` / empty raises `ArgumentError` — that's a programming error, not a validation failure. - - - - The `X-SignalWire-Signature` header value (or `X-Twilio-Signature` for cXML compat). Missing / empty returns false without raising. - - - - The full URL SignalWire POSTed to (scheme, host, optional port, path, query). Must match what the platform saw — see the URL reconstruction section of porting-sdk/webhooks.md. - - - - The raw request body bytes as a UTF-8 string, BEFORE any JSON / form parsing. Must be a `String` — passing a parsed Hash raises `TypeError`. - - -#### Returns - -`Boolean` — true if the signature matches either Scheme A or Scheme B (with port-normalization variants and optional bodySHA256 fallback). false otherwise. - -#### Throws - -- `ArgumentError` — when `signing_key` is missing. -- `TypeError` — when `raw_body` is not a String. - -#### Source - -[`lib/signalwire/security/webhook_validator.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/security/webhook_validator.rb) - -Line 67. - -## Source - -[`lib/signalwire/security/webhook_validator.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/security/webhook_validator.rb) - -Line 45. diff --git a/fern/products/sdk-reference/ruby/signal-wire/serverless/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/serverless/index.mdx deleted file mode 100644 index a1f646c766..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/serverless/index.mdx +++ /dev/null @@ -1,36 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/serverless" -title: "Serverless" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "module" - language: "ruby" - qualified_name: "SignalWire::Serverless" - parent: "SignalWire" - module: "SignalWire" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/serverless/lambda_handler.rb" - visibility: "public" ---- -# `Serverless` - -## Signature - -```ruby -module Serverless -``` - -## Classes - - - - Adapter that lets an AWS Lambda function invoke a Rack application. - - - -## Source - -[`lib/signalwire/serverless/lambda_handler.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/serverless/lambda_handler.rb) - -Line 14. diff --git a/fern/products/sdk-reference/ruby/signal-wire/serverless/lambda-handler/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/serverless/lambda-handler/index.mdx deleted file mode 100644 index 38339a7b54..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/serverless/lambda-handler/index.mdx +++ /dev/null @@ -1,151 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/serverless/lambda-handler" -title: "LambdaHandler" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Serverless::LambdaHandler" - parent: "SignalWire::Serverless" - module: "SignalWire.Serverless" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/serverless/lambda_handler.rb" - visibility: "public" ---- -# `LambdaHandler` - -Adapter that lets an AWS Lambda function invoke a Rack application. - -Typical usage from a Lambda entrypoint file: - -require 'signalwire' - -AGENT = SignalWire::AgentBase.new(name: 'my-agent', route: '/') - -# ...configure AGENT... - -HANDLER = SignalWire::Serverless::LambdaHandler.new(AGENT.rack\_app) - -def handler(event:, context:) -HANDLER.call(event, context) -end - -The adapter accepts events from either Lambda Function URLs / API -Gateway HTTP API (payload format v2) or the classic API Gateway REST -API (payload format v1) and returns a response in the matching -shape. Any triple returned by the Rack app (status, headers, body) -is translated into the +\{statusCode:, headers:, body:\}+ shape -expected by Lambda. - -The adapter never reaches out to the network and has no gem -dependencies beyond what the SignalWire SDK already requires, so it -can be bundled directly into a Lambda zip. - -## Signature - -```ruby -class LambdaHandler < Object -``` - -## Inheritance - -**Extends:** `Object` - -## Methods - -### call - -Invoke the wrapped Rack application with a Lambda event. - -#### Signature - -```ruby -def call(event, _context = nil) -``` - -#### Parameters - - - the Lambda invocation event - - - - the Lambda context (ignored) - - -#### Returns - -`Hash` — a Lambda-shaped response hash - -#### Source - -[`lib/signalwire/serverless/lambda_handler.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/serverless/lambda_handler.rb) - -Line 53. - -*** - -### for - -Class-level convenience so consumers can use -+SignalWire::Serverless::LambdaHandler.for(agent)+ without -duplicating +.rack\_app+ at the call site. - -#### Signature - -```ruby -def for(agent_or_app) -``` - -#### Parameters - - - either an AgentBase (responds to +rack\_app+) or any Rack-compatible application - - -#### Returns - -`LambdaHandler` - -#### Source - -[`lib/signalwire/serverless/lambda_handler.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/serverless/lambda_handler.rb) - -Line 71. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(app) -``` - -#### Parameters - - - a Rack-compatible application - - -#### Returns - -`LambdaHandler` — a new instance of LambdaHandler - -#### Throws - -- `ArgumentError` - -#### Source - -[`lib/signalwire/serverless/lambda_handler.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/serverless/lambda_handler.rb) - -Line 42. - -## Source - -[`lib/signalwire/serverless/lambda_handler.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/serverless/lambda_handler.rb) - -Line 40. diff --git a/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/api-ninjas-trivia-skill/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/api-ninjas-trivia-skill/index.mdx deleted file mode 100644 index 2f94fff9c9..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/api-ninjas-trivia-skill/index.mdx +++ /dev/null @@ -1,158 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/skills/builtin/api-ninjas-trivia-skill" -title: "ApiNinjasTriviaSkill" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Skills::Builtin::ApiNinjasTriviaSkill" - parent: "SignalWire::Skills::Builtin" - module: "SignalWire.Skills.Builtin" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/api_ninjas_trivia.rb" - visibility: "public" ---- -# `ApiNinjasTriviaSkill` - -## Signature - -```ruby -class ApiNinjasTriviaSkill < SignalWire::Skills::SkillBase -``` - -## Inheritance - -**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/ruby/signal-wire/skills/skill-base) - -## Constants - - - -## Methods - -### description - -#### Signature - -```ruby -def description -``` - -#### Source - -[`lib/signalwire/skills/builtin/api_ninjas_trivia.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/api_ninjas_trivia.rb) - -Line 28. - -*** - -### get\_parameter\_schema - -#### Signature - -```ruby -def get_parameter_schema -``` - -#### Source - -[`lib/signalwire/skills/builtin/api_ninjas_trivia.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/api_ninjas_trivia.rb) - -Line 86. - -*** - -### instance\_key - -#### Signature - -```ruby -def instance_key -``` - -#### Source - -[`lib/signalwire/skills/builtin/api_ninjas_trivia.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/api_ninjas_trivia.rb) - -Line 41. - -*** - -### name - -#### Signature - -```ruby -def name -``` - -#### Source - -[`lib/signalwire/skills/builtin/api_ninjas_trivia.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/api_ninjas_trivia.rb) - -Line 27. - -*** - -### register\_tools - -#### Signature - -```ruby -def register_tools -``` - -#### Source - -[`lib/signalwire/skills/builtin/api_ninjas_trivia.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/api_ninjas_trivia.rb) - -Line 43. - -*** - -### setup - -#### Signature - -```ruby -def setup -``` - -#### Source - -[`lib/signalwire/skills/builtin/api_ninjas_trivia.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/api_ninjas_trivia.rb) - -Line 31. - -*** - -### supports\_multiple\_instances? - -#### Signature - -```ruby -def supports_multiple_instances? -``` - -#### Returns - -`Boolean` - -#### Source - -[`lib/signalwire/skills/builtin/api_ninjas_trivia.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/api_ninjas_trivia.rb) - -Line 29. - -## Source - -[`lib/signalwire/skills/builtin/api_ninjas_trivia.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/api_ninjas_trivia.rb) - -Line 9. diff --git a/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/claude-skills-skill/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/claude-skills-skill/index.mdx deleted file mode 100644 index f0a8759536..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/claude-skills-skill/index.mdx +++ /dev/null @@ -1,182 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/skills/builtin/claude-skills-skill" -title: "ClaudeSkillsSkill" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Skills::Builtin::ClaudeSkillsSkill" - parent: "SignalWire::Skills::Builtin" - module: "SignalWire.Skills.Builtin" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/claude_skills.rb" - visibility: "public" ---- -# `ClaudeSkillsSkill` - -Loads Claude SKILL.md files as agent tools. - -## Signature - -```ruby -class ClaudeSkillsSkill < SignalWire::Skills::SkillBase -``` - -## Inheritance - -**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/ruby/signal-wire/skills/skill-base) - -## Methods - -### description - -#### Signature - -```ruby -def description -``` - -#### Source - -[`lib/signalwire/skills/builtin/claude_skills.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/claude_skills.rb) - -Line 12. - -*** - -### get\_hints - -#### Signature - -```ruby -def get_hints -``` - -#### Source - -[`lib/signalwire/skills/builtin/claude_skills.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/claude_skills.rb) - -Line 46. - -*** - -### get\_parameter\_schema - -#### Signature - -```ruby -def get_parameter_schema -``` - -#### Source - -[`lib/signalwire/skills/builtin/claude_skills.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/claude_skills.rb) - -Line 56. - -*** - -### get\_prompt\_sections - -#### Signature - -```ruby -def get_prompt_sections -``` - -#### Source - -[`lib/signalwire/skills/builtin/claude_skills.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/claude_skills.rb) - -Line 50. - -*** - -### instance\_key - -#### Signature - -```ruby -def instance_key -``` - -#### Source - -[`lib/signalwire/skills/builtin/claude_skills.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/claude_skills.rb) - -Line 29. - -*** - -### name - -#### Signature - -```ruby -def name -``` - -#### Source - -[`lib/signalwire/skills/builtin/claude_skills.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/claude_skills.rb) - -Line 11. - -*** - -### register\_tools - -#### Signature - -```ruby -def register_tools -``` - -#### Source - -[`lib/signalwire/skills/builtin/claude_skills.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/claude_skills.rb) - -Line 31. - -*** - -### setup - -#### Signature - -```ruby -def setup -``` - -#### Source - -[`lib/signalwire/skills/builtin/claude_skills.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/claude_skills.rb) - -Line 15. - -*** - -### supports\_multiple\_instances? - -#### Signature - -```ruby -def supports_multiple_instances? -``` - -#### Returns - -`Boolean` - -#### Source - -[`lib/signalwire/skills/builtin/claude_skills.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/claude_skills.rb) - -Line 13. - -## Source - -[`lib/signalwire/skills/builtin/claude_skills.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/claude_skills.rb) - -Line 10. diff --git a/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/custom-skills-skill/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/custom-skills-skill/index.mdx deleted file mode 100644 index c83aad5504..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/custom-skills-skill/index.mdx +++ /dev/null @@ -1,150 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/skills/builtin/custom-skills-skill" -title: "CustomSkillsSkill" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Skills::Builtin::CustomSkillsSkill" - parent: "SignalWire::Skills::Builtin" - module: "SignalWire.Skills.Builtin" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/custom_skills.rb" - visibility: "public" ---- -# `CustomSkillsSkill` - -User-defined custom tools. - -## Signature - -```ruby -class CustomSkillsSkill < SignalWire::Skills::SkillBase -``` - -## Inheritance - -**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/ruby/signal-wire/skills/skill-base) - -## Methods - -### description - -#### Signature - -```ruby -def description -``` - -#### Source - -[`lib/signalwire/skills/builtin/custom_skills.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/custom_skills.rb) - -Line 12. - -*** - -### get\_parameter\_schema - -#### Signature - -```ruby -def get_parameter_schema -``` - -#### Source - -[`lib/signalwire/skills/builtin/custom_skills.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/custom_skills.rb) - -Line 42. - -*** - -### instance\_key - -#### Signature - -```ruby -def instance_key -``` - -#### Source - -[`lib/signalwire/skills/builtin/custom_skills.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/custom_skills.rb) - -Line 21. - -*** - -### name - -#### Signature - -```ruby -def name -``` - -#### Source - -[`lib/signalwire/skills/builtin/custom_skills.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/custom_skills.rb) - -Line 11. - -*** - -### register\_tools - -#### Signature - -```ruby -def register_tools -``` - -#### Source - -[`lib/signalwire/skills/builtin/custom_skills.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/custom_skills.rb) - -Line 26. - -*** - -### setup - -#### Signature - -```ruby -def setup -``` - -#### Source - -[`lib/signalwire/skills/builtin/custom_skills.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/custom_skills.rb) - -Line 15. - -*** - -### supports\_multiple\_instances? - -#### Signature - -```ruby -def supports_multiple_instances? -``` - -#### Returns - -`Boolean` - -#### Source - -[`lib/signalwire/skills/builtin/custom_skills.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/custom_skills.rb) - -Line 13. - -## Source - -[`lib/signalwire/skills/builtin/custom_skills.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/custom_skills.rb) - -Line 10. diff --git a/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/datasphere-serverless-skill/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/datasphere-serverless-skill/index.mdx deleted file mode 100644 index ec0626dfc1..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/datasphere-serverless-skill/index.mdx +++ /dev/null @@ -1,180 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/skills/builtin/datasphere-serverless-skill" -title: "DatasphereServerlessSkill" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Skills::Builtin::DatasphereServerlessSkill" - parent: "SignalWire::Skills::Builtin" - module: "SignalWire.Skills.Builtin" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datasphere_serverless.rb" - visibility: "public" ---- -# `DatasphereServerlessSkill` - -## Signature - -```ruby -class DatasphereServerlessSkill < SignalWire::Skills::SkillBase -``` - -## Inheritance - -**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/ruby/signal-wire/skills/skill-base) - -## Methods - -### description - -#### Signature - -```ruby -def description -``` - -#### Source - -[`lib/signalwire/skills/builtin/datasphere_serverless.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datasphere_serverless.rb) - -Line 14. - -*** - -### get\_global\_data - -#### Signature - -```ruby -def get_global_data -``` - -#### Source - -[`lib/signalwire/skills/builtin/datasphere_serverless.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datasphere_serverless.rb) - -Line 67. - -*** - -### get\_parameter\_schema - -#### Signature - -```ruby -def get_parameter_schema -``` - -#### Source - -[`lib/signalwire/skills/builtin/datasphere_serverless.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datasphere_serverless.rb) - -Line 90. - -*** - -### get\_prompt\_sections - -#### Signature - -```ruby -def get_prompt_sections -``` - -#### Source - -[`lib/signalwire/skills/builtin/datasphere_serverless.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datasphere_serverless.rb) - -Line 75. - -*** - -### instance\_key - -#### Signature - -```ruby -def instance_key -``` - -#### Source - -[`lib/signalwire/skills/builtin/datasphere_serverless.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datasphere_serverless.rb) - -Line 37. - -*** - -### name - -#### Signature - -```ruby -def name -``` - -#### Source - -[`lib/signalwire/skills/builtin/datasphere_serverless.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datasphere_serverless.rb) - -Line 13. - -*** - -### register\_tools - -#### Signature - -```ruby -def register_tools -``` - -#### Source - -[`lib/signalwire/skills/builtin/datasphere_serverless.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datasphere_serverless.rb) - -Line 39. - -*** - -### setup - -#### Signature - -```ruby -def setup -``` - -#### Source - -[`lib/signalwire/skills/builtin/datasphere_serverless.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datasphere_serverless.rb) - -Line 17. - -*** - -### supports\_multiple\_instances? - -#### Signature - -```ruby -def supports_multiple_instances? -``` - -#### Returns - -`Boolean` - -#### Source - -[`lib/signalwire/skills/builtin/datasphere_serverless.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datasphere_serverless.rb) - -Line 15. - -## Source - -[`lib/signalwire/skills/builtin/datasphere_serverless.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datasphere_serverless.rb) - -Line 12. diff --git a/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/datasphere-skill/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/datasphere-skill/index.mdx deleted file mode 100644 index 298fc9fb7b..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/datasphere-skill/index.mdx +++ /dev/null @@ -1,180 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/skills/builtin/datasphere-skill" -title: "DatasphereSkill" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Skills::Builtin::DatasphereSkill" - parent: "SignalWire::Skills::Builtin" - module: "SignalWire.Skills.Builtin" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datasphere.rb" - visibility: "public" ---- -# `DatasphereSkill` - -## Signature - -```ruby -class DatasphereSkill < SignalWire::Skills::SkillBase -``` - -## Inheritance - -**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/ruby/signal-wire/skills/skill-base) - -## Methods - -### description - -#### Signature - -```ruby -def description -``` - -#### Source - -[`lib/signalwire/skills/builtin/datasphere.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datasphere.rb) - -Line 16. - -*** - -### get\_global\_data - -#### Signature - -```ruby -def get_global_data -``` - -#### Source - -[`lib/signalwire/skills/builtin/datasphere.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datasphere.rb) - -Line 63. - -*** - -### get\_parameter\_schema - -#### Signature - -```ruby -def get_parameter_schema -``` - -#### Source - -[`lib/signalwire/skills/builtin/datasphere.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datasphere.rb) - -Line 86. - -*** - -### get\_prompt\_sections - -#### Signature - -```ruby -def get_prompt_sections -``` - -#### Source - -[`lib/signalwire/skills/builtin/datasphere.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datasphere.rb) - -Line 71. - -*** - -### instance\_key - -#### Signature - -```ruby -def instance_key -``` - -#### Source - -[`lib/signalwire/skills/builtin/datasphere.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datasphere.rb) - -Line 48. - -*** - -### name - -#### Signature - -```ruby -def name -``` - -#### Source - -[`lib/signalwire/skills/builtin/datasphere.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datasphere.rb) - -Line 15. - -*** - -### register\_tools - -#### Signature - -```ruby -def register_tools -``` - -#### Source - -[`lib/signalwire/skills/builtin/datasphere.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datasphere.rb) - -Line 50. - -*** - -### setup - -#### Signature - -```ruby -def setup -``` - -#### Source - -[`lib/signalwire/skills/builtin/datasphere.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datasphere.rb) - -Line 19. - -*** - -### supports\_multiple\_instances? - -#### Signature - -```ruby -def supports_multiple_instances? -``` - -#### Returns - -`Boolean` - -#### Source - -[`lib/signalwire/skills/builtin/datasphere.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datasphere.rb) - -Line 17. - -## Source - -[`lib/signalwire/skills/builtin/datasphere.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datasphere.rb) - -Line 14. diff --git a/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/date-time-skill/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/date-time-skill/index.mdx deleted file mode 100644 index a011614a06..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/date-time-skill/index.mdx +++ /dev/null @@ -1,137 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/skills/builtin/date-time-skill" -title: "DateTimeSkill" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Skills::Builtin::DateTimeSkill" - parent: "SignalWire::Skills::Builtin" - module: "SignalWire.Skills.Builtin" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datetime.rb" - visibility: "public" ---- -# `DateTimeSkill` - -## Signature - -```ruby -class DateTimeSkill < SignalWire::Skills::SkillBase -``` - -## Inheritance - -**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/ruby/signal-wire/skills/skill-base) - -## Methods - -### description - -#### Signature - -```ruby -def description -``` - -#### Source - -[`lib/signalwire/skills/builtin/datetime.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datetime.rb) - -Line 11. - -*** - -### get\_parameter\_schema - -Python parity: `DateTimeSkill.get_parameter_schema` returns only the -base-class schema (the datetime skill adds no custom parameters). - -#### Signature - -```ruby -def get_parameter_schema -``` - -#### Source - -[`lib/signalwire/skills/builtin/datetime.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datetime.rb) - -Line 29. - -*** - -### get\_prompt\_sections - -#### Signature - -```ruby -def get_prompt_sections -``` - -#### Source - -[`lib/signalwire/skills/builtin/datetime.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datetime.rb) - -Line 54. - -*** - -### name - -#### Signature - -```ruby -def name -``` - -#### Source - -[`lib/signalwire/skills/builtin/datetime.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datetime.rb) - -Line 10. - -*** - -### register\_tools - -#### Signature - -```ruby -def register_tools -``` - -#### Source - -[`lib/signalwire/skills/builtin/datetime.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datetime.rb) - -Line 33. - -*** - -### setup - -Python parity: `DateTimeSkill.setup` -> `self.validate_packages()`. -Python validates that `pytz` is importable before the skill is -usable. Ruby resolves timezones through the stdlib `time`/`date` -libraries (no third-party dependency), so setup here verifies those -are loadable and returns whether the skill is ready. - -#### Signature - -```ruby -def setup -``` - -#### Source - -[`lib/signalwire/skills/builtin/datetime.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datetime.rb) - -Line 18. - -## Source - -[`lib/signalwire/skills/builtin/datetime.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/datetime.rb) - -Line 9. diff --git a/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/google-maps-skill/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/google-maps-skill/index.mdx deleted file mode 100644 index 99cc5977b6..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/google-maps-skill/index.mdx +++ /dev/null @@ -1,144 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/skills/builtin/google-maps-skill" -title: "GoogleMapsSkill" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Skills::Builtin::GoogleMapsSkill" - parent: "SignalWire::Skills::Builtin" - module: "SignalWire.Skills.Builtin" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/google_maps.rb" - visibility: "public" ---- -# `GoogleMapsSkill` - -## Signature - -```ruby -class GoogleMapsSkill < SignalWire::Skills::SkillBase -``` - -## Inheritance - -**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/ruby/signal-wire/skills/skill-base) - -## Methods - -### description - -#### Signature - -```ruby -def description -``` - -#### Source - -[`lib/signalwire/skills/builtin/google_maps.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/google_maps.rb) - -Line 15. - -*** - -### get\_hints - -#### Signature - -```ruby -def get_hints -``` - -#### Source - -[`lib/signalwire/skills/builtin/google_maps.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/google_maps.rb) - -Line 51. - -*** - -### get\_parameter\_schema - -#### Signature - -```ruby -def get_parameter_schema -``` - -#### Source - -[`lib/signalwire/skills/builtin/google_maps.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/google_maps.rb) - -Line 70. - -*** - -### get\_prompt\_sections - -#### Signature - -```ruby -def get_prompt_sections -``` - -#### Source - -[`lib/signalwire/skills/builtin/google_maps.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/google_maps.rb) - -Line 55. - -*** - -### name - -#### Signature - -```ruby -def name -``` - -#### Source - -[`lib/signalwire/skills/builtin/google_maps.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/google_maps.rb) - -Line 14. - -*** - -### register\_tools - -#### Signature - -```ruby -def register_tools -``` - -#### Source - -[`lib/signalwire/skills/builtin/google_maps.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/google_maps.rb) - -Line 25. - -*** - -### setup - -#### Signature - -```ruby -def setup -``` - -#### Source - -[`lib/signalwire/skills/builtin/google_maps.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/google_maps.rb) - -Line 17. - -## Source - -[`lib/signalwire/skills/builtin/google_maps.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/google_maps.rb) - -Line 13. diff --git a/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/index.mdx deleted file mode 100644 index ec3e1f590c..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/index.mdx +++ /dev/null @@ -1,76 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/skills/builtin" -title: "Builtin" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "module" - language: "ruby" - qualified_name: "SignalWire::Skills::Builtin" - parent: "SignalWire::Skills" - module: "SignalWire.Skills" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/joke.rb" - visibility: "public" ---- -# `Builtin` - -## Signature - -```ruby -module Builtin -``` - -## Classes - - - - - - Loads Claude SKILL.md files as agent tools. - - - - User-defined custom tools. - - - - - - - - - - - - - - - - - - Bridge MCP servers with SWAIG functions. - - - - Network/remote mode only (as per porting manifest). - - - - - - - - - - - - - - - -## Source - -[`lib/signalwire/skills/builtin/joke.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/joke.rb) - -Line 9. diff --git a/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/info-gatherer-skill/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/info-gatherer-skill/index.mdx deleted file mode 100644 index 49a0a2224e..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/info-gatherer-skill/index.mdx +++ /dev/null @@ -1,180 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/skills/builtin/info-gatherer-skill" -title: "InfoGathererSkill" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Skills::Builtin::InfoGathererSkill" - parent: "SignalWire::Skills::Builtin" - module: "SignalWire.Skills.Builtin" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/info_gatherer.rb" - visibility: "public" ---- -# `InfoGathererSkill` - -## Signature - -```ruby -class InfoGathererSkill < SignalWire::Skills::SkillBase -``` - -## Inheritance - -**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/ruby/signal-wire/skills/skill-base) - -## Methods - -### description - -#### Signature - -```ruby -def description -``` - -#### Source - -[`lib/signalwire/skills/builtin/info_gatherer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/info_gatherer.rb) - -Line 11. - -*** - -### get\_global\_data - -#### Signature - -```ruby -def get_global_data -``` - -#### Source - -[`lib/signalwire/skills/builtin/info_gatherer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/info_gatherer.rb) - -Line 63. - -*** - -### get\_parameter\_schema - -#### Signature - -```ruby -def get_parameter_schema -``` - -#### Source - -[`lib/signalwire/skills/builtin/info_gatherer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/info_gatherer.rb) - -Line 84. - -*** - -### get\_prompt\_sections - -#### Signature - -```ruby -def get_prompt_sections -``` - -#### Source - -[`lib/signalwire/skills/builtin/info_gatherer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/info_gatherer.rb) - -Line 73. - -*** - -### instance\_key - -#### Signature - -```ruby -def instance_key -``` - -#### Source - -[`lib/signalwire/skills/builtin/info_gatherer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/info_gatherer.rb) - -Line 38. - -*** - -### name - -#### Signature - -```ruby -def name -``` - -#### Source - -[`lib/signalwire/skills/builtin/info_gatherer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/info_gatherer.rb) - -Line 10. - -*** - -### register\_tools - -#### Signature - -```ruby -def register_tools -``` - -#### Source - -[`lib/signalwire/skills/builtin/info_gatherer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/info_gatherer.rb) - -Line 43. - -*** - -### setup - -#### Signature - -```ruby -def setup -``` - -#### Source - -[`lib/signalwire/skills/builtin/info_gatherer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/info_gatherer.rb) - -Line 14. - -*** - -### supports\_multiple\_instances? - -#### Signature - -```ruby -def supports_multiple_instances? -``` - -#### Returns - -`Boolean` - -#### Source - -[`lib/signalwire/skills/builtin/info_gatherer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/info_gatherer.rb) - -Line 12. - -## Source - -[`lib/signalwire/skills/builtin/info_gatherer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/info_gatherer.rb) - -Line 9. diff --git a/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/joke-skill/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/joke-skill/index.mdx deleted file mode 100644 index 6bdc45692c..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/joke-skill/index.mdx +++ /dev/null @@ -1,144 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/skills/builtin/joke-skill" -title: "JokeSkill" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Skills::Builtin::JokeSkill" - parent: "SignalWire::Skills::Builtin" - module: "SignalWire.Skills.Builtin" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/joke.rb" - visibility: "public" ---- -# `JokeSkill` - -## Signature - -```ruby -class JokeSkill < SignalWire::Skills::SkillBase -``` - -## Inheritance - -**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/ruby/signal-wire/skills/skill-base) - -## Methods - -### description - -#### Signature - -```ruby -def description -``` - -#### Source - -[`lib/signalwire/skills/builtin/joke.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/joke.rb) - -Line 12. - -*** - -### get\_global\_data - -#### Signature - -```ruby -def get_global_data -``` - -#### Source - -[`lib/signalwire/skills/builtin/joke.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/joke.rb) - -Line 34. - -*** - -### get\_parameter\_schema - -#### Signature - -```ruby -def get_parameter_schema -``` - -#### Source - -[`lib/signalwire/skills/builtin/joke.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/joke.rb) - -Line 52. - -*** - -### get\_prompt\_sections - -#### Signature - -```ruby -def get_prompt_sections -``` - -#### Source - -[`lib/signalwire/skills/builtin/joke.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/joke.rb) - -Line 38. - -*** - -### name - -#### Signature - -```ruby -def name -``` - -#### Source - -[`lib/signalwire/skills/builtin/joke.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/joke.rb) - -Line 11. - -*** - -### register\_tools - -#### Signature - -```ruby -def register_tools -``` - -#### Source - -[`lib/signalwire/skills/builtin/joke.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/joke.rb) - -Line 21. - -*** - -### setup - -#### Signature - -```ruby -def setup -``` - -#### Source - -[`lib/signalwire/skills/builtin/joke.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/joke.rb) - -Line 14. - -## Source - -[`lib/signalwire/skills/builtin/joke.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/joke.rb) - -Line 10. diff --git a/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/math-skill/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/math-skill/index.mdx deleted file mode 100644 index f660ec8875..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/math-skill/index.mdx +++ /dev/null @@ -1,135 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/skills/builtin/math-skill" -title: "MathSkill" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Skills::Builtin::MathSkill" - parent: "SignalWire::Skills::Builtin" - module: "SignalWire.Skills.Builtin" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/math.rb" - visibility: "public" ---- -# `MathSkill` - -## Signature - -```ruby -class MathSkill < SignalWire::Skills::SkillBase -``` - -## Inheritance - -**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/ruby/signal-wire/skills/skill-base) - -## Methods - -### description - -#### Signature - -```ruby -def description -``` - -#### Source - -[`lib/signalwire/skills/builtin/math.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/math.rb) - -Line 11. - -*** - -### get\_parameter\_schema - -Python parity: `MathSkill.get_parameter_schema` returns only the -base-class schema (the math skill adds no custom parameters). - -#### Signature - -```ruby -def get_parameter_schema -``` - -#### Source - -[`lib/signalwire/skills/builtin/math.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/math.rb) - -Line 22. - -*** - -### get\_prompt\_sections - -#### Signature - -```ruby -def get_prompt_sections -``` - -#### Source - -[`lib/signalwire/skills/builtin/math.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/math.rb) - -Line 39. - -*** - -### name - -#### Signature - -```ruby -def name -``` - -#### Source - -[`lib/signalwire/skills/builtin/math.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/math.rb) - -Line 10. - -*** - -### register\_tools - -#### Signature - -```ruby -def register_tools -``` - -#### Source - -[`lib/signalwire/skills/builtin/math.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/math.rb) - -Line 26. - -*** - -### setup - -Python parity: `MathSkill.setup` -> `return True`. The math skill -has no external packages or environment to validate; it is always -ready once constructed. - -#### Signature - -```ruby -def setup -``` - -#### Source - -[`lib/signalwire/skills/builtin/math.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/math.rb) - -Line 16. - -## Source - -[`lib/signalwire/skills/builtin/math.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/math.rb) - -Line 9. diff --git a/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/mcp-gateway-skill/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/mcp-gateway-skill/index.mdx deleted file mode 100644 index 6b3f3b4e6e..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/mcp-gateway-skill/index.mdx +++ /dev/null @@ -1,162 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/skills/builtin/mcp-gateway-skill" -title: "McpGatewaySkill" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Skills::Builtin::McpGatewaySkill" - parent: "SignalWire::Skills::Builtin" - module: "SignalWire.Skills.Builtin" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/mcp_gateway.rb" - visibility: "public" ---- -# `McpGatewaySkill` - -Bridge MCP servers with SWAIG functions. - -## Signature - -```ruby -class McpGatewaySkill < SignalWire::Skills::SkillBase -``` - -## Inheritance - -**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/ruby/signal-wire/skills/skill-base) - -## Methods - -### description - -#### Signature - -```ruby -def description -``` - -#### Source - -[`lib/signalwire/skills/builtin/mcp_gateway.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/mcp_gateway.rb) - -Line 16. - -*** - -### get\_global\_data - -#### Signature - -```ruby -def get_global_data -``` - -#### Source - -[`lib/signalwire/skills/builtin/mcp_gateway.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/mcp_gateway.rb) - -Line 53. - -*** - -### get\_hints - -#### Signature - -```ruby -def get_hints -``` - -#### Source - -[`lib/signalwire/skills/builtin/mcp_gateway.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/mcp_gateway.rb) - -Line 47. - -*** - -### get\_parameter\_schema - -#### Signature - -```ruby -def get_parameter_schema -``` - -#### Source - -[`lib/signalwire/skills/builtin/mcp_gateway.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/mcp_gateway.rb) - -Line 72. - -*** - -### get\_prompt\_sections - -#### Signature - -```ruby -def get_prompt_sections -``` - -#### Source - -[`lib/signalwire/skills/builtin/mcp_gateway.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/mcp_gateway.rb) - -Line 61. - -*** - -### name - -#### Signature - -```ruby -def name -``` - -#### Source - -[`lib/signalwire/skills/builtin/mcp_gateway.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/mcp_gateway.rb) - -Line 15. - -*** - -### register\_tools - -#### Signature - -```ruby -def register_tools -``` - -#### Source - -[`lib/signalwire/skills/builtin/mcp_gateway.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/mcp_gateway.rb) - -Line 34. - -*** - -### setup - -#### Signature - -```ruby -def setup -``` - -#### Source - -[`lib/signalwire/skills/builtin/mcp_gateway.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/mcp_gateway.rb) - -Line 18. - -## Source - -[`lib/signalwire/skills/builtin/mcp_gateway.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/mcp_gateway.rb) - -Line 14. diff --git a/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/native-vector-search-skill/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/native-vector-search-skill/index.mdx deleted file mode 100644 index 47f40c10fc..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/native-vector-search-skill/index.mdx +++ /dev/null @@ -1,166 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/skills/builtin/native-vector-search-skill" -title: "NativeVectorSearchSkill" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Skills::Builtin::NativeVectorSearchSkill" - parent: "SignalWire::Skills::Builtin" - module: "SignalWire.Skills.Builtin" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/native_vector_search.rb" - visibility: "public" ---- -# `NativeVectorSearchSkill` - -Network/remote mode only (as per porting manifest). - -## Signature - -```ruby -class NativeVectorSearchSkill < SignalWire::Skills::SkillBase -``` - -## Inheritance - -**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/ruby/signal-wire/skills/skill-base) - -## Methods - -### description - -#### Signature - -```ruby -def description -``` - -#### Source - -[`lib/signalwire/skills/builtin/native_vector_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/native_vector_search.rb) - -Line 16. - -*** - -### get\_hints - -#### Signature - -```ruby -def get_hints -``` - -#### Source - -[`lib/signalwire/skills/builtin/native_vector_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/native_vector_search.rb) - -Line 49. - -*** - -### get\_parameter\_schema - -#### Signature - -```ruby -def get_parameter_schema -``` - -#### Source - -[`lib/signalwire/skills/builtin/native_vector_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/native_vector_search.rb) - -Line 55. - -*** - -### instance\_key - -#### Signature - -```ruby -def instance_key -``` - -#### Source - -[`lib/signalwire/skills/builtin/native_vector_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/native_vector_search.rb) - -Line 33. - -*** - -### name - -#### Signature - -```ruby -def name -``` - -#### Source - -[`lib/signalwire/skills/builtin/native_vector_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/native_vector_search.rb) - -Line 15. - -*** - -### register\_tools - -#### Signature - -```ruby -def register_tools -``` - -#### Source - -[`lib/signalwire/skills/builtin/native_vector_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/native_vector_search.rb) - -Line 35. - -*** - -### setup - -#### Signature - -```ruby -def setup -``` - -#### Source - -[`lib/signalwire/skills/builtin/native_vector_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/native_vector_search.rb) - -Line 19. - -*** - -### supports\_multiple\_instances? - -#### Signature - -```ruby -def supports_multiple_instances? -``` - -#### Returns - -`Boolean` - -#### Source - -[`lib/signalwire/skills/builtin/native_vector_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/native_vector_search.rb) - -Line 17. - -## Source - -[`lib/signalwire/skills/builtin/native_vector_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/native_vector_search.rb) - -Line 14. diff --git a/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/play-background-file-skill/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/play-background-file-skill/index.mdx deleted file mode 100644 index 8b46b17e70..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/play-background-file-skill/index.mdx +++ /dev/null @@ -1,148 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/skills/builtin/play-background-file-skill" -title: "PlayBackgroundFileSkill" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Skills::Builtin::PlayBackgroundFileSkill" - parent: "SignalWire::Skills::Builtin" - module: "SignalWire.Skills.Builtin" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/play_background_file.rb" - visibility: "public" ---- -# `PlayBackgroundFileSkill` - -## Signature - -```ruby -class PlayBackgroundFileSkill < SignalWire::Skills::SkillBase -``` - -## Inheritance - -**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/ruby/signal-wire/skills/skill-base) - -## Methods - -### description - -#### Signature - -```ruby -def description -``` - -#### Source - -[`lib/signalwire/skills/builtin/play_background_file.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/play_background_file.rb) - -Line 11. - -*** - -### get\_parameter\_schema - -#### Signature - -```ruby -def get_parameter_schema -``` - -#### Source - -[`lib/signalwire/skills/builtin/play_background_file.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/play_background_file.rb) - -Line 73. - -*** - -### instance\_key - -#### Signature - -```ruby -def instance_key -``` - -#### Source - -[`lib/signalwire/skills/builtin/play_background_file.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/play_background_file.rb) - -Line 25. - -*** - -### name - -#### Signature - -```ruby -def name -``` - -#### Source - -[`lib/signalwire/skills/builtin/play_background_file.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/play_background_file.rb) - -Line 10. - -*** - -### register\_tools - -#### Signature - -```ruby -def register_tools -``` - -#### Source - -[`lib/signalwire/skills/builtin/play_background_file.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/play_background_file.rb) - -Line 27. - -*** - -### setup - -#### Signature - -```ruby -def setup -``` - -#### Source - -[`lib/signalwire/skills/builtin/play_background_file.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/play_background_file.rb) - -Line 14. - -*** - -### supports\_multiple\_instances? - -#### Signature - -```ruby -def supports_multiple_instances? -``` - -#### Returns - -`Boolean` - -#### Source - -[`lib/signalwire/skills/builtin/play_background_file.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/play_background_file.rb) - -Line 12. - -## Source - -[`lib/signalwire/skills/builtin/play_background_file.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/play_background_file.rb) - -Line 9. diff --git a/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/spider-skill/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/spider-skill/index.mdx deleted file mode 100644 index 5ccd3c4532..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/spider-skill/index.mdx +++ /dev/null @@ -1,186 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/skills/builtin/spider-skill" -title: "SpiderSkill" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Skills::Builtin::SpiderSkill" - parent: "SignalWire::Skills::Builtin" - module: "SignalWire.Skills.Builtin" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/spider.rb" - visibility: "public" ---- -# `SpiderSkill` - -## Signature - -```ruby -class SpiderSkill < SignalWire::Skills::SkillBase -``` - -## Inheritance - -**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/ruby/signal-wire/skills/skill-base) - -## Methods - -### cleanup - -Python parity: `SpiderSkill.cleanup` closes the HTTP session, clears -the response cache, and logs. Ruby opens a fresh Net::HTTP connection -per request (no persistent session to close), so teardown here drops -the response cache and logs that the skill was cleaned up. Safe to -call more than once. - -#### Signature - -```ruby -def cleanup -``` - -#### Source - -[`lib/signalwire/skills/builtin/spider.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/spider.rb) - -Line 35. - -*** - -### description - -#### Signature - -```ruby -def description -``` - -#### Source - -[`lib/signalwire/skills/builtin/spider.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/spider.rb) - -Line 14. - -*** - -### get\_hints - -#### Signature - -```ruby -def get_hints -``` - -#### Source - -[`lib/signalwire/skills/builtin/spider.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/spider.rb) - -Line 69. - -*** - -### get\_parameter\_schema - -#### Signature - -```ruby -def get_parameter_schema -``` - -#### Source - -[`lib/signalwire/skills/builtin/spider.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/spider.rb) - -Line 73. - -*** - -### instance\_key - -#### Signature - -```ruby -def instance_key -``` - -#### Source - -[`lib/signalwire/skills/builtin/spider.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/spider.rb) - -Line 42. - -*** - -### name - -#### Signature - -```ruby -def name -``` - -#### Source - -[`lib/signalwire/skills/builtin/spider.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/spider.rb) - -Line 13. - -*** - -### register\_tools - -#### Signature - -```ruby -def register_tools -``` - -#### Source - -[`lib/signalwire/skills/builtin/spider.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/spider.rb) - -Line 46. - -*** - -### setup - -#### Signature - -```ruby -def setup -``` - -#### Source - -[`lib/signalwire/skills/builtin/spider.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/spider.rb) - -Line 17. - -*** - -### supports\_multiple\_instances? - -#### Signature - -```ruby -def supports_multiple_instances? -``` - -#### Returns - -`Boolean` - -#### Source - -[`lib/signalwire/skills/builtin/spider.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/spider.rb) - -Line 15. - -## Source - -[`lib/signalwire/skills/builtin/spider.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/spider.rb) - -Line 12. diff --git a/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/swml-transfer-skill/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/swml-transfer-skill/index.mdx deleted file mode 100644 index 734ff9ba25..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/swml-transfer-skill/index.mdx +++ /dev/null @@ -1,180 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/skills/builtin/swml-transfer-skill" -title: "SwmlTransferSkill" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Skills::Builtin::SwmlTransferSkill" - parent: "SignalWire::Skills::Builtin" - module: "SignalWire.Skills.Builtin" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/swml_transfer.rb" - visibility: "public" ---- -# `SwmlTransferSkill` - -## Signature - -```ruby -class SwmlTransferSkill < SignalWire::Skills::SkillBase -``` - -## Inheritance - -**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/ruby/signal-wire/skills/skill-base) - -## Methods - -### description - -#### Signature - -```ruby -def description -``` - -#### Source - -[`lib/signalwire/skills/builtin/swml_transfer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/swml_transfer.rb) - -Line 12. - -*** - -### get\_hints - -#### Signature - -```ruby -def get_hints -``` - -#### Source - -[`lib/signalwire/skills/builtin/swml_transfer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/swml_transfer.rb) - -Line 69. - -*** - -### get\_parameter\_schema - -#### Signature - -```ruby -def get_parameter_schema -``` - -#### Source - -[`lib/signalwire/skills/builtin/swml_transfer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/swml_transfer.rb) - -Line 102. - -*** - -### get\_prompt\_sections - -#### Signature - -```ruby -def get_prompt_sections -``` - -#### Source - -[`lib/signalwire/skills/builtin/swml_transfer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/swml_transfer.rb) - -Line 83. - -*** - -### instance\_key - -#### Signature - -```ruby -def instance_key -``` - -#### Source - -[`lib/signalwire/skills/builtin/swml_transfer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/swml_transfer.rb) - -Line 38. - -*** - -### name - -#### Signature - -```ruby -def name -``` - -#### Source - -[`lib/signalwire/skills/builtin/swml_transfer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/swml_transfer.rb) - -Line 11. - -*** - -### register\_tools - -#### Signature - -```ruby -def register_tools -``` - -#### Source - -[`lib/signalwire/skills/builtin/swml_transfer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/swml_transfer.rb) - -Line 40. - -*** - -### setup - -#### Signature - -```ruby -def setup -``` - -#### Source - -[`lib/signalwire/skills/builtin/swml_transfer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/swml_transfer.rb) - -Line 15. - -*** - -### supports\_multiple\_instances? - -#### Signature - -```ruby -def supports_multiple_instances? -``` - -#### Returns - -`Boolean` - -#### Source - -[`lib/signalwire/skills/builtin/swml_transfer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/swml_transfer.rb) - -Line 13. - -## Source - -[`lib/signalwire/skills/builtin/swml_transfer.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/swml_transfer.rb) - -Line 10. diff --git a/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/weather-api-skill/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/weather-api-skill/index.mdx deleted file mode 100644 index 5a9cc44d2d..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/weather-api-skill/index.mdx +++ /dev/null @@ -1,112 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/skills/builtin/weather-api-skill" -title: "WeatherApiSkill" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Skills::Builtin::WeatherApiSkill" - parent: "SignalWire::Skills::Builtin" - module: "SignalWire.Skills.Builtin" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/weather_api.rb" - visibility: "public" ---- -# `WeatherApiSkill` - -## Signature - -```ruby -class WeatherApiSkill < SignalWire::Skills::SkillBase -``` - -## Inheritance - -**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/ruby/signal-wire/skills/skill-base) - -## Methods - -### description - -#### Signature - -```ruby -def description -``` - -#### Source - -[`lib/signalwire/skills/builtin/weather_api.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/weather_api.rb) - -Line 12. - -*** - -### get\_parameter\_schema - -#### Signature - -```ruby -def get_parameter_schema -``` - -#### Source - -[`lib/signalwire/skills/builtin/weather_api.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/weather_api.rb) - -Line 78. - -*** - -### name - -#### Signature - -```ruby -def name -``` - -#### Source - -[`lib/signalwire/skills/builtin/weather_api.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/weather_api.rb) - -Line 11. - -*** - -### register\_tools - -#### Signature - -```ruby -def register_tools -``` - -#### Source - -[`lib/signalwire/skills/builtin/weather_api.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/weather_api.rb) - -Line 22. - -*** - -### setup - -#### Signature - -```ruby -def setup -``` - -#### Source - -[`lib/signalwire/skills/builtin/weather_api.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/weather_api.rb) - -Line 14. - -## Source - -[`lib/signalwire/skills/builtin/weather_api.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/weather_api.rb) - -Line 10. diff --git a/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/web-search-skill/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/web-search-skill/index.mdx deleted file mode 100644 index 30c62e7dad..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/web-search-skill/index.mdx +++ /dev/null @@ -1,196 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/skills/builtin/web-search-skill" -title: "WebSearchSkill" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Skills::Builtin::WebSearchSkill" - parent: "SignalWire::Skills::Builtin" - module: "SignalWire.Skills.Builtin" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/web_search.rb" - visibility: "public" ---- -# `WebSearchSkill` - -## Signature - -```ruby -class WebSearchSkill < SignalWire::Skills::SkillBase -``` - -## Inheritance - -**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/ruby/signal-wire/skills/skill-base) - -## Methods - -### description - -#### Signature - -```ruby -def description -``` - -#### Source - -[`lib/signalwire/skills/builtin/web_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/web_search.rb) - -Line 15. - -*** - -### get\_global\_data - -#### Signature - -```ruby -def get_global_data -``` - -#### Source - -[`lib/signalwire/skills/builtin/web_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/web_search.rb) - -Line 77. - -*** - -### get\_parameter\_schema - -#### Signature - -```ruby -def get_parameter_schema -``` - -#### Source - -[`lib/signalwire/skills/builtin/web_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/web_search.rb) - -Line 96. - -*** - -### get\_prompt\_sections - -#### Signature - -```ruby -def get_prompt_sections -``` - -#### Source - -[`lib/signalwire/skills/builtin/web_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/web_search.rb) - -Line 81. - -*** - -### instance\_key - -#### Signature - -```ruby -def instance_key -``` - -#### Source - -[`lib/signalwire/skills/builtin/web_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/web_search.rb) - -Line 62. - -*** - -### name - -#### Signature - -```ruby -def name -``` - -#### Source - -[`lib/signalwire/skills/builtin/web_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/web_search.rb) - -Line 14. - -*** - -### register\_tools - -#### Signature - -```ruby -def register_tools -``` - -#### Source - -[`lib/signalwire/skills/builtin/web_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/web_search.rb) - -Line 64. - -*** - -### setup - -#### Signature - -```ruby -def setup -``` - -#### Source - -[`lib/signalwire/skills/builtin/web_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/web_search.rb) - -Line 19. - -*** - -### supports\_multiple\_instances? - -#### Signature - -```ruby -def supports_multiple_instances? -``` - -#### Returns - -`Boolean` - -#### Source - -[`lib/signalwire/skills/builtin/web_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/web_search.rb) - -Line 17. - -*** - -### version - -#### Signature - -```ruby -def version -``` - -#### Source - -[`lib/signalwire/skills/builtin/web_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/web_search.rb) - -Line 16. - -## Source - -[`lib/signalwire/skills/builtin/web_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/web_search.rb) - -Line 13. diff --git a/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/wikipedia-search-skill/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/wikipedia-search-skill/index.mdx deleted file mode 100644 index 55e56d44c8..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/skills/builtin/wikipedia-search-skill/index.mdx +++ /dev/null @@ -1,156 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/skills/builtin/wikipedia-search-skill" -title: "WikipediaSearchSkill" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Skills::Builtin::WikipediaSearchSkill" - parent: "SignalWire::Skills::Builtin" - module: "SignalWire.Skills.Builtin" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/wikipedia_search.rb" - visibility: "public" ---- -# `WikipediaSearchSkill` - -## Signature - -```ruby -class WikipediaSearchSkill < SignalWire::Skills::SkillBase -``` - -## Inheritance - -**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/ruby/signal-wire/skills/skill-base) - -## Methods - -### description - -#### Signature - -```ruby -def description -``` - -#### Source - -[`lib/signalwire/skills/builtin/wikipedia_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/wikipedia_search.rb) - -Line 15. - -*** - -### get\_parameter\_schema - -#### Signature - -```ruby -def get_parameter_schema -``` - -#### Source - -[`lib/signalwire/skills/builtin/wikipedia_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/wikipedia_search.rb) - -Line 51. - -*** - -### get\_prompt\_sections - -#### Signature - -```ruby -def get_prompt_sections -``` - -#### Source - -[`lib/signalwire/skills/builtin/wikipedia_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/wikipedia_search.rb) - -Line 37. - -*** - -### name - -#### Signature - -```ruby -def name -``` - -#### Source - -[`lib/signalwire/skills/builtin/wikipedia_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/wikipedia_search.rb) - -Line 14. - -*** - -### register\_tools - -#### Signature - -```ruby -def register_tools -``` - -#### Source - -[`lib/signalwire/skills/builtin/wikipedia_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/wikipedia_search.rb) - -Line 24. - -*** - -### search\_wiki - -Python parity: `WikipediaSearchSkill.search_wiki(query)` — the -extracted helper that performs the two-step Wikipedia API lookup -(search, then per-title extract) and returns the formatted article -text (or the no-results message). Public so callers/tests can invoke -the lookup directly, matching Python where the tool handler delegates -to this method. `@num_results`/`@no_results_msg` are populated by -\#setup; fall back to defaults if called before setup. - -#### Signature - -```ruby -def search_wiki(query) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/skills/builtin/wikipedia_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/wikipedia_search.rb) - -Line 65. - -*** - -### setup - -#### Signature - -```ruby -def setup -``` - -#### Source - -[`lib/signalwire/skills/builtin/wikipedia_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/wikipedia_search.rb) - -Line 17. - -## Source - -[`lib/signalwire/skills/builtin/wikipedia_search.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/builtin/wikipedia_search.rb) - -Line 13. diff --git a/fern/products/sdk-reference/ruby/signal-wire/skills/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/skills/index.mdx deleted file mode 100644 index c141109ae6..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/skills/index.mdx +++ /dev/null @@ -1,54 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/skills" -title: "Skills" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "module" - language: "ruby" - qualified_name: "SignalWire::Skills" - parent: "SignalWire" - module: "SignalWire" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb" - visibility: "public" ---- -# `Skills` - -## Signature - -```ruby -module Skills -``` - -## Classes - - - - Base class for all skills. Subclasses override the metadata methods and +register\_tools+ to supply tool hashes. - - - - Thread-safe lifecycle manager for loaded skill instances. - - - - Global registry mapping skill names to factory lambdas. - - - -## Modules - - - - - - Named constants for the skills that ship built in with this gem. - - - -## Source - -[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) - -Line 12. diff --git a/fern/products/sdk-reference/ruby/signal-wire/skills/skill-base/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/skills/skill-base/index.mdx deleted file mode 100644 index 91377f5ad8..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/skills/skill-base/index.mdx +++ /dev/null @@ -1,548 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/skills/skill-base" -title: "SkillBase" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Skills::SkillBase" - parent: "SignalWire::Skills" - module: "SignalWire.Skills" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb" - visibility: "public" ---- -# `SkillBase` - -Base class for all skills. Subclasses override the metadata methods -and +register\_tools+ to supply tool hashes. - -## Signature - -```ruby -class SkillBase < Object -``` - -## Inheritance - -**Extends:** `Object` - -## Methods - -### agent - -Python parity: - -- `params` — params hash passed at construction -- `agent` — owning AgentBase instance (or nil for standalone) -- `logger` — namespaced logger `signalwire.skills.` -- `swaig_fields` — extra SWAIG fields merged into tool defs; - pulled out of `params` if provided - -#### Signature - -```ruby -attr_reader agent -> Object -``` - -#### Source - -[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) - -Line 22. - -*** - -### cleanup - -Called when the skill is unloaded. - -#### Signature - -```ruby -def cleanup -``` - -#### Source - -[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) - -Line 72. - -*** - -### description - -#### Signature - -```ruby -def description -``` - -#### Throws - -- `NotImplementedError` - -#### Source - -[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) - -Line 25. - -*** - -### get\_global\_data - -Global data to merge into the agent. - -#### Signature - -```ruby -def get_global_data -``` - -#### Source - -[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) - -Line 66. - -*** - -### get\_hints - -Speech recognition hints. - -#### Signature - -```ruby -def get_hints -``` - -#### Source - -[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) - -Line 63. - -*** - -### get\_param - -Helper to get a param with env-var fallback. - -#### Signature - -```ruby -def get_param(key, env_var: nil, default: nil) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) - -Line 153. - -*** - -### get\_parameter\_schema - -Parameter schema for GUI / validation. - -#### Signature - -```ruby -def get_parameter_schema -``` - -#### Source - -[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) - -Line 78. - -*** - -### get\_prompt\_sections - -Prompt sections to add to the agent. - -#### Signature - -```ruby -def get_prompt_sections -``` - -#### Source - -[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) - -Line 69. - -*** - -### get\_skill\_data - -Read this skill instance's namespaced data out of a raw\_data hash. - -Python parity: `SkillBase.get_skill_data(raw_data)` — reads -`raw_data["global_data"][namespace]` and returns it (or an -empty hash when absent). +raw\_data+ is the per-call data hash -SWAIG handlers receive; +global\_data+ is its agent-state bucket. -Tolerates symbol or string keys for `global_data`. - -#### Signature - -```ruby -def get_skill_data(raw_data) -``` - -#### Parameters - - - the raw\_data passed to a SWAIG handler. - - -#### Returns - -`Hash` — the namespaced skill state, or +\{\}+ if not present. - -#### Source - -[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) - -Line 90. - -*** - -### initialize - -Python parity: `SkillBase.__init__(self, agent, params=None)`. -First positional arg is the owning AgentBase (or nil for -standalone). The second is the params hash. We accept the legacy -1-arg form for backwards compatibility (`DateTimeSkill.new({...})`). - -#### Signature - -```ruby -def initialize(agent = nil, params = nil) -``` - -#### Parameters - - - - - -#### Returns - -`SkillBase` — a new instance of SkillBase - -#### Source - -[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) - -Line 38. - -*** - -### instance\_key - -Unique key for tracking this skill instance. - -#### Signature - -```ruby -def instance_key -``` - -#### Source - -[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) - -Line 75. - -*** - -### logger - -Python parity: - -- `params` — params hash passed at construction -- `agent` — owning AgentBase instance (or nil for standalone) -- `logger` — namespaced logger `signalwire.skills.` -- `swaig_fields` — extra SWAIG fields merged into tool defs; - pulled out of `params` if provided - -#### Signature - -```ruby -attr_reader logger -> Object -``` - -#### Source - -[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) - -Line 22. - -*** - -### name - -#### Signature - -```ruby -def name -``` - -#### Throws - -- `NotImplementedError` - -#### Source - -[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) - -Line 24. - -*** - -### params - -Python parity: - -- `params` — params hash passed at construction -- `agent` — owning AgentBase instance (or nil for standalone) -- `logger` — namespaced logger `signalwire.skills.` -- `swaig_fields` — extra SWAIG fields merged into tool defs; - pulled out of `params` if provided - -#### Signature - -```ruby -attr_reader params -> Object -``` - -#### Source - -[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) - -Line 22. - -*** - -### register\_tools - -Return an Array of tool definition hashes. Each hash should have: -:name, :description, :parameters, :handler (lambda/proc) - -#### Signature - -```ruby -def register_tools -``` - -#### Source - -[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) - -Line 60. - -*** - -### required\_env\_vars - -#### Signature - -```ruby -def required_env_vars -``` - -#### Source - -[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) - -Line 27. - -*** - -### setup - -Called once after construction. Return +true+ if the skill is ready. - -#### Signature - -```ruby -def setup -``` - -#### Source - -[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) - -Line 56. - -*** - -### supports\_multiple\_instances? - -#### Signature - -```ruby -def supports_multiple_instances? -``` - -#### Returns - -`Boolean` - -#### Source - -[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) - -Line 32. - -*** - -### swaig\_fields - -Python parity: - -- `params` — params hash passed at construction -- `agent` — owning AgentBase instance (or nil for standalone) -- `logger` — namespaced logger `signalwire.skills.` -- `swaig_fields` — extra SWAIG fields merged into tool defs; - pulled out of `params` if provided - -#### Signature - -```ruby -attr_reader swaig_fields -> Object -``` - -#### Source - -[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) - -Line 22. - -*** - -### update\_skill\_data - -Write this skill instance's namespaced data into a FunctionResult. - -Python parity: `SkillBase.update_skill_data(result, data)` — -wraps +data+ under the skill namespace and calls -`result.update_global_data`. Returns +result+ so callers can -chain (mirrors Python returning the result). - -#### Signature - -```ruby -def update_skill_data(result, data) -``` - -#### Parameters - - - - - the skill state to persist under the namespace. - - -#### Returns - -`SignalWire::Swaig::FunctionResult` — +result+, for chaining. - -#### Source - -[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) - -Line 106. - -*** - -### validate\_env\_vars - -Check that every required environment variable is set. - -Python parity: `SkillBase.validate_env_vars` — returns +false+ -(and logs the missing names) when any entry of \{#required\_env\_vars\} -is absent or empty in +ENV+, otherwise +true+. - -#### Signature - -```ruby -def validate_env_vars -``` - -#### Returns - -`Boolean` - -#### Source - -[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) - -Line 118. - -*** - -### validate\_packages - -Check that every required gem is loadable. - -Python parity: `SkillBase.validate_packages` (Python imports the -module; Ruby +require+s the gem). Returns +false+ (and logs the -missing names) when any entry of \{#required\_packages\} can't be -+require+d, otherwise +true+. A successful +require+ leaves the -gem loaded — matching Python's `importlib.import_module`. - -#### Signature - -```ruby -def validate_packages -``` - -#### Returns - -`Boolean` - -#### Source - -[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) - -Line 136. - -*** - -### version - -#### Signature - -```ruby -def version -``` - -#### Source - -[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) - -Line 26. - -## Source - -[`lib/signalwire/skills/skill_base.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_base.rb) - -Line 15. diff --git a/fern/products/sdk-reference/ruby/signal-wire/skills/skill-manager/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/skills/skill-manager/index.mdx deleted file mode 100644 index 371c92d97a..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/skills/skill-manager/index.mdx +++ /dev/null @@ -1,276 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/skills/skill-manager" -title: "SkillManager" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Skills::SkillManager" - parent: "SignalWire::Skills" - module: "SignalWire.Skills" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_manager.rb" - visibility: "public" ---- -# `SkillManager` - -Thread-safe lifecycle manager for loaded skill instances. - -manager = SkillManager.new -manager.load('datetime', DateTimeSkill.new) -manager.get('datetime') #=> <DateTimeSkill> -manager.unload('datetime') - -## Signature - -```ruby -class SkillManager < Object -``` - -## Inheritance - -**Extends:** `Object` - -## Methods - -### agent - -Python parity: - -- `agent` — owning AgentBase instance (or nil) -- `logger` — namespaced logger - -#### Signature - -```ruby -attr_reader agent -> Object -``` - -#### Source - -[`lib/signalwire/skills/skill_manager.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_manager.rb) - -Line 25. - -*** - -### clear - -Unload all skills. - -#### Signature - -```ruby -def clear -``` - -#### Source - -[`lib/signalwire/skills/skill_manager.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_manager.rb) - -Line 89. - -*** - -### get - -Retrieve a loaded skill. - -#### Signature - -```ruby -def get(key) -``` - -#### Parameters - - - -#### Returns - -`SkillBase | nil` - -#### Source - -[`lib/signalwire/skills/skill_manager.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_manager.rb) - -Line 69. - -*** - -### initialize - -Python parity: `SkillManager.__init__(self, agent)` — -SkillManager keeps a back-pointer to its agent so loaded -skills can attach prompt sections / SWAIG tools directly. -Ruby allows nil for standalone use (tests, registry tools). - -#### Signature - -```ruby -def initialize(agent = nil) -``` - -#### Parameters - - - -#### Returns - -`SkillManager` — a new instance of SkillManager - -#### Source - -[`lib/signalwire/skills/skill_manager.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_manager.rb) - -Line 31. - -*** - -### load - -Load a skill instance. Calls +setup+ on the skill; raises if it fails. - -#### Signature - -```ruby -def load(key, skill) -``` - -#### Parameters - - - the instance key - - - - the skill instance - - -#### Returns - -`SkillBase` — the loaded skill - -#### Source - -[`lib/signalwire/skills/skill_manager.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_manager.rb) - -Line 42. - -*** - -### loaded\_keys - -#### Signature - -```ruby -def loaded_keys -``` - -#### Returns - -`Array` - -#### Source - -[`lib/signalwire/skills/skill_manager.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_manager.rb) - -Line 79. - -*** - -### loaded? - -#### Signature - -```ruby -def loaded?(key) -``` - -#### Parameters - - - -#### Returns - -`Boolean` - -#### Source - -[`lib/signalwire/skills/skill_manager.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_manager.rb) - -Line 74. - -*** - -### logger - -Python parity: - -- `agent` — owning AgentBase instance (or nil) -- `logger` — namespaced logger - -#### Signature - -```ruby -attr_reader logger -> Object -``` - -#### Source - -[`lib/signalwire/skills/skill_manager.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_manager.rb) - -Line 25. - -*** - -### size - -#### Signature - -```ruby -def size -``` - -#### Returns - -`Integer` - -#### Source - -[`lib/signalwire/skills/skill_manager.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_manager.rb) - -Line 84. - -*** - -### unload - -Unload a skill by instance key. Calls +cleanup+ on it. - -#### Signature - -```ruby -def unload(key) -``` - -#### Parameters - - - -#### Returns - -`SkillBase | nil` — the removed skill, or nil - -#### Source - -[`lib/signalwire/skills/skill_manager.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_manager.rb) - -Line 58. - -## Source - -[`lib/signalwire/skills/skill_manager.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_manager.rb) - -Line 21. diff --git a/fern/products/sdk-reference/ruby/signal-wire/skills/skill-name/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/skills/skill-name/index.mdx deleted file mode 100644 index 876e1485d7..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/skills/skill-name/index.mdx +++ /dev/null @@ -1,130 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/skills/skill-name" -title: "SkillName" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "module" - language: "ruby" - qualified_name: "SignalWire::Skills::SkillName" - parent: "SignalWire::Skills" - module: "SignalWire.Skills" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_name.rb" - visibility: "public" ---- -# `SkillName` - -Named constants for the skills that ship built in with this gem. - -Skill names are an open _string_ set in the Python reference -(`add_skill` takes a bare +str+), which keeps parity and lets callers -load custom / third-party skills. \{SkillName\} gives the built-in -skills a named alternative so a typo — +add\_skill("datetiem")+ — has a -canonical constant to reach for instead, while the string path stays -available for parity and custom skills. - -Each constant's value IS the snake\_case wire name the -\{SkillRegistry\} is keyed by (the same string a skill reports from its -+#name+), so these are interchangeable: - -agent.add\_skill(SignalWire::Skills::SkillName::DATETIME) # named -agent.add\_skill("datetime") # string (parity) -agent.add\_skill("my\_custom\_skill") # open set: custom ok - -Single source of truth: \{ALL\} is exactly the set the registry -registers and that +AgentBase#add\_skill+ validates against -(+SkillRegistry.builtin\_skill\_names+ is derived from \{ALL\}). The -spec proves the two never drift. - -Idiom note: mirrors +SignalWire::Relay+'s constants module — flat -+NAME = 'value'+ string constants grouped into a frozen +ALL+ array. - -## Signature - -```ruby -module SkillName -``` - -## Constants - - - Every built-in skill name, sorted to match +SkillRegistry.builtin\_skill\_names+ (which sorts the +builtin/+ directory listing). This is the single source of truth for the built-in set. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -## Methods - -### builtin? - -#### Signature - -```ruby -def builtin?(name) -``` - -#### Parameters - - - a candidate skill name - - -#### Returns - -`Boolean` — true when +name+ is one of the built-in skills. Custom / third-party skill names return false (the set is open). - -#### Source - -[`lib/signalwire/skills/skill_name.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_name.rb) - -Line 82. - -## Source - -[`lib/signalwire/skills/skill_name.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_name.rb) - -Line 34. diff --git a/fern/products/sdk-reference/ruby/signal-wire/skills/skill-registry/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/skills/skill-registry/index.mdx deleted file mode 100644 index a10fe1df85..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/skills/skill-registry/index.mdx +++ /dev/null @@ -1,587 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/skills/skill-registry" -title: "SkillRegistry" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Skills::SkillRegistry" - parent: "SignalWire::Skills" - module: "SignalWire.Skills" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_registry.rb" - visibility: "public" ---- -# `SkillRegistry` - -Global registry mapping skill names to factory lambdas. - -SkillRegistry.register('datetime') \{ |params| DateTimeSkill.new(params) \} -factory = SkillRegistry.get\_factory('datetime') -skill = factory.call(\{ 'timezone' => 'UTC' \}) - -## Signature - -```ruby -class SkillRegistry < Object -``` - -## Inheritance - -**Extends:** `Object` - -## Methods - -### add\_skill\_directory - -Add a directory to search for skills. - -Mirrors Python's `SkillRegistry.add_skill_directory`: validate -that the path exists and is a directory, then append it -(de-duplicated) to `@external_paths`. Raises `ArgumentError` -(the Ruby analog of Python's `ValueError`) for invalid input. - -#### Signature - -```ruby -def add_skill_directory(path) -``` - -#### Parameters - - - absolute or relative path to a directory - - -#### Returns - -`void` - -#### Throws - -- `ArgumentError` — when the path doesn't exist or isn't a directory. - -#### Source - -[`lib/signalwire/skills/skill_registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_registry.rb) - -Line 53. - -*** - -### builtin\_skill\_names - -Skill names this gem ships as built-ins. - -Single source of truth: this returns \{SkillName::ALL\}, the named -constant set. The +builtin/+ directory is the runtime origin of -the actual factories (one file per skill, each calling -+SkillRegistry.register+ on require); the spec asserts the -directory listing and \{SkillName::ALL\} stay identical so the -named set can never silently drift from what gets registered. - -#### Signature - -```ruby -def builtin_skill_names -``` - -#### Returns - -`Array` - -#### Source - -[`lib/signalwire/skills/skill_registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_registry.rb) - -Line 253. - -*** - -### discover\_skills - -Ensure built-in skills are discovered/registered (instance form). - -Python parity: `SkillRegistry.discover_skills` is a deprecated -no-op there because skills load on-demand. Ruby ships its -built-ins explicitly, so the faithful equivalent is to make sure -they're registered — idempotent, since \{register\_builtins!\} just -re-requires the (already loaded) built-in files. Returns the -registered skill names so callers can confirm discovery ran. - -#### Signature - -```ruby -def discover_skills -``` - -#### Returns - -`Array` — currently registered skill names. - -#### Source - -[`lib/signalwire/skills/skill_registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_registry.rb) - -Line 102. - -*** - -### discover\_skills - -Ensure built-in skills are registered and return their names. - -Python parity: `SkillRegistry.discover_skills` (a no-op there -since skills load on-demand). Ruby ships built-ins explicitly, -so this guarantees they're registered via \{register\_builtins!\} -(idempotent) and returns the registered skill names. - -#### Signature - -```ruby -def discover_skills -``` - -#### Returns - -`Array` — currently registered skill names. - -#### Source - -[`lib/signalwire/skills/skill_registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_registry.rb) - -Line 268. - -*** - -### external\_paths - -External skill directories registered via #add\_skill\_directory. -Mirrors Python's `_external_paths` accessor surface. - -#### Signature - -```ruby -attr_reader external_paths -> Object -``` - -#### Source - -[`lib/signalwire/skills/skill_registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_registry.rb) - -Line 40. - -*** - -### get\_all\_skills\_schema - -Get complete schema for all registered skills (instance form). - -Mirrors Python's instance-method -`SkillRegistry.get_all_skills_schema()` — returns a hash keyed -by skill name, each value containing parameter metadata. Ruby -skills don't carry rich Python-style parameter introspection in -v1, so the value defaults to a minimal shape with the skill -name; built-ins that expose `parameter_schema` get richer -detail. - -#### Signature - -```ruby -def get_all_skills_schema -``` - -#### Returns - -`Hash{String => Hash}` - -#### Source - -[`lib/signalwire/skills/skill_registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_registry.rb) - -Line 76. - -*** - -### get\_all\_skills\_schema - -Get complete schema for all registered skills. - -Mirrors Python's -`SkillRegistry.get_all_skills_schema()` — returns a hash -keyed by skill name, with each value containing parameter -metadata. Ruby skills don't carry rich Python-style parameter -introspection in v1, so the value defaults to a minimal shape -with the skill name; built-in skills that expose -`parameter_schema` get richer detail. - -#### Signature - -```ruby -def get_all_skills_schema -``` - -#### Returns - -`Hash{String => Hash}` - -#### Source - -[`lib/signalwire/skills/skill_registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_registry.rb) - -Line 323. - -*** - -### get\_factory - -Get the factory for a skill. - -#### Signature - -```ruby -def get_factory(skill_name) -``` - -#### Parameters - - - -#### Returns - -`Proc | nil` - -#### Source - -[`lib/signalwire/skills/skill_registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_registry.rb) - -Line 191. - -*** - -### initialize - -Per-instance state for the skill-directory parity surface; the -class-method API above is preserved for backwards compatibility, -but `add_skill_directory` mirrors Python's instance-method shape -exactly (Python's `signalwire.skills.registry.SkillRegistry`). - -#### Signature - -```ruby -def initialize -``` - -#### Returns - -`SkillRegistry` — a new instance of SkillRegistry - -#### Source - -[`lib/signalwire/skills/skill_registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_registry.rb) - -Line 28. - -*** - -### last\_registered - -The most recently registered skill name (instance form). - -#### Signature - -```ruby -attr_reader last_registered -> Object -``` - -#### Source - -[`lib/signalwire/skills/skill_registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_registry.rb) - -Line 167. - -*** - -### list\_all\_skill\_sources - -List skill sources and the skills available from each (instance form). - -Python parity: `SkillRegistry.list_all_skill_sources` returns a -hash mapping source type to skill names. This instance form folds -in any directories registered via \{#add\_skill\_directory\}. - -#### Signature - -```ruby -def list_all_skill_sources -``` - -#### Returns - -`Hash{String => Array}` - -#### Source - -[`lib/signalwire/skills/skill_registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_registry.rb) - -Line 113. - -*** - -### list\_all\_skill\_sources - -List all skill sources and the skills available from each. - -Python parity: `SkillRegistry.list_all_skill_sources` returns -a hash keyed by source type. Ruby has no Python-style entry -points, so that bucket is always empty; +registered+ holds any -skill that isn't a shipped built-in (e.g. registered via -\{register\_skill\}). +external\_paths+ folds in skill subdirectory -names found under any directories passed in. - -#### Signature - -```ruby -def list_all_skill_sources(external_paths: []) -``` - -#### Parameters - - - -#### Returns - -`Hash{String => Array}` - -#### Source - -[`lib/signalwire/skills/skill_registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_registry.rb) - -Line 285. - -*** - -### list\_skills - -List all registered skill names (instance form). - -Python parity: `SkillRegistry.list_skills(self)` returns a list of -dictionaries describing each skill. Ruby v1 returns the -registered names plus available metadata (description / version) -when the factory can be instantiated without arguments. - -#### Signature - -```ruby -def list_skills -``` - -#### Returns - -`Array` - -#### Source - -[`lib/signalwire/skills/skill_registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_registry.rb) - -Line 88. - -*** - -### list\_skills - -List all registered skill names. - -#### Signature - -```ruby -def list_skills -``` - -#### Returns - -`Array` - -#### Source - -[`lib/signalwire/skills/skill_registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_registry.rb) - -Line 197. - -*** - -### logger - -Python parity: `self.logger = get_logger("skill_registry")`. -Per-instance logger; the class-level API uses the same name. - -#### Signature - -```ruby -attr_reader logger -> Object -``` - -#### Source - -[`lib/signalwire/skills/skill_registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_registry.rb) - -Line 36. - -*** - -### register - -Register a skill factory. - -#### Signature - -```ruby -def register(skill_name, &block) -``` - -#### Parameters - - - - - -#### Yields - -- `params` — block that receives params hash and returns a SkillBase - -#### Source - -[`lib/signalwire/skills/skill_registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_registry.rb) - -Line 173. - -*** - -### register\_builtins! - -Register all built-in skills. Called at load time. - -#### Signature - -```ruby -def register_builtins! -``` - -#### Source - -[`lib/signalwire/skills/skill_registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_registry.rb) - -Line 237. - -*** - -### register\_skill - -Register a skill class or factory (instance form). - -Python parity: `SkillRegistry.register_skill(self, skill_class)` -accepts a SkillBase subclass and stores its factory. Ruby -accepts either a class with a `new(params)` constructor, a -`Proc` /`Lambda`, or a 2-arg `(name, factory)` form for -explicit naming. Returns `self` for chaining. - -#### Signature - -```ruby -def register_skill(skill_class_or_name, factory = nil) -``` - -#### Parameters - - - either a SkillBase subclass (Python style) or a string skill name (legacy 2-arg form). - - - - explicit factory when first arg is a string (legacy form). - - -#### Throws - -- `ArgumentError` - -#### Source - -[`lib/signalwire/skills/skill_registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_registry.rb) - -Line 130. - -*** - -### register\_skill - -Register with an explicit lambda / proc instead of a block. - -#### Signature - -```ruby -def register_skill(skill_name, factory) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/skills/skill_registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_registry.rb) - -Line 182. - -*** - -### registered? - -Check if a skill is registered. - -#### Signature - -```ruby -def registered?(skill_name) -``` - -#### Parameters - - - -#### Returns - -`Boolean` - -#### Source - -[`lib/signalwire/skills/skill_registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_registry.rb) - -Line 227. - -*** - -### reset! - -Clear all registrations (primarily for testing). - -#### Signature - -```ruby -def reset! -``` - -#### Source - -[`lib/signalwire/skills/skill_registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_registry.rb) - -Line 232. - -## Source - -[`lib/signalwire/skills/skill_registry.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/skills/skill_registry.rb) - -Line 20. diff --git a/fern/products/sdk-reference/ruby/signal-wire/swaig/codec/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/swaig/codec/index.mdx deleted file mode 100644 index cb1de3e12b..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/swaig/codec/index.mdx +++ /dev/null @@ -1,44 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/swaig/codec" -title: "Codec" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "module" - language: "ruby" - qualified_name: "SignalWire::Swaig::Codec" - parent: "SignalWire::Swaig" - module: "SignalWire.Swaig" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb" - visibility: "public" ---- -# `Codec` - -RTP payload codec for the +tap+ verb. - -This is the 2-value SWAIG tap codec only. It is DELIBERATELY NOT the -broader RELAY +stream+/+connect+ device-codec superset (which adds -OPUS/G729/G722/VP8/H264). Never reuse this constant there. - -## Signature - -```ruby -module Codec -``` - -## Constants - - - Every valid +tap+ codec, in wire order. - - - - - - -## Source - -[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) - -Line 72. diff --git a/fern/products/sdk-reference/ruby/signal-wire/swaig/function-result/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/swaig/function-result/index.mdx deleted file mode 100644 index 49e5cc3fb5..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/swaig/function-result/index.mdx +++ /dev/null @@ -1,1760 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/swaig/function-result" -title: "FunctionResult" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Swaig::FunctionResult" - parent: "SignalWire::Swaig" - module: "SignalWire.Swaig" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb" - visibility: "public" ---- -# `FunctionResult` - -Response builder that tool handlers return. -All mutating methods return +self+ for fluent chaining. - -result = FunctionResult.new("Found your order") -.update\_global\_data("order\_id" => "12345") -.say("Let me look that up") - -The result object has three main components: - -1. response - Text the AI should say back to the user -2. action - List of structured actions to execute -3. post\_process - Whether to let AI take another turn before executing actions - -## Signature - -```ruby -class FunctionResult < Object -``` - -## Inheritance - -**Extends:** `Object` - -## Methods - -### action - -Returns the value of attribute action. - -#### Signature - -```ruby -attr_accessor action <-> Object -``` - -#### Source - -[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) - -Line 93. - -*** - -### action= - -Sets the attribute action - -#### Signature - -```ruby -attr_accessor action= <-> Object -``` - -#### Parameters - - - the value to set the attribute action to. - - -#### Source - -[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) - -Line 93. - -*** - -### add\_action - -Add a single structured action. - -#### Signature - -```ruby -def add_action(name, data) -``` - -#### Parameters - - - action key - - - - action value - - -#### Returns - -`self` - -#### Source - -[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) - -Line 125. - -*** - -### add\_actions - -Add multiple structured actions at once. - -#### Signature - -```ruby -def add_actions(actions) -``` - -#### Parameters - - - -#### Returns - -`self` - -#### Source - -[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) - -Line 133. - -*** - -### add\_dynamic\_hints - -Add dynamic speech recognition hints. - -#### Signature - -```ruby -def add_dynamic_hints(hints) -``` - -#### Parameters - - - -#### Returns - -`self` - -#### Source - -[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) - -Line 410. - -*** - -### clear\_dynamic\_hints - -Clear all dynamic speech recognition hints. - -#### Signature - -```ruby -def clear_dynamic_hints -``` - -#### Returns - -`self` - -#### Source - -[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) - -Line 416. - -*** - -### connect - -Connect / transfer the call to another destination. - -#### Signature - -```ruby -def connect(destination, final: true, from_addr: nil) -``` - -#### Parameters - - - phone number, SIP address, etc. - - - - - - -#### Returns - -`self` - -#### Source - -[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) - -Line 148. - -*** - -### create\_payment\_action - -Create a payment action for use inside payment prompts. - -#### Signature - -```ruby -def create_payment_action(action_type, phrase) -``` - -#### Parameters - - - "Say" or "Play" - - - - -#### Returns - -`Hash` - -#### Source - -[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) - -Line 819. - -*** - -### create\_payment\_parameter - -Create a payment parameter for use with +pay+. - -#### Signature - -```ruby -def create_payment_parameter(name, value) -``` - -#### Parameters - - - - - -#### Returns - -`Hash` - -#### Source - -[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) - -Line 828. - -*** - -### create\_payment\_prompt - -Create a payment prompt structure for use with +pay+. - -#### Signature - -```ruby -def create_payment_prompt(for_situation, actions, card_type: nil, error_type: nil) -``` - -#### Parameters - - - e.g. "payment-card-number" - - - - actions with "type" and "phrase" keys - - - - - - -#### Returns - -`Hash` - -#### Source - -[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) - -Line 804. - -*** - -### enable\_extensive\_data - -Send full data to LLM for this turn only. - -#### Signature - -```ruby -def enable_extensive_data(enabled = true) -``` - -#### Parameters - - - -#### Returns - -`self` - -#### Source - -[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) - -Line 452. - -*** - -### enable\_functions\_on\_timeout - -Enable function calls on speaker timeout. - -#### Signature - -```ruby -def enable_functions_on_timeout(enabled = true) -``` - -#### Parameters - - - -#### Returns - -`self` - -#### Source - -[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) - -Line 445. - -*** - -### end\_of\_speech\_timeout= - -\--- Idiomatic Ruby accessors (additive aliases over set\_\* originals) --- - -#### Signature - -```ruby -def end_of_speech_timeout=(v) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) - -Line 863. - -*** - -### execute\_rpc - -Execute a generic RPC method via SWML. - -#### Signature - -```ruby -def execute_rpc(method, params: nil, call_id: nil, node_id: nil) -``` - -#### Parameters - - - RPC method name - - - - - - - - -#### Returns - -`self` - -#### Source - -[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) - -Line 726. - -*** - -### execute\_swml - -Execute SWML content with optional transfer. - -#### Signature - -```ruby -def execute_swml(swml_content, transfer: false) -``` - -#### Parameters - - - SWML data structure or JSON string - - - - -#### Returns - -`self` - -#### Source - -[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) - -Line 472. - -*** - -### hangup - -Terminate the call. - -#### Signature - -```ruby -def hangup -``` - -#### Returns - -`self` - -#### Source - -[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) - -Line 192. - -*** - -### hold - -Put the call on hold. - -#### Signature - -```ruby -def hold(timeout = 300) -``` - -#### Parameters - - - seconds, clamped to 0..900 - - -#### Returns - -`self` - -#### Source - -[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) - -Line 199. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(response = nil, post_process: false) -``` - -#### Parameters - - - text the AI speaks back to the user - - - - -#### Returns - -`FunctionResult` — a new instance of FunctionResult - -#### Source - -[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) - -Line 97. - -*** - -### join\_conference - -Join an ad-hoc audio conference via SWML. - -#### Signature - -```ruby -def join_conference(name, muted: false, beep: "true", start_on_enter: true, end_on_exit: false, wait_url: nil, max_participants: 250, record: "do-not-record", region: nil, trim: "trim-silence", coach: nil, status_callback_event: nil, status_callback: nil, status_callback_method: "POST", recording_status_callback: nil, recording_status_callback_method: "POST", recording_status_callback_event: "completed", result: nil) -``` - -#### Parameters - - - conference name (required) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -#### Returns - -`self` - -#### Throws - -- `ArgumentError` - -#### Source - -[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) - -Line 498. - -*** - -### join\_room - -Join a RELAY room via SWML. - -#### Signature - -```ruby -def join_room(name) -``` - -#### Parameters - - - -#### Returns - -`self` - -#### Source - -[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) - -Line 574. - -*** - -### metadata= - -#### Signature - -```ruby -def metadata=(v) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) - -Line 867. - -*** - -### pay - -Process payment using SWML pay action. - -#### Signature - -```ruby -def pay(payment_connector_url:, input_method: "dtmf", status_url: nil, payment_method: "credit-card", timeout: 5, max_attempts: 1, security_code: true, postal_code: true, min_postal_code_length: 0, token_type: "reusable", charge_amount: nil, currency: "usd", language: "en-US", voice: "woman", description: nil, valid_card_types: "visa mastercard amex", parameters: nil, prompts: nil, ai_response: 'The payment status is ${pay_result}, do not mention anything else about collecting payment if successful.') -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -#### Returns - -`self` - -#### Source - -[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) - -Line 672. - -*** - -### play\_background\_file - -Play audio/video file in the background. - -#### Signature - -```ruby -def play_background_file(filename, wait: false) -``` - -#### Parameters - - - audio/video filename or URL - - - - -#### Returns - -`self` - -#### Source - -[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) - -Line 340. - -*** - -### post\_process - -Returns the value of attribute post\_process. - -#### Signature - -```ruby -attr_accessor post_process <-> Object -``` - -#### Source - -[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) - -Line 93. - -*** - -### post\_process= - -Sets the attribute post\_process - -#### Signature - -```ruby -attr_accessor post_process= <-> Object -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) - -Line 93. - -*** - -### record\_call - -Start background call recording via SWML. - -#### Signature - -```ruby -def record_call(control_id: nil, stereo: false, format: RecordFormat::WAV, direction: RecordDirection::BOTH, terminators: nil, beep: false, input_sensitivity: 44.0, initial_timeout: nil, end_silence_timeout: nil, max_length: nil, status_url: nil) -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - -#### Returns - -`self` - -#### Throws - -- `ArgumentError` - -#### Source - -[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) - -Line 361. - -*** - -### remove\_global\_data - -Remove global agent data variables. - -#### Signature - -```ruby -def remove_global_data(keys) -``` - -#### Parameters - - - key(s) to remove - - -#### Returns - -`self` - -#### Source - -[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) - -Line 243. - -*** - -### remove\_metadata - -Remove metadata from current function's scope. - -#### Signature - -```ruby -def remove_metadata(keys) -``` - -#### Parameters - - - -#### Returns - -`self` - -#### Source - -[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) - -Line 257. - -*** - -### replace\_in\_history - -Replace the tool\_call + result pair in conversation history. - -#### Signature - -```ruby -def replace_in_history(text = true) -``` - -#### Parameters - - - replacement text, or +true+ to remove entirely - - -#### Returns - -`self` - -#### Source - -[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) - -Line 320. - -*** - -### response - -Returns the value of attribute response. - -#### Signature - -```ruby -attr_accessor response <-> Object -``` - -#### Source - -[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) - -Line 93. - -*** - -### response= - -Sets the attribute response - -#### Signature - -```ruby -attr_accessor response= <-> Object -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) - -Line 93. - -*** - -### rpc\_ai\_message - -Inject a message into an AI agent on another call. - -#### Signature - -```ruby -def rpc_ai_message(call_id, message_text, role: "system") -``` - -#### Parameters - - - - - - - -#### Returns - -`self` - -#### Source - -[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) - -Line 768. - -*** - -### rpc\_ai\_unhold - -Unhold another call via RPC. - -#### Signature - -```ruby -def rpc_ai_unhold(call_id) -``` - -#### Parameters - - - -#### Returns - -`self` - -#### Source - -[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) - -Line 782. - -*** - -### rpc\_dial - -Dial out to a number via RPC. - -#### Signature - -```ruby -def rpc_dial(to_number:, from_number:, dest_swml:, device_type: "phone") -``` - -#### Parameters - - - - - - - - - -#### Returns - -`self` - -#### Source - -[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) - -Line 746. - -*** - -### say - -Make the agent speak specific text. - -#### Signature - -```ruby -def say(text) -``` - -#### Parameters - - - -#### Returns - -`self` - -#### Source - -[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) - -Line 331. - -*** - -### send\_sms - -Send an SMS message via SWML. - -#### Signature - -```ruby -def send_sms(to_number:, from_number:, body: nil, media: nil, tags: nil, region: nil) -``` - -#### Parameters - - - - - - - - - - - - - -#### Returns - -`self` - -#### Throws - -- `ArgumentError` - -#### Source - -[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) - -Line 645. - -*** - -### set\_end\_of\_speech\_timeout - -Adjust end-of-speech timeout. - -#### Signature - -```ruby -def set_end_of_speech_timeout(milliseconds) -``` - -#### Parameters - - - -#### Returns - -`self` - -#### Source - -[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) - -Line 424. - -*** - -### set\_metadata - -Set metadata scoped to current function's meta\_data\_token. - -#### Signature - -```ruby -def set_metadata(data) -``` - -#### Parameters - - - -#### Returns - -`self` - -#### Source - -[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) - -Line 250. - -*** - -### set\_post\_process - -Enable / disable post-processing. - -#### Signature - -```ruby -def set_post_process(val) -``` - -#### Parameters - - - -#### Returns - -`self` - -#### Source - -[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) - -Line 116. - -*** - -### set\_response - -Set the natural-language response text. - -#### Signature - -```ruby -def set_response(text) -``` - -#### Parameters - - - -#### Returns - -`self` - -#### Source - -[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) - -Line 109. - -*** - -### set\_speech\_event\_timeout - -Adjust speech event timeout. - -#### Signature - -```ruby -def set_speech_event_timeout(milliseconds) -``` - -#### Parameters - - - -#### Returns - -`self` - -#### Source - -[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) - -Line 431. - -*** - -### simulate\_user\_input - -Queue simulated user input. - -#### Signature - -```ruby -def simulate_user_input(text) -``` - -#### Parameters - - - -#### Returns - -`self` - -#### Source - -[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) - -Line 789. - -*** - -### sip\_refer - -Send SIP REFER via SWML. - -#### Signature - -```ruby -def sip_refer(to_uri) -``` - -#### Parameters - - - -#### Returns - -`self` - -#### Source - -[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) - -Line 585. - -*** - -### speech\_event\_timeout= - -#### Signature - -```ruby -def speech_event_timeout=(v) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) - -Line 879. - -*** - -### stop - -Stop agent execution. - -#### Signature - -```ruby -def stop -``` - -#### Returns - -`self` - -#### Source - -[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) - -Line 225. - -*** - -### stop\_background\_file - -Stop currently playing background file. - -#### Signature - -```ruby -def stop_background_file -``` - -#### Returns - -`self` - -#### Source - -[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) - -Line 350. - -*** - -### stop\_record\_call - -Stop an active background call recording. - -#### Signature - -```ruby -def stop_record_call(control_id: nil) -``` - -#### Parameters - - - -#### Returns - -`self` - -#### Source - -[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) - -Line 392. - -*** - -### stop\_tap - -Stop an active tap stream via SWML. - -#### Signature - -```ruby -def stop_tap(control_id: nil) -``` - -#### Parameters - - - -#### Returns - -`self` - -#### Source - -[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) - -Line 625. - -*** - -### switch\_context - -Switch agent context/prompt during conversation. - -When only +system\_prompt+ is provided and all flags are false, emits -a simple string context switch. Otherwise emits the full object form. - -#### Signature - -```ruby -def switch_context(system_prompt: nil, user_prompt: nil, consolidate: false, full_reset: false, isolated: false) -``` - -#### Parameters - - - - - - - - - - - -#### Returns - -`self` - -#### Source - -[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) - -Line 301. - -*** - -### swml\_change\_context - -Change the conversation context. - -#### Signature - -```ruby -def swml_change_context(context_name) -``` - -#### Parameters - - - -#### Returns - -`self` - -#### Source - -[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) - -Line 286. - -*** - -### swml\_change\_step - -Change the conversation step. - -#### Signature - -```ruby -def swml_change_step(step_name) -``` - -#### Parameters - - - -#### Returns - -`self` - -#### Source - -[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) - -Line 279. - -*** - -### swml\_transfer - -Transfer via SWML with an AI response when transfer completes. - -#### Signature - -```ruby -def swml_transfer(dest, ai_response, final: true) -``` - -#### Parameters - - - destination URL for the transfer - - - - message AI says when transfer completes - - - - -#### Returns - -`self` - -#### Source - -[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) - -Line 172. - -*** - -### swml\_user\_event - -Send a user event through SWML. - -#### Signature - -```ruby -def swml_user_event(event_data) -``` - -#### Parameters - - - event payload - - -#### Returns - -`self` - -#### Source - -[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) - -Line 264. - -*** - -### tap - -Start a background call tap via SWML. - -#### Signature - -```ruby -def tap(uri, control_id: nil, direction: TapDirection::BOTH, codec: Codec::PCMU, rtp_ptime: 20, status_url: nil) -``` - -#### Parameters - - - destination URI (rtp://, ws://, wss://) - - - - - - - - - - - - -#### Returns - -`self` - -#### Throws - -- `ArgumentError` - -#### Source - -[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) - -Line 602. - -*** - -### to\_h - -Convert to the Hash structure expected by SWAIG. - -Rules: - -- +response+ always included (string) -- +action+ only included if at least one action exists -- +post\_process+ only included if +true+ and actions exist - -#### Signature - -```ruby -def to_h -``` - -#### Returns - -`Hash` - -#### Source - -[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) - -Line 844. - -*** - -### to\_json - -#### Signature - -```ruby -def to_json(*args) -``` - -#### Parameters - - - -#### Returns - -`String` — JSON representation - -#### Source - -[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) - -Line 858. - -*** - -### toggle\_functions - -Enable / disable specific SWAIG functions. - -#### Signature - -```ruby -def toggle_functions(toggles) -``` - -#### Parameters - - - each with "function" and "active" keys - - -#### Returns - -`self` - -#### Source - -[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) - -Line 438. - -*** - -### update\_global\_data - -Update global agent data variables. - -#### Signature - -```ruby -def update_global_data(data) -``` - -#### Parameters - - - key-value pairs to set/update - - -#### Returns - -`self` - -#### Source - -[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) - -Line 236. - -*** - -### update\_settings - -Update agent runtime settings (temperature, top\_p, etc.). - -#### Signature - -```ruby -def update_settings(settings) -``` - -#### Parameters - - - -#### Returns - -`self` - -#### Source - -[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) - -Line 459. - -*** - -### wait\_for\_user - -Control how the agent waits for user input. - -#### Signature - -```ruby -def wait_for_user(enabled: nil, timeout: nil, answer_first: false) -``` - -#### Parameters - - - - - - - -#### Returns - -`self` - -#### Source - -[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) - -Line 210. - -## Source - -[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) - -Line 92. diff --git a/fern/products/sdk-reference/ruby/signal-wire/swaig/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/swaig/index.mdx deleted file mode 100644 index cb882d2f2c..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/swaig/index.mdx +++ /dev/null @@ -1,60 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/swaig" -title: "Swaig" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "module" - language: "ruby" - qualified_name: "SignalWire::Swaig" - parent: "SignalWire" - module: "SignalWire" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb" - visibility: "public" ---- -# `Swaig` - -## Signature - -```ruby -module Swaig -``` - -## Classes - - - - Response builder that tool handlers return. All mutating methods return +self+ for fluent chaining. - - - - \------------------------------------------------------------------ ParameterSchema — a typed, block-DSL builder for SWAIG tool parameters (the Tier-2 idiom flagship for the Ruby port; see porting-sdk/IDIOM\_PASS\_JOURNAL.md §4). - - - -## Modules - - - - RTP payload codec for the +tap+ verb. - - - - Channel selection for the +record\_call+ verb. - - - - Audio container format for the +record\_call+ verb. - - - - Channel selection for the +tap+ verb. - - - -## Source - -[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) - -Line 11. diff --git a/fern/products/sdk-reference/ruby/signal-wire/swaig/parameter-schema/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/swaig/parameter-schema/index.mdx deleted file mode 100644 index cf165eebdb..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/swaig/parameter-schema/index.mdx +++ /dev/null @@ -1,614 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/swaig/parameter-schema" -title: "ParameterSchema" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Swaig::ParameterSchema" - parent: "SignalWire::Swaig" - module: "SignalWire.Swaig" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/parameter_schema.rb" - visibility: "public" ---- -# `ParameterSchema` - -*** - -ParameterSchema — a typed, block-DSL builder for SWAIG tool -parameters (the Tier-2 idiom flagship for the Ruby port; see -porting-sdk/IDIOM\_PASS\_JOURNAL.md §4). - -Defining a SWAIG tool's +parameters+ in the Python reference (and in -the existing Ruby path) means hand-writing a JSON-Schema blob as -nested Hashes: - -``` -define_tool(name: "lookup", description: "...", parameters: { - "service" => { "type" => "string", "description" => "The service" }, - "date" => { "type" => "string", "description" => "YYYY-MM-DD" } -}, required: %w[service date]) -``` - -+ParameterSchema+ is a _typed convenience over the SAME wire output_: -the Hash it produces is BYTE-IDENTICAL to the normalised hand-written -form (a +\{ 'type' => 'object', 'properties' => \{...\}, 'required' => -\[...] \}+ object — +required+ omitted when empty). It is NOT a new -format; the untyped Hash path stays fully supported. This is purely -additive (a PORT\_ADDITION). - -The idiom is a Ruby block DSL — the most natural way to render nested -structure readably: - -``` -params = SignalWire::Swaig::ParameterSchema.build do - string :service, 'The service to look up' - string :date, 'Appointment date, YYYY-MM-DD' - enum :fmt, RecordFormat::ALL, 'Audio container format' - integer :count, 'How many results', default: 10 - array :tags, 'Search tags', of: :string - object :filter, 'Structured filter' do - string :status, 'open|closed' - end - required :service, :date -end - -# params is the same Hash a hand-written schema would produce: -# { 'type' => 'object', 'properties' => { ... }, 'required' => [...] } -``` - -The +enum+ kind integrates the Tier-1 frozen closed-set constants -(\{RecordFormat\}, \{RecordDirection\}, \{TapDirection\}, \{Codec\}) — pass -any of their +ALL+ arrays (or any literal array) as the closed set and -it lands in the schema as +"enum" => \[...]+. - -Supported property kinds: +string+, +number+, +integer+, +boolean+, -+enum+ (closed set), +array+ (of a kind), +object+ (nested). Every -kind accepts +description+ plus optional +required:+ / +default:+ / -+enum:+ / +format:+. - -The result Hash is plain JSON-Schema — feed it straight to -+define\_tool(parameters:)+. Because the kind methods return +self+ a -fluent style works too: - -``` -ParameterSchema.new.string(:q, 'query').require(:q).to_h -``` - -*** - -## Signature - -```ruby -class ParameterSchema < Object -``` - -## Inheritance - -**Extends:** `Object` - -## Constants - - - - - - - - - - - - - JSON-Schema "type" keyword each builder method emits. - - -## Methods - -### array - -Add an +array+ property. The element kind is given by +of:+ (a JSON -type string like +'string'+ / +:integer+), producing an +items+ -subschema. When +of:+ names +object+ (or +:object+) a block may -define the element object's properties. - -array :tags, 'Search tags', of: :string -\#=> properties.tags == \{ 'type' => 'array', -\# 'description' => '...', 'items' => \{ 'type' => 'string' \} \} - -``` -array :people, 'Attendees', of: :object do - string :name, 'Full name' -end -``` - -#### Signature - -```ruby -def array(name, description = nil, of: nil, required: false, default: nil, enum: nil, &block) -``` - -#### Parameters - - - property name - - - - LLM-facing description - - - - - - - - - - - - -#### Returns - -`self` - -#### Yields - -- nested element-object property DSL (only when +of: :object+) - -#### Source - -[`lib/signalwire/swaig/parameter_schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/parameter_schema.rb) - -Line 173. - -*** - -### boolean - -Add a +boolean+ property. Same options as \{#string\}. - -#### Signature - -```ruby -def boolean(name, description = nil, required: false, default: nil) -``` - -#### Parameters - - - - - - - - - -#### Returns - -`self` - -#### Source - -[`lib/signalwire/swaig/parameter_schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/parameter_schema.rb) - -Line 125. - -*** - -### build - -Build a schema with the block DSL. The block runs in the builder's -instance context, so the bare +string :x, '...'+ verbs resolve to -this object's methods. - -schema = ParameterSchema.build do -string :name, 'Caller name' -required :name -end #=> Hash - -#### Signature - -```ruby -def build(&block) -``` - -#### Parameters - - - -#### Returns - -`Hash` — the JSON-Schema parameters object (byte-identical to the equivalent hand-written + normalised +parameters+ Hash) - -#### Yields - -- DSL body evaluated against a fresh \{ParameterSchema\} - -#### Source - -[`lib/signalwire/swaig/parameter_schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/parameter_schema.rb) - -Line 88. - -*** - -### enum - -Add a closed-set property (a +string+-typed schema carrying an -+enum+ list). Integrates the Tier-1 frozen vocabularies — pass -+RecordFormat::ALL+, +TapDirection::ALL+, +Codec::ALL+, etc. (or any -literal array) as the +values+ closed set. - -enum :fmt, RecordFormat::ALL, 'Audio container format' -\#=> properties.fmt == \{ 'type' => 'string', -\# 'description' => '...', 'enum' => \['wav','mp3','mp4'] \} - -#### Signature - -```ruby -def enum(name, values, description = nil, required: false, default: nil, type: STRING) -``` - -#### Parameters - - - property name - - - - the closed set (e.g. a constant module's +ALL+) - - - - LLM-facing description - - - - - - - - -#### Returns - -`self` - -#### Source - -[`lib/signalwire/swaig/parameter_schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/parameter_schema.rb) - -Line 146. - -*** - -### initialize - -#### Signature - -```ruby -def initialize -``` - -#### Returns - -`ParameterSchema` — a new instance of ParameterSchema - -#### Source - -[`lib/signalwire/swaig/parameter_schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/parameter_schema.rb) - -Line 94. - -*** - -### integer - -Add an +integer+ property. Same options as \{#string\}. - -#### Signature - -```ruby -def integer(name, description = nil, required: false, default: nil, enum: nil, format: nil) -``` - -#### Parameters - - - - - - - - - - - - - -#### Returns - -`self` - -#### Source - -[`lib/signalwire/swaig/parameter_schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/parameter_schema.rb) - -Line 119. - -*** - -### number - -Add a +number+ (floating-point) property. Same options as \{#string\}. - -#### Signature - -```ruby -def number(name, description = nil, required: false, default: nil, enum: nil, format: nil) -``` - -#### Parameters - - - - - - - - - - - - - -#### Returns - -`self` - -#### Source - -[`lib/signalwire/swaig/parameter_schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/parameter_schema.rb) - -Line 113. - -*** - -### object - -Add a nested +object+ property whose sub-properties are defined in -the block (a recursively-evaluated \{ParameterSchema\}). - -object :address, 'Mailing address' do -string :street, 'Street line' -string :zip, 'Postal code' -required :street -end - -The nested object's own +required+ list (from a nested +required+ -call) is carried inside the sub-schema, exactly as a hand-written -nested object would render. - -#### Signature - -```ruby -def object(name, description = nil, required: false, &block) -``` - -#### Parameters - - - property name - - - - LLM-facing description - - - - - - -#### Returns - -`self` - -#### Yields - -- nested property DSL - -#### Source - -[`lib/signalwire/swaig/parameter_schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/parameter_schema.rb) - -Line 210. - -*** - -### require - -Singular alias of \{#required\} for fluent single-property chains -(+.string(:q,'..').require(:q)+). Avoids reading as a plural when -only one name is passed. - -#### Signature - -```ruby -def require(*names) -``` - -#### Parameters - - - -#### Returns - -`self` - -#### Source - -[`lib/signalwire/swaig/parameter_schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/parameter_schema.rb) - -Line 244. - -*** - -### required - -Mark one or more already-declared (or to-be-declared) properties as -required. Names are de-duplicated, preserving first-seen order — the -same shape +define\_tool(required:)+ produces. - -required :service, :date - -#### Signature - -```ruby -def required(*names) -``` - -#### Parameters - - - -#### Returns - -`self` - -#### Source - -[`lib/signalwire/swaig/parameter_schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/parameter_schema.rb) - -Line 232. - -*** - -### string - -Add a +string+ property. - -#### Signature - -```ruby -def string(name, description = nil, required: false, default: nil, enum: nil, format: nil) -``` - -#### Parameters - - - property name (rendered as a String key) - - - - LLM-facing description - - - - - - - - - - -#### Returns - -`self` - -#### Source - -[`lib/signalwire/swaig/parameter_schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/parameter_schema.rb) - -Line 107. - -*** - -### to\_h - -Render the JSON-Schema parameters object. - -Shape (byte-identical to a hand-written + normalised schema): - -- always +'type' => 'object'+ -- +'properties' => \{...\}+ (insertion-ordered) -- +'required' => \[...]+ ONLY when at least one name is required - (omitted entirely otherwise — matching +define\_tool+, which only - writes +required+ when the supplied Array is non-empty) - -#### Signature - -```ruby -def to_h -``` - -#### Returns - -`Hash` - -#### Source - -[`lib/signalwire/swaig/parameter_schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/parameter_schema.rb) - -Line 258. - -*** - -### to\_hash - -Render the JSON-Schema parameters object. - -Shape (byte-identical to a hand-written + normalised schema): - -- always +'type' => 'object'+ -- +'properties' => \{...\}+ (insertion-ordered) -- +'required' => \[...]+ ONLY when at least one name is required - (omitted entirely otherwise — matching +define\_tool+, which only - writes +required+ when the supplied Array is non-empty) - -#### Signature - -```ruby -def to_h -``` - -#### Returns - -`Hash` - -#### Source - -[`lib/signalwire/swaig/parameter_schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/parameter_schema.rb) - -Line 266. - -*** - -### to\_json - -#### Signature - -```ruby -def to_json(*args) -``` - -#### Parameters - - - -#### Returns - -`String` — JSON serialization of \{#to\_h\} - -#### Source - -[`lib/signalwire/swaig/parameter_schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/parameter_schema.rb) - -Line 269. - -## Source - -[`lib/signalwire/swaig/parameter_schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/parameter_schema.rb) - -Line 67. diff --git a/fern/products/sdk-reference/ruby/signal-wire/swaig/record-direction/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/swaig/record-direction/index.mdx deleted file mode 100644 index accaa72c9a..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/swaig/record-direction/index.mdx +++ /dev/null @@ -1,46 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/swaig/record-direction" -title: "RecordDirection" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "module" - language: "ruby" - qualified_name: "SignalWire::Swaig::RecordDirection" - parent: "SignalWire::Swaig" - module: "SignalWire.Swaig" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb" - visibility: "public" ---- -# `RecordDirection` - -Channel selection for the +record\_call+ verb. - -DISTINCT from \{TapDirection\}: record uses +listen+, tap uses +hear+. -Never share a constant between the two — Python validates two -different lists, and conflating them is a known bug generator. - -## Signature - -```ruby -module RecordDirection -``` - -## Constants - - - Every valid +record\_call+ direction, in wire order. - - - - - - - - -## Source - -[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) - -Line 44. diff --git a/fern/products/sdk-reference/ruby/signal-wire/swaig/record-format/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/swaig/record-format/index.mdx deleted file mode 100644 index abae07c1e0..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/swaig/record-format/index.mdx +++ /dev/null @@ -1,42 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/swaig/record-format" -title: "RecordFormat" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "module" - language: "ruby" - qualified_name: "SignalWire::Swaig::RecordFormat" - parent: "SignalWire::Swaig" - module: "SignalWire.Swaig" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb" - visibility: "public" ---- -# `RecordFormat` - -Audio container format for the +record\_call+ verb. - -## Signature - -```ruby -module RecordFormat -``` - -## Constants - - - Every valid +record\_call+ format, in wire order. - - - - - - - - -## Source - -[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) - -Line 30. diff --git a/fern/products/sdk-reference/ruby/signal-wire/swaig/tap-direction/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/swaig/tap-direction/index.mdx deleted file mode 100644 index f932500516..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/swaig/tap-direction/index.mdx +++ /dev/null @@ -1,46 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/swaig/tap-direction" -title: "TapDirection" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "module" - language: "ruby" - qualified_name: "SignalWire::Swaig::TapDirection" - parent: "SignalWire::Swaig" - module: "SignalWire.Swaig" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb" - visibility: "public" ---- -# `TapDirection` - -Channel selection for the +tap+ verb. - -DISTINCT from \{RecordDirection\}: tap uses +hear+, record uses -+listen+. Also distinct from the RELAY play/record/tap direction -vocabulary. Never unify. - -## Signature - -```ruby -module TapDirection -``` - -## Constants - - - Every valid +tap+ direction, in wire order. - - - - - - - - -## Source - -[`lib/signalwire/swaig/function_result.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swaig/function_result.rb) - -Line 58. diff --git a/fern/products/sdk-reference/ruby/signal-wire/swml/document/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/swml/document/index.mdx deleted file mode 100644 index 53e8b0bc64..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/swml/document/index.mdx +++ /dev/null @@ -1,283 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/swml/document" -title: "Document" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::SWML::Document" - parent: "SignalWire::SWML" - module: "SignalWire.SWML" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/document.rb" - visibility: "public" ---- -# `Document` - -## Signature - -```ruby -class Document < Object -``` - -## Inheritance - -**Extends:** `Object` - -## Methods - -### add\_section - -Add a new named section. Returns true if created, false if it already exists. - -#### Signature - -```ruby -def add_section(name) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/swml/document.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/document.rb) - -Line 24. - -*** - -### add\_verb - -Append a verb to the _main_ section. - -add\_verb('answer', \{\}) -add\_verb('sleep', 2000) - -#### Signature - -```ruby -def add_verb(verb_name, config) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/swml/document.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/document.rb) - -Line 43. - -*** - -### add\_verb\_to\_section - -Append a verb to an arbitrary section. - -#### Signature - -```ruby -def add_verb_to_section(section, verb_name, config) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/signalwire/swml/document.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/document.rb) - -Line 48. - -*** - -### get\_verbs - -Return the list of verb hashes for a section. - -#### Signature - -```ruby -def get_verbs(section = 'main') -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/swml/document.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/document.rb) - -Line 61. - -*** - -### has\_section? - -Check whether a section exists. - -#### Signature - -```ruby -def has_section?(name) -``` - -#### Parameters - - - -#### Returns - -`Boolean` - -#### Source - -[`lib/signalwire/swml/document.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/document.rb) - -Line 35. - -*** - -### initialize - -#### Signature - -```ruby -def initialize -``` - -#### Returns - -`Document` — a new instance of Document - -#### Source - -[`lib/signalwire/swml/document.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/document.rb) - -Line 10. - -*** - -### render - -Compact JSON string. - -#### Signature - -```ruby -def render -``` - -#### Source - -[`lib/signalwire/swml/document.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/document.rb) - -Line 74. - -*** - -### render\_pretty - -Pretty-printed JSON string. - -#### Signature - -```ruby -def render_pretty -``` - -#### Source - -[`lib/signalwire/swml/document.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/document.rb) - -Line 79. - -*** - -### reset - -Reset the document to its initial empty state. - -#### Signature - -```ruby -def reset -``` - -#### Source - -[`lib/signalwire/swml/document.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/document.rb) - -Line 17. - -*** - -### sections - -Returns the value of attribute sections. - -#### Signature - -```ruby -attr_reader sections -> Object -``` - -#### Source - -[`lib/signalwire/swml/document.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/document.rb) - -Line 8. - -*** - -### to\_h - -Produce a plain Ruby hash suitable for JSON serialization. - -#### Signature - -```ruby -def to_h -``` - -#### Source - -[`lib/signalwire/swml/document.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/document.rb) - -Line 66. - -*** - -### version - -Returns the value of attribute version. - -#### Signature - -```ruby -attr_reader version -> Object -``` - -#### Source - -[`lib/signalwire/swml/document.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/document.rb) - -Line 8. - -## Source - -[`lib/signalwire/swml/document.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/document.rb) - -Line 7. diff --git a/fern/products/sdk-reference/ruby/signal-wire/swml/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/swml/index.mdx deleted file mode 100644 index 7fed482f30..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/swml/index.mdx +++ /dev/null @@ -1,74 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/swml" -title: "SWML" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "module" - language: "ruby" - qualified_name: "SignalWire::SWML" - parent: "SignalWire" - module: "SignalWire" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/schema.rb" - visibility: "public" ---- -# `SWML` - -## Signature - -```ruby -module SWML -``` - -## Classes - - - - - - - - - -## Methods - -### reset\_schema! - -Allow resetting for tests - -#### Signature - -```ruby -def reset_schema! -``` - -#### Source - -[`lib/signalwire/swml/schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/schema.rb) - -Line 77. - -*** - -### schema - -Module-level singleton so the schema is loaded at most once. - -#### Signature - -```ruby -def schema -``` - -#### Source - -[`lib/signalwire/swml/schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/schema.rb) - -Line 72. - -## Source - -[`lib/signalwire/swml/schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/schema.rb) - -Line 6. diff --git a/fern/products/sdk-reference/ruby/signal-wire/swml/schema/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/swml/schema/index.mdx deleted file mode 100644 index d5f0ee1483..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/swml/schema/index.mdx +++ /dev/null @@ -1,154 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/swml/schema" -title: "Schema" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::SWML::Schema" - parent: "SignalWire::SWML" - module: "SignalWire.SWML" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/schema.rb" - visibility: "public" ---- -# `Schema` - -## Signature - -```ruby -class Schema < Object -``` - -## Inheritance - -**Extends:** `Object` - -## Methods - -### get\_verb - -Return the full definition hash for a verb, or nil. - -#### Signature - -```ruby -def get_verb(name) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/swml/schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/schema.rb) - -Line 31. - -*** - -### initialize - -#### Signature - -```ruby -def initialize -``` - -#### Returns - -`Schema` — a new instance of Schema - -#### Source - -[`lib/signalwire/swml/schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/schema.rb) - -Line 10. - -*** - -### valid\_verb? - -Is +name+ a recognised SWML verb? - -#### Signature - -```ruby -def valid_verb?(name) -``` - -#### Parameters - - - -#### Returns - -`Boolean` - -#### Source - -[`lib/signalwire/swml/schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/schema.rb) - -Line 16. - -*** - -### verb\_count - -How many verbs are defined in the schema. - -#### Signature - -```ruby -def verb_count -``` - -#### Source - -[`lib/signalwire/swml/schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/schema.rb) - -Line 26. - -*** - -### verb\_names - -Sorted list of all known verb names. - -#### Signature - -```ruby -def verb_names -``` - -#### Source - -[`lib/signalwire/swml/schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/schema.rb) - -Line 21. - -*** - -### verbs - -Returns the value of attribute verbs. - -#### Signature - -```ruby -attr_reader verbs -> Object -``` - -#### Source - -[`lib/signalwire/swml/schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/schema.rb) - -Line 8. - -## Source - -[`lib/signalwire/swml/schema.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/schema.rb) - -Line 7. diff --git a/fern/products/sdk-reference/ruby/signal-wire/swml/service/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/swml/service/index.mdx deleted file mode 100644 index e657773ec5..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/swml/service/index.mdx +++ /dev/null @@ -1,1005 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/swml/service" -title: "Service" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::SWML::Service" - parent: "SignalWire::SWML" - module: "SignalWire.SWML" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb" - visibility: "public" ---- -# `Service` - -## Signature - -```ruby -class Service < Object -``` - -## Inheritance - -**Extends:** `Object` - -## Constants - - - Maximum request body size enforced on /swaig and the main route (1 MB). - - -## Classes - - - - \------------------------------------------------------------------ Middleware: security headers ------------------------------------------------------------------ - - - - \------------------------------------------------------------------ Middleware: timing-safe Basic-Auth ------------------------------------------------------------------ - - - -## Methods - -### all\_functions - -\--- Idiomatic Ruby accessors/predicates (additive aliases) --- -def-wrappers (not alias\_method) so placement is independent of where -the get\_\* target is defined in the class body. - -#### Signature - -```ruby -def all_functions -``` - -#### Source - -[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) - -Line 156. - -*** - -### basic\_auth\_credentials\_with\_source - -#### Signature - -```ruby -def basic_auth_credentials_with_source -``` - -#### Source - -[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) - -Line 157. - -*** - -### config\_file - -Python parity: - -- `name`, `route`, `host`, `port` — surface from - SWMLService. -- `schema_path` — path to the SWML schema file (or nil to use - the gem-bundled default). -- `config_file` — optional TOML/YAML config file path. -- `schema_validation` — boolean flag mirroring Python's - `self._schema_validation`. `SWML_SKIP_SCHEMA_VALIDATION=1` - env var forces this to false. - -#### Signature - -```ruby -attr_reader config_file -> Object -``` - -#### Source - -[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) - -Line 23. - -*** - -### define\_tool - -Define a SWAIG function the AI can call. Tool descriptions and -parameter descriptions are LLM-facing prompt engineering — see -PORTING\_GUIDE for guidance. - -#### Signature - -```ruby -def define_tool(name:, description:, parameters: {}, secure: false, &handler) -``` - -#### Parameters - - - - - - - - - - - -#### Source - -[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) - -Line 98. - -*** - -### define\_tools - -Return an array of all tool definitions (for SWML rendering). - -#### Signature - -```ruby -def define_tools -``` - -#### Source - -[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) - -Line 120. - -*** - -### document - -Expose the underlying document (useful for tests and subclasses). - -#### Signature - -```ruby -def document -``` - -#### Source - -[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) - -Line 380. - -*** - -### execute\_verb - -Execute a SWML verb, adding it to the current document. - -For most verbs the config is a keyword-args Hash. -The +sleep+ verb is special: it also accepts a bare Integer. - -#### Signature - -```ruby -def execute_verb(verb_name, args = [], kwargs = {}) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) - -Line 242. - -*** - -### function? - -Ruby `?`-predicate form of has\_function. - -#### Signature - -```ruby -def function?(name) -``` - -#### Parameters - - - -#### Returns - -`Boolean` - -#### Source - -[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) - -Line 159. - -*** - -### get\_basic\_auth\_credentials - -Get the configured basic-auth credentials. - -Python parity: `get_basic_auth_credentials(include_source=False)`. -When `include_source` is true, returns a 3-tuple `[user, -pass, source]` where `source` is one of `"environment"`, -`"auto-generated"`, or `"provided"`. Otherwise returns the -2-tuple `[user, pass]`. - -#### Signature - -```ruby -def get_basic_auth_credentials(include_source: false) -``` - -#### Parameters - - - -#### Returns - -`Array(String, String)` — or \[Array(String, String, String)] - -#### Source - -[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) - -Line 277. - -*** - -### get\_full\_url - -Build the full URL for this service. - -get\_full\_url # => "http://0.0.0.0:3000/" -get\_full\_url(include\_auth: true) # => "http://user:pass@0.0.0.0:3000/" - -#### Signature - -```ruby -def get_full_url(include_auth: false) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) - -Line 320. - -*** - -### get\_function - -Get a registered SWAIG function by name, or nil when absent. -(Python parity: ToolRegistry#get\_function.) - -#### Signature - -```ruby -def get_function(name) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) - -Line 163. - -*** - -### handle\_additional\_route - -Extension point: register additional Rack routes after Service -mounts /health, /ready, /swaig, and the main route. AgentBase uses -this to add /post\_prompt, /debug\_events, /mcp. - -#### Signature - -```ruby -def handle_additional_route(_sub_path, _request_data, _env) -``` - -#### Parameters - - - - - - - -#### Returns - -`Array | nil` — A Rack response triple, or nil if not handled - -#### Source - -[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) - -Line 216. - -*** - -### host - -Python parity: - -- `name`, `route`, `host`, `port` — surface from - SWMLService. -- `schema_path` — path to the SWML schema file (or nil to use - the gem-bundled default). -- `config_file` — optional TOML/YAML config file path. -- `schema_validation` — boolean flag mirroring Python's - `self._schema_validation`. `SWML_SKIP_SCHEMA_VALIDATION=1` - env var forces this to false. - -#### Signature - -```ruby -attr_reader host -> Object -``` - -#### Source - -[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) - -Line 23. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(name:, route: '/', host: '0.0.0.0', port: nil, basic_auth: nil, schema_path: nil, config_file: nil, schema_validation: true) -``` - -#### Parameters - - - - - - - - - - - - - - - - - -#### Returns - -`Service` — a new instance of Service - -#### Source - -[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) - -Line 34. - -*** - -### list\_tool\_names - -List registered SWAIG tool names in registration order. - -#### Signature - -```ruby -def list_tool_names -``` - -#### Source - -[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) - -Line 141. - -*** - -### method\_missing - -*** - -#### Verb auto-vivification via method\_missing - -#### Signature - -```ruby -def method_missing(method_name, *args, **kwargs) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) - -Line 224. - -*** - -### name - -Python parity: - -- `name`, `route`, `host`, `port` — surface from - SWMLService. -- `schema_path` — path to the SWML schema file (or nil to use - the gem-bundled default). -- `config_file` — optional TOML/YAML config file path. -- `schema_validation` — boolean flag mirroring Python's - `self._schema_validation`. `SWML_SKIP_SCHEMA_VALIDATION=1` - env var forces this to false. - -#### Signature - -```ruby -attr_reader name -> Object -``` - -#### Source - -[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) - -Line 23. - -*** - -### on\_function\_call - -Dispatch a function call to the registered handler. Default plain -implementation — AgentBase overrides with token validation. - -#### Signature - -```ruby -def on_function_call(name, args, raw_data) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) - -Line 127. - -*** - -### on\_request - -Customization hook called when SWML is requested. Default -delegates to \{#on\_swml\_request\} and returns its result. -Subclasses typically override +on\_swml\_request+ rather than -this method. - -Return +nil+ to use the default SWML rendering, or a Hash of -modifications to merge into the document. - -Python parity: WebMixin#on\_request(request\_data, callback\_path). -The Python third +request+ argument is FastAPI-specific and -intentionally not mirrored. -Python parity: `on_request(request_data, callback_path)`. The -third Python parameter (`request`) — a FastAPI `Request` — -is propagated through Ruby as the optional `request:` keyword -so subclasses can read query/header info when a Rack-style -request is available. Default: delegate to `on_swml_request`. - -#### Signature - -```ruby -def on_request(request_data = nil, callback_path = nil, request: nil) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) - -Line 351. - -*** - -### on\_swml\_request - -Customization point for subclasses to modify SWML based on -request data. The default returns nil (no modification). - -Python parity: -`on_swml_request(request_data, callback_path, request)`. The -`request:` keyword carries the Rack request (or FastAPI -`Request` analogue) for subclasses that need query params -or headers. - -#### Signature - -```ruby -def on_swml_request(request_data = nil, callback_path = nil, request: nil) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) - -Line 363. - -*** - -### port - -Python parity: - -- `name`, `route`, `host`, `port` — surface from - SWMLService. -- `schema_path` — path to the SWML schema file (or nil to use - the gem-bundled default). -- `config_file` — optional TOML/YAML config file path. -- `schema_validation` — boolean flag mirroring Python's - `self._schema_validation`. `SWML_SKIP_SCHEMA_VALIDATION=1` - env var forces this to false. - -#### Signature - -```ruby -attr_reader port -> Object -``` - -#### Source - -[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) - -Line 23. - -*** - -### rack\_app - -Returns a Rack-compatible application. - -#### Signature - -```ruby -def rack_app -``` - -#### Source - -[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) - -Line 399. - -*** - -### register\_routing\_callback - -*** - -#### Routing callbacks & request handling - -#### Signature - -```ruby -def register_routing_callback(path, &block) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) - -Line 331. - -*** - -### register\_swaig\_function - -Register a raw SWAIG function definition (e.g. from DataMap#to\_swaig\_function). - -#### Signature - -```ruby -def register_swaig_function(func_def) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) - -Line 112. - -*** - -### remove\_function - -Remove a registered SWAIG function. Returns true on success, -false when the function was not registered. -(Python parity: ToolRegistry#remove\_function.) - -#### Signature - -```ruby -def remove_function(name) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) - -Line 181. - -*** - -### render - -*** - -#### Render the current SWML document - -#### Signature - -```ruby -def render -``` - -#### Source - -[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) - -Line 371. - -*** - -### render\_main\_swml - -Extension point: handle GET /swaig (returns the SWML document by -default). AgentBase overrides to render with prompts + dynamic config. - -#### Signature - -```ruby -def render_main_swml(_request_data = nil, request: nil) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) - -Line 204. - -*** - -### render\_pretty - -#### Signature - -```ruby -def render_pretty -``` - -#### Source - -[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) - -Line 375. - -*** - -### respond\_to\_missing? - -#### Signature - -```ruby -def respond_to_missing?(method_name, include_private = false) -``` - -#### Parameters - - - - - -#### Returns - -`Boolean` - -#### Source - -[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) - -Line 234. - -*** - -### route - -Python parity: - -- `name`, `route`, `host`, `port` — surface from - SWMLService. -- `schema_path` — path to the SWML schema file (or nil to use - the gem-bundled default). -- `config_file` — optional TOML/YAML config file path. -- `schema_validation` — boolean flag mirroring Python's - `self._schema_validation`. `SWML_SKIP_SCHEMA_VALIDATION=1` - env var forces this to false. - -#### Signature - -```ruby -attr_reader route -> Object -``` - -#### Source - -[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) - -Line 23. - -*** - -### schema\_path - -Python parity: - -- `name`, `route`, `host`, `port` — surface from - SWMLService. -- `schema_path` — path to the SWML schema file (or nil to use - the gem-bundled default). -- `config_file` — optional TOML/YAML config file path. -- `schema_validation` — boolean flag mirroring Python's - `self._schema_validation`. `SWML_SKIP_SCHEMA_VALIDATION=1` - env var forces this to false. - -#### Signature - -```ruby -attr_reader schema_path -> Object -``` - -#### Source - -[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) - -Line 23. - -*** - -### schema\_utils - -SchemaUtils helper bound to this Service. Mirrors Python's -self.schema\_utils public instance attribute on SWMLService. -Built lazily on first access. - -#### Signature - -```ruby -def schema_utils -``` - -#### Source - -[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) - -Line 387. - -*** - -### schema\_validation - -Python parity: - -- `name`, `route`, `host`, `port` — surface from - SWMLService. -- `schema_path` — path to the SWML schema file (or nil to use - the gem-bundled default). -- `config_file` — optional TOML/YAML config file path. -- `schema_validation` — boolean flag mirroring Python's - `self._schema_validation`. `SWML_SKIP_SCHEMA_VALIDATION=1` - env var forces this to false. - -#### Signature - -```ruby -attr_reader schema_validation -> Object -``` - -#### Source - -[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) - -Line 23. - -*** - -### serve - -Start serving (blocking). - -Python parity: -`serve(host=None, port=None, ssl_cert=None, ssl_key=None, -ssl_enabled=None, domain=None)`. When SSL parameters are -supplied the server is started with HTTPS bindings; otherwise -plain HTTP. `host`/`port` overrides default to the -constructor-provided values. - -#### Signature - -```ruby -def serve(host: nil, port: nil, ssl_cert: nil, ssl_key: nil, ssl_enabled: nil, domain: nil) -``` - -#### Parameters - - - - - - - - - - - - - -#### Source - -[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) - -Line 418. - -*** - -### stop - -Gracefully stop the server. - -#### Signature - -```ruby -def stop -``` - -#### Source - -[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) - -Line 465. - -*** - -### swaig\_pre\_dispatch - -Extension point: invoked between argument parsing and function -dispatch on POST /swaig. Returns \[target, short\_circuit]. If -short\_circuit is non-nil, it's returned as the SWAIG response -without calling on\_function\_call. AgentBase overrides to add -session-token validation and ephemeral dynamic-config copies. - -#### Signature - -```ruby -def swaig_pre_dispatch(_request_data, _func_name, _env) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) - -Line 198. - -*** - -### validate\_basic\_auth - -Validate provided basic-auth credentials against the configured ones -using a constant-time comparison. -Python parity: AuthMixin#validate\_basic\_auth(username, password). - -#### Signature - -```ruby -def validate_basic_auth(username, password) -``` - -#### Parameters - - - - - -#### Source - -[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) - -Line 297. - -## Source - -[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) - -Line 13. diff --git a/fern/products/sdk-reference/ruby/signal-wire/swml/service/security-headers-middleware/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/swml/service/security-headers-middleware/index.mdx deleted file mode 100644 index cd307d28fd..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/swml/service/security-headers-middleware/index.mdx +++ /dev/null @@ -1,90 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/swml/service/security-headers-middleware" -title: "SecurityHeadersMiddleware" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::SWML::Service::SecurityHeadersMiddleware" - parent: "SignalWire::SWML::Service" - module: "SignalWire.SWML.Service" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb" - visibility: "public" ---- -# `SecurityHeadersMiddleware` - -*** - -## Middleware: security headers - -## Signature - -```ruby -class SecurityHeadersMiddleware < Object -``` - -## Inheritance - -**Extends:** `Object` - -## Constants - - - -## Methods - -### call - -#### Signature - -```ruby -def call(env) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) - -Line 633. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(app) -``` - -#### Parameters - - - -#### Returns - -`SecurityHeadersMiddleware` — a new instance of SecurityHeadersMiddleware - -#### Source - -[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) - -Line 629. - -## Source - -[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) - -Line 622. diff --git a/fern/products/sdk-reference/ruby/signal-wire/swml/service/timing-safe-basic-auth/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/swml/service/timing-safe-basic-auth/index.mdx deleted file mode 100644 index 06eeaae48f..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/swml/service/timing-safe-basic-auth/index.mdx +++ /dev/null @@ -1,82 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/swml/service/timing-safe-basic-auth" -title: "TimingSafeBasicAuth" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::SWML::Service::TimingSafeBasicAuth" - parent: "SignalWire::SWML::Service" - module: "SignalWire.SWML.Service" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb" - visibility: "public" ---- -# `TimingSafeBasicAuth` - -*** - -## Middleware: timing-safe Basic-Auth - -## Signature - -```ruby -class TimingSafeBasicAuth < Object -``` - -## Inheritance - -**Extends:** `Object` - -## Methods - -### call - -#### Signature - -```ruby -def call(env) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) - -Line 649. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(app, service) -``` - -#### Parameters - - - - - -#### Returns - -`TimingSafeBasicAuth` — a new instance of TimingSafeBasicAuth - -#### Source - -[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) - -Line 644. - -## Source - -[`lib/signalwire/swml/service.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb) - -Line 643. diff --git a/fern/products/sdk-reference/ruby/signal-wire/utils/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/utils/index.mdx deleted file mode 100644 index d56848d986..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/utils/index.mdx +++ /dev/null @@ -1,66 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/utils" -title: "Utils" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "module" - language: "ruby" - qualified_name: "SignalWire::Utils" - parent: "SignalWire" - module: "SignalWire" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/serverless.rb" - visibility: "public" ---- -# `Utils` - -## Signature - -```ruby -module Utils -``` - -## Classes - - - - SchemaUtils — Ruby port of signalwire.utils.schema\_utils.SchemaUtils. - - - - SchemaValidationError — Ruby port of signalwire.utils.schema\_utils.SchemaValidationError. - - - -## Modules - - - - SSRF-prevention guard for user-supplied URLs. - - - -## Methods - -### serverless? - -Idiomatic Ruby `?`-predicate alias of is\_serverless\_mode. - -#### Signature - -```ruby -def serverless? -``` - -#### Source - -[`lib/signalwire/utils/serverless.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/serverless.rb) - -Line 22. - -## Source - -[`lib/signalwire/utils/serverless.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/serverless.rb) - -Line 11. diff --git a/fern/products/sdk-reference/ruby/signal-wire/utils/schema-utils/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/utils/schema-utils/index.mdx deleted file mode 100644 index 2b9c549349..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/utils/schema-utils/index.mdx +++ /dev/null @@ -1,352 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/utils/schema-utils" -title: "SchemaUtils" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Utils::SchemaUtils" - parent: "SignalWire::Utils" - module: "SignalWire.Utils" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/schema_utils.rb" - visibility: "public" ---- -# `SchemaUtils` - -SchemaUtils — Ruby port of signalwire.utils.schema\_utils.SchemaUtils. - -Loads the SWML JSON Schema, extracts verb metadata, and validates -either a single verb config or a complete SWML document. - -Construction rules mirror Python: - -- Pass schema\_path: nil to use the bundled schema.json. -- schema\_validation: false disables validation (validate\_verb returns - true for every call). -- The env var SWML\_SKIP\_SCHEMA\_VALIDATION=1/true/yes also disables - validation regardless of the constructor argument. - -The Ruby port currently ships only the lightweight validator (verb -existence + required-property check). Full JSON Schema validation -can be wired in via the `json_schemer` gem by extending -init\_full\_validator. The lightweight contract matches Python's -\_validate\_verb\_lightweight() exactly. - -## Signature - -```ruby -class SchemaUtils < Object -``` - -## Inheritance - -**Extends:** `Object` - -## Methods - -### full\_validation\_available? - -Whether full JSON Schema validation is wired up. -Mirrors Python's full\_validation\_available property. - -#### Signature - -```ruby -def full_validation_available? -``` - -#### Returns - -`Boolean` - -#### Source - -[`lib/signalwire/utils/schema_utils.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/schema_utils.rb) - -Line 70. - -*** - -### generate\_method\_body - -Generate a Python-style method body string for a verb. -Mirrors Python's generate\_method\_body(verb\_name). - -#### Signature - -```ruby -def generate_method_body(verb_name) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/utils/schema_utils.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/schema_utils.rb) - -Line 188. - -*** - -### generate\_method\_signature - -Generate a Python-style method signature string for a verb. -Mirrors Python's generate\_method\_signature(verb\_name). - -#### Signature - -```ruby -def generate_method_signature(verb_name) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/utils/schema_utils.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/schema_utils.rb) - -Line 159. - -*** - -### get\_all\_verb\_names - -Sorted list of all known verb names. -Mirrors Python's get\_all\_verb\_names(). - -#### Signature - -```ruby -def get_all_verb_names -``` - -#### Source - -[`lib/signalwire/utils/schema_utils.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/schema_utils.rb) - -Line 87. - -*** - -### get\_verb\_parameters - -Parameter-definition block used by code-gen tooling. -Mirrors Python's get\_verb\_parameters(verb\_name). - -#### Signature - -```ruby -def get_verb_parameters(verb_name) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/utils/schema_utils.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/schema_utils.rb) - -Line 118. - -*** - -### get\_verb\_properties - -The properties\[verb\_name] block for a verb, or \{\} when unknown. -Mirrors Python's get\_verb\_properties(verb\_name). - -#### Signature - -```ruby -def get_verb_properties(verb_name) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/utils/schema_utils.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/schema_utils.rb) - -Line 93. - -*** - -### get\_verb\_required\_properties - -The required list for a verb, or \[] when unknown / no required. -Mirrors Python's get\_verb\_required\_properties(verb\_name). - -#### Signature - -```ruby -def get_verb_required_properties(verb_name) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/utils/schema_utils.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/schema_utils.rb) - -Line 108. - -*** - -### initialize - -Construct a SchemaUtils. - -#### Signature - -```ruby -def initialize(schema_path = nil, schema_validation = true) -``` - -#### Parameters - - - path to a schema.json file; nil for the bundled copy at lib/signalwire/swml/schema.json. - - - - enable/disable schema validation. - - -#### Returns - -`SchemaUtils` — a new instance of SchemaUtils - -#### Source - -[`lib/signalwire/utils/schema_utils.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/schema_utils.rb) - -Line 58. - -*** - -### load\_schema - -Read and parse the JSON Schema. Mirrors Python's load\_schema(). - -#### Signature - -```ruby -def load_schema -``` - -#### Source - -[`lib/signalwire/utils/schema_utils.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/schema_utils.rb) - -Line 75. - -*** - -### schema - -#### Signature - -```ruby -attr_reader schema -> Hash{String=>Object} -``` - -#### Returns - -`Hash{String=>Object}` — parsed JSON Schema document - -#### Source - -[`lib/signalwire/utils/schema_utils.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/schema_utils.rb) - -Line 48. - -*** - -### schema\_path - -#### Signature - -```ruby -attr_reader schema_path -> String | nil -``` - -#### Returns - -`String | nil` — resolved schema path (nil = embedded default) - -#### Source - -[`lib/signalwire/utils/schema_utils.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/schema_utils.rb) - -Line 51. - -*** - -### validate\_document - -Validate a complete SWML document. -Mirrors Python's validate\_document(document). Returns -(false, \['Schema validator not initialized']) when no full -validator is wired in. - -#### Signature - -```ruby -def validate_document(document) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/utils/schema_utils.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/schema_utils.rb) - -Line 148. - -*** - -### validate\_verb - -Validate a verb config against the schema. -Mirrors Python's validate\_verb(verb\_name, verb\_config). - -#### Signature - -```ruby -def validate_verb(verb_name, verb_config) -``` - -#### Parameters - - - - - -#### Returns - -`Array(Boolean, Array)` — (valid, errors) tuple. - -#### Source - -[`lib/signalwire/utils/schema_utils.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/schema_utils.rb) - -Line 130. - -## Source - -[`lib/signalwire/utils/schema_utils.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/schema_utils.rb) - -Line 46. diff --git a/fern/products/sdk-reference/ruby/signal-wire/utils/schema-validation-error/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/utils/schema-validation-error/index.mdx deleted file mode 100644 index c750026492..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/utils/schema-validation-error/index.mdx +++ /dev/null @@ -1,102 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/utils/schema-validation-error" -title: "SchemaValidationError" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Utils::SchemaValidationError" - parent: "SignalWire::Utils" - module: "SignalWire.Utils" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/schema_utils.rb" - visibility: "public" ---- -# `SchemaValidationError` - -SchemaValidationError — Ruby port of -signalwire.utils.schema\_utils.SchemaValidationError. - -Raised when SWML schema validation of a verb config fails. - -## Signature - -```ruby -class SchemaValidationError < StandardError -``` - -## Inheritance - -**Extends:** `StandardError` - -## Methods - -### errors - -Returns the value of attribute errors. - -#### Signature - -```ruby -attr_reader errors -> Object -``` - -#### Source - -[`lib/signalwire/utils/schema_utils.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/schema_utils.rb) - -Line 17. - -*** - -### initialize - -Construct a SchemaValidationError. Mirrors Python's -SchemaValidationError(verb\_name, errors). - -#### Signature - -```ruby -def initialize(verb_name, errors) -``` - -#### Parameters - - - - - -#### Returns - -`SchemaValidationError` — a new instance of SchemaValidationError - -#### Source - -[`lib/signalwire/utils/schema_utils.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/schema_utils.rb) - -Line 21. - -*** - -### verb\_name - -Returns the value of attribute verb\_name. - -#### Signature - -```ruby -attr_reader verb_name -> Object -``` - -#### Source - -[`lib/signalwire/utils/schema_utils.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/schema_utils.rb) - -Line 17. - -## Source - -[`lib/signalwire/utils/schema_utils.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/schema_utils.rb) - -Line 16. diff --git a/fern/products/sdk-reference/ruby/signal-wire/utils/url-validator/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/utils/url-validator/index.mdx deleted file mode 100644 index 7989be4aad..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/utils/url-validator/index.mdx +++ /dev/null @@ -1,131 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire/utils/url-validator" -title: "UrlValidator" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "module" - language: "ruby" - qualified_name: "SignalWire::Utils::UrlValidator" - parent: "SignalWire::Utils" - module: "SignalWire.Utils" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/url_validator.rb" - visibility: "public" ---- -# `UrlValidator` - -SSRF-prevention guard for user-supplied URLs. - -Mirrors Python's signalwire.utils.url\_validator.validate\_url: -rejects non-http(s) schemes, missing hostnames, and any URL whose -hostname resolves to a private / loopback / link-local / cloud- -metadata IP. When +allow\_private+ is true, OR the -+SWML\_ALLOW\_PRIVATE\_URLS+ env var is set to "1", "true" or "yes" -(case-insensitive), the IP-blocklist check is skipped. - -The method UrlValidator.validate\_url projects onto the Python free -function signalwire.utils.url\_validator.validate\_url via -scripts/enumerate\_signatures.py. - -## Signature - -```ruby -module UrlValidator -``` - -## Constants - - - Cross-port SSRF block list. Order matches the Python reference. - - - - -## Methods - -### \_resolver - -Pluggable resolver hook. Tests inject a lambda to keep the suite -hermetic; production calls Resolv.getaddresses. Underscore prefix -keeps it out of the public surface inventory — the Python -reference only exposes `validate_url` at this module level. - -#### Signature - -```ruby -def _resolver -``` - -#### Source - -[`lib/signalwire/utils/url_validator.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/url_validator.rb) - -Line 48. - -*** - -### \_resolver= - -#### Signature - -```ruby -def _resolver=(value) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/utils/url_validator.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/url_validator.rb) - -Line 52. - -*** - -### validate\_url - -Validate that a URL is safe to fetch. - -#### Signature - -```ruby -def validate_url(url, allow_private = false) -``` - -#### Parameters - - - URL to validate - - - - when true, bypass the IP-blocklist check - - -#### Returns - -`Boolean` — true if the URL is safe to fetch - -#### Source - -[`lib/signalwire/utils/url_validator.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/url_validator.rb) - -Line 61. - -## Source - -[`lib/signalwire/utils/url_validator.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/utils/url_validator.rb) - -Line 28. diff --git a/fern/products/sdk-reference/rust/_meta.json b/fern/products/sdk-reference/rust/_meta.json index 6e2f0cb58f..cceef1937b 100644 --- a/fern/products/sdk-reference/rust/_meta.json +++ b/fern/products/sdk-reference/rust/_meta.json @@ -6,5 +6,5 @@ "format": "mdx", "platform": "fern", "base_slug": "/reference/rust", - "item_count": 1898 + "item_count": 1910 } \ No newline at end of file diff --git a/fern/products/sdk-reference/rust/agents/agent/agent-base/agent-base/index.mdx b/fern/products/sdk-reference/rust/agents/agent/agent-base/agent-base/index.mdx new file mode 100644 index 0000000000..6b79505722 --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/agent/agent-base/agent-base/index.mdx @@ -0,0 +1,2140 @@ +--- +slug: "/reference/rust/agents/agent/agent-base/agent-base" +title: "AgentBase" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::agent::agent_base::AgentBase" + parent: "signalwire::agent::agent_base" + module: "agents.agent.agent_base" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs" + visibility: "public" +--- +# `AgentBase` + +Core agent that extends `Service` with AI-specific capabilities. + +Manages prompt configuration, tool registration, SWML rendering, +and HTTP request handling for AI agent endpoints. + +AgentBase implements `Deref` (Rust's idiomatic +equivalent of inheritance) so `Service` methods like `set_route`, +`define_tool`, `on_function_call`, etc. are usable on `AgentBase` +instances directly without needing forwarding wrappers. + +## Signature + +```rust +struct AgentBase { /* fields */ } +``` + +## Inheritance + +**Implements:** `Clone`, `Deref`, `DerefMut` + +## Constants + + + The complete set of internal SWAIG function names that accept fillers, matching the SWAIGInternalFiller schema definition. Any name outside this set is silently ignored by the runtime — \[`Self::set_internal_fillers_map`] and \[`Self::add_internal_filler_for`] warn if you pass an unknown name. Notable absences: `change_step`, `gather_submit`, and arbitrary user-defined SWAIG function names are NOT supported. + + +## Methods + +### add\_function\_include + +#### Signature + +```rust +fn add_function_include(&mut self, include: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 949. + +*** + +### add\_hint + +#### Signature + +```rust +fn add_hint(&mut self, hint: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 710. + +*** + +### add\_hints + +#### Signature + +```rust +fn add_hints(&mut self, hints: ?<&str>) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 715. + +*** + +### add\_internal\_filler + +#### Signature + +```rust +fn add_internal_filler(&mut self, filler: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 911. + +*** + +### add\_internal\_filler\_for + +Add internal fillers for a single internal function and language. + +See \[`Self::set_internal_fillers_map`] for the complete list of +supported `function_name` values +(\[`Self::SUPPORTED_INTERNAL_FILLER_NAMES`]) and what fillers do. +Names outside the supported set log a warning. + +#### Signature + +```rust +fn add_internal_filler_for( + &mut self, + function_name: &str, + language_code: &str, + fillers: ? +) -> &mut Self +``` + +#### Parameters + + + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 922. + +*** + +### add\_language + +#### Signature + +```rust +fn add_language(&mut self, name: &str, code: &str, voice: &str) -> &mut Self +``` + +#### Parameters + + + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 727. + +*** + +### add\_pattern\_hint + +#### Signature + +```rust +fn add_pattern_hint(&mut self, pattern: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 722. + +*** + +### add\_post\_ai\_verb + +#### Signature + +```rust +fn add_post_ai_verb(&mut self, verb: &str, config: ?) -> &mut Self +``` + +#### Parameters + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 987. + +*** + +### add\_post\_answer\_verb + +#### Signature + +```rust +fn add_post_answer_verb(&mut self, verb: &str, config: ?) -> &mut Self +``` + +#### Parameters + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 982. + +*** + +### add\_pre\_answer\_verb + +#### Signature + +```rust +fn add_pre_answer_verb(&mut self, verb: &str, config: ?) -> &mut Self +``` + +#### Parameters + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 977. + +*** + +### add\_pronunciation + +#### Signature + +```rust +fn add_pronunciation( + &mut self, + replace: &str, + with: &str, + ignore: &str +) -> &mut Self +``` + +#### Parameters + + + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 789. + +*** + +### add\_skill + +#### Signature + +```rust +fn add_skill(&mut self, name: &str, params: ?) -> &mut Self +``` + +#### Parameters + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 1063. + +*** + +### add\_swaig\_query\_params + +#### Signature + +```rust +fn add_swaig_query_params(&mut self, params: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 1170. + +*** + +### build\_ai\_verb + +Build the AI verb configuration block. + +#### Signature + +```rust +fn build_ai_verb(&self, headers: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 1282. + +*** + +### clear\_post\_ai\_verbs + +#### Signature + +```rust +fn clear_post_ai_verbs(&mut self) -> &mut Self +``` + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 1002. + +*** + +### clear\_post\_answer\_verbs + +#### Signature + +```rust +fn clear_post_answer_verbs(&mut self) -> &mut Self +``` + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 997. + +*** + +### clear\_pre\_answer\_verbs + +#### Signature + +```rust +fn clear_pre_answer_verbs(&mut self) -> &mut Self +``` + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 992. + +*** + +### clear\_swaig\_query\_params + +#### Signature + +```rust +fn clear_swaig_query_params(&mut self) -> &mut Self +``` + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 1177. + +*** + +### clone + +#### Signature + +```rust +fn clone(&self) -> Self +``` + +#### Returns + +`Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 254. + +*** + +### clone\_for\_request + +Create a deep copy of this agent for per-request customisation. + +#### Signature + +```rust +fn clone_for_request(&self) -> Self +``` + +#### Returns + +`Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 1504. + +*** + +### create\_tool\_token + +Mint a per-call SWAIG-function token via the agent's SessionManager. + +Python parity: `state_mixin.StateMixin._create_tool_token` — +delegates to `SessionManager::create_token` and returns `String::new()` +on failure (Python catches all exceptions and returns ""). + +#### Signature + +```rust +fn create_tool_token(&self, tool_name: &str, call_id: &str) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 426. + +*** + +### define\_contexts + +Return the ContextBuilder, creating it lazily on first access. + +The builder's tool-name supplier is set to a snapshot of the +currently registered tool names so \[`ContextBuilder::validate`] +can check for collisions with reserved native tool names +(`next_step`, `change_context`, `gather_submit`). Tools added to +the agent after the first `define_contexts()` call will not be +included in that snapshot — call \[`AgentBase::refresh_context_tools`] +to update it, or call `define_contexts` only after defining all +tools. + +#### Signature + +```rust +fn define_contexts(&mut self) -> &mut ? +``` + +#### Returns + +`&mut ?` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 1021. + +*** + +### define\_tools + +Register a SWAIG tool (function) that the AI can invoke during a +call. + +### How this becomes a tool the model sees + +A SWAIG function is **exactly the same concept** as a "tool" in +native OpenAI / Anthropic tool calling. On every LLM turn, the +SDK renders each registered SWAIG function into the OpenAI tool +schema: + +```text +{ + "type": "function", + "function": { + "name": "your_name_here", + "description": "your description text", + "parameters": { ... your JSON schema ... } + } +} +``` + +That schema is sent to the model as part of the same API call +that produces the next assistant message. The model reads: + +- the function `description` to decide WHEN to call this tool +- each parameter `description` (inside `parameters`) to decide + HOW to fill in that argument from the user's utterance + +This means **descriptions are prompt engineering**, not developer +comments. A vague description is the #1 cause of "the model has +the right tool but doesn't call it" failures. + +### Bad vs good descriptions + +```text +BAD : description: "Lookup function" +GOOD: description: "Look up a customer's account details by " + + "account number. Use this BEFORE quoting any " + + "account-specific info (balance, plan, status). " + + "Do not use for general product questions." + +BAD : parameters: json!({"id": {"type": "string", "description": "the id"}}) +GOOD: parameters: json!({"account_number": {"type": "string", + "description": "The customer's 8-digit account number, " + "no dashes or spaces. Ask the user if they " + "don't provide it."}}) +``` + +### Tool count matters + +LLM tool selection accuracy degrades past ~7-8 +simultaneously-active tools per call. Use +\[`crate::contexts::Step::set_functions`] to partition tools +across steps so only the relevant subset is active at any moment. +Convenience: register multiple raw SWAIG function descriptors. +Wraps the inherited `register_swaig_function` for each. + +#### Signature + +```rust +fn define_tools(&mut self, tool_defs: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Examples + + + + ```rust + { + "type": "function", + "function": { + "name": "your_name_here", + "description": "your description text", + "parameters": { ... your JSON schema ... } + } + } + ``` + + + + ```rust + BAD : description: "Lookup function" + GOOD: description: "Look up a customer's account details by " + + "account number. Use this BEFORE quoting any " + + "account-specific info (balance, plan, status). " + + "Do not use for general product questions." + + BAD : parameters: json!({"id": {"type": "string", "description": "the id"}}) + GOOD: parameters: json!({"account_number": {"type": "string", + "description": "The customer's 8-digit account number, " + "no dashes or spaces. Ask the user if they " + "don't provide it."}}) + ``` + + + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 699. + +*** + +### deref + +#### Signature + +```rust +fn deref(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 316. + +*** + +### deref\_mut + +#### Signature + +```rust +fn deref_mut(&mut self) -> &mut ? +``` + +#### Returns + +`&mut ?` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 322. + +*** + +### enable\_debug\_events + +#### Signature + +```rust +fn enable_debug_events(&mut self, level: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 944. + +*** + +### enable\_sip\_routing + +#### Signature + +```rust +fn enable_sip_routing(&mut self) -> &mut Self +``` + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 1206. + +*** + +### get\_basic\_auth\_credentials + +Return `(user, password)` for the agent's basic auth. + +#### Signature + +```rust +fn get_basic_auth_credentials(&self) -> (?, ?) +``` + +#### Returns + +`(?, ?)` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 1712. + +*** + +### get\_contexts + +Returns the contexts dictionary as a serialised `Value::Object`, +or `None` when no contexts have been defined yet. + +Mirrors Python's `PromptManager.get_contexts` which returns the +contexts dict or `None`. + +#### Signature + +```rust +fn get_contexts(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 629. + +*** + +### get\_language\_params + +Read the per-language `params` dict for a previously-added +language. Mirrors Python's `AIConfigMixin.get_language_params`. + +Returns `Some(&Value)` (always a JSON object) when params were set, +`None` otherwise — including when the language code is unknown. +No error path. + +#### Signature + +```rust +fn get_language_params(&self, code: &str) -> ?<&?> +``` + +#### Parameters + + + +#### Returns + +`?<&?>` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 775. + +*** + +### get\_post\_prompt + +Returns the post-prompt text whatever `set_post_prompt` stored, or +`None` when no post-prompt has been set. + +Mirrors Python's `PromptManager.get_post_prompt` / +`PromptMixin.get_post_prompt` — used by SWML rendering when a +post-prompt is configured. + +#### Signature + +```rust +fn get_post_prompt(&self) -> ?<&str> +``` + +#### Returns + +`?<&str>` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 590. + +*** + +### get\_prompt + +Return the prompt payload: POM array if enabled and populated, otherwise raw text. + +#### Signature + +```rust +fn get_prompt(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 548. + +*** + +### get\_raw\_prompt + +Returns the raw prompt text whatever `set_prompt_text` stored, or +`None` when no raw prompt has been set. Distinct from `get_prompt` +which may return the POM array when `use_pom` is `true`. + +Mirrors Python's `PromptManager.get_raw_prompt`. + +#### Signature + +```rust +fn get_raw_prompt(&self) -> ?<&str> +``` + +#### Returns + +`?<&str>` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 603. + +*** + +### handle\_request + +Handle an HTTP request. Overrides the service handler with agent-specific +logic for SWML, SWAIG dispatch, and post-prompt callbacks. + +#### Signature + +```rust +fn handle_request( + &self, + method: &str, + path: &str, + headers: &?, + body: &str +) -> (u16, ?, ?) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`(u16, ?, ?)` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 1391. + +*** + +### has\_skill + +#### Signature + +```rust +fn has_skill(&self, name: &str) -> bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 1135. + +*** + +### list\_skills + +#### Signature + +```rust +fn list_skills(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 1131. + +*** + +### list\_tool\_names + +Return the names of every registered SWAIG tool in insertion order. + +#### Signature + +```rust +fn list_tool_names(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 1044. + +*** + +### manual\_set\_proxy\_url + +#### Signature + +```rust +fn manual_set_proxy_url(&mut self, url: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 1165. + +*** + +### new + +#### Signature + +```rust +fn new(options: ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 328. + +*** + +### on\_debug\_event + +#### Signature + +```rust +fn on_debug_event(&mut self, callback: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 1192. + +*** + +### on\_summary + +#### Signature + +```rust +fn on_summary(&mut self, callback: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 1182. + +*** + +### pom + +Read-only snapshot of the agent's POM as a typed +\[`PromptObjectModel`]. + +Python parity: `agent.pom` instance attribute (agent\_base.py +line 209). Returns `None` when `use_pom` is `false` (mirroring +Python's `self.pom = None`); otherwise returns a freshly built +\[`PromptObjectModel`] populated from the agent's stored +section list. + +Returning a typed POM (rather than the raw `Vec`) lets +callers reach for `render_markdown` / `render_xml` / `to_json` +directly without re-implementing the renderers — matching +Python's `agent.pom.render_markdown()` ergonomics. + +#### Signature + +```rust +fn pom(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 569. + +*** + +### prompt\_add\_section + +Add a top-level POM section with an optional body and bullets. + +#### Signature + +```rust +fn prompt_add_section( + &mut self, + title: &str, + body: &str, + bullets: ?<&str> +) -> &mut Self +``` + +#### Parameters + + + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 462. + +*** + +### prompt\_add\_subsection + +Add a subsection nested under an existing parent section. + +#### Signature + +```rust +fn prompt_add_subsection( + &mut self, + parent_title: &str, + title: &str, + body: &str +) -> &mut Self +``` + +#### Parameters + + + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 480. + +*** + +### prompt\_add\_to\_section + +Append body text and/or bullets to an existing section. + +#### Signature + +```rust +fn prompt_add_to_section( + &mut self, + title: &str, + body: ?<&str>, + bullets: ?<&str> +) -> &mut Self +``` + +#### Parameters + + + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 503. + +*** + +### prompt\_has\_section + +Check whether a POM section with the given title exists. + +#### Signature + +```rust +fn prompt_has_section(&self, title: &str) -> bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 538. + +*** + +### refresh\_context\_tools + +Refresh the ContextBuilder's tool-name supplier with the current +list of registered SWAIG tools. Call this if you define new tools +after the first `define_contexts()` call and want the next +`validate()` to see them. + +#### Signature + +```rust +fn refresh_context_tools(&mut self) -> &mut Self +``` + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 1035. + +*** + +### register\_sip\_username + +#### Signature + +```rust +fn register_sip_username(&mut self, username: &str, route: &str) -> &mut Self +``` + +#### Parameters + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 1211. + +*** + +### remove\_skill + +#### Signature + +```rust +fn remove_skill(&mut self, name: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 1126. + +*** + +### render\_swml + +Build the complete SWML document for a request. + +Phases: + +1. Pre-answer verbs +2. Answer verb (if auto\_answer) +3. Record call verb (if record\_call) +4. Post-answer verbs +5. AI verb (via build\_ai\_verb) +6. Post-AI verbs + +#### Signature + +```rust +fn render_swml(&self, headers: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 1232. + +*** + +### reset\_contexts + +Remove all contexts, returning the agent to a no-contexts state. +This is a convenience wrapper around `define_contexts().reset()`. +Use it in a dynamic config callback when you need to rebuild +contexts from scratch for a specific request. + +#### Signature + +```rust +fn reset_contexts(&mut self) -> &mut Self +``` + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 1052. + +*** + +### run + +Start a blocking HTTP server on the configured host:port. + +Serves HTTPS instead when `SWML_SSL_ENABLED` is set together with +`SWML_SSL_CERT_PATH` / `SWML_SSL_KEY_PATH` (mirrors Python's +`SecurityConfig` / uvicorn `ssl_*` contract). + +#### Signature + +```rust +fn run(&self) +``` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 1722. + +*** + +### service + +Access the underlying service. + +#### Signature + +```rust +fn service(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 397. + +*** + +### service\_mut + +Access the underlying service mutably. + +#### Signature + +```rust +fn service_mut(&mut self) -> &mut ? +``` + +#### Returns + +`&mut ?` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 402. + +*** + +### set\_dynamic\_config\_callback + +#### Signature + +```rust +fn set_dynamic_config_callback( + &mut self, + callback: ? +) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 1143. + +*** + +### set\_function\_includes + +#### Signature + +```rust +fn set_function_includes(&mut self, includes: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 954. + +*** + +### set\_global\_data + +#### Signature + +```rust +fn set_global_data(&mut self, data: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 822. + +*** + +### set\_internal\_fillers + +#### Signature + +```rust +fn set_internal_fillers(&mut self, fillers: ?<&str>) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 865. + +*** + +### set\_internal\_fillers\_map + +Set internal fillers for native SWAIG functions (structured form). + +Internal fillers are short phrases the AI agent speaks (via TTS) +while an internal/native function is running, so the caller +doesn't hear dead air during transitions or background work. + +Supported function names (match the SWAIGInternalFiller schema): +`hangup`, `check_time`, `wait_for_user`, `wait_seconds`, +`adjust_response_latency`, `next_step`, `change_context`, +`get_visual_input`, `get_ideal_strategy`. See +\[`Self::SUPPORTED_INTERNAL_FILLER_NAMES`]. + +Notably NOT supported: `change_step`, `gather_submit`, or +arbitrary user-defined SWAIG function names. The runtime only +honors fillers for the names listed above; everything else is +silently ignored at the SWML level. This method warns at +registration time if you pass an unknown name so you catch the +typo early. + +#### Signature + +```rust +fn set_internal_fillers_map(&mut self, fillers: ?>>) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 888. + +*** + +### set\_language\_params + +Set (or replace) the per-language `params` dict on an already-added +language. Mirrors Python's `AIConfigMixin.set_language_params` — +engine-specific tuning (voice stability/similarity, model knobs, +etc.) can be attached after the language entry was created. + +Behavior, matching Python: + +- If `params` is a non-empty JSON object, store it under the + `params` key on the matching language entry (replacing any + prior value). +- If `params` is an empty object (or any non-object value), + remove the `params` key (treated as unset). +- If no language with the given code exists, this is a no-op. +- Returns `&mut Self` for chaining. + +Python parity: the per-language params are emitted as the language +object's `params` key in SWML and use snake\_case wire shape. + +#### Signature + +```rust +fn set_language_params(&mut self, code: &str, params: ?) -> &mut Self +``` + +#### Parameters + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 749. + +*** + +### set\_languages + +#### Signature + +```rust +fn set_languages(&mut self, languages: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 784. + +*** + +### set\_native\_functions + +#### Signature + +```rust +fn set_native_functions(&mut self, functions: ?<&str>) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 838. + +*** + +### set\_param + +#### Signature + +```rust +fn set_param(&mut self, key: &str, value: ?) -> &mut Self +``` + +#### Parameters + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 810. + +*** + +### set\_params + +#### Signature + +```rust +fn set_params(&mut self, params: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 815. + +*** + +### set\_post\_prompt + +#### Signature + +```rust +fn set_post_prompt(&mut self, text: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 456. + +*** + +### set\_post\_prompt\_llm\_params + +#### Signature + +```rust +fn set_post_prompt_llm_params(&mut self, params: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 966. + +*** + +### set\_post\_prompt\_url + +#### Signature + +```rust +fn set_post_prompt_url(&mut self, url: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 1160. + +*** + +### set\_prompt\_llm\_params + +#### Signature + +```rust +fn set_prompt_llm_params(&mut self, params: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 959. + +*** + +### set\_prompt\_pom + +Sets the prompt as a list of POM section objects. Each section +supports keys "title", "body", "bullets", "numbered", +"numbered\_bullets", and "subsections". Switches the agent to POM +mode. + +Mirrors Python's `PromptManager.set_prompt_pom` — accepts a list +of section dicts and stores them in `pom_sections`. + +#### Signature + +```rust +fn set_prompt_pom(&mut self, pom: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 618. + +*** + +### set\_prompt\_text + +#### Signature + +```rust +fn set_prompt_text(&mut self, text: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 451. + +*** + +### set\_pronunciations + +#### Signature + +```rust +fn set_pronunciations(&mut self, pronunciations: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 805. + +*** + +### set\_signing\_key + +Set or clear the signing key after construction. Useful for +tests and dynamic-config flows. Pass an empty string or +`None`-equivalent to disable. + +#### Signature + +```rust +fn set_signing_key(&mut self, key: ?<&str>) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 416. + +*** + +### set\_webhook\_url + +#### Signature + +```rust +fn set_webhook_url(&mut self, url: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 1155. + +*** + +### signing\_key + +Return the signing key resolved from `AgentOptions::signing_key` +or the `SIGNALWIRE_SIGNING_KEY` environment variable. `None` +means signature validation is disabled. + +#### Signature + +```rust +fn signing_key(&self) -> ?<&str> +``` + +#### Returns + +`?<&str>` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 409. + +*** + +### update\_global\_data + +#### Signature + +```rust +fn update_global_data(&mut self, data: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 829. + +*** + +### validate\_tool\_token + +Validate a per-call SWAIG-function token. Returns `false` when the +function is not registered or when the SessionManager rejects the +token. + +Python parity: `state_mixin.StateMixin.validate_tool_token` — +rejects unknown function names up-front. Rust's +`SessionManager::validate_token` returns `bool` (no panics on bad +input — see security/session\_manager.rs), so no try/catch is +required for parity. + +#### Signature + +```rust +fn validate_tool_token( + &self, + function_name: &str, + token: &str, + call_id: &str +) -> bool +``` + +#### Parameters + + + + + + + +#### Returns + +`bool` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 439. + +## Type Aliases + +### Target + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 315. + +## Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 171. diff --git a/fern/products/sdk-reference/rust/agents/agent/agent-base/agent-options/index.mdx b/fern/products/sdk-reference/rust/agents/agent/agent-base/agent-options/index.mdx new file mode 100644 index 0000000000..92a7920749 --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/agent/agent-base/agent-options/index.mdx @@ -0,0 +1,349 @@ +--- +slug: "/reference/rust/agents/agent/agent-base/agent-options" +title: "AgentOptions" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::agent::agent_base::AgentOptions" + parent: "signalwire::agent::agent_base" + module: "agents.agent.agent_base" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs" + visibility: "public" +--- +# `AgentOptions` + +Options for constructing an `AgentBase`. + +Doubles as an idiomatic **builder**: every field has a fluent +`with_*`/setter that takes and returns `self`, so an agent can be configured +in one expression and handed straight to \[`AgentBase::new`]: + +```no_run +use signalwire::agent::{AgentBase, AgentOptions}; + +let agent = AgentBase::new( + AgentOptions::new("receptionist") + .route("/reception") + .basic_auth("user", "secret") + .auto_answer(true) + .signing_key("whsec_…"), +); +``` + +Direct field assignment (`opts.route = Some(...)`) still works — the builder +methods are an additive convenience. `#[must_use]` flags an `AgentOptions` +that is built but never passed to \[`AgentBase::new`]; under +`#[deny(unused_must_use)]` that is a hard compile error, as this +`compile_fail` doctest proves: + +```compile_fail +#![deny(unused_must_use)] +use signalwire::agent::AgentOptions; +// Building an AgentOptions and dropping it on the floor is a compile error +// because the type is `#[must_use]` — you must feed it to AgentBase::new. +AgentOptions::new("oops").route("/x"); +``` + +**Decorators:** `@must_use` + +## Signature + +```rust +struct AgentOptions { /* fields */ } +``` + +## Examples + + + + ```rust + use signalwire::agent::{AgentBase, AgentOptions}; + + let agent = AgentBase::new( + AgentOptions::new("receptionist") + .route("/reception") + .basic_auth("user", "secret") + .auto_answer(true) + .signing_key("whsec_…"), + ); + ``` + + + + ```rust + #![deny(unused_must_use)] + use signalwire::agent::AgentOptions; + // Building an AgentOptions and dropping it on the floor is a compile error + // because the type is `#[must_use]` — you must feed it to AgentBase::new. + AgentOptions::new("oops").route("/x"); + ``` + + + +## Properties + + + + + + + + + + + + + + + + + + + SignalWire Signing Key used to validate the `X-SignalWire-Signature` header on incoming POST webhooks (`POST /`, `POST /swaig`, `POST /post_prompt`). When `None`, the agent falls back to the `SIGNALWIRE_SIGNING_KEY` environment variable. When neither is set, the agent logs a prominent warning at startup and accepts unsigned requests — see Python parity (`webhook_validator.py`, reference at `signalwire-python/signalwire/signalwire/core/security/`). + + + + +## Methods + +### auto\_answer + +Toggle automatic call answering (default `true`). + +#### Signature + +```rust +fn auto_answer(self, auto_answer: bool) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 122. + +*** + +### basic\_auth + +Set HTTP Basic-Auth credentials guarding this agent's endpoints. + +#### Signature + +```rust +fn basic_auth(self, user: &str, password: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 115. + +*** + +### host + +Set the bind host (e.g. `"0.0.0.0"`). + +#### Signature + +```rust +fn host(self, host: &str) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 103. + +*** + +### new + +#### Signature + +```rust +fn new(name: &str) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 73. + +*** + +### port + +Set the bind port. + +#### Signature + +```rust +fn port(self, port: u16) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 109. + +*** + +### record\_call + +Toggle call recording (default `false`). + +#### Signature + +```rust +fn record_call(self, record_call: bool) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 128. + +*** + +### route + +Set the HTTP route this agent serves (e.g. `"/reception"`). + +#### Signature + +```rust +fn route(self, route: &str) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 97. + +*** + +### signing\_key + +Set the SignalWire signing key used to validate inbound +`X-SignalWire-Signature` webhook headers. See \[`AgentOptions::signing_key`]. + +#### Signature + +```rust +fn signing_key(self, signing_key: &str) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 141. + +*** + +### use\_pom + +Toggle Prompt-Object-Model prompt rendering (default `true`). + +#### Signature + +```rust +fn use_pom(self, use_pom: bool) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 134. + +## Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 50. diff --git a/fern/products/sdk-reference/rust/agents/agent/agent-base/index.mdx b/fern/products/sdk-reference/rust/agents/agent/agent-base/index.mdx new file mode 100644 index 0000000000..c481759879 --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/agent/agent-base/index.mdx @@ -0,0 +1,34 @@ +--- +slug: "/reference/rust/agents/agent/agent-base" +title: "agent_base" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::agent::agent_base" + parent: "signalwire::agent" + module: "agents.agent" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs" + visibility: "public" +--- +# `agent_base` + +## Classes + + + + Core agent that extends `Service` with AI-specific capabilities. + + + + Options for constructing an `AgentBase`. + + + +## Source + +[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/agents/agent/index.mdx b/fern/products/sdk-reference/rust/agents/agent/index.mdx new file mode 100644 index 0000000000..7f25c0818d --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/agent/index.mdx @@ -0,0 +1,28 @@ +--- +slug: "/reference/rust/agents/agent" +title: "agent" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::agent" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/agent/mod.rs" + visibility: "public" +--- +# `agent` + +## Modules + + + + + +## Source + +[`src/agent/mod.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/mod.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/agents/contexts/context-builder/context-builder/index.mdx b/fern/products/sdk-reference/rust/agents/contexts/context-builder/context-builder/index.mdx new file mode 100644 index 0000000000..ad6cdd0d28 --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/contexts/context-builder/context-builder/index.mdx @@ -0,0 +1,342 @@ +--- +slug: "/reference/rust/agents/contexts/context-builder/context-builder" +title: "ContextBuilder" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::contexts::context_builder::ContextBuilder" + parent: "signalwire::contexts::context_builder" + module: "agents.contexts.context_builder" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs" + visibility: "public" +--- +# `ContextBuilder` + +Builder for multi-step, multi-context AI agent workflows. + +A ContextBuilder owns one or more \[`Context`]s; each Context owns an +ordered list of \[`Step`]s. Only one context and one step is active at +a time. Per chat turn, the runtime injects the current step's +instructions as a system message, then asks the LLM for a response. + +# Native tools auto-injected by the runtime + +When a step (or its enclosing context) declares valid\_steps or +valid\_contexts, the runtime auto-injects two native tools so the +model can navigate the flow: + +- `next_step(step: enum)` — present when valid\_steps is set +- `change_context(context: enum)` — present when valid\_contexts is set + +A third native tool — `gather_submit` — is injected during +gather\_info questioning. These three names are reserved: see +\[`RESERVED_NATIVE_TOOL_NAMES`]. \[`ContextBuilder::validate`] rejects +any agent that defines a SWAIG tool with one of these names. + +# Function whitelisting (\[`Step::set_functions`]) + +Each step may declare a functions whitelist. The whitelist is applied +in-memory at the start of each LLM turn. CRITICALLY: if a step does +NOT declare a functions field, it INHERITS the previous step's +active set. See \[`Step::set_functions`] for details and examples. + +**Decorators:** `@must_use` + +## Signature + +```rust +struct ContextBuilder { /* fields */ } +``` + +## Inheritance + +**Implements:** `Clone`, `Debug`, `Default` + +## Methods + +### add\_context + +#### Signature + +```rust +fn add_context(&mut self, name: &str) -> &mut ? +``` + +#### Parameters + + + +#### Returns + +`&mut ?` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 651. + +*** + +### attach\_tool\_name\_supplier + +Attach a closure that returns registered SWAIG tool names so +\[`Self::validate`] can check for collisions with +\[`RESERVED_NATIVE_TOOL_NAMES`]. + +#### Signature + +```rust +fn attach_tool_name_supplier( + &mut self, + supplier: F +) -> &mut Self where F: ?() -> ? + ? + ? + 'static +``` + +#### Type Parameters + + + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 634. + +*** + +### clone + +#### Signature + +```rust +fn clone(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 596. + +*** + +### default + +#### Signature + +```rust +fn default() -> Self +``` + +#### Returns + +`Self` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 864. + +*** + +### fmt + +#### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 610. + +*** + +### get\_context + +#### Signature + +```rust +fn get_context(&self, name: &str) -> ?<&?> +``` + +#### Parameters + + + +#### Returns + +`?<&?>` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 670. + +*** + +### get\_context\_mut + +#### Signature + +```rust +fn get_context_mut(&mut self, name: &str) -> ?<&mut ?> +``` + +#### Parameters + + + +#### Returns + +`?<&mut ?>` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 674. + +*** + +### has\_contexts + +#### Signature + +```rust +fn has_contexts(&self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 678. + +*** + +### new + +#### Signature + +```rust +fn new() -> Self +``` + +#### Returns + +`Self` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 623. + +*** + +### reset + +Remove all contexts, returning the builder to its initial state. +Use this in a dynamic config callback when you need to rebuild +contexts from scratch for a specific request. + +#### Signature + +```rust +fn reset(&mut self) -> &mut Self +``` + +#### Returns + +`&mut Self` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 645. + +*** + +### to\_value + +Serialise all contexts in order. Validates before converting. + +#### Signature + +```rust +fn to_value(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 848. + +*** + +### validate + +Validate the contexts configuration. +Returns `Ok(())` if valid, `Err(errors)` with a list of error messages. + +#### Signature + +```rust +fn validate(&self) -> ?<(), ?> +``` + +#### Returns + +`?<(), ?>` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 684. + +## Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 598. diff --git a/fern/products/sdk-reference/rust/agents/contexts/context-builder/context/index.mdx b/fern/products/sdk-reference/rust/agents/contexts/context-builder/context/index.mdx new file mode 100644 index 0000000000..2b3d0d9af6 --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/contexts/context-builder/context/index.mdx @@ -0,0 +1,429 @@ +--- +slug: "/reference/rust/agents/contexts/context-builder/context" +title: "Context" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::contexts::context_builder::Context" + parent: "signalwire::contexts::context_builder" + module: "agents.contexts.context_builder" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs" + visibility: "public" +--- +# `Context` + +A named context containing an ordered set of steps. + +## Signature + +```rust +struct Context { /* fields */ } +``` + +## Inheritance + +**Implements:** `Debug`, `Clone` + +## Methods + +### add\_step + +#### Signature + +```rust +fn add_step(&mut self, name: &str) -> &mut ? +``` + +#### Parameters + + + +#### Returns + +`&mut ?` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 441. + +*** + +### clone + +#### Signature + +```rust +fn clone(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 407. + +*** + +### fmt + +#### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 407. + +*** + +### get\_step + +#### Signature + +```rust +fn get_step(&self, name: &str) -> ?<&?> +``` + +#### Parameters + + + +#### Returns + +`?<&?>` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 461. + +*** + +### get\_step\_mut + +#### Signature + +```rust +fn get_step_mut(&mut self, name: &str) -> ?<&mut ?> +``` + +#### Parameters + + + +#### Returns + +`?<&mut ?>` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 465. + +*** + +### move\_step + +#### Signature + +```rust +fn move_step(&mut self, name: &str, position: usize) -> &mut Self +``` + +#### Parameters + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 476. + +*** + +### name + +#### Signature + +```rust +fn name(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 435. + +*** + +### new + +#### Signature + +```rust +fn new(name: &str) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 422. + +*** + +### remove\_step + +#### Signature + +```rust +fn remove_step(&mut self, name: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 469. + +*** + +### set\_enter\_fillers + +#### Signature + +```rust +fn set_enter_fillers(&mut self, fillers: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 512. + +*** + +### set\_exit\_fillers + +#### Signature + +```rust +fn set_exit_fillers(&mut self, fillers: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 517. + +*** + +### set\_initial\_step + +Set which step the context starts on when entered. + +By default, a context starts on its first step (index 0). Use +this to skip a preamble step on re-entry via `change_context`. + +#### Signature + +```rust +fn set_initial_step(&mut self, step_name: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 493. + +*** + +### set\_prompt\_text + +#### Signature + +```rust +fn set_prompt_text(&mut self, prompt: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 500. + +*** + +### set\_system\_prompt + +#### Signature + +```rust +fn set_system_prompt(&mut self, system_prompt: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 505. + +*** + +### step\_order + +#### Signature + +```rust +fn step_order(&self) -> &[?] +``` + +#### Returns + +`&[?]` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 528. + +*** + +### steps + +#### Signature + +```rust +fn steps(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 524. + +*** + +### to\_value + +#### Signature + +```rust +fn to_value(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 534. + +## Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 408. diff --git a/fern/products/sdk-reference/rust/agents/contexts/context-builder/gather-info/index.mdx b/fern/products/sdk-reference/rust/agents/contexts/context-builder/gather-info/index.mdx new file mode 100644 index 0000000000..353331ebdb --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/contexts/context-builder/gather-info/index.mdx @@ -0,0 +1,208 @@ +--- +slug: "/reference/rust/agents/contexts/context-builder/gather-info" +title: "GatherInfo" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::contexts::context_builder::GatherInfo" + parent: "signalwire::contexts::context_builder" + module: "agents.contexts.context_builder" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs" + visibility: "public" +--- +# `GatherInfo` + +Configuration for structured data gathering within a step. + +## Signature + +```rust +struct GatherInfo { /* fields */ } +``` + +## Inheritance + +**Implements:** `Debug`, `Clone` + +## Methods + +### add\_question + +#### Signature + +```rust +fn add_question( + &mut self, + key: &str, + question: &str, + question_type: &str, + confirm: bool, + prompt: ?<&str>, + functions: ?> +) -> &mut Self +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 107. + +*** + +### clone + +#### Signature + +```rust +fn clone(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 85. + +*** + +### completion\_action + +#### Signature + +```rust +fn completion_action(&self) -> ?<&str> +``` + +#### Returns + +`?<&str>` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 131. + +*** + +### fmt + +#### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 85. + +*** + +### new + +#### Signature + +```rust +fn new(output_key: ?<&str>, completion_action: ?<&str>, prompt: ?<&str>) -> Self +``` + +#### Parameters + + + + + + + +#### Returns + +`Self` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 94. + +*** + +### questions + +#### Signature + +```rust +fn questions(&self) -> &[?] +``` + +#### Returns + +`&[?]` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 127. + +*** + +### to\_value + +#### Signature + +```rust +fn to_value(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 135. + +## Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 86. diff --git a/fern/products/sdk-reference/rust/agents/contexts/context-builder/gather-question/index.mdx b/fern/products/sdk-reference/rust/agents/contexts/context-builder/gather-question/index.mdx new file mode 100644 index 0000000000..281cd5a712 --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/contexts/context-builder/gather-question/index.mdx @@ -0,0 +1,159 @@ +--- +slug: "/reference/rust/agents/contexts/context-builder/gather-question" +title: "GatherQuestion" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::contexts::context_builder::GatherQuestion" + parent: "signalwire::contexts::context_builder" + module: "agents.contexts.context_builder" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs" + visibility: "public" +--- +# `GatherQuestion` + +A single question within a gather\_info block. + +## Signature + +```rust +struct GatherQuestion { /* fields */ } +``` + +## Inheritance + +**Implements:** `Debug`, `Clone` + +## Methods + +### clone + +#### Signature + +```rust +fn clone(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 25. + +*** + +### fmt + +#### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 25. + +*** + +### key + +#### Signature + +```rust +fn key(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 54. + +*** + +### new + +#### Signature + +```rust +fn new( + key: &str, + question: &str, + question_type: &str, + confirm: bool, + prompt: ?<&str>, + functions: ?> +) -> Self +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`Self` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 36. + +*** + +### to\_value + +#### Signature + +```rust +fn to_value(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 58. + +## Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 26. diff --git a/fern/products/sdk-reference/rust/agents/contexts/context-builder/index.mdx b/fern/products/sdk-reference/rust/agents/contexts/context-builder/index.mdx new file mode 100644 index 0000000000..a90bc00c37 --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/contexts/context-builder/index.mdx @@ -0,0 +1,78 @@ +--- +slug: "/reference/rust/agents/contexts/context-builder" +title: "context_builder" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::contexts::context_builder" + parent: "signalwire::contexts" + module: "agents.contexts" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs" + visibility: "public" +--- +# `context_builder` + +## Constants + + + Reserved tool names auto-injected by the runtime when contexts/steps are present. User-defined SWAIG tools must not collide with these names: \[`ContextBuilder::validate`] rejects any agent that registers a user tool sharing one of these names — the runtime would never call the user tool because the native one wins. + + +## Classes + + + + A named context containing an ordered set of steps. + + + + Builder for multi-step, multi-context AI agent workflows. + + + + Configuration for structured data gathering within a step. + + + + A single question within a gather\_info block. + + + + A single step within a context. + + + +## Functions + +### create\_simple\_context + +Create a builder pre-populated with a single named context. + +#### Signature + +```rust +fn create_simple_context(name: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 872. + +## Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/agents/contexts/context-builder/step/index.mdx b/fern/products/sdk-reference/rust/agents/contexts/context-builder/step/index.mdx new file mode 100644 index 0000000000..a266c16411 --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/contexts/context-builder/step/index.mdx @@ -0,0 +1,539 @@ +--- +slug: "/reference/rust/agents/contexts/context-builder/step" +title: "Step" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::contexts::context_builder::Step" + parent: "signalwire::contexts::context_builder" + module: "agents.contexts.context_builder" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs" + visibility: "public" +--- +# `Step` + +A single step within a context. + +## Signature + +```rust +struct Step { /* fields */ } +``` + +## Inheritance + +**Implements:** `Debug`, `Clone` + +## Methods + +### add\_gather\_question + +Add a question to this step's gather\_info. Initialises +gather\_info if needed. + +### Gather mode locks function access (IMPORTANT) + +While the model is asking gather questions, the runtime +forcibly deactivates ALL of the step's other functions. The +only callable tools during a gather question are: + +- `gather_submit` (the native answer-submission tool) +- Whatever names you pass in this question's `functions` + argument + +`next_step` and `change_context` are also filtered out — the +model cannot navigate away until the gather completes. This +is by design: it forces a tight ask → submit → next-question +loop. + +If a question needs to call out to a tool (e.g. validate an +email, geocode a ZIP), list that tool name in this question's +`functions` argument. Functions listed here are active ONLY +for this question. + +#### Signature + +```rust +fn add_gather_question( + &mut self, + key: &str, + question: &str, + question_type: &str, + confirm: bool, + prompt: ?<&str>, + functions: ?> +) -> &mut Self +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 319. + +*** + +### add\_section + +Add a POM section with title and body. + +#### Signature + +```rust +fn add_section(&mut self, title: &str, body: &str) -> &mut Self +``` + +#### Parameters + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 203. + +*** + +### clone + +#### Signature + +```rust +fn clone(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 158. + +*** + +### fmt + +#### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 158. + +*** + +### gather\_info + +#### Signature + +```rust +fn gather_info(&self) -> ?<&?> +``` + +#### Returns + +`?<&?>` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 347. + +*** + +### name + +#### Signature + +```rust +fn name(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 188. + +*** + +### new + +#### Signature + +```rust +fn new(name: &str) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 173. + +*** + +### set\_end + +Mark this step as terminal for the step flow. + +**IMPORTANT**: `end = true` does NOT end the conversation or +hang up the call. It exits step mode entirely after this step +executes — clearing the steps list, current step index, +valid\_steps, and valid\_contexts. The agent keeps running, but +operates only under the base system prompt and the context-level +prompt; no more step instructions are injected and no more +`next_step` tool is offered. + +To actually end the call, call a hangup tool or define a +hangup hook. + +#### Signature + +```rust +fn set_end(&mut self, end: bool) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 276. + +*** + +### set\_functions + +Set which non-internal functions are callable while this step is +active. + +### Inheritance behavior (IMPORTANT) + +If you do NOT call this method, the step inherits whichever +function set was active on the previous step (or the previous +context's last step). The server-side runtime only resets the +active set when a step explicitly declares its `functions` field. +This is the most common source of bugs in multi-step agents: +forgetting `set_functions` on a later step lets the previous +step's tools leak through. Best practice is to call +`set_functions` explicitly on every step that should differ from +the previous one. + +Keep the per-step active set small: LLM tool selection accuracy +degrades noticeably past ~7-8 simultaneously-active tools per +call. Use per-step whitelisting to partition large tool +collections. + +Internal functions (e.g. `gather_submit`, hangup hook) are +ALWAYS protected and cannot be deactivated by this whitelist. The +native navigation tools `next_step` and `change_context` are +injected automatically when `set_valid_steps` / +`set_valid_contexts` is used; they are not affected by this list. + +#### Signature + +```rust +fn set_functions(&mut self, functions: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 249. + +*** + +### set\_gather\_info + +Initialise gather\_info for this step. + +#### Signature + +```rust +fn set_gather_info( + &mut self, + output_key: ?<&str>, + completion_action: ?<&str>, + prompt: ?<&str> +) -> &mut Self +``` + +#### Parameters + + + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 287. + +*** + +### set\_skip\_user\_turn + +#### Signature + +```rust +fn set_skip_user_turn(&mut self, skip: bool) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 281. + +*** + +### set\_step\_criteria + +#### Signature + +```rust +fn set_step_criteria(&mut self, criteria: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 212. + +*** + +### set\_text + +Set the step's prompt text directly. Mutually exclusive with POM sections. + +#### Signature + +```rust +fn set_text(&mut self, text: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 193. + +*** + +### set\_valid\_contexts + +#### Signature + +```rust +fn set_valid_contexts(&mut self, contexts: ?<&str>) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 259. + +*** + +### set\_valid\_steps + +#### Signature + +```rust +fn set_valid_steps(&mut self, steps: ?<&str>) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 254. + +*** + +### to\_value + +#### Signature + +```rust +fn to_value(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 371. + +*** + +### valid\_contexts + +#### Signature + +```rust +fn valid_contexts(&self) -> ?<&[?]> +``` + +#### Returns + +`?<&[?]>` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 343. + +*** + +### valid\_steps + +#### Signature + +```rust +fn valid_steps(&self) -> ?<&[?]> +``` + +#### Returns + +`?<&[?]>` + +#### Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 339. + +## Source + +[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) + +Line 159. diff --git a/fern/products/sdk-reference/rust/agents/contexts/index.mdx b/fern/products/sdk-reference/rust/agents/contexts/index.mdx new file mode 100644 index 0000000000..a26a250910 --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/contexts/index.mdx @@ -0,0 +1,28 @@ +--- +slug: "/reference/rust/agents/contexts" +title: "contexts" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::contexts" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/mod.rs" + visibility: "public" +--- +# `contexts` + +## Modules + + + + + +## Source + +[`src/contexts/mod.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/mod.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/agents/datamap/index.mdx b/fern/products/sdk-reference/rust/agents/datamap/index.mdx new file mode 100644 index 0000000000..49aa8fedad --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/datamap/index.mdx @@ -0,0 +1,22 @@ +--- +slug: "/reference/rust/agents/datamap" +title: "datamap" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::datamap" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/datamap/mod.rs" + visibility: "public" +--- +# `datamap` + +## Source + +[`src/datamap/mod.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/datamap/mod.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/agents/datamap/index__2.mdx b/fern/products/sdk-reference/rust/agents/datamap/index__2.mdx new file mode 100644 index 0000000000..b9a43f8f5b --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/datamap/index__2.mdx @@ -0,0 +1,653 @@ +--- +slug: "/reference/rust/agents/datamap/index__2" +title: "datamap" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::datamap::datamap" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/datamap/datamap.rs" + visibility: "public" +--- +# `datamap` + +Fluent builder for DataMap-based SWAIG function definitions. + +A DataMap tool defines its behaviour declaratively (expressions, webhooks) +instead of with a code handler. + +**Decorators:** `@must_use` + +## Signature + +```rust +struct DataMap { /* fields */ } +``` + +## Inheritance + +**Implements:** `Debug`, `Clone` + +## Methods + +### body + +Set body on the last webhook. + +#### Signature + +```rust +fn body(&mut self, data: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/datamap/datamap.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/datamap/datamap.rs) + +Line 173. + +*** + +### clone + +#### Signature + +```rust +fn clone(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/datamap/datamap.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/datamap/datamap.rs) + +Line 8. + +*** + +### create\_expression\_tool + +Build a complete SWAIG function definition with expressions only. + +#### Signature + +```rust +fn create_expression_tool( + name: &str, + purpose: &str, + parameters: ?, + expressions: ? +) -> ? +``` + +#### Parameters + + + + + + + + + +#### Returns + +`?` + +#### Source + +[`src/datamap/datamap.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/datamap/datamap.rs) + +Line 308. + +*** + +### create\_simple\_api\_tool + +Build a complete SWAIG function definition with a single webhook. + +#### Signature + +```rust +fn create_simple_api_tool( + name: &str, + purpose: &str, + parameters: ?, + method: &str, + url: &str, + output: ?, + headers: ? +) -> ? +``` + +#### Parameters + + + + + + + + + + + + + + + +#### Returns + +`?` + +#### Source + +[`src/datamap/datamap.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/datamap/datamap.rs) + +Line 277. + +*** + +### description + +Alias for \[`Self::purpose`]. Sets the LLM-facing tool +description. This string is read by the model to decide WHEN +to call this tool. See \[`Self::purpose`] for bad-vs-good +examples. + +#### Signature + +```rust +fn description(&mut self, desc: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/datamap/datamap.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/datamap/datamap.rs) + +Line 68. + +*** + +### error\_keys + +Set error\_keys on the last webhook. + +#### Signature + +```rust +fn error_keys(&mut self, keys: ?<&str>) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/datamap/datamap.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/datamap/datamap.rs) + +Line 212. + +*** + +### expression + +Add an expression rule. + +#### Signature + +```rust +fn expression( + &mut self, + test_value: &str, + pattern: &str, + output: ?, + nomatch_output: ? +) -> &mut Self +``` + +#### Parameters + + + + + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/datamap/datamap.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/datamap/datamap.rs) + +Line 114. + +*** + +### fallback\_output + +Set global fallback output. + +#### Signature + +```rust +fn fallback_output(&mut self, result: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/datamap/datamap.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/datamap/datamap.rs) + +Line 206. + +*** + +### fmt + +#### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/datamap/datamap.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/datamap/datamap.rs) + +Line 8. + +*** + +### for\_each + +Set foreach on the last webhook. + +#### Signature + +```rust +fn for_each(&mut self, config: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/datamap/datamap.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/datamap/datamap.rs) + +Line 189. + +*** + +### global\_error\_keys + +Set global error\_keys. + +#### Signature + +```rust +fn global_error_keys(&mut self, keys: ?<&str>) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/datamap/datamap.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/datamap/datamap.rs) + +Line 220. + +*** + +### new + +#### Signature + +```rust +fn new(function_name: &str) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/datamap/datamap.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/datamap/datamap.rs) + +Line 26. + +*** + +### output + +Set output on the last webhook. + +#### Signature + +```rust +fn output(&mut self, result: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/datamap/datamap.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/datamap/datamap.rs) + +Line 197. + +*** + +### parameter + +Add a parameter definition — the `description` is **LLM-FACING**. + +Each parameter description is rendered into the OpenAI tool +schema under `parameters.properties..description` and +sent to the model. The model uses it to decide HOW to fill in +the argument from user speech. It is prompt engineering, not +developer FYI. + +### Bad vs good + +```text +BAD : .parameter("city", "string", "the city", ...) +GOOD: .parameter("city", "string", + "The name of the city to get weather for, e.g. " + "'San Francisco'. Ask the user if they did not " + "provide one. Include the state or country if the " + "city name is ambiguous.", ...) +``` + +#### Signature + +```rust +fn parameter( + &mut self, + name: &str, + param_type: &str, + description: &str, + required: bool, + enum_values: ?<&str> +) -> &mut Self +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`&mut Self` + +#### Examples + +```rust +BAD : .parameter("city", "string", "the city", ...) +GOOD: .parameter("city", "string", + "The name of the city to get weather for, e.g. " + "'San Francisco'. Ask the user if they did not " + "provide one. Include the state or country if the " + "city name is ambiguous.", ...) +``` + +#### Source + +[`src/datamap/datamap.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/datamap/datamap.rs) + +Line 90. + +*** + +### params + +Set params on the last webhook. + +#### Signature + +```rust +fn params(&mut self, data: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/datamap/datamap.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/datamap/datamap.rs) + +Line 181. + +*** + +### purpose + +Set the LLM-facing tool description (the "purpose"). **Prompt +engineering, not developer documentation.** + +The description string is rendered into the OpenAI tool schema +`description` field on every LLM turn. The model reads it to +decide WHEN to call this tool. A vague `purpose()` is the #1 +cause of "the model has the right tool but doesn't call it" +failures with data-map tools. + +### Bad vs good + +```text +BAD : .purpose("weather api") +GOOD: .purpose("Get the current weather conditions and forecast " + + "for a specific city. Use this whenever the user " + + "asks about weather, temperature, rain, or similar " + + "conditions in a named location.") +``` + +#### Signature + +```rust +fn purpose(&mut self, desc: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Examples + +```rust +BAD : .purpose("weather api") +GOOD: .purpose("Get the current weather conditions and forecast " + + "for a specific city. Use this whenever the user " + + "asks about weather, temperature, rain, or similar " + + "conditions in a named location.") +``` + +#### Source + +[`src/datamap/datamap.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/datamap/datamap.rs) + +Line 59. + +*** + +### to\_swaig\_function + +Serialise to a SWAIG function definition. + +#### Signature + +```rust +fn to_swaig_function(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/datamap/datamap.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/datamap/datamap.rs) + +Line 228. + +*** + +### webhook + +Add a webhook definition. + +#### Signature + +```rust +fn webhook( + &mut self, + method: &str, + url: &str, + headers: ?, + form_param: &str, + input_args_as_params: bool, + require_args: ?<&str> +) -> &mut Self +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/datamap/datamap.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/datamap/datamap.rs) + +Line 133. + +*** + +### webhook\_expressions + +Set expressions on the last webhook. + +#### Signature + +```rust +fn webhook_expressions(&mut self, expressions: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/datamap/datamap.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/datamap/datamap.rs) + +Line 165. + +## Source + +[`src/datamap/datamap.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/datamap/datamap.rs) + +Line 10. diff --git a/fern/products/sdk-reference/rust/agents/index.mdx b/fern/products/sdk-reference/rust/agents/index.mdx new file mode 100644 index 0000000000..498f727f97 --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/index.mdx @@ -0,0 +1,50 @@ +--- +slug: "/reference/rust/agents" +title: "agents" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "agents" +--- +# `agents` + +## Classes + + + + Fluent builder for DataMap-based SWAIG function definitions. + + + +## Modules + + + + + + + + + + Prompt Object Model (POM) + + + + `PromptObjectModel` — root container for a POM document. + + + + + + + + + + + + + + diff --git a/fern/products/sdk-reference/rust/agents/pom/index.mdx b/fern/products/sdk-reference/rust/agents/pom/index.mdx new file mode 100644 index 0000000000..aaa3ee1604 --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/pom/index.mdx @@ -0,0 +1,49 @@ +--- +slug: "/reference/rust/agents/pom" +title: "pom" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::pom" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/pom/mod.rs" + visibility: "public" +--- +# `pom` + +Prompt Object Model (POM) + +A typed tree of prompt sections that supports markdown / XML / JSON / +YAML rendering. Direct port of `signalwire.pom.pom` from +signalwire-python. + +The two public types are \[`PromptObjectModel`] (the root container) +and \[`Section`] (one node in the tree). Build a model with +`add_section` / `add_subsection`, then render via `render_markdown`, +`render_xml`, `to_json`, or `to_yaml`. All renderers match Python +byte-for-byte — the cross-port parity contract lives in +`signalwire-python/tests/unit/pom/test_pom_render_parity.py`. + +## Classes + + + + One node in a Prompt Object Model tree. + + + +## Modules + + + + + +## Source + +[`src/pom/mod.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/mod.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/agents/pom/index__2.mdx b/fern/products/sdk-reference/rust/agents/pom/index__2.mdx new file mode 100644 index 0000000000..cd74aa7e78 --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/pom/index__2.mdx @@ -0,0 +1,36 @@ +--- +slug: "/reference/rust/agents/pom/index__2" +title: "pom" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::pom::pom" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs" + visibility: "public" +--- +# `pom` + +`PromptObjectModel` — root container for a POM document. + +Direct port of `signalwire.pom.pom.PromptObjectModel` +(signalwire-python/signalwire/signalwire/pom/pom.py:234-540). + +Owns a `Vec
` (the top-level sections) and exposes +markdown / XML / JSON / YAML rendering plus structural helpers +(`add_section`, `find_section`, `add_pom_as_subsection`). + +All renderers match Python byte-for-byte — the cross-port +parity contract is asserted in +`signalwire-python/tests/unit/pom/test_pom_render_parity.py` and +mirrored in this crate's inline tests. + +## Source + +[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/agents/pom/pom/index.mdx b/fern/products/sdk-reference/rust/agents/pom/pom/index.mdx new file mode 100644 index 0000000000..3a323b5aeb --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/pom/pom/index.mdx @@ -0,0 +1,22 @@ +--- +slug: "/reference/rust/agents/pom/pom" +title: "pom" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "agents.pom.pom" + parent: "signalwire::pom" + module: "agents.pom" +--- +# `pom` + +## Classes + + + + Root container for a Prompt Object Model document. + + diff --git a/fern/products/sdk-reference/rust/agents/pom/pom/prompt-object-model/index.mdx b/fern/products/sdk-reference/rust/agents/pom/pom/prompt-object-model/index.mdx new file mode 100644 index 0000000000..fc4493b4a2 --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/pom/pom/prompt-object-model/index.mdx @@ -0,0 +1,547 @@ +--- +slug: "/reference/rust/agents/pom/pom/prompt-object-model" +title: "PromptObjectModel" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::pom::pom::PromptObjectModel" + parent: "agents.pom.pom" + module: "agents.pom.pom" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs" + visibility: "public" +--- +# `PromptObjectModel` + +Root container for a Prompt Object Model document. + +Mirrors Python's `signalwire.pom.pom.PromptObjectModel`. Construct +with \[`PromptObjectModel::new`], populate with [`add_section`], +then render via [`render_markdown`], [`render_xml`], [`to_json`], +or [`to_yaml`]. + +[`add_section`]: PromptObjectModel::add_section + +[`render_markdown`]: PromptObjectModel::render_markdown + +[`render_xml`]: PromptObjectModel::render_xml + +[`to_json`]: PromptObjectModel::to_json + +[`to_yaml`]: PromptObjectModel::to_yaml + +**Decorators:** `@must_use` + +## Signature + +```rust +struct PromptObjectModel { /* fields */ } +``` + +## Inheritance + +**Implements:** `Debug`, `Clone`, `Default`, `PartialEq`, `Eq` + +## Properties + + + Top-level sections, in insertion order. Only the _first_ entry may have `title = None`; all others must carry a title (Python raises `ValueError` otherwise — see `add_section`). + + +## Methods + +### add\_pom\_as\_subsection + +Append every top-level section of `pom_to_add` as a +subsection of the section identified by `target_title`. + +Mirrors Python's `add_pom_as_subsection(target, pom_to_add)` +where `target` is a section title. Returns `Err` when no +section with the given title exists. + +#### Signature + +```rust +fn add_pom_as_subsection( + &mut self, + target_title: &str, + pom_to_add: &? +) -> ?<(), ?> +``` + +#### Parameters + + + + + +#### Returns + +`?<(), ?>` + +#### Source + +[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) + +Line 252. + +*** + +### add\_section + +Append a top-level section with the given title and body. + +Mirrors Python's `PromptObjectModel.add_section(title, body=...)`. +Only the _first_ section may pass `title = None`; subsequent +`None` titles return `Err`. + +Returns a mutable reference to the new section so callers +can keep configuring it (Python returns the `Section` object +— Rust's borrow checker makes a `&mut` reference the +equivalent shape). + +#### Signature + +```rust +fn add_section(&mut self, title: ?) -> ?<&mut ?, ?> +``` + +#### Parameters + + + +#### Returns + +`?<&mut ?, ?>` + +#### Source + +[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) + +Line 97. + +*** + +### add\_section\_with + +Append a top-level section with title + body in one call. +Convenience wrapper that mirrors Python's keyword-style +`add_section(title=..., body=...)`. + +#### Signature + +```rust +fn add_section_with: ?>( + &mut self, + title: ?, + body: impl ? +) -> ?<&mut ?, ?> +``` + +#### Type Parameters + + + +#### Parameters + + + + + +#### Returns + +`?<&mut ?, ?>` + +#### Source + +[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) + +Line 108. + +*** + +### clone + +#### Signature + +```rust +fn clone(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) + +Line 31. + +*** + +### default + +#### Signature + +```rust +fn default() -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) + +Line 31. + +*** + +### eq + +#### Signature + +```rust +fn eq(&self, other: &?) -> bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) + +Line 31. + +*** + +### find\_section + +Find the first section (recursively, depth-first) with the +given title. Returns `None` when no match. Mirrors Python's +`find_section`. + +#### Signature + +```rust +fn find_section(&self, title: &str) -> ?<&?> +``` + +#### Parameters + + + +#### Returns + +`?<&?>` + +#### Source + +[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) + +Line 121. + +*** + +### find\_section\_mut + +Mutable variant of \[`find_section`]. + +[`find_section`]: PromptObjectModel::find_section + +#### Signature + +```rust +fn find_section_mut(&mut self, title: &str) -> ?<&mut ?> +``` + +#### Parameters + + + +#### Returns + +`?<&mut ?>` + +#### Source + +[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) + +Line 139. + +*** + +### fmt + +#### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) + +Line 31. + +*** + +### from\_json + +Parse a JSON string into a \[`PromptObjectModel`]. Mirrors +Python's `PromptObjectModel.from_json(json_data)`. + +Returns `Err(String)` with a descriptive message on parse +errors, matching Python's `ValueError`. + +#### Signature + +```rust +fn from_json(json_str: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) + +Line 55. + +*** + +### from\_value + +Build a model from a parsed `serde_json::Value`. Used by +both \[`from_json`] and \[`from_yaml`]. + +[`from_json`]: PromptObjectModel::from_json + +[`from_yaml`]: PromptObjectModel::from_yaml + +#### Signature + +```rust +fn from_value(value: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) + +Line 74. + +*** + +### from\_yaml + +Parse a YAML string into a \[`PromptObjectModel`]. Mirrors +Python's `PromptObjectModel.from_yaml(yaml_data)`. + +#### Signature + +```rust +fn from_yaml(yaml_str: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) + +Line 63. + +*** + +### new + +Construct an empty model. Mirrors Python's +`PromptObjectModel()` constructor. + +#### Signature + +```rust +fn new() -> Self +``` + +#### Returns + +`Self` + +#### Source + +[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) + +Line 44. + +*** + +### render\_markdown + +Render the entire model as markdown. Matches Python's +`render_markdown` byte-for-byte. + +#### Signature + +```rust +fn render_markdown(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) + +Line 195. + +*** + +### render\_xml + +Render the entire model as XML. Matches Python's +`render_xml` byte-for-byte. + +#### Signature + +```rust +fn render_xml(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) + +Line 219. + +*** + +### to\_json + +Render the model as a JSON string (indent=2). Matches +Python's `to_json` byte-for-byte: `json.dumps([...], indent=2)`. + +#### Signature + +```rust +fn to_json(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) + +Line 164. + +*** + +### to\_value + +Convert the model to a `serde_json::Value` (a JSON array of +section dicts). Mirrors Python's `to_dict`. The Rust name +follows serde idiom (`to_value`) but the cross-port surface +audit treats `to_value` ≡ `to_dict`. + +#### Signature + +```rust +fn to_value(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) + +Line 158. + +*** + +### to\_yaml + +Render the model as a YAML string. Matches PyYAML's output +shape (`default_flow_style=False, sort_keys=False`). + +We hand-emit YAML rather than rely on `serde_norway::to_string` +because the latter (a) sorts keys alphabetically when fed a +`serde_json::Value` (which uses BTreeMap internally) and +(b) doesn't expose a switch to disable that. The POM +document shape is fully constrained — list of dicts with +known string/list-of-string/list-of-dict values — so a +targeted emitter is straightforward and guarantees parity. + +#### Signature + +```rust +fn to_yaml(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) + +Line 181. + +## Source + +[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) + +Line 33. diff --git a/fern/products/sdk-reference/rust/agents/pom/section/index.mdx b/fern/products/sdk-reference/rust/agents/pom/section/index.mdx new file mode 100644 index 0000000000..ad5535dc14 --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/pom/section/index.mdx @@ -0,0 +1,417 @@ +--- +slug: "/reference/rust/agents/pom/section" +title: "section" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::pom::section" + parent: "signalwire::pom" + module: "agents.pom" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/pom/section.rs" + visibility: "public" +--- +# `section` + +One node in a Prompt Object Model tree. + +Mirrors Python's `signalwire.pom.pom.Section`. Fields are owned +strings/vecs (Rust idiom — the model is a value-type document). + +## Signature + +```rust +struct Section { /* fields */ } +``` + +## Inheritance + +**Implements:** `Debug`, `Clone`, `PartialEq`, `Eq`, `Default` + +## Properties + + + Paragraph of body text. Empty string when not set (matches Python's `body=''` default). + + + + Bullet items. Rendered as `- text` (or `1. text` when `numbered_bullets` is `true`). + + + + Whether this section participates in numbered numbering. `None` means "unspecified" (Python's `None` default). `Some(true)` enables numbering on this and all sibling sections at the same level (unless explicitly set to `Some(false)`). + + + + Whether bullets in _this_ section render as `1. x` (true) or `- x` (false). Default `false` matches Python. + + + + Nested subsections. Renderer walks this tree depth-first. + + + + The section title. `None` is valid only for the _first_ top-level section in a \[`crate::pom::PromptObjectModel`]; every other section must carry a title. + + +## Methods + +### add\_body + +Replace the body text. Mirrors Python's `Section.add_body` — +the docstring explicitly says "Add OR REPLACE the body". + +#### Signature + +```rust +fn add_body: ?>(&mut self, body: impl ?) -> &mut Self +``` + +#### Type Parameters + + + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/pom/section.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/section.rs) + +Line 73. + +*** + +### add\_bullets + +Append additional bullets. Mirrors Python's +`Section.add_bullets` (`self.bullets.extend(bullets)`). + +#### Signature + +```rust +fn add_bullets(&mut self, bullets: I) -> &mut Self where I: ?, S: ? +``` + +#### Type Parameters + + + + + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/pom/section.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/section.rs) + +Line 80. + +*** + +### add\_subsection + +Add a subsection. Mirrors Python's `Section.add_subsection` +— the title is required (Python raises `ValueError` when +`title is None`); we encode the same constraint by accepting +`String` (not `Option`). + +Returns a mutable reference to the freshly-appended +subsection so the caller can keep configuring it. (Python +returns the `Section` object directly; Rust's borrow checker +makes a `&mut` reference the equivalent shape.) + +#### Signature + +```rust +fn add_subsection: ?>( + &mut self, + title: impl ? +) -> &mut ? +``` + +#### Type Parameters + + + +#### Parameters + + + +#### Returns + +`&mut ?` + +#### Source + +[`src/pom/section.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/section.rs) + +Line 98. + +*** + +### add\_subsection\_full + +Add a fully-specified subsection. Convenience that mirrors +Python's keyword-argument form +`add_subsection(title=..., body=..., bullets=..., numbered=..., numberedBullets=...)`. + +#### Signature + +```rust +fn add_subsection_full: ?, impl Into: ?>( + &mut self, + title: impl ?, + body: impl ?, + bullets: ?, + numbered: ?, + numbered_bullets: bool +) -> &mut ? +``` + +#### Type Parameters + + + + + +#### Parameters + + + + + + + + + + + +#### Returns + +`&mut ?` + +#### Source + +[`src/pom/section.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/section.rs) + +Line 106. + +*** + +### clone + +#### Signature + +```rust +fn clone(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/pom/section.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/section.rs) + +Line 18. + +*** + +### default + +#### Signature + +```rust +fn default() -> Self +``` + +#### Returns + +`Self` + +#### Source + +[`src/pom/section.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/section.rs) + +Line 44. + +*** + +### eq + +#### Signature + +```rust +fn eq(&self, other: &?) -> bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/pom/section.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/section.rs) + +Line 18. + +*** + +### fmt + +#### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/pom/section.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/section.rs) + +Line 18. + +*** + +### new + +Construct a section with the given title. + +Use the field-setter methods (`add_body`, `add_bullets`, +`add_subsection`) or struct-literal construction for further +configuration. Mirrors Python's `Section(title=..., ...)` +keyword constructor — Rust's idiom uses a builder-style call +chain via `add_*`. + +#### Signature + +```rust +fn new(title: ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/pom/section.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/section.rs) + +Line 64. + +*** + +### render\_markdown + +Render this section (and all nested subsections) as +markdown. Output matches Python's +`Section.render_markdown` byte-for-byte — see +`signalwire-python/tests/unit/pom/test_pom_render_parity.py` +for the cross-port contract. + +#### Signature + +```rust +fn render_markdown(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/pom/section.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/section.rs) + +Line 177. + +*** + +### render\_xml + +Render this section as XML. Matches Python's +`Section.render_xml` byte-for-byte. + +#### Signature + +```rust +fn render_xml(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/pom/section.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/section.rs) + +Line 239. + +*** + +### to\_value + +Convert this section to a `serde_json::Value` matching +Python's `Section.to_dict` exactly. Key order is fixed +(`title`, `body`, `bullets`, `subsections`, `numbered`, +`numberedBullets`) so JSON/YAML serialisation is +byte-for-byte deterministic across ports. + +The Python name is `to_dict`; in Rust the natural name for +a `serde_json::Value` is `to_value`. The cross-port surface +audit treats the two as equivalent (see +`enumerate_surface.py` METHOD\_RENAMES). + +#### Signature + +```rust +fn to_value(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/pom/section.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/section.rs) + +Line 136. + +## Source + +[`src/pom/section.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/section.rs) + +Line 19. diff --git a/fern/products/sdk-reference/rust/agents/prefabs/bedrock/bedrock-agent/index.mdx b/fern/products/sdk-reference/rust/agents/prefabs/bedrock/bedrock-agent/index.mdx new file mode 100644 index 0000000000..26430699dc --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/prefabs/bedrock/bedrock-agent/index.mdx @@ -0,0 +1,504 @@ +--- +slug: "/reference/rust/agents/prefabs/bedrock/bedrock-agent" +title: "BedrockAgent" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::prefabs::bedrock::BedrockAgent" + parent: "signalwire::prefabs::bedrock" + module: "agents.prefabs.bedrock" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs" + visibility: "public" +--- +# `BedrockAgent` + +Voice-to-voice agent backed by Amazon Bedrock. + +Wraps an \[`AgentBase`]: every standard agent operation +(`set_prompt_text`, `prompt_add_section`, `define_tool`, …) is +available through `Deref`/`DerefMut`. The single divergence is at +SWML rendering time: \[`BedrockAgent::render_swml`] takes the SWML +produced by `AgentBase::render_swml` and rewrites the `ai` verb +into an `amazon_bedrock` verb that carries Bedrock-specific +inference parameters (voice id, temperature, top-p) inside the +prompt object. + +## Signature + +```rust +struct BedrockAgent { /* fields */ } +``` + +## Inheritance + +**Implements:** `Deref`, `DerefMut`, `Debug` + +## Methods + +### agent + +Borrow the underlying `AgentBase` (read-only). + +#### Signature + +```rust +fn agent(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) + +Line 309. + +*** + +### agent\_mut + +Borrow the underlying `AgentBase` (mutable). Most consumers use +`Deref`/`DerefMut` for chaining; this is occasionally useful +when an explicit handle is needed. + +#### Signature + +```rust +fn agent_mut(&mut self) -> &mut ? +``` + +#### Returns + +`&mut ?` + +#### Source + +[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) + +Line 316. + +*** + +### deref + +#### Signature + +```rust +fn deref(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) + +Line 343. + +*** + +### deref\_mut + +#### Signature + +```rust +fn deref_mut(&mut self) -> &mut ? +``` + +#### Returns + +`&mut ?` + +#### Source + +[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) + +Line 349. + +*** + +### fmt + +#### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) + +Line 355. + +*** + +### max\_tokens + +Current max-tokens cap. + +#### Signature + +```rust +fn max_tokens(&self) -> u32 +``` + +#### Returns + +`u32` + +#### Source + +[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) + +Line 336. + +*** + +### new + +Construct a new BedrockAgent. + +Mirrors Python's +`BedrockAgent(name=..., route=..., system_prompt=..., voice_id=..., +temperature=..., top_p=..., max_tokens=..., **kwargs)`. + +#### Signature + +```rust +fn new(options: ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) + +Line 99. + +*** + +### render\_swml + +Render SWML, transforming the `ai` verb into an +`amazon_bedrock` verb that carries the Bedrock voice and +inference parameters. Mirrors Python's `_render_swml`. + +#### Signature + +```rust +fn render_swml(&self, headers: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) + +Line 202. + +*** + +### repr + +String representation matching Python's `__repr__`. + +#### Signature + +```rust +fn repr(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) + +Line 299. + +*** + +### set\_inference\_params + +Update Bedrock inference parameters. Pass `None` to keep an +existing value untouched. Mirrors the Python signature. + +#### Signature + +```rust +fn set_inference_params( + &mut self, + temperature: ?, + top_p: ?, + max_tokens: ? +) -> &mut Self +``` + +#### Parameters + + + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) + +Line 141. + +*** + +### set\_llm\_model + +Set LLM model — not applicable for Bedrock. Logs a warning and +is a no-op (Bedrock uses a fixed voice-to-voice model). Matches +Python's documented behavior. + +#### Signature + +```rust +fn set_llm_model(&mut self, model: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) + +Line 166. + +*** + +### set\_llm\_temperature + +Set LLM temperature — redirects to `set_inference_params` for +Bedrock. Matches Python's documented behavior. + +#### Signature + +```rust +fn set_llm_temperature(&mut self, temperature: f64) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) + +Line 176. + +*** + +### set\_post\_prompt\_llm\_params + +Set post-prompt LLM params — not applicable for Bedrock. Logs a +warning and is a no-op (post-prompt summarisation runs on a +platform-side model). Matches Python's documented behavior. + +#### Signature + +```rust +fn set_post_prompt_llm_params(&mut self, _params: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) + +Line 183. + +*** + +### set\_prompt\_llm\_params + +Set prompt LLM params — Bedrock callers should use +`set_inference_params` instead. Logs a warning and is a no-op. +Matches Python's documented behavior. + +#### Signature + +```rust +fn set_prompt_llm_params(&mut self, _params: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) + +Line 193. + +*** + +### set\_voice + +Set the Bedrock voice id (e.g. `"matthew"`, `"joanna"`). + +#### Signature + +```rust +fn set_voice(&mut self, voice_id: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) + +Line 133. + +*** + +### temperature + +Current generation temperature. + +#### Signature + +```rust +fn temperature(&self) -> f64 +``` + +#### Returns + +`f64` + +#### Source + +[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) + +Line 326. + +*** + +### top\_p + +Current nucleus sampling parameter. + +#### Signature + +```rust +fn top_p(&self) -> f64 +``` + +#### Returns + +`f64` + +#### Source + +[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) + +Line 331. + +*** + +### voice\_id + +Current voice id. + +#### Signature + +```rust +fn voice_id(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) + +Line 321. + +## Type Aliases + +### Target + +#### Source + +[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) + +Line 342. + +## Source + +[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) + +Line 28. diff --git a/fern/products/sdk-reference/rust/agents/prefabs/bedrock/bedrock-options/index.mdx b/fern/products/sdk-reference/rust/agents/prefabs/bedrock/bedrock-options/index.mdx new file mode 100644 index 0000000000..d21c71ae7e --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/prefabs/bedrock/bedrock-options/index.mdx @@ -0,0 +1,129 @@ +--- +slug: "/reference/rust/agents/prefabs/bedrock/bedrock-options" +title: "BedrockOptions" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::prefabs::bedrock::BedrockOptions" + parent: "signalwire::prefabs::bedrock" + module: "agents.prefabs.bedrock" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs" + visibility: "public" +--- +# `BedrockOptions` + +Construction options for \[`BedrockAgent`]. Mirrors the keyword +arguments of Python's `BedrockAgent.__init__`. + +**Decorators:** `@must_use` + +## Signature + +```rust +struct BedrockOptions { /* fields */ } +``` + +## Inheritance + +**Implements:** `Default` + +## Properties + + + Optional basic-auth password override. + + + + Optional basic-auth user override. + + + + Optional bind host override. + + + + Max generation tokens (default `1024`). + + + + Agent name (default `"bedrock_agent"`). + + + + Optional bind port override. + + + + HTTP route (default `"/bedrock"`). + + + + Optional system prompt to register with `set_prompt_text`. + + + + Generation temperature 0..1 (default `0.7`). + + + + Nucleus sampling top-p 0..1 (default `0.9`). + + + + Bedrock voice id (default `"matthew"`). + + +## Methods + +### default + +#### Signature + +```rust +fn default() -> Self +``` + +#### Returns + +`Self` + +#### Source + +[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) + +Line 66. + +*** + +### with\_name + +Convenience: create with a name (other fields keep defaults). + +#### Signature + +```rust +fn with_name(name: &str) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) + +Line 85. + +## Source + +[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) + +Line 40. diff --git a/fern/products/sdk-reference/rust/agents/prefabs/bedrock/index.mdx b/fern/products/sdk-reference/rust/agents/prefabs/bedrock/index.mdx new file mode 100644 index 0000000000..ae2c2da9e8 --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/prefabs/bedrock/index.mdx @@ -0,0 +1,44 @@ +--- +slug: "/reference/rust/agents/prefabs/bedrock" +title: "bedrock" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::prefabs::bedrock" + parent: "signalwire::prefabs" + module: "agents.prefabs" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs" + visibility: "public" +--- +# `bedrock` + +Amazon Bedrock voice-to-voice agent. + +`BedrockAgent` extends \[`AgentBase`] (via composition + `Deref`) so it +shares all of AgentBase's features (prompt building, skills, tools, +post-prompt, dynamic configuration) but emits an `amazon_bedrock` +verb in the rendered SWML document instead of the standard `ai` +verb. + +Mirrors the Python `signalwire.agents.bedrock.BedrockAgent`. + +## Classes + + + + Voice-to-voice agent backed by Amazon Bedrock. + + + + Construction options for \[`BedrockAgent`]. Mirrors the keyword arguments of Python's `BedrockAgent.__init__`. + + + +## Source + +[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/agents/prefabs/concierge/concierge-agent/index.mdx b/fern/products/sdk-reference/rust/agents/prefabs/concierge/concierge-agent/index.mdx new file mode 100644 index 0000000000..0a26202ded --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/prefabs/concierge/concierge-agent/index.mdx @@ -0,0 +1,161 @@ +--- +slug: "/reference/rust/agents/prefabs/concierge/concierge-agent" +title: "ConciergeAgent" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::prefabs::concierge::ConciergeAgent" + parent: "signalwire::prefabs::concierge" + module: "agents.prefabs.concierge" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/concierge.rs" + visibility: "public" +--- +# `ConciergeAgent` + +A pre-built concierge agent for venues — answers questions about services, +amenities, hours, and provides directions. + +## Signature + +```rust +struct ConciergeAgent { /* fields */ } +``` + +## Methods + +### agent + +#### Signature + +```rust +fn agent(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/prefabs/concierge.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/concierge.rs) + +Line 227. + +*** + +### agent\_mut + +#### Signature + +```rust +fn agent_mut(&mut self) -> &mut ? +``` + +#### Returns + +`&mut ?` + +#### Source + +[`src/prefabs/concierge.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/concierge.rs) + +Line 231. + +*** + +### amenities + +#### Signature + +```rust +fn amenities(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/prefabs/concierge.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/concierge.rs) + +Line 243. + +*** + +### new + +Create a new ConciergeAgent. + +#### Signature + +```rust +fn new(name: &str, venue_info: &?, route: ?<&str>) -> Self +``` + +#### Parameters + + + + + + + +#### Returns + +`Self` + +#### Source + +[`src/prefabs/concierge.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/concierge.rs) + +Line 25. + +*** + +### services + +#### Signature + +```rust +fn services(&self) -> &[?] +``` + +#### Returns + +`&[?]` + +#### Source + +[`src/prefabs/concierge.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/concierge.rs) + +Line 239. + +*** + +### venue\_name + +#### Signature + +```rust +fn venue_name(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/prefabs/concierge.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/concierge.rs) + +Line 235. + +## Source + +[`src/prefabs/concierge.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/concierge.rs) + +Line 10. diff --git a/fern/products/sdk-reference/rust/agents/prefabs/concierge/index.mdx b/fern/products/sdk-reference/rust/agents/prefabs/concierge/index.mdx new file mode 100644 index 0000000000..749484cb2e --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/prefabs/concierge/index.mdx @@ -0,0 +1,30 @@ +--- +slug: "/reference/rust/agents/prefabs/concierge" +title: "concierge" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::prefabs::concierge" + parent: "signalwire::prefabs" + module: "agents.prefabs" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/concierge.rs" + visibility: "public" +--- +# `concierge` + +## Classes + + + + A pre-built concierge agent for venues — answers questions about services, amenities, hours, and provides directions. + + + +## Source + +[`src/prefabs/concierge.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/concierge.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/agents/prefabs/faq-bot/faq-bot-agent/index.mdx b/fern/products/sdk-reference/rust/agents/prefabs/faq-bot/faq-bot-agent/index.mdx new file mode 100644 index 0000000000..cc3eab4ee5 --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/prefabs/faq-bot/faq-bot-agent/index.mdx @@ -0,0 +1,150 @@ +--- +slug: "/reference/rust/agents/prefabs/faq-bot/faq-bot-agent" +title: "FAQBotAgent" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::prefabs::faq_bot::FAQBotAgent" + parent: "signalwire::prefabs::faq_bot" + module: "agents.prefabs.faq_bot" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/faq_bot.rs" + visibility: "public" +--- +# `FAQBotAgent` + +A pre-built FAQ bot agent that provides answers from a knowledge base. + +## Signature + +```rust +struct FAQBotAgent { /* fields */ } +``` + +## Methods + +### agent + +#### Signature + +```rust +fn agent(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/prefabs/faq_bot.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/faq_bot.rs) + +Line 172. + +*** + +### agent\_mut + +#### Signature + +```rust +fn agent_mut(&mut self) -> &mut ? +``` + +#### Returns + +`&mut ?` + +#### Source + +[`src/prefabs/faq_bot.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/faq_bot.rs) + +Line 176. + +*** + +### faqs + +#### Signature + +```rust +fn faqs(&self) -> &[?] +``` + +#### Returns + +`&[?]` + +#### Source + +[`src/prefabs/faq_bot.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/faq_bot.rs) + +Line 180. + +*** + +### new + +Create a new FAQBotAgent. + +#### Signature + +```rust +fn new( + name: &str, + faqs: ?, + suggest_related: bool, + persona: ?<&str>, + route: ?<&str> +) -> Self +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`Self` + +#### Source + +[`src/prefabs/faq_bot.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/faq_bot.rs) + +Line 22. + +*** + +### suggest\_related + +#### Signature + +```rust +fn suggest_related(&self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/prefabs/faq_bot.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/faq_bot.rs) + +Line 184. + +## Source + +[`src/prefabs/faq_bot.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/faq_bot.rs) + +Line 7. diff --git a/fern/products/sdk-reference/rust/agents/prefabs/faq-bot/index.mdx b/fern/products/sdk-reference/rust/agents/prefabs/faq-bot/index.mdx new file mode 100644 index 0000000000..d5ef33058e --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/prefabs/faq-bot/index.mdx @@ -0,0 +1,30 @@ +--- +slug: "/reference/rust/agents/prefabs/faq-bot" +title: "faq_bot" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::prefabs::faq_bot" + parent: "signalwire::prefabs" + module: "agents.prefabs" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/faq_bot.rs" + visibility: "public" +--- +# `faq_bot` + +## Classes + + + + A pre-built FAQ bot agent that provides answers from a knowledge base. + + + +## Source + +[`src/prefabs/faq_bot.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/faq_bot.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/agents/prefabs/index.mdx b/fern/products/sdk-reference/rust/agents/prefabs/index.mdx new file mode 100644 index 0000000000..a74646a655 --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/prefabs/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/rust/agents/prefabs" +title: "prefabs" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::prefabs" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/mod.rs" + visibility: "public" +--- +# `prefabs` + +## Modules + + + + Amazon Bedrock voice-to-voice agent. + + + + + + + + + + + + + +## Source + +[`src/prefabs/mod.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/mod.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/agents/prefabs/info-gatherer/index.mdx b/fern/products/sdk-reference/rust/agents/prefabs/info-gatherer/index.mdx new file mode 100644 index 0000000000..9f5495dfc0 --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/prefabs/info-gatherer/index.mdx @@ -0,0 +1,30 @@ +--- +slug: "/reference/rust/agents/prefabs/info-gatherer" +title: "info_gatherer" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::prefabs::info_gatherer" + parent: "signalwire::prefabs" + module: "agents.prefabs" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/info_gatherer.rs" + visibility: "public" +--- +# `info_gatherer` + +## Classes + + + + A pre-built agent that asks a series of questions and collects answers. + + + +## Source + +[`src/prefabs/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/info_gatherer.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/agents/prefabs/info-gatherer/info-gatherer-agent/index.mdx b/fern/products/sdk-reference/rust/agents/prefabs/info-gatherer/info-gatherer-agent/index.mdx new file mode 100644 index 0000000000..5911b39489 --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/prefabs/info-gatherer/info-gatherer-agent/index.mdx @@ -0,0 +1,126 @@ +--- +slug: "/reference/rust/agents/prefabs/info-gatherer/info-gatherer-agent" +title: "InfoGathererAgent" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::prefabs::info_gatherer::InfoGathererAgent" + parent: "signalwire::prefabs::info_gatherer" + module: "agents.prefabs.info_gatherer" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/info_gatherer.rs" + visibility: "public" +--- +# `InfoGathererAgent` + +A pre-built agent that asks a series of questions and collects answers. + +## Signature + +```rust +struct InfoGathererAgent { /* fields */ } +``` + +## Methods + +### agent + +Access the underlying `AgentBase`. + +#### Signature + +```rust +fn agent(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/prefabs/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/info_gatherer.rs) + +Line 96. + +*** + +### agent\_mut + +Access the underlying `AgentBase` mutably. + +#### Signature + +```rust +fn agent_mut(&mut self) -> &mut ? +``` + +#### Returns + +`&mut ?` + +#### Source + +[`src/prefabs/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/info_gatherer.rs) + +Line 101. + +*** + +### new + +Create a new InfoGathererAgent. + +#### Signature + +```rust +fn new(name: &str, questions: ?, route: ?<&str>) -> Self +``` + +#### Parameters + + + + + + + +#### Returns + +`Self` + +#### Source + +[`src/prefabs/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/info_gatherer.rs) + +Line 19. + +*** + +### questions + +Get the configured questions. + +#### Signature + +```rust +fn questions(&self) -> &[?] +``` + +#### Returns + +`&[?]` + +#### Source + +[`src/prefabs/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/info_gatherer.rs) + +Line 106. + +## Source + +[`src/prefabs/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/info_gatherer.rs) + +Line 7. diff --git a/fern/products/sdk-reference/rust/agents/prefabs/receptionist/index.mdx b/fern/products/sdk-reference/rust/agents/prefabs/receptionist/index.mdx new file mode 100644 index 0000000000..d8746a85ce --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/prefabs/receptionist/index.mdx @@ -0,0 +1,30 @@ +--- +slug: "/reference/rust/agents/prefabs/receptionist" +title: "receptionist" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::prefabs::receptionist" + parent: "signalwire::prefabs" + module: "agents.prefabs" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/receptionist.rs" + visibility: "public" +--- +# `receptionist` + +## Classes + + + + A pre-built receptionist agent that routes callers to departments. + + + +## Source + +[`src/prefabs/receptionist.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/receptionist.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/agents/prefabs/receptionist/receptionist-agent/index.mdx b/fern/products/sdk-reference/rust/agents/prefabs/receptionist/receptionist-agent/index.mdx new file mode 100644 index 0000000000..eaa97f1fc4 --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/prefabs/receptionist/receptionist-agent/index.mdx @@ -0,0 +1,142 @@ +--- +slug: "/reference/rust/agents/prefabs/receptionist/receptionist-agent" +title: "ReceptionistAgent" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::prefabs::receptionist::ReceptionistAgent" + parent: "signalwire::prefabs::receptionist" + module: "agents.prefabs.receptionist" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/receptionist.rs" + visibility: "public" +--- +# `ReceptionistAgent` + +A pre-built receptionist agent that routes callers to departments. + +## Signature + +```rust +struct ReceptionistAgent { /* fields */ } +``` + +## Methods + +### agent + +#### Signature + +```rust +fn agent(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/prefabs/receptionist.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/receptionist.rs) + +Line 154. + +*** + +### agent\_mut + +#### Signature + +```rust +fn agent_mut(&mut self) -> &mut ? +``` + +#### Returns + +`&mut ?` + +#### Source + +[`src/prefabs/receptionist.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/receptionist.rs) + +Line 158. + +*** + +### departments + +#### Signature + +```rust +fn departments(&self) -> &[?] +``` + +#### Returns + +`&[?]` + +#### Source + +[`src/prefabs/receptionist.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/receptionist.rs) + +Line 162. + +*** + +### greeting + +#### Signature + +```rust +fn greeting(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/prefabs/receptionist.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/receptionist.rs) + +Line 166. + +*** + +### new + +Create a new ReceptionistAgent. + +#### Signature + +```rust +fn new(name: &str, departments: ?, greeting: ?<&str>, route: ?<&str>) -> Self +``` + +#### Parameters + + + + + + + + + +#### Returns + +`Self` + +#### Source + +[`src/prefabs/receptionist.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/receptionist.rs) + +Line 21. + +## Source + +[`src/prefabs/receptionist.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/receptionist.rs) + +Line 7. diff --git a/fern/products/sdk-reference/rust/agents/prefabs/survey/index.mdx b/fern/products/sdk-reference/rust/agents/prefabs/survey/index.mdx new file mode 100644 index 0000000000..9b8b6bcad4 --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/prefabs/survey/index.mdx @@ -0,0 +1,30 @@ +--- +slug: "/reference/rust/agents/prefabs/survey" +title: "survey" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::prefabs::survey" + parent: "signalwire::prefabs" + module: "agents.prefabs" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/survey.rs" + visibility: "public" +--- +# `survey` + +## Classes + + + + A pre-built agent for conducting surveys with typed question validation. + + + +## Source + +[`src/prefabs/survey.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/survey.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/agents/prefabs/survey/survey-agent/index.mdx b/fern/products/sdk-reference/rust/agents/prefabs/survey/survey-agent/index.mdx new file mode 100644 index 0000000000..824b3cbad8 --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/prefabs/survey/survey-agent/index.mdx @@ -0,0 +1,140 @@ +--- +slug: "/reference/rust/agents/prefabs/survey/survey-agent" +title: "SurveyAgent" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::prefabs::survey::SurveyAgent" + parent: "signalwire::prefabs::survey" + module: "agents.prefabs.survey" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/survey.rs" + visibility: "public" +--- +# `SurveyAgent` + +A pre-built agent for conducting surveys with typed question validation. + +## Signature + +```rust +struct SurveyAgent { /* fields */ } +``` + +## Methods + +### agent + +#### Signature + +```rust +fn agent(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/prefabs/survey.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/survey.rs) + +Line 240. + +*** + +### agent\_mut + +#### Signature + +```rust +fn agent_mut(&mut self) -> &mut ? +``` + +#### Returns + +`&mut ?` + +#### Source + +[`src/prefabs/survey.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/survey.rs) + +Line 244. + +*** + +### new + +Create a new SurveyAgent. + +#### Signature + +```rust +fn new(name: &str, questions: ?, options: ?<&?>) -> Self +``` + +#### Parameters + + + + + + + +#### Returns + +`Self` + +#### Source + +[`src/prefabs/survey.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/survey.rs) + +Line 21. + +*** + +### survey\_name + +#### Signature + +```rust +fn survey_name(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/prefabs/survey.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/survey.rs) + +Line 248. + +*** + +### survey\_questions + +#### Signature + +```rust +fn survey_questions(&self) -> &[?] +``` + +#### Returns + +`&[?]` + +#### Source + +[`src/prefabs/survey.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/survey.rs) + +Line 252. + +## Source + +[`src/prefabs/survey.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/survey.rs) + +Line 7. diff --git a/fern/products/sdk-reference/rust/agents/server/agent-server/agent-server/index.mdx b/fern/products/sdk-reference/rust/agents/server/agent-server/agent-server/index.mdx new file mode 100644 index 0000000000..5d2cafdd32 --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/server/agent-server/agent-server/index.mdx @@ -0,0 +1,507 @@ +--- +slug: "/reference/rust/agents/server/agent-server/agent-server" +title: "AgentServer" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::server::agent_server::AgentServer" + parent: "signalwire::server::agent_server" + module: "agents.server.agent_server" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs" + visibility: "public" +--- +# `AgentServer` + +Multi-agent HTTP server that dispatches requests to registered agents +by longest-prefix route matching. + +## Signature + +```rust +struct AgentServer { /* fields */ } +``` + +## Methods + +### get\_agent + +Get an agent by route. + +#### Signature + +```rust +fn get_agent(&self, route: &str) -> ?<&?> +``` + +#### Parameters + + + +#### Returns + +`?<&?>` + +#### Source + +[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) + +Line 133. + +*** + +### get\_agent\_mut + +Get a mutable reference to an agent by route. + +#### Signature + +```rust +fn get_agent_mut(&mut self, route: &str) -> ?<&mut ?> +``` + +#### Parameters + + + +#### Returns + +`?<&mut ?>` + +#### Source + +[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) + +Line 139. + +*** + +### get\_agents + +Get all registered routes (sorted). + +#### Signature + +```rust +fn get_agents(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) + +Line 126. + +*** + +### handle\_request + +Handle an HTTP request and return `(status, headers, body)`. + +#### Signature + +```rust +fn handle_request( + &self, + method: &str, + path: &str, + headers: &?, + body: &str +) -> (u16, ?, ?) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`(u16, ?, ?)` + +#### Source + +[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) + +Line 309. + +*** + +### host + +#### Signature + +```rust +fn host(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) + +Line 414. + +*** + +### is\_sip\_routing\_enabled + +Check if SIP routing is enabled. + +#### Signature + +```rust +fn is_sip_routing_enabled(&self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) + +Line 163. + +*** + +### new + +#### Signature + +```rust +fn new(host: ?<&str>, port: ?) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) + +Line 65. + +*** + +### port + +#### Signature + +```rust +fn port(&self) -> u16 +``` + +#### Returns + +`u16` + +#### Source + +[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) + +Line 418. + +*** + +### register + +Register an agent at its default route (from the agent's service), +or at an explicit route override. + +**Errors:** + +Returns \[`ServerError::RouteAlreadyRegistered`] if the route is taken. + +#### Signature + +```rust +fn register(&mut self, agent: ?, route: ?<&str>) -> ?<(), ?> +``` + +#### Parameters + + + + + +#### Returns + +`?<(), ?>` + +#### Source + +[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) + +Line 95. + +*** + +### register\_global\_routing\_callback + +Register a routing callback that runs on every request whose +path matches the configured `path`. Returning `Some(route)` from +the callback redirects handling to that registered agent; +returning `None` falls through to normal longest-prefix +dispatch. + +Mirrors Python's +`AgentServer.register_global_routing_callback(callback_fn, path)`. + +In Python the callback signature is +`(request, body) -> Optional[route]`; the Rust signature passes +`(path, headers, parsed_body)` since Rust does not carry a +FastAPI request object. + +#### Signature + +```rust +fn register_global_routing_callback( + &mut self, + callback: ?, + path: &str +) -> &mut Self +``` + +#### Parameters + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) + +Line 238. + +*** + +### register\_sip\_username + +Map a SIP username to a route. + +#### Signature + +```rust +fn register_sip_username(&mut self, username: &str, route: &str) -> &mut Self +``` + +#### Parameters + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) + +Line 155. + +*** + +### run + +Run the HTTP server on the configured host:port, blocking the +current thread until the listener exits. + +Mirrors Python's `AgentServer.run(host, port)`. The optional +`host` and `port` arguments override the values supplied at +construction time (matching the Python contract). + +#### Signature + +```rust +fn run(&self, host: ?<&str>, port: ?) +``` + +#### Parameters + + + + + +#### Source + +[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) + +Line 258. + +*** + +### serve\_static + +Serve static files from a directory under a URL prefix. + +**Errors:** + +Returns \[`ServerError::StaticDir`] if the directory does not exist or is +not a directory. + +#### Signature + +```rust +fn serve_static(&mut self, directory: &str, url_prefix: &str) -> ?<(), ?> +``` + +#### Parameters + + + + + +#### Returns + +`?<(), ?>` + +#### Source + +[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) + +Line 181. + +*** + +### serve\_static\_files + +Serve static files from a directory under a URL prefix. + +This is the named-mirror of Python's +`AgentServer.serve_static_files(directory, route="/")`. Behaves +identically to \[`AgentServer::serve_static`] (which kept the +shorter Rust-idiomatic name) — both are kept so existing code +keeps working and the Python-name parity is preserved for the +surface diff. + +**Errors:** + +Returns \[`ServerError::StaticDir`] if the directory does not exist. + +#### Signature + +```rust +fn serve_static_files(&mut self, directory: &str, route: &str) -> ?<(), ?> +``` + +#### Parameters + + + + + +#### Returns + +`?<(), ?>` + +#### Source + +[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) + +Line 213. + +*** + +### setup\_sip\_routing + +Enable SIP-based routing. + +#### Signature + +```rust +fn setup_sip_routing(&mut self) -> &mut Self +``` + +#### Returns + +`&mut Self` + +#### Source + +[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) + +Line 149. + +*** + +### sip\_username\_mapping + +Get the SIP username mapping. + +#### Signature + +```rust +fn sip_username_mapping(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) + +Line 168. + +*** + +### unregister + +Unregister an agent from a route. + +#### Signature + +```rust +fn unregister(&mut self, route: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) + +Line 119. + +## Source + +[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) + +Line 50. diff --git a/fern/products/sdk-reference/rust/agents/server/agent-server/index.mdx b/fern/products/sdk-reference/rust/agents/server/agent-server/index.mdx new file mode 100644 index 0000000000..e0ade4fbf9 --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/server/agent-server/index.mdx @@ -0,0 +1,58 @@ +--- +slug: "/reference/rust/agents/server/agent-server" +title: "agent_server" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::server::agent_server" + parent: "signalwire::server" + module: "agents.server" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs" + visibility: "public" +--- +# `agent_server` + +## Classes + + + + Multi-agent HTTP server that dispatches requests to registered agents by longest-prefix route matching. + + + +## Type Aliases + +### GlobalRoutingCallback + +Callback signature for global request-time routing decisions. + +The callback receives the parsed request body (or `None` if absent +/ unparseable) and returns: + +- `Some(route)` — redirect handling to that route's agent. +- `None` — fall through to normal route dispatch. + +Mirrors Python's `register_routing_callback` / `register_global_routing_callback` +signature (`Callable[[Request, Dict[str, Any]], Optional[str]]`), +modulo Rust's lack of a FastAPI Request object. + +#### Signature + +```rust +type GlobalRoutingCallback = ? +``` + +#### Source + +[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) + +Line 23. + +## Source + +[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/agents/server/error/index.mdx b/fern/products/sdk-reference/rust/agents/server/error/index.mdx new file mode 100644 index 0000000000..0d452f7ccc --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/server/error/index.mdx @@ -0,0 +1,168 @@ +--- +slug: "/reference/rust/agents/server/error" +title: "error" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::server::error" + parent: "signalwire::server" + module: "agents.server" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/server/error.rs" + visibility: "public" +--- +# `error` + +Typed error for the `AgentServer` surface and +the shared HTTP(S) bind path. + +Like `RelayError`, this replaces the old +`Result<_, String>` returns on the server surface (`register`, +`serve_static`, `serve_static_files`, and the internal `bind_server`) with a +closed, inspectable failure set — matching the REST layer's +`SignalWireRestError` exemplar. + +The data each failure carries lives in the variant (callers `match` rather +than call getters), so the only public surface added is the type plus its +`Display` / \[`std::error::Error`] impls. `#[non_exhaustive]` leaves room to +add new failure modes without a breaking change. + +## Enums + +### ServerError + +A server-configuration or HTTP-bind operation failed. + +#### Signature + +```rust +enum ServerError +``` + +#### Inheritance + +**Implements:** `Debug`, `Clone`, `PartialEq`, `Eq`, `Display`, [Error](/docs/sdk-reference/reference/rust/core/security/webhook-layer/webhook-validate#error) + +#### Variants + + + The HTTP(S) listener failed to bind the address. Carries the address and the underlying cause. + + + + An agent was registered at a route already in use. Carries the route. + + + + A static-file directory could not be served because the path does not exist or is not a directory. Carries the offending path. + + + + HTTPS was requested via `SWML_SSL_*` but the configuration was incomplete or the cert/key files were unreadable. + + +#### Methods + +##### clone + +###### Signature + +```rust +fn clone(&self) -> ? +``` + +###### Returns + +`?` + +###### Source + +[`src/server/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/error.rs) + +Line 18. + +*** + +##### eq + +###### Signature + +```rust +fn eq(&self, other: &?) -> bool +``` + +###### Parameters + + + +###### Returns + +`bool` + +###### Source + +[`src/server/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/error.rs) + +Line 18. + +*** + +##### fmt + +###### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/server/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/error.rs) + +Line 18. + +*** + +##### fmt + +###### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/server/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/error.rs) + +Line 54. + +#### Source + +[`src/server/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/error.rs) + +Line 20. + +## Source + +[`src/server/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/error.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/agents/server/index.mdx b/fern/products/sdk-reference/rust/agents/server/index.mdx new file mode 100644 index 0000000000..db4128038b --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/server/index.mdx @@ -0,0 +1,32 @@ +--- +slug: "/reference/rust/agents/server" +title: "server" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::server" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/server/mod.rs" + visibility: "public" +--- +# `server` + +## Modules + + + + + + Typed error for the `AgentServer` surface and the shared HTTP(S) bind path. + + + +## Source + +[`src/server/mod.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/mod.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/agents/serverless/adapter/index.mdx b/fern/products/sdk-reference/rust/agents/serverless/adapter/index.mdx new file mode 100644 index 0000000000..3e54b8e3ce --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/serverless/adapter/index.mdx @@ -0,0 +1,162 @@ +--- +slug: "/reference/rust/agents/serverless/adapter" +title: "adapter" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::serverless::adapter" + parent: "signalwire::serverless" + module: "agents.serverless" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/serverless/adapter.rs" + visibility: "public" +--- +# `adapter` + +Auto-detect and handle serverless environments (Lambda, Azure, GCF, CGI) +or fall back to the built-in server. + +## Signature + +```rust +struct Adapter; +``` + +## Methods + +### detect + +Detect the current runtime environment. + +#### Signature + +```rust +fn detect() -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/serverless/adapter.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/serverless/adapter.rs) + +Line 52. + +*** + +### handle\_azure + +Handle an Azure Functions invocation. + +#### Signature + +```rust +fn handle_azure(agent: &dyn ?, request: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/serverless/adapter.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/serverless/adapter.rs) + +Line 137. + +*** + +### handle\_lambda + +Handle an AWS Lambda (API Gateway) invocation. + +Extracts method, path, headers, and body from the API Gateway event +format, calls agent.handle\_request(), and returns an API Gateway +compatible response. + +#### Signature + +```rust +fn handle_lambda(agent: &dyn ?, event: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/serverless/adapter.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/serverless/adapter.rs) + +Line 74. + +*** + +### serve\_detect + +Auto-detect the runtime environment and return the environment type. +The caller can then dispatch accordingly. + +#### Signature + +```rust +fn serve_detect() -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/serverless/adapter.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/serverless/adapter.rs) + +Line 202. + +*** + +### status\_text + +Return the standard HTTP status text for a given status code. + +#### Signature + +```rust +fn status_text(code: u16) -> &'static str +``` + +#### Parameters + + + +#### Returns + +`&'static str` + +#### Source + +[`src/serverless/adapter.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/serverless/adapter.rs) + +Line 207. + +## Source + +[`src/serverless/adapter.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/serverless/adapter.rs) + +Line 48. diff --git a/fern/products/sdk-reference/rust/agents/serverless/adapter/index__2.mdx b/fern/products/sdk-reference/rust/agents/serverless/adapter/index__2.mdx new file mode 100644 index 0000000000..d02df65511 --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/serverless/adapter/index__2.mdx @@ -0,0 +1,198 @@ +--- +slug: "/reference/rust/agents/serverless/adapter/index__2" +title: "adapter" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "agents.serverless.adapter" + parent: "signalwire::serverless" + module: "agents.serverless" +--- +# `adapter` + +## Interfaces + +### RequestHandler + +Trait that the agent/service must implement so the adapter can +forward requests to it. + +#### Signature + +```rust +trait RequestHandler +``` + +#### Methods + +##### handle\_request + +Handle an HTTP request, returning (status\_code, headers, body). + +###### Signature + +```rust +fn handle_request( + &self, + method: &str, + path: &str, + headers: &?, + body: &str +) -> (u16, ?, ?) +``` + +###### Parameters + + + + + + + + + +###### Returns + +`(u16, ?, ?)` + +###### Source + +[`src/serverless/adapter.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/serverless/adapter.rs) + +Line 37. + +#### Source + +[`src/serverless/adapter.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/serverless/adapter.rs) + +Line 35. + +## Enums + +### RuntimeEnvironment + +Detected runtime environment. + +`#[non_exhaustive]` because the set of recognised serverless hosts mirrors +what \[`Adapter::detect`] probes for at runtime and is expected to grow +(new FaaS platforms) without that being a breaking change — downstream +`match` arms must include a wildcard. + +#### Signature + +```rust +enum RuntimeEnvironment +``` + +#### Inheritance + +**Implements:** `Debug`, `Clone`, `PartialEq`, `Eq` + +#### Variants + + + + + + + + + + + +#### Methods + +##### as\_str + +###### Signature + +```rust +fn as_str(&self) -> &'static str +``` + +###### Returns + +`&'static str` + +###### Source + +[`src/serverless/adapter.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/serverless/adapter.rs) + +Line 22. + +*** + +##### clone + +###### Signature + +```rust +fn clone(&self) -> ? +``` + +###### Returns + +`?` + +###### Source + +[`src/serverless/adapter.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/serverless/adapter.rs) + +Line 10. + +*** + +##### eq + +###### Signature + +```rust +fn eq(&self, other: &?) -> bool +``` + +###### Parameters + + + +###### Returns + +`bool` + +###### Source + +[`src/serverless/adapter.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/serverless/adapter.rs) + +Line 10. + +*** + +##### fmt + +###### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/serverless/adapter.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/serverless/adapter.rs) + +Line 10. + +#### Source + +[`src/serverless/adapter.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/serverless/adapter.rs) + +Line 13. diff --git a/fern/products/sdk-reference/rust/agents/serverless/index.mdx b/fern/products/sdk-reference/rust/agents/serverless/index.mdx new file mode 100644 index 0000000000..63e120e16b --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/serverless/index.mdx @@ -0,0 +1,36 @@ +--- +slug: "/reference/rust/agents/serverless" +title: "serverless" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::serverless" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/serverless/mod.rs" + visibility: "public" +--- +# `serverless` + +## Classes + + + + Auto-detect and handle serverless environments (Lambda, Azure, GCF, CGI) or fall back to the built-in server. + + + +## Modules + + + + + +## Source + +[`src/serverless/mod.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/serverless/mod.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/agents/skills/builtin/api-ninjas-trivia/api-ninjas-trivia/index.mdx b/fern/products/sdk-reference/rust/agents/skills/builtin/api-ninjas-trivia/api-ninjas-trivia/index.mdx new file mode 100644 index 0000000000..b22dc58ad2 --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/skills/builtin/api-ninjas-trivia/api-ninjas-trivia/index.mdx @@ -0,0 +1,178 @@ +--- +slug: "/reference/rust/agents/skills/builtin/api-ninjas-trivia/api-ninjas-trivia" +title: "ApiNinjasTrivia" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::skills::builtin::api_ninjas_trivia::ApiNinjasTrivia" + parent: "signalwire::skills::builtin::api_ninjas_trivia" + module: "agents.skills.builtin.api_ninjas_trivia" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/api_ninjas_trivia.rs" + visibility: "public" +--- +# `ApiNinjasTrivia` + +Get trivia questions from API Ninjas (DataMap-based). + +## Signature + +```rust +struct ApiNinjasTrivia { /* fields */ } +``` + +## Inheritance + +**Implements:** `SkillBase` + +## Methods + +### description + +#### Signature + +```rust +fn description(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/api_ninjas_trivia.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/api_ninjas_trivia.rs) + +Line 41. + +*** + +### name + +#### Signature + +```rust +fn name(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/api_ninjas_trivia.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/api_ninjas_trivia.rs) + +Line 37. + +*** + +### new + +#### Signature + +```rust +fn new(params: ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/skills/builtin/api_ninjas_trivia.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/api_ninjas_trivia.rs) + +Line 29. + +*** + +### params + +#### Signature + +```rust +fn params(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/skills/builtin/api_ninjas_trivia.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/api_ninjas_trivia.rs) + +Line 49. + +*** + +### register\_tools + +#### Signature + +```rust +fn register_tools(&self, agent: &mut ?) +``` + +#### Parameters + + + +#### Source + +[`src/skills/builtin/api_ninjas_trivia.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/api_ninjas_trivia.rs) + +Line 57. + +*** + +### setup + +#### Signature + +```rust +fn setup(&mut self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/api_ninjas_trivia.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/api_ninjas_trivia.rs) + +Line 53. + +*** + +### supports\_multiple\_instances + +#### Signature + +```rust +fn supports_multiple_instances(&self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/api_ninjas_trivia.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/api_ninjas_trivia.rs) + +Line 45. + +## Source + +[`src/skills/builtin/api_ninjas_trivia.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/api_ninjas_trivia.rs) + +Line 24. diff --git a/fern/products/sdk-reference/rust/agents/skills/builtin/api-ninjas-trivia/index.mdx b/fern/products/sdk-reference/rust/agents/skills/builtin/api-ninjas-trivia/index.mdx new file mode 100644 index 0000000000..c8f683ddb1 --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/skills/builtin/api-ninjas-trivia/index.mdx @@ -0,0 +1,30 @@ +--- +slug: "/reference/rust/agents/skills/builtin/api-ninjas-trivia" +title: "api_ninjas_trivia" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::skills::builtin::api_ninjas_trivia" + parent: "signalwire::skills::builtin" + module: "agents.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/api_ninjas_trivia.rs" + visibility: "public" +--- +# `api_ninjas_trivia` + +## Classes + + + + Get trivia questions from API Ninjas (DataMap-based). + + + +## Source + +[`src/skills/builtin/api_ninjas_trivia.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/api_ninjas_trivia.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/agents/skills/builtin/claude-skills/claude-skills/index.mdx b/fern/products/sdk-reference/rust/agents/skills/builtin/claude-skills/claude-skills/index.mdx new file mode 100644 index 0000000000..c297d4773d --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/skills/builtin/claude-skills/claude-skills/index.mdx @@ -0,0 +1,218 @@ +--- +slug: "/reference/rust/agents/skills/builtin/claude-skills/claude-skills" +title: "ClaudeSkills" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::skills::builtin::claude_skills::ClaudeSkills" + parent: "signalwire::skills::builtin::claude_skills" + module: "agents.skills.builtin.claude_skills" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/claude_skills.rs" + visibility: "public" +--- +# `ClaudeSkills` + +Load Claude SKILL.md files as agent tools (handler-based). + +## Signature + +```rust +struct ClaudeSkills { /* fields */ } +``` + +## Inheritance + +**Implements:** `SkillBase` + +## Methods + +### description + +#### Signature + +```rust +fn description(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/claude_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/claude_skills.rs) + +Line 25. + +*** + +### get\_hints + +#### Signature + +```rust +fn get_hints(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/builtin/claude_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/claude_skills.rs) + +Line 105. + +*** + +### get\_prompt\_sections + +#### Signature + +```rust +fn get_prompt_sections(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/builtin/claude_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/claude_skills.rs) + +Line 109. + +*** + +### name + +#### Signature + +```rust +fn name(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/claude_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/claude_skills.rs) + +Line 21. + +*** + +### new + +#### Signature + +```rust +fn new(params: ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/skills/builtin/claude_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/claude_skills.rs) + +Line 13. + +*** + +### params + +#### Signature + +```rust +fn params(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/skills/builtin/claude_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/claude_skills.rs) + +Line 33. + +*** + +### register\_tools + +#### Signature + +```rust +fn register_tools(&self, agent: &mut ?) +``` + +#### Parameters + + + +#### Source + +[`src/skills/builtin/claude_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/claude_skills.rs) + +Line 41. + +*** + +### setup + +#### Signature + +```rust +fn setup(&mut self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/claude_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/claude_skills.rs) + +Line 37. + +*** + +### supports\_multiple\_instances + +#### Signature + +```rust +fn supports_multiple_instances(&self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/claude_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/claude_skills.rs) + +Line 29. + +## Source + +[`src/skills/builtin/claude_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/claude_skills.rs) + +Line 8. diff --git a/fern/products/sdk-reference/rust/agents/skills/builtin/claude-skills/index.mdx b/fern/products/sdk-reference/rust/agents/skills/builtin/claude-skills/index.mdx new file mode 100644 index 0000000000..70a54a7990 --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/skills/builtin/claude-skills/index.mdx @@ -0,0 +1,30 @@ +--- +slug: "/reference/rust/agents/skills/builtin/claude-skills" +title: "claude_skills" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::skills::builtin::claude_skills" + parent: "signalwire::skills::builtin" + module: "agents.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/claude_skills.rs" + visibility: "public" +--- +# `claude_skills` + +## Classes + + + + Load Claude SKILL.md files as agent tools (handler-based). + + + +## Source + +[`src/skills/builtin/claude_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/claude_skills.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/agents/skills/builtin/custom-skills/custom-skills/index.mdx b/fern/products/sdk-reference/rust/agents/skills/builtin/custom-skills/custom-skills/index.mdx new file mode 100644 index 0000000000..3d77c6a6e0 --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/skills/builtin/custom-skills/custom-skills/index.mdx @@ -0,0 +1,178 @@ +--- +slug: "/reference/rust/agents/skills/builtin/custom-skills/custom-skills" +title: "CustomSkills" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::skills::builtin::custom_skills::CustomSkills" + parent: "signalwire::skills::builtin::custom_skills" + module: "agents.skills.builtin.custom_skills" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/custom_skills.rs" + visibility: "public" +--- +# `CustomSkills` + +Register user-defined custom tools. + +## Signature + +```rust +struct CustomSkills { /* fields */ } +``` + +## Inheritance + +**Implements:** `SkillBase` + +## Methods + +### description + +#### Signature + +```rust +fn description(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/custom_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/custom_skills.rs) + +Line 24. + +*** + +### name + +#### Signature + +```rust +fn name(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/custom_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/custom_skills.rs) + +Line 20. + +*** + +### new + +#### Signature + +```rust +fn new(params: ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/skills/builtin/custom_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/custom_skills.rs) + +Line 12. + +*** + +### params + +#### Signature + +```rust +fn params(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/skills/builtin/custom_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/custom_skills.rs) + +Line 32. + +*** + +### register\_tools + +#### Signature + +```rust +fn register_tools(&self, agent: &mut ?) +``` + +#### Parameters + + + +#### Source + +[`src/skills/builtin/custom_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/custom_skills.rs) + +Line 40. + +*** + +### setup + +#### Signature + +```rust +fn setup(&mut self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/custom_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/custom_skills.rs) + +Line 36. + +*** + +### supports\_multiple\_instances + +#### Signature + +```rust +fn supports_multiple_instances(&self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/custom_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/custom_skills.rs) + +Line 28. + +## Source + +[`src/skills/builtin/custom_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/custom_skills.rs) + +Line 7. diff --git a/fern/products/sdk-reference/rust/agents/skills/builtin/custom-skills/index.mdx b/fern/products/sdk-reference/rust/agents/skills/builtin/custom-skills/index.mdx new file mode 100644 index 0000000000..6058b862f8 --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/skills/builtin/custom-skills/index.mdx @@ -0,0 +1,30 @@ +--- +slug: "/reference/rust/agents/skills/builtin/custom-skills" +title: "custom_skills" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::skills::builtin::custom_skills" + parent: "signalwire::skills::builtin" + module: "agents.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/custom_skills.rs" + visibility: "public" +--- +# `custom_skills` + +## Classes + + + + Register user-defined custom tools. + + + +## Source + +[`src/skills/builtin/custom_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/custom_skills.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/agents/skills/builtin/datasphere-serverless/datasphere-serverless/index.mdx b/fern/products/sdk-reference/rust/agents/skills/builtin/datasphere-serverless/datasphere-serverless/index.mdx new file mode 100644 index 0000000000..3eb6c09780 --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/skills/builtin/datasphere-serverless/datasphere-serverless/index.mdx @@ -0,0 +1,218 @@ +--- +slug: "/reference/rust/agents/skills/builtin/datasphere-serverless/datasphere-serverless" +title: "DatasphereServerless" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::skills::builtin::datasphere_serverless::DatasphereServerless" + parent: "signalwire::skills::builtin::datasphere_serverless" + module: "agents.skills.builtin.datasphere_serverless" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere_serverless.rs" + visibility: "public" +--- +# `DatasphereServerless` + +Search knowledge using SignalWire DataSphere with serverless DataMap execution. + +## Signature + +```rust +struct DatasphereServerless { /* fields */ } +``` + +## Inheritance + +**Implements:** `SkillBase` + +## Methods + +### description + +#### Signature + +```rust +fn description(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/datasphere_serverless.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere_serverless.rs) + +Line 26. + +*** + +### get\_global\_data + +#### Signature + +```rust +fn get_global_data(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/builtin/datasphere_serverless.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere_serverless.rs) + +Line 125. + +*** + +### get\_prompt\_sections + +#### Signature + +```rust +fn get_prompt_sections(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/builtin/datasphere_serverless.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere_serverless.rs) + +Line 142. + +*** + +### name + +#### Signature + +```rust +fn name(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/datasphere_serverless.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere_serverless.rs) + +Line 22. + +*** + +### new + +#### Signature + +```rust +fn new(params: ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/skills/builtin/datasphere_serverless.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere_serverless.rs) + +Line 14. + +*** + +### params + +#### Signature + +```rust +fn params(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/skills/builtin/datasphere_serverless.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere_serverless.rs) + +Line 34. + +*** + +### register\_tools + +#### Signature + +```rust +fn register_tools(&self, agent: &mut ?) +``` + +#### Parameters + + + +#### Source + +[`src/skills/builtin/datasphere_serverless.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere_serverless.rs) + +Line 47. + +*** + +### setup + +#### Signature + +```rust +fn setup(&mut self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/datasphere_serverless.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere_serverless.rs) + +Line 38. + +*** + +### supports\_multiple\_instances + +#### Signature + +```rust +fn supports_multiple_instances(&self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/datasphere_serverless.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere_serverless.rs) + +Line 30. + +## Source + +[`src/skills/builtin/datasphere_serverless.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere_serverless.rs) + +Line 9. diff --git a/fern/products/sdk-reference/rust/agents/skills/builtin/datasphere-serverless/index.mdx b/fern/products/sdk-reference/rust/agents/skills/builtin/datasphere-serverless/index.mdx new file mode 100644 index 0000000000..369247ede5 --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/skills/builtin/datasphere-serverless/index.mdx @@ -0,0 +1,30 @@ +--- +slug: "/reference/rust/agents/skills/builtin/datasphere-serverless" +title: "datasphere_serverless" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::skills::builtin::datasphere_serverless" + parent: "signalwire::skills::builtin" + module: "agents.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere_serverless.rs" + visibility: "public" +--- +# `datasphere_serverless` + +## Classes + + + + Search knowledge using SignalWire DataSphere with serverless DataMap execution. + + + +## Source + +[`src/skills/builtin/datasphere_serverless.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere_serverless.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/agents/skills/builtin/datasphere/index.mdx b/fern/products/sdk-reference/rust/agents/skills/builtin/datasphere/index.mdx new file mode 100644 index 0000000000..8e02caa337 --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/skills/builtin/datasphere/index.mdx @@ -0,0 +1,227 @@ +--- +slug: "/reference/rust/agents/skills/builtin/datasphere" +title: "datasphere" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::skills::builtin::datasphere" + parent: "signalwire::skills::builtin" + module: "agents.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere.rs" + visibility: "public" +--- +# `datasphere` + +Search knowledge using SignalWire DataSphere RAG stack. + +Mirrors Python's `signalwire.skills.datasphere`: real HTTP POST to +`https://{space_name}.signalwire.com/api/datasphere/documents/search` +with project-id/token Basic auth and a JSON body containing the +document ID, query, distance, and count. + +The base URL can be overridden by setting `DATASPHERE_BASE_URL` — +`audit_skills_dispatch.py` uses this to point at its loopback +fixture. Token can also come from `DATASPHERE_TOKEN`. + +## Signature + +```rust +struct Datasphere { /* fields */ } +``` + +## Inheritance + +**Implements:** `SkillBase` + +## Methods + +### description + +#### Signature + +```rust +fn description(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere.rs) + +Line 36. + +*** + +### get\_global\_data + +#### Signature + +```rust +fn get_global_data(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/builtin/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere.rs) + +Line 164. + +*** + +### get\_prompt\_sections + +#### Signature + +```rust +fn get_prompt_sections(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/builtin/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere.rs) + +Line 178. + +*** + +### name + +#### Signature + +```rust +fn name(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere.rs) + +Line 32. + +*** + +### new + +#### Signature + +```rust +fn new(params: ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/skills/builtin/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere.rs) + +Line 24. + +*** + +### params + +#### Signature + +```rust +fn params(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/skills/builtin/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere.rs) + +Line 44. + +*** + +### register\_tools + +#### Signature + +```rust +fn register_tools(&self, agent: &mut ?) +``` + +#### Parameters + + + +#### Source + +[`src/skills/builtin/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere.rs) + +Line 63. + +*** + +### setup + +#### Signature + +```rust +fn setup(&mut self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere.rs) + +Line 48. + +*** + +### supports\_multiple\_instances + +#### Signature + +```rust +fn supports_multiple_instances(&self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere.rs) + +Line 40. + +## Source + +[`src/skills/builtin/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere.rs) + +Line 19. diff --git a/fern/products/sdk-reference/rust/agents/skills/builtin/datetime/index.mdx b/fern/products/sdk-reference/rust/agents/skills/builtin/datetime/index.mdx new file mode 100644 index 0000000000..b6705c5f14 --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/skills/builtin/datetime/index.mdx @@ -0,0 +1,178 @@ +--- +slug: "/reference/rust/agents/skills/builtin/datetime" +title: "datetime" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::skills::builtin::datetime" + parent: "signalwire::skills::builtin" + module: "agents.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datetime.rs" + visibility: "public" +--- +# `datetime` + +Get current date, time, and timezone information. + +## Signature + +```rust +struct Datetime { /* fields */ } +``` + +## Inheritance + +**Implements:** `SkillBase` + +## Methods + +### description + +#### Signature + +```rust +fn description(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/datetime.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datetime.rs) + +Line 25. + +*** + +### get\_prompt\_sections + +#### Signature + +```rust +fn get_prompt_sections(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/builtin/datetime.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datetime.rs) + +Line 96. + +*** + +### name + +#### Signature + +```rust +fn name(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/datetime.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datetime.rs) + +Line 21. + +*** + +### new + +#### Signature + +```rust +fn new(params: ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/skills/builtin/datetime.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datetime.rs) + +Line 13. + +*** + +### params + +#### Signature + +```rust +fn params(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/skills/builtin/datetime.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datetime.rs) + +Line 29. + +*** + +### register\_tools + +#### Signature + +```rust +fn register_tools(&self, agent: &mut ?) +``` + +#### Parameters + + + +#### Source + +[`src/skills/builtin/datetime.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datetime.rs) + +Line 37. + +*** + +### setup + +#### Signature + +```rust +fn setup(&mut self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/datetime.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datetime.rs) + +Line 33. + +## Source + +[`src/skills/builtin/datetime.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datetime.rs) + +Line 8. diff --git a/fern/products/sdk-reference/rust/agents/skills/builtin/google-maps/google-maps/index.mdx b/fern/products/sdk-reference/rust/agents/skills/builtin/google-maps/google-maps/index.mdx new file mode 100644 index 0000000000..a7ac51887d --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/skills/builtin/google-maps/google-maps/index.mdx @@ -0,0 +1,198 @@ +--- +slug: "/reference/rust/agents/skills/builtin/google-maps/google-maps" +title: "GoogleMaps" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::skills::builtin::google_maps::GoogleMaps" + parent: "signalwire::skills::builtin::google_maps" + module: "agents.skills.builtin.google_maps" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/google_maps.rs" + visibility: "public" +--- +# `GoogleMaps` + +Validate addresses and compute driving routes using Google Maps (DataMap-based). + +## Signature + +```rust +struct GoogleMaps { /* fields */ } +``` + +## Inheritance + +**Implements:** `SkillBase` + +## Methods + +### description + +#### Signature + +```rust +fn description(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/google_maps.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/google_maps.rs) + +Line 24. + +*** + +### get\_hints + +#### Signature + +```rust +fn get_hints(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/builtin/google_maps.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/google_maps.rs) + +Line 157. + +*** + +### get\_prompt\_sections + +#### Signature + +```rust +fn get_prompt_sections(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/builtin/google_maps.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/google_maps.rs) + +Line 168. + +*** + +### name + +#### Signature + +```rust +fn name(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/google_maps.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/google_maps.rs) + +Line 20. + +*** + +### new + +#### Signature + +```rust +fn new(params: ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/skills/builtin/google_maps.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/google_maps.rs) + +Line 12. + +*** + +### params + +#### Signature + +```rust +fn params(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/skills/builtin/google_maps.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/google_maps.rs) + +Line 28. + +*** + +### register\_tools + +#### Signature + +```rust +fn register_tools(&self, agent: &mut ?) +``` + +#### Parameters + + + +#### Source + +[`src/skills/builtin/google_maps.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/google_maps.rs) + +Line 36. + +*** + +### setup + +#### Signature + +```rust +fn setup(&mut self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/google_maps.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/google_maps.rs) + +Line 32. + +## Source + +[`src/skills/builtin/google_maps.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/google_maps.rs) + +Line 7. diff --git a/fern/products/sdk-reference/rust/agents/skills/builtin/google-maps/index.mdx b/fern/products/sdk-reference/rust/agents/skills/builtin/google-maps/index.mdx new file mode 100644 index 0000000000..26788fa1af --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/skills/builtin/google-maps/index.mdx @@ -0,0 +1,30 @@ +--- +slug: "/reference/rust/agents/skills/builtin/google-maps" +title: "google_maps" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::skills::builtin::google_maps" + parent: "signalwire::skills::builtin" + module: "agents.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/google_maps.rs" + visibility: "public" +--- +# `google_maps` + +## Classes + + + + Validate addresses and compute driving routes using Google Maps (DataMap-based). + + + +## Source + +[`src/skills/builtin/google_maps.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/google_maps.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/agents/skills/builtin/index.mdx b/fern/products/sdk-reference/rust/agents/skills/builtin/index.mdx new file mode 100644 index 0000000000..8c8aebb2b5 --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/skills/builtin/index.mdx @@ -0,0 +1,76 @@ +--- +slug: "/reference/rust/agents/skills/builtin" +title: "builtin" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::skills::builtin" + parent: "signalwire::skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/mod.rs" + visibility: "public" +--- +# `builtin` + +## Classes + + + + Search knowledge using SignalWire DataSphere RAG stack. + + + + Get current date, time, and timezone information. + + + + Tell jokes using the API Ninjas joke API (DataMap-based). + + + + Perform basic mathematical calculations. + + + + Fast web scraping and crawling capabilities (handler-based). + + + +## Modules + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## Source + +[`src/skills/builtin/mod.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/mod.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/agents/skills/builtin/info-gatherer/index.mdx b/fern/products/sdk-reference/rust/agents/skills/builtin/info-gatherer/index.mdx new file mode 100644 index 0000000000..d0ba5ed46b --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/skills/builtin/info-gatherer/index.mdx @@ -0,0 +1,30 @@ +--- +slug: "/reference/rust/agents/skills/builtin/info-gatherer" +title: "info_gatherer" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::skills::builtin::info_gatherer" + parent: "signalwire::skills::builtin" + module: "agents.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/info_gatherer.rs" + visibility: "public" +--- +# `info_gatherer` + +## Classes + + + + Gather answers to a configurable list of questions (handler-based). + + + +## Source + +[`src/skills/builtin/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/info_gatherer.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/agents/skills/builtin/info-gatherer/info-gatherer/index.mdx b/fern/products/sdk-reference/rust/agents/skills/builtin/info-gatherer/info-gatherer/index.mdx new file mode 100644 index 0000000000..5caf9790e5 --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/skills/builtin/info-gatherer/info-gatherer/index.mdx @@ -0,0 +1,218 @@ +--- +slug: "/reference/rust/agents/skills/builtin/info-gatherer/info-gatherer" +title: "InfoGatherer" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::skills::builtin::info_gatherer::InfoGatherer" + parent: "signalwire::skills::builtin::info_gatherer" + module: "agents.skills.builtin.info_gatherer" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/info_gatherer.rs" + visibility: "public" +--- +# `InfoGatherer` + +Gather answers to a configurable list of questions (handler-based). + +## Signature + +```rust +struct InfoGatherer { /* fields */ } +``` + +## Inheritance + +**Implements:** `SkillBase` + +## Methods + +### description + +#### Signature + +```rust +fn description(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/info_gatherer.rs) + +Line 25. + +*** + +### get\_global\_data + +#### Signature + +```rust +fn get_global_data(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/builtin/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/info_gatherer.rs) + +Line 171. + +*** + +### get\_prompt\_sections + +#### Signature + +```rust +fn get_prompt_sections(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/builtin/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/info_gatherer.rs) + +Line 187. + +*** + +### name + +#### Signature + +```rust +fn name(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/info_gatherer.rs) + +Line 21. + +*** + +### new + +#### Signature + +```rust +fn new(params: ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/skills/builtin/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/info_gatherer.rs) + +Line 13. + +*** + +### params + +#### Signature + +```rust +fn params(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/skills/builtin/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/info_gatherer.rs) + +Line 33. + +*** + +### register\_tools + +#### Signature + +```rust +fn register_tools(&self, agent: &mut ?) +``` + +#### Parameters + + + +#### Source + +[`src/skills/builtin/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/info_gatherer.rs) + +Line 42. + +*** + +### setup + +#### Signature + +```rust +fn setup(&mut self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/info_gatherer.rs) + +Line 37. + +*** + +### supports\_multiple\_instances + +#### Signature + +```rust +fn supports_multiple_instances(&self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/info_gatherer.rs) + +Line 29. + +## Source + +[`src/skills/builtin/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/info_gatherer.rs) + +Line 8. diff --git a/fern/products/sdk-reference/rust/agents/skills/builtin/joke/index.mdx b/fern/products/sdk-reference/rust/agents/skills/builtin/joke/index.mdx new file mode 100644 index 0000000000..241195eebe --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/skills/builtin/joke/index.mdx @@ -0,0 +1,198 @@ +--- +slug: "/reference/rust/agents/skills/builtin/joke" +title: "joke" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::skills::builtin::joke" + parent: "signalwire::skills::builtin" + module: "agents.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/joke.rs" + visibility: "public" +--- +# `joke` + +Tell jokes using the API Ninjas joke API (DataMap-based). + +## Signature + +```rust +struct Joke { /* fields */ } +``` + +## Inheritance + +**Implements:** `SkillBase` + +## Methods + +### description + +#### Signature + +```rust +fn description(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/joke.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/joke.rs) + +Line 24. + +*** + +### get\_global\_data + +#### Signature + +```rust +fn get_global_data(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/builtin/joke.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/joke.rs) + +Line 84. + +*** + +### get\_prompt\_sections + +#### Signature + +```rust +fn get_prompt_sections(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/builtin/joke.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/joke.rs) + +Line 90. + +*** + +### name + +#### Signature + +```rust +fn name(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/joke.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/joke.rs) + +Line 20. + +*** + +### new + +#### Signature + +```rust +fn new(params: ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/skills/builtin/joke.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/joke.rs) + +Line 12. + +*** + +### params + +#### Signature + +```rust +fn params(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/skills/builtin/joke.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/joke.rs) + +Line 28. + +*** + +### register\_tools + +#### Signature + +```rust +fn register_tools(&self, agent: &mut ?) +``` + +#### Parameters + + + +#### Source + +[`src/skills/builtin/joke.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/joke.rs) + +Line 36. + +*** + +### setup + +#### Signature + +```rust +fn setup(&mut self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/joke.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/joke.rs) + +Line 32. + +## Source + +[`src/skills/builtin/joke.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/joke.rs) + +Line 7. diff --git a/fern/products/sdk-reference/rust/agents/skills/builtin/math/index.mdx b/fern/products/sdk-reference/rust/agents/skills/builtin/math/index.mdx new file mode 100644 index 0000000000..3d0c545837 --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/skills/builtin/math/index.mdx @@ -0,0 +1,178 @@ +--- +slug: "/reference/rust/agents/skills/builtin/math" +title: "math" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::skills::builtin::math" + parent: "signalwire::skills::builtin" + module: "agents.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/math.rs" + visibility: "public" +--- +# `math` + +Perform basic mathematical calculations. + +## Signature + +```rust +struct Math { /* fields */ } +``` + +## Inheritance + +**Implements:** `SkillBase` + +## Methods + +### description + +#### Signature + +```rust +fn description(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/math.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/math.rs) + +Line 25. + +*** + +### get\_prompt\_sections + +#### Signature + +```rust +fn get_prompt_sections(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/builtin/math.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/math.rs) + +Line 99. + +*** + +### name + +#### Signature + +```rust +fn name(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/math.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/math.rs) + +Line 21. + +*** + +### new + +#### Signature + +```rust +fn new(params: ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/skills/builtin/math.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/math.rs) + +Line 13. + +*** + +### params + +#### Signature + +```rust +fn params(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/skills/builtin/math.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/math.rs) + +Line 29. + +*** + +### register\_tools + +#### Signature + +```rust +fn register_tools(&self, agent: &mut ?) +``` + +#### Parameters + + + +#### Source + +[`src/skills/builtin/math.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/math.rs) + +Line 37. + +*** + +### setup + +#### Signature + +```rust +fn setup(&mut self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/math.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/math.rs) + +Line 33. + +## Source + +[`src/skills/builtin/math.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/math.rs) + +Line 8. diff --git a/fern/products/sdk-reference/rust/agents/skills/builtin/mcp-gateway/index.mdx b/fern/products/sdk-reference/rust/agents/skills/builtin/mcp-gateway/index.mdx new file mode 100644 index 0000000000..0d337227b2 --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/skills/builtin/mcp-gateway/index.mdx @@ -0,0 +1,30 @@ +--- +slug: "/reference/rust/agents/skills/builtin/mcp-gateway" +title: "mcp_gateway" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::skills::builtin::mcp_gateway" + parent: "signalwire::skills::builtin" + module: "agents.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/mcp_gateway.rs" + visibility: "public" +--- +# `mcp_gateway` + +## Classes + + + + Bridge MCP servers with SWAIG functions (handler-based). + + + +## Source + +[`src/skills/builtin/mcp_gateway.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/mcp_gateway.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/agents/skills/builtin/mcp-gateway/mcp-gateway/index.mdx b/fern/products/sdk-reference/rust/agents/skills/builtin/mcp-gateway/mcp-gateway/index.mdx new file mode 100644 index 0000000000..000e4c1e5f --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/skills/builtin/mcp-gateway/mcp-gateway/index.mdx @@ -0,0 +1,218 @@ +--- +slug: "/reference/rust/agents/skills/builtin/mcp-gateway/mcp-gateway" +title: "McpGateway" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::skills::builtin::mcp_gateway::McpGateway" + parent: "signalwire::skills::builtin::mcp_gateway" + module: "agents.skills.builtin.mcp_gateway" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/mcp_gateway.rs" + visibility: "public" +--- +# `McpGateway` + +Bridge MCP servers with SWAIG functions (handler-based). + +## Signature + +```rust +struct McpGateway { /* fields */ } +``` + +## Inheritance + +**Implements:** `SkillBase` + +## Methods + +### description + +#### Signature + +```rust +fn description(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/mcp_gateway.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/mcp_gateway.rs) + +Line 25. + +*** + +### get\_global\_data + +#### Signature + +```rust +fn get_global_data(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/builtin/mcp_gateway.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/mcp_gateway.rs) + +Line 201. + +*** + +### get\_hints + +#### Signature + +```rust +fn get_hints(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/builtin/mcp_gateway.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/mcp_gateway.rs) + +Line 185. + +*** + +### get\_prompt\_sections + +#### Signature + +```rust +fn get_prompt_sections(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/builtin/mcp_gateway.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/mcp_gateway.rs) + +Line 218. + +*** + +### name + +#### Signature + +```rust +fn name(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/mcp_gateway.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/mcp_gateway.rs) + +Line 21. + +*** + +### new + +#### Signature + +```rust +fn new(params: ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/skills/builtin/mcp_gateway.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/mcp_gateway.rs) + +Line 13. + +*** + +### params + +#### Signature + +```rust +fn params(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/skills/builtin/mcp_gateway.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/mcp_gateway.rs) + +Line 29. + +*** + +### register\_tools + +#### Signature + +```rust +fn register_tools(&self, agent: &mut ?) +``` + +#### Parameters + + + +#### Source + +[`src/skills/builtin/mcp_gateway.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/mcp_gateway.rs) + +Line 37. + +*** + +### setup + +#### Signature + +```rust +fn setup(&mut self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/mcp_gateway.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/mcp_gateway.rs) + +Line 33. + +## Source + +[`src/skills/builtin/mcp_gateway.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/mcp_gateway.rs) + +Line 8. diff --git a/fern/products/sdk-reference/rust/agents/skills/builtin/native-vector-search/index.mdx b/fern/products/sdk-reference/rust/agents/skills/builtin/native-vector-search/index.mdx new file mode 100644 index 0000000000..dca0294248 --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/skills/builtin/native-vector-search/index.mdx @@ -0,0 +1,30 @@ +--- +slug: "/reference/rust/agents/skills/builtin/native-vector-search" +title: "native_vector_search" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::skills::builtin::native_vector_search" + parent: "signalwire::skills::builtin" + module: "agents.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/native_vector_search.rs" + visibility: "public" +--- +# `native_vector_search` + +## Classes + + + + Search document indexes using vector similarity and keyword search (handler-based). + + + +## Source + +[`src/skills/builtin/native_vector_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/native_vector_search.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/agents/skills/builtin/native-vector-search/native-vector-search/index.mdx b/fern/products/sdk-reference/rust/agents/skills/builtin/native-vector-search/native-vector-search/index.mdx new file mode 100644 index 0000000000..4375c7bced --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/skills/builtin/native-vector-search/native-vector-search/index.mdx @@ -0,0 +1,198 @@ +--- +slug: "/reference/rust/agents/skills/builtin/native-vector-search/native-vector-search" +title: "NativeVectorSearch" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::skills::builtin::native_vector_search::NativeVectorSearch" + parent: "signalwire::skills::builtin::native_vector_search" + module: "agents.skills.builtin.native_vector_search" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/native_vector_search.rs" + visibility: "public" +--- +# `NativeVectorSearch` + +Search document indexes using vector similarity and keyword search (handler-based). + +## Signature + +```rust +struct NativeVectorSearch { /* fields */ } +``` + +## Inheritance + +**Implements:** `SkillBase` + +## Methods + +### description + +#### Signature + +```rust +fn description(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/native_vector_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/native_vector_search.rs) + +Line 25. + +*** + +### get\_hints + +#### Signature + +```rust +fn get_hints(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/builtin/native_vector_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/native_vector_search.rs) + +Line 98. + +*** + +### name + +#### Signature + +```rust +fn name(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/native_vector_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/native_vector_search.rs) + +Line 21. + +*** + +### new + +#### Signature + +```rust +fn new(params: ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/skills/builtin/native_vector_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/native_vector_search.rs) + +Line 13. + +*** + +### params + +#### Signature + +```rust +fn params(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/skills/builtin/native_vector_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/native_vector_search.rs) + +Line 33. + +*** + +### register\_tools + +#### Signature + +```rust +fn register_tools(&self, agent: &mut ?) +``` + +#### Parameters + + + +#### Source + +[`src/skills/builtin/native_vector_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/native_vector_search.rs) + +Line 41. + +*** + +### setup + +#### Signature + +```rust +fn setup(&mut self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/native_vector_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/native_vector_search.rs) + +Line 37. + +*** + +### supports\_multiple\_instances + +#### Signature + +```rust +fn supports_multiple_instances(&self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/native_vector_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/native_vector_search.rs) + +Line 29. + +## Source + +[`src/skills/builtin/native_vector_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/native_vector_search.rs) + +Line 8. diff --git a/fern/products/sdk-reference/rust/agents/skills/builtin/play-background-file/index.mdx b/fern/products/sdk-reference/rust/agents/skills/builtin/play-background-file/index.mdx new file mode 100644 index 0000000000..ae12926158 --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/skills/builtin/play-background-file/index.mdx @@ -0,0 +1,30 @@ +--- +slug: "/reference/rust/agents/skills/builtin/play-background-file" +title: "play_background_file" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::skills::builtin::play_background_file" + parent: "signalwire::skills::builtin" + module: "agents.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/play_background_file.rs" + visibility: "public" +--- +# `play_background_file` + +## Classes + + + + Control background file playback (DataMap-based). + + + +## Source + +[`src/skills/builtin/play_background_file.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/play_background_file.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/agents/skills/builtin/play-background-file/play-background-file/index.mdx b/fern/products/sdk-reference/rust/agents/skills/builtin/play-background-file/play-background-file/index.mdx new file mode 100644 index 0000000000..6cf4a73815 --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/skills/builtin/play-background-file/play-background-file/index.mdx @@ -0,0 +1,178 @@ +--- +slug: "/reference/rust/agents/skills/builtin/play-background-file/play-background-file" +title: "PlayBackgroundFile" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::skills::builtin::play_background_file::PlayBackgroundFile" + parent: "signalwire::skills::builtin::play_background_file" + module: "agents.skills.builtin.play_background_file" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/play_background_file.rs" + visibility: "public" +--- +# `PlayBackgroundFile` + +Control background file playback (DataMap-based). + +## Signature + +```rust +struct PlayBackgroundFile { /* fields */ } +``` + +## Inheritance + +**Implements:** `SkillBase` + +## Methods + +### description + +#### Signature + +```rust +fn description(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/play_background_file.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/play_background_file.rs) + +Line 24. + +*** + +### name + +#### Signature + +```rust +fn name(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/play_background_file.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/play_background_file.rs) + +Line 20. + +*** + +### new + +#### Signature + +```rust +fn new(params: ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/skills/builtin/play_background_file.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/play_background_file.rs) + +Line 12. + +*** + +### params + +#### Signature + +```rust +fn params(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/skills/builtin/play_background_file.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/play_background_file.rs) + +Line 32. + +*** + +### register\_tools + +#### Signature + +```rust +fn register_tools(&self, agent: &mut ?) +``` + +#### Parameters + + + +#### Source + +[`src/skills/builtin/play_background_file.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/play_background_file.rs) + +Line 41. + +*** + +### setup + +#### Signature + +```rust +fn setup(&mut self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/play_background_file.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/play_background_file.rs) + +Line 36. + +*** + +### supports\_multiple\_instances + +#### Signature + +```rust +fn supports_multiple_instances(&self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/play_background_file.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/play_background_file.rs) + +Line 28. + +## Source + +[`src/skills/builtin/play_background_file.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/play_background_file.rs) + +Line 7. diff --git a/fern/products/sdk-reference/rust/agents/skills/builtin/spider/index.mdx b/fern/products/sdk-reference/rust/agents/skills/builtin/spider/index.mdx new file mode 100644 index 0000000000..8d1dfb1812 --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/skills/builtin/spider/index.mdx @@ -0,0 +1,198 @@ +--- +slug: "/reference/rust/agents/skills/builtin/spider" +title: "spider" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::skills::builtin::spider" + parent: "signalwire::skills::builtin" + module: "agents.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/spider.rs" + visibility: "public" +--- +# `spider` + +Fast web scraping and crawling capabilities (handler-based). + +## Signature + +```rust +struct Spider { /* fields */ } +``` + +## Inheritance + +**Implements:** `SkillBase` + +## Methods + +### description + +#### Signature + +```rust +fn description(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/spider.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/spider.rs) + +Line 25. + +*** + +### get\_hints + +#### Signature + +```rust +fn get_hints(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/builtin/spider.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/spider.rs) + +Line 161. + +*** + +### name + +#### Signature + +```rust +fn name(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/spider.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/spider.rs) + +Line 21. + +*** + +### new + +#### Signature + +```rust +fn new(params: ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/skills/builtin/spider.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/spider.rs) + +Line 13. + +*** + +### params + +#### Signature + +```rust +fn params(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/skills/builtin/spider.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/spider.rs) + +Line 33. + +*** + +### register\_tools + +#### Signature + +```rust +fn register_tools(&self, agent: &mut ?) +``` + +#### Parameters + + + +#### Source + +[`src/skills/builtin/spider.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/spider.rs) + +Line 41. + +*** + +### setup + +#### Signature + +```rust +fn setup(&mut self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/spider.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/spider.rs) + +Line 37. + +*** + +### supports\_multiple\_instances + +#### Signature + +```rust +fn supports_multiple_instances(&self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/spider.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/spider.rs) + +Line 29. + +## Source + +[`src/skills/builtin/spider.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/spider.rs) + +Line 8. diff --git a/fern/products/sdk-reference/rust/agents/skills/builtin/swml-transfer/index.mdx b/fern/products/sdk-reference/rust/agents/skills/builtin/swml-transfer/index.mdx new file mode 100644 index 0000000000..d6555b310a --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/skills/builtin/swml-transfer/index.mdx @@ -0,0 +1,30 @@ +--- +slug: "/reference/rust/agents/skills/builtin/swml-transfer" +title: "swml_transfer" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::skills::builtin::swml_transfer" + parent: "signalwire::skills::builtin" + module: "agents.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/swml_transfer.rs" + visibility: "public" +--- +# `swml_transfer` + +## Classes + + + + Transfer calls between agents based on pattern matching (DataMap-based). + + + +## Source + +[`src/skills/builtin/swml_transfer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/swml_transfer.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/agents/skills/builtin/swml-transfer/swml-transfer/index.mdx b/fern/products/sdk-reference/rust/agents/skills/builtin/swml-transfer/swml-transfer/index.mdx new file mode 100644 index 0000000000..dc7b929015 --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/skills/builtin/swml-transfer/swml-transfer/index.mdx @@ -0,0 +1,218 @@ +--- +slug: "/reference/rust/agents/skills/builtin/swml-transfer/swml-transfer" +title: "SwmlTransfer" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::skills::builtin::swml_transfer::SwmlTransfer" + parent: "signalwire::skills::builtin::swml_transfer" + module: "agents.skills.builtin.swml_transfer" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/swml_transfer.rs" + visibility: "public" +--- +# `SwmlTransfer` + +Transfer calls between agents based on pattern matching (DataMap-based). + +## Signature + +```rust +struct SwmlTransfer { /* fields */ } +``` + +## Inheritance + +**Implements:** `SkillBase` + +## Methods + +### description + +#### Signature + +```rust +fn description(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/swml_transfer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/swml_transfer.rs) + +Line 24. + +*** + +### get\_hints + +#### Signature + +```rust +fn get_hints(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/builtin/swml_transfer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/swml_transfer.rs) + +Line 169. + +*** + +### get\_prompt\_sections + +#### Signature + +```rust +fn get_prompt_sections(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/builtin/swml_transfer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/swml_transfer.rs) + +Line 190. + +*** + +### name + +#### Signature + +```rust +fn name(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/swml_transfer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/swml_transfer.rs) + +Line 20. + +*** + +### new + +#### Signature + +```rust +fn new(params: ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/skills/builtin/swml_transfer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/swml_transfer.rs) + +Line 12. + +*** + +### params + +#### Signature + +```rust +fn params(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/skills/builtin/swml_transfer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/swml_transfer.rs) + +Line 32. + +*** + +### register\_tools + +#### Signature + +```rust +fn register_tools(&self, agent: &mut ?) +``` + +#### Parameters + + + +#### Source + +[`src/skills/builtin/swml_transfer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/swml_transfer.rs) + +Line 45. + +*** + +### setup + +#### Signature + +```rust +fn setup(&mut self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/swml_transfer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/swml_transfer.rs) + +Line 36. + +*** + +### supports\_multiple\_instances + +#### Signature + +```rust +fn supports_multiple_instances(&self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/swml_transfer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/swml_transfer.rs) + +Line 28. + +## Source + +[`src/skills/builtin/swml_transfer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/swml_transfer.rs) + +Line 7. diff --git a/fern/products/sdk-reference/rust/agents/skills/builtin/weather-api/index.mdx b/fern/products/sdk-reference/rust/agents/skills/builtin/weather-api/index.mdx new file mode 100644 index 0000000000..58bf581718 --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/skills/builtin/weather-api/index.mdx @@ -0,0 +1,30 @@ +--- +slug: "/reference/rust/agents/skills/builtin/weather-api" +title: "weather_api" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::skills::builtin::weather_api" + parent: "signalwire::skills::builtin" + module: "agents.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/weather_api.rs" + visibility: "public" +--- +# `weather_api` + +## Classes + + + + Get current weather information from WeatherAPI.com (DataMap-based). + + + +## Source + +[`src/skills/builtin/weather_api.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/weather_api.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/agents/skills/builtin/weather-api/weather-api/index.mdx b/fern/products/sdk-reference/rust/agents/skills/builtin/weather-api/weather-api/index.mdx new file mode 100644 index 0000000000..cf6e0a1b54 --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/skills/builtin/weather-api/weather-api/index.mdx @@ -0,0 +1,158 @@ +--- +slug: "/reference/rust/agents/skills/builtin/weather-api/weather-api" +title: "WeatherApi" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::skills::builtin::weather_api::WeatherApi" + parent: "signalwire::skills::builtin::weather_api" + module: "agents.skills.builtin.weather_api" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/weather_api.rs" + visibility: "public" +--- +# `WeatherApi` + +Get current weather information from WeatherAPI.com (DataMap-based). + +## Signature + +```rust +struct WeatherApi { /* fields */ } +``` + +## Inheritance + +**Implements:** `SkillBase` + +## Methods + +### description + +#### Signature + +```rust +fn description(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/weather_api.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/weather_api.rs) + +Line 24. + +*** + +### name + +#### Signature + +```rust +fn name(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/weather_api.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/weather_api.rs) + +Line 20. + +*** + +### new + +#### Signature + +```rust +fn new(params: ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/skills/builtin/weather_api.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/weather_api.rs) + +Line 12. + +*** + +### params + +#### Signature + +```rust +fn params(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/skills/builtin/weather_api.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/weather_api.rs) + +Line 28. + +*** + +### register\_tools + +#### Signature + +```rust +fn register_tools(&self, agent: &mut ?) +``` + +#### Parameters + + + +#### Source + +[`src/skills/builtin/weather_api.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/weather_api.rs) + +Line 36. + +*** + +### setup + +#### Signature + +```rust +fn setup(&mut self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/weather_api.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/weather_api.rs) + +Line 32. + +## Source + +[`src/skills/builtin/weather_api.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/weather_api.rs) + +Line 7. diff --git a/fern/products/sdk-reference/rust/agents/skills/builtin/web-search/index.mdx b/fern/products/sdk-reference/rust/agents/skills/builtin/web-search/index.mdx new file mode 100644 index 0000000000..86fe0c7cc9 --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/skills/builtin/web-search/index.mdx @@ -0,0 +1,30 @@ +--- +slug: "/reference/rust/agents/skills/builtin/web-search" +title: "web_search" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::skills::builtin::web_search" + parent: "signalwire::skills::builtin" + module: "agents.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/web_search.rs" + visibility: "public" +--- +# `web_search` + +## Classes + + + + Search the web using Google Custom Search API. + + + +## Source + +[`src/skills/builtin/web_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/web_search.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/agents/skills/builtin/web-search/web-search/index.mdx b/fern/products/sdk-reference/rust/agents/skills/builtin/web-search/web-search/index.mdx new file mode 100644 index 0000000000..af749b196b --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/skills/builtin/web-search/web-search/index.mdx @@ -0,0 +1,271 @@ +--- +slug: "/reference/rust/agents/skills/builtin/web-search/web-search" +title: "WebSearch" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::skills::builtin::web_search::WebSearch" + parent: "signalwire::skills::builtin::web_search" + module: "agents.skills.builtin.web_search" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/web_search.rs" + visibility: "public" +--- +# `WebSearch` + +Search the web using Google Custom Search API. + +Mirrors Python's `signalwire.skills.web_search`: the SDK issues a +real HTTP GET to Google CSE (`https://www.googleapis.com/customsearch/v1`) +with the query, key, and CSE ID in the query string, and parses the +JSON response. The base URL can be overridden via the +`WEB_SEARCH_BASE_URL` env var (used by `audit_skills_dispatch.py`'s +fixture). Without that override, the URL points at Google. + +## Signature + +```rust +struct WebSearch { /* fields */ } +``` + +## Inheritance + +**Implements:** `SkillBase` + +## Methods + +### description + +#### Signature + +```rust +fn description(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/web_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/web_search.rs) + +Line 44. + +*** + +### get\_global\_data + +#### Signature + +```rust +fn get_global_data(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/builtin/web_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/web_search.rs) + +Line 248. + +*** + +### get\_parameter\_schema + +Advertise the accepted parameters, including the latency-control set +(Python `WebSearchSkill.get_parameter_schema`, commit 295745b). Every +param `register_tools` reads must appear here so it is discoverable; +the inline test module guards against the recurring "read a param but +forgot the schema entry" drift class. + +#### Signature + +```rust +fn get_parameter_schema(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/builtin/web_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/web_search.rs) + +Line 278. + +*** + +### get\_prompt\_sections + +#### Signature + +```rust +fn get_prompt_sections(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/builtin/web_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/web_search.rs) + +Line 258. + +*** + +### name + +#### Signature + +```rust +fn name(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/web_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/web_search.rs) + +Line 40. + +*** + +### new + +#### Signature + +```rust +fn new(params: ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/skills/builtin/web_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/web_search.rs) + +Line 32. + +*** + +### params + +#### Signature + +```rust +fn params(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/skills/builtin/web_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/web_search.rs) + +Line 56. + +*** + +### register\_tools + +#### Signature + +```rust +fn register_tools(&self, agent: &mut ?) +``` + +#### Parameters + + + +#### Source + +[`src/skills/builtin/web_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/web_search.rs) + +Line 73. + +*** + +### setup + +#### Signature + +```rust +fn setup(&mut self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/web_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/web_search.rs) + +Line 60. + +*** + +### supports\_multiple\_instances + +#### Signature + +```rust +fn supports_multiple_instances(&self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/web_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/web_search.rs) + +Line 52. + +*** + +### version + +#### Signature + +```rust +fn version(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/web_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/web_search.rs) + +Line 48. + +## Source + +[`src/skills/builtin/web_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/web_search.rs) + +Line 27. diff --git a/fern/products/sdk-reference/rust/agents/skills/builtin/wikipedia-search/index.mdx b/fern/products/sdk-reference/rust/agents/skills/builtin/wikipedia-search/index.mdx new file mode 100644 index 0000000000..69a740d1ed --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/skills/builtin/wikipedia-search/index.mdx @@ -0,0 +1,30 @@ +--- +slug: "/reference/rust/agents/skills/builtin/wikipedia-search" +title: "wikipedia_search" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::skills::builtin::wikipedia_search" + parent: "signalwire::skills::builtin" + module: "agents.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/wikipedia_search.rs" + visibility: "public" +--- +# `wikipedia_search` + +## Classes + + + + Search Wikipedia and get article summaries. + + + +## Source + +[`src/skills/builtin/wikipedia_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/wikipedia_search.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/agents/skills/builtin/wikipedia-search/wikipedia-search/index.mdx b/fern/products/sdk-reference/rust/agents/skills/builtin/wikipedia-search/wikipedia-search/index.mdx new file mode 100644 index 0000000000..adc66075d6 --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/skills/builtin/wikipedia-search/wikipedia-search/index.mdx @@ -0,0 +1,183 @@ +--- +slug: "/reference/rust/agents/skills/builtin/wikipedia-search/wikipedia-search" +title: "WikipediaSearch" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::skills::builtin::wikipedia_search::WikipediaSearch" + parent: "signalwire::skills::builtin::wikipedia_search" + module: "agents.skills.builtin.wikipedia_search" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/wikipedia_search.rs" + visibility: "public" +--- +# `WikipediaSearch` + +Search Wikipedia and get article summaries. + +Mirrors Python's `signalwire.skills.wikipedia_search`: real HTTP GET +against the Wikipedia REST API. The base URL can be overridden by +setting `WIKIPEDIA_BASE_URL` (used by `audit_skills_dispatch.py`'s +fixture). Defaults to `https://en.wikipedia.org`. + +## Signature + +```rust +struct WikipediaSearch { /* fields */ } +``` + +## Inheritance + +**Implements:** `SkillBase` + +## Methods + +### description + +#### Signature + +```rust +fn description(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/wikipedia_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/wikipedia_search.rs) + +Line 30. + +*** + +### get\_prompt\_sections + +#### Signature + +```rust +fn get_prompt_sections(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/builtin/wikipedia_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/wikipedia_search.rs) + +Line 129. + +*** + +### name + +#### Signature + +```rust +fn name(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/wikipedia_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/wikipedia_search.rs) + +Line 26. + +*** + +### new + +#### Signature + +```rust +fn new(params: ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/skills/builtin/wikipedia_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/wikipedia_search.rs) + +Line 18. + +*** + +### params + +#### Signature + +```rust +fn params(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/skills/builtin/wikipedia_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/wikipedia_search.rs) + +Line 34. + +*** + +### register\_tools + +#### Signature + +```rust +fn register_tools(&self, agent: &mut ?) +``` + +#### Parameters + + + +#### Source + +[`src/skills/builtin/wikipedia_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/wikipedia_search.rs) + +Line 42. + +*** + +### setup + +#### Signature + +```rust +fn setup(&mut self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/wikipedia_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/wikipedia_search.rs) + +Line 38. + +## Source + +[`src/skills/builtin/wikipedia_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/wikipedia_search.rs) + +Line 13. diff --git a/fern/products/sdk-reference/rust/agents/skills/index.mdx b/fern/products/sdk-reference/rust/agents/skills/index.mdx new file mode 100644 index 0000000000..cfe83a0422 --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/skills/index.mdx @@ -0,0 +1,38 @@ +--- +slug: "/reference/rust/agents/skills" +title: "skills" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::skills" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/mod.rs" + visibility: "public" +--- +# `skills` + +## Modules + + + + + + + + + + Built-in skill names as a typed, compile-time-checked closed set. + + + + + +## Source + +[`src/skills/mod.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/mod.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/agents/skills/skill-base/index.mdx b/fern/products/sdk-reference/rust/agents/skills/skill-base/index.mdx new file mode 100644 index 0000000000..1178a33b1a --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/skills/skill-base/index.mdx @@ -0,0 +1,455 @@ +--- +slug: "/reference/rust/agents/skills/skill-base" +title: "skill_base" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::skills::skill_base" + parent: "signalwire::skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs" + visibility: "public" +--- +# `skill_base` + +## Classes + + + + Parameters holder used by the default `SkillBase` implementations. + + + +## Functions + +### value\_to\_map + +Convert a `Value` (expected to be an object) into a `Map`. + +#### Signature + +```rust +fn value_to_map(val: ?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 184. + +## Interfaces + +### SkillBase + +Trait implemented by all skills (both builtin and custom). + +A skill encapsulates tools, hints, global data, and prompt sections that can +be loaded into an `AgentBase` via the `SkillManager`. + +#### Signature + +```rust +trait SkillBase +``` + +#### Inheritance + +**Extends:** `?`, `?` + +#### Methods + +##### cleanup + +Called when the skill is unloaded. + +###### Signature + +```rust +fn cleanup(&mut self) +``` + +###### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 89. + +*** + +##### description + +Human-readable description. + +###### Signature + +```rust +fn description(&self) -> &str +``` + +###### Returns + +`&str` + +###### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 14. + +*** + +##### get\_global\_data + +Key/value pairs merged into the agent's global data. + +###### Signature + +```rust +fn get_global_data(&self) -> ? +``` + +###### Returns + +`?` + +###### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 53. + +*** + +##### get\_hints + +Speech recognition hints. + +###### Signature + +```rust +fn get_hints(&self) -> ? +``` + +###### Returns + +`?` + +###### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 48. + +*** + +##### get\_instance\_key + +Instance key used to track loaded skills (allows tool\_name overrides). + +###### Signature + +```rust +fn get_instance_key(&self) -> ? +``` + +###### Returns + +`?` + +###### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 32. + +*** + +##### get\_parameter\_schema + +JSON-Schema describing accepted parameters. + +###### Signature + +```rust +fn get_parameter_schema(&self) -> ? +``` + +###### Returns + +`?` + +###### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 66. + +*** + +##### get\_prompt\_sections + +POM sections merged into the agent's prompt. + +###### Signature + +```rust +fn get_prompt_sections(&self) -> ? +``` + +###### Returns + +`?` + +###### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 58. + +*** + +##### get\_swaig\_fields + +Get the SWAIG fields to merge into tool definitions. + +###### Signature + +```rust +fn get_swaig_fields(&self) -> ? +``` + +###### Returns + +`?` + +###### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 115. + +*** + +##### get\_tool\_name + +Get the tool name, falling back to `default` if no override is set. + +###### Signature + +```rust +fn get_tool_name(&self, default: &str) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 106. + +*** + +##### name + +Unique snake\_case name of this skill (e.g. `"datetime"`). + +###### Signature + +```rust +fn name(&self) -> &str +``` + +###### Returns + +`&str` + +###### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 11. + +*** + +##### params + +Access the skill's configuration parameters. + +###### Signature + +```rust +fn params(&self) -> &? +``` + +###### Returns + +`&?` + +###### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 92. + +*** + +##### register\_tools + +Register tools on the agent. + +###### Signature + +```rust +fn register_tools(&self, agent: &mut ?) +``` + +###### Parameters + + + +###### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 45. + +*** + +##### required\_env\_vars + +Environment variables that must be set before `setup` is called. + +###### Signature + +```rust +fn required_env_vars(&self) -> ? +``` + +###### Returns + +`?` + +###### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 22. + +*** + +##### setup + +One-time setup. Return `true` on success. + +###### Signature + +```rust +fn setup(&mut self) -> bool +``` + +###### Returns + +`bool` + +###### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 42. + +*** + +##### supports\_multiple\_instances + +Whether multiple instances of this skill can be loaded simultaneously. + +###### Signature + +```rust +fn supports_multiple_instances(&self) -> bool +``` + +###### Returns + +`bool` + +###### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 27. + +*** + +##### validate\_env\_vars + +Validate that all required env vars are set. Returns missing var names. + +###### Signature + +```rust +fn validate_env_vars(&self) -> ? +``` + +###### Returns + +`?` + +###### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 95. + +*** + +##### version + +Semantic version string. + +###### Signature + +```rust +fn version(&self) -> &str +``` + +###### Returns + +`&str` + +###### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 17. + +#### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 9. + +## Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/agents/skills/skill-base/skill-params/index.mdx b/fern/products/sdk-reference/rust/agents/skills/skill-base/skill-params/index.mdx new file mode 100644 index 0000000000..d41c04c2d1 --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/skills/skill-base/skill-params/index.mdx @@ -0,0 +1,330 @@ +--- +slug: "/reference/rust/agents/skills/skill-base/skill-params" +title: "SkillParams" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::skills::skill_base::SkillParams" + parent: "signalwire::skills::skill_base" + module: "agents.skills.skill_base" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs" + visibility: "public" +--- +# `SkillParams` + +Parameters holder used by the default `SkillBase` implementations. + +## Signature + +```rust +struct SkillParams { /* fields */ } +``` + +## Inheritance + +**Implements:** `Debug`, `Clone` + +## Properties + + + +## Methods + +### clone + +#### Signature + +```rust +fn clone(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 125. + +*** + +### empty + +#### Signature + +```rust +fn empty() -> Self +``` + +#### Returns + +`Self` + +#### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 135. + +*** + +### fmt + +#### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 125. + +*** + +### get\_array + +#### Signature + +```rust +fn get_array(&self, key: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 166. + +*** + +### get\_bool + +#### Signature + +```rust +fn get_bool(&self, key: &str) -> bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 147. + +*** + +### get\_bool\_or + +Like `get_bool` but returns `default` when the key is +absent (or not a boolean). Needed for params whose documented default +is `true` — `get_bool` always falls back to `false`. + +#### Signature + +```rust +fn get_bool_or(&self, key: &str, default: bool) -> bool +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 154. + +*** + +### get\_f64 + +#### Signature + +```rust +fn get_f64(&self, key: &str, default: f64) -> f64 +``` + +#### Parameters + + + + + +#### Returns + +`f64` + +#### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 162. + +*** + +### get\_i64 + +#### Signature + +```rust +fn get_i64(&self, key: &str, default: i64) -> i64 +``` + +#### Parameters + + + + + +#### Returns + +`i64` + +#### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 158. + +*** + +### get\_object + +#### Signature + +```rust +fn get_object(&self, key: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 174. + +*** + +### get\_str + +#### Signature + +```rust +fn get_str(&self, key: &str) -> ?<&str> +``` + +#### Parameters + + + +#### Returns + +`?<&str>` + +#### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 139. + +*** + +### get\_str\_or + +#### Signature + +```rust +fn get_str_or(&self, key: &str, default: &str) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 143. + +*** + +### new + +#### Signature + +```rust +fn new(params: ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 131. + +## Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 126. diff --git a/fern/products/sdk-reference/rust/agents/skills/skill-manager/index.mdx b/fern/products/sdk-reference/rust/agents/skills/skill-manager/index.mdx new file mode 100644 index 0000000000..1073c26e63 --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/skills/skill-manager/index.mdx @@ -0,0 +1,30 @@ +--- +slug: "/reference/rust/agents/skills/skill-manager" +title: "skill_manager" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::skills::skill_manager" + parent: "signalwire::skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_manager.rs" + visibility: "public" +--- +# `skill_manager` + +## Classes + + + + Manages loaded skills for an agent — validates, sets up, and merges skill contributions (tools, hints, global data, prompt sections) into the agent. + + + +## Source + +[`src/skills/skill_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_manager.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/agents/skills/skill-manager/skill-manager/index.mdx b/fern/products/sdk-reference/rust/agents/skills/skill-manager/skill-manager/index.mdx new file mode 100644 index 0000000000..136f628aea --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/skills/skill-manager/skill-manager/index.mdx @@ -0,0 +1,244 @@ +--- +slug: "/reference/rust/agents/skills/skill-manager/skill-manager" +title: "SkillManager" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::skills::skill_manager::SkillManager" + parent: "signalwire::skills::skill_manager" + module: "agents.skills.skill_manager" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_manager.rs" + visibility: "public" +--- +# `SkillManager` + +Manages loaded skills for an agent — validates, sets up, and merges skill +contributions (tools, hints, global data, prompt sections) into the agent. + +## Signature + +```rust +struct SkillManager { /* fields */ } +``` + +## Inheritance + +**Implements:** `Default` + +## Methods + +### default + +#### Signature + +```rust +fn default() -> Self +``` + +#### Returns + +`Self` + +#### Source + +[`src/skills/skill_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_manager.rs) + +Line 207. + +*** + +### get\_skill + +Get a reference to a loaded skill. + +#### Signature + +```rust +fn get_skill(&self, key: &str) -> ?> +``` + +#### Parameters + + + +#### Returns + +`?>` + +#### Source + +[`src/skills/skill_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_manager.rs) + +Line 201. + +*** + +### has\_skill + +Check if a skill is loaded. + +#### Signature + +```rust +fn has_skill(&self, key: &str) -> bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/skill_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_manager.rs) + +Line 196. + +*** + +### list\_skills + +List all loaded skill instance keys. + +#### Signature + +```rust +fn list_skills(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/skill_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_manager.rs) + +Line 189. + +*** + +### load\_skill + +Load a skill by registry name, creating it via the registry factory. + +Returns `(true, "")` on success, or `(false, reason)` on failure. + +#### Signature + +```rust +fn load_skill( + &mut self, + skill_name: &str, + params: ?, + agent: &mut ? +) -> (bool, ?) +``` + +#### Parameters + + + + + + + +#### Returns + +`(bool, ?)` + +#### Source + +[`src/skills/skill_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_manager.rs) + +Line 26. + +*** + +### load\_skill\_instance + +Load a skill from a pre-constructed instance. + +#### Signature + +```rust +fn load_skill_instance( + &mut self, + instance: ?, + agent: &mut ? +) -> (bool, ?) +``` + +#### Parameters + + + + + +#### Returns + +`(bool, ?)` + +#### Source + +[`src/skills/skill_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_manager.rs) + +Line 113. + +*** + +### new + +#### Signature + +```rust +fn new() -> Self +``` + +#### Returns + +`Self` + +#### Source + +[`src/skills/skill_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_manager.rs) + +Line 17. + +*** + +### unload\_skill + +Unload a skill by instance key. + +#### Signature + +```rust +fn unload_skill(&mut self, key: &str) -> bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/skill_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_manager.rs) + +Line 184. + +## Source + +[`src/skills/skill_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_manager.rs) + +Line 12. diff --git a/fern/products/sdk-reference/rust/agents/skills/skill-name/index.mdx b/fern/products/sdk-reference/rust/agents/skills/skill-name/index.mdx new file mode 100644 index 0000000000..10cd74a5cb --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/skills/skill-name/index.mdx @@ -0,0 +1,516 @@ +--- +slug: "/reference/rust/agents/skills/skill-name" +title: "skill_name" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::skills::skill_name" + parent: "signalwire::skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs" + visibility: "public" +--- +# `skill_name` + +Built-in skill names as a typed, compile-time-checked closed set. + +Skill names are an open _string_ set in the Python reference (`add_skill` +takes a bare `str`), which keeps parity and lets callers load custom / +third-party skills. The downside is that a typo — `add_skill("datetiem")` +— compiles fine and only fails later at the server. \[`SkillName`] gives the +18 built-in skills a typed alternative so the typo fails at the **call +site** with editor autocompletion, while the string path stays available +for parity and custom skills. + +`AgentBase::add_skill`, +`remove_skill` and +`has_skill` keep their `&str` +parameter (parity with Python's `str`); \[`SkillName`] plugs into them via +\[`SkillName::as_str`] / \[`AsRef`], so the wire behaviour is identical: + +```no_run +use signalwire::agent::{AgentBase, AgentOptions}; +use signalwire::skills::SkillName; +use serde_json::json; + +let mut agent = AgentBase::new(AgentOptions::new("demo")); +agent.add_skill(SkillName::Datetime.as_str(), json!({})); // typed, autocompleted +agent.add_skill("datetime", json!({})); // string still works (parity) +agent.add_skill("my_custom_skill", json!({})); // open set: custom skills ok +assert!(agent.has_skill(SkillName::Datetime.as_str())); +``` + +## Examples + +```rust +use signalwire::agent::{AgentBase, AgentOptions}; +use signalwire::skills::SkillName; +use serde_json::json; + +let mut agent = AgentBase::new(AgentOptions::new("demo")); +agent.add_skill(SkillName::Datetime.as_str(), json!({})); // typed, autocompleted +agent.add_skill("datetime", json!({})); // string still works (parity) +agent.add_skill("my_custom_skill", json!({})); // open set: custom skills ok +assert!(agent.has_skill(SkillName::Datetime.as_str())); +``` + +## Classes + + + + Error returned when a string is parsed into \[`SkillName`] (via \[`FromStr`]) but does not name one of the built-in skills. + + + +## Enums + +### SkillName + +The closed set of skill names that ship built in with this SDK. + +Each variant maps to the canonical snake\_case wire name returned by +\[`SkillName::as_str`] — the same string the [`SkillRegistry`] is keyed by +and that a skill reports from `SkillBase::name`. + +[`SkillRegistry`]: crate::skills::SkillRegistry + +#### Signature + +```rust +enum SkillName +``` + +#### Inheritance + +**Implements:** `Debug`, `Clone`, `Copy`, `PartialEq`, `Eq`, `Hash`, `PartialOrd`, `Ord`, `Display`, `AsRef`, `FromStr`, `From` + +#### Variants + + + `api_ninjas_trivia` + + + + `claude_skills` + + + + `custom_skills` + + + + `datasphere` + + + + `datasphere_serverless` + + + + `datetime` + + + + `google_maps` + + + + `info_gatherer` + + + + `joke` + + + + `math` + + + + `mcp_gateway` + + + + `native_vector_search` + + + + `play_background_file` + + + + `spider` + + + + `swml_transfer` + + + + `weather_api` + + + + `web_search` + + + + `wikipedia_search` + + +#### Methods + +##### all + +Every built-in \[`SkillName`], in declaration order. Useful for +exhaustive iteration (e.g. listing or registering all built-ins). + +###### Signature + +```rust +fn all() -> &'static [?] +``` + +###### Returns + +`&'static [?]` + +###### Source + +[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) + +Line 139. + +*** + +##### as\_ref + +###### Signature + +```rust +fn as_ref(&self) -> &str +``` + +###### Returns + +`&str` + +###### Source + +[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) + +Line 176. + +*** + +##### as\_str + +The canonical snake\_case wire name for this skill (e.g. `"datetime"`). + +This is exactly the string the bare-`str` API expects, so +`agent.add_skill(SkillName::Datetime.as_str(), params)` loads the same +skill as `agent.add_skill("datetime", params)`. + +###### Signature + +```rust +fn as_str(&self) -> &'static str +``` + +###### Returns + +`&'static str` + +###### Source + +[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) + +Line 114. + +*** + +##### clone + +###### Signature + +```rust +fn clone(&self) -> ? +``` + +###### Returns + +`?` + +###### Source + +[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) + +Line 67. + +*** + +##### cmp + +###### Signature + +```rust +fn cmp(&self, other: &?) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) + +Line 67. + +*** + +##### eq + +###### Signature + +```rust +fn eq(&self, other: &?) -> bool +``` + +###### Parameters + + + +###### Returns + +`bool` + +###### Source + +[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) + +Line 67. + +*** + +##### fmt + +###### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) + +Line 67. + +*** + +##### fmt + +###### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) + +Line 170. + +*** + +##### from + +###### Signature + +```rust +fn from(s: ?) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) + +Line 200. + +*** + +##### from + +###### Signature + +```rust +fn from(s: ?) -> &'static str +``` + +###### Parameters + + + +###### Returns + +`&'static str` + +###### Source + +[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) + +Line 206. + +*** + +##### from\_str + +Parse a wire name back into a \[`SkillName`], or `None` if the string is +not a built-in (i.e. a custom / third-party skill name). + +###### Signature + +```rust +fn from_str(name: &str) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) + +Line 164. + +*** + +##### from\_str + +###### Signature + +```rust +fn from_str(s: &str) -> ?::Err> +``` + +###### Parameters + + + +###### Returns + +`?::Err>` + +###### Source + +[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) + +Line 188. + +*** + +##### hash + +###### Signature + +```rust +fn hash<__H: ?>(&self, state: &mut __H) +``` + +###### Type Parameters + + + +###### Parameters + + + +###### Source + +[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) + +Line 67. + +*** + +##### partial\_cmp + +###### Signature + +```rust +fn partial_cmp(&self, other: &?) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) + +Line 67. + +#### Type Aliases + +##### Err + +###### Source + +[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) + +Line 186. + +#### Source + +[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) + +Line 69. + +## Source + +[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/agents/skills/skill-name/parse-skill-name-error/index.mdx b/fern/products/sdk-reference/rust/agents/skills/skill-name/parse-skill-name-error/index.mdx new file mode 100644 index 0000000000..103e919e8c --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/skills/skill-name/parse-skill-name-error/index.mdx @@ -0,0 +1,155 @@ +--- +slug: "/reference/rust/agents/skills/skill-name/parse-skill-name-error" +title: "ParseSkillNameError" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::skills::skill_name::ParseSkillNameError" + parent: "signalwire::skills::skill_name" + module: "agents.skills.skill_name" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs" + visibility: "public" +--- +# `ParseSkillNameError` + +Error returned when a string is parsed into \[`SkillName`] (via \[`FromStr`]) +but does not name one of the built-in skills. + +Unlike the SWAIG media enums, the skill-name set is _open_ (custom skills +are valid), so most callers want the inherent \[`SkillName::from_str`] which +returns `None` for a custom name. The \[`FromStr`] impl exists for the +idiomatic `"datetime".parse::()` and reports the offending input +when it is not a built-in. + +## Signature + +```rust +struct ParseSkillNameError { /* fields */ } +``` + +## Inheritance + +**Implements:** `Debug`, `Clone`, `PartialEq`, `Eq`, `Display`, [Error](/docs/sdk-reference/reference/rust/core/security/webhook-layer/webhook-validate#error) + +## Methods + +### clone + +#### Signature + +```rust +fn clone(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) + +Line 40. + +*** + +### eq + +#### Signature + +```rust +fn eq(&self, other: &?) -> bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) + +Line 40. + +*** + +### fmt + +#### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) + +Line 40. + +*** + +### fmt + +#### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) + +Line 53. + +*** + +### input + +The string that failed to parse as a built-in skill name. + +#### Signature + +```rust +fn input(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) + +Line 47. + +## Source + +[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) + +Line 41. diff --git a/fern/products/sdk-reference/rust/agents/skills/skill-registry/index.mdx b/fern/products/sdk-reference/rust/agents/skills/skill-registry/index.mdx new file mode 100644 index 0000000000..d393ca4145 --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/skills/skill-registry/index.mdx @@ -0,0 +1,48 @@ +--- +slug: "/reference/rust/agents/skills/skill-registry" +title: "skill_registry" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::skills::skill_registry" + parent: "signalwire::skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_registry.rs" + visibility: "public" +--- +# `skill_registry` + +## Classes + + + + Public interface to the global skill registry. + + + +## Type Aliases + +### SkillFactory + +Factory function that creates a new skill instance given parameters. + +#### Signature + +```rust +type SkillFactory = ? +``` + +#### Source + +[`src/skills/skill_registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_registry.rs) + +Line 11. + +## Source + +[`src/skills/skill_registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_registry.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/agents/skills/skill-registry/skill-registry/index.mdx b/fern/products/sdk-reference/rust/agents/skills/skill-registry/skill-registry/index.mdx new file mode 100644 index 0000000000..19c0cb098c --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/skills/skill-registry/skill-registry/index.mdx @@ -0,0 +1,166 @@ +--- +slug: "/reference/rust/agents/skills/skill-registry/skill-registry" +title: "SkillRegistry" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::skills::skill_registry::SkillRegistry" + parent: "signalwire::skills::skill_registry" + module: "agents.skills.skill_registry" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_registry.rs" + visibility: "public" +--- +# `SkillRegistry` + +Public interface to the global skill registry. + +## Signature + +```rust +struct SkillRegistry; +``` + +## Methods + +### add\_skill\_directory + +Register an external directory containing third-party skill +factories. + +Mirrors Python's +`signalwire.skills.registry.SkillRegistry.add_skill_directory`. +Rust cannot dynamically load `.rs` files the way Python loads +`.py` modules from a directory; in Rust, third-party skills +must call \[`SkillRegistry::register_skill`] at startup. The +path is recorded for introspection / logging purposes (matching +the Python `_external_paths` field) so the surface contract +matches. + +**Errors:** + +Returns an error string if the directory does not exist or is +not a directory. + +#### Signature + +```rust +fn add_skill_directory(path: &str) -> ?<(), ?> +``` + +#### Parameters + + + +#### Returns + +`?<(), ?>` + +#### Source + +[`src/skills/skill_registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_registry.rs) + +Line 172. + +*** + +### external\_paths + +Read the list of external skill directories registered via +\[`SkillRegistry::add_skill_directory`]. + +#### Signature + +```rust +fn external_paths() -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/skill_registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_registry.rs) + +Line 190. + +*** + +### get\_factory + +Get the factory for a skill by name. + +#### Signature + +```rust +fn get_factory(name: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/skills/skill_registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_registry.rs) + +Line 130. + +*** + +### list\_skills + +List all registered skill names (sorted). + +#### Signature + +```rust +fn list_skills() -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/skill_registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_registry.rs) + +Line 150. + +*** + +### register\_skill + +Register a custom skill factory. + +#### Signature + +```rust +fn register_skill(name: &str, factory: ?) +``` + +#### Parameters + + + + + +#### Source + +[`src/skills/skill_registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_registry.rs) + +Line 124. + +## Source + +[`src/skills/skill_registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_registry.rs) + +Line 120. diff --git a/fern/products/sdk-reference/rust/agents/swaig/function-result/function-result/index.mdx b/fern/products/sdk-reference/rust/agents/swaig/function-result/function-result/index.mdx new file mode 100644 index 0000000000..8a1a970c9f --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/swaig/function-result/function-result/index.mdx @@ -0,0 +1,1899 @@ +--- +slug: "/reference/rust/agents/swaig/function-result/function-result" +title: "FunctionResult" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::swaig::function_result::FunctionResult" + parent: "signalwire::swaig::function_result" + module: "agents.swaig.function_result" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs" + visibility: "public" +--- +# `FunctionResult` + +Result returned from a SWAIG function handler. + +Serialises to match the Python reference's `to_dict()`: `response` is omitted when empty, +`action` when empty, and `post_process` unless there are actions; an otherwise-empty result +defaults to `{"response": "Action completed."}`. + +**Decorators:** `@must_use` + +## Signature + +```rust +struct FunctionResult { /* fields */ } +``` + +## Inheritance + +**Implements:** `Debug`, `Clone`, `Default` + +## Methods + +### add\_action + +#### Signature + +```rust +fn add_action(&mut self, action: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 133. + +*** + +### add\_actions + +#### Signature + +```rust +fn add_actions(&mut self, actions: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 138. + +*** + +### add\_dynamic\_hints + +#### Signature + +```rust +fn add_dynamic_hints(&mut self, hints: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 552. + +*** + +### clear\_dynamic\_hints + +Clear all dynamic speech-recognition hints. + +Mirrors the Python reference (`FunctionResult.clear_dynamic_hints`), +which appends `{"clear_dynamic_hints": {}}` — the value is an **empty +object**, not a boolean. (`json!({})` serialises to `{}`.) + +#### Signature + +```rust +fn clear_dynamic_hints(&mut self) -> &mut Self +``` + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 562. + +*** + +### clone + +#### Signature + +```rust +fn clone(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 96. + +*** + +### connect + +#### Signature + +```rust +fn connect(&mut self, destination: &str, _final: bool, from: &str) -> &mut Self +``` + +#### Parameters + + + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 200. + +*** + +### create\_payment\_action + +Create a payment action for use in payment prompts. + +Mirrors the Python reference (`FunctionResult.create_payment_action`): +`{"type": action_type, "phrase": phrase}` (`action_type` is `"Say"` for +text-to-speech or `"Play"` for an audio file). + +#### Signature + +```rust +fn create_payment_action(action_type: &str, phrase: &str) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 1225. + +*** + +### create\_payment\_parameter + +Create a payment parameter (name/value pair) for use with `pay`. + +Mirrors the Python reference (`FunctionResult.create_payment_parameter`): +`{"name": name, "value": value}`. + +#### Signature + +```rust +fn create_payment_parameter(name: &str, value: &str) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 1236. + +*** + +### create\_payment\_prompt + +Create a payment-prompt structure for use with `pay`. + +Mirrors the Python reference (`FunctionResult.create_payment_prompt`): +`{"for": for_situation, "actions": actions, "card_type"?, "error_type"?}`. +`actions` is the list of `{type, phrase}` action objects (a JSON array). +`card_type`/`error_type` are emitted only when non-empty. + +#### Signature + +```rust +fn create_payment_prompt( + for_situation: &str, + actions: ?, + card_type: &str, + error_type: &str +) -> ? +``` + +#### Parameters + + + + + + + + + +#### Returns + +`?` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 1202. + +*** + +### default + +#### Signature + +```rust +fn default() -> Self +``` + +#### Returns + +`Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 1245. + +*** + +### enable\_extensive\_data + +#### Signature + +```rust +fn enable_extensive_data(&mut self, enabled: bool) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 600. + +*** + +### enable\_functions\_on\_timeout + +Python: add\_action("functions\_on\_speaker\_timeout", enabled). + +#### Signature + +```rust +fn enable_functions_on_timeout(&mut self, enabled: bool) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 594. + +*** + +### execute\_rpc + +Execute an RPC method on a call (SWML `execute_rpc`). + +Mirrors the Python reference (`FunctionResult.execute_rpc`): the rpc +params are keyed `{method, call_id?, node_id?, params?}` where +`call_id` and `node_id` are **TOP-LEVEL siblings** of `method`/`params` +(NOT nested inside `params`), and the whole `{"execute_rpc": ...}` verb +is wrapped in a canonical SWML document via `execute_swml` — never a +bare action key. There is **no** `jsonrpc` envelope (the previous port +invented one — removed) and method strings are **bare** (`"dial"`, not +`"calling.dial"`). `call_id`/`node_id` are emitted only when non-empty; +`params` is emitted only when it is a non-empty value (Python's +`if params:` — an empty object/null is dropped). + +#### Signature + +```rust +fn execute_rpc( + &mut self, + method: &str, + params: ?, + call_id: &str, + node_id: &str +) -> &mut Self +``` + +#### Parameters + + + + + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 1110. + +*** + +### execute\_swml + +Execute SWML content, optionally marking the call to exit the agent +afterward (`transfer = true`). + +Mirrors the Python reference (`FunctionResult.execute_swml`): the action +key is **always** `"SWML"`; when `transfer` is set, a `"transfer": "true"` +flag is added **inside** the SWML dict (it is not a separate action key). + +Input normalisation matches Python: + +- A JSON **string** is parsed to a dict so the transfer flag can be added; + if it is not valid JSON it falls back to `{"raw_swml": ""}`. +- A JSON **object** is used as-is (a copy, so the transfer flag does not + mutate the caller's value). +- Any other JSON scalar/array is wrapped as `{"raw_swml": }`, + the same fallback Python uses for a non-dict, non-string `swml_content`. + +#### Signature + +```rust +fn execute_swml(&mut self, swml_content: ?, transfer: bool) -> &mut Self +``` + +#### Parameters + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 627. + +*** + +### fmt + +#### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 96. + +*** + +### hangup + +#### Signature + +```rust +fn hangup(&mut self) -> &mut Self +``` + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 252. + +*** + +### hold + +#### Signature + +```rust +fn hold(&mut self, timeout: i64) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 258. + +*** + +### join\_conference + +Join an ad-hoc audio conference (SWML `join_conference`). + +Mirrors the Python reference +(`FunctionResult.join_conference`) — `name` is required and the +remaining 18 parameters are optional with the reference's defaults. +`wait_url` carries the hold-music URL (Python has no `hold_audio` +parameter; this port previously invented one — it is removed). + +The seven closed-set / range validations from the reference are +reproduced and return `Err(message)` with the reference's exact +`ValueError` text (Rust's idiomatic recoverable-validation channel — +the `Err` type is out-of-band to the cross-language audit, which +unwraps `Result` to `T`): + +- `beep` ∈ `{true, false, onEnter, onExit}` +- `0 < max_participants <= 250` +- `record` ∈ `{do-not-record, record-from-start}` +- `trim` ∈ `{trim-silence, do-not-trim}` +- `status_callback_method` ∈ `{GET, POST}` +- `recording_status_callback_method` ∈ `{GET, POST}` +- `name` (trimmed) must not be empty + +When every parameter is left at its default the `join_conference` value +is the bare conference name string; otherwise it is a `{"name": ...}` +object carrying every non-default parameter under its snake\_case wire +key. Either way the verb is wrapped in the canonical SWML document +(`{"SWML": {version, sections: {main: [{join_conference: ...}]}}}`), +matching the reference (which routes join\_conference through +`execute_swml`) — never a bare verb. + +#### Signature + +```rust +fn join_conference( + &mut self, + name: &str, + muted: bool, + beep: &str, + start_on_enter: bool, + end_on_exit: bool, + wait_url: ?<&str>, + max_participants: i64, + record: &str, + region: ?<&str>, + trim: &str, + coach: ?<&str>, + status_callback_event: ?<&str>, + status_callback: ?<&str>, + status_callback_method: &str, + recording_status_callback: ?<&str>, + recording_status_callback_method: &str, + recording_status_callback_event: &str, + result: ? +) -> ?<&mut Self, ?> +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`?<&mut Self, ?>` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 695. + +*** + +### join\_room + +Join a RELAY room (SWML `join_room`). Wrapped in a SWML document, +matching the Python reference. + +#### Signature + +```rust +fn join_room(&mut self, name: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 852. + +*** + +### new + +#### Signature + +```rust +fn new() -> Self +``` + +#### Returns + +`Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 105. + +*** + +### pay + +Process a payment (SWML `pay`). + +Mirrors the Python reference (`FunctionResult.pay`) exactly, including its +wire-key choices and value rendering: + +- the verb is wrapped in a SWML document whose `main` section is + `[{set: {ai_response}}, {pay: pay_params}]` — never a bare verb; +- the input-method key is **`input`** (not `input_method`); +- the status-callback key is **`status_url`** (the previous port invented + `action_url` — removed); +- `timeout`, `max_attempts`, `min_postal_code_length` are **stringified**; + `security_code` is rendered lower-case (`"true"`/`"false"`); +- `payment_method`, `token_type`, `currency`, `language`, `voice`, + `valid_card_types`, and `postal_code` are always emitted; `status_url`, + `charge_amount`, `description`, `parameters`, and `prompts` are emitted + only when supplied. + +`postal_code` is taken as the already-rendered wire string (pass +`"true"`/`"false"` for the boolean cases, or the literal postcode), +mirroring the reference's `Union[bool, str]`. `parameters`/`prompts` are +JSON arrays (`Value::Null` to omit). An empty `ai_response` uses the +reference's default status message. + +#### Signature + +```rust +fn pay( + &mut self, + payment_connector_url: &str, + input_method: &str, + status_url: &str, + payment_method: &str, + timeout: i64, + max_attempts: i64, + security_code: bool, + postal_code: &str, + min_postal_code_length: i64, + token_type: &str, + charge_amount: &str, + currency: &str, + language: &str, + voice: &str, + description: &str, + valid_card_types: &str, + parameters: ?, + prompts: ?, + ai_response: &str +) -> &mut Self +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 1011. + +*** + +### play\_background\_file + +Play an audio/video file in the background. + +Mirrors the Python reference (`FunctionResult.play_background_file`): the +action key is `"playback_bg"`. With `wait = true` the value is +`{"file": filename, "wait": true}` (suppress attention-getting behaviour); +otherwise it is the bare filename string. + +#### Signature + +```rust +fn play_background_file(&mut self, filename: &str, wait: bool) -> &mut Self +``` + +#### Parameters + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 439. + +*** + +### record\_call + +Start background call recording (SWML `record_call`). + +Mirrors the Python reference (`FunctionResult.record_call`): the verb is +wrapped in a SWML document (`{"SWML": {version, sections: {main: [{record_call: params}]}}}`) — never a bare verb — and the reference's +two closed-set validations are reproduced, returning `Err(message)` with +the exact reference `ValueError` text: + +- `format` ∈ `{wav, mp3, mp4}` +- `direction` ∈ `{speak, listen, both}` + +`stereo`, `format`, `direction`, `beep`, and `input_sensitivity` are +**always** emitted (matching the reference, which seeds `record_params` +with all five); `control_id`, `terminators`, `initial_timeout`, +`end_silence_timeout`, `max_length`, and `status_url` are emitted only +when supplied. There is no `initiator` field — the previous port invented +it; it is removed. + +#### Signature + +```rust +fn record_call>: ?>, impl Into>: ?>>( + &mut self, + control_id: &str, + stereo: bool, + format: impl ?>, + direction: impl ?>, + terminators: &str, + beep: bool, + input_sensitivity: f64, + initial_timeout: ?, + end_silence_timeout: ?, + max_length: ?, + status_url: &str +) -> ?<&mut Self, ?> +``` + +#### Type Parameters + + + + + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`?<&mut Self, ?>` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 473. + +*** + +### remove\_global\_data + +Python: add\_action("unset\_global\_data", keys) — the value is the bare key +(Python's `Union[str, List[str]]`, passed through verbatim): a single key +emits the **bare string** (`"plan"`), a list emits the **array** +(`["plan", "chips"]`); no `{"keys": ...}` wrapper. Accepts both call +styles via `impl Into` (`"plan"` or `vec!["plan", "chips"]`). + +#### Signature + +```rust +fn remove_global_data: ?>( + &mut self, + keys: impl ? +) -> &mut Self +``` + +#### Type Parameters + + + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 307. + +*** + +### remove\_metadata + +Python: add\_action("unset\_meta\_data", keys) — the value is the bare key +(Python's `Union[str, List[str]]`, passed through verbatim): a single key +emits the **bare string** (`"token"`), a list emits the **array** +(`["token", "count"]`); no `{"keys": ...}` wrapper. Accepts both call +styles via `impl Into`. + +#### Signature + +```rust +fn remove_metadata: ?>( + &mut self, + keys: impl ? +) -> &mut Self +``` + +#### Type Parameters + + + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 323. + +*** + +### replace\_in\_history + +After first send, replace the tool\_call+result pair in conversation +history. + +Mirrors the Python reference (`FunctionResult.replace_in_history`, whose +`text` parameter is `Union[str, bool] = True`): the action key is +`"replace_in_history"`. `Some(t)` replaces the tool call with an assistant +message containing `t`; `None` uses the default `true`, which removes the +tool\_call+result pair from history entirely. + +#### Signature + +```rust +fn replace_in_history(&mut self, text: ?<&str>) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 418. + +*** + +### rpc\_ai\_message + +Inject a message into an AI agent on another call (via `execute_rpc`). + +Mirrors the Python reference (`FunctionResult.rpc_ai_message`): method +`"ai_message"`, `call_id` carried as the TOP-LEVEL execute\_rpc sibling, +params `{role, message_text}`. `role` defaults to `"system"` and is +caller-overridable (the previous port omitted `role` and mis-nested +`call_id` — fixed). + +#### Signature + +```rust +fn rpc_ai_message( + &mut self, + call_id: &str, + message_text: &str, + role: &str +) -> &mut Self +``` + +#### Parameters + + + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 1167. + +*** + +### rpc\_ai\_unhold + +Unhold another call (via `execute_rpc`). + +Mirrors the Python reference (`FunctionResult.rpc_ai_unhold`): method +`"ai_unhold"`, `call_id` as the TOP-LEVEL execute\_rpc sibling, params +`{}` (which `execute_rpc` drops, since it is empty). + +#### Signature + +```rust +fn rpc_ai_unhold(&mut self, call_id: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 1180. + +*** + +### rpc\_dial + +Dial out to a number with a destination SWML URL (via `execute_rpc`). + +Mirrors the Python reference (`FunctionResult.rpc_dial`): method `"dial"`, +params `{devices: {type: device_type, params: {to_number, from_number}}, +dest_swml}`. `device_type` defaults to `"phone"` and is caller-overridable +(the previous port hard-coded the device and invented +`call_timeout`/`region` — removed). + +#### Signature + +```rust +fn rpc_dial( + &mut self, + to_number: &str, + from_number: &str, + dest_swml: &str, + device_type: &str +) -> &mut Self +``` + +#### Parameters + + + + + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 1140. + +*** + +### say + +#### Signature + +```rust +fn say(&mut self, text: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 428. + +*** + +### send\_sms + +Send a text message to a PSTN number (SWML `send_sms`). + +Mirrors the Python reference (`FunctionResult.send_sms`): the verb is +wrapped in a SWML document — never a bare verb. The reference's +validation is reproduced, returning `Err` with the exact reference +`ValueError` text when neither `body` nor `media` is provided. `body` is +emitted only when non-empty; `media`, `tags`, and `region` are emitted +only when supplied. + +#### Signature + +```rust +fn send_sms( + &mut self, + to: &str, + from: &str, + body: &str, + media: ?<&str>, + tags: ?<&str>, + region: &str +) -> ?<&mut Self, ?> +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`?<&mut Self, ?>` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 955. + +*** + +### set\_end\_of\_speech\_timeout + +#### Signature + +```rust +fn set_end_of_speech_timeout(&mut self, ms: i64) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 567. + +*** + +### set\_metadata + +#### Signature + +```rust +fn set_metadata(&mut self, data: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 313. + +*** + +### set\_post\_process + +#### Signature + +```rust +fn set_post_process(&mut self, val: bool) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 128. + +*** + +### set\_response + +#### Signature + +```rust +fn set_response(&mut self, text: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 123. + +*** + +### set\_speech\_event\_timeout + +#### Signature + +```rust +fn set_speech_event_timeout(&mut self, ms: i64) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 572. + +*** + +### simulate\_user\_input + +Queue simulated user input. + +Mirrors the Python reference (`FunctionResult.simulate_user_input`): +the action key is **`user_input`** (the previous port emitted +`simulate_user_input`, which is the _method_ name, not the wire key). + +#### Signature + +```rust +fn simulate_user_input(&mut self, text: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 1189. + +*** + +### sip\_refer + +Send a SIP REFER (SWML `sip_refer`). Wrapped in a SWML document, matching +the Python reference. + +#### Signature + +```rust +fn sip_refer(&mut self, to_uri: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 859. + +*** + +### stop + +#### Signature + +```rust +fn stop(&mut self) -> &mut Self +``` + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 290. + +*** + +### stop\_background\_file + +Python: add\_action("stop\_playback\_bg", True). + +#### Signature + +```rust +fn stop_background_file(&mut self) -> &mut Self +``` + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 450. + +*** + +### stop\_record\_call + +Stop an active background recording (SWML `stop_record_call`). + +Mirrors the Python reference: the verb is wrapped in a SWML document. The +params are `{"control_id": ...}` when supplied, else `{}` (most-recent). + +#### Signature + +```rust +fn stop_record_call(&mut self, control_id: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 540. + +*** + +### stop\_tap + +Stop an active tap stream (SWML `stop_tap`). Wrapped in a SWML document, +matching the Python reference. + +#### Signature + +```rust +fn stop_tap(&mut self, control_id: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 937. + +*** + +### switch\_context + +Change the agent context/prompt during the conversation. + +Mirrors the Python reference (`FunctionResult.switch_context`): when only +`system_prompt` is supplied (no `user_prompt`/`consolidate`/`full_reset`, +and — for this port's documented `isolated` extension — no `isolated`), +the action value is the **bare system-prompt string** +(`{"context_switch": ""}`). Otherwise it is the object form +carrying every set field. + +#### Signature + +```rust +fn switch_context( + &mut self, + system_prompt: &str, + user_prompt: &str, + consolidate: bool, + full_reset: bool, + isolated: bool +) -> &mut Self +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 369. + +*** + +### swml\_change\_context + +Python: add\_action("change\_context", context\_name) — the value is the +bare context name string (not a `context_switch` dict). + +#### Signature + +```rust +fn swml_change_context(&mut self, context_name: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 356. + +*** + +### swml\_change\_step + +Python: add\_action("change\_step", step\_name) — the value is the bare step +name string (not a `context_switch` dict). + +#### Signature + +```rust +fn swml_change_step(&mut self, step_name: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 349. + +*** + +### swml\_transfer + +Add a SWML transfer action with an AI response set up for when the +transfer completes and control returns to the agent. + +Mirrors the Python reference (`FunctionResult.swml_transfer`): emits a +SWML document whose `main` section is `[{set: {ai_response}}, {transfer: +{dest}}]`, with a top-level `"transfer": str(final).lower()` flag marking +whether the transfer is permanent (`final = true`, the default) or +temporary. `ai_response` is carried inside the SWML `set` verb (it is NOT +assigned to `self.response`). + +#### Signature + +```rust +fn swml_transfer( + &mut self, + dest: &str, + ai_response: &str, + _final: bool +) -> &mut Self +``` + +#### Parameters + + + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 233. + +*** + +### swml\_user\_event + +Send a user event through SWML to update the client UI. + +Mirrors the Python reference (`FunctionResult.swml_user_event`): emits a +`"SWML"` action whose `main` section nests the event payload under +`{"user_event": {"event": event_data}}`. + +#### Signature + +```rust +fn swml_user_event(&mut self, event_data: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 334. + +*** + +### tap + +Start a background call tap (SWML `tap`). + +Mirrors the Python reference (`FunctionResult.tap`): the verb is wrapped +in a SWML document — never a bare verb — and the reference's three +validations are reproduced, returning `Err(message)` with the exact +reference `ValueError` text: + +- `direction` ∈ `{speak, hear, both}` +- `codec` ∈ `{PCMU, PCMA}` +- `rtp_ptime > 0` + +Only `uri` is always emitted; `control_id`, `direction`, `codec`, +`rtp_ptime`, and `status_url` are emitted only when they differ from the +reference defaults (`direction="both"`, `codec="PCMU"`, `rtp_ptime=20`). + +#### Signature + +```rust +fn tap>: ?>, impl Into>: ?>>( + &mut self, + uri: &str, + control_id: &str, + direction: impl ?>, + codec: impl ?>, + rtp_ptime: i64, + status_url: &str +) -> ?<&mut Self, ?> +``` + +#### Type Parameters + + + + + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`?<&mut Self, ?>` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 878. + +*** + +### to\_json + +Compact JSON string. + +#### Signature + +```rust +fn to_json(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 178. + +*** + +### to\_value + +Serialise to a JSON value. + +- `response` is always included. +- `action` is only included if at least one action exists. +- `post_process` is only included if `true`. + +#### Signature + +```rust +fn to_value(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 150. + +*** + +### toggle\_functions + +Enable/disable specific SWAIG functions. + +Mirrors the Python reference (`FunctionResult.toggle_functions`), which +takes a `List[Dict[str, Any]]` (each dict carries `function` + `active`, +plus any further keys) and passes it through verbatim via +`add_action("toggle_functions", function_toggles)`. The action value is +therefore the **ordered list as-is** — order is preserved and arbitrary +keys/values survive. A `HashMap` cannot express this (it +drops ordering and forbids extra keys / non-bool values), so the +parameter is the bare `Vec` list, exactly like `add_dynamic_hints`. + +#### Signature + +```rust +fn toggle_functions(&mut self, function_toggles: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 587. + +*** + +### update\_global\_data + +#### Signature + +```rust +fn update_global_data(&mut self, data: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 297. + +*** + +### update\_settings + +Python: add\_action("settings", settings). + +#### Signature + +```rust +fn update_settings(&mut self, settings: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 606. + +*** + +### wait\_for\_user + +Control how the agent waits for user input. + +Mirrors the Python reference (`FunctionResult.wait_for_user`): the action +value is a **scalar**, chosen by the same precedence — +`answer_first` (the string `"answer_first"`) > `timeout` (bare int) > +`enabled` (bare bool) > the default bare bool `true`. + +#### Signature + +```rust +fn wait_for_user( + &mut self, + enabled: ?, + timeout: ?, + answer_first: ? +) -> &mut Self +``` + +#### Parameters + + + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 271. + +*** + +### with\_response + +#### Signature + +```rust +fn with_response(response: &str) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 113. + +## Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 98. diff --git a/fern/products/sdk-reference/rust/agents/swaig/function-result/index.mdx b/fern/products/sdk-reference/rust/agents/swaig/function-result/index.mdx new file mode 100644 index 0000000000..170411d64d --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/swaig/function-result/index.mdx @@ -0,0 +1,330 @@ +--- +slug: "/reference/rust/agents/swaig/function-result" +title: "function_result" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::swaig::function_result" + parent: "signalwire::swaig" + module: "agents.swaig" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs" + visibility: "public" +--- +# `function_result` + +## Classes + + + + Result returned from a SWAIG function handler. + + + +## Enums + +### KeysArg + +A `Union[str, List[str]]` key argument for \[`FunctionResult::remove_global_data`] +and \[`FunctionResult::remove_metadata`]. + +The Python reference accepts **either** a single key string **or** a list of +keys and passes the value through _verbatim_ — so a `str` emits a **bare +string** (`{"unset_global_data": "plan"}`) and a `list` emits a **list** +(`{"unset_global_data": ["plan", "chips"]}`). A bare `Vec<&str>` parameter +cannot express the single-key bare-string form (it always wraps in a list), +which is a real emission divergence. This enum restores parity: both call +styles compile (`impl Into`), and `into_value` +yields the exact Python wire shape per arm. + +``` +use signalwire::swaig::FunctionResult; +let mut fr = FunctionResult::new(); +fr.remove_global_data("plan"); // -> {"unset_global_data": "plan"} +let mut fr2 = FunctionResult::new(); +fr2.remove_global_data(vec!["plan", "chips"]); // -> {"unset_global_data": ["plan","chips"]} +``` + +[`FunctionResult::remove_global_data`]: crate::swaig::FunctionResult::remove_global_data + +[`FunctionResult::remove_metadata`]: crate::swaig::FunctionResult::remove_metadata + +#### Signature + +```rust +enum KeysArg +``` + +#### Inheritance + +**Implements:** `Debug`, `Clone`, `PartialEq`, `Eq`, `From` + +#### Variants + + + A list of keys — emits the key array (Python's `List[str]` arm). + + + + A single key — emits the bare key string (Python's `str` arm). + + +#### Methods + +##### clone + +###### Signature + +```rust +fn clone(&self) -> ? +``` + +###### Returns + +`?` + +###### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 35. + +*** + +##### eq + +###### Signature + +```rust +fn eq(&self, other: &?) -> bool +``` + +###### Parameters + + + +###### Returns + +`bool` + +###### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 35. + +*** + +##### fmt + +###### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 35. + +*** + +##### from + +###### Signature + +```rust +fn from(s: &str) -> Self +``` + +###### Parameters + + + +###### Returns + +`Self` + +###### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 56. + +*** + +##### from + +###### Signature + +```rust +fn from(s: ?) -> Self +``` + +###### Parameters + + + +###### Returns + +`Self` + +###### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 62. + +*** + +##### from + +###### Signature + +```rust +fn from(s: &?) -> Self +``` + +###### Parameters + + + +###### Returns + +`Self` + +###### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 68. + +*** + +##### from + +###### Signature + +```rust +fn from(v: ?<&str>) -> Self +``` + +###### Parameters + + + +###### Returns + +`Self` + +###### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 74. + +*** + +##### from + +###### Signature + +```rust +fn from(v: ?) -> Self +``` + +###### Parameters + + + +###### Returns + +`Self` + +###### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 80. + +*** + +##### from + +###### Signature + +```rust +fn from(v: &[&str]) -> Self +``` + +###### Parameters + + + +###### Returns + +`Self` + +###### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 86. + +*** + +##### into\_value + +The JSON wire value for this argument: a bare string for `One`, +an array for `Many` — byte-identical to Python's +pass-through of its `Union[str, List[str]]` value. + +###### Signature + +```rust +fn into_value(self) -> ? +``` + +###### Returns + +`?` + +###### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 47. + +#### Examples + +```rust +use signalwire::swaig::FunctionResult; +let mut fr = FunctionResult::new(); +fr.remove_global_data("plan"); // -> {"unset_global_data": "plan"} +let mut fr2 = FunctionResult::new(); +fr2.remove_global_data(vec!["plan", "chips"]); // -> {"unset_global_data": ["plan","chips"]} +``` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 36. + +## Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/agents/swaig/index.mdx b/fern/products/sdk-reference/rust/agents/swaig/index.mdx new file mode 100644 index 0000000000..f2c9a9d6c0 --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/swaig/index.mdx @@ -0,0 +1,36 @@ +--- +slug: "/reference/rust/agents/swaig" +title: "swaig" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::swaig" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/mod.rs" + visibility: "public" +--- +# `swaig` + +## Modules + + + + + + Typed, compile-time-checked closed sets for SWML media-action parameters. + + + + Typed builder for SWAIG tool-parameter JSON schemas. + + + +## Source + +[`src/swaig/mod.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/mod.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/agents/swaig/media-enums/index.mdx b/fern/products/sdk-reference/rust/agents/swaig/media-enums/index.mdx new file mode 100644 index 0000000000..c5792ae7a7 --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/swaig/media-enums/index.mdx @@ -0,0 +1,1939 @@ +--- +slug: "/reference/rust/agents/swaig/media-enums" +title: "media_enums" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::swaig::media_enums" + parent: "signalwire::swaig" + module: "agents.swaig" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs" + visibility: "public" +--- +# `media_enums` + +Typed, compile-time-checked closed sets for SWML media-action parameters. + +Several `FunctionResult` media helpers take +parameters that the Python reference _validates_ against a fixed set and +rejects with `ValueError` otherwise: + +\| Helper | Parameter | Allowed values (Python reference) | +\|-------------------|-------------|------------------------------------------| +\| `record_call` | `format` | `"wav"`, `"mp3"`, `"mp4"` | +\| `record_call` | `direction` | `"speak"`, `"listen"`, `"both"` | +\| `tap` | `direction` | `"speak"`, `"hear"`, `"both"` | +\| `tap` | `codec` | `"PCMU"`, `"PCMA"` | + +In Python a typo (`record_call(format="ogg")`) only fails at runtime with a +`ValueError`. These enums give the same closed sets a typed alternative so +the typo fails at the **call site** with editor autocompletion and +exhaustive matching. + +The consuming methods take `format: impl Into>` (and +likewise for `direction`/`codec`), so the **same parameter** accepts both +the typed enum _and_ a raw wire string (\[`MediaArg`] wraps the two). The raw +`&str` path stays available for Python parity / forward-compat; an out-of-set +raw value is still rejected in the method body with the reference's exact +`ValueError` text, and the emitted SWML is byte-identical either way: + +```no_run +use signalwire::swaig::FunctionResult; +use signalwire::swaig::{RecordFormat, RecordDirection}; + +let mut fr = FunctionResult::new(); +// typed + autocompleted — identical wire shape to the bare strings below +fr.record_call("rec1", false, RecordFormat::Mp3, RecordDirection::Both, + "", false, 44.0, None, None, None, "").unwrap(); +// bare strings still work (Python parity) +fr.record_call("rec2", false, "mp3", "both", "", false, 44.0, None, None, None, "").unwrap(); +``` + +Note that `record_call`'s direction set (`speak`/`listen`/`both`) and +`tap`'s direction set (`speak`/`hear`/`both`) are **different** — `tap` uses +`hear` where `record_call` uses `listen` — so they are modelled as two +distinct enums, \[`RecordDirection`] and \[`TapDirection`], faithfully +mirroring the reference's two separate validation lists. + +## Examples + +```rust +use signalwire::swaig::FunctionResult; +use signalwire::swaig::{RecordFormat, RecordDirection}; + +let mut fr = FunctionResult::new(); +// typed + autocompleted — identical wire shape to the bare strings below +fr.record_call("rec1", false, RecordFormat::Mp3, RecordDirection::Both, + "", false, 44.0, None, None, None, "").unwrap(); +// bare strings still work (Python parity) +fr.record_call("rec2", false, "mp3", "both", "", false, 44.0, None, None, None, "").unwrap(); +``` + +## Classes + + + + Error returned when a string is parsed into one of the closed-set media enums (via \[`FromStr`]) but is not a recognised wire value. + + + +## Enums + +### Codec + +Media codec for \[`FunctionResult::tap`]. + +Mirrors the Python reference's `valid_codecs = ["PCMU", "PCMA"]` +validation. The wire strings are upper-case (`"PCMU"` / `"PCMA"`). + +[`FunctionResult::tap`]: crate::swaig::FunctionResult::tap + +#### Signature + +```rust +enum Codec +``` + +#### Inheritance + +**Implements:** `Debug`, `Clone`, `Copy`, `PartialEq`, `Eq`, `Hash`, `PartialOrd`, `Ord`, `Display`, `AsRef`, `FromStr`, `From` + +#### Variants + + + `PCMA` (G.711 A-law). + + + + `PCMU` (G.711 µ-law, the reference default). + + +#### Methods + +##### all + +Every \[`Codec`], in declaration order. + +###### Signature + +```rust +fn all() -> &'static [?] +``` + +###### Returns + +`&'static [?]` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 364. + +*** + +##### as\_ref + +###### Signature + +```rust +fn as_ref(&self) -> &str +``` + +###### Returns + +`&str` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 383. + +*** + +##### as\_str + +The canonical (upper-case) wire string for this codec (e.g. `"PCMU"`). + +###### Signature + +```rust +fn as_str(&self) -> &'static str +``` + +###### Returns + +`&'static str` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 356. + +*** + +##### clone + +###### Signature + +```rust +fn clone(&self) -> ? +``` + +###### Returns + +`?` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 345. + +*** + +##### cmp + +###### Signature + +```rust +fn cmp(&self, other: &?) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 345. + +*** + +##### eq + +###### Signature + +```rust +fn eq(&self, other: &?) -> bool +``` + +###### Parameters + + + +###### Returns + +`bool` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 345. + +*** + +##### fmt + +###### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 345. + +*** + +##### fmt + +###### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 377. + +*** + +##### from + +###### Signature + +```rust +fn from(v: ?) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 403. + +*** + +##### from + +###### Signature + +```rust +fn from(v: ?) -> &'static str +``` + +###### Parameters + + + +###### Returns + +`&'static str` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 409. + +*** + +##### from + +###### Signature + +```rust +fn from(e: ?) -> Self +``` + +###### Parameters + + + +###### Returns + +`Self` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 510. + +*** + +##### from\_str + +Parse a wire string into a \[`Codec`], or `None` if it is not a +recognised codec. Matching is exact (case-sensitive), mirroring the +reference's literal `in ["PCMU", "PCMA"]` check. + +###### Signature + +```rust +fn from_str(s: &str) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 371. + +*** + +##### from\_str + +###### Signature + +```rust +fn from_str(s: &str) -> ?::Err> +``` + +###### Parameters + + + +###### Returns + +`?::Err>` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 393. + +*** + +##### hash + +###### Signature + +```rust +fn hash<__H: ?>(&self, state: &mut __H) +``` + +###### Type Parameters + + + +###### Parameters + + + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 345. + +*** + +##### partial\_cmp + +###### Signature + +```rust +fn partial_cmp(&self, other: &?) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 345. + +#### Type Aliases + +##### Err + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 391. + +#### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 347. + +*** + +### MediaArg + +The accepted value of a closed-set media-action parameter — _either_ the +typed enum (`RecordFormat::Mp3`) _or_ a raw wire string (`"mp3"`). + +This is the parameter type behind [`FunctionResult::record_call`]'s +`format`/`direction` and [`FunctionResult::tap`]'s `direction`/`codec` +(each method takes `impl Into>`). It exists so a single +parameter can be driven _both_ ways with no overloads: + +```no_run +use signalwire::swaig::FunctionResult; +use signalwire::swaig::RecordFormat; + +let mut fr = FunctionResult::new(); +// typed + autocompleted — fails at the call site on a typo +fr.record_call("r", false, RecordFormat::Mp3, "both", "", false, 44.0, None, None, None, "").unwrap(); +// raw &str still compiles (Python parity / forward-compat) and emits the +// byte-identical SWML +fr.record_call("r", false, "mp3", "both", "", false, 44.0, None, None, None, "").unwrap(); +``` + +**Validation is unchanged and still matches the Python reference.** The raw +arm carries the string _verbatim_ into the method body, where the same +closed-set check runs and rejects an out-of-set value with the reference's +exact `ValueError` text — e.g. `record_call(.., "ogg", ..)` still returns +`Err("format must be 'wav', 'mp3', or 'mp4'")`. The typed arm is always +valid by construction. Either way `wire` yields the exact +wire string, so the emitted SWML is byte-identical between the two call +styles. + +[`FunctionResult::record_call`]: crate::swaig::FunctionResult::record_call + +[`FunctionResult::tap`]: crate::swaig::FunctionResult::tap + +#### Signature + +```rust +enum MediaArg +``` + +#### Inheritance + +**Implements:** `Debug`, `Clone`, `PartialEq`, `Eq`, `From` + +#### Variants + + + A raw wire string, carried verbatim. Validated in the method body exactly as the Python reference validates its `str` argument. + + + + The typed, closed-set enum value (always a valid wire string). + + +#### Methods + +##### clone + +###### Signature + +```rust +fn clone(&self) -> ? +``` + +###### Returns + +`?` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 447. + +*** + +##### eq + +###### Signature + +```rust +fn eq(&self, other: &?) -> bool +``` + +###### Parameters + + + +###### Returns + +`bool` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 447. + +*** + +##### fmt + +###### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 447. + +*** + +##### from + +###### Signature + +```rust +fn from(s: &str) -> Self +``` + +###### Parameters + + + +###### Returns + +`Self` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 474. + +*** + +##### from + +###### Signature + +```rust +fn from(s: ?) -> Self +``` + +###### Parameters + + + +###### Returns + +`Self` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 480. + +*** + +##### from + +###### Signature + +```rust +fn from(s: &?) -> Self +``` + +###### Parameters + + + +###### Returns + +`Self` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 486. + +*** + +##### wire + +The wire string this argument resolves to. For `Typed` +it is the enum's canonical `as_str()`; for `Raw` it is +the string verbatim. The method body validates this value against the +closed set before emitting it (Python-reference parity). + +###### Signature + +```rust +fn wire(&self) -> &str +``` + +###### Returns + +`&str` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 461. + +#### Examples + +```rust +use signalwire::swaig::FunctionResult; +use signalwire::swaig::RecordFormat; + +let mut fr = FunctionResult::new(); +// typed + autocompleted — fails at the call site on a typo +fr.record_call("r", false, RecordFormat::Mp3, "both", "", false, 44.0, None, None, None, "").unwrap(); +// raw &str still compiles (Python parity / forward-compat) and emits the +// byte-identical SWML +fr.record_call("r", false, "mp3", "both", "", false, 44.0, None, None, None, "").unwrap(); +``` + +#### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 448. + +*** + +### RecordDirection + +Audio direction for \[`FunctionResult::record_call`]. + +Mirrors the Python reference's +`direction in ["speak", "listen", "both"]` validation. Note this differs +from \[`TapDirection`], which uses `hear` instead of `listen`. + +[`FunctionResult::record_call`]: crate::swaig::FunctionResult::record_call + +#### Signature + +```rust +enum RecordDirection +``` + +#### Inheritance + +**Implements:** `Debug`, `Clone`, `Copy`, `PartialEq`, `Eq`, `Hash`, `PartialOrd`, `Ord`, `Display`, `AsRef`, `FromStr`, `From` + +#### Variants + + + `both` — what the party hears and says (the reference default). + + + + `listen` — what the party hears. + + + + `speak` — what the party says. + + +#### Methods + +##### all + +Every \[`RecordDirection`], in declaration order. + +###### Signature + +```rust +fn all() -> &'static [?] +``` + +###### Returns + +`&'static [?]` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 204. + +*** + +##### as\_ref + +###### Signature + +```rust +fn as_ref(&self) -> &str +``` + +###### Returns + +`&str` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 226. + +*** + +##### as\_str + +The canonical wire string for this direction (e.g. `"both"`). + +###### Signature + +```rust +fn as_str(&self) -> &'static str +``` + +###### Returns + +`&'static str` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 195. + +*** + +##### clone + +###### Signature + +```rust +fn clone(&self) -> ? +``` + +###### Returns + +`?` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 182. + +*** + +##### cmp + +###### Signature + +```rust +fn cmp(&self, other: &?) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 182. + +*** + +##### eq + +###### Signature + +```rust +fn eq(&self, other: &?) -> bool +``` + +###### Parameters + + + +###### Returns + +`bool` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 182. + +*** + +##### fmt + +###### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 182. + +*** + +##### fmt + +###### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 220. + +*** + +##### from + +###### Signature + +```rust +fn from(v: ?) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 248. + +*** + +##### from + +###### Signature + +```rust +fn from(v: ?) -> &'static str +``` + +###### Parameters + + + +###### Returns + +`&'static str` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 254. + +*** + +##### from + +###### Signature + +```rust +fn from(e: ?) -> Self +``` + +###### Parameters + + + +###### Returns + +`Self` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 498. + +*** + +##### from\_str + +Parse a wire string into a \[`RecordDirection`], or `None` if it is not a +recognised direction. + +###### Signature + +```rust +fn from_str(s: &str) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 214. + +*** + +##### from\_str + +###### Signature + +```rust +fn from_str(s: &str) -> ?::Err> +``` + +###### Parameters + + + +###### Returns + +`?::Err>` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 236. + +*** + +##### hash + +###### Signature + +```rust +fn hash<__H: ?>(&self, state: &mut __H) +``` + +###### Type Parameters + + + +###### Parameters + + + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 182. + +*** + +##### partial\_cmp + +###### Signature + +```rust +fn partial_cmp(&self, other: &?) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 182. + +#### Type Aliases + +##### Err + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 234. + +#### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 184. + +*** + +### RecordFormat + +Recording container format for \[`FunctionResult::record_call`]. + +Mirrors the Python reference's `format in ["wav", "mp3", "mp4"]` validation. + +[`FunctionResult::record_call`]: crate::swaig::FunctionResult::record_call + +#### Signature + +```rust +enum RecordFormat +``` + +#### Inheritance + +**Implements:** `Debug`, `Clone`, `Copy`, `PartialEq`, `Eq`, `Hash`, `PartialOrd`, `Ord`, `Display`, `AsRef`, `FromStr`, `From` + +#### Variants + + + `mp3` + + + + `mp4` + + + + `wav` (the reference default). + + +#### Methods + +##### all + +Every \[`RecordFormat`], in declaration order. + +###### Signature + +```rust +fn all() -> &'static [?] +``` + +###### Returns + +`&'static [?]` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 125. + +*** + +##### as\_ref + +###### Signature + +```rust +fn as_ref(&self) -> &str +``` + +###### Returns + +`&str` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 143. + +*** + +##### as\_str + +The canonical wire string for this format (e.g. `"wav"`). + +This is exactly the string the raw-`str` call style carries, so +`record_call(.., RecordFormat::Mp3, ..)` emits the same SWML as +`record_call(.., "mp3", ..)` — both resolve here via \[`MediaArg`]. + +###### Signature + +```rust +fn as_str(&self) -> &'static str +``` + +###### Returns + +`&'static str` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 116. + +*** + +##### clone + +###### Signature + +```rust +fn clone(&self) -> ? +``` + +###### Returns + +`?` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 99. + +*** + +##### cmp + +###### Signature + +```rust +fn cmp(&self, other: &?) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 99. + +*** + +##### eq + +###### Signature + +```rust +fn eq(&self, other: &?) -> bool +``` + +###### Parameters + + + +###### Returns + +`bool` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 99. + +*** + +##### fmt + +###### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 99. + +*** + +##### fmt + +###### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 137. + +*** + +##### from + +###### Signature + +```rust +fn from(v: ?) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 164. + +*** + +##### from + +###### Signature + +```rust +fn from(v: ?) -> &'static str +``` + +###### Parameters + + + +###### Returns + +`&'static str` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 170. + +*** + +##### from + +###### Signature + +```rust +fn from(e: ?) -> Self +``` + +###### Parameters + + + +###### Returns + +`Self` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 492. + +*** + +##### from\_str + +Parse a wire string into a \[`RecordFormat`], or `None` if it is not a +recognised format (the same strings the reference would reject). + +###### Signature + +```rust +fn from_str(s: &str) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 131. + +*** + +##### from\_str + +###### Signature + +```rust +fn from_str(s: &str) -> ?::Err> +``` + +###### Parameters + + + +###### Returns + +`?::Err>` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 154. + +*** + +##### hash + +###### Signature + +```rust +fn hash<__H: ?>(&self, state: &mut __H) +``` + +###### Type Parameters + + + +###### Parameters + + + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 99. + +*** + +##### partial\_cmp + +###### Signature + +```rust +fn partial_cmp(&self, other: &?) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 99. + +#### Type Aliases + +##### Err + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 152. + +#### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 101. + +*** + +### TapDirection + +Audio direction for \[`FunctionResult::tap`]. + +Mirrors the Python reference's +`valid_directions = ["speak", "hear", "both"]` validation. Note this differs +from \[`RecordDirection`], which uses `listen` instead of `hear`. + +[`FunctionResult::tap`]: crate::swaig::FunctionResult::tap + +#### Signature + +```rust +enum TapDirection +``` + +#### Inheritance + +**Implements:** `Debug`, `Clone`, `Copy`, `PartialEq`, `Eq`, `Hash`, `PartialOrd`, `Ord`, `Display`, `AsRef`, `FromStr`, `From` + +#### Variants + + + `both` — what the party hears and says (the reference default). + + + + `hear` — what the party hears. + + + + `speak` — what the party says. + + +#### Methods + +##### all + +Every \[`TapDirection`], in declaration order. + +###### Signature + +```rust +fn all() -> &'static [?] +``` + +###### Returns + +`&'static [?]` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 288. + +*** + +##### as\_ref + +###### Signature + +```rust +fn as_ref(&self) -> &str +``` + +###### Returns + +`&str` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 306. + +*** + +##### as\_str + +The canonical wire string for this direction (e.g. `"both"`). + +###### Signature + +```rust +fn as_str(&self) -> &'static str +``` + +###### Returns + +`&'static str` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 279. + +*** + +##### clone + +###### Signature + +```rust +fn clone(&self) -> ? +``` + +###### Returns + +`?` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 266. + +*** + +##### cmp + +###### Signature + +```rust +fn cmp(&self, other: &?) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 266. + +*** + +##### eq + +###### Signature + +```rust +fn eq(&self, other: &?) -> bool +``` + +###### Parameters + + + +###### Returns + +`bool` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 266. + +*** + +##### fmt + +###### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 266. + +*** + +##### fmt + +###### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 300. + +*** + +##### from + +###### Signature + +```rust +fn from(v: ?) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 328. + +*** + +##### from + +###### Signature + +```rust +fn from(v: ?) -> &'static str +``` + +###### Parameters + + + +###### Returns + +`&'static str` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 334. + +*** + +##### from + +###### Signature + +```rust +fn from(e: ?) -> Self +``` + +###### Parameters + + + +###### Returns + +`Self` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 504. + +*** + +##### from\_str + +Parse a wire string into a \[`TapDirection`], or `None` if it is not a +recognised direction. + +###### Signature + +```rust +fn from_str(s: &str) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 294. + +*** + +##### from\_str + +###### Signature + +```rust +fn from_str(s: &str) -> ?::Err> +``` + +###### Parameters + + + +###### Returns + +`?::Err>` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 316. + +*** + +##### hash + +###### Signature + +```rust +fn hash<__H: ?>(&self, state: &mut __H) +``` + +###### Type Parameters + + + +###### Parameters + + + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 266. + +*** + +##### partial\_cmp + +###### Signature + +```rust +fn partial_cmp(&self, other: &?) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 266. + +#### Type Aliases + +##### Err + +###### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 314. + +#### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 268. + +## Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/agents/swaig/media-enums/parse-media-enum-error/index.mdx b/fern/products/sdk-reference/rust/agents/swaig/media-enums/parse-media-enum-error/index.mdx new file mode 100644 index 0000000000..c05ca0d469 --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/swaig/media-enums/parse-media-enum-error/index.mdx @@ -0,0 +1,155 @@ +--- +slug: "/reference/rust/agents/swaig/media-enums/parse-media-enum-error" +title: "ParseMediaEnumError" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::swaig::media_enums::ParseMediaEnumError" + parent: "signalwire::swaig::media_enums" + module: "agents.swaig.media_enums" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs" + visibility: "public" +--- +# `ParseMediaEnumError` + +Error returned when a string is parsed into one of the closed-set media +enums (via \[`FromStr`]) but is not a recognised wire value. + +Carries the offending input and the enum's accepted set so the message is +actionable — e.g. `"foo" is not a valid RecordFormat (expected one of: +wav, mp3, mp4)`. This is the typed analogue of the Python reference's +`ValueError`, surfaced through the idiomatic `"wav".parse::()` +entry point. + +## Signature + +```rust +struct ParseMediaEnumError { /* fields */ } +``` + +## Inheritance + +**Implements:** `Debug`, `Clone`, `PartialEq`, `Eq`, `Display`, [Error](/docs/sdk-reference/reference/rust/core/security/webhook-layer/webhook-validate#error) + +## Methods + +### clone + +#### Signature + +```rust +fn clone(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 55. + +*** + +### eq + +#### Signature + +```rust +fn eq(&self, other: &?) -> bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 55. + +*** + +### fmt + +#### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 55. + +*** + +### fmt + +#### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 81. + +*** + +### input + +The string that failed to parse. + +#### Signature + +```rust +fn input(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 75. + +## Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 56. diff --git a/fern/products/sdk-reference/rust/agents/swaig/params-builder/index.mdx b/fern/products/sdk-reference/rust/agents/swaig/params-builder/index.mdx new file mode 100644 index 0000000000..98cb3cc778 --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/swaig/params-builder/index.mdx @@ -0,0 +1,398 @@ +--- +slug: "/reference/rust/agents/swaig/params-builder" +title: "params_builder" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::swaig::params_builder" + parent: "signalwire::swaig" + module: "agents.swaig" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs" + visibility: "public" +--- +# `params_builder` + +Typed builder for SWAIG tool-parameter JSON schemas. + +[`AgentBase::define_tool`] / [`Service::define_tool`] take the function's +parameter schema as an untyped `serde_json::Value` — a `properties` object +hand-written as nested `json!({ ... })`: + +```ignore +agent.define_tool( + "search_faqs", + "Search the FAQ knowledge base", + json!({ + "query": {"type": "string", "description": "The question or keywords"}, + }), + handler, + false, +); +``` + +That is easy to typo (`"strign"`, `"desciption"`, a forgotten `"type"`) and +the compiler can't help. \[`ParamsBuilder`] is an _additive_, fully-typed +convenience over the **exact same wire output**: it produces the identical +`properties` object — so it drops straight into the existing, unchanged +`define_tool` path. It is not a new format. + +```no_run +use signalwire::swaig::ParamsBuilder; +use serde_json::json; + +let params = ParamsBuilder::new() + .string("query", "The question or keywords to search") + .build(); + +// Byte-identical to the hand-written form above: +assert_eq!( + params, + json!({"query": {"type": "string", "description": "The question or keywords to search"}}) +); +``` + +## Two outputs, both byte-identical to the hand-written forms + +- `build` returns the **`properties` object** — what + Rust's `define_tool(parameters)` accepts (it wraps it as + `{"type":"object","properties": }`). +- `build_schema` returns the **full** JSON + schema `{"type":"object","properties":{…},"required":[…]}` — exactly the + shape the Python reference's `_ensure_parameter_structure` emits and the + shape hand-written for `register_swaig_function` / DataMap full + definitions. This is the form that carries a top-level + `required` list. + +## Closed-set (enum) properties + +`enum_of` renders a schema `"enum": [...]` from any +iterator of `impl AsRef`, so the Tier-1 media enums plug straight in via +their `all()` slices: + +```no_run +use signalwire::swaig::{ParamsBuilder, RecordFormat}; +use serde_json::json; + +let params = ParamsBuilder::new() + .enum_of("fmt", RecordFormat::all(), "Recording container format") + .build(); + +assert_eq!( + params, + json!({"fmt": {"type": "string", "enum": ["wav", "mp3", "mp4"], "description": "Recording container format"}}) +); +``` + +[`AgentBase::define_tool`]: crate::agent::AgentBase::define_tool + +[`Service::define_tool`]: crate::swml::service::Service::define_tool + +## Examples + + + + ```rust + agent.define_tool( + "search_faqs", + "Search the FAQ knowledge base", + json!({ + "query": {"type": "string", "description": "The question or keywords"}, + }), + handler, + false, + ); + ``` + + + + ```rust + use signalwire::swaig::ParamsBuilder; + use serde_json::json; + + let params = ParamsBuilder::new() + .string("query", "The question or keywords to search") + .build(); + + // Byte-identical to the hand-written form above: + assert_eq!( + params, + json!({"query": {"type": "string", "description": "The question or keywords to search"}}) + ); + ``` + + + + ```rust + use signalwire::swaig::{ParamsBuilder, RecordFormat}; + use serde_json::json; + + let params = ParamsBuilder::new() + .enum_of("fmt", RecordFormat::all(), "Recording container format") + .build(); + + assert_eq!( + params, + json!({"fmt": {"type": "string", "enum": ["wav", "mp3", "mp4"], "description": "Recording container format"}}) + ); + ``` + + + +## Classes + + + + Fluent, typed builder for a SWAIG tool's parameter schema. + + + + A single parameter property under construction. + + + +## Enums + +### ParamKind + +The JSON-Schema primitive types a SWAIG parameter property can declare. + +Used by \[`ParamsBuilder::array`] (the element kind) and, indirectly, by the +per-kind builder methods. The `as_str` value is the literal that lands in +the schema's `"type"` field. + +#### Signature + +```rust +enum ParamKind +``` + +#### Inheritance + +**Implements:** `Debug`, `Clone`, `Copy`, `PartialEq`, `Eq`, `Hash`, `PartialOrd`, `Ord`, `Display` + +#### Variants + + + `"array"` + + + + `"boolean"` + + + + `"integer"` + + + + `"number"` (floating point) + + + + `"object"` + + + + `"string"` + + +#### Methods + +##### as\_str + +The canonical JSON-Schema `"type"` string for this kind. + +###### Signature + +```rust +fn as_str(&self) -> &'static str +``` + +###### Returns + +`&'static str` + +###### Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 101. + +*** + +##### clone + +###### Signature + +```rust +fn clone(&self) -> ? +``` + +###### Returns + +`?` + +###### Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 82. + +*** + +##### cmp + +###### Signature + +```rust +fn cmp(&self, other: &?) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 82. + +*** + +##### eq + +###### Signature + +```rust +fn eq(&self, other: &?) -> bool +``` + +###### Parameters + + + +###### Returns + +`bool` + +###### Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 82. + +*** + +##### fmt + +###### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 82. + +*** + +##### fmt + +###### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 114. + +*** + +##### hash + +###### Signature + +```rust +fn hash<__H: ?>(&self, state: &mut __H) +``` + +###### Type Parameters + + + +###### Parameters + + + +###### Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 82. + +*** + +##### partial\_cmp + +###### Signature + +```rust +fn partial_cmp(&self, other: &?) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 82. + +#### Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 84. + +## Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/agents/swaig/params-builder/params-builder/index.mdx b/fern/products/sdk-reference/rust/agents/swaig/params-builder/params-builder/index.mdx new file mode 100644 index 0000000000..31429ed015 --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/swaig/params-builder/params-builder/index.mdx @@ -0,0 +1,531 @@ +--- +slug: "/reference/rust/agents/swaig/params-builder/params-builder" +title: "ParamsBuilder" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::swaig::params_builder::ParamsBuilder" + parent: "signalwire::swaig::params_builder" + module: "agents.swaig.params_builder" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs" + visibility: "public" +--- +# `ParamsBuilder` + +Fluent, typed builder for a SWAIG tool's parameter schema. + +Build up the parameters one property at a time, then call +`build` to get the `properties` object for `define_tool`, or +`build_schema` for the full +`{"type":"object","properties":{…},"required":[…]}` schema. See the +module docs for the full picture and byte-identity guarantees. + +```no_run +use signalwire::swaig::{ParamsBuilder, RecordFormat}; + +let params = ParamsBuilder::new() + .string("service", "The service the customer is asking about") + .string("date", "Appointment date, YYYY-MM-DD") + .integer("party_size", "Number of people") + .boolean("confirmed", "Whether the user confirmed") + .enum_of("fmt", RecordFormat::all(), "Recording container format") + .required(["service", "date"]) + .build(); +``` + +**Decorators:** `@must_use` + +## Signature + +```rust +struct ParamsBuilder { /* fields */ } +``` + +## Inheritance + +**Implements:** `Debug`, `Clone`, `Default` + +## Examples + +```rust +use signalwire::swaig::{ParamsBuilder, RecordFormat}; + +let params = ParamsBuilder::new() + .string("service", "The service the customer is asking about") + .string("date", "Appointment date, YYYY-MM-DD") + .integer("party_size", "Number of people") + .boolean("confirmed", "Whether the user confirmed") + .enum_of("fmt", RecordFormat::all(), "Recording container format") + .required(["service", "date"]) + .build(); +``` + +## Methods + +### array + +Add an `array` property whose elements are `items` (a \[`ParamKind`]), +with `description`. + +#### Signature + +```rust +fn array(self, name: &str, items: ?, description: &str) -> Self +``` + +#### Parameters + + + + + + + +#### Returns + +`Self` + +#### Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 325. + +*** + +### boolean + +Add a `boolean` property with `description`. + +#### Signature + +```rust +fn boolean(self, name: &str, description: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 291. + +*** + +### build + +Render just the **`properties` object** — the value Rust's +`define_tool(parameters)` accepts (it wraps it as +`{"type":"object","properties": }`). + +Byte-identical to the hand-written `json!({ : { … } })` form. The +top-level `required` list is **not** included here (it +has no slot inside a bare `properties` object); use +`build_schema` when you need it. + +**Decorators:** `@must_use` + +#### Signature + +```rust +fn build(self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 375. + +*** + +### build\_schema + +Render the **full JSON schema**: +`{"type":"object","properties":{…}}`, plus `"required":[…]` when a +top-level `required` list was declared. + +Byte-identical to the Python reference's `_ensure_parameter_structure` +output and to the hand-written full-schema forms used with +`register_swaig_function` / DataMap definitions. + +**Decorators:** `@must_use` + +#### Signature + +```rust +fn build_schema(self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 387. + +*** + +### clone + +#### Signature + +```rust +fn clone(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 259. + +*** + +### default + +#### Signature + +```rust +fn default() -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 259. + +*** + +### enum\_of + +Add a closed-set (`enum`) property with `description`. + +`variants` is any iterator of `impl AsRef`, so the Tier-1 media +enums plug in directly: + +```no_run +use signalwire::swaig::{ParamsBuilder, TapDirection}; +use serde_json::json; + +let params = ParamsBuilder::new() + .enum_of("direction", TapDirection::all(), "Audio direction to tap") + .build(); +assert_eq!( + params["direction"]["enum"], + json!(["speak", "hear", "both"]) +); +``` + +#### Signature + +```rust +fn enum_of( + self, + name: &str, + variants: I, + description: &str +) -> Self where I: ?, S: ? +``` + +#### Type Parameters + + + + + +#### Parameters + + + + + + + +#### Returns + +`Self` + +#### Examples + +```rust +use signalwire::swaig::{ParamsBuilder, TapDirection}; +use serde_json::json; + +let params = ParamsBuilder::new() + .enum_of("direction", TapDirection::all(), "Audio direction to tap") + .build(); +assert_eq!( + params["direction"]["enum"], + json!(["speak", "hear", "both"]) +); +``` + +#### Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 312. + +*** + +### fmt + +#### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 259. + +*** + +### integer + +Add an `integer` property with `description`. + +#### Signature + +```rust +fn integer(self, name: &str, description: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 286. + +*** + +### new + +Start an empty parameter schema. + +#### Signature + +```rust +fn new() -> Self +``` + +#### Returns + +`Self` + +#### Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 268. + +*** + +### number + +Add a `number` (floating-point) property with `description`. + +#### Signature + +```rust +fn number(self, name: &str, description: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 281. + +*** + +### object + +Add a nested `object` property whose shape is described by `inner` +(another \[`ParamsBuilder`]), with `description`. + +#### Signature + +```rust +fn object(self, name: &str, inner: ?, description: &str) -> Self +``` + +#### Parameters + + + + + + + +#### Returns + +`Self` + +#### Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 334. + +*** + +### property + +Add a fully-customised property built via \[`PropertyBuilder`] (the +escape hatch for `default`/`format`/per-property `required`/nesting that +the one-line helpers don't cover). + +#### Signature + +```rust +fn property(self, name: &str, property: ?) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 344. + +*** + +### required + +Declare the top-level required-parameter list, emitting +`"required": [, …]` in `build_schema`. + +This is the JSON-Schema-style required array (sibling of `properties`), +matching the Python reference's `required=[…]` argument. Calling it more +than once replaces the previous list. For a per-property flag instead, +use \[`PropertyBuilder::required`]. + +#### Signature + +```rust +fn required(self, names: I) -> Self where I: ?, S: ? +``` + +#### Type Parameters + + + + + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 357. + +*** + +### string + +Add a `string` property with `description`. + +#### Signature + +```rust +fn string(self, name: &str, description: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 276. + +## Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 261. diff --git a/fern/products/sdk-reference/rust/agents/swaig/params-builder/property-builder/index.mdx b/fern/products/sdk-reference/rust/agents/swaig/params-builder/property-builder/index.mdx new file mode 100644 index 0000000000..890c4b2ab7 --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/swaig/params-builder/property-builder/index.mdx @@ -0,0 +1,358 @@ +--- +slug: "/reference/rust/agents/swaig/params-builder/property-builder" +title: "PropertyBuilder" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::swaig::params_builder::PropertyBuilder" + parent: "signalwire::swaig::params_builder" + module: "agents.swaig.params_builder" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs" + visibility: "public" +--- +# `PropertyBuilder` + +A single parameter property under construction. + +You rarely build one of these directly — \[`ParamsBuilder`]'s per-kind +methods create and insert one for you. Reach for \[`PropertyBuilder`] only +when you need a property whose options (`default`, `format`, a property-local +`required` flag, a nested schema) don't fit the one-line helpers, then pass +it to \[`ParamsBuilder::property`]. + +The rendered shape is a JSON object: `{"type": , "description": , +…optional keys…}`, byte-identical to what you'd hand-write. + +**Decorators:** `@must_use` + +## Signature + +```rust +struct PropertyBuilder { /* fields */ } +``` + +## Inheritance + +**Implements:** `Debug`, `Clone` + +## Methods + +### build + +Finish the property, yielding its rendered schema object. + +**Decorators:** `@must_use` + +#### Signature + +```rust +fn build(self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 230. + +*** + +### clone + +#### Signature + +```rust +fn clone(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 129. + +*** + +### default + +Attach a `"default"` value to the property. + +#### Signature + +```rust +fn default: ?>(self, default: impl ?) -> Self +``` + +#### Type Parameters + + + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 159. + +*** + +### enum\_values + +Constrain the property to a closed set, emitting +`"enum": [, …]`. + +Accepts any iterator of `impl AsRef`, so the Tier-1 media enums plug +in via their `all()` slices (`RecordFormat::all()`, `Codec::all()`, …) — +each variant renders as its canonical wire string. + +#### Signature + +```rust +fn enum_values(self, values: I) -> Self where I: ?, S: ? +``` + +#### Type Parameters + + + + + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 178. + +*** + +### extra + +Insert an arbitrary extra schema key (escape hatch for JSON-Schema +keywords without a dedicated helper, e.g. `"minimum"`, `"pattern"`). + +#### Signature + +```rust +fn extra: ?>(self, key: &str, value: impl ?) -> Self +``` + +#### Type Parameters + + + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 223. + +*** + +### fmt + +#### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 129. + +*** + +### format + +Attach a JSON-Schema `"format"` hint (e.g. `"date"`, `"email"`, +`"uri"`). Free-form: the format vocabulary is open, so this stays a +`&str`. + +#### Signature + +```rust +fn format(self, format: &str) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 167. + +*** + +### items + +Set the element schema for an array property, emitting +`"items": {"type": }`. + +#### Signature + +```rust +fn items(self, kind: ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 193. + +*** + +### new + +Start a property of `kind` with an LLM-facing `description`. + +`description` is prompt-engineering text the model reads to decide how to +fill the argument — be specific (format, source, constraints), not terse. + +#### Signature + +```rust +fn new(kind: ?, description: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 140. + +*** + +### properties + +Set the nested `properties` for an object property from another +\[`ParamsBuilder`], emitting `"properties": {…}` (and a nested +`"required": [...]` if the inner builder declared one). + +#### Signature + +```rust +fn properties(self, inner: ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 203. + +*** + +### required + +Mark this individual property required, emitting `"required": true` +alongside its `type`/`description`. + +This is the per-property flag style some skills use +(e.g. the `datasphere` skill). For the JSON-Schema top-level +`"required": ["a","b"]` array, use \[`ParamsBuilder::required`] instead. + +#### Signature + +```rust +fn required(self, required: bool) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 153. + +## Source + +[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) + +Line 131. diff --git a/fern/products/sdk-reference/rust/agents/swml/document/index.mdx b/fern/products/sdk-reference/rust/agents/swml/document/index.mdx new file mode 100644 index 0000000000..05d2f5d8c7 --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/swml/document/index.mdx @@ -0,0 +1,360 @@ +--- +slug: "/reference/rust/agents/swml/document" +title: "document" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::swml::document" + parent: "signalwire::swml" + module: "agents.swml" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/swml/document.rs" + visibility: "public" +--- +# `document` + +SWML document: version + named sections containing verb arrays. + +**Decorators:** `@must_use` + +## Signature + +```rust +struct Document { /* fields */ } +``` + +## Inheritance + +**Implements:** `Default` + +## Methods + +### add\_raw\_verb + +Append a pre-formatted verb value to a section. + +**Panics:** + +Panics if the section does not exist. + +#### Signature + +```rust +fn add_raw_verb(&mut self, section: &str, verb_hash: ?) +``` + +#### Parameters + + + + + +#### Source + +[`src/swml/document.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/document.rs) + +Line 69. + +*** + +### add\_section + +Add a new named section. Returns `true` if created, `false` if it already existed. + +#### Signature + +```rust +fn add_section(&mut self, name: &str) -> bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/swml/document.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/document.rs) + +Line 27. + +*** + +### add\_verb + +Append a verb to the `main` section. + +#### Signature + +```rust +fn add_verb(&mut self, verb_name: &str, config: ?) +``` + +#### Parameters + + + + + +#### Source + +[`src/swml/document.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/document.rs) + +Line 45. + +*** + +### add\_verb\_to\_section + +Append a verb to a named section. + +**Panics:** + +Panics if the section does not exist. + +#### Signature + +```rust +fn add_verb_to_section(&mut self, section: &str, verb_name: &str, config: ?) +``` + +#### Parameters + + + + + + + +#### Source + +[`src/swml/document.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/document.rs) + +Line 54. + +*** + +### clear\_section + +Clear all verbs in a section (keeps the section itself). + +#### Signature + +```rust +fn clear_section(&mut self, section: &str) +``` + +#### Parameters + + + +#### Source + +[`src/swml/document.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/document.rs) + +Line 78. + +*** + +### default + +#### Signature + +```rust +fn default() -> Self +``` + +#### Returns + +`Self` + +#### Source + +[`src/swml/document.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/document.rs) + +Line 119. + +*** + +### get\_verbs + +Get a clone of the verbs for a section (empty vec if section does not exist). + +#### Signature + +```rust +fn get_verbs(&self, section: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/swml/document.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/document.rs) + +Line 40. + +*** + +### has\_section + +#### Signature + +```rust +fn has_section(&self, name: &str) -> bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/swml/document.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/document.rs) + +Line 35. + +*** + +### new + +#### Signature + +```rust +fn new() -> Self +``` + +#### Returns + +`Self` + +#### Source + +[`src/swml/document.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/document.rs) + +Line 13. + +*** + +### render + +Compact JSON string. + +#### Signature + +```rust +fn render(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/swml/document.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/document.rs) + +Line 107. + +*** + +### render\_pretty + +Pretty-printed JSON string. + +#### Signature + +```rust +fn render_pretty(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/swml/document.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/document.rs) + +Line 112. + +*** + +### reset + +Reset document to initial state (only `main` with no verbs). + +#### Signature + +```rust +fn reset(&mut self) +``` + +#### Source + +[`src/swml/document.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/document.rs) + +Line 85. + +*** + +### to\_value + +Build the document as a `serde_json::Value`. + +#### Signature + +```rust +fn to_value(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/swml/document.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/document.rs) + +Line 91. + +*** + +### version + +#### Signature + +```rust +fn version(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/swml/document.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/document.rs) + +Line 22. + +## Source + +[`src/swml/document.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/document.rs) + +Line 7. diff --git a/fern/products/sdk-reference/rust/agents/swml/index.mdx b/fern/products/sdk-reference/rust/agents/swml/index.mdx new file mode 100644 index 0000000000..1d9cb7f544 --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/swml/index.mdx @@ -0,0 +1,42 @@ +--- +slug: "/reference/rust/agents/swml" +title: "swml" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::swml" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/swml/mod.rs" + visibility: "public" +--- +# `swml` + +## Classes + + + + SWML document: version + named sections containing verb arrays. + + + + SWML service: holds a document, auth credentials, and handles HTTP requests. + + + +## Modules + + + + + + + +## Source + +[`src/swml/mod.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/mod.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/agents/swml/schema/index.mdx b/fern/products/sdk-reference/rust/agents/swml/schema/index.mdx new file mode 100644 index 0000000000..3ef371a968 --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/swml/schema/index.mdx @@ -0,0 +1,126 @@ +--- +slug: "/reference/rust/agents/swml/schema" +title: "schema" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::swml::schema" + parent: "signalwire::swml" + module: "agents.swml" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/swml/schema.rs" + visibility: "public" +--- +# `schema` + +## Classes + + + + Metadata about a single SWML verb extracted from the schema. + + + +## Functions + +### get\_verb + +Get verb metadata, or `None` if not found. + +#### Signature + +```rust +fn get_verb(name: &str) -> ?<&?> +``` + +#### Parameters + + + +#### Returns + +`?<&?>` + +#### Source + +[`src/swml/schema.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/schema.rs) + +Line 82. + +*** + +### get\_verb\_names + +Get sorted list of all verb names. + +#### Signature + +```rust +fn get_verb_names() -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/swml/schema.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/schema.rs) + +Line 75. + +*** + +### is\_valid\_verb + +Check whether a verb name is valid. + +#### Signature + +```rust +fn is_valid_verb(name: &str) -> bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/swml/schema.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/schema.rs) + +Line 70. + +*** + +### verb\_count + +Number of verbs defined in the schema. + +#### Signature + +```rust +fn verb_count() -> usize +``` + +#### Returns + +`usize` + +#### Source + +[`src/swml/schema.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/schema.rs) + +Line 87. + +## Source + +[`src/swml/schema.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/schema.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/agents/swml/schema/verb-info/index.mdx b/fern/products/sdk-reference/rust/agents/swml/schema/verb-info/index.mdx new file mode 100644 index 0000000000..39c0e1e367 --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/swml/schema/verb-info/index.mdx @@ -0,0 +1,84 @@ +--- +slug: "/reference/rust/agents/swml/schema/verb-info" +title: "VerbInfo" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::swml::schema::VerbInfo" + parent: "signalwire::swml::schema" + module: "agents.swml.schema" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/swml/schema.rs" + visibility: "public" +--- +# `VerbInfo` + +Metadata about a single SWML verb extracted from the schema. + +## Signature + +```rust +struct VerbInfo { /* fields */ } +``` + +## Inheritance + +**Implements:** `Debug`, `Clone` + +## Properties + + + + + +## Methods + +### clone + +#### Signature + +```rust +fn clone(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/swml/schema.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/schema.rs) + +Line 6. + +*** + +### fmt + +#### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/swml/schema.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/schema.rs) + +Line 6. + +## Source + +[`src/swml/schema.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/schema.rs) + +Line 7. diff --git a/fern/products/sdk-reference/rust/agents/swml/service/index.mdx b/fern/products/sdk-reference/rust/agents/swml/service/index.mdx new file mode 100644 index 0000000000..34f9c4d5ed --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/swml/service/index.mdx @@ -0,0 +1,946 @@ +--- +slug: "/reference/rust/agents/swml/service" +title: "service" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::swml::service" + parent: "signalwire::swml" + module: "agents.swml" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs" + visibility: "public" +--- +# `service` + +SWML service: holds a document, auth credentials, and handles HTTP requests. + +## Signature + +```rust +struct Service { /* fields */ } +``` + +## Methods + +### add\_verb + +Add a verb to a section, validating against the schema. + +**Panics:** + +Panics if the verb name is not in the schema. + +#### Signature + +```rust +fn add_verb(&mut self, verb: &str, section: &str, config: ?) +``` + +#### Parameters + + + + + + + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 501. + +*** + +### basic\_auth\_credentials + +#### Signature + +```rust +fn basic_auth_credentials(&self) -> (&str, &str) +``` + +#### Returns + +`(&str, &str)` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 390. + +*** + +### define\_tool + +Define a SWAIG function the AI can call. Tool descriptions and +parameter descriptions are LLM-facing prompt engineering — see +PORTING\_GUIDE for guidance. + +Same shape as `AgentBase::define_tool` — a tool registered here is +usable on both sidecar and agent paths because they share storage. + +#### Signature + +```rust +fn define_tool( + &mut self, + name: &str, + description: &str, + parameters: ?, + handler: ?, + secure: bool +) -> &mut Self +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 241. + +*** + +### document + +#### Signature + +```rust +fn document(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 382. + +*** + +### document\_mut + +#### Signature + +```rust +fn document_mut(&mut self) -> &mut ? +``` + +#### Returns + +`&mut ?` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 386. + +*** + +### extract\_sip\_username + +Extract SIP username from a request body. +Validates format: only `[a-zA-Z0-9._-]`, max 64 chars. + +#### Signature + +```rust +fn extract_sip_username(body: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 619. + +*** + +### get\_all\_functions + +Snapshot of all registered SWAIG functions keyed by name. +Python parity: `ToolRegistry.get_all_functions`. + +#### Signature + +```rust +fn get_all_functions(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 306. + +*** + +### get\_basic\_auth\_credentials + +Get (user, password) — Python-canonical name. +Python parity: `AuthMixin.get_basic_auth_credentials`. + +#### Signature + +```rust +fn get_basic_auth_credentials(&self) -> (?, ?) +``` + +#### Returns + +`(?, ?)` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 396. + +*** + +### get\_basic\_auth\_credentials\_with\_source + +Get (user, password, source) where source is one of "provided", +"environment", or "generated". Python parity: +`AuthMixin.get_basic_auth_credentials(include_source=True)`. + +#### Signature + +```rust +fn get_basic_auth_credentials_with_source(&self) -> (?, ?, ?) +``` + +#### Returns + +`(?, ?, ?)` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 403. + +*** + +### get\_function + +Get a registered SWAIG function definition by name, or `None` +when absent. Python parity: `ToolRegistry.get_function`. + +#### Signature + +```rust +fn get_function(&self, name: &str) -> ?<&?> +``` + +#### Parameters + + + +#### Returns + +`?<&?>` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 300. + +*** + +### get\_proxy\_url\_base + +Detect or construct the proxy URL base from request headers. + +#### Signature + +```rust +fn get_proxy_url_base(&self, headers: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 664. + +*** + +### handle\_request + +Handle an HTTP request. Returns (status\_code, headers, body). + +#### Signature + +```rust +fn handle_request( + &self, + method: &str, + path: &str, + headers: &?, + body: &str +) -> (u16, ?, ?) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`(u16, ?, ?)` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 519. + +*** + +### has\_function + +Whether a SWAIG function with the given name is registered. +Python parity: `ToolRegistry.has_function`. + +#### Signature + +```rust +fn has_function(&self, name: &str) -> bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 294. + +*** + +### has\_tool + +Whether a tool with the given name is registered. + +#### Signature + +```rust +fn has_tool(&self, name: &str) -> bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 337. + +*** + +### host + +#### Signature + +```rust +fn host(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 366. + +*** + +### list\_tool\_names + +Registered tool names in insertion order. + +#### Signature + +```rust +fn list_tool_names(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 342. + +*** + +### name + +#### Signature + +```rust +fn name(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 358. + +*** + +### new + +#### Signature + +```rust +fn new(options: ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 153. + +*** + +### on\_function\_call + +Dispatch a function call to the registered handler. Returns +`None` for unknown functions or registered functions with no +local handler (e.g. DataMap tools that execute server-side). + +#### Signature + +```rust +fn on_function_call( + &self, + name: &str, + args: &?, + raw_data: &? +) -> ? +``` + +#### Parameters + + + + + + + +#### Returns + +`?` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 325. + +*** + +### on\_request + +Customization hook called when SWML is requested. Default +delegates to \[`Service::on_swml_request`] and returns its result. +Subclasses (or external callers) typically configure +`on_swml_request` via \[`Service::set_on_swml_request_hook`] +rather than overriding this method. + +Returning `None` uses the default rendered SWML; returning a +non-`None` value applies modifications to the rendered document. + +Python parity: `WebMixin.on_request(request_data, callback_path)`. + +#### Signature + +```rust +fn on_request(&self, request_data: ?<&?>, callback_path: ?<&str>) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 465. + +*** + +### on\_swml\_request + +Customization point for modifying SWML based on request data. +If a hook has been registered via +\[`Service::set_on_swml_request_hook`] the hook is invoked; +otherwise this returns `None` (no modification). + +Python parity: `WebMixin.on_swml_request(request_data, callback_path)`. +The Python third `request` argument is FastAPI-specific and +intentionally not mirrored. + +#### Signature + +```rust +fn on_swml_request(&self, request_data: ?<&?>, callback_path: ?<&str>) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 481. + +*** + +### port + +#### Signature + +```rust +fn port(&self) -> u16 +``` + +#### Returns + +`u16` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 370. + +*** + +### register\_swaig\_function + +Register a raw SWAIG function definition (e.g. DataMap tools that +have no local handler). + +#### Signature + +```rust +fn register_swaig_function(&mut self, func_def: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 273. + +*** + +### remove\_function + +Remove a registered SWAIG function. Returns `true` when the +function was found and removed; `false` when it wasn't +registered. Python parity: `ToolRegistry.remove_function`. + +#### Signature + +```rust +fn remove_function(&mut self, name: &str) -> bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 313. + +*** + +### render + +#### Signature + +```rust +fn render(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 427. + +*** + +### render\_pretty + +#### Signature + +```rust +fn render_pretty(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 431. + +*** + +### route + +#### Signature + +```rust +fn route(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 362. + +*** + +### run + +#### Signature + +```rust +fn run(&self) +``` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 924. + +*** + +### schema\_utils + +SchemaUtils helper bound to this Service. Mirrors Python's +`self.schema_utils` instance attribute on `SWMLService`. +Returns a freshly-built helper each call — the underlying +schema is `LazyLock`-cached, so this is cheap. + +#### Signature + +```rust +fn schema_utils(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 378. + +*** + +### set\_on\_swml\_request\_hook + +Register a function that customizes the SWML response on a +per-request basis. The hook receives the parsed body and the +callback path; returning `Some(value)` applies modifications, +`None` falls through to the default rendering. + +Rust has no method overriding via inheritance — this hook is +the idiomatic Rust equivalent of Python's overridable +`on_swml_request`. + +#### Signature + +```rust +fn set_on_swml_request_hook( + &mut self, + hook: F +) -> &mut Self where F: ?(?<&?>, ?<&str>) -> ? + ? + ? + 'static +``` + +#### Type Parameters + + + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 447. + +*** + +### sleep + +Add a `sleep` verb (integer milliseconds) to a section. + +#### Signature + +```rust +fn sleep(&mut self, millis: i64, section: &str) +``` + +#### Parameters + + + + + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 509. + +*** + +### tool\_definition + +Look up a registered tool's full SWAIG definition (the JSON +shape returned to the SignalWire platform). Used by audit +harnesses that need to inspect the DataMap webhook URL of a +registered tool without invoking it. + +#### Signature + +```rust +fn tool_definition(&self, name: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 350. + +*** + +### validate\_basic\_auth + +Validate provided basic-auth credentials against the configured ones. +Python parity: `AuthMixin.validate_basic_auth(username, password)`. + +#### Signature + +```rust +fn validate_basic_auth(&self, username: &str, password: &str) -> bool +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 422. + +## Type Aliases + +### FunctionHandler + +Handler type for SWAIG function callbacks. + +Receives `(args, raw_data)` and returns a `FunctionResult`. Same signature +AgentBase uses, so handlers are interchangeable between the two paths. + +#### Signature + +```rust +type FunctionHandler = ? +``` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 135. + +*** + +### OnSwmlRequestHook + +Hook function for SWML-request customization. Mirrors Python's +`WebMixin.on_swml_request(request_data, callback_path)` — receives the +parsed body and optional callback path, and returns a JSON `Value` of +modifications to merge (or `None` to use default rendering). + +Rust has no method overriding via inheritance — the function-field +hook is the idiomatic equivalent of Python's overridable +`on_swml_request`. Set via `Service::set_on_swml_request_hook`. + +#### Signature + +```rust +type OnSwmlRequestHook = ? +``` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 104. + +## Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 109. diff --git a/fern/products/sdk-reference/rust/agents/swml/service/index__2.mdx b/fern/products/sdk-reference/rust/agents/swml/service/index__2.mdx new file mode 100644 index 0000000000..b06ecafff7 --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/swml/service/index__2.mdx @@ -0,0 +1,26 @@ +--- +slug: "/reference/rust/agents/swml/service/index__2" +title: "service" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "agents.swml.service" + parent: "signalwire::swml" + module: "agents.swml" +--- +# `service` + +## Classes + + + + Options for constructing a `Service`. + + + + Tool registered on a `Service` for SWAIG dispatch. The `definition` field holds the rendered SWAIG function dict (function/purpose/argument); `handler` is `None` for raw / DataMap-style functions, where dispatch happens server-side rather than in this process. + + diff --git a/fern/products/sdk-reference/rust/agents/swml/service/service-options/index.mdx b/fern/products/sdk-reference/rust/agents/swml/service/service-options/index.mdx new file mode 100644 index 0000000000..b51a3c0141 --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/swml/service/service-options/index.mdx @@ -0,0 +1,212 @@ +--- +slug: "/reference/rust/agents/swml/service/service-options" +title: "ServiceOptions" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::swml::service::ServiceOptions" + parent: "agents.swml.service" + module: "agents.swml.service" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs" + visibility: "public" +--- +# `ServiceOptions` + +Options for constructing a `Service`. + +Doubles as an idiomatic **builder** (parallel to +`AgentOptions`): \[`ServiceOptions::new`] gives +a name-only default and the `with_*` methods take/return `self` for +one-expression configuration feeding \[`Service::new`]: + +```no_run +use signalwire::SWMLService; +use signalwire::swml::service::ServiceOptions; + +let svc = SWMLService::new( + ServiceOptions::new("sidecar") + .route("/swml") + .basic_auth("user", "secret"), +); +``` + +Direct struct-literal construction still works; the builder methods are an +additive convenience. `#[must_use]` flags an options value built but never +passed to \[`Service::new`]. + +**Decorators:** `@must_use` + +## Signature + +```rust +struct ServiceOptions { /* fields */ } +``` + +## Examples + +```rust +use signalwire::SWMLService; +use signalwire::swml::service::ServiceOptions; + +let svc = SWMLService::new( + ServiceOptions::new("sidecar") + .route("/swml") + .basic_auth("user", "secret"), +); +``` + +## Properties + + + + + + + + + + + + + +## Methods + +### basic\_auth + +Set HTTP Basic-Auth credentials guarding this service's endpoints. + +#### Signature + +```rust +fn basic_auth(self, user: &str, password: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 89. + +*** + +### host + +Set the bind host (e.g. `"0.0.0.0"`). + +#### Signature + +```rust +fn host(self, host: &str) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 77. + +*** + +### new + +Name-only options with the same defaults the struct-literal callers use +(`port` defaults to 3000 via \[`Service::new`] when left `None`). + +#### Signature + +```rust +fn new(name: &str) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 59. + +*** + +### port + +Set the bind port. + +#### Signature + +```rust +fn port(self, port: u16) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 83. + +*** + +### route + +Set the HTTP route this service serves (e.g. `"/swml"`). + +#### Signature + +```rust +fn route(self, route: &str) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 71. + +## Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 47. diff --git a/fern/products/sdk-reference/rust/agents/swml/service/tool-def/index.mdx b/fern/products/sdk-reference/rust/agents/swml/service/tool-def/index.mdx new file mode 100644 index 0000000000..f6b007e0a5 --- /dev/null +++ b/fern/products/sdk-reference/rust/agents/swml/service/tool-def/index.mdx @@ -0,0 +1,65 @@ +--- +slug: "/reference/rust/agents/swml/service/tool-def" +title: "ToolDef" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::swml::service::ToolDef" + parent: "agents.swml.service" + module: "agents.swml.service" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs" + visibility: "public" +--- +# `ToolDef` + +Tool registered on a `Service` for SWAIG dispatch. The `definition` +field holds the rendered SWAIG function dict (function/purpose/argument); +`handler` is `None` for raw / DataMap-style functions, where dispatch +happens server-side rather than in this process. + +## Signature + +```rust +struct ToolDef { /* fields */ } +``` + +## Inheritance + +**Implements:** `Clone` + +## Properties + + + + + + + +## Methods + +### clone + +#### Signature + +```rust +fn clone(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 145. + +## Source + +[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) + +Line 146. diff --git a/fern/products/sdk-reference/rust/core/core/index.mdx b/fern/products/sdk-reference/rust/core/core/index.mdx new file mode 100644 index 0000000000..f40ba5f607 --- /dev/null +++ b/fern/products/sdk-reference/rust/core/core/index.mdx @@ -0,0 +1,28 @@ +--- +slug: "/reference/rust/core/core" +title: "core" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::core" + parent: "core" + module: "core" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/core/mod.rs" + visibility: "public" +--- +# `core` + +## Modules + + + + + +## Source + +[`src/core/mod.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/core/mod.rs) + +Line 5. diff --git a/fern/products/sdk-reference/rust/core/core/logging-config/index.mdx b/fern/products/sdk-reference/rust/core/core/logging-config/index.mdx new file mode 100644 index 0000000000..a7329cbee9 --- /dev/null +++ b/fern/products/sdk-reference/rust/core/core/logging-config/index.mdx @@ -0,0 +1,48 @@ +--- +slug: "/reference/rust/core/core/logging-config" +title: "logging_config" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::core::logging_config" + parent: "signalwire::core" + module: "core.core" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/core/logging_config.rs" + visibility: "public" +--- +# `logging_config` + +## Functions + +### get\_execution\_mode + +Detect the SDK's deployment environment based on well-known +environment variables. + +Returns one of `"cgi"`, `"lambda"`, `"google_cloud_function"`, +`"azure_function"`, or `"server"`. + +#### Signature + +```rust +fn get_execution_mode() -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/core/logging_config.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/core/logging_config.rs) + +Line 20. + +## Source + +[`src/core/logging_config.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/core/logging_config.rs) + +Line 13. diff --git a/fern/products/sdk-reference/rust/core/index.mdx b/fern/products/sdk-reference/rust/core/index.mdx new file mode 100644 index 0000000000..e10f0c482f --- /dev/null +++ b/fern/products/sdk-reference/rust/core/index.mdx @@ -0,0 +1,24 @@ +--- +slug: "/reference/rust/core" +title: "core" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "core" +--- +# `core` + +## Modules + + + + + + + + + + diff --git a/fern/products/sdk-reference/rust/core/logging/index.mdx b/fern/products/sdk-reference/rust/core/logging/index.mdx new file mode 100644 index 0000000000..8a5328287a --- /dev/null +++ b/fern/products/sdk-reference/rust/core/logging/index.mdx @@ -0,0 +1,350 @@ +--- +slug: "/reference/rust/core/logging" +title: "logging" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::logging" + parent: "core" + module: "core" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs" + visibility: "public" +--- +# `logging` + +## Classes + + + + Logger with level filtering and suppression via environment variables. + + + + Error returned when a string is parsed into \[`Level`] (via \[`FromStr`]) but is not one of `debug`/`info`/`warn`/`error` (case-insensitive). + + + +## Functions + +### init + +Initialize the global logger (call once at startup). + +#### Signature + +```rust +fn init() +``` + +#### Source + +[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) + +Line 165. + +## Enums + +### Level + +Log levels matching the SDK convention — the closed set `debug` / `info` / +`warn` / `error`, ordered by increasing severity. + +`as_str()` returns the upper-case label used in emitted log lines +(`"DEBUG"`); `Display` and \[`AsRef`] agree with it. +`from_str()` parses the lower-case names (case-insensitively) accepted by +`SIGNALWIRE_LOG_LEVEL`. + +#### Signature + +```rust +enum Level +``` + +#### Inheritance + +**Implements:** `Debug`, `Clone`, `Copy`, `PartialEq`, `Eq`, `PartialOrd`, `Ord`, `Display`, `AsRef`, `FromStr` + +#### Variants + + + + + + + + + +#### Methods + +##### all + +Every \[`Level`], in ascending-severity order. + +###### Signature + +```rust +fn all() -> &'static [?] +``` + +###### Returns + +`&'static [?]` + +###### Source + +[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) + +Line 44. + +*** + +##### as\_ref + +###### Signature + +```rust +fn as_ref(&self) -> &str +``` + +###### Returns + +`&str` + +###### Source + +[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) + +Line 56. + +*** + +##### as\_str + +###### Signature + +```rust +fn as_str(&self) -> &'static str +``` + +###### Returns + +`&'static str` + +###### Source + +[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) + +Line 34. + +*** + +##### clone + +###### Signature + +```rust +fn clone(&self) -> ? +``` + +###### Returns + +`?` + +###### Source + +[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) + +Line 15. + +*** + +##### cmp + +###### Signature + +```rust +fn cmp(&self, other: &?) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) + +Line 15. + +*** + +##### eq + +###### Signature + +```rust +fn eq(&self, other: &?) -> bool +``` + +###### Parameters + + + +###### Returns + +`bool` + +###### Source + +[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) + +Line 15. + +*** + +##### fmt + +###### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) + +Line 15. + +*** + +##### fmt + +###### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) + +Line 50. + +*** + +##### from\_str + +###### Signature + +```rust +fn from_str(s: &str) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) + +Line 24. + +*** + +##### from\_str + +###### Signature + +```rust +fn from_str(s: &str) -> ?::Err> +``` + +###### Parameters + + + +###### Returns + +`?::Err>` + +###### Source + +[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) + +Line 93. + +*** + +##### partial\_cmp + +###### Signature + +```rust +fn partial_cmp(&self, other: &?) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) + +Line 15. + +#### Type Aliases + +##### Err + +###### Source + +[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) + +Line 91. + +#### Source + +[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) + +Line 16. + +## Source + +[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/core/logging/logger/index.mdx b/fern/products/sdk-reference/rust/core/logging/logger/index.mdx new file mode 100644 index 0000000000..c9133b2632 --- /dev/null +++ b/fern/products/sdk-reference/rust/core/logging/logger/index.mdx @@ -0,0 +1,191 @@ +--- +slug: "/reference/rust/core/logging/logger" +title: "Logger" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::logging::Logger" + parent: "signalwire::logging" + module: "core.logging" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs" + visibility: "public" +--- +# `Logger` + +Logger with level filtering and suppression via environment variables. + +- `SIGNALWIRE_LOG_LEVEL` — sets the minimum level (debug/info/warn/error) +- `SIGNALWIRE_LOG_MODE=off` — suppresses all output + +## Signature + +```rust +struct Logger { /* fields */ } +``` + +## Properties + + + + + + + +## Methods + +### debug + +#### Signature + +```rust +fn debug(&self, message: &str) +``` + +#### Parameters + + + +#### Source + +[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) + +Line 147. + +*** + +### error + +#### Signature + +```rust +fn error(&self, message: &str) +``` + +#### Parameters + + + +#### Source + +[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) + +Line 159. + +*** + +### info + +#### Signature + +```rust +fn info(&self, message: &str) +``` + +#### Parameters + + + +#### Source + +[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) + +Line 151. + +*** + +### log + +#### Signature + +```rust +fn log(&self, level: ?, message: &str) +``` + +#### Parameters + + + + + +#### Source + +[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) + +Line 139. + +*** + +### new + +#### Signature + +```rust +fn new(name: &str) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) + +Line 117. + +*** + +### should\_log + +#### Signature + +```rust +fn should_log(&self, level: ?) -> bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) + +Line 135. + +*** + +### warn + +#### Signature + +```rust +fn warn(&self, message: &str) +``` + +#### Parameters + + + +#### Source + +[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) + +Line 155. + +## Source + +[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) + +Line 110. diff --git a/fern/products/sdk-reference/rust/core/logging/parse-level-error/index.mdx b/fern/products/sdk-reference/rust/core/logging/parse-level-error/index.mdx new file mode 100644 index 0000000000..7012f51bfb --- /dev/null +++ b/fern/products/sdk-reference/rust/core/logging/parse-level-error/index.mdx @@ -0,0 +1,149 @@ +--- +slug: "/reference/rust/core/logging/parse-level-error" +title: "ParseLevelError" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::logging::ParseLevelError" + parent: "signalwire::logging" + module: "core.logging" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs" + visibility: "public" +--- +# `ParseLevelError` + +Error returned when a string is parsed into \[`Level`] (via \[`FromStr`]) but +is not one of `debug`/`info`/`warn`/`error` (case-insensitive). + +## Signature + +```rust +struct ParseLevelError { /* fields */ } +``` + +## Inheritance + +**Implements:** `Debug`, `Clone`, `PartialEq`, `Eq`, `Display`, [Error](/docs/sdk-reference/reference/rust/core/security/webhook-layer/webhook-validate#error) + +## Methods + +### clone + +#### Signature + +```rust +fn clone(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) + +Line 63. + +*** + +### eq + +#### Signature + +```rust +fn eq(&self, other: &?) -> bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) + +Line 63. + +*** + +### fmt + +#### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) + +Line 63. + +*** + +### fmt + +#### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) + +Line 76. + +*** + +### input + +The string that failed to parse as a log level. + +#### Signature + +```rust +fn input(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) + +Line 70. + +## Source + +[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) + +Line 64. diff --git a/fern/products/sdk-reference/rust/core/security/index.mdx b/fern/products/sdk-reference/rust/core/security/index.mdx new file mode 100644 index 0000000000..ba0d12a7ac --- /dev/null +++ b/fern/products/sdk-reference/rust/core/security/index.mdx @@ -0,0 +1,36 @@ +--- +slug: "/reference/rust/core/security" +title: "security" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::security" + parent: "core" + module: "core" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/security/mod.rs" + visibility: "public" +--- +# `security` + +## Modules + + + + + + Webhook signature validation for SignalWire-signed HTTP requests. + + + + Tower / axum middleware for SignalWire webhook signature validation. + + + +## Source + +[`src/security/mod.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/mod.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/core/security/session-manager/index.mdx b/fern/products/sdk-reference/rust/core/security/session-manager/index.mdx new file mode 100644 index 0000000000..2e540ad6ba --- /dev/null +++ b/fern/products/sdk-reference/rust/core/security/session-manager/index.mdx @@ -0,0 +1,30 @@ +--- +slug: "/reference/rust/core/security/session-manager" +title: "session_manager" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::security::session_manager" + parent: "signalwire::security" + module: "core.security" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/security/session_manager.rs" + visibility: "public" +--- +# `session_manager` + +## Classes + + + + Session manager that generates and validates HMAC-signed tokens. + + + +## Source + +[`src/security/session_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/session_manager.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/core/security/session-manager/session-manager/index.mdx b/fern/products/sdk-reference/rust/core/security/session-manager/session-manager/index.mdx new file mode 100644 index 0000000000..bea53ffea7 --- /dev/null +++ b/fern/products/sdk-reference/rust/core/security/session-manager/session-manager/index.mdx @@ -0,0 +1,221 @@ +--- +slug: "/reference/rust/core/security/session-manager/session-manager" +title: "SessionManager" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::security::session_manager::SessionManager" + parent: "signalwire::security::session_manager" + module: "core.security.session_manager" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/security/session_manager.rs" + visibility: "public" +--- +# `SessionManager` + +Session manager that generates and validates HMAC-signed tokens. + +Tokens bind a function name and call ID together with an expiry time, +preventing replay attacks and cross-function/cross-call misuse. + +## Signature + +```rust +struct SessionManager { /* fields */ } +``` + +## Inheritance + +**Implements:** `Clone` + +## Methods + +### clone + +#### Signature + +```rust +fn clone(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/security/session_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/session_manager.rs) + +Line 13. + +*** + +### create\_session + +Create or confirm a session, returning the call ID. + +#### Signature + +```rust +fn create_session(&self, call_id: ?<&str>) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/security/session_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/session_manager.rs) + +Line 41. + +*** + +### create\_token + +Generate an HMAC-SHA256 signed token for a given function and call. + +Token format (before base64url encoding): +`{call_id}.{function_name}.{expiry}.{nonce}.{hmac_hex}` + +#### Signature + +```rust +fn create_token(&self, function_name: &str, call_id: &str) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/security/session_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/session_manager.rs) + +Line 52. + +*** + +### new + +Create a new session manager with a random 32-byte secret. + +#### Signature + +```rust +fn new(token_expiry_secs: u64) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/security/session_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/session_manager.rs) + +Line 21. + +*** + +### token\_expiry\_secs + +Get the configured token expiry in seconds. + +#### Signature + +```rust +fn token_expiry_secs(&self) -> u64 +``` + +#### Returns + +`u64` + +#### Source + +[`src/security/session_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/session_manager.rs) + +Line 36. + +*** + +### validate\_token + +Validate a token against the expected function name and call ID. + +Uses timing-safe comparison for all security-critical fields. + +#### Signature + +```rust +fn validate_token( + &self, + function_name: &str, + call_id: &str, + token: &str +) -> bool +``` + +#### Parameters + + + + + + + +#### Returns + +`bool` + +#### Source + +[`src/security/session_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/session_manager.rs) + +Line 70. + +*** + +### with\_defaults + +Create a new session manager with the default expiry (3600 seconds). + +#### Signature + +```rust +fn with_defaults() -> Self +``` + +#### Returns + +`Self` + +#### Source + +[`src/security/session_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/session_manager.rs) + +Line 31. + +## Source + +[`src/security/session_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/session_manager.rs) + +Line 14. diff --git a/fern/products/sdk-reference/rust/core/security/webhook-layer/index.mdx b/fern/products/sdk-reference/rust/core/security/webhook-layer/index.mdx new file mode 100644 index 0000000000..339eb7b318 --- /dev/null +++ b/fern/products/sdk-reference/rust/core/security/webhook-layer/index.mdx @@ -0,0 +1,56 @@ +--- +slug: "/reference/rust/core/security/webhook-layer" +title: "webhook_layer" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::security::webhook_layer" + parent: "signalwire::security" + module: "core.security" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook_layer.rs" + visibility: "public" +--- +# `webhook_layer` + +Tower / axum middleware for SignalWire webhook signature validation. + +This module provides a \[`tower::Layer`] that buffers the request body, +verifies the `X-SignalWire-Signature` (or `X-Twilio-Signature`) +header against a configured signing key, and either: + +- rejects the request with `403 Forbidden` (no body) when the + signature is missing or invalid, or +- rebuilds the request with the buffered body so downstream + handlers can re-read it as a normal `axum::body::Body`. + +The URL passed to the validator honors `X-Forwarded-Proto` / +`X-Forwarded-Host` (for reverse-proxy / tunnel deploys) and falls +back to scheme-derived-from-`x-forwarded-proto-or-https` plus the +`Host` header. + +The Layer is gated behind the `tower-middleware` Cargo feature +(enabled by default). Users who only need the raw validator can +depend on `signalwire` with `default-features = false`. + +Copyright (c) 2025 SignalWire. Licensed under the MIT License. + +## Classes + + + + Tower \[`Layer`] that wraps any `Service>` with SignalWire webhook signature validation. + + + + Tower \[`Service`] produced by \[`WebhookLayer::layer`]. Buffers the request body, validates the signature, and either forwards a reconstructed request to the inner service or short-circuits with a `403 Forbidden`. + + + +## Source + +[`src/security/webhook_layer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook_layer.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/core/security/webhook-layer/webhook-layer/index.mdx b/fern/products/sdk-reference/rust/core/security/webhook-layer/webhook-layer/index.mdx new file mode 100644 index 0000000000..8309a092ea --- /dev/null +++ b/fern/products/sdk-reference/rust/core/security/webhook-layer/webhook-layer/index.mdx @@ -0,0 +1,160 @@ +--- +slug: "/reference/rust/core/security/webhook-layer/webhook-layer" +title: "WebhookLayer" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::security::webhook_layer::WebhookLayer" + parent: "signalwire::security::webhook_layer" + module: "core.security.webhook_layer" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook_layer.rs" + visibility: "public" +--- +# `WebhookLayer` + +Tower \[`Layer`] that wraps any `Service>` with +SignalWire webhook signature validation. + +Construct with \[`WebhookLayer::new`] and pass the customer's +Signing Key. Optionally provide an explicit URL via +\[`WebhookLayer::with_url_override`] when running behind a tunnel +or reverse proxy that doesn't set `X-Forwarded-*` headers. + +## Signature + +```rust +struct WebhookLayer { /* fields */ } +``` + +## Inheritance + +**Implements:** `Clone`, `Layer` + +## Methods + +### clone + +#### Signature + +```rust +fn clone(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/security/webhook_layer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook_layer.rs) + +Line 48. + +*** + +### layer + +#### Signature + +```rust +fn layer(&self, inner: S) -> ::Service +``` + +#### Parameters + + + +#### Returns + +`::Service` + +#### Source + +[`src/security/webhook_layer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook_layer.rs) + +Line 90. + +*** + +### new + +Construct a new layer bound to the given Signing Key. + +#### Signature + +```rust +fn new: ?>(signing_key: impl ?) -> Self +``` + +#### Type Parameters + + + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/security/webhook_layer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook_layer.rs) + +Line 60. + +*** + +### with\_url\_base + +Override the URL **base** the validator signs against. When set, +reverse-proxy header reconstruction is skipped and the full URL +is built as ``. + +`base` is typically `scheme://host[:port]` with no trailing slash +— e.g. `"https://example.ngrok.io"`. Any trailing `/` is +stripped before concatenation. + +#### Signature + +```rust +fn with_url_base: ?>(self, base: impl ?) -> Self +``` + +#### Type Parameters + + + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/security/webhook_layer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook_layer.rs) + +Line 76. + +## Type Aliases + +### Service + +#### Source + +[`src/security/webhook_layer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook_layer.rs) + +Line 88. + +## Source + +[`src/security/webhook_layer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook_layer.rs) + +Line 49. diff --git a/fern/products/sdk-reference/rust/core/security/webhook-layer/webhook-validate/index.mdx b/fern/products/sdk-reference/rust/core/security/webhook-layer/webhook-validate/index.mdx new file mode 100644 index 0000000000..64e8a7f384 --- /dev/null +++ b/fern/products/sdk-reference/rust/core/security/webhook-layer/webhook-validate/index.mdx @@ -0,0 +1,135 @@ +--- +slug: "/reference/rust/core/security/webhook-layer/webhook-validate" +title: "WebhookValidate" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::security::webhook_layer::WebhookValidate" + parent: "signalwire::security::webhook_layer" + module: "core.security.webhook_layer" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook_layer.rs" + visibility: "public" +--- +# `WebhookValidate` + +Tower \[`Service`] produced by \[`WebhookLayer::layer`]. Buffers the +request body, validates the signature, and either forwards a +reconstructed request to the inner service or short-circuits with +a `403 Forbidden`. + +## Signature + +```rust +struct WebhookValidate { /* fields */ } +``` + +## Inheritance + +**Implements:** `Clone`, [Service](/docs/sdk-reference/reference/rust/core/security/webhook-layer/webhook-layer#service) + +## Methods + +### call + +#### Signature + +```rust +fn call(&mut self, req: ?) -> ::Future +``` + +#### Parameters + + + +#### Returns + +`::Future` + +#### Source + +[`src/security/webhook_layer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook_layer.rs) + +Line 124. + +*** + +### clone + +#### Signature + +```rust +fn clone(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/security/webhook_layer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook_layer.rs) + +Line 102. + +*** + +### poll\_ready + +#### Signature + +```rust +fn poll_ready(&mut self, cx: &mut ?<'_>) -> ?::Error>> +``` + +#### Parameters + + + +#### Returns + +`?::Error>>` + +#### Source + +[`src/security/webhook_layer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook_layer.rs) + +Line 120. + +## Type Aliases + +### Error + +#### Source + +[`src/security/webhook_layer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook_layer.rs) + +Line 117. + +*** + +### Future + +#### Source + +[`src/security/webhook_layer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook_layer.rs) + +Line 118. + +*** + +### Response + +#### Source + +[`src/security/webhook_layer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook_layer.rs) + +Line 116. + +## Source + +[`src/security/webhook_layer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook_layer.rs) + +Line 103. diff --git a/fern/products/sdk-reference/rust/core/security/webhook/index.mdx b/fern/products/sdk-reference/rust/core/security/webhook/index.mdx new file mode 100644 index 0000000000..00ff1a3332 --- /dev/null +++ b/fern/products/sdk-reference/rust/core/security/webhook/index.mdx @@ -0,0 +1,356 @@ +--- +slug: "/reference/rust/core/security/webhook" +title: "webhook" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::security::webhook" + parent: "signalwire::security" + module: "core.security" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook.rs" + visibility: "public" +--- +# `webhook` + +Webhook signature validation for SignalWire-signed HTTP requests. + +Implements both schemes from `porting-sdk/webhooks.md`: + +- **Scheme A** — RELAY/SWML/JSON: `lowercase_hex(HMAC-SHA1(key, url + raw_body))` +- **Scheme B** — Compat/cXML form: `base64(HMAC-SHA1(key, url + sortedFormParams))` + with optional `bodySHA256` query-param fallback for JSON-on-compat-surface. + +Public API mirrors Python's `signalwire.core.security.webhook_validator`: + +- \[`validate_webhook_signature`] — combined validator (tries A, then B). +- \[`validate_request`] — legacy `@signalwire/compatibility-api` drop-in + that accepts either a raw body string or pre-parsed form params. + +All comparisons go through \[`subtle::ConstantTimeEq`] so the secret +is not leaked through repeated requests. Inputs are taken as +`&str` / borrowed strings — no allocation hidden behind the API. + +``` +use signalwire::security::webhook::validate_webhook_signature; + +let key = "PSKtest1234567890abcdef"; +let url = "https://example.ngrok.io/webhook"; +let raw_body = r#"{"event":"call.state","params":{"call_id":"abc-123","state":"answered"}}"#; +let sig = "c3c08c1fefaf9ee198a100d5906765a6f394bf0f"; +assert!(validate_webhook_signature(key, sig, url, raw_body).unwrap()); +``` + +Copyright (c) 2025 SignalWire. Licensed under the MIT License. + +## Examples + +```rust +use signalwire::security::webhook::validate_webhook_signature; + +let key = "PSKtest1234567890abcdef"; +let url = "https://example.ngrok.io/webhook"; +let raw_body = r#"{"event":"call.state","params":{"call_id":"abc-123","state":"answered"}}"#; +let sig = "c3c08c1fefaf9ee198a100d5906765a6f394bf0f"; +assert!(validate_webhook_signature(key, sig, url, raw_body).unwrap()); +``` + +## Functions + +### validate\_request + +Legacy `@signalwire/compatibility-api` drop-in entry point. + +If `params_or_raw_body` is \[`ParamsOrBody::Body`], delegates to +\[`validate_webhook_signature`] (Scheme A then Scheme B with parsed form). + +If it's \[`ParamsOrBody::Params`], runs Scheme B directly with those +pre-parsed form params (plus URL port normalization). + +`bodySHA256` verification is skipped in the `Params` variant — there +is no raw body to hash. + +#### Signature + +```rust +fn validate_request( + signing_key: &str, + signature: &str, + url: &str, + params_or_raw_body: &? +) -> ? +``` + +#### Parameters + + + + + + + + + +#### Returns + +`?` + +#### Source + +[`src/security/webhook.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook.rs) + +Line 389. + +*** + +### validate\_webhook\_signature + +Validate a SignalWire webhook signature against both schemes. + +#### Signature + +```rust +fn validate_webhook_signature( + signing_key: &str, + signature: &str, + url: &str, + raw_body: &str +) -> ? +``` + +#### Parameters + + + + + + + + + +#### Returns + +`?` — All comparisons are constant-time via \[`subtle::ConstantTimeEq`]. + +#### Source + +[`src/security/webhook.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook.rs) + +Line 325. + +## Enums + +### ParamsOrBody + +Argument shape for \[`validate_request`]. Either a raw body string +(which will run Scheme A first, then Scheme B with the form-parsed +body) or a pre-parsed form-param list (which goes straight to +Scheme B). + +Repeated keys in the `Params` variant are supported by emitting a +`Vec` per key in submission order. + +#### Signature + +```rust +enum ParamsOrBody +``` + +#### Inheritance + +**Implements:** `Debug`, `Clone` + +#### Variants + + + Raw HTTP request body (UTF-8). The validator will sort form params if it parses cleanly; for JSON bodies this branch degrades to the empty-params Scheme B fallback. + + + + Pre-parsed form params, list-of-(key, list-of-values) so repeated keys keep their submission order. + + +#### Methods + +##### clone + +###### Signature + +```rust +fn clone(&self) -> ? +``` + +###### Returns + +`?` + +###### Source + +[`src/security/webhook.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook.rs) + +Line 74. + +*** + +##### fmt + +###### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/security/webhook.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook.rs) + +Line 74. + +#### Source + +[`src/security/webhook.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook.rs) + +Line 75. + +*** + +### WebhookError + +Errors returned by the webhook validator. + +`validate_webhook_signature` and `validate_request` return +`Result` so callers can distinguish a legitimate +"signature did not match" (`Ok(false)`) from a programming-error +"you forgot the signing key" (`Err(WebhookError::MissingSigningKey)`). +Per the spec, missing/empty _signature header_ and malformed +signatures return `Ok(false)` — those are not errors. + +#### Signature + +```rust +enum WebhookError +``` + +#### Inheritance + +**Implements:** `Debug`, `Clone`, `PartialEq`, `Eq`, `Display`, [Error](/docs/sdk-reference/reference/rust/core/security/webhook-layer/webhook-validate#error) + +#### Variants + + + Caller passed an empty `signing_key`. This is a programming error (the key is mandatory configuration), not a validation failure — Python raises `ValueError` here, Node throws. + + +#### Methods + +##### clone + +###### Signature + +```rust +fn clone(&self) -> ? +``` + +###### Returns + +`?` + +###### Source + +[`src/security/webhook.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook.rs) + +Line 49. + +*** + +##### eq + +###### Signature + +```rust +fn eq(&self, other: &?) -> bool +``` + +###### Parameters + + + +###### Returns + +`bool` + +###### Source + +[`src/security/webhook.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook.rs) + +Line 49. + +*** + +##### fmt + +###### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/security/webhook.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook.rs) + +Line 49. + +*** + +##### fmt + +###### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/security/webhook.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook.rs) + +Line 58. + +#### Source + +[`src/security/webhook.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook.rs) + +Line 50. + +## Source + +[`src/security/webhook.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/core/utils/index.mdx b/fern/products/sdk-reference/rust/core/utils/index.mdx new file mode 100644 index 0000000000..37fca52b0f --- /dev/null +++ b/fern/products/sdk-reference/rust/core/utils/index.mdx @@ -0,0 +1,61 @@ +--- +slug: "/reference/rust/core/utils" +title: "utils" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::utils" + parent: "core" + module: "core" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/utils/mod.rs" + visibility: "public" +--- +# `utils` + +## Modules + + + + + + SSRF-prevention guard for user-supplied URLs. + + + +## Functions + +### is\_serverless\_mode + +Cross-language SDK contract: `signalwire.utils.is_serverless_mode` +returns `true` whenever the SDK is running inside any short-lived / +event-driven invocation environment (anything other than `"server"`). + +Mirrors `signalwire.utils.is_serverless_mode` in the Python +reference. The actual detection ladder lives in +`core::logging_config::get_execution_mode`; this helper just maps +"anything except 'server'" -> `true`. + +#### Signature + +```rust +fn is_serverless_mode() -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/utils/mod.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/mod.rs) + +Line 20. + +## Source + +[`src/utils/mod.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/mod.rs) + +Line 4. diff --git a/fern/products/sdk-reference/rust/core/utils/schema-utils/index.mdx b/fern/products/sdk-reference/rust/core/utils/schema-utils/index.mdx new file mode 100644 index 0000000000..19fecb492a --- /dev/null +++ b/fern/products/sdk-reference/rust/core/utils/schema-utils/index.mdx @@ -0,0 +1,38 @@ +--- +slug: "/reference/rust/core/utils/schema-utils" +title: "schema_utils" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::utils::schema_utils" + parent: "signalwire::utils" + module: "core.utils" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs" + visibility: "public" +--- +# `schema_utils` + +## Classes + + + + SchemaUtils — Rust port of `signalwire.utils.schema_utils.SchemaUtils`. + + + + SchemaValidationError — Rust port of `signalwire.utils.schema_utils.SchemaValidationError`. + + + + Verb metadata extracted from the schema. + + + +## Source + +[`src/utils/schema_utils.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs) + +Line 17. diff --git a/fern/products/sdk-reference/rust/core/utils/schema-utils/schema-utils/index.mdx b/fern/products/sdk-reference/rust/core/utils/schema-utils/schema-utils/index.mdx new file mode 100644 index 0000000000..68205bb3df --- /dev/null +++ b/fern/products/sdk-reference/rust/core/utils/schema-utils/schema-utils/index.mdx @@ -0,0 +1,323 @@ +--- +slug: "/reference/rust/core/utils/schema-utils/schema-utils" +title: "SchemaUtils" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::utils::schema_utils::SchemaUtils" + parent: "signalwire::utils::schema_utils" + module: "core.utils.schema_utils" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs" + visibility: "public" +--- +# `SchemaUtils` + +SchemaUtils — Rust port of +`signalwire.utils.schema_utils.SchemaUtils`. + +## Signature + +```rust +struct SchemaUtils { /* fields */ } +``` + +## Methods + +### full\_validation\_available + +Whether full JSON Schema validation is wired up. Mirrors +Python's `full_validation_available` property. + +#### Signature + +```rust +fn full_validation_available(&self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/utils/schema_utils.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs) + +Line 93. + +*** + +### generate\_method\_body + +Generate a Python-style method body string for a verb. Mirrors +Python's `generate_method_body(verb_name)`. + +#### Signature + +```rust +fn generate_method_body(&self, verb_name: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/utils/schema_utils.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs) + +Line 239. + +*** + +### generate\_method\_signature + +Generate a Python-style method signature string for a verb. +Mirrors Python's `generate_method_signature(verb_name)`. + +#### Signature + +```rust +fn generate_method_signature(&self, verb_name: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/utils/schema_utils.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs) + +Line 202. + +*** + +### get\_all\_verb\_names + +Sorted list of all known verb names. Mirrors Python's +`get_all_verb_names()`. + +#### Signature + +```rust +fn get_all_verb_names(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/utils/schema_utils.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs) + +Line 110. + +*** + +### get\_verb\_parameters + +Parameter-definition block used by code-gen tooling. Mirrors +Python's `get_verb_parameters(verb_name)`. + +#### Signature + +```rust +fn get_verb_parameters(&self, verb_name: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/utils/schema_utils.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs) + +Line 145. + +*** + +### get\_verb\_properties + +The `properties[verb_name]` block for a verb, or empty when +unknown. Mirrors Python's `get_verb_properties(verb_name)`. + +#### Signature + +```rust +fn get_verb_properties(&self, verb_name: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/utils/schema_utils.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs) + +Line 116. + +*** + +### get\_verb\_required\_properties + +The `required` list for a verb, or empty when unknown / not +specified. Mirrors Python's +`get_verb_required_properties(verb_name)`. + +#### Signature + +```rust +fn get_verb_required_properties(&self, verb_name: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/utils/schema_utils.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs) + +Line 132. + +*** + +### load\_schema + +Read and parse the JSON Schema. Mirrors Python's +`load_schema()`. + +#### Signature + +```rust +fn load_schema(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/utils/schema_utils.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs) + +Line 99. + +*** + +### new + +Construct a SchemaUtils. Mirrors Python's +`SchemaUtils(schema_path=None, schema_validation=True)`. + +#### Signature + +```rust +fn new(schema_path: ?, schema_validation: bool) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/utils/schema_utils.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs) + +Line 74. + +*** + +### validate\_document + +Validate a complete SWML document. Mirrors Python's +`validate_document(document)`. Returns +`(false, ["Schema validator not initialized"])` when no full +validator is wired in. + +#### Signature + +```rust +fn validate_document(&self, _document: &?) -> (bool, ?) +``` + +#### Parameters + + + +#### Returns + +`(bool, ?)` + +#### Source + +[`src/utils/schema_utils.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs) + +Line 192. + +*** + +### validate\_verb + +Validate a verb config against the schema. Mirrors Python's +`validate_verb(verb_name, verb_config)`. + +#### Signature + +```rust +fn validate_verb(&self, verb_name: &str, verb_config: &?) -> (bool, ?) +``` + +#### Parameters + + + + + +#### Returns + +`(bool, ?)` + +#### Source + +[`src/utils/schema_utils.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs) + +Line 155. + +## Source + +[`src/utils/schema_utils.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs) + +Line 63. diff --git a/fern/products/sdk-reference/rust/core/utils/schema-utils/schema-validation-error/index.mdx b/fern/products/sdk-reference/rust/core/utils/schema-utils/schema-validation-error/index.mdx new file mode 100644 index 0000000000..d8c37c256a --- /dev/null +++ b/fern/products/sdk-reference/rust/core/utils/schema-utils/schema-validation-error/index.mdx @@ -0,0 +1,138 @@ +--- +slug: "/reference/rust/core/utils/schema-utils/schema-validation-error" +title: "SchemaValidationError" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::utils::schema_utils::SchemaValidationError" + parent: "signalwire::utils::schema_utils" + module: "core.utils.schema_utils" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs" + visibility: "public" +--- +# `SchemaValidationError` + +SchemaValidationError — Rust port of +`signalwire.utils.schema_utils.SchemaValidationError`. + +## Signature + +```rust +struct SchemaValidationError { /* fields */ } +``` + +## Inheritance + +**Implements:** `Debug`, `Clone`, `Display`, [Error](/docs/sdk-reference/reference/rust/core/security/webhook-layer/webhook-validate#error) + +## Properties + + + + + +## Methods + +### clone + +#### Signature + +```rust +fn clone(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/utils/schema_utils.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs) + +Line 26. + +*** + +### fmt + +#### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/utils/schema_utils.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs) + +Line 26. + +*** + +### fmt + +#### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/utils/schema_utils.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs) + +Line 41. + +*** + +### new + +Construct a SchemaValidationError. Mirrors Python's +`SchemaValidationError(verb_name, errors)`. + +#### Signature + +```rust +fn new(verb_name: ?, errors: ?) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/utils/schema_utils.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs) + +Line 35. + +## Source + +[`src/utils/schema_utils.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs) + +Line 27. diff --git a/fern/products/sdk-reference/rust/core/utils/schema-utils/verb-definition/index.mdx b/fern/products/sdk-reference/rust/core/utils/schema-utils/verb-definition/index.mdx new file mode 100644 index 0000000000..a3e5b10218 --- /dev/null +++ b/fern/products/sdk-reference/rust/core/utils/schema-utils/verb-definition/index.mdx @@ -0,0 +1,86 @@ +--- +slug: "/reference/rust/core/utils/schema-utils/verb-definition" +title: "VerbDefinition" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::utils::schema_utils::VerbDefinition" + parent: "signalwire::utils::schema_utils" + module: "core.utils.schema_utils" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs" + visibility: "public" +--- +# `VerbDefinition` + +Verb metadata extracted from the schema. + +## Signature + +```rust +struct VerbDefinition { /* fields */ } +``` + +## Inheritance + +**Implements:** `Debug`, `Clone` + +## Properties + + + + + + + +## Methods + +### clone + +#### Signature + +```rust +fn clone(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/utils/schema_utils.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs) + +Line 54. + +*** + +### fmt + +#### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/utils/schema_utils.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs) + +Line 54. + +## Source + +[`src/utils/schema_utils.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs) + +Line 55. diff --git a/fern/products/sdk-reference/rust/core/utils/url-validator/index.mdx b/fern/products/sdk-reference/rust/core/utils/url-validator/index.mdx new file mode 100644 index 0000000000..e9ea7d9574 --- /dev/null +++ b/fern/products/sdk-reference/rust/core/utils/url-validator/index.mdx @@ -0,0 +1,89 @@ +--- +slug: "/reference/rust/core/utils/url-validator" +title: "url_validator" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::utils::url_validator" + parent: "signalwire::utils" + module: "core.utils" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/utils/url_validator.rs" + visibility: "public" +--- +# `url_validator` + +SSRF-prevention guard for user-supplied URLs. + +Mirrors Python's `signalwire.utils.url_validator.validate_url`: +rejects non-http(s) schemes, missing hostnames, and any URL whose +hostname resolves to a private / loopback / link-local / cloud- +metadata IP. When `allow_private` is true, OR the +`SWML_ALLOW_PRIVATE_URLS` env var is set to `"1"`, `"true"`, or +`"yes"` (case-insensitive), the IP-blocklist check is skipped. + +## Constants + + + Cross-port SSRF block list. Order matches the Python reference for ease of cross-language review. + + +## Functions + +### \_set\_resolver + +Install a custom resolver (for tests). Pass `None` to clear. + +#### Signature + +```rust +fn _set_resolver(resolver: ?>) +``` + +#### Parameters + + + +#### Source + +[`src/utils/url_validator.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/url_validator.rs) + +Line 44. + +*** + +### validate\_url + +Validate that a URL is safe to fetch. + +Mirrors Python's `validate_url(url, allow_private=False) -> bool`. + +#### Signature + +```rust +fn validate_url(url: &str, allow_private: bool) -> bool +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`src/utils/url_validator.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/url_validator.rs) + +Line 116. + +## Source + +[`src/utils/url_validator.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/url_validator.rs) + +Line 6. diff --git a/fern/products/sdk-reference/rust/index.mdx b/fern/products/sdk-reference/rust/index.mdx index 8478858ca0..d181244e76 100644 --- a/fern/products/sdk-reference/rust/index.mdx +++ b/fern/products/sdk-reference/rust/index.mdx @@ -11,5 +11,9 @@ Version: **1.1.2** ## Modules +- [`agents`](/docs/sdk-reference/reference/rust/agents) +- [`core`](/docs/sdk-reference/reference/rust/core) +- [`relay`](/docs/sdk-reference/reference/rust/relay) +- [`rest`](/docs/sdk-reference/reference/rust/rest) - [`signalwire`](/docs/sdk-reference/reference/rust/signalwire) diff --git a/fern/products/sdk-reference/rust/relay/action/ai-action/index.mdx b/fern/products/sdk-reference/rust/relay/action/ai-action/index.mdx new file mode 100644 index 0000000000..b3090f43a2 --- /dev/null +++ b/fern/products/sdk-reference/rust/relay/action/ai-action/index.mdx @@ -0,0 +1,114 @@ +--- +slug: "/reference/rust/relay/action/ai-action" +title: "AIAction" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::relay::action::AIAction" + parent: "relay.action" + module: "relay.action" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs" + visibility: "public" +--- +# `AIAction` + +## Signature + +```rust +struct AIAction { /* fields */ } +``` + +## Inheritance + +**Implements:** `Deref` + +## Properties + + + +## Methods + +### action + +#### Signature + +```rust +fn action(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 425. + +*** + +### deref + +#### Signature + +```rust +fn deref(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 425. + +*** + +### new + +#### Signature + +```rust +fn new(control_id: &str, call_id: &str, node_id: &str) -> Self +``` + +#### Parameters + + + + + + + +#### Returns + +`Self` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 425. + +## Type Aliases + +### Target + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 425. + +## Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 425. diff --git a/fern/products/sdk-reference/rust/relay/action/collect-action/index.mdx b/fern/products/sdk-reference/rust/relay/action/collect-action/index.mdx new file mode 100644 index 0000000000..1597931006 --- /dev/null +++ b/fern/products/sdk-reference/rust/relay/action/collect-action/index.mdx @@ -0,0 +1,172 @@ +--- +slug: "/reference/rust/relay/action/collect-action" +title: "CollectAction" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::relay::action::CollectAction" + parent: "relay.action" + module: "relay.action" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs" + visibility: "public" +--- +# `CollectAction` + +## Signature + +```rust +struct CollectAction { /* fields */ } +``` + +## Inheritance + +**Implements:** `Deref` + +## Properties + + + +## Methods + +### action + +#### Signature + +```rust +fn action(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 344. + +*** + +### collect\_result + +#### Signature + +```rust +fn collect_result(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 352. + +*** + +### deref + +#### Signature + +```rust +fn deref(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 367. + +*** + +### handle\_event\_filtered + +Handle an event, silently ignoring intermediate play events. + +#### Signature + +```rust +fn handle_event_filtered(&self, event: &?) +``` + +#### Parameters + + + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 357. + +*** + +### new + +#### Signature + +```rust +fn new(control_id: &str, call_id: &str, node_id: &str) -> Self +``` + +#### Parameters + + + + + + + +#### Returns + +`Self` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 333. + +*** + +### start\_input\_timers + +#### Signature + +```rust +fn start_input_timers(&self) +``` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 348. + +## Type Aliases + +### Target + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 366. + +## Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 328. diff --git a/fern/products/sdk-reference/rust/relay/action/detect-action/index.mdx b/fern/products/sdk-reference/rust/relay/action/detect-action/index.mdx new file mode 100644 index 0000000000..7b92993d0f --- /dev/null +++ b/fern/products/sdk-reference/rust/relay/action/detect-action/index.mdx @@ -0,0 +1,134 @@ +--- +slug: "/reference/rust/relay/action/detect-action" +title: "DetectAction" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::relay::action::DetectAction" + parent: "relay.action" + module: "relay.action" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs" + visibility: "public" +--- +# `DetectAction` + +## Signature + +```rust +struct DetectAction { /* fields */ } +``` + +## Inheritance + +**Implements:** `Deref` + +## Properties + + + +## Methods + +### action + +#### Signature + +```rust +fn action(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 374. + +*** + +### deref + +#### Signature + +```rust +fn deref(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 374. + +*** + +### detect\_result + +#### Signature + +```rust +fn detect_result(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 377. + +*** + +### new + +#### Signature + +```rust +fn new(control_id: &str, call_id: &str, node_id: &str) -> Self +``` + +#### Parameters + + + + + + + +#### Returns + +`Self` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 374. + +## Type Aliases + +### Target + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 374. + +## Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 374. diff --git a/fern/products/sdk-reference/rust/relay/action/fax-action/index.mdx b/fern/products/sdk-reference/rust/relay/action/fax-action/index.mdx new file mode 100644 index 0000000000..f692877cdf --- /dev/null +++ b/fern/products/sdk-reference/rust/relay/action/fax-action/index.mdx @@ -0,0 +1,138 @@ +--- +slug: "/reference/rust/relay/action/fax-action" +title: "FaxAction" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::relay::action::FaxAction" + parent: "relay.action" + module: "relay.action" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs" + visibility: "public" +--- +# `FaxAction` + +## Signature + +```rust +struct FaxAction { /* fields */ } +``` + +## Inheritance + +**Implements:** `Deref` + +## Properties + + + + + +## Methods + +### action + +#### Signature + +```rust +fn action(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 403. + +*** + +### deref + +#### Signature + +```rust +fn deref(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 414. + +*** + +### fax\_type + +#### Signature + +```rust +fn fax_type(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 407. + +*** + +### new + +#### Signature + +```rust +fn new(control_id: &str, call_id: &str, node_id: &str, fax_type: &str) -> Self +``` + +#### Parameters + + + + + + + + + +#### Returns + +`Self` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 391. + +## Type Aliases + +### Target + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 413. + +## Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 385. diff --git a/fern/products/sdk-reference/rust/relay/action/index.mdx b/fern/products/sdk-reference/rust/relay/action/index.mdx new file mode 100644 index 0000000000..57d2a7a4d6 --- /dev/null +++ b/fern/products/sdk-reference/rust/relay/action/index.mdx @@ -0,0 +1,432 @@ +--- +slug: "/reference/rust/relay/action" +title: "action" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::relay::action" + parent: "signalwire::relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs" + visibility: "public" +--- +# `action` + +Base class for all RELAY call actions (play, record, collect, etc.). + +An Action is the client-side handle returned when you start an +asynchronous operation on a call. It accumulates events, tracks +state, and resolves once the operation reaches a terminal state. + +## Signature + +```rust +struct Action { /* fields */ } +``` + +## Methods + +### call\_id + +#### Signature + +```rust +fn call_id(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 75. + +*** + +### control\_id + +#### Signature + +```rust +fn control_id(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 71. + +*** + +### events + +#### Signature + +```rust +fn events(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 99. + +*** + +### execute\_subcommand + +Send a sub-command RPC through the client. + +#### Signature + +```rust +fn execute_subcommand(&self, method: &str, extra: ?) +``` + +#### Parameters + + + + + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 199. + +*** + +### handle\_event + +Append an incoming event and update local state / payload. +Subclasses override `should_handle_event` to filter. + +#### Signature + +```rust +fn handle_event(&self, event: &?) +``` + +#### Parameters + + + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 139. + +*** + +### is\_done + +#### Signature + +```rust +fn is_done(&self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 83. + +*** + +### new + +#### Signature + +```rust +fn new(control_id: &str, call_id: &str, node_id: &str) -> Self +``` + +#### Parameters + + + + + + + +#### Returns + +`Self` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 40. + +*** + +### node\_id + +#### Signature + +```rust +fn node_id(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 79. + +*** + +### on\_completed + +Register a callback to fire when the action completes. +If the action is already done, the callback fires immediately. + +#### Signature + +```rust +fn on_completed(&self, cb: F) +``` + +#### Type Parameters + + + +#### Parameters + + + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 123. + +*** + +### payload + +#### Signature + +```rust +fn payload(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 95. + +*** + +### resolve + +Mark this action as completed. + +#### Signature + +```rust +fn resolve(&self, result: ?) +``` + +#### Parameters + + + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 168. + +*** + +### result + +#### Signature + +```rust +fn result(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 91. + +*** + +### set\_notify\_sender + +Install a channel sender so that `wait_sync()` can block until +the action resolves. + +#### Signature + +```rust +fn set_notify_sender(&self, tx: ?<()>) +``` + +#### Parameters + + + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 113. + +*** + +### state + +#### Signature + +```rust +fn state(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 87. + +*** + +### stop + +Stop the running action by sending its stop sub-command. + +#### Signature + +```rust +fn stop(&self) +``` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 192. + +*** + +### stop\_method + +#### Signature + +```rust +fn stop_method(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 103. + +*** + +### with\_stop\_method + +#### Signature + +```rust +fn with_stop_method( + control_id: &str, + call_id: &str, + node_id: &str, + stop_method: &str +) -> Self +``` + +#### Parameters + + + + + + + + + +#### Returns + +`Self` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 44. + +## Type Aliases + +### CompletedCallback + +Callback type for completion notifications. + +#### Signature + +```rust +type CompletedCallback = ? +``` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 9. + +## Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 20. diff --git a/fern/products/sdk-reference/rust/relay/action/index__2.mdx b/fern/products/sdk-reference/rust/relay/action/index__2.mdx new file mode 100644 index 0000000000..e5650df1bf --- /dev/null +++ b/fern/products/sdk-reference/rust/relay/action/index__2.mdx @@ -0,0 +1,38 @@ +--- +slug: "/reference/rust/relay/action/index__2" +title: "action" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "relay.action" + parent: "signalwire::relay" + module: "relay" +--- +# `action` + +## Classes + + + + + + + + + + + + + + + + + + + + + + diff --git a/fern/products/sdk-reference/rust/relay/action/pay-action/index.mdx b/fern/products/sdk-reference/rust/relay/action/pay-action/index.mdx new file mode 100644 index 0000000000..22d2449b87 --- /dev/null +++ b/fern/products/sdk-reference/rust/relay/action/pay-action/index.mdx @@ -0,0 +1,114 @@ +--- +slug: "/reference/rust/relay/action/pay-action" +title: "PayAction" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::relay::action::PayAction" + parent: "relay.action" + module: "relay.action" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs" + visibility: "public" +--- +# `PayAction` + +## Signature + +```rust +struct PayAction { /* fields */ } +``` + +## Inheritance + +**Implements:** `Deref` + +## Properties + + + +## Methods + +### action + +#### Signature + +```rust +fn action(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 423. + +*** + +### deref + +#### Signature + +```rust +fn deref(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 423. + +*** + +### new + +#### Signature + +```rust +fn new(control_id: &str, call_id: &str, node_id: &str) -> Self +``` + +#### Parameters + + + + + + + +#### Returns + +`Self` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 423. + +## Type Aliases + +### Target + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 423. + +## Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 423. diff --git a/fern/products/sdk-reference/rust/relay/action/play-action/index.mdx b/fern/products/sdk-reference/rust/relay/action/play-action/index.mdx new file mode 100644 index 0000000000..1313a61b04 --- /dev/null +++ b/fern/products/sdk-reference/rust/relay/action/play-action/index.mdx @@ -0,0 +1,166 @@ +--- +slug: "/reference/rust/relay/action/play-action" +title: "PlayAction" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::relay::action::PlayAction" + parent: "relay.action" + module: "relay.action" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs" + visibility: "public" +--- +# `PlayAction` + +## Signature + +```rust +struct PlayAction { /* fields */ } +``` + +## Inheritance + +**Implements:** `Deref` + +## Properties + + + +## Methods + +### action + +#### Signature + +```rust +fn action(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 279. + +*** + +### deref + +#### Signature + +```rust +fn deref(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 279. + +*** + +### new + +#### Signature + +```rust +fn new(control_id: &str, call_id: &str, node_id: &str) -> Self +``` + +#### Parameters + + + + + + + +#### Returns + +`Self` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 279. + +*** + +### pause + +#### Signature + +```rust +fn pause(&self) +``` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 282. + +*** + +### resume + +#### Signature + +```rust +fn resume(&self) +``` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 286. + +*** + +### volume + +#### Signature + +```rust +fn volume(&self, db: f64) +``` + +#### Parameters + + + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 290. + +## Type Aliases + +### Target + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 279. + +## Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 279. diff --git a/fern/products/sdk-reference/rust/relay/action/record-action/index.mdx b/fern/products/sdk-reference/rust/relay/action/record-action/index.mdx new file mode 100644 index 0000000000..c0f2e951d5 --- /dev/null +++ b/fern/products/sdk-reference/rust/relay/action/record-action/index.mdx @@ -0,0 +1,206 @@ +--- +slug: "/reference/rust/relay/action/record-action" +title: "RecordAction" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::relay::action::RecordAction" + parent: "relay.action" + module: "relay.action" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs" + visibility: "public" +--- +# `RecordAction` + +## Signature + +```rust +struct RecordAction { /* fields */ } +``` + +## Inheritance + +**Implements:** `Deref` + +## Properties + + + +## Methods + +### action + +#### Signature + +```rust +fn action(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 299. + +*** + +### deref + +#### Signature + +```rust +fn deref(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 299. + +*** + +### duration + +#### Signature + +```rust +fn duration(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 317. + +*** + +### new + +#### Signature + +```rust +fn new(control_id: &str, call_id: &str, node_id: &str) -> Self +``` + +#### Parameters + + + + + + + +#### Returns + +`Self` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 299. + +*** + +### pause + +#### Signature + +```rust +fn pause(&self) +``` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 302. + +*** + +### resume + +#### Signature + +```rust +fn resume(&self) +``` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 306. + +*** + +### size + +#### Signature + +```rust +fn size(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 321. + +*** + +### url + +#### Signature + +```rust +fn url(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 310. + +## Type Aliases + +### Target + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 299. + +## Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 299. diff --git a/fern/products/sdk-reference/rust/relay/action/stream-action/index.mdx b/fern/products/sdk-reference/rust/relay/action/stream-action/index.mdx new file mode 100644 index 0000000000..ff7cf73125 --- /dev/null +++ b/fern/products/sdk-reference/rust/relay/action/stream-action/index.mdx @@ -0,0 +1,114 @@ +--- +slug: "/reference/rust/relay/action/stream-action" +title: "StreamAction" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::relay::action::StreamAction" + parent: "relay.action" + module: "relay.action" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs" + visibility: "public" +--- +# `StreamAction` + +## Signature + +```rust +struct StreamAction { /* fields */ } +``` + +## Inheritance + +**Implements:** `Deref` + +## Properties + + + +## Methods + +### action + +#### Signature + +```rust +fn action(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 422. + +*** + +### deref + +#### Signature + +```rust +fn deref(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 422. + +*** + +### new + +#### Signature + +```rust +fn new(control_id: &str, call_id: &str, node_id: &str) -> Self +``` + +#### Parameters + + + + + + + +#### Returns + +`Self` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 422. + +## Type Aliases + +### Target + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 422. + +## Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 422. diff --git a/fern/products/sdk-reference/rust/relay/action/tap-action/index.mdx b/fern/products/sdk-reference/rust/relay/action/tap-action/index.mdx new file mode 100644 index 0000000000..d08338d92f --- /dev/null +++ b/fern/products/sdk-reference/rust/relay/action/tap-action/index.mdx @@ -0,0 +1,114 @@ +--- +slug: "/reference/rust/relay/action/tap-action" +title: "TapAction" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::relay::action::TapAction" + parent: "relay.action" + module: "relay.action" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs" + visibility: "public" +--- +# `TapAction` + +## Signature + +```rust +struct TapAction { /* fields */ } +``` + +## Inheritance + +**Implements:** `Deref` + +## Properties + + + +## Methods + +### action + +#### Signature + +```rust +fn action(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 421. + +*** + +### deref + +#### Signature + +```rust +fn deref(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 421. + +*** + +### new + +#### Signature + +```rust +fn new(control_id: &str, call_id: &str, node_id: &str) -> Self +``` + +#### Parameters + + + + + + + +#### Returns + +`Self` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 421. + +## Type Aliases + +### Target + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 421. + +## Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 421. diff --git a/fern/products/sdk-reference/rust/relay/action/transcribe-action/index.mdx b/fern/products/sdk-reference/rust/relay/action/transcribe-action/index.mdx new file mode 100644 index 0000000000..6353872c49 --- /dev/null +++ b/fern/products/sdk-reference/rust/relay/action/transcribe-action/index.mdx @@ -0,0 +1,114 @@ +--- +slug: "/reference/rust/relay/action/transcribe-action" +title: "TranscribeAction" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::relay::action::TranscribeAction" + parent: "relay.action" + module: "relay.action" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs" + visibility: "public" +--- +# `TranscribeAction` + +## Signature + +```rust +struct TranscribeAction { /* fields */ } +``` + +## Inheritance + +**Implements:** `Deref` + +## Properties + + + +## Methods + +### action + +#### Signature + +```rust +fn action(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 424. + +*** + +### deref + +#### Signature + +```rust +fn deref(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 424. + +*** + +### new + +#### Signature + +```rust +fn new(control_id: &str, call_id: &str, node_id: &str) -> Self +``` + +#### Parameters + + + + + + + +#### Returns + +`Self` + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 424. + +## Type Aliases + +### Target + +#### Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 424. + +## Source + +[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) + +Line 424. diff --git a/fern/products/sdk-reference/rust/relay/call/index.mdx b/fern/products/sdk-reference/rust/relay/call/index.mdx new file mode 100644 index 0000000000..29b0383b4c --- /dev/null +++ b/fern/products/sdk-reference/rust/relay/call/index.mdx @@ -0,0 +1,1436 @@ +--- +slug: "/reference/rust/relay/call" +title: "call" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::relay::call" + parent: "signalwire::relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs" + visibility: "public" +--- +# `call` + +Represents a RELAY voice call. + +Holds call-level state, dispatches server events to registered listeners +and to in-flight Action objects, and exposes every calling.\* RPC method +as a first-class Rust method. + +## Signature + +```rust +struct Call { /* fields */ } +``` + +## Properties + + + + + + + + + + + + + + + + + + + + + + + +## Methods + +### ai + +#### Signature + +```rust +fn ai(&self, params: ?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 361. + +*** + +### ai\_hold + +#### Signature + +```rust +fn ai_hold(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 285. + +*** + +### ai\_message + +#### Signature + +```rust +fn ai_message(&self, params: ?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 281. + +*** + +### ai\_unhold + +#### Signature + +```rust +fn ai_unhold(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 289. + +*** + +### amazon\_bedrock + +#### Signature + +```rust +fn amazon_bedrock(&self, params: ?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 277. + +*** + +### answer + +#### Signature + +```rust +fn answer(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 201. + +*** + +### bind\_digit + +#### Signature + +```rust +fn bind_digit(&self, params: ?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 253. + +*** + +### call\_state + +Current call state as a typed \[`CallState`]. + +The typed counterpart to `current_state`: both +read the same underlying string, so +`call.call_state().as_str() == call.current_state()` always holds. An +unrecognised server value parses to \[`CallState::Other`] rather than +panicking. Enables `match call.call_state() { CallState::Ended => …, … }` +and `call.call_state().is_terminal()` instead of stringly comparisons. + +**Decorators:** `@must_use` + +#### Signature + +```rust +fn call_state(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 101. + +*** + +### clear\_digit\_bindings + +#### Signature + +```rust +fn clear_digit_bindings(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 257. + +*** + +### collect + +#### Signature + +```rust +fn collect(&self, params: ?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 325. + +*** + +### connect + +#### Signature + +```rust +fn connect(&self, params: ?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 213. + +*** + +### current\_state + +Current call state. + +#### Signature + +```rust +fn current_state(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 88. + +*** + +### denoise + +#### Signature + +```rust +fn denoise(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 229. + +*** + +### denoise\_stop + +#### Signature + +```rust +fn denoise_stop(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 233. + +*** + +### detect + +#### Signature + +```rust +fn detect(&self, params: ?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 333. + +*** + +### detect\_answering\_machine + +Detect human vs answering machine (AMD). Typed convenience over +\[`Call::detect`]. + +Wire shape: `detect {"type":"machine","params":{...only-provided...}}` +with an optional top-level `timeout`. `opts` may carry any of +`initial_timeout`, `end_silence_timeout`, `machine_voice_threshold`, +`machine_words_threshold`, `detect_interruptions`, +`detect_message_end`, and `timeout`. + +#### Signature + +```rust +fn detect_answering_machine(&self, opts: ?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 486. + +*** + +### detect\_digit + +Detect DTMF digits. Typed convenience over \[`Call::detect`]. + +Wire shape: `detect {"type":"digit","params":{digits?}}` with an +optional top-level `timeout`. `opts` may carry `digits` (string) +and `timeout` (number). + +#### Signature + +```rust +fn detect_digit(&self, opts: ?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 462. + +*** + +### detect\_fax + +Detect a fax tone (CED/CNG). Typed convenience over \[`Call::detect`]. + +Wire shape: `detect {"type":"fax","params":{tone?}}` with an optional +top-level `timeout`. `opts` may carry `tone` (string) and `timeout` +(number). + +#### Signature + +```rust +fn detect_fax(&self, opts: ?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 516. + +*** + +### disconnect + +#### Signature + +```rust +fn disconnect(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 217. + +*** + +### dispatch\_event + +Central event router invoked by the Client whenever a server event +targets this call. + +#### Signature + +```rust +fn dispatch_event(&self, event: &?) +``` + +#### Parameters + + + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 121. + +*** + +### echo\_call + +#### Signature + +```rust +fn echo_call(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 249. + +*** + +### hangup + +#### Signature + +```rust +fn hangup(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 205. + +*** + +### hold + +#### Signature + +```rust +fn hold(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 221. + +*** + +### join\_conference + +#### Signature + +```rust +fn join_conference(&self, params: ?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 241. + +*** + +### join\_room + +#### Signature + +```rust +fn join_room(&self, params: ?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 269. + +*** + +### leave\_conference + +#### Signature + +```rust +fn leave_conference(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 245. + +*** + +### leave\_room + +#### Signature + +```rust +fn leave_room(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 273. + +*** + +### live\_transcribe + +#### Signature + +```rust +fn live_transcribe(&self, params: ?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 261. + +*** + +### live\_translate + +#### Signature + +```rust +fn live_translate(&self, params: ?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 265. + +*** + +### new + +Construct a Call from a server params object. + +#### Signature + +```rust +fn new(params: &?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 47. + +*** + +### on + +Register a generic event listener on this call. + +#### Signature + +```rust +fn on(&self, cb: F) +``` + +#### Type Parameters + + + +#### Parameters + + + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 182. + +*** + +### pass + +#### Signature + +```rust +fn pass(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 209. + +*** + +### pay + +#### Signature + +```rust +fn pay(&self, params: ?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 353. + +*** + +### play + +#### Signature + +```rust +fn play(&self, params: ?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 317. + +*** + +### play\_and\_collect + +#### Signature + +```rust +fn play_and_collect(&self, params: ?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 329. + +*** + +### play\_audio + +Play an audio file from a URL. Typed convenience over \[`Call::play`]. + +Wire shape: `play [{"type":"audio","params":{"url":...}}]` with an +optional top-level `volume` (read from `opts`). + +#### Signature + +```rust +fn play_audio(&self, url: &str, opts: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 412. + +*** + +### play\_ringtone + +Play a named ringtone by country code. Typed convenience over +\[`Call::play`]. + +Wire shape: `play [{"type":"ringtone","params":{"name":..., +duration?}}]` with an optional top-level `volume`. +`opts` may carry `duration` and `volume` (numbers). + +#### Signature + +```rust +fn play_ringtone(&self, name: &str, opts: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 440. + +*** + +### play\_silence + +Play silence for `duration` seconds. Typed convenience over +\[`Call::play`]. + +Wire shape: `play [{"type":"silence","params":{"duration":...}}]`. + +#### Signature + +```rust +fn play_silence(&self, duration: f64) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 428. + +*** + +### play\_tts + +Play text-to-speech. Typed convenience over \[`Call::play`]. + +Wire shape: `play [{"type":"tts","params":{"text":...,language?, +gender?,voice?}}]` with an optional top-level `volume`. +`opts` may carry `language`, `gender`, `voice` (strings) and +`volume` (number). + +#### Signature + +```rust +fn play_tts(&self, text: &str, opts: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 389. + +*** + +### prompt\_audio + +Play an audio file then collect input. Typed media over +\[`Call::play_and_collect`]. + +Wire shape: `play_and_collect [{"type":"audio","params":{"url":...}}]` +with the given `collect` object and an optional top-level `volume`. +`opts` may carry `volume` (number). + +#### Signature + +```rust +fn prompt_audio(&self, url: &str, collect: ?, opts: ?) -> ? +``` + +#### Parameters + + + + + + + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 565. + +*** + +### prompt\_tts + +Play TTS then collect input. Typed media over +\[`Call::play_and_collect`]. + +Wire shape: `play_and_collect [{"type":"tts","params":{"text":..., +language?,gender?,voice?}}]` with the given `collect` object and an +optional top-level `volume`. `opts` may carry `language`, `gender`, +`voice` (strings) and `volume` (number). + +#### Signature + +```rust +fn prompt_tts(&self, text: &str, collect: ?, opts: ?) -> ? +``` + +#### Parameters + + + + + + + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 539. + +*** + +### queue\_enter + +#### Signature + +```rust +fn queue_enter(&self, params: ?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 297. + +*** + +### queue\_leave + +#### Signature + +```rust +fn queue_leave(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 301. + +*** + +### receive\_fax + +#### Signature + +```rust +fn receive_fax(&self, params: ?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 341. + +*** + +### record + +#### Signature + +```rust +fn record(&self, params: ?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 321. + +*** + +### refer\_call + +#### Signature + +```rust +fn refer_call(&self, params: ?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 305. + +*** + +### repr + +Python-style `__repr__` (mirrors `Call.__repr__` in the +signalwire-python reference). Returns a string of the form +`Call(call_id=..., state=...)`. + +#### Signature + +```rust +fn repr(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 108. + +*** + +### resolve\_all\_actions + +Mark every outstanding action as completed. + +#### Signature + +```rust +fn resolve_all_actions(&self) +``` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 190. + +*** + +### send\_digits + +#### Signature + +```rust +fn send_digits(&self, params: ?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 309. + +*** + +### send\_fax + +#### Signature + +```rust +fn send_fax(&self, params: ?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 337. + +*** + +### stream + +#### Signature + +```rust +fn stream(&self, params: ?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 349. + +*** + +### tap + +#### Signature + +```rust +fn tap(&self, params: ?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 345. + +*** + +### transcribe + +#### Signature + +```rust +fn transcribe(&self, params: ?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 357. + +*** + +### transfer + +#### Signature + +```rust +fn transfer(&self, params: ?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 237. + +*** + +### unhold + +#### Signature + +```rust +fn unhold(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 225. + +*** + +### user\_event + +#### Signature + +```rust +fn user_event(&self, params: ?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 293. + +## Type Aliases + +### CallEventCallback + +Callback type for call-level event listeners. + +#### Signature + +```rust +type CallEventCallback = ? +``` + +#### Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 12. + +## Source + +[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) + +Line 19. diff --git a/fern/products/sdk-reference/rust/relay/client/index.mdx b/fern/products/sdk-reference/rust/relay/client/index.mdx new file mode 100644 index 0000000000..5137daf7ae --- /dev/null +++ b/fern/products/sdk-reference/rust/relay/client/index.mdx @@ -0,0 +1,932 @@ +--- +slug: "/reference/rust/relay/client" +title: "client" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::relay::client" + parent: "signalwire::relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs" + visibility: "public" +--- +# `client` + +RELAY Client -- manages the WebSocket connection to SignalWire, sends +JSON-RPC requests, and dispatches inbound events to the correct Call +or Message objects. + +The transport is a real WebSocket connection over TCP (plus TLS for +`wss://`). One reader thread (spawned on `connect()`) owns the read +half and dispatches every inbound JSON-RPC frame through +`handle_message`. Writes go through `send()` which serializes the +frame and pushes it onto an mpsc channel that the reader thread +drains alongside its read loop, so all socket I/O is single- +threaded but both directions make forward progress. + +Tests still use `sent_messages` to inspect what the client _would_ +have written; `send()` mirrors every frame into that Vec whether or +not a live socket is attached. That keeps the unit tests covering +dispatch logic working without a real RELAY server. + +## Signature + +```rust +struct Client { /* fields */ } +``` + +## Properties + + + + + + + + + + + + + + + + + + + + + Messages sent through the transport (for testing). + + + + + + +## Methods + +### authenticate + +Backwards-compat: enqueue the `signalwire.connect` frame without +waiting. Used by older tests that drive `handle_message` directly. +Production code should call \[`connect`] which runs the full +handshake. + +#### Signature + +```rust +fn authenticate(&self) +``` + +#### Source + +[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) + +Line 480. + +*** + +### authenticate\_blocking + +Send the `signalwire.connect` RPC and block until the response +arrives or the handshake times out. The response carries the +server-assigned protocol string and authorization state. + +#### Signature + +```rust +fn authenticate_blocking(&self) -> ?<(), ?> +``` + +#### Returns + +`?<(), ?>` + +#### Source + +[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) + +Line 365. + +*** + +### bump\_reconnect\_delay + +Compute the next reconnect delay (1s → 2s → 4s → … → 30s) and +return the value to wait _this_ time. Mirrors Python's +`RECONNECT_MIN_DELAY` / `RECONNECT_MAX_DELAY` / backoff factor. +Exposed (and tested) separately from \[`reconnect`] so the math +is verifiable without opening a real socket. + +#### Signature + +```rust +fn bump_reconnect_delay(&self) -> u64 +``` + +#### Returns + +`u64` + +#### Source + +[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) + +Line 541. + +*** + +### connect + +Open the WebSocket connection, run the `signalwire.connect` +handshake, subscribe to the configured contexts, and spawn the +reader thread that dispatches every inbound frame through +`handle_message`. + +Reads the WebSocket scheme from `SIGNALWIRE_RELAY_SCHEME` (defaults +to `wss`; the audit fixture sets `ws`) and the host override from +`SIGNALWIRE_RELAY_HOST` (used by the audit fixture to point at a +`127.0.0.1:N` ephemeral port). In production neither env var is +usually set and the URL resolves to `wss://{self.host}/api/relay/ws`, +matching Python's `RelayClient.connect()`. + +Returns `Err` if the TCP/WS upgrade fails, the server rejects the +connect handshake, or the response doesn't arrive within +`HANDSHAKE_TIMEOUT`. + +#### Signature + +```rust +fn connect(&self) -> ?<(), ?> +``` + +#### Returns + +`?<(), ?>` + +#### Source + +[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) + +Line 294. + +*** + +### connect\_fresh + +Initial connect -- resets reconnect delay and connects. + +#### Signature + +```rust +fn connect_fresh(&self) -> ?<(), ?> +``` + +#### Returns + +`?<(), ?>` + +#### Source + +[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) + +Line 357. + +*** + +### dial\_blocking + +Initiate an outbound call using `calling.dial`. + +Mirrors Python's `RelayClient.dial`. The dial response carries no +`call_id` — the actual call info arrives via subsequent +`calling.call.dial` events keyed by `tag`. This method waits for +that event up to `dial_timeout` and returns the resolved Call. + +`devices` is the standard serial/parallel device matrix +(`[[device]]` for one parallel leg / serial = one inner list with +multiple devices). + +#### Signature + +```rust +fn dial_blocking( + &self, + devices: ?, + tag: ?<&str>, + max_duration: ?, + dial_timeout: ? +) -> ?, ?> +``` + +#### Parameters + + + + + + + + + +#### Returns + +`?, ?>` + +#### Source + +[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) + +Line 1014. + +*** + +### disconnect + +Gracefully close the connection. Signals the reader thread to +exit, sends a WS close frame, and joins the thread. + +#### Signature + +```rust +fn disconnect(&self) +``` + +#### Source + +[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) + +Line 504. + +*** + +### execute\_blocking + +Send a JSON-RPC request for a calling/messaging method. + +Mirrors Python's `RelayClient._send_request`: emits a flat-Blade +frame `{"method": , "params": }` directly — no +`signalwire.execute` wrapper. Both forms are accepted by the +production RELAY server and the mock; the flat form is what +every existing SDK port emits because it keeps the journal +filterable by inner method name without unwrapping. + +Returns the response's `result` value on success, or an `Err` +with the server's error message on failure or timeout. + +#### Signature + +```rust +fn execute_blocking(&self, method: &str, inner_params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) + +Line 872. + +*** + +### from\_env + +Create from env vars SIGNALWIRE\_PROJECT\_ID, SIGNALWIRE\_API\_TOKEN, SIGNALWIRE\_SPACE. + +#### Signature + +```rust +fn from_env() -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) + +Line 265. + +*** + +### get\_call + +Get a call by ID. + +#### Signature + +```rust +fn get_call(&self, call_id: &str) -> ?> +``` + +#### Parameters + + + +#### Returns + +`?>` + +#### Source + +[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) + +Line 820. + +*** + +### get\_message + +Get a message by ID. + +#### Signature + +```rust +fn get_message(&self, message_id: &str) -> ?> +``` + +#### Parameters + + + +#### Returns + +`?>` + +#### Source + +[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) + +Line 825. + +*** + +### handle\_event + +Route a signalwire.event payload to the appropriate handler. + +#### Signature + +```rust +fn handle_event(&self, outer_params: &?) +``` + +#### Parameters + + + +#### Source + +[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) + +Line 676. + +*** + +### handle\_message + +Parse a raw JSON string from the server and route it. + +#### Signature + +```rust +fn handle_message(&self, raw: &str) +``` + +#### Parameters + + + +#### Source + +[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) + +Line 621. + +*** + +### is\_connected + +#### Signature + +```rust +fn is_connected(&self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) + +Line 548. + +*** + +### is\_running + +#### Signature + +```rust +fn is_running(&self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) + +Line 552. + +*** + +### new + +#### Signature + +```rust +fn new(project: &str, token: &str, host: &str) -> Self +``` + +#### Parameters + + + + + + + +#### Returns + +`Self` + +#### Source + +[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) + +Line 236. + +*** + +### on\_call + +Register a handler for inbound calls. + +#### Signature + +```rust +fn on_call, &?) + ? + ? + 'static>(&self, cb: F) +``` + +#### Type Parameters + + + +#### Parameters + + + +#### Source + +[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) + +Line 805. + +*** + +### on\_event + +Register a generic event handler. + +#### Signature + +```rust +fn on_event(&self, cb: F) +``` + +#### Type Parameters + + + +#### Parameters + + + +#### Source + +[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) + +Line 815. + +*** + +### on\_message + +Register a handler for inbound messages. + +#### Signature + +```rust +fn on_message(&self, cb: F) +``` + +#### Type Parameters + + + +#### Parameters + + + +#### Source + +[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) + +Line 810. + +*** + +### receive + +Subscribe to one or more inbound contexts. + +#### Signature + +```rust +fn receive(&self, contexts: &[?]) +``` + +#### Parameters + + + +#### Source + +[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) + +Line 781. + +*** + +### reconnect + +Reconnect with exponential back-off (1s → 30s cap). Sleeps for +the current delay, doubles the delay (capped at 30s), and runs +the full connect handshake again. Authorization state survives +across reconnects because \[`authenticate_blocking`] re-sends the +stored token on the new socket. + +#### Signature + +```rust +fn reconnect(&self) -> ?<(), ?> +``` + +#### Returns + +`?<(), ?>` + +#### Source + +[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) + +Line 525. + +*** + +### register\_dial + +Register a pending dial. + +#### Signature + +```rust +fn register_dial) + ? + 'static>(&self, tag: &str, resolve: F) +``` + +#### Type Parameters + + + +#### Parameters + + + + + +#### Source + +[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) + +Line 838. + +*** + +### register\_pending + +Register a pending-response slot for a request ID. + +#### Signature + +```rust +fn register_pending( + &self, + id: &str, + resolve: R, + reject: E +) where R: ?(?) + ? + 'static, E: ?(?) + ? + 'static +``` + +#### Type Parameters + + + + + +#### Parameters + + + + + + + +#### Source + +[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) + +Line 574. + +*** + +### remove\_pending\_dial + +Remove a pending dial. + +#### Signature + +```rust +fn remove_pending_dial(&self, tag: &str) +``` + +#### Parameters + + + +#### Source + +[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) + +Line 853. + +*** + +### send + +Send a raw JSON message through the transport. + +Records the frame in `sent_messages` (used by tests and for debug +inspection) and, when a live socket is attached, enqueues the +frame on the writer channel so the reader thread flushes it to +the WebSocket. With no live socket attached the call is purely +in-memory — that's the path the dispatch unit tests below take. + +#### Signature + +```rust +fn send(&self, msg: &?) +``` + +#### Parameters + + + +#### Source + +[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) + +Line 595. + +*** + +### send\_ack + +Send an acknowledgement for a server-initiated request. + +#### Signature + +```rust +fn send_ack(&self, id: &str) +``` + +#### Parameters + + + +#### Source + +[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) + +Line 608. + +*** + +### send\_message\_blocking + +Send an outbound SMS/MMS message. + +Mirrors Python's `RelayClient.send_message`. At least one of +`body` or `media` must be supplied. Returns a tracked `Message` +whose state will progress as `messaging.state` events arrive +from the server. + +#### Signature + +```rust +fn send_message_blocking( + &self, + to_number: &str, + from_number: &str, + body: ?<&str>, + media: ?<&[?]>, + tags: ?<&[?]>, + context: ?<&str> +) -> ?, ?> +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`?, ?>` + +#### Source + +[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) + +Line 927. + +*** + +### send\_request + +Build and send a JSON-RPC request. Returns the message ID. + +#### Signature + +```rust +fn send_request(&self, method: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) + +Line 561. + +*** + +### track\_message + +Track a new message. + +#### Signature + +```rust +fn track_message(&self, message_id: &str, msg: ?) +``` + +#### Parameters + + + + + +#### Source + +[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) + +Line 830. + +*** + +### unreceive + +Unsubscribe from one or more contexts. + +#### Signature + +```rust +fn unreceive(&self, contexts: &[?]) +``` + +#### Parameters + + + +#### Source + +[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) + +Line 795. + +## Type Aliases + +### OnCallHandler + +Callback type for inbound call handler. + +#### Signature + +```rust +type OnCallHandler = ? +``` + +#### Source + +[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) + +Line 147. + +*** + +### OnEventHandler + +Callback type for generic events. + +#### Signature + +```rust +type OnEventHandler = ? +``` + +#### Source + +[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) + +Line 153. + +*** + +### OnMessageHandler + +Callback type for inbound message handler. + +#### Signature + +```rust +type OnMessageHandler = ? +``` + +#### Source + +[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) + +Line 150. + +## Source + +[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) + +Line 190. diff --git a/fern/products/sdk-reference/rust/relay/constants/index.mdx b/fern/products/sdk-reference/rust/relay/constants/index.mdx new file mode 100644 index 0000000000..e06c09e4a9 --- /dev/null +++ b/fern/products/sdk-reference/rust/relay/constants/index.mdx @@ -0,0 +1,148 @@ +--- +slug: "/reference/rust/relay/constants" +title: "constants" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::relay::constants" + parent: "signalwire::relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/constants.rs" + visibility: "public" +--- +# `constants` + +RELAY module -- real-time event signalling over WebSocket (JSON-RPC 2.0). + +Provides constants, event/action primitives, call control, message +tracking, and the async-ready `Client` that ties everything together. + +## Constants + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + RELAY protocol constants. Mirrors the PHP `Constants` class: protocol version, call/dial/message states, terminal-state maps, and per-event-type action terminal states. Protocol version exchanged during `signalwire.connect`. + + + + + + +## Functions + +### is\_action\_terminal + +Returns `true` when the given `(event_type, action_state)` pair represents +a terminal state for an in-flight action. + +#### Signature + +```rust +fn is_action_terminal(event_type: &str, state: &str) -> bool +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`src/relay/constants.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/constants.rs) + +Line 60. + +*** + +### is\_call\_terminal + +Returns `true` when the call state is terminal (i.e. `"ended"`). + +#### Signature + +```rust +fn is_call_terminal(state: &str) -> bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/relay/constants.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/constants.rs) + +Line 22. + +*** + +### is\_message\_terminal + +Returns `true` when the message state is terminal. + +#### Signature + +```rust +fn is_message_terminal(state: &str) -> bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/relay/constants.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/constants.rs) + +Line 47. + +## Source + +[`src/relay/constants.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/constants.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/relay/device/index.mdx b/fern/products/sdk-reference/rust/relay/device/index.mdx new file mode 100644 index 0000000000..caba0957a1 --- /dev/null +++ b/fern/products/sdk-reference/rust/relay/device/index.mdx @@ -0,0 +1,321 @@ +--- +slug: "/reference/rust/relay/device" +title: "device" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::relay::device" + parent: "signalwire::relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/device.rs" + visibility: "public" +--- +# `device` + +A typed RELAY device descriptor (`{type, params}`). + +`type` is the device-kind discriminant (kept as a `String` — the wire +contract does not enumerate it). `params` is the device-specific +parameter object (e.g. `{to_number, from_number}` for a `phone`). + +Build one with \[`Device::new`] (raw params) or \[`Device::phone`] / +\[`Device::sip`] convenience constructors, then hand its +`to_value` to any device-taking call: + +```ignore +let dev = Device::phone("+15551112222", "+15553334444"); +// single parallel leg = one inner list +let devices = Device::matrix(&[&[dev]]); +client.dial_blocking(devices, None, None, timeout); +``` + +## Signature + +```rust +struct Device { /* fields */ } +``` + +## Inheritance + +**Implements:** `Debug`, `Clone`, `PartialEq` + +## Examples + +```rust +let dev = Device::phone("+15551112222", "+15553334444"); +// single parallel leg = one inner list +let devices = Device::matrix(&[&[dev]]); +client.dial_blocking(devices, None, None, timeout); +``` + +## Properties + + + Device kind discriminant (`phone`, `sip`, `webrtc`, `rtp`, …). A plain string: the wire schema does not enumerate it. + + + + Device-specific parameters object. + + +## Methods + +### clone + +#### Signature + +```rust +fn clone(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/device.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/device.rs) + +Line 38. + +*** + +### eq + +#### Signature + +```rust +fn eq(&self, other: &?) -> bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/relay/device.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/device.rs) + +Line 38. + +*** + +### fmt + +#### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/relay/device.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/device.rs) + +Line 38. + +*** + +### matrix + +Build the serial/parallel device **matrix** (`[[device, …], …]`) that +`dial` / `connect` take, from rows of devices. + +Each inner slice is one _serial_ attempt; the outer slice runs its +rows in _parallel_. `Device::matrix(&[&[a, b]])` = try `a` then `b` +in one parallel leg; `Device::matrix(&[&[a], &[b]])` = ring `a` and +`b` in parallel. + +**Decorators:** `@must_use` + +#### Signature + +```rust +fn matrix(rows: &[&[?]]) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/relay/device.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/device.rs) + +Line 121. + +*** + +### new + +Build a device from its `type` discriminant and a `params` object. + +A non-object `params` (or \[`Value::Null`]) is normalised to an empty +object on the wire, matching the hand-written `"params": {}` form. + +**Decorators:** `@must_use` + +#### Signature + +```rust +fn new: ?>(device_type: impl ?, params: ?) -> Self +``` + +#### Type Parameters + + + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/relay/device.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/device.rs) + +Line 53. + +*** + +### phone + +A `phone` device with `to_number` / `from_number` params. + +Emits `{"type":"phone","params":{"to_number":…,"from_number":…}}` — +the shape `Client::dial_blocking` and `Call::connect` expect for PSTN +legs. + +**Decorators:** `@must_use` + +#### Signature + +```rust +fn phone: ?, impl Into: ?>( + to_number: impl ?, + from_number: impl ? +) -> Self +``` + +#### Type Parameters + + + + + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/relay/device.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/device.rs) + +Line 66. + +*** + +### sip + +A `sip` device addressed to a SIP URI. + +Emits `{"type":"sip","params":{"to":…,"from":…}}`. + +**Decorators:** `@must_use` + +#### Signature + +```rust +fn sip: ?, impl Into: ?>( + to: impl ?, + from: impl ? +) -> Self +``` + +#### Type Parameters + + + + + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/relay/device.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/device.rs) + +Line 82. + +*** + +### to\_value + +Serialise to the wire device object: `{"type": …, "params": {…}}`. + +Field order is `type` then `params` and `params` is always an object, +so the output is byte-identical to the hand-written +`json!({"type": t, "params": p})` that every existing device call +site uses. (`serde_json` is built with `preserve_order`, so insertion +order is the serialised order.) + +**Decorators:** `@must_use` + +#### Signature + +```rust +fn to_value(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/device.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/device.rs) + +Line 102. + +## Source + +[`src/relay/device.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/device.rs) + +Line 39. diff --git a/fern/products/sdk-reference/rust/relay/error/index.mdx b/fern/products/sdk-reference/rust/relay/error/index.mdx new file mode 100644 index 0000000000..c4947aa85b --- /dev/null +++ b/fern/products/sdk-reference/rust/relay/error/index.mdx @@ -0,0 +1,261 @@ +--- +slug: "/reference/rust/relay/error" +title: "error" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::relay::error" + parent: "signalwire::relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/error.rs" + visibility: "public" +--- +# `error` + +Typed error for the RELAY client surface. + +The REST layer already ships a proper error enum +(`SignalWireRestError`); this is the +RELAY-side analogue. Before this, the relay client returned +`Result<_, String>` everywhere — a stringly-typed failure channel that +forces callers to pattern-match on message _text_ to react differently to +(say) an auth rejection vs. a transport drop vs. a timeout. \[`RelayError`] +makes the failure modes a closed, inspectable set, exactly like the REST +exemplar. + +Design notes (idiomatic Rust, matching the REST error's bar): + +- The data each failure carries lives **in the variant**, so callers react + by `match`ing rather than calling accessor getters. That keeps the public + surface to the type + its trait impls (`Display` / \[`std::error::Error`]) + and means the audit sees no new methods. +- `#[non_exhaustive]` because the failure set mirrors transport/server + conditions that can grow (new RELAY error classes) without that being a + breaking change — downstream `match` must carry a wildcard. +- Every variant's \[`Display`] is human-actionable and preserves the same + context the old `format!("…")` strings carried, so log output is no worse. + +## Enums + +### RelayError + +Something went wrong talking to the RELAY WebSocket service. + +Returned by the connection-lifecycle and blocking-RPC methods on +`Client` (e.g. `connect`, `authenticate_blocking`, +`execute_blocking`, `dial_blocking`, `send_message_blocking`). + +#### Signature + +```rust +enum RelayError +``` + +#### Inheritance + +**Implements:** `Debug`, `Clone`, `PartialEq`, `Eq`, `Display`, [Error](/docs/sdk-reference/reference/rust/core/security/webhook-layer/webhook-validate#error) + +#### Variants + + + The RELAY server rejected the `signalwire.connect` authentication handshake. Carries the server-reported reason. + + + + A `dial` completed with a `failed` state or never produced an answer before the dial deadline. Carries the reason / tag. + + + + A required argument was invalid (e.g. `send_message` with neither body nor media). Carries the validation message. + + + + A required environment variable was missing when building the client from the environment (`from_env`). Carries the variable name. + + + + The server returned a JSON-RPC error for a request (e.g. a failed `messaging.send` / `calling.dial`). Carries the inner method and the server's error message. + + + + A blocking call did not receive its response within the deadline. Carries what was being awaited so the log line is actionable. + + + + The underlying WebSocket transport failed to connect, upgrade, read, or write. Carries a human description of the transport-level cause. + + +#### Methods + +##### clone + +###### Signature + +```rust +fn clone(&self) -> ? +``` + +###### Returns + +`?` + +###### Source + +[`src/relay/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/error.rs) + +Line 30. + +*** + +##### eq + +###### Signature + +```rust +fn eq(&self, other: &?) -> bool +``` + +###### Parameters + + + +###### Returns + +`bool` + +###### Source + +[`src/relay/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/error.rs) + +Line 30. + +*** + +##### fmt + +###### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/relay/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/error.rs) + +Line 30. + +*** + +##### fmt + +###### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/relay/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/error.rs) + +Line 105. + +*** + +##### missing\_env + +Build a \[`RelayError::MissingEnv`] for the named variable. + +###### Signature + +```rust +fn missing_env: ?>(var: impl ?) -> Self +``` + +###### Type Parameters + + + +###### Parameters + + + +###### Returns + +`Self` + +###### Source + +[`src/relay/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/error.rs) + +Line 99. + +*** + +##### transport + +Build a \[`RelayError::Transport`] from a context and any `Display` cause. +Convenience for the `map_err(|e| …)` call sites in the client. + +###### Signature + +```rust +fn transport: ?, impl fmt::Display: ?>( + context: impl ?, + source: impl ? +) -> Self +``` + +###### Type Parameters + + + + + +###### Parameters + + + + + +###### Returns + +`Self` + +###### Source + +[`src/relay/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/error.rs) + +Line 91. + +#### Source + +[`src/relay/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/error.rs) + +Line 32. + +## Source + +[`src/relay/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/error.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/relay/event/index.mdx b/fern/products/sdk-reference/rust/relay/event/index.mdx new file mode 100644 index 0000000000..b3d93c6497 --- /dev/null +++ b/fern/products/sdk-reference/rust/relay/event/index.mdx @@ -0,0 +1,321 @@ +--- +slug: "/reference/rust/relay/event" +title: "event" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::relay::event" + parent: "signalwire::relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/event.rs" + visibility: "public" +--- +# `event` + +A RELAY event received from the SignalWire server. + +Events carry an `event_type` (e.g. `"calling.call.state"`), a +timestamp, and a bag of string-keyed parameters. + +## Signature + +```rust +struct Event { /* fields */ } +``` + +## Inheritance + +**Implements:** `Debug`, `Clone` + +## Methods + +### call\_id + +#### Signature + +```rust +fn call_id(&self) -> ?<&str> +``` + +#### Returns + +`?<&str>` + +#### Source + +[`src/relay/event.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/event.rs) + +Line 61. + +*** + +### clone + +#### Signature + +```rust +fn clone(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/event.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/event.rs) + +Line 7. + +*** + +### control\_id + +#### Signature + +```rust +fn control_id(&self) -> ?<&str> +``` + +#### Returns + +`?<&str>` + +#### Source + +[`src/relay/event.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/event.rs) + +Line 73. + +*** + +### event\_type + +#### Signature + +```rust +fn event_type(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/relay/event.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/event.rs) + +Line 49. + +*** + +### fmt + +#### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/relay/event.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/event.rs) + +Line 7. + +*** + +### new + +Create a new event. If `timestamp` is `0.0`, the current time is used. + +#### Signature + +```rust +fn new(event_type: &str, params: ?, timestamp: f64) -> Self +``` + +#### Parameters + + + + + + + +#### Returns + +`Self` + +#### Source + +[`src/relay/event.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/event.rs) + +Line 16. + +*** + +### node\_id + +#### Signature + +```rust +fn node_id(&self) -> ?<&str> +``` + +#### Returns + +`?<&str>` + +#### Source + +[`src/relay/event.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/event.rs) + +Line 67. + +*** + +### params + +#### Signature + +```rust +fn params(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/relay/event.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/event.rs) + +Line 57. + +*** + +### parse + +Convenience constructor from a `serde_json::Value` params object. + +#### Signature + +```rust +fn parse(event_type: &str, params_value: &?) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/relay/event.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/event.rs) + +Line 34. + +*** + +### state + +#### Signature + +```rust +fn state(&self) -> ?<&str> +``` + +#### Returns + +`?<&str>` + +#### Source + +[`src/relay/event.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/event.rs) + +Line 83. + +*** + +### tag + +#### Signature + +```rust +fn tag(&self) -> ?<&str> +``` + +#### Returns + +`?<&str>` + +#### Source + +[`src/relay/event.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/event.rs) + +Line 79. + +*** + +### timestamp + +#### Signature + +```rust +fn timestamp(&self) -> f64 +``` + +#### Returns + +`f64` + +#### Source + +[`src/relay/event.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/event.rs) + +Line 53. + +*** + +### to\_value + +Serialize back to a JSON-compatible map. + +#### Signature + +```rust +fn to_value(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/event.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/event.rs) + +Line 88. + +## Source + +[`src/relay/event.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/event.rs) + +Line 8. diff --git a/fern/products/sdk-reference/rust/relay/index.mdx b/fern/products/sdk-reference/rust/relay/index.mdx new file mode 100644 index 0000000000..ed32d33858 --- /dev/null +++ b/fern/products/sdk-reference/rust/relay/index.mdx @@ -0,0 +1,66 @@ +--- +slug: "/reference/rust/relay" +title: "relay" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::relay" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/mod.rs" + visibility: "public" +--- +# `relay` + +## Classes + + + + Base class for all RELAY call actions (play, record, collect, etc.). + + + + Represents a RELAY voice call. + + + + RELAY Client -- manages the WebSocket connection to SignalWire, sends JSON-RPC requests, and dispatches inbound events to the correct Call or Message objects. + + + + A typed RELAY device descriptor (`{type, params}`). + + + + A RELAY event received from the SignalWire server. + + + + Represents a RELAY messaging message (SMS / MMS). + + + +## Modules + + + + + + RELAY module -- real-time event signalling over WebSocket (JSON-RPC 2.0). + + + + Typed error for the RELAY client surface. + + + + Typed RELAY lifecycle-state enums. + + + +## Source + +[`src/relay/mod.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/mod.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/relay/message/index.mdx b/fern/products/sdk-reference/rust/relay/message/index.mdx new file mode 100644 index 0000000000..8c1eb2d067 --- /dev/null +++ b/fern/products/sdk-reference/rust/relay/message/index.mdx @@ -0,0 +1,471 @@ +--- +slug: "/reference/rust/relay/message" +title: "message" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::relay::message" + parent: "signalwire::relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/message.rs" + visibility: "public" +--- +# `message` + +Represents a RELAY messaging message (SMS / MMS). + +A Message is created when you send or receive a message through the +RELAY messaging namespace. It accumulates state-change events and +resolves once the message reaches a terminal state (delivered, +undelivered, or failed). + +## Signature + +```rust +struct Message { /* fields */ } +``` + +## Methods + +### body + +#### Signature + +```rust +fn body(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/message.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/message.rs) + +Line 144. + +*** + +### context + +#### Signature + +```rust +fn context(&self) -> ?<&str> +``` + +#### Returns + +`?<&str>` + +#### Source + +[`src/relay/message.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/message.rs) + +Line 128. + +*** + +### direction + +#### Signature + +```rust +fn direction(&self) -> ?<&str> +``` + +#### Returns + +`?<&str>` + +#### Source + +[`src/relay/message.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/message.rs) + +Line 132. + +*** + +### dispatch\_event + +Process an inbound event for this message. + +#### Signature + +```rust +fn dispatch_event(&self, event: &?) +``` + +#### Parameters + + + +#### Source + +[`src/relay/message.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/message.rs) + +Line 195. + +*** + +### from\_number + +#### Signature + +```rust +fn from_number(&self) -> ?<&str> +``` + +#### Returns + +`?<&str>` + +#### Source + +[`src/relay/message.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/message.rs) + +Line 136. + +*** + +### is\_done + +#### Signature + +```rust +fn is_done(&self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/relay/message.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/message.rs) + +Line 182. + +*** + +### media + +#### Signature + +```rust +fn media(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/message.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/message.rs) + +Line 148. + +*** + +### message\_id + +#### Signature + +```rust +fn message_id(&self) -> ?<&str> +``` + +#### Returns + +`?<&str>` + +#### Source + +[`src/relay/message.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/message.rs) + +Line 114. + +*** + +### message\_state + +Current delivery state as a typed \[`MessageState`]. + +The typed counterpart to `state`: both read the same +underlying string, so when a state is present +`msg.message_state().unwrap().as_str() == msg.state().unwrap()` holds. +`None` when no state has been observed yet. An unrecognised server +value parses to \[`MessageState::Other`] rather than panicking. Enables +`msg.message_state().map(|s| s.is_terminal())` and `match` instead of +stringly comparisons. + +**Decorators:** `@must_use` + +#### Signature + +```rust +fn message_state(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/message.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/message.rs) + +Line 170. + +*** + +### new + +Build a Message from a params map. + +#### Signature + +```rust +fn new(params: &?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/relay/message.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/message.rs) + +Line 37. + +*** + +### on + +Register a listener that fires on every state-change event. + +#### Signature + +```rust +fn on(&self, cb: F) +``` + +#### Type Parameters + + + +#### Parameters + + + +#### Source + +[`src/relay/message.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/message.rs) + +Line 240. + +*** + +### on\_completed + +Register a callback to fire when the message reaches a terminal state. + +#### Signature + +```rust +fn on_completed(&self, cb: F) +``` + +#### Type Parameters + + + +#### Parameters + + + +#### Source + +[`src/relay/message.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/message.rs) + +Line 248. + +*** + +### reason + +#### Signature + +```rust +fn reason(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/message.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/message.rs) + +Line 178. + +*** + +### repr + +Python-style `__repr__` (mirrors `Message.__repr__` in the +signalwire-python reference). Returns a string of the form +`Message(message_id=..., from=..., to=..., state=...)`. + +#### Signature + +```rust +fn repr(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/message.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/message.rs) + +Line 121. + +*** + +### resolve + +Mark this message as completed. + +#### Signature + +```rust +fn resolve(&self, result: ?) +``` + +#### Parameters + + + +#### Source + +[`src/relay/message.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/message.rs) + +Line 261. + +*** + +### result + +#### Signature + +```rust +fn result(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/message.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/message.rs) + +Line 186. + +*** + +### state + +#### Signature + +```rust +fn state(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/message.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/message.rs) + +Line 156. + +*** + +### tags + +#### Signature + +```rust +fn tags(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/relay/message.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/message.rs) + +Line 152. + +*** + +### to\_number + +#### Signature + +```rust +fn to_number(&self) -> ?<&str> +``` + +#### Returns + +`?<&str>` + +#### Source + +[`src/relay/message.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/message.rs) + +Line 140. + +## Type Aliases + +### MessageCompletedCallback + +Callback type for completion notifications. + +#### Signature + +```rust +type MessageCompletedCallback = ? +``` + +#### Source + +[`src/relay/message.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/message.rs) + +Line 9. + +## Source + +[`src/relay/message.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/message.rs) + +Line 17. diff --git a/fern/products/sdk-reference/rust/relay/state-enums/index.mdx b/fern/products/sdk-reference/rust/relay/state-enums/index.mdx new file mode 100644 index 0000000000..e7e397391a --- /dev/null +++ b/fern/products/sdk-reference/rust/relay/state-enums/index.mdx @@ -0,0 +1,928 @@ +--- +slug: "/reference/rust/relay/state-enums" +title: "state_enums" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::relay::state_enums" + parent: "signalwire::relay" + module: "relay" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs" + visibility: "public" +--- +# `state_enums` + +Typed RELAY lifecycle-state enums. + +The RELAY protocol carries three _distinct_ server-emitted state +vocabularies — call lifecycle, dial outcome, and message delivery — as +bare strings on the wire. `constants` keeps the raw +string consts and the `is_*_terminal(&str)` predicates (the byte-level +contract); this module layers a typed, idiomatic view on top for the +highest-traffic of those vocabularies. + +Three deliberately separate types — \[`CallState`], \[`DialState`], +\[`MessageState`] — because the three vocabularies are _not_ +interchangeable even where strings coincide (`"answered"` is both a +\[`CallState`] and a \[`DialState`], `"failed"` is both a \[`DialState`] +and a \[`MessageState`], but conflating them would let a message state +leak into a call predicate). The compiler now keeps them apart. + +## Server-growth semantics (why `#[non_exhaustive]` + `Other`) + +Unlike the client-validated closed sets in +`media_enums` (which mirror Python +`ValueError` checks and reject unknown input), these mirror values the +_server_ emits and may add to over time. So each enum: + +- is `#[non_exhaustive]` — downstream `match` must carry a wildcard arm, + so a future server value can't break a consumer at compile time; +- carries an `Other(String)` catch-all so parsing a + never-before-seen state **never panics or loses data** — it round-trips + verbatim through `as_str`; +- parses infallibly via `from_str` / + `FromStr` (an unknown string becomes `Other`, not an error). + +Grounded in the Python reference `relay/constants.py` +(`CALL_STATE_*` / `MESSAGE_STATE_*` / `MESSAGE_TERMINAL_STATES`) and the +port's own `constants` (`DIAL_STATE_*`). The typed +accessors (`Call::call_state` / `Message::message_state`) are exposed +_alongside_ the existing string accessors (`Call::current_state` / +`Message::state`) for parity. + +## Enums + +### CallState + +Call lifecycle state, as carried by `calling.call.state` events. + +Mirrors Python `relay/constants.py` `CALL_STATE_*` +(`created` → `ringing` → `answered` → `ending` → `ended`). The terminal +state is `ended` (see `is_terminal`), matching +\[`constants::is_call_terminal`]. + +`#[non_exhaustive]` — server-emitted; an unrecognised value parses to +`Other` rather than panicking. + +#### Signature + +```rust +enum CallState +``` + +#### Inheritance + +**Implements:** `Debug`, `Clone`, `PartialEq`, `Eq`, `Hash`, `Display`, `FromStr` + +#### Variants + + + `answered` — the call has been answered and is in progress. + + + + `created` — the call object exists but has not started ringing. + + + + `ended` — the call has fully ended (terminal). + + + + `ending` — the call is in the process of tearing down. + + + + Any state the server emits that this enum does not (yet) model. Carries the raw wire string so it round-trips losslessly. + + + + `ringing` — the call is ringing the destination. + + +#### Methods + +##### as\_str + +The canonical wire string for this state (e.g. `"ringing"`). + +For `Other` this is the captured raw string, so +`CallState::from_str(s).as_str() == s` for every `s`. + +**Decorators:** `@must_use` + +###### Signature + +```rust +fn as_str(&self) -> &str +``` + +###### Returns + +`&str` + +###### Source + +[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) + +Line 78. + +*** + +##### clone + +###### Signature + +```rust +fn clone(&self) -> ? +``` + +###### Returns + +`?` + +###### Source + +[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) + +Line 53. + +*** + +##### eq + +###### Signature + +```rust +fn eq(&self, other: &?) -> bool +``` + +###### Parameters + + + +###### Returns + +`bool` + +###### Source + +[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) + +Line 53. + +*** + +##### fmt + +###### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) + +Line 53. + +*** + +##### fmt + +###### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) + +Line 117. + +*** + +##### from\_str + +Parse a wire string into a \[`CallState`]. + +Infallible: an unrecognised value becomes `Other` +(server states can grow). Provided as an inherent method for +ergonomics alongside the \[`FromStr`] impl. + +**Decorators:** `@must_use` + +###### Signature + +```rust +fn from_str(s: &str) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) + +Line 95. + +*** + +##### from\_str + +###### Signature + +```rust +fn from_str(s: &str) -> ?::Err> +``` + +###### Parameters + + + +###### Returns + +`?::Err>` + +###### Source + +[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) + +Line 125. + +*** + +##### hash + +###### Signature + +```rust +fn hash<__H: ?>(&self, state: &mut __H) +``` + +###### Type Parameters + + + +###### Parameters + + + +###### Source + +[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) + +Line 53. + +*** + +##### is\_terminal + +`true` when this is a terminal call state (`ended`). + +Delegates to \[`constants::is_call_terminal`] so the typed and +string predicates can never disagree. + +**Decorators:** `@must_use` + +###### Signature + +```rust +fn is_terminal(&self) -> bool +``` + +###### Returns + +`bool` + +###### Source + +[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) + +Line 111. + +#### Type Aliases + +##### Err + +###### Source + +[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) + +Line 123. + +#### Source + +[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) + +Line 56. + +*** + +### DialState + +Dial outcome state, as carried by `calling.call.dial` events. + +Distinct from \[`CallState`]: a dial reports the _result_ of an outbound +attempt (`dialing` while in flight, then the terminal `answered` / +`failed`), not the lifecycle of an established call. Grounded in the +port's `constants` `DIAL_STATE_*`. + +`#[non_exhaustive]` — server-emitted; unrecognised values parse to +`Other`. + +#### Signature + +```rust +enum DialState +``` + +#### Inheritance + +**Implements:** `Debug`, `Clone`, `PartialEq`, `Eq`, `Hash`, `Display`, `FromStr` + +#### Variants + + + `answered` — a leg answered; the dial succeeded (terminal). + + + + `dialing` — the outbound attempt is in progress (non-terminal). + + + + `failed` — no leg answered; the dial failed (terminal). + + + + Any state the server emits that this enum does not (yet) model. + + +#### Methods + +##### as\_str + +The canonical wire string for this state (e.g. `"dialing"`). + +**Decorators:** `@must_use` + +###### Signature + +```rust +fn as_str(&self) -> &str +``` + +###### Returns + +`&str` + +###### Source + +[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) + +Line 156. + +*** + +##### clone + +###### Signature + +```rust +fn clone(&self) -> ? +``` + +###### Returns + +`?` + +###### Source + +[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) + +Line 139. + +*** + +##### eq + +###### Signature + +```rust +fn eq(&self, other: &?) -> bool +``` + +###### Parameters + + + +###### Returns + +`bool` + +###### Source + +[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) + +Line 139. + +*** + +##### fmt + +###### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) + +Line 139. + +*** + +##### fmt + +###### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) + +Line 189. + +*** + +##### from\_str + +Parse a wire string into a \[`DialState`] (infallible; unknown → +`Other`). + +**Decorators:** `@must_use` + +###### Signature + +```rust +fn from_str(s: &str) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) + +Line 168. + +*** + +##### from\_str + +###### Signature + +```rust +fn from_str(s: &str) -> ?::Err> +``` + +###### Parameters + + + +###### Returns + +`?::Err>` + +###### Source + +[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) + +Line 197. + +*** + +##### hash + +###### Signature + +```rust +fn hash<__H: ?>(&self, state: &mut __H) +``` + +###### Type Parameters + + + +###### Parameters + + + +###### Source + +[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) + +Line 139. + +*** + +##### is\_terminal + +`true` when this is a terminal dial outcome (`answered` or `failed`). + +A dial resolves once it either connects a leg or exhausts every +device, so both `answered` and `failed` are terminal; `dialing` is +not. + +**Decorators:** `@must_use` + +###### Signature + +```rust +fn is_terminal(&self) -> bool +``` + +###### Returns + +`bool` + +###### Source + +[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) + +Line 183. + +#### Type Aliases + +##### Err + +###### Source + +[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) + +Line 195. + +#### Source + +[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) + +Line 142. + +*** + +### MessageState + +Message delivery state, as carried by `messaging.state` events. + +Mirrors Python `relay/constants.py` `MESSAGE_STATE_*`. The terminal set +is `delivered` / `undelivered` / `failed` +(`MESSAGE_TERMINAL_STATES`; see `is_terminal`), +matching \[`constants::is_message_terminal`]. Distinct from both +\[`CallState`] and \[`DialState`] — `failed` here means _message_ failure, +not a dial failure. + +`#[non_exhaustive]` — server-emitted; unrecognised values parse to +`Other`. + +#### Signature + +```rust +enum MessageState +``` + +#### Inheritance + +**Implements:** `Debug`, `Clone`, `PartialEq`, `Eq`, `Hash`, `Display`, `FromStr` + +#### Variants + + + `delivered` — confirmed delivered (terminal). + + + + `failed` — sending failed (terminal). + + + + `initiated` — sending has begun. + + + + Any state the server emits that this enum does not (yet) model. + + + + `queued` — accepted and queued for sending. + + + + `received` — an inbound message was received. + + + + `sent` — handed off to the carrier. + + + + `undelivered` — the carrier reported non-delivery (terminal). + + +#### Methods + +##### as\_str + +The canonical wire string for this state (e.g. `"delivered"`). + +**Decorators:** `@must_use` + +###### Signature + +```rust +fn as_str(&self) -> &str +``` + +###### Returns + +`&str` + +###### Source + +[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) + +Line 238. + +*** + +##### clone + +###### Signature + +```rust +fn clone(&self) -> ? +``` + +###### Returns + +`?` + +###### Source + +[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) + +Line 213. + +*** + +##### eq + +###### Signature + +```rust +fn eq(&self, other: &?) -> bool +``` + +###### Parameters + + + +###### Returns + +`bool` + +###### Source + +[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) + +Line 213. + +*** + +##### fmt + +###### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) + +Line 213. + +*** + +##### fmt + +###### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) + +Line 279. + +*** + +##### from\_str + +Parse a wire string into a \[`MessageState`] (infallible; unknown → +`Other`). + +**Decorators:** `@must_use` + +###### Signature + +```rust +fn from_str(s: &str) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) + +Line 254. + +*** + +##### from\_str + +###### Signature + +```rust +fn from_str(s: &str) -> ?::Err> +``` + +###### Parameters + + + +###### Returns + +`?::Err>` + +###### Source + +[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) + +Line 287. + +*** + +##### hash + +###### Signature + +```rust +fn hash<__H: ?>(&self, state: &mut __H) +``` + +###### Type Parameters + + + +###### Parameters + + + +###### Source + +[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) + +Line 213. + +*** + +##### is\_terminal + +`true` when this is a terminal delivery state (`delivered`, +`undelivered`, or `failed`). + +Delegates to \[`constants::is_message_terminal`] so the typed and +string predicates can never disagree. + +**Decorators:** `@must_use` + +###### Signature + +```rust +fn is_terminal(&self) -> bool +``` + +###### Returns + +`bool` + +###### Source + +[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) + +Line 273. + +#### Type Aliases + +##### Err + +###### Source + +[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) + +Line 285. + +#### Source + +[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) + +Line 216. + +## Source + +[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/rest/client/index.mdx b/fern/products/sdk-reference/rust/rest/client/index.mdx new file mode 100644 index 0000000000..57165fd34e --- /dev/null +++ b/fern/products/sdk-reference/rust/rest/client/index.mdx @@ -0,0 +1,30 @@ +--- +slug: "/reference/rust/rest/client" +title: "client" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::rest::client" + parent: "signalwire::rest" + module: "rest" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs" + visibility: "public" +--- +# `client` + +## Classes + + + + Top-level SignalWire REST client. + + + +## Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/rest/client/rest-client/index.mdx b/fern/products/sdk-reference/rust/rest/client/rest-client/index.mdx new file mode 100644 index 0000000000..4483908276 --- /dev/null +++ b/fern/products/sdk-reference/rust/rest/client/rest-client/index.mdx @@ -0,0 +1,726 @@ +--- +slug: "/reference/rust/rest/client/rest-client" +title: "RestClient" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::client::RestClient" + parent: "signalwire::rest::client" + module: "rest.client" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs" + visibility: "public" +--- +# `RestClient` + +Top-level SignalWire REST client. + +Provides lazy access to every API namespace (fabric, calling, +phone\_numbers, datasphere, video, compat, etc.). Credentials can +be supplied explicitly or pulled from environment variables. + +Production HTTP transport is `ureq` (sync, blocking, real network +I/O). Tests can substitute a stub via \[`with_http`]. + +## Signature + +```rust +struct RestClient { /* fields */ } +``` + +## Methods + +### addresses + +Addresses. + +#### Signature + +```rust +fn addresses(&self) -> ?<'_> +``` + +#### Returns + +`?<'_>` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 187. + +*** + +### base\_url + +#### Signature + +```rust +fn base_url(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 131. + +*** + +### calling + +Calling API (37 call-control commands). + +#### Signature + +```rust +fn calling(&self) -> ?<'_> +``` + +#### Returns + +`?<'_>` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 153. + +*** + +### chat + +Chat tokens. + +#### Signature + +```rust +fn chat(&self) -> ?<'_> +``` + +#### Returns + +`?<'_>` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 258. + +*** + +### compat + +Compatibility (Twilio-compatible LAML) API namespace. + +Returns a `Compat` handle whose +sub-resources (`calls`, `messages`, `faxes`, `phone_numbers`, +`conferences`, `recordings`, `transcriptions`, `applications`, +`laml_bins`, `queues`, `tokens`, `accounts`) cover the full Python +`client.compat.*` surface. + +#### Signature + +```rust +fn compat(&self) -> ?<'_> +``` + +#### Returns + +`?<'_>` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 182. + +*** + +### datasphere + +Datasphere namespace (documents + chunks + search). + +#### Signature + +```rust +fn datasphere(&self) -> ?<'_> +``` + +#### Returns + +`?<'_>` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 163. + +*** + +### fabric + +Fabric API (sub-resources: subscribers, sip\_endpoints, call\_flows, ...). + +#### Signature + +```rust +fn fabric(&self) -> ?<'_> +``` + +#### Returns + +`?<'_>` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 148. + +*** + +### from\_env + +Create from environment variables. + +#### Signature + +```rust +fn from_env() -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 109. + +*** + +### http + +#### Signature + +```rust +fn http(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 135. + +*** + +### imported\_numbers + +Imported phone numbers. + +#### Signature + +```rust +fn imported_numbers(&self) -> ?<'_> +``` + +#### Returns + +`?<'_>` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 228. + +*** + +### logs + +Logs (messages, voice, fax, conferences). + +#### Signature + +```rust +fn logs(&self) -> ?<'_> +``` + +#### Returns + +`?<'_>` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 243. + +*** + +### lookup + +Phone number lookup. + +#### Signature + +```rust +fn lookup(&self) -> ?<'_> +``` + +#### Returns + +`?<'_>` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 218. + +*** + +### mfa + +Multi-factor authentication (sms/call/verify). + +#### Signature + +```rust +fn mfa(&self) -> ?<'_> +``` + +#### Returns + +`?<'_>` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 233. + +*** + +### new + +Create a new REST client with explicit credentials. The base URL +resolves to `https://{space}`. Use \[`with_base_url`] to override +(e.g. for fixture-driven tests pointed at `http://127.0.0.1:N`). + +#### Signature + +```rust +fn new(project_id: &str, token: &str, space: &str) -> ? +``` + +#### Parameters + + + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 26. + +*** + +### number\_groups + +Number groups (CRUD + membership operations). + +#### Signature + +```rust +fn number_groups(&self) -> ?<'_> +``` + +#### Returns + +`?<'_>` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 202. + +*** + +### phone\_numbers + +Phone numbers. + +#### Signature + +```rust +fn phone_numbers(&self) -> ?<'_> +``` + +#### Returns + +`?<'_>` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 158. + +*** + +### project + +Project namespace (exposes `tokens` sub-resource). + +#### Signature + +```rust +fn project(&self) -> ?<'_> +``` + +#### Returns + +`?<'_>` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 248. + +*** + +### project\_id + +#### Signature + +```rust +fn project_id(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 119. + +*** + +### pubsub + +PubSub tokens. + +#### Signature + +```rust +fn pubsub(&self) -> ?<'_> +``` + +#### Returns + +`?<'_>` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 253. + +*** + +### queues + +Queues namespace (CRUD + member operations). + +#### Signature + +```rust +fn queues(&self) -> ?<'_> +``` + +#### Returns + +`?<'_>` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 192. + +*** + +### recordings + +Recordings. + +#### Signature + +```rust +fn recordings(&self) -> ?<'_> +``` + +#### Returns + +`?<'_>` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 197. + +*** + +### registry + +Registry (10DLC brands, campaigns, orders, numbers). + +#### Signature + +```rust +fn registry(&self) -> ?<'_> +``` + +#### Returns + +`?<'_>` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 238. + +*** + +### short\_codes + +Short codes. + +#### Signature + +```rust +fn short_codes(&self) -> ?<'_> +``` + +#### Returns + +`?<'_>` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 223. + +*** + +### sip\_profile + +Project SIP profile (singular: singleton resource at +`/api/relay/rest/sip_profile`). + +#### Signature + +```rust +fn sip_profile(&self) -> ?<'_> +``` + +#### Returns + +`?<'_>` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 213. + +*** + +### space + +#### Signature + +```rust +fn space(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 127. + +*** + +### token + +#### Signature + +```rust +fn token(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 123. + +*** + +### verified\_callers + +Verified callers. + +#### Signature + +```rust +fn verified_callers(&self) -> ?<'_> +``` + +#### Returns + +`?<'_>` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 207. + +*** + +### video + +Video API namespace (rooms, sessions, recordings, conferences, +tokens, streams). + +#### Signature + +```rust +fn video(&self) -> ?<'_> +``` + +#### Returns + +`?<'_>` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 171. + +*** + +### with\_base\_url + +Create a REST client with an explicit base URL. Used by audit +harnesses and integration tests to point at a local fixture +without going through the `https://{space}` resolution. Production +callers should use \[`new`] instead. + +#### Signature + +```rust +fn with_base_url(project_id: &str, token: &str, base_url: &str) -> ? +``` + +#### Parameters + + + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 64. + +*** + +### with\_http + +Create a REST client with a specific HTTP client (for testing). + +#### Signature + +```rust +fn with_http(project_id: &str, token: &str, space: &str, http: ?) -> ? +``` + +#### Parameters + + + + + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 90. + +## Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 14. diff --git a/fern/products/sdk-reference/rust/rest/crud-resource/crud-resource/index.mdx b/fern/products/sdk-reference/rust/rest/crud-resource/crud-resource/index.mdx new file mode 100644 index 0000000000..d9d87f7285 --- /dev/null +++ b/fern/products/sdk-reference/rust/rest/crud-resource/crud-resource/index.mdx @@ -0,0 +1,231 @@ +--- +slug: "/reference/rust/rest/crud-resource/crud-resource" +title: "CrudResource" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::crud_resource::CrudResource" + parent: "signalwire::rest::crud_resource" + module: "rest.crud_resource" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/crud_resource.rs" + visibility: "public" +--- +# `CrudResource` + +Generic CRUD wrapper around an HttpClient and a base API path. + +Provides list / create / get / update / delete for any REST resource +that follows the standard SignalWire collection+item URL pattern. + +## Signature + +```rust +struct CrudResource { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/crud_resource.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/crud_resource.rs) + +Line 25. + +*** + +### client + +#### Signature + +```rust +fn client(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/rest/crud_resource.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/crud_resource.rs) + +Line 29. + +*** + +### create + +Create a new resource (POST basePath). + +#### Signature + +```rust +fn create(&self, data: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/crud_resource.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/crud_resource.rs) + +Line 47. + +*** + +### delete + +Delete a resource by ID (DELETE basePath/\{id\}). + +#### Signature + +```rust +fn delete(&self, id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/crud_resource.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/crud_resource.rs) + +Line 62. + +*** + +### get + +Retrieve a single resource by ID (GET basePath/\{id\}). + +#### Signature + +```rust +fn get(&self, id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/crud_resource.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/crud_resource.rs) + +Line 52. + +*** + +### list + +List resources (GET basePath). + +#### Signature + +```rust +fn list(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/crud_resource.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/crud_resource.rs) + +Line 42. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, base_path: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/crud_resource.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/crud_resource.rs) + +Line 18. + +*** + +### update + +Update a resource by ID (PUT basePath/\{id\}). + +#### Signature + +```rust +fn update(&self, id: &str, data: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/crud_resource.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/crud_resource.rs) + +Line 57. + +## Source + +[`src/rest/crud_resource.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/crud_resource.rs) + +Line 12. diff --git a/fern/products/sdk-reference/rust/rest/crud-resource/index.mdx b/fern/products/sdk-reference/rust/rest/crud-resource/index.mdx new file mode 100644 index 0000000000..5b7cc6ab90 --- /dev/null +++ b/fern/products/sdk-reference/rust/rest/crud-resource/index.mdx @@ -0,0 +1,30 @@ +--- +slug: "/reference/rust/rest/crud-resource" +title: "crud_resource" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::rest::crud_resource" + parent: "signalwire::rest" + module: "rest" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/crud_resource.rs" + visibility: "public" +--- +# `crud_resource` + +## Classes + + + + Generic CRUD wrapper around an HttpClient and a base API path. + + + +## Source + +[`src/rest/crud_resource.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/crud_resource.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/rest/error/index.mdx b/fern/products/sdk-reference/rust/rest/error/index.mdx new file mode 100644 index 0000000000..eb385ea18c --- /dev/null +++ b/fern/products/sdk-reference/rust/rest/error/index.mdx @@ -0,0 +1,33 @@ +--- +slug: "/reference/rust/rest/error" +title: "error" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::rest::error" + parent: "signalwire::rest" + module: "rest" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/error.rs" + visibility: "public" +--- +# `error` + +REST module -- SignalWire REST API client, HTTP transport, and CRUD +resource helpers. + +## Classes + + + + Exception thrown when a SignalWire REST API request fails with a non-2xx status. + + + +## Source + +[`src/rest/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/error.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/rest/error/signal-wire-rest-error/index.mdx b/fern/products/sdk-reference/rust/rest/error/signal-wire-rest-error/index.mdx new file mode 100644 index 0000000000..b2204928cc --- /dev/null +++ b/fern/products/sdk-reference/rust/rest/error/signal-wire-rest-error/index.mdx @@ -0,0 +1,190 @@ +--- +slug: "/reference/rust/rest/error/signal-wire-rest-error" +title: "SignalWireRestError" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::error::SignalWireRestError" + parent: "signalwire::rest::error" + module: "rest.error" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/error.rs" + visibility: "public" +--- +# `SignalWireRestError` + +Exception thrown when a SignalWire REST API request fails with a non-2xx status. + +## Signature + +```rust +struct SignalWireRestError { /* fields */ } +``` + +## Inheritance + +**Implements:** `Debug`, `Clone`, `Display`, [Error](/docs/sdk-reference/reference/rust/core/security/webhook-layer/webhook-validate#error) + +## Methods + +### clone + +#### Signature + +```rust +fn clone(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/rest/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/error.rs) + +Line 4. + +*** + +### fmt + +#### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/error.rs) + +Line 4. + +*** + +### fmt + +#### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/error.rs) + +Line 34. + +*** + +### message + +#### Signature + +```rust +fn message(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/error.rs) + +Line 20. + +*** + +### new + +#### Signature + +```rust +fn new(message: &str, status_code: u16, response_body: &str) -> Self +``` + +#### Parameters + + + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/error.rs) + +Line 12. + +*** + +### response\_body + +#### Signature + +```rust +fn response_body(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/error.rs) + +Line 28. + +*** + +### status\_code + +#### Signature + +```rust +fn status_code(&self) -> u16 +``` + +#### Returns + +`u16` + +#### Source + +[`src/rest/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/error.rs) + +Line 24. + +## Source + +[`src/rest/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/error.rs) + +Line 5. diff --git a/fern/products/sdk-reference/rust/rest/http-client/http-client/index.mdx b/fern/products/sdk-reference/rust/rest/http-client/http-client/index.mdx new file mode 100644 index 0000000000..e83575c87f --- /dev/null +++ b/fern/products/sdk-reference/rust/rest/http-client/http-client/index.mdx @@ -0,0 +1,334 @@ +--- +slug: "/reference/rust/rest/http-client/http-client" +title: "HttpClient" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::http_client::HttpClient" + parent: "signalwire::rest::http_client" + module: "rest.http_client" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs" + visibility: "public" +--- +# `HttpClient` + +Low-level HTTP client for SignalWire REST APIs. + +Uses Basic Auth with project\_id:token and returns parsed JSON +responses as `serde_json::Value`. + +## Signature + +```rust +struct HttpClient { /* fields */ } +``` + +## Methods + +### auth\_header + +#### Signature + +```rust +fn auth_header(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) + +Line 251. + +*** + +### base\_url + +#### Signature + +```rust +fn base_url(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) + +Line 247. + +*** + +### delete + +#### Signature + +```rust +fn delete(&self, path: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) + +Line 276. + +*** + +### get + +#### Signature + +```rust +fn get(&self, path: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) + +Line 257. + +*** + +### list\_all + +Return all pages of results, following `links.next`. + +#### Signature + +```rust +fn list_all(&self, path: &str, params: &?) -> ?, ?> +``` + +#### Parameters + + + + + +#### Returns + +`?, ?>` + +#### Source + +[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) + +Line 283. + +*** + +### new + +#### Signature + +```rust +fn new( + project_id: &str, + token: &str, + base_url: &str, + transport: ? +) -> Self +``` + +#### Parameters + + + + + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) + +Line 205. + +*** + +### patch + +#### Signature + +```rust +fn patch(&self, path: &str, data: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) + +Line 271. + +*** + +### post + +#### Signature + +```rust +fn post(&self, path: &str, data: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) + +Line 261. + +*** + +### project\_id + +#### Signature + +```rust +fn project_id(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) + +Line 239. + +*** + +### put + +#### Signature + +```rust +fn put(&self, path: &str, data: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) + +Line 266. + +*** + +### token + +#### Signature + +```rust +fn token(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) + +Line 243. + +*** + +### with\_stub + +Create with a stub transport for testing. + +#### Signature + +```rust +fn with_stub(project_id: &str, token: &str, base_url: &str) -> (Self, ?) +``` + +#### Parameters + + + + + + + +#### Returns + +`(Self, ?)` + +#### Source + +[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) + +Line 226. + +## Source + +[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) + +Line 195. diff --git a/fern/products/sdk-reference/rust/rest/http-client/index.mdx b/fern/products/sdk-reference/rust/rest/http-client/index.mdx new file mode 100644 index 0000000000..24092e552d --- /dev/null +++ b/fern/products/sdk-reference/rust/rest/http-client/index.mdx @@ -0,0 +1,99 @@ +--- +slug: "/reference/rust/rest/http-client" +title: "http_client" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::rest::http_client" + parent: "signalwire::rest" + module: "rest" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs" + visibility: "public" +--- +# `http_client` + +## Classes + + + + Low-level HTTP client for SignalWire REST APIs. + + + + A stub transport that records requests and returns canned responses. Useful for unit testing without network access. + + + + Real HTTP transport backed by ureq. + + + +## Interfaces + +### HttpTransport + +Trait for the HTTP transport layer. + +Production code uses a real implementation (e.g. ureq), while +tests inject a mock. + +#### Signature + +```rust +trait HttpTransport +``` + +#### Inheritance + +**Extends:** `?`, `?` + +#### Methods + +##### execute + +###### Signature + +```rust +fn execute( + &self, + method: &str, + url: &str, + headers: &?, + body: ?<&str> +) -> ?<(u16, ?), ?> +``` + +###### Parameters + + + + + + + + + +###### Returns + +`?<(u16, ?), ?>` + +###### Source + +[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) + +Line 14. + +#### Source + +[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) + +Line 13. + +## Source + +[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/rest/http-client/stub-transport/index.mdx b/fern/products/sdk-reference/rust/rest/http-client/stub-transport/index.mdx new file mode 100644 index 0000000000..8ea0e07577 --- /dev/null +++ b/fern/products/sdk-reference/rust/rest/http-client/stub-transport/index.mdx @@ -0,0 +1,129 @@ +--- +slug: "/reference/rust/rest/http-client/stub-transport" +title: "StubTransport" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::http_client::StubTransport" + parent: "signalwire::rest::http_client" + module: "rest.http_client" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs" + visibility: "public" +--- +# `StubTransport` + +A stub transport that records requests and returns canned responses. +Useful for unit testing without network access. + +## Signature + +```rust +struct StubTransport { /* fields */ } +``` + +## Inheritance + +**Implements:** `HttpTransport` + +## Properties + + + Recorded requests: (method, url, body). + + + + Canned response: (status\_code, body). + + +## Methods + +### execute + +#### Signature + +```rust +fn execute( + &self, + method: &str, + url: &str, + _headers: &?, + body: ?<&str> +) -> ?<(u16, ?), ?> +``` + +#### Parameters + + + + + + + + + +#### Returns + +`?<(u16, ?), ?>` + +#### Source + +[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) + +Line 174. + +*** + +### new + +#### Signature + +```rust +fn new(status: u16, body: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) + +Line 161. + +*** + +### set\_response + +#### Signature + +```rust +fn set_response(&self, status: u16, body: &str) +``` + +#### Parameters + + + + + +#### Source + +[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) + +Line 168. + +## Source + +[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) + +Line 153. diff --git a/fern/products/sdk-reference/rust/rest/http-client/ureq-transport/index.mdx b/fern/products/sdk-reference/rust/rest/http-client/ureq-transport/index.mdx new file mode 100644 index 0000000000..8cf84f9c43 --- /dev/null +++ b/fern/products/sdk-reference/rust/rest/http-client/ureq-transport/index.mdx @@ -0,0 +1,116 @@ +--- +slug: "/reference/rust/rest/http-client/ureq-transport" +title: "UreqTransport" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::http_client::UreqTransport" + parent: "signalwire::rest::http_client" + module: "rest.http_client" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs" + visibility: "public" +--- +# `UreqTransport` + +Real HTTP transport backed by ureq. + +This is the production transport — every REST namespace operation +goes through `ureq::Agent::request()` to a real HTTP endpoint. The +REST audit fixture (`audit_rest_transport.py`) drives the wire +shape (method, path, headers, body) end-to-end against this code, +so any regression in serialization is caught. + +## Signature + +```rust +struct UreqTransport { /* fields */ } +``` + +## Inheritance + +**Implements:** `Default`, `HttpTransport` + +## Methods + +### default + +#### Signature + +```rust +fn default() -> Self +``` + +#### Returns + +`Self` + +#### Source + +[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) + +Line 35. + +*** + +### execute + +#### Signature + +```rust +fn execute( + &self, + method: &str, + url: &str, + headers: &?, + body: ?<&str> +) -> ?<(u16, ?), ?> +``` + +#### Parameters + + + + + + + + + +#### Returns + +`?<(u16, ?), ?>` + +#### Source + +[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) + +Line 83. + +*** + +### new + +#### Signature + +```rust +fn new() -> Self +``` + +#### Returns + +`Self` + +#### Source + +[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) + +Line 41. + +## Source + +[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) + +Line 30. diff --git a/fern/products/sdk-reference/rust/rest/index.mdx b/fern/products/sdk-reference/rust/rest/index.mdx new file mode 100644 index 0000000000..7ac94d70dd --- /dev/null +++ b/fern/products/sdk-reference/rust/rest/index.mdx @@ -0,0 +1,40 @@ +--- +slug: "/reference/rust/rest" +title: "rest" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::rest" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/mod.rs" + visibility: "public" +--- +# `rest` + +## Modules + + + + + + + + REST module -- SignalWire REST API client, HTTP transport, and CRUD resource helpers. + + + + + + + + Paginated iterator over `links.next`-cursor responses. + + + +## Source + +[`src/rest/mod.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/mod.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/rest/namespaces/calling/index.mdx b/fern/products/sdk-reference/rust/rest/namespaces/calling/index.mdx new file mode 100644 index 0000000000..3955448bdc --- /dev/null +++ b/fern/products/sdk-reference/rust/rest/namespaces/calling/index.mdx @@ -0,0 +1,1082 @@ +--- +slug: "/reference/rust/rest/namespaces/calling" +title: "calling" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::calling" + parent: "signalwire::rest::namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs" + visibility: "public" +--- +# `calling` + +Calling API namespace. + +Provides 37 call-control command methods that each POST to +`/api/calling/calls` with a JSON body containing the command name, +an optional call ID, and parameters. + +## Signature + +```rust +struct Calling { /* fields */ } +``` + +## Methods + +### ai\_hold + +#### Signature + +```rust +fn ai_hold(&self, call_id: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 246. + +*** + +### ai\_message + +#### Signature + +```rust +fn ai_message(&self, call_id: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 238. + +*** + +### ai\_stop + +#### Signature + +```rust +fn ai_stop(&self, call_id: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 254. + +*** + +### ai\_unhold + +#### Signature + +```rust +fn ai_unhold(&self, call_id: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 250. + +*** + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 35. + +*** + +### client + +#### Signature + +```rust +fn client(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 27. + +*** + +### collect + +#### Signature + +```rust +fn collect(&self, call_id: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 138. + +*** + +### collect\_start\_input\_timers + +#### Signature + +```rust +fn collect_start_input_timers(&self, call_id: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 150. + +*** + +### collect\_stop + +#### Signature + +```rust +fn collect_stop(&self, call_id: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 142. + +*** + +### denoise + +#### Signature + +```rust +fn denoise(&self, call_id: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 202. + +*** + +### denoise\_stop + +#### Signature + +```rust +fn denoise_stop(&self, call_id: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 206. + +*** + +### detect + +#### Signature + +```rust +fn detect(&self, call_id: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 162. + +*** + +### detect\_stop + +#### Signature + +```rust +fn detect_stop(&self, call_id: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 166. + +*** + +### dial + +#### Signature + +```rust +fn dial(&self, params: ?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 63. + +*** + +### disconnect + +#### Signature + +```rust +fn disconnect(&self, call_id: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 82. + +*** + +### end + +#### Signature + +```rust +fn end(&self, call_id: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 74. + +*** + +### live\_transcribe + +#### Signature + +```rust +fn live_transcribe(&self, call_id: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 262. + +*** + +### live\_translate + +#### Signature + +```rust +fn live_translate(&self, call_id: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 270. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, project_id: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 20. + +*** + +### play + +#### Signature + +```rust +fn play(&self, call_id: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 90. + +*** + +### play\_pause + +#### Signature + +```rust +fn play_pause(&self, call_id: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 94. + +*** + +### play\_resume + +#### Signature + +```rust +fn play_resume(&self, call_id: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 98. + +*** + +### play\_stop + +#### Signature + +```rust +fn play_stop(&self, call_id: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 102. + +*** + +### play\_volume + +#### Signature + +```rust +fn play_volume(&self, call_id: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 106. + +*** + +### project\_id + +#### Signature + +```rust +fn project_id(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 31. + +*** + +### receive\_fax\_stop + +#### Signature + +```rust +fn receive_fax_stop(&self, call_id: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 290. + +*** + +### record + +#### Signature + +```rust +fn record(&self, call_id: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 114. + +*** + +### record\_pause + +#### Signature + +```rust +fn record_pause(&self, call_id: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 118. + +*** + +### record\_resume + +#### Signature + +```rust +fn record_resume(&self, call_id: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 122. + +*** + +### record\_stop + +#### Signature + +```rust +fn record_stop(&self, call_id: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 130. + +*** + +### refer + +#### Signature + +```rust +fn refer(&self, call_id: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 302. + +*** + +### send\_fax\_stop + +#### Signature + +```rust +fn send_fax_stop(&self, call_id: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 282. + +*** + +### stream + +#### Signature + +```rust +fn stream(&self, call_id: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 186. + +*** + +### stream\_stop + +#### Signature + +```rust +fn stream_stop(&self, call_id: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 190. + +*** + +### tap + +#### Signature + +```rust +fn tap(&self, call_id: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 174. + +*** + +### tap\_stop + +#### Signature + +```rust +fn tap_stop(&self, call_id: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 178. + +*** + +### transcribe + +#### Signature + +```rust +fn transcribe(&self, call_id: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 218. + +*** + +### transcribe\_stop + +#### Signature + +```rust +fn transcribe_stop(&self, call_id: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 226. + +*** + +### transfer + +#### Signature + +```rust +fn transfer(&self, call_id: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 78. + +*** + +### update + +POST /api/calling/calls with `command="update"` — mirrors the Python +`client.calling.update(id=..., state=...)` shape: caller-supplied +`id` lives **inside** params, not as the top-level body field. + +#### Signature + +```rust +fn update(&self, params: ?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 70. + +*** + +### user\_event + +#### Signature + +```rust +fn user_event(&self, call_id: &str, params: ?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 310. + +## Source + +[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) + +Line 14. diff --git a/fern/products/sdk-reference/rust/rest/namespaces/compat/compat-accounts/index.mdx b/fern/products/sdk-reference/rust/rest/namespaces/compat/compat-accounts/index.mdx new file mode 100644 index 0000000000..0a7296edf7 --- /dev/null +++ b/fern/products/sdk-reference/rust/rest/namespaces/compat/compat-accounts/index.mdx @@ -0,0 +1,172 @@ +--- +slug: "/reference/rust/rest/namespaces/compat/compat-accounts" +title: "CompatAccounts" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::compat::CompatAccounts" + parent: "rest.namespaces.compat" + module: "rest.namespaces.compat" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs" + visibility: "public" +--- +# `CompatAccounts` + +## Signature + +```rust +struct CompatAccounts { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 135. + +*** + +### create + +#### Signature + +```rust +fn create(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 144. + +*** + +### get + +#### Signature + +```rust +fn get(&self, sid: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 148. + +*** + +### list + +#### Signature + +```rust +fn list(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 139. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, base_path: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 128. + +*** + +### update + +#### Signature + +```rust +fn update(&self, sid: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 152. + +## Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 122. diff --git a/fern/products/sdk-reference/rust/rest/namespaces/compat/compat-applications/index.mdx b/fern/products/sdk-reference/rust/rest/namespaces/compat/compat-applications/index.mdx new file mode 100644 index 0000000000..db7bba8f4c --- /dev/null +++ b/fern/products/sdk-reference/rust/rest/namespaces/compat/compat-applications/index.mdx @@ -0,0 +1,196 @@ +--- +slug: "/reference/rust/rest/namespaces/compat/compat-applications" +title: "CompatApplications" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::compat::CompatApplications" + parent: "rest.namespaces.compat" + module: "rest.namespaces.compat" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs" + visibility: "public" +--- +# `CompatApplications` + +## Signature + +```rust +struct CompatApplications { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 597. + +*** + +### create + +#### Signature + +```rust +fn create(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 606. + +*** + +### delete + +#### Signature + +```rust +fn delete(&self, sid: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 618. + +*** + +### get + +#### Signature + +```rust +fn get(&self, sid: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 610. + +*** + +### list + +#### Signature + +```rust +fn list(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 601. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, base_path: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 590. + +*** + +### update + +#### Signature + +```rust +fn update(&self, sid: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 614. + +## Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 584. diff --git a/fern/products/sdk-reference/rust/rest/namespaces/compat/compat-calls/index.mdx b/fern/products/sdk-reference/rust/rest/namespaces/compat/compat-calls/index.mdx new file mode 100644 index 0000000000..b9a9d46f15 --- /dev/null +++ b/fern/products/sdk-reference/rust/rest/namespaces/compat/compat-calls/index.mdx @@ -0,0 +1,221 @@ +--- +slug: "/reference/rust/rest/namespaces/compat/compat-calls" +title: "CompatCalls" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::compat::CompatCalls" + parent: "rest.namespaces.compat" + module: "rest.namespaces.compat" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs" + visibility: "public" +--- +# `CompatCalls` + +## Signature + +```rust +struct CompatCalls { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 174. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, base_path: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 167. + +*** + +### start\_recording + +POST /Calls/\{sid\}/Recordings — start a new recording on the call. + +#### Signature + +```rust +fn start_recording(&self, call_sid: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 183. + +*** + +### start\_stream + +POST /Calls/\{sid\}/Streams — start a new stream on the call. + +#### Signature + +```rust +fn start_stream(&self, call_sid: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 204. + +*** + +### stop\_stream + +POST /Calls/\{sid\}/Streams/\{stream\_sid\} — stop / update a stream. + +#### Signature + +```rust +fn stop_stream(&self, call_sid: &str, stream_sid: &str, params: &?) -> ? +``` + +#### Parameters + + + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 214. + +*** + +### update + +#### Signature + +```rust +fn update(&self, sid: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 178. + +*** + +### update\_recording + +POST /Calls/\{sid\}/Recordings/\{rec\_sid\} — update a specific recording. + +#### Signature + +```rust +fn update_recording( + &self, + call_sid: &str, + recording_sid: &str, + params: &? +) -> ? +``` + +#### Parameters + + + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 193. + +## Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 161. diff --git a/fern/products/sdk-reference/rust/rest/namespaces/compat/compat-conferences/index.mdx b/fern/products/sdk-reference/rust/rest/namespaces/compat/compat-conferences/index.mdx new file mode 100644 index 0000000000..97fd6ffc23 --- /dev/null +++ b/fern/products/sdk-reference/rust/rest/namespaces/compat/compat-conferences/index.mdx @@ -0,0 +1,429 @@ +--- +slug: "/reference/rust/rest/namespaces/compat/compat-conferences" +title: "CompatConferences" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::compat::CompatConferences" + parent: "rest.namespaces.compat" + module: "rest.namespaces.compat" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs" + visibility: "public" +--- +# `CompatConferences` + +## Signature + +```rust +struct CompatConferences { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 380. + +*** + +### delete\_recording + +#### Signature + +```rust +fn delete_recording(&self, conference_sid: &str, recording_sid: &str) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 464. + +*** + +### get + +#### Signature + +```rust +fn get(&self, sid: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 389. + +*** + +### get\_participant + +#### Signature + +```rust +fn get_participant(&self, conference_sid: &str, call_sid: &str) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 407. + +*** + +### get\_recording + +#### Signature + +```rust +fn get_recording(&self, conference_sid: &str, recording_sid: &str) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 445. + +*** + +### list + +#### Signature + +```rust +fn list(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 384. + +*** + +### list\_participants + +#### Signature + +```rust +fn list_participants(&self, conference_sid: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 397. + +*** + +### list\_recordings + +#### Signature + +```rust +fn list_recordings(&self, conference_sid: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 435. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, base_path: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 373. + +*** + +### remove\_participant + +#### Signature + +```rust +fn remove_participant(&self, conference_sid: &str, call_sid: &str) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 426. + +*** + +### start\_stream + +#### Signature + +```rust +fn start_stream(&self, conference_sid: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 473. + +*** + +### stop\_stream + +#### Signature + +```rust +fn stop_stream( + &self, + conference_sid: &str, + stream_sid: &str, + params: &? +) -> ? +``` + +#### Parameters + + + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 482. + +*** + +### update + +#### Signature + +```rust +fn update(&self, sid: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 393. + +*** + +### update\_participant + +#### Signature + +```rust +fn update_participant( + &self, + conference_sid: &str, + call_sid: &str, + params: &? +) -> ? +``` + +#### Parameters + + + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 416. + +*** + +### update\_recording + +#### Signature + +```rust +fn update_recording( + &self, + conference_sid: &str, + recording_sid: &str, + params: &? +) -> ? +``` + +#### Parameters + + + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 454. + +## Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 367. diff --git a/fern/products/sdk-reference/rust/rest/namespaces/compat/compat-faxes/index.mdx b/fern/products/sdk-reference/rust/rest/namespaces/compat/compat-faxes/index.mdx new file mode 100644 index 0000000000..056188f334 --- /dev/null +++ b/fern/products/sdk-reference/rust/rest/namespaces/compat/compat-faxes/index.mdx @@ -0,0 +1,274 @@ +--- +slug: "/reference/rust/rest/namespaces/compat/compat-faxes" +title: "CompatFaxes" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::compat::CompatFaxes" + parent: "rest.namespaces.compat" + module: "rest.namespaces.compat" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs" + visibility: "public" +--- +# `CompatFaxes` + +## Signature + +```rust +struct CompatFaxes { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 313. + +*** + +### create + +#### Signature + +```rust +fn create(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 322. + +*** + +### delete + +#### Signature + +```rust +fn delete(&self, sid: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 334. + +*** + +### delete\_media + +#### Signature + +```rust +fn delete_media(&self, fax_sid: &str, media_sid: &str) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 353. + +*** + +### get + +#### Signature + +```rust +fn get(&self, sid: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 326. + +*** + +### get\_media + +#### Signature + +```rust +fn get_media(&self, fax_sid: &str, media_sid: &str) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 344. + +*** + +### list + +#### Signature + +```rust +fn list(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 317. + +*** + +### list\_media + +#### Signature + +```rust +fn list_media(&self, fax_sid: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 338. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, base_path: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 306. + +*** + +### update + +#### Signature + +```rust +fn update(&self, sid: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 330. + +## Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 300. diff --git a/fern/products/sdk-reference/rust/rest/namespaces/compat/compat-laml-bins/index.mdx b/fern/products/sdk-reference/rust/rest/namespaces/compat/compat-laml-bins/index.mdx new file mode 100644 index 0000000000..e78830a9b3 --- /dev/null +++ b/fern/products/sdk-reference/rust/rest/namespaces/compat/compat-laml-bins/index.mdx @@ -0,0 +1,196 @@ +--- +slug: "/reference/rust/rest/namespaces/compat/compat-laml-bins" +title: "CompatLamlBins" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::compat::CompatLamlBins" + parent: "rest.namespaces.compat" + module: "rest.namespaces.compat" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs" + visibility: "public" +--- +# `CompatLamlBins` + +## Signature + +```rust +struct CompatLamlBins { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 640. + +*** + +### create + +#### Signature + +```rust +fn create(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 649. + +*** + +### delete + +#### Signature + +```rust +fn delete(&self, sid: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 661. + +*** + +### get + +#### Signature + +```rust +fn get(&self, sid: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 653. + +*** + +### list + +#### Signature + +```rust +fn list(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 644. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, base_path: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 633. + +*** + +### update + +#### Signature + +```rust +fn update(&self, sid: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 657. + +## Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 627. diff --git a/fern/products/sdk-reference/rust/rest/namespaces/compat/compat-messages/index.mdx b/fern/products/sdk-reference/rust/rest/namespaces/compat/compat-messages/index.mdx new file mode 100644 index 0000000000..039736067b --- /dev/null +++ b/fern/products/sdk-reference/rust/rest/namespaces/compat/compat-messages/index.mdx @@ -0,0 +1,274 @@ +--- +slug: "/reference/rust/rest/namespaces/compat/compat-messages" +title: "CompatMessages" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::compat::CompatMessages" + parent: "rest.namespaces.compat" + module: "rest.namespaces.compat" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs" + visibility: "public" +--- +# `CompatMessages` + +## Signature + +```rust +struct CompatMessages { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 242. + +*** + +### create + +#### Signature + +```rust +fn create(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 251. + +*** + +### delete + +#### Signature + +```rust +fn delete(&self, sid: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 263. + +*** + +### delete\_media + +#### Signature + +```rust +fn delete_media(&self, message_sid: &str, media_sid: &str) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 286. + +*** + +### get + +#### Signature + +```rust +fn get(&self, sid: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 255. + +*** + +### get\_media + +#### Signature + +```rust +fn get_media(&self, message_sid: &str, media_sid: &str) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 277. + +*** + +### list + +#### Signature + +```rust +fn list(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 246. + +*** + +### list\_media + +#### Signature + +```rust +fn list_media(&self, message_sid: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 267. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, base_path: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 235. + +*** + +### update + +#### Signature + +```rust +fn update(&self, sid: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 259. + +## Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 229. diff --git a/fern/products/sdk-reference/rust/rest/namespaces/compat/compat-phone-numbers/index.mdx b/fern/products/sdk-reference/rust/rest/namespaces/compat/compat-phone-numbers/index.mdx new file mode 100644 index 0000000000..b5882fef83 --- /dev/null +++ b/fern/products/sdk-reference/rust/rest/namespaces/compat/compat-phone-numbers/index.mdx @@ -0,0 +1,318 @@ +--- +slug: "/reference/rust/rest/namespaces/compat/compat-phone-numbers" +title: "CompatPhoneNumbers" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::compat::CompatPhoneNumbers" + parent: "rest.namespaces.compat" + module: "rest.namespaces.compat" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs" + visibility: "public" +--- +# `CompatPhoneNumbers` + +## Signature + +```rust +struct CompatPhoneNumbers { /* fields */ } +``` + +## Methods + +### available\_base + +#### Signature + +```rust +fn available_base(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 518. + +*** + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 514. + +*** + +### delete + +#### Signature + +```rust +fn delete(&self, sid: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 539. + +*** + +### get + +#### Signature + +```rust +fn get(&self, sid: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 531. + +*** + +### import\_number + +POST /ImportedPhoneNumbers — note the path is _Imported_, not _Incoming_. + +#### Signature + +```rust +fn import_number(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 544. + +*** + +### list + +#### Signature + +```rust +fn list(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 522. + +*** + +### list\_available\_countries + +#### Signature + +```rust +fn list_available_countries(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 551. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, base_path: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 504. + +*** + +### purchase + +#### Signature + +```rust +fn purchase(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 527. + +*** + +### search\_local + +#### Signature + +```rust +fn search_local(&self, country: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 559. + +*** + +### search\_toll\_free + +#### Signature + +```rust +fn search_toll_free(&self, country: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 569. + +*** + +### update + +#### Signature + +```rust +fn update(&self, sid: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 535. + +## Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 497. diff --git a/fern/products/sdk-reference/rust/rest/namespaces/compat/compat-queues/index.mdx b/fern/products/sdk-reference/rust/rest/namespaces/compat/compat-queues/index.mdx new file mode 100644 index 0000000000..4ceac9adf1 --- /dev/null +++ b/fern/products/sdk-reference/rust/rest/namespaces/compat/compat-queues/index.mdx @@ -0,0 +1,276 @@ +--- +slug: "/reference/rust/rest/namespaces/compat/compat-queues" +title: "CompatQueues" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::compat::CompatQueues" + parent: "rest.namespaces.compat" + module: "rest.namespaces.compat" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs" + visibility: "public" +--- +# `CompatQueues` + +## Signature + +```rust +struct CompatQueues { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 683. + +*** + +### create + +#### Signature + +```rust +fn create(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 692. + +*** + +### delete + +#### Signature + +```rust +fn delete(&self, sid: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 704. + +*** + +### dequeue\_member + +#### Signature + +```rust +fn dequeue_member(&self, queue_sid: &str, call_sid: &str, params: &?) -> ? +``` + +#### Parameters + + + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 727. + +*** + +### get + +#### Signature + +```rust +fn get(&self, sid: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 696. + +*** + +### get\_member + +#### Signature + +```rust +fn get_member(&self, queue_sid: &str, call_sid: &str) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 718. + +*** + +### list + +#### Signature + +```rust +fn list(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 687. + +*** + +### list\_members + +#### Signature + +```rust +fn list_members(&self, queue_sid: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 708. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, base_path: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 676. + +*** + +### update + +#### Signature + +```rust +fn update(&self, sid: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 700. + +## Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 670. diff --git a/fern/products/sdk-reference/rust/rest/namespaces/compat/compat-recordings/index.mdx b/fern/products/sdk-reference/rust/rest/namespaces/compat/compat-recordings/index.mdx new file mode 100644 index 0000000000..69b18b9223 --- /dev/null +++ b/fern/products/sdk-reference/rust/rest/namespaces/compat/compat-recordings/index.mdx @@ -0,0 +1,146 @@ +--- +slug: "/reference/rust/rest/namespaces/compat/compat-recordings" +title: "CompatRecordings" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::compat::CompatRecordings" + parent: "rest.namespaces.compat" + module: "rest.namespaces.compat" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs" + visibility: "public" +--- +# `CompatRecordings` + +## Signature + +```rust +struct CompatRecordings { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 755. + +*** + +### delete + +#### Signature + +```rust +fn delete(&self, sid: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 768. + +*** + +### get + +#### Signature + +```rust +fn get(&self, sid: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 764. + +*** + +### list + +#### Signature + +```rust +fn list(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 759. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, base_path: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 748. + +## Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 742. diff --git a/fern/products/sdk-reference/rust/rest/namespaces/compat/compat-tokens/index.mdx b/fern/products/sdk-reference/rust/rest/namespaces/compat/compat-tokens/index.mdx new file mode 100644 index 0000000000..b45f265f89 --- /dev/null +++ b/fern/products/sdk-reference/rust/rest/namespaces/compat/compat-tokens/index.mdx @@ -0,0 +1,148 @@ +--- +slug: "/reference/rust/rest/namespaces/compat/compat-tokens" +title: "CompatTokens" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::compat::CompatTokens" + parent: "rest.namespaces.compat" + module: "rest.namespaces.compat" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs" + visibility: "public" +--- +# `CompatTokens` + +## Signature + +```rust +struct CompatTokens { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 825. + +*** + +### create + +#### Signature + +```rust +fn create(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 829. + +*** + +### delete + +#### Signature + +```rust +fn delete(&self, token_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 841. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, base_path: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 818. + +*** + +### update + +#### Signature + +```rust +fn update(&self, token_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 833. + +## Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 812. diff --git a/fern/products/sdk-reference/rust/rest/namespaces/compat/compat-transcriptions/index.mdx b/fern/products/sdk-reference/rust/rest/namespaces/compat/compat-transcriptions/index.mdx new file mode 100644 index 0000000000..0a47fb54d3 --- /dev/null +++ b/fern/products/sdk-reference/rust/rest/namespaces/compat/compat-transcriptions/index.mdx @@ -0,0 +1,146 @@ +--- +slug: "/reference/rust/rest/namespaces/compat/compat-transcriptions" +title: "CompatTranscriptions" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::compat::CompatTranscriptions" + parent: "rest.namespaces.compat" + module: "rest.namespaces.compat" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs" + visibility: "public" +--- +# `CompatTranscriptions` + +## Signature + +```rust +struct CompatTranscriptions { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 790. + +*** + +### delete + +#### Signature + +```rust +fn delete(&self, sid: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 803. + +*** + +### get + +#### Signature + +```rust +fn get(&self, sid: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 799. + +*** + +### list + +#### Signature + +```rust +fn list(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 794. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, base_path: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 783. + +## Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 777. diff --git a/fern/products/sdk-reference/rust/rest/namespaces/compat/index.mdx b/fern/products/sdk-reference/rust/rest/namespaces/compat/index.mdx new file mode 100644 index 0000000000..bbf3810687 --- /dev/null +++ b/fern/products/sdk-reference/rust/rest/namespaces/compat/index.mdx @@ -0,0 +1,341 @@ +--- +slug: "/reference/rust/rest/namespaces/compat" +title: "compat" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::compat" + parent: "signalwire::rest::namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs" + visibility: "public" +--- +# `compat` + +Compat (Twilio-compatible LAML) API namespace. + +Mirrors `signalwire.rest.namespaces.compat.CompatNamespace` from the +Python SDK. The base path is +`/api/laml/2010-04-01/Accounts/{account_sid}` and every sub-resource +is rooted under that. + +## Signature + +```rust +struct Compat { /* fields */ } +``` + +## Methods + +### account\_sid + +#### Signature + +```rust +fn account_sid(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 33. + +*** + +### accounts + +#### Signature + +```rust +fn accounts(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 43. + +*** + +### applications + +#### Signature + +```rust +fn applications(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 67. + +*** + +### calls + +#### Signature + +```rust +fn calls(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 47. + +*** + +### client + +#### Signature + +```rust +fn client(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 29. + +*** + +### conferences + +#### Signature + +```rust +fn conferences(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 59. + +*** + +### faxes + +#### Signature + +```rust +fn faxes(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 55. + +*** + +### laml\_bins + +#### Signature + +```rust +fn laml_bins(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 71. + +*** + +### messages + +#### Signature + +```rust +fn messages(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 51. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, account_sid: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 22. + +*** + +### phone\_numbers + +#### Signature + +```rust +fn phone_numbers(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 63. + +*** + +### queues + +#### Signature + +```rust +fn queues(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 75. + +*** + +### recordings + +#### Signature + +```rust +fn recordings(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 79. + +*** + +### tokens + +#### Signature + +```rust +fn tokens(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 87. + +*** + +### transcriptions + +#### Signature + +```rust +fn transcriptions(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 83. + +## Source + +[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) + +Line 16. diff --git a/fern/products/sdk-reference/rust/rest/namespaces/compat/index__2.mdx b/fern/products/sdk-reference/rust/rest/namespaces/compat/index__2.mdx new file mode 100644 index 0000000000..a4fe875579 --- /dev/null +++ b/fern/products/sdk-reference/rust/rest/namespaces/compat/index__2.mdx @@ -0,0 +1,42 @@ +--- +slug: "/reference/rust/rest/namespaces/compat/index__2" +title: "compat" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "rest.namespaces.compat" + parent: "signalwire::rest::namespaces" + module: "rest.namespaces" +--- +# `compat` + +## Classes + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/fern/products/sdk-reference/rust/rest/namespaces/datasphere/datasphere-documents/index.mdx b/fern/products/sdk-reference/rust/rest/namespaces/datasphere/datasphere-documents/index.mdx new file mode 100644 index 0000000000..1e82c10b52 --- /dev/null +++ b/fern/products/sdk-reference/rust/rest/namespaces/datasphere/datasphere-documents/index.mdx @@ -0,0 +1,301 @@ +--- +slug: "/reference/rust/rest/namespaces/datasphere/datasphere-documents" +title: "DatasphereDocuments" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::datasphere::DatasphereDocuments" + parent: "signalwire::rest::namespaces::datasphere" + module: "rest.namespaces.datasphere" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/datasphere.rs" + visibility: "public" +--- +# `DatasphereDocuments` + +Datasphere documents resource. + +Rooted at `/api/datasphere/documents` with CRUD plus search and chunk +sub-paths. + +## Signature + +```rust +struct DatasphereDocuments { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/datasphere.rs) + +Line 42. + +*** + +### create + +#### Signature + +```rust +fn create(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/datasphere.rs) + +Line 66. + +*** + +### delete + +#### Signature + +```rust +fn delete(&self, document_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/datasphere.rs) + +Line 84. + +*** + +### delete\_chunk + +#### Signature + +```rust +fn delete_chunk(&self, document_id: &str, chunk_id: &str) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/datasphere.rs) + +Line 112. + +*** + +### get + +#### Signature + +```rust +fn get(&self, document_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/datasphere.rs) + +Line 70. + +*** + +### get\_chunk + +#### Signature + +```rust +fn get_chunk(&self, document_id: &str, chunk_id: &str) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/datasphere.rs) + +Line 103. + +*** + +### list + +#### Signature + +```rust +fn list(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/datasphere.rs) + +Line 61. + +*** + +### list\_chunks + +#### Signature + +```rust +fn list_chunks(&self, document_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/datasphere.rs) + +Line 93. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/datasphere.rs) + +Line 35. + +*** + +### search + +#### Signature + +```rust +fn search(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/datasphere.rs) + +Line 89. + +*** + +### update + +#### Signature + +```rust +fn update(&self, document_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/datasphere.rs) + +Line 75. + +## Source + +[`src/rest/namespaces/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/datasphere.rs) + +Line 29. diff --git a/fern/products/sdk-reference/rust/rest/namespaces/datasphere/datasphere-namespace/index.mdx b/fern/products/sdk-reference/rust/rest/namespaces/datasphere/datasphere-namespace/index.mdx new file mode 100644 index 0000000000..f5cfadde52 --- /dev/null +++ b/fern/products/sdk-reference/rust/rest/namespaces/datasphere/datasphere-namespace/index.mdx @@ -0,0 +1,76 @@ +--- +slug: "/reference/rust/rest/namespaces/datasphere/datasphere-namespace" +title: "DatasphereNamespace" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::datasphere::DatasphereNamespace" + parent: "signalwire::rest::namespaces::datasphere" + module: "rest.namespaces.datasphere" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/datasphere.rs" + visibility: "public" +--- +# `DatasphereNamespace` + +Datasphere API namespace — exposes documents. + +Mirrors `signalwire.rest.namespaces.datasphere.DatasphereNamespace`. + +## Signature + +```rust +struct DatasphereNamespace { /* fields */ } +``` + +## Methods + +### documents + +#### Signature + +```rust +fn documents(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/datasphere.rs) + +Line 20. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/datasphere.rs) + +Line 16. + +## Source + +[`src/rest/namespaces/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/datasphere.rs) + +Line 11. diff --git a/fern/products/sdk-reference/rust/rest/namespaces/datasphere/index.mdx b/fern/products/sdk-reference/rust/rest/namespaces/datasphere/index.mdx new file mode 100644 index 0000000000..938d084e84 --- /dev/null +++ b/fern/products/sdk-reference/rust/rest/namespaces/datasphere/index.mdx @@ -0,0 +1,34 @@ +--- +slug: "/reference/rust/rest/namespaces/datasphere" +title: "datasphere" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::rest::namespaces::datasphere" + parent: "signalwire::rest::namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/datasphere.rs" + visibility: "public" +--- +# `datasphere` + +## Classes + + + + Datasphere documents resource. + + + + Datasphere API namespace — exposes documents. + + + +## Source + +[`src/rest/namespaces/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/datasphere.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/rest/namespaces/fabric/call-flows-resource/index.mdx b/fern/products/sdk-reference/rust/rest/namespaces/fabric/call-flows-resource/index.mdx new file mode 100644 index 0000000000..7d28d2a293 --- /dev/null +++ b/fern/products/sdk-reference/rust/rest/namespaces/fabric/call-flows-resource/index.mdx @@ -0,0 +1,276 @@ +--- +slug: "/reference/rust/rest/namespaces/fabric/call-flows-resource" +title: "CallFlowsResource" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::fabric::CallFlowsResource" + parent: "rest.namespaces.fabric" + module: "rest.namespaces.fabric" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs" + visibility: "public" +--- +# `CallFlowsResource` + +## Signature + +```rust +struct CallFlowsResource { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 293. + +*** + +### create + +#### Signature + +```rust +fn create(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 306. + +*** + +### delete + +#### Signature + +```rust +fn delete(&self, resource_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 324. + +*** + +### deploy\_version + +#### Signature + +```rust +fn deploy_version(&self, resource_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 352. + +*** + +### get + +#### Signature + +```rust +fn get(&self, resource_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 310. + +*** + +### list + +#### Signature + +```rust +fn list(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 301. + +*** + +### list\_addresses + +Sub-resource list — uses singular `call_flow` per the API spec. + +#### Signature + +```rust +fn list_addresses(&self, resource_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 330. + +*** + +### list\_versions + +#### Signature + +```rust +fn list_versions(&self, resource_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 341. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, base_path: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 286. + +*** + +### update + +#### Signature + +```rust +fn update(&self, resource_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 315. + +## Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 280. diff --git a/fern/products/sdk-reference/rust/rest/namespaces/fabric/conference-rooms-resource/index.mdx b/fern/products/sdk-reference/rust/rest/namespaces/fabric/conference-rooms-resource/index.mdx new file mode 100644 index 0000000000..c9424f4f6f --- /dev/null +++ b/fern/products/sdk-reference/rust/rest/namespaces/fabric/conference-rooms-resource/index.mdx @@ -0,0 +1,222 @@ +--- +slug: "/reference/rust/rest/namespaces/fabric/conference-rooms-resource" +title: "ConferenceRoomsResource" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::fabric::ConferenceRoomsResource" + parent: "rest.namespaces.fabric" + module: "rest.namespaces.fabric" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs" + visibility: "public" +--- +# `ConferenceRoomsResource` + +## Signature + +```rust +struct ConferenceRoomsResource { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 380. + +*** + +### create + +#### Signature + +```rust +fn create(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 393. + +*** + +### delete + +#### Signature + +```rust +fn delete(&self, resource_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 411. + +*** + +### get + +#### Signature + +```rust +fn get(&self, resource_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 397. + +*** + +### list + +#### Signature + +```rust +fn list(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 388. + +*** + +### list\_addresses + +#### Signature + +```rust +fn list_addresses(&self, resource_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 416. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, base_path: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 373. + +*** + +### update + +#### Signature + +```rust +fn update(&self, resource_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 402. + +## Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 367. diff --git a/fern/products/sdk-reference/rust/rest/namespaces/fabric/cxml-applications-resource/index.mdx b/fern/products/sdk-reference/rust/rest/namespaces/fabric/cxml-applications-resource/index.mdx new file mode 100644 index 0000000000..5f5ade15e5 --- /dev/null +++ b/fern/products/sdk-reference/rust/rest/namespaces/fabric/cxml-applications-resource/index.mdx @@ -0,0 +1,202 @@ +--- +slug: "/reference/rust/rest/namespaces/fabric/cxml-applications-resource" +title: "CxmlApplicationsResource" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::fabric::CxmlApplicationsResource" + parent: "rest.namespaces.fabric" + module: "rest.namespaces.fabric" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs" + visibility: "public" +--- +# `CxmlApplicationsResource` + +## Signature + +```rust +struct CxmlApplicationsResource { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 445. + +*** + +### create + +cXML applications cannot be created via this API. + +Returns an `Err` with a clear "not implemented" message that +mirrors the Python SDK's `NotImplementedError`. No HTTP request +is sent to the server. + +#### Signature + +```rust +fn create(&self, _params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 478. + +*** + +### delete + +#### Signature + +```rust +fn delete(&self, resource_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 468. + +*** + +### get + +#### Signature + +```rust +fn get(&self, resource_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 454. + +*** + +### list + +#### Signature + +```rust +fn list(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 449. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, base_path: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 438. + +*** + +### update + +#### Signature + +```rust +fn update(&self, resource_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 459. + +## Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 432. diff --git a/fern/products/sdk-reference/rust/rest/namespaces/fabric/fabric-addresses/index.mdx b/fern/products/sdk-reference/rust/rest/namespaces/fabric/fabric-addresses/index.mdx new file mode 100644 index 0000000000..276c55b993 --- /dev/null +++ b/fern/products/sdk-reference/rust/rest/namespaces/fabric/fabric-addresses/index.mdx @@ -0,0 +1,122 @@ +--- +slug: "/reference/rust/rest/namespaces/fabric/fabric-addresses" +title: "FabricAddresses" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::fabric::FabricAddresses" + parent: "rest.namespaces.fabric" + module: "rest.namespaces.fabric" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs" + visibility: "public" +--- +# `FabricAddresses` + +## Signature + +```rust +struct FabricAddresses { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 154. + +*** + +### get + +#### Signature + +```rust +fn get(&self, address_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 163. + +*** + +### list + +#### Signature + +```rust +fn list(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 158. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, base_path: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 147. + +## Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 141. diff --git a/fern/products/sdk-reference/rust/rest/namespaces/fabric/fabric-tokens/index.mdx b/fern/products/sdk-reference/rust/rest/namespaces/fabric/fabric-tokens/index.mdx new file mode 100644 index 0000000000..eec3514831 --- /dev/null +++ b/fern/products/sdk-reference/rust/rest/namespaces/fabric/fabric-tokens/index.mdx @@ -0,0 +1,174 @@ +--- +slug: "/reference/rust/rest/namespaces/fabric/fabric-tokens" +title: "FabricTokens" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::fabric::FabricTokens" + parent: "rest.namespaces.fabric" + module: "rest.namespaces.fabric" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs" + visibility: "public" +--- +# `FabricTokens` + +## Signature + +```rust +struct FabricTokens { /* fields */ } +``` + +## Methods + +### create\_embed\_token + +#### Signature + +```rust +fn create_embed_token(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 587. + +*** + +### create\_guest\_token + +#### Signature + +```rust +fn create_guest_token(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 580. + +*** + +### create\_invite\_token + +Note the singular `subscriber` segment per the spec. + +#### Signature + +```rust +fn create_invite_token(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 573. + +*** + +### create\_subscriber\_token + +#### Signature + +```rust +fn create_subscriber_token(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 556. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 552. + +*** + +### refresh\_subscriber\_token + +#### Signature + +```rust +fn refresh_subscriber_token(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 564. + +## Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 547. diff --git a/fern/products/sdk-reference/rust/rest/namespaces/fabric/generic-resources/index.mdx b/fern/products/sdk-reference/rust/rest/namespaces/fabric/generic-resources/index.mdx new file mode 100644 index 0000000000..9d2125de23 --- /dev/null +++ b/fern/products/sdk-reference/rust/rest/namespaces/fabric/generic-resources/index.mdx @@ -0,0 +1,198 @@ +--- +slug: "/reference/rust/rest/namespaces/fabric/generic-resources" +title: "GenericResources" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::fabric::GenericResources" + parent: "rest.namespaces.fabric" + module: "rest.namespaces.fabric" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs" + visibility: "public" +--- +# `GenericResources` + +## Signature + +```rust +struct GenericResources { /* fields */ } +``` + +## Methods + +### assign\_domain\_application + +#### Signature + +```rust +fn assign_domain_application(&self, resource_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 533. + +*** + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 504. + +*** + +### delete + +#### Signature + +```rust +fn delete(&self, resource_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 518. + +*** + +### get + +#### Signature + +```rust +fn get(&self, resource_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 513. + +*** + +### list + +#### Signature + +```rust +fn list(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 508. + +*** + +### list\_addresses + +#### Signature + +```rust +fn list_addresses(&self, resource_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 523. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, base_path: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 497. + +## Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 491. diff --git a/fern/products/sdk-reference/rust/rest/namespaces/fabric/index.mdx b/fern/products/sdk-reference/rust/rest/namespaces/fabric/index.mdx new file mode 100644 index 0000000000..3ce5fc5d8f --- /dev/null +++ b/fern/products/sdk-reference/rust/rest/namespaces/fabric/index.mdx @@ -0,0 +1,413 @@ +--- +slug: "/reference/rust/rest/namespaces/fabric" +title: "fabric" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::fabric" + parent: "signalwire::rest::namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs" + visibility: "public" +--- +# `fabric` + +REST API namespace modules. +Fabric API namespace — resource composition, addresses, and tokens. + +Mirrors `signalwire.rest.namespaces.fabric.FabricNamespace` from the +Python SDK. + +## Signature + +```rust +struct Fabric { /* fields */ } +``` + +## Methods + +### addresses + +Read-only top-level fabric addresses (NOT under `/resources`). + +#### Signature + +```rust +fn addresses(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 71. + +*** + +### ai\_agents + +#### Signature + +```rust +fn ai_agents(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 106. + +*** + +### call\_flows + +Call flows — exposes a singular `call_flow` sub-path for addresses +/ versions per the API spec. + +#### Signature + +```rust +fn call_flows(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 77. + +*** + +### call\_queues + +#### Signature + +```rust +fn call_queues(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 102. + +*** + +### client + +#### Signature + +```rust +fn client(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 55. + +*** + +### conference\_rooms + +Conference rooms — singular `conference_room` for sub-paths. + +#### Signature + +```rust +fn conference_rooms(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 90. + +*** + +### conversations + +#### Signature + +```rust +fn conversations(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 85. + +*** + +### cxml\_applications + +cXML applications — read/update/delete only (no create). + +#### Signature + +```rust +fn cxml_applications(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 119. + +*** + +### dial\_plans + +#### Signature + +```rust +fn dial_plans(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 94. + +*** + +### freeclimb\_apps + +#### Signature + +```rust +fn freeclimb_apps(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 98. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 51. + +*** + +### phone\_numbers + +#### Signature + +```rust +fn phone_numbers(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 114. + +*** + +### resources + +Generic resource operations across every fabric resource type. + +#### Signature + +```rust +fn resources(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 127. + +*** + +### sip\_endpoints + +#### Signature + +```rust +fn sip_endpoints(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 66. + +*** + +### sip\_profiles + +#### Signature + +```rust +fn sip_profiles(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 110. + +*** + +### subscribers + +Subscribers resource — full CRUD plus SIP-endpoint sub-resources. + +#### Signature + +```rust +fn subscribers(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 62. + +*** + +### swml\_scripts + +#### Signature + +```rust +fn swml_scripts(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 81. + +*** + +### tokens + +Fabric token factories (subscriber / guest / invite / embed). + +#### Signature + +```rust +fn tokens(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 132. + +## Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 46. diff --git a/fern/products/sdk-reference/rust/rest/namespaces/fabric/index__2.mdx b/fern/products/sdk-reference/rust/rest/namespaces/fabric/index__2.mdx new file mode 100644 index 0000000000..cd70e1d9ad --- /dev/null +++ b/fern/products/sdk-reference/rust/rest/namespaces/fabric/index__2.mdx @@ -0,0 +1,32 @@ +--- +slug: "/reference/rust/rest/namespaces/fabric/index__2" +title: "fabric" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "rest.namespaces.fabric" + parent: "signalwire::rest::namespaces" + module: "rest.namespaces" +--- +# `fabric` + +## Classes + + + + + + + + + + + + + + + + diff --git a/fern/products/sdk-reference/rust/rest/namespaces/fabric/subscribers-resource/index.mdx b/fern/products/sdk-reference/rust/rest/namespaces/fabric/subscribers-resource/index.mdx new file mode 100644 index 0000000000..8dda44f538 --- /dev/null +++ b/fern/products/sdk-reference/rust/rest/namespaces/fabric/subscribers-resource/index.mdx @@ -0,0 +1,359 @@ +--- +slug: "/reference/rust/rest/namespaces/fabric/subscribers-resource" +title: "SubscribersResource" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::fabric::SubscribersResource" + parent: "rest.namespaces.fabric" + module: "rest.namespaces.fabric" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs" + visibility: "public" +--- +# `SubscribersResource` + +## Signature + +```rust +struct SubscribersResource { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 186. + +*** + +### create + +#### Signature + +```rust +fn create(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 195. + +*** + +### create\_sip\_endpoint + +#### Signature + +```rust +fn create_sip_endpoint(&self, subscriber_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 238. + +*** + +### delete + +#### Signature + +```rust +fn delete(&self, subscriber_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 213. + +*** + +### delete\_sip\_endpoint + +#### Signature + +```rust +fn delete_sip_endpoint(&self, subscriber_id: &str, endpoint_id: &str) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 266. + +*** + +### get + +#### Signature + +```rust +fn get(&self, subscriber_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 199. + +*** + +### get\_sip\_endpoint + +#### Signature + +```rust +fn get_sip_endpoint(&self, subscriber_id: &str, endpoint_id: &str) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 247. + +*** + +### list + +#### Signature + +```rust +fn list(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 190. + +*** + +### list\_addresses + +#### Signature + +```rust +fn list_addresses(&self, subscriber_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 218. + +*** + +### list\_sip\_endpoints + +#### Signature + +```rust +fn list_sip_endpoints(&self, subscriber_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 228. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, base_path: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 179. + +*** + +### update + +#### Signature + +```rust +fn update(&self, subscriber_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 204. + +*** + +### update\_sip\_endpoint + +#### Signature + +```rust +fn update_sip_endpoint( + &self, + subscriber_id: &str, + endpoint_id: &str, + params: &? +) -> ? +``` + +#### Parameters + + + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 256. + +## Source + +[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) + +Line 173. diff --git a/fern/products/sdk-reference/rust/rest/namespaces/index.mdx b/fern/products/sdk-reference/rust/rest/namespaces/index.mdx new file mode 100644 index 0000000000..2a35f920fd --- /dev/null +++ b/fern/products/sdk-reference/rust/rest/namespaces/index.mdx @@ -0,0 +1,84 @@ +--- +slug: "/reference/rust/rest/namespaces" +title: "namespaces" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::rest::namespaces" + parent: "signalwire::rest" + module: "rest" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/mod.rs" + visibility: "public" +--- +# `namespaces` + +## Classes + + + + Calling API namespace. + + + + Compat (Twilio-compatible LAML) API namespace. + + + + REST API namespace modules. Fabric API namespace — resource composition, addresses, and tokens. + + + + Logs namespace — message, voice, fax, conference logs (read-only). + + + + MFA (Multi-Factor Authentication) namespace. + + + + Project API namespace — exposes the API token sub-resource. + + + + Queues namespace. + + + + 10DLC Campaign Registry namespace — brands, campaigns, orders, numbers. + + + + Video API namespace — rooms, sessions, recordings, conferences, tokens, streams. + + + +## Modules + + + + + + + + + + + + + + + + + + + + + +## Source + +[`src/rest/namespaces/mod.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/mod.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/rest/namespaces/logs/conference-logs/index.mdx b/fern/products/sdk-reference/rust/rest/namespaces/logs/conference-logs/index.mdx new file mode 100644 index 0000000000..5061a92e24 --- /dev/null +++ b/fern/products/sdk-reference/rust/rest/namespaces/logs/conference-logs/index.mdx @@ -0,0 +1,98 @@ +--- +slug: "/reference/rust/rest/namespaces/logs/conference-logs" +title: "ConferenceLogs" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::logs::ConferenceLogs" + parent: "rest.namespaces.logs" + module: "rest.namespaces.logs" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs" + visibility: "public" +--- +# `ConferenceLogs` + +## Signature + +```rust +struct ConferenceLogs { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) + +Line 196. + +*** + +### list + +#### Signature + +```rust +fn list(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) + +Line 200. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, base_path: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) + +Line 189. + +## Source + +[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) + +Line 183. diff --git a/fern/products/sdk-reference/rust/rest/namespaces/logs/fax-logs/index.mdx b/fern/products/sdk-reference/rust/rest/namespaces/logs/fax-logs/index.mdx new file mode 100644 index 0000000000..4a7f8fa6c9 --- /dev/null +++ b/fern/products/sdk-reference/rust/rest/namespaces/logs/fax-logs/index.mdx @@ -0,0 +1,122 @@ +--- +slug: "/reference/rust/rest/namespaces/logs/fax-logs" +title: "FaxLogs" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::logs::FaxLogs" + parent: "rest.namespaces.logs" + module: "rest.namespaces.logs" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs" + visibility: "public" +--- +# `FaxLogs` + +## Signature + +```rust +struct FaxLogs { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) + +Line 164. + +*** + +### get + +#### Signature + +```rust +fn get(&self, log_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) + +Line 173. + +*** + +### list + +#### Signature + +```rust +fn list(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) + +Line 168. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, base_path: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) + +Line 157. + +## Source + +[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) + +Line 151. diff --git a/fern/products/sdk-reference/rust/rest/namespaces/logs/index.mdx b/fern/products/sdk-reference/rust/rest/namespaces/logs/index.mdx new file mode 100644 index 0000000000..2c8f9606d1 --- /dev/null +++ b/fern/products/sdk-reference/rust/rest/namespaces/logs/index.mdx @@ -0,0 +1,158 @@ +--- +slug: "/reference/rust/rest/namespaces/logs" +title: "logs" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::logs" + parent: "signalwire::rest::namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs" + visibility: "public" +--- +# `logs` + +Logs namespace — message, voice, fax, conference logs (read-only). + +Mirrors `signalwire.rest.namespaces.logs.LogsNamespace`. Each +sub-resource binds to a different sub-API path because the upstream +specs live in different documents. + +## Signature + +```rust +struct Logs { /* fields */ } +``` + +## Methods + +### client + +#### Signature + +```rust +fn client(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) + +Line 52. + +*** + +### conferences + +#### Signature + +```rust +fn conferences(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) + +Line 68. + +*** + +### fax + +#### Signature + +```rust +fn fax(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) + +Line 64. + +*** + +### messages + +#### Signature + +```rust +fn messages(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) + +Line 56. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) + +Line 48. + +*** + +### voice + +#### Signature + +```rust +fn voice(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) + +Line 60. + +## Source + +[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) + +Line 43. diff --git a/fern/products/sdk-reference/rust/rest/namespaces/logs/index__2.mdx b/fern/products/sdk-reference/rust/rest/namespaces/logs/index__2.mdx new file mode 100644 index 0000000000..ee793e5da8 --- /dev/null +++ b/fern/products/sdk-reference/rust/rest/namespaces/logs/index__2.mdx @@ -0,0 +1,26 @@ +--- +slug: "/reference/rust/rest/namespaces/logs/index__2" +title: "logs" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "rest.namespaces.logs" + parent: "signalwire::rest::namespaces" + module: "rest.namespaces" +--- +# `logs` + +## Classes + + + + + + + + + + diff --git a/fern/products/sdk-reference/rust/rest/namespaces/logs/message-logs/index.mdx b/fern/products/sdk-reference/rust/rest/namespaces/logs/message-logs/index.mdx new file mode 100644 index 0000000000..019bce6df6 --- /dev/null +++ b/fern/products/sdk-reference/rust/rest/namespaces/logs/message-logs/index.mdx @@ -0,0 +1,122 @@ +--- +slug: "/reference/rust/rest/namespaces/logs/message-logs" +title: "MessageLogs" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::logs::MessageLogs" + parent: "rest.namespaces.logs" + module: "rest.namespaces.logs" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs" + visibility: "public" +--- +# `MessageLogs` + +## Signature + +```rust +struct MessageLogs { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) + +Line 90. + +*** + +### get + +#### Signature + +```rust +fn get(&self, log_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) + +Line 99. + +*** + +### list + +#### Signature + +```rust +fn list(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) + +Line 94. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, base_path: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) + +Line 83. + +## Source + +[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) + +Line 77. diff --git a/fern/products/sdk-reference/rust/rest/namespaces/logs/voice-logs/index.mdx b/fern/products/sdk-reference/rust/rest/namespaces/logs/voice-logs/index.mdx new file mode 100644 index 0000000000..04416063df --- /dev/null +++ b/fern/products/sdk-reference/rust/rest/namespaces/logs/voice-logs/index.mdx @@ -0,0 +1,148 @@ +--- +slug: "/reference/rust/rest/namespaces/logs/voice-logs" +title: "VoiceLogs" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::logs::VoiceLogs" + parent: "rest.namespaces.logs" + module: "rest.namespaces.logs" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs" + visibility: "public" +--- +# `VoiceLogs` + +## Signature + +```rust +struct VoiceLogs { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) + +Line 122. + +*** + +### get + +#### Signature + +```rust +fn get(&self, log_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) + +Line 131. + +*** + +### list + +#### Signature + +```rust +fn list(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) + +Line 126. + +*** + +### list\_events + +#### Signature + +```rust +fn list_events(&self, log_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) + +Line 136. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, base_path: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) + +Line 115. + +## Source + +[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) + +Line 109. diff --git a/fern/products/sdk-reference/rust/rest/namespaces/mfa/index.mdx b/fern/products/sdk-reference/rust/rest/namespaces/mfa/index.mdx new file mode 100644 index 0000000000..03aaee3a22 --- /dev/null +++ b/fern/products/sdk-reference/rust/rest/namespaces/mfa/index.mdx @@ -0,0 +1,158 @@ +--- +slug: "/reference/rust/rest/namespaces/mfa" +title: "mfa" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::mfa" + parent: "signalwire::rest::namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/mfa.rs" + visibility: "public" +--- +# `mfa` + +MFA (Multi-Factor Authentication) namespace. + +Mirrors `signalwire.rest.namespaces.mfa.MfaResource` from the Python SDK. +Rooted at `/api/relay/rest/mfa` with `sms`, `call`, and `verify` +sub-paths. + +## Signature + +```rust +struct Mfa { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/mfa.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/mfa.rs) + +Line 24. + +*** + +### call + +POST /api/relay/rest/mfa/call — deliver a one-time code via voice. + +#### Signature + +```rust +fn call(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/mfa.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/mfa.rs) + +Line 34. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/mfa.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/mfa.rs) + +Line 17. + +*** + +### sms + +POST /api/relay/rest/mfa/sms — send a one-time code over SMS. + +#### Signature + +```rust +fn sms(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/mfa.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/mfa.rs) + +Line 29. + +*** + +### verify + +POST /api/relay/rest/mfa/\{request\_id\}/verify — verify a code. + +#### Signature + +```rust +fn verify(&self, request_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/mfa.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/mfa.rs) + +Line 39. + +## Source + +[`src/rest/namespaces/mfa.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/mfa.rs) + +Line 11. diff --git a/fern/products/sdk-reference/rust/rest/namespaces/number-groups/index.mdx b/fern/products/sdk-reference/rust/rest/namespaces/number-groups/index.mdx new file mode 100644 index 0000000000..0c7e3a737c --- /dev/null +++ b/fern/products/sdk-reference/rust/rest/namespaces/number-groups/index.mdx @@ -0,0 +1,30 @@ +--- +slug: "/reference/rust/rest/namespaces/number-groups" +title: "number_groups" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::rest::namespaces::number_groups" + parent: "signalwire::rest::namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs" + visibility: "public" +--- +# `number_groups` + +## Classes + + + + Number Groups namespace. + + + +## Source + +[`src/rest/namespaces/number_groups.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/rest/namespaces/number-groups/number-groups/index.mdx b/fern/products/sdk-reference/rust/rest/namespaces/number-groups/number-groups/index.mdx new file mode 100644 index 0000000000..9b1eac2dc1 --- /dev/null +++ b/fern/products/sdk-reference/rust/rest/namespaces/number-groups/number-groups/index.mdx @@ -0,0 +1,303 @@ +--- +slug: "/reference/rust/rest/namespaces/number-groups/number-groups" +title: "NumberGroups" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::number_groups::NumberGroups" + parent: "signalwire::rest::namespaces::number_groups" + module: "rest.namespaces.number_groups" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs" + visibility: "public" +--- +# `NumberGroups` + +Number Groups namespace. + +Mirrors `signalwire.rest.namespaces.number_groups.NumberGroupsResource`. +Provides standard CRUD over `/api/relay/rest/number_groups` plus the +membership endpoints rooted at the same collection and at the +project-scoped `/api/relay/rest/number_group_memberships` collection. + +## Signature + +```rust +struct NumberGroups { /* fields */ } +``` + +## Methods + +### add\_membership + +#### Signature + +```rust +fn add_membership(&self, group_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/number_groups.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs) + +Line 88. + +*** + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/number_groups.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs) + +Line 27. + +*** + +### create + +#### Signature + +```rust +fn create(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/number_groups.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs) + +Line 51. + +*** + +### delete + +#### Signature + +```rust +fn delete(&self, group_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/number_groups.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs) + +Line 69. + +*** + +### delete\_membership + +#### Signature + +```rust +fn delete_membership(&self, membership_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/number_groups.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs) + +Line 111. + +*** + +### get + +#### Signature + +```rust +fn get(&self, group_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/number_groups.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs) + +Line 55. + +*** + +### get\_membership + +#### Signature + +```rust +fn get_membership(&self, membership_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/number_groups.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs) + +Line 100. + +*** + +### list + +#### Signature + +```rust +fn list(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/number_groups.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs) + +Line 46. + +*** + +### list\_memberships + +GET /api/relay/rest/number\_groups/\{id\}/number\_group\_memberships + +#### Signature + +```rust +fn list_memberships(&self, group_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/number_groups.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs) + +Line 75. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/number_groups.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs) + +Line 20. + +*** + +### update + +#### Signature + +```rust +fn update(&self, group_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/number_groups.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs) + +Line 60. + +## Source + +[`src/rest/namespaces/number_groups.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs) + +Line 14. diff --git a/fern/products/sdk-reference/rust/rest/namespaces/project/index.mdx b/fern/products/sdk-reference/rust/rest/namespaces/project/index.mdx new file mode 100644 index 0000000000..30aa621655 --- /dev/null +++ b/fern/products/sdk-reference/rust/rest/namespaces/project/index.mdx @@ -0,0 +1,76 @@ +--- +slug: "/reference/rust/rest/namespaces/project" +title: "project" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::project" + parent: "signalwire::rest::namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/project.rs" + visibility: "public" +--- +# `project` + +Project API namespace — exposes the API token sub-resource. + +Mirrors `signalwire.rest.namespaces.project.ProjectNamespace`. + +## Signature + +```rust +struct Project { /* fields */ } +``` + +## Methods + +### new + +#### Signature + +```rust +fn new(client: &'a ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/project.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/project.rs) + +Line 14. + +*** + +### tokens + +#### Signature + +```rust +fn tokens(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/project.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/project.rs) + +Line 18. + +## Source + +[`src/rest/namespaces/project.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/project.rs) + +Line 9. diff --git a/fern/products/sdk-reference/rust/rest/namespaces/project/index__2.mdx b/fern/products/sdk-reference/rust/rest/namespaces/project/index__2.mdx new file mode 100644 index 0000000000..f664928de1 --- /dev/null +++ b/fern/products/sdk-reference/rust/rest/namespaces/project/index__2.mdx @@ -0,0 +1,22 @@ +--- +slug: "/reference/rust/rest/namespaces/project/index__2" +title: "project" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "rest.namespaces.project" + parent: "signalwire::rest::namespaces" + module: "rest.namespaces" +--- +# `project` + +## Classes + + + + Project API token management. + + diff --git a/fern/products/sdk-reference/rust/rest/namespaces/project/project-tokens/index.mdx b/fern/products/sdk-reference/rust/rest/namespaces/project/project-tokens/index.mdx new file mode 100644 index 0000000000..48e9b5a194 --- /dev/null +++ b/fern/products/sdk-reference/rust/rest/namespaces/project/project-tokens/index.mdx @@ -0,0 +1,151 @@ +--- +slug: "/reference/rust/rest/namespaces/project/project-tokens" +title: "ProjectTokens" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::project::ProjectTokens" + parent: "rest.namespaces.project" + module: "rest.namespaces.project" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/project.rs" + visibility: "public" +--- +# `ProjectTokens` + +Project API token management. + +Mirrors `ProjectTokens` from the Python SDK. Rooted at +`/api/project/tokens`. + +## Signature + +```rust +struct ProjectTokens { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/project.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/project.rs) + +Line 40. + +*** + +### create + +#### Signature + +```rust +fn create(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/project.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/project.rs) + +Line 44. + +*** + +### delete + +#### Signature + +```rust +fn delete(&self, token_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/project.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/project.rs) + +Line 57. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/project.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/project.rs) + +Line 33. + +*** + +### update + +#### Signature + +```rust +fn update(&self, token_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/project.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/project.rs) + +Line 48. + +## Source + +[`src/rest/namespaces/project.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/project.rs) + +Line 27. diff --git a/fern/products/sdk-reference/rust/rest/namespaces/queues/index.mdx b/fern/products/sdk-reference/rust/rest/namespaces/queues/index.mdx new file mode 100644 index 0000000000..48a1c3627c --- /dev/null +++ b/fern/products/sdk-reference/rust/rest/namespaces/queues/index.mdx @@ -0,0 +1,275 @@ +--- +slug: "/reference/rust/rest/namespaces/queues" +title: "queues" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::queues" + parent: "signalwire::rest::namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/queues.rs" + visibility: "public" +--- +# `queues` + +Queues namespace. + +Mirrors `signalwire.rest.namespaces.queues.QueuesResource`. CRUD over +`/api/relay/rest/queues` plus the queue-member operations. + +## Signature + +```rust +struct Queues { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/queues.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/queues.rs) + +Line 25. + +*** + +### create + +#### Signature + +```rust +fn create(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/queues.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/queues.rs) + +Line 49. + +*** + +### delete + +#### Signature + +```rust +fn delete(&self, queue_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/queues.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/queues.rs) + +Line 67. + +*** + +### get + +#### Signature + +```rust +fn get(&self, queue_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/queues.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/queues.rs) + +Line 53. + +*** + +### get\_member + +#### Signature + +```rust +fn get_member(&self, queue_id: &str, member_id: &str) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/queues.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/queues.rs) + +Line 90. + +*** + +### get\_next\_member + +#### Signature + +```rust +fn get_next_member(&self, queue_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/queues.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/queues.rs) + +Line 82. + +*** + +### list + +#### Signature + +```rust +fn list(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/queues.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/queues.rs) + +Line 44. + +*** + +### list\_members + +#### Signature + +```rust +fn list_members(&self, queue_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/queues.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/queues.rs) + +Line 72. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/queues.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/queues.rs) + +Line 18. + +*** + +### update + +#### Signature + +```rust +fn update(&self, queue_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/queues.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/queues.rs) + +Line 58. + +## Source + +[`src/rest/namespaces/queues.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/queues.rs) + +Line 12. diff --git a/fern/products/sdk-reference/rust/rest/namespaces/registry/index.mdx b/fern/products/sdk-reference/rust/rest/namespaces/registry/index.mdx new file mode 100644 index 0000000000..b4afcd9969 --- /dev/null +++ b/fern/products/sdk-reference/rust/rest/namespaces/registry/index.mdx @@ -0,0 +1,157 @@ +--- +slug: "/reference/rust/rest/namespaces/registry" +title: "registry" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::registry" + parent: "signalwire::rest::namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs" + visibility: "public" +--- +# `registry` + +10DLC Campaign Registry namespace — brands, campaigns, orders, numbers. + +Mirrors `signalwire.rest.namespaces.registry.RegistryNamespace`. Every +sub-resource lives under `/api/relay/rest/registry/beta`. + +## Signature + +```rust +struct Registry { /* fields */ } +``` + +## Methods + +### brands + +#### Signature + +```rust +fn brands(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) + +Line 57. + +*** + +### campaigns + +#### Signature + +```rust +fn campaigns(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) + +Line 61. + +*** + +### client + +#### Signature + +```rust +fn client(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) + +Line 53. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) + +Line 49. + +*** + +### numbers + +#### Signature + +```rust +fn numbers(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) + +Line 69. + +*** + +### orders + +#### Signature + +```rust +fn orders(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) + +Line 65. + +## Source + +[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) + +Line 44. diff --git a/fern/products/sdk-reference/rust/rest/namespaces/registry/index__2.mdx b/fern/products/sdk-reference/rust/rest/namespaces/registry/index__2.mdx new file mode 100644 index 0000000000..4d78d86d99 --- /dev/null +++ b/fern/products/sdk-reference/rust/rest/namespaces/registry/index__2.mdx @@ -0,0 +1,26 @@ +--- +slug: "/reference/rust/rest/namespaces/registry/index__2" +title: "registry" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "rest.namespaces.registry" + parent: "signalwire::rest::namespaces" + module: "rest.namespaces" +--- +# `registry` + +## Classes + + + + + + + + + + diff --git a/fern/products/sdk-reference/rust/rest/namespaces/registry/registry-brands/index.mdx b/fern/products/sdk-reference/rust/rest/namespaces/registry/registry-brands/index.mdx new file mode 100644 index 0000000000..91c7f26dc7 --- /dev/null +++ b/fern/products/sdk-reference/rust/rest/namespaces/registry/registry-brands/index.mdx @@ -0,0 +1,198 @@ +--- +slug: "/reference/rust/rest/namespaces/registry/registry-brands" +title: "RegistryBrands" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::registry::RegistryBrands" + parent: "rest.namespaces.registry" + module: "rest.namespaces.registry" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs" + visibility: "public" +--- +# `RegistryBrands` + +## Signature + +```rust +struct RegistryBrands { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) + +Line 91. + +*** + +### create + +#### Signature + +```rust +fn create(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) + +Line 100. + +*** + +### create\_campaign + +#### Signature + +```rust +fn create_campaign(&self, brand_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) + +Line 119. + +*** + +### get + +#### Signature + +```rust +fn get(&self, brand_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) + +Line 104. + +*** + +### list + +#### Signature + +```rust +fn list(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) + +Line 95. + +*** + +### list\_campaigns + +#### Signature + +```rust +fn list_campaigns(&self, brand_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) + +Line 109. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, base_path: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) + +Line 84. + +## Source + +[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) + +Line 78. diff --git a/fern/products/sdk-reference/rust/rest/namespaces/registry/registry-campaigns/index.mdx b/fern/products/sdk-reference/rust/rest/namespaces/registry/registry-campaigns/index.mdx new file mode 100644 index 0000000000..ab49250b84 --- /dev/null +++ b/fern/products/sdk-reference/rust/rest/namespaces/registry/registry-campaigns/index.mdx @@ -0,0 +1,202 @@ +--- +slug: "/reference/rust/rest/namespaces/registry/registry-campaigns" +title: "RegistryCampaigns" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::registry::RegistryCampaigns" + parent: "rest.namespaces.registry" + module: "rest.namespaces.registry" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs" + visibility: "public" +--- +# `RegistryCampaigns` + +## Signature + +```rust +struct RegistryCampaigns { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) + +Line 146. + +*** + +### create\_order + +#### Signature + +```rust +fn create_order(&self, campaign_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) + +Line 184. + +*** + +### get + +#### Signature + +```rust +fn get(&self, campaign_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) + +Line 150. + +*** + +### list\_numbers + +#### Signature + +```rust +fn list_numbers(&self, campaign_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) + +Line 164. + +*** + +### list\_orders + +#### Signature + +```rust +fn list_orders(&self, campaign_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) + +Line 174. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, base_path: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) + +Line 139. + +*** + +### update + +#### Signature + +```rust +fn update(&self, campaign_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) + +Line 155. + +## Source + +[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) + +Line 133. diff --git a/fern/products/sdk-reference/rust/rest/namespaces/registry/registry-numbers/index.mdx b/fern/products/sdk-reference/rust/rest/namespaces/registry/registry-numbers/index.mdx new file mode 100644 index 0000000000..0925ede6eb --- /dev/null +++ b/fern/products/sdk-reference/rust/rest/namespaces/registry/registry-numbers/index.mdx @@ -0,0 +1,98 @@ +--- +slug: "/reference/rust/rest/namespaces/registry/registry-numbers" +title: "RegistryNumbers" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::registry::RegistryNumbers" + parent: "rest.namespaces.registry" + module: "rest.namespaces.registry" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs" + visibility: "public" +--- +# `RegistryNumbers` + +## Signature + +```rust +struct RegistryNumbers { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) + +Line 238. + +*** + +### delete + +#### Signature + +```rust +fn delete(&self, number_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) + +Line 242. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, base_path: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) + +Line 231. + +## Source + +[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) + +Line 225. diff --git a/fern/products/sdk-reference/rust/rest/namespaces/registry/registry-orders/index.mdx b/fern/products/sdk-reference/rust/rest/namespaces/registry/registry-orders/index.mdx new file mode 100644 index 0000000000..635acd9030 --- /dev/null +++ b/fern/products/sdk-reference/rust/rest/namespaces/registry/registry-orders/index.mdx @@ -0,0 +1,98 @@ +--- +slug: "/reference/rust/rest/namespaces/registry/registry-orders" +title: "RegistryOrders" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::registry::RegistryOrders" + parent: "rest.namespaces.registry" + module: "rest.namespaces.registry" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs" + visibility: "public" +--- +# `RegistryOrders` + +## Signature + +```rust +struct RegistryOrders { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) + +Line 211. + +*** + +### get + +#### Signature + +```rust +fn get(&self, order_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) + +Line 215. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, base_path: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) + +Line 204. + +## Source + +[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) + +Line 198. diff --git a/fern/products/sdk-reference/rust/rest/namespaces/sip-profile/index.mdx b/fern/products/sdk-reference/rust/rest/namespaces/sip-profile/index.mdx new file mode 100644 index 0000000000..bc345130ee --- /dev/null +++ b/fern/products/sdk-reference/rust/rest/namespaces/sip-profile/index.mdx @@ -0,0 +1,30 @@ +--- +slug: "/reference/rust/rest/namespaces/sip-profile" +title: "sip_profile" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::rest::namespaces::sip_profile" + parent: "signalwire::rest::namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/sip_profile.rs" + visibility: "public" +--- +# `sip_profile` + +## Classes + + + + SIP Profile (singleton resource) namespace. + + + +## Source + +[`src/rest/namespaces/sip_profile.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/sip_profile.rs) + +Line 1. diff --git a/fern/products/sdk-reference/rust/rest/namespaces/sip-profile/sip-profile/index.mdx b/fern/products/sdk-reference/rust/rest/namespaces/sip-profile/sip-profile/index.mdx new file mode 100644 index 0000000000..75b4ee8f22 --- /dev/null +++ b/fern/products/sdk-reference/rust/rest/namespaces/sip-profile/sip-profile/index.mdx @@ -0,0 +1,126 @@ +--- +slug: "/reference/rust/rest/namespaces/sip-profile/sip-profile" +title: "SipProfile" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::sip_profile::SipProfile" + parent: "signalwire::rest::namespaces::sip_profile" + module: "rest.namespaces.sip_profile" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/sip_profile.rs" + visibility: "public" +--- +# `SipProfile` + +SIP Profile (singleton resource) namespace. + +Mirrors `signalwire.rest.namespaces.sip_profile.SipProfileResource`. +Rooted at `/api/relay/rest/sip_profile` (singular) — the project has +exactly one SIP profile, so there is no list/create/delete. + +## Signature + +```rust +struct SipProfile { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/sip_profile.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/sip_profile.rs) + +Line 24. + +*** + +### get + +GET /api/relay/rest/sip\_profile — fetch the current profile. + +#### Signature + +```rust +fn get(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/sip_profile.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/sip_profile.rs) + +Line 29. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/sip_profile.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/sip_profile.rs) + +Line 17. + +*** + +### update + +PUT /api/relay/rest/sip\_profile — update the SIP profile. + +#### Signature + +```rust +fn update(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/sip_profile.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/sip_profile.rs) + +Line 34. + +## Source + +[`src/rest/namespaces/sip_profile.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/sip_profile.rs) + +Line 11. diff --git a/fern/products/sdk-reference/rust/rest/namespaces/video/index.mdx b/fern/products/sdk-reference/rust/rest/namespaces/video/index.mdx new file mode 100644 index 0000000000..ae22dda4f6 --- /dev/null +++ b/fern/products/sdk-reference/rust/rest/namespaces/video/index.mdx @@ -0,0 +1,219 @@ +--- +slug: "/reference/rust/rest/namespaces/video" +title: "video" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::video" + parent: "signalwire::rest::namespaces" + module: "rest.namespaces" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs" + visibility: "public" +--- +# `video` + +Video API namespace — rooms, sessions, recordings, conferences, tokens, +streams. + +Mirrors `signalwire.rest.namespaces.video.VideoNamespace` from the Python +SDK. Each sub-resource exposes the methods present on the upstream +Python class. + +## Signature + +```rust +struct Video { /* fields */ } +``` + +## Methods + +### client + +#### Signature + +```rust +fn client(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 55. + +*** + +### conference\_tokens + +#### Signature + +```rust +fn conference_tokens(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 79. + +*** + +### conferences + +#### Signature + +```rust +fn conferences(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 75. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 51. + +*** + +### room\_recordings + +#### Signature + +```rust +fn room_recordings(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 71. + +*** + +### room\_sessions + +#### Signature + +```rust +fn room_sessions(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 67. + +*** + +### room\_tokens + +#### Signature + +```rust +fn room_tokens(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 63. + +*** + +### rooms + +#### Signature + +```rust +fn rooms(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 59. + +*** + +### streams + +#### Signature + +```rust +fn streams(&self) -> ?<'a> +``` + +#### Returns + +`?<'a>` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 83. + +## Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 46. diff --git a/fern/products/sdk-reference/rust/rest/namespaces/video/index__2.mdx b/fern/products/sdk-reference/rust/rest/namespaces/video/index__2.mdx new file mode 100644 index 0000000000..2166008050 --- /dev/null +++ b/fern/products/sdk-reference/rust/rest/namespaces/video/index__2.mdx @@ -0,0 +1,32 @@ +--- +slug: "/reference/rust/rest/namespaces/video/index__2" +title: "video" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "rest.namespaces.video" + parent: "signalwire::rest::namespaces" + module: "rest.namespaces" +--- +# `video` + +## Classes + + + + + + + + + + + + + + + + diff --git a/fern/products/sdk-reference/rust/rest/namespaces/video/video-conference-tokens/index.mdx b/fern/products/sdk-reference/rust/rest/namespaces/video/video-conference-tokens/index.mdx new file mode 100644 index 0000000000..c7de5548b4 --- /dev/null +++ b/fern/products/sdk-reference/rust/rest/namespaces/video/video-conference-tokens/index.mdx @@ -0,0 +1,124 @@ +--- +slug: "/reference/rust/rest/namespaces/video/video-conference-tokens" +title: "VideoConferenceTokens" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::video::VideoConferenceTokens" + parent: "rest.namespaces.video" + module: "rest.namespaces.video" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs" + visibility: "public" +--- +# `VideoConferenceTokens` + +## Signature + +```rust +struct VideoConferenceTokens { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 389. + +*** + +### get + +#### Signature + +```rust +fn get(&self, token_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 393. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, base_path: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 382. + +*** + +### reset + +POST \{base\}/\{id\}/reset — no-body POST per Python. + +#### Signature + +```rust +fn reset(&self, token_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 399. + +## Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 376. diff --git a/fern/products/sdk-reference/rust/rest/namespaces/video/video-conferences/index.mdx b/fern/products/sdk-reference/rust/rest/namespaces/video/video-conferences/index.mdx new file mode 100644 index 0000000000..7b636d4673 --- /dev/null +++ b/fern/products/sdk-reference/rust/rest/namespaces/video/video-conferences/index.mdx @@ -0,0 +1,274 @@ +--- +slug: "/reference/rust/rest/namespaces/video/video-conferences" +title: "VideoConferences" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::video::VideoConferences" + parent: "rest.namespaces.video" + module: "rest.namespaces.video" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs" + visibility: "public" +--- +# `VideoConferences` + +## Signature + +```rust +struct VideoConferences { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 310. + +*** + +### create + +#### Signature + +```rust +fn create(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 319. + +*** + +### create\_stream + +#### Signature + +```rust +fn create_stream(&self, conference_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 362. + +*** + +### delete + +#### Signature + +```rust +fn delete(&self, conference_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 337. + +*** + +### get + +#### Signature + +```rust +fn get(&self, conference_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 323. + +*** + +### list + +#### Signature + +```rust +fn list(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 314. + +*** + +### list\_conference\_tokens + +#### Signature + +```rust +fn list_conference_tokens(&self, conference_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 342. + +*** + +### list\_streams + +#### Signature + +```rust +fn list_streams(&self, conference_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 352. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, base_path: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 303. + +*** + +### update + +#### Signature + +```rust +fn update(&self, conference_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 328. + +## Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 297. diff --git a/fern/products/sdk-reference/rust/rest/namespaces/video/video-room-recordings/index.mdx b/fern/products/sdk-reference/rust/rest/namespaces/video/video-room-recordings/index.mdx new file mode 100644 index 0000000000..f1a60c4f3d --- /dev/null +++ b/fern/products/sdk-reference/rust/rest/namespaces/video/video-room-recordings/index.mdx @@ -0,0 +1,172 @@ +--- +slug: "/reference/rust/rest/namespaces/video/video-room-recordings" +title: "VideoRoomRecordings" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::video::VideoRoomRecordings" + parent: "rest.namespaces.video" + module: "rest.namespaces.video" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs" + visibility: "public" +--- +# `VideoRoomRecordings` + +## Signature + +```rust +struct VideoRoomRecordings { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 263. + +*** + +### delete + +#### Signature + +```rust +fn delete(&self, recording_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 277. + +*** + +### get + +#### Signature + +```rust +fn get(&self, recording_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 272. + +*** + +### list + +#### Signature + +```rust +fn list(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 267. + +*** + +### list\_events + +#### Signature + +```rust +fn list_events(&self, recording_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 282. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, base_path: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 256. + +## Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 250. diff --git a/fern/products/sdk-reference/rust/rest/namespaces/video/video-room-sessions/index.mdx b/fern/products/sdk-reference/rust/rest/namespaces/video/video-room-sessions/index.mdx new file mode 100644 index 0000000000..25109e03d3 --- /dev/null +++ b/fern/products/sdk-reference/rust/rest/namespaces/video/video-room-sessions/index.mdx @@ -0,0 +1,200 @@ +--- +slug: "/reference/rust/rest/namespaces/video/video-room-sessions" +title: "VideoRoomSessions" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::video::VideoRoomSessions" + parent: "rest.namespaces.video" + module: "rest.namespaces.video" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs" + visibility: "public" +--- +# `VideoRoomSessions` + +## Signature + +```rust +struct VideoRoomSessions { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 201. + +*** + +### get + +#### Signature + +```rust +fn get(&self, session_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 210. + +*** + +### list + +#### Signature + +```rust +fn list(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 205. + +*** + +### list\_events + +#### Signature + +```rust +fn list_events(&self, session_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 215. + +*** + +### list\_members + +#### Signature + +```rust +fn list_members(&self, session_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 225. + +*** + +### list\_recordings + +#### Signature + +```rust +fn list_recordings(&self, session_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 235. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, base_path: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 194. + +## Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 188. diff --git a/fern/products/sdk-reference/rust/rest/namespaces/video/video-room-tokens/index.mdx b/fern/products/sdk-reference/rust/rest/namespaces/video/video-room-tokens/index.mdx new file mode 100644 index 0000000000..4a93570668 --- /dev/null +++ b/fern/products/sdk-reference/rust/rest/namespaces/video/video-room-tokens/index.mdx @@ -0,0 +1,98 @@ +--- +slug: "/reference/rust/rest/namespaces/video/video-room-tokens" +title: "VideoRoomTokens" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::video::VideoRoomTokens" + parent: "rest.namespaces.video" + module: "rest.namespaces.video" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs" + visibility: "public" +--- +# `VideoRoomTokens` + +## Signature + +```rust +struct VideoRoomTokens { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 175. + +*** + +### create + +#### Signature + +```rust +fn create(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 179. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, base_path: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 168. + +## Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 162. diff --git a/fern/products/sdk-reference/rust/rest/namespaces/video/video-rooms/index.mdx b/fern/products/sdk-reference/rust/rest/namespaces/video/video-rooms/index.mdx new file mode 100644 index 0000000000..d5b42f7383 --- /dev/null +++ b/fern/products/sdk-reference/rust/rest/namespaces/video/video-rooms/index.mdx @@ -0,0 +1,250 @@ +--- +slug: "/reference/rust/rest/namespaces/video/video-rooms" +title: "VideoRooms" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::video::VideoRooms" + parent: "rest.namespaces.video" + module: "rest.namespaces.video" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs" + visibility: "public" +--- +# `VideoRooms` + +## Signature + +```rust +struct VideoRooms { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 105. + +*** + +### create + +#### Signature + +```rust +fn create(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 114. + +*** + +### create\_stream + +#### Signature + +```rust +fn create_stream(&self, room_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 148. + +*** + +### delete + +#### Signature + +```rust +fn delete(&self, room_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 133. + +*** + +### get + +#### Signature + +```rust +fn get(&self, room_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 118. + +*** + +### list + +#### Signature + +```rust +fn list(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 109. + +*** + +### list\_streams + +#### Signature + +```rust +fn list_streams(&self, room_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 138. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, base_path: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 98. + +*** + +### update + +VideoRooms uses PUT for update. + +#### Signature + +```rust +fn update(&self, room_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 124. + +## Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 92. diff --git a/fern/products/sdk-reference/rust/rest/namespaces/video/video-streams/index.mdx b/fern/products/sdk-reference/rust/rest/namespaces/video/video-streams/index.mdx new file mode 100644 index 0000000000..22593c2332 --- /dev/null +++ b/fern/products/sdk-reference/rust/rest/namespaces/video/video-streams/index.mdx @@ -0,0 +1,148 @@ +--- +slug: "/reference/rust/rest/namespaces/video/video-streams" +title: "VideoStreams" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::namespaces::video::VideoStreams" + parent: "rest.namespaces.video" + module: "rest.namespaces.video" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs" + visibility: "public" +--- +# `VideoStreams` + +## Signature + +```rust +struct VideoStreams { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 422. + +*** + +### delete + +#### Signature + +```rust +fn delete(&self, stream_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 440. + +*** + +### get + +#### Signature + +```rust +fn get(&self, stream_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 426. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, base_path: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 415. + +*** + +### update + +#### Signature + +```rust +fn update(&self, stream_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 431. + +## Source + +[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) + +Line 409. diff --git a/fern/products/sdk-reference/rust/rest/pagination/index.mdx b/fern/products/sdk-reference/rust/rest/pagination/index.mdx new file mode 100644 index 0000000000..e66d42d3fa --- /dev/null +++ b/fern/products/sdk-reference/rust/rest/pagination/index.mdx @@ -0,0 +1,37 @@ +--- +slug: "/reference/rust/rest/pagination" +title: "pagination" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "signalwire::rest::pagination" + parent: "signalwire::rest" + module: "rest" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/pagination.rs" + visibility: "public" +--- +# `pagination` + +Paginated iterator over `links.next`-cursor responses. + +Mirrors `signalwire.rest._pagination.PaginatedIterator` from the Python +SDK. Construction is lazy — no HTTP is dispatched until the iterator is +first stepped. Each fetch follows the response's `links.next` cursor; +when the cursor is empty/missing, the iterator is exhausted. + +## Classes + + + + Streaming iterator that walks a `links.next`-paginated REST endpoint. + + + +## Source + +[`src/rest/pagination.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/pagination.rs) + +Line 7. diff --git a/fern/products/sdk-reference/rust/rest/pagination/paginated-iterator/index.mdx b/fern/products/sdk-reference/rust/rest/pagination/paginated-iterator/index.mdx new file mode 100644 index 0000000000..7d01108bac --- /dev/null +++ b/fern/products/sdk-reference/rust/rest/pagination/paginated-iterator/index.mdx @@ -0,0 +1,267 @@ +--- +slug: "/reference/rust/rest/pagination/paginated-iterator" +title: "PaginatedIterator" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "class" + language: "rust" + qualified_name: "signalwire::rest::pagination::PaginatedIterator" + parent: "signalwire::rest::pagination" + module: "rest.pagination" + source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/pagination.rs" + visibility: "public" +--- +# `PaginatedIterator` + +Streaming iterator that walks a `links.next`-paginated REST endpoint. + +Holds a borrowed reference to the \[`HttpClient`] for the duration of +iteration. Use the \[`Iterator`] impl (`for item in it { ... }`) or +step manually via \[`PaginatedIterator::next_item`]. + +## Signature + +```rust +struct PaginatedIterator { /* fields */ } +``` + +## Inheritance + +**Implements:** `Iterator` + +## Methods + +### data\_key + +#### Signature + +```rust +fn data_key(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/pagination.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/pagination.rs) + +Line 79. + +*** + +### http + +#### Signature + +```rust +fn http(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/rest/pagination.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/pagination.rs) + +Line 67. + +*** + +### index + +#### Signature + +```rust +fn index(&self) -> usize +``` + +#### Returns + +`usize` + +#### Source + +[`src/rest/pagination.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/pagination.rs) + +Line 83. + +*** + +### is\_done + +#### Signature + +```rust +fn is_done(&self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/rest/pagination.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/pagination.rs) + +Line 91. + +*** + +### items + +#### Signature + +```rust +fn items(&self) -> &[?] +``` + +#### Returns + +`&[?]` + +#### Source + +[`src/rest/pagination.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/pagination.rs) + +Line 87. + +*** + +### new + +Construct a new iterator. + +`params` and `data_key` mirror the Python signature: the body field +containing the items array is named `data_key` (typically `"data"`), +and `params` is forwarded on the first GET. + +#### Signature + +```rust +fn new(http: &'a ?, path: &str, params: ?, data_key: &str) -> Self +``` + +#### Parameters + + + + + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/pagination.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/pagination.rs) + +Line 48. + +*** + +### next + +#### Signature + +```rust +fn next(&mut self) -> ?<::Item> +``` + +#### Returns + +`?<::Item>` + +#### Source + +[`src/rest/pagination.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/pagination.rs) + +Line 161. + +*** + +### next\_item + +Fetch the next item, dispatching a new page request if needed. +Returns `Ok(None)` when the cursor is exhausted. + +#### Signature + +```rust +fn next_item(&mut self) -> ?, ?> +``` + +#### Returns + +`?, ?>` + +#### Source + +[`src/rest/pagination.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/pagination.rs) + +Line 97. + +*** + +### params + +#### Signature + +```rust +fn params(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/rest/pagination.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/pagination.rs) + +Line 75. + +*** + +### path + +#### Signature + +```rust +fn path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/pagination.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/pagination.rs) + +Line 71. + +## Type Aliases + +### Item + +#### Source + +[`src/rest/pagination.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/pagination.rs) + +Line 159. + +## Source + +[`src/rest/pagination.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/pagination.rs) + +Line 26. diff --git a/fern/products/sdk-reference/rust/signalwire/agent/agent-base/agent-base/index.mdx b/fern/products/sdk-reference/rust/signalwire/agent/agent-base/agent-base/index.mdx deleted file mode 100644 index 13b5c7abfa..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/agent/agent-base/agent-base/index.mdx +++ /dev/null @@ -1,2140 +0,0 @@ ---- -slug: "/reference/rust/signalwire/agent/agent-base/agent-base" -title: "AgentBase" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::agent::agent_base::AgentBase" - parent: "signalwire::agent::agent_base" - module: "agent.agent_base" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs" - visibility: "public" ---- -# `AgentBase` - -Core agent that extends `Service` with AI-specific capabilities. - -Manages prompt configuration, tool registration, SWML rendering, -and HTTP request handling for AI agent endpoints. - -AgentBase implements `Deref` (Rust's idiomatic -equivalent of inheritance) so `Service` methods like `set_route`, -`define_tool`, `on_function_call`, etc. are usable on `AgentBase` -instances directly without needing forwarding wrappers. - -## Signature - -```rust -struct AgentBase { /* fields */ } -``` - -## Inheritance - -**Implements:** `Clone`, `Deref`, `DerefMut` - -## Constants - - - The complete set of internal SWAIG function names that accept fillers, matching the SWAIGInternalFiller schema definition. Any name outside this set is silently ignored by the runtime — \[`Self::set_internal_fillers_map`] and \[`Self::add_internal_filler_for`] warn if you pass an unknown name. Notable absences: `change_step`, `gather_submit`, and arbitrary user-defined SWAIG function names are NOT supported. - - -## Methods - -### add\_function\_include - -#### Signature - -```rust -fn add_function_include(&mut self, include: ?) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 949. - -*** - -### add\_hint - -#### Signature - -```rust -fn add_hint(&mut self, hint: &str) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 710. - -*** - -### add\_hints - -#### Signature - -```rust -fn add_hints(&mut self, hints: ?<&str>) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 715. - -*** - -### add\_internal\_filler - -#### Signature - -```rust -fn add_internal_filler(&mut self, filler: &str) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 911. - -*** - -### add\_internal\_filler\_for - -Add internal fillers for a single internal function and language. - -See \[`Self::set_internal_fillers_map`] for the complete list of -supported `function_name` values -(\[`Self::SUPPORTED_INTERNAL_FILLER_NAMES`]) and what fillers do. -Names outside the supported set log a warning. - -#### Signature - -```rust -fn add_internal_filler_for( - &mut self, - function_name: &str, - language_code: &str, - fillers: ? -) -> &mut Self -``` - -#### Parameters - - - - - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 922. - -*** - -### add\_language - -#### Signature - -```rust -fn add_language(&mut self, name: &str, code: &str, voice: &str) -> &mut Self -``` - -#### Parameters - - - - - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 727. - -*** - -### add\_pattern\_hint - -#### Signature - -```rust -fn add_pattern_hint(&mut self, pattern: &str) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 722. - -*** - -### add\_post\_ai\_verb - -#### Signature - -```rust -fn add_post_ai_verb(&mut self, verb: &str, config: ?) -> &mut Self -``` - -#### Parameters - - - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 987. - -*** - -### add\_post\_answer\_verb - -#### Signature - -```rust -fn add_post_answer_verb(&mut self, verb: &str, config: ?) -> &mut Self -``` - -#### Parameters - - - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 982. - -*** - -### add\_pre\_answer\_verb - -#### Signature - -```rust -fn add_pre_answer_verb(&mut self, verb: &str, config: ?) -> &mut Self -``` - -#### Parameters - - - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 977. - -*** - -### add\_pronunciation - -#### Signature - -```rust -fn add_pronunciation( - &mut self, - replace: &str, - with: &str, - ignore: &str -) -> &mut Self -``` - -#### Parameters - - - - - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 789. - -*** - -### add\_skill - -#### Signature - -```rust -fn add_skill(&mut self, name: &str, params: ?) -> &mut Self -``` - -#### Parameters - - - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 1063. - -*** - -### add\_swaig\_query\_params - -#### Signature - -```rust -fn add_swaig_query_params(&mut self, params: ?) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 1170. - -*** - -### build\_ai\_verb - -Build the AI verb configuration block. - -#### Signature - -```rust -fn build_ai_verb(&self, headers: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 1282. - -*** - -### clear\_post\_ai\_verbs - -#### Signature - -```rust -fn clear_post_ai_verbs(&mut self) -> &mut Self -``` - -#### Returns - -`&mut Self` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 1002. - -*** - -### clear\_post\_answer\_verbs - -#### Signature - -```rust -fn clear_post_answer_verbs(&mut self) -> &mut Self -``` - -#### Returns - -`&mut Self` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 997. - -*** - -### clear\_pre\_answer\_verbs - -#### Signature - -```rust -fn clear_pre_answer_verbs(&mut self) -> &mut Self -``` - -#### Returns - -`&mut Self` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 992. - -*** - -### clear\_swaig\_query\_params - -#### Signature - -```rust -fn clear_swaig_query_params(&mut self) -> &mut Self -``` - -#### Returns - -`&mut Self` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 1177. - -*** - -### clone - -#### Signature - -```rust -fn clone(&self) -> Self -``` - -#### Returns - -`Self` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 254. - -*** - -### clone\_for\_request - -Create a deep copy of this agent for per-request customisation. - -#### Signature - -```rust -fn clone_for_request(&self) -> Self -``` - -#### Returns - -`Self` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 1504. - -*** - -### create\_tool\_token - -Mint a per-call SWAIG-function token via the agent's SessionManager. - -Python parity: `state_mixin.StateMixin._create_tool_token` — -delegates to `SessionManager::create_token` and returns `String::new()` -on failure (Python catches all exceptions and returns ""). - -#### Signature - -```rust -fn create_tool_token(&self, tool_name: &str, call_id: &str) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 426. - -*** - -### define\_contexts - -Return the ContextBuilder, creating it lazily on first access. - -The builder's tool-name supplier is set to a snapshot of the -currently registered tool names so \[`ContextBuilder::validate`] -can check for collisions with reserved native tool names -(`next_step`, `change_context`, `gather_submit`). Tools added to -the agent after the first `define_contexts()` call will not be -included in that snapshot — call \[`AgentBase::refresh_context_tools`] -to update it, or call `define_contexts` only after defining all -tools. - -#### Signature - -```rust -fn define_contexts(&mut self) -> &mut ? -``` - -#### Returns - -`&mut ?` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 1021. - -*** - -### define\_tools - -Register a SWAIG tool (function) that the AI can invoke during a -call. - -### How this becomes a tool the model sees - -A SWAIG function is **exactly the same concept** as a "tool" in -native OpenAI / Anthropic tool calling. On every LLM turn, the -SDK renders each registered SWAIG function into the OpenAI tool -schema: - -```text -{ - "type": "function", - "function": { - "name": "your_name_here", - "description": "your description text", - "parameters": { ... your JSON schema ... } - } -} -``` - -That schema is sent to the model as part of the same API call -that produces the next assistant message. The model reads: - -- the function `description` to decide WHEN to call this tool -- each parameter `description` (inside `parameters`) to decide - HOW to fill in that argument from the user's utterance - -This means **descriptions are prompt engineering**, not developer -comments. A vague description is the #1 cause of "the model has -the right tool but doesn't call it" failures. - -### Bad vs good descriptions - -```text -BAD : description: "Lookup function" -GOOD: description: "Look up a customer's account details by " - + "account number. Use this BEFORE quoting any " - + "account-specific info (balance, plan, status). " - + "Do not use for general product questions." - -BAD : parameters: json!({"id": {"type": "string", "description": "the id"}}) -GOOD: parameters: json!({"account_number": {"type": "string", - "description": "The customer's 8-digit account number, " - "no dashes or spaces. Ask the user if they " - "don't provide it."}}) -``` - -### Tool count matters - -LLM tool selection accuracy degrades past ~7-8 -simultaneously-active tools per call. Use -\[`crate::contexts::Step::set_functions`] to partition tools -across steps so only the relevant subset is active at any moment. -Convenience: register multiple raw SWAIG function descriptors. -Wraps the inherited `register_swaig_function` for each. - -#### Signature - -```rust -fn define_tools(&mut self, tool_defs: ?) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Examples - - - - ```rust - { - "type": "function", - "function": { - "name": "your_name_here", - "description": "your description text", - "parameters": { ... your JSON schema ... } - } - } - ``` - - - - ```rust - BAD : description: "Lookup function" - GOOD: description: "Look up a customer's account details by " - + "account number. Use this BEFORE quoting any " - + "account-specific info (balance, plan, status). " - + "Do not use for general product questions." - - BAD : parameters: json!({"id": {"type": "string", "description": "the id"}}) - GOOD: parameters: json!({"account_number": {"type": "string", - "description": "The customer's 8-digit account number, " - "no dashes or spaces. Ask the user if they " - "don't provide it."}}) - ``` - - - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 699. - -*** - -### deref - -#### Signature - -```rust -fn deref(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 316. - -*** - -### deref\_mut - -#### Signature - -```rust -fn deref_mut(&mut self) -> &mut ? -``` - -#### Returns - -`&mut ?` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 322. - -*** - -### enable\_debug\_events - -#### Signature - -```rust -fn enable_debug_events(&mut self, level: &str) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 944. - -*** - -### enable\_sip\_routing - -#### Signature - -```rust -fn enable_sip_routing(&mut self) -> &mut Self -``` - -#### Returns - -`&mut Self` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 1206. - -*** - -### get\_basic\_auth\_credentials - -Return `(user, password)` for the agent's basic auth. - -#### Signature - -```rust -fn get_basic_auth_credentials(&self) -> (?, ?) -``` - -#### Returns - -`(?, ?)` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 1712. - -*** - -### get\_contexts - -Returns the contexts dictionary as a serialised `Value::Object`, -or `None` when no contexts have been defined yet. - -Mirrors Python's `PromptManager.get_contexts` which returns the -contexts dict or `None`. - -#### Signature - -```rust -fn get_contexts(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 629. - -*** - -### get\_language\_params - -Read the per-language `params` dict for a previously-added -language. Mirrors Python's `AIConfigMixin.get_language_params`. - -Returns `Some(&Value)` (always a JSON object) when params were set, -`None` otherwise — including when the language code is unknown. -No error path. - -#### Signature - -```rust -fn get_language_params(&self, code: &str) -> ?<&?> -``` - -#### Parameters - - - -#### Returns - -`?<&?>` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 775. - -*** - -### get\_post\_prompt - -Returns the post-prompt text whatever `set_post_prompt` stored, or -`None` when no post-prompt has been set. - -Mirrors Python's `PromptManager.get_post_prompt` / -`PromptMixin.get_post_prompt` — used by SWML rendering when a -post-prompt is configured. - -#### Signature - -```rust -fn get_post_prompt(&self) -> ?<&str> -``` - -#### Returns - -`?<&str>` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 590. - -*** - -### get\_prompt - -Return the prompt payload: POM array if enabled and populated, otherwise raw text. - -#### Signature - -```rust -fn get_prompt(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 548. - -*** - -### get\_raw\_prompt - -Returns the raw prompt text whatever `set_prompt_text` stored, or -`None` when no raw prompt has been set. Distinct from `get_prompt` -which may return the POM array when `use_pom` is `true`. - -Mirrors Python's `PromptManager.get_raw_prompt`. - -#### Signature - -```rust -fn get_raw_prompt(&self) -> ?<&str> -``` - -#### Returns - -`?<&str>` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 603. - -*** - -### handle\_request - -Handle an HTTP request. Overrides the service handler with agent-specific -logic for SWML, SWAIG dispatch, and post-prompt callbacks. - -#### Signature - -```rust -fn handle_request( - &self, - method: &str, - path: &str, - headers: &?, - body: &str -) -> (u16, ?, ?) -``` - -#### Parameters - - - - - - - - - -#### Returns - -`(u16, ?, ?)` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 1391. - -*** - -### has\_skill - -#### Signature - -```rust -fn has_skill(&self, name: &str) -> bool -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 1135. - -*** - -### list\_skills - -#### Signature - -```rust -fn list_skills(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 1131. - -*** - -### list\_tool\_names - -Return the names of every registered SWAIG tool in insertion order. - -#### Signature - -```rust -fn list_tool_names(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 1044. - -*** - -### manual\_set\_proxy\_url - -#### Signature - -```rust -fn manual_set_proxy_url(&mut self, url: &str) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 1165. - -*** - -### new - -#### Signature - -```rust -fn new(options: ?) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 328. - -*** - -### on\_debug\_event - -#### Signature - -```rust -fn on_debug_event(&mut self, callback: ?) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 1192. - -*** - -### on\_summary - -#### Signature - -```rust -fn on_summary(&mut self, callback: ?) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 1182. - -*** - -### pom - -Read-only snapshot of the agent's POM as a typed -\[`PromptObjectModel`]. - -Python parity: `agent.pom` instance attribute (agent\_base.py -line 209). Returns `None` when `use_pom` is `false` (mirroring -Python's `self.pom = None`); otherwise returns a freshly built -\[`PromptObjectModel`] populated from the agent's stored -section list. - -Returning a typed POM (rather than the raw `Vec`) lets -callers reach for `render_markdown` / `render_xml` / `to_json` -directly without re-implementing the renderers — matching -Python's `agent.pom.render_markdown()` ergonomics. - -#### Signature - -```rust -fn pom(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 569. - -*** - -### prompt\_add\_section - -Add a top-level POM section with an optional body and bullets. - -#### Signature - -```rust -fn prompt_add_section( - &mut self, - title: &str, - body: &str, - bullets: ?<&str> -) -> &mut Self -``` - -#### Parameters - - - - - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 462. - -*** - -### prompt\_add\_subsection - -Add a subsection nested under an existing parent section. - -#### Signature - -```rust -fn prompt_add_subsection( - &mut self, - parent_title: &str, - title: &str, - body: &str -) -> &mut Self -``` - -#### Parameters - - - - - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 480. - -*** - -### prompt\_add\_to\_section - -Append body text and/or bullets to an existing section. - -#### Signature - -```rust -fn prompt_add_to_section( - &mut self, - title: &str, - body: ?<&str>, - bullets: ?<&str> -) -> &mut Self -``` - -#### Parameters - - - - - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 503. - -*** - -### prompt\_has\_section - -Check whether a POM section with the given title exists. - -#### Signature - -```rust -fn prompt_has_section(&self, title: &str) -> bool -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 538. - -*** - -### refresh\_context\_tools - -Refresh the ContextBuilder's tool-name supplier with the current -list of registered SWAIG tools. Call this if you define new tools -after the first `define_contexts()` call and want the next -`validate()` to see them. - -#### Signature - -```rust -fn refresh_context_tools(&mut self) -> &mut Self -``` - -#### Returns - -`&mut Self` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 1035. - -*** - -### register\_sip\_username - -#### Signature - -```rust -fn register_sip_username(&mut self, username: &str, route: &str) -> &mut Self -``` - -#### Parameters - - - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 1211. - -*** - -### remove\_skill - -#### Signature - -```rust -fn remove_skill(&mut self, name: &str) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 1126. - -*** - -### render\_swml - -Build the complete SWML document for a request. - -Phases: - -1. Pre-answer verbs -2. Answer verb (if auto\_answer) -3. Record call verb (if record\_call) -4. Post-answer verbs -5. AI verb (via build\_ai\_verb) -6. Post-AI verbs - -#### Signature - -```rust -fn render_swml(&self, headers: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 1232. - -*** - -### reset\_contexts - -Remove all contexts, returning the agent to a no-contexts state. -This is a convenience wrapper around `define_contexts().reset()`. -Use it in a dynamic config callback when you need to rebuild -contexts from scratch for a specific request. - -#### Signature - -```rust -fn reset_contexts(&mut self) -> &mut Self -``` - -#### Returns - -`&mut Self` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 1052. - -*** - -### run - -Start a blocking HTTP server on the configured host:port. - -Serves HTTPS instead when `SWML_SSL_ENABLED` is set together with -`SWML_SSL_CERT_PATH` / `SWML_SSL_KEY_PATH` (mirrors Python's -`SecurityConfig` / uvicorn `ssl_*` contract). - -#### Signature - -```rust -fn run(&self) -``` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 1722. - -*** - -### service - -Access the underlying service. - -#### Signature - -```rust -fn service(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 397. - -*** - -### service\_mut - -Access the underlying service mutably. - -#### Signature - -```rust -fn service_mut(&mut self) -> &mut ? -``` - -#### Returns - -`&mut ?` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 402. - -*** - -### set\_dynamic\_config\_callback - -#### Signature - -```rust -fn set_dynamic_config_callback( - &mut self, - callback: ? -) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 1143. - -*** - -### set\_function\_includes - -#### Signature - -```rust -fn set_function_includes(&mut self, includes: ?) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 954. - -*** - -### set\_global\_data - -#### Signature - -```rust -fn set_global_data(&mut self, data: ?) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 822. - -*** - -### set\_internal\_fillers - -#### Signature - -```rust -fn set_internal_fillers(&mut self, fillers: ?<&str>) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 865. - -*** - -### set\_internal\_fillers\_map - -Set internal fillers for native SWAIG functions (structured form). - -Internal fillers are short phrases the AI agent speaks (via TTS) -while an internal/native function is running, so the caller -doesn't hear dead air during transitions or background work. - -Supported function names (match the SWAIGInternalFiller schema): -`hangup`, `check_time`, `wait_for_user`, `wait_seconds`, -`adjust_response_latency`, `next_step`, `change_context`, -`get_visual_input`, `get_ideal_strategy`. See -\[`Self::SUPPORTED_INTERNAL_FILLER_NAMES`]. - -Notably NOT supported: `change_step`, `gather_submit`, or -arbitrary user-defined SWAIG function names. The runtime only -honors fillers for the names listed above; everything else is -silently ignored at the SWML level. This method warns at -registration time if you pass an unknown name so you catch the -typo early. - -#### Signature - -```rust -fn set_internal_fillers_map(&mut self, fillers: ?>>) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 888. - -*** - -### set\_language\_params - -Set (or replace) the per-language `params` dict on an already-added -language. Mirrors Python's `AIConfigMixin.set_language_params` — -engine-specific tuning (voice stability/similarity, model knobs, -etc.) can be attached after the language entry was created. - -Behavior, matching Python: - -- If `params` is a non-empty JSON object, store it under the - `params` key on the matching language entry (replacing any - prior value). -- If `params` is an empty object (or any non-object value), - remove the `params` key (treated as unset). -- If no language with the given code exists, this is a no-op. -- Returns `&mut Self` for chaining. - -Python parity: the per-language params are emitted as the language -object's `params` key in SWML and use snake\_case wire shape. - -#### Signature - -```rust -fn set_language_params(&mut self, code: &str, params: ?) -> &mut Self -``` - -#### Parameters - - - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 749. - -*** - -### set\_languages - -#### Signature - -```rust -fn set_languages(&mut self, languages: ?) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 784. - -*** - -### set\_native\_functions - -#### Signature - -```rust -fn set_native_functions(&mut self, functions: ?<&str>) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 838. - -*** - -### set\_param - -#### Signature - -```rust -fn set_param(&mut self, key: &str, value: ?) -> &mut Self -``` - -#### Parameters - - - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 810. - -*** - -### set\_params - -#### Signature - -```rust -fn set_params(&mut self, params: ?) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 815. - -*** - -### set\_post\_prompt - -#### Signature - -```rust -fn set_post_prompt(&mut self, text: &str) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 456. - -*** - -### set\_post\_prompt\_llm\_params - -#### Signature - -```rust -fn set_post_prompt_llm_params(&mut self, params: ?) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 966. - -*** - -### set\_post\_prompt\_url - -#### Signature - -```rust -fn set_post_prompt_url(&mut self, url: &str) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 1160. - -*** - -### set\_prompt\_llm\_params - -#### Signature - -```rust -fn set_prompt_llm_params(&mut self, params: ?) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 959. - -*** - -### set\_prompt\_pom - -Sets the prompt as a list of POM section objects. Each section -supports keys "title", "body", "bullets", "numbered", -"numbered\_bullets", and "subsections". Switches the agent to POM -mode. - -Mirrors Python's `PromptManager.set_prompt_pom` — accepts a list -of section dicts and stores them in `pom_sections`. - -#### Signature - -```rust -fn set_prompt_pom(&mut self, pom: ?) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 618. - -*** - -### set\_prompt\_text - -#### Signature - -```rust -fn set_prompt_text(&mut self, text: &str) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 451. - -*** - -### set\_pronunciations - -#### Signature - -```rust -fn set_pronunciations(&mut self, pronunciations: ?) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 805. - -*** - -### set\_signing\_key - -Set or clear the signing key after construction. Useful for -tests and dynamic-config flows. Pass an empty string or -`None`-equivalent to disable. - -#### Signature - -```rust -fn set_signing_key(&mut self, key: ?<&str>) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 416. - -*** - -### set\_webhook\_url - -#### Signature - -```rust -fn set_webhook_url(&mut self, url: &str) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 1155. - -*** - -### signing\_key - -Return the signing key resolved from `AgentOptions::signing_key` -or the `SIGNALWIRE_SIGNING_KEY` environment variable. `None` -means signature validation is disabled. - -#### Signature - -```rust -fn signing_key(&self) -> ?<&str> -``` - -#### Returns - -`?<&str>` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 409. - -*** - -### update\_global\_data - -#### Signature - -```rust -fn update_global_data(&mut self, data: ?) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 829. - -*** - -### validate\_tool\_token - -Validate a per-call SWAIG-function token. Returns `false` when the -function is not registered or when the SessionManager rejects the -token. - -Python parity: `state_mixin.StateMixin.validate_tool_token` — -rejects unknown function names up-front. Rust's -`SessionManager::validate_token` returns `bool` (no panics on bad -input — see security/session\_manager.rs), so no try/catch is -required for parity. - -#### Signature - -```rust -fn validate_tool_token( - &self, - function_name: &str, - token: &str, - call_id: &str -) -> bool -``` - -#### Parameters - - - - - - - -#### Returns - -`bool` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 439. - -## Type Aliases - -### Target - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 315. - -## Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 171. diff --git a/fern/products/sdk-reference/rust/signalwire/agent/agent-base/agent-options/index.mdx b/fern/products/sdk-reference/rust/signalwire/agent/agent-base/agent-options/index.mdx deleted file mode 100644 index 4aa8951c56..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/agent/agent-base/agent-options/index.mdx +++ /dev/null @@ -1,349 +0,0 @@ ---- -slug: "/reference/rust/signalwire/agent/agent-base/agent-options" -title: "AgentOptions" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::agent::agent_base::AgentOptions" - parent: "signalwire::agent::agent_base" - module: "agent.agent_base" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs" - visibility: "public" ---- -# `AgentOptions` - -Options for constructing an `AgentBase`. - -Doubles as an idiomatic **builder**: every field has a fluent -`with_*`/setter that takes and returns `self`, so an agent can be configured -in one expression and handed straight to \[`AgentBase::new`]: - -```no_run -use signalwire::agent::{AgentBase, AgentOptions}; - -let agent = AgentBase::new( - AgentOptions::new("receptionist") - .route("/reception") - .basic_auth("user", "secret") - .auto_answer(true) - .signing_key("whsec_…"), -); -``` - -Direct field assignment (`opts.route = Some(...)`) still works — the builder -methods are an additive convenience. `#[must_use]` flags an `AgentOptions` -that is built but never passed to \[`AgentBase::new`]; under -`#[deny(unused_must_use)]` that is a hard compile error, as this -`compile_fail` doctest proves: - -```compile_fail -#![deny(unused_must_use)] -use signalwire::agent::AgentOptions; -// Building an AgentOptions and dropping it on the floor is a compile error -// because the type is `#[must_use]` — you must feed it to AgentBase::new. -AgentOptions::new("oops").route("/x"); -``` - -**Decorators:** `@must_use` - -## Signature - -```rust -struct AgentOptions { /* fields */ } -``` - -## Examples - - - - ```rust - use signalwire::agent::{AgentBase, AgentOptions}; - - let agent = AgentBase::new( - AgentOptions::new("receptionist") - .route("/reception") - .basic_auth("user", "secret") - .auto_answer(true) - .signing_key("whsec_…"), - ); - ``` - - - - ```rust - #![deny(unused_must_use)] - use signalwire::agent::AgentOptions; - // Building an AgentOptions and dropping it on the floor is a compile error - // because the type is `#[must_use]` — you must feed it to AgentBase::new. - AgentOptions::new("oops").route("/x"); - ``` - - - -## Properties - - - - - - - - - - - - - - - - - - - SignalWire Signing Key used to validate the `X-SignalWire-Signature` header on incoming POST webhooks (`POST /`, `POST /swaig`, `POST /post_prompt`). When `None`, the agent falls back to the `SIGNALWIRE_SIGNING_KEY` environment variable. When neither is set, the agent logs a prominent warning at startup and accepts unsigned requests — see Python parity (`webhook_validator.py`, reference at `signalwire-python/signalwire/signalwire/core/security/`). - - - - -## Methods - -### auto\_answer - -Toggle automatic call answering (default `true`). - -#### Signature - -```rust -fn auto_answer(self, auto_answer: bool) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 122. - -*** - -### basic\_auth - -Set HTTP Basic-Auth credentials guarding this agent's endpoints. - -#### Signature - -```rust -fn basic_auth(self, user: &str, password: &str) -> Self -``` - -#### Parameters - - - - - -#### Returns - -`Self` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 115. - -*** - -### host - -Set the bind host (e.g. `"0.0.0.0"`). - -#### Signature - -```rust -fn host(self, host: &str) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 103. - -*** - -### new - -#### Signature - -```rust -fn new(name: &str) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 73. - -*** - -### port - -Set the bind port. - -#### Signature - -```rust -fn port(self, port: u16) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 109. - -*** - -### record\_call - -Toggle call recording (default `false`). - -#### Signature - -```rust -fn record_call(self, record_call: bool) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 128. - -*** - -### route - -Set the HTTP route this agent serves (e.g. `"/reception"`). - -#### Signature - -```rust -fn route(self, route: &str) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 97. - -*** - -### signing\_key - -Set the SignalWire signing key used to validate inbound -`X-SignalWire-Signature` webhook headers. See \[`AgentOptions::signing_key`]. - -#### Signature - -```rust -fn signing_key(self, signing_key: &str) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 141. - -*** - -### use\_pom - -Toggle Prompt-Object-Model prompt rendering (default `true`). - -#### Signature - -```rust -fn use_pom(self, use_pom: bool) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 134. - -## Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 50. diff --git a/fern/products/sdk-reference/rust/signalwire/agent/agent-base/index.mdx b/fern/products/sdk-reference/rust/signalwire/agent/agent-base/index.mdx deleted file mode 100644 index 9e937e10c0..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/agent/agent-base/index.mdx +++ /dev/null @@ -1,34 +0,0 @@ ---- -slug: "/reference/rust/signalwire/agent/agent-base" -title: "agent_base" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "signalwire::agent::agent_base" - parent: "signalwire::agent" - module: "agent" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs" - visibility: "public" ---- -# `agent_base` - -## Classes - - - - Core agent that extends `Service` with AI-specific capabilities. - - - - Options for constructing an `AgentBase`. - - - -## Source - -[`src/agent/agent_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/agent_base.rs) - -Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/agent/index.mdx b/fern/products/sdk-reference/rust/signalwire/agent/index.mdx deleted file mode 100644 index b151e4353b..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/agent/index.mdx +++ /dev/null @@ -1,27 +0,0 @@ ---- -slug: "/reference/rust/signalwire/agent" -title: "agent" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "signalwire::agent" - parent: "signalwire" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/agent/mod.rs" - visibility: "public" ---- -# `agent` - -## Modules - - - - - -## Source - -[`src/agent/mod.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/agent/mod.rs) - -Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/contexts/context-builder/context-builder/index.mdx b/fern/products/sdk-reference/rust/signalwire/contexts/context-builder/context-builder/index.mdx deleted file mode 100644 index c991ab71bb..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/contexts/context-builder/context-builder/index.mdx +++ /dev/null @@ -1,342 +0,0 @@ ---- -slug: "/reference/rust/signalwire/contexts/context-builder/context-builder" -title: "ContextBuilder" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::contexts::context_builder::ContextBuilder" - parent: "signalwire::contexts::context_builder" - module: "contexts.context_builder" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs" - visibility: "public" ---- -# `ContextBuilder` - -Builder for multi-step, multi-context AI agent workflows. - -A ContextBuilder owns one or more \[`Context`]s; each Context owns an -ordered list of \[`Step`]s. Only one context and one step is active at -a time. Per chat turn, the runtime injects the current step's -instructions as a system message, then asks the LLM for a response. - -# Native tools auto-injected by the runtime - -When a step (or its enclosing context) declares valid\_steps or -valid\_contexts, the runtime auto-injects two native tools so the -model can navigate the flow: - -- `next_step(step: enum)` — present when valid\_steps is set -- `change_context(context: enum)` — present when valid\_contexts is set - -A third native tool — `gather_submit` — is injected during -gather\_info questioning. These three names are reserved: see -\[`RESERVED_NATIVE_TOOL_NAMES`]. \[`ContextBuilder::validate`] rejects -any agent that defines a SWAIG tool with one of these names. - -# Function whitelisting (\[`Step::set_functions`]) - -Each step may declare a functions whitelist. The whitelist is applied -in-memory at the start of each LLM turn. CRITICALLY: if a step does -NOT declare a functions field, it INHERITS the previous step's -active set. See \[`Step::set_functions`] for details and examples. - -**Decorators:** `@must_use` - -## Signature - -```rust -struct ContextBuilder { /* fields */ } -``` - -## Inheritance - -**Implements:** `Clone`, `Debug`, `Default` - -## Methods - -### add\_context - -#### Signature - -```rust -fn add_context(&mut self, name: &str) -> &mut ? -``` - -#### Parameters - - - -#### Returns - -`&mut ?` - -#### Source - -[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) - -Line 651. - -*** - -### attach\_tool\_name\_supplier - -Attach a closure that returns registered SWAIG tool names so -\[`Self::validate`] can check for collisions with -\[`RESERVED_NATIVE_TOOL_NAMES`]. - -#### Signature - -```rust -fn attach_tool_name_supplier( - &mut self, - supplier: F -) -> &mut Self where F: ?() -> ? + ? + ? + 'static -``` - -#### Type Parameters - - - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) - -Line 634. - -*** - -### clone - -#### Signature - -```rust -fn clone(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) - -Line 596. - -*** - -### default - -#### Signature - -```rust -fn default() -> Self -``` - -#### Returns - -`Self` - -#### Source - -[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) - -Line 864. - -*** - -### fmt - -#### Signature - -```rust -fn fmt(&self, f: &mut ?<'_>) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) - -Line 610. - -*** - -### get\_context - -#### Signature - -```rust -fn get_context(&self, name: &str) -> ?<&?> -``` - -#### Parameters - - - -#### Returns - -`?<&?>` - -#### Source - -[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) - -Line 670. - -*** - -### get\_context\_mut - -#### Signature - -```rust -fn get_context_mut(&mut self, name: &str) -> ?<&mut ?> -``` - -#### Parameters - - - -#### Returns - -`?<&mut ?>` - -#### Source - -[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) - -Line 674. - -*** - -### has\_contexts - -#### Signature - -```rust -fn has_contexts(&self) -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) - -Line 678. - -*** - -### new - -#### Signature - -```rust -fn new() -> Self -``` - -#### Returns - -`Self` - -#### Source - -[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) - -Line 623. - -*** - -### reset - -Remove all contexts, returning the builder to its initial state. -Use this in a dynamic config callback when you need to rebuild -contexts from scratch for a specific request. - -#### Signature - -```rust -fn reset(&mut self) -> &mut Self -``` - -#### Returns - -`&mut Self` - -#### Source - -[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) - -Line 645. - -*** - -### to\_value - -Serialise all contexts in order. Validates before converting. - -#### Signature - -```rust -fn to_value(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) - -Line 848. - -*** - -### validate - -Validate the contexts configuration. -Returns `Ok(())` if valid, `Err(errors)` with a list of error messages. - -#### Signature - -```rust -fn validate(&self) -> ?<(), ?> -``` - -#### Returns - -`?<(), ?>` - -#### Source - -[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) - -Line 684. - -## Source - -[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) - -Line 598. diff --git a/fern/products/sdk-reference/rust/signalwire/contexts/context-builder/context/index.mdx b/fern/products/sdk-reference/rust/signalwire/contexts/context-builder/context/index.mdx deleted file mode 100644 index 364cee61de..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/contexts/context-builder/context/index.mdx +++ /dev/null @@ -1,429 +0,0 @@ ---- -slug: "/reference/rust/signalwire/contexts/context-builder/context" -title: "Context" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::contexts::context_builder::Context" - parent: "signalwire::contexts::context_builder" - module: "contexts.context_builder" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs" - visibility: "public" ---- -# `Context` - -A named context containing an ordered set of steps. - -## Signature - -```rust -struct Context { /* fields */ } -``` - -## Inheritance - -**Implements:** `Debug`, `Clone` - -## Methods - -### add\_step - -#### Signature - -```rust -fn add_step(&mut self, name: &str) -> &mut ? -``` - -#### Parameters - - - -#### Returns - -`&mut ?` - -#### Source - -[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) - -Line 441. - -*** - -### clone - -#### Signature - -```rust -fn clone(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) - -Line 407. - -*** - -### fmt - -#### Signature - -```rust -fn fmt(&self, f: &mut ?<'_>) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) - -Line 407. - -*** - -### get\_step - -#### Signature - -```rust -fn get_step(&self, name: &str) -> ?<&?> -``` - -#### Parameters - - - -#### Returns - -`?<&?>` - -#### Source - -[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) - -Line 461. - -*** - -### get\_step\_mut - -#### Signature - -```rust -fn get_step_mut(&mut self, name: &str) -> ?<&mut ?> -``` - -#### Parameters - - - -#### Returns - -`?<&mut ?>` - -#### Source - -[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) - -Line 465. - -*** - -### move\_step - -#### Signature - -```rust -fn move_step(&mut self, name: &str, position: usize) -> &mut Self -``` - -#### Parameters - - - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) - -Line 476. - -*** - -### name - -#### Signature - -```rust -fn name(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) - -Line 435. - -*** - -### new - -#### Signature - -```rust -fn new(name: &str) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) - -Line 422. - -*** - -### remove\_step - -#### Signature - -```rust -fn remove_step(&mut self, name: &str) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) - -Line 469. - -*** - -### set\_enter\_fillers - -#### Signature - -```rust -fn set_enter_fillers(&mut self, fillers: ?) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) - -Line 512. - -*** - -### set\_exit\_fillers - -#### Signature - -```rust -fn set_exit_fillers(&mut self, fillers: ?) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) - -Line 517. - -*** - -### set\_initial\_step - -Set which step the context starts on when entered. - -By default, a context starts on its first step (index 0). Use -this to skip a preamble step on re-entry via `change_context`. - -#### Signature - -```rust -fn set_initial_step(&mut self, step_name: &str) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) - -Line 493. - -*** - -### set\_prompt\_text - -#### Signature - -```rust -fn set_prompt_text(&mut self, prompt: &str) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) - -Line 500. - -*** - -### set\_system\_prompt - -#### Signature - -```rust -fn set_system_prompt(&mut self, system_prompt: &str) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) - -Line 505. - -*** - -### step\_order - -#### Signature - -```rust -fn step_order(&self) -> &[?] -``` - -#### Returns - -`&[?]` - -#### Source - -[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) - -Line 528. - -*** - -### steps - -#### Signature - -```rust -fn steps(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) - -Line 524. - -*** - -### to\_value - -#### Signature - -```rust -fn to_value(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) - -Line 534. - -## Source - -[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) - -Line 408. diff --git a/fern/products/sdk-reference/rust/signalwire/contexts/context-builder/gather-info/index.mdx b/fern/products/sdk-reference/rust/signalwire/contexts/context-builder/gather-info/index.mdx deleted file mode 100644 index aca564fe5a..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/contexts/context-builder/gather-info/index.mdx +++ /dev/null @@ -1,208 +0,0 @@ ---- -slug: "/reference/rust/signalwire/contexts/context-builder/gather-info" -title: "GatherInfo" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::contexts::context_builder::GatherInfo" - parent: "signalwire::contexts::context_builder" - module: "contexts.context_builder" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs" - visibility: "public" ---- -# `GatherInfo` - -Configuration for structured data gathering within a step. - -## Signature - -```rust -struct GatherInfo { /* fields */ } -``` - -## Inheritance - -**Implements:** `Debug`, `Clone` - -## Methods - -### add\_question - -#### Signature - -```rust -fn add_question( - &mut self, - key: &str, - question: &str, - question_type: &str, - confirm: bool, - prompt: ?<&str>, - functions: ?> -) -> &mut Self -``` - -#### Parameters - - - - - - - - - - - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) - -Line 107. - -*** - -### clone - -#### Signature - -```rust -fn clone(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) - -Line 85. - -*** - -### completion\_action - -#### Signature - -```rust -fn completion_action(&self) -> ?<&str> -``` - -#### Returns - -`?<&str>` - -#### Source - -[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) - -Line 131. - -*** - -### fmt - -#### Signature - -```rust -fn fmt(&self, f: &mut ?<'_>) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) - -Line 85. - -*** - -### new - -#### Signature - -```rust -fn new(output_key: ?<&str>, completion_action: ?<&str>, prompt: ?<&str>) -> Self -``` - -#### Parameters - - - - - - - -#### Returns - -`Self` - -#### Source - -[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) - -Line 94. - -*** - -### questions - -#### Signature - -```rust -fn questions(&self) -> &[?] -``` - -#### Returns - -`&[?]` - -#### Source - -[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) - -Line 127. - -*** - -### to\_value - -#### Signature - -```rust -fn to_value(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) - -Line 135. - -## Source - -[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) - -Line 86. diff --git a/fern/products/sdk-reference/rust/signalwire/contexts/context-builder/gather-question/index.mdx b/fern/products/sdk-reference/rust/signalwire/contexts/context-builder/gather-question/index.mdx deleted file mode 100644 index bfa7d3237e..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/contexts/context-builder/gather-question/index.mdx +++ /dev/null @@ -1,159 +0,0 @@ ---- -slug: "/reference/rust/signalwire/contexts/context-builder/gather-question" -title: "GatherQuestion" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::contexts::context_builder::GatherQuestion" - parent: "signalwire::contexts::context_builder" - module: "contexts.context_builder" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs" - visibility: "public" ---- -# `GatherQuestion` - -A single question within a gather\_info block. - -## Signature - -```rust -struct GatherQuestion { /* fields */ } -``` - -## Inheritance - -**Implements:** `Debug`, `Clone` - -## Methods - -### clone - -#### Signature - -```rust -fn clone(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) - -Line 25. - -*** - -### fmt - -#### Signature - -```rust -fn fmt(&self, f: &mut ?<'_>) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) - -Line 25. - -*** - -### key - -#### Signature - -```rust -fn key(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) - -Line 54. - -*** - -### new - -#### Signature - -```rust -fn new( - key: &str, - question: &str, - question_type: &str, - confirm: bool, - prompt: ?<&str>, - functions: ?> -) -> Self -``` - -#### Parameters - - - - - - - - - - - - - -#### Returns - -`Self` - -#### Source - -[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) - -Line 36. - -*** - -### to\_value - -#### Signature - -```rust -fn to_value(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) - -Line 58. - -## Source - -[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) - -Line 26. diff --git a/fern/products/sdk-reference/rust/signalwire/contexts/context-builder/index.mdx b/fern/products/sdk-reference/rust/signalwire/contexts/context-builder/index.mdx deleted file mode 100644 index bb1b18d6c0..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/contexts/context-builder/index.mdx +++ /dev/null @@ -1,78 +0,0 @@ ---- -slug: "/reference/rust/signalwire/contexts/context-builder" -title: "context_builder" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "signalwire::contexts::context_builder" - parent: "signalwire::contexts" - module: "contexts" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs" - visibility: "public" ---- -# `context_builder` - -## Constants - - - Reserved tool names auto-injected by the runtime when contexts/steps are present. User-defined SWAIG tools must not collide with these names: \[`ContextBuilder::validate`] rejects any agent that registers a user tool sharing one of these names — the runtime would never call the user tool because the native one wins. - - -## Classes - - - - A named context containing an ordered set of steps. - - - - Builder for multi-step, multi-context AI agent workflows. - - - - Configuration for structured data gathering within a step. - - - - A single question within a gather\_info block. - - - - A single step within a context. - - - -## Functions - -### create\_simple\_context - -Create a builder pre-populated with a single named context. - -#### Signature - -```rust -fn create_simple_context(name: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) - -Line 872. - -## Source - -[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) - -Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/contexts/context-builder/step/index.mdx b/fern/products/sdk-reference/rust/signalwire/contexts/context-builder/step/index.mdx deleted file mode 100644 index 5f5ff0fdcc..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/contexts/context-builder/step/index.mdx +++ /dev/null @@ -1,539 +0,0 @@ ---- -slug: "/reference/rust/signalwire/contexts/context-builder/step" -title: "Step" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::contexts::context_builder::Step" - parent: "signalwire::contexts::context_builder" - module: "contexts.context_builder" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs" - visibility: "public" ---- -# `Step` - -A single step within a context. - -## Signature - -```rust -struct Step { /* fields */ } -``` - -## Inheritance - -**Implements:** `Debug`, `Clone` - -## Methods - -### add\_gather\_question - -Add a question to this step's gather\_info. Initialises -gather\_info if needed. - -### Gather mode locks function access (IMPORTANT) - -While the model is asking gather questions, the runtime -forcibly deactivates ALL of the step's other functions. The -only callable tools during a gather question are: - -- `gather_submit` (the native answer-submission tool) -- Whatever names you pass in this question's `functions` - argument - -`next_step` and `change_context` are also filtered out — the -model cannot navigate away until the gather completes. This -is by design: it forces a tight ask → submit → next-question -loop. - -If a question needs to call out to a tool (e.g. validate an -email, geocode a ZIP), list that tool name in this question's -`functions` argument. Functions listed here are active ONLY -for this question. - -#### Signature - -```rust -fn add_gather_question( - &mut self, - key: &str, - question: &str, - question_type: &str, - confirm: bool, - prompt: ?<&str>, - functions: ?> -) -> &mut Self -``` - -#### Parameters - - - - - - - - - - - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) - -Line 319. - -*** - -### add\_section - -Add a POM section with title and body. - -#### Signature - -```rust -fn add_section(&mut self, title: &str, body: &str) -> &mut Self -``` - -#### Parameters - - - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) - -Line 203. - -*** - -### clone - -#### Signature - -```rust -fn clone(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) - -Line 158. - -*** - -### fmt - -#### Signature - -```rust -fn fmt(&self, f: &mut ?<'_>) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) - -Line 158. - -*** - -### gather\_info - -#### Signature - -```rust -fn gather_info(&self) -> ?<&?> -``` - -#### Returns - -`?<&?>` - -#### Source - -[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) - -Line 347. - -*** - -### name - -#### Signature - -```rust -fn name(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) - -Line 188. - -*** - -### new - -#### Signature - -```rust -fn new(name: &str) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) - -Line 173. - -*** - -### set\_end - -Mark this step as terminal for the step flow. - -**IMPORTANT**: `end = true` does NOT end the conversation or -hang up the call. It exits step mode entirely after this step -executes — clearing the steps list, current step index, -valid\_steps, and valid\_contexts. The agent keeps running, but -operates only under the base system prompt and the context-level -prompt; no more step instructions are injected and no more -`next_step` tool is offered. - -To actually end the call, call a hangup tool or define a -hangup hook. - -#### Signature - -```rust -fn set_end(&mut self, end: bool) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) - -Line 276. - -*** - -### set\_functions - -Set which non-internal functions are callable while this step is -active. - -### Inheritance behavior (IMPORTANT) - -If you do NOT call this method, the step inherits whichever -function set was active on the previous step (or the previous -context's last step). The server-side runtime only resets the -active set when a step explicitly declares its `functions` field. -This is the most common source of bugs in multi-step agents: -forgetting `set_functions` on a later step lets the previous -step's tools leak through. Best practice is to call -`set_functions` explicitly on every step that should differ from -the previous one. - -Keep the per-step active set small: LLM tool selection accuracy -degrades noticeably past ~7-8 simultaneously-active tools per -call. Use per-step whitelisting to partition large tool -collections. - -Internal functions (e.g. `gather_submit`, hangup hook) are -ALWAYS protected and cannot be deactivated by this whitelist. The -native navigation tools `next_step` and `change_context` are -injected automatically when `set_valid_steps` / -`set_valid_contexts` is used; they are not affected by this list. - -#### Signature - -```rust -fn set_functions(&mut self, functions: ?) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) - -Line 249. - -*** - -### set\_gather\_info - -Initialise gather\_info for this step. - -#### Signature - -```rust -fn set_gather_info( - &mut self, - output_key: ?<&str>, - completion_action: ?<&str>, - prompt: ?<&str> -) -> &mut Self -``` - -#### Parameters - - - - - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) - -Line 287. - -*** - -### set\_skip\_user\_turn - -#### Signature - -```rust -fn set_skip_user_turn(&mut self, skip: bool) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) - -Line 281. - -*** - -### set\_step\_criteria - -#### Signature - -```rust -fn set_step_criteria(&mut self, criteria: &str) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) - -Line 212. - -*** - -### set\_text - -Set the step's prompt text directly. Mutually exclusive with POM sections. - -#### Signature - -```rust -fn set_text(&mut self, text: &str) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) - -Line 193. - -*** - -### set\_valid\_contexts - -#### Signature - -```rust -fn set_valid_contexts(&mut self, contexts: ?<&str>) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) - -Line 259. - -*** - -### set\_valid\_steps - -#### Signature - -```rust -fn set_valid_steps(&mut self, steps: ?<&str>) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) - -Line 254. - -*** - -### to\_value - -#### Signature - -```rust -fn to_value(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) - -Line 371. - -*** - -### valid\_contexts - -#### Signature - -```rust -fn valid_contexts(&self) -> ?<&[?]> -``` - -#### Returns - -`?<&[?]>` - -#### Source - -[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) - -Line 343. - -*** - -### valid\_steps - -#### Signature - -```rust -fn valid_steps(&self) -> ?<&[?]> -``` - -#### Returns - -`?<&[?]>` - -#### Source - -[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) - -Line 339. - -## Source - -[`src/contexts/context_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/context_builder.rs) - -Line 159. diff --git a/fern/products/sdk-reference/rust/signalwire/contexts/index.mdx b/fern/products/sdk-reference/rust/signalwire/contexts/index.mdx deleted file mode 100644 index 649a4787a7..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/contexts/index.mdx +++ /dev/null @@ -1,27 +0,0 @@ ---- -slug: "/reference/rust/signalwire/contexts" -title: "contexts" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "signalwire::contexts" - parent: "signalwire" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/mod.rs" - visibility: "public" ---- -# `contexts` - -## Modules - - - - - -## Source - -[`src/contexts/mod.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/contexts/mod.rs) - -Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/core/index.mdx b/fern/products/sdk-reference/rust/signalwire/core/index.mdx deleted file mode 100644 index 59a962dd1f..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/core/index.mdx +++ /dev/null @@ -1,27 +0,0 @@ ---- -slug: "/reference/rust/signalwire/core" -title: "core" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "signalwire::core" - parent: "signalwire" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/core/mod.rs" - visibility: "public" ---- -# `core` - -## Modules - - - - - -## Source - -[`src/core/mod.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/core/mod.rs) - -Line 5. diff --git a/fern/products/sdk-reference/rust/signalwire/core/logging-config/index.mdx b/fern/products/sdk-reference/rust/signalwire/core/logging-config/index.mdx deleted file mode 100644 index 2f9f44962a..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/core/logging-config/index.mdx +++ /dev/null @@ -1,48 +0,0 @@ ---- -slug: "/reference/rust/signalwire/core/logging-config" -title: "logging_config" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "signalwire::core::logging_config" - parent: "signalwire::core" - module: "core" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/core/logging_config.rs" - visibility: "public" ---- -# `logging_config` - -## Functions - -### get\_execution\_mode - -Detect the SDK's deployment environment based on well-known -environment variables. - -Returns one of `"cgi"`, `"lambda"`, `"google_cloud_function"`, -`"azure_function"`, or `"server"`. - -#### Signature - -```rust -fn get_execution_mode() -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/core/logging_config.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/core/logging_config.rs) - -Line 20. - -## Source - -[`src/core/logging_config.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/core/logging_config.rs) - -Line 13. diff --git a/fern/products/sdk-reference/rust/signalwire/datamap/datamap/index.mdx b/fern/products/sdk-reference/rust/signalwire/datamap/datamap/index.mdx deleted file mode 100644 index d7c517554d..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/datamap/datamap/index.mdx +++ /dev/null @@ -1,653 +0,0 @@ ---- -slug: "/reference/rust/signalwire/datamap/datamap" -title: "datamap" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::datamap::datamap" - parent: "signalwire::datamap" - module: "datamap" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/datamap/datamap.rs" - visibility: "public" ---- -# `datamap` - -Fluent builder for DataMap-based SWAIG function definitions. - -A DataMap tool defines its behaviour declaratively (expressions, webhooks) -instead of with a code handler. - -**Decorators:** `@must_use` - -## Signature - -```rust -struct DataMap { /* fields */ } -``` - -## Inheritance - -**Implements:** `Debug`, `Clone` - -## Methods - -### body - -Set body on the last webhook. - -#### Signature - -```rust -fn body(&mut self, data: ?) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/datamap/datamap.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/datamap/datamap.rs) - -Line 173. - -*** - -### clone - -#### Signature - -```rust -fn clone(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/datamap/datamap.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/datamap/datamap.rs) - -Line 8. - -*** - -### create\_expression\_tool - -Build a complete SWAIG function definition with expressions only. - -#### Signature - -```rust -fn create_expression_tool( - name: &str, - purpose: &str, - parameters: ?, - expressions: ? -) -> ? -``` - -#### Parameters - - - - - - - - - -#### Returns - -`?` - -#### Source - -[`src/datamap/datamap.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/datamap/datamap.rs) - -Line 308. - -*** - -### create\_simple\_api\_tool - -Build a complete SWAIG function definition with a single webhook. - -#### Signature - -```rust -fn create_simple_api_tool( - name: &str, - purpose: &str, - parameters: ?, - method: &str, - url: &str, - output: ?, - headers: ? -) -> ? -``` - -#### Parameters - - - - - - - - - - - - - - - -#### Returns - -`?` - -#### Source - -[`src/datamap/datamap.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/datamap/datamap.rs) - -Line 277. - -*** - -### description - -Alias for \[`Self::purpose`]. Sets the LLM-facing tool -description. This string is read by the model to decide WHEN -to call this tool. See \[`Self::purpose`] for bad-vs-good -examples. - -#### Signature - -```rust -fn description(&mut self, desc: &str) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/datamap/datamap.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/datamap/datamap.rs) - -Line 68. - -*** - -### error\_keys - -Set error\_keys on the last webhook. - -#### Signature - -```rust -fn error_keys(&mut self, keys: ?<&str>) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/datamap/datamap.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/datamap/datamap.rs) - -Line 212. - -*** - -### expression - -Add an expression rule. - -#### Signature - -```rust -fn expression( - &mut self, - test_value: &str, - pattern: &str, - output: ?, - nomatch_output: ? -) -> &mut Self -``` - -#### Parameters - - - - - - - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/datamap/datamap.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/datamap/datamap.rs) - -Line 114. - -*** - -### fallback\_output - -Set global fallback output. - -#### Signature - -```rust -fn fallback_output(&mut self, result: ?) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/datamap/datamap.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/datamap/datamap.rs) - -Line 206. - -*** - -### fmt - -#### Signature - -```rust -fn fmt(&self, f: &mut ?<'_>) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/datamap/datamap.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/datamap/datamap.rs) - -Line 8. - -*** - -### for\_each - -Set foreach on the last webhook. - -#### Signature - -```rust -fn for_each(&mut self, config: ?) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/datamap/datamap.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/datamap/datamap.rs) - -Line 189. - -*** - -### global\_error\_keys - -Set global error\_keys. - -#### Signature - -```rust -fn global_error_keys(&mut self, keys: ?<&str>) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/datamap/datamap.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/datamap/datamap.rs) - -Line 220. - -*** - -### new - -#### Signature - -```rust -fn new(function_name: &str) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/datamap/datamap.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/datamap/datamap.rs) - -Line 26. - -*** - -### output - -Set output on the last webhook. - -#### Signature - -```rust -fn output(&mut self, result: ?) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/datamap/datamap.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/datamap/datamap.rs) - -Line 197. - -*** - -### parameter - -Add a parameter definition — the `description` is **LLM-FACING**. - -Each parameter description is rendered into the OpenAI tool -schema under `parameters.properties..description` and -sent to the model. The model uses it to decide HOW to fill in -the argument from user speech. It is prompt engineering, not -developer FYI. - -### Bad vs good - -```text -BAD : .parameter("city", "string", "the city", ...) -GOOD: .parameter("city", "string", - "The name of the city to get weather for, e.g. " - "'San Francisco'. Ask the user if they did not " - "provide one. Include the state or country if the " - "city name is ambiguous.", ...) -``` - -#### Signature - -```rust -fn parameter( - &mut self, - name: &str, - param_type: &str, - description: &str, - required: bool, - enum_values: ?<&str> -) -> &mut Self -``` - -#### Parameters - - - - - - - - - - - -#### Returns - -`&mut Self` - -#### Examples - -```rust -BAD : .parameter("city", "string", "the city", ...) -GOOD: .parameter("city", "string", - "The name of the city to get weather for, e.g. " - "'San Francisco'. Ask the user if they did not " - "provide one. Include the state or country if the " - "city name is ambiguous.", ...) -``` - -#### Source - -[`src/datamap/datamap.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/datamap/datamap.rs) - -Line 90. - -*** - -### params - -Set params on the last webhook. - -#### Signature - -```rust -fn params(&mut self, data: ?) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/datamap/datamap.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/datamap/datamap.rs) - -Line 181. - -*** - -### purpose - -Set the LLM-facing tool description (the "purpose"). **Prompt -engineering, not developer documentation.** - -The description string is rendered into the OpenAI tool schema -`description` field on every LLM turn. The model reads it to -decide WHEN to call this tool. A vague `purpose()` is the #1 -cause of "the model has the right tool but doesn't call it" -failures with data-map tools. - -### Bad vs good - -```text -BAD : .purpose("weather api") -GOOD: .purpose("Get the current weather conditions and forecast " - + "for a specific city. Use this whenever the user " - + "asks about weather, temperature, rain, or similar " - + "conditions in a named location.") -``` - -#### Signature - -```rust -fn purpose(&mut self, desc: &str) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Examples - -```rust -BAD : .purpose("weather api") -GOOD: .purpose("Get the current weather conditions and forecast " - + "for a specific city. Use this whenever the user " - + "asks about weather, temperature, rain, or similar " - + "conditions in a named location.") -``` - -#### Source - -[`src/datamap/datamap.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/datamap/datamap.rs) - -Line 59. - -*** - -### to\_swaig\_function - -Serialise to a SWAIG function definition. - -#### Signature - -```rust -fn to_swaig_function(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/datamap/datamap.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/datamap/datamap.rs) - -Line 228. - -*** - -### webhook - -Add a webhook definition. - -#### Signature - -```rust -fn webhook( - &mut self, - method: &str, - url: &str, - headers: ?, - form_param: &str, - input_args_as_params: bool, - require_args: ?<&str> -) -> &mut Self -``` - -#### Parameters - - - - - - - - - - - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/datamap/datamap.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/datamap/datamap.rs) - -Line 133. - -*** - -### webhook\_expressions - -Set expressions on the last webhook. - -#### Signature - -```rust -fn webhook_expressions(&mut self, expressions: ?) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/datamap/datamap.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/datamap/datamap.rs) - -Line 165. - -## Source - -[`src/datamap/datamap.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/datamap/datamap.rs) - -Line 10. diff --git a/fern/products/sdk-reference/rust/signalwire/datamap/index.mdx b/fern/products/sdk-reference/rust/signalwire/datamap/index.mdx deleted file mode 100644 index 1885d17bdf..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/datamap/index.mdx +++ /dev/null @@ -1,29 +0,0 @@ ---- -slug: "/reference/rust/signalwire/datamap" -title: "datamap" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "signalwire::datamap" - parent: "signalwire" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/datamap/mod.rs" - visibility: "public" ---- -# `datamap` - -## Classes - - - - Fluent builder for DataMap-based SWAIG function definitions. - - - -## Source - -[`src/datamap/mod.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/datamap/mod.rs) - -Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/index.mdx b/fern/products/sdk-reference/rust/signalwire/index.mdx index 980ff575a1..8df9aa227d 100644 --- a/fern/products/sdk-reference/rust/signalwire/index.mdx +++ b/fern/products/sdk-reference/rust/signalwire/index.mdx @@ -21,44 +21,6 @@ lustri: -## Modules - - - - - - - - - - - - - - Prompt Object Model (POM) - - - - - - - - - - - - - - - - - - - - - - - ## Functions ### add\_skill\_directory diff --git a/fern/products/sdk-reference/rust/signalwire/logging/index.mdx b/fern/products/sdk-reference/rust/signalwire/logging/index.mdx deleted file mode 100644 index de85ca8266..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/logging/index.mdx +++ /dev/null @@ -1,349 +0,0 @@ ---- -slug: "/reference/rust/signalwire/logging" -title: "logging" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "signalwire::logging" - parent: "signalwire" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs" - visibility: "public" ---- -# `logging` - -## Classes - - - - Logger with level filtering and suppression via environment variables. - - - - Error returned when a string is parsed into \[`Level`] (via \[`FromStr`]) but is not one of `debug`/`info`/`warn`/`error` (case-insensitive). - - - -## Functions - -### init - -Initialize the global logger (call once at startup). - -#### Signature - -```rust -fn init() -``` - -#### Source - -[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) - -Line 165. - -## Enums - -### Level - -Log levels matching the SDK convention — the closed set `debug` / `info` / -`warn` / `error`, ordered by increasing severity. - -`as_str()` returns the upper-case label used in emitted log lines -(`"DEBUG"`); `Display` and \[`AsRef`] agree with it. -`from_str()` parses the lower-case names (case-insensitively) accepted by -`SIGNALWIRE_LOG_LEVEL`. - -#### Signature - -```rust -enum Level -``` - -#### Inheritance - -**Implements:** `Debug`, `Clone`, `Copy`, `PartialEq`, `Eq`, `PartialOrd`, `Ord`, `Display`, `AsRef`, `FromStr` - -#### Variants - - - - - - - - - -#### Methods - -##### all - -Every \[`Level`], in ascending-severity order. - -###### Signature - -```rust -fn all() -> &'static [?] -``` - -###### Returns - -`&'static [?]` - -###### Source - -[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) - -Line 44. - -*** - -##### as\_ref - -###### Signature - -```rust -fn as_ref(&self) -> &str -``` - -###### Returns - -`&str` - -###### Source - -[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) - -Line 56. - -*** - -##### as\_str - -###### Signature - -```rust -fn as_str(&self) -> &'static str -``` - -###### Returns - -`&'static str` - -###### Source - -[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) - -Line 34. - -*** - -##### clone - -###### Signature - -```rust -fn clone(&self) -> ? -``` - -###### Returns - -`?` - -###### Source - -[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) - -Line 15. - -*** - -##### cmp - -###### Signature - -```rust -fn cmp(&self, other: &?) -> ? -``` - -###### Parameters - - - -###### Returns - -`?` - -###### Source - -[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) - -Line 15. - -*** - -##### eq - -###### Signature - -```rust -fn eq(&self, other: &?) -> bool -``` - -###### Parameters - - - -###### Returns - -`bool` - -###### Source - -[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) - -Line 15. - -*** - -##### fmt - -###### Signature - -```rust -fn fmt(&self, f: &mut ?<'_>) -> ? -``` - -###### Parameters - - - -###### Returns - -`?` - -###### Source - -[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) - -Line 15. - -*** - -##### fmt - -###### Signature - -```rust -fn fmt(&self, f: &mut ?<'_>) -> ? -``` - -###### Parameters - - - -###### Returns - -`?` - -###### Source - -[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) - -Line 50. - -*** - -##### from\_str - -###### Signature - -```rust -fn from_str(s: &str) -> ? -``` - -###### Parameters - - - -###### Returns - -`?` - -###### Source - -[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) - -Line 24. - -*** - -##### from\_str - -###### Signature - -```rust -fn from_str(s: &str) -> ?::Err> -``` - -###### Parameters - - - -###### Returns - -`?::Err>` - -###### Source - -[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) - -Line 93. - -*** - -##### partial\_cmp - -###### Signature - -```rust -fn partial_cmp(&self, other: &?) -> ? -``` - -###### Parameters - - - -###### Returns - -`?` - -###### Source - -[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) - -Line 15. - -#### Type Aliases - -##### Err - -###### Source - -[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) - -Line 91. - -#### Source - -[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) - -Line 16. - -## Source - -[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) - -Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/logging/logger/index.mdx b/fern/products/sdk-reference/rust/signalwire/logging/logger/index.mdx deleted file mode 100644 index c60c041b71..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/logging/logger/index.mdx +++ /dev/null @@ -1,191 +0,0 @@ ---- -slug: "/reference/rust/signalwire/logging/logger" -title: "Logger" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::logging::Logger" - parent: "signalwire::logging" - module: "logging" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs" - visibility: "public" ---- -# `Logger` - -Logger with level filtering and suppression via environment variables. - -- `SIGNALWIRE_LOG_LEVEL` — sets the minimum level (debug/info/warn/error) -- `SIGNALWIRE_LOG_MODE=off` — suppresses all output - -## Signature - -```rust -struct Logger { /* fields */ } -``` - -## Properties - - - - - - - -## Methods - -### debug - -#### Signature - -```rust -fn debug(&self, message: &str) -``` - -#### Parameters - - - -#### Source - -[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) - -Line 147. - -*** - -### error - -#### Signature - -```rust -fn error(&self, message: &str) -``` - -#### Parameters - - - -#### Source - -[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) - -Line 159. - -*** - -### info - -#### Signature - -```rust -fn info(&self, message: &str) -``` - -#### Parameters - - - -#### Source - -[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) - -Line 151. - -*** - -### log - -#### Signature - -```rust -fn log(&self, level: ?, message: &str) -``` - -#### Parameters - - - - - -#### Source - -[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) - -Line 139. - -*** - -### new - -#### Signature - -```rust -fn new(name: &str) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) - -Line 117. - -*** - -### should\_log - -#### Signature - -```rust -fn should_log(&self, level: ?) -> bool -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) - -Line 135. - -*** - -### warn - -#### Signature - -```rust -fn warn(&self, message: &str) -``` - -#### Parameters - - - -#### Source - -[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) - -Line 155. - -## Source - -[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) - -Line 110. diff --git a/fern/products/sdk-reference/rust/signalwire/logging/parse-level-error/index.mdx b/fern/products/sdk-reference/rust/signalwire/logging/parse-level-error/index.mdx deleted file mode 100644 index fe2a3731b6..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/logging/parse-level-error/index.mdx +++ /dev/null @@ -1,149 +0,0 @@ ---- -slug: "/reference/rust/signalwire/logging/parse-level-error" -title: "ParseLevelError" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::logging::ParseLevelError" - parent: "signalwire::logging" - module: "logging" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs" - visibility: "public" ---- -# `ParseLevelError` - -Error returned when a string is parsed into \[`Level`] (via \[`FromStr`]) but -is not one of `debug`/`info`/`warn`/`error` (case-insensitive). - -## Signature - -```rust -struct ParseLevelError { /* fields */ } -``` - -## Inheritance - -**Implements:** `Debug`, `Clone`, `PartialEq`, `Eq`, `Display`, [Error](/docs/sdk-reference/reference/rust/signalwire/security/webhook-layer/webhook-validate#error) - -## Methods - -### clone - -#### Signature - -```rust -fn clone(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) - -Line 63. - -*** - -### eq - -#### Signature - -```rust -fn eq(&self, other: &?) -> bool -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) - -Line 63. - -*** - -### fmt - -#### Signature - -```rust -fn fmt(&self, f: &mut ?<'_>) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) - -Line 63. - -*** - -### fmt - -#### Signature - -```rust -fn fmt(&self, f: &mut ?<'_>) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) - -Line 76. - -*** - -### input - -The string that failed to parse as a log level. - -#### Signature - -```rust -fn input(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) - -Line 70. - -## Source - -[`src/logging.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/logging.rs) - -Line 64. diff --git a/fern/products/sdk-reference/rust/signalwire/pom/index.mdx b/fern/products/sdk-reference/rust/signalwire/pom/index.mdx deleted file mode 100644 index d61970c080..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/pom/index.mdx +++ /dev/null @@ -1,50 +0,0 @@ ---- -slug: "/reference/rust/signalwire/pom" -title: "pom" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "signalwire::pom" - parent: "signalwire" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/pom/mod.rs" - visibility: "public" ---- -# `pom` - -Prompt Object Model (POM) - -A typed tree of prompt sections that supports markdown / XML / JSON / -YAML rendering. Direct port of `signalwire.pom.pom` from -signalwire-python. - -The two public types are \[`PromptObjectModel`] (the root container) -and \[`Section`] (one node in the tree). Build a model with -`add_section` / `add_subsection`, then render via `render_markdown`, -`render_xml`, `to_json`, or `to_yaml`. All renderers match Python -byte-for-byte — the cross-port parity contract lives in -`signalwire-python/tests/unit/pom/test_pom_render_parity.py`. - -## Classes - - - - One node in a Prompt Object Model tree. - - - -## Modules - - - - `PromptObjectModel` — root container for a POM document. - - - -## Source - -[`src/pom/mod.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/mod.rs) - -Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/pom/pom/index.mdx b/fern/products/sdk-reference/rust/signalwire/pom/pom/index.mdx deleted file mode 100644 index ff965ba6f0..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/pom/pom/index.mdx +++ /dev/null @@ -1,44 +0,0 @@ ---- -slug: "/reference/rust/signalwire/pom/pom" -title: "pom" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "signalwire::pom::pom" - parent: "signalwire::pom" - module: "pom" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs" - visibility: "public" ---- -# `pom` - -`PromptObjectModel` — root container for a POM document. - -Direct port of `signalwire.pom.pom.PromptObjectModel` -(signalwire-python/signalwire/signalwire/pom/pom.py:234-540). - -Owns a `Vec
` (the top-level sections) and exposes -markdown / XML / JSON / YAML rendering plus structural helpers -(`add_section`, `find_section`, `add_pom_as_subsection`). - -All renderers match Python byte-for-byte — the cross-port -parity contract is asserted in -`signalwire-python/tests/unit/pom/test_pom_render_parity.py` and -mirrored in this crate's inline tests. - -## Classes - - - - Root container for a Prompt Object Model document. - - - -## Source - -[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) - -Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/pom/pom/prompt-object-model/index.mdx b/fern/products/sdk-reference/rust/signalwire/pom/pom/prompt-object-model/index.mdx deleted file mode 100644 index 11665ec74c..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/pom/pom/prompt-object-model/index.mdx +++ /dev/null @@ -1,547 +0,0 @@ ---- -slug: "/reference/rust/signalwire/pom/pom/prompt-object-model" -title: "PromptObjectModel" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::pom::pom::PromptObjectModel" - parent: "signalwire::pom::pom" - module: "pom.pom" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs" - visibility: "public" ---- -# `PromptObjectModel` - -Root container for a Prompt Object Model document. - -Mirrors Python's `signalwire.pom.pom.PromptObjectModel`. Construct -with \[`PromptObjectModel::new`], populate with [`add_section`], -then render via [`render_markdown`], [`render_xml`], [`to_json`], -or [`to_yaml`]. - -[`add_section`]: PromptObjectModel::add_section - -[`render_markdown`]: PromptObjectModel::render_markdown - -[`render_xml`]: PromptObjectModel::render_xml - -[`to_json`]: PromptObjectModel::to_json - -[`to_yaml`]: PromptObjectModel::to_yaml - -**Decorators:** `@must_use` - -## Signature - -```rust -struct PromptObjectModel { /* fields */ } -``` - -## Inheritance - -**Implements:** `Debug`, `Clone`, `Default`, `PartialEq`, `Eq` - -## Properties - - - Top-level sections, in insertion order. Only the _first_ entry may have `title = None`; all others must carry a title (Python raises `ValueError` otherwise — see `add_section`). - - -## Methods - -### add\_pom\_as\_subsection - -Append every top-level section of `pom_to_add` as a -subsection of the section identified by `target_title`. - -Mirrors Python's `add_pom_as_subsection(target, pom_to_add)` -where `target` is a section title. Returns `Err` when no -section with the given title exists. - -#### Signature - -```rust -fn add_pom_as_subsection( - &mut self, - target_title: &str, - pom_to_add: &? -) -> ?<(), ?> -``` - -#### Parameters - - - - - -#### Returns - -`?<(), ?>` - -#### Source - -[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) - -Line 252. - -*** - -### add\_section - -Append a top-level section with the given title and body. - -Mirrors Python's `PromptObjectModel.add_section(title, body=...)`. -Only the _first_ section may pass `title = None`; subsequent -`None` titles return `Err`. - -Returns a mutable reference to the new section so callers -can keep configuring it (Python returns the `Section` object -— Rust's borrow checker makes a `&mut` reference the -equivalent shape). - -#### Signature - -```rust -fn add_section(&mut self, title: ?) -> ?<&mut ?, ?> -``` - -#### Parameters - - - -#### Returns - -`?<&mut ?, ?>` - -#### Source - -[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) - -Line 97. - -*** - -### add\_section\_with - -Append a top-level section with title + body in one call. -Convenience wrapper that mirrors Python's keyword-style -`add_section(title=..., body=...)`. - -#### Signature - -```rust -fn add_section_with: ?>( - &mut self, - title: ?, - body: impl ? -) -> ?<&mut ?, ?> -``` - -#### Type Parameters - - - -#### Parameters - - - - - -#### Returns - -`?<&mut ?, ?>` - -#### Source - -[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) - -Line 108. - -*** - -### clone - -#### Signature - -```rust -fn clone(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) - -Line 31. - -*** - -### default - -#### Signature - -```rust -fn default() -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) - -Line 31. - -*** - -### eq - -#### Signature - -```rust -fn eq(&self, other: &?) -> bool -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) - -Line 31. - -*** - -### find\_section - -Find the first section (recursively, depth-first) with the -given title. Returns `None` when no match. Mirrors Python's -`find_section`. - -#### Signature - -```rust -fn find_section(&self, title: &str) -> ?<&?> -``` - -#### Parameters - - - -#### Returns - -`?<&?>` - -#### Source - -[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) - -Line 121. - -*** - -### find\_section\_mut - -Mutable variant of \[`find_section`]. - -[`find_section`]: PromptObjectModel::find_section - -#### Signature - -```rust -fn find_section_mut(&mut self, title: &str) -> ?<&mut ?> -``` - -#### Parameters - - - -#### Returns - -`?<&mut ?>` - -#### Source - -[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) - -Line 139. - -*** - -### fmt - -#### Signature - -```rust -fn fmt(&self, f: &mut ?<'_>) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) - -Line 31. - -*** - -### from\_json - -Parse a JSON string into a \[`PromptObjectModel`]. Mirrors -Python's `PromptObjectModel.from_json(json_data)`. - -Returns `Err(String)` with a descriptive message on parse -errors, matching Python's `ValueError`. - -#### Signature - -```rust -fn from_json(json_str: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) - -Line 55. - -*** - -### from\_value - -Build a model from a parsed `serde_json::Value`. Used by -both \[`from_json`] and \[`from_yaml`]. - -[`from_json`]: PromptObjectModel::from_json - -[`from_yaml`]: PromptObjectModel::from_yaml - -#### Signature - -```rust -fn from_value(value: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) - -Line 74. - -*** - -### from\_yaml - -Parse a YAML string into a \[`PromptObjectModel`]. Mirrors -Python's `PromptObjectModel.from_yaml(yaml_data)`. - -#### Signature - -```rust -fn from_yaml(yaml_str: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) - -Line 63. - -*** - -### new - -Construct an empty model. Mirrors Python's -`PromptObjectModel()` constructor. - -#### Signature - -```rust -fn new() -> Self -``` - -#### Returns - -`Self` - -#### Source - -[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) - -Line 44. - -*** - -### render\_markdown - -Render the entire model as markdown. Matches Python's -`render_markdown` byte-for-byte. - -#### Signature - -```rust -fn render_markdown(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) - -Line 195. - -*** - -### render\_xml - -Render the entire model as XML. Matches Python's -`render_xml` byte-for-byte. - -#### Signature - -```rust -fn render_xml(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) - -Line 219. - -*** - -### to\_json - -Render the model as a JSON string (indent=2). Matches -Python's `to_json` byte-for-byte: `json.dumps([...], indent=2)`. - -#### Signature - -```rust -fn to_json(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) - -Line 164. - -*** - -### to\_value - -Convert the model to a `serde_json::Value` (a JSON array of -section dicts). Mirrors Python's `to_dict`. The Rust name -follows serde idiom (`to_value`) but the cross-port surface -audit treats `to_value` ≡ `to_dict`. - -#### Signature - -```rust -fn to_value(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) - -Line 158. - -*** - -### to\_yaml - -Render the model as a YAML string. Matches PyYAML's output -shape (`default_flow_style=False, sort_keys=False`). - -We hand-emit YAML rather than rely on `serde_norway::to_string` -because the latter (a) sorts keys alphabetically when fed a -`serde_json::Value` (which uses BTreeMap internally) and -(b) doesn't expose a switch to disable that. The POM -document shape is fully constrained — list of dicts with -known string/list-of-string/list-of-dict values — so a -targeted emitter is straightforward and guarantees parity. - -#### Signature - -```rust -fn to_yaml(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) - -Line 181. - -## Source - -[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) - -Line 33. diff --git a/fern/products/sdk-reference/rust/signalwire/pom/section/index.mdx b/fern/products/sdk-reference/rust/signalwire/pom/section/index.mdx deleted file mode 100644 index fe93e4a72c..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/pom/section/index.mdx +++ /dev/null @@ -1,417 +0,0 @@ ---- -slug: "/reference/rust/signalwire/pom/section" -title: "section" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::pom::section" - parent: "signalwire::pom" - module: "pom" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/pom/section.rs" - visibility: "public" ---- -# `section` - -One node in a Prompt Object Model tree. - -Mirrors Python's `signalwire.pom.pom.Section`. Fields are owned -strings/vecs (Rust idiom — the model is a value-type document). - -## Signature - -```rust -struct Section { /* fields */ } -``` - -## Inheritance - -**Implements:** `Debug`, `Clone`, `PartialEq`, `Eq`, `Default` - -## Properties - - - Paragraph of body text. Empty string when not set (matches Python's `body=''` default). - - - - Bullet items. Rendered as `- text` (or `1. text` when `numbered_bullets` is `true`). - - - - Whether this section participates in numbered numbering. `None` means "unspecified" (Python's `None` default). `Some(true)` enables numbering on this and all sibling sections at the same level (unless explicitly set to `Some(false)`). - - - - Whether bullets in _this_ section render as `1. x` (true) or `- x` (false). Default `false` matches Python. - - - - Nested subsections. Renderer walks this tree depth-first. - - - - The section title. `None` is valid only for the _first_ top-level section in a \[`crate::pom::PromptObjectModel`]; every other section must carry a title. - - -## Methods - -### add\_body - -Replace the body text. Mirrors Python's `Section.add_body` — -the docstring explicitly says "Add OR REPLACE the body". - -#### Signature - -```rust -fn add_body: ?>(&mut self, body: impl ?) -> &mut Self -``` - -#### Type Parameters - - - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/pom/section.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/section.rs) - -Line 73. - -*** - -### add\_bullets - -Append additional bullets. Mirrors Python's -`Section.add_bullets` (`self.bullets.extend(bullets)`). - -#### Signature - -```rust -fn add_bullets(&mut self, bullets: I) -> &mut Self where I: ?, S: ? -``` - -#### Type Parameters - - - - - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/pom/section.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/section.rs) - -Line 80. - -*** - -### add\_subsection - -Add a subsection. Mirrors Python's `Section.add_subsection` -— the title is required (Python raises `ValueError` when -`title is None`); we encode the same constraint by accepting -`String` (not `Option`). - -Returns a mutable reference to the freshly-appended -subsection so the caller can keep configuring it. (Python -returns the `Section` object directly; Rust's borrow checker -makes a `&mut` reference the equivalent shape.) - -#### Signature - -```rust -fn add_subsection: ?>( - &mut self, - title: impl ? -) -> &mut ? -``` - -#### Type Parameters - - - -#### Parameters - - - -#### Returns - -`&mut ?` - -#### Source - -[`src/pom/section.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/section.rs) - -Line 98. - -*** - -### add\_subsection\_full - -Add a fully-specified subsection. Convenience that mirrors -Python's keyword-argument form -`add_subsection(title=..., body=..., bullets=..., numbered=..., numberedBullets=...)`. - -#### Signature - -```rust -fn add_subsection_full: ?, impl Into: ?>( - &mut self, - title: impl ?, - body: impl ?, - bullets: ?, - numbered: ?, - numbered_bullets: bool -) -> &mut ? -``` - -#### Type Parameters - - - - - -#### Parameters - - - - - - - - - - - -#### Returns - -`&mut ?` - -#### Source - -[`src/pom/section.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/section.rs) - -Line 106. - -*** - -### clone - -#### Signature - -```rust -fn clone(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/pom/section.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/section.rs) - -Line 18. - -*** - -### default - -#### Signature - -```rust -fn default() -> Self -``` - -#### Returns - -`Self` - -#### Source - -[`src/pom/section.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/section.rs) - -Line 44. - -*** - -### eq - -#### Signature - -```rust -fn eq(&self, other: &?) -> bool -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/pom/section.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/section.rs) - -Line 18. - -*** - -### fmt - -#### Signature - -```rust -fn fmt(&self, f: &mut ?<'_>) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/pom/section.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/section.rs) - -Line 18. - -*** - -### new - -Construct a section with the given title. - -Use the field-setter methods (`add_body`, `add_bullets`, -`add_subsection`) or struct-literal construction for further -configuration. Mirrors Python's `Section(title=..., ...)` -keyword constructor — Rust's idiom uses a builder-style call -chain via `add_*`. - -#### Signature - -```rust -fn new(title: ?) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/pom/section.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/section.rs) - -Line 64. - -*** - -### render\_markdown - -Render this section (and all nested subsections) as -markdown. Output matches Python's -`Section.render_markdown` byte-for-byte — see -`signalwire-python/tests/unit/pom/test_pom_render_parity.py` -for the cross-port contract. - -#### Signature - -```rust -fn render_markdown(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/pom/section.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/section.rs) - -Line 177. - -*** - -### render\_xml - -Render this section as XML. Matches Python's -`Section.render_xml` byte-for-byte. - -#### Signature - -```rust -fn render_xml(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/pom/section.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/section.rs) - -Line 239. - -*** - -### to\_value - -Convert this section to a `serde_json::Value` matching -Python's `Section.to_dict` exactly. Key order is fixed -(`title`, `body`, `bullets`, `subsections`, `numbered`, -`numberedBullets`) so JSON/YAML serialisation is -byte-for-byte deterministic across ports. - -The Python name is `to_dict`; in Rust the natural name for -a `serde_json::Value` is `to_value`. The cross-port surface -audit treats the two as equivalent (see -`enumerate_surface.py` METHOD\_RENAMES). - -#### Signature - -```rust -fn to_value(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/pom/section.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/section.rs) - -Line 136. - -## Source - -[`src/pom/section.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/section.rs) - -Line 19. diff --git a/fern/products/sdk-reference/rust/signalwire/prefabs/bedrock/bedrock-agent/index.mdx b/fern/products/sdk-reference/rust/signalwire/prefabs/bedrock/bedrock-agent/index.mdx deleted file mode 100644 index db9607b38b..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/prefabs/bedrock/bedrock-agent/index.mdx +++ /dev/null @@ -1,504 +0,0 @@ ---- -slug: "/reference/rust/signalwire/prefabs/bedrock/bedrock-agent" -title: "BedrockAgent" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::prefabs::bedrock::BedrockAgent" - parent: "signalwire::prefabs::bedrock" - module: "prefabs.bedrock" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs" - visibility: "public" ---- -# `BedrockAgent` - -Voice-to-voice agent backed by Amazon Bedrock. - -Wraps an \[`AgentBase`]: every standard agent operation -(`set_prompt_text`, `prompt_add_section`, `define_tool`, …) is -available through `Deref`/`DerefMut`. The single divergence is at -SWML rendering time: \[`BedrockAgent::render_swml`] takes the SWML -produced by `AgentBase::render_swml` and rewrites the `ai` verb -into an `amazon_bedrock` verb that carries Bedrock-specific -inference parameters (voice id, temperature, top-p) inside the -prompt object. - -## Signature - -```rust -struct BedrockAgent { /* fields */ } -``` - -## Inheritance - -**Implements:** `Deref`, `DerefMut`, `Debug` - -## Methods - -### agent - -Borrow the underlying `AgentBase` (read-only). - -#### Signature - -```rust -fn agent(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) - -Line 309. - -*** - -### agent\_mut - -Borrow the underlying `AgentBase` (mutable). Most consumers use -`Deref`/`DerefMut` for chaining; this is occasionally useful -when an explicit handle is needed. - -#### Signature - -```rust -fn agent_mut(&mut self) -> &mut ? -``` - -#### Returns - -`&mut ?` - -#### Source - -[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) - -Line 316. - -*** - -### deref - -#### Signature - -```rust -fn deref(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) - -Line 343. - -*** - -### deref\_mut - -#### Signature - -```rust -fn deref_mut(&mut self) -> &mut ? -``` - -#### Returns - -`&mut ?` - -#### Source - -[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) - -Line 349. - -*** - -### fmt - -#### Signature - -```rust -fn fmt(&self, f: &mut ?<'_>) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) - -Line 355. - -*** - -### max\_tokens - -Current max-tokens cap. - -#### Signature - -```rust -fn max_tokens(&self) -> u32 -``` - -#### Returns - -`u32` - -#### Source - -[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) - -Line 336. - -*** - -### new - -Construct a new BedrockAgent. - -Mirrors Python's -`BedrockAgent(name=..., route=..., system_prompt=..., voice_id=..., -temperature=..., top_p=..., max_tokens=..., **kwargs)`. - -#### Signature - -```rust -fn new(options: ?) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) - -Line 99. - -*** - -### render\_swml - -Render SWML, transforming the `ai` verb into an -`amazon_bedrock` verb that carries the Bedrock voice and -inference parameters. Mirrors Python's `_render_swml`. - -#### Signature - -```rust -fn render_swml(&self, headers: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) - -Line 202. - -*** - -### repr - -String representation matching Python's `__repr__`. - -#### Signature - -```rust -fn repr(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) - -Line 299. - -*** - -### set\_inference\_params - -Update Bedrock inference parameters. Pass `None` to keep an -existing value untouched. Mirrors the Python signature. - -#### Signature - -```rust -fn set_inference_params( - &mut self, - temperature: ?, - top_p: ?, - max_tokens: ? -) -> &mut Self -``` - -#### Parameters - - - - - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) - -Line 141. - -*** - -### set\_llm\_model - -Set LLM model — not applicable for Bedrock. Logs a warning and -is a no-op (Bedrock uses a fixed voice-to-voice model). Matches -Python's documented behavior. - -#### Signature - -```rust -fn set_llm_model(&mut self, model: &str) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) - -Line 166. - -*** - -### set\_llm\_temperature - -Set LLM temperature — redirects to `set_inference_params` for -Bedrock. Matches Python's documented behavior. - -#### Signature - -```rust -fn set_llm_temperature(&mut self, temperature: f64) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) - -Line 176. - -*** - -### set\_post\_prompt\_llm\_params - -Set post-prompt LLM params — not applicable for Bedrock. Logs a -warning and is a no-op (post-prompt summarisation runs on a -platform-side model). Matches Python's documented behavior. - -#### Signature - -```rust -fn set_post_prompt_llm_params(&mut self, _params: ?) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) - -Line 183. - -*** - -### set\_prompt\_llm\_params - -Set prompt LLM params — Bedrock callers should use -`set_inference_params` instead. Logs a warning and is a no-op. -Matches Python's documented behavior. - -#### Signature - -```rust -fn set_prompt_llm_params(&mut self, _params: ?) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) - -Line 193. - -*** - -### set\_voice - -Set the Bedrock voice id (e.g. `"matthew"`, `"joanna"`). - -#### Signature - -```rust -fn set_voice(&mut self, voice_id: &str) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) - -Line 133. - -*** - -### temperature - -Current generation temperature. - -#### Signature - -```rust -fn temperature(&self) -> f64 -``` - -#### Returns - -`f64` - -#### Source - -[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) - -Line 326. - -*** - -### top\_p - -Current nucleus sampling parameter. - -#### Signature - -```rust -fn top_p(&self) -> f64 -``` - -#### Returns - -`f64` - -#### Source - -[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) - -Line 331. - -*** - -### voice\_id - -Current voice id. - -#### Signature - -```rust -fn voice_id(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) - -Line 321. - -## Type Aliases - -### Target - -#### Source - -[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) - -Line 342. - -## Source - -[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) - -Line 28. diff --git a/fern/products/sdk-reference/rust/signalwire/prefabs/bedrock/bedrock-options/index.mdx b/fern/products/sdk-reference/rust/signalwire/prefabs/bedrock/bedrock-options/index.mdx deleted file mode 100644 index 023bc2f8d5..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/prefabs/bedrock/bedrock-options/index.mdx +++ /dev/null @@ -1,129 +0,0 @@ ---- -slug: "/reference/rust/signalwire/prefabs/bedrock/bedrock-options" -title: "BedrockOptions" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::prefabs::bedrock::BedrockOptions" - parent: "signalwire::prefabs::bedrock" - module: "prefabs.bedrock" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs" - visibility: "public" ---- -# `BedrockOptions` - -Construction options for \[`BedrockAgent`]. Mirrors the keyword -arguments of Python's `BedrockAgent.__init__`. - -**Decorators:** `@must_use` - -## Signature - -```rust -struct BedrockOptions { /* fields */ } -``` - -## Inheritance - -**Implements:** `Default` - -## Properties - - - Optional basic-auth password override. - - - - Optional basic-auth user override. - - - - Optional bind host override. - - - - Max generation tokens (default `1024`). - - - - Agent name (default `"bedrock_agent"`). - - - - Optional bind port override. - - - - HTTP route (default `"/bedrock"`). - - - - Optional system prompt to register with `set_prompt_text`. - - - - Generation temperature 0..1 (default `0.7`). - - - - Nucleus sampling top-p 0..1 (default `0.9`). - - - - Bedrock voice id (default `"matthew"`). - - -## Methods - -### default - -#### Signature - -```rust -fn default() -> Self -``` - -#### Returns - -`Self` - -#### Source - -[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) - -Line 66. - -*** - -### with\_name - -Convenience: create with a name (other fields keep defaults). - -#### Signature - -```rust -fn with_name(name: &str) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) - -Line 85. - -## Source - -[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) - -Line 40. diff --git a/fern/products/sdk-reference/rust/signalwire/prefabs/bedrock/index.mdx b/fern/products/sdk-reference/rust/signalwire/prefabs/bedrock/index.mdx deleted file mode 100644 index 3146d6d315..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/prefabs/bedrock/index.mdx +++ /dev/null @@ -1,44 +0,0 @@ ---- -slug: "/reference/rust/signalwire/prefabs/bedrock" -title: "bedrock" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "signalwire::prefabs::bedrock" - parent: "signalwire::prefabs" - module: "prefabs" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs" - visibility: "public" ---- -# `bedrock` - -Amazon Bedrock voice-to-voice agent. - -`BedrockAgent` extends \[`AgentBase`] (via composition + `Deref`) so it -shares all of AgentBase's features (prompt building, skills, tools, -post-prompt, dynamic configuration) but emits an `amazon_bedrock` -verb in the rendered SWML document instead of the standard `ai` -verb. - -Mirrors the Python `signalwire.agents.bedrock.BedrockAgent`. - -## Classes - - - - Voice-to-voice agent backed by Amazon Bedrock. - - - - Construction options for \[`BedrockAgent`]. Mirrors the keyword arguments of Python's `BedrockAgent.__init__`. - - - -## Source - -[`src/prefabs/bedrock.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/bedrock.rs) - -Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/prefabs/concierge/concierge-agent/index.mdx b/fern/products/sdk-reference/rust/signalwire/prefabs/concierge/concierge-agent/index.mdx deleted file mode 100644 index 69cbbcdf14..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/prefabs/concierge/concierge-agent/index.mdx +++ /dev/null @@ -1,161 +0,0 @@ ---- -slug: "/reference/rust/signalwire/prefabs/concierge/concierge-agent" -title: "ConciergeAgent" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::prefabs::concierge::ConciergeAgent" - parent: "signalwire::prefabs::concierge" - module: "prefabs.concierge" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/concierge.rs" - visibility: "public" ---- -# `ConciergeAgent` - -A pre-built concierge agent for venues — answers questions about services, -amenities, hours, and provides directions. - -## Signature - -```rust -struct ConciergeAgent { /* fields */ } -``` - -## Methods - -### agent - -#### Signature - -```rust -fn agent(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/prefabs/concierge.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/concierge.rs) - -Line 227. - -*** - -### agent\_mut - -#### Signature - -```rust -fn agent_mut(&mut self) -> &mut ? -``` - -#### Returns - -`&mut ?` - -#### Source - -[`src/prefabs/concierge.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/concierge.rs) - -Line 231. - -*** - -### amenities - -#### Signature - -```rust -fn amenities(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/prefabs/concierge.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/concierge.rs) - -Line 243. - -*** - -### new - -Create a new ConciergeAgent. - -#### Signature - -```rust -fn new(name: &str, venue_info: &?, route: ?<&str>) -> Self -``` - -#### Parameters - - - - - - - -#### Returns - -`Self` - -#### Source - -[`src/prefabs/concierge.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/concierge.rs) - -Line 25. - -*** - -### services - -#### Signature - -```rust -fn services(&self) -> &[?] -``` - -#### Returns - -`&[?]` - -#### Source - -[`src/prefabs/concierge.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/concierge.rs) - -Line 239. - -*** - -### venue\_name - -#### Signature - -```rust -fn venue_name(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/prefabs/concierge.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/concierge.rs) - -Line 235. - -## Source - -[`src/prefabs/concierge.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/concierge.rs) - -Line 10. diff --git a/fern/products/sdk-reference/rust/signalwire/prefabs/concierge/index.mdx b/fern/products/sdk-reference/rust/signalwire/prefabs/concierge/index.mdx deleted file mode 100644 index f37cf31ee8..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/prefabs/concierge/index.mdx +++ /dev/null @@ -1,30 +0,0 @@ ---- -slug: "/reference/rust/signalwire/prefabs/concierge" -title: "concierge" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "signalwire::prefabs::concierge" - parent: "signalwire::prefabs" - module: "prefabs" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/concierge.rs" - visibility: "public" ---- -# `concierge` - -## Classes - - - - A pre-built concierge agent for venues — answers questions about services, amenities, hours, and provides directions. - - - -## Source - -[`src/prefabs/concierge.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/concierge.rs) - -Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/prefabs/faq-bot/faq-bot-agent/index.mdx b/fern/products/sdk-reference/rust/signalwire/prefabs/faq-bot/faq-bot-agent/index.mdx deleted file mode 100644 index e43c97b86d..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/prefabs/faq-bot/faq-bot-agent/index.mdx +++ /dev/null @@ -1,150 +0,0 @@ ---- -slug: "/reference/rust/signalwire/prefabs/faq-bot/faq-bot-agent" -title: "FAQBotAgent" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::prefabs::faq_bot::FAQBotAgent" - parent: "signalwire::prefabs::faq_bot" - module: "prefabs.faq_bot" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/faq_bot.rs" - visibility: "public" ---- -# `FAQBotAgent` - -A pre-built FAQ bot agent that provides answers from a knowledge base. - -## Signature - -```rust -struct FAQBotAgent { /* fields */ } -``` - -## Methods - -### agent - -#### Signature - -```rust -fn agent(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/prefabs/faq_bot.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/faq_bot.rs) - -Line 172. - -*** - -### agent\_mut - -#### Signature - -```rust -fn agent_mut(&mut self) -> &mut ? -``` - -#### Returns - -`&mut ?` - -#### Source - -[`src/prefabs/faq_bot.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/faq_bot.rs) - -Line 176. - -*** - -### faqs - -#### Signature - -```rust -fn faqs(&self) -> &[?] -``` - -#### Returns - -`&[?]` - -#### Source - -[`src/prefabs/faq_bot.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/faq_bot.rs) - -Line 180. - -*** - -### new - -Create a new FAQBotAgent. - -#### Signature - -```rust -fn new( - name: &str, - faqs: ?, - suggest_related: bool, - persona: ?<&str>, - route: ?<&str> -) -> Self -``` - -#### Parameters - - - - - - - - - - - -#### Returns - -`Self` - -#### Source - -[`src/prefabs/faq_bot.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/faq_bot.rs) - -Line 22. - -*** - -### suggest\_related - -#### Signature - -```rust -fn suggest_related(&self) -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`src/prefabs/faq_bot.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/faq_bot.rs) - -Line 184. - -## Source - -[`src/prefabs/faq_bot.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/faq_bot.rs) - -Line 7. diff --git a/fern/products/sdk-reference/rust/signalwire/prefabs/faq-bot/index.mdx b/fern/products/sdk-reference/rust/signalwire/prefabs/faq-bot/index.mdx deleted file mode 100644 index 6940e2b66f..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/prefabs/faq-bot/index.mdx +++ /dev/null @@ -1,30 +0,0 @@ ---- -slug: "/reference/rust/signalwire/prefabs/faq-bot" -title: "faq_bot" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "signalwire::prefabs::faq_bot" - parent: "signalwire::prefabs" - module: "prefabs" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/faq_bot.rs" - visibility: "public" ---- -# `faq_bot` - -## Classes - - - - A pre-built FAQ bot agent that provides answers from a knowledge base. - - - -## Source - -[`src/prefabs/faq_bot.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/faq_bot.rs) - -Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/prefabs/index.mdx b/fern/products/sdk-reference/rust/signalwire/prefabs/index.mdx deleted file mode 100644 index 64b26dca18..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/prefabs/index.mdx +++ /dev/null @@ -1,39 +0,0 @@ ---- -slug: "/reference/rust/signalwire/prefabs" -title: "prefabs" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "signalwire::prefabs" - parent: "signalwire" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/mod.rs" - visibility: "public" ---- -# `prefabs` - -## Modules - - - - Amazon Bedrock voice-to-voice agent. - - - - - - - - - - - - - -## Source - -[`src/prefabs/mod.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/mod.rs) - -Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/prefabs/info-gatherer/index.mdx b/fern/products/sdk-reference/rust/signalwire/prefabs/info-gatherer/index.mdx deleted file mode 100644 index 96b438c941..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/prefabs/info-gatherer/index.mdx +++ /dev/null @@ -1,30 +0,0 @@ ---- -slug: "/reference/rust/signalwire/prefabs/info-gatherer" -title: "info_gatherer" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "signalwire::prefabs::info_gatherer" - parent: "signalwire::prefabs" - module: "prefabs" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/info_gatherer.rs" - visibility: "public" ---- -# `info_gatherer` - -## Classes - - - - A pre-built agent that asks a series of questions and collects answers. - - - -## Source - -[`src/prefabs/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/info_gatherer.rs) - -Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/prefabs/info-gatherer/info-gatherer-agent/index.mdx b/fern/products/sdk-reference/rust/signalwire/prefabs/info-gatherer/info-gatherer-agent/index.mdx deleted file mode 100644 index 2ebe08fd27..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/prefabs/info-gatherer/info-gatherer-agent/index.mdx +++ /dev/null @@ -1,126 +0,0 @@ ---- -slug: "/reference/rust/signalwire/prefabs/info-gatherer/info-gatherer-agent" -title: "InfoGathererAgent" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::prefabs::info_gatherer::InfoGathererAgent" - parent: "signalwire::prefabs::info_gatherer" - module: "prefabs.info_gatherer" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/info_gatherer.rs" - visibility: "public" ---- -# `InfoGathererAgent` - -A pre-built agent that asks a series of questions and collects answers. - -## Signature - -```rust -struct InfoGathererAgent { /* fields */ } -``` - -## Methods - -### agent - -Access the underlying `AgentBase`. - -#### Signature - -```rust -fn agent(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/prefabs/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/info_gatherer.rs) - -Line 96. - -*** - -### agent\_mut - -Access the underlying `AgentBase` mutably. - -#### Signature - -```rust -fn agent_mut(&mut self) -> &mut ? -``` - -#### Returns - -`&mut ?` - -#### Source - -[`src/prefabs/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/info_gatherer.rs) - -Line 101. - -*** - -### new - -Create a new InfoGathererAgent. - -#### Signature - -```rust -fn new(name: &str, questions: ?, route: ?<&str>) -> Self -``` - -#### Parameters - - - - - - - -#### Returns - -`Self` - -#### Source - -[`src/prefabs/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/info_gatherer.rs) - -Line 19. - -*** - -### questions - -Get the configured questions. - -#### Signature - -```rust -fn questions(&self) -> &[?] -``` - -#### Returns - -`&[?]` - -#### Source - -[`src/prefabs/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/info_gatherer.rs) - -Line 106. - -## Source - -[`src/prefabs/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/info_gatherer.rs) - -Line 7. diff --git a/fern/products/sdk-reference/rust/signalwire/prefabs/receptionist/index.mdx b/fern/products/sdk-reference/rust/signalwire/prefabs/receptionist/index.mdx deleted file mode 100644 index efb91bf4e2..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/prefabs/receptionist/index.mdx +++ /dev/null @@ -1,30 +0,0 @@ ---- -slug: "/reference/rust/signalwire/prefabs/receptionist" -title: "receptionist" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "signalwire::prefabs::receptionist" - parent: "signalwire::prefabs" - module: "prefabs" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/receptionist.rs" - visibility: "public" ---- -# `receptionist` - -## Classes - - - - A pre-built receptionist agent that routes callers to departments. - - - -## Source - -[`src/prefabs/receptionist.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/receptionist.rs) - -Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/prefabs/receptionist/receptionist-agent/index.mdx b/fern/products/sdk-reference/rust/signalwire/prefabs/receptionist/receptionist-agent/index.mdx deleted file mode 100644 index f0befcf2ea..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/prefabs/receptionist/receptionist-agent/index.mdx +++ /dev/null @@ -1,142 +0,0 @@ ---- -slug: "/reference/rust/signalwire/prefabs/receptionist/receptionist-agent" -title: "ReceptionistAgent" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::prefabs::receptionist::ReceptionistAgent" - parent: "signalwire::prefabs::receptionist" - module: "prefabs.receptionist" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/receptionist.rs" - visibility: "public" ---- -# `ReceptionistAgent` - -A pre-built receptionist agent that routes callers to departments. - -## Signature - -```rust -struct ReceptionistAgent { /* fields */ } -``` - -## Methods - -### agent - -#### Signature - -```rust -fn agent(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/prefabs/receptionist.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/receptionist.rs) - -Line 154. - -*** - -### agent\_mut - -#### Signature - -```rust -fn agent_mut(&mut self) -> &mut ? -``` - -#### Returns - -`&mut ?` - -#### Source - -[`src/prefabs/receptionist.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/receptionist.rs) - -Line 158. - -*** - -### departments - -#### Signature - -```rust -fn departments(&self) -> &[?] -``` - -#### Returns - -`&[?]` - -#### Source - -[`src/prefabs/receptionist.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/receptionist.rs) - -Line 162. - -*** - -### greeting - -#### Signature - -```rust -fn greeting(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/prefabs/receptionist.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/receptionist.rs) - -Line 166. - -*** - -### new - -Create a new ReceptionistAgent. - -#### Signature - -```rust -fn new(name: &str, departments: ?, greeting: ?<&str>, route: ?<&str>) -> Self -``` - -#### Parameters - - - - - - - - - -#### Returns - -`Self` - -#### Source - -[`src/prefabs/receptionist.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/receptionist.rs) - -Line 21. - -## Source - -[`src/prefabs/receptionist.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/receptionist.rs) - -Line 7. diff --git a/fern/products/sdk-reference/rust/signalwire/prefabs/survey/index.mdx b/fern/products/sdk-reference/rust/signalwire/prefabs/survey/index.mdx deleted file mode 100644 index 6f99850671..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/prefabs/survey/index.mdx +++ /dev/null @@ -1,30 +0,0 @@ ---- -slug: "/reference/rust/signalwire/prefabs/survey" -title: "survey" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "signalwire::prefabs::survey" - parent: "signalwire::prefabs" - module: "prefabs" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/survey.rs" - visibility: "public" ---- -# `survey` - -## Classes - - - - A pre-built agent for conducting surveys with typed question validation. - - - -## Source - -[`src/prefabs/survey.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/survey.rs) - -Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/prefabs/survey/survey-agent/index.mdx b/fern/products/sdk-reference/rust/signalwire/prefabs/survey/survey-agent/index.mdx deleted file mode 100644 index 96af475458..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/prefabs/survey/survey-agent/index.mdx +++ /dev/null @@ -1,140 +0,0 @@ ---- -slug: "/reference/rust/signalwire/prefabs/survey/survey-agent" -title: "SurveyAgent" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::prefabs::survey::SurveyAgent" - parent: "signalwire::prefabs::survey" - module: "prefabs.survey" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/survey.rs" - visibility: "public" ---- -# `SurveyAgent` - -A pre-built agent for conducting surveys with typed question validation. - -## Signature - -```rust -struct SurveyAgent { /* fields */ } -``` - -## Methods - -### agent - -#### Signature - -```rust -fn agent(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/prefabs/survey.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/survey.rs) - -Line 240. - -*** - -### agent\_mut - -#### Signature - -```rust -fn agent_mut(&mut self) -> &mut ? -``` - -#### Returns - -`&mut ?` - -#### Source - -[`src/prefabs/survey.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/survey.rs) - -Line 244. - -*** - -### new - -Create a new SurveyAgent. - -#### Signature - -```rust -fn new(name: &str, questions: ?, options: ?<&?>) -> Self -``` - -#### Parameters - - - - - - - -#### Returns - -`Self` - -#### Source - -[`src/prefabs/survey.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/survey.rs) - -Line 21. - -*** - -### survey\_name - -#### Signature - -```rust -fn survey_name(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/prefabs/survey.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/survey.rs) - -Line 248. - -*** - -### survey\_questions - -#### Signature - -```rust -fn survey_questions(&self) -> &[?] -``` - -#### Returns - -`&[?]` - -#### Source - -[`src/prefabs/survey.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/survey.rs) - -Line 252. - -## Source - -[`src/prefabs/survey.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/survey.rs) - -Line 7. diff --git a/fern/products/sdk-reference/rust/signalwire/relay/action/ai-action/index.mdx b/fern/products/sdk-reference/rust/signalwire/relay/action/ai-action/index.mdx deleted file mode 100644 index 3bb7b4528e..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/relay/action/ai-action/index.mdx +++ /dev/null @@ -1,114 +0,0 @@ ---- -slug: "/reference/rust/signalwire/relay/action/ai-action" -title: "AIAction" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::relay::action::AIAction" - parent: "signalwire::relay::action" - module: "relay.action" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs" - visibility: "public" ---- -# `AIAction` - -## Signature - -```rust -struct AIAction { /* fields */ } -``` - -## Inheritance - -**Implements:** `Deref` - -## Properties - - - -## Methods - -### action - -#### Signature - -```rust -fn action(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 425. - -*** - -### deref - -#### Signature - -```rust -fn deref(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 425. - -*** - -### new - -#### Signature - -```rust -fn new(control_id: &str, call_id: &str, node_id: &str) -> Self -``` - -#### Parameters - - - - - - - -#### Returns - -`Self` - -#### Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 425. - -## Type Aliases - -### Target - -#### Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 425. - -## Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 425. diff --git a/fern/products/sdk-reference/rust/signalwire/relay/action/collect-action/index.mdx b/fern/products/sdk-reference/rust/signalwire/relay/action/collect-action/index.mdx deleted file mode 100644 index ca23a2f7b0..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/relay/action/collect-action/index.mdx +++ /dev/null @@ -1,172 +0,0 @@ ---- -slug: "/reference/rust/signalwire/relay/action/collect-action" -title: "CollectAction" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::relay::action::CollectAction" - parent: "signalwire::relay::action" - module: "relay.action" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs" - visibility: "public" ---- -# `CollectAction` - -## Signature - -```rust -struct CollectAction { /* fields */ } -``` - -## Inheritance - -**Implements:** `Deref` - -## Properties - - - -## Methods - -### action - -#### Signature - -```rust -fn action(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 344. - -*** - -### collect\_result - -#### Signature - -```rust -fn collect_result(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 352. - -*** - -### deref - -#### Signature - -```rust -fn deref(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 367. - -*** - -### handle\_event\_filtered - -Handle an event, silently ignoring intermediate play events. - -#### Signature - -```rust -fn handle_event_filtered(&self, event: &?) -``` - -#### Parameters - - - -#### Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 357. - -*** - -### new - -#### Signature - -```rust -fn new(control_id: &str, call_id: &str, node_id: &str) -> Self -``` - -#### Parameters - - - - - - - -#### Returns - -`Self` - -#### Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 333. - -*** - -### start\_input\_timers - -#### Signature - -```rust -fn start_input_timers(&self) -``` - -#### Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 348. - -## Type Aliases - -### Target - -#### Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 366. - -## Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 328. diff --git a/fern/products/sdk-reference/rust/signalwire/relay/action/detect-action/index.mdx b/fern/products/sdk-reference/rust/signalwire/relay/action/detect-action/index.mdx deleted file mode 100644 index 7a0267fb8f..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/relay/action/detect-action/index.mdx +++ /dev/null @@ -1,134 +0,0 @@ ---- -slug: "/reference/rust/signalwire/relay/action/detect-action" -title: "DetectAction" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::relay::action::DetectAction" - parent: "signalwire::relay::action" - module: "relay.action" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs" - visibility: "public" ---- -# `DetectAction` - -## Signature - -```rust -struct DetectAction { /* fields */ } -``` - -## Inheritance - -**Implements:** `Deref` - -## Properties - - - -## Methods - -### action - -#### Signature - -```rust -fn action(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 374. - -*** - -### deref - -#### Signature - -```rust -fn deref(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 374. - -*** - -### detect\_result - -#### Signature - -```rust -fn detect_result(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 377. - -*** - -### new - -#### Signature - -```rust -fn new(control_id: &str, call_id: &str, node_id: &str) -> Self -``` - -#### Parameters - - - - - - - -#### Returns - -`Self` - -#### Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 374. - -## Type Aliases - -### Target - -#### Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 374. - -## Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 374. diff --git a/fern/products/sdk-reference/rust/signalwire/relay/action/fax-action/index.mdx b/fern/products/sdk-reference/rust/signalwire/relay/action/fax-action/index.mdx deleted file mode 100644 index f51e828468..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/relay/action/fax-action/index.mdx +++ /dev/null @@ -1,138 +0,0 @@ ---- -slug: "/reference/rust/signalwire/relay/action/fax-action" -title: "FaxAction" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::relay::action::FaxAction" - parent: "signalwire::relay::action" - module: "relay.action" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs" - visibility: "public" ---- -# `FaxAction` - -## Signature - -```rust -struct FaxAction { /* fields */ } -``` - -## Inheritance - -**Implements:** `Deref` - -## Properties - - - - - -## Methods - -### action - -#### Signature - -```rust -fn action(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 403. - -*** - -### deref - -#### Signature - -```rust -fn deref(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 414. - -*** - -### fax\_type - -#### Signature - -```rust -fn fax_type(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 407. - -*** - -### new - -#### Signature - -```rust -fn new(control_id: &str, call_id: &str, node_id: &str, fax_type: &str) -> Self -``` - -#### Parameters - - - - - - - - - -#### Returns - -`Self` - -#### Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 391. - -## Type Aliases - -### Target - -#### Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 413. - -## Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 385. diff --git a/fern/products/sdk-reference/rust/signalwire/relay/action/index.mdx b/fern/products/sdk-reference/rust/signalwire/relay/action/index.mdx deleted file mode 100644 index 80cd967c70..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/relay/action/index.mdx +++ /dev/null @@ -1,456 +0,0 @@ ---- -slug: "/reference/rust/signalwire/relay/action" -title: "action" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::relay::action" - parent: "signalwire::relay" - module: "relay" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs" - visibility: "public" ---- -# `action` - -Base class for all RELAY call actions (play, record, collect, etc.). - -An Action is the client-side handle returned when you start an -asynchronous operation on a call. It accumulates events, tracks -state, and resolves once the operation reaches a terminal state. - -## Signature - -```rust -struct Action { /* fields */ } -``` - -## Classes - - - - - - - - - - - - - - - - - - - - - - - -## Methods - -### call\_id - -#### Signature - -```rust -fn call_id(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 75. - -*** - -### control\_id - -#### Signature - -```rust -fn control_id(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 71. - -*** - -### events - -#### Signature - -```rust -fn events(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 99. - -*** - -### execute\_subcommand - -Send a sub-command RPC through the client. - -#### Signature - -```rust -fn execute_subcommand(&self, method: &str, extra: ?) -``` - -#### Parameters - - - - - -#### Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 199. - -*** - -### handle\_event - -Append an incoming event and update local state / payload. -Subclasses override `should_handle_event` to filter. - -#### Signature - -```rust -fn handle_event(&self, event: &?) -``` - -#### Parameters - - - -#### Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 139. - -*** - -### is\_done - -#### Signature - -```rust -fn is_done(&self) -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 83. - -*** - -### new - -#### Signature - -```rust -fn new(control_id: &str, call_id: &str, node_id: &str) -> Self -``` - -#### Parameters - - - - - - - -#### Returns - -`Self` - -#### Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 40. - -*** - -### node\_id - -#### Signature - -```rust -fn node_id(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 79. - -*** - -### on\_completed - -Register a callback to fire when the action completes. -If the action is already done, the callback fires immediately. - -#### Signature - -```rust -fn on_completed(&self, cb: F) -``` - -#### Type Parameters - - - -#### Parameters - - - -#### Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 123. - -*** - -### payload - -#### Signature - -```rust -fn payload(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 95. - -*** - -### resolve - -Mark this action as completed. - -#### Signature - -```rust -fn resolve(&self, result: ?) -``` - -#### Parameters - - - -#### Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 168. - -*** - -### result - -#### Signature - -```rust -fn result(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 91. - -*** - -### set\_notify\_sender - -Install a channel sender so that `wait_sync()` can block until -the action resolves. - -#### Signature - -```rust -fn set_notify_sender(&self, tx: ?<()>) -``` - -#### Parameters - - - -#### Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 113. - -*** - -### state - -#### Signature - -```rust -fn state(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 87. - -*** - -### stop - -Stop the running action by sending its stop sub-command. - -#### Signature - -```rust -fn stop(&self) -``` - -#### Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 192. - -*** - -### stop\_method - -#### Signature - -```rust -fn stop_method(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 103. - -*** - -### with\_stop\_method - -#### Signature - -```rust -fn with_stop_method( - control_id: &str, - call_id: &str, - node_id: &str, - stop_method: &str -) -> Self -``` - -#### Parameters - - - - - - - - - -#### Returns - -`Self` - -#### Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 44. - -## Type Aliases - -### CompletedCallback - -Callback type for completion notifications. - -#### Signature - -```rust -type CompletedCallback = ? -``` - -#### Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 9. - -## Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 20. diff --git a/fern/products/sdk-reference/rust/signalwire/relay/action/pay-action/index.mdx b/fern/products/sdk-reference/rust/signalwire/relay/action/pay-action/index.mdx deleted file mode 100644 index 469469a354..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/relay/action/pay-action/index.mdx +++ /dev/null @@ -1,114 +0,0 @@ ---- -slug: "/reference/rust/signalwire/relay/action/pay-action" -title: "PayAction" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::relay::action::PayAction" - parent: "signalwire::relay::action" - module: "relay.action" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs" - visibility: "public" ---- -# `PayAction` - -## Signature - -```rust -struct PayAction { /* fields */ } -``` - -## Inheritance - -**Implements:** `Deref` - -## Properties - - - -## Methods - -### action - -#### Signature - -```rust -fn action(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 423. - -*** - -### deref - -#### Signature - -```rust -fn deref(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 423. - -*** - -### new - -#### Signature - -```rust -fn new(control_id: &str, call_id: &str, node_id: &str) -> Self -``` - -#### Parameters - - - - - - - -#### Returns - -`Self` - -#### Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 423. - -## Type Aliases - -### Target - -#### Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 423. - -## Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 423. diff --git a/fern/products/sdk-reference/rust/signalwire/relay/action/play-action/index.mdx b/fern/products/sdk-reference/rust/signalwire/relay/action/play-action/index.mdx deleted file mode 100644 index 080c4cce71..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/relay/action/play-action/index.mdx +++ /dev/null @@ -1,166 +0,0 @@ ---- -slug: "/reference/rust/signalwire/relay/action/play-action" -title: "PlayAction" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::relay::action::PlayAction" - parent: "signalwire::relay::action" - module: "relay.action" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs" - visibility: "public" ---- -# `PlayAction` - -## Signature - -```rust -struct PlayAction { /* fields */ } -``` - -## Inheritance - -**Implements:** `Deref` - -## Properties - - - -## Methods - -### action - -#### Signature - -```rust -fn action(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 279. - -*** - -### deref - -#### Signature - -```rust -fn deref(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 279. - -*** - -### new - -#### Signature - -```rust -fn new(control_id: &str, call_id: &str, node_id: &str) -> Self -``` - -#### Parameters - - - - - - - -#### Returns - -`Self` - -#### Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 279. - -*** - -### pause - -#### Signature - -```rust -fn pause(&self) -``` - -#### Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 282. - -*** - -### resume - -#### Signature - -```rust -fn resume(&self) -``` - -#### Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 286. - -*** - -### volume - -#### Signature - -```rust -fn volume(&self, db: f64) -``` - -#### Parameters - - - -#### Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 290. - -## Type Aliases - -### Target - -#### Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 279. - -## Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 279. diff --git a/fern/products/sdk-reference/rust/signalwire/relay/action/record-action/index.mdx b/fern/products/sdk-reference/rust/signalwire/relay/action/record-action/index.mdx deleted file mode 100644 index e58bbd312f..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/relay/action/record-action/index.mdx +++ /dev/null @@ -1,206 +0,0 @@ ---- -slug: "/reference/rust/signalwire/relay/action/record-action" -title: "RecordAction" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::relay::action::RecordAction" - parent: "signalwire::relay::action" - module: "relay.action" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs" - visibility: "public" ---- -# `RecordAction` - -## Signature - -```rust -struct RecordAction { /* fields */ } -``` - -## Inheritance - -**Implements:** `Deref` - -## Properties - - - -## Methods - -### action - -#### Signature - -```rust -fn action(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 299. - -*** - -### deref - -#### Signature - -```rust -fn deref(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 299. - -*** - -### duration - -#### Signature - -```rust -fn duration(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 317. - -*** - -### new - -#### Signature - -```rust -fn new(control_id: &str, call_id: &str, node_id: &str) -> Self -``` - -#### Parameters - - - - - - - -#### Returns - -`Self` - -#### Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 299. - -*** - -### pause - -#### Signature - -```rust -fn pause(&self) -``` - -#### Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 302. - -*** - -### resume - -#### Signature - -```rust -fn resume(&self) -``` - -#### Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 306. - -*** - -### size - -#### Signature - -```rust -fn size(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 321. - -*** - -### url - -#### Signature - -```rust -fn url(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 310. - -## Type Aliases - -### Target - -#### Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 299. - -## Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 299. diff --git a/fern/products/sdk-reference/rust/signalwire/relay/action/stream-action/index.mdx b/fern/products/sdk-reference/rust/signalwire/relay/action/stream-action/index.mdx deleted file mode 100644 index 9baf6dfa61..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/relay/action/stream-action/index.mdx +++ /dev/null @@ -1,114 +0,0 @@ ---- -slug: "/reference/rust/signalwire/relay/action/stream-action" -title: "StreamAction" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::relay::action::StreamAction" - parent: "signalwire::relay::action" - module: "relay.action" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs" - visibility: "public" ---- -# `StreamAction` - -## Signature - -```rust -struct StreamAction { /* fields */ } -``` - -## Inheritance - -**Implements:** `Deref` - -## Properties - - - -## Methods - -### action - -#### Signature - -```rust -fn action(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 422. - -*** - -### deref - -#### Signature - -```rust -fn deref(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 422. - -*** - -### new - -#### Signature - -```rust -fn new(control_id: &str, call_id: &str, node_id: &str) -> Self -``` - -#### Parameters - - - - - - - -#### Returns - -`Self` - -#### Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 422. - -## Type Aliases - -### Target - -#### Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 422. - -## Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 422. diff --git a/fern/products/sdk-reference/rust/signalwire/relay/action/tap-action/index.mdx b/fern/products/sdk-reference/rust/signalwire/relay/action/tap-action/index.mdx deleted file mode 100644 index d321787786..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/relay/action/tap-action/index.mdx +++ /dev/null @@ -1,114 +0,0 @@ ---- -slug: "/reference/rust/signalwire/relay/action/tap-action" -title: "TapAction" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::relay::action::TapAction" - parent: "signalwire::relay::action" - module: "relay.action" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs" - visibility: "public" ---- -# `TapAction` - -## Signature - -```rust -struct TapAction { /* fields */ } -``` - -## Inheritance - -**Implements:** `Deref` - -## Properties - - - -## Methods - -### action - -#### Signature - -```rust -fn action(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 421. - -*** - -### deref - -#### Signature - -```rust -fn deref(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 421. - -*** - -### new - -#### Signature - -```rust -fn new(control_id: &str, call_id: &str, node_id: &str) -> Self -``` - -#### Parameters - - - - - - - -#### Returns - -`Self` - -#### Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 421. - -## Type Aliases - -### Target - -#### Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 421. - -## Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 421. diff --git a/fern/products/sdk-reference/rust/signalwire/relay/action/transcribe-action/index.mdx b/fern/products/sdk-reference/rust/signalwire/relay/action/transcribe-action/index.mdx deleted file mode 100644 index cfbbd276c6..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/relay/action/transcribe-action/index.mdx +++ /dev/null @@ -1,114 +0,0 @@ ---- -slug: "/reference/rust/signalwire/relay/action/transcribe-action" -title: "TranscribeAction" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::relay::action::TranscribeAction" - parent: "signalwire::relay::action" - module: "relay.action" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs" - visibility: "public" ---- -# `TranscribeAction` - -## Signature - -```rust -struct TranscribeAction { /* fields */ } -``` - -## Inheritance - -**Implements:** `Deref` - -## Properties - - - -## Methods - -### action - -#### Signature - -```rust -fn action(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 424. - -*** - -### deref - -#### Signature - -```rust -fn deref(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 424. - -*** - -### new - -#### Signature - -```rust -fn new(control_id: &str, call_id: &str, node_id: &str) -> Self -``` - -#### Parameters - - - - - - - -#### Returns - -`Self` - -#### Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 424. - -## Type Aliases - -### Target - -#### Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 424. - -## Source - -[`src/relay/action.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs) - -Line 424. diff --git a/fern/products/sdk-reference/rust/signalwire/relay/call/index.mdx b/fern/products/sdk-reference/rust/signalwire/relay/call/index.mdx deleted file mode 100644 index e88a2e7fdf..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/relay/call/index.mdx +++ /dev/null @@ -1,1436 +0,0 @@ ---- -slug: "/reference/rust/signalwire/relay/call" -title: "call" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::relay::call" - parent: "signalwire::relay" - module: "relay" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs" - visibility: "public" ---- -# `call` - -Represents a RELAY voice call. - -Holds call-level state, dispatches server events to registered listeners -and to in-flight Action objects, and exposes every calling.\* RPC method -as a first-class Rust method. - -## Signature - -```rust -struct Call { /* fields */ } -``` - -## Properties - - - - - - - - - - - - - - - - - - - - - - - -## Methods - -### ai - -#### Signature - -```rust -fn ai(&self, params: ?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) - -Line 361. - -*** - -### ai\_hold - -#### Signature - -```rust -fn ai_hold(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) - -Line 285. - -*** - -### ai\_message - -#### Signature - -```rust -fn ai_message(&self, params: ?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) - -Line 281. - -*** - -### ai\_unhold - -#### Signature - -```rust -fn ai_unhold(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) - -Line 289. - -*** - -### amazon\_bedrock - -#### Signature - -```rust -fn amazon_bedrock(&self, params: ?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) - -Line 277. - -*** - -### answer - -#### Signature - -```rust -fn answer(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) - -Line 201. - -*** - -### bind\_digit - -#### Signature - -```rust -fn bind_digit(&self, params: ?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) - -Line 253. - -*** - -### call\_state - -Current call state as a typed \[`CallState`]. - -The typed counterpart to `current_state`: both -read the same underlying string, so -`call.call_state().as_str() == call.current_state()` always holds. An -unrecognised server value parses to \[`CallState::Other`] rather than -panicking. Enables `match call.call_state() { CallState::Ended => …, … }` -and `call.call_state().is_terminal()` instead of stringly comparisons. - -**Decorators:** `@must_use` - -#### Signature - -```rust -fn call_state(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) - -Line 101. - -*** - -### clear\_digit\_bindings - -#### Signature - -```rust -fn clear_digit_bindings(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) - -Line 257. - -*** - -### collect - -#### Signature - -```rust -fn collect(&self, params: ?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) - -Line 325. - -*** - -### connect - -#### Signature - -```rust -fn connect(&self, params: ?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) - -Line 213. - -*** - -### current\_state - -Current call state. - -#### Signature - -```rust -fn current_state(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) - -Line 88. - -*** - -### denoise - -#### Signature - -```rust -fn denoise(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) - -Line 229. - -*** - -### denoise\_stop - -#### Signature - -```rust -fn denoise_stop(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) - -Line 233. - -*** - -### detect - -#### Signature - -```rust -fn detect(&self, params: ?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) - -Line 333. - -*** - -### detect\_answering\_machine - -Detect human vs answering machine (AMD). Typed convenience over -\[`Call::detect`]. - -Wire shape: `detect {"type":"machine","params":{...only-provided...}}` -with an optional top-level `timeout`. `opts` may carry any of -`initial_timeout`, `end_silence_timeout`, `machine_voice_threshold`, -`machine_words_threshold`, `detect_interruptions`, -`detect_message_end`, and `timeout`. - -#### Signature - -```rust -fn detect_answering_machine(&self, opts: ?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) - -Line 486. - -*** - -### detect\_digit - -Detect DTMF digits. Typed convenience over \[`Call::detect`]. - -Wire shape: `detect {"type":"digit","params":{digits?}}` with an -optional top-level `timeout`. `opts` may carry `digits` (string) -and `timeout` (number). - -#### Signature - -```rust -fn detect_digit(&self, opts: ?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) - -Line 462. - -*** - -### detect\_fax - -Detect a fax tone (CED/CNG). Typed convenience over \[`Call::detect`]. - -Wire shape: `detect {"type":"fax","params":{tone?}}` with an optional -top-level `timeout`. `opts` may carry `tone` (string) and `timeout` -(number). - -#### Signature - -```rust -fn detect_fax(&self, opts: ?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) - -Line 516. - -*** - -### disconnect - -#### Signature - -```rust -fn disconnect(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) - -Line 217. - -*** - -### dispatch\_event - -Central event router invoked by the Client whenever a server event -targets this call. - -#### Signature - -```rust -fn dispatch_event(&self, event: &?) -``` - -#### Parameters - - - -#### Source - -[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) - -Line 121. - -*** - -### echo\_call - -#### Signature - -```rust -fn echo_call(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) - -Line 249. - -*** - -### hangup - -#### Signature - -```rust -fn hangup(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) - -Line 205. - -*** - -### hold - -#### Signature - -```rust -fn hold(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) - -Line 221. - -*** - -### join\_conference - -#### Signature - -```rust -fn join_conference(&self, params: ?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) - -Line 241. - -*** - -### join\_room - -#### Signature - -```rust -fn join_room(&self, params: ?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) - -Line 269. - -*** - -### leave\_conference - -#### Signature - -```rust -fn leave_conference(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) - -Line 245. - -*** - -### leave\_room - -#### Signature - -```rust -fn leave_room(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) - -Line 273. - -*** - -### live\_transcribe - -#### Signature - -```rust -fn live_transcribe(&self, params: ?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) - -Line 261. - -*** - -### live\_translate - -#### Signature - -```rust -fn live_translate(&self, params: ?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) - -Line 265. - -*** - -### new - -Construct a Call from a server params object. - -#### Signature - -```rust -fn new(params: &?) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) - -Line 47. - -*** - -### on - -Register a generic event listener on this call. - -#### Signature - -```rust -fn on(&self, cb: F) -``` - -#### Type Parameters - - - -#### Parameters - - - -#### Source - -[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) - -Line 182. - -*** - -### pass - -#### Signature - -```rust -fn pass(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) - -Line 209. - -*** - -### pay - -#### Signature - -```rust -fn pay(&self, params: ?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) - -Line 353. - -*** - -### play - -#### Signature - -```rust -fn play(&self, params: ?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) - -Line 317. - -*** - -### play\_and\_collect - -#### Signature - -```rust -fn play_and_collect(&self, params: ?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) - -Line 329. - -*** - -### play\_audio - -Play an audio file from a URL. Typed convenience over \[`Call::play`]. - -Wire shape: `play [{"type":"audio","params":{"url":...}}]` with an -optional top-level `volume` (read from `opts`). - -#### Signature - -```rust -fn play_audio(&self, url: &str, opts: ?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) - -Line 412. - -*** - -### play\_ringtone - -Play a named ringtone by country code. Typed convenience over -\[`Call::play`]. - -Wire shape: `play [{"type":"ringtone","params":{"name":..., -duration?}}]` with an optional top-level `volume`. -`opts` may carry `duration` and `volume` (numbers). - -#### Signature - -```rust -fn play_ringtone(&self, name: &str, opts: ?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) - -Line 440. - -*** - -### play\_silence - -Play silence for `duration` seconds. Typed convenience over -\[`Call::play`]. - -Wire shape: `play [{"type":"silence","params":{"duration":...}}]`. - -#### Signature - -```rust -fn play_silence(&self, duration: f64) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) - -Line 428. - -*** - -### play\_tts - -Play text-to-speech. Typed convenience over \[`Call::play`]. - -Wire shape: `play [{"type":"tts","params":{"text":...,language?, -gender?,voice?}}]` with an optional top-level `volume`. -`opts` may carry `language`, `gender`, `voice` (strings) and -`volume` (number). - -#### Signature - -```rust -fn play_tts(&self, text: &str, opts: ?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) - -Line 389. - -*** - -### prompt\_audio - -Play an audio file then collect input. Typed media over -\[`Call::play_and_collect`]. - -Wire shape: `play_and_collect [{"type":"audio","params":{"url":...}}]` -with the given `collect` object and an optional top-level `volume`. -`opts` may carry `volume` (number). - -#### Signature - -```rust -fn prompt_audio(&self, url: &str, collect: ?, opts: ?) -> ? -``` - -#### Parameters - - - - - - - -#### Returns - -`?` - -#### Source - -[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) - -Line 565. - -*** - -### prompt\_tts - -Play TTS then collect input. Typed media over -\[`Call::play_and_collect`]. - -Wire shape: `play_and_collect [{"type":"tts","params":{"text":..., -language?,gender?,voice?}}]` with the given `collect` object and an -optional top-level `volume`. `opts` may carry `language`, `gender`, -`voice` (strings) and `volume` (number). - -#### Signature - -```rust -fn prompt_tts(&self, text: &str, collect: ?, opts: ?) -> ? -``` - -#### Parameters - - - - - - - -#### Returns - -`?` - -#### Source - -[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) - -Line 539. - -*** - -### queue\_enter - -#### Signature - -```rust -fn queue_enter(&self, params: ?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) - -Line 297. - -*** - -### queue\_leave - -#### Signature - -```rust -fn queue_leave(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) - -Line 301. - -*** - -### receive\_fax - -#### Signature - -```rust -fn receive_fax(&self, params: ?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) - -Line 341. - -*** - -### record - -#### Signature - -```rust -fn record(&self, params: ?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) - -Line 321. - -*** - -### refer\_call - -#### Signature - -```rust -fn refer_call(&self, params: ?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) - -Line 305. - -*** - -### repr - -Python-style `__repr__` (mirrors `Call.__repr__` in the -signalwire-python reference). Returns a string of the form -`Call(call_id=..., state=...)`. - -#### Signature - -```rust -fn repr(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) - -Line 108. - -*** - -### resolve\_all\_actions - -Mark every outstanding action as completed. - -#### Signature - -```rust -fn resolve_all_actions(&self) -``` - -#### Source - -[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) - -Line 190. - -*** - -### send\_digits - -#### Signature - -```rust -fn send_digits(&self, params: ?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) - -Line 309. - -*** - -### send\_fax - -#### Signature - -```rust -fn send_fax(&self, params: ?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) - -Line 337. - -*** - -### stream - -#### Signature - -```rust -fn stream(&self, params: ?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) - -Line 349. - -*** - -### tap - -#### Signature - -```rust -fn tap(&self, params: ?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) - -Line 345. - -*** - -### transcribe - -#### Signature - -```rust -fn transcribe(&self, params: ?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) - -Line 357. - -*** - -### transfer - -#### Signature - -```rust -fn transfer(&self, params: ?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) - -Line 237. - -*** - -### unhold - -#### Signature - -```rust -fn unhold(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) - -Line 225. - -*** - -### user\_event - -#### Signature - -```rust -fn user_event(&self, params: ?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) - -Line 293. - -## Type Aliases - -### CallEventCallback - -Callback type for call-level event listeners. - -#### Signature - -```rust -type CallEventCallback = ? -``` - -#### Source - -[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) - -Line 12. - -## Source - -[`src/relay/call.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/call.rs) - -Line 19. diff --git a/fern/products/sdk-reference/rust/signalwire/relay/client/index.mdx b/fern/products/sdk-reference/rust/signalwire/relay/client/index.mdx deleted file mode 100644 index 2d91ac114d..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/relay/client/index.mdx +++ /dev/null @@ -1,932 +0,0 @@ ---- -slug: "/reference/rust/signalwire/relay/client" -title: "client" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::relay::client" - parent: "signalwire::relay" - module: "relay" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs" - visibility: "public" ---- -# `client` - -RELAY Client -- manages the WebSocket connection to SignalWire, sends -JSON-RPC requests, and dispatches inbound events to the correct Call -or Message objects. - -The transport is a real WebSocket connection over TCP (plus TLS for -`wss://`). One reader thread (spawned on `connect()`) owns the read -half and dispatches every inbound JSON-RPC frame through -`handle_message`. Writes go through `send()` which serializes the -frame and pushes it onto an mpsc channel that the reader thread -drains alongside its read loop, so all socket I/O is single- -threaded but both directions make forward progress. - -Tests still use `sent_messages` to inspect what the client _would_ -have written; `send()` mirrors every frame into that Vec whether or -not a live socket is attached. That keeps the unit tests covering -dispatch logic working without a real RELAY server. - -## Signature - -```rust -struct Client { /* fields */ } -``` - -## Properties - - - - - - - - - - - - - - - - - - - - - Messages sent through the transport (for testing). - - - - - - -## Methods - -### authenticate - -Backwards-compat: enqueue the `signalwire.connect` frame without -waiting. Used by older tests that drive `handle_message` directly. -Production code should call \[`connect`] which runs the full -handshake. - -#### Signature - -```rust -fn authenticate(&self) -``` - -#### Source - -[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) - -Line 480. - -*** - -### authenticate\_blocking - -Send the `signalwire.connect` RPC and block until the response -arrives or the handshake times out. The response carries the -server-assigned protocol string and authorization state. - -#### Signature - -```rust -fn authenticate_blocking(&self) -> ?<(), ?> -``` - -#### Returns - -`?<(), ?>` - -#### Source - -[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) - -Line 365. - -*** - -### bump\_reconnect\_delay - -Compute the next reconnect delay (1s → 2s → 4s → … → 30s) and -return the value to wait _this_ time. Mirrors Python's -`RECONNECT_MIN_DELAY` / `RECONNECT_MAX_DELAY` / backoff factor. -Exposed (and tested) separately from \[`reconnect`] so the math -is verifiable without opening a real socket. - -#### Signature - -```rust -fn bump_reconnect_delay(&self) -> u64 -``` - -#### Returns - -`u64` - -#### Source - -[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) - -Line 541. - -*** - -### connect - -Open the WebSocket connection, run the `signalwire.connect` -handshake, subscribe to the configured contexts, and spawn the -reader thread that dispatches every inbound frame through -`handle_message`. - -Reads the WebSocket scheme from `SIGNALWIRE_RELAY_SCHEME` (defaults -to `wss`; the audit fixture sets `ws`) and the host override from -`SIGNALWIRE_RELAY_HOST` (used by the audit fixture to point at a -`127.0.0.1:N` ephemeral port). In production neither env var is -usually set and the URL resolves to `wss://{self.host}/api/relay/ws`, -matching Python's `RelayClient.connect()`. - -Returns `Err` if the TCP/WS upgrade fails, the server rejects the -connect handshake, or the response doesn't arrive within -`HANDSHAKE_TIMEOUT`. - -#### Signature - -```rust -fn connect(&self) -> ?<(), ?> -``` - -#### Returns - -`?<(), ?>` - -#### Source - -[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) - -Line 294. - -*** - -### connect\_fresh - -Initial connect -- resets reconnect delay and connects. - -#### Signature - -```rust -fn connect_fresh(&self) -> ?<(), ?> -``` - -#### Returns - -`?<(), ?>` - -#### Source - -[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) - -Line 357. - -*** - -### dial\_blocking - -Initiate an outbound call using `calling.dial`. - -Mirrors Python's `RelayClient.dial`. The dial response carries no -`call_id` — the actual call info arrives via subsequent -`calling.call.dial` events keyed by `tag`. This method waits for -that event up to `dial_timeout` and returns the resolved Call. - -`devices` is the standard serial/parallel device matrix -(`[[device]]` for one parallel leg / serial = one inner list with -multiple devices). - -#### Signature - -```rust -fn dial_blocking( - &self, - devices: ?, - tag: ?<&str>, - max_duration: ?, - dial_timeout: ? -) -> ?, ?> -``` - -#### Parameters - - - - - - - - - -#### Returns - -`?, ?>` - -#### Source - -[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) - -Line 1014. - -*** - -### disconnect - -Gracefully close the connection. Signals the reader thread to -exit, sends a WS close frame, and joins the thread. - -#### Signature - -```rust -fn disconnect(&self) -``` - -#### Source - -[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) - -Line 504. - -*** - -### execute\_blocking - -Send a JSON-RPC request for a calling/messaging method. - -Mirrors Python's `RelayClient._send_request`: emits a flat-Blade -frame `{"method": , "params": }` directly — no -`signalwire.execute` wrapper. Both forms are accepted by the -production RELAY server and the mock; the flat form is what -every existing SDK port emits because it keeps the journal -filterable by inner method name without unwrapping. - -Returns the response's `result` value on success, or an `Err` -with the server's error message on failure or timeout. - -#### Signature - -```rust -fn execute_blocking(&self, method: &str, inner_params: ?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) - -Line 872. - -*** - -### from\_env - -Create from env vars SIGNALWIRE\_PROJECT\_ID, SIGNALWIRE\_API\_TOKEN, SIGNALWIRE\_SPACE. - -#### Signature - -```rust -fn from_env() -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) - -Line 265. - -*** - -### get\_call - -Get a call by ID. - -#### Signature - -```rust -fn get_call(&self, call_id: &str) -> ?> -``` - -#### Parameters - - - -#### Returns - -`?>` - -#### Source - -[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) - -Line 820. - -*** - -### get\_message - -Get a message by ID. - -#### Signature - -```rust -fn get_message(&self, message_id: &str) -> ?> -``` - -#### Parameters - - - -#### Returns - -`?>` - -#### Source - -[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) - -Line 825. - -*** - -### handle\_event - -Route a signalwire.event payload to the appropriate handler. - -#### Signature - -```rust -fn handle_event(&self, outer_params: &?) -``` - -#### Parameters - - - -#### Source - -[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) - -Line 676. - -*** - -### handle\_message - -Parse a raw JSON string from the server and route it. - -#### Signature - -```rust -fn handle_message(&self, raw: &str) -``` - -#### Parameters - - - -#### Source - -[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) - -Line 621. - -*** - -### is\_connected - -#### Signature - -```rust -fn is_connected(&self) -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) - -Line 548. - -*** - -### is\_running - -#### Signature - -```rust -fn is_running(&self) -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) - -Line 552. - -*** - -### new - -#### Signature - -```rust -fn new(project: &str, token: &str, host: &str) -> Self -``` - -#### Parameters - - - - - - - -#### Returns - -`Self` - -#### Source - -[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) - -Line 236. - -*** - -### on\_call - -Register a handler for inbound calls. - -#### Signature - -```rust -fn on_call, &?) + ? + ? + 'static>(&self, cb: F) -``` - -#### Type Parameters - - - -#### Parameters - - - -#### Source - -[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) - -Line 805. - -*** - -### on\_event - -Register a generic event handler. - -#### Signature - -```rust -fn on_event(&self, cb: F) -``` - -#### Type Parameters - - - -#### Parameters - - - -#### Source - -[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) - -Line 815. - -*** - -### on\_message - -Register a handler for inbound messages. - -#### Signature - -```rust -fn on_message(&self, cb: F) -``` - -#### Type Parameters - - - -#### Parameters - - - -#### Source - -[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) - -Line 810. - -*** - -### receive - -Subscribe to one or more inbound contexts. - -#### Signature - -```rust -fn receive(&self, contexts: &[?]) -``` - -#### Parameters - - - -#### Source - -[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) - -Line 781. - -*** - -### reconnect - -Reconnect with exponential back-off (1s → 30s cap). Sleeps for -the current delay, doubles the delay (capped at 30s), and runs -the full connect handshake again. Authorization state survives -across reconnects because \[`authenticate_blocking`] re-sends the -stored token on the new socket. - -#### Signature - -```rust -fn reconnect(&self) -> ?<(), ?> -``` - -#### Returns - -`?<(), ?>` - -#### Source - -[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) - -Line 525. - -*** - -### register\_dial - -Register a pending dial. - -#### Signature - -```rust -fn register_dial) + ? + 'static>(&self, tag: &str, resolve: F) -``` - -#### Type Parameters - - - -#### Parameters - - - - - -#### Source - -[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) - -Line 838. - -*** - -### register\_pending - -Register a pending-response slot for a request ID. - -#### Signature - -```rust -fn register_pending( - &self, - id: &str, - resolve: R, - reject: E -) where R: ?(?) + ? + 'static, E: ?(?) + ? + 'static -``` - -#### Type Parameters - - - - - -#### Parameters - - - - - - - -#### Source - -[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) - -Line 574. - -*** - -### remove\_pending\_dial - -Remove a pending dial. - -#### Signature - -```rust -fn remove_pending_dial(&self, tag: &str) -``` - -#### Parameters - - - -#### Source - -[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) - -Line 853. - -*** - -### send - -Send a raw JSON message through the transport. - -Records the frame in `sent_messages` (used by tests and for debug -inspection) and, when a live socket is attached, enqueues the -frame on the writer channel so the reader thread flushes it to -the WebSocket. With no live socket attached the call is purely -in-memory — that's the path the dispatch unit tests below take. - -#### Signature - -```rust -fn send(&self, msg: &?) -``` - -#### Parameters - - - -#### Source - -[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) - -Line 595. - -*** - -### send\_ack - -Send an acknowledgement for a server-initiated request. - -#### Signature - -```rust -fn send_ack(&self, id: &str) -``` - -#### Parameters - - - -#### Source - -[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) - -Line 608. - -*** - -### send\_message\_blocking - -Send an outbound SMS/MMS message. - -Mirrors Python's `RelayClient.send_message`. At least one of -`body` or `media` must be supplied. Returns a tracked `Message` -whose state will progress as `messaging.state` events arrive -from the server. - -#### Signature - -```rust -fn send_message_blocking( - &self, - to_number: &str, - from_number: &str, - body: ?<&str>, - media: ?<&[?]>, - tags: ?<&[?]>, - context: ?<&str> -) -> ?, ?> -``` - -#### Parameters - - - - - - - - - - - - - -#### Returns - -`?, ?>` - -#### Source - -[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) - -Line 927. - -*** - -### send\_request - -Build and send a JSON-RPC request. Returns the message ID. - -#### Signature - -```rust -fn send_request(&self, method: &str, params: ?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) - -Line 561. - -*** - -### track\_message - -Track a new message. - -#### Signature - -```rust -fn track_message(&self, message_id: &str, msg: ?) -``` - -#### Parameters - - - - - -#### Source - -[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) - -Line 830. - -*** - -### unreceive - -Unsubscribe from one or more contexts. - -#### Signature - -```rust -fn unreceive(&self, contexts: &[?]) -``` - -#### Parameters - - - -#### Source - -[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) - -Line 795. - -## Type Aliases - -### OnCallHandler - -Callback type for inbound call handler. - -#### Signature - -```rust -type OnCallHandler = ? -``` - -#### Source - -[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) - -Line 147. - -*** - -### OnEventHandler - -Callback type for generic events. - -#### Signature - -```rust -type OnEventHandler = ? -``` - -#### Source - -[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) - -Line 153. - -*** - -### OnMessageHandler - -Callback type for inbound message handler. - -#### Signature - -```rust -type OnMessageHandler = ? -``` - -#### Source - -[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) - -Line 150. - -## Source - -[`src/relay/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/client.rs) - -Line 190. diff --git a/fern/products/sdk-reference/rust/signalwire/relay/constants/index.mdx b/fern/products/sdk-reference/rust/signalwire/relay/constants/index.mdx deleted file mode 100644 index 191fc52cbb..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/relay/constants/index.mdx +++ /dev/null @@ -1,148 +0,0 @@ ---- -slug: "/reference/rust/signalwire/relay/constants" -title: "constants" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "signalwire::relay::constants" - parent: "signalwire::relay" - module: "relay" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/constants.rs" - visibility: "public" ---- -# `constants` - -RELAY module -- real-time event signalling over WebSocket (JSON-RPC 2.0). - -Provides constants, event/action primitives, call control, message -tracking, and the async-ready `Client` that ties everything together. - -## Constants - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - RELAY protocol constants. Mirrors the PHP `Constants` class: protocol version, call/dial/message states, terminal-state maps, and per-event-type action terminal states. Protocol version exchanged during `signalwire.connect`. - - - - - - -## Functions - -### is\_action\_terminal - -Returns `true` when the given `(event_type, action_state)` pair represents -a terminal state for an in-flight action. - -#### Signature - -```rust -fn is_action_terminal(event_type: &str, state: &str) -> bool -``` - -#### Parameters - - - - - -#### Returns - -`bool` - -#### Source - -[`src/relay/constants.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/constants.rs) - -Line 60. - -*** - -### is\_call\_terminal - -Returns `true` when the call state is terminal (i.e. `"ended"`). - -#### Signature - -```rust -fn is_call_terminal(state: &str) -> bool -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/relay/constants.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/constants.rs) - -Line 22. - -*** - -### is\_message\_terminal - -Returns `true` when the message state is terminal. - -#### Signature - -```rust -fn is_message_terminal(state: &str) -> bool -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/relay/constants.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/constants.rs) - -Line 47. - -## Source - -[`src/relay/constants.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/constants.rs) - -Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/relay/device/index.mdx b/fern/products/sdk-reference/rust/signalwire/relay/device/index.mdx deleted file mode 100644 index cc50f50c40..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/relay/device/index.mdx +++ /dev/null @@ -1,321 +0,0 @@ ---- -slug: "/reference/rust/signalwire/relay/device" -title: "device" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::relay::device" - parent: "signalwire::relay" - module: "relay" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/device.rs" - visibility: "public" ---- -# `device` - -A typed RELAY device descriptor (`{type, params}`). - -`type` is the device-kind discriminant (kept as a `String` — the wire -contract does not enumerate it). `params` is the device-specific -parameter object (e.g. `{to_number, from_number}` for a `phone`). - -Build one with \[`Device::new`] (raw params) or \[`Device::phone`] / -\[`Device::sip`] convenience constructors, then hand its -`to_value` to any device-taking call: - -```ignore -let dev = Device::phone("+15551112222", "+15553334444"); -// single parallel leg = one inner list -let devices = Device::matrix(&[&[dev]]); -client.dial_blocking(devices, None, None, timeout); -``` - -## Signature - -```rust -struct Device { /* fields */ } -``` - -## Inheritance - -**Implements:** `Debug`, `Clone`, `PartialEq` - -## Examples - -```rust -let dev = Device::phone("+15551112222", "+15553334444"); -// single parallel leg = one inner list -let devices = Device::matrix(&[&[dev]]); -client.dial_blocking(devices, None, None, timeout); -``` - -## Properties - - - Device kind discriminant (`phone`, `sip`, `webrtc`, `rtp`, …). A plain string: the wire schema does not enumerate it. - - - - Device-specific parameters object. - - -## Methods - -### clone - -#### Signature - -```rust -fn clone(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/relay/device.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/device.rs) - -Line 38. - -*** - -### eq - -#### Signature - -```rust -fn eq(&self, other: &?) -> bool -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/relay/device.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/device.rs) - -Line 38. - -*** - -### fmt - -#### Signature - -```rust -fn fmt(&self, f: &mut ?<'_>) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/relay/device.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/device.rs) - -Line 38. - -*** - -### matrix - -Build the serial/parallel device **matrix** (`[[device, …], …]`) that -`dial` / `connect` take, from rows of devices. - -Each inner slice is one _serial_ attempt; the outer slice runs its -rows in _parallel_. `Device::matrix(&[&[a, b]])` = try `a` then `b` -in one parallel leg; `Device::matrix(&[&[a], &[b]])` = ring `a` and -`b` in parallel. - -**Decorators:** `@must_use` - -#### Signature - -```rust -fn matrix(rows: &[&[?]]) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/relay/device.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/device.rs) - -Line 121. - -*** - -### new - -Build a device from its `type` discriminant and a `params` object. - -A non-object `params` (or \[`Value::Null`]) is normalised to an empty -object on the wire, matching the hand-written `"params": {}` form. - -**Decorators:** `@must_use` - -#### Signature - -```rust -fn new: ?>(device_type: impl ?, params: ?) -> Self -``` - -#### Type Parameters - - - -#### Parameters - - - - - -#### Returns - -`Self` - -#### Source - -[`src/relay/device.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/device.rs) - -Line 53. - -*** - -### phone - -A `phone` device with `to_number` / `from_number` params. - -Emits `{"type":"phone","params":{"to_number":…,"from_number":…}}` — -the shape `Client::dial_blocking` and `Call::connect` expect for PSTN -legs. - -**Decorators:** `@must_use` - -#### Signature - -```rust -fn phone: ?, impl Into: ?>( - to_number: impl ?, - from_number: impl ? -) -> Self -``` - -#### Type Parameters - - - - - -#### Parameters - - - - - -#### Returns - -`Self` - -#### Source - -[`src/relay/device.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/device.rs) - -Line 66. - -*** - -### sip - -A `sip` device addressed to a SIP URI. - -Emits `{"type":"sip","params":{"to":…,"from":…}}`. - -**Decorators:** `@must_use` - -#### Signature - -```rust -fn sip: ?, impl Into: ?>( - to: impl ?, - from: impl ? -) -> Self -``` - -#### Type Parameters - - - - - -#### Parameters - - - - - -#### Returns - -`Self` - -#### Source - -[`src/relay/device.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/device.rs) - -Line 82. - -*** - -### to\_value - -Serialise to the wire device object: `{"type": …, "params": {…}}`. - -Field order is `type` then `params` and `params` is always an object, -so the output is byte-identical to the hand-written -`json!({"type": t, "params": p})` that every existing device call -site uses. (`serde_json` is built with `preserve_order`, so insertion -order is the serialised order.) - -**Decorators:** `@must_use` - -#### Signature - -```rust -fn to_value(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/relay/device.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/device.rs) - -Line 102. - -## Source - -[`src/relay/device.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/device.rs) - -Line 39. diff --git a/fern/products/sdk-reference/rust/signalwire/relay/error/index.mdx b/fern/products/sdk-reference/rust/signalwire/relay/error/index.mdx deleted file mode 100644 index 911ed34caa..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/relay/error/index.mdx +++ /dev/null @@ -1,261 +0,0 @@ ---- -slug: "/reference/rust/signalwire/relay/error" -title: "error" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "signalwire::relay::error" - parent: "signalwire::relay" - module: "relay" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/error.rs" - visibility: "public" ---- -# `error` - -Typed error for the RELAY client surface. - -The REST layer already ships a proper error enum -(`SignalWireRestError`); this is the -RELAY-side analogue. Before this, the relay client returned -`Result<_, String>` everywhere — a stringly-typed failure channel that -forces callers to pattern-match on message _text_ to react differently to -(say) an auth rejection vs. a transport drop vs. a timeout. \[`RelayError`] -makes the failure modes a closed, inspectable set, exactly like the REST -exemplar. - -Design notes (idiomatic Rust, matching the REST error's bar): - -- The data each failure carries lives **in the variant**, so callers react - by `match`ing rather than calling accessor getters. That keeps the public - surface to the type + its trait impls (`Display` / \[`std::error::Error`]) - and means the audit sees no new methods. -- `#[non_exhaustive]` because the failure set mirrors transport/server - conditions that can grow (new RELAY error classes) without that being a - breaking change — downstream `match` must carry a wildcard. -- Every variant's \[`Display`] is human-actionable and preserves the same - context the old `format!("…")` strings carried, so log output is no worse. - -## Enums - -### RelayError - -Something went wrong talking to the RELAY WebSocket service. - -Returned by the connection-lifecycle and blocking-RPC methods on -`Client` (e.g. `connect`, `authenticate_blocking`, -`execute_blocking`, `dial_blocking`, `send_message_blocking`). - -#### Signature - -```rust -enum RelayError -``` - -#### Inheritance - -**Implements:** `Debug`, `Clone`, `PartialEq`, `Eq`, `Display`, [Error](/docs/sdk-reference/reference/rust/signalwire/security/webhook-layer/webhook-validate#error) - -#### Variants - - - The RELAY server rejected the `signalwire.connect` authentication handshake. Carries the server-reported reason. - - - - A `dial` completed with a `failed` state or never produced an answer before the dial deadline. Carries the reason / tag. - - - - A required argument was invalid (e.g. `send_message` with neither body nor media). Carries the validation message. - - - - A required environment variable was missing when building the client from the environment (`from_env`). Carries the variable name. - - - - The server returned a JSON-RPC error for a request (e.g. a failed `messaging.send` / `calling.dial`). Carries the inner method and the server's error message. - - - - A blocking call did not receive its response within the deadline. Carries what was being awaited so the log line is actionable. - - - - The underlying WebSocket transport failed to connect, upgrade, read, or write. Carries a human description of the transport-level cause. - - -#### Methods - -##### clone - -###### Signature - -```rust -fn clone(&self) -> ? -``` - -###### Returns - -`?` - -###### Source - -[`src/relay/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/error.rs) - -Line 30. - -*** - -##### eq - -###### Signature - -```rust -fn eq(&self, other: &?) -> bool -``` - -###### Parameters - - - -###### Returns - -`bool` - -###### Source - -[`src/relay/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/error.rs) - -Line 30. - -*** - -##### fmt - -###### Signature - -```rust -fn fmt(&self, f: &mut ?<'_>) -> ? -``` - -###### Parameters - - - -###### Returns - -`?` - -###### Source - -[`src/relay/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/error.rs) - -Line 30. - -*** - -##### fmt - -###### Signature - -```rust -fn fmt(&self, f: &mut ?<'_>) -> ? -``` - -###### Parameters - - - -###### Returns - -`?` - -###### Source - -[`src/relay/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/error.rs) - -Line 105. - -*** - -##### missing\_env - -Build a \[`RelayError::MissingEnv`] for the named variable. - -###### Signature - -```rust -fn missing_env: ?>(var: impl ?) -> Self -``` - -###### Type Parameters - - - -###### Parameters - - - -###### Returns - -`Self` - -###### Source - -[`src/relay/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/error.rs) - -Line 99. - -*** - -##### transport - -Build a \[`RelayError::Transport`] from a context and any `Display` cause. -Convenience for the `map_err(|e| …)` call sites in the client. - -###### Signature - -```rust -fn transport: ?, impl fmt::Display: ?>( - context: impl ?, - source: impl ? -) -> Self -``` - -###### Type Parameters - - - - - -###### Parameters - - - - - -###### Returns - -`Self` - -###### Source - -[`src/relay/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/error.rs) - -Line 91. - -#### Source - -[`src/relay/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/error.rs) - -Line 32. - -## Source - -[`src/relay/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/error.rs) - -Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/relay/event/index.mdx b/fern/products/sdk-reference/rust/signalwire/relay/event/index.mdx deleted file mode 100644 index 6be80928db..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/relay/event/index.mdx +++ /dev/null @@ -1,321 +0,0 @@ ---- -slug: "/reference/rust/signalwire/relay/event" -title: "event" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::relay::event" - parent: "signalwire::relay" - module: "relay" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/event.rs" - visibility: "public" ---- -# `event` - -A RELAY event received from the SignalWire server. - -Events carry an `event_type` (e.g. `"calling.call.state"`), a -timestamp, and a bag of string-keyed parameters. - -## Signature - -```rust -struct Event { /* fields */ } -``` - -## Inheritance - -**Implements:** `Debug`, `Clone` - -## Methods - -### call\_id - -#### Signature - -```rust -fn call_id(&self) -> ?<&str> -``` - -#### Returns - -`?<&str>` - -#### Source - -[`src/relay/event.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/event.rs) - -Line 61. - -*** - -### clone - -#### Signature - -```rust -fn clone(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/relay/event.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/event.rs) - -Line 7. - -*** - -### control\_id - -#### Signature - -```rust -fn control_id(&self) -> ?<&str> -``` - -#### Returns - -`?<&str>` - -#### Source - -[`src/relay/event.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/event.rs) - -Line 73. - -*** - -### event\_type - -#### Signature - -```rust -fn event_type(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/relay/event.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/event.rs) - -Line 49. - -*** - -### fmt - -#### Signature - -```rust -fn fmt(&self, f: &mut ?<'_>) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/relay/event.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/event.rs) - -Line 7. - -*** - -### new - -Create a new event. If `timestamp` is `0.0`, the current time is used. - -#### Signature - -```rust -fn new(event_type: &str, params: ?, timestamp: f64) -> Self -``` - -#### Parameters - - - - - - - -#### Returns - -`Self` - -#### Source - -[`src/relay/event.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/event.rs) - -Line 16. - -*** - -### node\_id - -#### Signature - -```rust -fn node_id(&self) -> ?<&str> -``` - -#### Returns - -`?<&str>` - -#### Source - -[`src/relay/event.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/event.rs) - -Line 67. - -*** - -### params - -#### Signature - -```rust -fn params(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/relay/event.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/event.rs) - -Line 57. - -*** - -### parse - -Convenience constructor from a `serde_json::Value` params object. - -#### Signature - -```rust -fn parse(event_type: &str, params_value: &?) -> Self -``` - -#### Parameters - - - - - -#### Returns - -`Self` - -#### Source - -[`src/relay/event.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/event.rs) - -Line 34. - -*** - -### state - -#### Signature - -```rust -fn state(&self) -> ?<&str> -``` - -#### Returns - -`?<&str>` - -#### Source - -[`src/relay/event.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/event.rs) - -Line 83. - -*** - -### tag - -#### Signature - -```rust -fn tag(&self) -> ?<&str> -``` - -#### Returns - -`?<&str>` - -#### Source - -[`src/relay/event.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/event.rs) - -Line 79. - -*** - -### timestamp - -#### Signature - -```rust -fn timestamp(&self) -> f64 -``` - -#### Returns - -`f64` - -#### Source - -[`src/relay/event.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/event.rs) - -Line 53. - -*** - -### to\_value - -Serialize back to a JSON-compatible map. - -#### Signature - -```rust -fn to_value(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/relay/event.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/event.rs) - -Line 88. - -## Source - -[`src/relay/event.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/event.rs) - -Line 8. diff --git a/fern/products/sdk-reference/rust/signalwire/relay/index.mdx b/fern/products/sdk-reference/rust/signalwire/relay/index.mdx deleted file mode 100644 index a1322f1768..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/relay/index.mdx +++ /dev/null @@ -1,65 +0,0 @@ ---- -slug: "/reference/rust/signalwire/relay" -title: "relay" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "signalwire::relay" - parent: "signalwire" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/mod.rs" - visibility: "public" ---- -# `relay` - -## Classes - - - - Base class for all RELAY call actions (play, record, collect, etc.). - - - - Represents a RELAY voice call. - - - - RELAY Client -- manages the WebSocket connection to SignalWire, sends JSON-RPC requests, and dispatches inbound events to the correct Call or Message objects. - - - - A typed RELAY device descriptor (`{type, params}`). - - - - A RELAY event received from the SignalWire server. - - - - Represents a RELAY messaging message (SMS / MMS). - - - -## Modules - - - - RELAY module -- real-time event signalling over WebSocket (JSON-RPC 2.0). - - - - Typed error for the RELAY client surface. - - - - Typed RELAY lifecycle-state enums. - - - -## Source - -[`src/relay/mod.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/mod.rs) - -Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/relay/message/index.mdx b/fern/products/sdk-reference/rust/signalwire/relay/message/index.mdx deleted file mode 100644 index 9c102740b4..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/relay/message/index.mdx +++ /dev/null @@ -1,471 +0,0 @@ ---- -slug: "/reference/rust/signalwire/relay/message" -title: "message" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::relay::message" - parent: "signalwire::relay" - module: "relay" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/message.rs" - visibility: "public" ---- -# `message` - -Represents a RELAY messaging message (SMS / MMS). - -A Message is created when you send or receive a message through the -RELAY messaging namespace. It accumulates state-change events and -resolves once the message reaches a terminal state (delivered, -undelivered, or failed). - -## Signature - -```rust -struct Message { /* fields */ } -``` - -## Methods - -### body - -#### Signature - -```rust -fn body(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/relay/message.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/message.rs) - -Line 144. - -*** - -### context - -#### Signature - -```rust -fn context(&self) -> ?<&str> -``` - -#### Returns - -`?<&str>` - -#### Source - -[`src/relay/message.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/message.rs) - -Line 128. - -*** - -### direction - -#### Signature - -```rust -fn direction(&self) -> ?<&str> -``` - -#### Returns - -`?<&str>` - -#### Source - -[`src/relay/message.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/message.rs) - -Line 132. - -*** - -### dispatch\_event - -Process an inbound event for this message. - -#### Signature - -```rust -fn dispatch_event(&self, event: &?) -``` - -#### Parameters - - - -#### Source - -[`src/relay/message.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/message.rs) - -Line 195. - -*** - -### from\_number - -#### Signature - -```rust -fn from_number(&self) -> ?<&str> -``` - -#### Returns - -`?<&str>` - -#### Source - -[`src/relay/message.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/message.rs) - -Line 136. - -*** - -### is\_done - -#### Signature - -```rust -fn is_done(&self) -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`src/relay/message.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/message.rs) - -Line 182. - -*** - -### media - -#### Signature - -```rust -fn media(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/relay/message.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/message.rs) - -Line 148. - -*** - -### message\_id - -#### Signature - -```rust -fn message_id(&self) -> ?<&str> -``` - -#### Returns - -`?<&str>` - -#### Source - -[`src/relay/message.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/message.rs) - -Line 114. - -*** - -### message\_state - -Current delivery state as a typed \[`MessageState`]. - -The typed counterpart to `state`: both read the same -underlying string, so when a state is present -`msg.message_state().unwrap().as_str() == msg.state().unwrap()` holds. -`None` when no state has been observed yet. An unrecognised server -value parses to \[`MessageState::Other`] rather than panicking. Enables -`msg.message_state().map(|s| s.is_terminal())` and `match` instead of -stringly comparisons. - -**Decorators:** `@must_use` - -#### Signature - -```rust -fn message_state(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/relay/message.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/message.rs) - -Line 170. - -*** - -### new - -Build a Message from a params map. - -#### Signature - -```rust -fn new(params: &?) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/relay/message.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/message.rs) - -Line 37. - -*** - -### on - -Register a listener that fires on every state-change event. - -#### Signature - -```rust -fn on(&self, cb: F) -``` - -#### Type Parameters - - - -#### Parameters - - - -#### Source - -[`src/relay/message.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/message.rs) - -Line 240. - -*** - -### on\_completed - -Register a callback to fire when the message reaches a terminal state. - -#### Signature - -```rust -fn on_completed(&self, cb: F) -``` - -#### Type Parameters - - - -#### Parameters - - - -#### Source - -[`src/relay/message.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/message.rs) - -Line 248. - -*** - -### reason - -#### Signature - -```rust -fn reason(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/relay/message.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/message.rs) - -Line 178. - -*** - -### repr - -Python-style `__repr__` (mirrors `Message.__repr__` in the -signalwire-python reference). Returns a string of the form -`Message(message_id=..., from=..., to=..., state=...)`. - -#### Signature - -```rust -fn repr(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/relay/message.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/message.rs) - -Line 121. - -*** - -### resolve - -Mark this message as completed. - -#### Signature - -```rust -fn resolve(&self, result: ?) -``` - -#### Parameters - - - -#### Source - -[`src/relay/message.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/message.rs) - -Line 261. - -*** - -### result - -#### Signature - -```rust -fn result(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/relay/message.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/message.rs) - -Line 186. - -*** - -### state - -#### Signature - -```rust -fn state(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/relay/message.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/message.rs) - -Line 156. - -*** - -### tags - -#### Signature - -```rust -fn tags(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/relay/message.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/message.rs) - -Line 152. - -*** - -### to\_number - -#### Signature - -```rust -fn to_number(&self) -> ?<&str> -``` - -#### Returns - -`?<&str>` - -#### Source - -[`src/relay/message.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/message.rs) - -Line 140. - -## Type Aliases - -### MessageCompletedCallback - -Callback type for completion notifications. - -#### Signature - -```rust -type MessageCompletedCallback = ? -``` - -#### Source - -[`src/relay/message.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/message.rs) - -Line 9. - -## Source - -[`src/relay/message.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/message.rs) - -Line 17. diff --git a/fern/products/sdk-reference/rust/signalwire/relay/state-enums/index.mdx b/fern/products/sdk-reference/rust/signalwire/relay/state-enums/index.mdx deleted file mode 100644 index b86764f8b6..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/relay/state-enums/index.mdx +++ /dev/null @@ -1,928 +0,0 @@ ---- -slug: "/reference/rust/signalwire/relay/state-enums" -title: "state_enums" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "signalwire::relay::state_enums" - parent: "signalwire::relay" - module: "relay" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs" - visibility: "public" ---- -# `state_enums` - -Typed RELAY lifecycle-state enums. - -The RELAY protocol carries three _distinct_ server-emitted state -vocabularies — call lifecycle, dial outcome, and message delivery — as -bare strings on the wire. `constants` keeps the raw -string consts and the `is_*_terminal(&str)` predicates (the byte-level -contract); this module layers a typed, idiomatic view on top for the -highest-traffic of those vocabularies. - -Three deliberately separate types — \[`CallState`], \[`DialState`], -\[`MessageState`] — because the three vocabularies are _not_ -interchangeable even where strings coincide (`"answered"` is both a -\[`CallState`] and a \[`DialState`], `"failed"` is both a \[`DialState`] -and a \[`MessageState`], but conflating them would let a message state -leak into a call predicate). The compiler now keeps them apart. - -## Server-growth semantics (why `#[non_exhaustive]` + `Other`) - -Unlike the client-validated closed sets in -`media_enums` (which mirror Python -`ValueError` checks and reject unknown input), these mirror values the -_server_ emits and may add to over time. So each enum: - -- is `#[non_exhaustive]` — downstream `match` must carry a wildcard arm, - so a future server value can't break a consumer at compile time; -- carries an `Other(String)` catch-all so parsing a - never-before-seen state **never panics or loses data** — it round-trips - verbatim through `as_str`; -- parses infallibly via `from_str` / - `FromStr` (an unknown string becomes `Other`, not an error). - -Grounded in the Python reference `relay/constants.py` -(`CALL_STATE_*` / `MESSAGE_STATE_*` / `MESSAGE_TERMINAL_STATES`) and the -port's own `constants` (`DIAL_STATE_*`). The typed -accessors (`Call::call_state` / `Message::message_state`) are exposed -_alongside_ the existing string accessors (`Call::current_state` / -`Message::state`) for parity. - -## Enums - -### CallState - -Call lifecycle state, as carried by `calling.call.state` events. - -Mirrors Python `relay/constants.py` `CALL_STATE_*` -(`created` → `ringing` → `answered` → `ending` → `ended`). The terminal -state is `ended` (see `is_terminal`), matching -\[`constants::is_call_terminal`]. - -`#[non_exhaustive]` — server-emitted; an unrecognised value parses to -`Other` rather than panicking. - -#### Signature - -```rust -enum CallState -``` - -#### Inheritance - -**Implements:** `Debug`, `Clone`, `PartialEq`, `Eq`, `Hash`, `Display`, `FromStr` - -#### Variants - - - `answered` — the call has been answered and is in progress. - - - - `created` — the call object exists but has not started ringing. - - - - `ended` — the call has fully ended (terminal). - - - - `ending` — the call is in the process of tearing down. - - - - Any state the server emits that this enum does not (yet) model. Carries the raw wire string so it round-trips losslessly. - - - - `ringing` — the call is ringing the destination. - - -#### Methods - -##### as\_str - -The canonical wire string for this state (e.g. `"ringing"`). - -For `Other` this is the captured raw string, so -`CallState::from_str(s).as_str() == s` for every `s`. - -**Decorators:** `@must_use` - -###### Signature - -```rust -fn as_str(&self) -> &str -``` - -###### Returns - -`&str` - -###### Source - -[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) - -Line 78. - -*** - -##### clone - -###### Signature - -```rust -fn clone(&self) -> ? -``` - -###### Returns - -`?` - -###### Source - -[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) - -Line 53. - -*** - -##### eq - -###### Signature - -```rust -fn eq(&self, other: &?) -> bool -``` - -###### Parameters - - - -###### Returns - -`bool` - -###### Source - -[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) - -Line 53. - -*** - -##### fmt - -###### Signature - -```rust -fn fmt(&self, f: &mut ?<'_>) -> ? -``` - -###### Parameters - - - -###### Returns - -`?` - -###### Source - -[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) - -Line 53. - -*** - -##### fmt - -###### Signature - -```rust -fn fmt(&self, f: &mut ?<'_>) -> ? -``` - -###### Parameters - - - -###### Returns - -`?` - -###### Source - -[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) - -Line 117. - -*** - -##### from\_str - -Parse a wire string into a \[`CallState`]. - -Infallible: an unrecognised value becomes `Other` -(server states can grow). Provided as an inherent method for -ergonomics alongside the \[`FromStr`] impl. - -**Decorators:** `@must_use` - -###### Signature - -```rust -fn from_str(s: &str) -> ? -``` - -###### Parameters - - - -###### Returns - -`?` - -###### Source - -[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) - -Line 95. - -*** - -##### from\_str - -###### Signature - -```rust -fn from_str(s: &str) -> ?::Err> -``` - -###### Parameters - - - -###### Returns - -`?::Err>` - -###### Source - -[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) - -Line 125. - -*** - -##### hash - -###### Signature - -```rust -fn hash<__H: ?>(&self, state: &mut __H) -``` - -###### Type Parameters - - - -###### Parameters - - - -###### Source - -[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) - -Line 53. - -*** - -##### is\_terminal - -`true` when this is a terminal call state (`ended`). - -Delegates to \[`constants::is_call_terminal`] so the typed and -string predicates can never disagree. - -**Decorators:** `@must_use` - -###### Signature - -```rust -fn is_terminal(&self) -> bool -``` - -###### Returns - -`bool` - -###### Source - -[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) - -Line 111. - -#### Type Aliases - -##### Err - -###### Source - -[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) - -Line 123. - -#### Source - -[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) - -Line 56. - -*** - -### DialState - -Dial outcome state, as carried by `calling.call.dial` events. - -Distinct from \[`CallState`]: a dial reports the _result_ of an outbound -attempt (`dialing` while in flight, then the terminal `answered` / -`failed`), not the lifecycle of an established call. Grounded in the -port's `constants` `DIAL_STATE_*`. - -`#[non_exhaustive]` — server-emitted; unrecognised values parse to -`Other`. - -#### Signature - -```rust -enum DialState -``` - -#### Inheritance - -**Implements:** `Debug`, `Clone`, `PartialEq`, `Eq`, `Hash`, `Display`, `FromStr` - -#### Variants - - - `answered` — a leg answered; the dial succeeded (terminal). - - - - `dialing` — the outbound attempt is in progress (non-terminal). - - - - `failed` — no leg answered; the dial failed (terminal). - - - - Any state the server emits that this enum does not (yet) model. - - -#### Methods - -##### as\_str - -The canonical wire string for this state (e.g. `"dialing"`). - -**Decorators:** `@must_use` - -###### Signature - -```rust -fn as_str(&self) -> &str -``` - -###### Returns - -`&str` - -###### Source - -[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) - -Line 156. - -*** - -##### clone - -###### Signature - -```rust -fn clone(&self) -> ? -``` - -###### Returns - -`?` - -###### Source - -[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) - -Line 139. - -*** - -##### eq - -###### Signature - -```rust -fn eq(&self, other: &?) -> bool -``` - -###### Parameters - - - -###### Returns - -`bool` - -###### Source - -[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) - -Line 139. - -*** - -##### fmt - -###### Signature - -```rust -fn fmt(&self, f: &mut ?<'_>) -> ? -``` - -###### Parameters - - - -###### Returns - -`?` - -###### Source - -[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) - -Line 139. - -*** - -##### fmt - -###### Signature - -```rust -fn fmt(&self, f: &mut ?<'_>) -> ? -``` - -###### Parameters - - - -###### Returns - -`?` - -###### Source - -[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) - -Line 189. - -*** - -##### from\_str - -Parse a wire string into a \[`DialState`] (infallible; unknown → -`Other`). - -**Decorators:** `@must_use` - -###### Signature - -```rust -fn from_str(s: &str) -> ? -``` - -###### Parameters - - - -###### Returns - -`?` - -###### Source - -[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) - -Line 168. - -*** - -##### from\_str - -###### Signature - -```rust -fn from_str(s: &str) -> ?::Err> -``` - -###### Parameters - - - -###### Returns - -`?::Err>` - -###### Source - -[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) - -Line 197. - -*** - -##### hash - -###### Signature - -```rust -fn hash<__H: ?>(&self, state: &mut __H) -``` - -###### Type Parameters - - - -###### Parameters - - - -###### Source - -[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) - -Line 139. - -*** - -##### is\_terminal - -`true` when this is a terminal dial outcome (`answered` or `failed`). - -A dial resolves once it either connects a leg or exhausts every -device, so both `answered` and `failed` are terminal; `dialing` is -not. - -**Decorators:** `@must_use` - -###### Signature - -```rust -fn is_terminal(&self) -> bool -``` - -###### Returns - -`bool` - -###### Source - -[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) - -Line 183. - -#### Type Aliases - -##### Err - -###### Source - -[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) - -Line 195. - -#### Source - -[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) - -Line 142. - -*** - -### MessageState - -Message delivery state, as carried by `messaging.state` events. - -Mirrors Python `relay/constants.py` `MESSAGE_STATE_*`. The terminal set -is `delivered` / `undelivered` / `failed` -(`MESSAGE_TERMINAL_STATES`; see `is_terminal`), -matching \[`constants::is_message_terminal`]. Distinct from both -\[`CallState`] and \[`DialState`] — `failed` here means _message_ failure, -not a dial failure. - -`#[non_exhaustive]` — server-emitted; unrecognised values parse to -`Other`. - -#### Signature - -```rust -enum MessageState -``` - -#### Inheritance - -**Implements:** `Debug`, `Clone`, `PartialEq`, `Eq`, `Hash`, `Display`, `FromStr` - -#### Variants - - - `delivered` — confirmed delivered (terminal). - - - - `failed` — sending failed (terminal). - - - - `initiated` — sending has begun. - - - - Any state the server emits that this enum does not (yet) model. - - - - `queued` — accepted and queued for sending. - - - - `received` — an inbound message was received. - - - - `sent` — handed off to the carrier. - - - - `undelivered` — the carrier reported non-delivery (terminal). - - -#### Methods - -##### as\_str - -The canonical wire string for this state (e.g. `"delivered"`). - -**Decorators:** `@must_use` - -###### Signature - -```rust -fn as_str(&self) -> &str -``` - -###### Returns - -`&str` - -###### Source - -[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) - -Line 238. - -*** - -##### clone - -###### Signature - -```rust -fn clone(&self) -> ? -``` - -###### Returns - -`?` - -###### Source - -[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) - -Line 213. - -*** - -##### eq - -###### Signature - -```rust -fn eq(&self, other: &?) -> bool -``` - -###### Parameters - - - -###### Returns - -`bool` - -###### Source - -[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) - -Line 213. - -*** - -##### fmt - -###### Signature - -```rust -fn fmt(&self, f: &mut ?<'_>) -> ? -``` - -###### Parameters - - - -###### Returns - -`?` - -###### Source - -[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) - -Line 213. - -*** - -##### fmt - -###### Signature - -```rust -fn fmt(&self, f: &mut ?<'_>) -> ? -``` - -###### Parameters - - - -###### Returns - -`?` - -###### Source - -[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) - -Line 279. - -*** - -##### from\_str - -Parse a wire string into a \[`MessageState`] (infallible; unknown → -`Other`). - -**Decorators:** `@must_use` - -###### Signature - -```rust -fn from_str(s: &str) -> ? -``` - -###### Parameters - - - -###### Returns - -`?` - -###### Source - -[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) - -Line 254. - -*** - -##### from\_str - -###### Signature - -```rust -fn from_str(s: &str) -> ?::Err> -``` - -###### Parameters - - - -###### Returns - -`?::Err>` - -###### Source - -[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) - -Line 287. - -*** - -##### hash - -###### Signature - -```rust -fn hash<__H: ?>(&self, state: &mut __H) -``` - -###### Type Parameters - - - -###### Parameters - - - -###### Source - -[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) - -Line 213. - -*** - -##### is\_terminal - -`true` when this is a terminal delivery state (`delivered`, -`undelivered`, or `failed`). - -Delegates to \[`constants::is_message_terminal`] so the typed and -string predicates can never disagree. - -**Decorators:** `@must_use` - -###### Signature - -```rust -fn is_terminal(&self) -> bool -``` - -###### Returns - -`bool` - -###### Source - -[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) - -Line 273. - -#### Type Aliases - -##### Err - -###### Source - -[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) - -Line 285. - -#### Source - -[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) - -Line 216. - -## Source - -[`src/relay/state_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/relay/state_enums.rs) - -Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/client/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/client/index.mdx deleted file mode 100644 index 5a290401f8..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/rest/client/index.mdx +++ /dev/null @@ -1,30 +0,0 @@ ---- -slug: "/reference/rust/signalwire/rest/client" -title: "client" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "signalwire::rest::client" - parent: "signalwire::rest" - module: "rest" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs" - visibility: "public" ---- -# `client` - -## Classes - - - - Top-level SignalWire REST client. - - - -## Source - -[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) - -Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/client/rest-client/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/client/rest-client/index.mdx deleted file mode 100644 index 4a058ab8c0..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/rest/client/rest-client/index.mdx +++ /dev/null @@ -1,726 +0,0 @@ ---- -slug: "/reference/rust/signalwire/rest/client/rest-client" -title: "RestClient" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::rest::client::RestClient" - parent: "signalwire::rest::client" - module: "rest.client" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs" - visibility: "public" ---- -# `RestClient` - -Top-level SignalWire REST client. - -Provides lazy access to every API namespace (fabric, calling, -phone\_numbers, datasphere, video, compat, etc.). Credentials can -be supplied explicitly or pulled from environment variables. - -Production HTTP transport is `ureq` (sync, blocking, real network -I/O). Tests can substitute a stub via \[`with_http`]. - -## Signature - -```rust -struct RestClient { /* fields */ } -``` - -## Methods - -### addresses - -Addresses. - -#### Signature - -```rust -fn addresses(&self) -> ?<'_> -``` - -#### Returns - -`?<'_>` - -#### Source - -[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) - -Line 187. - -*** - -### base\_url - -#### Signature - -```rust -fn base_url(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) - -Line 131. - -*** - -### calling - -Calling API (37 call-control commands). - -#### Signature - -```rust -fn calling(&self) -> ?<'_> -``` - -#### Returns - -`?<'_>` - -#### Source - -[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) - -Line 153. - -*** - -### chat - -Chat tokens. - -#### Signature - -```rust -fn chat(&self) -> ?<'_> -``` - -#### Returns - -`?<'_>` - -#### Source - -[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) - -Line 258. - -*** - -### compat - -Compatibility (Twilio-compatible LAML) API namespace. - -Returns a `Compat` handle whose -sub-resources (`calls`, `messages`, `faxes`, `phone_numbers`, -`conferences`, `recordings`, `transcriptions`, `applications`, -`laml_bins`, `queues`, `tokens`, `accounts`) cover the full Python -`client.compat.*` surface. - -#### Signature - -```rust -fn compat(&self) -> ?<'_> -``` - -#### Returns - -`?<'_>` - -#### Source - -[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) - -Line 182. - -*** - -### datasphere - -Datasphere namespace (documents + chunks + search). - -#### Signature - -```rust -fn datasphere(&self) -> ?<'_> -``` - -#### Returns - -`?<'_>` - -#### Source - -[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) - -Line 163. - -*** - -### fabric - -Fabric API (sub-resources: subscribers, sip\_endpoints, call\_flows, ...). - -#### Signature - -```rust -fn fabric(&self) -> ?<'_> -``` - -#### Returns - -`?<'_>` - -#### Source - -[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) - -Line 148. - -*** - -### from\_env - -Create from environment variables. - -#### Signature - -```rust -fn from_env() -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) - -Line 109. - -*** - -### http - -#### Signature - -```rust -fn http(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) - -Line 135. - -*** - -### imported\_numbers - -Imported phone numbers. - -#### Signature - -```rust -fn imported_numbers(&self) -> ?<'_> -``` - -#### Returns - -`?<'_>` - -#### Source - -[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) - -Line 228. - -*** - -### logs - -Logs (messages, voice, fax, conferences). - -#### Signature - -```rust -fn logs(&self) -> ?<'_> -``` - -#### Returns - -`?<'_>` - -#### Source - -[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) - -Line 243. - -*** - -### lookup - -Phone number lookup. - -#### Signature - -```rust -fn lookup(&self) -> ?<'_> -``` - -#### Returns - -`?<'_>` - -#### Source - -[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) - -Line 218. - -*** - -### mfa - -Multi-factor authentication (sms/call/verify). - -#### Signature - -```rust -fn mfa(&self) -> ?<'_> -``` - -#### Returns - -`?<'_>` - -#### Source - -[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) - -Line 233. - -*** - -### new - -Create a new REST client with explicit credentials. The base URL -resolves to `https://{space}`. Use \[`with_base_url`] to override -(e.g. for fixture-driven tests pointed at `http://127.0.0.1:N`). - -#### Signature - -```rust -fn new(project_id: &str, token: &str, space: &str) -> ? -``` - -#### Parameters - - - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) - -Line 26. - -*** - -### number\_groups - -Number groups (CRUD + membership operations). - -#### Signature - -```rust -fn number_groups(&self) -> ?<'_> -``` - -#### Returns - -`?<'_>` - -#### Source - -[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) - -Line 202. - -*** - -### phone\_numbers - -Phone numbers. - -#### Signature - -```rust -fn phone_numbers(&self) -> ?<'_> -``` - -#### Returns - -`?<'_>` - -#### Source - -[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) - -Line 158. - -*** - -### project - -Project namespace (exposes `tokens` sub-resource). - -#### Signature - -```rust -fn project(&self) -> ?<'_> -``` - -#### Returns - -`?<'_>` - -#### Source - -[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) - -Line 248. - -*** - -### project\_id - -#### Signature - -```rust -fn project_id(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) - -Line 119. - -*** - -### pubsub - -PubSub tokens. - -#### Signature - -```rust -fn pubsub(&self) -> ?<'_> -``` - -#### Returns - -`?<'_>` - -#### Source - -[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) - -Line 253. - -*** - -### queues - -Queues namespace (CRUD + member operations). - -#### Signature - -```rust -fn queues(&self) -> ?<'_> -``` - -#### Returns - -`?<'_>` - -#### Source - -[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) - -Line 192. - -*** - -### recordings - -Recordings. - -#### Signature - -```rust -fn recordings(&self) -> ?<'_> -``` - -#### Returns - -`?<'_>` - -#### Source - -[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) - -Line 197. - -*** - -### registry - -Registry (10DLC brands, campaigns, orders, numbers). - -#### Signature - -```rust -fn registry(&self) -> ?<'_> -``` - -#### Returns - -`?<'_>` - -#### Source - -[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) - -Line 238. - -*** - -### short\_codes - -Short codes. - -#### Signature - -```rust -fn short_codes(&self) -> ?<'_> -``` - -#### Returns - -`?<'_>` - -#### Source - -[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) - -Line 223. - -*** - -### sip\_profile - -Project SIP profile (singular: singleton resource at -`/api/relay/rest/sip_profile`). - -#### Signature - -```rust -fn sip_profile(&self) -> ?<'_> -``` - -#### Returns - -`?<'_>` - -#### Source - -[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) - -Line 213. - -*** - -### space - -#### Signature - -```rust -fn space(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) - -Line 127. - -*** - -### token - -#### Signature - -```rust -fn token(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) - -Line 123. - -*** - -### verified\_callers - -Verified callers. - -#### Signature - -```rust -fn verified_callers(&self) -> ?<'_> -``` - -#### Returns - -`?<'_>` - -#### Source - -[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) - -Line 207. - -*** - -### video - -Video API namespace (rooms, sessions, recordings, conferences, -tokens, streams). - -#### Signature - -```rust -fn video(&self) -> ?<'_> -``` - -#### Returns - -`?<'_>` - -#### Source - -[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) - -Line 171. - -*** - -### with\_base\_url - -Create a REST client with an explicit base URL. Used by audit -harnesses and integration tests to point at a local fixture -without going through the `https://{space}` resolution. Production -callers should use \[`new`] instead. - -#### Signature - -```rust -fn with_base_url(project_id: &str, token: &str, base_url: &str) -> ? -``` - -#### Parameters - - - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) - -Line 64. - -*** - -### with\_http - -Create a REST client with a specific HTTP client (for testing). - -#### Signature - -```rust -fn with_http(project_id: &str, token: &str, space: &str, http: ?) -> ? -``` - -#### Parameters - - - - - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) - -Line 90. - -## Source - -[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) - -Line 14. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/crud-resource/crud-resource/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/crud-resource/crud-resource/index.mdx deleted file mode 100644 index e542b72883..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/rest/crud-resource/crud-resource/index.mdx +++ /dev/null @@ -1,231 +0,0 @@ ---- -slug: "/reference/rust/signalwire/rest/crud-resource/crud-resource" -title: "CrudResource" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::rest::crud_resource::CrudResource" - parent: "signalwire::rest::crud_resource" - module: "rest.crud_resource" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/crud_resource.rs" - visibility: "public" ---- -# `CrudResource` - -Generic CRUD wrapper around an HttpClient and a base API path. - -Provides list / create / get / update / delete for any REST resource -that follows the standard SignalWire collection+item URL pattern. - -## Signature - -```rust -struct CrudResource { /* fields */ } -``` - -## Methods - -### base\_path - -#### Signature - -```rust -fn base_path(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/rest/crud_resource.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/crud_resource.rs) - -Line 25. - -*** - -### client - -#### Signature - -```rust -fn client(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/rest/crud_resource.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/crud_resource.rs) - -Line 29. - -*** - -### create - -Create a new resource (POST basePath). - -#### Signature - -```rust -fn create(&self, data: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/crud_resource.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/crud_resource.rs) - -Line 47. - -*** - -### delete - -Delete a resource by ID (DELETE basePath/\{id\}). - -#### Signature - -```rust -fn delete(&self, id: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/crud_resource.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/crud_resource.rs) - -Line 62. - -*** - -### get - -Retrieve a single resource by ID (GET basePath/\{id\}). - -#### Signature - -```rust -fn get(&self, id: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/crud_resource.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/crud_resource.rs) - -Line 52. - -*** - -### list - -List resources (GET basePath). - -#### Signature - -```rust -fn list(&self, params: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/crud_resource.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/crud_resource.rs) - -Line 42. - -*** - -### new - -#### Signature - -```rust -fn new(client: &'a ?, base_path: &str) -> Self -``` - -#### Parameters - - - - - -#### Returns - -`Self` - -#### Source - -[`src/rest/crud_resource.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/crud_resource.rs) - -Line 18. - -*** - -### update - -Update a resource by ID (PUT basePath/\{id\}). - -#### Signature - -```rust -fn update(&self, id: &str, data: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/crud_resource.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/crud_resource.rs) - -Line 57. - -## Source - -[`src/rest/crud_resource.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/crud_resource.rs) - -Line 12. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/crud-resource/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/crud-resource/index.mdx deleted file mode 100644 index 93cb41c495..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/rest/crud-resource/index.mdx +++ /dev/null @@ -1,30 +0,0 @@ ---- -slug: "/reference/rust/signalwire/rest/crud-resource" -title: "crud_resource" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "signalwire::rest::crud_resource" - parent: "signalwire::rest" - module: "rest" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/crud_resource.rs" - visibility: "public" ---- -# `crud_resource` - -## Classes - - - - Generic CRUD wrapper around an HttpClient and a base API path. - - - -## Source - -[`src/rest/crud_resource.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/crud_resource.rs) - -Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/error/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/error/index.mdx deleted file mode 100644 index 63add5a2b0..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/rest/error/index.mdx +++ /dev/null @@ -1,33 +0,0 @@ ---- -slug: "/reference/rust/signalwire/rest/error" -title: "error" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "signalwire::rest::error" - parent: "signalwire::rest" - module: "rest" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/error.rs" - visibility: "public" ---- -# `error` - -REST module -- SignalWire REST API client, HTTP transport, and CRUD -resource helpers. - -## Classes - - - - Exception thrown when a SignalWire REST API request fails with a non-2xx status. - - - -## Source - -[`src/rest/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/error.rs) - -Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/error/signal-wire-rest-error/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/error/signal-wire-rest-error/index.mdx deleted file mode 100644 index d06891e5c0..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/rest/error/signal-wire-rest-error/index.mdx +++ /dev/null @@ -1,190 +0,0 @@ ---- -slug: "/reference/rust/signalwire/rest/error/signal-wire-rest-error" -title: "SignalWireRestError" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::rest::error::SignalWireRestError" - parent: "signalwire::rest::error" - module: "rest.error" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/error.rs" - visibility: "public" ---- -# `SignalWireRestError` - -Exception thrown when a SignalWire REST API request fails with a non-2xx status. - -## Signature - -```rust -struct SignalWireRestError { /* fields */ } -``` - -## Inheritance - -**Implements:** `Debug`, `Clone`, `Display`, [Error](/docs/sdk-reference/reference/rust/signalwire/security/webhook-layer/webhook-validate#error) - -## Methods - -### clone - -#### Signature - -```rust -fn clone(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/rest/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/error.rs) - -Line 4. - -*** - -### fmt - -#### Signature - -```rust -fn fmt(&self, f: &mut ?<'_>) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/error.rs) - -Line 4. - -*** - -### fmt - -#### Signature - -```rust -fn fmt(&self, f: &mut ?<'_>) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/error.rs) - -Line 34. - -*** - -### message - -#### Signature - -```rust -fn message(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/rest/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/error.rs) - -Line 20. - -*** - -### new - -#### Signature - -```rust -fn new(message: &str, status_code: u16, response_body: &str) -> Self -``` - -#### Parameters - - - - - - - -#### Returns - -`Self` - -#### Source - -[`src/rest/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/error.rs) - -Line 12. - -*** - -### response\_body - -#### Signature - -```rust -fn response_body(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/rest/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/error.rs) - -Line 28. - -*** - -### status\_code - -#### Signature - -```rust -fn status_code(&self) -> u16 -``` - -#### Returns - -`u16` - -#### Source - -[`src/rest/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/error.rs) - -Line 24. - -## Source - -[`src/rest/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/error.rs) - -Line 5. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/http-client/http-client/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/http-client/http-client/index.mdx deleted file mode 100644 index 4a9772fecb..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/rest/http-client/http-client/index.mdx +++ /dev/null @@ -1,334 +0,0 @@ ---- -slug: "/reference/rust/signalwire/rest/http-client/http-client" -title: "HttpClient" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::rest::http_client::HttpClient" - parent: "signalwire::rest::http_client" - module: "rest.http_client" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs" - visibility: "public" ---- -# `HttpClient` - -Low-level HTTP client for SignalWire REST APIs. - -Uses Basic Auth with project\_id:token and returns parsed JSON -responses as `serde_json::Value`. - -## Signature - -```rust -struct HttpClient { /* fields */ } -``` - -## Methods - -### auth\_header - -#### Signature - -```rust -fn auth_header(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) - -Line 251. - -*** - -### base\_url - -#### Signature - -```rust -fn base_url(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) - -Line 247. - -*** - -### delete - -#### Signature - -```rust -fn delete(&self, path: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) - -Line 276. - -*** - -### get - -#### Signature - -```rust -fn get(&self, path: &str, params: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) - -Line 257. - -*** - -### list\_all - -Return all pages of results, following `links.next`. - -#### Signature - -```rust -fn list_all(&self, path: &str, params: &?) -> ?, ?> -``` - -#### Parameters - - - - - -#### Returns - -`?, ?>` - -#### Source - -[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) - -Line 283. - -*** - -### new - -#### Signature - -```rust -fn new( - project_id: &str, - token: &str, - base_url: &str, - transport: ? -) -> Self -``` - -#### Parameters - - - - - - - - - -#### Returns - -`Self` - -#### Source - -[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) - -Line 205. - -*** - -### patch - -#### Signature - -```rust -fn patch(&self, path: &str, data: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) - -Line 271. - -*** - -### post - -#### Signature - -```rust -fn post(&self, path: &str, data: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) - -Line 261. - -*** - -### project\_id - -#### Signature - -```rust -fn project_id(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) - -Line 239. - -*** - -### put - -#### Signature - -```rust -fn put(&self, path: &str, data: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) - -Line 266. - -*** - -### token - -#### Signature - -```rust -fn token(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) - -Line 243. - -*** - -### with\_stub - -Create with a stub transport for testing. - -#### Signature - -```rust -fn with_stub(project_id: &str, token: &str, base_url: &str) -> (Self, ?) -``` - -#### Parameters - - - - - - - -#### Returns - -`(Self, ?)` - -#### Source - -[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) - -Line 226. - -## Source - -[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) - -Line 195. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/http-client/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/http-client/index.mdx deleted file mode 100644 index 9c2d92dc19..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/rest/http-client/index.mdx +++ /dev/null @@ -1,99 +0,0 @@ ---- -slug: "/reference/rust/signalwire/rest/http-client" -title: "http_client" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "signalwire::rest::http_client" - parent: "signalwire::rest" - module: "rest" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs" - visibility: "public" ---- -# `http_client` - -## Classes - - - - Low-level HTTP client for SignalWire REST APIs. - - - - A stub transport that records requests and returns canned responses. Useful for unit testing without network access. - - - - Real HTTP transport backed by ureq. - - - -## Interfaces - -### HttpTransport - -Trait for the HTTP transport layer. - -Production code uses a real implementation (e.g. ureq), while -tests inject a mock. - -#### Signature - -```rust -trait HttpTransport -``` - -#### Inheritance - -**Extends:** `?`, `?` - -#### Methods - -##### execute - -###### Signature - -```rust -fn execute( - &self, - method: &str, - url: &str, - headers: &?, - body: ?<&str> -) -> ?<(u16, ?), ?> -``` - -###### Parameters - - - - - - - - - -###### Returns - -`?<(u16, ?), ?>` - -###### Source - -[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) - -Line 14. - -#### Source - -[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) - -Line 13. - -## Source - -[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) - -Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/http-client/stub-transport/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/http-client/stub-transport/index.mdx deleted file mode 100644 index 53b8a4a33c..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/rest/http-client/stub-transport/index.mdx +++ /dev/null @@ -1,129 +0,0 @@ ---- -slug: "/reference/rust/signalwire/rest/http-client/stub-transport" -title: "StubTransport" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::rest::http_client::StubTransport" - parent: "signalwire::rest::http_client" - module: "rest.http_client" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs" - visibility: "public" ---- -# `StubTransport` - -A stub transport that records requests and returns canned responses. -Useful for unit testing without network access. - -## Signature - -```rust -struct StubTransport { /* fields */ } -``` - -## Inheritance - -**Implements:** `HttpTransport` - -## Properties - - - Recorded requests: (method, url, body). - - - - Canned response: (status\_code, body). - - -## Methods - -### execute - -#### Signature - -```rust -fn execute( - &self, - method: &str, - url: &str, - _headers: &?, - body: ?<&str> -) -> ?<(u16, ?), ?> -``` - -#### Parameters - - - - - - - - - -#### Returns - -`?<(u16, ?), ?>` - -#### Source - -[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) - -Line 174. - -*** - -### new - -#### Signature - -```rust -fn new(status: u16, body: &str) -> Self -``` - -#### Parameters - - - - - -#### Returns - -`Self` - -#### Source - -[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) - -Line 161. - -*** - -### set\_response - -#### Signature - -```rust -fn set_response(&self, status: u16, body: &str) -``` - -#### Parameters - - - - - -#### Source - -[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) - -Line 168. - -## Source - -[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) - -Line 153. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/http-client/ureq-transport/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/http-client/ureq-transport/index.mdx deleted file mode 100644 index 17ccea253f..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/rest/http-client/ureq-transport/index.mdx +++ /dev/null @@ -1,116 +0,0 @@ ---- -slug: "/reference/rust/signalwire/rest/http-client/ureq-transport" -title: "UreqTransport" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::rest::http_client::UreqTransport" - parent: "signalwire::rest::http_client" - module: "rest.http_client" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs" - visibility: "public" ---- -# `UreqTransport` - -Real HTTP transport backed by ureq. - -This is the production transport — every REST namespace operation -goes through `ureq::Agent::request()` to a real HTTP endpoint. The -REST audit fixture (`audit_rest_transport.py`) drives the wire -shape (method, path, headers, body) end-to-end against this code, -so any regression in serialization is caught. - -## Signature - -```rust -struct UreqTransport { /* fields */ } -``` - -## Inheritance - -**Implements:** `Default`, `HttpTransport` - -## Methods - -### default - -#### Signature - -```rust -fn default() -> Self -``` - -#### Returns - -`Self` - -#### Source - -[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) - -Line 35. - -*** - -### execute - -#### Signature - -```rust -fn execute( - &self, - method: &str, - url: &str, - headers: &?, - body: ?<&str> -) -> ?<(u16, ?), ?> -``` - -#### Parameters - - - - - - - - - -#### Returns - -`?<(u16, ?), ?>` - -#### Source - -[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) - -Line 83. - -*** - -### new - -#### Signature - -```rust -fn new() -> Self -``` - -#### Returns - -`Self` - -#### Source - -[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) - -Line 41. - -## Source - -[`src/rest/http_client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/http_client.rs) - -Line 30. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/index.mdx deleted file mode 100644 index 912d250892..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/rest/index.mdx +++ /dev/null @@ -1,41 +0,0 @@ ---- -slug: "/reference/rust/signalwire/rest" -title: "rest" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "signalwire::rest" - parent: "signalwire" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/mod.rs" - visibility: "public" ---- -# `rest` - -## Modules - - - - - - - - REST module -- SignalWire REST API client, HTTP transport, and CRUD resource helpers. - - - - - - - - Paginated iterator over `links.next`-cursor responses. - - - -## Source - -[`src/rest/mod.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/mod.rs) - -Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/calling/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/calling/index.mdx deleted file mode 100644 index d713e5749c..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/calling/index.mdx +++ /dev/null @@ -1,1082 +0,0 @@ ---- -slug: "/reference/rust/signalwire/rest/namespaces/calling" -title: "calling" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::rest::namespaces::calling" - parent: "signalwire::rest::namespaces" - module: "rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs" - visibility: "public" ---- -# `calling` - -Calling API namespace. - -Provides 37 call-control command methods that each POST to -`/api/calling/calls` with a JSON body containing the command name, -an optional call ID, and parameters. - -## Signature - -```rust -struct Calling { /* fields */ } -``` - -## Methods - -### ai\_hold - -#### Signature - -```rust -fn ai_hold(&self, call_id: &str, params: ?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) - -Line 246. - -*** - -### ai\_message - -#### Signature - -```rust -fn ai_message(&self, call_id: &str, params: ?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) - -Line 238. - -*** - -### ai\_stop - -#### Signature - -```rust -fn ai_stop(&self, call_id: &str, params: ?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) - -Line 254. - -*** - -### ai\_unhold - -#### Signature - -```rust -fn ai_unhold(&self, call_id: &str, params: ?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) - -Line 250. - -*** - -### base\_path - -#### Signature - -```rust -fn base_path(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) - -Line 35. - -*** - -### client - -#### Signature - -```rust -fn client(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) - -Line 27. - -*** - -### collect - -#### Signature - -```rust -fn collect(&self, call_id: &str, params: ?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) - -Line 138. - -*** - -### collect\_start\_input\_timers - -#### Signature - -```rust -fn collect_start_input_timers(&self, call_id: &str, params: ?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) - -Line 150. - -*** - -### collect\_stop - -#### Signature - -```rust -fn collect_stop(&self, call_id: &str, params: ?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) - -Line 142. - -*** - -### denoise - -#### Signature - -```rust -fn denoise(&self, call_id: &str, params: ?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) - -Line 202. - -*** - -### denoise\_stop - -#### Signature - -```rust -fn denoise_stop(&self, call_id: &str, params: ?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) - -Line 206. - -*** - -### detect - -#### Signature - -```rust -fn detect(&self, call_id: &str, params: ?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) - -Line 162. - -*** - -### detect\_stop - -#### Signature - -```rust -fn detect_stop(&self, call_id: &str, params: ?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) - -Line 166. - -*** - -### dial - -#### Signature - -```rust -fn dial(&self, params: ?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) - -Line 63. - -*** - -### disconnect - -#### Signature - -```rust -fn disconnect(&self, call_id: &str, params: ?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) - -Line 82. - -*** - -### end - -#### Signature - -```rust -fn end(&self, call_id: &str, params: ?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) - -Line 74. - -*** - -### live\_transcribe - -#### Signature - -```rust -fn live_transcribe(&self, call_id: &str, params: ?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) - -Line 262. - -*** - -### live\_translate - -#### Signature - -```rust -fn live_translate(&self, call_id: &str, params: ?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) - -Line 270. - -*** - -### new - -#### Signature - -```rust -fn new(client: &'a ?, project_id: &str) -> Self -``` - -#### Parameters - - - - - -#### Returns - -`Self` - -#### Source - -[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) - -Line 20. - -*** - -### play - -#### Signature - -```rust -fn play(&self, call_id: &str, params: ?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) - -Line 90. - -*** - -### play\_pause - -#### Signature - -```rust -fn play_pause(&self, call_id: &str, params: ?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) - -Line 94. - -*** - -### play\_resume - -#### Signature - -```rust -fn play_resume(&self, call_id: &str, params: ?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) - -Line 98. - -*** - -### play\_stop - -#### Signature - -```rust -fn play_stop(&self, call_id: &str, params: ?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) - -Line 102. - -*** - -### play\_volume - -#### Signature - -```rust -fn play_volume(&self, call_id: &str, params: ?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) - -Line 106. - -*** - -### project\_id - -#### Signature - -```rust -fn project_id(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) - -Line 31. - -*** - -### receive\_fax\_stop - -#### Signature - -```rust -fn receive_fax_stop(&self, call_id: &str, params: ?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) - -Line 290. - -*** - -### record - -#### Signature - -```rust -fn record(&self, call_id: &str, params: ?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) - -Line 114. - -*** - -### record\_pause - -#### Signature - -```rust -fn record_pause(&self, call_id: &str, params: ?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) - -Line 118. - -*** - -### record\_resume - -#### Signature - -```rust -fn record_resume(&self, call_id: &str, params: ?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) - -Line 122. - -*** - -### record\_stop - -#### Signature - -```rust -fn record_stop(&self, call_id: &str, params: ?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) - -Line 130. - -*** - -### refer - -#### Signature - -```rust -fn refer(&self, call_id: &str, params: ?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) - -Line 302. - -*** - -### send\_fax\_stop - -#### Signature - -```rust -fn send_fax_stop(&self, call_id: &str, params: ?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) - -Line 282. - -*** - -### stream - -#### Signature - -```rust -fn stream(&self, call_id: &str, params: ?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) - -Line 186. - -*** - -### stream\_stop - -#### Signature - -```rust -fn stream_stop(&self, call_id: &str, params: ?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) - -Line 190. - -*** - -### tap - -#### Signature - -```rust -fn tap(&self, call_id: &str, params: ?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) - -Line 174. - -*** - -### tap\_stop - -#### Signature - -```rust -fn tap_stop(&self, call_id: &str, params: ?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) - -Line 178. - -*** - -### transcribe - -#### Signature - -```rust -fn transcribe(&self, call_id: &str, params: ?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) - -Line 218. - -*** - -### transcribe\_stop - -#### Signature - -```rust -fn transcribe_stop(&self, call_id: &str, params: ?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) - -Line 226. - -*** - -### transfer - -#### Signature - -```rust -fn transfer(&self, call_id: &str, params: ?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) - -Line 78. - -*** - -### update - -POST /api/calling/calls with `command="update"` — mirrors the Python -`client.calling.update(id=..., state=...)` shape: caller-supplied -`id` lives **inside** params, not as the top-level body field. - -#### Signature - -```rust -fn update(&self, params: ?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) - -Line 70. - -*** - -### user\_event - -#### Signature - -```rust -fn user_event(&self, call_id: &str, params: ?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) - -Line 310. - -## Source - -[`src/rest/namespaces/calling.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs) - -Line 14. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-accounts/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-accounts/index.mdx deleted file mode 100644 index ce3aba82b1..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-accounts/index.mdx +++ /dev/null @@ -1,172 +0,0 @@ ---- -slug: "/reference/rust/signalwire/rest/namespaces/compat/compat-accounts" -title: "CompatAccounts" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::rest::namespaces::compat::CompatAccounts" - parent: "signalwire::rest::namespaces::compat" - module: "rest.namespaces.compat" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs" - visibility: "public" ---- -# `CompatAccounts` - -## Signature - -```rust -struct CompatAccounts { /* fields */ } -``` - -## Methods - -### base\_path - -#### Signature - -```rust -fn base_path(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 135. - -*** - -### create - -#### Signature - -```rust -fn create(&self, params: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 144. - -*** - -### get - -#### Signature - -```rust -fn get(&self, sid: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 148. - -*** - -### list - -#### Signature - -```rust -fn list(&self, params: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 139. - -*** - -### new - -#### Signature - -```rust -fn new(client: &'a ?, base_path: &str) -> Self -``` - -#### Parameters - - - - - -#### Returns - -`Self` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 128. - -*** - -### update - -#### Signature - -```rust -fn update(&self, sid: &str, params: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 152. - -## Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 122. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-applications/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-applications/index.mdx deleted file mode 100644 index aab98d9c43..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-applications/index.mdx +++ /dev/null @@ -1,196 +0,0 @@ ---- -slug: "/reference/rust/signalwire/rest/namespaces/compat/compat-applications" -title: "CompatApplications" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::rest::namespaces::compat::CompatApplications" - parent: "signalwire::rest::namespaces::compat" - module: "rest.namespaces.compat" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs" - visibility: "public" ---- -# `CompatApplications` - -## Signature - -```rust -struct CompatApplications { /* fields */ } -``` - -## Methods - -### base\_path - -#### Signature - -```rust -fn base_path(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 597. - -*** - -### create - -#### Signature - -```rust -fn create(&self, params: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 606. - -*** - -### delete - -#### Signature - -```rust -fn delete(&self, sid: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 618. - -*** - -### get - -#### Signature - -```rust -fn get(&self, sid: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 610. - -*** - -### list - -#### Signature - -```rust -fn list(&self, params: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 601. - -*** - -### new - -#### Signature - -```rust -fn new(client: &'a ?, base_path: &str) -> Self -``` - -#### Parameters - - - - - -#### Returns - -`Self` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 590. - -*** - -### update - -#### Signature - -```rust -fn update(&self, sid: &str, params: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 614. - -## Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 584. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-calls/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-calls/index.mdx deleted file mode 100644 index 6bac64c7aa..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-calls/index.mdx +++ /dev/null @@ -1,221 +0,0 @@ ---- -slug: "/reference/rust/signalwire/rest/namespaces/compat/compat-calls" -title: "CompatCalls" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::rest::namespaces::compat::CompatCalls" - parent: "signalwire::rest::namespaces::compat" - module: "rest.namespaces.compat" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs" - visibility: "public" ---- -# `CompatCalls` - -## Signature - -```rust -struct CompatCalls { /* fields */ } -``` - -## Methods - -### base\_path - -#### Signature - -```rust -fn base_path(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 174. - -*** - -### new - -#### Signature - -```rust -fn new(client: &'a ?, base_path: &str) -> Self -``` - -#### Parameters - - - - - -#### Returns - -`Self` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 167. - -*** - -### start\_recording - -POST /Calls/\{sid\}/Recordings — start a new recording on the call. - -#### Signature - -```rust -fn start_recording(&self, call_sid: &str, params: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 183. - -*** - -### start\_stream - -POST /Calls/\{sid\}/Streams — start a new stream on the call. - -#### Signature - -```rust -fn start_stream(&self, call_sid: &str, params: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 204. - -*** - -### stop\_stream - -POST /Calls/\{sid\}/Streams/\{stream\_sid\} — stop / update a stream. - -#### Signature - -```rust -fn stop_stream(&self, call_sid: &str, stream_sid: &str, params: &?) -> ? -``` - -#### Parameters - - - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 214. - -*** - -### update - -#### Signature - -```rust -fn update(&self, sid: &str, params: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 178. - -*** - -### update\_recording - -POST /Calls/\{sid\}/Recordings/\{rec\_sid\} — update a specific recording. - -#### Signature - -```rust -fn update_recording( - &self, - call_sid: &str, - recording_sid: &str, - params: &? -) -> ? -``` - -#### Parameters - - - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 193. - -## Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 161. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-conferences/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-conferences/index.mdx deleted file mode 100644 index ad0b4686cf..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-conferences/index.mdx +++ /dev/null @@ -1,429 +0,0 @@ ---- -slug: "/reference/rust/signalwire/rest/namespaces/compat/compat-conferences" -title: "CompatConferences" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::rest::namespaces::compat::CompatConferences" - parent: "signalwire::rest::namespaces::compat" - module: "rest.namespaces.compat" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs" - visibility: "public" ---- -# `CompatConferences` - -## Signature - -```rust -struct CompatConferences { /* fields */ } -``` - -## Methods - -### base\_path - -#### Signature - -```rust -fn base_path(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 380. - -*** - -### delete\_recording - -#### Signature - -```rust -fn delete_recording(&self, conference_sid: &str, recording_sid: &str) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 464. - -*** - -### get - -#### Signature - -```rust -fn get(&self, sid: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 389. - -*** - -### get\_participant - -#### Signature - -```rust -fn get_participant(&self, conference_sid: &str, call_sid: &str) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 407. - -*** - -### get\_recording - -#### Signature - -```rust -fn get_recording(&self, conference_sid: &str, recording_sid: &str) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 445. - -*** - -### list - -#### Signature - -```rust -fn list(&self, params: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 384. - -*** - -### list\_participants - -#### Signature - -```rust -fn list_participants(&self, conference_sid: &str, params: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 397. - -*** - -### list\_recordings - -#### Signature - -```rust -fn list_recordings(&self, conference_sid: &str, params: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 435. - -*** - -### new - -#### Signature - -```rust -fn new(client: &'a ?, base_path: &str) -> Self -``` - -#### Parameters - - - - - -#### Returns - -`Self` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 373. - -*** - -### remove\_participant - -#### Signature - -```rust -fn remove_participant(&self, conference_sid: &str, call_sid: &str) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 426. - -*** - -### start\_stream - -#### Signature - -```rust -fn start_stream(&self, conference_sid: &str, params: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 473. - -*** - -### stop\_stream - -#### Signature - -```rust -fn stop_stream( - &self, - conference_sid: &str, - stream_sid: &str, - params: &? -) -> ? -``` - -#### Parameters - - - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 482. - -*** - -### update - -#### Signature - -```rust -fn update(&self, sid: &str, params: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 393. - -*** - -### update\_participant - -#### Signature - -```rust -fn update_participant( - &self, - conference_sid: &str, - call_sid: &str, - params: &? -) -> ? -``` - -#### Parameters - - - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 416. - -*** - -### update\_recording - -#### Signature - -```rust -fn update_recording( - &self, - conference_sid: &str, - recording_sid: &str, - params: &? -) -> ? -``` - -#### Parameters - - - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 454. - -## Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 367. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-faxes/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-faxes/index.mdx deleted file mode 100644 index 82d8fbd55e..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-faxes/index.mdx +++ /dev/null @@ -1,274 +0,0 @@ ---- -slug: "/reference/rust/signalwire/rest/namespaces/compat/compat-faxes" -title: "CompatFaxes" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::rest::namespaces::compat::CompatFaxes" - parent: "signalwire::rest::namespaces::compat" - module: "rest.namespaces.compat" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs" - visibility: "public" ---- -# `CompatFaxes` - -## Signature - -```rust -struct CompatFaxes { /* fields */ } -``` - -## Methods - -### base\_path - -#### Signature - -```rust -fn base_path(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 313. - -*** - -### create - -#### Signature - -```rust -fn create(&self, params: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 322. - -*** - -### delete - -#### Signature - -```rust -fn delete(&self, sid: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 334. - -*** - -### delete\_media - -#### Signature - -```rust -fn delete_media(&self, fax_sid: &str, media_sid: &str) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 353. - -*** - -### get - -#### Signature - -```rust -fn get(&self, sid: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 326. - -*** - -### get\_media - -#### Signature - -```rust -fn get_media(&self, fax_sid: &str, media_sid: &str) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 344. - -*** - -### list - -#### Signature - -```rust -fn list(&self, params: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 317. - -*** - -### list\_media - -#### Signature - -```rust -fn list_media(&self, fax_sid: &str, params: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 338. - -*** - -### new - -#### Signature - -```rust -fn new(client: &'a ?, base_path: &str) -> Self -``` - -#### Parameters - - - - - -#### Returns - -`Self` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 306. - -*** - -### update - -#### Signature - -```rust -fn update(&self, sid: &str, params: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 330. - -## Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 300. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-laml-bins/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-laml-bins/index.mdx deleted file mode 100644 index a13b79ca5f..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-laml-bins/index.mdx +++ /dev/null @@ -1,196 +0,0 @@ ---- -slug: "/reference/rust/signalwire/rest/namespaces/compat/compat-laml-bins" -title: "CompatLamlBins" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::rest::namespaces::compat::CompatLamlBins" - parent: "signalwire::rest::namespaces::compat" - module: "rest.namespaces.compat" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs" - visibility: "public" ---- -# `CompatLamlBins` - -## Signature - -```rust -struct CompatLamlBins { /* fields */ } -``` - -## Methods - -### base\_path - -#### Signature - -```rust -fn base_path(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 640. - -*** - -### create - -#### Signature - -```rust -fn create(&self, params: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 649. - -*** - -### delete - -#### Signature - -```rust -fn delete(&self, sid: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 661. - -*** - -### get - -#### Signature - -```rust -fn get(&self, sid: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 653. - -*** - -### list - -#### Signature - -```rust -fn list(&self, params: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 644. - -*** - -### new - -#### Signature - -```rust -fn new(client: &'a ?, base_path: &str) -> Self -``` - -#### Parameters - - - - - -#### Returns - -`Self` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 633. - -*** - -### update - -#### Signature - -```rust -fn update(&self, sid: &str, params: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 657. - -## Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 627. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-messages/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-messages/index.mdx deleted file mode 100644 index e3ade909a7..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-messages/index.mdx +++ /dev/null @@ -1,274 +0,0 @@ ---- -slug: "/reference/rust/signalwire/rest/namespaces/compat/compat-messages" -title: "CompatMessages" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::rest::namespaces::compat::CompatMessages" - parent: "signalwire::rest::namespaces::compat" - module: "rest.namespaces.compat" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs" - visibility: "public" ---- -# `CompatMessages` - -## Signature - -```rust -struct CompatMessages { /* fields */ } -``` - -## Methods - -### base\_path - -#### Signature - -```rust -fn base_path(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 242. - -*** - -### create - -#### Signature - -```rust -fn create(&self, params: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 251. - -*** - -### delete - -#### Signature - -```rust -fn delete(&self, sid: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 263. - -*** - -### delete\_media - -#### Signature - -```rust -fn delete_media(&self, message_sid: &str, media_sid: &str) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 286. - -*** - -### get - -#### Signature - -```rust -fn get(&self, sid: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 255. - -*** - -### get\_media - -#### Signature - -```rust -fn get_media(&self, message_sid: &str, media_sid: &str) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 277. - -*** - -### list - -#### Signature - -```rust -fn list(&self, params: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 246. - -*** - -### list\_media - -#### Signature - -```rust -fn list_media(&self, message_sid: &str, params: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 267. - -*** - -### new - -#### Signature - -```rust -fn new(client: &'a ?, base_path: &str) -> Self -``` - -#### Parameters - - - - - -#### Returns - -`Self` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 235. - -*** - -### update - -#### Signature - -```rust -fn update(&self, sid: &str, params: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 259. - -## Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 229. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-phone-numbers/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-phone-numbers/index.mdx deleted file mode 100644 index 7087e935d5..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-phone-numbers/index.mdx +++ /dev/null @@ -1,318 +0,0 @@ ---- -slug: "/reference/rust/signalwire/rest/namespaces/compat/compat-phone-numbers" -title: "CompatPhoneNumbers" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::rest::namespaces::compat::CompatPhoneNumbers" - parent: "signalwire::rest::namespaces::compat" - module: "rest.namespaces.compat" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs" - visibility: "public" ---- -# `CompatPhoneNumbers` - -## Signature - -```rust -struct CompatPhoneNumbers { /* fields */ } -``` - -## Methods - -### available\_base - -#### Signature - -```rust -fn available_base(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 518. - -*** - -### base\_path - -#### Signature - -```rust -fn base_path(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 514. - -*** - -### delete - -#### Signature - -```rust -fn delete(&self, sid: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 539. - -*** - -### get - -#### Signature - -```rust -fn get(&self, sid: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 531. - -*** - -### import\_number - -POST /ImportedPhoneNumbers — note the path is _Imported_, not _Incoming_. - -#### Signature - -```rust -fn import_number(&self, params: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 544. - -*** - -### list - -#### Signature - -```rust -fn list(&self, params: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 522. - -*** - -### list\_available\_countries - -#### Signature - -```rust -fn list_available_countries(&self, params: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 551. - -*** - -### new - -#### Signature - -```rust -fn new(client: &'a ?, base_path: &str) -> Self -``` - -#### Parameters - - - - - -#### Returns - -`Self` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 504. - -*** - -### purchase - -#### Signature - -```rust -fn purchase(&self, params: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 527. - -*** - -### search\_local - -#### Signature - -```rust -fn search_local(&self, country: &str, params: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 559. - -*** - -### search\_toll\_free - -#### Signature - -```rust -fn search_toll_free(&self, country: &str, params: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 569. - -*** - -### update - -#### Signature - -```rust -fn update(&self, sid: &str, params: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 535. - -## Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 497. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-queues/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-queues/index.mdx deleted file mode 100644 index 4fc37c244e..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-queues/index.mdx +++ /dev/null @@ -1,276 +0,0 @@ ---- -slug: "/reference/rust/signalwire/rest/namespaces/compat/compat-queues" -title: "CompatQueues" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::rest::namespaces::compat::CompatQueues" - parent: "signalwire::rest::namespaces::compat" - module: "rest.namespaces.compat" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs" - visibility: "public" ---- -# `CompatQueues` - -## Signature - -```rust -struct CompatQueues { /* fields */ } -``` - -## Methods - -### base\_path - -#### Signature - -```rust -fn base_path(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 683. - -*** - -### create - -#### Signature - -```rust -fn create(&self, params: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 692. - -*** - -### delete - -#### Signature - -```rust -fn delete(&self, sid: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 704. - -*** - -### dequeue\_member - -#### Signature - -```rust -fn dequeue_member(&self, queue_sid: &str, call_sid: &str, params: &?) -> ? -``` - -#### Parameters - - - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 727. - -*** - -### get - -#### Signature - -```rust -fn get(&self, sid: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 696. - -*** - -### get\_member - -#### Signature - -```rust -fn get_member(&self, queue_sid: &str, call_sid: &str) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 718. - -*** - -### list - -#### Signature - -```rust -fn list(&self, params: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 687. - -*** - -### list\_members - -#### Signature - -```rust -fn list_members(&self, queue_sid: &str, params: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 708. - -*** - -### new - -#### Signature - -```rust -fn new(client: &'a ?, base_path: &str) -> Self -``` - -#### Parameters - - - - - -#### Returns - -`Self` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 676. - -*** - -### update - -#### Signature - -```rust -fn update(&self, sid: &str, params: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 700. - -## Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 670. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-recordings/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-recordings/index.mdx deleted file mode 100644 index 2d5c139995..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-recordings/index.mdx +++ /dev/null @@ -1,146 +0,0 @@ ---- -slug: "/reference/rust/signalwire/rest/namespaces/compat/compat-recordings" -title: "CompatRecordings" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::rest::namespaces::compat::CompatRecordings" - parent: "signalwire::rest::namespaces::compat" - module: "rest.namespaces.compat" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs" - visibility: "public" ---- -# `CompatRecordings` - -## Signature - -```rust -struct CompatRecordings { /* fields */ } -``` - -## Methods - -### base\_path - -#### Signature - -```rust -fn base_path(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 755. - -*** - -### delete - -#### Signature - -```rust -fn delete(&self, sid: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 768. - -*** - -### get - -#### Signature - -```rust -fn get(&self, sid: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 764. - -*** - -### list - -#### Signature - -```rust -fn list(&self, params: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 759. - -*** - -### new - -#### Signature - -```rust -fn new(client: &'a ?, base_path: &str) -> Self -``` - -#### Parameters - - - - - -#### Returns - -`Self` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 748. - -## Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 742. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-tokens/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-tokens/index.mdx deleted file mode 100644 index 5d79851429..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-tokens/index.mdx +++ /dev/null @@ -1,148 +0,0 @@ ---- -slug: "/reference/rust/signalwire/rest/namespaces/compat/compat-tokens" -title: "CompatTokens" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::rest::namespaces::compat::CompatTokens" - parent: "signalwire::rest::namespaces::compat" - module: "rest.namespaces.compat" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs" - visibility: "public" ---- -# `CompatTokens` - -## Signature - -```rust -struct CompatTokens { /* fields */ } -``` - -## Methods - -### base\_path - -#### Signature - -```rust -fn base_path(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 825. - -*** - -### create - -#### Signature - -```rust -fn create(&self, params: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 829. - -*** - -### delete - -#### Signature - -```rust -fn delete(&self, token_id: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 841. - -*** - -### new - -#### Signature - -```rust -fn new(client: &'a ?, base_path: &str) -> Self -``` - -#### Parameters - - - - - -#### Returns - -`Self` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 818. - -*** - -### update - -#### Signature - -```rust -fn update(&self, token_id: &str, params: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 833. - -## Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 812. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-transcriptions/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-transcriptions/index.mdx deleted file mode 100644 index b60f05c603..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/compat-transcriptions/index.mdx +++ /dev/null @@ -1,146 +0,0 @@ ---- -slug: "/reference/rust/signalwire/rest/namespaces/compat/compat-transcriptions" -title: "CompatTranscriptions" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::rest::namespaces::compat::CompatTranscriptions" - parent: "signalwire::rest::namespaces::compat" - module: "rest.namespaces.compat" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs" - visibility: "public" ---- -# `CompatTranscriptions` - -## Signature - -```rust -struct CompatTranscriptions { /* fields */ } -``` - -## Methods - -### base\_path - -#### Signature - -```rust -fn base_path(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 790. - -*** - -### delete - -#### Signature - -```rust -fn delete(&self, sid: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 803. - -*** - -### get - -#### Signature - -```rust -fn get(&self, sid: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 799. - -*** - -### list - -#### Signature - -```rust -fn list(&self, params: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 794. - -*** - -### new - -#### Signature - -```rust -fn new(client: &'a ?, base_path: &str) -> Self -``` - -#### Parameters - - - - - -#### Returns - -`Self` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 783. - -## Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 777. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/index.mdx deleted file mode 100644 index 20bf6e2022..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/compat/index.mdx +++ /dev/null @@ -1,369 +0,0 @@ ---- -slug: "/reference/rust/signalwire/rest/namespaces/compat" -title: "compat" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::rest::namespaces::compat" - parent: "signalwire::rest::namespaces" - module: "rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs" - visibility: "public" ---- -# `compat` - -Compat (Twilio-compatible LAML) API namespace. - -Mirrors `signalwire.rest.namespaces.compat.CompatNamespace` from the -Python SDK. The base path is -`/api/laml/2010-04-01/Accounts/{account_sid}` and every sub-resource -is rooted under that. - -## Signature - -```rust -struct Compat { /* fields */ } -``` - -## Classes - - - - - - - - - - - - - - - - - - - - - - - - - - - -## Methods - -### account\_sid - -#### Signature - -```rust -fn account_sid(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 33. - -*** - -### accounts - -#### Signature - -```rust -fn accounts(&self) -> ?<'a> -``` - -#### Returns - -`?<'a>` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 43. - -*** - -### applications - -#### Signature - -```rust -fn applications(&self) -> ?<'a> -``` - -#### Returns - -`?<'a>` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 67. - -*** - -### calls - -#### Signature - -```rust -fn calls(&self) -> ?<'a> -``` - -#### Returns - -`?<'a>` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 47. - -*** - -### client - -#### Signature - -```rust -fn client(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 29. - -*** - -### conferences - -#### Signature - -```rust -fn conferences(&self) -> ?<'a> -``` - -#### Returns - -`?<'a>` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 59. - -*** - -### faxes - -#### Signature - -```rust -fn faxes(&self) -> ?<'a> -``` - -#### Returns - -`?<'a>` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 55. - -*** - -### laml\_bins - -#### Signature - -```rust -fn laml_bins(&self) -> ?<'a> -``` - -#### Returns - -`?<'a>` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 71. - -*** - -### messages - -#### Signature - -```rust -fn messages(&self) -> ?<'a> -``` - -#### Returns - -`?<'a>` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 51. - -*** - -### new - -#### Signature - -```rust -fn new(client: &'a ?, account_sid: &str) -> Self -``` - -#### Parameters - - - - - -#### Returns - -`Self` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 22. - -*** - -### phone\_numbers - -#### Signature - -```rust -fn phone_numbers(&self) -> ?<'a> -``` - -#### Returns - -`?<'a>` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 63. - -*** - -### queues - -#### Signature - -```rust -fn queues(&self) -> ?<'a> -``` - -#### Returns - -`?<'a>` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 75. - -*** - -### recordings - -#### Signature - -```rust -fn recordings(&self) -> ?<'a> -``` - -#### Returns - -`?<'a>` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 79. - -*** - -### tokens - -#### Signature - -```rust -fn tokens(&self) -> ?<'a> -``` - -#### Returns - -`?<'a>` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 87. - -*** - -### transcriptions - -#### Signature - -```rust -fn transcriptions(&self) -> ?<'a> -``` - -#### Returns - -`?<'a>` - -#### Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 83. - -## Source - -[`src/rest/namespaces/compat.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs) - -Line 16. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/datasphere/datasphere-documents/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/datasphere/datasphere-documents/index.mdx deleted file mode 100644 index 02b4d9d0d2..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/datasphere/datasphere-documents/index.mdx +++ /dev/null @@ -1,301 +0,0 @@ ---- -slug: "/reference/rust/signalwire/rest/namespaces/datasphere/datasphere-documents" -title: "DatasphereDocuments" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::rest::namespaces::datasphere::DatasphereDocuments" - parent: "signalwire::rest::namespaces::datasphere" - module: "rest.namespaces.datasphere" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/datasphere.rs" - visibility: "public" ---- -# `DatasphereDocuments` - -Datasphere documents resource. - -Rooted at `/api/datasphere/documents` with CRUD plus search and chunk -sub-paths. - -## Signature - -```rust -struct DatasphereDocuments { /* fields */ } -``` - -## Methods - -### base\_path - -#### Signature - -```rust -fn base_path(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/rest/namespaces/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/datasphere.rs) - -Line 42. - -*** - -### create - -#### Signature - -```rust -fn create(&self, params: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/datasphere.rs) - -Line 66. - -*** - -### delete - -#### Signature - -```rust -fn delete(&self, document_id: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/datasphere.rs) - -Line 84. - -*** - -### delete\_chunk - -#### Signature - -```rust -fn delete_chunk(&self, document_id: &str, chunk_id: &str) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/datasphere.rs) - -Line 112. - -*** - -### get - -#### Signature - -```rust -fn get(&self, document_id: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/datasphere.rs) - -Line 70. - -*** - -### get\_chunk - -#### Signature - -```rust -fn get_chunk(&self, document_id: &str, chunk_id: &str) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/datasphere.rs) - -Line 103. - -*** - -### list - -#### Signature - -```rust -fn list(&self, params: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/datasphere.rs) - -Line 61. - -*** - -### list\_chunks - -#### Signature - -```rust -fn list_chunks(&self, document_id: &str, params: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/datasphere.rs) - -Line 93. - -*** - -### new - -#### Signature - -```rust -fn new(client: &'a ?) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/rest/namespaces/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/datasphere.rs) - -Line 35. - -*** - -### search - -#### Signature - -```rust -fn search(&self, params: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/datasphere.rs) - -Line 89. - -*** - -### update - -#### Signature - -```rust -fn update(&self, document_id: &str, params: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/datasphere.rs) - -Line 75. - -## Source - -[`src/rest/namespaces/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/datasphere.rs) - -Line 29. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/datasphere/datasphere-namespace/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/datasphere/datasphere-namespace/index.mdx deleted file mode 100644 index 3bfc630fcb..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/datasphere/datasphere-namespace/index.mdx +++ /dev/null @@ -1,76 +0,0 @@ ---- -slug: "/reference/rust/signalwire/rest/namespaces/datasphere/datasphere-namespace" -title: "DatasphereNamespace" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::rest::namespaces::datasphere::DatasphereNamespace" - parent: "signalwire::rest::namespaces::datasphere" - module: "rest.namespaces.datasphere" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/datasphere.rs" - visibility: "public" ---- -# `DatasphereNamespace` - -Datasphere API namespace — exposes documents. - -Mirrors `signalwire.rest.namespaces.datasphere.DatasphereNamespace`. - -## Signature - -```rust -struct DatasphereNamespace { /* fields */ } -``` - -## Methods - -### documents - -#### Signature - -```rust -fn documents(&self) -> ?<'a> -``` - -#### Returns - -`?<'a>` - -#### Source - -[`src/rest/namespaces/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/datasphere.rs) - -Line 20. - -*** - -### new - -#### Signature - -```rust -fn new(client: &'a ?) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/rest/namespaces/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/datasphere.rs) - -Line 16. - -## Source - -[`src/rest/namespaces/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/datasphere.rs) - -Line 11. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/datasphere/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/datasphere/index.mdx deleted file mode 100644 index c591bbb3dc..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/datasphere/index.mdx +++ /dev/null @@ -1,34 +0,0 @@ ---- -slug: "/reference/rust/signalwire/rest/namespaces/datasphere" -title: "datasphere" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "signalwire::rest::namespaces::datasphere" - parent: "signalwire::rest::namespaces" - module: "rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/datasphere.rs" - visibility: "public" ---- -# `datasphere` - -## Classes - - - - Datasphere documents resource. - - - - Datasphere API namespace — exposes documents. - - - -## Source - -[`src/rest/namespaces/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/datasphere.rs) - -Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/fabric/call-flows-resource/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/fabric/call-flows-resource/index.mdx deleted file mode 100644 index 75acdf64d5..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/fabric/call-flows-resource/index.mdx +++ /dev/null @@ -1,276 +0,0 @@ ---- -slug: "/reference/rust/signalwire/rest/namespaces/fabric/call-flows-resource" -title: "CallFlowsResource" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::rest::namespaces::fabric::CallFlowsResource" - parent: "signalwire::rest::namespaces::fabric" - module: "rest.namespaces.fabric" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs" - visibility: "public" ---- -# `CallFlowsResource` - -## Signature - -```rust -struct CallFlowsResource { /* fields */ } -``` - -## Methods - -### base\_path - -#### Signature - -```rust -fn base_path(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 293. - -*** - -### create - -#### Signature - -```rust -fn create(&self, params: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 306. - -*** - -### delete - -#### Signature - -```rust -fn delete(&self, resource_id: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 324. - -*** - -### deploy\_version - -#### Signature - -```rust -fn deploy_version(&self, resource_id: &str, params: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 352. - -*** - -### get - -#### Signature - -```rust -fn get(&self, resource_id: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 310. - -*** - -### list - -#### Signature - -```rust -fn list(&self, params: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 301. - -*** - -### list\_addresses - -Sub-resource list — uses singular `call_flow` per the API spec. - -#### Signature - -```rust -fn list_addresses(&self, resource_id: &str, params: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 330. - -*** - -### list\_versions - -#### Signature - -```rust -fn list_versions(&self, resource_id: &str, params: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 341. - -*** - -### new - -#### Signature - -```rust -fn new(client: &'a ?, base_path: &str) -> Self -``` - -#### Parameters - - - - - -#### Returns - -`Self` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 286. - -*** - -### update - -#### Signature - -```rust -fn update(&self, resource_id: &str, params: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 315. - -## Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 280. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/fabric/conference-rooms-resource/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/fabric/conference-rooms-resource/index.mdx deleted file mode 100644 index 68b5751b65..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/fabric/conference-rooms-resource/index.mdx +++ /dev/null @@ -1,222 +0,0 @@ ---- -slug: "/reference/rust/signalwire/rest/namespaces/fabric/conference-rooms-resource" -title: "ConferenceRoomsResource" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::rest::namespaces::fabric::ConferenceRoomsResource" - parent: "signalwire::rest::namespaces::fabric" - module: "rest.namespaces.fabric" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs" - visibility: "public" ---- -# `ConferenceRoomsResource` - -## Signature - -```rust -struct ConferenceRoomsResource { /* fields */ } -``` - -## Methods - -### base\_path - -#### Signature - -```rust -fn base_path(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 380. - -*** - -### create - -#### Signature - -```rust -fn create(&self, params: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 393. - -*** - -### delete - -#### Signature - -```rust -fn delete(&self, resource_id: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 411. - -*** - -### get - -#### Signature - -```rust -fn get(&self, resource_id: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 397. - -*** - -### list - -#### Signature - -```rust -fn list(&self, params: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 388. - -*** - -### list\_addresses - -#### Signature - -```rust -fn list_addresses(&self, resource_id: &str, params: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 416. - -*** - -### new - -#### Signature - -```rust -fn new(client: &'a ?, base_path: &str) -> Self -``` - -#### Parameters - - - - - -#### Returns - -`Self` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 373. - -*** - -### update - -#### Signature - -```rust -fn update(&self, resource_id: &str, params: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 402. - -## Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 367. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/fabric/cxml-applications-resource/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/fabric/cxml-applications-resource/index.mdx deleted file mode 100644 index e2238b1af2..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/fabric/cxml-applications-resource/index.mdx +++ /dev/null @@ -1,202 +0,0 @@ ---- -slug: "/reference/rust/signalwire/rest/namespaces/fabric/cxml-applications-resource" -title: "CxmlApplicationsResource" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::rest::namespaces::fabric::CxmlApplicationsResource" - parent: "signalwire::rest::namespaces::fabric" - module: "rest.namespaces.fabric" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs" - visibility: "public" ---- -# `CxmlApplicationsResource` - -## Signature - -```rust -struct CxmlApplicationsResource { /* fields */ } -``` - -## Methods - -### base\_path - -#### Signature - -```rust -fn base_path(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 445. - -*** - -### create - -cXML applications cannot be created via this API. - -Returns an `Err` with a clear "not implemented" message that -mirrors the Python SDK's `NotImplementedError`. No HTTP request -is sent to the server. - -#### Signature - -```rust -fn create(&self, _params: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 478. - -*** - -### delete - -#### Signature - -```rust -fn delete(&self, resource_id: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 468. - -*** - -### get - -#### Signature - -```rust -fn get(&self, resource_id: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 454. - -*** - -### list - -#### Signature - -```rust -fn list(&self, params: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 449. - -*** - -### new - -#### Signature - -```rust -fn new(client: &'a ?, base_path: &str) -> Self -``` - -#### Parameters - - - - - -#### Returns - -`Self` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 438. - -*** - -### update - -#### Signature - -```rust -fn update(&self, resource_id: &str, params: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 459. - -## Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 432. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/fabric/fabric-addresses/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/fabric/fabric-addresses/index.mdx deleted file mode 100644 index 68008c0eba..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/fabric/fabric-addresses/index.mdx +++ /dev/null @@ -1,122 +0,0 @@ ---- -slug: "/reference/rust/signalwire/rest/namespaces/fabric/fabric-addresses" -title: "FabricAddresses" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::rest::namespaces::fabric::FabricAddresses" - parent: "signalwire::rest::namespaces::fabric" - module: "rest.namespaces.fabric" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs" - visibility: "public" ---- -# `FabricAddresses` - -## Signature - -```rust -struct FabricAddresses { /* fields */ } -``` - -## Methods - -### base\_path - -#### Signature - -```rust -fn base_path(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 154. - -*** - -### get - -#### Signature - -```rust -fn get(&self, address_id: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 163. - -*** - -### list - -#### Signature - -```rust -fn list(&self, params: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 158. - -*** - -### new - -#### Signature - -```rust -fn new(client: &'a ?, base_path: &str) -> Self -``` - -#### Parameters - - - - - -#### Returns - -`Self` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 147. - -## Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 141. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/fabric/fabric-tokens/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/fabric/fabric-tokens/index.mdx deleted file mode 100644 index f35b51b005..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/fabric/fabric-tokens/index.mdx +++ /dev/null @@ -1,174 +0,0 @@ ---- -slug: "/reference/rust/signalwire/rest/namespaces/fabric/fabric-tokens" -title: "FabricTokens" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::rest::namespaces::fabric::FabricTokens" - parent: "signalwire::rest::namespaces::fabric" - module: "rest.namespaces.fabric" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs" - visibility: "public" ---- -# `FabricTokens` - -## Signature - -```rust -struct FabricTokens { /* fields */ } -``` - -## Methods - -### create\_embed\_token - -#### Signature - -```rust -fn create_embed_token(&self, params: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 587. - -*** - -### create\_guest\_token - -#### Signature - -```rust -fn create_guest_token(&self, params: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 580. - -*** - -### create\_invite\_token - -Note the singular `subscriber` segment per the spec. - -#### Signature - -```rust -fn create_invite_token(&self, params: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 573. - -*** - -### create\_subscriber\_token - -#### Signature - -```rust -fn create_subscriber_token(&self, params: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 556. - -*** - -### new - -#### Signature - -```rust -fn new(client: &'a ?) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 552. - -*** - -### refresh\_subscriber\_token - -#### Signature - -```rust -fn refresh_subscriber_token(&self, params: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 564. - -## Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 547. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/fabric/generic-resources/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/fabric/generic-resources/index.mdx deleted file mode 100644 index fefd377a6c..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/fabric/generic-resources/index.mdx +++ /dev/null @@ -1,198 +0,0 @@ ---- -slug: "/reference/rust/signalwire/rest/namespaces/fabric/generic-resources" -title: "GenericResources" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::rest::namespaces::fabric::GenericResources" - parent: "signalwire::rest::namespaces::fabric" - module: "rest.namespaces.fabric" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs" - visibility: "public" ---- -# `GenericResources` - -## Signature - -```rust -struct GenericResources { /* fields */ } -``` - -## Methods - -### assign\_domain\_application - -#### Signature - -```rust -fn assign_domain_application(&self, resource_id: &str, params: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 533. - -*** - -### base\_path - -#### Signature - -```rust -fn base_path(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 504. - -*** - -### delete - -#### Signature - -```rust -fn delete(&self, resource_id: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 518. - -*** - -### get - -#### Signature - -```rust -fn get(&self, resource_id: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 513. - -*** - -### list - -#### Signature - -```rust -fn list(&self, params: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 508. - -*** - -### list\_addresses - -#### Signature - -```rust -fn list_addresses(&self, resource_id: &str, params: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 523. - -*** - -### new - -#### Signature - -```rust -fn new(client: &'a ?, base_path: &str) -> Self -``` - -#### Parameters - - - - - -#### Returns - -`Self` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 497. - -## Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 491. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/fabric/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/fabric/index.mdx deleted file mode 100644 index 840284ad22..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/fabric/index.mdx +++ /dev/null @@ -1,431 +0,0 @@ ---- -slug: "/reference/rust/signalwire/rest/namespaces/fabric" -title: "fabric" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::rest::namespaces::fabric" - parent: "signalwire::rest::namespaces" - module: "rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs" - visibility: "public" ---- -# `fabric` - -REST API namespace modules. -Fabric API namespace — resource composition, addresses, and tokens. - -Mirrors `signalwire.rest.namespaces.fabric.FabricNamespace` from the -Python SDK. - -## Signature - -```rust -struct Fabric { /* fields */ } -``` - -## Classes - - - - - - - - - - - - - - - - - -## Methods - -### addresses - -Read-only top-level fabric addresses (NOT under `/resources`). - -#### Signature - -```rust -fn addresses(&self) -> ?<'a> -``` - -#### Returns - -`?<'a>` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 71. - -*** - -### ai\_agents - -#### Signature - -```rust -fn ai_agents(&self) -> ?<'a> -``` - -#### Returns - -`?<'a>` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 106. - -*** - -### call\_flows - -Call flows — exposes a singular `call_flow` sub-path for addresses -/ versions per the API spec. - -#### Signature - -```rust -fn call_flows(&self) -> ?<'a> -``` - -#### Returns - -`?<'a>` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 77. - -*** - -### call\_queues - -#### Signature - -```rust -fn call_queues(&self) -> ?<'a> -``` - -#### Returns - -`?<'a>` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 102. - -*** - -### client - -#### Signature - -```rust -fn client(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 55. - -*** - -### conference\_rooms - -Conference rooms — singular `conference_room` for sub-paths. - -#### Signature - -```rust -fn conference_rooms(&self) -> ?<'a> -``` - -#### Returns - -`?<'a>` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 90. - -*** - -### conversations - -#### Signature - -```rust -fn conversations(&self) -> ?<'a> -``` - -#### Returns - -`?<'a>` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 85. - -*** - -### cxml\_applications - -cXML applications — read/update/delete only (no create). - -#### Signature - -```rust -fn cxml_applications(&self) -> ?<'a> -``` - -#### Returns - -`?<'a>` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 119. - -*** - -### dial\_plans - -#### Signature - -```rust -fn dial_plans(&self) -> ?<'a> -``` - -#### Returns - -`?<'a>` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 94. - -*** - -### freeclimb\_apps - -#### Signature - -```rust -fn freeclimb_apps(&self) -> ?<'a> -``` - -#### Returns - -`?<'a>` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 98. - -*** - -### new - -#### Signature - -```rust -fn new(client: &'a ?) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 51. - -*** - -### phone\_numbers - -#### Signature - -```rust -fn phone_numbers(&self) -> ?<'a> -``` - -#### Returns - -`?<'a>` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 114. - -*** - -### resources - -Generic resource operations across every fabric resource type. - -#### Signature - -```rust -fn resources(&self) -> ?<'a> -``` - -#### Returns - -`?<'a>` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 127. - -*** - -### sip\_endpoints - -#### Signature - -```rust -fn sip_endpoints(&self) -> ?<'a> -``` - -#### Returns - -`?<'a>` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 66. - -*** - -### sip\_profiles - -#### Signature - -```rust -fn sip_profiles(&self) -> ?<'a> -``` - -#### Returns - -`?<'a>` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 110. - -*** - -### subscribers - -Subscribers resource — full CRUD plus SIP-endpoint sub-resources. - -#### Signature - -```rust -fn subscribers(&self) -> ?<'a> -``` - -#### Returns - -`?<'a>` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 62. - -*** - -### swml\_scripts - -#### Signature - -```rust -fn swml_scripts(&self) -> ?<'a> -``` - -#### Returns - -`?<'a>` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 81. - -*** - -### tokens - -Fabric token factories (subscriber / guest / invite / embed). - -#### Signature - -```rust -fn tokens(&self) -> ?<'a> -``` - -#### Returns - -`?<'a>` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 132. - -## Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 46. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/fabric/subscribers-resource/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/fabric/subscribers-resource/index.mdx deleted file mode 100644 index dabb72b754..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/fabric/subscribers-resource/index.mdx +++ /dev/null @@ -1,359 +0,0 @@ ---- -slug: "/reference/rust/signalwire/rest/namespaces/fabric/subscribers-resource" -title: "SubscribersResource" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::rest::namespaces::fabric::SubscribersResource" - parent: "signalwire::rest::namespaces::fabric" - module: "rest.namespaces.fabric" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs" - visibility: "public" ---- -# `SubscribersResource` - -## Signature - -```rust -struct SubscribersResource { /* fields */ } -``` - -## Methods - -### base\_path - -#### Signature - -```rust -fn base_path(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 186. - -*** - -### create - -#### Signature - -```rust -fn create(&self, params: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 195. - -*** - -### create\_sip\_endpoint - -#### Signature - -```rust -fn create_sip_endpoint(&self, subscriber_id: &str, params: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 238. - -*** - -### delete - -#### Signature - -```rust -fn delete(&self, subscriber_id: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 213. - -*** - -### delete\_sip\_endpoint - -#### Signature - -```rust -fn delete_sip_endpoint(&self, subscriber_id: &str, endpoint_id: &str) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 266. - -*** - -### get - -#### Signature - -```rust -fn get(&self, subscriber_id: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 199. - -*** - -### get\_sip\_endpoint - -#### Signature - -```rust -fn get_sip_endpoint(&self, subscriber_id: &str, endpoint_id: &str) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 247. - -*** - -### list - -#### Signature - -```rust -fn list(&self, params: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 190. - -*** - -### list\_addresses - -#### Signature - -```rust -fn list_addresses(&self, subscriber_id: &str, params: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 218. - -*** - -### list\_sip\_endpoints - -#### Signature - -```rust -fn list_sip_endpoints(&self, subscriber_id: &str, params: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 228. - -*** - -### new - -#### Signature - -```rust -fn new(client: &'a ?, base_path: &str) -> Self -``` - -#### Parameters - - - - - -#### Returns - -`Self` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 179. - -*** - -### update - -#### Signature - -```rust -fn update(&self, subscriber_id: &str, params: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 204. - -*** - -### update\_sip\_endpoint - -#### Signature - -```rust -fn update_sip_endpoint( - &self, - subscriber_id: &str, - endpoint_id: &str, - params: &? -) -> ? -``` - -#### Parameters - - - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 256. - -## Source - -[`src/rest/namespaces/fabric.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs) - -Line 173. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/index.mdx deleted file mode 100644 index 15336fccbd..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/index.mdx +++ /dev/null @@ -1,72 +0,0 @@ ---- -slug: "/reference/rust/signalwire/rest/namespaces" -title: "namespaces" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "signalwire::rest::namespaces" - parent: "signalwire::rest" - module: "rest" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/mod.rs" - visibility: "public" ---- -# `namespaces` - -## Classes - - - - Calling API namespace. - - - - Compat (Twilio-compatible LAML) API namespace. - - - - REST API namespace modules. Fabric API namespace — resource composition, addresses, and tokens. - - - - Logs namespace — message, voice, fax, conference logs (read-only). - - - - MFA (Multi-Factor Authentication) namespace. - - - - Project API namespace — exposes the API token sub-resource. - - - - Queues namespace. - - - - 10DLC Campaign Registry namespace — brands, campaigns, orders, numbers. - - - - Video API namespace — rooms, sessions, recordings, conferences, tokens, streams. - - - -## Modules - - - - - - - - - -## Source - -[`src/rest/namespaces/mod.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/mod.rs) - -Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/logs/conference-logs/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/logs/conference-logs/index.mdx deleted file mode 100644 index aa9cd7bec5..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/logs/conference-logs/index.mdx +++ /dev/null @@ -1,98 +0,0 @@ ---- -slug: "/reference/rust/signalwire/rest/namespaces/logs/conference-logs" -title: "ConferenceLogs" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::rest::namespaces::logs::ConferenceLogs" - parent: "signalwire::rest::namespaces::logs" - module: "rest.namespaces.logs" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs" - visibility: "public" ---- -# `ConferenceLogs` - -## Signature - -```rust -struct ConferenceLogs { /* fields */ } -``` - -## Methods - -### base\_path - -#### Signature - -```rust -fn base_path(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) - -Line 196. - -*** - -### list - -#### Signature - -```rust -fn list(&self, params: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) - -Line 200. - -*** - -### new - -#### Signature - -```rust -fn new(client: &'a ?, base_path: &str) -> Self -``` - -#### Parameters - - - - - -#### Returns - -`Self` - -#### Source - -[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) - -Line 189. - -## Source - -[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) - -Line 183. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/logs/fax-logs/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/logs/fax-logs/index.mdx deleted file mode 100644 index 81cd97267b..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/logs/fax-logs/index.mdx +++ /dev/null @@ -1,122 +0,0 @@ ---- -slug: "/reference/rust/signalwire/rest/namespaces/logs/fax-logs" -title: "FaxLogs" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::rest::namespaces::logs::FaxLogs" - parent: "signalwire::rest::namespaces::logs" - module: "rest.namespaces.logs" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs" - visibility: "public" ---- -# `FaxLogs` - -## Signature - -```rust -struct FaxLogs { /* fields */ } -``` - -## Methods - -### base\_path - -#### Signature - -```rust -fn base_path(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) - -Line 164. - -*** - -### get - -#### Signature - -```rust -fn get(&self, log_id: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) - -Line 173. - -*** - -### list - -#### Signature - -```rust -fn list(&self, params: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) - -Line 168. - -*** - -### new - -#### Signature - -```rust -fn new(client: &'a ?, base_path: &str) -> Self -``` - -#### Parameters - - - - - -#### Returns - -`Self` - -#### Source - -[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) - -Line 157. - -## Source - -[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) - -Line 151. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/logs/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/logs/index.mdx deleted file mode 100644 index 8fbb6b9f46..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/logs/index.mdx +++ /dev/null @@ -1,170 +0,0 @@ ---- -slug: "/reference/rust/signalwire/rest/namespaces/logs" -title: "logs" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::rest::namespaces::logs" - parent: "signalwire::rest::namespaces" - module: "rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs" - visibility: "public" ---- -# `logs` - -Logs namespace — message, voice, fax, conference logs (read-only). - -Mirrors `signalwire.rest.namespaces.logs.LogsNamespace`. Each -sub-resource binds to a different sub-API path because the upstream -specs live in different documents. - -## Signature - -```rust -struct Logs { /* fields */ } -``` - -## Classes - - - - - - - - - - - -## Methods - -### client - -#### Signature - -```rust -fn client(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) - -Line 52. - -*** - -### conferences - -#### Signature - -```rust -fn conferences(&self) -> ?<'a> -``` - -#### Returns - -`?<'a>` - -#### Source - -[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) - -Line 68. - -*** - -### fax - -#### Signature - -```rust -fn fax(&self) -> ?<'a> -``` - -#### Returns - -`?<'a>` - -#### Source - -[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) - -Line 64. - -*** - -### messages - -#### Signature - -```rust -fn messages(&self) -> ?<'a> -``` - -#### Returns - -`?<'a>` - -#### Source - -[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) - -Line 56. - -*** - -### new - -#### Signature - -```rust -fn new(client: &'a ?) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) - -Line 48. - -*** - -### voice - -#### Signature - -```rust -fn voice(&self) -> ?<'a> -``` - -#### Returns - -`?<'a>` - -#### Source - -[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) - -Line 60. - -## Source - -[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) - -Line 43. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/logs/message-logs/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/logs/message-logs/index.mdx deleted file mode 100644 index c5e93fe656..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/logs/message-logs/index.mdx +++ /dev/null @@ -1,122 +0,0 @@ ---- -slug: "/reference/rust/signalwire/rest/namespaces/logs/message-logs" -title: "MessageLogs" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::rest::namespaces::logs::MessageLogs" - parent: "signalwire::rest::namespaces::logs" - module: "rest.namespaces.logs" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs" - visibility: "public" ---- -# `MessageLogs` - -## Signature - -```rust -struct MessageLogs { /* fields */ } -``` - -## Methods - -### base\_path - -#### Signature - -```rust -fn base_path(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) - -Line 90. - -*** - -### get - -#### Signature - -```rust -fn get(&self, log_id: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) - -Line 99. - -*** - -### list - -#### Signature - -```rust -fn list(&self, params: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) - -Line 94. - -*** - -### new - -#### Signature - -```rust -fn new(client: &'a ?, base_path: &str) -> Self -``` - -#### Parameters - - - - - -#### Returns - -`Self` - -#### Source - -[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) - -Line 83. - -## Source - -[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) - -Line 77. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/logs/voice-logs/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/logs/voice-logs/index.mdx deleted file mode 100644 index e2ec072837..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/logs/voice-logs/index.mdx +++ /dev/null @@ -1,148 +0,0 @@ ---- -slug: "/reference/rust/signalwire/rest/namespaces/logs/voice-logs" -title: "VoiceLogs" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::rest::namespaces::logs::VoiceLogs" - parent: "signalwire::rest::namespaces::logs" - module: "rest.namespaces.logs" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs" - visibility: "public" ---- -# `VoiceLogs` - -## Signature - -```rust -struct VoiceLogs { /* fields */ } -``` - -## Methods - -### base\_path - -#### Signature - -```rust -fn base_path(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) - -Line 122. - -*** - -### get - -#### Signature - -```rust -fn get(&self, log_id: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) - -Line 131. - -*** - -### list - -#### Signature - -```rust -fn list(&self, params: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) - -Line 126. - -*** - -### list\_events - -#### Signature - -```rust -fn list_events(&self, log_id: &str, params: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) - -Line 136. - -*** - -### new - -#### Signature - -```rust -fn new(client: &'a ?, base_path: &str) -> Self -``` - -#### Parameters - - - - - -#### Returns - -`Self` - -#### Source - -[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) - -Line 115. - -## Source - -[`src/rest/namespaces/logs.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs) - -Line 109. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/mfa/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/mfa/index.mdx deleted file mode 100644 index 21910448e6..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/mfa/index.mdx +++ /dev/null @@ -1,158 +0,0 @@ ---- -slug: "/reference/rust/signalwire/rest/namespaces/mfa" -title: "mfa" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::rest::namespaces::mfa" - parent: "signalwire::rest::namespaces" - module: "rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/mfa.rs" - visibility: "public" ---- -# `mfa` - -MFA (Multi-Factor Authentication) namespace. - -Mirrors `signalwire.rest.namespaces.mfa.MfaResource` from the Python SDK. -Rooted at `/api/relay/rest/mfa` with `sms`, `call`, and `verify` -sub-paths. - -## Signature - -```rust -struct Mfa { /* fields */ } -``` - -## Methods - -### base\_path - -#### Signature - -```rust -fn base_path(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/rest/namespaces/mfa.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/mfa.rs) - -Line 24. - -*** - -### call - -POST /api/relay/rest/mfa/call — deliver a one-time code via voice. - -#### Signature - -```rust -fn call(&self, params: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/mfa.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/mfa.rs) - -Line 34. - -*** - -### new - -#### Signature - -```rust -fn new(client: &'a ?) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/rest/namespaces/mfa.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/mfa.rs) - -Line 17. - -*** - -### sms - -POST /api/relay/rest/mfa/sms — send a one-time code over SMS. - -#### Signature - -```rust -fn sms(&self, params: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/mfa.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/mfa.rs) - -Line 29. - -*** - -### verify - -POST /api/relay/rest/mfa/\{request\_id\}/verify — verify a code. - -#### Signature - -```rust -fn verify(&self, request_id: &str, params: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/mfa.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/mfa.rs) - -Line 39. - -## Source - -[`src/rest/namespaces/mfa.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/mfa.rs) - -Line 11. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/number-groups/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/number-groups/index.mdx deleted file mode 100644 index 070198b832..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/number-groups/index.mdx +++ /dev/null @@ -1,30 +0,0 @@ ---- -slug: "/reference/rust/signalwire/rest/namespaces/number-groups" -title: "number_groups" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "signalwire::rest::namespaces::number_groups" - parent: "signalwire::rest::namespaces" - module: "rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs" - visibility: "public" ---- -# `number_groups` - -## Classes - - - - Number Groups namespace. - - - -## Source - -[`src/rest/namespaces/number_groups.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs) - -Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/number-groups/number-groups/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/number-groups/number-groups/index.mdx deleted file mode 100644 index 7ea6dae154..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/number-groups/number-groups/index.mdx +++ /dev/null @@ -1,303 +0,0 @@ ---- -slug: "/reference/rust/signalwire/rest/namespaces/number-groups/number-groups" -title: "NumberGroups" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::rest::namespaces::number_groups::NumberGroups" - parent: "signalwire::rest::namespaces::number_groups" - module: "rest.namespaces.number_groups" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs" - visibility: "public" ---- -# `NumberGroups` - -Number Groups namespace. - -Mirrors `signalwire.rest.namespaces.number_groups.NumberGroupsResource`. -Provides standard CRUD over `/api/relay/rest/number_groups` plus the -membership endpoints rooted at the same collection and at the -project-scoped `/api/relay/rest/number_group_memberships` collection. - -## Signature - -```rust -struct NumberGroups { /* fields */ } -``` - -## Methods - -### add\_membership - -#### Signature - -```rust -fn add_membership(&self, group_id: &str, params: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/number_groups.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs) - -Line 88. - -*** - -### base\_path - -#### Signature - -```rust -fn base_path(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/rest/namespaces/number_groups.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs) - -Line 27. - -*** - -### create - -#### Signature - -```rust -fn create(&self, params: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/number_groups.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs) - -Line 51. - -*** - -### delete - -#### Signature - -```rust -fn delete(&self, group_id: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/number_groups.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs) - -Line 69. - -*** - -### delete\_membership - -#### Signature - -```rust -fn delete_membership(&self, membership_id: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/number_groups.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs) - -Line 111. - -*** - -### get - -#### Signature - -```rust -fn get(&self, group_id: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/number_groups.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs) - -Line 55. - -*** - -### get\_membership - -#### Signature - -```rust -fn get_membership(&self, membership_id: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/number_groups.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs) - -Line 100. - -*** - -### list - -#### Signature - -```rust -fn list(&self, params: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/number_groups.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs) - -Line 46. - -*** - -### list\_memberships - -GET /api/relay/rest/number\_groups/\{id\}/number\_group\_memberships - -#### Signature - -```rust -fn list_memberships(&self, group_id: &str, params: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/number_groups.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs) - -Line 75. - -*** - -### new - -#### Signature - -```rust -fn new(client: &'a ?) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/rest/namespaces/number_groups.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs) - -Line 20. - -*** - -### update - -#### Signature - -```rust -fn update(&self, group_id: &str, params: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/number_groups.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs) - -Line 60. - -## Source - -[`src/rest/namespaces/number_groups.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs) - -Line 14. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/project/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/project/index.mdx deleted file mode 100644 index 0fd12613ed..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/project/index.mdx +++ /dev/null @@ -1,84 +0,0 @@ ---- -slug: "/reference/rust/signalwire/rest/namespaces/project" -title: "project" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::rest::namespaces::project" - parent: "signalwire::rest::namespaces" - module: "rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/project.rs" - visibility: "public" ---- -# `project` - -Project API namespace — exposes the API token sub-resource. - -Mirrors `signalwire.rest.namespaces.project.ProjectNamespace`. - -## Signature - -```rust -struct Project { /* fields */ } -``` - -## Classes - - - - Project API token management. - - - -## Methods - -### new - -#### Signature - -```rust -fn new(client: &'a ?) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/rest/namespaces/project.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/project.rs) - -Line 14. - -*** - -### tokens - -#### Signature - -```rust -fn tokens(&self) -> ?<'a> -``` - -#### Returns - -`?<'a>` - -#### Source - -[`src/rest/namespaces/project.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/project.rs) - -Line 18. - -## Source - -[`src/rest/namespaces/project.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/project.rs) - -Line 9. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/project/project-tokens/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/project/project-tokens/index.mdx deleted file mode 100644 index fe106c4cfe..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/project/project-tokens/index.mdx +++ /dev/null @@ -1,151 +0,0 @@ ---- -slug: "/reference/rust/signalwire/rest/namespaces/project/project-tokens" -title: "ProjectTokens" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::rest::namespaces::project::ProjectTokens" - parent: "signalwire::rest::namespaces::project" - module: "rest.namespaces.project" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/project.rs" - visibility: "public" ---- -# `ProjectTokens` - -Project API token management. - -Mirrors `ProjectTokens` from the Python SDK. Rooted at -`/api/project/tokens`. - -## Signature - -```rust -struct ProjectTokens { /* fields */ } -``` - -## Methods - -### base\_path - -#### Signature - -```rust -fn base_path(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/rest/namespaces/project.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/project.rs) - -Line 40. - -*** - -### create - -#### Signature - -```rust -fn create(&self, params: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/project.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/project.rs) - -Line 44. - -*** - -### delete - -#### Signature - -```rust -fn delete(&self, token_id: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/project.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/project.rs) - -Line 57. - -*** - -### new - -#### Signature - -```rust -fn new(client: &'a ?) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/rest/namespaces/project.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/project.rs) - -Line 33. - -*** - -### update - -#### Signature - -```rust -fn update(&self, token_id: &str, params: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/project.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/project.rs) - -Line 48. - -## Source - -[`src/rest/namespaces/project.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/project.rs) - -Line 27. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/queues/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/queues/index.mdx deleted file mode 100644 index 8ab65c7f8c..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/queues/index.mdx +++ /dev/null @@ -1,275 +0,0 @@ ---- -slug: "/reference/rust/signalwire/rest/namespaces/queues" -title: "queues" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::rest::namespaces::queues" - parent: "signalwire::rest::namespaces" - module: "rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/queues.rs" - visibility: "public" ---- -# `queues` - -Queues namespace. - -Mirrors `signalwire.rest.namespaces.queues.QueuesResource`. CRUD over -`/api/relay/rest/queues` plus the queue-member operations. - -## Signature - -```rust -struct Queues { /* fields */ } -``` - -## Methods - -### base\_path - -#### Signature - -```rust -fn base_path(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/rest/namespaces/queues.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/queues.rs) - -Line 25. - -*** - -### create - -#### Signature - -```rust -fn create(&self, params: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/queues.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/queues.rs) - -Line 49. - -*** - -### delete - -#### Signature - -```rust -fn delete(&self, queue_id: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/queues.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/queues.rs) - -Line 67. - -*** - -### get - -#### Signature - -```rust -fn get(&self, queue_id: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/queues.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/queues.rs) - -Line 53. - -*** - -### get\_member - -#### Signature - -```rust -fn get_member(&self, queue_id: &str, member_id: &str) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/queues.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/queues.rs) - -Line 90. - -*** - -### get\_next\_member - -#### Signature - -```rust -fn get_next_member(&self, queue_id: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/queues.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/queues.rs) - -Line 82. - -*** - -### list - -#### Signature - -```rust -fn list(&self, params: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/queues.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/queues.rs) - -Line 44. - -*** - -### list\_members - -#### Signature - -```rust -fn list_members(&self, queue_id: &str, params: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/queues.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/queues.rs) - -Line 72. - -*** - -### new - -#### Signature - -```rust -fn new(client: &'a ?) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/rest/namespaces/queues.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/queues.rs) - -Line 18. - -*** - -### update - -#### Signature - -```rust -fn update(&self, queue_id: &str, params: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/queues.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/queues.rs) - -Line 58. - -## Source - -[`src/rest/namespaces/queues.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/queues.rs) - -Line 12. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/registry/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/registry/index.mdx deleted file mode 100644 index 70ba893e55..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/registry/index.mdx +++ /dev/null @@ -1,169 +0,0 @@ ---- -slug: "/reference/rust/signalwire/rest/namespaces/registry" -title: "registry" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::rest::namespaces::registry" - parent: "signalwire::rest::namespaces" - module: "rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs" - visibility: "public" ---- -# `registry` - -10DLC Campaign Registry namespace — brands, campaigns, orders, numbers. - -Mirrors `signalwire.rest.namespaces.registry.RegistryNamespace`. Every -sub-resource lives under `/api/relay/rest/registry/beta`. - -## Signature - -```rust -struct Registry { /* fields */ } -``` - -## Classes - - - - - - - - - - - -## Methods - -### brands - -#### Signature - -```rust -fn brands(&self) -> ?<'a> -``` - -#### Returns - -`?<'a>` - -#### Source - -[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) - -Line 57. - -*** - -### campaigns - -#### Signature - -```rust -fn campaigns(&self) -> ?<'a> -``` - -#### Returns - -`?<'a>` - -#### Source - -[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) - -Line 61. - -*** - -### client - -#### Signature - -```rust -fn client(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) - -Line 53. - -*** - -### new - -#### Signature - -```rust -fn new(client: &'a ?) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) - -Line 49. - -*** - -### numbers - -#### Signature - -```rust -fn numbers(&self) -> ?<'a> -``` - -#### Returns - -`?<'a>` - -#### Source - -[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) - -Line 69. - -*** - -### orders - -#### Signature - -```rust -fn orders(&self) -> ?<'a> -``` - -#### Returns - -`?<'a>` - -#### Source - -[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) - -Line 65. - -## Source - -[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) - -Line 44. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/registry/registry-brands/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/registry/registry-brands/index.mdx deleted file mode 100644 index 5a99d7e062..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/registry/registry-brands/index.mdx +++ /dev/null @@ -1,198 +0,0 @@ ---- -slug: "/reference/rust/signalwire/rest/namespaces/registry/registry-brands" -title: "RegistryBrands" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::rest::namespaces::registry::RegistryBrands" - parent: "signalwire::rest::namespaces::registry" - module: "rest.namespaces.registry" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs" - visibility: "public" ---- -# `RegistryBrands` - -## Signature - -```rust -struct RegistryBrands { /* fields */ } -``` - -## Methods - -### base\_path - -#### Signature - -```rust -fn base_path(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) - -Line 91. - -*** - -### create - -#### Signature - -```rust -fn create(&self, params: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) - -Line 100. - -*** - -### create\_campaign - -#### Signature - -```rust -fn create_campaign(&self, brand_id: &str, params: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) - -Line 119. - -*** - -### get - -#### Signature - -```rust -fn get(&self, brand_id: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) - -Line 104. - -*** - -### list - -#### Signature - -```rust -fn list(&self, params: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) - -Line 95. - -*** - -### list\_campaigns - -#### Signature - -```rust -fn list_campaigns(&self, brand_id: &str, params: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) - -Line 109. - -*** - -### new - -#### Signature - -```rust -fn new(client: &'a ?, base_path: &str) -> Self -``` - -#### Parameters - - - - - -#### Returns - -`Self` - -#### Source - -[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) - -Line 84. - -## Source - -[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) - -Line 78. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/registry/registry-campaigns/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/registry/registry-campaigns/index.mdx deleted file mode 100644 index 0fdf097787..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/registry/registry-campaigns/index.mdx +++ /dev/null @@ -1,202 +0,0 @@ ---- -slug: "/reference/rust/signalwire/rest/namespaces/registry/registry-campaigns" -title: "RegistryCampaigns" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::rest::namespaces::registry::RegistryCampaigns" - parent: "signalwire::rest::namespaces::registry" - module: "rest.namespaces.registry" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs" - visibility: "public" ---- -# `RegistryCampaigns` - -## Signature - -```rust -struct RegistryCampaigns { /* fields */ } -``` - -## Methods - -### base\_path - -#### Signature - -```rust -fn base_path(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) - -Line 146. - -*** - -### create\_order - -#### Signature - -```rust -fn create_order(&self, campaign_id: &str, params: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) - -Line 184. - -*** - -### get - -#### Signature - -```rust -fn get(&self, campaign_id: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) - -Line 150. - -*** - -### list\_numbers - -#### Signature - -```rust -fn list_numbers(&self, campaign_id: &str, params: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) - -Line 164. - -*** - -### list\_orders - -#### Signature - -```rust -fn list_orders(&self, campaign_id: &str, params: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) - -Line 174. - -*** - -### new - -#### Signature - -```rust -fn new(client: &'a ?, base_path: &str) -> Self -``` - -#### Parameters - - - - - -#### Returns - -`Self` - -#### Source - -[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) - -Line 139. - -*** - -### update - -#### Signature - -```rust -fn update(&self, campaign_id: &str, params: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) - -Line 155. - -## Source - -[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) - -Line 133. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/registry/registry-numbers/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/registry/registry-numbers/index.mdx deleted file mode 100644 index 7b5699c8c4..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/registry/registry-numbers/index.mdx +++ /dev/null @@ -1,98 +0,0 @@ ---- -slug: "/reference/rust/signalwire/rest/namespaces/registry/registry-numbers" -title: "RegistryNumbers" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::rest::namespaces::registry::RegistryNumbers" - parent: "signalwire::rest::namespaces::registry" - module: "rest.namespaces.registry" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs" - visibility: "public" ---- -# `RegistryNumbers` - -## Signature - -```rust -struct RegistryNumbers { /* fields */ } -``` - -## Methods - -### base\_path - -#### Signature - -```rust -fn base_path(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) - -Line 238. - -*** - -### delete - -#### Signature - -```rust -fn delete(&self, number_id: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) - -Line 242. - -*** - -### new - -#### Signature - -```rust -fn new(client: &'a ?, base_path: &str) -> Self -``` - -#### Parameters - - - - - -#### Returns - -`Self` - -#### Source - -[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) - -Line 231. - -## Source - -[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) - -Line 225. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/registry/registry-orders/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/registry/registry-orders/index.mdx deleted file mode 100644 index 112614d8ac..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/registry/registry-orders/index.mdx +++ /dev/null @@ -1,98 +0,0 @@ ---- -slug: "/reference/rust/signalwire/rest/namespaces/registry/registry-orders" -title: "RegistryOrders" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::rest::namespaces::registry::RegistryOrders" - parent: "signalwire::rest::namespaces::registry" - module: "rest.namespaces.registry" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs" - visibility: "public" ---- -# `RegistryOrders` - -## Signature - -```rust -struct RegistryOrders { /* fields */ } -``` - -## Methods - -### base\_path - -#### Signature - -```rust -fn base_path(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) - -Line 211. - -*** - -### get - -#### Signature - -```rust -fn get(&self, order_id: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) - -Line 215. - -*** - -### new - -#### Signature - -```rust -fn new(client: &'a ?, base_path: &str) -> Self -``` - -#### Parameters - - - - - -#### Returns - -`Self` - -#### Source - -[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) - -Line 204. - -## Source - -[`src/rest/namespaces/registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs) - -Line 198. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/sip-profile/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/sip-profile/index.mdx deleted file mode 100644 index 524a657fd4..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/sip-profile/index.mdx +++ /dev/null @@ -1,30 +0,0 @@ ---- -slug: "/reference/rust/signalwire/rest/namespaces/sip-profile" -title: "sip_profile" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "signalwire::rest::namespaces::sip_profile" - parent: "signalwire::rest::namespaces" - module: "rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/sip_profile.rs" - visibility: "public" ---- -# `sip_profile` - -## Classes - - - - SIP Profile (singleton resource) namespace. - - - -## Source - -[`src/rest/namespaces/sip_profile.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/sip_profile.rs) - -Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/sip-profile/sip-profile/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/sip-profile/sip-profile/index.mdx deleted file mode 100644 index 61d12d6e7b..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/sip-profile/sip-profile/index.mdx +++ /dev/null @@ -1,126 +0,0 @@ ---- -slug: "/reference/rust/signalwire/rest/namespaces/sip-profile/sip-profile" -title: "SipProfile" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::rest::namespaces::sip_profile::SipProfile" - parent: "signalwire::rest::namespaces::sip_profile" - module: "rest.namespaces.sip_profile" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/sip_profile.rs" - visibility: "public" ---- -# `SipProfile` - -SIP Profile (singleton resource) namespace. - -Mirrors `signalwire.rest.namespaces.sip_profile.SipProfileResource`. -Rooted at `/api/relay/rest/sip_profile` (singular) — the project has -exactly one SIP profile, so there is no list/create/delete. - -## Signature - -```rust -struct SipProfile { /* fields */ } -``` - -## Methods - -### base\_path - -#### Signature - -```rust -fn base_path(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/rest/namespaces/sip_profile.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/sip_profile.rs) - -Line 24. - -*** - -### get - -GET /api/relay/rest/sip\_profile — fetch the current profile. - -#### Signature - -```rust -fn get(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/sip_profile.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/sip_profile.rs) - -Line 29. - -*** - -### new - -#### Signature - -```rust -fn new(client: &'a ?) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/rest/namespaces/sip_profile.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/sip_profile.rs) - -Line 17. - -*** - -### update - -PUT /api/relay/rest/sip\_profile — update the SIP profile. - -#### Signature - -```rust -fn update(&self, params: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/sip_profile.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/sip_profile.rs) - -Line 34. - -## Source - -[`src/rest/namespaces/sip_profile.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/sip_profile.rs) - -Line 11. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/video/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/video/index.mdx deleted file mode 100644 index b388505bce..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/video/index.mdx +++ /dev/null @@ -1,237 +0,0 @@ ---- -slug: "/reference/rust/signalwire/rest/namespaces/video" -title: "video" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::rest::namespaces::video" - parent: "signalwire::rest::namespaces" - module: "rest.namespaces" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs" - visibility: "public" ---- -# `video` - -Video API namespace — rooms, sessions, recordings, conferences, tokens, -streams. - -Mirrors `signalwire.rest.namespaces.video.VideoNamespace` from the Python -SDK. Each sub-resource exposes the methods present on the upstream -Python class. - -## Signature - -```rust -struct Video { /* fields */ } -``` - -## Classes - - - - - - - - - - - - - - - - - -## Methods - -### client - -#### Signature - -```rust -fn client(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) - -Line 55. - -*** - -### conference\_tokens - -#### Signature - -```rust -fn conference_tokens(&self) -> ?<'a> -``` - -#### Returns - -`?<'a>` - -#### Source - -[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) - -Line 79. - -*** - -### conferences - -#### Signature - -```rust -fn conferences(&self) -> ?<'a> -``` - -#### Returns - -`?<'a>` - -#### Source - -[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) - -Line 75. - -*** - -### new - -#### Signature - -```rust -fn new(client: &'a ?) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) - -Line 51. - -*** - -### room\_recordings - -#### Signature - -```rust -fn room_recordings(&self) -> ?<'a> -``` - -#### Returns - -`?<'a>` - -#### Source - -[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) - -Line 71. - -*** - -### room\_sessions - -#### Signature - -```rust -fn room_sessions(&self) -> ?<'a> -``` - -#### Returns - -`?<'a>` - -#### Source - -[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) - -Line 67. - -*** - -### room\_tokens - -#### Signature - -```rust -fn room_tokens(&self) -> ?<'a> -``` - -#### Returns - -`?<'a>` - -#### Source - -[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) - -Line 63. - -*** - -### rooms - -#### Signature - -```rust -fn rooms(&self) -> ?<'a> -``` - -#### Returns - -`?<'a>` - -#### Source - -[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) - -Line 59. - -*** - -### streams - -#### Signature - -```rust -fn streams(&self) -> ?<'a> -``` - -#### Returns - -`?<'a>` - -#### Source - -[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) - -Line 83. - -## Source - -[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) - -Line 46. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/video/video-conference-tokens/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/video/video-conference-tokens/index.mdx deleted file mode 100644 index 1a96fcf277..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/video/video-conference-tokens/index.mdx +++ /dev/null @@ -1,124 +0,0 @@ ---- -slug: "/reference/rust/signalwire/rest/namespaces/video/video-conference-tokens" -title: "VideoConferenceTokens" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::rest::namespaces::video::VideoConferenceTokens" - parent: "signalwire::rest::namespaces::video" - module: "rest.namespaces.video" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs" - visibility: "public" ---- -# `VideoConferenceTokens` - -## Signature - -```rust -struct VideoConferenceTokens { /* fields */ } -``` - -## Methods - -### base\_path - -#### Signature - -```rust -fn base_path(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) - -Line 389. - -*** - -### get - -#### Signature - -```rust -fn get(&self, token_id: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) - -Line 393. - -*** - -### new - -#### Signature - -```rust -fn new(client: &'a ?, base_path: &str) -> Self -``` - -#### Parameters - - - - - -#### Returns - -`Self` - -#### Source - -[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) - -Line 382. - -*** - -### reset - -POST \{base\}/\{id\}/reset — no-body POST per Python. - -#### Signature - -```rust -fn reset(&self, token_id: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) - -Line 399. - -## Source - -[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) - -Line 376. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/video/video-conferences/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/video/video-conferences/index.mdx deleted file mode 100644 index df648ccccd..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/video/video-conferences/index.mdx +++ /dev/null @@ -1,274 +0,0 @@ ---- -slug: "/reference/rust/signalwire/rest/namespaces/video/video-conferences" -title: "VideoConferences" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::rest::namespaces::video::VideoConferences" - parent: "signalwire::rest::namespaces::video" - module: "rest.namespaces.video" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs" - visibility: "public" ---- -# `VideoConferences` - -## Signature - -```rust -struct VideoConferences { /* fields */ } -``` - -## Methods - -### base\_path - -#### Signature - -```rust -fn base_path(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) - -Line 310. - -*** - -### create - -#### Signature - -```rust -fn create(&self, params: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) - -Line 319. - -*** - -### create\_stream - -#### Signature - -```rust -fn create_stream(&self, conference_id: &str, params: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) - -Line 362. - -*** - -### delete - -#### Signature - -```rust -fn delete(&self, conference_id: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) - -Line 337. - -*** - -### get - -#### Signature - -```rust -fn get(&self, conference_id: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) - -Line 323. - -*** - -### list - -#### Signature - -```rust -fn list(&self, params: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) - -Line 314. - -*** - -### list\_conference\_tokens - -#### Signature - -```rust -fn list_conference_tokens(&self, conference_id: &str, params: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) - -Line 342. - -*** - -### list\_streams - -#### Signature - -```rust -fn list_streams(&self, conference_id: &str, params: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) - -Line 352. - -*** - -### new - -#### Signature - -```rust -fn new(client: &'a ?, base_path: &str) -> Self -``` - -#### Parameters - - - - - -#### Returns - -`Self` - -#### Source - -[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) - -Line 303. - -*** - -### update - -#### Signature - -```rust -fn update(&self, conference_id: &str, params: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) - -Line 328. - -## Source - -[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) - -Line 297. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/video/video-room-recordings/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/video/video-room-recordings/index.mdx deleted file mode 100644 index aca4587327..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/video/video-room-recordings/index.mdx +++ /dev/null @@ -1,172 +0,0 @@ ---- -slug: "/reference/rust/signalwire/rest/namespaces/video/video-room-recordings" -title: "VideoRoomRecordings" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::rest::namespaces::video::VideoRoomRecordings" - parent: "signalwire::rest::namespaces::video" - module: "rest.namespaces.video" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs" - visibility: "public" ---- -# `VideoRoomRecordings` - -## Signature - -```rust -struct VideoRoomRecordings { /* fields */ } -``` - -## Methods - -### base\_path - -#### Signature - -```rust -fn base_path(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) - -Line 263. - -*** - -### delete - -#### Signature - -```rust -fn delete(&self, recording_id: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) - -Line 277. - -*** - -### get - -#### Signature - -```rust -fn get(&self, recording_id: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) - -Line 272. - -*** - -### list - -#### Signature - -```rust -fn list(&self, params: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) - -Line 267. - -*** - -### list\_events - -#### Signature - -```rust -fn list_events(&self, recording_id: &str, params: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) - -Line 282. - -*** - -### new - -#### Signature - -```rust -fn new(client: &'a ?, base_path: &str) -> Self -``` - -#### Parameters - - - - - -#### Returns - -`Self` - -#### Source - -[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) - -Line 256. - -## Source - -[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) - -Line 250. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/video/video-room-sessions/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/video/video-room-sessions/index.mdx deleted file mode 100644 index f237dd9ba6..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/video/video-room-sessions/index.mdx +++ /dev/null @@ -1,200 +0,0 @@ ---- -slug: "/reference/rust/signalwire/rest/namespaces/video/video-room-sessions" -title: "VideoRoomSessions" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::rest::namespaces::video::VideoRoomSessions" - parent: "signalwire::rest::namespaces::video" - module: "rest.namespaces.video" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs" - visibility: "public" ---- -# `VideoRoomSessions` - -## Signature - -```rust -struct VideoRoomSessions { /* fields */ } -``` - -## Methods - -### base\_path - -#### Signature - -```rust -fn base_path(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) - -Line 201. - -*** - -### get - -#### Signature - -```rust -fn get(&self, session_id: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) - -Line 210. - -*** - -### list - -#### Signature - -```rust -fn list(&self, params: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) - -Line 205. - -*** - -### list\_events - -#### Signature - -```rust -fn list_events(&self, session_id: &str, params: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) - -Line 215. - -*** - -### list\_members - -#### Signature - -```rust -fn list_members(&self, session_id: &str, params: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) - -Line 225. - -*** - -### list\_recordings - -#### Signature - -```rust -fn list_recordings(&self, session_id: &str, params: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) - -Line 235. - -*** - -### new - -#### Signature - -```rust -fn new(client: &'a ?, base_path: &str) -> Self -``` - -#### Parameters - - - - - -#### Returns - -`Self` - -#### Source - -[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) - -Line 194. - -## Source - -[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) - -Line 188. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/video/video-room-tokens/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/video/video-room-tokens/index.mdx deleted file mode 100644 index b7935c264b..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/video/video-room-tokens/index.mdx +++ /dev/null @@ -1,98 +0,0 @@ ---- -slug: "/reference/rust/signalwire/rest/namespaces/video/video-room-tokens" -title: "VideoRoomTokens" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::rest::namespaces::video::VideoRoomTokens" - parent: "signalwire::rest::namespaces::video" - module: "rest.namespaces.video" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs" - visibility: "public" ---- -# `VideoRoomTokens` - -## Signature - -```rust -struct VideoRoomTokens { /* fields */ } -``` - -## Methods - -### base\_path - -#### Signature - -```rust -fn base_path(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) - -Line 175. - -*** - -### create - -#### Signature - -```rust -fn create(&self, params: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) - -Line 179. - -*** - -### new - -#### Signature - -```rust -fn new(client: &'a ?, base_path: &str) -> Self -``` - -#### Parameters - - - - - -#### Returns - -`Self` - -#### Source - -[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) - -Line 168. - -## Source - -[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) - -Line 162. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/video/video-rooms/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/video/video-rooms/index.mdx deleted file mode 100644 index 73ef778451..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/video/video-rooms/index.mdx +++ /dev/null @@ -1,250 +0,0 @@ ---- -slug: "/reference/rust/signalwire/rest/namespaces/video/video-rooms" -title: "VideoRooms" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::rest::namespaces::video::VideoRooms" - parent: "signalwire::rest::namespaces::video" - module: "rest.namespaces.video" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs" - visibility: "public" ---- -# `VideoRooms` - -## Signature - -```rust -struct VideoRooms { /* fields */ } -``` - -## Methods - -### base\_path - -#### Signature - -```rust -fn base_path(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) - -Line 105. - -*** - -### create - -#### Signature - -```rust -fn create(&self, params: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) - -Line 114. - -*** - -### create\_stream - -#### Signature - -```rust -fn create_stream(&self, room_id: &str, params: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) - -Line 148. - -*** - -### delete - -#### Signature - -```rust -fn delete(&self, room_id: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) - -Line 133. - -*** - -### get - -#### Signature - -```rust -fn get(&self, room_id: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) - -Line 118. - -*** - -### list - -#### Signature - -```rust -fn list(&self, params: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) - -Line 109. - -*** - -### list\_streams - -#### Signature - -```rust -fn list_streams(&self, room_id: &str, params: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) - -Line 138. - -*** - -### new - -#### Signature - -```rust -fn new(client: &'a ?, base_path: &str) -> Self -``` - -#### Parameters - - - - - -#### Returns - -`Self` - -#### Source - -[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) - -Line 98. - -*** - -### update - -VideoRooms uses PUT for update. - -#### Signature - -```rust -fn update(&self, room_id: &str, params: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) - -Line 124. - -## Source - -[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) - -Line 92. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/video/video-streams/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/namespaces/video/video-streams/index.mdx deleted file mode 100644 index 78d7076b5e..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/rest/namespaces/video/video-streams/index.mdx +++ /dev/null @@ -1,148 +0,0 @@ ---- -slug: "/reference/rust/signalwire/rest/namespaces/video/video-streams" -title: "VideoStreams" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::rest::namespaces::video::VideoStreams" - parent: "signalwire::rest::namespaces::video" - module: "rest.namespaces.video" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs" - visibility: "public" ---- -# `VideoStreams` - -## Signature - -```rust -struct VideoStreams { /* fields */ } -``` - -## Methods - -### base\_path - -#### Signature - -```rust -fn base_path(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) - -Line 422. - -*** - -### delete - -#### Signature - -```rust -fn delete(&self, stream_id: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) - -Line 440. - -*** - -### get - -#### Signature - -```rust -fn get(&self, stream_id: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) - -Line 426. - -*** - -### new - -#### Signature - -```rust -fn new(client: &'a ?, base_path: &str) -> Self -``` - -#### Parameters - - - - - -#### Returns - -`Self` - -#### Source - -[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) - -Line 415. - -*** - -### update - -#### Signature - -```rust -fn update(&self, stream_id: &str, params: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) - -Line 431. - -## Source - -[`src/rest/namespaces/video.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs) - -Line 409. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/pagination/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/pagination/index.mdx deleted file mode 100644 index e6ed82fde6..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/rest/pagination/index.mdx +++ /dev/null @@ -1,37 +0,0 @@ ---- -slug: "/reference/rust/signalwire/rest/pagination" -title: "pagination" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "signalwire::rest::pagination" - parent: "signalwire::rest" - module: "rest" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/pagination.rs" - visibility: "public" ---- -# `pagination` - -Paginated iterator over `links.next`-cursor responses. - -Mirrors `signalwire.rest._pagination.PaginatedIterator` from the Python -SDK. Construction is lazy — no HTTP is dispatched until the iterator is -first stepped. Each fetch follows the response's `links.next` cursor; -when the cursor is empty/missing, the iterator is exhausted. - -## Classes - - - - Streaming iterator that walks a `links.next`-paginated REST endpoint. - - - -## Source - -[`src/rest/pagination.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/pagination.rs) - -Line 7. diff --git a/fern/products/sdk-reference/rust/signalwire/rest/pagination/paginated-iterator/index.mdx b/fern/products/sdk-reference/rust/signalwire/rest/pagination/paginated-iterator/index.mdx deleted file mode 100644 index cff12adbe0..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/rest/pagination/paginated-iterator/index.mdx +++ /dev/null @@ -1,267 +0,0 @@ ---- -slug: "/reference/rust/signalwire/rest/pagination/paginated-iterator" -title: "PaginatedIterator" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::rest::pagination::PaginatedIterator" - parent: "signalwire::rest::pagination" - module: "rest.pagination" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/pagination.rs" - visibility: "public" ---- -# `PaginatedIterator` - -Streaming iterator that walks a `links.next`-paginated REST endpoint. - -Holds a borrowed reference to the \[`HttpClient`] for the duration of -iteration. Use the \[`Iterator`] impl (`for item in it { ... }`) or -step manually via \[`PaginatedIterator::next_item`]. - -## Signature - -```rust -struct PaginatedIterator { /* fields */ } -``` - -## Inheritance - -**Implements:** `Iterator` - -## Methods - -### data\_key - -#### Signature - -```rust -fn data_key(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/rest/pagination.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/pagination.rs) - -Line 79. - -*** - -### http - -#### Signature - -```rust -fn http(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/rest/pagination.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/pagination.rs) - -Line 67. - -*** - -### index - -#### Signature - -```rust -fn index(&self) -> usize -``` - -#### Returns - -`usize` - -#### Source - -[`src/rest/pagination.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/pagination.rs) - -Line 83. - -*** - -### is\_done - -#### Signature - -```rust -fn is_done(&self) -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`src/rest/pagination.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/pagination.rs) - -Line 91. - -*** - -### items - -#### Signature - -```rust -fn items(&self) -> &[?] -``` - -#### Returns - -`&[?]` - -#### Source - -[`src/rest/pagination.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/pagination.rs) - -Line 87. - -*** - -### new - -Construct a new iterator. - -`params` and `data_key` mirror the Python signature: the body field -containing the items array is named `data_key` (typically `"data"`), -and `params` is forwarded on the first GET. - -#### Signature - -```rust -fn new(http: &'a ?, path: &str, params: ?, data_key: &str) -> Self -``` - -#### Parameters - - - - - - - - - -#### Returns - -`Self` - -#### Source - -[`src/rest/pagination.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/pagination.rs) - -Line 48. - -*** - -### next - -#### Signature - -```rust -fn next(&mut self) -> ?<::Item> -``` - -#### Returns - -`?<::Item>` - -#### Source - -[`src/rest/pagination.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/pagination.rs) - -Line 161. - -*** - -### next\_item - -Fetch the next item, dispatching a new page request if needed. -Returns `Ok(None)` when the cursor is exhausted. - -#### Signature - -```rust -fn next_item(&mut self) -> ?, ?> -``` - -#### Returns - -`?, ?>` - -#### Source - -[`src/rest/pagination.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/pagination.rs) - -Line 97. - -*** - -### params - -#### Signature - -```rust -fn params(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/rest/pagination.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/pagination.rs) - -Line 75. - -*** - -### path - -#### Signature - -```rust -fn path(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/rest/pagination.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/pagination.rs) - -Line 71. - -## Type Aliases - -### Item - -#### Source - -[`src/rest/pagination.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/pagination.rs) - -Line 159. - -## Source - -[`src/rest/pagination.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/pagination.rs) - -Line 26. diff --git a/fern/products/sdk-reference/rust/signalwire/security/index.mdx b/fern/products/sdk-reference/rust/signalwire/security/index.mdx deleted file mode 100644 index 2b6385b2e1..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/security/index.mdx +++ /dev/null @@ -1,35 +0,0 @@ ---- -slug: "/reference/rust/signalwire/security" -title: "security" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "signalwire::security" - parent: "signalwire" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/security/mod.rs" - visibility: "public" ---- -# `security` - -## Modules - - - - - - Webhook signature validation for SignalWire-signed HTTP requests. - - - - Tower / axum middleware for SignalWire webhook signature validation. - - - -## Source - -[`src/security/mod.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/mod.rs) - -Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/security/session-manager/index.mdx b/fern/products/sdk-reference/rust/signalwire/security/session-manager/index.mdx deleted file mode 100644 index 68beee42a1..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/security/session-manager/index.mdx +++ /dev/null @@ -1,30 +0,0 @@ ---- -slug: "/reference/rust/signalwire/security/session-manager" -title: "session_manager" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "signalwire::security::session_manager" - parent: "signalwire::security" - module: "security" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/security/session_manager.rs" - visibility: "public" ---- -# `session_manager` - -## Classes - - - - Session manager that generates and validates HMAC-signed tokens. - - - -## Source - -[`src/security/session_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/session_manager.rs) - -Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/security/session-manager/session-manager/index.mdx b/fern/products/sdk-reference/rust/signalwire/security/session-manager/session-manager/index.mdx deleted file mode 100644 index c432e74f33..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/security/session-manager/session-manager/index.mdx +++ /dev/null @@ -1,221 +0,0 @@ ---- -slug: "/reference/rust/signalwire/security/session-manager/session-manager" -title: "SessionManager" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::security::session_manager::SessionManager" - parent: "signalwire::security::session_manager" - module: "security.session_manager" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/security/session_manager.rs" - visibility: "public" ---- -# `SessionManager` - -Session manager that generates and validates HMAC-signed tokens. - -Tokens bind a function name and call ID together with an expiry time, -preventing replay attacks and cross-function/cross-call misuse. - -## Signature - -```rust -struct SessionManager { /* fields */ } -``` - -## Inheritance - -**Implements:** `Clone` - -## Methods - -### clone - -#### Signature - -```rust -fn clone(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/security/session_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/session_manager.rs) - -Line 13. - -*** - -### create\_session - -Create or confirm a session, returning the call ID. - -#### Signature - -```rust -fn create_session(&self, call_id: ?<&str>) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/security/session_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/session_manager.rs) - -Line 41. - -*** - -### create\_token - -Generate an HMAC-SHA256 signed token for a given function and call. - -Token format (before base64url encoding): -`{call_id}.{function_name}.{expiry}.{nonce}.{hmac_hex}` - -#### Signature - -```rust -fn create_token(&self, function_name: &str, call_id: &str) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/security/session_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/session_manager.rs) - -Line 52. - -*** - -### new - -Create a new session manager with a random 32-byte secret. - -#### Signature - -```rust -fn new(token_expiry_secs: u64) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/security/session_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/session_manager.rs) - -Line 21. - -*** - -### token\_expiry\_secs - -Get the configured token expiry in seconds. - -#### Signature - -```rust -fn token_expiry_secs(&self) -> u64 -``` - -#### Returns - -`u64` - -#### Source - -[`src/security/session_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/session_manager.rs) - -Line 36. - -*** - -### validate\_token - -Validate a token against the expected function name and call ID. - -Uses timing-safe comparison for all security-critical fields. - -#### Signature - -```rust -fn validate_token( - &self, - function_name: &str, - call_id: &str, - token: &str -) -> bool -``` - -#### Parameters - - - - - - - -#### Returns - -`bool` - -#### Source - -[`src/security/session_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/session_manager.rs) - -Line 70. - -*** - -### with\_defaults - -Create a new session manager with the default expiry (3600 seconds). - -#### Signature - -```rust -fn with_defaults() -> Self -``` - -#### Returns - -`Self` - -#### Source - -[`src/security/session_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/session_manager.rs) - -Line 31. - -## Source - -[`src/security/session_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/session_manager.rs) - -Line 14. diff --git a/fern/products/sdk-reference/rust/signalwire/security/webhook-layer/index.mdx b/fern/products/sdk-reference/rust/signalwire/security/webhook-layer/index.mdx deleted file mode 100644 index 056c0f3762..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/security/webhook-layer/index.mdx +++ /dev/null @@ -1,56 +0,0 @@ ---- -slug: "/reference/rust/signalwire/security/webhook-layer" -title: "webhook_layer" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "signalwire::security::webhook_layer" - parent: "signalwire::security" - module: "security" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook_layer.rs" - visibility: "public" ---- -# `webhook_layer` - -Tower / axum middleware for SignalWire webhook signature validation. - -This module provides a \[`tower::Layer`] that buffers the request body, -verifies the `X-SignalWire-Signature` (or `X-Twilio-Signature`) -header against a configured signing key, and either: - -- rejects the request with `403 Forbidden` (no body) when the - signature is missing or invalid, or -- rebuilds the request with the buffered body so downstream - handlers can re-read it as a normal `axum::body::Body`. - -The URL passed to the validator honors `X-Forwarded-Proto` / -`X-Forwarded-Host` (for reverse-proxy / tunnel deploys) and falls -back to scheme-derived-from-`x-forwarded-proto-or-https` plus the -`Host` header. - -The Layer is gated behind the `tower-middleware` Cargo feature -(enabled by default). Users who only need the raw validator can -depend on `signalwire` with `default-features = false`. - -Copyright (c) 2025 SignalWire. Licensed under the MIT License. - -## Classes - - - - Tower \[`Layer`] that wraps any `Service>` with SignalWire webhook signature validation. - - - - Tower \[`Service`] produced by \[`WebhookLayer::layer`]. Buffers the request body, validates the signature, and either forwards a reconstructed request to the inner service or short-circuits with a `403 Forbidden`. - - - -## Source - -[`src/security/webhook_layer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook_layer.rs) - -Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/security/webhook-layer/webhook-layer/index.mdx b/fern/products/sdk-reference/rust/signalwire/security/webhook-layer/webhook-layer/index.mdx deleted file mode 100644 index 5a912e16fb..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/security/webhook-layer/webhook-layer/index.mdx +++ /dev/null @@ -1,160 +0,0 @@ ---- -slug: "/reference/rust/signalwire/security/webhook-layer/webhook-layer" -title: "WebhookLayer" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::security::webhook_layer::WebhookLayer" - parent: "signalwire::security::webhook_layer" - module: "security.webhook_layer" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook_layer.rs" - visibility: "public" ---- -# `WebhookLayer` - -Tower \[`Layer`] that wraps any `Service>` with -SignalWire webhook signature validation. - -Construct with \[`WebhookLayer::new`] and pass the customer's -Signing Key. Optionally provide an explicit URL via -\[`WebhookLayer::with_url_override`] when running behind a tunnel -or reverse proxy that doesn't set `X-Forwarded-*` headers. - -## Signature - -```rust -struct WebhookLayer { /* fields */ } -``` - -## Inheritance - -**Implements:** `Clone`, `Layer` - -## Methods - -### clone - -#### Signature - -```rust -fn clone(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/security/webhook_layer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook_layer.rs) - -Line 48. - -*** - -### layer - -#### Signature - -```rust -fn layer(&self, inner: S) -> ::Service -``` - -#### Parameters - - - -#### Returns - -`::Service` - -#### Source - -[`src/security/webhook_layer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook_layer.rs) - -Line 90. - -*** - -### new - -Construct a new layer bound to the given Signing Key. - -#### Signature - -```rust -fn new: ?>(signing_key: impl ?) -> Self -``` - -#### Type Parameters - - - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/security/webhook_layer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook_layer.rs) - -Line 60. - -*** - -### with\_url\_base - -Override the URL **base** the validator signs against. When set, -reverse-proxy header reconstruction is skipped and the full URL -is built as ``. - -`base` is typically `scheme://host[:port]` with no trailing slash -— e.g. `"https://example.ngrok.io"`. Any trailing `/` is -stripped before concatenation. - -#### Signature - -```rust -fn with_url_base: ?>(self, base: impl ?) -> Self -``` - -#### Type Parameters - - - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/security/webhook_layer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook_layer.rs) - -Line 76. - -## Type Aliases - -### Service - -#### Source - -[`src/security/webhook_layer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook_layer.rs) - -Line 88. - -## Source - -[`src/security/webhook_layer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook_layer.rs) - -Line 49. diff --git a/fern/products/sdk-reference/rust/signalwire/security/webhook-layer/webhook-validate/index.mdx b/fern/products/sdk-reference/rust/signalwire/security/webhook-layer/webhook-validate/index.mdx deleted file mode 100644 index 77d6d255c3..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/security/webhook-layer/webhook-validate/index.mdx +++ /dev/null @@ -1,135 +0,0 @@ ---- -slug: "/reference/rust/signalwire/security/webhook-layer/webhook-validate" -title: "WebhookValidate" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::security::webhook_layer::WebhookValidate" - parent: "signalwire::security::webhook_layer" - module: "security.webhook_layer" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook_layer.rs" - visibility: "public" ---- -# `WebhookValidate` - -Tower \[`Service`] produced by \[`WebhookLayer::layer`]. Buffers the -request body, validates the signature, and either forwards a -reconstructed request to the inner service or short-circuits with -a `403 Forbidden`. - -## Signature - -```rust -struct WebhookValidate { /* fields */ } -``` - -## Inheritance - -**Implements:** `Clone`, [Service](/docs/sdk-reference/reference/rust/signalwire/security/webhook-layer/webhook-layer#service) - -## Methods - -### call - -#### Signature - -```rust -fn call(&mut self, req: ?) -> ::Future -``` - -#### Parameters - - - -#### Returns - -`::Future` - -#### Source - -[`src/security/webhook_layer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook_layer.rs) - -Line 124. - -*** - -### clone - -#### Signature - -```rust -fn clone(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/security/webhook_layer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook_layer.rs) - -Line 102. - -*** - -### poll\_ready - -#### Signature - -```rust -fn poll_ready(&mut self, cx: &mut ?<'_>) -> ?::Error>> -``` - -#### Parameters - - - -#### Returns - -`?::Error>>` - -#### Source - -[`src/security/webhook_layer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook_layer.rs) - -Line 120. - -## Type Aliases - -### Error - -#### Source - -[`src/security/webhook_layer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook_layer.rs) - -Line 117. - -*** - -### Future - -#### Source - -[`src/security/webhook_layer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook_layer.rs) - -Line 118. - -*** - -### Response - -#### Source - -[`src/security/webhook_layer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook_layer.rs) - -Line 116. - -## Source - -[`src/security/webhook_layer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook_layer.rs) - -Line 103. diff --git a/fern/products/sdk-reference/rust/signalwire/security/webhook/index.mdx b/fern/products/sdk-reference/rust/signalwire/security/webhook/index.mdx deleted file mode 100644 index bbadb91b19..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/security/webhook/index.mdx +++ /dev/null @@ -1,356 +0,0 @@ ---- -slug: "/reference/rust/signalwire/security/webhook" -title: "webhook" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "signalwire::security::webhook" - parent: "signalwire::security" - module: "security" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook.rs" - visibility: "public" ---- -# `webhook` - -Webhook signature validation for SignalWire-signed HTTP requests. - -Implements both schemes from `porting-sdk/webhooks.md`: - -- **Scheme A** — RELAY/SWML/JSON: `lowercase_hex(HMAC-SHA1(key, url + raw_body))` -- **Scheme B** — Compat/cXML form: `base64(HMAC-SHA1(key, url + sortedFormParams))` - with optional `bodySHA256` query-param fallback for JSON-on-compat-surface. - -Public API mirrors Python's `signalwire.core.security.webhook_validator`: - -- \[`validate_webhook_signature`] — combined validator (tries A, then B). -- \[`validate_request`] — legacy `@signalwire/compatibility-api` drop-in - that accepts either a raw body string or pre-parsed form params. - -All comparisons go through \[`subtle::ConstantTimeEq`] so the secret -is not leaked through repeated requests. Inputs are taken as -`&str` / borrowed strings — no allocation hidden behind the API. - -``` -use signalwire::security::webhook::validate_webhook_signature; - -let key = "PSKtest1234567890abcdef"; -let url = "https://example.ngrok.io/webhook"; -let raw_body = r#"{"event":"call.state","params":{"call_id":"abc-123","state":"answered"}}"#; -let sig = "c3c08c1fefaf9ee198a100d5906765a6f394bf0f"; -assert!(validate_webhook_signature(key, sig, url, raw_body).unwrap()); -``` - -Copyright (c) 2025 SignalWire. Licensed under the MIT License. - -## Examples - -```rust -use signalwire::security::webhook::validate_webhook_signature; - -let key = "PSKtest1234567890abcdef"; -let url = "https://example.ngrok.io/webhook"; -let raw_body = r#"{"event":"call.state","params":{"call_id":"abc-123","state":"answered"}}"#; -let sig = "c3c08c1fefaf9ee198a100d5906765a6f394bf0f"; -assert!(validate_webhook_signature(key, sig, url, raw_body).unwrap()); -``` - -## Functions - -### validate\_request - -Legacy `@signalwire/compatibility-api` drop-in entry point. - -If `params_or_raw_body` is \[`ParamsOrBody::Body`], delegates to -\[`validate_webhook_signature`] (Scheme A then Scheme B with parsed form). - -If it's \[`ParamsOrBody::Params`], runs Scheme B directly with those -pre-parsed form params (plus URL port normalization). - -`bodySHA256` verification is skipped in the `Params` variant — there -is no raw body to hash. - -#### Signature - -```rust -fn validate_request( - signing_key: &str, - signature: &str, - url: &str, - params_or_raw_body: &? -) -> ? -``` - -#### Parameters - - - - - - - - - -#### Returns - -`?` - -#### Source - -[`src/security/webhook.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook.rs) - -Line 389. - -*** - -### validate\_webhook\_signature - -Validate a SignalWire webhook signature against both schemes. - -#### Signature - -```rust -fn validate_webhook_signature( - signing_key: &str, - signature: &str, - url: &str, - raw_body: &str -) -> ? -``` - -#### Parameters - - - - - - - - - -#### Returns - -`?` — All comparisons are constant-time via \[`subtle::ConstantTimeEq`]. - -#### Source - -[`src/security/webhook.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook.rs) - -Line 325. - -## Enums - -### ParamsOrBody - -Argument shape for \[`validate_request`]. Either a raw body string -(which will run Scheme A first, then Scheme B with the form-parsed -body) or a pre-parsed form-param list (which goes straight to -Scheme B). - -Repeated keys in the `Params` variant are supported by emitting a -`Vec` per key in submission order. - -#### Signature - -```rust -enum ParamsOrBody -``` - -#### Inheritance - -**Implements:** `Debug`, `Clone` - -#### Variants - - - Raw HTTP request body (UTF-8). The validator will sort form params if it parses cleanly; for JSON bodies this branch degrades to the empty-params Scheme B fallback. - - - - Pre-parsed form params, list-of-(key, list-of-values) so repeated keys keep their submission order. - - -#### Methods - -##### clone - -###### Signature - -```rust -fn clone(&self) -> ? -``` - -###### Returns - -`?` - -###### Source - -[`src/security/webhook.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook.rs) - -Line 74. - -*** - -##### fmt - -###### Signature - -```rust -fn fmt(&self, f: &mut ?<'_>) -> ? -``` - -###### Parameters - - - -###### Returns - -`?` - -###### Source - -[`src/security/webhook.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook.rs) - -Line 74. - -#### Source - -[`src/security/webhook.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook.rs) - -Line 75. - -*** - -### WebhookError - -Errors returned by the webhook validator. - -`validate_webhook_signature` and `validate_request` return -`Result` so callers can distinguish a legitimate -"signature did not match" (`Ok(false)`) from a programming-error -"you forgot the signing key" (`Err(WebhookError::MissingSigningKey)`). -Per the spec, missing/empty _signature header_ and malformed -signatures return `Ok(false)` — those are not errors. - -#### Signature - -```rust -enum WebhookError -``` - -#### Inheritance - -**Implements:** `Debug`, `Clone`, `PartialEq`, `Eq`, `Display`, [Error](/docs/sdk-reference/reference/rust/signalwire/security/webhook-layer/webhook-validate#error) - -#### Variants - - - Caller passed an empty `signing_key`. This is a programming error (the key is mandatory configuration), not a validation failure — Python raises `ValueError` here, Node throws. - - -#### Methods - -##### clone - -###### Signature - -```rust -fn clone(&self) -> ? -``` - -###### Returns - -`?` - -###### Source - -[`src/security/webhook.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook.rs) - -Line 49. - -*** - -##### eq - -###### Signature - -```rust -fn eq(&self, other: &?) -> bool -``` - -###### Parameters - - - -###### Returns - -`bool` - -###### Source - -[`src/security/webhook.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook.rs) - -Line 49. - -*** - -##### fmt - -###### Signature - -```rust -fn fmt(&self, f: &mut ?<'_>) -> ? -``` - -###### Parameters - - - -###### Returns - -`?` - -###### Source - -[`src/security/webhook.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook.rs) - -Line 49. - -*** - -##### fmt - -###### Signature - -```rust -fn fmt(&self, f: &mut ?<'_>) -> ? -``` - -###### Parameters - - - -###### Returns - -`?` - -###### Source - -[`src/security/webhook.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook.rs) - -Line 58. - -#### Source - -[`src/security/webhook.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook.rs) - -Line 50. - -## Source - -[`src/security/webhook.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/webhook.rs) - -Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/server/agent-server/agent-server/index.mdx b/fern/products/sdk-reference/rust/signalwire/server/agent-server/agent-server/index.mdx deleted file mode 100644 index 5f447e9071..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/server/agent-server/agent-server/index.mdx +++ /dev/null @@ -1,507 +0,0 @@ ---- -slug: "/reference/rust/signalwire/server/agent-server/agent-server" -title: "AgentServer" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::server::agent_server::AgentServer" - parent: "signalwire::server::agent_server" - module: "server.agent_server" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs" - visibility: "public" ---- -# `AgentServer` - -Multi-agent HTTP server that dispatches requests to registered agents -by longest-prefix route matching. - -## Signature - -```rust -struct AgentServer { /* fields */ } -``` - -## Methods - -### get\_agent - -Get an agent by route. - -#### Signature - -```rust -fn get_agent(&self, route: &str) -> ?<&?> -``` - -#### Parameters - - - -#### Returns - -`?<&?>` - -#### Source - -[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) - -Line 133. - -*** - -### get\_agent\_mut - -Get a mutable reference to an agent by route. - -#### Signature - -```rust -fn get_agent_mut(&mut self, route: &str) -> ?<&mut ?> -``` - -#### Parameters - - - -#### Returns - -`?<&mut ?>` - -#### Source - -[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) - -Line 139. - -*** - -### get\_agents - -Get all registered routes (sorted). - -#### Signature - -```rust -fn get_agents(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) - -Line 126. - -*** - -### handle\_request - -Handle an HTTP request and return `(status, headers, body)`. - -#### Signature - -```rust -fn handle_request( - &self, - method: &str, - path: &str, - headers: &?, - body: &str -) -> (u16, ?, ?) -``` - -#### Parameters - - - - - - - - - -#### Returns - -`(u16, ?, ?)` - -#### Source - -[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) - -Line 309. - -*** - -### host - -#### Signature - -```rust -fn host(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) - -Line 414. - -*** - -### is\_sip\_routing\_enabled - -Check if SIP routing is enabled. - -#### Signature - -```rust -fn is_sip_routing_enabled(&self) -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) - -Line 163. - -*** - -### new - -#### Signature - -```rust -fn new(host: ?<&str>, port: ?) -> Self -``` - -#### Parameters - - - - - -#### Returns - -`Self` - -#### Source - -[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) - -Line 65. - -*** - -### port - -#### Signature - -```rust -fn port(&self) -> u16 -``` - -#### Returns - -`u16` - -#### Source - -[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) - -Line 418. - -*** - -### register - -Register an agent at its default route (from the agent's service), -or at an explicit route override. - -**Errors:** - -Returns \[`ServerError::RouteAlreadyRegistered`] if the route is taken. - -#### Signature - -```rust -fn register(&mut self, agent: ?, route: ?<&str>) -> ?<(), ?> -``` - -#### Parameters - - - - - -#### Returns - -`?<(), ?>` - -#### Source - -[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) - -Line 95. - -*** - -### register\_global\_routing\_callback - -Register a routing callback that runs on every request whose -path matches the configured `path`. Returning `Some(route)` from -the callback redirects handling to that registered agent; -returning `None` falls through to normal longest-prefix -dispatch. - -Mirrors Python's -`AgentServer.register_global_routing_callback(callback_fn, path)`. - -In Python the callback signature is -`(request, body) -> Optional[route]`; the Rust signature passes -`(path, headers, parsed_body)` since Rust does not carry a -FastAPI request object. - -#### Signature - -```rust -fn register_global_routing_callback( - &mut self, - callback: ?, - path: &str -) -> &mut Self -``` - -#### Parameters - - - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) - -Line 238. - -*** - -### register\_sip\_username - -Map a SIP username to a route. - -#### Signature - -```rust -fn register_sip_username(&mut self, username: &str, route: &str) -> &mut Self -``` - -#### Parameters - - - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) - -Line 155. - -*** - -### run - -Run the HTTP server on the configured host:port, blocking the -current thread until the listener exits. - -Mirrors Python's `AgentServer.run(host, port)`. The optional -`host` and `port` arguments override the values supplied at -construction time (matching the Python contract). - -#### Signature - -```rust -fn run(&self, host: ?<&str>, port: ?) -``` - -#### Parameters - - - - - -#### Source - -[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) - -Line 258. - -*** - -### serve\_static - -Serve static files from a directory under a URL prefix. - -**Errors:** - -Returns \[`ServerError::StaticDir`] if the directory does not exist or is -not a directory. - -#### Signature - -```rust -fn serve_static(&mut self, directory: &str, url_prefix: &str) -> ?<(), ?> -``` - -#### Parameters - - - - - -#### Returns - -`?<(), ?>` - -#### Source - -[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) - -Line 181. - -*** - -### serve\_static\_files - -Serve static files from a directory under a URL prefix. - -This is the named-mirror of Python's -`AgentServer.serve_static_files(directory, route="/")`. Behaves -identically to \[`AgentServer::serve_static`] (which kept the -shorter Rust-idiomatic name) — both are kept so existing code -keeps working and the Python-name parity is preserved for the -surface diff. - -**Errors:** - -Returns \[`ServerError::StaticDir`] if the directory does not exist. - -#### Signature - -```rust -fn serve_static_files(&mut self, directory: &str, route: &str) -> ?<(), ?> -``` - -#### Parameters - - - - - -#### Returns - -`?<(), ?>` - -#### Source - -[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) - -Line 213. - -*** - -### setup\_sip\_routing - -Enable SIP-based routing. - -#### Signature - -```rust -fn setup_sip_routing(&mut self) -> &mut Self -``` - -#### Returns - -`&mut Self` - -#### Source - -[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) - -Line 149. - -*** - -### sip\_username\_mapping - -Get the SIP username mapping. - -#### Signature - -```rust -fn sip_username_mapping(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) - -Line 168. - -*** - -### unregister - -Unregister an agent from a route. - -#### Signature - -```rust -fn unregister(&mut self, route: &str) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) - -Line 119. - -## Source - -[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) - -Line 50. diff --git a/fern/products/sdk-reference/rust/signalwire/server/agent-server/index.mdx b/fern/products/sdk-reference/rust/signalwire/server/agent-server/index.mdx deleted file mode 100644 index d88b806bbb..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/server/agent-server/index.mdx +++ /dev/null @@ -1,58 +0,0 @@ ---- -slug: "/reference/rust/signalwire/server/agent-server" -title: "agent_server" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "signalwire::server::agent_server" - parent: "signalwire::server" - module: "server" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs" - visibility: "public" ---- -# `agent_server` - -## Classes - - - - Multi-agent HTTP server that dispatches requests to registered agents by longest-prefix route matching. - - - -## Type Aliases - -### GlobalRoutingCallback - -Callback signature for global request-time routing decisions. - -The callback receives the parsed request body (or `None` if absent -/ unparseable) and returns: - -- `Some(route)` — redirect handling to that route's agent. -- `None` — fall through to normal route dispatch. - -Mirrors Python's `register_routing_callback` / `register_global_routing_callback` -signature (`Callable[[Request, Dict[str, Any]], Optional[str]]`), -modulo Rust's lack of a FastAPI Request object. - -#### Signature - -```rust -type GlobalRoutingCallback = ? -``` - -#### Source - -[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) - -Line 23. - -## Source - -[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) - -Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/server/error/index.mdx b/fern/products/sdk-reference/rust/signalwire/server/error/index.mdx deleted file mode 100644 index eba538ae79..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/server/error/index.mdx +++ /dev/null @@ -1,168 +0,0 @@ ---- -slug: "/reference/rust/signalwire/server/error" -title: "error" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "signalwire::server::error" - parent: "signalwire::server" - module: "server" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/server/error.rs" - visibility: "public" ---- -# `error` - -Typed error for the `AgentServer` surface and -the shared HTTP(S) bind path. - -Like `RelayError`, this replaces the old -`Result<_, String>` returns on the server surface (`register`, -`serve_static`, `serve_static_files`, and the internal `bind_server`) with a -closed, inspectable failure set — matching the REST layer's -`SignalWireRestError` exemplar. - -The data each failure carries lives in the variant (callers `match` rather -than call getters), so the only public surface added is the type plus its -`Display` / \[`std::error::Error`] impls. `#[non_exhaustive]` leaves room to -add new failure modes without a breaking change. - -## Enums - -### ServerError - -A server-configuration or HTTP-bind operation failed. - -#### Signature - -```rust -enum ServerError -``` - -#### Inheritance - -**Implements:** `Debug`, `Clone`, `PartialEq`, `Eq`, `Display`, [Error](/docs/sdk-reference/reference/rust/signalwire/security/webhook-layer/webhook-validate#error) - -#### Variants - - - The HTTP(S) listener failed to bind the address. Carries the address and the underlying cause. - - - - An agent was registered at a route already in use. Carries the route. - - - - A static-file directory could not be served because the path does not exist or is not a directory. Carries the offending path. - - - - HTTPS was requested via `SWML_SSL_*` but the configuration was incomplete or the cert/key files were unreadable. - - -#### Methods - -##### clone - -###### Signature - -```rust -fn clone(&self) -> ? -``` - -###### Returns - -`?` - -###### Source - -[`src/server/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/error.rs) - -Line 18. - -*** - -##### eq - -###### Signature - -```rust -fn eq(&self, other: &?) -> bool -``` - -###### Parameters - - - -###### Returns - -`bool` - -###### Source - -[`src/server/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/error.rs) - -Line 18. - -*** - -##### fmt - -###### Signature - -```rust -fn fmt(&self, f: &mut ?<'_>) -> ? -``` - -###### Parameters - - - -###### Returns - -`?` - -###### Source - -[`src/server/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/error.rs) - -Line 18. - -*** - -##### fmt - -###### Signature - -```rust -fn fmt(&self, f: &mut ?<'_>) -> ? -``` - -###### Parameters - - - -###### Returns - -`?` - -###### Source - -[`src/server/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/error.rs) - -Line 54. - -#### Source - -[`src/server/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/error.rs) - -Line 20. - -## Source - -[`src/server/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/error.rs) - -Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/server/index.mdx b/fern/products/sdk-reference/rust/signalwire/server/index.mdx deleted file mode 100644 index d2b89625ef..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/server/index.mdx +++ /dev/null @@ -1,31 +0,0 @@ ---- -slug: "/reference/rust/signalwire/server" -title: "server" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "signalwire::server" - parent: "signalwire" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/server/mod.rs" - visibility: "public" ---- -# `server` - -## Modules - - - - - - Typed error for the `AgentServer` surface and the shared HTTP(S) bind path. - - - -## Source - -[`src/server/mod.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/mod.rs) - -Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/serverless/adapter/index.mdx b/fern/products/sdk-reference/rust/signalwire/serverless/adapter/index.mdx deleted file mode 100644 index a6a9c990ca..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/serverless/adapter/index.mdx +++ /dev/null @@ -1,346 +0,0 @@ ---- -slug: "/reference/rust/signalwire/serverless/adapter" -title: "adapter" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::serverless::adapter" - parent: "signalwire::serverless" - module: "serverless" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/serverless/adapter.rs" - visibility: "public" ---- -# `adapter` - -Auto-detect and handle serverless environments (Lambda, Azure, GCF, CGI) -or fall back to the built-in server. - -## Signature - -```rust -struct Adapter; -``` - -## Methods - -### detect - -Detect the current runtime environment. - -#### Signature - -```rust -fn detect() -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/serverless/adapter.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/serverless/adapter.rs) - -Line 52. - -*** - -### handle\_azure - -Handle an Azure Functions invocation. - -#### Signature - -```rust -fn handle_azure(agent: &dyn ?, request: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/serverless/adapter.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/serverless/adapter.rs) - -Line 137. - -*** - -### handle\_lambda - -Handle an AWS Lambda (API Gateway) invocation. - -Extracts method, path, headers, and body from the API Gateway event -format, calls agent.handle\_request(), and returns an API Gateway -compatible response. - -#### Signature - -```rust -fn handle_lambda(agent: &dyn ?, event: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/serverless/adapter.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/serverless/adapter.rs) - -Line 74. - -*** - -### serve\_detect - -Auto-detect the runtime environment and return the environment type. -The caller can then dispatch accordingly. - -#### Signature - -```rust -fn serve_detect() -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/serverless/adapter.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/serverless/adapter.rs) - -Line 202. - -*** - -### status\_text - -Return the standard HTTP status text for a given status code. - -#### Signature - -```rust -fn status_text(code: u16) -> &'static str -``` - -#### Parameters - - - -#### Returns - -`&'static str` - -#### Source - -[`src/serverless/adapter.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/serverless/adapter.rs) - -Line 207. - -## Interfaces - -### RequestHandler - -Trait that the agent/service must implement so the adapter can -forward requests to it. - -#### Signature - -```rust -trait RequestHandler -``` - -#### Methods - -##### handle\_request - -Handle an HTTP request, returning (status\_code, headers, body). - -###### Signature - -```rust -fn handle_request( - &self, - method: &str, - path: &str, - headers: &?, - body: &str -) -> (u16, ?, ?) -``` - -###### Parameters - - - - - - - - - -###### Returns - -`(u16, ?, ?)` - -###### Source - -[`src/serverless/adapter.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/serverless/adapter.rs) - -Line 37. - -#### Source - -[`src/serverless/adapter.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/serverless/adapter.rs) - -Line 35. - -## Enums - -### RuntimeEnvironment - -Detected runtime environment. - -`#[non_exhaustive]` because the set of recognised serverless hosts mirrors -what \[`Adapter::detect`] probes for at runtime and is expected to grow -(new FaaS platforms) without that being a breaking change — downstream -`match` arms must include a wildcard. - -#### Signature - -```rust -enum RuntimeEnvironment -``` - -#### Inheritance - -**Implements:** `Debug`, `Clone`, `PartialEq`, `Eq` - -#### Variants - - - - - - - - - - - -#### Methods - -##### as\_str - -###### Signature - -```rust -fn as_str(&self) -> &'static str -``` - -###### Returns - -`&'static str` - -###### Source - -[`src/serverless/adapter.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/serverless/adapter.rs) - -Line 22. - -*** - -##### clone - -###### Signature - -```rust -fn clone(&self) -> ? -``` - -###### Returns - -`?` - -###### Source - -[`src/serverless/adapter.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/serverless/adapter.rs) - -Line 10. - -*** - -##### eq - -###### Signature - -```rust -fn eq(&self, other: &?) -> bool -``` - -###### Parameters - - - -###### Returns - -`bool` - -###### Source - -[`src/serverless/adapter.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/serverless/adapter.rs) - -Line 10. - -*** - -##### fmt - -###### Signature - -```rust -fn fmt(&self, f: &mut ?<'_>) -> ? -``` - -###### Parameters - - - -###### Returns - -`?` - -###### Source - -[`src/serverless/adapter.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/serverless/adapter.rs) - -Line 10. - -#### Source - -[`src/serverless/adapter.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/serverless/adapter.rs) - -Line 13. - -## Source - -[`src/serverless/adapter.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/serverless/adapter.rs) - -Line 48. diff --git a/fern/products/sdk-reference/rust/signalwire/serverless/index.mdx b/fern/products/sdk-reference/rust/signalwire/serverless/index.mdx deleted file mode 100644 index 5bb852f423..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/serverless/index.mdx +++ /dev/null @@ -1,29 +0,0 @@ ---- -slug: "/reference/rust/signalwire/serverless" -title: "serverless" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "signalwire::serverless" - parent: "signalwire" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/serverless/mod.rs" - visibility: "public" ---- -# `serverless` - -## Classes - - - - Auto-detect and handle serverless environments (Lambda, Azure, GCF, CGI) or fall back to the built-in server. - - - -## Source - -[`src/serverless/mod.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/serverless/mod.rs) - -Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/builtin/api-ninjas-trivia/api-ninjas-trivia/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/builtin/api-ninjas-trivia/api-ninjas-trivia/index.mdx deleted file mode 100644 index d8ad2fc7a2..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/skills/builtin/api-ninjas-trivia/api-ninjas-trivia/index.mdx +++ /dev/null @@ -1,178 +0,0 @@ ---- -slug: "/reference/rust/signalwire/skills/builtin/api-ninjas-trivia/api-ninjas-trivia" -title: "ApiNinjasTrivia" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::skills::builtin::api_ninjas_trivia::ApiNinjasTrivia" - parent: "signalwire::skills::builtin::api_ninjas_trivia" - module: "skills.builtin.api_ninjas_trivia" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/api_ninjas_trivia.rs" - visibility: "public" ---- -# `ApiNinjasTrivia` - -Get trivia questions from API Ninjas (DataMap-based). - -## Signature - -```rust -struct ApiNinjasTrivia { /* fields */ } -``` - -## Inheritance - -**Implements:** `SkillBase` - -## Methods - -### description - -#### Signature - -```rust -fn description(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/skills/builtin/api_ninjas_trivia.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/api_ninjas_trivia.rs) - -Line 41. - -*** - -### name - -#### Signature - -```rust -fn name(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/skills/builtin/api_ninjas_trivia.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/api_ninjas_trivia.rs) - -Line 37. - -*** - -### new - -#### Signature - -```rust -fn new(params: ?) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/skills/builtin/api_ninjas_trivia.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/api_ninjas_trivia.rs) - -Line 29. - -*** - -### params - -#### Signature - -```rust -fn params(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/skills/builtin/api_ninjas_trivia.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/api_ninjas_trivia.rs) - -Line 49. - -*** - -### register\_tools - -#### Signature - -```rust -fn register_tools(&self, agent: &mut ?) -``` - -#### Parameters - - - -#### Source - -[`src/skills/builtin/api_ninjas_trivia.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/api_ninjas_trivia.rs) - -Line 57. - -*** - -### setup - -#### Signature - -```rust -fn setup(&mut self) -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/api_ninjas_trivia.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/api_ninjas_trivia.rs) - -Line 53. - -*** - -### supports\_multiple\_instances - -#### Signature - -```rust -fn supports_multiple_instances(&self) -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/api_ninjas_trivia.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/api_ninjas_trivia.rs) - -Line 45. - -## Source - -[`src/skills/builtin/api_ninjas_trivia.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/api_ninjas_trivia.rs) - -Line 24. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/builtin/api-ninjas-trivia/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/builtin/api-ninjas-trivia/index.mdx deleted file mode 100644 index 8d84b281ae..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/skills/builtin/api-ninjas-trivia/index.mdx +++ /dev/null @@ -1,30 +0,0 @@ ---- -slug: "/reference/rust/signalwire/skills/builtin/api-ninjas-trivia" -title: "api_ninjas_trivia" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "signalwire::skills::builtin::api_ninjas_trivia" - parent: "signalwire::skills::builtin" - module: "skills.builtin" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/api_ninjas_trivia.rs" - visibility: "public" ---- -# `api_ninjas_trivia` - -## Classes - - - - Get trivia questions from API Ninjas (DataMap-based). - - - -## Source - -[`src/skills/builtin/api_ninjas_trivia.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/api_ninjas_trivia.rs) - -Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/builtin/claude-skills/claude-skills/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/builtin/claude-skills/claude-skills/index.mdx deleted file mode 100644 index 49460ea232..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/skills/builtin/claude-skills/claude-skills/index.mdx +++ /dev/null @@ -1,218 +0,0 @@ ---- -slug: "/reference/rust/signalwire/skills/builtin/claude-skills/claude-skills" -title: "ClaudeSkills" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::skills::builtin::claude_skills::ClaudeSkills" - parent: "signalwire::skills::builtin::claude_skills" - module: "skills.builtin.claude_skills" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/claude_skills.rs" - visibility: "public" ---- -# `ClaudeSkills` - -Load Claude SKILL.md files as agent tools (handler-based). - -## Signature - -```rust -struct ClaudeSkills { /* fields */ } -``` - -## Inheritance - -**Implements:** `SkillBase` - -## Methods - -### description - -#### Signature - -```rust -fn description(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/skills/builtin/claude_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/claude_skills.rs) - -Line 25. - -*** - -### get\_hints - -#### Signature - -```rust -fn get_hints(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/skills/builtin/claude_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/claude_skills.rs) - -Line 105. - -*** - -### get\_prompt\_sections - -#### Signature - -```rust -fn get_prompt_sections(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/skills/builtin/claude_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/claude_skills.rs) - -Line 109. - -*** - -### name - -#### Signature - -```rust -fn name(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/skills/builtin/claude_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/claude_skills.rs) - -Line 21. - -*** - -### new - -#### Signature - -```rust -fn new(params: ?) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/skills/builtin/claude_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/claude_skills.rs) - -Line 13. - -*** - -### params - -#### Signature - -```rust -fn params(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/skills/builtin/claude_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/claude_skills.rs) - -Line 33. - -*** - -### register\_tools - -#### Signature - -```rust -fn register_tools(&self, agent: &mut ?) -``` - -#### Parameters - - - -#### Source - -[`src/skills/builtin/claude_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/claude_skills.rs) - -Line 41. - -*** - -### setup - -#### Signature - -```rust -fn setup(&mut self) -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/claude_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/claude_skills.rs) - -Line 37. - -*** - -### supports\_multiple\_instances - -#### Signature - -```rust -fn supports_multiple_instances(&self) -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/claude_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/claude_skills.rs) - -Line 29. - -## Source - -[`src/skills/builtin/claude_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/claude_skills.rs) - -Line 8. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/builtin/claude-skills/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/builtin/claude-skills/index.mdx deleted file mode 100644 index b0a75eefa5..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/skills/builtin/claude-skills/index.mdx +++ /dev/null @@ -1,30 +0,0 @@ ---- -slug: "/reference/rust/signalwire/skills/builtin/claude-skills" -title: "claude_skills" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "signalwire::skills::builtin::claude_skills" - parent: "signalwire::skills::builtin" - module: "skills.builtin" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/claude_skills.rs" - visibility: "public" ---- -# `claude_skills` - -## Classes - - - - Load Claude SKILL.md files as agent tools (handler-based). - - - -## Source - -[`src/skills/builtin/claude_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/claude_skills.rs) - -Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/builtin/custom-skills/custom-skills/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/builtin/custom-skills/custom-skills/index.mdx deleted file mode 100644 index 81343cc6aa..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/skills/builtin/custom-skills/custom-skills/index.mdx +++ /dev/null @@ -1,178 +0,0 @@ ---- -slug: "/reference/rust/signalwire/skills/builtin/custom-skills/custom-skills" -title: "CustomSkills" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::skills::builtin::custom_skills::CustomSkills" - parent: "signalwire::skills::builtin::custom_skills" - module: "skills.builtin.custom_skills" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/custom_skills.rs" - visibility: "public" ---- -# `CustomSkills` - -Register user-defined custom tools. - -## Signature - -```rust -struct CustomSkills { /* fields */ } -``` - -## Inheritance - -**Implements:** `SkillBase` - -## Methods - -### description - -#### Signature - -```rust -fn description(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/skills/builtin/custom_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/custom_skills.rs) - -Line 24. - -*** - -### name - -#### Signature - -```rust -fn name(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/skills/builtin/custom_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/custom_skills.rs) - -Line 20. - -*** - -### new - -#### Signature - -```rust -fn new(params: ?) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/skills/builtin/custom_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/custom_skills.rs) - -Line 12. - -*** - -### params - -#### Signature - -```rust -fn params(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/skills/builtin/custom_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/custom_skills.rs) - -Line 32. - -*** - -### register\_tools - -#### Signature - -```rust -fn register_tools(&self, agent: &mut ?) -``` - -#### Parameters - - - -#### Source - -[`src/skills/builtin/custom_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/custom_skills.rs) - -Line 40. - -*** - -### setup - -#### Signature - -```rust -fn setup(&mut self) -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/custom_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/custom_skills.rs) - -Line 36. - -*** - -### supports\_multiple\_instances - -#### Signature - -```rust -fn supports_multiple_instances(&self) -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/custom_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/custom_skills.rs) - -Line 28. - -## Source - -[`src/skills/builtin/custom_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/custom_skills.rs) - -Line 7. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/builtin/custom-skills/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/builtin/custom-skills/index.mdx deleted file mode 100644 index 722075780c..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/skills/builtin/custom-skills/index.mdx +++ /dev/null @@ -1,30 +0,0 @@ ---- -slug: "/reference/rust/signalwire/skills/builtin/custom-skills" -title: "custom_skills" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "signalwire::skills::builtin::custom_skills" - parent: "signalwire::skills::builtin" - module: "skills.builtin" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/custom_skills.rs" - visibility: "public" ---- -# `custom_skills` - -## Classes - - - - Register user-defined custom tools. - - - -## Source - -[`src/skills/builtin/custom_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/custom_skills.rs) - -Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/builtin/datasphere-serverless/datasphere-serverless/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/builtin/datasphere-serverless/datasphere-serverless/index.mdx deleted file mode 100644 index faab98c8c7..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/skills/builtin/datasphere-serverless/datasphere-serverless/index.mdx +++ /dev/null @@ -1,218 +0,0 @@ ---- -slug: "/reference/rust/signalwire/skills/builtin/datasphere-serverless/datasphere-serverless" -title: "DatasphereServerless" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::skills::builtin::datasphere_serverless::DatasphereServerless" - parent: "signalwire::skills::builtin::datasphere_serverless" - module: "skills.builtin.datasphere_serverless" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere_serverless.rs" - visibility: "public" ---- -# `DatasphereServerless` - -Search knowledge using SignalWire DataSphere with serverless DataMap execution. - -## Signature - -```rust -struct DatasphereServerless { /* fields */ } -``` - -## Inheritance - -**Implements:** `SkillBase` - -## Methods - -### description - -#### Signature - -```rust -fn description(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/skills/builtin/datasphere_serverless.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere_serverless.rs) - -Line 26. - -*** - -### get\_global\_data - -#### Signature - -```rust -fn get_global_data(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/skills/builtin/datasphere_serverless.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere_serverless.rs) - -Line 125. - -*** - -### get\_prompt\_sections - -#### Signature - -```rust -fn get_prompt_sections(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/skills/builtin/datasphere_serverless.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere_serverless.rs) - -Line 142. - -*** - -### name - -#### Signature - -```rust -fn name(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/skills/builtin/datasphere_serverless.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere_serverless.rs) - -Line 22. - -*** - -### new - -#### Signature - -```rust -fn new(params: ?) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/skills/builtin/datasphere_serverless.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere_serverless.rs) - -Line 14. - -*** - -### params - -#### Signature - -```rust -fn params(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/skills/builtin/datasphere_serverless.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere_serverless.rs) - -Line 34. - -*** - -### register\_tools - -#### Signature - -```rust -fn register_tools(&self, agent: &mut ?) -``` - -#### Parameters - - - -#### Source - -[`src/skills/builtin/datasphere_serverless.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere_serverless.rs) - -Line 47. - -*** - -### setup - -#### Signature - -```rust -fn setup(&mut self) -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/datasphere_serverless.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere_serverless.rs) - -Line 38. - -*** - -### supports\_multiple\_instances - -#### Signature - -```rust -fn supports_multiple_instances(&self) -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/datasphere_serverless.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere_serverless.rs) - -Line 30. - -## Source - -[`src/skills/builtin/datasphere_serverless.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere_serverless.rs) - -Line 9. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/builtin/datasphere-serverless/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/builtin/datasphere-serverless/index.mdx deleted file mode 100644 index 25565fdff9..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/skills/builtin/datasphere-serverless/index.mdx +++ /dev/null @@ -1,30 +0,0 @@ ---- -slug: "/reference/rust/signalwire/skills/builtin/datasphere-serverless" -title: "datasphere_serverless" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "signalwire::skills::builtin::datasphere_serverless" - parent: "signalwire::skills::builtin" - module: "skills.builtin" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere_serverless.rs" - visibility: "public" ---- -# `datasphere_serverless` - -## Classes - - - - Search knowledge using SignalWire DataSphere with serverless DataMap execution. - - - -## Source - -[`src/skills/builtin/datasphere_serverless.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere_serverless.rs) - -Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/builtin/datasphere/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/builtin/datasphere/index.mdx deleted file mode 100644 index ea25c8a332..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/skills/builtin/datasphere/index.mdx +++ /dev/null @@ -1,227 +0,0 @@ ---- -slug: "/reference/rust/signalwire/skills/builtin/datasphere" -title: "datasphere" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::skills::builtin::datasphere" - parent: "signalwire::skills::builtin" - module: "skills.builtin" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere.rs" - visibility: "public" ---- -# `datasphere` - -Search knowledge using SignalWire DataSphere RAG stack. - -Mirrors Python's `signalwire.skills.datasphere`: real HTTP POST to -`https://{space_name}.signalwire.com/api/datasphere/documents/search` -with project-id/token Basic auth and a JSON body containing the -document ID, query, distance, and count. - -The base URL can be overridden by setting `DATASPHERE_BASE_URL` — -`audit_skills_dispatch.py` uses this to point at its loopback -fixture. Token can also come from `DATASPHERE_TOKEN`. - -## Signature - -```rust -struct Datasphere { /* fields */ } -``` - -## Inheritance - -**Implements:** `SkillBase` - -## Methods - -### description - -#### Signature - -```rust -fn description(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/skills/builtin/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere.rs) - -Line 36. - -*** - -### get\_global\_data - -#### Signature - -```rust -fn get_global_data(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/skills/builtin/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere.rs) - -Line 164. - -*** - -### get\_prompt\_sections - -#### Signature - -```rust -fn get_prompt_sections(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/skills/builtin/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere.rs) - -Line 178. - -*** - -### name - -#### Signature - -```rust -fn name(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/skills/builtin/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere.rs) - -Line 32. - -*** - -### new - -#### Signature - -```rust -fn new(params: ?) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/skills/builtin/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere.rs) - -Line 24. - -*** - -### params - -#### Signature - -```rust -fn params(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/skills/builtin/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere.rs) - -Line 44. - -*** - -### register\_tools - -#### Signature - -```rust -fn register_tools(&self, agent: &mut ?) -``` - -#### Parameters - - - -#### Source - -[`src/skills/builtin/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere.rs) - -Line 63. - -*** - -### setup - -#### Signature - -```rust -fn setup(&mut self) -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere.rs) - -Line 48. - -*** - -### supports\_multiple\_instances - -#### Signature - -```rust -fn supports_multiple_instances(&self) -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere.rs) - -Line 40. - -## Source - -[`src/skills/builtin/datasphere.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere.rs) - -Line 19. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/builtin/datetime/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/builtin/datetime/index.mdx deleted file mode 100644 index a941cc7e23..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/skills/builtin/datetime/index.mdx +++ /dev/null @@ -1,178 +0,0 @@ ---- -slug: "/reference/rust/signalwire/skills/builtin/datetime" -title: "datetime" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::skills::builtin::datetime" - parent: "signalwire::skills::builtin" - module: "skills.builtin" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datetime.rs" - visibility: "public" ---- -# `datetime` - -Get current date, time, and timezone information. - -## Signature - -```rust -struct Datetime { /* fields */ } -``` - -## Inheritance - -**Implements:** `SkillBase` - -## Methods - -### description - -#### Signature - -```rust -fn description(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/skills/builtin/datetime.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datetime.rs) - -Line 25. - -*** - -### get\_prompt\_sections - -#### Signature - -```rust -fn get_prompt_sections(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/skills/builtin/datetime.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datetime.rs) - -Line 96. - -*** - -### name - -#### Signature - -```rust -fn name(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/skills/builtin/datetime.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datetime.rs) - -Line 21. - -*** - -### new - -#### Signature - -```rust -fn new(params: ?) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/skills/builtin/datetime.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datetime.rs) - -Line 13. - -*** - -### params - -#### Signature - -```rust -fn params(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/skills/builtin/datetime.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datetime.rs) - -Line 29. - -*** - -### register\_tools - -#### Signature - -```rust -fn register_tools(&self, agent: &mut ?) -``` - -#### Parameters - - - -#### Source - -[`src/skills/builtin/datetime.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datetime.rs) - -Line 37. - -*** - -### setup - -#### Signature - -```rust -fn setup(&mut self) -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/datetime.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datetime.rs) - -Line 33. - -## Source - -[`src/skills/builtin/datetime.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datetime.rs) - -Line 8. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/builtin/google-maps/google-maps/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/builtin/google-maps/google-maps/index.mdx deleted file mode 100644 index 38b5ddfcb8..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/skills/builtin/google-maps/google-maps/index.mdx +++ /dev/null @@ -1,198 +0,0 @@ ---- -slug: "/reference/rust/signalwire/skills/builtin/google-maps/google-maps" -title: "GoogleMaps" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::skills::builtin::google_maps::GoogleMaps" - parent: "signalwire::skills::builtin::google_maps" - module: "skills.builtin.google_maps" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/google_maps.rs" - visibility: "public" ---- -# `GoogleMaps` - -Validate addresses and compute driving routes using Google Maps (DataMap-based). - -## Signature - -```rust -struct GoogleMaps { /* fields */ } -``` - -## Inheritance - -**Implements:** `SkillBase` - -## Methods - -### description - -#### Signature - -```rust -fn description(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/skills/builtin/google_maps.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/google_maps.rs) - -Line 24. - -*** - -### get\_hints - -#### Signature - -```rust -fn get_hints(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/skills/builtin/google_maps.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/google_maps.rs) - -Line 157. - -*** - -### get\_prompt\_sections - -#### Signature - -```rust -fn get_prompt_sections(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/skills/builtin/google_maps.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/google_maps.rs) - -Line 168. - -*** - -### name - -#### Signature - -```rust -fn name(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/skills/builtin/google_maps.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/google_maps.rs) - -Line 20. - -*** - -### new - -#### Signature - -```rust -fn new(params: ?) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/skills/builtin/google_maps.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/google_maps.rs) - -Line 12. - -*** - -### params - -#### Signature - -```rust -fn params(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/skills/builtin/google_maps.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/google_maps.rs) - -Line 28. - -*** - -### register\_tools - -#### Signature - -```rust -fn register_tools(&self, agent: &mut ?) -``` - -#### Parameters - - - -#### Source - -[`src/skills/builtin/google_maps.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/google_maps.rs) - -Line 36. - -*** - -### setup - -#### Signature - -```rust -fn setup(&mut self) -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/google_maps.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/google_maps.rs) - -Line 32. - -## Source - -[`src/skills/builtin/google_maps.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/google_maps.rs) - -Line 7. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/builtin/google-maps/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/builtin/google-maps/index.mdx deleted file mode 100644 index f6cacb1620..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/skills/builtin/google-maps/index.mdx +++ /dev/null @@ -1,30 +0,0 @@ ---- -slug: "/reference/rust/signalwire/skills/builtin/google-maps" -title: "google_maps" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "signalwire::skills::builtin::google_maps" - parent: "signalwire::skills::builtin" - module: "skills.builtin" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/google_maps.rs" - visibility: "public" ---- -# `google_maps` - -## Classes - - - - Validate addresses and compute driving routes using Google Maps (DataMap-based). - - - -## Source - -[`src/skills/builtin/google_maps.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/google_maps.rs) - -Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/builtin/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/builtin/index.mdx deleted file mode 100644 index ef5ce1a8bd..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/skills/builtin/index.mdx +++ /dev/null @@ -1,76 +0,0 @@ ---- -slug: "/reference/rust/signalwire/skills/builtin" -title: "builtin" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "signalwire::skills::builtin" - parent: "signalwire::skills" - module: "skills" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/mod.rs" - visibility: "public" ---- -# `builtin` - -## Classes - - - - Search knowledge using SignalWire DataSphere RAG stack. - - - - Get current date, time, and timezone information. - - - - Tell jokes using the API Ninjas joke API (DataMap-based). - - - - Perform basic mathematical calculations. - - - - Fast web scraping and crawling capabilities (handler-based). - - - -## Modules - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -## Source - -[`src/skills/builtin/mod.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/mod.rs) - -Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/builtin/info-gatherer/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/builtin/info-gatherer/index.mdx deleted file mode 100644 index c736c5390f..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/skills/builtin/info-gatherer/index.mdx +++ /dev/null @@ -1,30 +0,0 @@ ---- -slug: "/reference/rust/signalwire/skills/builtin/info-gatherer" -title: "info_gatherer" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "signalwire::skills::builtin::info_gatherer" - parent: "signalwire::skills::builtin" - module: "skills.builtin" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/info_gatherer.rs" - visibility: "public" ---- -# `info_gatherer` - -## Classes - - - - Gather answers to a configurable list of questions (handler-based). - - - -## Source - -[`src/skills/builtin/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/info_gatherer.rs) - -Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/builtin/info-gatherer/info-gatherer/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/builtin/info-gatherer/info-gatherer/index.mdx deleted file mode 100644 index 09544b8457..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/skills/builtin/info-gatherer/info-gatherer/index.mdx +++ /dev/null @@ -1,218 +0,0 @@ ---- -slug: "/reference/rust/signalwire/skills/builtin/info-gatherer/info-gatherer" -title: "InfoGatherer" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::skills::builtin::info_gatherer::InfoGatherer" - parent: "signalwire::skills::builtin::info_gatherer" - module: "skills.builtin.info_gatherer" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/info_gatherer.rs" - visibility: "public" ---- -# `InfoGatherer` - -Gather answers to a configurable list of questions (handler-based). - -## Signature - -```rust -struct InfoGatherer { /* fields */ } -``` - -## Inheritance - -**Implements:** `SkillBase` - -## Methods - -### description - -#### Signature - -```rust -fn description(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/skills/builtin/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/info_gatherer.rs) - -Line 25. - -*** - -### get\_global\_data - -#### Signature - -```rust -fn get_global_data(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/skills/builtin/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/info_gatherer.rs) - -Line 171. - -*** - -### get\_prompt\_sections - -#### Signature - -```rust -fn get_prompt_sections(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/skills/builtin/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/info_gatherer.rs) - -Line 187. - -*** - -### name - -#### Signature - -```rust -fn name(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/skills/builtin/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/info_gatherer.rs) - -Line 21. - -*** - -### new - -#### Signature - -```rust -fn new(params: ?) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/skills/builtin/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/info_gatherer.rs) - -Line 13. - -*** - -### params - -#### Signature - -```rust -fn params(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/skills/builtin/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/info_gatherer.rs) - -Line 33. - -*** - -### register\_tools - -#### Signature - -```rust -fn register_tools(&self, agent: &mut ?) -``` - -#### Parameters - - - -#### Source - -[`src/skills/builtin/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/info_gatherer.rs) - -Line 42. - -*** - -### setup - -#### Signature - -```rust -fn setup(&mut self) -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/info_gatherer.rs) - -Line 37. - -*** - -### supports\_multiple\_instances - -#### Signature - -```rust -fn supports_multiple_instances(&self) -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/info_gatherer.rs) - -Line 29. - -## Source - -[`src/skills/builtin/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/info_gatherer.rs) - -Line 8. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/builtin/joke/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/builtin/joke/index.mdx deleted file mode 100644 index cdc86659bc..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/skills/builtin/joke/index.mdx +++ /dev/null @@ -1,198 +0,0 @@ ---- -slug: "/reference/rust/signalwire/skills/builtin/joke" -title: "joke" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::skills::builtin::joke" - parent: "signalwire::skills::builtin" - module: "skills.builtin" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/joke.rs" - visibility: "public" ---- -# `joke` - -Tell jokes using the API Ninjas joke API (DataMap-based). - -## Signature - -```rust -struct Joke { /* fields */ } -``` - -## Inheritance - -**Implements:** `SkillBase` - -## Methods - -### description - -#### Signature - -```rust -fn description(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/skills/builtin/joke.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/joke.rs) - -Line 24. - -*** - -### get\_global\_data - -#### Signature - -```rust -fn get_global_data(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/skills/builtin/joke.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/joke.rs) - -Line 84. - -*** - -### get\_prompt\_sections - -#### Signature - -```rust -fn get_prompt_sections(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/skills/builtin/joke.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/joke.rs) - -Line 90. - -*** - -### name - -#### Signature - -```rust -fn name(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/skills/builtin/joke.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/joke.rs) - -Line 20. - -*** - -### new - -#### Signature - -```rust -fn new(params: ?) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/skills/builtin/joke.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/joke.rs) - -Line 12. - -*** - -### params - -#### Signature - -```rust -fn params(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/skills/builtin/joke.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/joke.rs) - -Line 28. - -*** - -### register\_tools - -#### Signature - -```rust -fn register_tools(&self, agent: &mut ?) -``` - -#### Parameters - - - -#### Source - -[`src/skills/builtin/joke.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/joke.rs) - -Line 36. - -*** - -### setup - -#### Signature - -```rust -fn setup(&mut self) -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/joke.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/joke.rs) - -Line 32. - -## Source - -[`src/skills/builtin/joke.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/joke.rs) - -Line 7. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/builtin/math/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/builtin/math/index.mdx deleted file mode 100644 index d47be7efb3..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/skills/builtin/math/index.mdx +++ /dev/null @@ -1,178 +0,0 @@ ---- -slug: "/reference/rust/signalwire/skills/builtin/math" -title: "math" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::skills::builtin::math" - parent: "signalwire::skills::builtin" - module: "skills.builtin" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/math.rs" - visibility: "public" ---- -# `math` - -Perform basic mathematical calculations. - -## Signature - -```rust -struct Math { /* fields */ } -``` - -## Inheritance - -**Implements:** `SkillBase` - -## Methods - -### description - -#### Signature - -```rust -fn description(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/skills/builtin/math.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/math.rs) - -Line 25. - -*** - -### get\_prompt\_sections - -#### Signature - -```rust -fn get_prompt_sections(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/skills/builtin/math.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/math.rs) - -Line 99. - -*** - -### name - -#### Signature - -```rust -fn name(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/skills/builtin/math.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/math.rs) - -Line 21. - -*** - -### new - -#### Signature - -```rust -fn new(params: ?) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/skills/builtin/math.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/math.rs) - -Line 13. - -*** - -### params - -#### Signature - -```rust -fn params(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/skills/builtin/math.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/math.rs) - -Line 29. - -*** - -### register\_tools - -#### Signature - -```rust -fn register_tools(&self, agent: &mut ?) -``` - -#### Parameters - - - -#### Source - -[`src/skills/builtin/math.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/math.rs) - -Line 37. - -*** - -### setup - -#### Signature - -```rust -fn setup(&mut self) -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/math.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/math.rs) - -Line 33. - -## Source - -[`src/skills/builtin/math.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/math.rs) - -Line 8. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/builtin/mcp-gateway/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/builtin/mcp-gateway/index.mdx deleted file mode 100644 index 6b282c1765..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/skills/builtin/mcp-gateway/index.mdx +++ /dev/null @@ -1,30 +0,0 @@ ---- -slug: "/reference/rust/signalwire/skills/builtin/mcp-gateway" -title: "mcp_gateway" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "signalwire::skills::builtin::mcp_gateway" - parent: "signalwire::skills::builtin" - module: "skills.builtin" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/mcp_gateway.rs" - visibility: "public" ---- -# `mcp_gateway` - -## Classes - - - - Bridge MCP servers with SWAIG functions (handler-based). - - - -## Source - -[`src/skills/builtin/mcp_gateway.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/mcp_gateway.rs) - -Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/builtin/mcp-gateway/mcp-gateway/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/builtin/mcp-gateway/mcp-gateway/index.mdx deleted file mode 100644 index 1575651f41..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/skills/builtin/mcp-gateway/mcp-gateway/index.mdx +++ /dev/null @@ -1,218 +0,0 @@ ---- -slug: "/reference/rust/signalwire/skills/builtin/mcp-gateway/mcp-gateway" -title: "McpGateway" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::skills::builtin::mcp_gateway::McpGateway" - parent: "signalwire::skills::builtin::mcp_gateway" - module: "skills.builtin.mcp_gateway" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/mcp_gateway.rs" - visibility: "public" ---- -# `McpGateway` - -Bridge MCP servers with SWAIG functions (handler-based). - -## Signature - -```rust -struct McpGateway { /* fields */ } -``` - -## Inheritance - -**Implements:** `SkillBase` - -## Methods - -### description - -#### Signature - -```rust -fn description(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/skills/builtin/mcp_gateway.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/mcp_gateway.rs) - -Line 25. - -*** - -### get\_global\_data - -#### Signature - -```rust -fn get_global_data(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/skills/builtin/mcp_gateway.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/mcp_gateway.rs) - -Line 201. - -*** - -### get\_hints - -#### Signature - -```rust -fn get_hints(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/skills/builtin/mcp_gateway.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/mcp_gateway.rs) - -Line 185. - -*** - -### get\_prompt\_sections - -#### Signature - -```rust -fn get_prompt_sections(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/skills/builtin/mcp_gateway.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/mcp_gateway.rs) - -Line 218. - -*** - -### name - -#### Signature - -```rust -fn name(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/skills/builtin/mcp_gateway.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/mcp_gateway.rs) - -Line 21. - -*** - -### new - -#### Signature - -```rust -fn new(params: ?) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/skills/builtin/mcp_gateway.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/mcp_gateway.rs) - -Line 13. - -*** - -### params - -#### Signature - -```rust -fn params(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/skills/builtin/mcp_gateway.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/mcp_gateway.rs) - -Line 29. - -*** - -### register\_tools - -#### Signature - -```rust -fn register_tools(&self, agent: &mut ?) -``` - -#### Parameters - - - -#### Source - -[`src/skills/builtin/mcp_gateway.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/mcp_gateway.rs) - -Line 37. - -*** - -### setup - -#### Signature - -```rust -fn setup(&mut self) -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/mcp_gateway.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/mcp_gateway.rs) - -Line 33. - -## Source - -[`src/skills/builtin/mcp_gateway.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/mcp_gateway.rs) - -Line 8. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/builtin/native-vector-search/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/builtin/native-vector-search/index.mdx deleted file mode 100644 index 48216c936f..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/skills/builtin/native-vector-search/index.mdx +++ /dev/null @@ -1,30 +0,0 @@ ---- -slug: "/reference/rust/signalwire/skills/builtin/native-vector-search" -title: "native_vector_search" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "signalwire::skills::builtin::native_vector_search" - parent: "signalwire::skills::builtin" - module: "skills.builtin" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/native_vector_search.rs" - visibility: "public" ---- -# `native_vector_search` - -## Classes - - - - Search document indexes using vector similarity and keyword search (handler-based). - - - -## Source - -[`src/skills/builtin/native_vector_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/native_vector_search.rs) - -Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/builtin/native-vector-search/native-vector-search/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/builtin/native-vector-search/native-vector-search/index.mdx deleted file mode 100644 index 36d191a725..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/skills/builtin/native-vector-search/native-vector-search/index.mdx +++ /dev/null @@ -1,198 +0,0 @@ ---- -slug: "/reference/rust/signalwire/skills/builtin/native-vector-search/native-vector-search" -title: "NativeVectorSearch" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::skills::builtin::native_vector_search::NativeVectorSearch" - parent: "signalwire::skills::builtin::native_vector_search" - module: "skills.builtin.native_vector_search" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/native_vector_search.rs" - visibility: "public" ---- -# `NativeVectorSearch` - -Search document indexes using vector similarity and keyword search (handler-based). - -## Signature - -```rust -struct NativeVectorSearch { /* fields */ } -``` - -## Inheritance - -**Implements:** `SkillBase` - -## Methods - -### description - -#### Signature - -```rust -fn description(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/skills/builtin/native_vector_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/native_vector_search.rs) - -Line 25. - -*** - -### get\_hints - -#### Signature - -```rust -fn get_hints(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/skills/builtin/native_vector_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/native_vector_search.rs) - -Line 98. - -*** - -### name - -#### Signature - -```rust -fn name(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/skills/builtin/native_vector_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/native_vector_search.rs) - -Line 21. - -*** - -### new - -#### Signature - -```rust -fn new(params: ?) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/skills/builtin/native_vector_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/native_vector_search.rs) - -Line 13. - -*** - -### params - -#### Signature - -```rust -fn params(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/skills/builtin/native_vector_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/native_vector_search.rs) - -Line 33. - -*** - -### register\_tools - -#### Signature - -```rust -fn register_tools(&self, agent: &mut ?) -``` - -#### Parameters - - - -#### Source - -[`src/skills/builtin/native_vector_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/native_vector_search.rs) - -Line 41. - -*** - -### setup - -#### Signature - -```rust -fn setup(&mut self) -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/native_vector_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/native_vector_search.rs) - -Line 37. - -*** - -### supports\_multiple\_instances - -#### Signature - -```rust -fn supports_multiple_instances(&self) -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/native_vector_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/native_vector_search.rs) - -Line 29. - -## Source - -[`src/skills/builtin/native_vector_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/native_vector_search.rs) - -Line 8. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/builtin/play-background-file/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/builtin/play-background-file/index.mdx deleted file mode 100644 index 6ee3bc18aa..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/skills/builtin/play-background-file/index.mdx +++ /dev/null @@ -1,30 +0,0 @@ ---- -slug: "/reference/rust/signalwire/skills/builtin/play-background-file" -title: "play_background_file" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "signalwire::skills::builtin::play_background_file" - parent: "signalwire::skills::builtin" - module: "skills.builtin" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/play_background_file.rs" - visibility: "public" ---- -# `play_background_file` - -## Classes - - - - Control background file playback (DataMap-based). - - - -## Source - -[`src/skills/builtin/play_background_file.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/play_background_file.rs) - -Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/builtin/play-background-file/play-background-file/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/builtin/play-background-file/play-background-file/index.mdx deleted file mode 100644 index fc90694a8e..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/skills/builtin/play-background-file/play-background-file/index.mdx +++ /dev/null @@ -1,178 +0,0 @@ ---- -slug: "/reference/rust/signalwire/skills/builtin/play-background-file/play-background-file" -title: "PlayBackgroundFile" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::skills::builtin::play_background_file::PlayBackgroundFile" - parent: "signalwire::skills::builtin::play_background_file" - module: "skills.builtin.play_background_file" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/play_background_file.rs" - visibility: "public" ---- -# `PlayBackgroundFile` - -Control background file playback (DataMap-based). - -## Signature - -```rust -struct PlayBackgroundFile { /* fields */ } -``` - -## Inheritance - -**Implements:** `SkillBase` - -## Methods - -### description - -#### Signature - -```rust -fn description(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/skills/builtin/play_background_file.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/play_background_file.rs) - -Line 24. - -*** - -### name - -#### Signature - -```rust -fn name(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/skills/builtin/play_background_file.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/play_background_file.rs) - -Line 20. - -*** - -### new - -#### Signature - -```rust -fn new(params: ?) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/skills/builtin/play_background_file.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/play_background_file.rs) - -Line 12. - -*** - -### params - -#### Signature - -```rust -fn params(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/skills/builtin/play_background_file.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/play_background_file.rs) - -Line 32. - -*** - -### register\_tools - -#### Signature - -```rust -fn register_tools(&self, agent: &mut ?) -``` - -#### Parameters - - - -#### Source - -[`src/skills/builtin/play_background_file.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/play_background_file.rs) - -Line 41. - -*** - -### setup - -#### Signature - -```rust -fn setup(&mut self) -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/play_background_file.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/play_background_file.rs) - -Line 36. - -*** - -### supports\_multiple\_instances - -#### Signature - -```rust -fn supports_multiple_instances(&self) -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/play_background_file.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/play_background_file.rs) - -Line 28. - -## Source - -[`src/skills/builtin/play_background_file.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/play_background_file.rs) - -Line 7. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/builtin/spider/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/builtin/spider/index.mdx deleted file mode 100644 index 3667888598..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/skills/builtin/spider/index.mdx +++ /dev/null @@ -1,198 +0,0 @@ ---- -slug: "/reference/rust/signalwire/skills/builtin/spider" -title: "spider" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::skills::builtin::spider" - parent: "signalwire::skills::builtin" - module: "skills.builtin" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/spider.rs" - visibility: "public" ---- -# `spider` - -Fast web scraping and crawling capabilities (handler-based). - -## Signature - -```rust -struct Spider { /* fields */ } -``` - -## Inheritance - -**Implements:** `SkillBase` - -## Methods - -### description - -#### Signature - -```rust -fn description(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/skills/builtin/spider.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/spider.rs) - -Line 25. - -*** - -### get\_hints - -#### Signature - -```rust -fn get_hints(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/skills/builtin/spider.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/spider.rs) - -Line 161. - -*** - -### name - -#### Signature - -```rust -fn name(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/skills/builtin/spider.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/spider.rs) - -Line 21. - -*** - -### new - -#### Signature - -```rust -fn new(params: ?) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/skills/builtin/spider.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/spider.rs) - -Line 13. - -*** - -### params - -#### Signature - -```rust -fn params(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/skills/builtin/spider.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/spider.rs) - -Line 33. - -*** - -### register\_tools - -#### Signature - -```rust -fn register_tools(&self, agent: &mut ?) -``` - -#### Parameters - - - -#### Source - -[`src/skills/builtin/spider.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/spider.rs) - -Line 41. - -*** - -### setup - -#### Signature - -```rust -fn setup(&mut self) -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/spider.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/spider.rs) - -Line 37. - -*** - -### supports\_multiple\_instances - -#### Signature - -```rust -fn supports_multiple_instances(&self) -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/spider.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/spider.rs) - -Line 29. - -## Source - -[`src/skills/builtin/spider.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/spider.rs) - -Line 8. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/builtin/swml-transfer/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/builtin/swml-transfer/index.mdx deleted file mode 100644 index d0bd672263..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/skills/builtin/swml-transfer/index.mdx +++ /dev/null @@ -1,30 +0,0 @@ ---- -slug: "/reference/rust/signalwire/skills/builtin/swml-transfer" -title: "swml_transfer" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "signalwire::skills::builtin::swml_transfer" - parent: "signalwire::skills::builtin" - module: "skills.builtin" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/swml_transfer.rs" - visibility: "public" ---- -# `swml_transfer` - -## Classes - - - - Transfer calls between agents based on pattern matching (DataMap-based). - - - -## Source - -[`src/skills/builtin/swml_transfer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/swml_transfer.rs) - -Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/builtin/swml-transfer/swml-transfer/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/builtin/swml-transfer/swml-transfer/index.mdx deleted file mode 100644 index 49631184e4..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/skills/builtin/swml-transfer/swml-transfer/index.mdx +++ /dev/null @@ -1,218 +0,0 @@ ---- -slug: "/reference/rust/signalwire/skills/builtin/swml-transfer/swml-transfer" -title: "SwmlTransfer" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::skills::builtin::swml_transfer::SwmlTransfer" - parent: "signalwire::skills::builtin::swml_transfer" - module: "skills.builtin.swml_transfer" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/swml_transfer.rs" - visibility: "public" ---- -# `SwmlTransfer` - -Transfer calls between agents based on pattern matching (DataMap-based). - -## Signature - -```rust -struct SwmlTransfer { /* fields */ } -``` - -## Inheritance - -**Implements:** `SkillBase` - -## Methods - -### description - -#### Signature - -```rust -fn description(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/skills/builtin/swml_transfer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/swml_transfer.rs) - -Line 24. - -*** - -### get\_hints - -#### Signature - -```rust -fn get_hints(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/skills/builtin/swml_transfer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/swml_transfer.rs) - -Line 169. - -*** - -### get\_prompt\_sections - -#### Signature - -```rust -fn get_prompt_sections(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/skills/builtin/swml_transfer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/swml_transfer.rs) - -Line 190. - -*** - -### name - -#### Signature - -```rust -fn name(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/skills/builtin/swml_transfer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/swml_transfer.rs) - -Line 20. - -*** - -### new - -#### Signature - -```rust -fn new(params: ?) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/skills/builtin/swml_transfer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/swml_transfer.rs) - -Line 12. - -*** - -### params - -#### Signature - -```rust -fn params(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/skills/builtin/swml_transfer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/swml_transfer.rs) - -Line 32. - -*** - -### register\_tools - -#### Signature - -```rust -fn register_tools(&self, agent: &mut ?) -``` - -#### Parameters - - - -#### Source - -[`src/skills/builtin/swml_transfer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/swml_transfer.rs) - -Line 45. - -*** - -### setup - -#### Signature - -```rust -fn setup(&mut self) -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/swml_transfer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/swml_transfer.rs) - -Line 36. - -*** - -### supports\_multiple\_instances - -#### Signature - -```rust -fn supports_multiple_instances(&self) -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/swml_transfer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/swml_transfer.rs) - -Line 28. - -## Source - -[`src/skills/builtin/swml_transfer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/swml_transfer.rs) - -Line 7. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/builtin/weather-api/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/builtin/weather-api/index.mdx deleted file mode 100644 index 501efb5d8c..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/skills/builtin/weather-api/index.mdx +++ /dev/null @@ -1,30 +0,0 @@ ---- -slug: "/reference/rust/signalwire/skills/builtin/weather-api" -title: "weather_api" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "signalwire::skills::builtin::weather_api" - parent: "signalwire::skills::builtin" - module: "skills.builtin" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/weather_api.rs" - visibility: "public" ---- -# `weather_api` - -## Classes - - - - Get current weather information from WeatherAPI.com (DataMap-based). - - - -## Source - -[`src/skills/builtin/weather_api.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/weather_api.rs) - -Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/builtin/weather-api/weather-api/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/builtin/weather-api/weather-api/index.mdx deleted file mode 100644 index cd59a61e51..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/skills/builtin/weather-api/weather-api/index.mdx +++ /dev/null @@ -1,158 +0,0 @@ ---- -slug: "/reference/rust/signalwire/skills/builtin/weather-api/weather-api" -title: "WeatherApi" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::skills::builtin::weather_api::WeatherApi" - parent: "signalwire::skills::builtin::weather_api" - module: "skills.builtin.weather_api" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/weather_api.rs" - visibility: "public" ---- -# `WeatherApi` - -Get current weather information from WeatherAPI.com (DataMap-based). - -## Signature - -```rust -struct WeatherApi { /* fields */ } -``` - -## Inheritance - -**Implements:** `SkillBase` - -## Methods - -### description - -#### Signature - -```rust -fn description(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/skills/builtin/weather_api.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/weather_api.rs) - -Line 24. - -*** - -### name - -#### Signature - -```rust -fn name(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/skills/builtin/weather_api.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/weather_api.rs) - -Line 20. - -*** - -### new - -#### Signature - -```rust -fn new(params: ?) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/skills/builtin/weather_api.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/weather_api.rs) - -Line 12. - -*** - -### params - -#### Signature - -```rust -fn params(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/skills/builtin/weather_api.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/weather_api.rs) - -Line 28. - -*** - -### register\_tools - -#### Signature - -```rust -fn register_tools(&self, agent: &mut ?) -``` - -#### Parameters - - - -#### Source - -[`src/skills/builtin/weather_api.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/weather_api.rs) - -Line 36. - -*** - -### setup - -#### Signature - -```rust -fn setup(&mut self) -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/weather_api.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/weather_api.rs) - -Line 32. - -## Source - -[`src/skills/builtin/weather_api.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/weather_api.rs) - -Line 7. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/builtin/web-search/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/builtin/web-search/index.mdx deleted file mode 100644 index 5181b397cf..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/skills/builtin/web-search/index.mdx +++ /dev/null @@ -1,30 +0,0 @@ ---- -slug: "/reference/rust/signalwire/skills/builtin/web-search" -title: "web_search" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "signalwire::skills::builtin::web_search" - parent: "signalwire::skills::builtin" - module: "skills.builtin" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/web_search.rs" - visibility: "public" ---- -# `web_search` - -## Classes - - - - Search the web using Google Custom Search API. - - - -## Source - -[`src/skills/builtin/web_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/web_search.rs) - -Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/builtin/web-search/web-search/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/builtin/web-search/web-search/index.mdx deleted file mode 100644 index 77459055a5..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/skills/builtin/web-search/web-search/index.mdx +++ /dev/null @@ -1,271 +0,0 @@ ---- -slug: "/reference/rust/signalwire/skills/builtin/web-search/web-search" -title: "WebSearch" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::skills::builtin::web_search::WebSearch" - parent: "signalwire::skills::builtin::web_search" - module: "skills.builtin.web_search" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/web_search.rs" - visibility: "public" ---- -# `WebSearch` - -Search the web using Google Custom Search API. - -Mirrors Python's `signalwire.skills.web_search`: the SDK issues a -real HTTP GET to Google CSE (`https://www.googleapis.com/customsearch/v1`) -with the query, key, and CSE ID in the query string, and parses the -JSON response. The base URL can be overridden via the -`WEB_SEARCH_BASE_URL` env var (used by `audit_skills_dispatch.py`'s -fixture). Without that override, the URL points at Google. - -## Signature - -```rust -struct WebSearch { /* fields */ } -``` - -## Inheritance - -**Implements:** `SkillBase` - -## Methods - -### description - -#### Signature - -```rust -fn description(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/skills/builtin/web_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/web_search.rs) - -Line 44. - -*** - -### get\_global\_data - -#### Signature - -```rust -fn get_global_data(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/skills/builtin/web_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/web_search.rs) - -Line 248. - -*** - -### get\_parameter\_schema - -Advertise the accepted parameters, including the latency-control set -(Python `WebSearchSkill.get_parameter_schema`, commit 295745b). Every -param `register_tools` reads must appear here so it is discoverable; -the inline test module guards against the recurring "read a param but -forgot the schema entry" drift class. - -#### Signature - -```rust -fn get_parameter_schema(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/skills/builtin/web_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/web_search.rs) - -Line 278. - -*** - -### get\_prompt\_sections - -#### Signature - -```rust -fn get_prompt_sections(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/skills/builtin/web_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/web_search.rs) - -Line 258. - -*** - -### name - -#### Signature - -```rust -fn name(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/skills/builtin/web_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/web_search.rs) - -Line 40. - -*** - -### new - -#### Signature - -```rust -fn new(params: ?) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/skills/builtin/web_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/web_search.rs) - -Line 32. - -*** - -### params - -#### Signature - -```rust -fn params(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/skills/builtin/web_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/web_search.rs) - -Line 56. - -*** - -### register\_tools - -#### Signature - -```rust -fn register_tools(&self, agent: &mut ?) -``` - -#### Parameters - - - -#### Source - -[`src/skills/builtin/web_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/web_search.rs) - -Line 73. - -*** - -### setup - -#### Signature - -```rust -fn setup(&mut self) -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/web_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/web_search.rs) - -Line 60. - -*** - -### supports\_multiple\_instances - -#### Signature - -```rust -fn supports_multiple_instances(&self) -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/web_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/web_search.rs) - -Line 52. - -*** - -### version - -#### Signature - -```rust -fn version(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/skills/builtin/web_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/web_search.rs) - -Line 48. - -## Source - -[`src/skills/builtin/web_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/web_search.rs) - -Line 27. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/builtin/wikipedia-search/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/builtin/wikipedia-search/index.mdx deleted file mode 100644 index 48e09fef3b..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/skills/builtin/wikipedia-search/index.mdx +++ /dev/null @@ -1,30 +0,0 @@ ---- -slug: "/reference/rust/signalwire/skills/builtin/wikipedia-search" -title: "wikipedia_search" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "signalwire::skills::builtin::wikipedia_search" - parent: "signalwire::skills::builtin" - module: "skills.builtin" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/wikipedia_search.rs" - visibility: "public" ---- -# `wikipedia_search` - -## Classes - - - - Search Wikipedia and get article summaries. - - - -## Source - -[`src/skills/builtin/wikipedia_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/wikipedia_search.rs) - -Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/builtin/wikipedia-search/wikipedia-search/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/builtin/wikipedia-search/wikipedia-search/index.mdx deleted file mode 100644 index 0debd8e5e0..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/skills/builtin/wikipedia-search/wikipedia-search/index.mdx +++ /dev/null @@ -1,183 +0,0 @@ ---- -slug: "/reference/rust/signalwire/skills/builtin/wikipedia-search/wikipedia-search" -title: "WikipediaSearch" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::skills::builtin::wikipedia_search::WikipediaSearch" - parent: "signalwire::skills::builtin::wikipedia_search" - module: "skills.builtin.wikipedia_search" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/wikipedia_search.rs" - visibility: "public" ---- -# `WikipediaSearch` - -Search Wikipedia and get article summaries. - -Mirrors Python's `signalwire.skills.wikipedia_search`: real HTTP GET -against the Wikipedia REST API. The base URL can be overridden by -setting `WIKIPEDIA_BASE_URL` (used by `audit_skills_dispatch.py`'s -fixture). Defaults to `https://en.wikipedia.org`. - -## Signature - -```rust -struct WikipediaSearch { /* fields */ } -``` - -## Inheritance - -**Implements:** `SkillBase` - -## Methods - -### description - -#### Signature - -```rust -fn description(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/skills/builtin/wikipedia_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/wikipedia_search.rs) - -Line 30. - -*** - -### get\_prompt\_sections - -#### Signature - -```rust -fn get_prompt_sections(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/skills/builtin/wikipedia_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/wikipedia_search.rs) - -Line 129. - -*** - -### name - -#### Signature - -```rust -fn name(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/skills/builtin/wikipedia_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/wikipedia_search.rs) - -Line 26. - -*** - -### new - -#### Signature - -```rust -fn new(params: ?) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/skills/builtin/wikipedia_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/wikipedia_search.rs) - -Line 18. - -*** - -### params - -#### Signature - -```rust -fn params(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/skills/builtin/wikipedia_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/wikipedia_search.rs) - -Line 34. - -*** - -### register\_tools - -#### Signature - -```rust -fn register_tools(&self, agent: &mut ?) -``` - -#### Parameters - - - -#### Source - -[`src/skills/builtin/wikipedia_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/wikipedia_search.rs) - -Line 42. - -*** - -### setup - -#### Signature - -```rust -fn setup(&mut self) -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/wikipedia_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/wikipedia_search.rs) - -Line 38. - -## Source - -[`src/skills/builtin/wikipedia_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/wikipedia_search.rs) - -Line 13. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/index.mdx deleted file mode 100644 index 25a1afbc98..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/skills/index.mdx +++ /dev/null @@ -1,37 +0,0 @@ ---- -slug: "/reference/rust/signalwire/skills" -title: "skills" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "signalwire::skills" - parent: "signalwire" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/mod.rs" - visibility: "public" ---- -# `skills` - -## Modules - - - - - - - - - - Built-in skill names as a typed, compile-time-checked closed set. - - - - - -## Source - -[`src/skills/mod.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/mod.rs) - -Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/skill-base/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/skill-base/index.mdx deleted file mode 100644 index 5bcb3d5a5a..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/skills/skill-base/index.mdx +++ /dev/null @@ -1,455 +0,0 @@ ---- -slug: "/reference/rust/signalwire/skills/skill-base" -title: "skill_base" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "signalwire::skills::skill_base" - parent: "signalwire::skills" - module: "skills" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs" - visibility: "public" ---- -# `skill_base` - -## Classes - - - - Parameters holder used by the default `SkillBase` implementations. - - - -## Functions - -### value\_to\_map - -Convert a `Value` (expected to be an object) into a `Map`. - -#### Signature - -```rust -fn value_to_map(val: ?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) - -Line 184. - -## Interfaces - -### SkillBase - -Trait implemented by all skills (both builtin and custom). - -A skill encapsulates tools, hints, global data, and prompt sections that can -be loaded into an `AgentBase` via the `SkillManager`. - -#### Signature - -```rust -trait SkillBase -``` - -#### Inheritance - -**Extends:** `?`, `?` - -#### Methods - -##### cleanup - -Called when the skill is unloaded. - -###### Signature - -```rust -fn cleanup(&mut self) -``` - -###### Source - -[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) - -Line 89. - -*** - -##### description - -Human-readable description. - -###### Signature - -```rust -fn description(&self) -> &str -``` - -###### Returns - -`&str` - -###### Source - -[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) - -Line 14. - -*** - -##### get\_global\_data - -Key/value pairs merged into the agent's global data. - -###### Signature - -```rust -fn get_global_data(&self) -> ? -``` - -###### Returns - -`?` - -###### Source - -[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) - -Line 53. - -*** - -##### get\_hints - -Speech recognition hints. - -###### Signature - -```rust -fn get_hints(&self) -> ? -``` - -###### Returns - -`?` - -###### Source - -[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) - -Line 48. - -*** - -##### get\_instance\_key - -Instance key used to track loaded skills (allows tool\_name overrides). - -###### Signature - -```rust -fn get_instance_key(&self) -> ? -``` - -###### Returns - -`?` - -###### Source - -[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) - -Line 32. - -*** - -##### get\_parameter\_schema - -JSON-Schema describing accepted parameters. - -###### Signature - -```rust -fn get_parameter_schema(&self) -> ? -``` - -###### Returns - -`?` - -###### Source - -[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) - -Line 66. - -*** - -##### get\_prompt\_sections - -POM sections merged into the agent's prompt. - -###### Signature - -```rust -fn get_prompt_sections(&self) -> ? -``` - -###### Returns - -`?` - -###### Source - -[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) - -Line 58. - -*** - -##### get\_swaig\_fields - -Get the SWAIG fields to merge into tool definitions. - -###### Signature - -```rust -fn get_swaig_fields(&self) -> ? -``` - -###### Returns - -`?` - -###### Source - -[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) - -Line 115. - -*** - -##### get\_tool\_name - -Get the tool name, falling back to `default` if no override is set. - -###### Signature - -```rust -fn get_tool_name(&self, default: &str) -> ? -``` - -###### Parameters - - - -###### Returns - -`?` - -###### Source - -[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) - -Line 106. - -*** - -##### name - -Unique snake\_case name of this skill (e.g. `"datetime"`). - -###### Signature - -```rust -fn name(&self) -> &str -``` - -###### Returns - -`&str` - -###### Source - -[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) - -Line 11. - -*** - -##### params - -Access the skill's configuration parameters. - -###### Signature - -```rust -fn params(&self) -> &? -``` - -###### Returns - -`&?` - -###### Source - -[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) - -Line 92. - -*** - -##### register\_tools - -Register tools on the agent. - -###### Signature - -```rust -fn register_tools(&self, agent: &mut ?) -``` - -###### Parameters - - - -###### Source - -[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) - -Line 45. - -*** - -##### required\_env\_vars - -Environment variables that must be set before `setup` is called. - -###### Signature - -```rust -fn required_env_vars(&self) -> ? -``` - -###### Returns - -`?` - -###### Source - -[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) - -Line 22. - -*** - -##### setup - -One-time setup. Return `true` on success. - -###### Signature - -```rust -fn setup(&mut self) -> bool -``` - -###### Returns - -`bool` - -###### Source - -[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) - -Line 42. - -*** - -##### supports\_multiple\_instances - -Whether multiple instances of this skill can be loaded simultaneously. - -###### Signature - -```rust -fn supports_multiple_instances(&self) -> bool -``` - -###### Returns - -`bool` - -###### Source - -[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) - -Line 27. - -*** - -##### validate\_env\_vars - -Validate that all required env vars are set. Returns missing var names. - -###### Signature - -```rust -fn validate_env_vars(&self) -> ? -``` - -###### Returns - -`?` - -###### Source - -[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) - -Line 95. - -*** - -##### version - -Semantic version string. - -###### Signature - -```rust -fn version(&self) -> &str -``` - -###### Returns - -`&str` - -###### Source - -[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) - -Line 17. - -#### Source - -[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) - -Line 9. - -## Source - -[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) - -Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/skill-base/skill-params/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/skill-base/skill-params/index.mdx deleted file mode 100644 index 9a4755652b..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/skills/skill-base/skill-params/index.mdx +++ /dev/null @@ -1,330 +0,0 @@ ---- -slug: "/reference/rust/signalwire/skills/skill-base/skill-params" -title: "SkillParams" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::skills::skill_base::SkillParams" - parent: "signalwire::skills::skill_base" - module: "skills.skill_base" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs" - visibility: "public" ---- -# `SkillParams` - -Parameters holder used by the default `SkillBase` implementations. - -## Signature - -```rust -struct SkillParams { /* fields */ } -``` - -## Inheritance - -**Implements:** `Debug`, `Clone` - -## Properties - - - -## Methods - -### clone - -#### Signature - -```rust -fn clone(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) - -Line 125. - -*** - -### empty - -#### Signature - -```rust -fn empty() -> Self -``` - -#### Returns - -`Self` - -#### Source - -[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) - -Line 135. - -*** - -### fmt - -#### Signature - -```rust -fn fmt(&self, f: &mut ?<'_>) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) - -Line 125. - -*** - -### get\_array - -#### Signature - -```rust -fn get_array(&self, key: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) - -Line 166. - -*** - -### get\_bool - -#### Signature - -```rust -fn get_bool(&self, key: &str) -> bool -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) - -Line 147. - -*** - -### get\_bool\_or - -Like `get_bool` but returns `default` when the key is -absent (or not a boolean). Needed for params whose documented default -is `true` — `get_bool` always falls back to `false`. - -#### Signature - -```rust -fn get_bool_or(&self, key: &str, default: bool) -> bool -``` - -#### Parameters - - - - - -#### Returns - -`bool` - -#### Source - -[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) - -Line 154. - -*** - -### get\_f64 - -#### Signature - -```rust -fn get_f64(&self, key: &str, default: f64) -> f64 -``` - -#### Parameters - - - - - -#### Returns - -`f64` - -#### Source - -[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) - -Line 162. - -*** - -### get\_i64 - -#### Signature - -```rust -fn get_i64(&self, key: &str, default: i64) -> i64 -``` - -#### Parameters - - - - - -#### Returns - -`i64` - -#### Source - -[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) - -Line 158. - -*** - -### get\_object - -#### Signature - -```rust -fn get_object(&self, key: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) - -Line 174. - -*** - -### get\_str - -#### Signature - -```rust -fn get_str(&self, key: &str) -> ?<&str> -``` - -#### Parameters - - - -#### Returns - -`?<&str>` - -#### Source - -[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) - -Line 139. - -*** - -### get\_str\_or - -#### Signature - -```rust -fn get_str_or(&self, key: &str, default: &str) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) - -Line 143. - -*** - -### new - -#### Signature - -```rust -fn new(params: ?) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) - -Line 131. - -## Source - -[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) - -Line 126. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/skill-manager/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/skill-manager/index.mdx deleted file mode 100644 index 25de3e80e7..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/skills/skill-manager/index.mdx +++ /dev/null @@ -1,30 +0,0 @@ ---- -slug: "/reference/rust/signalwire/skills/skill-manager" -title: "skill_manager" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "signalwire::skills::skill_manager" - parent: "signalwire::skills" - module: "skills" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_manager.rs" - visibility: "public" ---- -# `skill_manager` - -## Classes - - - - Manages loaded skills for an agent — validates, sets up, and merges skill contributions (tools, hints, global data, prompt sections) into the agent. - - - -## Source - -[`src/skills/skill_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_manager.rs) - -Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/skill-manager/skill-manager/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/skill-manager/skill-manager/index.mdx deleted file mode 100644 index 22baed096d..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/skills/skill-manager/skill-manager/index.mdx +++ /dev/null @@ -1,244 +0,0 @@ ---- -slug: "/reference/rust/signalwire/skills/skill-manager/skill-manager" -title: "SkillManager" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::skills::skill_manager::SkillManager" - parent: "signalwire::skills::skill_manager" - module: "skills.skill_manager" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_manager.rs" - visibility: "public" ---- -# `SkillManager` - -Manages loaded skills for an agent — validates, sets up, and merges skill -contributions (tools, hints, global data, prompt sections) into the agent. - -## Signature - -```rust -struct SkillManager { /* fields */ } -``` - -## Inheritance - -**Implements:** `Default` - -## Methods - -### default - -#### Signature - -```rust -fn default() -> Self -``` - -#### Returns - -`Self` - -#### Source - -[`src/skills/skill_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_manager.rs) - -Line 207. - -*** - -### get\_skill - -Get a reference to a loaded skill. - -#### Signature - -```rust -fn get_skill(&self, key: &str) -> ?> -``` - -#### Parameters - - - -#### Returns - -`?>` - -#### Source - -[`src/skills/skill_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_manager.rs) - -Line 201. - -*** - -### has\_skill - -Check if a skill is loaded. - -#### Signature - -```rust -fn has_skill(&self, key: &str) -> bool -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/skills/skill_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_manager.rs) - -Line 196. - -*** - -### list\_skills - -List all loaded skill instance keys. - -#### Signature - -```rust -fn list_skills(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/skills/skill_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_manager.rs) - -Line 189. - -*** - -### load\_skill - -Load a skill by registry name, creating it via the registry factory. - -Returns `(true, "")` on success, or `(false, reason)` on failure. - -#### Signature - -```rust -fn load_skill( - &mut self, - skill_name: &str, - params: ?, - agent: &mut ? -) -> (bool, ?) -``` - -#### Parameters - - - - - - - -#### Returns - -`(bool, ?)` - -#### Source - -[`src/skills/skill_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_manager.rs) - -Line 26. - -*** - -### load\_skill\_instance - -Load a skill from a pre-constructed instance. - -#### Signature - -```rust -fn load_skill_instance( - &mut self, - instance: ?, - agent: &mut ? -) -> (bool, ?) -``` - -#### Parameters - - - - - -#### Returns - -`(bool, ?)` - -#### Source - -[`src/skills/skill_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_manager.rs) - -Line 113. - -*** - -### new - -#### Signature - -```rust -fn new() -> Self -``` - -#### Returns - -`Self` - -#### Source - -[`src/skills/skill_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_manager.rs) - -Line 17. - -*** - -### unload\_skill - -Unload a skill by instance key. - -#### Signature - -```rust -fn unload_skill(&mut self, key: &str) -> bool -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/skills/skill_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_manager.rs) - -Line 184. - -## Source - -[`src/skills/skill_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_manager.rs) - -Line 12. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/skill-name/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/skill-name/index.mdx deleted file mode 100644 index 76713fb2a0..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/skills/skill-name/index.mdx +++ /dev/null @@ -1,516 +0,0 @@ ---- -slug: "/reference/rust/signalwire/skills/skill-name" -title: "skill_name" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "signalwire::skills::skill_name" - parent: "signalwire::skills" - module: "skills" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs" - visibility: "public" ---- -# `skill_name` - -Built-in skill names as a typed, compile-time-checked closed set. - -Skill names are an open _string_ set in the Python reference (`add_skill` -takes a bare `str`), which keeps parity and lets callers load custom / -third-party skills. The downside is that a typo — `add_skill("datetiem")` -— compiles fine and only fails later at the server. \[`SkillName`] gives the -18 built-in skills a typed alternative so the typo fails at the **call -site** with editor autocompletion, while the string path stays available -for parity and custom skills. - -`AgentBase::add_skill`, -`remove_skill` and -`has_skill` keep their `&str` -parameter (parity with Python's `str`); \[`SkillName`] plugs into them via -\[`SkillName::as_str`] / \[`AsRef`], so the wire behaviour is identical: - -```no_run -use signalwire::agent::{AgentBase, AgentOptions}; -use signalwire::skills::SkillName; -use serde_json::json; - -let mut agent = AgentBase::new(AgentOptions::new("demo")); -agent.add_skill(SkillName::Datetime.as_str(), json!({})); // typed, autocompleted -agent.add_skill("datetime", json!({})); // string still works (parity) -agent.add_skill("my_custom_skill", json!({})); // open set: custom skills ok -assert!(agent.has_skill(SkillName::Datetime.as_str())); -``` - -## Examples - -```rust -use signalwire::agent::{AgentBase, AgentOptions}; -use signalwire::skills::SkillName; -use serde_json::json; - -let mut agent = AgentBase::new(AgentOptions::new("demo")); -agent.add_skill(SkillName::Datetime.as_str(), json!({})); // typed, autocompleted -agent.add_skill("datetime", json!({})); // string still works (parity) -agent.add_skill("my_custom_skill", json!({})); // open set: custom skills ok -assert!(agent.has_skill(SkillName::Datetime.as_str())); -``` - -## Classes - - - - Error returned when a string is parsed into \[`SkillName`] (via \[`FromStr`]) but does not name one of the built-in skills. - - - -## Enums - -### SkillName - -The closed set of skill names that ship built in with this SDK. - -Each variant maps to the canonical snake\_case wire name returned by -\[`SkillName::as_str`] — the same string the [`SkillRegistry`] is keyed by -and that a skill reports from `SkillBase::name`. - -[`SkillRegistry`]: crate::skills::SkillRegistry - -#### Signature - -```rust -enum SkillName -``` - -#### Inheritance - -**Implements:** `Debug`, `Clone`, `Copy`, `PartialEq`, `Eq`, `Hash`, `PartialOrd`, `Ord`, `Display`, `AsRef`, `FromStr`, `From` - -#### Variants - - - `api_ninjas_trivia` - - - - `claude_skills` - - - - `custom_skills` - - - - `datasphere` - - - - `datasphere_serverless` - - - - `datetime` - - - - `google_maps` - - - - `info_gatherer` - - - - `joke` - - - - `math` - - - - `mcp_gateway` - - - - `native_vector_search` - - - - `play_background_file` - - - - `spider` - - - - `swml_transfer` - - - - `weather_api` - - - - `web_search` - - - - `wikipedia_search` - - -#### Methods - -##### all - -Every built-in \[`SkillName`], in declaration order. Useful for -exhaustive iteration (e.g. listing or registering all built-ins). - -###### Signature - -```rust -fn all() -> &'static [?] -``` - -###### Returns - -`&'static [?]` - -###### Source - -[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) - -Line 139. - -*** - -##### as\_ref - -###### Signature - -```rust -fn as_ref(&self) -> &str -``` - -###### Returns - -`&str` - -###### Source - -[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) - -Line 176. - -*** - -##### as\_str - -The canonical snake\_case wire name for this skill (e.g. `"datetime"`). - -This is exactly the string the bare-`str` API expects, so -`agent.add_skill(SkillName::Datetime.as_str(), params)` loads the same -skill as `agent.add_skill("datetime", params)`. - -###### Signature - -```rust -fn as_str(&self) -> &'static str -``` - -###### Returns - -`&'static str` - -###### Source - -[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) - -Line 114. - -*** - -##### clone - -###### Signature - -```rust -fn clone(&self) -> ? -``` - -###### Returns - -`?` - -###### Source - -[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) - -Line 67. - -*** - -##### cmp - -###### Signature - -```rust -fn cmp(&self, other: &?) -> ? -``` - -###### Parameters - - - -###### Returns - -`?` - -###### Source - -[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) - -Line 67. - -*** - -##### eq - -###### Signature - -```rust -fn eq(&self, other: &?) -> bool -``` - -###### Parameters - - - -###### Returns - -`bool` - -###### Source - -[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) - -Line 67. - -*** - -##### fmt - -###### Signature - -```rust -fn fmt(&self, f: &mut ?<'_>) -> ? -``` - -###### Parameters - - - -###### Returns - -`?` - -###### Source - -[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) - -Line 67. - -*** - -##### fmt - -###### Signature - -```rust -fn fmt(&self, f: &mut ?<'_>) -> ? -``` - -###### Parameters - - - -###### Returns - -`?` - -###### Source - -[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) - -Line 170. - -*** - -##### from - -###### Signature - -```rust -fn from(s: ?) -> ? -``` - -###### Parameters - - - -###### Returns - -`?` - -###### Source - -[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) - -Line 200. - -*** - -##### from - -###### Signature - -```rust -fn from(s: ?) -> &'static str -``` - -###### Parameters - - - -###### Returns - -`&'static str` - -###### Source - -[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) - -Line 206. - -*** - -##### from\_str - -Parse a wire name back into a \[`SkillName`], or `None` if the string is -not a built-in (i.e. a custom / third-party skill name). - -###### Signature - -```rust -fn from_str(name: &str) -> ? -``` - -###### Parameters - - - -###### Returns - -`?` - -###### Source - -[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) - -Line 164. - -*** - -##### from\_str - -###### Signature - -```rust -fn from_str(s: &str) -> ?::Err> -``` - -###### Parameters - - - -###### Returns - -`?::Err>` - -###### Source - -[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) - -Line 188. - -*** - -##### hash - -###### Signature - -```rust -fn hash<__H: ?>(&self, state: &mut __H) -``` - -###### Type Parameters - - - -###### Parameters - - - -###### Source - -[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) - -Line 67. - -*** - -##### partial\_cmp - -###### Signature - -```rust -fn partial_cmp(&self, other: &?) -> ? -``` - -###### Parameters - - - -###### Returns - -`?` - -###### Source - -[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) - -Line 67. - -#### Type Aliases - -##### Err - -###### Source - -[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) - -Line 186. - -#### Source - -[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) - -Line 69. - -## Source - -[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) - -Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/skill-name/parse-skill-name-error/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/skill-name/parse-skill-name-error/index.mdx deleted file mode 100644 index 4eff69353b..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/skills/skill-name/parse-skill-name-error/index.mdx +++ /dev/null @@ -1,155 +0,0 @@ ---- -slug: "/reference/rust/signalwire/skills/skill-name/parse-skill-name-error" -title: "ParseSkillNameError" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::skills::skill_name::ParseSkillNameError" - parent: "signalwire::skills::skill_name" - module: "skills.skill_name" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs" - visibility: "public" ---- -# `ParseSkillNameError` - -Error returned when a string is parsed into \[`SkillName`] (via \[`FromStr`]) -but does not name one of the built-in skills. - -Unlike the SWAIG media enums, the skill-name set is _open_ (custom skills -are valid), so most callers want the inherent \[`SkillName::from_str`] which -returns `None` for a custom name. The \[`FromStr`] impl exists for the -idiomatic `"datetime".parse::()` and reports the offending input -when it is not a built-in. - -## Signature - -```rust -struct ParseSkillNameError { /* fields */ } -``` - -## Inheritance - -**Implements:** `Debug`, `Clone`, `PartialEq`, `Eq`, `Display`, [Error](/docs/sdk-reference/reference/rust/signalwire/security/webhook-layer/webhook-validate#error) - -## Methods - -### clone - -#### Signature - -```rust -fn clone(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) - -Line 40. - -*** - -### eq - -#### Signature - -```rust -fn eq(&self, other: &?) -> bool -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) - -Line 40. - -*** - -### fmt - -#### Signature - -```rust -fn fmt(&self, f: &mut ?<'_>) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) - -Line 40. - -*** - -### fmt - -#### Signature - -```rust -fn fmt(&self, f: &mut ?<'_>) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) - -Line 53. - -*** - -### input - -The string that failed to parse as a built-in skill name. - -#### Signature - -```rust -fn input(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) - -Line 47. - -## Source - -[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) - -Line 41. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/skill-registry/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/skill-registry/index.mdx deleted file mode 100644 index 37319a1db8..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/skills/skill-registry/index.mdx +++ /dev/null @@ -1,48 +0,0 @@ ---- -slug: "/reference/rust/signalwire/skills/skill-registry" -title: "skill_registry" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "signalwire::skills::skill_registry" - parent: "signalwire::skills" - module: "skills" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_registry.rs" - visibility: "public" ---- -# `skill_registry` - -## Classes - - - - Public interface to the global skill registry. - - - -## Type Aliases - -### SkillFactory - -Factory function that creates a new skill instance given parameters. - -#### Signature - -```rust -type SkillFactory = ? -``` - -#### Source - -[`src/skills/skill_registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_registry.rs) - -Line 11. - -## Source - -[`src/skills/skill_registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_registry.rs) - -Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/skills/skill-registry/skill-registry/index.mdx b/fern/products/sdk-reference/rust/signalwire/skills/skill-registry/skill-registry/index.mdx deleted file mode 100644 index c86d1b931b..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/skills/skill-registry/skill-registry/index.mdx +++ /dev/null @@ -1,166 +0,0 @@ ---- -slug: "/reference/rust/signalwire/skills/skill-registry/skill-registry" -title: "SkillRegistry" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::skills::skill_registry::SkillRegistry" - parent: "signalwire::skills::skill_registry" - module: "skills.skill_registry" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_registry.rs" - visibility: "public" ---- -# `SkillRegistry` - -Public interface to the global skill registry. - -## Signature - -```rust -struct SkillRegistry; -``` - -## Methods - -### add\_skill\_directory - -Register an external directory containing third-party skill -factories. - -Mirrors Python's -`signalwire.skills.registry.SkillRegistry.add_skill_directory`. -Rust cannot dynamically load `.rs` files the way Python loads -`.py` modules from a directory; in Rust, third-party skills -must call \[`SkillRegistry::register_skill`] at startup. The -path is recorded for introspection / logging purposes (matching -the Python `_external_paths` field) so the surface contract -matches. - -**Errors:** - -Returns an error string if the directory does not exist or is -not a directory. - -#### Signature - -```rust -fn add_skill_directory(path: &str) -> ?<(), ?> -``` - -#### Parameters - - - -#### Returns - -`?<(), ?>` - -#### Source - -[`src/skills/skill_registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_registry.rs) - -Line 172. - -*** - -### external\_paths - -Read the list of external skill directories registered via -\[`SkillRegistry::add_skill_directory`]. - -#### Signature - -```rust -fn external_paths() -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/skills/skill_registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_registry.rs) - -Line 190. - -*** - -### get\_factory - -Get the factory for a skill by name. - -#### Signature - -```rust -fn get_factory(name: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/skills/skill_registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_registry.rs) - -Line 130. - -*** - -### list\_skills - -List all registered skill names (sorted). - -#### Signature - -```rust -fn list_skills() -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/skills/skill_registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_registry.rs) - -Line 150. - -*** - -### register\_skill - -Register a custom skill factory. - -#### Signature - -```rust -fn register_skill(name: &str, factory: ?) -``` - -#### Parameters - - - - - -#### Source - -[`src/skills/skill_registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_registry.rs) - -Line 124. - -## Source - -[`src/skills/skill_registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_registry.rs) - -Line 120. diff --git a/fern/products/sdk-reference/rust/signalwire/swaig/function-result/function-result/index.mdx b/fern/products/sdk-reference/rust/signalwire/swaig/function-result/function-result/index.mdx deleted file mode 100644 index 0756b2d24b..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/swaig/function-result/function-result/index.mdx +++ /dev/null @@ -1,1899 +0,0 @@ ---- -slug: "/reference/rust/signalwire/swaig/function-result/function-result" -title: "FunctionResult" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::swaig::function_result::FunctionResult" - parent: "signalwire::swaig::function_result" - module: "swaig.function_result" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs" - visibility: "public" ---- -# `FunctionResult` - -Result returned from a SWAIG function handler. - -Serialises to match the Python reference's `to_dict()`: `response` is omitted when empty, -`action` when empty, and `post_process` unless there are actions; an otherwise-empty result -defaults to `{"response": "Action completed."}`. - -**Decorators:** `@must_use` - -## Signature - -```rust -struct FunctionResult { /* fields */ } -``` - -## Inheritance - -**Implements:** `Debug`, `Clone`, `Default` - -## Methods - -### add\_action - -#### Signature - -```rust -fn add_action(&mut self, action: ?) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 133. - -*** - -### add\_actions - -#### Signature - -```rust -fn add_actions(&mut self, actions: ?) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 138. - -*** - -### add\_dynamic\_hints - -#### Signature - -```rust -fn add_dynamic_hints(&mut self, hints: ?) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 552. - -*** - -### clear\_dynamic\_hints - -Clear all dynamic speech-recognition hints. - -Mirrors the Python reference (`FunctionResult.clear_dynamic_hints`), -which appends `{"clear_dynamic_hints": {}}` — the value is an **empty -object**, not a boolean. (`json!({})` serialises to `{}`.) - -#### Signature - -```rust -fn clear_dynamic_hints(&mut self) -> &mut Self -``` - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 562. - -*** - -### clone - -#### Signature - -```rust -fn clone(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 96. - -*** - -### connect - -#### Signature - -```rust -fn connect(&mut self, destination: &str, _final: bool, from: &str) -> &mut Self -``` - -#### Parameters - - - - - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 200. - -*** - -### create\_payment\_action - -Create a payment action for use in payment prompts. - -Mirrors the Python reference (`FunctionResult.create_payment_action`): -`{"type": action_type, "phrase": phrase}` (`action_type` is `"Say"` for -text-to-speech or `"Play"` for an audio file). - -#### Signature - -```rust -fn create_payment_action(action_type: &str, phrase: &str) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 1225. - -*** - -### create\_payment\_parameter - -Create a payment parameter (name/value pair) for use with `pay`. - -Mirrors the Python reference (`FunctionResult.create_payment_parameter`): -`{"name": name, "value": value}`. - -#### Signature - -```rust -fn create_payment_parameter(name: &str, value: &str) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 1236. - -*** - -### create\_payment\_prompt - -Create a payment-prompt structure for use with `pay`. - -Mirrors the Python reference (`FunctionResult.create_payment_prompt`): -`{"for": for_situation, "actions": actions, "card_type"?, "error_type"?}`. -`actions` is the list of `{type, phrase}` action objects (a JSON array). -`card_type`/`error_type` are emitted only when non-empty. - -#### Signature - -```rust -fn create_payment_prompt( - for_situation: &str, - actions: ?, - card_type: &str, - error_type: &str -) -> ? -``` - -#### Parameters - - - - - - - - - -#### Returns - -`?` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 1202. - -*** - -### default - -#### Signature - -```rust -fn default() -> Self -``` - -#### Returns - -`Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 1245. - -*** - -### enable\_extensive\_data - -#### Signature - -```rust -fn enable_extensive_data(&mut self, enabled: bool) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 600. - -*** - -### enable\_functions\_on\_timeout - -Python: add\_action("functions\_on\_speaker\_timeout", enabled). - -#### Signature - -```rust -fn enable_functions_on_timeout(&mut self, enabled: bool) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 594. - -*** - -### execute\_rpc - -Execute an RPC method on a call (SWML `execute_rpc`). - -Mirrors the Python reference (`FunctionResult.execute_rpc`): the rpc -params are keyed `{method, call_id?, node_id?, params?}` where -`call_id` and `node_id` are **TOP-LEVEL siblings** of `method`/`params` -(NOT nested inside `params`), and the whole `{"execute_rpc": ...}` verb -is wrapped in a canonical SWML document via `execute_swml` — never a -bare action key. There is **no** `jsonrpc` envelope (the previous port -invented one — removed) and method strings are **bare** (`"dial"`, not -`"calling.dial"`). `call_id`/`node_id` are emitted only when non-empty; -`params` is emitted only when it is a non-empty value (Python's -`if params:` — an empty object/null is dropped). - -#### Signature - -```rust -fn execute_rpc( - &mut self, - method: &str, - params: ?, - call_id: &str, - node_id: &str -) -> &mut Self -``` - -#### Parameters - - - - - - - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 1110. - -*** - -### execute\_swml - -Execute SWML content, optionally marking the call to exit the agent -afterward (`transfer = true`). - -Mirrors the Python reference (`FunctionResult.execute_swml`): the action -key is **always** `"SWML"`; when `transfer` is set, a `"transfer": "true"` -flag is added **inside** the SWML dict (it is not a separate action key). - -Input normalisation matches Python: - -- A JSON **string** is parsed to a dict so the transfer flag can be added; - if it is not valid JSON it falls back to `{"raw_swml": ""}`. -- A JSON **object** is used as-is (a copy, so the transfer flag does not - mutate the caller's value). -- Any other JSON scalar/array is wrapped as `{"raw_swml": }`, - the same fallback Python uses for a non-dict, non-string `swml_content`. - -#### Signature - -```rust -fn execute_swml(&mut self, swml_content: ?, transfer: bool) -> &mut Self -``` - -#### Parameters - - - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 627. - -*** - -### fmt - -#### Signature - -```rust -fn fmt(&self, f: &mut ?<'_>) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 96. - -*** - -### hangup - -#### Signature - -```rust -fn hangup(&mut self) -> &mut Self -``` - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 252. - -*** - -### hold - -#### Signature - -```rust -fn hold(&mut self, timeout: i64) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 258. - -*** - -### join\_conference - -Join an ad-hoc audio conference (SWML `join_conference`). - -Mirrors the Python reference -(`FunctionResult.join_conference`) — `name` is required and the -remaining 18 parameters are optional with the reference's defaults. -`wait_url` carries the hold-music URL (Python has no `hold_audio` -parameter; this port previously invented one — it is removed). - -The seven closed-set / range validations from the reference are -reproduced and return `Err(message)` with the reference's exact -`ValueError` text (Rust's idiomatic recoverable-validation channel — -the `Err` type is out-of-band to the cross-language audit, which -unwraps `Result` to `T`): - -- `beep` ∈ `{true, false, onEnter, onExit}` -- `0 < max_participants <= 250` -- `record` ∈ `{do-not-record, record-from-start}` -- `trim` ∈ `{trim-silence, do-not-trim}` -- `status_callback_method` ∈ `{GET, POST}` -- `recording_status_callback_method` ∈ `{GET, POST}` -- `name` (trimmed) must not be empty - -When every parameter is left at its default the `join_conference` value -is the bare conference name string; otherwise it is a `{"name": ...}` -object carrying every non-default parameter under its snake\_case wire -key. Either way the verb is wrapped in the canonical SWML document -(`{"SWML": {version, sections: {main: [{join_conference: ...}]}}}`), -matching the reference (which routes join\_conference through -`execute_swml`) — never a bare verb. - -#### Signature - -```rust -fn join_conference( - &mut self, - name: &str, - muted: bool, - beep: &str, - start_on_enter: bool, - end_on_exit: bool, - wait_url: ?<&str>, - max_participants: i64, - record: &str, - region: ?<&str>, - trim: &str, - coach: ?<&str>, - status_callback_event: ?<&str>, - status_callback: ?<&str>, - status_callback_method: &str, - recording_status_callback: ?<&str>, - recording_status_callback_method: &str, - recording_status_callback_event: &str, - result: ? -) -> ?<&mut Self, ?> -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -#### Returns - -`?<&mut Self, ?>` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 695. - -*** - -### join\_room - -Join a RELAY room (SWML `join_room`). Wrapped in a SWML document, -matching the Python reference. - -#### Signature - -```rust -fn join_room(&mut self, name: &str) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 852. - -*** - -### new - -#### Signature - -```rust -fn new() -> Self -``` - -#### Returns - -`Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 105. - -*** - -### pay - -Process a payment (SWML `pay`). - -Mirrors the Python reference (`FunctionResult.pay`) exactly, including its -wire-key choices and value rendering: - -- the verb is wrapped in a SWML document whose `main` section is - `[{set: {ai_response}}, {pay: pay_params}]` — never a bare verb; -- the input-method key is **`input`** (not `input_method`); -- the status-callback key is **`status_url`** (the previous port invented - `action_url` — removed); -- `timeout`, `max_attempts`, `min_postal_code_length` are **stringified**; - `security_code` is rendered lower-case (`"true"`/`"false"`); -- `payment_method`, `token_type`, `currency`, `language`, `voice`, - `valid_card_types`, and `postal_code` are always emitted; `status_url`, - `charge_amount`, `description`, `parameters`, and `prompts` are emitted - only when supplied. - -`postal_code` is taken as the already-rendered wire string (pass -`"true"`/`"false"` for the boolean cases, or the literal postcode), -mirroring the reference's `Union[bool, str]`. `parameters`/`prompts` are -JSON arrays (`Value::Null` to omit). An empty `ai_response` uses the -reference's default status message. - -#### Signature - -```rust -fn pay( - &mut self, - payment_connector_url: &str, - input_method: &str, - status_url: &str, - payment_method: &str, - timeout: i64, - max_attempts: i64, - security_code: bool, - postal_code: &str, - min_postal_code_length: i64, - token_type: &str, - charge_amount: &str, - currency: &str, - language: &str, - voice: &str, - description: &str, - valid_card_types: &str, - parameters: ?, - prompts: ?, - ai_response: &str -) -> &mut Self -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 1011. - -*** - -### play\_background\_file - -Play an audio/video file in the background. - -Mirrors the Python reference (`FunctionResult.play_background_file`): the -action key is `"playback_bg"`. With `wait = true` the value is -`{"file": filename, "wait": true}` (suppress attention-getting behaviour); -otherwise it is the bare filename string. - -#### Signature - -```rust -fn play_background_file(&mut self, filename: &str, wait: bool) -> &mut Self -``` - -#### Parameters - - - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 439. - -*** - -### record\_call - -Start background call recording (SWML `record_call`). - -Mirrors the Python reference (`FunctionResult.record_call`): the verb is -wrapped in a SWML document (`{"SWML": {version, sections: {main: [{record_call: params}]}}}`) — never a bare verb — and the reference's -two closed-set validations are reproduced, returning `Err(message)` with -the exact reference `ValueError` text: - -- `format` ∈ `{wav, mp3, mp4}` -- `direction` ∈ `{speak, listen, both}` - -`stereo`, `format`, `direction`, `beep`, and `input_sensitivity` are -**always** emitted (matching the reference, which seeds `record_params` -with all five); `control_id`, `terminators`, `initial_timeout`, -`end_silence_timeout`, `max_length`, and `status_url` are emitted only -when supplied. There is no `initiator` field — the previous port invented -it; it is removed. - -#### Signature - -```rust -fn record_call>: ?>, impl Into>: ?>>( - &mut self, - control_id: &str, - stereo: bool, - format: impl ?>, - direction: impl ?>, - terminators: &str, - beep: bool, - input_sensitivity: f64, - initial_timeout: ?, - end_silence_timeout: ?, - max_length: ?, - status_url: &str -) -> ?<&mut Self, ?> -``` - -#### Type Parameters - - - - - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - -#### Returns - -`?<&mut Self, ?>` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 473. - -*** - -### remove\_global\_data - -Python: add\_action("unset\_global\_data", keys) — the value is the bare key -(Python's `Union[str, List[str]]`, passed through verbatim): a single key -emits the **bare string** (`"plan"`), a list emits the **array** -(`["plan", "chips"]`); no `{"keys": ...}` wrapper. Accepts both call -styles via `impl Into` (`"plan"` or `vec!["plan", "chips"]`). - -#### Signature - -```rust -fn remove_global_data: ?>( - &mut self, - keys: impl ? -) -> &mut Self -``` - -#### Type Parameters - - - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 307. - -*** - -### remove\_metadata - -Python: add\_action("unset\_meta\_data", keys) — the value is the bare key -(Python's `Union[str, List[str]]`, passed through verbatim): a single key -emits the **bare string** (`"token"`), a list emits the **array** -(`["token", "count"]`); no `{"keys": ...}` wrapper. Accepts both call -styles via `impl Into`. - -#### Signature - -```rust -fn remove_metadata: ?>( - &mut self, - keys: impl ? -) -> &mut Self -``` - -#### Type Parameters - - - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 323. - -*** - -### replace\_in\_history - -After first send, replace the tool\_call+result pair in conversation -history. - -Mirrors the Python reference (`FunctionResult.replace_in_history`, whose -`text` parameter is `Union[str, bool] = True`): the action key is -`"replace_in_history"`. `Some(t)` replaces the tool call with an assistant -message containing `t`; `None` uses the default `true`, which removes the -tool\_call+result pair from history entirely. - -#### Signature - -```rust -fn replace_in_history(&mut self, text: ?<&str>) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 418. - -*** - -### rpc\_ai\_message - -Inject a message into an AI agent on another call (via `execute_rpc`). - -Mirrors the Python reference (`FunctionResult.rpc_ai_message`): method -`"ai_message"`, `call_id` carried as the TOP-LEVEL execute\_rpc sibling, -params `{role, message_text}`. `role` defaults to `"system"` and is -caller-overridable (the previous port omitted `role` and mis-nested -`call_id` — fixed). - -#### Signature - -```rust -fn rpc_ai_message( - &mut self, - call_id: &str, - message_text: &str, - role: &str -) -> &mut Self -``` - -#### Parameters - - - - - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 1167. - -*** - -### rpc\_ai\_unhold - -Unhold another call (via `execute_rpc`). - -Mirrors the Python reference (`FunctionResult.rpc_ai_unhold`): method -`"ai_unhold"`, `call_id` as the TOP-LEVEL execute\_rpc sibling, params -`{}` (which `execute_rpc` drops, since it is empty). - -#### Signature - -```rust -fn rpc_ai_unhold(&mut self, call_id: &str) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 1180. - -*** - -### rpc\_dial - -Dial out to a number with a destination SWML URL (via `execute_rpc`). - -Mirrors the Python reference (`FunctionResult.rpc_dial`): method `"dial"`, -params `{devices: {type: device_type, params: {to_number, from_number}}, -dest_swml}`. `device_type` defaults to `"phone"` and is caller-overridable -(the previous port hard-coded the device and invented -`call_timeout`/`region` — removed). - -#### Signature - -```rust -fn rpc_dial( - &mut self, - to_number: &str, - from_number: &str, - dest_swml: &str, - device_type: &str -) -> &mut Self -``` - -#### Parameters - - - - - - - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 1140. - -*** - -### say - -#### Signature - -```rust -fn say(&mut self, text: &str) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 428. - -*** - -### send\_sms - -Send a text message to a PSTN number (SWML `send_sms`). - -Mirrors the Python reference (`FunctionResult.send_sms`): the verb is -wrapped in a SWML document — never a bare verb. The reference's -validation is reproduced, returning `Err` with the exact reference -`ValueError` text when neither `body` nor `media` is provided. `body` is -emitted only when non-empty; `media`, `tags`, and `region` are emitted -only when supplied. - -#### Signature - -```rust -fn send_sms( - &mut self, - to: &str, - from: &str, - body: &str, - media: ?<&str>, - tags: ?<&str>, - region: &str -) -> ?<&mut Self, ?> -``` - -#### Parameters - - - - - - - - - - - - - -#### Returns - -`?<&mut Self, ?>` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 955. - -*** - -### set\_end\_of\_speech\_timeout - -#### Signature - -```rust -fn set_end_of_speech_timeout(&mut self, ms: i64) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 567. - -*** - -### set\_metadata - -#### Signature - -```rust -fn set_metadata(&mut self, data: ?) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 313. - -*** - -### set\_post\_process - -#### Signature - -```rust -fn set_post_process(&mut self, val: bool) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 128. - -*** - -### set\_response - -#### Signature - -```rust -fn set_response(&mut self, text: &str) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 123. - -*** - -### set\_speech\_event\_timeout - -#### Signature - -```rust -fn set_speech_event_timeout(&mut self, ms: i64) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 572. - -*** - -### simulate\_user\_input - -Queue simulated user input. - -Mirrors the Python reference (`FunctionResult.simulate_user_input`): -the action key is **`user_input`** (the previous port emitted -`simulate_user_input`, which is the _method_ name, not the wire key). - -#### Signature - -```rust -fn simulate_user_input(&mut self, text: &str) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 1189. - -*** - -### sip\_refer - -Send a SIP REFER (SWML `sip_refer`). Wrapped in a SWML document, matching -the Python reference. - -#### Signature - -```rust -fn sip_refer(&mut self, to_uri: &str) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 859. - -*** - -### stop - -#### Signature - -```rust -fn stop(&mut self) -> &mut Self -``` - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 290. - -*** - -### stop\_background\_file - -Python: add\_action("stop\_playback\_bg", True). - -#### Signature - -```rust -fn stop_background_file(&mut self) -> &mut Self -``` - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 450. - -*** - -### stop\_record\_call - -Stop an active background recording (SWML `stop_record_call`). - -Mirrors the Python reference: the verb is wrapped in a SWML document. The -params are `{"control_id": ...}` when supplied, else `{}` (most-recent). - -#### Signature - -```rust -fn stop_record_call(&mut self, control_id: &str) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 540. - -*** - -### stop\_tap - -Stop an active tap stream (SWML `stop_tap`). Wrapped in a SWML document, -matching the Python reference. - -#### Signature - -```rust -fn stop_tap(&mut self, control_id: &str) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 937. - -*** - -### switch\_context - -Change the agent context/prompt during the conversation. - -Mirrors the Python reference (`FunctionResult.switch_context`): when only -`system_prompt` is supplied (no `user_prompt`/`consolidate`/`full_reset`, -and — for this port's documented `isolated` extension — no `isolated`), -the action value is the **bare system-prompt string** -(`{"context_switch": ""}`). Otherwise it is the object form -carrying every set field. - -#### Signature - -```rust -fn switch_context( - &mut self, - system_prompt: &str, - user_prompt: &str, - consolidate: bool, - full_reset: bool, - isolated: bool -) -> &mut Self -``` - -#### Parameters - - - - - - - - - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 369. - -*** - -### swml\_change\_context - -Python: add\_action("change\_context", context\_name) — the value is the -bare context name string (not a `context_switch` dict). - -#### Signature - -```rust -fn swml_change_context(&mut self, context_name: &str) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 356. - -*** - -### swml\_change\_step - -Python: add\_action("change\_step", step\_name) — the value is the bare step -name string (not a `context_switch` dict). - -#### Signature - -```rust -fn swml_change_step(&mut self, step_name: &str) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 349. - -*** - -### swml\_transfer - -Add a SWML transfer action with an AI response set up for when the -transfer completes and control returns to the agent. - -Mirrors the Python reference (`FunctionResult.swml_transfer`): emits a -SWML document whose `main` section is `[{set: {ai_response}}, {transfer: -{dest}}]`, with a top-level `"transfer": str(final).lower()` flag marking -whether the transfer is permanent (`final = true`, the default) or -temporary. `ai_response` is carried inside the SWML `set` verb (it is NOT -assigned to `self.response`). - -#### Signature - -```rust -fn swml_transfer( - &mut self, - dest: &str, - ai_response: &str, - _final: bool -) -> &mut Self -``` - -#### Parameters - - - - - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 233. - -*** - -### swml\_user\_event - -Send a user event through SWML to update the client UI. - -Mirrors the Python reference (`FunctionResult.swml_user_event`): emits a -`"SWML"` action whose `main` section nests the event payload under -`{"user_event": {"event": event_data}}`. - -#### Signature - -```rust -fn swml_user_event(&mut self, event_data: ?) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 334. - -*** - -### tap - -Start a background call tap (SWML `tap`). - -Mirrors the Python reference (`FunctionResult.tap`): the verb is wrapped -in a SWML document — never a bare verb — and the reference's three -validations are reproduced, returning `Err(message)` with the exact -reference `ValueError` text: - -- `direction` ∈ `{speak, hear, both}` -- `codec` ∈ `{PCMU, PCMA}` -- `rtp_ptime > 0` - -Only `uri` is always emitted; `control_id`, `direction`, `codec`, -`rtp_ptime`, and `status_url` are emitted only when they differ from the -reference defaults (`direction="both"`, `codec="PCMU"`, `rtp_ptime=20`). - -#### Signature - -```rust -fn tap>: ?>, impl Into>: ?>>( - &mut self, - uri: &str, - control_id: &str, - direction: impl ?>, - codec: impl ?>, - rtp_ptime: i64, - status_url: &str -) -> ?<&mut Self, ?> -``` - -#### Type Parameters - - - - - -#### Parameters - - - - - - - - - - - - - -#### Returns - -`?<&mut Self, ?>` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 878. - -*** - -### to\_json - -Compact JSON string. - -#### Signature - -```rust -fn to_json(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 178. - -*** - -### to\_value - -Serialise to a JSON value. - -- `response` is always included. -- `action` is only included if at least one action exists. -- `post_process` is only included if `true`. - -#### Signature - -```rust -fn to_value(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 150. - -*** - -### toggle\_functions - -Enable/disable specific SWAIG functions. - -Mirrors the Python reference (`FunctionResult.toggle_functions`), which -takes a `List[Dict[str, Any]]` (each dict carries `function` + `active`, -plus any further keys) and passes it through verbatim via -`add_action("toggle_functions", function_toggles)`. The action value is -therefore the **ordered list as-is** — order is preserved and arbitrary -keys/values survive. A `HashMap` cannot express this (it -drops ordering and forbids extra keys / non-bool values), so the -parameter is the bare `Vec` list, exactly like `add_dynamic_hints`. - -#### Signature - -```rust -fn toggle_functions(&mut self, function_toggles: ?) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 587. - -*** - -### update\_global\_data - -#### Signature - -```rust -fn update_global_data(&mut self, data: ?) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 297. - -*** - -### update\_settings - -Python: add\_action("settings", settings). - -#### Signature - -```rust -fn update_settings(&mut self, settings: ?) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 606. - -*** - -### wait\_for\_user - -Control how the agent waits for user input. - -Mirrors the Python reference (`FunctionResult.wait_for_user`): the action -value is a **scalar**, chosen by the same precedence — -`answer_first` (the string `"answer_first"`) > `timeout` (bare int) > -`enabled` (bare bool) > the default bare bool `true`. - -#### Signature - -```rust -fn wait_for_user( - &mut self, - enabled: ?, - timeout: ?, - answer_first: ? -) -> &mut Self -``` - -#### Parameters - - - - - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 271. - -*** - -### with\_response - -#### Signature - -```rust -fn with_response(response: &str) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 113. - -## Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 98. diff --git a/fern/products/sdk-reference/rust/signalwire/swaig/function-result/index.mdx b/fern/products/sdk-reference/rust/signalwire/swaig/function-result/index.mdx deleted file mode 100644 index 5bb0b32316..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/swaig/function-result/index.mdx +++ /dev/null @@ -1,330 +0,0 @@ ---- -slug: "/reference/rust/signalwire/swaig/function-result" -title: "function_result" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "signalwire::swaig::function_result" - parent: "signalwire::swaig" - module: "swaig" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs" - visibility: "public" ---- -# `function_result` - -## Classes - - - - Result returned from a SWAIG function handler. - - - -## Enums - -### KeysArg - -A `Union[str, List[str]]` key argument for \[`FunctionResult::remove_global_data`] -and \[`FunctionResult::remove_metadata`]. - -The Python reference accepts **either** a single key string **or** a list of -keys and passes the value through _verbatim_ — so a `str` emits a **bare -string** (`{"unset_global_data": "plan"}`) and a `list` emits a **list** -(`{"unset_global_data": ["plan", "chips"]}`). A bare `Vec<&str>` parameter -cannot express the single-key bare-string form (it always wraps in a list), -which is a real emission divergence. This enum restores parity: both call -styles compile (`impl Into`), and `into_value` -yields the exact Python wire shape per arm. - -``` -use signalwire::swaig::FunctionResult; -let mut fr = FunctionResult::new(); -fr.remove_global_data("plan"); // -> {"unset_global_data": "plan"} -let mut fr2 = FunctionResult::new(); -fr2.remove_global_data(vec!["plan", "chips"]); // -> {"unset_global_data": ["plan","chips"]} -``` - -[`FunctionResult::remove_global_data`]: crate::swaig::FunctionResult::remove_global_data - -[`FunctionResult::remove_metadata`]: crate::swaig::FunctionResult::remove_metadata - -#### Signature - -```rust -enum KeysArg -``` - -#### Inheritance - -**Implements:** `Debug`, `Clone`, `PartialEq`, `Eq`, `From` - -#### Variants - - - A list of keys — emits the key array (Python's `List[str]` arm). - - - - A single key — emits the bare key string (Python's `str` arm). - - -#### Methods - -##### clone - -###### Signature - -```rust -fn clone(&self) -> ? -``` - -###### Returns - -`?` - -###### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 35. - -*** - -##### eq - -###### Signature - -```rust -fn eq(&self, other: &?) -> bool -``` - -###### Parameters - - - -###### Returns - -`bool` - -###### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 35. - -*** - -##### fmt - -###### Signature - -```rust -fn fmt(&self, f: &mut ?<'_>) -> ? -``` - -###### Parameters - - - -###### Returns - -`?` - -###### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 35. - -*** - -##### from - -###### Signature - -```rust -fn from(s: &str) -> Self -``` - -###### Parameters - - - -###### Returns - -`Self` - -###### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 56. - -*** - -##### from - -###### Signature - -```rust -fn from(s: ?) -> Self -``` - -###### Parameters - - - -###### Returns - -`Self` - -###### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 62. - -*** - -##### from - -###### Signature - -```rust -fn from(s: &?) -> Self -``` - -###### Parameters - - - -###### Returns - -`Self` - -###### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 68. - -*** - -##### from - -###### Signature - -```rust -fn from(v: ?<&str>) -> Self -``` - -###### Parameters - - - -###### Returns - -`Self` - -###### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 74. - -*** - -##### from - -###### Signature - -```rust -fn from(v: ?) -> Self -``` - -###### Parameters - - - -###### Returns - -`Self` - -###### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 80. - -*** - -##### from - -###### Signature - -```rust -fn from(v: &[&str]) -> Self -``` - -###### Parameters - - - -###### Returns - -`Self` - -###### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 86. - -*** - -##### into\_value - -The JSON wire value for this argument: a bare string for `One`, -an array for `Many` — byte-identical to Python's -pass-through of its `Union[str, List[str]]` value. - -###### Signature - -```rust -fn into_value(self) -> ? -``` - -###### Returns - -`?` - -###### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 47. - -#### Examples - -```rust -use signalwire::swaig::FunctionResult; -let mut fr = FunctionResult::new(); -fr.remove_global_data("plan"); // -> {"unset_global_data": "plan"} -let mut fr2 = FunctionResult::new(); -fr2.remove_global_data(vec!["plan", "chips"]); // -> {"unset_global_data": ["plan","chips"]} -``` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 36. - -## Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/swaig/index.mdx b/fern/products/sdk-reference/rust/signalwire/swaig/index.mdx deleted file mode 100644 index 2a91ed654b..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/swaig/index.mdx +++ /dev/null @@ -1,35 +0,0 @@ ---- -slug: "/reference/rust/signalwire/swaig" -title: "swaig" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "signalwire::swaig" - parent: "signalwire" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/mod.rs" - visibility: "public" ---- -# `swaig` - -## Modules - - - - - - Typed, compile-time-checked closed sets for SWML media-action parameters. - - - - Typed builder for SWAIG tool-parameter JSON schemas. - - - -## Source - -[`src/swaig/mod.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/mod.rs) - -Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/swaig/media-enums/index.mdx b/fern/products/sdk-reference/rust/signalwire/swaig/media-enums/index.mdx deleted file mode 100644 index e348bb0b09..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/swaig/media-enums/index.mdx +++ /dev/null @@ -1,1939 +0,0 @@ ---- -slug: "/reference/rust/signalwire/swaig/media-enums" -title: "media_enums" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "signalwire::swaig::media_enums" - parent: "signalwire::swaig" - module: "swaig" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs" - visibility: "public" ---- -# `media_enums` - -Typed, compile-time-checked closed sets for SWML media-action parameters. - -Several `FunctionResult` media helpers take -parameters that the Python reference _validates_ against a fixed set and -rejects with `ValueError` otherwise: - -\| Helper | Parameter | Allowed values (Python reference) | -\|-------------------|-------------|------------------------------------------| -\| `record_call` | `format` | `"wav"`, `"mp3"`, `"mp4"` | -\| `record_call` | `direction` | `"speak"`, `"listen"`, `"both"` | -\| `tap` | `direction` | `"speak"`, `"hear"`, `"both"` | -\| `tap` | `codec` | `"PCMU"`, `"PCMA"` | - -In Python a typo (`record_call(format="ogg")`) only fails at runtime with a -`ValueError`. These enums give the same closed sets a typed alternative so -the typo fails at the **call site** with editor autocompletion and -exhaustive matching. - -The consuming methods take `format: impl Into>` (and -likewise for `direction`/`codec`), so the **same parameter** accepts both -the typed enum _and_ a raw wire string (\[`MediaArg`] wraps the two). The raw -`&str` path stays available for Python parity / forward-compat; an out-of-set -raw value is still rejected in the method body with the reference's exact -`ValueError` text, and the emitted SWML is byte-identical either way: - -```no_run -use signalwire::swaig::FunctionResult; -use signalwire::swaig::{RecordFormat, RecordDirection}; - -let mut fr = FunctionResult::new(); -// typed + autocompleted — identical wire shape to the bare strings below -fr.record_call("rec1", false, RecordFormat::Mp3, RecordDirection::Both, - "", false, 44.0, None, None, None, "").unwrap(); -// bare strings still work (Python parity) -fr.record_call("rec2", false, "mp3", "both", "", false, 44.0, None, None, None, "").unwrap(); -``` - -Note that `record_call`'s direction set (`speak`/`listen`/`both`) and -`tap`'s direction set (`speak`/`hear`/`both`) are **different** — `tap` uses -`hear` where `record_call` uses `listen` — so they are modelled as two -distinct enums, \[`RecordDirection`] and \[`TapDirection`], faithfully -mirroring the reference's two separate validation lists. - -## Examples - -```rust -use signalwire::swaig::FunctionResult; -use signalwire::swaig::{RecordFormat, RecordDirection}; - -let mut fr = FunctionResult::new(); -// typed + autocompleted — identical wire shape to the bare strings below -fr.record_call("rec1", false, RecordFormat::Mp3, RecordDirection::Both, - "", false, 44.0, None, None, None, "").unwrap(); -// bare strings still work (Python parity) -fr.record_call("rec2", false, "mp3", "both", "", false, 44.0, None, None, None, "").unwrap(); -``` - -## Classes - - - - Error returned when a string is parsed into one of the closed-set media enums (via \[`FromStr`]) but is not a recognised wire value. - - - -## Enums - -### Codec - -Media codec for \[`FunctionResult::tap`]. - -Mirrors the Python reference's `valid_codecs = ["PCMU", "PCMA"]` -validation. The wire strings are upper-case (`"PCMU"` / `"PCMA"`). - -[`FunctionResult::tap`]: crate::swaig::FunctionResult::tap - -#### Signature - -```rust -enum Codec -``` - -#### Inheritance - -**Implements:** `Debug`, `Clone`, `Copy`, `PartialEq`, `Eq`, `Hash`, `PartialOrd`, `Ord`, `Display`, `AsRef`, `FromStr`, `From` - -#### Variants - - - `PCMA` (G.711 A-law). - - - - `PCMU` (G.711 µ-law, the reference default). - - -#### Methods - -##### all - -Every \[`Codec`], in declaration order. - -###### Signature - -```rust -fn all() -> &'static [?] -``` - -###### Returns - -`&'static [?]` - -###### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 364. - -*** - -##### as\_ref - -###### Signature - -```rust -fn as_ref(&self) -> &str -``` - -###### Returns - -`&str` - -###### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 383. - -*** - -##### as\_str - -The canonical (upper-case) wire string for this codec (e.g. `"PCMU"`). - -###### Signature - -```rust -fn as_str(&self) -> &'static str -``` - -###### Returns - -`&'static str` - -###### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 356. - -*** - -##### clone - -###### Signature - -```rust -fn clone(&self) -> ? -``` - -###### Returns - -`?` - -###### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 345. - -*** - -##### cmp - -###### Signature - -```rust -fn cmp(&self, other: &?) -> ? -``` - -###### Parameters - - - -###### Returns - -`?` - -###### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 345. - -*** - -##### eq - -###### Signature - -```rust -fn eq(&self, other: &?) -> bool -``` - -###### Parameters - - - -###### Returns - -`bool` - -###### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 345. - -*** - -##### fmt - -###### Signature - -```rust -fn fmt(&self, f: &mut ?<'_>) -> ? -``` - -###### Parameters - - - -###### Returns - -`?` - -###### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 345. - -*** - -##### fmt - -###### Signature - -```rust -fn fmt(&self, f: &mut ?<'_>) -> ? -``` - -###### Parameters - - - -###### Returns - -`?` - -###### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 377. - -*** - -##### from - -###### Signature - -```rust -fn from(v: ?) -> ? -``` - -###### Parameters - - - -###### Returns - -`?` - -###### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 403. - -*** - -##### from - -###### Signature - -```rust -fn from(v: ?) -> &'static str -``` - -###### Parameters - - - -###### Returns - -`&'static str` - -###### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 409. - -*** - -##### from - -###### Signature - -```rust -fn from(e: ?) -> Self -``` - -###### Parameters - - - -###### Returns - -`Self` - -###### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 510. - -*** - -##### from\_str - -Parse a wire string into a \[`Codec`], or `None` if it is not a -recognised codec. Matching is exact (case-sensitive), mirroring the -reference's literal `in ["PCMU", "PCMA"]` check. - -###### Signature - -```rust -fn from_str(s: &str) -> ? -``` - -###### Parameters - - - -###### Returns - -`?` - -###### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 371. - -*** - -##### from\_str - -###### Signature - -```rust -fn from_str(s: &str) -> ?::Err> -``` - -###### Parameters - - - -###### Returns - -`?::Err>` - -###### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 393. - -*** - -##### hash - -###### Signature - -```rust -fn hash<__H: ?>(&self, state: &mut __H) -``` - -###### Type Parameters - - - -###### Parameters - - - -###### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 345. - -*** - -##### partial\_cmp - -###### Signature - -```rust -fn partial_cmp(&self, other: &?) -> ? -``` - -###### Parameters - - - -###### Returns - -`?` - -###### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 345. - -#### Type Aliases - -##### Err - -###### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 391. - -#### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 347. - -*** - -### MediaArg - -The accepted value of a closed-set media-action parameter — _either_ the -typed enum (`RecordFormat::Mp3`) _or_ a raw wire string (`"mp3"`). - -This is the parameter type behind [`FunctionResult::record_call`]'s -`format`/`direction` and [`FunctionResult::tap`]'s `direction`/`codec` -(each method takes `impl Into>`). It exists so a single -parameter can be driven _both_ ways with no overloads: - -```no_run -use signalwire::swaig::FunctionResult; -use signalwire::swaig::RecordFormat; - -let mut fr = FunctionResult::new(); -// typed + autocompleted — fails at the call site on a typo -fr.record_call("r", false, RecordFormat::Mp3, "both", "", false, 44.0, None, None, None, "").unwrap(); -// raw &str still compiles (Python parity / forward-compat) and emits the -// byte-identical SWML -fr.record_call("r", false, "mp3", "both", "", false, 44.0, None, None, None, "").unwrap(); -``` - -**Validation is unchanged and still matches the Python reference.** The raw -arm carries the string _verbatim_ into the method body, where the same -closed-set check runs and rejects an out-of-set value with the reference's -exact `ValueError` text — e.g. `record_call(.., "ogg", ..)` still returns -`Err("format must be 'wav', 'mp3', or 'mp4'")`. The typed arm is always -valid by construction. Either way `wire` yields the exact -wire string, so the emitted SWML is byte-identical between the two call -styles. - -[`FunctionResult::record_call`]: crate::swaig::FunctionResult::record_call - -[`FunctionResult::tap`]: crate::swaig::FunctionResult::tap - -#### Signature - -```rust -enum MediaArg -``` - -#### Inheritance - -**Implements:** `Debug`, `Clone`, `PartialEq`, `Eq`, `From` - -#### Variants - - - A raw wire string, carried verbatim. Validated in the method body exactly as the Python reference validates its `str` argument. - - - - The typed, closed-set enum value (always a valid wire string). - - -#### Methods - -##### clone - -###### Signature - -```rust -fn clone(&self) -> ? -``` - -###### Returns - -`?` - -###### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 447. - -*** - -##### eq - -###### Signature - -```rust -fn eq(&self, other: &?) -> bool -``` - -###### Parameters - - - -###### Returns - -`bool` - -###### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 447. - -*** - -##### fmt - -###### Signature - -```rust -fn fmt(&self, f: &mut ?<'_>) -> ? -``` - -###### Parameters - - - -###### Returns - -`?` - -###### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 447. - -*** - -##### from - -###### Signature - -```rust -fn from(s: &str) -> Self -``` - -###### Parameters - - - -###### Returns - -`Self` - -###### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 474. - -*** - -##### from - -###### Signature - -```rust -fn from(s: ?) -> Self -``` - -###### Parameters - - - -###### Returns - -`Self` - -###### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 480. - -*** - -##### from - -###### Signature - -```rust -fn from(s: &?) -> Self -``` - -###### Parameters - - - -###### Returns - -`Self` - -###### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 486. - -*** - -##### wire - -The wire string this argument resolves to. For `Typed` -it is the enum's canonical `as_str()`; for `Raw` it is -the string verbatim. The method body validates this value against the -closed set before emitting it (Python-reference parity). - -###### Signature - -```rust -fn wire(&self) -> &str -``` - -###### Returns - -`&str` - -###### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 461. - -#### Examples - -```rust -use signalwire::swaig::FunctionResult; -use signalwire::swaig::RecordFormat; - -let mut fr = FunctionResult::new(); -// typed + autocompleted — fails at the call site on a typo -fr.record_call("r", false, RecordFormat::Mp3, "both", "", false, 44.0, None, None, None, "").unwrap(); -// raw &str still compiles (Python parity / forward-compat) and emits the -// byte-identical SWML -fr.record_call("r", false, "mp3", "both", "", false, 44.0, None, None, None, "").unwrap(); -``` - -#### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 448. - -*** - -### RecordDirection - -Audio direction for \[`FunctionResult::record_call`]. - -Mirrors the Python reference's -`direction in ["speak", "listen", "both"]` validation. Note this differs -from \[`TapDirection`], which uses `hear` instead of `listen`. - -[`FunctionResult::record_call`]: crate::swaig::FunctionResult::record_call - -#### Signature - -```rust -enum RecordDirection -``` - -#### Inheritance - -**Implements:** `Debug`, `Clone`, `Copy`, `PartialEq`, `Eq`, `Hash`, `PartialOrd`, `Ord`, `Display`, `AsRef`, `FromStr`, `From` - -#### Variants - - - `both` — what the party hears and says (the reference default). - - - - `listen` — what the party hears. - - - - `speak` — what the party says. - - -#### Methods - -##### all - -Every \[`RecordDirection`], in declaration order. - -###### Signature - -```rust -fn all() -> &'static [?] -``` - -###### Returns - -`&'static [?]` - -###### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 204. - -*** - -##### as\_ref - -###### Signature - -```rust -fn as_ref(&self) -> &str -``` - -###### Returns - -`&str` - -###### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 226. - -*** - -##### as\_str - -The canonical wire string for this direction (e.g. `"both"`). - -###### Signature - -```rust -fn as_str(&self) -> &'static str -``` - -###### Returns - -`&'static str` - -###### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 195. - -*** - -##### clone - -###### Signature - -```rust -fn clone(&self) -> ? -``` - -###### Returns - -`?` - -###### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 182. - -*** - -##### cmp - -###### Signature - -```rust -fn cmp(&self, other: &?) -> ? -``` - -###### Parameters - - - -###### Returns - -`?` - -###### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 182. - -*** - -##### eq - -###### Signature - -```rust -fn eq(&self, other: &?) -> bool -``` - -###### Parameters - - - -###### Returns - -`bool` - -###### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 182. - -*** - -##### fmt - -###### Signature - -```rust -fn fmt(&self, f: &mut ?<'_>) -> ? -``` - -###### Parameters - - - -###### Returns - -`?` - -###### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 182. - -*** - -##### fmt - -###### Signature - -```rust -fn fmt(&self, f: &mut ?<'_>) -> ? -``` - -###### Parameters - - - -###### Returns - -`?` - -###### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 220. - -*** - -##### from - -###### Signature - -```rust -fn from(v: ?) -> ? -``` - -###### Parameters - - - -###### Returns - -`?` - -###### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 248. - -*** - -##### from - -###### Signature - -```rust -fn from(v: ?) -> &'static str -``` - -###### Parameters - - - -###### Returns - -`&'static str` - -###### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 254. - -*** - -##### from - -###### Signature - -```rust -fn from(e: ?) -> Self -``` - -###### Parameters - - - -###### Returns - -`Self` - -###### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 498. - -*** - -##### from\_str - -Parse a wire string into a \[`RecordDirection`], or `None` if it is not a -recognised direction. - -###### Signature - -```rust -fn from_str(s: &str) -> ? -``` - -###### Parameters - - - -###### Returns - -`?` - -###### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 214. - -*** - -##### from\_str - -###### Signature - -```rust -fn from_str(s: &str) -> ?::Err> -``` - -###### Parameters - - - -###### Returns - -`?::Err>` - -###### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 236. - -*** - -##### hash - -###### Signature - -```rust -fn hash<__H: ?>(&self, state: &mut __H) -``` - -###### Type Parameters - - - -###### Parameters - - - -###### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 182. - -*** - -##### partial\_cmp - -###### Signature - -```rust -fn partial_cmp(&self, other: &?) -> ? -``` - -###### Parameters - - - -###### Returns - -`?` - -###### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 182. - -#### Type Aliases - -##### Err - -###### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 234. - -#### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 184. - -*** - -### RecordFormat - -Recording container format for \[`FunctionResult::record_call`]. - -Mirrors the Python reference's `format in ["wav", "mp3", "mp4"]` validation. - -[`FunctionResult::record_call`]: crate::swaig::FunctionResult::record_call - -#### Signature - -```rust -enum RecordFormat -``` - -#### Inheritance - -**Implements:** `Debug`, `Clone`, `Copy`, `PartialEq`, `Eq`, `Hash`, `PartialOrd`, `Ord`, `Display`, `AsRef`, `FromStr`, `From` - -#### Variants - - - `mp3` - - - - `mp4` - - - - `wav` (the reference default). - - -#### Methods - -##### all - -Every \[`RecordFormat`], in declaration order. - -###### Signature - -```rust -fn all() -> &'static [?] -``` - -###### Returns - -`&'static [?]` - -###### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 125. - -*** - -##### as\_ref - -###### Signature - -```rust -fn as_ref(&self) -> &str -``` - -###### Returns - -`&str` - -###### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 143. - -*** - -##### as\_str - -The canonical wire string for this format (e.g. `"wav"`). - -This is exactly the string the raw-`str` call style carries, so -`record_call(.., RecordFormat::Mp3, ..)` emits the same SWML as -`record_call(.., "mp3", ..)` — both resolve here via \[`MediaArg`]. - -###### Signature - -```rust -fn as_str(&self) -> &'static str -``` - -###### Returns - -`&'static str` - -###### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 116. - -*** - -##### clone - -###### Signature - -```rust -fn clone(&self) -> ? -``` - -###### Returns - -`?` - -###### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 99. - -*** - -##### cmp - -###### Signature - -```rust -fn cmp(&self, other: &?) -> ? -``` - -###### Parameters - - - -###### Returns - -`?` - -###### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 99. - -*** - -##### eq - -###### Signature - -```rust -fn eq(&self, other: &?) -> bool -``` - -###### Parameters - - - -###### Returns - -`bool` - -###### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 99. - -*** - -##### fmt - -###### Signature - -```rust -fn fmt(&self, f: &mut ?<'_>) -> ? -``` - -###### Parameters - - - -###### Returns - -`?` - -###### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 99. - -*** - -##### fmt - -###### Signature - -```rust -fn fmt(&self, f: &mut ?<'_>) -> ? -``` - -###### Parameters - - - -###### Returns - -`?` - -###### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 137. - -*** - -##### from - -###### Signature - -```rust -fn from(v: ?) -> ? -``` - -###### Parameters - - - -###### Returns - -`?` - -###### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 164. - -*** - -##### from - -###### Signature - -```rust -fn from(v: ?) -> &'static str -``` - -###### Parameters - - - -###### Returns - -`&'static str` - -###### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 170. - -*** - -##### from - -###### Signature - -```rust -fn from(e: ?) -> Self -``` - -###### Parameters - - - -###### Returns - -`Self` - -###### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 492. - -*** - -##### from\_str - -Parse a wire string into a \[`RecordFormat`], or `None` if it is not a -recognised format (the same strings the reference would reject). - -###### Signature - -```rust -fn from_str(s: &str) -> ? -``` - -###### Parameters - - - -###### Returns - -`?` - -###### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 131. - -*** - -##### from\_str - -###### Signature - -```rust -fn from_str(s: &str) -> ?::Err> -``` - -###### Parameters - - - -###### Returns - -`?::Err>` - -###### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 154. - -*** - -##### hash - -###### Signature - -```rust -fn hash<__H: ?>(&self, state: &mut __H) -``` - -###### Type Parameters - - - -###### Parameters - - - -###### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 99. - -*** - -##### partial\_cmp - -###### Signature - -```rust -fn partial_cmp(&self, other: &?) -> ? -``` - -###### Parameters - - - -###### Returns - -`?` - -###### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 99. - -#### Type Aliases - -##### Err - -###### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 152. - -#### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 101. - -*** - -### TapDirection - -Audio direction for \[`FunctionResult::tap`]. - -Mirrors the Python reference's -`valid_directions = ["speak", "hear", "both"]` validation. Note this differs -from \[`RecordDirection`], which uses `listen` instead of `hear`. - -[`FunctionResult::tap`]: crate::swaig::FunctionResult::tap - -#### Signature - -```rust -enum TapDirection -``` - -#### Inheritance - -**Implements:** `Debug`, `Clone`, `Copy`, `PartialEq`, `Eq`, `Hash`, `PartialOrd`, `Ord`, `Display`, `AsRef`, `FromStr`, `From` - -#### Variants - - - `both` — what the party hears and says (the reference default). - - - - `hear` — what the party hears. - - - - `speak` — what the party says. - - -#### Methods - -##### all - -Every \[`TapDirection`], in declaration order. - -###### Signature - -```rust -fn all() -> &'static [?] -``` - -###### Returns - -`&'static [?]` - -###### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 288. - -*** - -##### as\_ref - -###### Signature - -```rust -fn as_ref(&self) -> &str -``` - -###### Returns - -`&str` - -###### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 306. - -*** - -##### as\_str - -The canonical wire string for this direction (e.g. `"both"`). - -###### Signature - -```rust -fn as_str(&self) -> &'static str -``` - -###### Returns - -`&'static str` - -###### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 279. - -*** - -##### clone - -###### Signature - -```rust -fn clone(&self) -> ? -``` - -###### Returns - -`?` - -###### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 266. - -*** - -##### cmp - -###### Signature - -```rust -fn cmp(&self, other: &?) -> ? -``` - -###### Parameters - - - -###### Returns - -`?` - -###### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 266. - -*** - -##### eq - -###### Signature - -```rust -fn eq(&self, other: &?) -> bool -``` - -###### Parameters - - - -###### Returns - -`bool` - -###### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 266. - -*** - -##### fmt - -###### Signature - -```rust -fn fmt(&self, f: &mut ?<'_>) -> ? -``` - -###### Parameters - - - -###### Returns - -`?` - -###### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 266. - -*** - -##### fmt - -###### Signature - -```rust -fn fmt(&self, f: &mut ?<'_>) -> ? -``` - -###### Parameters - - - -###### Returns - -`?` - -###### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 300. - -*** - -##### from - -###### Signature - -```rust -fn from(v: ?) -> ? -``` - -###### Parameters - - - -###### Returns - -`?` - -###### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 328. - -*** - -##### from - -###### Signature - -```rust -fn from(v: ?) -> &'static str -``` - -###### Parameters - - - -###### Returns - -`&'static str` - -###### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 334. - -*** - -##### from - -###### Signature - -```rust -fn from(e: ?) -> Self -``` - -###### Parameters - - - -###### Returns - -`Self` - -###### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 504. - -*** - -##### from\_str - -Parse a wire string into a \[`TapDirection`], or `None` if it is not a -recognised direction. - -###### Signature - -```rust -fn from_str(s: &str) -> ? -``` - -###### Parameters - - - -###### Returns - -`?` - -###### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 294. - -*** - -##### from\_str - -###### Signature - -```rust -fn from_str(s: &str) -> ?::Err> -``` - -###### Parameters - - - -###### Returns - -`?::Err>` - -###### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 316. - -*** - -##### hash - -###### Signature - -```rust -fn hash<__H: ?>(&self, state: &mut __H) -``` - -###### Type Parameters - - - -###### Parameters - - - -###### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 266. - -*** - -##### partial\_cmp - -###### Signature - -```rust -fn partial_cmp(&self, other: &?) -> ? -``` - -###### Parameters - - - -###### Returns - -`?` - -###### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 266. - -#### Type Aliases - -##### Err - -###### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 314. - -#### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 268. - -## Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/swaig/media-enums/parse-media-enum-error/index.mdx b/fern/products/sdk-reference/rust/signalwire/swaig/media-enums/parse-media-enum-error/index.mdx deleted file mode 100644 index 865abdd669..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/swaig/media-enums/parse-media-enum-error/index.mdx +++ /dev/null @@ -1,155 +0,0 @@ ---- -slug: "/reference/rust/signalwire/swaig/media-enums/parse-media-enum-error" -title: "ParseMediaEnumError" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::swaig::media_enums::ParseMediaEnumError" - parent: "signalwire::swaig::media_enums" - module: "swaig.media_enums" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs" - visibility: "public" ---- -# `ParseMediaEnumError` - -Error returned when a string is parsed into one of the closed-set media -enums (via \[`FromStr`]) but is not a recognised wire value. - -Carries the offending input and the enum's accepted set so the message is -actionable — e.g. `"foo" is not a valid RecordFormat (expected one of: -wav, mp3, mp4)`. This is the typed analogue of the Python reference's -`ValueError`, surfaced through the idiomatic `"wav".parse::()` -entry point. - -## Signature - -```rust -struct ParseMediaEnumError { /* fields */ } -``` - -## Inheritance - -**Implements:** `Debug`, `Clone`, `PartialEq`, `Eq`, `Display`, [Error](/docs/sdk-reference/reference/rust/signalwire/security/webhook-layer/webhook-validate#error) - -## Methods - -### clone - -#### Signature - -```rust -fn clone(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 55. - -*** - -### eq - -#### Signature - -```rust -fn eq(&self, other: &?) -> bool -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 55. - -*** - -### fmt - -#### Signature - -```rust -fn fmt(&self, f: &mut ?<'_>) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 55. - -*** - -### fmt - -#### Signature - -```rust -fn fmt(&self, f: &mut ?<'_>) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 81. - -*** - -### input - -The string that failed to parse. - -#### Signature - -```rust -fn input(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 75. - -## Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 56. diff --git a/fern/products/sdk-reference/rust/signalwire/swaig/params-builder/index.mdx b/fern/products/sdk-reference/rust/signalwire/swaig/params-builder/index.mdx deleted file mode 100644 index 00574d6b58..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/swaig/params-builder/index.mdx +++ /dev/null @@ -1,398 +0,0 @@ ---- -slug: "/reference/rust/signalwire/swaig/params-builder" -title: "params_builder" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "signalwire::swaig::params_builder" - parent: "signalwire::swaig" - module: "swaig" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs" - visibility: "public" ---- -# `params_builder` - -Typed builder for SWAIG tool-parameter JSON schemas. - -[`AgentBase::define_tool`] / [`Service::define_tool`] take the function's -parameter schema as an untyped `serde_json::Value` — a `properties` object -hand-written as nested `json!({ ... })`: - -```ignore -agent.define_tool( - "search_faqs", - "Search the FAQ knowledge base", - json!({ - "query": {"type": "string", "description": "The question or keywords"}, - }), - handler, - false, -); -``` - -That is easy to typo (`"strign"`, `"desciption"`, a forgotten `"type"`) and -the compiler can't help. \[`ParamsBuilder`] is an _additive_, fully-typed -convenience over the **exact same wire output**: it produces the identical -`properties` object — so it drops straight into the existing, unchanged -`define_tool` path. It is not a new format. - -```no_run -use signalwire::swaig::ParamsBuilder; -use serde_json::json; - -let params = ParamsBuilder::new() - .string("query", "The question or keywords to search") - .build(); - -// Byte-identical to the hand-written form above: -assert_eq!( - params, - json!({"query": {"type": "string", "description": "The question or keywords to search"}}) -); -``` - -## Two outputs, both byte-identical to the hand-written forms - -- `build` returns the **`properties` object** — what - Rust's `define_tool(parameters)` accepts (it wraps it as - `{"type":"object","properties": }`). -- `build_schema` returns the **full** JSON - schema `{"type":"object","properties":{…},"required":[…]}` — exactly the - shape the Python reference's `_ensure_parameter_structure` emits and the - shape hand-written for `register_swaig_function` / DataMap full - definitions. This is the form that carries a top-level - `required` list. - -## Closed-set (enum) properties - -`enum_of` renders a schema `"enum": [...]` from any -iterator of `impl AsRef`, so the Tier-1 media enums plug straight in via -their `all()` slices: - -```no_run -use signalwire::swaig::{ParamsBuilder, RecordFormat}; -use serde_json::json; - -let params = ParamsBuilder::new() - .enum_of("fmt", RecordFormat::all(), "Recording container format") - .build(); - -assert_eq!( - params, - json!({"fmt": {"type": "string", "enum": ["wav", "mp3", "mp4"], "description": "Recording container format"}}) -); -``` - -[`AgentBase::define_tool`]: crate::agent::AgentBase::define_tool - -[`Service::define_tool`]: crate::swml::service::Service::define_tool - -## Examples - - - - ```rust - agent.define_tool( - "search_faqs", - "Search the FAQ knowledge base", - json!({ - "query": {"type": "string", "description": "The question or keywords"}, - }), - handler, - false, - ); - ``` - - - - ```rust - use signalwire::swaig::ParamsBuilder; - use serde_json::json; - - let params = ParamsBuilder::new() - .string("query", "The question or keywords to search") - .build(); - - // Byte-identical to the hand-written form above: - assert_eq!( - params, - json!({"query": {"type": "string", "description": "The question or keywords to search"}}) - ); - ``` - - - - ```rust - use signalwire::swaig::{ParamsBuilder, RecordFormat}; - use serde_json::json; - - let params = ParamsBuilder::new() - .enum_of("fmt", RecordFormat::all(), "Recording container format") - .build(); - - assert_eq!( - params, - json!({"fmt": {"type": "string", "enum": ["wav", "mp3", "mp4"], "description": "Recording container format"}}) - ); - ``` - - - -## Classes - - - - Fluent, typed builder for a SWAIG tool's parameter schema. - - - - A single parameter property under construction. - - - -## Enums - -### ParamKind - -The JSON-Schema primitive types a SWAIG parameter property can declare. - -Used by \[`ParamsBuilder::array`] (the element kind) and, indirectly, by the -per-kind builder methods. The `as_str` value is the literal that lands in -the schema's `"type"` field. - -#### Signature - -```rust -enum ParamKind -``` - -#### Inheritance - -**Implements:** `Debug`, `Clone`, `Copy`, `PartialEq`, `Eq`, `Hash`, `PartialOrd`, `Ord`, `Display` - -#### Variants - - - `"array"` - - - - `"boolean"` - - - - `"integer"` - - - - `"number"` (floating point) - - - - `"object"` - - - - `"string"` - - -#### Methods - -##### as\_str - -The canonical JSON-Schema `"type"` string for this kind. - -###### Signature - -```rust -fn as_str(&self) -> &'static str -``` - -###### Returns - -`&'static str` - -###### Source - -[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) - -Line 101. - -*** - -##### clone - -###### Signature - -```rust -fn clone(&self) -> ? -``` - -###### Returns - -`?` - -###### Source - -[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) - -Line 82. - -*** - -##### cmp - -###### Signature - -```rust -fn cmp(&self, other: &?) -> ? -``` - -###### Parameters - - - -###### Returns - -`?` - -###### Source - -[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) - -Line 82. - -*** - -##### eq - -###### Signature - -```rust -fn eq(&self, other: &?) -> bool -``` - -###### Parameters - - - -###### Returns - -`bool` - -###### Source - -[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) - -Line 82. - -*** - -##### fmt - -###### Signature - -```rust -fn fmt(&self, f: &mut ?<'_>) -> ? -``` - -###### Parameters - - - -###### Returns - -`?` - -###### Source - -[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) - -Line 82. - -*** - -##### fmt - -###### Signature - -```rust -fn fmt(&self, f: &mut ?<'_>) -> ? -``` - -###### Parameters - - - -###### Returns - -`?` - -###### Source - -[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) - -Line 114. - -*** - -##### hash - -###### Signature - -```rust -fn hash<__H: ?>(&self, state: &mut __H) -``` - -###### Type Parameters - - - -###### Parameters - - - -###### Source - -[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) - -Line 82. - -*** - -##### partial\_cmp - -###### Signature - -```rust -fn partial_cmp(&self, other: &?) -> ? -``` - -###### Parameters - - - -###### Returns - -`?` - -###### Source - -[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) - -Line 82. - -#### Source - -[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) - -Line 84. - -## Source - -[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) - -Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/swaig/params-builder/params-builder/index.mdx b/fern/products/sdk-reference/rust/signalwire/swaig/params-builder/params-builder/index.mdx deleted file mode 100644 index 15d5685926..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/swaig/params-builder/params-builder/index.mdx +++ /dev/null @@ -1,531 +0,0 @@ ---- -slug: "/reference/rust/signalwire/swaig/params-builder/params-builder" -title: "ParamsBuilder" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::swaig::params_builder::ParamsBuilder" - parent: "signalwire::swaig::params_builder" - module: "swaig.params_builder" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs" - visibility: "public" ---- -# `ParamsBuilder` - -Fluent, typed builder for a SWAIG tool's parameter schema. - -Build up the parameters one property at a time, then call -`build` to get the `properties` object for `define_tool`, or -`build_schema` for the full -`{"type":"object","properties":{…},"required":[…]}` schema. See the -module docs for the full picture and byte-identity guarantees. - -```no_run -use signalwire::swaig::{ParamsBuilder, RecordFormat}; - -let params = ParamsBuilder::new() - .string("service", "The service the customer is asking about") - .string("date", "Appointment date, YYYY-MM-DD") - .integer("party_size", "Number of people") - .boolean("confirmed", "Whether the user confirmed") - .enum_of("fmt", RecordFormat::all(), "Recording container format") - .required(["service", "date"]) - .build(); -``` - -**Decorators:** `@must_use` - -## Signature - -```rust -struct ParamsBuilder { /* fields */ } -``` - -## Inheritance - -**Implements:** `Debug`, `Clone`, `Default` - -## Examples - -```rust -use signalwire::swaig::{ParamsBuilder, RecordFormat}; - -let params = ParamsBuilder::new() - .string("service", "The service the customer is asking about") - .string("date", "Appointment date, YYYY-MM-DD") - .integer("party_size", "Number of people") - .boolean("confirmed", "Whether the user confirmed") - .enum_of("fmt", RecordFormat::all(), "Recording container format") - .required(["service", "date"]) - .build(); -``` - -## Methods - -### array - -Add an `array` property whose elements are `items` (a \[`ParamKind`]), -with `description`. - -#### Signature - -```rust -fn array(self, name: &str, items: ?, description: &str) -> Self -``` - -#### Parameters - - - - - - - -#### Returns - -`Self` - -#### Source - -[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) - -Line 325. - -*** - -### boolean - -Add a `boolean` property with `description`. - -#### Signature - -```rust -fn boolean(self, name: &str, description: &str) -> Self -``` - -#### Parameters - - - - - -#### Returns - -`Self` - -#### Source - -[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) - -Line 291. - -*** - -### build - -Render just the **`properties` object** — the value Rust's -`define_tool(parameters)` accepts (it wraps it as -`{"type":"object","properties": }`). - -Byte-identical to the hand-written `json!({ : { … } })` form. The -top-level `required` list is **not** included here (it -has no slot inside a bare `properties` object); use -`build_schema` when you need it. - -**Decorators:** `@must_use` - -#### Signature - -```rust -fn build(self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) - -Line 375. - -*** - -### build\_schema - -Render the **full JSON schema**: -`{"type":"object","properties":{…}}`, plus `"required":[…]` when a -top-level `required` list was declared. - -Byte-identical to the Python reference's `_ensure_parameter_structure` -output and to the hand-written full-schema forms used with -`register_swaig_function` / DataMap definitions. - -**Decorators:** `@must_use` - -#### Signature - -```rust -fn build_schema(self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) - -Line 387. - -*** - -### clone - -#### Signature - -```rust -fn clone(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) - -Line 259. - -*** - -### default - -#### Signature - -```rust -fn default() -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) - -Line 259. - -*** - -### enum\_of - -Add a closed-set (`enum`) property with `description`. - -`variants` is any iterator of `impl AsRef`, so the Tier-1 media -enums plug in directly: - -```no_run -use signalwire::swaig::{ParamsBuilder, TapDirection}; -use serde_json::json; - -let params = ParamsBuilder::new() - .enum_of("direction", TapDirection::all(), "Audio direction to tap") - .build(); -assert_eq!( - params["direction"]["enum"], - json!(["speak", "hear", "both"]) -); -``` - -#### Signature - -```rust -fn enum_of( - self, - name: &str, - variants: I, - description: &str -) -> Self where I: ?, S: ? -``` - -#### Type Parameters - - - - - -#### Parameters - - - - - - - -#### Returns - -`Self` - -#### Examples - -```rust -use signalwire::swaig::{ParamsBuilder, TapDirection}; -use serde_json::json; - -let params = ParamsBuilder::new() - .enum_of("direction", TapDirection::all(), "Audio direction to tap") - .build(); -assert_eq!( - params["direction"]["enum"], - json!(["speak", "hear", "both"]) -); -``` - -#### Source - -[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) - -Line 312. - -*** - -### fmt - -#### Signature - -```rust -fn fmt(&self, f: &mut ?<'_>) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) - -Line 259. - -*** - -### integer - -Add an `integer` property with `description`. - -#### Signature - -```rust -fn integer(self, name: &str, description: &str) -> Self -``` - -#### Parameters - - - - - -#### Returns - -`Self` - -#### Source - -[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) - -Line 286. - -*** - -### new - -Start an empty parameter schema. - -#### Signature - -```rust -fn new() -> Self -``` - -#### Returns - -`Self` - -#### Source - -[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) - -Line 268. - -*** - -### number - -Add a `number` (floating-point) property with `description`. - -#### Signature - -```rust -fn number(self, name: &str, description: &str) -> Self -``` - -#### Parameters - - - - - -#### Returns - -`Self` - -#### Source - -[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) - -Line 281. - -*** - -### object - -Add a nested `object` property whose shape is described by `inner` -(another \[`ParamsBuilder`]), with `description`. - -#### Signature - -```rust -fn object(self, name: &str, inner: ?, description: &str) -> Self -``` - -#### Parameters - - - - - - - -#### Returns - -`Self` - -#### Source - -[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) - -Line 334. - -*** - -### property - -Add a fully-customised property built via \[`PropertyBuilder`] (the -escape hatch for `default`/`format`/per-property `required`/nesting that -the one-line helpers don't cover). - -#### Signature - -```rust -fn property(self, name: &str, property: ?) -> Self -``` - -#### Parameters - - - - - -#### Returns - -`Self` - -#### Source - -[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) - -Line 344. - -*** - -### required - -Declare the top-level required-parameter list, emitting -`"required": [, …]` in `build_schema`. - -This is the JSON-Schema-style required array (sibling of `properties`), -matching the Python reference's `required=[…]` argument. Calling it more -than once replaces the previous list. For a per-property flag instead, -use \[`PropertyBuilder::required`]. - -#### Signature - -```rust -fn required(self, names: I) -> Self where I: ?, S: ? -``` - -#### Type Parameters - - - - - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) - -Line 357. - -*** - -### string - -Add a `string` property with `description`. - -#### Signature - -```rust -fn string(self, name: &str, description: &str) -> Self -``` - -#### Parameters - - - - - -#### Returns - -`Self` - -#### Source - -[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) - -Line 276. - -## Source - -[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) - -Line 261. diff --git a/fern/products/sdk-reference/rust/signalwire/swaig/params-builder/property-builder/index.mdx b/fern/products/sdk-reference/rust/signalwire/swaig/params-builder/property-builder/index.mdx deleted file mode 100644 index 5d58a8f5c3..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/swaig/params-builder/property-builder/index.mdx +++ /dev/null @@ -1,358 +0,0 @@ ---- -slug: "/reference/rust/signalwire/swaig/params-builder/property-builder" -title: "PropertyBuilder" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::swaig::params_builder::PropertyBuilder" - parent: "signalwire::swaig::params_builder" - module: "swaig.params_builder" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs" - visibility: "public" ---- -# `PropertyBuilder` - -A single parameter property under construction. - -You rarely build one of these directly — \[`ParamsBuilder`]'s per-kind -methods create and insert one for you. Reach for \[`PropertyBuilder`] only -when you need a property whose options (`default`, `format`, a property-local -`required` flag, a nested schema) don't fit the one-line helpers, then pass -it to \[`ParamsBuilder::property`]. - -The rendered shape is a JSON object: `{"type": , "description": , -…optional keys…}`, byte-identical to what you'd hand-write. - -**Decorators:** `@must_use` - -## Signature - -```rust -struct PropertyBuilder { /* fields */ } -``` - -## Inheritance - -**Implements:** `Debug`, `Clone` - -## Methods - -### build - -Finish the property, yielding its rendered schema object. - -**Decorators:** `@must_use` - -#### Signature - -```rust -fn build(self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) - -Line 230. - -*** - -### clone - -#### Signature - -```rust -fn clone(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) - -Line 129. - -*** - -### default - -Attach a `"default"` value to the property. - -#### Signature - -```rust -fn default: ?>(self, default: impl ?) -> Self -``` - -#### Type Parameters - - - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) - -Line 159. - -*** - -### enum\_values - -Constrain the property to a closed set, emitting -`"enum": [, …]`. - -Accepts any iterator of `impl AsRef`, so the Tier-1 media enums plug -in via their `all()` slices (`RecordFormat::all()`, `Codec::all()`, …) — -each variant renders as its canonical wire string. - -#### Signature - -```rust -fn enum_values(self, values: I) -> Self where I: ?, S: ? -``` - -#### Type Parameters - - - - - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) - -Line 178. - -*** - -### extra - -Insert an arbitrary extra schema key (escape hatch for JSON-Schema -keywords without a dedicated helper, e.g. `"minimum"`, `"pattern"`). - -#### Signature - -```rust -fn extra: ?>(self, key: &str, value: impl ?) -> Self -``` - -#### Type Parameters - - - -#### Parameters - - - - - -#### Returns - -`Self` - -#### Source - -[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) - -Line 223. - -*** - -### fmt - -#### Signature - -```rust -fn fmt(&self, f: &mut ?<'_>) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) - -Line 129. - -*** - -### format - -Attach a JSON-Schema `"format"` hint (e.g. `"date"`, `"email"`, -`"uri"`). Free-form: the format vocabulary is open, so this stays a -`&str`. - -#### Signature - -```rust -fn format(self, format: &str) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) - -Line 167. - -*** - -### items - -Set the element schema for an array property, emitting -`"items": {"type": }`. - -#### Signature - -```rust -fn items(self, kind: ?) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) - -Line 193. - -*** - -### new - -Start a property of `kind` with an LLM-facing `description`. - -`description` is prompt-engineering text the model reads to decide how to -fill the argument — be specific (format, source, constraints), not terse. - -#### Signature - -```rust -fn new(kind: ?, description: &str) -> Self -``` - -#### Parameters - - - - - -#### Returns - -`Self` - -#### Source - -[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) - -Line 140. - -*** - -### properties - -Set the nested `properties` for an object property from another -\[`ParamsBuilder`], emitting `"properties": {…}` (and a nested -`"required": [...]` if the inner builder declared one). - -#### Signature - -```rust -fn properties(self, inner: ?) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) - -Line 203. - -*** - -### required - -Mark this individual property required, emitting `"required": true` -alongside its `type`/`description`. - -This is the per-property flag style some skills use -(e.g. the `datasphere` skill). For the JSON-Schema top-level -`"required": ["a","b"]` array, use \[`ParamsBuilder::required`] instead. - -#### Signature - -```rust -fn required(self, required: bool) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) - -Line 153. - -## Source - -[`src/swaig/params_builder.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/params_builder.rs) - -Line 131. diff --git a/fern/products/sdk-reference/rust/signalwire/swml/document/index.mdx b/fern/products/sdk-reference/rust/signalwire/swml/document/index.mdx deleted file mode 100644 index 86907957aa..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/swml/document/index.mdx +++ /dev/null @@ -1,360 +0,0 @@ ---- -slug: "/reference/rust/signalwire/swml/document" -title: "document" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::swml::document" - parent: "signalwire::swml" - module: "swml" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/swml/document.rs" - visibility: "public" ---- -# `document` - -SWML document: version + named sections containing verb arrays. - -**Decorators:** `@must_use` - -## Signature - -```rust -struct Document { /* fields */ } -``` - -## Inheritance - -**Implements:** `Default` - -## Methods - -### add\_raw\_verb - -Append a pre-formatted verb value to a section. - -**Panics:** - -Panics if the section does not exist. - -#### Signature - -```rust -fn add_raw_verb(&mut self, section: &str, verb_hash: ?) -``` - -#### Parameters - - - - - -#### Source - -[`src/swml/document.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/document.rs) - -Line 69. - -*** - -### add\_section - -Add a new named section. Returns `true` if created, `false` if it already existed. - -#### Signature - -```rust -fn add_section(&mut self, name: &str) -> bool -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/swml/document.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/document.rs) - -Line 27. - -*** - -### add\_verb - -Append a verb to the `main` section. - -#### Signature - -```rust -fn add_verb(&mut self, verb_name: &str, config: ?) -``` - -#### Parameters - - - - - -#### Source - -[`src/swml/document.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/document.rs) - -Line 45. - -*** - -### add\_verb\_to\_section - -Append a verb to a named section. - -**Panics:** - -Panics if the section does not exist. - -#### Signature - -```rust -fn add_verb_to_section(&mut self, section: &str, verb_name: &str, config: ?) -``` - -#### Parameters - - - - - - - -#### Source - -[`src/swml/document.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/document.rs) - -Line 54. - -*** - -### clear\_section - -Clear all verbs in a section (keeps the section itself). - -#### Signature - -```rust -fn clear_section(&mut self, section: &str) -``` - -#### Parameters - - - -#### Source - -[`src/swml/document.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/document.rs) - -Line 78. - -*** - -### default - -#### Signature - -```rust -fn default() -> Self -``` - -#### Returns - -`Self` - -#### Source - -[`src/swml/document.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/document.rs) - -Line 119. - -*** - -### get\_verbs - -Get a clone of the verbs for a section (empty vec if section does not exist). - -#### Signature - -```rust -fn get_verbs(&self, section: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/swml/document.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/document.rs) - -Line 40. - -*** - -### has\_section - -#### Signature - -```rust -fn has_section(&self, name: &str) -> bool -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/swml/document.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/document.rs) - -Line 35. - -*** - -### new - -#### Signature - -```rust -fn new() -> Self -``` - -#### Returns - -`Self` - -#### Source - -[`src/swml/document.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/document.rs) - -Line 13. - -*** - -### render - -Compact JSON string. - -#### Signature - -```rust -fn render(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/swml/document.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/document.rs) - -Line 107. - -*** - -### render\_pretty - -Pretty-printed JSON string. - -#### Signature - -```rust -fn render_pretty(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/swml/document.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/document.rs) - -Line 112. - -*** - -### reset - -Reset document to initial state (only `main` with no verbs). - -#### Signature - -```rust -fn reset(&mut self) -``` - -#### Source - -[`src/swml/document.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/document.rs) - -Line 85. - -*** - -### to\_value - -Build the document as a `serde_json::Value`. - -#### Signature - -```rust -fn to_value(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/swml/document.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/document.rs) - -Line 91. - -*** - -### version - -#### Signature - -```rust -fn version(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/swml/document.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/document.rs) - -Line 22. - -## Source - -[`src/swml/document.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/document.rs) - -Line 7. diff --git a/fern/products/sdk-reference/rust/signalwire/swml/index.mdx b/fern/products/sdk-reference/rust/signalwire/swml/index.mdx deleted file mode 100644 index 3d681b1ade..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/swml/index.mdx +++ /dev/null @@ -1,39 +0,0 @@ ---- -slug: "/reference/rust/signalwire/swml" -title: "swml" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "signalwire::swml" - parent: "signalwire" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/swml/mod.rs" - visibility: "public" ---- -# `swml` - -## Classes - - - - SWML document: version + named sections containing verb arrays. - - - - SWML service: holds a document, auth credentials, and handles HTTP requests. - - - -## Modules - - - - - -## Source - -[`src/swml/mod.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/mod.rs) - -Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/swml/schema/index.mdx b/fern/products/sdk-reference/rust/signalwire/swml/schema/index.mdx deleted file mode 100644 index 0f56587cfe..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/swml/schema/index.mdx +++ /dev/null @@ -1,126 +0,0 @@ ---- -slug: "/reference/rust/signalwire/swml/schema" -title: "schema" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "signalwire::swml::schema" - parent: "signalwire::swml" - module: "swml" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/swml/schema.rs" - visibility: "public" ---- -# `schema` - -## Classes - - - - Metadata about a single SWML verb extracted from the schema. - - - -## Functions - -### get\_verb - -Get verb metadata, or `None` if not found. - -#### Signature - -```rust -fn get_verb(name: &str) -> ?<&?> -``` - -#### Parameters - - - -#### Returns - -`?<&?>` - -#### Source - -[`src/swml/schema.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/schema.rs) - -Line 82. - -*** - -### get\_verb\_names - -Get sorted list of all verb names. - -#### Signature - -```rust -fn get_verb_names() -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/swml/schema.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/schema.rs) - -Line 75. - -*** - -### is\_valid\_verb - -Check whether a verb name is valid. - -#### Signature - -```rust -fn is_valid_verb(name: &str) -> bool -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/swml/schema.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/schema.rs) - -Line 70. - -*** - -### verb\_count - -Number of verbs defined in the schema. - -#### Signature - -```rust -fn verb_count() -> usize -``` - -#### Returns - -`usize` - -#### Source - -[`src/swml/schema.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/schema.rs) - -Line 87. - -## Source - -[`src/swml/schema.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/schema.rs) - -Line 1. diff --git a/fern/products/sdk-reference/rust/signalwire/swml/schema/verb-info/index.mdx b/fern/products/sdk-reference/rust/signalwire/swml/schema/verb-info/index.mdx deleted file mode 100644 index 393be78e7c..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/swml/schema/verb-info/index.mdx +++ /dev/null @@ -1,84 +0,0 @@ ---- -slug: "/reference/rust/signalwire/swml/schema/verb-info" -title: "VerbInfo" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::swml::schema::VerbInfo" - parent: "signalwire::swml::schema" - module: "swml.schema" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/swml/schema.rs" - visibility: "public" ---- -# `VerbInfo` - -Metadata about a single SWML verb extracted from the schema. - -## Signature - -```rust -struct VerbInfo { /* fields */ } -``` - -## Inheritance - -**Implements:** `Debug`, `Clone` - -## Properties - - - - - -## Methods - -### clone - -#### Signature - -```rust -fn clone(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/swml/schema.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/schema.rs) - -Line 6. - -*** - -### fmt - -#### Signature - -```rust -fn fmt(&self, f: &mut ?<'_>) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/swml/schema.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/schema.rs) - -Line 6. - -## Source - -[`src/swml/schema.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/schema.rs) - -Line 7. diff --git a/fern/products/sdk-reference/rust/signalwire/swml/service/index.mdx b/fern/products/sdk-reference/rust/signalwire/swml/service/index.mdx deleted file mode 100644 index adc00421b6..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/swml/service/index.mdx +++ /dev/null @@ -1,958 +0,0 @@ ---- -slug: "/reference/rust/signalwire/swml/service" -title: "service" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::swml::service" - parent: "signalwire::swml" - module: "swml" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs" - visibility: "public" ---- -# `service` - -SWML service: holds a document, auth credentials, and handles HTTP requests. - -## Signature - -```rust -struct Service { /* fields */ } -``` - -## Classes - - - - Options for constructing a `Service`. - - - - Tool registered on a `Service` for SWAIG dispatch. The `definition` field holds the rendered SWAIG function dict (function/purpose/argument); `handler` is `None` for raw / DataMap-style functions, where dispatch happens server-side rather than in this process. - - - -## Methods - -### add\_verb - -Add a verb to a section, validating against the schema. - -**Panics:** - -Panics if the verb name is not in the schema. - -#### Signature - -```rust -fn add_verb(&mut self, verb: &str, section: &str, config: ?) -``` - -#### Parameters - - - - - - - -#### Source - -[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) - -Line 501. - -*** - -### basic\_auth\_credentials - -#### Signature - -```rust -fn basic_auth_credentials(&self) -> (&str, &str) -``` - -#### Returns - -`(&str, &str)` - -#### Source - -[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) - -Line 390. - -*** - -### define\_tool - -Define a SWAIG function the AI can call. Tool descriptions and -parameter descriptions are LLM-facing prompt engineering — see -PORTING\_GUIDE for guidance. - -Same shape as `AgentBase::define_tool` — a tool registered here is -usable on both sidecar and agent paths because they share storage. - -#### Signature - -```rust -fn define_tool( - &mut self, - name: &str, - description: &str, - parameters: ?, - handler: ?, - secure: bool -) -> &mut Self -``` - -#### Parameters - - - - - - - - - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) - -Line 241. - -*** - -### document - -#### Signature - -```rust -fn document(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) - -Line 382. - -*** - -### document\_mut - -#### Signature - -```rust -fn document_mut(&mut self) -> &mut ? -``` - -#### Returns - -`&mut ?` - -#### Source - -[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) - -Line 386. - -*** - -### extract\_sip\_username - -Extract SIP username from a request body. -Validates format: only `[a-zA-Z0-9._-]`, max 64 chars. - -#### Signature - -```rust -fn extract_sip_username(body: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) - -Line 619. - -*** - -### get\_all\_functions - -Snapshot of all registered SWAIG functions keyed by name. -Python parity: `ToolRegistry.get_all_functions`. - -#### Signature - -```rust -fn get_all_functions(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) - -Line 306. - -*** - -### get\_basic\_auth\_credentials - -Get (user, password) — Python-canonical name. -Python parity: `AuthMixin.get_basic_auth_credentials`. - -#### Signature - -```rust -fn get_basic_auth_credentials(&self) -> (?, ?) -``` - -#### Returns - -`(?, ?)` - -#### Source - -[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) - -Line 396. - -*** - -### get\_basic\_auth\_credentials\_with\_source - -Get (user, password, source) where source is one of "provided", -"environment", or "generated". Python parity: -`AuthMixin.get_basic_auth_credentials(include_source=True)`. - -#### Signature - -```rust -fn get_basic_auth_credentials_with_source(&self) -> (?, ?, ?) -``` - -#### Returns - -`(?, ?, ?)` - -#### Source - -[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) - -Line 403. - -*** - -### get\_function - -Get a registered SWAIG function definition by name, or `None` -when absent. Python parity: `ToolRegistry.get_function`. - -#### Signature - -```rust -fn get_function(&self, name: &str) -> ?<&?> -``` - -#### Parameters - - - -#### Returns - -`?<&?>` - -#### Source - -[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) - -Line 300. - -*** - -### get\_proxy\_url\_base - -Detect or construct the proxy URL base from request headers. - -#### Signature - -```rust -fn get_proxy_url_base(&self, headers: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) - -Line 664. - -*** - -### handle\_request - -Handle an HTTP request. Returns (status\_code, headers, body). - -#### Signature - -```rust -fn handle_request( - &self, - method: &str, - path: &str, - headers: &?, - body: &str -) -> (u16, ?, ?) -``` - -#### Parameters - - - - - - - - - -#### Returns - -`(u16, ?, ?)` - -#### Source - -[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) - -Line 519. - -*** - -### has\_function - -Whether a SWAIG function with the given name is registered. -Python parity: `ToolRegistry.has_function`. - -#### Signature - -```rust -fn has_function(&self, name: &str) -> bool -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) - -Line 294. - -*** - -### has\_tool - -Whether a tool with the given name is registered. - -#### Signature - -```rust -fn has_tool(&self, name: &str) -> bool -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) - -Line 337. - -*** - -### host - -#### Signature - -```rust -fn host(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) - -Line 366. - -*** - -### list\_tool\_names - -Registered tool names in insertion order. - -#### Signature - -```rust -fn list_tool_names(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) - -Line 342. - -*** - -### name - -#### Signature - -```rust -fn name(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) - -Line 358. - -*** - -### new - -#### Signature - -```rust -fn new(options: ?) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) - -Line 153. - -*** - -### on\_function\_call - -Dispatch a function call to the registered handler. Returns -`None` for unknown functions or registered functions with no -local handler (e.g. DataMap tools that execute server-side). - -#### Signature - -```rust -fn on_function_call( - &self, - name: &str, - args: &?, - raw_data: &? -) -> ? -``` - -#### Parameters - - - - - - - -#### Returns - -`?` - -#### Source - -[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) - -Line 325. - -*** - -### on\_request - -Customization hook called when SWML is requested. Default -delegates to \[`Service::on_swml_request`] and returns its result. -Subclasses (or external callers) typically configure -`on_swml_request` via \[`Service::set_on_swml_request_hook`] -rather than overriding this method. - -Returning `None` uses the default rendered SWML; returning a -non-`None` value applies modifications to the rendered document. - -Python parity: `WebMixin.on_request(request_data, callback_path)`. - -#### Signature - -```rust -fn on_request(&self, request_data: ?<&?>, callback_path: ?<&str>) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) - -Line 465. - -*** - -### on\_swml\_request - -Customization point for modifying SWML based on request data. -If a hook has been registered via -\[`Service::set_on_swml_request_hook`] the hook is invoked; -otherwise this returns `None` (no modification). - -Python parity: `WebMixin.on_swml_request(request_data, callback_path)`. -The Python third `request` argument is FastAPI-specific and -intentionally not mirrored. - -#### Signature - -```rust -fn on_swml_request(&self, request_data: ?<&?>, callback_path: ?<&str>) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) - -Line 481. - -*** - -### port - -#### Signature - -```rust -fn port(&self) -> u16 -``` - -#### Returns - -`u16` - -#### Source - -[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) - -Line 370. - -*** - -### register\_swaig\_function - -Register a raw SWAIG function definition (e.g. DataMap tools that -have no local handler). - -#### Signature - -```rust -fn register_swaig_function(&mut self, func_def: ?) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) - -Line 273. - -*** - -### remove\_function - -Remove a registered SWAIG function. Returns `true` when the -function was found and removed; `false` when it wasn't -registered. Python parity: `ToolRegistry.remove_function`. - -#### Signature - -```rust -fn remove_function(&mut self, name: &str) -> bool -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) - -Line 313. - -*** - -### render - -#### Signature - -```rust -fn render(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) - -Line 427. - -*** - -### render\_pretty - -#### Signature - -```rust -fn render_pretty(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) - -Line 431. - -*** - -### route - -#### Signature - -```rust -fn route(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) - -Line 362. - -*** - -### run - -#### Signature - -```rust -fn run(&self) -``` - -#### Source - -[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) - -Line 924. - -*** - -### schema\_utils - -SchemaUtils helper bound to this Service. Mirrors Python's -`self.schema_utils` instance attribute on `SWMLService`. -Returns a freshly-built helper each call — the underlying -schema is `LazyLock`-cached, so this is cheap. - -#### Signature - -```rust -fn schema_utils(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) - -Line 378. - -*** - -### set\_on\_swml\_request\_hook - -Register a function that customizes the SWML response on a -per-request basis. The hook receives the parsed body and the -callback path; returning `Some(value)` applies modifications, -`None` falls through to the default rendering. - -Rust has no method overriding via inheritance — this hook is -the idiomatic Rust equivalent of Python's overridable -`on_swml_request`. - -#### Signature - -```rust -fn set_on_swml_request_hook( - &mut self, - hook: F -) -> &mut Self where F: ?(?<&?>, ?<&str>) -> ? + ? + ? + 'static -``` - -#### Type Parameters - - - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) - -Line 447. - -*** - -### sleep - -Add a `sleep` verb (integer milliseconds) to a section. - -#### Signature - -```rust -fn sleep(&mut self, millis: i64, section: &str) -``` - -#### Parameters - - - - - -#### Source - -[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) - -Line 509. - -*** - -### tool\_definition - -Look up a registered tool's full SWAIG definition (the JSON -shape returned to the SignalWire platform). Used by audit -harnesses that need to inspect the DataMap webhook URL of a -registered tool without invoking it. - -#### Signature - -```rust -fn tool_definition(&self, name: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) - -Line 350. - -*** - -### validate\_basic\_auth - -Validate provided basic-auth credentials against the configured ones. -Python parity: `AuthMixin.validate_basic_auth(username, password)`. - -#### Signature - -```rust -fn validate_basic_auth(&self, username: &str, password: &str) -> bool -``` - -#### Parameters - - - - - -#### Returns - -`bool` - -#### Source - -[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) - -Line 422. - -## Type Aliases - -### FunctionHandler - -Handler type for SWAIG function callbacks. - -Receives `(args, raw_data)` and returns a `FunctionResult`. Same signature -AgentBase uses, so handlers are interchangeable between the two paths. - -#### Signature - -```rust -type FunctionHandler = ? -``` - -#### Source - -[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) - -Line 135. - -*** - -### OnSwmlRequestHook - -Hook function for SWML-request customization. Mirrors Python's -`WebMixin.on_swml_request(request_data, callback_path)` — receives the -parsed body and optional callback path, and returns a JSON `Value` of -modifications to merge (or `None` to use default rendering). - -Rust has no method overriding via inheritance — the function-field -hook is the idiomatic equivalent of Python's overridable -`on_swml_request`. Set via `Service::set_on_swml_request_hook`. - -#### Signature - -```rust -type OnSwmlRequestHook = ? -``` - -#### Source - -[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) - -Line 104. - -## Source - -[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) - -Line 109. diff --git a/fern/products/sdk-reference/rust/signalwire/swml/service/service-options/index.mdx b/fern/products/sdk-reference/rust/signalwire/swml/service/service-options/index.mdx deleted file mode 100644 index d3774d7968..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/swml/service/service-options/index.mdx +++ /dev/null @@ -1,212 +0,0 @@ ---- -slug: "/reference/rust/signalwire/swml/service/service-options" -title: "ServiceOptions" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::swml::service::ServiceOptions" - parent: "signalwire::swml::service" - module: "swml.service" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs" - visibility: "public" ---- -# `ServiceOptions` - -Options for constructing a `Service`. - -Doubles as an idiomatic **builder** (parallel to -`AgentOptions`): \[`ServiceOptions::new`] gives -a name-only default and the `with_*` methods take/return `self` for -one-expression configuration feeding \[`Service::new`]: - -```no_run -use signalwire::SWMLService; -use signalwire::swml::service::ServiceOptions; - -let svc = SWMLService::new( - ServiceOptions::new("sidecar") - .route("/swml") - .basic_auth("user", "secret"), -); -``` - -Direct struct-literal construction still works; the builder methods are an -additive convenience. `#[must_use]` flags an options value built but never -passed to \[`Service::new`]. - -**Decorators:** `@must_use` - -## Signature - -```rust -struct ServiceOptions { /* fields */ } -``` - -## Examples - -```rust -use signalwire::SWMLService; -use signalwire::swml::service::ServiceOptions; - -let svc = SWMLService::new( - ServiceOptions::new("sidecar") - .route("/swml") - .basic_auth("user", "secret"), -); -``` - -## Properties - - - - - - - - - - - - - -## Methods - -### basic\_auth - -Set HTTP Basic-Auth credentials guarding this service's endpoints. - -#### Signature - -```rust -fn basic_auth(self, user: &str, password: &str) -> Self -``` - -#### Parameters - - - - - -#### Returns - -`Self` - -#### Source - -[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) - -Line 89. - -*** - -### host - -Set the bind host (e.g. `"0.0.0.0"`). - -#### Signature - -```rust -fn host(self, host: &str) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) - -Line 77. - -*** - -### new - -Name-only options with the same defaults the struct-literal callers use -(`port` defaults to 3000 via \[`Service::new`] when left `None`). - -#### Signature - -```rust -fn new(name: &str) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) - -Line 59. - -*** - -### port - -Set the bind port. - -#### Signature - -```rust -fn port(self, port: u16) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) - -Line 83. - -*** - -### route - -Set the HTTP route this service serves (e.g. `"/swml"`). - -#### Signature - -```rust -fn route(self, route: &str) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) - -Line 71. - -## Source - -[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) - -Line 47. diff --git a/fern/products/sdk-reference/rust/signalwire/swml/service/tool-def/index.mdx b/fern/products/sdk-reference/rust/signalwire/swml/service/tool-def/index.mdx deleted file mode 100644 index 7d6b6b5363..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/swml/service/tool-def/index.mdx +++ /dev/null @@ -1,65 +0,0 @@ ---- -slug: "/reference/rust/signalwire/swml/service/tool-def" -title: "ToolDef" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::swml::service::ToolDef" - parent: "signalwire::swml::service" - module: "swml.service" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs" - visibility: "public" ---- -# `ToolDef` - -Tool registered on a `Service` for SWAIG dispatch. The `definition` -field holds the rendered SWAIG function dict (function/purpose/argument); -`handler` is `None` for raw / DataMap-style functions, where dispatch -happens server-side rather than in this process. - -## Signature - -```rust -struct ToolDef { /* fields */ } -``` - -## Inheritance - -**Implements:** `Clone` - -## Properties - - - - - - - -## Methods - -### clone - -#### Signature - -```rust -fn clone(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) - -Line 145. - -## Source - -[`src/swml/service.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs) - -Line 146. diff --git a/fern/products/sdk-reference/rust/signalwire/utils/index.mdx b/fern/products/sdk-reference/rust/signalwire/utils/index.mdx deleted file mode 100644 index e5ea1b0ff6..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/utils/index.mdx +++ /dev/null @@ -1,60 +0,0 @@ ---- -slug: "/reference/rust/signalwire/utils" -title: "utils" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "signalwire::utils" - parent: "signalwire" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/utils/mod.rs" - visibility: "public" ---- -# `utils` - -## Modules - - - - - - SSRF-prevention guard for user-supplied URLs. - - - -## Functions - -### is\_serverless\_mode - -Cross-language SDK contract: `signalwire.utils.is_serverless_mode` -returns `true` whenever the SDK is running inside any short-lived / -event-driven invocation environment (anything other than `"server"`). - -Mirrors `signalwire.utils.is_serverless_mode` in the Python -reference. The actual detection ladder lives in -`core::logging_config::get_execution_mode`; this helper just maps -"anything except 'server'" -> `true`. - -#### Signature - -```rust -fn is_serverless_mode() -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`src/utils/mod.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/mod.rs) - -Line 20. - -## Source - -[`src/utils/mod.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/mod.rs) - -Line 4. diff --git a/fern/products/sdk-reference/rust/signalwire/utils/schema-utils/index.mdx b/fern/products/sdk-reference/rust/signalwire/utils/schema-utils/index.mdx deleted file mode 100644 index 4ed3b0d234..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/utils/schema-utils/index.mdx +++ /dev/null @@ -1,38 +0,0 @@ ---- -slug: "/reference/rust/signalwire/utils/schema-utils" -title: "schema_utils" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "signalwire::utils::schema_utils" - parent: "signalwire::utils" - module: "utils" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs" - visibility: "public" ---- -# `schema_utils` - -## Classes - - - - SchemaUtils — Rust port of `signalwire.utils.schema_utils.SchemaUtils`. - - - - SchemaValidationError — Rust port of `signalwire.utils.schema_utils.SchemaValidationError`. - - - - Verb metadata extracted from the schema. - - - -## Source - -[`src/utils/schema_utils.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs) - -Line 17. diff --git a/fern/products/sdk-reference/rust/signalwire/utils/schema-utils/schema-utils/index.mdx b/fern/products/sdk-reference/rust/signalwire/utils/schema-utils/schema-utils/index.mdx deleted file mode 100644 index 97b5561ac1..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/utils/schema-utils/schema-utils/index.mdx +++ /dev/null @@ -1,323 +0,0 @@ ---- -slug: "/reference/rust/signalwire/utils/schema-utils/schema-utils" -title: "SchemaUtils" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::utils::schema_utils::SchemaUtils" - parent: "signalwire::utils::schema_utils" - module: "utils.schema_utils" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs" - visibility: "public" ---- -# `SchemaUtils` - -SchemaUtils — Rust port of -`signalwire.utils.schema_utils.SchemaUtils`. - -## Signature - -```rust -struct SchemaUtils { /* fields */ } -``` - -## Methods - -### full\_validation\_available - -Whether full JSON Schema validation is wired up. Mirrors -Python's `full_validation_available` property. - -#### Signature - -```rust -fn full_validation_available(&self) -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`src/utils/schema_utils.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs) - -Line 93. - -*** - -### generate\_method\_body - -Generate a Python-style method body string for a verb. Mirrors -Python's `generate_method_body(verb_name)`. - -#### Signature - -```rust -fn generate_method_body(&self, verb_name: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/utils/schema_utils.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs) - -Line 239. - -*** - -### generate\_method\_signature - -Generate a Python-style method signature string for a verb. -Mirrors Python's `generate_method_signature(verb_name)`. - -#### Signature - -```rust -fn generate_method_signature(&self, verb_name: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/utils/schema_utils.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs) - -Line 202. - -*** - -### get\_all\_verb\_names - -Sorted list of all known verb names. Mirrors Python's -`get_all_verb_names()`. - -#### Signature - -```rust -fn get_all_verb_names(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/utils/schema_utils.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs) - -Line 110. - -*** - -### get\_verb\_parameters - -Parameter-definition block used by code-gen tooling. Mirrors -Python's `get_verb_parameters(verb_name)`. - -#### Signature - -```rust -fn get_verb_parameters(&self, verb_name: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/utils/schema_utils.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs) - -Line 145. - -*** - -### get\_verb\_properties - -The `properties[verb_name]` block for a verb, or empty when -unknown. Mirrors Python's `get_verb_properties(verb_name)`. - -#### Signature - -```rust -fn get_verb_properties(&self, verb_name: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/utils/schema_utils.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs) - -Line 116. - -*** - -### get\_verb\_required\_properties - -The `required` list for a verb, or empty when unknown / not -specified. Mirrors Python's -`get_verb_required_properties(verb_name)`. - -#### Signature - -```rust -fn get_verb_required_properties(&self, verb_name: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/utils/schema_utils.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs) - -Line 132. - -*** - -### load\_schema - -Read and parse the JSON Schema. Mirrors Python's -`load_schema()`. - -#### Signature - -```rust -fn load_schema(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/utils/schema_utils.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs) - -Line 99. - -*** - -### new - -Construct a SchemaUtils. Mirrors Python's -`SchemaUtils(schema_path=None, schema_validation=True)`. - -#### Signature - -```rust -fn new(schema_path: ?, schema_validation: bool) -> Self -``` - -#### Parameters - - - - - -#### Returns - -`Self` - -#### Source - -[`src/utils/schema_utils.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs) - -Line 74. - -*** - -### validate\_document - -Validate a complete SWML document. Mirrors Python's -`validate_document(document)`. Returns -`(false, ["Schema validator not initialized"])` when no full -validator is wired in. - -#### Signature - -```rust -fn validate_document(&self, _document: &?) -> (bool, ?) -``` - -#### Parameters - - - -#### Returns - -`(bool, ?)` - -#### Source - -[`src/utils/schema_utils.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs) - -Line 192. - -*** - -### validate\_verb - -Validate a verb config against the schema. Mirrors Python's -`validate_verb(verb_name, verb_config)`. - -#### Signature - -```rust -fn validate_verb(&self, verb_name: &str, verb_config: &?) -> (bool, ?) -``` - -#### Parameters - - - - - -#### Returns - -`(bool, ?)` - -#### Source - -[`src/utils/schema_utils.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs) - -Line 155. - -## Source - -[`src/utils/schema_utils.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs) - -Line 63. diff --git a/fern/products/sdk-reference/rust/signalwire/utils/schema-utils/schema-validation-error/index.mdx b/fern/products/sdk-reference/rust/signalwire/utils/schema-utils/schema-validation-error/index.mdx deleted file mode 100644 index ede55e5c5a..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/utils/schema-utils/schema-validation-error/index.mdx +++ /dev/null @@ -1,138 +0,0 @@ ---- -slug: "/reference/rust/signalwire/utils/schema-utils/schema-validation-error" -title: "SchemaValidationError" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::utils::schema_utils::SchemaValidationError" - parent: "signalwire::utils::schema_utils" - module: "utils.schema_utils" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs" - visibility: "public" ---- -# `SchemaValidationError` - -SchemaValidationError — Rust port of -`signalwire.utils.schema_utils.SchemaValidationError`. - -## Signature - -```rust -struct SchemaValidationError { /* fields */ } -``` - -## Inheritance - -**Implements:** `Debug`, `Clone`, `Display`, [Error](/docs/sdk-reference/reference/rust/signalwire/security/webhook-layer/webhook-validate#error) - -## Properties - - - - - -## Methods - -### clone - -#### Signature - -```rust -fn clone(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/utils/schema_utils.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs) - -Line 26. - -*** - -### fmt - -#### Signature - -```rust -fn fmt(&self, f: &mut ?<'_>) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/utils/schema_utils.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs) - -Line 26. - -*** - -### fmt - -#### Signature - -```rust -fn fmt(&self, f: &mut ?<'_>) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/utils/schema_utils.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs) - -Line 41. - -*** - -### new - -Construct a SchemaValidationError. Mirrors Python's -`SchemaValidationError(verb_name, errors)`. - -#### Signature - -```rust -fn new(verb_name: ?, errors: ?) -> Self -``` - -#### Parameters - - - - - -#### Returns - -`Self` - -#### Source - -[`src/utils/schema_utils.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs) - -Line 35. - -## Source - -[`src/utils/schema_utils.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs) - -Line 27. diff --git a/fern/products/sdk-reference/rust/signalwire/utils/schema-utils/verb-definition/index.mdx b/fern/products/sdk-reference/rust/signalwire/utils/schema-utils/verb-definition/index.mdx deleted file mode 100644 index b5d0c9225e..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/utils/schema-utils/verb-definition/index.mdx +++ /dev/null @@ -1,86 +0,0 @@ ---- -slug: "/reference/rust/signalwire/utils/schema-utils/verb-definition" -title: "VerbDefinition" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::utils::schema_utils::VerbDefinition" - parent: "signalwire::utils::schema_utils" - module: "utils.schema_utils" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs" - visibility: "public" ---- -# `VerbDefinition` - -Verb metadata extracted from the schema. - -## Signature - -```rust -struct VerbDefinition { /* fields */ } -``` - -## Inheritance - -**Implements:** `Debug`, `Clone` - -## Properties - - - - - - - -## Methods - -### clone - -#### Signature - -```rust -fn clone(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/utils/schema_utils.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs) - -Line 54. - -*** - -### fmt - -#### Signature - -```rust -fn fmt(&self, f: &mut ?<'_>) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/utils/schema_utils.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs) - -Line 54. - -## Source - -[`src/utils/schema_utils.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/schema_utils.rs) - -Line 55. diff --git a/fern/products/sdk-reference/rust/signalwire/utils/url-validator/index.mdx b/fern/products/sdk-reference/rust/signalwire/utils/url-validator/index.mdx deleted file mode 100644 index 8b14fdf486..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/utils/url-validator/index.mdx +++ /dev/null @@ -1,89 +0,0 @@ ---- -slug: "/reference/rust/signalwire/utils/url-validator" -title: "url_validator" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "signalwire::utils::url_validator" - parent: "signalwire::utils" - module: "utils" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/utils/url_validator.rs" - visibility: "public" ---- -# `url_validator` - -SSRF-prevention guard for user-supplied URLs. - -Mirrors Python's `signalwire.utils.url_validator.validate_url`: -rejects non-http(s) schemes, missing hostnames, and any URL whose -hostname resolves to a private / loopback / link-local / cloud- -metadata IP. When `allow_private` is true, OR the -`SWML_ALLOW_PRIVATE_URLS` env var is set to `"1"`, `"true"`, or -`"yes"` (case-insensitive), the IP-blocklist check is skipped. - -## Constants - - - Cross-port SSRF block list. Order matches the Python reference for ease of cross-language review. - - -## Functions - -### \_set\_resolver - -Install a custom resolver (for tests). Pass `None` to clear. - -#### Signature - -```rust -fn _set_resolver(resolver: ?>) -``` - -#### Parameters - - - -#### Source - -[`src/utils/url_validator.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/url_validator.rs) - -Line 44. - -*** - -### validate\_url - -Validate that a URL is safe to fetch. - -Mirrors Python's `validate_url(url, allow_private=False) -> bool`. - -#### Signature - -```rust -fn validate_url(url: &str, allow_private: bool) -> bool -``` - -#### Parameters - - - - - -#### Returns - -`bool` - -#### Source - -[`src/utils/url_validator.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/url_validator.rs) - -Line 116. - -## Source - -[`src/utils/url_validator.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/utils/url_validator.rs) - -Line 6. diff --git a/fern/products/sdk-reference/typescript/_meta.json b/fern/products/sdk-reference/typescript/_meta.json index 101d43071b..e9e2be89b4 100644 --- a/fern/products/sdk-reference/typescript/_meta.json +++ b/fern/products/sdk-reference/typescript/_meta.json @@ -6,5 +6,5 @@ "format": "mdx", "platform": "fern", "base_slug": "/reference/typescript", - "item_count": 3897 + "item_count": 3913 } \ No newline at end of file diff --git a/fern/products/sdk-reference/typescript/agent-base/index.mdx b/fern/products/sdk-reference/typescript/agent-base/index.mdx deleted file mode 100644 index 34a20c6117..0000000000 --- a/fern/products/sdk-reference/typescript/agent-base/index.mdx +++ /dev/null @@ -1,3741 +0,0 @@ ---- -slug: "/reference/typescript/agent-base" -title: "AgentBase" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "AgentBase" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts" ---- -# `AgentBase` - -Core agent class that composes an HTTP server, prompt management, session handling, -SWAIG tool registry, and 5-phase SWML rendering into a single deployable unit. - -A single `AgentBase` is one HTTP-servable voice agent: - -- `GET /` returns the SWML call-flow document -- `POST /swaig` dispatches SWAIG function calls to registered tool handlers -- `POST /post_prompt` receives the end-of-call summary and invokes `onSummary` - -Most user agents either (a) subclass `AgentBase` and override `defineTools()` / `onSummary()` -or (b) use one of the `prefab agents` (e.g. `ReceptionistAgent`). - -## Signature - -```typescript -class AgentBase extends SWMLService -``` - -## Inheritance - -**Extends:** [SWMLService](/docs/sdk-reference/reference/typescript/swml-service) - -## Examples - - - - ```typescript - import { AgentBase, FunctionResult } from '@signalwire/sdk'; - - class WeatherAgent extends AgentBase { - static override PROMPT_SECTIONS = [ - { title: 'Role', body: 'You are a weather assistant.' }, - ]; - - protected override defineTools(): void { - this.defineTool({ - name: 'get_forecast', - description: 'Return the forecast for a city.', - parameters: { - type: 'object', - properties: { city: { type: 'string' } }, - required: ['city'], - }, - handler: async ({ city }) => { - const forecast = await fetchForecast(city as string); - return new FunctionResult(forecast); - }, - }); - } - } - - const agent = new WeatherAgent({ name: 'weather', route: '/' }); - await agent.serve({ port: 3000 }); - ``` - - - - ```typescript - const agent = new AgentBase({ name: 'hello', route: '/' }); - agent.setPromptText('You are a friendly greeter.'); - agent.defineTool({ - name: 'say_hi', - description: 'Respond with a greeting.', - parameters: { type: 'object', properties: {} }, - handler: () => new FunctionResult('Hello from SignalWire!'), - }); - await agent.serve(); - ``` - - - -## See Also - -- \- \[FunctionResult]\(/docs/sdk-reference/reference/typescript/function-result) — builder for tool handler responses - \- \[ContextBuilder]\(/docs/sdk-reference/reference/typescript/context-builder) — multi-step conversation state machines - \- \[DataMap]\(/docs/sdk-reference/reference/typescript/data-map) — server-side tools without webhooks - \- \[AgentServer]\(/docs/sdk-reference/reference/typescript/agent-server) — host multiple agents on one HTTP server - -## Properties - - - Unique identifier for this agent instance. - - - - - - - - Domain name for SSL. Mirrors Python's `self.domain`. - - - - Check if full JSON Schema validation is enabled. Mirrors Python's `@property full_validation_enabled`. - - - - Host the server binds to. - - - - Structured logger instance for this agent. Override the inherited SWMLService logger with an AgentBase-tagged one. - - - - Service display name. - - - - Public accessor for the native functions list. Python exposes `self.native_functions` as a public read/write attribute. - - - - - - Public accessor for the agent's POM as a [PromptObjectModel](/docs/sdk-reference/reference/typescript/pom/prompt-object-model) instance. Python parity: `agent.pom` instance attribute (agent\_base.py line 209) is a `signalwire.pom.pom.PromptObjectModel` when `use_pom=True`, or `None` otherwise. This getter returns the equivalent TypeScript `PromptObjectModel` instance — callers can use `addSection`, `findSection`, `renderMarkdown`, `renderXml`, `toJson`, `toYaml` exactly as in Python. The instance returned is a fresh snapshot built from the current `PomBuilder` state, so mutating it does not feed back into the agent's internal builder. To mutate the agent's prompt, use `promptAddSection` / `promptAddToSection` / `promptAddSubsection`. - - - - Port the server binds to. - - - - Static prompt sections: subclasses can define these declaratively. Each entry is applied via promptAddSection() in the constructor. - - - - Public accessor for the PromptManager (POM). Python exposes `self.pom` as a public attribute. This getter provides equivalent access for direct POM manipulation. - - - - HTTP route path. - - - - Schema validation utilities. Mirrors Python's `self.schema_utils`. - - - - Unified security configuration. Mirrors Python's `self.security`. - - - - Public read-only accessor for the SkillManager. Python exposes `self.skill_manager` as a public attribute. This getter provides equivalent read access. - - - - Path to SSL certificate. Mirrors Python's `self.ssl_cert_path`. - - - - Whether SSL is enabled. Mirrors Python's `self.ssl_enabled`. - - - - Path to SSL private key. Mirrors Python's `self.ssl_key_path`. - - - - The complete set of internal SWAIG function names that accept fillers, matching the SWAIGInternalFiller schema definition. Any name outside this set is silently ignored by the runtime — addInternalFiller / setInternalFillers warn if you pass an unknown name. - - - - - - - - Custom verb handler registry. Mirrors Python's `self.verb_registry`. - - -## Methods - -### addAnswerVerb - -Configure the answer verb (phase 2) with optional settings. - -#### Signature - -```typescript -addAnswerVerb(config?: Record): this -``` - -#### Parameters - - - Optional answer verb configuration. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1501. - -*** - -### addFunctionInclude - -Add a remote SWAIG function include reference. - -#### Signature - -```typescript -addFunctionInclude( - url: string, - functions: string[], - metaData?: Record -): this -``` - -#### Parameters - - - URL of the remote SWAIG endpoint. - - - - Function names available at that endpoint. - - - - Optional metadata to attach to the include. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 966. - -*** - -### addHint - -Add a single speech-recognition hint. - -#### Signature - -```typescript -addHint(hint: string): this -``` - -#### Parameters - - - Word or phrase to boost in speech recognition. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 653. - -*** - -### addHints - -Add multiple speech-recognition hints at once. - -#### Signature - -```typescript -addHints(hints: string[]): this -``` - -#### Parameters - - - Array of words or phrases to boost. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 663. - -*** - -### addInternalFiller - -Add internal filler phrases for a single internal function and language. - -See [setInternalFillers](/docs/sdk-reference/reference/typescript/agent-base#set-internal-fillers) for the complete list of supported -functionName values and an explanation of what fillers do. - -#### Signature - -```typescript -addInternalFiller( - functionName: string, - languageCode: string, - fillers: string[] -): this -``` - -#### Parameters - - - One of the supported internal function names (see SUPPORTED\_INTERNAL\_FILLER\_NAMES). Names outside the supported set log a warning and are ignored by the runtime. - - - - BCP-47 language code for the fillers (e.g. 'en-US'). - - - - Array of filler phrases. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 943. - -*** - -### addLanguage - -Add a supported language to the AI configuration. - -#### Signature - -```typescript -addLanguage(config: LanguageConfig): this -``` - -#### Parameters - - - Language configuration including name, code, voice, and optional fillers. `params` may be set to attach engine-specific tuning (voice stability, similarity boost, model knobs, etc.); only emitted into SWML when non-empty so existing entries stay byte-identical when no params are passed (Python ai\_config\_mixin.py `add_language`). - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 694. - -*** - -### addMcpServer - -Add an external MCP server for tool discovery and invocation. -Tools are discovered via MCP protocol at session start and added to the AI's tool list. - -#### Signature - -```typescript -addMcpServer(url: string, opts?: { ...3 fields }): this -``` - -#### Parameters - - - MCP server HTTP endpoint URL - - - - Optional configuration: headers, resources, resourceVars - - - - - - - - -#### Returns - -`this` — This agent instance for chaining - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1146. - -*** - -### addPatternHint - -Add a pattern-based speech-recognition hint with find-and-replace behavior. - -#### Signature - -```typescript -addPatternHint(opts: { ...4 fields }): this -``` - -#### Parameters - - - Pattern hint configuration with a descriptive hint label, regex pattern, replacement string, and optional case-insensitive flag. - - - - - - - - - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 674. - -*** - -### addPostAiVerb - -Add a SWML verb to execute after the AI verb (phase 5). - -#### Signature - -```typescript -addPostAiVerb(verbName: string, config: Record): this -``` - -#### Parameters - - - Name of the SWML verb. - - - - Verb configuration object. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1523. - -*** - -### addPostAnswerVerb - -Add a SWML verb to execute after the answer phase but before the AI verb (phase 3). - -#### Signature - -```typescript -addPostAnswerVerb( - verbName: string, - config: number | Record -): this -``` - -#### Parameters - - - Name of the SWML verb. - - - - Verb configuration object. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1512. - -*** - -### addPreAnswerVerb - -Add a SWML verb to execute before the answer phase (phase 1). - -#### Signature - -```typescript -addPreAnswerVerb( - verbName: string, - config: number | Record -): this -``` - -#### Parameters - - - Name of the SWML verb (e.g. "play", "record"). - - - - Verb configuration object. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1491. - -*** - -### addPronunciation - -Add a pronunciation override rule for the TTS engine. - -#### Signature - -```typescript -addPronunciation(rule: PronunciationRule): this -``` - -#### Parameters - - - Pronunciation rule specifying the text to replace and its substitute. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 774. - -*** - -### addSection - -Add a new named section to the SWML document. -Mirrors Python's `add_section()`. - -#### Signature - -```typescript -addSection(sectionName: string): this -``` - -#### Parameters - - - Name of the section to create. - - -#### Returns - -`this` — This service for chaining. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 653. - -*** - -### addSkill - -Add a skill to this agent, registering its tools, prompt sections, hints, and global data. - -#### Signature - -```typescript -addSkill(skill: SkillBase): Promise -``` - -#### Parameters - - - The skill instance to add. - - -#### Returns - -`Promise` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1570. - -*** - -### addSkillByName - -Add a skill by its registered name, looking it up in the global SkillRegistry. - -Matches Python's `add_skill(skill_name, params)` which loads skills by string -name via the SkillManager registry. Throws a `ValueError`-equivalent if the -skill name is not found in the registry. - -Accepts a typed [SkillNameOrString](/docs/sdk-reference/reference/typescript/skills/skill-name#skill-name-or-string): one of the built-in -`SkillName` values (autocompleted, with a typo caught at compile -time) or any other string for custom / third-party skills. The value is -forwarded to the registry unchanged — the typing is erased at runtime, so -this matches Python's bare-`str` `add_skill(skill_name, params)`. - -#### Signature - -```typescript -addSkillByName( - skillName: SkillNameOrString, - params?: SkillConfig -): Promise -``` - -#### Parameters - - - The name the skill was registered under in the SkillRegistry. - - - - Optional configuration parameters forwarded to the skill factory. - - -#### Returns - -`Promise` — This agent instance for chaining. - -#### Throws - -- Error if no skill with the given name is registered. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1641. - -*** - -### addSwaigQueryParams - -Add extra query parameters appended to all SWAIG webhook URLs. - -#### Signature - -```typescript -addSwaigQueryParams(params: Record): this -``` - -#### Parameters - - - Key-value pairs to append as query parameters. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1733. - -*** - -### addVerb - -Add a verb to the SWML document. - -#### Signature - -```typescript -addVerb(name: string, config: unknown): this -``` - -#### Parameters - - - Verb name (e.g., 'answer', 'play', 'hangup'). - - - - Verb configuration. - - -#### Returns - -`this` — This service for chaining. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 642. - -*** - -### addVerbToSection - -Add a verb to a specific named section. -Mirrors Python's `add_verb_to_section()`. - -#### Signature - -```typescript -addVerbToSection(sectionName: string, verbName: string, config: unknown): this -``` - -#### Parameters - - - Target section name (auto-created if missing). - - - - Verb name. - - - - Verb configuration. - - -#### Returns - -`this` — This service for chaining. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 669. - -*** - -### asRouter - -Return this agent's Hono app for mounting as a sub-router in an AgentServer. - -#### Signature - -```typescript -asRouter(): Hono -``` - -#### Returns - -`Hono` — The Hono application instance. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 2656. - -*** - -### autoMapSipUsernames - -Automatically register common SIP usernames based on this agent's -name and route. Derives cleaned variants (alphanumeric + underscore) -and registers each via `registerSipUsername()`. - -Port of Python's `auto_map_sip_usernames()`: - -- Registers a cleaned version of the agent name -- Registers a cleaned version of the route (if different from name) -- For names longer than 3 characters, also registers a vowel-stripped variant - -#### Signature - -```typescript -autoMapSipUsernames(): this -``` - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1058. - -*** - -### buildSwmlForRequest - -Service-side SWML-builder hook. Subclasses return a `SwmlBuilder` -to fully replace the document for this request, or `null` to fall -through to `setOnRequestCallback` or the static builder. - -This is distinct from the WebMixin `onRequest(requestData, -callbackPath)` hook on AgentBase (which mirrors Python's -`on_request -> on_swml_request` modification-merge contract). -Use this hook when you want to swap the entire SWML builder; use -`onRequest` / `onSwmlRequest` on AgentBase when you want to merge -targeted modifications into the rendered document. - -Default implementation returns `null` (no-op). - -#### Signature - -```typescript -buildSwmlForRequest( - _queryParams: Record, - _bodyParams: Record, - _headers: Record, - _callbackPath?: string -): SwmlBuilder | null -``` - -#### Parameters - - - - - - - - - -#### Returns - -`SwmlBuilder | null` — A `SwmlBuilder` whose document is sent as the response, or `null` to delegate to the next handler in the chain. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 834. - -*** - -### clearPostAiVerbs - -Remove all post-AI verbs. - -#### Signature - -```typescript -clearPostAiVerbs(): this -``` - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1550. - -*** - -### clearPostAnswerVerbs - -Remove all post-answer verbs. - -#### Signature - -```typescript -clearPostAnswerVerbs(): this -``` - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1541. - -*** - -### clearPreAnswerVerbs - -Remove all pre-answer verbs. - -#### Signature - -```typescript -clearPreAnswerVerbs(): this -``` - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1532. - -*** - -### clearSwaigQueryParams - -Clear all SWAIG query parameters. - -#### Signature - -```typescript -clearSwaigQueryParams(): this -``` - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1742. - -*** - -### constructor - -Create a new AgentBase instance. - -#### Signature - -```typescript -constructor(opts: AgentOptions): AgentBase -``` - -#### Parameters - - - Agent configuration options including name, route, auth, and call settings. - - -#### Returns - -`AgentBase` - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 221. - -*** - -### createToolToken - -Mint a per-call SWAIG-function token via the agent's SessionManager. - -Mirrors Python reference `core/mixins/state_mixin.py _create_tool_token`: -delegates to `SessionManager.createToolToken` and returns an empty -string on any failure (Python catches all exceptions and returns ""). - -#### Signature - -```typescript -createToolToken(toolName: string, callId: string): string -``` - -#### Parameters - - - - - -#### Returns - -`string` - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1475. - -*** - -### defineContexts - -Define or replace the contexts configuration for the AI verb. - -#### Signature - -```typescript -defineContexts( - contexts?: Record | ContextBuilder -): ContextBuilder -``` - -#### Parameters - - - An existing ContextBuilder instance or a plain object; a new ContextBuilder is created if omitted. - - -#### Returns - -`ContextBuilder` — The active ContextBuilder for further configuration. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 604. - -*** - -### defineTool - -Register a SWAIG tool (function) that the AI can invoke during a call. - -#### How this becomes a tool the model sees - -A SWAIG function is **exactly the same concept** as a "tool" in -native OpenAI / Anthropic tool calling. On every LLM turn, the SDK -renders each registered SWAIG function into the OpenAI tool schema: - -```json -{ -"type": "function", -"function": { -"name": "your_name_here", -"description": "your description text", -"parameters": { /* your JSON schema */ } -} -} -``` - -That schema goes to the model in the same API call that produces -the next assistant message. The model reads: - -- the **function `description`** to decide WHEN to call this tool -- each **parameter `description`** (inside the JSON schema) to - decide HOW to fill in each argument - -This means **descriptions are prompt engineering**, not developer -comments. A vague description is the #1 cause of "the model has the -right tool but doesn't call it" failures. - -##### Bad vs good descriptions - -```text -BAD : description: 'Lookup function' -GOOD: description: 'Look up a customer's account details by account -number. Use this BEFORE quoting any account-specific info -(balance, plan, status). Do not use for general product -questions.' - -BAD : parameters: { id: { type: 'string', description: 'the id' } } -GOOD: parameters: { account_number: { type: 'string', description: -'The customer's 8-digit account number, no dashes or spaces. -Ask the user if they don't provide it.' } } -``` - -##### Tool count matters - -LLM tool selection accuracy degrades past ~7-8 simultaneously-active -tools per call. Use Step.setFunctions() to partition tools across -steps so only the relevant subset is active at any moment. - -#### Signature - -```typescript -defineTool(opts: { ...11 fields }): this -``` - -#### Parameters - - - Tool definition including name, description, parameter schema, and handler callback. `description` and per-parameter `description` strings are LLM-facing prompt engineering. - - - - - Additional fields to pass through to the SWAIG function definition (Python `**swaig_fields` equivalent). - - - - - - - - - - - - - - - - - - - - External webhook URL; makes this an externally-hosted tool. - - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1330. - -*** - -### defineTools - -Lifecycle method to register tools. Subclasses should call this at the -end of their own constructor (after all fields are initialized). -Not called automatically — call `this.defineTools()` explicitly. - -#### Signature - -```typescript -defineTools(): void -``` - -#### Returns - -`void` - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 359. - -*** - -### defineTypedTool - -Register a SWAIG tool with a typed handler that receives named parameters -instead of the standard `(args, rawData)` convention. - -The SDK wraps the handler to unpack the args dict into positional params. -If no `parameters` schema is provided, one is inferred from the handler's -source code (parameter names and default values). - -#### Signature - -```typescript -defineTypedTool(opts: { ...9 fields }): this -``` - -#### Parameters - - - Tool definition with a typed handler function. - - - - - - - The typed handler. Receives the AI-extracted arguments as named positional parameters (in declaration order), optionally with a trailing `rawData` record, and returns a SWAIG result. Precisely typed as [TypedToolHandler](/docs/sdk-reference/reference/typescript/type-inference#typed-tool-handler) rather than the bare `Function` so a non-callable — or a callable that returns nothing usable — is a compile-time error. - - - - - - - - - - - - - - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1373. - -*** - -### enableDebugEvents - -Enable debug event webhooks for this agent. - -#### Signature - -```typescript -enableDebugEvents(level: number = 1): this -``` - -#### Parameters - - - Debug verbosity level (defaults to 1). - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1011. - -*** - -### enableDebugRoutes - -Register a callback function that determines routing based on POST data. - -When a routing callback is registered, an endpoint at the specified path -is created in `getApp()`. The callback receives the request body and returns -Enable debug routes for testing and development. - -This is a backward-compatibility stub matching the Python SDK. -In the TypeScript SDK, debug routes (health, ready, debug\_events) -are automatically registered in `getApp()`. - -#### Signature - -```typescript -enableDebugRoutes(): this -``` - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1773. - -*** - -### enableMcpServer - -Expose this agent's tools as an MCP server endpoint at /mcp. -Adds a JSON-RPC 2.0 endpoint that MCP clients (Claude Desktop, other agents) can connect to. - -#### Signature - -```typescript -enableMcpServer(): this -``` - -#### Returns - -`this` — This agent instance for chaining - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1160. - -*** - -### enableSipRouting - -Enable SIP routing for this agent. - -#### Signature - -```typescript -enableSipRouting(autoMap: boolean = true, path: string = '/sip'): this -``` - -#### Parameters - - - When true, automatically map SIP usernames to the agent route (defaults to true). - - - - HTTP path for the SIP routing endpoint (defaults to '/sip'). - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1025. - -*** - -### extractSipUsername - -Extract the SIP username from a request body's call.to field. - -**Modifiers:** `static` - -#### Signature - -```typescript -extractSipUsername(requestBody: Record): string | null -``` - -#### Parameters - - - The parsed request body containing call information. - - -#### Returns - -`string | null` — The extracted SIP username, or null if not found. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1122. - -*** - -### getAllFunctions - -Snapshot of all registered SWAIG functions keyed by name. -(Python parity: `ToolRegistry.get_all_functions`.) - -#### Signature - -```typescript -getAllFunctions(): Record> -``` - -#### Returns - -`Record>` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 529. - -*** - -### getApp - -Get or lazily create the Hono HTTP application with all routes, middleware, auth, and CORS. - -#### Signature - -```typescript -getApp(): Hono -``` - -#### Returns - -`Hono` — The configured Hono application instance. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 2269. - -*** - -### getBasicAuthCredentials - -Get the basic-auth credentials used by this agent. - -#### Signature - - - - ```typescript - getBasicAuthCredentials(includeSource?: false): [string, string] - ``` - - - - ```typescript - getBasicAuthCredentials( - includeSource: true - ): [string, string, "provided" | "environment" | "generated"] - ``` - - - -#### Parameters (Overload 1) - - - When true, a third element indicating the credential source is appended. - - -#### Parameters (Overload 2) - - - When true, a third element indicating the credential source is appended. - - -#### Returns (Overload 1) - -`[string, string]` — A tuple of \[username, password] or \[username, password, source]. - -#### Returns (Overload 2) - -`[string, string, "provided" | "environment" | "generated"]` — A tuple of \[username, password] or \[username, password, source]. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 2794. - -*** - -### getBuilder - -Get the underlying SwmlBuilder for direct manipulation. - -#### Signature - -```typescript -getBuilder(): SwmlBuilder -``` - -#### Returns - -`SwmlBuilder` — The SwmlBuilder instance. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 632. - -*** - -### getContexts - -Get the contexts dictionary as serialised SWML, or null when no -contexts have been defined yet. - -Matches Python `PromptManager.get_contexts()` which returns the -contexts dict or `None`. - -#### Signature - -```typescript -getContexts(): Record | null -``` - -#### Returns - -`Record | null` — Contexts dict, or null when no contexts are defined. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 641. - -*** - -### getDocument - -Get the SWML document as a dictionary. -Alias for `renderSwml()` that matches Python's `get_document()` name. - -#### Signature - -```typescript -getDocument(): Record -``` - -#### Returns - -`Record` — The SWML document. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 706. - -*** - -### getFullUrl - -Get the full external URL of this agent, using the proxy base URL if available. - -#### Signature - -```typescript -getFullUrl(includeAuth: boolean = false): string -``` - -#### Parameters - - - Whether to embed basic-auth credentials in the URL (defaults to false). - - -#### Returns - -`string` — The fully-qualified URL string. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1857. - -*** - -### getFunction - -Get a registered SWAIG function entry, or undefined. -(Python parity: `ToolRegistry.get_function`.) - -#### Signature - -```typescript -getFunction(name: string): Record | SwaigFunction | undefined -``` - -#### Parameters - - - -#### Returns - -`Record | SwaigFunction | undefined` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 523. - -*** - -### getLanguageParams - -Read the per-language `params` dict for a previously-added language. - -Python parity: `get_language_params(code)`. Returns `undefined` if the -code is unknown or the language has no params set — no exception path. - -#### Signature - -```typescript -getLanguageParams(code: string): Record | undefined -``` - -#### Parameters - - - Language code as previously passed to [addLanguage](/docs/sdk-reference/reference/typescript/agent-base#add-language). - - -#### Returns - -`Record | undefined` — The params dict if set, `undefined` otherwise (including when the code is unknown). - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 760. - -*** - -### getMcpServers - -Get configured MCP servers (read-only copy). - -#### Signature - -```typescript -getMcpServers(): Record[] -``` - -#### Returns - -`Record[]` - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1171. - -*** - -### getName - -Get the agent's display name. - -#### Signature - -```typescript -getName(): string -``` - -#### Returns - -`string` — The agent name string. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1559. - -*** - -### getPostPrompt - -Get the post-prompt text, if one has been set. - -#### Signature - -```typescript -getPostPrompt(): string | null -``` - -#### Returns - -`string | null` — The post-prompt string, or null if not configured. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 548. - -*** - -### getPrompt - -Get the fully rendered main prompt text. - -#### Signature - -```typescript -getPrompt(): string -``` - -#### Returns - -`string` — The assembled prompt string. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 520. - -*** - -### getPromptPom - -Get the raw POM (Prompt Object Model) structure as an array of section data objects, -when the agent is in POM mode and has at least one section. - -Matches Python `get_prompt()` which returns `Union[str, List[Dict]]` — a raw list when -in POM mode (via `pom.to_list()` / `pom.render_dict()`), or a string otherwise. -The TS `getPrompt()` always returns a string (rendered Markdown), so this companion -method exposes the raw POM structure for callers that need it for serialisation or -inspection (e.g. skills that inspect prompt sections). - -#### Signature - -```typescript -getPromptPom(): Record[] | null -``` - -#### Returns - -`Record[] | null` — An array of POM section data objects, or null if not in POM mode or POM is empty. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 536. - -*** - -### getRawPrompt - -Get the raw prompt text whatever `setPromptText` stored, or null when -no raw prompt has been set. - -Matches Python `PromptManager.get_raw_prompt()` which returns the raw -stored string or `None`. Use this instead of `getPrompt()` when you -need the unrendered text rather than the POM-rendered Markdown. - -#### Signature - -```typescript -getRawPrompt(): string | null -``` - -#### Returns - -`string | null` — The raw prompt string, or null if not set. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 562. - -*** - -### getRegisteredTools - -Get a summary of all registered tools with their names, descriptions, and -parameter schemas. Lifted from AgentBase so the swaig-test CLI can list -tools on a non-AgentBase SWMLService target (sidecar / standalone SWAIG -host). - -#### Signature - -```typescript -getRegisteredTools(): { description: string; name: string; parameters: Record }[] -``` - -#### Returns - -`{ description: string; name: string; parameters: Record }[]` — Array of tool descriptors. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 557. - -*** - -### getTool - -Look up a registered SwaigFunction by name. Lifted from AgentBase so -`swaig-test --exec ` works against a non-AgentBase SWMLService -target. - -#### Signature - -```typescript -getTool(name: string): SwaigFunction | undefined -``` - -#### Parameters - - - The tool name to search for. - - -#### Returns - -`SwaigFunction | undefined` — The SwaigFunction instance, or undefined if not found or not a SwaigFunction. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 581. - -*** - -### getTools - -Public access to the list of registered tools. - -In Python, `define_tools()` is public and returns `List[SWAIGFunction]`. -In TypeScript, `defineTools()` is a protected setup hook (void). This -method provides the equivalent public "get all tools" capability. - -#### Signature - -```typescript -getTools(): SwaigFunction[] -``` - -#### Returns - -`SwaigFunction[]` — Array of all registered SwaigFunction instances. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 371. - -*** - -### handleMcpRequest - -Handle an MCP JSON-RPC 2.0 request. Returns the response object. - -#### Signature - -```typescript -handleMcpRequest( - body: Record -): Promise> -``` - -#### Parameters - - - -#### Returns - -`Promise>` - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1204. - -*** - -### hasFunction - -Whether a SWAIG function with the given name is registered. -(Python parity: `ToolRegistry.has_function`.) - -#### Signature - -```typescript -hasFunction(name: string): boolean -``` - -#### Parameters - - - -#### Returns - -`boolean` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 517. - -*** - -### hasSkill - -Check whether a skill with the given name is registered. - -Accepts a typed [SkillNameOrString](/docs/sdk-reference/reference/typescript/skills/skill-name#skill-name-or-string) so built-in names autocomplete -and a typo is a compile-time error; any other string is still accepted -(custom skills / parity with Python's bare-`str` `has_skill`). - -#### Signature - -```typescript -hasSkill(skillName: SkillNameOrString): boolean -``` - -#### Parameters - - - The skill name to check. - - -#### Returns - -`boolean` — True if a skill with that name exists. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1676. - -*** - -### hasTool - -Whether a tool with the given name is registered. - -#### Signature - -```typescript -hasTool(name: string): boolean -``` - -#### Parameters - - - -#### Returns - -`boolean` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 511. - -*** - -### isMcpServerEnabled - -Check if MCP server endpoint is enabled. - -#### Signature - -```typescript -isMcpServerEnabled(): boolean -``` - -#### Returns - -`boolean` - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1166. - -*** - -### listSkills - -List all registered skills with their names, instance IDs, and initialization status. - -#### Signature - -```typescript -listSkills(): { initialized: boolean; instanceId: string; name: string }[] -``` - -#### Returns - -`{ initialized: boolean; instanceId: string; name: string }[]` — Array of skill descriptors. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1662. - -*** - -### listToolNames - -List registered tool names in insertion order (Map preserves it). - -#### Signature - -```typescript -listToolNames(): string[] -``` - -#### Returns - -`string[]` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 545. - -*** - -### manualSetProxyUrl - -Manually set the proxy base URL used for webhook URL generation. - -#### Signature - -```typescript -manualSetProxyUrl(url: string): this -``` - -#### Parameters - - - The external-facing base URL (trailing slashes are stripped). - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1754. - -*** - -### onDebugEvent - -Lifecycle hook called when a debug event webhook is received. Override in subclasses. - -#### Signature - -```typescript -onDebugEvent(_event: Record): void | Promise -``` - -#### Parameters - - - The debug event payload. - - -#### Returns - -`void | Promise` - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1970. - -*** - -### onFunctionCall - -Hook called before each SWAIG function execution. Override in subclasses. - -**Behavioral note:** In the Python SDK, `on_function_call` IS the dispatcher -— it retrieves and executes the function, returning the result. In TypeScript, -`fn.execute()` is called separately after this hook. However, if this method -returns a non-void value, it is used as the result and the default execution -is skipped, enabling dispatch interception parity with Python. - -#### Signature - -```typescript -onFunctionCall( - _name: string, - _args: Record, - _rawData: Record -): void | Record | Promise> -``` - -#### Parameters - - - Name of the function about to execute. - - - - Parsed arguments for the function. - - - - The full raw SWAIG request payload. - - -#### Returns - -`void | Record | Promise>` — Optionally a result dict to short-circuit default execution, or void/undefined to proceed normally. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1999. - -*** - -### onRequest - -Lifecycle hook called when SWML is requested. Default delegates to -[onSwmlRequest](/docs/sdk-reference/reference/typescript/agent-base#on-swml-request) and returns its result. Subclasses typically -override `onSwmlRequest` rather than this method. - -Matches Python `WebMixin.on_request(request_data, callback_path)`. The -cross-language API is the two-arg form; the Hono `context` argument is -a TypeScript-side extra preserved for callers that already have it but -is not part of the audited surface. - -#### Signature - -```typescript -onRequest( - requestData?: Record | null, - callbackPath?: string | null -): void | Record | Promise> -``` - -#### Parameters - - - The parsed request body. - - - - Optional callback path from the request. - - -#### Returns - -`void | Record | Promise>` — Optionally a dict of SWML modifications, or undefined for default rendering. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1935. - -*** - -### onSummary - -Lifecycle hook called when a post-prompt summary is received. Override in subclasses. - -Invoked once at the end of a call when the AI has produced a structured summary -(configured via `setPostPrompt()` / `setPostPromptJson()`). Use this hook to persist -call data, notify other systems, or trigger follow-up workflows. - -#### Signature - -```typescript -onSummary( - _summary: Record | null, - _rawData: Record -): void | Promise -``` - -#### Parameters - - - Parsed summary object (JSON when the post-prompt requests structured output), or `null` if extraction/parsing failed. - - - - Full raw post-prompt payload received from the platform, including call metadata, conversation history, and the summary text. - - -#### Returns - -`void | Promise` - -#### Examples - -```typescript -class MyAgent extends AgentBase { - async onSummary(summary, rawData) { - if (!summary) return; - await db.calls.insert({ - callSid: rawData.call_id, - summary, - endedAt: new Date(), - }); - } -} -``` - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1916. - -*** - -### onSwmlRequest - -Lifecycle hook called on every SWML request before rendering. Override in subclasses. - -May optionally return a modification dict that will be merged into the -rendered SWML document (matching Python's `Optional[dict]` return type). - -Matches Python `on_swml_request(request_data, callback_path, request)` — the third -parameter is the FastAPI `Request` in Python; here it is the raw Hono context object -so that subclasses can access query parameters (`context.req.query()`), raw request -headers (`context.req.raw.headers`), etc. - -#### Signature - -```typescript -onSwmlRequest( - _rawData: Record, - _callbackPath?: string, - _context?: any -): void | Record | Promise> -``` - -#### Parameters - - - The parsed request body. - - - - Optional callback path from the request. - - - - The raw Hono context object (c), providing access to headers and query params. - - -#### Returns - -`void | Record | Promise>` — Optionally a dict of SWML modifications, or void. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1958. - -*** - -### promptAddSection - -Add a new section to the prompt with optional body, bullets, and subsections. - -#### Signature - -```typescript -promptAddSection(title: string, opts?: { ...5 fields }): this -``` - -#### Parameters - - - Section heading. - - - - Optional section content including body text, bullet points, and subsections. - - - - - - - - - - - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 467. - -*** - -### promptAddSubsection - -Add a subsection under an existing prompt section. - -#### Signature - -```typescript -promptAddSubsection( - parentTitle: string, - title: string, - opts?: { ...2 fields } -): this -``` - -#### Parameters - - - Title of the parent section. - - - - Title of the new subsection. - - - - Optional body text and bullet points for the subsection. - - - - - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 502. - -*** - -### promptAddToSection - -Append content to an existing prompt section. - -#### Signature - -```typescript -promptAddToSection(title: string, opts?: { ...3 fields }): this -``` - -#### Parameters - - - Title of the section to append to. - - - - Content to add: body text, a single bullet, or multiple bullets. - - - - - - - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 487. - -*** - -### promptHasSection - -Check whether a prompt section with the given title exists. - -#### Signature - -```typescript -promptHasSection(title: string): boolean -``` - -#### Parameters - - - Section title to look for. - - -#### Returns - -`boolean` — True if the section exists. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 512. - -*** - -### registerAdditionalRoutes - -Extension point: register additional Hono routes after SWMLService -mounts /health, /ready, /swaig, and the main route. AgentBase uses -this to add /post\_prompt, /check\_for\_input, /debug\_events, /mcp. - -#### Signature - -```typescript -registerAdditionalRoutes(_app: Hono): void -``` - -#### Parameters - - - -#### Returns - -`void` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 604. - -*** - -### registerRoutingCallback - -Register a callback at a specific HTTP path that decides how to route an -incoming request. - -When called, the endpoint at `path` will invoke `callback` with the parsed -request body. If `callback` returns a non-empty route string the server -responds with `{ action: "redirect", route }` so the platform can forward the -request to the right agent. If `callback` returns `null` / `undefined` the -agent's own SWML is returned instead (normal processing). - -Mirrors Python `swml_service.register_routing_callback` / -`web_mixin.register_routing_callback`. - -#### Signature - -```typescript -registerRoutingCallback(callback: RoutingCallback, path: string = '/sip'): this -``` - -#### Parameters - - - Function receiving the parsed request body and returning a route string to redirect, or null/undefined for normal processing. - - - - HTTP path where this callback endpoint is registered (default: '/sip'). - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1102. - -*** - -### registerSipUsername - -Register a SIP username to route to this agent. - -#### Signature - -```typescript -registerSipUsername(username: string): this -``` - -#### Parameters - - - The SIP username to register. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1040. - -*** - -### registerSwaigFunction - -Register a SwaigFunction instance or a raw function descriptor (DataMap). - -#### Signature - -```typescript -registerSwaigFunction(fn: Record | SwaigFunction): this -``` - -#### Parameters - - - -#### Returns - -`this` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 472. - -*** - -### registerVerbHandler - -Register a custom verb handler. -Mirrors Python's `register_verb_handler()`. - -#### Signature - -```typescript -registerVerbHandler(handler: SWMLVerbHandler): void -``` - -#### Parameters - - - The verb handler to register. - - -#### Returns - -`void` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 726. - -*** - -### removeFunction - -Remove a registered SWAIG function. Returns true when removed, -false when not found. (Python parity: -`ToolRegistry.remove_function`.) - -#### Signature - -```typescript -removeFunction(name: string): boolean -``` - -#### Parameters - - - -#### Returns - -`boolean` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 540. - -*** - -### removeSkill - -Remove a previously added skill by its instance ID. - -#### Signature - -```typescript -removeSkill(instanceId: string): Promise -``` - -#### Parameters - - - The unique instance ID of the skill to remove. - - -#### Returns - -`Promise` — True if the skill was found and removed. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1654. - -*** - -### removeSkillByName - -Remove a skill by its name (Python parity). - -Python's `remove_skill(skill_name)` removes by skill name. -The existing `removeSkill(instanceId)` removes by instance ID. -This method provides name-based removal for cross-SDK parity. - -#### Signature - -```typescript -removeSkillByName(skillName: string): Promise -``` - -#### Parameters - - - The skill name to remove. - - -#### Returns - -`Promise` — True if a skill with that name was found and removed. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1690. - -*** - -### renderDocument - -Render the SWML document as a JSON string. -Mirrors Python's `render_document()`. - -#### Signature - -```typescript -renderDocument(): string -``` - -#### Returns - -`string` — JSON-encoded SWML document. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 715. - -*** - -### renderSwml - -Render the complete SWML document by assembling all 5 phases: pre-answer, answer, -post-answer, AI, and post-AI verbs. - -#### Signature - -```typescript -renderSwml(callId?: string, modifications?: Record): string -``` - -#### Parameters - - - Optional call ID to use for session tokens; auto-generated if omitted. - - - - Optional dict returned from `onSwmlRequest` to merge into the AI verb config before rendering. Matches Python's `_render_swml(modifications)` semantics: `global_data` is deep-merged; all other keys override the AI config directly. - - -#### Returns - -`string` — The rendered SWML document as a JSON string. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 2019. - -*** - -### resetContexts - -Remove all contexts, returning the agent to a no-contexts state. - -This is a convenience wrapper around `defineContexts().reset()`. -Use it in a dynamic config callback when you need to rebuild -contexts from scratch for a specific request. - -#### Signature - -```typescript -resetContexts(): this -``` - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 625. - -*** - -### resetDocument - -Reset the SWML document to an empty state. -Mirrors Python's `reset_document()`. - -#### Signature - -```typescript -resetDocument(): this -``` - -#### Returns - -`this` — This service for chaining. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 679. - -*** - -### run - -Alias for [serve](/docs/sdk-reference/reference/typescript/agent-base#serve). Starts the HTTP server. - -#### Signature - -```typescript -run(opts?: { ...2 fields }): Promise -``` - -#### Parameters - - - Optional host and port overrides. - - - - - - -#### Returns - -`Promise` — A promise that resolves once the server is running. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 2702. - -*** - -### runServerless - -Handle a single serverless invocation (AWS Lambda, Google Cloud Functions, Azure Functions, or CGI). - -Matches Python `run(event, context)` when executed in a serverless environment. Python's -`run()` auto-detects the platform via `get_execution_mode()` and dispatches accordingly; -in TypeScript the serverless path is an **explicit** method so that `run()` keeps its -HTTP-server semantics and callers opt in to serverless dispatch deliberately. - -Platform detection follows the same environment-variable heuristics as Python's -`ServerlessMixin`: `AWS_LAMBDA_FUNCTION_NAME` → Lambda, `K_SERVICE` → GCF, -`FUNCTIONS_WORKER_RUNTIME` → Azure, `GATEWAY_INTERFACE` → CGI. - -Usage in a Lambda handler file: - -```ts -export const handler = (event: any, context: any) => agent.runServerless(event, context); -``` - -#### Signature - -```typescript -runServerless( - event: ServerlessEvent, - context?: unknown, - platform?: "lambda" | "gcf" | "azure" | "cgi" | "auto" -): Promise -``` - -#### Parameters - - - The serverless event payload (Lambda event, GCF request body, etc.). - - - - The serverless context object (Lambda context, Azure context, etc.). - - - - Optional platform override; defaults to 'auto' (environment detection). - - -#### Returns - -`Promise` — The normalized serverless response object. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 2728. - -*** - -### serve - -Start the HTTP server and begin listening for requests. - -Uses `@hono/node-server` under the hood. When run in CLI mode -(`SWAIG_CLI_MODE=true`, set automatically by `npx swaig-test`), this is a -no-op so agent config can be inspected without starting a server. - -#### Signature - -```typescript -serve(opts?: { ...2 fields }): Promise -``` - -#### Parameters - - - Optional host/port overrides. Defaults to the values provided in the constructor options or the `PORT` environment variable. - - - - - - -#### Returns - -`Promise` — A promise that resolves once the server has begun listening. - -#### Examples - -```typescript -const agent = new AgentBase({ name: 'demo', port: 3000 }); -await agent.serve(); -// Or override at runtime: -await agent.serve({ port: 8080, host: '127.0.0.1' }); -``` - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 2679. - -*** - -### setDynamicConfigCallback - -Set a callback invoked on each SWML request to dynamically modify an ephemeral agent copy. - -The callback receives a clone of this agent — mutations apply only to the current -request, so you can vary prompt, tools, languages, params, or global data per call -without affecting the long-lived agent instance. - -#### Signature - -```typescript -setDynamicConfigCallback(cb: DynamicConfigCallback): this -``` - -#### Parameters - - - Callback receiving `(queryParams, bodyParams, headers, agent)` where `agent` is the ephemeral `AgentBase` copy to mutate. May be async. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Examples - -```typescript -agent.setDynamicConfigCallback((query, body, headers, agent) => { - const lang = query.lang ?? 'en'; - if (lang === 'es') { - (agent as AgentBase).setPromptText('Eres un asistente útil.'); - } -}); -``` - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1723. - -*** - -### setFunctionIncludes - -Replace the entire list of function includes. -Each include must have a `url` and `functions` array. - -#### Signature - -```typescript -setFunctionIncludes(includes: FunctionInclude[]): this -``` - -#### Parameters - - - Array of function include objects. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 979. - -*** - -### setGlobalData - -Merge data into the global\_data object passed into the AI configuration. - -Matches Python `set_global_data` which calls `.update()` on the internal dict — -existing keys are preserved; incoming keys overwrite on collision. Skills and -other callers can each contribute keys without clobbering one another. - -If you need to replace the entire object, assign a new agent instance or use -`Object.assign(agent.globalData, {})` to clear first. - -#### Signature - -```typescript -setGlobalData(data: Record): this -``` - -#### Parameters - - - Key-value pairs to merge into global data. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 828. - -*** - -### setInternalFillers - -Set internal fillers for native SWAIG functions. - -Internal fillers are short phrases the AI agent speaks (via TTS) while -an internal/native function is running, so the caller doesn't hear -dead air during transitions or background work. - -Supported function names (matches the SWAIGInternalFiller schema): - -hangup — when the agent is hanging up -check\_time — when checking the time -wait\_for\_user — when waiting for user input -wait\_seconds — during deliberate pauses -adjust\_response\_latency — when adjusting response timing -next\_step — transitioning between steps in prompt.contexts -change\_context — switching between contexts in prompt.contexts -get\_visual\_input — processing visual input (enable\_vision=true) -get\_ideal\_strategy — thinking (enable\_thinking=true) - -Notably NOT supported: change\_step, gather\_submit, or arbitrary -user-defined SWAIG function names. The runtime only honors fillers -for the names listed above; everything else is silently ignored at -the SWML level. This method warns at registration time if you pass -an unknown name so you catch the typo early. - -#### Signature - -```typescript -setInternalFillers( - internalFillers: Record> -): this -``` - -#### Parameters - - - Map of function name to language-keyed filler phrases. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Examples - -```typescript -agent.setInternalFillers({ - next_step: { - 'en-US': ['Moving to the next step...', 'Great, let us continue...'], - 'es': ['Pasando al siguiente paso...'] - }, - check_time: { - 'en-US': ['Let me check the time...'] - } -}); -``` - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 910. - -*** - -### setLanguageParams - -Set (or replace) the per-language `params` dict on an already-added -language. Useful when language entries are built up via [addLanguage](/docs/sdk-reference/reference/typescript/agent-base#add-language) -first and engine-specific tuning is added later (e.g., from a config -loader). - -Python parity: `set_language_params(code, params)`. Passing an empty -object removes the `params` key entirely. Unknown codes are a no-op. - -#### Signature - -```typescript -setLanguageParams(code: string, params: Record): this -``` - -#### Parameters - - - Language code as previously passed to [addLanguage](/docs/sdk-reference/reference/typescript/agent-base#add-language) (e.g. `"en-US"`). - - - - Engine-specific params dict to attach. Empty object removes the key. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 737. - -*** - -### setLanguages - -Replace all configured languages with a new list. - -#### Signature - -```typescript -setLanguages(languages: LanguageConfig[]): this -``` - -#### Parameters - - - Array of language configurations. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 718. - -*** - -### setNativeFunctions - -Set the list of native SWAIG function names (built-in platform functions). - -#### Signature - -```typescript -setNativeFunctions(funcs: string[]): this -``` - -#### Parameters - - - Array of native function names. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 848. - -*** - -### setOnRequestCallback - -Set a callback invoked per-request to dynamically build SWML. -When set, the static SwmlBuilder is ignored and the callback's -returned SwmlBuilder is used instead. - -#### Signature - -```typescript -setOnRequestCallback(cb: OnRequestCallback): this -``` - -#### Parameters - - - Callback receiving query params, body params, and headers. - - -#### Returns - -`this` — This service for chaining. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 850. - -*** - -### setParam - -Set a single AI parameter (e.g. "temperature", "top\_p"). - -#### Signature - -```typescript -setParam(key: string, value: unknown): this -``` - -#### Parameters - - - Parameter name. - - - - Parameter value. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 800. - -*** - -### setParams - -Merge multiple AI parameters into the existing params object. - -#### Signature - -```typescript -setParams(params: Record): this -``` - -#### Parameters - - - Key-value pairs to merge. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 810. - -*** - -### setPostPrompt - -Set the post-prompt text evaluated after the call ends. - -#### Signature - -```typescript -setPostPrompt(text: string): this -``` - -#### Parameters - - - The post-prompt text to use. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 456. - -*** - -### setPostPromptLlmParams - -Merge LLM-specific parameters into the post-prompt configuration. - -#### Signature - -```typescript -setPostPromptLlmParams(params: Record): this -``` - -#### Parameters - - - Key-value LLM parameters to merge. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1001. - -*** - -### setPostPromptUrl - -Override the default post-prompt webhook URL with a custom one. - -#### Signature - -```typescript -setPostPromptUrl(url: string): this -``` - -#### Parameters - - - The custom post-prompt URL. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1847. - -*** - -### setPromptLlmParams - -Merge LLM-specific parameters into the main prompt configuration (e.g. model, temperature). - -#### Signature - -```typescript -setPromptLlmParams(params: Record): this -``` - -#### Parameters - - - Key-value LLM parameters to merge. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 991. - -*** - -### setPromptPom - -Set the prompt as a POM (Prompt Object Model) dictionary. - -Replaces the current POM sections with the provided structured data. -Each entry should have `title`, and optionally `body`, `bullets`, -`numbered`, `numberedBullets`, and `subsections`. - -#### Signature - -```typescript -setPromptPom(pom: Record[]): this -``` - -#### Parameters - - - Array of POM section dictionaries. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Throws - -- Error if POM mode is not enabled (`usePom: false`). - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 577. - -*** - -### setPromptText - -Set the main system prompt text for the AI. - -#### Signature - -```typescript -setPromptText(text: string): this -``` - -#### Parameters - - - The prompt text to use. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 446. - -*** - -### setPronunciations - -Replace all pronunciation rules with a new list. - -#### Signature - -```typescript -setPronunciations(rules: PronunciationRule[]): this -``` - -#### Parameters - - - Array of pronunciation rule objects. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 786. - -*** - -### setupGracefulShutdown - -Register process signal handlers for clean Kubernetes/Docker shutdown. -Handles SIGTERM and SIGINT, waits for a timeout, then exits. - -**Modifiers:** `static` - -#### Signature - -```typescript -setupGracefulShutdown(opts?: { ...1 fields }): void -``` - -#### Parameters - - - Optional timeout in milliseconds (default 5000). - - - - -#### Returns - -`void` - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 2751. - -*** - -### setWebHookUrl - -Override the default SWAIG webhook URL with a custom one. - -#### Signature - -```typescript -setWebHookUrl(url: string): this -``` - -#### Parameters - - - The custom webhook URL. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1837. - -*** - -### stop - -Stop the HTTP server. -Mirrors Python's `stop()`. - -#### Signature - -```typescript -stop(): void -``` - -#### Returns - -`void` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 1009. - -*** - -### swaigPreDispatch - -Extension point: invoked between argument parsing and function dispatch -on POST /swaig. Returns \[target, shortCircuit]: when shortCircuit is -non-null, it's returned directly without dispatching. AgentBase may -override to add session-token validation or ephemeral dynamic-config. - -#### Signature - -```typescript -swaigPreDispatch( - _requestData: Record, - _funcName: string -): [SWMLService, unknown] -``` - -#### Parameters - - - - - -#### Returns - -`[SWMLService, unknown]` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 592. - -*** - -### updateGlobalData - -Merge additional entries into the existing global\_data object. - -#### Signature - -```typescript -updateGlobalData(data: Record): this -``` - -#### Parameters - - - Key-value pairs to merge into global data. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 838. - -*** - -### validateBasicAuth - -Override to add custom basic-auth validation logic beyond credential matching. - -#### Signature - -```typescript -validateBasicAuth( - _username: string, - _password: string -): boolean | Promise -``` - -#### Parameters - - - The username from the request. - - - - The password from the request. - - -#### Returns - -`boolean | Promise` — True if the credentials are valid; false to reject the request. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1980. - -*** - -### validateToolToken - -Validate a tool-call token for the given function. - -Mirrors Python reference `core/mixins/state_mixin.py validate_tool_token`: - -1. Unknown function → `false`. -2. Registered but non-secure → `true` without consulting SessionManager - (non-secure tools never require a token). -3. Raw-dict descriptors (e.g. DataMap) are treated as secure, matching - Python's `isinstance(func, dict) → is_secure = True` branch. -4. Missing token on a secure tool → `false`. -5. Otherwise delegate to `SessionManager.validateToolToken`. - -Divergences from the Python reference: - -- No debug-logging branch: `AgentBase` does not expose an agent-level - debug-mode flag, so the per-call debug telemetry Python emits is - omitted. `SessionManager` still logs its own validation outcomes. -- No token-derived call-id fallback: `SessionManager.debugToken` - truncates the embedded call-id for log safety, so an extracted value - cannot be round-tripped back through `validateToolToken`. The caller - is expected to supply a non-empty `callId`; an empty one is forwarded - unchanged and the underlying validator will reject it. - -#### Signature - -```typescript -validateToolToken(functionName: string, token: string, callId: string): boolean -``` - -#### Parameters - - - - - - - -#### Returns - -`boolean` - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1455. - -## Type Aliases - -### RoutingCallback - -Callback invoked at a registered routing endpoint to determine how to handle an -incoming request. Return a route string to redirect to that agent route, or -null / undefined to let normal SWML processing continue. - -Mirrors Python `web_mixin.register_routing_callback` callback signature (body-only -variant — Hono request object is not forwarded; use the parsed body instead). - -#### Signature - -```typescript -type RoutingCallback = (body: Record) => string | null | undefined | Promise -``` - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 46. - -## Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 111. diff --git a/fern/products/sdk-reference/typescript/agent-server/index.mdx b/fern/products/sdk-reference/typescript/agent-server/index.mdx deleted file mode 100644 index 7bf0e521f2..0000000000 --- a/fern/products/sdk-reference/typescript/agent-server/index.mdx +++ /dev/null @@ -1,416 +0,0 @@ ---- -slug: "/reference/typescript/agent-server" -title: "AgentServer" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "AgentServer" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentServer.ts" ---- -# `AgentServer` - -Multi-agent HTTP server that hosts multiple AgentBase instances on distinct route prefixes. - -Use `AgentServer` when one process should serve more than one agent — each with its own -prompt, tools, and route. Internally, each agent's Hono router is mounted under its own -path. Static assets can also be served from a configured directory. - -## Signature - -```typescript -class AgentServer -``` - -## Examples - -```typescript -import { AgentServer, AgentBase } from '@signalwire/sdk'; - -const salesAgent = new AgentBase({ name: 'sales', route: '/sales' }); -const supportAgent = new AgentBase({ name: 'support', route: '/support' }); - -const server = new AgentServer({ host: '0.0.0.0', port: 3000 }); -server.register(salesAgent); -server.register(supportAgent); - -await server.run(); -``` - -## See Also - -- \[[AgentBase](/docs/sdk-reference/reference/typescript/agent-base)]\(xref://[AgentBase](/docs/sdk-reference/reference/typescript/agent-base)) - -## Properties - - - Hostname the server binds to. - - - - Public logger for this server instance. - - - - Logging level (debug, info, warn, error). - - - - Port the server listens on. - - -## Methods - -### constructor - -Create an AgentServer. - -#### Signature - -```typescript -constructor(opts?: { ...3 fields }): AgentServer -``` - -#### Parameters - - - Optional host, port, and logLevel overrides; defaults to 0.0.0.0:3000, logLevel 'info'. - - - - - - - - -#### Returns - -`AgentServer` - -#### Source - -[`src/AgentServer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentServer.ts) - -Line 97. - -*** - -### getAgent - -Look up a registered agent by its route prefix. - -#### Signature - -```typescript -getAgent(route: string): AgentBase | undefined -``` - -#### Parameters - - - The route prefix to look up. - - -#### Returns - -`AgentBase | undefined` — The agent at that route, or undefined if none is registered. - -#### Source - -[`src/AgentServer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentServer.ts) - -Line 191. - -*** - -### getAgents - -Get all registered agents keyed by their route prefix. - -#### Signature - -```typescript -getAgents(): Map -``` - -#### Returns - -`Map` — A map of route prefixes to AgentBase instances. - -#### Source - -[`src/AgentServer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentServer.ts) - -Line 182. - -*** - -### getApp - -Build and return the Hono application with all registered agents and a root listing endpoint. - -#### Signature - -```typescript -getApp(): Hono -``` - -#### Returns - -`Hono` — The fully configured Hono app. - -#### Source - -[`src/AgentServer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentServer.ts) - -Line 384. - -*** - -### register - -Register an agent at the given route prefix. - -#### Signature - -```typescript -register(agent: AgentBase, route?: string): void -``` - -#### Parameters - - - The AgentBase instance to mount. - - - - Route prefix; defaults to the agent's own route or '/'. - - -#### Returns - -`void` - -#### Throws - -- If the route is already occupied by another agent. - -#### Source - -[`src/AgentServer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentServer.ts) - -Line 132. - -*** - -### registerGlobalRoutingCallback - -Register a routing callback across all agents at the given path. - -This allows unified routing logic to be applied to all agents from -a central server-level coordinator. - -#### Signature - -```typescript -registerGlobalRoutingCallback(callbackFn: RoutingCallback, path: string): void -``` - -#### Parameters - - - The callback function that receives a request and body, returning a route string or undefined. - - - - The path to register the callback at. - - -#### Returns - -`void` - -#### Source - -[`src/AgentServer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentServer.ts) - -Line 338. - -*** - -### registerSipUsername - -Register a mapping from a SIP username to an agent route at the server level. - -Allows callers to manually route an arbitrary SIP username to any already-registered -agent route, independent of the automatic mapping performed by `setupSipRouting`. - -#### Signature - -```typescript -registerSipUsername(username: string, route: string): void -``` - -#### Parameters - - - The SIP username to map (stored lowercase). - - - - The agent route to map the username to (leading `/` added if missing; trailing slashes stripped). - - -#### Returns - -`void` - -#### Source - -[`src/AgentServer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentServer.ts) - -Line 310. - -*** - -### run - -Start the HTTP server and begin listening for requests. - -This method handles server mode only. For serverless deployments -(AWS Lambda, Google Cloud Functions, Azure Functions), use -[ServerlessAdapter](/docs/sdk-reference/reference/typescript/serverless-adapter) instead. When `SWAIG_CLI_MODE=true` is set in -the environment, the call is a no-op so agent config can be inspected -without starting a server. - -#### Signature - -```typescript -run(host?: string, port?: number): Promise -``` - -#### Parameters - - - Override the configured hostname. Defaults to the constructor value. - - - - Override the configured port. Defaults to the constructor value. - - -#### Returns - -`Promise` — Resolves once the underlying Hono server has begun listening. - -#### Source - -[`src/AgentServer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentServer.ts) - -Line 420. - -*** - -### serveStaticFiles - -Serve static files from a local directory under a given route prefix. -Includes path traversal protection (rejects `..`), MIME type detection, -and security headers (Cache-Control, X-Content-Type-Options). - -#### Signature - -```typescript -serveStaticFiles(directory: string, route: string = '/'): void -``` - -#### Parameters - - - Absolute or relative path to the directory to serve. - - - - Route prefix for static files (defaults to '/'). - - -#### Returns - -`void` - -#### Source - -[`src/AgentServer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentServer.ts) - -Line 202. - -*** - -### setupSipRouting - -Set up central SIP-based routing for the server. - -This configures all agents to handle SIP requests at the specified path, -using a coordinated routing system where each agent checks if it can -handle SIP requests for specific usernames. - -#### Signature - -```typescript -setupSipRouting(route: string = '/sip', autoMap: boolean = true): void -``` - -#### Parameters - - - The path for SIP routing (default: '/sip'). - - - - Whether to automatically map SIP usernames to agent routes (default: true). - - -#### Returns - -`void` - -#### Source - -[`src/AgentServer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentServer.ts) - -Line 254. - -*** - -### unregister - -Remove an agent registration by route. - -#### Signature - -```typescript -unregister(route: string): boolean -``` - -#### Parameters - - - The route prefix to unregister. - - -#### Returns - -`boolean` — True if the agent was found and removed, false if not found. - -#### Source - -[`src/AgentServer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentServer.ts) - -Line 172. - -## Source - -[`src/AgentServer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentServer.ts) - -Line 70. diff --git a/fern/products/sdk-reference/typescript/agents/agent-base/index.mdx b/fern/products/sdk-reference/typescript/agents/agent-base/index.mdx new file mode 100644 index 0000000000..d6f6bb7110 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/agent-base/index.mdx @@ -0,0 +1,3743 @@ +--- +slug: "/reference/typescript/agents/agent-base" +title: "AgentBase" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "AgentBase" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts" +--- +# `AgentBase` + +Core agent class that composes an HTTP server, prompt management, session handling, +SWAIG tool registry, and 5-phase SWML rendering into a single deployable unit. + +A single `AgentBase` is one HTTP-servable voice agent: + +- `GET /` returns the SWML call-flow document +- `POST /swaig` dispatches SWAIG function calls to registered tool handlers +- `POST /post_prompt` receives the end-of-call summary and invokes `onSummary` + +Most user agents either (a) subclass `AgentBase` and override `defineTools()` / `onSummary()` +or (b) use one of the `prefab agents` (e.g. `ReceptionistAgent`). + +## Signature + +```typescript +class AgentBase extends SWMLService +``` + +## Inheritance + +**Extends:** [SWMLService](/docs/sdk-reference/reference/typescript/agents/swml-service) + +## Examples + + + + ```typescript + import { AgentBase, FunctionResult } from '@signalwire/sdk'; + + class WeatherAgent extends AgentBase { + static override PROMPT_SECTIONS = [ + { title: 'Role', body: 'You are a weather assistant.' }, + ]; + + protected override defineTools(): void { + this.defineTool({ + name: 'get_forecast', + description: 'Return the forecast for a city.', + parameters: { + type: 'object', + properties: { city: { type: 'string' } }, + required: ['city'], + }, + handler: async ({ city }) => { + const forecast = await fetchForecast(city as string); + return new FunctionResult(forecast); + }, + }); + } + } + + const agent = new WeatherAgent({ name: 'weather', route: '/' }); + await agent.serve({ port: 3000 }); + ``` + + + + ```typescript + const agent = new AgentBase({ name: 'hello', route: '/' }); + agent.setPromptText('You are a friendly greeter.'); + agent.defineTool({ + name: 'say_hi', + description: 'Respond with a greeting.', + parameters: { type: 'object', properties: {} }, + handler: () => new FunctionResult('Hello from SignalWire!'), + }); + await agent.serve(); + ``` + + + +## See Also + +- \- \[FunctionResult]\(/docs/sdk-reference/reference/typescript/agents/function-result) — builder for tool handler responses + \- \[ContextBuilder]\(/docs/sdk-reference/reference/typescript/agents/context-builder) — multi-step conversation state machines + \- \[DataMap]\(/docs/sdk-reference/reference/typescript/agents/data-map) — server-side tools without webhooks + \- \[AgentServer]\(/docs/sdk-reference/reference/typescript/agents/agent-server) — host multiple agents on one HTTP server + +## Properties + + + Unique identifier for this agent instance. + + + + + + + + Domain name for SSL. Mirrors Python's `self.domain`. + + + + Check if full JSON Schema validation is enabled. Mirrors Python's `@property full_validation_enabled`. + + + + Host the server binds to. + + + + Structured logger instance for this agent. Override the inherited SWMLService logger with an AgentBase-tagged one. + + + + Service display name. + + + + Public accessor for the native functions list. Python exposes `self.native_functions` as a public read/write attribute. + + + + + + Public accessor for the agent's POM as a `PromptObjectModel` instance. Python parity: `agent.pom` instance attribute (agent\_base.py line 209) is a `signalwire.pom.pom.PromptObjectModel` when `use_pom=True`, or `None` otherwise. This getter returns the equivalent TypeScript `PromptObjectModel` instance — callers can use `addSection`, `findSection`, `renderMarkdown`, `renderXml`, `toJson`, `toYaml` exactly as in Python. The instance returned is a fresh snapshot built from the current `PomBuilder` state, so mutating it does not feed back into the agent's internal builder. To mutate the agent's prompt, use `promptAddSection` / `promptAddToSection` / `promptAddSubsection`. + + + + Port the server binds to. + + + + Static prompt sections: subclasses can define these declaratively. Each entry is applied via promptAddSection() in the constructor. + + + + Public accessor for the PromptManager (POM). Python exposes `self.pom` as a public attribute. This getter provides equivalent access for direct POM manipulation. + + + + HTTP route path. + + + + Schema validation utilities. Mirrors Python's `self.schema_utils`. + + + + Unified security configuration. Mirrors Python's `self.security`. + + + + Public read-only accessor for the SkillManager. Python exposes `self.skill_manager` as a public attribute. This getter provides equivalent read access. + + + + Path to SSL certificate. Mirrors Python's `self.ssl_cert_path`. + + + + Whether SSL is enabled. Mirrors Python's `self.ssl_enabled`. + + + + Path to SSL private key. Mirrors Python's `self.ssl_key_path`. + + + + The complete set of internal SWAIG function names that accept fillers, matching the SWAIGInternalFiller schema definition. Any name outside this set is silently ignored by the runtime — addInternalFiller / setInternalFillers warn if you pass an unknown name. + + + + + + + + Custom verb handler registry. Mirrors Python's `self.verb_registry`. + + +## Methods + +### addAnswerVerb + +Configure the answer verb (phase 2) with optional settings. + +#### Signature + +```typescript +addAnswerVerb(config?: Record): this +``` + +#### Parameters + + + Optional answer verb configuration. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1501. + +*** + +### addFunctionInclude + +Add a remote SWAIG function include reference. + +#### Signature + +```typescript +addFunctionInclude( + url: string, + functions: string[], + metaData?: Record +): this +``` + +#### Parameters + + + URL of the remote SWAIG endpoint. + + + + Function names available at that endpoint. + + + + Optional metadata to attach to the include. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 966. + +*** + +### addHint + +Add a single speech-recognition hint. + +#### Signature + +```typescript +addHint(hint: string): this +``` + +#### Parameters + + + Word or phrase to boost in speech recognition. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 653. + +*** + +### addHints + +Add multiple speech-recognition hints at once. + +#### Signature + +```typescript +addHints(hints: string[]): this +``` + +#### Parameters + + + Array of words or phrases to boost. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 663. + +*** + +### addInternalFiller + +Add internal filler phrases for a single internal function and language. + +See [setInternalFillers](/docs/sdk-reference/reference/typescript/agents/agent-base#set-internal-fillers) for the complete list of supported +functionName values and an explanation of what fillers do. + +#### Signature + +```typescript +addInternalFiller( + functionName: string, + languageCode: string, + fillers: string[] +): this +``` + +#### Parameters + + + One of the supported internal function names (see SUPPORTED\_INTERNAL\_FILLER\_NAMES). Names outside the supported set log a warning and are ignored by the runtime. + + + + BCP-47 language code for the fillers (e.g. 'en-US'). + + + + Array of filler phrases. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 943. + +*** + +### addLanguage + +Add a supported language to the AI configuration. + +#### Signature + +```typescript +addLanguage(config: LanguageConfig): this +``` + +#### Parameters + + + Language configuration including name, code, voice, and optional fillers. `params` may be set to attach engine-specific tuning (voice stability, similarity boost, model knobs, etc.); only emitted into SWML when non-empty so existing entries stay byte-identical when no params are passed (Python ai\_config\_mixin.py `add_language`). + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 694. + +*** + +### addMcpServer + +Add an external MCP server for tool discovery and invocation. +Tools are discovered via MCP protocol at session start and added to the AI's tool list. + +#### Signature + +```typescript +addMcpServer(url: string, opts?: { ...3 fields }): this +``` + +#### Parameters + + + MCP server HTTP endpoint URL + + + + Optional configuration: headers, resources, resourceVars + + + + + + + + +#### Returns + +`this` — This agent instance for chaining + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1146. + +*** + +### addPatternHint + +Add a pattern-based speech-recognition hint with find-and-replace behavior. + +#### Signature + +```typescript +addPatternHint(opts: { ...4 fields }): this +``` + +#### Parameters + + + Pattern hint configuration with a descriptive hint label, regex pattern, replacement string, and optional case-insensitive flag. + + + + + + + + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 674. + +*** + +### addPostAiVerb + +Add a SWML verb to execute after the AI verb (phase 5). + +#### Signature + +```typescript +addPostAiVerb(verbName: string, config: Record): this +``` + +#### Parameters + + + Name of the SWML verb. + + + + Verb configuration object. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1523. + +*** + +### addPostAnswerVerb + +Add a SWML verb to execute after the answer phase but before the AI verb (phase 3). + +#### Signature + +```typescript +addPostAnswerVerb( + verbName: string, + config: number | Record +): this +``` + +#### Parameters + + + Name of the SWML verb. + + + + Verb configuration object. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1512. + +*** + +### addPreAnswerVerb + +Add a SWML verb to execute before the answer phase (phase 1). + +#### Signature + +```typescript +addPreAnswerVerb( + verbName: string, + config: number | Record +): this +``` + +#### Parameters + + + Name of the SWML verb (e.g. "play", "record"). + + + + Verb configuration object. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1491. + +*** + +### addPronunciation + +Add a pronunciation override rule for the TTS engine. + +#### Signature + +```typescript +addPronunciation(rule: PronunciationRule): this +``` + +#### Parameters + + + Pronunciation rule specifying the text to replace and its substitute. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 774. + +*** + +### addSection + +Add a new named section to the SWML document. +Mirrors Python's `add_section()`. + +#### Signature + +```typescript +addSection(sectionName: string): this +``` + +#### Parameters + + + Name of the section to create. + + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 653. + +*** + +### addSkill + +Add a skill to this agent, registering its tools, prompt sections, hints, and global data. + +#### Signature + +```typescript +addSkill(skill: SkillBase): Promise +``` + +#### Parameters + + + The skill instance to add. + + +#### Returns + +`Promise` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1570. + +*** + +### addSkillByName + +Add a skill by its registered name, looking it up in the global SkillRegistry. + +Matches Python's `add_skill(skill_name, params)` which loads skills by string +name via the SkillManager registry. Throws a `ValueError`-equivalent if the +skill name is not found in the registry. + +Accepts a typed [SkillNameOrString](/docs/sdk-reference/reference/typescript/agents/skills/skill-name#skill-name-or-string): one of the built-in +`SkillName` values (autocompleted, with a typo caught at compile +time) or any other string for custom / third-party skills. The value is +forwarded to the registry unchanged — the typing is erased at runtime, so +this matches Python's bare-`str` `add_skill(skill_name, params)`. + +#### Signature + +```typescript +addSkillByName( + skillName: SkillNameOrString, + params?: SkillConfig +): Promise +``` + +#### Parameters + + + The name the skill was registered under in the SkillRegistry. + + + + Optional configuration parameters forwarded to the skill factory. + + +#### Returns + +`Promise` — This agent instance for chaining. + +#### Throws + +- Error if no skill with the given name is registered. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1641. + +*** + +### addSwaigQueryParams + +Add extra query parameters appended to all SWAIG webhook URLs. + +#### Signature + +```typescript +addSwaigQueryParams(params: Record): this +``` + +#### Parameters + + + Key-value pairs to append as query parameters. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1733. + +*** + +### addVerb + +Add a verb to the SWML document. + +#### Signature + +```typescript +addVerb(name: string, config: unknown): this +``` + +#### Parameters + + + Verb name (e.g., 'answer', 'play', 'hangup'). + + + + Verb configuration. + + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 642. + +*** + +### addVerbToSection + +Add a verb to a specific named section. +Mirrors Python's `add_verb_to_section()`. + +#### Signature + +```typescript +addVerbToSection(sectionName: string, verbName: string, config: unknown): this +``` + +#### Parameters + + + Target section name (auto-created if missing). + + + + Verb name. + + + + Verb configuration. + + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 669. + +*** + +### asRouter + +Return this agent's Hono app for mounting as a sub-router in an AgentServer. + +#### Signature + +```typescript +asRouter(): Hono +``` + +#### Returns + +`Hono` — The Hono application instance. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2656. + +*** + +### autoMapSipUsernames + +Automatically register common SIP usernames based on this agent's +name and route. Derives cleaned variants (alphanumeric + underscore) +and registers each via `registerSipUsername()`. + +Port of Python's `auto_map_sip_usernames()`: + +- Registers a cleaned version of the agent name +- Registers a cleaned version of the route (if different from name) +- For names longer than 3 characters, also registers a vowel-stripped variant + +#### Signature + +```typescript +autoMapSipUsernames(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1058. + +*** + +### buildSwmlForRequest + +Service-side SWML-builder hook. Subclasses return a `SwmlBuilder` +to fully replace the document for this request, or `null` to fall +through to `setOnRequestCallback` or the static builder. + +This is distinct from the WebMixin `onRequest(requestData, +callbackPath)` hook on AgentBase (which mirrors Python's +`on_request -> on_swml_request` modification-merge contract). +Use this hook when you want to swap the entire SWML builder; use +`onRequest` / `onSwmlRequest` on AgentBase when you want to merge +targeted modifications into the rendered document. + +Default implementation returns `null` (no-op). + +#### Signature + +```typescript +buildSwmlForRequest( + _queryParams: Record, + _bodyParams: Record, + _headers: Record, + _callbackPath?: string +): SwmlBuilder | null +``` + +#### Parameters + + + + + + + + + +#### Returns + +`SwmlBuilder | null` — A `SwmlBuilder` whose document is sent as the response, or `null` to delegate to the next handler in the chain. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 834. + +*** + +### clearPostAiVerbs + +Remove all post-AI verbs. + +#### Signature + +```typescript +clearPostAiVerbs(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1550. + +*** + +### clearPostAnswerVerbs + +Remove all post-answer verbs. + +#### Signature + +```typescript +clearPostAnswerVerbs(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1541. + +*** + +### clearPreAnswerVerbs + +Remove all pre-answer verbs. + +#### Signature + +```typescript +clearPreAnswerVerbs(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1532. + +*** + +### clearSwaigQueryParams + +Clear all SWAIG query parameters. + +#### Signature + +```typescript +clearSwaigQueryParams(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1742. + +*** + +### constructor + +Create a new AgentBase instance. + +#### Signature + +```typescript +constructor(opts: AgentOptions): AgentBase +``` + +#### Parameters + + + Agent configuration options including name, route, auth, and call settings. + + +#### Returns + +`AgentBase` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 221. + +*** + +### createToolToken + +Mint a per-call SWAIG-function token via the agent's SessionManager. + +Mirrors Python reference `core/mixins/state_mixin.py _create_tool_token`: +delegates to `SessionManager.createToolToken` and returns an empty +string on any failure (Python catches all exceptions and returns ""). + +#### Signature + +```typescript +createToolToken(toolName: string, callId: string): string +``` + +#### Parameters + + + + + +#### Returns + +`string` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1475. + +*** + +### defineContexts + +Define or replace the contexts configuration for the AI verb. + +#### Signature + +```typescript +defineContexts( + contexts?: Record | ContextBuilder +): ContextBuilder +``` + +#### Parameters + + + An existing ContextBuilder instance or a plain object; a new ContextBuilder is created if omitted. + + +#### Returns + +`ContextBuilder` — The active ContextBuilder for further configuration. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 604. + +*** + +### defineTool + +Register a SWAIG tool (function) that the AI can invoke during a call. + +#### How this becomes a tool the model sees + +A SWAIG function is **exactly the same concept** as a "tool" in +native OpenAI / Anthropic tool calling. On every LLM turn, the SDK +renders each registered SWAIG function into the OpenAI tool schema: + +```json +{ +"type": "function", +"function": { +"name": "your_name_here", +"description": "your description text", +"parameters": { /* your JSON schema */ } +} +} +``` + +That schema goes to the model in the same API call that produces +the next assistant message. The model reads: + +- the **function `description`** to decide WHEN to call this tool +- each **parameter `description`** (inside the JSON schema) to + decide HOW to fill in each argument + +This means **descriptions are prompt engineering**, not developer +comments. A vague description is the #1 cause of "the model has the +right tool but doesn't call it" failures. + +##### Bad vs good descriptions + +```text +BAD : description: 'Lookup function' +GOOD: description: 'Look up a customer's account details by account +number. Use this BEFORE quoting any account-specific info +(balance, plan, status). Do not use for general product +questions.' + +BAD : parameters: { id: { type: 'string', description: 'the id' } } +GOOD: parameters: { account_number: { type: 'string', description: +'The customer's 8-digit account number, no dashes or spaces. +Ask the user if they don't provide it.' } } +``` + +##### Tool count matters + +LLM tool selection accuracy degrades past ~7-8 simultaneously-active +tools per call. Use Step.setFunctions() to partition tools across +steps so only the relevant subset is active at any moment. + +#### Signature + +```typescript +defineTool(opts: { ...11 fields }): this +``` + +#### Parameters + + + Tool definition including name, description, parameter schema, and handler callback. `description` and per-parameter `description` strings are LLM-facing prompt engineering. + + + + + Additional fields to pass through to the SWAIG function definition (Python `**swaig_fields` equivalent). + + + + + + + + + + + + + + + + + + + + External webhook URL; makes this an externally-hosted tool. + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1330. + +*** + +### defineTools + +Lifecycle method to register tools. Subclasses should call this at the +end of their own constructor (after all fields are initialized). +Not called automatically — call `this.defineTools()` explicitly. + +#### Signature + +```typescript +defineTools(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 359. + +*** + +### defineTypedTool + +Register a SWAIG tool with a typed handler that receives named parameters +instead of the standard `(args, rawData)` convention. + +The SDK wraps the handler to unpack the args dict into positional params. +If no `parameters` schema is provided, one is inferred from the handler's +source code (parameter names and default values). + +#### Signature + +```typescript +defineTypedTool(opts: { ...9 fields }): this +``` + +#### Parameters + + + Tool definition with a typed handler function. + + + + + + + The typed handler. Receives the AI-extracted arguments as named positional parameters (in declaration order), optionally with a trailing `rawData` record, and returns a SWAIG result. Precisely typed as [TypedToolHandler](/docs/sdk-reference/reference/typescript/core/type-inference#typed-tool-handler) rather than the bare `Function` so a non-callable — or a callable that returns nothing usable — is a compile-time error. + + + + + + + + + + + + + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1373. + +*** + +### enableDebugEvents + +Enable debug event webhooks for this agent. + +#### Signature + +```typescript +enableDebugEvents(level: number = 1): this +``` + +#### Parameters + + + Debug verbosity level (defaults to 1). + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1011. + +*** + +### enableDebugRoutes + +Register a callback function that determines routing based on POST data. + +When a routing callback is registered, an endpoint at the specified path +is created in `getApp()`. The callback receives the request body and returns +Enable debug routes for testing and development. + +This is a backward-compatibility stub matching the Python SDK. +In the TypeScript SDK, debug routes (health, ready, debug\_events) +are automatically registered in `getApp()`. + +#### Signature + +```typescript +enableDebugRoutes(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1773. + +*** + +### enableMcpServer + +Expose this agent's tools as an MCP server endpoint at /mcp. +Adds a JSON-RPC 2.0 endpoint that MCP clients (Claude Desktop, other agents) can connect to. + +#### Signature + +```typescript +enableMcpServer(): this +``` + +#### Returns + +`this` — This agent instance for chaining + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1160. + +*** + +### enableSipRouting + +Enable SIP routing for this agent. + +#### Signature + +```typescript +enableSipRouting(autoMap: boolean = true, path: string = '/sip'): this +``` + +#### Parameters + + + When true, automatically map SIP usernames to the agent route (defaults to true). + + + + HTTP path for the SIP routing endpoint (defaults to '/sip'). + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1025. + +*** + +### extractSipUsername + +Extract the SIP username from a request body's call.to field. + +**Modifiers:** `static` + +#### Signature + +```typescript +extractSipUsername(requestBody: Record): string | null +``` + +#### Parameters + + + The parsed request body containing call information. + + +#### Returns + +`string | null` — The extracted SIP username, or null if not found. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1122. + +*** + +### getAllFunctions + +Snapshot of all registered SWAIG functions keyed by name. +(Python parity: `ToolRegistry.get_all_functions`.) + +#### Signature + +```typescript +getAllFunctions(): Record> +``` + +#### Returns + +`Record>` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 529. + +*** + +### getApp + +Get or lazily create the Hono HTTP application with all routes, middleware, auth, and CORS. + +#### Signature + +```typescript +getApp(): Hono +``` + +#### Returns + +`Hono` — The configured Hono application instance. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2269. + +*** + +### getBasicAuthCredentials + +Get the basic-auth credentials used by this agent. + +#### Signature + + + + ```typescript + getBasicAuthCredentials(includeSource?: false): [string, string] + ``` + + + + ```typescript + getBasicAuthCredentials( + includeSource: true + ): [string, string, "provided" | "environment" | "generated"] + ``` + + + +#### Parameters (Overload 1) + + + When true, a third element indicating the credential source is appended. + + +#### Parameters (Overload 2) + + + When true, a third element indicating the credential source is appended. + + +#### Returns (Overload 1) + +`[string, string]` — A tuple of \[username, password] or \[username, password, source]. + +#### Returns (Overload 2) + +`[string, string, "provided" | "environment" | "generated"]` — A tuple of \[username, password] or \[username, password, source]. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2794. + +*** + +### getBuilder + +Get the underlying SwmlBuilder for direct manipulation. + +#### Signature + +```typescript +getBuilder(): SwmlBuilder +``` + +#### Returns + +`SwmlBuilder` — The SwmlBuilder instance. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 632. + +*** + +### getContexts + +Get the contexts dictionary as serialised SWML, or null when no +contexts have been defined yet. + +Matches Python `PromptManager.get_contexts()` which returns the +contexts dict or `None`. + +#### Signature + +```typescript +getContexts(): Record | null +``` + +#### Returns + +`Record | null` — Contexts dict, or null when no contexts are defined. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 641. + +*** + +### getDocument + +Get the SWML document as a dictionary. +Alias for `renderSwml()` that matches Python's `get_document()` name. + +#### Signature + +```typescript +getDocument(): Record +``` + +#### Returns + +`Record` — The SWML document. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 706. + +*** + +### getFullUrl + +Get the full external URL of this agent, using the proxy base URL if available. + +#### Signature + +```typescript +getFullUrl(includeAuth: boolean = false): string +``` + +#### Parameters + + + Whether to embed basic-auth credentials in the URL (defaults to false). + + +#### Returns + +`string` — The fully-qualified URL string. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1857. + +*** + +### getFunction + +Get a registered SWAIG function entry, or undefined. +(Python parity: `ToolRegistry.get_function`.) + +#### Signature + +```typescript +getFunction(name: string): Record | SwaigFunction | undefined +``` + +#### Parameters + + + +#### Returns + +`Record | SwaigFunction | undefined` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 523. + +*** + +### getLanguageParams + +Read the per-language `params` dict for a previously-added language. + +Python parity: `get_language_params(code)`. Returns `undefined` if the +code is unknown or the language has no params set — no exception path. + +#### Signature + +```typescript +getLanguageParams(code: string): Record | undefined +``` + +#### Parameters + + + Language code as previously passed to [addLanguage](/docs/sdk-reference/reference/typescript/agents/agent-base#add-language). + + +#### Returns + +`Record | undefined` — The params dict if set, `undefined` otherwise (including when the code is unknown). + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 760. + +*** + +### getMcpServers + +Get configured MCP servers (read-only copy). + +#### Signature + +```typescript +getMcpServers(): Record[] +``` + +#### Returns + +`Record[]` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1171. + +*** + +### getName + +Get the agent's display name. + +#### Signature + +```typescript +getName(): string +``` + +#### Returns + +`string` — The agent name string. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1559. + +*** + +### getPostPrompt + +Get the post-prompt text, if one has been set. + +#### Signature + +```typescript +getPostPrompt(): string | null +``` + +#### Returns + +`string | null` — The post-prompt string, or null if not configured. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 548. + +*** + +### getPrompt + +Get the fully rendered main prompt text. + +#### Signature + +```typescript +getPrompt(): string +``` + +#### Returns + +`string` — The assembled prompt string. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 520. + +*** + +### getPromptPom + +Get the raw POM (Prompt Object Model) structure as an array of section data objects, +when the agent is in POM mode and has at least one section. + +Matches Python `get_prompt()` which returns `Union[str, List[Dict]]` — a raw list when +in POM mode (via `pom.to_list()` / `pom.render_dict()`), or a string otherwise. +The TS `getPrompt()` always returns a string (rendered Markdown), so this companion +method exposes the raw POM structure for callers that need it for serialisation or +inspection (e.g. skills that inspect prompt sections). + +#### Signature + +```typescript +getPromptPom(): Record[] | null +``` + +#### Returns + +`Record[] | null` — An array of POM section data objects, or null if not in POM mode or POM is empty. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 536. + +*** + +### getRawPrompt + +Get the raw prompt text whatever `setPromptText` stored, or null when +no raw prompt has been set. + +Matches Python `PromptManager.get_raw_prompt()` which returns the raw +stored string or `None`. Use this instead of `getPrompt()` when you +need the unrendered text rather than the POM-rendered Markdown. + +#### Signature + +```typescript +getRawPrompt(): string | null +``` + +#### Returns + +`string | null` — The raw prompt string, or null if not set. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 562. + +*** + +### getRegisteredTools + +Get a summary of all registered tools with their names, descriptions, and +parameter schemas. Lifted from AgentBase so the swaig-test CLI can list +tools on a non-AgentBase SWMLService target (sidecar / standalone SWAIG +host). + +#### Signature + +```typescript +getRegisteredTools(): { description: string; name: string; parameters: Record }[] +``` + +#### Returns + +`{ description: string; name: string; parameters: Record }[]` — Array of tool descriptors. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 557. + +*** + +### getTool + +Look up a registered SwaigFunction by name. Lifted from AgentBase so +`swaig-test --exec ` works against a non-AgentBase SWMLService +target. + +#### Signature + +```typescript +getTool(name: string): SwaigFunction | undefined +``` + +#### Parameters + + + The tool name to search for. + + +#### Returns + +`SwaigFunction | undefined` — The SwaigFunction instance, or undefined if not found or not a SwaigFunction. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 581. + +*** + +### getTools + +Public access to the list of registered tools. + +In Python, `define_tools()` is public and returns `List[SWAIGFunction]`. +In TypeScript, `defineTools()` is a protected setup hook (void). This +method provides the equivalent public "get all tools" capability. + +#### Signature + +```typescript +getTools(): SwaigFunction[] +``` + +#### Returns + +`SwaigFunction[]` — Array of all registered SwaigFunction instances. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 371. + +*** + +### handleMcpRequest + +Handle an MCP JSON-RPC 2.0 request. Returns the response object. + +#### Signature + +```typescript +handleMcpRequest( + body: Record +): Promise> +``` + +#### Parameters + + + +#### Returns + +`Promise>` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1204. + +*** + +### hasFunction + +Whether a SWAIG function with the given name is registered. +(Python parity: `ToolRegistry.has_function`.) + +#### Signature + +```typescript +hasFunction(name: string): boolean +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 517. + +*** + +### hasSkill + +Check whether a skill with the given name is registered. + +Accepts a typed [SkillNameOrString](/docs/sdk-reference/reference/typescript/agents/skills/skill-name#skill-name-or-string) so built-in names autocomplete +and a typo is a compile-time error; any other string is still accepted +(custom skills / parity with Python's bare-`str` `has_skill`). + +#### Signature + +```typescript +hasSkill(skillName: SkillNameOrString): boolean +``` + +#### Parameters + + + The skill name to check. + + +#### Returns + +`boolean` — True if a skill with that name exists. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1676. + +*** + +### hasTool + +Whether a tool with the given name is registered. + +#### Signature + +```typescript +hasTool(name: string): boolean +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 511. + +*** + +### isMcpServerEnabled + +Check if MCP server endpoint is enabled. + +#### Signature + +```typescript +isMcpServerEnabled(): boolean +``` + +#### Returns + +`boolean` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1166. + +*** + +### listSkills + +List all registered skills with their names, instance IDs, and initialization status. + +#### Signature + +```typescript +listSkills(): { initialized: boolean; instanceId: string; name: string }[] +``` + +#### Returns + +`{ initialized: boolean; instanceId: string; name: string }[]` — Array of skill descriptors. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1662. + +*** + +### listToolNames + +List registered tool names in insertion order (Map preserves it). + +#### Signature + +```typescript +listToolNames(): string[] +``` + +#### Returns + +`string[]` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 545. + +*** + +### manualSetProxyUrl + +Manually set the proxy base URL used for webhook URL generation. + +#### Signature + +```typescript +manualSetProxyUrl(url: string): this +``` + +#### Parameters + + + The external-facing base URL (trailing slashes are stripped). + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1754. + +*** + +### onDebugEvent + +Lifecycle hook called when a debug event webhook is received. Override in subclasses. + +#### Signature + +```typescript +onDebugEvent(_event: Record): void | Promise +``` + +#### Parameters + + + The debug event payload. + + +#### Returns + +`void | Promise` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1970. + +*** + +### onFunctionCall + +Hook called before each SWAIG function execution. Override in subclasses. + +**Behavioral note:** In the Python SDK, `on_function_call` IS the dispatcher +— it retrieves and executes the function, returning the result. In TypeScript, +`fn.execute()` is called separately after this hook. However, if this method +returns a non-void value, it is used as the result and the default execution +is skipped, enabling dispatch interception parity with Python. + +#### Signature + +```typescript +onFunctionCall( + _name: string, + _args: Record, + _rawData: Record +): void | Record | Promise> +``` + +#### Parameters + + + Name of the function about to execute. + + + + Parsed arguments for the function. + + + + The full raw SWAIG request payload. + + +#### Returns + +`void | Record | Promise>` — Optionally a result dict to short-circuit default execution, or void/undefined to proceed normally. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1999. + +*** + +### onRequest + +Lifecycle hook called when SWML is requested. Default delegates to +[onSwmlRequest](/docs/sdk-reference/reference/typescript/agents/agent-base#on-swml-request) and returns its result. Subclasses typically +override `onSwmlRequest` rather than this method. + +Matches Python `WebMixin.on_request(request_data, callback_path)`. The +cross-language API is the two-arg form; the Hono `context` argument is +a TypeScript-side extra preserved for callers that already have it but +is not part of the audited surface. + +#### Signature + +```typescript +onRequest( + requestData?: Record | null, + callbackPath?: string | null +): void | Record | Promise> +``` + +#### Parameters + + + The parsed request body. + + + + Optional callback path from the request. + + +#### Returns + +`void | Record | Promise>` — Optionally a dict of SWML modifications, or undefined for default rendering. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1935. + +*** + +### onSummary + +Lifecycle hook called when a post-prompt summary is received. Override in subclasses. + +Invoked once at the end of a call when the AI has produced a structured summary +(configured via `setPostPrompt()` / `setPostPromptJson()`). Use this hook to persist +call data, notify other systems, or trigger follow-up workflows. + +#### Signature + +```typescript +onSummary( + _summary: Record | null, + _rawData: Record +): void | Promise +``` + +#### Parameters + + + Parsed summary object (JSON when the post-prompt requests structured output), or `null` if extraction/parsing failed. + + + + Full raw post-prompt payload received from the platform, including call metadata, conversation history, and the summary text. + + +#### Returns + +`void | Promise` + +#### Examples + +```typescript +class MyAgent extends AgentBase { + async onSummary(summary, rawData) { + if (!summary) return; + await db.calls.insert({ + callSid: rawData.call_id, + summary, + endedAt: new Date(), + }); + } +} +``` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1916. + +*** + +### onSwmlRequest + +Lifecycle hook called on every SWML request before rendering. Override in subclasses. + +May optionally return a modification dict that will be merged into the +rendered SWML document (matching Python's `Optional[dict]` return type). + +Matches Python `on_swml_request(request_data, callback_path, request)` — the third +parameter is the FastAPI `Request` in Python; here it is the raw Hono context object +so that subclasses can access query parameters (`context.req.query()`), raw request +headers (`context.req.raw.headers`), etc. + +#### Signature + +```typescript +onSwmlRequest( + _rawData: Record, + _callbackPath?: string, + _context?: any +): void | Record | Promise> +``` + +#### Parameters + + + The parsed request body. + + + + Optional callback path from the request. + + + + The raw Hono context object (c), providing access to headers and query params. + + +#### Returns + +`void | Record | Promise>` — Optionally a dict of SWML modifications, or void. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1958. + +*** + +### promptAddSection + +Add a new section to the prompt with optional body, bullets, and subsections. + +#### Signature + +```typescript +promptAddSection(title: string, opts?: { ...5 fields }): this +``` + +#### Parameters + + + Section heading. + + + + Optional section content including body text, bullet points, and subsections. + + + + + + + + + + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 467. + +*** + +### promptAddSubsection + +Add a subsection under an existing prompt section. + +#### Signature + +```typescript +promptAddSubsection( + parentTitle: string, + title: string, + opts?: { ...2 fields } +): this +``` + +#### Parameters + + + Title of the parent section. + + + + Title of the new subsection. + + + + Optional body text and bullet points for the subsection. + + + + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 502. + +*** + +### promptAddToSection + +Append content to an existing prompt section. + +#### Signature + +```typescript +promptAddToSection(title: string, opts?: { ...3 fields }): this +``` + +#### Parameters + + + Title of the section to append to. + + + + Content to add: body text, a single bullet, or multiple bullets. + + + + + + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 487. + +*** + +### promptHasSection + +Check whether a prompt section with the given title exists. + +#### Signature + +```typescript +promptHasSection(title: string): boolean +``` + +#### Parameters + + + Section title to look for. + + +#### Returns + +`boolean` — True if the section exists. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 512. + +*** + +### registerAdditionalRoutes + +Extension point: register additional Hono routes after SWMLService +mounts /health, /ready, /swaig, and the main route. AgentBase uses +this to add /post\_prompt, /check\_for\_input, /debug\_events, /mcp. + +#### Signature + +```typescript +registerAdditionalRoutes(_app: Hono): void +``` + +#### Parameters + + + +#### Returns + +`void` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 604. + +*** + +### registerRoutingCallback + +Register a callback at a specific HTTP path that decides how to route an +incoming request. + +When called, the endpoint at `path` will invoke `callback` with the parsed +request body. If `callback` returns a non-empty route string the server +responds with `{ action: "redirect", route }` so the platform can forward the +request to the right agent. If `callback` returns `null` / `undefined` the +agent's own SWML is returned instead (normal processing). + +Mirrors Python `swml_service.register_routing_callback` / +`web_mixin.register_routing_callback`. + +#### Signature + +```typescript +registerRoutingCallback(callback: RoutingCallback, path: string = '/sip'): this +``` + +#### Parameters + + + Function receiving the parsed request body and returning a route string to redirect, or null/undefined for normal processing. + + + + HTTP path where this callback endpoint is registered (default: '/sip'). + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1102. + +*** + +### registerSipUsername + +Register a SIP username to route to this agent. + +#### Signature + +```typescript +registerSipUsername(username: string): this +``` + +#### Parameters + + + The SIP username to register. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1040. + +*** + +### registerSwaigFunction + +Register a SwaigFunction instance or a raw function descriptor (DataMap). + +#### Signature + +```typescript +registerSwaigFunction(fn: Record | SwaigFunction): this +``` + +#### Parameters + + + +#### Returns + +`this` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 472. + +*** + +### registerVerbHandler + +Register a custom verb handler. +Mirrors Python's `register_verb_handler()`. + +#### Signature + +```typescript +registerVerbHandler(handler: SWMLVerbHandler): void +``` + +#### Parameters + + + The verb handler to register. + + +#### Returns + +`void` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 726. + +*** + +### removeFunction + +Remove a registered SWAIG function. Returns true when removed, +false when not found. (Python parity: +`ToolRegistry.remove_function`.) + +#### Signature + +```typescript +removeFunction(name: string): boolean +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 540. + +*** + +### removeSkill + +Remove a previously added skill by its instance ID. + +#### Signature + +```typescript +removeSkill(instanceId: string): Promise +``` + +#### Parameters + + + The unique instance ID of the skill to remove. + + +#### Returns + +`Promise` — True if the skill was found and removed. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1654. + +*** + +### removeSkillByName + +Remove a skill by its name (Python parity). + +Python's `remove_skill(skill_name)` removes by skill name. +The existing `removeSkill(instanceId)` removes by instance ID. +This method provides name-based removal for cross-SDK parity. + +#### Signature + +```typescript +removeSkillByName(skillName: string): Promise +``` + +#### Parameters + + + The skill name to remove. + + +#### Returns + +`Promise` — True if a skill with that name was found and removed. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1690. + +*** + +### renderDocument + +Render the SWML document as a JSON string. +Mirrors Python's `render_document()`. + +#### Signature + +```typescript +renderDocument(): string +``` + +#### Returns + +`string` — JSON-encoded SWML document. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 715. + +*** + +### renderSwml + +Render the complete SWML document by assembling all 5 phases: pre-answer, answer, +post-answer, AI, and post-AI verbs. + +#### Signature + +```typescript +renderSwml(callId?: string, modifications?: Record): string +``` + +#### Parameters + + + Optional call ID to use for session tokens; auto-generated if omitted. + + + + Optional dict returned from `onSwmlRequest` to merge into the AI verb config before rendering. Matches Python's `_render_swml(modifications)` semantics: `global_data` is deep-merged; all other keys override the AI config directly. + + +#### Returns + +`string` — The rendered SWML document as a JSON string. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2019. + +*** + +### resetContexts + +Remove all contexts, returning the agent to a no-contexts state. + +This is a convenience wrapper around `defineContexts().reset()`. +Use it in a dynamic config callback when you need to rebuild +contexts from scratch for a specific request. + +#### Signature + +```typescript +resetContexts(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 625. + +*** + +### resetDocument + +Reset the SWML document to an empty state. +Mirrors Python's `reset_document()`. + +#### Signature + +```typescript +resetDocument(): this +``` + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 679. + +*** + +### run + +Alias for [serve](/docs/sdk-reference/reference/typescript/agents/agent-base#serve). Starts the HTTP server. + +#### Signature + +```typescript +run(opts?: { ...2 fields }): Promise +``` + +#### Parameters + + + Optional host and port overrides. + + + + + + +#### Returns + +`Promise` — A promise that resolves once the server is running. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2702. + +*** + +### runServerless + +Handle a single serverless invocation (AWS Lambda, Google Cloud Functions, Azure Functions, or CGI). + +Matches Python `run(event, context)` when executed in a serverless environment. Python's +`run()` auto-detects the platform via `get_execution_mode()` and dispatches accordingly; +in TypeScript the serverless path is an **explicit** method so that `run()` keeps its +HTTP-server semantics and callers opt in to serverless dispatch deliberately. + +Platform detection follows the same environment-variable heuristics as Python's +`ServerlessMixin`: `AWS_LAMBDA_FUNCTION_NAME` → Lambda, `K_SERVICE` → GCF, +`FUNCTIONS_WORKER_RUNTIME` → Azure, `GATEWAY_INTERFACE` → CGI. + +Usage in a Lambda handler file: + +```ts +export const handler = (event: any, context: any) => agent.runServerless(event, context); +``` + +#### Signature + +```typescript +runServerless( + event: ServerlessEvent, + context?: unknown, + platform?: "lambda" | "gcf" | "azure" | "cgi" | "auto" +): Promise +``` + +#### Parameters + + + The serverless event payload (Lambda event, GCF request body, etc.). + + + + The serverless context object (Lambda context, Azure context, etc.). + + + + Optional platform override; defaults to 'auto' (environment detection). + + +#### Returns + +`Promise` — The normalized serverless response object. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2728. + +*** + +### serve + +Start the HTTP server and begin listening for requests. + +Uses `@hono/node-server` under the hood. When run in CLI mode +(`SWAIG_CLI_MODE=true`, set automatically by `npx swaig-test`), this is a +no-op so agent config can be inspected without starting a server. + +#### Signature + +```typescript +serve(opts?: { ...2 fields }): Promise +``` + +#### Parameters + + + Optional host/port overrides. Defaults to the values provided in the constructor options or the `PORT` environment variable. + + + + + + +#### Returns + +`Promise` — A promise that resolves once the server has begun listening. + +#### Examples + +```typescript +const agent = new AgentBase({ name: 'demo', port: 3000 }); +await agent.serve(); +// Or override at runtime: +await agent.serve({ port: 8080, host: '127.0.0.1' }); +``` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2679. + +*** + +### setDynamicConfigCallback + +Set a callback invoked on each SWML request to dynamically modify an ephemeral agent copy. + +The callback receives a clone of this agent — mutations apply only to the current +request, so you can vary prompt, tools, languages, params, or global data per call +without affecting the long-lived agent instance. + +#### Signature + +```typescript +setDynamicConfigCallback(cb: DynamicConfigCallback): this +``` + +#### Parameters + + + Callback receiving `(queryParams, bodyParams, headers, agent)` where `agent` is the ephemeral `AgentBase` copy to mutate. May be async. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Examples + +```typescript +agent.setDynamicConfigCallback((query, body, headers, agent) => { + const lang = query.lang ?? 'en'; + if (lang === 'es') { + (agent as AgentBase).setPromptText('Eres un asistente útil.'); + } +}); +``` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1723. + +*** + +### setFunctionIncludes + +Replace the entire list of function includes. +Each include must have a `url` and `functions` array. + +#### Signature + +```typescript +setFunctionIncludes(includes: FunctionInclude[]): this +``` + +#### Parameters + + + Array of function include objects. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 979. + +*** + +### setGlobalData + +Merge data into the global\_data object passed into the AI configuration. + +Matches Python `set_global_data` which calls `.update()` on the internal dict — +existing keys are preserved; incoming keys overwrite on collision. Skills and +other callers can each contribute keys without clobbering one another. + +If you need to replace the entire object, assign a new agent instance or use +`Object.assign(agent.globalData, {})` to clear first. + +#### Signature + +```typescript +setGlobalData(data: Record): this +``` + +#### Parameters + + + Key-value pairs to merge into global data. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 828. + +*** + +### setInternalFillers + +Set internal fillers for native SWAIG functions. + +Internal fillers are short phrases the AI agent speaks (via TTS) while +an internal/native function is running, so the caller doesn't hear +dead air during transitions or background work. + +Supported function names (matches the SWAIGInternalFiller schema): + +hangup — when the agent is hanging up +check\_time — when checking the time +wait\_for\_user — when waiting for user input +wait\_seconds — during deliberate pauses +adjust\_response\_latency — when adjusting response timing +next\_step — transitioning between steps in prompt.contexts +change\_context — switching between contexts in prompt.contexts +get\_visual\_input — processing visual input (enable\_vision=true) +get\_ideal\_strategy — thinking (enable\_thinking=true) + +Notably NOT supported: change\_step, gather\_submit, or arbitrary +user-defined SWAIG function names. The runtime only honors fillers +for the names listed above; everything else is silently ignored at +the SWML level. This method warns at registration time if you pass +an unknown name so you catch the typo early. + +#### Signature + +```typescript +setInternalFillers( + internalFillers: Record> +): this +``` + +#### Parameters + + + Map of function name to language-keyed filler phrases. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Examples + +```typescript +agent.setInternalFillers({ + next_step: { + 'en-US': ['Moving to the next step...', 'Great, let us continue...'], + 'es': ['Pasando al siguiente paso...'] + }, + check_time: { + 'en-US': ['Let me check the time...'] + } +}); +``` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 910. + +*** + +### setLanguageParams + +Set (or replace) the per-language `params` dict on an already-added +language. Useful when language entries are built up via [addLanguage](/docs/sdk-reference/reference/typescript/agents/agent-base#add-language) +first and engine-specific tuning is added later (e.g., from a config +loader). + +Python parity: `set_language_params(code, params)`. Passing an empty +object removes the `params` key entirely. Unknown codes are a no-op. + +#### Signature + +```typescript +setLanguageParams(code: string, params: Record): this +``` + +#### Parameters + + + Language code as previously passed to [addLanguage](/docs/sdk-reference/reference/typescript/agents/agent-base#add-language) (e.g. `"en-US"`). + + + + Engine-specific params dict to attach. Empty object removes the key. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 737. + +*** + +### setLanguages + +Replace all configured languages with a new list. + +#### Signature + +```typescript +setLanguages(languages: LanguageConfig[]): this +``` + +#### Parameters + + + Array of language configurations. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 718. + +*** + +### setNativeFunctions + +Set the list of native SWAIG function names (built-in platform functions). + +#### Signature + +```typescript +setNativeFunctions(funcs: string[]): this +``` + +#### Parameters + + + Array of native function names. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 848. + +*** + +### setOnRequestCallback + +Set a callback invoked per-request to dynamically build SWML. +When set, the static SwmlBuilder is ignored and the callback's +returned SwmlBuilder is used instead. + +#### Signature + +```typescript +setOnRequestCallback(cb: OnRequestCallback): this +``` + +#### Parameters + + + Callback receiving query params, body params, and headers. + + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 850. + +*** + +### setParam + +Set a single AI parameter (e.g. "temperature", "top\_p"). + +#### Signature + +```typescript +setParam(key: string, value: unknown): this +``` + +#### Parameters + + + Parameter name. + + + + Parameter value. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 800. + +*** + +### setParams + +Merge multiple AI parameters into the existing params object. + +#### Signature + +```typescript +setParams(params: Record): this +``` + +#### Parameters + + + Key-value pairs to merge. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 810. + +*** + +### setPostPrompt + +Set the post-prompt text evaluated after the call ends. + +#### Signature + +```typescript +setPostPrompt(text: string): this +``` + +#### Parameters + + + The post-prompt text to use. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 456. + +*** + +### setPostPromptLlmParams + +Merge LLM-specific parameters into the post-prompt configuration. + +#### Signature + +```typescript +setPostPromptLlmParams(params: Record): this +``` + +#### Parameters + + + Key-value LLM parameters to merge. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1001. + +*** + +### setPostPromptUrl + +Override the default post-prompt webhook URL with a custom one. + +#### Signature + +```typescript +setPostPromptUrl(url: string): this +``` + +#### Parameters + + + The custom post-prompt URL. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1847. + +*** + +### setPromptLlmParams + +Merge LLM-specific parameters into the main prompt configuration (e.g. model, temperature). + +#### Signature + +```typescript +setPromptLlmParams(params: Record): this +``` + +#### Parameters + + + Key-value LLM parameters to merge. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 991. + +*** + +### setPromptPom + +Set the prompt as a POM (Prompt Object Model) dictionary. + +Replaces the current POM sections with the provided structured data. +Each entry should have `title`, and optionally `body`, `bullets`, +`numbered`, `numberedBullets`, and `subsections`. + +#### Signature + +```typescript +setPromptPom(pom: Record[]): this +``` + +#### Parameters + + + Array of POM section dictionaries. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Throws + +- Error if POM mode is not enabled (`usePom: false`). + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 577. + +*** + +### setPromptText + +Set the main system prompt text for the AI. + +#### Signature + +```typescript +setPromptText(text: string): this +``` + +#### Parameters + + + The prompt text to use. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 446. + +*** + +### setPronunciations + +Replace all pronunciation rules with a new list. + +#### Signature + +```typescript +setPronunciations(rules: PronunciationRule[]): this +``` + +#### Parameters + + + Array of pronunciation rule objects. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 786. + +*** + +### setupGracefulShutdown + +Register process signal handlers for clean Kubernetes/Docker shutdown. +Handles SIGTERM and SIGINT, waits for a timeout, then exits. + +**Modifiers:** `static` + +#### Signature + +```typescript +setupGracefulShutdown(opts?: { ...1 fields }): void +``` + +#### Parameters + + + Optional timeout in milliseconds (default 5000). + + + + +#### Returns + +`void` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2751. + +*** + +### setWebHookUrl + +Override the default SWAIG webhook URL with a custom one. + +#### Signature + +```typescript +setWebHookUrl(url: string): this +``` + +#### Parameters + + + The custom webhook URL. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1837. + +*** + +### stop + +Stop the HTTP server. +Mirrors Python's `stop()`. + +#### Signature + +```typescript +stop(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 1009. + +*** + +### swaigPreDispatch + +Extension point: invoked between argument parsing and function dispatch +on POST /swaig. Returns \[target, shortCircuit]: when shortCircuit is +non-null, it's returned directly without dispatching. AgentBase may +override to add session-token validation or ephemeral dynamic-config. + +#### Signature + +```typescript +swaigPreDispatch( + _requestData: Record, + _funcName: string +): [SWMLService, unknown] +``` + +#### Parameters + + + + + +#### Returns + +`[SWMLService, unknown]` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 592. + +*** + +### updateGlobalData + +Merge additional entries into the existing global\_data object. + +#### Signature + +```typescript +updateGlobalData(data: Record): this +``` + +#### Parameters + + + Key-value pairs to merge into global data. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 838. + +*** + +### validateBasicAuth + +Override to add custom basic-auth validation logic beyond credential matching. + +#### Signature + +```typescript +validateBasicAuth( + _username: string, + _password: string +): boolean | Promise +``` + +#### Parameters + + + The username from the request. + + + + The password from the request. + + +#### Returns + +`boolean | Promise` — True if the credentials are valid; false to reject the request. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1980. + +*** + +### validateToolToken + +Validate a tool-call token for the given function. + +Mirrors Python reference `core/mixins/state_mixin.py validate_tool_token`: + +1. Unknown function → `false`. +2. Registered but non-secure → `true` without consulting SessionManager + (non-secure tools never require a token). +3. Raw-dict descriptors (e.g. DataMap) are treated as secure, matching + Python's `isinstance(func, dict) → is_secure = True` branch. +4. Missing token on a secure tool → `false`. +5. Otherwise delegate to `SessionManager.validateToolToken`. + +Divergences from the Python reference: + +- No debug-logging branch: `AgentBase` does not expose an agent-level + debug-mode flag, so the per-call debug telemetry Python emits is + omitted. `SessionManager` still logs its own validation outcomes. +- No token-derived call-id fallback: `SessionManager.debugToken` + truncates the embedded call-id for log safety, so an extracted value + cannot be round-tripped back through `validateToolToken`. The caller + is expected to supply a non-empty `callId`; an empty one is forwarded + unchanged and the underlying validator will reject it. + +#### Signature + +```typescript +validateToolToken(functionName: string, token: string, callId: string): boolean +``` + +#### Parameters + + + + + + + +#### Returns + +`boolean` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1455. + +## Type Aliases + +### RoutingCallback + +Callback invoked at a registered routing endpoint to determine how to handle an +incoming request. Return a route string to redirect to that agent route, or +null / undefined to let normal SWML processing continue. + +Mirrors Python `web_mixin.register_routing_callback` callback signature (body-only +variant — Hono request object is not forwarded; use the parsed body instead). + +#### Signature + +```typescript +type RoutingCallback = (body: Record) => string | null | undefined | Promise +``` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 46. + +## Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 111. diff --git a/fern/products/sdk-reference/typescript/agents/agent-server/index.mdx b/fern/products/sdk-reference/typescript/agents/agent-server/index.mdx new file mode 100644 index 0000000000..8a874cd3f9 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/agent-server/index.mdx @@ -0,0 +1,418 @@ +--- +slug: "/reference/typescript/agents/agent-server" +title: "AgentServer" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "AgentServer" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentServer.ts" +--- +# `AgentServer` + +Multi-agent HTTP server that hosts multiple AgentBase instances on distinct route prefixes. + +Use `AgentServer` when one process should serve more than one agent — each with its own +prompt, tools, and route. Internally, each agent's Hono router is mounted under its own +path. Static assets can also be served from a configured directory. + +## Signature + +```typescript +class AgentServer +``` + +## Examples + +```typescript +import { AgentServer, AgentBase } from '@signalwire/sdk'; + +const salesAgent = new AgentBase({ name: 'sales', route: '/sales' }); +const supportAgent = new AgentBase({ name: 'support', route: '/support' }); + +const server = new AgentServer({ host: '0.0.0.0', port: 3000 }); +server.register(salesAgent); +server.register(supportAgent); + +await server.run(); +``` + +## See Also + +- \[[AgentBase](/docs/sdk-reference/reference/typescript/agents/agent-base)]\(xref://[AgentBase](/docs/sdk-reference/reference/typescript/agents/agent-base)) + +## Properties + + + Hostname the server binds to. + + + + Public logger for this server instance. + + + + Logging level (debug, info, warn, error). + + + + Port the server listens on. + + +## Methods + +### constructor + +Create an AgentServer. + +#### Signature + +```typescript +constructor(opts?: { ...3 fields }): AgentServer +``` + +#### Parameters + + + Optional host, port, and logLevel overrides; defaults to 0.0.0.0:3000, logLevel 'info'. + + + + + + + + +#### Returns + +`AgentServer` + +#### Source + +[`src/AgentServer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentServer.ts) + +Line 97. + +*** + +### getAgent + +Look up a registered agent by its route prefix. + +#### Signature + +```typescript +getAgent(route: string): AgentBase | undefined +``` + +#### Parameters + + + The route prefix to look up. + + +#### Returns + +`AgentBase | undefined` — The agent at that route, or undefined if none is registered. + +#### Source + +[`src/AgentServer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentServer.ts) + +Line 191. + +*** + +### getAgents + +Get all registered agents keyed by their route prefix. + +#### Signature + +```typescript +getAgents(): Map +``` + +#### Returns + +`Map` — A map of route prefixes to AgentBase instances. + +#### Source + +[`src/AgentServer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentServer.ts) + +Line 182. + +*** + +### getApp + +Build and return the Hono application with all registered agents and a root listing endpoint. + +#### Signature + +```typescript +getApp(): Hono +``` + +#### Returns + +`Hono` — The fully configured Hono app. + +#### Source + +[`src/AgentServer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentServer.ts) + +Line 384. + +*** + +### register + +Register an agent at the given route prefix. + +#### Signature + +```typescript +register(agent: AgentBase, route?: string): void +``` + +#### Parameters + + + The AgentBase instance to mount. + + + + Route prefix; defaults to the agent's own route or '/'. + + +#### Returns + +`void` + +#### Throws + +- If the route is already occupied by another agent. + +#### Source + +[`src/AgentServer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentServer.ts) + +Line 132. + +*** + +### registerGlobalRoutingCallback + +Register a routing callback across all agents at the given path. + +This allows unified routing logic to be applied to all agents from +a central server-level coordinator. + +#### Signature + +```typescript +registerGlobalRoutingCallback(callbackFn: RoutingCallback, path: string): void +``` + +#### Parameters + + + The callback function that receives a request and body, returning a route string or undefined. + + + + The path to register the callback at. + + +#### Returns + +`void` + +#### Source + +[`src/AgentServer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentServer.ts) + +Line 338. + +*** + +### registerSipUsername + +Register a mapping from a SIP username to an agent route at the server level. + +Allows callers to manually route an arbitrary SIP username to any already-registered +agent route, independent of the automatic mapping performed by `setupSipRouting`. + +#### Signature + +```typescript +registerSipUsername(username: string, route: string): void +``` + +#### Parameters + + + The SIP username to map (stored lowercase). + + + + The agent route to map the username to (leading `/` added if missing; trailing slashes stripped). + + +#### Returns + +`void` + +#### Source + +[`src/AgentServer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentServer.ts) + +Line 310. + +*** + +### run + +Start the HTTP server and begin listening for requests. + +This method handles server mode only. For serverless deployments +(AWS Lambda, Google Cloud Functions, Azure Functions), use +[ServerlessAdapter](/docs/sdk-reference/reference/typescript/agents/serverless-adapter) instead. When `SWAIG_CLI_MODE=true` is set in +the environment, the call is a no-op so agent config can be inspected +without starting a server. + +#### Signature + +```typescript +run(host?: string, port?: number): Promise +``` + +#### Parameters + + + Override the configured hostname. Defaults to the constructor value. + + + + Override the configured port. Defaults to the constructor value. + + +#### Returns + +`Promise` — Resolves once the underlying Hono server has begun listening. + +#### Source + +[`src/AgentServer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentServer.ts) + +Line 420. + +*** + +### serveStaticFiles + +Serve static files from a local directory under a given route prefix. +Includes path traversal protection (rejects `..`), MIME type detection, +and security headers (Cache-Control, X-Content-Type-Options). + +#### Signature + +```typescript +serveStaticFiles(directory: string, route: string = '/'): void +``` + +#### Parameters + + + Absolute or relative path to the directory to serve. + + + + Route prefix for static files (defaults to '/'). + + +#### Returns + +`void` + +#### Source + +[`src/AgentServer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentServer.ts) + +Line 202. + +*** + +### setupSipRouting + +Set up central SIP-based routing for the server. + +This configures all agents to handle SIP requests at the specified path, +using a coordinated routing system where each agent checks if it can +handle SIP requests for specific usernames. + +#### Signature + +```typescript +setupSipRouting(route: string = '/sip', autoMap: boolean = true): void +``` + +#### Parameters + + + The path for SIP routing (default: '/sip'). + + + + Whether to automatically map SIP usernames to agent routes (default: true). + + +#### Returns + +`void` + +#### Source + +[`src/AgentServer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentServer.ts) + +Line 254. + +*** + +### unregister + +Remove an agent registration by route. + +#### Signature + +```typescript +unregister(route: string): boolean +``` + +#### Parameters + + + The route prefix to unregister. + + +#### Returns + +`boolean` — True if the agent was found and removed, false if not found. + +#### Source + +[`src/AgentServer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentServer.ts) + +Line 172. + +## Source + +[`src/AgentServer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentServer.ts) + +Line 70. diff --git a/fern/products/sdk-reference/typescript/agents/auth-handler/index.mdx b/fern/products/sdk-reference/typescript/agents/auth-handler/index.mdx new file mode 100644 index 0000000000..1347ecbe38 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/auth-handler/index.mdx @@ -0,0 +1,343 @@ +--- +slug: "/reference/typescript/agents/auth-handler" +title: "AuthHandler" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "AuthHandler" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/AuthHandler.ts" +--- +# `AuthHandler` + +Multi-method authentication handler with timing-safe credential comparison. + +## Signature + +```typescript +class AuthHandler +``` + +## Properties + + + The authentication configuration for this handler. + + +## Methods + +### constructor + +Create a new AuthHandler. + +#### Signature + +```typescript +constructor(config: AuthConfig): AuthHandler +``` + +#### Parameters + + + Authentication configuration specifying one or more auth methods. + + +#### Returns + +`AuthHandler` + +#### Source + +[`src/AuthHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AuthHandler.ts) + +Line 50. + +*** + +### expressMiddleware + +Create an Express/Connect-compatible middleware adapter. + +This serves as the framework-agnostic equivalent of Python's +`get_fastapi_dependency`. For standalone validation without a +framework, use [validate](/docs/sdk-reference/reference/typescript/agents/auth-handler#validate) directly. + +#### Signature + +```typescript +expressMiddleware( + optional: boolean = false +): (req: any, res: any, next: () => void) => Promise +``` + +#### Parameters + + + When true, unauthenticated requests are allowed through (default: false). + + +#### Returns + +`(req: any, res: any, next: () => void) => Promise` — An Express-compatible middleware function. + +#### Source + +[`src/AuthHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AuthHandler.ts) + +Line 186. + +*** + +### getAuthInfo + +Get information about configured authentication methods. + +Returns structured metadata describing each enabled auth method, +including usernames, header names, and usage hints. + +#### Signature + +```typescript +getAuthInfo(): { apiKey?: { enabled: true; header: string; hint: string }; basic?: { enabled: true; username: string }; bearer?: { enabled: true; hint: string } } +``` + +#### Returns + +`{ apiKey?: { enabled: true; header: string; hint: string }; basic?: { enabled: true; username: string }; bearer?: { enabled: true; hint: string } }` — An object describing the enabled auth methods and their configuration. + +#### Source + +[`src/AuthHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AuthHandler.ts) + +Line 206. + +*** + +### hasApiKeyAuth + +Check whether API key authentication is configured. + +#### Signature + +```typescript +hasApiKeyAuth(): boolean +``` + +#### Returns + +`boolean` — True if an API key has been set. + +#### Source + +[`src/AuthHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AuthHandler.ts) + +Line 245. + +*** + +### hasBasicAuth + +Check whether Basic authentication is configured. + +#### Signature + +```typescript +hasBasicAuth(): boolean +``` + +#### Returns + +`boolean` — True if basic auth credentials have been set. + +#### Source + +[`src/AuthHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AuthHandler.ts) + +Line 253. + +*** + +### hasBearerAuth + +Check whether Bearer token authentication is configured. + +#### Signature + +```typescript +hasBearerAuth(): boolean +``` + +#### Returns + +`boolean` — True if a bearer token has been set. + +#### Source + +[`src/AuthHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AuthHandler.ts) + +Line 237. + +*** + +### middleware + +Create a Hono-compatible middleware that rejects unauthorized requests with a 401 response. + +#### Signature + +```typescript +middleware( + optional: boolean = false +): (c: any, next: () => Promise) => Promise +``` + +#### Parameters + + + When true, unauthenticated requests are allowed through instead of being rejected (default: false). + + +#### Returns + +`(c: any, next: () => Promise) => Promise` — A middleware function suitable for use with Hono's `app.use()`. + +#### Source + +[`src/AuthHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AuthHandler.ts) + +Line 163. + +*** + +### validate + +Validate request headers against configured auth methods (Bearer, API Key, Basic, Custom) in order. + +#### Signature + +```typescript +validate(headers: Record): Promise +``` + +#### Parameters + + + The request headers as a string-keyed record. + + +#### Returns + +`Promise` — True if any configured method accepts the request, or if no methods are configured. + +#### Source + +[`src/AuthHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AuthHandler.ts) + +Line 59. + +*** + +### verifyApiKey + +Verify an API key against the configured key. + +Returns false immediately if API key auth is not configured. +Uses constant-time comparison to prevent timing attacks. + +#### Signature + +```typescript +verifyApiKey(key: string): boolean +``` + +#### Parameters + + + The API key string to verify. + + +#### Returns + +`boolean` — True if the key matches the configured API key. + +#### Source + +[`src/AuthHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AuthHandler.ts) + +Line 153. + +*** + +### verifyBasicAuth + +Verify a Basic Auth username/password pair against the configured credentials. + +Returns false immediately if Basic Auth is not configured. +Uses constant-time comparison to prevent timing attacks. + +#### Signature + +```typescript +verifyBasicAuth(username: string, password: string): boolean +``` + +#### Parameters + + + The username to verify. + + + + The password to verify. + + +#### Returns + +`boolean` — True if the credentials match the configured Basic Auth credentials. + +#### Source + +[`src/AuthHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AuthHandler.ts) + +Line 124. + +*** + +### verifyBearerToken + +Verify a Bearer token against the configured token. + +Returns false immediately if Bearer token auth is not configured. +Uses constant-time comparison to prevent timing attacks. + +#### Signature + +```typescript +verifyBearerToken(token: string): boolean +``` + +#### Parameters + + + The Bearer token string to verify (without the "Bearer " prefix). + + +#### Returns + +`boolean` — True if the token matches the configured Bearer token. + +#### Source + +[`src/AuthHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AuthHandler.ts) + +Line 139. + +## Source + +[`src/AuthHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AuthHandler.ts) + +Line 42. diff --git a/fern/products/sdk-reference/typescript/agents/auth-handler/index__2.mdx b/fern/products/sdk-reference/typescript/agents/auth-handler/index__2.mdx new file mode 100644 index 0000000000..8a4cdf2360 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/auth-handler/index__2.mdx @@ -0,0 +1,58 @@ +--- +slug: "/reference/typescript/agents/auth-handler/index__2" +title: "AuthHandler" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "agents.AuthHandler" + parent: "agents" + module: "agents" +--- +# `AuthHandler` + +## Interfaces + +### AuthConfig + +Configuration for one or more authentication methods checked by [AuthHandler](/docs/sdk-reference/reference/typescript/agents/auth-handler). + +#### Signature + +```typescript +interface AuthConfig +``` + +#### Properties + + + When explicitly set to false, deny requests if no auth methods are configured. + + + + API key matched against the X-Api-Key header. + + + + Custom header name for API key lookup (default: 'X-Api-Key'). + + + + Basic auth credentials as a \[username, password] tuple. + + + + Bearer token matched against the Authorization header. + + + + Custom validator function; return true to allow the request. + + +#### Source + +[`src/AuthHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AuthHandler.ts) + +Line 14. diff --git a/fern/products/sdk-reference/typescript/agents/cli/agent-loader/index.mdx b/fern/products/sdk-reference/typescript/agents/cli/agent-loader/index.mdx new file mode 100644 index 0000000000..1d15063bd0 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/cli/agent-loader/index.mdx @@ -0,0 +1,87 @@ +--- +slug: "/reference/typescript/agents/cli/agent-loader" +title: "agent-loader" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "cli.agent-loader" + parent: "agents.cli" + module: "agents.cli" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/cli/agent-loader.ts" +--- +# `agent-loader` + +## Signature + +```typescript +module agent-loader +``` + +## Functions + +### listAgents + +List all exported agent instances and classes in a module. + +#### Signature + +```typescript +listAgents(agentPath: string): Promise +``` + +#### Parameters + + + Path to the agent module file. + + +#### Returns + +`Promise` — Array of export names that are AgentBase instances or subclasses. + +#### Source + +[`src/cli/agent-loader.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/cli/agent-loader.ts) + +Line 157. + +*** + +### loadAgent + +Dynamically import an agent file and resolve an AgentBase instance using duck-typing heuristics. + +#### Signature + +```typescript +loadAgent(agentPath: string, agentClass?: string): Promise +``` + +#### Parameters + + + Path to the agent module file. + + + + Optional name of a specific exported class or instance to use. + + +#### Returns + +`Promise` — The resolved AgentBase instance. + +#### Source + +[`src/cli/agent-loader.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/cli/agent-loader.ts) + +Line 86. + +## Source + +[`src/cli/agent-loader.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/cli/agent-loader.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/agents/cli/index.mdx b/fern/products/sdk-reference/typescript/agents/cli/index.mdx new file mode 100644 index 0000000000..c01402138a --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/cli/index.mdx @@ -0,0 +1,24 @@ +--- +slug: "/reference/typescript/agents/cli" +title: "cli" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "agents.cli" + parent: "agents" + module: "agents" +--- +# `cli` + +## Modules + + + + + + + + diff --git a/fern/products/sdk-reference/typescript/agents/cli/mock-data/index.mdx b/fern/products/sdk-reference/typescript/agents/cli/mock-data/index.mdx new file mode 100644 index 0000000000..9bbd1af755 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/cli/mock-data/index.mdx @@ -0,0 +1,147 @@ +--- +slug: "/reference/typescript/agents/cli/mock-data" +title: "mock-data" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "cli.mock-data" + parent: "agents.cli" + module: "agents.cli" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/cli/mock-data.ts" +--- +# `mock-data` + +## Signature + +```typescript +module mock-data +``` + +## Functions + +### generateFakePostData + +Generate a full mock POST body simulating an inbound SignalWire call request. + +#### Signature + +```typescript +generateFakePostData(opts?: MockCallOptions): Record +``` + +#### Parameters + + + Optional overrides for call metadata fields. + + +#### Returns + +`Record` — A record representing the simulated call POST data. + +#### Source + +[`src/cli/mock-data.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/cli/mock-data.ts) + +Line 40. + +*** + +### generateMinimalPostData + +Generate a minimal mock POST body for executing a single SWAIG function. + +#### Signature + +```typescript +generateMinimalPostData( + fnName: string, + args?: Record, + opts?: { ...2 fields } +): Record +``` + +#### Parameters + + + Name of the SWAIG function to invoke. + + + + Arguments to pass to the function. + + + + Optional call ID and field overrides. + + + + + + +#### Returns + +`Record` — A record representing the minimal POST data for function execution. + +#### Source + +[`src/cli/mock-data.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/cli/mock-data.ts) + +Line 89. + +## Interfaces + +### MockCallOptions + +Options for generating mock call data in CLI testing. + +#### Signature + +```typescript +interface MockCallOptions +``` + +#### Properties + + + Direction of the call. + + + + Override the auto-generated call ID. + + + + Current call state (e.g. "active", "ringing", "hold"). + + + + Call transport type. + + + + Caller's phone number. + + + + Additional key-value overrides merged into the post data. + + + + Destination extension or agent name. + + +#### Source + +[`src/cli/mock-data.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/cli/mock-data.ts) + +Line 9. + +## Source + +[`src/cli/mock-data.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/cli/mock-data.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/agents/cli/swaig-test/index.mdx b/fern/products/sdk-reference/typescript/agents/cli/swaig-test/index.mdx new file mode 100644 index 0000000000..974ee49161 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/cli/swaig-test/index.mdx @@ -0,0 +1,27 @@ +--- +slug: "/reference/typescript/agents/cli/swaig-test" +title: "swaig-test" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "cli.swaig-test" + parent: "agents.cli" + module: "agents.cli" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/cli/swaig-test.ts" +--- +# `swaig-test` + +## Signature + +```typescript +module swaig-test +``` + +## Source + +[`src/cli/swaig-test.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/cli/swaig-test.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/agents/config-loader/index.mdx b/fern/products/sdk-reference/typescript/agents/config-loader/index.mdx new file mode 100644 index 0000000000..b1b41ba2ff --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/config-loader/index.mdx @@ -0,0 +1,545 @@ +--- +slug: "/reference/typescript/agents/config-loader" +title: "ConfigLoader" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "ConfigLoader" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/ConfigLoader.ts" +--- +# `ConfigLoader` + +JSON configuration file loader with environment variable interpolation and dot-notation access. + +## Signature + +```typescript +class ConfigLoader +``` + +## Properties + + + Get the ordered list of config file paths that were passed/searched. + + +## Methods + +### constructor + +Create a new ConfigLoader, optionally loading a JSON file immediately. + +Accepts a single file path or an array of paths. When given an array, +the loader iterates in order and loads the first file that exists +(mirroring Python's ordered-search behaviour). + +#### Signature + +```typescript +constructor(filePaths?: string | string[]): ConfigLoader +``` + +#### Parameters + + + Path(s) to a JSON config file to load on construction. + + +#### Returns + +`ConfigLoader` + +#### Source + +[`src/ConfigLoader.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ConfigLoader.ts) + +Line 33. + +*** + +### findConfigFile + +Find a config file path without loading it. + +Searches service-specific filenames, additional paths, and default paths. +Returns the first found path string or null. + +**Modifiers:** `static` + +#### Signature + +```typescript +findConfigFile(serviceName?: string, additionalPaths?: string[]): string | null +``` + +#### Parameters + + + Optional service name for service-specific config filenames. + + + + Additional file paths to check. + + +#### Returns + +`string | null` — Path to the first config file found, or null. + +#### Source + +[`src/ConfigLoader.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ConfigLoader.ts) + +Line 109. + +*** + +### get + +Retrieve a configuration value using a dot-notation path (e.g. `'server.port'`). + +#### Signature + +```typescript +get(path: string, defaultValue?: T): T +``` + +#### Type Parameters + + + +#### Parameters + + + Dot-separated key path into the config object. + + + + Value returned when the path does not exist. + + +#### Returns + +`T` — The resolved value, or defaultValue if not found. + +#### Source + +[`src/ConfigLoader.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ConfigLoader.ts) + +Line 182. + +*** + +### getAll + +Return a shallow copy of the entire configuration object. + +#### Signature + +```typescript +getAll(): Record +``` + +#### Returns + +`Record` — A copy of the top-level config data. + +#### Source + +[`src/ConfigLoader.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ConfigLoader.ts) + +Line 247. + +*** + +### getConfig + +Alias for [getAll](/docs/sdk-reference/reference/typescript/agents/config-loader#get-all) — matches the Python SDK's `get_config()` method name. + +#### Signature + +```typescript +getConfig(): Record +``` + +#### Returns + +`Record` — A copy of the top-level config data. + +#### Source + +[`src/ConfigLoader.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ConfigLoader.ts) + +Line 255. + +*** + +### getConfigFile + +Alias for [getFilePath](/docs/sdk-reference/reference/typescript/agents/config-loader#get-file-path) — matches the Python SDK's `get_config_file()` method name. + +#### Signature + +```typescript +getConfigFile(): string | null +``` + +#### Returns + +`string | null` — The file path, or null if config was loaded from an object. + +#### Source + +[`src/ConfigLoader.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ConfigLoader.ts) + +Line 271. + +*** + +### getFilePath + +Return the absolute path of the loaded config file, if any. + +#### Signature + +```typescript +getFilePath(): string | null +``` + +#### Returns + +`string | null` — The file path, or null if config was loaded from an object. + +#### Source + +[`src/ConfigLoader.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ConfigLoader.ts) + +Line 263. + +*** + +### getSection + +Get an entire configuration section with all environment variables substituted. + +#### Signature + +```typescript +getSection(section: string): Record +``` + +#### Parameters + + + The top-level section name (e.g. 'security', 'server'). + + +#### Returns + +`Record` — The configuration section as an object, or an empty object if not found. + +#### Source + +[`src/ConfigLoader.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ConfigLoader.ts) + +Line 298. + +*** + +### has + +Check whether a dot-notation path exists in the loaded configuration. + +#### Signature + +```typescript +has(path: string): boolean +``` + +#### Parameters + + + Dot-separated key path to check. + + +#### Returns + +`boolean` — True if the path resolves to a defined value. + +#### Source + +[`src/ConfigLoader.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ConfigLoader.ts) + +Line 229. + +*** + +### hasConfig + +Check if a configuration was loaded. + +**Deliberate deviation from Python `has_config()`:** Python returns `True` +only when a file was loaded (`self._config is not None`). This TypeScript +implementation also returns `true` when data was loaded via +[loadFromObject](/docs/sdk-reference/reference/typescript/agents/config-loader#load-from-object), because `loadFromObject` is an extra TS-only method +with no Python equivalent. Treating object-loaded data as "configured" is +the correct semantic for the TS API surface. + +If you need file-load-only detection, check `this.getFilePath() !== null`. + +#### Signature + +```typescript +hasConfig(): boolean +``` + +#### Returns + +`boolean` — True if configuration data exists (from file or object). + +#### Source + +[`src/ConfigLoader.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ConfigLoader.ts) + +Line 289. + +*** + +### interpolateEnvVars + +Interpolate $\{VAR|default\} patterns in a raw string. + +#### Signature + +```typescript +interpolateEnvVars(input: string): string +``` + +#### Parameters + + + The string containing env var references. + + +#### Returns + +`string` — The string with all env var references resolved. + +#### Source + +[`src/ConfigLoader.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ConfigLoader.ts) + +Line 439. + +*** + +### load + +Load configuration from a JSON file, performing `${VAR|default}` env var interpolation on the raw text. + +#### Signature + +```typescript +load(filePath: string): this +``` + +#### Parameters + + + Path to the JSON config file. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/ConfigLoader.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ConfigLoader.ts) + +Line 65. + +*** + +### loadFromObject + +Load configuration from a plain object instead of a file, useful for testing or programmatic setup. + +#### Signature + +```typescript +loadFromObject(obj: Record): this +``` + +#### Parameters + + + The configuration object to use. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/ConfigLoader.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ConfigLoader.ts) + +Line 428. + +*** + +### mergeWithEnv + +Merge configuration with environment variables that match a prefix. + +Config file values take precedence over environment variables. Matching +env var keys are stripped of the prefix, lowercased, split on `_`, and +written into a nested object (e.g. `SWML_FOO_BAR` → `{ foo: { bar: v } }`). +Mirrors Python's `merge_with_env` in +`signalwire/signalwire/core/config_loader.py`. + +#### Signature + +```typescript +mergeWithEnv(envPrefix: string = 'SWML_'): Record +``` + +#### Parameters + + + Prefix for environment variables to consider (default: `'SWML_'`). + + +#### Returns + +`Record` — Merged configuration dictionary. + +#### Source + +[`src/ConfigLoader.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ConfigLoader.ts) + +Line 367. + +*** + +### search + +Search for a config file in standard locations. + +Default search paths: CWD, `./config`, `$HOME/.signalwire`, +`.swml/`, `$HOME/.swml/`, `/etc/swml/`. + +**Modifiers:** `static` + +#### Signature + +```typescript +search( + filename: string, + additionalPaths?: string[], + serviceName?: string +): ConfigLoader | null +``` + +#### Parameters + + + The config file name to search for. + + + + Extra directories to search before the defaults. + + + + Optional service name; prepends service-specific filenames to the search. + + +#### Returns + +`ConfigLoader | null` — A loaded ConfigLoader if found, or null if the file does not exist in any search path. + +#### Source + +[`src/ConfigLoader.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ConfigLoader.ts) + +Line 88. + +*** + +### set + +Set a configuration value at the given dot-notation path, creating intermediate objects as needed. + +#### Signature + +```typescript +set(path: string, value: unknown): this +``` + +#### Parameters + + + Dot-separated key path into the config object. + + + + The value to store. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/ConfigLoader.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ConfigLoader.ts) + +Line 205. + +*** + +### substituteVars + +Recursively substitute `${VAR|default}` environment variables in any value. + +Walks strings, objects, and arrays. Coerces result strings to boolean +(`"true"` / `"false"`) or number when appropriate. + +#### Signature + +```typescript +substituteVars(value: unknown, maxDepth: number = 10): unknown +``` + +#### Parameters + + + The value to process (string, object, array, or primitive). + + + + Maximum recursion depth to prevent infinite loops (default: 10). + + +#### Returns + +`unknown` — The value with all environment variables substituted. + +#### Source + +[`src/ConfigLoader.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ConfigLoader.ts) + +Line 316. + +## Source + +[`src/ConfigLoader.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ConfigLoader.ts) + +Line 15. diff --git a/fern/products/sdk-reference/typescript/agents/context-builder/context/index.mdx b/fern/products/sdk-reference/typescript/agents/context-builder/context/index.mdx new file mode 100644 index 0000000000..448b2f23eb --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/context-builder/context/index.mdx @@ -0,0 +1,764 @@ +--- +slug: "/reference/typescript/agents/context-builder/context" +title: "Context" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "ContextBuilder.Context" + parent: "agents.ContextBuilder" + module: "agents.ContextBuilder" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts" +--- +# `Context` + +A named context containing ordered steps, prompt configuration, and navigation rules. + +## Signature + +```typescript +class Context +``` + +## Properties + + + The unique name identifying this context. + + +## Methods + +### addBullets + +Adds a POM section with bullets to the context prompt, mutually exclusive with raw prompt text. + +#### Signature + +```typescript +addBullets(title: string, bullets: string[]): this +``` + +#### Parameters + + + The section heading. + + + + The list of bullet point strings. + + +#### Returns + +`this` — This context for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 757. + +*** + +### addEnterFiller + +Adds enter filler phrases for a specific language. + +#### Signature + +```typescript +addEnterFiller(languageCode: string, fillers: string[]): this +``` + +#### Parameters + + + The language code (e.g., "en-US"). + + + + Array of filler phrases. + + +#### Returns + +`this` — This context for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 789. + +*** + +### addExitFiller + +Adds exit filler phrases for a specific language. + +#### Signature + +```typescript +addExitFiller(languageCode: string, fillers: string[]): this +``` + +#### Parameters + + + The language code (e.g., "en-US"). + + + + Array of filler phrases. + + +#### Returns + +`this` — This context for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 801. + +*** + +### addSection + +Adds a POM section with a body to the context prompt, mutually exclusive with raw prompt text. + +#### Signature + +```typescript +addSection(title: string, body: string): this +``` + +#### Parameters + + + The section heading. + + + + The section body text. + + +#### Returns + +`this` — This context for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 745. + +*** + +### addStep + +Adds a new step to this context. + +#### Signature + +```typescript +addStep(name: string, opts?: { ...5 fields }): Step +``` + +#### Parameters + + + The unique step name within this context. + + + + Optional shorthand for task text, bullets, criteria, functions, and valid steps. + + + + + + + + + + + + +#### Returns + +`Step` — The newly created Step for further configuration. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 532. + +*** + +### addSystemBullets + +Adds a POM section with bullets to the system prompt, mutually exclusive with raw system prompt text. + +#### Signature + +```typescript +addSystemBullets(title: string, bullets: string[]): this +``` + +#### Parameters + + + The section heading. + + + + The list of bullet point strings. + + +#### Returns + +`this` — This context for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 722. + +*** + +### addSystemSection + +Adds a POM section to the system prompt, mutually exclusive with raw system prompt text. + +#### Signature + +```typescript +addSystemSection(title: string, body: string): this +``` + +#### Parameters + + + The section heading. + + + + The section body text. + + +#### Returns + +`this` — This context for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 710. + +*** + +### constructor + +Creates a new Context. + +#### Signature + +```typescript +constructor(name: string): Context +``` + +#### Parameters + + + The unique context name. + + +#### Returns + +`Context` + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 522. + +*** + +### getStep + +Returns a step by name. + +#### Signature + +```typescript +getStep(name: string): Step | undefined +``` + +#### Parameters + + + The step name to retrieve. + + +#### Returns + +`Step | undefined` — The matching Step, or undefined if not found. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 562. + +*** + +### moveStep + +Moves a step to a new position in the step order. + +#### Signature + +```typescript +moveStep(name: string, position: number): this +``` + +#### Parameters + + + The step name to move. + + + + The zero-based index to insert at. + + +#### Returns + +`this` — This context for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 583. + +*** + +### removeStep + +Removes a step from this context by name. + +#### Signature + +```typescript +removeStep(name: string): this +``` + +#### Parameters + + + The step name to remove. + + +#### Returns + +`this` — This context for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 571. + +*** + +### setConsolidate + +Sets whether to consolidate conversation history when entering this context. + +#### Signature + +```typescript +setConsolidate(consolidate: boolean): this +``` + +#### Parameters + + + Whether to consolidate. + + +#### Returns + +`this` — This context for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 636. + +*** + +### setEnterFillers + +Sets filler phrases spoken when entering this context, keyed by language code. + +#### Signature + +```typescript +setEnterFillers(fillers: Record): this +``` + +#### Parameters + + + Map of language codes to arrays of filler phrases. + + +#### Returns + +`this` — This context for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 768. + +*** + +### setExitFillers + +Sets filler phrases spoken when exiting this context, keyed by language code. + +#### Signature + +```typescript +setExitFillers(fillers: Record): this +``` + +#### Parameters + + + Map of language codes to arrays of filler phrases. + + +#### Returns + +`this` — This context for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 778. + +*** + +### setFullReset + +Sets whether to fully reset conversation history when entering this context. + +#### Signature + +```typescript +setFullReset(fullReset: boolean): this +``` + +#### Parameters + + + Whether to fully reset. + + +#### Returns + +`this` — This context for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 646. + +*** + +### setInitialStep + +Set which step the context starts on when entered. + +By default, a context starts on its first step (index 0). Use this to +skip a preamble step on re-entry via `change_context`. + +#### Signature + +```typescript +setInitialStep(stepName: string): this +``` + +#### Parameters + + + Name of the step to start on. Must exist in this context (validated by ContextBuilder.validate()). + + +#### Returns + +`this` — This context for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 670. + +*** + +### setIsolated + +Mark this context as isolated — entering it wipes conversation history. + +When `isolated=true` and the context is entered via change\_context, the +runtime wipes the conversation array. The model starts fresh with only +the new context's systemPrompt + step instructions, with no memory of +prior turns. + +EXCEPTION — `reset` overrides the wipe: +If the context also has a `reset` configuration (via consolidate or +full\_reset), the wipe is skipped in favor of the reset behavior. Use +reset with consolidate=true to summarize prior history into a single +message instead of dropping it entirely. + +Use cases: + +- Switching to a sensitive billing flow that should not see prior + small-talk +- Handing off to a different agent persona +- Resetting after a long off-topic detour + +#### Signature + +```typescript +setIsolated(isolated: boolean): this +``` + +#### Parameters + + + True to wipe conversation history on context entry (subject to the reset exception above). + + +#### Returns + +`this` — This context for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 699. + +*** + +### setPostPrompt + +Sets the post-prompt text for this context. + +#### Signature + +```typescript +setPostPrompt(postPrompt: string): this +``` + +#### Parameters + + + The post-prompt string. + + +#### Returns + +`this` — This context for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 615. + +*** + +### setPrompt + +Sets raw prompt text for this context, mutually exclusive with POM prompt sections. + +#### Signature + +```typescript +setPrompt(prompt: string): this +``` + +#### Parameters + + + The prompt string. + + +#### Returns + +`this` — This context for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 733. + +*** + +### setSystemPrompt + +Sets raw system prompt text, mutually exclusive with system POM sections. + +#### Signature + +```typescript +setSystemPrompt(systemPrompt: string): this +``` + +#### Parameters + + + The system prompt string. + + +#### Returns + +`this` — This context for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 625. + +*** + +### setUserPrompt + +Sets the user prompt text for this context. + +#### Signature + +```typescript +setUserPrompt(userPrompt: string): this +``` + +#### Parameters + + + The user prompt string. + + +#### Returns + +`this` — This context for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 656. + +*** + +### setValidContexts + +Sets which contexts the AI may navigate to from this context. + +#### Signature + +```typescript +setValidContexts(contexts: string[]): this +``` + +#### Parameters + + + List of allowed context names. + + +#### Returns + +`this` — This context for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 595. + +*** + +### setValidSteps + +Sets which steps the AI may navigate to from this context. + +#### Signature + +```typescript +setValidSteps(steps: string[]): this +``` + +#### Parameters + + + List of allowed step names. + + +#### Returns + +`this` — This context for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 605. + +*** + +### toDict + +Serializes this context and all its steps to a plain object for SWML output. + +#### Signature + +```typescript +toDict(): Record +``` + +#### Returns + +`Record` — A dictionary representation of this context. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 854. + +## Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 498. diff --git a/fern/products/sdk-reference/typescript/agents/context-builder/gather-info/index.mdx b/fern/products/sdk-reference/typescript/agents/context-builder/gather-info/index.mdx new file mode 100644 index 0000000000..a876490710 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/context-builder/gather-info/index.mdx @@ -0,0 +1,147 @@ +--- +slug: "/reference/typescript/agents/context-builder/gather-info" +title: "GatherInfo" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "ContextBuilder.GatherInfo" + parent: "agents.ContextBuilder" + module: "agents.ContextBuilder" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts" +--- +# `GatherInfo` + +Collects structured information from the user through a series of questions. + +## Signature + +```typescript +class GatherInfo +``` + +## Methods + +### addQuestion + +Adds a question to this gather operation. + +#### Signature + +```typescript +addQuestion(opts: { ...6 fields }): this +``` + +#### Parameters + + + Question configuration including key, question text, and optional type/confirm/prompt/functions. + + + + + + + + + + + + + + +#### Returns + +`this` — This GatherInfo for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 105. + +*** + +### constructor + +Creates a new GatherInfo. + +#### Signature + +```typescript +constructor(opts?: { ...3 fields }): GatherInfo +``` + +#### Parameters + + + Optional output key, completion action, and prompt configuration. + + + + + + + + +#### Returns + +`GatherInfo` + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 94. + +*** + +### getQuestions + +Returns all questions in this gather operation. + +#### Signature + +```typescript +getQuestions(): GatherQuestion[] +``` + +#### Returns + +`GatherQuestion[]` — The array of GatherQuestion instances. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 121. + +*** + +### toDict + +Serializes this gather operation to a plain object for SWML output. + +#### Signature + +```typescript +toDict(): Record +``` + +#### Returns + +`Record` — A dictionary representation of the gather info and its questions. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 137. + +## Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 84. diff --git a/fern/products/sdk-reference/typescript/agents/context-builder/gather-question/index.mdx b/fern/products/sdk-reference/typescript/agents/context-builder/gather-question/index.mdx new file mode 100644 index 0000000000..187630595e --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/context-builder/gather-question/index.mdx @@ -0,0 +1,117 @@ +--- +slug: "/reference/typescript/agents/context-builder/gather-question" +title: "GatherQuestion" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "ContextBuilder.GatherQuestion" + parent: "agents.ContextBuilder" + module: "agents.ContextBuilder" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts" +--- +# `GatherQuestion` + +Represents a single question within a gather operation. + +## Signature + +```typescript +class GatherQuestion +``` + +## Properties + + + Whether the answer requires user confirmation. + + + + Optional list of SWAIG function names available during this question. + + + + Unique key used to store the answer. + + + + Optional additional prompt context for this question. + + + + The question text presented to the user. + + + + Expected answer type (e.g., "string", "number"). + + +## Methods + +### constructor + +Creates a new GatherQuestion. + +#### Signature + +```typescript +constructor(opts: { ...6 fields }): GatherQuestion +``` + +#### Parameters + + + Question configuration including key, question text, and optional type/confirm/prompt/functions. + + + + + + + + + + + + + + +#### Returns + +`GatherQuestion` + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 51. + +*** + +### toDict + +Serializes this question to a plain object for SWML output. + +#### Signature + +```typescript +toDict(): Record +``` + +#### Returns + +`Record` — A dictionary representation of this question. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 71. + +## Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 33. diff --git a/fern/products/sdk-reference/typescript/agents/context-builder/index.mdx b/fern/products/sdk-reference/typescript/agents/context-builder/index.mdx new file mode 100644 index 0000000000..4e4b180711 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/context-builder/index.mdx @@ -0,0 +1,284 @@ +--- +slug: "/reference/typescript/agents/context-builder" +title: "ContextBuilder" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "ContextBuilder" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts" +--- +# `ContextBuilder` + +Builder for multi-step, multi-context AI agent workflows. + +A ContextBuilder owns one or more Contexts; each Context owns an ordered +list of Steps. Only one context and one step is active at a time. Per +chat turn, the runtime injects the current step's instructions as a +system message, then asks the LLM for a response. + +## Native tools auto-injected by the runtime + +When a step (or its enclosing context) declares `validSteps` or +`validContexts`, the runtime auto-injects two native tools so the model +can navigate the flow: + +- `next_step(step: enum)` — present when validSteps is set +- `change_context(context: enum)` — present when validContexts is set + +Their `enum` schemas are rewritten on every turn to match whatever +validSteps / validContexts apply to the current step. You do NOT need +to define these tools yourself; they appear automatically. + +A third native tool — `gather_submit` — is injected during gather\_info +questioning (see Step.setGatherInfo / addGatherQuestion). + +These three names — `next_step`, `change_context`, `gather_submit` — +are reserved. ContextBuilder.validate() will reject any agent that +defines a SWAIG tool with one of these names. + +## Function whitelisting (Step.setFunctions) + +Each step may declare a `functions` whitelist. The whitelist is applied +in-memory at the start of each LLM turn. CRITICALLY: if a step does NOT +declare a `functions` field, it INHERITS the previous step's active set. +See Step.setFunctions() for details and examples. + +## Validation + +Call validate() (or toDict(), which calls it) to check that: + +- At least one context is defined +- A single context must be named "default" +- Every context has at least one step +- validSteps references resolve to real step names (or "next") +- validContexts references resolve to real context names +- gather\_info questions are non-empty and have unique keys +- gather\_info completion\_action targets a reachable step +- No user-defined SWAIG tool collides with a reserved native name + +## Signature + +```typescript +class ContextBuilder +``` + +## Examples + +```typescript +import { AgentBase, ContextBuilder } from '@signalwire/sdk'; + +const agent = new AgentBase({ name: 'support', route: '/' }); + +const contexts = new ContextBuilder(); +const flow = contexts.addContext('default'); + +flow.addStep('greeting') + .setText("Greet the caller and ask if they're an existing customer.") + .setValidSteps(['existing', 'new']); + +flow.addStep('existing') + .setText('Ask for the account number and read it back to confirm.'); + +flow.addStep('new') + .setText('Collect name, email, and reason for calling.'); + +agent.defineContexts(contexts); +``` + +## See Also + +- \- \[Context]\(/docs/sdk-reference/reference/typescript/agents/context-builder/context) + \- \[Step]\(/docs/sdk-reference/reference/typescript/agents/context-builder/step) + \- \[GatherInfo]\(/docs/sdk-reference/reference/typescript/agents/context-builder/gather-info) + \- \[AgentBase.defineContexts]\(/docs/sdk-reference/reference/typescript/agents/agent-base#define-contexts) + +## Constants + + + Reserved tool names auto-injected by the runtime when contexts/steps are present. User-defined SWAIG tools must not collide with these names. ContextBuilder.validate() rejects any agent that registers a user tool sharing one of these names — the runtime would never call the user tool because the native one wins. + + +## Methods + +### addContext + +Adds a new named context to the builder. + +#### Signature + +```typescript +addContext(name: string): Context +``` + +#### Parameters + + + The unique context name. A single-context flow must name its only context `"default"`. + + +#### Returns + +`Context` — The newly created [Context](/docs/sdk-reference/reference/typescript/agents/context-builder/context) for further configuration. + +#### Throws + +- When the max-context limit is exceeded or a context with the same name already exists. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 994. + +*** + +### constructor + +#### Signature + +```typescript +constructor(): ContextBuilder +``` + +#### Returns + +`ContextBuilder` + +*** + +### getContext + +Returns a context by name. + +#### Signature + +```typescript +getContext(name: string): Context | undefined +``` + +#### Parameters + + + The context name to retrieve. + + +#### Returns + +`Context | undefined` — The matching Context, or undefined if not found. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 1010. + +*** + +### reset + +Removes all contexts, returning the builder to its initial state. +Use this in a dynamic config callback when you need to rebuild +contexts from scratch for a specific request. + +#### Signature + +```typescript +reset(): this +``` + +#### Returns + +`this` — This builder for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 979. + +*** + +### toDict + +Validates and serializes all contexts to a plain object for SWML output. + +#### Signature + +```typescript +toDict(): Record +``` + +#### Returns + +`Record` — A dictionary mapping context names to their serialized representations. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 1162. + +*** + +### validate + +Validates that all contexts have steps, naming constraints are met, and cross-context references are valid. + +#### Signature + +```typescript +validate(): void +``` + +#### Returns + +`void` + +#### Throws + +- Error if validation fails. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 1018. + +## Functions + +### createSimpleContext + +Creates a standalone Context instance without a ContextBuilder. + +#### Signature + +```typescript +createSimpleContext(name: string = 'default'): Context +``` + +#### Parameters + + + The context name (defaults to "default"). + + +#### Returns + +`Context` — A new Context instance. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 1179. + +## Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 957. diff --git a/fern/products/sdk-reference/typescript/agents/context-builder/index__2.mdx b/fern/products/sdk-reference/typescript/agents/context-builder/index__2.mdx new file mode 100644 index 0000000000..4359fbd2c6 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/context-builder/index__2.mdx @@ -0,0 +1,34 @@ +--- +slug: "/reference/typescript/agents/context-builder/index__2" +title: "ContextBuilder" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "agents.ContextBuilder" + parent: "agents" + module: "agents" +--- +# `ContextBuilder` + +## Classes + + + + A named context containing ordered steps, prompt configuration, and navigation rules. + + + + Collects structured information from the user through a series of questions. + + + + Represents a single question within a gather operation. + + + + A single step within a context, with prompt content, criteria, function restrictions, and navigation rules. + + diff --git a/fern/products/sdk-reference/typescript/agents/context-builder/step/index.mdx b/fern/products/sdk-reference/typescript/agents/context-builder/step/index.mdx new file mode 100644 index 0000000000..bfd7ca9b69 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/context-builder/step/index.mdx @@ -0,0 +1,637 @@ +--- +slug: "/reference/typescript/agents/context-builder/step" +title: "Step" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "ContextBuilder.Step" + parent: "agents.ContextBuilder" + module: "agents.ContextBuilder" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts" +--- +# `Step` + +A single step within a context, with prompt content, criteria, function restrictions, and navigation rules. + +## Signature + +```typescript +class Step +``` + +## Properties + + + The unique name identifying this step within its context. + + +## Methods + +### addBullets + +Adds a POM section with bullet points, mutually exclusive with raw text. + +#### Signature + +```typescript +addBullets(title: string, bullets: string[]): this +``` + +#### Parameters + + + The section heading. + + + + The list of bullet point strings. + + +#### Returns + +`this` — This step for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 215. + +*** + +### addGatherQuestion + +Add a question to this step's gather\_info configuration. +setGatherInfo() must be called before this method. + +IMPORTANT — gather mode locks function access: +While the model is asking gather questions, the runtime forcibly +deactivates ALL of the step's other functions. The only callable +tools during a gather question are: + +- `gather_submit` (the native answer-submission tool) +- Whatever names you list in this question's `functions` option + +`next_step` and `change_context` are also filtered out — the model +cannot navigate away until the gather completes. This is by design: +it forces a tight ask → submit → next-question loop. + +If a question needs to call out to a tool (e.g. validate an email, +geocode a ZIP), list that tool name in this question's `functions`. +Functions listed here are active ONLY for this question. + +#### Signature + +```typescript +addGatherQuestion(opts: { ...6 fields }): this +``` + +#### Parameters + + + Question configuration including key, question text, and optional type/confirm/prompt/functions. + + + + + + + + + + + + + + +#### Returns + +`this` — This step for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 366. + +*** + +### addSection + +Adds a POM section with a body, mutually exclusive with raw text. + +#### Signature + +```typescript +addSection(title: string, body: string): this +``` + +#### Parameters + + + The section heading. + + + + The section body text. + + +#### Returns + +`this` — This step for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 203. + +*** + +### clearSections + +Removes all POM sections and raw text from this step. + +#### Signature + +```typescript +clearSections(): this +``` + +#### Returns + +`this` — This step for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 407. + +*** + +### constructor + +Creates a new Step. + +#### Signature + +```typescript +constructor(name: string): Step +``` + +#### Parameters + + + The unique step name. + + +#### Returns + +`Step` + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 182. + +*** + +### setEnd + +Mark this step as terminal for the step flow. + +IMPORTANT: `end=true` does NOT end the conversation or hang up the +call. It exits step mode entirely after this step executes — clearing +the steps list, current step index, validSteps, and validContexts. +The agent keeps running, but operates only under the base system +prompt and the context-level prompt; no more step instructions are +injected and no more `next_step` tool is offered. + +To actually end the call, call a hangup tool or define a hangup hook. + +#### Signature + +```typescript +setEnd(end: boolean): this +``` + +#### Parameters + + + True to exit step mode after this step. + + +#### Returns + +`this` — This step for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 308. + +*** + +### setFunctions + +Set which non-internal functions are callable while this step is active. + +IMPORTANT — inheritance behavior: +If you do NOT call this method, the step inherits whichever function +set was active on the previous step (or the previous context's last +step). The server-side runtime only resets the active set when a +step explicitly declares its `functions` field. This is by design, +but it is the most common source of bugs in multi-step agents: +forgetting setFunctions() on a later step lets the previous step's +tools leak through. + +Best practice: call setFunctions() explicitly on every step that +should have a different toolset than the previous one. + +Keep the per-step active set small: LLM tool selection accuracy +degrades noticeably past ~7-8 simultaneously-active tools per call. +Use per-step whitelisting to partition large tool collections. + +Internal functions (e.g. `startup_hook`, `hangup_hook`, `gather_submit`) +are ALWAYS protected and cannot be deactivated by this whitelist. The +native navigation tools `next_step` and `change_context` are injected +automatically when validSteps/validContexts is set; they are not +affected by this list and do not need to appear in it. + +#### Signature + +```typescript +setFunctions(functions: string | string[]): this +``` + +#### Parameters + + + One of: + + +#### Returns + +`this` — This step for chaining. + +#### Examples + +```typescript +step.setFunctions(['lookup_account', 'check_balance']); // whitelist +step.setFunctions([]); // disable all +step.setFunctions('none'); // disable all (alt) +``` + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 268. + +*** + +### setGatherInfo + +Initializes a gather info operation on this step for collecting structured data. + +#### Signature + +```typescript +setGatherInfo(opts?: { ...3 fields }): this +``` + +#### Parameters + + + Optional output key, completion action, and prompt configuration. + + + + + + + + +#### Returns + +`this` — This step for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 338. + +*** + +### setResetConsolidate + +Sets whether to consolidate conversation history when resetting at this step. + +#### Signature + +```typescript +setResetConsolidate(consolidate: boolean): this +``` + +#### Parameters + + + Whether to consolidate. + + +#### Returns + +`this` — This step for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 438. + +*** + +### setResetFullReset + +Sets whether to perform a full conversation reset at this step. + +#### Signature + +```typescript +setResetFullReset(fullReset: boolean): this +``` + +#### Parameters + + + Whether to fully reset. + + +#### Returns + +`this` — This step for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 448. + +*** + +### setResetSystemPrompt + +Sets the system prompt to use when resetting context at this step. + +#### Signature + +```typescript +setResetSystemPrompt(systemPrompt: string): this +``` + +#### Parameters + + + The replacement system prompt text. + + +#### Returns + +`this` — This step for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 418. + +*** + +### setResetUserPrompt + +Sets the user prompt to use when resetting context at this step. + +#### Signature + +```typescript +setResetUserPrompt(userPrompt: string): this +``` + +#### Parameters + + + The replacement user prompt text. + + +#### Returns + +`this` — This step for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 428. + +*** + +### setSkipToNextStep + +Sets whether to automatically advance to the next step after this one completes. + +#### Signature + +```typescript +setSkipToNextStep(skip: boolean): this +``` + +#### Parameters + + + Whether to skip to the next step. + + +#### Returns + +`this` — This step for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 328. + +*** + +### setSkipUserTurn + +Sets whether to skip waiting for user input when entering this step. + +#### Signature + +```typescript +setSkipUserTurn(skip: boolean): this +``` + +#### Parameters + + + Whether to skip the user turn. + + +#### Returns + +`this` — This step for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 318. + +*** + +### setStepCriteria + +Sets the criteria that must be met before this step is considered complete. + +#### Signature + +```typescript +setStepCriteria(criteria: string): this +``` + +#### Parameters + + + A description of the completion criteria. + + +#### Returns + +`this` — This step for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 226. + +*** + +### setText + +Sets raw text content for this step, mutually exclusive with POM sections. + +#### Signature + +```typescript +setText(text: string): this +``` + +#### Parameters + + + The raw prompt text. + + +#### Returns + +`this` — This step for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 191. + +*** + +### setValidContexts + +Sets which contexts the AI may navigate to from this step. + +#### Signature + +```typescript +setValidContexts(contexts: string[]): this +``` + +#### Parameters + + + List of allowed context names. + + +#### Returns + +`this` — This step for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 288. + +*** + +### setValidSteps + +Sets which steps the AI may navigate to from this step. + +#### Signature + +```typescript +setValidSteps(steps: string[]): this +``` + +#### Parameters + + + List of allowed step names. + + +#### Returns + +`this` — This step for chaining. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 278. + +*** + +### toDict + +Serializes this step to a plain object for SWML output. + +#### Signature + +```typescript +toDict(): Record +``` + +#### Returns + +`Record` — A dictionary representation of this step. + +#### Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 473. + +## Source + +[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) + +Line 160. diff --git a/fern/products/sdk-reference/typescript/agents/data-map/index.mdx b/fern/products/sdk-reference/typescript/agents/data-map/index.mdx new file mode 100644 index 0000000000..bb225adff0 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/data-map/index.mdx @@ -0,0 +1,803 @@ +--- +slug: "/reference/typescript/agents/data-map" +title: "DataMap" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "DataMap" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts" +--- +# `DataMap` + +Fluent builder for SWAIG data\_map configurations. + +Creates server-side tool definitions that execute on SignalWire's infrastructure +**without** requiring a webhook endpoint in your application. Ideal for simple +third-party API integrations (REST calls + pattern-matched response shaping). + +## Signature + +```typescript +class DataMap +``` + +## Examples + + + + ```typescript + import { DataMap, FunctionResult } from '@signalwire/sdk'; + + const weather = new DataMap('get_weather') + .purpose('Look up the current weather for a city') + .parameter('city', 'string', 'The city name', true) + .webhook('GET', 'https://api.example.com/weather?city=${args.city}') + .output(new FunctionResult('In ${city} it is ${response.temp}°F and ${response.condition}.')); + + // Register onto an agent: + agent.registerSwaigFunction(weather.toSwaigFunction()); + ``` + + + + ```typescript + new DataMap('classify_intent') + .purpose('Route callers to the right department.') + .parameter('utterance', 'string', 'What the caller said', true) + .expression('${args.utterance}', /billing|invoice|charge/i, new FunctionResult('billing')) + .expression('${args.utterance}', /tech|broken|error/i, new FunctionResult('support')); + ``` + + + +## See Also + +- \- \[FunctionResult]\(/docs/sdk-reference/reference/typescript/agents/function-result) — response shape used in \`.output()\` / \`.expression()\` + \- \[createSimpleApiTool]\(/docs/sdk-reference/reference/typescript/agents/data-map#create-simple-api-tool) — one-liner helper for REST API tools + \- \[AgentBase.defineTool]\(/docs/sdk-reference/reference/typescript/agents/agent-base#define-tool) — alternative for tools that run in your process + +## Properties + + + The name of the SWAIG function this data map defines. + + +## Methods + +### body + +Set the JSON body for the most recently added webhook. + +#### Signature + +```typescript +body(data: Record): this +``` + +#### Parameters + + + The request body object. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/DataMap.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts) + +Line 292. + +*** + +### constructor + +#### Signature + +```typescript +constructor(functionName: string): DataMap +``` + +#### Parameters + + + The unique name for this data map tool. + + +#### Returns + +`DataMap` + +#### Source + +[`src/DataMap.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts) + +Line 109. + +*** + +### description + +Alias for [purpose](/docs/sdk-reference/reference/typescript/agents/data-map#purpose); sets the LLM-facing tool description. + +This string is read by the model to decide WHEN to call this tool. +See [purpose](/docs/sdk-reference/reference/typescript/agents/data-map#purpose) for bad-vs-good examples. + +#### Signature + +```typescript +description(description: string): this +``` + +#### Parameters + + + Prompt-engineering description of when to call this tool. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/DataMap.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts) + +Line 174. + +*** + +### enableEnvExpansion + +Enable `${ENV.*}` variable expansion in URLs, bodies, and outputs. + +#### Signature + +```typescript +enableEnvExpansion(enabled: boolean = true): this +``` + +#### Parameters + + + Whether to enable expansion (defaults to true). + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/DataMap.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts) + +Line 118. + +*** + +### errorKeys + +Set error keys on the most recently added webhook, or globally if no webhook exists. + +#### Signature + +```typescript +errorKeys(keys: string[]): this +``` + +#### Parameters + + + Response keys that indicate an error occurred. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/DataMap.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts) + +Line 351. + +*** + +### expression + +Add a pattern-matching expression that evaluates a test value against a regex. + +#### Signature + +```typescript +expression( + testValue: string, + pattern: string | RegExp, + output: FunctionResult, + nomatchOutput?: FunctionResult +): this +``` + +#### Parameters + + + The string or template variable to test. + + + + A regex pattern (string or RegExp) to match against. + + + + The result to return when the pattern matches. + + + + Optional result to return when the pattern does not match. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/DataMap.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts) + +Line 231. + +*** + +### fallbackOutput + +Set a fallback output used when no webhook or expression matches. + +#### Signature + +```typescript +fallbackOutput(result: FunctionResult): this +``` + +#### Parameters + + + The FunctionResult to use as the fallback. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/DataMap.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts) + +Line 341. + +*** + +### foreach + +Configure iteration over an array in the webhook response. + +#### Signature + +```typescript +foreach(config: { ...4 fields }): this +``` + +#### Parameters + + + Foreach configuration with input/output keys, append template, and optional max. + + + + + + + + + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/DataMap.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts) + +Line 314. + +*** + +### globalErrorKeys + +Set error keys at the top-level data map scope, regardless of webhook context. + +#### Signature + +```typescript +globalErrorKeys(keys: string[]): this +``` + +#### Parameters + + + Response keys that indicate an error occurred. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/DataMap.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts) + +Line 365. + +*** + +### output + +Set the output template for the most recently added webhook. + +#### Signature + +```typescript +output(result: FunctionResult): this +``` + +#### Parameters + + + The FunctionResult to use as the output template. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/DataMap.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts) + +Line 330. + +*** + +### parameter + +Define a parameter for this data-map tool — `description` is READ BY THE LLM. + +Each parameter `description` is rendered into the OpenAI tool schema +under `parameters.properties..description` and sent to the +model. The model uses it to decide HOW to fill in the argument from +user speech. It is **prompt engineering**, not developer FYI. + +##### Bad vs good + +```text +BAD : .parameter('city', 'string', 'the city') +GOOD: .parameter('city', 'string', +'The name of the city to get weather for, e.g. "San Francisco". +Ask the user if they did not provide one. Include the state +or country if the city name is ambiguous.') +``` + +#### Signature + +```typescript +parameter( + name: string, + paramType: string, + description: string, + opts?: { ...2 fields } +): this +``` + +#### Parameters + + + The parameter name (JSON object key). + + + + The JSON Schema type (e.g., "string", "number"). + + + + Prompt-engineering description telling the model how to extract this value from the user's utterance. Read by the LLM. + + + + Optional flags for required and enum constraints. + + + + + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/DataMap.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts) + +Line 203. + +*** + +### params + +Set query or form parameters for the most recently added webhook. + +#### Signature + +```typescript +params(data: Record): this +``` + +#### Parameters + + + The parameters object. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/DataMap.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts) + +Line 303. + +*** + +### purpose + +Set the purpose (description) for this data-map tool — READ BY THE LLM. + +This string is rendered into the OpenAI tool schema `description` +field and sent to the model on every turn. The model uses it to +decide WHEN to call this tool. It is **prompt engineering**, not +developer documentation. + +A vague `purpose()` is the #1 cause of "the model has the right tool +but doesn't call it" failures with data-map tools. + +##### Bad vs good + +```text +BAD : .purpose('weather api') +GOOD: .purpose('Get the current weather conditions and forecast for +a specific city. Use this whenever the user asks about weather, +temperature, rain, or similar conditions in a named location.') +``` + +#### Signature + +```typescript +purpose(description: string): this +``` + +#### Parameters + + + Prompt-engineering description of when to call this tool. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/DataMap.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts) + +Line 160. + +*** + +### registerWithAgent + +Register this DataMap tool with an AgentBase instance. + +#### Signature + +```typescript +registerWithAgent(agent: { ...1 fields }): this +``` + +#### Parameters + + + An object with a registerSwaigFunction method (typically an AgentBase). + + + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/DataMap.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts) + +Line 375. + +*** + +### setAllowedEnvPrefixes + +Set the allowed env var prefixes for this DataMap instance. + +Overrides the global defaults. Only env vars whose names start with +one of these prefixes will be expanded. An empty array allows all. + +#### Signature + +```typescript +setAllowedEnvPrefixes(prefixes: string[]): this +``` + +#### Parameters + + + Array of prefix strings to allow. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/DataMap.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts) + +Line 132. + +*** + +### toSwaigFunction + +Serialize this data map to a SWAIG function definition object. + +#### Signature + +```typescript +toSwaigFunction(): Record +``` + +#### Returns + +`Record` — A plain object suitable for inclusion in the SWML SWAIG array. + +#### Source + +[`src/DataMap.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts) + +Line 384. + +*** + +### webhook + +Add a webhook that is called when this data map tool is invoked. + +#### Signature + +```typescript +webhook(method: string, url: string, opts?: { ...4 fields }): this +``` + +#### Parameters + + + HTTP method (e.g., "GET", "POST"). + + + + The webhook URL to call. + + + + Optional headers, form parameter name, and argument settings. + + + + + + + + + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/DataMap.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts) + +Line 257. + +*** + +### webhookExpressions + +Set pattern-matching expressions on the most recently added webhook. + +#### Signature + +```typescript +webhookExpressions(expressions: Record[]): this +``` + +#### Parameters + + + Array of expression objects to evaluate against the webhook response. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/DataMap.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts) + +Line 281. + +## Functions + +### createExpressionTool + +Create a DataMap tool that evaluates expressions against patterns without making HTTP calls. + +#### Signature + +```typescript +createExpressionTool(opts: { ...3 fields }): DataMap +``` + +#### Parameters + + + Configuration including name, pattern-result pairs, and optional parameters. + + + + + + + + +#### Returns + +`DataMap` — A configured DataMap instance ready for registration. + +#### Source + +[`src/DataMap.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts) + +Line 460. + +*** + +### createSimpleApiTool + +Create a DataMap tool that calls a single API endpoint and formats the response. + +#### Signature + +```typescript +createSimpleApiTool(opts: { ...8 fields }): DataMap +``` + +#### Parameters + + + Configuration including name, URL, response template, and optional parameters. + + + + + + + + + + + + + + + + + + +#### Returns + +`DataMap` — A configured DataMap instance ready for registration. + +#### Source + +[`src/DataMap.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts) + +Line 430. + +*** + +### getAllowedEnvPrefixes + +Get the current global allowed env var prefixes. + +#### Signature + +```typescript +getAllowedEnvPrefixes(): string[] +``` + +#### Returns + +`string[]` — A copy of the current prefix list. + +#### Source + +[`src/DataMap.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts) + +Line 31. + +*** + +### setAllowedEnvPrefixes + +Set the global allowed env var prefixes for `${ENV.*}` expansion. + +Only environment variables whose names start with one of these prefixes +will be expanded. An empty array allows all variables (escape hatch). + +#### Signature + +```typescript +setAllowedEnvPrefixes(prefixes: string[]): void +``` + +#### Parameters + + + Array of prefix strings to allow. + + +#### Returns + +`void` + +#### Source + +[`src/DataMap.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts) + +Line 23. + +## Source + +[`src/DataMap.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts) + +Line 94. diff --git a/fern/products/sdk-reference/typescript/agents/function-result/index.mdx b/fern/products/sdk-reference/typescript/agents/function-result/index.mdx new file mode 100644 index 0000000000..eaa32a9d00 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/function-result/index.mdx @@ -0,0 +1,1698 @@ +--- +slug: "/reference/typescript/agents/function-result" +title: "FunctionResult" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "FunctionResult" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts" +--- +# `FunctionResult` + +Builder for SWAIG function responses. + +Carries response text (what the AI says to the caller) and a list of structured +actions (connect, hangup, SMS, record, transfer, etc.) that the SignalWire platform +executes after the AI speaks. Every mutating method returns `this` for fluent chaining. + +Return an instance (or a promise that resolves to one) from any SWAIG tool handler. + +## Signature + +```typescript +class FunctionResult +``` + +## Examples + + + + ```typescript + agent.defineTool({ + name: 'say_hi', + description: 'Say hello.', + parameters: { type: 'object', properties: {} }, + handler: () => new FunctionResult('Hello there!'), + }); + ``` + + + + ```typescript + agent.defineTool({ + name: 'transfer_to_sales', + description: 'Forward the caller to sales.', + parameters: { type: 'object', properties: {} }, + handler: () => + new FunctionResult('Connecting you to sales now.').connect('+15551112222'), + }); + ``` + + + + ```typescript + new FunctionResult("Thanks, you're all set.") + .sendSms({ toNumber: '+15551234567', fromNumber: '+15559998888', body: 'Confirmation!' }) + .hangup(); + ``` + + + +## See Also + +- \- \[AgentBase.defineTool]\(/docs/sdk-reference/reference/typescript/agents/agent-base#define-tool) — where handlers return a \`FunctionResult\` + \- \[DataMap]\(/docs/sdk-reference/reference/typescript/agents/data-map) — alternative for purely data-driven (no handler) tools + +## Properties + + + Ordered list of actions to execute after the response. + + + + Whether actions should be post-processed after the AI responds. + + + + The text response returned to the AI agent. + + +## Methods + +### addAction + +Append a single named action to the action list. + +#### Signature + +```typescript +addAction(name: string, data: unknown): this +``` + +#### Parameters + + + The action name (e.g., "hangup", "say"). + + + + The action payload. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 122. + +*** + +### addActions + +Append multiple action objects to the action list. + +#### Signature + +```typescript +addActions(actions: Record[]): this +``` + +#### Parameters + + + Array of action objects to append. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 132. + +*** + +### addDynamicHints + +Add dynamic speech recognition hints to improve transcription accuracy. + +#### Signature + +```typescript +addDynamicHints( + hints: string | { ignore_case?: boolean; pattern: string; replace: string }[] +): this +``` + +#### Parameters + + + Array of hint strings or pattern-replacement objects. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 265. + +*** + +### clearDynamicHints + +Remove all previously added dynamic speech hints. + +#### Signature + +```typescript +clearDynamicHints(): this +``` + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 273. + +*** + +### connect + +Connect the call to another destination via SWML transfer. + +#### Signature + +```typescript +connect(destination: string, final: boolean = true, fromAddr?: string): this +``` + +#### Parameters + + + The destination address (phone number or SIP URI). + + + + Whether this is a final transfer that ends the AI session. + + + + Optional caller ID to use for the outbound leg. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 146. + +*** + +### constructor + +#### Signature + +```typescript +constructor(response?: string, postProcess: boolean = false): FunctionResult +``` + +#### Parameters + + + Initial response text; defaults to empty string. + + + + Whether to enable post-processing of actions. + + +#### Returns + +`FunctionResult` + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 88. + +*** + +### createPaymentAction + +Create a payment action for use within a payment prompt. + +**Modifiers:** `static` + +#### Signature + +```typescript +createPaymentAction(actionType: string, phrase: string): PaymentAction +``` + +#### Parameters + + + The action type (e.g., "say", "play"). + + + + The phrase or URL for this action. + + +#### Returns + +`PaymentAction` — A new PaymentAction object. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 900. + +*** + +### createPaymentParameter + +Create a custom payment parameter for the payment connector. + +**Modifiers:** `static` + +#### Signature + +```typescript +createPaymentParameter(name: string, value: string): PaymentParameter +``` + +#### Parameters + + + The parameter name. + + + + The parameter value. + + +#### Returns + +`PaymentParameter` — A new PaymentParameter object. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 910. + +*** + +### createPaymentPrompt + +Create a payment prompt configuration object. + +**Modifiers:** `static` + +#### Signature + +```typescript +createPaymentPrompt( + forSituation: string, + actions: PaymentAction[], + cardType?: string, + errorType?: string +): PaymentPrompt +``` + +#### Parameters + + + The situation this prompt applies to. + + + + Actions to perform for this prompt. + + + + Optional card type filter. + + + + Optional error type this prompt handles. + + +#### Returns + +`PaymentPrompt` — A new PaymentPrompt object. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 882. + +*** + +### enableExtensiveData + +Enable or disable extensive data reporting in function calls. + +#### Signature + +```typescript +enableExtensiveData(enabled: boolean = true): this +``` + +#### Parameters + + + Whether to enable extensive data. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 479. + +*** + +### enableFunctionsOnTimeout + +Control whether functions fire on speaker timeout. + +#### Signature + +```typescript +enableFunctionsOnTimeout(enabled: boolean = true): this +``` + +#### Parameters + + + Whether to enable function execution on timeout. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 450. + +*** + +### executeRpc + +Execute a SignalWire RPC method via SWML. + +#### Signature + +```typescript +executeRpc(opts: { ...4 fields }): this +``` + +#### Parameters + + + RPC parameters including method name and optional call/node IDs. + + + + + + + + + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 737. + +*** + +### executeSwml + +Execute arbitrary SWML content as an action. + +#### Signature + +```typescript +executeSwml( + swmlContent: string | Record | { toDict: unknown }, + transfer: boolean = false +): this +``` + +#### Parameters + + + SWML as a JSON string or object. + + + + Whether this SWML execution should transfer the call. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 342. + +*** + +### hangup + +Hang up the call. + +#### Signature + +```typescript +hangup(): this +``` + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 188. + +*** + +### hold + +Place the call on hold for a specified duration. + +#### Signature + +```typescript +hold(timeout: number = 300): this +``` + +#### Parameters + + + Hold duration in seconds, clamped to 0-900. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 197. + +*** + +### joinConference + +Join a conference by name with optional configuration. + +#### Signature + +```typescript +joinConference(name: string, opts?: { ...17 fields }): this +``` + +#### Parameters + + + The conference name to join. + + + + Optional conference settings such as mute, recording, and callbacks. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 658. + +*** + +### joinRoom + +Join a SignalWire room. + +#### Signature + +```typescript +joinRoom(name: string): this +``` + +#### Parameters + + + The room name to join. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 633. + +*** + +### pay + +Initiate a payment collection flow on the call. + +#### Signature + +```typescript +pay(opts: { ...19 fields }): this +``` + +#### Parameters + + + Payment configuration including connector URL, method, and prompt options. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 813. + +*** + +### playBackgroundFile + +Play an audio file in the background during the call. + +#### Signature + +```typescript +playBackgroundFile(filename: string, wait: boolean = false): this +``` + +#### Parameters + + + URL or path of the audio file. + + + + Whether to wait for playback to complete before continuing. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 243. + +*** + +### recordCall + +Start recording the call. + +#### Signature + +```typescript +recordCall(opts?: { ...11 fields }): this +``` + +#### Parameters + + + Recording options including format, direction, and timeouts. + + + + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 533. + +*** + +### removeGlobalData + +Remove keys from the global data store. + +#### Signature + +```typescript +removeGlobalData(keys: string | string[]): this +``` + +#### Parameters + + + A single key or array of keys to remove. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 312. + +*** + +### removeMetadata + +Remove metadata keys from the current call. + +#### Signature + +```typescript +removeMetadata(keys: string | string[]): this +``` + +#### Parameters + + + A single key or array of keys to remove. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 330. + +*** + +### replaceInHistory + +Replace the function call output in conversation history. + +#### Signature + +```typescript +replaceInHistory(text: string | boolean = true): this +``` + +#### Parameters + + + Replacement text, or true to replace with the response. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 488. + +*** + +### rpcAiMessage + +Send an AI message to another call via RPC. + +#### Signature + +```typescript +rpcAiMessage(callId: string, messageText: string, role: string = 'system'): this +``` + +#### Parameters + + + The target call ID. + + + + The message text to inject. + + + + The message role (defaults to "system"). + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 785. + +*** + +### rpcAiUnhold + +Unhold a call that was previously placed on hold via RPC. + +#### Signature + +```typescript +rpcAiUnhold(callId: string): this +``` + +#### Parameters + + + The target call ID to unhold. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 798. + +*** + +### rpcDial + +Dial a number via RPC, optionally specifying device type. + +#### Signature + +```typescript +rpcDial( + toNumber: string, + fromNumber: string, + destSwml: string, + deviceType: string = 'phone' +): this +``` + +#### Parameters + + + The destination phone number. + + + + The caller ID number. + + + + The SWML destination for the dialed call. + + + + The device type (defaults to "phone"). + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 765. + +*** + +### say + +Speak text to the caller via TTS. + +#### Signature + +```typescript +say(text: string): this +``` + +#### Parameters + + + The text to speak. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 233. + +*** + +### sendSms + +Send an SMS or MMS message from within the call flow. + +#### Signature + +```typescript +sendSms(opts: { ...6 fields }): this +``` + +#### Parameters + + + SMS parameters. Must include either `body` (text SMS) or `media` (MMS) — supplying neither throws. + + + + + + + + + + + + + + +#### Returns + +`this` — This instance for chaining. + +#### Throws + +- When neither `body` nor `media` is provided. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 502. + +*** + +### setEndOfSpeechTimeout + +Set the silence duration that marks the end of a user's speech. + +#### Signature + +```typescript +setEndOfSpeechTimeout(milliseconds: number): this +``` + +#### Parameters + + + Timeout in milliseconds. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 283. + +*** + +### setMetadata + +Set metadata key-value pairs on the current call. + +#### Signature + +```typescript +setMetadata(data: Record): this +``` + +#### Parameters + + + Metadata key-value pairs to set. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 321. + +*** + +### setPostProcess + +Enable or disable post-processing of actions. + +#### Signature + +```typescript +setPostProcess(postProcess: boolean): this +``` + +#### Parameters + + + Whether to post-process actions. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 111. + +*** + +### setResponse + +Set the response text returned to the AI agent. + +#### Signature + +```typescript +setResponse(response: string): this +``` + +#### Parameters + + + The response text. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 101. + +*** + +### setSpeechEventTimeout + +Set the timeout for speech event detection. + +#### Signature + +```typescript +setSpeechEventTimeout(milliseconds: number): this +``` + +#### Parameters + + + Timeout in milliseconds. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 292. + +*** + +### simulateUserInput + +Inject text as if the user had spoken it. + +#### Signature + +```typescript +simulateUserInput(text: string): this +``` + +#### Parameters + + + The simulated user input text. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 470. + +*** + +### sipRefer + +Send a SIP REFER to transfer the call. + +#### Signature + +```typescript +sipRefer(toUri: string): this +``` + +#### Parameters + + + The SIP URI to refer the call to. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 645. + +*** + +### stop + +Stop the AI session. + +#### Signature + +```typescript +stop(): this +``` + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 222. + +*** + +### stopBackgroundFile + +Stop any currently playing background audio file. + +#### Signature + +```typescript +stopBackgroundFile(): this +``` + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 254. + +*** + +### stopRecordCall + +Stop an active call recording. + +#### Signature + +```typescript +stopRecordCall(controlId?: string): this +``` + +#### Parameters + + + Optional control ID of the recording to stop. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 573. + +*** + +### stopTap + +Stop an active media tap. + +#### Signature + +```typescript +stopTap(controlId?: string): this +``` + +#### Parameters + + + Optional control ID of the tap to stop. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 617. + +*** + +### switchContext + +Switch the AI context with optional new prompts and reset options. + +#### Signature + +```typescript +switchContext(opts?: { ...4 fields }): this +``` + +#### Parameters + + + Context switch options including system/user prompts and reset flags. + + + + + + + + + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 412. + +*** + +### swmlChangeContext + +Change the current SWML context. + +#### Signature + +```typescript +swmlChangeContext(contextName: string): this +``` + +#### Parameters + + + The name of the context to switch to. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 391. + +*** + +### swmlChangeStep + +Change the current SWML step. + +#### Signature + +```typescript +swmlChangeStep(stepName: string): this +``` + +#### Parameters + + + The name of the step to switch to. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 382. + +*** + +### swmlTransfer + +Transfer the call to a SWML destination with a custom AI response. + +#### Signature + +```typescript +swmlTransfer(dest: string, aiResponse: string, final: boolean = true): this +``` + +#### Parameters + + + The transfer destination. + + + + The AI response text to set before transferring. + + + + Whether this is a final transfer. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 168. + +*** + +### swmlUserEvent + +Emit a custom user event via SWML. + +#### Signature + +```typescript +swmlUserEvent(eventData: Record): this +``` + +#### Parameters + + + The event payload. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 400. + +*** + +### tap + +Start a media tap to stream audio to an external URI. + +#### Signature + +```typescript +tap(opts: { ...6 fields }): this +``` + +#### Parameters + + + Tap parameters including URI, direction, and codec. + + + + + + + + + + + + + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 587. + +*** + +### toDict + +Serialize this result to a plain object for the SWAIG response. + +#### Signature + +```typescript +toDict(): Record +``` + +#### Returns + +`Record` — A dictionary with response, action, and post\_process fields; falls back to "Action completed." if empty. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 920. + +*** + +### toggleFunctions + +Enable or disable SWAIG functions by name. + +#### Signature + +```typescript +toggleFunctions(toggles: { active: boolean; function: string }[]): this +``` + +#### Parameters + + + Array of function name and active state pairs. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 441. + +*** + +### updateGlobalData + +Merge key-value pairs into the global data store shared across functions. + +#### Signature + +```typescript +updateGlobalData(data: Record): this +``` + +#### Parameters + + + Key-value pairs to set or update. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 303. + +*** + +### updateSettings + +Update AI engine settings at runtime. + +#### Signature + +```typescript +updateSettings(settings: Record): this +``` + +#### Parameters + + + Key-value pairs of settings to update. + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 459. + +*** + +### waitForUser + +Wait for user input before continuing. + +#### Signature + +```typescript +waitForUser(opts?: { ...3 fields }): this +``` + +#### Parameters + + + Options controlling wait behavior: enable/disable, timeout, or answer-first mode. + + + + + + + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 206. + +## Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 76. diff --git a/fern/products/sdk-reference/typescript/agents/function-result/index__2.mdx b/fern/products/sdk-reference/typescript/agents/function-result/index__2.mdx new file mode 100644 index 0000000000..7cf7720965 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/function-result/index__2.mdx @@ -0,0 +1,106 @@ +--- +slug: "/reference/typescript/agents/function-result/index__2" +title: "FunctionResult" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "agents.FunctionResult" + parent: "agents" + module: "agents" +--- +# `FunctionResult` + +## Interfaces + +### PaymentAction + +A single action within a payment prompt (e.g., say or play). + +#### Signature + +```typescript +interface PaymentAction +``` + +#### Properties + + + The phrase or URL to use for this action. + + + + The action type (e.g., "say", "play"). + + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 21. + +*** + +### PaymentParameter + +A custom key-value parameter passed to the payment connector. + +#### Signature + +```typescript +interface PaymentParameter +``` + +#### Properties + + + The parameter name. + + + + The parameter value. + + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 29. + +*** + +### PaymentPrompt + +Prompt configuration for a payment collection flow. + +#### Signature + +```typescript +interface PaymentPrompt +``` + +#### Properties + + + Actions to perform for this prompt. + + + + Optional card type filter for this prompt. + + + + Optional error type this prompt handles. + + + + The situation this prompt applies to (e.g., "payment-card-number"). + + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 9. diff --git a/fern/products/sdk-reference/typescript/agents/generate-verb-types/index.mdx b/fern/products/sdk-reference/typescript/agents/generate-verb-types/index.mdx new file mode 100644 index 0000000000..b1d34508d9 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/generate-verb-types/index.mdx @@ -0,0 +1,27 @@ +--- +slug: "/reference/typescript/agents/generate-verb-types" +title: "generateVerbTypes" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "generateVerbTypes" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/generateVerbTypes.ts" +--- +# `generateVerbTypes` + +## Signature + +```typescript +module generateVerbTypes +``` + +## Source + +[`src/generateVerbTypes.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/generateVerbTypes.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/agents/index.mdx b/fern/products/sdk-reference/typescript/agents/index.mdx new file mode 100644 index 0000000000..8d99f5a66c --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/index.mdx @@ -0,0 +1,132 @@ +--- +slug: "/reference/typescript/agents" +title: "agents" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "agents" +--- +# `agents` + +## Classes + + + + Core agent class that composes an HTTP server, prompt management, session handling, SWAIG tool registry, and 5-phase SWML rendering into a single deployable unit. + + + + Multi-agent HTTP server that hosts multiple AgentBase instances on distinct route prefixes. + + + + Multi-method authentication handler with timing-safe credential comparison. + + + + JSON configuration file loader with environment variable interpolation and dot-notation access. + + + + Builder for multi-step, multi-context AI agent workflows. + + + + Fluent builder for SWAIG data\_map configurations. + + + + Builder for SWAIG function responses. + + + + Fluent builder producing a [ParameterSchemaObject](/docs/sdk-reference/reference/typescript/agents/parameter-schema/index__2#parameter-schema-object) byte-identical to the equivalent hand-written `parameters` blob. Every method returns `this` for chaining; call `build` to obtain the plain object to hand to `defineTool`/`defineTypedTool`. + + + + Builds a structured prompt by composing named POM sections, with Markdown and dict export. + + + + Manages agent prompt text, supporting both raw text and structured POM-based prompts. + + + + Validates SWML documents against structural rules with an LRU-style result cache. + + + + Adapts a Hono application for deployment on AWS Lambda, Google Cloud Functions, Azure Functions, or CGI. + + + + Stateless HMAC-SHA256 token manager for SWAIG function call authentication and per-session metadata storage. + + + + Manages SSL/TLS configuration sourced from explicit options or environment variables. + + + + A SWAIG function — exactly the same concept as a "tool" in native OpenAI / Anthropic tool calling. + + + + Builds SWML documents composed of verb instructions organized into named sections. + + + + HTTP service that serves non-AI SWML documents built from verb methods. + + + + Static file serving service with HTTP API. + + + +## Modules + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/fern/products/sdk-reference/typescript/agents/livewire/agent-handoff/index.mdx b/fern/products/sdk-reference/typescript/agents/livewire/agent-handoff/index.mdx new file mode 100644 index 0000000000..70a0bdbf1c --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/livewire/agent-handoff/index.mdx @@ -0,0 +1,53 @@ +--- +slug: "/reference/typescript/agents/livewire/agent-handoff" +title: "AgentHandoff" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "livewire.AgentHandoff" + parent: "livewire" + module: "agents.livewire" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" +--- +# `AgentHandoff` + +Signals a handoff to another agent in multi-agent scenarios. + +## Signature + +```typescript +class AgentHandoff +``` + +## Properties + + + Target agent that should take over the conversation. + + + + Optional return value surfaced when the handoff completes. + + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(): AgentHandoff +``` + +#### Returns + +`AgentHandoff` + +## Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 741. diff --git a/fern/products/sdk-reference/typescript/agents/livewire/agent-server/index.mdx b/fern/products/sdk-reference/typescript/agents/livewire/agent-server/index.mdx new file mode 100644 index 0000000000..1c59fd30e3 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/livewire/agent-server/index.mdx @@ -0,0 +1,117 @@ +--- +slug: "/reference/typescript/agents/livewire/agent-server" +title: "AgentServer" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "livewire.AgentServer" + parent: "livewire" + module: "agents.livewire" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" +--- +# `AgentServer` + +Mirrors a LiveKit AgentServer -- registers entrypoints and starts. + +Usage: +const server = new AgentServer(); +server.setupFnc = async (proc) => \{ ... \}; + +// Bare decorator usage: +server.rtcSession(myEntryFn); + +// Parameterized decorator usage: +server.rtcSession(\{ agentName: 'myAgent' \})(myEntryFn); + +cli.runApp(server); + +## Signature + +```typescript +class AgentServer +``` + +## Properties + + + Optional prewarm hook called before the entrypoint. Mirrors Python's setup\_fnc. + + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(_opts?: any): AgentServer +``` + +#### Parameters + + + +#### Returns + +`AgentServer` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 988. + +*** + +### rtcSession + +Decorator that registers the session entrypoint. + +Supports both bare and parameterized usage: +server.rtcSession(fn) // bare +server.rtcSession(fn, \{ agentName: 'x' \}) // with opts, explicit fn +server.rtcSession(\{ agentName: 'x' \})(fn) // parameterized decorator +@server.rtcSession // decorator (bare) +@server.rtcSession(\{ agentName: 'x' \}) // decorator (parameterized) + +#### Signature + +```typescript +rtcSession( + fnOrOpts?: (ctx: JobContext) => Promise | { agentName?: string; onRequest?: (args: any[]) => any | null; onSessionEnd?: (args: any[]) => any | null; type?: string }, + opts?: { ...4 fields } +): void | (fn: (ctx: JobContext) => Promise) => (ctx: JobContext) => Promise +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`void | (fn: (ctx: JobContext) => Promise) => (ctx: JobContext) => Promise` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 1000. + +## Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 978. diff --git a/fern/products/sdk-reference/typescript/agents/livewire/agent-session/index.mdx b/fern/products/sdk-reference/typescript/agents/livewire/agent-session/index.mdx new file mode 100644 index 0000000000..41fc5d1479 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/livewire/agent-session/index.mdx @@ -0,0 +1,289 @@ +--- +slug: "/reference/typescript/agents/livewire/agent-session" +title: "AgentSession" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "livewire.AgentSession" + parent: "livewire" + module: "agents.livewire" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" +--- +# `AgentSession` + +Mirrors a LiveKit `AgentSession` — binds an [Agent](/docs/sdk-reference/reference/typescript/agents/livewire/agent) to SignalWire. + +Call [AgentSession.start](/docs/sdk-reference/reference/typescript/agents/livewire/agent-session#start) with an `Agent` to construct an internal +[AgentBase](/docs/sdk-reference/reference/typescript/agents/agent-base) and begin serving SWML. Pipeline-related options are +accepted for API parity but are no-ops server-side. + +## Signature + +```typescript +class AgentSession +``` + +## Type Parameters + + + +## Properties + + + Conversation history entries captured over the session's lifetime. + + + + Current per-session user data. Set by the constructor or via the setter. + + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(options?: { ...14 fields }): AgentSession +``` + +#### Type Parameters + + + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`AgentSession` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 436. + +*** + +### generateReply + +Trigger the agent to generate a reply, optionally with extra instructions. + +#### Signature + +```typescript +generateReply(options?: { ...1 fields }): void +``` + +#### Parameters + + + Generation options. + + + Extra instructions injected as a new prompt section before the next LLM turn. + + + +#### Returns + +`void` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 619. + +*** + +### getSwAgent + +Return the underlying SignalWire [AgentBase](/docs/sdk-reference/reference/typescript/agents/agent-base). Useful for tests and +advanced use cases that need to reach past the LiveKit facade. + +#### Signature + +```typescript +getSwAgent(): AgentBase | undefined +``` + +#### Returns + +`AgentBase | undefined` — The wrapped `AgentBase`, or `undefined` before [start](/docs/sdk-reference/reference/typescript/agents/livewire/agent-session#start). + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 669. + +*** + +### interrupt + +Interrupt current speech. **No-op** on SignalWire — barge-in is handled +automatically by the control plane. + +#### Signature + +```typescript +interrupt(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 629. + +*** + +### say + +Queue text to be spoken by the agent. + +Before [start](/docs/sdk-reference/reference/typescript/agents/livewire/agent-session#start) is called, text is buffered and injected at start +time as the agent's initial greeting. After start, text is added as an +additional prompt section. + +#### Signature + +```typescript +say(text: string): void +``` + +#### Parameters + + + Line for the agent to speak. + + +#### Returns + +`void` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 602. + +*** + +### start + +Start the session by binding the agent to a freshly-constructed +[AgentBase](/docs/sdk-reference/reference/typescript/agents/agent-base), mapping LiveKit-style options onto SignalWire AI params. + +Must be called before any other method on this session. The underlying +`AgentBase` is not started here — use [runApp](/docs/sdk-reference/reference/typescript/agents/livewire#run-app) or an `AgentServer` +to serve it. + +#### Signature + +```typescript +start(params: { ...3 fields }): Promise +``` + +#### Parameters + + + Start parameters. + + + The [Agent](/docs/sdk-reference/reference/typescript/agents/livewire/agent) to bind. + + + + Call-recording flag placeholder; ignored on SignalWire. + + + + LiveKit room placeholder; ignored on SignalWire. + + + +#### Returns + +`Promise` — Resolves once the underlying `AgentBase` has been built. + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 514. + +*** + +### updateAgent + +Swap the [Agent](/docs/sdk-reference/reference/typescript/agents/livewire/agent) bound to this session. + +Preserves the underlying `AgentBase` but replaces its prompt with the new +agent's instructions. + +#### Signature + +```typescript +updateAgent(agent: Agent): void +``` + +#### Parameters + + + Replacement agent. + + +#### Returns + +`void` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 641. + +## Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 420. diff --git a/fern/products/sdk-reference/typescript/agents/livewire/agent/index.mdx b/fern/products/sdk-reference/typescript/agents/livewire/agent/index.mdx new file mode 100644 index 0000000000..8160ef5629 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/livewire/agent/index.mdx @@ -0,0 +1,376 @@ +--- +slug: "/reference/typescript/agents/livewire/agent" +title: "Agent" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "livewire.Agent" + parent: "livewire" + module: "agents.livewire" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" +--- +# `Agent` + +Mirrors a LiveKit `voice.Agent` — holds instructions and tool definitions. + +Pipeline options (`stt`, `tts`, `vad`, `llm`, `turnDetection`) are accepted +for API parity but are **no-ops** — SignalWire's control plane handles the +entire AI pipeline server-side. Set instructions and tools; everything else +just logs once and continues. + +## Signature + +```typescript +class Agent +``` + +## Type Parameters + + + +## Examples + +```typescript +import { livewire } from '@signalwire/sdk'; + +const timeTool = livewire.tool({ + description: 'Return the current time.', + execute: () => new Date().toISOString(), +}); + +const agent = new livewire.Agent({ + instructions: 'You are a friendly helper.', + tools: [{ ...timeTool, name: 'time' }], +}); + +const session = new livewire.AgentSession(); +await session.start({ agent }); +``` + +## Properties + + + System instructions passed through to the SignalWire AI prompt. + + + + The currently-bound [AgentSession](/docs/sdk-reference/reference/typescript/agents/livewire/agent-session), or `undefined` until [AgentSession.start](/docs/sdk-reference/reference/typescript/agents/livewire/agent-session#start) is called. + + + + Registered tools keyed by name. Mutated by [updateTools](/docs/sdk-reference/reference/typescript/agents/livewire/agent#update-tools). + + + + Arbitrary per-session user data passed to tool handlers via [RunContext.userData](/docs/sdk-reference/reference/typescript/agents/livewire/run-context#user-data). + + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(options?: { ...13 fields }): Agent +``` + +#### Type Parameters + + + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`Agent` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 182. + +*** + +### llmNode + +LiveKit-compatible LLM node. **No-op** on SignalWire — the control plane +handles LLM inference server-side. + +#### Signature + +```typescript +llmNode( + _chatCtx?: unknown, + _tools?: unknown, + _modelSettings?: unknown +): Promise +``` + +#### Parameters + + + Chat context (ignored). + + + + Tool list (ignored). + + + + Model settings (ignored). + + +#### Returns + +`Promise` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 315. + +*** + +### onEnter + +Lifecycle hook called when the agent enters an active call. +Override in a subclass to run setup logic — the default is a no-op. + +#### Signature + +```typescript +onEnter(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 271. + +*** + +### onExit + +Lifecycle hook called when the agent exits (call ended or handoff). +Override in a subclass to run teardown logic — the default is a no-op. + +#### Signature + +```typescript +onExit(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 277. + +*** + +### onUserTurnCompleted + +Lifecycle hook called when the user finishes speaking. +Override in a subclass to inspect / mutate the turn context before the +LLM responds — the default is a no-op. + +#### Signature + +```typescript +onUserTurnCompleted(_turnCtx?: unknown, _newMessage?: unknown): Promise +``` + +#### Parameters + + + Turn context (LiveKit shape; passed through opaquely). + + + + Newly-captured user message. + + +#### Returns + +`Promise` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 287. + +*** + +### sttNode + +LiveKit-compatible STT node. **No-op** on SignalWire — the control plane +handles speech recognition server-side. + +#### Signature + +```typescript +sttNode(_audio?: unknown, _modelSettings?: unknown): Promise +``` + +#### Parameters + + + Audio input (ignored). + + + + Model settings (ignored). + + +#### Returns + +`Promise` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 300. + +*** + +### ttsNode + +LiveKit-compatible TTS node. **No-op** on SignalWire — the control plane +handles text-to-speech server-side. + +#### Signature + +```typescript +ttsNode(_text?: unknown, _modelSettings?: unknown): Promise +``` + +#### Parameters + + + Text to synthesise (ignored). + + + + Model settings (ignored). + + +#### Returns + +`Promise` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 329. + +*** + +### updateInstructions + +Update the agent's instructions mid-session. + +#### Signature + +```typescript +updateInstructions(instructions: string): Promise +``` + +#### Parameters + + + New system-instructions string for the agent. + + +#### Returns + +`Promise` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 345. + +*** + +### updateTools + +Update the agent's tool list mid-session. + +Replaces the current tool record with one built from the given array, +keyed by `tool.name`. Useful for dynamic tool injection based on +conversation state. + +#### Signature + +```typescript +updateTools(tools: FunctionTool[]): Promise +``` + +#### Parameters + + + Ordered array of [FunctionTool](/docs/sdk-reference/reference/typescript/agents/livewire#function-tool) definitions. Each tool's `name` is used as its map key. + + +#### Returns + +`Promise` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 359. + +## Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 163. diff --git a/fern/products/sdk-reference/typescript/agents/livewire/chat-context/index.mdx b/fern/products/sdk-reference/typescript/agents/livewire/chat-context/index.mdx new file mode 100644 index 0000000000..0a989aaa6e --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/livewire/chat-context/index.mdx @@ -0,0 +1,85 @@ +--- +slug: "/reference/typescript/agents/livewire/chat-context" +title: "ChatContext" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "livewire.ChatContext" + parent: "livewire" + module: "agents.livewire" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" +--- +# `ChatContext` + +Minimal `ChatContext` matching LiveKit's `ChatContext`. + +## Signature + +```typescript +class ChatContext +``` + +## Properties + + + Ordered chat messages, each `{ role, content }`. + + +## Methods + +### append + +Append a chat message. + +#### Signature + +```typescript +append(options: { ...2 fields }): this +``` + +#### Parameters + + + Message content. + + + Speaker role (`"user"`, `"assistant"`, or `"system"`). Defaults to `"user"`. + + + + Message text. Defaults to `""`. + + + +#### Returns + +`this` — This instance for chaining. + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 1232. + +*** + +### constructor + +#### Signature + +```typescript +constructor(): ChatContext +``` + +#### Returns + +`ChatContext` + +## Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 1219. diff --git a/fern/products/sdk-reference/typescript/agents/livewire/index.mdx b/fern/products/sdk-reference/typescript/agents/livewire/index.mdx new file mode 100644 index 0000000000..8e1bd37988 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/livewire/index.mdx @@ -0,0 +1,396 @@ +--- +slug: "/reference/typescript/agents/livewire" +title: "livewire" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "livewire" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" +--- +# `livewire` + +## Signature + +```typescript +module livewire +``` + +## Constants + + + + + LiveKit cli namespace equivalent. + + + + + + LiveKit llm namespace equivalent. + + + + Rotating "Did you know?" tips printed to stderr by the LiveWire banner. Exported for tests; reorder or extend to change what's displayed. + + + + LiveKit voice namespace equivalent. + + +## Classes + + + + Mirrors a LiveKit `voice.Agent` — holds instructions and tool definitions. + + + + Signals a handoff to another agent in multi-agent scenarios. + + + + Mirrors a LiveKit AgentServer -- registers entrypoints and starts. + + + + Mirrors a LiveKit `AgentSession` — binds an [Agent](/docs/sdk-reference/reference/typescript/agents/livewire/agent) to SignalWire. + + + + Minimal `ChatContext` matching LiveKit's `ChatContext`. + + + + Mirrors a LiveKit `JobContext` — provides room and connection info to the entry-point callback registered via [defineAgent](/docs/sdk-reference/reference/typescript/agents/livewire#define-agent). + + + + Mirrors a LiveKit `JobProcess` — placeholder for prewarm / setup hooks. + + + + NoopTracker ensures each informational message is logged at most once, preventing spam when the same noop path is exercised repeatedly. + + + + Stub `Room` — SignalWire does not use the LiveKit room abstraction. + + + + Mirrors a LiveKit `RunContext` — passed to tool handlers so they can read the current session, call handle, and user data. + + + + Stub class mirroring LiveKit's `ServerOptions`. + + + + Signals that a tool should not trigger another LLM reply. + + + + Error thrown from a tool to signal failure back to the LLM. + + + + Stub class mirroring LiveKit's `WorkerOptions`. + + + +## Modules + + + + Stub inference types matching LiveKit's `inference` namespace. + + + + Stub providers matching common LiveKit plugin packages. + + + +## Functions + +### defineAgent + +Mirrors `@livekit/agents.defineAgent()`. + +Packages an entry function (plus an optional prewarm hook) for later +execution by [runApp](/docs/sdk-reference/reference/typescript/agents/livewire#run-app). Pass-through — no side effects. + +#### Signature + +```typescript +defineAgent( + agent: { ...2 fields } +): { entry: (ctx: JobContext) => Promise; prewarm?: (proc: JobProcess) => any } +``` + +#### Parameters + + + Entry and (optional) prewarm functions. + + + Main callback invoked with a [JobContext](/docs/sdk-reference/reference/typescript/agents/livewire/job-context) when the agent runs. + + + + Optional prewarm callback invoked with a [JobProcess](/docs/sdk-reference/reference/typescript/agents/livewire/job-process) before `entry`. + + + +#### Returns + +`{ entry: (ctx: JobContext) => Promise; prewarm?: (proc: JobProcess) => any }` — The same record (pass-through), typed consistently. + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 865. + +*** + +### handoff + +Create an [AgentHandoff](/docs/sdk-reference/reference/typescript/agents/livewire/agent-handoff) descriptor for multi-agent scenarios. + +#### Signature + +```typescript +handoff(options: { ...2 fields }): AgentHandoff +``` + +#### Parameters + + + Handoff parameters. + + + Agent to transfer control to. + + + + Optional string returned to the current agent when the handoff completes. + + + +#### Returns + +`AgentHandoff` — A handoff descriptor that can be returned from a tool handler. + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 729. + +*** + +### printBanner + +Print the ASCII banner to stderr, using ANSI cyan when stderr is a TTY. + +#### Signature + +```typescript +printBanner(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 30. + +*** + +### printTip + +#### Signature + +```typescript +printTip(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 59. + +*** + +### runApp + +Mirrors `cli.runApp()` from `@livekit/agents-js`. + +1. Prints the LiveWire banner +2. Runs the registered prewarm callback (if any) with a fresh [JobProcess](/docs/sdk-reference/reference/typescript/agents/livewire/job-process) +3. Creates a fresh [JobContext](/docs/sdk-reference/reference/typescript/agents/livewire/job-context) +4. Prints a random tip +5. Invokes the entry function with the context +6. Starts the underlying SignalWire `AgentBase` once the entry function + binds one (via an `AgentSession.start()` call) + +Accepts either an object `{ entry, prewarm? }`, a bare entry function, or +an [AgentServer](/docs/sdk-reference/reference/typescript/agents/agent-server) instance. + +#### Signature + +```typescript +runApp(options: any): void +``` + +#### Parameters + + + Agent descriptor, entry function, or `AgentServer`. + + +#### Returns + +`void` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 892. + +*** + +### tool + +Create a tool definition — mirrors `llm.tool()` from `@livekit/agents-js`. + +The returned tool has an empty `name` — the caller assigns it when the tool +is attached to an agent's tools map (see the [Agent](/docs/sdk-reference/reference/typescript/agents/livewire/agent) example). + +#### Signature + +```typescript +tool

(options: { ...3 fields }): FunctionTool +``` + +#### Type Parameters + + + Parameter type passed into `execute`. + + +#### Parameters + + + Tool configuration. + + + Human-readable tool description exposed to the LLM. + + + + Handler invoked when the LLM calls the tool. + + + + JSON Schema or Zod schema describing the tool's inputs. + + + +#### Returns + +`FunctionTool` — A [FunctionTool](/docs/sdk-reference/reference/typescript/agents/livewire#function-tool) ready to be attached to an agent. + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 691. + +## Interfaces + +### FunctionTool + +A tool definition that can be registered on an [Agent](/docs/sdk-reference/reference/typescript/agents/livewire/agent). + +#### Signature + +```typescript +interface FunctionTool +``` + +#### Properties + + + Human-readable description shown to the LLM. + + + + Handler invoked by the platform when the LLM calls this tool. + + + + Tool name. Populated when the tool is attached to an `Agent.tools` map. + + + + JSON schema (or Zod schema passthrough) for the tool's parameters. + + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 122. + +*** + +### VoiceOptions + +Voice configuration options passed through to the SignalWire AI config. + +#### Signature + +```typescript +interface VoiceOptions +``` + +#### Properties + + + TTS engine identifier (e.g. `"google"`, `"elevenlabs"`). + + + + BCP-47 language code (e.g. `"en-US"`). + + + + TTS voice identifier (e.g. `"en-US-Standard-A"`). + + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 108. + +## Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/agents/livewire/inference/index.mdx b/fern/products/sdk-reference/typescript/agents/livewire/inference/index.mdx new file mode 100644 index 0000000000..8f0e2d18d9 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/livewire/inference/index.mdx @@ -0,0 +1,49 @@ +--- +slug: "/reference/typescript/agents/livewire/inference" +title: "inference" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "livewire.inference" + parent: "livewire" + module: "agents.livewire" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" +--- +# `inference` + +Stub inference types matching LiveKit's `inference` namespace. + +None of these run inference on the client — SignalWire performs STT / LLM / +TTS in its control plane. These classes exist so LiveKit code that imports +and instantiates them still compiles. + +## Signature + +```typescript +module inference +``` + +## Classes + + + + LiveKit inference-LLM stub. Captures the model name; runs no inference locally. + + + + LiveKit inference-STT stub. Captures the model name; runs no inference locally. + + + + LiveKit inference-TTS stub. Captures the model name; runs no inference locally. + + + +## Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 1158. diff --git a/fern/products/sdk-reference/typescript/agents/livewire/inference/llm/index.mdx b/fern/products/sdk-reference/typescript/agents/livewire/inference/llm/index.mdx new file mode 100644 index 0000000000..95b1210b6c --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/livewire/inference/llm/index.mdx @@ -0,0 +1,65 @@ +--- +slug: "/reference/typescript/agents/livewire/inference/llm" +title: "LLM" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "livewire.inference.LLM" + parent: "livewire.inference" + module: "agents.livewire.inference" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" +--- +# `LLM` + +LiveKit inference-LLM stub. Captures the model name; runs no inference locally. + +## Signature + +```typescript +class LLM +``` + +## Properties + + + Model identifier captured from the constructor. + + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(model: string = '', _opts?: any): LLM +``` + +#### Parameters + + + Model identifier (captured). + + + + Additional options (ignored). + + +#### Returns + +`LLM` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 1184. + +## Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 1177. diff --git a/fern/products/sdk-reference/typescript/agents/livewire/inference/stt/index.mdx b/fern/products/sdk-reference/typescript/agents/livewire/inference/stt/index.mdx new file mode 100644 index 0000000000..7d219e9b06 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/livewire/inference/stt/index.mdx @@ -0,0 +1,65 @@ +--- +slug: "/reference/typescript/agents/livewire/inference/stt" +title: "STT" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "livewire.inference.STT" + parent: "livewire.inference" + module: "agents.livewire.inference" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" +--- +# `STT` + +LiveKit inference-STT stub. Captures the model name; runs no inference locally. + +## Signature + +```typescript +class STT +``` + +## Properties + + + Model identifier captured from the constructor. + + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(model: string = '', _opts?: any): STT +``` + +#### Parameters + + + Model identifier (captured). + + + + Additional options (ignored). + + +#### Returns + +`STT` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 1167. + +## Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 1160. diff --git a/fern/products/sdk-reference/typescript/agents/livewire/inference/tts/index.mdx b/fern/products/sdk-reference/typescript/agents/livewire/inference/tts/index.mdx new file mode 100644 index 0000000000..532f564bc4 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/livewire/inference/tts/index.mdx @@ -0,0 +1,65 @@ +--- +slug: "/reference/typescript/agents/livewire/inference/tts" +title: "TTS" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "livewire.inference.TTS" + parent: "livewire.inference" + module: "agents.livewire.inference" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" +--- +# `TTS` + +LiveKit inference-TTS stub. Captures the model name; runs no inference locally. + +## Signature + +```typescript +class TTS +``` + +## Properties + + + Model identifier captured from the constructor. + + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(model: string = '', _opts?: any): TTS +``` + +#### Parameters + + + Model identifier (captured). + + + + Additional options (ignored). + + +#### Returns + +`TTS` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 1197. + +## Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 1190. diff --git a/fern/products/sdk-reference/typescript/agents/livewire/job-context/index.mdx b/fern/products/sdk-reference/typescript/agents/livewire/job-context/index.mdx new file mode 100644 index 0000000000..bcf8311a49 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/livewire/job-context/index.mdx @@ -0,0 +1,116 @@ +--- +slug: "/reference/typescript/agents/livewire/job-context" +title: "JobContext" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "livewire.JobContext" + parent: "livewire" + module: "agents.livewire" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" +--- +# `JobContext` + +Mirrors a LiveKit `JobContext` — provides room and connection info to the +entry-point callback registered via [defineAgent](/docs/sdk-reference/reference/typescript/agents/livewire#define-agent). + +## Signature + +```typescript +class JobContext +``` + +## Properties + + + Shared [JobProcess](/docs/sdk-reference/reference/typescript/agents/livewire/job-process) instance for prewarm-to-entry data passing. + + + + Placeholder [Room](/docs/sdk-reference/reference/typescript/agents/livewire/room) (see class docs). + + +## Methods + +### connect + +Connect to the platform. **No-op** on SignalWire — the control plane +manages connection lifecycle automatically. + +#### Signature + +```typescript +connect(): Promise +``` + +#### Returns + +`Promise` — Resolves immediately. + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 827. + +*** + +### constructor + +#### Signature + +```typescript +constructor(): JobContext +``` + +#### Returns + +`JobContext` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 816. + +*** + +### waitForParticipant + +Wait for a participant to join. **No-op** on SignalWire — returns an +immediate stub participant. + +#### Signature + +```typescript +waitForParticipant(options?: { ...1 fields }): Promise +``` + +#### Parameters + + + Participant match options. + + + Requested identity; echoed back in the stub. Defaults to `"caller"`. + + + +#### Returns + +`Promise` — A stub participant `{ identity }` record. + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 843. + +## Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 808. diff --git a/fern/products/sdk-reference/typescript/agents/livewire/job-process/index.mdx b/fern/products/sdk-reference/typescript/agents/livewire/job-process/index.mdx new file mode 100644 index 0000000000..3b1ed6acb0 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/livewire/job-process/index.mdx @@ -0,0 +1,52 @@ +--- +slug: "/reference/typescript/agents/livewire/job-process" +title: "JobProcess" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "livewire.JobProcess" + parent: "livewire" + module: "agents.livewire" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" +--- +# `JobProcess` + +Mirrors a LiveKit `JobProcess` — placeholder for prewarm / setup hooks. + +On SignalWire the control plane pre-warms infrastructure at scale, so this +class carries no real state beyond the LiveKit-compatible `userData` bag. + +## Signature + +```typescript +class JobProcess +``` + +## Properties + + + Mutable bag shared across prewarm and entry-point callbacks. + + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(): JobProcess +``` + +#### Returns + +`JobProcess` + +## Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 780. diff --git a/fern/products/sdk-reference/typescript/agents/livewire/noop-tracker/index.mdx b/fern/products/sdk-reference/typescript/agents/livewire/noop-tracker/index.mdx new file mode 100644 index 0000000000..5d840283a2 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/livewire/noop-tracker/index.mdx @@ -0,0 +1,124 @@ +--- +slug: "/reference/typescript/agents/livewire/noop-tracker" +title: "NoopTracker" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "livewire.NoopTracker" + parent: "livewire" + module: "agents.livewire" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" +--- +# `NoopTracker` + +NoopTracker ensures each informational message is logged at most once, +preventing spam when the same noop path is exercised repeatedly. + +## Signature + +```typescript +class NoopTracker +``` + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(): NoopTracker +``` + +#### Returns + +`NoopTracker` + +*** + +### hasLogged + +Expose whether a key has been logged (for testing). + +#### Signature + +```typescript +hasLogged(key: string): boolean +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 88. + +*** + +### once + +Log the given message the first time this key is seen. + +#### Signature + +```typescript +once(key: string, message: string): void +``` + +#### Parameters + + + Dedup key. Subsequent calls with the same key are silent. + + + + Message to write to stderr on first occurrence. + + +#### Returns + +`void` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 81. + +*** + +### reset + +Reset all tracked keys (for testing). + +#### Signature + +```typescript +reset(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 93. + +## Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 72. diff --git a/fern/products/sdk-reference/typescript/agents/livewire/plugins/cartesia-tts/index.mdx b/fern/products/sdk-reference/typescript/agents/livewire/plugins/cartesia-tts/index.mdx new file mode 100644 index 0000000000..3a48309631 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/livewire/plugins/cartesia-tts/index.mdx @@ -0,0 +1,55 @@ +--- +slug: "/reference/typescript/agents/livewire/plugins/cartesia-tts" +title: "CartesiaTTS" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "livewire.plugins.CartesiaTTS" + parent: "livewire.plugins" + module: "agents.livewire.plugins" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" +--- +# `CartesiaTTS` + +LiveKit Cartesia-TTS plugin stub. No-op on SignalWire. + +## Signature + +```typescript +class CartesiaTTS +``` + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(_opts?: any): CartesiaTTS +``` + +#### Parameters + + + Cartesia options (ignored). + + +#### Returns + +`CartesiaTTS` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 1105. + +## Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 1103. diff --git a/fern/products/sdk-reference/typescript/agents/livewire/plugins/deepgram-stt/index.mdx b/fern/products/sdk-reference/typescript/agents/livewire/plugins/deepgram-stt/index.mdx new file mode 100644 index 0000000000..c8d4adaa65 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/livewire/plugins/deepgram-stt/index.mdx @@ -0,0 +1,55 @@ +--- +slug: "/reference/typescript/agents/livewire/plugins/deepgram-stt" +title: "DeepgramSTT" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "livewire.plugins.DeepgramSTT" + parent: "livewire.plugins" + module: "agents.livewire.plugins" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" +--- +# `DeepgramSTT` + +LiveKit Deepgram-STT plugin stub. No-op on SignalWire. + +## Signature + +```typescript +class DeepgramSTT +``` + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(_opts?: any): DeepgramSTT +``` + +#### Parameters + + + Deepgram options (ignored). + + +#### Returns + +`DeepgramSTT` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 1075. + +## Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 1073. diff --git a/fern/products/sdk-reference/typescript/agents/livewire/plugins/eleven-labs-tts/index.mdx b/fern/products/sdk-reference/typescript/agents/livewire/plugins/eleven-labs-tts/index.mdx new file mode 100644 index 0000000000..c01f066feb --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/livewire/plugins/eleven-labs-tts/index.mdx @@ -0,0 +1,55 @@ +--- +slug: "/reference/typescript/agents/livewire/plugins/eleven-labs-tts" +title: "ElevenLabsTTS" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "livewire.plugins.ElevenLabsTTS" + parent: "livewire.plugins" + module: "agents.livewire.plugins" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" +--- +# `ElevenLabsTTS` + +LiveKit ElevenLabs-TTS plugin stub. No-op on SignalWire. + +## Signature + +```typescript +class ElevenLabsTTS +``` + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(_opts?: any): ElevenLabsTTS +``` + +#### Parameters + + + ElevenLabs options (ignored). + + +#### Returns + +`ElevenLabsTTS` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 1116. + +## Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 1114. diff --git a/fern/products/sdk-reference/typescript/agents/livewire/plugins/index.mdx b/fern/products/sdk-reference/typescript/agents/livewire/plugins/index.mdx new file mode 100644 index 0000000000..6912865cb1 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/livewire/plugins/index.mdx @@ -0,0 +1,57 @@ +--- +slug: "/reference/typescript/agents/livewire/plugins" +title: "plugins" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "livewire.plugins" + parent: "livewire" + module: "agents.livewire" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" +--- +# `plugins` + +Stub providers matching common LiveKit plugin packages. + +None of these do anything — they exist so LiveKit code that imports and +constructs these classes still compiles and runs under SignalWire. The +first construction of each logs an advisory to stderr. + +## Signature + +```typescript +module plugins +``` + +## Classes + + + + LiveKit Cartesia-TTS plugin stub. No-op on SignalWire. + + + + LiveKit Deepgram-STT plugin stub. No-op on SignalWire. + + + + LiveKit ElevenLabs-TTS plugin stub. No-op on SignalWire. + + + + LiveKit OpenAI-LLM plugin stub. + + + + LiveKit Silero-VAD plugin stub. No-op on SignalWire. + + + +## Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 1071. diff --git a/fern/products/sdk-reference/typescript/agents/livewire/plugins/open-aillm/index.mdx b/fern/products/sdk-reference/typescript/agents/livewire/plugins/open-aillm/index.mdx new file mode 100644 index 0000000000..fe46bfb2b8 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/livewire/plugins/open-aillm/index.mdx @@ -0,0 +1,64 @@ +--- +slug: "/reference/typescript/agents/livewire/plugins/open-aillm" +title: "OpenAILLM" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "livewire.plugins.OpenAILLM" + parent: "livewire.plugins" + module: "agents.livewire.plugins" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" +--- +# `OpenAILLM` + +LiveKit OpenAI-LLM plugin stub. + +The `model` string is captured and mapped to the SignalWire AI `model` +param by [AgentSession.start](/docs/sdk-reference/reference/typescript/agents/livewire/agent-session#start). Other options are ignored. + +## Signature + +```typescript +class OpenAILLM +``` + +## Properties + + + Model identifier captured from the constructor options. + + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(_opts?: any): OpenAILLM +``` + +#### Parameters + + + OpenAI options. `_opts.model` is captured; everything else ignored. + + +#### Returns + +`OpenAILLM` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 1093. + +## Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 1089. diff --git a/fern/products/sdk-reference/typescript/agents/livewire/plugins/silero-vad/index.mdx b/fern/products/sdk-reference/typescript/agents/livewire/plugins/silero-vad/index.mdx new file mode 100644 index 0000000000..efa1cd168a --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/livewire/plugins/silero-vad/index.mdx @@ -0,0 +1,82 @@ +--- +slug: "/reference/typescript/agents/livewire/plugins/silero-vad" +title: "SileroVAD" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "livewire.plugins.SileroVAD" + parent: "livewire.plugins" + module: "agents.livewire.plugins" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" +--- +# `SileroVAD` + +LiveKit Silero-VAD plugin stub. No-op on SignalWire. + +## Signature + +```typescript +class SileroVAD +``` + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(_opts?: Record): SileroVAD +``` + +#### Parameters + + + Silero VAD options (ignored). + + +#### Returns + +`SileroVAD` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 1127. + +*** + +### load + +Load a Silero VAD model. + +**No-op** on SignalWire — returns a fresh stub instance and emits a +one-time advisory to stderr. + +**Modifiers:** `static` + +#### Signature + +```typescript +load(): SileroVAD +``` + +#### Returns + +`SileroVAD` — A new `SileroVAD` stub. + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 1137. + +## Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 1125. diff --git a/fern/products/sdk-reference/typescript/agents/livewire/room/index.mdx b/fern/products/sdk-reference/typescript/agents/livewire/room/index.mdx new file mode 100644 index 0000000000..2ba871d58e --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/livewire/room/index.mdx @@ -0,0 +1,52 @@ +--- +slug: "/reference/typescript/agents/livewire/room" +title: "Room" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "livewire.Room" + parent: "livewire" + module: "agents.livewire" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" +--- +# `Room` + +Stub `Room` — SignalWire does not use the LiveKit room abstraction. + +Present purely for API parity so LiveKit-shaped code compiles; its only +meaningful attribute is the constant name. + +## Signature + +```typescript +class Room +``` + +## Properties + + + Always `"livewire-room"` — SignalWire has no per-call room identity. + + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(): Room +``` + +#### Returns + +`Room` + +## Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 795. diff --git a/fern/products/sdk-reference/typescript/agents/livewire/run-context/index.mdx b/fern/products/sdk-reference/typescript/agents/livewire/run-context/index.mdx new file mode 100644 index 0000000000..26bc2f5dbf --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/livewire/run-context/index.mdx @@ -0,0 +1,97 @@ +--- +slug: "/reference/typescript/agents/livewire/run-context" +title: "RunContext" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "livewire.RunContext" + parent: "livewire" + module: "agents.livewire" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" +--- +# `RunContext` + +Mirrors a LiveKit `RunContext` — passed to tool handlers so they can +read the current session, call handle, and user data. + +## Signature + +```typescript +class RunContext +``` + +## Type Parameters + + + +## Properties + + + Opaque function-call descriptor (LiveKit shape; passed through untouched). + + + + The owning [AgentSession](/docs/sdk-reference/reference/typescript/agents/livewire/agent-session), when one is bound. + + + + Opaque speech-turn handle (LiveKit shape; passed through untouched). + + + + Per-session user data, or an empty object when no session is bound. + + +## Methods + +### constructor + +#### Signature + +```typescript +constructor( + session?: AgentSession, + options?: { ...2 fields } +): RunContext +``` + +#### Type Parameters + + + +#### Parameters + + + Owning session, when available. + + + + Optional pass-through values. + + + Opaque LiveKit function-call descriptor. + + + + Opaque LiveKit speech handle. + + + +#### Returns + +`RunContext` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 390. + +## Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 376. diff --git a/fern/products/sdk-reference/typescript/agents/livewire/server-options/index.mdx b/fern/products/sdk-reference/typescript/agents/livewire/server-options/index.mdx new file mode 100644 index 0000000000..cb00397039 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/livewire/server-options/index.mdx @@ -0,0 +1,58 @@ +--- +slug: "/reference/typescript/agents/livewire/server-options" +title: "ServerOptions" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "livewire.ServerOptions" + parent: "livewire" + module: "agents.livewire" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" +--- +# `ServerOptions` + +Stub class mirroring LiveKit's `ServerOptions`. + +Accepts any configuration for source-compatibility with LiveKit code; +SignalWire ignores these settings. + +## Signature + +```typescript +class ServerOptions +``` + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(_opts?: any): ServerOptions +``` + +#### Parameters + + + LiveKit-shaped server options (ignored). + + +#### Returns + +`ServerOptions` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 956. + +## Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 954. diff --git a/fern/products/sdk-reference/typescript/agents/livewire/stop-response/index.mdx b/fern/products/sdk-reference/typescript/agents/livewire/stop-response/index.mdx new file mode 100644 index 0000000000..49254ac364 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/livewire/stop-response/index.mdx @@ -0,0 +1,59 @@ +--- +slug: "/reference/typescript/agents/livewire/stop-response" +title: "StopResponse" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "livewire.StopResponse" + parent: "livewire" + module: "agents.livewire" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" +--- +# `StopResponse` + +Signals that a tool should not trigger another LLM reply. + +## Signature + +```typescript +class StopResponse extends Error +``` + +## Inheritance + +**Extends:** `Error` + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(message?: string): StopResponse +``` + +#### Parameters + + + Optional error message. Defaults to `"StopResponse"`. + + +#### Returns + +`StopResponse` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 753. + +## Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 749. diff --git a/fern/products/sdk-reference/typescript/agents/livewire/tool-error/index.mdx b/fern/products/sdk-reference/typescript/agents/livewire/tool-error/index.mdx new file mode 100644 index 0000000000..95f6be82c5 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/livewire/tool-error/index.mdx @@ -0,0 +1,59 @@ +--- +slug: "/reference/typescript/agents/livewire/tool-error" +title: "ToolError" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "livewire.ToolError" + parent: "livewire" + module: "agents.livewire" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" +--- +# `ToolError` + +Error thrown from a tool to signal failure back to the LLM. + +## Signature + +```typescript +class ToolError extends Error +``` + +## Inheritance + +**Extends:** `Error` + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(message: string): ToolError +``` + +#### Parameters + + + Error message surfaced to the LLM. + + +#### Returns + +`ToolError` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 764. + +## Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 760. diff --git a/fern/products/sdk-reference/typescript/agents/livewire/worker-options/index.mdx b/fern/products/sdk-reference/typescript/agents/livewire/worker-options/index.mdx new file mode 100644 index 0000000000..e5a30aa185 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/livewire/worker-options/index.mdx @@ -0,0 +1,58 @@ +--- +slug: "/reference/typescript/agents/livewire/worker-options" +title: "WorkerOptions" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "livewire.WorkerOptions" + parent: "livewire" + module: "agents.livewire" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" +--- +# `WorkerOptions` + +Stub class mirroring LiveKit's `WorkerOptions`. + +Accepts any configuration for source-compatibility with LiveKit code; +SignalWire ignores these settings. + +## Signature + +```typescript +class WorkerOptions +``` + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(_opts?: any): WorkerOptions +``` + +#### Parameters + + + LiveKit-shaped worker options (ignored). + + +#### Returns + +`WorkerOptions` + +#### Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 945. + +## Source + +[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) + +Line 943. diff --git a/fern/products/sdk-reference/typescript/agents/parameter-schema/index.mdx b/fern/products/sdk-reference/typescript/agents/parameter-schema/index.mdx new file mode 100644 index 0000000000..661156612f --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/parameter-schema/index.mdx @@ -0,0 +1,664 @@ +--- +slug: "/reference/typescript/agents/parameter-schema" +title: "ParameterSchema" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "ParameterSchema" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts" +--- +# `ParameterSchema` + +Fluent builder producing a [ParameterSchemaObject](/docs/sdk-reference/reference/typescript/agents/parameter-schema/index__2#parameter-schema-object) byte-identical to +the equivalent hand-written `parameters` blob. Every method returns `this` +for chaining; call `build` to obtain the plain object to hand to +`defineTool`/`defineTypedTool`. + +Insertion order is preserved: properties appear in the order their methods +were called (matching a hand-written object literal), and `required` lists +names in the order `required` received them. + +## Signature + +```typescript +class ParameterSchema +``` + +## Constants + + + Recording direction for the SWAIG `record_call` verb — Tier-1 closed set (`function_result.py:918`). NOTE: distinct from [TAP\_DIRECTIONS](/docs/sdk-reference/reference/typescript/agents/parameter-schema#tap-directions) — record uses `listen`, tap uses `hear` (never unify; see journal §3 "three direction vocabularies"). Used by [ParameterSchema.recordDirection](/docs/sdk-reference/reference/typescript/agents/parameter-schema#record-direction). + + + + Recording format for the SWAIG `record_call` verb — the strongly-grounded Tier-1 closed set (`function_result.py:914` `raise ValueError`-validated; SWML `$defs/RecordCall.format`). Used by [ParameterSchema.recordFormat](/docs/sdk-reference/reference/typescript/agents/parameter-schema#record-format). + + + + Tap media codec for the SWAIG `tap` verb — Tier-1 closed set (`function_result.py:1218`). The 2-value SWAIG tap codec, distinct from the 7-value RELAY connect/stream codec superset (never reuse). Used by [ParameterSchema.codec](/docs/sdk-reference/reference/typescript/agents/parameter-schema#codec). + + + + Tap direction for the SWAIG `tap` verb — Tier-1 closed set (`function_result.py:1213`). Uses `hear`, NOT record's `listen`. Used by [ParameterSchema.tapDirection](/docs/sdk-reference/reference/typescript/agents/parameter-schema#tap-direction). + + +## Methods + +### array + +Add an `array` property. + +#### Signature + +```typescript +array( + name: string, + items?: Record, + description: string = '' +): this +``` + +#### Parameters + + + Parameter name. + + + + JSON-Schema for the array's element type (e.g. `{ type: 'string' }`). Omit for an untyped array. + + + + LLM-facing description. + + +#### Returns + +`this` — This builder, for chaining. + +#### Source + +[`src/ParameterSchema.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts) + +Line 196. + +*** + +### boolean + +Add a `boolean` property. + +#### Signature + +```typescript +boolean( + name: string, + description: string = '', + extra?: Record +): this +``` + +#### Parameters + + + + + + + +#### Returns + +`this` + +#### See Also + +- \[[property](/docs/sdk-reference/reference/typescript/agents/parameter-schema#property)]\(xref://[property](/docs/sdk-reference/reference/typescript/agents/parameter-schema#property)) + +#### Source + +[`src/ParameterSchema.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts) + +Line 183. + +*** + +### build + +Materialise the JSON-Schema `object`. Produces +`{ type: 'object', properties: {…} }`, plus `required: [...]` only when at +least one property was marked required — exactly matching a hand-written +blob (an omitted `required` is the same as `defineTool` receiving none). + +#### Signature + +```typescript +build(): ParameterSchemaObject +``` + +#### Returns + +`ParameterSchemaObject` — A fresh [ParameterSchemaObject](/docs/sdk-reference/reference/typescript/agents/parameter-schema/index__2#parameter-schema-object); safe to mutate without affecting the builder. + +#### Source + +[`src/ParameterSchema.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts) + +Line 284. + +*** + +### codec + +Add a `tap` **codec** property (`enum: ['PCMU','PCMA']`) — the 2-value +SWAIG tap codec (NOT the 7-value RELAY superset). + +#### Signature + +```typescript +codec(name: string, description: string = ''): this +``` + +#### Parameters + + + + + +#### Returns + +`this` + +#### See Also + +- \[[TAP\_CODECS](/docs/sdk-reference/reference/typescript/agents/parameter-schema#tap-codecs)]\(xref://[TAP\_CODECS](/docs/sdk-reference/reference/typescript/agents/parameter-schema#tap-codecs)) + +#### Source + +[`src/ParameterSchema.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts) + +Line 256. + +*** + +### constructor + +#### Signature + +```typescript +constructor(): ParameterSchema +``` + +#### Returns + +`ParameterSchema` + +*** + +### enum + +Add a `string` property constrained to a closed set of values, rendered as +`enum:[...]` — the JSON-Schema form the model and the SignalWire validator +both honour. This is the typed-closed-set affordance: pass one of the +exported Tier-1 value arrays ([RECORD\_FORMATS](/docs/sdk-reference/reference/typescript/agents/parameter-schema#record-formats) etc.) or any literal +list, and the values land verbatim in `enum`. + +#### Signature + +```typescript +enum( + name: string, + values: readonly unknown[], + description: string = '', + type: ParameterType = 'string' +): this +``` + +#### Parameters + + + Parameter name. + + + + The allowed values (a `readonly` array — the `as const` Tier-1 arrays are accepted directly). Emitted as `enum`, in order. + + + + LLM-facing description. + + + + The JSON-Schema base type for the enum (default `'string'`). + + +#### Returns + +`this` — This builder, for chaining. + +#### Source + +[`src/ParameterSchema.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts) + +Line 215. + +*** + +### integer + +Add an `integer` property. + +#### Signature + +```typescript +integer( + name: string, + description: string = '', + extra?: Record +): this +``` + +#### Parameters + + + + + + + +#### Returns + +`this` + +#### See Also + +- \[[property](/docs/sdk-reference/reference/typescript/agents/parameter-schema#property)]\(xref://[property](/docs/sdk-reference/reference/typescript/agents/parameter-schema#property)) + +#### Source + +[`src/ParameterSchema.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts) + +Line 173. + +*** + +### number + +Add a `number` (float) property. + +#### Signature + +```typescript +number( + name: string, + description: string = '', + extra?: Record +): this +``` + +#### Parameters + + + + + + + +#### Returns + +`this` + +#### See Also + +- \[[property](/docs/sdk-reference/reference/typescript/agents/parameter-schema#property)]\(xref://[property](/docs/sdk-reference/reference/typescript/agents/parameter-schema#property)) + +#### Source + +[`src/ParameterSchema.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts) + +Line 178. + +*** + +### property + +Add a property with an explicit JSON-Schema `type`. + +#### Signature + +```typescript +property( + name: string, + type: ParameterType, + description: string = '', + extra?: Record +): this +``` + +#### Parameters + + + Parameter name (the JSON key the model emits). + + + + JSON-Schema scalar type keyword. + + + + LLM-facing description (prompt engineering; tells the model HOW to fill this argument). Defaults to `''` to match a hand-written entry that omits a description. + + + + Additional JSON-Schema keywords merged into the property verbatim (`enum`, `minLength`, `pattern`, `format`, `items`, …). + + +#### Returns + +`this` — This builder, for chaining. + +#### Source + +[`src/ParameterSchema.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts) + +Line 157. + +*** + +### recordDirection + +Add a `record_call` **direction** property +(`enum: ['speak','listen','both']`). Uses record's `listen` (not tap's +`hear`). + +#### Signature + +```typescript +recordDirection(name: string, description: string = ''): this +``` + +#### Parameters + + + + + +#### Returns + +`this` + +#### See Also + +- \[[RECORD\_DIRECTIONS](/docs/sdk-reference/reference/typescript/agents/parameter-schema#record-directions)]\(xref://[RECORD\_DIRECTIONS](/docs/sdk-reference/reference/typescript/agents/parameter-schema#record-directions)) + +#### Source + +[`src/ParameterSchema.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts) + +Line 240. + +*** + +### recordFormat + +Add a `record_call` **format** property (`enum: ['wav','mp3','mp4']`) — the +Tier-1 closed set baked in. + +#### Signature + +```typescript +recordFormat(name: string, description: string = ''): this +``` + +#### Parameters + + + + + +#### Returns + +`this` + +#### See Also + +- \[[RECORD\_FORMATS](/docs/sdk-reference/reference/typescript/agents/parameter-schema#record-formats)]\(xref://[RECORD\_FORMATS](/docs/sdk-reference/reference/typescript/agents/parameter-schema#record-formats)) + +#### Source + +[`src/ParameterSchema.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts) + +Line 231. + +*** + +### required + +Mark one or more already-added properties as required. Names are appended +to the `required` array in the order received; duplicates are ignored. +Required-ness is independent of property order — call this at any point. + +#### Signature + +```typescript +required(...names: string[]): this +``` + +#### Parameters + + + Parameter names to require. + + +#### Returns + +`this` — This builder, for chaining. + +#### Source + +[`src/ParameterSchema.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts) + +Line 268. + +*** + +### string + +Add a `string` property. + +#### Signature + +```typescript +string( + name: string, + description: string = '', + extra?: Record +): this +``` + +#### Parameters + + + + + + + +#### Returns + +`this` + +#### See Also + +- \[[property](/docs/sdk-reference/reference/typescript/agents/parameter-schema#property)]\(xref://[property](/docs/sdk-reference/reference/typescript/agents/parameter-schema#property)) + +#### Source + +[`src/ParameterSchema.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts) + +Line 168. + +*** + +### tapDirection + +Add a `tap` **direction** property (`enum: ['speak','hear','both']`). Uses +tap's `hear` (not record's `listen`). + +#### Signature + +```typescript +tapDirection(name: string, description: string = ''): this +``` + +#### Parameters + + + + + +#### Returns + +`this` + +#### See Also + +- \[[TAP\_DIRECTIONS](/docs/sdk-reference/reference/typescript/agents/parameter-schema#tap-directions)]\(xref://[TAP\_DIRECTIONS](/docs/sdk-reference/reference/typescript/agents/parameter-schema#tap-directions)) + +#### Source + +[`src/ParameterSchema.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts) + +Line 248. + +## Functions + +### paramSchema + +Create a new [ParameterSchema](/docs/sdk-reference/reference/typescript/agents/parameter-schema) builder — the idiomatic entry point. + +#### Signature + +```typescript +paramSchema(): ParameterSchema +``` + +#### Returns + +`ParameterSchema` — A fresh, empty builder. + +#### Examples + +```typescript +const params = paramSchema() + .string('service', 'The service to look up') + .codec('media_codec', 'Audio codec for the tap') + .required('service') + .build(); +``` + +#### Source + +[`src/ParameterSchema.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts) + +Line 308. + +## Type Aliases + +### ParameterType + +The JSON-Schema scalar `type` keywords a SWAIG parameter property may use. + +#### Signature + +```typescript +type ParameterType = "string" | "number" | "integer" | "boolean" | "array" | "object" +``` + +#### Source + +[`src/ParameterSchema.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts) + +Line 104. + +*** + +### RecordDirection + +A single [RECORD\_DIRECTIONS](/docs/sdk-reference/reference/typescript/agents/parameter-schema#record-directions) value. + +#### Signature + +```typescript +type RecordDirection = typeof RECORD_DIRECTIONS[number] +``` + +#### Source + +[`src/ParameterSchema.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts) + +Line 82. + +*** + +### RecordFormat + +A single [RECORD\_FORMATS](/docs/sdk-reference/reference/typescript/agents/parameter-schema#record-formats) value. + +#### Signature + +```typescript +type RecordFormat = typeof RECORD_FORMATS[number] +``` + +#### Source + +[`src/ParameterSchema.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts) + +Line 72. + +*** + +### TapCodec + +A single [TAP\_CODECS](/docs/sdk-reference/reference/typescript/agents/parameter-schema#tap-codecs) value. + +#### Signature + +```typescript +type TapCodec = typeof TAP_CODECS[number] +``` + +#### Source + +[`src/ParameterSchema.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts) + +Line 101. + +*** + +### TapDirection + +A single [TAP\_DIRECTIONS](/docs/sdk-reference/reference/typescript/agents/parameter-schema#tap-directions) value. + +#### Signature + +```typescript +type TapDirection = typeof TAP_DIRECTIONS[number] +``` + +#### Source + +[`src/ParameterSchema.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts) + +Line 91. + +## Source + +[`src/ParameterSchema.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts) + +Line 141. diff --git a/fern/products/sdk-reference/typescript/agents/parameter-schema/index__2.mdx b/fern/products/sdk-reference/typescript/agents/parameter-schema/index__2.mdx new file mode 100644 index 0000000000..19ccb518df --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/parameter-schema/index__2.mdx @@ -0,0 +1,73 @@ +--- +slug: "/reference/typescript/agents/parameter-schema/index__2" +title: "ParameterSchema" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "agents.ParameterSchema" + parent: "agents" + module: "agents" +--- +# `ParameterSchema` + +## Interfaces + +### ParameterProperty + +A single JSON-Schema property entry inside a tool's `parameters.properties`. +Mirrors the shape the model reads on every turn: `type` + LLM-facing +`description`, with an optional `enum` / `items` and any extra JSON-Schema +keywords (`minLength`, `pattern`, `format`, …) merged through verbatim. + +#### Signature + +```typescript +interface ParameterProperty +``` + +#### Properties + + + + + + + + + +#### Source + +[`src/ParameterSchema.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts) + +Line 112. + +*** + +### ParameterSchemaObject + +The serialised SWAIG parameter schema: a JSON-Schema `object`. This is the +exact shape `defineTool({ parameters })` accepts and what the SDK renders +into the OpenAI tool schema's `parameters` field. + +#### Signature + +```typescript +interface ParameterSchemaObject +``` + +#### Properties + + + + + + + +#### Source + +[`src/ParameterSchema.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts) + +Line 125. diff --git a/fern/products/sdk-reference/typescript/agents/pom-builder/index.mdx b/fern/products/sdk-reference/typescript/agents/pom-builder/index.mdx new file mode 100644 index 0000000000..a93a3c2621 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/pom-builder/index.mdx @@ -0,0 +1,458 @@ +--- +slug: "/reference/typescript/agents/pom-builder" +title: "PomBuilder" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "PomBuilder" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts" +--- +# `PomBuilder` + +Builds a structured prompt by composing named POM sections, with Markdown and dict export. + +The Prompt Object Model lets you assemble a large system prompt from reusable, +named sections (Role, Objective, Constraints, etc.) instead of a single string. +This plays well with [AgentBase](/docs/sdk-reference/reference/typescript/agents/agent-base) methods like `promptAddSection()` and +`promptAddToSection()` that let user code and skills add prompt content +incrementally. + +## Signature + +```typescript +class PomBuilder +``` + +## Examples + +```typescript +import { PomBuilder } from '@signalwire/sdk'; + +const pom = new PomBuilder() + .addSection('Role', { body: 'You are a friendly customer service agent.' }) + .addSection('Objectives', { bullets: [ + 'Identify the customer politely', + 'Resolve their issue in under 3 turns if possible', + ]}) + .addSection('Constraints', { bullets: [ + 'Never reveal internal tool names', + ]}); + +const systemPrompt = pom.renderMarkdown(); +``` + +## See Also + +- \- \[PomSection]\(/docs/sdk-reference/reference/typescript/agents/pom-builder/pom-section) + \- \[AgentBase.promptAddSection]\(/docs/sdk-reference/reference/typescript/agents/agent-base#prompt-add-section) + +## Properties + + + Returns the underlying `PromptObjectModel` for the builder. Mirrors Python's `PomBuilder.pom` attribute (the wrapped low-level model). Returns a fresh `PromptObjectModel` populated from the builder's current sections; mutations on the returned instance do not propagate back to this builder. + + +## Methods + +### addPomAsSubsection + +Appends every top-level section of another PomBuilder as subsections of a target section. + +#### Signature + +```typescript +addPomAsSubsection(target: string | PomSection, pomToAdd: PomBuilder): this +``` + +#### Parameters + + + The heading of the target section, or the PomSection to append into. + + + + The PomBuilder whose sections should be appended as subsections. + + +#### Returns + +`this` — This builder for chaining. + +#### Throws + +- If target is a string and no section with that title is found. + +#### Source + +[`src/PomBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts) + +Line 374. + +*** + +### addSection + +Adds a new top-level section to the prompt. + +#### Signature + +```typescript +addSection(title: string, opts?: { ...5 fields }): this +``` + +#### Parameters + + + The section heading. + + + + Optional body, bullets, numbering, and subsection configuration. + + + + + + + + + + + + +#### Returns + +`this` — This builder for chaining. + +#### Source + +[`src/PomBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts) + +Line 255. + +*** + +### addSubsection + +Adds a subsection under an existing parent section, creating the parent if absent. + +#### Signature + +```typescript +addSubsection(parentTitle: string, title: string, opts?: { ...2 fields }): this +``` + +#### Parameters + + + The heading of the parent section. + + + + The subsection heading. + + + + Optional body text and bullets for the subsection. + + + + + + +#### Returns + +`this` — This builder for chaining. + +#### Source + +[`src/PomBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts) + +Line 316. + +*** + +### addToSection + +Appends body text or bullets to an existing section, creating it if absent. + +#### Signature + +```typescript +addToSection(title: string, opts?: { ...3 fields }): this +``` + +#### Parameters + + + The section heading to append to. + + + + Body text and/or bullets to add. + + + + + + + + +#### Returns + +`this` — This builder for chaining. + +#### Source + +[`src/PomBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts) + +Line 293. + +*** + +### constructor + +#### Signature + +```typescript +constructor(): PomBuilder +``` + +#### Returns + +`PomBuilder` + +*** + +### findSection + +Recursively searches all sections and subsections for one matching the given title. + +#### Signature + +```typescript +findSection(title: string): PomSection | undefined +``` + +#### Parameters + + + The section heading to search for. + + +#### Returns + +`PomSection | undefined` — The matching PomSection, or undefined if not found. + +#### Source + +[`src/PomBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts) + +Line 355. + +*** + +### fromSections + +Creates a PomBuilder from an array of section data objects. + +**Modifiers:** `static` + +#### Signature + +```typescript +fromSections(sections: PomSectionData[]): PomBuilder +``` + +#### Parameters + + + Array of section data to reconstruct. + + +#### Returns + +`PomBuilder` — A new PomBuilder populated with the given sections. + +#### Source + +[`src/PomBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts) + +Line 413. + +*** + +### getSection + +Returns a top-level section by title. + +#### Signature + +```typescript +getSection(title: string): PomSection | undefined +``` + +#### Parameters + + + The section heading to retrieve. + + +#### Returns + +`PomSection | undefined` — The matching PomSection, or undefined if not found. + +#### Source + +[`src/PomBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts) + +Line 346. + +*** + +### hasSection + +Checks whether a top-level section with the given title exists. + +#### Signature + +```typescript +hasSection(title: string): boolean +``` + +#### Parameters + + + The section heading to look for. + + +#### Returns + +`boolean` — True if the section exists. + +#### Source + +[`src/PomBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts) + +Line 337. + +*** + +### renderMarkdown + +Renders all sections as a combined Markdown string. + +#### Signature + +```typescript +renderMarkdown(): string +``` + +#### Returns + +`string` — The complete rendered Markdown prompt text. + +#### Source + +[`src/PomBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts) + +Line 467. + +*** + +### renderXml + +Renders all sections as a combined XML string with a `` root element. + +#### Signature + +```typescript +renderXml(): string +``` + +#### Returns + +`string` — The complete rendered XML prompt text. + +#### Source + +[`src/PomBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts) + +Line 488. + +*** + +### reset + +Clears all sections, returning the builder to its initial empty state. + +#### Signature + +```typescript +reset(): this +``` + +#### Returns + +`this` — This builder for chaining. + +#### Source + +[`src/PomBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts) + +Line 243. + +*** + +### toDict + +Serializes all sections to an array of plain data objects. + +#### Signature + +```typescript +toDict(): PomSectionData[] +``` + +#### Returns + +`PomSectionData[]` — An array of PomSectionData representing all top-level sections. + +#### Source + +[`src/PomBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts) + +Line 396. + +*** + +### toJson + +Serializes all sections to a JSON string. + +#### Signature + +```typescript +toJson(): string +``` + +#### Returns + +`string` — A JSON string representation of all top-level sections. + +#### Source + +[`src/PomBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts) + +Line 404. + +## Source + +[`src/PomBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts) + +Line 235. diff --git a/fern/products/sdk-reference/typescript/agents/pom-builder/index__2.mdx b/fern/products/sdk-reference/typescript/agents/pom-builder/index__2.mdx new file mode 100644 index 0000000000..7b73900cf5 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/pom-builder/index__2.mdx @@ -0,0 +1,66 @@ +--- +slug: "/reference/typescript/agents/pom-builder/index__2" +title: "PomBuilder" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "agents.PomBuilder" + parent: "agents" + module: "agents" +--- +# `PomBuilder` + +## Classes + + + + A single section in a Prompt Object Model, with optional title, body, bullets, and nested subsections. + + + +## Interfaces + +### PomSectionData + +Serializable representation of a POM section, used for JSON export. + +#### Signature + +```typescript +interface PomSectionData +``` + +#### Properties + + + Section body paragraph text. + + + + List of bullet point strings. + + + + Whether subsections are numbered. + + + + Whether bullet points are rendered as a numbered list. + + + + Nested child sections. + + + + Section heading text. + + +#### Source + +[`src/PomBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts) + +Line 12. diff --git a/fern/products/sdk-reference/typescript/agents/pom-builder/pom-section/index.mdx b/fern/products/sdk-reference/typescript/agents/pom-builder/pom-section/index.mdx new file mode 100644 index 0000000000..78458ea2ca --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/pom-builder/pom-section/index.mdx @@ -0,0 +1,217 @@ +--- +slug: "/reference/typescript/agents/pom-builder/pom-section" +title: "PomSection" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "PomBuilder.PomSection" + parent: "agents.PomBuilder" + module: "agents.PomBuilder" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts" +--- +# `PomSection` + +A single section in a Prompt Object Model, with optional title, body, bullets, and nested subsections. + +## Signature + +```typescript +class PomSection +``` + +## Properties + + + Section body paragraph text. + + + + List of bullet point strings. + + + + Whether this section is numbered when rendered; null means inherit from parent context. + + + + Whether bullet points are rendered as a numbered list. + + + + Nested child sections. + + + + Section heading text, or null if untitled. + + +## Methods + +### addSubsection + +Adds a nested subsection to this section. + +#### Signature + +```typescript +addSubsection(opts: { ...5 fields }): PomSection +``` + +#### Parameters + + + Subsection configuration including title and optional body/bullets. + + + + + + + + + + + + +#### Returns + +`PomSection` — The newly created child PomSection. + +#### Source + +[`src/PomBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts) + +Line 66. + +*** + +### constructor + +Creates a new PomSection. + +#### Signature + +```typescript +constructor(opts?: { ...5 fields }): PomSection +``` + +#### Parameters + + + Optional section configuration. + + + + + + + + + + + + +#### Returns + +`PomSection` + +#### Source + +[`src/PomBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts) + +Line 46. + +*** + +### renderMarkdown + +Renders this section and its subsections as a Markdown string. + +#### Signature + +```typescript +renderMarkdown(level: number = 2, sectionNumber: number[] = []): string +``` + +#### Parameters + + + The heading level to start at (default 2 for ##). + + + + Hierarchical numbering prefix for numbered sections. + + +#### Returns + +`string` — The rendered Markdown string. + +#### Source + +[`src/PomBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts) + +Line 105. + +*** + +### renderXml + +Renders this section and its subsections as an XML string. + +#### Signature + +```typescript +renderXml(indent: number = 0, sectionNumber: number[] = []): string +``` + +#### Parameters + + + The indentation depth (default 0). + + + + Hierarchical numbering prefix for numbered sections. + + +#### Returns + +`string` — The rendered XML string. + +#### Source + +[`src/PomBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts) + +Line 154. + +*** + +### toDict + +Serializes this section to a plain data object. + +#### Signature + +```typescript +toDict(): PomSectionData +``` + +#### Returns + +`PomSectionData` — A PomSectionData representation of this section and its subsections. + +#### Source + +[`src/PomBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts) + +Line 88. + +## Source + +[`src/PomBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts) + +Line 28. diff --git a/fern/products/sdk-reference/typescript/agents/pom/index.mdx b/fern/products/sdk-reference/typescript/agents/pom/index.mdx new file mode 100644 index 0000000000..24f90749f7 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/pom/index.mdx @@ -0,0 +1,28 @@ +--- +slug: "/reference/typescript/agents/pom" +title: "POM" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "agents.POM" + parent: "agents" + module: "agents" +--- +# `POM` + +## Classes + + + + The Prompt Object Model — a structured, serializable representation of a full prompt document. Direct port of Python's `signalwire.pom.pom.PromptObjectModel`. + + + +## Modules + + + + diff --git a/fern/products/sdk-reference/typescript/agents/pom/prompt-object-model/index.mdx b/fern/products/sdk-reference/typescript/agents/pom/prompt-object-model/index.mdx new file mode 100644 index 0000000000..4c1fb81cab --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/pom/prompt-object-model/index.mdx @@ -0,0 +1,333 @@ +--- +slug: "/reference/typescript/agents/pom/prompt-object-model" +title: "PromptObjectModel" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "POM.PromptObjectModel" + parent: "agents.POM" + module: "agents.POM" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts" +--- +# `PromptObjectModel` + +The Prompt Object Model — a structured, serializable representation of a +full prompt document. Direct port of Python's +`signalwire.pom.pom.PromptObjectModel`. + +## Signature + +```typescript +class PromptObjectModel +``` + +## Properties + + + Whether to print debug info during `renderMarkdown`. + + + + Top-level sections in the model. + + +## Methods + +### addPomAsSubsection + +Add another PromptObjectModel as subsections of an existing section. + +#### Signature + +```typescript +addPomAsSubsection(target: string | Section, pomToAdd: PromptObjectModel): void +``` + +#### Parameters + + + Either the title of the target section, or a `Section` reference. + + + + The model whose top-level sections will be appended as subsections. + + +#### Returns + +`void` + +#### Throws + +- Error if `target` is a string and no section with that title is found. + +#### Source + +[`src/POM/PromptObjectModel.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts) + +Line 412. + +*** + +### addSection + +Add a top-level section to the model. + +#### Signature + +```typescript +addSection(title: string | null = null, opts: { ...4 fields } = {}): Section +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`Section` + +#### Throws + +- Error if a section without a title is added after the first section. + +#### Source + +[`src/POM/PromptObjectModel.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts) + +Line 269. + +*** + +### constructor + +#### Signature + +```typescript +constructor(debug: boolean = false): PromptObjectModel +``` + +#### Parameters + + + +#### Returns + +`PromptObjectModel` + +#### Source + +[`src/POM/PromptObjectModel.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts) + +Line 259. + +*** + +### findSection + +Find a section by its title (recursive search through all sections and subsections). + +#### Signature + +```typescript +findSection(title: string): Section | null +``` + +#### Parameters + + + +#### Returns + +`Section | null` — The matching Section or null if not found. + +#### Source + +[`src/POM/PromptObjectModel.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts) + +Line 307. + +*** + +### fromJson + +Create a PromptObjectModel from JSON data (string or already-parsed object). + +**Modifiers:** `static` + +#### Signature + +```typescript +fromJson(jsonData: unknown): PromptObjectModel +``` + +#### Parameters + + + +#### Returns + +`PromptObjectModel` + +#### Source + +[`src/POM/PromptObjectModel.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts) + +Line 434. + +*** + +### fromYaml + +Create a PromptObjectModel from YAML data (string or already-parsed object). + +**Modifiers:** `static` + +#### Signature + +```typescript +fromYaml(yamlData: unknown): PromptObjectModel +``` + +#### Parameters + + + +#### Returns + +`PromptObjectModel` + +#### Source + +[`src/POM/PromptObjectModel.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts) + +Line 447. + +*** + +### renderMarkdown + +Render the entire model as markdown. + +#### Signature + +```typescript +renderMarkdown(): string +``` + +#### Returns + +`string` + +#### Source + +[`src/POM/PromptObjectModel.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts) + +Line 337. + +*** + +### renderXml + +Render the entire model as XML. + +#### Signature + +```typescript +renderXml(): string +``` + +#### Returns + +`string` + +#### Source + +[`src/POM/PromptObjectModel.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts) + +Line 381. + +*** + +### toDict + +Convert the entire model to a list of dictionaries. + +#### Signature + +```typescript +toDict(): SectionData[] +``` + +#### Returns + +`SectionData[]` + +#### Source + +[`src/POM/PromptObjectModel.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts) + +Line 320. + +*** + +### toJson + +Convert the entire model to a JSON string (pretty-printed with 2-space indent). + +#### Signature + +```typescript +toJson(): string +``` + +#### Returns + +`string` + +#### Source + +[`src/POM/PromptObjectModel.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts) + +Line 325. + +*** + +### toYaml + +Convert the entire model to a YAML string. + +#### Signature + +```typescript +toYaml(): string +``` + +#### Returns + +`string` + +#### Source + +[`src/POM/PromptObjectModel.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts) + +Line 330. + +## Source + +[`src/POM/PromptObjectModel.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts) + +Line 253. diff --git a/fern/products/sdk-reference/typescript/agents/pom/prompt-object-model/index__2.mdx b/fern/products/sdk-reference/typescript/agents/pom/prompt-object-model/index__2.mdx new file mode 100644 index 0000000000..ad2bbf2716 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/pom/prompt-object-model/index__2.mdx @@ -0,0 +1,54 @@ +--- +slug: "/reference/typescript/agents/pom/prompt-object-model/index__2" +title: "PromptObjectModel" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "agents.POM.PromptObjectModel" + parent: "agents.POM" + module: "agents.POM" +--- +# `PromptObjectModel` + +## Classes + + + + A section in the Prompt Object Model. + + + +## Interfaces + +### SectionData + +Plain serializable representation of a section, used for JSON/YAML and `to_dict()` exchange. + +#### Signature + +```typescript +interface SectionData +``` + +#### Properties + + + + + + + + + + + + + +#### Source + +[`src/POM/PromptObjectModel.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts) + +Line 19. diff --git a/fern/products/sdk-reference/typescript/agents/pom/prompt-object-model/section/index.mdx b/fern/products/sdk-reference/typescript/agents/pom/prompt-object-model/section/index.mdx new file mode 100644 index 0000000000..7023629e27 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/pom/prompt-object-model/section/index.mdx @@ -0,0 +1,274 @@ +--- +slug: "/reference/typescript/agents/pom/prompt-object-model/section" +title: "Section" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "POM.PromptObjectModel.Section" + parent: "agents.POM.PromptObjectModel" + module: "agents.POM.PromptObjectModel" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts" +--- +# `Section` + +A section in the Prompt Object Model. + +Each section contains a title, optional body text, optional bullet points, +and can have any number of nested subsections. + +## Signature + +```typescript +class Section +``` + +## Properties + + + A paragraph of text associated with the section. + + + + Bullet-pointed items. + + + + Whether this section should be numbered. + + + + Whether bullets should be numbered instead of using bullet points. + + + + Nested sections with the same structure. + + + + The name of the section. + + +## Methods + +### addBody + +Add or replace the body text for this section. + +#### Signature + +```typescript +addBody(body: string): void +``` + +#### Parameters + + + +#### Returns + +`void` + +#### Source + +[`src/POM/PromptObjectModel.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts) + +Line 84. + +*** + +### addBullets + +Add bullet points to this section (extends the existing list). + +#### Signature + +```typescript +addBullets(bullets: string[]): void +``` + +#### Parameters + + + +#### Returns + +`void` + +#### Source + +[`src/POM/PromptObjectModel.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts) + +Line 92. + +*** + +### addSubsection + +Add a subsection to this section. + +#### Signature + +```typescript +addSubsection(title: string, opts: { ...4 fields } = {}): Section +``` + +#### Parameters + + + The title of the subsection (required — subsections must have a title). + + + + Optional body / bullets / numbering for the subsection. + + + + + + + + + + +#### Returns + +`Section` — The newly created Section. + +#### Source + +[`src/POM/PromptObjectModel.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts) + +Line 106. + +*** + +### constructor + +#### Signature + +```typescript +constructor(title: string | null = null, opts: { ...4 fields } = {}): Section +``` + +#### Parameters + + + Section title (null permitted only on the very first top-level section). + + + + Keyword-style options matching Python's `body=`/`bullets=`/`numbered=`/`numberedBullets=`. + + + + + + + + + + +#### Returns + +`Section` + +#### Source + +[`src/POM/PromptObjectModel.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts) + +Line 52. + +*** + +### renderMarkdown + +Render this section and all its subsections as markdown. + +#### Signature + +```typescript +renderMarkdown(level: number = 2, sectionNumber: number[] | null = null): string +``` + +#### Parameters + + + The heading level to start with (default 2 = `##`). + + + + The current section number for numbered sections. + + +#### Returns + +`string` + +#### Source + +[`src/POM/PromptObjectModel.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts) + +Line 147. + +*** + +### renderXml + +Render this section and all its subsections as XML. + +#### Signature + +```typescript +renderXml(indent: number = 0, sectionNumber: number[] | null = null): string +``` + +#### Parameters + + + The indentation level to start with (default 0). + + + + The current section number for numbered sections. + + +#### Returns + +`string` + +#### Source + +[`src/POM/PromptObjectModel.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts) + +Line 194. + +*** + +### toDict + +Convert the section to a dictionary representation. + +#### Signature + +```typescript +toDict(): SectionData +``` + +#### Returns + +`SectionData` + +#### Source + +[`src/POM/PromptObjectModel.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts) + +Line 129. + +## Source + +[`src/POM/PromptObjectModel.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts) + +Line 34. diff --git a/fern/products/sdk-reference/typescript/agents/prefabs/concierge-agent/index.mdx b/fern/products/sdk-reference/typescript/agents/prefabs/concierge-agent/index.mdx new file mode 100644 index 0000000000..6d0bb78f6b --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/prefabs/concierge-agent/index.mdx @@ -0,0 +1,3701 @@ +--- +slug: "/reference/typescript/agents/prefabs/concierge-agent" +title: "ConciergeAgent" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "prefabs.ConciergeAgent" + parent: "prefabs" + module: "agents.prefabs" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/ConciergeAgent.ts" +--- +# `ConciergeAgent` + +Prefab agent that acts as a virtual concierge for a venue, providing information +about services, amenities, hours of operation, availability, and directions. + +## Signature + +```typescript +class ConciergeAgent extends AgentBase +``` + +## Inheritance + +**Extends:** [AgentBase](/docs/sdk-reference/reference/typescript/agents/agent-base) + +## Examples + +```typescript +import { ConciergeAgent } from '@signalwire/sdk'; + +const agent = new ConciergeAgent({ + venueName: 'The Park Hotel', + services: ['Room service', 'Valet parking', 'Spa', 'Restaurant'], + hoursOfOperation: { + restaurant: '7 AM - 10 PM daily', + spa: '9 AM - 9 PM daily', + default: '24 hours', + }, + amenities: { + pool: { location: 'Rooftop', hours: '6 AM - 10 PM' }, + gym: { location: 'Floor 2', hours: '24 hours' }, + }, +}); + +await agent.serve({ port: 3000 }); +``` + +## Properties + + + Unique identifier for this agent instance. + + + + Dictionary of amenities, each mapping to a dict of detail keys/values. + + + + + + + + Domain name for SSL. Mirrors Python's `self.domain`. + + + + Check if full JSON Schema validation is enabled. Mirrors Python's `@property full_validation_enabled`. + + + + Host the server binds to. + + + + Hours of operation by category. Defaults to `{ default: "9 AM - 5 PM" }`. + + + + Structured logger instance for this agent. Override the inherited SWMLService logger with an AgentBase-tagged one. + + + + Service display name. + + + + Public accessor for the native functions list. Python exposes `self.native_functions` as a public read/write attribute. + + + + + + Public accessor for the agent's POM as a `PromptObjectModel` instance. Python parity: `agent.pom` instance attribute (agent\_base.py line 209) is a `signalwire.pom.pom.PromptObjectModel` when `use_pom=True`, or `None` otherwise. This getter returns the equivalent TypeScript `PromptObjectModel` instance — callers can use `addSection`, `findSection`, `renderMarkdown`, `renderXml`, `toJson`, `toYaml` exactly as in Python. The instance returned is a fresh snapshot built from the current `PomBuilder` state, so mutating it does not feed back into the agent's internal builder. To mutate the agent's prompt, use `promptAddSection` / `promptAddToSection` / `promptAddSubsection`. + + + + Port the server binds to. + + + + Static prompt sections: subclasses can define these declaratively. Each entry is applied via promptAddSection() in the constructor. + + + + Public accessor for the PromptManager (POM). Python exposes `self.pom` as a public attribute. This getter provides equivalent access for direct POM manipulation. + + + + HTTP route path. + + + + Schema validation utilities. Mirrors Python's `self.schema_utils`. + + + + Unified security configuration. Mirrors Python's `self.security`. + + + + List of services offered by the venue. + + + + Public read-only accessor for the SkillManager. Python exposes `self.skill_manager` as a public attribute. This getter provides equivalent read access. + + + + Special instructions appended to the agent's instruction bullets. + + + + Path to SSL certificate. Mirrors Python's `self.ssl_cert_path`. + + + + Whether SSL is enabled. Mirrors Python's `self.ssl_enabled`. + + + + Path to SSL private key. Mirrors Python's `self.ssl_key_path`. + + + + The complete set of internal SWAIG function names that accept fillers, matching the SWAIGInternalFiller schema definition. Any name outside this set is silently ignored by the runtime — addInternalFiller / setInternalFillers warn if you pass an unknown name. + + + + + + + + Name of the venue or business. + + + + Custom verb handler registry. Mirrors Python's `self.verb_registry`. + + +## Methods + +### addAnswerVerb + +Configure the answer verb (phase 2) with optional settings. + +#### Signature + +```typescript +addAnswerVerb(config?: Record): this +``` + +#### Parameters + + + Optional answer verb configuration. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1501. + +*** + +### addFunctionInclude + +Add a remote SWAIG function include reference. + +#### Signature + +```typescript +addFunctionInclude( + url: string, + functions: string[], + metaData?: Record +): this +``` + +#### Parameters + + + URL of the remote SWAIG endpoint. + + + + Function names available at that endpoint. + + + + Optional metadata to attach to the include. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 966. + +*** + +### addHint + +Add a single speech-recognition hint. + +#### Signature + +```typescript +addHint(hint: string): this +``` + +#### Parameters + + + Word or phrase to boost in speech recognition. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 653. + +*** + +### addHints + +Add multiple speech-recognition hints at once. + +#### Signature + +```typescript +addHints(hints: string[]): this +``` + +#### Parameters + + + Array of words or phrases to boost. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 663. + +*** + +### addInternalFiller + +Add internal filler phrases for a single internal function and language. + +See [setInternalFillers](/docs/sdk-reference/reference/typescript/agents/prefabs/concierge-agent#set-internal-fillers) for the complete list of supported +functionName values and an explanation of what fillers do. + +#### Signature + +```typescript +addInternalFiller( + functionName: string, + languageCode: string, + fillers: string[] +): this +``` + +#### Parameters + + + One of the supported internal function names (see SUPPORTED\_INTERNAL\_FILLER\_NAMES). Names outside the supported set log a warning and are ignored by the runtime. + + + + BCP-47 language code for the fillers (e.g. 'en-US'). + + + + Array of filler phrases. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 943. + +*** + +### addLanguage + +Add a supported language to the AI configuration. + +#### Signature + +```typescript +addLanguage(config: LanguageConfig): this +``` + +#### Parameters + + + Language configuration including name, code, voice, and optional fillers. `params` may be set to attach engine-specific tuning (voice stability, similarity boost, model knobs, etc.); only emitted into SWML when non-empty so existing entries stay byte-identical when no params are passed (Python ai\_config\_mixin.py `add_language`). + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 694. + +*** + +### addMcpServer + +Add an external MCP server for tool discovery and invocation. +Tools are discovered via MCP protocol at session start and added to the AI's tool list. + +#### Signature + +```typescript +addMcpServer(url: string, opts?: { ...3 fields }): this +``` + +#### Parameters + + + MCP server HTTP endpoint URL + + + + Optional configuration: headers, resources, resourceVars + + + + + + + + +#### Returns + +`this` — This agent instance for chaining + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1146. + +*** + +### addPatternHint + +Add a pattern-based speech-recognition hint with find-and-replace behavior. + +#### Signature + +```typescript +addPatternHint(opts: { ...4 fields }): this +``` + +#### Parameters + + + Pattern hint configuration with a descriptive hint label, regex pattern, replacement string, and optional case-insensitive flag. + + + + + + + + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 674. + +*** + +### addPostAiVerb + +Add a SWML verb to execute after the AI verb (phase 5). + +#### Signature + +```typescript +addPostAiVerb(verbName: string, config: Record): this +``` + +#### Parameters + + + Name of the SWML verb. + + + + Verb configuration object. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1523. + +*** + +### addPostAnswerVerb + +Add a SWML verb to execute after the answer phase but before the AI verb (phase 3). + +#### Signature + +```typescript +addPostAnswerVerb( + verbName: string, + config: number | Record +): this +``` + +#### Parameters + + + Name of the SWML verb. + + + + Verb configuration object. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1512. + +*** + +### addPreAnswerVerb + +Add a SWML verb to execute before the answer phase (phase 1). + +#### Signature + +```typescript +addPreAnswerVerb( + verbName: string, + config: number | Record +): this +``` + +#### Parameters + + + Name of the SWML verb (e.g. "play", "record"). + + + + Verb configuration object. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1491. + +*** + +### addPronunciation + +Add a pronunciation override rule for the TTS engine. + +#### Signature + +```typescript +addPronunciation(rule: PronunciationRule): this +``` + +#### Parameters + + + Pronunciation rule specifying the text to replace and its substitute. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 774. + +*** + +### addSection + +Add a new named section to the SWML document. +Mirrors Python's `add_section()`. + +#### Signature + +```typescript +addSection(sectionName: string): this +``` + +#### Parameters + + + Name of the section to create. + + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 653. + +*** + +### addSkill + +Add a skill to this agent, registering its tools, prompt sections, hints, and global data. + +#### Signature + +```typescript +addSkill(skill: SkillBase): Promise +``` + +#### Parameters + + + The skill instance to add. + + +#### Returns + +`Promise` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1570. + +*** + +### addSkillByName + +Add a skill by its registered name, looking it up in the global SkillRegistry. + +Matches Python's `add_skill(skill_name, params)` which loads skills by string +name via the SkillManager registry. Throws a `ValueError`-equivalent if the +skill name is not found in the registry. + +Accepts a typed [SkillNameOrString](/docs/sdk-reference/reference/typescript/agents/skills/skill-name#skill-name-or-string): one of the built-in +`SkillName` values (autocompleted, with a typo caught at compile +time) or any other string for custom / third-party skills. The value is +forwarded to the registry unchanged — the typing is erased at runtime, so +this matches Python's bare-`str` `add_skill(skill_name, params)`. + +#### Signature + +```typescript +addSkillByName( + skillName: SkillNameOrString, + params?: SkillConfig +): Promise +``` + +#### Parameters + + + The name the skill was registered under in the SkillRegistry. + + + + Optional configuration parameters forwarded to the skill factory. + + +#### Returns + +`Promise` — This agent instance for chaining. + +#### Throws + +- Error if no skill with the given name is registered. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1641. + +*** + +### addSwaigQueryParams + +Add extra query parameters appended to all SWAIG webhook URLs. + +#### Signature + +```typescript +addSwaigQueryParams(params: Record): this +``` + +#### Parameters + + + Key-value pairs to append as query parameters. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1733. + +*** + +### addVerb + +Add a verb to the SWML document. + +#### Signature + +```typescript +addVerb(name: string, config: unknown): this +``` + +#### Parameters + + + Verb name (e.g., 'answer', 'play', 'hangup'). + + + + Verb configuration. + + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 642. + +*** + +### addVerbToSection + +Add a verb to a specific named section. +Mirrors Python's `add_verb_to_section()`. + +#### Signature + +```typescript +addVerbToSection(sectionName: string, verbName: string, config: unknown): this +``` + +#### Parameters + + + Target section name (auto-created if missing). + + + + Verb name. + + + + Verb configuration. + + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 669. + +*** + +### asRouter + +Return this agent's Hono app for mounting as a sub-router in an AgentServer. + +#### Signature + +```typescript +asRouter(): Hono +``` + +#### Returns + +`Hono` — The Hono application instance. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2656. + +*** + +### autoMapSipUsernames + +Automatically register common SIP usernames based on this agent's +name and route. Derives cleaned variants (alphanumeric + underscore) +and registers each via `registerSipUsername()`. + +Port of Python's `auto_map_sip_usernames()`: + +- Registers a cleaned version of the agent name +- Registers a cleaned version of the route (if different from name) +- For names longer than 3 characters, also registers a vowel-stripped variant + +#### Signature + +```typescript +autoMapSipUsernames(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1058. + +*** + +### buildSwmlForRequest + +Service-side SWML-builder hook. Subclasses return a `SwmlBuilder` +to fully replace the document for this request, or `null` to fall +through to `setOnRequestCallback` or the static builder. + +This is distinct from the WebMixin `onRequest(requestData, +callbackPath)` hook on AgentBase (which mirrors Python's +`on_request -> on_swml_request` modification-merge contract). +Use this hook when you want to swap the entire SWML builder; use +`onRequest` / `onSwmlRequest` on AgentBase when you want to merge +targeted modifications into the rendered document. + +Default implementation returns `null` (no-op). + +#### Signature + +```typescript +buildSwmlForRequest( + _queryParams: Record, + _bodyParams: Record, + _headers: Record, + _callbackPath?: string +): SwmlBuilder | null +``` + +#### Parameters + + + + + + + + + +#### Returns + +`SwmlBuilder | null` — A `SwmlBuilder` whose document is sent as the response, or `null` to delegate to the next handler in the chain. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 834. + +*** + +### clearPostAiVerbs + +Remove all post-AI verbs. + +#### Signature + +```typescript +clearPostAiVerbs(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1550. + +*** + +### clearPostAnswerVerbs + +Remove all post-answer verbs. + +#### Signature + +```typescript +clearPostAnswerVerbs(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1541. + +*** + +### clearPreAnswerVerbs + +Remove all pre-answer verbs. + +#### Signature + +```typescript +clearPreAnswerVerbs(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1532. + +*** + +### clearSwaigQueryParams + +Clear all SWAIG query parameters. + +#### Signature + +```typescript +clearSwaigQueryParams(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1742. + +*** + +### constructor + +Create a ConciergeAgent for a venue with the given services, amenities, and hours. + +#### Signature + +```typescript +constructor(config: ConciergeConfig): ConciergeAgent +``` + +#### Parameters + + + Configuration including venue name, services, amenities, and optional hours/instructions/welcome. + + +#### Returns + +`ConciergeAgent` + +#### Source + +[`src/prefabs/ConciergeAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/ConciergeAgent.ts) + +Line 80. + +*** + +### createToolToken + +Mint a per-call SWAIG-function token via the agent's SessionManager. + +Mirrors Python reference `core/mixins/state_mixin.py _create_tool_token`: +delegates to `SessionManager.createToolToken` and returns an empty +string on any failure (Python catches all exceptions and returns ""). + +#### Signature + +```typescript +createToolToken(toolName: string, callId: string): string +``` + +#### Parameters + + + + + +#### Returns + +`string` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1475. + +*** + +### defineContexts + +Define or replace the contexts configuration for the AI verb. + +#### Signature + +```typescript +defineContexts( + contexts?: Record | ContextBuilder +): ContextBuilder +``` + +#### Parameters + + + An existing ContextBuilder instance or a plain object; a new ContextBuilder is created if omitted. + + +#### Returns + +`ContextBuilder` — The active ContextBuilder for further configuration. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 604. + +*** + +### defineTool + +Register a SWAIG tool (function) that the AI can invoke during a call. + +#### How this becomes a tool the model sees + +A SWAIG function is **exactly the same concept** as a "tool" in +native OpenAI / Anthropic tool calling. On every LLM turn, the SDK +renders each registered SWAIG function into the OpenAI tool schema: + +```json +{ +"type": "function", +"function": { +"name": "your_name_here", +"description": "your description text", +"parameters": { /* your JSON schema */ } +} +} +``` + +That schema goes to the model in the same API call that produces +the next assistant message. The model reads: + +- the **function `description`** to decide WHEN to call this tool +- each **parameter `description`** (inside the JSON schema) to + decide HOW to fill in each argument + +This means **descriptions are prompt engineering**, not developer +comments. A vague description is the #1 cause of "the model has the +right tool but doesn't call it" failures. + +##### Bad vs good descriptions + +```text +BAD : description: 'Lookup function' +GOOD: description: 'Look up a customer's account details by account +number. Use this BEFORE quoting any account-specific info +(balance, plan, status). Do not use for general product +questions.' + +BAD : parameters: { id: { type: 'string', description: 'the id' } } +GOOD: parameters: { account_number: { type: 'string', description: +'The customer's 8-digit account number, no dashes or spaces. +Ask the user if they don't provide it.' } } +``` + +##### Tool count matters + +LLM tool selection accuracy degrades past ~7-8 simultaneously-active +tools per call. Use Step.setFunctions() to partition tools across +steps so only the relevant subset is active at any moment. + +#### Signature + +```typescript +defineTool(opts: { ...11 fields }): this +``` + +#### Parameters + + + Tool definition including name, description, parameter schema, and handler callback. `description` and per-parameter `description` strings are LLM-facing prompt engineering. + + + + + Additional fields to pass through to the SWAIG function definition (Python `**swaig_fields` equivalent). + + + + + + + + + + + + + + + + + + + + External webhook URL; makes this an externally-hosted tool. + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1330. + +*** + +### defineTools + +Register the `check_availability` and `get_directions` SWAIG tools. + +#### Signature + +```typescript +defineTools(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/prefabs/ConciergeAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/ConciergeAgent.ts) + +Line 203. + +*** + +### defineTypedTool + +Register a SWAIG tool with a typed handler that receives named parameters +instead of the standard `(args, rawData)` convention. + +The SDK wraps the handler to unpack the args dict into positional params. +If no `parameters` schema is provided, one is inferred from the handler's +source code (parameter names and default values). + +#### Signature + +```typescript +defineTypedTool(opts: { ...9 fields }): this +``` + +#### Parameters + + + Tool definition with a typed handler function. + + + + + + + The typed handler. Receives the AI-extracted arguments as named positional parameters (in declaration order), optionally with a trailing `rawData` record, and returns a SWAIG result. Precisely typed as [TypedToolHandler](/docs/sdk-reference/reference/typescript/core/type-inference#typed-tool-handler) rather than the bare `Function` so a non-callable — or a callable that returns nothing usable — is a compile-time error. + + + + + + + + + + + + + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1373. + +*** + +### enableDebugEvents + +Enable debug event webhooks for this agent. + +#### Signature + +```typescript +enableDebugEvents(level: number = 1): this +``` + +#### Parameters + + + Debug verbosity level (defaults to 1). + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1011. + +*** + +### enableDebugRoutes + +Register a callback function that determines routing based on POST data. + +When a routing callback is registered, an endpoint at the specified path +is created in `getApp()`. The callback receives the request body and returns +Enable debug routes for testing and development. + +This is a backward-compatibility stub matching the Python SDK. +In the TypeScript SDK, debug routes (health, ready, debug\_events) +are automatically registered in `getApp()`. + +#### Signature + +```typescript +enableDebugRoutes(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1773. + +*** + +### enableMcpServer + +Expose this agent's tools as an MCP server endpoint at /mcp. +Adds a JSON-RPC 2.0 endpoint that MCP clients (Claude Desktop, other agents) can connect to. + +#### Signature + +```typescript +enableMcpServer(): this +``` + +#### Returns + +`this` — This agent instance for chaining + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1160. + +*** + +### enableSipRouting + +Enable SIP routing for this agent. + +#### Signature + +```typescript +enableSipRouting(autoMap: boolean = true, path: string = '/sip'): this +``` + +#### Parameters + + + When true, automatically map SIP usernames to the agent route (defaults to true). + + + + HTTP path for the SIP routing endpoint (defaults to '/sip'). + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1025. + +*** + +### extractSipUsername + +Extract the SIP username from a request body's call.to field. + +**Modifiers:** `static` + +#### Signature + +```typescript +extractSipUsername(requestBody: Record): string | null +``` + +#### Parameters + + + The parsed request body containing call information. + + +#### Returns + +`string | null` — The extracted SIP username, or null if not found. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1122. + +*** + +### getAllFunctions + +Snapshot of all registered SWAIG functions keyed by name. +(Python parity: `ToolRegistry.get_all_functions`.) + +#### Signature + +```typescript +getAllFunctions(): Record> +``` + +#### Returns + +`Record>` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 529. + +*** + +### getApp + +Get or lazily create the Hono HTTP application with all routes, middleware, auth, and CORS. + +#### Signature + +```typescript +getApp(): Hono +``` + +#### Returns + +`Hono` — The configured Hono application instance. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2269. + +*** + +### getBasicAuthCredentials + +Get the basic-auth credentials used by this agent. + +#### Signature + + + + ```typescript + getBasicAuthCredentials(includeSource?: false): [string, string] + ``` + + + + ```typescript + getBasicAuthCredentials( + includeSource: true + ): [string, string, "provided" | "environment" | "generated"] + ``` + + + +#### Parameters (Overload 1) + + + When true, a third element indicating the credential source is appended. + + +#### Parameters (Overload 2) + + + When true, a third element indicating the credential source is appended. + + +#### Returns (Overload 1) + +`[string, string]` — A tuple of \[username, password] or \[username, password, source]. + +#### Returns (Overload 2) + +`[string, string, "provided" | "environment" | "generated"]` — A tuple of \[username, password] or \[username, password, source]. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2794. + +*** + +### getBuilder + +Get the underlying SwmlBuilder for direct manipulation. + +#### Signature + +```typescript +getBuilder(): SwmlBuilder +``` + +#### Returns + +`SwmlBuilder` — The SwmlBuilder instance. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 632. + +*** + +### getContexts + +Get the contexts dictionary as serialised SWML, or null when no +contexts have been defined yet. + +Matches Python `PromptManager.get_contexts()` which returns the +contexts dict or `None`. + +#### Signature + +```typescript +getContexts(): Record | null +``` + +#### Returns + +`Record | null` — Contexts dict, or null when no contexts are defined. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 641. + +*** + +### getDocument + +Get the SWML document as a dictionary. +Alias for `renderSwml()` that matches Python's `get_document()` name. + +#### Signature + +```typescript +getDocument(): Record +``` + +#### Returns + +`Record` — The SWML document. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 706. + +*** + +### getFullUrl + +Get the full external URL of this agent, using the proxy base URL if available. + +#### Signature + +```typescript +getFullUrl(includeAuth: boolean = false): string +``` + +#### Parameters + + + Whether to embed basic-auth credentials in the URL (defaults to false). + + +#### Returns + +`string` — The fully-qualified URL string. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1857. + +*** + +### getFunction + +Get a registered SWAIG function entry, or undefined. +(Python parity: `ToolRegistry.get_function`.) + +#### Signature + +```typescript +getFunction(name: string): Record | SwaigFunction | undefined +``` + +#### Parameters + + + +#### Returns + +`Record | SwaigFunction | undefined` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 523. + +*** + +### getLanguageParams + +Read the per-language `params` dict for a previously-added language. + +Python parity: `get_language_params(code)`. Returns `undefined` if the +code is unknown or the language has no params set — no exception path. + +#### Signature + +```typescript +getLanguageParams(code: string): Record | undefined +``` + +#### Parameters + + + Language code as previously passed to [addLanguage](/docs/sdk-reference/reference/typescript/agents/prefabs/concierge-agent#add-language). + + +#### Returns + +`Record | undefined` — The params dict if set, `undefined` otherwise (including when the code is unknown). + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 760. + +*** + +### getMcpServers + +Get configured MCP servers (read-only copy). + +#### Signature + +```typescript +getMcpServers(): Record[] +``` + +#### Returns + +`Record[]` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1171. + +*** + +### getName + +Get the agent's display name. + +#### Signature + +```typescript +getName(): string +``` + +#### Returns + +`string` — The agent name string. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1559. + +*** + +### getPostPrompt + +Get the post-prompt text, if one has been set. + +#### Signature + +```typescript +getPostPrompt(): string | null +``` + +#### Returns + +`string | null` — The post-prompt string, or null if not configured. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 548. + +*** + +### getPrompt + +Get the fully rendered main prompt text. + +#### Signature + +```typescript +getPrompt(): string +``` + +#### Returns + +`string` — The assembled prompt string. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 520. + +*** + +### getPromptPom + +Get the raw POM (Prompt Object Model) structure as an array of section data objects, +when the agent is in POM mode and has at least one section. + +Matches Python `get_prompt()` which returns `Union[str, List[Dict]]` — a raw list when +in POM mode (via `pom.to_list()` / `pom.render_dict()`), or a string otherwise. +The TS `getPrompt()` always returns a string (rendered Markdown), so this companion +method exposes the raw POM structure for callers that need it for serialisation or +inspection (e.g. skills that inspect prompt sections). + +#### Signature + +```typescript +getPromptPom(): Record[] | null +``` + +#### Returns + +`Record[] | null` — An array of POM section data objects, or null if not in POM mode or POM is empty. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 536. + +*** + +### getRawPrompt + +Get the raw prompt text whatever `setPromptText` stored, or null when +no raw prompt has been set. + +Matches Python `PromptManager.get_raw_prompt()` which returns the raw +stored string or `None`. Use this instead of `getPrompt()` when you +need the unrendered text rather than the POM-rendered Markdown. + +#### Signature + +```typescript +getRawPrompt(): string | null +``` + +#### Returns + +`string | null` — The raw prompt string, or null if not set. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 562. + +*** + +### getRegisteredTools + +Get a summary of all registered tools with their names, descriptions, and +parameter schemas. Lifted from AgentBase so the swaig-test CLI can list +tools on a non-AgentBase SWMLService target (sidecar / standalone SWAIG +host). + +#### Signature + +```typescript +getRegisteredTools(): { description: string; name: string; parameters: Record }[] +``` + +#### Returns + +`{ description: string; name: string; parameters: Record }[]` — Array of tool descriptors. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 557. + +*** + +### getTool + +Look up a registered SwaigFunction by name. Lifted from AgentBase so +`swaig-test --exec ` works against a non-AgentBase SWMLService +target. + +#### Signature + +```typescript +getTool(name: string): SwaigFunction | undefined +``` + +#### Parameters + + + The tool name to search for. + + +#### Returns + +`SwaigFunction | undefined` — The SwaigFunction instance, or undefined if not found or not a SwaigFunction. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 581. + +*** + +### getTools + +Public access to the list of registered tools. + +In Python, `define_tools()` is public and returns `List[SWAIGFunction]`. +In TypeScript, `defineTools()` is a protected setup hook (void). This +method provides the equivalent public "get all tools" capability. + +#### Signature + +```typescript +getTools(): SwaigFunction[] +``` + +#### Returns + +`SwaigFunction[]` — Array of all registered SwaigFunction instances. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 371. + +*** + +### handleMcpRequest + +Handle an MCP JSON-RPC 2.0 request. Returns the response object. + +#### Signature + +```typescript +handleMcpRequest( + body: Record +): Promise> +``` + +#### Parameters + + + +#### Returns + +`Promise>` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1204. + +*** + +### hasFunction + +Whether a SWAIG function with the given name is registered. +(Python parity: `ToolRegistry.has_function`.) + +#### Signature + +```typescript +hasFunction(name: string): boolean +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 517. + +*** + +### hasSkill + +Check whether a skill with the given name is registered. + +Accepts a typed [SkillNameOrString](/docs/sdk-reference/reference/typescript/agents/skills/skill-name#skill-name-or-string) so built-in names autocomplete +and a typo is a compile-time error; any other string is still accepted +(custom skills / parity with Python's bare-`str` `has_skill`). + +#### Signature + +```typescript +hasSkill(skillName: SkillNameOrString): boolean +``` + +#### Parameters + + + The skill name to check. + + +#### Returns + +`boolean` — True if a skill with that name exists. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1676. + +*** + +### hasTool + +Whether a tool with the given name is registered. + +#### Signature + +```typescript +hasTool(name: string): boolean +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 511. + +*** + +### isMcpServerEnabled + +Check if MCP server endpoint is enabled. + +#### Signature + +```typescript +isMcpServerEnabled(): boolean +``` + +#### Returns + +`boolean` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1166. + +*** + +### listSkills + +List all registered skills with their names, instance IDs, and initialization status. + +#### Signature + +```typescript +listSkills(): { initialized: boolean; instanceId: string; name: string }[] +``` + +#### Returns + +`{ initialized: boolean; instanceId: string; name: string }[]` — Array of skill descriptors. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1662. + +*** + +### listToolNames + +List registered tool names in insertion order (Map preserves it). + +#### Signature + +```typescript +listToolNames(): string[] +``` + +#### Returns + +`string[]` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 545. + +*** + +### manualSetProxyUrl + +Manually set the proxy base URL used for webhook URL generation. + +#### Signature + +```typescript +manualSetProxyUrl(url: string): this +``` + +#### Parameters + + + The external-facing base URL (trailing slashes are stripped). + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1754. + +*** + +### onDebugEvent + +Lifecycle hook called when a debug event webhook is received. Override in subclasses. + +#### Signature + +```typescript +onDebugEvent(_event: Record): void | Promise +``` + +#### Parameters + + + The debug event payload. + + +#### Returns + +`void | Promise` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1970. + +*** + +### onFunctionCall + +Hook called before each SWAIG function execution. Override in subclasses. + +**Behavioral note:** In the Python SDK, `on_function_call` IS the dispatcher +— it retrieves and executes the function, returning the result. In TypeScript, +`fn.execute()` is called separately after this hook. However, if this method +returns a non-void value, it is used as the result and the default execution +is skipped, enabling dispatch interception parity with Python. + +#### Signature + +```typescript +onFunctionCall( + _name: string, + _args: Record, + _rawData: Record +): void | Record | Promise> +``` + +#### Parameters + + + Name of the function about to execute. + + + + Parsed arguments for the function. + + + + The full raw SWAIG request payload. + + +#### Returns + +`void | Record | Promise>` — Optionally a result dict to short-circuit default execution, or void/undefined to proceed normally. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1999. + +*** + +### onRequest + +Lifecycle hook called when SWML is requested. Default delegates to +[onSwmlRequest](/docs/sdk-reference/reference/typescript/agents/prefabs/concierge-agent#on-swml-request) and returns its result. Subclasses typically +override `onSwmlRequest` rather than this method. + +Matches Python `WebMixin.on_request(request_data, callback_path)`. The +cross-language API is the two-arg form; the Hono `context` argument is +a TypeScript-side extra preserved for callers that already have it but +is not part of the audited surface. + +#### Signature + +```typescript +onRequest( + requestData?: Record | null, + callbackPath?: string | null +): void | Record | Promise> +``` + +#### Parameters + + + The parsed request body. + + + + Optional callback path from the request. + + +#### Returns + +`void | Record | Promise>` — Optionally a dict of SWML modifications, or undefined for default rendering. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1935. + +*** + +### onSummary + +Process the interaction summary returned at the end of a call. +Logs structured summaries as JSON. Subclasses may override to persist or process. + +#### Signature + +```typescript +onSummary( + summary: Record | null, + _rawData: Record +): void | Promise +``` + +#### Parameters + + + + + +#### Returns + +`void | Promise` + +#### Source + +[`src/prefabs/ConciergeAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/ConciergeAgent.ts) + +Line 282. + +*** + +### onSwmlRequest + +Lifecycle hook called on every SWML request before rendering. Override in subclasses. + +May optionally return a modification dict that will be merged into the +rendered SWML document (matching Python's `Optional[dict]` return type). + +Matches Python `on_swml_request(request_data, callback_path, request)` — the third +parameter is the FastAPI `Request` in Python; here it is the raw Hono context object +so that subclasses can access query parameters (`context.req.query()`), raw request +headers (`context.req.raw.headers`), etc. + +#### Signature + +```typescript +onSwmlRequest( + _rawData: Record, + _callbackPath?: string, + _context?: any +): void | Record | Promise> +``` + +#### Parameters + + + The parsed request body. + + + + Optional callback path from the request. + + + + The raw Hono context object (c), providing access to headers and query params. + + +#### Returns + +`void | Record | Promise>` — Optionally a dict of SWML modifications, or void. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1958. + +*** + +### promptAddSection + +Add a new section to the prompt with optional body, bullets, and subsections. + +#### Signature + +```typescript +promptAddSection(title: string, opts?: { ...5 fields }): this +``` + +#### Parameters + + + Section heading. + + + + Optional section content including body text, bullet points, and subsections. + + + + + + + + + + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 467. + +*** + +### promptAddSubsection + +Add a subsection under an existing prompt section. + +#### Signature + +```typescript +promptAddSubsection( + parentTitle: string, + title: string, + opts?: { ...2 fields } +): this +``` + +#### Parameters + + + Title of the parent section. + + + + Title of the new subsection. + + + + Optional body text and bullet points for the subsection. + + + + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 502. + +*** + +### promptAddToSection + +Append content to an existing prompt section. + +#### Signature + +```typescript +promptAddToSection(title: string, opts?: { ...3 fields }): this +``` + +#### Parameters + + + Title of the section to append to. + + + + Content to add: body text, a single bullet, or multiple bullets. + + + + + + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 487. + +*** + +### promptHasSection + +Check whether a prompt section with the given title exists. + +#### Signature + +```typescript +promptHasSection(title: string): boolean +``` + +#### Parameters + + + Section title to look for. + + +#### Returns + +`boolean` — True if the section exists. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 512. + +*** + +### registerAdditionalRoutes + +Extension point: register additional Hono routes after SWMLService +mounts /health, /ready, /swaig, and the main route. AgentBase uses +this to add /post\_prompt, /check\_for\_input, /debug\_events, /mcp. + +#### Signature + +```typescript +registerAdditionalRoutes(_app: Hono): void +``` + +#### Parameters + + + +#### Returns + +`void` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 604. + +*** + +### registerRoutingCallback + +Register a callback at a specific HTTP path that decides how to route an +incoming request. + +When called, the endpoint at `path` will invoke `callback` with the parsed +request body. If `callback` returns a non-empty route string the server +responds with `{ action: "redirect", route }` so the platform can forward the +request to the right agent. If `callback` returns `null` / `undefined` the +agent's own SWML is returned instead (normal processing). + +Mirrors Python `swml_service.register_routing_callback` / +`web_mixin.register_routing_callback`. + +#### Signature + +```typescript +registerRoutingCallback(callback: RoutingCallback, path: string = '/sip'): this +``` + +#### Parameters + + + Function receiving the parsed request body and returning a route string to redirect, or null/undefined for normal processing. + + + + HTTP path where this callback endpoint is registered (default: '/sip'). + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1102. + +*** + +### registerSipUsername + +Register a SIP username to route to this agent. + +#### Signature + +```typescript +registerSipUsername(username: string): this +``` + +#### Parameters + + + The SIP username to register. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1040. + +*** + +### registerSwaigFunction + +Register a SwaigFunction instance or a raw function descriptor (DataMap). + +#### Signature + +```typescript +registerSwaigFunction(fn: Record | SwaigFunction): this +``` + +#### Parameters + + + +#### Returns + +`this` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 472. + +*** + +### registerVerbHandler + +Register a custom verb handler. +Mirrors Python's `register_verb_handler()`. + +#### Signature + +```typescript +registerVerbHandler(handler: SWMLVerbHandler): void +``` + +#### Parameters + + + The verb handler to register. + + +#### Returns + +`void` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 726. + +*** + +### removeFunction + +Remove a registered SWAIG function. Returns true when removed, +false when not found. (Python parity: +`ToolRegistry.remove_function`.) + +#### Signature + +```typescript +removeFunction(name: string): boolean +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 540. + +*** + +### removeSkill + +Remove a previously added skill by its instance ID. + +#### Signature + +```typescript +removeSkill(instanceId: string): Promise +``` + +#### Parameters + + + The unique instance ID of the skill to remove. + + +#### Returns + +`Promise` — True if the skill was found and removed. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1654. + +*** + +### removeSkillByName + +Remove a skill by its name (Python parity). + +Python's `remove_skill(skill_name)` removes by skill name. +The existing `removeSkill(instanceId)` removes by instance ID. +This method provides name-based removal for cross-SDK parity. + +#### Signature + +```typescript +removeSkillByName(skillName: string): Promise +``` + +#### Parameters + + + The skill name to remove. + + +#### Returns + +`Promise` — True if a skill with that name was found and removed. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1690. + +*** + +### renderDocument + +Render the SWML document as a JSON string. +Mirrors Python's `render_document()`. + +#### Signature + +```typescript +renderDocument(): string +``` + +#### Returns + +`string` — JSON-encoded SWML document. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 715. + +*** + +### renderSwml + +Render the complete SWML document by assembling all 5 phases: pre-answer, answer, +post-answer, AI, and post-AI verbs. + +#### Signature + +```typescript +renderSwml(callId?: string, modifications?: Record): string +``` + +#### Parameters + + + Optional call ID to use for session tokens; auto-generated if omitted. + + + + Optional dict returned from `onSwmlRequest` to merge into the AI verb config before rendering. Matches Python's `_render_swml(modifications)` semantics: `global_data` is deep-merged; all other keys override the AI config directly. + + +#### Returns + +`string` — The rendered SWML document as a JSON string. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2019. + +*** + +### resetContexts + +Remove all contexts, returning the agent to a no-contexts state. + +This is a convenience wrapper around `defineContexts().reset()`. +Use it in a dynamic config callback when you need to rebuild +contexts from scratch for a specific request. + +#### Signature + +```typescript +resetContexts(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 625. + +*** + +### resetDocument + +Reset the SWML document to an empty state. +Mirrors Python's `reset_document()`. + +#### Signature + +```typescript +resetDocument(): this +``` + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 679. + +*** + +### run + +Alias for [serve](/docs/sdk-reference/reference/typescript/agents/prefabs/concierge-agent#serve). Starts the HTTP server. + +#### Signature + +```typescript +run(opts?: { ...2 fields }): Promise +``` + +#### Parameters + + + Optional host and port overrides. + + + + + + +#### Returns + +`Promise` — A promise that resolves once the server is running. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2702. + +*** + +### runServerless + +Handle a single serverless invocation (AWS Lambda, Google Cloud Functions, Azure Functions, or CGI). + +Matches Python `run(event, context)` when executed in a serverless environment. Python's +`run()` auto-detects the platform via `get_execution_mode()` and dispatches accordingly; +in TypeScript the serverless path is an **explicit** method so that `run()` keeps its +HTTP-server semantics and callers opt in to serverless dispatch deliberately. + +Platform detection follows the same environment-variable heuristics as Python's +`ServerlessMixin`: `AWS_LAMBDA_FUNCTION_NAME` → Lambda, `K_SERVICE` → GCF, +`FUNCTIONS_WORKER_RUNTIME` → Azure, `GATEWAY_INTERFACE` → CGI. + +Usage in a Lambda handler file: + +```ts +export const handler = (event: any, context: any) => agent.runServerless(event, context); +``` + +#### Signature + +```typescript +runServerless( + event: ServerlessEvent, + context?: unknown, + platform?: "lambda" | "gcf" | "azure" | "cgi" | "auto" +): Promise +``` + +#### Parameters + + + The serverless event payload (Lambda event, GCF request body, etc.). + + + + The serverless context object (Lambda context, Azure context, etc.). + + + + Optional platform override; defaults to 'auto' (environment detection). + + +#### Returns + +`Promise` — The normalized serverless response object. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2728. + +*** + +### serve + +Start the HTTP server and begin listening for requests. + +Uses `@hono/node-server` under the hood. When run in CLI mode +(`SWAIG_CLI_MODE=true`, set automatically by `npx swaig-test`), this is a +no-op so agent config can be inspected without starting a server. + +#### Signature + +```typescript +serve(opts?: { ...2 fields }): Promise +``` + +#### Parameters + + + Optional host/port overrides. Defaults to the values provided in the constructor options or the `PORT` environment variable. + + + + + + +#### Returns + +`Promise` — A promise that resolves once the server has begun listening. + +#### Examples + +```typescript +const agent = new AgentBase({ name: 'demo', port: 3000 }); +await agent.serve(); +// Or override at runtime: +await agent.serve({ port: 8080, host: '127.0.0.1' }); +``` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2679. + +*** + +### setDynamicConfigCallback + +Set a callback invoked on each SWML request to dynamically modify an ephemeral agent copy. + +The callback receives a clone of this agent — mutations apply only to the current +request, so you can vary prompt, tools, languages, params, or global data per call +without affecting the long-lived agent instance. + +#### Signature + +```typescript +setDynamicConfigCallback(cb: DynamicConfigCallback): this +``` + +#### Parameters + + + Callback receiving `(queryParams, bodyParams, headers, agent)` where `agent` is the ephemeral `AgentBase` copy to mutate. May be async. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Examples + +```typescript +agent.setDynamicConfigCallback((query, body, headers, agent) => { + const lang = query.lang ?? 'en'; + if (lang === 'es') { + (agent as AgentBase).setPromptText('Eres un asistente útil.'); + } +}); +``` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1723. + +*** + +### setFunctionIncludes + +Replace the entire list of function includes. +Each include must have a `url` and `functions` array. + +#### Signature + +```typescript +setFunctionIncludes(includes: FunctionInclude[]): this +``` + +#### Parameters + + + Array of function include objects. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 979. + +*** + +### setGlobalData + +Merge data into the global\_data object passed into the AI configuration. + +Matches Python `set_global_data` which calls `.update()` on the internal dict — +existing keys are preserved; incoming keys overwrite on collision. Skills and +other callers can each contribute keys without clobbering one another. + +If you need to replace the entire object, assign a new agent instance or use +`Object.assign(agent.globalData, {})` to clear first. + +#### Signature + +```typescript +setGlobalData(data: Record): this +``` + +#### Parameters + + + Key-value pairs to merge into global data. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 828. + +*** + +### setInternalFillers + +Set internal fillers for native SWAIG functions. + +Internal fillers are short phrases the AI agent speaks (via TTS) while +an internal/native function is running, so the caller doesn't hear +dead air during transitions or background work. + +Supported function names (matches the SWAIGInternalFiller schema): + +hangup — when the agent is hanging up +check\_time — when checking the time +wait\_for\_user — when waiting for user input +wait\_seconds — during deliberate pauses +adjust\_response\_latency — when adjusting response timing +next\_step — transitioning between steps in prompt.contexts +change\_context — switching between contexts in prompt.contexts +get\_visual\_input — processing visual input (enable\_vision=true) +get\_ideal\_strategy — thinking (enable\_thinking=true) + +Notably NOT supported: change\_step, gather\_submit, or arbitrary +user-defined SWAIG function names. The runtime only honors fillers +for the names listed above; everything else is silently ignored at +the SWML level. This method warns at registration time if you pass +an unknown name so you catch the typo early. + +#### Signature + +```typescript +setInternalFillers( + internalFillers: Record> +): this +``` + +#### Parameters + + + Map of function name to language-keyed filler phrases. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Examples + +```typescript +agent.setInternalFillers({ + next_step: { + 'en-US': ['Moving to the next step...', 'Great, let us continue...'], + 'es': ['Pasando al siguiente paso...'] + }, + check_time: { + 'en-US': ['Let me check the time...'] + } +}); +``` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 910. + +*** + +### setLanguageParams + +Set (or replace) the per-language `params` dict on an already-added +language. Useful when language entries are built up via [addLanguage](/docs/sdk-reference/reference/typescript/agents/prefabs/concierge-agent#add-language) +first and engine-specific tuning is added later (e.g., from a config +loader). + +Python parity: `set_language_params(code, params)`. Passing an empty +object removes the `params` key entirely. Unknown codes are a no-op. + +#### Signature + +```typescript +setLanguageParams(code: string, params: Record): this +``` + +#### Parameters + + + Language code as previously passed to [addLanguage](/docs/sdk-reference/reference/typescript/agents/prefabs/concierge-agent#add-language) (e.g. `"en-US"`). + + + + Engine-specific params dict to attach. Empty object removes the key. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 737. + +*** + +### setLanguages + +Replace all configured languages with a new list. + +#### Signature + +```typescript +setLanguages(languages: LanguageConfig[]): this +``` + +#### Parameters + + + Array of language configurations. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 718. + +*** + +### setNativeFunctions + +Set the list of native SWAIG function names (built-in platform functions). + +#### Signature + +```typescript +setNativeFunctions(funcs: string[]): this +``` + +#### Parameters + + + Array of native function names. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 848. + +*** + +### setOnRequestCallback + +Set a callback invoked per-request to dynamically build SWML. +When set, the static SwmlBuilder is ignored and the callback's +returned SwmlBuilder is used instead. + +#### Signature + +```typescript +setOnRequestCallback(cb: OnRequestCallback): this +``` + +#### Parameters + + + Callback receiving query params, body params, and headers. + + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 850. + +*** + +### setParam + +Set a single AI parameter (e.g. "temperature", "top\_p"). + +#### Signature + +```typescript +setParam(key: string, value: unknown): this +``` + +#### Parameters + + + Parameter name. + + + + Parameter value. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 800. + +*** + +### setParams + +Merge multiple AI parameters into the existing params object. + +#### Signature + +```typescript +setParams(params: Record): this +``` + +#### Parameters + + + Key-value pairs to merge. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 810. + +*** + +### setPostPrompt + +Set the post-prompt text evaluated after the call ends. + +#### Signature + +```typescript +setPostPrompt(text: string): this +``` + +#### Parameters + + + The post-prompt text to use. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 456. + +*** + +### setPostPromptLlmParams + +Merge LLM-specific parameters into the post-prompt configuration. + +#### Signature + +```typescript +setPostPromptLlmParams(params: Record): this +``` + +#### Parameters + + + Key-value LLM parameters to merge. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1001. + +*** + +### setPostPromptUrl + +Override the default post-prompt webhook URL with a custom one. + +#### Signature + +```typescript +setPostPromptUrl(url: string): this +``` + +#### Parameters + + + The custom post-prompt URL. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1847. + +*** + +### setPromptLlmParams + +Merge LLM-specific parameters into the main prompt configuration (e.g. model, temperature). + +#### Signature + +```typescript +setPromptLlmParams(params: Record): this +``` + +#### Parameters + + + Key-value LLM parameters to merge. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 991. + +*** + +### setPromptPom + +Set the prompt as a POM (Prompt Object Model) dictionary. + +Replaces the current POM sections with the provided structured data. +Each entry should have `title`, and optionally `body`, `bullets`, +`numbered`, `numberedBullets`, and `subsections`. + +#### Signature + +```typescript +setPromptPom(pom: Record[]): this +``` + +#### Parameters + + + Array of POM section dictionaries. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Throws + +- Error if POM mode is not enabled (`usePom: false`). + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 577. + +*** + +### setPromptText + +Set the main system prompt text for the AI. + +#### Signature + +```typescript +setPromptText(text: string): this +``` + +#### Parameters + + + The prompt text to use. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 446. + +*** + +### setPronunciations + +Replace all pronunciation rules with a new list. + +#### Signature + +```typescript +setPronunciations(rules: PronunciationRule[]): this +``` + +#### Parameters + + + Array of pronunciation rule objects. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 786. + +*** + +### setupGracefulShutdown + +Register process signal handlers for clean Kubernetes/Docker shutdown. +Handles SIGTERM and SIGINT, waits for a timeout, then exits. + +**Modifiers:** `static` + +#### Signature + +```typescript +setupGracefulShutdown(opts?: { ...1 fields }): void +``` + +#### Parameters + + + Optional timeout in milliseconds (default 5000). + + + + +#### Returns + +`void` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2751. + +*** + +### setWebHookUrl + +Override the default SWAIG webhook URL with a custom one. + +#### Signature + +```typescript +setWebHookUrl(url: string): this +``` + +#### Parameters + + + The custom webhook URL. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1837. + +*** + +### stop + +Stop the HTTP server. +Mirrors Python's `stop()`. + +#### Signature + +```typescript +stop(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 1009. + +*** + +### swaigPreDispatch + +Extension point: invoked between argument parsing and function dispatch +on POST /swaig. Returns \[target, shortCircuit]: when shortCircuit is +non-null, it's returned directly without dispatching. AgentBase may +override to add session-token validation or ephemeral dynamic-config. + +#### Signature + +```typescript +swaigPreDispatch( + _requestData: Record, + _funcName: string +): [SWMLService, unknown] +``` + +#### Parameters + + + + + +#### Returns + +`[SWMLService, unknown]` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 592. + +*** + +### updateGlobalData + +Merge additional entries into the existing global\_data object. + +#### Signature + +```typescript +updateGlobalData(data: Record): this +``` + +#### Parameters + + + Key-value pairs to merge into global data. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 838. + +*** + +### validateBasicAuth + +Override to add custom basic-auth validation logic beyond credential matching. + +#### Signature + +```typescript +validateBasicAuth( + _username: string, + _password: string +): boolean | Promise +``` + +#### Parameters + + + The username from the request. + + + + The password from the request. + + +#### Returns + +`boolean | Promise` — True if the credentials are valid; false to reject the request. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1980. + +*** + +### validateToolToken + +Validate a tool-call token for the given function. + +Mirrors Python reference `core/mixins/state_mixin.py validate_tool_token`: + +1. Unknown function → `false`. +2. Registered but non-secure → `true` without consulting SessionManager + (non-secure tools never require a token). +3. Raw-dict descriptors (e.g. DataMap) are treated as secure, matching + Python's `isinstance(func, dict) → is_secure = True` branch. +4. Missing token on a secure tool → `false`. +5. Otherwise delegate to `SessionManager.validateToolToken`. + +Divergences from the Python reference: + +- No debug-logging branch: `AgentBase` does not expose an agent-level + debug-mode flag, so the per-call debug telemetry Python emits is + omitted. `SessionManager` still logs its own validation outcomes. +- No token-derived call-id fallback: `SessionManager.debugToken` + truncates the embedded call-id for log safety, so an extracted value + cannot be round-tripped back through `validateToolToken`. The caller + is expected to supply a non-empty `callId`; an empty one is forwarded + unchanged and the underlying validator will reject it. + +#### Signature + +```typescript +validateToolToken(functionName: string, token: string, callId: string): boolean +``` + +#### Parameters + + + + + + + +#### Returns + +`boolean` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1455. + +## Functions + +### createConciergeAgent + +Factory function that creates and returns a new ConciergeAgent. + +#### Signature + +```typescript +createConciergeAgent(config: ConciergeConfig): ConciergeAgent +``` + +#### Parameters + + + Configuration for the concierge agent. + + +#### Returns + +`ConciergeAgent` — A configured ConciergeAgent instance. + +#### Source + +[`src/prefabs/ConciergeAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/ConciergeAgent.ts) + +Line 305. + +## Source + +[`src/prefabs/ConciergeAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/ConciergeAgent.ts) + +Line 64. diff --git a/fern/products/sdk-reference/typescript/agents/prefabs/concierge-agent/index__2.mdx b/fern/products/sdk-reference/typescript/agents/prefabs/concierge-agent/index__2.mdx new file mode 100644 index 0000000000..37bf388560 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/prefabs/concierge-agent/index__2.mdx @@ -0,0 +1,70 @@ +--- +slug: "/reference/typescript/agents/prefabs/concierge-agent/index__2" +title: "ConciergeAgent" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "agents.prefabs.ConciergeAgent" + parent: "prefabs" + module: "agents.prefabs" +--- +# `ConciergeAgent` + +## Interfaces + +### ConciergeConfig + +Configuration for the [ConciergeAgent](/docs/sdk-reference/reference/typescript/agents/prefabs/concierge-agent). + +#### Signature + +```typescript +interface ConciergeConfig +``` + +#### Properties + + + Additional AgentBase options forwarded to `super()`. + + + + Dictionary of amenities, each mapping to a dict of detail keys/values. + + + + Optional hours of operation by category (e.g. `{ default: "9 AM - 5 PM" }`). + + + + Agent display name (defaults to `"concierge"`). + + + + HTTP route for this agent (defaults to `"/concierge"`). + + + + List of services offered by the venue (required). + + + + Optional special instructions appended to the agent's instruction bullets. + + + + Name of the venue or business (required). + + + + Optional custom welcome message spoken as a non-bargeable static greeting. + + +#### Source + +[`src/prefabs/ConciergeAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/ConciergeAgent.ts) + +Line 16. diff --git a/fern/products/sdk-reference/typescript/agents/prefabs/faq-bot-agent/index.mdx b/fern/products/sdk-reference/typescript/agents/prefabs/faq-bot-agent/index.mdx new file mode 100644 index 0000000000..8719613bfc --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/prefabs/faq-bot-agent/index.mdx @@ -0,0 +1,3698 @@ +--- +slug: "/reference/typescript/agents/prefabs/faq-bot-agent" +title: "FAQBotAgent" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "prefabs.FAQBotAgent" + parent: "prefabs" + module: "agents.prefabs" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/FAQBotAgent.ts" +--- +# `FAQBotAgent` + +Prefab agent that answers frequently asked questions using keyword matching with optional escalation to a live agent. + +Pass an array of `{ question, answer, keywords }` entries and the agent will +fuzzy-match inbound utterances against them. If no match crosses the confidence +threshold, the call can optionally escalate to a configured phone number. + +## Signature + +```typescript +class FAQBotAgent extends AgentBase +``` + +## Inheritance + +**Extends:** [AgentBase](/docs/sdk-reference/reference/typescript/agents/agent-base) + +## Examples + +```typescript +import { FAQBotAgent } from '@signalwire/sdk'; + +const agent = new FAQBotAgent({ + faqs: [ + { + question: 'What are your business hours?', + answer: "We're open 9 AM to 5 PM Pacific, Monday through Friday.", + keywords: ['hours', 'open', 'closed', 'time'], + }, + { + question: 'Where are you located?', + answer: 'Our headquarters are in San Francisco, California.', + keywords: ['location', 'address', 'office'], + }, + ], + escalationNumber: '+15551234567', +}); + +await agent.serve({ port: 3000 }); +``` + +## Properties + + + Unique identifier for this agent instance. + + + + + + + + Domain name for SSL. Mirrors Python's `self.domain`. + + + + The configured FAQ entries. + + + + Check if full JSON Schema validation is enabled. Mirrors Python's `@property full_validation_enabled`. + + + + Host the server binds to. + + + + Structured logger instance for this agent. Override the inherited SWMLService logger with an AgentBase-tagged one. + + + + Service display name. + + + + Public accessor for the native functions list. Python exposes `self.native_functions` as a public read/write attribute. + + + + + + The personality description used in the prompt. + + + + Public accessor for the agent's POM as a `PromptObjectModel` instance. Python parity: `agent.pom` instance attribute (agent\_base.py line 209) is a `signalwire.pom.pom.PromptObjectModel` when `use_pom=True`, or `None` otherwise. This getter returns the equivalent TypeScript `PromptObjectModel` instance — callers can use `addSection`, `findSection`, `renderMarkdown`, `renderXml`, `toJson`, `toYaml` exactly as in Python. The instance returned is a fresh snapshot built from the current `PomBuilder` state, so mutating it does not feed back into the agent's internal builder. To mutate the agent's prompt, use `promptAddSection` / `promptAddToSection` / `promptAddSubsection`. + + + + Port the server binds to. + + + + Static prompt sections: subclasses can define these declaratively. Each entry is applied via promptAddSection() in the constructor. + + + + Public accessor for the PromptManager (POM). Python exposes `self.pom` as a public attribute. This getter provides equivalent access for direct POM manipulation. + + + + HTTP route path. + + + + Schema validation utilities. Mirrors Python's `self.schema_utils`. + + + + Unified security configuration. Mirrors Python's `self.security`. + + + + Public read-only accessor for the SkillManager. Python exposes `self.skill_manager` as a public attribute. This getter provides equivalent read access. + + + + Path to SSL certificate. Mirrors Python's `self.ssl_cert_path`. + + + + Whether SSL is enabled. Mirrors Python's `self.ssl_enabled`. + + + + Path to SSL private key. Mirrors Python's `self.ssl_key_path`. + + + + Whether runner-up FAQ suggestions are appended to matches. + + + + The complete set of internal SWAIG function names that accept fillers, matching the SWAIGInternalFiller schema definition. Any name outside this set is silently ignored by the runtime — addInternalFiller / setInternalFillers warn if you pass an unknown name. + + + + + + + + Custom verb handler registry. Mirrors Python's `self.verb_registry`. + + +## Methods + +### addAnswerVerb + +Configure the answer verb (phase 2) with optional settings. + +#### Signature + +```typescript +addAnswerVerb(config?: Record): this +``` + +#### Parameters + + + Optional answer verb configuration. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1501. + +*** + +### addFunctionInclude + +Add a remote SWAIG function include reference. + +#### Signature + +```typescript +addFunctionInclude( + url: string, + functions: string[], + metaData?: Record +): this +``` + +#### Parameters + + + URL of the remote SWAIG endpoint. + + + + Function names available at that endpoint. + + + + Optional metadata to attach to the include. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 966. + +*** + +### addHint + +Add a single speech-recognition hint. + +#### Signature + +```typescript +addHint(hint: string): this +``` + +#### Parameters + + + Word or phrase to boost in speech recognition. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 653. + +*** + +### addHints + +Add multiple speech-recognition hints at once. + +#### Signature + +```typescript +addHints(hints: string[]): this +``` + +#### Parameters + + + Array of words or phrases to boost. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 663. + +*** + +### addInternalFiller + +Add internal filler phrases for a single internal function and language. + +See [setInternalFillers](/docs/sdk-reference/reference/typescript/agents/prefabs/faq-bot-agent#set-internal-fillers) for the complete list of supported +functionName values and an explanation of what fillers do. + +#### Signature + +```typescript +addInternalFiller( + functionName: string, + languageCode: string, + fillers: string[] +): this +``` + +#### Parameters + + + One of the supported internal function names (see SUPPORTED\_INTERNAL\_FILLER\_NAMES). Names outside the supported set log a warning and are ignored by the runtime. + + + + BCP-47 language code for the fillers (e.g. 'en-US'). + + + + Array of filler phrases. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 943. + +*** + +### addLanguage + +Add a supported language to the AI configuration. + +#### Signature + +```typescript +addLanguage(config: LanguageConfig): this +``` + +#### Parameters + + + Language configuration including name, code, voice, and optional fillers. `params` may be set to attach engine-specific tuning (voice stability, similarity boost, model knobs, etc.); only emitted into SWML when non-empty so existing entries stay byte-identical when no params are passed (Python ai\_config\_mixin.py `add_language`). + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 694. + +*** + +### addMcpServer + +Add an external MCP server for tool discovery and invocation. +Tools are discovered via MCP protocol at session start and added to the AI's tool list. + +#### Signature + +```typescript +addMcpServer(url: string, opts?: { ...3 fields }): this +``` + +#### Parameters + + + MCP server HTTP endpoint URL + + + + Optional configuration: headers, resources, resourceVars + + + + + + + + +#### Returns + +`this` — This agent instance for chaining + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1146. + +*** + +### addPatternHint + +Add a pattern-based speech-recognition hint with find-and-replace behavior. + +#### Signature + +```typescript +addPatternHint(opts: { ...4 fields }): this +``` + +#### Parameters + + + Pattern hint configuration with a descriptive hint label, regex pattern, replacement string, and optional case-insensitive flag. + + + + + + + + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 674. + +*** + +### addPostAiVerb + +Add a SWML verb to execute after the AI verb (phase 5). + +#### Signature + +```typescript +addPostAiVerb(verbName: string, config: Record): this +``` + +#### Parameters + + + Name of the SWML verb. + + + + Verb configuration object. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1523. + +*** + +### addPostAnswerVerb + +Add a SWML verb to execute after the answer phase but before the AI verb (phase 3). + +#### Signature + +```typescript +addPostAnswerVerb( + verbName: string, + config: number | Record +): this +``` + +#### Parameters + + + Name of the SWML verb. + + + + Verb configuration object. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1512. + +*** + +### addPreAnswerVerb + +Add a SWML verb to execute before the answer phase (phase 1). + +#### Signature + +```typescript +addPreAnswerVerb( + verbName: string, + config: number | Record +): this +``` + +#### Parameters + + + Name of the SWML verb (e.g. "play", "record"). + + + + Verb configuration object. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1491. + +*** + +### addPronunciation + +Add a pronunciation override rule for the TTS engine. + +#### Signature + +```typescript +addPronunciation(rule: PronunciationRule): this +``` + +#### Parameters + + + Pronunciation rule specifying the text to replace and its substitute. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 774. + +*** + +### addSection + +Add a new named section to the SWML document. +Mirrors Python's `add_section()`. + +#### Signature + +```typescript +addSection(sectionName: string): this +``` + +#### Parameters + + + Name of the section to create. + + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 653. + +*** + +### addSkill + +Add a skill to this agent, registering its tools, prompt sections, hints, and global data. + +#### Signature + +```typescript +addSkill(skill: SkillBase): Promise +``` + +#### Parameters + + + The skill instance to add. + + +#### Returns + +`Promise` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1570. + +*** + +### addSkillByName + +Add a skill by its registered name, looking it up in the global SkillRegistry. + +Matches Python's `add_skill(skill_name, params)` which loads skills by string +name via the SkillManager registry. Throws a `ValueError`-equivalent if the +skill name is not found in the registry. + +Accepts a typed [SkillNameOrString](/docs/sdk-reference/reference/typescript/agents/skills/skill-name#skill-name-or-string): one of the built-in +`SkillName` values (autocompleted, with a typo caught at compile +time) or any other string for custom / third-party skills. The value is +forwarded to the registry unchanged — the typing is erased at runtime, so +this matches Python's bare-`str` `add_skill(skill_name, params)`. + +#### Signature + +```typescript +addSkillByName( + skillName: SkillNameOrString, + params?: SkillConfig +): Promise +``` + +#### Parameters + + + The name the skill was registered under in the SkillRegistry. + + + + Optional configuration parameters forwarded to the skill factory. + + +#### Returns + +`Promise` — This agent instance for chaining. + +#### Throws + +- Error if no skill with the given name is registered. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1641. + +*** + +### addSwaigQueryParams + +Add extra query parameters appended to all SWAIG webhook URLs. + +#### Signature + +```typescript +addSwaigQueryParams(params: Record): this +``` + +#### Parameters + + + Key-value pairs to append as query parameters. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1733. + +*** + +### addVerb + +Add a verb to the SWML document. + +#### Signature + +```typescript +addVerb(name: string, config: unknown): this +``` + +#### Parameters + + + Verb name (e.g., 'answer', 'play', 'hangup'). + + + + Verb configuration. + + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 642. + +*** + +### addVerbToSection + +Add a verb to a specific named section. +Mirrors Python's `add_verb_to_section()`. + +#### Signature + +```typescript +addVerbToSection(sectionName: string, verbName: string, config: unknown): this +``` + +#### Parameters + + + Target section name (auto-created if missing). + + + + Verb name. + + + + Verb configuration. + + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 669. + +*** + +### asRouter + +Return this agent's Hono app for mounting as a sub-router in an AgentServer. + +#### Signature + +```typescript +asRouter(): Hono +``` + +#### Returns + +`Hono` — The Hono application instance. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2656. + +*** + +### autoMapSipUsernames + +Automatically register common SIP usernames based on this agent's +name and route. Derives cleaned variants (alphanumeric + underscore) +and registers each via `registerSipUsername()`. + +Port of Python's `auto_map_sip_usernames()`: + +- Registers a cleaned version of the agent name +- Registers a cleaned version of the route (if different from name) +- For names longer than 3 characters, also registers a vowel-stripped variant + +#### Signature + +```typescript +autoMapSipUsernames(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1058. + +*** + +### buildSwmlForRequest + +Service-side SWML-builder hook. Subclasses return a `SwmlBuilder` +to fully replace the document for this request, or `null` to fall +through to `setOnRequestCallback` or the static builder. + +This is distinct from the WebMixin `onRequest(requestData, +callbackPath)` hook on AgentBase (which mirrors Python's +`on_request -> on_swml_request` modification-merge contract). +Use this hook when you want to swap the entire SWML builder; use +`onRequest` / `onSwmlRequest` on AgentBase when you want to merge +targeted modifications into the rendered document. + +Default implementation returns `null` (no-op). + +#### Signature + +```typescript +buildSwmlForRequest( + _queryParams: Record, + _bodyParams: Record, + _headers: Record, + _callbackPath?: string +): SwmlBuilder | null +``` + +#### Parameters + + + + + + + + + +#### Returns + +`SwmlBuilder | null` — A `SwmlBuilder` whose document is sent as the response, or `null` to delegate to the next handler in the chain. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 834. + +*** + +### clearPostAiVerbs + +Remove all post-AI verbs. + +#### Signature + +```typescript +clearPostAiVerbs(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1550. + +*** + +### clearPostAnswerVerbs + +Remove all post-answer verbs. + +#### Signature + +```typescript +clearPostAnswerVerbs(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1541. + +*** + +### clearPreAnswerVerbs + +Remove all pre-answer verbs. + +#### Signature + +```typescript +clearPreAnswerVerbs(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1532. + +*** + +### clearSwaigQueryParams + +Clear all SWAIG query parameters. + +#### Signature + +```typescript +clearSwaigQueryParams(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1742. + +*** + +### constructor + +Create a FAQBotAgent with the specified FAQ entries and matching threshold. + +#### Signature + +```typescript +constructor(config: FAQBotConfig): FAQBotAgent +``` + +#### Parameters + + + Configuration including FAQ entries, threshold, and escalation settings. + + +#### Returns + +`FAQBotAgent` + +#### Source + +[`src/prefabs/FAQBotAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/FAQBotAgent.ts) + +Line 98. + +*** + +### createToolToken + +Mint a per-call SWAIG-function token via the agent's SessionManager. + +Mirrors Python reference `core/mixins/state_mixin.py _create_tool_token`: +delegates to `SessionManager.createToolToken` and returns an empty +string on any failure (Python catches all exceptions and returns ""). + +#### Signature + +```typescript +createToolToken(toolName: string, callId: string): string +``` + +#### Parameters + + + + + +#### Returns + +`string` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1475. + +*** + +### defineContexts + +Define or replace the contexts configuration for the AI verb. + +#### Signature + +```typescript +defineContexts( + contexts?: Record | ContextBuilder +): ContextBuilder +``` + +#### Parameters + + + An existing ContextBuilder instance or a plain object; a new ContextBuilder is created if omitted. + + +#### Returns + +`ContextBuilder` — The active ContextBuilder for further configuration. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 604. + +*** + +### defineTool + +Register a SWAIG tool (function) that the AI can invoke during a call. + +#### How this becomes a tool the model sees + +A SWAIG function is **exactly the same concept** as a "tool" in +native OpenAI / Anthropic tool calling. On every LLM turn, the SDK +renders each registered SWAIG function into the OpenAI tool schema: + +```json +{ +"type": "function", +"function": { +"name": "your_name_here", +"description": "your description text", +"parameters": { /* your JSON schema */ } +} +} +``` + +That schema goes to the model in the same API call that produces +the next assistant message. The model reads: + +- the **function `description`** to decide WHEN to call this tool +- each **parameter `description`** (inside the JSON schema) to + decide HOW to fill in each argument + +This means **descriptions are prompt engineering**, not developer +comments. A vague description is the #1 cause of "the model has the +right tool but doesn't call it" failures. + +##### Bad vs good descriptions + +```text +BAD : description: 'Lookup function' +GOOD: description: 'Look up a customer's account details by account +number. Use this BEFORE quoting any account-specific info +(balance, plan, status). Do not use for general product +questions.' + +BAD : parameters: { id: { type: 'string', description: 'the id' } } +GOOD: parameters: { account_number: { type: 'string', description: +'The customer's 8-digit account number, no dashes or spaces. +Ask the user if they don't provide it.' } } +``` + +##### Tool count matters + +LLM tool selection accuracy degrades past ~7-8 simultaneously-active +tools per call. Use Step.setFunctions() to partition tools across +steps so only the relevant subset is active at any moment. + +#### Signature + +```typescript +defineTool(opts: { ...11 fields }): this +``` + +#### Parameters + + + Tool definition including name, description, parameter schema, and handler callback. `description` and per-parameter `description` strings are LLM-facing prompt engineering. + + + + + Additional fields to pass through to the SWAIG function definition (Python `**swaig_fields` equivalent). + + + + + + + + + + + + + + + + + + + + External webhook URL; makes this an externally-hosted tool. + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1330. + +*** + +### defineTools + +Register the search\_faqs and optional escalate SWAIG tools. + +#### Signature + +```typescript +defineTools(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/prefabs/FAQBotAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/FAQBotAgent.ts) + +Line 285. + +*** + +### defineTypedTool + +Register a SWAIG tool with a typed handler that receives named parameters +instead of the standard `(args, rawData)` convention. + +The SDK wraps the handler to unpack the args dict into positional params. +If no `parameters` schema is provided, one is inferred from the handler's +source code (parameter names and default values). + +#### Signature + +```typescript +defineTypedTool(opts: { ...9 fields }): this +``` + +#### Parameters + + + Tool definition with a typed handler function. + + + + + + + The typed handler. Receives the AI-extracted arguments as named positional parameters (in declaration order), optionally with a trailing `rawData` record, and returns a SWAIG result. Precisely typed as [TypedToolHandler](/docs/sdk-reference/reference/typescript/core/type-inference#typed-tool-handler) rather than the bare `Function` so a non-callable — or a callable that returns nothing usable — is a compile-time error. + + + + + + + + + + + + + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1373. + +*** + +### enableDebugEvents + +Enable debug event webhooks for this agent. + +#### Signature + +```typescript +enableDebugEvents(level: number = 1): this +``` + +#### Parameters + + + Debug verbosity level (defaults to 1). + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1011. + +*** + +### enableDebugRoutes + +Register a callback function that determines routing based on POST data. + +When a routing callback is registered, an endpoint at the specified path +is created in `getApp()`. The callback receives the request body and returns +Enable debug routes for testing and development. + +This is a backward-compatibility stub matching the Python SDK. +In the TypeScript SDK, debug routes (health, ready, debug\_events) +are automatically registered in `getApp()`. + +#### Signature + +```typescript +enableDebugRoutes(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1773. + +*** + +### enableMcpServer + +Expose this agent's tools as an MCP server endpoint at /mcp. +Adds a JSON-RPC 2.0 endpoint that MCP clients (Claude Desktop, other agents) can connect to. + +#### Signature + +```typescript +enableMcpServer(): this +``` + +#### Returns + +`this` — This agent instance for chaining + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1160. + +*** + +### enableSipRouting + +Enable SIP routing for this agent. + +#### Signature + +```typescript +enableSipRouting(autoMap: boolean = true, path: string = '/sip'): this +``` + +#### Parameters + + + When true, automatically map SIP usernames to the agent route (defaults to true). + + + + HTTP path for the SIP routing endpoint (defaults to '/sip'). + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1025. + +*** + +### extractSipUsername + +Extract the SIP username from a request body's call.to field. + +**Modifiers:** `static` + +#### Signature + +```typescript +extractSipUsername(requestBody: Record): string | null +``` + +#### Parameters + + + The parsed request body containing call information. + + +#### Returns + +`string | null` — The extracted SIP username, or null if not found. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1122. + +*** + +### getAllFunctions + +Snapshot of all registered SWAIG functions keyed by name. +(Python parity: `ToolRegistry.get_all_functions`.) + +#### Signature + +```typescript +getAllFunctions(): Record> +``` + +#### Returns + +`Record>` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 529. + +*** + +### getApp + +Get or lazily create the Hono HTTP application with all routes, middleware, auth, and CORS. + +#### Signature + +```typescript +getApp(): Hono +``` + +#### Returns + +`Hono` — The configured Hono application instance. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2269. + +*** + +### getBasicAuthCredentials + +Get the basic-auth credentials used by this agent. + +#### Signature + + + + ```typescript + getBasicAuthCredentials(includeSource?: false): [string, string] + ``` + + + + ```typescript + getBasicAuthCredentials( + includeSource: true + ): [string, string, "provided" | "environment" | "generated"] + ``` + + + +#### Parameters (Overload 1) + + + When true, a third element indicating the credential source is appended. + + +#### Parameters (Overload 2) + + + When true, a third element indicating the credential source is appended. + + +#### Returns (Overload 1) + +`[string, string]` — A tuple of \[username, password] or \[username, password, source]. + +#### Returns (Overload 2) + +`[string, string, "provided" | "environment" | "generated"]` — A tuple of \[username, password] or \[username, password, source]. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2794. + +*** + +### getBuilder + +Get the underlying SwmlBuilder for direct manipulation. + +#### Signature + +```typescript +getBuilder(): SwmlBuilder +``` + +#### Returns + +`SwmlBuilder` — The SwmlBuilder instance. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 632. + +*** + +### getContexts + +Get the contexts dictionary as serialised SWML, or null when no +contexts have been defined yet. + +Matches Python `PromptManager.get_contexts()` which returns the +contexts dict or `None`. + +#### Signature + +```typescript +getContexts(): Record | null +``` + +#### Returns + +`Record | null` — Contexts dict, or null when no contexts are defined. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 641. + +*** + +### getDocument + +Get the SWML document as a dictionary. +Alias for `renderSwml()` that matches Python's `get_document()` name. + +#### Signature + +```typescript +getDocument(): Record +``` + +#### Returns + +`Record` — The SWML document. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 706. + +*** + +### getFullUrl + +Get the full external URL of this agent, using the proxy base URL if available. + +#### Signature + +```typescript +getFullUrl(includeAuth: boolean = false): string +``` + +#### Parameters + + + Whether to embed basic-auth credentials in the URL (defaults to false). + + +#### Returns + +`string` — The fully-qualified URL string. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1857. + +*** + +### getFunction + +Get a registered SWAIG function entry, or undefined. +(Python parity: `ToolRegistry.get_function`.) + +#### Signature + +```typescript +getFunction(name: string): Record | SwaigFunction | undefined +``` + +#### Parameters + + + +#### Returns + +`Record | SwaigFunction | undefined` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 523. + +*** + +### getLanguageParams + +Read the per-language `params` dict for a previously-added language. + +Python parity: `get_language_params(code)`. Returns `undefined` if the +code is unknown or the language has no params set — no exception path. + +#### Signature + +```typescript +getLanguageParams(code: string): Record | undefined +``` + +#### Parameters + + + Language code as previously passed to [addLanguage](/docs/sdk-reference/reference/typescript/agents/prefabs/faq-bot-agent#add-language). + + +#### Returns + +`Record | undefined` — The params dict if set, `undefined` otherwise (including when the code is unknown). + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 760. + +*** + +### getMcpServers + +Get configured MCP servers (read-only copy). + +#### Signature + +```typescript +getMcpServers(): Record[] +``` + +#### Returns + +`Record[]` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1171. + +*** + +### getName + +Get the agent's display name. + +#### Signature + +```typescript +getName(): string +``` + +#### Returns + +`string` — The agent name string. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1559. + +*** + +### getPostPrompt + +Get the post-prompt text, if one has been set. + +#### Signature + +```typescript +getPostPrompt(): string | null +``` + +#### Returns + +`string | null` — The post-prompt string, or null if not configured. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 548. + +*** + +### getPrompt + +Get the fully rendered main prompt text. + +#### Signature + +```typescript +getPrompt(): string +``` + +#### Returns + +`string` — The assembled prompt string. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 520. + +*** + +### getPromptPom + +Get the raw POM (Prompt Object Model) structure as an array of section data objects, +when the agent is in POM mode and has at least one section. + +Matches Python `get_prompt()` which returns `Union[str, List[Dict]]` — a raw list when +in POM mode (via `pom.to_list()` / `pom.render_dict()`), or a string otherwise. +The TS `getPrompt()` always returns a string (rendered Markdown), so this companion +method exposes the raw POM structure for callers that need it for serialisation or +inspection (e.g. skills that inspect prompt sections). + +#### Signature + +```typescript +getPromptPom(): Record[] | null +``` + +#### Returns + +`Record[] | null` — An array of POM section data objects, or null if not in POM mode or POM is empty. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 536. + +*** + +### getRawPrompt + +Get the raw prompt text whatever `setPromptText` stored, or null when +no raw prompt has been set. + +Matches Python `PromptManager.get_raw_prompt()` which returns the raw +stored string or `None`. Use this instead of `getPrompt()` when you +need the unrendered text rather than the POM-rendered Markdown. + +#### Signature + +```typescript +getRawPrompt(): string | null +``` + +#### Returns + +`string | null` — The raw prompt string, or null if not set. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 562. + +*** + +### getRegisteredTools + +Get a summary of all registered tools with their names, descriptions, and +parameter schemas. Lifted from AgentBase so the swaig-test CLI can list +tools on a non-AgentBase SWMLService target (sidecar / standalone SWAIG +host). + +#### Signature + +```typescript +getRegisteredTools(): { description: string; name: string; parameters: Record }[] +``` + +#### Returns + +`{ description: string; name: string; parameters: Record }[]` — Array of tool descriptors. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 557. + +*** + +### getTool + +Look up a registered SwaigFunction by name. Lifted from AgentBase so +`swaig-test --exec ` works against a non-AgentBase SWMLService +target. + +#### Signature + +```typescript +getTool(name: string): SwaigFunction | undefined +``` + +#### Parameters + + + The tool name to search for. + + +#### Returns + +`SwaigFunction | undefined` — The SwaigFunction instance, or undefined if not found or not a SwaigFunction. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 581. + +*** + +### getTools + +Public access to the list of registered tools. + +In Python, `define_tools()` is public and returns `List[SWAIGFunction]`. +In TypeScript, `defineTools()` is a protected setup hook (void). This +method provides the equivalent public "get all tools" capability. + +#### Signature + +```typescript +getTools(): SwaigFunction[] +``` + +#### Returns + +`SwaigFunction[]` — Array of all registered SwaigFunction instances. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 371. + +*** + +### handleMcpRequest + +Handle an MCP JSON-RPC 2.0 request. Returns the response object. + +#### Signature + +```typescript +handleMcpRequest( + body: Record +): Promise> +``` + +#### Parameters + + + +#### Returns + +`Promise>` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1204. + +*** + +### hasFunction + +Whether a SWAIG function with the given name is registered. +(Python parity: `ToolRegistry.has_function`.) + +#### Signature + +```typescript +hasFunction(name: string): boolean +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 517. + +*** + +### hasSkill + +Check whether a skill with the given name is registered. + +Accepts a typed [SkillNameOrString](/docs/sdk-reference/reference/typescript/agents/skills/skill-name#skill-name-or-string) so built-in names autocomplete +and a typo is a compile-time error; any other string is still accepted +(custom skills / parity with Python's bare-`str` `has_skill`). + +#### Signature + +```typescript +hasSkill(skillName: SkillNameOrString): boolean +``` + +#### Parameters + + + The skill name to check. + + +#### Returns + +`boolean` — True if a skill with that name exists. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1676. + +*** + +### hasTool + +Whether a tool with the given name is registered. + +#### Signature + +```typescript +hasTool(name: string): boolean +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 511. + +*** + +### isMcpServerEnabled + +Check if MCP server endpoint is enabled. + +#### Signature + +```typescript +isMcpServerEnabled(): boolean +``` + +#### Returns + +`boolean` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1166. + +*** + +### listSkills + +List all registered skills with their names, instance IDs, and initialization status. + +#### Signature + +```typescript +listSkills(): { initialized: boolean; instanceId: string; name: string }[] +``` + +#### Returns + +`{ initialized: boolean; instanceId: string; name: string }[]` — Array of skill descriptors. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1662. + +*** + +### listToolNames + +List registered tool names in insertion order (Map preserves it). + +#### Signature + +```typescript +listToolNames(): string[] +``` + +#### Returns + +`string[]` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 545. + +*** + +### manualSetProxyUrl + +Manually set the proxy base URL used for webhook URL generation. + +#### Signature + +```typescript +manualSetProxyUrl(url: string): this +``` + +#### Parameters + + + The external-facing base URL (trailing slashes are stripped). + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1754. + +*** + +### onDebugEvent + +Lifecycle hook called when a debug event webhook is received. Override in subclasses. + +#### Signature + +```typescript +onDebugEvent(_event: Record): void | Promise +``` + +#### Parameters + + + The debug event payload. + + +#### Returns + +`void | Promise` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1970. + +*** + +### onFunctionCall + +Hook called before each SWAIG function execution. Override in subclasses. + +**Behavioral note:** In the Python SDK, `on_function_call` IS the dispatcher +— it retrieves and executes the function, returning the result. In TypeScript, +`fn.execute()` is called separately after this hook. However, if this method +returns a non-void value, it is used as the result and the default execution +is skipped, enabling dispatch interception parity with Python. + +#### Signature + +```typescript +onFunctionCall( + _name: string, + _args: Record, + _rawData: Record +): void | Record | Promise> +``` + +#### Parameters + + + Name of the function about to execute. + + + + Parsed arguments for the function. + + + + The full raw SWAIG request payload. + + +#### Returns + +`void | Record | Promise>` — Optionally a result dict to short-circuit default execution, or void/undefined to proceed normally. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1999. + +*** + +### onRequest + +Lifecycle hook called when SWML is requested. Default delegates to +[onSwmlRequest](/docs/sdk-reference/reference/typescript/agents/prefabs/faq-bot-agent#on-swml-request) and returns its result. Subclasses typically +override `onSwmlRequest` rather than this method. + +Matches Python `WebMixin.on_request(request_data, callback_path)`. The +cross-language API is the two-arg form; the Hono `context` argument is +a TypeScript-side extra preserved for callers that already have it but +is not part of the audited surface. + +#### Signature + +```typescript +onRequest( + requestData?: Record | null, + callbackPath?: string | null +): void | Record | Promise> +``` + +#### Parameters + + + The parsed request body. + + + + Optional callback path from the request. + + +#### Returns + +`void | Record | Promise>` — Optionally a dict of SWML modifications, or undefined for default rendering. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1935. + +*** + +### onSummary + +Process the interaction summary returned at the end of a call. +Logs structured summaries as JSON. Subclasses may override to persist or process. + +#### Signature + +```typescript +onSummary( + summary: Record | null, + _rawData: Record +): void | Promise +``` + +#### Parameters + + + + + +#### Returns + +`void | Promise` + +#### Source + +[`src/prefabs/FAQBotAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/FAQBotAgent.ts) + +Line 376. + +*** + +### onSwmlRequest + +Lifecycle hook called on every SWML request before rendering. Override in subclasses. + +May optionally return a modification dict that will be merged into the +rendered SWML document (matching Python's `Optional[dict]` return type). + +Matches Python `on_swml_request(request_data, callback_path, request)` — the third +parameter is the FastAPI `Request` in Python; here it is the raw Hono context object +so that subclasses can access query parameters (`context.req.query()`), raw request +headers (`context.req.raw.headers`), etc. + +#### Signature + +```typescript +onSwmlRequest( + _rawData: Record, + _callbackPath?: string, + _context?: any +): void | Record | Promise> +``` + +#### Parameters + + + The parsed request body. + + + + Optional callback path from the request. + + + + The raw Hono context object (c), providing access to headers and query params. + + +#### Returns + +`void | Record | Promise>` — Optionally a dict of SWML modifications, or void. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1958. + +*** + +### promptAddSection + +Add a new section to the prompt with optional body, bullets, and subsections. + +#### Signature + +```typescript +promptAddSection(title: string, opts?: { ...5 fields }): this +``` + +#### Parameters + + + Section heading. + + + + Optional section content including body text, bullet points, and subsections. + + + + + + + + + + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 467. + +*** + +### promptAddSubsection + +Add a subsection under an existing prompt section. + +#### Signature + +```typescript +promptAddSubsection( + parentTitle: string, + title: string, + opts?: { ...2 fields } +): this +``` + +#### Parameters + + + Title of the parent section. + + + + Title of the new subsection. + + + + Optional body text and bullet points for the subsection. + + + + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 502. + +*** + +### promptAddToSection + +Append content to an existing prompt section. + +#### Signature + +```typescript +promptAddToSection(title: string, opts?: { ...3 fields }): this +``` + +#### Parameters + + + Title of the section to append to. + + + + Content to add: body text, a single bullet, or multiple bullets. + + + + + + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 487. + +*** + +### promptHasSection + +Check whether a prompt section with the given title exists. + +#### Signature + +```typescript +promptHasSection(title: string): boolean +``` + +#### Parameters + + + Section title to look for. + + +#### Returns + +`boolean` — True if the section exists. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 512. + +*** + +### registerAdditionalRoutes + +Extension point: register additional Hono routes after SWMLService +mounts /health, /ready, /swaig, and the main route. AgentBase uses +this to add /post\_prompt, /check\_for\_input, /debug\_events, /mcp. + +#### Signature + +```typescript +registerAdditionalRoutes(_app: Hono): void +``` + +#### Parameters + + + +#### Returns + +`void` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 604. + +*** + +### registerRoutingCallback + +Register a callback at a specific HTTP path that decides how to route an +incoming request. + +When called, the endpoint at `path` will invoke `callback` with the parsed +request body. If `callback` returns a non-empty route string the server +responds with `{ action: "redirect", route }` so the platform can forward the +request to the right agent. If `callback` returns `null` / `undefined` the +agent's own SWML is returned instead (normal processing). + +Mirrors Python `swml_service.register_routing_callback` / +`web_mixin.register_routing_callback`. + +#### Signature + +```typescript +registerRoutingCallback(callback: RoutingCallback, path: string = '/sip'): this +``` + +#### Parameters + + + Function receiving the parsed request body and returning a route string to redirect, or null/undefined for normal processing. + + + + HTTP path where this callback endpoint is registered (default: '/sip'). + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1102. + +*** + +### registerSipUsername + +Register a SIP username to route to this agent. + +#### Signature + +```typescript +registerSipUsername(username: string): this +``` + +#### Parameters + + + The SIP username to register. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1040. + +*** + +### registerSwaigFunction + +Register a SwaigFunction instance or a raw function descriptor (DataMap). + +#### Signature + +```typescript +registerSwaigFunction(fn: Record | SwaigFunction): this +``` + +#### Parameters + + + +#### Returns + +`this` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 472. + +*** + +### registerVerbHandler + +Register a custom verb handler. +Mirrors Python's `register_verb_handler()`. + +#### Signature + +```typescript +registerVerbHandler(handler: SWMLVerbHandler): void +``` + +#### Parameters + + + The verb handler to register. + + +#### Returns + +`void` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 726. + +*** + +### removeFunction + +Remove a registered SWAIG function. Returns true when removed, +false when not found. (Python parity: +`ToolRegistry.remove_function`.) + +#### Signature + +```typescript +removeFunction(name: string): boolean +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 540. + +*** + +### removeSkill + +Remove a previously added skill by its instance ID. + +#### Signature + +```typescript +removeSkill(instanceId: string): Promise +``` + +#### Parameters + + + The unique instance ID of the skill to remove. + + +#### Returns + +`Promise` — True if the skill was found and removed. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1654. + +*** + +### removeSkillByName + +Remove a skill by its name (Python parity). + +Python's `remove_skill(skill_name)` removes by skill name. +The existing `removeSkill(instanceId)` removes by instance ID. +This method provides name-based removal for cross-SDK parity. + +#### Signature + +```typescript +removeSkillByName(skillName: string): Promise +``` + +#### Parameters + + + The skill name to remove. + + +#### Returns + +`Promise` — True if a skill with that name was found and removed. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1690. + +*** + +### renderDocument + +Render the SWML document as a JSON string. +Mirrors Python's `render_document()`. + +#### Signature + +```typescript +renderDocument(): string +``` + +#### Returns + +`string` — JSON-encoded SWML document. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 715. + +*** + +### renderSwml + +Render the complete SWML document by assembling all 5 phases: pre-answer, answer, +post-answer, AI, and post-AI verbs. + +#### Signature + +```typescript +renderSwml(callId?: string, modifications?: Record): string +``` + +#### Parameters + + + Optional call ID to use for session tokens; auto-generated if omitted. + + + + Optional dict returned from `onSwmlRequest` to merge into the AI verb config before rendering. Matches Python's `_render_swml(modifications)` semantics: `global_data` is deep-merged; all other keys override the AI config directly. + + +#### Returns + +`string` — The rendered SWML document as a JSON string. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2019. + +*** + +### resetContexts + +Remove all contexts, returning the agent to a no-contexts state. + +This is a convenience wrapper around `defineContexts().reset()`. +Use it in a dynamic config callback when you need to rebuild +contexts from scratch for a specific request. + +#### Signature + +```typescript +resetContexts(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 625. + +*** + +### resetDocument + +Reset the SWML document to an empty state. +Mirrors Python's `reset_document()`. + +#### Signature + +```typescript +resetDocument(): this +``` + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 679. + +*** + +### run + +Alias for [serve](/docs/sdk-reference/reference/typescript/agents/prefabs/faq-bot-agent#serve). Starts the HTTP server. + +#### Signature + +```typescript +run(opts?: { ...2 fields }): Promise +``` + +#### Parameters + + + Optional host and port overrides. + + + + + + +#### Returns + +`Promise` — A promise that resolves once the server is running. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2702. + +*** + +### runServerless + +Handle a single serverless invocation (AWS Lambda, Google Cloud Functions, Azure Functions, or CGI). + +Matches Python `run(event, context)` when executed in a serverless environment. Python's +`run()` auto-detects the platform via `get_execution_mode()` and dispatches accordingly; +in TypeScript the serverless path is an **explicit** method so that `run()` keeps its +HTTP-server semantics and callers opt in to serverless dispatch deliberately. + +Platform detection follows the same environment-variable heuristics as Python's +`ServerlessMixin`: `AWS_LAMBDA_FUNCTION_NAME` → Lambda, `K_SERVICE` → GCF, +`FUNCTIONS_WORKER_RUNTIME` → Azure, `GATEWAY_INTERFACE` → CGI. + +Usage in a Lambda handler file: + +```ts +export const handler = (event: any, context: any) => agent.runServerless(event, context); +``` + +#### Signature + +```typescript +runServerless( + event: ServerlessEvent, + context?: unknown, + platform?: "lambda" | "gcf" | "azure" | "cgi" | "auto" +): Promise +``` + +#### Parameters + + + The serverless event payload (Lambda event, GCF request body, etc.). + + + + The serverless context object (Lambda context, Azure context, etc.). + + + + Optional platform override; defaults to 'auto' (environment detection). + + +#### Returns + +`Promise` — The normalized serverless response object. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2728. + +*** + +### serve + +Start the HTTP server and begin listening for requests. + +Uses `@hono/node-server` under the hood. When run in CLI mode +(`SWAIG_CLI_MODE=true`, set automatically by `npx swaig-test`), this is a +no-op so agent config can be inspected without starting a server. + +#### Signature + +```typescript +serve(opts?: { ...2 fields }): Promise +``` + +#### Parameters + + + Optional host/port overrides. Defaults to the values provided in the constructor options or the `PORT` environment variable. + + + + + + +#### Returns + +`Promise` — A promise that resolves once the server has begun listening. + +#### Examples + +```typescript +const agent = new AgentBase({ name: 'demo', port: 3000 }); +await agent.serve(); +// Or override at runtime: +await agent.serve({ port: 8080, host: '127.0.0.1' }); +``` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2679. + +*** + +### setDynamicConfigCallback + +Set a callback invoked on each SWML request to dynamically modify an ephemeral agent copy. + +The callback receives a clone of this agent — mutations apply only to the current +request, so you can vary prompt, tools, languages, params, or global data per call +without affecting the long-lived agent instance. + +#### Signature + +```typescript +setDynamicConfigCallback(cb: DynamicConfigCallback): this +``` + +#### Parameters + + + Callback receiving `(queryParams, bodyParams, headers, agent)` where `agent` is the ephemeral `AgentBase` copy to mutate. May be async. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Examples + +```typescript +agent.setDynamicConfigCallback((query, body, headers, agent) => { + const lang = query.lang ?? 'en'; + if (lang === 'es') { + (agent as AgentBase).setPromptText('Eres un asistente útil.'); + } +}); +``` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1723. + +*** + +### setFunctionIncludes + +Replace the entire list of function includes. +Each include must have a `url` and `functions` array. + +#### Signature + +```typescript +setFunctionIncludes(includes: FunctionInclude[]): this +``` + +#### Parameters + + + Array of function include objects. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 979. + +*** + +### setGlobalData + +Merge data into the global\_data object passed into the AI configuration. + +Matches Python `set_global_data` which calls `.update()` on the internal dict — +existing keys are preserved; incoming keys overwrite on collision. Skills and +other callers can each contribute keys without clobbering one another. + +If you need to replace the entire object, assign a new agent instance or use +`Object.assign(agent.globalData, {})` to clear first. + +#### Signature + +```typescript +setGlobalData(data: Record): this +``` + +#### Parameters + + + Key-value pairs to merge into global data. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 828. + +*** + +### setInternalFillers + +Set internal fillers for native SWAIG functions. + +Internal fillers are short phrases the AI agent speaks (via TTS) while +an internal/native function is running, so the caller doesn't hear +dead air during transitions or background work. + +Supported function names (matches the SWAIGInternalFiller schema): + +hangup — when the agent is hanging up +check\_time — when checking the time +wait\_for\_user — when waiting for user input +wait\_seconds — during deliberate pauses +adjust\_response\_latency — when adjusting response timing +next\_step — transitioning between steps in prompt.contexts +change\_context — switching between contexts in prompt.contexts +get\_visual\_input — processing visual input (enable\_vision=true) +get\_ideal\_strategy — thinking (enable\_thinking=true) + +Notably NOT supported: change\_step, gather\_submit, or arbitrary +user-defined SWAIG function names. The runtime only honors fillers +for the names listed above; everything else is silently ignored at +the SWML level. This method warns at registration time if you pass +an unknown name so you catch the typo early. + +#### Signature + +```typescript +setInternalFillers( + internalFillers: Record> +): this +``` + +#### Parameters + + + Map of function name to language-keyed filler phrases. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Examples + +```typescript +agent.setInternalFillers({ + next_step: { + 'en-US': ['Moving to the next step...', 'Great, let us continue...'], + 'es': ['Pasando al siguiente paso...'] + }, + check_time: { + 'en-US': ['Let me check the time...'] + } +}); +``` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 910. + +*** + +### setLanguageParams + +Set (or replace) the per-language `params` dict on an already-added +language. Useful when language entries are built up via [addLanguage](/docs/sdk-reference/reference/typescript/agents/prefabs/faq-bot-agent#add-language) +first and engine-specific tuning is added later (e.g., from a config +loader). + +Python parity: `set_language_params(code, params)`. Passing an empty +object removes the `params` key entirely. Unknown codes are a no-op. + +#### Signature + +```typescript +setLanguageParams(code: string, params: Record): this +``` + +#### Parameters + + + Language code as previously passed to [addLanguage](/docs/sdk-reference/reference/typescript/agents/prefabs/faq-bot-agent#add-language) (e.g. `"en-US"`). + + + + Engine-specific params dict to attach. Empty object removes the key. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 737. + +*** + +### setLanguages + +Replace all configured languages with a new list. + +#### Signature + +```typescript +setLanguages(languages: LanguageConfig[]): this +``` + +#### Parameters + + + Array of language configurations. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 718. + +*** + +### setNativeFunctions + +Set the list of native SWAIG function names (built-in platform functions). + +#### Signature + +```typescript +setNativeFunctions(funcs: string[]): this +``` + +#### Parameters + + + Array of native function names. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 848. + +*** + +### setOnRequestCallback + +Set a callback invoked per-request to dynamically build SWML. +When set, the static SwmlBuilder is ignored and the callback's +returned SwmlBuilder is used instead. + +#### Signature + +```typescript +setOnRequestCallback(cb: OnRequestCallback): this +``` + +#### Parameters + + + Callback receiving query params, body params, and headers. + + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 850. + +*** + +### setParam + +Set a single AI parameter (e.g. "temperature", "top\_p"). + +#### Signature + +```typescript +setParam(key: string, value: unknown): this +``` + +#### Parameters + + + Parameter name. + + + + Parameter value. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 800. + +*** + +### setParams + +Merge multiple AI parameters into the existing params object. + +#### Signature + +```typescript +setParams(params: Record): this +``` + +#### Parameters + + + Key-value pairs to merge. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 810. + +*** + +### setPostPrompt + +Set the post-prompt text evaluated after the call ends. + +#### Signature + +```typescript +setPostPrompt(text: string): this +``` + +#### Parameters + + + The post-prompt text to use. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 456. + +*** + +### setPostPromptLlmParams + +Merge LLM-specific parameters into the post-prompt configuration. + +#### Signature + +```typescript +setPostPromptLlmParams(params: Record): this +``` + +#### Parameters + + + Key-value LLM parameters to merge. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1001. + +*** + +### setPostPromptUrl + +Override the default post-prompt webhook URL with a custom one. + +#### Signature + +```typescript +setPostPromptUrl(url: string): this +``` + +#### Parameters + + + The custom post-prompt URL. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1847. + +*** + +### setPromptLlmParams + +Merge LLM-specific parameters into the main prompt configuration (e.g. model, temperature). + +#### Signature + +```typescript +setPromptLlmParams(params: Record): this +``` + +#### Parameters + + + Key-value LLM parameters to merge. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 991. + +*** + +### setPromptPom + +Set the prompt as a POM (Prompt Object Model) dictionary. + +Replaces the current POM sections with the provided structured data. +Each entry should have `title`, and optionally `body`, `bullets`, +`numbered`, `numberedBullets`, and `subsections`. + +#### Signature + +```typescript +setPromptPom(pom: Record[]): this +``` + +#### Parameters + + + Array of POM section dictionaries. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Throws + +- Error if POM mode is not enabled (`usePom: false`). + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 577. + +*** + +### setPromptText + +Set the main system prompt text for the AI. + +#### Signature + +```typescript +setPromptText(text: string): this +``` + +#### Parameters + + + The prompt text to use. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 446. + +*** + +### setPronunciations + +Replace all pronunciation rules with a new list. + +#### Signature + +```typescript +setPronunciations(rules: PronunciationRule[]): this +``` + +#### Parameters + + + Array of pronunciation rule objects. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 786. + +*** + +### setupGracefulShutdown + +Register process signal handlers for clean Kubernetes/Docker shutdown. +Handles SIGTERM and SIGINT, waits for a timeout, then exits. + +**Modifiers:** `static` + +#### Signature + +```typescript +setupGracefulShutdown(opts?: { ...1 fields }): void +``` + +#### Parameters + + + Optional timeout in milliseconds (default 5000). + + + + +#### Returns + +`void` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2751. + +*** + +### setWebHookUrl + +Override the default SWAIG webhook URL with a custom one. + +#### Signature + +```typescript +setWebHookUrl(url: string): this +``` + +#### Parameters + + + The custom webhook URL. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1837. + +*** + +### stop + +Stop the HTTP server. +Mirrors Python's `stop()`. + +#### Signature + +```typescript +stop(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 1009. + +*** + +### swaigPreDispatch + +Extension point: invoked between argument parsing and function dispatch +on POST /swaig. Returns \[target, shortCircuit]: when shortCircuit is +non-null, it's returned directly without dispatching. AgentBase may +override to add session-token validation or ephemeral dynamic-config. + +#### Signature + +```typescript +swaigPreDispatch( + _requestData: Record, + _funcName: string +): [SWMLService, unknown] +``` + +#### Parameters + + + + + +#### Returns + +`[SWMLService, unknown]` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 592. + +*** + +### updateGlobalData + +Merge additional entries into the existing global\_data object. + +#### Signature + +```typescript +updateGlobalData(data: Record): this +``` + +#### Parameters + + + Key-value pairs to merge into global data. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 838. + +*** + +### validateBasicAuth + +Override to add custom basic-auth validation logic beyond credential matching. + +#### Signature + +```typescript +validateBasicAuth( + _username: string, + _password: string +): boolean | Promise +``` + +#### Parameters + + + The username from the request. + + + + The password from the request. + + +#### Returns + +`boolean | Promise` — True if the credentials are valid; false to reject the request. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1980. + +*** + +### validateToolToken + +Validate a tool-call token for the given function. + +Mirrors Python reference `core/mixins/state_mixin.py validate_tool_token`: + +1. Unknown function → `false`. +2. Registered but non-secure → `true` without consulting SessionManager + (non-secure tools never require a token). +3. Raw-dict descriptors (e.g. DataMap) are treated as secure, matching + Python's `isinstance(func, dict) → is_secure = True` branch. +4. Missing token on a secure tool → `false`. +5. Otherwise delegate to `SessionManager.validateToolToken`. + +Divergences from the Python reference: + +- No debug-logging branch: `AgentBase` does not expose an agent-level + debug-mode flag, so the per-call debug telemetry Python emits is + omitted. `SessionManager` still logs its own validation outcomes. +- No token-derived call-id fallback: `SessionManager.debugToken` + truncates the embedded call-id for log safety, so an extracted value + cannot be round-tripped back through `validateToolToken`. The caller + is expected to supply a non-empty `callId`; an empty one is forwarded + unchanged and the underlying validator will reject it. + +#### Signature + +```typescript +validateToolToken(functionName: string, token: string, callId: string): boolean +``` + +#### Parameters + + + + + + + +#### Returns + +`boolean` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1455. + +## Functions + +### createFAQBotAgent + +Factory function that creates and returns a new FAQBotAgent. + +#### Signature + +```typescript +createFAQBotAgent(config: FAQBotConfig): FAQBotAgent +``` + +#### Parameters + + + Configuration for the FAQ bot agent. + + +#### Returns + +`FAQBotAgent` — A configured FAQBotAgent instance. + +#### Source + +[`src/prefabs/FAQBotAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/FAQBotAgent.ts) + +Line 411. + +## Source + +[`src/prefabs/FAQBotAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/FAQBotAgent.ts) + +Line 83. diff --git a/fern/products/sdk-reference/typescript/agents/prefabs/faq-bot-agent/index__2.mdx b/fern/products/sdk-reference/typescript/agents/prefabs/faq-bot-agent/index__2.mdx new file mode 100644 index 0000000000..80bf24e23c --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/prefabs/faq-bot-agent/index__2.mdx @@ -0,0 +1,106 @@ +--- +slug: "/reference/typescript/agents/prefabs/faq-bot-agent/index__2" +title: "FAQBotAgent" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "agents.prefabs.FAQBotAgent" + parent: "prefabs" + module: "agents.prefabs" +--- +# `FAQBotAgent` + +## Interfaces + +### FAQBotConfig + +Configuration for the [FAQBotAgent](/docs/sdk-reference/reference/typescript/agents/prefabs/faq-bot-agent). + +#### Signature + +```typescript +interface FAQBotConfig +``` + +#### Properties + + + Additional AgentBase options forwarded to super(). + + + + Message spoken when no FAQ matches the query. + + + + Phone number to transfer to on escalation. If not set, escalate tool is not registered. + + + + List of FAQ entries for the knowledge base. + + + + Agent display name (defaults to `"faq_bot"`). + + + + Custom personality description for the agent's "Personality" prompt section. + + + + HTTP route for this agent (defaults to `"/faq"`). + + + + Whether to suggest related questions alongside a match. Default `true`. + + + + Minimum match score (0-1) for an FAQ to be considered a match. Default 0.5. + + +#### Source + +[`src/prefabs/FAQBotAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/FAQBotAgent.ts) + +Line 30. + +*** + +### FAQEntry + +A single frequently-asked-question entry consumed by [FAQBotAgent](/docs/sdk-reference/reference/typescript/agents/prefabs/faq-bot-agent). + +#### Signature + +```typescript +interface FAQEntry +``` + +#### Properties + + + The answer to provide when this FAQ matches. + + + + Taxonomy categories this FAQ belongs to (used for filtering and hints). + + + + Additional keywords to boost matching accuracy. + + + + The representative question text. + + +#### Source + +[`src/prefabs/FAQBotAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/FAQBotAgent.ts) + +Line 18. diff --git a/fern/products/sdk-reference/typescript/agents/prefabs/index.mdx b/fern/products/sdk-reference/typescript/agents/prefabs/index.mdx new file mode 100644 index 0000000000..e9c17dd803 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/prefabs/index.mdx @@ -0,0 +1,65 @@ +--- +slug: "/reference/typescript/agents/prefabs" +title: "prefabs" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "prefabs" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/index.ts" +--- +# `prefabs` + +## Signature + +```typescript +module prefabs +``` + +## Classes + + + + Prefab agent that acts as a virtual concierge for a venue, providing information about services, amenities, hours of operation, availability, and directions. + + + + Prefab agent that answers frequently asked questions using keyword matching with optional escalation to a live agent. + + + + Prefab agent that gathers caller information one question at a time. + + + + Prefab agent that greets callers, collects basic information, and transfers them to the correct department. + + + + Prefab agent that conducts surveys with branching logic, answer scoring, and conditional question flow. + + + +## Modules + + + + + + + + + + + + + +## Source + +[`src/prefabs/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/index.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/agents/prefabs/info-gatherer-agent/index.mdx b/fern/products/sdk-reference/typescript/agents/prefabs/info-gatherer-agent/index.mdx new file mode 100644 index 0000000000..0119725fbe --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/prefabs/info-gatherer-agent/index.mdx @@ -0,0 +1,3754 @@ +--- +slug: "/reference/typescript/agents/prefabs/info-gatherer-agent" +title: "InfoGathererAgent" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "prefabs.InfoGathererAgent" + parent: "prefabs" + module: "agents.prefabs" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/InfoGathererAgent.ts" +--- +# `InfoGathererAgent` + +Prefab agent that gathers caller information one question at a time. + +Supports two modes: + +- **Static** — provide `questions` at construction; the same questions are + asked on every call. +- **Dynamic** — leave `questions` unset and register a callback via + `questionCallback` (or `setQuestionCallback()`); the callback decides which + questions to ask per incoming call based on query params, body, or headers. + +## Signature + +```typescript +class InfoGathererAgent extends AgentBase +``` + +## Inheritance + +**Extends:** [AgentBase](/docs/sdk-reference/reference/typescript/agents/agent-base) + +## Examples + + + + ```typescript + import { InfoGathererAgent } from '@signalwire/sdk'; + + const agent = new InfoGathererAgent({ + questions: [ + { key_name: 'name', question_text: 'What is your name?' }, + { key_name: 'email', question_text: 'What is your email address?', confirm: true }, + { key_name: 'issue', question_text: 'How can we help?' }, + ], + }); + + await agent.serve({ port: 3000 }); + ``` + + + + ```typescript + const agent = new InfoGathererAgent({ + questionCallback: async (query) => { + if (query.intake === 'medical') { + return [ + { key_name: 'dob', question_text: 'Date of birth?' }, + { key_name: 'insurance_id', question_text: 'Insurance member ID?' }, + ]; + } + return [{ key_name: 'message', question_text: 'How can I help?' }]; + }, + }); + ``` + + + +## Properties + + + Unique identifier for this agent instance. + + + + + + + + Domain name for SSL. Mirrors Python's `self.domain`. + + + + Check if full JSON Schema validation is enabled. Mirrors Python's `@property full_validation_enabled`. + + + + Host the server binds to. + + + + Structured logger instance for this agent. Override the inherited SWMLService logger with an AgentBase-tagged one. + + + + Service display name. + + + + Public accessor for the native functions list. Python exposes `self.native_functions` as a public read/write attribute. + + + + + + Public accessor for the agent's POM as a `PromptObjectModel` instance. Python parity: `agent.pom` instance attribute (agent\_base.py line 209) is a `signalwire.pom.pom.PromptObjectModel` when `use_pom=True`, or `None` otherwise. This getter returns the equivalent TypeScript `PromptObjectModel` instance — callers can use `addSection`, `findSection`, `renderMarkdown`, `renderXml`, `toJson`, `toYaml` exactly as in Python. The instance returned is a fresh snapshot built from the current `PomBuilder` state, so mutating it does not feed back into the agent's internal builder. To mutate the agent's prompt, use `promptAddSection` / `promptAddToSection` / `promptAddSubsection`. + + + + Port the server binds to. + + + + Static prompt sections: subclasses can define these declaratively. Each entry is applied via promptAddSection() in the constructor. + + + + Public accessor for the PromptManager (POM). Python exposes `self.pom` as a public attribute. This getter provides equivalent access for direct POM manipulation. + + + + HTTP route path. + + + + Schema validation utilities. Mirrors Python's `self.schema_utils`. + + + + Unified security configuration. Mirrors Python's `self.security`. + + + + Public read-only accessor for the SkillManager. Python exposes `self.skill_manager` as a public attribute. This getter provides equivalent read access. + + + + Path to SSL certificate. Mirrors Python's `self.ssl_cert_path`. + + + + Whether SSL is enabled. Mirrors Python's `self.ssl_enabled`. + + + + Path to SSL private key. Mirrors Python's `self.ssl_key_path`. + + + + The complete set of internal SWAIG function names that accept fillers, matching the SWAIGInternalFiller schema definition. Any name outside this set is silently ignored by the runtime — addInternalFiller / setInternalFillers warn if you pass an unknown name. + + + + + + + + Custom verb handler registry. Mirrors Python's `self.verb_registry`. + + +## Methods + +### addAnswerVerb + +Configure the answer verb (phase 2) with optional settings. + +#### Signature + +```typescript +addAnswerVerb(config?: Record): this +``` + +#### Parameters + + + Optional answer verb configuration. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1501. + +*** + +### addFunctionInclude + +Add a remote SWAIG function include reference. + +#### Signature + +```typescript +addFunctionInclude( + url: string, + functions: string[], + metaData?: Record +): this +``` + +#### Parameters + + + URL of the remote SWAIG endpoint. + + + + Function names available at that endpoint. + + + + Optional metadata to attach to the include. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 966. + +*** + +### addHint + +Add a single speech-recognition hint. + +#### Signature + +```typescript +addHint(hint: string): this +``` + +#### Parameters + + + Word or phrase to boost in speech recognition. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 653. + +*** + +### addHints + +Add multiple speech-recognition hints at once. + +#### Signature + +```typescript +addHints(hints: string[]): this +``` + +#### Parameters + + + Array of words or phrases to boost. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 663. + +*** + +### addInternalFiller + +Add internal filler phrases for a single internal function and language. + +See [setInternalFillers](/docs/sdk-reference/reference/typescript/agents/prefabs/info-gatherer-agent#set-internal-fillers) for the complete list of supported +functionName values and an explanation of what fillers do. + +#### Signature + +```typescript +addInternalFiller( + functionName: string, + languageCode: string, + fillers: string[] +): this +``` + +#### Parameters + + + One of the supported internal function names (see SUPPORTED\_INTERNAL\_FILLER\_NAMES). Names outside the supported set log a warning and are ignored by the runtime. + + + + BCP-47 language code for the fillers (e.g. 'en-US'). + + + + Array of filler phrases. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 943. + +*** + +### addLanguage + +Add a supported language to the AI configuration. + +#### Signature + +```typescript +addLanguage(config: LanguageConfig): this +``` + +#### Parameters + + + Language configuration including name, code, voice, and optional fillers. `params` may be set to attach engine-specific tuning (voice stability, similarity boost, model knobs, etc.); only emitted into SWML when non-empty so existing entries stay byte-identical when no params are passed (Python ai\_config\_mixin.py `add_language`). + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 694. + +*** + +### addMcpServer + +Add an external MCP server for tool discovery and invocation. +Tools are discovered via MCP protocol at session start and added to the AI's tool list. + +#### Signature + +```typescript +addMcpServer(url: string, opts?: { ...3 fields }): this +``` + +#### Parameters + + + MCP server HTTP endpoint URL + + + + Optional configuration: headers, resources, resourceVars + + + + + + + + +#### Returns + +`this` — This agent instance for chaining + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1146. + +*** + +### addPatternHint + +Add a pattern-based speech-recognition hint with find-and-replace behavior. + +#### Signature + +```typescript +addPatternHint(opts: { ...4 fields }): this +``` + +#### Parameters + + + Pattern hint configuration with a descriptive hint label, regex pattern, replacement string, and optional case-insensitive flag. + + + + + + + + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 674. + +*** + +### addPostAiVerb + +Add a SWML verb to execute after the AI verb (phase 5). + +#### Signature + +```typescript +addPostAiVerb(verbName: string, config: Record): this +``` + +#### Parameters + + + Name of the SWML verb. + + + + Verb configuration object. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1523. + +*** + +### addPostAnswerVerb + +Add a SWML verb to execute after the answer phase but before the AI verb (phase 3). + +#### Signature + +```typescript +addPostAnswerVerb( + verbName: string, + config: number | Record +): this +``` + +#### Parameters + + + Name of the SWML verb. + + + + Verb configuration object. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1512. + +*** + +### addPreAnswerVerb + +Add a SWML verb to execute before the answer phase (phase 1). + +#### Signature + +```typescript +addPreAnswerVerb( + verbName: string, + config: number | Record +): this +``` + +#### Parameters + + + Name of the SWML verb (e.g. "play", "record"). + + + + Verb configuration object. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1491. + +*** + +### addPronunciation + +Add a pronunciation override rule for the TTS engine. + +#### Signature + +```typescript +addPronunciation(rule: PronunciationRule): this +``` + +#### Parameters + + + Pronunciation rule specifying the text to replace and its substitute. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 774. + +*** + +### addSection + +Add a new named section to the SWML document. +Mirrors Python's `add_section()`. + +#### Signature + +```typescript +addSection(sectionName: string): this +``` + +#### Parameters + + + Name of the section to create. + + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 653. + +*** + +### addSkill + +Add a skill to this agent, registering its tools, prompt sections, hints, and global data. + +#### Signature + +```typescript +addSkill(skill: SkillBase): Promise +``` + +#### Parameters + + + The skill instance to add. + + +#### Returns + +`Promise` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1570. + +*** + +### addSkillByName + +Add a skill by its registered name, looking it up in the global SkillRegistry. + +Matches Python's `add_skill(skill_name, params)` which loads skills by string +name via the SkillManager registry. Throws a `ValueError`-equivalent if the +skill name is not found in the registry. + +Accepts a typed [SkillNameOrString](/docs/sdk-reference/reference/typescript/agents/skills/skill-name#skill-name-or-string): one of the built-in +`SkillName` values (autocompleted, with a typo caught at compile +time) or any other string for custom / third-party skills. The value is +forwarded to the registry unchanged — the typing is erased at runtime, so +this matches Python's bare-`str` `add_skill(skill_name, params)`. + +#### Signature + +```typescript +addSkillByName( + skillName: SkillNameOrString, + params?: SkillConfig +): Promise +``` + +#### Parameters + + + The name the skill was registered under in the SkillRegistry. + + + + Optional configuration parameters forwarded to the skill factory. + + +#### Returns + +`Promise` — This agent instance for chaining. + +#### Throws + +- Error if no skill with the given name is registered. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1641. + +*** + +### addSwaigQueryParams + +Add extra query parameters appended to all SWAIG webhook URLs. + +#### Signature + +```typescript +addSwaigQueryParams(params: Record): this +``` + +#### Parameters + + + Key-value pairs to append as query parameters. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1733. + +*** + +### addVerb + +Add a verb to the SWML document. + +#### Signature + +```typescript +addVerb(name: string, config: unknown): this +``` + +#### Parameters + + + Verb name (e.g., 'answer', 'play', 'hangup'). + + + + Verb configuration. + + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 642. + +*** + +### addVerbToSection + +Add a verb to a specific named section. +Mirrors Python's `add_verb_to_section()`. + +#### Signature + +```typescript +addVerbToSection(sectionName: string, verbName: string, config: unknown): this +``` + +#### Parameters + + + Target section name (auto-created if missing). + + + + Verb name. + + + + Verb configuration. + + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 669. + +*** + +### asRouter + +Return this agent's Hono app for mounting as a sub-router in an AgentServer. + +#### Signature + +```typescript +asRouter(): Hono +``` + +#### Returns + +`Hono` — The Hono application instance. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2656. + +*** + +### autoMapSipUsernames + +Automatically register common SIP usernames based on this agent's +name and route. Derives cleaned variants (alphanumeric + underscore) +and registers each via `registerSipUsername()`. + +Port of Python's `auto_map_sip_usernames()`: + +- Registers a cleaned version of the agent name +- Registers a cleaned version of the route (if different from name) +- For names longer than 3 characters, also registers a vowel-stripped variant + +#### Signature + +```typescript +autoMapSipUsernames(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1058. + +*** + +### buildSwmlForRequest + +Service-side SWML-builder hook. Subclasses return a `SwmlBuilder` +to fully replace the document for this request, or `null` to fall +through to `setOnRequestCallback` or the static builder. + +This is distinct from the WebMixin `onRequest(requestData, +callbackPath)` hook on AgentBase (which mirrors Python's +`on_request -> on_swml_request` modification-merge contract). +Use this hook when you want to swap the entire SWML builder; use +`onRequest` / `onSwmlRequest` on AgentBase when you want to merge +targeted modifications into the rendered document. + +Default implementation returns `null` (no-op). + +#### Signature + +```typescript +buildSwmlForRequest( + _queryParams: Record, + _bodyParams: Record, + _headers: Record, + _callbackPath?: string +): SwmlBuilder | null +``` + +#### Parameters + + + + + + + + + +#### Returns + +`SwmlBuilder | null` — A `SwmlBuilder` whose document is sent as the response, or `null` to delegate to the next handler in the chain. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 834. + +*** + +### clearPostAiVerbs + +Remove all post-AI verbs. + +#### Signature + +```typescript +clearPostAiVerbs(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1550. + +*** + +### clearPostAnswerVerbs + +Remove all post-answer verbs. + +#### Signature + +```typescript +clearPostAnswerVerbs(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1541. + +*** + +### clearPreAnswerVerbs + +Remove all pre-answer verbs. + +#### Signature + +```typescript +clearPreAnswerVerbs(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1532. + +*** + +### clearSwaigQueryParams + +Clear all SWAIG query parameters. + +#### Signature + +```typescript +clearSwaigQueryParams(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1742. + +*** + +### constructor + +Create an InfoGathererAgent. + +#### Signature + +```typescript +constructor(config: InfoGathererConfig = {}): InfoGathererAgent +``` + +#### Parameters + + + Either `questions` (static mode) or leave omitted and use `questionCallback` / `setQuestionCallback()` (dynamic mode). + + +#### Returns + +`InfoGathererAgent` + +#### Source + +[`src/prefabs/InfoGathererAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/InfoGathererAgent.ts) + +Line 116. + +*** + +### createToolToken + +Mint a per-call SWAIG-function token via the agent's SessionManager. + +Mirrors Python reference `core/mixins/state_mixin.py _create_tool_token`: +delegates to `SessionManager.createToolToken` and returns an empty +string on any failure (Python catches all exceptions and returns ""). + +#### Signature + +```typescript +createToolToken(toolName: string, callId: string): string +``` + +#### Parameters + + + + + +#### Returns + +`string` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1475. + +*** + +### defineContexts + +Define or replace the contexts configuration for the AI verb. + +#### Signature + +```typescript +defineContexts( + contexts?: Record | ContextBuilder +): ContextBuilder +``` + +#### Parameters + + + An existing ContextBuilder instance or a plain object; a new ContextBuilder is created if omitted. + + +#### Returns + +`ContextBuilder` — The active ContextBuilder for further configuration. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 604. + +*** + +### defineTool + +Register a SWAIG tool (function) that the AI can invoke during a call. + +#### How this becomes a tool the model sees + +A SWAIG function is **exactly the same concept** as a "tool" in +native OpenAI / Anthropic tool calling. On every LLM turn, the SDK +renders each registered SWAIG function into the OpenAI tool schema: + +```json +{ +"type": "function", +"function": { +"name": "your_name_here", +"description": "your description text", +"parameters": { /* your JSON schema */ } +} +} +``` + +That schema goes to the model in the same API call that produces +the next assistant message. The model reads: + +- the **function `description`** to decide WHEN to call this tool +- each **parameter `description`** (inside the JSON schema) to + decide HOW to fill in each argument + +This means **descriptions are prompt engineering**, not developer +comments. A vague description is the #1 cause of "the model has the +right tool but doesn't call it" failures. + +##### Bad vs good descriptions + +```text +BAD : description: 'Lookup function' +GOOD: description: 'Look up a customer's account details by account +number. Use this BEFORE quoting any account-specific info +(balance, plan, status). Do not use for general product +questions.' + +BAD : parameters: { id: { type: 'string', description: 'the id' } } +GOOD: parameters: { account_number: { type: 'string', description: +'The customer's 8-digit account number, no dashes or spaces. +Ask the user if they don't provide it.' } } +``` + +##### Tool count matters + +LLM tool selection accuracy degrades past ~7-8 simultaneously-active +tools per call. Use Step.setFunctions() to partition tools across +steps so only the relevant subset is active at any moment. + +#### Signature + +```typescript +defineTool(opts: { ...11 fields }): this +``` + +#### Parameters + + + Tool definition including name, description, parameter schema, and handler callback. `description` and per-parameter `description` strings are LLM-facing prompt engineering. + + + + + Additional fields to pass through to the SWAIG function definition (Python `**swaig_fields` equivalent). + + + + + + + + + + + + + + + + + + + + External webhook URL; makes this an externally-hosted tool. + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1330. + +*** + +### defineTools + +Register the `start_questions` and `submit_answer` SWAIG tools. + +#### Signature + +```typescript +defineTools(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/prefabs/InfoGathererAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/InfoGathererAgent.ts) + +Line 282. + +*** + +### defineTypedTool + +Register a SWAIG tool with a typed handler that receives named parameters +instead of the standard `(args, rawData)` convention. + +The SDK wraps the handler to unpack the args dict into positional params. +If no `parameters` schema is provided, one is inferred from the handler's +source code (parameter names and default values). + +#### Signature + +```typescript +defineTypedTool(opts: { ...9 fields }): this +``` + +#### Parameters + + + Tool definition with a typed handler function. + + + + + + + The typed handler. Receives the AI-extracted arguments as named positional parameters (in declaration order), optionally with a trailing `rawData` record, and returns a SWAIG result. Precisely typed as [TypedToolHandler](/docs/sdk-reference/reference/typescript/core/type-inference#typed-tool-handler) rather than the bare `Function` so a non-callable — or a callable that returns nothing usable — is a compile-time error. + + + + + + + + + + + + + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1373. + +*** + +### enableDebugEvents + +Enable debug event webhooks for this agent. + +#### Signature + +```typescript +enableDebugEvents(level: number = 1): this +``` + +#### Parameters + + + Debug verbosity level (defaults to 1). + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1011. + +*** + +### enableDebugRoutes + +Register a callback function that determines routing based on POST data. + +When a routing callback is registered, an endpoint at the specified path +is created in `getApp()`. The callback receives the request body and returns +Enable debug routes for testing and development. + +This is a backward-compatibility stub matching the Python SDK. +In the TypeScript SDK, debug routes (health, ready, debug\_events) +are automatically registered in `getApp()`. + +#### Signature + +```typescript +enableDebugRoutes(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1773. + +*** + +### enableMcpServer + +Expose this agent's tools as an MCP server endpoint at /mcp. +Adds a JSON-RPC 2.0 endpoint that MCP clients (Claude Desktop, other agents) can connect to. + +#### Signature + +```typescript +enableMcpServer(): this +``` + +#### Returns + +`this` — This agent instance for chaining + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1160. + +*** + +### enableSipRouting + +Enable SIP routing for this agent. + +#### Signature + +```typescript +enableSipRouting(autoMap: boolean = true, path: string = '/sip'): this +``` + +#### Parameters + + + When true, automatically map SIP usernames to the agent route (defaults to true). + + + + HTTP path for the SIP routing endpoint (defaults to '/sip'). + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1025. + +*** + +### extractSipUsername + +Extract the SIP username from a request body's call.to field. + +**Modifiers:** `static` + +#### Signature + +```typescript +extractSipUsername(requestBody: Record): string | null +``` + +#### Parameters + + + The parsed request body containing call information. + + +#### Returns + +`string | null` — The extracted SIP username, or null if not found. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1122. + +*** + +### getAllFunctions + +Snapshot of all registered SWAIG functions keyed by name. +(Python parity: `ToolRegistry.get_all_functions`.) + +#### Signature + +```typescript +getAllFunctions(): Record> +``` + +#### Returns + +`Record>` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 529. + +*** + +### getApp + +Get or lazily create the Hono HTTP application with all routes, middleware, auth, and CORS. + +#### Signature + +```typescript +getApp(): Hono +``` + +#### Returns + +`Hono` — The configured Hono application instance. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2269. + +*** + +### getBasicAuthCredentials + +Get the basic-auth credentials used by this agent. + +#### Signature + + + + ```typescript + getBasicAuthCredentials(includeSource?: false): [string, string] + ``` + + + + ```typescript + getBasicAuthCredentials( + includeSource: true + ): [string, string, "provided" | "environment" | "generated"] + ``` + + + +#### Parameters (Overload 1) + + + When true, a third element indicating the credential source is appended. + + +#### Parameters (Overload 2) + + + When true, a third element indicating the credential source is appended. + + +#### Returns (Overload 1) + +`[string, string]` — A tuple of \[username, password] or \[username, password, source]. + +#### Returns (Overload 2) + +`[string, string, "provided" | "environment" | "generated"]` — A tuple of \[username, password] or \[username, password, source]. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2794. + +*** + +### getBuilder + +Get the underlying SwmlBuilder for direct manipulation. + +#### Signature + +```typescript +getBuilder(): SwmlBuilder +``` + +#### Returns + +`SwmlBuilder` — The SwmlBuilder instance. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 632. + +*** + +### getContexts + +Get the contexts dictionary as serialised SWML, or null when no +contexts have been defined yet. + +Matches Python `PromptManager.get_contexts()` which returns the +contexts dict or `None`. + +#### Signature + +```typescript +getContexts(): Record | null +``` + +#### Returns + +`Record | null` — Contexts dict, or null when no contexts are defined. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 641. + +*** + +### getDocument + +Get the SWML document as a dictionary. +Alias for `renderSwml()` that matches Python's `get_document()` name. + +#### Signature + +```typescript +getDocument(): Record +``` + +#### Returns + +`Record` — The SWML document. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 706. + +*** + +### getFullUrl + +Get the full external URL of this agent, using the proxy base URL if available. + +#### Signature + +```typescript +getFullUrl(includeAuth: boolean = false): string +``` + +#### Parameters + + + Whether to embed basic-auth credentials in the URL (defaults to false). + + +#### Returns + +`string` — The fully-qualified URL string. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1857. + +*** + +### getFunction + +Get a registered SWAIG function entry, or undefined. +(Python parity: `ToolRegistry.get_function`.) + +#### Signature + +```typescript +getFunction(name: string): Record | SwaigFunction | undefined +``` + +#### Parameters + + + +#### Returns + +`Record | SwaigFunction | undefined` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 523. + +*** + +### getLanguageParams + +Read the per-language `params` dict for a previously-added language. + +Python parity: `get_language_params(code)`. Returns `undefined` if the +code is unknown or the language has no params set — no exception path. + +#### Signature + +```typescript +getLanguageParams(code: string): Record | undefined +``` + +#### Parameters + + + Language code as previously passed to [addLanguage](/docs/sdk-reference/reference/typescript/agents/prefabs/info-gatherer-agent#add-language). + + +#### Returns + +`Record | undefined` — The params dict if set, `undefined` otherwise (including when the code is unknown). + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 760. + +*** + +### getMcpServers + +Get configured MCP servers (read-only copy). + +#### Signature + +```typescript +getMcpServers(): Record[] +``` + +#### Returns + +`Record[]` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1171. + +*** + +### getName + +Get the agent's display name. + +#### Signature + +```typescript +getName(): string +``` + +#### Returns + +`string` — The agent name string. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1559. + +*** + +### getPostPrompt + +Get the post-prompt text, if one has been set. + +#### Signature + +```typescript +getPostPrompt(): string | null +``` + +#### Returns + +`string | null` — The post-prompt string, or null if not configured. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 548. + +*** + +### getPrompt + +Get the fully rendered main prompt text. + +#### Signature + +```typescript +getPrompt(): string +``` + +#### Returns + +`string` — The assembled prompt string. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 520. + +*** + +### getPromptPom + +Get the raw POM (Prompt Object Model) structure as an array of section data objects, +when the agent is in POM mode and has at least one section. + +Matches Python `get_prompt()` which returns `Union[str, List[Dict]]` — a raw list when +in POM mode (via `pom.to_list()` / `pom.render_dict()`), or a string otherwise. +The TS `getPrompt()` always returns a string (rendered Markdown), so this companion +method exposes the raw POM structure for callers that need it for serialisation or +inspection (e.g. skills that inspect prompt sections). + +#### Signature + +```typescript +getPromptPom(): Record[] | null +``` + +#### Returns + +`Record[] | null` — An array of POM section data objects, or null if not in POM mode or POM is empty. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 536. + +*** + +### getRawPrompt + +Get the raw prompt text whatever `setPromptText` stored, or null when +no raw prompt has been set. + +Matches Python `PromptManager.get_raw_prompt()` which returns the raw +stored string or `None`. Use this instead of `getPrompt()` when you +need the unrendered text rather than the POM-rendered Markdown. + +#### Signature + +```typescript +getRawPrompt(): string | null +``` + +#### Returns + +`string | null` — The raw prompt string, or null if not set. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 562. + +*** + +### getRegisteredTools + +Get a summary of all registered tools with their names, descriptions, and +parameter schemas. Lifted from AgentBase so the swaig-test CLI can list +tools on a non-AgentBase SWMLService target (sidecar / standalone SWAIG +host). + +#### Signature + +```typescript +getRegisteredTools(): { description: string; name: string; parameters: Record }[] +``` + +#### Returns + +`{ description: string; name: string; parameters: Record }[]` — Array of tool descriptors. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 557. + +*** + +### getTool + +Look up a registered SwaigFunction by name. Lifted from AgentBase so +`swaig-test --exec ` works against a non-AgentBase SWMLService +target. + +#### Signature + +```typescript +getTool(name: string): SwaigFunction | undefined +``` + +#### Parameters + + + The tool name to search for. + + +#### Returns + +`SwaigFunction | undefined` — The SwaigFunction instance, or undefined if not found or not a SwaigFunction. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 581. + +*** + +### getTools + +Public access to the list of registered tools. + +In Python, `define_tools()` is public and returns `List[SWAIGFunction]`. +In TypeScript, `defineTools()` is a protected setup hook (void). This +method provides the equivalent public "get all tools" capability. + +#### Signature + +```typescript +getTools(): SwaigFunction[] +``` + +#### Returns + +`SwaigFunction[]` — Array of all registered SwaigFunction instances. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 371. + +*** + +### handleMcpRequest + +Handle an MCP JSON-RPC 2.0 request. Returns the response object. + +#### Signature + +```typescript +handleMcpRequest( + body: Record +): Promise> +``` + +#### Parameters + + + +#### Returns + +`Promise>` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1204. + +*** + +### hasFunction + +Whether a SWAIG function with the given name is registered. +(Python parity: `ToolRegistry.has_function`.) + +#### Signature + +```typescript +hasFunction(name: string): boolean +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 517. + +*** + +### hasSkill + +Check whether a skill with the given name is registered. + +Accepts a typed [SkillNameOrString](/docs/sdk-reference/reference/typescript/agents/skills/skill-name#skill-name-or-string) so built-in names autocomplete +and a typo is a compile-time error; any other string is still accepted +(custom skills / parity with Python's bare-`str` `has_skill`). + +#### Signature + +```typescript +hasSkill(skillName: SkillNameOrString): boolean +``` + +#### Parameters + + + The skill name to check. + + +#### Returns + +`boolean` — True if a skill with that name exists. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1676. + +*** + +### hasTool + +Whether a tool with the given name is registered. + +#### Signature + +```typescript +hasTool(name: string): boolean +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 511. + +*** + +### isMcpServerEnabled + +Check if MCP server endpoint is enabled. + +#### Signature + +```typescript +isMcpServerEnabled(): boolean +``` + +#### Returns + +`boolean` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1166. + +*** + +### listSkills + +List all registered skills with their names, instance IDs, and initialization status. + +#### Signature + +```typescript +listSkills(): { initialized: boolean; instanceId: string; name: string }[] +``` + +#### Returns + +`{ initialized: boolean; instanceId: string; name: string }[]` — Array of skill descriptors. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1662. + +*** + +### listToolNames + +List registered tool names in insertion order (Map preserves it). + +#### Signature + +```typescript +listToolNames(): string[] +``` + +#### Returns + +`string[]` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 545. + +*** + +### manualSetProxyUrl + +Manually set the proxy base URL used for webhook URL generation. + +#### Signature + +```typescript +manualSetProxyUrl(url: string): this +``` + +#### Parameters + + + The external-facing base URL (trailing slashes are stripped). + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1754. + +*** + +### onDebugEvent + +Lifecycle hook called when a debug event webhook is received. Override in subclasses. + +#### Signature + +```typescript +onDebugEvent(_event: Record): void | Promise +``` + +#### Parameters + + + The debug event payload. + + +#### Returns + +`void | Promise` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1970. + +*** + +### onFunctionCall + +Hook called before each SWAIG function execution. Override in subclasses. + +**Behavioral note:** In the Python SDK, `on_function_call` IS the dispatcher +— it retrieves and executes the function, returning the result. In TypeScript, +`fn.execute()` is called separately after this hook. However, if this method +returns a non-void value, it is used as the result and the default execution +is skipped, enabling dispatch interception parity with Python. + +#### Signature + +```typescript +onFunctionCall( + _name: string, + _args: Record, + _rawData: Record +): void | Record | Promise> +``` + +#### Parameters + + + Name of the function about to execute. + + + + Parsed arguments for the function. + + + + The full raw SWAIG request payload. + + +#### Returns + +`void | Record | Promise>` — Optionally a result dict to short-circuit default execution, or void/undefined to proceed normally. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1999. + +*** + +### onRequest + +Lifecycle hook called when SWML is requested. Default delegates to +[onSwmlRequest](/docs/sdk-reference/reference/typescript/agents/prefabs/info-gatherer-agent#on-swml-request) and returns its result. Subclasses typically +override `onSwmlRequest` rather than this method. + +Matches Python `WebMixin.on_request(request_data, callback_path)`. The +cross-language API is the two-arg form; the Hono `context` argument is +a TypeScript-side extra preserved for callers that already have it but +is not part of the audited surface. + +#### Signature + +```typescript +onRequest( + requestData?: Record | null, + callbackPath?: string | null +): void | Record | Promise> +``` + +#### Parameters + + + The parsed request body. + + + + Optional callback path from the request. + + +#### Returns + +`void | Record | Promise>` — Optionally a dict of SWML modifications, or undefined for default rendering. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1935. + +*** + +### onSummary + +Lifecycle hook called when a post-prompt summary is received. Override in subclasses. + +Invoked once at the end of a call when the AI has produced a structured summary +(configured via `setPostPrompt()` / `setPostPromptJson()`). Use this hook to persist +call data, notify other systems, or trigger follow-up workflows. + +#### Signature + +```typescript +onSummary( + _summary: Record | null, + _rawData: Record +): void | Promise +``` + +#### Parameters + + + Parsed summary object (JSON when the post-prompt requests structured output), or `null` if extraction/parsing failed. + + + + Full raw post-prompt payload received from the platform, including call metadata, conversation history, and the summary text. + + +#### Returns + +`void | Promise` + +#### Examples + +```typescript +class MyAgent extends AgentBase { + async onSummary(summary, rawData) { + if (!summary) return; + await db.calls.insert({ + callSid: rawData.call_id, + summary, + endedAt: new Date(), + }); + } +} +``` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1916. + +*** + +### onSwmlRequest + +Handle dynamic configuration using the registered callback. Returns the +per-request global\_data payload which AgentBase merges into the SWML +response. Mirrors Python's `on_swml_request` return-dict contract. + +#### Signature + +```typescript +onSwmlRequest( + rawData: Record +): Promise> +``` + +#### Parameters + + + +#### Returns + +`Promise>` + +#### Source + +[`src/prefabs/InfoGathererAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/InfoGathererAgent.ts) + +Line 223. + +*** + +### promptAddSection + +Add a new section to the prompt with optional body, bullets, and subsections. + +#### Signature + +```typescript +promptAddSection(title: string, opts?: { ...5 fields }): this +``` + +#### Parameters + + + Section heading. + + + + Optional section content including body text, bullet points, and subsections. + + + + + + + + + + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 467. + +*** + +### promptAddSubsection + +Add a subsection under an existing prompt section. + +#### Signature + +```typescript +promptAddSubsection( + parentTitle: string, + title: string, + opts?: { ...2 fields } +): this +``` + +#### Parameters + + + Title of the parent section. + + + + Title of the new subsection. + + + + Optional body text and bullet points for the subsection. + + + + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 502. + +*** + +### promptAddToSection + +Append content to an existing prompt section. + +#### Signature + +```typescript +promptAddToSection(title: string, opts?: { ...3 fields }): this +``` + +#### Parameters + + + Title of the section to append to. + + + + Content to add: body text, a single bullet, or multiple bullets. + + + + + + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 487. + +*** + +### promptHasSection + +Check whether a prompt section with the given title exists. + +#### Signature + +```typescript +promptHasSection(title: string): boolean +``` + +#### Parameters + + + Section title to look for. + + +#### Returns + +`boolean` — True if the section exists. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 512. + +*** + +### registerAdditionalRoutes + +Extension point: register additional Hono routes after SWMLService +mounts /health, /ready, /swaig, and the main route. AgentBase uses +this to add /post\_prompt, /check\_for\_input, /debug\_events, /mcp. + +#### Signature + +```typescript +registerAdditionalRoutes(_app: Hono): void +``` + +#### Parameters + + + +#### Returns + +`void` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 604. + +*** + +### registerRoutingCallback + +Register a callback at a specific HTTP path that decides how to route an +incoming request. + +When called, the endpoint at `path` will invoke `callback` with the parsed +request body. If `callback` returns a non-empty route string the server +responds with `{ action: "redirect", route }` so the platform can forward the +request to the right agent. If `callback` returns `null` / `undefined` the +agent's own SWML is returned instead (normal processing). + +Mirrors Python `swml_service.register_routing_callback` / +`web_mixin.register_routing_callback`. + +#### Signature + +```typescript +registerRoutingCallback(callback: RoutingCallback, path: string = '/sip'): this +``` + +#### Parameters + + + Function receiving the parsed request body and returning a route string to redirect, or null/undefined for normal processing. + + + + HTTP path where this callback endpoint is registered (default: '/sip'). + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1102. + +*** + +### registerSipUsername + +Register a SIP username to route to this agent. + +#### Signature + +```typescript +registerSipUsername(username: string): this +``` + +#### Parameters + + + The SIP username to register. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1040. + +*** + +### registerSwaigFunction + +Register a SwaigFunction instance or a raw function descriptor (DataMap). + +#### Signature + +```typescript +registerSwaigFunction(fn: Record | SwaigFunction): this +``` + +#### Parameters + + + +#### Returns + +`this` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 472. + +*** + +### registerVerbHandler + +Register a custom verb handler. +Mirrors Python's `register_verb_handler()`. + +#### Signature + +```typescript +registerVerbHandler(handler: SWMLVerbHandler): void +``` + +#### Parameters + + + The verb handler to register. + + +#### Returns + +`void` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 726. + +*** + +### removeFunction + +Remove a registered SWAIG function. Returns true when removed, +false when not found. (Python parity: +`ToolRegistry.remove_function`.) + +#### Signature + +```typescript +removeFunction(name: string): boolean +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 540. + +*** + +### removeSkill + +Remove a previously added skill by its instance ID. + +#### Signature + +```typescript +removeSkill(instanceId: string): Promise +``` + +#### Parameters + + + The unique instance ID of the skill to remove. + + +#### Returns + +`Promise` — True if the skill was found and removed. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1654. + +*** + +### removeSkillByName + +Remove a skill by its name (Python parity). + +Python's `remove_skill(skill_name)` removes by skill name. +The existing `removeSkill(instanceId)` removes by instance ID. +This method provides name-based removal for cross-SDK parity. + +#### Signature + +```typescript +removeSkillByName(skillName: string): Promise +``` + +#### Parameters + + + The skill name to remove. + + +#### Returns + +`Promise` — True if a skill with that name was found and removed. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1690. + +*** + +### renderDocument + +Render the SWML document as a JSON string. +Mirrors Python's `render_document()`. + +#### Signature + +```typescript +renderDocument(): string +``` + +#### Returns + +`string` — JSON-encoded SWML document. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 715. + +*** + +### renderSwml + +Render the complete SWML document by assembling all 5 phases: pre-answer, answer, +post-answer, AI, and post-AI verbs. + +#### Signature + +```typescript +renderSwml(callId?: string, modifications?: Record): string +``` + +#### Parameters + + + Optional call ID to use for session tokens; auto-generated if omitted. + + + + Optional dict returned from `onSwmlRequest` to merge into the AI verb config before rendering. Matches Python's `_render_swml(modifications)` semantics: `global_data` is deep-merged; all other keys override the AI config directly. + + +#### Returns + +`string` — The rendered SWML document as a JSON string. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2019. + +*** + +### resetContexts + +Remove all contexts, returning the agent to a no-contexts state. + +This is a convenience wrapper around `defineContexts().reset()`. +Use it in a dynamic config callback when you need to rebuild +contexts from scratch for a specific request. + +#### Signature + +```typescript +resetContexts(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 625. + +*** + +### resetDocument + +Reset the SWML document to an empty state. +Mirrors Python's `reset_document()`. + +#### Signature + +```typescript +resetDocument(): this +``` + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 679. + +*** + +### run + +Alias for [serve](/docs/sdk-reference/reference/typescript/agents/prefabs/info-gatherer-agent#serve). Starts the HTTP server. + +#### Signature + +```typescript +run(opts?: { ...2 fields }): Promise +``` + +#### Parameters + + + Optional host and port overrides. + + + + + + +#### Returns + +`Promise` — A promise that resolves once the server is running. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2702. + +*** + +### runServerless + +Handle a single serverless invocation (AWS Lambda, Google Cloud Functions, Azure Functions, or CGI). + +Matches Python `run(event, context)` when executed in a serverless environment. Python's +`run()` auto-detects the platform via `get_execution_mode()` and dispatches accordingly; +in TypeScript the serverless path is an **explicit** method so that `run()` keeps its +HTTP-server semantics and callers opt in to serverless dispatch deliberately. + +Platform detection follows the same environment-variable heuristics as Python's +`ServerlessMixin`: `AWS_LAMBDA_FUNCTION_NAME` → Lambda, `K_SERVICE` → GCF, +`FUNCTIONS_WORKER_RUNTIME` → Azure, `GATEWAY_INTERFACE` → CGI. + +Usage in a Lambda handler file: + +```ts +export const handler = (event: any, context: any) => agent.runServerless(event, context); +``` + +#### Signature + +```typescript +runServerless( + event: ServerlessEvent, + context?: unknown, + platform?: "lambda" | "gcf" | "azure" | "cgi" | "auto" +): Promise +``` + +#### Parameters + + + The serverless event payload (Lambda event, GCF request body, etc.). + + + + The serverless context object (Lambda context, Azure context, etc.). + + + + Optional platform override; defaults to 'auto' (environment detection). + + +#### Returns + +`Promise` — The normalized serverless response object. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2728. + +*** + +### serve + +Start the HTTP server and begin listening for requests. + +Uses `@hono/node-server` under the hood. When run in CLI mode +(`SWAIG_CLI_MODE=true`, set automatically by `npx swaig-test`), this is a +no-op so agent config can be inspected without starting a server. + +#### Signature + +```typescript +serve(opts?: { ...2 fields }): Promise +``` + +#### Parameters + + + Optional host/port overrides. Defaults to the values provided in the constructor options or the `PORT` environment variable. + + + + + + +#### Returns + +`Promise` — A promise that resolves once the server has begun listening. + +#### Examples + +```typescript +const agent = new AgentBase({ name: 'demo', port: 3000 }); +await agent.serve(); +// Or override at runtime: +await agent.serve({ port: 8080, host: '127.0.0.1' }); +``` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2679. + +*** + +### setDynamicConfigCallback + +Set a callback invoked on each SWML request to dynamically modify an ephemeral agent copy. + +The callback receives a clone of this agent — mutations apply only to the current +request, so you can vary prompt, tools, languages, params, or global data per call +without affecting the long-lived agent instance. + +#### Signature + +```typescript +setDynamicConfigCallback(cb: DynamicConfigCallback): this +``` + +#### Parameters + + + Callback receiving `(queryParams, bodyParams, headers, agent)` where `agent` is the ephemeral `AgentBase` copy to mutate. May be async. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Examples + +```typescript +agent.setDynamicConfigCallback((query, body, headers, agent) => { + const lang = query.lang ?? 'en'; + if (lang === 'es') { + (agent as AgentBase).setPromptText('Eres un asistente útil.'); + } +}); +``` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1723. + +*** + +### setFunctionIncludes + +Replace the entire list of function includes. +Each include must have a `url` and `functions` array. + +#### Signature + +```typescript +setFunctionIncludes(includes: FunctionInclude[]): this +``` + +#### Parameters + + + Array of function include objects. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 979. + +*** + +### setGlobalData + +Merge data into the global\_data object passed into the AI configuration. + +Matches Python `set_global_data` which calls `.update()` on the internal dict — +existing keys are preserved; incoming keys overwrite on collision. Skills and +other callers can each contribute keys without clobbering one another. + +If you need to replace the entire object, assign a new agent instance or use +`Object.assign(agent.globalData, {})` to clear first. + +#### Signature + +```typescript +setGlobalData(data: Record): this +``` + +#### Parameters + + + Key-value pairs to merge into global data. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 828. + +*** + +### setInternalFillers + +Set internal fillers for native SWAIG functions. + +Internal fillers are short phrases the AI agent speaks (via TTS) while +an internal/native function is running, so the caller doesn't hear +dead air during transitions or background work. + +Supported function names (matches the SWAIGInternalFiller schema): + +hangup — when the agent is hanging up +check\_time — when checking the time +wait\_for\_user — when waiting for user input +wait\_seconds — during deliberate pauses +adjust\_response\_latency — when adjusting response timing +next\_step — transitioning between steps in prompt.contexts +change\_context — switching between contexts in prompt.contexts +get\_visual\_input — processing visual input (enable\_vision=true) +get\_ideal\_strategy — thinking (enable\_thinking=true) + +Notably NOT supported: change\_step, gather\_submit, or arbitrary +user-defined SWAIG function names. The runtime only honors fillers +for the names listed above; everything else is silently ignored at +the SWML level. This method warns at registration time if you pass +an unknown name so you catch the typo early. + +#### Signature + +```typescript +setInternalFillers( + internalFillers: Record> +): this +``` + +#### Parameters + + + Map of function name to language-keyed filler phrases. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Examples + +```typescript +agent.setInternalFillers({ + next_step: { + 'en-US': ['Moving to the next step...', 'Great, let us continue...'], + 'es': ['Pasando al siguiente paso...'] + }, + check_time: { + 'en-US': ['Let me check the time...'] + } +}); +``` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 910. + +*** + +### setLanguageParams + +Set (or replace) the per-language `params` dict on an already-added +language. Useful when language entries are built up via [addLanguage](/docs/sdk-reference/reference/typescript/agents/prefabs/info-gatherer-agent#add-language) +first and engine-specific tuning is added later (e.g., from a config +loader). + +Python parity: `set_language_params(code, params)`. Passing an empty +object removes the `params` key entirely. Unknown codes are a no-op. + +#### Signature + +```typescript +setLanguageParams(code: string, params: Record): this +``` + +#### Parameters + + + Language code as previously passed to [addLanguage](/docs/sdk-reference/reference/typescript/agents/prefabs/info-gatherer-agent#add-language) (e.g. `"en-US"`). + + + + Engine-specific params dict to attach. Empty object removes the key. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 737. + +*** + +### setLanguages + +Replace all configured languages with a new list. + +#### Signature + +```typescript +setLanguages(languages: LanguageConfig[]): this +``` + +#### Parameters + + + Array of language configurations. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 718. + +*** + +### setNativeFunctions + +Set the list of native SWAIG function names (built-in platform functions). + +#### Signature + +```typescript +setNativeFunctions(funcs: string[]): this +``` + +#### Parameters + + + Array of native function names. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 848. + +*** + +### setOnRequestCallback + +Set a callback invoked per-request to dynamically build SWML. +When set, the static SwmlBuilder is ignored and the callback's +returned SwmlBuilder is used instead. + +#### Signature + +```typescript +setOnRequestCallback(cb: OnRequestCallback): this +``` + +#### Parameters + + + Callback receiving query params, body params, and headers. + + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 850. + +*** + +### setParam + +Set a single AI parameter (e.g. "temperature", "top\_p"). + +#### Signature + +```typescript +setParam(key: string, value: unknown): this +``` + +#### Parameters + + + Parameter name. + + + + Parameter value. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 800. + +*** + +### setParams + +Merge multiple AI parameters into the existing params object. + +#### Signature + +```typescript +setParams(params: Record): this +``` + +#### Parameters + + + Key-value pairs to merge. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 810. + +*** + +### setPostPrompt + +Set the post-prompt text evaluated after the call ends. + +#### Signature + +```typescript +setPostPrompt(text: string): this +``` + +#### Parameters + + + The post-prompt text to use. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 456. + +*** + +### setPostPromptLlmParams + +Merge LLM-specific parameters into the post-prompt configuration. + +#### Signature + +```typescript +setPostPromptLlmParams(params: Record): this +``` + +#### Parameters + + + Key-value LLM parameters to merge. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1001. + +*** + +### setPostPromptUrl + +Override the default post-prompt webhook URL with a custom one. + +#### Signature + +```typescript +setPostPromptUrl(url: string): this +``` + +#### Parameters + + + The custom post-prompt URL. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1847. + +*** + +### setPromptLlmParams + +Merge LLM-specific parameters into the main prompt configuration (e.g. model, temperature). + +#### Signature + +```typescript +setPromptLlmParams(params: Record): this +``` + +#### Parameters + + + Key-value LLM parameters to merge. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 991. + +*** + +### setPromptPom + +Set the prompt as a POM (Prompt Object Model) dictionary. + +Replaces the current POM sections with the provided structured data. +Each entry should have `title`, and optionally `body`, `bullets`, +`numbered`, `numberedBullets`, and `subsections`. + +#### Signature + +```typescript +setPromptPom(pom: Record[]): this +``` + +#### Parameters + + + Array of POM section dictionaries. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Throws + +- Error if POM mode is not enabled (`usePom: false`). + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 577. + +*** + +### setPromptText + +Set the main system prompt text for the AI. + +#### Signature + +```typescript +setPromptText(text: string): this +``` + +#### Parameters + + + The prompt text to use. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 446. + +*** + +### setPronunciations + +Replace all pronunciation rules with a new list. + +#### Signature + +```typescript +setPronunciations(rules: PronunciationRule[]): this +``` + +#### Parameters + + + Array of pronunciation rule objects. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 786. + +*** + +### setQuestionCallback + +Register a callback for dynamic question configuration. The callback is +invoked on each incoming SWML request with the query params, body, and +headers, and must return the list of questions to ask on that call. +Mirrors Python `set_question_callback`. + +#### Signature + +```typescript +setQuestionCallback(callback: InfoGathererQuestionCallback): this +``` + +#### Parameters + + + +#### Returns + +`this` + +#### Source + +[`src/prefabs/InfoGathererAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/InfoGathererAgent.ts) + +Line 159. + +*** + +### setupGracefulShutdown + +Register process signal handlers for clean Kubernetes/Docker shutdown. +Handles SIGTERM and SIGINT, waits for a timeout, then exits. + +**Modifiers:** `static` + +#### Signature + +```typescript +setupGracefulShutdown(opts?: { ...1 fields }): void +``` + +#### Parameters + + + Optional timeout in milliseconds (default 5000). + + + + +#### Returns + +`void` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2751. + +*** + +### setWebHookUrl + +Override the default SWAIG webhook URL with a custom one. + +#### Signature + +```typescript +setWebHookUrl(url: string): this +``` + +#### Parameters + + + The custom webhook URL. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1837. + +*** + +### stop + +Stop the HTTP server. +Mirrors Python's `stop()`. + +#### Signature + +```typescript +stop(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 1009. + +*** + +### swaigPreDispatch + +Extension point: invoked between argument parsing and function dispatch +on POST /swaig. Returns \[target, shortCircuit]: when shortCircuit is +non-null, it's returned directly without dispatching. AgentBase may +override to add session-token validation or ephemeral dynamic-config. + +#### Signature + +```typescript +swaigPreDispatch( + _requestData: Record, + _funcName: string +): [SWMLService, unknown] +``` + +#### Parameters + + + + + +#### Returns + +`[SWMLService, unknown]` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 592. + +*** + +### updateGlobalData + +Merge additional entries into the existing global\_data object. + +#### Signature + +```typescript +updateGlobalData(data: Record): this +``` + +#### Parameters + + + Key-value pairs to merge into global data. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 838. + +*** + +### validateBasicAuth + +Override to add custom basic-auth validation logic beyond credential matching. + +#### Signature + +```typescript +validateBasicAuth( + _username: string, + _password: string +): boolean | Promise +``` + +#### Parameters + + + The username from the request. + + + + The password from the request. + + +#### Returns + +`boolean | Promise` — True if the credentials are valid; false to reject the request. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1980. + +*** + +### validateToolToken + +Validate a tool-call token for the given function. + +Mirrors Python reference `core/mixins/state_mixin.py validate_tool_token`: + +1. Unknown function → `false`. +2. Registered but non-secure → `true` without consulting SessionManager + (non-secure tools never require a token). +3. Raw-dict descriptors (e.g. DataMap) are treated as secure, matching + Python's `isinstance(func, dict) → is_secure = True` branch. +4. Missing token on a secure tool → `false`. +5. Otherwise delegate to `SessionManager.validateToolToken`. + +Divergences from the Python reference: + +- No debug-logging branch: `AgentBase` does not expose an agent-level + debug-mode flag, so the per-call debug telemetry Python emits is + omitted. `SessionManager` still logs its own validation outcomes. +- No token-derived call-id fallback: `SessionManager.debugToken` + truncates the embedded call-id for log safety, so an extracted value + cannot be round-tripped back through `validateToolToken`. The caller + is expected to supply a non-empty `callId`; an empty one is forwarded + unchanged and the underlying validator will reject it. + +#### Signature + +```typescript +validateToolToken(functionName: string, token: string, callId: string): boolean +``` + +#### Parameters + + + + + + + +#### Returns + +`boolean` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1455. + +## Functions + +### createInfoGathererAgent + +Factory function that creates and returns a new InfoGathererAgent. + +#### Signature + +```typescript +createInfoGathererAgent(config: InfoGathererConfig = {}): InfoGathererAgent +``` + +#### Parameters + + + Configuration for the info gatherer agent. + + +#### Returns + +`InfoGathererAgent` — A configured InfoGathererAgent instance. + +#### Source + +[`src/prefabs/InfoGathererAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/InfoGathererAgent.ts) + +Line 375. + +## Type Aliases + +### InfoGathererQuestionCallback + +Callback invoked on each incoming SWML request to produce the list of +questions for that request. Mirrors Python's `set_question_callback`. + +#### Signature + +```typescript +type InfoGathererQuestionCallback = (queryParams: Record, bodyParams: Record, headers: Record) => InfoGathererQuestion[] | Promise +``` + +#### Source + +[`src/prefabs/InfoGathererAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/InfoGathererAgent.ts) + +Line 31. + +## Source + +[`src/prefabs/InfoGathererAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/InfoGathererAgent.ts) + +Line 107. diff --git a/fern/products/sdk-reference/typescript/agents/prefabs/info-gatherer-agent/index__2.mdx b/fern/products/sdk-reference/typescript/agents/prefabs/info-gatherer-agent/index__2.mdx new file mode 100644 index 0000000000..29588487a0 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/prefabs/info-gatherer-agent/index__2.mdx @@ -0,0 +1,86 @@ +--- +slug: "/reference/typescript/agents/prefabs/info-gatherer-agent/index__2" +title: "InfoGathererAgent" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "agents.prefabs.InfoGathererAgent" + parent: "prefabs" + module: "agents.prefabs" +--- +# `InfoGathererAgent` + +## Interfaces + +### InfoGathererConfig + +Configuration for the InfoGathererAgent. + +#### Signature + +```typescript +interface InfoGathererConfig +``` + +#### Properties + + + Additional AgentBase options forwarded to super(). + + + + Agent display name (defaults to `"info_gatherer"`). + + + + Convenience alternative to calling `setQuestionCallback()` after construction. Only consulted when `questions` is not provided. + + + + Optional list of questions to ask. When omitted, the agent runs in dynamic mode and resolves questions via the callback registered with `setQuestionCallback()` (or via `questionCallback` below). + + + + HTTP route for this agent (defaults to `"/info_gatherer"`). + + +#### Source + +[`src/prefabs/InfoGathererAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/InfoGathererAgent.ts) + +Line 38. + +*** + +### InfoGathererQuestion + +A single question in the information-gathering flow. + +#### Signature + +```typescript +interface InfoGathererQuestion +``` + +#### Properties + + + When true, the agent insists the caller confirms before submitting. + + + + Identifier used as the key when storing the caller's answer. + + + + The question text to ask the caller. + + +#### Source + +[`src/prefabs/InfoGathererAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/InfoGathererAgent.ts) + +Line 17. diff --git a/fern/products/sdk-reference/typescript/agents/prefabs/receptionist-agent/index.mdx b/fern/products/sdk-reference/typescript/agents/prefabs/receptionist-agent/index.mdx new file mode 100644 index 0000000000..0ca1a179af --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/prefabs/receptionist-agent/index.mdx @@ -0,0 +1,3687 @@ +--- +slug: "/reference/typescript/agents/prefabs/receptionist-agent" +title: "ReceptionistAgent" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "prefabs.ReceptionistAgent" + parent: "prefabs" + module: "agents.prefabs" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/ReceptionistAgent.ts" +--- +# `ReceptionistAgent` + +Prefab agent that greets callers, collects basic information, and transfers them to the correct department. + +Optionally supports visitor check-in — when enabled, the agent can collect a visitor's name +and purpose-of-visit and invoke a callback (e.g., notify reception via Slack, write to a +database). If not transferring, the call ends after check-in. + +## Signature + +```typescript +class ReceptionistAgent extends AgentBase +``` + +## Inheritance + +**Extends:** [AgentBase](/docs/sdk-reference/reference/typescript/agents/agent-base) + +## Examples + +```typescript +import { ReceptionistAgent } from '@signalwire/sdk'; + +const agent = new ReceptionistAgent({ + companyName: 'Acme Co', + greeting: 'Thanks for calling Acme! How can I direct your call?', + departments: [ + { name: 'sales', description: 'New customer inquiries', number: '+15551112222' }, + { name: 'support', description: 'Existing customer help', number: '+15553334444' }, + { name: 'billing', description: 'Billing and payments', number: '+15555556666' }, + ], + checkInEnabled: true, + onVisitorCheckIn: async (visitor) => { + await notifyFrontDesk(visitor); + }, +}); + +await agent.serve({ port: 3000 }); +``` + +## Properties + + + Unique identifier for this agent instance. + + + + + + + + Domain name for SSL. Mirrors Python's `self.domain`. + + + + Check if full JSON Schema validation is enabled. Mirrors Python's `@property full_validation_enabled`. + + + + Host the server binds to. + + + + Structured logger instance for this agent. Override the inherited SWMLService logger with an AgentBase-tagged one. + + + + Service display name. + + + + Public accessor for the native functions list. Python exposes `self.native_functions` as a public read/write attribute. + + + + + + Public accessor for the agent's POM as a `PromptObjectModel` instance. Python parity: `agent.pom` instance attribute (agent\_base.py line 209) is a `signalwire.pom.pom.PromptObjectModel` when `use_pom=True`, or `None` otherwise. This getter returns the equivalent TypeScript `PromptObjectModel` instance — callers can use `addSection`, `findSection`, `renderMarkdown`, `renderXml`, `toJson`, `toYaml` exactly as in Python. The instance returned is a fresh snapshot built from the current `PomBuilder` state, so mutating it does not feed back into the agent's internal builder. To mutate the agent's prompt, use `promptAddSection` / `promptAddToSection` / `promptAddSubsection`. + + + + Port the server binds to. + + + + Static prompt sections: subclasses can define these declaratively. Each entry is applied via promptAddSection() in the constructor. + + + + Public accessor for the PromptManager (POM). Python exposes `self.pom` as a public attribute. This getter provides equivalent access for direct POM manipulation. + + + + HTTP route path. + + + + Schema validation utilities. Mirrors Python's `self.schema_utils`. + + + + Unified security configuration. Mirrors Python's `self.security`. + + + + Public read-only accessor for the SkillManager. Python exposes `self.skill_manager` as a public attribute. This getter provides equivalent read access. + + + + Path to SSL certificate. Mirrors Python's `self.ssl_cert_path`. + + + + Whether SSL is enabled. Mirrors Python's `self.ssl_enabled`. + + + + Path to SSL private key. Mirrors Python's `self.ssl_key_path`. + + + + The complete set of internal SWAIG function names that accept fillers, matching the SWAIGInternalFiller schema definition. Any name outside this set is silently ignored by the runtime — addInternalFiller / setInternalFillers warn if you pass an unknown name. + + + + + + + + Custom verb handler registry. Mirrors Python's `self.verb_registry`. + + +## Methods + +### addAnswerVerb + +Configure the answer verb (phase 2) with optional settings. + +#### Signature + +```typescript +addAnswerVerb(config?: Record): this +``` + +#### Parameters + + + Optional answer verb configuration. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1501. + +*** + +### addFunctionInclude + +Add a remote SWAIG function include reference. + +#### Signature + +```typescript +addFunctionInclude( + url: string, + functions: string[], + metaData?: Record +): this +``` + +#### Parameters + + + URL of the remote SWAIG endpoint. + + + + Function names available at that endpoint. + + + + Optional metadata to attach to the include. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 966. + +*** + +### addHint + +Add a single speech-recognition hint. + +#### Signature + +```typescript +addHint(hint: string): this +``` + +#### Parameters + + + Word or phrase to boost in speech recognition. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 653. + +*** + +### addHints + +Add multiple speech-recognition hints at once. + +#### Signature + +```typescript +addHints(hints: string[]): this +``` + +#### Parameters + + + Array of words or phrases to boost. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 663. + +*** + +### addInternalFiller + +Add internal filler phrases for a single internal function and language. + +See [setInternalFillers](/docs/sdk-reference/reference/typescript/agents/prefabs/receptionist-agent#set-internal-fillers) for the complete list of supported +functionName values and an explanation of what fillers do. + +#### Signature + +```typescript +addInternalFiller( + functionName: string, + languageCode: string, + fillers: string[] +): this +``` + +#### Parameters + + + One of the supported internal function names (see SUPPORTED\_INTERNAL\_FILLER\_NAMES). Names outside the supported set log a warning and are ignored by the runtime. + + + + BCP-47 language code for the fillers (e.g. 'en-US'). + + + + Array of filler phrases. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 943. + +*** + +### addLanguage + +Add a supported language to the AI configuration. + +#### Signature + +```typescript +addLanguage(config: LanguageConfig): this +``` + +#### Parameters + + + Language configuration including name, code, voice, and optional fillers. `params` may be set to attach engine-specific tuning (voice stability, similarity boost, model knobs, etc.); only emitted into SWML when non-empty so existing entries stay byte-identical when no params are passed (Python ai\_config\_mixin.py `add_language`). + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 694. + +*** + +### addMcpServer + +Add an external MCP server for tool discovery and invocation. +Tools are discovered via MCP protocol at session start and added to the AI's tool list. + +#### Signature + +```typescript +addMcpServer(url: string, opts?: { ...3 fields }): this +``` + +#### Parameters + + + MCP server HTTP endpoint URL + + + + Optional configuration: headers, resources, resourceVars + + + + + + + + +#### Returns + +`this` — This agent instance for chaining + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1146. + +*** + +### addPatternHint + +Add a pattern-based speech-recognition hint with find-and-replace behavior. + +#### Signature + +```typescript +addPatternHint(opts: { ...4 fields }): this +``` + +#### Parameters + + + Pattern hint configuration with a descriptive hint label, regex pattern, replacement string, and optional case-insensitive flag. + + + + + + + + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 674. + +*** + +### addPostAiVerb + +Add a SWML verb to execute after the AI verb (phase 5). + +#### Signature + +```typescript +addPostAiVerb(verbName: string, config: Record): this +``` + +#### Parameters + + + Name of the SWML verb. + + + + Verb configuration object. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1523. + +*** + +### addPostAnswerVerb + +Add a SWML verb to execute after the answer phase but before the AI verb (phase 3). + +#### Signature + +```typescript +addPostAnswerVerb( + verbName: string, + config: number | Record +): this +``` + +#### Parameters + + + Name of the SWML verb. + + + + Verb configuration object. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1512. + +*** + +### addPreAnswerVerb + +Add a SWML verb to execute before the answer phase (phase 1). + +#### Signature + +```typescript +addPreAnswerVerb( + verbName: string, + config: number | Record +): this +``` + +#### Parameters + + + Name of the SWML verb (e.g. "play", "record"). + + + + Verb configuration object. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1491. + +*** + +### addPronunciation + +Add a pronunciation override rule for the TTS engine. + +#### Signature + +```typescript +addPronunciation(rule: PronunciationRule): this +``` + +#### Parameters + + + Pronunciation rule specifying the text to replace and its substitute. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 774. + +*** + +### addSection + +Add a new named section to the SWML document. +Mirrors Python's `add_section()`. + +#### Signature + +```typescript +addSection(sectionName: string): this +``` + +#### Parameters + + + Name of the section to create. + + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 653. + +*** + +### addSkill + +Add a skill to this agent, registering its tools, prompt sections, hints, and global data. + +#### Signature + +```typescript +addSkill(skill: SkillBase): Promise +``` + +#### Parameters + + + The skill instance to add. + + +#### Returns + +`Promise` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1570. + +*** + +### addSkillByName + +Add a skill by its registered name, looking it up in the global SkillRegistry. + +Matches Python's `add_skill(skill_name, params)` which loads skills by string +name via the SkillManager registry. Throws a `ValueError`-equivalent if the +skill name is not found in the registry. + +Accepts a typed [SkillNameOrString](/docs/sdk-reference/reference/typescript/agents/skills/skill-name#skill-name-or-string): one of the built-in +`SkillName` values (autocompleted, with a typo caught at compile +time) or any other string for custom / third-party skills. The value is +forwarded to the registry unchanged — the typing is erased at runtime, so +this matches Python's bare-`str` `add_skill(skill_name, params)`. + +#### Signature + +```typescript +addSkillByName( + skillName: SkillNameOrString, + params?: SkillConfig +): Promise +``` + +#### Parameters + + + The name the skill was registered under in the SkillRegistry. + + + + Optional configuration parameters forwarded to the skill factory. + + +#### Returns + +`Promise` — This agent instance for chaining. + +#### Throws + +- Error if no skill with the given name is registered. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1641. + +*** + +### addSwaigQueryParams + +Add extra query parameters appended to all SWAIG webhook URLs. + +#### Signature + +```typescript +addSwaigQueryParams(params: Record): this +``` + +#### Parameters + + + Key-value pairs to append as query parameters. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1733. + +*** + +### addVerb + +Add a verb to the SWML document. + +#### Signature + +```typescript +addVerb(name: string, config: unknown): this +``` + +#### Parameters + + + Verb name (e.g., 'answer', 'play', 'hangup'). + + + + Verb configuration. + + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 642. + +*** + +### addVerbToSection + +Add a verb to a specific named section. +Mirrors Python's `add_verb_to_section()`. + +#### Signature + +```typescript +addVerbToSection(sectionName: string, verbName: string, config: unknown): this +``` + +#### Parameters + + + Target section name (auto-created if missing). + + + + Verb name. + + + + Verb configuration. + + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 669. + +*** + +### asRouter + +Return this agent's Hono app for mounting as a sub-router in an AgentServer. + +#### Signature + +```typescript +asRouter(): Hono +``` + +#### Returns + +`Hono` — The Hono application instance. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2656. + +*** + +### autoMapSipUsernames + +Automatically register common SIP usernames based on this agent's +name and route. Derives cleaned variants (alphanumeric + underscore) +and registers each via `registerSipUsername()`. + +Port of Python's `auto_map_sip_usernames()`: + +- Registers a cleaned version of the agent name +- Registers a cleaned version of the route (if different from name) +- For names longer than 3 characters, also registers a vowel-stripped variant + +#### Signature + +```typescript +autoMapSipUsernames(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1058. + +*** + +### buildSwmlForRequest + +Service-side SWML-builder hook. Subclasses return a `SwmlBuilder` +to fully replace the document for this request, or `null` to fall +through to `setOnRequestCallback` or the static builder. + +This is distinct from the WebMixin `onRequest(requestData, +callbackPath)` hook on AgentBase (which mirrors Python's +`on_request -> on_swml_request` modification-merge contract). +Use this hook when you want to swap the entire SWML builder; use +`onRequest` / `onSwmlRequest` on AgentBase when you want to merge +targeted modifications into the rendered document. + +Default implementation returns `null` (no-op). + +#### Signature + +```typescript +buildSwmlForRequest( + _queryParams: Record, + _bodyParams: Record, + _headers: Record, + _callbackPath?: string +): SwmlBuilder | null +``` + +#### Parameters + + + + + + + + + +#### Returns + +`SwmlBuilder | null` — A `SwmlBuilder` whose document is sent as the response, or `null` to delegate to the next handler in the chain. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 834. + +*** + +### clearPostAiVerbs + +Remove all post-AI verbs. + +#### Signature + +```typescript +clearPostAiVerbs(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1550. + +*** + +### clearPostAnswerVerbs + +Remove all post-answer verbs. + +#### Signature + +```typescript +clearPostAnswerVerbs(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1541. + +*** + +### clearPreAnswerVerbs + +Remove all pre-answer verbs. + +#### Signature + +```typescript +clearPreAnswerVerbs(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1532. + +*** + +### clearSwaigQueryParams + +Clear all SWAIG query parameters. + +#### Signature + +```typescript +clearSwaigQueryParams(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1742. + +*** + +### constructor + +Create a ReceptionistAgent with the specified departments. + +#### Signature + +```typescript +constructor(config: ReceptionistConfig): ReceptionistAgent +``` + +#### Parameters + + + Configuration including departments (name/description/number), greeting, and voice. + + +#### Returns + +`ReceptionistAgent` + +#### Source + +[`src/prefabs/ReceptionistAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/ReceptionistAgent.ts) + +Line 96. + +*** + +### createToolToken + +Mint a per-call SWAIG-function token via the agent's SessionManager. + +Mirrors Python reference `core/mixins/state_mixin.py _create_tool_token`: +delegates to `SessionManager.createToolToken` and returns an empty +string on any failure (Python catches all exceptions and returns ""). + +#### Signature + +```typescript +createToolToken(toolName: string, callId: string): string +``` + +#### Parameters + + + + + +#### Returns + +`string` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1475. + +*** + +### defineContexts + +Define or replace the contexts configuration for the AI verb. + +#### Signature + +```typescript +defineContexts( + contexts?: Record | ContextBuilder +): ContextBuilder +``` + +#### Parameters + + + An existing ContextBuilder instance or a plain object; a new ContextBuilder is created if omitted. + + +#### Returns + +`ContextBuilder` — The active ContextBuilder for further configuration. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 604. + +*** + +### defineTool + +Register a SWAIG tool (function) that the AI can invoke during a call. + +#### How this becomes a tool the model sees + +A SWAIG function is **exactly the same concept** as a "tool" in +native OpenAI / Anthropic tool calling. On every LLM turn, the SDK +renders each registered SWAIG function into the OpenAI tool schema: + +```json +{ +"type": "function", +"function": { +"name": "your_name_here", +"description": "your description text", +"parameters": { /* your JSON schema */ } +} +} +``` + +That schema goes to the model in the same API call that produces +the next assistant message. The model reads: + +- the **function `description`** to decide WHEN to call this tool +- each **parameter `description`** (inside the JSON schema) to + decide HOW to fill in each argument + +This means **descriptions are prompt engineering**, not developer +comments. A vague description is the #1 cause of "the model has the +right tool but doesn't call it" failures. + +##### Bad vs good descriptions + +```text +BAD : description: 'Lookup function' +GOOD: description: 'Look up a customer's account details by account +number. Use this BEFORE quoting any account-specific info +(balance, plan, status). Do not use for general product +questions.' + +BAD : parameters: { id: { type: 'string', description: 'the id' } } +GOOD: parameters: { account_number: { type: 'string', description: +'The customer's 8-digit account number, no dashes or spaces. +Ask the user if they don't provide it.' } } +``` + +##### Tool count matters + +LLM tool selection accuracy degrades past ~7-8 simultaneously-active +tools per call. Use Step.setFunctions() to partition tools across +steps so only the relevant subset is active at any moment. + +#### Signature + +```typescript +defineTool(opts: { ...11 fields }): this +``` + +#### Parameters + + + Tool definition including name, description, parameter schema, and handler callback. `description` and per-parameter `description` strings are LLM-facing prompt engineering. + + + + + Additional fields to pass through to the SWAIG function definition (Python `**swaig_fields` equivalent). + + + + + + + + + + + + + + + + + + + + External webhook URL; makes this an externally-hosted tool. + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1330. + +*** + +### defineTools + +Register the `collect_caller_info` and `transfer_call` SWAIG tools +(Python parity). When `checkInEnabled` is `true`, also registers the +TS-specific `check_in_visitor` tool. + +#### Signature + +```typescript +defineTools(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/prefabs/ReceptionistAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/ReceptionistAgent.ts) + +Line 234. + +*** + +### defineTypedTool + +Register a SWAIG tool with a typed handler that receives named parameters +instead of the standard `(args, rawData)` convention. + +The SDK wraps the handler to unpack the args dict into positional params. +If no `parameters` schema is provided, one is inferred from the handler's +source code (parameter names and default values). + +#### Signature + +```typescript +defineTypedTool(opts: { ...9 fields }): this +``` + +#### Parameters + + + Tool definition with a typed handler function. + + + + + + + The typed handler. Receives the AI-extracted arguments as named positional parameters (in declaration order), optionally with a trailing `rawData` record, and returns a SWAIG result. Precisely typed as [TypedToolHandler](/docs/sdk-reference/reference/typescript/core/type-inference#typed-tool-handler) rather than the bare `Function` so a non-callable — or a callable that returns nothing usable — is a compile-time error. + + + + + + + + + + + + + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1373. + +*** + +### enableDebugEvents + +Enable debug event webhooks for this agent. + +#### Signature + +```typescript +enableDebugEvents(level: number = 1): this +``` + +#### Parameters + + + Debug verbosity level (defaults to 1). + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1011. + +*** + +### enableDebugRoutes + +Register a callback function that determines routing based on POST data. + +When a routing callback is registered, an endpoint at the specified path +is created in `getApp()`. The callback receives the request body and returns +Enable debug routes for testing and development. + +This is a backward-compatibility stub matching the Python SDK. +In the TypeScript SDK, debug routes (health, ready, debug\_events) +are automatically registered in `getApp()`. + +#### Signature + +```typescript +enableDebugRoutes(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1773. + +*** + +### enableMcpServer + +Expose this agent's tools as an MCP server endpoint at /mcp. +Adds a JSON-RPC 2.0 endpoint that MCP clients (Claude Desktop, other agents) can connect to. + +#### Signature + +```typescript +enableMcpServer(): this +``` + +#### Returns + +`this` — This agent instance for chaining + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1160. + +*** + +### enableSipRouting + +Enable SIP routing for this agent. + +#### Signature + +```typescript +enableSipRouting(autoMap: boolean = true, path: string = '/sip'): this +``` + +#### Parameters + + + When true, automatically map SIP usernames to the agent route (defaults to true). + + + + HTTP path for the SIP routing endpoint (defaults to '/sip'). + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1025. + +*** + +### extractSipUsername + +Extract the SIP username from a request body's call.to field. + +**Modifiers:** `static` + +#### Signature + +```typescript +extractSipUsername(requestBody: Record): string | null +``` + +#### Parameters + + + The parsed request body containing call information. + + +#### Returns + +`string | null` — The extracted SIP username, or null if not found. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1122. + +*** + +### getAllFunctions + +Snapshot of all registered SWAIG functions keyed by name. +(Python parity: `ToolRegistry.get_all_functions`.) + +#### Signature + +```typescript +getAllFunctions(): Record> +``` + +#### Returns + +`Record>` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 529. + +*** + +### getApp + +Get or lazily create the Hono HTTP application with all routes, middleware, auth, and CORS. + +#### Signature + +```typescript +getApp(): Hono +``` + +#### Returns + +`Hono` — The configured Hono application instance. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2269. + +*** + +### getBasicAuthCredentials + +Get the basic-auth credentials used by this agent. + +#### Signature + + + + ```typescript + getBasicAuthCredentials(includeSource?: false): [string, string] + ``` + + + + ```typescript + getBasicAuthCredentials( + includeSource: true + ): [string, string, "provided" | "environment" | "generated"] + ``` + + + +#### Parameters (Overload 1) + + + When true, a third element indicating the credential source is appended. + + +#### Parameters (Overload 2) + + + When true, a third element indicating the credential source is appended. + + +#### Returns (Overload 1) + +`[string, string]` — A tuple of \[username, password] or \[username, password, source]. + +#### Returns (Overload 2) + +`[string, string, "provided" | "environment" | "generated"]` — A tuple of \[username, password] or \[username, password, source]. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2794. + +*** + +### getBuilder + +Get the underlying SwmlBuilder for direct manipulation. + +#### Signature + +```typescript +getBuilder(): SwmlBuilder +``` + +#### Returns + +`SwmlBuilder` — The SwmlBuilder instance. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 632. + +*** + +### getContexts + +Get the contexts dictionary as serialised SWML, or null when no +contexts have been defined yet. + +Matches Python `PromptManager.get_contexts()` which returns the +contexts dict or `None`. + +#### Signature + +```typescript +getContexts(): Record | null +``` + +#### Returns + +`Record | null` — Contexts dict, or null when no contexts are defined. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 641. + +*** + +### getDocument + +Get the SWML document as a dictionary. +Alias for `renderSwml()` that matches Python's `get_document()` name. + +#### Signature + +```typescript +getDocument(): Record +``` + +#### Returns + +`Record` — The SWML document. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 706. + +*** + +### getFullUrl + +Get the full external URL of this agent, using the proxy base URL if available. + +#### Signature + +```typescript +getFullUrl(includeAuth: boolean = false): string +``` + +#### Parameters + + + Whether to embed basic-auth credentials in the URL (defaults to false). + + +#### Returns + +`string` — The fully-qualified URL string. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1857. + +*** + +### getFunction + +Get a registered SWAIG function entry, or undefined. +(Python parity: `ToolRegistry.get_function`.) + +#### Signature + +```typescript +getFunction(name: string): Record | SwaigFunction | undefined +``` + +#### Parameters + + + +#### Returns + +`Record | SwaigFunction | undefined` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 523. + +*** + +### getLanguageParams + +Read the per-language `params` dict for a previously-added language. + +Python parity: `get_language_params(code)`. Returns `undefined` if the +code is unknown or the language has no params set — no exception path. + +#### Signature + +```typescript +getLanguageParams(code: string): Record | undefined +``` + +#### Parameters + + + Language code as previously passed to [addLanguage](/docs/sdk-reference/reference/typescript/agents/prefabs/receptionist-agent#add-language). + + +#### Returns + +`Record | undefined` — The params dict if set, `undefined` otherwise (including when the code is unknown). + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 760. + +*** + +### getMcpServers + +Get configured MCP servers (read-only copy). + +#### Signature + +```typescript +getMcpServers(): Record[] +``` + +#### Returns + +`Record[]` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1171. + +*** + +### getName + +Get the agent's display name. + +#### Signature + +```typescript +getName(): string +``` + +#### Returns + +`string` — The agent name string. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1559. + +*** + +### getPostPrompt + +Get the post-prompt text, if one has been set. + +#### Signature + +```typescript +getPostPrompt(): string | null +``` + +#### Returns + +`string | null` — The post-prompt string, or null if not configured. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 548. + +*** + +### getPrompt + +Get the fully rendered main prompt text. + +#### Signature + +```typescript +getPrompt(): string +``` + +#### Returns + +`string` — The assembled prompt string. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 520. + +*** + +### getPromptPom + +Get the raw POM (Prompt Object Model) structure as an array of section data objects, +when the agent is in POM mode and has at least one section. + +Matches Python `get_prompt()` which returns `Union[str, List[Dict]]` — a raw list when +in POM mode (via `pom.to_list()` / `pom.render_dict()`), or a string otherwise. +The TS `getPrompt()` always returns a string (rendered Markdown), so this companion +method exposes the raw POM structure for callers that need it for serialisation or +inspection (e.g. skills that inspect prompt sections). + +#### Signature + +```typescript +getPromptPom(): Record[] | null +``` + +#### Returns + +`Record[] | null` — An array of POM section data objects, or null if not in POM mode or POM is empty. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 536. + +*** + +### getRawPrompt + +Get the raw prompt text whatever `setPromptText` stored, or null when +no raw prompt has been set. + +Matches Python `PromptManager.get_raw_prompt()` which returns the raw +stored string or `None`. Use this instead of `getPrompt()` when you +need the unrendered text rather than the POM-rendered Markdown. + +#### Signature + +```typescript +getRawPrompt(): string | null +``` + +#### Returns + +`string | null` — The raw prompt string, or null if not set. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 562. + +*** + +### getRegisteredTools + +Get a summary of all registered tools with their names, descriptions, and +parameter schemas. Lifted from AgentBase so the swaig-test CLI can list +tools on a non-AgentBase SWMLService target (sidecar / standalone SWAIG +host). + +#### Signature + +```typescript +getRegisteredTools(): { description: string; name: string; parameters: Record }[] +``` + +#### Returns + +`{ description: string; name: string; parameters: Record }[]` — Array of tool descriptors. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 557. + +*** + +### getTool + +Look up a registered SwaigFunction by name. Lifted from AgentBase so +`swaig-test --exec ` works against a non-AgentBase SWMLService +target. + +#### Signature + +```typescript +getTool(name: string): SwaigFunction | undefined +``` + +#### Parameters + + + The tool name to search for. + + +#### Returns + +`SwaigFunction | undefined` — The SwaigFunction instance, or undefined if not found or not a SwaigFunction. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 581. + +*** + +### getTools + +Public access to the list of registered tools. + +In Python, `define_tools()` is public and returns `List[SWAIGFunction]`. +In TypeScript, `defineTools()` is a protected setup hook (void). This +method provides the equivalent public "get all tools" capability. + +#### Signature + +```typescript +getTools(): SwaigFunction[] +``` + +#### Returns + +`SwaigFunction[]` — Array of all registered SwaigFunction instances. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 371. + +*** + +### handleMcpRequest + +Handle an MCP JSON-RPC 2.0 request. Returns the response object. + +#### Signature + +```typescript +handleMcpRequest( + body: Record +): Promise> +``` + +#### Parameters + + + +#### Returns + +`Promise>` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1204. + +*** + +### hasFunction + +Whether a SWAIG function with the given name is registered. +(Python parity: `ToolRegistry.has_function`.) + +#### Signature + +```typescript +hasFunction(name: string): boolean +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 517. + +*** + +### hasSkill + +Check whether a skill with the given name is registered. + +Accepts a typed [SkillNameOrString](/docs/sdk-reference/reference/typescript/agents/skills/skill-name#skill-name-or-string) so built-in names autocomplete +and a typo is a compile-time error; any other string is still accepted +(custom skills / parity with Python's bare-`str` `has_skill`). + +#### Signature + +```typescript +hasSkill(skillName: SkillNameOrString): boolean +``` + +#### Parameters + + + The skill name to check. + + +#### Returns + +`boolean` — True if a skill with that name exists. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1676. + +*** + +### hasTool + +Whether a tool with the given name is registered. + +#### Signature + +```typescript +hasTool(name: string): boolean +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 511. + +*** + +### isMcpServerEnabled + +Check if MCP server endpoint is enabled. + +#### Signature + +```typescript +isMcpServerEnabled(): boolean +``` + +#### Returns + +`boolean` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1166. + +*** + +### listSkills + +List all registered skills with their names, instance IDs, and initialization status. + +#### Signature + +```typescript +listSkills(): { initialized: boolean; instanceId: string; name: string }[] +``` + +#### Returns + +`{ initialized: boolean; instanceId: string; name: string }[]` — Array of skill descriptors. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1662. + +*** + +### listToolNames + +List registered tool names in insertion order (Map preserves it). + +#### Signature + +```typescript +listToolNames(): string[] +``` + +#### Returns + +`string[]` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 545. + +*** + +### manualSetProxyUrl + +Manually set the proxy base URL used for webhook URL generation. + +#### Signature + +```typescript +manualSetProxyUrl(url: string): this +``` + +#### Parameters + + + The external-facing base URL (trailing slashes are stripped). + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1754. + +*** + +### onDebugEvent + +Lifecycle hook called when a debug event webhook is received. Override in subclasses. + +#### Signature + +```typescript +onDebugEvent(_event: Record): void | Promise +``` + +#### Parameters + + + The debug event payload. + + +#### Returns + +`void | Promise` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1970. + +*** + +### onFunctionCall + +Hook called before each SWAIG function execution. Override in subclasses. + +**Behavioral note:** In the Python SDK, `on_function_call` IS the dispatcher +— it retrieves and executes the function, returning the result. In TypeScript, +`fn.execute()` is called separately after this hook. However, if this method +returns a non-void value, it is used as the result and the default execution +is skipped, enabling dispatch interception parity with Python. + +#### Signature + +```typescript +onFunctionCall( + _name: string, + _args: Record, + _rawData: Record +): void | Record | Promise> +``` + +#### Parameters + + + Name of the function about to execute. + + + + Parsed arguments for the function. + + + + The full raw SWAIG request payload. + + +#### Returns + +`void | Record | Promise>` — Optionally a result dict to short-circuit default execution, or void/undefined to proceed normally. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1999. + +*** + +### onRequest + +Lifecycle hook called when SWML is requested. Default delegates to +[onSwmlRequest](/docs/sdk-reference/reference/typescript/agents/prefabs/receptionist-agent#on-swml-request) and returns its result. Subclasses typically +override `onSwmlRequest` rather than this method. + +Matches Python `WebMixin.on_request(request_data, callback_path)`. The +cross-language API is the two-arg form; the Hono `context` argument is +a TypeScript-side extra preserved for callers that already have it but +is not part of the audited surface. + +#### Signature + +```typescript +onRequest( + requestData?: Record | null, + callbackPath?: string | null +): void | Record | Promise> +``` + +#### Parameters + + + The parsed request body. + + + + Optional callback path from the request. + + +#### Returns + +`void | Record | Promise>` — Optionally a dict of SWML modifications, or undefined for default rendering. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1935. + +*** + +### onSummary + +Python-style receptionist summary hook. Default is a no-op; subclasses +may override to persist the summary. Mirrors Python `on_summary` +(receptionist.py lines 278–287). + +#### Signature + +```typescript +onSummary( + _summary: Record | null, + _rawData: Record +): void | Promise +``` + +#### Parameters + + + + + +#### Returns + +`void | Promise` + +#### Source + +[`src/prefabs/ReceptionistAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/ReceptionistAgent.ts) + +Line 376. + +*** + +### onSwmlRequest + +Lifecycle hook called on every SWML request before rendering. Override in subclasses. + +May optionally return a modification dict that will be merged into the +rendered SWML document (matching Python's `Optional[dict]` return type). + +Matches Python `on_swml_request(request_data, callback_path, request)` — the third +parameter is the FastAPI `Request` in Python; here it is the raw Hono context object +so that subclasses can access query parameters (`context.req.query()`), raw request +headers (`context.req.raw.headers`), etc. + +#### Signature + +```typescript +onSwmlRequest( + _rawData: Record, + _callbackPath?: string, + _context?: any +): void | Record | Promise> +``` + +#### Parameters + + + The parsed request body. + + + + Optional callback path from the request. + + + + The raw Hono context object (c), providing access to headers and query params. + + +#### Returns + +`void | Record | Promise>` — Optionally a dict of SWML modifications, or void. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1958. + +*** + +### promptAddSection + +Add a new section to the prompt with optional body, bullets, and subsections. + +#### Signature + +```typescript +promptAddSection(title: string, opts?: { ...5 fields }): this +``` + +#### Parameters + + + Section heading. + + + + Optional section content including body text, bullet points, and subsections. + + + + + + + + + + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 467. + +*** + +### promptAddSubsection + +Add a subsection under an existing prompt section. + +#### Signature + +```typescript +promptAddSubsection( + parentTitle: string, + title: string, + opts?: { ...2 fields } +): this +``` + +#### Parameters + + + Title of the parent section. + + + + Title of the new subsection. + + + + Optional body text and bullet points for the subsection. + + + + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 502. + +*** + +### promptAddToSection + +Append content to an existing prompt section. + +#### Signature + +```typescript +promptAddToSection(title: string, opts?: { ...3 fields }): this +``` + +#### Parameters + + + Title of the section to append to. + + + + Content to add: body text, a single bullet, or multiple bullets. + + + + + + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 487. + +*** + +### promptHasSection + +Check whether a prompt section with the given title exists. + +#### Signature + +```typescript +promptHasSection(title: string): boolean +``` + +#### Parameters + + + Section title to look for. + + +#### Returns + +`boolean` — True if the section exists. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 512. + +*** + +### registerAdditionalRoutes + +Extension point: register additional Hono routes after SWMLService +mounts /health, /ready, /swaig, and the main route. AgentBase uses +this to add /post\_prompt, /check\_for\_input, /debug\_events, /mcp. + +#### Signature + +```typescript +registerAdditionalRoutes(_app: Hono): void +``` + +#### Parameters + + + +#### Returns + +`void` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 604. + +*** + +### registerRoutingCallback + +Register a callback at a specific HTTP path that decides how to route an +incoming request. + +When called, the endpoint at `path` will invoke `callback` with the parsed +request body. If `callback` returns a non-empty route string the server +responds with `{ action: "redirect", route }` so the platform can forward the +request to the right agent. If `callback` returns `null` / `undefined` the +agent's own SWML is returned instead (normal processing). + +Mirrors Python `swml_service.register_routing_callback` / +`web_mixin.register_routing_callback`. + +#### Signature + +```typescript +registerRoutingCallback(callback: RoutingCallback, path: string = '/sip'): this +``` + +#### Parameters + + + Function receiving the parsed request body and returning a route string to redirect, or null/undefined for normal processing. + + + + HTTP path where this callback endpoint is registered (default: '/sip'). + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1102. + +*** + +### registerSipUsername + +Register a SIP username to route to this agent. + +#### Signature + +```typescript +registerSipUsername(username: string): this +``` + +#### Parameters + + + The SIP username to register. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1040. + +*** + +### registerSwaigFunction + +Register a SwaigFunction instance or a raw function descriptor (DataMap). + +#### Signature + +```typescript +registerSwaigFunction(fn: Record | SwaigFunction): this +``` + +#### Parameters + + + +#### Returns + +`this` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 472. + +*** + +### registerVerbHandler + +Register a custom verb handler. +Mirrors Python's `register_verb_handler()`. + +#### Signature + +```typescript +registerVerbHandler(handler: SWMLVerbHandler): void +``` + +#### Parameters + + + The verb handler to register. + + +#### Returns + +`void` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 726. + +*** + +### removeFunction + +Remove a registered SWAIG function. Returns true when removed, +false when not found. (Python parity: +`ToolRegistry.remove_function`.) + +#### Signature + +```typescript +removeFunction(name: string): boolean +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 540. + +*** + +### removeSkill + +Remove a previously added skill by its instance ID. + +#### Signature + +```typescript +removeSkill(instanceId: string): Promise +``` + +#### Parameters + + + The unique instance ID of the skill to remove. + + +#### Returns + +`Promise` — True if the skill was found and removed. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1654. + +*** + +### removeSkillByName + +Remove a skill by its name (Python parity). + +Python's `remove_skill(skill_name)` removes by skill name. +The existing `removeSkill(instanceId)` removes by instance ID. +This method provides name-based removal for cross-SDK parity. + +#### Signature + +```typescript +removeSkillByName(skillName: string): Promise +``` + +#### Parameters + + + The skill name to remove. + + +#### Returns + +`Promise` — True if a skill with that name was found and removed. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1690. + +*** + +### renderDocument + +Render the SWML document as a JSON string. +Mirrors Python's `render_document()`. + +#### Signature + +```typescript +renderDocument(): string +``` + +#### Returns + +`string` — JSON-encoded SWML document. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 715. + +*** + +### renderSwml + +Render the complete SWML document by assembling all 5 phases: pre-answer, answer, +post-answer, AI, and post-AI verbs. + +#### Signature + +```typescript +renderSwml(callId?: string, modifications?: Record): string +``` + +#### Parameters + + + Optional call ID to use for session tokens; auto-generated if omitted. + + + + Optional dict returned from `onSwmlRequest` to merge into the AI verb config before rendering. Matches Python's `_render_swml(modifications)` semantics: `global_data` is deep-merged; all other keys override the AI config directly. + + +#### Returns + +`string` — The rendered SWML document as a JSON string. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2019. + +*** + +### resetContexts + +Remove all contexts, returning the agent to a no-contexts state. + +This is a convenience wrapper around `defineContexts().reset()`. +Use it in a dynamic config callback when you need to rebuild +contexts from scratch for a specific request. + +#### Signature + +```typescript +resetContexts(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 625. + +*** + +### resetDocument + +Reset the SWML document to an empty state. +Mirrors Python's `reset_document()`. + +#### Signature + +```typescript +resetDocument(): this +``` + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 679. + +*** + +### run + +Alias for [serve](/docs/sdk-reference/reference/typescript/agents/prefabs/receptionist-agent#serve). Starts the HTTP server. + +#### Signature + +```typescript +run(opts?: { ...2 fields }): Promise +``` + +#### Parameters + + + Optional host and port overrides. + + + + + + +#### Returns + +`Promise` — A promise that resolves once the server is running. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2702. + +*** + +### runServerless + +Handle a single serverless invocation (AWS Lambda, Google Cloud Functions, Azure Functions, or CGI). + +Matches Python `run(event, context)` when executed in a serverless environment. Python's +`run()` auto-detects the platform via `get_execution_mode()` and dispatches accordingly; +in TypeScript the serverless path is an **explicit** method so that `run()` keeps its +HTTP-server semantics and callers opt in to serverless dispatch deliberately. + +Platform detection follows the same environment-variable heuristics as Python's +`ServerlessMixin`: `AWS_LAMBDA_FUNCTION_NAME` → Lambda, `K_SERVICE` → GCF, +`FUNCTIONS_WORKER_RUNTIME` → Azure, `GATEWAY_INTERFACE` → CGI. + +Usage in a Lambda handler file: + +```ts +export const handler = (event: any, context: any) => agent.runServerless(event, context); +``` + +#### Signature + +```typescript +runServerless( + event: ServerlessEvent, + context?: unknown, + platform?: "lambda" | "gcf" | "azure" | "cgi" | "auto" +): Promise +``` + +#### Parameters + + + The serverless event payload (Lambda event, GCF request body, etc.). + + + + The serverless context object (Lambda context, Azure context, etc.). + + + + Optional platform override; defaults to 'auto' (environment detection). + + +#### Returns + +`Promise` — The normalized serverless response object. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2728. + +*** + +### serve + +Start the HTTP server and begin listening for requests. + +Uses `@hono/node-server` under the hood. When run in CLI mode +(`SWAIG_CLI_MODE=true`, set automatically by `npx swaig-test`), this is a +no-op so agent config can be inspected without starting a server. + +#### Signature + +```typescript +serve(opts?: { ...2 fields }): Promise +``` + +#### Parameters + + + Optional host/port overrides. Defaults to the values provided in the constructor options or the `PORT` environment variable. + + + + + + +#### Returns + +`Promise` — A promise that resolves once the server has begun listening. + +#### Examples + +```typescript +const agent = new AgentBase({ name: 'demo', port: 3000 }); +await agent.serve(); +// Or override at runtime: +await agent.serve({ port: 8080, host: '127.0.0.1' }); +``` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2679. + +*** + +### setDynamicConfigCallback + +Set a callback invoked on each SWML request to dynamically modify an ephemeral agent copy. + +The callback receives a clone of this agent — mutations apply only to the current +request, so you can vary prompt, tools, languages, params, or global data per call +without affecting the long-lived agent instance. + +#### Signature + +```typescript +setDynamicConfigCallback(cb: DynamicConfigCallback): this +``` + +#### Parameters + + + Callback receiving `(queryParams, bodyParams, headers, agent)` where `agent` is the ephemeral `AgentBase` copy to mutate. May be async. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Examples + +```typescript +agent.setDynamicConfigCallback((query, body, headers, agent) => { + const lang = query.lang ?? 'en'; + if (lang === 'es') { + (agent as AgentBase).setPromptText('Eres un asistente útil.'); + } +}); +``` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1723. + +*** + +### setFunctionIncludes + +Replace the entire list of function includes. +Each include must have a `url` and `functions` array. + +#### Signature + +```typescript +setFunctionIncludes(includes: FunctionInclude[]): this +``` + +#### Parameters + + + Array of function include objects. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 979. + +*** + +### setGlobalData + +Merge data into the global\_data object passed into the AI configuration. + +Matches Python `set_global_data` which calls `.update()` on the internal dict — +existing keys are preserved; incoming keys overwrite on collision. Skills and +other callers can each contribute keys without clobbering one another. + +If you need to replace the entire object, assign a new agent instance or use +`Object.assign(agent.globalData, {})` to clear first. + +#### Signature + +```typescript +setGlobalData(data: Record): this +``` + +#### Parameters + + + Key-value pairs to merge into global data. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 828. + +*** + +### setInternalFillers + +Set internal fillers for native SWAIG functions. + +Internal fillers are short phrases the AI agent speaks (via TTS) while +an internal/native function is running, so the caller doesn't hear +dead air during transitions or background work. + +Supported function names (matches the SWAIGInternalFiller schema): + +hangup — when the agent is hanging up +check\_time — when checking the time +wait\_for\_user — when waiting for user input +wait\_seconds — during deliberate pauses +adjust\_response\_latency — when adjusting response timing +next\_step — transitioning between steps in prompt.contexts +change\_context — switching between contexts in prompt.contexts +get\_visual\_input — processing visual input (enable\_vision=true) +get\_ideal\_strategy — thinking (enable\_thinking=true) + +Notably NOT supported: change\_step, gather\_submit, or arbitrary +user-defined SWAIG function names. The runtime only honors fillers +for the names listed above; everything else is silently ignored at +the SWML level. This method warns at registration time if you pass +an unknown name so you catch the typo early. + +#### Signature + +```typescript +setInternalFillers( + internalFillers: Record> +): this +``` + +#### Parameters + + + Map of function name to language-keyed filler phrases. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Examples + +```typescript +agent.setInternalFillers({ + next_step: { + 'en-US': ['Moving to the next step...', 'Great, let us continue...'], + 'es': ['Pasando al siguiente paso...'] + }, + check_time: { + 'en-US': ['Let me check the time...'] + } +}); +``` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 910. + +*** + +### setLanguageParams + +Set (or replace) the per-language `params` dict on an already-added +language. Useful when language entries are built up via [addLanguage](/docs/sdk-reference/reference/typescript/agents/prefabs/receptionist-agent#add-language) +first and engine-specific tuning is added later (e.g., from a config +loader). + +Python parity: `set_language_params(code, params)`. Passing an empty +object removes the `params` key entirely. Unknown codes are a no-op. + +#### Signature + +```typescript +setLanguageParams(code: string, params: Record): this +``` + +#### Parameters + + + Language code as previously passed to [addLanguage](/docs/sdk-reference/reference/typescript/agents/prefabs/receptionist-agent#add-language) (e.g. `"en-US"`). + + + + Engine-specific params dict to attach. Empty object removes the key. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 737. + +*** + +### setLanguages + +Replace all configured languages with a new list. + +#### Signature + +```typescript +setLanguages(languages: LanguageConfig[]): this +``` + +#### Parameters + + + Array of language configurations. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 718. + +*** + +### setNativeFunctions + +Set the list of native SWAIG function names (built-in platform functions). + +#### Signature + +```typescript +setNativeFunctions(funcs: string[]): this +``` + +#### Parameters + + + Array of native function names. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 848. + +*** + +### setOnRequestCallback + +Set a callback invoked per-request to dynamically build SWML. +When set, the static SwmlBuilder is ignored and the callback's +returned SwmlBuilder is used instead. + +#### Signature + +```typescript +setOnRequestCallback(cb: OnRequestCallback): this +``` + +#### Parameters + + + Callback receiving query params, body params, and headers. + + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 850. + +*** + +### setParam + +Set a single AI parameter (e.g. "temperature", "top\_p"). + +#### Signature + +```typescript +setParam(key: string, value: unknown): this +``` + +#### Parameters + + + Parameter name. + + + + Parameter value. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 800. + +*** + +### setParams + +Merge multiple AI parameters into the existing params object. + +#### Signature + +```typescript +setParams(params: Record): this +``` + +#### Parameters + + + Key-value pairs to merge. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 810. + +*** + +### setPostPrompt + +Set the post-prompt text evaluated after the call ends. + +#### Signature + +```typescript +setPostPrompt(text: string): this +``` + +#### Parameters + + + The post-prompt text to use. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 456. + +*** + +### setPostPromptLlmParams + +Merge LLM-specific parameters into the post-prompt configuration. + +#### Signature + +```typescript +setPostPromptLlmParams(params: Record): this +``` + +#### Parameters + + + Key-value LLM parameters to merge. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1001. + +*** + +### setPostPromptUrl + +Override the default post-prompt webhook URL with a custom one. + +#### Signature + +```typescript +setPostPromptUrl(url: string): this +``` + +#### Parameters + + + The custom post-prompt URL. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1847. + +*** + +### setPromptLlmParams + +Merge LLM-specific parameters into the main prompt configuration (e.g. model, temperature). + +#### Signature + +```typescript +setPromptLlmParams(params: Record): this +``` + +#### Parameters + + + Key-value LLM parameters to merge. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 991. + +*** + +### setPromptPom + +Set the prompt as a POM (Prompt Object Model) dictionary. + +Replaces the current POM sections with the provided structured data. +Each entry should have `title`, and optionally `body`, `bullets`, +`numbered`, `numberedBullets`, and `subsections`. + +#### Signature + +```typescript +setPromptPom(pom: Record[]): this +``` + +#### Parameters + + + Array of POM section dictionaries. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Throws + +- Error if POM mode is not enabled (`usePom: false`). + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 577. + +*** + +### setPromptText + +Set the main system prompt text for the AI. + +#### Signature + +```typescript +setPromptText(text: string): this +``` + +#### Parameters + + + The prompt text to use. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 446. + +*** + +### setPronunciations + +Replace all pronunciation rules with a new list. + +#### Signature + +```typescript +setPronunciations(rules: PronunciationRule[]): this +``` + +#### Parameters + + + Array of pronunciation rule objects. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 786. + +*** + +### setupGracefulShutdown + +Register process signal handlers for clean Kubernetes/Docker shutdown. +Handles SIGTERM and SIGINT, waits for a timeout, then exits. + +**Modifiers:** `static` + +#### Signature + +```typescript +setupGracefulShutdown(opts?: { ...1 fields }): void +``` + +#### Parameters + + + Optional timeout in milliseconds (default 5000). + + + + +#### Returns + +`void` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2751. + +*** + +### setWebHookUrl + +Override the default SWAIG webhook URL with a custom one. + +#### Signature + +```typescript +setWebHookUrl(url: string): this +``` + +#### Parameters + + + The custom webhook URL. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1837. + +*** + +### stop + +Stop the HTTP server. +Mirrors Python's `stop()`. + +#### Signature + +```typescript +stop(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 1009. + +*** + +### swaigPreDispatch + +Extension point: invoked between argument parsing and function dispatch +on POST /swaig. Returns \[target, shortCircuit]: when shortCircuit is +non-null, it's returned directly without dispatching. AgentBase may +override to add session-token validation or ephemeral dynamic-config. + +#### Signature + +```typescript +swaigPreDispatch( + _requestData: Record, + _funcName: string +): [SWMLService, unknown] +``` + +#### Parameters + + + + + +#### Returns + +`[SWMLService, unknown]` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 592. + +*** + +### updateGlobalData + +Merge additional entries into the existing global\_data object. + +#### Signature + +```typescript +updateGlobalData(data: Record): this +``` + +#### Parameters + + + Key-value pairs to merge into global data. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 838. + +*** + +### validateBasicAuth + +Override to add custom basic-auth validation logic beyond credential matching. + +#### Signature + +```typescript +validateBasicAuth( + _username: string, + _password: string +): boolean | Promise +``` + +#### Parameters + + + The username from the request. + + + + The password from the request. + + +#### Returns + +`boolean | Promise` — True if the credentials are valid; false to reject the request. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1980. + +*** + +### validateToolToken + +Validate a tool-call token for the given function. + +Mirrors Python reference `core/mixins/state_mixin.py validate_tool_token`: + +1. Unknown function → `false`. +2. Registered but non-secure → `true` without consulting SessionManager + (non-secure tools never require a token). +3. Raw-dict descriptors (e.g. DataMap) are treated as secure, matching + Python's `isinstance(func, dict) → is_secure = True` branch. +4. Missing token on a secure tool → `false`. +5. Otherwise delegate to `SessionManager.validateToolToken`. + +Divergences from the Python reference: + +- No debug-logging branch: `AgentBase` does not expose an agent-level + debug-mode flag, so the per-call debug telemetry Python emits is + omitted. `SessionManager` still logs its own validation outcomes. +- No token-derived call-id fallback: `SessionManager.debugToken` + truncates the embedded call-id for log safety, so an extracted value + cannot be round-tripped back through `validateToolToken`. The caller + is expected to supply a non-empty `callId`; an empty one is forwarded + unchanged and the underlying validator will reject it. + +#### Signature + +```typescript +validateToolToken(functionName: string, token: string, callId: string): boolean +``` + +#### Parameters + + + + + + + +#### Returns + +`boolean` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1455. + +## Functions + +### createReceptionistAgent + +Factory function that creates and returns a new ReceptionistAgent. + +#### Signature + +```typescript +createReceptionistAgent(config: ReceptionistConfig): ReceptionistAgent +``` + +#### Parameters + + + Configuration for the receptionist agent. + + +#### Returns + +`ReceptionistAgent` — A configured ReceptionistAgent instance. + +#### Source + +[`src/prefabs/ReceptionistAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/ReceptionistAgent.ts) + +Line 391. + +## Source + +[`src/prefabs/ReceptionistAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/ReceptionistAgent.ts) + +Line 84. diff --git a/fern/products/sdk-reference/typescript/agents/prefabs/receptionist-agent/index__2.mdx b/fern/products/sdk-reference/typescript/agents/prefabs/receptionist-agent/index__2.mdx new file mode 100644 index 0000000000..44ee85bce5 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/prefabs/receptionist-agent/index__2.mdx @@ -0,0 +1,102 @@ +--- +slug: "/reference/typescript/agents/prefabs/receptionist-agent/index__2" +title: "ReceptionistAgent" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "agents.prefabs.ReceptionistAgent" + parent: "prefabs" + module: "agents.prefabs" +--- +# `ReceptionistAgent` + +## Interfaces + +### ReceptionistConfig + +Configuration for the [ReceptionistAgent](/docs/sdk-reference/reference/typescript/agents/prefabs/receptionist-agent). + +#### Signature + +```typescript +interface ReceptionistConfig +``` + +#### Properties + + + Additional AgentBase options forwarded to super(). + + + + Whether visitor check-in functionality is enabled. Default `false`. + + + + Optional company name. Appended to the greeting when provided. + + + + Departments the agent can transfer callers to. + + + + Initial greeting message. Defaults to the Python receptionist greeting. + + + + Agent display name (defaults to `"receptionist"`). + + + + Callback fired when a visitor checks in. + + + + HTTP route for this agent (defaults to `"/receptionist"`). + + + + Voice identifier passed to `addLanguage`. Defaults to `"rime.spore"`. + + +#### Source + +[`src/prefabs/ReceptionistAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/ReceptionistAgent.ts) + +Line 27. + +*** + +### ReceptionistDepartment + +A department the receptionist can route callers to. + +#### Signature + +```typescript +interface ReceptionistDepartment +``` + +#### Properties + + + Description of the department's purpose (shown to the AI). + + + + Department identifier (e.g. `"sales"`, `"support"`). + + + + Phone number (or SIP address) used by `transfer_call`. + + +#### Source + +[`src/prefabs/ReceptionistAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/ReceptionistAgent.ts) + +Line 17. diff --git a/fern/products/sdk-reference/typescript/agents/prefabs/survey-agent/index.mdx b/fern/products/sdk-reference/typescript/agents/prefabs/survey-agent/index.mdx new file mode 100644 index 0000000000..3dc1c36815 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/prefabs/survey-agent/index.mdx @@ -0,0 +1,3712 @@ +--- +slug: "/reference/typescript/agents/prefabs/survey-agent" +title: "SurveyAgent" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "prefabs.SurveyAgent" + parent: "prefabs" + module: "agents.prefabs" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/SurveyAgent.ts" +--- +# `SurveyAgent` + +Prefab agent that conducts surveys with branching logic, answer scoring, and conditional question flow. + +Each survey question declares its response type (rating, yes/no, open text, etc.), an optional +set of conditional follow-ups, and a scoring map. The agent walks the question tree, tallies a +total score, and exposes the full response map at call end via `onSummary()`. + +## Signature + +```typescript +class SurveyAgent extends AgentBase +``` + +## Inheritance + +**Extends:** [AgentBase](/docs/sdk-reference/reference/typescript/agents/agent-base) + +## Examples + +```typescript +import { SurveyAgent } from '@signalwire/sdk'; + +const agent = new SurveyAgent({ + surveyName: 'CSAT', + brandName: 'Acme Co', + questions: [ + { id: 'q1', text: 'How satisfied were you with our service?', type: 'rating', scale: 5 }, + { id: 'q2', text: 'Would you recommend us to a friend?', type: 'yesno' }, + { id: 'q3', text: 'Anything else you want to share?', type: 'open' }, + ], +}); + +await agent.serve({ port: 3000 }); +``` + +## Properties + + + Unique identifier for this agent instance. + + + + + + + + Brand/company name used in prompts. + + + + Closing message shown when the survey completes. + + + + Domain name for SSL. Mirrors Python's `self.domain`. + + + + Check if full JSON Schema validation is enabled. Mirrors Python's `@property full_validation_enabled`. + + + + Host the server binds to. + + + + Opening message before the first question. + + + + Structured logger instance for this agent. Override the inherited SWMLService logger with an AgentBase-tagged one. + + + + Maximum number of times to retry invalid answers. + + + + Service display name. + + + + Public accessor for the native functions list. Python exposes `self.native_functions` as a public read/write attribute. + + + + + + Public accessor for the agent's POM as a `PromptObjectModel` instance. Python parity: `agent.pom` instance attribute (agent\_base.py line 209) is a `signalwire.pom.pom.PromptObjectModel` when `use_pom=True`, or `None` otherwise. This getter returns the equivalent TypeScript `PromptObjectModel` instance — callers can use `addSection`, `findSection`, `renderMarkdown`, `renderXml`, `toJson`, `toYaml` exactly as in Python. The instance returned is a fresh snapshot built from the current `PomBuilder` state, so mutating it does not feed back into the agent's internal builder. To mutate the agent's prompt, use `promptAddSection` / `promptAddToSection` / `promptAddSubsection`. + + + + Port the server binds to. + + + + Static prompt sections: subclasses can define these declaratively. Each entry is applied via promptAddSection() in the constructor. + + + + Public accessor for the PromptManager (POM). Python exposes `self.pom` as a public attribute. This getter provides equivalent access for direct POM manipulation. + + + + The configured survey questions (public, matching Python). + + + + HTTP route path. + + + + Schema validation utilities. Mirrors Python's `self.schema_utils`. + + + + Unified security configuration. Mirrors Python's `self.security`. + + + + Public read-only accessor for the SkillManager. Python exposes `self.skill_manager` as a public attribute. This getter provides equivalent read access. + + + + Path to SSL certificate. Mirrors Python's `self.ssl_cert_path`. + + + + Whether SSL is enabled. Mirrors Python's `self.ssl_enabled`. + + + + Path to SSL private key. Mirrors Python's `self.ssl_key_path`. + + + + The complete set of internal SWAIG function names that accept fillers, matching the SWAIGInternalFiller schema definition. Any name outside this set is silently ignored by the runtime — addInternalFiller / setInternalFillers warn if you pass an unknown name. + + + + Human-readable survey name. + + + + + + + + Custom verb handler registry. Mirrors Python's `self.verb_registry`. + + +## Methods + +### addAnswerVerb + +Configure the answer verb (phase 2) with optional settings. + +#### Signature + +```typescript +addAnswerVerb(config?: Record): this +``` + +#### Parameters + + + Optional answer verb configuration. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1501. + +*** + +### addFunctionInclude + +Add a remote SWAIG function include reference. + +#### Signature + +```typescript +addFunctionInclude( + url: string, + functions: string[], + metaData?: Record +): this +``` + +#### Parameters + + + URL of the remote SWAIG endpoint. + + + + Function names available at that endpoint. + + + + Optional metadata to attach to the include. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 966. + +*** + +### addHint + +Add a single speech-recognition hint. + +#### Signature + +```typescript +addHint(hint: string): this +``` + +#### Parameters + + + Word or phrase to boost in speech recognition. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 653. + +*** + +### addHints + +Add multiple speech-recognition hints at once. + +#### Signature + +```typescript +addHints(hints: string[]): this +``` + +#### Parameters + + + Array of words or phrases to boost. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 663. + +*** + +### addInternalFiller + +Add internal filler phrases for a single internal function and language. + +See [setInternalFillers](/docs/sdk-reference/reference/typescript/agents/prefabs/survey-agent#set-internal-fillers) for the complete list of supported +functionName values and an explanation of what fillers do. + +#### Signature + +```typescript +addInternalFiller( + functionName: string, + languageCode: string, + fillers: string[] +): this +``` + +#### Parameters + + + One of the supported internal function names (see SUPPORTED\_INTERNAL\_FILLER\_NAMES). Names outside the supported set log a warning and are ignored by the runtime. + + + + BCP-47 language code for the fillers (e.g. 'en-US'). + + + + Array of filler phrases. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 943. + +*** + +### addLanguage + +Add a supported language to the AI configuration. + +#### Signature + +```typescript +addLanguage(config: LanguageConfig): this +``` + +#### Parameters + + + Language configuration including name, code, voice, and optional fillers. `params` may be set to attach engine-specific tuning (voice stability, similarity boost, model knobs, etc.); only emitted into SWML when non-empty so existing entries stay byte-identical when no params are passed (Python ai\_config\_mixin.py `add_language`). + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 694. + +*** + +### addMcpServer + +Add an external MCP server for tool discovery and invocation. +Tools are discovered via MCP protocol at session start and added to the AI's tool list. + +#### Signature + +```typescript +addMcpServer(url: string, opts?: { ...3 fields }): this +``` + +#### Parameters + + + MCP server HTTP endpoint URL + + + + Optional configuration: headers, resources, resourceVars + + + + + + + + +#### Returns + +`this` — This agent instance for chaining + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1146. + +*** + +### addPatternHint + +Add a pattern-based speech-recognition hint with find-and-replace behavior. + +#### Signature + +```typescript +addPatternHint(opts: { ...4 fields }): this +``` + +#### Parameters + + + Pattern hint configuration with a descriptive hint label, regex pattern, replacement string, and optional case-insensitive flag. + + + + + + + + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 674. + +*** + +### addPostAiVerb + +Add a SWML verb to execute after the AI verb (phase 5). + +#### Signature + +```typescript +addPostAiVerb(verbName: string, config: Record): this +``` + +#### Parameters + + + Name of the SWML verb. + + + + Verb configuration object. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1523. + +*** + +### addPostAnswerVerb + +Add a SWML verb to execute after the answer phase but before the AI verb (phase 3). + +#### Signature + +```typescript +addPostAnswerVerb( + verbName: string, + config: number | Record +): this +``` + +#### Parameters + + + Name of the SWML verb. + + + + Verb configuration object. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1512. + +*** + +### addPreAnswerVerb + +Add a SWML verb to execute before the answer phase (phase 1). + +#### Signature + +```typescript +addPreAnswerVerb( + verbName: string, + config: number | Record +): this +``` + +#### Parameters + + + Name of the SWML verb (e.g. "play", "record"). + + + + Verb configuration object. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1491. + +*** + +### addPronunciation + +Add a pronunciation override rule for the TTS engine. + +#### Signature + +```typescript +addPronunciation(rule: PronunciationRule): this +``` + +#### Parameters + + + Pronunciation rule specifying the text to replace and its substitute. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 774. + +*** + +### addSection + +Add a new named section to the SWML document. +Mirrors Python's `add_section()`. + +#### Signature + +```typescript +addSection(sectionName: string): this +``` + +#### Parameters + + + Name of the section to create. + + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 653. + +*** + +### addSkill + +Add a skill to this agent, registering its tools, prompt sections, hints, and global data. + +#### Signature + +```typescript +addSkill(skill: SkillBase): Promise +``` + +#### Parameters + + + The skill instance to add. + + +#### Returns + +`Promise` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1570. + +*** + +### addSkillByName + +Add a skill by its registered name, looking it up in the global SkillRegistry. + +Matches Python's `add_skill(skill_name, params)` which loads skills by string +name via the SkillManager registry. Throws a `ValueError`-equivalent if the +skill name is not found in the registry. + +Accepts a typed [SkillNameOrString](/docs/sdk-reference/reference/typescript/agents/skills/skill-name#skill-name-or-string): one of the built-in +`SkillName` values (autocompleted, with a typo caught at compile +time) or any other string for custom / third-party skills. The value is +forwarded to the registry unchanged — the typing is erased at runtime, so +this matches Python's bare-`str` `add_skill(skill_name, params)`. + +#### Signature + +```typescript +addSkillByName( + skillName: SkillNameOrString, + params?: SkillConfig +): Promise +``` + +#### Parameters + + + The name the skill was registered under in the SkillRegistry. + + + + Optional configuration parameters forwarded to the skill factory. + + +#### Returns + +`Promise` — This agent instance for chaining. + +#### Throws + +- Error if no skill with the given name is registered. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1641. + +*** + +### addSwaigQueryParams + +Add extra query parameters appended to all SWAIG webhook URLs. + +#### Signature + +```typescript +addSwaigQueryParams(params: Record): this +``` + +#### Parameters + + + Key-value pairs to append as query parameters. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1733. + +*** + +### addVerb + +Add a verb to the SWML document. + +#### Signature + +```typescript +addVerb(name: string, config: unknown): this +``` + +#### Parameters + + + Verb name (e.g., 'answer', 'play', 'hangup'). + + + + Verb configuration. + + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 642. + +*** + +### addVerbToSection + +Add a verb to a specific named section. +Mirrors Python's `add_verb_to_section()`. + +#### Signature + +```typescript +addVerbToSection(sectionName: string, verbName: string, config: unknown): this +``` + +#### Parameters + + + Target section name (auto-created if missing). + + + + Verb name. + + + + Verb configuration. + + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 669. + +*** + +### asRouter + +Return this agent's Hono app for mounting as a sub-router in an AgentServer. + +#### Signature + +```typescript +asRouter(): Hono +``` + +#### Returns + +`Hono` — The Hono application instance. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2656. + +*** + +### autoMapSipUsernames + +Automatically register common SIP usernames based on this agent's +name and route. Derives cleaned variants (alphanumeric + underscore) +and registers each via `registerSipUsername()`. + +Port of Python's `auto_map_sip_usernames()`: + +- Registers a cleaned version of the agent name +- Registers a cleaned version of the route (if different from name) +- For names longer than 3 characters, also registers a vowel-stripped variant + +#### Signature + +```typescript +autoMapSipUsernames(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1058. + +*** + +### buildSwmlForRequest + +Service-side SWML-builder hook. Subclasses return a `SwmlBuilder` +to fully replace the document for this request, or `null` to fall +through to `setOnRequestCallback` or the static builder. + +This is distinct from the WebMixin `onRequest(requestData, +callbackPath)` hook on AgentBase (which mirrors Python's +`on_request -> on_swml_request` modification-merge contract). +Use this hook when you want to swap the entire SWML builder; use +`onRequest` / `onSwmlRequest` on AgentBase when you want to merge +targeted modifications into the rendered document. + +Default implementation returns `null` (no-op). + +#### Signature + +```typescript +buildSwmlForRequest( + _queryParams: Record, + _bodyParams: Record, + _headers: Record, + _callbackPath?: string +): SwmlBuilder | null +``` + +#### Parameters + + + + + + + + + +#### Returns + +`SwmlBuilder | null` — A `SwmlBuilder` whose document is sent as the response, or `null` to delegate to the next handler in the chain. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 834. + +*** + +### clearPostAiVerbs + +Remove all post-AI verbs. + +#### Signature + +```typescript +clearPostAiVerbs(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1550. + +*** + +### clearPostAnswerVerbs + +Remove all post-answer verbs. + +#### Signature + +```typescript +clearPostAnswerVerbs(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1541. + +*** + +### clearPreAnswerVerbs + +Remove all pre-answer verbs. + +#### Signature + +```typescript +clearPreAnswerVerbs(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1532. + +*** + +### clearSwaigQueryParams + +Clear all SWAIG query parameters. + +#### Signature + +```typescript +clearSwaigQueryParams(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1742. + +*** + +### constructor + +Create a SurveyAgent with the specified questions and callbacks. + +#### Signature + +```typescript +constructor(config: SurveyConfig): SurveyAgent +``` + +#### Parameters + + + Configuration including questions, messages, and completion callback. + + +#### Returns + +`SurveyAgent` + +#### Source + +[`src/prefabs/SurveyAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/SurveyAgent.ts) + +Line 133. + +*** + +### createToolToken + +Mint a per-call SWAIG-function token via the agent's SessionManager. + +Mirrors Python reference `core/mixins/state_mixin.py _create_tool_token`: +delegates to `SessionManager.createToolToken` and returns an empty +string on any failure (Python catches all exceptions and returns ""). + +#### Signature + +```typescript +createToolToken(toolName: string, callId: string): string +``` + +#### Parameters + + + + + +#### Returns + +`string` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1475. + +*** + +### defineContexts + +Define or replace the contexts configuration for the AI verb. + +#### Signature + +```typescript +defineContexts( + contexts?: Record | ContextBuilder +): ContextBuilder +``` + +#### Parameters + + + An existing ContextBuilder instance or a plain object; a new ContextBuilder is created if omitted. + + +#### Returns + +`ContextBuilder` — The active ContextBuilder for further configuration. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 604. + +*** + +### defineTool + +Register a SWAIG tool (function) that the AI can invoke during a call. + +#### How this becomes a tool the model sees + +A SWAIG function is **exactly the same concept** as a "tool" in +native OpenAI / Anthropic tool calling. On every LLM turn, the SDK +renders each registered SWAIG function into the OpenAI tool schema: + +```json +{ +"type": "function", +"function": { +"name": "your_name_here", +"description": "your description text", +"parameters": { /* your JSON schema */ } +} +} +``` + +That schema goes to the model in the same API call that produces +the next assistant message. The model reads: + +- the **function `description`** to decide WHEN to call this tool +- each **parameter `description`** (inside the JSON schema) to + decide HOW to fill in each argument + +This means **descriptions are prompt engineering**, not developer +comments. A vague description is the #1 cause of "the model has the +right tool but doesn't call it" failures. + +##### Bad vs good descriptions + +```text +BAD : description: 'Lookup function' +GOOD: description: 'Look up a customer's account details by account +number. Use this BEFORE quoting any account-specific info +(balance, plan, status). Do not use for general product +questions.' + +BAD : parameters: { id: { type: 'string', description: 'the id' } } +GOOD: parameters: { account_number: { type: 'string', description: +'The customer's 8-digit account number, no dashes or spaces. +Ask the user if they don't provide it.' } } +``` + +##### Tool count matters + +LLM tool selection accuracy degrades past ~7-8 simultaneously-active +tools per call. Use Step.setFunctions() to partition tools across +steps so only the relevant subset is active at any moment. + +#### Signature + +```typescript +defineTool(opts: { ...11 fields }): this +``` + +#### Parameters + + + Tool definition including name, description, parameter schema, and handler callback. `description` and per-parameter `description` strings are LLM-facing prompt engineering. + + + + + Additional fields to pass through to the SWAIG function definition (Python `**swaig_fields` equivalent). + + + + + + + + + + + + + + + + + + + + External webhook URL; makes this an externally-hosted tool. + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1330. + +*** + +### defineTools + +Register SWAIG tools: + +- Python-parity tools: `validate_response`, `log_response` +- TS-specific session tools: `answer_question`, `get_current_question`, `get_survey_progress` + +#### Signature + +```typescript +defineTools(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/prefabs/SurveyAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/SurveyAgent.ts) + +Line 409. + +*** + +### defineTypedTool + +Register a SWAIG tool with a typed handler that receives named parameters +instead of the standard `(args, rawData)` convention. + +The SDK wraps the handler to unpack the args dict into positional params. +If no `parameters` schema is provided, one is inferred from the handler's +source code (parameter names and default values). + +#### Signature + +```typescript +defineTypedTool(opts: { ...9 fields }): this +``` + +#### Parameters + + + Tool definition with a typed handler function. + + + + + + + The typed handler. Receives the AI-extracted arguments as named positional parameters (in declaration order), optionally with a trailing `rawData` record, and returns a SWAIG result. Precisely typed as [TypedToolHandler](/docs/sdk-reference/reference/typescript/core/type-inference#typed-tool-handler) rather than the bare `Function` so a non-callable — or a callable that returns nothing usable — is a compile-time error. + + + + + + + + + + + + + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1373. + +*** + +### enableDebugEvents + +Enable debug event webhooks for this agent. + +#### Signature + +```typescript +enableDebugEvents(level: number = 1): this +``` + +#### Parameters + + + Debug verbosity level (defaults to 1). + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1011. + +*** + +### enableDebugRoutes + +Register a callback function that determines routing based on POST data. + +When a routing callback is registered, an endpoint at the specified path +is created in `getApp()`. The callback receives the request body and returns +Enable debug routes for testing and development. + +This is a backward-compatibility stub matching the Python SDK. +In the TypeScript SDK, debug routes (health, ready, debug\_events) +are automatically registered in `getApp()`. + +#### Signature + +```typescript +enableDebugRoutes(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1773. + +*** + +### enableMcpServer + +Expose this agent's tools as an MCP server endpoint at /mcp. +Adds a JSON-RPC 2.0 endpoint that MCP clients (Claude Desktop, other agents) can connect to. + +#### Signature + +```typescript +enableMcpServer(): this +``` + +#### Returns + +`this` — This agent instance for chaining + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1160. + +*** + +### enableSipRouting + +Enable SIP routing for this agent. + +#### Signature + +```typescript +enableSipRouting(autoMap: boolean = true, path: string = '/sip'): this +``` + +#### Parameters + + + When true, automatically map SIP usernames to the agent route (defaults to true). + + + + HTTP path for the SIP routing endpoint (defaults to '/sip'). + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1025. + +*** + +### extractSipUsername + +Extract the SIP username from a request body's call.to field. + +**Modifiers:** `static` + +#### Signature + +```typescript +extractSipUsername(requestBody: Record): string | null +``` + +#### Parameters + + + The parsed request body containing call information. + + +#### Returns + +`string | null` — The extracted SIP username, or null if not found. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1122. + +*** + +### getAllFunctions + +Snapshot of all registered SWAIG functions keyed by name. +(Python parity: `ToolRegistry.get_all_functions`.) + +#### Signature + +```typescript +getAllFunctions(): Record> +``` + +#### Returns + +`Record>` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 529. + +*** + +### getApp + +Get or lazily create the Hono HTTP application with all routes, middleware, auth, and CORS. + +#### Signature + +```typescript +getApp(): Hono +``` + +#### Returns + +`Hono` — The configured Hono application instance. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2269. + +*** + +### getBasicAuthCredentials + +Get the basic-auth credentials used by this agent. + +#### Signature + + + + ```typescript + getBasicAuthCredentials(includeSource?: false): [string, string] + ``` + + + + ```typescript + getBasicAuthCredentials( + includeSource: true + ): [string, string, "provided" | "environment" | "generated"] + ``` + + + +#### Parameters (Overload 1) + + + When true, a third element indicating the credential source is appended. + + +#### Parameters (Overload 2) + + + When true, a third element indicating the credential source is appended. + + +#### Returns (Overload 1) + +`[string, string]` — A tuple of \[username, password] or \[username, password, source]. + +#### Returns (Overload 2) + +`[string, string, "provided" | "environment" | "generated"]` — A tuple of \[username, password] or \[username, password, source]. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2794. + +*** + +### getBuilder + +Get the underlying SwmlBuilder for direct manipulation. + +#### Signature + +```typescript +getBuilder(): SwmlBuilder +``` + +#### Returns + +`SwmlBuilder` — The SwmlBuilder instance. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 632. + +*** + +### getContexts + +Get the contexts dictionary as serialised SWML, or null when no +contexts have been defined yet. + +Matches Python `PromptManager.get_contexts()` which returns the +contexts dict or `None`. + +#### Signature + +```typescript +getContexts(): Record | null +``` + +#### Returns + +`Record | null` — Contexts dict, or null when no contexts are defined. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 641. + +*** + +### getDocument + +Get the SWML document as a dictionary. +Alias for `renderSwml()` that matches Python's `get_document()` name. + +#### Signature + +```typescript +getDocument(): Record +``` + +#### Returns + +`Record` — The SWML document. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 706. + +*** + +### getFullUrl + +Get the full external URL of this agent, using the proxy base URL if available. + +#### Signature + +```typescript +getFullUrl(includeAuth: boolean = false): string +``` + +#### Parameters + + + Whether to embed basic-auth credentials in the URL (defaults to false). + + +#### Returns + +`string` — The fully-qualified URL string. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1857. + +*** + +### getFunction + +Get a registered SWAIG function entry, or undefined. +(Python parity: `ToolRegistry.get_function`.) + +#### Signature + +```typescript +getFunction(name: string): Record | SwaigFunction | undefined +``` + +#### Parameters + + + +#### Returns + +`Record | SwaigFunction | undefined` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 523. + +*** + +### getLanguageParams + +Read the per-language `params` dict for a previously-added language. + +Python parity: `get_language_params(code)`. Returns `undefined` if the +code is unknown or the language has no params set — no exception path. + +#### Signature + +```typescript +getLanguageParams(code: string): Record | undefined +``` + +#### Parameters + + + Language code as previously passed to [addLanguage](/docs/sdk-reference/reference/typescript/agents/prefabs/survey-agent#add-language). + + +#### Returns + +`Record | undefined` — The params dict if set, `undefined` otherwise (including when the code is unknown). + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 760. + +*** + +### getMcpServers + +Get configured MCP servers (read-only copy). + +#### Signature + +```typescript +getMcpServers(): Record[] +``` + +#### Returns + +`Record[]` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1171. + +*** + +### getName + +Get the agent's display name. + +#### Signature + +```typescript +getName(): string +``` + +#### Returns + +`string` — The agent name string. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1559. + +*** + +### getPostPrompt + +Get the post-prompt text, if one has been set. + +#### Signature + +```typescript +getPostPrompt(): string | null +``` + +#### Returns + +`string | null` — The post-prompt string, or null if not configured. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 548. + +*** + +### getPrompt + +Get the fully rendered main prompt text. + +#### Signature + +```typescript +getPrompt(): string +``` + +#### Returns + +`string` — The assembled prompt string. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 520. + +*** + +### getPromptPom + +Get the raw POM (Prompt Object Model) structure as an array of section data objects, +when the agent is in POM mode and has at least one section. + +Matches Python `get_prompt()` which returns `Union[str, List[Dict]]` — a raw list when +in POM mode (via `pom.to_list()` / `pom.render_dict()`), or a string otherwise. +The TS `getPrompt()` always returns a string (rendered Markdown), so this companion +method exposes the raw POM structure for callers that need it for serialisation or +inspection (e.g. skills that inspect prompt sections). + +#### Signature + +```typescript +getPromptPom(): Record[] | null +``` + +#### Returns + +`Record[] | null` — An array of POM section data objects, or null if not in POM mode or POM is empty. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 536. + +*** + +### getRawPrompt + +Get the raw prompt text whatever `setPromptText` stored, or null when +no raw prompt has been set. + +Matches Python `PromptManager.get_raw_prompt()` which returns the raw +stored string or `None`. Use this instead of `getPrompt()` when you +need the unrendered text rather than the POM-rendered Markdown. + +#### Signature + +```typescript +getRawPrompt(): string | null +``` + +#### Returns + +`string | null` — The raw prompt string, or null if not set. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 562. + +*** + +### getRegisteredTools + +Get a summary of all registered tools with their names, descriptions, and +parameter schemas. Lifted from AgentBase so the swaig-test CLI can list +tools on a non-AgentBase SWMLService target (sidecar / standalone SWAIG +host). + +#### Signature + +```typescript +getRegisteredTools(): { description: string; name: string; parameters: Record }[] +``` + +#### Returns + +`{ description: string; name: string; parameters: Record }[]` — Array of tool descriptors. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 557. + +*** + +### getTool + +Look up a registered SwaigFunction by name. Lifted from AgentBase so +`swaig-test --exec ` works against a non-AgentBase SWMLService +target. + +#### Signature + +```typescript +getTool(name: string): SwaigFunction | undefined +``` + +#### Parameters + + + The tool name to search for. + + +#### Returns + +`SwaigFunction | undefined` — The SwaigFunction instance, or undefined if not found or not a SwaigFunction. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 581. + +*** + +### getTools + +Public access to the list of registered tools. + +In Python, `define_tools()` is public and returns `List[SWAIGFunction]`. +In TypeScript, `defineTools()` is a protected setup hook (void). This +method provides the equivalent public "get all tools" capability. + +#### Signature + +```typescript +getTools(): SwaigFunction[] +``` + +#### Returns + +`SwaigFunction[]` — Array of all registered SwaigFunction instances. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 371. + +*** + +### handleMcpRequest + +Handle an MCP JSON-RPC 2.0 request. Returns the response object. + +#### Signature + +```typescript +handleMcpRequest( + body: Record +): Promise> +``` + +#### Parameters + + + +#### Returns + +`Promise>` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1204. + +*** + +### hasFunction + +Whether a SWAIG function with the given name is registered. +(Python parity: `ToolRegistry.has_function`.) + +#### Signature + +```typescript +hasFunction(name: string): boolean +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 517. + +*** + +### hasSkill + +Check whether a skill with the given name is registered. + +Accepts a typed [SkillNameOrString](/docs/sdk-reference/reference/typescript/agents/skills/skill-name#skill-name-or-string) so built-in names autocomplete +and a typo is a compile-time error; any other string is still accepted +(custom skills / parity with Python's bare-`str` `has_skill`). + +#### Signature + +```typescript +hasSkill(skillName: SkillNameOrString): boolean +``` + +#### Parameters + + + The skill name to check. + + +#### Returns + +`boolean` — True if a skill with that name exists. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1676. + +*** + +### hasTool + +Whether a tool with the given name is registered. + +#### Signature + +```typescript +hasTool(name: string): boolean +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 511. + +*** + +### isMcpServerEnabled + +Check if MCP server endpoint is enabled. + +#### Signature + +```typescript +isMcpServerEnabled(): boolean +``` + +#### Returns + +`boolean` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1166. + +*** + +### listSkills + +List all registered skills with their names, instance IDs, and initialization status. + +#### Signature + +```typescript +listSkills(): { initialized: boolean; instanceId: string; name: string }[] +``` + +#### Returns + +`{ initialized: boolean; instanceId: string; name: string }[]` — Array of skill descriptors. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1662. + +*** + +### listToolNames + +List registered tool names in insertion order (Map preserves it). + +#### Signature + +```typescript +listToolNames(): string[] +``` + +#### Returns + +`string[]` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 545. + +*** + +### manualSetProxyUrl + +Manually set the proxy base URL used for webhook URL generation. + +#### Signature + +```typescript +manualSetProxyUrl(url: string): this +``` + +#### Parameters + + + The external-facing base URL (trailing slashes are stripped). + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1754. + +*** + +### onDebugEvent + +Lifecycle hook called when a debug event webhook is received. Override in subclasses. + +#### Signature + +```typescript +onDebugEvent(_event: Record): void | Promise +``` + +#### Parameters + + + The debug event payload. + + +#### Returns + +`void | Promise` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1970. + +*** + +### onFunctionCall + +Hook called before each SWAIG function execution. Override in subclasses. + +**Behavioral note:** In the Python SDK, `on_function_call` IS the dispatcher +— it retrieves and executes the function, returning the result. In TypeScript, +`fn.execute()` is called separately after this hook. However, if this method +returns a non-void value, it is used as the result and the default execution +is skipped, enabling dispatch interception parity with Python. + +#### Signature + +```typescript +onFunctionCall( + _name: string, + _args: Record, + _rawData: Record +): void | Record | Promise> +``` + +#### Parameters + + + Name of the function about to execute. + + + + Parsed arguments for the function. + + + + The full raw SWAIG request payload. + + +#### Returns + +`void | Record | Promise>` — Optionally a result dict to short-circuit default execution, or void/undefined to proceed normally. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1999. + +*** + +### onRequest + +Lifecycle hook called when SWML is requested. Default delegates to +[onSwmlRequest](/docs/sdk-reference/reference/typescript/agents/prefabs/survey-agent#on-swml-request) and returns its result. Subclasses typically +override `onSwmlRequest` rather than this method. + +Matches Python `WebMixin.on_request(request_data, callback_path)`. The +cross-language API is the two-arg form; the Hono `context` argument is +a TypeScript-side extra preserved for callers that already have it but +is not part of the audited surface. + +#### Signature + +```typescript +onRequest( + requestData?: Record | null, + callbackPath?: string | null +): void | Record | Promise> +``` + +#### Parameters + + + The parsed request body. + + + + Optional callback path from the request. + + +#### Returns + +`void | Record | Promise>` — Optionally a dict of SWML modifications, or undefined for default rendering. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1935. + +*** + +### onSummary + +Process the survey results summary returned at the end of a call. +Mirrors Python `on_summary`: structured (dict-like) summaries are logged +as JSON; unstructured summaries are logged verbatim. + +The parameter type widens the base `AgentBase.onSummary` signature to +accept string payloads as well, matching Python's `isinstance(summary, dict)` +branch even though the current framework only surfaces object summaries. + +#### Signature + +```typescript +onSummary( + summary: string | Record | null, + _rawData: Record +): void | Promise +``` + +#### Parameters + + + + + +#### Returns + +`void | Promise` + +#### Source + +[`src/prefabs/SurveyAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/SurveyAgent.ts) + +Line 639. + +*** + +### onSwmlRequest + +Lifecycle hook called on every SWML request before rendering. Override in subclasses. + +May optionally return a modification dict that will be merged into the +rendered SWML document (matching Python's `Optional[dict]` return type). + +Matches Python `on_swml_request(request_data, callback_path, request)` — the third +parameter is the FastAPI `Request` in Python; here it is the raw Hono context object +so that subclasses can access query parameters (`context.req.query()`), raw request +headers (`context.req.raw.headers`), etc. + +#### Signature + +```typescript +onSwmlRequest( + _rawData: Record, + _callbackPath?: string, + _context?: any +): void | Record | Promise> +``` + +#### Parameters + + + The parsed request body. + + + + Optional callback path from the request. + + + + The raw Hono context object (c), providing access to headers and query params. + + +#### Returns + +`void | Record | Promise>` — Optionally a dict of SWML modifications, or void. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1958. + +*** + +### promptAddSection + +Add a new section to the prompt with optional body, bullets, and subsections. + +#### Signature + +```typescript +promptAddSection(title: string, opts?: { ...5 fields }): this +``` + +#### Parameters + + + Section heading. + + + + Optional section content including body text, bullet points, and subsections. + + + + + + + + + + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 467. + +*** + +### promptAddSubsection + +Add a subsection under an existing prompt section. + +#### Signature + +```typescript +promptAddSubsection( + parentTitle: string, + title: string, + opts?: { ...2 fields } +): this +``` + +#### Parameters + + + Title of the parent section. + + + + Title of the new subsection. + + + + Optional body text and bullet points for the subsection. + + + + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 502. + +*** + +### promptAddToSection + +Append content to an existing prompt section. + +#### Signature + +```typescript +promptAddToSection(title: string, opts?: { ...3 fields }): this +``` + +#### Parameters + + + Title of the section to append to. + + + + Content to add: body text, a single bullet, or multiple bullets. + + + + + + + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 487. + +*** + +### promptHasSection + +Check whether a prompt section with the given title exists. + +#### Signature + +```typescript +promptHasSection(title: string): boolean +``` + +#### Parameters + + + Section title to look for. + + +#### Returns + +`boolean` — True if the section exists. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 512. + +*** + +### registerAdditionalRoutes + +Extension point: register additional Hono routes after SWMLService +mounts /health, /ready, /swaig, and the main route. AgentBase uses +this to add /post\_prompt, /check\_for\_input, /debug\_events, /mcp. + +#### Signature + +```typescript +registerAdditionalRoutes(_app: Hono): void +``` + +#### Parameters + + + +#### Returns + +`void` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 604. + +*** + +### registerRoutingCallback + +Register a callback at a specific HTTP path that decides how to route an +incoming request. + +When called, the endpoint at `path` will invoke `callback` with the parsed +request body. If `callback` returns a non-empty route string the server +responds with `{ action: "redirect", route }` so the platform can forward the +request to the right agent. If `callback` returns `null` / `undefined` the +agent's own SWML is returned instead (normal processing). + +Mirrors Python `swml_service.register_routing_callback` / +`web_mixin.register_routing_callback`. + +#### Signature + +```typescript +registerRoutingCallback(callback: RoutingCallback, path: string = '/sip'): this +``` + +#### Parameters + + + Function receiving the parsed request body and returning a route string to redirect, or null/undefined for normal processing. + + + + HTTP path where this callback endpoint is registered (default: '/sip'). + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1102. + +*** + +### registerSipUsername + +Register a SIP username to route to this agent. + +#### Signature + +```typescript +registerSipUsername(username: string): this +``` + +#### Parameters + + + The SIP username to register. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1040. + +*** + +### registerSwaigFunction + +Register a SwaigFunction instance or a raw function descriptor (DataMap). + +#### Signature + +```typescript +registerSwaigFunction(fn: Record | SwaigFunction): this +``` + +#### Parameters + + + +#### Returns + +`this` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 472. + +*** + +### registerVerbHandler + +Register a custom verb handler. +Mirrors Python's `register_verb_handler()`. + +#### Signature + +```typescript +registerVerbHandler(handler: SWMLVerbHandler): void +``` + +#### Parameters + + + The verb handler to register. + + +#### Returns + +`void` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 726. + +*** + +### removeFunction + +Remove a registered SWAIG function. Returns true when removed, +false when not found. (Python parity: +`ToolRegistry.remove_function`.) + +#### Signature + +```typescript +removeFunction(name: string): boolean +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 540. + +*** + +### removeSkill + +Remove a previously added skill by its instance ID. + +#### Signature + +```typescript +removeSkill(instanceId: string): Promise +``` + +#### Parameters + + + The unique instance ID of the skill to remove. + + +#### Returns + +`Promise` — True if the skill was found and removed. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1654. + +*** + +### removeSkillByName + +Remove a skill by its name (Python parity). + +Python's `remove_skill(skill_name)` removes by skill name. +The existing `removeSkill(instanceId)` removes by instance ID. +This method provides name-based removal for cross-SDK parity. + +#### Signature + +```typescript +removeSkillByName(skillName: string): Promise +``` + +#### Parameters + + + The skill name to remove. + + +#### Returns + +`Promise` — True if a skill with that name was found and removed. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1690. + +*** + +### renderDocument + +Render the SWML document as a JSON string. +Mirrors Python's `render_document()`. + +#### Signature + +```typescript +renderDocument(): string +``` + +#### Returns + +`string` — JSON-encoded SWML document. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 715. + +*** + +### renderSwml + +Render the complete SWML document by assembling all 5 phases: pre-answer, answer, +post-answer, AI, and post-AI verbs. + +#### Signature + +```typescript +renderSwml(callId?: string, modifications?: Record): string +``` + +#### Parameters + + + Optional call ID to use for session tokens; auto-generated if omitted. + + + + Optional dict returned from `onSwmlRequest` to merge into the AI verb config before rendering. Matches Python's `_render_swml(modifications)` semantics: `global_data` is deep-merged; all other keys override the AI config directly. + + +#### Returns + +`string` — The rendered SWML document as a JSON string. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2019. + +*** + +### resetContexts + +Remove all contexts, returning the agent to a no-contexts state. + +This is a convenience wrapper around `defineContexts().reset()`. +Use it in a dynamic config callback when you need to rebuild +contexts from scratch for a specific request. + +#### Signature + +```typescript +resetContexts(): this +``` + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 625. + +*** + +### resetDocument + +Reset the SWML document to an empty state. +Mirrors Python's `reset_document()`. + +#### Signature + +```typescript +resetDocument(): this +``` + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 679. + +*** + +### run + +Alias for [serve](/docs/sdk-reference/reference/typescript/agents/prefabs/survey-agent#serve). Starts the HTTP server. + +#### Signature + +```typescript +run(opts?: { ...2 fields }): Promise +``` + +#### Parameters + + + Optional host and port overrides. + + + + + + +#### Returns + +`Promise` — A promise that resolves once the server is running. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2702. + +*** + +### runServerless + +Handle a single serverless invocation (AWS Lambda, Google Cloud Functions, Azure Functions, or CGI). + +Matches Python `run(event, context)` when executed in a serverless environment. Python's +`run()` auto-detects the platform via `get_execution_mode()` and dispatches accordingly; +in TypeScript the serverless path is an **explicit** method so that `run()` keeps its +HTTP-server semantics and callers opt in to serverless dispatch deliberately. + +Platform detection follows the same environment-variable heuristics as Python's +`ServerlessMixin`: `AWS_LAMBDA_FUNCTION_NAME` → Lambda, `K_SERVICE` → GCF, +`FUNCTIONS_WORKER_RUNTIME` → Azure, `GATEWAY_INTERFACE` → CGI. + +Usage in a Lambda handler file: + +```ts +export const handler = (event: any, context: any) => agent.runServerless(event, context); +``` + +#### Signature + +```typescript +runServerless( + event: ServerlessEvent, + context?: unknown, + platform?: "lambda" | "gcf" | "azure" | "cgi" | "auto" +): Promise +``` + +#### Parameters + + + The serverless event payload (Lambda event, GCF request body, etc.). + + + + The serverless context object (Lambda context, Azure context, etc.). + + + + Optional platform override; defaults to 'auto' (environment detection). + + +#### Returns + +`Promise` — The normalized serverless response object. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2728. + +*** + +### serve + +Start the HTTP server and begin listening for requests. + +Uses `@hono/node-server` under the hood. When run in CLI mode +(`SWAIG_CLI_MODE=true`, set automatically by `npx swaig-test`), this is a +no-op so agent config can be inspected without starting a server. + +#### Signature + +```typescript +serve(opts?: { ...2 fields }): Promise +``` + +#### Parameters + + + Optional host/port overrides. Defaults to the values provided in the constructor options or the `PORT` environment variable. + + + + + + +#### Returns + +`Promise` — A promise that resolves once the server has begun listening. + +#### Examples + +```typescript +const agent = new AgentBase({ name: 'demo', port: 3000 }); +await agent.serve(); +// Or override at runtime: +await agent.serve({ port: 8080, host: '127.0.0.1' }); +``` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2679. + +*** + +### setDynamicConfigCallback + +Set a callback invoked on each SWML request to dynamically modify an ephemeral agent copy. + +The callback receives a clone of this agent — mutations apply only to the current +request, so you can vary prompt, tools, languages, params, or global data per call +without affecting the long-lived agent instance. + +#### Signature + +```typescript +setDynamicConfigCallback(cb: DynamicConfigCallback): this +``` + +#### Parameters + + + Callback receiving `(queryParams, bodyParams, headers, agent)` where `agent` is the ephemeral `AgentBase` copy to mutate. May be async. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Examples + +```typescript +agent.setDynamicConfigCallback((query, body, headers, agent) => { + const lang = query.lang ?? 'en'; + if (lang === 'es') { + (agent as AgentBase).setPromptText('Eres un asistente útil.'); + } +}); +``` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1723. + +*** + +### setFunctionIncludes + +Replace the entire list of function includes. +Each include must have a `url` and `functions` array. + +#### Signature + +```typescript +setFunctionIncludes(includes: FunctionInclude[]): this +``` + +#### Parameters + + + Array of function include objects. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 979. + +*** + +### setGlobalData + +Merge data into the global\_data object passed into the AI configuration. + +Matches Python `set_global_data` which calls `.update()` on the internal dict — +existing keys are preserved; incoming keys overwrite on collision. Skills and +other callers can each contribute keys without clobbering one another. + +If you need to replace the entire object, assign a new agent instance or use +`Object.assign(agent.globalData, {})` to clear first. + +#### Signature + +```typescript +setGlobalData(data: Record): this +``` + +#### Parameters + + + Key-value pairs to merge into global data. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 828. + +*** + +### setInternalFillers + +Set internal fillers for native SWAIG functions. + +Internal fillers are short phrases the AI agent speaks (via TTS) while +an internal/native function is running, so the caller doesn't hear +dead air during transitions or background work. + +Supported function names (matches the SWAIGInternalFiller schema): + +hangup — when the agent is hanging up +check\_time — when checking the time +wait\_for\_user — when waiting for user input +wait\_seconds — during deliberate pauses +adjust\_response\_latency — when adjusting response timing +next\_step — transitioning between steps in prompt.contexts +change\_context — switching between contexts in prompt.contexts +get\_visual\_input — processing visual input (enable\_vision=true) +get\_ideal\_strategy — thinking (enable\_thinking=true) + +Notably NOT supported: change\_step, gather\_submit, or arbitrary +user-defined SWAIG function names. The runtime only honors fillers +for the names listed above; everything else is silently ignored at +the SWML level. This method warns at registration time if you pass +an unknown name so you catch the typo early. + +#### Signature + +```typescript +setInternalFillers( + internalFillers: Record> +): this +``` + +#### Parameters + + + Map of function name to language-keyed filler phrases. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Examples + +```typescript +agent.setInternalFillers({ + next_step: { + 'en-US': ['Moving to the next step...', 'Great, let us continue...'], + 'es': ['Pasando al siguiente paso...'] + }, + check_time: { + 'en-US': ['Let me check the time...'] + } +}); +``` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 910. + +*** + +### setLanguageParams + +Set (or replace) the per-language `params` dict on an already-added +language. Useful when language entries are built up via [addLanguage](/docs/sdk-reference/reference/typescript/agents/prefabs/survey-agent#add-language) +first and engine-specific tuning is added later (e.g., from a config +loader). + +Python parity: `set_language_params(code, params)`. Passing an empty +object removes the `params` key entirely. Unknown codes are a no-op. + +#### Signature + +```typescript +setLanguageParams(code: string, params: Record): this +``` + +#### Parameters + + + Language code as previously passed to [addLanguage](/docs/sdk-reference/reference/typescript/agents/prefabs/survey-agent#add-language) (e.g. `"en-US"`). + + + + Engine-specific params dict to attach. Empty object removes the key. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 737. + +*** + +### setLanguages + +Replace all configured languages with a new list. + +#### Signature + +```typescript +setLanguages(languages: LanguageConfig[]): this +``` + +#### Parameters + + + Array of language configurations. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 718. + +*** + +### setNativeFunctions + +Set the list of native SWAIG function names (built-in platform functions). + +#### Signature + +```typescript +setNativeFunctions(funcs: string[]): this +``` + +#### Parameters + + + Array of native function names. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 848. + +*** + +### setOnRequestCallback + +Set a callback invoked per-request to dynamically build SWML. +When set, the static SwmlBuilder is ignored and the callback's +returned SwmlBuilder is used instead. + +#### Signature + +```typescript +setOnRequestCallback(cb: OnRequestCallback): this +``` + +#### Parameters + + + Callback receiving query params, body params, and headers. + + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 850. + +*** + +### setParam + +Set a single AI parameter (e.g. "temperature", "top\_p"). + +#### Signature + +```typescript +setParam(key: string, value: unknown): this +``` + +#### Parameters + + + Parameter name. + + + + Parameter value. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 800. + +*** + +### setParams + +Merge multiple AI parameters into the existing params object. + +#### Signature + +```typescript +setParams(params: Record): this +``` + +#### Parameters + + + Key-value pairs to merge. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 810. + +*** + +### setPostPrompt + +Set the post-prompt text evaluated after the call ends. + +#### Signature + +```typescript +setPostPrompt(text: string): this +``` + +#### Parameters + + + The post-prompt text to use. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 456. + +*** + +### setPostPromptLlmParams + +Merge LLM-specific parameters into the post-prompt configuration. + +#### Signature + +```typescript +setPostPromptLlmParams(params: Record): this +``` + +#### Parameters + + + Key-value LLM parameters to merge. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1001. + +*** + +### setPostPromptUrl + +Override the default post-prompt webhook URL with a custom one. + +#### Signature + +```typescript +setPostPromptUrl(url: string): this +``` + +#### Parameters + + + The custom post-prompt URL. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1847. + +*** + +### setPromptLlmParams + +Merge LLM-specific parameters into the main prompt configuration (e.g. model, temperature). + +#### Signature + +```typescript +setPromptLlmParams(params: Record): this +``` + +#### Parameters + + + Key-value LLM parameters to merge. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 991. + +*** + +### setPromptPom + +Set the prompt as a POM (Prompt Object Model) dictionary. + +Replaces the current POM sections with the provided structured data. +Each entry should have `title`, and optionally `body`, `bullets`, +`numbered`, `numberedBullets`, and `subsections`. + +#### Signature + +```typescript +setPromptPom(pom: Record[]): this +``` + +#### Parameters + + + Array of POM section dictionaries. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Throws + +- Error if POM mode is not enabled (`usePom: false`). + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 577. + +*** + +### setPromptText + +Set the main system prompt text for the AI. + +#### Signature + +```typescript +setPromptText(text: string): this +``` + +#### Parameters + + + The prompt text to use. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 446. + +*** + +### setPronunciations + +Replace all pronunciation rules with a new list. + +#### Signature + +```typescript +setPronunciations(rules: PronunciationRule[]): this +``` + +#### Parameters + + + Array of pronunciation rule objects. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 786. + +*** + +### setupGracefulShutdown + +Register process signal handlers for clean Kubernetes/Docker shutdown. +Handles SIGTERM and SIGINT, waits for a timeout, then exits. + +**Modifiers:** `static` + +#### Signature + +```typescript +setupGracefulShutdown(opts?: { ...1 fields }): void +``` + +#### Parameters + + + Optional timeout in milliseconds (default 5000). + + + + +#### Returns + +`void` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 2751. + +*** + +### setWebHookUrl + +Override the default SWAIG webhook URL with a custom one. + +#### Signature + +```typescript +setWebHookUrl(url: string): this +``` + +#### Parameters + + + The custom webhook URL. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1837. + +*** + +### stop + +Stop the HTTP server. +Mirrors Python's `stop()`. + +#### Signature + +```typescript +stop(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 1009. + +*** + +### swaigPreDispatch + +Extension point: invoked between argument parsing and function dispatch +on POST /swaig. Returns \[target, shortCircuit]: when shortCircuit is +non-null, it's returned directly without dispatching. AgentBase may +override to add session-token validation or ephemeral dynamic-config. + +#### Signature + +```typescript +swaigPreDispatch( + _requestData: Record, + _funcName: string +): [SWMLService, unknown] +``` + +#### Parameters + + + + + +#### Returns + +`[SWMLService, unknown]` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 592. + +*** + +### updateGlobalData + +Merge additional entries into the existing global\_data object. + +#### Signature + +```typescript +updateGlobalData(data: Record): this +``` + +#### Parameters + + + Key-value pairs to merge into global data. + + +#### Returns + +`this` — This agent instance for chaining. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 838. + +*** + +### validateBasicAuth + +Override to add custom basic-auth validation logic beyond credential matching. + +#### Signature + +```typescript +validateBasicAuth( + _username: string, + _password: string +): boolean | Promise +``` + +#### Parameters + + + The username from the request. + + + + The password from the request. + + +#### Returns + +`boolean | Promise` — True if the credentials are valid; false to reject the request. + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1980. + +*** + +### validateToolToken + +Validate a tool-call token for the given function. + +Mirrors Python reference `core/mixins/state_mixin.py validate_tool_token`: + +1. Unknown function → `false`. +2. Registered but non-secure → `true` without consulting SessionManager + (non-secure tools never require a token). +3. Raw-dict descriptors (e.g. DataMap) are treated as secure, matching + Python's `isinstance(func, dict) → is_secure = True` branch. +4. Missing token on a secure tool → `false`. +5. Otherwise delegate to `SessionManager.validateToolToken`. + +Divergences from the Python reference: + +- No debug-logging branch: `AgentBase` does not expose an agent-level + debug-mode flag, so the per-call debug telemetry Python emits is + omitted. `SessionManager` still logs its own validation outcomes. +- No token-derived call-id fallback: `SessionManager.debugToken` + truncates the embedded call-id for log safety, so an extracted value + cannot be round-tripped back through `validateToolToken`. The caller + is expected to supply a non-empty `callId`; an empty one is forwarded + unchanged and the underlying validator will reject it. + +#### Signature + +```typescript +validateToolToken(functionName: string, token: string, callId: string): boolean +``` + +#### Parameters + + + + + + + +#### Returns + +`boolean` + +#### Source + +[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) + +Line 1455. + +## Functions + +### createSurveyAgent + +Factory function that creates and returns a new SurveyAgent. + +#### Signature + +```typescript +createSurveyAgent(config: SurveyConfig): SurveyAgent +``` + +#### Parameters + + + Configuration for the survey agent. + + +#### Returns + +`SurveyAgent` — A configured SurveyAgent instance. + +#### Source + +[`src/prefabs/SurveyAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/SurveyAgent.ts) + +Line 667. + +## Source + +[`src/prefabs/SurveyAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/SurveyAgent.ts) + +Line 111. diff --git a/fern/products/sdk-reference/typescript/agents/prefabs/survey-agent/index__2.mdx b/fern/products/sdk-reference/typescript/agents/prefabs/survey-agent/index__2.mdx new file mode 100644 index 0000000000..35c4167c16 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/prefabs/survey-agent/index__2.mdx @@ -0,0 +1,126 @@ +--- +slug: "/reference/typescript/agents/prefabs/survey-agent/index__2" +title: "SurveyAgent" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "agents.prefabs.SurveyAgent" + parent: "prefabs" + module: "agents.prefabs" +--- +# `SurveyAgent` + +## Interfaces + +### SurveyConfig + +Configuration for the [SurveyAgent](/docs/sdk-reference/reference/typescript/agents/prefabs/survey-agent). + +#### Signature + +```typescript +interface SurveyConfig +``` + +#### Properties + + + Additional AgentBase options forwarded to super(). + + + + Brand or company name the agent represents (matches Python `brand_name`). + + + + Message after the survey is complete (matches Python `conclusion`). + + + + Opening message before the first question (matches Python `introduction`). + + + + Maximum number of times to retry invalid answers. Defaults to 2. + + + + Agent display name (defaults to `"survey"`). + + + + Callback fired when the survey is finished. + + + + Ordered list of survey questions. + + + + HTTP route for this agent (defaults to `"/survey"`). + + + + Human-readable survey name, used in prompts and global data. + + +#### Source + +[`src/prefabs/SurveyAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/SurveyAgent.ts) + +Line 52. + +*** + +### SurveyQuestion + +A single survey question consumed by [SurveyAgent](/docs/sdk-reference/reference/typescript/agents/prefabs/survey-agent). + +#### Signature + +```typescript +interface SurveyQuestion +``` + +#### Properties + + + Unique question identifier. + + + + Next question ID after this one. + + + + Options for multiple\_choice questions. + + + + Points awarded for answers. + + + + Whether the question requires an answer. Defaults to `true`. Mirrors the Python `required` flag on each question dict. + + + + For `rating` questions, the upper bound of the scale (1..scale). Defaults to 5 (matching the Python prefab) when unspecified. + + + + The question text to ask the caller. + + + + Question type determines validation and display. + + +#### Source + +[`src/prefabs/SurveyAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/SurveyAgent.ts) + +Line 17. diff --git a/fern/products/sdk-reference/typescript/agents/prompt-manager/index.mdx b/fern/products/sdk-reference/typescript/agents/prompt-manager/index.mdx new file mode 100644 index 0000000000..a2bd31f94c --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/prompt-manager/index.mdx @@ -0,0 +1,351 @@ +--- +slug: "/reference/typescript/agents/prompt-manager" +title: "PromptManager" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "PromptManager" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/PromptManager.ts" +--- +# `PromptManager` + +Manages agent prompt text, supporting both raw text and structured POM-based prompts. + +## Signature + +```typescript +class PromptManager +``` + +## Methods + +### addSection + +Adds a POM section to the prompt, initializing the PomBuilder if needed. + +#### Signature + +```typescript +addSection(title: string, opts?: { ...5 fields }): void +``` + +#### Parameters + + + The section heading. + + + + Optional body, bullets, numbering, and subsection configuration. + + + + + + + + + + + + +#### Returns + +`void` + +#### Source + +[`src/PromptManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PromptManager.ts) + +Line 48. + +*** + +### addSubsection + +Adds a subsection under a parent POM section, creating the parent if absent. + +#### Signature + +```typescript +addSubsection(parentTitle: string, title: string, opts?: { ...2 fields }): void +``` + +#### Parameters + + + The heading of the parent section. + + + + The subsection heading. + + + + Optional body text and bullets for the subsection. + + + + + + +#### Returns + +`void` + +#### Source + +[`src/PromptManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PromptManager.ts) + +Line 87. + +*** + +### addToSection + +Appends body text or bullets to an existing POM section, creating it if absent. + +#### Signature + +```typescript +addToSection(title: string, opts?: { ...3 fields }): void +``` + +#### Parameters + + + The section heading to append to. + + + + Body text and/or bullets to add. + + + + + + + + +#### Returns + +`void` + +#### Source + +[`src/PromptManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PromptManager.ts) + +Line 70. + +*** + +### constructor + +Creates a new PromptManager. + +#### Signature + +```typescript +constructor(usePom: boolean = true): PromptManager +``` + +#### Parameters + + + Whether to use structured POM sections (default true). + + +#### Returns + +`PromptManager` + +#### Source + +[`src/PromptManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PromptManager.ts) + +Line 20. + +*** + +### getPomBuilder + +Returns the underlying PomBuilder instance, if POM mode is active. + +#### Signature + +```typescript +getPomBuilder(): PomBuilder | null +``` + +#### Returns + +`PomBuilder | null` — The PomBuilder, or null if POM is not in use. + +#### Source + +[`src/PromptManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PromptManager.ts) + +Line 130. + +*** + +### getPostPrompt + +Returns the post-prompt text. + +#### Signature + +```typescript +getPostPrompt(): string | null +``` + +#### Returns + +`string | null` — The post-prompt string, or null if not set. + +#### Source + +[`src/PromptManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PromptManager.ts) + +Line 122. + +*** + +### getPrompt + +Returns the fully rendered prompt text, either raw text or POM-rendered Markdown. + +#### Signature + +```typescript +getPrompt(): string +``` + +#### Returns + +`string` — The prompt string, or empty string if nothing is set. + +#### Source + +[`src/PromptManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PromptManager.ts) + +Line 112. + +*** + +### getRawPrompt + +Returns the raw prompt text whatever `setPromptText` stored, or null +when no raw prompt has been set. Mirrors Python's +`PromptManager.get_raw_prompt`. + +#### Signature + +```typescript +getRawPrompt(): string | null +``` + +#### Returns + +`string | null` — The raw prompt string, or null if not set. + +#### Source + +[`src/PromptManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PromptManager.ts) + +Line 140. + +*** + +### hasSection + +Checks whether a POM section with the given title exists. + +#### Signature + +```typescript +hasSection(title: string): boolean +``` + +#### Parameters + + + The section heading to look for. + + +#### Returns + +`boolean` — True if the section exists. + +#### Source + +[`src/PromptManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PromptManager.ts) + +Line 104. + +*** + +### setPostPrompt + +Sets the post-prompt text appended after the main prompt. + +#### Signature + +```typescript +setPostPrompt(text: string): void +``` + +#### Parameters + + + The post-prompt string. + + +#### Returns + +`void` + +#### Source + +[`src/PromptManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PromptManager.ts) + +Line 39. + +*** + +### setPromptText + +Sets the raw prompt text, bypassing POM rendering. + +#### Signature + +```typescript +setPromptText(text: string): void +``` + +#### Parameters + + + The raw prompt string. + + +#### Returns + +`void` + +#### Source + +[`src/PromptManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PromptManager.ts) + +Line 31. + +## Source + +[`src/PromptManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PromptManager.ts) + +Line 10. diff --git a/fern/products/sdk-reference/typescript/agents/schema-utils/index.mdx b/fern/products/sdk-reference/typescript/agents/schema-utils/index.mdx new file mode 100644 index 0000000000..c900e26432 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/schema-utils/index.mdx @@ -0,0 +1,304 @@ +--- +slug: "/reference/typescript/agents/schema-utils" +title: "SchemaUtils" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "SchemaUtils" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/SchemaUtils.ts" +--- +# `SchemaUtils` + +Validates SWML documents against structural rules with an LRU-style result cache. + +## Signature + +```typescript +class SchemaUtils +``` + +## Methods + +### clearCache + +Clear the validation cache + +#### Signature + +```typescript +clearCache(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/SchemaUtils.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SchemaUtils.ts) + +Line 341. + +*** + +### constructor + +Create a SchemaUtils instance. + +#### Signature + +```typescript +constructor(opts?: { ...3 fields }): SchemaUtils +``` + +#### Parameters + + + Optional settings for skipping validation, limiting cache size, or overriding the schema file path. + + + + + + + + +#### Returns + +`SchemaUtils` + +#### Source + +[`src/SchemaUtils.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SchemaUtils.ts) + +Line 47. + +*** + +### getCacheSize + +Get the number of cached validation results. + +#### Signature + +```typescript +getCacheSize(): number +``` + +#### Returns + +`number` — The current cache entry count. + +#### Source + +[`src/SchemaUtils.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SchemaUtils.ts) + +Line 349. + +*** + +### getVerbDescription + +Get the description text for a verb. + +#### Signature + +```typescript +getVerbDescription(verbName: string): string +``` + +#### Parameters + + + The verb name. + + +#### Returns + +`string` — The description string or empty string. + +#### Source + +[`src/SchemaUtils.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SchemaUtils.ts) + +Line 158. + +*** + +### getVerbNames + +Get all verb names defined in the schema. + +#### Signature + +```typescript +getVerbNames(): string[] +``` + +#### Returns + +`string[]` — Array of verb names (e.g. \["answer", "ai", "hangup", ...]). + +#### Source + +[`src/SchemaUtils.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SchemaUtils.ts) + +Line 124. + +*** + +### getVerbProperties + +Get the inner properties schema for a specific verb. +For example, for "hangup" this returns `{ type: "object", properties: { reason: ... }, ... }`. + +#### Signature + +```typescript +getVerbProperties(verbName: string): Record +``` + +#### Parameters + + + The verb name (e.g. "answer", "tap"). + + +#### Returns + +`Record` — The inner schema definition or an empty object if not found. + +#### Source + +[`src/SchemaUtils.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SchemaUtils.ts) + +Line 134. + +*** + +### getVerbRequiredProperties + +Get the required properties for a verb's inner config. + +#### Signature + +```typescript +getVerbRequiredProperties(verbName: string): string[] +``` + +#### Parameters + + + The verb name. + + +#### Returns + +`string[]` — Array of required property names. + +#### Source + +[`src/SchemaUtils.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SchemaUtils.ts) + +Line 147. + +*** + +### hasVerb + +Check if a verb name is defined in the schema. + +#### Signature + +```typescript +hasVerb(verbName: string): boolean +``` + +#### Parameters + + + The verb name. + + +#### Returns + +`boolean` — True if the verb exists. + +#### Source + +[`src/SchemaUtils.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SchemaUtils.ts) + +Line 168. + +*** + +### validate + +Validate a SWML document against structural rules. + +#### Signature + +```typescript +validate(swml: string | Record): ValidationResult +``` + +#### Parameters + + + The SWML document as a JSON string or parsed object. + + +#### Returns + +`ValidationResult` — The validation result indicating success or a list of errors. + +#### Source + +[`src/SchemaUtils.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SchemaUtils.ts) + +Line 231. + +*** + +### validateVerb + +Lightweight validation of a verb config against the schema. +Checks that the verb exists and required properties are present. +Mirrors Python SDK's `_validate_verb_lightweight()`. + +#### Signature + +```typescript +validateVerb(verbName: string, config: unknown): ValidationResult +``` + +#### Parameters + + + The verb name. + + + + The verb configuration to validate. + + +#### Returns + +`ValidationResult` — Validation result. + +#### Source + +[`src/SchemaUtils.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SchemaUtils.ts) + +Line 181. + +## Source + +[`src/SchemaUtils.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SchemaUtils.ts) + +Line 34. diff --git a/fern/products/sdk-reference/typescript/agents/schema-utils/index__2.mdx b/fern/products/sdk-reference/typescript/agents/schema-utils/index__2.mdx new file mode 100644 index 0000000000..021fa2de09 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/schema-utils/index__2.mdx @@ -0,0 +1,74 @@ +--- +slug: "/reference/typescript/agents/schema-utils/index__2" +title: "SchemaUtils" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "agents.SchemaUtils" + parent: "agents" + module: "agents" +--- +# `SchemaUtils` + +## Interfaces + +### ValidationResult + +Result of validating a SWML document. + +#### Signature + +```typescript +interface ValidationResult +``` + +#### Properties + + + List of human-readable error messages; empty when valid. + + + + Whether the document passed all validation checks. + + +#### Source + +[`src/SchemaUtils.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SchemaUtils.ts) + +Line 12. + +*** + +### VerbDefinition + +A verb definition extracted from the schema. + +#### Signature + +```typescript +interface VerbDefinition +``` + +#### Properties + + + The raw JSON Schema definition object for this verb. + + + + The verb name as used in SWML (e.g. "answer", "hangup", "sip\_refer"). + + + + The PascalCase schema definition name (e.g. "Answer", "Hangup", "SIPRefer"). + + +#### Source + +[`src/SchemaUtils.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SchemaUtils.ts) + +Line 20. diff --git a/fern/products/sdk-reference/typescript/agents/serverless-adapter/index.mdx b/fern/products/sdk-reference/typescript/agents/serverless-adapter/index.mdx new file mode 100644 index 0000000000..edc17e0743 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/serverless-adapter/index.mdx @@ -0,0 +1,312 @@ +--- +slug: "/reference/typescript/agents/serverless-adapter" +title: "ServerlessAdapter" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "ServerlessAdapter" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/ServerlessAdapter.ts" +--- +# `ServerlessAdapter` + +Adapts a Hono application for deployment on AWS Lambda, Google Cloud Functions, Azure Functions, or CGI. + +Accepts the provider's native event shape (`APIGatewayProxyEvent`, Google Functions `Request`, +Azure function arguments, CGI env + stdin) and returns a provider-native response. + +## Signature + +```typescript +class ServerlessAdapter +``` + +## Examples + +```typescript +import { AgentBase, ServerlessAdapter } from '@signalwire/sdk'; + +const agent = new AgentBase({ name: 'lambda', route: '/' }); +agent.setPromptText('You are a helpful assistant.'); + +const adapter = new ServerlessAdapter('aws'); + +export const handler = async (event: any) => { + return adapter.handleRequest(agent.asRouter(), event); +}; +``` + +## Methods + +### constructor + +Create a ServerlessAdapter for the given platform. + +#### Signature + +```typescript +constructor(platform: ServerlessPlatform = 'auto'): ServerlessAdapter +``` + +#### Parameters + + + Target platform; defaults to 'auto' which detects from environment variables. + + +#### Returns + +`ServerlessAdapter` + +#### Source + +[`src/ServerlessAdapter.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ServerlessAdapter.ts) + +Line 72. + +*** + +### createAzureHandler + +Create an Azure Functions-compatible handler from a Hono app. + +**Modifiers:** `static` + +#### Signature + +```typescript +createAzureHandler( + app: { ...1 fields } +): (context: any, req: any) => Promise +``` + +#### Parameters + + + A Hono-compatible application with a `fetch` method. + + + + +#### Returns + +`(context: any, req: any) => Promise` — A function that accepts an Azure context and request object. + +#### Source + +[`src/ServerlessAdapter.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ServerlessAdapter.ts) + +Line 223. + +*** + +### createGcfHandler + +Create a Google Cloud Functions-compatible handler from a Hono app. + +**Modifiers:** `static` + +#### Signature + +```typescript +createGcfHandler(app: { ...1 fields }): (req: any, res: any) => Promise +``` + +#### Parameters + + + A Hono-compatible application with a `fetch` method. + + + + +#### Returns + +`(req: any, res: any) => Promise` — A function that accepts GCF request/response objects. + +#### Source + +[`src/ServerlessAdapter.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ServerlessAdapter.ts) + +Line 200. + +*** + +### createLambdaHandler + +Create an AWS Lambda-compatible handler function from a Hono app. + +**Modifiers:** `static` + +#### Signature + +```typescript +createLambdaHandler( + app: { ...1 fields } +): (event: ServerlessEvent) => Promise +``` + +#### Parameters + + + A Hono-compatible application with a `fetch` method. + + + + +#### Returns + +`(event: ServerlessEvent) => Promise` — A function that accepts a Lambda event and returns a promise of a serverless response. + +#### Source + +[`src/ServerlessAdapter.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ServerlessAdapter.ts) + +Line 190. + +*** + +### detectPlatform + +Detect the serverless platform by inspecting well-known environment variables. + +#### Signature + +```typescript +detectPlatform(): ServerlessPlatform +``` + +#### Returns + +`ServerlessPlatform` — The detected platform identifier; defaults to 'lambda' if no match is found. + +#### Source + +[`src/ServerlessAdapter.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ServerlessAdapter.ts) + +Line 80. + +*** + +### generateUrl + +Generate the platform-specific invocation URL for a deployed function. + +#### Signature + +```typescript +generateUrl(opts?: { ...5 fields }): string +``` + +#### Parameters + + + Optional overrides for region, project, function name, stage, or API ID. + + + + + + + + + + + + +#### Returns + +`string` — The constructed URL string. + +#### Source + +[`src/ServerlessAdapter.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ServerlessAdapter.ts) + +Line 153. + +*** + +### getPlatform + +Get the resolved platform identifier. + +#### Signature + +```typescript +getPlatform(): ServerlessPlatform +``` + +#### Returns + +`ServerlessPlatform` — The serverless platform this adapter is configured for. + +#### Source + +[`src/ServerlessAdapter.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ServerlessAdapter.ts) + +Line 92. + +*** + +### handleRequest + +Convert a serverless event into a standard Request, route it through the Hono app, and return a normalized response. + +#### Signature + +```typescript +handleRequest( + app: { ...1 fields }, + event: ServerlessEvent +): Promise +``` + +#### Parameters + + + A Hono-compatible application with a `fetch` method. + + + + + + The incoming serverless event to process. + + +#### Returns + +`Promise` — The normalized serverless response. + +#### Source + +[`src/ServerlessAdapter.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ServerlessAdapter.ts) + +Line 102. + +## Type Aliases + +### ServerlessPlatform + +Supported serverless platform identifiers, or 'auto' for environment-based detection. + +#### Signature + +```typescript +type ServerlessPlatform = "lambda" | "gcf" | "azure" | "cgi" | "auto" +``` + +#### Source + +[`src/ServerlessAdapter.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ServerlessAdapter.ts) + +Line 13. + +## Source + +[`src/ServerlessAdapter.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ServerlessAdapter.ts) + +Line 65. diff --git a/fern/products/sdk-reference/typescript/agents/serverless-adapter/index__2.mdx b/fern/products/sdk-reference/typescript/agents/serverless-adapter/index__2.mdx new file mode 100644 index 0000000000..07eb0d90a2 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/serverless-adapter/index__2.mdx @@ -0,0 +1,98 @@ +--- +slug: "/reference/typescript/agents/serverless-adapter/index__2" +title: "ServerlessAdapter" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "agents.ServerlessAdapter" + parent: "agents" + module: "agents" +--- +# `ServerlessAdapter` + +## Interfaces + +### ServerlessEvent + +Normalized incoming event from a serverless platform. + +#### Signature + +```typescript +interface ServerlessEvent +``` + +#### Properties + + + Request body, either raw JSON string or parsed object. + + + + Request headers as key-value pairs. + + + + HTTP method (AWS Lambda style). + + + + HTTP method (GCF/Azure style). + + + + Request path. + + + + Query string parameters as key-value pairs. + + + + Raw request path (AWS API Gateway v2). + + + + Platform-specific request context metadata. + + +#### Source + +[`src/ServerlessAdapter.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ServerlessAdapter.ts) + +Line 16. + +*** + +### ServerlessResponse + +Normalized outgoing response returned to a serverless platform. + +#### Signature + +```typescript +interface ServerlessResponse +``` + +#### Properties + + + Response body as a string. + + + + Response headers as key-value pairs. + + + + HTTP status code. + + +#### Source + +[`src/ServerlessAdapter.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ServerlessAdapter.ts) + +Line 36. diff --git a/fern/products/sdk-reference/typescript/agents/session-manager/index.mdx b/fern/products/sdk-reference/typescript/agents/session-manager/index.mdx new file mode 100644 index 0000000000..1ff0a75ee5 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/session-manager/index.mdx @@ -0,0 +1,482 @@ +--- +slug: "/reference/typescript/agents/session-manager" +title: "SessionManager" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "SessionManager" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/SessionManager.ts" +--- +# `SessionManager` + +Stateless HMAC-SHA256 token manager for SWAIG function call authentication and per-session metadata storage. + +## Signature + +```typescript +class SessionManager +``` + +## Properties + + + When true, [debugToken](/docs/sdk-reference/reference/typescript/agents/session-manager#debug-token) decodes token internals. When false (default), it returns `{ error: "debug mode not enabled" }`. + + + + HMAC signing secret. + + + + Token validity duration in seconds. + + +## Methods + +### activateSession + +Legacy method retained for API compatibility with the Python SDK. +Does nothing and returns `true`. + +#### Signature + +```typescript +activateSession(_callId: string): boolean +``` + +#### Parameters + + + The call/session identifier (unused). + + +#### Returns + +`boolean` — Always `true`. + +#### Source + +[`src/SessionManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SessionManager.ts) + +Line 289. + +*** + +### cleanup + +Remove session metadata entries older than `maxAgeMs`. + +#### Signature + +```typescript +cleanup(maxAgeMs?: number): void +``` + +#### Parameters + + + Maximum age in milliseconds (defaults to `tokenExpirySecs * 1000`). + + +#### Returns + +`void` + +#### Source + +[`src/SessionManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SessionManager.ts) + +Line 272. + +*** + +### constructor + +Create a new SessionManager. + +#### Signature + +```typescript +constructor(tokenExpirySecs: number = 900, secretKey?: string): SessionManager +``` + +#### Parameters + + + Token validity duration in seconds (default 900). + + + + HMAC signing secret; a random key is generated if omitted. + + +#### Returns + +`SessionManager` + +#### Source + +[`src/SessionManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SessionManager.ts) + +Line 52. + +*** + +### createSession + +Return the given callId or generate a new random session identifier. + +#### Signature + +```typescript +createSession(callId?: string): string +``` + +#### Parameters + + + Existing call ID to reuse. + + +#### Returns + +`string` — The call ID string. + +#### Source + +[`src/SessionManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SessionManager.ts) + +Line 62. + +*** + +### createToolToken + +Alias for [generateToken](/docs/sdk-reference/reference/typescript/agents/session-manager#generate-token). + +#### Signature + +```typescript +createToolToken(functionName: string, callId: string): string +``` + +#### Parameters + + + The SWAIG function name to bind. + + + + The call ID to bind. + + +#### Returns + +`string` — A base64url-encoded token string. + +#### Source + +[`src/SessionManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SessionManager.ts) + +Line 92. + +*** + +### debugToken + +Debug a token without validating it. + +Requires [debugMode](/docs/sdk-reference/reference/typescript/agents/session-manager#debug-mode) to be `true`. When disabled, returns +`{ error: "debug mode not enabled" }` matching the Python SDK behaviour. + +#### Signature + +```typescript +debugToken(token: string): DebugTokenResult +``` + +#### Parameters + + + The base64url-encoded token to decode. + + +#### Returns + +`DebugTokenResult` — A nested debug structure matching the Python SDK, or an error object. + +#### Source + +[`src/SessionManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SessionManager.ts) + +Line 169. + +*** + +### deleteSessionMetadata + +Delete all metadata for a session. + +#### Signature + +```typescript +deleteSessionMetadata(sessionId: string): boolean +``` + +#### Parameters + + + The session identifier. + + +#### Returns + +`boolean` — True if the session existed and was deleted. + +#### Source + +[`src/SessionManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SessionManager.ts) + +Line 308. + +*** + +### endSession + +Legacy method retained for API compatibility with the Python SDK. +Does nothing and returns `true`. + +#### Signature + +```typescript +endSession(_callId: string): boolean +``` + +#### Parameters + + + The call/session identifier (unused). + + +#### Returns + +`boolean` — Always `true`. + +#### Source + +[`src/SessionManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SessionManager.ts) + +Line 299. + +*** + +### generateToken + +Generate a signed, base64url-encoded token binding a function name to a call ID. + +#### Signature + +```typescript +generateToken(functionName: string, callId: string): string +``` + +#### Parameters + + + The SWAIG function name to bind. + + + + The call ID to bind. + + +#### Returns + +`string` — A base64url-encoded token string. + +#### Source + +[`src/SessionManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SessionManager.ts) + +Line 73. + +*** + +### getSessionMetadata + +Retrieve metadata associated with a session. + +Returns an empty object when no metadata has been stored for the session, +matching Python SDK behavior (`get_session_metadata` always returns `{}`). +Callers can safely check truthiness or iterate keys without a null guard. + +#### Signature + +```typescript +getSessionMetadata(sessionId: string): Record +``` + +#### Parameters + + + The session identifier. + + +#### Returns + +`Record` — The metadata record for the session, or `{}` if no metadata exists. + +#### Source + +[`src/SessionManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SessionManager.ts) + +Line 233. + +*** + +### setSessionMetadata + +Merge metadata into a session, creating the entry if it does not exist. + +Supports two call signatures for Python SDK compatibility: + +- `setSessionMetadata(sessionId, metadata)` — bulk merge (TS-native) +- `setSessionMetadata(sessionId, key, value)` — single key/value (Python-compatible) + +#### Signature + + + + ```typescript + setSessionMetadata( + sessionId: string, + metadataOrKey: Record + ): void + ``` + + + + ```typescript + setSessionMetadata(sessionId: string, key: string, value: unknown): boolean + ``` + + + +#### Parameters (Overload 1) + + + The session identifier. + + + + A metadata record to merge, or a string key when called with three arguments. + + +#### Parameters (Overload 2) + + + The session identifier. + + + + + + The value to set when called with a string key. + + +#### Returns (Overload 1) + +`void` + +#### Returns (Overload 2) + +`boolean` + +#### Source + +[`src/SessionManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SessionManager.ts) + +Line 248. + +*** + +### validateToken + +Validate a token against the expected call ID and function name. + +#### Signature + +```typescript +validateToken(callId: string, functionName: string, token: string): boolean +``` + +#### Parameters + + + The expected call ID. + + + + The expected function name. + + + + The base64url-encoded token to validate. + + +#### Returns + +`boolean` — True if the token is valid and not expired. + +#### Source + +[`src/SessionManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SessionManager.ts) + +Line 103. + +*** + +### validateToolToken + +Alias for [validateToken](/docs/sdk-reference/reference/typescript/agents/session-manager#validate-token) with reordered parameters. + +#### Signature + +```typescript +validateToolToken(functionName: string, token: string, callId: string): boolean +``` + +#### Parameters + + + The expected function name. + + + + The base64url-encoded token to validate. + + + + The expected call ID. + + +#### Returns + +`boolean` — True if the token is valid and not expired. + +#### Source + +[`src/SessionManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SessionManager.ts) + +Line 156. + +## Source + +[`src/SessionManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SessionManager.ts) + +Line 33. diff --git a/fern/products/sdk-reference/typescript/agents/session-manager/index__2.mdx b/fern/products/sdk-reference/typescript/agents/session-manager/index__2.mdx new file mode 100644 index 0000000000..c2799927f6 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/session-manager/index__2.mdx @@ -0,0 +1,46 @@ +--- +slug: "/reference/typescript/agents/session-manager/index__2" +title: "SessionManager" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "agents.SessionManager" + parent: "agents" + module: "agents" +--- +# `SessionManager` + +## Interfaces + +### DebugTokenResult + +Decoded token debug info matching the Python SDK's nested return structure. + +#### Signature + +```typescript +interface DebugTokenResult +``` + +#### Properties + + + + + + + + + + + + + +#### Source + +[`src/SessionManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SessionManager.ts) + +Line 12. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/api-ninjas-trivia/api-ninjas-trivia-skill/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/api-ninjas-trivia/api-ninjas-trivia-skill/index.mdx new file mode 100644 index 0000000000..79eb425b75 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/skills/builtin/api-ninjas-trivia/api-ninjas-trivia-skill/index.mdx @@ -0,0 +1,709 @@ +--- +slug: "/reference/typescript/agents/skills/builtin/api-ninjas-trivia/api-ninjas-trivia-skill" +title: "ApiNinjasTriviaSkill" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "skills.builtin.api_ninjas_trivia.ApiNinjasTriviaSkill" + parent: "skills.builtin.api_ninjas_trivia" + module: "agents.skills.builtin.api_ninjas_trivia" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/api_ninjas_trivia.ts" +--- +# `ApiNinjasTriviaSkill` + +Fetches trivia questions from the API Ninjas service. + +Tier 2 built-in skill. Requires the `API_NINJAS_KEY` environment variable. +Supports optional `default_category` and `reveal_answer` config options. + +## Signature + +```typescript +class ApiNinjasTriviaSkill extends SkillBase +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/agents/skills/skill-base) + +## Examples + +```typescript +agent.addSkill('api_ninjas_trivia', { default_category: 'sciencenature' }); +``` + +## Properties + + + Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. + + + + Configuration options provided at construction time. + + + + Unique identifier for this skill instance (includes timestamp and random bytes). + + + + Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. + + + + Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. + + + + Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. + + + + Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. + + + + Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. + + + + Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. + + + + The registered name of this skill type. + + + + Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. + + + + Additional SWAIG fields extracted from config, merged into tool definitions. + + +## Methods + +### cleanup + +Cleanup resources. Called when the skill is removed from an agent. + +#### Signature + +```typescript +cleanup(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 469. + +*** + +### constructor + +Create a new skill instance. + +Python parity: `core/skill_base.py:32-43`. +Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` +is left as `None` on the subclass. TS throws the equivalent when the static +defaults haven't been overridden. + +#### Signature + +```typescript +constructor(config?: SkillConfig): ApiNinjasTriviaSkill +``` + +#### Parameters + + + Optional configuration key-value pairs (Python: `params`). + + +#### Returns + +`ApiNinjasTriviaSkill` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 282. + +*** + +### defineTool + +Imperatively register a tool with this skill. + +Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. +Merges `this.swaigFields` into the tool definition (explicit fields on +`toolDef` take precedence), then pushes the result into `_dynamicTools` +so the default `getTools()` returns it at SWML render time. + +Intended for skills whose tool shape depends on config evaluated at +`setup()` time. Skills with a static tool list should override +`getTools()` instead. + +#### Signature + +```typescript +defineTool(toolDef: SkillToolDefinition): void +``` + +#### Parameters + + + The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 351. + +*** + +### getAgent + +Return the agent that owns this skill, asserting it is non-null. +Equivalent to accessing `self.agent` in Python, where the agent reference +is always set before `setup()` is called. + +The SkillManager lifecycle guarantees that `setAgent()` is called before +`setup()`, so this method is safe to use inside `setup()` and in any +tool handler invoked during an active agent session. + +#### Signature + +```typescript +getAgent(): AgentBase +``` + +#### Returns + +`AgentBase` — The owning `AgentBase` instance. + +#### Throws + +- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 261. + +*** + +### getConfig + +Get a configuration value by key, falling back to a default if not set. + +#### Signature + +```typescript +getConfig(key: string, defaultValue?: T): T +``` + +#### Type Parameters + + + +#### Parameters + + + The configuration key to look up. + + + + Value to return if the key is not present. + + +#### Returns + +`T` — The configuration value cast to type T, or the default value. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 524. + +*** + +### getDataMapTools + +Optional DataMap-style tool definitions. Skills that build their own +SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them +here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. + +Python equivalent: the direct `self.agent.register_swaig_function(fn)` +call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). +Default returns `[]` — skills using only the declarative `getTools()` path +do not need to override this. + +#### Signature + +```typescript +getDataMapTools(): Record[] +``` + +#### Returns + +`Record[]` — Array of fully-built SWAIG function dicts. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 372. + +*** + +### getGlobalData + +Get global data to merge into the agent's global data store. + +#### Signature + +```typescript +getGlobalData(): Record +``` + +#### Returns + +`Record` — Key-value pairs to be merged into the agent's global data. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 410. + +*** + +### getHints + +#### Signature + +```typescript +getHints(): string[] +``` + +#### Returns + +`string[]` — Speech recognition hints for trivia-related keywords. + +#### Source + +[`src/skills/builtin/api_ninjas_trivia.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/api_ninjas_trivia.ts) + +Line 278. + +*** + +### getInstanceKey + +Produce a compound instance key matching Python `get_instance_key` +(skill.py:139-146): `f"{SKILL_NAME}_{self.tool_name}"` with +`tool_name` defaulting to `'get_trivia'` (skill.py:95). The base +`SkillBase.getInstanceKey` uses `this.skillName` as the fallback, +so we override to match Python's `'get_trivia'` default. + +#### Signature + +```typescript +getInstanceKey(): string +``` + +#### Returns + +`string` + +#### Source + +[`src/skills/builtin/api_ninjas_trivia.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/api_ninjas_trivia.ts) + +Line 114. + +*** + +### getParameterSchema + +Get the parameter schema for this skill class, describing all accepted configuration options. +Subclasses should override and call `super.getParameterSchema()` to include base parameters. + +Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): +returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a +`tool_name` entry with `default: cls.SKILL_NAME` for classes with +`SUPPORTS_MULTIPLE_INSTANCES = true`. + +**Modifiers:** `static` + +#### Signature + +```typescript +getParameterSchema(): Record +``` + +#### Returns + +`Record` — Record mapping parameter names to their schema entries. + +#### Source + +[`src/skills/builtin/api_ninjas_trivia.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/api_ninjas_trivia.ts) + +Line 68. + +*** + +### getPromptSections + +Get prompt sections to inject into the agent's system prompt. +Respects the `skip_prompt` config option — returns `[]` if set to `true`. +Subclasses should override `_getPromptSections()` instead of this method. + +#### Signature + +```typescript +getPromptSections(): SkillPromptSection[] +``` + +#### Returns + +`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 382. + +*** + +### getSkillData + +Read this skill's data from a raw call data object's global\_data. + +#### Signature + +```typescript +getSkillData(rawData: Record): Record +``` + +#### Parameters + + + The raw request data containing global\_data. + + +#### Returns + +`Record` — The skill's stored data, or an empty object if not found. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 450. + +*** + +### getSkillNamespace + +Get the namespaced key for storing per-skill data in global\_data. + +#### Signature + +```typescript +getSkillNamespace(): string +``` + +#### Returns + +`string` — A string like "skill:datetime" or "skill:my\_prefix". + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 440. + +*** + +### getTools + +#### Signature + +```typescript +getTools(): SkillToolDefinition[] +``` + +#### Returns + +`SkillToolDefinition[]` — A single trivia tool (configurable name) that fetches a random trivia question with optional category. + +#### Source + +[`src/skills/builtin/api_ninjas_trivia.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/api_ninjas_trivia.ts) + +Line 120. + +*** + +### hasAllEnvVars + +Check if all required environment variables are present. +Convenience wrapper around `validateEnvVars()` that returns a boolean, +matching the Python `validate_env_vars() -> bool` return type. + +#### Signature + +```typescript +hasAllEnvVars(): boolean +``` + +#### Returns + +`boolean` — `true` if all required env vars are set, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 544. + +*** + +### hasAllPackages + +Check if all required packages declared in the manifest are available. +Convenience wrapper around `validatePackages()` that returns a boolean, +matching the Python `validate_packages() -> bool` return type. + +#### Signature + +```typescript +hasAllPackages(): Promise +``` + +#### Returns + +`Promise` — `true` if all required packages are importable, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 579. + +*** + +### isInitialized + +Check if the skill has been initialized by the SkillManager. + +#### Signature + +```typescript +isInitialized(): boolean +``` + +#### Returns + +`boolean` — True if setup() has completed and the skill is marked initialized. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 507. + +*** + +### markInitialized + +Mark the skill as initialized (called by SkillManager). + +#### Signature + +```typescript +markInitialized(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 514. + +*** + +### setAgent + +Set the agent reference for this skill. +Called by the SkillManager/AgentBase when the skill is attached to an agent. +Python equivalent: `self.agent = agent` in `__init__`. + +#### Signature + +```typescript +setAgent(agent: AgentBase): void +``` + +#### Parameters + + + The agent that owns this skill. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 534. + +*** + +### setup + +Setup the skill. Called when the skill is added to an agent. +Override to perform initialization (API connections, config validation, etc.) + +#### Signature + +```typescript +setup(): Promise +``` + +#### Returns + +`Promise` — `true` if setup succeeded, `false` otherwise. Python equivalent: abstract `setup() -> bool`. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 313. + +*** + +### updateSkillData + +Update this skill's namespaced data on a FunctionResult via updateGlobalData. + +#### Signature + +```typescript +updateSkillData( + result: FunctionResult, + data: Record +): FunctionResult +``` + +#### Parameters + + + The FunctionResult to update. + + + + The data to store under this skill's namespace. + + +#### Returns + +`FunctionResult` — The FunctionResult for chaining. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 462. + +*** + +### validateEnvVars + +Validate that all required environment variables declared on the skill class +are set in the current process environment. + +Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` +directly. TS reads the same static from the class. + +Returns the list of missing variable names so callers can produce actionable +error messages. This differs from Python's `validate_env_vars() -> bool` +return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/agents/skills/builtin/api-ninjas-trivia/api-ninjas-trivia-skill#has-all-env-vars) is the boolean equivalent. + +#### Signature + +```typescript +validateEnvVars(): string[] +``` + +#### Returns + +`string[]` — Array of missing environment variable names (empty if all are present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 486. + +*** + +### validatePackages + +Validate that all required packages declared on the skill class can be imported. + +Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` +directly and tries `importlib.import_module(pkg)` for each; TS does the +equivalent with a dynamic `import()`. + +#### Signature + +```typescript +validatePackages(): Promise +``` + +#### Returns + +`Promise` — Array of package names that could not be imported (empty if all present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 557. + +## Source + +[`src/skills/builtin/api_ninjas_trivia.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/api_ninjas_trivia.ts) + +Line 59. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/api-ninjas-trivia/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/api-ninjas-trivia/index.mdx new file mode 100644 index 0000000000..9ca75100cf --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/skills/builtin/api-ninjas-trivia/index.mdx @@ -0,0 +1,63 @@ +--- +slug: "/reference/typescript/agents/skills/builtin/api-ninjas-trivia" +title: "api_ninjas_trivia" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "skills.builtin.api_ninjas_trivia" + parent: "skills.builtin" + module: "agents.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/api_ninjas_trivia.ts" +--- +# `api_ninjas_trivia` + +## Signature + +```typescript +module api_ninjas_trivia +``` + +## Classes + + + + Fetches trivia questions from the API Ninjas service. + + + +## Functions + +### createSkill + +Factory function for creating ApiNinjasTriviaSkill instances. + +#### Signature + +```typescript +createSkill(config?: SkillConfig): ApiNinjasTriviaSkill +``` + +#### Parameters + + + Optional skill configuration. + + +#### Returns + +`ApiNinjasTriviaSkill` — A new ApiNinjasTriviaSkill instance. + +#### Source + +[`src/skills/builtin/api_ninjas_trivia.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/api_ninjas_trivia.ts) + +Line 288. + +## Source + +[`src/skills/builtin/api_ninjas_trivia.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/api_ninjas_trivia.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/ask-claude/ask-claude-skill/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/ask-claude/ask-claude-skill/index.mdx new file mode 100644 index 0000000000..79c8c93f81 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/skills/builtin/ask-claude/ask-claude-skill/index.mdx @@ -0,0 +1,716 @@ +--- +slug: "/reference/typescript/agents/skills/builtin/ask-claude/ask-claude-skill" +title: "AskClaudeSkill" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "skills.builtin.ask_claude.AskClaudeSkill" + parent: "skills.builtin.ask_claude" + module: "agents.skills.builtin.ask_claude" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/ask_claude.ts" +--- +# `AskClaudeSkill` + +Provides access to Anthropic's Claude AI for sub-queries and complex reasoning. + +Tier 3 built-in skill. Requires the `ANTHROPIC_API_KEY` environment variable. +Supports `model` and `max_tokens` config options to control which Claude model +is used and the maximum response length. + +## Signature + +```typescript +class AskClaudeSkill extends SkillBase +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/agents/skills/skill-base) + +## Examples + +```typescript +agent.addSkill('ask_claude', { model: 'claude-sonnet-4-6', max_tokens: 512 }); +``` + +## Properties + + + Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. + + + + Configuration options provided at construction time. + + + + Unique identifier for this skill instance (includes timestamp and random bytes). + + + + Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. + + + + Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. + + + + Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. + + + + Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. + + + + Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. + + + + Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. + + + + The registered name of this skill type. + + + + Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. + + + + Additional SWAIG fields extracted from config, merged into tool definitions. + + +## Methods + +### cleanup + +Cleanup resources. Called when the skill is removed from an agent. + +#### Signature + +```typescript +cleanup(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 469. + +*** + +### constructor + +Create a new skill instance. + +Python parity: `core/skill_base.py:32-43`. +Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` +is left as `None` on the subclass. TS throws the equivalent when the static +defaults haven't been overridden. + +#### Signature + +```typescript +constructor(config?: SkillConfig): AskClaudeSkill +``` + +#### Parameters + + + Optional configuration key-value pairs (Python: `params`). + + +#### Returns + +`AskClaudeSkill` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 282. + +*** + +### defineTool + +Imperatively register a tool with this skill. + +Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. +Merges `this.swaigFields` into the tool definition (explicit fields on +`toolDef` take precedence), then pushes the result into `_dynamicTools` +so the default `getTools()` returns it at SWML render time. + +Intended for skills whose tool shape depends on config evaluated at +`setup()` time. Skills with a static tool list should override +`getTools()` instead. + +#### Signature + +```typescript +defineTool(toolDef: SkillToolDefinition): void +``` + +#### Parameters + + + The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 351. + +*** + +### getAgent + +Return the agent that owns this skill, asserting it is non-null. +Equivalent to accessing `self.agent` in Python, where the agent reference +is always set before `setup()` is called. + +The SkillManager lifecycle guarantees that `setAgent()` is called before +`setup()`, so this method is safe to use inside `setup()` and in any +tool handler invoked during an active agent session. + +#### Signature + +```typescript +getAgent(): AgentBase +``` + +#### Returns + +`AgentBase` — The owning `AgentBase` instance. + +#### Throws + +- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 261. + +*** + +### getConfig + +Get a configuration value by key, falling back to a default if not set. + +#### Signature + +```typescript +getConfig(key: string, defaultValue?: T): T +``` + +#### Type Parameters + + + +#### Parameters + + + The configuration key to look up. + + + + Value to return if the key is not present. + + +#### Returns + +`T` — The configuration value cast to type T, or the default value. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 524. + +*** + +### getDataMapTools + +Optional DataMap-style tool definitions. Skills that build their own +SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them +here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. + +Python equivalent: the direct `self.agent.register_swaig_function(fn)` +call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). +Default returns `[]` — skills using only the declarative `getTools()` path +do not need to override this. + +#### Signature + +```typescript +getDataMapTools(): Record[] +``` + +#### Returns + +`Record[]` — Array of fully-built SWAIG function dicts. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 372. + +*** + +### getGlobalData + +Get global data to merge into the agent's global data store. + +#### Signature + +```typescript +getGlobalData(): Record +``` + +#### Returns + +`Record` — Key-value pairs to be merged into the agent's global data. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 410. + +*** + +### getHints + +Get speech recognition hints relevant to this skill. + +#### Signature + +```typescript +getHints(): string[] +``` + +#### Returns + +`string[]` — Array of hint strings to improve speech recognition accuracy. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 402. + +*** + +### getInstanceKey + +Get the instance key used for deduplication in the SkillManager. + +For single-instance skills (`SUPPORTS_MULTIPLE_INSTANCES = false`), returns +the skill name. For multi-instance skills, returns `${skillName}_${toolName}` +using the `tool_name` config (falls back to the skill name). + +Matches Python's `SkillBase.get_instance_key()` default (`skill_base.py:141-146`). +Multi-instance subclasses only need to override when their key derivation +depends on config beyond `tool_name`. + +#### Signature + +```typescript +getInstanceKey(): string +``` + +#### Returns + +`string` — A unique key identifying this skill instance. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 427. + +*** + +### getParameterSchema + +Get the parameter schema for this skill class, describing all accepted configuration options. +Subclasses should override and call `super.getParameterSchema()` to include base parameters. + +Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): +returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a +`tool_name` entry with `default: cls.SKILL_NAME` for classes with +`SUPPORTS_MULTIPLE_INSTANCES = true`. + +**Modifiers:** `static` + +#### Signature + +```typescript +getParameterSchema(): Record +``` + +#### Returns + +`Record` — Record mapping parameter names to their schema entries. + +#### Source + +[`src/skills/builtin/ask_claude.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/ask_claude.ts) + +Line 88. + +*** + +### getPromptSections + +Get prompt sections to inject into the agent's system prompt. +Respects the `skip_prompt` config option — returns `[]` if set to `true`. +Subclasses should override `_getPromptSections()` instead of this method. + +#### Signature + +```typescript +getPromptSections(): SkillPromptSection[] +``` + +#### Returns + +`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 382. + +*** + +### getSkillData + +Read this skill's data from a raw call data object's global\_data. + +#### Signature + +```typescript +getSkillData(rawData: Record): Record +``` + +#### Parameters + + + The raw request data containing global\_data. + + +#### Returns + +`Record` — The skill's stored data, or an empty object if not found. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 450. + +*** + +### getSkillNamespace + +Get the namespaced key for storing per-skill data in global\_data. + +#### Signature + +```typescript +getSkillNamespace(): string +``` + +#### Returns + +`string` — A string like "skill:datetime" or "skill:my\_prefix". + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 440. + +*** + +### getTools + +#### Signature + +```typescript +getTools(): SkillToolDefinition[] +``` + +#### Returns + +`SkillToolDefinition[]` — A single `ask_claude` tool that sends prompts to the Claude API. + +#### Source + +[`src/skills/builtin/ask_claude.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/ask_claude.ts) + +Line 112. + +*** + +### hasAllEnvVars + +Check if all required environment variables are present. +Convenience wrapper around `validateEnvVars()` that returns a boolean, +matching the Python `validate_env_vars() -> bool` return type. + +#### Signature + +```typescript +hasAllEnvVars(): boolean +``` + +#### Returns + +`boolean` — `true` if all required env vars are set, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 544. + +*** + +### hasAllPackages + +Check if all required packages declared in the manifest are available. +Convenience wrapper around `validatePackages()` that returns a boolean, +matching the Python `validate_packages() -> bool` return type. + +#### Signature + +```typescript +hasAllPackages(): Promise +``` + +#### Returns + +`Promise` — `true` if all required packages are importable, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 579. + +*** + +### isInitialized + +Check if the skill has been initialized by the SkillManager. + +#### Signature + +```typescript +isInitialized(): boolean +``` + +#### Returns + +`boolean` — True if setup() has completed and the skill is marked initialized. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 507. + +*** + +### markInitialized + +Mark the skill as initialized (called by SkillManager). + +#### Signature + +```typescript +markInitialized(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 514. + +*** + +### setAgent + +Set the agent reference for this skill. +Called by the SkillManager/AgentBase when the skill is attached to an agent. +Python equivalent: `self.agent = agent` in `__init__`. + +#### Signature + +```typescript +setAgent(agent: AgentBase): void +``` + +#### Parameters + + + The agent that owns this skill. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 534. + +*** + +### setup + +Setup the skill. Called when the skill is added to an agent. +Override to perform initialization (API connections, config validation, etc.) + +#### Signature + +```typescript +setup(): Promise +``` + +#### Returns + +`Promise` — `true` if setup succeeded, `false` otherwise. Python equivalent: abstract `setup() -> bool`. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 313. + +*** + +### updateSkillData + +Update this skill's namespaced data on a FunctionResult via updateGlobalData. + +#### Signature + +```typescript +updateSkillData( + result: FunctionResult, + data: Record +): FunctionResult +``` + +#### Parameters + + + The FunctionResult to update. + + + + The data to store under this skill's namespace. + + +#### Returns + +`FunctionResult` — The FunctionResult for chaining. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 462. + +*** + +### validateEnvVars + +Validate that all required environment variables declared on the skill class +are set in the current process environment. + +Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` +directly. TS reads the same static from the class. + +Returns the list of missing variable names so callers can produce actionable +error messages. This differs from Python's `validate_env_vars() -> bool` +return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/agents/skills/builtin/ask-claude/ask-claude-skill#has-all-env-vars) is the boolean equivalent. + +#### Signature + +```typescript +validateEnvVars(): string[] +``` + +#### Returns + +`string[]` — Array of missing environment variable names (empty if all are present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 486. + +*** + +### validatePackages + +Validate that all required packages declared on the skill class can be imported. + +Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` +directly and tries `importlib.import_module(pkg)` for each; TS does the +equivalent with a dynamic `import()`. + +#### Signature + +```typescript +validatePackages(): Promise +``` + +#### Returns + +`Promise` — Array of package names that could not be imported (empty if all present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 557. + +## Source + +[`src/skills/builtin/ask_claude.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/ask_claude.ts) + +Line 81. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/ask-claude/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/ask-claude/index.mdx new file mode 100644 index 0000000000..e2d580fcf8 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/skills/builtin/ask-claude/index.mdx @@ -0,0 +1,63 @@ +--- +slug: "/reference/typescript/agents/skills/builtin/ask-claude" +title: "ask_claude" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "skills.builtin.ask_claude" + parent: "skills.builtin" + module: "agents.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/ask_claude.ts" +--- +# `ask_claude` + +## Signature + +```typescript +module ask_claude +``` + +## Classes + + + + Provides access to Anthropic's Claude AI for sub-queries and complex reasoning. + + + +## Functions + +### createSkill + +Factory function for creating AskClaudeSkill instances. + +#### Signature + +```typescript +createSkill(config?: SkillConfig): AskClaudeSkill +``` + +#### Parameters + + + Optional skill configuration. + + +#### Returns + +`AskClaudeSkill` — A new AskClaudeSkill instance. + +#### Source + +[`src/skills/builtin/ask_claude.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/ask_claude.ts) + +Line 244. + +## Source + +[`src/skills/builtin/ask_claude.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/ask_claude.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/claude-skills/claude-skills-skill/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/claude-skills/claude-skills-skill/index.mdx new file mode 100644 index 0000000000..7c23545e02 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/skills/builtin/claude-skills/claude-skills-skill/index.mdx @@ -0,0 +1,731 @@ +--- +slug: "/reference/typescript/agents/skills/builtin/claude-skills/claude-skills-skill" +title: "ClaudeSkillsSkill" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "skills.builtin.claude_skills.ClaudeSkillsSkill" + parent: "skills.builtin.claude_skills" + module: "agents.skills.builtin.claude_skills" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/claude_skills.ts" +--- +# `ClaudeSkillsSkill` + +Load Claude-style SKILL.md files as SignalWire agent tools. + +This skill parses Claude Code skill directories and makes them available +as SWAIG tools that the AI can call. Each Claude skill becomes a tool +that returns the skill's instructions when invoked. + +## Signature + +```typescript +class ClaudeSkillsSkill extends SkillBase +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/agents/skills/skill-base) + +## Examples + +```typescript +agent.addSkill('claude_skills', { skills_dir: './claude-skills' }); +``` + +## Properties + + + Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. + + + + Configuration options provided at construction time. + + + + Unique identifier for this skill instance (includes timestamp and random bytes). + + + + Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. + + + + Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. + + + + Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. + + + + Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. + + + + Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. + + + + Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. + + + + The registered name of this skill type. + + + + Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. + + + + Additional SWAIG fields extracted from config, merged into tool definitions. + + +## Methods + +### cleanup + +Cleanup resources. Called when the skill is removed from an agent. + +#### Signature + +```typescript +cleanup(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 469. + +*** + +### constructor + +Create a new skill instance. + +Python parity: `core/skill_base.py:32-43`. +Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` +is left as `None` on the subclass. TS throws the equivalent when the static +defaults haven't been overridden. + +#### Signature + +```typescript +constructor(config?: SkillConfig): ClaudeSkillsSkill +``` + +#### Parameters + + + Optional configuration key-value pairs (Python: `params`). + + +#### Returns + +`ClaudeSkillsSkill` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 282. + +*** + +### defineTool + +Imperatively register a tool with this skill. + +Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. +Merges `this.swaigFields` into the tool definition (explicit fields on +`toolDef` take precedence), then pushes the result into `_dynamicTools` +so the default `getTools()` returns it at SWML render time. + +Intended for skills whose tool shape depends on config evaluated at +`setup()` time. Skills with a static tool list should override +`getTools()` instead. + +#### Signature + +```typescript +defineTool(toolDef: SkillToolDefinition): void +``` + +#### Parameters + + + The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 351. + +*** + +### getAgent + +Return the agent that owns this skill, asserting it is non-null. +Equivalent to accessing `self.agent` in Python, where the agent reference +is always set before `setup()` is called. + +The SkillManager lifecycle guarantees that `setAgent()` is called before +`setup()`, so this method is safe to use inside `setup()` and in any +tool handler invoked during an active agent session. + +#### Signature + +```typescript +getAgent(): AgentBase +``` + +#### Returns + +`AgentBase` — The owning `AgentBase` instance. + +#### Throws + +- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 261. + +*** + +### getConfig + +Get a configuration value by key, falling back to a default if not set. + +#### Signature + +```typescript +getConfig(key: string, defaultValue?: T): T +``` + +#### Type Parameters + + + +#### Parameters + + + The configuration key to look up. + + + + Value to return if the key is not present. + + +#### Returns + +`T` — The configuration value cast to type T, or the default value. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 524. + +*** + +### getDataMapTools + +Optional DataMap-style tool definitions. Skills that build their own +SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them +here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. + +Python equivalent: the direct `self.agent.register_swaig_function(fn)` +call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). +Default returns `[]` — skills using only the declarative `getTools()` path +do not need to override this. + +#### Signature + +```typescript +getDataMapTools(): Record[] +``` + +#### Returns + +`Record[]` — Array of fully-built SWAIG function dicts. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 372. + +*** + +### getGlobalData + +Get global data to merge into the agent's global data store. + +#### Signature + +```typescript +getGlobalData(): Record +``` + +#### Returns + +`Record` — Key-value pairs to be merged into the agent's global data. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 410. + +*** + +### getHints + +Get speech recognition hints relevant to this skill. + +#### Signature + +```typescript +getHints(): string[] +``` + +#### Returns + +`string[]` — Array of hint strings to improve speech recognition accuracy. + +#### Source + +[`src/skills/builtin/claude_skills.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/claude_skills.ts) + +Line 898. + +*** + +### getInstanceKey + +Get the instance key used for deduplication in the SkillManager. + +For single-instance skills (`SUPPORTS_MULTIPLE_INSTANCES = false`), returns +the skill name. For multi-instance skills, returns `${skillName}_${toolName}` +using the `tool_name` config (falls back to the skill name). + +Matches Python's `SkillBase.get_instance_key()` default (`skill_base.py:141-146`). +Multi-instance subclasses only need to override when their key derivation +depends on config beyond `tool_name`. + +#### Signature + +```typescript +getInstanceKey(): string +``` + +#### Returns + +`string` — A unique key identifying this skill instance. + +#### Source + +[`src/skills/builtin/claude_skills.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/claude_skills.ts) + +Line 964. + +*** + +### getParameterSchema + +Get the parameter schema for this skill class, describing all accepted configuration options. +Subclasses should override and call `super.getParameterSchema()` to include base parameters. + +Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): +returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a +`tool_name` entry with `default: cls.SKILL_NAME` for classes with +`SUPPORTS_MULTIPLE_INSTANCES = true`. + +**Modifiers:** `static` + +#### Signature + +```typescript +getParameterSchema(): Record +``` + +#### Returns + +`Record` — Record mapping parameter names to their schema entries. + +#### Source + +[`src/skills/builtin/claude_skills.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/claude_skills.ts) + +Line 99. + +*** + +### getPromptSections + +Get prompt sections to inject into the agent's system prompt. +Respects the `skip_prompt` config option — returns `[]` if set to `true`. +Subclasses should override `_getPromptSections()` instead of this method. + +#### Signature + +```typescript +getPromptSections(): SkillPromptSection[] +``` + +#### Returns + +`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 382. + +*** + +### getSkillData + +Read this skill's data from a raw call data object's global\_data. + +#### Signature + +```typescript +getSkillData(rawData: Record): Record +``` + +#### Parameters + + + The raw request data containing global\_data. + + +#### Returns + +`Record` — The skill's stored data, or an empty object if not found. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 450. + +*** + +### getSkillNamespace + +Get the namespaced key for storing per-skill data in global\_data. + +#### Signature + +```typescript +getSkillNamespace(): string +``` + +#### Returns + +`string` — A string like "skill:datetime" or "skill:my\_prefix". + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 440. + +*** + +### getTools + +Return the SWAIG tool definitions this skill provides. + +Default implementation returns tools registered imperatively via +`defineTool()`. Skills using the declarative pattern override this +method to return a static array built from their config. + +Python parity: replaces the `@abstractmethod register_tools()` contract +— Python skills call `self.define_tool(...)` inside `register_tools()`; +TypeScript skills either call `this.defineTool(...)` in `setup()` (and +let the default `getTools()` return them) or override `getTools()` +directly. + +#### Signature + +```typescript +getTools(): SkillToolDefinition[] +``` + +#### Returns + +`SkillToolDefinition[]` — Array of tool definitions to register with the agent. + +#### Source + +[`src/skills/builtin/claude_skills.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/claude_skills.ts) + +Line 762. + +*** + +### hasAllEnvVars + +Check if all required environment variables are present. +Convenience wrapper around `validateEnvVars()` that returns a boolean, +matching the Python `validate_env_vars() -> bool` return type. + +#### Signature + +```typescript +hasAllEnvVars(): boolean +``` + +#### Returns + +`boolean` — `true` if all required env vars are set, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 544. + +*** + +### hasAllPackages + +Check if all required packages declared in the manifest are available. +Convenience wrapper around `validatePackages()` that returns a boolean, +matching the Python `validate_packages() -> bool` return type. + +#### Signature + +```typescript +hasAllPackages(): Promise +``` + +#### Returns + +`Promise` — `true` if all required packages are importable, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 579. + +*** + +### isInitialized + +Check if the skill has been initialized by the SkillManager. + +#### Signature + +```typescript +isInitialized(): boolean +``` + +#### Returns + +`boolean` — True if setup() has completed and the skill is marked initialized. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 507. + +*** + +### markInitialized + +Mark the skill as initialized (called by SkillManager). + +#### Signature + +```typescript +markInitialized(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 514. + +*** + +### setAgent + +Set the agent reference for this skill. +Called by the SkillManager/AgentBase when the skill is attached to an agent. +Python equivalent: `self.agent = agent` in `__init__`. + +#### Signature + +```typescript +setAgent(agent: AgentBase): void +``` + +#### Parameters + + + The agent that owns this skill. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 534. + +*** + +### setup + +Setup the Claude skills loader — discovers and parses all SKILL.md files. + +Returns `true` on success and `false` on any failure (missing path, +invalid path, stat failure, or non-directory), mirroring the Python +skill's `setup() -> bool` contract. + +#### Signature + +```typescript +setup(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/skills/builtin/claude_skills.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/claude_skills.ts) + +Line 186. + +*** + +### updateSkillData + +Update this skill's namespaced data on a FunctionResult via updateGlobalData. + +#### Signature + +```typescript +updateSkillData( + result: FunctionResult, + data: Record +): FunctionResult +``` + +#### Parameters + + + The FunctionResult to update. + + + + The data to store under this skill's namespace. + + +#### Returns + +`FunctionResult` — The FunctionResult for chaining. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 462. + +*** + +### validateEnvVars + +Validate that all required environment variables declared on the skill class +are set in the current process environment. + +Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` +directly. TS reads the same static from the class. + +Returns the list of missing variable names so callers can produce actionable +error messages. This differs from Python's `validate_env_vars() -> bool` +return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/agents/skills/builtin/claude-skills/claude-skills-skill#has-all-env-vars) is the boolean equivalent. + +#### Signature + +```typescript +validateEnvVars(): string[] +``` + +#### Returns + +`string[]` — Array of missing environment variable names (empty if all are present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 486. + +*** + +### validatePackages + +Validate that all required packages declared on the skill class can be imported. + +Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` +directly and tries `importlib.import_module(pkg)` for each; TS does the +equivalent with a dynamic `import()`. + +#### Signature + +```typescript +validatePackages(): Promise +``` + +#### Returns + +`Promise` — Array of package names that could not be imported (empty if all present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 557. + +## Source + +[`src/skills/builtin/claude_skills.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/claude_skills.ts) + +Line 81. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/claude-skills/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/claude-skills/index.mdx new file mode 100644 index 0000000000..f9cae187bb --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/skills/builtin/claude-skills/index.mdx @@ -0,0 +1,63 @@ +--- +slug: "/reference/typescript/agents/skills/builtin/claude-skills" +title: "claude_skills" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "skills.builtin.claude_skills" + parent: "skills.builtin" + module: "agents.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/claude_skills.ts" +--- +# `claude_skills` + +## Signature + +```typescript +module claude_skills +``` + +## Classes + + + + Load Claude-style SKILL.md files as SignalWire agent tools. + + + +## Functions + +### createSkill + +Factory function for creating ClaudeSkillsSkill instances. + +#### Signature + +```typescript +createSkill(config?: SkillConfig): ClaudeSkillsSkill +``` + +#### Parameters + + + Optional skill configuration. + + +#### Returns + +`ClaudeSkillsSkill` — A new ClaudeSkillsSkill instance. + +#### Source + +[`src/skills/builtin/claude_skills.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/claude_skills.ts) + +Line 981. + +## Source + +[`src/skills/builtin/claude_skills.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/claude_skills.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/custom-skills/custom-skills-skill/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/custom-skills/custom-skills-skill/index.mdx new file mode 100644 index 0000000000..c33eddac6e --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/skills/builtin/custom-skills/custom-skills-skill/index.mdx @@ -0,0 +1,746 @@ +--- +slug: "/reference/typescript/agents/skills/builtin/custom-skills/custom-skills-skill" +title: "CustomSkillsSkill" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "skills.builtin.custom_skills.CustomSkillsSkill" + parent: "skills.builtin.custom_skills" + module: "agents.skills.builtin.custom_skills" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/custom_skills.ts" +--- +# `CustomSkillsSkill` + +A meta-skill that registers user-defined tools from configuration. + +Tier 2 built-in skill with no external dependencies. Allows users to define +arbitrary tools via config without writing skill classes. Each tool definition +specifies a name, description, parameters, and a JavaScript handler function +body that is compiled via the Function constructor at instantiation time. + +**Security warning:** This skill uses `new Function()` to compile user-provided +code at runtime. It is gated behind the `SWML_ALLOW_CUSTOM_HANDLER_CODE=true` +environment variable to prevent unintended code execution. + +## Signature + +```typescript +class CustomSkillsSkill extends SkillBase +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/agents/skills/skill-base) + +## Examples + +```typescript +// Requires SWML_ALLOW_CUSTOM_HANDLER_CODE=true +agent.addSkill('custom_skills', { + tools: [ + { + name: 'echo', + description: 'Echo back the caller-supplied message.', + parameters: { type: 'object', properties: { msg: { type: 'string' } } }, + handlerBody: 'return new FunctionResult(args.msg);', + }, + ], +}); +``` + +## Properties + + + Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. + + + + Configuration options provided at construction time. + + + + Unique identifier for this skill instance (includes timestamp and random bytes). + + + + Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. + + + + Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. + + + + Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. + + + + Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. + + + + Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. + + + + Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. + + + + The registered name of this skill type. + + + + Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. + + + + Additional SWAIG fields extracted from config, merged into tool definitions. + + +## Methods + +### cleanup + +Cleanup resources. Called when the skill is removed from an agent. + +#### Signature + +```typescript +cleanup(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 469. + +*** + +### constructor + +#### Signature + +```typescript +constructor(config?: SkillConfig): CustomSkillsSkill +``` + +#### Parameters + + + Configuration object containing a `tools` array of custom tool definitions. + + +#### Returns + +`CustomSkillsSkill` + +#### Source + +[`src/skills/builtin/custom_skills.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/custom_skills.ts) + +Line 106. + +*** + +### defineTool + +Imperatively register a tool with this skill. + +Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. +Merges `this.swaigFields` into the tool definition (explicit fields on +`toolDef` take precedence), then pushes the result into `_dynamicTools` +so the default `getTools()` returns it at SWML render time. + +Intended for skills whose tool shape depends on config evaluated at +`setup()` time. Skills with a static tool list should override +`getTools()` instead. + +#### Signature + +```typescript +defineTool(toolDef: SkillToolDefinition): void +``` + +#### Parameters + + + The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 351. + +*** + +### getAgent + +Return the agent that owns this skill, asserting it is non-null. +Equivalent to accessing `self.agent` in Python, where the agent reference +is always set before `setup()` is called. + +The SkillManager lifecycle guarantees that `setAgent()` is called before +`setup()`, so this method is safe to use inside `setup()` and in any +tool handler invoked during an active agent session. + +#### Signature + +```typescript +getAgent(): AgentBase +``` + +#### Returns + +`AgentBase` — The owning `AgentBase` instance. + +#### Throws + +- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 261. + +*** + +### getCompilationErrors + +Get handler compilation errors for diagnostic purposes. + +#### Signature + +```typescript +getCompilationErrors(): Map +``` + +#### Returns + +`Map` — A copy of the map from tool name to error message. + +#### Source + +[`src/skills/builtin/custom_skills.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/custom_skills.ts) + +Line 315. + +*** + +### getConfig + +Get a configuration value by key, falling back to a default if not set. + +#### Signature + +```typescript +getConfig(key: string, defaultValue?: T): T +``` + +#### Type Parameters + + + +#### Parameters + + + The configuration key to look up. + + + + Value to return if the key is not present. + + +#### Returns + +`T` — The configuration value cast to type T, or the default value. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 524. + +*** + +### getDataMapTools + +Optional DataMap-style tool definitions. Skills that build their own +SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them +here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. + +Python equivalent: the direct `self.agent.register_swaig_function(fn)` +call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). +Default returns `[]` — skills using only the declarative `getTools()` path +do not need to override this. + +#### Signature + +```typescript +getDataMapTools(): Record[] +``` + +#### Returns + +`Record[]` — Array of fully-built SWAIG function dicts. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 372. + +*** + +### getGlobalData + +Get global data to merge into the agent's global data store. + +#### Signature + +```typescript +getGlobalData(): Record +``` + +#### Returns + +`Record` — Key-value pairs to be merged into the agent's global data. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 410. + +*** + +### getHints + +Get speech recognition hints relevant to this skill. + +#### Signature + +```typescript +getHints(): string[] +``` + +#### Returns + +`string[]` — Array of hint strings to improve speech recognition accuracy. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 402. + +*** + +### getInstanceKey + +Get the instance key used for deduplication in the SkillManager. + +For single-instance skills (`SUPPORTS_MULTIPLE_INSTANCES = false`), returns +the skill name. For multi-instance skills, returns `${skillName}_${toolName}` +using the `tool_name` config (falls back to the skill name). + +Matches Python's `SkillBase.get_instance_key()` default (`skill_base.py:141-146`). +Multi-instance subclasses only need to override when their key derivation +depends on config beyond `tool_name`. + +#### Signature + +```typescript +getInstanceKey(): string +``` + +#### Returns + +`string` — A unique key identifying this skill instance. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 427. + +*** + +### getParameterSchema + +Get the parameter schema for this skill class, describing all accepted configuration options. +Subclasses should override and call `super.getParameterSchema()` to include base parameters. + +Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): +returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a +`tool_name` entry with `default: cls.SKILL_NAME` for classes with +`SUPPORTS_MULTIPLE_INSTANCES = true`. + +**Modifiers:** `static` + +#### Signature + +```typescript +getParameterSchema(): Record +``` + +#### Returns + +`Record` — Record mapping parameter names to their schema entries. + +#### Source + +[`src/skills/builtin/custom_skills.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/custom_skills.ts) + +Line 111. + +*** + +### getPromptSections + +Get prompt sections to inject into the agent's system prompt. +Respects the `skip_prompt` config option — returns `[]` if set to `true`. +Subclasses should override `_getPromptSections()` instead of this method. + +#### Signature + +```typescript +getPromptSections(): SkillPromptSection[] +``` + +#### Returns + +`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 382. + +*** + +### getSkillData + +Read this skill's data from a raw call data object's global\_data. + +#### Signature + +```typescript +getSkillData(rawData: Record): Record +``` + +#### Parameters + + + The raw request data containing global\_data. + + +#### Returns + +`Record` — The skill's stored data, or an empty object if not found. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 450. + +*** + +### getSkillNamespace + +Get the namespaced key for storing per-skill data in global\_data. + +#### Signature + +```typescript +getSkillNamespace(): string +``` + +#### Returns + +`string` — A string like "skill:datetime" or "skill:my\_prefix". + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 440. + +*** + +### getTools + +#### Signature + +```typescript +getTools(): SkillToolDefinition[] +``` + +#### Returns + +`SkillToolDefinition[]` — Array of dynamically generated tools from the configuration, with compiled handlers. + +#### Source + +[`src/skills/builtin/custom_skills.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/custom_skills.ts) + +Line 181. + +*** + +### hasAllEnvVars + +Check if all required environment variables are present. +Convenience wrapper around `validateEnvVars()` that returns a boolean, +matching the Python `validate_env_vars() -> bool` return type. + +#### Signature + +```typescript +hasAllEnvVars(): boolean +``` + +#### Returns + +`boolean` — `true` if all required env vars are set, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 544. + +*** + +### hasAllPackages + +Check if all required packages declared in the manifest are available. +Convenience wrapper around `validatePackages()` that returns a boolean, +matching the Python `validate_packages() -> bool` return type. + +#### Signature + +```typescript +hasAllPackages(): Promise +``` + +#### Returns + +`Promise` — `true` if all required packages are importable, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 579. + +*** + +### isInitialized + +Check if the skill has been initialized by the SkillManager. + +#### Signature + +```typescript +isInitialized(): boolean +``` + +#### Returns + +`boolean` — True if setup() has completed and the skill is marked initialized. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 507. + +*** + +### markInitialized + +Mark the skill as initialized (called by SkillManager). + +#### Signature + +```typescript +markInitialized(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 514. + +*** + +### setAgent + +Set the agent reference for this skill. +Called by the SkillManager/AgentBase when the skill is attached to an agent. +Python equivalent: `self.agent = agent` in `__init__`. + +#### Signature + +```typescript +setAgent(agent: AgentBase): void +``` + +#### Parameters + + + The agent that owns this skill. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 534. + +*** + +### setup + +Setup the skill. Called when the skill is added to an agent. +Override to perform initialization (API connections, config validation, etc.) + +#### Signature + +```typescript +setup(): Promise +``` + +#### Returns + +`Promise` — `true` if setup succeeded, `false` otherwise. Python equivalent: abstract `setup() -> bool`. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 313. + +*** + +### updateSkillData + +Update this skill's namespaced data on a FunctionResult via updateGlobalData. + +#### Signature + +```typescript +updateSkillData( + result: FunctionResult, + data: Record +): FunctionResult +``` + +#### Parameters + + + The FunctionResult to update. + + + + The data to store under this skill's namespace. + + +#### Returns + +`FunctionResult` — The FunctionResult for chaining. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 462. + +*** + +### validateEnvVars + +Validate that all required environment variables declared on the skill class +are set in the current process environment. + +Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` +directly. TS reads the same static from the class. + +Returns the list of missing variable names so callers can produce actionable +error messages. This differs from Python's `validate_env_vars() -> bool` +return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/agents/skills/builtin/custom-skills/custom-skills-skill#has-all-env-vars) is the boolean equivalent. + +#### Signature + +```typescript +validateEnvVars(): string[] +``` + +#### Returns + +`string[]` — Array of missing environment variable names (empty if all are present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 486. + +*** + +### validatePackages + +Validate that all required packages declared on the skill class can be imported. + +Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` +directly and tries `importlib.import_module(pkg)` for each; TS does the +equivalent with a dynamic `import()`. + +#### Signature + +```typescript +validatePackages(): Promise +``` + +#### Returns + +`Promise` — Array of package names that could not be imported (empty if all present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 557. + +## Source + +[`src/skills/builtin/custom_skills.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/custom_skills.ts) + +Line 94. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/custom-skills/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/custom-skills/index.mdx new file mode 100644 index 0000000000..94dcc565e1 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/skills/builtin/custom-skills/index.mdx @@ -0,0 +1,63 @@ +--- +slug: "/reference/typescript/agents/skills/builtin/custom-skills" +title: "custom_skills" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "skills.builtin.custom_skills" + parent: "skills.builtin" + module: "agents.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/custom_skills.ts" +--- +# `custom_skills` + +## Signature + +```typescript +module custom_skills +``` + +## Classes + + + + A meta-skill that registers user-defined tools from configuration. + + + +## Functions + +### createSkill + +Factory function for creating CustomSkillsSkill instances. + +#### Signature + +```typescript +createSkill(config?: SkillConfig): CustomSkillsSkill +``` + +#### Parameters + + + Configuration containing a `tools` array of custom tool definitions. + + +#### Returns + +`CustomSkillsSkill` — A new CustomSkillsSkill instance. + +#### Source + +[`src/skills/builtin/custom_skills.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/custom_skills.ts) + +Line 325. + +## Source + +[`src/skills/builtin/custom_skills.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/custom_skills.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/datasphere-serverless/data-sphere-serverless-skill/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/datasphere-serverless/data-sphere-serverless-skill/index.mdx new file mode 100644 index 0000000000..6f4dd9935b --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/skills/builtin/datasphere-serverless/data-sphere-serverless-skill/index.mdx @@ -0,0 +1,716 @@ +--- +slug: "/reference/typescript/agents/skills/builtin/datasphere-serverless/data-sphere-serverless-skill" +title: "DataSphereServerlessSkill" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "skills.builtin.datasphere_serverless.DataSphereServerlessSkill" + parent: "skills.builtin.datasphere_serverless" + module: "agents.skills.builtin.datasphere_serverless" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere_serverless.ts" +--- +# `DataSphereServerlessSkill` + +Searches SignalWire DataSphere using a server-side DataMap for serverless execution. + +Tier 3 built-in skill that generates a DataMap configuration SignalWire +executes directly, without a webhook endpoint. Supports `document_id`, +`count`, `distance`, `tags`, `language`, `pos_to_expand`, `max_synonyms`, +and `no_results_message` config options. + +## Signature + +```typescript +class DataSphereServerlessSkill extends SkillBase +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/agents/skills/skill-base) + +## Examples + +```typescript +agent.addSkill('datasphere_serverless', { + document_id: 'doc_abc123', + count: 3, +}); +``` + +## Properties + + + Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. + + + + Configuration options provided at construction time. + + + + Unique identifier for this skill instance (includes timestamp and random bytes). + + + + Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. + + + + Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. + + + + Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. + + + + Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. + + + + Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. + + + + Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. + + + + The registered name of this skill type. + + + + Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. + + + + Additional SWAIG fields extracted from config, merged into tool definitions. + + +## Methods + +### cleanup + +Cleanup resources. Called when the skill is removed from an agent. + +#### Signature + +```typescript +cleanup(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 469. + +*** + +### constructor + +Create a new skill instance. + +Python parity: `core/skill_base.py:32-43`. +Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` +is left as `None` on the subclass. TS throws the equivalent when the static +defaults haven't been overridden. + +#### Signature + +```typescript +constructor(config?: SkillConfig): DataSphereServerlessSkill +``` + +#### Parameters + + + Optional configuration key-value pairs (Python: `params`). + + +#### Returns + +`DataSphereServerlessSkill` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 282. + +*** + +### defineTool + +Imperatively register a tool with this skill. + +Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. +Merges `this.swaigFields` into the tool definition (explicit fields on +`toolDef` take precedence), then pushes the result into `_dynamicTools` +so the default `getTools()` returns it at SWML render time. + +Intended for skills whose tool shape depends on config evaluated at +`setup()` time. Skills with a static tool list should override +`getTools()` instead. + +#### Signature + +```typescript +defineTool(toolDef: SkillToolDefinition): void +``` + +#### Parameters + + + The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 351. + +*** + +### getAgent + +Return the agent that owns this skill, asserting it is non-null. +Equivalent to accessing `self.agent` in Python, where the agent reference +is always set before `setup()` is called. + +The SkillManager lifecycle guarantees that `setAgent()` is called before +`setup()`, so this method is safe to use inside `setup()` and in any +tool handler invoked during an active agent session. + +#### Signature + +```typescript +getAgent(): AgentBase +``` + +#### Returns + +`AgentBase` — The owning `AgentBase` instance. + +#### Throws + +- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 261. + +*** + +### getConfig + +Get a configuration value by key, falling back to a default if not set. + +#### Signature + +```typescript +getConfig(key: string, defaultValue?: T): T +``` + +#### Type Parameters + + + +#### Parameters + + + The configuration key to look up. + + + + Value to return if the key is not present. + + +#### Returns + +`T` — The configuration value cast to type T, or the default value. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 524. + +*** + +### getDataMapTools + +Get DataMap-based tool definitions for server-side execution. +These are registered directly in the SWML output as data\_map functions +rather than as webhook-backed SWAIG tools. + +#### Signature + +```typescript +getDataMapTools(): Record[] +``` + +#### Returns + +`Record[]` — Array containing the DataSphere search DataMap function definition. + +#### Source + +[`src/skills/builtin/datasphere_serverless.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere_serverless.ts) + +Line 317. + +*** + +### getGlobalData + +Global data injected into the agent's SWML/SWAIG context. Matches +Python's `get_global_data()` shape so downstream consumers can +detect DataSphere availability. + +#### Signature + +```typescript +getGlobalData(): Record +``` + +#### Returns + +`Record` + +#### Source + +[`src/skills/builtin/datasphere_serverless.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere_serverless.ts) + +Line 164. + +*** + +### getHints + +Get speech recognition hints relevant to this skill. + +#### Signature + +```typescript +getHints(): string[] +``` + +#### Returns + +`string[]` — Array of hint strings to improve speech recognition accuracy. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 402. + +*** + +### getInstanceKey + +Instance key for the SkillManager. Defaults to +`datasphere_serverless_search_knowledge`, matching the Python SDK default. +When `tool_name` is set, uses `datasphere_serverless_`. + +#### Signature + +```typescript +getInstanceKey(): string +``` + +#### Returns + +`string` + +#### Source + +[`src/skills/builtin/datasphere_serverless.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere_serverless.ts) + +Line 135. + +*** + +### getParameterSchema + +Get the parameter schema for this skill class, describing all accepted configuration options. +Subclasses should override and call `super.getParameterSchema()` to include base parameters. + +Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): +returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a +`tool_name` entry with `default: cls.SKILL_NAME` for classes with +`SUPPORTS_MULTIPLE_INSTANCES = true`. + +**Modifiers:** `static` + +#### Signature + +```typescript +getParameterSchema(): Record +``` + +#### Returns + +`Record` — Record mapping parameter names to their schema entries. + +#### Source + +[`src/skills/builtin/datasphere_serverless.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere_serverless.ts) + +Line 55. + +*** + +### getPromptSections + +Get prompt sections to inject into the agent's system prompt. +Respects the `skip_prompt` config option — returns `[]` if set to `true`. +Subclasses should override `_getPromptSections()` instead of this method. + +#### Signature + +```typescript +getPromptSections(): SkillPromptSection[] +``` + +#### Returns + +`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 382. + +*** + +### getSkillData + +Read this skill's data from a raw call data object's global\_data. + +#### Signature + +```typescript +getSkillData(rawData: Record): Record +``` + +#### Parameters + + + The raw request data containing global\_data. + + +#### Returns + +`Record` — The skill's stored data, or an empty object if not found. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 450. + +*** + +### getSkillNamespace + +Get the namespaced key for storing per-skill data in global\_data. + +#### Signature + +```typescript +getSkillNamespace(): string +``` + +#### Returns + +`string` — A string like "skill:datetime" or "skill:my\_prefix". + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 440. + +*** + +### getTools + +Return a stub tool definition since this skill uses DataMap-based execution. +The actual DataMap function is provided by getDataMapTools(). + +#### Signature + +```typescript +getTools(): SkillToolDefinition[] +``` + +#### Returns + +`SkillToolDefinition[]` — A single stub tool (named via `tool_name`) that explains its DataMap nature. + +#### Source + +[`src/skills/builtin/datasphere_serverless.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere_serverless.ts) + +Line 287. + +*** + +### hasAllEnvVars + +Check if all required environment variables are present. +Convenience wrapper around `validateEnvVars()` that returns a boolean, +matching the Python `validate_env_vars() -> bool` return type. + +#### Signature + +```typescript +hasAllEnvVars(): boolean +``` + +#### Returns + +`boolean` — `true` if all required env vars are set, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 544. + +*** + +### hasAllPackages + +Check if all required packages declared in the manifest are available. +Convenience wrapper around `validatePackages()` that returns a boolean, +matching the Python `validate_packages() -> bool` return type. + +#### Signature + +```typescript +hasAllPackages(): Promise +``` + +#### Returns + +`Promise` — `true` if all required packages are importable, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 579. + +*** + +### isInitialized + +Check if the skill has been initialized by the SkillManager. + +#### Signature + +```typescript +isInitialized(): boolean +``` + +#### Returns + +`boolean` — True if setup() has completed and the skill is marked initialized. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 507. + +*** + +### markInitialized + +Mark the skill as initialized (called by SkillManager). + +#### Signature + +```typescript +markInitialized(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 514. + +*** + +### setAgent + +Set the agent reference for this skill. +Called by the SkillManager/AgentBase when the skill is attached to an agent. +Python equivalent: `self.agent = agent` in `__init__`. + +#### Signature + +```typescript +setAgent(agent: AgentBase): void +``` + +#### Parameters + + + The agent that owns this skill. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 534. + +*** + +### setup + +Validate required configuration parameters before the skill becomes active. + +Mirrors Python's `setup()` which checks `space_name`, `project_id`, `token`, +and `document_id` and returns `False` (logging an error) if any are absent. + +#### Signature + +```typescript +setup(): Promise +``` + +#### Returns + +`Promise` — `true` if all required params are present, `false` otherwise. + +#### Source + +[`src/skills/builtin/datasphere_serverless.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere_serverless.ts) + +Line 147. + +*** + +### updateSkillData + +Update this skill's namespaced data on a FunctionResult via updateGlobalData. + +#### Signature + +```typescript +updateSkillData( + result: FunctionResult, + data: Record +): FunctionResult +``` + +#### Parameters + + + The FunctionResult to update. + + + + The data to store under this skill's namespace. + + +#### Returns + +`FunctionResult` — The FunctionResult for chaining. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 462. + +*** + +### validateEnvVars + +Validate that all required environment variables declared on the skill class +are set in the current process environment. + +Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` +directly. TS reads the same static from the class. + +Returns the list of missing variable names so callers can produce actionable +error messages. This differs from Python's `validate_env_vars() -> bool` +return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/agents/skills/builtin/datasphere-serverless/data-sphere-serverless-skill#has-all-env-vars) is the boolean equivalent. + +#### Signature + +```typescript +validateEnvVars(): string[] +``` + +#### Returns + +`string[]` — Array of missing environment variable names (empty if all are present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 486. + +*** + +### validatePackages + +Validate that all required packages declared on the skill class can be imported. + +Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` +directly and tries `importlib.import_module(pkg)` for each; TS does the +equivalent with a dynamic `import()`. + +#### Signature + +```typescript +validatePackages(): Promise +``` + +#### Returns + +`Promise` — Array of package names that could not be imported (empty if all present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 557. + +## Source + +[`src/skills/builtin/datasphere_serverless.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere_serverless.ts) + +Line 45. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/datasphere-serverless/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/datasphere-serverless/index.mdx new file mode 100644 index 0000000000..e8b69273de --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/skills/builtin/datasphere-serverless/index.mdx @@ -0,0 +1,63 @@ +--- +slug: "/reference/typescript/agents/skills/builtin/datasphere-serverless" +title: "datasphere_serverless" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "skills.builtin.datasphere_serverless" + parent: "skills.builtin" + module: "agents.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere_serverless.ts" +--- +# `datasphere_serverless` + +## Signature + +```typescript +module datasphere_serverless +``` + +## Classes + + + + Searches SignalWire DataSphere using a server-side DataMap for serverless execution. + + + +## Functions + +### createSkill + +Factory function for creating DataSphereServerlessSkill instances. + +#### Signature + +```typescript +createSkill(config?: SkillConfig): DataSphereServerlessSkill +``` + +#### Parameters + + + Optional skill configuration. + + +#### Returns + +`DataSphereServerlessSkill` — A new DataSphereServerlessSkill instance. + +#### Source + +[`src/skills/builtin/datasphere_serverless.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere_serverless.ts) + +Line 345. + +## Source + +[`src/skills/builtin/datasphere_serverless.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere_serverless.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/datasphere/data-sphere-skill/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/datasphere/data-sphere-skill/index.mdx new file mode 100644 index 0000000000..62480fd000 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/skills/builtin/datasphere/data-sphere-skill/index.mdx @@ -0,0 +1,721 @@ +--- +slug: "/reference/typescript/agents/skills/builtin/datasphere/data-sphere-skill" +title: "DataSphereSkill" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "skills.builtin.datasphere.DataSphereSkill" + parent: "skills.builtin.datasphere" + module: "agents.skills.builtin.datasphere" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere.ts" +--- +# `DataSphereSkill` + +Searches SignalWire DataSphere for knowledge base content using semantic search. + +Tier 3 built-in skill. Credentials can be supplied via params or fall back to +`SIGNALWIRE_PROJECT_ID`, `SIGNALWIRE_TOKEN`, and `SIGNALWIRE_SPACE` environment +variables. Supports `count`, `distance`, `tags`, `language`, `pos_to_expand`, +`max_synonyms`, and `no_results_message` config options. + +## Signature + +```typescript +class DataSphereSkill extends SkillBase +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/agents/skills/skill-base) + +## Examples + +```typescript +agent.addSkill('datasphere', { + document_id: 'doc_abc123', + count: 3, + tags: ['faq'], +}); +``` + +## Properties + + + Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. + + + + Configuration options provided at construction time. + + + + Unique identifier for this skill instance (includes timestamp and random bytes). + + + + Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. + + + + Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. + + + + Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. + + + + Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. + + + + Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. + + + + Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. + + + + The registered name of this skill type. + + + + Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. + + + + Additional SWAIG fields extracted from config, merged into tool definitions. + + +## Methods + +### cleanup + +Cleanup resources. Called when the skill is removed from an agent. + +#### Signature + +```typescript +cleanup(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 469. + +*** + +### constructor + +Create a new skill instance. + +Python parity: `core/skill_base.py:32-43`. +Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` +is left as `None` on the subclass. TS throws the equivalent when the static +defaults haven't been overridden. + +#### Signature + +```typescript +constructor(config?: SkillConfig): DataSphereSkill +``` + +#### Parameters + + + Optional configuration key-value pairs (Python: `params`). + + +#### Returns + +`DataSphereSkill` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 282. + +*** + +### defineTool + +Imperatively register a tool with this skill. + +Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. +Merges `this.swaigFields` into the tool definition (explicit fields on +`toolDef` take precedence), then pushes the result into `_dynamicTools` +so the default `getTools()` returns it at SWML render time. + +Intended for skills whose tool shape depends on config evaluated at +`setup()` time. Skills with a static tool list should override +`getTools()` instead. + +#### Signature + +```typescript +defineTool(toolDef: SkillToolDefinition): void +``` + +#### Parameters + + + The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 351. + +*** + +### getAgent + +Return the agent that owns this skill, asserting it is non-null. +Equivalent to accessing `self.agent` in Python, where the agent reference +is always set before `setup()` is called. + +The SkillManager lifecycle guarantees that `setAgent()` is called before +`setup()`, so this method is safe to use inside `setup()` and in any +tool handler invoked during an active agent session. + +#### Signature + +```typescript +getAgent(): AgentBase +``` + +#### Returns + +`AgentBase` — The owning `AgentBase` instance. + +#### Throws + +- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 261. + +*** + +### getConfig + +Get a configuration value by key, falling back to a default if not set. + +#### Signature + +```typescript +getConfig(key: string, defaultValue?: T): T +``` + +#### Type Parameters + + + +#### Parameters + + + The configuration key to look up. + + + + Value to return if the key is not present. + + +#### Returns + +`T` — The configuration value cast to type T, or the default value. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 524. + +*** + +### getDataMapTools + +Optional DataMap-style tool definitions. Skills that build their own +SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them +here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. + +Python equivalent: the direct `self.agent.register_swaig_function(fn)` +call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). +Default returns `[]` — skills using only the declarative `getTools()` path +do not need to override this. + +#### Signature + +```typescript +getDataMapTools(): Record[] +``` + +#### Returns + +`Record[]` — Array of fully-built SWAIG function dicts. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 372. + +*** + +### getGlobalData + +Global data injected into the agent's SWML context. Matches Python's +`get_global_data()` so downstream consumers can detect DataSphere +availability, the configured `document_id`, and the knowledge provider. + +#### Signature + +```typescript +getGlobalData(): Record +``` + +#### Returns + +`Record` + +#### Source + +[`src/skills/builtin/datasphere.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere.ts) + +Line 179. + +*** + +### getHints + +Get speech recognition hints relevant to this skill. + +#### Signature + +```typescript +getHints(): string[] +``` + +#### Returns + +`string[]` — Array of hint strings to improve speech recognition accuracy. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 402. + +*** + +### getInstanceKey + +Instance key for the SkillManager. Defaults to `datasphere_search_knowledge`, +matching the Python SDK default. When `tool_name` is set, uses +`datasphere_`. + +#### Signature + +```typescript +getInstanceKey(): string +``` + +#### Returns + +`string` + +#### Source + +[`src/skills/builtin/datasphere.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere.ts) + +Line 169. + +*** + +### getParameterSchema + +Get the parameter schema for this skill class, describing all accepted configuration options. +Subclasses should override and call `super.getParameterSchema()` to include base parameters. + +Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): +returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a +`tool_name` entry with `default: cls.SKILL_NAME` for classes with +`SUPPORTS_MULTIPLE_INSTANCES = true`. + +**Modifiers:** `static` + +#### Signature + +```typescript +getParameterSchema(): Record +``` + +#### Returns + +`Record` — Record mapping parameter names to their schema entries. + +#### Source + +[`src/skills/builtin/datasphere.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere.ts) + +Line 81. + +*** + +### getPromptSections + +Get prompt sections to inject into the agent's system prompt. +Respects the `skip_prompt` config option — returns `[]` if set to `true`. +Subclasses should override `_getPromptSections()` instead of this method. + +#### Signature + +```typescript +getPromptSections(): SkillPromptSection[] +``` + +#### Returns + +`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 382. + +*** + +### getSkillData + +Read this skill's data from a raw call data object's global\_data. + +#### Signature + +```typescript +getSkillData(rawData: Record): Record +``` + +#### Parameters + + + The raw request data containing global\_data. + + +#### Returns + +`Record` — The skill's stored data, or an empty object if not found. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 450. + +*** + +### getSkillNamespace + +Get the namespaced key for storing per-skill data in global\_data. + +#### Signature + +```typescript +getSkillNamespace(): string +``` + +#### Returns + +`string` — A string like "skill:datetime" or "skill:my\_prefix". + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 440. + +*** + +### getTools + +#### Signature + +```typescript +getTools(): SkillToolDefinition[] +``` + +#### Returns + +`SkillToolDefinition[]` — A single tool (named via `tool_name`) that performs semantic search. + +#### Source + +[`src/skills/builtin/datasphere.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere.ts) + +Line 224. + +*** + +### hasAllEnvVars + +Check if all required environment variables are present. +Convenience wrapper around `validateEnvVars()` that returns a boolean, +matching the Python `validate_env_vars() -> bool` return type. + +#### Signature + +```typescript +hasAllEnvVars(): boolean +``` + +#### Returns + +`boolean` — `true` if all required env vars are set, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 544. + +*** + +### hasAllPackages + +Check if all required packages declared in the manifest are available. +Convenience wrapper around `validatePackages()` that returns a boolean, +matching the Python `validate_packages() -> bool` return type. + +#### Signature + +```typescript +hasAllPackages(): Promise +``` + +#### Returns + +`Promise` — `true` if all required packages are importable, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 579. + +*** + +### isInitialized + +Check if the skill has been initialized by the SkillManager. + +#### Signature + +```typescript +isInitialized(): boolean +``` + +#### Returns + +`boolean` — True if setup() has completed and the skill is marked initialized. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 507. + +*** + +### markInitialized + +Mark the skill as initialized (called by SkillManager). + +#### Signature + +```typescript +markInitialized(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 514. + +*** + +### setAgent + +Set the agent reference for this skill. +Called by the SkillManager/AgentBase when the skill is attached to an agent. +Python equivalent: `self.agent = agent` in `__init__`. + +#### Signature + +```typescript +setAgent(agent: AgentBase): void +``` + +#### Parameters + + + The agent that owns this skill. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 534. + +*** + +### setup + +Validate required credentials before the skill becomes active. + +Mirrors Python skills/datasphere/skill.py:120-128: `setup()` returns false +when any of `space_name`, `project_id`, `token`, or `document_id` is +missing from either config or env. Fails closed so SkillManager refuses +to register a skill that would break at call time. + +#### Signature + +```typescript +setup(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/skills/builtin/datasphere.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere.ts) + +Line 195. + +*** + +### updateSkillData + +Update this skill's namespaced data on a FunctionResult via updateGlobalData. + +#### Signature + +```typescript +updateSkillData( + result: FunctionResult, + data: Record +): FunctionResult +``` + +#### Parameters + + + The FunctionResult to update. + + + + The data to store under this skill's namespace. + + +#### Returns + +`FunctionResult` — The FunctionResult for chaining. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 462. + +*** + +### validateEnvVars + +Validate that all required environment variables declared on the skill class +are set in the current process environment. + +Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` +directly. TS reads the same static from the class. + +Returns the list of missing variable names so callers can produce actionable +error messages. This differs from Python's `validate_env_vars() -> bool` +return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/agents/skills/builtin/datasphere/data-sphere-skill#has-all-env-vars) is the boolean equivalent. + +#### Signature + +```typescript +validateEnvVars(): string[] +``` + +#### Returns + +`string[]` — Array of missing environment variable names (empty if all are present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 486. + +*** + +### validatePackages + +Validate that all required packages declared on the skill class can be imported. + +Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` +directly and tries `importlib.import_module(pkg)` for each; TS does the +equivalent with a dynamic `import()`. + +#### Signature + +```typescript +validatePackages(): Promise +``` + +#### Returns + +`Promise` — Array of package names that could not be imported (empty if all present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 557. + +## Source + +[`src/skills/builtin/datasphere.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere.ts) + +Line 71. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/datasphere/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/datasphere/index.mdx new file mode 100644 index 0000000000..42cdc5154a --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/skills/builtin/datasphere/index.mdx @@ -0,0 +1,63 @@ +--- +slug: "/reference/typescript/agents/skills/builtin/datasphere" +title: "datasphere" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "skills.builtin.datasphere" + parent: "skills.builtin" + module: "agents.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere.ts" +--- +# `datasphere` + +## Signature + +```typescript +module datasphere +``` + +## Classes + + + + Searches SignalWire DataSphere for knowledge base content using semantic search. + + + +## Functions + +### createSkill + +Factory function for creating DataSphereSkill instances. + +#### Signature + +```typescript +createSkill(config?: SkillConfig): DataSphereSkill +``` + +#### Parameters + + + Optional skill configuration. + + +#### Returns + +`DataSphereSkill` — A new DataSphereSkill instance. + +#### Source + +[`src/skills/builtin/datasphere.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere.ts) + +Line 457. + +## Source + +[`src/skills/builtin/datasphere.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/datetime/date-time-skill/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/datetime/date-time-skill/index.mdx new file mode 100644 index 0000000000..0e2c9db5ad --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/skills/builtin/datetime/date-time-skill/index.mdx @@ -0,0 +1,717 @@ +--- +slug: "/reference/typescript/agents/skills/builtin/datetime/date-time-skill" +title: "DateTimeSkill" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "skills.builtin.datetime.DateTimeSkill" + parent: "skills.builtin.datetime" + module: "agents.skills.builtin.datetime" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datetime.ts" +--- +# `DateTimeSkill` + +Provides the current date and time with optional timezone support. + +Tier 1 built-in skill with no external dependencies. Supports all IANA +timezone identifiers via the Intl.DateTimeFormat API. + +Registers two SWAIG tools: `get_current_time` and `get_current_date`. + +## Signature + +```typescript +class DateTimeSkill extends SkillBase +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/agents/skills/skill-base) + +## Examples + +```typescript +agent.addSkill('datetime'); +``` + +## Properties + + + Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. + + + + Configuration options provided at construction time. + + + + Unique identifier for this skill instance (includes timestamp and random bytes). + + + + Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. + + + + Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. + + + + Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. + + + + Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. + + + + Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. + + + + Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. + + + + The registered name of this skill type. + + + + Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. + + + + Additional SWAIG fields extracted from config, merged into tool definitions. + + +## Methods + +### cleanup + +Cleanup resources. Called when the skill is removed from an agent. + +#### Signature + +```typescript +cleanup(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 469. + +*** + +### constructor + +Create a new skill instance. + +Python parity: `core/skill_base.py:32-43`. +Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` +is left as `None` on the subclass. TS throws the equivalent when the static +defaults haven't been overridden. + +#### Signature + +```typescript +constructor(config?: SkillConfig): DateTimeSkill +``` + +#### Parameters + + + Optional configuration key-value pairs (Python: `params`). + + +#### Returns + +`DateTimeSkill` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 282. + +*** + +### defineTool + +Imperatively register a tool with this skill. + +Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. +Merges `this.swaigFields` into the tool definition (explicit fields on +`toolDef` take precedence), then pushes the result into `_dynamicTools` +so the default `getTools()` returns it at SWML render time. + +Intended for skills whose tool shape depends on config evaluated at +`setup()` time. Skills with a static tool list should override +`getTools()` instead. + +#### Signature + +```typescript +defineTool(toolDef: SkillToolDefinition): void +``` + +#### Parameters + + + The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 351. + +*** + +### getAgent + +Return the agent that owns this skill, asserting it is non-null. +Equivalent to accessing `self.agent` in Python, where the agent reference +is always set before `setup()` is called. + +The SkillManager lifecycle guarantees that `setAgent()` is called before +`setup()`, so this method is safe to use inside `setup()` and in any +tool handler invoked during an active agent session. + +#### Signature + +```typescript +getAgent(): AgentBase +``` + +#### Returns + +`AgentBase` — The owning `AgentBase` instance. + +#### Throws + +- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 261. + +*** + +### getConfig + +Get a configuration value by key, falling back to a default if not set. + +#### Signature + +```typescript +getConfig(key: string, defaultValue?: T): T +``` + +#### Type Parameters + + + +#### Parameters + + + The configuration key to look up. + + + + Value to return if the key is not present. + + +#### Returns + +`T` — The configuration value cast to type T, or the default value. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 524. + +*** + +### getDataMapTools + +Optional DataMap-style tool definitions. Skills that build their own +SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them +here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. + +Python equivalent: the direct `self.agent.register_swaig_function(fn)` +call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). +Default returns `[]` — skills using only the declarative `getTools()` path +do not need to override this. + +#### Signature + +```typescript +getDataMapTools(): Record[] +``` + +#### Returns + +`Record[]` — Array of fully-built SWAIG function dicts. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 372. + +*** + +### getGlobalData + +Get global data to merge into the agent's global data store. + +#### Signature + +```typescript +getGlobalData(): Record +``` + +#### Returns + +`Record` — Key-value pairs to be merged into the agent's global data. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 410. + +*** + +### getHints + +Get speech recognition hints relevant to this skill. + +#### Signature + +```typescript +getHints(): string[] +``` + +#### Returns + +`string[]` — Array of hint strings to improve speech recognition accuracy. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 402. + +*** + +### getInstanceKey + +Get the instance key used for deduplication in the SkillManager. + +For single-instance skills (`SUPPORTS_MULTIPLE_INSTANCES = false`), returns +the skill name. For multi-instance skills, returns `${skillName}_${toolName}` +using the `tool_name` config (falls back to the skill name). + +Matches Python's `SkillBase.get_instance_key()` default (`skill_base.py:141-146`). +Multi-instance subclasses only need to override when their key derivation +depends on config beyond `tool_name`. + +#### Signature + +```typescript +getInstanceKey(): string +``` + +#### Returns + +`string` — A unique key identifying this skill instance. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 427. + +*** + +### getParameterSchema + +Get the parameter schema for this skill class, describing all accepted configuration options. +Subclasses should override and call `super.getParameterSchema()` to include base parameters. + +Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): +returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a +`tool_name` entry with `default: cls.SKILL_NAME` for classes with +`SUPPORTS_MULTIPLE_INSTANCES = true`. + +**Modifiers:** `static` + +#### Signature + +```typescript +getParameterSchema(): Record +``` + +#### Returns + +`Record` — Record mapping parameter names to their schema entries. + +#### Source + +[`src/skills/builtin/datetime.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datetime.ts) + +Line 38. + +*** + +### getPromptSections + +Get prompt sections to inject into the agent's system prompt. +Respects the `skip_prompt` config option — returns `[]` if set to `true`. +Subclasses should override `_getPromptSections()` instead of this method. + +#### Signature + +```typescript +getPromptSections(): SkillPromptSection[] +``` + +#### Returns + +`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 382. + +*** + +### getSkillData + +Read this skill's data from a raw call data object's global\_data. + +#### Signature + +```typescript +getSkillData(rawData: Record): Record +``` + +#### Parameters + + + The raw request data containing global\_data. + + +#### Returns + +`Record` — The skill's stored data, or an empty object if not found. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 450. + +*** + +### getSkillNamespace + +Get the namespaced key for storing per-skill data in global\_data. + +#### Signature + +```typescript +getSkillNamespace(): string +``` + +#### Returns + +`string` — A string like "skill:datetime" or "skill:my\_prefix". + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 440. + +*** + +### getTools + +#### Signature + +```typescript +getTools(): SkillToolDefinition[] +``` + +#### Returns + +`SkillToolDefinition[]` — Two tools: `get_current_time` and `get_current_date`, each accepting an optional IANA timezone and defaulting to UTC. + +#### Source + +[`src/skills/builtin/datetime.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datetime.ts) + +Line 46. + +*** + +### hasAllEnvVars + +Check if all required environment variables are present. +Convenience wrapper around `validateEnvVars()` that returns a boolean, +matching the Python `validate_env_vars() -> bool` return type. + +#### Signature + +```typescript +hasAllEnvVars(): boolean +``` + +#### Returns + +`boolean` — `true` if all required env vars are set, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 544. + +*** + +### hasAllPackages + +Check if all required packages declared in the manifest are available. +Convenience wrapper around `validatePackages()` that returns a boolean, +matching the Python `validate_packages() -> bool` return type. + +#### Signature + +```typescript +hasAllPackages(): Promise +``` + +#### Returns + +`Promise` — `true` if all required packages are importable, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 579. + +*** + +### isInitialized + +Check if the skill has been initialized by the SkillManager. + +#### Signature + +```typescript +isInitialized(): boolean +``` + +#### Returns + +`boolean` — True if setup() has completed and the skill is marked initialized. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 507. + +*** + +### markInitialized + +Mark the skill as initialized (called by SkillManager). + +#### Signature + +```typescript +markInitialized(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 514. + +*** + +### setAgent + +Set the agent reference for this skill. +Called by the SkillManager/AgentBase when the skill is attached to an agent. +Python equivalent: `self.agent = agent` in `__init__`. + +#### Signature + +```typescript +setAgent(agent: AgentBase): void +``` + +#### Parameters + + + The agent that owns this skill. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 534. + +*** + +### setup + +Setup the skill. Called when the skill is added to an agent. +Override to perform initialization (API connections, config validation, etc.) + +#### Signature + +```typescript +setup(): Promise +``` + +#### Returns + +`Promise` — `true` if setup succeeded, `false` otherwise. Python equivalent: abstract `setup() -> bool`. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 313. + +*** + +### updateSkillData + +Update this skill's namespaced data on a FunctionResult via updateGlobalData. + +#### Signature + +```typescript +updateSkillData( + result: FunctionResult, + data: Record +): FunctionResult +``` + +#### Parameters + + + The FunctionResult to update. + + + + The data to store under this skill's namespace. + + +#### Returns + +`FunctionResult` — The FunctionResult for chaining. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 462. + +*** + +### validateEnvVars + +Validate that all required environment variables declared on the skill class +are set in the current process environment. + +Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` +directly. TS reads the same static from the class. + +Returns the list of missing variable names so callers can produce actionable +error messages. This differs from Python's `validate_env_vars() -> bool` +return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/agents/skills/builtin/datetime/date-time-skill#has-all-env-vars) is the boolean equivalent. + +#### Signature + +```typescript +validateEnvVars(): string[] +``` + +#### Returns + +`string[]` — Array of missing environment variable names (empty if all are present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 486. + +*** + +### validatePackages + +Validate that all required packages declared on the skill class can be imported. + +Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` +directly and tries `importlib.import_module(pkg)` for each; TS does the +equivalent with a dynamic `import()`. + +#### Signature + +```typescript +validatePackages(): Promise +``` + +#### Returns + +`Promise` — Array of package names that could not be imported (empty if all present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 557. + +## Source + +[`src/skills/builtin/datetime.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datetime.ts) + +Line 29. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/datetime/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/datetime/index.mdx new file mode 100644 index 0000000000..ac1d2ec2fe --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/skills/builtin/datetime/index.mdx @@ -0,0 +1,63 @@ +--- +slug: "/reference/typescript/agents/skills/builtin/datetime" +title: "datetime" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "skills.builtin.datetime" + parent: "skills.builtin" + module: "agents.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datetime.ts" +--- +# `datetime` + +## Signature + +```typescript +module datetime +``` + +## Classes + + + + Provides the current date and time with optional timezone support. + + + +## Functions + +### createSkill + +Factory function for creating DateTimeSkill instances. + +#### Signature + +```typescript +createSkill(config?: SkillConfig): DateTimeSkill +``` + +#### Parameters + + + Optional skill configuration. + + +#### Returns + +`DateTimeSkill` — A new DateTimeSkill instance. + +#### Source + +[`src/skills/builtin/datetime.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datetime.ts) + +Line 135. + +## Source + +[`src/skills/builtin/datetime.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datetime.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/google-maps/google-maps-skill/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/google-maps/google-maps-skill/index.mdx new file mode 100644 index 0000000000..ace362e5cb --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/skills/builtin/google-maps/google-maps-skill/index.mdx @@ -0,0 +1,715 @@ +--- +slug: "/reference/typescript/agents/skills/builtin/google-maps/google-maps-skill" +title: "GoogleMapsSkill" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "skills.builtin.google_maps.GoogleMapsSkill" + parent: "skills.builtin.google_maps" + module: "agents.skills.builtin.google_maps" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/google_maps.ts" +--- +# `GoogleMapsSkill` + +Provides driving/walking/transit directions and place search via Google Maps APIs. + +Tier 3 built-in skill. Requires the `GOOGLE_MAPS_API_KEY` environment variable. +Supports a `default_mode` config option ("driving"|"walking"|"bicycling"|"transit"). + +## Signature + +```typescript +class GoogleMapsSkill extends SkillBase +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/agents/skills/skill-base) + +## Examples + +```typescript +agent.addSkill('google_maps', { default_mode: 'driving' }); +``` + +## Properties + + + Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. + + + + Configuration options provided at construction time. + + + + Unique identifier for this skill instance (includes timestamp and random bytes). + + + + Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. + + + + Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. + + + + Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. + + + + Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. + + + + Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. + + + + Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. + + + + The registered name of this skill type. + + + + Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. + + + + Additional SWAIG fields extracted from config, merged into tool definitions. + + +## Methods + +### cleanup + +Cleanup resources. Called when the skill is removed from an agent. + +#### Signature + +```typescript +cleanup(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 469. + +*** + +### constructor + +Create a new skill instance. + +Python parity: `core/skill_base.py:32-43`. +Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` +is left as `None` on the subclass. TS throws the equivalent when the static +defaults haven't been overridden. + +#### Signature + +```typescript +constructor(config?: SkillConfig): GoogleMapsSkill +``` + +#### Parameters + + + Optional configuration key-value pairs (Python: `params`). + + +#### Returns + +`GoogleMapsSkill` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 282. + +*** + +### defineTool + +Imperatively register a tool with this skill. + +Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. +Merges `this.swaigFields` into the tool definition (explicit fields on +`toolDef` take precedence), then pushes the result into `_dynamicTools` +so the default `getTools()` returns it at SWML render time. + +Intended for skills whose tool shape depends on config evaluated at +`setup()` time. Skills with a static tool list should override +`getTools()` instead. + +#### Signature + +```typescript +defineTool(toolDef: SkillToolDefinition): void +``` + +#### Parameters + + + The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 351. + +*** + +### getAgent + +Return the agent that owns this skill, asserting it is non-null. +Equivalent to accessing `self.agent` in Python, where the agent reference +is always set before `setup()` is called. + +The SkillManager lifecycle guarantees that `setAgent()` is called before +`setup()`, so this method is safe to use inside `setup()` and in any +tool handler invoked during an active agent session. + +#### Signature + +```typescript +getAgent(): AgentBase +``` + +#### Returns + +`AgentBase` — The owning `AgentBase` instance. + +#### Throws + +- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 261. + +*** + +### getConfig + +Get a configuration value by key, falling back to a default if not set. + +#### Signature + +```typescript +getConfig(key: string, defaultValue?: T): T +``` + +#### Type Parameters + + + +#### Parameters + + + The configuration key to look up. + + + + Value to return if the key is not present. + + +#### Returns + +`T` — The configuration value cast to type T, or the default value. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 524. + +*** + +### getDataMapTools + +Optional DataMap-style tool definitions. Skills that build their own +SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them +here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. + +Python equivalent: the direct `self.agent.register_swaig_function(fn)` +call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). +Default returns `[]` — skills using only the declarative `getTools()` path +do not need to override this. + +#### Signature + +```typescript +getDataMapTools(): Record[] +``` + +#### Returns + +`Record[]` — Array of fully-built SWAIG function dicts. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 372. + +*** + +### getGlobalData + +Get global data to merge into the agent's global data store. + +#### Signature + +```typescript +getGlobalData(): Record +``` + +#### Returns + +`Record` — Key-value pairs to be merged into the agent's global data. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 410. + +*** + +### getHints + +#### Signature + +```typescript +getHints(): string[] +``` + +#### Returns + +`string[]` — Speech recognition hints for maps/directions keywords. + +#### Source + +[`src/skills/builtin/google_maps.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/google_maps.ts) + +Line 174. + +*** + +### getInstanceKey + +Get the instance key used for deduplication in the SkillManager. + +For single-instance skills (`SUPPORTS_MULTIPLE_INSTANCES = false`), returns +the skill name. For multi-instance skills, returns `${skillName}_${toolName}` +using the `tool_name` config (falls back to the skill name). + +Matches Python's `SkillBase.get_instance_key()` default (`skill_base.py:141-146`). +Multi-instance subclasses only need to override when their key derivation +depends on config beyond `tool_name`. + +#### Signature + +```typescript +getInstanceKey(): string +``` + +#### Returns + +`string` — A unique key identifying this skill instance. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 427. + +*** + +### getParameterSchema + +Get the parameter schema for this skill class, describing all accepted configuration options. +Subclasses should override and call `super.getParameterSchema()` to include base parameters. + +Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): +returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a +`tool_name` entry with `default: cls.SKILL_NAME` for classes with +`SUPPORTS_MULTIPLE_INSTANCES = true`. + +**Modifiers:** `static` + +#### Signature + +```typescript +getParameterSchema(): Record +``` + +#### Returns + +`Record` — Record mapping parameter names to their schema entries. + +#### Source + +[`src/skills/builtin/google_maps.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/google_maps.ts) + +Line 119. + +*** + +### getPromptSections + +Get prompt sections to inject into the agent's system prompt. +Respects the `skip_prompt` config option — returns `[]` if set to `true`. +Subclasses should override `_getPromptSections()` instead of this method. + +#### Signature + +```typescript +getPromptSections(): SkillPromptSection[] +``` + +#### Returns + +`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 382. + +*** + +### getSkillData + +Read this skill's data from a raw call data object's global\_data. + +#### Signature + +```typescript +getSkillData(rawData: Record): Record +``` + +#### Parameters + + + The raw request data containing global\_data. + + +#### Returns + +`Record` — The skill's stored data, or an empty object if not found. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 450. + +*** + +### getSkillNamespace + +Get the namespaced key for storing per-skill data in global\_data. + +#### Signature + +```typescript +getSkillNamespace(): string +``` + +#### Returns + +`string` — A string like "skill:datetime" or "skill:my\_prefix". + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 440. + +*** + +### getTools + +#### Signature + +```typescript +getTools(): SkillToolDefinition[] +``` + +#### Returns + +`SkillToolDefinition[]` — Two tools: `get_directions` for route info and `find_place` for place discovery. + +#### Source + +[`src/skills/builtin/google_maps.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/google_maps.ts) + +Line 179. + +*** + +### hasAllEnvVars + +Check if all required environment variables are present. +Convenience wrapper around `validateEnvVars()` that returns a boolean, +matching the Python `validate_env_vars() -> bool` return type. + +#### Signature + +```typescript +hasAllEnvVars(): boolean +``` + +#### Returns + +`boolean` — `true` if all required env vars are set, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 544. + +*** + +### hasAllPackages + +Check if all required packages declared in the manifest are available. +Convenience wrapper around `validatePackages()` that returns a boolean, +matching the Python `validate_packages() -> bool` return type. + +#### Signature + +```typescript +hasAllPackages(): Promise +``` + +#### Returns + +`Promise` — `true` if all required packages are importable, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 579. + +*** + +### isInitialized + +Check if the skill has been initialized by the SkillManager. + +#### Signature + +```typescript +isInitialized(): boolean +``` + +#### Returns + +`boolean` — True if setup() has completed and the skill is marked initialized. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 507. + +*** + +### markInitialized + +Mark the skill as initialized (called by SkillManager). + +#### Signature + +```typescript +markInitialized(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 514. + +*** + +### setAgent + +Set the agent reference for this skill. +Called by the SkillManager/AgentBase when the skill is attached to an agent. +Python equivalent: `self.agent = agent` in `__init__`. + +#### Signature + +```typescript +setAgent(agent: AgentBase): void +``` + +#### Parameters + + + The agent that owns this skill. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 534. + +*** + +### setup + +Fail-fast when GOOGLE\_MAPS\_API\_KEY is not set, mirroring Python's +`setup()` validation. The env var is the only credential source for +this skill, so loading it without the key would produce runtime +errors on every tool call. + +#### Signature + +```typescript +setup(): Promise +``` + +#### Returns + +`Promise` — `true` if the API key is present, `false` otherwise. + +#### Source + +[`src/skills/builtin/google_maps.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/google_maps.ts) + +Line 165. + +*** + +### updateSkillData + +Update this skill's namespaced data on a FunctionResult via updateGlobalData. + +#### Signature + +```typescript +updateSkillData( + result: FunctionResult, + data: Record +): FunctionResult +``` + +#### Parameters + + + The FunctionResult to update. + + + + The data to store under this skill's namespace. + + +#### Returns + +`FunctionResult` — The FunctionResult for chaining. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 462. + +*** + +### validateEnvVars + +Validate that all required environment variables declared on the skill class +are set in the current process environment. + +Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` +directly. TS reads the same static from the class. + +Returns the list of missing variable names so callers can produce actionable +error messages. This differs from Python's `validate_env_vars() -> bool` +return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/agents/skills/builtin/google-maps/google-maps-skill#has-all-env-vars) is the boolean equivalent. + +#### Signature + +```typescript +validateEnvVars(): string[] +``` + +#### Returns + +`string[]` — Array of missing environment variable names (empty if all are present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 486. + +*** + +### validatePackages + +Validate that all required packages declared on the skill class can be imported. + +Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` +directly and tries `importlib.import_module(pkg)` for each; TS does the +equivalent with a dynamic `import()`. + +#### Signature + +```typescript +validatePackages(): Promise +``` + +#### Returns + +`Promise` — Array of package names that could not be imported (empty if all present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 557. + +## Source + +[`src/skills/builtin/google_maps.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/google_maps.ts) + +Line 107. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/google-maps/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/google-maps/index.mdx new file mode 100644 index 0000000000..f37a981fd9 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/skills/builtin/google-maps/index.mdx @@ -0,0 +1,63 @@ +--- +slug: "/reference/typescript/agents/skills/builtin/google-maps" +title: "google_maps" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "skills.builtin.google_maps" + parent: "skills.builtin" + module: "agents.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/google_maps.ts" +--- +# `google_maps` + +## Signature + +```typescript +module google_maps +``` + +## Classes + + + + Provides driving/walking/transit directions and place search via Google Maps APIs. + + + +## Functions + +### createSkill + +Factory function for creating GoogleMapsSkill instances. + +#### Signature + +```typescript +createSkill(config?: SkillConfig): GoogleMapsSkill +``` + +#### Parameters + + + Optional skill configuration. + + +#### Returns + +`GoogleMapsSkill` — A new GoogleMapsSkill instance. + +#### Source + +[`src/skills/builtin/google_maps.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/google_maps.ts) + +Line 654. + +## Source + +[`src/skills/builtin/google_maps.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/google_maps.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/index.mdx new file mode 100644 index 0000000000..5b8f1db2fb --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/skills/builtin/index.mdx @@ -0,0 +1,94 @@ +--- +slug: "/reference/typescript/agents/skills/builtin" +title: "builtin" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "skills.builtin" + parent: "skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/index.ts" +--- +# `builtin` + +## Signature + +```typescript +module builtin +``` + +## Modules + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## Functions + +### registerBuiltinSkills + +Register all 19 built-in skills with the global SkillRegistry singleton. +Matches Python's auto-discovery pattern (`skills/registry.py`) which finds +SkillBase subclasses in the skills directory and registers them by class +reference. Skips registration for any skill name already present. + +#### Signature + +```typescript +registerBuiltinSkills(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/skills/builtin/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/index.ts) + +Line 55. + +## Source + +[`src/skills/builtin/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/index.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/info-gatherer/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/info-gatherer/index.mdx new file mode 100644 index 0000000000..eb565b6092 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/skills/builtin/info-gatherer/index.mdx @@ -0,0 +1,63 @@ +--- +slug: "/reference/typescript/agents/skills/builtin/info-gatherer" +title: "info_gatherer" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "skills.builtin.info_gatherer" + parent: "skills.builtin" + module: "agents.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/info_gatherer.ts" +--- +# `info_gatherer` + +## Signature + +```typescript +module info_gatherer +``` + +## Classes + + + + Collects answers to a configurable list of questions, one at a time. + + + +## Functions + +### createSkill + +Factory function for creating InfoGathererSkill instances. + +#### Signature + +```typescript +createSkill(config?: SkillConfig): InfoGathererSkill +``` + +#### Parameters + + + Optional skill configuration. + + +#### Returns + +`InfoGathererSkill` — A new InfoGathererSkill instance. + +#### Source + +[`src/skills/builtin/info_gatherer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/info_gatherer.ts) + +Line 413. + +## Source + +[`src/skills/builtin/info_gatherer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/info_gatherer.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/info-gatherer/info-gatherer-skill/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/info-gatherer/info-gatherer-skill/index.mdx new file mode 100644 index 0000000000..3a1ca443e0 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/skills/builtin/info-gatherer/info-gatherer-skill/index.mdx @@ -0,0 +1,731 @@ +--- +slug: "/reference/typescript/agents/skills/builtin/info-gatherer/info-gatherer-skill" +title: "InfoGathererSkill" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "skills.builtin.info_gatherer.InfoGathererSkill" + parent: "skills.builtin.info_gatherer" + module: "agents.skills.builtin.info_gatherer" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/info_gatherer.ts" +--- +# `InfoGathererSkill` + +Collects answers to a configurable list of questions, one at a time. + +Mirrors Python `InfoGathererSkill` exactly: the same required +`questions` config, the same `prefix` / `completion_message` options, +the same two tools (`start_questions`, `submit_answer`), and the same +state shape in `global_data`. + +## Signature + +```typescript +class InfoGathererSkill extends SkillBase +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/agents/skills/skill-base) + +## Examples + +```typescript +agent.addSkill('info_gatherer', { + questions: [ + { key_name: 'name', question_text: 'What is your name?' }, + { key_name: 'email', question_text: 'Your email?', confirm: true }, + ], +}); +``` + +## Properties + + + Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. + + + + Configuration options provided at construction time. + + + + Unique identifier for this skill instance (includes timestamp and random bytes). + + + + Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. + + + + Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. + + + + Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. + + + + Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. + + + + Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. + + + + Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. + + + + The registered name of this skill type. + + + + Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. + + + + Additional SWAIG fields extracted from config, merged into tool definitions. + + +## Methods + +### cleanup + +Cleanup resources. Called when the skill is removed from an agent. + +#### Signature + +```typescript +cleanup(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 469. + +*** + +### constructor + +Create a new skill instance. + +Python parity: `core/skill_base.py:32-43`. +Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` +is left as `None` on the subclass. TS throws the equivalent when the static +defaults haven't been overridden. + +#### Signature + +```typescript +constructor(config?: SkillConfig): InfoGathererSkill +``` + +#### Parameters + + + Optional configuration key-value pairs (Python: `params`). + + +#### Returns + +`InfoGathererSkill` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 282. + +*** + +### defineTool + +Imperatively register a tool with this skill. + +Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. +Merges `this.swaigFields` into the tool definition (explicit fields on +`toolDef` take precedence), then pushes the result into `_dynamicTools` +so the default `getTools()` returns it at SWML render time. + +Intended for skills whose tool shape depends on config evaluated at +`setup()` time. Skills with a static tool list should override +`getTools()` instead. + +#### Signature + +```typescript +defineTool(toolDef: SkillToolDefinition): void +``` + +#### Parameters + + + The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 351. + +*** + +### getAgent + +Return the agent that owns this skill, asserting it is non-null. +Equivalent to accessing `self.agent` in Python, where the agent reference +is always set before `setup()` is called. + +The SkillManager lifecycle guarantees that `setAgent()` is called before +`setup()`, so this method is safe to use inside `setup()` and in any +tool handler invoked during an active agent session. + +#### Signature + +```typescript +getAgent(): AgentBase +``` + +#### Returns + +`AgentBase` — The owning `AgentBase` instance. + +#### Throws + +- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 261. + +*** + +### getConfig + +Get a configuration value by key, falling back to a default if not set. + +#### Signature + +```typescript +getConfig(key: string, defaultValue?: T): T +``` + +#### Type Parameters + + + +#### Parameters + + + The configuration key to look up. + + + + Value to return if the key is not present. + + +#### Returns + +`T` — The configuration value cast to type T, or the default value. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 524. + +*** + +### getDataMapTools + +Optional DataMap-style tool definitions. Skills that build their own +SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them +here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. + +Python equivalent: the direct `self.agent.register_swaig_function(fn)` +call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). +Default returns `[]` — skills using only the declarative `getTools()` path +do not need to override this. + +#### Signature + +```typescript +getDataMapTools(): Record[] +``` + +#### Returns + +`Record[]` — Array of fully-built SWAIG function dicts. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 372. + +*** + +### getGlobalData + +Seed SWAIG `global_data` with the initial question state under this +skill's namespace. Mirrors Python `get_global_data()` (skill.py:127-135). + +Defensive no-op when the skill was not successfully set up (empty +`questions`). Python relies on the SkillManager to skip unloaded skills; +TS adds this guard so `getGlobalData()` called without a successful +`setup()` returns `{}` instead of a malformed state payload. + +#### Signature + +```typescript +getGlobalData(): Record +``` + +#### Returns + +`Record` + +#### Source + +[`src/skills/builtin/info_gatherer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/info_gatherer.ts) + +Line 170. + +*** + +### getHints + +Get speech recognition hints relevant to this skill. + +#### Signature + +```typescript +getHints(): string[] +``` + +#### Returns + +`string[]` — Array of hint strings to improve speech recognition accuracy. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 402. + +*** + +### getInstanceKey + +Instance key for the SkillManager. When `prefix` is configured, returns +`info_gatherer_` to support multi-instance use. Matches Python's +`get_instance_key()` (skill.py:81-85). + +#### Signature + +```typescript +getInstanceKey(): string +``` + +#### Returns + +`string` + +#### Source + +[`src/skills/builtin/info_gatherer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/info_gatherer.ts) + +Line 116. + +*** + +### getParameterSchema + +Get the parameter schema for this skill class, describing all accepted configuration options. +Subclasses should override and call `super.getParameterSchema()` to include base parameters. + +Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): +returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a +`tool_name` entry with `default: cls.SKILL_NAME` for classes with +`SUPPORTS_MULTIPLE_INSTANCES = true`. + +**Modifiers:** `static` + +#### Signature + +```typescript +getParameterSchema(): Record +``` + +#### Returns + +`Record` — Record mapping parameter names to their schema entries. + +#### Source + +[`src/skills/builtin/info_gatherer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/info_gatherer.ts) + +Line 78. + +*** + +### getPromptSections + +Get prompt sections to inject into the agent's system prompt. +Respects the `skip_prompt` config option — returns `[]` if set to `true`. +Subclasses should override `_getPromptSections()` instead of this method. + +#### Signature + +```typescript +getPromptSections(): SkillPromptSection[] +``` + +#### Returns + +`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 382. + +*** + +### getSkillData + +Read this skill's data from a raw call data object's global\_data. + +#### Signature + +```typescript +getSkillData(rawData: Record): Record +``` + +#### Parameters + + + The raw request data containing global\_data. + + +#### Returns + +`Record` — The skill's stored data, or an empty object if not found. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 450. + +*** + +### getSkillNamespace + +Get the namespaced key for storing per-skill data in global\_data. + +#### Signature + +```typescript +getSkillNamespace(): string +``` + +#### Returns + +`string` — A string like "skill:datetime" or "skill:my\_prefix". + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 440. + +*** + +### getTools + +Register the two sequential-flow tools. Mirrors Python +`register_tools()` (skill.py:162-184). Returns an empty array when +`setup()` did not complete (no questions) so the skill never exposes +half-initialized tools. + +#### Signature + +```typescript +getTools(): SkillToolDefinition[] +``` + +#### Returns + +`SkillToolDefinition[]` + +#### Source + +[`src/skills/builtin/info_gatherer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/info_gatherer.ts) + +Line 189. + +*** + +### hasAllEnvVars + +Check if all required environment variables are present. +Convenience wrapper around `validateEnvVars()` that returns a boolean, +matching the Python `validate_env_vars() -> bool` return type. + +#### Signature + +```typescript +hasAllEnvVars(): boolean +``` + +#### Returns + +`boolean` — `true` if all required env vars are set, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 544. + +*** + +### hasAllPackages + +Check if all required packages declared in the manifest are available. +Convenience wrapper around `validatePackages()` that returns a boolean, +matching the Python `validate_packages() -> bool` return type. + +#### Signature + +```typescript +hasAllPackages(): Promise +``` + +#### Returns + +`Promise` — `true` if all required packages are importable, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 579. + +*** + +### isInitialized + +Check if the skill has been initialized by the SkillManager. + +#### Signature + +```typescript +isInitialized(): boolean +``` + +#### Returns + +`boolean` — True if setup() has completed and the skill is marked initialized. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 507. + +*** + +### markInitialized + +Mark the skill as initialized (called by SkillManager). + +#### Signature + +```typescript +markInitialized(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 514. + +*** + +### setAgent + +Set the agent reference for this skill. +Called by the SkillManager/AgentBase when the skill is attached to an agent. +Python equivalent: `self.agent = agent` in `__init__`. + +#### Signature + +```typescript +setAgent(agent: AgentBase): void +``` + +#### Parameters + + + The agent that owns this skill. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 534. + +*** + +### setup + +Validate the `questions` config, derive tool names (with optional prefix), +and cache the completion message. + +Python parity: skill.py:91-121. Returns `false` (logging an error) when +`questions` is missing or fails validation; setup must produce a +functional skill or fail closed. + +#### Signature + +```typescript +setup(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/skills/builtin/info_gatherer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/info_gatherer.ts) + +Line 129. + +*** + +### updateSkillData + +Update this skill's namespaced data on a FunctionResult via updateGlobalData. + +#### Signature + +```typescript +updateSkillData( + result: FunctionResult, + data: Record +): FunctionResult +``` + +#### Parameters + + + The FunctionResult to update. + + + + The data to store under this skill's namespace. + + +#### Returns + +`FunctionResult` — The FunctionResult for chaining. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 462. + +*** + +### validateEnvVars + +Validate that all required environment variables declared on the skill class +are set in the current process environment. + +Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` +directly. TS reads the same static from the class. + +Returns the list of missing variable names so callers can produce actionable +error messages. This differs from Python's `validate_env_vars() -> bool` +return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/agents/skills/builtin/info-gatherer/info-gatherer-skill#has-all-env-vars) is the boolean equivalent. + +#### Signature + +```typescript +validateEnvVars(): string[] +``` + +#### Returns + +`string[]` — Array of missing environment variable names (empty if all are present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 486. + +*** + +### validatePackages + +Validate that all required packages declared on the skill class can be imported. + +Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` +directly and tries `importlib.import_module(pkg)` for each; TS does the +equivalent with a dynamic `import()`. + +#### Signature + +```typescript +validatePackages(): Promise +``` + +#### Returns + +`Promise` — Array of package names that could not be imported (empty if all present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 557. + +## Source + +[`src/skills/builtin/info_gatherer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/info_gatherer.ts) + +Line 60. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/joke/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/joke/index.mdx new file mode 100644 index 0000000000..77b7f3cef3 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/skills/builtin/joke/index.mdx @@ -0,0 +1,63 @@ +--- +slug: "/reference/typescript/agents/skills/builtin/joke" +title: "joke" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "skills.builtin.joke" + parent: "skills.builtin" + module: "agents.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/joke.ts" +--- +# `joke` + +## Signature + +```typescript +module joke +``` + +## Classes + + + + Tells random jokes from a curated built-in collection. + + + +## Functions + +### createSkill + +Factory function for creating JokeSkill instances. + +#### Signature + +```typescript +createSkill(config?: SkillConfig): JokeSkill +``` + +#### Parameters + + + Optional skill configuration. + + +#### Returns + +`JokeSkill` — A new JokeSkill instance. + +#### Source + +[`src/skills/builtin/joke.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/joke.ts) + +Line 194. + +## Source + +[`src/skills/builtin/joke.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/joke.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/joke/joke-skill/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/joke/joke-skill/index.mdx new file mode 100644 index 0000000000..d8e7364c78 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/skills/builtin/joke/joke-skill/index.mdx @@ -0,0 +1,716 @@ +--- +slug: "/reference/typescript/agents/skills/builtin/joke/joke-skill" +title: "JokeSkill" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "skills.builtin.joke.JokeSkill" + parent: "skills.builtin.joke" + module: "agents.skills.builtin.joke" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/joke.ts" +--- +# `JokeSkill` + +Tells random jokes from a curated built-in collection. + +Tier 1 built-in skill with no external dependencies. Includes general, +programming, and dad joke categories. + +## Signature + +```typescript +class JokeSkill extends SkillBase +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/agents/skills/skill-base) + +## Examples + +```typescript +agent.addSkill('joke'); +``` + +## Properties + + + Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. + + + + Configuration options provided at construction time. + + + + Unique identifier for this skill instance (includes timestamp and random bytes). + + + + Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. + + + + Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. + + + + Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. + + + + Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. + + + + Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. + + + + Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. + + + + The registered name of this skill type. + + + + Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. + + + + Additional SWAIG fields extracted from config, merged into tool definitions. + + +## Methods + +### cleanup + +Cleanup resources. Called when the skill is removed from an agent. + +#### Signature + +```typescript +cleanup(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 469. + +*** + +### constructor + +Create a new skill instance. + +Python parity: `core/skill_base.py:32-43`. +Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` +is left as `None` on the subclass. TS throws the equivalent when the static +defaults haven't been overridden. + +#### Signature + +```typescript +constructor(config?: SkillConfig): JokeSkill +``` + +#### Parameters + + + Optional configuration key-value pairs (Python: `params`). + + +#### Returns + +`JokeSkill` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 282. + +*** + +### defineTool + +Imperatively register a tool with this skill. + +Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. +Merges `this.swaigFields` into the tool definition (explicit fields on +`toolDef` take precedence), then pushes the result into `_dynamicTools` +so the default `getTools()` returns it at SWML render time. + +Intended for skills whose tool shape depends on config evaluated at +`setup()` time. Skills with a static tool list should override +`getTools()` instead. + +#### Signature + +```typescript +defineTool(toolDef: SkillToolDefinition): void +``` + +#### Parameters + + + The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 351. + +*** + +### getAgent + +Return the agent that owns this skill, asserting it is non-null. +Equivalent to accessing `self.agent` in Python, where the agent reference +is always set before `setup()` is called. + +The SkillManager lifecycle guarantees that `setAgent()` is called before +`setup()`, so this method is safe to use inside `setup()` and in any +tool handler invoked during an active agent session. + +#### Signature + +```typescript +getAgent(): AgentBase +``` + +#### Returns + +`AgentBase` — The owning `AgentBase` instance. + +#### Throws + +- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 261. + +*** + +### getConfig + +Get a configuration value by key, falling back to a default if not set. + +#### Signature + +```typescript +getConfig(key: string, defaultValue?: T): T +``` + +#### Type Parameters + + + +#### Parameters + + + The configuration key to look up. + + + + Value to return if the key is not present. + + +#### Returns + +`T` — The configuration value cast to type T, or the default value. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 524. + +*** + +### getDataMapTools + +Optional DataMap-style tool definitions. Skills that build their own +SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them +here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. + +Python equivalent: the direct `self.agent.register_swaig_function(fn)` +call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). +Default returns `[]` — skills using only the declarative `getTools()` path +do not need to override this. + +#### Signature + +```typescript +getDataMapTools(): Record[] +``` + +#### Returns + +`Record[]` — Array of fully-built SWAIG function dicts. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 372. + +*** + +### getGlobalData + +Signal to the agent prompt that the joke skill is active. Python +parity: `get_global_data` returns `{"joke_skill_enabled": true}`. + +#### Signature + +```typescript +getGlobalData(): Record +``` + +#### Returns + +`Record` + +#### Source + +[`src/skills/builtin/joke.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/joke.ts) + +Line 119. + +*** + +### getHints + +Get speech recognition hints relevant to this skill. + +#### Signature + +```typescript +getHints(): string[] +``` + +#### Returns + +`string[]` — Array of hint strings to improve speech recognition accuracy. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 402. + +*** + +### getInstanceKey + +Get the instance key used for deduplication in the SkillManager. + +For single-instance skills (`SUPPORTS_MULTIPLE_INSTANCES = false`), returns +the skill name. For multi-instance skills, returns `${skillName}_${toolName}` +using the `tool_name` config (falls back to the skill name). + +Matches Python's `SkillBase.get_instance_key()` default (`skill_base.py:141-146`). +Multi-instance subclasses only need to override when their key derivation +depends on config beyond `tool_name`. + +#### Signature + +```typescript +getInstanceKey(): string +``` + +#### Returns + +`string` — A unique key identifying this skill instance. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 427. + +*** + +### getParameterSchema + +Get the parameter schema for this skill class, describing all accepted configuration options. +Subclasses should override and call `super.getParameterSchema()` to include base parameters. + +Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): +returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a +`tool_name` entry with `default: cls.SKILL_NAME` for classes with +`SUPPORTS_MULTIPLE_INSTANCES = true`. + +**Modifiers:** `static` + +#### Signature + +```typescript +getParameterSchema(): Record +``` + +#### Returns + +`Record` — Record mapping parameter names to their schema entries. + +#### Source + +[`src/skills/builtin/joke.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/joke.ts) + +Line 104. + +*** + +### getPromptSections + +Get prompt sections to inject into the agent's system prompt. +Respects the `skip_prompt` config option — returns `[]` if set to `true`. +Subclasses should override `_getPromptSections()` instead of this method. + +#### Signature + +```typescript +getPromptSections(): SkillPromptSection[] +``` + +#### Returns + +`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 382. + +*** + +### getSkillData + +Read this skill's data from a raw call data object's global\_data. + +#### Signature + +```typescript +getSkillData(rawData: Record): Record +``` + +#### Parameters + + + The raw request data containing global\_data. + + +#### Returns + +`Record` — The skill's stored data, or an empty object if not found. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 450. + +*** + +### getSkillNamespace + +Get the namespaced key for storing per-skill data in global\_data. + +#### Signature + +```typescript +getSkillNamespace(): string +``` + +#### Returns + +`string` — A string like "skill:datetime" or "skill:my\_prefix". + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 440. + +*** + +### getTools + +#### Signature + +```typescript +getTools(): SkillToolDefinition[] +``` + +#### Returns + +`SkillToolDefinition[]` — A single joke tool (configurable name) that returns a random joke with optional category filter. + +#### Source + +[`src/skills/builtin/joke.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/joke.ts) + +Line 124. + +*** + +### hasAllEnvVars + +Check if all required environment variables are present. +Convenience wrapper around `validateEnvVars()` that returns a boolean, +matching the Python `validate_env_vars() -> bool` return type. + +#### Signature + +```typescript +hasAllEnvVars(): boolean +``` + +#### Returns + +`boolean` — `true` if all required env vars are set, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 544. + +*** + +### hasAllPackages + +Check if all required packages declared in the manifest are available. +Convenience wrapper around `validatePackages()` that returns a boolean, +matching the Python `validate_packages() -> bool` return type. + +#### Signature + +```typescript +hasAllPackages(): Promise +``` + +#### Returns + +`Promise` — `true` if all required packages are importable, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 579. + +*** + +### isInitialized + +Check if the skill has been initialized by the SkillManager. + +#### Signature + +```typescript +isInitialized(): boolean +``` + +#### Returns + +`boolean` — True if setup() has completed and the skill is marked initialized. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 507. + +*** + +### markInitialized + +Mark the skill as initialized (called by SkillManager). + +#### Signature + +```typescript +markInitialized(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 514. + +*** + +### setAgent + +Set the agent reference for this skill. +Called by the SkillManager/AgentBase when the skill is attached to an agent. +Python equivalent: `self.agent = agent` in `__init__`. + +#### Signature + +```typescript +setAgent(agent: AgentBase): void +``` + +#### Parameters + + + The agent that owns this skill. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 534. + +*** + +### setup + +Setup the skill. Called when the skill is added to an agent. +Override to perform initialization (API connections, config validation, etc.) + +#### Signature + +```typescript +setup(): Promise +``` + +#### Returns + +`Promise` — `true` if setup succeeded, `false` otherwise. Python equivalent: abstract `setup() -> bool`. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 313. + +*** + +### updateSkillData + +Update this skill's namespaced data on a FunctionResult via updateGlobalData. + +#### Signature + +```typescript +updateSkillData( + result: FunctionResult, + data: Record +): FunctionResult +``` + +#### Parameters + + + The FunctionResult to update. + + + + The data to store under this skill's namespace. + + +#### Returns + +`FunctionResult` — The FunctionResult for chaining. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 462. + +*** + +### validateEnvVars + +Validate that all required environment variables declared on the skill class +are set in the current process environment. + +Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` +directly. TS reads the same static from the class. + +Returns the list of missing variable names so callers can produce actionable +error messages. This differs from Python's `validate_env_vars() -> bool` +return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/agents/skills/builtin/joke/joke-skill#has-all-env-vars) is the boolean equivalent. + +#### Signature + +```typescript +validateEnvVars(): string[] +``` + +#### Returns + +`string[]` — Array of missing environment variable names (empty if all are present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 486. + +*** + +### validatePackages + +Validate that all required packages declared on the skill class can be imported. + +Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` +directly and tries `importlib.import_module(pkg)` for each; TS does the +equivalent with a dynamic `import()`. + +#### Signature + +```typescript +validatePackages(): Promise +``` + +#### Returns + +`Promise` — Array of package names that could not be imported (empty if all present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 557. + +## Source + +[`src/skills/builtin/joke.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/joke.ts) + +Line 96. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/math/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/math/index.mdx new file mode 100644 index 0000000000..96b9efae9d --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/skills/builtin/math/index.mdx @@ -0,0 +1,63 @@ +--- +slug: "/reference/typescript/agents/skills/builtin/math" +title: "math" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "skills.builtin.math" + parent: "skills.builtin" + module: "agents.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/math.ts" +--- +# `math` + +## Signature + +```typescript +module math +``` + +## Classes + + + + Evaluates mathematical expressions safely using a sandboxed parser. + + + +## Functions + +### createSkill + +Factory function for creating MathSkill instances. + +#### Signature + +```typescript +createSkill(config?: SkillConfig): MathSkill +``` + +#### Parameters + + + Optional skill configuration. + + +#### Returns + +`MathSkill` — A new MathSkill instance. + +#### Source + +[`src/skills/builtin/math.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/math.ts) + +Line 147. + +## Source + +[`src/skills/builtin/math.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/math.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/math/math-skill/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/math/math-skill/index.mdx new file mode 100644 index 0000000000..07c225a26c --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/skills/builtin/math/math-skill/index.mdx @@ -0,0 +1,717 @@ +--- +slug: "/reference/typescript/agents/skills/builtin/math/math-skill" +title: "MathSkill" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "skills.builtin.math.MathSkill" + parent: "skills.builtin.math" + module: "agents.skills.builtin.math" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/math.ts" +--- +# `MathSkill` + +Evaluates mathematical expressions safely using a sandboxed parser. + +Tier 1 built-in skill with no external dependencies. Only allows digits, +basic arithmetic operators, parentheses, decimal points, and spaces. + +Registers a single SWAIG tool: `calculate`. + +## Signature + +```typescript +class MathSkill extends SkillBase +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/agents/skills/skill-base) + +## Examples + +```typescript +agent.addSkill('math'); +``` + +## Properties + + + Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. + + + + Configuration options provided at construction time. + + + + Unique identifier for this skill instance (includes timestamp and random bytes). + + + + Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. + + + + Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. + + + + Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. + + + + Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. + + + + Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. + + + + Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. + + + + The registered name of this skill type. + + + + Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. + + + + Additional SWAIG fields extracted from config, merged into tool definitions. + + +## Methods + +### cleanup + +Cleanup resources. Called when the skill is removed from an agent. + +#### Signature + +```typescript +cleanup(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 469. + +*** + +### constructor + +Create a new skill instance. + +Python parity: `core/skill_base.py:32-43`. +Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` +is left as `None` on the subclass. TS throws the equivalent when the static +defaults haven't been overridden. + +#### Signature + +```typescript +constructor(config?: SkillConfig): MathSkill +``` + +#### Parameters + + + Optional configuration key-value pairs (Python: `params`). + + +#### Returns + +`MathSkill` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 282. + +*** + +### defineTool + +Imperatively register a tool with this skill. + +Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. +Merges `this.swaigFields` into the tool definition (explicit fields on +`toolDef` take precedence), then pushes the result into `_dynamicTools` +so the default `getTools()` returns it at SWML render time. + +Intended for skills whose tool shape depends on config evaluated at +`setup()` time. Skills with a static tool list should override +`getTools()` instead. + +#### Signature + +```typescript +defineTool(toolDef: SkillToolDefinition): void +``` + +#### Parameters + + + The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 351. + +*** + +### getAgent + +Return the agent that owns this skill, asserting it is non-null. +Equivalent to accessing `self.agent` in Python, where the agent reference +is always set before `setup()` is called. + +The SkillManager lifecycle guarantees that `setAgent()` is called before +`setup()`, so this method is safe to use inside `setup()` and in any +tool handler invoked during an active agent session. + +#### Signature + +```typescript +getAgent(): AgentBase +``` + +#### Returns + +`AgentBase` — The owning `AgentBase` instance. + +#### Throws + +- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 261. + +*** + +### getConfig + +Get a configuration value by key, falling back to a default if not set. + +#### Signature + +```typescript +getConfig(key: string, defaultValue?: T): T +``` + +#### Type Parameters + + + +#### Parameters + + + The configuration key to look up. + + + + Value to return if the key is not present. + + +#### Returns + +`T` — The configuration value cast to type T, or the default value. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 524. + +*** + +### getDataMapTools + +Optional DataMap-style tool definitions. Skills that build their own +SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them +here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. + +Python equivalent: the direct `self.agent.register_swaig_function(fn)` +call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). +Default returns `[]` — skills using only the declarative `getTools()` path +do not need to override this. + +#### Signature + +```typescript +getDataMapTools(): Record[] +``` + +#### Returns + +`Record[]` — Array of fully-built SWAIG function dicts. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 372. + +*** + +### getGlobalData + +Get global data to merge into the agent's global data store. + +#### Signature + +```typescript +getGlobalData(): Record +``` + +#### Returns + +`Record` — Key-value pairs to be merged into the agent's global data. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 410. + +*** + +### getHints + +Get speech recognition hints relevant to this skill. + +#### Signature + +```typescript +getHints(): string[] +``` + +#### Returns + +`string[]` — Array of hint strings to improve speech recognition accuracy. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 402. + +*** + +### getInstanceKey + +Get the instance key used for deduplication in the SkillManager. + +For single-instance skills (`SUPPORTS_MULTIPLE_INSTANCES = false`), returns +the skill name. For multi-instance skills, returns `${skillName}_${toolName}` +using the `tool_name` config (falls back to the skill name). + +Matches Python's `SkillBase.get_instance_key()` default (`skill_base.py:141-146`). +Multi-instance subclasses only need to override when their key derivation +depends on config beyond `tool_name`. + +#### Signature + +```typescript +getInstanceKey(): string +``` + +#### Returns + +`string` — A unique key identifying this skill instance. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 427. + +*** + +### getParameterSchema + +Get the parameter schema for this skill class, describing all accepted configuration options. +Subclasses should override and call `super.getParameterSchema()` to include base parameters. + +Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): +returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a +`tool_name` entry with `default: cls.SKILL_NAME` for classes with +`SUPPORTS_MULTIPLE_INSTANCES = true`. + +**Modifiers:** `static` + +#### Signature + +```typescript +getParameterSchema(): Record +``` + +#### Returns + +`Record` — Record mapping parameter names to their schema entries. + +#### Source + +[`src/skills/builtin/math.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/math.ts) + +Line 83. + +*** + +### getPromptSections + +Get prompt sections to inject into the agent's system prompt. +Respects the `skip_prompt` config option — returns `[]` if set to `true`. +Subclasses should override `_getPromptSections()` instead of this method. + +#### Signature + +```typescript +getPromptSections(): SkillPromptSection[] +``` + +#### Returns + +`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 382. + +*** + +### getSkillData + +Read this skill's data from a raw call data object's global\_data. + +#### Signature + +```typescript +getSkillData(rawData: Record): Record +``` + +#### Parameters + + + The raw request data containing global\_data. + + +#### Returns + +`Record` — The skill's stored data, or an empty object if not found. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 450. + +*** + +### getSkillNamespace + +Get the namespaced key for storing per-skill data in global\_data. + +#### Signature + +```typescript +getSkillNamespace(): string +``` + +#### Returns + +`string` — A string like "skill:datetime" or "skill:my\_prefix". + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 440. + +*** + +### getTools + +#### Signature + +```typescript +getTools(): SkillToolDefinition[] +``` + +#### Returns + +`SkillToolDefinition[]` — A single `calculate` tool that evaluates a math expression string. + +#### Source + +[`src/skills/builtin/math.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/math.ts) + +Line 88. + +*** + +### hasAllEnvVars + +Check if all required environment variables are present. +Convenience wrapper around `validateEnvVars()` that returns a boolean, +matching the Python `validate_env_vars() -> bool` return type. + +#### Signature + +```typescript +hasAllEnvVars(): boolean +``` + +#### Returns + +`boolean` — `true` if all required env vars are set, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 544. + +*** + +### hasAllPackages + +Check if all required packages declared in the manifest are available. +Convenience wrapper around `validatePackages()` that returns a boolean, +matching the Python `validate_packages() -> bool` return type. + +#### Signature + +```typescript +hasAllPackages(): Promise +``` + +#### Returns + +`Promise` — `true` if all required packages are importable, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 579. + +*** + +### isInitialized + +Check if the skill has been initialized by the SkillManager. + +#### Signature + +```typescript +isInitialized(): boolean +``` + +#### Returns + +`boolean` — True if setup() has completed and the skill is marked initialized. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 507. + +*** + +### markInitialized + +Mark the skill as initialized (called by SkillManager). + +#### Signature + +```typescript +markInitialized(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 514. + +*** + +### setAgent + +Set the agent reference for this skill. +Called by the SkillManager/AgentBase when the skill is attached to an agent. +Python equivalent: `self.agent = agent` in `__init__`. + +#### Signature + +```typescript +setAgent(agent: AgentBase): void +``` + +#### Parameters + + + The agent that owns this skill. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 534. + +*** + +### setup + +Setup the skill. Called when the skill is added to an agent. +Override to perform initialization (API connections, config validation, etc.) + +#### Signature + +```typescript +setup(): Promise +``` + +#### Returns + +`Promise` — `true` if setup succeeded, `false` otherwise. Python equivalent: abstract `setup() -> bool`. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 313. + +*** + +### updateSkillData + +Update this skill's namespaced data on a FunctionResult via updateGlobalData. + +#### Signature + +```typescript +updateSkillData( + result: FunctionResult, + data: Record +): FunctionResult +``` + +#### Parameters + + + The FunctionResult to update. + + + + The data to store under this skill's namespace. + + +#### Returns + +`FunctionResult` — The FunctionResult for chaining. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 462. + +*** + +### validateEnvVars + +Validate that all required environment variables declared on the skill class +are set in the current process environment. + +Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` +directly. TS reads the same static from the class. + +Returns the list of missing variable names so callers can produce actionable +error messages. This differs from Python's `validate_env_vars() -> bool` +return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/agents/skills/builtin/math/math-skill#has-all-env-vars) is the boolean equivalent. + +#### Signature + +```typescript +validateEnvVars(): string[] +``` + +#### Returns + +`string[]` — Array of missing environment variable names (empty if all are present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 486. + +*** + +### validatePackages + +Validate that all required packages declared on the skill class can be imported. + +Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` +directly and tries `importlib.import_module(pkg)` for each; TS does the +equivalent with a dynamic `import()`. + +#### Signature + +```typescript +validatePackages(): Promise +``` + +#### Returns + +`Promise` — Array of package names that could not be imported (empty if all present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 557. + +## Source + +[`src/skills/builtin/math.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/math.ts) + +Line 75. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/mcp-gateway/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/mcp-gateway/index.mdx new file mode 100644 index 0000000000..9998a70c68 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/skills/builtin/mcp-gateway/index.mdx @@ -0,0 +1,63 @@ +--- +slug: "/reference/typescript/agents/skills/builtin/mcp-gateway" +title: "mcp_gateway" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "skills.builtin.mcp_gateway" + parent: "skills.builtin" + module: "agents.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/mcp_gateway.ts" +--- +# `mcp_gateway` + +## Signature + +```typescript +module mcp_gateway +``` + +## Classes + + + + Bridge MCP (Model Context Protocol) servers with SWAIG functions. + + + +## Functions + +### createSkill + +Factory function for creating McpGatewaySkill instances. + +#### Signature + +```typescript +createSkill(config?: SkillConfig): McpGatewaySkill +``` + +#### Parameters + + + Optional skill configuration. + + +#### Returns + +`McpGatewaySkill` — A new McpGatewaySkill instance. + +#### Source + +[`src/skills/builtin/mcp_gateway.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/mcp_gateway.ts) + +Line 683. + +## Source + +[`src/skills/builtin/mcp_gateway.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/mcp_gateway.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/mcp-gateway/mcp-gateway-skill/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/mcp-gateway/mcp-gateway-skill/index.mdx new file mode 100644 index 0000000000..ddc0353d49 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/skills/builtin/mcp-gateway/mcp-gateway-skill/index.mdx @@ -0,0 +1,720 @@ +--- +slug: "/reference/typescript/agents/skills/builtin/mcp-gateway/mcp-gateway-skill" +title: "McpGatewaySkill" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "skills.builtin.mcp_gateway.McpGatewaySkill" + parent: "skills.builtin.mcp_gateway" + module: "agents.skills.builtin.mcp_gateway" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/mcp_gateway.ts" +--- +# `McpGatewaySkill` + +Bridge MCP (Model Context Protocol) servers with SWAIG functions. + +When configured, calls a gateway's `/services` endpoint to discover MCP +services, enumerates each service's tools, and registers them as SWAIG +tools prefixed with `tool_prefix` (default `mcp_`). A hidden hangup hook +tool cleans up MCP sessions when the call ends. + +## Signature + +```typescript +class McpGatewaySkill extends SkillBase +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/agents/skills/skill-base) + +## Examples + +```typescript +agent.addSkill('mcp_gateway', { + gateway_url: 'https://mcp-gateway.example.com', + tool_prefix: 'mcp_', +}); +``` + +## Properties + + + Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. + + + + Configuration options provided at construction time. + + + + Unique identifier for this skill instance (includes timestamp and random bytes). + + + + Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. + + + + Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. + + + + Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. + + + + Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. + + + + Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. + + + + Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. + + + + The registered name of this skill type. + + + + Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. + + + + Additional SWAIG fields extracted from config, merged into tool definitions. + + +## Methods + +### cleanup + +Cleanup resources. Called when the skill is removed from an agent. + +#### Signature + +```typescript +cleanup(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 469. + +*** + +### constructor + +Create a new skill instance. + +Python parity: `core/skill_base.py:32-43`. +Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` +is left as `None` on the subclass. TS throws the equivalent when the static +defaults haven't been overridden. + +#### Signature + +```typescript +constructor(config?: SkillConfig): McpGatewaySkill +``` + +#### Parameters + + + Optional configuration key-value pairs (Python: `params`). + + +#### Returns + +`McpGatewaySkill` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 282. + +*** + +### defineTool + +Imperatively register a tool with this skill. + +Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. +Merges `this.swaigFields` into the tool definition (explicit fields on +`toolDef` take precedence), then pushes the result into `_dynamicTools` +so the default `getTools()` returns it at SWML render time. + +Intended for skills whose tool shape depends on config evaluated at +`setup()` time. Skills with a static tool list should override +`getTools()` instead. + +#### Signature + +```typescript +defineTool(toolDef: SkillToolDefinition): void +``` + +#### Parameters + + + The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 351. + +*** + +### getAgent + +Return the agent that owns this skill, asserting it is non-null. +Equivalent to accessing `self.agent` in Python, where the agent reference +is always set before `setup()` is called. + +The SkillManager lifecycle guarantees that `setAgent()` is called before +`setup()`, so this method is safe to use inside `setup()` and in any +tool handler invoked during an active agent session. + +#### Signature + +```typescript +getAgent(): AgentBase +``` + +#### Returns + +`AgentBase` — The owning `AgentBase` instance. + +#### Throws + +- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 261. + +*** + +### getConfig + +Get a configuration value by key, falling back to a default if not set. + +#### Signature + +```typescript +getConfig(key: string, defaultValue?: T): T +``` + +#### Type Parameters + + + +#### Parameters + + + The configuration key to look up. + + + + Value to return if the key is not present. + + +#### Returns + +`T` — The configuration value cast to type T, or the default value. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 524. + +*** + +### getDataMapTools + +Optional DataMap-style tool definitions. Skills that build their own +SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them +here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. + +Python equivalent: the direct `self.agent.register_swaig_function(fn)` +call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). +Default returns `[]` — skills using only the declarative `getTools()` path +do not need to override this. + +#### Signature + +```typescript +getDataMapTools(): Record[] +``` + +#### Returns + +`Record[]` — Array of fully-built SWAIG function dicts. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 372. + +*** + +### getGlobalData + +Get global data to merge into the agent's global data store. + +#### Signature + +```typescript +getGlobalData(): Record +``` + +#### Returns + +`Record` — Key-value pairs to be merged into the agent's global data. + +#### Source + +[`src/skills/builtin/mcp_gateway.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/mcp_gateway.ts) + +Line 271. + +*** + +### getHints + +Get speech recognition hints relevant to this skill. + +#### Signature + +```typescript +getHints(): string[] +``` + +#### Returns + +`string[]` — Array of hint strings to improve speech recognition accuracy. + +#### Source + +[`src/skills/builtin/mcp_gateway.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/mcp_gateway.ts) + +Line 257. + +*** + +### getInstanceKey + +Get the instance key used for deduplication in the SkillManager. + +For single-instance skills (`SUPPORTS_MULTIPLE_INSTANCES = false`), returns +the skill name. For multi-instance skills, returns `${skillName}_${toolName}` +using the `tool_name` config (falls back to the skill name). + +Matches Python's `SkillBase.get_instance_key()` default (`skill_base.py:141-146`). +Multi-instance subclasses only need to override when their key derivation +depends on config beyond `tool_name`. + +#### Signature + +```typescript +getInstanceKey(): string +``` + +#### Returns + +`string` — A unique key identifying this skill instance. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 427. + +*** + +### getParameterSchema + +Get the parameter schema for this skill class, describing all accepted configuration options. +Subclasses should override and call `super.getParameterSchema()` to include base parameters. + +Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): +returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a +`tool_name` entry with `default: cls.SKILL_NAME` for classes with +`SUPPORTS_MULTIPLE_INSTANCES = true`. + +**Modifiers:** `static` + +#### Signature + +```typescript +getParameterSchema(): Record +``` + +#### Returns + +`Record` — Record mapping parameter names to their schema entries. + +#### Source + +[`src/skills/builtin/mcp_gateway.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/mcp_gateway.ts) + +Line 71. + +*** + +### getPromptSections + +Get prompt sections to inject into the agent's system prompt. +Respects the `skip_prompt` config option — returns `[]` if set to `true`. +Subclasses should override `_getPromptSections()` instead of this method. + +#### Signature + +```typescript +getPromptSections(): SkillPromptSection[] +``` + +#### Returns + +`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 382. + +*** + +### getSkillData + +Read this skill's data from a raw call data object's global\_data. + +#### Signature + +```typescript +getSkillData(rawData: Record): Record +``` + +#### Parameters + + + The raw request data containing global\_data. + + +#### Returns + +`Record` — The skill's stored data, or an empty object if not found. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 450. + +*** + +### getSkillNamespace + +Get the namespaced key for storing per-skill data in global\_data. + +#### Signature + +```typescript +getSkillNamespace(): string +``` + +#### Returns + +`string` — A string like "skill:datetime" or "skill:my\_prefix". + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 440. + +*** + +### getTools + +#### Signature + +```typescript +getTools(): SkillToolDefinition[] +``` + +#### Returns + +`SkillToolDefinition[]` — Dynamically discovered MCP tools plus an internal hangup-cleanup tool. If discovery has not completed, returns a single fallback `mcp_invoke` tool that explains configuration is missing. + +#### Source + +[`src/skills/builtin/mcp_gateway.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/mcp_gateway.ts) + +Line 290. + +*** + +### hasAllEnvVars + +Check if all required environment variables are present. +Convenience wrapper around `validateEnvVars()` that returns a boolean, +matching the Python `validate_env_vars() -> bool` return type. + +#### Signature + +```typescript +hasAllEnvVars(): boolean +``` + +#### Returns + +`boolean` — `true` if all required env vars are set, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 544. + +*** + +### hasAllPackages + +Check if all required packages declared in the manifest are available. +Convenience wrapper around `validatePackages()` that returns a boolean, +matching the Python `validate_packages() -> bool` return type. + +#### Signature + +```typescript +hasAllPackages(): Promise +``` + +#### Returns + +`Promise` — `true` if all required packages are importable, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 579. + +*** + +### isInitialized + +Check if the skill has been initialized by the SkillManager. + +#### Signature + +```typescript +isInitialized(): boolean +``` + +#### Returns + +`boolean` — True if setup() has completed and the skill is marked initialized. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 507. + +*** + +### markInitialized + +Mark the skill as initialized (called by SkillManager). + +#### Signature + +```typescript +markInitialized(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 514. + +*** + +### setAgent + +Set the agent reference for this skill. +Called by the SkillManager/AgentBase when the skill is attached to an agent. +Python equivalent: `self.agent = agent` in `__init__`. + +#### Signature + +```typescript +setAgent(agent: AgentBase): void +``` + +#### Parameters + + + The agent that owns this skill. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 534. + +*** + +### setup + +Setup the skill. Called when the skill is added to an agent. +Override to perform initialization (API connections, config validation, etc.) + +#### Signature + +```typescript +setup(): Promise +``` + +#### Returns + +`Promise` — `true` if setup succeeded, `false` otherwise. Python equivalent: abstract `setup() -> bool`. + +#### Source + +[`src/skills/builtin/mcp_gateway.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/mcp_gateway.ts) + +Line 173. + +*** + +### updateSkillData + +Update this skill's namespaced data on a FunctionResult via updateGlobalData. + +#### Signature + +```typescript +updateSkillData( + result: FunctionResult, + data: Record +): FunctionResult +``` + +#### Parameters + + + The FunctionResult to update. + + + + The data to store under this skill's namespace. + + +#### Returns + +`FunctionResult` — The FunctionResult for chaining. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 462. + +*** + +### validateEnvVars + +Validate that all required environment variables declared on the skill class +are set in the current process environment. + +Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` +directly. TS reads the same static from the class. + +Returns the list of missing variable names so callers can produce actionable +error messages. This differs from Python's `validate_env_vars() -> bool` +return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/agents/skills/builtin/mcp-gateway/mcp-gateway-skill#has-all-env-vars) is the boolean equivalent. + +#### Signature + +```typescript +validateEnvVars(): string[] +``` + +#### Returns + +`string[]` — Array of missing environment variable names (empty if all are present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 486. + +*** + +### validatePackages + +Validate that all required packages declared on the skill class can be imported. + +Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` +directly and tries `importlib.import_module(pkg)` for each; TS does the +equivalent with a dynamic `import()`. + +#### Signature + +```typescript +validatePackages(): Promise +``` + +#### Returns + +`Promise` — Array of package names that could not be imported (empty if all present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 557. + +## Source + +[`src/skills/builtin/mcp_gateway.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/mcp_gateway.ts) + +Line 61. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/native-vector-search/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/native-vector-search/index.mdx new file mode 100644 index 0000000000..8f2dc09397 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/skills/builtin/native-vector-search/index.mdx @@ -0,0 +1,93 @@ +--- +slug: "/reference/typescript/agents/skills/builtin/native-vector-search" +title: "native_vector_search" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "skills.builtin.native_vector_search" + parent: "skills.builtin" + module: "agents.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/native_vector_search.ts" +--- +# `native_vector_search` + +## Signature + +```typescript +module native_vector_search +``` + +## Classes + + + + Document search using TF-IDF in-memory scoring or a remote search server. + + + +## Functions + +### createSkill + +Factory function for creating NativeVectorSearchSkill instances. + +#### Signature + +```typescript +createSkill(config?: SkillConfig): NativeVectorSearchSkill +``` + +#### Parameters + + + Optional skill configuration. + + +#### Returns + +`NativeVectorSearchSkill` — A new NativeVectorSearchSkill instance. + +#### Source + +[`src/skills/builtin/native_vector_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/native_vector_search.ts) + +Line 908. + +## Type Aliases + +### ResponseFormatCallback + +Callback signature for customizing the formatted search response. + +The context object is the TypeScript idiom for Python's positional-args +convention: `(response, agent, query, results, args)`. All Python fields are +present plus TS-specific additions (`count`, `skill`): + +- `response` — pre-formatted response string (same as Python arg 1) +- `agent` — the AgentBase instance that owns this skill (same as Python arg 2) +- `query` — the search query string (same as Python arg 3) +- `results` — array of search results (same as Python arg 4) +- `args` — raw tool call arguments (same as Python arg 5) +- `count` — requested result count (TS addition) +- `skill` — this skill instance (TS addition) + +#### Signature + +```typescript +type ResponseFormatCallback = (ctx: { agent?: AgentBase; args: Record; count: number; query: string; response: string; results: { content: string; metadata: Record; score: number }[]; skill: NativeVectorSearchSkill }) => string +``` + +#### Source + +[`src/skills/builtin/native_vector_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/native_vector_search.ts) + +Line 47. + +## Source + +[`src/skills/builtin/native_vector_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/native_vector_search.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/native-vector-search/native-vector-search-skill/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/native-vector-search/native-vector-search-skill/index.mdx new file mode 100644 index 0000000000..531f94e5a9 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/skills/builtin/native-vector-search/native-vector-search-skill/index.mdx @@ -0,0 +1,718 @@ +--- +slug: "/reference/typescript/agents/skills/builtin/native-vector-search/native-vector-search-skill" +title: "NativeVectorSearchSkill" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "skills.builtin.native_vector_search.NativeVectorSearchSkill" + parent: "skills.builtin.native_vector_search" + module: "agents.skills.builtin.native_vector_search" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/native_vector_search.ts" +--- +# `NativeVectorSearchSkill` + +Document search using TF-IDF in-memory scoring or a remote search server. + +Multi-instance capable (distinguished by `tool_name` + `index_file`). + +## Signature + +```typescript +class NativeVectorSearchSkill extends SkillBase +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/agents/skills/skill-base) + +## Examples + +```typescript +agent.addSkill('native_vector_search', { + tool_name: 'search_docs', + index_file: './data/support-docs.json', + count: 3, +}); +``` + +## Properties + + + Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. + + + + Configuration options provided at construction time. + + + + Unique identifier for this skill instance (includes timestamp and random bytes). + + + + Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. + + + + Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. + + + + Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. + + + + Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. + + + + Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. + + + + Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. + + + + The registered name of this skill type. + + + + Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. + + + + Additional SWAIG fields extracted from config, merged into tool definitions. + + +## Methods + +### cleanup + +Cleanup resources. Called when the skill is removed from an agent. + +#### Signature + +```typescript +cleanup(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/skills/builtin/native_vector_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/native_vector_search.ts) + +Line 546. + +*** + +### constructor + +Create a new skill instance. + +Python parity: `core/skill_base.py:32-43`. +Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` +is left as `None` on the subclass. TS throws the equivalent when the static +defaults haven't been overridden. + +#### Signature + +```typescript +constructor(config?: SkillConfig): NativeVectorSearchSkill +``` + +#### Parameters + + + Optional configuration key-value pairs (Python: `params`). + + +#### Returns + +`NativeVectorSearchSkill` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 282. + +*** + +### defineTool + +Imperatively register a tool with this skill. + +Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. +Merges `this.swaigFields` into the tool definition (explicit fields on +`toolDef` take precedence), then pushes the result into `_dynamicTools` +so the default `getTools()` returns it at SWML render time. + +Intended for skills whose tool shape depends on config evaluated at +`setup()` time. Skills with a static tool list should override +`getTools()` instead. + +#### Signature + +```typescript +defineTool(toolDef: SkillToolDefinition): void +``` + +#### Parameters + + + The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 351. + +*** + +### getAgent + +Return the agent that owns this skill, asserting it is non-null. +Equivalent to accessing `self.agent` in Python, where the agent reference +is always set before `setup()` is called. + +The SkillManager lifecycle guarantees that `setAgent()` is called before +`setup()`, so this method is safe to use inside `setup()` and in any +tool handler invoked during an active agent session. + +#### Signature + +```typescript +getAgent(): AgentBase +``` + +#### Returns + +`AgentBase` — The owning `AgentBase` instance. + +#### Throws + +- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 261. + +*** + +### getConfig + +Get a configuration value by key, falling back to a default if not set. + +#### Signature + +```typescript +getConfig(key: string, defaultValue?: T): T +``` + +#### Type Parameters + + + +#### Parameters + + + The configuration key to look up. + + + + Value to return if the key is not present. + + +#### Returns + +`T` — The configuration value cast to type T, or the default value. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 524. + +*** + +### getDataMapTools + +Optional DataMap-style tool definitions. Skills that build their own +SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them +here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. + +Python equivalent: the direct `self.agent.register_swaig_function(fn)` +call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). +Default returns `[]` — skills using only the declarative `getTools()` path +do not need to override this. + +#### Signature + +```typescript +getDataMapTools(): Record[] +``` + +#### Returns + +`Record[]` — Array of fully-built SWAIG function dicts. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 372. + +*** + +### getGlobalData + +Get global data to merge into the agent's global data store. + +#### Signature + +```typescript +getGlobalData(): Record +``` + +#### Returns + +`Record` — Key-value pairs to be merged into the agent's global data. + +#### Source + +[`src/skills/builtin/native_vector_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/native_vector_search.ts) + +Line 535. + +*** + +### getHints + +Get speech recognition hints relevant to this skill. + +#### Signature + +```typescript +getHints(): string[] +``` + +#### Returns + +`string[]` — Array of hint strings to improve speech recognition accuracy. + +#### Source + +[`src/skills/builtin/native_vector_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/native_vector_search.ts) + +Line 529. + +*** + +### getInstanceKey + +Get the instance key used for deduplication in the SkillManager. + +For single-instance skills (`SUPPORTS_MULTIPLE_INSTANCES = false`), returns +the skill name. For multi-instance skills, returns `${skillName}_${toolName}` +using the `tool_name` config (falls back to the skill name). + +Matches Python's `SkillBase.get_instance_key()` default (`skill_base.py:141-146`). +Multi-instance subclasses only need to override when their key derivation +depends on config beyond `tool_name`. + +#### Signature + +```typescript +getInstanceKey(): string +``` + +#### Returns + +`string` — A unique key identifying this skill instance. + +#### Source + +[`src/skills/builtin/native_vector_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/native_vector_search.ts) + +Line 406. + +*** + +### getParameterSchema + +Get the parameter schema for this skill class, describing all accepted configuration options. +Subclasses should override and call `super.getParameterSchema()` to include base parameters. + +Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): +returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a +`tool_name` entry with `default: cls.SKILL_NAME` for classes with +`SUPPORTS_MULTIPLE_INSTANCES = true`. + +**Modifiers:** `static` + +#### Signature + +```typescript +getParameterSchema(): Record +``` + +#### Returns + +`Record` — Record mapping parameter names to their schema entries. + +#### Source + +[`src/skills/builtin/native_vector_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/native_vector_search.ts) + +Line 169. + +*** + +### getPromptSections + +Get prompt sections to inject into the agent's system prompt. +Respects the `skip_prompt` config option — returns `[]` if set to `true`. +Subclasses should override `_getPromptSections()` instead of this method. + +#### Signature + +```typescript +getPromptSections(): SkillPromptSection[] +``` + +#### Returns + +`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 382. + +*** + +### getSkillData + +Read this skill's data from a raw call data object's global\_data. + +#### Signature + +```typescript +getSkillData(rawData: Record): Record +``` + +#### Parameters + + + The raw request data containing global\_data. + + +#### Returns + +`Record` — The skill's stored data, or an empty object if not found. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 450. + +*** + +### getSkillNamespace + +Get the namespaced key for storing per-skill data in global\_data. + +#### Signature + +```typescript +getSkillNamespace(): string +``` + +#### Returns + +`string` — A string like "skill:datetime" or "skill:my\_prefix". + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 440. + +*** + +### getTools + +#### Signature + +```typescript +getTools(): SkillToolDefinition[] +``` + +#### Returns + +`SkillToolDefinition[]` — A single search tool using the configured `tool_name` (default `search_knowledge`). + +#### Source + +[`src/skills/builtin/native_vector_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/native_vector_search.ts) + +Line 588. + +*** + +### hasAllEnvVars + +Check if all required environment variables are present. +Convenience wrapper around `validateEnvVars()` that returns a boolean, +matching the Python `validate_env_vars() -> bool` return type. + +#### Signature + +```typescript +hasAllEnvVars(): boolean +``` + +#### Returns + +`boolean` — `true` if all required env vars are set, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 544. + +*** + +### hasAllPackages + +Check if all required packages declared in the manifest are available. +Convenience wrapper around `validatePackages()` that returns a boolean, +matching the Python `validate_packages() -> bool` return type. + +#### Signature + +```typescript +hasAllPackages(): Promise +``` + +#### Returns + +`Promise` — `true` if all required packages are importable, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 579. + +*** + +### isInitialized + +Check if the skill has been initialized by the SkillManager. + +#### Signature + +```typescript +isInitialized(): boolean +``` + +#### Returns + +`boolean` — True if setup() has completed and the skill is marked initialized. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 507. + +*** + +### markInitialized + +Mark the skill as initialized (called by SkillManager). + +#### Signature + +```typescript +markInitialized(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 514. + +*** + +### setAgent + +Set the agent reference for this skill. +Called by the SkillManager/AgentBase when the skill is attached to an agent. +Python equivalent: `self.agent = agent` in `__init__`. + +#### Signature + +```typescript +setAgent(agent: AgentBase): void +``` + +#### Parameters + + + The agent that owns this skill. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 534. + +*** + +### setup + +Setup the skill. Called when the skill is added to an agent. +Override to perform initialization (API connections, config validation, etc.) + +#### Signature + +```typescript +setup(): Promise +``` + +#### Returns + +`Promise` — `true` if setup succeeded, `false` otherwise. Python equivalent: abstract `setup() -> bool`. + +#### Source + +[`src/skills/builtin/native_vector_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/native_vector_search.ts) + +Line 412. + +*** + +### updateSkillData + +Update this skill's namespaced data on a FunctionResult via updateGlobalData. + +#### Signature + +```typescript +updateSkillData( + result: FunctionResult, + data: Record +): FunctionResult +``` + +#### Parameters + + + The FunctionResult to update. + + + + The data to store under this skill's namespace. + + +#### Returns + +`FunctionResult` — The FunctionResult for chaining. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 462. + +*** + +### validateEnvVars + +Validate that all required environment variables declared on the skill class +are set in the current process environment. + +Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` +directly. TS reads the same static from the class. + +Returns the list of missing variable names so callers can produce actionable +error messages. This differs from Python's `validate_env_vars() -> bool` +return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/agents/skills/builtin/native-vector-search/native-vector-search-skill#has-all-env-vars) is the boolean equivalent. + +#### Signature + +```typescript +validateEnvVars(): string[] +``` + +#### Returns + +`string[]` — Array of missing environment variable names (empty if all are present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 486. + +*** + +### validatePackages + +Validate that all required packages declared on the skill class can be imported. + +Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` +directly and tries `importlib.import_module(pkg)` for each; TS does the +equivalent with a dynamic `import()`. + +#### Signature + +```typescript +validatePackages(): Promise +``` + +#### Returns + +`Promise` — Array of package names that could not be imported (empty if all present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 557. + +## Source + +[`src/skills/builtin/native_vector_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/native_vector_search.ts) + +Line 159. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/play-background-file/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/play-background-file/index.mdx new file mode 100644 index 0000000000..9b82b1b4b4 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/skills/builtin/play-background-file/index.mdx @@ -0,0 +1,63 @@ +--- +slug: "/reference/typescript/agents/skills/builtin/play-background-file" +title: "play_background_file" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "skills.builtin.play_background_file" + parent: "skills.builtin" + module: "agents.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/play_background_file.ts" +--- +# `play_background_file` + +## Signature + +```typescript +module play_background_file +``` + +## Classes + + + + Controls background audio playback during calls via SWML actions. + + + +## Functions + +### createSkill + +Factory function for creating PlayBackgroundFileSkill instances. + +#### Signature + +```typescript +createSkill(config?: SkillConfig): PlayBackgroundFileSkill +``` + +#### Parameters + + + Optional skill configuration. + + +#### Returns + +`PlayBackgroundFileSkill` — A new PlayBackgroundFileSkill instance. + +#### Source + +[`src/skills/builtin/play_background_file.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/play_background_file.ts) + +Line 365. + +## Source + +[`src/skills/builtin/play_background_file.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/play_background_file.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/play-background-file/play-background-file-skill/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/play-background-file/play-background-file-skill/index.mdx new file mode 100644 index 0000000000..5b6ca24c3e --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/skills/builtin/play-background-file/play-background-file-skill/index.mdx @@ -0,0 +1,719 @@ +--- +slug: "/reference/typescript/agents/skills/builtin/play-background-file/play-background-file-skill" +title: "PlayBackgroundFileSkill" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "skills.builtin.play_background_file.PlayBackgroundFileSkill" + parent: "skills.builtin.play_background_file" + module: "agents.skills.builtin.play_background_file" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/play_background_file.ts" +--- +# `PlayBackgroundFileSkill` + +Controls background audio playback during calls via SWML actions. + +Tier 2 built-in skill with no external dependencies. Provides tools to play +and stop background audio files (e.g., hold music, ambient sounds). Supports +two configuration modes: + +- Pre-configured `files` array (matches the Python skill): emits a single + configurable tool whose `action` enum maps to `start_` / `stop` + values that trigger the corresponding file playback. +- Free-form `default_file_url` / `allowed_domains`: emits two tools, + `play_background` (arbitrary URL) and `stop_background`. + +## Signature + +```typescript +class PlayBackgroundFileSkill extends SkillBase +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/agents/skills/skill-base) + +## Examples + +```typescript +agent.addSkill('play_background_file', { + files: [ + { key: 'hold', url: 'https://cdn.example.com/hold-music.mp3', description: 'Hold music' }, + ], +}); +``` + +## Properties + + + Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. + + + + Configuration options provided at construction time. + + + + Unique identifier for this skill instance (includes timestamp and random bytes). + + + + Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. + + + + Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. + + + + Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. + + + + Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. + + + + Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. + + + + Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. + + + + The registered name of this skill type. + + + + Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. + + + + Additional SWAIG fields extracted from config, merged into tool definitions. + + +## Methods + +### cleanup + +Cleanup resources. Called when the skill is removed from an agent. + +#### Signature + +```typescript +cleanup(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 469. + +*** + +### constructor + +Create a new skill instance. + +Python parity: `core/skill_base.py:32-43`. +Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` +is left as `None` on the subclass. TS throws the equivalent when the static +defaults haven't been overridden. + +#### Signature + +```typescript +constructor(config?: SkillConfig): PlayBackgroundFileSkill +``` + +#### Parameters + + + Optional configuration key-value pairs (Python: `params`). + + +#### Returns + +`PlayBackgroundFileSkill` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 282. + +*** + +### defineTool + +Imperatively register a tool with this skill. + +Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. +Merges `this.swaigFields` into the tool definition (explicit fields on +`toolDef` take precedence), then pushes the result into `_dynamicTools` +so the default `getTools()` returns it at SWML render time. + +Intended for skills whose tool shape depends on config evaluated at +`setup()` time. Skills with a static tool list should override +`getTools()` instead. + +#### Signature + +```typescript +defineTool(toolDef: SkillToolDefinition): void +``` + +#### Parameters + + + The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 351. + +*** + +### getAgent + +Return the agent that owns this skill, asserting it is non-null. +Equivalent to accessing `self.agent` in Python, where the agent reference +is always set before `setup()` is called. + +The SkillManager lifecycle guarantees that `setAgent()` is called before +`setup()`, so this method is safe to use inside `setup()` and in any +tool handler invoked during an active agent session. + +#### Signature + +```typescript +getAgent(): AgentBase +``` + +#### Returns + +`AgentBase` — The owning `AgentBase` instance. + +#### Throws + +- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 261. + +*** + +### getConfig + +Get a configuration value by key, falling back to a default if not set. + +#### Signature + +```typescript +getConfig(key: string, defaultValue?: T): T +``` + +#### Type Parameters + + + +#### Parameters + + + The configuration key to look up. + + + + Value to return if the key is not present. + + +#### Returns + +`T` — The configuration value cast to type T, or the default value. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 524. + +*** + +### getDataMapTools + +Optional DataMap-style tool definitions. Skills that build their own +SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them +here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. + +Python equivalent: the direct `self.agent.register_swaig_function(fn)` +call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). +Default returns `[]` — skills using only the declarative `getTools()` path +do not need to override this. + +#### Signature + +```typescript +getDataMapTools(): Record[] +``` + +#### Returns + +`Record[]` — Array of fully-built SWAIG function dicts. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 372. + +*** + +### getGlobalData + +Get global data to merge into the agent's global data store. + +#### Signature + +```typescript +getGlobalData(): Record +``` + +#### Returns + +`Record` — Key-value pairs to be merged into the agent's global data. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 410. + +*** + +### getHints + +Get speech recognition hints relevant to this skill. + +#### Signature + +```typescript +getHints(): string[] +``` + +#### Returns + +`string[]` — Array of hint strings to improve speech recognition accuracy. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 402. + +*** + +### getInstanceKey + +Produce a compound instance key so multiple copies of the skill with +distinct `tool_name` values can coexist in a single agent. + +#### Signature + +```typescript +getInstanceKey(): string +``` + +#### Returns + +`string` + +#### Source + +[`src/skills/builtin/play_background_file.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/play_background_file.ts) + +Line 114. + +*** + +### getParameterSchema + +Get the parameter schema for this skill class, describing all accepted configuration options. +Subclasses should override and call `super.getParameterSchema()` to include base parameters. + +Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): +returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a +`tool_name` entry with `default: cls.SKILL_NAME` for classes with +`SUPPORTS_MULTIPLE_INSTANCES = true`. + +**Modifiers:** `static` + +#### Signature + +```typescript +getParameterSchema(): Record +``` + +#### Returns + +`Record` — Record mapping parameter names to their schema entries. + +#### Source + +[`src/skills/builtin/play_background_file.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/play_background_file.ts) + +Line 58. + +*** + +### getPromptSections + +Get prompt sections to inject into the agent's system prompt. +Respects the `skip_prompt` config option — returns `[]` if set to `true`. +Subclasses should override `_getPromptSections()` instead of this method. + +#### Signature + +```typescript +getPromptSections(): SkillPromptSection[] +``` + +#### Returns + +`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 382. + +*** + +### getSkillData + +Read this skill's data from a raw call data object's global\_data. + +#### Signature + +```typescript +getSkillData(rawData: Record): Record +``` + +#### Parameters + + + The raw request data containing global\_data. + + +#### Returns + +`Record` — The skill's stored data, or an empty object if not found. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 450. + +*** + +### getSkillNamespace + +Get the namespaced key for storing per-skill data in global\_data. + +#### Signature + +```typescript +getSkillNamespace(): string +``` + +#### Returns + +`string` — A string like "skill:datetime" or "skill:my\_prefix". + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 440. + +*** + +### getTools + +#### Signature + +```typescript +getTools(): SkillToolDefinition[] +``` + +#### Returns + +`SkillToolDefinition[]` — Either a single enum-based tool (when pre-configured `files` are supplied — matches Python), or two free-form tools (`play_background` and `stop_background`) when only `default_file_url`/`allowed_domains` are configured. + +#### Source + +[`src/skills/builtin/play_background_file.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/play_background_file.ts) + +Line 138. + +*** + +### hasAllEnvVars + +Check if all required environment variables are present. +Convenience wrapper around `validateEnvVars()` that returns a boolean, +matching the Python `validate_env_vars() -> bool` return type. + +#### Signature + +```typescript +hasAllEnvVars(): boolean +``` + +#### Returns + +`boolean` — `true` if all required env vars are set, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 544. + +*** + +### hasAllPackages + +Check if all required packages declared in the manifest are available. +Convenience wrapper around `validatePackages()` that returns a boolean, +matching the Python `validate_packages() -> bool` return type. + +#### Signature + +```typescript +hasAllPackages(): Promise +``` + +#### Returns + +`Promise` — `true` if all required packages are importable, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 579. + +*** + +### isInitialized + +Check if the skill has been initialized by the SkillManager. + +#### Signature + +```typescript +isInitialized(): boolean +``` + +#### Returns + +`boolean` — True if setup() has completed and the skill is marked initialized. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 507. + +*** + +### markInitialized + +Mark the skill as initialized (called by SkillManager). + +#### Signature + +```typescript +markInitialized(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 514. + +*** + +### setAgent + +Set the agent reference for this skill. +Called by the SkillManager/AgentBase when the skill is attached to an agent. +Python equivalent: `self.agent = agent` in `__init__`. + +#### Signature + +```typescript +setAgent(agent: AgentBase): void +``` + +#### Parameters + + + The agent that owns this skill. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 534. + +*** + +### setup + +Setup the skill. Called when the skill is added to an agent. +Override to perform initialization (API connections, config validation, etc.) + +#### Signature + +```typescript +setup(): Promise +``` + +#### Returns + +`Promise` — `true` if setup succeeded, `false` otherwise. Python equivalent: abstract `setup() -> bool`. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 313. + +*** + +### updateSkillData + +Update this skill's namespaced data on a FunctionResult via updateGlobalData. + +#### Signature + +```typescript +updateSkillData( + result: FunctionResult, + data: Record +): FunctionResult +``` + +#### Parameters + + + The FunctionResult to update. + + + + The data to store under this skill's namespace. + + +#### Returns + +`FunctionResult` — The FunctionResult for chaining. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 462. + +*** + +### validateEnvVars + +Validate that all required environment variables declared on the skill class +are set in the current process environment. + +Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` +directly. TS reads the same static from the class. + +Returns the list of missing variable names so callers can produce actionable +error messages. This differs from Python's `validate_env_vars() -> bool` +return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/agents/skills/builtin/play-background-file/play-background-file-skill#has-all-env-vars) is the boolean equivalent. + +#### Signature + +```typescript +validateEnvVars(): string[] +``` + +#### Returns + +`string[]` — Array of missing environment variable names (empty if all are present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 486. + +*** + +### validatePackages + +Validate that all required packages declared on the skill class can be imported. + +Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` +directly and tries `importlib.import_module(pkg)` for each; TS does the +equivalent with a dynamic `import()`. + +#### Signature + +```typescript +validatePackages(): Promise +``` + +#### Returns + +`Promise` — Array of package names that could not be imported (empty if all present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 557. + +## Source + +[`src/skills/builtin/play_background_file.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/play_background_file.ts) + +Line 52. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/spider/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/spider/index.mdx new file mode 100644 index 0000000000..95ba4ff76f --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/skills/builtin/spider/index.mdx @@ -0,0 +1,63 @@ +--- +slug: "/reference/typescript/agents/skills/builtin/spider" +title: "spider" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "skills.builtin.spider" + parent: "skills.builtin" + module: "agents.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/spider.ts" +--- +# `spider` + +## Signature + +```typescript +module spider +``` + +## Classes + + + + Fast web scraping skill optimized for speed and token efficiency. + + + +## Functions + +### createSkill + +Factory function for creating SpiderSkill instances. + +#### Signature + +```typescript +createSkill(config?: SkillConfig): SpiderSkill +``` + +#### Parameters + + + Optional skill configuration. + + +#### Returns + +`SpiderSkill` — A new SpiderSkill instance. + +#### Source + +[`src/skills/builtin/spider.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/spider.ts) + +Line 937. + +## Source + +[`src/skills/builtin/spider.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/spider.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/spider/spider-skill/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/spider/spider-skill/index.mdx new file mode 100644 index 0000000000..38ea1db34d --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/skills/builtin/spider/spider-skill/index.mdx @@ -0,0 +1,718 @@ +--- +slug: "/reference/typescript/agents/skills/builtin/spider/spider-skill" +title: "SpiderSkill" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "skills.builtin.spider.SpiderSkill" + parent: "skills.builtin.spider" + module: "agents.skills.builtin.spider" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/spider.ts" +--- +# `SpiderSkill` + +Fast web scraping skill optimized for speed and token efficiency. + +Multi-instance capable. Port of the Python `SpiderSkill` with three tools: +`scrape_url`, `crawl_site`, and `extract_structured_data`. Configuration +mirrors the Python schema (delay, concurrent\_requests, timeout, max\_pages, +max\_depth, extract\_type, max\_text\_length, clean\_text, selectors, +follow\_patterns, user\_agent, headers, follow\_robots\_txt, cache\_enabled). + +## Signature + +```typescript +class SpiderSkill extends SkillBase +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/agents/skills/skill-base) + +## Examples + +```typescript +agent.addSkill('spider', { max_pages: 5, max_depth: 2 }); +``` + +## Properties + + + Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. + + + + Configuration options provided at construction time. + + + + Unique identifier for this skill instance (includes timestamp and random bytes). + + + + Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. + + + + Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. + + + + Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. + + + + Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. + + + + Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. + + + + Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. + + + + The registered name of this skill type. + + + + Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. + + + + Additional SWAIG fields extracted from config, merged into tool definitions. + + +## Methods + +### cleanup + +Cleanup resources. Called when the skill is removed from an agent. + +#### Signature + +```typescript +cleanup(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/skills/builtin/spider.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/spider.ts) + +Line 321. + +*** + +### constructor + +Create a new skill instance. + +Python parity: `core/skill_base.py:32-43`. +Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` +is left as `None` on the subclass. TS throws the equivalent when the static +defaults haven't been overridden. + +#### Signature + +```typescript +constructor(config?: SkillConfig): SpiderSkill +``` + +#### Parameters + + + Optional configuration key-value pairs (Python: `params`). + + +#### Returns + +`SpiderSkill` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 282. + +*** + +### defineTool + +Imperatively register a tool with this skill. + +Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. +Merges `this.swaigFields` into the tool definition (explicit fields on +`toolDef` take precedence), then pushes the result into `_dynamicTools` +so the default `getTools()` returns it at SWML render time. + +Intended for skills whose tool shape depends on config evaluated at +`setup()` time. Skills with a static tool list should override +`getTools()` instead. + +#### Signature + +```typescript +defineTool(toolDef: SkillToolDefinition): void +``` + +#### Parameters + + + The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 351. + +*** + +### getAgent + +Return the agent that owns this skill, asserting it is non-null. +Equivalent to accessing `self.agent` in Python, where the agent reference +is always set before `setup()` is called. + +The SkillManager lifecycle guarantees that `setAgent()` is called before +`setup()`, so this method is safe to use inside `setup()` and in any +tool handler invoked during an active agent session. + +#### Signature + +```typescript +getAgent(): AgentBase +``` + +#### Returns + +`AgentBase` — The owning `AgentBase` instance. + +#### Throws + +- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 261. + +*** + +### getConfig + +Get a configuration value by key, falling back to a default if not set. + +#### Signature + +```typescript +getConfig(key: string, defaultValue?: T): T +``` + +#### Type Parameters + + + +#### Parameters + + + The configuration key to look up. + + + + Value to return if the key is not present. + + +#### Returns + +`T` — The configuration value cast to type T, or the default value. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 524. + +*** + +### getDataMapTools + +Optional DataMap-style tool definitions. Skills that build their own +SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them +here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. + +Python equivalent: the direct `self.agent.register_swaig_function(fn)` +call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). +Default returns `[]` — skills using only the declarative `getTools()` path +do not need to override this. + +#### Signature + +```typescript +getDataMapTools(): Record[] +``` + +#### Returns + +`Record[]` — Array of fully-built SWAIG function dicts. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 372. + +*** + +### getGlobalData + +Get global data to merge into the agent's global data store. + +#### Signature + +```typescript +getGlobalData(): Record +``` + +#### Returns + +`Record` — Key-value pairs to be merged into the agent's global data. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 410. + +*** + +### getHints + +Get speech recognition hints relevant to this skill. + +#### Signature + +```typescript +getHints(): string[] +``` + +#### Returns + +`string[]` — Array of hint strings to improve speech recognition accuracy. + +#### Source + +[`src/skills/builtin/spider.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/spider.ts) + +Line 308. + +*** + +### getInstanceKey + +Get the instance key used for deduplication in the SkillManager. + +For single-instance skills (`SUPPORTS_MULTIPLE_INSTANCES = false`), returns +the skill name. For multi-instance skills, returns `${skillName}_${toolName}` +using the `tool_name` config (falls back to the skill name). + +Matches Python's `SkillBase.get_instance_key()` default (`skill_base.py:141-146`). +Multi-instance subclasses only need to override when their key derivation +depends on config beyond `tool_name`. + +#### Signature + +```typescript +getInstanceKey(): string +``` + +#### Returns + +`string` — A unique key identifying this skill instance. + +#### Source + +[`src/skills/builtin/spider.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/spider.ts) + +Line 211. + +*** + +### getParameterSchema + +Get the parameter schema for this skill class, describing all accepted configuration options. +Subclasses should override and call `super.getParameterSchema()` to include base parameters. + +Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): +returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a +`tool_name` entry with `default: cls.SKILL_NAME` for classes with +`SUPPORTS_MULTIPLE_INSTANCES = true`. + +**Modifiers:** `static` + +#### Signature + +```typescript +getParameterSchema(): Record +``` + +#### Returns + +`Record` — Record mapping parameter names to their schema entries. + +#### Source + +[`src/skills/builtin/spider.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/spider.ts) + +Line 81. + +*** + +### getPromptSections + +Get prompt sections to inject into the agent's system prompt. +Respects the `skip_prompt` config option — returns `[]` if set to `true`. +Subclasses should override `_getPromptSections()` instead of this method. + +#### Signature + +```typescript +getPromptSections(): SkillPromptSection[] +``` + +#### Returns + +`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 382. + +*** + +### getSkillData + +Read this skill's data from a raw call data object's global\_data. + +#### Signature + +```typescript +getSkillData(rawData: Record): Record +``` + +#### Parameters + + + The raw request data containing global\_data. + + +#### Returns + +`Record` — The skill's stored data, or an empty object if not found. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 450. + +*** + +### getSkillNamespace + +Get the namespaced key for storing per-skill data in global\_data. + +#### Signature + +```typescript +getSkillNamespace(): string +``` + +#### Returns + +`string` — A string like "skill:datetime" or "skill:my\_prefix". + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 440. + +*** + +### getTools + +#### Signature + +```typescript +getTools(): SkillToolDefinition[] +``` + +#### Returns + +`SkillToolDefinition[]` — Three tools: `scrape_url`, `crawl_site`, and `extract_structured_data`. + +#### Source + +[`src/skills/builtin/spider.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/spider.ts) + +Line 329. + +*** + +### hasAllEnvVars + +Check if all required environment variables are present. +Convenience wrapper around `validateEnvVars()` that returns a boolean, +matching the Python `validate_env_vars() -> bool` return type. + +#### Signature + +```typescript +hasAllEnvVars(): boolean +``` + +#### Returns + +`boolean` — `true` if all required env vars are set, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 544. + +*** + +### hasAllPackages + +Check if all required packages declared in the manifest are available. +Convenience wrapper around `validatePackages()` that returns a boolean, +matching the Python `validate_packages() -> bool` return type. + +#### Signature + +```typescript +hasAllPackages(): Promise +``` + +#### Returns + +`Promise` — `true` if all required packages are importable, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 579. + +*** + +### isInitialized + +Check if the skill has been initialized by the SkillManager. + +#### Signature + +```typescript +isInitialized(): boolean +``` + +#### Returns + +`boolean` — True if setup() has completed and the skill is marked initialized. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 507. + +*** + +### markInitialized + +Mark the skill as initialized (called by SkillManager). + +#### Signature + +```typescript +markInitialized(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 514. + +*** + +### setAgent + +Set the agent reference for this skill. +Called by the SkillManager/AgentBase when the skill is attached to an agent. +Python equivalent: `self.agent = agent` in `__init__`. + +#### Signature + +```typescript +setAgent(agent: AgentBase): void +``` + +#### Parameters + + + The agent that owns this skill. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 534. + +*** + +### setup + +Setup the skill. Called when the skill is added to an agent. +Override to perform initialization (API connections, config validation, etc.) + +#### Signature + +```typescript +setup(): Promise +``` + +#### Returns + +`Promise` — `true` if setup succeeded, `false` otherwise. Python equivalent: abstract `setup() -> bool`. + +#### Source + +[`src/skills/builtin/spider.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/spider.ts) + +Line 216. + +*** + +### updateSkillData + +Update this skill's namespaced data on a FunctionResult via updateGlobalData. + +#### Signature + +```typescript +updateSkillData( + result: FunctionResult, + data: Record +): FunctionResult +``` + +#### Parameters + + + The FunctionResult to update. + + + + The data to store under this skill's namespace. + + +#### Returns + +`FunctionResult` — The FunctionResult for chaining. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 462. + +*** + +### validateEnvVars + +Validate that all required environment variables declared on the skill class +are set in the current process environment. + +Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` +directly. TS reads the same static from the class. + +Returns the list of missing variable names so callers can produce actionable +error messages. This differs from Python's `validate_env_vars() -> bool` +return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/agents/skills/builtin/spider/spider-skill#has-all-env-vars) is the boolean equivalent. + +#### Signature + +```typescript +validateEnvVars(): string[] +``` + +#### Returns + +`string[]` — Array of missing environment variable names (empty if all are present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 486. + +*** + +### validatePackages + +Validate that all required packages declared on the skill class can be imported. + +Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` +directly and tries `importlib.import_module(pkg)` for each; TS does the +equivalent with a dynamic `import()`. + +#### Signature + +```typescript +validatePackages(): Promise +``` + +#### Returns + +`Promise` — Array of package names that could not be imported (empty if all present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 557. + +## Source + +[`src/skills/builtin/spider.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/spider.ts) + +Line 71. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/swml-transfer/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/swml-transfer/index.mdx new file mode 100644 index 0000000000..1cab6c2dec --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/skills/builtin/swml-transfer/index.mdx @@ -0,0 +1,63 @@ +--- +slug: "/reference/typescript/agents/skills/builtin/swml-transfer" +title: "swml_transfer" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "skills.builtin.swml_transfer" + parent: "skills.builtin" + module: "agents.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/swml_transfer.ts" +--- +# `swml_transfer` + +## Signature + +```typescript +module swml_transfer +``` + +## Classes + + + + Transfer calls between agents based on pattern matching. + + + +## Functions + +### createSkill + +Factory function for creating SwmlTransferSkill instances. + +#### Signature + +```typescript +createSkill(config?: SkillConfig): SwmlTransferSkill +``` + +#### Parameters + + + Optional skill configuration. + + +#### Returns + +`SwmlTransferSkill` — A new SwmlTransferSkill instance. + +#### Source + +[`src/skills/builtin/swml_transfer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/swml_transfer.ts) + +Line 643. + +## Source + +[`src/skills/builtin/swml_transfer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/swml_transfer.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/swml-transfer/swml-transfer-skill/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/swml-transfer/swml-transfer-skill/index.mdx new file mode 100644 index 0000000000..2b7f364d9b --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/skills/builtin/swml-transfer/swml-transfer-skill/index.mdx @@ -0,0 +1,721 @@ +--- +slug: "/reference/typescript/agents/skills/builtin/swml-transfer/swml-transfer-skill" +title: "SwmlTransferSkill" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "skills.builtin.swml_transfer.SwmlTransferSkill" + parent: "skills.builtin.swml_transfer" + module: "agents.skills.builtin.swml_transfer" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/swml_transfer.ts" +--- +# `SwmlTransferSkill` + +Transfer calls between agents based on pattern matching. + +Multi-instance capable (distinguished by `tool_name`). +Accepts either Python-style `transfers` config (regex → per-entry config) +or TypeScript-style `patterns` array of named destinations. + +## Signature + +```typescript +class SwmlTransferSkill extends SkillBase +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/agents/skills/skill-base) + +## Examples + +```typescript +agent.addSkill('swml_transfer', { + patterns: [ + { name: 'sales', pattern: /sales|pricing|buy/i, to: '+15551112222' }, + { name: 'support', pattern: /help|support|broken/i, to: '+15553334444' }, + ], +}); +``` + +## Properties + + + Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. + + + + Configuration options provided at construction time. + + + + Unique identifier for this skill instance (includes timestamp and random bytes). + + + + Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. + + + + Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. + + + + Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. + + + + Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. + + + + Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. + + + + Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. + + + + The registered name of this skill type. + + + + Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. + + + + Additional SWAIG fields extracted from config, merged into tool definitions. + + +## Methods + +### cleanup + +Cleanup resources. Called when the skill is removed from an agent. + +#### Signature + +```typescript +cleanup(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 469. + +*** + +### constructor + +Create a new skill instance. + +Python parity: `core/skill_base.py:32-43`. +Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` +is left as `None` on the subclass. TS throws the equivalent when the static +defaults haven't been overridden. + +#### Signature + +```typescript +constructor(config?: SkillConfig): SwmlTransferSkill +``` + +#### Parameters + + + Optional configuration key-value pairs (Python: `params`). + + +#### Returns + +`SwmlTransferSkill` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 282. + +*** + +### defineTool + +Imperatively register a tool with this skill. + +Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. +Merges `this.swaigFields` into the tool definition (explicit fields on +`toolDef` take precedence), then pushes the result into `_dynamicTools` +so the default `getTools()` returns it at SWML render time. + +Intended for skills whose tool shape depends on config evaluated at +`setup()` time. Skills with a static tool list should override +`getTools()` instead. + +#### Signature + +```typescript +defineTool(toolDef: SkillToolDefinition): void +``` + +#### Parameters + + + The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 351. + +*** + +### getAgent + +Return the agent that owns this skill, asserting it is non-null. +Equivalent to accessing `self.agent` in Python, where the agent reference +is always set before `setup()` is called. + +The SkillManager lifecycle guarantees that `setAgent()` is called before +`setup()`, so this method is safe to use inside `setup()` and in any +tool handler invoked during an active agent session. + +#### Signature + +```typescript +getAgent(): AgentBase +``` + +#### Returns + +`AgentBase` — The owning `AgentBase` instance. + +#### Throws + +- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 261. + +*** + +### getConfig + +Get a configuration value by key, falling back to a default if not set. + +#### Signature + +```typescript +getConfig(key: string, defaultValue?: T): T +``` + +#### Type Parameters + + + +#### Parameters + + + The configuration key to look up. + + + + Value to return if the key is not present. + + +#### Returns + +`T` — The configuration value cast to type T, or the default value. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 524. + +*** + +### getDataMapTools + +Optional DataMap-style tool definitions. Skills that build their own +SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them +here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. + +Python equivalent: the direct `self.agent.register_swaig_function(fn)` +call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). +Default returns `[]` — skills using only the declarative `getTools()` path +do not need to override this. + +#### Signature + +```typescript +getDataMapTools(): Record[] +``` + +#### Returns + +`Record[]` — Array of fully-built SWAIG function dicts. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 372. + +*** + +### getGlobalData + +Get global data to merge into the agent's global data store. + +#### Signature + +```typescript +getGlobalData(): Record +``` + +#### Returns + +`Record` — Key-value pairs to be merged into the agent's global data. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 410. + +*** + +### getHints + +Get speech recognition hints relevant to this skill. + +#### Signature + +```typescript +getHints(): string[] +``` + +#### Returns + +`string[]` — Array of hint strings to improve speech recognition accuracy. + +#### Source + +[`src/skills/builtin/swml_transfer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/swml_transfer.ts) + +Line 241. + +*** + +### getInstanceKey + +Get the instance key used for deduplication in the SkillManager. + +For single-instance skills (`SUPPORTS_MULTIPLE_INSTANCES = false`), returns +the skill name. For multi-instance skills, returns `${skillName}_${toolName}` +using the `tool_name` config (falls back to the skill name). + +Matches Python's `SkillBase.get_instance_key()` default (`skill_base.py:141-146`). +Multi-instance subclasses only need to override when their key derivation +depends on config beyond `tool_name`. + +#### Signature + +```typescript +getInstanceKey(): string +``` + +#### Returns + +`string` — A unique key identifying this skill instance. + +#### Source + +[`src/skills/builtin/swml_transfer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/swml_transfer.ts) + +Line 162. + +*** + +### getParameterSchema + +Get the parameter schema for this skill class, describing all accepted configuration options. +Subclasses should override and call `super.getParameterSchema()` to include base parameters. + +Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): +returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a +`tool_name` entry with `default: cls.SKILL_NAME` for classes with +`SUPPORTS_MULTIPLE_INSTANCES = true`. + +**Modifiers:** `static` + +#### Signature + +```typescript +getParameterSchema(): Record +``` + +#### Returns + +`Record` — Record mapping parameter names to their schema entries. + +#### Source + +[`src/skills/builtin/swml_transfer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/swml_transfer.ts) + +Line 82. + +*** + +### getPromptSections + +Get prompt sections to inject into the agent's system prompt. +Respects the `skip_prompt` config option — returns `[]` if set to `true`. +Subclasses should override `_getPromptSections()` instead of this method. + +#### Signature + +```typescript +getPromptSections(): SkillPromptSection[] +``` + +#### Returns + +`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 382. + +*** + +### getSkillData + +Read this skill's data from a raw call data object's global\_data. + +#### Signature + +```typescript +getSkillData(rawData: Record): Record +``` + +#### Parameters + + + The raw request data containing global\_data. + + +#### Returns + +`Record` — The skill's stored data, or an empty object if not found. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 450. + +*** + +### getSkillNamespace + +Get the namespaced key for storing per-skill data in global\_data. + +#### Signature + +```typescript +getSkillNamespace(): string +``` + +#### Returns + +`string` — A string like "skill:datetime" or "skill:my\_prefix". + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 440. + +*** + +### getTools + +#### Signature + +```typescript +getTools(): SkillToolDefinition[] +``` + +#### Returns + +`SkillToolDefinition[]` — A `transfer_call` tool, plus `list_transfer_destinations` when patterns are configured. + +#### Source + +[`src/skills/builtin/swml_transfer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/swml_transfer.ts) + +Line 272. + +*** + +### hasAllEnvVars + +Check if all required environment variables are present. +Convenience wrapper around `validateEnvVars()` that returns a boolean, +matching the Python `validate_env_vars() -> bool` return type. + +#### Signature + +```typescript +hasAllEnvVars(): boolean +``` + +#### Returns + +`boolean` — `true` if all required env vars are set, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 544. + +*** + +### hasAllPackages + +Check if all required packages declared in the manifest are available. +Convenience wrapper around `validatePackages()` that returns a boolean, +matching the Python `validate_packages() -> bool` return type. + +#### Signature + +```typescript +hasAllPackages(): Promise +``` + +#### Returns + +`Promise` — `true` if all required packages are importable, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 579. + +*** + +### isInitialized + +Check if the skill has been initialized by the SkillManager. + +#### Signature + +```typescript +isInitialized(): boolean +``` + +#### Returns + +`boolean` — True if setup() has completed and the skill is marked initialized. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 507. + +*** + +### markInitialized + +Mark the skill as initialized (called by SkillManager). + +#### Signature + +```typescript +markInitialized(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 514. + +*** + +### setAgent + +Set the agent reference for this skill. +Called by the SkillManager/AgentBase when the skill is attached to an agent. +Python equivalent: `self.agent = agent` in `__init__`. + +#### Signature + +```typescript +setAgent(agent: AgentBase): void +``` + +#### Parameters + + + The agent that owns this skill. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 534. + +*** + +### setup + +Setup the skill. Called when the skill is added to an agent. +Override to perform initialization (API connections, config validation, etc.) + +#### Signature + +```typescript +setup(): Promise +``` + +#### Returns + +`Promise` — `true` if setup succeeded, `false` otherwise. Python equivalent: abstract `setup() -> bool`. + +#### Source + +[`src/skills/builtin/swml_transfer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/swml_transfer.ts) + +Line 167. + +*** + +### updateSkillData + +Update this skill's namespaced data on a FunctionResult via updateGlobalData. + +#### Signature + +```typescript +updateSkillData( + result: FunctionResult, + data: Record +): FunctionResult +``` + +#### Parameters + + + The FunctionResult to update. + + + + The data to store under this skill's namespace. + + +#### Returns + +`FunctionResult` — The FunctionResult for chaining. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 462. + +*** + +### validateEnvVars + +Validate that all required environment variables declared on the skill class +are set in the current process environment. + +Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` +directly. TS reads the same static from the class. + +Returns the list of missing variable names so callers can produce actionable +error messages. This differs from Python's `validate_env_vars() -> bool` +return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/agents/skills/builtin/swml-transfer/swml-transfer-skill#has-all-env-vars) is the boolean equivalent. + +#### Signature + +```typescript +validateEnvVars(): string[] +``` + +#### Returns + +`string[]` — Array of missing environment variable names (empty if all are present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 486. + +*** + +### validatePackages + +Validate that all required packages declared on the skill class can be imported. + +Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` +directly and tries `importlib.import_module(pkg)` for each; TS does the +equivalent with a dynamic `import()`. + +#### Signature + +```typescript +validatePackages(): Promise +``` + +#### Returns + +`Promise` — Array of package names that could not be imported (empty if all present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 557. + +## Source + +[`src/skills/builtin/swml_transfer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/swml_transfer.ts) + +Line 73. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/weather-api/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/weather-api/index.mdx new file mode 100644 index 0000000000..7c267fe25a --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/skills/builtin/weather-api/index.mdx @@ -0,0 +1,63 @@ +--- +slug: "/reference/typescript/agents/skills/builtin/weather-api" +title: "weather_api" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "skills.builtin.weather_api" + parent: "skills.builtin" + module: "agents.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/weather_api.ts" +--- +# `weather_api` + +## Signature + +```typescript +module weather_api +``` + +## Classes + + + + Fetches current weather data from OpenWeatherMap for any location worldwide. + + + +## Functions + +### createSkill + +Factory function for creating WeatherApiSkill instances. + +#### Signature + +```typescript +createSkill(config?: SkillConfig): WeatherApiSkill +``` + +#### Parameters + + + Optional skill configuration. + + +#### Returns + +`WeatherApiSkill` — A new WeatherApiSkill instance. + +#### Source + +[`src/skills/builtin/weather_api.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/weather_api.ts) + +Line 271. + +## Source + +[`src/skills/builtin/weather_api.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/weather_api.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/weather-api/weather-api-skill/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/weather-api/weather-api-skill/index.mdx new file mode 100644 index 0000000000..dcc54852c1 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/skills/builtin/weather-api/weather-api-skill/index.mdx @@ -0,0 +1,732 @@ +--- +slug: "/reference/typescript/agents/skills/builtin/weather-api/weather-api-skill" +title: "WeatherApiSkill" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "skills.builtin.weather_api.WeatherApiSkill" + parent: "skills.builtin.weather_api" + module: "agents.skills.builtin.weather_api" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/weather_api.ts" +--- +# `WeatherApiSkill` + +Fetches current weather data from OpenWeatherMap for any location worldwide. + +Tier 2 built-in skill. Requires the `WEATHER_API_KEY` environment variable +containing a valid OpenWeatherMap API key (obtainable at openweathermap.org). +Supports metric, imperial, and standard temperature units via the `units` +config option. The `api_key` config value takes precedence over the +environment variable when both are set. + +**Provider note:** The Python reference SDK uses WeatherAPI.com +(`api.weatherapi.com/v1/current.json`). This TypeScript skill uses +OpenWeatherMap (`api.openweathermap.org/data/2.5/weather`). These providers +use different API key formats — a WeatherAPI.com key will NOT work here. +Obtain an OpenWeatherMap key at https://openweathermap.org/api. + +**Unit aliases:** For migration compatibility with the Python SDK the `units` +config also accepts `"fahrenheit"` (normalized to `"imperial"`) and +`"celsius"` (normalized to `"metric"`). + +## Signature + +```typescript +class WeatherApiSkill extends SkillBase +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/agents/skills/skill-base) + +## Examples + +```typescript +agent.addSkill('weather_api', { units: 'imperial' }); +// or pass the key explicitly: +agent.addSkill('weather_api', { api_key: process.env.WEATHER_API_KEY }); +``` + +## Properties + + + Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. + + + + Configuration options provided at construction time. + + + + Unique identifier for this skill instance (includes timestamp and random bytes). + + + + Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. + + + + Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. + + + + Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. + + + + Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. + + + + Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. + + + + Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. + + + + The registered name of this skill type. + + + + Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. + + + + Additional SWAIG fields extracted from config, merged into tool definitions. + + +## Methods + +### cleanup + +Cleanup resources. Called when the skill is removed from an agent. + +#### Signature + +```typescript +cleanup(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 469. + +*** + +### constructor + +Create a new skill instance. + +Python parity: `core/skill_base.py:32-43`. +Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` +is left as `None` on the subclass. TS throws the equivalent when the static +defaults haven't been overridden. + +#### Signature + +```typescript +constructor(config?: SkillConfig): WeatherApiSkill +``` + +#### Parameters + + + Optional configuration key-value pairs (Python: `params`). + + +#### Returns + +`WeatherApiSkill` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 282. + +*** + +### defineTool + +Imperatively register a tool with this skill. + +Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. +Merges `this.swaigFields` into the tool definition (explicit fields on +`toolDef` take precedence), then pushes the result into `_dynamicTools` +so the default `getTools()` returns it at SWML render time. + +Intended for skills whose tool shape depends on config evaluated at +`setup()` time. Skills with a static tool list should override +`getTools()` instead. + +#### Signature + +```typescript +defineTool(toolDef: SkillToolDefinition): void +``` + +#### Parameters + + + The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 351. + +*** + +### getAgent + +Return the agent that owns this skill, asserting it is non-null. +Equivalent to accessing `self.agent` in Python, where the agent reference +is always set before `setup()` is called. + +The SkillManager lifecycle guarantees that `setAgent()` is called before +`setup()`, so this method is safe to use inside `setup()` and in any +tool handler invoked during an active agent session. + +#### Signature + +```typescript +getAgent(): AgentBase +``` + +#### Returns + +`AgentBase` — The owning `AgentBase` instance. + +#### Throws + +- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 261. + +*** + +### getConfig + +Get a configuration value by key, falling back to a default if not set. + +#### Signature + +```typescript +getConfig(key: string, defaultValue?: T): T +``` + +#### Type Parameters + + + +#### Parameters + + + The configuration key to look up. + + + + Value to return if the key is not present. + + +#### Returns + +`T` — The configuration value cast to type T, or the default value. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 524. + +*** + +### getDataMapTools + +Optional DataMap-style tool definitions. Skills that build their own +SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them +here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. + +Python equivalent: the direct `self.agent.register_swaig_function(fn)` +call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). +Default returns `[]` — skills using only the declarative `getTools()` path +do not need to override this. + +#### Signature + +```typescript +getDataMapTools(): Record[] +``` + +#### Returns + +`Record[]` — Array of fully-built SWAIG function dicts. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 372. + +*** + +### getGlobalData + +Get global data to merge into the agent's global data store. + +#### Signature + +```typescript +getGlobalData(): Record +``` + +#### Returns + +`Record` — Key-value pairs to be merged into the agent's global data. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 410. + +*** + +### getHints + +Get speech recognition hints relevant to this skill. + +#### Signature + +```typescript +getHints(): string[] +``` + +#### Returns + +`string[]` — Array of hint strings to improve speech recognition accuracy. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 402. + +*** + +### getInstanceKey + +Get the instance key used for deduplication in the SkillManager. + +For single-instance skills (`SUPPORTS_MULTIPLE_INSTANCES = false`), returns +the skill name. For multi-instance skills, returns `${skillName}_${toolName}` +using the `tool_name` config (falls back to the skill name). + +Matches Python's `SkillBase.get_instance_key()` default (`skill_base.py:141-146`). +Multi-instance subclasses only need to override when their key derivation +depends on config beyond `tool_name`. + +#### Signature + +```typescript +getInstanceKey(): string +``` + +#### Returns + +`string` — A unique key identifying this skill instance. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 427. + +*** + +### getParameterSchema + +Get the parameter schema for this skill class, describing all accepted configuration options. +Subclasses should override and call `super.getParameterSchema()` to include base parameters. + +Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): +returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a +`tool_name` entry with `default: cls.SKILL_NAME` for classes with +`SUPPORTS_MULTIPLE_INSTANCES = true`. + +**Modifiers:** `static` + +#### Signature + +```typescript +getParameterSchema(): Record +``` + +#### Returns + +`Record` — Record mapping parameter names to their schema entries. + +#### Source + +[`src/skills/builtin/weather_api.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/weather_api.ts) + +Line 93. + +*** + +### getPromptSections + +Get prompt sections to inject into the agent's system prompt. +Respects the `skip_prompt` config option — returns `[]` if set to `true`. +Subclasses should override `_getPromptSections()` instead of this method. + +#### Signature + +```typescript +getPromptSections(): SkillPromptSection[] +``` + +#### Returns + +`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 382. + +*** + +### getSkillData + +Read this skill's data from a raw call data object's global\_data. + +#### Signature + +```typescript +getSkillData(rawData: Record): Record +``` + +#### Parameters + + + The raw request data containing global\_data. + + +#### Returns + +`Record` — The skill's stored data, or an empty object if not found. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 450. + +*** + +### getSkillNamespace + +Get the namespaced key for storing per-skill data in global\_data. + +#### Signature + +```typescript +getSkillNamespace(): string +``` + +#### Returns + +`string` — A string like "skill:datetime" or "skill:my\_prefix". + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 440. + +*** + +### getTools + +#### Signature + +```typescript +getTools(): SkillToolDefinition[] +``` + +#### Returns + +`SkillToolDefinition[]` — A single weather tool (configurable name) that fetches current weather for a location. + +#### Source + +[`src/skills/builtin/weather_api.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/weather_api.ts) + +Line 121. + +*** + +### hasAllEnvVars + +Check if all required environment variables are present. +Convenience wrapper around `validateEnvVars()` that returns a boolean, +matching the Python `validate_env_vars() -> bool` return type. + +#### Signature + +```typescript +hasAllEnvVars(): boolean +``` + +#### Returns + +`boolean` — `true` if all required env vars are set, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 544. + +*** + +### hasAllPackages + +Check if all required packages declared in the manifest are available. +Convenience wrapper around `validatePackages()` that returns a boolean, +matching the Python `validate_packages() -> bool` return type. + +#### Signature + +```typescript +hasAllPackages(): Promise +``` + +#### Returns + +`Promise` — `true` if all required packages are importable, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 579. + +*** + +### isInitialized + +Check if the skill has been initialized by the SkillManager. + +#### Signature + +```typescript +isInitialized(): boolean +``` + +#### Returns + +`boolean` — True if setup() has completed and the skill is marked initialized. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 507. + +*** + +### markInitialized + +Mark the skill as initialized (called by SkillManager). + +#### Signature + +```typescript +markInitialized(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 514. + +*** + +### setAgent + +Set the agent reference for this skill. +Called by the SkillManager/AgentBase when the skill is attached to an agent. +Python equivalent: `self.agent = agent` in `__init__`. + +#### Signature + +```typescript +setAgent(agent: AgentBase): void +``` + +#### Parameters + + + The agent that owns this skill. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 534. + +*** + +### setup + +Validates that an API key is available either via inline config or the +`WEATHER_API_KEY` environment variable. Fails fast (returns `false`) when +neither source provides a key — matching Python SDK behaviour where +`_validate_config()` raises on construction when `api_key` is absent. + +#### Signature + +```typescript +setup(): Promise +``` + +#### Returns + +`Promise` — `true` if a key is present, `false` otherwise. + +#### Source + +[`src/skills/builtin/weather_api.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/weather_api.ts) + +Line 84. + +*** + +### updateSkillData + +Update this skill's namespaced data on a FunctionResult via updateGlobalData. + +#### Signature + +```typescript +updateSkillData( + result: FunctionResult, + data: Record +): FunctionResult +``` + +#### Parameters + + + The FunctionResult to update. + + + + The data to store under this skill's namespace. + + +#### Returns + +`FunctionResult` — The FunctionResult for chaining. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 462. + +*** + +### validateEnvVars + +Validate that all required environment variables declared on the skill class +are set in the current process environment. + +Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` +directly. TS reads the same static from the class. + +Returns the list of missing variable names so callers can produce actionable +error messages. This differs from Python's `validate_env_vars() -> bool` +return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/agents/skills/builtin/weather-api/weather-api-skill#has-all-env-vars) is the boolean equivalent. + +#### Signature + +```typescript +validateEnvVars(): string[] +``` + +#### Returns + +`string[]` — Array of missing environment variable names (empty if all are present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 486. + +*** + +### validatePackages + +Validate that all required packages declared on the skill class can be imported. + +Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` +directly and tries `importlib.import_module(pkg)` for each; TS does the +equivalent with a dynamic `import()`. + +#### Signature + +```typescript +validatePackages(): Promise +``` + +#### Returns + +`Promise` — Array of package names that could not be imported (empty if all present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 557. + +## Source + +[`src/skills/builtin/weather_api.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/weather_api.ts) + +Line 68. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/web-search/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/web-search/index.mdx new file mode 100644 index 0000000000..64c810109a --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/skills/builtin/web-search/index.mdx @@ -0,0 +1,63 @@ +--- +slug: "/reference/typescript/agents/skills/builtin/web-search" +title: "web_search" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "skills.builtin.web_search" + parent: "skills.builtin" + module: "agents.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/web_search.ts" +--- +# `web_search` + +## Signature + +```typescript +module web_search +``` + +## Classes + + + + Searches the web using the Google Custom Search JSON API. + + + +## Functions + +### createSkill + +Factory function for creating WebSearchSkill instances. + +#### Signature + +```typescript +createSkill(config?: SkillConfig): WebSearchSkill +``` + +#### Parameters + + + Optional skill configuration. + + +#### Returns + +`WebSearchSkill` — A new WebSearchSkill instance. + +#### Source + +[`src/skills/builtin/web_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/web_search.ts) + +Line 1351. + +## Source + +[`src/skills/builtin/web_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/web_search.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/web-search/web-search-skill/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/web-search/web-search-skill/index.mdx new file mode 100644 index 0000000000..51e08991e9 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/skills/builtin/web-search/web-search-skill/index.mdx @@ -0,0 +1,736 @@ +--- +slug: "/reference/typescript/agents/skills/builtin/web-search/web-search-skill" +title: "WebSearchSkill" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "skills.builtin.web_search.WebSearchSkill" + parent: "skills.builtin.web_search" + module: "agents.skills.builtin.web_search" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/web_search.ts" +--- +# `WebSearchSkill` + +Searches the web using the Google Custom Search JSON API. + +Tier 3 built-in skill. Credentials can be supplied via the `api_key` and +`search_engine_id` params or `GOOGLE_SEARCH_API_KEY` / +`GOOGLE_SEARCH_ENGINE_ID` (legacy: `GOOGLE_SEARCH_CX`) environment variables. + +The handler mirrors Python's `search_and_scrape_best` pipeline: fetches +`oversample_factor × num_results` candidates from Google, scrapes each +result page (SSRF-guarded, cheerio-based text extraction), scores for +quality (length + query relevance + boilerplate penalty), deduplicates by +domain, and returns the top `num_results` above `min_quality_score` with +full page content. If every scrape fails or falls below the threshold the +handler falls back to raw API snippets so the agent still has something +to say. + +Supported config: `tool_name`, `num_results`, `no_results_message`, +`safe_search`, `delay`, `max_content_length`, `oversample_factor`, +`min_quality_score`, `response_prefix`, `response_postfix`, and the +latency-control params `per_page_timeout`, `overall_deadline`, +`parallel_scrape`, `snippets_only` (Python skill.py commits 51101da + +295745b). When the overall deadline fires or no scraped page meets the +quality threshold, the handler falls back to formatting the CSE snippets. + +## Signature + +```typescript +class WebSearchSkill extends SkillBase +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/agents/skills/skill-base) + +## Examples + +```typescript +agent.addSkill('web_search', { + api_key: process.env.GOOGLE_SEARCH_API_KEY, + search_engine_id: process.env.GOOGLE_CSE_ID, + num_results: 3, +}); +``` + +## Properties + + + Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. + + + + Configuration options provided at construction time. + + + + Unique identifier for this skill instance (includes timestamp and random bytes). + + + + Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. + + + + Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. + + + + Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. + + + + Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. + + + + Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. + + + + Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. + + + + The registered name of this skill type. + + + + Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. + + + + Additional SWAIG fields extracted from config, merged into tool definitions. + + +## Methods + +### cleanup + +Cleanup resources. Called when the skill is removed from an agent. + +#### Signature + +```typescript +cleanup(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 469. + +*** + +### constructor + +Create a new skill instance. + +Python parity: `core/skill_base.py:32-43`. +Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` +is left as `None` on the subclass. TS throws the equivalent when the static +defaults haven't been overridden. + +#### Signature + +```typescript +constructor(config?: SkillConfig): WebSearchSkill +``` + +#### Parameters + + + Optional configuration key-value pairs (Python: `params`). + + +#### Returns + +`WebSearchSkill` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 282. + +*** + +### defineTool + +Imperatively register a tool with this skill. + +Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. +Merges `this.swaigFields` into the tool definition (explicit fields on +`toolDef` take precedence), then pushes the result into `_dynamicTools` +so the default `getTools()` returns it at SWML render time. + +Intended for skills whose tool shape depends on config evaluated at +`setup()` time. Skills with a static tool list should override +`getTools()` instead. + +#### Signature + +```typescript +defineTool(toolDef: SkillToolDefinition): void +``` + +#### Parameters + + + The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 351. + +*** + +### getAgent + +Return the agent that owns this skill, asserting it is non-null. +Equivalent to accessing `self.agent` in Python, where the agent reference +is always set before `setup()` is called. + +The SkillManager lifecycle guarantees that `setAgent()` is called before +`setup()`, so this method is safe to use inside `setup()` and in any +tool handler invoked during an active agent session. + +#### Signature + +```typescript +getAgent(): AgentBase +``` + +#### Returns + +`AgentBase` — The owning `AgentBase` instance. + +#### Throws + +- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 261. + +*** + +### getConfig + +Get a configuration value by key, falling back to a default if not set. + +#### Signature + +```typescript +getConfig(key: string, defaultValue?: T): T +``` + +#### Type Parameters + + + +#### Parameters + + + The configuration key to look up. + + + + Value to return if the key is not present. + + +#### Returns + +`T` — The configuration value cast to type T, or the default value. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 524. + +*** + +### getDataMapTools + +Optional DataMap-style tool definitions. Skills that build their own +SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them +here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. + +Python equivalent: the direct `self.agent.register_swaig_function(fn)` +call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). +Default returns `[]` — skills using only the declarative `getTools()` path +do not need to override this. + +#### Signature + +```typescript +getDataMapTools(): Record[] +``` + +#### Returns + +`Record[]` — Array of fully-built SWAIG function dicts. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 372. + +*** + +### getGlobalData + +Global data injected into the agent's SWML context (mirrors Python). + +#### Signature + +```typescript +getGlobalData(): Record +``` + +#### Returns + +`Record` + +#### Source + +[`src/skills/builtin/web_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/web_search.ts) + +Line 399. + +*** + +### getHints + +Get speech recognition hints relevant to this skill. + +#### Signature + +```typescript +getHints(): string[] +``` + +#### Returns + +`string[]` — Array of hint strings to improve speech recognition accuracy. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 402. + +*** + +### getInstanceKey + +Instance key for the SkillManager. Includes the configured +`search_engine_id` (or `"default"`) and `tool_name` (or `"web_search"`) +to match Python's `"{SKILL_NAME}_{search_engine_id}_{tool_name}"` scheme. + +#### Signature + +```typescript +getInstanceKey(): string +``` + +#### Returns + +`string` + +#### Source + +[`src/skills/builtin/web_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/web_search.ts) + +Line 392. + +*** + +### getParameterSchema + +Get the parameter schema for this skill class, describing all accepted configuration options. +Subclasses should override and call `super.getParameterSchema()` to include base parameters. + +Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): +returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a +`tool_name` entry with `default: cls.SKILL_NAME` for classes with +`SUPPORTS_MULTIPLE_INSTANCES = true`. + +**Modifiers:** `static` + +#### Signature + +```typescript +getParameterSchema(): Record +``` + +#### Returns + +`Record` — Record mapping parameter names to their schema entries. + +#### Source + +[`src/skills/builtin/web_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/web_search.ts) + +Line 228. + +*** + +### getPromptSections + +Get prompt sections to inject into the agent's system prompt. +Respects the `skip_prompt` config option — returns `[]` if set to `true`. +Subclasses should override `_getPromptSections()` instead of this method. + +#### Signature + +```typescript +getPromptSections(): SkillPromptSection[] +``` + +#### Returns + +`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 382. + +*** + +### getSkillData + +Read this skill's data from a raw call data object's global\_data. + +#### Signature + +```typescript +getSkillData(rawData: Record): Record +``` + +#### Parameters + + + The raw request data containing global\_data. + + +#### Returns + +`Record` — The skill's stored data, or an empty object if not found. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 450. + +*** + +### getSkillNamespace + +Get the namespaced key for storing per-skill data in global\_data. + +#### Signature + +```typescript +getSkillNamespace(): string +``` + +#### Returns + +`string` — A string like "skill:datetime" or "skill:my\_prefix". + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 440. + +*** + +### getTools + +#### Signature + +```typescript +getTools(): SkillToolDefinition[] +``` + +#### Returns + +`SkillToolDefinition[]` — A single tool (named via `tool_name`) that performs a Google Custom Search and returns formatted results. + +#### Source + +[`src/skills/builtin/web_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/web_search.ts) + +Line 416. + +*** + +### hasAllEnvVars + +Check if all required environment variables are present. +Convenience wrapper around `validateEnvVars()` that returns a boolean, +matching the Python `validate_env_vars() -> bool` return type. + +#### Signature + +```typescript +hasAllEnvVars(): boolean +``` + +#### Returns + +`boolean` — `true` if all required env vars are set, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 544. + +*** + +### hasAllPackages + +Check if all required packages declared in the manifest are available. +Convenience wrapper around `validatePackages()` that returns a boolean, +matching the Python `validate_packages() -> bool` return type. + +#### Signature + +```typescript +hasAllPackages(): Promise +``` + +#### Returns + +`Promise` — `true` if all required packages are importable, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 579. + +*** + +### isInitialized + +Check if the skill has been initialized by the SkillManager. + +#### Signature + +```typescript +isInitialized(): boolean +``` + +#### Returns + +`boolean` — True if setup() has completed and the skill is marked initialized. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 507. + +*** + +### markInitialized + +Mark the skill as initialized (called by SkillManager). + +#### Signature + +```typescript +markInitialized(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 514. + +*** + +### setAgent + +Set the agent reference for this skill. +Called by the SkillManager/AgentBase when the skill is attached to an agent. +Python equivalent: `self.agent = agent` in `__init__`. + +#### Signature + +```typescript +setAgent(agent: AgentBase): void +``` + +#### Parameters + + + The agent that owns this skill. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 534. + +*** + +### setup + +Validate required credentials before the skill becomes active. + +Mirrors Python's `setup()` (skill.py:559-600) which checks `api_key` and +`search_engine_id` and returns `False` (logging an error) if either is +absent. In the TS SDK credentials may also arrive via environment variables +(`GOOGLE_SEARCH_API_KEY` / `GOOGLE_SEARCH_ENGINE_ID` or the legacy alias +`GOOGLE_SEARCH_CX`), so both config params and env vars are checked. + +#### Signature + +```typescript +setup(): Promise +``` + +#### Returns + +`Promise` — `true` if all required credentials are present, `false` otherwise. + +#### Source + +[`src/skills/builtin/web_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/web_search.ts) + +Line 367. + +*** + +### updateSkillData + +Update this skill's namespaced data on a FunctionResult via updateGlobalData. + +#### Signature + +```typescript +updateSkillData( + result: FunctionResult, + data: Record +): FunctionResult +``` + +#### Parameters + + + The FunctionResult to update. + + + + The data to store under this skill's namespace. + + +#### Returns + +`FunctionResult` — The FunctionResult for chaining. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 462. + +*** + +### validateEnvVars + +Validate that all required environment variables declared on the skill class +are set in the current process environment. + +Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` +directly. TS reads the same static from the class. + +Returns the list of missing variable names so callers can produce actionable +error messages. This differs from Python's `validate_env_vars() -> bool` +return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/agents/skills/builtin/web-search/web-search-skill#has-all-env-vars) is the boolean equivalent. + +#### Signature + +```typescript +validateEnvVars(): string[] +``` + +#### Returns + +`string[]` — Array of missing environment variable names (empty if all are present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 486. + +*** + +### validatePackages + +Validate that all required packages declared on the skill class can be imported. + +Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` +directly and tries `importlib.import_module(pkg)` for each; TS does the +equivalent with a dynamic `import()`. + +#### Signature + +```typescript +validatePackages(): Promise +``` + +#### Returns + +`Promise` — Array of package names that could not be imported (empty if all present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 557. + +## Source + +[`src/skills/builtin/web_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/web_search.ts) + +Line 215. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/wikipedia-search/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/wikipedia-search/index.mdx new file mode 100644 index 0000000000..95424165e2 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/skills/builtin/wikipedia-search/index.mdx @@ -0,0 +1,63 @@ +--- +slug: "/reference/typescript/agents/skills/builtin/wikipedia-search" +title: "wikipedia_search" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "skills.builtin.wikipedia_search" + parent: "skills.builtin" + module: "agents.skills.builtin" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/wikipedia_search.ts" +--- +# `wikipedia_search` + +## Signature + +```typescript +module wikipedia_search +``` + +## Classes + + + + Searches Wikipedia for article summaries and extracts. + + + +## Functions + +### createSkill + +Factory function for creating WikipediaSearchSkill instances. + +#### Signature + +```typescript +createSkill(config?: SkillConfig): WikipediaSearchSkill +``` + +#### Parameters + + + Optional skill configuration. + + +#### Returns + +`WikipediaSearchSkill` — A new WikipediaSearchSkill instance. + +#### Source + +[`src/skills/builtin/wikipedia_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/wikipedia_search.ts) + +Line 318. + +## Source + +[`src/skills/builtin/wikipedia_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/wikipedia_search.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/wikipedia-search/wikipedia-search-skill/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/wikipedia-search/wikipedia-search-skill/index.mdx new file mode 100644 index 0000000000..17f86e9906 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/skills/builtin/wikipedia-search/wikipedia-search-skill/index.mdx @@ -0,0 +1,758 @@ +--- +slug: "/reference/typescript/agents/skills/builtin/wikipedia-search/wikipedia-search-skill" +title: "WikipediaSearchSkill" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "skills.builtin.wikipedia_search.WikipediaSearchSkill" + parent: "skills.builtin.wikipedia_search" + module: "agents.skills.builtin.wikipedia_search" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/wikipedia_search.ts" +--- +# `WikipediaSearchSkill` + +Searches Wikipedia for article summaries and extracts. + +Tier 3 built-in skill with no external API key required. The configured +`num_results` drives how many articles are aggregated; `no_results_message` +customizes the fallback text (supports `{query}` interpolation). + +## Signature + +```typescript +class WikipediaSearchSkill extends SkillBase +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/agents/skills/skill-base) + +## Examples + +```typescript +agent.addSkill('wikipedia_search', { num_results: 2 }); +``` + +## Properties + + + Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. + + + + Configuration options provided at construction time. + + + + Unique identifier for this skill instance (includes timestamp and random bytes). + + + + Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. + + + + Resolved `no_results_message` template (populated in `setup()`). Protected to mirror Python's `self.no_results_message` public visibility within the class hierarchy. + + + + Resolved `num_results` value (populated in `setup()`). Public to mirror Python's `self.num_results` — accessible to subclasses and external test code inspecting skill state. + + + + Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. + + + + Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. + + + + Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. + + + + Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. + + + + Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. + + + + The registered name of this skill type. + + + + Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. + + + + Additional SWAIG fields extracted from config, merged into tool definitions. + + +## Methods + +### cleanup + +Cleanup resources. Called when the skill is removed from an agent. + +#### Signature + +```typescript +cleanup(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 469. + +*** + +### constructor + +Create a new skill instance. + +Python parity: `core/skill_base.py:32-43`. +Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` +is left as `None` on the subclass. TS throws the equivalent when the static +defaults haven't been overridden. + +#### Signature + +```typescript +constructor(config?: SkillConfig): WikipediaSearchSkill +``` + +#### Parameters + + + Optional configuration key-value pairs (Python: `params`). + + +#### Returns + +`WikipediaSearchSkill` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 282. + +*** + +### defineTool + +Imperatively register a tool with this skill. + +Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. +Merges `this.swaigFields` into the tool definition (explicit fields on +`toolDef` take precedence), then pushes the result into `_dynamicTools` +so the default `getTools()` returns it at SWML render time. + +Intended for skills whose tool shape depends on config evaluated at +`setup()` time. Skills with a static tool list should override +`getTools()` instead. + +#### Signature + +```typescript +defineTool(toolDef: SkillToolDefinition): void +``` + +#### Parameters + + + The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 351. + +*** + +### getAgent + +Return the agent that owns this skill, asserting it is non-null. +Equivalent to accessing `self.agent` in Python, where the agent reference +is always set before `setup()` is called. + +The SkillManager lifecycle guarantees that `setAgent()` is called before +`setup()`, so this method is safe to use inside `setup()` and in any +tool handler invoked during an active agent session. + +#### Signature + +```typescript +getAgent(): AgentBase +``` + +#### Returns + +`AgentBase` — The owning `AgentBase` instance. + +#### Throws + +- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 261. + +*** + +### getConfig + +Get a configuration value by key, falling back to a default if not set. + +#### Signature + +```typescript +getConfig(key: string, defaultValue?: T): T +``` + +#### Type Parameters + + + +#### Parameters + + + The configuration key to look up. + + + + Value to return if the key is not present. + + +#### Returns + +`T` — The configuration value cast to type T, or the default value. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 524. + +*** + +### getDataMapTools + +Optional DataMap-style tool definitions. Skills that build their own +SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them +here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. + +Python equivalent: the direct `self.agent.register_swaig_function(fn)` +call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). +Default returns `[]` — skills using only the declarative `getTools()` path +do not need to override this. + +#### Signature + +```typescript +getDataMapTools(): Record[] +``` + +#### Returns + +`Record[]` — Array of fully-built SWAIG function dicts. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 372. + +*** + +### getGlobalData + +Get global data to merge into the agent's global data store. + +#### Signature + +```typescript +getGlobalData(): Record +``` + +#### Returns + +`Record` — Key-value pairs to be merged into the agent's global data. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 410. + +*** + +### getHints + +Get speech recognition hints relevant to this skill. + +#### Signature + +```typescript +getHints(): string[] +``` + +#### Returns + +`string[]` — Array of hint strings to improve speech recognition accuracy. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 402. + +*** + +### getInstanceKey + +Get the instance key used for deduplication in the SkillManager. + +For single-instance skills (`SUPPORTS_MULTIPLE_INSTANCES = false`), returns +the skill name. For multi-instance skills, returns `${skillName}_${toolName}` +using the `tool_name` config (falls back to the skill name). + +Matches Python's `SkillBase.get_instance_key()` default (`skill_base.py:141-146`). +Multi-instance subclasses only need to override when their key derivation +depends on config beyond `tool_name`. + +#### Signature + +```typescript +getInstanceKey(): string +``` + +#### Returns + +`string` — A unique key identifying this skill instance. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 427. + +*** + +### getParameterSchema + +Get the parameter schema for this skill class, describing all accepted configuration options. +Subclasses should override and call `super.getParameterSchema()` to include base parameters. + +Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): +returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a +`tool_name` entry with `default: cls.SKILL_NAME` for classes with +`SUPPORTS_MULTIPLE_INSTANCES = true`. + +**Modifiers:** `static` + +#### Signature + +```typescript +getParameterSchema(): Record +``` + +#### Returns + +`Record` — Record mapping parameter names to their schema entries. + +#### Source + +[`src/skills/builtin/wikipedia_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/wikipedia_search.ts) + +Line 79. + +*** + +### getPromptSections + +Get prompt sections to inject into the agent's system prompt. +Respects the `skip_prompt` config option — returns `[]` if set to `true`. +Subclasses should override `_getPromptSections()` instead of this method. + +#### Signature + +```typescript +getPromptSections(): SkillPromptSection[] +``` + +#### Returns + +`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 382. + +*** + +### getSkillData + +Read this skill's data from a raw call data object's global\_data. + +#### Signature + +```typescript +getSkillData(rawData: Record): Record +``` + +#### Parameters + + + The raw request data containing global\_data. + + +#### Returns + +`Record` — The skill's stored data, or an empty object if not found. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 450. + +*** + +### getSkillNamespace + +Get the namespaced key for storing per-skill data in global\_data. + +#### Signature + +```typescript +getSkillNamespace(): string +``` + +#### Returns + +`string` — A string like "skill:datetime" or "skill:my\_prefix". + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 440. + +*** + +### getTools + +#### Signature + +```typescript +getTools(): SkillToolDefinition[] +``` + +#### Returns + +`SkillToolDefinition[]` — A `search_wiki` tool that fetches article summaries from Wikipedia. + +#### Source + +[`src/skills/builtin/wikipedia_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/wikipedia_search.ts) + +Line 122. + +*** + +### hasAllEnvVars + +Check if all required environment variables are present. +Convenience wrapper around `validateEnvVars()` that returns a boolean, +matching the Python `validate_env_vars() -> bool` return type. + +#### Signature + +```typescript +hasAllEnvVars(): boolean +``` + +#### Returns + +`boolean` — `true` if all required env vars are set, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 544. + +*** + +### hasAllPackages + +Check if all required packages declared in the manifest are available. +Convenience wrapper around `validatePackages()` that returns a boolean, +matching the Python `validate_packages() -> bool` return type. + +#### Signature + +```typescript +hasAllPackages(): Promise +``` + +#### Returns + +`Promise` — `true` if all required packages are importable, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 579. + +*** + +### isInitialized + +Check if the skill has been initialized by the SkillManager. + +#### Signature + +```typescript +isInitialized(): boolean +``` + +#### Returns + +`boolean` — True if setup() has completed and the skill is marked initialized. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 507. + +*** + +### markInitialized + +Mark the skill as initialized (called by SkillManager). + +#### Signature + +```typescript +markInitialized(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 514. + +*** + +### searchWiki + +Search Wikipedia and return a formatted text summary. + +Mirrors the Python `search_wiki()` public entry point so the logic can be +tested and reused outside the SWAIG handler. Uses `num_results` to decide +how many articles to aggregate. + +#### Signature + +```typescript +searchWiki(query: string): Promise +``` + +#### Parameters + + + Plain-text search term. + + +#### Returns + +`Promise` — Formatted text ready for display to the caller. + +#### Source + +[`src/skills/builtin/wikipedia_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/wikipedia_search.ts) + +Line 166. + +*** + +### setAgent + +Set the agent reference for this skill. +Called by the SkillManager/AgentBase when the skill is attached to an agent. +Python equivalent: `self.agent = agent` in `__init__`. + +#### Signature + +```typescript +setAgent(agent: AgentBase): void +``` + +#### Parameters + + + The agent that owns this skill. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 534. + +*** + +### setup + +Extract config values into instance state. Enforces `num_results >= 1` +(matching Python `skill.py:_setup` `max(1, ...)` floor). The schema's +`max: 5` handles the upper bound at validation time — no runtime clamp +here, so callers passing larger values get the raw value as in Python. + +#### Signature + +```typescript +setup(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/skills/builtin/wikipedia_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/wikipedia_search.ts) + +Line 103. + +*** + +### updateSkillData + +Update this skill's namespaced data on a FunctionResult via updateGlobalData. + +#### Signature + +```typescript +updateSkillData( + result: FunctionResult, + data: Record +): FunctionResult +``` + +#### Parameters + + + The FunctionResult to update. + + + + The data to store under this skill's namespace. + + +#### Returns + +`FunctionResult` — The FunctionResult for chaining. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 462. + +*** + +### validateEnvVars + +Validate that all required environment variables declared on the skill class +are set in the current process environment. + +Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` +directly. TS reads the same static from the class. + +Returns the list of missing variable names so callers can produce actionable +error messages. This differs from Python's `validate_env_vars() -> bool` +return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/agents/skills/builtin/wikipedia-search/wikipedia-search-skill#has-all-env-vars) is the boolean equivalent. + +#### Signature + +```typescript +validateEnvVars(): string[] +``` + +#### Returns + +`string[]` — Array of missing environment variable names (empty if all are present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 486. + +*** + +### validatePackages + +Validate that all required packages declared on the skill class can be imported. + +Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` +directly and tries `importlib.import_module(pkg)` for each; TS does the +equivalent with a dynamic `import()`. + +#### Signature + +```typescript +validatePackages(): Promise +``` + +#### Returns + +`Promise` — Array of package names that could not be imported (empty if all present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 557. + +## Source + +[`src/skills/builtin/wikipedia_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/wikipedia_search.ts) + +Line 55. diff --git a/fern/products/sdk-reference/typescript/agents/skills/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/index.mdx new file mode 100644 index 0000000000..4cadd08b5f --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/skills/index.mdx @@ -0,0 +1,55 @@ +--- +slug: "/reference/typescript/agents/skills" +title: "skills" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "skills" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/index.ts" +--- +# `skills` + +## Signature + +```typescript +module skills +``` + +## Classes + + + + Abstract base class for agent skills. + + + + Manages the lifecycle of skills attached to an agent. + + + + Global singleton registry for registering and instantiating skills. + + + +## Modules + + + + + + + + + + + +## Source + +[`src/skills/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/index.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/agents/skills/skill-base/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/skill-base/index.mdx new file mode 100644 index 0000000000..4781f149b9 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/skills/skill-base/index.mdx @@ -0,0 +1,757 @@ +--- +slug: "/reference/typescript/agents/skills/skill-base" +title: "SkillBase" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "skills.SkillBase" + parent: "skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts" +--- +# `SkillBase` + +Abstract base class for agent skills. + +Skills are modular, reusable capabilities that plug into an [AgentBase](/docs/sdk-reference/reference/typescript/agents/agent-base). +A single skill can contribute: + +- **Tools** (SWAIG functions) via `getTools()` or `defineTool()` +- **Prompt sections** via `_getPromptSections()` +- **Speech hints** via `getHints()` +- **Global data** seeded into each call via `getGlobalData()` + +Skills are added to an agent with `agent.addSkill('name', config)` and the +[SkillManager](/docs/sdk-reference/reference/typescript/agents/skills/skill-manager) calls `setAgent()` + `setup()` in sequence before the +agent starts serving requests. + +**Modifiers:** `abstract` + +## Signature + +```typescript +class SkillBase +``` + +## Examples + +```typescript +import { SkillBase, FunctionResult, type SkillToolDefinition } from '@signalwire/sdk'; + +export class GreetingSkill extends SkillBase { + static override SKILL_NAME = 'greeting'; + static override SKILL_DESCRIPTION = 'Responds with a configurable greeting.'; + + override getTools(): SkillToolDefinition[] { + return [{ + name: 'say_hello', + description: 'Say a friendly hello.', + parameters: { type: 'object', properties: {} }, + handler: () => new FunctionResult(this.getConfig('message', 'Hi!')), + }]; + } +} + +// In your agent: +agent.addSkill(new GreetingSkill({ message: 'Howdy!' })); +``` + +## See Also + +- \- \[SkillManager]\(/docs/sdk-reference/reference/typescript/agents/skills/skill-manager) + \- \[SkillRegistry]\(/docs/sdk-reference/reference/typescript/agents/skills/skill-registry) + \- \[AgentBase.addSkill]\(/docs/sdk-reference/reference/typescript/agents/agent-base#add-skill) + +## Properties + + + Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. + + + + Configuration options provided at construction time. + + + + Unique identifier for this skill instance (includes timestamp and random bytes). + + + + Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. + + + + Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. + + + + Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. + + + + Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. + + + + Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. + + + + Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. + + + + The registered name of this skill type. + + + + Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. + + + + Additional SWAIG fields extracted from config, merged into tool definitions. + + +## Methods + +### cleanup + +Cleanup resources. Called when the skill is removed from an agent. + +#### Signature + +```typescript +cleanup(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 469. + +*** + +### constructor + +Create a new skill instance. + +Python parity: `core/skill_base.py:32-43`. +Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` +is left as `None` on the subclass. TS throws the equivalent when the static +defaults haven't been overridden. + +#### Signature + +```typescript +constructor(config?: SkillConfig): SkillBase +``` + +#### Parameters + + + Optional configuration key-value pairs (Python: `params`). + + +#### Returns + +`SkillBase` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 282. + +*** + +### defineTool + +Imperatively register a tool with this skill. + +Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. +Merges `this.swaigFields` into the tool definition (explicit fields on +`toolDef` take precedence), then pushes the result into `_dynamicTools` +so the default `getTools()` returns it at SWML render time. + +Intended for skills whose tool shape depends on config evaluated at +`setup()` time. Skills with a static tool list should override +`getTools()` instead. + +#### Signature + +```typescript +defineTool(toolDef: SkillToolDefinition): void +``` + +#### Parameters + + + The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 351. + +*** + +### getAgent + +Return the agent that owns this skill, asserting it is non-null. +Equivalent to accessing `self.agent` in Python, where the agent reference +is always set before `setup()` is called. + +The SkillManager lifecycle guarantees that `setAgent()` is called before +`setup()`, so this method is safe to use inside `setup()` and in any +tool handler invoked during an active agent session. + +#### Signature + +```typescript +getAgent(): AgentBase +``` + +#### Returns + +`AgentBase` — The owning `AgentBase` instance. + +#### Throws + +- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 261. + +*** + +### getConfig + +Get a configuration value by key, falling back to a default if not set. + +#### Signature + +```typescript +getConfig(key: string, defaultValue?: T): T +``` + +#### Type Parameters + + + +#### Parameters + + + The configuration key to look up. + + + + Value to return if the key is not present. + + +#### Returns + +`T` — The configuration value cast to type T, or the default value. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 524. + +*** + +### getDataMapTools + +Optional DataMap-style tool definitions. Skills that build their own +SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them +here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. + +Python equivalent: the direct `self.agent.register_swaig_function(fn)` +call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). +Default returns `[]` — skills using only the declarative `getTools()` path +do not need to override this. + +#### Signature + +```typescript +getDataMapTools(): Record[] +``` + +#### Returns + +`Record[]` — Array of fully-built SWAIG function dicts. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 372. + +*** + +### getGlobalData + +Get global data to merge into the agent's global data store. + +#### Signature + +```typescript +getGlobalData(): Record +``` + +#### Returns + +`Record` — Key-value pairs to be merged into the agent's global data. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 410. + +*** + +### getHints + +Get speech recognition hints relevant to this skill. + +#### Signature + +```typescript +getHints(): string[] +``` + +#### Returns + +`string[]` — Array of hint strings to improve speech recognition accuracy. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 402. + +*** + +### getInstanceKey + +Get the instance key used for deduplication in the SkillManager. + +For single-instance skills (`SUPPORTS_MULTIPLE_INSTANCES = false`), returns +the skill name. For multi-instance skills, returns `${skillName}_${toolName}` +using the `tool_name` config (falls back to the skill name). + +Matches Python's `SkillBase.get_instance_key()` default (`skill_base.py:141-146`). +Multi-instance subclasses only need to override when their key derivation +depends on config beyond `tool_name`. + +#### Signature + +```typescript +getInstanceKey(): string +``` + +#### Returns + +`string` — A unique key identifying this skill instance. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 427. + +*** + +### getParameterSchema + +Get the parameter schema for this skill class, describing all accepted configuration options. +Subclasses should override and call `super.getParameterSchema()` to include base parameters. + +Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): +returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a +`tool_name` entry with `default: cls.SKILL_NAME` for classes with +`SUPPORTS_MULTIPLE_INSTANCES = true`. + +**Modifiers:** `static` + +#### Signature + +```typescript +getParameterSchema(): Record +``` + +#### Returns + +`Record` — Record mapping parameter names to their schema entries. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 183. + +*** + +### getPromptSections + +Get prompt sections to inject into the agent's system prompt. +Respects the `skip_prompt` config option — returns `[]` if set to `true`. +Subclasses should override `_getPromptSections()` instead of this method. + +#### Signature + +```typescript +getPromptSections(): SkillPromptSection[] +``` + +#### Returns + +`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 382. + +*** + +### getSkillData + +Read this skill's data from a raw call data object's global\_data. + +#### Signature + +```typescript +getSkillData(rawData: Record): Record +``` + +#### Parameters + + + The raw request data containing global\_data. + + +#### Returns + +`Record` — The skill's stored data, or an empty object if not found. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 450. + +*** + +### getSkillNamespace + +Get the namespaced key for storing per-skill data in global\_data. + +#### Signature + +```typescript +getSkillNamespace(): string +``` + +#### Returns + +`string` — A string like "skill:datetime" or "skill:my\_prefix". + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 440. + +*** + +### getTools + +Return the SWAIG tool definitions this skill provides. + +Default implementation returns tools registered imperatively via +`defineTool()`. Skills using the declarative pattern override this +method to return a static array built from their config. + +Python parity: replaces the `@abstractmethod register_tools()` contract +— Python skills call `self.define_tool(...)` inside `register_tools()`; +TypeScript skills either call `this.defineTool(...)` in `setup()` (and +let the default `getTools()` return them) or override `getTools()` +directly. + +#### Signature + +```typescript +getTools(): SkillToolDefinition[] +``` + +#### Returns + +`SkillToolDefinition[]` — Array of tool definitions to register with the agent. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 332. + +*** + +### hasAllEnvVars + +Check if all required environment variables are present. +Convenience wrapper around `validateEnvVars()` that returns a boolean, +matching the Python `validate_env_vars() -> bool` return type. + +#### Signature + +```typescript +hasAllEnvVars(): boolean +``` + +#### Returns + +`boolean` — `true` if all required env vars are set, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 544. + +*** + +### hasAllPackages + +Check if all required packages declared in the manifest are available. +Convenience wrapper around `validatePackages()` that returns a boolean, +matching the Python `validate_packages() -> bool` return type. + +#### Signature + +```typescript +hasAllPackages(): Promise +``` + +#### Returns + +`Promise` — `true` if all required packages are importable, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 579. + +*** + +### isInitialized + +Check if the skill has been initialized by the SkillManager. + +#### Signature + +```typescript +isInitialized(): boolean +``` + +#### Returns + +`boolean` — True if setup() has completed and the skill is marked initialized. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 507. + +*** + +### markInitialized + +Mark the skill as initialized (called by SkillManager). + +#### Signature + +```typescript +markInitialized(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 514. + +*** + +### setAgent + +Set the agent reference for this skill. +Called by the SkillManager/AgentBase when the skill is attached to an agent. +Python equivalent: `self.agent = agent` in `__init__`. + +#### Signature + +```typescript +setAgent(agent: AgentBase): void +``` + +#### Parameters + + + The agent that owns this skill. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 534. + +*** + +### setup + +Setup the skill. Called when the skill is added to an agent. +Override to perform initialization (API connections, config validation, etc.) + +#### Signature + +```typescript +setup(): Promise +``` + +#### Returns + +`Promise` — `true` if setup succeeded, `false` otherwise. Python equivalent: abstract `setup() -> bool`. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 313. + +*** + +### updateSkillData + +Update this skill's namespaced data on a FunctionResult via updateGlobalData. + +#### Signature + +```typescript +updateSkillData( + result: FunctionResult, + data: Record +): FunctionResult +``` + +#### Parameters + + + The FunctionResult to update. + + + + The data to store under this skill's namespace. + + +#### Returns + +`FunctionResult` — The FunctionResult for chaining. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 462. + +*** + +### validateEnvVars + +Validate that all required environment variables declared on the skill class +are set in the current process environment. + +Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` +directly. TS reads the same static from the class. + +Returns the list of missing variable names so callers can produce actionable +error messages. This differs from Python's `validate_env_vars() -> bool` +return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/agents/skills/skill-base#has-all-env-vars) is the boolean equivalent. + +#### Signature + +```typescript +validateEnvVars(): string[] +``` + +#### Returns + +`string[]` — Array of missing environment variable names (empty if all are present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 486. + +*** + +### validatePackages + +Validate that all required packages declared on the skill class can be imported. + +Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` +directly and tries `importlib.import_module(pkg)` for each; TS does the +equivalent with a dynamic `import()`. + +#### Signature + +```typescript +validatePackages(): Promise +``` + +#### Returns + +`Promise` — Array of package names that could not be imported (empty if all present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 557. + +## Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 125. diff --git a/fern/products/sdk-reference/typescript/agents/skills/skill-base/index__2.mdx b/fern/products/sdk-reference/typescript/agents/skills/skill-base/index__2.mdx new file mode 100644 index 0000000000..db801ae293 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/skills/skill-base/index__2.mdx @@ -0,0 +1,188 @@ +--- +slug: "/reference/typescript/agents/skills/skill-base/index__2" +title: "SkillBase" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "agents.skills.SkillBase" + parent: "skills" + module: "agents.skills" +--- +# `SkillBase` + +## Interfaces + +### ParameterSchemaEntry + +Schema entry describing a single skill configuration parameter. + +#### Signature + +```typescript +interface ParameterSchemaEntry +``` + +#### Properties + + + Default value used when the parameter is not provided. + + + + Human-readable description of the parameter. + + + + Allowed values for the parameter. + + + + Environment variable that can supply this parameter's value. + + + + Whether the parameter should be hidden from user-facing output (e.g., API keys). + + + + Item schema for array-type parameters. + + + + Maximum value (for numeric types). + + + + Minimum value (for numeric types). + + + + Whether the parameter must be supplied. + + + + JSON Schema type of the parameter value. + + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 61. + +*** + +### SkillConfig + +Configuration key-value pairs passed to a skill at construction time. + +#### Signature + +```typescript +interface SkillConfig +``` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 15. + +*** + +### SkillPromptSection + +A section of prompt content injected into the agent's system prompt by a skill. + +#### Signature + +```typescript +interface SkillPromptSection +``` + +#### Properties + + + Optional body text for the section. + + + + Optional bullet points appended after the body. + + + + If true, render bullets as a numbered list instead of unordered. + + + + Section heading displayed in the prompt. + + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 49. + +*** + +### SkillToolDefinition + +Definition of a SWAIG tool provided by a skill. + +#### Signature + +```typescript +interface SkillToolDefinition +``` + +#### Properties + + + Human-readable description of what the tool does, shown to the AI. + + + + Filler phrases spoken while the tool executes, keyed by language. + + + + Handler function invoked when the tool is called. + + + + When true, the SignalWire platform automatically invokes this tool when the call ends (hangup), regardless of whether the AI explicitly calls it. Equivalent to Python's `is_hangup_hook=True` in `define_tool()`. The flag is serialised as `"is_hangup_hook": true` in the SWAIG JSON. + + + + Unique tool name used in SWAIG function registration. + + + + Parameter schema for the tool, keyed by parameter name. + + + + List of parameter names that are required. + + + + Whether the tool requires secure (authenticated) invocation. + + + + If true, suppress filler phrases while the tool executes. + + + + If true, wait for any in-flight fillers to complete before executing the tool. + + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 20. diff --git a/fern/products/sdk-reference/typescript/agents/skills/skill-manager/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/skill-manager/index.mdx new file mode 100644 index 0000000000..8a5123f277 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/skills/skill-manager/index.mdx @@ -0,0 +1,532 @@ +--- +slug: "/reference/typescript/agents/skills/skill-manager" +title: "SkillManager" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "skills.SkillManager" + parent: "skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillManager.ts" +--- +# `SkillManager` + +Manages the lifecycle of skills attached to an agent. + +Handles loading, unloading, validation, and aggregation of skill tools, +hints, global data, and prompt sections. + +**Remarks:** **Architectural note — push vs pull model:** +Python's `SkillManager.__init__(self, agent)` stores the agent reference and +uses a **push model**: when a skill is loaded via `load_skill()`, the manager +immediately calls `agent.add_hints()`, `agent.update_global_data()`, and +`agent.prompt_add_section()` to inject skill data into the agent. + +This TypeScript implementation uses a **pull model** instead: `SkillManager` +has no agent reference and no constructor. `AgentBase` owns the manager and +calls `getAllHints()`, `getMergedGlobalData()`, and `getAllPromptSections()` +at render time. Both approaches produce the same observable behavior at the +SWML / SWAIG level. The pull model avoids circular-reference issues between +`AgentBase` and `SkillManager` and is better suited to TypeScript's +import-graph constraints. + +## Signature + +```typescript +class SkillManager +``` + +## Properties + + + Public read-only view of all loaded skill instances, keyed by instance key. Python equivalent: `self.loaded_skills` (public `Dict[str, SkillBase]`). Use this to iterate or inspect loaded skills without mutating the internal map. + + + + Get the number of currently loaded skill instances. + + +## Methods + +### addSkill + +Add a skill to the manager, validating env vars and calling setup(). +Uses the skill's instance key for deduplication. + +[loadSkill](/docs/sdk-reference/reference/typescript/agents/skills/skill-manager#load-skill) / [loadSkillByName](/docs/sdk-reference/reference/typescript/agents/skills/skill-manager#load-skill-by-name) wrap this and catch to return +`[false, msg]`, matching Python `load_skill`'s return contract +(`skill_manager.py` lines 114-118). + +#### Signature + +```typescript +addSkill(skill: SkillBase): Promise +``` + +#### Parameters + + + The skill instance to add. + + +#### Returns + +`Promise` — Resolves once the skill is registered. + +#### Throws + +- When a single-instance skill is already loaded, its required environment variables are missing, its parameter schema is empty, its required packages cannot be imported, or `setup()` returns `false`. + +#### Source + +[`src/skills/SkillManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillManager.ts) + +Line 74. + +*** + +### clear + +Remove all skills and clean up. + +#### Signature + +```typescript +clear(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/skills/SkillManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillManager.ts) + +Line 412. + +*** + +### constructor + +#### Signature + +```typescript +constructor(): SkillManager +``` + +#### Returns + +`SkillManager` + +*** + +### getAllHints + +Aggregate speech recognition hints from all loaded skills. + +#### Signature + +```typescript +getAllHints(): string[] +``` + +#### Returns + +`string[]` — Combined array of all skill hint strings. + +#### Source + +[`src/skills/SkillManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillManager.ts) + +Line 369. + +*** + +### getAllPromptSections + +Aggregate prompt sections from all loaded skills. + +#### Signature + +```typescript +getAllPromptSections(): SkillPromptSection[] +``` + +#### Returns + +`SkillPromptSection[]` — Combined array of all skill prompt sections. + +#### Source + +[`src/skills/SkillManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillManager.ts) + +Line 357. + +*** + +### getAllTools + +Aggregate tool definitions from all loaded skills. + +#### Signature + +```typescript +getAllTools(): SkillToolDefinition[] +``` + +#### Returns + +`SkillToolDefinition[]` — Combined array of all skill tool definitions. + +#### Source + +[`src/skills/SkillManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillManager.ts) + +Line 345. + +*** + +### getLoadedSkillEntries + +Get metadata for all loaded skills, enabling ephemeral copy re-instantiation. + +#### Signature + +```typescript +getLoadedSkillEntries(): { config: SkillConfig; SkillClass: typeof SkillBase; skillName: string }[] +``` + +#### Returns + +`{ config: SkillConfig; SkillClass: typeof SkillBase; skillName: string }[]` — Array of entries containing skill name, class constructor, and config. + +#### Source + +[`src/skills/SkillManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillManager.ts) + +Line 401. + +*** + +### getMergedGlobalData + +Merge global data from all loaded skills into a single object. + +#### Signature + +```typescript +getMergedGlobalData(): Record +``` + +#### Returns + +`Record` — Combined global data (later skills override earlier ones on key conflicts). + +#### Source + +[`src/skills/SkillManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillManager.ts) + +Line 381. + +*** + +### getSkill + +Get a skill by its instance key or instance ID. + +#### Signature + +```typescript +getSkill(keyOrId: string): SkillBase | undefined +``` + +#### Parameters + + + The instance key or instance ID to look up. + + +#### Returns + +`SkillBase | undefined` — The skill instance, or undefined if not found. + +#### Source + +[`src/skills/SkillManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillManager.ts) + +Line 319. + +*** + +### hasSkill + +Check if any skill instance with the given name is currently loaded. + +#### Signature + +```typescript +hasSkill(skillName: string): boolean +``` + +#### Parameters + + + The skill name to check for. + + +#### Returns + +`boolean` — True if at least one instance with this name is loaded. + +#### Source + +[`src/skills/SkillManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillManager.ts) + +Line 196. + +*** + +### hasSkillByKey + +Check if a skill with the given instance key is currently loaded. +This matches Python's `has_skill` semantics, which performs a direct +dictionary key lookup (`skill_identifier in self.loaded_skills`). + +Use `hasSkill(name)` to check by skill name (iterates values). +Use `hasSkillByKey(key)` to check by instance key (direct map lookup). + +**Remarks:** Equivalent to Python's `has_skill(skill_identifier)`. Callers porting +from Python should change `skill_manager.has_skill(key)` → +`skillManager.hasSkillByKey(key)`. + +#### Signature + +```typescript +hasSkillByKey(instanceKey: string): boolean +``` + +#### Parameters + + + The instance key to look up. + + +#### Returns + +`boolean` — True if a skill with this exact instance key is loaded. + +#### Source + +[`src/skills/SkillManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillManager.ts) + +Line 218. + +*** + +### listSkillKeys + +List the instance keys of all currently loaded skills. +Python equivalent: `list_loaded_skills() -> List[str]` which returns +`list(self.loaded_skills.keys())`. + +Use `listSkills()` for richer objects (name, instanceId, initialized). +Use `listSkillKeys()` for a flat list of instance key strings. + +**Remarks:** Equivalent to Python's `list_loaded_skills()`. Callers porting from +Python should change `skill_manager.list_loaded_skills()` → +`skillManager.listSkillKeys()`. + +#### Signature + +```typescript +listSkillKeys(): string[] +``` + +#### Returns + +`string[]` — Array of instance key strings. + +#### Source + +[`src/skills/SkillManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillManager.ts) + +Line 310. + +*** + +### listSkills + +List all loaded skill instances with their name, ID, and initialization state. + +#### Signature + +```typescript +listSkills(): { initialized: boolean; instanceId: string; name: string }[] +``` + +#### Returns + +`{ initialized: boolean; instanceId: string; name: string }[]` — Array of skill summary objects. + +#### Source + +[`src/skills/SkillManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillManager.ts) + +Line 333. + +*** + +### loadSkill + +Load a skill by providing the class constructor directly, bypassing the registry. +This is the TypeScript equivalent of Python's `load_skill(skill_name, skill_class, params)` +path where a caller-provided `skill_class` is used instead of a registry lookup. + +**Remarks:** Equivalent to Python's `load_skill(skill_name, skill_class=MySkillClass, params)`. + +#### Signature + +```typescript +loadSkill( + skillClass: typeof SkillBase, + config?: SkillConfig +): Promise<[boolean, string]> +``` + +#### Parameters + + + The skill class constructor (a subclass of `SkillBase`). + + + + Optional configuration to pass to the skill constructor. + + +#### Returns + +`Promise<[boolean, string]>` — A tuple `[success, errorMessage]` matching Python's `load_skill` return contract. `errorMessage` is an empty string on success. + +#### Examples + +```typescript +const [ok, err] = await manager.loadSkill(MyCustomSkill, { api_key: 'secret' }); +if (!ok) console.error(err); +``` + +#### Source + +[`src/skills/SkillManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillManager.ts) + +Line 240. + +*** + +### loadSkillByName + +Load a skill by name from the global SkillRegistry, construct it, and add it. +This is the TypeScript equivalent of Python's `load_skill(skill_name)` path +where `skill_class=None` triggers a registry lookup. + +**Remarks:** Equivalent to Python's `load_skill(skill_name)` (registry path, where +`skill_class=None`). Callers porting from Python should change +`skill_manager.load_skill(name)` → `skillManager.loadSkillByName(name)`. + +#### Signature + +```typescript +loadSkillByName( + skillName: string, + config?: SkillConfig +): Promise<[boolean, string]> +``` + +#### Parameters + + + The registered skill name to look up in the SkillRegistry. + + + + Optional configuration to pass to the skill factory. + + +#### Returns + +`Promise<[boolean, string]>` — A tuple `[success, errorMessage]` matching Python's `load_skill` return contract. `errorMessage` is an empty string on success. + +#### Source + +[`src/skills/SkillManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillManager.ts) + +Line 270. + +*** + +### removeSkill + +Remove a skill by its instance key or instance ID, calling cleanup() before removal. + +**Remarks:** Equivalent to Python's `unload_skill(skill_identifier)`. Callers porting +from Python should change `skill_manager.unload_skill(id)` → +`skillManager.removeSkill(id)`. + +#### Signature + +```typescript +removeSkill(keyOrId: string): Promise +``` + +#### Parameters + + + The instance key or instance ID of the skill to remove. + + +#### Returns + +`Promise` — True if the skill was found and removed, false otherwise. + +#### Source + +[`src/skills/SkillManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillManager.ts) + +Line 148. + +*** + +### removeSkillByName + +Remove all skill instances matching a given skill name. + +#### Signature + +```typescript +removeSkillByName(skillName: string): Promise +``` + +#### Parameters + + + The skill name to match against. + + +#### Returns + +`Promise` — The number of skill instances removed. + +#### Source + +[`src/skills/SkillManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillManager.ts) + +Line 178. + +## Source + +[`src/skills/SkillManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillManager.ts) + +Line 45. diff --git a/fern/products/sdk-reference/typescript/agents/skills/skill-name/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/skill-name/index.mdx new file mode 100644 index 0000000000..80522440ad --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/skills/skill-name/index.mdx @@ -0,0 +1,94 @@ +--- +slug: "/reference/typescript/agents/skills/skill-name" +title: "SkillName" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "skills.SkillName" + parent: "skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillName.ts" +--- +# `SkillName` + +## Signature + +```typescript +module SkillName +``` + +## Type Aliases + +### SkillName + +Built-in skill names as a typed, compile-time-checked closed set. + +The 19 names below are exactly the `SKILL_NAME` declared by each built-in +skill class in `src/skills/builtin/` (the same set +[registerBuiltinSkills](/docs/sdk-reference/reference/typescript/agents/skills/builtin#register-builtin-skills) locks into the global `SkillRegistry`). + +[AgentBase.addSkillByName](/docs/sdk-reference/reference/typescript/agents/agent-base#add-skill-by-name) and [AgentBase.hasSkill](/docs/sdk-reference/reference/typescript/agents/agent-base#has-skill) accept this +union OR any string (`SkillName | (string & {})`): + +- The union gives editor autocompletion for the built-ins and makes a typo + (`'datetiem'`) a **compile-time** error rather than a runtime/server + failure. +- The `string & {}` arm widens the parameter back to `string` at the type + level, so it still accepts custom / third-party skill names AND keeps + parity with the Python reference (whose `add_skill` / `has_skill` take a + bare `str`). It is a no-op at runtime — TypeScript erases types, so the + value passed on the wire is the identical string either way. + +#### Signature + +```typescript +type SkillName = "api_ninjas_trivia" | "ask_claude" | "claude_skills" | "custom_skills" | "datasphere" | "datasphere_serverless" | "datetime" | "google_maps" | "info_gatherer" | "joke" | "math" | "mcp_gateway" | "native_vector_search" | "play_background_file" | "spider" | "swml_transfer" | "weather_api" | "web_search" | "wikipedia_search" +``` + +#### Examples + +```typescript +await agent.addSkillByName('datetime'); // autocompleted built-in +agent.hasSkill('datetime'); // true +await agent.addSkillByName('my_custom_one'); // open set: custom names OK +// await agent.addSkillByName('datetiem'); // ✗ compile error (typo) +``` + +#### Source + +[`src/skills/SkillName.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillName.ts) + +Line 28. + +*** + +### SkillNameOrString + +A skill-name parameter: one of the typed built-in [SkillName](/docs/sdk-reference/reference/typescript/agents/skills/skill-name#skill-name) values +(autocompleted + typo-checked) or any other string (custom / third-party +skills, and parity with Python's bare `str`). + +The `(string & {})` arm preserves string literal autocompletion for the +union members while still widening to accept arbitrary strings; it is purely +a type-level annotation and has no runtime effect. + +#### Signature + +```typescript +type SkillNameOrString = SkillName | string & object +``` + +#### Source + +[`src/skills/SkillName.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillName.ts) + +Line 58. + +## Source + +[`src/skills/SkillName.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillName.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/agents/skills/skill-registry/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/skill-registry/index.mdx new file mode 100644 index 0000000000..f50c3cfc6a --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/skills/skill-registry/index.mdx @@ -0,0 +1,599 @@ +--- +slug: "/reference/typescript/agents/skills/skill-registry" +title: "SkillRegistry" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "skills.SkillRegistry" + parent: "skills" + module: "agents.skills" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts" +--- +# `SkillRegistry` + +Global singleton registry for registering and instantiating skills. + +Skills can be registered programmatically via `register(SkillClass)`. +Matches Python's `skill_registry` global (`skills/registry.py:481`). + +## Signature + +```typescript +class SkillRegistry +``` + +## Properties + + + Get the number of registered skills. + + +## Methods + +### addSearchPath + +Add a directory path to search during skill discovery. + +#### Signature + +```typescript +addSearchPath(path: string): void +``` + +#### Parameters + + + Absolute path to a directory containing skill files. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) + +Line 224. + +*** + +### addSkillDirectory + +Add a directory to search for skills. + +Mirrors Python's +`signalwire.skills.registry.SkillRegistry.add_skill_directory` +(`registry.py:350-375`): validate that the path exists and is a +directory, then append it (de-duplicated) to `externalPaths`. Throws +`Error` (the JS analog of Python's `ValueError`) for non-existent +paths or non-directories. Distinct from `addSearchPath`, which +silently accepts anything; `addSkillDirectory` is the strict +Python-parity surface and the recommended entry point for +registering third-party skill directories. + +#### Signature + +```typescript +addSkillDirectory(path: string): void +``` + +#### Parameters + + + Absolute or relative path to a directory containing skill subdirectories. + + +#### Returns + +`void` + +#### Throws + +- Error when the path doesn't exist or isn't a directory. + +#### Source + +[`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) + +Line 247. + +*** + +### clear + +Clear all registrations. + +#### Signature + +```typescript +clear(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) + +Line 408. + +*** + +### constructor + +#### Signature + +```typescript +constructor(): SkillRegistry +``` + +#### Returns + +`SkillRegistry` + +#### Source + +[`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) + +Line 69. + +*** + +### create + +Create a new skill instance by looking up its class in the registry. +Matches Python's `skill_manager.load_skill(name)` class-lookup + instantiate +flow (`skill_manager.py:97`: `skill_instance = skill_class(self.agent, params)`). + +#### Signature + +```typescript +create(name: string, config?: SkillConfig): SkillBase | null +``` + +#### Parameters + + + The registered skill name. + + + + Optional configuration to pass to the skill constructor. + + +#### Returns + +`SkillBase | null` — A new skill instance, or null if the name is not registered. + +#### Source + +[`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) + +Line 163. + +*** + +### discoverAll + +Discover and register skills from all configured search paths. + +#### Signature + +```typescript +discoverAll(): Promise +``` + +#### Returns + +`Promise` — Array of all newly discovered skill names. + +#### Source + +[`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) + +Line 338. + +*** + +### discoverFromDirectory + +Discover and register skills from a directory by importing each file. +Looks for SkillBase subclass exports and registers them. + +#### Signature + +```typescript +discoverFromDirectory(dirPath: string): Promise +``` + +#### Parameters + + + Absolute path to the directory to scan. + + +#### Returns + +`Promise` — Array of newly discovered skill names. + +#### Source + +[`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) + +Line 282. + +*** + +### getAllSkillsSchema + +Get combined schema info for all registered skills. + +#### Signature + +```typescript +getAllSkillsSchema(): Record +``` + +#### Returns + +`Record` — Record mapping skill names to their schema info. + +#### Source + +[`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) + +Line 372. + +*** + +### getExternalPaths + +Returns a copy of the external skill directories registered via +[addSkillDirectory](/docs/sdk-reference/reference/typescript/add-skill-directory). Parity surface for Python's +`_external_paths`. + +#### Signature + +```typescript +getExternalPaths(): string[] +``` + +#### Returns + +`string[]` + +#### Source + +[`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) + +Line 264. + +*** + +### getInstance + +Get the global singleton instance, creating it on first access. + +**Modifiers:** `static` + +#### Signature + +```typescript +getInstance(): SkillRegistry +``` + +#### Returns + +`SkillRegistry` — The shared SkillRegistry instance. + +#### Source + +[`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) + +Line 78. + +*** + +### getSearchPaths + +Get all configured search paths for skill discovery. + +#### Signature + +```typescript +getSearchPaths(): string[] +``` + +#### Returns + +`string[]` — Copy of the search paths array. + +#### Source + +[`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) + +Line 272. + +*** + +### getSkillClass + +Get the registered skill class by name. Matches Python's +`get_skill_class(skill_name)` (`registry.py:196-203`). + +#### Signature + +```typescript +getSkillClass(name: string): typeof SkillBase | undefined +``` + +#### Parameters + + + The registered skill name. + + +#### Returns + +`typeof SkillBase | undefined` — The skill class reference, or undefined if not registered. + +#### Source + +[`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) + +Line 181. + +*** + +### getSkillSchema + +Get the combined schema info for a registered skill. +Matches Python `get_all_skills_schema` per-skill shape +(`registry.py:287-295`). + +#### Signature + +```typescript +getSkillSchema(name: string): SkillSchemaInfo | undefined +``` + +#### Parameters + + + The registered skill name to query. + + +#### Returns + +`SkillSchemaInfo | undefined` — The skill's schema info, or undefined if not found. + +#### Source + +[`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) + +Line 354. + +*** + +### has + +Check if a skill name is registered. + +#### Signature + +```typescript +has(name: string): boolean +``` + +#### Parameters + + + The skill name to check. + + +#### Returns + +`boolean` — True if the skill is registered. + +#### Source + +[`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) + +Line 190. + +*** + +### listAllSkillSources + +Group registered skill names by source category. Matches Python's +`list_all_skill_sources` (`skills/registry.py:436-478`). + +Current TS implementation treats every registered skill as "registered" +(the only category that fits — filesystem-based discovery is optional +and entry-points don't apply to Node the way they do to Python). + +#### Signature + +```typescript +listAllSkillSources(): Record +``` + +#### Returns + +`Record` — Record mapping source categories to arrays of skill names. + +#### Source + +[`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) + +Line 391. + +*** + +### listRegistered + +List all registered skill names. + +#### Signature + +```typescript +listRegistered(): string[] +``` + +#### Returns + +`string[]` — Array of registered skill name strings. + +#### Source + +[`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) + +Line 198. + +*** + +### listSkills + +List all registered skills with their full metadata. Matches Python's +`list_skills()` shape (`registry.py:205-227`) plus TS-idiomatic +camelCase keys. + +#### Signature + +```typescript +listSkills(): SkillSchemaInfo[] +``` + +#### Returns + +`SkillSchemaInfo[]` — Array of skill metadata objects. + +#### Source + +[`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) + +Line 208. + +*** + +### lock + +Lock one or more skill names to prevent overwriting. +If called with no arguments, locks all currently registered skills. + +#### Signature + +```typescript +lock(names?: string[]): void +``` + +#### Parameters + + + Skill names to lock; if omitted, all current names are locked. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) + +Line 138. + +*** + +### register + +Register a skill class. The skill name is read from the class's static +`SKILL_NAME`. Mirrors Python's `register_skill(skill_class)` +(`skills/registry.py:132-194`) — including the schema-non-empty check +and the protection against overwriting locked skills. + +#### Signature + +```typescript +register(SkillClass: typeof SkillBase): void +``` + +#### Parameters + + + A concrete subclass of `SkillBase` with a non-empty `SKILL_NAME`. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) + +Line 101. + +*** + +### resetInstance + +Reset the global singleton (for testing). + +**Modifiers:** `static` + +#### Signature + +```typescript +resetInstance(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) + +Line 88. + +*** + +### unregister + +Unregister a skill by name, removing it from the registry. + +#### Signature + +```typescript +unregister(name: string): boolean +``` + +#### Parameters + + + The skill name to unregister. + + +#### Returns + +`boolean` — True if the skill was found and removed. + +#### Source + +[`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) + +Line 150. + +## Source + +[`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) + +Line 55. diff --git a/fern/products/sdk-reference/typescript/agents/skills/skill-registry/index__2.mdx b/fern/products/sdk-reference/typescript/agents/skills/skill-registry/index__2.mdx new file mode 100644 index 0000000000..d02186653b --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/skills/skill-registry/index__2.mdx @@ -0,0 +1,68 @@ +--- +slug: "/reference/typescript/agents/skills/skill-registry/index__2" +title: "SkillRegistry" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "agents.skills.SkillRegistry" + parent: "skills" + module: "agents.skills" +--- +# `SkillRegistry` + +## Interfaces + +### SkillSchemaInfo + +Metadata exposed for a registered skill. Shape matches Python's +`SkillRegistry.list_skills()` / `get_all_skills_schema()` return values +(`skills/registry.py:205-227`, `229-296`). + +#### Signature + +```typescript +interface SkillSchemaInfo +``` + +#### Properties + + + Human-readable description (from `SkillBase.SKILL_DESCRIPTION`). + + + + The skill's registered name (from `SkillBase.SKILL_NAME`). + + + + Full parameter schema with types, defaults, and constraints. + + + + Environment variables required by the skill. + + + + NPM packages required by the skill. + + + + Optional source category for grouping (e.g., "builtin", "external"). + + + + Whether this skill supports multiple simultaneous instances. + + + + Semantic version string (from `SkillBase.SKILL_VERSION`). + + +#### Source + +[`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) + +Line 28. diff --git a/fern/products/sdk-reference/typescript/agents/ssl-config/index.mdx b/fern/products/sdk-reference/typescript/agents/ssl-config/index.mdx new file mode 100644 index 0000000000..929d37ead9 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/ssl-config/index.mdx @@ -0,0 +1,215 @@ +--- +slug: "/reference/typescript/agents/ssl-config" +title: "SslConfig" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "SslConfig" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/SslConfig.ts" +--- +# `SslConfig` + +Manages SSL/TLS configuration sourced from explicit options or environment variables. + +## Signature + +```typescript +class SslConfig +``` + +## Properties + + + Filesystem path to the PEM certificate, or null if unset. + + + + Domain name for HSTS, or null if unset. + + + + Whether SSL is enabled. + + + + Whether HSTS headers should be emitted. + + + + HSTS max-age value in seconds. + + + + Filesystem path to the PEM private key, or null if unset. + + +## Methods + +### constructor + +Create an SslConfig, falling back to environment variables for any unset options. + +#### Signature + +```typescript +constructor(opts?: SslOptions): SslConfig +``` + +#### Parameters + + + Optional SSL configuration overrides. + + +#### Returns + +`SslConfig` + +#### Source + +[`src/SslConfig.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SslConfig.ts) + +Line 48. + +*** + +### getCert + +Read the PEM certificate file from disk. + +#### Signature + +```typescript +getCert(): string | null +``` + +#### Returns + +`string | null` — The certificate contents, or null if the file is missing. + +#### Source + +[`src/SslConfig.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SslConfig.ts) + +Line 71. + +*** + +### getHstsHeader + +Build the Strict-Transport-Security header value. + +#### Signature + +```typescript +getHstsHeader(): string | null +``` + +#### Returns + +`string | null` — The HSTS header string, or null if HSTS is disabled or SSL is off. + +#### Source + +[`src/SslConfig.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SslConfig.ts) + +Line 89. + +*** + +### getKey + +Read the PEM private key file from disk. + +#### Signature + +```typescript +getKey(): string | null +``` + +#### Returns + +`string | null` — The key contents, or null if the file is missing. + +#### Source + +[`src/SslConfig.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SslConfig.ts) + +Line 80. + +*** + +### getServerOptions + +Create the options object needed by Node.js `https.createServer()`. + +#### Signature + +```typescript +getServerOptions(): { cert: string; key: string } | null +``` + +#### Returns + +`{ cert: string; key: string } | null` — An object with `cert` and `key` strings, or null if either file is missing. + +#### Source + +[`src/SslConfig.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SslConfig.ts) + +Line 98. + +*** + +### hstsMiddleware + +Return a Hono middleware that appends the HSTS header to every response. + +#### Signature + +```typescript +hstsMiddleware(): (c: any, next: () => Promise) => Promise +``` + +#### Returns + +`(c: any, next: () => Promise) => Promise` — A Hono-compatible middleware function. + +#### Source + +[`src/SslConfig.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SslConfig.ts) + +Line 109. + +*** + +### isConfigured + +Check whether SSL is fully configured: enabled with both cert and key files present on disk. + +#### Signature + +```typescript +isConfigured(): boolean +``` + +#### Returns + +`boolean` — True if SSL is enabled and both certificate and key files exist. + +#### Source + +[`src/SslConfig.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SslConfig.ts) + +Line 61. + +## Source + +[`src/SslConfig.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SslConfig.ts) + +Line 30. diff --git a/fern/products/sdk-reference/typescript/agents/ssl-config/index__2.mdx b/fern/products/sdk-reference/typescript/agents/ssl-config/index__2.mdx new file mode 100644 index 0000000000..28eabbda99 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/ssl-config/index__2.mdx @@ -0,0 +1,58 @@ +--- +slug: "/reference/typescript/agents/ssl-config/index__2" +title: "SslConfig" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "agents.SslConfig" + parent: "agents" + module: "agents" +--- +# `SslConfig` + +## Interfaces + +### SslOptions + +Configuration options for SSL/TLS setup. + +#### Signature + +```typescript +interface SslOptions +``` + +#### Properties + + + Filesystem path to the PEM-encoded certificate. + + + + Domain name used for HSTS headers. + + + + Whether SSL is enabled. + + + + Whether to send HSTS headers; defaults to true. + + + + HSTS max-age in seconds; defaults to 31536000 (1 year). + + + + Filesystem path to the PEM-encoded private key. + + +#### Source + +[`src/SslConfig.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SslConfig.ts) + +Line 14. diff --git a/fern/products/sdk-reference/typescript/agents/swaig-function/index.mdx b/fern/products/sdk-reference/typescript/agents/swaig-function/index.mdx new file mode 100644 index 0000000000..1e0ae2b8ba --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/swaig-function/index.mdx @@ -0,0 +1,262 @@ +--- +slug: "/reference/typescript/agents/swaig-function" +title: "SwaigFunction" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "SwaigFunction" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/SwaigFunction.ts" +--- +# `SwaigFunction` + +A SWAIG function — exactly the same concept as a "tool" in native +OpenAI / Anthropic tool calling. + +Each SwaigFunction is rendered, on every LLM turn, into the OpenAI +tool schema: + +```json +{ +"type": "function", +"function": { +"name": "", +"description": "", +"parameters": { "type": "object", "properties": { ... } } +} +} +``` + +The `name`, `description`, and every per-parameter `description` inside +`parameters` are **read by the model** and directly determine whether +the model picks this tool when a matching user request comes in. +They are prompt engineering, not developer comments. + +## Signature + +```typescript +class SwaigFunction +``` + +## Properties + + + LLM-facing description. Tells the model WHEN to call this tool. A vague description is the #1 cause of "model has the tool but doesn't call it" failures. + + + + Additional fields included in the SWAIG definition output. + + + + Language-keyed filler phrases spoken while the tool executes. + + + + The handler function called when the tool is invoked. + + + + Whether this tool is externally hosted (has a webhookUrl). + + + + Whether this tool uses a typed handler with named parameters. + + + + Unique name — read by the LLM; use snake\_case verbs. + + + + JSON Schema properties describing the tool's parameters. Each property's `description` field is ALSO LLM-facing — it tells the model HOW to extract that argument from the user's utterance. + + + + List of required parameter names. + + + + Whether this tool requires session token authentication. + + + + Audio file URL to play while waiting for the tool to complete. + + + + Number of times to loop the wait file. + + + + External webhook URL; set when the tool is externally hosted. + + +## Methods + +### constructor + +Create a new SwaigFunction. + +#### Signature + +```typescript +constructor(opts: SwaigFunctionOptions): SwaigFunction +``` + +#### Parameters + + + Configuration options for the SWAIG function. Use `opts.extraFields` to pass any additional SWAIG-only fields (e.g. `meta_data_token`, `web_hook_auth_user`, `web_hook_auth_password`). This mirrors the Python constructor's `**extra_swaig_fields` kwargs: both are merged directly into the serialized SWAIG definition, so the wire format is identical — only the call-site syntax differs. + + +#### Returns + +`SwaigFunction` + +#### Source + +[`src/SwaigFunction.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwaigFunction.ts) + +Line 138. + +*** + +### execute + +Invoke the handler with the given arguments and return a serialized result. + +#### Signature + +```typescript +execute( + args: Record, + rawData?: Record +): Promise> +``` + +#### Parameters + + + Parsed arguments from the AI. + + + + The full raw request payload. + + +#### Returns + +`Promise>` — A serialized result dictionary suitable for the SWAIG response. + +#### Source + +[`src/SwaigFunction.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwaigFunction.ts) + +Line 213. + +*** + +### toSwaig + +Serialize this function to the SWAIG wire format for inclusion in SWML. + +#### Signature + +```typescript +toSwaig( + baseUrl: string, + token?: string, + callId?: string +): Record +``` + +#### Parameters + + + The base URL of the agent server. + + + + Optional session token for secure functions. + + + + Optional call ID for secure function URLs. + + +#### Returns + +`Record` — A SWAIG function definition object. + +#### Source + +[`src/SwaigFunction.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwaigFunction.ts) + +Line 257. + +*** + +### validateArgs + +Validate arguments against the parameter JSON schema using full +JSON Schema Draft-7 validation (via ajv). + +Mirrors Python's `validate_args` which tries `jsonschema_rs` (Rust-based +Draft-7 validator) then falls back to `jsonschema` (pure Python Draft-7). +All JSON Schema constraint keywords are honoured: `required`, `type`, +`minLength`, `maxLength`, `pattern`, `format`, `minimum`, `maximum`, +`enum`, `anyOf`, `oneOf`, `$ref`, nested object/array validation, etc. + +If the schema has no properties, validation is skipped and the args are +considered valid — matching Python's early-return path. + +#### Signature + +```typescript +validateArgs(args: Record): [boolean, string[]] +``` + +#### Parameters + + + Arguments to validate. + + +#### Returns + +`[boolean, string[]]` — A tuple of `[isValid, errors]`. When no validation is needed (empty schema), returns `[true, []]`. + +#### Source + +[`src/SwaigFunction.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwaigFunction.ts) + +Line 186. + +## Type Aliases + +### SwaigHandler + +Handler function for a SWAIG tool invocation. + +#### Signature + +```typescript +type SwaigHandler = (args: Record, rawData: Record) => FunctionResult | Record | string | Promise | string> +``` + +#### Source + +[`src/SwaigFunction.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwaigFunction.ts) + +Line 19. + +## Source + +[`src/SwaigFunction.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwaigFunction.ts) + +Line 92. diff --git a/fern/products/sdk-reference/typescript/agents/swaig-function/index__2.mdx b/fern/products/sdk-reference/typescript/agents/swaig-function/index__2.mdx new file mode 100644 index 0000000000..74bf1f6403 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/swaig-function/index__2.mdx @@ -0,0 +1,82 @@ +--- +slug: "/reference/typescript/agents/swaig-function/index__2" +title: "SwaigFunction" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "agents.SwaigFunction" + parent: "agents" + module: "agents" +--- +# `SwaigFunction` + +## Interfaces + +### SwaigFunctionOptions + +Configuration options for creating a SwaigFunction. + +#### Signature + +```typescript +interface SwaigFunctionOptions +``` + +#### Properties + + + Human-readable description of what the tool does, shown to the AI. + + + + Additional fields to merge directly into the SWAIG function definition. **Python equivalent:** `**extra_swaig_fields` kwargs on the constructor. In Python these are passed as bare keyword arguments and merged directly into the output dict via `function_def.update(self.extra_swaig_fields)`. In TypeScript the same fields are collected under this single options key and merged identically in `toSwaig()` — the wire format is identical. + + + + Language-keyed filler phrases spoken while the tool executes. + + + + The handler function called when the tool is invoked. + + + + Whether this tool uses a typed handler with named parameters. + + + + Unique name used to register and invoke this tool. + + + + JSON Schema properties describing the tool's parameters. + + + + List of required parameter names. + + + + Whether this tool requires session token authentication. + + + + Audio file URL to play while waiting for the tool to complete. + + + + Number of times to loop the wait file. + + + + External webhook URL; makes this an externally-hosted tool. + + +#### Source + +[`src/SwaigFunction.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwaigFunction.ts) + +Line 25. diff --git a/fern/products/sdk-reference/typescript/agents/swml-builder/index.mdx b/fern/products/sdk-reference/typescript/agents/swml-builder/index.mdx new file mode 100644 index 0000000000..cba408643f --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/swml-builder/index.mdx @@ -0,0 +1,1609 @@ +--- +slug: "/reference/typescript/agents/swml-builder" +title: "SwmlBuilder" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "SwmlBuilder" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlBuilder.ts" +--- +# `SwmlBuilder` + +Builds SWML documents composed of verb instructions organized into named sections. + +Verb methods (`.answer()`, `.play()`, `.hangup()`, `.transfer()`, etc.) are +auto-installed from the bundled SWML schema and all return `this` for fluent chaining. + +Most users don't instantiate `SwmlBuilder` directly — `AgentBase` uses it internally +and exposes higher-level helpers. Use this class directly for `SWMLService` (non-AI +call flows) or to hand-craft SWML returned from a route handler. + +## Signature + +```typescript +class SwmlBuilder +``` + +## Examples + +```typescript +import { SwmlBuilder } from '@signalwire/sdk'; + +const swml = new SwmlBuilder() + .answer() + .play({ url: 'https://cdn.example.com/greeting.mp3' }) + .hangup() + .build(); + +// swml is JSON ready to return from a SignalWire webhook. +``` + +## See Also + +- \- \[SWMLService]\(/docs/sdk-reference/reference/typescript/agents/swml-service) — HTTP service that serves a built SWML document + \- \[AgentBase]\(/docs/sdk-reference/reference/typescript/agents/agent-base) — for AI-driven call flows + +## Properties + + + Public read-only accessor for the underlying SWML document. Provides direct access to the document, equivalent to the Python SDK's `service` property on `SWMLBuilder`. + + +## Methods + +### addSection + +Creates a new empty named section in the document. +If the section already exists, this is a no-op. +Matches Python SDK's `add_section(section_name)`. + +#### Signature + +```typescript +addSection(sectionName: string): this +``` + +#### Parameters + + + The name of the section to create. + + +#### Returns + +`this` — this for fluent chaining. + +#### Source + +[`src/SwmlBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlBuilder.ts) + +Line 247. + +*** + +### addVerb + +Appends a verb to the main section. +Validates the verb config against the schema when validation is enabled. + +#### Signature + +```typescript +addVerb(verbName: string, config: unknown): void +``` + +#### Parameters + + + The SWML verb name (e.g., "answer", "ai"). + + + + The verb's configuration payload. + + +#### Returns + +`void` + +#### Source + +[`src/SwmlBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlBuilder.ts) + +Line 187. + +*** + +### addVerbToSection + +Appends a verb to a named section, creating the section if it does not exist. + +#### Signature + +```typescript +addVerbToSection(sectionName: string, verbName: string, config: unknown): void +``` + +#### Parameters + + + The target section name. + + + + The SWML verb name. + + + + The verb's configuration payload. + + +#### Returns + +`void` + +#### Source + +[`src/SwmlBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlBuilder.ts) + +Line 206. + +*** + +### ai + +Creates an AI agent that conducts voice conversations using automatic speech recognition (ASR), large language models (LLMs), and text-to-speech (TTS) synthesis. The agent processes caller speech in real-time, generates contextually appropriate responses, and can execute custom functions to interact with external systems through SignalWire AI Gateway (SWAIG). + +#### Signature + +```typescript +ai(config?: AiVerbConfig): this +``` + +#### Parameters + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 50. + +*** + +### amazon\_bedrock + +Creates a new Bedrock AI Agent + +#### Signature + +```typescript +amazon_bedrock(config?: unknown): this +``` + +#### Parameters + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 52. + +*** + +### answer + +Answer incoming call and set an optional maximum duration. + +#### Signature + +```typescript +answer(config?: { ...4 fields }): this +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 44. + +*** + +### build + +Alias for [getDocument](/docs/sdk-reference/reference/typescript/agents/swml-builder#get-document). Matches the Python SDK's `build()` method. +Build and return the SWML document as a dictionary/object. + +#### Signature + +```typescript +build(): Record +``` + +#### Returns + +`Record` — The document with version and sections. + +#### Source + +[`src/SwmlBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlBuilder.ts) + +Line 268. + +*** + +### cond + +Execute a sequence of instructions depending on the value of a JavaScript condition. + +#### Signature + +```typescript +cond(config?: Record): this +``` + +#### Parameters + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 54. + +*** + +### connect + +Dial a SIP URI or phone number. + +#### Signature + +```typescript +connect(config: Record): this +``` + +#### Parameters + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 56. + +*** + +### constructor + +Creates a new SwmlBuilder. + +#### Signature + +```typescript +constructor(opts?: SwmlBuilderOptions): SwmlBuilder +``` + +#### Parameters + + + Optional configuration. + + +#### Returns + +`SwmlBuilder` + +#### Source + +[`src/SwmlBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlBuilder.ts) + +Line 73. + +*** + +### denoise + +Start noise reduction. You can stop it at any time using `stop_denoise`. + +#### Signature + +```typescript +denoise(config?: Record): this +``` + +#### Parameters + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 58. + +*** + +### detect\_machine + +A detection method that combines AMD (Answering Machine Detection) and fax detection. Detect whether the user on the other end of the call is a machine (fax, voicemail, etc.) or a human. The detection result(s) will be sent to the specified status\_url as a POST request and will also be saved in the detect\_result variable. + +#### Signature + +```typescript +detect_machine(config?: { ...11 fields }): this +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 217. + +*** + +### enter\_queue + +Place the current call in a named queue where it will wait to be connected to an available agent or resource. While waiting, callers will hear music or custom audio. When an agent connects to the queue (using the connect method), the caller and agent are bridged together. After the bridge completes, execution continues with the SWML script specified in transfer\_after\_bridge. + +#### Signature + +```typescript +enter_queue(config?: unknown): this +``` + +#### Parameters + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 60. + +*** + +### execute + +Execute a specified section or URL as a subroutine, and upon completion, return to the current document. Use the return statement to pass any return values or objects back to the current document. + +#### Signature + +```typescript +execute(config: { ...5 fields }): this +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 62. + +*** + +### getDocument + +Returns the raw SWML document object. + +#### Signature + +```typescript +getDocument(): Record +``` + +#### Returns + +`Record` — The document with version and sections. + +#### Source + +[`src/SwmlBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlBuilder.ts) + +Line 258. + +*** + +### getSchemaUtils + +Get or create the shared SchemaUtils singleton. +Exposed for use by the type generator and tests. + +**Modifiers:** `static` + +#### Signature + +```typescript +getSchemaUtils(): SchemaUtils +``` + +#### Returns + +`SchemaUtils` + +#### Source + +[`src/SwmlBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlBuilder.ts) + +Line 125. + +*** + +### goto + +Jump to a label within the current section, optionally based on a condition. The goto method will only navigate to a label within the same section. + +#### Signature + +```typescript +goto(config: { ...3 fields }): this +``` + +#### Parameters + + + + + + + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 69. + +*** + +### hangup + +End the call with an optional reason. + +#### Signature + +```typescript +hangup(config?: { ...1 fields }): this +``` + +#### Parameters + + + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 82. + +*** + +### join\_conference + +Join an ad-hoc audio conference started on either the SignalWire or Compatibility API. This method allows you to connect the current call to a named conference where multiple participants can communicate simultaneously. + +#### Signature + +```typescript +join_conference(config?: unknown): this +``` + +#### Parameters + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 88. + +*** + +### join\_room + +Join a RELAY room. If the room doesn't exist, it creates a new room. + +#### Signature + +```typescript +join_room(config: { ...1 fields }): this +``` + +#### Parameters + + + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 85. + +*** + +### label + +Mark any point of the SWML section with a label so that goto can jump to it. + +#### Signature + +```typescript +label(value: string): this +``` + +#### Parameters + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 74. + +*** + +### live\_transcribe + +Start live transcription of the call. The transcription will be sent to the specified webhook URL. + +#### Signature + +```typescript +live_transcribe(config: { ...1 fields }): this +``` + +#### Parameters + + + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 76. + +*** + +### live\_translate + +Start live translation of the call. The translation will be sent to the specified webhook URL. + +#### Signature + +```typescript +live_translate(config: { ...1 fields }): this +``` + +#### Parameters + + + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 79. + +*** + +### pay + +Enables secure payment processing during voice calls. When implemented, it manages the entire payment flow including data collection, validation, and processing through your configured payment gateway. + +#### Signature + +```typescript +pay(config: { ...18 fields }): this +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 197. + +*** + +### play + +Play file(s), ringtones, speech or silence. + +#### Signature + +```typescript +play(config?: PlayVerbConfig): this +``` + +#### Parameters + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 90. + +*** + +### prompt + +Play a prompt and wait for input. The input can be received either as digits from the keypad, or from speech, or both depending on what parameters are set. By default, only digit input is enabled. To enable speech input, set at least one speech parameter. To enable both digit and speech input, set at least one parameter for each. + +#### Signature + +```typescript +prompt(config: { ...15 fields }): this +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 92. + +*** + +### receive\_fax + +Receive a fax being delivered to this call. + +#### Signature + +```typescript +receive_fax(config?: { ...1 fields }): this +``` + +#### Parameters + + + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 109. + +*** + +### record + +Record the call audio in the foreground, pausing further SWML execution until recording ends. Use this, for example, to record voicemails. To record calls in the background in a non-blocking fashion, use the record\_call method. + +#### Signature + +```typescript +record(config?: { ...10 fields }): this +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 112. + +*** + +### record\_call + +Record call in the background. Unlike the record method, the record\_call method will start the recording and continue executing the SWML script while allowing the recording to happen in the background. To stop call recordings started with record\_call, use the stop\_record\_call method. + +#### Signature + +```typescript +record_call(config?: { ...11 fields }): this +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 124. + +*** + +### render + +Alias for [renderDocument](/docs/sdk-reference/reference/typescript/agents/swml-builder#render-document). Matches the Python SDK's `render()` method. +Build and render the SWML document as a JSON string. + +#### Signature + +```typescript +render(): string +``` + +#### Returns + +`string` — The JSON-encoded SWML document. + +#### Source + +[`src/SwmlBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlBuilder.ts) + +Line 286. + +*** + +### renderDocument + +Serializes the SWML document to a JSON string. + +#### Signature + +```typescript +renderDocument(): string +``` + +#### Returns + +`string` — The JSON-encoded SWML document. + +#### Source + +[`src/SwmlBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlBuilder.ts) + +Line 276. + +*** + +### request + +Send a GET, POST, PUT, or DELETE request to a remote URL. + +#### Signature + +```typescript +request(config: { ...7 fields }): this +``` + +#### Parameters + + + + + + + + + + + + + + + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 137. + +*** + +### reset + +Resets the document to an empty SWML structure. + +#### Signature + +```typescript +reset(): this +``` + +#### Returns + +`this` — this for fluent chaining. + +#### Source + +[`src/SwmlBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlBuilder.ts) + +Line 176. + +*** + +### return + +Return a value from an execute call or exit the script. The value can be any type. + +#### Signature + +```typescript +return(config?: unknown): this +``` + +#### Parameters + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 146. + +*** + +### say + +Add a 'play' verb with say: prefix for text-to-speech. +Convenience wrapper matching Python SDK's `say()` method. + +#### Signature + +```typescript +say(text: string, opts?: { ...4 fields }): this +``` + +#### Parameters + + + Text to speak. + + + + Optional TTS parameters (voice, language, gender, volume). + + + + + + + + + + +#### Returns + +`this` — this for fluent chaining. + +#### Source + +[`src/SwmlBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlBuilder.ts) + +Line 221. + +*** + +### send\_digits + +Send digit presses as DTMF tones. + +#### Signature + +```typescript +send_digits(config: { ...1 fields }): this +``` + +#### Parameters + + + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 148. + +*** + +### send\_fax + +Send a fax. + +#### Signature + +```typescript +send_fax(config: { ...4 fields }): this +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 151. + +*** + +### send\_sms + +Send an outbound SMS or MMS message to a PSTN phone number. + +#### Signature + +```typescript +send_sms(config: number | Record): this +``` + +#### Parameters + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 157. + +*** + +### set + +Set script variables to the specified values. Accepts an object mapping variable names to values. Variables set using set can be removed using unset. + +#### Signature + +```typescript +set(config?: Record): this +``` + +#### Parameters + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 159. + +*** + +### setValidation + +Enable or disable verb schema validation at runtime. +Matches the Python `schema_validation` constructor parameter on AgentBase. + +#### Signature + +```typescript +setValidation(enabled: boolean): void +``` + +#### Parameters + + + True to enable validation, false to disable. + + +#### Returns + +`void` + +#### Source + +[`src/SwmlBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlBuilder.ts) + +Line 113. + +*** + +### sip\_refer + +Send SIP REFER to a SIP call. + +#### Signature + +```typescript +sip_refer(config: { ...4 fields }): this +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 163. + +*** + +### sleep + +Pause execution for a specified duration. + +#### Signature + +```typescript +sleep(durationOrConfig: number | { duration: number }): this +``` + +#### Parameters + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 161. + +*** + +### stop\_denoise + +Stop noise reduction that was started with denoise. + +#### Signature + +```typescript +stop_denoise(config?: Record): this +``` + +#### Parameters + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 169. + +*** + +### stop\_record\_call + +Stop an active background recording. + +#### Signature + +```typescript +stop_record_call(config?: { ...1 fields }): this +``` + +#### Parameters + + + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 171. + +*** + +### stop\_tap + +Stop an active tap stream. + +#### Signature + +```typescript +stop_tap(config?: { ...1 fields }): this +``` + +#### Parameters + + + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 174. + +*** + +### switch + +Execute different instructions based on a variable's value. + +#### Signature + +```typescript +switch(config: { ...3 fields }): this +``` + +#### Parameters + + + + + + + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 177. + +*** + +### tap + +Start background call tap. Media is streamed over Websocket or RTP to customer controlled URI. + +#### Signature + +```typescript +tap(config: { ...6 fields }): this +``` + +#### Parameters + + + + + + + + + + + + + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 182. + +*** + +### transfer + +Transfer the execution of the script to a different SWML section, URL, or Relay application. Once the transfer is complete, the script will continue executing SWML from the new location. + +#### Signature + +```typescript +transfer(config: { ...3 fields }): this +``` + +#### Parameters + + + + + + + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 190. + +*** + +### unset + +Unset specified variables. The variables may have been set using the set method or as a byproduct of other statements or methods. Accepts a single variable name as a string or an array of variable names. + +#### Signature + +```typescript +unset(config: number | Record): this +``` + +#### Parameters + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 195. + +*** + +### user\_event + +Allows the user to set and send events to the connected client on the call. This is useful for triggering actions on the client side. Commonly used with the [browser-sdk](https://developer.signalwire.com/sdks/reference/browser-sdk/SignalWire%20Client/). The event object can be any valid JSON object. Any key-value pair in the object is sent to the client as an event type called `user_event`. + +#### Signature + +```typescript +user_event(config: { ...1 fields }): this +``` + +#### Parameters + + + + + +#### Returns + +`this` + +#### Source + +[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) + +Line 230. + +## Source + +[`src/SwmlBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlBuilder.ts) + +Line 59. diff --git a/fern/products/sdk-reference/typescript/agents/swml-builder/index__2.mdx b/fern/products/sdk-reference/typescript/agents/swml-builder/index__2.mdx new file mode 100644 index 0000000000..5329fb3a22 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/swml-builder/index__2.mdx @@ -0,0 +1,46 @@ +--- +slug: "/reference/typescript/agents/swml-builder/index__2" +title: "SwmlBuilder" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "agents.SwmlBuilder" + parent: "agents" + module: "agents" +--- +# `SwmlBuilder` + +## Interfaces + +### SwmlBuilderOptions + +Options for constructing a SwmlBuilder. + +#### Signature + +```typescript +interface SwmlBuilderOptions +``` + +#### Properties + + + When false, disables verb schema validation. Defaults to true unless `SWML_SKIP_SCHEMA_VALIDATION=true` is set in the environment. + + + + An initial SWML document to seed the builder with, enabling document injection. When provided, the builder uses this document instead of creating an empty one. This mirrors the Python SDK's pattern of injecting an SWMLService instance. + + + + Optional path to a custom SWML schema JSON file. When set, the builder uses a per-instance SchemaUtils loaded from this path instead of the bundled schema. Mirrors Python's `schema_path` constructor parameter on `SWMLService`/`AgentBase`. + + +#### Source + +[`src/SwmlBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlBuilder.ts) + +Line 19. diff --git a/fern/products/sdk-reference/typescript/agents/swml-handler/ai-verb-handler/index.mdx b/fern/products/sdk-reference/typescript/agents/swml-handler/ai-verb-handler/index.mdx new file mode 100644 index 0000000000..73eda1125e --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/swml-handler/ai-verb-handler/index.mdx @@ -0,0 +1,140 @@ +--- +slug: "/reference/typescript/agents/swml-handler/ai-verb-handler" +title: "AIVerbHandler" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "SWMLHandler.AIVerbHandler" + parent: "SWMLHandler" + module: "agents.SWMLHandler" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLHandler.ts" +--- +# `AIVerbHandler` + +Handler for the SWML 'ai' verb. + +## Signature + +```typescript +class AIVerbHandler extends SWMLVerbHandler +``` + +## Inheritance + +**Extends:** [SWMLVerbHandler](/docs/sdk-reference/reference/typescript/agents/swml-handler/swml-verb-handler) + +## Methods + +### buildConfig + +Build a configuration for the AI verb. + +Requires exactly one of `promptText` or `promptPom` (mutually exclusive). +Throws an `Error` if both or neither are provided. + +Extra keys in `opts` are routed as follows: + +- `languages`, `hints`, `pronounce`, `globalData` / `global_data` are placed at the top level of the config. +- All other extra keys are placed into `config.params`. + +#### Signature + +```typescript +buildConfig(opts: AIVerbBuildOptions = {}): Record +``` + +#### Parameters + + + Build options for the AI verb configuration. + + +#### Returns + +`Record` — AI verb configuration dictionary. + +#### Source + +[`src/SWMLHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLHandler.ts) + +Line 167. + +*** + +### constructor + +#### Signature + +```typescript +constructor(): AIVerbHandler +``` + +#### Returns + +`AIVerbHandler` + +*** + +### getVerbName + +Get the name of the verb this handler handles. + +#### Signature + +```typescript +getVerbName(): string +``` + +#### Returns + +`string` — "ai" as the verb name. + +#### Source + +[`src/SWMLHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLHandler.ts) + +Line 90. + +*** + +### validateConfig + +Validate the configuration for the AI verb. + +Checks that: + +- `prompt` is present and is an object +- `prompt` contains exactly one of `text` or `pom` (mutually exclusive) +- `prompt.contexts`, if present, is an object +- `SWAIG`, if present, is an object + +#### Signature + +```typescript +validateConfig(config: Record): [boolean, string[]] +``` + +#### Parameters + + + The configuration dictionary for the AI verb. + + +#### Returns + +`[boolean, string[]]` — A \[isValid, errorMessages] tuple. + +#### Source + +[`src/SWMLHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLHandler.ts) + +Line 106. + +## Source + +[`src/SWMLHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLHandler.ts) + +Line 85. diff --git a/fern/products/sdk-reference/typescript/agents/swml-handler/index.mdx b/fern/products/sdk-reference/typescript/agents/swml-handler/index.mdx new file mode 100644 index 0000000000..7dc1030215 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/swml-handler/index.mdx @@ -0,0 +1,87 @@ +--- +slug: "/reference/typescript/agents/swml-handler" +title: "SWMLHandler" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "SWMLHandler" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLHandler.ts" +--- +# `SWMLHandler` + +## Signature + +```typescript +module SWMLHandler +``` + +## Classes + + + + Handler for the SWML 'ai' verb. + + + + Abstract base class for pluggable SWML verb handlers. + + + + Registry for SWML verb handlers. + + + +## Interfaces + +### AIVerbBuildOptions + +Options accepted by [AIVerbHandler.buildConfig](/docs/sdk-reference/reference/typescript/agents/swml-handler/ai-verb-handler#build-config). + +#### Signature + +```typescript +interface AIVerbBuildOptions +``` + +#### Properties + + + Optional contexts and steps configuration (can be combined with text or pom). + + + + Optional post-prompt text. + + + + Optional URL for post-prompt processing. + + + + POM structure for the AI prompt (mutually exclusive with promptText). + + + + Text prompt for the AI (mutually exclusive with promptPom). + + + + Optional SWAIG configuration. + + +#### Source + +[`src/SWMLHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLHandler.ts) + +Line 67. + +## Source + +[`src/SWMLHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLHandler.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/agents/swml-handler/swml-verb-handler/index.mdx b/fern/products/sdk-reference/typescript/agents/swml-handler/swml-verb-handler/index.mdx new file mode 100644 index 0000000000..ccbd3280ba --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/swml-handler/swml-verb-handler/index.mdx @@ -0,0 +1,150 @@ +--- +slug: "/reference/typescript/agents/swml-handler/swml-verb-handler" +title: "SWMLVerbHandler" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "SWMLHandler.SWMLVerbHandler" + parent: "SWMLHandler" + module: "agents.SWMLHandler" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLHandler.ts" +--- +# `SWMLVerbHandler` + +Abstract base class for pluggable SWML verb handlers. + +Each concrete handler owns one verb name and provides validate/build +logic for that verb's configuration. Subclass this to create handlers +for custom or complex SWML verbs that require specialized handling +beyond generic schema-driven validation. + +**Modifiers:** `abstract` + +## Signature + +```typescript +class SWMLVerbHandler +``` + +## Examples + +```typescript +class MyVerbHandler extends SWMLVerbHandler { + getVerbName(): string { return 'my_verb'; } + validateConfig(config: Record): [boolean, string[]] { + const errors: string[] = []; + if (!config['url']) errors.push("Missing required field 'url'"); + return [errors.length === 0, errors]; + } + buildConfig(opts: Record): Record { + return { url: opts['url'] }; + } +} +``` + +## Methods + +### buildConfig + +Build a configuration object for this verb from the provided arguments. + +**Modifiers:** `abstract` + +#### Signature + +```typescript +buildConfig(opts: Record): Record +``` + +#### Parameters + + + Key-value arguments specific to this verb. + + +#### Returns + +`Record` — A configuration dictionary ready for inclusion in a SWML document. + +#### Source + +[`src/SWMLHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLHandler.ts) + +Line 63. + +*** + +### constructor + +#### Signature + +```typescript +constructor(): SWMLVerbHandler +``` + +#### Returns + +`SWMLVerbHandler` + +*** + +### getVerbName + +Get the name of the SWML verb this handler handles. + +**Modifiers:** `abstract` + +#### Signature + +```typescript +getVerbName(): string +``` + +#### Returns + +`string` — The verb name as a string (e.g. "ai", "play"). + +#### Source + +[`src/SWMLHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLHandler.ts) + +Line 48. + +*** + +### validateConfig + +Validate the configuration for this verb. + +**Modifiers:** `abstract` + +#### Signature + +```typescript +validateConfig(config: Record): [boolean, string[]] +``` + +#### Parameters + + + The configuration dictionary for this verb. + + +#### Returns + +`[boolean, string[]]` — A `[isValid, errorMessages]` tuple where `isValid` is `true` when the config is valid and `errorMessages` lists any issues found. + +#### Source + +[`src/SWMLHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLHandler.ts) + +Line 56. + +## Source + +[`src/SWMLHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLHandler.ts) + +Line 43. diff --git a/fern/products/sdk-reference/typescript/agents/swml-handler/verb-handler-registry/index.mdx b/fern/products/sdk-reference/typescript/agents/swml-handler/verb-handler-registry/index.mdx new file mode 100644 index 0000000000..861c1eeb04 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/swml-handler/verb-handler-registry/index.mdx @@ -0,0 +1,157 @@ +--- +slug: "/reference/typescript/agents/swml-handler/verb-handler-registry" +title: "VerbHandlerRegistry" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "SWMLHandler.VerbHandlerRegistry" + parent: "SWMLHandler" + module: "agents.SWMLHandler" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLHandler.ts" +--- +# `VerbHandlerRegistry` + +Registry for SWML verb handlers. + +This class maintains a registry of handlers for special SWML verbs +and provides methods for accessing and using them. The "ai" verb handler +([AIVerbHandler](/docs/sdk-reference/reference/typescript/agents/swml-handler/ai-verb-handler)) is registered automatically on construction. + +## Signature + +```typescript +class VerbHandlerRegistry +``` + +## Examples + +```typescript +const registry = new VerbHandlerRegistry(); + +// The "ai" handler is already registered +registry.hasHandler('ai'); // true + +// Register a custom handler +registry.registerHandler(new MyCustomVerbHandler()); + +// Look up a handler +const handler = registry.getHandler('ai'); +if (handler) { + const [valid, errors] = handler.validateConfig(config); +} +``` + +## Methods + +### constructor + +Initialize the registry with default handlers. + +#### Signature + +```typescript +constructor(): VerbHandlerRegistry +``` + +#### Returns + +`VerbHandlerRegistry` + +#### Source + +[`src/SWMLHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLHandler.ts) + +Line 267. + +*** + +### getHandler + +Get the handler for a specific verb. + +#### Signature + +```typescript +getHandler(verbName: string): SWMLVerbHandler | undefined +``` + +#### Parameters + + + The name of the verb (e.g. "ai"). + + +#### Returns + +`SWMLVerbHandler | undefined` — The handler if found, or `undefined` otherwise. + +#### Source + +[`src/SWMLHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLHandler.ts) + +Line 286. + +*** + +### hasHandler + +Check if a handler exists for a specific verb. + +#### Signature + +```typescript +hasHandler(verbName: string): boolean +``` + +#### Parameters + + + The name of the verb. + + +#### Returns + +`boolean` — `true` if a handler is registered for the verb, `false` otherwise. + +#### Source + +[`src/SWMLHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLHandler.ts) + +Line 295. + +*** + +### registerHandler + +Register a new verb handler, replacing any existing handler for the same verb name. + +#### Signature + +```typescript +registerHandler(handler: SWMLVerbHandler): void +``` + +#### Parameters + + + The handler to register. + + +#### Returns + +`void` + +#### Source + +[`src/SWMLHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLHandler.ts) + +Line 276. + +## Source + +[`src/SWMLHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLHandler.ts) + +Line 263. diff --git a/fern/products/sdk-reference/typescript/agents/swml-service/index.mdx b/fern/products/sdk-reference/typescript/agents/swml-service/index.mdx new file mode 100644 index 0000000000..8436739521 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/swml-service/index.mdx @@ -0,0 +1,1225 @@ +--- +slug: "/reference/typescript/agents/swml-service" +title: "SWMLService" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "SWMLService" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts" +--- +# `SWMLService` + +HTTP service that serves non-AI SWML documents built from verb methods. + +Use `SWMLService` when you need a SignalWire call flow but don't need AI — +plain call routing, IVR-style trees, recording workflows, static playback, etc. +For AI-powered voice agents, use [AgentBase](/docs/sdk-reference/reference/typescript/agents/agent-base) instead. + +## Signature + +```typescript +class SWMLService +``` + +## Examples + +```typescript +import { SWMLService } from '@signalwire/sdk'; + +const service = new SWMLService({ name: 'greeter', route: '/', port: 3000 }); +service.builder + .answer() + .play({ url: 'https://cdn.example.com/welcome.mp3' }) + .hangup(); + +await service.serve(); +``` + +## See Also + +- \- \[SwmlBuilder]\(/docs/sdk-reference/reference/typescript/agents/swml-builder) — the underlying SWML document builder + \- \[AgentBase]\(/docs/sdk-reference/reference/typescript/agents/agent-base) — AI-powered alternative + +## Properties + + + + + + + Domain name for SSL. Mirrors Python's `self.domain`. + + + + Check if full JSON Schema validation is enabled. Mirrors Python's `@property full_validation_enabled`. + + + + Host the server binds to. + + + + Structured logger, exposed for subclass access. Mirrors Python's public `self.log`. + + + + Service display name. + + + + + + Port the server binds to. + + + + HTTP route path. + + + + Schema validation utilities. Mirrors Python's `self.schema_utils`. + + + + Unified security configuration. Mirrors Python's `self.security`. + + + + Path to SSL certificate. Mirrors Python's `self.ssl_cert_path`. + + + + Whether SSL is enabled. Mirrors Python's `self.ssl_enabled`. + + + + Path to SSL private key. Mirrors Python's `self.ssl_key_path`. + + + + + + + + Custom verb handler registry. Mirrors Python's `self.verb_registry`. + + +## Methods + +### addSection + +Add a new named section to the SWML document. +Mirrors Python's `add_section()`. + +#### Signature + +```typescript +addSection(sectionName: string): this +``` + +#### Parameters + + + Name of the section to create. + + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 653. + +*** + +### addVerb + +Add a verb to the SWML document. + +#### Signature + +```typescript +addVerb(name: string, config: unknown): this +``` + +#### Parameters + + + Verb name (e.g., 'answer', 'play', 'hangup'). + + + + Verb configuration. + + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 642. + +*** + +### addVerbToSection + +Add a verb to a specific named section. +Mirrors Python's `add_verb_to_section()`. + +#### Signature + +```typescript +addVerbToSection(sectionName: string, verbName: string, config: unknown): this +``` + +#### Parameters + + + Target section name (auto-created if missing). + + + + Verb name. + + + + Verb configuration. + + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 669. + +*** + +### asRouter + +Alias for `getApp()`. Provided for cross-SDK consistency with Python's +`as_router()` method — allows Python callers porting to TypeScript to use +the familiar name without changes. + +#### Signature + +```typescript +asRouter(): Hono +``` + +#### Returns + +`Hono` — The configured Hono app. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 908. + +*** + +### buildSwmlForRequest + +Service-side SWML-builder hook. Subclasses return a `SwmlBuilder` +to fully replace the document for this request, or `null` to fall +through to `setOnRequestCallback` or the static builder. + +This is distinct from the WebMixin `onRequest(requestData, +callbackPath)` hook on AgentBase (which mirrors Python's +`on_request -> on_swml_request` modification-merge contract). +Use this hook when you want to swap the entire SWML builder; use +`onRequest` / `onSwmlRequest` on AgentBase when you want to merge +targeted modifications into the rendered document. + +Default implementation returns `null` (no-op). + +#### Signature + +```typescript +buildSwmlForRequest( + _queryParams: Record, + _bodyParams: Record, + _headers: Record, + _callbackPath?: string +): SwmlBuilder | null +``` + +#### Parameters + + + + + + + + + +#### Returns + +`SwmlBuilder | null` — A `SwmlBuilder` whose document is sent as the response, or `null` to delegate to the next handler in the chain. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 834. + +*** + +### constructor + + + **Deprecated.** Prefer passing an options object with a required `name`. The no-arg form defaults name to 'swml-service'. + + +#### Signature + + + + ```typescript + constructor(opts: SWMLServiceOptions): SWMLService + ``` + + + + ```typescript + constructor(opts?: Partial): SWMLService + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`SWMLService` + +#### Returns (Overload 2) + +`SWMLService` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 263. + +*** + +### defineTool + +Define a SWAIG function the AI can call. Tool descriptions and +parameter descriptions are LLM-facing prompt engineering — see +PORTING\_GUIDE for guidance on writing them. + +Accepts the full SwaigFunctionOptions surface so AgentBase's richer +call sites (fillers, secure tokens, wait files, extra fields) work +without overriding this method on the subclass. + +#### Signature + +```typescript +defineTool(opts: SwaigFunctionOptions): this +``` + +#### Parameters + + + +#### Returns + +`this` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 465. + +*** + +### extractSipUsername + +Extract the SIP username from a request body's call.to field. +Mirrors Python's `@staticmethod extract_sip_username()`. + +**Modifiers:** `static` + +#### Signature + +```typescript +extractSipUsername(requestBody: Record): string | null +``` + +#### Parameters + + + The parsed request body containing call information. + + +#### Returns + +`string | null` — The extracted SIP username, or null if not found. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 787. + +*** + +### getAllFunctions + +Snapshot of all registered SWAIG functions keyed by name. +(Python parity: `ToolRegistry.get_all_functions`.) + +#### Signature + +```typescript +getAllFunctions(): Record> +``` + +#### Returns + +`Record>` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 529. + +*** + +### getApp + +Get the Hono application for mounting or testing. +This is the TypeScript equivalent of Python's `as_router()`, which returns +a FastAPI `APIRouter`. Both expose the underlying app/router so callers can +mount it into a larger framework. Use `asRouter()` when porting Python code +that calls `as_router()` directly. + +#### Signature + +```typescript +getApp(): Hono +``` + +#### Returns + +`Hono` — The configured Hono app. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 898. + +*** + +### getBasicAuthCredentials + +Get the basic-auth credentials used by this service. +Mirrors Python's `get_basic_auth_credentials()`. + +#### Signature + + + + ```typescript + getBasicAuthCredentials(includeSource?: false): [string, string] + ``` + + + + ```typescript + getBasicAuthCredentials( + includeSource: true + ): [string, string, "provided" | "environment" | "generated"] + ``` + + + +#### Parameters (Overload 1) + + + When true, a third element indicating the credential source is appended. + + +#### Parameters (Overload 2) + + + When true, a third element indicating the credential source is appended. + + +#### Returns (Overload 1) + +`[string, string]` — A tuple of \[username, password] or \[username, password, source]. + +#### Returns (Overload 2) + +`[string, string, "provided" | "environment" | "generated"]` — A tuple of \[username, password] or \[username, password, source]. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 863. + +*** + +### getBuilder + +Get the underlying SwmlBuilder for direct manipulation. + +#### Signature + +```typescript +getBuilder(): SwmlBuilder +``` + +#### Returns + +`SwmlBuilder` — The SwmlBuilder instance. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 632. + +*** + +### getDocument + +Get the SWML document as a dictionary. +Alias for `renderSwml()` that matches Python's `get_document()` name. + +#### Signature + +```typescript +getDocument(): Record +``` + +#### Returns + +`Record` — The SWML document. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 706. + +*** + +### getFunction + +Get a registered SWAIG function entry, or undefined. +(Python parity: `ToolRegistry.get_function`.) + +#### Signature + +```typescript +getFunction(name: string): Record | SwaigFunction | undefined +``` + +#### Parameters + + + +#### Returns + +`Record | SwaigFunction | undefined` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 523. + +*** + +### getRegisteredTools + +Get a summary of all registered tools with their names, descriptions, and +parameter schemas. Lifted from AgentBase so the swaig-test CLI can list +tools on a non-AgentBase SWMLService target (sidecar / standalone SWAIG +host). + +#### Signature + +```typescript +getRegisteredTools(): { description: string; name: string; parameters: Record }[] +``` + +#### Returns + +`{ description: string; name: string; parameters: Record }[]` — Array of tool descriptors. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 557. + +*** + +### getTool + +Look up a registered SwaigFunction by name. Lifted from AgentBase so +`swaig-test --exec ` works against a non-AgentBase SWMLService +target. + +#### Signature + +```typescript +getTool(name: string): SwaigFunction | undefined +``` + +#### Parameters + + + The tool name to search for. + + +#### Returns + +`SwaigFunction | undefined` — The SwaigFunction instance, or undefined if not found or not a SwaigFunction. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 581. + +*** + +### hasFunction + +Whether a SWAIG function with the given name is registered. +(Python parity: `ToolRegistry.has_function`.) + +#### Signature + +```typescript +hasFunction(name: string): boolean +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 517. + +*** + +### hasTool + +Whether a tool with the given name is registered. + +#### Signature + +```typescript +hasTool(name: string): boolean +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 511. + +*** + +### listToolNames + +List registered tool names in insertion order (Map preserves it). + +#### Signature + +```typescript +listToolNames(): string[] +``` + +#### Returns + +`string[]` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 545. + +*** + +### manualSetProxyUrl + +Manually set the proxy base URL used for webhook URL generation. +Mirrors Python's `manual_set_proxy_url()`. + +#### Signature + +```typescript +manualSetProxyUrl(url: string): this +``` + +#### Parameters + + + The external-facing base URL (trailing slashes are stripped). + + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 879. + +*** + +### onFunctionCall + +Dispatch a function call to the registered handler. +Returns null when the function isn't registered or has no handler. +Subclasses (AgentBase) override to add session-token validation +and FunctionResult-shape normalization. Return type is wide enough +to accommodate the agent override (which may also return void +shapes for fire-and-forget tool calls). + +#### Signature + +```typescript +onFunctionCall( + name: string, + args: Record, + rawData: Record +): string | void | Record | FunctionResult | Promise | FunctionResult> | null | undefined +``` + +#### Parameters + + + + + + + +#### Returns + +`string | void | Record | FunctionResult | Promise | FunctionResult> | null | undefined` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 490. + +*** + +### registerAdditionalRoutes + +Extension point: register additional Hono routes after SWMLService +mounts /health, /ready, /swaig, and the main route. AgentBase uses +this to add /post\_prompt, /check\_for\_input, /debug\_events, /mcp. + +#### Signature + +```typescript +registerAdditionalRoutes(_app: Hono): void +``` + +#### Parameters + + + +#### Returns + +`void` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 604. + +*** + +### registerRoutingCallback + +Register a routing callback at a given path. +When a POST request arrives at `path`, the callback is invoked with the +parsed request body. If it returns a string, the response is a 307 redirect +to that route; if it returns null, normal SWML serving continues. +Mirrors Python's `register_routing_callback()`. + +#### Signature + +```typescript +registerRoutingCallback( + callbackFn: RoutingCallback, + path: string = '/sip' +): void +``` + +#### Parameters + + + Callback receiving the request body and returning a route or null. + + + + HTTP path for the callback (default '/sip'). + + +#### Returns + +`void` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 742. + +*** + +### registerSwaigFunction + +Register a SwaigFunction instance or a raw function descriptor (DataMap). + +#### Signature + +```typescript +registerSwaigFunction(fn: Record | SwaigFunction): this +``` + +#### Parameters + + + +#### Returns + +`this` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 472. + +*** + +### registerVerbHandler + +Register a custom verb handler. +Mirrors Python's `register_verb_handler()`. + +#### Signature + +```typescript +registerVerbHandler(handler: SWMLVerbHandler): void +``` + +#### Parameters + + + The verb handler to register. + + +#### Returns + +`void` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 726. + +*** + +### removeFunction + +Remove a registered SWAIG function. Returns true when removed, +false when not found. (Python parity: +`ToolRegistry.remove_function`.) + +#### Signature + +```typescript +removeFunction(name: string): boolean +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 540. + +*** + +### renderDocument + +Render the SWML document as a JSON string. +Mirrors Python's `render_document()`. + +#### Signature + +```typescript +renderDocument(): string +``` + +#### Returns + +`string` — JSON-encoded SWML document. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 715. + +*** + +### renderSwml + +Render the SWML document. + +Subclass-override-friendly signature: AgentBase overrides this with +`(callId?: string, modifications?: Record): string` +to return a serialized JSON string built from prompts + dynamic config. +Plain SWMLService returns the in-memory document object. + +#### Signature + +```typescript +renderSwml( + _callId?: string, + _modifications?: Record +): string | Record +``` + +#### Parameters + + + + + +#### Returns + +`string | Record` — The SWML document (object) or its serialized form (subclass). + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 694. + +*** + +### resetDocument + +Reset the SWML document to an empty state. +Mirrors Python's `reset_document()`. + +#### Signature + +```typescript +resetDocument(): this +``` + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 679. + +*** + +### run + +Start the HTTP server. + +Matches Python's `serve()` parameters including SSL options. When +`SWAIG_CLI_MODE=true` is set in the environment (e.g. while running the +`swaig-test` CLI) the call is a no-op. + +#### Signature + +```typescript +run( + hostOrOpts?: string | { domain?: string; host?: string; port?: number; sslCert?: string; sslEnabled?: boolean; sslKey?: string }, + port?: number, + opts?: { ...4 fields } +): Promise +``` + +#### Parameters + + + + + Port. Defaults to `this.port` (constructor value) or `3000`. + + + + Optional SSL/TLS configuration overrides. + + + Domain used for HSTS header configuration. + + + + Path to the PEM certificate file. + + + + When `true`, serve over HTTPS. + + + + Path to the PEM private key file. + + + +#### Returns + +`Promise` — Resolves once the server has begun listening. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 929. + +*** + +### serve + +Start the HTTP server. Alias for [run](/docs/sdk-reference/reference/typescript/agents/swml-service#run) provided for cross-SDK +consistency with Python's `serve()` method — callers porting from +Python can use this name without changes. + +#### Signature + +```typescript +serve( + ...args: [hostOrOpts: string | { domain?: string; host?: string; port?: number; sslCert?: string; sslEnabled?: boolean; sslKey?: string }, port: number, opts: { domain?: string; sslCert?: string; sslEnabled?: boolean; sslKey?: string }] +): Promise +``` + +#### Parameters + + + Forwarded unchanged to [run](/docs/sdk-reference/reference/typescript/agents/swml-service#run). + + +#### Returns + +`Promise` — Resolves once the server has begun listening. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 1001. + +*** + +### setOnRequestCallback + +Set a callback invoked per-request to dynamically build SWML. +When set, the static SwmlBuilder is ignored and the callback's +returned SwmlBuilder is used instead. + +#### Signature + +```typescript +setOnRequestCallback(cb: OnRequestCallback): this +``` + +#### Parameters + + + Callback receiving query params, body params, and headers. + + +#### Returns + +`this` — This service for chaining. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 850. + +*** + +### stop + +Stop the HTTP server. +Mirrors Python's `stop()`. + +#### Signature + +```typescript +stop(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 1009. + +*** + +### swaigPreDispatch + +Extension point: invoked between argument parsing and function dispatch +on POST /swaig. Returns \[target, shortCircuit]: when shortCircuit is +non-null, it's returned directly without dispatching. AgentBase may +override to add session-token validation or ephemeral dynamic-config. + +#### Signature + +```typescript +swaigPreDispatch( + _requestData: Record, + _funcName: string +): [SWMLService, unknown] +``` + +#### Parameters + + + + + +#### Returns + +`[SWMLService, unknown]` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 592. + +*** + +### validateBasicAuth + +Validate provided basic-auth credentials against the configured ones +using a constant-time comparison. (Python parity: +`AuthMixin.validate_basic_auth(username, password)`.) + +#### Signature + +```typescript +validateBasicAuth( + username: string, + password: string +): boolean | Promise +``` + +#### Parameters + + + + + +#### Returns + +`boolean | Promise` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 241. + +## Type Aliases + +### OnRequestCallback + +Callback invoked per-request to dynamically build SWML. + +#### Signature + +```typescript +type OnRequestCallback = (queryParams: Record, bodyParams: Record, headers: Record) => SwmlBuilder | Promise +``` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 140. + +## Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 202. diff --git a/fern/products/sdk-reference/typescript/agents/swml-service/index__2.mdx b/fern/products/sdk-reference/typescript/agents/swml-service/index__2.mdx new file mode 100644 index 0000000000..84026cf615 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/swml-service/index__2.mdx @@ -0,0 +1,171 @@ +--- +slug: "/reference/typescript/agents/swml-service/index__2" +title: "SWMLService" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "agents.SWMLService" + parent: "agents" + module: "agents" +--- +# `SWMLService` + +## Classes + + + + Unified security configuration. Mirrors Python SDK's `SecurityConfig` — reads from env vars and optional config file. + + + + Registry for custom SWML verb handlers. Mirrors Python SDK's `VerbHandlerRegistry`. + + + +## Interfaces + +### SWMLServiceOptions + +Configuration options for SWMLService. + +#### Signature + +```typescript +interface SWMLServiceOptions +``` + +#### Properties + + + Basic auth credentials as \[username, password]. + + + + Path to a security configuration file. + + + + Host to bind the web server to (default '0.0.0.0'). + + + + Service display name. Required to match Python SDK where `name` is a positional required parameter. + + + + Port to bind the web server to (default PORT env var or 3000). + + + + HTTP route path (default '/'). + + + + Path to a JSON Schema file for verb validation. + + + + Enable schema validation (default true). Can also be disabled via SWML\_SKIP\_SCHEMA\_VALIDATION=true. + + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 155. + +*** + +### SWMLVerbHandler + +Interface for custom SWML verb handlers. +Mirrors Python SDK's `SWMLVerbHandler` abstract base class. + +#### Signature + +```typescript +interface SWMLVerbHandler +``` + +#### Methods + +##### buildConfig + +Build a verb configuration from keyword arguments. + +###### Signature + +```typescript +buildConfig(kwargs: Record): Record +``` + +###### Parameters + + + +###### Returns + +`Record` + +###### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 34. + +*** + +##### getVerbName + +Return the verb name this handler manages. + +###### Signature + +```typescript +getVerbName(): string +``` + +###### Returns + +`string` + +###### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 30. + +*** + +##### validateConfig + +Validate a verb configuration. Returns \[isValid, errorMessages]. + +###### Signature + +```typescript +validateConfig(config: Record): [boolean, string[]] +``` + +###### Parameters + + + +###### Returns + +`[boolean, string[]]` + +###### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 32. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 28. diff --git a/fern/products/sdk-reference/typescript/agents/swml-service/security-config/index.mdx b/fern/products/sdk-reference/typescript/agents/swml-service/security-config/index.mdx new file mode 100644 index 0000000000..16aeb3b7a0 --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/swml-service/security-config/index.mdx @@ -0,0 +1,128 @@ +--- +slug: "/reference/typescript/agents/swml-service/security-config" +title: "SecurityConfig" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "SWMLService.SecurityConfig" + parent: "agents.SWMLService" + module: "agents.SWMLService" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts" +--- +# `SecurityConfig` + +Unified security configuration. +Mirrors Python SDK's `SecurityConfig` — reads from env vars and optional config file. + +## Signature + +```typescript +class SecurityConfig +``` + +## Properties + + + Basic auth password from config, or null. + + + + Basic auth username from config, or null. + + + + Domain name for SSL. + + + + Filesystem path to the PEM certificate. + + + + Whether SSL is enabled. + + + + Filesystem path to the PEM private key. + + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(opts?: { ...2 fields }): SecurityConfig +``` + +#### Parameters + + + + + + + +#### Returns + +`SecurityConfig` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 82. + +*** + +### getBasicAuth + +Get basic auth credentials from security config, or null if not configured. + +#### Signature + +```typescript +getBasicAuth(): [string, string] | null +``` + +#### Returns + +`[string, string] | null` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 121. + +*** + +### validateSslConfig + +Validate that SSL cert and key files are present when SSL is enabled. + +#### Signature + +```typescript +validateSslConfig(): [boolean, string | null] +``` + +#### Returns + +`[boolean, string | null]` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 129. + +## Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 66. diff --git a/fern/products/sdk-reference/typescript/agents/swml-service/verb-handler-registry/index.mdx b/fern/products/sdk-reference/typescript/agents/swml-service/verb-handler-registry/index.mdx new file mode 100644 index 0000000000..192c46627c --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/swml-service/verb-handler-registry/index.mdx @@ -0,0 +1,122 @@ +--- +slug: "/reference/typescript/agents/swml-service/verb-handler-registry" +title: "VerbHandlerRegistry" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "SWMLService.VerbHandlerRegistry" + parent: "agents.SWMLService" + module: "agents.SWMLService" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts" +--- +# `VerbHandlerRegistry` + +Registry for custom SWML verb handlers. +Mirrors Python SDK's `VerbHandlerRegistry`. + +## Signature + +```typescript +class VerbHandlerRegistry +``` + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(): VerbHandlerRegistry +``` + +#### Returns + +`VerbHandlerRegistry` + +*** + +### getHandler + +Get the handler for a specific verb, or undefined if none registered. + +#### Signature + +```typescript +getHandler(verbName: string): SWMLVerbHandler | undefined +``` + +#### Parameters + + + +#### Returns + +`SWMLVerbHandler | undefined` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 50. + +*** + +### hasHandler + +Check whether a handler exists for the given verb. + +#### Signature + +```typescript +hasHandler(verbName: string): boolean +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 55. + +*** + +### registerHandler + +Register a custom verb handler. + +#### Signature + +```typescript +registerHandler(handler: SWMLVerbHandler): void +``` + +#### Parameters + + + +#### Returns + +`void` + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 45. + +## Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 41. diff --git a/fern/products/sdk-reference/typescript/agents/web-service/index.mdx b/fern/products/sdk-reference/typescript/agents/web-service/index.mdx new file mode 100644 index 0000000000..515dd15f1c --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/web-service/index.mdx @@ -0,0 +1,272 @@ +--- +slug: "/reference/typescript/agents/web-service" +title: "WebService" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "WebService" + parent: "agents" + module: "agents" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/WebService.ts" +--- +# `WebService` + +Static file serving service with HTTP API. + +Provides configurable static file hosting with per-route directory mounting, +extension filtering, file size limits, HTTP Basic Auth, CORS, directory +browsing, and optional SSL/TLS. Mirrors the Python SDK's `WebService` class. + +Useful when an agent or prefab needs to serve supporting assets — prompts, audio +files, images — from the same process without running a separate nginx / CDN. + +## Signature + +```typescript +class WebService +``` + +## Examples + +```typescript +import { WebService } from '@signalwire/sdk'; + +const web = new WebService({ + port: 8080, + directories: { '/audio': './public/audio' }, + allowedExtensions: ['.mp3', '.wav'], +}); + +await web.serve(); +// GET http://host:8080/audio/greeting.mp3 +``` + +## Properties + + + Allowlist of file extensions, or null to allow all (subject to blocklist). + + + + Blocklist of file extensions and file names. + + + + Map of URL route prefixes to local directory paths. + + + + Whether CORS is enabled. + + + + Whether directory listings are enabled. + + + + Maximum file size in bytes that will be served. + + + + Port the service binds to. + + + + The SSL/TLS configuration for this service. Mirrors the Python SDK's `security` attribute (`SecurityConfig`), which exposes SSL settings for post-construction inspection. In the Python SDK `SecurityConfig` also covers CORS origins, HSTS, allowed hosts, and rate limiting; in this SDK those concerns are configured via their own constructor options (`enableCors`, `ssl`, etc.) and Hono middleware rather than a single combined object. + + +## Methods + +### addDirectory + +Add a new directory to serve at a URL route prefix. + +#### Signature + +```typescript +addDirectory(route: string, directory: string): void +``` + +#### Parameters + + + URL prefix (e.g. '/docs'). + + + + Local directory path to serve. + + +#### Returns + +`void` + +#### Throws + +- If the directory does not exist or is not a directory. + +#### Source + +[`src/WebService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/WebService.ts) + +Line 184. + +*** + +### constructor + +Create a WebService. + +#### Signature + +```typescript +constructor(options?: WebServiceOptions): WebService +``` + +#### Parameters + + + Configuration options for the service. + + +#### Returns + +`WebService` + +#### Source + +[`src/WebService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/WebService.ts) + +Line 152. + +*** + +### getApp + +Get the Hono application for mounting or testing. + +#### Signature + +```typescript +getApp(): Hono +``` + +#### Returns + +`Hono` — The configured Hono app. + +#### Source + +[`src/WebService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/WebService.ts) + +Line 218. + +*** + +### removeDirectory + +Remove a previously added directory route from the bookkeeping map. + +Note: Hono does not support dynamic route removal; a server restart +is required for the route to fully stop responding. + +#### Signature + +```typescript +removeDirectory(route: string): void +``` + +#### Parameters + + + The URL route prefix to remove. + + +#### Returns + +`void` + +#### Source + +[`src/WebService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/WebService.ts) + +Line 207. + +*** + +### start + +Start the HTTP(S) service. + +When `SWAIG_CLI_MODE=true` is set in the environment, the call is a +no-op so config can be inspected without binding a port. + +#### Signature + +```typescript +start( + host?: string, + port?: number, + sslCert?: string, + sslKey?: string +): Promise +``` + +#### Parameters + + + Bind address. Defaults to `'0.0.0.0'`. + + + + Port override. Defaults to `this.port`. + + + + Path to SSL certificate file (overrides `SslConfig`). + + + + Path to SSL key file (overrides `SslConfig`). + + +#### Returns + +`Promise` — Resolves once the server has begun listening. + +#### Source + +[`src/WebService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/WebService.ts) + +Line 250. + +*** + +### stop + +Stop the service and release resources. + +#### Signature + +```typescript +stop(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/WebService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/WebService.ts) + +Line 302. + +## Source + +[`src/WebService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/WebService.ts) + +Line 120. diff --git a/fern/products/sdk-reference/typescript/agents/web-service/index__2.mdx b/fern/products/sdk-reference/typescript/agents/web-service/index__2.mdx new file mode 100644 index 0000000000..6c54331d5d --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/web-service/index__2.mdx @@ -0,0 +1,74 @@ +--- +slug: "/reference/typescript/agents/web-service/index__2" +title: "WebService" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "agents.WebService" + parent: "agents" + module: "agents" +--- +# `WebService` + +## Interfaces + +### WebServiceOptions + +Configuration options for WebService. + +#### Signature + +```typescript +interface WebServiceOptions +``` + +#### Properties + + + Allowlist of file extensions (e.g. \['.html', '.css']). Default: all allowed. + + + + Basic auth credentials as \[username, password]. Default: none. + + + + Blocklist of file extensions or names. Default: \['.env', '.git', '.gitignore', '.key', '.pem', '.crt', '.pyc', '**pycache**', '.DS\_Store', '.swp'] + + + + Path to a JSON config file. Default: none. + + + + Map of URL route prefixes to local directory paths. Default: \{\}. + + + + Enable CORS. Default: true. + + + + Serve directory listings and fall back to index.html. Default: false. + + + + Maximum file size in bytes. Default: 104857600 (100 MB). + + + + Port to bind to. Default: 8002. + + + + SSL/TLS configuration options. + + +#### Source + +[`src/WebService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/WebService.ts) + +Line 53. diff --git a/fern/products/sdk-reference/typescript/auth-handler/index.mdx b/fern/products/sdk-reference/typescript/auth-handler/index.mdx deleted file mode 100644 index 2680520872..0000000000 --- a/fern/products/sdk-reference/typescript/auth-handler/index.mdx +++ /dev/null @@ -1,385 +0,0 @@ ---- -slug: "/reference/typescript/auth-handler" -title: "AuthHandler" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "AuthHandler" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/AuthHandler.ts" ---- -# `AuthHandler` - -Multi-method authentication handler with timing-safe credential comparison. - -## Signature - -```typescript -class AuthHandler -``` - -## Properties - - - The authentication configuration for this handler. - - -## Methods - -### constructor - -Create a new AuthHandler. - -#### Signature - -```typescript -constructor(config: AuthConfig): AuthHandler -``` - -#### Parameters - - - Authentication configuration specifying one or more auth methods. - - -#### Returns - -`AuthHandler` - -#### Source - -[`src/AuthHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AuthHandler.ts) - -Line 50. - -*** - -### expressMiddleware - -Create an Express/Connect-compatible middleware adapter. - -This serves as the framework-agnostic equivalent of Python's -`get_fastapi_dependency`. For standalone validation without a -framework, use [validate](/docs/sdk-reference/reference/typescript/auth-handler#validate) directly. - -#### Signature - -```typescript -expressMiddleware( - optional: boolean = false -): (req: any, res: any, next: () => void) => Promise -``` - -#### Parameters - - - When true, unauthenticated requests are allowed through (default: false). - - -#### Returns - -`(req: any, res: any, next: () => void) => Promise` — An Express-compatible middleware function. - -#### Source - -[`src/AuthHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AuthHandler.ts) - -Line 186. - -*** - -### getAuthInfo - -Get information about configured authentication methods. - -Returns structured metadata describing each enabled auth method, -including usernames, header names, and usage hints. - -#### Signature - -```typescript -getAuthInfo(): { apiKey?: { enabled: true; header: string; hint: string }; basic?: { enabled: true; username: string }; bearer?: { enabled: true; hint: string } } -``` - -#### Returns - -`{ apiKey?: { enabled: true; header: string; hint: string }; basic?: { enabled: true; username: string }; bearer?: { enabled: true; hint: string } }` — An object describing the enabled auth methods and their configuration. - -#### Source - -[`src/AuthHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AuthHandler.ts) - -Line 206. - -*** - -### hasApiKeyAuth - -Check whether API key authentication is configured. - -#### Signature - -```typescript -hasApiKeyAuth(): boolean -``` - -#### Returns - -`boolean` — True if an API key has been set. - -#### Source - -[`src/AuthHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AuthHandler.ts) - -Line 245. - -*** - -### hasBasicAuth - -Check whether Basic authentication is configured. - -#### Signature - -```typescript -hasBasicAuth(): boolean -``` - -#### Returns - -`boolean` — True if basic auth credentials have been set. - -#### Source - -[`src/AuthHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AuthHandler.ts) - -Line 253. - -*** - -### hasBearerAuth - -Check whether Bearer token authentication is configured. - -#### Signature - -```typescript -hasBearerAuth(): boolean -``` - -#### Returns - -`boolean` — True if a bearer token has been set. - -#### Source - -[`src/AuthHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AuthHandler.ts) - -Line 237. - -*** - -### middleware - -Create a Hono-compatible middleware that rejects unauthorized requests with a 401 response. - -#### Signature - -```typescript -middleware( - optional: boolean = false -): (c: any, next: () => Promise) => Promise -``` - -#### Parameters - - - When true, unauthenticated requests are allowed through instead of being rejected (default: false). - - -#### Returns - -`(c: any, next: () => Promise) => Promise` — A middleware function suitable for use with Hono's `app.use()`. - -#### Source - -[`src/AuthHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AuthHandler.ts) - -Line 163. - -*** - -### validate - -Validate request headers against configured auth methods (Bearer, API Key, Basic, Custom) in order. - -#### Signature - -```typescript -validate(headers: Record): Promise -``` - -#### Parameters - - - The request headers as a string-keyed record. - - -#### Returns - -`Promise` — True if any configured method accepts the request, or if no methods are configured. - -#### Source - -[`src/AuthHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AuthHandler.ts) - -Line 59. - -*** - -### verifyApiKey - -Verify an API key against the configured key. - -Returns false immediately if API key auth is not configured. -Uses constant-time comparison to prevent timing attacks. - -#### Signature - -```typescript -verifyApiKey(key: string): boolean -``` - -#### Parameters - - - The API key string to verify. - - -#### Returns - -`boolean` — True if the key matches the configured API key. - -#### Source - -[`src/AuthHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AuthHandler.ts) - -Line 153. - -*** - -### verifyBasicAuth - -Verify a Basic Auth username/password pair against the configured credentials. - -Returns false immediately if Basic Auth is not configured. -Uses constant-time comparison to prevent timing attacks. - -#### Signature - -```typescript -verifyBasicAuth(username: string, password: string): boolean -``` - -#### Parameters - - - The username to verify. - - - - The password to verify. - - -#### Returns - -`boolean` — True if the credentials match the configured Basic Auth credentials. - -#### Source - -[`src/AuthHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AuthHandler.ts) - -Line 124. - -*** - -### verifyBearerToken - -Verify a Bearer token against the configured token. - -Returns false immediately if Bearer token auth is not configured. -Uses constant-time comparison to prevent timing attacks. - -#### Signature - -```typescript -verifyBearerToken(token: string): boolean -``` - -#### Parameters - - - The Bearer token string to verify (without the "Bearer " prefix). - - -#### Returns - -`boolean` — True if the token matches the configured Bearer token. - -#### Source - -[`src/AuthHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AuthHandler.ts) - -Line 139. - -## Interfaces - -### AuthConfig - -Configuration for one or more authentication methods checked by [AuthHandler](/docs/sdk-reference/reference/typescript/auth-handler). - -#### Signature - -```typescript -interface AuthConfig -``` - -#### Properties - - - When explicitly set to false, deny requests if no auth methods are configured. - - - - API key matched against the X-Api-Key header. - - - - Custom header name for API key lookup (default: 'X-Api-Key'). - - - - Basic auth credentials as a \[username, password] tuple. - - - - Bearer token matched against the Authorization header. - - - - Custom validator function; return true to allow the request. - - -#### Source - -[`src/AuthHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AuthHandler.ts) - -Line 14. - -## Source - -[`src/AuthHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AuthHandler.ts) - -Line 42. diff --git a/fern/products/sdk-reference/typescript/cli/agent-loader/index.mdx b/fern/products/sdk-reference/typescript/cli/agent-loader/index.mdx deleted file mode 100644 index e4e6b48712..0000000000 --- a/fern/products/sdk-reference/typescript/cli/agent-loader/index.mdx +++ /dev/null @@ -1,86 +0,0 @@ ---- -slug: "/reference/typescript/cli/agent-loader" -title: "agent-loader" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "module" - language: "typescript" - qualified_name: "cli.agent-loader" - module: "cli" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/cli/agent-loader.ts" ---- -# `agent-loader` - -## Signature - -```typescript -module agent-loader -``` - -## Functions - -### listAgents - -List all exported agent instances and classes in a module. - -#### Signature - -```typescript -listAgents(agentPath: string): Promise -``` - -#### Parameters - - - Path to the agent module file. - - -#### Returns - -`Promise` — Array of export names that are AgentBase instances or subclasses. - -#### Source - -[`src/cli/agent-loader.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/cli/agent-loader.ts) - -Line 157. - -*** - -### loadAgent - -Dynamically import an agent file and resolve an AgentBase instance using duck-typing heuristics. - -#### Signature - -```typescript -loadAgent(agentPath: string, agentClass?: string): Promise -``` - -#### Parameters - - - Path to the agent module file. - - - - Optional name of a specific exported class or instance to use. - - -#### Returns - -`Promise` — The resolved AgentBase instance. - -#### Source - -[`src/cli/agent-loader.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/cli/agent-loader.ts) - -Line 86. - -## Source - -[`src/cli/agent-loader.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/cli/agent-loader.ts) - -Line 1. diff --git a/fern/products/sdk-reference/typescript/cli/mock-data/index.mdx b/fern/products/sdk-reference/typescript/cli/mock-data/index.mdx deleted file mode 100644 index b2e2a2a093..0000000000 --- a/fern/products/sdk-reference/typescript/cli/mock-data/index.mdx +++ /dev/null @@ -1,146 +0,0 @@ ---- -slug: "/reference/typescript/cli/mock-data" -title: "mock-data" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "module" - language: "typescript" - qualified_name: "cli.mock-data" - module: "cli" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/cli/mock-data.ts" ---- -# `mock-data` - -## Signature - -```typescript -module mock-data -``` - -## Functions - -### generateFakePostData - -Generate a full mock POST body simulating an inbound SignalWire call request. - -#### Signature - -```typescript -generateFakePostData(opts?: MockCallOptions): Record -``` - -#### Parameters - - - Optional overrides for call metadata fields. - - -#### Returns - -`Record` — A record representing the simulated call POST data. - -#### Source - -[`src/cli/mock-data.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/cli/mock-data.ts) - -Line 40. - -*** - -### generateMinimalPostData - -Generate a minimal mock POST body for executing a single SWAIG function. - -#### Signature - -```typescript -generateMinimalPostData( - fnName: string, - args?: Record, - opts?: { ...2 fields } -): Record -``` - -#### Parameters - - - Name of the SWAIG function to invoke. - - - - Arguments to pass to the function. - - - - Optional call ID and field overrides. - - - - - - -#### Returns - -`Record` — A record representing the minimal POST data for function execution. - -#### Source - -[`src/cli/mock-data.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/cli/mock-data.ts) - -Line 89. - -## Interfaces - -### MockCallOptions - -Options for generating mock call data in CLI testing. - -#### Signature - -```typescript -interface MockCallOptions -``` - -#### Properties - - - Direction of the call. - - - - Override the auto-generated call ID. - - - - Current call state (e.g. "active", "ringing", "hold"). - - - - Call transport type. - - - - Caller's phone number. - - - - Additional key-value overrides merged into the post data. - - - - Destination extension or agent name. - - -#### Source - -[`src/cli/mock-data.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/cli/mock-data.ts) - -Line 9. - -## Source - -[`src/cli/mock-data.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/cli/mock-data.ts) - -Line 1. diff --git a/fern/products/sdk-reference/typescript/cli/swaig-test/index.mdx b/fern/products/sdk-reference/typescript/cli/swaig-test/index.mdx deleted file mode 100644 index 50af995ac2..0000000000 --- a/fern/products/sdk-reference/typescript/cli/swaig-test/index.mdx +++ /dev/null @@ -1,26 +0,0 @@ ---- -slug: "/reference/typescript/cli/swaig-test" -title: "swaig-test" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "module" - language: "typescript" - qualified_name: "cli.swaig-test" - module: "cli" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/cli/swaig-test.ts" ---- -# `swaig-test` - -## Signature - -```typescript -module swaig-test -``` - -## Source - -[`src/cli/swaig-test.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/cli/swaig-test.ts) - -Line 1. diff --git a/fern/products/sdk-reference/typescript/config-loader/index.mdx b/fern/products/sdk-reference/typescript/config-loader/index.mdx deleted file mode 100644 index 0d3e0dfc62..0000000000 --- a/fern/products/sdk-reference/typescript/config-loader/index.mdx +++ /dev/null @@ -1,543 +0,0 @@ ---- -slug: "/reference/typescript/config-loader" -title: "ConfigLoader" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "ConfigLoader" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/ConfigLoader.ts" ---- -# `ConfigLoader` - -JSON configuration file loader with environment variable interpolation and dot-notation access. - -## Signature - -```typescript -class ConfigLoader -``` - -## Properties - - - Get the ordered list of config file paths that were passed/searched. - - -## Methods - -### constructor - -Create a new ConfigLoader, optionally loading a JSON file immediately. - -Accepts a single file path or an array of paths. When given an array, -the loader iterates in order and loads the first file that exists -(mirroring Python's ordered-search behaviour). - -#### Signature - -```typescript -constructor(filePaths?: string | string[]): ConfigLoader -``` - -#### Parameters - - - Path(s) to a JSON config file to load on construction. - - -#### Returns - -`ConfigLoader` - -#### Source - -[`src/ConfigLoader.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ConfigLoader.ts) - -Line 33. - -*** - -### findConfigFile - -Find a config file path without loading it. - -Searches service-specific filenames, additional paths, and default paths. -Returns the first found path string or null. - -**Modifiers:** `static` - -#### Signature - -```typescript -findConfigFile(serviceName?: string, additionalPaths?: string[]): string | null -``` - -#### Parameters - - - Optional service name for service-specific config filenames. - - - - Additional file paths to check. - - -#### Returns - -`string | null` — Path to the first config file found, or null. - -#### Source - -[`src/ConfigLoader.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ConfigLoader.ts) - -Line 109. - -*** - -### get - -Retrieve a configuration value using a dot-notation path (e.g. `'server.port'`). - -#### Signature - -```typescript -get(path: string, defaultValue?: T): T -``` - -#### Type Parameters - - - -#### Parameters - - - Dot-separated key path into the config object. - - - - Value returned when the path does not exist. - - -#### Returns - -`T` — The resolved value, or defaultValue if not found. - -#### Source - -[`src/ConfigLoader.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ConfigLoader.ts) - -Line 182. - -*** - -### getAll - -Return a shallow copy of the entire configuration object. - -#### Signature - -```typescript -getAll(): Record -``` - -#### Returns - -`Record` — A copy of the top-level config data. - -#### Source - -[`src/ConfigLoader.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ConfigLoader.ts) - -Line 247. - -*** - -### getConfig - -Alias for [getAll](/docs/sdk-reference/reference/typescript/config-loader#get-all) — matches the Python SDK's `get_config()` method name. - -#### Signature - -```typescript -getConfig(): Record -``` - -#### Returns - -`Record` — A copy of the top-level config data. - -#### Source - -[`src/ConfigLoader.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ConfigLoader.ts) - -Line 255. - -*** - -### getConfigFile - -Alias for [getFilePath](/docs/sdk-reference/reference/typescript/config-loader#get-file-path) — matches the Python SDK's `get_config_file()` method name. - -#### Signature - -```typescript -getConfigFile(): string | null -``` - -#### Returns - -`string | null` — The file path, or null if config was loaded from an object. - -#### Source - -[`src/ConfigLoader.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ConfigLoader.ts) - -Line 271. - -*** - -### getFilePath - -Return the absolute path of the loaded config file, if any. - -#### Signature - -```typescript -getFilePath(): string | null -``` - -#### Returns - -`string | null` — The file path, or null if config was loaded from an object. - -#### Source - -[`src/ConfigLoader.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ConfigLoader.ts) - -Line 263. - -*** - -### getSection - -Get an entire configuration section with all environment variables substituted. - -#### Signature - -```typescript -getSection(section: string): Record -``` - -#### Parameters - - - The top-level section name (e.g. 'security', 'server'). - - -#### Returns - -`Record` — The configuration section as an object, or an empty object if not found. - -#### Source - -[`src/ConfigLoader.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ConfigLoader.ts) - -Line 298. - -*** - -### has - -Check whether a dot-notation path exists in the loaded configuration. - -#### Signature - -```typescript -has(path: string): boolean -``` - -#### Parameters - - - Dot-separated key path to check. - - -#### Returns - -`boolean` — True if the path resolves to a defined value. - -#### Source - -[`src/ConfigLoader.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ConfigLoader.ts) - -Line 229. - -*** - -### hasConfig - -Check if a configuration was loaded. - -**Deliberate deviation from Python `has_config()`:** Python returns `True` -only when a file was loaded (`self._config is not None`). This TypeScript -implementation also returns `true` when data was loaded via -[loadFromObject](/docs/sdk-reference/reference/typescript/config-loader#load-from-object), because `loadFromObject` is an extra TS-only method -with no Python equivalent. Treating object-loaded data as "configured" is -the correct semantic for the TS API surface. - -If you need file-load-only detection, check `this.getFilePath() !== null`. - -#### Signature - -```typescript -hasConfig(): boolean -``` - -#### Returns - -`boolean` — True if configuration data exists (from file or object). - -#### Source - -[`src/ConfigLoader.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ConfigLoader.ts) - -Line 289. - -*** - -### interpolateEnvVars - -Interpolate $\{VAR|default\} patterns in a raw string. - -#### Signature - -```typescript -interpolateEnvVars(input: string): string -``` - -#### Parameters - - - The string containing env var references. - - -#### Returns - -`string` — The string with all env var references resolved. - -#### Source - -[`src/ConfigLoader.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ConfigLoader.ts) - -Line 439. - -*** - -### load - -Load configuration from a JSON file, performing `${VAR|default}` env var interpolation on the raw text. - -#### Signature - -```typescript -load(filePath: string): this -``` - -#### Parameters - - - Path to the JSON config file. - - -#### Returns - -`this` — This instance for chaining. - -#### Source - -[`src/ConfigLoader.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ConfigLoader.ts) - -Line 65. - -*** - -### loadFromObject - -Load configuration from a plain object instead of a file, useful for testing or programmatic setup. - -#### Signature - -```typescript -loadFromObject(obj: Record): this -``` - -#### Parameters - - - The configuration object to use. - - -#### Returns - -`this` — This instance for chaining. - -#### Source - -[`src/ConfigLoader.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ConfigLoader.ts) - -Line 428. - -*** - -### mergeWithEnv - -Merge configuration with environment variables that match a prefix. - -Config file values take precedence over environment variables. Matching -env var keys are stripped of the prefix, lowercased, split on `_`, and -written into a nested object (e.g. `SWML_FOO_BAR` → `{ foo: { bar: v } }`). -Mirrors Python's `merge_with_env` in -`signalwire/signalwire/core/config_loader.py`. - -#### Signature - -```typescript -mergeWithEnv(envPrefix: string = 'SWML_'): Record -``` - -#### Parameters - - - Prefix for environment variables to consider (default: `'SWML_'`). - - -#### Returns - -`Record` — Merged configuration dictionary. - -#### Source - -[`src/ConfigLoader.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ConfigLoader.ts) - -Line 367. - -*** - -### search - -Search for a config file in standard locations. - -Default search paths: CWD, `./config`, `$HOME/.signalwire`, -`.swml/`, `$HOME/.swml/`, `/etc/swml/`. - -**Modifiers:** `static` - -#### Signature - -```typescript -search( - filename: string, - additionalPaths?: string[], - serviceName?: string -): ConfigLoader | null -``` - -#### Parameters - - - The config file name to search for. - - - - Extra directories to search before the defaults. - - - - Optional service name; prepends service-specific filenames to the search. - - -#### Returns - -`ConfigLoader | null` — A loaded ConfigLoader if found, or null if the file does not exist in any search path. - -#### Source - -[`src/ConfigLoader.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ConfigLoader.ts) - -Line 88. - -*** - -### set - -Set a configuration value at the given dot-notation path, creating intermediate objects as needed. - -#### Signature - -```typescript -set(path: string, value: unknown): this -``` - -#### Parameters - - - Dot-separated key path into the config object. - - - - The value to store. - - -#### Returns - -`this` — This instance for chaining. - -#### Source - -[`src/ConfigLoader.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ConfigLoader.ts) - -Line 205. - -*** - -### substituteVars - -Recursively substitute `${VAR|default}` environment variables in any value. - -Walks strings, objects, and arrays. Coerces result strings to boolean -(`"true"` / `"false"`) or number when appropriate. - -#### Signature - -```typescript -substituteVars(value: unknown, maxDepth: number = 10): unknown -``` - -#### Parameters - - - The value to process (string, object, array, or primitive). - - - - Maximum recursion depth to prevent infinite loops (default: 10). - - -#### Returns - -`unknown` — The value with all environment variables substituted. - -#### Source - -[`src/ConfigLoader.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ConfigLoader.ts) - -Line 316. - -## Source - -[`src/ConfigLoader.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ConfigLoader.ts) - -Line 15. diff --git a/fern/products/sdk-reference/typescript/context-builder/context/index.mdx b/fern/products/sdk-reference/typescript/context-builder/context/index.mdx deleted file mode 100644 index 878947c46f..0000000000 --- a/fern/products/sdk-reference/typescript/context-builder/context/index.mdx +++ /dev/null @@ -1,764 +0,0 @@ ---- -slug: "/reference/typescript/context-builder/context" -title: "Context" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "ContextBuilder.Context" - parent: "ContextBuilder" - module: "ContextBuilder" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts" ---- -# `Context` - -A named context containing ordered steps, prompt configuration, and navigation rules. - -## Signature - -```typescript -class Context -``` - -## Properties - - - The unique name identifying this context. - - -## Methods - -### addBullets - -Adds a POM section with bullets to the context prompt, mutually exclusive with raw prompt text. - -#### Signature - -```typescript -addBullets(title: string, bullets: string[]): this -``` - -#### Parameters - - - The section heading. - - - - The list of bullet point strings. - - -#### Returns - -`this` — This context for chaining. - -#### Source - -[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) - -Line 757. - -*** - -### addEnterFiller - -Adds enter filler phrases for a specific language. - -#### Signature - -```typescript -addEnterFiller(languageCode: string, fillers: string[]): this -``` - -#### Parameters - - - The language code (e.g., "en-US"). - - - - Array of filler phrases. - - -#### Returns - -`this` — This context for chaining. - -#### Source - -[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) - -Line 789. - -*** - -### addExitFiller - -Adds exit filler phrases for a specific language. - -#### Signature - -```typescript -addExitFiller(languageCode: string, fillers: string[]): this -``` - -#### Parameters - - - The language code (e.g., "en-US"). - - - - Array of filler phrases. - - -#### Returns - -`this` — This context for chaining. - -#### Source - -[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) - -Line 801. - -*** - -### addSection - -Adds a POM section with a body to the context prompt, mutually exclusive with raw prompt text. - -#### Signature - -```typescript -addSection(title: string, body: string): this -``` - -#### Parameters - - - The section heading. - - - - The section body text. - - -#### Returns - -`this` — This context for chaining. - -#### Source - -[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) - -Line 745. - -*** - -### addStep - -Adds a new step to this context. - -#### Signature - -```typescript -addStep(name: string, opts?: { ...5 fields }): Step -``` - -#### Parameters - - - The unique step name within this context. - - - - Optional shorthand for task text, bullets, criteria, functions, and valid steps. - - - - - - - - - - - - -#### Returns - -`Step` — The newly created Step for further configuration. - -#### Source - -[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) - -Line 532. - -*** - -### addSystemBullets - -Adds a POM section with bullets to the system prompt, mutually exclusive with raw system prompt text. - -#### Signature - -```typescript -addSystemBullets(title: string, bullets: string[]): this -``` - -#### Parameters - - - The section heading. - - - - The list of bullet point strings. - - -#### Returns - -`this` — This context for chaining. - -#### Source - -[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) - -Line 722. - -*** - -### addSystemSection - -Adds a POM section to the system prompt, mutually exclusive with raw system prompt text. - -#### Signature - -```typescript -addSystemSection(title: string, body: string): this -``` - -#### Parameters - - - The section heading. - - - - The section body text. - - -#### Returns - -`this` — This context for chaining. - -#### Source - -[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) - -Line 710. - -*** - -### constructor - -Creates a new Context. - -#### Signature - -```typescript -constructor(name: string): Context -``` - -#### Parameters - - - The unique context name. - - -#### Returns - -`Context` - -#### Source - -[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) - -Line 522. - -*** - -### getStep - -Returns a step by name. - -#### Signature - -```typescript -getStep(name: string): Step | undefined -``` - -#### Parameters - - - The step name to retrieve. - - -#### Returns - -`Step | undefined` — The matching Step, or undefined if not found. - -#### Source - -[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) - -Line 562. - -*** - -### moveStep - -Moves a step to a new position in the step order. - -#### Signature - -```typescript -moveStep(name: string, position: number): this -``` - -#### Parameters - - - The step name to move. - - - - The zero-based index to insert at. - - -#### Returns - -`this` — This context for chaining. - -#### Source - -[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) - -Line 583. - -*** - -### removeStep - -Removes a step from this context by name. - -#### Signature - -```typescript -removeStep(name: string): this -``` - -#### Parameters - - - The step name to remove. - - -#### Returns - -`this` — This context for chaining. - -#### Source - -[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) - -Line 571. - -*** - -### setConsolidate - -Sets whether to consolidate conversation history when entering this context. - -#### Signature - -```typescript -setConsolidate(consolidate: boolean): this -``` - -#### Parameters - - - Whether to consolidate. - - -#### Returns - -`this` — This context for chaining. - -#### Source - -[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) - -Line 636. - -*** - -### setEnterFillers - -Sets filler phrases spoken when entering this context, keyed by language code. - -#### Signature - -```typescript -setEnterFillers(fillers: Record): this -``` - -#### Parameters - - - Map of language codes to arrays of filler phrases. - - -#### Returns - -`this` — This context for chaining. - -#### Source - -[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) - -Line 768. - -*** - -### setExitFillers - -Sets filler phrases spoken when exiting this context, keyed by language code. - -#### Signature - -```typescript -setExitFillers(fillers: Record): this -``` - -#### Parameters - - - Map of language codes to arrays of filler phrases. - - -#### Returns - -`this` — This context for chaining. - -#### Source - -[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) - -Line 778. - -*** - -### setFullReset - -Sets whether to fully reset conversation history when entering this context. - -#### Signature - -```typescript -setFullReset(fullReset: boolean): this -``` - -#### Parameters - - - Whether to fully reset. - - -#### Returns - -`this` — This context for chaining. - -#### Source - -[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) - -Line 646. - -*** - -### setInitialStep - -Set which step the context starts on when entered. - -By default, a context starts on its first step (index 0). Use this to -skip a preamble step on re-entry via `change_context`. - -#### Signature - -```typescript -setInitialStep(stepName: string): this -``` - -#### Parameters - - - Name of the step to start on. Must exist in this context (validated by ContextBuilder.validate()). - - -#### Returns - -`this` — This context for chaining. - -#### Source - -[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) - -Line 670. - -*** - -### setIsolated - -Mark this context as isolated — entering it wipes conversation history. - -When `isolated=true` and the context is entered via change\_context, the -runtime wipes the conversation array. The model starts fresh with only -the new context's systemPrompt + step instructions, with no memory of -prior turns. - -EXCEPTION — `reset` overrides the wipe: -If the context also has a `reset` configuration (via consolidate or -full\_reset), the wipe is skipped in favor of the reset behavior. Use -reset with consolidate=true to summarize prior history into a single -message instead of dropping it entirely. - -Use cases: - -- Switching to a sensitive billing flow that should not see prior - small-talk -- Handing off to a different agent persona -- Resetting after a long off-topic detour - -#### Signature - -```typescript -setIsolated(isolated: boolean): this -``` - -#### Parameters - - - True to wipe conversation history on context entry (subject to the reset exception above). - - -#### Returns - -`this` — This context for chaining. - -#### Source - -[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) - -Line 699. - -*** - -### setPostPrompt - -Sets the post-prompt text for this context. - -#### Signature - -```typescript -setPostPrompt(postPrompt: string): this -``` - -#### Parameters - - - The post-prompt string. - - -#### Returns - -`this` — This context for chaining. - -#### Source - -[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) - -Line 615. - -*** - -### setPrompt - -Sets raw prompt text for this context, mutually exclusive with POM prompt sections. - -#### Signature - -```typescript -setPrompt(prompt: string): this -``` - -#### Parameters - - - The prompt string. - - -#### Returns - -`this` — This context for chaining. - -#### Source - -[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) - -Line 733. - -*** - -### setSystemPrompt - -Sets raw system prompt text, mutually exclusive with system POM sections. - -#### Signature - -```typescript -setSystemPrompt(systemPrompt: string): this -``` - -#### Parameters - - - The system prompt string. - - -#### Returns - -`this` — This context for chaining. - -#### Source - -[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) - -Line 625. - -*** - -### setUserPrompt - -Sets the user prompt text for this context. - -#### Signature - -```typescript -setUserPrompt(userPrompt: string): this -``` - -#### Parameters - - - The user prompt string. - - -#### Returns - -`this` — This context for chaining. - -#### Source - -[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) - -Line 656. - -*** - -### setValidContexts - -Sets which contexts the AI may navigate to from this context. - -#### Signature - -```typescript -setValidContexts(contexts: string[]): this -``` - -#### Parameters - - - List of allowed context names. - - -#### Returns - -`this` — This context for chaining. - -#### Source - -[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) - -Line 595. - -*** - -### setValidSteps - -Sets which steps the AI may navigate to from this context. - -#### Signature - -```typescript -setValidSteps(steps: string[]): this -``` - -#### Parameters - - - List of allowed step names. - - -#### Returns - -`this` — This context for chaining. - -#### Source - -[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) - -Line 605. - -*** - -### toDict - -Serializes this context and all its steps to a plain object for SWML output. - -#### Signature - -```typescript -toDict(): Record -``` - -#### Returns - -`Record` — A dictionary representation of this context. - -#### Source - -[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) - -Line 854. - -## Source - -[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) - -Line 498. diff --git a/fern/products/sdk-reference/typescript/context-builder/gather-info/index.mdx b/fern/products/sdk-reference/typescript/context-builder/gather-info/index.mdx deleted file mode 100644 index c0770d6f67..0000000000 --- a/fern/products/sdk-reference/typescript/context-builder/gather-info/index.mdx +++ /dev/null @@ -1,147 +0,0 @@ ---- -slug: "/reference/typescript/context-builder/gather-info" -title: "GatherInfo" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "ContextBuilder.GatherInfo" - parent: "ContextBuilder" - module: "ContextBuilder" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts" ---- -# `GatherInfo` - -Collects structured information from the user through a series of questions. - -## Signature - -```typescript -class GatherInfo -``` - -## Methods - -### addQuestion - -Adds a question to this gather operation. - -#### Signature - -```typescript -addQuestion(opts: { ...6 fields }): this -``` - -#### Parameters - - - Question configuration including key, question text, and optional type/confirm/prompt/functions. - - - - - - - - - - - - - - -#### Returns - -`this` — This GatherInfo for chaining. - -#### Source - -[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) - -Line 105. - -*** - -### constructor - -Creates a new GatherInfo. - -#### Signature - -```typescript -constructor(opts?: { ...3 fields }): GatherInfo -``` - -#### Parameters - - - Optional output key, completion action, and prompt configuration. - - - - - - - - -#### Returns - -`GatherInfo` - -#### Source - -[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) - -Line 94. - -*** - -### getQuestions - -Returns all questions in this gather operation. - -#### Signature - -```typescript -getQuestions(): GatherQuestion[] -``` - -#### Returns - -`GatherQuestion[]` — The array of GatherQuestion instances. - -#### Source - -[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) - -Line 121. - -*** - -### toDict - -Serializes this gather operation to a plain object for SWML output. - -#### Signature - -```typescript -toDict(): Record -``` - -#### Returns - -`Record` — A dictionary representation of the gather info and its questions. - -#### Source - -[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) - -Line 137. - -## Source - -[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) - -Line 84. diff --git a/fern/products/sdk-reference/typescript/context-builder/gather-question/index.mdx b/fern/products/sdk-reference/typescript/context-builder/gather-question/index.mdx deleted file mode 100644 index 9ea76b539c..0000000000 --- a/fern/products/sdk-reference/typescript/context-builder/gather-question/index.mdx +++ /dev/null @@ -1,117 +0,0 @@ ---- -slug: "/reference/typescript/context-builder/gather-question" -title: "GatherQuestion" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "ContextBuilder.GatherQuestion" - parent: "ContextBuilder" - module: "ContextBuilder" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts" ---- -# `GatherQuestion` - -Represents a single question within a gather operation. - -## Signature - -```typescript -class GatherQuestion -``` - -## Properties - - - Whether the answer requires user confirmation. - - - - Optional list of SWAIG function names available during this question. - - - - Unique key used to store the answer. - - - - Optional additional prompt context for this question. - - - - The question text presented to the user. - - - - Expected answer type (e.g., "string", "number"). - - -## Methods - -### constructor - -Creates a new GatherQuestion. - -#### Signature - -```typescript -constructor(opts: { ...6 fields }): GatherQuestion -``` - -#### Parameters - - - Question configuration including key, question text, and optional type/confirm/prompt/functions. - - - - - - - - - - - - - - -#### Returns - -`GatherQuestion` - -#### Source - -[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) - -Line 51. - -*** - -### toDict - -Serializes this question to a plain object for SWML output. - -#### Signature - -```typescript -toDict(): Record -``` - -#### Returns - -`Record` — A dictionary representation of this question. - -#### Source - -[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) - -Line 71. - -## Source - -[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) - -Line 33. diff --git a/fern/products/sdk-reference/typescript/context-builder/index.mdx b/fern/products/sdk-reference/typescript/context-builder/index.mdx deleted file mode 100644 index 559358cfa7..0000000000 --- a/fern/products/sdk-reference/typescript/context-builder/index.mdx +++ /dev/null @@ -1,302 +0,0 @@ ---- -slug: "/reference/typescript/context-builder" -title: "ContextBuilder" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "ContextBuilder" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts" ---- -# `ContextBuilder` - -Builder for multi-step, multi-context AI agent workflows. - -A ContextBuilder owns one or more Contexts; each Context owns an ordered -list of Steps. Only one context and one step is active at a time. Per -chat turn, the runtime injects the current step's instructions as a -system message, then asks the LLM for a response. - -## Native tools auto-injected by the runtime - -When a step (or its enclosing context) declares `validSteps` or -`validContexts`, the runtime auto-injects two native tools so the model -can navigate the flow: - -- `next_step(step: enum)` — present when validSteps is set -- `change_context(context: enum)` — present when validContexts is set - -Their `enum` schemas are rewritten on every turn to match whatever -validSteps / validContexts apply to the current step. You do NOT need -to define these tools yourself; they appear automatically. - -A third native tool — `gather_submit` — is injected during gather\_info -questioning (see Step.setGatherInfo / addGatherQuestion). - -These three names — `next_step`, `change_context`, `gather_submit` — -are reserved. ContextBuilder.validate() will reject any agent that -defines a SWAIG tool with one of these names. - -## Function whitelisting (Step.setFunctions) - -Each step may declare a `functions` whitelist. The whitelist is applied -in-memory at the start of each LLM turn. CRITICALLY: if a step does NOT -declare a `functions` field, it INHERITS the previous step's active set. -See Step.setFunctions() for details and examples. - -## Validation - -Call validate() (or toDict(), which calls it) to check that: - -- At least one context is defined -- A single context must be named "default" -- Every context has at least one step -- validSteps references resolve to real step names (or "next") -- validContexts references resolve to real context names -- gather\_info questions are non-empty and have unique keys -- gather\_info completion\_action targets a reachable step -- No user-defined SWAIG tool collides with a reserved native name - -## Signature - -```typescript -class ContextBuilder -``` - -## Examples - -```typescript -import { AgentBase, ContextBuilder } from '@signalwire/sdk'; - -const agent = new AgentBase({ name: 'support', route: '/' }); - -const contexts = new ContextBuilder(); -const flow = contexts.addContext('default'); - -flow.addStep('greeting') - .setText("Greet the caller and ask if they're an existing customer.") - .setValidSteps(['existing', 'new']); - -flow.addStep('existing') - .setText('Ask for the account number and read it back to confirm.'); - -flow.addStep('new') - .setText('Collect name, email, and reason for calling.'); - -agent.defineContexts(contexts); -``` - -## See Also - -- \- \[Context]\(/docs/sdk-reference/reference/typescript/context-builder/context) - \- \[Step]\(/docs/sdk-reference/reference/typescript/context-builder/step) - \- \[GatherInfo]\(/docs/sdk-reference/reference/typescript/context-builder/gather-info) - \- \[AgentBase.defineContexts]\(/docs/sdk-reference/reference/typescript/agent-base#define-contexts) - -## Constants - - - Reserved tool names auto-injected by the runtime when contexts/steps are present. User-defined SWAIG tools must not collide with these names. ContextBuilder.validate() rejects any agent that registers a user tool sharing one of these names — the runtime would never call the user tool because the native one wins. - - -## Classes - - - - A named context containing ordered steps, prompt configuration, and navigation rules. - - - - Collects structured information from the user through a series of questions. - - - - Represents a single question within a gather operation. - - - - A single step within a context, with prompt content, criteria, function restrictions, and navigation rules. - - - -## Methods - -### addContext - -Adds a new named context to the builder. - -#### Signature - -```typescript -addContext(name: string): Context -``` - -#### Parameters - - - The unique context name. A single-context flow must name its only context `"default"`. - - -#### Returns - -`Context` — The newly created [Context](/docs/sdk-reference/reference/typescript/context-builder/context) for further configuration. - -#### Throws - -- When the max-context limit is exceeded or a context with the same name already exists. - -#### Source - -[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) - -Line 994. - -*** - -### constructor - -#### Signature - -```typescript -constructor(): ContextBuilder -``` - -#### Returns - -`ContextBuilder` - -*** - -### getContext - -Returns a context by name. - -#### Signature - -```typescript -getContext(name: string): Context | undefined -``` - -#### Parameters - - - The context name to retrieve. - - -#### Returns - -`Context | undefined` — The matching Context, or undefined if not found. - -#### Source - -[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) - -Line 1010. - -*** - -### reset - -Removes all contexts, returning the builder to its initial state. -Use this in a dynamic config callback when you need to rebuild -contexts from scratch for a specific request. - -#### Signature - -```typescript -reset(): this -``` - -#### Returns - -`this` — This builder for chaining. - -#### Source - -[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) - -Line 979. - -*** - -### toDict - -Validates and serializes all contexts to a plain object for SWML output. - -#### Signature - -```typescript -toDict(): Record -``` - -#### Returns - -`Record` — A dictionary mapping context names to their serialized representations. - -#### Source - -[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) - -Line 1162. - -*** - -### validate - -Validates that all contexts have steps, naming constraints are met, and cross-context references are valid. - -#### Signature - -```typescript -validate(): void -``` - -#### Returns - -`void` - -#### Throws - -- Error if validation fails. - -#### Source - -[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) - -Line 1018. - -## Functions - -### createSimpleContext - -Creates a standalone Context instance without a ContextBuilder. - -#### Signature - -```typescript -createSimpleContext(name: string = 'default'): Context -``` - -#### Parameters - - - The context name (defaults to "default"). - - -#### Returns - -`Context` — A new Context instance. - -#### Source - -[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) - -Line 1179. - -## Source - -[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) - -Line 957. diff --git a/fern/products/sdk-reference/typescript/context-builder/step/index.mdx b/fern/products/sdk-reference/typescript/context-builder/step/index.mdx deleted file mode 100644 index e3e5211d82..0000000000 --- a/fern/products/sdk-reference/typescript/context-builder/step/index.mdx +++ /dev/null @@ -1,637 +0,0 @@ ---- -slug: "/reference/typescript/context-builder/step" -title: "Step" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "ContextBuilder.Step" - parent: "ContextBuilder" - module: "ContextBuilder" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts" ---- -# `Step` - -A single step within a context, with prompt content, criteria, function restrictions, and navigation rules. - -## Signature - -```typescript -class Step -``` - -## Properties - - - The unique name identifying this step within its context. - - -## Methods - -### addBullets - -Adds a POM section with bullet points, mutually exclusive with raw text. - -#### Signature - -```typescript -addBullets(title: string, bullets: string[]): this -``` - -#### Parameters - - - The section heading. - - - - The list of bullet point strings. - - -#### Returns - -`this` — This step for chaining. - -#### Source - -[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) - -Line 215. - -*** - -### addGatherQuestion - -Add a question to this step's gather\_info configuration. -setGatherInfo() must be called before this method. - -IMPORTANT — gather mode locks function access: -While the model is asking gather questions, the runtime forcibly -deactivates ALL of the step's other functions. The only callable -tools during a gather question are: - -- `gather_submit` (the native answer-submission tool) -- Whatever names you list in this question's `functions` option - -`next_step` and `change_context` are also filtered out — the model -cannot navigate away until the gather completes. This is by design: -it forces a tight ask → submit → next-question loop. - -If a question needs to call out to a tool (e.g. validate an email, -geocode a ZIP), list that tool name in this question's `functions`. -Functions listed here are active ONLY for this question. - -#### Signature - -```typescript -addGatherQuestion(opts: { ...6 fields }): this -``` - -#### Parameters - - - Question configuration including key, question text, and optional type/confirm/prompt/functions. - - - - - - - - - - - - - - -#### Returns - -`this` — This step for chaining. - -#### Source - -[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) - -Line 366. - -*** - -### addSection - -Adds a POM section with a body, mutually exclusive with raw text. - -#### Signature - -```typescript -addSection(title: string, body: string): this -``` - -#### Parameters - - - The section heading. - - - - The section body text. - - -#### Returns - -`this` — This step for chaining. - -#### Source - -[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) - -Line 203. - -*** - -### clearSections - -Removes all POM sections and raw text from this step. - -#### Signature - -```typescript -clearSections(): this -``` - -#### Returns - -`this` — This step for chaining. - -#### Source - -[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) - -Line 407. - -*** - -### constructor - -Creates a new Step. - -#### Signature - -```typescript -constructor(name: string): Step -``` - -#### Parameters - - - The unique step name. - - -#### Returns - -`Step` - -#### Source - -[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) - -Line 182. - -*** - -### setEnd - -Mark this step as terminal for the step flow. - -IMPORTANT: `end=true` does NOT end the conversation or hang up the -call. It exits step mode entirely after this step executes — clearing -the steps list, current step index, validSteps, and validContexts. -The agent keeps running, but operates only under the base system -prompt and the context-level prompt; no more step instructions are -injected and no more `next_step` tool is offered. - -To actually end the call, call a hangup tool or define a hangup hook. - -#### Signature - -```typescript -setEnd(end: boolean): this -``` - -#### Parameters - - - True to exit step mode after this step. - - -#### Returns - -`this` — This step for chaining. - -#### Source - -[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) - -Line 308. - -*** - -### setFunctions - -Set which non-internal functions are callable while this step is active. - -IMPORTANT — inheritance behavior: -If you do NOT call this method, the step inherits whichever function -set was active on the previous step (or the previous context's last -step). The server-side runtime only resets the active set when a -step explicitly declares its `functions` field. This is by design, -but it is the most common source of bugs in multi-step agents: -forgetting setFunctions() on a later step lets the previous step's -tools leak through. - -Best practice: call setFunctions() explicitly on every step that -should have a different toolset than the previous one. - -Keep the per-step active set small: LLM tool selection accuracy -degrades noticeably past ~7-8 simultaneously-active tools per call. -Use per-step whitelisting to partition large tool collections. - -Internal functions (e.g. `startup_hook`, `hangup_hook`, `gather_submit`) -are ALWAYS protected and cannot be deactivated by this whitelist. The -native navigation tools `next_step` and `change_context` are injected -automatically when validSteps/validContexts is set; they are not -affected by this list and do not need to appear in it. - -#### Signature - -```typescript -setFunctions(functions: string | string[]): this -``` - -#### Parameters - - - One of: - - -#### Returns - -`this` — This step for chaining. - -#### Examples - -```typescript -step.setFunctions(['lookup_account', 'check_balance']); // whitelist -step.setFunctions([]); // disable all -step.setFunctions('none'); // disable all (alt) -``` - -#### Source - -[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) - -Line 268. - -*** - -### setGatherInfo - -Initializes a gather info operation on this step for collecting structured data. - -#### Signature - -```typescript -setGatherInfo(opts?: { ...3 fields }): this -``` - -#### Parameters - - - Optional output key, completion action, and prompt configuration. - - - - - - - - -#### Returns - -`this` — This step for chaining. - -#### Source - -[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) - -Line 338. - -*** - -### setResetConsolidate - -Sets whether to consolidate conversation history when resetting at this step. - -#### Signature - -```typescript -setResetConsolidate(consolidate: boolean): this -``` - -#### Parameters - - - Whether to consolidate. - - -#### Returns - -`this` — This step for chaining. - -#### Source - -[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) - -Line 438. - -*** - -### setResetFullReset - -Sets whether to perform a full conversation reset at this step. - -#### Signature - -```typescript -setResetFullReset(fullReset: boolean): this -``` - -#### Parameters - - - Whether to fully reset. - - -#### Returns - -`this` — This step for chaining. - -#### Source - -[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) - -Line 448. - -*** - -### setResetSystemPrompt - -Sets the system prompt to use when resetting context at this step. - -#### Signature - -```typescript -setResetSystemPrompt(systemPrompt: string): this -``` - -#### Parameters - - - The replacement system prompt text. - - -#### Returns - -`this` — This step for chaining. - -#### Source - -[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) - -Line 418. - -*** - -### setResetUserPrompt - -Sets the user prompt to use when resetting context at this step. - -#### Signature - -```typescript -setResetUserPrompt(userPrompt: string): this -``` - -#### Parameters - - - The replacement user prompt text. - - -#### Returns - -`this` — This step for chaining. - -#### Source - -[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) - -Line 428. - -*** - -### setSkipToNextStep - -Sets whether to automatically advance to the next step after this one completes. - -#### Signature - -```typescript -setSkipToNextStep(skip: boolean): this -``` - -#### Parameters - - - Whether to skip to the next step. - - -#### Returns - -`this` — This step for chaining. - -#### Source - -[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) - -Line 328. - -*** - -### setSkipUserTurn - -Sets whether to skip waiting for user input when entering this step. - -#### Signature - -```typescript -setSkipUserTurn(skip: boolean): this -``` - -#### Parameters - - - Whether to skip the user turn. - - -#### Returns - -`this` — This step for chaining. - -#### Source - -[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) - -Line 318. - -*** - -### setStepCriteria - -Sets the criteria that must be met before this step is considered complete. - -#### Signature - -```typescript -setStepCriteria(criteria: string): this -``` - -#### Parameters - - - A description of the completion criteria. - - -#### Returns - -`this` — This step for chaining. - -#### Source - -[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) - -Line 226. - -*** - -### setText - -Sets raw text content for this step, mutually exclusive with POM sections. - -#### Signature - -```typescript -setText(text: string): this -``` - -#### Parameters - - - The raw prompt text. - - -#### Returns - -`this` — This step for chaining. - -#### Source - -[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) - -Line 191. - -*** - -### setValidContexts - -Sets which contexts the AI may navigate to from this step. - -#### Signature - -```typescript -setValidContexts(contexts: string[]): this -``` - -#### Parameters - - - List of allowed context names. - - -#### Returns - -`this` — This step for chaining. - -#### Source - -[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) - -Line 288. - -*** - -### setValidSteps - -Sets which steps the AI may navigate to from this step. - -#### Signature - -```typescript -setValidSteps(steps: string[]): this -``` - -#### Parameters - - - List of allowed step names. - - -#### Returns - -`this` — This step for chaining. - -#### Source - -[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) - -Line 278. - -*** - -### toDict - -Serializes this step to a plain object for SWML output. - -#### Signature - -```typescript -toDict(): Record -``` - -#### Returns - -`Record` — A dictionary representation of this step. - -#### Source - -[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) - -Line 473. - -## Source - -[`src/ContextBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts) - -Line 160. diff --git a/fern/products/sdk-reference/typescript/core/index.mdx b/fern/products/sdk-reference/typescript/core/index.mdx new file mode 100644 index 0000000000..12a1005a04 --- /dev/null +++ b/fern/products/sdk-reference/typescript/core/index.mdx @@ -0,0 +1,34 @@ +--- +slug: "/reference/typescript/core" +title: "core" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "core" +--- +# `core` + +## Classes + + + + Structured logger that respects global level, format, and color settings. + + + +## Modules + + + + + + + + + + + + diff --git a/fern/products/sdk-reference/typescript/core/logger/index.mdx b/fern/products/sdk-reference/typescript/core/logger/index.mdx new file mode 100644 index 0000000000..10e0cd37f3 --- /dev/null +++ b/fern/products/sdk-reference/typescript/core/logger/index.mdx @@ -0,0 +1,494 @@ +--- +slug: "/reference/typescript/core/logger" +title: "Logger" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "class" + language: "typescript" + qualified_name: "Logger" + parent: "core" + module: "core" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/Logger.ts" +--- +# `Logger` + +Structured logger that respects global level, format, and color settings. + +## Signature + +```typescript +class Logger +``` + +## Methods + +### bind + +Create a child logger with additional bound context fields merged into the parent's context. + +#### Signature + +```typescript +bind(context: Record): Logger +``` + +#### Parameters + + + Key-value pairs to merge into the child logger's context. + + +#### Returns + +`Logger` — A new Logger instance with the merged context. + +#### Source + +[`src/Logger.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/Logger.ts) + +Line 238. + +*** + +### constructor + +Create a new Logger instance. + +#### Signature + +```typescript +constructor(name: string, context?: Record): Logger +``` + +#### Parameters + + + Logger name shown in log output. + + + + Optional key-value pairs included in every log entry. + + +#### Returns + +`Logger` + +#### Source + +[`src/Logger.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/Logger.ts) + +Line 228. + +*** + +### debug + +Log a message at the debug level. + +#### Signature + +```typescript +debug(msg: string, data?: Record): void +``` + +#### Parameters + + + The log message. + + + + Optional structured data to include. + + +#### Returns + +`void` + +#### Source + +[`src/Logger.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/Logger.ts) + +Line 247. + +*** + +### error + +Log a message at the error level. + +#### Signature + +```typescript +error(msg: string, data?: Record): void +``` + +#### Parameters + + + The log message. + + + + Optional structured data to include. + + +#### Returns + +`void` + +#### Source + +[`src/Logger.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/Logger.ts) + +Line 274. + +*** + +### info + +Log a message at the info level. + +#### Signature + +```typescript +info(msg: string, data?: Record): void +``` + +#### Parameters + + + The log message. + + + + Optional structured data to include. + + +#### Returns + +`void` + +#### Source + +[`src/Logger.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/Logger.ts) + +Line 256. + +*** + +### warn + +Log a message at the warn level. + +#### Signature + +```typescript +warn(msg: string, data?: Record): void +``` + +#### Parameters + + + The log message. + + + + Optional structured data to include. + + +#### Returns + +`void` + +#### Source + +[`src/Logger.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/Logger.ts) + +Line 265. + +## Functions + +### getExecutionMode + +Detect the execution environment, matching Python SDK's detection logic. + +#### Signature + +```typescript +getExecutionMode(): [string, "default" | "off" | "stderr"] +``` + +#### Returns + +`[string, "default" | "off" | "stderr"]` — A tuple of \[environment\_name, derived\_log\_mode]. + +#### Source + +[`src/Logger.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/Logger.ts) + +Line 29. + +*** + +### getLogger + +Create or retrieve a cached Logger instance with the given name. + +#### Signature + +```typescript +getLogger(name: string): Logger +``` + +#### Parameters + + + Logger name shown in log output. + + +#### Returns + +`Logger` — A Logger instance (cached by name). + +#### Source + +[`src/Logger.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/Logger.ts) + +Line 346. + +*** + +### resetLoggingConfiguration + +Reset all logging settings to their environment-variable-based defaults. + +#### Signature + +```typescript +resetLoggingConfiguration(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/Logger.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/Logger.ts) + +Line 142. + +*** + +### setGlobalLogColor + +Enable or disable ANSI color codes in text-format output. + +#### Signature + +```typescript +setGlobalLogColor(enabled: boolean): void +``` + +#### Parameters + + + True to enable colors, false to disable. + + +#### Returns + +`void` + +#### Source + +[`src/Logger.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/Logger.ts) + +Line 129. + +*** + +### setGlobalLogFormat + +Set the output format for all loggers. + +#### Signature + +```typescript +setGlobalLogFormat(format: LogFormat): void +``` + +#### Parameters + + + Either 'text' (human-readable) or 'json' (structured). + + +#### Returns + +`void` + +#### Source + +[`src/Logger.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/Logger.ts) + +Line 121. + +*** + +### setGlobalLogLevel + +Set the minimum log level for all loggers. + +Takes a [LogLevel](/docs/sdk-reference/reference/typescript/core/logger#log-level) (`'debug' | 'info' | 'warn' | 'error'`) — the +closed, port-owned set (the keys of the internal severity table). It is +developer input with no Python counterpart and no open-ended wire/reference +source, so the parameter is typed closed: editor autocompletion plus a typo +such as `'debgu'` is a compile-time error rather than a silent no-op. (The +env-var path, `SIGNALWIRE_LOG_LEVEL`, is necessarily untyped and still +tolerates an arbitrary string defensively at runtime.) + +#### Signature + +```typescript +setGlobalLogLevel(level: "debug" | "info" | "warn" | "error"): void +``` + +#### Parameters + + + The minimum severity level to emit. + + +#### Returns + +`void` + +#### Source + +[`src/Logger.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/Logger.ts) + +Line 105. + +*** + +### setGlobalLogStream + +Set the output stream for all loggers. + +#### Signature + +```typescript +setGlobalLogStream(stream: LogStream): void +``` + +#### Parameters + + + Either 'stdout' (default) or 'stderr'. + + +#### Returns + +`void` + +#### Source + +[`src/Logger.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/Logger.ts) + +Line 137. + +*** + +### stripControlChars + +Strip control characters from all string values in a data record to prevent +log injection attacks. Mirrors Python SDK's `strip_control_chars` structlog +processor. Processes nested objects and arrays recursively. + +#### Signature + +```typescript +stripControlChars(data: T): T +``` + +#### Type Parameters + + + +#### Parameters + + + The record whose string values should be sanitized. + + +#### Returns + +`T` — A shallow copy of `data` with control characters removed from strings. + +#### Source + +[`src/Logger.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/Logger.ts) + +Line 182. + +*** + +### suppressAllLogs + +Suppress or unsuppress all log output globally. + +#### Signature + +```typescript +suppressAllLogs(suppress: boolean = true): void +``` + +#### Parameters + + + True to suppress, false to restore (default true). + + +#### Returns + +`void` + +#### Source + +[`src/Logger.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/Logger.ts) + +Line 113. + +## Type Aliases + +### LogLevel + +Log severity level — the closed set this Logger emits and filters on. + +`'warn'` (not `'warning'`) matches the keys of `LEVELS` and the +`Logger.warn()` method; the Python reference's logger has no `set_log_level` +counterpart (this setter is a documented TS addition — see +`PORT_ADDITIONS.md`), so the canonical set is this port's own. + +#### Signature + +```typescript +type LogLevel = keyof typeof LEVELS +``` + +#### Source + +[`src/Logger.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/Logger.ts) + +Line 19. + +## Source + +[`src/Logger.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/Logger.ts) + +Line 219. diff --git a/fern/products/sdk-reference/typescript/core/security-utils/index.mdx b/fern/products/sdk-reference/typescript/core/security-utils/index.mdx new file mode 100644 index 0000000000..7b03413311 --- /dev/null +++ b/fern/products/sdk-reference/typescript/core/security-utils/index.mdx @@ -0,0 +1,280 @@ +--- +slug: "/reference/typescript/core/security-utils" +title: "SecurityUtils" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "SecurityUtils" + parent: "core" + module: "core" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/SecurityUtils.ts" +--- +# `SecurityUtils` + +## Signature + +```typescript +module SecurityUtils +``` + +## Constants + + + Maximum allowed input length for skill handler arguments (characters). + + +## Functions + +### filterSensitiveHeaders + +Return a copy of `headers` with sensitive entries (authorization, cookie, etc.) removed. + +#### Signature + +```typescript +filterSensitiveHeaders(headers: Record): Record +``` + +#### Parameters + + + Original header record. + + +#### Returns + +`Record` — A new record with sensitive headers removed. + +#### Source + +[`src/SecurityUtils.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SecurityUtils.ts) + +Line 47. + +*** + +### isPrivateIp + +Check whether an IP address belongs to a private/reserved range. +Covers RFC1918, loopback, link-local, IPv6 private (fc/fd, ::1, fe80). + +#### Signature + +```typescript +isPrivateIp(ip: string): boolean +``` + +#### Parameters + + + The IP address string to check. + + +#### Returns + +`boolean` — True if the IP is private/reserved. + +#### Source + +[`src/SecurityUtils.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SecurityUtils.ts) + +Line 84. + +*** + +### isServerlessMode + +Whether the current process is running in a serverless environment +(anything other than a long-lived `server` runtime). + +Python parity: `signalwire.utils.is_serverless_mode`. + +#### Signature + +```typescript +isServerlessMode(): boolean +``` + +#### Returns + +`boolean` + +#### Source + +[`src/SecurityUtils.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SecurityUtils.ts) + +Line 162. + +*** + +### isValidHostname + +Validate that a hostname string does not contain whitespace, slashes, or control characters. + +#### Signature + +```typescript +isValidHostname(host: string): boolean +``` + +#### Parameters + + + Hostname to validate. + + +#### Returns + +`boolean` — True if the hostname is valid. + +#### Source + +[`src/SecurityUtils.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SecurityUtils.ts) + +Line 72. + +*** + +### redactUrl + +Redact credentials embedded in a URL (e.g. `https://user:secret@host` -> `https://user:****@host`). +Returns the URL unchanged if no credentials are present. + +#### Signature + +```typescript +redactUrl(url: string): string +``` + +#### Parameters + + + The URL string to redact. + + +#### Returns + +`string` — The URL with the password portion replaced by `****`. + +#### Source + +[`src/SecurityUtils.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SecurityUtils.ts) + +Line 63. + +*** + +### resolveAndValidateUrl + +DNS-resolve a URL's hostname and reject it if it points to a private IP. + +#### Signature + +```typescript +resolveAndValidateUrl(url: string, allowPrivate: boolean = false): Promise +``` + +#### Parameters + + + The full URL to validate. + + + + When true, skip the private-IP check (default false). + + +#### Returns + +`Promise` + +#### Throws + +- If the resolved IP is private and `allowPrivate` is false. + +#### Source + +[`src/SecurityUtils.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SecurityUtils.ts) + +Line 107. + +*** + +### safeAssign + +Copy properties from `source` to `target`, filtering out prototype-pollution keys. +Drop-in replacement for `Object.assign(target, source)` where `source` is untrusted. + +#### Signature + +```typescript +safeAssign(target: T, source: Record): T +``` + +#### Type Parameters + + + +#### Parameters + + + The object to assign into. + + + + The object to copy properties from. + + +#### Returns + +`T` — The target object. + +#### Source + +[`src/SecurityUtils.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SecurityUtils.ts) + +Line 24. + +*** + +### validateUrl + +Validate that a URL is safe to fetch (not pointing to private/internal resources). + +Matches Python's `validate_url(url, allow_private=False) -> bool` — returns `true` +if the URL is safe, `false` otherwise (never throws). + +#### Signature + +```typescript +validateUrl(url: string, allowPrivate: boolean = false): Promise +``` + +#### Parameters + + + The URL to validate. + + + + When true, allow private IP ranges (default false). + + +#### Returns + +`Promise` — `true` if the URL is safe to fetch, `false` otherwise. + +#### Source + +[`src/SecurityUtils.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SecurityUtils.ts) + +Line 147. + +## Source + +[`src/SecurityUtils.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SecurityUtils.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/core/type-inference/index.mdx b/fern/products/sdk-reference/typescript/core/type-inference/index.mdx new file mode 100644 index 0000000000..3d9cd24527 --- /dev/null +++ b/fern/products/sdk-reference/typescript/core/type-inference/index.mdx @@ -0,0 +1,257 @@ +--- +slug: "/reference/typescript/core/type-inference" +title: "TypeInference" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "TypeInference" + parent: "core" + module: "core" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/TypeInference.ts" +--- +# `TypeInference` + +## Signature + +```typescript +module TypeInference +``` + +## Functions + +### createTypedHandlerWrapper + +Create a wrapper function that adapts a typed handler to the standard +`(args, rawData) => result` SWAIG handler signature. + +The wrapper extracts named parameters from the args dict and passes them +as positional arguments to the original function. + +#### Signature + +```typescript +createTypedHandlerWrapper( + fn: TypedToolHandler, + paramNames: string[], + hasRawData: boolean +): SwaigHandler +``` + +#### Parameters + + + The typed handler whose parameters match `paramNames` in order. + + + + Ordered list of parameter names extracted from `fn`, produced by [inferSchema](/docs/sdk-reference/reference/typescript/core/type-inference#infer-schema). + + + + When `true`, the raw-data record is appended as the final positional argument to mirror the old-style handler shape. + + +#### Returns + +`SwaigHandler` — A [SwaigHandler](/docs/sdk-reference/reference/typescript/agents/swaig-function#swaig-handler) suitable for registration with [AgentBase.defineTool](/docs/sdk-reference/reference/typescript/agents/agent-base#define-tool). + +#### Source + +[`src/TypeInference.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/TypeInference.ts) + +Line 227. + +*** + +### inferSchema + +Infer a JSON Schema from a function's parameters. + +Extracts parameter names and infers JSON Schema types from default-value +literals: + +- Number literals → `"integer"` (whole numbers) or `"number"` (decimals) +- String literals → `"string"` +- Boolean literals → `"boolean"` +- No default → `"string"` (and the parameter is marked required) + +#### Signature + +```typescript +inferSchema(fn: IntrospectableFn): InferredSchema | null +``` + +#### Parameters + + + The function to inspect. Arrow functions, regular functions, and method shorthand all work. Typed as [IntrospectableFn](/docs/sdk-reference/reference/typescript/core/type-inference#introspectable-fn) because only the parameter list is read — the handler's return is irrelevant to schema inference (a [TypedToolHandler](/docs/sdk-reference/reference/typescript/core/type-inference#typed-tool-handler) satisfies this). + + +#### Returns + +`InferredSchema | null` — An [InferredSchema](/docs/sdk-reference/reference/typescript/core/type-inference#inferred-schema) describing the parameters, or `null` when the function looks like an old-style `(args, rawData)` SWAIG handler (in which case no inference is attempted). + +#### Source + +[`src/TypeInference.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/TypeInference.ts) + +Line 151. + +*** + +### parseFunctionParams + +Parse function parameter names and default values from source code. + +Handles arrow functions, regular functions, and method shorthand. + +#### Signature + +```typescript +parseFunctionParams(source: string): ParsedParam[] +``` + +#### Parameters + + + The function source text, typically from `fn.toString()`. + + +#### Returns + +`ParsedParam[]` — An array of `{ name, defaultValue? }` records in declaration order. Returns an empty array if no parameter list is present. + +#### Source + +[`src/TypeInference.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/TypeInference.ts) + +Line 76. + +## Type Aliases + +### IntrospectableFn + +A function the SDK _introspects_ (reads `fn.toString()` to recover parameter +names/defaults) but whose return value it does not consume. `inferSchema` +only inspects the parameter list, so — unlike [TypedToolHandler](/docs/sdk-reference/reference/typescript/core/type-inference#typed-tool-handler) — its +input is return-agnostic. Still a precise improvement over the bare +`Function`: it is a _callable_ (rejecting non-functions) with an arbitrary +concrete parameter list (`...args: never[]` accepts any), and any return. +Every [TypedToolHandler](/docs/sdk-reference/reference/typescript/core/type-inference#typed-tool-handler) is assignable to it. + +#### Signature + +```typescript +type IntrospectableFn = (args: never[]) => unknown +``` + +#### Source + +[`src/TypeInference.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/TypeInference.ts) + +Line 47. + +*** + +### TypedToolHandler + +A typed SWAIG tool handler: a function the SDK introspects and wraps so it +receives the AI-extracted arguments as _named positional parameters_ (any +arity, optionally with a trailing `rawData` record) rather than the raw +`(args, rawData)` pair of [SwaigHandler](/docs/sdk-reference/reference/typescript/agents/swaig-function#swaig-handler). + +This is the precise replacement for the bare `Function` type at the +typed-tool sites: it constrains the value to a _callable whose return is a +valid SWAIG result_ (a [FunctionResult](/docs/sdk-reference/reference/typescript/agents/function-result), a `{ response }`-style record, +or a string — sync or async), which `Function` does not — so a non-callable, +or a callable returning `void`/`boolean`/etc., is now a compile-time error. + +Parameters are `...args: never[]` rather than `...unknown[]`: the handler's +real parameters are user-named with arbitrary types (`(city: string, days = 5) => …`) and are recovered from `fn.toString()` by [inferSchema](/docs/sdk-reference/reference/typescript/core/type-inference#infer-schema), so +the type must accept _any_ concrete positional list. Under +`strictFunctionTypes`, `never[]` makes the parameter position accept any +function (every param type is a supertype of `never`) while still pinning the +return type — exactly "callable returning a SWAIG result, params don't +matter". (`...unknown[]` would wrongly REJECT a `(city: string) => …` handler, +defeating the purpose.) + +#### Signature + +```typescript +type TypedToolHandler = (args: never[]) => FunctionResult | Record | string | Promise | string> +``` + +#### Source + +[`src/TypeInference.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/TypeInference.ts) + +Line 34. + +## Interfaces + +### InferredSchema + +Result of schema inference from a function. + +#### Signature + +```typescript +interface InferredSchema +``` + +#### Properties + + + Whether the function accepts a rawData parameter. + + + + JSON Schema properties keyed by parameter name. + + + + Ordered parameter names (excluding rawData). + + + + List of required parameter names (those without defaults). + + +#### Source + +[`src/TypeInference.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/TypeInference.ts) + +Line 56. + +*** + +### ParsedParam + +A parsed function parameter with optional default value. + +#### Signature + +```typescript +interface ParsedParam +``` + +#### Properties + + + + + +#### Source + +[`src/TypeInference.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/TypeInference.ts) + +Line 50. + +## Source + +[`src/TypeInference.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/TypeInference.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/core/types/index.mdx b/fern/products/sdk-reference/typescript/core/types/index.mdx new file mode 100644 index 0000000000..bfd0dc5c83 --- /dev/null +++ b/fern/products/sdk-reference/typescript/core/types/index.mdx @@ -0,0 +1,292 @@ +--- +slug: "/reference/typescript/core/types" +title: "types" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "types" + parent: "core" + module: "core" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/types.ts" +--- +# `types` + +## Signature + +```typescript +module types +``` + +## Type Aliases + +### DynamicConfigCallback + +Callback invoked on each SWML request to dynamically modify an ephemeral copy of the agent. + +The ephemeral agent is typed as `import('./AgentBase.js').AgentBase` at +call sites but kept as a generic type parameter here to avoid a circular +import between `types.ts` and `AgentBase.ts`. Cast or import the type +explicitly at the call site if you need specific methods. + +#### Signature + +```typescript +type DynamicConfigCallback = (queryParams: Record, bodyParams: Record, headers: Record, agent: TAgent) => void | Promise +``` + +#### Source + +[`src/types.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/types.ts) + +Line 155. + +*** + +### SummaryCallback + +Callback invoked when a post-prompt summary is received at the end of a call. + +#### Signature + +```typescript +type SummaryCallback = (summary: Record | null, rawData: Record) => void | Promise +``` + +#### Source + +[`src/types.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/types.ts) + +Line 167. + +## Interfaces + +### AgentOptions + +Configuration options for constructing an AgentBase instance. + +#### Signature + +```typescript +interface AgentOptions +``` + +#### Properties + + + Unique identifier for this agent instance; auto-generated if omitted. + + + + Whether to automatically insert an "answer" verb in the SWML call flow (defaults to true). + + + + Explicit basic-auth credentials as \[username, password]; auto-generated if omitted. + + + + Whether to enable the check-for-input override endpoint. When true, a `/check_for_input` route is registered that allows external callers to inject input checks at runtime. Defaults to false. + + + + Path to a JSON configuration file. When provided, the file is loaded at construction time and its `service` section can override name, route, host, and port (constructor arguments still take precedence over file values). + + + + Default webhook URL for SWAIG function callbacks. + + + + Whether to enable the post-prompt override endpoint. When true, a `/post_prompt_override` route is registered that allows external callers to replace the post-prompt text at runtime. Defaults to false. + + + + Hostname to bind the HTTP server to (defaults to "0.0.0.0"). + + + + Display name of the agent, also used as default basic-auth username when credentials are auto-generated. + + + + List of native function names to include in the SWAIG configuration. + + + + Port number for the HTTP server (defaults to env PORT or 3000). + + + + Whether to record the call (defaults to false). + + + + Recording format, e.g. "mp4" (defaults to "mp4"). + + + + Whether to record in stereo (defaults to true). + + + + HTTP route path the agent listens on (defaults to "/"). + + + + Path to a JSON Schema file for SWML validation. When provided, rendered SWML documents are validated against this schema. Falls back to the built-in schema if omitted. + + + + Whether to validate rendered SWML against the schema. Can also be disabled via the `SWML_SKIP_SCHEMA_VALIDATION` env var. Defaults to true. + + + + SignalWire Signing Key for verifying inbound webhook signatures. When set, AgentBase auto-mounts the webhook signature validation middleware on POST /, /swaig, and /post\_prompt; unsigned or mis-signed requests are rejected with 403. Falls back to the `SIGNALWIRE_SIGNING_KEY` environment variable when omitted. When both are unset, signature validation is disabled and the agent emits a one-time warning on startup so operators notice. Per `porting-sdk/webhooks.md`: this MUST be treated as secret — never logged, never echoed to clients, never included in error messages. + + + + When true, suppresses all log output. + + + + Session token expiry in seconds (defaults to 3600). + + + + Whether to use POM-based prompt rendering (defaults to true). + + + + When true, the webhook validation middleware honors `X-Forwarded-Proto` / `X-Forwarded-Host` headers when reconstructing the public URL the platform POSTed to. Default false because proxy headers are spoofable; opt in only when you control the proxy. The `SWML_PROXY_URL_BASE` env var always takes precedence over both forwarded headers and the raw request URL. + + +#### Source + +[`src/types.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/types.ts) + +Line 6. + +*** + +### FunctionInclude + +Reference to an external SWAIG function endpoint to include in the AI configuration. + +#### Signature + +```typescript +interface FunctionInclude +``` + +#### Properties + + + List of function names available at the remote endpoint. + + + + Optional metadata to pass along with the include. + + + + URL of the remote SWAIG endpoint. + + +#### Source + +[`src/types.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/types.ts) + +Line 133. + +*** + +### LanguageConfig + +Configuration for a supported language in the AI agent. + +#### Signature + +```typescript +interface LanguageConfig +``` + +#### Properties + + + BCP-47 language code (e.g. "en-US"). + + + + TTS engine identifier. + + + + Filler phrases keyed by category for this language. + + + + Per-function filler phrases, keyed by function name then language code. + + + + Human-readable language name (e.g. "English"). + + + + Optional per-language params dict (engine-specific tuning, voice settings, etc.). Emitted as the language object's `params` key in SWML — only present in the wire payload when non-empty so existing entries remain byte-identical when no params are passed. + + + + Speech recognition model identifier. + + + + Voice identifier to use for this language. + + +#### Source + +[`src/types.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/types.ts) + +Line 98. + +*** + +### PronunciationRule + +Rule for overriding how the TTS engine pronounces a specific word or phrase. + +#### Signature + +```typescript +interface PronunciationRule +``` + +#### Properties + + + Whether the match should be case-insensitive. + + + + The text pattern to match. + + + + The replacement pronunciation. + + +#### Source + +[`src/types.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/types.ts) + +Line 123. + +## Source + +[`src/types.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/types.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/core/webhook-middleware/index.mdx b/fern/products/sdk-reference/typescript/core/webhook-middleware/index.mdx new file mode 100644 index 0000000000..ce6a611818 --- /dev/null +++ b/fern/products/sdk-reference/typescript/core/webhook-middleware/index.mdx @@ -0,0 +1,108 @@ +--- +slug: "/reference/typescript/core/webhook-middleware" +title: "WebhookMiddleware" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "WebhookMiddleware" + parent: "core" + module: "core" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/WebhookMiddleware.ts" +--- +# `WebhookMiddleware` + +## Signature + +```typescript +module WebhookMiddleware +``` + +## Constants + + + Canonical lowercase header names (Hono's c.req.header() is case-insensitive). + + + + +## Functions + +### webhookValidationMiddleware + +Build a Hono middleware that enforces SignalWire webhook signature +validation. + +The middleware: + +1. Captures the raw body (`await c.req.text()`) BEFORE any other + consumer reads the stream. The string is stashed at `c.set('rawBody')` + so the downstream handler can re-parse without re-reading the stream. +2. Pulls the `X-SignalWire-Signature` header (or the `X-Twilio-Signature` + alias). +3. Reconstructs the public URL (`SWML_PROXY_URL_BASE` env > forwarded + headers when `trustProxy` > raw request URL). +4. Calls [validateWebhookSignature](/docs/sdk-reference/reference/typescript/core/webhook-validator#validate-webhook-signature). +5. On any failure: responds 403 with no body detail (would leak which + branch failed). Does NOT call `next()`. +6. On success: `next()`. + +#### Signature + +```typescript +webhookValidationMiddleware(opts: WebhookValidationOptions): MiddlewareHandler +``` + +#### Parameters + + + +#### Returns + +`MiddlewareHandler` + +#### Throws + +- Error at construction time if `signingKey` is empty. + +#### Source + +[`src/WebhookMiddleware.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/WebhookMiddleware.ts) + +Line 126. + +## Interfaces + +### WebhookValidationOptions + +Options for [webhookValidationMiddleware](/docs/sdk-reference/reference/typescript/core/webhook-middleware#webhook-validation-middleware). + +#### Signature + +```typescript +interface WebhookValidationOptions +``` + +#### Properties + + + The customer's Signing Key. Required; passing an empty string throws at construction time (it's a programming error, not a runtime failure). + + + + When true, honor `X-Forwarded-Proto` / `X-Forwarded-Host` headers when reconstructing the URL. Default false — proxy headers are spoofable, so opt in only when you control the proxy. + + +#### Source + +[`src/WebhookMiddleware.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/WebhookMiddleware.ts) + +Line 42. + +## Source + +[`src/WebhookMiddleware.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/WebhookMiddleware.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/core/webhook-validator/index.mdx b/fern/products/sdk-reference/typescript/core/webhook-validator/index.mdx new file mode 100644 index 0000000000..39cd619be5 --- /dev/null +++ b/fern/products/sdk-reference/typescript/core/webhook-validator/index.mdx @@ -0,0 +1,175 @@ +--- +slug: "/reference/typescript/core/webhook-validator" +title: "WebhookValidator" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "WebhookValidator" + parent: "core" + module: "core" + source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/WebhookValidator.ts" +--- +# `WebhookValidator` + +## Signature + +```typescript +module WebhookValidator +``` + +## Functions + +### validateRequest + +Legacy `@signalwire/compatibility-api` drop-in entry point. + +If `paramsOrRawBody` is a string, delegates to +[validateWebhookSignature](/docs/sdk-reference/reference/typescript/core/webhook-validator#validate-webhook-signature) (Scheme A then Scheme B with parsed form). + +If it's a record, Map, or list of \[key, value] tuples, treats it as +pre-parsed form params and runs Scheme B directly (with URL port +normalization and optional bodySHA256 fallback). + +The parameter type matches Python's +`Union[str, Mapping[str, Any], List[Tuple[str, Any]], None]` for +cross-language signature parity. `Map` is also +accepted at runtime for ergonomic TS usage. + +#### Signature + +```typescript +validateRequest( + signingKey: string, + signature: string, + url: string, + paramsOrRawBody: string | Record | [string, unknown][] | null | undefined +): boolean +``` + +#### Parameters + + + Customer's Signing Key. Empty / null throws Error. + + + + Header value. Missing / empty returns false. + + + + Full URL SignalWire POSTed to. + + + + String raw body OR pre-parsed form params. + + +#### Returns + +`boolean` — true on match, false otherwise. + +#### Throws + +- Error when `signingKey` is missing. +- TypeError when `paramsOrRawBody` is neither a string nor a record/Map/array of tuples (e.g. a plain number). + +#### Source + +[`src/WebhookValidator.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/WebhookValidator.ts) + +Line 373. + +*** + +### validateWebhookSignature + +Validate a SignalWire webhook signature against both schemes (A then B). + +#### Signature + +```typescript +validateWebhookSignature( + signingKey: string, + signature: string, + url: string, + rawBody: string +): boolean +``` + +#### Parameters + + + The customer's Signing Key from the Dashboard. Empty / null throws `Error` — that's a programming error, not a validation failure. + + + + The `X-SignalWire-Signature` header value (or `X-Twilio-Signature` for cXML compat). Missing / empty returns `false` without throwing. + + + + The full URL SignalWire POSTed to (scheme, host, optional port, path, query). Must match what the platform saw — see the URL reconstruction section of porting-sdk/webhooks.md. + + + + The raw request body bytes as a UTF-8 string, BEFORE any JSON / form parsing. Must be a string — passing a parsed object throws `TypeError`. + + +#### Returns + +`boolean` — `true` if the signature matches either Scheme A (hex JSON) or Scheme B (base64 form, with port-normalization variants and optional bodySHA256 fallback). `false` otherwise. + +#### Throws + +- Error when `signingKey` is missing / empty. +- TypeError when `rawBody` is not a string. + +#### Source + +[`src/WebhookValidator.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/WebhookValidator.ts) + +Line 300. + +## Type Aliases + +### FormParams + +#### Signature + +```typescript +type FormParams = Record | [string, FormParamValue][] | Map +``` + +#### Source + +[`src/WebhookValidator.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/WebhookValidator.ts) + +Line 30. + +*** + +### FormParamValue + +Form params can be a record, a list of \[key, value] tuples, or a Map. Values +may be a string, number, boolean, null/undefined, or an array of those for +repeated keys. + +#### Signature + +```typescript +type FormParamValue = string | number | boolean | null | undefined +``` + +#### Source + +[`src/WebhookValidator.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/WebhookValidator.ts) + +Line 29. + +## Source + +[`src/WebhookValidator.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/WebhookValidator.ts) + +Line 1. diff --git a/fern/products/sdk-reference/typescript/data-map/index.mdx b/fern/products/sdk-reference/typescript/data-map/index.mdx deleted file mode 100644 index 3bbe74d1f1..0000000000 --- a/fern/products/sdk-reference/typescript/data-map/index.mdx +++ /dev/null @@ -1,801 +0,0 @@ ---- -slug: "/reference/typescript/data-map" -title: "DataMap" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "DataMap" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts" ---- -# `DataMap` - -Fluent builder for SWAIG data\_map configurations. - -Creates server-side tool definitions that execute on SignalWire's infrastructure -**without** requiring a webhook endpoint in your application. Ideal for simple -third-party API integrations (REST calls + pattern-matched response shaping). - -## Signature - -```typescript -class DataMap -``` - -## Examples - - - - ```typescript - import { DataMap, FunctionResult } from '@signalwire/sdk'; - - const weather = new DataMap('get_weather') - .purpose('Look up the current weather for a city') - .parameter('city', 'string', 'The city name', true) - .webhook('GET', 'https://api.example.com/weather?city=${args.city}') - .output(new FunctionResult('In ${city} it is ${response.temp}°F and ${response.condition}.')); - - // Register onto an agent: - agent.registerSwaigFunction(weather.toSwaigFunction()); - ``` - - - - ```typescript - new DataMap('classify_intent') - .purpose('Route callers to the right department.') - .parameter('utterance', 'string', 'What the caller said', true) - .expression('${args.utterance}', /billing|invoice|charge/i, new FunctionResult('billing')) - .expression('${args.utterance}', /tech|broken|error/i, new FunctionResult('support')); - ``` - - - -## See Also - -- \- \[FunctionResult]\(/docs/sdk-reference/reference/typescript/function-result) — response shape used in \`.output()\` / \`.expression()\` - \- \[createSimpleApiTool]\(/docs/sdk-reference/reference/typescript/data-map#create-simple-api-tool) — one-liner helper for REST API tools - \- \[AgentBase.defineTool]\(/docs/sdk-reference/reference/typescript/agent-base#define-tool) — alternative for tools that run in your process - -## Properties - - - The name of the SWAIG function this data map defines. - - -## Methods - -### body - -Set the JSON body for the most recently added webhook. - -#### Signature - -```typescript -body(data: Record): this -``` - -#### Parameters - - - The request body object. - - -#### Returns - -`this` — This instance for chaining. - -#### Source - -[`src/DataMap.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts) - -Line 292. - -*** - -### constructor - -#### Signature - -```typescript -constructor(functionName: string): DataMap -``` - -#### Parameters - - - The unique name for this data map tool. - - -#### Returns - -`DataMap` - -#### Source - -[`src/DataMap.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts) - -Line 109. - -*** - -### description - -Alias for [purpose](/docs/sdk-reference/reference/typescript/data-map#purpose); sets the LLM-facing tool description. - -This string is read by the model to decide WHEN to call this tool. -See [purpose](/docs/sdk-reference/reference/typescript/data-map#purpose) for bad-vs-good examples. - -#### Signature - -```typescript -description(description: string): this -``` - -#### Parameters - - - Prompt-engineering description of when to call this tool. - - -#### Returns - -`this` — This instance for chaining. - -#### Source - -[`src/DataMap.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts) - -Line 174. - -*** - -### enableEnvExpansion - -Enable `${ENV.*}` variable expansion in URLs, bodies, and outputs. - -#### Signature - -```typescript -enableEnvExpansion(enabled: boolean = true): this -``` - -#### Parameters - - - Whether to enable expansion (defaults to true). - - -#### Returns - -`this` — This instance for chaining. - -#### Source - -[`src/DataMap.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts) - -Line 118. - -*** - -### errorKeys - -Set error keys on the most recently added webhook, or globally if no webhook exists. - -#### Signature - -```typescript -errorKeys(keys: string[]): this -``` - -#### Parameters - - - Response keys that indicate an error occurred. - - -#### Returns - -`this` — This instance for chaining. - -#### Source - -[`src/DataMap.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts) - -Line 351. - -*** - -### expression - -Add a pattern-matching expression that evaluates a test value against a regex. - -#### Signature - -```typescript -expression( - testValue: string, - pattern: string | RegExp, - output: FunctionResult, - nomatchOutput?: FunctionResult -): this -``` - -#### Parameters - - - The string or template variable to test. - - - - A regex pattern (string or RegExp) to match against. - - - - The result to return when the pattern matches. - - - - Optional result to return when the pattern does not match. - - -#### Returns - -`this` — This instance for chaining. - -#### Source - -[`src/DataMap.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts) - -Line 231. - -*** - -### fallbackOutput - -Set a fallback output used when no webhook or expression matches. - -#### Signature - -```typescript -fallbackOutput(result: FunctionResult): this -``` - -#### Parameters - - - The FunctionResult to use as the fallback. - - -#### Returns - -`this` — This instance for chaining. - -#### Source - -[`src/DataMap.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts) - -Line 341. - -*** - -### foreach - -Configure iteration over an array in the webhook response. - -#### Signature - -```typescript -foreach(config: { ...4 fields }): this -``` - -#### Parameters - - - Foreach configuration with input/output keys, append template, and optional max. - - - - - - - - - - -#### Returns - -`this` — This instance for chaining. - -#### Source - -[`src/DataMap.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts) - -Line 314. - -*** - -### globalErrorKeys - -Set error keys at the top-level data map scope, regardless of webhook context. - -#### Signature - -```typescript -globalErrorKeys(keys: string[]): this -``` - -#### Parameters - - - Response keys that indicate an error occurred. - - -#### Returns - -`this` — This instance for chaining. - -#### Source - -[`src/DataMap.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts) - -Line 365. - -*** - -### output - -Set the output template for the most recently added webhook. - -#### Signature - -```typescript -output(result: FunctionResult): this -``` - -#### Parameters - - - The FunctionResult to use as the output template. - - -#### Returns - -`this` — This instance for chaining. - -#### Source - -[`src/DataMap.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts) - -Line 330. - -*** - -### parameter - -Define a parameter for this data-map tool — `description` is READ BY THE LLM. - -Each parameter `description` is rendered into the OpenAI tool schema -under `parameters.properties..description` and sent to the -model. The model uses it to decide HOW to fill in the argument from -user speech. It is **prompt engineering**, not developer FYI. - -##### Bad vs good - -```text -BAD : .parameter('city', 'string', 'the city') -GOOD: .parameter('city', 'string', -'The name of the city to get weather for, e.g. "San Francisco". -Ask the user if they did not provide one. Include the state -or country if the city name is ambiguous.') -``` - -#### Signature - -```typescript -parameter( - name: string, - paramType: string, - description: string, - opts?: { ...2 fields } -): this -``` - -#### Parameters - - - The parameter name (JSON object key). - - - - The JSON Schema type (e.g., "string", "number"). - - - - Prompt-engineering description telling the model how to extract this value from the user's utterance. Read by the LLM. - - - - Optional flags for required and enum constraints. - - - - - - -#### Returns - -`this` — This instance for chaining. - -#### Source - -[`src/DataMap.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts) - -Line 203. - -*** - -### params - -Set query or form parameters for the most recently added webhook. - -#### Signature - -```typescript -params(data: Record): this -``` - -#### Parameters - - - The parameters object. - - -#### Returns - -`this` — This instance for chaining. - -#### Source - -[`src/DataMap.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts) - -Line 303. - -*** - -### purpose - -Set the purpose (description) for this data-map tool — READ BY THE LLM. - -This string is rendered into the OpenAI tool schema `description` -field and sent to the model on every turn. The model uses it to -decide WHEN to call this tool. It is **prompt engineering**, not -developer documentation. - -A vague `purpose()` is the #1 cause of "the model has the right tool -but doesn't call it" failures with data-map tools. - -##### Bad vs good - -```text -BAD : .purpose('weather api') -GOOD: .purpose('Get the current weather conditions and forecast for -a specific city. Use this whenever the user asks about weather, -temperature, rain, or similar conditions in a named location.') -``` - -#### Signature - -```typescript -purpose(description: string): this -``` - -#### Parameters - - - Prompt-engineering description of when to call this tool. - - -#### Returns - -`this` — This instance for chaining. - -#### Source - -[`src/DataMap.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts) - -Line 160. - -*** - -### registerWithAgent - -Register this DataMap tool with an AgentBase instance. - -#### Signature - -```typescript -registerWithAgent(agent: { ...1 fields }): this -``` - -#### Parameters - - - An object with a registerSwaigFunction method (typically an AgentBase). - - - - -#### Returns - -`this` — This instance for chaining. - -#### Source - -[`src/DataMap.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts) - -Line 375. - -*** - -### setAllowedEnvPrefixes - -Set the allowed env var prefixes for this DataMap instance. - -Overrides the global defaults. Only env vars whose names start with -one of these prefixes will be expanded. An empty array allows all. - -#### Signature - -```typescript -setAllowedEnvPrefixes(prefixes: string[]): this -``` - -#### Parameters - - - Array of prefix strings to allow. - - -#### Returns - -`this` — This instance for chaining. - -#### Source - -[`src/DataMap.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts) - -Line 132. - -*** - -### toSwaigFunction - -Serialize this data map to a SWAIG function definition object. - -#### Signature - -```typescript -toSwaigFunction(): Record -``` - -#### Returns - -`Record` — A plain object suitable for inclusion in the SWML SWAIG array. - -#### Source - -[`src/DataMap.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts) - -Line 384. - -*** - -### webhook - -Add a webhook that is called when this data map tool is invoked. - -#### Signature - -```typescript -webhook(method: string, url: string, opts?: { ...4 fields }): this -``` - -#### Parameters - - - HTTP method (e.g., "GET", "POST"). - - - - The webhook URL to call. - - - - Optional headers, form parameter name, and argument settings. - - - - - - - - - - -#### Returns - -`this` — This instance for chaining. - -#### Source - -[`src/DataMap.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts) - -Line 257. - -*** - -### webhookExpressions - -Set pattern-matching expressions on the most recently added webhook. - -#### Signature - -```typescript -webhookExpressions(expressions: Record[]): this -``` - -#### Parameters - - - Array of expression objects to evaluate against the webhook response. - - -#### Returns - -`this` — This instance for chaining. - -#### Source - -[`src/DataMap.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts) - -Line 281. - -## Functions - -### createExpressionTool - -Create a DataMap tool that evaluates expressions against patterns without making HTTP calls. - -#### Signature - -```typescript -createExpressionTool(opts: { ...3 fields }): DataMap -``` - -#### Parameters - - - Configuration including name, pattern-result pairs, and optional parameters. - - - - - - - - -#### Returns - -`DataMap` — A configured DataMap instance ready for registration. - -#### Source - -[`src/DataMap.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts) - -Line 460. - -*** - -### createSimpleApiTool - -Create a DataMap tool that calls a single API endpoint and formats the response. - -#### Signature - -```typescript -createSimpleApiTool(opts: { ...8 fields }): DataMap -``` - -#### Parameters - - - Configuration including name, URL, response template, and optional parameters. - - - - - - - - - - - - - - - - - - -#### Returns - -`DataMap` — A configured DataMap instance ready for registration. - -#### Source - -[`src/DataMap.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts) - -Line 430. - -*** - -### getAllowedEnvPrefixes - -Get the current global allowed env var prefixes. - -#### Signature - -```typescript -getAllowedEnvPrefixes(): string[] -``` - -#### Returns - -`string[]` — A copy of the current prefix list. - -#### Source - -[`src/DataMap.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts) - -Line 31. - -*** - -### setAllowedEnvPrefixes - -Set the global allowed env var prefixes for `${ENV.*}` expansion. - -Only environment variables whose names start with one of these prefixes -will be expanded. An empty array allows all variables (escape hatch). - -#### Signature - -```typescript -setAllowedEnvPrefixes(prefixes: string[]): void -``` - -#### Parameters - - - Array of prefix strings to allow. - - -#### Returns - -`void` - -#### Source - -[`src/DataMap.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts) - -Line 23. - -## Source - -[`src/DataMap.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/DataMap.ts) - -Line 94. diff --git a/fern/products/sdk-reference/typescript/function-result/index.mdx b/fern/products/sdk-reference/typescript/function-result/index.mdx deleted file mode 100644 index 1da97ecdde..0000000000 --- a/fern/products/sdk-reference/typescript/function-result/index.mdx +++ /dev/null @@ -1,1788 +0,0 @@ ---- -slug: "/reference/typescript/function-result" -title: "FunctionResult" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "FunctionResult" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts" ---- -# `FunctionResult` - -Builder for SWAIG function responses. - -Carries response text (what the AI says to the caller) and a list of structured -actions (connect, hangup, SMS, record, transfer, etc.) that the SignalWire platform -executes after the AI speaks. Every mutating method returns `this` for fluent chaining. - -Return an instance (or a promise that resolves to one) from any SWAIG tool handler. - -## Signature - -```typescript -class FunctionResult -``` - -## Examples - - - - ```typescript - agent.defineTool({ - name: 'say_hi', - description: 'Say hello.', - parameters: { type: 'object', properties: {} }, - handler: () => new FunctionResult('Hello there!'), - }); - ``` - - - - ```typescript - agent.defineTool({ - name: 'transfer_to_sales', - description: 'Forward the caller to sales.', - parameters: { type: 'object', properties: {} }, - handler: () => - new FunctionResult('Connecting you to sales now.').connect('+15551112222'), - }); - ``` - - - - ```typescript - new FunctionResult("Thanks, you're all set.") - .sendSms({ toNumber: '+15551234567', fromNumber: '+15559998888', body: 'Confirmation!' }) - .hangup(); - ``` - - - -## See Also - -- \- \[AgentBase.defineTool]\(/docs/sdk-reference/reference/typescript/agent-base#define-tool) — where handlers return a \`FunctionResult\` - \- \[DataMap]\(/docs/sdk-reference/reference/typescript/data-map) — alternative for purely data-driven (no handler) tools - -## Properties - - - Ordered list of actions to execute after the response. - - - - Whether actions should be post-processed after the AI responds. - - - - The text response returned to the AI agent. - - -## Methods - -### addAction - -Append a single named action to the action list. - -#### Signature - -```typescript -addAction(name: string, data: unknown): this -``` - -#### Parameters - - - The action name (e.g., "hangup", "say"). - - - - The action payload. - - -#### Returns - -`this` — This instance for chaining. - -#### Source - -[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) - -Line 122. - -*** - -### addActions - -Append multiple action objects to the action list. - -#### Signature - -```typescript -addActions(actions: Record[]): this -``` - -#### Parameters - - - Array of action objects to append. - - -#### Returns - -`this` — This instance for chaining. - -#### Source - -[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) - -Line 132. - -*** - -### addDynamicHints - -Add dynamic speech recognition hints to improve transcription accuracy. - -#### Signature - -```typescript -addDynamicHints( - hints: string | { ignore_case?: boolean; pattern: string; replace: string }[] -): this -``` - -#### Parameters - - - Array of hint strings or pattern-replacement objects. - - -#### Returns - -`this` — This instance for chaining. - -#### Source - -[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) - -Line 265. - -*** - -### clearDynamicHints - -Remove all previously added dynamic speech hints. - -#### Signature - -```typescript -clearDynamicHints(): this -``` - -#### Returns - -`this` — This instance for chaining. - -#### Source - -[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) - -Line 273. - -*** - -### connect - -Connect the call to another destination via SWML transfer. - -#### Signature - -```typescript -connect(destination: string, final: boolean = true, fromAddr?: string): this -``` - -#### Parameters - - - The destination address (phone number or SIP URI). - - - - Whether this is a final transfer that ends the AI session. - - - - Optional caller ID to use for the outbound leg. - - -#### Returns - -`this` — This instance for chaining. - -#### Source - -[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) - -Line 146. - -*** - -### constructor - -#### Signature - -```typescript -constructor(response?: string, postProcess: boolean = false): FunctionResult -``` - -#### Parameters - - - Initial response text; defaults to empty string. - - - - Whether to enable post-processing of actions. - - -#### Returns - -`FunctionResult` - -#### Source - -[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) - -Line 88. - -*** - -### createPaymentAction - -Create a payment action for use within a payment prompt. - -**Modifiers:** `static` - -#### Signature - -```typescript -createPaymentAction(actionType: string, phrase: string): PaymentAction -``` - -#### Parameters - - - The action type (e.g., "say", "play"). - - - - The phrase or URL for this action. - - -#### Returns - -`PaymentAction` — A new PaymentAction object. - -#### Source - -[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) - -Line 900. - -*** - -### createPaymentParameter - -Create a custom payment parameter for the payment connector. - -**Modifiers:** `static` - -#### Signature - -```typescript -createPaymentParameter(name: string, value: string): PaymentParameter -``` - -#### Parameters - - - The parameter name. - - - - The parameter value. - - -#### Returns - -`PaymentParameter` — A new PaymentParameter object. - -#### Source - -[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) - -Line 910. - -*** - -### createPaymentPrompt - -Create a payment prompt configuration object. - -**Modifiers:** `static` - -#### Signature - -```typescript -createPaymentPrompt( - forSituation: string, - actions: PaymentAction[], - cardType?: string, - errorType?: string -): PaymentPrompt -``` - -#### Parameters - - - The situation this prompt applies to. - - - - Actions to perform for this prompt. - - - - Optional card type filter. - - - - Optional error type this prompt handles. - - -#### Returns - -`PaymentPrompt` — A new PaymentPrompt object. - -#### Source - -[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) - -Line 882. - -*** - -### enableExtensiveData - -Enable or disable extensive data reporting in function calls. - -#### Signature - -```typescript -enableExtensiveData(enabled: boolean = true): this -``` - -#### Parameters - - - Whether to enable extensive data. - - -#### Returns - -`this` — This instance for chaining. - -#### Source - -[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) - -Line 479. - -*** - -### enableFunctionsOnTimeout - -Control whether functions fire on speaker timeout. - -#### Signature - -```typescript -enableFunctionsOnTimeout(enabled: boolean = true): this -``` - -#### Parameters - - - Whether to enable function execution on timeout. - - -#### Returns - -`this` — This instance for chaining. - -#### Source - -[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) - -Line 450. - -*** - -### executeRpc - -Execute a SignalWire RPC method via SWML. - -#### Signature - -```typescript -executeRpc(opts: { ...4 fields }): this -``` - -#### Parameters - - - RPC parameters including method name and optional call/node IDs. - - - - - - - - - - -#### Returns - -`this` — This instance for chaining. - -#### Source - -[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) - -Line 737. - -*** - -### executeSwml - -Execute arbitrary SWML content as an action. - -#### Signature - -```typescript -executeSwml( - swmlContent: string | Record | { toDict: unknown }, - transfer: boolean = false -): this -``` - -#### Parameters - - - SWML as a JSON string or object. - - - - Whether this SWML execution should transfer the call. - - -#### Returns - -`this` — This instance for chaining. - -#### Source - -[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) - -Line 342. - -*** - -### hangup - -Hang up the call. - -#### Signature - -```typescript -hangup(): this -``` - -#### Returns - -`this` — This instance for chaining. - -#### Source - -[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) - -Line 188. - -*** - -### hold - -Place the call on hold for a specified duration. - -#### Signature - -```typescript -hold(timeout: number = 300): this -``` - -#### Parameters - - - Hold duration in seconds, clamped to 0-900. - - -#### Returns - -`this` — This instance for chaining. - -#### Source - -[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) - -Line 197. - -*** - -### joinConference - -Join a conference by name with optional configuration. - -#### Signature - -```typescript -joinConference(name: string, opts?: { ...17 fields }): this -``` - -#### Parameters - - - The conference name to join. - - - - Optional conference settings such as mute, recording, and callbacks. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -#### Returns - -`this` — This instance for chaining. - -#### Source - -[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) - -Line 658. - -*** - -### joinRoom - -Join a SignalWire room. - -#### Signature - -```typescript -joinRoom(name: string): this -``` - -#### Parameters - - - The room name to join. - - -#### Returns - -`this` — This instance for chaining. - -#### Source - -[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) - -Line 633. - -*** - -### pay - -Initiate a payment collection flow on the call. - -#### Signature - -```typescript -pay(opts: { ...19 fields }): this -``` - -#### Parameters - - - Payment configuration including connector URL, method, and prompt options. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -#### Returns - -`this` — This instance for chaining. - -#### Source - -[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) - -Line 813. - -*** - -### playBackgroundFile - -Play an audio file in the background during the call. - -#### Signature - -```typescript -playBackgroundFile(filename: string, wait: boolean = false): this -``` - -#### Parameters - - - URL or path of the audio file. - - - - Whether to wait for playback to complete before continuing. - - -#### Returns - -`this` — This instance for chaining. - -#### Source - -[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) - -Line 243. - -*** - -### recordCall - -Start recording the call. - -#### Signature - -```typescript -recordCall(opts?: { ...11 fields }): this -``` - -#### Parameters - - - Recording options including format, direction, and timeouts. - - - - - - - - - - - - - - - - - - - - - - - - -#### Returns - -`this` — This instance for chaining. - -#### Source - -[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) - -Line 533. - -*** - -### removeGlobalData - -Remove keys from the global data store. - -#### Signature - -```typescript -removeGlobalData(keys: string | string[]): this -``` - -#### Parameters - - - A single key or array of keys to remove. - - -#### Returns - -`this` — This instance for chaining. - -#### Source - -[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) - -Line 312. - -*** - -### removeMetadata - -Remove metadata keys from the current call. - -#### Signature - -```typescript -removeMetadata(keys: string | string[]): this -``` - -#### Parameters - - - A single key or array of keys to remove. - - -#### Returns - -`this` — This instance for chaining. - -#### Source - -[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) - -Line 330. - -*** - -### replaceInHistory - -Replace the function call output in conversation history. - -#### Signature - -```typescript -replaceInHistory(text: string | boolean = true): this -``` - -#### Parameters - - - Replacement text, or true to replace with the response. - - -#### Returns - -`this` — This instance for chaining. - -#### Source - -[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) - -Line 488. - -*** - -### rpcAiMessage - -Send an AI message to another call via RPC. - -#### Signature - -```typescript -rpcAiMessage(callId: string, messageText: string, role: string = 'system'): this -``` - -#### Parameters - - - The target call ID. - - - - The message text to inject. - - - - The message role (defaults to "system"). - - -#### Returns - -`this` — This instance for chaining. - -#### Source - -[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) - -Line 785. - -*** - -### rpcAiUnhold - -Unhold a call that was previously placed on hold via RPC. - -#### Signature - -```typescript -rpcAiUnhold(callId: string): this -``` - -#### Parameters - - - The target call ID to unhold. - - -#### Returns - -`this` — This instance for chaining. - -#### Source - -[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) - -Line 798. - -*** - -### rpcDial - -Dial a number via RPC, optionally specifying device type. - -#### Signature - -```typescript -rpcDial( - toNumber: string, - fromNumber: string, - destSwml: string, - deviceType: string = 'phone' -): this -``` - -#### Parameters - - - The destination phone number. - - - - The caller ID number. - - - - The SWML destination for the dialed call. - - - - The device type (defaults to "phone"). - - -#### Returns - -`this` — This instance for chaining. - -#### Source - -[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) - -Line 765. - -*** - -### say - -Speak text to the caller via TTS. - -#### Signature - -```typescript -say(text: string): this -``` - -#### Parameters - - - The text to speak. - - -#### Returns - -`this` — This instance for chaining. - -#### Source - -[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) - -Line 233. - -*** - -### sendSms - -Send an SMS or MMS message from within the call flow. - -#### Signature - -```typescript -sendSms(opts: { ...6 fields }): this -``` - -#### Parameters - - - SMS parameters. Must include either `body` (text SMS) or `media` (MMS) — supplying neither throws. - - - - - - - - - - - - - - -#### Returns - -`this` — This instance for chaining. - -#### Throws - -- When neither `body` nor `media` is provided. - -#### Source - -[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) - -Line 502. - -*** - -### setEndOfSpeechTimeout - -Set the silence duration that marks the end of a user's speech. - -#### Signature - -```typescript -setEndOfSpeechTimeout(milliseconds: number): this -``` - -#### Parameters - - - Timeout in milliseconds. - - -#### Returns - -`this` — This instance for chaining. - -#### Source - -[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) - -Line 283. - -*** - -### setMetadata - -Set metadata key-value pairs on the current call. - -#### Signature - -```typescript -setMetadata(data: Record): this -``` - -#### Parameters - - - Metadata key-value pairs to set. - - -#### Returns - -`this` — This instance for chaining. - -#### Source - -[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) - -Line 321. - -*** - -### setPostProcess - -Enable or disable post-processing of actions. - -#### Signature - -```typescript -setPostProcess(postProcess: boolean): this -``` - -#### Parameters - - - Whether to post-process actions. - - -#### Returns - -`this` — This instance for chaining. - -#### Source - -[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) - -Line 111. - -*** - -### setResponse - -Set the response text returned to the AI agent. - -#### Signature - -```typescript -setResponse(response: string): this -``` - -#### Parameters - - - The response text. - - -#### Returns - -`this` — This instance for chaining. - -#### Source - -[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) - -Line 101. - -*** - -### setSpeechEventTimeout - -Set the timeout for speech event detection. - -#### Signature - -```typescript -setSpeechEventTimeout(milliseconds: number): this -``` - -#### Parameters - - - Timeout in milliseconds. - - -#### Returns - -`this` — This instance for chaining. - -#### Source - -[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) - -Line 292. - -*** - -### simulateUserInput - -Inject text as if the user had spoken it. - -#### Signature - -```typescript -simulateUserInput(text: string): this -``` - -#### Parameters - - - The simulated user input text. - - -#### Returns - -`this` — This instance for chaining. - -#### Source - -[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) - -Line 470. - -*** - -### sipRefer - -Send a SIP REFER to transfer the call. - -#### Signature - -```typescript -sipRefer(toUri: string): this -``` - -#### Parameters - - - The SIP URI to refer the call to. - - -#### Returns - -`this` — This instance for chaining. - -#### Source - -[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) - -Line 645. - -*** - -### stop - -Stop the AI session. - -#### Signature - -```typescript -stop(): this -``` - -#### Returns - -`this` — This instance for chaining. - -#### Source - -[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) - -Line 222. - -*** - -### stopBackgroundFile - -Stop any currently playing background audio file. - -#### Signature - -```typescript -stopBackgroundFile(): this -``` - -#### Returns - -`this` — This instance for chaining. - -#### Source - -[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) - -Line 254. - -*** - -### stopRecordCall - -Stop an active call recording. - -#### Signature - -```typescript -stopRecordCall(controlId?: string): this -``` - -#### Parameters - - - Optional control ID of the recording to stop. - - -#### Returns - -`this` — This instance for chaining. - -#### Source - -[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) - -Line 573. - -*** - -### stopTap - -Stop an active media tap. - -#### Signature - -```typescript -stopTap(controlId?: string): this -``` - -#### Parameters - - - Optional control ID of the tap to stop. - - -#### Returns - -`this` — This instance for chaining. - -#### Source - -[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) - -Line 617. - -*** - -### switchContext - -Switch the AI context with optional new prompts and reset options. - -#### Signature - -```typescript -switchContext(opts?: { ...4 fields }): this -``` - -#### Parameters - - - Context switch options including system/user prompts and reset flags. - - - - - - - - - - -#### Returns - -`this` — This instance for chaining. - -#### Source - -[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) - -Line 412. - -*** - -### swmlChangeContext - -Change the current SWML context. - -#### Signature - -```typescript -swmlChangeContext(contextName: string): this -``` - -#### Parameters - - - The name of the context to switch to. - - -#### Returns - -`this` — This instance for chaining. - -#### Source - -[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) - -Line 391. - -*** - -### swmlChangeStep - -Change the current SWML step. - -#### Signature - -```typescript -swmlChangeStep(stepName: string): this -``` - -#### Parameters - - - The name of the step to switch to. - - -#### Returns - -`this` — This instance for chaining. - -#### Source - -[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) - -Line 382. - -*** - -### swmlTransfer - -Transfer the call to a SWML destination with a custom AI response. - -#### Signature - -```typescript -swmlTransfer(dest: string, aiResponse: string, final: boolean = true): this -``` - -#### Parameters - - - The transfer destination. - - - - The AI response text to set before transferring. - - - - Whether this is a final transfer. - - -#### Returns - -`this` — This instance for chaining. - -#### Source - -[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) - -Line 168. - -*** - -### swmlUserEvent - -Emit a custom user event via SWML. - -#### Signature - -```typescript -swmlUserEvent(eventData: Record): this -``` - -#### Parameters - - - The event payload. - - -#### Returns - -`this` — This instance for chaining. - -#### Source - -[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) - -Line 400. - -*** - -### tap - -Start a media tap to stream audio to an external URI. - -#### Signature - -```typescript -tap(opts: { ...6 fields }): this -``` - -#### Parameters - - - Tap parameters including URI, direction, and codec. - - - - - - - - - - - - - - -#### Returns - -`this` — This instance for chaining. - -#### Source - -[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) - -Line 587. - -*** - -### toDict - -Serialize this result to a plain object for the SWAIG response. - -#### Signature - -```typescript -toDict(): Record -``` - -#### Returns - -`Record` — A dictionary with response, action, and post\_process fields; falls back to "Action completed." if empty. - -#### Source - -[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) - -Line 920. - -*** - -### toggleFunctions - -Enable or disable SWAIG functions by name. - -#### Signature - -```typescript -toggleFunctions(toggles: { active: boolean; function: string }[]): this -``` - -#### Parameters - - - Array of function name and active state pairs. - - -#### Returns - -`this` — This instance for chaining. - -#### Source - -[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) - -Line 441. - -*** - -### updateGlobalData - -Merge key-value pairs into the global data store shared across functions. - -#### Signature - -```typescript -updateGlobalData(data: Record): this -``` - -#### Parameters - - - Key-value pairs to set or update. - - -#### Returns - -`this` — This instance for chaining. - -#### Source - -[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) - -Line 303. - -*** - -### updateSettings - -Update AI engine settings at runtime. - -#### Signature - -```typescript -updateSettings(settings: Record): this -``` - -#### Parameters - - - Key-value pairs of settings to update. - - -#### Returns - -`this` — This instance for chaining. - -#### Source - -[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) - -Line 459. - -*** - -### waitForUser - -Wait for user input before continuing. - -#### Signature - -```typescript -waitForUser(opts?: { ...3 fields }): this -``` - -#### Parameters - - - Options controlling wait behavior: enable/disable, timeout, or answer-first mode. - - - - - - - - -#### Returns - -`this` — This instance for chaining. - -#### Source - -[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) - -Line 206. - -## Interfaces - -### PaymentAction - -A single action within a payment prompt (e.g., say or play). - -#### Signature - -```typescript -interface PaymentAction -``` - -#### Properties - - - The phrase or URL to use for this action. - - - - The action type (e.g., "say", "play"). - - -#### Source - -[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) - -Line 21. - -*** - -### PaymentParameter - -A custom key-value parameter passed to the payment connector. - -#### Signature - -```typescript -interface PaymentParameter -``` - -#### Properties - - - The parameter name. - - - - The parameter value. - - -#### Source - -[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) - -Line 29. - -*** - -### PaymentPrompt - -Prompt configuration for a payment collection flow. - -#### Signature - -```typescript -interface PaymentPrompt -``` - -#### Properties - - - Actions to perform for this prompt. - - - - Optional card type filter for this prompt. - - - - Optional error type this prompt handles. - - - - The situation this prompt applies to (e.g., "payment-card-number"). - - -#### Source - -[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) - -Line 9. - -## Source - -[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) - -Line 76. diff --git a/fern/products/sdk-reference/typescript/generate-verb-types/index.mdx b/fern/products/sdk-reference/typescript/generate-verb-types/index.mdx deleted file mode 100644 index 3121506e50..0000000000 --- a/fern/products/sdk-reference/typescript/generate-verb-types/index.mdx +++ /dev/null @@ -1,25 +0,0 @@ ---- -slug: "/reference/typescript/generate-verb-types" -title: "generateVerbTypes" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "module" - language: "typescript" - qualified_name: "generateVerbTypes" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/generateVerbTypes.ts" ---- -# `generateVerbTypes` - -## Signature - -```typescript -module generateVerbTypes -``` - -## Source - -[`src/generateVerbTypes.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/generateVerbTypes.ts) - -Line 1. diff --git a/fern/products/sdk-reference/typescript/index.mdx b/fern/products/sdk-reference/typescript/index.mdx index 56fb6d0e14..f2180a8dcf 100644 --- a/fern/products/sdk-reference/typescript/index.mdx +++ b/fern/products/sdk-reference/typescript/index.mdx @@ -10,69 +10,8 @@ lustri: ## Modules -- [`addresses`](/docs/sdk-reference/reference/typescript/rest/namespaces/addresses) -- [`agent-loader`](/docs/sdk-reference/reference/typescript/cli/agent-loader) -- [`api_ninjas_trivia`](/docs/sdk-reference/reference/typescript/skills/builtin/api-ninjas-trivia) -- [`ask_claude`](/docs/sdk-reference/reference/typescript/skills/builtin/ask-claude) -- [`builtin`](/docs/sdk-reference/reference/typescript/skills/builtin) -- [`callHandler`](/docs/sdk-reference/reference/typescript/rest/call-handler) -- [`calling`](/docs/sdk-reference/reference/typescript/rest/namespaces/calling) -- [`chat`](/docs/sdk-reference/reference/typescript/rest/namespaces/chat) -- [`claude_skills`](/docs/sdk-reference/reference/typescript/skills/builtin/claude-skills) -- [`closedSets`](/docs/sdk-reference/reference/typescript/relay/closed-sets) -- [`compat`](/docs/sdk-reference/reference/typescript/rest/namespaces/compat) -- [`constants`](/docs/sdk-reference/reference/typescript/relay/constants) -- [`custom_skills`](/docs/sdk-reference/reference/typescript/skills/builtin/custom-skills) -- [`datasphere`](/docs/sdk-reference/reference/typescript/rest/namespaces/datasphere) -- [`datasphere`](/docs/sdk-reference/reference/typescript/skills/builtin/datasphere) -- [`datasphere_serverless`](/docs/sdk-reference/reference/typescript/skills/builtin/datasphere-serverless) -- [`datetime`](/docs/sdk-reference/reference/typescript/skills/builtin/datetime) -- [`fabric`](/docs/sdk-reference/reference/typescript/rest/namespaces/fabric) -- [`generateVerbTypes`](/docs/sdk-reference/reference/typescript/generate-verb-types) -- [`google_maps`](/docs/sdk-reference/reference/typescript/skills/builtin/google-maps) -- [`imported-numbers`](/docs/sdk-reference/reference/typescript/rest/namespaces/imported-numbers) -- [`info_gatherer`](/docs/sdk-reference/reference/typescript/skills/builtin/info-gatherer) -- [`joke`](/docs/sdk-reference/reference/typescript/skills/builtin/joke) -- [`livewire`](/docs/sdk-reference/reference/typescript/livewire) -- [`logs`](/docs/sdk-reference/reference/typescript/rest/namespaces/logs) -- [`lookup`](/docs/sdk-reference/reference/typescript/rest/namespaces/lookup) -- [`math`](/docs/sdk-reference/reference/typescript/skills/builtin/math) -- [`mcp_gateway`](/docs/sdk-reference/reference/typescript/skills/builtin/mcp-gateway) -- [`mfa`](/docs/sdk-reference/reference/typescript/rest/namespaces/mfa) -- [`mock-data`](/docs/sdk-reference/reference/typescript/cli/mock-data) -- [`native_vector_search`](/docs/sdk-reference/reference/typescript/skills/builtin/native-vector-search) -- [`normalize`](/docs/sdk-reference/reference/typescript/relay/normalize) -- [`number-groups`](/docs/sdk-reference/reference/typescript/rest/namespaces/number-groups) -- [`pagination`](/docs/sdk-reference/reference/typescript/rest/pagination) -- [`phone-numbers`](/docs/sdk-reference/reference/typescript/rest/namespaces/phone-numbers) -- [`play_background_file`](/docs/sdk-reference/reference/typescript/skills/builtin/play-background-file) -- [`prefabs`](/docs/sdk-reference/reference/typescript/prefabs) -- [`project`](/docs/sdk-reference/reference/typescript/rest/namespaces/project) -- [`pubsub`](/docs/sdk-reference/reference/typescript/rest/namespaces/pubsub) -- [`queues`](/docs/sdk-reference/reference/typescript/rest/namespaces/queues) -- [`recordings`](/docs/sdk-reference/reference/typescript/rest/namespaces/recordings) -- [`registry`](/docs/sdk-reference/reference/typescript/rest/namespaces/registry) +- [`agents`](/docs/sdk-reference/reference/typescript/agents) +- [`core`](/docs/sdk-reference/reference/typescript/core) - [`relay`](/docs/sdk-reference/reference/typescript/relay) - [`rest`](/docs/sdk-reference/reference/typescript/rest) -- [`SecurityUtils`](/docs/sdk-reference/reference/typescript/security-utils) -- [`short-codes`](/docs/sdk-reference/reference/typescript/rest/namespaces/short-codes) -- [`sip-profile`](/docs/sdk-reference/reference/typescript/rest/namespaces/sip-profile) -- [`SkillName`](/docs/sdk-reference/reference/typescript/skills/skill-name) -- [`skills`](/docs/sdk-reference/reference/typescript/skills) -- [`spider`](/docs/sdk-reference/reference/typescript/skills/builtin/spider) -- [`swaig-test`](/docs/sdk-reference/reference/typescript/cli/swaig-test) -- [`swml_transfer`](/docs/sdk-reference/reference/typescript/skills/builtin/swml-transfer) -- [`SWMLHandler`](/docs/sdk-reference/reference/typescript/swml-handler) -- [`SwmlVerbMethods.generated`](/docs/sdk-reference/reference/typescript/swml-verb-methods.generated) -- [`TypeInference`](/docs/sdk-reference/reference/typescript/type-inference) -- [`types`](/docs/sdk-reference/reference/typescript/relay/types) -- [`types`](/docs/sdk-reference/reference/typescript/rest/types) -- [`types`](/docs/sdk-reference/reference/typescript/types) -- [`verified-callers`](/docs/sdk-reference/reference/typescript/rest/namespaces/verified-callers) -- [`video`](/docs/sdk-reference/reference/typescript/rest/namespaces/video) -- [`weather_api`](/docs/sdk-reference/reference/typescript/skills/builtin/weather-api) -- [`web_search`](/docs/sdk-reference/reference/typescript/skills/builtin/web-search) -- [`WebhookMiddleware`](/docs/sdk-reference/reference/typescript/webhook-middleware) -- [`WebhookValidator`](/docs/sdk-reference/reference/typescript/webhook-validator) -- [`wikipedia_search`](/docs/sdk-reference/reference/typescript/skills/builtin/wikipedia-search) diff --git a/fern/products/sdk-reference/typescript/list-skills.mdx b/fern/products/sdk-reference/typescript/list-skills.mdx index 95e89a30ea..7f49c25455 100644 --- a/fern/products/sdk-reference/typescript/list-skills.mdx +++ b/fern/products/sdk-reference/typescript/list-skills.mdx @@ -15,7 +15,7 @@ lustri: List metadata for all registered skills. Equivalent to Python's `list_skills()` — proxies to the singleton -[SkillRegistry](/docs/sdk-reference/reference/typescript/skills/skill-registry). Python's version returns a plain dict keyed by +`SkillRegistry`. Python's version returns a plain dict keyed by skill name; this returns an array of `_SkillSchemaInfo` entries (the TS shape is richer and includes the name field). diff --git a/fern/products/sdk-reference/typescript/livewire/agent-handoff/index.mdx b/fern/products/sdk-reference/typescript/livewire/agent-handoff/index.mdx deleted file mode 100644 index 13a3c20765..0000000000 --- a/fern/products/sdk-reference/typescript/livewire/agent-handoff/index.mdx +++ /dev/null @@ -1,53 +0,0 @@ ---- -slug: "/reference/typescript/livewire/agent-handoff" -title: "AgentHandoff" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "livewire.AgentHandoff" - parent: "livewire" - module: "livewire" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" ---- -# `AgentHandoff` - -Signals a handoff to another agent in multi-agent scenarios. - -## Signature - -```typescript -class AgentHandoff -``` - -## Properties - - - Target agent that should take over the conversation. - - - - Optional return value surfaced when the handoff completes. - - -## Methods - -### constructor - -#### Signature - -```typescript -constructor(): AgentHandoff -``` - -#### Returns - -`AgentHandoff` - -## Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 741. diff --git a/fern/products/sdk-reference/typescript/livewire/agent-server/index.mdx b/fern/products/sdk-reference/typescript/livewire/agent-server/index.mdx deleted file mode 100644 index 6f2b14e140..0000000000 --- a/fern/products/sdk-reference/typescript/livewire/agent-server/index.mdx +++ /dev/null @@ -1,117 +0,0 @@ ---- -slug: "/reference/typescript/livewire/agent-server" -title: "AgentServer" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "livewire.AgentServer" - parent: "livewire" - module: "livewire" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" ---- -# `AgentServer` - -Mirrors a LiveKit AgentServer -- registers entrypoints and starts. - -Usage: -const server = new AgentServer(); -server.setupFnc = async (proc) => \{ ... \}; - -// Bare decorator usage: -server.rtcSession(myEntryFn); - -// Parameterized decorator usage: -server.rtcSession(\{ agentName: 'myAgent' \})(myEntryFn); - -cli.runApp(server); - -## Signature - -```typescript -class AgentServer -``` - -## Properties - - - Optional prewarm hook called before the entrypoint. Mirrors Python's setup\_fnc. - - -## Methods - -### constructor - -#### Signature - -```typescript -constructor(_opts?: any): AgentServer -``` - -#### Parameters - - - -#### Returns - -`AgentServer` - -#### Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 988. - -*** - -### rtcSession - -Decorator that registers the session entrypoint. - -Supports both bare and parameterized usage: -server.rtcSession(fn) // bare -server.rtcSession(fn, \{ agentName: 'x' \}) // with opts, explicit fn -server.rtcSession(\{ agentName: 'x' \})(fn) // parameterized decorator -@server.rtcSession // decorator (bare) -@server.rtcSession(\{ agentName: 'x' \}) // decorator (parameterized) - -#### Signature - -```typescript -rtcSession( - fnOrOpts?: (ctx: JobContext) => Promise | { agentName?: string; onRequest?: (args: any[]) => any | null; onSessionEnd?: (args: any[]) => any | null; type?: string }, - opts?: { ...4 fields } -): void | (fn: (ctx: JobContext) => Promise) => (ctx: JobContext) => Promise -``` - -#### Parameters - - - - - - - - - - - - - -#### Returns - -`void | (fn: (ctx: JobContext) => Promise) => (ctx: JobContext) => Promise` - -#### Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 1000. - -## Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 978. diff --git a/fern/products/sdk-reference/typescript/livewire/agent-session/index.mdx b/fern/products/sdk-reference/typescript/livewire/agent-session/index.mdx deleted file mode 100644 index 05cae5c0e2..0000000000 --- a/fern/products/sdk-reference/typescript/livewire/agent-session/index.mdx +++ /dev/null @@ -1,289 +0,0 @@ ---- -slug: "/reference/typescript/livewire/agent-session" -title: "AgentSession" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "livewire.AgentSession" - parent: "livewire" - module: "livewire" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" ---- -# `AgentSession` - -Mirrors a LiveKit `AgentSession` — binds an [Agent](/docs/sdk-reference/reference/typescript/livewire/agent) to SignalWire. - -Call [AgentSession.start](/docs/sdk-reference/reference/typescript/livewire/agent-session#start) with an `Agent` to construct an internal -[AgentBase](/docs/sdk-reference/reference/typescript/agent-base) and begin serving SWML. Pipeline-related options are -accepted for API parity but are no-ops server-side. - -## Signature - -```typescript -class AgentSession -``` - -## Type Parameters - - - -## Properties - - - Conversation history entries captured over the session's lifetime. - - - - Current per-session user data. Set by the constructor or via the setter. - - -## Methods - -### constructor - -#### Signature - -```typescript -constructor(options?: { ...14 fields }): AgentSession -``` - -#### Type Parameters - - - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -#### Returns - -`AgentSession` - -#### Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 436. - -*** - -### generateReply - -Trigger the agent to generate a reply, optionally with extra instructions. - -#### Signature - -```typescript -generateReply(options?: { ...1 fields }): void -``` - -#### Parameters - - - Generation options. - - - Extra instructions injected as a new prompt section before the next LLM turn. - - - -#### Returns - -`void` - -#### Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 619. - -*** - -### getSwAgent - -Return the underlying SignalWire [AgentBase](/docs/sdk-reference/reference/typescript/agent-base). Useful for tests and -advanced use cases that need to reach past the LiveKit facade. - -#### Signature - -```typescript -getSwAgent(): AgentBase | undefined -``` - -#### Returns - -`AgentBase | undefined` — The wrapped `AgentBase`, or `undefined` before [start](/docs/sdk-reference/reference/typescript/livewire/agent-session#start). - -#### Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 669. - -*** - -### interrupt - -Interrupt current speech. **No-op** on SignalWire — barge-in is handled -automatically by the control plane. - -#### Signature - -```typescript -interrupt(): void -``` - -#### Returns - -`void` - -#### Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 629. - -*** - -### say - -Queue text to be spoken by the agent. - -Before [start](/docs/sdk-reference/reference/typescript/livewire/agent-session#start) is called, text is buffered and injected at start -time as the agent's initial greeting. After start, text is added as an -additional prompt section. - -#### Signature - -```typescript -say(text: string): void -``` - -#### Parameters - - - Line for the agent to speak. - - -#### Returns - -`void` - -#### Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 602. - -*** - -### start - -Start the session by binding the agent to a freshly-constructed -[AgentBase](/docs/sdk-reference/reference/typescript/agent-base), mapping LiveKit-style options onto SignalWire AI params. - -Must be called before any other method on this session. The underlying -`AgentBase` is not started here — use [runApp](/docs/sdk-reference/reference/typescript/livewire#run-app) or an `AgentServer` -to serve it. - -#### Signature - -```typescript -start(params: { ...3 fields }): Promise -``` - -#### Parameters - - - Start parameters. - - - The [Agent](/docs/sdk-reference/reference/typescript/livewire/agent) to bind. - - - - Call-recording flag placeholder; ignored on SignalWire. - - - - LiveKit room placeholder; ignored on SignalWire. - - - -#### Returns - -`Promise` — Resolves once the underlying `AgentBase` has been built. - -#### Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 514. - -*** - -### updateAgent - -Swap the [Agent](/docs/sdk-reference/reference/typescript/livewire/agent) bound to this session. - -Preserves the underlying `AgentBase` but replaces its prompt with the new -agent's instructions. - -#### Signature - -```typescript -updateAgent(agent: Agent): void -``` - -#### Parameters - - - Replacement agent. - - -#### Returns - -`void` - -#### Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 641. - -## Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 420. diff --git a/fern/products/sdk-reference/typescript/livewire/agent/index.mdx b/fern/products/sdk-reference/typescript/livewire/agent/index.mdx deleted file mode 100644 index 22d509c00d..0000000000 --- a/fern/products/sdk-reference/typescript/livewire/agent/index.mdx +++ /dev/null @@ -1,376 +0,0 @@ ---- -slug: "/reference/typescript/livewire/agent" -title: "Agent" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "livewire.Agent" - parent: "livewire" - module: "livewire" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" ---- -# `Agent` - -Mirrors a LiveKit `voice.Agent` — holds instructions and tool definitions. - -Pipeline options (`stt`, `tts`, `vad`, `llm`, `turnDetection`) are accepted -for API parity but are **no-ops** — SignalWire's control plane handles the -entire AI pipeline server-side. Set instructions and tools; everything else -just logs once and continues. - -## Signature - -```typescript -class Agent -``` - -## Type Parameters - - - -## Examples - -```typescript -import { livewire } from '@signalwire/sdk'; - -const timeTool = livewire.tool({ - description: 'Return the current time.', - execute: () => new Date().toISOString(), -}); - -const agent = new livewire.Agent({ - instructions: 'You are a friendly helper.', - tools: [{ ...timeTool, name: 'time' }], -}); - -const session = new livewire.AgentSession(); -await session.start({ agent }); -``` - -## Properties - - - System instructions passed through to the SignalWire AI prompt. - - - - The currently-bound [AgentSession](/docs/sdk-reference/reference/typescript/livewire/agent-session), or `undefined` until [AgentSession.start](/docs/sdk-reference/reference/typescript/livewire/agent-session#start) is called. - - - - Registered tools keyed by name. Mutated by [updateTools](/docs/sdk-reference/reference/typescript/livewire/agent#update-tools). - - - - Arbitrary per-session user data passed to tool handlers via [RunContext.userData](/docs/sdk-reference/reference/typescript/livewire/run-context#user-data). - - -## Methods - -### constructor - -#### Signature - -```typescript -constructor(options?: { ...13 fields }): Agent -``` - -#### Type Parameters - - - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -#### Returns - -`Agent` - -#### Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 182. - -*** - -### llmNode - -LiveKit-compatible LLM node. **No-op** on SignalWire — the control plane -handles LLM inference server-side. - -#### Signature - -```typescript -llmNode( - _chatCtx?: unknown, - _tools?: unknown, - _modelSettings?: unknown -): Promise -``` - -#### Parameters - - - Chat context (ignored). - - - - Tool list (ignored). - - - - Model settings (ignored). - - -#### Returns - -`Promise` - -#### Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 315. - -*** - -### onEnter - -Lifecycle hook called when the agent enters an active call. -Override in a subclass to run setup logic — the default is a no-op. - -#### Signature - -```typescript -onEnter(): Promise -``` - -#### Returns - -`Promise` - -#### Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 271. - -*** - -### onExit - -Lifecycle hook called when the agent exits (call ended or handoff). -Override in a subclass to run teardown logic — the default is a no-op. - -#### Signature - -```typescript -onExit(): Promise -``` - -#### Returns - -`Promise` - -#### Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 277. - -*** - -### onUserTurnCompleted - -Lifecycle hook called when the user finishes speaking. -Override in a subclass to inspect / mutate the turn context before the -LLM responds — the default is a no-op. - -#### Signature - -```typescript -onUserTurnCompleted(_turnCtx?: unknown, _newMessage?: unknown): Promise -``` - -#### Parameters - - - Turn context (LiveKit shape; passed through opaquely). - - - - Newly-captured user message. - - -#### Returns - -`Promise` - -#### Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 287. - -*** - -### sttNode - -LiveKit-compatible STT node. **No-op** on SignalWire — the control plane -handles speech recognition server-side. - -#### Signature - -```typescript -sttNode(_audio?: unknown, _modelSettings?: unknown): Promise -``` - -#### Parameters - - - Audio input (ignored). - - - - Model settings (ignored). - - -#### Returns - -`Promise` - -#### Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 300. - -*** - -### ttsNode - -LiveKit-compatible TTS node. **No-op** on SignalWire — the control plane -handles text-to-speech server-side. - -#### Signature - -```typescript -ttsNode(_text?: unknown, _modelSettings?: unknown): Promise -``` - -#### Parameters - - - Text to synthesise (ignored). - - - - Model settings (ignored). - - -#### Returns - -`Promise` - -#### Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 329. - -*** - -### updateInstructions - -Update the agent's instructions mid-session. - -#### Signature - -```typescript -updateInstructions(instructions: string): Promise -``` - -#### Parameters - - - New system-instructions string for the agent. - - -#### Returns - -`Promise` - -#### Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 345. - -*** - -### updateTools - -Update the agent's tool list mid-session. - -Replaces the current tool record with one built from the given array, -keyed by `tool.name`. Useful for dynamic tool injection based on -conversation state. - -#### Signature - -```typescript -updateTools(tools: FunctionTool[]): Promise -``` - -#### Parameters - - - Ordered array of [FunctionTool](/docs/sdk-reference/reference/typescript/livewire#function-tool) definitions. Each tool's `name` is used as its map key. - - -#### Returns - -`Promise` - -#### Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 359. - -## Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 163. diff --git a/fern/products/sdk-reference/typescript/livewire/chat-context/index.mdx b/fern/products/sdk-reference/typescript/livewire/chat-context/index.mdx deleted file mode 100644 index 95363305c5..0000000000 --- a/fern/products/sdk-reference/typescript/livewire/chat-context/index.mdx +++ /dev/null @@ -1,85 +0,0 @@ ---- -slug: "/reference/typescript/livewire/chat-context" -title: "ChatContext" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "livewire.ChatContext" - parent: "livewire" - module: "livewire" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" ---- -# `ChatContext` - -Minimal `ChatContext` matching LiveKit's `ChatContext`. - -## Signature - -```typescript -class ChatContext -``` - -## Properties - - - Ordered chat messages, each `{ role, content }`. - - -## Methods - -### append - -Append a chat message. - -#### Signature - -```typescript -append(options: { ...2 fields }): this -``` - -#### Parameters - - - Message content. - - - Speaker role (`"user"`, `"assistant"`, or `"system"`). Defaults to `"user"`. - - - - Message text. Defaults to `""`. - - - -#### Returns - -`this` — This instance for chaining. - -#### Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 1232. - -*** - -### constructor - -#### Signature - -```typescript -constructor(): ChatContext -``` - -#### Returns - -`ChatContext` - -## Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 1219. diff --git a/fern/products/sdk-reference/typescript/livewire/index.mdx b/fern/products/sdk-reference/typescript/livewire/index.mdx deleted file mode 100644 index 108fc2a288..0000000000 --- a/fern/products/sdk-reference/typescript/livewire/index.mdx +++ /dev/null @@ -1,394 +0,0 @@ ---- -slug: "/reference/typescript/livewire" -title: "livewire" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "module" - language: "typescript" - qualified_name: "livewire" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" ---- -# `livewire` - -## Signature - -```typescript -module livewire -``` - -## Constants - - - - - LiveKit cli namespace equivalent. - - - - - - LiveKit llm namespace equivalent. - - - - Rotating "Did you know?" tips printed to stderr by the LiveWire banner. Exported for tests; reorder or extend to change what's displayed. - - - - LiveKit voice namespace equivalent. - - -## Classes - - - - Mirrors a LiveKit `voice.Agent` — holds instructions and tool definitions. - - - - Signals a handoff to another agent in multi-agent scenarios. - - - - Mirrors a LiveKit AgentServer -- registers entrypoints and starts. - - - - Mirrors a LiveKit `AgentSession` — binds an [Agent](/docs/sdk-reference/reference/typescript/livewire/agent) to SignalWire. - - - - Minimal `ChatContext` matching LiveKit's `ChatContext`. - - - - Mirrors a LiveKit `JobContext` — provides room and connection info to the entry-point callback registered via [defineAgent](/docs/sdk-reference/reference/typescript/livewire#define-agent). - - - - Mirrors a LiveKit `JobProcess` — placeholder for prewarm / setup hooks. - - - - NoopTracker ensures each informational message is logged at most once, preventing spam when the same noop path is exercised repeatedly. - - - - Stub `Room` — SignalWire does not use the LiveKit room abstraction. - - - - Mirrors a LiveKit `RunContext` — passed to tool handlers so they can read the current session, call handle, and user data. - - - - Stub class mirroring LiveKit's `ServerOptions`. - - - - Signals that a tool should not trigger another LLM reply. - - - - Error thrown from a tool to signal failure back to the LLM. - - - - Stub class mirroring LiveKit's `WorkerOptions`. - - - -## Modules - - - - Stub inference types matching LiveKit's `inference` namespace. - - - - Stub providers matching common LiveKit plugin packages. - - - -## Functions - -### defineAgent - -Mirrors `@livekit/agents.defineAgent()`. - -Packages an entry function (plus an optional prewarm hook) for later -execution by [runApp](/docs/sdk-reference/reference/typescript/livewire#run-app). Pass-through — no side effects. - -#### Signature - -```typescript -defineAgent( - agent: { ...2 fields } -): { entry: (ctx: JobContext) => Promise; prewarm?: (proc: JobProcess) => any } -``` - -#### Parameters - - - Entry and (optional) prewarm functions. - - - Main callback invoked with a [JobContext](/docs/sdk-reference/reference/typescript/livewire/job-context) when the agent runs. - - - - Optional prewarm callback invoked with a [JobProcess](/docs/sdk-reference/reference/typescript/livewire/job-process) before `entry`. - - - -#### Returns - -`{ entry: (ctx: JobContext) => Promise; prewarm?: (proc: JobProcess) => any }` — The same record (pass-through), typed consistently. - -#### Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 865. - -*** - -### handoff - -Create an [AgentHandoff](/docs/sdk-reference/reference/typescript/livewire/agent-handoff) descriptor for multi-agent scenarios. - -#### Signature - -```typescript -handoff(options: { ...2 fields }): AgentHandoff -``` - -#### Parameters - - - Handoff parameters. - - - Agent to transfer control to. - - - - Optional string returned to the current agent when the handoff completes. - - - -#### Returns - -`AgentHandoff` — A handoff descriptor that can be returned from a tool handler. - -#### Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 729. - -*** - -### printBanner - -Print the ASCII banner to stderr, using ANSI cyan when stderr is a TTY. - -#### Signature - -```typescript -printBanner(): void -``` - -#### Returns - -`void` - -#### Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 30. - -*** - -### printTip - -#### Signature - -```typescript -printTip(): void -``` - -#### Returns - -`void` - -#### Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 59. - -*** - -### runApp - -Mirrors `cli.runApp()` from `@livekit/agents-js`. - -1. Prints the LiveWire banner -2. Runs the registered prewarm callback (if any) with a fresh [JobProcess](/docs/sdk-reference/reference/typescript/livewire/job-process) -3. Creates a fresh [JobContext](/docs/sdk-reference/reference/typescript/livewire/job-context) -4. Prints a random tip -5. Invokes the entry function with the context -6. Starts the underlying SignalWire `AgentBase` once the entry function - binds one (via an `AgentSession.start()` call) - -Accepts either an object `{ entry, prewarm? }`, a bare entry function, or -an [AgentServer](/docs/sdk-reference/reference/typescript/agent-server) instance. - -#### Signature - -```typescript -runApp(options: any): void -``` - -#### Parameters - - - Agent descriptor, entry function, or `AgentServer`. - - -#### Returns - -`void` - -#### Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 892. - -*** - -### tool - -Create a tool definition — mirrors `llm.tool()` from `@livekit/agents-js`. - -The returned tool has an empty `name` — the caller assigns it when the tool -is attached to an agent's tools map (see the [Agent](/docs/sdk-reference/reference/typescript/livewire/agent) example). - -#### Signature - -```typescript -tool

(options: { ...3 fields }): FunctionTool -``` - -#### Type Parameters - - - Parameter type passed into `execute`. - - -#### Parameters - - - Tool configuration. - - - Human-readable tool description exposed to the LLM. - - - - Handler invoked when the LLM calls the tool. - - - - JSON Schema or Zod schema describing the tool's inputs. - - - -#### Returns - -`FunctionTool` — A [FunctionTool](/docs/sdk-reference/reference/typescript/livewire#function-tool) ready to be attached to an agent. - -#### Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 691. - -## Interfaces - -### FunctionTool - -A tool definition that can be registered on an [Agent](/docs/sdk-reference/reference/typescript/livewire/agent). - -#### Signature - -```typescript -interface FunctionTool -``` - -#### Properties - - - Human-readable description shown to the LLM. - - - - Handler invoked by the platform when the LLM calls this tool. - - - - Tool name. Populated when the tool is attached to an `Agent.tools` map. - - - - JSON schema (or Zod schema passthrough) for the tool's parameters. - - -#### Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 122. - -*** - -### VoiceOptions - -Voice configuration options passed through to the SignalWire AI config. - -#### Signature - -```typescript -interface VoiceOptions -``` - -#### Properties - - - TTS engine identifier (e.g. `"google"`, `"elevenlabs"`). - - - - BCP-47 language code (e.g. `"en-US"`). - - - - TTS voice identifier (e.g. `"en-US-Standard-A"`). - - -#### Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 108. - -## Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 1. diff --git a/fern/products/sdk-reference/typescript/livewire/inference/index.mdx b/fern/products/sdk-reference/typescript/livewire/inference/index.mdx deleted file mode 100644 index 2eef19b25b..0000000000 --- a/fern/products/sdk-reference/typescript/livewire/inference/index.mdx +++ /dev/null @@ -1,49 +0,0 @@ ---- -slug: "/reference/typescript/livewire/inference" -title: "inference" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "module" - language: "typescript" - qualified_name: "livewire.inference" - parent: "livewire" - module: "livewire" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" ---- -# `inference` - -Stub inference types matching LiveKit's `inference` namespace. - -None of these run inference on the client — SignalWire performs STT / LLM / -TTS in its control plane. These classes exist so LiveKit code that imports -and instantiates them still compiles. - -## Signature - -```typescript -module inference -``` - -## Classes - - - - LiveKit inference-LLM stub. Captures the model name; runs no inference locally. - - - - LiveKit inference-STT stub. Captures the model name; runs no inference locally. - - - - LiveKit inference-TTS stub. Captures the model name; runs no inference locally. - - - -## Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 1158. diff --git a/fern/products/sdk-reference/typescript/livewire/inference/llm/index.mdx b/fern/products/sdk-reference/typescript/livewire/inference/llm/index.mdx deleted file mode 100644 index de1dad0472..0000000000 --- a/fern/products/sdk-reference/typescript/livewire/inference/llm/index.mdx +++ /dev/null @@ -1,65 +0,0 @@ ---- -slug: "/reference/typescript/livewire/inference/llm" -title: "LLM" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "livewire.inference.LLM" - parent: "livewire.inference" - module: "livewire.inference" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" ---- -# `LLM` - -LiveKit inference-LLM stub. Captures the model name; runs no inference locally. - -## Signature - -```typescript -class LLM -``` - -## Properties - - - Model identifier captured from the constructor. - - -## Methods - -### constructor - -#### Signature - -```typescript -constructor(model: string = '', _opts?: any): LLM -``` - -#### Parameters - - - Model identifier (captured). - - - - Additional options (ignored). - - -#### Returns - -`LLM` - -#### Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 1184. - -## Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 1177. diff --git a/fern/products/sdk-reference/typescript/livewire/inference/stt/index.mdx b/fern/products/sdk-reference/typescript/livewire/inference/stt/index.mdx deleted file mode 100644 index 560c9e5aa4..0000000000 --- a/fern/products/sdk-reference/typescript/livewire/inference/stt/index.mdx +++ /dev/null @@ -1,65 +0,0 @@ ---- -slug: "/reference/typescript/livewire/inference/stt" -title: "STT" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "livewire.inference.STT" - parent: "livewire.inference" - module: "livewire.inference" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" ---- -# `STT` - -LiveKit inference-STT stub. Captures the model name; runs no inference locally. - -## Signature - -```typescript -class STT -``` - -## Properties - - - Model identifier captured from the constructor. - - -## Methods - -### constructor - -#### Signature - -```typescript -constructor(model: string = '', _opts?: any): STT -``` - -#### Parameters - - - Model identifier (captured). - - - - Additional options (ignored). - - -#### Returns - -`STT` - -#### Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 1167. - -## Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 1160. diff --git a/fern/products/sdk-reference/typescript/livewire/inference/tts/index.mdx b/fern/products/sdk-reference/typescript/livewire/inference/tts/index.mdx deleted file mode 100644 index 41e2bda370..0000000000 --- a/fern/products/sdk-reference/typescript/livewire/inference/tts/index.mdx +++ /dev/null @@ -1,65 +0,0 @@ ---- -slug: "/reference/typescript/livewire/inference/tts" -title: "TTS" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "livewire.inference.TTS" - parent: "livewire.inference" - module: "livewire.inference" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" ---- -# `TTS` - -LiveKit inference-TTS stub. Captures the model name; runs no inference locally. - -## Signature - -```typescript -class TTS -``` - -## Properties - - - Model identifier captured from the constructor. - - -## Methods - -### constructor - -#### Signature - -```typescript -constructor(model: string = '', _opts?: any): TTS -``` - -#### Parameters - - - Model identifier (captured). - - - - Additional options (ignored). - - -#### Returns - -`TTS` - -#### Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 1197. - -## Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 1190. diff --git a/fern/products/sdk-reference/typescript/livewire/job-context/index.mdx b/fern/products/sdk-reference/typescript/livewire/job-context/index.mdx deleted file mode 100644 index 9dbde4010d..0000000000 --- a/fern/products/sdk-reference/typescript/livewire/job-context/index.mdx +++ /dev/null @@ -1,116 +0,0 @@ ---- -slug: "/reference/typescript/livewire/job-context" -title: "JobContext" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "livewire.JobContext" - parent: "livewire" - module: "livewire" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" ---- -# `JobContext` - -Mirrors a LiveKit `JobContext` — provides room and connection info to the -entry-point callback registered via [defineAgent](/docs/sdk-reference/reference/typescript/livewire#define-agent). - -## Signature - -```typescript -class JobContext -``` - -## Properties - - - Shared [JobProcess](/docs/sdk-reference/reference/typescript/livewire/job-process) instance for prewarm-to-entry data passing. - - - - Placeholder [Room](/docs/sdk-reference/reference/typescript/livewire/room) (see class docs). - - -## Methods - -### connect - -Connect to the platform. **No-op** on SignalWire — the control plane -manages connection lifecycle automatically. - -#### Signature - -```typescript -connect(): Promise -``` - -#### Returns - -`Promise` — Resolves immediately. - -#### Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 827. - -*** - -### constructor - -#### Signature - -```typescript -constructor(): JobContext -``` - -#### Returns - -`JobContext` - -#### Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 816. - -*** - -### waitForParticipant - -Wait for a participant to join. **No-op** on SignalWire — returns an -immediate stub participant. - -#### Signature - -```typescript -waitForParticipant(options?: { ...1 fields }): Promise -``` - -#### Parameters - - - Participant match options. - - - Requested identity; echoed back in the stub. Defaults to `"caller"`. - - - -#### Returns - -`Promise` — A stub participant `{ identity }` record. - -#### Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 843. - -## Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 808. diff --git a/fern/products/sdk-reference/typescript/livewire/job-process/index.mdx b/fern/products/sdk-reference/typescript/livewire/job-process/index.mdx deleted file mode 100644 index 212180f0d2..0000000000 --- a/fern/products/sdk-reference/typescript/livewire/job-process/index.mdx +++ /dev/null @@ -1,52 +0,0 @@ ---- -slug: "/reference/typescript/livewire/job-process" -title: "JobProcess" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "livewire.JobProcess" - parent: "livewire" - module: "livewire" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" ---- -# `JobProcess` - -Mirrors a LiveKit `JobProcess` — placeholder for prewarm / setup hooks. - -On SignalWire the control plane pre-warms infrastructure at scale, so this -class carries no real state beyond the LiveKit-compatible `userData` bag. - -## Signature - -```typescript -class JobProcess -``` - -## Properties - - - Mutable bag shared across prewarm and entry-point callbacks. - - -## Methods - -### constructor - -#### Signature - -```typescript -constructor(): JobProcess -``` - -#### Returns - -`JobProcess` - -## Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 780. diff --git a/fern/products/sdk-reference/typescript/livewire/noop-tracker/index.mdx b/fern/products/sdk-reference/typescript/livewire/noop-tracker/index.mdx deleted file mode 100644 index 95121f08ff..0000000000 --- a/fern/products/sdk-reference/typescript/livewire/noop-tracker/index.mdx +++ /dev/null @@ -1,124 +0,0 @@ ---- -slug: "/reference/typescript/livewire/noop-tracker" -title: "NoopTracker" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "livewire.NoopTracker" - parent: "livewire" - module: "livewire" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" ---- -# `NoopTracker` - -NoopTracker ensures each informational message is logged at most once, -preventing spam when the same noop path is exercised repeatedly. - -## Signature - -```typescript -class NoopTracker -``` - -## Methods - -### constructor - -#### Signature - -```typescript -constructor(): NoopTracker -``` - -#### Returns - -`NoopTracker` - -*** - -### hasLogged - -Expose whether a key has been logged (for testing). - -#### Signature - -```typescript -hasLogged(key: string): boolean -``` - -#### Parameters - - - -#### Returns - -`boolean` - -#### Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 88. - -*** - -### once - -Log the given message the first time this key is seen. - -#### Signature - -```typescript -once(key: string, message: string): void -``` - -#### Parameters - - - Dedup key. Subsequent calls with the same key are silent. - - - - Message to write to stderr on first occurrence. - - -#### Returns - -`void` - -#### Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 81. - -*** - -### reset - -Reset all tracked keys (for testing). - -#### Signature - -```typescript -reset(): void -``` - -#### Returns - -`void` - -#### Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 93. - -## Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 72. diff --git a/fern/products/sdk-reference/typescript/livewire/plugins/cartesia-tts/index.mdx b/fern/products/sdk-reference/typescript/livewire/plugins/cartesia-tts/index.mdx deleted file mode 100644 index 1a083bc694..0000000000 --- a/fern/products/sdk-reference/typescript/livewire/plugins/cartesia-tts/index.mdx +++ /dev/null @@ -1,55 +0,0 @@ ---- -slug: "/reference/typescript/livewire/plugins/cartesia-tts" -title: "CartesiaTTS" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "livewire.plugins.CartesiaTTS" - parent: "livewire.plugins" - module: "livewire.plugins" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" ---- -# `CartesiaTTS` - -LiveKit Cartesia-TTS plugin stub. No-op on SignalWire. - -## Signature - -```typescript -class CartesiaTTS -``` - -## Methods - -### constructor - -#### Signature - -```typescript -constructor(_opts?: any): CartesiaTTS -``` - -#### Parameters - - - Cartesia options (ignored). - - -#### Returns - -`CartesiaTTS` - -#### Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 1105. - -## Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 1103. diff --git a/fern/products/sdk-reference/typescript/livewire/plugins/deepgram-stt/index.mdx b/fern/products/sdk-reference/typescript/livewire/plugins/deepgram-stt/index.mdx deleted file mode 100644 index 87467076ec..0000000000 --- a/fern/products/sdk-reference/typescript/livewire/plugins/deepgram-stt/index.mdx +++ /dev/null @@ -1,55 +0,0 @@ ---- -slug: "/reference/typescript/livewire/plugins/deepgram-stt" -title: "DeepgramSTT" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "livewire.plugins.DeepgramSTT" - parent: "livewire.plugins" - module: "livewire.plugins" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" ---- -# `DeepgramSTT` - -LiveKit Deepgram-STT plugin stub. No-op on SignalWire. - -## Signature - -```typescript -class DeepgramSTT -``` - -## Methods - -### constructor - -#### Signature - -```typescript -constructor(_opts?: any): DeepgramSTT -``` - -#### Parameters - - - Deepgram options (ignored). - - -#### Returns - -`DeepgramSTT` - -#### Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 1075. - -## Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 1073. diff --git a/fern/products/sdk-reference/typescript/livewire/plugins/eleven-labs-tts/index.mdx b/fern/products/sdk-reference/typescript/livewire/plugins/eleven-labs-tts/index.mdx deleted file mode 100644 index 76113e058e..0000000000 --- a/fern/products/sdk-reference/typescript/livewire/plugins/eleven-labs-tts/index.mdx +++ /dev/null @@ -1,55 +0,0 @@ ---- -slug: "/reference/typescript/livewire/plugins/eleven-labs-tts" -title: "ElevenLabsTTS" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "livewire.plugins.ElevenLabsTTS" - parent: "livewire.plugins" - module: "livewire.plugins" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" ---- -# `ElevenLabsTTS` - -LiveKit ElevenLabs-TTS plugin stub. No-op on SignalWire. - -## Signature - -```typescript -class ElevenLabsTTS -``` - -## Methods - -### constructor - -#### Signature - -```typescript -constructor(_opts?: any): ElevenLabsTTS -``` - -#### Parameters - - - ElevenLabs options (ignored). - - -#### Returns - -`ElevenLabsTTS` - -#### Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 1116. - -## Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 1114. diff --git a/fern/products/sdk-reference/typescript/livewire/plugins/index.mdx b/fern/products/sdk-reference/typescript/livewire/plugins/index.mdx deleted file mode 100644 index e84329874e..0000000000 --- a/fern/products/sdk-reference/typescript/livewire/plugins/index.mdx +++ /dev/null @@ -1,57 +0,0 @@ ---- -slug: "/reference/typescript/livewire/plugins" -title: "plugins" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "module" - language: "typescript" - qualified_name: "livewire.plugins" - parent: "livewire" - module: "livewire" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" ---- -# `plugins` - -Stub providers matching common LiveKit plugin packages. - -None of these do anything — they exist so LiveKit code that imports and -constructs these classes still compiles and runs under SignalWire. The -first construction of each logs an advisory to stderr. - -## Signature - -```typescript -module plugins -``` - -## Classes - - - - LiveKit Cartesia-TTS plugin stub. No-op on SignalWire. - - - - LiveKit Deepgram-STT plugin stub. No-op on SignalWire. - - - - LiveKit ElevenLabs-TTS plugin stub. No-op on SignalWire. - - - - LiveKit OpenAI-LLM plugin stub. - - - - LiveKit Silero-VAD plugin stub. No-op on SignalWire. - - - -## Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 1071. diff --git a/fern/products/sdk-reference/typescript/livewire/plugins/open-aillm/index.mdx b/fern/products/sdk-reference/typescript/livewire/plugins/open-aillm/index.mdx deleted file mode 100644 index 8436b71e04..0000000000 --- a/fern/products/sdk-reference/typescript/livewire/plugins/open-aillm/index.mdx +++ /dev/null @@ -1,64 +0,0 @@ ---- -slug: "/reference/typescript/livewire/plugins/open-aillm" -title: "OpenAILLM" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "livewire.plugins.OpenAILLM" - parent: "livewire.plugins" - module: "livewire.plugins" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" ---- -# `OpenAILLM` - -LiveKit OpenAI-LLM plugin stub. - -The `model` string is captured and mapped to the SignalWire AI `model` -param by [AgentSession.start](/docs/sdk-reference/reference/typescript/livewire/agent-session#start). Other options are ignored. - -## Signature - -```typescript -class OpenAILLM -``` - -## Properties - - - Model identifier captured from the constructor options. - - -## Methods - -### constructor - -#### Signature - -```typescript -constructor(_opts?: any): OpenAILLM -``` - -#### Parameters - - - OpenAI options. `_opts.model` is captured; everything else ignored. - - -#### Returns - -`OpenAILLM` - -#### Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 1093. - -## Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 1089. diff --git a/fern/products/sdk-reference/typescript/livewire/plugins/silero-vad/index.mdx b/fern/products/sdk-reference/typescript/livewire/plugins/silero-vad/index.mdx deleted file mode 100644 index e22c5b6c58..0000000000 --- a/fern/products/sdk-reference/typescript/livewire/plugins/silero-vad/index.mdx +++ /dev/null @@ -1,82 +0,0 @@ ---- -slug: "/reference/typescript/livewire/plugins/silero-vad" -title: "SileroVAD" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "livewire.plugins.SileroVAD" - parent: "livewire.plugins" - module: "livewire.plugins" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" ---- -# `SileroVAD` - -LiveKit Silero-VAD plugin stub. No-op on SignalWire. - -## Signature - -```typescript -class SileroVAD -``` - -## Methods - -### constructor - -#### Signature - -```typescript -constructor(_opts?: Record): SileroVAD -``` - -#### Parameters - - - Silero VAD options (ignored). - - -#### Returns - -`SileroVAD` - -#### Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 1127. - -*** - -### load - -Load a Silero VAD model. - -**No-op** on SignalWire — returns a fresh stub instance and emits a -one-time advisory to stderr. - -**Modifiers:** `static` - -#### Signature - -```typescript -load(): SileroVAD -``` - -#### Returns - -`SileroVAD` — A new `SileroVAD` stub. - -#### Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 1137. - -## Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 1125. diff --git a/fern/products/sdk-reference/typescript/livewire/room/index.mdx b/fern/products/sdk-reference/typescript/livewire/room/index.mdx deleted file mode 100644 index a6e538f359..0000000000 --- a/fern/products/sdk-reference/typescript/livewire/room/index.mdx +++ /dev/null @@ -1,52 +0,0 @@ ---- -slug: "/reference/typescript/livewire/room" -title: "Room" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "livewire.Room" - parent: "livewire" - module: "livewire" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" ---- -# `Room` - -Stub `Room` — SignalWire does not use the LiveKit room abstraction. - -Present purely for API parity so LiveKit-shaped code compiles; its only -meaningful attribute is the constant name. - -## Signature - -```typescript -class Room -``` - -## Properties - - - Always `"livewire-room"` — SignalWire has no per-call room identity. - - -## Methods - -### constructor - -#### Signature - -```typescript -constructor(): Room -``` - -#### Returns - -`Room` - -## Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 795. diff --git a/fern/products/sdk-reference/typescript/livewire/run-context/index.mdx b/fern/products/sdk-reference/typescript/livewire/run-context/index.mdx deleted file mode 100644 index 7d85ac503a..0000000000 --- a/fern/products/sdk-reference/typescript/livewire/run-context/index.mdx +++ /dev/null @@ -1,97 +0,0 @@ ---- -slug: "/reference/typescript/livewire/run-context" -title: "RunContext" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "livewire.RunContext" - parent: "livewire" - module: "livewire" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" ---- -# `RunContext` - -Mirrors a LiveKit `RunContext` — passed to tool handlers so they can -read the current session, call handle, and user data. - -## Signature - -```typescript -class RunContext -``` - -## Type Parameters - - - -## Properties - - - Opaque function-call descriptor (LiveKit shape; passed through untouched). - - - - The owning [AgentSession](/docs/sdk-reference/reference/typescript/livewire/agent-session), when one is bound. - - - - Opaque speech-turn handle (LiveKit shape; passed through untouched). - - - - Per-session user data, or an empty object when no session is bound. - - -## Methods - -### constructor - -#### Signature - -```typescript -constructor( - session?: AgentSession, - options?: { ...2 fields } -): RunContext -``` - -#### Type Parameters - - - -#### Parameters - - - Owning session, when available. - - - - Optional pass-through values. - - - Opaque LiveKit function-call descriptor. - - - - Opaque LiveKit speech handle. - - - -#### Returns - -`RunContext` - -#### Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 390. - -## Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 376. diff --git a/fern/products/sdk-reference/typescript/livewire/server-options/index.mdx b/fern/products/sdk-reference/typescript/livewire/server-options/index.mdx deleted file mode 100644 index 1cab6dc444..0000000000 --- a/fern/products/sdk-reference/typescript/livewire/server-options/index.mdx +++ /dev/null @@ -1,58 +0,0 @@ ---- -slug: "/reference/typescript/livewire/server-options" -title: "ServerOptions" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "livewire.ServerOptions" - parent: "livewire" - module: "livewire" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" ---- -# `ServerOptions` - -Stub class mirroring LiveKit's `ServerOptions`. - -Accepts any configuration for source-compatibility with LiveKit code; -SignalWire ignores these settings. - -## Signature - -```typescript -class ServerOptions -``` - -## Methods - -### constructor - -#### Signature - -```typescript -constructor(_opts?: any): ServerOptions -``` - -#### Parameters - - - LiveKit-shaped server options (ignored). - - -#### Returns - -`ServerOptions` - -#### Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 956. - -## Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 954. diff --git a/fern/products/sdk-reference/typescript/livewire/stop-response/index.mdx b/fern/products/sdk-reference/typescript/livewire/stop-response/index.mdx deleted file mode 100644 index dff921d6a6..0000000000 --- a/fern/products/sdk-reference/typescript/livewire/stop-response/index.mdx +++ /dev/null @@ -1,59 +0,0 @@ ---- -slug: "/reference/typescript/livewire/stop-response" -title: "StopResponse" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "livewire.StopResponse" - parent: "livewire" - module: "livewire" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" ---- -# `StopResponse` - -Signals that a tool should not trigger another LLM reply. - -## Signature - -```typescript -class StopResponse extends Error -``` - -## Inheritance - -**Extends:** `Error` - -## Methods - -### constructor - -#### Signature - -```typescript -constructor(message?: string): StopResponse -``` - -#### Parameters - - - Optional error message. Defaults to `"StopResponse"`. - - -#### Returns - -`StopResponse` - -#### Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 753. - -## Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 749. diff --git a/fern/products/sdk-reference/typescript/livewire/tool-error/index.mdx b/fern/products/sdk-reference/typescript/livewire/tool-error/index.mdx deleted file mode 100644 index bbb7b77054..0000000000 --- a/fern/products/sdk-reference/typescript/livewire/tool-error/index.mdx +++ /dev/null @@ -1,59 +0,0 @@ ---- -slug: "/reference/typescript/livewire/tool-error" -title: "ToolError" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "livewire.ToolError" - parent: "livewire" - module: "livewire" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" ---- -# `ToolError` - -Error thrown from a tool to signal failure back to the LLM. - -## Signature - -```typescript -class ToolError extends Error -``` - -## Inheritance - -**Extends:** `Error` - -## Methods - -### constructor - -#### Signature - -```typescript -constructor(message: string): ToolError -``` - -#### Parameters - - - Error message surfaced to the LLM. - - -#### Returns - -`ToolError` - -#### Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 764. - -## Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 760. diff --git a/fern/products/sdk-reference/typescript/livewire/worker-options/index.mdx b/fern/products/sdk-reference/typescript/livewire/worker-options/index.mdx deleted file mode 100644 index 0e7f9170ae..0000000000 --- a/fern/products/sdk-reference/typescript/livewire/worker-options/index.mdx +++ /dev/null @@ -1,58 +0,0 @@ ---- -slug: "/reference/typescript/livewire/worker-options" -title: "WorkerOptions" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "livewire.WorkerOptions" - parent: "livewire" - module: "livewire" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts" ---- -# `WorkerOptions` - -Stub class mirroring LiveKit's `WorkerOptions`. - -Accepts any configuration for source-compatibility with LiveKit code; -SignalWire ignores these settings. - -## Signature - -```typescript -class WorkerOptions -``` - -## Methods - -### constructor - -#### Signature - -```typescript -constructor(_opts?: any): WorkerOptions -``` - -#### Parameters - - - LiveKit-shaped worker options (ignored). - - -#### Returns - -`WorkerOptions` - -#### Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 945. - -## Source - -[`src/livewire/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/livewire/index.ts) - -Line 943. diff --git a/fern/products/sdk-reference/typescript/logger/index.mdx b/fern/products/sdk-reference/typescript/logger/index.mdx deleted file mode 100644 index 957fd5385b..0000000000 --- a/fern/products/sdk-reference/typescript/logger/index.mdx +++ /dev/null @@ -1,492 +0,0 @@ ---- -slug: "/reference/typescript/logger" -title: "Logger" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "Logger" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/Logger.ts" ---- -# `Logger` - -Structured logger that respects global level, format, and color settings. - -## Signature - -```typescript -class Logger -``` - -## Methods - -### bind - -Create a child logger with additional bound context fields merged into the parent's context. - -#### Signature - -```typescript -bind(context: Record): Logger -``` - -#### Parameters - - - Key-value pairs to merge into the child logger's context. - - -#### Returns - -`Logger` — A new Logger instance with the merged context. - -#### Source - -[`src/Logger.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/Logger.ts) - -Line 238. - -*** - -### constructor - -Create a new Logger instance. - -#### Signature - -```typescript -constructor(name: string, context?: Record): Logger -``` - -#### Parameters - - - Logger name shown in log output. - - - - Optional key-value pairs included in every log entry. - - -#### Returns - -`Logger` - -#### Source - -[`src/Logger.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/Logger.ts) - -Line 228. - -*** - -### debug - -Log a message at the debug level. - -#### Signature - -```typescript -debug(msg: string, data?: Record): void -``` - -#### Parameters - - - The log message. - - - - Optional structured data to include. - - -#### Returns - -`void` - -#### Source - -[`src/Logger.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/Logger.ts) - -Line 247. - -*** - -### error - -Log a message at the error level. - -#### Signature - -```typescript -error(msg: string, data?: Record): void -``` - -#### Parameters - - - The log message. - - - - Optional structured data to include. - - -#### Returns - -`void` - -#### Source - -[`src/Logger.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/Logger.ts) - -Line 274. - -*** - -### info - -Log a message at the info level. - -#### Signature - -```typescript -info(msg: string, data?: Record): void -``` - -#### Parameters - - - The log message. - - - - Optional structured data to include. - - -#### Returns - -`void` - -#### Source - -[`src/Logger.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/Logger.ts) - -Line 256. - -*** - -### warn - -Log a message at the warn level. - -#### Signature - -```typescript -warn(msg: string, data?: Record): void -``` - -#### Parameters - - - The log message. - - - - Optional structured data to include. - - -#### Returns - -`void` - -#### Source - -[`src/Logger.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/Logger.ts) - -Line 265. - -## Functions - -### getExecutionMode - -Detect the execution environment, matching Python SDK's detection logic. - -#### Signature - -```typescript -getExecutionMode(): [string, "default" | "off" | "stderr"] -``` - -#### Returns - -`[string, "default" | "off" | "stderr"]` — A tuple of \[environment\_name, derived\_log\_mode]. - -#### Source - -[`src/Logger.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/Logger.ts) - -Line 29. - -*** - -### getLogger - -Create or retrieve a cached Logger instance with the given name. - -#### Signature - -```typescript -getLogger(name: string): Logger -``` - -#### Parameters - - - Logger name shown in log output. - - -#### Returns - -`Logger` — A Logger instance (cached by name). - -#### Source - -[`src/Logger.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/Logger.ts) - -Line 346. - -*** - -### resetLoggingConfiguration - -Reset all logging settings to their environment-variable-based defaults. - -#### Signature - -```typescript -resetLoggingConfiguration(): void -``` - -#### Returns - -`void` - -#### Source - -[`src/Logger.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/Logger.ts) - -Line 142. - -*** - -### setGlobalLogColor - -Enable or disable ANSI color codes in text-format output. - -#### Signature - -```typescript -setGlobalLogColor(enabled: boolean): void -``` - -#### Parameters - - - True to enable colors, false to disable. - - -#### Returns - -`void` - -#### Source - -[`src/Logger.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/Logger.ts) - -Line 129. - -*** - -### setGlobalLogFormat - -Set the output format for all loggers. - -#### Signature - -```typescript -setGlobalLogFormat(format: LogFormat): void -``` - -#### Parameters - - - Either 'text' (human-readable) or 'json' (structured). - - -#### Returns - -`void` - -#### Source - -[`src/Logger.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/Logger.ts) - -Line 121. - -*** - -### setGlobalLogLevel - -Set the minimum log level for all loggers. - -Takes a [LogLevel](/docs/sdk-reference/reference/typescript/logger#log-level) (`'debug' | 'info' | 'warn' | 'error'`) — the -closed, port-owned set (the keys of the internal severity table). It is -developer input with no Python counterpart and no open-ended wire/reference -source, so the parameter is typed closed: editor autocompletion plus a typo -such as `'debgu'` is a compile-time error rather than a silent no-op. (The -env-var path, `SIGNALWIRE_LOG_LEVEL`, is necessarily untyped and still -tolerates an arbitrary string defensively at runtime.) - -#### Signature - -```typescript -setGlobalLogLevel(level: "debug" | "info" | "warn" | "error"): void -``` - -#### Parameters - - - The minimum severity level to emit. - - -#### Returns - -`void` - -#### Source - -[`src/Logger.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/Logger.ts) - -Line 105. - -*** - -### setGlobalLogStream - -Set the output stream for all loggers. - -#### Signature - -```typescript -setGlobalLogStream(stream: LogStream): void -``` - -#### Parameters - - - Either 'stdout' (default) or 'stderr'. - - -#### Returns - -`void` - -#### Source - -[`src/Logger.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/Logger.ts) - -Line 137. - -*** - -### stripControlChars - -Strip control characters from all string values in a data record to prevent -log injection attacks. Mirrors Python SDK's `strip_control_chars` structlog -processor. Processes nested objects and arrays recursively. - -#### Signature - -```typescript -stripControlChars(data: T): T -``` - -#### Type Parameters - - - -#### Parameters - - - The record whose string values should be sanitized. - - -#### Returns - -`T` — A shallow copy of `data` with control characters removed from strings. - -#### Source - -[`src/Logger.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/Logger.ts) - -Line 182. - -*** - -### suppressAllLogs - -Suppress or unsuppress all log output globally. - -#### Signature - -```typescript -suppressAllLogs(suppress: boolean = true): void -``` - -#### Parameters - - - True to suppress, false to restore (default true). - - -#### Returns - -`void` - -#### Source - -[`src/Logger.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/Logger.ts) - -Line 113. - -## Type Aliases - -### LogLevel - -Log severity level — the closed set this Logger emits and filters on. - -`'warn'` (not `'warning'`) matches the keys of `LEVELS` and the -`Logger.warn()` method; the Python reference's logger has no `set_log_level` -counterpart (this setter is a documented TS addition — see -`PORT_ADDITIONS.md`), so the canonical set is this port's own. - -#### Signature - -```typescript -type LogLevel = keyof typeof LEVELS -``` - -#### Source - -[`src/Logger.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/Logger.ts) - -Line 19. - -## Source - -[`src/Logger.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/Logger.ts) - -Line 219. diff --git a/fern/products/sdk-reference/typescript/parameter-schema/index.mdx b/fern/products/sdk-reference/typescript/parameter-schema/index.mdx deleted file mode 100644 index b94762abe7..0000000000 --- a/fern/products/sdk-reference/typescript/parameter-schema/index.mdx +++ /dev/null @@ -1,721 +0,0 @@ ---- -slug: "/reference/typescript/parameter-schema" -title: "ParameterSchema" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "ParameterSchema" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts" ---- -# `ParameterSchema` - -Fluent builder producing a [ParameterSchemaObject](/docs/sdk-reference/reference/typescript/parameter-schema#parameter-schema-object) byte-identical to -the equivalent hand-written `parameters` blob. Every method returns `this` -for chaining; call `build` to obtain the plain object to hand to -`defineTool`/`defineTypedTool`. - -Insertion order is preserved: properties appear in the order their methods -were called (matching a hand-written object literal), and `required` lists -names in the order `required` received them. - -## Signature - -```typescript -class ParameterSchema -``` - -## Constants - - - Recording direction for the SWAIG `record_call` verb — Tier-1 closed set (`function_result.py:918`). NOTE: distinct from [TAP\_DIRECTIONS](/docs/sdk-reference/reference/typescript/parameter-schema#tap-directions) — record uses `listen`, tap uses `hear` (never unify; see journal §3 "three direction vocabularies"). Used by [ParameterSchema.recordDirection](/docs/sdk-reference/reference/typescript/parameter-schema#record-direction). - - - - Recording format for the SWAIG `record_call` verb — the strongly-grounded Tier-1 closed set (`function_result.py:914` `raise ValueError`-validated; SWML `$defs/RecordCall.format`). Used by [ParameterSchema.recordFormat](/docs/sdk-reference/reference/typescript/parameter-schema#record-format). - - - - Tap media codec for the SWAIG `tap` verb — Tier-1 closed set (`function_result.py:1218`). The 2-value SWAIG tap codec, distinct from the 7-value RELAY connect/stream codec superset (never reuse). Used by [ParameterSchema.codec](/docs/sdk-reference/reference/typescript/parameter-schema#codec). - - - - Tap direction for the SWAIG `tap` verb — Tier-1 closed set (`function_result.py:1213`). Uses `hear`, NOT record's `listen`. Used by [ParameterSchema.tapDirection](/docs/sdk-reference/reference/typescript/parameter-schema#tap-direction). - - -## Methods - -### array - -Add an `array` property. - -#### Signature - -```typescript -array( - name: string, - items?: Record, - description: string = '' -): this -``` - -#### Parameters - - - Parameter name. - - - - JSON-Schema for the array's element type (e.g. `{ type: 'string' }`). Omit for an untyped array. - - - - LLM-facing description. - - -#### Returns - -`this` — This builder, for chaining. - -#### Source - -[`src/ParameterSchema.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts) - -Line 196. - -*** - -### boolean - -Add a `boolean` property. - -#### Signature - -```typescript -boolean( - name: string, - description: string = '', - extra?: Record -): this -``` - -#### Parameters - - - - - - - -#### Returns - -`this` - -#### See Also - -- \[[property](/docs/sdk-reference/reference/typescript/parameter-schema#property)]\(xref://[property](/docs/sdk-reference/reference/typescript/parameter-schema#property)) - -#### Source - -[`src/ParameterSchema.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts) - -Line 183. - -*** - -### build - -Materialise the JSON-Schema `object`. Produces -`{ type: 'object', properties: {…} }`, plus `required: [...]` only when at -least one property was marked required — exactly matching a hand-written -blob (an omitted `required` is the same as `defineTool` receiving none). - -#### Signature - -```typescript -build(): ParameterSchemaObject -``` - -#### Returns - -`ParameterSchemaObject` — A fresh [ParameterSchemaObject](/docs/sdk-reference/reference/typescript/parameter-schema#parameter-schema-object); safe to mutate without affecting the builder. - -#### Source - -[`src/ParameterSchema.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts) - -Line 284. - -*** - -### codec - -Add a `tap` **codec** property (`enum: ['PCMU','PCMA']`) — the 2-value -SWAIG tap codec (NOT the 7-value RELAY superset). - -#### Signature - -```typescript -codec(name: string, description: string = ''): this -``` - -#### Parameters - - - - - -#### Returns - -`this` - -#### See Also - -- \[[TAP\_CODECS](/docs/sdk-reference/reference/typescript/parameter-schema#tap-codecs)]\(xref://[TAP\_CODECS](/docs/sdk-reference/reference/typescript/parameter-schema#tap-codecs)) - -#### Source - -[`src/ParameterSchema.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts) - -Line 256. - -*** - -### constructor - -#### Signature - -```typescript -constructor(): ParameterSchema -``` - -#### Returns - -`ParameterSchema` - -*** - -### enum - -Add a `string` property constrained to a closed set of values, rendered as -`enum:[...]` — the JSON-Schema form the model and the SignalWire validator -both honour. This is the typed-closed-set affordance: pass one of the -exported Tier-1 value arrays ([RECORD\_FORMATS](/docs/sdk-reference/reference/typescript/parameter-schema#record-formats) etc.) or any literal -list, and the values land verbatim in `enum`. - -#### Signature - -```typescript -enum( - name: string, - values: readonly unknown[], - description: string = '', - type: ParameterType = 'string' -): this -``` - -#### Parameters - - - Parameter name. - - - - The allowed values (a `readonly` array — the `as const` Tier-1 arrays are accepted directly). Emitted as `enum`, in order. - - - - LLM-facing description. - - - - The JSON-Schema base type for the enum (default `'string'`). - - -#### Returns - -`this` — This builder, for chaining. - -#### Source - -[`src/ParameterSchema.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts) - -Line 215. - -*** - -### integer - -Add an `integer` property. - -#### Signature - -```typescript -integer( - name: string, - description: string = '', - extra?: Record -): this -``` - -#### Parameters - - - - - - - -#### Returns - -`this` - -#### See Also - -- \[[property](/docs/sdk-reference/reference/typescript/parameter-schema#property)]\(xref://[property](/docs/sdk-reference/reference/typescript/parameter-schema#property)) - -#### Source - -[`src/ParameterSchema.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts) - -Line 173. - -*** - -### number - -Add a `number` (float) property. - -#### Signature - -```typescript -number( - name: string, - description: string = '', - extra?: Record -): this -``` - -#### Parameters - - - - - - - -#### Returns - -`this` - -#### See Also - -- \[[property](/docs/sdk-reference/reference/typescript/parameter-schema#property)]\(xref://[property](/docs/sdk-reference/reference/typescript/parameter-schema#property)) - -#### Source - -[`src/ParameterSchema.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts) - -Line 178. - -*** - -### property - -Add a property with an explicit JSON-Schema `type`. - -#### Signature - -```typescript -property( - name: string, - type: ParameterType, - description: string = '', - extra?: Record -): this -``` - -#### Parameters - - - Parameter name (the JSON key the model emits). - - - - JSON-Schema scalar type keyword. - - - - LLM-facing description (prompt engineering; tells the model HOW to fill this argument). Defaults to `''` to match a hand-written entry that omits a description. - - - - Additional JSON-Schema keywords merged into the property verbatim (`enum`, `minLength`, `pattern`, `format`, `items`, …). - - -#### Returns - -`this` — This builder, for chaining. - -#### Source - -[`src/ParameterSchema.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts) - -Line 157. - -*** - -### recordDirection - -Add a `record_call` **direction** property -(`enum: ['speak','listen','both']`). Uses record's `listen` (not tap's -`hear`). - -#### Signature - -```typescript -recordDirection(name: string, description: string = ''): this -``` - -#### Parameters - - - - - -#### Returns - -`this` - -#### See Also - -- \[[RECORD\_DIRECTIONS](/docs/sdk-reference/reference/typescript/parameter-schema#record-directions)]\(xref://[RECORD\_DIRECTIONS](/docs/sdk-reference/reference/typescript/parameter-schema#record-directions)) - -#### Source - -[`src/ParameterSchema.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts) - -Line 240. - -*** - -### recordFormat - -Add a `record_call` **format** property (`enum: ['wav','mp3','mp4']`) — the -Tier-1 closed set baked in. - -#### Signature - -```typescript -recordFormat(name: string, description: string = ''): this -``` - -#### Parameters - - - - - -#### Returns - -`this` - -#### See Also - -- \[[RECORD\_FORMATS](/docs/sdk-reference/reference/typescript/parameter-schema#record-formats)]\(xref://[RECORD\_FORMATS](/docs/sdk-reference/reference/typescript/parameter-schema#record-formats)) - -#### Source - -[`src/ParameterSchema.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts) - -Line 231. - -*** - -### required - -Mark one or more already-added properties as required. Names are appended -to the `required` array in the order received; duplicates are ignored. -Required-ness is independent of property order — call this at any point. - -#### Signature - -```typescript -required(...names: string[]): this -``` - -#### Parameters - - - Parameter names to require. - - -#### Returns - -`this` — This builder, for chaining. - -#### Source - -[`src/ParameterSchema.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts) - -Line 268. - -*** - -### string - -Add a `string` property. - -#### Signature - -```typescript -string( - name: string, - description: string = '', - extra?: Record -): this -``` - -#### Parameters - - - - - - - -#### Returns - -`this` - -#### See Also - -- \[[property](/docs/sdk-reference/reference/typescript/parameter-schema#property)]\(xref://[property](/docs/sdk-reference/reference/typescript/parameter-schema#property)) - -#### Source - -[`src/ParameterSchema.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts) - -Line 168. - -*** - -### tapDirection - -Add a `tap` **direction** property (`enum: ['speak','hear','both']`). Uses -tap's `hear` (not record's `listen`). - -#### Signature - -```typescript -tapDirection(name: string, description: string = ''): this -``` - -#### Parameters - - - - - -#### Returns - -`this` - -#### See Also - -- \[[TAP\_DIRECTIONS](/docs/sdk-reference/reference/typescript/parameter-schema#tap-directions)]\(xref://[TAP\_DIRECTIONS](/docs/sdk-reference/reference/typescript/parameter-schema#tap-directions)) - -#### Source - -[`src/ParameterSchema.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts) - -Line 248. - -## Functions - -### paramSchema - -Create a new [ParameterSchema](/docs/sdk-reference/reference/typescript/parameter-schema) builder — the idiomatic entry point. - -#### Signature - -```typescript -paramSchema(): ParameterSchema -``` - -#### Returns - -`ParameterSchema` — A fresh, empty builder. - -#### Examples - -```typescript -const params = paramSchema() - .string('service', 'The service to look up') - .codec('media_codec', 'Audio codec for the tap') - .required('service') - .build(); -``` - -#### Source - -[`src/ParameterSchema.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts) - -Line 308. - -## Type Aliases - -### ParameterType - -The JSON-Schema scalar `type` keywords a SWAIG parameter property may use. - -#### Signature - -```typescript -type ParameterType = "string" | "number" | "integer" | "boolean" | "array" | "object" -``` - -#### Source - -[`src/ParameterSchema.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts) - -Line 104. - -*** - -### RecordDirection - -A single [RECORD\_DIRECTIONS](/docs/sdk-reference/reference/typescript/parameter-schema#record-directions) value. - -#### Signature - -```typescript -type RecordDirection = typeof RECORD_DIRECTIONS[number] -``` - -#### Source - -[`src/ParameterSchema.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts) - -Line 82. - -*** - -### RecordFormat - -A single [RECORD\_FORMATS](/docs/sdk-reference/reference/typescript/parameter-schema#record-formats) value. - -#### Signature - -```typescript -type RecordFormat = typeof RECORD_FORMATS[number] -``` - -#### Source - -[`src/ParameterSchema.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts) - -Line 72. - -*** - -### TapCodec - -A single [TAP\_CODECS](/docs/sdk-reference/reference/typescript/parameter-schema#tap-codecs) value. - -#### Signature - -```typescript -type TapCodec = typeof TAP_CODECS[number] -``` - -#### Source - -[`src/ParameterSchema.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts) - -Line 101. - -*** - -### TapDirection - -A single [TAP\_DIRECTIONS](/docs/sdk-reference/reference/typescript/parameter-schema#tap-directions) value. - -#### Signature - -```typescript -type TapDirection = typeof TAP_DIRECTIONS[number] -``` - -#### Source - -[`src/ParameterSchema.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts) - -Line 91. - -## Interfaces - -### ParameterProperty - -A single JSON-Schema property entry inside a tool's `parameters.properties`. -Mirrors the shape the model reads on every turn: `type` + LLM-facing -`description`, with an optional `enum` / `items` and any extra JSON-Schema -keywords (`minLength`, `pattern`, `format`, …) merged through verbatim. - -#### Signature - -```typescript -interface ParameterProperty -``` - -#### Properties - - - - - - - - - -#### Source - -[`src/ParameterSchema.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts) - -Line 112. - -*** - -### ParameterSchemaObject - -The serialised SWAIG parameter schema: a JSON-Schema `object`. This is the -exact shape `defineTool({ parameters })` accepts and what the SDK renders -into the OpenAI tool schema's `parameters` field. - -#### Signature - -```typescript -interface ParameterSchemaObject -``` - -#### Properties - - - - - - - -#### Source - -[`src/ParameterSchema.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts) - -Line 125. - -## Source - -[`src/ParameterSchema.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts) - -Line 141. diff --git a/fern/products/sdk-reference/typescript/pom-builder/index.mdx b/fern/products/sdk-reference/typescript/pom-builder/index.mdx deleted file mode 100644 index 66223ec4a8..0000000000 --- a/fern/products/sdk-reference/typescript/pom-builder/index.mdx +++ /dev/null @@ -1,508 +0,0 @@ ---- -slug: "/reference/typescript/pom-builder" -title: "PomBuilder" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "PomBuilder" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts" ---- -# `PomBuilder` - -Builds a structured prompt by composing named POM sections, with Markdown and dict export. - -The Prompt Object Model lets you assemble a large system prompt from reusable, -named sections (Role, Objective, Constraints, etc.) instead of a single string. -This plays well with [AgentBase](/docs/sdk-reference/reference/typescript/agent-base) methods like `promptAddSection()` and -`promptAddToSection()` that let user code and skills add prompt content -incrementally. - -## Signature - -```typescript -class PomBuilder -``` - -## Examples - -```typescript -import { PomBuilder } from '@signalwire/sdk'; - -const pom = new PomBuilder() - .addSection('Role', { body: 'You are a friendly customer service agent.' }) - .addSection('Objectives', { bullets: [ - 'Identify the customer politely', - 'Resolve their issue in under 3 turns if possible', - ]}) - .addSection('Constraints', { bullets: [ - 'Never reveal internal tool names', - ]}); - -const systemPrompt = pom.renderMarkdown(); -``` - -## See Also - -- \- \[PomSection]\(/docs/sdk-reference/reference/typescript/pom-builder/pom-section) - \- \[AgentBase.promptAddSection]\(/docs/sdk-reference/reference/typescript/agent-base#prompt-add-section) - -## Properties - - - Returns the underlying [PromptObjectModel](/docs/sdk-reference/reference/typescript/pom/prompt-object-model) for the builder. Mirrors Python's `PomBuilder.pom` attribute (the wrapped low-level model). Returns a fresh `PromptObjectModel` populated from the builder's current sections; mutations on the returned instance do not propagate back to this builder. - - -## Classes - - - - A single section in a Prompt Object Model, with optional title, body, bullets, and nested subsections. - - - -## Methods - -### addPomAsSubsection - -Appends every top-level section of another PomBuilder as subsections of a target section. - -#### Signature - -```typescript -addPomAsSubsection(target: string | PomSection, pomToAdd: PomBuilder): this -``` - -#### Parameters - - - The heading of the target section, or the PomSection to append into. - - - - The PomBuilder whose sections should be appended as subsections. - - -#### Returns - -`this` — This builder for chaining. - -#### Throws - -- If target is a string and no section with that title is found. - -#### Source - -[`src/PomBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts) - -Line 374. - -*** - -### addSection - -Adds a new top-level section to the prompt. - -#### Signature - -```typescript -addSection(title: string, opts?: { ...5 fields }): this -``` - -#### Parameters - - - The section heading. - - - - Optional body, bullets, numbering, and subsection configuration. - - - - - - - - - - - - -#### Returns - -`this` — This builder for chaining. - -#### Source - -[`src/PomBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts) - -Line 255. - -*** - -### addSubsection - -Adds a subsection under an existing parent section, creating the parent if absent. - -#### Signature - -```typescript -addSubsection(parentTitle: string, title: string, opts?: { ...2 fields }): this -``` - -#### Parameters - - - The heading of the parent section. - - - - The subsection heading. - - - - Optional body text and bullets for the subsection. - - - - - - -#### Returns - -`this` — This builder for chaining. - -#### Source - -[`src/PomBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts) - -Line 316. - -*** - -### addToSection - -Appends body text or bullets to an existing section, creating it if absent. - -#### Signature - -```typescript -addToSection(title: string, opts?: { ...3 fields }): this -``` - -#### Parameters - - - The section heading to append to. - - - - Body text and/or bullets to add. - - - - - - - - -#### Returns - -`this` — This builder for chaining. - -#### Source - -[`src/PomBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts) - -Line 293. - -*** - -### constructor - -#### Signature - -```typescript -constructor(): PomBuilder -``` - -#### Returns - -`PomBuilder` - -*** - -### findSection - -Recursively searches all sections and subsections for one matching the given title. - -#### Signature - -```typescript -findSection(title: string): PomSection | undefined -``` - -#### Parameters - - - The section heading to search for. - - -#### Returns - -`PomSection | undefined` — The matching PomSection, or undefined if not found. - -#### Source - -[`src/PomBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts) - -Line 355. - -*** - -### fromSections - -Creates a PomBuilder from an array of section data objects. - -**Modifiers:** `static` - -#### Signature - -```typescript -fromSections(sections: PomSectionData[]): PomBuilder -``` - -#### Parameters - - - Array of section data to reconstruct. - - -#### Returns - -`PomBuilder` — A new PomBuilder populated with the given sections. - -#### Source - -[`src/PomBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts) - -Line 413. - -*** - -### getSection - -Returns a top-level section by title. - -#### Signature - -```typescript -getSection(title: string): PomSection | undefined -``` - -#### Parameters - - - The section heading to retrieve. - - -#### Returns - -`PomSection | undefined` — The matching PomSection, or undefined if not found. - -#### Source - -[`src/PomBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts) - -Line 346. - -*** - -### hasSection - -Checks whether a top-level section with the given title exists. - -#### Signature - -```typescript -hasSection(title: string): boolean -``` - -#### Parameters - - - The section heading to look for. - - -#### Returns - -`boolean` — True if the section exists. - -#### Source - -[`src/PomBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts) - -Line 337. - -*** - -### renderMarkdown - -Renders all sections as a combined Markdown string. - -#### Signature - -```typescript -renderMarkdown(): string -``` - -#### Returns - -`string` — The complete rendered Markdown prompt text. - -#### Source - -[`src/PomBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts) - -Line 467. - -*** - -### renderXml - -Renders all sections as a combined XML string with a `` root element. - -#### Signature - -```typescript -renderXml(): string -``` - -#### Returns - -`string` — The complete rendered XML prompt text. - -#### Source - -[`src/PomBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts) - -Line 488. - -*** - -### reset - -Clears all sections, returning the builder to its initial empty state. - -#### Signature - -```typescript -reset(): this -``` - -#### Returns - -`this` — This builder for chaining. - -#### Source - -[`src/PomBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts) - -Line 243. - -*** - -### toDict - -Serializes all sections to an array of plain data objects. - -#### Signature - -```typescript -toDict(): PomSectionData[] -``` - -#### Returns - -`PomSectionData[]` — An array of PomSectionData representing all top-level sections. - -#### Source - -[`src/PomBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts) - -Line 396. - -*** - -### toJson - -Serializes all sections to a JSON string. - -#### Signature - -```typescript -toJson(): string -``` - -#### Returns - -`string` — A JSON string representation of all top-level sections. - -#### Source - -[`src/PomBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts) - -Line 404. - -## Interfaces - -### PomSectionData - -Serializable representation of a POM section, used for JSON export. - -#### Signature - -```typescript -interface PomSectionData -``` - -#### Properties - - - Section body paragraph text. - - - - List of bullet point strings. - - - - Whether subsections are numbered. - - - - Whether bullet points are rendered as a numbered list. - - - - Nested child sections. - - - - Section heading text. - - -#### Source - -[`src/PomBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts) - -Line 12. - -## Source - -[`src/PomBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts) - -Line 235. diff --git a/fern/products/sdk-reference/typescript/pom-builder/pom-section/index.mdx b/fern/products/sdk-reference/typescript/pom-builder/pom-section/index.mdx deleted file mode 100644 index 0c65e0c87a..0000000000 --- a/fern/products/sdk-reference/typescript/pom-builder/pom-section/index.mdx +++ /dev/null @@ -1,217 +0,0 @@ ---- -slug: "/reference/typescript/pom-builder/pom-section" -title: "PomSection" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "PomBuilder.PomSection" - parent: "PomBuilder" - module: "PomBuilder" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts" ---- -# `PomSection` - -A single section in a Prompt Object Model, with optional title, body, bullets, and nested subsections. - -## Signature - -```typescript -class PomSection -``` - -## Properties - - - Section body paragraph text. - - - - List of bullet point strings. - - - - Whether this section is numbered when rendered; null means inherit from parent context. - - - - Whether bullet points are rendered as a numbered list. - - - - Nested child sections. - - - - Section heading text, or null if untitled. - - -## Methods - -### addSubsection - -Adds a nested subsection to this section. - -#### Signature - -```typescript -addSubsection(opts: { ...5 fields }): PomSection -``` - -#### Parameters - - - Subsection configuration including title and optional body/bullets. - - - - - - - - - - - - -#### Returns - -`PomSection` — The newly created child PomSection. - -#### Source - -[`src/PomBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts) - -Line 66. - -*** - -### constructor - -Creates a new PomSection. - -#### Signature - -```typescript -constructor(opts?: { ...5 fields }): PomSection -``` - -#### Parameters - - - Optional section configuration. - - - - - - - - - - - - -#### Returns - -`PomSection` - -#### Source - -[`src/PomBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts) - -Line 46. - -*** - -### renderMarkdown - -Renders this section and its subsections as a Markdown string. - -#### Signature - -```typescript -renderMarkdown(level: number = 2, sectionNumber: number[] = []): string -``` - -#### Parameters - - - The heading level to start at (default 2 for ##). - - - - Hierarchical numbering prefix for numbered sections. - - -#### Returns - -`string` — The rendered Markdown string. - -#### Source - -[`src/PomBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts) - -Line 105. - -*** - -### renderXml - -Renders this section and its subsections as an XML string. - -#### Signature - -```typescript -renderXml(indent: number = 0, sectionNumber: number[] = []): string -``` - -#### Parameters - - - The indentation depth (default 0). - - - - Hierarchical numbering prefix for numbered sections. - - -#### Returns - -`string` — The rendered XML string. - -#### Source - -[`src/PomBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts) - -Line 154. - -*** - -### toDict - -Serializes this section to a plain data object. - -#### Signature - -```typescript -toDict(): PomSectionData -``` - -#### Returns - -`PomSectionData` — A PomSectionData representation of this section and its subsections. - -#### Source - -[`src/PomBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts) - -Line 88. - -## Source - -[`src/PomBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts) - -Line 28. diff --git a/fern/products/sdk-reference/typescript/pom/prompt-object-model/index.mdx b/fern/products/sdk-reference/typescript/pom/prompt-object-model/index.mdx deleted file mode 100644 index 29ca8573fd..0000000000 --- a/fern/products/sdk-reference/typescript/pom/prompt-object-model/index.mdx +++ /dev/null @@ -1,372 +0,0 @@ ---- -slug: "/reference/typescript/pom/prompt-object-model" -title: "PromptObjectModel" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "POM.PromptObjectModel" - module: "POM" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts" ---- -# `PromptObjectModel` - -The Prompt Object Model — a structured, serializable representation of a -full prompt document. Direct port of Python's -`signalwire.pom.pom.PromptObjectModel`. - -## Signature - -```typescript -class PromptObjectModel -``` - -## Properties - - - Whether to print debug info during `renderMarkdown`. - - - - Top-level sections in the model. - - -## Classes - - - - A section in the Prompt Object Model. - - - -## Methods - -### addPomAsSubsection - -Add another PromptObjectModel as subsections of an existing section. - -#### Signature - -```typescript -addPomAsSubsection(target: string | Section, pomToAdd: PromptObjectModel): void -``` - -#### Parameters - - - Either the title of the target section, or a `Section` reference. - - - - The model whose top-level sections will be appended as subsections. - - -#### Returns - -`void` - -#### Throws - -- Error if `target` is a string and no section with that title is found. - -#### Source - -[`src/POM/PromptObjectModel.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts) - -Line 412. - -*** - -### addSection - -Add a top-level section to the model. - -#### Signature - -```typescript -addSection(title: string | null = null, opts: { ...4 fields } = {}): Section -``` - -#### Parameters - - - - - - - - - - - - - -#### Returns - -`Section` - -#### Throws - -- Error if a section without a title is added after the first section. - -#### Source - -[`src/POM/PromptObjectModel.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts) - -Line 269. - -*** - -### constructor - -#### Signature - -```typescript -constructor(debug: boolean = false): PromptObjectModel -``` - -#### Parameters - - - -#### Returns - -`PromptObjectModel` - -#### Source - -[`src/POM/PromptObjectModel.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts) - -Line 259. - -*** - -### findSection - -Find a section by its title (recursive search through all sections and subsections). - -#### Signature - -```typescript -findSection(title: string): Section | null -``` - -#### Parameters - - - -#### Returns - -`Section | null` — The matching Section or null if not found. - -#### Source - -[`src/POM/PromptObjectModel.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts) - -Line 307. - -*** - -### fromJson - -Create a PromptObjectModel from JSON data (string or already-parsed object). - -**Modifiers:** `static` - -#### Signature - -```typescript -fromJson(jsonData: unknown): PromptObjectModel -``` - -#### Parameters - - - -#### Returns - -`PromptObjectModel` - -#### Source - -[`src/POM/PromptObjectModel.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts) - -Line 434. - -*** - -### fromYaml - -Create a PromptObjectModel from YAML data (string or already-parsed object). - -**Modifiers:** `static` - -#### Signature - -```typescript -fromYaml(yamlData: unknown): PromptObjectModel -``` - -#### Parameters - - - -#### Returns - -`PromptObjectModel` - -#### Source - -[`src/POM/PromptObjectModel.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts) - -Line 447. - -*** - -### renderMarkdown - -Render the entire model as markdown. - -#### Signature - -```typescript -renderMarkdown(): string -``` - -#### Returns - -`string` - -#### Source - -[`src/POM/PromptObjectModel.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts) - -Line 337. - -*** - -### renderXml - -Render the entire model as XML. - -#### Signature - -```typescript -renderXml(): string -``` - -#### Returns - -`string` - -#### Source - -[`src/POM/PromptObjectModel.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts) - -Line 381. - -*** - -### toDict - -Convert the entire model to a list of dictionaries. - -#### Signature - -```typescript -toDict(): SectionData[] -``` - -#### Returns - -`SectionData[]` - -#### Source - -[`src/POM/PromptObjectModel.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts) - -Line 320. - -*** - -### toJson - -Convert the entire model to a JSON string (pretty-printed with 2-space indent). - -#### Signature - -```typescript -toJson(): string -``` - -#### Returns - -`string` - -#### Source - -[`src/POM/PromptObjectModel.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts) - -Line 325. - -*** - -### toYaml - -Convert the entire model to a YAML string. - -#### Signature - -```typescript -toYaml(): string -``` - -#### Returns - -`string` - -#### Source - -[`src/POM/PromptObjectModel.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts) - -Line 330. - -## Interfaces - -### SectionData - -Plain serializable representation of a section, used for JSON/YAML and `to_dict()` exchange. - -#### Signature - -```typescript -interface SectionData -``` - -#### Properties - - - - - - - - - - - - - -#### Source - -[`src/POM/PromptObjectModel.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts) - -Line 19. - -## Source - -[`src/POM/PromptObjectModel.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts) - -Line 253. diff --git a/fern/products/sdk-reference/typescript/pom/prompt-object-model/section/index.mdx b/fern/products/sdk-reference/typescript/pom/prompt-object-model/section/index.mdx deleted file mode 100644 index 0277cb1829..0000000000 --- a/fern/products/sdk-reference/typescript/pom/prompt-object-model/section/index.mdx +++ /dev/null @@ -1,274 +0,0 @@ ---- -slug: "/reference/typescript/pom/prompt-object-model/section" -title: "Section" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "POM.PromptObjectModel.Section" - parent: "POM.PromptObjectModel" - module: "POM.PromptObjectModel" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts" ---- -# `Section` - -A section in the Prompt Object Model. - -Each section contains a title, optional body text, optional bullet points, -and can have any number of nested subsections. - -## Signature - -```typescript -class Section -``` - -## Properties - - - A paragraph of text associated with the section. - - - - Bullet-pointed items. - - - - Whether this section should be numbered. - - - - Whether bullets should be numbered instead of using bullet points. - - - - Nested sections with the same structure. - - - - The name of the section. - - -## Methods - -### addBody - -Add or replace the body text for this section. - -#### Signature - -```typescript -addBody(body: string): void -``` - -#### Parameters - - - -#### Returns - -`void` - -#### Source - -[`src/POM/PromptObjectModel.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts) - -Line 84. - -*** - -### addBullets - -Add bullet points to this section (extends the existing list). - -#### Signature - -```typescript -addBullets(bullets: string[]): void -``` - -#### Parameters - - - -#### Returns - -`void` - -#### Source - -[`src/POM/PromptObjectModel.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts) - -Line 92. - -*** - -### addSubsection - -Add a subsection to this section. - -#### Signature - -```typescript -addSubsection(title: string, opts: { ...4 fields } = {}): Section -``` - -#### Parameters - - - The title of the subsection (required — subsections must have a title). - - - - Optional body / bullets / numbering for the subsection. - - - - - - - - - - -#### Returns - -`Section` — The newly created Section. - -#### Source - -[`src/POM/PromptObjectModel.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts) - -Line 106. - -*** - -### constructor - -#### Signature - -```typescript -constructor(title: string | null = null, opts: { ...4 fields } = {}): Section -``` - -#### Parameters - - - Section title (null permitted only on the very first top-level section). - - - - Keyword-style options matching Python's `body=`/`bullets=`/`numbered=`/`numberedBullets=`. - - - - - - - - - - -#### Returns - -`Section` - -#### Source - -[`src/POM/PromptObjectModel.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts) - -Line 52. - -*** - -### renderMarkdown - -Render this section and all its subsections as markdown. - -#### Signature - -```typescript -renderMarkdown(level: number = 2, sectionNumber: number[] | null = null): string -``` - -#### Parameters - - - The heading level to start with (default 2 = `##`). - - - - The current section number for numbered sections. - - -#### Returns - -`string` - -#### Source - -[`src/POM/PromptObjectModel.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts) - -Line 147. - -*** - -### renderXml - -Render this section and all its subsections as XML. - -#### Signature - -```typescript -renderXml(indent: number = 0, sectionNumber: number[] | null = null): string -``` - -#### Parameters - - - The indentation level to start with (default 0). - - - - The current section number for numbered sections. - - -#### Returns - -`string` - -#### Source - -[`src/POM/PromptObjectModel.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts) - -Line 194. - -*** - -### toDict - -Convert the section to a dictionary representation. - -#### Signature - -```typescript -toDict(): SectionData -``` - -#### Returns - -`SectionData` - -#### Source - -[`src/POM/PromptObjectModel.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts) - -Line 129. - -## Source - -[`src/POM/PromptObjectModel.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts) - -Line 34. diff --git a/fern/products/sdk-reference/typescript/prefabs/concierge-agent/index.mdx b/fern/products/sdk-reference/typescript/prefabs/concierge-agent/index.mdx deleted file mode 100644 index 7f1d02ee64..0000000000 --- a/fern/products/sdk-reference/typescript/prefabs/concierge-agent/index.mdx +++ /dev/null @@ -1,3756 +0,0 @@ ---- -slug: "/reference/typescript/prefabs/concierge-agent" -title: "ConciergeAgent" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "prefabs.ConciergeAgent" - module: "prefabs" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/ConciergeAgent.ts" ---- -# `ConciergeAgent` - -Prefab agent that acts as a virtual concierge for a venue, providing information -about services, amenities, hours of operation, availability, and directions. - -## Signature - -```typescript -class ConciergeAgent extends AgentBase -``` - -## Inheritance - -**Extends:** [AgentBase](/docs/sdk-reference/reference/typescript/agent-base) - -## Examples - -```typescript -import { ConciergeAgent } from '@signalwire/sdk'; - -const agent = new ConciergeAgent({ - venueName: 'The Park Hotel', - services: ['Room service', 'Valet parking', 'Spa', 'Restaurant'], - hoursOfOperation: { - restaurant: '7 AM - 10 PM daily', - spa: '9 AM - 9 PM daily', - default: '24 hours', - }, - amenities: { - pool: { location: 'Rooftop', hours: '6 AM - 10 PM' }, - gym: { location: 'Floor 2', hours: '24 hours' }, - }, -}); - -await agent.serve({ port: 3000 }); -``` - -## Properties - - - Unique identifier for this agent instance. - - - - Dictionary of amenities, each mapping to a dict of detail keys/values. - - - - - - - - Domain name for SSL. Mirrors Python's `self.domain`. - - - - Check if full JSON Schema validation is enabled. Mirrors Python's `@property full_validation_enabled`. - - - - Host the server binds to. - - - - Hours of operation by category. Defaults to `{ default: "9 AM - 5 PM" }`. - - - - Structured logger instance for this agent. Override the inherited SWMLService logger with an AgentBase-tagged one. - - - - Service display name. - - - - Public accessor for the native functions list. Python exposes `self.native_functions` as a public read/write attribute. - - - - - - Public accessor for the agent's POM as a [PromptObjectModel](/docs/sdk-reference/reference/typescript/pom/prompt-object-model) instance. Python parity: `agent.pom` instance attribute (agent\_base.py line 209) is a `signalwire.pom.pom.PromptObjectModel` when `use_pom=True`, or `None` otherwise. This getter returns the equivalent TypeScript `PromptObjectModel` instance — callers can use `addSection`, `findSection`, `renderMarkdown`, `renderXml`, `toJson`, `toYaml` exactly as in Python. The instance returned is a fresh snapshot built from the current `PomBuilder` state, so mutating it does not feed back into the agent's internal builder. To mutate the agent's prompt, use `promptAddSection` / `promptAddToSection` / `promptAddSubsection`. - - - - Port the server binds to. - - - - Static prompt sections: subclasses can define these declaratively. Each entry is applied via promptAddSection() in the constructor. - - - - Public accessor for the PromptManager (POM). Python exposes `self.pom` as a public attribute. This getter provides equivalent access for direct POM manipulation. - - - - HTTP route path. - - - - Schema validation utilities. Mirrors Python's `self.schema_utils`. - - - - Unified security configuration. Mirrors Python's `self.security`. - - - - List of services offered by the venue. - - - - Public read-only accessor for the SkillManager. Python exposes `self.skill_manager` as a public attribute. This getter provides equivalent read access. - - - - Special instructions appended to the agent's instruction bullets. - - - - Path to SSL certificate. Mirrors Python's `self.ssl_cert_path`. - - - - Whether SSL is enabled. Mirrors Python's `self.ssl_enabled`. - - - - Path to SSL private key. Mirrors Python's `self.ssl_key_path`. - - - - The complete set of internal SWAIG function names that accept fillers, matching the SWAIGInternalFiller schema definition. Any name outside this set is silently ignored by the runtime — addInternalFiller / setInternalFillers warn if you pass an unknown name. - - - - - - - - Name of the venue or business. - - - - Custom verb handler registry. Mirrors Python's `self.verb_registry`. - - -## Methods - -### addAnswerVerb - -Configure the answer verb (phase 2) with optional settings. - -#### Signature - -```typescript -addAnswerVerb(config?: Record): this -``` - -#### Parameters - - - Optional answer verb configuration. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1501. - -*** - -### addFunctionInclude - -Add a remote SWAIG function include reference. - -#### Signature - -```typescript -addFunctionInclude( - url: string, - functions: string[], - metaData?: Record -): this -``` - -#### Parameters - - - URL of the remote SWAIG endpoint. - - - - Function names available at that endpoint. - - - - Optional metadata to attach to the include. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 966. - -*** - -### addHint - -Add a single speech-recognition hint. - -#### Signature - -```typescript -addHint(hint: string): this -``` - -#### Parameters - - - Word or phrase to boost in speech recognition. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 653. - -*** - -### addHints - -Add multiple speech-recognition hints at once. - -#### Signature - -```typescript -addHints(hints: string[]): this -``` - -#### Parameters - - - Array of words or phrases to boost. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 663. - -*** - -### addInternalFiller - -Add internal filler phrases for a single internal function and language. - -See [setInternalFillers](/docs/sdk-reference/reference/typescript/prefabs/concierge-agent#set-internal-fillers) for the complete list of supported -functionName values and an explanation of what fillers do. - -#### Signature - -```typescript -addInternalFiller( - functionName: string, - languageCode: string, - fillers: string[] -): this -``` - -#### Parameters - - - One of the supported internal function names (see SUPPORTED\_INTERNAL\_FILLER\_NAMES). Names outside the supported set log a warning and are ignored by the runtime. - - - - BCP-47 language code for the fillers (e.g. 'en-US'). - - - - Array of filler phrases. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 943. - -*** - -### addLanguage - -Add a supported language to the AI configuration. - -#### Signature - -```typescript -addLanguage(config: LanguageConfig): this -``` - -#### Parameters - - - Language configuration including name, code, voice, and optional fillers. `params` may be set to attach engine-specific tuning (voice stability, similarity boost, model knobs, etc.); only emitted into SWML when non-empty so existing entries stay byte-identical when no params are passed (Python ai\_config\_mixin.py `add_language`). - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 694. - -*** - -### addMcpServer - -Add an external MCP server for tool discovery and invocation. -Tools are discovered via MCP protocol at session start and added to the AI's tool list. - -#### Signature - -```typescript -addMcpServer(url: string, opts?: { ...3 fields }): this -``` - -#### Parameters - - - MCP server HTTP endpoint URL - - - - Optional configuration: headers, resources, resourceVars - - - - - - - - -#### Returns - -`this` — This agent instance for chaining - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1146. - -*** - -### addPatternHint - -Add a pattern-based speech-recognition hint with find-and-replace behavior. - -#### Signature - -```typescript -addPatternHint(opts: { ...4 fields }): this -``` - -#### Parameters - - - Pattern hint configuration with a descriptive hint label, regex pattern, replacement string, and optional case-insensitive flag. - - - - - - - - - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 674. - -*** - -### addPostAiVerb - -Add a SWML verb to execute after the AI verb (phase 5). - -#### Signature - -```typescript -addPostAiVerb(verbName: string, config: Record): this -``` - -#### Parameters - - - Name of the SWML verb. - - - - Verb configuration object. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1523. - -*** - -### addPostAnswerVerb - -Add a SWML verb to execute after the answer phase but before the AI verb (phase 3). - -#### Signature - -```typescript -addPostAnswerVerb( - verbName: string, - config: number | Record -): this -``` - -#### Parameters - - - Name of the SWML verb. - - - - Verb configuration object. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1512. - -*** - -### addPreAnswerVerb - -Add a SWML verb to execute before the answer phase (phase 1). - -#### Signature - -```typescript -addPreAnswerVerb( - verbName: string, - config: number | Record -): this -``` - -#### Parameters - - - Name of the SWML verb (e.g. "play", "record"). - - - - Verb configuration object. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1491. - -*** - -### addPronunciation - -Add a pronunciation override rule for the TTS engine. - -#### Signature - -```typescript -addPronunciation(rule: PronunciationRule): this -``` - -#### Parameters - - - Pronunciation rule specifying the text to replace and its substitute. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 774. - -*** - -### addSection - -Add a new named section to the SWML document. -Mirrors Python's `add_section()`. - -#### Signature - -```typescript -addSection(sectionName: string): this -``` - -#### Parameters - - - Name of the section to create. - - -#### Returns - -`this` — This service for chaining. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 653. - -*** - -### addSkill - -Add a skill to this agent, registering its tools, prompt sections, hints, and global data. - -#### Signature - -```typescript -addSkill(skill: SkillBase): Promise -``` - -#### Parameters - - - The skill instance to add. - - -#### Returns - -`Promise` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1570. - -*** - -### addSkillByName - -Add a skill by its registered name, looking it up in the global SkillRegistry. - -Matches Python's `add_skill(skill_name, params)` which loads skills by string -name via the SkillManager registry. Throws a `ValueError`-equivalent if the -skill name is not found in the registry. - -Accepts a typed [SkillNameOrString](/docs/sdk-reference/reference/typescript/skills/skill-name#skill-name-or-string): one of the built-in -`SkillName` values (autocompleted, with a typo caught at compile -time) or any other string for custom / third-party skills. The value is -forwarded to the registry unchanged — the typing is erased at runtime, so -this matches Python's bare-`str` `add_skill(skill_name, params)`. - -#### Signature - -```typescript -addSkillByName( - skillName: SkillNameOrString, - params?: SkillConfig -): Promise -``` - -#### Parameters - - - The name the skill was registered under in the SkillRegistry. - - - - Optional configuration parameters forwarded to the skill factory. - - -#### Returns - -`Promise` — This agent instance for chaining. - -#### Throws - -- Error if no skill with the given name is registered. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1641. - -*** - -### addSwaigQueryParams - -Add extra query parameters appended to all SWAIG webhook URLs. - -#### Signature - -```typescript -addSwaigQueryParams(params: Record): this -``` - -#### Parameters - - - Key-value pairs to append as query parameters. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1733. - -*** - -### addVerb - -Add a verb to the SWML document. - -#### Signature - -```typescript -addVerb(name: string, config: unknown): this -``` - -#### Parameters - - - Verb name (e.g., 'answer', 'play', 'hangup'). - - - - Verb configuration. - - -#### Returns - -`this` — This service for chaining. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 642. - -*** - -### addVerbToSection - -Add a verb to a specific named section. -Mirrors Python's `add_verb_to_section()`. - -#### Signature - -```typescript -addVerbToSection(sectionName: string, verbName: string, config: unknown): this -``` - -#### Parameters - - - Target section name (auto-created if missing). - - - - Verb name. - - - - Verb configuration. - - -#### Returns - -`this` — This service for chaining. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 669. - -*** - -### asRouter - -Return this agent's Hono app for mounting as a sub-router in an AgentServer. - -#### Signature - -```typescript -asRouter(): Hono -``` - -#### Returns - -`Hono` — The Hono application instance. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 2656. - -*** - -### autoMapSipUsernames - -Automatically register common SIP usernames based on this agent's -name and route. Derives cleaned variants (alphanumeric + underscore) -and registers each via `registerSipUsername()`. - -Port of Python's `auto_map_sip_usernames()`: - -- Registers a cleaned version of the agent name -- Registers a cleaned version of the route (if different from name) -- For names longer than 3 characters, also registers a vowel-stripped variant - -#### Signature - -```typescript -autoMapSipUsernames(): this -``` - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1058. - -*** - -### buildSwmlForRequest - -Service-side SWML-builder hook. Subclasses return a `SwmlBuilder` -to fully replace the document for this request, or `null` to fall -through to `setOnRequestCallback` or the static builder. - -This is distinct from the WebMixin `onRequest(requestData, -callbackPath)` hook on AgentBase (which mirrors Python's -`on_request -> on_swml_request` modification-merge contract). -Use this hook when you want to swap the entire SWML builder; use -`onRequest` / `onSwmlRequest` on AgentBase when you want to merge -targeted modifications into the rendered document. - -Default implementation returns `null` (no-op). - -#### Signature - -```typescript -buildSwmlForRequest( - _queryParams: Record, - _bodyParams: Record, - _headers: Record, - _callbackPath?: string -): SwmlBuilder | null -``` - -#### Parameters - - - - - - - - - -#### Returns - -`SwmlBuilder | null` — A `SwmlBuilder` whose document is sent as the response, or `null` to delegate to the next handler in the chain. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 834. - -*** - -### clearPostAiVerbs - -Remove all post-AI verbs. - -#### Signature - -```typescript -clearPostAiVerbs(): this -``` - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1550. - -*** - -### clearPostAnswerVerbs - -Remove all post-answer verbs. - -#### Signature - -```typescript -clearPostAnswerVerbs(): this -``` - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1541. - -*** - -### clearPreAnswerVerbs - -Remove all pre-answer verbs. - -#### Signature - -```typescript -clearPreAnswerVerbs(): this -``` - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1532. - -*** - -### clearSwaigQueryParams - -Clear all SWAIG query parameters. - -#### Signature - -```typescript -clearSwaigQueryParams(): this -``` - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1742. - -*** - -### constructor - -Create a ConciergeAgent for a venue with the given services, amenities, and hours. - -#### Signature - -```typescript -constructor(config: ConciergeConfig): ConciergeAgent -``` - -#### Parameters - - - Configuration including venue name, services, amenities, and optional hours/instructions/welcome. - - -#### Returns - -`ConciergeAgent` - -#### Source - -[`src/prefabs/ConciergeAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/ConciergeAgent.ts) - -Line 80. - -*** - -### createToolToken - -Mint a per-call SWAIG-function token via the agent's SessionManager. - -Mirrors Python reference `core/mixins/state_mixin.py _create_tool_token`: -delegates to `SessionManager.createToolToken` and returns an empty -string on any failure (Python catches all exceptions and returns ""). - -#### Signature - -```typescript -createToolToken(toolName: string, callId: string): string -``` - -#### Parameters - - - - - -#### Returns - -`string` - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1475. - -*** - -### defineContexts - -Define or replace the contexts configuration for the AI verb. - -#### Signature - -```typescript -defineContexts( - contexts?: Record | ContextBuilder -): ContextBuilder -``` - -#### Parameters - - - An existing ContextBuilder instance or a plain object; a new ContextBuilder is created if omitted. - - -#### Returns - -`ContextBuilder` — The active ContextBuilder for further configuration. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 604. - -*** - -### defineTool - -Register a SWAIG tool (function) that the AI can invoke during a call. - -#### How this becomes a tool the model sees - -A SWAIG function is **exactly the same concept** as a "tool" in -native OpenAI / Anthropic tool calling. On every LLM turn, the SDK -renders each registered SWAIG function into the OpenAI tool schema: - -```json -{ -"type": "function", -"function": { -"name": "your_name_here", -"description": "your description text", -"parameters": { /* your JSON schema */ } -} -} -``` - -That schema goes to the model in the same API call that produces -the next assistant message. The model reads: - -- the **function `description`** to decide WHEN to call this tool -- each **parameter `description`** (inside the JSON schema) to - decide HOW to fill in each argument - -This means **descriptions are prompt engineering**, not developer -comments. A vague description is the #1 cause of "the model has the -right tool but doesn't call it" failures. - -##### Bad vs good descriptions - -```text -BAD : description: 'Lookup function' -GOOD: description: 'Look up a customer's account details by account -number. Use this BEFORE quoting any account-specific info -(balance, plan, status). Do not use for general product -questions.' - -BAD : parameters: { id: { type: 'string', description: 'the id' } } -GOOD: parameters: { account_number: { type: 'string', description: -'The customer's 8-digit account number, no dashes or spaces. -Ask the user if they don't provide it.' } } -``` - -##### Tool count matters - -LLM tool selection accuracy degrades past ~7-8 simultaneously-active -tools per call. Use Step.setFunctions() to partition tools across -steps so only the relevant subset is active at any moment. - -#### Signature - -```typescript -defineTool(opts: { ...11 fields }): this -``` - -#### Parameters - - - Tool definition including name, description, parameter schema, and handler callback. `description` and per-parameter `description` strings are LLM-facing prompt engineering. - - - - - Additional fields to pass through to the SWAIG function definition (Python `**swaig_fields` equivalent). - - - - - - - - - - - - - - - - - - - - External webhook URL; makes this an externally-hosted tool. - - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1330. - -*** - -### defineTools - -Register the `check_availability` and `get_directions` SWAIG tools. - -#### Signature - -```typescript -defineTools(): void -``` - -#### Returns - -`void` - -#### Source - -[`src/prefabs/ConciergeAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/ConciergeAgent.ts) - -Line 203. - -*** - -### defineTypedTool - -Register a SWAIG tool with a typed handler that receives named parameters -instead of the standard `(args, rawData)` convention. - -The SDK wraps the handler to unpack the args dict into positional params. -If no `parameters` schema is provided, one is inferred from the handler's -source code (parameter names and default values). - -#### Signature - -```typescript -defineTypedTool(opts: { ...9 fields }): this -``` - -#### Parameters - - - Tool definition with a typed handler function. - - - - - - - The typed handler. Receives the AI-extracted arguments as named positional parameters (in declaration order), optionally with a trailing `rawData` record, and returns a SWAIG result. Precisely typed as [TypedToolHandler](/docs/sdk-reference/reference/typescript/type-inference#typed-tool-handler) rather than the bare `Function` so a non-callable — or a callable that returns nothing usable — is a compile-time error. - - - - - - - - - - - - - - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1373. - -*** - -### enableDebugEvents - -Enable debug event webhooks for this agent. - -#### Signature - -```typescript -enableDebugEvents(level: number = 1): this -``` - -#### Parameters - - - Debug verbosity level (defaults to 1). - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1011. - -*** - -### enableDebugRoutes - -Register a callback function that determines routing based on POST data. - -When a routing callback is registered, an endpoint at the specified path -is created in `getApp()`. The callback receives the request body and returns -Enable debug routes for testing and development. - -This is a backward-compatibility stub matching the Python SDK. -In the TypeScript SDK, debug routes (health, ready, debug\_events) -are automatically registered in `getApp()`. - -#### Signature - -```typescript -enableDebugRoutes(): this -``` - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1773. - -*** - -### enableMcpServer - -Expose this agent's tools as an MCP server endpoint at /mcp. -Adds a JSON-RPC 2.0 endpoint that MCP clients (Claude Desktop, other agents) can connect to. - -#### Signature - -```typescript -enableMcpServer(): this -``` - -#### Returns - -`this` — This agent instance for chaining - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1160. - -*** - -### enableSipRouting - -Enable SIP routing for this agent. - -#### Signature - -```typescript -enableSipRouting(autoMap: boolean = true, path: string = '/sip'): this -``` - -#### Parameters - - - When true, automatically map SIP usernames to the agent route (defaults to true). - - - - HTTP path for the SIP routing endpoint (defaults to '/sip'). - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1025. - -*** - -### extractSipUsername - -Extract the SIP username from a request body's call.to field. - -**Modifiers:** `static` - -#### Signature - -```typescript -extractSipUsername(requestBody: Record): string | null -``` - -#### Parameters - - - The parsed request body containing call information. - - -#### Returns - -`string | null` — The extracted SIP username, or null if not found. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1122. - -*** - -### getAllFunctions - -Snapshot of all registered SWAIG functions keyed by name. -(Python parity: `ToolRegistry.get_all_functions`.) - -#### Signature - -```typescript -getAllFunctions(): Record> -``` - -#### Returns - -`Record>` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 529. - -*** - -### getApp - -Get or lazily create the Hono HTTP application with all routes, middleware, auth, and CORS. - -#### Signature - -```typescript -getApp(): Hono -``` - -#### Returns - -`Hono` — The configured Hono application instance. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 2269. - -*** - -### getBasicAuthCredentials - -Get the basic-auth credentials used by this agent. - -#### Signature - - - - ```typescript - getBasicAuthCredentials(includeSource?: false): [string, string] - ``` - - - - ```typescript - getBasicAuthCredentials( - includeSource: true - ): [string, string, "provided" | "environment" | "generated"] - ``` - - - -#### Parameters (Overload 1) - - - When true, a third element indicating the credential source is appended. - - -#### Parameters (Overload 2) - - - When true, a third element indicating the credential source is appended. - - -#### Returns (Overload 1) - -`[string, string]` — A tuple of \[username, password] or \[username, password, source]. - -#### Returns (Overload 2) - -`[string, string, "provided" | "environment" | "generated"]` — A tuple of \[username, password] or \[username, password, source]. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 2794. - -*** - -### getBuilder - -Get the underlying SwmlBuilder for direct manipulation. - -#### Signature - -```typescript -getBuilder(): SwmlBuilder -``` - -#### Returns - -`SwmlBuilder` — The SwmlBuilder instance. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 632. - -*** - -### getContexts - -Get the contexts dictionary as serialised SWML, or null when no -contexts have been defined yet. - -Matches Python `PromptManager.get_contexts()` which returns the -contexts dict or `None`. - -#### Signature - -```typescript -getContexts(): Record | null -``` - -#### Returns - -`Record | null` — Contexts dict, or null when no contexts are defined. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 641. - -*** - -### getDocument - -Get the SWML document as a dictionary. -Alias for `renderSwml()` that matches Python's `get_document()` name. - -#### Signature - -```typescript -getDocument(): Record -``` - -#### Returns - -`Record` — The SWML document. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 706. - -*** - -### getFullUrl - -Get the full external URL of this agent, using the proxy base URL if available. - -#### Signature - -```typescript -getFullUrl(includeAuth: boolean = false): string -``` - -#### Parameters - - - Whether to embed basic-auth credentials in the URL (defaults to false). - - -#### Returns - -`string` — The fully-qualified URL string. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1857. - -*** - -### getFunction - -Get a registered SWAIG function entry, or undefined. -(Python parity: `ToolRegistry.get_function`.) - -#### Signature - -```typescript -getFunction(name: string): Record | SwaigFunction | undefined -``` - -#### Parameters - - - -#### Returns - -`Record | SwaigFunction | undefined` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 523. - -*** - -### getLanguageParams - -Read the per-language `params` dict for a previously-added language. - -Python parity: `get_language_params(code)`. Returns `undefined` if the -code is unknown or the language has no params set — no exception path. - -#### Signature - -```typescript -getLanguageParams(code: string): Record | undefined -``` - -#### Parameters - - - Language code as previously passed to [addLanguage](/docs/sdk-reference/reference/typescript/prefabs/concierge-agent#add-language). - - -#### Returns - -`Record | undefined` — The params dict if set, `undefined` otherwise (including when the code is unknown). - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 760. - -*** - -### getMcpServers - -Get configured MCP servers (read-only copy). - -#### Signature - -```typescript -getMcpServers(): Record[] -``` - -#### Returns - -`Record[]` - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1171. - -*** - -### getName - -Get the agent's display name. - -#### Signature - -```typescript -getName(): string -``` - -#### Returns - -`string` — The agent name string. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1559. - -*** - -### getPostPrompt - -Get the post-prompt text, if one has been set. - -#### Signature - -```typescript -getPostPrompt(): string | null -``` - -#### Returns - -`string | null` — The post-prompt string, or null if not configured. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 548. - -*** - -### getPrompt - -Get the fully rendered main prompt text. - -#### Signature - -```typescript -getPrompt(): string -``` - -#### Returns - -`string` — The assembled prompt string. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 520. - -*** - -### getPromptPom - -Get the raw POM (Prompt Object Model) structure as an array of section data objects, -when the agent is in POM mode and has at least one section. - -Matches Python `get_prompt()` which returns `Union[str, List[Dict]]` — a raw list when -in POM mode (via `pom.to_list()` / `pom.render_dict()`), or a string otherwise. -The TS `getPrompt()` always returns a string (rendered Markdown), so this companion -method exposes the raw POM structure for callers that need it for serialisation or -inspection (e.g. skills that inspect prompt sections). - -#### Signature - -```typescript -getPromptPom(): Record[] | null -``` - -#### Returns - -`Record[] | null` — An array of POM section data objects, or null if not in POM mode or POM is empty. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 536. - -*** - -### getRawPrompt - -Get the raw prompt text whatever `setPromptText` stored, or null when -no raw prompt has been set. - -Matches Python `PromptManager.get_raw_prompt()` which returns the raw -stored string or `None`. Use this instead of `getPrompt()` when you -need the unrendered text rather than the POM-rendered Markdown. - -#### Signature - -```typescript -getRawPrompt(): string | null -``` - -#### Returns - -`string | null` — The raw prompt string, or null if not set. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 562. - -*** - -### getRegisteredTools - -Get a summary of all registered tools with their names, descriptions, and -parameter schemas. Lifted from AgentBase so the swaig-test CLI can list -tools on a non-AgentBase SWMLService target (sidecar / standalone SWAIG -host). - -#### Signature - -```typescript -getRegisteredTools(): { description: string; name: string; parameters: Record }[] -``` - -#### Returns - -`{ description: string; name: string; parameters: Record }[]` — Array of tool descriptors. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 557. - -*** - -### getTool - -Look up a registered SwaigFunction by name. Lifted from AgentBase so -`swaig-test --exec ` works against a non-AgentBase SWMLService -target. - -#### Signature - -```typescript -getTool(name: string): SwaigFunction | undefined -``` - -#### Parameters - - - The tool name to search for. - - -#### Returns - -`SwaigFunction | undefined` — The SwaigFunction instance, or undefined if not found or not a SwaigFunction. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 581. - -*** - -### getTools - -Public access to the list of registered tools. - -In Python, `define_tools()` is public and returns `List[SWAIGFunction]`. -In TypeScript, `defineTools()` is a protected setup hook (void). This -method provides the equivalent public "get all tools" capability. - -#### Signature - -```typescript -getTools(): SwaigFunction[] -``` - -#### Returns - -`SwaigFunction[]` — Array of all registered SwaigFunction instances. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 371. - -*** - -### handleMcpRequest - -Handle an MCP JSON-RPC 2.0 request. Returns the response object. - -#### Signature - -```typescript -handleMcpRequest( - body: Record -): Promise> -``` - -#### Parameters - - - -#### Returns - -`Promise>` - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1204. - -*** - -### hasFunction - -Whether a SWAIG function with the given name is registered. -(Python parity: `ToolRegistry.has_function`.) - -#### Signature - -```typescript -hasFunction(name: string): boolean -``` - -#### Parameters - - - -#### Returns - -`boolean` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 517. - -*** - -### hasSkill - -Check whether a skill with the given name is registered. - -Accepts a typed [SkillNameOrString](/docs/sdk-reference/reference/typescript/skills/skill-name#skill-name-or-string) so built-in names autocomplete -and a typo is a compile-time error; any other string is still accepted -(custom skills / parity with Python's bare-`str` `has_skill`). - -#### Signature - -```typescript -hasSkill(skillName: SkillNameOrString): boolean -``` - -#### Parameters - - - The skill name to check. - - -#### Returns - -`boolean` — True if a skill with that name exists. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1676. - -*** - -### hasTool - -Whether a tool with the given name is registered. - -#### Signature - -```typescript -hasTool(name: string): boolean -``` - -#### Parameters - - - -#### Returns - -`boolean` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 511. - -*** - -### isMcpServerEnabled - -Check if MCP server endpoint is enabled. - -#### Signature - -```typescript -isMcpServerEnabled(): boolean -``` - -#### Returns - -`boolean` - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1166. - -*** - -### listSkills - -List all registered skills with their names, instance IDs, and initialization status. - -#### Signature - -```typescript -listSkills(): { initialized: boolean; instanceId: string; name: string }[] -``` - -#### Returns - -`{ initialized: boolean; instanceId: string; name: string }[]` — Array of skill descriptors. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1662. - -*** - -### listToolNames - -List registered tool names in insertion order (Map preserves it). - -#### Signature - -```typescript -listToolNames(): string[] -``` - -#### Returns - -`string[]` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 545. - -*** - -### manualSetProxyUrl - -Manually set the proxy base URL used for webhook URL generation. - -#### Signature - -```typescript -manualSetProxyUrl(url: string): this -``` - -#### Parameters - - - The external-facing base URL (trailing slashes are stripped). - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1754. - -*** - -### onDebugEvent - -Lifecycle hook called when a debug event webhook is received. Override in subclasses. - -#### Signature - -```typescript -onDebugEvent(_event: Record): void | Promise -``` - -#### Parameters - - - The debug event payload. - - -#### Returns - -`void | Promise` - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1970. - -*** - -### onFunctionCall - -Hook called before each SWAIG function execution. Override in subclasses. - -**Behavioral note:** In the Python SDK, `on_function_call` IS the dispatcher -— it retrieves and executes the function, returning the result. In TypeScript, -`fn.execute()` is called separately after this hook. However, if this method -returns a non-void value, it is used as the result and the default execution -is skipped, enabling dispatch interception parity with Python. - -#### Signature - -```typescript -onFunctionCall( - _name: string, - _args: Record, - _rawData: Record -): void | Record | Promise> -``` - -#### Parameters - - - Name of the function about to execute. - - - - Parsed arguments for the function. - - - - The full raw SWAIG request payload. - - -#### Returns - -`void | Record | Promise>` — Optionally a result dict to short-circuit default execution, or void/undefined to proceed normally. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1999. - -*** - -### onRequest - -Lifecycle hook called when SWML is requested. Default delegates to -[onSwmlRequest](/docs/sdk-reference/reference/typescript/prefabs/concierge-agent#on-swml-request) and returns its result. Subclasses typically -override `onSwmlRequest` rather than this method. - -Matches Python `WebMixin.on_request(request_data, callback_path)`. The -cross-language API is the two-arg form; the Hono `context` argument is -a TypeScript-side extra preserved for callers that already have it but -is not part of the audited surface. - -#### Signature - -```typescript -onRequest( - requestData?: Record | null, - callbackPath?: string | null -): void | Record | Promise> -``` - -#### Parameters - - - The parsed request body. - - - - Optional callback path from the request. - - -#### Returns - -`void | Record | Promise>` — Optionally a dict of SWML modifications, or undefined for default rendering. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1935. - -*** - -### onSummary - -Process the interaction summary returned at the end of a call. -Logs structured summaries as JSON. Subclasses may override to persist or process. - -#### Signature - -```typescript -onSummary( - summary: Record | null, - _rawData: Record -): void | Promise -``` - -#### Parameters - - - - - -#### Returns - -`void | Promise` - -#### Source - -[`src/prefabs/ConciergeAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/ConciergeAgent.ts) - -Line 282. - -*** - -### onSwmlRequest - -Lifecycle hook called on every SWML request before rendering. Override in subclasses. - -May optionally return a modification dict that will be merged into the -rendered SWML document (matching Python's `Optional[dict]` return type). - -Matches Python `on_swml_request(request_data, callback_path, request)` — the third -parameter is the FastAPI `Request` in Python; here it is the raw Hono context object -so that subclasses can access query parameters (`context.req.query()`), raw request -headers (`context.req.raw.headers`), etc. - -#### Signature - -```typescript -onSwmlRequest( - _rawData: Record, - _callbackPath?: string, - _context?: any -): void | Record | Promise> -``` - -#### Parameters - - - The parsed request body. - - - - Optional callback path from the request. - - - - The raw Hono context object (c), providing access to headers and query params. - - -#### Returns - -`void | Record | Promise>` — Optionally a dict of SWML modifications, or void. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1958. - -*** - -### promptAddSection - -Add a new section to the prompt with optional body, bullets, and subsections. - -#### Signature - -```typescript -promptAddSection(title: string, opts?: { ...5 fields }): this -``` - -#### Parameters - - - Section heading. - - - - Optional section content including body text, bullet points, and subsections. - - - - - - - - - - - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 467. - -*** - -### promptAddSubsection - -Add a subsection under an existing prompt section. - -#### Signature - -```typescript -promptAddSubsection( - parentTitle: string, - title: string, - opts?: { ...2 fields } -): this -``` - -#### Parameters - - - Title of the parent section. - - - - Title of the new subsection. - - - - Optional body text and bullet points for the subsection. - - - - - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 502. - -*** - -### promptAddToSection - -Append content to an existing prompt section. - -#### Signature - -```typescript -promptAddToSection(title: string, opts?: { ...3 fields }): this -``` - -#### Parameters - - - Title of the section to append to. - - - - Content to add: body text, a single bullet, or multiple bullets. - - - - - - - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 487. - -*** - -### promptHasSection - -Check whether a prompt section with the given title exists. - -#### Signature - -```typescript -promptHasSection(title: string): boolean -``` - -#### Parameters - - - Section title to look for. - - -#### Returns - -`boolean` — True if the section exists. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 512. - -*** - -### registerAdditionalRoutes - -Extension point: register additional Hono routes after SWMLService -mounts /health, /ready, /swaig, and the main route. AgentBase uses -this to add /post\_prompt, /check\_for\_input, /debug\_events, /mcp. - -#### Signature - -```typescript -registerAdditionalRoutes(_app: Hono): void -``` - -#### Parameters - - - -#### Returns - -`void` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 604. - -*** - -### registerRoutingCallback - -Register a callback at a specific HTTP path that decides how to route an -incoming request. - -When called, the endpoint at `path` will invoke `callback` with the parsed -request body. If `callback` returns a non-empty route string the server -responds with `{ action: "redirect", route }` so the platform can forward the -request to the right agent. If `callback` returns `null` / `undefined` the -agent's own SWML is returned instead (normal processing). - -Mirrors Python `swml_service.register_routing_callback` / -`web_mixin.register_routing_callback`. - -#### Signature - -```typescript -registerRoutingCallback(callback: RoutingCallback, path: string = '/sip'): this -``` - -#### Parameters - - - Function receiving the parsed request body and returning a route string to redirect, or null/undefined for normal processing. - - - - HTTP path where this callback endpoint is registered (default: '/sip'). - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1102. - -*** - -### registerSipUsername - -Register a SIP username to route to this agent. - -#### Signature - -```typescript -registerSipUsername(username: string): this -``` - -#### Parameters - - - The SIP username to register. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1040. - -*** - -### registerSwaigFunction - -Register a SwaigFunction instance or a raw function descriptor (DataMap). - -#### Signature - -```typescript -registerSwaigFunction(fn: Record | SwaigFunction): this -``` - -#### Parameters - - - -#### Returns - -`this` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 472. - -*** - -### registerVerbHandler - -Register a custom verb handler. -Mirrors Python's `register_verb_handler()`. - -#### Signature - -```typescript -registerVerbHandler(handler: SWMLVerbHandler): void -``` - -#### Parameters - - - The verb handler to register. - - -#### Returns - -`void` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 726. - -*** - -### removeFunction - -Remove a registered SWAIG function. Returns true when removed, -false when not found. (Python parity: -`ToolRegistry.remove_function`.) - -#### Signature - -```typescript -removeFunction(name: string): boolean -``` - -#### Parameters - - - -#### Returns - -`boolean` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 540. - -*** - -### removeSkill - -Remove a previously added skill by its instance ID. - -#### Signature - -```typescript -removeSkill(instanceId: string): Promise -``` - -#### Parameters - - - The unique instance ID of the skill to remove. - - -#### Returns - -`Promise` — True if the skill was found and removed. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1654. - -*** - -### removeSkillByName - -Remove a skill by its name (Python parity). - -Python's `remove_skill(skill_name)` removes by skill name. -The existing `removeSkill(instanceId)` removes by instance ID. -This method provides name-based removal for cross-SDK parity. - -#### Signature - -```typescript -removeSkillByName(skillName: string): Promise -``` - -#### Parameters - - - The skill name to remove. - - -#### Returns - -`Promise` — True if a skill with that name was found and removed. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1690. - -*** - -### renderDocument - -Render the SWML document as a JSON string. -Mirrors Python's `render_document()`. - -#### Signature - -```typescript -renderDocument(): string -``` - -#### Returns - -`string` — JSON-encoded SWML document. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 715. - -*** - -### renderSwml - -Render the complete SWML document by assembling all 5 phases: pre-answer, answer, -post-answer, AI, and post-AI verbs. - -#### Signature - -```typescript -renderSwml(callId?: string, modifications?: Record): string -``` - -#### Parameters - - - Optional call ID to use for session tokens; auto-generated if omitted. - - - - Optional dict returned from `onSwmlRequest` to merge into the AI verb config before rendering. Matches Python's `_render_swml(modifications)` semantics: `global_data` is deep-merged; all other keys override the AI config directly. - - -#### Returns - -`string` — The rendered SWML document as a JSON string. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 2019. - -*** - -### resetContexts - -Remove all contexts, returning the agent to a no-contexts state. - -This is a convenience wrapper around `defineContexts().reset()`. -Use it in a dynamic config callback when you need to rebuild -contexts from scratch for a specific request. - -#### Signature - -```typescript -resetContexts(): this -``` - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 625. - -*** - -### resetDocument - -Reset the SWML document to an empty state. -Mirrors Python's `reset_document()`. - -#### Signature - -```typescript -resetDocument(): this -``` - -#### Returns - -`this` — This service for chaining. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 679. - -*** - -### run - -Alias for [serve](/docs/sdk-reference/reference/typescript/prefabs/concierge-agent#serve). Starts the HTTP server. - -#### Signature - -```typescript -run(opts?: { ...2 fields }): Promise -``` - -#### Parameters - - - Optional host and port overrides. - - - - - - -#### Returns - -`Promise` — A promise that resolves once the server is running. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 2702. - -*** - -### runServerless - -Handle a single serverless invocation (AWS Lambda, Google Cloud Functions, Azure Functions, or CGI). - -Matches Python `run(event, context)` when executed in a serverless environment. Python's -`run()` auto-detects the platform via `get_execution_mode()` and dispatches accordingly; -in TypeScript the serverless path is an **explicit** method so that `run()` keeps its -HTTP-server semantics and callers opt in to serverless dispatch deliberately. - -Platform detection follows the same environment-variable heuristics as Python's -`ServerlessMixin`: `AWS_LAMBDA_FUNCTION_NAME` → Lambda, `K_SERVICE` → GCF, -`FUNCTIONS_WORKER_RUNTIME` → Azure, `GATEWAY_INTERFACE` → CGI. - -Usage in a Lambda handler file: - -```ts -export const handler = (event: any, context: any) => agent.runServerless(event, context); -``` - -#### Signature - -```typescript -runServerless( - event: ServerlessEvent, - context?: unknown, - platform?: "lambda" | "gcf" | "azure" | "cgi" | "auto" -): Promise -``` - -#### Parameters - - - The serverless event payload (Lambda event, GCF request body, etc.). - - - - The serverless context object (Lambda context, Azure context, etc.). - - - - Optional platform override; defaults to 'auto' (environment detection). - - -#### Returns - -`Promise` — The normalized serverless response object. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 2728. - -*** - -### serve - -Start the HTTP server and begin listening for requests. - -Uses `@hono/node-server` under the hood. When run in CLI mode -(`SWAIG_CLI_MODE=true`, set automatically by `npx swaig-test`), this is a -no-op so agent config can be inspected without starting a server. - -#### Signature - -```typescript -serve(opts?: { ...2 fields }): Promise -``` - -#### Parameters - - - Optional host/port overrides. Defaults to the values provided in the constructor options or the `PORT` environment variable. - - - - - - -#### Returns - -`Promise` — A promise that resolves once the server has begun listening. - -#### Examples - -```typescript -const agent = new AgentBase({ name: 'demo', port: 3000 }); -await agent.serve(); -// Or override at runtime: -await agent.serve({ port: 8080, host: '127.0.0.1' }); -``` - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 2679. - -*** - -### setDynamicConfigCallback - -Set a callback invoked on each SWML request to dynamically modify an ephemeral agent copy. - -The callback receives a clone of this agent — mutations apply only to the current -request, so you can vary prompt, tools, languages, params, or global data per call -without affecting the long-lived agent instance. - -#### Signature - -```typescript -setDynamicConfigCallback(cb: DynamicConfigCallback): this -``` - -#### Parameters - - - Callback receiving `(queryParams, bodyParams, headers, agent)` where `agent` is the ephemeral `AgentBase` copy to mutate. May be async. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Examples - -```typescript -agent.setDynamicConfigCallback((query, body, headers, agent) => { - const lang = query.lang ?? 'en'; - if (lang === 'es') { - (agent as AgentBase).setPromptText('Eres un asistente útil.'); - } -}); -``` - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1723. - -*** - -### setFunctionIncludes - -Replace the entire list of function includes. -Each include must have a `url` and `functions` array. - -#### Signature - -```typescript -setFunctionIncludes(includes: FunctionInclude[]): this -``` - -#### Parameters - - - Array of function include objects. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 979. - -*** - -### setGlobalData - -Merge data into the global\_data object passed into the AI configuration. - -Matches Python `set_global_data` which calls `.update()` on the internal dict — -existing keys are preserved; incoming keys overwrite on collision. Skills and -other callers can each contribute keys without clobbering one another. - -If you need to replace the entire object, assign a new agent instance or use -`Object.assign(agent.globalData, {})` to clear first. - -#### Signature - -```typescript -setGlobalData(data: Record): this -``` - -#### Parameters - - - Key-value pairs to merge into global data. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 828. - -*** - -### setInternalFillers - -Set internal fillers for native SWAIG functions. - -Internal fillers are short phrases the AI agent speaks (via TTS) while -an internal/native function is running, so the caller doesn't hear -dead air during transitions or background work. - -Supported function names (matches the SWAIGInternalFiller schema): - -hangup — when the agent is hanging up -check\_time — when checking the time -wait\_for\_user — when waiting for user input -wait\_seconds — during deliberate pauses -adjust\_response\_latency — when adjusting response timing -next\_step — transitioning between steps in prompt.contexts -change\_context — switching between contexts in prompt.contexts -get\_visual\_input — processing visual input (enable\_vision=true) -get\_ideal\_strategy — thinking (enable\_thinking=true) - -Notably NOT supported: change\_step, gather\_submit, or arbitrary -user-defined SWAIG function names. The runtime only honors fillers -for the names listed above; everything else is silently ignored at -the SWML level. This method warns at registration time if you pass -an unknown name so you catch the typo early. - -#### Signature - -```typescript -setInternalFillers( - internalFillers: Record> -): this -``` - -#### Parameters - - - Map of function name to language-keyed filler phrases. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Examples - -```typescript -agent.setInternalFillers({ - next_step: { - 'en-US': ['Moving to the next step...', 'Great, let us continue...'], - 'es': ['Pasando al siguiente paso...'] - }, - check_time: { - 'en-US': ['Let me check the time...'] - } -}); -``` - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 910. - -*** - -### setLanguageParams - -Set (or replace) the per-language `params` dict on an already-added -language. Useful when language entries are built up via [addLanguage](/docs/sdk-reference/reference/typescript/prefabs/concierge-agent#add-language) -first and engine-specific tuning is added later (e.g., from a config -loader). - -Python parity: `set_language_params(code, params)`. Passing an empty -object removes the `params` key entirely. Unknown codes are a no-op. - -#### Signature - -```typescript -setLanguageParams(code: string, params: Record): this -``` - -#### Parameters - - - Language code as previously passed to [addLanguage](/docs/sdk-reference/reference/typescript/prefabs/concierge-agent#add-language) (e.g. `"en-US"`). - - - - Engine-specific params dict to attach. Empty object removes the key. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 737. - -*** - -### setLanguages - -Replace all configured languages with a new list. - -#### Signature - -```typescript -setLanguages(languages: LanguageConfig[]): this -``` - -#### Parameters - - - Array of language configurations. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 718. - -*** - -### setNativeFunctions - -Set the list of native SWAIG function names (built-in platform functions). - -#### Signature - -```typescript -setNativeFunctions(funcs: string[]): this -``` - -#### Parameters - - - Array of native function names. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 848. - -*** - -### setOnRequestCallback - -Set a callback invoked per-request to dynamically build SWML. -When set, the static SwmlBuilder is ignored and the callback's -returned SwmlBuilder is used instead. - -#### Signature - -```typescript -setOnRequestCallback(cb: OnRequestCallback): this -``` - -#### Parameters - - - Callback receiving query params, body params, and headers. - - -#### Returns - -`this` — This service for chaining. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 850. - -*** - -### setParam - -Set a single AI parameter (e.g. "temperature", "top\_p"). - -#### Signature - -```typescript -setParam(key: string, value: unknown): this -``` - -#### Parameters - - - Parameter name. - - - - Parameter value. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 800. - -*** - -### setParams - -Merge multiple AI parameters into the existing params object. - -#### Signature - -```typescript -setParams(params: Record): this -``` - -#### Parameters - - - Key-value pairs to merge. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 810. - -*** - -### setPostPrompt - -Set the post-prompt text evaluated after the call ends. - -#### Signature - -```typescript -setPostPrompt(text: string): this -``` - -#### Parameters - - - The post-prompt text to use. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 456. - -*** - -### setPostPromptLlmParams - -Merge LLM-specific parameters into the post-prompt configuration. - -#### Signature - -```typescript -setPostPromptLlmParams(params: Record): this -``` - -#### Parameters - - - Key-value LLM parameters to merge. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1001. - -*** - -### setPostPromptUrl - -Override the default post-prompt webhook URL with a custom one. - -#### Signature - -```typescript -setPostPromptUrl(url: string): this -``` - -#### Parameters - - - The custom post-prompt URL. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1847. - -*** - -### setPromptLlmParams - -Merge LLM-specific parameters into the main prompt configuration (e.g. model, temperature). - -#### Signature - -```typescript -setPromptLlmParams(params: Record): this -``` - -#### Parameters - - - Key-value LLM parameters to merge. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 991. - -*** - -### setPromptPom - -Set the prompt as a POM (Prompt Object Model) dictionary. - -Replaces the current POM sections with the provided structured data. -Each entry should have `title`, and optionally `body`, `bullets`, -`numbered`, `numberedBullets`, and `subsections`. - -#### Signature - -```typescript -setPromptPom(pom: Record[]): this -``` - -#### Parameters - - - Array of POM section dictionaries. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Throws - -- Error if POM mode is not enabled (`usePom: false`). - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 577. - -*** - -### setPromptText - -Set the main system prompt text for the AI. - -#### Signature - -```typescript -setPromptText(text: string): this -``` - -#### Parameters - - - The prompt text to use. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 446. - -*** - -### setPronunciations - -Replace all pronunciation rules with a new list. - -#### Signature - -```typescript -setPronunciations(rules: PronunciationRule[]): this -``` - -#### Parameters - - - Array of pronunciation rule objects. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 786. - -*** - -### setupGracefulShutdown - -Register process signal handlers for clean Kubernetes/Docker shutdown. -Handles SIGTERM and SIGINT, waits for a timeout, then exits. - -**Modifiers:** `static` - -#### Signature - -```typescript -setupGracefulShutdown(opts?: { ...1 fields }): void -``` - -#### Parameters - - - Optional timeout in milliseconds (default 5000). - - - - -#### Returns - -`void` - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 2751. - -*** - -### setWebHookUrl - -Override the default SWAIG webhook URL with a custom one. - -#### Signature - -```typescript -setWebHookUrl(url: string): this -``` - -#### Parameters - - - The custom webhook URL. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1837. - -*** - -### stop - -Stop the HTTP server. -Mirrors Python's `stop()`. - -#### Signature - -```typescript -stop(): void -``` - -#### Returns - -`void` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 1009. - -*** - -### swaigPreDispatch - -Extension point: invoked between argument parsing and function dispatch -on POST /swaig. Returns \[target, shortCircuit]: when shortCircuit is -non-null, it's returned directly without dispatching. AgentBase may -override to add session-token validation or ephemeral dynamic-config. - -#### Signature - -```typescript -swaigPreDispatch( - _requestData: Record, - _funcName: string -): [SWMLService, unknown] -``` - -#### Parameters - - - - - -#### Returns - -`[SWMLService, unknown]` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 592. - -*** - -### updateGlobalData - -Merge additional entries into the existing global\_data object. - -#### Signature - -```typescript -updateGlobalData(data: Record): this -``` - -#### Parameters - - - Key-value pairs to merge into global data. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 838. - -*** - -### validateBasicAuth - -Override to add custom basic-auth validation logic beyond credential matching. - -#### Signature - -```typescript -validateBasicAuth( - _username: string, - _password: string -): boolean | Promise -``` - -#### Parameters - - - The username from the request. - - - - The password from the request. - - -#### Returns - -`boolean | Promise` — True if the credentials are valid; false to reject the request. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1980. - -*** - -### validateToolToken - -Validate a tool-call token for the given function. - -Mirrors Python reference `core/mixins/state_mixin.py validate_tool_token`: - -1. Unknown function → `false`. -2. Registered but non-secure → `true` without consulting SessionManager - (non-secure tools never require a token). -3. Raw-dict descriptors (e.g. DataMap) are treated as secure, matching - Python's `isinstance(func, dict) → is_secure = True` branch. -4. Missing token on a secure tool → `false`. -5. Otherwise delegate to `SessionManager.validateToolToken`. - -Divergences from the Python reference: - -- No debug-logging branch: `AgentBase` does not expose an agent-level - debug-mode flag, so the per-call debug telemetry Python emits is - omitted. `SessionManager` still logs its own validation outcomes. -- No token-derived call-id fallback: `SessionManager.debugToken` - truncates the embedded call-id for log safety, so an extracted value - cannot be round-tripped back through `validateToolToken`. The caller - is expected to supply a non-empty `callId`; an empty one is forwarded - unchanged and the underlying validator will reject it. - -#### Signature - -```typescript -validateToolToken(functionName: string, token: string, callId: string): boolean -``` - -#### Parameters - - - - - - - -#### Returns - -`boolean` - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1455. - -## Functions - -### createConciergeAgent - -Factory function that creates and returns a new ConciergeAgent. - -#### Signature - -```typescript -createConciergeAgent(config: ConciergeConfig): ConciergeAgent -``` - -#### Parameters - - - Configuration for the concierge agent. - - -#### Returns - -`ConciergeAgent` — A configured ConciergeAgent instance. - -#### Source - -[`src/prefabs/ConciergeAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/ConciergeAgent.ts) - -Line 305. - -## Interfaces - -### ConciergeConfig - -Configuration for the [ConciergeAgent](/docs/sdk-reference/reference/typescript/prefabs/concierge-agent). - -#### Signature - -```typescript -interface ConciergeConfig -``` - -#### Properties - - - Additional AgentBase options forwarded to `super()`. - - - - Dictionary of amenities, each mapping to a dict of detail keys/values. - - - - Optional hours of operation by category (e.g. `{ default: "9 AM - 5 PM" }`). - - - - Agent display name (defaults to `"concierge"`). - - - - HTTP route for this agent (defaults to `"/concierge"`). - - - - List of services offered by the venue (required). - - - - Optional special instructions appended to the agent's instruction bullets. - - - - Name of the venue or business (required). - - - - Optional custom welcome message spoken as a non-bargeable static greeting. - - -#### Source - -[`src/prefabs/ConciergeAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/ConciergeAgent.ts) - -Line 16. - -## Source - -[`src/prefabs/ConciergeAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/ConciergeAgent.ts) - -Line 64. diff --git a/fern/products/sdk-reference/typescript/prefabs/faq-bot-agent/index.mdx b/fern/products/sdk-reference/typescript/prefabs/faq-bot-agent/index.mdx deleted file mode 100644 index ce9625f5b1..0000000000 --- a/fern/products/sdk-reference/typescript/prefabs/faq-bot-agent/index.mdx +++ /dev/null @@ -1,3789 +0,0 @@ ---- -slug: "/reference/typescript/prefabs/faq-bot-agent" -title: "FAQBotAgent" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "prefabs.FAQBotAgent" - module: "prefabs" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/FAQBotAgent.ts" ---- -# `FAQBotAgent` - -Prefab agent that answers frequently asked questions using keyword matching with optional escalation to a live agent. - -Pass an array of `{ question, answer, keywords }` entries and the agent will -fuzzy-match inbound utterances against them. If no match crosses the confidence -threshold, the call can optionally escalate to a configured phone number. - -## Signature - -```typescript -class FAQBotAgent extends AgentBase -``` - -## Inheritance - -**Extends:** [AgentBase](/docs/sdk-reference/reference/typescript/agent-base) - -## Examples - -```typescript -import { FAQBotAgent } from '@signalwire/sdk'; - -const agent = new FAQBotAgent({ - faqs: [ - { - question: 'What are your business hours?', - answer: "We're open 9 AM to 5 PM Pacific, Monday through Friday.", - keywords: ['hours', 'open', 'closed', 'time'], - }, - { - question: 'Where are you located?', - answer: 'Our headquarters are in San Francisco, California.', - keywords: ['location', 'address', 'office'], - }, - ], - escalationNumber: '+15551234567', -}); - -await agent.serve({ port: 3000 }); -``` - -## Properties - - - Unique identifier for this agent instance. - - - - - - - - Domain name for SSL. Mirrors Python's `self.domain`. - - - - The configured FAQ entries. - - - - Check if full JSON Schema validation is enabled. Mirrors Python's `@property full_validation_enabled`. - - - - Host the server binds to. - - - - Structured logger instance for this agent. Override the inherited SWMLService logger with an AgentBase-tagged one. - - - - Service display name. - - - - Public accessor for the native functions list. Python exposes `self.native_functions` as a public read/write attribute. - - - - - - The personality description used in the prompt. - - - - Public accessor for the agent's POM as a [PromptObjectModel](/docs/sdk-reference/reference/typescript/pom/prompt-object-model) instance. Python parity: `agent.pom` instance attribute (agent\_base.py line 209) is a `signalwire.pom.pom.PromptObjectModel` when `use_pom=True`, or `None` otherwise. This getter returns the equivalent TypeScript `PromptObjectModel` instance — callers can use `addSection`, `findSection`, `renderMarkdown`, `renderXml`, `toJson`, `toYaml` exactly as in Python. The instance returned is a fresh snapshot built from the current `PomBuilder` state, so mutating it does not feed back into the agent's internal builder. To mutate the agent's prompt, use `promptAddSection` / `promptAddToSection` / `promptAddSubsection`. - - - - Port the server binds to. - - - - Static prompt sections: subclasses can define these declaratively. Each entry is applied via promptAddSection() in the constructor. - - - - Public accessor for the PromptManager (POM). Python exposes `self.pom` as a public attribute. This getter provides equivalent access for direct POM manipulation. - - - - HTTP route path. - - - - Schema validation utilities. Mirrors Python's `self.schema_utils`. - - - - Unified security configuration. Mirrors Python's `self.security`. - - - - Public read-only accessor for the SkillManager. Python exposes `self.skill_manager` as a public attribute. This getter provides equivalent read access. - - - - Path to SSL certificate. Mirrors Python's `self.ssl_cert_path`. - - - - Whether SSL is enabled. Mirrors Python's `self.ssl_enabled`. - - - - Path to SSL private key. Mirrors Python's `self.ssl_key_path`. - - - - Whether runner-up FAQ suggestions are appended to matches. - - - - The complete set of internal SWAIG function names that accept fillers, matching the SWAIGInternalFiller schema definition. Any name outside this set is silently ignored by the runtime — addInternalFiller / setInternalFillers warn if you pass an unknown name. - - - - - - - - Custom verb handler registry. Mirrors Python's `self.verb_registry`. - - -## Methods - -### addAnswerVerb - -Configure the answer verb (phase 2) with optional settings. - -#### Signature - -```typescript -addAnswerVerb(config?: Record): this -``` - -#### Parameters - - - Optional answer verb configuration. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1501. - -*** - -### addFunctionInclude - -Add a remote SWAIG function include reference. - -#### Signature - -```typescript -addFunctionInclude( - url: string, - functions: string[], - metaData?: Record -): this -``` - -#### Parameters - - - URL of the remote SWAIG endpoint. - - - - Function names available at that endpoint. - - - - Optional metadata to attach to the include. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 966. - -*** - -### addHint - -Add a single speech-recognition hint. - -#### Signature - -```typescript -addHint(hint: string): this -``` - -#### Parameters - - - Word or phrase to boost in speech recognition. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 653. - -*** - -### addHints - -Add multiple speech-recognition hints at once. - -#### Signature - -```typescript -addHints(hints: string[]): this -``` - -#### Parameters - - - Array of words or phrases to boost. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 663. - -*** - -### addInternalFiller - -Add internal filler phrases for a single internal function and language. - -See [setInternalFillers](/docs/sdk-reference/reference/typescript/prefabs/faq-bot-agent#set-internal-fillers) for the complete list of supported -functionName values and an explanation of what fillers do. - -#### Signature - -```typescript -addInternalFiller( - functionName: string, - languageCode: string, - fillers: string[] -): this -``` - -#### Parameters - - - One of the supported internal function names (see SUPPORTED\_INTERNAL\_FILLER\_NAMES). Names outside the supported set log a warning and are ignored by the runtime. - - - - BCP-47 language code for the fillers (e.g. 'en-US'). - - - - Array of filler phrases. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 943. - -*** - -### addLanguage - -Add a supported language to the AI configuration. - -#### Signature - -```typescript -addLanguage(config: LanguageConfig): this -``` - -#### Parameters - - - Language configuration including name, code, voice, and optional fillers. `params` may be set to attach engine-specific tuning (voice stability, similarity boost, model knobs, etc.); only emitted into SWML when non-empty so existing entries stay byte-identical when no params are passed (Python ai\_config\_mixin.py `add_language`). - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 694. - -*** - -### addMcpServer - -Add an external MCP server for tool discovery and invocation. -Tools are discovered via MCP protocol at session start and added to the AI's tool list. - -#### Signature - -```typescript -addMcpServer(url: string, opts?: { ...3 fields }): this -``` - -#### Parameters - - - MCP server HTTP endpoint URL - - - - Optional configuration: headers, resources, resourceVars - - - - - - - - -#### Returns - -`this` — This agent instance for chaining - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1146. - -*** - -### addPatternHint - -Add a pattern-based speech-recognition hint with find-and-replace behavior. - -#### Signature - -```typescript -addPatternHint(opts: { ...4 fields }): this -``` - -#### Parameters - - - Pattern hint configuration with a descriptive hint label, regex pattern, replacement string, and optional case-insensitive flag. - - - - - - - - - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 674. - -*** - -### addPostAiVerb - -Add a SWML verb to execute after the AI verb (phase 5). - -#### Signature - -```typescript -addPostAiVerb(verbName: string, config: Record): this -``` - -#### Parameters - - - Name of the SWML verb. - - - - Verb configuration object. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1523. - -*** - -### addPostAnswerVerb - -Add a SWML verb to execute after the answer phase but before the AI verb (phase 3). - -#### Signature - -```typescript -addPostAnswerVerb( - verbName: string, - config: number | Record -): this -``` - -#### Parameters - - - Name of the SWML verb. - - - - Verb configuration object. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1512. - -*** - -### addPreAnswerVerb - -Add a SWML verb to execute before the answer phase (phase 1). - -#### Signature - -```typescript -addPreAnswerVerb( - verbName: string, - config: number | Record -): this -``` - -#### Parameters - - - Name of the SWML verb (e.g. "play", "record"). - - - - Verb configuration object. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1491. - -*** - -### addPronunciation - -Add a pronunciation override rule for the TTS engine. - -#### Signature - -```typescript -addPronunciation(rule: PronunciationRule): this -``` - -#### Parameters - - - Pronunciation rule specifying the text to replace and its substitute. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 774. - -*** - -### addSection - -Add a new named section to the SWML document. -Mirrors Python's `add_section()`. - -#### Signature - -```typescript -addSection(sectionName: string): this -``` - -#### Parameters - - - Name of the section to create. - - -#### Returns - -`this` — This service for chaining. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 653. - -*** - -### addSkill - -Add a skill to this agent, registering its tools, prompt sections, hints, and global data. - -#### Signature - -```typescript -addSkill(skill: SkillBase): Promise -``` - -#### Parameters - - - The skill instance to add. - - -#### Returns - -`Promise` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1570. - -*** - -### addSkillByName - -Add a skill by its registered name, looking it up in the global SkillRegistry. - -Matches Python's `add_skill(skill_name, params)` which loads skills by string -name via the SkillManager registry. Throws a `ValueError`-equivalent if the -skill name is not found in the registry. - -Accepts a typed [SkillNameOrString](/docs/sdk-reference/reference/typescript/skills/skill-name#skill-name-or-string): one of the built-in -`SkillName` values (autocompleted, with a typo caught at compile -time) or any other string for custom / third-party skills. The value is -forwarded to the registry unchanged — the typing is erased at runtime, so -this matches Python's bare-`str` `add_skill(skill_name, params)`. - -#### Signature - -```typescript -addSkillByName( - skillName: SkillNameOrString, - params?: SkillConfig -): Promise -``` - -#### Parameters - - - The name the skill was registered under in the SkillRegistry. - - - - Optional configuration parameters forwarded to the skill factory. - - -#### Returns - -`Promise` — This agent instance for chaining. - -#### Throws - -- Error if no skill with the given name is registered. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1641. - -*** - -### addSwaigQueryParams - -Add extra query parameters appended to all SWAIG webhook URLs. - -#### Signature - -```typescript -addSwaigQueryParams(params: Record): this -``` - -#### Parameters - - - Key-value pairs to append as query parameters. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1733. - -*** - -### addVerb - -Add a verb to the SWML document. - -#### Signature - -```typescript -addVerb(name: string, config: unknown): this -``` - -#### Parameters - - - Verb name (e.g., 'answer', 'play', 'hangup'). - - - - Verb configuration. - - -#### Returns - -`this` — This service for chaining. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 642. - -*** - -### addVerbToSection - -Add a verb to a specific named section. -Mirrors Python's `add_verb_to_section()`. - -#### Signature - -```typescript -addVerbToSection(sectionName: string, verbName: string, config: unknown): this -``` - -#### Parameters - - - Target section name (auto-created if missing). - - - - Verb name. - - - - Verb configuration. - - -#### Returns - -`this` — This service for chaining. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 669. - -*** - -### asRouter - -Return this agent's Hono app for mounting as a sub-router in an AgentServer. - -#### Signature - -```typescript -asRouter(): Hono -``` - -#### Returns - -`Hono` — The Hono application instance. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 2656. - -*** - -### autoMapSipUsernames - -Automatically register common SIP usernames based on this agent's -name and route. Derives cleaned variants (alphanumeric + underscore) -and registers each via `registerSipUsername()`. - -Port of Python's `auto_map_sip_usernames()`: - -- Registers a cleaned version of the agent name -- Registers a cleaned version of the route (if different from name) -- For names longer than 3 characters, also registers a vowel-stripped variant - -#### Signature - -```typescript -autoMapSipUsernames(): this -``` - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1058. - -*** - -### buildSwmlForRequest - -Service-side SWML-builder hook. Subclasses return a `SwmlBuilder` -to fully replace the document for this request, or `null` to fall -through to `setOnRequestCallback` or the static builder. - -This is distinct from the WebMixin `onRequest(requestData, -callbackPath)` hook on AgentBase (which mirrors Python's -`on_request -> on_swml_request` modification-merge contract). -Use this hook when you want to swap the entire SWML builder; use -`onRequest` / `onSwmlRequest` on AgentBase when you want to merge -targeted modifications into the rendered document. - -Default implementation returns `null` (no-op). - -#### Signature - -```typescript -buildSwmlForRequest( - _queryParams: Record, - _bodyParams: Record, - _headers: Record, - _callbackPath?: string -): SwmlBuilder | null -``` - -#### Parameters - - - - - - - - - -#### Returns - -`SwmlBuilder | null` — A `SwmlBuilder` whose document is sent as the response, or `null` to delegate to the next handler in the chain. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 834. - -*** - -### clearPostAiVerbs - -Remove all post-AI verbs. - -#### Signature - -```typescript -clearPostAiVerbs(): this -``` - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1550. - -*** - -### clearPostAnswerVerbs - -Remove all post-answer verbs. - -#### Signature - -```typescript -clearPostAnswerVerbs(): this -``` - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1541. - -*** - -### clearPreAnswerVerbs - -Remove all pre-answer verbs. - -#### Signature - -```typescript -clearPreAnswerVerbs(): this -``` - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1532. - -*** - -### clearSwaigQueryParams - -Clear all SWAIG query parameters. - -#### Signature - -```typescript -clearSwaigQueryParams(): this -``` - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1742. - -*** - -### constructor - -Create a FAQBotAgent with the specified FAQ entries and matching threshold. - -#### Signature - -```typescript -constructor(config: FAQBotConfig): FAQBotAgent -``` - -#### Parameters - - - Configuration including FAQ entries, threshold, and escalation settings. - - -#### Returns - -`FAQBotAgent` - -#### Source - -[`src/prefabs/FAQBotAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/FAQBotAgent.ts) - -Line 98. - -*** - -### createToolToken - -Mint a per-call SWAIG-function token via the agent's SessionManager. - -Mirrors Python reference `core/mixins/state_mixin.py _create_tool_token`: -delegates to `SessionManager.createToolToken` and returns an empty -string on any failure (Python catches all exceptions and returns ""). - -#### Signature - -```typescript -createToolToken(toolName: string, callId: string): string -``` - -#### Parameters - - - - - -#### Returns - -`string` - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1475. - -*** - -### defineContexts - -Define or replace the contexts configuration for the AI verb. - -#### Signature - -```typescript -defineContexts( - contexts?: Record | ContextBuilder -): ContextBuilder -``` - -#### Parameters - - - An existing ContextBuilder instance or a plain object; a new ContextBuilder is created if omitted. - - -#### Returns - -`ContextBuilder` — The active ContextBuilder for further configuration. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 604. - -*** - -### defineTool - -Register a SWAIG tool (function) that the AI can invoke during a call. - -#### How this becomes a tool the model sees - -A SWAIG function is **exactly the same concept** as a "tool" in -native OpenAI / Anthropic tool calling. On every LLM turn, the SDK -renders each registered SWAIG function into the OpenAI tool schema: - -```json -{ -"type": "function", -"function": { -"name": "your_name_here", -"description": "your description text", -"parameters": { /* your JSON schema */ } -} -} -``` - -That schema goes to the model in the same API call that produces -the next assistant message. The model reads: - -- the **function `description`** to decide WHEN to call this tool -- each **parameter `description`** (inside the JSON schema) to - decide HOW to fill in each argument - -This means **descriptions are prompt engineering**, not developer -comments. A vague description is the #1 cause of "the model has the -right tool but doesn't call it" failures. - -##### Bad vs good descriptions - -```text -BAD : description: 'Lookup function' -GOOD: description: 'Look up a customer's account details by account -number. Use this BEFORE quoting any account-specific info -(balance, plan, status). Do not use for general product -questions.' - -BAD : parameters: { id: { type: 'string', description: 'the id' } } -GOOD: parameters: { account_number: { type: 'string', description: -'The customer's 8-digit account number, no dashes or spaces. -Ask the user if they don't provide it.' } } -``` - -##### Tool count matters - -LLM tool selection accuracy degrades past ~7-8 simultaneously-active -tools per call. Use Step.setFunctions() to partition tools across -steps so only the relevant subset is active at any moment. - -#### Signature - -```typescript -defineTool(opts: { ...11 fields }): this -``` - -#### Parameters - - - Tool definition including name, description, parameter schema, and handler callback. `description` and per-parameter `description` strings are LLM-facing prompt engineering. - - - - - Additional fields to pass through to the SWAIG function definition (Python `**swaig_fields` equivalent). - - - - - - - - - - - - - - - - - - - - External webhook URL; makes this an externally-hosted tool. - - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1330. - -*** - -### defineTools - -Register the search\_faqs and optional escalate SWAIG tools. - -#### Signature - -```typescript -defineTools(): void -``` - -#### Returns - -`void` - -#### Source - -[`src/prefabs/FAQBotAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/FAQBotAgent.ts) - -Line 285. - -*** - -### defineTypedTool - -Register a SWAIG tool with a typed handler that receives named parameters -instead of the standard `(args, rawData)` convention. - -The SDK wraps the handler to unpack the args dict into positional params. -If no `parameters` schema is provided, one is inferred from the handler's -source code (parameter names and default values). - -#### Signature - -```typescript -defineTypedTool(opts: { ...9 fields }): this -``` - -#### Parameters - - - Tool definition with a typed handler function. - - - - - - - The typed handler. Receives the AI-extracted arguments as named positional parameters (in declaration order), optionally with a trailing `rawData` record, and returns a SWAIG result. Precisely typed as [TypedToolHandler](/docs/sdk-reference/reference/typescript/type-inference#typed-tool-handler) rather than the bare `Function` so a non-callable — or a callable that returns nothing usable — is a compile-time error. - - - - - - - - - - - - - - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1373. - -*** - -### enableDebugEvents - -Enable debug event webhooks for this agent. - -#### Signature - -```typescript -enableDebugEvents(level: number = 1): this -``` - -#### Parameters - - - Debug verbosity level (defaults to 1). - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1011. - -*** - -### enableDebugRoutes - -Register a callback function that determines routing based on POST data. - -When a routing callback is registered, an endpoint at the specified path -is created in `getApp()`. The callback receives the request body and returns -Enable debug routes for testing and development. - -This is a backward-compatibility stub matching the Python SDK. -In the TypeScript SDK, debug routes (health, ready, debug\_events) -are automatically registered in `getApp()`. - -#### Signature - -```typescript -enableDebugRoutes(): this -``` - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1773. - -*** - -### enableMcpServer - -Expose this agent's tools as an MCP server endpoint at /mcp. -Adds a JSON-RPC 2.0 endpoint that MCP clients (Claude Desktop, other agents) can connect to. - -#### Signature - -```typescript -enableMcpServer(): this -``` - -#### Returns - -`this` — This agent instance for chaining - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1160. - -*** - -### enableSipRouting - -Enable SIP routing for this agent. - -#### Signature - -```typescript -enableSipRouting(autoMap: boolean = true, path: string = '/sip'): this -``` - -#### Parameters - - - When true, automatically map SIP usernames to the agent route (defaults to true). - - - - HTTP path for the SIP routing endpoint (defaults to '/sip'). - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1025. - -*** - -### extractSipUsername - -Extract the SIP username from a request body's call.to field. - -**Modifiers:** `static` - -#### Signature - -```typescript -extractSipUsername(requestBody: Record): string | null -``` - -#### Parameters - - - The parsed request body containing call information. - - -#### Returns - -`string | null` — The extracted SIP username, or null if not found. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1122. - -*** - -### getAllFunctions - -Snapshot of all registered SWAIG functions keyed by name. -(Python parity: `ToolRegistry.get_all_functions`.) - -#### Signature - -```typescript -getAllFunctions(): Record> -``` - -#### Returns - -`Record>` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 529. - -*** - -### getApp - -Get or lazily create the Hono HTTP application with all routes, middleware, auth, and CORS. - -#### Signature - -```typescript -getApp(): Hono -``` - -#### Returns - -`Hono` — The configured Hono application instance. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 2269. - -*** - -### getBasicAuthCredentials - -Get the basic-auth credentials used by this agent. - -#### Signature - - - - ```typescript - getBasicAuthCredentials(includeSource?: false): [string, string] - ``` - - - - ```typescript - getBasicAuthCredentials( - includeSource: true - ): [string, string, "provided" | "environment" | "generated"] - ``` - - - -#### Parameters (Overload 1) - - - When true, a third element indicating the credential source is appended. - - -#### Parameters (Overload 2) - - - When true, a third element indicating the credential source is appended. - - -#### Returns (Overload 1) - -`[string, string]` — A tuple of \[username, password] or \[username, password, source]. - -#### Returns (Overload 2) - -`[string, string, "provided" | "environment" | "generated"]` — A tuple of \[username, password] or \[username, password, source]. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 2794. - -*** - -### getBuilder - -Get the underlying SwmlBuilder for direct manipulation. - -#### Signature - -```typescript -getBuilder(): SwmlBuilder -``` - -#### Returns - -`SwmlBuilder` — The SwmlBuilder instance. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 632. - -*** - -### getContexts - -Get the contexts dictionary as serialised SWML, or null when no -contexts have been defined yet. - -Matches Python `PromptManager.get_contexts()` which returns the -contexts dict or `None`. - -#### Signature - -```typescript -getContexts(): Record | null -``` - -#### Returns - -`Record | null` — Contexts dict, or null when no contexts are defined. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 641. - -*** - -### getDocument - -Get the SWML document as a dictionary. -Alias for `renderSwml()` that matches Python's `get_document()` name. - -#### Signature - -```typescript -getDocument(): Record -``` - -#### Returns - -`Record` — The SWML document. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 706. - -*** - -### getFullUrl - -Get the full external URL of this agent, using the proxy base URL if available. - -#### Signature - -```typescript -getFullUrl(includeAuth: boolean = false): string -``` - -#### Parameters - - - Whether to embed basic-auth credentials in the URL (defaults to false). - - -#### Returns - -`string` — The fully-qualified URL string. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1857. - -*** - -### getFunction - -Get a registered SWAIG function entry, or undefined. -(Python parity: `ToolRegistry.get_function`.) - -#### Signature - -```typescript -getFunction(name: string): Record | SwaigFunction | undefined -``` - -#### Parameters - - - -#### Returns - -`Record | SwaigFunction | undefined` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 523. - -*** - -### getLanguageParams - -Read the per-language `params` dict for a previously-added language. - -Python parity: `get_language_params(code)`. Returns `undefined` if the -code is unknown or the language has no params set — no exception path. - -#### Signature - -```typescript -getLanguageParams(code: string): Record | undefined -``` - -#### Parameters - - - Language code as previously passed to [addLanguage](/docs/sdk-reference/reference/typescript/prefabs/faq-bot-agent#add-language). - - -#### Returns - -`Record | undefined` — The params dict if set, `undefined` otherwise (including when the code is unknown). - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 760. - -*** - -### getMcpServers - -Get configured MCP servers (read-only copy). - -#### Signature - -```typescript -getMcpServers(): Record[] -``` - -#### Returns - -`Record[]` - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1171. - -*** - -### getName - -Get the agent's display name. - -#### Signature - -```typescript -getName(): string -``` - -#### Returns - -`string` — The agent name string. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1559. - -*** - -### getPostPrompt - -Get the post-prompt text, if one has been set. - -#### Signature - -```typescript -getPostPrompt(): string | null -``` - -#### Returns - -`string | null` — The post-prompt string, or null if not configured. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 548. - -*** - -### getPrompt - -Get the fully rendered main prompt text. - -#### Signature - -```typescript -getPrompt(): string -``` - -#### Returns - -`string` — The assembled prompt string. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 520. - -*** - -### getPromptPom - -Get the raw POM (Prompt Object Model) structure as an array of section data objects, -when the agent is in POM mode and has at least one section. - -Matches Python `get_prompt()` which returns `Union[str, List[Dict]]` — a raw list when -in POM mode (via `pom.to_list()` / `pom.render_dict()`), or a string otherwise. -The TS `getPrompt()` always returns a string (rendered Markdown), so this companion -method exposes the raw POM structure for callers that need it for serialisation or -inspection (e.g. skills that inspect prompt sections). - -#### Signature - -```typescript -getPromptPom(): Record[] | null -``` - -#### Returns - -`Record[] | null` — An array of POM section data objects, or null if not in POM mode or POM is empty. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 536. - -*** - -### getRawPrompt - -Get the raw prompt text whatever `setPromptText` stored, or null when -no raw prompt has been set. - -Matches Python `PromptManager.get_raw_prompt()` which returns the raw -stored string or `None`. Use this instead of `getPrompt()` when you -need the unrendered text rather than the POM-rendered Markdown. - -#### Signature - -```typescript -getRawPrompt(): string | null -``` - -#### Returns - -`string | null` — The raw prompt string, or null if not set. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 562. - -*** - -### getRegisteredTools - -Get a summary of all registered tools with their names, descriptions, and -parameter schemas. Lifted from AgentBase so the swaig-test CLI can list -tools on a non-AgentBase SWMLService target (sidecar / standalone SWAIG -host). - -#### Signature - -```typescript -getRegisteredTools(): { description: string; name: string; parameters: Record }[] -``` - -#### Returns - -`{ description: string; name: string; parameters: Record }[]` — Array of tool descriptors. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 557. - -*** - -### getTool - -Look up a registered SwaigFunction by name. Lifted from AgentBase so -`swaig-test --exec ` works against a non-AgentBase SWMLService -target. - -#### Signature - -```typescript -getTool(name: string): SwaigFunction | undefined -``` - -#### Parameters - - - The tool name to search for. - - -#### Returns - -`SwaigFunction | undefined` — The SwaigFunction instance, or undefined if not found or not a SwaigFunction. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 581. - -*** - -### getTools - -Public access to the list of registered tools. - -In Python, `define_tools()` is public and returns `List[SWAIGFunction]`. -In TypeScript, `defineTools()` is a protected setup hook (void). This -method provides the equivalent public "get all tools" capability. - -#### Signature - -```typescript -getTools(): SwaigFunction[] -``` - -#### Returns - -`SwaigFunction[]` — Array of all registered SwaigFunction instances. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 371. - -*** - -### handleMcpRequest - -Handle an MCP JSON-RPC 2.0 request. Returns the response object. - -#### Signature - -```typescript -handleMcpRequest( - body: Record -): Promise> -``` - -#### Parameters - - - -#### Returns - -`Promise>` - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1204. - -*** - -### hasFunction - -Whether a SWAIG function with the given name is registered. -(Python parity: `ToolRegistry.has_function`.) - -#### Signature - -```typescript -hasFunction(name: string): boolean -``` - -#### Parameters - - - -#### Returns - -`boolean` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 517. - -*** - -### hasSkill - -Check whether a skill with the given name is registered. - -Accepts a typed [SkillNameOrString](/docs/sdk-reference/reference/typescript/skills/skill-name#skill-name-or-string) so built-in names autocomplete -and a typo is a compile-time error; any other string is still accepted -(custom skills / parity with Python's bare-`str` `has_skill`). - -#### Signature - -```typescript -hasSkill(skillName: SkillNameOrString): boolean -``` - -#### Parameters - - - The skill name to check. - - -#### Returns - -`boolean` — True if a skill with that name exists. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1676. - -*** - -### hasTool - -Whether a tool with the given name is registered. - -#### Signature - -```typescript -hasTool(name: string): boolean -``` - -#### Parameters - - - -#### Returns - -`boolean` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 511. - -*** - -### isMcpServerEnabled - -Check if MCP server endpoint is enabled. - -#### Signature - -```typescript -isMcpServerEnabled(): boolean -``` - -#### Returns - -`boolean` - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1166. - -*** - -### listSkills - -List all registered skills with their names, instance IDs, and initialization status. - -#### Signature - -```typescript -listSkills(): { initialized: boolean; instanceId: string; name: string }[] -``` - -#### Returns - -`{ initialized: boolean; instanceId: string; name: string }[]` — Array of skill descriptors. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1662. - -*** - -### listToolNames - -List registered tool names in insertion order (Map preserves it). - -#### Signature - -```typescript -listToolNames(): string[] -``` - -#### Returns - -`string[]` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 545. - -*** - -### manualSetProxyUrl - -Manually set the proxy base URL used for webhook URL generation. - -#### Signature - -```typescript -manualSetProxyUrl(url: string): this -``` - -#### Parameters - - - The external-facing base URL (trailing slashes are stripped). - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1754. - -*** - -### onDebugEvent - -Lifecycle hook called when a debug event webhook is received. Override in subclasses. - -#### Signature - -```typescript -onDebugEvent(_event: Record): void | Promise -``` - -#### Parameters - - - The debug event payload. - - -#### Returns - -`void | Promise` - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1970. - -*** - -### onFunctionCall - -Hook called before each SWAIG function execution. Override in subclasses. - -**Behavioral note:** In the Python SDK, `on_function_call` IS the dispatcher -— it retrieves and executes the function, returning the result. In TypeScript, -`fn.execute()` is called separately after this hook. However, if this method -returns a non-void value, it is used as the result and the default execution -is skipped, enabling dispatch interception parity with Python. - -#### Signature - -```typescript -onFunctionCall( - _name: string, - _args: Record, - _rawData: Record -): void | Record | Promise> -``` - -#### Parameters - - - Name of the function about to execute. - - - - Parsed arguments for the function. - - - - The full raw SWAIG request payload. - - -#### Returns - -`void | Record | Promise>` — Optionally a result dict to short-circuit default execution, or void/undefined to proceed normally. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1999. - -*** - -### onRequest - -Lifecycle hook called when SWML is requested. Default delegates to -[onSwmlRequest](/docs/sdk-reference/reference/typescript/prefabs/faq-bot-agent#on-swml-request) and returns its result. Subclasses typically -override `onSwmlRequest` rather than this method. - -Matches Python `WebMixin.on_request(request_data, callback_path)`. The -cross-language API is the two-arg form; the Hono `context` argument is -a TypeScript-side extra preserved for callers that already have it but -is not part of the audited surface. - -#### Signature - -```typescript -onRequest( - requestData?: Record | null, - callbackPath?: string | null -): void | Record | Promise> -``` - -#### Parameters - - - The parsed request body. - - - - Optional callback path from the request. - - -#### Returns - -`void | Record | Promise>` — Optionally a dict of SWML modifications, or undefined for default rendering. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1935. - -*** - -### onSummary - -Process the interaction summary returned at the end of a call. -Logs structured summaries as JSON. Subclasses may override to persist or process. - -#### Signature - -```typescript -onSummary( - summary: Record | null, - _rawData: Record -): void | Promise -``` - -#### Parameters - - - - - -#### Returns - -`void | Promise` - -#### Source - -[`src/prefabs/FAQBotAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/FAQBotAgent.ts) - -Line 376. - -*** - -### onSwmlRequest - -Lifecycle hook called on every SWML request before rendering. Override in subclasses. - -May optionally return a modification dict that will be merged into the -rendered SWML document (matching Python's `Optional[dict]` return type). - -Matches Python `on_swml_request(request_data, callback_path, request)` — the third -parameter is the FastAPI `Request` in Python; here it is the raw Hono context object -so that subclasses can access query parameters (`context.req.query()`), raw request -headers (`context.req.raw.headers`), etc. - -#### Signature - -```typescript -onSwmlRequest( - _rawData: Record, - _callbackPath?: string, - _context?: any -): void | Record | Promise> -``` - -#### Parameters - - - The parsed request body. - - - - Optional callback path from the request. - - - - The raw Hono context object (c), providing access to headers and query params. - - -#### Returns - -`void | Record | Promise>` — Optionally a dict of SWML modifications, or void. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1958. - -*** - -### promptAddSection - -Add a new section to the prompt with optional body, bullets, and subsections. - -#### Signature - -```typescript -promptAddSection(title: string, opts?: { ...5 fields }): this -``` - -#### Parameters - - - Section heading. - - - - Optional section content including body text, bullet points, and subsections. - - - - - - - - - - - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 467. - -*** - -### promptAddSubsection - -Add a subsection under an existing prompt section. - -#### Signature - -```typescript -promptAddSubsection( - parentTitle: string, - title: string, - opts?: { ...2 fields } -): this -``` - -#### Parameters - - - Title of the parent section. - - - - Title of the new subsection. - - - - Optional body text and bullet points for the subsection. - - - - - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 502. - -*** - -### promptAddToSection - -Append content to an existing prompt section. - -#### Signature - -```typescript -promptAddToSection(title: string, opts?: { ...3 fields }): this -``` - -#### Parameters - - - Title of the section to append to. - - - - Content to add: body text, a single bullet, or multiple bullets. - - - - - - - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 487. - -*** - -### promptHasSection - -Check whether a prompt section with the given title exists. - -#### Signature - -```typescript -promptHasSection(title: string): boolean -``` - -#### Parameters - - - Section title to look for. - - -#### Returns - -`boolean` — True if the section exists. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 512. - -*** - -### registerAdditionalRoutes - -Extension point: register additional Hono routes after SWMLService -mounts /health, /ready, /swaig, and the main route. AgentBase uses -this to add /post\_prompt, /check\_for\_input, /debug\_events, /mcp. - -#### Signature - -```typescript -registerAdditionalRoutes(_app: Hono): void -``` - -#### Parameters - - - -#### Returns - -`void` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 604. - -*** - -### registerRoutingCallback - -Register a callback at a specific HTTP path that decides how to route an -incoming request. - -When called, the endpoint at `path` will invoke `callback` with the parsed -request body. If `callback` returns a non-empty route string the server -responds with `{ action: "redirect", route }` so the platform can forward the -request to the right agent. If `callback` returns `null` / `undefined` the -agent's own SWML is returned instead (normal processing). - -Mirrors Python `swml_service.register_routing_callback` / -`web_mixin.register_routing_callback`. - -#### Signature - -```typescript -registerRoutingCallback(callback: RoutingCallback, path: string = '/sip'): this -``` - -#### Parameters - - - Function receiving the parsed request body and returning a route string to redirect, or null/undefined for normal processing. - - - - HTTP path where this callback endpoint is registered (default: '/sip'). - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1102. - -*** - -### registerSipUsername - -Register a SIP username to route to this agent. - -#### Signature - -```typescript -registerSipUsername(username: string): this -``` - -#### Parameters - - - The SIP username to register. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1040. - -*** - -### registerSwaigFunction - -Register a SwaigFunction instance or a raw function descriptor (DataMap). - -#### Signature - -```typescript -registerSwaigFunction(fn: Record | SwaigFunction): this -``` - -#### Parameters - - - -#### Returns - -`this` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 472. - -*** - -### registerVerbHandler - -Register a custom verb handler. -Mirrors Python's `register_verb_handler()`. - -#### Signature - -```typescript -registerVerbHandler(handler: SWMLVerbHandler): void -``` - -#### Parameters - - - The verb handler to register. - - -#### Returns - -`void` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 726. - -*** - -### removeFunction - -Remove a registered SWAIG function. Returns true when removed, -false when not found. (Python parity: -`ToolRegistry.remove_function`.) - -#### Signature - -```typescript -removeFunction(name: string): boolean -``` - -#### Parameters - - - -#### Returns - -`boolean` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 540. - -*** - -### removeSkill - -Remove a previously added skill by its instance ID. - -#### Signature - -```typescript -removeSkill(instanceId: string): Promise -``` - -#### Parameters - - - The unique instance ID of the skill to remove. - - -#### Returns - -`Promise` — True if the skill was found and removed. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1654. - -*** - -### removeSkillByName - -Remove a skill by its name (Python parity). - -Python's `remove_skill(skill_name)` removes by skill name. -The existing `removeSkill(instanceId)` removes by instance ID. -This method provides name-based removal for cross-SDK parity. - -#### Signature - -```typescript -removeSkillByName(skillName: string): Promise -``` - -#### Parameters - - - The skill name to remove. - - -#### Returns - -`Promise` — True if a skill with that name was found and removed. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1690. - -*** - -### renderDocument - -Render the SWML document as a JSON string. -Mirrors Python's `render_document()`. - -#### Signature - -```typescript -renderDocument(): string -``` - -#### Returns - -`string` — JSON-encoded SWML document. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 715. - -*** - -### renderSwml - -Render the complete SWML document by assembling all 5 phases: pre-answer, answer, -post-answer, AI, and post-AI verbs. - -#### Signature - -```typescript -renderSwml(callId?: string, modifications?: Record): string -``` - -#### Parameters - - - Optional call ID to use for session tokens; auto-generated if omitted. - - - - Optional dict returned from `onSwmlRequest` to merge into the AI verb config before rendering. Matches Python's `_render_swml(modifications)` semantics: `global_data` is deep-merged; all other keys override the AI config directly. - - -#### Returns - -`string` — The rendered SWML document as a JSON string. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 2019. - -*** - -### resetContexts - -Remove all contexts, returning the agent to a no-contexts state. - -This is a convenience wrapper around `defineContexts().reset()`. -Use it in a dynamic config callback when you need to rebuild -contexts from scratch for a specific request. - -#### Signature - -```typescript -resetContexts(): this -``` - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 625. - -*** - -### resetDocument - -Reset the SWML document to an empty state. -Mirrors Python's `reset_document()`. - -#### Signature - -```typescript -resetDocument(): this -``` - -#### Returns - -`this` — This service for chaining. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 679. - -*** - -### run - -Alias for [serve](/docs/sdk-reference/reference/typescript/prefabs/faq-bot-agent#serve). Starts the HTTP server. - -#### Signature - -```typescript -run(opts?: { ...2 fields }): Promise -``` - -#### Parameters - - - Optional host and port overrides. - - - - - - -#### Returns - -`Promise` — A promise that resolves once the server is running. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 2702. - -*** - -### runServerless - -Handle a single serverless invocation (AWS Lambda, Google Cloud Functions, Azure Functions, or CGI). - -Matches Python `run(event, context)` when executed in a serverless environment. Python's -`run()` auto-detects the platform via `get_execution_mode()` and dispatches accordingly; -in TypeScript the serverless path is an **explicit** method so that `run()` keeps its -HTTP-server semantics and callers opt in to serverless dispatch deliberately. - -Platform detection follows the same environment-variable heuristics as Python's -`ServerlessMixin`: `AWS_LAMBDA_FUNCTION_NAME` → Lambda, `K_SERVICE` → GCF, -`FUNCTIONS_WORKER_RUNTIME` → Azure, `GATEWAY_INTERFACE` → CGI. - -Usage in a Lambda handler file: - -```ts -export const handler = (event: any, context: any) => agent.runServerless(event, context); -``` - -#### Signature - -```typescript -runServerless( - event: ServerlessEvent, - context?: unknown, - platform?: "lambda" | "gcf" | "azure" | "cgi" | "auto" -): Promise -``` - -#### Parameters - - - The serverless event payload (Lambda event, GCF request body, etc.). - - - - The serverless context object (Lambda context, Azure context, etc.). - - - - Optional platform override; defaults to 'auto' (environment detection). - - -#### Returns - -`Promise` — The normalized serverless response object. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 2728. - -*** - -### serve - -Start the HTTP server and begin listening for requests. - -Uses `@hono/node-server` under the hood. When run in CLI mode -(`SWAIG_CLI_MODE=true`, set automatically by `npx swaig-test`), this is a -no-op so agent config can be inspected without starting a server. - -#### Signature - -```typescript -serve(opts?: { ...2 fields }): Promise -``` - -#### Parameters - - - Optional host/port overrides. Defaults to the values provided in the constructor options or the `PORT` environment variable. - - - - - - -#### Returns - -`Promise` — A promise that resolves once the server has begun listening. - -#### Examples - -```typescript -const agent = new AgentBase({ name: 'demo', port: 3000 }); -await agent.serve(); -// Or override at runtime: -await agent.serve({ port: 8080, host: '127.0.0.1' }); -``` - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 2679. - -*** - -### setDynamicConfigCallback - -Set a callback invoked on each SWML request to dynamically modify an ephemeral agent copy. - -The callback receives a clone of this agent — mutations apply only to the current -request, so you can vary prompt, tools, languages, params, or global data per call -without affecting the long-lived agent instance. - -#### Signature - -```typescript -setDynamicConfigCallback(cb: DynamicConfigCallback): this -``` - -#### Parameters - - - Callback receiving `(queryParams, bodyParams, headers, agent)` where `agent` is the ephemeral `AgentBase` copy to mutate. May be async. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Examples - -```typescript -agent.setDynamicConfigCallback((query, body, headers, agent) => { - const lang = query.lang ?? 'en'; - if (lang === 'es') { - (agent as AgentBase).setPromptText('Eres un asistente útil.'); - } -}); -``` - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1723. - -*** - -### setFunctionIncludes - -Replace the entire list of function includes. -Each include must have a `url` and `functions` array. - -#### Signature - -```typescript -setFunctionIncludes(includes: FunctionInclude[]): this -``` - -#### Parameters - - - Array of function include objects. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 979. - -*** - -### setGlobalData - -Merge data into the global\_data object passed into the AI configuration. - -Matches Python `set_global_data` which calls `.update()` on the internal dict — -existing keys are preserved; incoming keys overwrite on collision. Skills and -other callers can each contribute keys without clobbering one another. - -If you need to replace the entire object, assign a new agent instance or use -`Object.assign(agent.globalData, {})` to clear first. - -#### Signature - -```typescript -setGlobalData(data: Record): this -``` - -#### Parameters - - - Key-value pairs to merge into global data. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 828. - -*** - -### setInternalFillers - -Set internal fillers for native SWAIG functions. - -Internal fillers are short phrases the AI agent speaks (via TTS) while -an internal/native function is running, so the caller doesn't hear -dead air during transitions or background work. - -Supported function names (matches the SWAIGInternalFiller schema): - -hangup — when the agent is hanging up -check\_time — when checking the time -wait\_for\_user — when waiting for user input -wait\_seconds — during deliberate pauses -adjust\_response\_latency — when adjusting response timing -next\_step — transitioning between steps in prompt.contexts -change\_context — switching between contexts in prompt.contexts -get\_visual\_input — processing visual input (enable\_vision=true) -get\_ideal\_strategy — thinking (enable\_thinking=true) - -Notably NOT supported: change\_step, gather\_submit, or arbitrary -user-defined SWAIG function names. The runtime only honors fillers -for the names listed above; everything else is silently ignored at -the SWML level. This method warns at registration time if you pass -an unknown name so you catch the typo early. - -#### Signature - -```typescript -setInternalFillers( - internalFillers: Record> -): this -``` - -#### Parameters - - - Map of function name to language-keyed filler phrases. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Examples - -```typescript -agent.setInternalFillers({ - next_step: { - 'en-US': ['Moving to the next step...', 'Great, let us continue...'], - 'es': ['Pasando al siguiente paso...'] - }, - check_time: { - 'en-US': ['Let me check the time...'] - } -}); -``` - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 910. - -*** - -### setLanguageParams - -Set (or replace) the per-language `params` dict on an already-added -language. Useful when language entries are built up via [addLanguage](/docs/sdk-reference/reference/typescript/prefabs/faq-bot-agent#add-language) -first and engine-specific tuning is added later (e.g., from a config -loader). - -Python parity: `set_language_params(code, params)`. Passing an empty -object removes the `params` key entirely. Unknown codes are a no-op. - -#### Signature - -```typescript -setLanguageParams(code: string, params: Record): this -``` - -#### Parameters - - - Language code as previously passed to [addLanguage](/docs/sdk-reference/reference/typescript/prefabs/faq-bot-agent#add-language) (e.g. `"en-US"`). - - - - Engine-specific params dict to attach. Empty object removes the key. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 737. - -*** - -### setLanguages - -Replace all configured languages with a new list. - -#### Signature - -```typescript -setLanguages(languages: LanguageConfig[]): this -``` - -#### Parameters - - - Array of language configurations. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 718. - -*** - -### setNativeFunctions - -Set the list of native SWAIG function names (built-in platform functions). - -#### Signature - -```typescript -setNativeFunctions(funcs: string[]): this -``` - -#### Parameters - - - Array of native function names. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 848. - -*** - -### setOnRequestCallback - -Set a callback invoked per-request to dynamically build SWML. -When set, the static SwmlBuilder is ignored and the callback's -returned SwmlBuilder is used instead. - -#### Signature - -```typescript -setOnRequestCallback(cb: OnRequestCallback): this -``` - -#### Parameters - - - Callback receiving query params, body params, and headers. - - -#### Returns - -`this` — This service for chaining. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 850. - -*** - -### setParam - -Set a single AI parameter (e.g. "temperature", "top\_p"). - -#### Signature - -```typescript -setParam(key: string, value: unknown): this -``` - -#### Parameters - - - Parameter name. - - - - Parameter value. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 800. - -*** - -### setParams - -Merge multiple AI parameters into the existing params object. - -#### Signature - -```typescript -setParams(params: Record): this -``` - -#### Parameters - - - Key-value pairs to merge. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 810. - -*** - -### setPostPrompt - -Set the post-prompt text evaluated after the call ends. - -#### Signature - -```typescript -setPostPrompt(text: string): this -``` - -#### Parameters - - - The post-prompt text to use. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 456. - -*** - -### setPostPromptLlmParams - -Merge LLM-specific parameters into the post-prompt configuration. - -#### Signature - -```typescript -setPostPromptLlmParams(params: Record): this -``` - -#### Parameters - - - Key-value LLM parameters to merge. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1001. - -*** - -### setPostPromptUrl - -Override the default post-prompt webhook URL with a custom one. - -#### Signature - -```typescript -setPostPromptUrl(url: string): this -``` - -#### Parameters - - - The custom post-prompt URL. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1847. - -*** - -### setPromptLlmParams - -Merge LLM-specific parameters into the main prompt configuration (e.g. model, temperature). - -#### Signature - -```typescript -setPromptLlmParams(params: Record): this -``` - -#### Parameters - - - Key-value LLM parameters to merge. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 991. - -*** - -### setPromptPom - -Set the prompt as a POM (Prompt Object Model) dictionary. - -Replaces the current POM sections with the provided structured data. -Each entry should have `title`, and optionally `body`, `bullets`, -`numbered`, `numberedBullets`, and `subsections`. - -#### Signature - -```typescript -setPromptPom(pom: Record[]): this -``` - -#### Parameters - - - Array of POM section dictionaries. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Throws - -- Error if POM mode is not enabled (`usePom: false`). - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 577. - -*** - -### setPromptText - -Set the main system prompt text for the AI. - -#### Signature - -```typescript -setPromptText(text: string): this -``` - -#### Parameters - - - The prompt text to use. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 446. - -*** - -### setPronunciations - -Replace all pronunciation rules with a new list. - -#### Signature - -```typescript -setPronunciations(rules: PronunciationRule[]): this -``` - -#### Parameters - - - Array of pronunciation rule objects. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 786. - -*** - -### setupGracefulShutdown - -Register process signal handlers for clean Kubernetes/Docker shutdown. -Handles SIGTERM and SIGINT, waits for a timeout, then exits. - -**Modifiers:** `static` - -#### Signature - -```typescript -setupGracefulShutdown(opts?: { ...1 fields }): void -``` - -#### Parameters - - - Optional timeout in milliseconds (default 5000). - - - - -#### Returns - -`void` - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 2751. - -*** - -### setWebHookUrl - -Override the default SWAIG webhook URL with a custom one. - -#### Signature - -```typescript -setWebHookUrl(url: string): this -``` - -#### Parameters - - - The custom webhook URL. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1837. - -*** - -### stop - -Stop the HTTP server. -Mirrors Python's `stop()`. - -#### Signature - -```typescript -stop(): void -``` - -#### Returns - -`void` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 1009. - -*** - -### swaigPreDispatch - -Extension point: invoked between argument parsing and function dispatch -on POST /swaig. Returns \[target, shortCircuit]: when shortCircuit is -non-null, it's returned directly without dispatching. AgentBase may -override to add session-token validation or ephemeral dynamic-config. - -#### Signature - -```typescript -swaigPreDispatch( - _requestData: Record, - _funcName: string -): [SWMLService, unknown] -``` - -#### Parameters - - - - - -#### Returns - -`[SWMLService, unknown]` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 592. - -*** - -### updateGlobalData - -Merge additional entries into the existing global\_data object. - -#### Signature - -```typescript -updateGlobalData(data: Record): this -``` - -#### Parameters - - - Key-value pairs to merge into global data. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 838. - -*** - -### validateBasicAuth - -Override to add custom basic-auth validation logic beyond credential matching. - -#### Signature - -```typescript -validateBasicAuth( - _username: string, - _password: string -): boolean | Promise -``` - -#### Parameters - - - The username from the request. - - - - The password from the request. - - -#### Returns - -`boolean | Promise` — True if the credentials are valid; false to reject the request. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1980. - -*** - -### validateToolToken - -Validate a tool-call token for the given function. - -Mirrors Python reference `core/mixins/state_mixin.py validate_tool_token`: - -1. Unknown function → `false`. -2. Registered but non-secure → `true` without consulting SessionManager - (non-secure tools never require a token). -3. Raw-dict descriptors (e.g. DataMap) are treated as secure, matching - Python's `isinstance(func, dict) → is_secure = True` branch. -4. Missing token on a secure tool → `false`. -5. Otherwise delegate to `SessionManager.validateToolToken`. - -Divergences from the Python reference: - -- No debug-logging branch: `AgentBase` does not expose an agent-level - debug-mode flag, so the per-call debug telemetry Python emits is - omitted. `SessionManager` still logs its own validation outcomes. -- No token-derived call-id fallback: `SessionManager.debugToken` - truncates the embedded call-id for log safety, so an extracted value - cannot be round-tripped back through `validateToolToken`. The caller - is expected to supply a non-empty `callId`; an empty one is forwarded - unchanged and the underlying validator will reject it. - -#### Signature - -```typescript -validateToolToken(functionName: string, token: string, callId: string): boolean -``` - -#### Parameters - - - - - - - -#### Returns - -`boolean` - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1455. - -## Functions - -### createFAQBotAgent - -Factory function that creates and returns a new FAQBotAgent. - -#### Signature - -```typescript -createFAQBotAgent(config: FAQBotConfig): FAQBotAgent -``` - -#### Parameters - - - Configuration for the FAQ bot agent. - - -#### Returns - -`FAQBotAgent` — A configured FAQBotAgent instance. - -#### Source - -[`src/prefabs/FAQBotAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/FAQBotAgent.ts) - -Line 411. - -## Interfaces - -### FAQBotConfig - -Configuration for the [FAQBotAgent](/docs/sdk-reference/reference/typescript/prefabs/faq-bot-agent). - -#### Signature - -```typescript -interface FAQBotConfig -``` - -#### Properties - - - Additional AgentBase options forwarded to super(). - - - - Message spoken when no FAQ matches the query. - - - - Phone number to transfer to on escalation. If not set, escalate tool is not registered. - - - - List of FAQ entries for the knowledge base. - - - - Agent display name (defaults to `"faq_bot"`). - - - - Custom personality description for the agent's "Personality" prompt section. - - - - HTTP route for this agent (defaults to `"/faq"`). - - - - Whether to suggest related questions alongside a match. Default `true`. - - - - Minimum match score (0-1) for an FAQ to be considered a match. Default 0.5. - - -#### Source - -[`src/prefabs/FAQBotAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/FAQBotAgent.ts) - -Line 30. - -*** - -### FAQEntry - -A single frequently-asked-question entry consumed by [FAQBotAgent](/docs/sdk-reference/reference/typescript/prefabs/faq-bot-agent). - -#### Signature - -```typescript -interface FAQEntry -``` - -#### Properties - - - The answer to provide when this FAQ matches. - - - - Taxonomy categories this FAQ belongs to (used for filtering and hints). - - - - Additional keywords to boost matching accuracy. - - - - The representative question text. - - -#### Source - -[`src/prefabs/FAQBotAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/FAQBotAgent.ts) - -Line 18. - -## Source - -[`src/prefabs/FAQBotAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/FAQBotAgent.ts) - -Line 83. diff --git a/fern/products/sdk-reference/typescript/prefabs/index.mdx b/fern/products/sdk-reference/typescript/prefabs/index.mdx deleted file mode 100644 index a7e2c72470..0000000000 --- a/fern/products/sdk-reference/typescript/prefabs/index.mdx +++ /dev/null @@ -1,25 +0,0 @@ ---- -slug: "/reference/typescript/prefabs" -title: "prefabs" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "module" - language: "typescript" - qualified_name: "prefabs" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/index.ts" ---- -# `prefabs` - -## Signature - -```typescript -module prefabs -``` - -## Source - -[`src/prefabs/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/index.ts) - -Line 1. diff --git a/fern/products/sdk-reference/typescript/prefabs/info-gatherer-agent/index.mdx b/fern/products/sdk-reference/typescript/prefabs/info-gatherer-agent/index.mdx deleted file mode 100644 index 56f7b78c8e..0000000000 --- a/fern/products/sdk-reference/typescript/prefabs/info-gatherer-agent/index.mdx +++ /dev/null @@ -1,3825 +0,0 @@ ---- -slug: "/reference/typescript/prefabs/info-gatherer-agent" -title: "InfoGathererAgent" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "prefabs.InfoGathererAgent" - module: "prefabs" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/InfoGathererAgent.ts" ---- -# `InfoGathererAgent` - -Prefab agent that gathers caller information one question at a time. - -Supports two modes: - -- **Static** — provide `questions` at construction; the same questions are - asked on every call. -- **Dynamic** — leave `questions` unset and register a callback via - `questionCallback` (or `setQuestionCallback()`); the callback decides which - questions to ask per incoming call based on query params, body, or headers. - -## Signature - -```typescript -class InfoGathererAgent extends AgentBase -``` - -## Inheritance - -**Extends:** [AgentBase](/docs/sdk-reference/reference/typescript/agent-base) - -## Examples - - - - ```typescript - import { InfoGathererAgent } from '@signalwire/sdk'; - - const agent = new InfoGathererAgent({ - questions: [ - { key_name: 'name', question_text: 'What is your name?' }, - { key_name: 'email', question_text: 'What is your email address?', confirm: true }, - { key_name: 'issue', question_text: 'How can we help?' }, - ], - }); - - await agent.serve({ port: 3000 }); - ``` - - - - ```typescript - const agent = new InfoGathererAgent({ - questionCallback: async (query) => { - if (query.intake === 'medical') { - return [ - { key_name: 'dob', question_text: 'Date of birth?' }, - { key_name: 'insurance_id', question_text: 'Insurance member ID?' }, - ]; - } - return [{ key_name: 'message', question_text: 'How can I help?' }]; - }, - }); - ``` - - - -## Properties - - - Unique identifier for this agent instance. - - - - - - - - Domain name for SSL. Mirrors Python's `self.domain`. - - - - Check if full JSON Schema validation is enabled. Mirrors Python's `@property full_validation_enabled`. - - - - Host the server binds to. - - - - Structured logger instance for this agent. Override the inherited SWMLService logger with an AgentBase-tagged one. - - - - Service display name. - - - - Public accessor for the native functions list. Python exposes `self.native_functions` as a public read/write attribute. - - - - - - Public accessor for the agent's POM as a [PromptObjectModel](/docs/sdk-reference/reference/typescript/pom/prompt-object-model) instance. Python parity: `agent.pom` instance attribute (agent\_base.py line 209) is a `signalwire.pom.pom.PromptObjectModel` when `use_pom=True`, or `None` otherwise. This getter returns the equivalent TypeScript `PromptObjectModel` instance — callers can use `addSection`, `findSection`, `renderMarkdown`, `renderXml`, `toJson`, `toYaml` exactly as in Python. The instance returned is a fresh snapshot built from the current `PomBuilder` state, so mutating it does not feed back into the agent's internal builder. To mutate the agent's prompt, use `promptAddSection` / `promptAddToSection` / `promptAddSubsection`. - - - - Port the server binds to. - - - - Static prompt sections: subclasses can define these declaratively. Each entry is applied via promptAddSection() in the constructor. - - - - Public accessor for the PromptManager (POM). Python exposes `self.pom` as a public attribute. This getter provides equivalent access for direct POM manipulation. - - - - HTTP route path. - - - - Schema validation utilities. Mirrors Python's `self.schema_utils`. - - - - Unified security configuration. Mirrors Python's `self.security`. - - - - Public read-only accessor for the SkillManager. Python exposes `self.skill_manager` as a public attribute. This getter provides equivalent read access. - - - - Path to SSL certificate. Mirrors Python's `self.ssl_cert_path`. - - - - Whether SSL is enabled. Mirrors Python's `self.ssl_enabled`. - - - - Path to SSL private key. Mirrors Python's `self.ssl_key_path`. - - - - The complete set of internal SWAIG function names that accept fillers, matching the SWAIGInternalFiller schema definition. Any name outside this set is silently ignored by the runtime — addInternalFiller / setInternalFillers warn if you pass an unknown name. - - - - - - - - Custom verb handler registry. Mirrors Python's `self.verb_registry`. - - -## Methods - -### addAnswerVerb - -Configure the answer verb (phase 2) with optional settings. - -#### Signature - -```typescript -addAnswerVerb(config?: Record): this -``` - -#### Parameters - - - Optional answer verb configuration. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1501. - -*** - -### addFunctionInclude - -Add a remote SWAIG function include reference. - -#### Signature - -```typescript -addFunctionInclude( - url: string, - functions: string[], - metaData?: Record -): this -``` - -#### Parameters - - - URL of the remote SWAIG endpoint. - - - - Function names available at that endpoint. - - - - Optional metadata to attach to the include. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 966. - -*** - -### addHint - -Add a single speech-recognition hint. - -#### Signature - -```typescript -addHint(hint: string): this -``` - -#### Parameters - - - Word or phrase to boost in speech recognition. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 653. - -*** - -### addHints - -Add multiple speech-recognition hints at once. - -#### Signature - -```typescript -addHints(hints: string[]): this -``` - -#### Parameters - - - Array of words or phrases to boost. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 663. - -*** - -### addInternalFiller - -Add internal filler phrases for a single internal function and language. - -See [setInternalFillers](/docs/sdk-reference/reference/typescript/prefabs/info-gatherer-agent#set-internal-fillers) for the complete list of supported -functionName values and an explanation of what fillers do. - -#### Signature - -```typescript -addInternalFiller( - functionName: string, - languageCode: string, - fillers: string[] -): this -``` - -#### Parameters - - - One of the supported internal function names (see SUPPORTED\_INTERNAL\_FILLER\_NAMES). Names outside the supported set log a warning and are ignored by the runtime. - - - - BCP-47 language code for the fillers (e.g. 'en-US'). - - - - Array of filler phrases. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 943. - -*** - -### addLanguage - -Add a supported language to the AI configuration. - -#### Signature - -```typescript -addLanguage(config: LanguageConfig): this -``` - -#### Parameters - - - Language configuration including name, code, voice, and optional fillers. `params` may be set to attach engine-specific tuning (voice stability, similarity boost, model knobs, etc.); only emitted into SWML when non-empty so existing entries stay byte-identical when no params are passed (Python ai\_config\_mixin.py `add_language`). - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 694. - -*** - -### addMcpServer - -Add an external MCP server for tool discovery and invocation. -Tools are discovered via MCP protocol at session start and added to the AI's tool list. - -#### Signature - -```typescript -addMcpServer(url: string, opts?: { ...3 fields }): this -``` - -#### Parameters - - - MCP server HTTP endpoint URL - - - - Optional configuration: headers, resources, resourceVars - - - - - - - - -#### Returns - -`this` — This agent instance for chaining - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1146. - -*** - -### addPatternHint - -Add a pattern-based speech-recognition hint with find-and-replace behavior. - -#### Signature - -```typescript -addPatternHint(opts: { ...4 fields }): this -``` - -#### Parameters - - - Pattern hint configuration with a descriptive hint label, regex pattern, replacement string, and optional case-insensitive flag. - - - - - - - - - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 674. - -*** - -### addPostAiVerb - -Add a SWML verb to execute after the AI verb (phase 5). - -#### Signature - -```typescript -addPostAiVerb(verbName: string, config: Record): this -``` - -#### Parameters - - - Name of the SWML verb. - - - - Verb configuration object. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1523. - -*** - -### addPostAnswerVerb - -Add a SWML verb to execute after the answer phase but before the AI verb (phase 3). - -#### Signature - -```typescript -addPostAnswerVerb( - verbName: string, - config: number | Record -): this -``` - -#### Parameters - - - Name of the SWML verb. - - - - Verb configuration object. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1512. - -*** - -### addPreAnswerVerb - -Add a SWML verb to execute before the answer phase (phase 1). - -#### Signature - -```typescript -addPreAnswerVerb( - verbName: string, - config: number | Record -): this -``` - -#### Parameters - - - Name of the SWML verb (e.g. "play", "record"). - - - - Verb configuration object. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1491. - -*** - -### addPronunciation - -Add a pronunciation override rule for the TTS engine. - -#### Signature - -```typescript -addPronunciation(rule: PronunciationRule): this -``` - -#### Parameters - - - Pronunciation rule specifying the text to replace and its substitute. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 774. - -*** - -### addSection - -Add a new named section to the SWML document. -Mirrors Python's `add_section()`. - -#### Signature - -```typescript -addSection(sectionName: string): this -``` - -#### Parameters - - - Name of the section to create. - - -#### Returns - -`this` — This service for chaining. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 653. - -*** - -### addSkill - -Add a skill to this agent, registering its tools, prompt sections, hints, and global data. - -#### Signature - -```typescript -addSkill(skill: SkillBase): Promise -``` - -#### Parameters - - - The skill instance to add. - - -#### Returns - -`Promise` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1570. - -*** - -### addSkillByName - -Add a skill by its registered name, looking it up in the global SkillRegistry. - -Matches Python's `add_skill(skill_name, params)` which loads skills by string -name via the SkillManager registry. Throws a `ValueError`-equivalent if the -skill name is not found in the registry. - -Accepts a typed [SkillNameOrString](/docs/sdk-reference/reference/typescript/skills/skill-name#skill-name-or-string): one of the built-in -`SkillName` values (autocompleted, with a typo caught at compile -time) or any other string for custom / third-party skills. The value is -forwarded to the registry unchanged — the typing is erased at runtime, so -this matches Python's bare-`str` `add_skill(skill_name, params)`. - -#### Signature - -```typescript -addSkillByName( - skillName: SkillNameOrString, - params?: SkillConfig -): Promise -``` - -#### Parameters - - - The name the skill was registered under in the SkillRegistry. - - - - Optional configuration parameters forwarded to the skill factory. - - -#### Returns - -`Promise` — This agent instance for chaining. - -#### Throws - -- Error if no skill with the given name is registered. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1641. - -*** - -### addSwaigQueryParams - -Add extra query parameters appended to all SWAIG webhook URLs. - -#### Signature - -```typescript -addSwaigQueryParams(params: Record): this -``` - -#### Parameters - - - Key-value pairs to append as query parameters. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1733. - -*** - -### addVerb - -Add a verb to the SWML document. - -#### Signature - -```typescript -addVerb(name: string, config: unknown): this -``` - -#### Parameters - - - Verb name (e.g., 'answer', 'play', 'hangup'). - - - - Verb configuration. - - -#### Returns - -`this` — This service for chaining. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 642. - -*** - -### addVerbToSection - -Add a verb to a specific named section. -Mirrors Python's `add_verb_to_section()`. - -#### Signature - -```typescript -addVerbToSection(sectionName: string, verbName: string, config: unknown): this -``` - -#### Parameters - - - Target section name (auto-created if missing). - - - - Verb name. - - - - Verb configuration. - - -#### Returns - -`this` — This service for chaining. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 669. - -*** - -### asRouter - -Return this agent's Hono app for mounting as a sub-router in an AgentServer. - -#### Signature - -```typescript -asRouter(): Hono -``` - -#### Returns - -`Hono` — The Hono application instance. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 2656. - -*** - -### autoMapSipUsernames - -Automatically register common SIP usernames based on this agent's -name and route. Derives cleaned variants (alphanumeric + underscore) -and registers each via `registerSipUsername()`. - -Port of Python's `auto_map_sip_usernames()`: - -- Registers a cleaned version of the agent name -- Registers a cleaned version of the route (if different from name) -- For names longer than 3 characters, also registers a vowel-stripped variant - -#### Signature - -```typescript -autoMapSipUsernames(): this -``` - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1058. - -*** - -### buildSwmlForRequest - -Service-side SWML-builder hook. Subclasses return a `SwmlBuilder` -to fully replace the document for this request, or `null` to fall -through to `setOnRequestCallback` or the static builder. - -This is distinct from the WebMixin `onRequest(requestData, -callbackPath)` hook on AgentBase (which mirrors Python's -`on_request -> on_swml_request` modification-merge contract). -Use this hook when you want to swap the entire SWML builder; use -`onRequest` / `onSwmlRequest` on AgentBase when you want to merge -targeted modifications into the rendered document. - -Default implementation returns `null` (no-op). - -#### Signature - -```typescript -buildSwmlForRequest( - _queryParams: Record, - _bodyParams: Record, - _headers: Record, - _callbackPath?: string -): SwmlBuilder | null -``` - -#### Parameters - - - - - - - - - -#### Returns - -`SwmlBuilder | null` — A `SwmlBuilder` whose document is sent as the response, or `null` to delegate to the next handler in the chain. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 834. - -*** - -### clearPostAiVerbs - -Remove all post-AI verbs. - -#### Signature - -```typescript -clearPostAiVerbs(): this -``` - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1550. - -*** - -### clearPostAnswerVerbs - -Remove all post-answer verbs. - -#### Signature - -```typescript -clearPostAnswerVerbs(): this -``` - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1541. - -*** - -### clearPreAnswerVerbs - -Remove all pre-answer verbs. - -#### Signature - -```typescript -clearPreAnswerVerbs(): this -``` - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1532. - -*** - -### clearSwaigQueryParams - -Clear all SWAIG query parameters. - -#### Signature - -```typescript -clearSwaigQueryParams(): this -``` - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1742. - -*** - -### constructor - -Create an InfoGathererAgent. - -#### Signature - -```typescript -constructor(config: InfoGathererConfig = {}): InfoGathererAgent -``` - -#### Parameters - - - Either `questions` (static mode) or leave omitted and use `questionCallback` / `setQuestionCallback()` (dynamic mode). - - -#### Returns - -`InfoGathererAgent` - -#### Source - -[`src/prefabs/InfoGathererAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/InfoGathererAgent.ts) - -Line 116. - -*** - -### createToolToken - -Mint a per-call SWAIG-function token via the agent's SessionManager. - -Mirrors Python reference `core/mixins/state_mixin.py _create_tool_token`: -delegates to `SessionManager.createToolToken` and returns an empty -string on any failure (Python catches all exceptions and returns ""). - -#### Signature - -```typescript -createToolToken(toolName: string, callId: string): string -``` - -#### Parameters - - - - - -#### Returns - -`string` - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1475. - -*** - -### defineContexts - -Define or replace the contexts configuration for the AI verb. - -#### Signature - -```typescript -defineContexts( - contexts?: Record | ContextBuilder -): ContextBuilder -``` - -#### Parameters - - - An existing ContextBuilder instance or a plain object; a new ContextBuilder is created if omitted. - - -#### Returns - -`ContextBuilder` — The active ContextBuilder for further configuration. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 604. - -*** - -### defineTool - -Register a SWAIG tool (function) that the AI can invoke during a call. - -#### How this becomes a tool the model sees - -A SWAIG function is **exactly the same concept** as a "tool" in -native OpenAI / Anthropic tool calling. On every LLM turn, the SDK -renders each registered SWAIG function into the OpenAI tool schema: - -```json -{ -"type": "function", -"function": { -"name": "your_name_here", -"description": "your description text", -"parameters": { /* your JSON schema */ } -} -} -``` - -That schema goes to the model in the same API call that produces -the next assistant message. The model reads: - -- the **function `description`** to decide WHEN to call this tool -- each **parameter `description`** (inside the JSON schema) to - decide HOW to fill in each argument - -This means **descriptions are prompt engineering**, not developer -comments. A vague description is the #1 cause of "the model has the -right tool but doesn't call it" failures. - -##### Bad vs good descriptions - -```text -BAD : description: 'Lookup function' -GOOD: description: 'Look up a customer's account details by account -number. Use this BEFORE quoting any account-specific info -(balance, plan, status). Do not use for general product -questions.' - -BAD : parameters: { id: { type: 'string', description: 'the id' } } -GOOD: parameters: { account_number: { type: 'string', description: -'The customer's 8-digit account number, no dashes or spaces. -Ask the user if they don't provide it.' } } -``` - -##### Tool count matters - -LLM tool selection accuracy degrades past ~7-8 simultaneously-active -tools per call. Use Step.setFunctions() to partition tools across -steps so only the relevant subset is active at any moment. - -#### Signature - -```typescript -defineTool(opts: { ...11 fields }): this -``` - -#### Parameters - - - Tool definition including name, description, parameter schema, and handler callback. `description` and per-parameter `description` strings are LLM-facing prompt engineering. - - - - - Additional fields to pass through to the SWAIG function definition (Python `**swaig_fields` equivalent). - - - - - - - - - - - - - - - - - - - - External webhook URL; makes this an externally-hosted tool. - - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1330. - -*** - -### defineTools - -Register the `start_questions` and `submit_answer` SWAIG tools. - -#### Signature - -```typescript -defineTools(): void -``` - -#### Returns - -`void` - -#### Source - -[`src/prefabs/InfoGathererAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/InfoGathererAgent.ts) - -Line 282. - -*** - -### defineTypedTool - -Register a SWAIG tool with a typed handler that receives named parameters -instead of the standard `(args, rawData)` convention. - -The SDK wraps the handler to unpack the args dict into positional params. -If no `parameters` schema is provided, one is inferred from the handler's -source code (parameter names and default values). - -#### Signature - -```typescript -defineTypedTool(opts: { ...9 fields }): this -``` - -#### Parameters - - - Tool definition with a typed handler function. - - - - - - - The typed handler. Receives the AI-extracted arguments as named positional parameters (in declaration order), optionally with a trailing `rawData` record, and returns a SWAIG result. Precisely typed as [TypedToolHandler](/docs/sdk-reference/reference/typescript/type-inference#typed-tool-handler) rather than the bare `Function` so a non-callable — or a callable that returns nothing usable — is a compile-time error. - - - - - - - - - - - - - - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1373. - -*** - -### enableDebugEvents - -Enable debug event webhooks for this agent. - -#### Signature - -```typescript -enableDebugEvents(level: number = 1): this -``` - -#### Parameters - - - Debug verbosity level (defaults to 1). - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1011. - -*** - -### enableDebugRoutes - -Register a callback function that determines routing based on POST data. - -When a routing callback is registered, an endpoint at the specified path -is created in `getApp()`. The callback receives the request body and returns -Enable debug routes for testing and development. - -This is a backward-compatibility stub matching the Python SDK. -In the TypeScript SDK, debug routes (health, ready, debug\_events) -are automatically registered in `getApp()`. - -#### Signature - -```typescript -enableDebugRoutes(): this -``` - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1773. - -*** - -### enableMcpServer - -Expose this agent's tools as an MCP server endpoint at /mcp. -Adds a JSON-RPC 2.0 endpoint that MCP clients (Claude Desktop, other agents) can connect to. - -#### Signature - -```typescript -enableMcpServer(): this -``` - -#### Returns - -`this` — This agent instance for chaining - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1160. - -*** - -### enableSipRouting - -Enable SIP routing for this agent. - -#### Signature - -```typescript -enableSipRouting(autoMap: boolean = true, path: string = '/sip'): this -``` - -#### Parameters - - - When true, automatically map SIP usernames to the agent route (defaults to true). - - - - HTTP path for the SIP routing endpoint (defaults to '/sip'). - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1025. - -*** - -### extractSipUsername - -Extract the SIP username from a request body's call.to field. - -**Modifiers:** `static` - -#### Signature - -```typescript -extractSipUsername(requestBody: Record): string | null -``` - -#### Parameters - - - The parsed request body containing call information. - - -#### Returns - -`string | null` — The extracted SIP username, or null if not found. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1122. - -*** - -### getAllFunctions - -Snapshot of all registered SWAIG functions keyed by name. -(Python parity: `ToolRegistry.get_all_functions`.) - -#### Signature - -```typescript -getAllFunctions(): Record> -``` - -#### Returns - -`Record>` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 529. - -*** - -### getApp - -Get or lazily create the Hono HTTP application with all routes, middleware, auth, and CORS. - -#### Signature - -```typescript -getApp(): Hono -``` - -#### Returns - -`Hono` — The configured Hono application instance. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 2269. - -*** - -### getBasicAuthCredentials - -Get the basic-auth credentials used by this agent. - -#### Signature - - - - ```typescript - getBasicAuthCredentials(includeSource?: false): [string, string] - ``` - - - - ```typescript - getBasicAuthCredentials( - includeSource: true - ): [string, string, "provided" | "environment" | "generated"] - ``` - - - -#### Parameters (Overload 1) - - - When true, a third element indicating the credential source is appended. - - -#### Parameters (Overload 2) - - - When true, a third element indicating the credential source is appended. - - -#### Returns (Overload 1) - -`[string, string]` — A tuple of \[username, password] or \[username, password, source]. - -#### Returns (Overload 2) - -`[string, string, "provided" | "environment" | "generated"]` — A tuple of \[username, password] or \[username, password, source]. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 2794. - -*** - -### getBuilder - -Get the underlying SwmlBuilder for direct manipulation. - -#### Signature - -```typescript -getBuilder(): SwmlBuilder -``` - -#### Returns - -`SwmlBuilder` — The SwmlBuilder instance. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 632. - -*** - -### getContexts - -Get the contexts dictionary as serialised SWML, or null when no -contexts have been defined yet. - -Matches Python `PromptManager.get_contexts()` which returns the -contexts dict or `None`. - -#### Signature - -```typescript -getContexts(): Record | null -``` - -#### Returns - -`Record | null` — Contexts dict, or null when no contexts are defined. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 641. - -*** - -### getDocument - -Get the SWML document as a dictionary. -Alias for `renderSwml()` that matches Python's `get_document()` name. - -#### Signature - -```typescript -getDocument(): Record -``` - -#### Returns - -`Record` — The SWML document. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 706. - -*** - -### getFullUrl - -Get the full external URL of this agent, using the proxy base URL if available. - -#### Signature - -```typescript -getFullUrl(includeAuth: boolean = false): string -``` - -#### Parameters - - - Whether to embed basic-auth credentials in the URL (defaults to false). - - -#### Returns - -`string` — The fully-qualified URL string. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1857. - -*** - -### getFunction - -Get a registered SWAIG function entry, or undefined. -(Python parity: `ToolRegistry.get_function`.) - -#### Signature - -```typescript -getFunction(name: string): Record | SwaigFunction | undefined -``` - -#### Parameters - - - -#### Returns - -`Record | SwaigFunction | undefined` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 523. - -*** - -### getLanguageParams - -Read the per-language `params` dict for a previously-added language. - -Python parity: `get_language_params(code)`. Returns `undefined` if the -code is unknown or the language has no params set — no exception path. - -#### Signature - -```typescript -getLanguageParams(code: string): Record | undefined -``` - -#### Parameters - - - Language code as previously passed to [addLanguage](/docs/sdk-reference/reference/typescript/prefabs/info-gatherer-agent#add-language). - - -#### Returns - -`Record | undefined` — The params dict if set, `undefined` otherwise (including when the code is unknown). - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 760. - -*** - -### getMcpServers - -Get configured MCP servers (read-only copy). - -#### Signature - -```typescript -getMcpServers(): Record[] -``` - -#### Returns - -`Record[]` - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1171. - -*** - -### getName - -Get the agent's display name. - -#### Signature - -```typescript -getName(): string -``` - -#### Returns - -`string` — The agent name string. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1559. - -*** - -### getPostPrompt - -Get the post-prompt text, if one has been set. - -#### Signature - -```typescript -getPostPrompt(): string | null -``` - -#### Returns - -`string | null` — The post-prompt string, or null if not configured. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 548. - -*** - -### getPrompt - -Get the fully rendered main prompt text. - -#### Signature - -```typescript -getPrompt(): string -``` - -#### Returns - -`string` — The assembled prompt string. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 520. - -*** - -### getPromptPom - -Get the raw POM (Prompt Object Model) structure as an array of section data objects, -when the agent is in POM mode and has at least one section. - -Matches Python `get_prompt()` which returns `Union[str, List[Dict]]` — a raw list when -in POM mode (via `pom.to_list()` / `pom.render_dict()`), or a string otherwise. -The TS `getPrompt()` always returns a string (rendered Markdown), so this companion -method exposes the raw POM structure for callers that need it for serialisation or -inspection (e.g. skills that inspect prompt sections). - -#### Signature - -```typescript -getPromptPom(): Record[] | null -``` - -#### Returns - -`Record[] | null` — An array of POM section data objects, or null if not in POM mode or POM is empty. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 536. - -*** - -### getRawPrompt - -Get the raw prompt text whatever `setPromptText` stored, or null when -no raw prompt has been set. - -Matches Python `PromptManager.get_raw_prompt()` which returns the raw -stored string or `None`. Use this instead of `getPrompt()` when you -need the unrendered text rather than the POM-rendered Markdown. - -#### Signature - -```typescript -getRawPrompt(): string | null -``` - -#### Returns - -`string | null` — The raw prompt string, or null if not set. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 562. - -*** - -### getRegisteredTools - -Get a summary of all registered tools with their names, descriptions, and -parameter schemas. Lifted from AgentBase so the swaig-test CLI can list -tools on a non-AgentBase SWMLService target (sidecar / standalone SWAIG -host). - -#### Signature - -```typescript -getRegisteredTools(): { description: string; name: string; parameters: Record }[] -``` - -#### Returns - -`{ description: string; name: string; parameters: Record }[]` — Array of tool descriptors. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 557. - -*** - -### getTool - -Look up a registered SwaigFunction by name. Lifted from AgentBase so -`swaig-test --exec ` works against a non-AgentBase SWMLService -target. - -#### Signature - -```typescript -getTool(name: string): SwaigFunction | undefined -``` - -#### Parameters - - - The tool name to search for. - - -#### Returns - -`SwaigFunction | undefined` — The SwaigFunction instance, or undefined if not found or not a SwaigFunction. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 581. - -*** - -### getTools - -Public access to the list of registered tools. - -In Python, `define_tools()` is public and returns `List[SWAIGFunction]`. -In TypeScript, `defineTools()` is a protected setup hook (void). This -method provides the equivalent public "get all tools" capability. - -#### Signature - -```typescript -getTools(): SwaigFunction[] -``` - -#### Returns - -`SwaigFunction[]` — Array of all registered SwaigFunction instances. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 371. - -*** - -### handleMcpRequest - -Handle an MCP JSON-RPC 2.0 request. Returns the response object. - -#### Signature - -```typescript -handleMcpRequest( - body: Record -): Promise> -``` - -#### Parameters - - - -#### Returns - -`Promise>` - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1204. - -*** - -### hasFunction - -Whether a SWAIG function with the given name is registered. -(Python parity: `ToolRegistry.has_function`.) - -#### Signature - -```typescript -hasFunction(name: string): boolean -``` - -#### Parameters - - - -#### Returns - -`boolean` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 517. - -*** - -### hasSkill - -Check whether a skill with the given name is registered. - -Accepts a typed [SkillNameOrString](/docs/sdk-reference/reference/typescript/skills/skill-name#skill-name-or-string) so built-in names autocomplete -and a typo is a compile-time error; any other string is still accepted -(custom skills / parity with Python's bare-`str` `has_skill`). - -#### Signature - -```typescript -hasSkill(skillName: SkillNameOrString): boolean -``` - -#### Parameters - - - The skill name to check. - - -#### Returns - -`boolean` — True if a skill with that name exists. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1676. - -*** - -### hasTool - -Whether a tool with the given name is registered. - -#### Signature - -```typescript -hasTool(name: string): boolean -``` - -#### Parameters - - - -#### Returns - -`boolean` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 511. - -*** - -### isMcpServerEnabled - -Check if MCP server endpoint is enabled. - -#### Signature - -```typescript -isMcpServerEnabled(): boolean -``` - -#### Returns - -`boolean` - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1166. - -*** - -### listSkills - -List all registered skills with their names, instance IDs, and initialization status. - -#### Signature - -```typescript -listSkills(): { initialized: boolean; instanceId: string; name: string }[] -``` - -#### Returns - -`{ initialized: boolean; instanceId: string; name: string }[]` — Array of skill descriptors. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1662. - -*** - -### listToolNames - -List registered tool names in insertion order (Map preserves it). - -#### Signature - -```typescript -listToolNames(): string[] -``` - -#### Returns - -`string[]` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 545. - -*** - -### manualSetProxyUrl - -Manually set the proxy base URL used for webhook URL generation. - -#### Signature - -```typescript -manualSetProxyUrl(url: string): this -``` - -#### Parameters - - - The external-facing base URL (trailing slashes are stripped). - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1754. - -*** - -### onDebugEvent - -Lifecycle hook called when a debug event webhook is received. Override in subclasses. - -#### Signature - -```typescript -onDebugEvent(_event: Record): void | Promise -``` - -#### Parameters - - - The debug event payload. - - -#### Returns - -`void | Promise` - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1970. - -*** - -### onFunctionCall - -Hook called before each SWAIG function execution. Override in subclasses. - -**Behavioral note:** In the Python SDK, `on_function_call` IS the dispatcher -— it retrieves and executes the function, returning the result. In TypeScript, -`fn.execute()` is called separately after this hook. However, if this method -returns a non-void value, it is used as the result and the default execution -is skipped, enabling dispatch interception parity with Python. - -#### Signature - -```typescript -onFunctionCall( - _name: string, - _args: Record, - _rawData: Record -): void | Record | Promise> -``` - -#### Parameters - - - Name of the function about to execute. - - - - Parsed arguments for the function. - - - - The full raw SWAIG request payload. - - -#### Returns - -`void | Record | Promise>` — Optionally a result dict to short-circuit default execution, or void/undefined to proceed normally. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1999. - -*** - -### onRequest - -Lifecycle hook called when SWML is requested. Default delegates to -[onSwmlRequest](/docs/sdk-reference/reference/typescript/prefabs/info-gatherer-agent#on-swml-request) and returns its result. Subclasses typically -override `onSwmlRequest` rather than this method. - -Matches Python `WebMixin.on_request(request_data, callback_path)`. The -cross-language API is the two-arg form; the Hono `context` argument is -a TypeScript-side extra preserved for callers that already have it but -is not part of the audited surface. - -#### Signature - -```typescript -onRequest( - requestData?: Record | null, - callbackPath?: string | null -): void | Record | Promise> -``` - -#### Parameters - - - The parsed request body. - - - - Optional callback path from the request. - - -#### Returns - -`void | Record | Promise>` — Optionally a dict of SWML modifications, or undefined for default rendering. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1935. - -*** - -### onSummary - -Lifecycle hook called when a post-prompt summary is received. Override in subclasses. - -Invoked once at the end of a call when the AI has produced a structured summary -(configured via `setPostPrompt()` / `setPostPromptJson()`). Use this hook to persist -call data, notify other systems, or trigger follow-up workflows. - -#### Signature - -```typescript -onSummary( - _summary: Record | null, - _rawData: Record -): void | Promise -``` - -#### Parameters - - - Parsed summary object (JSON when the post-prompt requests structured output), or `null` if extraction/parsing failed. - - - - Full raw post-prompt payload received from the platform, including call metadata, conversation history, and the summary text. - - -#### Returns - -`void | Promise` - -#### Examples - -```typescript -class MyAgent extends AgentBase { - async onSummary(summary, rawData) { - if (!summary) return; - await db.calls.insert({ - callSid: rawData.call_id, - summary, - endedAt: new Date(), - }); - } -} -``` - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1916. - -*** - -### onSwmlRequest - -Handle dynamic configuration using the registered callback. Returns the -per-request global\_data payload which AgentBase merges into the SWML -response. Mirrors Python's `on_swml_request` return-dict contract. - -#### Signature - -```typescript -onSwmlRequest( - rawData: Record -): Promise> -``` - -#### Parameters - - - -#### Returns - -`Promise>` - -#### Source - -[`src/prefabs/InfoGathererAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/InfoGathererAgent.ts) - -Line 223. - -*** - -### promptAddSection - -Add a new section to the prompt with optional body, bullets, and subsections. - -#### Signature - -```typescript -promptAddSection(title: string, opts?: { ...5 fields }): this -``` - -#### Parameters - - - Section heading. - - - - Optional section content including body text, bullet points, and subsections. - - - - - - - - - - - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 467. - -*** - -### promptAddSubsection - -Add a subsection under an existing prompt section. - -#### Signature - -```typescript -promptAddSubsection( - parentTitle: string, - title: string, - opts?: { ...2 fields } -): this -``` - -#### Parameters - - - Title of the parent section. - - - - Title of the new subsection. - - - - Optional body text and bullet points for the subsection. - - - - - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 502. - -*** - -### promptAddToSection - -Append content to an existing prompt section. - -#### Signature - -```typescript -promptAddToSection(title: string, opts?: { ...3 fields }): this -``` - -#### Parameters - - - Title of the section to append to. - - - - Content to add: body text, a single bullet, or multiple bullets. - - - - - - - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 487. - -*** - -### promptHasSection - -Check whether a prompt section with the given title exists. - -#### Signature - -```typescript -promptHasSection(title: string): boolean -``` - -#### Parameters - - - Section title to look for. - - -#### Returns - -`boolean` — True if the section exists. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 512. - -*** - -### registerAdditionalRoutes - -Extension point: register additional Hono routes after SWMLService -mounts /health, /ready, /swaig, and the main route. AgentBase uses -this to add /post\_prompt, /check\_for\_input, /debug\_events, /mcp. - -#### Signature - -```typescript -registerAdditionalRoutes(_app: Hono): void -``` - -#### Parameters - - - -#### Returns - -`void` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 604. - -*** - -### registerRoutingCallback - -Register a callback at a specific HTTP path that decides how to route an -incoming request. - -When called, the endpoint at `path` will invoke `callback` with the parsed -request body. If `callback` returns a non-empty route string the server -responds with `{ action: "redirect", route }` so the platform can forward the -request to the right agent. If `callback` returns `null` / `undefined` the -agent's own SWML is returned instead (normal processing). - -Mirrors Python `swml_service.register_routing_callback` / -`web_mixin.register_routing_callback`. - -#### Signature - -```typescript -registerRoutingCallback(callback: RoutingCallback, path: string = '/sip'): this -``` - -#### Parameters - - - Function receiving the parsed request body and returning a route string to redirect, or null/undefined for normal processing. - - - - HTTP path where this callback endpoint is registered (default: '/sip'). - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1102. - -*** - -### registerSipUsername - -Register a SIP username to route to this agent. - -#### Signature - -```typescript -registerSipUsername(username: string): this -``` - -#### Parameters - - - The SIP username to register. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1040. - -*** - -### registerSwaigFunction - -Register a SwaigFunction instance or a raw function descriptor (DataMap). - -#### Signature - -```typescript -registerSwaigFunction(fn: Record | SwaigFunction): this -``` - -#### Parameters - - - -#### Returns - -`this` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 472. - -*** - -### registerVerbHandler - -Register a custom verb handler. -Mirrors Python's `register_verb_handler()`. - -#### Signature - -```typescript -registerVerbHandler(handler: SWMLVerbHandler): void -``` - -#### Parameters - - - The verb handler to register. - - -#### Returns - -`void` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 726. - -*** - -### removeFunction - -Remove a registered SWAIG function. Returns true when removed, -false when not found. (Python parity: -`ToolRegistry.remove_function`.) - -#### Signature - -```typescript -removeFunction(name: string): boolean -``` - -#### Parameters - - - -#### Returns - -`boolean` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 540. - -*** - -### removeSkill - -Remove a previously added skill by its instance ID. - -#### Signature - -```typescript -removeSkill(instanceId: string): Promise -``` - -#### Parameters - - - The unique instance ID of the skill to remove. - - -#### Returns - -`Promise` — True if the skill was found and removed. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1654. - -*** - -### removeSkillByName - -Remove a skill by its name (Python parity). - -Python's `remove_skill(skill_name)` removes by skill name. -The existing `removeSkill(instanceId)` removes by instance ID. -This method provides name-based removal for cross-SDK parity. - -#### Signature - -```typescript -removeSkillByName(skillName: string): Promise -``` - -#### Parameters - - - The skill name to remove. - - -#### Returns - -`Promise` — True if a skill with that name was found and removed. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1690. - -*** - -### renderDocument - -Render the SWML document as a JSON string. -Mirrors Python's `render_document()`. - -#### Signature - -```typescript -renderDocument(): string -``` - -#### Returns - -`string` — JSON-encoded SWML document. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 715. - -*** - -### renderSwml - -Render the complete SWML document by assembling all 5 phases: pre-answer, answer, -post-answer, AI, and post-AI verbs. - -#### Signature - -```typescript -renderSwml(callId?: string, modifications?: Record): string -``` - -#### Parameters - - - Optional call ID to use for session tokens; auto-generated if omitted. - - - - Optional dict returned from `onSwmlRequest` to merge into the AI verb config before rendering. Matches Python's `_render_swml(modifications)` semantics: `global_data` is deep-merged; all other keys override the AI config directly. - - -#### Returns - -`string` — The rendered SWML document as a JSON string. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 2019. - -*** - -### resetContexts - -Remove all contexts, returning the agent to a no-contexts state. - -This is a convenience wrapper around `defineContexts().reset()`. -Use it in a dynamic config callback when you need to rebuild -contexts from scratch for a specific request. - -#### Signature - -```typescript -resetContexts(): this -``` - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 625. - -*** - -### resetDocument - -Reset the SWML document to an empty state. -Mirrors Python's `reset_document()`. - -#### Signature - -```typescript -resetDocument(): this -``` - -#### Returns - -`this` — This service for chaining. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 679. - -*** - -### run - -Alias for [serve](/docs/sdk-reference/reference/typescript/prefabs/info-gatherer-agent#serve). Starts the HTTP server. - -#### Signature - -```typescript -run(opts?: { ...2 fields }): Promise -``` - -#### Parameters - - - Optional host and port overrides. - - - - - - -#### Returns - -`Promise` — A promise that resolves once the server is running. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 2702. - -*** - -### runServerless - -Handle a single serverless invocation (AWS Lambda, Google Cloud Functions, Azure Functions, or CGI). - -Matches Python `run(event, context)` when executed in a serverless environment. Python's -`run()` auto-detects the platform via `get_execution_mode()` and dispatches accordingly; -in TypeScript the serverless path is an **explicit** method so that `run()` keeps its -HTTP-server semantics and callers opt in to serverless dispatch deliberately. - -Platform detection follows the same environment-variable heuristics as Python's -`ServerlessMixin`: `AWS_LAMBDA_FUNCTION_NAME` → Lambda, `K_SERVICE` → GCF, -`FUNCTIONS_WORKER_RUNTIME` → Azure, `GATEWAY_INTERFACE` → CGI. - -Usage in a Lambda handler file: - -```ts -export const handler = (event: any, context: any) => agent.runServerless(event, context); -``` - -#### Signature - -```typescript -runServerless( - event: ServerlessEvent, - context?: unknown, - platform?: "lambda" | "gcf" | "azure" | "cgi" | "auto" -): Promise -``` - -#### Parameters - - - The serverless event payload (Lambda event, GCF request body, etc.). - - - - The serverless context object (Lambda context, Azure context, etc.). - - - - Optional platform override; defaults to 'auto' (environment detection). - - -#### Returns - -`Promise` — The normalized serverless response object. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 2728. - -*** - -### serve - -Start the HTTP server and begin listening for requests. - -Uses `@hono/node-server` under the hood. When run in CLI mode -(`SWAIG_CLI_MODE=true`, set automatically by `npx swaig-test`), this is a -no-op so agent config can be inspected without starting a server. - -#### Signature - -```typescript -serve(opts?: { ...2 fields }): Promise -``` - -#### Parameters - - - Optional host/port overrides. Defaults to the values provided in the constructor options or the `PORT` environment variable. - - - - - - -#### Returns - -`Promise` — A promise that resolves once the server has begun listening. - -#### Examples - -```typescript -const agent = new AgentBase({ name: 'demo', port: 3000 }); -await agent.serve(); -// Or override at runtime: -await agent.serve({ port: 8080, host: '127.0.0.1' }); -``` - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 2679. - -*** - -### setDynamicConfigCallback - -Set a callback invoked on each SWML request to dynamically modify an ephemeral agent copy. - -The callback receives a clone of this agent — mutations apply only to the current -request, so you can vary prompt, tools, languages, params, or global data per call -without affecting the long-lived agent instance. - -#### Signature - -```typescript -setDynamicConfigCallback(cb: DynamicConfigCallback): this -``` - -#### Parameters - - - Callback receiving `(queryParams, bodyParams, headers, agent)` where `agent` is the ephemeral `AgentBase` copy to mutate. May be async. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Examples - -```typescript -agent.setDynamicConfigCallback((query, body, headers, agent) => { - const lang = query.lang ?? 'en'; - if (lang === 'es') { - (agent as AgentBase).setPromptText('Eres un asistente útil.'); - } -}); -``` - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1723. - -*** - -### setFunctionIncludes - -Replace the entire list of function includes. -Each include must have a `url` and `functions` array. - -#### Signature - -```typescript -setFunctionIncludes(includes: FunctionInclude[]): this -``` - -#### Parameters - - - Array of function include objects. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 979. - -*** - -### setGlobalData - -Merge data into the global\_data object passed into the AI configuration. - -Matches Python `set_global_data` which calls `.update()` on the internal dict — -existing keys are preserved; incoming keys overwrite on collision. Skills and -other callers can each contribute keys without clobbering one another. - -If you need to replace the entire object, assign a new agent instance or use -`Object.assign(agent.globalData, {})` to clear first. - -#### Signature - -```typescript -setGlobalData(data: Record): this -``` - -#### Parameters - - - Key-value pairs to merge into global data. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 828. - -*** - -### setInternalFillers - -Set internal fillers for native SWAIG functions. - -Internal fillers are short phrases the AI agent speaks (via TTS) while -an internal/native function is running, so the caller doesn't hear -dead air during transitions or background work. - -Supported function names (matches the SWAIGInternalFiller schema): - -hangup — when the agent is hanging up -check\_time — when checking the time -wait\_for\_user — when waiting for user input -wait\_seconds — during deliberate pauses -adjust\_response\_latency — when adjusting response timing -next\_step — transitioning between steps in prompt.contexts -change\_context — switching between contexts in prompt.contexts -get\_visual\_input — processing visual input (enable\_vision=true) -get\_ideal\_strategy — thinking (enable\_thinking=true) - -Notably NOT supported: change\_step, gather\_submit, or arbitrary -user-defined SWAIG function names. The runtime only honors fillers -for the names listed above; everything else is silently ignored at -the SWML level. This method warns at registration time if you pass -an unknown name so you catch the typo early. - -#### Signature - -```typescript -setInternalFillers( - internalFillers: Record> -): this -``` - -#### Parameters - - - Map of function name to language-keyed filler phrases. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Examples - -```typescript -agent.setInternalFillers({ - next_step: { - 'en-US': ['Moving to the next step...', 'Great, let us continue...'], - 'es': ['Pasando al siguiente paso...'] - }, - check_time: { - 'en-US': ['Let me check the time...'] - } -}); -``` - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 910. - -*** - -### setLanguageParams - -Set (or replace) the per-language `params` dict on an already-added -language. Useful when language entries are built up via [addLanguage](/docs/sdk-reference/reference/typescript/prefabs/info-gatherer-agent#add-language) -first and engine-specific tuning is added later (e.g., from a config -loader). - -Python parity: `set_language_params(code, params)`. Passing an empty -object removes the `params` key entirely. Unknown codes are a no-op. - -#### Signature - -```typescript -setLanguageParams(code: string, params: Record): this -``` - -#### Parameters - - - Language code as previously passed to [addLanguage](/docs/sdk-reference/reference/typescript/prefabs/info-gatherer-agent#add-language) (e.g. `"en-US"`). - - - - Engine-specific params dict to attach. Empty object removes the key. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 737. - -*** - -### setLanguages - -Replace all configured languages with a new list. - -#### Signature - -```typescript -setLanguages(languages: LanguageConfig[]): this -``` - -#### Parameters - - - Array of language configurations. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 718. - -*** - -### setNativeFunctions - -Set the list of native SWAIG function names (built-in platform functions). - -#### Signature - -```typescript -setNativeFunctions(funcs: string[]): this -``` - -#### Parameters - - - Array of native function names. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 848. - -*** - -### setOnRequestCallback - -Set a callback invoked per-request to dynamically build SWML. -When set, the static SwmlBuilder is ignored and the callback's -returned SwmlBuilder is used instead. - -#### Signature - -```typescript -setOnRequestCallback(cb: OnRequestCallback): this -``` - -#### Parameters - - - Callback receiving query params, body params, and headers. - - -#### Returns - -`this` — This service for chaining. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 850. - -*** - -### setParam - -Set a single AI parameter (e.g. "temperature", "top\_p"). - -#### Signature - -```typescript -setParam(key: string, value: unknown): this -``` - -#### Parameters - - - Parameter name. - - - - Parameter value. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 800. - -*** - -### setParams - -Merge multiple AI parameters into the existing params object. - -#### Signature - -```typescript -setParams(params: Record): this -``` - -#### Parameters - - - Key-value pairs to merge. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 810. - -*** - -### setPostPrompt - -Set the post-prompt text evaluated after the call ends. - -#### Signature - -```typescript -setPostPrompt(text: string): this -``` - -#### Parameters - - - The post-prompt text to use. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 456. - -*** - -### setPostPromptLlmParams - -Merge LLM-specific parameters into the post-prompt configuration. - -#### Signature - -```typescript -setPostPromptLlmParams(params: Record): this -``` - -#### Parameters - - - Key-value LLM parameters to merge. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1001. - -*** - -### setPostPromptUrl - -Override the default post-prompt webhook URL with a custom one. - -#### Signature - -```typescript -setPostPromptUrl(url: string): this -``` - -#### Parameters - - - The custom post-prompt URL. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1847. - -*** - -### setPromptLlmParams - -Merge LLM-specific parameters into the main prompt configuration (e.g. model, temperature). - -#### Signature - -```typescript -setPromptLlmParams(params: Record): this -``` - -#### Parameters - - - Key-value LLM parameters to merge. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 991. - -*** - -### setPromptPom - -Set the prompt as a POM (Prompt Object Model) dictionary. - -Replaces the current POM sections with the provided structured data. -Each entry should have `title`, and optionally `body`, `bullets`, -`numbered`, `numberedBullets`, and `subsections`. - -#### Signature - -```typescript -setPromptPom(pom: Record[]): this -``` - -#### Parameters - - - Array of POM section dictionaries. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Throws - -- Error if POM mode is not enabled (`usePom: false`). - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 577. - -*** - -### setPromptText - -Set the main system prompt text for the AI. - -#### Signature - -```typescript -setPromptText(text: string): this -``` - -#### Parameters - - - The prompt text to use. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 446. - -*** - -### setPronunciations - -Replace all pronunciation rules with a new list. - -#### Signature - -```typescript -setPronunciations(rules: PronunciationRule[]): this -``` - -#### Parameters - - - Array of pronunciation rule objects. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 786. - -*** - -### setQuestionCallback - -Register a callback for dynamic question configuration. The callback is -invoked on each incoming SWML request with the query params, body, and -headers, and must return the list of questions to ask on that call. -Mirrors Python `set_question_callback`. - -#### Signature - -```typescript -setQuestionCallback(callback: InfoGathererQuestionCallback): this -``` - -#### Parameters - - - -#### Returns - -`this` - -#### Source - -[`src/prefabs/InfoGathererAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/InfoGathererAgent.ts) - -Line 159. - -*** - -### setupGracefulShutdown - -Register process signal handlers for clean Kubernetes/Docker shutdown. -Handles SIGTERM and SIGINT, waits for a timeout, then exits. - -**Modifiers:** `static` - -#### Signature - -```typescript -setupGracefulShutdown(opts?: { ...1 fields }): void -``` - -#### Parameters - - - Optional timeout in milliseconds (default 5000). - - - - -#### Returns - -`void` - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 2751. - -*** - -### setWebHookUrl - -Override the default SWAIG webhook URL with a custom one. - -#### Signature - -```typescript -setWebHookUrl(url: string): this -``` - -#### Parameters - - - The custom webhook URL. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1837. - -*** - -### stop - -Stop the HTTP server. -Mirrors Python's `stop()`. - -#### Signature - -```typescript -stop(): void -``` - -#### Returns - -`void` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 1009. - -*** - -### swaigPreDispatch - -Extension point: invoked between argument parsing and function dispatch -on POST /swaig. Returns \[target, shortCircuit]: when shortCircuit is -non-null, it's returned directly without dispatching. AgentBase may -override to add session-token validation or ephemeral dynamic-config. - -#### Signature - -```typescript -swaigPreDispatch( - _requestData: Record, - _funcName: string -): [SWMLService, unknown] -``` - -#### Parameters - - - - - -#### Returns - -`[SWMLService, unknown]` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 592. - -*** - -### updateGlobalData - -Merge additional entries into the existing global\_data object. - -#### Signature - -```typescript -updateGlobalData(data: Record): this -``` - -#### Parameters - - - Key-value pairs to merge into global data. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 838. - -*** - -### validateBasicAuth - -Override to add custom basic-auth validation logic beyond credential matching. - -#### Signature - -```typescript -validateBasicAuth( - _username: string, - _password: string -): boolean | Promise -``` - -#### Parameters - - - The username from the request. - - - - The password from the request. - - -#### Returns - -`boolean | Promise` — True if the credentials are valid; false to reject the request. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1980. - -*** - -### validateToolToken - -Validate a tool-call token for the given function. - -Mirrors Python reference `core/mixins/state_mixin.py validate_tool_token`: - -1. Unknown function → `false`. -2. Registered but non-secure → `true` without consulting SessionManager - (non-secure tools never require a token). -3. Raw-dict descriptors (e.g. DataMap) are treated as secure, matching - Python's `isinstance(func, dict) → is_secure = True` branch. -4. Missing token on a secure tool → `false`. -5. Otherwise delegate to `SessionManager.validateToolToken`. - -Divergences from the Python reference: - -- No debug-logging branch: `AgentBase` does not expose an agent-level - debug-mode flag, so the per-call debug telemetry Python emits is - omitted. `SessionManager` still logs its own validation outcomes. -- No token-derived call-id fallback: `SessionManager.debugToken` - truncates the embedded call-id for log safety, so an extracted value - cannot be round-tripped back through `validateToolToken`. The caller - is expected to supply a non-empty `callId`; an empty one is forwarded - unchanged and the underlying validator will reject it. - -#### Signature - -```typescript -validateToolToken(functionName: string, token: string, callId: string): boolean -``` - -#### Parameters - - - - - - - -#### Returns - -`boolean` - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1455. - -## Functions - -### createInfoGathererAgent - -Factory function that creates and returns a new InfoGathererAgent. - -#### Signature - -```typescript -createInfoGathererAgent(config: InfoGathererConfig = {}): InfoGathererAgent -``` - -#### Parameters - - - Configuration for the info gatherer agent. - - -#### Returns - -`InfoGathererAgent` — A configured InfoGathererAgent instance. - -#### Source - -[`src/prefabs/InfoGathererAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/InfoGathererAgent.ts) - -Line 375. - -## Type Aliases - -### InfoGathererQuestionCallback - -Callback invoked on each incoming SWML request to produce the list of -questions for that request. Mirrors Python's `set_question_callback`. - -#### Signature - -```typescript -type InfoGathererQuestionCallback = (queryParams: Record, bodyParams: Record, headers: Record) => InfoGathererQuestion[] | Promise -``` - -#### Source - -[`src/prefabs/InfoGathererAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/InfoGathererAgent.ts) - -Line 31. - -## Interfaces - -### InfoGathererConfig - -Configuration for the InfoGathererAgent. - -#### Signature - -```typescript -interface InfoGathererConfig -``` - -#### Properties - - - Additional AgentBase options forwarded to super(). - - - - Agent display name (defaults to `"info_gatherer"`). - - - - Convenience alternative to calling `setQuestionCallback()` after construction. Only consulted when `questions` is not provided. - - - - Optional list of questions to ask. When omitted, the agent runs in dynamic mode and resolves questions via the callback registered with `setQuestionCallback()` (or via `questionCallback` below). - - - - HTTP route for this agent (defaults to `"/info_gatherer"`). - - -#### Source - -[`src/prefabs/InfoGathererAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/InfoGathererAgent.ts) - -Line 38. - -*** - -### InfoGathererQuestion - -A single question in the information-gathering flow. - -#### Signature - -```typescript -interface InfoGathererQuestion -``` - -#### Properties - - - When true, the agent insists the caller confirms before submitting. - - - - Identifier used as the key when storing the caller's answer. - - - - The question text to ask the caller. - - -#### Source - -[`src/prefabs/InfoGathererAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/InfoGathererAgent.ts) - -Line 17. - -## Source - -[`src/prefabs/InfoGathererAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/InfoGathererAgent.ts) - -Line 107. diff --git a/fern/products/sdk-reference/typescript/prefabs/receptionist-agent/index.mdx b/fern/products/sdk-reference/typescript/prefabs/receptionist-agent/index.mdx deleted file mode 100644 index d4530c2d30..0000000000 --- a/fern/products/sdk-reference/typescript/prefabs/receptionist-agent/index.mdx +++ /dev/null @@ -1,3774 +0,0 @@ ---- -slug: "/reference/typescript/prefabs/receptionist-agent" -title: "ReceptionistAgent" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "prefabs.ReceptionistAgent" - module: "prefabs" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/ReceptionistAgent.ts" ---- -# `ReceptionistAgent` - -Prefab agent that greets callers, collects basic information, and transfers them to the correct department. - -Optionally supports visitor check-in — when enabled, the agent can collect a visitor's name -and purpose-of-visit and invoke a callback (e.g., notify reception via Slack, write to a -database). If not transferring, the call ends after check-in. - -## Signature - -```typescript -class ReceptionistAgent extends AgentBase -``` - -## Inheritance - -**Extends:** [AgentBase](/docs/sdk-reference/reference/typescript/agent-base) - -## Examples - -```typescript -import { ReceptionistAgent } from '@signalwire/sdk'; - -const agent = new ReceptionistAgent({ - companyName: 'Acme Co', - greeting: 'Thanks for calling Acme! How can I direct your call?', - departments: [ - { name: 'sales', description: 'New customer inquiries', number: '+15551112222' }, - { name: 'support', description: 'Existing customer help', number: '+15553334444' }, - { name: 'billing', description: 'Billing and payments', number: '+15555556666' }, - ], - checkInEnabled: true, - onVisitorCheckIn: async (visitor) => { - await notifyFrontDesk(visitor); - }, -}); - -await agent.serve({ port: 3000 }); -``` - -## Properties - - - Unique identifier for this agent instance. - - - - - - - - Domain name for SSL. Mirrors Python's `self.domain`. - - - - Check if full JSON Schema validation is enabled. Mirrors Python's `@property full_validation_enabled`. - - - - Host the server binds to. - - - - Structured logger instance for this agent. Override the inherited SWMLService logger with an AgentBase-tagged one. - - - - Service display name. - - - - Public accessor for the native functions list. Python exposes `self.native_functions` as a public read/write attribute. - - - - - - Public accessor for the agent's POM as a [PromptObjectModel](/docs/sdk-reference/reference/typescript/pom/prompt-object-model) instance. Python parity: `agent.pom` instance attribute (agent\_base.py line 209) is a `signalwire.pom.pom.PromptObjectModel` when `use_pom=True`, or `None` otherwise. This getter returns the equivalent TypeScript `PromptObjectModel` instance — callers can use `addSection`, `findSection`, `renderMarkdown`, `renderXml`, `toJson`, `toYaml` exactly as in Python. The instance returned is a fresh snapshot built from the current `PomBuilder` state, so mutating it does not feed back into the agent's internal builder. To mutate the agent's prompt, use `promptAddSection` / `promptAddToSection` / `promptAddSubsection`. - - - - Port the server binds to. - - - - Static prompt sections: subclasses can define these declaratively. Each entry is applied via promptAddSection() in the constructor. - - - - Public accessor for the PromptManager (POM). Python exposes `self.pom` as a public attribute. This getter provides equivalent access for direct POM manipulation. - - - - HTTP route path. - - - - Schema validation utilities. Mirrors Python's `self.schema_utils`. - - - - Unified security configuration. Mirrors Python's `self.security`. - - - - Public read-only accessor for the SkillManager. Python exposes `self.skill_manager` as a public attribute. This getter provides equivalent read access. - - - - Path to SSL certificate. Mirrors Python's `self.ssl_cert_path`. - - - - Whether SSL is enabled. Mirrors Python's `self.ssl_enabled`. - - - - Path to SSL private key. Mirrors Python's `self.ssl_key_path`. - - - - The complete set of internal SWAIG function names that accept fillers, matching the SWAIGInternalFiller schema definition. Any name outside this set is silently ignored by the runtime — addInternalFiller / setInternalFillers warn if you pass an unknown name. - - - - - - - - Custom verb handler registry. Mirrors Python's `self.verb_registry`. - - -## Methods - -### addAnswerVerb - -Configure the answer verb (phase 2) with optional settings. - -#### Signature - -```typescript -addAnswerVerb(config?: Record): this -``` - -#### Parameters - - - Optional answer verb configuration. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1501. - -*** - -### addFunctionInclude - -Add a remote SWAIG function include reference. - -#### Signature - -```typescript -addFunctionInclude( - url: string, - functions: string[], - metaData?: Record -): this -``` - -#### Parameters - - - URL of the remote SWAIG endpoint. - - - - Function names available at that endpoint. - - - - Optional metadata to attach to the include. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 966. - -*** - -### addHint - -Add a single speech-recognition hint. - -#### Signature - -```typescript -addHint(hint: string): this -``` - -#### Parameters - - - Word or phrase to boost in speech recognition. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 653. - -*** - -### addHints - -Add multiple speech-recognition hints at once. - -#### Signature - -```typescript -addHints(hints: string[]): this -``` - -#### Parameters - - - Array of words or phrases to boost. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 663. - -*** - -### addInternalFiller - -Add internal filler phrases for a single internal function and language. - -See [setInternalFillers](/docs/sdk-reference/reference/typescript/prefabs/receptionist-agent#set-internal-fillers) for the complete list of supported -functionName values and an explanation of what fillers do. - -#### Signature - -```typescript -addInternalFiller( - functionName: string, - languageCode: string, - fillers: string[] -): this -``` - -#### Parameters - - - One of the supported internal function names (see SUPPORTED\_INTERNAL\_FILLER\_NAMES). Names outside the supported set log a warning and are ignored by the runtime. - - - - BCP-47 language code for the fillers (e.g. 'en-US'). - - - - Array of filler phrases. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 943. - -*** - -### addLanguage - -Add a supported language to the AI configuration. - -#### Signature - -```typescript -addLanguage(config: LanguageConfig): this -``` - -#### Parameters - - - Language configuration including name, code, voice, and optional fillers. `params` may be set to attach engine-specific tuning (voice stability, similarity boost, model knobs, etc.); only emitted into SWML when non-empty so existing entries stay byte-identical when no params are passed (Python ai\_config\_mixin.py `add_language`). - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 694. - -*** - -### addMcpServer - -Add an external MCP server for tool discovery and invocation. -Tools are discovered via MCP protocol at session start and added to the AI's tool list. - -#### Signature - -```typescript -addMcpServer(url: string, opts?: { ...3 fields }): this -``` - -#### Parameters - - - MCP server HTTP endpoint URL - - - - Optional configuration: headers, resources, resourceVars - - - - - - - - -#### Returns - -`this` — This agent instance for chaining - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1146. - -*** - -### addPatternHint - -Add a pattern-based speech-recognition hint with find-and-replace behavior. - -#### Signature - -```typescript -addPatternHint(opts: { ...4 fields }): this -``` - -#### Parameters - - - Pattern hint configuration with a descriptive hint label, regex pattern, replacement string, and optional case-insensitive flag. - - - - - - - - - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 674. - -*** - -### addPostAiVerb - -Add a SWML verb to execute after the AI verb (phase 5). - -#### Signature - -```typescript -addPostAiVerb(verbName: string, config: Record): this -``` - -#### Parameters - - - Name of the SWML verb. - - - - Verb configuration object. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1523. - -*** - -### addPostAnswerVerb - -Add a SWML verb to execute after the answer phase but before the AI verb (phase 3). - -#### Signature - -```typescript -addPostAnswerVerb( - verbName: string, - config: number | Record -): this -``` - -#### Parameters - - - Name of the SWML verb. - - - - Verb configuration object. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1512. - -*** - -### addPreAnswerVerb - -Add a SWML verb to execute before the answer phase (phase 1). - -#### Signature - -```typescript -addPreAnswerVerb( - verbName: string, - config: number | Record -): this -``` - -#### Parameters - - - Name of the SWML verb (e.g. "play", "record"). - - - - Verb configuration object. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1491. - -*** - -### addPronunciation - -Add a pronunciation override rule for the TTS engine. - -#### Signature - -```typescript -addPronunciation(rule: PronunciationRule): this -``` - -#### Parameters - - - Pronunciation rule specifying the text to replace and its substitute. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 774. - -*** - -### addSection - -Add a new named section to the SWML document. -Mirrors Python's `add_section()`. - -#### Signature - -```typescript -addSection(sectionName: string): this -``` - -#### Parameters - - - Name of the section to create. - - -#### Returns - -`this` — This service for chaining. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 653. - -*** - -### addSkill - -Add a skill to this agent, registering its tools, prompt sections, hints, and global data. - -#### Signature - -```typescript -addSkill(skill: SkillBase): Promise -``` - -#### Parameters - - - The skill instance to add. - - -#### Returns - -`Promise` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1570. - -*** - -### addSkillByName - -Add a skill by its registered name, looking it up in the global SkillRegistry. - -Matches Python's `add_skill(skill_name, params)` which loads skills by string -name via the SkillManager registry. Throws a `ValueError`-equivalent if the -skill name is not found in the registry. - -Accepts a typed [SkillNameOrString](/docs/sdk-reference/reference/typescript/skills/skill-name#skill-name-or-string): one of the built-in -`SkillName` values (autocompleted, with a typo caught at compile -time) or any other string for custom / third-party skills. The value is -forwarded to the registry unchanged — the typing is erased at runtime, so -this matches Python's bare-`str` `add_skill(skill_name, params)`. - -#### Signature - -```typescript -addSkillByName( - skillName: SkillNameOrString, - params?: SkillConfig -): Promise -``` - -#### Parameters - - - The name the skill was registered under in the SkillRegistry. - - - - Optional configuration parameters forwarded to the skill factory. - - -#### Returns - -`Promise` — This agent instance for chaining. - -#### Throws - -- Error if no skill with the given name is registered. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1641. - -*** - -### addSwaigQueryParams - -Add extra query parameters appended to all SWAIG webhook URLs. - -#### Signature - -```typescript -addSwaigQueryParams(params: Record): this -``` - -#### Parameters - - - Key-value pairs to append as query parameters. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1733. - -*** - -### addVerb - -Add a verb to the SWML document. - -#### Signature - -```typescript -addVerb(name: string, config: unknown): this -``` - -#### Parameters - - - Verb name (e.g., 'answer', 'play', 'hangup'). - - - - Verb configuration. - - -#### Returns - -`this` — This service for chaining. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 642. - -*** - -### addVerbToSection - -Add a verb to a specific named section. -Mirrors Python's `add_verb_to_section()`. - -#### Signature - -```typescript -addVerbToSection(sectionName: string, verbName: string, config: unknown): this -``` - -#### Parameters - - - Target section name (auto-created if missing). - - - - Verb name. - - - - Verb configuration. - - -#### Returns - -`this` — This service for chaining. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 669. - -*** - -### asRouter - -Return this agent's Hono app for mounting as a sub-router in an AgentServer. - -#### Signature - -```typescript -asRouter(): Hono -``` - -#### Returns - -`Hono` — The Hono application instance. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 2656. - -*** - -### autoMapSipUsernames - -Automatically register common SIP usernames based on this agent's -name and route. Derives cleaned variants (alphanumeric + underscore) -and registers each via `registerSipUsername()`. - -Port of Python's `auto_map_sip_usernames()`: - -- Registers a cleaned version of the agent name -- Registers a cleaned version of the route (if different from name) -- For names longer than 3 characters, also registers a vowel-stripped variant - -#### Signature - -```typescript -autoMapSipUsernames(): this -``` - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1058. - -*** - -### buildSwmlForRequest - -Service-side SWML-builder hook. Subclasses return a `SwmlBuilder` -to fully replace the document for this request, or `null` to fall -through to `setOnRequestCallback` or the static builder. - -This is distinct from the WebMixin `onRequest(requestData, -callbackPath)` hook on AgentBase (which mirrors Python's -`on_request -> on_swml_request` modification-merge contract). -Use this hook when you want to swap the entire SWML builder; use -`onRequest` / `onSwmlRequest` on AgentBase when you want to merge -targeted modifications into the rendered document. - -Default implementation returns `null` (no-op). - -#### Signature - -```typescript -buildSwmlForRequest( - _queryParams: Record, - _bodyParams: Record, - _headers: Record, - _callbackPath?: string -): SwmlBuilder | null -``` - -#### Parameters - - - - - - - - - -#### Returns - -`SwmlBuilder | null` — A `SwmlBuilder` whose document is sent as the response, or `null` to delegate to the next handler in the chain. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 834. - -*** - -### clearPostAiVerbs - -Remove all post-AI verbs. - -#### Signature - -```typescript -clearPostAiVerbs(): this -``` - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1550. - -*** - -### clearPostAnswerVerbs - -Remove all post-answer verbs. - -#### Signature - -```typescript -clearPostAnswerVerbs(): this -``` - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1541. - -*** - -### clearPreAnswerVerbs - -Remove all pre-answer verbs. - -#### Signature - -```typescript -clearPreAnswerVerbs(): this -``` - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1532. - -*** - -### clearSwaigQueryParams - -Clear all SWAIG query parameters. - -#### Signature - -```typescript -clearSwaigQueryParams(): this -``` - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1742. - -*** - -### constructor - -Create a ReceptionistAgent with the specified departments. - -#### Signature - -```typescript -constructor(config: ReceptionistConfig): ReceptionistAgent -``` - -#### Parameters - - - Configuration including departments (name/description/number), greeting, and voice. - - -#### Returns - -`ReceptionistAgent` - -#### Source - -[`src/prefabs/ReceptionistAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/ReceptionistAgent.ts) - -Line 96. - -*** - -### createToolToken - -Mint a per-call SWAIG-function token via the agent's SessionManager. - -Mirrors Python reference `core/mixins/state_mixin.py _create_tool_token`: -delegates to `SessionManager.createToolToken` and returns an empty -string on any failure (Python catches all exceptions and returns ""). - -#### Signature - -```typescript -createToolToken(toolName: string, callId: string): string -``` - -#### Parameters - - - - - -#### Returns - -`string` - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1475. - -*** - -### defineContexts - -Define or replace the contexts configuration for the AI verb. - -#### Signature - -```typescript -defineContexts( - contexts?: Record | ContextBuilder -): ContextBuilder -``` - -#### Parameters - - - An existing ContextBuilder instance or a plain object; a new ContextBuilder is created if omitted. - - -#### Returns - -`ContextBuilder` — The active ContextBuilder for further configuration. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 604. - -*** - -### defineTool - -Register a SWAIG tool (function) that the AI can invoke during a call. - -#### How this becomes a tool the model sees - -A SWAIG function is **exactly the same concept** as a "tool" in -native OpenAI / Anthropic tool calling. On every LLM turn, the SDK -renders each registered SWAIG function into the OpenAI tool schema: - -```json -{ -"type": "function", -"function": { -"name": "your_name_here", -"description": "your description text", -"parameters": { /* your JSON schema */ } -} -} -``` - -That schema goes to the model in the same API call that produces -the next assistant message. The model reads: - -- the **function `description`** to decide WHEN to call this tool -- each **parameter `description`** (inside the JSON schema) to - decide HOW to fill in each argument - -This means **descriptions are prompt engineering**, not developer -comments. A vague description is the #1 cause of "the model has the -right tool but doesn't call it" failures. - -##### Bad vs good descriptions - -```text -BAD : description: 'Lookup function' -GOOD: description: 'Look up a customer's account details by account -number. Use this BEFORE quoting any account-specific info -(balance, plan, status). Do not use for general product -questions.' - -BAD : parameters: { id: { type: 'string', description: 'the id' } } -GOOD: parameters: { account_number: { type: 'string', description: -'The customer's 8-digit account number, no dashes or spaces. -Ask the user if they don't provide it.' } } -``` - -##### Tool count matters - -LLM tool selection accuracy degrades past ~7-8 simultaneously-active -tools per call. Use Step.setFunctions() to partition tools across -steps so only the relevant subset is active at any moment. - -#### Signature - -```typescript -defineTool(opts: { ...11 fields }): this -``` - -#### Parameters - - - Tool definition including name, description, parameter schema, and handler callback. `description` and per-parameter `description` strings are LLM-facing prompt engineering. - - - - - Additional fields to pass through to the SWAIG function definition (Python `**swaig_fields` equivalent). - - - - - - - - - - - - - - - - - - - - External webhook URL; makes this an externally-hosted tool. - - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1330. - -*** - -### defineTools - -Register the `collect_caller_info` and `transfer_call` SWAIG tools -(Python parity). When `checkInEnabled` is `true`, also registers the -TS-specific `check_in_visitor` tool. - -#### Signature - -```typescript -defineTools(): void -``` - -#### Returns - -`void` - -#### Source - -[`src/prefabs/ReceptionistAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/ReceptionistAgent.ts) - -Line 234. - -*** - -### defineTypedTool - -Register a SWAIG tool with a typed handler that receives named parameters -instead of the standard `(args, rawData)` convention. - -The SDK wraps the handler to unpack the args dict into positional params. -If no `parameters` schema is provided, one is inferred from the handler's -source code (parameter names and default values). - -#### Signature - -```typescript -defineTypedTool(opts: { ...9 fields }): this -``` - -#### Parameters - - - Tool definition with a typed handler function. - - - - - - - The typed handler. Receives the AI-extracted arguments as named positional parameters (in declaration order), optionally with a trailing `rawData` record, and returns a SWAIG result. Precisely typed as [TypedToolHandler](/docs/sdk-reference/reference/typescript/type-inference#typed-tool-handler) rather than the bare `Function` so a non-callable — or a callable that returns nothing usable — is a compile-time error. - - - - - - - - - - - - - - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1373. - -*** - -### enableDebugEvents - -Enable debug event webhooks for this agent. - -#### Signature - -```typescript -enableDebugEvents(level: number = 1): this -``` - -#### Parameters - - - Debug verbosity level (defaults to 1). - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1011. - -*** - -### enableDebugRoutes - -Register a callback function that determines routing based on POST data. - -When a routing callback is registered, an endpoint at the specified path -is created in `getApp()`. The callback receives the request body and returns -Enable debug routes for testing and development. - -This is a backward-compatibility stub matching the Python SDK. -In the TypeScript SDK, debug routes (health, ready, debug\_events) -are automatically registered in `getApp()`. - -#### Signature - -```typescript -enableDebugRoutes(): this -``` - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1773. - -*** - -### enableMcpServer - -Expose this agent's tools as an MCP server endpoint at /mcp. -Adds a JSON-RPC 2.0 endpoint that MCP clients (Claude Desktop, other agents) can connect to. - -#### Signature - -```typescript -enableMcpServer(): this -``` - -#### Returns - -`this` — This agent instance for chaining - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1160. - -*** - -### enableSipRouting - -Enable SIP routing for this agent. - -#### Signature - -```typescript -enableSipRouting(autoMap: boolean = true, path: string = '/sip'): this -``` - -#### Parameters - - - When true, automatically map SIP usernames to the agent route (defaults to true). - - - - HTTP path for the SIP routing endpoint (defaults to '/sip'). - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1025. - -*** - -### extractSipUsername - -Extract the SIP username from a request body's call.to field. - -**Modifiers:** `static` - -#### Signature - -```typescript -extractSipUsername(requestBody: Record): string | null -``` - -#### Parameters - - - The parsed request body containing call information. - - -#### Returns - -`string | null` — The extracted SIP username, or null if not found. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1122. - -*** - -### getAllFunctions - -Snapshot of all registered SWAIG functions keyed by name. -(Python parity: `ToolRegistry.get_all_functions`.) - -#### Signature - -```typescript -getAllFunctions(): Record> -``` - -#### Returns - -`Record>` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 529. - -*** - -### getApp - -Get or lazily create the Hono HTTP application with all routes, middleware, auth, and CORS. - -#### Signature - -```typescript -getApp(): Hono -``` - -#### Returns - -`Hono` — The configured Hono application instance. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 2269. - -*** - -### getBasicAuthCredentials - -Get the basic-auth credentials used by this agent. - -#### Signature - - - - ```typescript - getBasicAuthCredentials(includeSource?: false): [string, string] - ``` - - - - ```typescript - getBasicAuthCredentials( - includeSource: true - ): [string, string, "provided" | "environment" | "generated"] - ``` - - - -#### Parameters (Overload 1) - - - When true, a third element indicating the credential source is appended. - - -#### Parameters (Overload 2) - - - When true, a third element indicating the credential source is appended. - - -#### Returns (Overload 1) - -`[string, string]` — A tuple of \[username, password] or \[username, password, source]. - -#### Returns (Overload 2) - -`[string, string, "provided" | "environment" | "generated"]` — A tuple of \[username, password] or \[username, password, source]. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 2794. - -*** - -### getBuilder - -Get the underlying SwmlBuilder for direct manipulation. - -#### Signature - -```typescript -getBuilder(): SwmlBuilder -``` - -#### Returns - -`SwmlBuilder` — The SwmlBuilder instance. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 632. - -*** - -### getContexts - -Get the contexts dictionary as serialised SWML, or null when no -contexts have been defined yet. - -Matches Python `PromptManager.get_contexts()` which returns the -contexts dict or `None`. - -#### Signature - -```typescript -getContexts(): Record | null -``` - -#### Returns - -`Record | null` — Contexts dict, or null when no contexts are defined. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 641. - -*** - -### getDocument - -Get the SWML document as a dictionary. -Alias for `renderSwml()` that matches Python's `get_document()` name. - -#### Signature - -```typescript -getDocument(): Record -``` - -#### Returns - -`Record` — The SWML document. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 706. - -*** - -### getFullUrl - -Get the full external URL of this agent, using the proxy base URL if available. - -#### Signature - -```typescript -getFullUrl(includeAuth: boolean = false): string -``` - -#### Parameters - - - Whether to embed basic-auth credentials in the URL (defaults to false). - - -#### Returns - -`string` — The fully-qualified URL string. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1857. - -*** - -### getFunction - -Get a registered SWAIG function entry, or undefined. -(Python parity: `ToolRegistry.get_function`.) - -#### Signature - -```typescript -getFunction(name: string): Record | SwaigFunction | undefined -``` - -#### Parameters - - - -#### Returns - -`Record | SwaigFunction | undefined` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 523. - -*** - -### getLanguageParams - -Read the per-language `params` dict for a previously-added language. - -Python parity: `get_language_params(code)`. Returns `undefined` if the -code is unknown or the language has no params set — no exception path. - -#### Signature - -```typescript -getLanguageParams(code: string): Record | undefined -``` - -#### Parameters - - - Language code as previously passed to [addLanguage](/docs/sdk-reference/reference/typescript/prefabs/receptionist-agent#add-language). - - -#### Returns - -`Record | undefined` — The params dict if set, `undefined` otherwise (including when the code is unknown). - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 760. - -*** - -### getMcpServers - -Get configured MCP servers (read-only copy). - -#### Signature - -```typescript -getMcpServers(): Record[] -``` - -#### Returns - -`Record[]` - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1171. - -*** - -### getName - -Get the agent's display name. - -#### Signature - -```typescript -getName(): string -``` - -#### Returns - -`string` — The agent name string. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1559. - -*** - -### getPostPrompt - -Get the post-prompt text, if one has been set. - -#### Signature - -```typescript -getPostPrompt(): string | null -``` - -#### Returns - -`string | null` — The post-prompt string, or null if not configured. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 548. - -*** - -### getPrompt - -Get the fully rendered main prompt text. - -#### Signature - -```typescript -getPrompt(): string -``` - -#### Returns - -`string` — The assembled prompt string. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 520. - -*** - -### getPromptPom - -Get the raw POM (Prompt Object Model) structure as an array of section data objects, -when the agent is in POM mode and has at least one section. - -Matches Python `get_prompt()` which returns `Union[str, List[Dict]]` — a raw list when -in POM mode (via `pom.to_list()` / `pom.render_dict()`), or a string otherwise. -The TS `getPrompt()` always returns a string (rendered Markdown), so this companion -method exposes the raw POM structure for callers that need it for serialisation or -inspection (e.g. skills that inspect prompt sections). - -#### Signature - -```typescript -getPromptPom(): Record[] | null -``` - -#### Returns - -`Record[] | null` — An array of POM section data objects, or null if not in POM mode or POM is empty. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 536. - -*** - -### getRawPrompt - -Get the raw prompt text whatever `setPromptText` stored, or null when -no raw prompt has been set. - -Matches Python `PromptManager.get_raw_prompt()` which returns the raw -stored string or `None`. Use this instead of `getPrompt()` when you -need the unrendered text rather than the POM-rendered Markdown. - -#### Signature - -```typescript -getRawPrompt(): string | null -``` - -#### Returns - -`string | null` — The raw prompt string, or null if not set. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 562. - -*** - -### getRegisteredTools - -Get a summary of all registered tools with their names, descriptions, and -parameter schemas. Lifted from AgentBase so the swaig-test CLI can list -tools on a non-AgentBase SWMLService target (sidecar / standalone SWAIG -host). - -#### Signature - -```typescript -getRegisteredTools(): { description: string; name: string; parameters: Record }[] -``` - -#### Returns - -`{ description: string; name: string; parameters: Record }[]` — Array of tool descriptors. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 557. - -*** - -### getTool - -Look up a registered SwaigFunction by name. Lifted from AgentBase so -`swaig-test --exec ` works against a non-AgentBase SWMLService -target. - -#### Signature - -```typescript -getTool(name: string): SwaigFunction | undefined -``` - -#### Parameters - - - The tool name to search for. - - -#### Returns - -`SwaigFunction | undefined` — The SwaigFunction instance, or undefined if not found or not a SwaigFunction. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 581. - -*** - -### getTools - -Public access to the list of registered tools. - -In Python, `define_tools()` is public and returns `List[SWAIGFunction]`. -In TypeScript, `defineTools()` is a protected setup hook (void). This -method provides the equivalent public "get all tools" capability. - -#### Signature - -```typescript -getTools(): SwaigFunction[] -``` - -#### Returns - -`SwaigFunction[]` — Array of all registered SwaigFunction instances. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 371. - -*** - -### handleMcpRequest - -Handle an MCP JSON-RPC 2.0 request. Returns the response object. - -#### Signature - -```typescript -handleMcpRequest( - body: Record -): Promise> -``` - -#### Parameters - - - -#### Returns - -`Promise>` - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1204. - -*** - -### hasFunction - -Whether a SWAIG function with the given name is registered. -(Python parity: `ToolRegistry.has_function`.) - -#### Signature - -```typescript -hasFunction(name: string): boolean -``` - -#### Parameters - - - -#### Returns - -`boolean` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 517. - -*** - -### hasSkill - -Check whether a skill with the given name is registered. - -Accepts a typed [SkillNameOrString](/docs/sdk-reference/reference/typescript/skills/skill-name#skill-name-or-string) so built-in names autocomplete -and a typo is a compile-time error; any other string is still accepted -(custom skills / parity with Python's bare-`str` `has_skill`). - -#### Signature - -```typescript -hasSkill(skillName: SkillNameOrString): boolean -``` - -#### Parameters - - - The skill name to check. - - -#### Returns - -`boolean` — True if a skill with that name exists. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1676. - -*** - -### hasTool - -Whether a tool with the given name is registered. - -#### Signature - -```typescript -hasTool(name: string): boolean -``` - -#### Parameters - - - -#### Returns - -`boolean` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 511. - -*** - -### isMcpServerEnabled - -Check if MCP server endpoint is enabled. - -#### Signature - -```typescript -isMcpServerEnabled(): boolean -``` - -#### Returns - -`boolean` - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1166. - -*** - -### listSkills - -List all registered skills with their names, instance IDs, and initialization status. - -#### Signature - -```typescript -listSkills(): { initialized: boolean; instanceId: string; name: string }[] -``` - -#### Returns - -`{ initialized: boolean; instanceId: string; name: string }[]` — Array of skill descriptors. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1662. - -*** - -### listToolNames - -List registered tool names in insertion order (Map preserves it). - -#### Signature - -```typescript -listToolNames(): string[] -``` - -#### Returns - -`string[]` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 545. - -*** - -### manualSetProxyUrl - -Manually set the proxy base URL used for webhook URL generation. - -#### Signature - -```typescript -manualSetProxyUrl(url: string): this -``` - -#### Parameters - - - The external-facing base URL (trailing slashes are stripped). - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1754. - -*** - -### onDebugEvent - -Lifecycle hook called when a debug event webhook is received. Override in subclasses. - -#### Signature - -```typescript -onDebugEvent(_event: Record): void | Promise -``` - -#### Parameters - - - The debug event payload. - - -#### Returns - -`void | Promise` - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1970. - -*** - -### onFunctionCall - -Hook called before each SWAIG function execution. Override in subclasses. - -**Behavioral note:** In the Python SDK, `on_function_call` IS the dispatcher -— it retrieves and executes the function, returning the result. In TypeScript, -`fn.execute()` is called separately after this hook. However, if this method -returns a non-void value, it is used as the result and the default execution -is skipped, enabling dispatch interception parity with Python. - -#### Signature - -```typescript -onFunctionCall( - _name: string, - _args: Record, - _rawData: Record -): void | Record | Promise> -``` - -#### Parameters - - - Name of the function about to execute. - - - - Parsed arguments for the function. - - - - The full raw SWAIG request payload. - - -#### Returns - -`void | Record | Promise>` — Optionally a result dict to short-circuit default execution, or void/undefined to proceed normally. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1999. - -*** - -### onRequest - -Lifecycle hook called when SWML is requested. Default delegates to -[onSwmlRequest](/docs/sdk-reference/reference/typescript/prefabs/receptionist-agent#on-swml-request) and returns its result. Subclasses typically -override `onSwmlRequest` rather than this method. - -Matches Python `WebMixin.on_request(request_data, callback_path)`. The -cross-language API is the two-arg form; the Hono `context` argument is -a TypeScript-side extra preserved for callers that already have it but -is not part of the audited surface. - -#### Signature - -```typescript -onRequest( - requestData?: Record | null, - callbackPath?: string | null -): void | Record | Promise> -``` - -#### Parameters - - - The parsed request body. - - - - Optional callback path from the request. - - -#### Returns - -`void | Record | Promise>` — Optionally a dict of SWML modifications, or undefined for default rendering. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1935. - -*** - -### onSummary - -Python-style receptionist summary hook. Default is a no-op; subclasses -may override to persist the summary. Mirrors Python `on_summary` -(receptionist.py lines 278–287). - -#### Signature - -```typescript -onSummary( - _summary: Record | null, - _rawData: Record -): void | Promise -``` - -#### Parameters - - - - - -#### Returns - -`void | Promise` - -#### Source - -[`src/prefabs/ReceptionistAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/ReceptionistAgent.ts) - -Line 376. - -*** - -### onSwmlRequest - -Lifecycle hook called on every SWML request before rendering. Override in subclasses. - -May optionally return a modification dict that will be merged into the -rendered SWML document (matching Python's `Optional[dict]` return type). - -Matches Python `on_swml_request(request_data, callback_path, request)` — the third -parameter is the FastAPI `Request` in Python; here it is the raw Hono context object -so that subclasses can access query parameters (`context.req.query()`), raw request -headers (`context.req.raw.headers`), etc. - -#### Signature - -```typescript -onSwmlRequest( - _rawData: Record, - _callbackPath?: string, - _context?: any -): void | Record | Promise> -``` - -#### Parameters - - - The parsed request body. - - - - Optional callback path from the request. - - - - The raw Hono context object (c), providing access to headers and query params. - - -#### Returns - -`void | Record | Promise>` — Optionally a dict of SWML modifications, or void. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1958. - -*** - -### promptAddSection - -Add a new section to the prompt with optional body, bullets, and subsections. - -#### Signature - -```typescript -promptAddSection(title: string, opts?: { ...5 fields }): this -``` - -#### Parameters - - - Section heading. - - - - Optional section content including body text, bullet points, and subsections. - - - - - - - - - - - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 467. - -*** - -### promptAddSubsection - -Add a subsection under an existing prompt section. - -#### Signature - -```typescript -promptAddSubsection( - parentTitle: string, - title: string, - opts?: { ...2 fields } -): this -``` - -#### Parameters - - - Title of the parent section. - - - - Title of the new subsection. - - - - Optional body text and bullet points for the subsection. - - - - - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 502. - -*** - -### promptAddToSection - -Append content to an existing prompt section. - -#### Signature - -```typescript -promptAddToSection(title: string, opts?: { ...3 fields }): this -``` - -#### Parameters - - - Title of the section to append to. - - - - Content to add: body text, a single bullet, or multiple bullets. - - - - - - - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 487. - -*** - -### promptHasSection - -Check whether a prompt section with the given title exists. - -#### Signature - -```typescript -promptHasSection(title: string): boolean -``` - -#### Parameters - - - Section title to look for. - - -#### Returns - -`boolean` — True if the section exists. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 512. - -*** - -### registerAdditionalRoutes - -Extension point: register additional Hono routes after SWMLService -mounts /health, /ready, /swaig, and the main route. AgentBase uses -this to add /post\_prompt, /check\_for\_input, /debug\_events, /mcp. - -#### Signature - -```typescript -registerAdditionalRoutes(_app: Hono): void -``` - -#### Parameters - - - -#### Returns - -`void` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 604. - -*** - -### registerRoutingCallback - -Register a callback at a specific HTTP path that decides how to route an -incoming request. - -When called, the endpoint at `path` will invoke `callback` with the parsed -request body. If `callback` returns a non-empty route string the server -responds with `{ action: "redirect", route }` so the platform can forward the -request to the right agent. If `callback` returns `null` / `undefined` the -agent's own SWML is returned instead (normal processing). - -Mirrors Python `swml_service.register_routing_callback` / -`web_mixin.register_routing_callback`. - -#### Signature - -```typescript -registerRoutingCallback(callback: RoutingCallback, path: string = '/sip'): this -``` - -#### Parameters - - - Function receiving the parsed request body and returning a route string to redirect, or null/undefined for normal processing. - - - - HTTP path where this callback endpoint is registered (default: '/sip'). - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1102. - -*** - -### registerSipUsername - -Register a SIP username to route to this agent. - -#### Signature - -```typescript -registerSipUsername(username: string): this -``` - -#### Parameters - - - The SIP username to register. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1040. - -*** - -### registerSwaigFunction - -Register a SwaigFunction instance or a raw function descriptor (DataMap). - -#### Signature - -```typescript -registerSwaigFunction(fn: Record | SwaigFunction): this -``` - -#### Parameters - - - -#### Returns - -`this` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 472. - -*** - -### registerVerbHandler - -Register a custom verb handler. -Mirrors Python's `register_verb_handler()`. - -#### Signature - -```typescript -registerVerbHandler(handler: SWMLVerbHandler): void -``` - -#### Parameters - - - The verb handler to register. - - -#### Returns - -`void` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 726. - -*** - -### removeFunction - -Remove a registered SWAIG function. Returns true when removed, -false when not found. (Python parity: -`ToolRegistry.remove_function`.) - -#### Signature - -```typescript -removeFunction(name: string): boolean -``` - -#### Parameters - - - -#### Returns - -`boolean` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 540. - -*** - -### removeSkill - -Remove a previously added skill by its instance ID. - -#### Signature - -```typescript -removeSkill(instanceId: string): Promise -``` - -#### Parameters - - - The unique instance ID of the skill to remove. - - -#### Returns - -`Promise` — True if the skill was found and removed. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1654. - -*** - -### removeSkillByName - -Remove a skill by its name (Python parity). - -Python's `remove_skill(skill_name)` removes by skill name. -The existing `removeSkill(instanceId)` removes by instance ID. -This method provides name-based removal for cross-SDK parity. - -#### Signature - -```typescript -removeSkillByName(skillName: string): Promise -``` - -#### Parameters - - - The skill name to remove. - - -#### Returns - -`Promise` — True if a skill with that name was found and removed. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1690. - -*** - -### renderDocument - -Render the SWML document as a JSON string. -Mirrors Python's `render_document()`. - -#### Signature - -```typescript -renderDocument(): string -``` - -#### Returns - -`string` — JSON-encoded SWML document. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 715. - -*** - -### renderSwml - -Render the complete SWML document by assembling all 5 phases: pre-answer, answer, -post-answer, AI, and post-AI verbs. - -#### Signature - -```typescript -renderSwml(callId?: string, modifications?: Record): string -``` - -#### Parameters - - - Optional call ID to use for session tokens; auto-generated if omitted. - - - - Optional dict returned from `onSwmlRequest` to merge into the AI verb config before rendering. Matches Python's `_render_swml(modifications)` semantics: `global_data` is deep-merged; all other keys override the AI config directly. - - -#### Returns - -`string` — The rendered SWML document as a JSON string. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 2019. - -*** - -### resetContexts - -Remove all contexts, returning the agent to a no-contexts state. - -This is a convenience wrapper around `defineContexts().reset()`. -Use it in a dynamic config callback when you need to rebuild -contexts from scratch for a specific request. - -#### Signature - -```typescript -resetContexts(): this -``` - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 625. - -*** - -### resetDocument - -Reset the SWML document to an empty state. -Mirrors Python's `reset_document()`. - -#### Signature - -```typescript -resetDocument(): this -``` - -#### Returns - -`this` — This service for chaining. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 679. - -*** - -### run - -Alias for [serve](/docs/sdk-reference/reference/typescript/prefabs/receptionist-agent#serve). Starts the HTTP server. - -#### Signature - -```typescript -run(opts?: { ...2 fields }): Promise -``` - -#### Parameters - - - Optional host and port overrides. - - - - - - -#### Returns - -`Promise` — A promise that resolves once the server is running. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 2702. - -*** - -### runServerless - -Handle a single serverless invocation (AWS Lambda, Google Cloud Functions, Azure Functions, or CGI). - -Matches Python `run(event, context)` when executed in a serverless environment. Python's -`run()` auto-detects the platform via `get_execution_mode()` and dispatches accordingly; -in TypeScript the serverless path is an **explicit** method so that `run()` keeps its -HTTP-server semantics and callers opt in to serverless dispatch deliberately. - -Platform detection follows the same environment-variable heuristics as Python's -`ServerlessMixin`: `AWS_LAMBDA_FUNCTION_NAME` → Lambda, `K_SERVICE` → GCF, -`FUNCTIONS_WORKER_RUNTIME` → Azure, `GATEWAY_INTERFACE` → CGI. - -Usage in a Lambda handler file: - -```ts -export const handler = (event: any, context: any) => agent.runServerless(event, context); -``` - -#### Signature - -```typescript -runServerless( - event: ServerlessEvent, - context?: unknown, - platform?: "lambda" | "gcf" | "azure" | "cgi" | "auto" -): Promise -``` - -#### Parameters - - - The serverless event payload (Lambda event, GCF request body, etc.). - - - - The serverless context object (Lambda context, Azure context, etc.). - - - - Optional platform override; defaults to 'auto' (environment detection). - - -#### Returns - -`Promise` — The normalized serverless response object. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 2728. - -*** - -### serve - -Start the HTTP server and begin listening for requests. - -Uses `@hono/node-server` under the hood. When run in CLI mode -(`SWAIG_CLI_MODE=true`, set automatically by `npx swaig-test`), this is a -no-op so agent config can be inspected without starting a server. - -#### Signature - -```typescript -serve(opts?: { ...2 fields }): Promise -``` - -#### Parameters - - - Optional host/port overrides. Defaults to the values provided in the constructor options or the `PORT` environment variable. - - - - - - -#### Returns - -`Promise` — A promise that resolves once the server has begun listening. - -#### Examples - -```typescript -const agent = new AgentBase({ name: 'demo', port: 3000 }); -await agent.serve(); -// Or override at runtime: -await agent.serve({ port: 8080, host: '127.0.0.1' }); -``` - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 2679. - -*** - -### setDynamicConfigCallback - -Set a callback invoked on each SWML request to dynamically modify an ephemeral agent copy. - -The callback receives a clone of this agent — mutations apply only to the current -request, so you can vary prompt, tools, languages, params, or global data per call -without affecting the long-lived agent instance. - -#### Signature - -```typescript -setDynamicConfigCallback(cb: DynamicConfigCallback): this -``` - -#### Parameters - - - Callback receiving `(queryParams, bodyParams, headers, agent)` where `agent` is the ephemeral `AgentBase` copy to mutate. May be async. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Examples - -```typescript -agent.setDynamicConfigCallback((query, body, headers, agent) => { - const lang = query.lang ?? 'en'; - if (lang === 'es') { - (agent as AgentBase).setPromptText('Eres un asistente útil.'); - } -}); -``` - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1723. - -*** - -### setFunctionIncludes - -Replace the entire list of function includes. -Each include must have a `url` and `functions` array. - -#### Signature - -```typescript -setFunctionIncludes(includes: FunctionInclude[]): this -``` - -#### Parameters - - - Array of function include objects. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 979. - -*** - -### setGlobalData - -Merge data into the global\_data object passed into the AI configuration. - -Matches Python `set_global_data` which calls `.update()` on the internal dict — -existing keys are preserved; incoming keys overwrite on collision. Skills and -other callers can each contribute keys without clobbering one another. - -If you need to replace the entire object, assign a new agent instance or use -`Object.assign(agent.globalData, {})` to clear first. - -#### Signature - -```typescript -setGlobalData(data: Record): this -``` - -#### Parameters - - - Key-value pairs to merge into global data. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 828. - -*** - -### setInternalFillers - -Set internal fillers for native SWAIG functions. - -Internal fillers are short phrases the AI agent speaks (via TTS) while -an internal/native function is running, so the caller doesn't hear -dead air during transitions or background work. - -Supported function names (matches the SWAIGInternalFiller schema): - -hangup — when the agent is hanging up -check\_time — when checking the time -wait\_for\_user — when waiting for user input -wait\_seconds — during deliberate pauses -adjust\_response\_latency — when adjusting response timing -next\_step — transitioning between steps in prompt.contexts -change\_context — switching between contexts in prompt.contexts -get\_visual\_input — processing visual input (enable\_vision=true) -get\_ideal\_strategy — thinking (enable\_thinking=true) - -Notably NOT supported: change\_step, gather\_submit, or arbitrary -user-defined SWAIG function names. The runtime only honors fillers -for the names listed above; everything else is silently ignored at -the SWML level. This method warns at registration time if you pass -an unknown name so you catch the typo early. - -#### Signature - -```typescript -setInternalFillers( - internalFillers: Record> -): this -``` - -#### Parameters - - - Map of function name to language-keyed filler phrases. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Examples - -```typescript -agent.setInternalFillers({ - next_step: { - 'en-US': ['Moving to the next step...', 'Great, let us continue...'], - 'es': ['Pasando al siguiente paso...'] - }, - check_time: { - 'en-US': ['Let me check the time...'] - } -}); -``` - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 910. - -*** - -### setLanguageParams - -Set (or replace) the per-language `params` dict on an already-added -language. Useful when language entries are built up via [addLanguage](/docs/sdk-reference/reference/typescript/prefabs/receptionist-agent#add-language) -first and engine-specific tuning is added later (e.g., from a config -loader). - -Python parity: `set_language_params(code, params)`. Passing an empty -object removes the `params` key entirely. Unknown codes are a no-op. - -#### Signature - -```typescript -setLanguageParams(code: string, params: Record): this -``` - -#### Parameters - - - Language code as previously passed to [addLanguage](/docs/sdk-reference/reference/typescript/prefabs/receptionist-agent#add-language) (e.g. `"en-US"`). - - - - Engine-specific params dict to attach. Empty object removes the key. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 737. - -*** - -### setLanguages - -Replace all configured languages with a new list. - -#### Signature - -```typescript -setLanguages(languages: LanguageConfig[]): this -``` - -#### Parameters - - - Array of language configurations. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 718. - -*** - -### setNativeFunctions - -Set the list of native SWAIG function names (built-in platform functions). - -#### Signature - -```typescript -setNativeFunctions(funcs: string[]): this -``` - -#### Parameters - - - Array of native function names. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 848. - -*** - -### setOnRequestCallback - -Set a callback invoked per-request to dynamically build SWML. -When set, the static SwmlBuilder is ignored and the callback's -returned SwmlBuilder is used instead. - -#### Signature - -```typescript -setOnRequestCallback(cb: OnRequestCallback): this -``` - -#### Parameters - - - Callback receiving query params, body params, and headers. - - -#### Returns - -`this` — This service for chaining. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 850. - -*** - -### setParam - -Set a single AI parameter (e.g. "temperature", "top\_p"). - -#### Signature - -```typescript -setParam(key: string, value: unknown): this -``` - -#### Parameters - - - Parameter name. - - - - Parameter value. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 800. - -*** - -### setParams - -Merge multiple AI parameters into the existing params object. - -#### Signature - -```typescript -setParams(params: Record): this -``` - -#### Parameters - - - Key-value pairs to merge. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 810. - -*** - -### setPostPrompt - -Set the post-prompt text evaluated after the call ends. - -#### Signature - -```typescript -setPostPrompt(text: string): this -``` - -#### Parameters - - - The post-prompt text to use. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 456. - -*** - -### setPostPromptLlmParams - -Merge LLM-specific parameters into the post-prompt configuration. - -#### Signature - -```typescript -setPostPromptLlmParams(params: Record): this -``` - -#### Parameters - - - Key-value LLM parameters to merge. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1001. - -*** - -### setPostPromptUrl - -Override the default post-prompt webhook URL with a custom one. - -#### Signature - -```typescript -setPostPromptUrl(url: string): this -``` - -#### Parameters - - - The custom post-prompt URL. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1847. - -*** - -### setPromptLlmParams - -Merge LLM-specific parameters into the main prompt configuration (e.g. model, temperature). - -#### Signature - -```typescript -setPromptLlmParams(params: Record): this -``` - -#### Parameters - - - Key-value LLM parameters to merge. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 991. - -*** - -### setPromptPom - -Set the prompt as a POM (Prompt Object Model) dictionary. - -Replaces the current POM sections with the provided structured data. -Each entry should have `title`, and optionally `body`, `bullets`, -`numbered`, `numberedBullets`, and `subsections`. - -#### Signature - -```typescript -setPromptPom(pom: Record[]): this -``` - -#### Parameters - - - Array of POM section dictionaries. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Throws - -- Error if POM mode is not enabled (`usePom: false`). - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 577. - -*** - -### setPromptText - -Set the main system prompt text for the AI. - -#### Signature - -```typescript -setPromptText(text: string): this -``` - -#### Parameters - - - The prompt text to use. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 446. - -*** - -### setPronunciations - -Replace all pronunciation rules with a new list. - -#### Signature - -```typescript -setPronunciations(rules: PronunciationRule[]): this -``` - -#### Parameters - - - Array of pronunciation rule objects. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 786. - -*** - -### setupGracefulShutdown - -Register process signal handlers for clean Kubernetes/Docker shutdown. -Handles SIGTERM and SIGINT, waits for a timeout, then exits. - -**Modifiers:** `static` - -#### Signature - -```typescript -setupGracefulShutdown(opts?: { ...1 fields }): void -``` - -#### Parameters - - - Optional timeout in milliseconds (default 5000). - - - - -#### Returns - -`void` - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 2751. - -*** - -### setWebHookUrl - -Override the default SWAIG webhook URL with a custom one. - -#### Signature - -```typescript -setWebHookUrl(url: string): this -``` - -#### Parameters - - - The custom webhook URL. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1837. - -*** - -### stop - -Stop the HTTP server. -Mirrors Python's `stop()`. - -#### Signature - -```typescript -stop(): void -``` - -#### Returns - -`void` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 1009. - -*** - -### swaigPreDispatch - -Extension point: invoked between argument parsing and function dispatch -on POST /swaig. Returns \[target, shortCircuit]: when shortCircuit is -non-null, it's returned directly without dispatching. AgentBase may -override to add session-token validation or ephemeral dynamic-config. - -#### Signature - -```typescript -swaigPreDispatch( - _requestData: Record, - _funcName: string -): [SWMLService, unknown] -``` - -#### Parameters - - - - - -#### Returns - -`[SWMLService, unknown]` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 592. - -*** - -### updateGlobalData - -Merge additional entries into the existing global\_data object. - -#### Signature - -```typescript -updateGlobalData(data: Record): this -``` - -#### Parameters - - - Key-value pairs to merge into global data. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 838. - -*** - -### validateBasicAuth - -Override to add custom basic-auth validation logic beyond credential matching. - -#### Signature - -```typescript -validateBasicAuth( - _username: string, - _password: string -): boolean | Promise -``` - -#### Parameters - - - The username from the request. - - - - The password from the request. - - -#### Returns - -`boolean | Promise` — True if the credentials are valid; false to reject the request. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1980. - -*** - -### validateToolToken - -Validate a tool-call token for the given function. - -Mirrors Python reference `core/mixins/state_mixin.py validate_tool_token`: - -1. Unknown function → `false`. -2. Registered but non-secure → `true` without consulting SessionManager - (non-secure tools never require a token). -3. Raw-dict descriptors (e.g. DataMap) are treated as secure, matching - Python's `isinstance(func, dict) → is_secure = True` branch. -4. Missing token on a secure tool → `false`. -5. Otherwise delegate to `SessionManager.validateToolToken`. - -Divergences from the Python reference: - -- No debug-logging branch: `AgentBase` does not expose an agent-level - debug-mode flag, so the per-call debug telemetry Python emits is - omitted. `SessionManager` still logs its own validation outcomes. -- No token-derived call-id fallback: `SessionManager.debugToken` - truncates the embedded call-id for log safety, so an extracted value - cannot be round-tripped back through `validateToolToken`. The caller - is expected to supply a non-empty `callId`; an empty one is forwarded - unchanged and the underlying validator will reject it. - -#### Signature - -```typescript -validateToolToken(functionName: string, token: string, callId: string): boolean -``` - -#### Parameters - - - - - - - -#### Returns - -`boolean` - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1455. - -## Functions - -### createReceptionistAgent - -Factory function that creates and returns a new ReceptionistAgent. - -#### Signature - -```typescript -createReceptionistAgent(config: ReceptionistConfig): ReceptionistAgent -``` - -#### Parameters - - - Configuration for the receptionist agent. - - -#### Returns - -`ReceptionistAgent` — A configured ReceptionistAgent instance. - -#### Source - -[`src/prefabs/ReceptionistAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/ReceptionistAgent.ts) - -Line 391. - -## Interfaces - -### ReceptionistConfig - -Configuration for the [ReceptionistAgent](/docs/sdk-reference/reference/typescript/prefabs/receptionist-agent). - -#### Signature - -```typescript -interface ReceptionistConfig -``` - -#### Properties - - - Additional AgentBase options forwarded to super(). - - - - Whether visitor check-in functionality is enabled. Default `false`. - - - - Optional company name. Appended to the greeting when provided. - - - - Departments the agent can transfer callers to. - - - - Initial greeting message. Defaults to the Python receptionist greeting. - - - - Agent display name (defaults to `"receptionist"`). - - - - Callback fired when a visitor checks in. - - - - HTTP route for this agent (defaults to `"/receptionist"`). - - - - Voice identifier passed to `addLanguage`. Defaults to `"rime.spore"`. - - -#### Source - -[`src/prefabs/ReceptionistAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/ReceptionistAgent.ts) - -Line 27. - -*** - -### ReceptionistDepartment - -A department the receptionist can route callers to. - -#### Signature - -```typescript -interface ReceptionistDepartment -``` - -#### Properties - - - Description of the department's purpose (shown to the AI). - - - - Department identifier (e.g. `"sales"`, `"support"`). - - - - Phone number (or SIP address) used by `transfer_call`. - - -#### Source - -[`src/prefabs/ReceptionistAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/ReceptionistAgent.ts) - -Line 17. - -## Source - -[`src/prefabs/ReceptionistAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/ReceptionistAgent.ts) - -Line 84. diff --git a/fern/products/sdk-reference/typescript/prefabs/survey-agent/index.mdx b/fern/products/sdk-reference/typescript/prefabs/survey-agent/index.mdx deleted file mode 100644 index dccdfb5e6c..0000000000 --- a/fern/products/sdk-reference/typescript/prefabs/survey-agent/index.mdx +++ /dev/null @@ -1,3823 +0,0 @@ ---- -slug: "/reference/typescript/prefabs/survey-agent" -title: "SurveyAgent" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "prefabs.SurveyAgent" - module: "prefabs" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/SurveyAgent.ts" ---- -# `SurveyAgent` - -Prefab agent that conducts surveys with branching logic, answer scoring, and conditional question flow. - -Each survey question declares its response type (rating, yes/no, open text, etc.), an optional -set of conditional follow-ups, and a scoring map. The agent walks the question tree, tallies a -total score, and exposes the full response map at call end via `onSummary()`. - -## Signature - -```typescript -class SurveyAgent extends AgentBase -``` - -## Inheritance - -**Extends:** [AgentBase](/docs/sdk-reference/reference/typescript/agent-base) - -## Examples - -```typescript -import { SurveyAgent } from '@signalwire/sdk'; - -const agent = new SurveyAgent({ - surveyName: 'CSAT', - brandName: 'Acme Co', - questions: [ - { id: 'q1', text: 'How satisfied were you with our service?', type: 'rating', scale: 5 }, - { id: 'q2', text: 'Would you recommend us to a friend?', type: 'yesno' }, - { id: 'q3', text: 'Anything else you want to share?', type: 'open' }, - ], -}); - -await agent.serve({ port: 3000 }); -``` - -## Properties - - - Unique identifier for this agent instance. - - - - - - - - Brand/company name used in prompts. - - - - Closing message shown when the survey completes. - - - - Domain name for SSL. Mirrors Python's `self.domain`. - - - - Check if full JSON Schema validation is enabled. Mirrors Python's `@property full_validation_enabled`. - - - - Host the server binds to. - - - - Opening message before the first question. - - - - Structured logger instance for this agent. Override the inherited SWMLService logger with an AgentBase-tagged one. - - - - Maximum number of times to retry invalid answers. - - - - Service display name. - - - - Public accessor for the native functions list. Python exposes `self.native_functions` as a public read/write attribute. - - - - - - Public accessor for the agent's POM as a [PromptObjectModel](/docs/sdk-reference/reference/typescript/pom/prompt-object-model) instance. Python parity: `agent.pom` instance attribute (agent\_base.py line 209) is a `signalwire.pom.pom.PromptObjectModel` when `use_pom=True`, or `None` otherwise. This getter returns the equivalent TypeScript `PromptObjectModel` instance — callers can use `addSection`, `findSection`, `renderMarkdown`, `renderXml`, `toJson`, `toYaml` exactly as in Python. The instance returned is a fresh snapshot built from the current `PomBuilder` state, so mutating it does not feed back into the agent's internal builder. To mutate the agent's prompt, use `promptAddSection` / `promptAddToSection` / `promptAddSubsection`. - - - - Port the server binds to. - - - - Static prompt sections: subclasses can define these declaratively. Each entry is applied via promptAddSection() in the constructor. - - - - Public accessor for the PromptManager (POM). Python exposes `self.pom` as a public attribute. This getter provides equivalent access for direct POM manipulation. - - - - The configured survey questions (public, matching Python). - - - - HTTP route path. - - - - Schema validation utilities. Mirrors Python's `self.schema_utils`. - - - - Unified security configuration. Mirrors Python's `self.security`. - - - - Public read-only accessor for the SkillManager. Python exposes `self.skill_manager` as a public attribute. This getter provides equivalent read access. - - - - Path to SSL certificate. Mirrors Python's `self.ssl_cert_path`. - - - - Whether SSL is enabled. Mirrors Python's `self.ssl_enabled`. - - - - Path to SSL private key. Mirrors Python's `self.ssl_key_path`. - - - - The complete set of internal SWAIG function names that accept fillers, matching the SWAIGInternalFiller schema definition. Any name outside this set is silently ignored by the runtime — addInternalFiller / setInternalFillers warn if you pass an unknown name. - - - - Human-readable survey name. - - - - - - - - Custom verb handler registry. Mirrors Python's `self.verb_registry`. - - -## Methods - -### addAnswerVerb - -Configure the answer verb (phase 2) with optional settings. - -#### Signature - -```typescript -addAnswerVerb(config?: Record): this -``` - -#### Parameters - - - Optional answer verb configuration. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1501. - -*** - -### addFunctionInclude - -Add a remote SWAIG function include reference. - -#### Signature - -```typescript -addFunctionInclude( - url: string, - functions: string[], - metaData?: Record -): this -``` - -#### Parameters - - - URL of the remote SWAIG endpoint. - - - - Function names available at that endpoint. - - - - Optional metadata to attach to the include. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 966. - -*** - -### addHint - -Add a single speech-recognition hint. - -#### Signature - -```typescript -addHint(hint: string): this -``` - -#### Parameters - - - Word or phrase to boost in speech recognition. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 653. - -*** - -### addHints - -Add multiple speech-recognition hints at once. - -#### Signature - -```typescript -addHints(hints: string[]): this -``` - -#### Parameters - - - Array of words or phrases to boost. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 663. - -*** - -### addInternalFiller - -Add internal filler phrases for a single internal function and language. - -See [setInternalFillers](/docs/sdk-reference/reference/typescript/prefabs/survey-agent#set-internal-fillers) for the complete list of supported -functionName values and an explanation of what fillers do. - -#### Signature - -```typescript -addInternalFiller( - functionName: string, - languageCode: string, - fillers: string[] -): this -``` - -#### Parameters - - - One of the supported internal function names (see SUPPORTED\_INTERNAL\_FILLER\_NAMES). Names outside the supported set log a warning and are ignored by the runtime. - - - - BCP-47 language code for the fillers (e.g. 'en-US'). - - - - Array of filler phrases. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 943. - -*** - -### addLanguage - -Add a supported language to the AI configuration. - -#### Signature - -```typescript -addLanguage(config: LanguageConfig): this -``` - -#### Parameters - - - Language configuration including name, code, voice, and optional fillers. `params` may be set to attach engine-specific tuning (voice stability, similarity boost, model knobs, etc.); only emitted into SWML when non-empty so existing entries stay byte-identical when no params are passed (Python ai\_config\_mixin.py `add_language`). - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 694. - -*** - -### addMcpServer - -Add an external MCP server for tool discovery and invocation. -Tools are discovered via MCP protocol at session start and added to the AI's tool list. - -#### Signature - -```typescript -addMcpServer(url: string, opts?: { ...3 fields }): this -``` - -#### Parameters - - - MCP server HTTP endpoint URL - - - - Optional configuration: headers, resources, resourceVars - - - - - - - - -#### Returns - -`this` — This agent instance for chaining - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1146. - -*** - -### addPatternHint - -Add a pattern-based speech-recognition hint with find-and-replace behavior. - -#### Signature - -```typescript -addPatternHint(opts: { ...4 fields }): this -``` - -#### Parameters - - - Pattern hint configuration with a descriptive hint label, regex pattern, replacement string, and optional case-insensitive flag. - - - - - - - - - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 674. - -*** - -### addPostAiVerb - -Add a SWML verb to execute after the AI verb (phase 5). - -#### Signature - -```typescript -addPostAiVerb(verbName: string, config: Record): this -``` - -#### Parameters - - - Name of the SWML verb. - - - - Verb configuration object. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1523. - -*** - -### addPostAnswerVerb - -Add a SWML verb to execute after the answer phase but before the AI verb (phase 3). - -#### Signature - -```typescript -addPostAnswerVerb( - verbName: string, - config: number | Record -): this -``` - -#### Parameters - - - Name of the SWML verb. - - - - Verb configuration object. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1512. - -*** - -### addPreAnswerVerb - -Add a SWML verb to execute before the answer phase (phase 1). - -#### Signature - -```typescript -addPreAnswerVerb( - verbName: string, - config: number | Record -): this -``` - -#### Parameters - - - Name of the SWML verb (e.g. "play", "record"). - - - - Verb configuration object. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1491. - -*** - -### addPronunciation - -Add a pronunciation override rule for the TTS engine. - -#### Signature - -```typescript -addPronunciation(rule: PronunciationRule): this -``` - -#### Parameters - - - Pronunciation rule specifying the text to replace and its substitute. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 774. - -*** - -### addSection - -Add a new named section to the SWML document. -Mirrors Python's `add_section()`. - -#### Signature - -```typescript -addSection(sectionName: string): this -``` - -#### Parameters - - - Name of the section to create. - - -#### Returns - -`this` — This service for chaining. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 653. - -*** - -### addSkill - -Add a skill to this agent, registering its tools, prompt sections, hints, and global data. - -#### Signature - -```typescript -addSkill(skill: SkillBase): Promise -``` - -#### Parameters - - - The skill instance to add. - - -#### Returns - -`Promise` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1570. - -*** - -### addSkillByName - -Add a skill by its registered name, looking it up in the global SkillRegistry. - -Matches Python's `add_skill(skill_name, params)` which loads skills by string -name via the SkillManager registry. Throws a `ValueError`-equivalent if the -skill name is not found in the registry. - -Accepts a typed [SkillNameOrString](/docs/sdk-reference/reference/typescript/skills/skill-name#skill-name-or-string): one of the built-in -`SkillName` values (autocompleted, with a typo caught at compile -time) or any other string for custom / third-party skills. The value is -forwarded to the registry unchanged — the typing is erased at runtime, so -this matches Python's bare-`str` `add_skill(skill_name, params)`. - -#### Signature - -```typescript -addSkillByName( - skillName: SkillNameOrString, - params?: SkillConfig -): Promise -``` - -#### Parameters - - - The name the skill was registered under in the SkillRegistry. - - - - Optional configuration parameters forwarded to the skill factory. - - -#### Returns - -`Promise` — This agent instance for chaining. - -#### Throws - -- Error if no skill with the given name is registered. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1641. - -*** - -### addSwaigQueryParams - -Add extra query parameters appended to all SWAIG webhook URLs. - -#### Signature - -```typescript -addSwaigQueryParams(params: Record): this -``` - -#### Parameters - - - Key-value pairs to append as query parameters. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1733. - -*** - -### addVerb - -Add a verb to the SWML document. - -#### Signature - -```typescript -addVerb(name: string, config: unknown): this -``` - -#### Parameters - - - Verb name (e.g., 'answer', 'play', 'hangup'). - - - - Verb configuration. - - -#### Returns - -`this` — This service for chaining. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 642. - -*** - -### addVerbToSection - -Add a verb to a specific named section. -Mirrors Python's `add_verb_to_section()`. - -#### Signature - -```typescript -addVerbToSection(sectionName: string, verbName: string, config: unknown): this -``` - -#### Parameters - - - Target section name (auto-created if missing). - - - - Verb name. - - - - Verb configuration. - - -#### Returns - -`this` — This service for chaining. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 669. - -*** - -### asRouter - -Return this agent's Hono app for mounting as a sub-router in an AgentServer. - -#### Signature - -```typescript -asRouter(): Hono -``` - -#### Returns - -`Hono` — The Hono application instance. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 2656. - -*** - -### autoMapSipUsernames - -Automatically register common SIP usernames based on this agent's -name and route. Derives cleaned variants (alphanumeric + underscore) -and registers each via `registerSipUsername()`. - -Port of Python's `auto_map_sip_usernames()`: - -- Registers a cleaned version of the agent name -- Registers a cleaned version of the route (if different from name) -- For names longer than 3 characters, also registers a vowel-stripped variant - -#### Signature - -```typescript -autoMapSipUsernames(): this -``` - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1058. - -*** - -### buildSwmlForRequest - -Service-side SWML-builder hook. Subclasses return a `SwmlBuilder` -to fully replace the document for this request, or `null` to fall -through to `setOnRequestCallback` or the static builder. - -This is distinct from the WebMixin `onRequest(requestData, -callbackPath)` hook on AgentBase (which mirrors Python's -`on_request -> on_swml_request` modification-merge contract). -Use this hook when you want to swap the entire SWML builder; use -`onRequest` / `onSwmlRequest` on AgentBase when you want to merge -targeted modifications into the rendered document. - -Default implementation returns `null` (no-op). - -#### Signature - -```typescript -buildSwmlForRequest( - _queryParams: Record, - _bodyParams: Record, - _headers: Record, - _callbackPath?: string -): SwmlBuilder | null -``` - -#### Parameters - - - - - - - - - -#### Returns - -`SwmlBuilder | null` — A `SwmlBuilder` whose document is sent as the response, or `null` to delegate to the next handler in the chain. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 834. - -*** - -### clearPostAiVerbs - -Remove all post-AI verbs. - -#### Signature - -```typescript -clearPostAiVerbs(): this -``` - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1550. - -*** - -### clearPostAnswerVerbs - -Remove all post-answer verbs. - -#### Signature - -```typescript -clearPostAnswerVerbs(): this -``` - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1541. - -*** - -### clearPreAnswerVerbs - -Remove all pre-answer verbs. - -#### Signature - -```typescript -clearPreAnswerVerbs(): this -``` - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1532. - -*** - -### clearSwaigQueryParams - -Clear all SWAIG query parameters. - -#### Signature - -```typescript -clearSwaigQueryParams(): this -``` - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1742. - -*** - -### constructor - -Create a SurveyAgent with the specified questions and callbacks. - -#### Signature - -```typescript -constructor(config: SurveyConfig): SurveyAgent -``` - -#### Parameters - - - Configuration including questions, messages, and completion callback. - - -#### Returns - -`SurveyAgent` - -#### Source - -[`src/prefabs/SurveyAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/SurveyAgent.ts) - -Line 133. - -*** - -### createToolToken - -Mint a per-call SWAIG-function token via the agent's SessionManager. - -Mirrors Python reference `core/mixins/state_mixin.py _create_tool_token`: -delegates to `SessionManager.createToolToken` and returns an empty -string on any failure (Python catches all exceptions and returns ""). - -#### Signature - -```typescript -createToolToken(toolName: string, callId: string): string -``` - -#### Parameters - - - - - -#### Returns - -`string` - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1475. - -*** - -### defineContexts - -Define or replace the contexts configuration for the AI verb. - -#### Signature - -```typescript -defineContexts( - contexts?: Record | ContextBuilder -): ContextBuilder -``` - -#### Parameters - - - An existing ContextBuilder instance or a plain object; a new ContextBuilder is created if omitted. - - -#### Returns - -`ContextBuilder` — The active ContextBuilder for further configuration. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 604. - -*** - -### defineTool - -Register a SWAIG tool (function) that the AI can invoke during a call. - -#### How this becomes a tool the model sees - -A SWAIG function is **exactly the same concept** as a "tool" in -native OpenAI / Anthropic tool calling. On every LLM turn, the SDK -renders each registered SWAIG function into the OpenAI tool schema: - -```json -{ -"type": "function", -"function": { -"name": "your_name_here", -"description": "your description text", -"parameters": { /* your JSON schema */ } -} -} -``` - -That schema goes to the model in the same API call that produces -the next assistant message. The model reads: - -- the **function `description`** to decide WHEN to call this tool -- each **parameter `description`** (inside the JSON schema) to - decide HOW to fill in each argument - -This means **descriptions are prompt engineering**, not developer -comments. A vague description is the #1 cause of "the model has the -right tool but doesn't call it" failures. - -##### Bad vs good descriptions - -```text -BAD : description: 'Lookup function' -GOOD: description: 'Look up a customer's account details by account -number. Use this BEFORE quoting any account-specific info -(balance, plan, status). Do not use for general product -questions.' - -BAD : parameters: { id: { type: 'string', description: 'the id' } } -GOOD: parameters: { account_number: { type: 'string', description: -'The customer's 8-digit account number, no dashes or spaces. -Ask the user if they don't provide it.' } } -``` - -##### Tool count matters - -LLM tool selection accuracy degrades past ~7-8 simultaneously-active -tools per call. Use Step.setFunctions() to partition tools across -steps so only the relevant subset is active at any moment. - -#### Signature - -```typescript -defineTool(opts: { ...11 fields }): this -``` - -#### Parameters - - - Tool definition including name, description, parameter schema, and handler callback. `description` and per-parameter `description` strings are LLM-facing prompt engineering. - - - - - Additional fields to pass through to the SWAIG function definition (Python `**swaig_fields` equivalent). - - - - - - - - - - - - - - - - - - - - External webhook URL; makes this an externally-hosted tool. - - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1330. - -*** - -### defineTools - -Register SWAIG tools: - -- Python-parity tools: `validate_response`, `log_response` -- TS-specific session tools: `answer_question`, `get_current_question`, `get_survey_progress` - -#### Signature - -```typescript -defineTools(): void -``` - -#### Returns - -`void` - -#### Source - -[`src/prefabs/SurveyAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/SurveyAgent.ts) - -Line 409. - -*** - -### defineTypedTool - -Register a SWAIG tool with a typed handler that receives named parameters -instead of the standard `(args, rawData)` convention. - -The SDK wraps the handler to unpack the args dict into positional params. -If no `parameters` schema is provided, one is inferred from the handler's -source code (parameter names and default values). - -#### Signature - -```typescript -defineTypedTool(opts: { ...9 fields }): this -``` - -#### Parameters - - - Tool definition with a typed handler function. - - - - - - - The typed handler. Receives the AI-extracted arguments as named positional parameters (in declaration order), optionally with a trailing `rawData` record, and returns a SWAIG result. Precisely typed as [TypedToolHandler](/docs/sdk-reference/reference/typescript/type-inference#typed-tool-handler) rather than the bare `Function` so a non-callable — or a callable that returns nothing usable — is a compile-time error. - - - - - - - - - - - - - - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1373. - -*** - -### enableDebugEvents - -Enable debug event webhooks for this agent. - -#### Signature - -```typescript -enableDebugEvents(level: number = 1): this -``` - -#### Parameters - - - Debug verbosity level (defaults to 1). - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1011. - -*** - -### enableDebugRoutes - -Register a callback function that determines routing based on POST data. - -When a routing callback is registered, an endpoint at the specified path -is created in `getApp()`. The callback receives the request body and returns -Enable debug routes for testing and development. - -This is a backward-compatibility stub matching the Python SDK. -In the TypeScript SDK, debug routes (health, ready, debug\_events) -are automatically registered in `getApp()`. - -#### Signature - -```typescript -enableDebugRoutes(): this -``` - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1773. - -*** - -### enableMcpServer - -Expose this agent's tools as an MCP server endpoint at /mcp. -Adds a JSON-RPC 2.0 endpoint that MCP clients (Claude Desktop, other agents) can connect to. - -#### Signature - -```typescript -enableMcpServer(): this -``` - -#### Returns - -`this` — This agent instance for chaining - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1160. - -*** - -### enableSipRouting - -Enable SIP routing for this agent. - -#### Signature - -```typescript -enableSipRouting(autoMap: boolean = true, path: string = '/sip'): this -``` - -#### Parameters - - - When true, automatically map SIP usernames to the agent route (defaults to true). - - - - HTTP path for the SIP routing endpoint (defaults to '/sip'). - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1025. - -*** - -### extractSipUsername - -Extract the SIP username from a request body's call.to field. - -**Modifiers:** `static` - -#### Signature - -```typescript -extractSipUsername(requestBody: Record): string | null -``` - -#### Parameters - - - The parsed request body containing call information. - - -#### Returns - -`string | null` — The extracted SIP username, or null if not found. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1122. - -*** - -### getAllFunctions - -Snapshot of all registered SWAIG functions keyed by name. -(Python parity: `ToolRegistry.get_all_functions`.) - -#### Signature - -```typescript -getAllFunctions(): Record> -``` - -#### Returns - -`Record>` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 529. - -*** - -### getApp - -Get or lazily create the Hono HTTP application with all routes, middleware, auth, and CORS. - -#### Signature - -```typescript -getApp(): Hono -``` - -#### Returns - -`Hono` — The configured Hono application instance. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 2269. - -*** - -### getBasicAuthCredentials - -Get the basic-auth credentials used by this agent. - -#### Signature - - - - ```typescript - getBasicAuthCredentials(includeSource?: false): [string, string] - ``` - - - - ```typescript - getBasicAuthCredentials( - includeSource: true - ): [string, string, "provided" | "environment" | "generated"] - ``` - - - -#### Parameters (Overload 1) - - - When true, a third element indicating the credential source is appended. - - -#### Parameters (Overload 2) - - - When true, a third element indicating the credential source is appended. - - -#### Returns (Overload 1) - -`[string, string]` — A tuple of \[username, password] or \[username, password, source]. - -#### Returns (Overload 2) - -`[string, string, "provided" | "environment" | "generated"]` — A tuple of \[username, password] or \[username, password, source]. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 2794. - -*** - -### getBuilder - -Get the underlying SwmlBuilder for direct manipulation. - -#### Signature - -```typescript -getBuilder(): SwmlBuilder -``` - -#### Returns - -`SwmlBuilder` — The SwmlBuilder instance. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 632. - -*** - -### getContexts - -Get the contexts dictionary as serialised SWML, or null when no -contexts have been defined yet. - -Matches Python `PromptManager.get_contexts()` which returns the -contexts dict or `None`. - -#### Signature - -```typescript -getContexts(): Record | null -``` - -#### Returns - -`Record | null` — Contexts dict, or null when no contexts are defined. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 641. - -*** - -### getDocument - -Get the SWML document as a dictionary. -Alias for `renderSwml()` that matches Python's `get_document()` name. - -#### Signature - -```typescript -getDocument(): Record -``` - -#### Returns - -`Record` — The SWML document. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 706. - -*** - -### getFullUrl - -Get the full external URL of this agent, using the proxy base URL if available. - -#### Signature - -```typescript -getFullUrl(includeAuth: boolean = false): string -``` - -#### Parameters - - - Whether to embed basic-auth credentials in the URL (defaults to false). - - -#### Returns - -`string` — The fully-qualified URL string. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1857. - -*** - -### getFunction - -Get a registered SWAIG function entry, or undefined. -(Python parity: `ToolRegistry.get_function`.) - -#### Signature - -```typescript -getFunction(name: string): Record | SwaigFunction | undefined -``` - -#### Parameters - - - -#### Returns - -`Record | SwaigFunction | undefined` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 523. - -*** - -### getLanguageParams - -Read the per-language `params` dict for a previously-added language. - -Python parity: `get_language_params(code)`. Returns `undefined` if the -code is unknown or the language has no params set — no exception path. - -#### Signature - -```typescript -getLanguageParams(code: string): Record | undefined -``` - -#### Parameters - - - Language code as previously passed to [addLanguage](/docs/sdk-reference/reference/typescript/prefabs/survey-agent#add-language). - - -#### Returns - -`Record | undefined` — The params dict if set, `undefined` otherwise (including when the code is unknown). - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 760. - -*** - -### getMcpServers - -Get configured MCP servers (read-only copy). - -#### Signature - -```typescript -getMcpServers(): Record[] -``` - -#### Returns - -`Record[]` - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1171. - -*** - -### getName - -Get the agent's display name. - -#### Signature - -```typescript -getName(): string -``` - -#### Returns - -`string` — The agent name string. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1559. - -*** - -### getPostPrompt - -Get the post-prompt text, if one has been set. - -#### Signature - -```typescript -getPostPrompt(): string | null -``` - -#### Returns - -`string | null` — The post-prompt string, or null if not configured. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 548. - -*** - -### getPrompt - -Get the fully rendered main prompt text. - -#### Signature - -```typescript -getPrompt(): string -``` - -#### Returns - -`string` — The assembled prompt string. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 520. - -*** - -### getPromptPom - -Get the raw POM (Prompt Object Model) structure as an array of section data objects, -when the agent is in POM mode and has at least one section. - -Matches Python `get_prompt()` which returns `Union[str, List[Dict]]` — a raw list when -in POM mode (via `pom.to_list()` / `pom.render_dict()`), or a string otherwise. -The TS `getPrompt()` always returns a string (rendered Markdown), so this companion -method exposes the raw POM structure for callers that need it for serialisation or -inspection (e.g. skills that inspect prompt sections). - -#### Signature - -```typescript -getPromptPom(): Record[] | null -``` - -#### Returns - -`Record[] | null` — An array of POM section data objects, or null if not in POM mode or POM is empty. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 536. - -*** - -### getRawPrompt - -Get the raw prompt text whatever `setPromptText` stored, or null when -no raw prompt has been set. - -Matches Python `PromptManager.get_raw_prompt()` which returns the raw -stored string or `None`. Use this instead of `getPrompt()` when you -need the unrendered text rather than the POM-rendered Markdown. - -#### Signature - -```typescript -getRawPrompt(): string | null -``` - -#### Returns - -`string | null` — The raw prompt string, or null if not set. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 562. - -*** - -### getRegisteredTools - -Get a summary of all registered tools with their names, descriptions, and -parameter schemas. Lifted from AgentBase so the swaig-test CLI can list -tools on a non-AgentBase SWMLService target (sidecar / standalone SWAIG -host). - -#### Signature - -```typescript -getRegisteredTools(): { description: string; name: string; parameters: Record }[] -``` - -#### Returns - -`{ description: string; name: string; parameters: Record }[]` — Array of tool descriptors. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 557. - -*** - -### getTool - -Look up a registered SwaigFunction by name. Lifted from AgentBase so -`swaig-test --exec ` works against a non-AgentBase SWMLService -target. - -#### Signature - -```typescript -getTool(name: string): SwaigFunction | undefined -``` - -#### Parameters - - - The tool name to search for. - - -#### Returns - -`SwaigFunction | undefined` — The SwaigFunction instance, or undefined if not found or not a SwaigFunction. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 581. - -*** - -### getTools - -Public access to the list of registered tools. - -In Python, `define_tools()` is public and returns `List[SWAIGFunction]`. -In TypeScript, `defineTools()` is a protected setup hook (void). This -method provides the equivalent public "get all tools" capability. - -#### Signature - -```typescript -getTools(): SwaigFunction[] -``` - -#### Returns - -`SwaigFunction[]` — Array of all registered SwaigFunction instances. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 371. - -*** - -### handleMcpRequest - -Handle an MCP JSON-RPC 2.0 request. Returns the response object. - -#### Signature - -```typescript -handleMcpRequest( - body: Record -): Promise> -``` - -#### Parameters - - - -#### Returns - -`Promise>` - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1204. - -*** - -### hasFunction - -Whether a SWAIG function with the given name is registered. -(Python parity: `ToolRegistry.has_function`.) - -#### Signature - -```typescript -hasFunction(name: string): boolean -``` - -#### Parameters - - - -#### Returns - -`boolean` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 517. - -*** - -### hasSkill - -Check whether a skill with the given name is registered. - -Accepts a typed [SkillNameOrString](/docs/sdk-reference/reference/typescript/skills/skill-name#skill-name-or-string) so built-in names autocomplete -and a typo is a compile-time error; any other string is still accepted -(custom skills / parity with Python's bare-`str` `has_skill`). - -#### Signature - -```typescript -hasSkill(skillName: SkillNameOrString): boolean -``` - -#### Parameters - - - The skill name to check. - - -#### Returns - -`boolean` — True if a skill with that name exists. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1676. - -*** - -### hasTool - -Whether a tool with the given name is registered. - -#### Signature - -```typescript -hasTool(name: string): boolean -``` - -#### Parameters - - - -#### Returns - -`boolean` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 511. - -*** - -### isMcpServerEnabled - -Check if MCP server endpoint is enabled. - -#### Signature - -```typescript -isMcpServerEnabled(): boolean -``` - -#### Returns - -`boolean` - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1166. - -*** - -### listSkills - -List all registered skills with their names, instance IDs, and initialization status. - -#### Signature - -```typescript -listSkills(): { initialized: boolean; instanceId: string; name: string }[] -``` - -#### Returns - -`{ initialized: boolean; instanceId: string; name: string }[]` — Array of skill descriptors. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1662. - -*** - -### listToolNames - -List registered tool names in insertion order (Map preserves it). - -#### Signature - -```typescript -listToolNames(): string[] -``` - -#### Returns - -`string[]` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 545. - -*** - -### manualSetProxyUrl - -Manually set the proxy base URL used for webhook URL generation. - -#### Signature - -```typescript -manualSetProxyUrl(url: string): this -``` - -#### Parameters - - - The external-facing base URL (trailing slashes are stripped). - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1754. - -*** - -### onDebugEvent - -Lifecycle hook called when a debug event webhook is received. Override in subclasses. - -#### Signature - -```typescript -onDebugEvent(_event: Record): void | Promise -``` - -#### Parameters - - - The debug event payload. - - -#### Returns - -`void | Promise` - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1970. - -*** - -### onFunctionCall - -Hook called before each SWAIG function execution. Override in subclasses. - -**Behavioral note:** In the Python SDK, `on_function_call` IS the dispatcher -— it retrieves and executes the function, returning the result. In TypeScript, -`fn.execute()` is called separately after this hook. However, if this method -returns a non-void value, it is used as the result and the default execution -is skipped, enabling dispatch interception parity with Python. - -#### Signature - -```typescript -onFunctionCall( - _name: string, - _args: Record, - _rawData: Record -): void | Record | Promise> -``` - -#### Parameters - - - Name of the function about to execute. - - - - Parsed arguments for the function. - - - - The full raw SWAIG request payload. - - -#### Returns - -`void | Record | Promise>` — Optionally a result dict to short-circuit default execution, or void/undefined to proceed normally. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1999. - -*** - -### onRequest - -Lifecycle hook called when SWML is requested. Default delegates to -[onSwmlRequest](/docs/sdk-reference/reference/typescript/prefabs/survey-agent#on-swml-request) and returns its result. Subclasses typically -override `onSwmlRequest` rather than this method. - -Matches Python `WebMixin.on_request(request_data, callback_path)`. The -cross-language API is the two-arg form; the Hono `context` argument is -a TypeScript-side extra preserved for callers that already have it but -is not part of the audited surface. - -#### Signature - -```typescript -onRequest( - requestData?: Record | null, - callbackPath?: string | null -): void | Record | Promise> -``` - -#### Parameters - - - The parsed request body. - - - - Optional callback path from the request. - - -#### Returns - -`void | Record | Promise>` — Optionally a dict of SWML modifications, or undefined for default rendering. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1935. - -*** - -### onSummary - -Process the survey results summary returned at the end of a call. -Mirrors Python `on_summary`: structured (dict-like) summaries are logged -as JSON; unstructured summaries are logged verbatim. - -The parameter type widens the base `AgentBase.onSummary` signature to -accept string payloads as well, matching Python's `isinstance(summary, dict)` -branch even though the current framework only surfaces object summaries. - -#### Signature - -```typescript -onSummary( - summary: string | Record | null, - _rawData: Record -): void | Promise -``` - -#### Parameters - - - - - -#### Returns - -`void | Promise` - -#### Source - -[`src/prefabs/SurveyAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/SurveyAgent.ts) - -Line 639. - -*** - -### onSwmlRequest - -Lifecycle hook called on every SWML request before rendering. Override in subclasses. - -May optionally return a modification dict that will be merged into the -rendered SWML document (matching Python's `Optional[dict]` return type). - -Matches Python `on_swml_request(request_data, callback_path, request)` — the third -parameter is the FastAPI `Request` in Python; here it is the raw Hono context object -so that subclasses can access query parameters (`context.req.query()`), raw request -headers (`context.req.raw.headers`), etc. - -#### Signature - -```typescript -onSwmlRequest( - _rawData: Record, - _callbackPath?: string, - _context?: any -): void | Record | Promise> -``` - -#### Parameters - - - The parsed request body. - - - - Optional callback path from the request. - - - - The raw Hono context object (c), providing access to headers and query params. - - -#### Returns - -`void | Record | Promise>` — Optionally a dict of SWML modifications, or void. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1958. - -*** - -### promptAddSection - -Add a new section to the prompt with optional body, bullets, and subsections. - -#### Signature - -```typescript -promptAddSection(title: string, opts?: { ...5 fields }): this -``` - -#### Parameters - - - Section heading. - - - - Optional section content including body text, bullet points, and subsections. - - - - - - - - - - - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 467. - -*** - -### promptAddSubsection - -Add a subsection under an existing prompt section. - -#### Signature - -```typescript -promptAddSubsection( - parentTitle: string, - title: string, - opts?: { ...2 fields } -): this -``` - -#### Parameters - - - Title of the parent section. - - - - Title of the new subsection. - - - - Optional body text and bullet points for the subsection. - - - - - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 502. - -*** - -### promptAddToSection - -Append content to an existing prompt section. - -#### Signature - -```typescript -promptAddToSection(title: string, opts?: { ...3 fields }): this -``` - -#### Parameters - - - Title of the section to append to. - - - - Content to add: body text, a single bullet, or multiple bullets. - - - - - - - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 487. - -*** - -### promptHasSection - -Check whether a prompt section with the given title exists. - -#### Signature - -```typescript -promptHasSection(title: string): boolean -``` - -#### Parameters - - - Section title to look for. - - -#### Returns - -`boolean` — True if the section exists. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 512. - -*** - -### registerAdditionalRoutes - -Extension point: register additional Hono routes after SWMLService -mounts /health, /ready, /swaig, and the main route. AgentBase uses -this to add /post\_prompt, /check\_for\_input, /debug\_events, /mcp. - -#### Signature - -```typescript -registerAdditionalRoutes(_app: Hono): void -``` - -#### Parameters - - - -#### Returns - -`void` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 604. - -*** - -### registerRoutingCallback - -Register a callback at a specific HTTP path that decides how to route an -incoming request. - -When called, the endpoint at `path` will invoke `callback` with the parsed -request body. If `callback` returns a non-empty route string the server -responds with `{ action: "redirect", route }` so the platform can forward the -request to the right agent. If `callback` returns `null` / `undefined` the -agent's own SWML is returned instead (normal processing). - -Mirrors Python `swml_service.register_routing_callback` / -`web_mixin.register_routing_callback`. - -#### Signature - -```typescript -registerRoutingCallback(callback: RoutingCallback, path: string = '/sip'): this -``` - -#### Parameters - - - Function receiving the parsed request body and returning a route string to redirect, or null/undefined for normal processing. - - - - HTTP path where this callback endpoint is registered (default: '/sip'). - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1102. - -*** - -### registerSipUsername - -Register a SIP username to route to this agent. - -#### Signature - -```typescript -registerSipUsername(username: string): this -``` - -#### Parameters - - - The SIP username to register. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1040. - -*** - -### registerSwaigFunction - -Register a SwaigFunction instance or a raw function descriptor (DataMap). - -#### Signature - -```typescript -registerSwaigFunction(fn: Record | SwaigFunction): this -``` - -#### Parameters - - - -#### Returns - -`this` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 472. - -*** - -### registerVerbHandler - -Register a custom verb handler. -Mirrors Python's `register_verb_handler()`. - -#### Signature - -```typescript -registerVerbHandler(handler: SWMLVerbHandler): void -``` - -#### Parameters - - - The verb handler to register. - - -#### Returns - -`void` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 726. - -*** - -### removeFunction - -Remove a registered SWAIG function. Returns true when removed, -false when not found. (Python parity: -`ToolRegistry.remove_function`.) - -#### Signature - -```typescript -removeFunction(name: string): boolean -``` - -#### Parameters - - - -#### Returns - -`boolean` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 540. - -*** - -### removeSkill - -Remove a previously added skill by its instance ID. - -#### Signature - -```typescript -removeSkill(instanceId: string): Promise -``` - -#### Parameters - - - The unique instance ID of the skill to remove. - - -#### Returns - -`Promise` — True if the skill was found and removed. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1654. - -*** - -### removeSkillByName - -Remove a skill by its name (Python parity). - -Python's `remove_skill(skill_name)` removes by skill name. -The existing `removeSkill(instanceId)` removes by instance ID. -This method provides name-based removal for cross-SDK parity. - -#### Signature - -```typescript -removeSkillByName(skillName: string): Promise -``` - -#### Parameters - - - The skill name to remove. - - -#### Returns - -`Promise` — True if a skill with that name was found and removed. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1690. - -*** - -### renderDocument - -Render the SWML document as a JSON string. -Mirrors Python's `render_document()`. - -#### Signature - -```typescript -renderDocument(): string -``` - -#### Returns - -`string` — JSON-encoded SWML document. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 715. - -*** - -### renderSwml - -Render the complete SWML document by assembling all 5 phases: pre-answer, answer, -post-answer, AI, and post-AI verbs. - -#### Signature - -```typescript -renderSwml(callId?: string, modifications?: Record): string -``` - -#### Parameters - - - Optional call ID to use for session tokens; auto-generated if omitted. - - - - Optional dict returned from `onSwmlRequest` to merge into the AI verb config before rendering. Matches Python's `_render_swml(modifications)` semantics: `global_data` is deep-merged; all other keys override the AI config directly. - - -#### Returns - -`string` — The rendered SWML document as a JSON string. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 2019. - -*** - -### resetContexts - -Remove all contexts, returning the agent to a no-contexts state. - -This is a convenience wrapper around `defineContexts().reset()`. -Use it in a dynamic config callback when you need to rebuild -contexts from scratch for a specific request. - -#### Signature - -```typescript -resetContexts(): this -``` - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 625. - -*** - -### resetDocument - -Reset the SWML document to an empty state. -Mirrors Python's `reset_document()`. - -#### Signature - -```typescript -resetDocument(): this -``` - -#### Returns - -`this` — This service for chaining. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 679. - -*** - -### run - -Alias for [serve](/docs/sdk-reference/reference/typescript/prefabs/survey-agent#serve). Starts the HTTP server. - -#### Signature - -```typescript -run(opts?: { ...2 fields }): Promise -``` - -#### Parameters - - - Optional host and port overrides. - - - - - - -#### Returns - -`Promise` — A promise that resolves once the server is running. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 2702. - -*** - -### runServerless - -Handle a single serverless invocation (AWS Lambda, Google Cloud Functions, Azure Functions, or CGI). - -Matches Python `run(event, context)` when executed in a serverless environment. Python's -`run()` auto-detects the platform via `get_execution_mode()` and dispatches accordingly; -in TypeScript the serverless path is an **explicit** method so that `run()` keeps its -HTTP-server semantics and callers opt in to serverless dispatch deliberately. - -Platform detection follows the same environment-variable heuristics as Python's -`ServerlessMixin`: `AWS_LAMBDA_FUNCTION_NAME` → Lambda, `K_SERVICE` → GCF, -`FUNCTIONS_WORKER_RUNTIME` → Azure, `GATEWAY_INTERFACE` → CGI. - -Usage in a Lambda handler file: - -```ts -export const handler = (event: any, context: any) => agent.runServerless(event, context); -``` - -#### Signature - -```typescript -runServerless( - event: ServerlessEvent, - context?: unknown, - platform?: "lambda" | "gcf" | "azure" | "cgi" | "auto" -): Promise -``` - -#### Parameters - - - The serverless event payload (Lambda event, GCF request body, etc.). - - - - The serverless context object (Lambda context, Azure context, etc.). - - - - Optional platform override; defaults to 'auto' (environment detection). - - -#### Returns - -`Promise` — The normalized serverless response object. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 2728. - -*** - -### serve - -Start the HTTP server and begin listening for requests. - -Uses `@hono/node-server` under the hood. When run in CLI mode -(`SWAIG_CLI_MODE=true`, set automatically by `npx swaig-test`), this is a -no-op so agent config can be inspected without starting a server. - -#### Signature - -```typescript -serve(opts?: { ...2 fields }): Promise -``` - -#### Parameters - - - Optional host/port overrides. Defaults to the values provided in the constructor options or the `PORT` environment variable. - - - - - - -#### Returns - -`Promise` — A promise that resolves once the server has begun listening. - -#### Examples - -```typescript -const agent = new AgentBase({ name: 'demo', port: 3000 }); -await agent.serve(); -// Or override at runtime: -await agent.serve({ port: 8080, host: '127.0.0.1' }); -``` - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 2679. - -*** - -### setDynamicConfigCallback - -Set a callback invoked on each SWML request to dynamically modify an ephemeral agent copy. - -The callback receives a clone of this agent — mutations apply only to the current -request, so you can vary prompt, tools, languages, params, or global data per call -without affecting the long-lived agent instance. - -#### Signature - -```typescript -setDynamicConfigCallback(cb: DynamicConfigCallback): this -``` - -#### Parameters - - - Callback receiving `(queryParams, bodyParams, headers, agent)` where `agent` is the ephemeral `AgentBase` copy to mutate. May be async. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Examples - -```typescript -agent.setDynamicConfigCallback((query, body, headers, agent) => { - const lang = query.lang ?? 'en'; - if (lang === 'es') { - (agent as AgentBase).setPromptText('Eres un asistente útil.'); - } -}); -``` - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1723. - -*** - -### setFunctionIncludes - -Replace the entire list of function includes. -Each include must have a `url` and `functions` array. - -#### Signature - -```typescript -setFunctionIncludes(includes: FunctionInclude[]): this -``` - -#### Parameters - - - Array of function include objects. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 979. - -*** - -### setGlobalData - -Merge data into the global\_data object passed into the AI configuration. - -Matches Python `set_global_data` which calls `.update()` on the internal dict — -existing keys are preserved; incoming keys overwrite on collision. Skills and -other callers can each contribute keys without clobbering one another. - -If you need to replace the entire object, assign a new agent instance or use -`Object.assign(agent.globalData, {})` to clear first. - -#### Signature - -```typescript -setGlobalData(data: Record): this -``` - -#### Parameters - - - Key-value pairs to merge into global data. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 828. - -*** - -### setInternalFillers - -Set internal fillers for native SWAIG functions. - -Internal fillers are short phrases the AI agent speaks (via TTS) while -an internal/native function is running, so the caller doesn't hear -dead air during transitions or background work. - -Supported function names (matches the SWAIGInternalFiller schema): - -hangup — when the agent is hanging up -check\_time — when checking the time -wait\_for\_user — when waiting for user input -wait\_seconds — during deliberate pauses -adjust\_response\_latency — when adjusting response timing -next\_step — transitioning between steps in prompt.contexts -change\_context — switching between contexts in prompt.contexts -get\_visual\_input — processing visual input (enable\_vision=true) -get\_ideal\_strategy — thinking (enable\_thinking=true) - -Notably NOT supported: change\_step, gather\_submit, or arbitrary -user-defined SWAIG function names. The runtime only honors fillers -for the names listed above; everything else is silently ignored at -the SWML level. This method warns at registration time if you pass -an unknown name so you catch the typo early. - -#### Signature - -```typescript -setInternalFillers( - internalFillers: Record> -): this -``` - -#### Parameters - - - Map of function name to language-keyed filler phrases. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Examples - -```typescript -agent.setInternalFillers({ - next_step: { - 'en-US': ['Moving to the next step...', 'Great, let us continue...'], - 'es': ['Pasando al siguiente paso...'] - }, - check_time: { - 'en-US': ['Let me check the time...'] - } -}); -``` - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 910. - -*** - -### setLanguageParams - -Set (or replace) the per-language `params` dict on an already-added -language. Useful when language entries are built up via [addLanguage](/docs/sdk-reference/reference/typescript/prefabs/survey-agent#add-language) -first and engine-specific tuning is added later (e.g., from a config -loader). - -Python parity: `set_language_params(code, params)`. Passing an empty -object removes the `params` key entirely. Unknown codes are a no-op. - -#### Signature - -```typescript -setLanguageParams(code: string, params: Record): this -``` - -#### Parameters - - - Language code as previously passed to [addLanguage](/docs/sdk-reference/reference/typescript/prefabs/survey-agent#add-language) (e.g. `"en-US"`). - - - - Engine-specific params dict to attach. Empty object removes the key. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 737. - -*** - -### setLanguages - -Replace all configured languages with a new list. - -#### Signature - -```typescript -setLanguages(languages: LanguageConfig[]): this -``` - -#### Parameters - - - Array of language configurations. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 718. - -*** - -### setNativeFunctions - -Set the list of native SWAIG function names (built-in platform functions). - -#### Signature - -```typescript -setNativeFunctions(funcs: string[]): this -``` - -#### Parameters - - - Array of native function names. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 848. - -*** - -### setOnRequestCallback - -Set a callback invoked per-request to dynamically build SWML. -When set, the static SwmlBuilder is ignored and the callback's -returned SwmlBuilder is used instead. - -#### Signature - -```typescript -setOnRequestCallback(cb: OnRequestCallback): this -``` - -#### Parameters - - - Callback receiving query params, body params, and headers. - - -#### Returns - -`this` — This service for chaining. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 850. - -*** - -### setParam - -Set a single AI parameter (e.g. "temperature", "top\_p"). - -#### Signature - -```typescript -setParam(key: string, value: unknown): this -``` - -#### Parameters - - - Parameter name. - - - - Parameter value. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 800. - -*** - -### setParams - -Merge multiple AI parameters into the existing params object. - -#### Signature - -```typescript -setParams(params: Record): this -``` - -#### Parameters - - - Key-value pairs to merge. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 810. - -*** - -### setPostPrompt - -Set the post-prompt text evaluated after the call ends. - -#### Signature - -```typescript -setPostPrompt(text: string): this -``` - -#### Parameters - - - The post-prompt text to use. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 456. - -*** - -### setPostPromptLlmParams - -Merge LLM-specific parameters into the post-prompt configuration. - -#### Signature - -```typescript -setPostPromptLlmParams(params: Record): this -``` - -#### Parameters - - - Key-value LLM parameters to merge. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1001. - -*** - -### setPostPromptUrl - -Override the default post-prompt webhook URL with a custom one. - -#### Signature - -```typescript -setPostPromptUrl(url: string): this -``` - -#### Parameters - - - The custom post-prompt URL. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1847. - -*** - -### setPromptLlmParams - -Merge LLM-specific parameters into the main prompt configuration (e.g. model, temperature). - -#### Signature - -```typescript -setPromptLlmParams(params: Record): this -``` - -#### Parameters - - - Key-value LLM parameters to merge. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 991. - -*** - -### setPromptPom - -Set the prompt as a POM (Prompt Object Model) dictionary. - -Replaces the current POM sections with the provided structured data. -Each entry should have `title`, and optionally `body`, `bullets`, -`numbered`, `numberedBullets`, and `subsections`. - -#### Signature - -```typescript -setPromptPom(pom: Record[]): this -``` - -#### Parameters - - - Array of POM section dictionaries. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Throws - -- Error if POM mode is not enabled (`usePom: false`). - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 577. - -*** - -### setPromptText - -Set the main system prompt text for the AI. - -#### Signature - -```typescript -setPromptText(text: string): this -``` - -#### Parameters - - - The prompt text to use. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 446. - -*** - -### setPronunciations - -Replace all pronunciation rules with a new list. - -#### Signature - -```typescript -setPronunciations(rules: PronunciationRule[]): this -``` - -#### Parameters - - - Array of pronunciation rule objects. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 786. - -*** - -### setupGracefulShutdown - -Register process signal handlers for clean Kubernetes/Docker shutdown. -Handles SIGTERM and SIGINT, waits for a timeout, then exits. - -**Modifiers:** `static` - -#### Signature - -```typescript -setupGracefulShutdown(opts?: { ...1 fields }): void -``` - -#### Parameters - - - Optional timeout in milliseconds (default 5000). - - - - -#### Returns - -`void` - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 2751. - -*** - -### setWebHookUrl - -Override the default SWAIG webhook URL with a custom one. - -#### Signature - -```typescript -setWebHookUrl(url: string): this -``` - -#### Parameters - - - The custom webhook URL. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1837. - -*** - -### stop - -Stop the HTTP server. -Mirrors Python's `stop()`. - -#### Signature - -```typescript -stop(): void -``` - -#### Returns - -`void` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 1009. - -*** - -### swaigPreDispatch - -Extension point: invoked between argument parsing and function dispatch -on POST /swaig. Returns \[target, shortCircuit]: when shortCircuit is -non-null, it's returned directly without dispatching. AgentBase may -override to add session-token validation or ephemeral dynamic-config. - -#### Signature - -```typescript -swaigPreDispatch( - _requestData: Record, - _funcName: string -): [SWMLService, unknown] -``` - -#### Parameters - - - - - -#### Returns - -`[SWMLService, unknown]` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 592. - -*** - -### updateGlobalData - -Merge additional entries into the existing global\_data object. - -#### Signature - -```typescript -updateGlobalData(data: Record): this -``` - -#### Parameters - - - Key-value pairs to merge into global data. - - -#### Returns - -`this` — This agent instance for chaining. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 838. - -*** - -### validateBasicAuth - -Override to add custom basic-auth validation logic beyond credential matching. - -#### Signature - -```typescript -validateBasicAuth( - _username: string, - _password: string -): boolean | Promise -``` - -#### Parameters - - - The username from the request. - - - - The password from the request. - - -#### Returns - -`boolean | Promise` — True if the credentials are valid; false to reject the request. - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1980. - -*** - -### validateToolToken - -Validate a tool-call token for the given function. - -Mirrors Python reference `core/mixins/state_mixin.py validate_tool_token`: - -1. Unknown function → `false`. -2. Registered but non-secure → `true` without consulting SessionManager - (non-secure tools never require a token). -3. Raw-dict descriptors (e.g. DataMap) are treated as secure, matching - Python's `isinstance(func, dict) → is_secure = True` branch. -4. Missing token on a secure tool → `false`. -5. Otherwise delegate to `SessionManager.validateToolToken`. - -Divergences from the Python reference: - -- No debug-logging branch: `AgentBase` does not expose an agent-level - debug-mode flag, so the per-call debug telemetry Python emits is - omitted. `SessionManager` still logs its own validation outcomes. -- No token-derived call-id fallback: `SessionManager.debugToken` - truncates the embedded call-id for log safety, so an extracted value - cannot be round-tripped back through `validateToolToken`. The caller - is expected to supply a non-empty `callId`; an empty one is forwarded - unchanged and the underlying validator will reject it. - -#### Signature - -```typescript -validateToolToken(functionName: string, token: string, callId: string): boolean -``` - -#### Parameters - - - - - - - -#### Returns - -`boolean` - -#### Source - -[`src/AgentBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AgentBase.ts) - -Line 1455. - -## Functions - -### createSurveyAgent - -Factory function that creates and returns a new SurveyAgent. - -#### Signature - -```typescript -createSurveyAgent(config: SurveyConfig): SurveyAgent -``` - -#### Parameters - - - Configuration for the survey agent. - - -#### Returns - -`SurveyAgent` — A configured SurveyAgent instance. - -#### Source - -[`src/prefabs/SurveyAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/SurveyAgent.ts) - -Line 667. - -## Interfaces - -### SurveyConfig - -Configuration for the [SurveyAgent](/docs/sdk-reference/reference/typescript/prefabs/survey-agent). - -#### Signature - -```typescript -interface SurveyConfig -``` - -#### Properties - - - Additional AgentBase options forwarded to super(). - - - - Brand or company name the agent represents (matches Python `brand_name`). - - - - Message after the survey is complete (matches Python `conclusion`). - - - - Opening message before the first question (matches Python `introduction`). - - - - Maximum number of times to retry invalid answers. Defaults to 2. - - - - Agent display name (defaults to `"survey"`). - - - - Callback fired when the survey is finished. - - - - Ordered list of survey questions. - - - - HTTP route for this agent (defaults to `"/survey"`). - - - - Human-readable survey name, used in prompts and global data. - - -#### Source - -[`src/prefabs/SurveyAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/SurveyAgent.ts) - -Line 52. - -*** - -### SurveyQuestion - -A single survey question consumed by [SurveyAgent](/docs/sdk-reference/reference/typescript/prefabs/survey-agent). - -#### Signature - -```typescript -interface SurveyQuestion -``` - -#### Properties - - - Unique question identifier. - - - - Next question ID after this one. - - - - Options for multiple\_choice questions. - - - - Points awarded for answers. - - - - Whether the question requires an answer. Defaults to `true`. Mirrors the Python `required` flag on each question dict. - - - - For `rating` questions, the upper bound of the scale (1..scale). Defaults to 5 (matching the Python prefab) when unspecified. - - - - The question text to ask the caller. - - - - Question type determines validation and display. - - -#### Source - -[`src/prefabs/SurveyAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/SurveyAgent.ts) - -Line 17. - -## Source - -[`src/prefabs/SurveyAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/SurveyAgent.ts) - -Line 111. diff --git a/fern/products/sdk-reference/typescript/prompt-manager/index.mdx b/fern/products/sdk-reference/typescript/prompt-manager/index.mdx deleted file mode 100644 index 75b1febc36..0000000000 --- a/fern/products/sdk-reference/typescript/prompt-manager/index.mdx +++ /dev/null @@ -1,349 +0,0 @@ ---- -slug: "/reference/typescript/prompt-manager" -title: "PromptManager" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "PromptManager" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/PromptManager.ts" ---- -# `PromptManager` - -Manages agent prompt text, supporting both raw text and structured POM-based prompts. - -## Signature - -```typescript -class PromptManager -``` - -## Methods - -### addSection - -Adds a POM section to the prompt, initializing the PomBuilder if needed. - -#### Signature - -```typescript -addSection(title: string, opts?: { ...5 fields }): void -``` - -#### Parameters - - - The section heading. - - - - Optional body, bullets, numbering, and subsection configuration. - - - - - - - - - - - - -#### Returns - -`void` - -#### Source - -[`src/PromptManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PromptManager.ts) - -Line 48. - -*** - -### addSubsection - -Adds a subsection under a parent POM section, creating the parent if absent. - -#### Signature - -```typescript -addSubsection(parentTitle: string, title: string, opts?: { ...2 fields }): void -``` - -#### Parameters - - - The heading of the parent section. - - - - The subsection heading. - - - - Optional body text and bullets for the subsection. - - - - - - -#### Returns - -`void` - -#### Source - -[`src/PromptManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PromptManager.ts) - -Line 87. - -*** - -### addToSection - -Appends body text or bullets to an existing POM section, creating it if absent. - -#### Signature - -```typescript -addToSection(title: string, opts?: { ...3 fields }): void -``` - -#### Parameters - - - The section heading to append to. - - - - Body text and/or bullets to add. - - - - - - - - -#### Returns - -`void` - -#### Source - -[`src/PromptManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PromptManager.ts) - -Line 70. - -*** - -### constructor - -Creates a new PromptManager. - -#### Signature - -```typescript -constructor(usePom: boolean = true): PromptManager -``` - -#### Parameters - - - Whether to use structured POM sections (default true). - - -#### Returns - -`PromptManager` - -#### Source - -[`src/PromptManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PromptManager.ts) - -Line 20. - -*** - -### getPomBuilder - -Returns the underlying PomBuilder instance, if POM mode is active. - -#### Signature - -```typescript -getPomBuilder(): PomBuilder | null -``` - -#### Returns - -`PomBuilder | null` — The PomBuilder, or null if POM is not in use. - -#### Source - -[`src/PromptManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PromptManager.ts) - -Line 130. - -*** - -### getPostPrompt - -Returns the post-prompt text. - -#### Signature - -```typescript -getPostPrompt(): string | null -``` - -#### Returns - -`string | null` — The post-prompt string, or null if not set. - -#### Source - -[`src/PromptManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PromptManager.ts) - -Line 122. - -*** - -### getPrompt - -Returns the fully rendered prompt text, either raw text or POM-rendered Markdown. - -#### Signature - -```typescript -getPrompt(): string -``` - -#### Returns - -`string` — The prompt string, or empty string if nothing is set. - -#### Source - -[`src/PromptManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PromptManager.ts) - -Line 112. - -*** - -### getRawPrompt - -Returns the raw prompt text whatever `setPromptText` stored, or null -when no raw prompt has been set. Mirrors Python's -`PromptManager.get_raw_prompt`. - -#### Signature - -```typescript -getRawPrompt(): string | null -``` - -#### Returns - -`string | null` — The raw prompt string, or null if not set. - -#### Source - -[`src/PromptManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PromptManager.ts) - -Line 140. - -*** - -### hasSection - -Checks whether a POM section with the given title exists. - -#### Signature - -```typescript -hasSection(title: string): boolean -``` - -#### Parameters - - - The section heading to look for. - - -#### Returns - -`boolean` — True if the section exists. - -#### Source - -[`src/PromptManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PromptManager.ts) - -Line 104. - -*** - -### setPostPrompt - -Sets the post-prompt text appended after the main prompt. - -#### Signature - -```typescript -setPostPrompt(text: string): void -``` - -#### Parameters - - - The post-prompt string. - - -#### Returns - -`void` - -#### Source - -[`src/PromptManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PromptManager.ts) - -Line 39. - -*** - -### setPromptText - -Sets the raw prompt text, bypassing POM rendering. - -#### Signature - -```typescript -setPromptText(text: string): void -``` - -#### Parameters - - - The raw prompt string. - - -#### Returns - -`void` - -#### Source - -[`src/PromptManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PromptManager.ts) - -Line 31. - -## Source - -[`src/PromptManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PromptManager.ts) - -Line 10. diff --git a/fern/products/sdk-reference/typescript/register-skill.mdx b/fern/products/sdk-reference/typescript/register-skill.mdx index b675829714..2276ce8aa6 100644 --- a/fern/products/sdk-reference/typescript/register-skill.mdx +++ b/fern/products/sdk-reference/typescript/register-skill.mdx @@ -12,7 +12,7 @@ lustri: --- # `registerSkill` -Register a custom skill class with the global [SkillRegistry](/docs/sdk-reference/reference/typescript/skills/skill-registry). +Register a custom skill class with the global `SkillRegistry`. Equivalent to Python's `register_skill(skill_class)`. Allows third-party code to register skills directly, bypassing the built-in directory scan. @@ -26,7 +26,7 @@ registerSkill(skillClass: typeof SkillBase): void ## Parameters - Skill class to register (a subclass of [SkillBase](/docs/sdk-reference/reference/typescript/skills/skill-base)). + Skill class to register (a subclass of `SkillBase`). ## Returns diff --git a/fern/products/sdk-reference/typescript/relay/action/ai-action/index.mdx b/fern/products/sdk-reference/typescript/relay/action/ai-action/index.mdx index 2a665dc553..7440bf76eb 100644 --- a/fern/products/sdk-reference/typescript/relay/action/ai-action/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/action/ai-action/index.mdx @@ -24,7 +24,7 @@ class AIAction extends Action ## Inheritance -**Extends:** [Action](/docs/sdk-reference/reference/typescript/relay/action) +**Extends:** `Action` ## Properties @@ -120,7 +120,7 @@ wait(timeout?: number): Promise #### Returns -`Promise` — The terminal [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) for this action. +`Promise` — The terminal `RelayEvent` for this action. #### Throws diff --git a/fern/products/sdk-reference/typescript/relay/action/collect-action/index.mdx b/fern/products/sdk-reference/typescript/relay/action/collect-action/index.mdx index b0ca14efc7..72a666d48b 100644 --- a/fern/products/sdk-reference/typescript/relay/action/collect-action/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/action/collect-action/index.mdx @@ -24,7 +24,7 @@ class CollectAction extends Action ## Inheritance -**Extends:** [Action](/docs/sdk-reference/reference/typescript/relay/action) +**Extends:** `Action` ## Properties @@ -206,7 +206,7 @@ wait(timeout?: number): Promise #### Returns -`Promise` — The terminal [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) for this action. +`Promise` — The terminal `RelayEvent` for this action. #### Throws diff --git a/fern/products/sdk-reference/typescript/relay/action/detect-action/index.mdx b/fern/products/sdk-reference/typescript/relay/action/detect-action/index.mdx index 2726d954c1..d488496c3b 100644 --- a/fern/products/sdk-reference/typescript/relay/action/detect-action/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/action/detect-action/index.mdx @@ -24,7 +24,7 @@ class DetectAction extends Action ## Inheritance -**Extends:** [Action](/docs/sdk-reference/reference/typescript/relay/action) +**Extends:** `Action` ## Properties @@ -146,7 +146,7 @@ wait(timeout?: number): Promise #### Returns -`Promise` — The terminal [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) for this action. +`Promise` — The terminal `RelayEvent` for this action. #### Throws diff --git a/fern/products/sdk-reference/typescript/relay/action/fax-action/index.mdx b/fern/products/sdk-reference/typescript/relay/action/fax-action/index.mdx index 37963e0708..5e7211ec78 100644 --- a/fern/products/sdk-reference/typescript/relay/action/fax-action/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/action/fax-action/index.mdx @@ -24,7 +24,7 @@ class FaxAction extends Action ## Inheritance -**Extends:** [Action](/docs/sdk-reference/reference/typescript/relay/action) +**Extends:** `Action` ## Properties @@ -122,7 +122,7 @@ wait(timeout?: number): Promise #### Returns -`Promise` — The terminal [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) for this action. +`Promise` — The terminal `RelayEvent` for this action. #### Throws diff --git a/fern/products/sdk-reference/typescript/relay/action/index.mdx b/fern/products/sdk-reference/typescript/relay/action/index.mdx index d40d8ba87a..ed1a224cb5 100644 --- a/fern/products/sdk-reference/typescript/relay/action/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/action/index.mdx @@ -8,6 +8,7 @@ lustri: kind: "class" language: "typescript" qualified_name: "relay.Action" + parent: "relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts" --- @@ -15,7 +16,7 @@ lustri: Async handle for a controllable call operation (play, record, tap, detect, etc.). -An Action is returned from the async variants on [Call](/docs/sdk-reference/reference/typescript/relay/call) (e.g. `call.playAsync`). +An Action is returned from the async variants on `Call` (e.g. `call.playAsync`). It resolves when the server emits a terminal event for its `controlId`. Use [Action.wait](/docs/sdk-reference/reference/typescript/relay/action#wait) to await completion, or register an `onCompleted` callback. @@ -56,54 +57,6 @@ console.log('Playback finished with state', event.params.state); Final event once the action terminates, or `null` while still running. -## Classes - - - - Async handle for a `calling.call.ai` action (on-call AI agent session). - - - - Async handle for a `play_and_collect` action (combined playback + input collection). - - - - Async handle for a `calling.call.detect` action (machine / fax / digit). - - - - Async handle for a `send_fax` or `receive_fax` action. - - - - Async handle for a `calling.call.pay` action (PCI-compliant payment collection). - - - - Async handle for a `calling.call.play` action — controls playback in progress. - - - - Async handle for a `calling.call.record` action — controls recording in progress. - - - - Async handle for a bare `calling.call.collect` action (no accompanying play). - - - - Async handle for a `calling.call.stream` action (outbound media stream). - - - - Async handle for a `calling.call.tap` action (media mirroring). - - - - Async handle for a `calling.call.transcribe` action (real-time transcription). - - - ## Methods ### constructor @@ -122,7 +75,7 @@ constructor( #### Parameters - Owning call (via the structural [CallLike](/docs/sdk-reference/reference/typescript/relay/action#call-like) interface). + Owning call (via the structural [CallLike](/docs/sdk-reference/reference/typescript/relay/action/index__2#call-like) interface). @@ -167,7 +120,7 @@ wait(timeout?: number): Promise #### Returns -`Promise` — The terminal [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) for this action. +`Promise` — The terminal `RelayEvent` for this action. #### Throws @@ -179,54 +132,6 @@ wait(timeout?: number): Promise Line 125. -## Interfaces - -### CallLike - -Structural subset of [Call](/docs/sdk-reference/reference/typescript/relay/call) that an Action needs — avoids a circular -import between `Call.ts` and `Action.ts`. - -#### Signature - -```typescript -interface CallLike -``` - -#### Methods - -##### \_execute - -###### Signature - -```typescript -_execute( - method: string, - extraParams?: Record -): Promise> -``` - -###### Parameters - - - - - -###### Returns - -`Promise>` - -###### Source - -[`src/relay/Action.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts) - -Line 35. - -#### Source - -[`src/relay/Action.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts) - -Line 34. - ## Source [`src/relay/Action.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts) diff --git a/fern/products/sdk-reference/typescript/relay/action/index__2.mdx b/fern/products/sdk-reference/typescript/relay/action/index__2.mdx new file mode 100644 index 0000000000..e2ad79cd46 --- /dev/null +++ b/fern/products/sdk-reference/typescript/relay/action/index__2.mdx @@ -0,0 +1,110 @@ +--- +slug: "/reference/typescript/relay/action/index__2" +title: "Action" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "relay.Action" + parent: "relay" + module: "relay" +--- +# `Action` + +## Classes + + + + Async handle for a `calling.call.ai` action (on-call AI agent session). + + + + Async handle for a `play_and_collect` action (combined playback + input collection). + + + + Async handle for a `calling.call.detect` action (machine / fax / digit). + + + + Async handle for a `send_fax` or `receive_fax` action. + + + + Async handle for a `calling.call.pay` action (PCI-compliant payment collection). + + + + Async handle for a `calling.call.play` action — controls playback in progress. + + + + Async handle for a `calling.call.record` action — controls recording in progress. + + + + Async handle for a bare `calling.call.collect` action (no accompanying play). + + + + Async handle for a `calling.call.stream` action (outbound media stream). + + + + Async handle for a `calling.call.tap` action (media mirroring). + + + + Async handle for a `calling.call.transcribe` action (real-time transcription). + + + +## Interfaces + +### CallLike + +Structural subset of `Call` that an Action needs — avoids a circular +import between `Call.ts` and `Action.ts`. + +#### Signature + +```typescript +interface CallLike +``` + +#### Methods + +##### \_execute + +###### Signature + +```typescript +_execute( + method: string, + extraParams?: Record +): Promise> +``` + +###### Parameters + + + + + +###### Returns + +`Promise>` + +###### Source + +[`src/relay/Action.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts) + +Line 35. + +#### Source + +[`src/relay/Action.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts) + +Line 34. diff --git a/fern/products/sdk-reference/typescript/relay/action/pay-action/index.mdx b/fern/products/sdk-reference/typescript/relay/action/pay-action/index.mdx index 9c61666a6b..6af9cac9f5 100644 --- a/fern/products/sdk-reference/typescript/relay/action/pay-action/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/action/pay-action/index.mdx @@ -24,7 +24,7 @@ class PayAction extends Action ## Inheritance -**Extends:** [Action](/docs/sdk-reference/reference/typescript/relay/action) +**Extends:** `Action` ## Properties @@ -120,7 +120,7 @@ wait(timeout?: number): Promise #### Returns -`Promise` — The terminal [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) for this action. +`Promise` — The terminal `RelayEvent` for this action. #### Throws diff --git a/fern/products/sdk-reference/typescript/relay/action/play-action/index.mdx b/fern/products/sdk-reference/typescript/relay/action/play-action/index.mdx index 08d4a39d95..86a7604ee0 100644 --- a/fern/products/sdk-reference/typescript/relay/action/play-action/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/action/play-action/index.mdx @@ -24,7 +24,7 @@ class PlayAction extends Action ## Inheritance -**Extends:** [Action](/docs/sdk-reference/reference/typescript/relay/action) +**Extends:** `Action` ## Properties @@ -204,7 +204,7 @@ wait(timeout?: number): Promise #### Returns -`Promise` — The terminal [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) for this action. +`Promise` — The terminal `RelayEvent` for this action. #### Throws diff --git a/fern/products/sdk-reference/typescript/relay/action/record-action/index.mdx b/fern/products/sdk-reference/typescript/relay/action/record-action/index.mdx index 305c5f4508..ddc292e0fd 100644 --- a/fern/products/sdk-reference/typescript/relay/action/record-action/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/action/record-action/index.mdx @@ -24,7 +24,7 @@ class RecordAction extends Action ## Inheritance -**Extends:** [Action](/docs/sdk-reference/reference/typescript/relay/action) +**Extends:** `Action` ## Properties @@ -178,7 +178,7 @@ wait(timeout?: number): Promise #### Returns -`Promise` — The terminal [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) for this action. +`Promise` — The terminal `RelayEvent` for this action. #### Throws diff --git a/fern/products/sdk-reference/typescript/relay/action/standalone-collect-action/index.mdx b/fern/products/sdk-reference/typescript/relay/action/standalone-collect-action/index.mdx index 003af090bd..fde935a20f 100644 --- a/fern/products/sdk-reference/typescript/relay/action/standalone-collect-action/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/action/standalone-collect-action/index.mdx @@ -24,7 +24,7 @@ class StandaloneCollectAction extends Action ## Inheritance -**Extends:** [Action](/docs/sdk-reference/reference/typescript/relay/action) +**Extends:** `Action` ## Properties @@ -146,7 +146,7 @@ wait(timeout?: number): Promise #### Returns -`Promise` — The terminal [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) for this action. +`Promise` — The terminal `RelayEvent` for this action. #### Throws diff --git a/fern/products/sdk-reference/typescript/relay/action/stream-action/index.mdx b/fern/products/sdk-reference/typescript/relay/action/stream-action/index.mdx index 7e640d2f86..2e32c5db55 100644 --- a/fern/products/sdk-reference/typescript/relay/action/stream-action/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/action/stream-action/index.mdx @@ -24,7 +24,7 @@ class StreamAction extends Action ## Inheritance -**Extends:** [Action](/docs/sdk-reference/reference/typescript/relay/action) +**Extends:** `Action` ## Properties @@ -120,7 +120,7 @@ wait(timeout?: number): Promise #### Returns -`Promise` — The terminal [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) for this action. +`Promise` — The terminal `RelayEvent` for this action. #### Throws diff --git a/fern/products/sdk-reference/typescript/relay/action/tap-action/index.mdx b/fern/products/sdk-reference/typescript/relay/action/tap-action/index.mdx index 12237dcabc..ead4426941 100644 --- a/fern/products/sdk-reference/typescript/relay/action/tap-action/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/action/tap-action/index.mdx @@ -24,7 +24,7 @@ class TapAction extends Action ## Inheritance -**Extends:** [Action](/docs/sdk-reference/reference/typescript/relay/action) +**Extends:** `Action` ## Properties @@ -120,7 +120,7 @@ wait(timeout?: number): Promise #### Returns -`Promise` — The terminal [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) for this action. +`Promise` — The terminal `RelayEvent` for this action. #### Throws diff --git a/fern/products/sdk-reference/typescript/relay/action/transcribe-action/index.mdx b/fern/products/sdk-reference/typescript/relay/action/transcribe-action/index.mdx index ab3d7cc142..87701532fc 100644 --- a/fern/products/sdk-reference/typescript/relay/action/transcribe-action/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/action/transcribe-action/index.mdx @@ -24,7 +24,7 @@ class TranscribeAction extends Action ## Inheritance -**Extends:** [Action](/docs/sdk-reference/reference/typescript/relay/action) +**Extends:** `Action` ## Properties @@ -120,7 +120,7 @@ wait(timeout?: number): Promise #### Returns -`Promise` — The terminal [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) for this action. +`Promise` — The terminal `RelayEvent` for this action. #### Throws diff --git a/fern/products/sdk-reference/typescript/relay/call/index.mdx b/fern/products/sdk-reference/typescript/relay/call/index.mdx index 939d6a7a3a..eeda01d165 100644 --- a/fern/products/sdk-reference/typescript/relay/call/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/call/index.mdx @@ -8,6 +8,7 @@ lustri: kind: "class" language: "typescript" qualified_name: "relay.Call" + parent: "relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts" --- @@ -20,7 +21,7 @@ for inbound calls (delivered to your `onCall` handler) and for outbound dials. Each command method (`answer()`, `play()`, `record()`, etc.) returns when the platform acknowledges the command; event-driven completion is exposed via -[Action](/docs/sdk-reference/reference/typescript/relay/action) objects returned from the async "play/record/..." variants. +`Action` objects returned from the async "play/record/..." variants. ## Signature @@ -42,7 +43,7 @@ client.onCall(async (call) => { ## See Also - \- \[RelayClient]\(/docs/sdk-reference/reference/typescript/relay/relay-client) - \- \[Action]\(/docs/sdk-reference/reference/typescript/relay/action) + \- \`Action\` ## Properties @@ -2520,7 +2521,7 @@ waitFor( #### Returns -`Promise` — The first matching [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event). +`Promise` — The first matching `RelayEvent`. #### Throws @@ -2556,7 +2557,7 @@ waitForAnswered(timeout?: number): Promise #### Returns -`Promise` — The `calling.call.state` [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) (synthesized on short-circuit). +`Promise` — The `calling.call.state` `RelayEvent` (synthesized on short-circuit). #### Throws @@ -2588,7 +2589,7 @@ waitForEnded(timeout?: number): Promise #### Returns -`Promise` — The terminating `calling.call.state` [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event). +`Promise` — The terminating `calling.call.state` `RelayEvent`. #### Throws @@ -2623,7 +2624,7 @@ waitForEnding(timeout?: number): Promise #### Returns -`Promise` — The `calling.call.state` [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) (synthesized on short-circuit). +`Promise` — The `calling.call.state` `RelayEvent` (synthesized on short-circuit). #### Throws @@ -2659,7 +2660,7 @@ waitForRinging(timeout?: number): Promise #### Returns -`Promise` — The `calling.call.state` [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) (synthesized on short-circuit). +`Promise` — The `calling.call.state` `RelayEvent` (synthesized on short-circuit). #### Throws @@ -2671,53 +2672,6 @@ waitForRinging(timeout?: number): Promise Line 359. -## Interfaces - -### RelayClientLike - -Interface the Call needs from RelayClient (avoids circular import). - -#### Signature - -```typescript -interface RelayClientLike -``` - -#### Methods - -##### execute - -###### Signature - -```typescript -execute( - method: string, - params: Record -): Promise> -``` - -###### Parameters - - - - - -###### Returns - -`Promise>` - -###### Source - -[`src/relay/Call.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts) - -Line 54. - -#### Source - -[`src/relay/Call.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts) - -Line 53. - ## Source [`src/relay/Call.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts) diff --git a/fern/products/sdk-reference/typescript/relay/call/index__2.mdx b/fern/products/sdk-reference/typescript/relay/call/index__2.mdx new file mode 100644 index 0000000000..f6fc6223f1 --- /dev/null +++ b/fern/products/sdk-reference/typescript/relay/call/index__2.mdx @@ -0,0 +1,61 @@ +--- +slug: "/reference/typescript/relay/call/index__2" +title: "Call" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "relay.Call" + parent: "relay" + module: "relay" +--- +# `Call` + +## Interfaces + +### RelayClientLike + +Interface the Call needs from RelayClient (avoids circular import). + +#### Signature + +```typescript +interface RelayClientLike +``` + +#### Methods + +##### execute + +###### Signature + +```typescript +execute( + method: string, + params: Record +): Promise> +``` + +###### Parameters + + + + + +###### Returns + +`Promise>` + +###### Source + +[`src/relay/Call.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts) + +Line 54. + +#### Source + +[`src/relay/Call.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts) + +Line 53. diff --git a/fern/products/sdk-reference/typescript/relay/closed-sets/index.mdx b/fern/products/sdk-reference/typescript/relay/closed-sets/index.mdx index 6c2c242302..f1d0834e3d 100644 --- a/fern/products/sdk-reference/typescript/relay/closed-sets/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/closed-sets/index.mdx @@ -8,6 +8,7 @@ lustri: kind: "module" language: "typescript" qualified_name: "relay.closedSets" + parent: "relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/closedSets.ts" --- diff --git a/fern/products/sdk-reference/typescript/relay/constants/index.mdx b/fern/products/sdk-reference/typescript/relay/constants/index.mdx index 55958da008..124c9a150a 100644 --- a/fern/products/sdk-reference/typescript/relay/constants/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/constants/index.mdx @@ -8,6 +8,7 @@ lustri: kind: "module" language: "typescript" qualified_name: "relay.constants" + parent: "relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/constants.ts" --- diff --git a/fern/products/sdk-reference/typescript/relay/deferred/index.mdx b/fern/products/sdk-reference/typescript/relay/deferred/index.mdx deleted file mode 100644 index 544e661882..0000000000 --- a/fern/products/sdk-reference/typescript/relay/deferred/index.mdx +++ /dev/null @@ -1,131 +0,0 @@ ---- -slug: "/reference/typescript/relay/deferred" -title: "Deferred" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "interface" - language: "typescript" - qualified_name: "relay.Deferred" - module: "relay" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Deferred.ts" ---- -# `Deferred` - -A promise with externalised `resolve`/`reject` and a `settled` flag, -used by the RELAY client to bridge server-push events back to in-flight -JSON-RPC request callers. - -## Signature - -```typescript -interface Deferred -``` - -## Type Parameters - - - -## Properties - - - The wrapped promise. - - - - Reject the promise idempotently (later calls are ignored). - - - - Resolve the promise idempotently (later calls are ignored). - - - - True once either `resolve` or `reject` has been called. - - -## Functions - -### createDeferred - -Create a [Deferred](/docs/sdk-reference/reference/typescript/relay/deferred) with externalised `resolve` / `reject` and a -`settled` flag. - -The returned object exposes the promise plus its resolve and reject -functions so callers outside the executor can settle it. Later calls to -`resolve` or `reject` are idempotent. - -#### Signature - -```typescript -createDeferred(): Deferred -``` - -#### Type Parameters - - - Resolution value type of the wrapped promise. - - -#### Returns - -`Deferred` — A fresh `Deferred` in pending state. - -#### Source - -[`src/relay/Deferred.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Deferred.ts) - -Line 34. - -*** - -### withTimeout - -Race a promise against a timeout. - -#### Signature - -```typescript -withTimeout( - promise: Promise, - ms: number, - label: string = 'Operation' -): Promise -``` - -#### Type Parameters - - - Resolution value type of the input promise. - - -#### Parameters - - - Promise to race against the timeout. - - - - Timeout in milliseconds. - - - - Label used in the timeout error message. Defaults to `"Operation"`. - - -#### Returns - -`Promise` — A new promise that resolves with `promise`'s value if it settles before the timeout, and rejects with a timeout `Error` otherwise. - -#### Source - -[`src/relay/Deferred.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Deferred.ts) - -Line 73. - -## Source - -[`src/relay/Deferred.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Deferred.ts) - -Line 12. diff --git a/fern/products/sdk-reference/typescript/relay/index.mdx b/fern/products/sdk-reference/typescript/relay/index.mdx index 993f35b32b..de9d33cfa3 100644 --- a/fern/products/sdk-reference/typescript/relay/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/index.mdx @@ -18,6 +18,169 @@ lustri: module relay ``` +## Classes + + + + Async handle for a controllable call operation (play, record, tap, detect, etc.). + + + + Live RELAY call with command methods. + + + + SMS/MMS message in the RELAY messaging namespace. + + + + Real-time WebSocket client for SignalWire RELAY. + + + + Custom error class for RELAY protocol errors. + + + + Base class for all typed RELAY events. + + + +## Modules + + + + + + + + + + + + + + + + + +## Interfaces + +### Deferred + +A promise with externalised `resolve`/`reject` and a `settled` flag, +used by the RELAY client to bridge server-push events back to in-flight +JSON-RPC request callers. + +#### Signature + +```typescript +interface Deferred +``` + +#### Properties + + + The wrapped promise. + + + + Reject the promise idempotently (later calls are ignored). + + + + Resolve the promise idempotently (later calls are ignored). + + + + True once either `resolve` or `reject` has been called. + + +#### Functions + +##### createDeferred + +Create a [Deferred](/docs/sdk-reference/reference/typescript/relay#deferred) with externalised `resolve` / `reject` and a +`settled` flag. + +The returned object exposes the promise plus its resolve and reject +functions so callers outside the executor can settle it. Later calls to +`resolve` or `reject` are idempotent. + +###### Signature + +```typescript +createDeferred(): Deferred +``` + +###### Type Parameters + + + Resolution value type of the wrapped promise. + + +###### Returns + +`Deferred` — A fresh `Deferred` in pending state. + +###### Source + +[`src/relay/Deferred.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Deferred.ts) + +Line 34. + +*** + +##### withTimeout + +Race a promise against a timeout. + +###### Signature + +```typescript +withTimeout( + promise: Promise, + ms: number, + label: string = 'Operation' +): Promise +``` + +###### Type Parameters + + + Resolution value type of the input promise. + + +###### Parameters + + + Promise to race against the timeout. + + + + Timeout in milliseconds. + + + + Label used in the timeout error message. Defaults to `"Operation"`. + + +###### Returns + +`Promise` — A new promise that resolves with `promise`'s value if it settles before the timeout, and rejects with a timeout `Error` otherwise. + +###### Source + +[`src/relay/Deferred.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Deferred.ts) + +Line 73. + +#### Source + +[`src/relay/Deferred.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Deferred.ts) + +Line 12. + ## Source [`src/relay/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/index.ts) diff --git a/fern/products/sdk-reference/typescript/relay/message/index.mdx b/fern/products/sdk-reference/typescript/relay/message/index.mdx index 80604ea5e2..a0bf88183b 100644 --- a/fern/products/sdk-reference/typescript/relay/message/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/message/index.mdx @@ -8,6 +8,7 @@ lustri: kind: "class" language: "typescript" qualified_name: "relay.Message" + parent: "relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Message.ts" --- @@ -217,7 +218,7 @@ wait(timeout?: number): Promise #### Returns -`Promise` — The final `messaging.state` [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event). +`Promise` — The final `messaging.state` `RelayEvent`. #### Throws diff --git a/fern/products/sdk-reference/typescript/relay/normalize/index.mdx b/fern/products/sdk-reference/typescript/relay/normalize/index.mdx index 6de7ab1315..37c754ecd6 100644 --- a/fern/products/sdk-reference/typescript/relay/normalize/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/normalize/index.mdx @@ -8,6 +8,7 @@ lustri: kind: "module" language: "typescript" qualified_name: "relay.normalize" + parent: "relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/normalize.ts" --- diff --git a/fern/products/sdk-reference/typescript/relay/relay-client/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-client/index.mdx index 33052b6bf2..8b43c54421 100644 --- a/fern/products/sdk-reference/typescript/relay/relay-client/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/relay-client/index.mdx @@ -8,6 +8,7 @@ lustri: kind: "class" language: "typescript" qualified_name: "relay.RelayClient" + parent: "relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayClient.ts" --- @@ -64,7 +65,7 @@ class RelayClient ## See Also -- \- \[Call]\(/docs/sdk-reference/reference/typescript/relay/call) +- \- \`Call\` \- \[Message]\(/docs/sdk-reference/reference/typescript/relay/message) ## Properties @@ -239,7 +240,7 @@ dial( #### Returns -`Promise` — A [Call](/docs/sdk-reference/reference/typescript/relay/call) representing the answered leg. +`Promise` — A `Call` representing the answered leg. #### Throws @@ -368,7 +369,7 @@ Line 560. Register the inbound call handler. The handler is invoked once per inbound call, with a fully-formed -[Call](/docs/sdk-reference/reference/typescript/relay/call) already in state `"created"`. Answer, reject, or forward +`Call` already in state `"created"`. Answer, reject, or forward the call from inside the handler. #### Signature @@ -407,7 +408,7 @@ escape hatch used by the porting-sdk audit harness to react to every event the platform pushes. Fires BEFORE typed routing, so the same event will be observed here -AND on any matching [Call](/docs/sdk-reference/reference/typescript/relay/call) / [Message](/docs/sdk-reference/reference/typescript/relay/message). +AND on any matching `Call` / [Message](/docs/sdk-reference/reference/typescript/relay/message). #### Signature diff --git a/fern/products/sdk-reference/typescript/relay/relay-error/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-error/index.mdx index 1c72cf3796..08afa39493 100644 --- a/fern/products/sdk-reference/typescript/relay/relay-error/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/relay-error/index.mdx @@ -8,6 +8,7 @@ lustri: kind: "class" language: "typescript" qualified_name: "relay.RelayError" + parent: "relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayError.ts" --- diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/call-receive-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/call-receive-event/index.mdx index 189ab4a8d5..e22df03ee4 100644 --- a/fern/products/sdk-reference/typescript/relay/relay-event/call-receive-event/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/relay-event/call-receive-event/index.mdx @@ -24,7 +24,7 @@ class CallReceiveEvent extends RelayEvent ## Inheritance -**Extends:** [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) +**Extends:** `RelayEvent` ## Properties diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/call-state-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/call-state-event/index.mdx index d361764f68..61f2894a05 100644 --- a/fern/products/sdk-reference/typescript/relay/relay-event/call-state-event/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/relay-event/call-state-event/index.mdx @@ -24,7 +24,7 @@ class CallStateEvent extends RelayEvent ## Inheritance -**Extends:** [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) +**Extends:** `RelayEvent` ## Properties diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/calling-error-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/calling-error-event/index.mdx index ad36c2e42a..06047ace58 100644 --- a/fern/products/sdk-reference/typescript/relay/relay-event/calling-error-event/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/relay-event/calling-error-event/index.mdx @@ -24,7 +24,7 @@ class CallingErrorEvent extends RelayEvent ## Inheritance -**Extends:** [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) +**Extends:** `RelayEvent` ## Properties diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/collect-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/collect-event/index.mdx index 8cd7237e20..22a2a084cd 100644 --- a/fern/products/sdk-reference/typescript/relay/relay-event/collect-event/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/relay-event/collect-event/index.mdx @@ -24,7 +24,7 @@ class CollectEvent extends RelayEvent ## Inheritance -**Extends:** [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) +**Extends:** `RelayEvent` ## Properties diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/conference-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/conference-event/index.mdx index 62f5d76520..0613f87425 100644 --- a/fern/products/sdk-reference/typescript/relay/relay-event/conference-event/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/relay-event/conference-event/index.mdx @@ -24,7 +24,7 @@ class ConferenceEvent extends RelayEvent ## Inheritance -**Extends:** [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) +**Extends:** `RelayEvent` ## Properties diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/connect-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/connect-event/index.mdx index 811948afa2..b7bcbe089b 100644 --- a/fern/products/sdk-reference/typescript/relay/relay-event/connect-event/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/relay-event/connect-event/index.mdx @@ -24,7 +24,7 @@ class ConnectEvent extends RelayEvent ## Inheritance -**Extends:** [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) +**Extends:** `RelayEvent` ## Properties diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/denoise-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/denoise-event/index.mdx index 52b4bf7ece..d968e352c9 100644 --- a/fern/products/sdk-reference/typescript/relay/relay-event/denoise-event/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/relay-event/denoise-event/index.mdx @@ -24,7 +24,7 @@ class DenoiseEvent extends RelayEvent ## Inheritance -**Extends:** [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) +**Extends:** `RelayEvent` ## Properties diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/detect-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/detect-event/index.mdx index 24a13c98b6..a36e7c99f1 100644 --- a/fern/products/sdk-reference/typescript/relay/relay-event/detect-event/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/relay-event/detect-event/index.mdx @@ -24,7 +24,7 @@ class DetectEvent extends RelayEvent ## Inheritance -**Extends:** [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) +**Extends:** `RelayEvent` ## Properties diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/dial-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/dial-event/index.mdx index df99936b37..9c7b8c1feb 100644 --- a/fern/products/sdk-reference/typescript/relay/relay-event/dial-event/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/relay-event/dial-event/index.mdx @@ -24,7 +24,7 @@ class DialEvent extends RelayEvent ## Inheritance -**Extends:** [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) +**Extends:** `RelayEvent` ## Properties diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/echo-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/echo-event/index.mdx index b430755eff..84e7ddd1db 100644 --- a/fern/products/sdk-reference/typescript/relay/relay-event/echo-event/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/relay-event/echo-event/index.mdx @@ -24,7 +24,7 @@ class EchoEvent extends RelayEvent ## Inheritance -**Extends:** [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) +**Extends:** `RelayEvent` ## Properties diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/fax-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/fax-event/index.mdx index 6a671103d7..5a7dfcd37e 100644 --- a/fern/products/sdk-reference/typescript/relay/relay-event/fax-event/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/relay-event/fax-event/index.mdx @@ -24,7 +24,7 @@ class FaxEvent extends RelayEvent ## Inheritance -**Extends:** [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) +**Extends:** `RelayEvent` ## Properties diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/hold-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/hold-event/index.mdx index 80c4860165..6abd3edecf 100644 --- a/fern/products/sdk-reference/typescript/relay/relay-event/hold-event/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/relay-event/hold-event/index.mdx @@ -24,7 +24,7 @@ class HoldEvent extends RelayEvent ## Inheritance -**Extends:** [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) +**Extends:** `RelayEvent` ## Properties diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/index.mdx index e42376db44..901e8cc1c0 100644 --- a/fern/products/sdk-reference/typescript/relay/relay-event/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/relay-event/index.mdx @@ -8,6 +8,7 @@ lustri: kind: "class" language: "typescript" qualified_name: "relay.RelayEvent" + parent: "relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/RelayEvent.ts" --- @@ -50,102 +51,6 @@ class RelayEvent Maps RELAY `event_type` strings to the typed event subclass that builds its wrapper. Used by [parseEvent](/docs/sdk-reference/reference/typescript/relay/relay-event#parse-event) to dispatch raw payloads. -## Classes - - - - `calling.error` — platform-emitted error against the calling namespace. - - - - `calling.call.receive` — fires when an inbound call arrives on a subscribed context. - - - - `calling.call.state` — fires on every lifecycle transition (created, ringing, answered, ending, ended). - - - - `calling.call.collect` — caller input (DTMF or speech) collected by a collect action. - - - - `calling.conference` — conference lifecycle change (created, active, ended). - - - - `calling.call.connect` — state transition when one call connects to another (dialplan/bridge). - - - - `calling.call.denoise` — noise-reduction on/off confirmation. - - - - `calling.call.detect` — answering-machine / fax / DTMF detection result. - - - - `calling.call.dial` — outbound dial progress (answered, failed, no-answer, etc.). - - - - `calling.call.echo` — test/diagnostic echo reflection from the server. - - - - `calling.call.fax` — fax send/receive progress update. - - - - `calling.call.hold` — hold/unhold state change on the call. - - - - `messaging.receive` — inbound SMS/MMS received on a subscribed context. - - - - `messaging.state` — state change for an outbound message (queued → sent → delivered/failed). - - - - `calling.call.pay` — PCI-compliant payment collection progress update. - - - - `calling.call.play` — play-media action state change (`playing`, `paused`, `finished`, `error`). - - - - `calling.call.queue` — call-queue position update (queued, waiting, member answered, timed out). - - - - `calling.call.record` — recording state change with final URL, duration, and size when finished. - - - - `calling.call.refer` — SIP REFER result (off-platform transfer response codes). - - - - `calling.call.send_digits` — progress update for DTMF digits sent out on a call. - - - - `calling.call.stream` — outbound media stream state change (e.g. RTMP/WebSocket streaming). - - - - `calling.call.tap` — media tap state change (audio mirror to an external endpoint). - - - - `calling.call.transcribe` — transcription state change and final URL/duration when finished. - - - ## Methods ### constructor diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/index__2.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/index__2.mdx new file mode 100644 index 0000000000..147d9d5c92 --- /dev/null +++ b/fern/products/sdk-reference/typescript/relay/relay-event/index__2.mdx @@ -0,0 +1,110 @@ +--- +slug: "/reference/typescript/relay/relay-event/index__2" +title: "RelayEvent" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "relay.RelayEvent" + parent: "relay" + module: "relay" +--- +# `RelayEvent` + +## Classes + + + + `calling.error` — platform-emitted error against the calling namespace. + + + + `calling.call.receive` — fires when an inbound call arrives on a subscribed context. + + + + `calling.call.state` — fires on every lifecycle transition (created, ringing, answered, ending, ended). + + + + `calling.call.collect` — caller input (DTMF or speech) collected by a collect action. + + + + `calling.conference` — conference lifecycle change (created, active, ended). + + + + `calling.call.connect` — state transition when one call connects to another (dialplan/bridge). + + + + `calling.call.denoise` — noise-reduction on/off confirmation. + + + + `calling.call.detect` — answering-machine / fax / DTMF detection result. + + + + `calling.call.dial` — outbound dial progress (answered, failed, no-answer, etc.). + + + + `calling.call.echo` — test/diagnostic echo reflection from the server. + + + + `calling.call.fax` — fax send/receive progress update. + + + + `calling.call.hold` — hold/unhold state change on the call. + + + + `messaging.receive` — inbound SMS/MMS received on a subscribed context. + + + + `messaging.state` — state change for an outbound message (queued → sent → delivered/failed). + + + + `calling.call.pay` — PCI-compliant payment collection progress update. + + + + `calling.call.play` — play-media action state change (`playing`, `paused`, `finished`, `error`). + + + + `calling.call.queue` — call-queue position update (queued, waiting, member answered, timed out). + + + + `calling.call.record` — recording state change with final URL, duration, and size when finished. + + + + `calling.call.refer` — SIP REFER result (off-platform transfer response codes). + + + + `calling.call.send_digits` — progress update for DTMF digits sent out on a call. + + + + `calling.call.stream` — outbound media stream state change (e.g. RTMP/WebSocket streaming). + + + + `calling.call.tap` — media tap state change (audio mirror to an external endpoint). + + + + `calling.call.transcribe` — transcription state change and final URL/duration when finished. + + diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/message-receive-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/message-receive-event/index.mdx index 56956af447..2ba7a4de2b 100644 --- a/fern/products/sdk-reference/typescript/relay/relay-event/message-receive-event/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/relay-event/message-receive-event/index.mdx @@ -24,7 +24,7 @@ class MessageReceiveEvent extends RelayEvent ## Inheritance -**Extends:** [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) +**Extends:** `RelayEvent` ## Properties diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/message-state-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/message-state-event/index.mdx index 89140613ea..ed9cee0b52 100644 --- a/fern/products/sdk-reference/typescript/relay/relay-event/message-state-event/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/relay-event/message-state-event/index.mdx @@ -24,7 +24,7 @@ class MessageStateEvent extends RelayEvent ## Inheritance -**Extends:** [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) +**Extends:** `RelayEvent` ## Properties diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/pay-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/pay-event/index.mdx index 95cb88d6d1..bb41e11392 100644 --- a/fern/products/sdk-reference/typescript/relay/relay-event/pay-event/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/relay-event/pay-event/index.mdx @@ -24,7 +24,7 @@ class PayEvent extends RelayEvent ## Inheritance -**Extends:** [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) +**Extends:** `RelayEvent` ## Properties diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/play-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/play-event/index.mdx index 049c1f3899..80bdbe6f3d 100644 --- a/fern/products/sdk-reference/typescript/relay/relay-event/play-event/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/relay-event/play-event/index.mdx @@ -24,7 +24,7 @@ class PlayEvent extends RelayEvent ## Inheritance -**Extends:** [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) +**Extends:** `RelayEvent` ## Properties diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/queue-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/queue-event/index.mdx index 07ae78edc9..61b3ead2f5 100644 --- a/fern/products/sdk-reference/typescript/relay/relay-event/queue-event/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/relay-event/queue-event/index.mdx @@ -24,7 +24,7 @@ class QueueEvent extends RelayEvent ## Inheritance -**Extends:** [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) +**Extends:** `RelayEvent` ## Properties diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/record-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/record-event/index.mdx index f3cb4a2ba1..c22e71f20b 100644 --- a/fern/products/sdk-reference/typescript/relay/relay-event/record-event/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/relay-event/record-event/index.mdx @@ -24,7 +24,7 @@ class RecordEvent extends RelayEvent ## Inheritance -**Extends:** [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) +**Extends:** `RelayEvent` ## Properties diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/refer-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/refer-event/index.mdx index 4263fea541..79742ec73b 100644 --- a/fern/products/sdk-reference/typescript/relay/relay-event/refer-event/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/relay-event/refer-event/index.mdx @@ -24,7 +24,7 @@ class ReferEvent extends RelayEvent ## Inheritance -**Extends:** [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) +**Extends:** `RelayEvent` ## Properties diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/send-digits-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/send-digits-event/index.mdx index dc2f8c0227..5f33f0d640 100644 --- a/fern/products/sdk-reference/typescript/relay/relay-event/send-digits-event/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/relay-event/send-digits-event/index.mdx @@ -24,7 +24,7 @@ class SendDigitsEvent extends RelayEvent ## Inheritance -**Extends:** [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) +**Extends:** `RelayEvent` ## Properties diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/stream-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/stream-event/index.mdx index 280cdca7c7..f69ee473e9 100644 --- a/fern/products/sdk-reference/typescript/relay/relay-event/stream-event/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/relay-event/stream-event/index.mdx @@ -24,7 +24,7 @@ class StreamEvent extends RelayEvent ## Inheritance -**Extends:** [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) +**Extends:** `RelayEvent` ## Properties diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/tap-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/tap-event/index.mdx index e457889149..82f05ad430 100644 --- a/fern/products/sdk-reference/typescript/relay/relay-event/tap-event/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/relay-event/tap-event/index.mdx @@ -24,7 +24,7 @@ class TapEvent extends RelayEvent ## Inheritance -**Extends:** [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) +**Extends:** `RelayEvent` ## Properties diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/transcribe-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/transcribe-event/index.mdx index aaa6003e33..9db59aea31 100644 --- a/fern/products/sdk-reference/typescript/relay/relay-event/transcribe-event/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/relay-event/transcribe-event/index.mdx @@ -24,7 +24,7 @@ class TranscribeEvent extends RelayEvent ## Inheritance -**Extends:** [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) +**Extends:** `RelayEvent` ## Properties diff --git a/fern/products/sdk-reference/typescript/relay/types/index.mdx b/fern/products/sdk-reference/typescript/relay/types/index.mdx index 98cf3e78c1..3ec764acef 100644 --- a/fern/products/sdk-reference/typescript/relay/types/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/types/index.mdx @@ -8,6 +8,7 @@ lustri: kind: "module" language: "typescript" qualified_name: "relay.types" + parent: "relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/types.ts" --- diff --git a/fern/products/sdk-reference/typescript/rest/base/base-resource/index.mdx b/fern/products/sdk-reference/typescript/rest/base/base-resource/index.mdx index 4f4ce1bfeb..81c99dac4e 100644 --- a/fern/products/sdk-reference/typescript/rest/base/base-resource/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/base/base-resource/index.mdx @@ -8,6 +8,7 @@ lustri: kind: "class" language: "typescript" qualified_name: "rest.base.BaseResource" + parent: "rest.base" module: "rest.base" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/BaseResource.ts" --- diff --git a/fern/products/sdk-reference/typescript/rest/base/crud-resource/index.mdx b/fern/products/sdk-reference/typescript/rest/base/crud-resource/index.mdx index b948091810..345602f9a0 100644 --- a/fern/products/sdk-reference/typescript/rest/base/crud-resource/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/base/crud-resource/index.mdx @@ -8,6 +8,7 @@ lustri: kind: "class" language: "typescript" qualified_name: "rest.base.CrudResource" + parent: "rest.base" module: "rest.base" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts" --- diff --git a/fern/products/sdk-reference/typescript/rest/base/crud-with-addresses/index.mdx b/fern/products/sdk-reference/typescript/rest/base/crud-with-addresses/index.mdx index 383fd92ca3..fde345dfcc 100644 --- a/fern/products/sdk-reference/typescript/rest/base/crud-with-addresses/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/base/crud-with-addresses/index.mdx @@ -8,6 +8,7 @@ lustri: kind: "class" language: "typescript" qualified_name: "rest.base.CrudWithAddresses" + parent: "rest.base" module: "rest.base" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudWithAddresses.ts" --- diff --git a/fern/products/sdk-reference/typescript/rest/base/index.mdx b/fern/products/sdk-reference/typescript/rest/base/index.mdx new file mode 100644 index 0000000000..a902dc0151 --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/base/index.mdx @@ -0,0 +1,30 @@ +--- +slug: "/reference/typescript/rest/base" +title: "base" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "rest.base" + parent: "rest" + module: "rest" +--- +# `base` + +## Classes + + + + Abstract base class for all REST resources. + + + + Generic CRUD resource with configurable update method. + + + + [CrudResource](/docs/sdk-reference/reference/typescript/rest/base/crud-resource) extended with a `listAddresses()` helper for resources that have associated Address records (e.g. fabric resources). + + diff --git a/fern/products/sdk-reference/typescript/rest/call-handler/index.mdx b/fern/products/sdk-reference/typescript/rest/call-handler/index.mdx index 384f1c5e3c..5c013aecc5 100644 --- a/fern/products/sdk-reference/typescript/rest/call-handler/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/call-handler/index.mdx @@ -8,6 +8,7 @@ lustri: kind: "module" language: "typescript" qualified_name: "rest.callHandler" + parent: "rest" module: "rest" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/callHandler.ts" --- diff --git a/fern/products/sdk-reference/typescript/rest/http-client/index.mdx b/fern/products/sdk-reference/typescript/rest/http-client/index.mdx index 8c657e796b..15d018a7c8 100644 --- a/fern/products/sdk-reference/typescript/rest/http-client/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/http-client/index.mdx @@ -8,6 +8,7 @@ lustri: kind: "class" language: "typescript" qualified_name: "rest.HttpClient" + parent: "rest" module: "rest" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/HttpClient.ts" --- diff --git a/fern/products/sdk-reference/typescript/rest/index.mdx b/fern/products/sdk-reference/typescript/rest/index.mdx index 1170cd9523..c7787dcfc2 100644 --- a/fern/products/sdk-reference/typescript/rest/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/index.mdx @@ -21,9 +21,31 @@ module rest ## Classes + + Low-level HTTP client used by every REST namespace resource. + + REST client for the SignalWire platform APIs. + + + Custom error class for REST API errors. + + + +## Modules + + + + + + + + + + + ## Source diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/addresses/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/addresses/index.mdx index cf607a11c6..d359cb4426 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/addresses/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/namespaces/addresses/index.mdx @@ -8,6 +8,7 @@ lustri: kind: "module" language: "typescript" qualified_name: "rest.namespaces.addresses" + parent: "rest.namespaces" module: "rest.namespaces" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/addresses.ts" --- diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/calling/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/calling/index.mdx index a9ea5b9085..a150c01ce1 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/calling/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/namespaces/calling/index.mdx @@ -8,6 +8,7 @@ lustri: kind: "module" language: "typescript" qualified_name: "rest.namespaces.calling" + parent: "rest.namespaces" module: "rest.namespaces" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts" --- diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/chat/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/chat/index.mdx index 4be5ab174d..cb43bc664d 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/chat/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/namespaces/chat/index.mdx @@ -8,6 +8,7 @@ lustri: kind: "module" language: "typescript" qualified_name: "rest.namespaces.chat" + parent: "rest.namespaces" module: "rest.namespaces" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/chat.ts" --- diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/compat/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/compat/index.mdx index b070395b88..56be215a05 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/compat/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/namespaces/compat/index.mdx @@ -8,6 +8,7 @@ lustri: kind: "module" language: "typescript" qualified_name: "rest.namespaces.compat" + parent: "rest.namespaces" module: "rest.namespaces" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts" --- diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/datasphere/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/datasphere/index.mdx index 15e42b1a31..fc9a2cf677 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/datasphere/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/namespaces/datasphere/index.mdx @@ -8,6 +8,7 @@ lustri: kind: "module" language: "typescript" qualified_name: "rest.namespaces.datasphere" + parent: "rest.namespaces" module: "rest.namespaces" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/datasphere.ts" --- diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/fabric/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/fabric/index.mdx index fd5e21b9e8..71f7a0d75f 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/fabric/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/namespaces/fabric/index.mdx @@ -8,6 +8,7 @@ lustri: kind: "module" language: "typescript" qualified_name: "rest.namespaces.fabric" + parent: "rest.namespaces" module: "rest.namespaces" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts" --- diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/imported-numbers/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/imported-numbers/index.mdx index dedff05d68..52e7bc6fcb 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/imported-numbers/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/namespaces/imported-numbers/index.mdx @@ -8,6 +8,7 @@ lustri: kind: "module" language: "typescript" qualified_name: "rest.namespaces.imported-numbers" + parent: "rest.namespaces" module: "rest.namespaces" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/imported-numbers.ts" --- diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/index.mdx new file mode 100644 index 0000000000..f0e7c99640 --- /dev/null +++ b/fern/products/sdk-reference/typescript/rest/namespaces/index.mdx @@ -0,0 +1,60 @@ +--- +slug: "/reference/typescript/rest/namespaces" +title: "namespaces" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "rest.namespaces" + parent: "rest" + module: "rest" +--- +# `namespaces` + +## Modules + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/logs/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/logs/index.mdx index 9512d2507e..43b51994cc 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/logs/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/namespaces/logs/index.mdx @@ -8,6 +8,7 @@ lustri: kind: "module" language: "typescript" qualified_name: "rest.namespaces.logs" + parent: "rest.namespaces" module: "rest.namespaces" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/logs.ts" --- diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/lookup/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/lookup/index.mdx index 1063393830..2ae8d589c8 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/lookup/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/namespaces/lookup/index.mdx @@ -8,6 +8,7 @@ lustri: kind: "module" language: "typescript" qualified_name: "rest.namespaces.lookup" + parent: "rest.namespaces" module: "rest.namespaces" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/lookup.ts" --- diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/mfa/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/mfa/index.mdx index 17f97910a6..353c5f6fb5 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/mfa/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/namespaces/mfa/index.mdx @@ -8,6 +8,7 @@ lustri: kind: "module" language: "typescript" qualified_name: "rest.namespaces.mfa" + parent: "rest.namespaces" module: "rest.namespaces" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/mfa.ts" --- diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/number-groups/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/number-groups/index.mdx index e29d76a36e..3394a46277 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/number-groups/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/namespaces/number-groups/index.mdx @@ -8,6 +8,7 @@ lustri: kind: "module" language: "typescript" qualified_name: "rest.namespaces.number-groups" + parent: "rest.namespaces" module: "rest.namespaces" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/number-groups.ts" --- diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/phone-numbers/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/phone-numbers/index.mdx index 2794007471..1034609369 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/phone-numbers/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/namespaces/phone-numbers/index.mdx @@ -8,6 +8,7 @@ lustri: kind: "module" language: "typescript" qualified_name: "rest.namespaces.phone-numbers" + parent: "rest.namespaces" module: "rest.namespaces" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/phone-numbers.ts" --- diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/project/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/project/index.mdx index 45b44f0227..7c939876d0 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/project/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/namespaces/project/index.mdx @@ -8,6 +8,7 @@ lustri: kind: "module" language: "typescript" qualified_name: "rest.namespaces.project" + parent: "rest.namespaces" module: "rest.namespaces" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/project.ts" --- diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/pubsub/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/pubsub/index.mdx index 5ea5316300..cad92e949f 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/pubsub/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/namespaces/pubsub/index.mdx @@ -8,6 +8,7 @@ lustri: kind: "module" language: "typescript" qualified_name: "rest.namespaces.pubsub" + parent: "rest.namespaces" module: "rest.namespaces" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/pubsub.ts" --- diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/queues/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/queues/index.mdx index c15652ef03..9ff3bdd7ab 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/queues/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/namespaces/queues/index.mdx @@ -8,6 +8,7 @@ lustri: kind: "module" language: "typescript" qualified_name: "rest.namespaces.queues" + parent: "rest.namespaces" module: "rest.namespaces" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/queues.ts" --- diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/recordings/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/recordings/index.mdx index a72a0f7499..87736b2546 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/recordings/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/namespaces/recordings/index.mdx @@ -8,6 +8,7 @@ lustri: kind: "module" language: "typescript" qualified_name: "rest.namespaces.recordings" + parent: "rest.namespaces" module: "rest.namespaces" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/recordings.ts" --- diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/registry/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/registry/index.mdx index 01e073f3fd..9e186a2832 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/registry/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/namespaces/registry/index.mdx @@ -8,6 +8,7 @@ lustri: kind: "module" language: "typescript" qualified_name: "rest.namespaces.registry" + parent: "rest.namespaces" module: "rest.namespaces" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/registry.ts" --- diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/short-codes/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/short-codes/index.mdx index 4e0c11cc7a..712cc0fbbd 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/short-codes/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/namespaces/short-codes/index.mdx @@ -8,6 +8,7 @@ lustri: kind: "module" language: "typescript" qualified_name: "rest.namespaces.short-codes" + parent: "rest.namespaces" module: "rest.namespaces" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/short-codes.ts" --- diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/sip-profile/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/sip-profile/index.mdx index 7627127bfd..480f21a5f0 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/sip-profile/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/namespaces/sip-profile/index.mdx @@ -8,6 +8,7 @@ lustri: kind: "module" language: "typescript" qualified_name: "rest.namespaces.sip-profile" + parent: "rest.namespaces" module: "rest.namespaces" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/sip-profile.ts" --- diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/verified-callers/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/verified-callers/index.mdx index f5e5bf12e2..745076597b 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/verified-callers/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/namespaces/verified-callers/index.mdx @@ -8,6 +8,7 @@ lustri: kind: "module" language: "typescript" qualified_name: "rest.namespaces.verified-callers" + parent: "rest.namespaces" module: "rest.namespaces" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/verified-callers.ts" --- diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/video/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/video/index.mdx index 31acf7ac95..8b22832e45 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/video/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/namespaces/video/index.mdx @@ -8,6 +8,7 @@ lustri: kind: "module" language: "typescript" qualified_name: "rest.namespaces.video" + parent: "rest.namespaces" module: "rest.namespaces" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/video.ts" --- diff --git a/fern/products/sdk-reference/typescript/rest/pagination/index.mdx b/fern/products/sdk-reference/typescript/rest/pagination/index.mdx index cb900a1646..899d98fcb6 100644 --- a/fern/products/sdk-reference/typescript/rest/pagination/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/pagination/index.mdx @@ -8,6 +8,7 @@ lustri: kind: "module" language: "typescript" qualified_name: "rest.pagination" + parent: "rest" module: "rest" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/pagination.ts" --- diff --git a/fern/products/sdk-reference/typescript/rest/rest-error/index.mdx b/fern/products/sdk-reference/typescript/rest/rest-error/index.mdx index a624247ced..660d65a3da 100644 --- a/fern/products/sdk-reference/typescript/rest/rest-error/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/rest-error/index.mdx @@ -8,6 +8,7 @@ lustri: kind: "class" language: "typescript" qualified_name: "rest.RestError" + parent: "rest" module: "rest" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/RestError.ts" --- diff --git a/fern/products/sdk-reference/typescript/rest/types/index.mdx b/fern/products/sdk-reference/typescript/rest/types/index.mdx index 4269bf3880..1b99ad17d4 100644 --- a/fern/products/sdk-reference/typescript/rest/types/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/types/index.mdx @@ -8,6 +8,7 @@ lustri: kind: "module" language: "typescript" qualified_name: "rest.types" + parent: "rest" module: "rest" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/types.ts" --- diff --git a/fern/products/sdk-reference/typescript/schema-utils/index.mdx b/fern/products/sdk-reference/typescript/schema-utils/index.mdx deleted file mode 100644 index f36fa9adcb..0000000000 --- a/fern/products/sdk-reference/typescript/schema-utils/index.mdx +++ /dev/null @@ -1,362 +0,0 @@ ---- -slug: "/reference/typescript/schema-utils" -title: "SchemaUtils" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "SchemaUtils" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/SchemaUtils.ts" ---- -# `SchemaUtils` - -Validates SWML documents against structural rules with an LRU-style result cache. - -## Signature - -```typescript -class SchemaUtils -``` - -## Methods - -### clearCache - -Clear the validation cache - -#### Signature - -```typescript -clearCache(): void -``` - -#### Returns - -`void` - -#### Source - -[`src/SchemaUtils.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SchemaUtils.ts) - -Line 341. - -*** - -### constructor - -Create a SchemaUtils instance. - -#### Signature - -```typescript -constructor(opts?: { ...3 fields }): SchemaUtils -``` - -#### Parameters - - - Optional settings for skipping validation, limiting cache size, or overriding the schema file path. - - - - - - - - -#### Returns - -`SchemaUtils` - -#### Source - -[`src/SchemaUtils.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SchemaUtils.ts) - -Line 47. - -*** - -### getCacheSize - -Get the number of cached validation results. - -#### Signature - -```typescript -getCacheSize(): number -``` - -#### Returns - -`number` — The current cache entry count. - -#### Source - -[`src/SchemaUtils.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SchemaUtils.ts) - -Line 349. - -*** - -### getVerbDescription - -Get the description text for a verb. - -#### Signature - -```typescript -getVerbDescription(verbName: string): string -``` - -#### Parameters - - - The verb name. - - -#### Returns - -`string` — The description string or empty string. - -#### Source - -[`src/SchemaUtils.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SchemaUtils.ts) - -Line 158. - -*** - -### getVerbNames - -Get all verb names defined in the schema. - -#### Signature - -```typescript -getVerbNames(): string[] -``` - -#### Returns - -`string[]` — Array of verb names (e.g. \["answer", "ai", "hangup", ...]). - -#### Source - -[`src/SchemaUtils.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SchemaUtils.ts) - -Line 124. - -*** - -### getVerbProperties - -Get the inner properties schema for a specific verb. -For example, for "hangup" this returns `{ type: "object", properties: { reason: ... }, ... }`. - -#### Signature - -```typescript -getVerbProperties(verbName: string): Record -``` - -#### Parameters - - - The verb name (e.g. "answer", "tap"). - - -#### Returns - -`Record` — The inner schema definition or an empty object if not found. - -#### Source - -[`src/SchemaUtils.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SchemaUtils.ts) - -Line 134. - -*** - -### getVerbRequiredProperties - -Get the required properties for a verb's inner config. - -#### Signature - -```typescript -getVerbRequiredProperties(verbName: string): string[] -``` - -#### Parameters - - - The verb name. - - -#### Returns - -`string[]` — Array of required property names. - -#### Source - -[`src/SchemaUtils.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SchemaUtils.ts) - -Line 147. - -*** - -### hasVerb - -Check if a verb name is defined in the schema. - -#### Signature - -```typescript -hasVerb(verbName: string): boolean -``` - -#### Parameters - - - The verb name. - - -#### Returns - -`boolean` — True if the verb exists. - -#### Source - -[`src/SchemaUtils.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SchemaUtils.ts) - -Line 168. - -*** - -### validate - -Validate a SWML document against structural rules. - -#### Signature - -```typescript -validate(swml: string | Record): ValidationResult -``` - -#### Parameters - - - The SWML document as a JSON string or parsed object. - - -#### Returns - -`ValidationResult` — The validation result indicating success or a list of errors. - -#### Source - -[`src/SchemaUtils.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SchemaUtils.ts) - -Line 231. - -*** - -### validateVerb - -Lightweight validation of a verb config against the schema. -Checks that the verb exists and required properties are present. -Mirrors Python SDK's `_validate_verb_lightweight()`. - -#### Signature - -```typescript -validateVerb(verbName: string, config: unknown): ValidationResult -``` - -#### Parameters - - - The verb name. - - - - The verb configuration to validate. - - -#### Returns - -`ValidationResult` — Validation result. - -#### Source - -[`src/SchemaUtils.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SchemaUtils.ts) - -Line 181. - -## Interfaces - -### ValidationResult - -Result of validating a SWML document. - -#### Signature - -```typescript -interface ValidationResult -``` - -#### Properties - - - List of human-readable error messages; empty when valid. - - - - Whether the document passed all validation checks. - - -#### Source - -[`src/SchemaUtils.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SchemaUtils.ts) - -Line 12. - -*** - -### VerbDefinition - -A verb definition extracted from the schema. - -#### Signature - -```typescript -interface VerbDefinition -``` - -#### Properties - - - The raw JSON Schema definition object for this verb. - - - - The verb name as used in SWML (e.g. "answer", "hangup", "sip\_refer"). - - - - The PascalCase schema definition name (e.g. "Answer", "Hangup", "SIPRefer"). - - -#### Source - -[`src/SchemaUtils.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SchemaUtils.ts) - -Line 20. - -## Source - -[`src/SchemaUtils.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SchemaUtils.ts) - -Line 34. diff --git a/fern/products/sdk-reference/typescript/security-utils/index.mdx b/fern/products/sdk-reference/typescript/security-utils/index.mdx deleted file mode 100644 index aff662922e..0000000000 --- a/fern/products/sdk-reference/typescript/security-utils/index.mdx +++ /dev/null @@ -1,278 +0,0 @@ ---- -slug: "/reference/typescript/security-utils" -title: "SecurityUtils" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "module" - language: "typescript" - qualified_name: "SecurityUtils" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/SecurityUtils.ts" ---- -# `SecurityUtils` - -## Signature - -```typescript -module SecurityUtils -``` - -## Constants - - - Maximum allowed input length for skill handler arguments (characters). - - -## Functions - -### filterSensitiveHeaders - -Return a copy of `headers` with sensitive entries (authorization, cookie, etc.) removed. - -#### Signature - -```typescript -filterSensitiveHeaders(headers: Record): Record -``` - -#### Parameters - - - Original header record. - - -#### Returns - -`Record` — A new record with sensitive headers removed. - -#### Source - -[`src/SecurityUtils.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SecurityUtils.ts) - -Line 47. - -*** - -### isPrivateIp - -Check whether an IP address belongs to a private/reserved range. -Covers RFC1918, loopback, link-local, IPv6 private (fc/fd, ::1, fe80). - -#### Signature - -```typescript -isPrivateIp(ip: string): boolean -``` - -#### Parameters - - - The IP address string to check. - - -#### Returns - -`boolean` — True if the IP is private/reserved. - -#### Source - -[`src/SecurityUtils.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SecurityUtils.ts) - -Line 84. - -*** - -### isServerlessMode - -Whether the current process is running in a serverless environment -(anything other than a long-lived `server` runtime). - -Python parity: `signalwire.utils.is_serverless_mode`. - -#### Signature - -```typescript -isServerlessMode(): boolean -``` - -#### Returns - -`boolean` - -#### Source - -[`src/SecurityUtils.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SecurityUtils.ts) - -Line 162. - -*** - -### isValidHostname - -Validate that a hostname string does not contain whitespace, slashes, or control characters. - -#### Signature - -```typescript -isValidHostname(host: string): boolean -``` - -#### Parameters - - - Hostname to validate. - - -#### Returns - -`boolean` — True if the hostname is valid. - -#### Source - -[`src/SecurityUtils.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SecurityUtils.ts) - -Line 72. - -*** - -### redactUrl - -Redact credentials embedded in a URL (e.g. `https://user:secret@host` -> `https://user:****@host`). -Returns the URL unchanged if no credentials are present. - -#### Signature - -```typescript -redactUrl(url: string): string -``` - -#### Parameters - - - The URL string to redact. - - -#### Returns - -`string` — The URL with the password portion replaced by `****`. - -#### Source - -[`src/SecurityUtils.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SecurityUtils.ts) - -Line 63. - -*** - -### resolveAndValidateUrl - -DNS-resolve a URL's hostname and reject it if it points to a private IP. - -#### Signature - -```typescript -resolveAndValidateUrl(url: string, allowPrivate: boolean = false): Promise -``` - -#### Parameters - - - The full URL to validate. - - - - When true, skip the private-IP check (default false). - - -#### Returns - -`Promise` - -#### Throws - -- If the resolved IP is private and `allowPrivate` is false. - -#### Source - -[`src/SecurityUtils.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SecurityUtils.ts) - -Line 107. - -*** - -### safeAssign - -Copy properties from `source` to `target`, filtering out prototype-pollution keys. -Drop-in replacement for `Object.assign(target, source)` where `source` is untrusted. - -#### Signature - -```typescript -safeAssign(target: T, source: Record): T -``` - -#### Type Parameters - - - -#### Parameters - - - The object to assign into. - - - - The object to copy properties from. - - -#### Returns - -`T` — The target object. - -#### Source - -[`src/SecurityUtils.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SecurityUtils.ts) - -Line 24. - -*** - -### validateUrl - -Validate that a URL is safe to fetch (not pointing to private/internal resources). - -Matches Python's `validate_url(url, allow_private=False) -> bool` — returns `true` -if the URL is safe, `false` otherwise (never throws). - -#### Signature - -```typescript -validateUrl(url: string, allowPrivate: boolean = false): Promise -``` - -#### Parameters - - - The URL to validate. - - - - When true, allow private IP ranges (default false). - - -#### Returns - -`Promise` — `true` if the URL is safe to fetch, `false` otherwise. - -#### Source - -[`src/SecurityUtils.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SecurityUtils.ts) - -Line 147. - -## Source - -[`src/SecurityUtils.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SecurityUtils.ts) - -Line 1. diff --git a/fern/products/sdk-reference/typescript/serverless-adapter/index.mdx b/fern/products/sdk-reference/typescript/serverless-adapter/index.mdx deleted file mode 100644 index 012e2bb806..0000000000 --- a/fern/products/sdk-reference/typescript/serverless-adapter/index.mdx +++ /dev/null @@ -1,394 +0,0 @@ ---- -slug: "/reference/typescript/serverless-adapter" -title: "ServerlessAdapter" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "ServerlessAdapter" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/ServerlessAdapter.ts" ---- -# `ServerlessAdapter` - -Adapts a Hono application for deployment on AWS Lambda, Google Cloud Functions, Azure Functions, or CGI. - -Accepts the provider's native event shape (`APIGatewayProxyEvent`, Google Functions `Request`, -Azure function arguments, CGI env + stdin) and returns a provider-native response. - -## Signature - -```typescript -class ServerlessAdapter -``` - -## Examples - -```typescript -import { AgentBase, ServerlessAdapter } from '@signalwire/sdk'; - -const agent = new AgentBase({ name: 'lambda', route: '/' }); -agent.setPromptText('You are a helpful assistant.'); - -const adapter = new ServerlessAdapter('aws'); - -export const handler = async (event: any) => { - return adapter.handleRequest(agent.asRouter(), event); -}; -``` - -## Methods - -### constructor - -Create a ServerlessAdapter for the given platform. - -#### Signature - -```typescript -constructor(platform: ServerlessPlatform = 'auto'): ServerlessAdapter -``` - -#### Parameters - - - Target platform; defaults to 'auto' which detects from environment variables. - - -#### Returns - -`ServerlessAdapter` - -#### Source - -[`src/ServerlessAdapter.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ServerlessAdapter.ts) - -Line 72. - -*** - -### createAzureHandler - -Create an Azure Functions-compatible handler from a Hono app. - -**Modifiers:** `static` - -#### Signature - -```typescript -createAzureHandler( - app: { ...1 fields } -): (context: any, req: any) => Promise -``` - -#### Parameters - - - A Hono-compatible application with a `fetch` method. - - - - -#### Returns - -`(context: any, req: any) => Promise` — A function that accepts an Azure context and request object. - -#### Source - -[`src/ServerlessAdapter.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ServerlessAdapter.ts) - -Line 223. - -*** - -### createGcfHandler - -Create a Google Cloud Functions-compatible handler from a Hono app. - -**Modifiers:** `static` - -#### Signature - -```typescript -createGcfHandler(app: { ...1 fields }): (req: any, res: any) => Promise -``` - -#### Parameters - - - A Hono-compatible application with a `fetch` method. - - - - -#### Returns - -`(req: any, res: any) => Promise` — A function that accepts GCF request/response objects. - -#### Source - -[`src/ServerlessAdapter.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ServerlessAdapter.ts) - -Line 200. - -*** - -### createLambdaHandler - -Create an AWS Lambda-compatible handler function from a Hono app. - -**Modifiers:** `static` - -#### Signature - -```typescript -createLambdaHandler( - app: { ...1 fields } -): (event: ServerlessEvent) => Promise -``` - -#### Parameters - - - A Hono-compatible application with a `fetch` method. - - - - -#### Returns - -`(event: ServerlessEvent) => Promise` — A function that accepts a Lambda event and returns a promise of a serverless response. - -#### Source - -[`src/ServerlessAdapter.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ServerlessAdapter.ts) - -Line 190. - -*** - -### detectPlatform - -Detect the serverless platform by inspecting well-known environment variables. - -#### Signature - -```typescript -detectPlatform(): ServerlessPlatform -``` - -#### Returns - -`ServerlessPlatform` — The detected platform identifier; defaults to 'lambda' if no match is found. - -#### Source - -[`src/ServerlessAdapter.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ServerlessAdapter.ts) - -Line 80. - -*** - -### generateUrl - -Generate the platform-specific invocation URL for a deployed function. - -#### Signature - -```typescript -generateUrl(opts?: { ...5 fields }): string -``` - -#### Parameters - - - Optional overrides for region, project, function name, stage, or API ID. - - - - - - - - - - - - -#### Returns - -`string` — The constructed URL string. - -#### Source - -[`src/ServerlessAdapter.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ServerlessAdapter.ts) - -Line 153. - -*** - -### getPlatform - -Get the resolved platform identifier. - -#### Signature - -```typescript -getPlatform(): ServerlessPlatform -``` - -#### Returns - -`ServerlessPlatform` — The serverless platform this adapter is configured for. - -#### Source - -[`src/ServerlessAdapter.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ServerlessAdapter.ts) - -Line 92. - -*** - -### handleRequest - -Convert a serverless event into a standard Request, route it through the Hono app, and return a normalized response. - -#### Signature - -```typescript -handleRequest( - app: { ...1 fields }, - event: ServerlessEvent -): Promise -``` - -#### Parameters - - - A Hono-compatible application with a `fetch` method. - - - - - - The incoming serverless event to process. - - -#### Returns - -`Promise` — The normalized serverless response. - -#### Source - -[`src/ServerlessAdapter.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ServerlessAdapter.ts) - -Line 102. - -## Type Aliases - -### ServerlessPlatform - -Supported serverless platform identifiers, or 'auto' for environment-based detection. - -#### Signature - -```typescript -type ServerlessPlatform = "lambda" | "gcf" | "azure" | "cgi" | "auto" -``` - -#### Source - -[`src/ServerlessAdapter.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ServerlessAdapter.ts) - -Line 13. - -## Interfaces - -### ServerlessEvent - -Normalized incoming event from a serverless platform. - -#### Signature - -```typescript -interface ServerlessEvent -``` - -#### Properties - - - Request body, either raw JSON string or parsed object. - - - - Request headers as key-value pairs. - - - - HTTP method (AWS Lambda style). - - - - HTTP method (GCF/Azure style). - - - - Request path. - - - - Query string parameters as key-value pairs. - - - - Raw request path (AWS API Gateway v2). - - - - Platform-specific request context metadata. - - -#### Source - -[`src/ServerlessAdapter.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ServerlessAdapter.ts) - -Line 16. - -*** - -### ServerlessResponse - -Normalized outgoing response returned to a serverless platform. - -#### Signature - -```typescript -interface ServerlessResponse -``` - -#### Properties - - - Response body as a string. - - - - Response headers as key-value pairs. - - - - HTTP status code. - - -#### Source - -[`src/ServerlessAdapter.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ServerlessAdapter.ts) - -Line 36. - -## Source - -[`src/ServerlessAdapter.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ServerlessAdapter.ts) - -Line 65. diff --git a/fern/products/sdk-reference/typescript/session-manager/index.mdx b/fern/products/sdk-reference/typescript/session-manager/index.mdx deleted file mode 100644 index df56202281..0000000000 --- a/fern/products/sdk-reference/typescript/session-manager/index.mdx +++ /dev/null @@ -1,512 +0,0 @@ ---- -slug: "/reference/typescript/session-manager" -title: "SessionManager" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "SessionManager" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/SessionManager.ts" ---- -# `SessionManager` - -Stateless HMAC-SHA256 token manager for SWAIG function call authentication and per-session metadata storage. - -## Signature - -```typescript -class SessionManager -``` - -## Properties - - - When true, [debugToken](/docs/sdk-reference/reference/typescript/session-manager#debug-token) decodes token internals. When false (default), it returns `{ error: "debug mode not enabled" }`. - - - - HMAC signing secret. - - - - Token validity duration in seconds. - - -## Methods - -### activateSession - -Legacy method retained for API compatibility with the Python SDK. -Does nothing and returns `true`. - -#### Signature - -```typescript -activateSession(_callId: string): boolean -``` - -#### Parameters - - - The call/session identifier (unused). - - -#### Returns - -`boolean` — Always `true`. - -#### Source - -[`src/SessionManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SessionManager.ts) - -Line 289. - -*** - -### cleanup - -Remove session metadata entries older than `maxAgeMs`. - -#### Signature - -```typescript -cleanup(maxAgeMs?: number): void -``` - -#### Parameters - - - Maximum age in milliseconds (defaults to `tokenExpirySecs * 1000`). - - -#### Returns - -`void` - -#### Source - -[`src/SessionManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SessionManager.ts) - -Line 272. - -*** - -### constructor - -Create a new SessionManager. - -#### Signature - -```typescript -constructor(tokenExpirySecs: number = 900, secretKey?: string): SessionManager -``` - -#### Parameters - - - Token validity duration in seconds (default 900). - - - - HMAC signing secret; a random key is generated if omitted. - - -#### Returns - -`SessionManager` - -#### Source - -[`src/SessionManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SessionManager.ts) - -Line 52. - -*** - -### createSession - -Return the given callId or generate a new random session identifier. - -#### Signature - -```typescript -createSession(callId?: string): string -``` - -#### Parameters - - - Existing call ID to reuse. - - -#### Returns - -`string` — The call ID string. - -#### Source - -[`src/SessionManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SessionManager.ts) - -Line 62. - -*** - -### createToolToken - -Alias for [generateToken](/docs/sdk-reference/reference/typescript/session-manager#generate-token). - -#### Signature - -```typescript -createToolToken(functionName: string, callId: string): string -``` - -#### Parameters - - - The SWAIG function name to bind. - - - - The call ID to bind. - - -#### Returns - -`string` — A base64url-encoded token string. - -#### Source - -[`src/SessionManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SessionManager.ts) - -Line 92. - -*** - -### debugToken - -Debug a token without validating it. - -Requires [debugMode](/docs/sdk-reference/reference/typescript/session-manager#debug-mode) to be `true`. When disabled, returns -`{ error: "debug mode not enabled" }` matching the Python SDK behaviour. - -#### Signature - -```typescript -debugToken(token: string): DebugTokenResult -``` - -#### Parameters - - - The base64url-encoded token to decode. - - -#### Returns - -`DebugTokenResult` — A nested debug structure matching the Python SDK, or an error object. - -#### Source - -[`src/SessionManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SessionManager.ts) - -Line 169. - -*** - -### deleteSessionMetadata - -Delete all metadata for a session. - -#### Signature - -```typescript -deleteSessionMetadata(sessionId: string): boolean -``` - -#### Parameters - - - The session identifier. - - -#### Returns - -`boolean` — True if the session existed and was deleted. - -#### Source - -[`src/SessionManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SessionManager.ts) - -Line 308. - -*** - -### endSession - -Legacy method retained for API compatibility with the Python SDK. -Does nothing and returns `true`. - -#### Signature - -```typescript -endSession(_callId: string): boolean -``` - -#### Parameters - - - The call/session identifier (unused). - - -#### Returns - -`boolean` — Always `true`. - -#### Source - -[`src/SessionManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SessionManager.ts) - -Line 299. - -*** - -### generateToken - -Generate a signed, base64url-encoded token binding a function name to a call ID. - -#### Signature - -```typescript -generateToken(functionName: string, callId: string): string -``` - -#### Parameters - - - The SWAIG function name to bind. - - - - The call ID to bind. - - -#### Returns - -`string` — A base64url-encoded token string. - -#### Source - -[`src/SessionManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SessionManager.ts) - -Line 73. - -*** - -### getSessionMetadata - -Retrieve metadata associated with a session. - -Returns an empty object when no metadata has been stored for the session, -matching Python SDK behavior (`get_session_metadata` always returns `{}`). -Callers can safely check truthiness or iterate keys without a null guard. - -#### Signature - -```typescript -getSessionMetadata(sessionId: string): Record -``` - -#### Parameters - - - The session identifier. - - -#### Returns - -`Record` — The metadata record for the session, or `{}` if no metadata exists. - -#### Source - -[`src/SessionManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SessionManager.ts) - -Line 233. - -*** - -### setSessionMetadata - -Merge metadata into a session, creating the entry if it does not exist. - -Supports two call signatures for Python SDK compatibility: - -- `setSessionMetadata(sessionId, metadata)` — bulk merge (TS-native) -- `setSessionMetadata(sessionId, key, value)` — single key/value (Python-compatible) - -#### Signature - - - - ```typescript - setSessionMetadata( - sessionId: string, - metadataOrKey: Record - ): void - ``` - - - - ```typescript - setSessionMetadata(sessionId: string, key: string, value: unknown): boolean - ``` - - - -#### Parameters (Overload 1) - - - The session identifier. - - - - A metadata record to merge, or a string key when called with three arguments. - - -#### Parameters (Overload 2) - - - The session identifier. - - - - - - The value to set when called with a string key. - - -#### Returns (Overload 1) - -`void` - -#### Returns (Overload 2) - -`boolean` - -#### Source - -[`src/SessionManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SessionManager.ts) - -Line 248. - -*** - -### validateToken - -Validate a token against the expected call ID and function name. - -#### Signature - -```typescript -validateToken(callId: string, functionName: string, token: string): boolean -``` - -#### Parameters - - - The expected call ID. - - - - The expected function name. - - - - The base64url-encoded token to validate. - - -#### Returns - -`boolean` — True if the token is valid and not expired. - -#### Source - -[`src/SessionManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SessionManager.ts) - -Line 103. - -*** - -### validateToolToken - -Alias for [validateToken](/docs/sdk-reference/reference/typescript/session-manager#validate-token) with reordered parameters. - -#### Signature - -```typescript -validateToolToken(functionName: string, token: string, callId: string): boolean -``` - -#### Parameters - - - The expected function name. - - - - The base64url-encoded token to validate. - - - - The expected call ID. - - -#### Returns - -`boolean` — True if the token is valid and not expired. - -#### Source - -[`src/SessionManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SessionManager.ts) - -Line 156. - -## Interfaces - -### DebugTokenResult - -Decoded token debug info matching the Python SDK's nested return structure. - -#### Signature - -```typescript -interface DebugTokenResult -``` - -#### Properties - - - - - - - - - - - - - -#### Source - -[`src/SessionManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SessionManager.ts) - -Line 12. - -## Source - -[`src/SessionManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SessionManager.ts) - -Line 33. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/api-ninjas-trivia/api-ninjas-trivia-skill/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/api-ninjas-trivia/api-ninjas-trivia-skill/index.mdx deleted file mode 100644 index 07cfdaf323..0000000000 --- a/fern/products/sdk-reference/typescript/skills/builtin/api-ninjas-trivia/api-ninjas-trivia-skill/index.mdx +++ /dev/null @@ -1,709 +0,0 @@ ---- -slug: "/reference/typescript/skills/builtin/api-ninjas-trivia/api-ninjas-trivia-skill" -title: "ApiNinjasTriviaSkill" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "skills.builtin.api_ninjas_trivia.ApiNinjasTriviaSkill" - parent: "skills.builtin.api_ninjas_trivia" - module: "skills.builtin.api_ninjas_trivia" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/api_ninjas_trivia.ts" ---- -# `ApiNinjasTriviaSkill` - -Fetches trivia questions from the API Ninjas service. - -Tier 2 built-in skill. Requires the `API_NINJAS_KEY` environment variable. -Supports optional `default_category` and `reveal_answer` config options. - -## Signature - -```typescript -class ApiNinjasTriviaSkill extends SkillBase -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/skills/skill-base) - -## Examples - -```typescript -agent.addSkill('api_ninjas_trivia', { default_category: 'sciencenature' }); -``` - -## Properties - - - Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. - - - - Configuration options provided at construction time. - - - - Unique identifier for this skill instance (includes timestamp and random bytes). - - - - Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. - - - - Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. - - - - Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. - - - - Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. - - - - Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. - - - - Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. - - - - The registered name of this skill type. - - - - Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. - - - - Additional SWAIG fields extracted from config, merged into tool definitions. - - -## Methods - -### cleanup - -Cleanup resources. Called when the skill is removed from an agent. - -#### Signature - -```typescript -cleanup(): Promise -``` - -#### Returns - -`Promise` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 469. - -*** - -### constructor - -Create a new skill instance. - -Python parity: `core/skill_base.py:32-43`. -Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` -is left as `None` on the subclass. TS throws the equivalent when the static -defaults haven't been overridden. - -#### Signature - -```typescript -constructor(config?: SkillConfig): ApiNinjasTriviaSkill -``` - -#### Parameters - - - Optional configuration key-value pairs (Python: `params`). - - -#### Returns - -`ApiNinjasTriviaSkill` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 282. - -*** - -### defineTool - -Imperatively register a tool with this skill. - -Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. -Merges `this.swaigFields` into the tool definition (explicit fields on -`toolDef` take precedence), then pushes the result into `_dynamicTools` -so the default `getTools()` returns it at SWML render time. - -Intended for skills whose tool shape depends on config evaluated at -`setup()` time. Skills with a static tool list should override -`getTools()` instead. - -#### Signature - -```typescript -defineTool(toolDef: SkillToolDefinition): void -``` - -#### Parameters - - - The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 351. - -*** - -### getAgent - -Return the agent that owns this skill, asserting it is non-null. -Equivalent to accessing `self.agent` in Python, where the agent reference -is always set before `setup()` is called. - -The SkillManager lifecycle guarantees that `setAgent()` is called before -`setup()`, so this method is safe to use inside `setup()` and in any -tool handler invoked during an active agent session. - -#### Signature - -```typescript -getAgent(): AgentBase -``` - -#### Returns - -`AgentBase` — The owning `AgentBase` instance. - -#### Throws - -- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 261. - -*** - -### getConfig - -Get a configuration value by key, falling back to a default if not set. - -#### Signature - -```typescript -getConfig(key: string, defaultValue?: T): T -``` - -#### Type Parameters - - - -#### Parameters - - - The configuration key to look up. - - - - Value to return if the key is not present. - - -#### Returns - -`T` — The configuration value cast to type T, or the default value. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 524. - -*** - -### getDataMapTools - -Optional DataMap-style tool definitions. Skills that build their own -SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them -here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. - -Python equivalent: the direct `self.agent.register_swaig_function(fn)` -call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). -Default returns `[]` — skills using only the declarative `getTools()` path -do not need to override this. - -#### Signature - -```typescript -getDataMapTools(): Record[] -``` - -#### Returns - -`Record[]` — Array of fully-built SWAIG function dicts. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 372. - -*** - -### getGlobalData - -Get global data to merge into the agent's global data store. - -#### Signature - -```typescript -getGlobalData(): Record -``` - -#### Returns - -`Record` — Key-value pairs to be merged into the agent's global data. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 410. - -*** - -### getHints - -#### Signature - -```typescript -getHints(): string[] -``` - -#### Returns - -`string[]` — Speech recognition hints for trivia-related keywords. - -#### Source - -[`src/skills/builtin/api_ninjas_trivia.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/api_ninjas_trivia.ts) - -Line 278. - -*** - -### getInstanceKey - -Produce a compound instance key matching Python `get_instance_key` -(skill.py:139-146): `f"{SKILL_NAME}_{self.tool_name}"` with -`tool_name` defaulting to `'get_trivia'` (skill.py:95). The base -`SkillBase.getInstanceKey` uses `this.skillName` as the fallback, -so we override to match Python's `'get_trivia'` default. - -#### Signature - -```typescript -getInstanceKey(): string -``` - -#### Returns - -`string` - -#### Source - -[`src/skills/builtin/api_ninjas_trivia.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/api_ninjas_trivia.ts) - -Line 114. - -*** - -### getParameterSchema - -Get the parameter schema for this skill class, describing all accepted configuration options. -Subclasses should override and call `super.getParameterSchema()` to include base parameters. - -Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): -returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a -`tool_name` entry with `default: cls.SKILL_NAME` for classes with -`SUPPORTS_MULTIPLE_INSTANCES = true`. - -**Modifiers:** `static` - -#### Signature - -```typescript -getParameterSchema(): Record -``` - -#### Returns - -`Record` — Record mapping parameter names to their schema entries. - -#### Source - -[`src/skills/builtin/api_ninjas_trivia.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/api_ninjas_trivia.ts) - -Line 68. - -*** - -### getPromptSections - -Get prompt sections to inject into the agent's system prompt. -Respects the `skip_prompt` config option — returns `[]` if set to `true`. -Subclasses should override `_getPromptSections()` instead of this method. - -#### Signature - -```typescript -getPromptSections(): SkillPromptSection[] -``` - -#### Returns - -`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 382. - -*** - -### getSkillData - -Read this skill's data from a raw call data object's global\_data. - -#### Signature - -```typescript -getSkillData(rawData: Record): Record -``` - -#### Parameters - - - The raw request data containing global\_data. - - -#### Returns - -`Record` — The skill's stored data, or an empty object if not found. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 450. - -*** - -### getSkillNamespace - -Get the namespaced key for storing per-skill data in global\_data. - -#### Signature - -```typescript -getSkillNamespace(): string -``` - -#### Returns - -`string` — A string like "skill:datetime" or "skill:my\_prefix". - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 440. - -*** - -### getTools - -#### Signature - -```typescript -getTools(): SkillToolDefinition[] -``` - -#### Returns - -`SkillToolDefinition[]` — A single trivia tool (configurable name) that fetches a random trivia question with optional category. - -#### Source - -[`src/skills/builtin/api_ninjas_trivia.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/api_ninjas_trivia.ts) - -Line 120. - -*** - -### hasAllEnvVars - -Check if all required environment variables are present. -Convenience wrapper around `validateEnvVars()` that returns a boolean, -matching the Python `validate_env_vars() -> bool` return type. - -#### Signature - -```typescript -hasAllEnvVars(): boolean -``` - -#### Returns - -`boolean` — `true` if all required env vars are set, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 544. - -*** - -### hasAllPackages - -Check if all required packages declared in the manifest are available. -Convenience wrapper around `validatePackages()` that returns a boolean, -matching the Python `validate_packages() -> bool` return type. - -#### Signature - -```typescript -hasAllPackages(): Promise -``` - -#### Returns - -`Promise` — `true` if all required packages are importable, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 579. - -*** - -### isInitialized - -Check if the skill has been initialized by the SkillManager. - -#### Signature - -```typescript -isInitialized(): boolean -``` - -#### Returns - -`boolean` — True if setup() has completed and the skill is marked initialized. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 507. - -*** - -### markInitialized - -Mark the skill as initialized (called by SkillManager). - -#### Signature - -```typescript -markInitialized(): void -``` - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 514. - -*** - -### setAgent - -Set the agent reference for this skill. -Called by the SkillManager/AgentBase when the skill is attached to an agent. -Python equivalent: `self.agent = agent` in `__init__`. - -#### Signature - -```typescript -setAgent(agent: AgentBase): void -``` - -#### Parameters - - - The agent that owns this skill. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 534. - -*** - -### setup - -Setup the skill. Called when the skill is added to an agent. -Override to perform initialization (API connections, config validation, etc.) - -#### Signature - -```typescript -setup(): Promise -``` - -#### Returns - -`Promise` — `true` if setup succeeded, `false` otherwise. Python equivalent: abstract `setup() -> bool`. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 313. - -*** - -### updateSkillData - -Update this skill's namespaced data on a FunctionResult via updateGlobalData. - -#### Signature - -```typescript -updateSkillData( - result: FunctionResult, - data: Record -): FunctionResult -``` - -#### Parameters - - - The FunctionResult to update. - - - - The data to store under this skill's namespace. - - -#### Returns - -`FunctionResult` — The FunctionResult for chaining. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 462. - -*** - -### validateEnvVars - -Validate that all required environment variables declared on the skill class -are set in the current process environment. - -Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` -directly. TS reads the same static from the class. - -Returns the list of missing variable names so callers can produce actionable -error messages. This differs from Python's `validate_env_vars() -> bool` -return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/skills/builtin/api-ninjas-trivia/api-ninjas-trivia-skill#has-all-env-vars) is the boolean equivalent. - -#### Signature - -```typescript -validateEnvVars(): string[] -``` - -#### Returns - -`string[]` — Array of missing environment variable names (empty if all are present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 486. - -*** - -### validatePackages - -Validate that all required packages declared on the skill class can be imported. - -Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` -directly and tries `importlib.import_module(pkg)` for each; TS does the -equivalent with a dynamic `import()`. - -#### Signature - -```typescript -validatePackages(): Promise -``` - -#### Returns - -`Promise` — Array of package names that could not be imported (empty if all present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 557. - -## Source - -[`src/skills/builtin/api_ninjas_trivia.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/api_ninjas_trivia.ts) - -Line 59. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/api-ninjas-trivia/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/api-ninjas-trivia/index.mdx deleted file mode 100644 index 47673c2a3e..0000000000 --- a/fern/products/sdk-reference/typescript/skills/builtin/api-ninjas-trivia/index.mdx +++ /dev/null @@ -1,62 +0,0 @@ ---- -slug: "/reference/typescript/skills/builtin/api-ninjas-trivia" -title: "api_ninjas_trivia" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "module" - language: "typescript" - qualified_name: "skills.builtin.api_ninjas_trivia" - module: "skills.builtin" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/api_ninjas_trivia.ts" ---- -# `api_ninjas_trivia` - -## Signature - -```typescript -module api_ninjas_trivia -``` - -## Classes - - - - Fetches trivia questions from the API Ninjas service. - - - -## Functions - -### createSkill - -Factory function for creating ApiNinjasTriviaSkill instances. - -#### Signature - -```typescript -createSkill(config?: SkillConfig): ApiNinjasTriviaSkill -``` - -#### Parameters - - - Optional skill configuration. - - -#### Returns - -`ApiNinjasTriviaSkill` — A new ApiNinjasTriviaSkill instance. - -#### Source - -[`src/skills/builtin/api_ninjas_trivia.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/api_ninjas_trivia.ts) - -Line 288. - -## Source - -[`src/skills/builtin/api_ninjas_trivia.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/api_ninjas_trivia.ts) - -Line 1. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/ask-claude/ask-claude-skill/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/ask-claude/ask-claude-skill/index.mdx deleted file mode 100644 index 81fdf8a594..0000000000 --- a/fern/products/sdk-reference/typescript/skills/builtin/ask-claude/ask-claude-skill/index.mdx +++ /dev/null @@ -1,716 +0,0 @@ ---- -slug: "/reference/typescript/skills/builtin/ask-claude/ask-claude-skill" -title: "AskClaudeSkill" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "skills.builtin.ask_claude.AskClaudeSkill" - parent: "skills.builtin.ask_claude" - module: "skills.builtin.ask_claude" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/ask_claude.ts" ---- -# `AskClaudeSkill` - -Provides access to Anthropic's Claude AI for sub-queries and complex reasoning. - -Tier 3 built-in skill. Requires the `ANTHROPIC_API_KEY` environment variable. -Supports `model` and `max_tokens` config options to control which Claude model -is used and the maximum response length. - -## Signature - -```typescript -class AskClaudeSkill extends SkillBase -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/skills/skill-base) - -## Examples - -```typescript -agent.addSkill('ask_claude', { model: 'claude-sonnet-4-6', max_tokens: 512 }); -``` - -## Properties - - - Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. - - - - Configuration options provided at construction time. - - - - Unique identifier for this skill instance (includes timestamp and random bytes). - - - - Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. - - - - Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. - - - - Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. - - - - Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. - - - - Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. - - - - Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. - - - - The registered name of this skill type. - - - - Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. - - - - Additional SWAIG fields extracted from config, merged into tool definitions. - - -## Methods - -### cleanup - -Cleanup resources. Called when the skill is removed from an agent. - -#### Signature - -```typescript -cleanup(): Promise -``` - -#### Returns - -`Promise` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 469. - -*** - -### constructor - -Create a new skill instance. - -Python parity: `core/skill_base.py:32-43`. -Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` -is left as `None` on the subclass. TS throws the equivalent when the static -defaults haven't been overridden. - -#### Signature - -```typescript -constructor(config?: SkillConfig): AskClaudeSkill -``` - -#### Parameters - - - Optional configuration key-value pairs (Python: `params`). - - -#### Returns - -`AskClaudeSkill` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 282. - -*** - -### defineTool - -Imperatively register a tool with this skill. - -Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. -Merges `this.swaigFields` into the tool definition (explicit fields on -`toolDef` take precedence), then pushes the result into `_dynamicTools` -so the default `getTools()` returns it at SWML render time. - -Intended for skills whose tool shape depends on config evaluated at -`setup()` time. Skills with a static tool list should override -`getTools()` instead. - -#### Signature - -```typescript -defineTool(toolDef: SkillToolDefinition): void -``` - -#### Parameters - - - The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 351. - -*** - -### getAgent - -Return the agent that owns this skill, asserting it is non-null. -Equivalent to accessing `self.agent` in Python, where the agent reference -is always set before `setup()` is called. - -The SkillManager lifecycle guarantees that `setAgent()` is called before -`setup()`, so this method is safe to use inside `setup()` and in any -tool handler invoked during an active agent session. - -#### Signature - -```typescript -getAgent(): AgentBase -``` - -#### Returns - -`AgentBase` — The owning `AgentBase` instance. - -#### Throws - -- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 261. - -*** - -### getConfig - -Get a configuration value by key, falling back to a default if not set. - -#### Signature - -```typescript -getConfig(key: string, defaultValue?: T): T -``` - -#### Type Parameters - - - -#### Parameters - - - The configuration key to look up. - - - - Value to return if the key is not present. - - -#### Returns - -`T` — The configuration value cast to type T, or the default value. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 524. - -*** - -### getDataMapTools - -Optional DataMap-style tool definitions. Skills that build their own -SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them -here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. - -Python equivalent: the direct `self.agent.register_swaig_function(fn)` -call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). -Default returns `[]` — skills using only the declarative `getTools()` path -do not need to override this. - -#### Signature - -```typescript -getDataMapTools(): Record[] -``` - -#### Returns - -`Record[]` — Array of fully-built SWAIG function dicts. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 372. - -*** - -### getGlobalData - -Get global data to merge into the agent's global data store. - -#### Signature - -```typescript -getGlobalData(): Record -``` - -#### Returns - -`Record` — Key-value pairs to be merged into the agent's global data. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 410. - -*** - -### getHints - -Get speech recognition hints relevant to this skill. - -#### Signature - -```typescript -getHints(): string[] -``` - -#### Returns - -`string[]` — Array of hint strings to improve speech recognition accuracy. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 402. - -*** - -### getInstanceKey - -Get the instance key used for deduplication in the SkillManager. - -For single-instance skills (`SUPPORTS_MULTIPLE_INSTANCES = false`), returns -the skill name. For multi-instance skills, returns `${skillName}_${toolName}` -using the `tool_name` config (falls back to the skill name). - -Matches Python's `SkillBase.get_instance_key()` default (`skill_base.py:141-146`). -Multi-instance subclasses only need to override when their key derivation -depends on config beyond `tool_name`. - -#### Signature - -```typescript -getInstanceKey(): string -``` - -#### Returns - -`string` — A unique key identifying this skill instance. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 427. - -*** - -### getParameterSchema - -Get the parameter schema for this skill class, describing all accepted configuration options. -Subclasses should override and call `super.getParameterSchema()` to include base parameters. - -Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): -returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a -`tool_name` entry with `default: cls.SKILL_NAME` for classes with -`SUPPORTS_MULTIPLE_INSTANCES = true`. - -**Modifiers:** `static` - -#### Signature - -```typescript -getParameterSchema(): Record -``` - -#### Returns - -`Record` — Record mapping parameter names to their schema entries. - -#### Source - -[`src/skills/builtin/ask_claude.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/ask_claude.ts) - -Line 88. - -*** - -### getPromptSections - -Get prompt sections to inject into the agent's system prompt. -Respects the `skip_prompt` config option — returns `[]` if set to `true`. -Subclasses should override `_getPromptSections()` instead of this method. - -#### Signature - -```typescript -getPromptSections(): SkillPromptSection[] -``` - -#### Returns - -`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 382. - -*** - -### getSkillData - -Read this skill's data from a raw call data object's global\_data. - -#### Signature - -```typescript -getSkillData(rawData: Record): Record -``` - -#### Parameters - - - The raw request data containing global\_data. - - -#### Returns - -`Record` — The skill's stored data, or an empty object if not found. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 450. - -*** - -### getSkillNamespace - -Get the namespaced key for storing per-skill data in global\_data. - -#### Signature - -```typescript -getSkillNamespace(): string -``` - -#### Returns - -`string` — A string like "skill:datetime" or "skill:my\_prefix". - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 440. - -*** - -### getTools - -#### Signature - -```typescript -getTools(): SkillToolDefinition[] -``` - -#### Returns - -`SkillToolDefinition[]` — A single `ask_claude` tool that sends prompts to the Claude API. - -#### Source - -[`src/skills/builtin/ask_claude.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/ask_claude.ts) - -Line 112. - -*** - -### hasAllEnvVars - -Check if all required environment variables are present. -Convenience wrapper around `validateEnvVars()` that returns a boolean, -matching the Python `validate_env_vars() -> bool` return type. - -#### Signature - -```typescript -hasAllEnvVars(): boolean -``` - -#### Returns - -`boolean` — `true` if all required env vars are set, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 544. - -*** - -### hasAllPackages - -Check if all required packages declared in the manifest are available. -Convenience wrapper around `validatePackages()` that returns a boolean, -matching the Python `validate_packages() -> bool` return type. - -#### Signature - -```typescript -hasAllPackages(): Promise -``` - -#### Returns - -`Promise` — `true` if all required packages are importable, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 579. - -*** - -### isInitialized - -Check if the skill has been initialized by the SkillManager. - -#### Signature - -```typescript -isInitialized(): boolean -``` - -#### Returns - -`boolean` — True if setup() has completed and the skill is marked initialized. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 507. - -*** - -### markInitialized - -Mark the skill as initialized (called by SkillManager). - -#### Signature - -```typescript -markInitialized(): void -``` - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 514. - -*** - -### setAgent - -Set the agent reference for this skill. -Called by the SkillManager/AgentBase when the skill is attached to an agent. -Python equivalent: `self.agent = agent` in `__init__`. - -#### Signature - -```typescript -setAgent(agent: AgentBase): void -``` - -#### Parameters - - - The agent that owns this skill. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 534. - -*** - -### setup - -Setup the skill. Called when the skill is added to an agent. -Override to perform initialization (API connections, config validation, etc.) - -#### Signature - -```typescript -setup(): Promise -``` - -#### Returns - -`Promise` — `true` if setup succeeded, `false` otherwise. Python equivalent: abstract `setup() -> bool`. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 313. - -*** - -### updateSkillData - -Update this skill's namespaced data on a FunctionResult via updateGlobalData. - -#### Signature - -```typescript -updateSkillData( - result: FunctionResult, - data: Record -): FunctionResult -``` - -#### Parameters - - - The FunctionResult to update. - - - - The data to store under this skill's namespace. - - -#### Returns - -`FunctionResult` — The FunctionResult for chaining. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 462. - -*** - -### validateEnvVars - -Validate that all required environment variables declared on the skill class -are set in the current process environment. - -Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` -directly. TS reads the same static from the class. - -Returns the list of missing variable names so callers can produce actionable -error messages. This differs from Python's `validate_env_vars() -> bool` -return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/skills/builtin/ask-claude/ask-claude-skill#has-all-env-vars) is the boolean equivalent. - -#### Signature - -```typescript -validateEnvVars(): string[] -``` - -#### Returns - -`string[]` — Array of missing environment variable names (empty if all are present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 486. - -*** - -### validatePackages - -Validate that all required packages declared on the skill class can be imported. - -Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` -directly and tries `importlib.import_module(pkg)` for each; TS does the -equivalent with a dynamic `import()`. - -#### Signature - -```typescript -validatePackages(): Promise -``` - -#### Returns - -`Promise` — Array of package names that could not be imported (empty if all present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 557. - -## Source - -[`src/skills/builtin/ask_claude.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/ask_claude.ts) - -Line 81. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/ask-claude/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/ask-claude/index.mdx deleted file mode 100644 index 4d3cabfd85..0000000000 --- a/fern/products/sdk-reference/typescript/skills/builtin/ask-claude/index.mdx +++ /dev/null @@ -1,62 +0,0 @@ ---- -slug: "/reference/typescript/skills/builtin/ask-claude" -title: "ask_claude" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "module" - language: "typescript" - qualified_name: "skills.builtin.ask_claude" - module: "skills.builtin" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/ask_claude.ts" ---- -# `ask_claude` - -## Signature - -```typescript -module ask_claude -``` - -## Classes - - - - Provides access to Anthropic's Claude AI for sub-queries and complex reasoning. - - - -## Functions - -### createSkill - -Factory function for creating AskClaudeSkill instances. - -#### Signature - -```typescript -createSkill(config?: SkillConfig): AskClaudeSkill -``` - -#### Parameters - - - Optional skill configuration. - - -#### Returns - -`AskClaudeSkill` — A new AskClaudeSkill instance. - -#### Source - -[`src/skills/builtin/ask_claude.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/ask_claude.ts) - -Line 244. - -## Source - -[`src/skills/builtin/ask_claude.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/ask_claude.ts) - -Line 1. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/claude-skills/claude-skills-skill/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/claude-skills/claude-skills-skill/index.mdx deleted file mode 100644 index 59b849ddec..0000000000 --- a/fern/products/sdk-reference/typescript/skills/builtin/claude-skills/claude-skills-skill/index.mdx +++ /dev/null @@ -1,731 +0,0 @@ ---- -slug: "/reference/typescript/skills/builtin/claude-skills/claude-skills-skill" -title: "ClaudeSkillsSkill" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "skills.builtin.claude_skills.ClaudeSkillsSkill" - parent: "skills.builtin.claude_skills" - module: "skills.builtin.claude_skills" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/claude_skills.ts" ---- -# `ClaudeSkillsSkill` - -Load Claude-style SKILL.md files as SignalWire agent tools. - -This skill parses Claude Code skill directories and makes them available -as SWAIG tools that the AI can call. Each Claude skill becomes a tool -that returns the skill's instructions when invoked. - -## Signature - -```typescript -class ClaudeSkillsSkill extends SkillBase -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/skills/skill-base) - -## Examples - -```typescript -agent.addSkill('claude_skills', { skills_dir: './claude-skills' }); -``` - -## Properties - - - Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. - - - - Configuration options provided at construction time. - - - - Unique identifier for this skill instance (includes timestamp and random bytes). - - - - Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. - - - - Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. - - - - Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. - - - - Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. - - - - Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. - - - - Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. - - - - The registered name of this skill type. - - - - Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. - - - - Additional SWAIG fields extracted from config, merged into tool definitions. - - -## Methods - -### cleanup - -Cleanup resources. Called when the skill is removed from an agent. - -#### Signature - -```typescript -cleanup(): Promise -``` - -#### Returns - -`Promise` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 469. - -*** - -### constructor - -Create a new skill instance. - -Python parity: `core/skill_base.py:32-43`. -Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` -is left as `None` on the subclass. TS throws the equivalent when the static -defaults haven't been overridden. - -#### Signature - -```typescript -constructor(config?: SkillConfig): ClaudeSkillsSkill -``` - -#### Parameters - - - Optional configuration key-value pairs (Python: `params`). - - -#### Returns - -`ClaudeSkillsSkill` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 282. - -*** - -### defineTool - -Imperatively register a tool with this skill. - -Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. -Merges `this.swaigFields` into the tool definition (explicit fields on -`toolDef` take precedence), then pushes the result into `_dynamicTools` -so the default `getTools()` returns it at SWML render time. - -Intended for skills whose tool shape depends on config evaluated at -`setup()` time. Skills with a static tool list should override -`getTools()` instead. - -#### Signature - -```typescript -defineTool(toolDef: SkillToolDefinition): void -``` - -#### Parameters - - - The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 351. - -*** - -### getAgent - -Return the agent that owns this skill, asserting it is non-null. -Equivalent to accessing `self.agent` in Python, where the agent reference -is always set before `setup()` is called. - -The SkillManager lifecycle guarantees that `setAgent()` is called before -`setup()`, so this method is safe to use inside `setup()` and in any -tool handler invoked during an active agent session. - -#### Signature - -```typescript -getAgent(): AgentBase -``` - -#### Returns - -`AgentBase` — The owning `AgentBase` instance. - -#### Throws - -- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 261. - -*** - -### getConfig - -Get a configuration value by key, falling back to a default if not set. - -#### Signature - -```typescript -getConfig(key: string, defaultValue?: T): T -``` - -#### Type Parameters - - - -#### Parameters - - - The configuration key to look up. - - - - Value to return if the key is not present. - - -#### Returns - -`T` — The configuration value cast to type T, or the default value. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 524. - -*** - -### getDataMapTools - -Optional DataMap-style tool definitions. Skills that build their own -SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them -here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. - -Python equivalent: the direct `self.agent.register_swaig_function(fn)` -call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). -Default returns `[]` — skills using only the declarative `getTools()` path -do not need to override this. - -#### Signature - -```typescript -getDataMapTools(): Record[] -``` - -#### Returns - -`Record[]` — Array of fully-built SWAIG function dicts. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 372. - -*** - -### getGlobalData - -Get global data to merge into the agent's global data store. - -#### Signature - -```typescript -getGlobalData(): Record -``` - -#### Returns - -`Record` — Key-value pairs to be merged into the agent's global data. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 410. - -*** - -### getHints - -Get speech recognition hints relevant to this skill. - -#### Signature - -```typescript -getHints(): string[] -``` - -#### Returns - -`string[]` — Array of hint strings to improve speech recognition accuracy. - -#### Source - -[`src/skills/builtin/claude_skills.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/claude_skills.ts) - -Line 898. - -*** - -### getInstanceKey - -Get the instance key used for deduplication in the SkillManager. - -For single-instance skills (`SUPPORTS_MULTIPLE_INSTANCES = false`), returns -the skill name. For multi-instance skills, returns `${skillName}_${toolName}` -using the `tool_name` config (falls back to the skill name). - -Matches Python's `SkillBase.get_instance_key()` default (`skill_base.py:141-146`). -Multi-instance subclasses only need to override when their key derivation -depends on config beyond `tool_name`. - -#### Signature - -```typescript -getInstanceKey(): string -``` - -#### Returns - -`string` — A unique key identifying this skill instance. - -#### Source - -[`src/skills/builtin/claude_skills.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/claude_skills.ts) - -Line 964. - -*** - -### getParameterSchema - -Get the parameter schema for this skill class, describing all accepted configuration options. -Subclasses should override and call `super.getParameterSchema()` to include base parameters. - -Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): -returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a -`tool_name` entry with `default: cls.SKILL_NAME` for classes with -`SUPPORTS_MULTIPLE_INSTANCES = true`. - -**Modifiers:** `static` - -#### Signature - -```typescript -getParameterSchema(): Record -``` - -#### Returns - -`Record` — Record mapping parameter names to their schema entries. - -#### Source - -[`src/skills/builtin/claude_skills.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/claude_skills.ts) - -Line 99. - -*** - -### getPromptSections - -Get prompt sections to inject into the agent's system prompt. -Respects the `skip_prompt` config option — returns `[]` if set to `true`. -Subclasses should override `_getPromptSections()` instead of this method. - -#### Signature - -```typescript -getPromptSections(): SkillPromptSection[] -``` - -#### Returns - -`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 382. - -*** - -### getSkillData - -Read this skill's data from a raw call data object's global\_data. - -#### Signature - -```typescript -getSkillData(rawData: Record): Record -``` - -#### Parameters - - - The raw request data containing global\_data. - - -#### Returns - -`Record` — The skill's stored data, or an empty object if not found. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 450. - -*** - -### getSkillNamespace - -Get the namespaced key for storing per-skill data in global\_data. - -#### Signature - -```typescript -getSkillNamespace(): string -``` - -#### Returns - -`string` — A string like "skill:datetime" or "skill:my\_prefix". - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 440. - -*** - -### getTools - -Return the SWAIG tool definitions this skill provides. - -Default implementation returns tools registered imperatively via -`defineTool()`. Skills using the declarative pattern override this -method to return a static array built from their config. - -Python parity: replaces the `@abstractmethod register_tools()` contract -— Python skills call `self.define_tool(...)` inside `register_tools()`; -TypeScript skills either call `this.defineTool(...)` in `setup()` (and -let the default `getTools()` return them) or override `getTools()` -directly. - -#### Signature - -```typescript -getTools(): SkillToolDefinition[] -``` - -#### Returns - -`SkillToolDefinition[]` — Array of tool definitions to register with the agent. - -#### Source - -[`src/skills/builtin/claude_skills.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/claude_skills.ts) - -Line 762. - -*** - -### hasAllEnvVars - -Check if all required environment variables are present. -Convenience wrapper around `validateEnvVars()` that returns a boolean, -matching the Python `validate_env_vars() -> bool` return type. - -#### Signature - -```typescript -hasAllEnvVars(): boolean -``` - -#### Returns - -`boolean` — `true` if all required env vars are set, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 544. - -*** - -### hasAllPackages - -Check if all required packages declared in the manifest are available. -Convenience wrapper around `validatePackages()` that returns a boolean, -matching the Python `validate_packages() -> bool` return type. - -#### Signature - -```typescript -hasAllPackages(): Promise -``` - -#### Returns - -`Promise` — `true` if all required packages are importable, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 579. - -*** - -### isInitialized - -Check if the skill has been initialized by the SkillManager. - -#### Signature - -```typescript -isInitialized(): boolean -``` - -#### Returns - -`boolean` — True if setup() has completed and the skill is marked initialized. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 507. - -*** - -### markInitialized - -Mark the skill as initialized (called by SkillManager). - -#### Signature - -```typescript -markInitialized(): void -``` - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 514. - -*** - -### setAgent - -Set the agent reference for this skill. -Called by the SkillManager/AgentBase when the skill is attached to an agent. -Python equivalent: `self.agent = agent` in `__init__`. - -#### Signature - -```typescript -setAgent(agent: AgentBase): void -``` - -#### Parameters - - - The agent that owns this skill. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 534. - -*** - -### setup - -Setup the Claude skills loader — discovers and parses all SKILL.md files. - -Returns `true` on success and `false` on any failure (missing path, -invalid path, stat failure, or non-directory), mirroring the Python -skill's `setup() -> bool` contract. - -#### Signature - -```typescript -setup(): Promise -``` - -#### Returns - -`Promise` - -#### Source - -[`src/skills/builtin/claude_skills.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/claude_skills.ts) - -Line 186. - -*** - -### updateSkillData - -Update this skill's namespaced data on a FunctionResult via updateGlobalData. - -#### Signature - -```typescript -updateSkillData( - result: FunctionResult, - data: Record -): FunctionResult -``` - -#### Parameters - - - The FunctionResult to update. - - - - The data to store under this skill's namespace. - - -#### Returns - -`FunctionResult` — The FunctionResult for chaining. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 462. - -*** - -### validateEnvVars - -Validate that all required environment variables declared on the skill class -are set in the current process environment. - -Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` -directly. TS reads the same static from the class. - -Returns the list of missing variable names so callers can produce actionable -error messages. This differs from Python's `validate_env_vars() -> bool` -return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/skills/builtin/claude-skills/claude-skills-skill#has-all-env-vars) is the boolean equivalent. - -#### Signature - -```typescript -validateEnvVars(): string[] -``` - -#### Returns - -`string[]` — Array of missing environment variable names (empty if all are present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 486. - -*** - -### validatePackages - -Validate that all required packages declared on the skill class can be imported. - -Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` -directly and tries `importlib.import_module(pkg)` for each; TS does the -equivalent with a dynamic `import()`. - -#### Signature - -```typescript -validatePackages(): Promise -``` - -#### Returns - -`Promise` — Array of package names that could not be imported (empty if all present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 557. - -## Source - -[`src/skills/builtin/claude_skills.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/claude_skills.ts) - -Line 81. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/claude-skills/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/claude-skills/index.mdx deleted file mode 100644 index 6867d2e348..0000000000 --- a/fern/products/sdk-reference/typescript/skills/builtin/claude-skills/index.mdx +++ /dev/null @@ -1,62 +0,0 @@ ---- -slug: "/reference/typescript/skills/builtin/claude-skills" -title: "claude_skills" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "module" - language: "typescript" - qualified_name: "skills.builtin.claude_skills" - module: "skills.builtin" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/claude_skills.ts" ---- -# `claude_skills` - -## Signature - -```typescript -module claude_skills -``` - -## Classes - - - - Load Claude-style SKILL.md files as SignalWire agent tools. - - - -## Functions - -### createSkill - -Factory function for creating ClaudeSkillsSkill instances. - -#### Signature - -```typescript -createSkill(config?: SkillConfig): ClaudeSkillsSkill -``` - -#### Parameters - - - Optional skill configuration. - - -#### Returns - -`ClaudeSkillsSkill` — A new ClaudeSkillsSkill instance. - -#### Source - -[`src/skills/builtin/claude_skills.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/claude_skills.ts) - -Line 981. - -## Source - -[`src/skills/builtin/claude_skills.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/claude_skills.ts) - -Line 1. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/custom-skills/custom-skills-skill/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/custom-skills/custom-skills-skill/index.mdx deleted file mode 100644 index ad96092d41..0000000000 --- a/fern/products/sdk-reference/typescript/skills/builtin/custom-skills/custom-skills-skill/index.mdx +++ /dev/null @@ -1,746 +0,0 @@ ---- -slug: "/reference/typescript/skills/builtin/custom-skills/custom-skills-skill" -title: "CustomSkillsSkill" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "skills.builtin.custom_skills.CustomSkillsSkill" - parent: "skills.builtin.custom_skills" - module: "skills.builtin.custom_skills" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/custom_skills.ts" ---- -# `CustomSkillsSkill` - -A meta-skill that registers user-defined tools from configuration. - -Tier 2 built-in skill with no external dependencies. Allows users to define -arbitrary tools via config without writing skill classes. Each tool definition -specifies a name, description, parameters, and a JavaScript handler function -body that is compiled via the Function constructor at instantiation time. - -**Security warning:** This skill uses `new Function()` to compile user-provided -code at runtime. It is gated behind the `SWML_ALLOW_CUSTOM_HANDLER_CODE=true` -environment variable to prevent unintended code execution. - -## Signature - -```typescript -class CustomSkillsSkill extends SkillBase -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/skills/skill-base) - -## Examples - -```typescript -// Requires SWML_ALLOW_CUSTOM_HANDLER_CODE=true -agent.addSkill('custom_skills', { - tools: [ - { - name: 'echo', - description: 'Echo back the caller-supplied message.', - parameters: { type: 'object', properties: { msg: { type: 'string' } } }, - handlerBody: 'return new FunctionResult(args.msg);', - }, - ], -}); -``` - -## Properties - - - Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. - - - - Configuration options provided at construction time. - - - - Unique identifier for this skill instance (includes timestamp and random bytes). - - - - Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. - - - - Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. - - - - Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. - - - - Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. - - - - Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. - - - - Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. - - - - The registered name of this skill type. - - - - Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. - - - - Additional SWAIG fields extracted from config, merged into tool definitions. - - -## Methods - -### cleanup - -Cleanup resources. Called when the skill is removed from an agent. - -#### Signature - -```typescript -cleanup(): Promise -``` - -#### Returns - -`Promise` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 469. - -*** - -### constructor - -#### Signature - -```typescript -constructor(config?: SkillConfig): CustomSkillsSkill -``` - -#### Parameters - - - Configuration object containing a `tools` array of custom tool definitions. - - -#### Returns - -`CustomSkillsSkill` - -#### Source - -[`src/skills/builtin/custom_skills.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/custom_skills.ts) - -Line 106. - -*** - -### defineTool - -Imperatively register a tool with this skill. - -Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. -Merges `this.swaigFields` into the tool definition (explicit fields on -`toolDef` take precedence), then pushes the result into `_dynamicTools` -so the default `getTools()` returns it at SWML render time. - -Intended for skills whose tool shape depends on config evaluated at -`setup()` time. Skills with a static tool list should override -`getTools()` instead. - -#### Signature - -```typescript -defineTool(toolDef: SkillToolDefinition): void -``` - -#### Parameters - - - The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 351. - -*** - -### getAgent - -Return the agent that owns this skill, asserting it is non-null. -Equivalent to accessing `self.agent` in Python, where the agent reference -is always set before `setup()` is called. - -The SkillManager lifecycle guarantees that `setAgent()` is called before -`setup()`, so this method is safe to use inside `setup()` and in any -tool handler invoked during an active agent session. - -#### Signature - -```typescript -getAgent(): AgentBase -``` - -#### Returns - -`AgentBase` — The owning `AgentBase` instance. - -#### Throws - -- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 261. - -*** - -### getCompilationErrors - -Get handler compilation errors for diagnostic purposes. - -#### Signature - -```typescript -getCompilationErrors(): Map -``` - -#### Returns - -`Map` — A copy of the map from tool name to error message. - -#### Source - -[`src/skills/builtin/custom_skills.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/custom_skills.ts) - -Line 315. - -*** - -### getConfig - -Get a configuration value by key, falling back to a default if not set. - -#### Signature - -```typescript -getConfig(key: string, defaultValue?: T): T -``` - -#### Type Parameters - - - -#### Parameters - - - The configuration key to look up. - - - - Value to return if the key is not present. - - -#### Returns - -`T` — The configuration value cast to type T, or the default value. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 524. - -*** - -### getDataMapTools - -Optional DataMap-style tool definitions. Skills that build their own -SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them -here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. - -Python equivalent: the direct `self.agent.register_swaig_function(fn)` -call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). -Default returns `[]` — skills using only the declarative `getTools()` path -do not need to override this. - -#### Signature - -```typescript -getDataMapTools(): Record[] -``` - -#### Returns - -`Record[]` — Array of fully-built SWAIG function dicts. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 372. - -*** - -### getGlobalData - -Get global data to merge into the agent's global data store. - -#### Signature - -```typescript -getGlobalData(): Record -``` - -#### Returns - -`Record` — Key-value pairs to be merged into the agent's global data. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 410. - -*** - -### getHints - -Get speech recognition hints relevant to this skill. - -#### Signature - -```typescript -getHints(): string[] -``` - -#### Returns - -`string[]` — Array of hint strings to improve speech recognition accuracy. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 402. - -*** - -### getInstanceKey - -Get the instance key used for deduplication in the SkillManager. - -For single-instance skills (`SUPPORTS_MULTIPLE_INSTANCES = false`), returns -the skill name. For multi-instance skills, returns `${skillName}_${toolName}` -using the `tool_name` config (falls back to the skill name). - -Matches Python's `SkillBase.get_instance_key()` default (`skill_base.py:141-146`). -Multi-instance subclasses only need to override when their key derivation -depends on config beyond `tool_name`. - -#### Signature - -```typescript -getInstanceKey(): string -``` - -#### Returns - -`string` — A unique key identifying this skill instance. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 427. - -*** - -### getParameterSchema - -Get the parameter schema for this skill class, describing all accepted configuration options. -Subclasses should override and call `super.getParameterSchema()` to include base parameters. - -Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): -returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a -`tool_name` entry with `default: cls.SKILL_NAME` for classes with -`SUPPORTS_MULTIPLE_INSTANCES = true`. - -**Modifiers:** `static` - -#### Signature - -```typescript -getParameterSchema(): Record -``` - -#### Returns - -`Record` — Record mapping parameter names to their schema entries. - -#### Source - -[`src/skills/builtin/custom_skills.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/custom_skills.ts) - -Line 111. - -*** - -### getPromptSections - -Get prompt sections to inject into the agent's system prompt. -Respects the `skip_prompt` config option — returns `[]` if set to `true`. -Subclasses should override `_getPromptSections()` instead of this method. - -#### Signature - -```typescript -getPromptSections(): SkillPromptSection[] -``` - -#### Returns - -`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 382. - -*** - -### getSkillData - -Read this skill's data from a raw call data object's global\_data. - -#### Signature - -```typescript -getSkillData(rawData: Record): Record -``` - -#### Parameters - - - The raw request data containing global\_data. - - -#### Returns - -`Record` — The skill's stored data, or an empty object if not found. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 450. - -*** - -### getSkillNamespace - -Get the namespaced key for storing per-skill data in global\_data. - -#### Signature - -```typescript -getSkillNamespace(): string -``` - -#### Returns - -`string` — A string like "skill:datetime" or "skill:my\_prefix". - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 440. - -*** - -### getTools - -#### Signature - -```typescript -getTools(): SkillToolDefinition[] -``` - -#### Returns - -`SkillToolDefinition[]` — Array of dynamically generated tools from the configuration, with compiled handlers. - -#### Source - -[`src/skills/builtin/custom_skills.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/custom_skills.ts) - -Line 181. - -*** - -### hasAllEnvVars - -Check if all required environment variables are present. -Convenience wrapper around `validateEnvVars()` that returns a boolean, -matching the Python `validate_env_vars() -> bool` return type. - -#### Signature - -```typescript -hasAllEnvVars(): boolean -``` - -#### Returns - -`boolean` — `true` if all required env vars are set, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 544. - -*** - -### hasAllPackages - -Check if all required packages declared in the manifest are available. -Convenience wrapper around `validatePackages()` that returns a boolean, -matching the Python `validate_packages() -> bool` return type. - -#### Signature - -```typescript -hasAllPackages(): Promise -``` - -#### Returns - -`Promise` — `true` if all required packages are importable, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 579. - -*** - -### isInitialized - -Check if the skill has been initialized by the SkillManager. - -#### Signature - -```typescript -isInitialized(): boolean -``` - -#### Returns - -`boolean` — True if setup() has completed and the skill is marked initialized. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 507. - -*** - -### markInitialized - -Mark the skill as initialized (called by SkillManager). - -#### Signature - -```typescript -markInitialized(): void -``` - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 514. - -*** - -### setAgent - -Set the agent reference for this skill. -Called by the SkillManager/AgentBase when the skill is attached to an agent. -Python equivalent: `self.agent = agent` in `__init__`. - -#### Signature - -```typescript -setAgent(agent: AgentBase): void -``` - -#### Parameters - - - The agent that owns this skill. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 534. - -*** - -### setup - -Setup the skill. Called when the skill is added to an agent. -Override to perform initialization (API connections, config validation, etc.) - -#### Signature - -```typescript -setup(): Promise -``` - -#### Returns - -`Promise` — `true` if setup succeeded, `false` otherwise. Python equivalent: abstract `setup() -> bool`. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 313. - -*** - -### updateSkillData - -Update this skill's namespaced data on a FunctionResult via updateGlobalData. - -#### Signature - -```typescript -updateSkillData( - result: FunctionResult, - data: Record -): FunctionResult -``` - -#### Parameters - - - The FunctionResult to update. - - - - The data to store under this skill's namespace. - - -#### Returns - -`FunctionResult` — The FunctionResult for chaining. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 462. - -*** - -### validateEnvVars - -Validate that all required environment variables declared on the skill class -are set in the current process environment. - -Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` -directly. TS reads the same static from the class. - -Returns the list of missing variable names so callers can produce actionable -error messages. This differs from Python's `validate_env_vars() -> bool` -return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/skills/builtin/custom-skills/custom-skills-skill#has-all-env-vars) is the boolean equivalent. - -#### Signature - -```typescript -validateEnvVars(): string[] -``` - -#### Returns - -`string[]` — Array of missing environment variable names (empty if all are present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 486. - -*** - -### validatePackages - -Validate that all required packages declared on the skill class can be imported. - -Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` -directly and tries `importlib.import_module(pkg)` for each; TS does the -equivalent with a dynamic `import()`. - -#### Signature - -```typescript -validatePackages(): Promise -``` - -#### Returns - -`Promise` — Array of package names that could not be imported (empty if all present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 557. - -## Source - -[`src/skills/builtin/custom_skills.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/custom_skills.ts) - -Line 94. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/custom-skills/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/custom-skills/index.mdx deleted file mode 100644 index 5b34e9e03d..0000000000 --- a/fern/products/sdk-reference/typescript/skills/builtin/custom-skills/index.mdx +++ /dev/null @@ -1,62 +0,0 @@ ---- -slug: "/reference/typescript/skills/builtin/custom-skills" -title: "custom_skills" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "module" - language: "typescript" - qualified_name: "skills.builtin.custom_skills" - module: "skills.builtin" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/custom_skills.ts" ---- -# `custom_skills` - -## Signature - -```typescript -module custom_skills -``` - -## Classes - - - - A meta-skill that registers user-defined tools from configuration. - - - -## Functions - -### createSkill - -Factory function for creating CustomSkillsSkill instances. - -#### Signature - -```typescript -createSkill(config?: SkillConfig): CustomSkillsSkill -``` - -#### Parameters - - - Configuration containing a `tools` array of custom tool definitions. - - -#### Returns - -`CustomSkillsSkill` — A new CustomSkillsSkill instance. - -#### Source - -[`src/skills/builtin/custom_skills.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/custom_skills.ts) - -Line 325. - -## Source - -[`src/skills/builtin/custom_skills.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/custom_skills.ts) - -Line 1. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/datasphere-serverless/data-sphere-serverless-skill/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/datasphere-serverless/data-sphere-serverless-skill/index.mdx deleted file mode 100644 index 191a9dcb93..0000000000 --- a/fern/products/sdk-reference/typescript/skills/builtin/datasphere-serverless/data-sphere-serverless-skill/index.mdx +++ /dev/null @@ -1,716 +0,0 @@ ---- -slug: "/reference/typescript/skills/builtin/datasphere-serverless/data-sphere-serverless-skill" -title: "DataSphereServerlessSkill" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "skills.builtin.datasphere_serverless.DataSphereServerlessSkill" - parent: "skills.builtin.datasphere_serverless" - module: "skills.builtin.datasphere_serverless" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere_serverless.ts" ---- -# `DataSphereServerlessSkill` - -Searches SignalWire DataSphere using a server-side DataMap for serverless execution. - -Tier 3 built-in skill that generates a DataMap configuration SignalWire -executes directly, without a webhook endpoint. Supports `document_id`, -`count`, `distance`, `tags`, `language`, `pos_to_expand`, `max_synonyms`, -and `no_results_message` config options. - -## Signature - -```typescript -class DataSphereServerlessSkill extends SkillBase -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/skills/skill-base) - -## Examples - -```typescript -agent.addSkill('datasphere_serverless', { - document_id: 'doc_abc123', - count: 3, -}); -``` - -## Properties - - - Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. - - - - Configuration options provided at construction time. - - - - Unique identifier for this skill instance (includes timestamp and random bytes). - - - - Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. - - - - Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. - - - - Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. - - - - Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. - - - - Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. - - - - Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. - - - - The registered name of this skill type. - - - - Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. - - - - Additional SWAIG fields extracted from config, merged into tool definitions. - - -## Methods - -### cleanup - -Cleanup resources. Called when the skill is removed from an agent. - -#### Signature - -```typescript -cleanup(): Promise -``` - -#### Returns - -`Promise` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 469. - -*** - -### constructor - -Create a new skill instance. - -Python parity: `core/skill_base.py:32-43`. -Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` -is left as `None` on the subclass. TS throws the equivalent when the static -defaults haven't been overridden. - -#### Signature - -```typescript -constructor(config?: SkillConfig): DataSphereServerlessSkill -``` - -#### Parameters - - - Optional configuration key-value pairs (Python: `params`). - - -#### Returns - -`DataSphereServerlessSkill` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 282. - -*** - -### defineTool - -Imperatively register a tool with this skill. - -Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. -Merges `this.swaigFields` into the tool definition (explicit fields on -`toolDef` take precedence), then pushes the result into `_dynamicTools` -so the default `getTools()` returns it at SWML render time. - -Intended for skills whose tool shape depends on config evaluated at -`setup()` time. Skills with a static tool list should override -`getTools()` instead. - -#### Signature - -```typescript -defineTool(toolDef: SkillToolDefinition): void -``` - -#### Parameters - - - The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 351. - -*** - -### getAgent - -Return the agent that owns this skill, asserting it is non-null. -Equivalent to accessing `self.agent` in Python, where the agent reference -is always set before `setup()` is called. - -The SkillManager lifecycle guarantees that `setAgent()` is called before -`setup()`, so this method is safe to use inside `setup()` and in any -tool handler invoked during an active agent session. - -#### Signature - -```typescript -getAgent(): AgentBase -``` - -#### Returns - -`AgentBase` — The owning `AgentBase` instance. - -#### Throws - -- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 261. - -*** - -### getConfig - -Get a configuration value by key, falling back to a default if not set. - -#### Signature - -```typescript -getConfig(key: string, defaultValue?: T): T -``` - -#### Type Parameters - - - -#### Parameters - - - The configuration key to look up. - - - - Value to return if the key is not present. - - -#### Returns - -`T` — The configuration value cast to type T, or the default value. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 524. - -*** - -### getDataMapTools - -Get DataMap-based tool definitions for server-side execution. -These are registered directly in the SWML output as data\_map functions -rather than as webhook-backed SWAIG tools. - -#### Signature - -```typescript -getDataMapTools(): Record[] -``` - -#### Returns - -`Record[]` — Array containing the DataSphere search DataMap function definition. - -#### Source - -[`src/skills/builtin/datasphere_serverless.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere_serverless.ts) - -Line 317. - -*** - -### getGlobalData - -Global data injected into the agent's SWML/SWAIG context. Matches -Python's `get_global_data()` shape so downstream consumers can -detect DataSphere availability. - -#### Signature - -```typescript -getGlobalData(): Record -``` - -#### Returns - -`Record` - -#### Source - -[`src/skills/builtin/datasphere_serverless.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere_serverless.ts) - -Line 164. - -*** - -### getHints - -Get speech recognition hints relevant to this skill. - -#### Signature - -```typescript -getHints(): string[] -``` - -#### Returns - -`string[]` — Array of hint strings to improve speech recognition accuracy. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 402. - -*** - -### getInstanceKey - -Instance key for the SkillManager. Defaults to -`datasphere_serverless_search_knowledge`, matching the Python SDK default. -When `tool_name` is set, uses `datasphere_serverless_`. - -#### Signature - -```typescript -getInstanceKey(): string -``` - -#### Returns - -`string` - -#### Source - -[`src/skills/builtin/datasphere_serverless.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere_serverless.ts) - -Line 135. - -*** - -### getParameterSchema - -Get the parameter schema for this skill class, describing all accepted configuration options. -Subclasses should override and call `super.getParameterSchema()` to include base parameters. - -Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): -returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a -`tool_name` entry with `default: cls.SKILL_NAME` for classes with -`SUPPORTS_MULTIPLE_INSTANCES = true`. - -**Modifiers:** `static` - -#### Signature - -```typescript -getParameterSchema(): Record -``` - -#### Returns - -`Record` — Record mapping parameter names to their schema entries. - -#### Source - -[`src/skills/builtin/datasphere_serverless.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere_serverless.ts) - -Line 55. - -*** - -### getPromptSections - -Get prompt sections to inject into the agent's system prompt. -Respects the `skip_prompt` config option — returns `[]` if set to `true`. -Subclasses should override `_getPromptSections()` instead of this method. - -#### Signature - -```typescript -getPromptSections(): SkillPromptSection[] -``` - -#### Returns - -`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 382. - -*** - -### getSkillData - -Read this skill's data from a raw call data object's global\_data. - -#### Signature - -```typescript -getSkillData(rawData: Record): Record -``` - -#### Parameters - - - The raw request data containing global\_data. - - -#### Returns - -`Record` — The skill's stored data, or an empty object if not found. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 450. - -*** - -### getSkillNamespace - -Get the namespaced key for storing per-skill data in global\_data. - -#### Signature - -```typescript -getSkillNamespace(): string -``` - -#### Returns - -`string` — A string like "skill:datetime" or "skill:my\_prefix". - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 440. - -*** - -### getTools - -Return a stub tool definition since this skill uses DataMap-based execution. -The actual DataMap function is provided by getDataMapTools(). - -#### Signature - -```typescript -getTools(): SkillToolDefinition[] -``` - -#### Returns - -`SkillToolDefinition[]` — A single stub tool (named via `tool_name`) that explains its DataMap nature. - -#### Source - -[`src/skills/builtin/datasphere_serverless.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere_serverless.ts) - -Line 287. - -*** - -### hasAllEnvVars - -Check if all required environment variables are present. -Convenience wrapper around `validateEnvVars()` that returns a boolean, -matching the Python `validate_env_vars() -> bool` return type. - -#### Signature - -```typescript -hasAllEnvVars(): boolean -``` - -#### Returns - -`boolean` — `true` if all required env vars are set, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 544. - -*** - -### hasAllPackages - -Check if all required packages declared in the manifest are available. -Convenience wrapper around `validatePackages()` that returns a boolean, -matching the Python `validate_packages() -> bool` return type. - -#### Signature - -```typescript -hasAllPackages(): Promise -``` - -#### Returns - -`Promise` — `true` if all required packages are importable, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 579. - -*** - -### isInitialized - -Check if the skill has been initialized by the SkillManager. - -#### Signature - -```typescript -isInitialized(): boolean -``` - -#### Returns - -`boolean` — True if setup() has completed and the skill is marked initialized. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 507. - -*** - -### markInitialized - -Mark the skill as initialized (called by SkillManager). - -#### Signature - -```typescript -markInitialized(): void -``` - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 514. - -*** - -### setAgent - -Set the agent reference for this skill. -Called by the SkillManager/AgentBase when the skill is attached to an agent. -Python equivalent: `self.agent = agent` in `__init__`. - -#### Signature - -```typescript -setAgent(agent: AgentBase): void -``` - -#### Parameters - - - The agent that owns this skill. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 534. - -*** - -### setup - -Validate required configuration parameters before the skill becomes active. - -Mirrors Python's `setup()` which checks `space_name`, `project_id`, `token`, -and `document_id` and returns `False` (logging an error) if any are absent. - -#### Signature - -```typescript -setup(): Promise -``` - -#### Returns - -`Promise` — `true` if all required params are present, `false` otherwise. - -#### Source - -[`src/skills/builtin/datasphere_serverless.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere_serverless.ts) - -Line 147. - -*** - -### updateSkillData - -Update this skill's namespaced data on a FunctionResult via updateGlobalData. - -#### Signature - -```typescript -updateSkillData( - result: FunctionResult, - data: Record -): FunctionResult -``` - -#### Parameters - - - The FunctionResult to update. - - - - The data to store under this skill's namespace. - - -#### Returns - -`FunctionResult` — The FunctionResult for chaining. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 462. - -*** - -### validateEnvVars - -Validate that all required environment variables declared on the skill class -are set in the current process environment. - -Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` -directly. TS reads the same static from the class. - -Returns the list of missing variable names so callers can produce actionable -error messages. This differs from Python's `validate_env_vars() -> bool` -return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/skills/builtin/datasphere-serverless/data-sphere-serverless-skill#has-all-env-vars) is the boolean equivalent. - -#### Signature - -```typescript -validateEnvVars(): string[] -``` - -#### Returns - -`string[]` — Array of missing environment variable names (empty if all are present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 486. - -*** - -### validatePackages - -Validate that all required packages declared on the skill class can be imported. - -Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` -directly and tries `importlib.import_module(pkg)` for each; TS does the -equivalent with a dynamic `import()`. - -#### Signature - -```typescript -validatePackages(): Promise -``` - -#### Returns - -`Promise` — Array of package names that could not be imported (empty if all present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 557. - -## Source - -[`src/skills/builtin/datasphere_serverless.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere_serverless.ts) - -Line 45. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/datasphere-serverless/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/datasphere-serverless/index.mdx deleted file mode 100644 index 993e1a1987..0000000000 --- a/fern/products/sdk-reference/typescript/skills/builtin/datasphere-serverless/index.mdx +++ /dev/null @@ -1,62 +0,0 @@ ---- -slug: "/reference/typescript/skills/builtin/datasphere-serverless" -title: "datasphere_serverless" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "module" - language: "typescript" - qualified_name: "skills.builtin.datasphere_serverless" - module: "skills.builtin" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere_serverless.ts" ---- -# `datasphere_serverless` - -## Signature - -```typescript -module datasphere_serverless -``` - -## Classes - - - - Searches SignalWire DataSphere using a server-side DataMap for serverless execution. - - - -## Functions - -### createSkill - -Factory function for creating DataSphereServerlessSkill instances. - -#### Signature - -```typescript -createSkill(config?: SkillConfig): DataSphereServerlessSkill -``` - -#### Parameters - - - Optional skill configuration. - - -#### Returns - -`DataSphereServerlessSkill` — A new DataSphereServerlessSkill instance. - -#### Source - -[`src/skills/builtin/datasphere_serverless.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere_serverless.ts) - -Line 345. - -## Source - -[`src/skills/builtin/datasphere_serverless.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere_serverless.ts) - -Line 1. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/datasphere/data-sphere-skill/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/datasphere/data-sphere-skill/index.mdx deleted file mode 100644 index 2ed1bd3bc0..0000000000 --- a/fern/products/sdk-reference/typescript/skills/builtin/datasphere/data-sphere-skill/index.mdx +++ /dev/null @@ -1,721 +0,0 @@ ---- -slug: "/reference/typescript/skills/builtin/datasphere/data-sphere-skill" -title: "DataSphereSkill" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "skills.builtin.datasphere.DataSphereSkill" - parent: "skills.builtin.datasphere" - module: "skills.builtin.datasphere" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere.ts" ---- -# `DataSphereSkill` - -Searches SignalWire DataSphere for knowledge base content using semantic search. - -Tier 3 built-in skill. Credentials can be supplied via params or fall back to -`SIGNALWIRE_PROJECT_ID`, `SIGNALWIRE_TOKEN`, and `SIGNALWIRE_SPACE` environment -variables. Supports `count`, `distance`, `tags`, `language`, `pos_to_expand`, -`max_synonyms`, and `no_results_message` config options. - -## Signature - -```typescript -class DataSphereSkill extends SkillBase -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/skills/skill-base) - -## Examples - -```typescript -agent.addSkill('datasphere', { - document_id: 'doc_abc123', - count: 3, - tags: ['faq'], -}); -``` - -## Properties - - - Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. - - - - Configuration options provided at construction time. - - - - Unique identifier for this skill instance (includes timestamp and random bytes). - - - - Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. - - - - Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. - - - - Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. - - - - Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. - - - - Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. - - - - Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. - - - - The registered name of this skill type. - - - - Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. - - - - Additional SWAIG fields extracted from config, merged into tool definitions. - - -## Methods - -### cleanup - -Cleanup resources. Called when the skill is removed from an agent. - -#### Signature - -```typescript -cleanup(): Promise -``` - -#### Returns - -`Promise` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 469. - -*** - -### constructor - -Create a new skill instance. - -Python parity: `core/skill_base.py:32-43`. -Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` -is left as `None` on the subclass. TS throws the equivalent when the static -defaults haven't been overridden. - -#### Signature - -```typescript -constructor(config?: SkillConfig): DataSphereSkill -``` - -#### Parameters - - - Optional configuration key-value pairs (Python: `params`). - - -#### Returns - -`DataSphereSkill` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 282. - -*** - -### defineTool - -Imperatively register a tool with this skill. - -Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. -Merges `this.swaigFields` into the tool definition (explicit fields on -`toolDef` take precedence), then pushes the result into `_dynamicTools` -so the default `getTools()` returns it at SWML render time. - -Intended for skills whose tool shape depends on config evaluated at -`setup()` time. Skills with a static tool list should override -`getTools()` instead. - -#### Signature - -```typescript -defineTool(toolDef: SkillToolDefinition): void -``` - -#### Parameters - - - The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 351. - -*** - -### getAgent - -Return the agent that owns this skill, asserting it is non-null. -Equivalent to accessing `self.agent` in Python, where the agent reference -is always set before `setup()` is called. - -The SkillManager lifecycle guarantees that `setAgent()` is called before -`setup()`, so this method is safe to use inside `setup()` and in any -tool handler invoked during an active agent session. - -#### Signature - -```typescript -getAgent(): AgentBase -``` - -#### Returns - -`AgentBase` — The owning `AgentBase` instance. - -#### Throws - -- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 261. - -*** - -### getConfig - -Get a configuration value by key, falling back to a default if not set. - -#### Signature - -```typescript -getConfig(key: string, defaultValue?: T): T -``` - -#### Type Parameters - - - -#### Parameters - - - The configuration key to look up. - - - - Value to return if the key is not present. - - -#### Returns - -`T` — The configuration value cast to type T, or the default value. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 524. - -*** - -### getDataMapTools - -Optional DataMap-style tool definitions. Skills that build their own -SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them -here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. - -Python equivalent: the direct `self.agent.register_swaig_function(fn)` -call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). -Default returns `[]` — skills using only the declarative `getTools()` path -do not need to override this. - -#### Signature - -```typescript -getDataMapTools(): Record[] -``` - -#### Returns - -`Record[]` — Array of fully-built SWAIG function dicts. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 372. - -*** - -### getGlobalData - -Global data injected into the agent's SWML context. Matches Python's -`get_global_data()` so downstream consumers can detect DataSphere -availability, the configured `document_id`, and the knowledge provider. - -#### Signature - -```typescript -getGlobalData(): Record -``` - -#### Returns - -`Record` - -#### Source - -[`src/skills/builtin/datasphere.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere.ts) - -Line 179. - -*** - -### getHints - -Get speech recognition hints relevant to this skill. - -#### Signature - -```typescript -getHints(): string[] -``` - -#### Returns - -`string[]` — Array of hint strings to improve speech recognition accuracy. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 402. - -*** - -### getInstanceKey - -Instance key for the SkillManager. Defaults to `datasphere_search_knowledge`, -matching the Python SDK default. When `tool_name` is set, uses -`datasphere_`. - -#### Signature - -```typescript -getInstanceKey(): string -``` - -#### Returns - -`string` - -#### Source - -[`src/skills/builtin/datasphere.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere.ts) - -Line 169. - -*** - -### getParameterSchema - -Get the parameter schema for this skill class, describing all accepted configuration options. -Subclasses should override and call `super.getParameterSchema()` to include base parameters. - -Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): -returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a -`tool_name` entry with `default: cls.SKILL_NAME` for classes with -`SUPPORTS_MULTIPLE_INSTANCES = true`. - -**Modifiers:** `static` - -#### Signature - -```typescript -getParameterSchema(): Record -``` - -#### Returns - -`Record` — Record mapping parameter names to their schema entries. - -#### Source - -[`src/skills/builtin/datasphere.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere.ts) - -Line 81. - -*** - -### getPromptSections - -Get prompt sections to inject into the agent's system prompt. -Respects the `skip_prompt` config option — returns `[]` if set to `true`. -Subclasses should override `_getPromptSections()` instead of this method. - -#### Signature - -```typescript -getPromptSections(): SkillPromptSection[] -``` - -#### Returns - -`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 382. - -*** - -### getSkillData - -Read this skill's data from a raw call data object's global\_data. - -#### Signature - -```typescript -getSkillData(rawData: Record): Record -``` - -#### Parameters - - - The raw request data containing global\_data. - - -#### Returns - -`Record` — The skill's stored data, or an empty object if not found. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 450. - -*** - -### getSkillNamespace - -Get the namespaced key for storing per-skill data in global\_data. - -#### Signature - -```typescript -getSkillNamespace(): string -``` - -#### Returns - -`string` — A string like "skill:datetime" or "skill:my\_prefix". - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 440. - -*** - -### getTools - -#### Signature - -```typescript -getTools(): SkillToolDefinition[] -``` - -#### Returns - -`SkillToolDefinition[]` — A single tool (named via `tool_name`) that performs semantic search. - -#### Source - -[`src/skills/builtin/datasphere.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere.ts) - -Line 224. - -*** - -### hasAllEnvVars - -Check if all required environment variables are present. -Convenience wrapper around `validateEnvVars()` that returns a boolean, -matching the Python `validate_env_vars() -> bool` return type. - -#### Signature - -```typescript -hasAllEnvVars(): boolean -``` - -#### Returns - -`boolean` — `true` if all required env vars are set, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 544. - -*** - -### hasAllPackages - -Check if all required packages declared in the manifest are available. -Convenience wrapper around `validatePackages()` that returns a boolean, -matching the Python `validate_packages() -> bool` return type. - -#### Signature - -```typescript -hasAllPackages(): Promise -``` - -#### Returns - -`Promise` — `true` if all required packages are importable, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 579. - -*** - -### isInitialized - -Check if the skill has been initialized by the SkillManager. - -#### Signature - -```typescript -isInitialized(): boolean -``` - -#### Returns - -`boolean` — True if setup() has completed and the skill is marked initialized. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 507. - -*** - -### markInitialized - -Mark the skill as initialized (called by SkillManager). - -#### Signature - -```typescript -markInitialized(): void -``` - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 514. - -*** - -### setAgent - -Set the agent reference for this skill. -Called by the SkillManager/AgentBase when the skill is attached to an agent. -Python equivalent: `self.agent = agent` in `__init__`. - -#### Signature - -```typescript -setAgent(agent: AgentBase): void -``` - -#### Parameters - - - The agent that owns this skill. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 534. - -*** - -### setup - -Validate required credentials before the skill becomes active. - -Mirrors Python skills/datasphere/skill.py:120-128: `setup()` returns false -when any of `space_name`, `project_id`, `token`, or `document_id` is -missing from either config or env. Fails closed so SkillManager refuses -to register a skill that would break at call time. - -#### Signature - -```typescript -setup(): Promise -``` - -#### Returns - -`Promise` - -#### Source - -[`src/skills/builtin/datasphere.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere.ts) - -Line 195. - -*** - -### updateSkillData - -Update this skill's namespaced data on a FunctionResult via updateGlobalData. - -#### Signature - -```typescript -updateSkillData( - result: FunctionResult, - data: Record -): FunctionResult -``` - -#### Parameters - - - The FunctionResult to update. - - - - The data to store under this skill's namespace. - - -#### Returns - -`FunctionResult` — The FunctionResult for chaining. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 462. - -*** - -### validateEnvVars - -Validate that all required environment variables declared on the skill class -are set in the current process environment. - -Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` -directly. TS reads the same static from the class. - -Returns the list of missing variable names so callers can produce actionable -error messages. This differs from Python's `validate_env_vars() -> bool` -return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/skills/builtin/datasphere/data-sphere-skill#has-all-env-vars) is the boolean equivalent. - -#### Signature - -```typescript -validateEnvVars(): string[] -``` - -#### Returns - -`string[]` — Array of missing environment variable names (empty if all are present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 486. - -*** - -### validatePackages - -Validate that all required packages declared on the skill class can be imported. - -Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` -directly and tries `importlib.import_module(pkg)` for each; TS does the -equivalent with a dynamic `import()`. - -#### Signature - -```typescript -validatePackages(): Promise -``` - -#### Returns - -`Promise` — Array of package names that could not be imported (empty if all present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 557. - -## Source - -[`src/skills/builtin/datasphere.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere.ts) - -Line 71. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/datasphere/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/datasphere/index.mdx deleted file mode 100644 index 64182c3510..0000000000 --- a/fern/products/sdk-reference/typescript/skills/builtin/datasphere/index.mdx +++ /dev/null @@ -1,62 +0,0 @@ ---- -slug: "/reference/typescript/skills/builtin/datasphere" -title: "datasphere" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "module" - language: "typescript" - qualified_name: "skills.builtin.datasphere" - module: "skills.builtin" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere.ts" ---- -# `datasphere` - -## Signature - -```typescript -module datasphere -``` - -## Classes - - - - Searches SignalWire DataSphere for knowledge base content using semantic search. - - - -## Functions - -### createSkill - -Factory function for creating DataSphereSkill instances. - -#### Signature - -```typescript -createSkill(config?: SkillConfig): DataSphereSkill -``` - -#### Parameters - - - Optional skill configuration. - - -#### Returns - -`DataSphereSkill` — A new DataSphereSkill instance. - -#### Source - -[`src/skills/builtin/datasphere.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere.ts) - -Line 457. - -## Source - -[`src/skills/builtin/datasphere.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere.ts) - -Line 1. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/datetime/date-time-skill/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/datetime/date-time-skill/index.mdx deleted file mode 100644 index 2f18993d73..0000000000 --- a/fern/products/sdk-reference/typescript/skills/builtin/datetime/date-time-skill/index.mdx +++ /dev/null @@ -1,717 +0,0 @@ ---- -slug: "/reference/typescript/skills/builtin/datetime/date-time-skill" -title: "DateTimeSkill" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "skills.builtin.datetime.DateTimeSkill" - parent: "skills.builtin.datetime" - module: "skills.builtin.datetime" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datetime.ts" ---- -# `DateTimeSkill` - -Provides the current date and time with optional timezone support. - -Tier 1 built-in skill with no external dependencies. Supports all IANA -timezone identifiers via the Intl.DateTimeFormat API. - -Registers two SWAIG tools: `get_current_time` and `get_current_date`. - -## Signature - -```typescript -class DateTimeSkill extends SkillBase -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/skills/skill-base) - -## Examples - -```typescript -agent.addSkill('datetime'); -``` - -## Properties - - - Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. - - - - Configuration options provided at construction time. - - - - Unique identifier for this skill instance (includes timestamp and random bytes). - - - - Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. - - - - Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. - - - - Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. - - - - Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. - - - - Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. - - - - Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. - - - - The registered name of this skill type. - - - - Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. - - - - Additional SWAIG fields extracted from config, merged into tool definitions. - - -## Methods - -### cleanup - -Cleanup resources. Called when the skill is removed from an agent. - -#### Signature - -```typescript -cleanup(): Promise -``` - -#### Returns - -`Promise` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 469. - -*** - -### constructor - -Create a new skill instance. - -Python parity: `core/skill_base.py:32-43`. -Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` -is left as `None` on the subclass. TS throws the equivalent when the static -defaults haven't been overridden. - -#### Signature - -```typescript -constructor(config?: SkillConfig): DateTimeSkill -``` - -#### Parameters - - - Optional configuration key-value pairs (Python: `params`). - - -#### Returns - -`DateTimeSkill` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 282. - -*** - -### defineTool - -Imperatively register a tool with this skill. - -Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. -Merges `this.swaigFields` into the tool definition (explicit fields on -`toolDef` take precedence), then pushes the result into `_dynamicTools` -so the default `getTools()` returns it at SWML render time. - -Intended for skills whose tool shape depends on config evaluated at -`setup()` time. Skills with a static tool list should override -`getTools()` instead. - -#### Signature - -```typescript -defineTool(toolDef: SkillToolDefinition): void -``` - -#### Parameters - - - The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 351. - -*** - -### getAgent - -Return the agent that owns this skill, asserting it is non-null. -Equivalent to accessing `self.agent` in Python, where the agent reference -is always set before `setup()` is called. - -The SkillManager lifecycle guarantees that `setAgent()` is called before -`setup()`, so this method is safe to use inside `setup()` and in any -tool handler invoked during an active agent session. - -#### Signature - -```typescript -getAgent(): AgentBase -``` - -#### Returns - -`AgentBase` — The owning `AgentBase` instance. - -#### Throws - -- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 261. - -*** - -### getConfig - -Get a configuration value by key, falling back to a default if not set. - -#### Signature - -```typescript -getConfig(key: string, defaultValue?: T): T -``` - -#### Type Parameters - - - -#### Parameters - - - The configuration key to look up. - - - - Value to return if the key is not present. - - -#### Returns - -`T` — The configuration value cast to type T, or the default value. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 524. - -*** - -### getDataMapTools - -Optional DataMap-style tool definitions. Skills that build their own -SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them -here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. - -Python equivalent: the direct `self.agent.register_swaig_function(fn)` -call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). -Default returns `[]` — skills using only the declarative `getTools()` path -do not need to override this. - -#### Signature - -```typescript -getDataMapTools(): Record[] -``` - -#### Returns - -`Record[]` — Array of fully-built SWAIG function dicts. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 372. - -*** - -### getGlobalData - -Get global data to merge into the agent's global data store. - -#### Signature - -```typescript -getGlobalData(): Record -``` - -#### Returns - -`Record` — Key-value pairs to be merged into the agent's global data. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 410. - -*** - -### getHints - -Get speech recognition hints relevant to this skill. - -#### Signature - -```typescript -getHints(): string[] -``` - -#### Returns - -`string[]` — Array of hint strings to improve speech recognition accuracy. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 402. - -*** - -### getInstanceKey - -Get the instance key used for deduplication in the SkillManager. - -For single-instance skills (`SUPPORTS_MULTIPLE_INSTANCES = false`), returns -the skill name. For multi-instance skills, returns `${skillName}_${toolName}` -using the `tool_name` config (falls back to the skill name). - -Matches Python's `SkillBase.get_instance_key()` default (`skill_base.py:141-146`). -Multi-instance subclasses only need to override when their key derivation -depends on config beyond `tool_name`. - -#### Signature - -```typescript -getInstanceKey(): string -``` - -#### Returns - -`string` — A unique key identifying this skill instance. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 427. - -*** - -### getParameterSchema - -Get the parameter schema for this skill class, describing all accepted configuration options. -Subclasses should override and call `super.getParameterSchema()` to include base parameters. - -Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): -returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a -`tool_name` entry with `default: cls.SKILL_NAME` for classes with -`SUPPORTS_MULTIPLE_INSTANCES = true`. - -**Modifiers:** `static` - -#### Signature - -```typescript -getParameterSchema(): Record -``` - -#### Returns - -`Record` — Record mapping parameter names to their schema entries. - -#### Source - -[`src/skills/builtin/datetime.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datetime.ts) - -Line 38. - -*** - -### getPromptSections - -Get prompt sections to inject into the agent's system prompt. -Respects the `skip_prompt` config option — returns `[]` if set to `true`. -Subclasses should override `_getPromptSections()` instead of this method. - -#### Signature - -```typescript -getPromptSections(): SkillPromptSection[] -``` - -#### Returns - -`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 382. - -*** - -### getSkillData - -Read this skill's data from a raw call data object's global\_data. - -#### Signature - -```typescript -getSkillData(rawData: Record): Record -``` - -#### Parameters - - - The raw request data containing global\_data. - - -#### Returns - -`Record` — The skill's stored data, or an empty object if not found. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 450. - -*** - -### getSkillNamespace - -Get the namespaced key for storing per-skill data in global\_data. - -#### Signature - -```typescript -getSkillNamespace(): string -``` - -#### Returns - -`string` — A string like "skill:datetime" or "skill:my\_prefix". - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 440. - -*** - -### getTools - -#### Signature - -```typescript -getTools(): SkillToolDefinition[] -``` - -#### Returns - -`SkillToolDefinition[]` — Two tools: `get_current_time` and `get_current_date`, each accepting an optional IANA timezone and defaulting to UTC. - -#### Source - -[`src/skills/builtin/datetime.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datetime.ts) - -Line 46. - -*** - -### hasAllEnvVars - -Check if all required environment variables are present. -Convenience wrapper around `validateEnvVars()` that returns a boolean, -matching the Python `validate_env_vars() -> bool` return type. - -#### Signature - -```typescript -hasAllEnvVars(): boolean -``` - -#### Returns - -`boolean` — `true` if all required env vars are set, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 544. - -*** - -### hasAllPackages - -Check if all required packages declared in the manifest are available. -Convenience wrapper around `validatePackages()` that returns a boolean, -matching the Python `validate_packages() -> bool` return type. - -#### Signature - -```typescript -hasAllPackages(): Promise -``` - -#### Returns - -`Promise` — `true` if all required packages are importable, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 579. - -*** - -### isInitialized - -Check if the skill has been initialized by the SkillManager. - -#### Signature - -```typescript -isInitialized(): boolean -``` - -#### Returns - -`boolean` — True if setup() has completed and the skill is marked initialized. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 507. - -*** - -### markInitialized - -Mark the skill as initialized (called by SkillManager). - -#### Signature - -```typescript -markInitialized(): void -``` - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 514. - -*** - -### setAgent - -Set the agent reference for this skill. -Called by the SkillManager/AgentBase when the skill is attached to an agent. -Python equivalent: `self.agent = agent` in `__init__`. - -#### Signature - -```typescript -setAgent(agent: AgentBase): void -``` - -#### Parameters - - - The agent that owns this skill. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 534. - -*** - -### setup - -Setup the skill. Called when the skill is added to an agent. -Override to perform initialization (API connections, config validation, etc.) - -#### Signature - -```typescript -setup(): Promise -``` - -#### Returns - -`Promise` — `true` if setup succeeded, `false` otherwise. Python equivalent: abstract `setup() -> bool`. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 313. - -*** - -### updateSkillData - -Update this skill's namespaced data on a FunctionResult via updateGlobalData. - -#### Signature - -```typescript -updateSkillData( - result: FunctionResult, - data: Record -): FunctionResult -``` - -#### Parameters - - - The FunctionResult to update. - - - - The data to store under this skill's namespace. - - -#### Returns - -`FunctionResult` — The FunctionResult for chaining. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 462. - -*** - -### validateEnvVars - -Validate that all required environment variables declared on the skill class -are set in the current process environment. - -Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` -directly. TS reads the same static from the class. - -Returns the list of missing variable names so callers can produce actionable -error messages. This differs from Python's `validate_env_vars() -> bool` -return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/skills/builtin/datetime/date-time-skill#has-all-env-vars) is the boolean equivalent. - -#### Signature - -```typescript -validateEnvVars(): string[] -``` - -#### Returns - -`string[]` — Array of missing environment variable names (empty if all are present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 486. - -*** - -### validatePackages - -Validate that all required packages declared on the skill class can be imported. - -Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` -directly and tries `importlib.import_module(pkg)` for each; TS does the -equivalent with a dynamic `import()`. - -#### Signature - -```typescript -validatePackages(): Promise -``` - -#### Returns - -`Promise` — Array of package names that could not be imported (empty if all present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 557. - -## Source - -[`src/skills/builtin/datetime.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datetime.ts) - -Line 29. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/datetime/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/datetime/index.mdx deleted file mode 100644 index 1215de712e..0000000000 --- a/fern/products/sdk-reference/typescript/skills/builtin/datetime/index.mdx +++ /dev/null @@ -1,62 +0,0 @@ ---- -slug: "/reference/typescript/skills/builtin/datetime" -title: "datetime" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "module" - language: "typescript" - qualified_name: "skills.builtin.datetime" - module: "skills.builtin" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datetime.ts" ---- -# `datetime` - -## Signature - -```typescript -module datetime -``` - -## Classes - - - - Provides the current date and time with optional timezone support. - - - -## Functions - -### createSkill - -Factory function for creating DateTimeSkill instances. - -#### Signature - -```typescript -createSkill(config?: SkillConfig): DateTimeSkill -``` - -#### Parameters - - - Optional skill configuration. - - -#### Returns - -`DateTimeSkill` — A new DateTimeSkill instance. - -#### Source - -[`src/skills/builtin/datetime.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datetime.ts) - -Line 135. - -## Source - -[`src/skills/builtin/datetime.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datetime.ts) - -Line 1. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/google-maps/google-maps-skill/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/google-maps/google-maps-skill/index.mdx deleted file mode 100644 index af6381d376..0000000000 --- a/fern/products/sdk-reference/typescript/skills/builtin/google-maps/google-maps-skill/index.mdx +++ /dev/null @@ -1,715 +0,0 @@ ---- -slug: "/reference/typescript/skills/builtin/google-maps/google-maps-skill" -title: "GoogleMapsSkill" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "skills.builtin.google_maps.GoogleMapsSkill" - parent: "skills.builtin.google_maps" - module: "skills.builtin.google_maps" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/google_maps.ts" ---- -# `GoogleMapsSkill` - -Provides driving/walking/transit directions and place search via Google Maps APIs. - -Tier 3 built-in skill. Requires the `GOOGLE_MAPS_API_KEY` environment variable. -Supports a `default_mode` config option ("driving"|"walking"|"bicycling"|"transit"). - -## Signature - -```typescript -class GoogleMapsSkill extends SkillBase -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/skills/skill-base) - -## Examples - -```typescript -agent.addSkill('google_maps', { default_mode: 'driving' }); -``` - -## Properties - - - Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. - - - - Configuration options provided at construction time. - - - - Unique identifier for this skill instance (includes timestamp and random bytes). - - - - Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. - - - - Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. - - - - Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. - - - - Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. - - - - Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. - - - - Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. - - - - The registered name of this skill type. - - - - Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. - - - - Additional SWAIG fields extracted from config, merged into tool definitions. - - -## Methods - -### cleanup - -Cleanup resources. Called when the skill is removed from an agent. - -#### Signature - -```typescript -cleanup(): Promise -``` - -#### Returns - -`Promise` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 469. - -*** - -### constructor - -Create a new skill instance. - -Python parity: `core/skill_base.py:32-43`. -Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` -is left as `None` on the subclass. TS throws the equivalent when the static -defaults haven't been overridden. - -#### Signature - -```typescript -constructor(config?: SkillConfig): GoogleMapsSkill -``` - -#### Parameters - - - Optional configuration key-value pairs (Python: `params`). - - -#### Returns - -`GoogleMapsSkill` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 282. - -*** - -### defineTool - -Imperatively register a tool with this skill. - -Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. -Merges `this.swaigFields` into the tool definition (explicit fields on -`toolDef` take precedence), then pushes the result into `_dynamicTools` -so the default `getTools()` returns it at SWML render time. - -Intended for skills whose tool shape depends on config evaluated at -`setup()` time. Skills with a static tool list should override -`getTools()` instead. - -#### Signature - -```typescript -defineTool(toolDef: SkillToolDefinition): void -``` - -#### Parameters - - - The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 351. - -*** - -### getAgent - -Return the agent that owns this skill, asserting it is non-null. -Equivalent to accessing `self.agent` in Python, where the agent reference -is always set before `setup()` is called. - -The SkillManager lifecycle guarantees that `setAgent()` is called before -`setup()`, so this method is safe to use inside `setup()` and in any -tool handler invoked during an active agent session. - -#### Signature - -```typescript -getAgent(): AgentBase -``` - -#### Returns - -`AgentBase` — The owning `AgentBase` instance. - -#### Throws - -- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 261. - -*** - -### getConfig - -Get a configuration value by key, falling back to a default if not set. - -#### Signature - -```typescript -getConfig(key: string, defaultValue?: T): T -``` - -#### Type Parameters - - - -#### Parameters - - - The configuration key to look up. - - - - Value to return if the key is not present. - - -#### Returns - -`T` — The configuration value cast to type T, or the default value. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 524. - -*** - -### getDataMapTools - -Optional DataMap-style tool definitions. Skills that build their own -SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them -here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. - -Python equivalent: the direct `self.agent.register_swaig_function(fn)` -call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). -Default returns `[]` — skills using only the declarative `getTools()` path -do not need to override this. - -#### Signature - -```typescript -getDataMapTools(): Record[] -``` - -#### Returns - -`Record[]` — Array of fully-built SWAIG function dicts. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 372. - -*** - -### getGlobalData - -Get global data to merge into the agent's global data store. - -#### Signature - -```typescript -getGlobalData(): Record -``` - -#### Returns - -`Record` — Key-value pairs to be merged into the agent's global data. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 410. - -*** - -### getHints - -#### Signature - -```typescript -getHints(): string[] -``` - -#### Returns - -`string[]` — Speech recognition hints for maps/directions keywords. - -#### Source - -[`src/skills/builtin/google_maps.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/google_maps.ts) - -Line 174. - -*** - -### getInstanceKey - -Get the instance key used for deduplication in the SkillManager. - -For single-instance skills (`SUPPORTS_MULTIPLE_INSTANCES = false`), returns -the skill name. For multi-instance skills, returns `${skillName}_${toolName}` -using the `tool_name` config (falls back to the skill name). - -Matches Python's `SkillBase.get_instance_key()` default (`skill_base.py:141-146`). -Multi-instance subclasses only need to override when their key derivation -depends on config beyond `tool_name`. - -#### Signature - -```typescript -getInstanceKey(): string -``` - -#### Returns - -`string` — A unique key identifying this skill instance. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 427. - -*** - -### getParameterSchema - -Get the parameter schema for this skill class, describing all accepted configuration options. -Subclasses should override and call `super.getParameterSchema()` to include base parameters. - -Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): -returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a -`tool_name` entry with `default: cls.SKILL_NAME` for classes with -`SUPPORTS_MULTIPLE_INSTANCES = true`. - -**Modifiers:** `static` - -#### Signature - -```typescript -getParameterSchema(): Record -``` - -#### Returns - -`Record` — Record mapping parameter names to their schema entries. - -#### Source - -[`src/skills/builtin/google_maps.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/google_maps.ts) - -Line 119. - -*** - -### getPromptSections - -Get prompt sections to inject into the agent's system prompt. -Respects the `skip_prompt` config option — returns `[]` if set to `true`. -Subclasses should override `_getPromptSections()` instead of this method. - -#### Signature - -```typescript -getPromptSections(): SkillPromptSection[] -``` - -#### Returns - -`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 382. - -*** - -### getSkillData - -Read this skill's data from a raw call data object's global\_data. - -#### Signature - -```typescript -getSkillData(rawData: Record): Record -``` - -#### Parameters - - - The raw request data containing global\_data. - - -#### Returns - -`Record` — The skill's stored data, or an empty object if not found. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 450. - -*** - -### getSkillNamespace - -Get the namespaced key for storing per-skill data in global\_data. - -#### Signature - -```typescript -getSkillNamespace(): string -``` - -#### Returns - -`string` — A string like "skill:datetime" or "skill:my\_prefix". - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 440. - -*** - -### getTools - -#### Signature - -```typescript -getTools(): SkillToolDefinition[] -``` - -#### Returns - -`SkillToolDefinition[]` — Two tools: `get_directions` for route info and `find_place` for place discovery. - -#### Source - -[`src/skills/builtin/google_maps.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/google_maps.ts) - -Line 179. - -*** - -### hasAllEnvVars - -Check if all required environment variables are present. -Convenience wrapper around `validateEnvVars()` that returns a boolean, -matching the Python `validate_env_vars() -> bool` return type. - -#### Signature - -```typescript -hasAllEnvVars(): boolean -``` - -#### Returns - -`boolean` — `true` if all required env vars are set, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 544. - -*** - -### hasAllPackages - -Check if all required packages declared in the manifest are available. -Convenience wrapper around `validatePackages()` that returns a boolean, -matching the Python `validate_packages() -> bool` return type. - -#### Signature - -```typescript -hasAllPackages(): Promise -``` - -#### Returns - -`Promise` — `true` if all required packages are importable, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 579. - -*** - -### isInitialized - -Check if the skill has been initialized by the SkillManager. - -#### Signature - -```typescript -isInitialized(): boolean -``` - -#### Returns - -`boolean` — True if setup() has completed and the skill is marked initialized. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 507. - -*** - -### markInitialized - -Mark the skill as initialized (called by SkillManager). - -#### Signature - -```typescript -markInitialized(): void -``` - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 514. - -*** - -### setAgent - -Set the agent reference for this skill. -Called by the SkillManager/AgentBase when the skill is attached to an agent. -Python equivalent: `self.agent = agent` in `__init__`. - -#### Signature - -```typescript -setAgent(agent: AgentBase): void -``` - -#### Parameters - - - The agent that owns this skill. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 534. - -*** - -### setup - -Fail-fast when GOOGLE\_MAPS\_API\_KEY is not set, mirroring Python's -`setup()` validation. The env var is the only credential source for -this skill, so loading it without the key would produce runtime -errors on every tool call. - -#### Signature - -```typescript -setup(): Promise -``` - -#### Returns - -`Promise` — `true` if the API key is present, `false` otherwise. - -#### Source - -[`src/skills/builtin/google_maps.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/google_maps.ts) - -Line 165. - -*** - -### updateSkillData - -Update this skill's namespaced data on a FunctionResult via updateGlobalData. - -#### Signature - -```typescript -updateSkillData( - result: FunctionResult, - data: Record -): FunctionResult -``` - -#### Parameters - - - The FunctionResult to update. - - - - The data to store under this skill's namespace. - - -#### Returns - -`FunctionResult` — The FunctionResult for chaining. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 462. - -*** - -### validateEnvVars - -Validate that all required environment variables declared on the skill class -are set in the current process environment. - -Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` -directly. TS reads the same static from the class. - -Returns the list of missing variable names so callers can produce actionable -error messages. This differs from Python's `validate_env_vars() -> bool` -return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/skills/builtin/google-maps/google-maps-skill#has-all-env-vars) is the boolean equivalent. - -#### Signature - -```typescript -validateEnvVars(): string[] -``` - -#### Returns - -`string[]` — Array of missing environment variable names (empty if all are present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 486. - -*** - -### validatePackages - -Validate that all required packages declared on the skill class can be imported. - -Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` -directly and tries `importlib.import_module(pkg)` for each; TS does the -equivalent with a dynamic `import()`. - -#### Signature - -```typescript -validatePackages(): Promise -``` - -#### Returns - -`Promise` — Array of package names that could not be imported (empty if all present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 557. - -## Source - -[`src/skills/builtin/google_maps.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/google_maps.ts) - -Line 107. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/google-maps/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/google-maps/index.mdx deleted file mode 100644 index 7c0e767c1e..0000000000 --- a/fern/products/sdk-reference/typescript/skills/builtin/google-maps/index.mdx +++ /dev/null @@ -1,62 +0,0 @@ ---- -slug: "/reference/typescript/skills/builtin/google-maps" -title: "google_maps" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "module" - language: "typescript" - qualified_name: "skills.builtin.google_maps" - module: "skills.builtin" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/google_maps.ts" ---- -# `google_maps` - -## Signature - -```typescript -module google_maps -``` - -## Classes - - - - Provides driving/walking/transit directions and place search via Google Maps APIs. - - - -## Functions - -### createSkill - -Factory function for creating GoogleMapsSkill instances. - -#### Signature - -```typescript -createSkill(config?: SkillConfig): GoogleMapsSkill -``` - -#### Parameters - - - Optional skill configuration. - - -#### Returns - -`GoogleMapsSkill` — A new GoogleMapsSkill instance. - -#### Source - -[`src/skills/builtin/google_maps.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/google_maps.ts) - -Line 654. - -## Source - -[`src/skills/builtin/google_maps.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/google_maps.ts) - -Line 1. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/index.mdx deleted file mode 100644 index bbaaecc0d7..0000000000 --- a/fern/products/sdk-reference/typescript/skills/builtin/index.mdx +++ /dev/null @@ -1,51 +0,0 @@ ---- -slug: "/reference/typescript/skills/builtin" -title: "builtin" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "module" - language: "typescript" - qualified_name: "skills.builtin" - module: "skills" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/index.ts" ---- -# `builtin` - -## Signature - -```typescript -module builtin -``` - -## Functions - -### registerBuiltinSkills - -Register all 19 built-in skills with the global SkillRegistry singleton. -Matches Python's auto-discovery pattern (`skills/registry.py`) which finds -SkillBase subclasses in the skills directory and registers them by class -reference. Skips registration for any skill name already present. - -#### Signature - -```typescript -registerBuiltinSkills(): void -``` - -#### Returns - -`void` - -#### Source - -[`src/skills/builtin/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/index.ts) - -Line 55. - -## Source - -[`src/skills/builtin/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/index.ts) - -Line 1. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/info-gatherer/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/info-gatherer/index.mdx deleted file mode 100644 index b88cdbbd3f..0000000000 --- a/fern/products/sdk-reference/typescript/skills/builtin/info-gatherer/index.mdx +++ /dev/null @@ -1,62 +0,0 @@ ---- -slug: "/reference/typescript/skills/builtin/info-gatherer" -title: "info_gatherer" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "module" - language: "typescript" - qualified_name: "skills.builtin.info_gatherer" - module: "skills.builtin" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/info_gatherer.ts" ---- -# `info_gatherer` - -## Signature - -```typescript -module info_gatherer -``` - -## Classes - - - - Collects answers to a configurable list of questions, one at a time. - - - -## Functions - -### createSkill - -Factory function for creating InfoGathererSkill instances. - -#### Signature - -```typescript -createSkill(config?: SkillConfig): InfoGathererSkill -``` - -#### Parameters - - - Optional skill configuration. - - -#### Returns - -`InfoGathererSkill` — A new InfoGathererSkill instance. - -#### Source - -[`src/skills/builtin/info_gatherer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/info_gatherer.ts) - -Line 413. - -## Source - -[`src/skills/builtin/info_gatherer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/info_gatherer.ts) - -Line 1. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/info-gatherer/info-gatherer-skill/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/info-gatherer/info-gatherer-skill/index.mdx deleted file mode 100644 index ee889fb7ef..0000000000 --- a/fern/products/sdk-reference/typescript/skills/builtin/info-gatherer/info-gatherer-skill/index.mdx +++ /dev/null @@ -1,731 +0,0 @@ ---- -slug: "/reference/typescript/skills/builtin/info-gatherer/info-gatherer-skill" -title: "InfoGathererSkill" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "skills.builtin.info_gatherer.InfoGathererSkill" - parent: "skills.builtin.info_gatherer" - module: "skills.builtin.info_gatherer" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/info_gatherer.ts" ---- -# `InfoGathererSkill` - -Collects answers to a configurable list of questions, one at a time. - -Mirrors Python `InfoGathererSkill` exactly: the same required -`questions` config, the same `prefix` / `completion_message` options, -the same two tools (`start_questions`, `submit_answer`), and the same -state shape in `global_data`. - -## Signature - -```typescript -class InfoGathererSkill extends SkillBase -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/skills/skill-base) - -## Examples - -```typescript -agent.addSkill('info_gatherer', { - questions: [ - { key_name: 'name', question_text: 'What is your name?' }, - { key_name: 'email', question_text: 'Your email?', confirm: true }, - ], -}); -``` - -## Properties - - - Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. - - - - Configuration options provided at construction time. - - - - Unique identifier for this skill instance (includes timestamp and random bytes). - - - - Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. - - - - Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. - - - - Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. - - - - Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. - - - - Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. - - - - Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. - - - - The registered name of this skill type. - - - - Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. - - - - Additional SWAIG fields extracted from config, merged into tool definitions. - - -## Methods - -### cleanup - -Cleanup resources. Called when the skill is removed from an agent. - -#### Signature - -```typescript -cleanup(): Promise -``` - -#### Returns - -`Promise` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 469. - -*** - -### constructor - -Create a new skill instance. - -Python parity: `core/skill_base.py:32-43`. -Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` -is left as `None` on the subclass. TS throws the equivalent when the static -defaults haven't been overridden. - -#### Signature - -```typescript -constructor(config?: SkillConfig): InfoGathererSkill -``` - -#### Parameters - - - Optional configuration key-value pairs (Python: `params`). - - -#### Returns - -`InfoGathererSkill` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 282. - -*** - -### defineTool - -Imperatively register a tool with this skill. - -Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. -Merges `this.swaigFields` into the tool definition (explicit fields on -`toolDef` take precedence), then pushes the result into `_dynamicTools` -so the default `getTools()` returns it at SWML render time. - -Intended for skills whose tool shape depends on config evaluated at -`setup()` time. Skills with a static tool list should override -`getTools()` instead. - -#### Signature - -```typescript -defineTool(toolDef: SkillToolDefinition): void -``` - -#### Parameters - - - The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 351. - -*** - -### getAgent - -Return the agent that owns this skill, asserting it is non-null. -Equivalent to accessing `self.agent` in Python, where the agent reference -is always set before `setup()` is called. - -The SkillManager lifecycle guarantees that `setAgent()` is called before -`setup()`, so this method is safe to use inside `setup()` and in any -tool handler invoked during an active agent session. - -#### Signature - -```typescript -getAgent(): AgentBase -``` - -#### Returns - -`AgentBase` — The owning `AgentBase` instance. - -#### Throws - -- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 261. - -*** - -### getConfig - -Get a configuration value by key, falling back to a default if not set. - -#### Signature - -```typescript -getConfig(key: string, defaultValue?: T): T -``` - -#### Type Parameters - - - -#### Parameters - - - The configuration key to look up. - - - - Value to return if the key is not present. - - -#### Returns - -`T` — The configuration value cast to type T, or the default value. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 524. - -*** - -### getDataMapTools - -Optional DataMap-style tool definitions. Skills that build their own -SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them -here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. - -Python equivalent: the direct `self.agent.register_swaig_function(fn)` -call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). -Default returns `[]` — skills using only the declarative `getTools()` path -do not need to override this. - -#### Signature - -```typescript -getDataMapTools(): Record[] -``` - -#### Returns - -`Record[]` — Array of fully-built SWAIG function dicts. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 372. - -*** - -### getGlobalData - -Seed SWAIG `global_data` with the initial question state under this -skill's namespace. Mirrors Python `get_global_data()` (skill.py:127-135). - -Defensive no-op when the skill was not successfully set up (empty -`questions`). Python relies on the SkillManager to skip unloaded skills; -TS adds this guard so `getGlobalData()` called without a successful -`setup()` returns `{}` instead of a malformed state payload. - -#### Signature - -```typescript -getGlobalData(): Record -``` - -#### Returns - -`Record` - -#### Source - -[`src/skills/builtin/info_gatherer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/info_gatherer.ts) - -Line 170. - -*** - -### getHints - -Get speech recognition hints relevant to this skill. - -#### Signature - -```typescript -getHints(): string[] -``` - -#### Returns - -`string[]` — Array of hint strings to improve speech recognition accuracy. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 402. - -*** - -### getInstanceKey - -Instance key for the SkillManager. When `prefix` is configured, returns -`info_gatherer_` to support multi-instance use. Matches Python's -`get_instance_key()` (skill.py:81-85). - -#### Signature - -```typescript -getInstanceKey(): string -``` - -#### Returns - -`string` - -#### Source - -[`src/skills/builtin/info_gatherer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/info_gatherer.ts) - -Line 116. - -*** - -### getParameterSchema - -Get the parameter schema for this skill class, describing all accepted configuration options. -Subclasses should override and call `super.getParameterSchema()` to include base parameters. - -Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): -returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a -`tool_name` entry with `default: cls.SKILL_NAME` for classes with -`SUPPORTS_MULTIPLE_INSTANCES = true`. - -**Modifiers:** `static` - -#### Signature - -```typescript -getParameterSchema(): Record -``` - -#### Returns - -`Record` — Record mapping parameter names to their schema entries. - -#### Source - -[`src/skills/builtin/info_gatherer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/info_gatherer.ts) - -Line 78. - -*** - -### getPromptSections - -Get prompt sections to inject into the agent's system prompt. -Respects the `skip_prompt` config option — returns `[]` if set to `true`. -Subclasses should override `_getPromptSections()` instead of this method. - -#### Signature - -```typescript -getPromptSections(): SkillPromptSection[] -``` - -#### Returns - -`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 382. - -*** - -### getSkillData - -Read this skill's data from a raw call data object's global\_data. - -#### Signature - -```typescript -getSkillData(rawData: Record): Record -``` - -#### Parameters - - - The raw request data containing global\_data. - - -#### Returns - -`Record` — The skill's stored data, or an empty object if not found. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 450. - -*** - -### getSkillNamespace - -Get the namespaced key for storing per-skill data in global\_data. - -#### Signature - -```typescript -getSkillNamespace(): string -``` - -#### Returns - -`string` — A string like "skill:datetime" or "skill:my\_prefix". - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 440. - -*** - -### getTools - -Register the two sequential-flow tools. Mirrors Python -`register_tools()` (skill.py:162-184). Returns an empty array when -`setup()` did not complete (no questions) so the skill never exposes -half-initialized tools. - -#### Signature - -```typescript -getTools(): SkillToolDefinition[] -``` - -#### Returns - -`SkillToolDefinition[]` - -#### Source - -[`src/skills/builtin/info_gatherer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/info_gatherer.ts) - -Line 189. - -*** - -### hasAllEnvVars - -Check if all required environment variables are present. -Convenience wrapper around `validateEnvVars()` that returns a boolean, -matching the Python `validate_env_vars() -> bool` return type. - -#### Signature - -```typescript -hasAllEnvVars(): boolean -``` - -#### Returns - -`boolean` — `true` if all required env vars are set, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 544. - -*** - -### hasAllPackages - -Check if all required packages declared in the manifest are available. -Convenience wrapper around `validatePackages()` that returns a boolean, -matching the Python `validate_packages() -> bool` return type. - -#### Signature - -```typescript -hasAllPackages(): Promise -``` - -#### Returns - -`Promise` — `true` if all required packages are importable, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 579. - -*** - -### isInitialized - -Check if the skill has been initialized by the SkillManager. - -#### Signature - -```typescript -isInitialized(): boolean -``` - -#### Returns - -`boolean` — True if setup() has completed and the skill is marked initialized. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 507. - -*** - -### markInitialized - -Mark the skill as initialized (called by SkillManager). - -#### Signature - -```typescript -markInitialized(): void -``` - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 514. - -*** - -### setAgent - -Set the agent reference for this skill. -Called by the SkillManager/AgentBase when the skill is attached to an agent. -Python equivalent: `self.agent = agent` in `__init__`. - -#### Signature - -```typescript -setAgent(agent: AgentBase): void -``` - -#### Parameters - - - The agent that owns this skill. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 534. - -*** - -### setup - -Validate the `questions` config, derive tool names (with optional prefix), -and cache the completion message. - -Python parity: skill.py:91-121. Returns `false` (logging an error) when -`questions` is missing or fails validation; setup must produce a -functional skill or fail closed. - -#### Signature - -```typescript -setup(): Promise -``` - -#### Returns - -`Promise` - -#### Source - -[`src/skills/builtin/info_gatherer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/info_gatherer.ts) - -Line 129. - -*** - -### updateSkillData - -Update this skill's namespaced data on a FunctionResult via updateGlobalData. - -#### Signature - -```typescript -updateSkillData( - result: FunctionResult, - data: Record -): FunctionResult -``` - -#### Parameters - - - The FunctionResult to update. - - - - The data to store under this skill's namespace. - - -#### Returns - -`FunctionResult` — The FunctionResult for chaining. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 462. - -*** - -### validateEnvVars - -Validate that all required environment variables declared on the skill class -are set in the current process environment. - -Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` -directly. TS reads the same static from the class. - -Returns the list of missing variable names so callers can produce actionable -error messages. This differs from Python's `validate_env_vars() -> bool` -return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/skills/builtin/info-gatherer/info-gatherer-skill#has-all-env-vars) is the boolean equivalent. - -#### Signature - -```typescript -validateEnvVars(): string[] -``` - -#### Returns - -`string[]` — Array of missing environment variable names (empty if all are present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 486. - -*** - -### validatePackages - -Validate that all required packages declared on the skill class can be imported. - -Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` -directly and tries `importlib.import_module(pkg)` for each; TS does the -equivalent with a dynamic `import()`. - -#### Signature - -```typescript -validatePackages(): Promise -``` - -#### Returns - -`Promise` — Array of package names that could not be imported (empty if all present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 557. - -## Source - -[`src/skills/builtin/info_gatherer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/info_gatherer.ts) - -Line 60. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/joke/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/joke/index.mdx deleted file mode 100644 index 0f34aafaeb..0000000000 --- a/fern/products/sdk-reference/typescript/skills/builtin/joke/index.mdx +++ /dev/null @@ -1,62 +0,0 @@ ---- -slug: "/reference/typescript/skills/builtin/joke" -title: "joke" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "module" - language: "typescript" - qualified_name: "skills.builtin.joke" - module: "skills.builtin" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/joke.ts" ---- -# `joke` - -## Signature - -```typescript -module joke -``` - -## Classes - - - - Tells random jokes from a curated built-in collection. - - - -## Functions - -### createSkill - -Factory function for creating JokeSkill instances. - -#### Signature - -```typescript -createSkill(config?: SkillConfig): JokeSkill -``` - -#### Parameters - - - Optional skill configuration. - - -#### Returns - -`JokeSkill` — A new JokeSkill instance. - -#### Source - -[`src/skills/builtin/joke.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/joke.ts) - -Line 194. - -## Source - -[`src/skills/builtin/joke.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/joke.ts) - -Line 1. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/joke/joke-skill/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/joke/joke-skill/index.mdx deleted file mode 100644 index 7b56ffb348..0000000000 --- a/fern/products/sdk-reference/typescript/skills/builtin/joke/joke-skill/index.mdx +++ /dev/null @@ -1,716 +0,0 @@ ---- -slug: "/reference/typescript/skills/builtin/joke/joke-skill" -title: "JokeSkill" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "skills.builtin.joke.JokeSkill" - parent: "skills.builtin.joke" - module: "skills.builtin.joke" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/joke.ts" ---- -# `JokeSkill` - -Tells random jokes from a curated built-in collection. - -Tier 1 built-in skill with no external dependencies. Includes general, -programming, and dad joke categories. - -## Signature - -```typescript -class JokeSkill extends SkillBase -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/skills/skill-base) - -## Examples - -```typescript -agent.addSkill('joke'); -``` - -## Properties - - - Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. - - - - Configuration options provided at construction time. - - - - Unique identifier for this skill instance (includes timestamp and random bytes). - - - - Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. - - - - Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. - - - - Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. - - - - Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. - - - - Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. - - - - Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. - - - - The registered name of this skill type. - - - - Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. - - - - Additional SWAIG fields extracted from config, merged into tool definitions. - - -## Methods - -### cleanup - -Cleanup resources. Called when the skill is removed from an agent. - -#### Signature - -```typescript -cleanup(): Promise -``` - -#### Returns - -`Promise` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 469. - -*** - -### constructor - -Create a new skill instance. - -Python parity: `core/skill_base.py:32-43`. -Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` -is left as `None` on the subclass. TS throws the equivalent when the static -defaults haven't been overridden. - -#### Signature - -```typescript -constructor(config?: SkillConfig): JokeSkill -``` - -#### Parameters - - - Optional configuration key-value pairs (Python: `params`). - - -#### Returns - -`JokeSkill` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 282. - -*** - -### defineTool - -Imperatively register a tool with this skill. - -Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. -Merges `this.swaigFields` into the tool definition (explicit fields on -`toolDef` take precedence), then pushes the result into `_dynamicTools` -so the default `getTools()` returns it at SWML render time. - -Intended for skills whose tool shape depends on config evaluated at -`setup()` time. Skills with a static tool list should override -`getTools()` instead. - -#### Signature - -```typescript -defineTool(toolDef: SkillToolDefinition): void -``` - -#### Parameters - - - The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 351. - -*** - -### getAgent - -Return the agent that owns this skill, asserting it is non-null. -Equivalent to accessing `self.agent` in Python, where the agent reference -is always set before `setup()` is called. - -The SkillManager lifecycle guarantees that `setAgent()` is called before -`setup()`, so this method is safe to use inside `setup()` and in any -tool handler invoked during an active agent session. - -#### Signature - -```typescript -getAgent(): AgentBase -``` - -#### Returns - -`AgentBase` — The owning `AgentBase` instance. - -#### Throws - -- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 261. - -*** - -### getConfig - -Get a configuration value by key, falling back to a default if not set. - -#### Signature - -```typescript -getConfig(key: string, defaultValue?: T): T -``` - -#### Type Parameters - - - -#### Parameters - - - The configuration key to look up. - - - - Value to return if the key is not present. - - -#### Returns - -`T` — The configuration value cast to type T, or the default value. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 524. - -*** - -### getDataMapTools - -Optional DataMap-style tool definitions. Skills that build their own -SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them -here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. - -Python equivalent: the direct `self.agent.register_swaig_function(fn)` -call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). -Default returns `[]` — skills using only the declarative `getTools()` path -do not need to override this. - -#### Signature - -```typescript -getDataMapTools(): Record[] -``` - -#### Returns - -`Record[]` — Array of fully-built SWAIG function dicts. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 372. - -*** - -### getGlobalData - -Signal to the agent prompt that the joke skill is active. Python -parity: `get_global_data` returns `{"joke_skill_enabled": true}`. - -#### Signature - -```typescript -getGlobalData(): Record -``` - -#### Returns - -`Record` - -#### Source - -[`src/skills/builtin/joke.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/joke.ts) - -Line 119. - -*** - -### getHints - -Get speech recognition hints relevant to this skill. - -#### Signature - -```typescript -getHints(): string[] -``` - -#### Returns - -`string[]` — Array of hint strings to improve speech recognition accuracy. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 402. - -*** - -### getInstanceKey - -Get the instance key used for deduplication in the SkillManager. - -For single-instance skills (`SUPPORTS_MULTIPLE_INSTANCES = false`), returns -the skill name. For multi-instance skills, returns `${skillName}_${toolName}` -using the `tool_name` config (falls back to the skill name). - -Matches Python's `SkillBase.get_instance_key()` default (`skill_base.py:141-146`). -Multi-instance subclasses only need to override when their key derivation -depends on config beyond `tool_name`. - -#### Signature - -```typescript -getInstanceKey(): string -``` - -#### Returns - -`string` — A unique key identifying this skill instance. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 427. - -*** - -### getParameterSchema - -Get the parameter schema for this skill class, describing all accepted configuration options. -Subclasses should override and call `super.getParameterSchema()` to include base parameters. - -Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): -returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a -`tool_name` entry with `default: cls.SKILL_NAME` for classes with -`SUPPORTS_MULTIPLE_INSTANCES = true`. - -**Modifiers:** `static` - -#### Signature - -```typescript -getParameterSchema(): Record -``` - -#### Returns - -`Record` — Record mapping parameter names to their schema entries. - -#### Source - -[`src/skills/builtin/joke.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/joke.ts) - -Line 104. - -*** - -### getPromptSections - -Get prompt sections to inject into the agent's system prompt. -Respects the `skip_prompt` config option — returns `[]` if set to `true`. -Subclasses should override `_getPromptSections()` instead of this method. - -#### Signature - -```typescript -getPromptSections(): SkillPromptSection[] -``` - -#### Returns - -`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 382. - -*** - -### getSkillData - -Read this skill's data from a raw call data object's global\_data. - -#### Signature - -```typescript -getSkillData(rawData: Record): Record -``` - -#### Parameters - - - The raw request data containing global\_data. - - -#### Returns - -`Record` — The skill's stored data, or an empty object if not found. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 450. - -*** - -### getSkillNamespace - -Get the namespaced key for storing per-skill data in global\_data. - -#### Signature - -```typescript -getSkillNamespace(): string -``` - -#### Returns - -`string` — A string like "skill:datetime" or "skill:my\_prefix". - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 440. - -*** - -### getTools - -#### Signature - -```typescript -getTools(): SkillToolDefinition[] -``` - -#### Returns - -`SkillToolDefinition[]` — A single joke tool (configurable name) that returns a random joke with optional category filter. - -#### Source - -[`src/skills/builtin/joke.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/joke.ts) - -Line 124. - -*** - -### hasAllEnvVars - -Check if all required environment variables are present. -Convenience wrapper around `validateEnvVars()` that returns a boolean, -matching the Python `validate_env_vars() -> bool` return type. - -#### Signature - -```typescript -hasAllEnvVars(): boolean -``` - -#### Returns - -`boolean` — `true` if all required env vars are set, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 544. - -*** - -### hasAllPackages - -Check if all required packages declared in the manifest are available. -Convenience wrapper around `validatePackages()` that returns a boolean, -matching the Python `validate_packages() -> bool` return type. - -#### Signature - -```typescript -hasAllPackages(): Promise -``` - -#### Returns - -`Promise` — `true` if all required packages are importable, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 579. - -*** - -### isInitialized - -Check if the skill has been initialized by the SkillManager. - -#### Signature - -```typescript -isInitialized(): boolean -``` - -#### Returns - -`boolean` — True if setup() has completed and the skill is marked initialized. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 507. - -*** - -### markInitialized - -Mark the skill as initialized (called by SkillManager). - -#### Signature - -```typescript -markInitialized(): void -``` - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 514. - -*** - -### setAgent - -Set the agent reference for this skill. -Called by the SkillManager/AgentBase when the skill is attached to an agent. -Python equivalent: `self.agent = agent` in `__init__`. - -#### Signature - -```typescript -setAgent(agent: AgentBase): void -``` - -#### Parameters - - - The agent that owns this skill. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 534. - -*** - -### setup - -Setup the skill. Called when the skill is added to an agent. -Override to perform initialization (API connections, config validation, etc.) - -#### Signature - -```typescript -setup(): Promise -``` - -#### Returns - -`Promise` — `true` if setup succeeded, `false` otherwise. Python equivalent: abstract `setup() -> bool`. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 313. - -*** - -### updateSkillData - -Update this skill's namespaced data on a FunctionResult via updateGlobalData. - -#### Signature - -```typescript -updateSkillData( - result: FunctionResult, - data: Record -): FunctionResult -``` - -#### Parameters - - - The FunctionResult to update. - - - - The data to store under this skill's namespace. - - -#### Returns - -`FunctionResult` — The FunctionResult for chaining. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 462. - -*** - -### validateEnvVars - -Validate that all required environment variables declared on the skill class -are set in the current process environment. - -Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` -directly. TS reads the same static from the class. - -Returns the list of missing variable names so callers can produce actionable -error messages. This differs from Python's `validate_env_vars() -> bool` -return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/skills/builtin/joke/joke-skill#has-all-env-vars) is the boolean equivalent. - -#### Signature - -```typescript -validateEnvVars(): string[] -``` - -#### Returns - -`string[]` — Array of missing environment variable names (empty if all are present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 486. - -*** - -### validatePackages - -Validate that all required packages declared on the skill class can be imported. - -Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` -directly and tries `importlib.import_module(pkg)` for each; TS does the -equivalent with a dynamic `import()`. - -#### Signature - -```typescript -validatePackages(): Promise -``` - -#### Returns - -`Promise` — Array of package names that could not be imported (empty if all present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 557. - -## Source - -[`src/skills/builtin/joke.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/joke.ts) - -Line 96. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/math/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/math/index.mdx deleted file mode 100644 index cc4d01a705..0000000000 --- a/fern/products/sdk-reference/typescript/skills/builtin/math/index.mdx +++ /dev/null @@ -1,62 +0,0 @@ ---- -slug: "/reference/typescript/skills/builtin/math" -title: "math" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "module" - language: "typescript" - qualified_name: "skills.builtin.math" - module: "skills.builtin" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/math.ts" ---- -# `math` - -## Signature - -```typescript -module math -``` - -## Classes - - - - Evaluates mathematical expressions safely using a sandboxed parser. - - - -## Functions - -### createSkill - -Factory function for creating MathSkill instances. - -#### Signature - -```typescript -createSkill(config?: SkillConfig): MathSkill -``` - -#### Parameters - - - Optional skill configuration. - - -#### Returns - -`MathSkill` — A new MathSkill instance. - -#### Source - -[`src/skills/builtin/math.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/math.ts) - -Line 147. - -## Source - -[`src/skills/builtin/math.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/math.ts) - -Line 1. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/math/math-skill/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/math/math-skill/index.mdx deleted file mode 100644 index 1b75f05bf1..0000000000 --- a/fern/products/sdk-reference/typescript/skills/builtin/math/math-skill/index.mdx +++ /dev/null @@ -1,717 +0,0 @@ ---- -slug: "/reference/typescript/skills/builtin/math/math-skill" -title: "MathSkill" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "skills.builtin.math.MathSkill" - parent: "skills.builtin.math" - module: "skills.builtin.math" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/math.ts" ---- -# `MathSkill` - -Evaluates mathematical expressions safely using a sandboxed parser. - -Tier 1 built-in skill with no external dependencies. Only allows digits, -basic arithmetic operators, parentheses, decimal points, and spaces. - -Registers a single SWAIG tool: `calculate`. - -## Signature - -```typescript -class MathSkill extends SkillBase -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/skills/skill-base) - -## Examples - -```typescript -agent.addSkill('math'); -``` - -## Properties - - - Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. - - - - Configuration options provided at construction time. - - - - Unique identifier for this skill instance (includes timestamp and random bytes). - - - - Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. - - - - Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. - - - - Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. - - - - Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. - - - - Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. - - - - Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. - - - - The registered name of this skill type. - - - - Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. - - - - Additional SWAIG fields extracted from config, merged into tool definitions. - - -## Methods - -### cleanup - -Cleanup resources. Called when the skill is removed from an agent. - -#### Signature - -```typescript -cleanup(): Promise -``` - -#### Returns - -`Promise` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 469. - -*** - -### constructor - -Create a new skill instance. - -Python parity: `core/skill_base.py:32-43`. -Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` -is left as `None` on the subclass. TS throws the equivalent when the static -defaults haven't been overridden. - -#### Signature - -```typescript -constructor(config?: SkillConfig): MathSkill -``` - -#### Parameters - - - Optional configuration key-value pairs (Python: `params`). - - -#### Returns - -`MathSkill` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 282. - -*** - -### defineTool - -Imperatively register a tool with this skill. - -Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. -Merges `this.swaigFields` into the tool definition (explicit fields on -`toolDef` take precedence), then pushes the result into `_dynamicTools` -so the default `getTools()` returns it at SWML render time. - -Intended for skills whose tool shape depends on config evaluated at -`setup()` time. Skills with a static tool list should override -`getTools()` instead. - -#### Signature - -```typescript -defineTool(toolDef: SkillToolDefinition): void -``` - -#### Parameters - - - The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 351. - -*** - -### getAgent - -Return the agent that owns this skill, asserting it is non-null. -Equivalent to accessing `self.agent` in Python, where the agent reference -is always set before `setup()` is called. - -The SkillManager lifecycle guarantees that `setAgent()` is called before -`setup()`, so this method is safe to use inside `setup()` and in any -tool handler invoked during an active agent session. - -#### Signature - -```typescript -getAgent(): AgentBase -``` - -#### Returns - -`AgentBase` — The owning `AgentBase` instance. - -#### Throws - -- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 261. - -*** - -### getConfig - -Get a configuration value by key, falling back to a default if not set. - -#### Signature - -```typescript -getConfig(key: string, defaultValue?: T): T -``` - -#### Type Parameters - - - -#### Parameters - - - The configuration key to look up. - - - - Value to return if the key is not present. - - -#### Returns - -`T` — The configuration value cast to type T, or the default value. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 524. - -*** - -### getDataMapTools - -Optional DataMap-style tool definitions. Skills that build their own -SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them -here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. - -Python equivalent: the direct `self.agent.register_swaig_function(fn)` -call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). -Default returns `[]` — skills using only the declarative `getTools()` path -do not need to override this. - -#### Signature - -```typescript -getDataMapTools(): Record[] -``` - -#### Returns - -`Record[]` — Array of fully-built SWAIG function dicts. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 372. - -*** - -### getGlobalData - -Get global data to merge into the agent's global data store. - -#### Signature - -```typescript -getGlobalData(): Record -``` - -#### Returns - -`Record` — Key-value pairs to be merged into the agent's global data. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 410. - -*** - -### getHints - -Get speech recognition hints relevant to this skill. - -#### Signature - -```typescript -getHints(): string[] -``` - -#### Returns - -`string[]` — Array of hint strings to improve speech recognition accuracy. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 402. - -*** - -### getInstanceKey - -Get the instance key used for deduplication in the SkillManager. - -For single-instance skills (`SUPPORTS_MULTIPLE_INSTANCES = false`), returns -the skill name. For multi-instance skills, returns `${skillName}_${toolName}` -using the `tool_name` config (falls back to the skill name). - -Matches Python's `SkillBase.get_instance_key()` default (`skill_base.py:141-146`). -Multi-instance subclasses only need to override when their key derivation -depends on config beyond `tool_name`. - -#### Signature - -```typescript -getInstanceKey(): string -``` - -#### Returns - -`string` — A unique key identifying this skill instance. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 427. - -*** - -### getParameterSchema - -Get the parameter schema for this skill class, describing all accepted configuration options. -Subclasses should override and call `super.getParameterSchema()` to include base parameters. - -Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): -returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a -`tool_name` entry with `default: cls.SKILL_NAME` for classes with -`SUPPORTS_MULTIPLE_INSTANCES = true`. - -**Modifiers:** `static` - -#### Signature - -```typescript -getParameterSchema(): Record -``` - -#### Returns - -`Record` — Record mapping parameter names to their schema entries. - -#### Source - -[`src/skills/builtin/math.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/math.ts) - -Line 83. - -*** - -### getPromptSections - -Get prompt sections to inject into the agent's system prompt. -Respects the `skip_prompt` config option — returns `[]` if set to `true`. -Subclasses should override `_getPromptSections()` instead of this method. - -#### Signature - -```typescript -getPromptSections(): SkillPromptSection[] -``` - -#### Returns - -`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 382. - -*** - -### getSkillData - -Read this skill's data from a raw call data object's global\_data. - -#### Signature - -```typescript -getSkillData(rawData: Record): Record -``` - -#### Parameters - - - The raw request data containing global\_data. - - -#### Returns - -`Record` — The skill's stored data, or an empty object if not found. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 450. - -*** - -### getSkillNamespace - -Get the namespaced key for storing per-skill data in global\_data. - -#### Signature - -```typescript -getSkillNamespace(): string -``` - -#### Returns - -`string` — A string like "skill:datetime" or "skill:my\_prefix". - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 440. - -*** - -### getTools - -#### Signature - -```typescript -getTools(): SkillToolDefinition[] -``` - -#### Returns - -`SkillToolDefinition[]` — A single `calculate` tool that evaluates a math expression string. - -#### Source - -[`src/skills/builtin/math.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/math.ts) - -Line 88. - -*** - -### hasAllEnvVars - -Check if all required environment variables are present. -Convenience wrapper around `validateEnvVars()` that returns a boolean, -matching the Python `validate_env_vars() -> bool` return type. - -#### Signature - -```typescript -hasAllEnvVars(): boolean -``` - -#### Returns - -`boolean` — `true` if all required env vars are set, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 544. - -*** - -### hasAllPackages - -Check if all required packages declared in the manifest are available. -Convenience wrapper around `validatePackages()` that returns a boolean, -matching the Python `validate_packages() -> bool` return type. - -#### Signature - -```typescript -hasAllPackages(): Promise -``` - -#### Returns - -`Promise` — `true` if all required packages are importable, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 579. - -*** - -### isInitialized - -Check if the skill has been initialized by the SkillManager. - -#### Signature - -```typescript -isInitialized(): boolean -``` - -#### Returns - -`boolean` — True if setup() has completed and the skill is marked initialized. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 507. - -*** - -### markInitialized - -Mark the skill as initialized (called by SkillManager). - -#### Signature - -```typescript -markInitialized(): void -``` - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 514. - -*** - -### setAgent - -Set the agent reference for this skill. -Called by the SkillManager/AgentBase when the skill is attached to an agent. -Python equivalent: `self.agent = agent` in `__init__`. - -#### Signature - -```typescript -setAgent(agent: AgentBase): void -``` - -#### Parameters - - - The agent that owns this skill. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 534. - -*** - -### setup - -Setup the skill. Called when the skill is added to an agent. -Override to perform initialization (API connections, config validation, etc.) - -#### Signature - -```typescript -setup(): Promise -``` - -#### Returns - -`Promise` — `true` if setup succeeded, `false` otherwise. Python equivalent: abstract `setup() -> bool`. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 313. - -*** - -### updateSkillData - -Update this skill's namespaced data on a FunctionResult via updateGlobalData. - -#### Signature - -```typescript -updateSkillData( - result: FunctionResult, - data: Record -): FunctionResult -``` - -#### Parameters - - - The FunctionResult to update. - - - - The data to store under this skill's namespace. - - -#### Returns - -`FunctionResult` — The FunctionResult for chaining. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 462. - -*** - -### validateEnvVars - -Validate that all required environment variables declared on the skill class -are set in the current process environment. - -Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` -directly. TS reads the same static from the class. - -Returns the list of missing variable names so callers can produce actionable -error messages. This differs from Python's `validate_env_vars() -> bool` -return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/skills/builtin/math/math-skill#has-all-env-vars) is the boolean equivalent. - -#### Signature - -```typescript -validateEnvVars(): string[] -``` - -#### Returns - -`string[]` — Array of missing environment variable names (empty if all are present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 486. - -*** - -### validatePackages - -Validate that all required packages declared on the skill class can be imported. - -Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` -directly and tries `importlib.import_module(pkg)` for each; TS does the -equivalent with a dynamic `import()`. - -#### Signature - -```typescript -validatePackages(): Promise -``` - -#### Returns - -`Promise` — Array of package names that could not be imported (empty if all present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 557. - -## Source - -[`src/skills/builtin/math.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/math.ts) - -Line 75. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/mcp-gateway/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/mcp-gateway/index.mdx deleted file mode 100644 index d7ee16ab5b..0000000000 --- a/fern/products/sdk-reference/typescript/skills/builtin/mcp-gateway/index.mdx +++ /dev/null @@ -1,62 +0,0 @@ ---- -slug: "/reference/typescript/skills/builtin/mcp-gateway" -title: "mcp_gateway" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "module" - language: "typescript" - qualified_name: "skills.builtin.mcp_gateway" - module: "skills.builtin" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/mcp_gateway.ts" ---- -# `mcp_gateway` - -## Signature - -```typescript -module mcp_gateway -``` - -## Classes - - - - Bridge MCP (Model Context Protocol) servers with SWAIG functions. - - - -## Functions - -### createSkill - -Factory function for creating McpGatewaySkill instances. - -#### Signature - -```typescript -createSkill(config?: SkillConfig): McpGatewaySkill -``` - -#### Parameters - - - Optional skill configuration. - - -#### Returns - -`McpGatewaySkill` — A new McpGatewaySkill instance. - -#### Source - -[`src/skills/builtin/mcp_gateway.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/mcp_gateway.ts) - -Line 683. - -## Source - -[`src/skills/builtin/mcp_gateway.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/mcp_gateway.ts) - -Line 1. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/mcp-gateway/mcp-gateway-skill/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/mcp-gateway/mcp-gateway-skill/index.mdx deleted file mode 100644 index 6b4cb22860..0000000000 --- a/fern/products/sdk-reference/typescript/skills/builtin/mcp-gateway/mcp-gateway-skill/index.mdx +++ /dev/null @@ -1,720 +0,0 @@ ---- -slug: "/reference/typescript/skills/builtin/mcp-gateway/mcp-gateway-skill" -title: "McpGatewaySkill" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "skills.builtin.mcp_gateway.McpGatewaySkill" - parent: "skills.builtin.mcp_gateway" - module: "skills.builtin.mcp_gateway" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/mcp_gateway.ts" ---- -# `McpGatewaySkill` - -Bridge MCP (Model Context Protocol) servers with SWAIG functions. - -When configured, calls a gateway's `/services` endpoint to discover MCP -services, enumerates each service's tools, and registers them as SWAIG -tools prefixed with `tool_prefix` (default `mcp_`). A hidden hangup hook -tool cleans up MCP sessions when the call ends. - -## Signature - -```typescript -class McpGatewaySkill extends SkillBase -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/skills/skill-base) - -## Examples - -```typescript -agent.addSkill('mcp_gateway', { - gateway_url: 'https://mcp-gateway.example.com', - tool_prefix: 'mcp_', -}); -``` - -## Properties - - - Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. - - - - Configuration options provided at construction time. - - - - Unique identifier for this skill instance (includes timestamp and random bytes). - - - - Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. - - - - Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. - - - - Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. - - - - Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. - - - - Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. - - - - Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. - - - - The registered name of this skill type. - - - - Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. - - - - Additional SWAIG fields extracted from config, merged into tool definitions. - - -## Methods - -### cleanup - -Cleanup resources. Called when the skill is removed from an agent. - -#### Signature - -```typescript -cleanup(): Promise -``` - -#### Returns - -`Promise` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 469. - -*** - -### constructor - -Create a new skill instance. - -Python parity: `core/skill_base.py:32-43`. -Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` -is left as `None` on the subclass. TS throws the equivalent when the static -defaults haven't been overridden. - -#### Signature - -```typescript -constructor(config?: SkillConfig): McpGatewaySkill -``` - -#### Parameters - - - Optional configuration key-value pairs (Python: `params`). - - -#### Returns - -`McpGatewaySkill` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 282. - -*** - -### defineTool - -Imperatively register a tool with this skill. - -Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. -Merges `this.swaigFields` into the tool definition (explicit fields on -`toolDef` take precedence), then pushes the result into `_dynamicTools` -so the default `getTools()` returns it at SWML render time. - -Intended for skills whose tool shape depends on config evaluated at -`setup()` time. Skills with a static tool list should override -`getTools()` instead. - -#### Signature - -```typescript -defineTool(toolDef: SkillToolDefinition): void -``` - -#### Parameters - - - The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 351. - -*** - -### getAgent - -Return the agent that owns this skill, asserting it is non-null. -Equivalent to accessing `self.agent` in Python, where the agent reference -is always set before `setup()` is called. - -The SkillManager lifecycle guarantees that `setAgent()` is called before -`setup()`, so this method is safe to use inside `setup()` and in any -tool handler invoked during an active agent session. - -#### Signature - -```typescript -getAgent(): AgentBase -``` - -#### Returns - -`AgentBase` — The owning `AgentBase` instance. - -#### Throws - -- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 261. - -*** - -### getConfig - -Get a configuration value by key, falling back to a default if not set. - -#### Signature - -```typescript -getConfig(key: string, defaultValue?: T): T -``` - -#### Type Parameters - - - -#### Parameters - - - The configuration key to look up. - - - - Value to return if the key is not present. - - -#### Returns - -`T` — The configuration value cast to type T, or the default value. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 524. - -*** - -### getDataMapTools - -Optional DataMap-style tool definitions. Skills that build their own -SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them -here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. - -Python equivalent: the direct `self.agent.register_swaig_function(fn)` -call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). -Default returns `[]` — skills using only the declarative `getTools()` path -do not need to override this. - -#### Signature - -```typescript -getDataMapTools(): Record[] -``` - -#### Returns - -`Record[]` — Array of fully-built SWAIG function dicts. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 372. - -*** - -### getGlobalData - -Get global data to merge into the agent's global data store. - -#### Signature - -```typescript -getGlobalData(): Record -``` - -#### Returns - -`Record` — Key-value pairs to be merged into the agent's global data. - -#### Source - -[`src/skills/builtin/mcp_gateway.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/mcp_gateway.ts) - -Line 271. - -*** - -### getHints - -Get speech recognition hints relevant to this skill. - -#### Signature - -```typescript -getHints(): string[] -``` - -#### Returns - -`string[]` — Array of hint strings to improve speech recognition accuracy. - -#### Source - -[`src/skills/builtin/mcp_gateway.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/mcp_gateway.ts) - -Line 257. - -*** - -### getInstanceKey - -Get the instance key used for deduplication in the SkillManager. - -For single-instance skills (`SUPPORTS_MULTIPLE_INSTANCES = false`), returns -the skill name. For multi-instance skills, returns `${skillName}_${toolName}` -using the `tool_name` config (falls back to the skill name). - -Matches Python's `SkillBase.get_instance_key()` default (`skill_base.py:141-146`). -Multi-instance subclasses only need to override when their key derivation -depends on config beyond `tool_name`. - -#### Signature - -```typescript -getInstanceKey(): string -``` - -#### Returns - -`string` — A unique key identifying this skill instance. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 427. - -*** - -### getParameterSchema - -Get the parameter schema for this skill class, describing all accepted configuration options. -Subclasses should override and call `super.getParameterSchema()` to include base parameters. - -Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): -returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a -`tool_name` entry with `default: cls.SKILL_NAME` for classes with -`SUPPORTS_MULTIPLE_INSTANCES = true`. - -**Modifiers:** `static` - -#### Signature - -```typescript -getParameterSchema(): Record -``` - -#### Returns - -`Record` — Record mapping parameter names to their schema entries. - -#### Source - -[`src/skills/builtin/mcp_gateway.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/mcp_gateway.ts) - -Line 71. - -*** - -### getPromptSections - -Get prompt sections to inject into the agent's system prompt. -Respects the `skip_prompt` config option — returns `[]` if set to `true`. -Subclasses should override `_getPromptSections()` instead of this method. - -#### Signature - -```typescript -getPromptSections(): SkillPromptSection[] -``` - -#### Returns - -`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 382. - -*** - -### getSkillData - -Read this skill's data from a raw call data object's global\_data. - -#### Signature - -```typescript -getSkillData(rawData: Record): Record -``` - -#### Parameters - - - The raw request data containing global\_data. - - -#### Returns - -`Record` — The skill's stored data, or an empty object if not found. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 450. - -*** - -### getSkillNamespace - -Get the namespaced key for storing per-skill data in global\_data. - -#### Signature - -```typescript -getSkillNamespace(): string -``` - -#### Returns - -`string` — A string like "skill:datetime" or "skill:my\_prefix". - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 440. - -*** - -### getTools - -#### Signature - -```typescript -getTools(): SkillToolDefinition[] -``` - -#### Returns - -`SkillToolDefinition[]` — Dynamically discovered MCP tools plus an internal hangup-cleanup tool. If discovery has not completed, returns a single fallback `mcp_invoke` tool that explains configuration is missing. - -#### Source - -[`src/skills/builtin/mcp_gateway.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/mcp_gateway.ts) - -Line 290. - -*** - -### hasAllEnvVars - -Check if all required environment variables are present. -Convenience wrapper around `validateEnvVars()` that returns a boolean, -matching the Python `validate_env_vars() -> bool` return type. - -#### Signature - -```typescript -hasAllEnvVars(): boolean -``` - -#### Returns - -`boolean` — `true` if all required env vars are set, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 544. - -*** - -### hasAllPackages - -Check if all required packages declared in the manifest are available. -Convenience wrapper around `validatePackages()` that returns a boolean, -matching the Python `validate_packages() -> bool` return type. - -#### Signature - -```typescript -hasAllPackages(): Promise -``` - -#### Returns - -`Promise` — `true` if all required packages are importable, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 579. - -*** - -### isInitialized - -Check if the skill has been initialized by the SkillManager. - -#### Signature - -```typescript -isInitialized(): boolean -``` - -#### Returns - -`boolean` — True if setup() has completed and the skill is marked initialized. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 507. - -*** - -### markInitialized - -Mark the skill as initialized (called by SkillManager). - -#### Signature - -```typescript -markInitialized(): void -``` - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 514. - -*** - -### setAgent - -Set the agent reference for this skill. -Called by the SkillManager/AgentBase when the skill is attached to an agent. -Python equivalent: `self.agent = agent` in `__init__`. - -#### Signature - -```typescript -setAgent(agent: AgentBase): void -``` - -#### Parameters - - - The agent that owns this skill. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 534. - -*** - -### setup - -Setup the skill. Called when the skill is added to an agent. -Override to perform initialization (API connections, config validation, etc.) - -#### Signature - -```typescript -setup(): Promise -``` - -#### Returns - -`Promise` — `true` if setup succeeded, `false` otherwise. Python equivalent: abstract `setup() -> bool`. - -#### Source - -[`src/skills/builtin/mcp_gateway.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/mcp_gateway.ts) - -Line 173. - -*** - -### updateSkillData - -Update this skill's namespaced data on a FunctionResult via updateGlobalData. - -#### Signature - -```typescript -updateSkillData( - result: FunctionResult, - data: Record -): FunctionResult -``` - -#### Parameters - - - The FunctionResult to update. - - - - The data to store under this skill's namespace. - - -#### Returns - -`FunctionResult` — The FunctionResult for chaining. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 462. - -*** - -### validateEnvVars - -Validate that all required environment variables declared on the skill class -are set in the current process environment. - -Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` -directly. TS reads the same static from the class. - -Returns the list of missing variable names so callers can produce actionable -error messages. This differs from Python's `validate_env_vars() -> bool` -return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/skills/builtin/mcp-gateway/mcp-gateway-skill#has-all-env-vars) is the boolean equivalent. - -#### Signature - -```typescript -validateEnvVars(): string[] -``` - -#### Returns - -`string[]` — Array of missing environment variable names (empty if all are present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 486. - -*** - -### validatePackages - -Validate that all required packages declared on the skill class can be imported. - -Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` -directly and tries `importlib.import_module(pkg)` for each; TS does the -equivalent with a dynamic `import()`. - -#### Signature - -```typescript -validatePackages(): Promise -``` - -#### Returns - -`Promise` — Array of package names that could not be imported (empty if all present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 557. - -## Source - -[`src/skills/builtin/mcp_gateway.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/mcp_gateway.ts) - -Line 61. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/native-vector-search/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/native-vector-search/index.mdx deleted file mode 100644 index 906f3d28e7..0000000000 --- a/fern/products/sdk-reference/typescript/skills/builtin/native-vector-search/index.mdx +++ /dev/null @@ -1,92 +0,0 @@ ---- -slug: "/reference/typescript/skills/builtin/native-vector-search" -title: "native_vector_search" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "module" - language: "typescript" - qualified_name: "skills.builtin.native_vector_search" - module: "skills.builtin" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/native_vector_search.ts" ---- -# `native_vector_search` - -## Signature - -```typescript -module native_vector_search -``` - -## Classes - - - - Document search using TF-IDF in-memory scoring or a remote search server. - - - -## Functions - -### createSkill - -Factory function for creating NativeVectorSearchSkill instances. - -#### Signature - -```typescript -createSkill(config?: SkillConfig): NativeVectorSearchSkill -``` - -#### Parameters - - - Optional skill configuration. - - -#### Returns - -`NativeVectorSearchSkill` — A new NativeVectorSearchSkill instance. - -#### Source - -[`src/skills/builtin/native_vector_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/native_vector_search.ts) - -Line 908. - -## Type Aliases - -### ResponseFormatCallback - -Callback signature for customizing the formatted search response. - -The context object is the TypeScript idiom for Python's positional-args -convention: `(response, agent, query, results, args)`. All Python fields are -present plus TS-specific additions (`count`, `skill`): - -- `response` — pre-formatted response string (same as Python arg 1) -- `agent` — the AgentBase instance that owns this skill (same as Python arg 2) -- `query` — the search query string (same as Python arg 3) -- `results` — array of search results (same as Python arg 4) -- `args` — raw tool call arguments (same as Python arg 5) -- `count` — requested result count (TS addition) -- `skill` — this skill instance (TS addition) - -#### Signature - -```typescript -type ResponseFormatCallback = (ctx: { agent?: AgentBase; args: Record; count: number; query: string; response: string; results: { content: string; metadata: Record; score: number }[]; skill: NativeVectorSearchSkill }) => string -``` - -#### Source - -[`src/skills/builtin/native_vector_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/native_vector_search.ts) - -Line 47. - -## Source - -[`src/skills/builtin/native_vector_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/native_vector_search.ts) - -Line 1. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/native-vector-search/native-vector-search-skill/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/native-vector-search/native-vector-search-skill/index.mdx deleted file mode 100644 index d0835e13ea..0000000000 --- a/fern/products/sdk-reference/typescript/skills/builtin/native-vector-search/native-vector-search-skill/index.mdx +++ /dev/null @@ -1,718 +0,0 @@ ---- -slug: "/reference/typescript/skills/builtin/native-vector-search/native-vector-search-skill" -title: "NativeVectorSearchSkill" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "skills.builtin.native_vector_search.NativeVectorSearchSkill" - parent: "skills.builtin.native_vector_search" - module: "skills.builtin.native_vector_search" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/native_vector_search.ts" ---- -# `NativeVectorSearchSkill` - -Document search using TF-IDF in-memory scoring or a remote search server. - -Multi-instance capable (distinguished by `tool_name` + `index_file`). - -## Signature - -```typescript -class NativeVectorSearchSkill extends SkillBase -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/skills/skill-base) - -## Examples - -```typescript -agent.addSkill('native_vector_search', { - tool_name: 'search_docs', - index_file: './data/support-docs.json', - count: 3, -}); -``` - -## Properties - - - Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. - - - - Configuration options provided at construction time. - - - - Unique identifier for this skill instance (includes timestamp and random bytes). - - - - Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. - - - - Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. - - - - Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. - - - - Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. - - - - Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. - - - - Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. - - - - The registered name of this skill type. - - - - Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. - - - - Additional SWAIG fields extracted from config, merged into tool definitions. - - -## Methods - -### cleanup - -Cleanup resources. Called when the skill is removed from an agent. - -#### Signature - -```typescript -cleanup(): Promise -``` - -#### Returns - -`Promise` - -#### Source - -[`src/skills/builtin/native_vector_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/native_vector_search.ts) - -Line 546. - -*** - -### constructor - -Create a new skill instance. - -Python parity: `core/skill_base.py:32-43`. -Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` -is left as `None` on the subclass. TS throws the equivalent when the static -defaults haven't been overridden. - -#### Signature - -```typescript -constructor(config?: SkillConfig): NativeVectorSearchSkill -``` - -#### Parameters - - - Optional configuration key-value pairs (Python: `params`). - - -#### Returns - -`NativeVectorSearchSkill` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 282. - -*** - -### defineTool - -Imperatively register a tool with this skill. - -Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. -Merges `this.swaigFields` into the tool definition (explicit fields on -`toolDef` take precedence), then pushes the result into `_dynamicTools` -so the default `getTools()` returns it at SWML render time. - -Intended for skills whose tool shape depends on config evaluated at -`setup()` time. Skills with a static tool list should override -`getTools()` instead. - -#### Signature - -```typescript -defineTool(toolDef: SkillToolDefinition): void -``` - -#### Parameters - - - The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 351. - -*** - -### getAgent - -Return the agent that owns this skill, asserting it is non-null. -Equivalent to accessing `self.agent` in Python, where the agent reference -is always set before `setup()` is called. - -The SkillManager lifecycle guarantees that `setAgent()` is called before -`setup()`, so this method is safe to use inside `setup()` and in any -tool handler invoked during an active agent session. - -#### Signature - -```typescript -getAgent(): AgentBase -``` - -#### Returns - -`AgentBase` — The owning `AgentBase` instance. - -#### Throws - -- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 261. - -*** - -### getConfig - -Get a configuration value by key, falling back to a default if not set. - -#### Signature - -```typescript -getConfig(key: string, defaultValue?: T): T -``` - -#### Type Parameters - - - -#### Parameters - - - The configuration key to look up. - - - - Value to return if the key is not present. - - -#### Returns - -`T` — The configuration value cast to type T, or the default value. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 524. - -*** - -### getDataMapTools - -Optional DataMap-style tool definitions. Skills that build their own -SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them -here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. - -Python equivalent: the direct `self.agent.register_swaig_function(fn)` -call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). -Default returns `[]` — skills using only the declarative `getTools()` path -do not need to override this. - -#### Signature - -```typescript -getDataMapTools(): Record[] -``` - -#### Returns - -`Record[]` — Array of fully-built SWAIG function dicts. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 372. - -*** - -### getGlobalData - -Get global data to merge into the agent's global data store. - -#### Signature - -```typescript -getGlobalData(): Record -``` - -#### Returns - -`Record` — Key-value pairs to be merged into the agent's global data. - -#### Source - -[`src/skills/builtin/native_vector_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/native_vector_search.ts) - -Line 535. - -*** - -### getHints - -Get speech recognition hints relevant to this skill. - -#### Signature - -```typescript -getHints(): string[] -``` - -#### Returns - -`string[]` — Array of hint strings to improve speech recognition accuracy. - -#### Source - -[`src/skills/builtin/native_vector_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/native_vector_search.ts) - -Line 529. - -*** - -### getInstanceKey - -Get the instance key used for deduplication in the SkillManager. - -For single-instance skills (`SUPPORTS_MULTIPLE_INSTANCES = false`), returns -the skill name. For multi-instance skills, returns `${skillName}_${toolName}` -using the `tool_name` config (falls back to the skill name). - -Matches Python's `SkillBase.get_instance_key()` default (`skill_base.py:141-146`). -Multi-instance subclasses only need to override when their key derivation -depends on config beyond `tool_name`. - -#### Signature - -```typescript -getInstanceKey(): string -``` - -#### Returns - -`string` — A unique key identifying this skill instance. - -#### Source - -[`src/skills/builtin/native_vector_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/native_vector_search.ts) - -Line 406. - -*** - -### getParameterSchema - -Get the parameter schema for this skill class, describing all accepted configuration options. -Subclasses should override and call `super.getParameterSchema()` to include base parameters. - -Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): -returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a -`tool_name` entry with `default: cls.SKILL_NAME` for classes with -`SUPPORTS_MULTIPLE_INSTANCES = true`. - -**Modifiers:** `static` - -#### Signature - -```typescript -getParameterSchema(): Record -``` - -#### Returns - -`Record` — Record mapping parameter names to their schema entries. - -#### Source - -[`src/skills/builtin/native_vector_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/native_vector_search.ts) - -Line 169. - -*** - -### getPromptSections - -Get prompt sections to inject into the agent's system prompt. -Respects the `skip_prompt` config option — returns `[]` if set to `true`. -Subclasses should override `_getPromptSections()` instead of this method. - -#### Signature - -```typescript -getPromptSections(): SkillPromptSection[] -``` - -#### Returns - -`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 382. - -*** - -### getSkillData - -Read this skill's data from a raw call data object's global\_data. - -#### Signature - -```typescript -getSkillData(rawData: Record): Record -``` - -#### Parameters - - - The raw request data containing global\_data. - - -#### Returns - -`Record` — The skill's stored data, or an empty object if not found. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 450. - -*** - -### getSkillNamespace - -Get the namespaced key for storing per-skill data in global\_data. - -#### Signature - -```typescript -getSkillNamespace(): string -``` - -#### Returns - -`string` — A string like "skill:datetime" or "skill:my\_prefix". - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 440. - -*** - -### getTools - -#### Signature - -```typescript -getTools(): SkillToolDefinition[] -``` - -#### Returns - -`SkillToolDefinition[]` — A single search tool using the configured `tool_name` (default `search_knowledge`). - -#### Source - -[`src/skills/builtin/native_vector_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/native_vector_search.ts) - -Line 588. - -*** - -### hasAllEnvVars - -Check if all required environment variables are present. -Convenience wrapper around `validateEnvVars()` that returns a boolean, -matching the Python `validate_env_vars() -> bool` return type. - -#### Signature - -```typescript -hasAllEnvVars(): boolean -``` - -#### Returns - -`boolean` — `true` if all required env vars are set, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 544. - -*** - -### hasAllPackages - -Check if all required packages declared in the manifest are available. -Convenience wrapper around `validatePackages()` that returns a boolean, -matching the Python `validate_packages() -> bool` return type. - -#### Signature - -```typescript -hasAllPackages(): Promise -``` - -#### Returns - -`Promise` — `true` if all required packages are importable, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 579. - -*** - -### isInitialized - -Check if the skill has been initialized by the SkillManager. - -#### Signature - -```typescript -isInitialized(): boolean -``` - -#### Returns - -`boolean` — True if setup() has completed and the skill is marked initialized. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 507. - -*** - -### markInitialized - -Mark the skill as initialized (called by SkillManager). - -#### Signature - -```typescript -markInitialized(): void -``` - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 514. - -*** - -### setAgent - -Set the agent reference for this skill. -Called by the SkillManager/AgentBase when the skill is attached to an agent. -Python equivalent: `self.agent = agent` in `__init__`. - -#### Signature - -```typescript -setAgent(agent: AgentBase): void -``` - -#### Parameters - - - The agent that owns this skill. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 534. - -*** - -### setup - -Setup the skill. Called when the skill is added to an agent. -Override to perform initialization (API connections, config validation, etc.) - -#### Signature - -```typescript -setup(): Promise -``` - -#### Returns - -`Promise` — `true` if setup succeeded, `false` otherwise. Python equivalent: abstract `setup() -> bool`. - -#### Source - -[`src/skills/builtin/native_vector_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/native_vector_search.ts) - -Line 412. - -*** - -### updateSkillData - -Update this skill's namespaced data on a FunctionResult via updateGlobalData. - -#### Signature - -```typescript -updateSkillData( - result: FunctionResult, - data: Record -): FunctionResult -``` - -#### Parameters - - - The FunctionResult to update. - - - - The data to store under this skill's namespace. - - -#### Returns - -`FunctionResult` — The FunctionResult for chaining. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 462. - -*** - -### validateEnvVars - -Validate that all required environment variables declared on the skill class -are set in the current process environment. - -Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` -directly. TS reads the same static from the class. - -Returns the list of missing variable names so callers can produce actionable -error messages. This differs from Python's `validate_env_vars() -> bool` -return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/skills/builtin/native-vector-search/native-vector-search-skill#has-all-env-vars) is the boolean equivalent. - -#### Signature - -```typescript -validateEnvVars(): string[] -``` - -#### Returns - -`string[]` — Array of missing environment variable names (empty if all are present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 486. - -*** - -### validatePackages - -Validate that all required packages declared on the skill class can be imported. - -Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` -directly and tries `importlib.import_module(pkg)` for each; TS does the -equivalent with a dynamic `import()`. - -#### Signature - -```typescript -validatePackages(): Promise -``` - -#### Returns - -`Promise` — Array of package names that could not be imported (empty if all present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 557. - -## Source - -[`src/skills/builtin/native_vector_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/native_vector_search.ts) - -Line 159. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/play-background-file/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/play-background-file/index.mdx deleted file mode 100644 index 1f31a437d2..0000000000 --- a/fern/products/sdk-reference/typescript/skills/builtin/play-background-file/index.mdx +++ /dev/null @@ -1,62 +0,0 @@ ---- -slug: "/reference/typescript/skills/builtin/play-background-file" -title: "play_background_file" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "module" - language: "typescript" - qualified_name: "skills.builtin.play_background_file" - module: "skills.builtin" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/play_background_file.ts" ---- -# `play_background_file` - -## Signature - -```typescript -module play_background_file -``` - -## Classes - - - - Controls background audio playback during calls via SWML actions. - - - -## Functions - -### createSkill - -Factory function for creating PlayBackgroundFileSkill instances. - -#### Signature - -```typescript -createSkill(config?: SkillConfig): PlayBackgroundFileSkill -``` - -#### Parameters - - - Optional skill configuration. - - -#### Returns - -`PlayBackgroundFileSkill` — A new PlayBackgroundFileSkill instance. - -#### Source - -[`src/skills/builtin/play_background_file.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/play_background_file.ts) - -Line 365. - -## Source - -[`src/skills/builtin/play_background_file.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/play_background_file.ts) - -Line 1. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/play-background-file/play-background-file-skill/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/play-background-file/play-background-file-skill/index.mdx deleted file mode 100644 index 14d0ae729f..0000000000 --- a/fern/products/sdk-reference/typescript/skills/builtin/play-background-file/play-background-file-skill/index.mdx +++ /dev/null @@ -1,719 +0,0 @@ ---- -slug: "/reference/typescript/skills/builtin/play-background-file/play-background-file-skill" -title: "PlayBackgroundFileSkill" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "skills.builtin.play_background_file.PlayBackgroundFileSkill" - parent: "skills.builtin.play_background_file" - module: "skills.builtin.play_background_file" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/play_background_file.ts" ---- -# `PlayBackgroundFileSkill` - -Controls background audio playback during calls via SWML actions. - -Tier 2 built-in skill with no external dependencies. Provides tools to play -and stop background audio files (e.g., hold music, ambient sounds). Supports -two configuration modes: - -- Pre-configured `files` array (matches the Python skill): emits a single - configurable tool whose `action` enum maps to `start_` / `stop` - values that trigger the corresponding file playback. -- Free-form `default_file_url` / `allowed_domains`: emits two tools, - `play_background` (arbitrary URL) and `stop_background`. - -## Signature - -```typescript -class PlayBackgroundFileSkill extends SkillBase -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/skills/skill-base) - -## Examples - -```typescript -agent.addSkill('play_background_file', { - files: [ - { key: 'hold', url: 'https://cdn.example.com/hold-music.mp3', description: 'Hold music' }, - ], -}); -``` - -## Properties - - - Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. - - - - Configuration options provided at construction time. - - - - Unique identifier for this skill instance (includes timestamp and random bytes). - - - - Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. - - - - Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. - - - - Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. - - - - Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. - - - - Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. - - - - Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. - - - - The registered name of this skill type. - - - - Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. - - - - Additional SWAIG fields extracted from config, merged into tool definitions. - - -## Methods - -### cleanup - -Cleanup resources. Called when the skill is removed from an agent. - -#### Signature - -```typescript -cleanup(): Promise -``` - -#### Returns - -`Promise` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 469. - -*** - -### constructor - -Create a new skill instance. - -Python parity: `core/skill_base.py:32-43`. -Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` -is left as `None` on the subclass. TS throws the equivalent when the static -defaults haven't been overridden. - -#### Signature - -```typescript -constructor(config?: SkillConfig): PlayBackgroundFileSkill -``` - -#### Parameters - - - Optional configuration key-value pairs (Python: `params`). - - -#### Returns - -`PlayBackgroundFileSkill` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 282. - -*** - -### defineTool - -Imperatively register a tool with this skill. - -Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. -Merges `this.swaigFields` into the tool definition (explicit fields on -`toolDef` take precedence), then pushes the result into `_dynamicTools` -so the default `getTools()` returns it at SWML render time. - -Intended for skills whose tool shape depends on config evaluated at -`setup()` time. Skills with a static tool list should override -`getTools()` instead. - -#### Signature - -```typescript -defineTool(toolDef: SkillToolDefinition): void -``` - -#### Parameters - - - The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 351. - -*** - -### getAgent - -Return the agent that owns this skill, asserting it is non-null. -Equivalent to accessing `self.agent` in Python, where the agent reference -is always set before `setup()` is called. - -The SkillManager lifecycle guarantees that `setAgent()` is called before -`setup()`, so this method is safe to use inside `setup()` and in any -tool handler invoked during an active agent session. - -#### Signature - -```typescript -getAgent(): AgentBase -``` - -#### Returns - -`AgentBase` — The owning `AgentBase` instance. - -#### Throws - -- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 261. - -*** - -### getConfig - -Get a configuration value by key, falling back to a default if not set. - -#### Signature - -```typescript -getConfig(key: string, defaultValue?: T): T -``` - -#### Type Parameters - - - -#### Parameters - - - The configuration key to look up. - - - - Value to return if the key is not present. - - -#### Returns - -`T` — The configuration value cast to type T, or the default value. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 524. - -*** - -### getDataMapTools - -Optional DataMap-style tool definitions. Skills that build their own -SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them -here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. - -Python equivalent: the direct `self.agent.register_swaig_function(fn)` -call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). -Default returns `[]` — skills using only the declarative `getTools()` path -do not need to override this. - -#### Signature - -```typescript -getDataMapTools(): Record[] -``` - -#### Returns - -`Record[]` — Array of fully-built SWAIG function dicts. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 372. - -*** - -### getGlobalData - -Get global data to merge into the agent's global data store. - -#### Signature - -```typescript -getGlobalData(): Record -``` - -#### Returns - -`Record` — Key-value pairs to be merged into the agent's global data. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 410. - -*** - -### getHints - -Get speech recognition hints relevant to this skill. - -#### Signature - -```typescript -getHints(): string[] -``` - -#### Returns - -`string[]` — Array of hint strings to improve speech recognition accuracy. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 402. - -*** - -### getInstanceKey - -Produce a compound instance key so multiple copies of the skill with -distinct `tool_name` values can coexist in a single agent. - -#### Signature - -```typescript -getInstanceKey(): string -``` - -#### Returns - -`string` - -#### Source - -[`src/skills/builtin/play_background_file.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/play_background_file.ts) - -Line 114. - -*** - -### getParameterSchema - -Get the parameter schema for this skill class, describing all accepted configuration options. -Subclasses should override and call `super.getParameterSchema()` to include base parameters. - -Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): -returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a -`tool_name` entry with `default: cls.SKILL_NAME` for classes with -`SUPPORTS_MULTIPLE_INSTANCES = true`. - -**Modifiers:** `static` - -#### Signature - -```typescript -getParameterSchema(): Record -``` - -#### Returns - -`Record` — Record mapping parameter names to their schema entries. - -#### Source - -[`src/skills/builtin/play_background_file.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/play_background_file.ts) - -Line 58. - -*** - -### getPromptSections - -Get prompt sections to inject into the agent's system prompt. -Respects the `skip_prompt` config option — returns `[]` if set to `true`. -Subclasses should override `_getPromptSections()` instead of this method. - -#### Signature - -```typescript -getPromptSections(): SkillPromptSection[] -``` - -#### Returns - -`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 382. - -*** - -### getSkillData - -Read this skill's data from a raw call data object's global\_data. - -#### Signature - -```typescript -getSkillData(rawData: Record): Record -``` - -#### Parameters - - - The raw request data containing global\_data. - - -#### Returns - -`Record` — The skill's stored data, or an empty object if not found. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 450. - -*** - -### getSkillNamespace - -Get the namespaced key for storing per-skill data in global\_data. - -#### Signature - -```typescript -getSkillNamespace(): string -``` - -#### Returns - -`string` — A string like "skill:datetime" or "skill:my\_prefix". - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 440. - -*** - -### getTools - -#### Signature - -```typescript -getTools(): SkillToolDefinition[] -``` - -#### Returns - -`SkillToolDefinition[]` — Either a single enum-based tool (when pre-configured `files` are supplied — matches Python), or two free-form tools (`play_background` and `stop_background`) when only `default_file_url`/`allowed_domains` are configured. - -#### Source - -[`src/skills/builtin/play_background_file.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/play_background_file.ts) - -Line 138. - -*** - -### hasAllEnvVars - -Check if all required environment variables are present. -Convenience wrapper around `validateEnvVars()` that returns a boolean, -matching the Python `validate_env_vars() -> bool` return type. - -#### Signature - -```typescript -hasAllEnvVars(): boolean -``` - -#### Returns - -`boolean` — `true` if all required env vars are set, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 544. - -*** - -### hasAllPackages - -Check if all required packages declared in the manifest are available. -Convenience wrapper around `validatePackages()` that returns a boolean, -matching the Python `validate_packages() -> bool` return type. - -#### Signature - -```typescript -hasAllPackages(): Promise -``` - -#### Returns - -`Promise` — `true` if all required packages are importable, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 579. - -*** - -### isInitialized - -Check if the skill has been initialized by the SkillManager. - -#### Signature - -```typescript -isInitialized(): boolean -``` - -#### Returns - -`boolean` — True if setup() has completed and the skill is marked initialized. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 507. - -*** - -### markInitialized - -Mark the skill as initialized (called by SkillManager). - -#### Signature - -```typescript -markInitialized(): void -``` - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 514. - -*** - -### setAgent - -Set the agent reference for this skill. -Called by the SkillManager/AgentBase when the skill is attached to an agent. -Python equivalent: `self.agent = agent` in `__init__`. - -#### Signature - -```typescript -setAgent(agent: AgentBase): void -``` - -#### Parameters - - - The agent that owns this skill. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 534. - -*** - -### setup - -Setup the skill. Called when the skill is added to an agent. -Override to perform initialization (API connections, config validation, etc.) - -#### Signature - -```typescript -setup(): Promise -``` - -#### Returns - -`Promise` — `true` if setup succeeded, `false` otherwise. Python equivalent: abstract `setup() -> bool`. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 313. - -*** - -### updateSkillData - -Update this skill's namespaced data on a FunctionResult via updateGlobalData. - -#### Signature - -```typescript -updateSkillData( - result: FunctionResult, - data: Record -): FunctionResult -``` - -#### Parameters - - - The FunctionResult to update. - - - - The data to store under this skill's namespace. - - -#### Returns - -`FunctionResult` — The FunctionResult for chaining. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 462. - -*** - -### validateEnvVars - -Validate that all required environment variables declared on the skill class -are set in the current process environment. - -Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` -directly. TS reads the same static from the class. - -Returns the list of missing variable names so callers can produce actionable -error messages. This differs from Python's `validate_env_vars() -> bool` -return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/skills/builtin/play-background-file/play-background-file-skill#has-all-env-vars) is the boolean equivalent. - -#### Signature - -```typescript -validateEnvVars(): string[] -``` - -#### Returns - -`string[]` — Array of missing environment variable names (empty if all are present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 486. - -*** - -### validatePackages - -Validate that all required packages declared on the skill class can be imported. - -Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` -directly and tries `importlib.import_module(pkg)` for each; TS does the -equivalent with a dynamic `import()`. - -#### Signature - -```typescript -validatePackages(): Promise -``` - -#### Returns - -`Promise` — Array of package names that could not be imported (empty if all present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 557. - -## Source - -[`src/skills/builtin/play_background_file.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/play_background_file.ts) - -Line 52. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/spider/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/spider/index.mdx deleted file mode 100644 index 19e6934299..0000000000 --- a/fern/products/sdk-reference/typescript/skills/builtin/spider/index.mdx +++ /dev/null @@ -1,62 +0,0 @@ ---- -slug: "/reference/typescript/skills/builtin/spider" -title: "spider" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "module" - language: "typescript" - qualified_name: "skills.builtin.spider" - module: "skills.builtin" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/spider.ts" ---- -# `spider` - -## Signature - -```typescript -module spider -``` - -## Classes - - - - Fast web scraping skill optimized for speed and token efficiency. - - - -## Functions - -### createSkill - -Factory function for creating SpiderSkill instances. - -#### Signature - -```typescript -createSkill(config?: SkillConfig): SpiderSkill -``` - -#### Parameters - - - Optional skill configuration. - - -#### Returns - -`SpiderSkill` — A new SpiderSkill instance. - -#### Source - -[`src/skills/builtin/spider.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/spider.ts) - -Line 937. - -## Source - -[`src/skills/builtin/spider.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/spider.ts) - -Line 1. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/spider/spider-skill/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/spider/spider-skill/index.mdx deleted file mode 100644 index 45c105c45b..0000000000 --- a/fern/products/sdk-reference/typescript/skills/builtin/spider/spider-skill/index.mdx +++ /dev/null @@ -1,718 +0,0 @@ ---- -slug: "/reference/typescript/skills/builtin/spider/spider-skill" -title: "SpiderSkill" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "skills.builtin.spider.SpiderSkill" - parent: "skills.builtin.spider" - module: "skills.builtin.spider" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/spider.ts" ---- -# `SpiderSkill` - -Fast web scraping skill optimized for speed and token efficiency. - -Multi-instance capable. Port of the Python `SpiderSkill` with three tools: -`scrape_url`, `crawl_site`, and `extract_structured_data`. Configuration -mirrors the Python schema (delay, concurrent\_requests, timeout, max\_pages, -max\_depth, extract\_type, max\_text\_length, clean\_text, selectors, -follow\_patterns, user\_agent, headers, follow\_robots\_txt, cache\_enabled). - -## Signature - -```typescript -class SpiderSkill extends SkillBase -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/skills/skill-base) - -## Examples - -```typescript -agent.addSkill('spider', { max_pages: 5, max_depth: 2 }); -``` - -## Properties - - - Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. - - - - Configuration options provided at construction time. - - - - Unique identifier for this skill instance (includes timestamp and random bytes). - - - - Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. - - - - Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. - - - - Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. - - - - Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. - - - - Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. - - - - Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. - - - - The registered name of this skill type. - - - - Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. - - - - Additional SWAIG fields extracted from config, merged into tool definitions. - - -## Methods - -### cleanup - -Cleanup resources. Called when the skill is removed from an agent. - -#### Signature - -```typescript -cleanup(): Promise -``` - -#### Returns - -`Promise` - -#### Source - -[`src/skills/builtin/spider.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/spider.ts) - -Line 321. - -*** - -### constructor - -Create a new skill instance. - -Python parity: `core/skill_base.py:32-43`. -Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` -is left as `None` on the subclass. TS throws the equivalent when the static -defaults haven't been overridden. - -#### Signature - -```typescript -constructor(config?: SkillConfig): SpiderSkill -``` - -#### Parameters - - - Optional configuration key-value pairs (Python: `params`). - - -#### Returns - -`SpiderSkill` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 282. - -*** - -### defineTool - -Imperatively register a tool with this skill. - -Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. -Merges `this.swaigFields` into the tool definition (explicit fields on -`toolDef` take precedence), then pushes the result into `_dynamicTools` -so the default `getTools()` returns it at SWML render time. - -Intended for skills whose tool shape depends on config evaluated at -`setup()` time. Skills with a static tool list should override -`getTools()` instead. - -#### Signature - -```typescript -defineTool(toolDef: SkillToolDefinition): void -``` - -#### Parameters - - - The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 351. - -*** - -### getAgent - -Return the agent that owns this skill, asserting it is non-null. -Equivalent to accessing `self.agent` in Python, where the agent reference -is always set before `setup()` is called. - -The SkillManager lifecycle guarantees that `setAgent()` is called before -`setup()`, so this method is safe to use inside `setup()` and in any -tool handler invoked during an active agent session. - -#### Signature - -```typescript -getAgent(): AgentBase -``` - -#### Returns - -`AgentBase` — The owning `AgentBase` instance. - -#### Throws - -- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 261. - -*** - -### getConfig - -Get a configuration value by key, falling back to a default if not set. - -#### Signature - -```typescript -getConfig(key: string, defaultValue?: T): T -``` - -#### Type Parameters - - - -#### Parameters - - - The configuration key to look up. - - - - Value to return if the key is not present. - - -#### Returns - -`T` — The configuration value cast to type T, or the default value. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 524. - -*** - -### getDataMapTools - -Optional DataMap-style tool definitions. Skills that build their own -SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them -here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. - -Python equivalent: the direct `self.agent.register_swaig_function(fn)` -call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). -Default returns `[]` — skills using only the declarative `getTools()` path -do not need to override this. - -#### Signature - -```typescript -getDataMapTools(): Record[] -``` - -#### Returns - -`Record[]` — Array of fully-built SWAIG function dicts. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 372. - -*** - -### getGlobalData - -Get global data to merge into the agent's global data store. - -#### Signature - -```typescript -getGlobalData(): Record -``` - -#### Returns - -`Record` — Key-value pairs to be merged into the agent's global data. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 410. - -*** - -### getHints - -Get speech recognition hints relevant to this skill. - -#### Signature - -```typescript -getHints(): string[] -``` - -#### Returns - -`string[]` — Array of hint strings to improve speech recognition accuracy. - -#### Source - -[`src/skills/builtin/spider.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/spider.ts) - -Line 308. - -*** - -### getInstanceKey - -Get the instance key used for deduplication in the SkillManager. - -For single-instance skills (`SUPPORTS_MULTIPLE_INSTANCES = false`), returns -the skill name. For multi-instance skills, returns `${skillName}_${toolName}` -using the `tool_name` config (falls back to the skill name). - -Matches Python's `SkillBase.get_instance_key()` default (`skill_base.py:141-146`). -Multi-instance subclasses only need to override when their key derivation -depends on config beyond `tool_name`. - -#### Signature - -```typescript -getInstanceKey(): string -``` - -#### Returns - -`string` — A unique key identifying this skill instance. - -#### Source - -[`src/skills/builtin/spider.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/spider.ts) - -Line 211. - -*** - -### getParameterSchema - -Get the parameter schema for this skill class, describing all accepted configuration options. -Subclasses should override and call `super.getParameterSchema()` to include base parameters. - -Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): -returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a -`tool_name` entry with `default: cls.SKILL_NAME` for classes with -`SUPPORTS_MULTIPLE_INSTANCES = true`. - -**Modifiers:** `static` - -#### Signature - -```typescript -getParameterSchema(): Record -``` - -#### Returns - -`Record` — Record mapping parameter names to their schema entries. - -#### Source - -[`src/skills/builtin/spider.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/spider.ts) - -Line 81. - -*** - -### getPromptSections - -Get prompt sections to inject into the agent's system prompt. -Respects the `skip_prompt` config option — returns `[]` if set to `true`. -Subclasses should override `_getPromptSections()` instead of this method. - -#### Signature - -```typescript -getPromptSections(): SkillPromptSection[] -``` - -#### Returns - -`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 382. - -*** - -### getSkillData - -Read this skill's data from a raw call data object's global\_data. - -#### Signature - -```typescript -getSkillData(rawData: Record): Record -``` - -#### Parameters - - - The raw request data containing global\_data. - - -#### Returns - -`Record` — The skill's stored data, or an empty object if not found. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 450. - -*** - -### getSkillNamespace - -Get the namespaced key for storing per-skill data in global\_data. - -#### Signature - -```typescript -getSkillNamespace(): string -``` - -#### Returns - -`string` — A string like "skill:datetime" or "skill:my\_prefix". - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 440. - -*** - -### getTools - -#### Signature - -```typescript -getTools(): SkillToolDefinition[] -``` - -#### Returns - -`SkillToolDefinition[]` — Three tools: `scrape_url`, `crawl_site`, and `extract_structured_data`. - -#### Source - -[`src/skills/builtin/spider.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/spider.ts) - -Line 329. - -*** - -### hasAllEnvVars - -Check if all required environment variables are present. -Convenience wrapper around `validateEnvVars()` that returns a boolean, -matching the Python `validate_env_vars() -> bool` return type. - -#### Signature - -```typescript -hasAllEnvVars(): boolean -``` - -#### Returns - -`boolean` — `true` if all required env vars are set, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 544. - -*** - -### hasAllPackages - -Check if all required packages declared in the manifest are available. -Convenience wrapper around `validatePackages()` that returns a boolean, -matching the Python `validate_packages() -> bool` return type. - -#### Signature - -```typescript -hasAllPackages(): Promise -``` - -#### Returns - -`Promise` — `true` if all required packages are importable, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 579. - -*** - -### isInitialized - -Check if the skill has been initialized by the SkillManager. - -#### Signature - -```typescript -isInitialized(): boolean -``` - -#### Returns - -`boolean` — True if setup() has completed and the skill is marked initialized. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 507. - -*** - -### markInitialized - -Mark the skill as initialized (called by SkillManager). - -#### Signature - -```typescript -markInitialized(): void -``` - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 514. - -*** - -### setAgent - -Set the agent reference for this skill. -Called by the SkillManager/AgentBase when the skill is attached to an agent. -Python equivalent: `self.agent = agent` in `__init__`. - -#### Signature - -```typescript -setAgent(agent: AgentBase): void -``` - -#### Parameters - - - The agent that owns this skill. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 534. - -*** - -### setup - -Setup the skill. Called when the skill is added to an agent. -Override to perform initialization (API connections, config validation, etc.) - -#### Signature - -```typescript -setup(): Promise -``` - -#### Returns - -`Promise` — `true` if setup succeeded, `false` otherwise. Python equivalent: abstract `setup() -> bool`. - -#### Source - -[`src/skills/builtin/spider.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/spider.ts) - -Line 216. - -*** - -### updateSkillData - -Update this skill's namespaced data on a FunctionResult via updateGlobalData. - -#### Signature - -```typescript -updateSkillData( - result: FunctionResult, - data: Record -): FunctionResult -``` - -#### Parameters - - - The FunctionResult to update. - - - - The data to store under this skill's namespace. - - -#### Returns - -`FunctionResult` — The FunctionResult for chaining. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 462. - -*** - -### validateEnvVars - -Validate that all required environment variables declared on the skill class -are set in the current process environment. - -Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` -directly. TS reads the same static from the class. - -Returns the list of missing variable names so callers can produce actionable -error messages. This differs from Python's `validate_env_vars() -> bool` -return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/skills/builtin/spider/spider-skill#has-all-env-vars) is the boolean equivalent. - -#### Signature - -```typescript -validateEnvVars(): string[] -``` - -#### Returns - -`string[]` — Array of missing environment variable names (empty if all are present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 486. - -*** - -### validatePackages - -Validate that all required packages declared on the skill class can be imported. - -Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` -directly and tries `importlib.import_module(pkg)` for each; TS does the -equivalent with a dynamic `import()`. - -#### Signature - -```typescript -validatePackages(): Promise -``` - -#### Returns - -`Promise` — Array of package names that could not be imported (empty if all present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 557. - -## Source - -[`src/skills/builtin/spider.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/spider.ts) - -Line 71. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/swml-transfer/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/swml-transfer/index.mdx deleted file mode 100644 index 1dee6d47b5..0000000000 --- a/fern/products/sdk-reference/typescript/skills/builtin/swml-transfer/index.mdx +++ /dev/null @@ -1,62 +0,0 @@ ---- -slug: "/reference/typescript/skills/builtin/swml-transfer" -title: "swml_transfer" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "module" - language: "typescript" - qualified_name: "skills.builtin.swml_transfer" - module: "skills.builtin" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/swml_transfer.ts" ---- -# `swml_transfer` - -## Signature - -```typescript -module swml_transfer -``` - -## Classes - - - - Transfer calls between agents based on pattern matching. - - - -## Functions - -### createSkill - -Factory function for creating SwmlTransferSkill instances. - -#### Signature - -```typescript -createSkill(config?: SkillConfig): SwmlTransferSkill -``` - -#### Parameters - - - Optional skill configuration. - - -#### Returns - -`SwmlTransferSkill` — A new SwmlTransferSkill instance. - -#### Source - -[`src/skills/builtin/swml_transfer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/swml_transfer.ts) - -Line 643. - -## Source - -[`src/skills/builtin/swml_transfer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/swml_transfer.ts) - -Line 1. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/swml-transfer/swml-transfer-skill/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/swml-transfer/swml-transfer-skill/index.mdx deleted file mode 100644 index b4fa0aa3a9..0000000000 --- a/fern/products/sdk-reference/typescript/skills/builtin/swml-transfer/swml-transfer-skill/index.mdx +++ /dev/null @@ -1,721 +0,0 @@ ---- -slug: "/reference/typescript/skills/builtin/swml-transfer/swml-transfer-skill" -title: "SwmlTransferSkill" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "skills.builtin.swml_transfer.SwmlTransferSkill" - parent: "skills.builtin.swml_transfer" - module: "skills.builtin.swml_transfer" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/swml_transfer.ts" ---- -# `SwmlTransferSkill` - -Transfer calls between agents based on pattern matching. - -Multi-instance capable (distinguished by `tool_name`). -Accepts either Python-style `transfers` config (regex → per-entry config) -or TypeScript-style `patterns` array of named destinations. - -## Signature - -```typescript -class SwmlTransferSkill extends SkillBase -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/skills/skill-base) - -## Examples - -```typescript -agent.addSkill('swml_transfer', { - patterns: [ - { name: 'sales', pattern: /sales|pricing|buy/i, to: '+15551112222' }, - { name: 'support', pattern: /help|support|broken/i, to: '+15553334444' }, - ], -}); -``` - -## Properties - - - Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. - - - - Configuration options provided at construction time. - - - - Unique identifier for this skill instance (includes timestamp and random bytes). - - - - Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. - - - - Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. - - - - Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. - - - - Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. - - - - Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. - - - - Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. - - - - The registered name of this skill type. - - - - Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. - - - - Additional SWAIG fields extracted from config, merged into tool definitions. - - -## Methods - -### cleanup - -Cleanup resources. Called when the skill is removed from an agent. - -#### Signature - -```typescript -cleanup(): Promise -``` - -#### Returns - -`Promise` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 469. - -*** - -### constructor - -Create a new skill instance. - -Python parity: `core/skill_base.py:32-43`. -Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` -is left as `None` on the subclass. TS throws the equivalent when the static -defaults haven't been overridden. - -#### Signature - -```typescript -constructor(config?: SkillConfig): SwmlTransferSkill -``` - -#### Parameters - - - Optional configuration key-value pairs (Python: `params`). - - -#### Returns - -`SwmlTransferSkill` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 282. - -*** - -### defineTool - -Imperatively register a tool with this skill. - -Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. -Merges `this.swaigFields` into the tool definition (explicit fields on -`toolDef` take precedence), then pushes the result into `_dynamicTools` -so the default `getTools()` returns it at SWML render time. - -Intended for skills whose tool shape depends on config evaluated at -`setup()` time. Skills with a static tool list should override -`getTools()` instead. - -#### Signature - -```typescript -defineTool(toolDef: SkillToolDefinition): void -``` - -#### Parameters - - - The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 351. - -*** - -### getAgent - -Return the agent that owns this skill, asserting it is non-null. -Equivalent to accessing `self.agent` in Python, where the agent reference -is always set before `setup()` is called. - -The SkillManager lifecycle guarantees that `setAgent()` is called before -`setup()`, so this method is safe to use inside `setup()` and in any -tool handler invoked during an active agent session. - -#### Signature - -```typescript -getAgent(): AgentBase -``` - -#### Returns - -`AgentBase` — The owning `AgentBase` instance. - -#### Throws - -- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 261. - -*** - -### getConfig - -Get a configuration value by key, falling back to a default if not set. - -#### Signature - -```typescript -getConfig(key: string, defaultValue?: T): T -``` - -#### Type Parameters - - - -#### Parameters - - - The configuration key to look up. - - - - Value to return if the key is not present. - - -#### Returns - -`T` — The configuration value cast to type T, or the default value. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 524. - -*** - -### getDataMapTools - -Optional DataMap-style tool definitions. Skills that build their own -SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them -here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. - -Python equivalent: the direct `self.agent.register_swaig_function(fn)` -call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). -Default returns `[]` — skills using only the declarative `getTools()` path -do not need to override this. - -#### Signature - -```typescript -getDataMapTools(): Record[] -``` - -#### Returns - -`Record[]` — Array of fully-built SWAIG function dicts. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 372. - -*** - -### getGlobalData - -Get global data to merge into the agent's global data store. - -#### Signature - -```typescript -getGlobalData(): Record -``` - -#### Returns - -`Record` — Key-value pairs to be merged into the agent's global data. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 410. - -*** - -### getHints - -Get speech recognition hints relevant to this skill. - -#### Signature - -```typescript -getHints(): string[] -``` - -#### Returns - -`string[]` — Array of hint strings to improve speech recognition accuracy. - -#### Source - -[`src/skills/builtin/swml_transfer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/swml_transfer.ts) - -Line 241. - -*** - -### getInstanceKey - -Get the instance key used for deduplication in the SkillManager. - -For single-instance skills (`SUPPORTS_MULTIPLE_INSTANCES = false`), returns -the skill name. For multi-instance skills, returns `${skillName}_${toolName}` -using the `tool_name` config (falls back to the skill name). - -Matches Python's `SkillBase.get_instance_key()` default (`skill_base.py:141-146`). -Multi-instance subclasses only need to override when their key derivation -depends on config beyond `tool_name`. - -#### Signature - -```typescript -getInstanceKey(): string -``` - -#### Returns - -`string` — A unique key identifying this skill instance. - -#### Source - -[`src/skills/builtin/swml_transfer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/swml_transfer.ts) - -Line 162. - -*** - -### getParameterSchema - -Get the parameter schema for this skill class, describing all accepted configuration options. -Subclasses should override and call `super.getParameterSchema()` to include base parameters. - -Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): -returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a -`tool_name` entry with `default: cls.SKILL_NAME` for classes with -`SUPPORTS_MULTIPLE_INSTANCES = true`. - -**Modifiers:** `static` - -#### Signature - -```typescript -getParameterSchema(): Record -``` - -#### Returns - -`Record` — Record mapping parameter names to their schema entries. - -#### Source - -[`src/skills/builtin/swml_transfer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/swml_transfer.ts) - -Line 82. - -*** - -### getPromptSections - -Get prompt sections to inject into the agent's system prompt. -Respects the `skip_prompt` config option — returns `[]` if set to `true`. -Subclasses should override `_getPromptSections()` instead of this method. - -#### Signature - -```typescript -getPromptSections(): SkillPromptSection[] -``` - -#### Returns - -`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 382. - -*** - -### getSkillData - -Read this skill's data from a raw call data object's global\_data. - -#### Signature - -```typescript -getSkillData(rawData: Record): Record -``` - -#### Parameters - - - The raw request data containing global\_data. - - -#### Returns - -`Record` — The skill's stored data, or an empty object if not found. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 450. - -*** - -### getSkillNamespace - -Get the namespaced key for storing per-skill data in global\_data. - -#### Signature - -```typescript -getSkillNamespace(): string -``` - -#### Returns - -`string` — A string like "skill:datetime" or "skill:my\_prefix". - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 440. - -*** - -### getTools - -#### Signature - -```typescript -getTools(): SkillToolDefinition[] -``` - -#### Returns - -`SkillToolDefinition[]` — A `transfer_call` tool, plus `list_transfer_destinations` when patterns are configured. - -#### Source - -[`src/skills/builtin/swml_transfer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/swml_transfer.ts) - -Line 272. - -*** - -### hasAllEnvVars - -Check if all required environment variables are present. -Convenience wrapper around `validateEnvVars()` that returns a boolean, -matching the Python `validate_env_vars() -> bool` return type. - -#### Signature - -```typescript -hasAllEnvVars(): boolean -``` - -#### Returns - -`boolean` — `true` if all required env vars are set, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 544. - -*** - -### hasAllPackages - -Check if all required packages declared in the manifest are available. -Convenience wrapper around `validatePackages()` that returns a boolean, -matching the Python `validate_packages() -> bool` return type. - -#### Signature - -```typescript -hasAllPackages(): Promise -``` - -#### Returns - -`Promise` — `true` if all required packages are importable, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 579. - -*** - -### isInitialized - -Check if the skill has been initialized by the SkillManager. - -#### Signature - -```typescript -isInitialized(): boolean -``` - -#### Returns - -`boolean` — True if setup() has completed and the skill is marked initialized. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 507. - -*** - -### markInitialized - -Mark the skill as initialized (called by SkillManager). - -#### Signature - -```typescript -markInitialized(): void -``` - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 514. - -*** - -### setAgent - -Set the agent reference for this skill. -Called by the SkillManager/AgentBase when the skill is attached to an agent. -Python equivalent: `self.agent = agent` in `__init__`. - -#### Signature - -```typescript -setAgent(agent: AgentBase): void -``` - -#### Parameters - - - The agent that owns this skill. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 534. - -*** - -### setup - -Setup the skill. Called when the skill is added to an agent. -Override to perform initialization (API connections, config validation, etc.) - -#### Signature - -```typescript -setup(): Promise -``` - -#### Returns - -`Promise` — `true` if setup succeeded, `false` otherwise. Python equivalent: abstract `setup() -> bool`. - -#### Source - -[`src/skills/builtin/swml_transfer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/swml_transfer.ts) - -Line 167. - -*** - -### updateSkillData - -Update this skill's namespaced data on a FunctionResult via updateGlobalData. - -#### Signature - -```typescript -updateSkillData( - result: FunctionResult, - data: Record -): FunctionResult -``` - -#### Parameters - - - The FunctionResult to update. - - - - The data to store under this skill's namespace. - - -#### Returns - -`FunctionResult` — The FunctionResult for chaining. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 462. - -*** - -### validateEnvVars - -Validate that all required environment variables declared on the skill class -are set in the current process environment. - -Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` -directly. TS reads the same static from the class. - -Returns the list of missing variable names so callers can produce actionable -error messages. This differs from Python's `validate_env_vars() -> bool` -return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/skills/builtin/swml-transfer/swml-transfer-skill#has-all-env-vars) is the boolean equivalent. - -#### Signature - -```typescript -validateEnvVars(): string[] -``` - -#### Returns - -`string[]` — Array of missing environment variable names (empty if all are present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 486. - -*** - -### validatePackages - -Validate that all required packages declared on the skill class can be imported. - -Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` -directly and tries `importlib.import_module(pkg)` for each; TS does the -equivalent with a dynamic `import()`. - -#### Signature - -```typescript -validatePackages(): Promise -``` - -#### Returns - -`Promise` — Array of package names that could not be imported (empty if all present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 557. - -## Source - -[`src/skills/builtin/swml_transfer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/swml_transfer.ts) - -Line 73. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/weather-api/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/weather-api/index.mdx deleted file mode 100644 index e85e7a3e12..0000000000 --- a/fern/products/sdk-reference/typescript/skills/builtin/weather-api/index.mdx +++ /dev/null @@ -1,62 +0,0 @@ ---- -slug: "/reference/typescript/skills/builtin/weather-api" -title: "weather_api" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "module" - language: "typescript" - qualified_name: "skills.builtin.weather_api" - module: "skills.builtin" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/weather_api.ts" ---- -# `weather_api` - -## Signature - -```typescript -module weather_api -``` - -## Classes - - - - Fetches current weather data from OpenWeatherMap for any location worldwide. - - - -## Functions - -### createSkill - -Factory function for creating WeatherApiSkill instances. - -#### Signature - -```typescript -createSkill(config?: SkillConfig): WeatherApiSkill -``` - -#### Parameters - - - Optional skill configuration. - - -#### Returns - -`WeatherApiSkill` — A new WeatherApiSkill instance. - -#### Source - -[`src/skills/builtin/weather_api.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/weather_api.ts) - -Line 271. - -## Source - -[`src/skills/builtin/weather_api.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/weather_api.ts) - -Line 1. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/weather-api/weather-api-skill/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/weather-api/weather-api-skill/index.mdx deleted file mode 100644 index 6e246ed483..0000000000 --- a/fern/products/sdk-reference/typescript/skills/builtin/weather-api/weather-api-skill/index.mdx +++ /dev/null @@ -1,732 +0,0 @@ ---- -slug: "/reference/typescript/skills/builtin/weather-api/weather-api-skill" -title: "WeatherApiSkill" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "skills.builtin.weather_api.WeatherApiSkill" - parent: "skills.builtin.weather_api" - module: "skills.builtin.weather_api" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/weather_api.ts" ---- -# `WeatherApiSkill` - -Fetches current weather data from OpenWeatherMap for any location worldwide. - -Tier 2 built-in skill. Requires the `WEATHER_API_KEY` environment variable -containing a valid OpenWeatherMap API key (obtainable at openweathermap.org). -Supports metric, imperial, and standard temperature units via the `units` -config option. The `api_key` config value takes precedence over the -environment variable when both are set. - -**Provider note:** The Python reference SDK uses WeatherAPI.com -(`api.weatherapi.com/v1/current.json`). This TypeScript skill uses -OpenWeatherMap (`api.openweathermap.org/data/2.5/weather`). These providers -use different API key formats — a WeatherAPI.com key will NOT work here. -Obtain an OpenWeatherMap key at https://openweathermap.org/api. - -**Unit aliases:** For migration compatibility with the Python SDK the `units` -config also accepts `"fahrenheit"` (normalized to `"imperial"`) and -`"celsius"` (normalized to `"metric"`). - -## Signature - -```typescript -class WeatherApiSkill extends SkillBase -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/skills/skill-base) - -## Examples - -```typescript -agent.addSkill('weather_api', { units: 'imperial' }); -// or pass the key explicitly: -agent.addSkill('weather_api', { api_key: process.env.WEATHER_API_KEY }); -``` - -## Properties - - - Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. - - - - Configuration options provided at construction time. - - - - Unique identifier for this skill instance (includes timestamp and random bytes). - - - - Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. - - - - Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. - - - - Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. - - - - Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. - - - - Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. - - - - Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. - - - - The registered name of this skill type. - - - - Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. - - - - Additional SWAIG fields extracted from config, merged into tool definitions. - - -## Methods - -### cleanup - -Cleanup resources. Called when the skill is removed from an agent. - -#### Signature - -```typescript -cleanup(): Promise -``` - -#### Returns - -`Promise` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 469. - -*** - -### constructor - -Create a new skill instance. - -Python parity: `core/skill_base.py:32-43`. -Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` -is left as `None` on the subclass. TS throws the equivalent when the static -defaults haven't been overridden. - -#### Signature - -```typescript -constructor(config?: SkillConfig): WeatherApiSkill -``` - -#### Parameters - - - Optional configuration key-value pairs (Python: `params`). - - -#### Returns - -`WeatherApiSkill` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 282. - -*** - -### defineTool - -Imperatively register a tool with this skill. - -Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. -Merges `this.swaigFields` into the tool definition (explicit fields on -`toolDef` take precedence), then pushes the result into `_dynamicTools` -so the default `getTools()` returns it at SWML render time. - -Intended for skills whose tool shape depends on config evaluated at -`setup()` time. Skills with a static tool list should override -`getTools()` instead. - -#### Signature - -```typescript -defineTool(toolDef: SkillToolDefinition): void -``` - -#### Parameters - - - The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 351. - -*** - -### getAgent - -Return the agent that owns this skill, asserting it is non-null. -Equivalent to accessing `self.agent` in Python, where the agent reference -is always set before `setup()` is called. - -The SkillManager lifecycle guarantees that `setAgent()` is called before -`setup()`, so this method is safe to use inside `setup()` and in any -tool handler invoked during an active agent session. - -#### Signature - -```typescript -getAgent(): AgentBase -``` - -#### Returns - -`AgentBase` — The owning `AgentBase` instance. - -#### Throws - -- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 261. - -*** - -### getConfig - -Get a configuration value by key, falling back to a default if not set. - -#### Signature - -```typescript -getConfig(key: string, defaultValue?: T): T -``` - -#### Type Parameters - - - -#### Parameters - - - The configuration key to look up. - - - - Value to return if the key is not present. - - -#### Returns - -`T` — The configuration value cast to type T, or the default value. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 524. - -*** - -### getDataMapTools - -Optional DataMap-style tool definitions. Skills that build their own -SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them -here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. - -Python equivalent: the direct `self.agent.register_swaig_function(fn)` -call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). -Default returns `[]` — skills using only the declarative `getTools()` path -do not need to override this. - -#### Signature - -```typescript -getDataMapTools(): Record[] -``` - -#### Returns - -`Record[]` — Array of fully-built SWAIG function dicts. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 372. - -*** - -### getGlobalData - -Get global data to merge into the agent's global data store. - -#### Signature - -```typescript -getGlobalData(): Record -``` - -#### Returns - -`Record` — Key-value pairs to be merged into the agent's global data. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 410. - -*** - -### getHints - -Get speech recognition hints relevant to this skill. - -#### Signature - -```typescript -getHints(): string[] -``` - -#### Returns - -`string[]` — Array of hint strings to improve speech recognition accuracy. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 402. - -*** - -### getInstanceKey - -Get the instance key used for deduplication in the SkillManager. - -For single-instance skills (`SUPPORTS_MULTIPLE_INSTANCES = false`), returns -the skill name. For multi-instance skills, returns `${skillName}_${toolName}` -using the `tool_name` config (falls back to the skill name). - -Matches Python's `SkillBase.get_instance_key()` default (`skill_base.py:141-146`). -Multi-instance subclasses only need to override when their key derivation -depends on config beyond `tool_name`. - -#### Signature - -```typescript -getInstanceKey(): string -``` - -#### Returns - -`string` — A unique key identifying this skill instance. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 427. - -*** - -### getParameterSchema - -Get the parameter schema for this skill class, describing all accepted configuration options. -Subclasses should override and call `super.getParameterSchema()` to include base parameters. - -Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): -returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a -`tool_name` entry with `default: cls.SKILL_NAME` for classes with -`SUPPORTS_MULTIPLE_INSTANCES = true`. - -**Modifiers:** `static` - -#### Signature - -```typescript -getParameterSchema(): Record -``` - -#### Returns - -`Record` — Record mapping parameter names to their schema entries. - -#### Source - -[`src/skills/builtin/weather_api.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/weather_api.ts) - -Line 93. - -*** - -### getPromptSections - -Get prompt sections to inject into the agent's system prompt. -Respects the `skip_prompt` config option — returns `[]` if set to `true`. -Subclasses should override `_getPromptSections()` instead of this method. - -#### Signature - -```typescript -getPromptSections(): SkillPromptSection[] -``` - -#### Returns - -`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 382. - -*** - -### getSkillData - -Read this skill's data from a raw call data object's global\_data. - -#### Signature - -```typescript -getSkillData(rawData: Record): Record -``` - -#### Parameters - - - The raw request data containing global\_data. - - -#### Returns - -`Record` — The skill's stored data, or an empty object if not found. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 450. - -*** - -### getSkillNamespace - -Get the namespaced key for storing per-skill data in global\_data. - -#### Signature - -```typescript -getSkillNamespace(): string -``` - -#### Returns - -`string` — A string like "skill:datetime" or "skill:my\_prefix". - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 440. - -*** - -### getTools - -#### Signature - -```typescript -getTools(): SkillToolDefinition[] -``` - -#### Returns - -`SkillToolDefinition[]` — A single weather tool (configurable name) that fetches current weather for a location. - -#### Source - -[`src/skills/builtin/weather_api.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/weather_api.ts) - -Line 121. - -*** - -### hasAllEnvVars - -Check if all required environment variables are present. -Convenience wrapper around `validateEnvVars()` that returns a boolean, -matching the Python `validate_env_vars() -> bool` return type. - -#### Signature - -```typescript -hasAllEnvVars(): boolean -``` - -#### Returns - -`boolean` — `true` if all required env vars are set, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 544. - -*** - -### hasAllPackages - -Check if all required packages declared in the manifest are available. -Convenience wrapper around `validatePackages()` that returns a boolean, -matching the Python `validate_packages() -> bool` return type. - -#### Signature - -```typescript -hasAllPackages(): Promise -``` - -#### Returns - -`Promise` — `true` if all required packages are importable, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 579. - -*** - -### isInitialized - -Check if the skill has been initialized by the SkillManager. - -#### Signature - -```typescript -isInitialized(): boolean -``` - -#### Returns - -`boolean` — True if setup() has completed and the skill is marked initialized. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 507. - -*** - -### markInitialized - -Mark the skill as initialized (called by SkillManager). - -#### Signature - -```typescript -markInitialized(): void -``` - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 514. - -*** - -### setAgent - -Set the agent reference for this skill. -Called by the SkillManager/AgentBase when the skill is attached to an agent. -Python equivalent: `self.agent = agent` in `__init__`. - -#### Signature - -```typescript -setAgent(agent: AgentBase): void -``` - -#### Parameters - - - The agent that owns this skill. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 534. - -*** - -### setup - -Validates that an API key is available either via inline config or the -`WEATHER_API_KEY` environment variable. Fails fast (returns `false`) when -neither source provides a key — matching Python SDK behaviour where -`_validate_config()` raises on construction when `api_key` is absent. - -#### Signature - -```typescript -setup(): Promise -``` - -#### Returns - -`Promise` — `true` if a key is present, `false` otherwise. - -#### Source - -[`src/skills/builtin/weather_api.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/weather_api.ts) - -Line 84. - -*** - -### updateSkillData - -Update this skill's namespaced data on a FunctionResult via updateGlobalData. - -#### Signature - -```typescript -updateSkillData( - result: FunctionResult, - data: Record -): FunctionResult -``` - -#### Parameters - - - The FunctionResult to update. - - - - The data to store under this skill's namespace. - - -#### Returns - -`FunctionResult` — The FunctionResult for chaining. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 462. - -*** - -### validateEnvVars - -Validate that all required environment variables declared on the skill class -are set in the current process environment. - -Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` -directly. TS reads the same static from the class. - -Returns the list of missing variable names so callers can produce actionable -error messages. This differs from Python's `validate_env_vars() -> bool` -return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/skills/builtin/weather-api/weather-api-skill#has-all-env-vars) is the boolean equivalent. - -#### Signature - -```typescript -validateEnvVars(): string[] -``` - -#### Returns - -`string[]` — Array of missing environment variable names (empty if all are present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 486. - -*** - -### validatePackages - -Validate that all required packages declared on the skill class can be imported. - -Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` -directly and tries `importlib.import_module(pkg)` for each; TS does the -equivalent with a dynamic `import()`. - -#### Signature - -```typescript -validatePackages(): Promise -``` - -#### Returns - -`Promise` — Array of package names that could not be imported (empty if all present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 557. - -## Source - -[`src/skills/builtin/weather_api.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/weather_api.ts) - -Line 68. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/web-search/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/web-search/index.mdx deleted file mode 100644 index 0e109da668..0000000000 --- a/fern/products/sdk-reference/typescript/skills/builtin/web-search/index.mdx +++ /dev/null @@ -1,62 +0,0 @@ ---- -slug: "/reference/typescript/skills/builtin/web-search" -title: "web_search" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "module" - language: "typescript" - qualified_name: "skills.builtin.web_search" - module: "skills.builtin" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/web_search.ts" ---- -# `web_search` - -## Signature - -```typescript -module web_search -``` - -## Classes - - - - Searches the web using the Google Custom Search JSON API. - - - -## Functions - -### createSkill - -Factory function for creating WebSearchSkill instances. - -#### Signature - -```typescript -createSkill(config?: SkillConfig): WebSearchSkill -``` - -#### Parameters - - - Optional skill configuration. - - -#### Returns - -`WebSearchSkill` — A new WebSearchSkill instance. - -#### Source - -[`src/skills/builtin/web_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/web_search.ts) - -Line 1351. - -## Source - -[`src/skills/builtin/web_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/web_search.ts) - -Line 1. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/web-search/web-search-skill/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/web-search/web-search-skill/index.mdx deleted file mode 100644 index 0381a2b14f..0000000000 --- a/fern/products/sdk-reference/typescript/skills/builtin/web-search/web-search-skill/index.mdx +++ /dev/null @@ -1,736 +0,0 @@ ---- -slug: "/reference/typescript/skills/builtin/web-search/web-search-skill" -title: "WebSearchSkill" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "skills.builtin.web_search.WebSearchSkill" - parent: "skills.builtin.web_search" - module: "skills.builtin.web_search" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/web_search.ts" ---- -# `WebSearchSkill` - -Searches the web using the Google Custom Search JSON API. - -Tier 3 built-in skill. Credentials can be supplied via the `api_key` and -`search_engine_id` params or `GOOGLE_SEARCH_API_KEY` / -`GOOGLE_SEARCH_ENGINE_ID` (legacy: `GOOGLE_SEARCH_CX`) environment variables. - -The handler mirrors Python's `search_and_scrape_best` pipeline: fetches -`oversample_factor × num_results` candidates from Google, scrapes each -result page (SSRF-guarded, cheerio-based text extraction), scores for -quality (length + query relevance + boilerplate penalty), deduplicates by -domain, and returns the top `num_results` above `min_quality_score` with -full page content. If every scrape fails or falls below the threshold the -handler falls back to raw API snippets so the agent still has something -to say. - -Supported config: `tool_name`, `num_results`, `no_results_message`, -`safe_search`, `delay`, `max_content_length`, `oversample_factor`, -`min_quality_score`, `response_prefix`, `response_postfix`, and the -latency-control params `per_page_timeout`, `overall_deadline`, -`parallel_scrape`, `snippets_only` (Python skill.py commits 51101da + -295745b). When the overall deadline fires or no scraped page meets the -quality threshold, the handler falls back to formatting the CSE snippets. - -## Signature - -```typescript -class WebSearchSkill extends SkillBase -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/skills/skill-base) - -## Examples - -```typescript -agent.addSkill('web_search', { - api_key: process.env.GOOGLE_SEARCH_API_KEY, - search_engine_id: process.env.GOOGLE_CSE_ID, - num_results: 3, -}); -``` - -## Properties - - - Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. - - - - Configuration options provided at construction time. - - - - Unique identifier for this skill instance (includes timestamp and random bytes). - - - - Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. - - - - Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. - - - - Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. - - - - Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. - - - - Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. - - - - Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. - - - - The registered name of this skill type. - - - - Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. - - - - Additional SWAIG fields extracted from config, merged into tool definitions. - - -## Methods - -### cleanup - -Cleanup resources. Called when the skill is removed from an agent. - -#### Signature - -```typescript -cleanup(): Promise -``` - -#### Returns - -`Promise` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 469. - -*** - -### constructor - -Create a new skill instance. - -Python parity: `core/skill_base.py:32-43`. -Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` -is left as `None` on the subclass. TS throws the equivalent when the static -defaults haven't been overridden. - -#### Signature - -```typescript -constructor(config?: SkillConfig): WebSearchSkill -``` - -#### Parameters - - - Optional configuration key-value pairs (Python: `params`). - - -#### Returns - -`WebSearchSkill` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 282. - -*** - -### defineTool - -Imperatively register a tool with this skill. - -Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. -Merges `this.swaigFields` into the tool definition (explicit fields on -`toolDef` take precedence), then pushes the result into `_dynamicTools` -so the default `getTools()` returns it at SWML render time. - -Intended for skills whose tool shape depends on config evaluated at -`setup()` time. Skills with a static tool list should override -`getTools()` instead. - -#### Signature - -```typescript -defineTool(toolDef: SkillToolDefinition): void -``` - -#### Parameters - - - The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 351. - -*** - -### getAgent - -Return the agent that owns this skill, asserting it is non-null. -Equivalent to accessing `self.agent` in Python, where the agent reference -is always set before `setup()` is called. - -The SkillManager lifecycle guarantees that `setAgent()` is called before -`setup()`, so this method is safe to use inside `setup()` and in any -tool handler invoked during an active agent session. - -#### Signature - -```typescript -getAgent(): AgentBase -``` - -#### Returns - -`AgentBase` — The owning `AgentBase` instance. - -#### Throws - -- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 261. - -*** - -### getConfig - -Get a configuration value by key, falling back to a default if not set. - -#### Signature - -```typescript -getConfig(key: string, defaultValue?: T): T -``` - -#### Type Parameters - - - -#### Parameters - - - The configuration key to look up. - - - - Value to return if the key is not present. - - -#### Returns - -`T` — The configuration value cast to type T, or the default value. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 524. - -*** - -### getDataMapTools - -Optional DataMap-style tool definitions. Skills that build their own -SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them -here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. - -Python equivalent: the direct `self.agent.register_swaig_function(fn)` -call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). -Default returns `[]` — skills using only the declarative `getTools()` path -do not need to override this. - -#### Signature - -```typescript -getDataMapTools(): Record[] -``` - -#### Returns - -`Record[]` — Array of fully-built SWAIG function dicts. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 372. - -*** - -### getGlobalData - -Global data injected into the agent's SWML context (mirrors Python). - -#### Signature - -```typescript -getGlobalData(): Record -``` - -#### Returns - -`Record` - -#### Source - -[`src/skills/builtin/web_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/web_search.ts) - -Line 399. - -*** - -### getHints - -Get speech recognition hints relevant to this skill. - -#### Signature - -```typescript -getHints(): string[] -``` - -#### Returns - -`string[]` — Array of hint strings to improve speech recognition accuracy. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 402. - -*** - -### getInstanceKey - -Instance key for the SkillManager. Includes the configured -`search_engine_id` (or `"default"`) and `tool_name` (or `"web_search"`) -to match Python's `"{SKILL_NAME}_{search_engine_id}_{tool_name}"` scheme. - -#### Signature - -```typescript -getInstanceKey(): string -``` - -#### Returns - -`string` - -#### Source - -[`src/skills/builtin/web_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/web_search.ts) - -Line 392. - -*** - -### getParameterSchema - -Get the parameter schema for this skill class, describing all accepted configuration options. -Subclasses should override and call `super.getParameterSchema()` to include base parameters. - -Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): -returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a -`tool_name` entry with `default: cls.SKILL_NAME` for classes with -`SUPPORTS_MULTIPLE_INSTANCES = true`. - -**Modifiers:** `static` - -#### Signature - -```typescript -getParameterSchema(): Record -``` - -#### Returns - -`Record` — Record mapping parameter names to their schema entries. - -#### Source - -[`src/skills/builtin/web_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/web_search.ts) - -Line 228. - -*** - -### getPromptSections - -Get prompt sections to inject into the agent's system prompt. -Respects the `skip_prompt` config option — returns `[]` if set to `true`. -Subclasses should override `_getPromptSections()` instead of this method. - -#### Signature - -```typescript -getPromptSections(): SkillPromptSection[] -``` - -#### Returns - -`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 382. - -*** - -### getSkillData - -Read this skill's data from a raw call data object's global\_data. - -#### Signature - -```typescript -getSkillData(rawData: Record): Record -``` - -#### Parameters - - - The raw request data containing global\_data. - - -#### Returns - -`Record` — The skill's stored data, or an empty object if not found. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 450. - -*** - -### getSkillNamespace - -Get the namespaced key for storing per-skill data in global\_data. - -#### Signature - -```typescript -getSkillNamespace(): string -``` - -#### Returns - -`string` — A string like "skill:datetime" or "skill:my\_prefix". - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 440. - -*** - -### getTools - -#### Signature - -```typescript -getTools(): SkillToolDefinition[] -``` - -#### Returns - -`SkillToolDefinition[]` — A single tool (named via `tool_name`) that performs a Google Custom Search and returns formatted results. - -#### Source - -[`src/skills/builtin/web_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/web_search.ts) - -Line 416. - -*** - -### hasAllEnvVars - -Check if all required environment variables are present. -Convenience wrapper around `validateEnvVars()` that returns a boolean, -matching the Python `validate_env_vars() -> bool` return type. - -#### Signature - -```typescript -hasAllEnvVars(): boolean -``` - -#### Returns - -`boolean` — `true` if all required env vars are set, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 544. - -*** - -### hasAllPackages - -Check if all required packages declared in the manifest are available. -Convenience wrapper around `validatePackages()` that returns a boolean, -matching the Python `validate_packages() -> bool` return type. - -#### Signature - -```typescript -hasAllPackages(): Promise -``` - -#### Returns - -`Promise` — `true` if all required packages are importable, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 579. - -*** - -### isInitialized - -Check if the skill has been initialized by the SkillManager. - -#### Signature - -```typescript -isInitialized(): boolean -``` - -#### Returns - -`boolean` — True if setup() has completed and the skill is marked initialized. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 507. - -*** - -### markInitialized - -Mark the skill as initialized (called by SkillManager). - -#### Signature - -```typescript -markInitialized(): void -``` - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 514. - -*** - -### setAgent - -Set the agent reference for this skill. -Called by the SkillManager/AgentBase when the skill is attached to an agent. -Python equivalent: `self.agent = agent` in `__init__`. - -#### Signature - -```typescript -setAgent(agent: AgentBase): void -``` - -#### Parameters - - - The agent that owns this skill. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 534. - -*** - -### setup - -Validate required credentials before the skill becomes active. - -Mirrors Python's `setup()` (skill.py:559-600) which checks `api_key` and -`search_engine_id` and returns `False` (logging an error) if either is -absent. In the TS SDK credentials may also arrive via environment variables -(`GOOGLE_SEARCH_API_KEY` / `GOOGLE_SEARCH_ENGINE_ID` or the legacy alias -`GOOGLE_SEARCH_CX`), so both config params and env vars are checked. - -#### Signature - -```typescript -setup(): Promise -``` - -#### Returns - -`Promise` — `true` if all required credentials are present, `false` otherwise. - -#### Source - -[`src/skills/builtin/web_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/web_search.ts) - -Line 367. - -*** - -### updateSkillData - -Update this skill's namespaced data on a FunctionResult via updateGlobalData. - -#### Signature - -```typescript -updateSkillData( - result: FunctionResult, - data: Record -): FunctionResult -``` - -#### Parameters - - - The FunctionResult to update. - - - - The data to store under this skill's namespace. - - -#### Returns - -`FunctionResult` — The FunctionResult for chaining. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 462. - -*** - -### validateEnvVars - -Validate that all required environment variables declared on the skill class -are set in the current process environment. - -Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` -directly. TS reads the same static from the class. - -Returns the list of missing variable names so callers can produce actionable -error messages. This differs from Python's `validate_env_vars() -> bool` -return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/skills/builtin/web-search/web-search-skill#has-all-env-vars) is the boolean equivalent. - -#### Signature - -```typescript -validateEnvVars(): string[] -``` - -#### Returns - -`string[]` — Array of missing environment variable names (empty if all are present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 486. - -*** - -### validatePackages - -Validate that all required packages declared on the skill class can be imported. - -Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` -directly and tries `importlib.import_module(pkg)` for each; TS does the -equivalent with a dynamic `import()`. - -#### Signature - -```typescript -validatePackages(): Promise -``` - -#### Returns - -`Promise` — Array of package names that could not be imported (empty if all present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 557. - -## Source - -[`src/skills/builtin/web_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/web_search.ts) - -Line 215. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/wikipedia-search/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/wikipedia-search/index.mdx deleted file mode 100644 index 702941dfc4..0000000000 --- a/fern/products/sdk-reference/typescript/skills/builtin/wikipedia-search/index.mdx +++ /dev/null @@ -1,62 +0,0 @@ ---- -slug: "/reference/typescript/skills/builtin/wikipedia-search" -title: "wikipedia_search" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "module" - language: "typescript" - qualified_name: "skills.builtin.wikipedia_search" - module: "skills.builtin" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/wikipedia_search.ts" ---- -# `wikipedia_search` - -## Signature - -```typescript -module wikipedia_search -``` - -## Classes - - - - Searches Wikipedia for article summaries and extracts. - - - -## Functions - -### createSkill - -Factory function for creating WikipediaSearchSkill instances. - -#### Signature - -```typescript -createSkill(config?: SkillConfig): WikipediaSearchSkill -``` - -#### Parameters - - - Optional skill configuration. - - -#### Returns - -`WikipediaSearchSkill` — A new WikipediaSearchSkill instance. - -#### Source - -[`src/skills/builtin/wikipedia_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/wikipedia_search.ts) - -Line 318. - -## Source - -[`src/skills/builtin/wikipedia_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/wikipedia_search.ts) - -Line 1. diff --git a/fern/products/sdk-reference/typescript/skills/builtin/wikipedia-search/wikipedia-search-skill/index.mdx b/fern/products/sdk-reference/typescript/skills/builtin/wikipedia-search/wikipedia-search-skill/index.mdx deleted file mode 100644 index 99729d84d9..0000000000 --- a/fern/products/sdk-reference/typescript/skills/builtin/wikipedia-search/wikipedia-search-skill/index.mdx +++ /dev/null @@ -1,758 +0,0 @@ ---- -slug: "/reference/typescript/skills/builtin/wikipedia-search/wikipedia-search-skill" -title: "WikipediaSearchSkill" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "skills.builtin.wikipedia_search.WikipediaSearchSkill" - parent: "skills.builtin.wikipedia_search" - module: "skills.builtin.wikipedia_search" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/wikipedia_search.ts" ---- -# `WikipediaSearchSkill` - -Searches Wikipedia for article summaries and extracts. - -Tier 3 built-in skill with no external API key required. The configured -`num_results` drives how many articles are aggregated; `no_results_message` -customizes the fallback text (supports `{query}` interpolation). - -## Signature - -```typescript -class WikipediaSearchSkill extends SkillBase -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/skills/skill-base) - -## Examples - -```typescript -agent.addSkill('wikipedia_search', { num_results: 2 }); -``` - -## Properties - - - Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. - - - - Configuration options provided at construction time. - - - - Unique identifier for this skill instance (includes timestamp and random bytes). - - - - Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. - - - - Resolved `no_results_message` template (populated in `setup()`). Protected to mirror Python's `self.no_results_message` public visibility within the class hierarchy. - - - - Resolved `num_results` value (populated in `setup()`). Public to mirror Python's `self.num_results` — accessible to subclasses and external test code inspecting skill state. - - - - Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. - - - - Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. - - - - Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. - - - - Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. - - - - Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. - - - - The registered name of this skill type. - - - - Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. - - - - Additional SWAIG fields extracted from config, merged into tool definitions. - - -## Methods - -### cleanup - -Cleanup resources. Called when the skill is removed from an agent. - -#### Signature - -```typescript -cleanup(): Promise -``` - -#### Returns - -`Promise` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 469. - -*** - -### constructor - -Create a new skill instance. - -Python parity: `core/skill_base.py:32-43`. -Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` -is left as `None` on the subclass. TS throws the equivalent when the static -defaults haven't been overridden. - -#### Signature - -```typescript -constructor(config?: SkillConfig): WikipediaSearchSkill -``` - -#### Parameters - - - Optional configuration key-value pairs (Python: `params`). - - -#### Returns - -`WikipediaSearchSkill` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 282. - -*** - -### defineTool - -Imperatively register a tool with this skill. - -Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. -Merges `this.swaigFields` into the tool definition (explicit fields on -`toolDef` take precedence), then pushes the result into `_dynamicTools` -so the default `getTools()` returns it at SWML render time. - -Intended for skills whose tool shape depends on config evaluated at -`setup()` time. Skills with a static tool list should override -`getTools()` instead. - -#### Signature - -```typescript -defineTool(toolDef: SkillToolDefinition): void -``` - -#### Parameters - - - The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 351. - -*** - -### getAgent - -Return the agent that owns this skill, asserting it is non-null. -Equivalent to accessing `self.agent` in Python, where the agent reference -is always set before `setup()` is called. - -The SkillManager lifecycle guarantees that `setAgent()` is called before -`setup()`, so this method is safe to use inside `setup()` and in any -tool handler invoked during an active agent session. - -#### Signature - -```typescript -getAgent(): AgentBase -``` - -#### Returns - -`AgentBase` — The owning `AgentBase` instance. - -#### Throws - -- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 261. - -*** - -### getConfig - -Get a configuration value by key, falling back to a default if not set. - -#### Signature - -```typescript -getConfig(key: string, defaultValue?: T): T -``` - -#### Type Parameters - - - -#### Parameters - - - The configuration key to look up. - - - - Value to return if the key is not present. - - -#### Returns - -`T` — The configuration value cast to type T, or the default value. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 524. - -*** - -### getDataMapTools - -Optional DataMap-style tool definitions. Skills that build their own -SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them -here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. - -Python equivalent: the direct `self.agent.register_swaig_function(fn)` -call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). -Default returns `[]` — skills using only the declarative `getTools()` path -do not need to override this. - -#### Signature - -```typescript -getDataMapTools(): Record[] -``` - -#### Returns - -`Record[]` — Array of fully-built SWAIG function dicts. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 372. - -*** - -### getGlobalData - -Get global data to merge into the agent's global data store. - -#### Signature - -```typescript -getGlobalData(): Record -``` - -#### Returns - -`Record` — Key-value pairs to be merged into the agent's global data. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 410. - -*** - -### getHints - -Get speech recognition hints relevant to this skill. - -#### Signature - -```typescript -getHints(): string[] -``` - -#### Returns - -`string[]` — Array of hint strings to improve speech recognition accuracy. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 402. - -*** - -### getInstanceKey - -Get the instance key used for deduplication in the SkillManager. - -For single-instance skills (`SUPPORTS_MULTIPLE_INSTANCES = false`), returns -the skill name. For multi-instance skills, returns `${skillName}_${toolName}` -using the `tool_name` config (falls back to the skill name). - -Matches Python's `SkillBase.get_instance_key()` default (`skill_base.py:141-146`). -Multi-instance subclasses only need to override when their key derivation -depends on config beyond `tool_name`. - -#### Signature - -```typescript -getInstanceKey(): string -``` - -#### Returns - -`string` — A unique key identifying this skill instance. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 427. - -*** - -### getParameterSchema - -Get the parameter schema for this skill class, describing all accepted configuration options. -Subclasses should override and call `super.getParameterSchema()` to include base parameters. - -Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): -returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a -`tool_name` entry with `default: cls.SKILL_NAME` for classes with -`SUPPORTS_MULTIPLE_INSTANCES = true`. - -**Modifiers:** `static` - -#### Signature - -```typescript -getParameterSchema(): Record -``` - -#### Returns - -`Record` — Record mapping parameter names to their schema entries. - -#### Source - -[`src/skills/builtin/wikipedia_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/wikipedia_search.ts) - -Line 79. - -*** - -### getPromptSections - -Get prompt sections to inject into the agent's system prompt. -Respects the `skip_prompt` config option — returns `[]` if set to `true`. -Subclasses should override `_getPromptSections()` instead of this method. - -#### Signature - -```typescript -getPromptSections(): SkillPromptSection[] -``` - -#### Returns - -`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 382. - -*** - -### getSkillData - -Read this skill's data from a raw call data object's global\_data. - -#### Signature - -```typescript -getSkillData(rawData: Record): Record -``` - -#### Parameters - - - The raw request data containing global\_data. - - -#### Returns - -`Record` — The skill's stored data, or an empty object if not found. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 450. - -*** - -### getSkillNamespace - -Get the namespaced key for storing per-skill data in global\_data. - -#### Signature - -```typescript -getSkillNamespace(): string -``` - -#### Returns - -`string` — A string like "skill:datetime" or "skill:my\_prefix". - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 440. - -*** - -### getTools - -#### Signature - -```typescript -getTools(): SkillToolDefinition[] -``` - -#### Returns - -`SkillToolDefinition[]` — A `search_wiki` tool that fetches article summaries from Wikipedia. - -#### Source - -[`src/skills/builtin/wikipedia_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/wikipedia_search.ts) - -Line 122. - -*** - -### hasAllEnvVars - -Check if all required environment variables are present. -Convenience wrapper around `validateEnvVars()` that returns a boolean, -matching the Python `validate_env_vars() -> bool` return type. - -#### Signature - -```typescript -hasAllEnvVars(): boolean -``` - -#### Returns - -`boolean` — `true` if all required env vars are set, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 544. - -*** - -### hasAllPackages - -Check if all required packages declared in the manifest are available. -Convenience wrapper around `validatePackages()` that returns a boolean, -matching the Python `validate_packages() -> bool` return type. - -#### Signature - -```typescript -hasAllPackages(): Promise -``` - -#### Returns - -`Promise` — `true` if all required packages are importable, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 579. - -*** - -### isInitialized - -Check if the skill has been initialized by the SkillManager. - -#### Signature - -```typescript -isInitialized(): boolean -``` - -#### Returns - -`boolean` — True if setup() has completed and the skill is marked initialized. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 507. - -*** - -### markInitialized - -Mark the skill as initialized (called by SkillManager). - -#### Signature - -```typescript -markInitialized(): void -``` - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 514. - -*** - -### searchWiki - -Search Wikipedia and return a formatted text summary. - -Mirrors the Python `search_wiki()` public entry point so the logic can be -tested and reused outside the SWAIG handler. Uses `num_results` to decide -how many articles to aggregate. - -#### Signature - -```typescript -searchWiki(query: string): Promise -``` - -#### Parameters - - - Plain-text search term. - - -#### Returns - -`Promise` — Formatted text ready for display to the caller. - -#### Source - -[`src/skills/builtin/wikipedia_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/wikipedia_search.ts) - -Line 166. - -*** - -### setAgent - -Set the agent reference for this skill. -Called by the SkillManager/AgentBase when the skill is attached to an agent. -Python equivalent: `self.agent = agent` in `__init__`. - -#### Signature - -```typescript -setAgent(agent: AgentBase): void -``` - -#### Parameters - - - The agent that owns this skill. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 534. - -*** - -### setup - -Extract config values into instance state. Enforces `num_results >= 1` -(matching Python `skill.py:_setup` `max(1, ...)` floor). The schema's -`max: 5` handles the upper bound at validation time — no runtime clamp -here, so callers passing larger values get the raw value as in Python. - -#### Signature - -```typescript -setup(): Promise -``` - -#### Returns - -`Promise` - -#### Source - -[`src/skills/builtin/wikipedia_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/wikipedia_search.ts) - -Line 103. - -*** - -### updateSkillData - -Update this skill's namespaced data on a FunctionResult via updateGlobalData. - -#### Signature - -```typescript -updateSkillData( - result: FunctionResult, - data: Record -): FunctionResult -``` - -#### Parameters - - - The FunctionResult to update. - - - - The data to store under this skill's namespace. - - -#### Returns - -`FunctionResult` — The FunctionResult for chaining. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 462. - -*** - -### validateEnvVars - -Validate that all required environment variables declared on the skill class -are set in the current process environment. - -Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` -directly. TS reads the same static from the class. - -Returns the list of missing variable names so callers can produce actionable -error messages. This differs from Python's `validate_env_vars() -> bool` -return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/skills/builtin/wikipedia-search/wikipedia-search-skill#has-all-env-vars) is the boolean equivalent. - -#### Signature - -```typescript -validateEnvVars(): string[] -``` - -#### Returns - -`string[]` — Array of missing environment variable names (empty if all are present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 486. - -*** - -### validatePackages - -Validate that all required packages declared on the skill class can be imported. - -Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` -directly and tries `importlib.import_module(pkg)` for each; TS does the -equivalent with a dynamic `import()`. - -#### Signature - -```typescript -validatePackages(): Promise -``` - -#### Returns - -`Promise` — Array of package names that could not be imported (empty if all present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 557. - -## Source - -[`src/skills/builtin/wikipedia_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/wikipedia_search.ts) - -Line 55. diff --git a/fern/products/sdk-reference/typescript/skills/index.mdx b/fern/products/sdk-reference/typescript/skills/index.mdx deleted file mode 100644 index 554e849068..0000000000 --- a/fern/products/sdk-reference/typescript/skills/index.mdx +++ /dev/null @@ -1,25 +0,0 @@ ---- -slug: "/reference/typescript/skills" -title: "skills" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "module" - language: "typescript" - qualified_name: "skills" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/index.ts" ---- -# `skills` - -## Signature - -```typescript -module skills -``` - -## Source - -[`src/skills/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/index.ts) - -Line 1. diff --git a/fern/products/sdk-reference/typescript/skills/skill-base/index.mdx b/fern/products/sdk-reference/typescript/skills/skill-base/index.mdx deleted file mode 100644 index acec9a87d5..0000000000 --- a/fern/products/sdk-reference/typescript/skills/skill-base/index.mdx +++ /dev/null @@ -1,930 +0,0 @@ ---- -slug: "/reference/typescript/skills/skill-base" -title: "SkillBase" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "skills.SkillBase" - module: "skills" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts" ---- -# `SkillBase` - -Abstract base class for agent skills. - -Skills are modular, reusable capabilities that plug into an [AgentBase](/docs/sdk-reference/reference/typescript/agent-base). -A single skill can contribute: - -- **Tools** (SWAIG functions) via `getTools()` or `defineTool()` -- **Prompt sections** via `_getPromptSections()` -- **Speech hints** via `getHints()` -- **Global data** seeded into each call via `getGlobalData()` - -Skills are added to an agent with `agent.addSkill('name', config)` and the -[SkillManager](/docs/sdk-reference/reference/typescript/skills/skill-manager) calls `setAgent()` + `setup()` in sequence before the -agent starts serving requests. - -**Modifiers:** `abstract` - -## Signature - -```typescript -class SkillBase -``` - -## Examples - -```typescript -import { SkillBase, FunctionResult, type SkillToolDefinition } from '@signalwire/sdk'; - -export class GreetingSkill extends SkillBase { - static override SKILL_NAME = 'greeting'; - static override SKILL_DESCRIPTION = 'Responds with a configurable greeting.'; - - override getTools(): SkillToolDefinition[] { - return [{ - name: 'say_hello', - description: 'Say a friendly hello.', - parameters: { type: 'object', properties: {} }, - handler: () => new FunctionResult(this.getConfig('message', 'Hi!')), - }]; - } -} - -// In your agent: -agent.addSkill(new GreetingSkill({ message: 'Howdy!' })); -``` - -## See Also - -- \- \[SkillManager]\(/docs/sdk-reference/reference/typescript/skills/skill-manager) - \- \[SkillRegistry]\(/docs/sdk-reference/reference/typescript/skills/skill-registry) - \- \[AgentBase.addSkill]\(/docs/sdk-reference/reference/typescript/agent-base#add-skill) - -## Properties - - - Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. - - - - Configuration options provided at construction time. - - - - Unique identifier for this skill instance (includes timestamp and random bytes). - - - - Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. - - - - Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. - - - - Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. - - - - Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. - - - - Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. - - - - Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. - - - - The registered name of this skill type. - - - - Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. - - - - Additional SWAIG fields extracted from config, merged into tool definitions. - - -## Methods - -### cleanup - -Cleanup resources. Called when the skill is removed from an agent. - -#### Signature - -```typescript -cleanup(): Promise -``` - -#### Returns - -`Promise` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 469. - -*** - -### constructor - -Create a new skill instance. - -Python parity: `core/skill_base.py:32-43`. -Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` -is left as `None` on the subclass. TS throws the equivalent when the static -defaults haven't been overridden. - -#### Signature - -```typescript -constructor(config?: SkillConfig): SkillBase -``` - -#### Parameters - - - Optional configuration key-value pairs (Python: `params`). - - -#### Returns - -`SkillBase` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 282. - -*** - -### defineTool - -Imperatively register a tool with this skill. - -Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. -Merges `this.swaigFields` into the tool definition (explicit fields on -`toolDef` take precedence), then pushes the result into `_dynamicTools` -so the default `getTools()` returns it at SWML render time. - -Intended for skills whose tool shape depends on config evaluated at -`setup()` time. Skills with a static tool list should override -`getTools()` instead. - -#### Signature - -```typescript -defineTool(toolDef: SkillToolDefinition): void -``` - -#### Parameters - - - The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 351. - -*** - -### getAgent - -Return the agent that owns this skill, asserting it is non-null. -Equivalent to accessing `self.agent` in Python, where the agent reference -is always set before `setup()` is called. - -The SkillManager lifecycle guarantees that `setAgent()` is called before -`setup()`, so this method is safe to use inside `setup()` and in any -tool handler invoked during an active agent session. - -#### Signature - -```typescript -getAgent(): AgentBase -``` - -#### Returns - -`AgentBase` — The owning `AgentBase` instance. - -#### Throws - -- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 261. - -*** - -### getConfig - -Get a configuration value by key, falling back to a default if not set. - -#### Signature - -```typescript -getConfig(key: string, defaultValue?: T): T -``` - -#### Type Parameters - - - -#### Parameters - - - The configuration key to look up. - - - - Value to return if the key is not present. - - -#### Returns - -`T` — The configuration value cast to type T, or the default value. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 524. - -*** - -### getDataMapTools - -Optional DataMap-style tool definitions. Skills that build their own -SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them -here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. - -Python equivalent: the direct `self.agent.register_swaig_function(fn)` -call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). -Default returns `[]` — skills using only the declarative `getTools()` path -do not need to override this. - -#### Signature - -```typescript -getDataMapTools(): Record[] -``` - -#### Returns - -`Record[]` — Array of fully-built SWAIG function dicts. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 372. - -*** - -### getGlobalData - -Get global data to merge into the agent's global data store. - -#### Signature - -```typescript -getGlobalData(): Record -``` - -#### Returns - -`Record` — Key-value pairs to be merged into the agent's global data. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 410. - -*** - -### getHints - -Get speech recognition hints relevant to this skill. - -#### Signature - -```typescript -getHints(): string[] -``` - -#### Returns - -`string[]` — Array of hint strings to improve speech recognition accuracy. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 402. - -*** - -### getInstanceKey - -Get the instance key used for deduplication in the SkillManager. - -For single-instance skills (`SUPPORTS_MULTIPLE_INSTANCES = false`), returns -the skill name. For multi-instance skills, returns `${skillName}_${toolName}` -using the `tool_name` config (falls back to the skill name). - -Matches Python's `SkillBase.get_instance_key()` default (`skill_base.py:141-146`). -Multi-instance subclasses only need to override when their key derivation -depends on config beyond `tool_name`. - -#### Signature - -```typescript -getInstanceKey(): string -``` - -#### Returns - -`string` — A unique key identifying this skill instance. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 427. - -*** - -### getParameterSchema - -Get the parameter schema for this skill class, describing all accepted configuration options. -Subclasses should override and call `super.getParameterSchema()` to include base parameters. - -Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): -returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a -`tool_name` entry with `default: cls.SKILL_NAME` for classes with -`SUPPORTS_MULTIPLE_INSTANCES = true`. - -**Modifiers:** `static` - -#### Signature - -```typescript -getParameterSchema(): Record -``` - -#### Returns - -`Record` — Record mapping parameter names to their schema entries. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 183. - -*** - -### getPromptSections - -Get prompt sections to inject into the agent's system prompt. -Respects the `skip_prompt` config option — returns `[]` if set to `true`. -Subclasses should override `_getPromptSections()` instead of this method. - -#### Signature - -```typescript -getPromptSections(): SkillPromptSection[] -``` - -#### Returns - -`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 382. - -*** - -### getSkillData - -Read this skill's data from a raw call data object's global\_data. - -#### Signature - -```typescript -getSkillData(rawData: Record): Record -``` - -#### Parameters - - - The raw request data containing global\_data. - - -#### Returns - -`Record` — The skill's stored data, or an empty object if not found. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 450. - -*** - -### getSkillNamespace - -Get the namespaced key for storing per-skill data in global\_data. - -#### Signature - -```typescript -getSkillNamespace(): string -``` - -#### Returns - -`string` — A string like "skill:datetime" or "skill:my\_prefix". - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 440. - -*** - -### getTools - -Return the SWAIG tool definitions this skill provides. - -Default implementation returns tools registered imperatively via -`defineTool()`. Skills using the declarative pattern override this -method to return a static array built from their config. - -Python parity: replaces the `@abstractmethod register_tools()` contract -— Python skills call `self.define_tool(...)` inside `register_tools()`; -TypeScript skills either call `this.defineTool(...)` in `setup()` (and -let the default `getTools()` return them) or override `getTools()` -directly. - -#### Signature - -```typescript -getTools(): SkillToolDefinition[] -``` - -#### Returns - -`SkillToolDefinition[]` — Array of tool definitions to register with the agent. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 332. - -*** - -### hasAllEnvVars - -Check if all required environment variables are present. -Convenience wrapper around `validateEnvVars()` that returns a boolean, -matching the Python `validate_env_vars() -> bool` return type. - -#### Signature - -```typescript -hasAllEnvVars(): boolean -``` - -#### Returns - -`boolean` — `true` if all required env vars are set, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 544. - -*** - -### hasAllPackages - -Check if all required packages declared in the manifest are available. -Convenience wrapper around `validatePackages()` that returns a boolean, -matching the Python `validate_packages() -> bool` return type. - -#### Signature - -```typescript -hasAllPackages(): Promise -``` - -#### Returns - -`Promise` — `true` if all required packages are importable, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 579. - -*** - -### isInitialized - -Check if the skill has been initialized by the SkillManager. - -#### Signature - -```typescript -isInitialized(): boolean -``` - -#### Returns - -`boolean` — True if setup() has completed and the skill is marked initialized. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 507. - -*** - -### markInitialized - -Mark the skill as initialized (called by SkillManager). - -#### Signature - -```typescript -markInitialized(): void -``` - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 514. - -*** - -### setAgent - -Set the agent reference for this skill. -Called by the SkillManager/AgentBase when the skill is attached to an agent. -Python equivalent: `self.agent = agent` in `__init__`. - -#### Signature - -```typescript -setAgent(agent: AgentBase): void -``` - -#### Parameters - - - The agent that owns this skill. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 534. - -*** - -### setup - -Setup the skill. Called when the skill is added to an agent. -Override to perform initialization (API connections, config validation, etc.) - -#### Signature - -```typescript -setup(): Promise -``` - -#### Returns - -`Promise` — `true` if setup succeeded, `false` otherwise. Python equivalent: abstract `setup() -> bool`. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 313. - -*** - -### updateSkillData - -Update this skill's namespaced data on a FunctionResult via updateGlobalData. - -#### Signature - -```typescript -updateSkillData( - result: FunctionResult, - data: Record -): FunctionResult -``` - -#### Parameters - - - The FunctionResult to update. - - - - The data to store under this skill's namespace. - - -#### Returns - -`FunctionResult` — The FunctionResult for chaining. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 462. - -*** - -### validateEnvVars - -Validate that all required environment variables declared on the skill class -are set in the current process environment. - -Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` -directly. TS reads the same static from the class. - -Returns the list of missing variable names so callers can produce actionable -error messages. This differs from Python's `validate_env_vars() -> bool` -return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/skills/skill-base#has-all-env-vars) is the boolean equivalent. - -#### Signature - -```typescript -validateEnvVars(): string[] -``` - -#### Returns - -`string[]` — Array of missing environment variable names (empty if all are present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 486. - -*** - -### validatePackages - -Validate that all required packages declared on the skill class can be imported. - -Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` -directly and tries `importlib.import_module(pkg)` for each; TS does the -equivalent with a dynamic `import()`. - -#### Signature - -```typescript -validatePackages(): Promise -``` - -#### Returns - -`Promise` — Array of package names that could not be imported (empty if all present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 557. - -## Interfaces - -### ParameterSchemaEntry - -Schema entry describing a single skill configuration parameter. - -#### Signature - -```typescript -interface ParameterSchemaEntry -``` - -#### Properties - - - Default value used when the parameter is not provided. - - - - Human-readable description of the parameter. - - - - Allowed values for the parameter. - - - - Environment variable that can supply this parameter's value. - - - - Whether the parameter should be hidden from user-facing output (e.g., API keys). - - - - Item schema for array-type parameters. - - - - Maximum value (for numeric types). - - - - Minimum value (for numeric types). - - - - Whether the parameter must be supplied. - - - - JSON Schema type of the parameter value. - - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 61. - -*** - -### SkillConfig - -Configuration key-value pairs passed to a skill at construction time. - -#### Signature - -```typescript -interface SkillConfig -``` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 15. - -*** - -### SkillPromptSection - -A section of prompt content injected into the agent's system prompt by a skill. - -#### Signature - -```typescript -interface SkillPromptSection -``` - -#### Properties - - - Optional body text for the section. - - - - Optional bullet points appended after the body. - - - - If true, render bullets as a numbered list instead of unordered. - - - - Section heading displayed in the prompt. - - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 49. - -*** - -### SkillToolDefinition - -Definition of a SWAIG tool provided by a skill. - -#### Signature - -```typescript -interface SkillToolDefinition -``` - -#### Properties - - - Human-readable description of what the tool does, shown to the AI. - - - - Filler phrases spoken while the tool executes, keyed by language. - - - - Handler function invoked when the tool is called. - - - - When true, the SignalWire platform automatically invokes this tool when the call ends (hangup), regardless of whether the AI explicitly calls it. Equivalent to Python's `is_hangup_hook=True` in `define_tool()`. The flag is serialised as `"is_hangup_hook": true` in the SWAIG JSON. - - - - Unique tool name used in SWAIG function registration. - - - - Parameter schema for the tool, keyed by parameter name. - - - - List of parameter names that are required. - - - - Whether the tool requires secure (authenticated) invocation. - - - - If true, suppress filler phrases while the tool executes. - - - - If true, wait for any in-flight fillers to complete before executing the tool. - - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 20. - -## Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 125. diff --git a/fern/products/sdk-reference/typescript/skills/skill-manager/index.mdx b/fern/products/sdk-reference/typescript/skills/skill-manager/index.mdx deleted file mode 100644 index eca7d252c3..0000000000 --- a/fern/products/sdk-reference/typescript/skills/skill-manager/index.mdx +++ /dev/null @@ -1,531 +0,0 @@ ---- -slug: "/reference/typescript/skills/skill-manager" -title: "SkillManager" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "skills.SkillManager" - module: "skills" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillManager.ts" ---- -# `SkillManager` - -Manages the lifecycle of skills attached to an agent. - -Handles loading, unloading, validation, and aggregation of skill tools, -hints, global data, and prompt sections. - -**Remarks:** **Architectural note — push vs pull model:** -Python's `SkillManager.__init__(self, agent)` stores the agent reference and -uses a **push model**: when a skill is loaded via `load_skill()`, the manager -immediately calls `agent.add_hints()`, `agent.update_global_data()`, and -`agent.prompt_add_section()` to inject skill data into the agent. - -This TypeScript implementation uses a **pull model** instead: `SkillManager` -has no agent reference and no constructor. `AgentBase` owns the manager and -calls `getAllHints()`, `getMergedGlobalData()`, and `getAllPromptSections()` -at render time. Both approaches produce the same observable behavior at the -SWML / SWAIG level. The pull model avoids circular-reference issues between -`AgentBase` and `SkillManager` and is better suited to TypeScript's -import-graph constraints. - -## Signature - -```typescript -class SkillManager -``` - -## Properties - - - Public read-only view of all loaded skill instances, keyed by instance key. Python equivalent: `self.loaded_skills` (public `Dict[str, SkillBase]`). Use this to iterate or inspect loaded skills without mutating the internal map. - - - - Get the number of currently loaded skill instances. - - -## Methods - -### addSkill - -Add a skill to the manager, validating env vars and calling setup(). -Uses the skill's instance key for deduplication. - -[loadSkill](/docs/sdk-reference/reference/typescript/skills/skill-manager#load-skill) / [loadSkillByName](/docs/sdk-reference/reference/typescript/skills/skill-manager#load-skill-by-name) wrap this and catch to return -`[false, msg]`, matching Python `load_skill`'s return contract -(`skill_manager.py` lines 114-118). - -#### Signature - -```typescript -addSkill(skill: SkillBase): Promise -``` - -#### Parameters - - - The skill instance to add. - - -#### Returns - -`Promise` — Resolves once the skill is registered. - -#### Throws - -- When a single-instance skill is already loaded, its required environment variables are missing, its parameter schema is empty, its required packages cannot be imported, or `setup()` returns `false`. - -#### Source - -[`src/skills/SkillManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillManager.ts) - -Line 74. - -*** - -### clear - -Remove all skills and clean up. - -#### Signature - -```typescript -clear(): Promise -``` - -#### Returns - -`Promise` - -#### Source - -[`src/skills/SkillManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillManager.ts) - -Line 412. - -*** - -### constructor - -#### Signature - -```typescript -constructor(): SkillManager -``` - -#### Returns - -`SkillManager` - -*** - -### getAllHints - -Aggregate speech recognition hints from all loaded skills. - -#### Signature - -```typescript -getAllHints(): string[] -``` - -#### Returns - -`string[]` — Combined array of all skill hint strings. - -#### Source - -[`src/skills/SkillManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillManager.ts) - -Line 369. - -*** - -### getAllPromptSections - -Aggregate prompt sections from all loaded skills. - -#### Signature - -```typescript -getAllPromptSections(): SkillPromptSection[] -``` - -#### Returns - -`SkillPromptSection[]` — Combined array of all skill prompt sections. - -#### Source - -[`src/skills/SkillManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillManager.ts) - -Line 357. - -*** - -### getAllTools - -Aggregate tool definitions from all loaded skills. - -#### Signature - -```typescript -getAllTools(): SkillToolDefinition[] -``` - -#### Returns - -`SkillToolDefinition[]` — Combined array of all skill tool definitions. - -#### Source - -[`src/skills/SkillManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillManager.ts) - -Line 345. - -*** - -### getLoadedSkillEntries - -Get metadata for all loaded skills, enabling ephemeral copy re-instantiation. - -#### Signature - -```typescript -getLoadedSkillEntries(): { config: SkillConfig; SkillClass: typeof SkillBase; skillName: string }[] -``` - -#### Returns - -`{ config: SkillConfig; SkillClass: typeof SkillBase; skillName: string }[]` — Array of entries containing skill name, class constructor, and config. - -#### Source - -[`src/skills/SkillManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillManager.ts) - -Line 401. - -*** - -### getMergedGlobalData - -Merge global data from all loaded skills into a single object. - -#### Signature - -```typescript -getMergedGlobalData(): Record -``` - -#### Returns - -`Record` — Combined global data (later skills override earlier ones on key conflicts). - -#### Source - -[`src/skills/SkillManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillManager.ts) - -Line 381. - -*** - -### getSkill - -Get a skill by its instance key or instance ID. - -#### Signature - -```typescript -getSkill(keyOrId: string): SkillBase | undefined -``` - -#### Parameters - - - The instance key or instance ID to look up. - - -#### Returns - -`SkillBase | undefined` — The skill instance, or undefined if not found. - -#### Source - -[`src/skills/SkillManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillManager.ts) - -Line 319. - -*** - -### hasSkill - -Check if any skill instance with the given name is currently loaded. - -#### Signature - -```typescript -hasSkill(skillName: string): boolean -``` - -#### Parameters - - - The skill name to check for. - - -#### Returns - -`boolean` — True if at least one instance with this name is loaded. - -#### Source - -[`src/skills/SkillManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillManager.ts) - -Line 196. - -*** - -### hasSkillByKey - -Check if a skill with the given instance key is currently loaded. -This matches Python's `has_skill` semantics, which performs a direct -dictionary key lookup (`skill_identifier in self.loaded_skills`). - -Use `hasSkill(name)` to check by skill name (iterates values). -Use `hasSkillByKey(key)` to check by instance key (direct map lookup). - -**Remarks:** Equivalent to Python's `has_skill(skill_identifier)`. Callers porting -from Python should change `skill_manager.has_skill(key)` → -`skillManager.hasSkillByKey(key)`. - -#### Signature - -```typescript -hasSkillByKey(instanceKey: string): boolean -``` - -#### Parameters - - - The instance key to look up. - - -#### Returns - -`boolean` — True if a skill with this exact instance key is loaded. - -#### Source - -[`src/skills/SkillManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillManager.ts) - -Line 218. - -*** - -### listSkillKeys - -List the instance keys of all currently loaded skills. -Python equivalent: `list_loaded_skills() -> List[str]` which returns -`list(self.loaded_skills.keys())`. - -Use `listSkills()` for richer objects (name, instanceId, initialized). -Use `listSkillKeys()` for a flat list of instance key strings. - -**Remarks:** Equivalent to Python's `list_loaded_skills()`. Callers porting from -Python should change `skill_manager.list_loaded_skills()` → -`skillManager.listSkillKeys()`. - -#### Signature - -```typescript -listSkillKeys(): string[] -``` - -#### Returns - -`string[]` — Array of instance key strings. - -#### Source - -[`src/skills/SkillManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillManager.ts) - -Line 310. - -*** - -### listSkills - -List all loaded skill instances with their name, ID, and initialization state. - -#### Signature - -```typescript -listSkills(): { initialized: boolean; instanceId: string; name: string }[] -``` - -#### Returns - -`{ initialized: boolean; instanceId: string; name: string }[]` — Array of skill summary objects. - -#### Source - -[`src/skills/SkillManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillManager.ts) - -Line 333. - -*** - -### loadSkill - -Load a skill by providing the class constructor directly, bypassing the registry. -This is the TypeScript equivalent of Python's `load_skill(skill_name, skill_class, params)` -path where a caller-provided `skill_class` is used instead of a registry lookup. - -**Remarks:** Equivalent to Python's `load_skill(skill_name, skill_class=MySkillClass, params)`. - -#### Signature - -```typescript -loadSkill( - skillClass: typeof SkillBase, - config?: SkillConfig -): Promise<[boolean, string]> -``` - -#### Parameters - - - The skill class constructor (a subclass of `SkillBase`). - - - - Optional configuration to pass to the skill constructor. - - -#### Returns - -`Promise<[boolean, string]>` — A tuple `[success, errorMessage]` matching Python's `load_skill` return contract. `errorMessage` is an empty string on success. - -#### Examples - -```typescript -const [ok, err] = await manager.loadSkill(MyCustomSkill, { api_key: 'secret' }); -if (!ok) console.error(err); -``` - -#### Source - -[`src/skills/SkillManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillManager.ts) - -Line 240. - -*** - -### loadSkillByName - -Load a skill by name from the global SkillRegistry, construct it, and add it. -This is the TypeScript equivalent of Python's `load_skill(skill_name)` path -where `skill_class=None` triggers a registry lookup. - -**Remarks:** Equivalent to Python's `load_skill(skill_name)` (registry path, where -`skill_class=None`). Callers porting from Python should change -`skill_manager.load_skill(name)` → `skillManager.loadSkillByName(name)`. - -#### Signature - -```typescript -loadSkillByName( - skillName: string, - config?: SkillConfig -): Promise<[boolean, string]> -``` - -#### Parameters - - - The registered skill name to look up in the SkillRegistry. - - - - Optional configuration to pass to the skill factory. - - -#### Returns - -`Promise<[boolean, string]>` — A tuple `[success, errorMessage]` matching Python's `load_skill` return contract. `errorMessage` is an empty string on success. - -#### Source - -[`src/skills/SkillManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillManager.ts) - -Line 270. - -*** - -### removeSkill - -Remove a skill by its instance key or instance ID, calling cleanup() before removal. - -**Remarks:** Equivalent to Python's `unload_skill(skill_identifier)`. Callers porting -from Python should change `skill_manager.unload_skill(id)` → -`skillManager.removeSkill(id)`. - -#### Signature - -```typescript -removeSkill(keyOrId: string): Promise -``` - -#### Parameters - - - The instance key or instance ID of the skill to remove. - - -#### Returns - -`Promise` — True if the skill was found and removed, false otherwise. - -#### Source - -[`src/skills/SkillManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillManager.ts) - -Line 148. - -*** - -### removeSkillByName - -Remove all skill instances matching a given skill name. - -#### Signature - -```typescript -removeSkillByName(skillName: string): Promise -``` - -#### Parameters - - - The skill name to match against. - - -#### Returns - -`Promise` — The number of skill instances removed. - -#### Source - -[`src/skills/SkillManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillManager.ts) - -Line 178. - -## Source - -[`src/skills/SkillManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillManager.ts) - -Line 45. diff --git a/fern/products/sdk-reference/typescript/skills/skill-name/index.mdx b/fern/products/sdk-reference/typescript/skills/skill-name/index.mdx deleted file mode 100644 index 3fbd7487ea..0000000000 --- a/fern/products/sdk-reference/typescript/skills/skill-name/index.mdx +++ /dev/null @@ -1,93 +0,0 @@ ---- -slug: "/reference/typescript/skills/skill-name" -title: "SkillName" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "module" - language: "typescript" - qualified_name: "skills.SkillName" - module: "skills" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillName.ts" ---- -# `SkillName` - -## Signature - -```typescript -module SkillName -``` - -## Type Aliases - -### SkillName - -Built-in skill names as a typed, compile-time-checked closed set. - -The 19 names below are exactly the `SKILL_NAME` declared by each built-in -skill class in `src/skills/builtin/` (the same set -[registerBuiltinSkills](/docs/sdk-reference/reference/typescript/skills/builtin#register-builtin-skills) locks into the global `SkillRegistry`). - -[AgentBase.addSkillByName](/docs/sdk-reference/reference/typescript/agent-base#add-skill-by-name) and [AgentBase.hasSkill](/docs/sdk-reference/reference/typescript/agent-base#has-skill) accept this -union OR any string (`SkillName | (string & {})`): - -- The union gives editor autocompletion for the built-ins and makes a typo - (`'datetiem'`) a **compile-time** error rather than a runtime/server - failure. -- The `string & {}` arm widens the parameter back to `string` at the type - level, so it still accepts custom / third-party skill names AND keeps - parity with the Python reference (whose `add_skill` / `has_skill` take a - bare `str`). It is a no-op at runtime — TypeScript erases types, so the - value passed on the wire is the identical string either way. - -#### Signature - -```typescript -type SkillName = "api_ninjas_trivia" | "ask_claude" | "claude_skills" | "custom_skills" | "datasphere" | "datasphere_serverless" | "datetime" | "google_maps" | "info_gatherer" | "joke" | "math" | "mcp_gateway" | "native_vector_search" | "play_background_file" | "spider" | "swml_transfer" | "weather_api" | "web_search" | "wikipedia_search" -``` - -#### Examples - -```typescript -await agent.addSkillByName('datetime'); // autocompleted built-in -agent.hasSkill('datetime'); // true -await agent.addSkillByName('my_custom_one'); // open set: custom names OK -// await agent.addSkillByName('datetiem'); // ✗ compile error (typo) -``` - -#### Source - -[`src/skills/SkillName.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillName.ts) - -Line 28. - -*** - -### SkillNameOrString - -A skill-name parameter: one of the typed built-in [SkillName](/docs/sdk-reference/reference/typescript/skills/skill-name#skill-name) values -(autocompleted + typo-checked) or any other string (custom / third-party -skills, and parity with Python's bare `str`). - -The `(string & {})` arm preserves string literal autocompletion for the -union members while still widening to accept arbitrary strings; it is purely -a type-level annotation and has no runtime effect. - -#### Signature - -```typescript -type SkillNameOrString = SkillName | string & object -``` - -#### Source - -[`src/skills/SkillName.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillName.ts) - -Line 58. - -## Source - -[`src/skills/SkillName.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillName.ts) - -Line 1. diff --git a/fern/products/sdk-reference/typescript/skills/skill-registry/index.mdx b/fern/products/sdk-reference/typescript/skills/skill-registry/index.mdx deleted file mode 100644 index bd566f9846..0000000000 --- a/fern/products/sdk-reference/typescript/skills/skill-registry/index.mdx +++ /dev/null @@ -1,652 +0,0 @@ ---- -slug: "/reference/typescript/skills/skill-registry" -title: "SkillRegistry" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "skills.SkillRegistry" - module: "skills" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts" ---- -# `SkillRegistry` - -Global singleton registry for registering and instantiating skills. - -Skills can be registered programmatically via `register(SkillClass)`. -Matches Python's `skill_registry` global (`skills/registry.py:481`). - -## Signature - -```typescript -class SkillRegistry -``` - -## Properties - - - Get the number of registered skills. - - -## Methods - -### addSearchPath - -Add a directory path to search during skill discovery. - -#### Signature - -```typescript -addSearchPath(path: string): void -``` - -#### Parameters - - - Absolute path to a directory containing skill files. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) - -Line 224. - -*** - -### addSkillDirectory - -Add a directory to search for skills. - -Mirrors Python's -`signalwire.skills.registry.SkillRegistry.add_skill_directory` -(`registry.py:350-375`): validate that the path exists and is a -directory, then append it (de-duplicated) to `externalPaths`. Throws -`Error` (the JS analog of Python's `ValueError`) for non-existent -paths or non-directories. Distinct from `addSearchPath`, which -silently accepts anything; `addSkillDirectory` is the strict -Python-parity surface and the recommended entry point for -registering third-party skill directories. - -#### Signature - -```typescript -addSkillDirectory(path: string): void -``` - -#### Parameters - - - Absolute or relative path to a directory containing skill subdirectories. - - -#### Returns - -`void` - -#### Throws - -- Error when the path doesn't exist or isn't a directory. - -#### Source - -[`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) - -Line 247. - -*** - -### clear - -Clear all registrations. - -#### Signature - -```typescript -clear(): void -``` - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) - -Line 408. - -*** - -### constructor - -#### Signature - -```typescript -constructor(): SkillRegistry -``` - -#### Returns - -`SkillRegistry` - -#### Source - -[`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) - -Line 69. - -*** - -### create - -Create a new skill instance by looking up its class in the registry. -Matches Python's `skill_manager.load_skill(name)` class-lookup + instantiate -flow (`skill_manager.py:97`: `skill_instance = skill_class(self.agent, params)`). - -#### Signature - -```typescript -create(name: string, config?: SkillConfig): SkillBase | null -``` - -#### Parameters - - - The registered skill name. - - - - Optional configuration to pass to the skill constructor. - - -#### Returns - -`SkillBase | null` — A new skill instance, or null if the name is not registered. - -#### Source - -[`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) - -Line 163. - -*** - -### discoverAll - -Discover and register skills from all configured search paths. - -#### Signature - -```typescript -discoverAll(): Promise -``` - -#### Returns - -`Promise` — Array of all newly discovered skill names. - -#### Source - -[`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) - -Line 338. - -*** - -### discoverFromDirectory - -Discover and register skills from a directory by importing each file. -Looks for SkillBase subclass exports and registers them. - -#### Signature - -```typescript -discoverFromDirectory(dirPath: string): Promise -``` - -#### Parameters - - - Absolute path to the directory to scan. - - -#### Returns - -`Promise` — Array of newly discovered skill names. - -#### Source - -[`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) - -Line 282. - -*** - -### getAllSkillsSchema - -Get combined schema info for all registered skills. - -#### Signature - -```typescript -getAllSkillsSchema(): Record -``` - -#### Returns - -`Record` — Record mapping skill names to their schema info. - -#### Source - -[`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) - -Line 372. - -*** - -### getExternalPaths - -Returns a copy of the external skill directories registered via -[addSkillDirectory](/docs/sdk-reference/reference/typescript/add-skill-directory). Parity surface for Python's -`_external_paths`. - -#### Signature - -```typescript -getExternalPaths(): string[] -``` - -#### Returns - -`string[]` - -#### Source - -[`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) - -Line 264. - -*** - -### getInstance - -Get the global singleton instance, creating it on first access. - -**Modifiers:** `static` - -#### Signature - -```typescript -getInstance(): SkillRegistry -``` - -#### Returns - -`SkillRegistry` — The shared SkillRegistry instance. - -#### Source - -[`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) - -Line 78. - -*** - -### getSearchPaths - -Get all configured search paths for skill discovery. - -#### Signature - -```typescript -getSearchPaths(): string[] -``` - -#### Returns - -`string[]` — Copy of the search paths array. - -#### Source - -[`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) - -Line 272. - -*** - -### getSkillClass - -Get the registered skill class by name. Matches Python's -`get_skill_class(skill_name)` (`registry.py:196-203`). - -#### Signature - -```typescript -getSkillClass(name: string): typeof SkillBase | undefined -``` - -#### Parameters - - - The registered skill name. - - -#### Returns - -`typeof SkillBase | undefined` — The skill class reference, or undefined if not registered. - -#### Source - -[`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) - -Line 181. - -*** - -### getSkillSchema - -Get the combined schema info for a registered skill. -Matches Python `get_all_skills_schema` per-skill shape -(`registry.py:287-295`). - -#### Signature - -```typescript -getSkillSchema(name: string): SkillSchemaInfo | undefined -``` - -#### Parameters - - - The registered skill name to query. - - -#### Returns - -`SkillSchemaInfo | undefined` — The skill's schema info, or undefined if not found. - -#### Source - -[`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) - -Line 354. - -*** - -### has - -Check if a skill name is registered. - -#### Signature - -```typescript -has(name: string): boolean -``` - -#### Parameters - - - The skill name to check. - - -#### Returns - -`boolean` — True if the skill is registered. - -#### Source - -[`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) - -Line 190. - -*** - -### listAllSkillSources - -Group registered skill names by source category. Matches Python's -`list_all_skill_sources` (`skills/registry.py:436-478`). - -Current TS implementation treats every registered skill as "registered" -(the only category that fits — filesystem-based discovery is optional -and entry-points don't apply to Node the way they do to Python). - -#### Signature - -```typescript -listAllSkillSources(): Record -``` - -#### Returns - -`Record` — Record mapping source categories to arrays of skill names. - -#### Source - -[`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) - -Line 391. - -*** - -### listRegistered - -List all registered skill names. - -#### Signature - -```typescript -listRegistered(): string[] -``` - -#### Returns - -`string[]` — Array of registered skill name strings. - -#### Source - -[`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) - -Line 198. - -*** - -### listSkills - -List all registered skills with their full metadata. Matches Python's -`list_skills()` shape (`registry.py:205-227`) plus TS-idiomatic -camelCase keys. - -#### Signature - -```typescript -listSkills(): SkillSchemaInfo[] -``` - -#### Returns - -`SkillSchemaInfo[]` — Array of skill metadata objects. - -#### Source - -[`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) - -Line 208. - -*** - -### lock - -Lock one or more skill names to prevent overwriting. -If called with no arguments, locks all currently registered skills. - -#### Signature - -```typescript -lock(names?: string[]): void -``` - -#### Parameters - - - Skill names to lock; if omitted, all current names are locked. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) - -Line 138. - -*** - -### register - -Register a skill class. The skill name is read from the class's static -`SKILL_NAME`. Mirrors Python's `register_skill(skill_class)` -(`skills/registry.py:132-194`) — including the schema-non-empty check -and the protection against overwriting locked skills. - -#### Signature - -```typescript -register(SkillClass: typeof SkillBase): void -``` - -#### Parameters - - - A concrete subclass of `SkillBase` with a non-empty `SKILL_NAME`. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) - -Line 101. - -*** - -### resetInstance - -Reset the global singleton (for testing). - -**Modifiers:** `static` - -#### Signature - -```typescript -resetInstance(): void -``` - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) - -Line 88. - -*** - -### unregister - -Unregister a skill by name, removing it from the registry. - -#### Signature - -```typescript -unregister(name: string): boolean -``` - -#### Parameters - - - The skill name to unregister. - - -#### Returns - -`boolean` — True if the skill was found and removed. - -#### Source - -[`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) - -Line 150. - -## Interfaces - -### SkillSchemaInfo - -Metadata exposed for a registered skill. Shape matches Python's -`SkillRegistry.list_skills()` / `get_all_skills_schema()` return values -(`skills/registry.py:205-227`, `229-296`). - -#### Signature - -```typescript -interface SkillSchemaInfo -``` - -#### Properties - - - Human-readable description (from `SkillBase.SKILL_DESCRIPTION`). - - - - The skill's registered name (from `SkillBase.SKILL_NAME`). - - - - Full parameter schema with types, defaults, and constraints. - - - - Environment variables required by the skill. - - - - NPM packages required by the skill. - - - - Optional source category for grouping (e.g., "builtin", "external"). - - - - Whether this skill supports multiple simultaneous instances. - - - - Semantic version string (from `SkillBase.SKILL_VERSION`). - - -#### Source - -[`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) - -Line 28. - -## Source - -[`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) - -Line 55. diff --git a/fern/products/sdk-reference/typescript/ssl-config/index.mdx b/fern/products/sdk-reference/typescript/ssl-config/index.mdx deleted file mode 100644 index d009291d4e..0000000000 --- a/fern/products/sdk-reference/typescript/ssl-config/index.mdx +++ /dev/null @@ -1,257 +0,0 @@ ---- -slug: "/reference/typescript/ssl-config" -title: "SslConfig" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "SslConfig" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/SslConfig.ts" ---- -# `SslConfig` - -Manages SSL/TLS configuration sourced from explicit options or environment variables. - -## Signature - -```typescript -class SslConfig -``` - -## Properties - - - Filesystem path to the PEM certificate, or null if unset. - - - - Domain name for HSTS, or null if unset. - - - - Whether SSL is enabled. - - - - Whether HSTS headers should be emitted. - - - - HSTS max-age value in seconds. - - - - Filesystem path to the PEM private key, or null if unset. - - -## Methods - -### constructor - -Create an SslConfig, falling back to environment variables for any unset options. - -#### Signature - -```typescript -constructor(opts?: SslOptions): SslConfig -``` - -#### Parameters - - - Optional SSL configuration overrides. - - -#### Returns - -`SslConfig` - -#### Source - -[`src/SslConfig.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SslConfig.ts) - -Line 48. - -*** - -### getCert - -Read the PEM certificate file from disk. - -#### Signature - -```typescript -getCert(): string | null -``` - -#### Returns - -`string | null` — The certificate contents, or null if the file is missing. - -#### Source - -[`src/SslConfig.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SslConfig.ts) - -Line 71. - -*** - -### getHstsHeader - -Build the Strict-Transport-Security header value. - -#### Signature - -```typescript -getHstsHeader(): string | null -``` - -#### Returns - -`string | null` — The HSTS header string, or null if HSTS is disabled or SSL is off. - -#### Source - -[`src/SslConfig.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SslConfig.ts) - -Line 89. - -*** - -### getKey - -Read the PEM private key file from disk. - -#### Signature - -```typescript -getKey(): string | null -``` - -#### Returns - -`string | null` — The key contents, or null if the file is missing. - -#### Source - -[`src/SslConfig.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SslConfig.ts) - -Line 80. - -*** - -### getServerOptions - -Create the options object needed by Node.js `https.createServer()`. - -#### Signature - -```typescript -getServerOptions(): { cert: string; key: string } | null -``` - -#### Returns - -`{ cert: string; key: string } | null` — An object with `cert` and `key` strings, or null if either file is missing. - -#### Source - -[`src/SslConfig.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SslConfig.ts) - -Line 98. - -*** - -### hstsMiddleware - -Return a Hono middleware that appends the HSTS header to every response. - -#### Signature - -```typescript -hstsMiddleware(): (c: any, next: () => Promise) => Promise -``` - -#### Returns - -`(c: any, next: () => Promise) => Promise` — A Hono-compatible middleware function. - -#### Source - -[`src/SslConfig.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SslConfig.ts) - -Line 109. - -*** - -### isConfigured - -Check whether SSL is fully configured: enabled with both cert and key files present on disk. - -#### Signature - -```typescript -isConfigured(): boolean -``` - -#### Returns - -`boolean` — True if SSL is enabled and both certificate and key files exist. - -#### Source - -[`src/SslConfig.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SslConfig.ts) - -Line 61. - -## Interfaces - -### SslOptions - -Configuration options for SSL/TLS setup. - -#### Signature - -```typescript -interface SslOptions -``` - -#### Properties - - - Filesystem path to the PEM-encoded certificate. - - - - Domain name used for HSTS headers. - - - - Whether SSL is enabled. - - - - Whether to send HSTS headers; defaults to true. - - - - HSTS max-age in seconds; defaults to 31536000 (1 year). - - - - Filesystem path to the PEM-encoded private key. - - -#### Source - -[`src/SslConfig.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SslConfig.ts) - -Line 14. - -## Source - -[`src/SslConfig.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SslConfig.ts) - -Line 30. diff --git a/fern/products/sdk-reference/typescript/swaig-function/index.mdx b/fern/products/sdk-reference/typescript/swaig-function/index.mdx deleted file mode 100644 index 10e4ca26bf..0000000000 --- a/fern/products/sdk-reference/typescript/swaig-function/index.mdx +++ /dev/null @@ -1,328 +0,0 @@ ---- -slug: "/reference/typescript/swaig-function" -title: "SwaigFunction" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "SwaigFunction" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/SwaigFunction.ts" ---- -# `SwaigFunction` - -A SWAIG function — exactly the same concept as a "tool" in native -OpenAI / Anthropic tool calling. - -Each SwaigFunction is rendered, on every LLM turn, into the OpenAI -tool schema: - -```json -{ -"type": "function", -"function": { -"name": "", -"description": "", -"parameters": { "type": "object", "properties": { ... } } -} -} -``` - -The `name`, `description`, and every per-parameter `description` inside -`parameters` are **read by the model** and directly determine whether -the model picks this tool when a matching user request comes in. -They are prompt engineering, not developer comments. - -## Signature - -```typescript -class SwaigFunction -``` - -## Properties - - - LLM-facing description. Tells the model WHEN to call this tool. A vague description is the #1 cause of "model has the tool but doesn't call it" failures. - - - - Additional fields included in the SWAIG definition output. - - - - Language-keyed filler phrases spoken while the tool executes. - - - - The handler function called when the tool is invoked. - - - - Whether this tool is externally hosted (has a webhookUrl). - - - - Whether this tool uses a typed handler with named parameters. - - - - Unique name — read by the LLM; use snake\_case verbs. - - - - JSON Schema properties describing the tool's parameters. Each property's `description` field is ALSO LLM-facing — it tells the model HOW to extract that argument from the user's utterance. - - - - List of required parameter names. - - - - Whether this tool requires session token authentication. - - - - Audio file URL to play while waiting for the tool to complete. - - - - Number of times to loop the wait file. - - - - External webhook URL; set when the tool is externally hosted. - - -## Methods - -### constructor - -Create a new SwaigFunction. - -#### Signature - -```typescript -constructor(opts: SwaigFunctionOptions): SwaigFunction -``` - -#### Parameters - - - Configuration options for the SWAIG function. Use `opts.extraFields` to pass any additional SWAIG-only fields (e.g. `meta_data_token`, `web_hook_auth_user`, `web_hook_auth_password`). This mirrors the Python constructor's `**extra_swaig_fields` kwargs: both are merged directly into the serialized SWAIG definition, so the wire format is identical — only the call-site syntax differs. - - -#### Returns - -`SwaigFunction` - -#### Source - -[`src/SwaigFunction.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwaigFunction.ts) - -Line 138. - -*** - -### execute - -Invoke the handler with the given arguments and return a serialized result. - -#### Signature - -```typescript -execute( - args: Record, - rawData?: Record -): Promise> -``` - -#### Parameters - - - Parsed arguments from the AI. - - - - The full raw request payload. - - -#### Returns - -`Promise>` — A serialized result dictionary suitable for the SWAIG response. - -#### Source - -[`src/SwaigFunction.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwaigFunction.ts) - -Line 213. - -*** - -### toSwaig - -Serialize this function to the SWAIG wire format for inclusion in SWML. - -#### Signature - -```typescript -toSwaig( - baseUrl: string, - token?: string, - callId?: string -): Record -``` - -#### Parameters - - - The base URL of the agent server. - - - - Optional session token for secure functions. - - - - Optional call ID for secure function URLs. - - -#### Returns - -`Record` — A SWAIG function definition object. - -#### Source - -[`src/SwaigFunction.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwaigFunction.ts) - -Line 257. - -*** - -### validateArgs - -Validate arguments against the parameter JSON schema using full -JSON Schema Draft-7 validation (via ajv). - -Mirrors Python's `validate_args` which tries `jsonschema_rs` (Rust-based -Draft-7 validator) then falls back to `jsonschema` (pure Python Draft-7). -All JSON Schema constraint keywords are honoured: `required`, `type`, -`minLength`, `maxLength`, `pattern`, `format`, `minimum`, `maximum`, -`enum`, `anyOf`, `oneOf`, `$ref`, nested object/array validation, etc. - -If the schema has no properties, validation is skipped and the args are -considered valid — matching Python's early-return path. - -#### Signature - -```typescript -validateArgs(args: Record): [boolean, string[]] -``` - -#### Parameters - - - Arguments to validate. - - -#### Returns - -`[boolean, string[]]` — A tuple of `[isValid, errors]`. When no validation is needed (empty schema), returns `[true, []]`. - -#### Source - -[`src/SwaigFunction.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwaigFunction.ts) - -Line 186. - -## Type Aliases - -### SwaigHandler - -Handler function for a SWAIG tool invocation. - -#### Signature - -```typescript -type SwaigHandler = (args: Record, rawData: Record) => FunctionResult | Record | string | Promise | string> -``` - -#### Source - -[`src/SwaigFunction.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwaigFunction.ts) - -Line 19. - -## Interfaces - -### SwaigFunctionOptions - -Configuration options for creating a SwaigFunction. - -#### Signature - -```typescript -interface SwaigFunctionOptions -``` - -#### Properties - - - Human-readable description of what the tool does, shown to the AI. - - - - Additional fields to merge directly into the SWAIG function definition. **Python equivalent:** `**extra_swaig_fields` kwargs on the constructor. In Python these are passed as bare keyword arguments and merged directly into the output dict via `function_def.update(self.extra_swaig_fields)`. In TypeScript the same fields are collected under this single options key and merged identically in `toSwaig()` — the wire format is identical. - - - - Language-keyed filler phrases spoken while the tool executes. - - - - The handler function called when the tool is invoked. - - - - Whether this tool uses a typed handler with named parameters. - - - - Unique name used to register and invoke this tool. - - - - JSON Schema properties describing the tool's parameters. - - - - List of required parameter names. - - - - Whether this tool requires session token authentication. - - - - Audio file URL to play while waiting for the tool to complete. - - - - Number of times to loop the wait file. - - - - External webhook URL; makes this an externally-hosted tool. - - -#### Source - -[`src/SwaigFunction.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwaigFunction.ts) - -Line 25. - -## Source - -[`src/SwaigFunction.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwaigFunction.ts) - -Line 92. diff --git a/fern/products/sdk-reference/typescript/swml-builder/index.mdx b/fern/products/sdk-reference/typescript/swml-builder/index.mdx deleted file mode 100644 index 84d967d7de..0000000000 --- a/fern/products/sdk-reference/typescript/swml-builder/index.mdx +++ /dev/null @@ -1,1639 +0,0 @@ ---- -slug: "/reference/typescript/swml-builder" -title: "SwmlBuilder" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "SwmlBuilder" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlBuilder.ts" ---- -# `SwmlBuilder` - -Builds SWML documents composed of verb instructions organized into named sections. - -Verb methods (`.answer()`, `.play()`, `.hangup()`, `.transfer()`, etc.) are -auto-installed from the bundled SWML schema and all return `this` for fluent chaining. - -Most users don't instantiate `SwmlBuilder` directly — `AgentBase` uses it internally -and exposes higher-level helpers. Use this class directly for `SWMLService` (non-AI -call flows) or to hand-craft SWML returned from a route handler. - -## Signature - -```typescript -class SwmlBuilder -``` - -## Examples - -```typescript -import { SwmlBuilder } from '@signalwire/sdk'; - -const swml = new SwmlBuilder() - .answer() - .play({ url: 'https://cdn.example.com/greeting.mp3' }) - .hangup() - .build(); - -// swml is JSON ready to return from a SignalWire webhook. -``` - -## See Also - -- \- \[SWMLService]\(/docs/sdk-reference/reference/typescript/swml-service) — HTTP service that serves a built SWML document - \- \[AgentBase]\(/docs/sdk-reference/reference/typescript/agent-base) — for AI-driven call flows - -## Properties - - - Public read-only accessor for the underlying SWML document. Provides direct access to the document, equivalent to the Python SDK's `service` property on `SWMLBuilder`. - - -## Methods - -### addSection - -Creates a new empty named section in the document. -If the section already exists, this is a no-op. -Matches Python SDK's `add_section(section_name)`. - -#### Signature - -```typescript -addSection(sectionName: string): this -``` - -#### Parameters - - - The name of the section to create. - - -#### Returns - -`this` — this for fluent chaining. - -#### Source - -[`src/SwmlBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlBuilder.ts) - -Line 247. - -*** - -### addVerb - -Appends a verb to the main section. -Validates the verb config against the schema when validation is enabled. - -#### Signature - -```typescript -addVerb(verbName: string, config: unknown): void -``` - -#### Parameters - - - The SWML verb name (e.g., "answer", "ai"). - - - - The verb's configuration payload. - - -#### Returns - -`void` - -#### Source - -[`src/SwmlBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlBuilder.ts) - -Line 187. - -*** - -### addVerbToSection - -Appends a verb to a named section, creating the section if it does not exist. - -#### Signature - -```typescript -addVerbToSection(sectionName: string, verbName: string, config: unknown): void -``` - -#### Parameters - - - The target section name. - - - - The SWML verb name. - - - - The verb's configuration payload. - - -#### Returns - -`void` - -#### Source - -[`src/SwmlBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlBuilder.ts) - -Line 206. - -*** - -### ai - -Creates an AI agent that conducts voice conversations using automatic speech recognition (ASR), large language models (LLMs), and text-to-speech (TTS) synthesis. The agent processes caller speech in real-time, generates contextually appropriate responses, and can execute custom functions to interact with external systems through SignalWire AI Gateway (SWAIG). - -#### Signature - -```typescript -ai(config?: AiVerbConfig): this -``` - -#### Parameters - - - -#### Returns - -`this` - -#### Source - -[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) - -Line 50. - -*** - -### amazon\_bedrock - -Creates a new Bedrock AI Agent - -#### Signature - -```typescript -amazon_bedrock(config?: unknown): this -``` - -#### Parameters - - - -#### Returns - -`this` - -#### Source - -[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) - -Line 52. - -*** - -### answer - -Answer incoming call and set an optional maximum duration. - -#### Signature - -```typescript -answer(config?: { ...4 fields }): this -``` - -#### Parameters - - - - - - - - - - - -#### Returns - -`this` - -#### Source - -[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) - -Line 44. - -*** - -### build - -Alias for [getDocument](/docs/sdk-reference/reference/typescript/swml-builder#get-document). Matches the Python SDK's `build()` method. -Build and return the SWML document as a dictionary/object. - -#### Signature - -```typescript -build(): Record -``` - -#### Returns - -`Record` — The document with version and sections. - -#### Source - -[`src/SwmlBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlBuilder.ts) - -Line 268. - -*** - -### cond - -Execute a sequence of instructions depending on the value of a JavaScript condition. - -#### Signature - -```typescript -cond(config?: Record): this -``` - -#### Parameters - - - -#### Returns - -`this` - -#### Source - -[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) - -Line 54. - -*** - -### connect - -Dial a SIP URI or phone number. - -#### Signature - -```typescript -connect(config: Record): this -``` - -#### Parameters - - - -#### Returns - -`this` - -#### Source - -[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) - -Line 56. - -*** - -### constructor - -Creates a new SwmlBuilder. - -#### Signature - -```typescript -constructor(opts?: SwmlBuilderOptions): SwmlBuilder -``` - -#### Parameters - - - Optional configuration. - - -#### Returns - -`SwmlBuilder` - -#### Source - -[`src/SwmlBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlBuilder.ts) - -Line 73. - -*** - -### denoise - -Start noise reduction. You can stop it at any time using `stop_denoise`. - -#### Signature - -```typescript -denoise(config?: Record): this -``` - -#### Parameters - - - -#### Returns - -`this` - -#### Source - -[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) - -Line 58. - -*** - -### detect\_machine - -A detection method that combines AMD (Answering Machine Detection) and fax detection. Detect whether the user on the other end of the call is a machine (fax, voicemail, etc.) or a human. The detection result(s) will be sent to the specified status\_url as a POST request and will also be saved in the detect\_result variable. - -#### Signature - -```typescript -detect_machine(config?: { ...11 fields }): this -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - -#### Returns - -`this` - -#### Source - -[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) - -Line 217. - -*** - -### enter\_queue - -Place the current call in a named queue where it will wait to be connected to an available agent or resource. While waiting, callers will hear music or custom audio. When an agent connects to the queue (using the connect method), the caller and agent are bridged together. After the bridge completes, execution continues with the SWML script specified in transfer\_after\_bridge. - -#### Signature - -```typescript -enter_queue(config?: unknown): this -``` - -#### Parameters - - - -#### Returns - -`this` - -#### Source - -[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) - -Line 60. - -*** - -### execute - -Execute a specified section or URL as a subroutine, and upon completion, return to the current document. Use the return statement to pass any return values or objects back to the current document. - -#### Signature - -```typescript -execute(config: { ...5 fields }): this -``` - -#### Parameters - - - - - - - - - - - - - -#### Returns - -`this` - -#### Source - -[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) - -Line 62. - -*** - -### getDocument - -Returns the raw SWML document object. - -#### Signature - -```typescript -getDocument(): Record -``` - -#### Returns - -`Record` — The document with version and sections. - -#### Source - -[`src/SwmlBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlBuilder.ts) - -Line 258. - -*** - -### getSchemaUtils - -Get or create the shared SchemaUtils singleton. -Exposed for use by the type generator and tests. - -**Modifiers:** `static` - -#### Signature - -```typescript -getSchemaUtils(): SchemaUtils -``` - -#### Returns - -`SchemaUtils` - -#### Source - -[`src/SwmlBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlBuilder.ts) - -Line 125. - -*** - -### goto - -Jump to a label within the current section, optionally based on a condition. The goto method will only navigate to a label within the same section. - -#### Signature - -```typescript -goto(config: { ...3 fields }): this -``` - -#### Parameters - - - - - - - - - -#### Returns - -`this` - -#### Source - -[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) - -Line 69. - -*** - -### hangup - -End the call with an optional reason. - -#### Signature - -```typescript -hangup(config?: { ...1 fields }): this -``` - -#### Parameters - - - - - -#### Returns - -`this` - -#### Source - -[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) - -Line 82. - -*** - -### join\_conference - -Join an ad-hoc audio conference started on either the SignalWire or Compatibility API. This method allows you to connect the current call to a named conference where multiple participants can communicate simultaneously. - -#### Signature - -```typescript -join_conference(config?: unknown): this -``` - -#### Parameters - - - -#### Returns - -`this` - -#### Source - -[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) - -Line 88. - -*** - -### join\_room - -Join a RELAY room. If the room doesn't exist, it creates a new room. - -#### Signature - -```typescript -join_room(config: { ...1 fields }): this -``` - -#### Parameters - - - - - -#### Returns - -`this` - -#### Source - -[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) - -Line 85. - -*** - -### label - -Mark any point of the SWML section with a label so that goto can jump to it. - -#### Signature - -```typescript -label(value: string): this -``` - -#### Parameters - - - -#### Returns - -`this` - -#### Source - -[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) - -Line 74. - -*** - -### live\_transcribe - -Start live transcription of the call. The transcription will be sent to the specified webhook URL. - -#### Signature - -```typescript -live_transcribe(config: { ...1 fields }): this -``` - -#### Parameters - - - - - -#### Returns - -`this` - -#### Source - -[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) - -Line 76. - -*** - -### live\_translate - -Start live translation of the call. The translation will be sent to the specified webhook URL. - -#### Signature - -```typescript -live_translate(config: { ...1 fields }): this -``` - -#### Parameters - - - - - -#### Returns - -`this` - -#### Source - -[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) - -Line 79. - -*** - -### pay - -Enables secure payment processing during voice calls. When implemented, it manages the entire payment flow including data collection, validation, and processing through your configured payment gateway. - -#### Signature - -```typescript -pay(config: { ...18 fields }): this -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -#### Returns - -`this` - -#### Source - -[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) - -Line 197. - -*** - -### play - -Play file(s), ringtones, speech or silence. - -#### Signature - -```typescript -play(config?: PlayVerbConfig): this -``` - -#### Parameters - - - -#### Returns - -`this` - -#### Source - -[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) - -Line 90. - -*** - -### prompt - -Play a prompt and wait for input. The input can be received either as digits from the keypad, or from speech, or both depending on what parameters are set. By default, only digit input is enabled. To enable speech input, set at least one speech parameter. To enable both digit and speech input, set at least one parameter for each. - -#### Signature - -```typescript -prompt(config: { ...15 fields }): this -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -#### Returns - -`this` - -#### Source - -[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) - -Line 92. - -*** - -### receive\_fax - -Receive a fax being delivered to this call. - -#### Signature - -```typescript -receive_fax(config?: { ...1 fields }): this -``` - -#### Parameters - - - - - -#### Returns - -`this` - -#### Source - -[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) - -Line 109. - -*** - -### record - -Record the call audio in the foreground, pausing further SWML execution until recording ends. Use this, for example, to record voicemails. To record calls in the background in a non-blocking fashion, use the record\_call method. - -#### Signature - -```typescript -record(config?: { ...10 fields }): this -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - -#### Returns - -`this` - -#### Source - -[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) - -Line 112. - -*** - -### record\_call - -Record call in the background. Unlike the record method, the record\_call method will start the recording and continue executing the SWML script while allowing the recording to happen in the background. To stop call recordings started with record\_call, use the stop\_record\_call method. - -#### Signature - -```typescript -record_call(config?: { ...11 fields }): this -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - -#### Returns - -`this` - -#### Source - -[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) - -Line 124. - -*** - -### render - -Alias for [renderDocument](/docs/sdk-reference/reference/typescript/swml-builder#render-document). Matches the Python SDK's `render()` method. -Build and render the SWML document as a JSON string. - -#### Signature - -```typescript -render(): string -``` - -#### Returns - -`string` — The JSON-encoded SWML document. - -#### Source - -[`src/SwmlBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlBuilder.ts) - -Line 286. - -*** - -### renderDocument - -Serializes the SWML document to a JSON string. - -#### Signature - -```typescript -renderDocument(): string -``` - -#### Returns - -`string` — The JSON-encoded SWML document. - -#### Source - -[`src/SwmlBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlBuilder.ts) - -Line 276. - -*** - -### request - -Send a GET, POST, PUT, or DELETE request to a remote URL. - -#### Signature - -```typescript -request(config: { ...7 fields }): this -``` - -#### Parameters - - - - - - - - - - - - - - - - - -#### Returns - -`this` - -#### Source - -[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) - -Line 137. - -*** - -### reset - -Resets the document to an empty SWML structure. - -#### Signature - -```typescript -reset(): this -``` - -#### Returns - -`this` — this for fluent chaining. - -#### Source - -[`src/SwmlBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlBuilder.ts) - -Line 176. - -*** - -### return - -Return a value from an execute call or exit the script. The value can be any type. - -#### Signature - -```typescript -return(config?: unknown): this -``` - -#### Parameters - - - -#### Returns - -`this` - -#### Source - -[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) - -Line 146. - -*** - -### say - -Add a 'play' verb with say: prefix for text-to-speech. -Convenience wrapper matching Python SDK's `say()` method. - -#### Signature - -```typescript -say(text: string, opts?: { ...4 fields }): this -``` - -#### Parameters - - - Text to speak. - - - - Optional TTS parameters (voice, language, gender, volume). - - - - - - - - - - -#### Returns - -`this` — this for fluent chaining. - -#### Source - -[`src/SwmlBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlBuilder.ts) - -Line 221. - -*** - -### send\_digits - -Send digit presses as DTMF tones. - -#### Signature - -```typescript -send_digits(config: { ...1 fields }): this -``` - -#### Parameters - - - - - -#### Returns - -`this` - -#### Source - -[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) - -Line 148. - -*** - -### send\_fax - -Send a fax. - -#### Signature - -```typescript -send_fax(config: { ...4 fields }): this -``` - -#### Parameters - - - - - - - - - - - -#### Returns - -`this` - -#### Source - -[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) - -Line 151. - -*** - -### send\_sms - -Send an outbound SMS or MMS message to a PSTN phone number. - -#### Signature - -```typescript -send_sms(config: number | Record): this -``` - -#### Parameters - - - -#### Returns - -`this` - -#### Source - -[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) - -Line 157. - -*** - -### set - -Set script variables to the specified values. Accepts an object mapping variable names to values. Variables set using set can be removed using unset. - -#### Signature - -```typescript -set(config?: Record): this -``` - -#### Parameters - - - -#### Returns - -`this` - -#### Source - -[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) - -Line 159. - -*** - -### setValidation - -Enable or disable verb schema validation at runtime. -Matches the Python `schema_validation` constructor parameter on AgentBase. - -#### Signature - -```typescript -setValidation(enabled: boolean): void -``` - -#### Parameters - - - True to enable validation, false to disable. - - -#### Returns - -`void` - -#### Source - -[`src/SwmlBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlBuilder.ts) - -Line 113. - -*** - -### sip\_refer - -Send SIP REFER to a SIP call. - -#### Signature - -```typescript -sip_refer(config: { ...4 fields }): this -``` - -#### Parameters - - - - - - - - - - - -#### Returns - -`this` - -#### Source - -[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) - -Line 163. - -*** - -### sleep - -Pause execution for a specified duration. - -#### Signature - -```typescript -sleep(durationOrConfig: number | { duration: number }): this -``` - -#### Parameters - - - -#### Returns - -`this` - -#### Source - -[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) - -Line 161. - -*** - -### stop\_denoise - -Stop noise reduction that was started with denoise. - -#### Signature - -```typescript -stop_denoise(config?: Record): this -``` - -#### Parameters - - - -#### Returns - -`this` - -#### Source - -[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) - -Line 169. - -*** - -### stop\_record\_call - -Stop an active background recording. - -#### Signature - -```typescript -stop_record_call(config?: { ...1 fields }): this -``` - -#### Parameters - - - - - -#### Returns - -`this` - -#### Source - -[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) - -Line 171. - -*** - -### stop\_tap - -Stop an active tap stream. - -#### Signature - -```typescript -stop_tap(config?: { ...1 fields }): this -``` - -#### Parameters - - - - - -#### Returns - -`this` - -#### Source - -[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) - -Line 174. - -*** - -### switch - -Execute different instructions based on a variable's value. - -#### Signature - -```typescript -switch(config: { ...3 fields }): this -``` - -#### Parameters - - - - - - - - - -#### Returns - -`this` - -#### Source - -[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) - -Line 177. - -*** - -### tap - -Start background call tap. Media is streamed over Websocket or RTP to customer controlled URI. - -#### Signature - -```typescript -tap(config: { ...6 fields }): this -``` - -#### Parameters - - - - - - - - - - - - - - - -#### Returns - -`this` - -#### Source - -[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) - -Line 182. - -*** - -### transfer - -Transfer the execution of the script to a different SWML section, URL, or Relay application. Once the transfer is complete, the script will continue executing SWML from the new location. - -#### Signature - -```typescript -transfer(config: { ...3 fields }): this -``` - -#### Parameters - - - - - - - - - -#### Returns - -`this` - -#### Source - -[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) - -Line 190. - -*** - -### unset - -Unset specified variables. The variables may have been set using the set method or as a byproduct of other statements or methods. Accepts a single variable name as a string or an array of variable names. - -#### Signature - -```typescript -unset(config: number | Record): this -``` - -#### Parameters - - - -#### Returns - -`this` - -#### Source - -[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) - -Line 195. - -*** - -### user\_event - -Allows the user to set and send events to the connected client on the call. This is useful for triggering actions on the client side. Commonly used with the [browser-sdk](https://developer.signalwire.com/sdks/reference/browser-sdk/SignalWire%20Client/). The event object can be any valid JSON object. Any key-value pair in the object is sent to the client as an event type called `user_event`. - -#### Signature - -```typescript -user_event(config: { ...1 fields }): this -``` - -#### Parameters - - - - - -#### Returns - -`this` - -#### Source - -[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) - -Line 230. - -## Interfaces - -### SwmlBuilderOptions - -Options for constructing a SwmlBuilder. - -#### Signature - -```typescript -interface SwmlBuilderOptions -``` - -#### Properties - - - When false, disables verb schema validation. Defaults to true unless `SWML_SKIP_SCHEMA_VALIDATION=true` is set in the environment. - - - - An initial SWML document to seed the builder with, enabling document injection. When provided, the builder uses this document instead of creating an empty one. This mirrors the Python SDK's pattern of injecting an SWMLService instance. - - - - Optional path to a custom SWML schema JSON file. When set, the builder uses a per-instance SchemaUtils loaded from this path instead of the bundled schema. Mirrors Python's `schema_path` constructor parameter on `SWMLService`/`AgentBase`. - - -#### Source - -[`src/SwmlBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlBuilder.ts) - -Line 19. - -## Source - -[`src/SwmlBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlBuilder.ts) - -Line 59. diff --git a/fern/products/sdk-reference/typescript/swml-handler/ai-verb-handler/index.mdx b/fern/products/sdk-reference/typescript/swml-handler/ai-verb-handler/index.mdx deleted file mode 100644 index f85f833ae8..0000000000 --- a/fern/products/sdk-reference/typescript/swml-handler/ai-verb-handler/index.mdx +++ /dev/null @@ -1,140 +0,0 @@ ---- -slug: "/reference/typescript/swml-handler/ai-verb-handler" -title: "AIVerbHandler" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "SWMLHandler.AIVerbHandler" - parent: "SWMLHandler" - module: "SWMLHandler" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLHandler.ts" ---- -# `AIVerbHandler` - -Handler for the SWML 'ai' verb. - -## Signature - -```typescript -class AIVerbHandler extends SWMLVerbHandler -``` - -## Inheritance - -**Extends:** [SWMLVerbHandler](/docs/sdk-reference/reference/typescript/swml-handler/swml-verb-handler) - -## Methods - -### buildConfig - -Build a configuration for the AI verb. - -Requires exactly one of `promptText` or `promptPom` (mutually exclusive). -Throws an `Error` if both or neither are provided. - -Extra keys in `opts` are routed as follows: - -- `languages`, `hints`, `pronounce`, `globalData` / `global_data` are placed at the top level of the config. -- All other extra keys are placed into `config.params`. - -#### Signature - -```typescript -buildConfig(opts: AIVerbBuildOptions = {}): Record -``` - -#### Parameters - - - Build options for the AI verb configuration. - - -#### Returns - -`Record` — AI verb configuration dictionary. - -#### Source - -[`src/SWMLHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLHandler.ts) - -Line 167. - -*** - -### constructor - -#### Signature - -```typescript -constructor(): AIVerbHandler -``` - -#### Returns - -`AIVerbHandler` - -*** - -### getVerbName - -Get the name of the verb this handler handles. - -#### Signature - -```typescript -getVerbName(): string -``` - -#### Returns - -`string` — "ai" as the verb name. - -#### Source - -[`src/SWMLHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLHandler.ts) - -Line 90. - -*** - -### validateConfig - -Validate the configuration for the AI verb. - -Checks that: - -- `prompt` is present and is an object -- `prompt` contains exactly one of `text` or `pom` (mutually exclusive) -- `prompt.contexts`, if present, is an object -- `SWAIG`, if present, is an object - -#### Signature - -```typescript -validateConfig(config: Record): [boolean, string[]] -``` - -#### Parameters - - - The configuration dictionary for the AI verb. - - -#### Returns - -`[boolean, string[]]` — A \[isValid, errorMessages] tuple. - -#### Source - -[`src/SWMLHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLHandler.ts) - -Line 106. - -## Source - -[`src/SWMLHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLHandler.ts) - -Line 85. diff --git a/fern/products/sdk-reference/typescript/swml-handler/index.mdx b/fern/products/sdk-reference/typescript/swml-handler/index.mdx deleted file mode 100644 index b0d5da11b6..0000000000 --- a/fern/products/sdk-reference/typescript/swml-handler/index.mdx +++ /dev/null @@ -1,85 +0,0 @@ ---- -slug: "/reference/typescript/swml-handler" -title: "SWMLHandler" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "module" - language: "typescript" - qualified_name: "SWMLHandler" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLHandler.ts" ---- -# `SWMLHandler` - -## Signature - -```typescript -module SWMLHandler -``` - -## Classes - - - - Handler for the SWML 'ai' verb. - - - - Abstract base class for pluggable SWML verb handlers. - - - - Registry for SWML verb handlers. - - - -## Interfaces - -### AIVerbBuildOptions - -Options accepted by [AIVerbHandler.buildConfig](/docs/sdk-reference/reference/typescript/swml-handler/ai-verb-handler#build-config). - -#### Signature - -```typescript -interface AIVerbBuildOptions -``` - -#### Properties - - - Optional contexts and steps configuration (can be combined with text or pom). - - - - Optional post-prompt text. - - - - Optional URL for post-prompt processing. - - - - POM structure for the AI prompt (mutually exclusive with promptText). - - - - Text prompt for the AI (mutually exclusive with promptPom). - - - - Optional SWAIG configuration. - - -#### Source - -[`src/SWMLHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLHandler.ts) - -Line 67. - -## Source - -[`src/SWMLHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLHandler.ts) - -Line 1. diff --git a/fern/products/sdk-reference/typescript/swml-handler/swml-verb-handler/index.mdx b/fern/products/sdk-reference/typescript/swml-handler/swml-verb-handler/index.mdx deleted file mode 100644 index 2eae3a8cb6..0000000000 --- a/fern/products/sdk-reference/typescript/swml-handler/swml-verb-handler/index.mdx +++ /dev/null @@ -1,150 +0,0 @@ ---- -slug: "/reference/typescript/swml-handler/swml-verb-handler" -title: "SWMLVerbHandler" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "SWMLHandler.SWMLVerbHandler" - parent: "SWMLHandler" - module: "SWMLHandler" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLHandler.ts" ---- -# `SWMLVerbHandler` - -Abstract base class for pluggable SWML verb handlers. - -Each concrete handler owns one verb name and provides validate/build -logic for that verb's configuration. Subclass this to create handlers -for custom or complex SWML verbs that require specialized handling -beyond generic schema-driven validation. - -**Modifiers:** `abstract` - -## Signature - -```typescript -class SWMLVerbHandler -``` - -## Examples - -```typescript -class MyVerbHandler extends SWMLVerbHandler { - getVerbName(): string { return 'my_verb'; } - validateConfig(config: Record): [boolean, string[]] { - const errors: string[] = []; - if (!config['url']) errors.push("Missing required field 'url'"); - return [errors.length === 0, errors]; - } - buildConfig(opts: Record): Record { - return { url: opts['url'] }; - } -} -``` - -## Methods - -### buildConfig - -Build a configuration object for this verb from the provided arguments. - -**Modifiers:** `abstract` - -#### Signature - -```typescript -buildConfig(opts: Record): Record -``` - -#### Parameters - - - Key-value arguments specific to this verb. - - -#### Returns - -`Record` — A configuration dictionary ready for inclusion in a SWML document. - -#### Source - -[`src/SWMLHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLHandler.ts) - -Line 63. - -*** - -### constructor - -#### Signature - -```typescript -constructor(): SWMLVerbHandler -``` - -#### Returns - -`SWMLVerbHandler` - -*** - -### getVerbName - -Get the name of the SWML verb this handler handles. - -**Modifiers:** `abstract` - -#### Signature - -```typescript -getVerbName(): string -``` - -#### Returns - -`string` — The verb name as a string (e.g. "ai", "play"). - -#### Source - -[`src/SWMLHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLHandler.ts) - -Line 48. - -*** - -### validateConfig - -Validate the configuration for this verb. - -**Modifiers:** `abstract` - -#### Signature - -```typescript -validateConfig(config: Record): [boolean, string[]] -``` - -#### Parameters - - - The configuration dictionary for this verb. - - -#### Returns - -`[boolean, string[]]` — A `[isValid, errorMessages]` tuple where `isValid` is `true` when the config is valid and `errorMessages` lists any issues found. - -#### Source - -[`src/SWMLHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLHandler.ts) - -Line 56. - -## Source - -[`src/SWMLHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLHandler.ts) - -Line 43. diff --git a/fern/products/sdk-reference/typescript/swml-handler/verb-handler-registry/index.mdx b/fern/products/sdk-reference/typescript/swml-handler/verb-handler-registry/index.mdx deleted file mode 100644 index 37556782ae..0000000000 --- a/fern/products/sdk-reference/typescript/swml-handler/verb-handler-registry/index.mdx +++ /dev/null @@ -1,157 +0,0 @@ ---- -slug: "/reference/typescript/swml-handler/verb-handler-registry" -title: "VerbHandlerRegistry" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "SWMLHandler.VerbHandlerRegistry" - parent: "SWMLHandler" - module: "SWMLHandler" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLHandler.ts" ---- -# `VerbHandlerRegistry` - -Registry for SWML verb handlers. - -This class maintains a registry of handlers for special SWML verbs -and provides methods for accessing and using them. The "ai" verb handler -([AIVerbHandler](/docs/sdk-reference/reference/typescript/swml-handler/ai-verb-handler)) is registered automatically on construction. - -## Signature - -```typescript -class VerbHandlerRegistry -``` - -## Examples - -```typescript -const registry = new VerbHandlerRegistry(); - -// The "ai" handler is already registered -registry.hasHandler('ai'); // true - -// Register a custom handler -registry.registerHandler(new MyCustomVerbHandler()); - -// Look up a handler -const handler = registry.getHandler('ai'); -if (handler) { - const [valid, errors] = handler.validateConfig(config); -} -``` - -## Methods - -### constructor - -Initialize the registry with default handlers. - -#### Signature - -```typescript -constructor(): VerbHandlerRegistry -``` - -#### Returns - -`VerbHandlerRegistry` - -#### Source - -[`src/SWMLHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLHandler.ts) - -Line 267. - -*** - -### getHandler - -Get the handler for a specific verb. - -#### Signature - -```typescript -getHandler(verbName: string): SWMLVerbHandler | undefined -``` - -#### Parameters - - - The name of the verb (e.g. "ai"). - - -#### Returns - -`SWMLVerbHandler | undefined` — The handler if found, or `undefined` otherwise. - -#### Source - -[`src/SWMLHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLHandler.ts) - -Line 286. - -*** - -### hasHandler - -Check if a handler exists for a specific verb. - -#### Signature - -```typescript -hasHandler(verbName: string): boolean -``` - -#### Parameters - - - The name of the verb. - - -#### Returns - -`boolean` — `true` if a handler is registered for the verb, `false` otherwise. - -#### Source - -[`src/SWMLHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLHandler.ts) - -Line 295. - -*** - -### registerHandler - -Register a new verb handler, replacing any existing handler for the same verb name. - -#### Signature - -```typescript -registerHandler(handler: SWMLVerbHandler): void -``` - -#### Parameters - - - The handler to register. - - -#### Returns - -`void` - -#### Source - -[`src/SWMLHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLHandler.ts) - -Line 276. - -## Source - -[`src/SWMLHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLHandler.ts) - -Line 263. diff --git a/fern/products/sdk-reference/typescript/swml-service/index.mdx b/fern/products/sdk-reference/typescript/swml-service/index.mdx deleted file mode 100644 index 47842bbc13..0000000000 --- a/fern/products/sdk-reference/typescript/swml-service/index.mdx +++ /dev/null @@ -1,1380 +0,0 @@ ---- -slug: "/reference/typescript/swml-service" -title: "SWMLService" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "SWMLService" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts" ---- -# `SWMLService` - -HTTP service that serves non-AI SWML documents built from verb methods. - -Use `SWMLService` when you need a SignalWire call flow but don't need AI — -plain call routing, IVR-style trees, recording workflows, static playback, etc. -For AI-powered voice agents, use [AgentBase](/docs/sdk-reference/reference/typescript/agent-base) instead. - -## Signature - -```typescript -class SWMLService -``` - -## Examples - -```typescript -import { SWMLService } from '@signalwire/sdk'; - -const service = new SWMLService({ name: 'greeter', route: '/', port: 3000 }); -service.builder - .answer() - .play({ url: 'https://cdn.example.com/welcome.mp3' }) - .hangup(); - -await service.serve(); -``` - -## See Also - -- \- \[SwmlBuilder]\(/docs/sdk-reference/reference/typescript/swml-builder) — the underlying SWML document builder - \- \[AgentBase]\(/docs/sdk-reference/reference/typescript/agent-base) — AI-powered alternative - -## Properties - - - - - - - Domain name for SSL. Mirrors Python's `self.domain`. - - - - Check if full JSON Schema validation is enabled. Mirrors Python's `@property full_validation_enabled`. - - - - Host the server binds to. - - - - Structured logger, exposed for subclass access. Mirrors Python's public `self.log`. - - - - Service display name. - - - - - - Port the server binds to. - - - - HTTP route path. - - - - Schema validation utilities. Mirrors Python's `self.schema_utils`. - - - - Unified security configuration. Mirrors Python's `self.security`. - - - - Path to SSL certificate. Mirrors Python's `self.ssl_cert_path`. - - - - Whether SSL is enabled. Mirrors Python's `self.ssl_enabled`. - - - - Path to SSL private key. Mirrors Python's `self.ssl_key_path`. - - - - - - - - Custom verb handler registry. Mirrors Python's `self.verb_registry`. - - -## Classes - - - - Unified security configuration. Mirrors Python SDK's `SecurityConfig` — reads from env vars and optional config file. - - - - Registry for custom SWML verb handlers. Mirrors Python SDK's `VerbHandlerRegistry`. - - - -## Methods - -### addSection - -Add a new named section to the SWML document. -Mirrors Python's `add_section()`. - -#### Signature - -```typescript -addSection(sectionName: string): this -``` - -#### Parameters - - - Name of the section to create. - - -#### Returns - -`this` — This service for chaining. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 653. - -*** - -### addVerb - -Add a verb to the SWML document. - -#### Signature - -```typescript -addVerb(name: string, config: unknown): this -``` - -#### Parameters - - - Verb name (e.g., 'answer', 'play', 'hangup'). - - - - Verb configuration. - - -#### Returns - -`this` — This service for chaining. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 642. - -*** - -### addVerbToSection - -Add a verb to a specific named section. -Mirrors Python's `add_verb_to_section()`. - -#### Signature - -```typescript -addVerbToSection(sectionName: string, verbName: string, config: unknown): this -``` - -#### Parameters - - - Target section name (auto-created if missing). - - - - Verb name. - - - - Verb configuration. - - -#### Returns - -`this` — This service for chaining. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 669. - -*** - -### asRouter - -Alias for `getApp()`. Provided for cross-SDK consistency with Python's -`as_router()` method — allows Python callers porting to TypeScript to use -the familiar name without changes. - -#### Signature - -```typescript -asRouter(): Hono -``` - -#### Returns - -`Hono` — The configured Hono app. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 908. - -*** - -### buildSwmlForRequest - -Service-side SWML-builder hook. Subclasses return a `SwmlBuilder` -to fully replace the document for this request, or `null` to fall -through to `setOnRequestCallback` or the static builder. - -This is distinct from the WebMixin `onRequest(requestData, -callbackPath)` hook on AgentBase (which mirrors Python's -`on_request -> on_swml_request` modification-merge contract). -Use this hook when you want to swap the entire SWML builder; use -`onRequest` / `onSwmlRequest` on AgentBase when you want to merge -targeted modifications into the rendered document. - -Default implementation returns `null` (no-op). - -#### Signature - -```typescript -buildSwmlForRequest( - _queryParams: Record, - _bodyParams: Record, - _headers: Record, - _callbackPath?: string -): SwmlBuilder | null -``` - -#### Parameters - - - - - - - - - -#### Returns - -`SwmlBuilder | null` — A `SwmlBuilder` whose document is sent as the response, or `null` to delegate to the next handler in the chain. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 834. - -*** - -### constructor - - - **Deprecated.** Prefer passing an options object with a required `name`. The no-arg form defaults name to 'swml-service'. - - -#### Signature - - - - ```typescript - constructor(opts: SWMLServiceOptions): SWMLService - ``` - - - - ```typescript - constructor(opts?: Partial): SWMLService - ``` - - - -#### Parameters (Overload 1) - - - -#### Parameters (Overload 2) - - - -#### Returns (Overload 1) - -`SWMLService` - -#### Returns (Overload 2) - -`SWMLService` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 263. - -*** - -### defineTool - -Define a SWAIG function the AI can call. Tool descriptions and -parameter descriptions are LLM-facing prompt engineering — see -PORTING\_GUIDE for guidance on writing them. - -Accepts the full SwaigFunctionOptions surface so AgentBase's richer -call sites (fillers, secure tokens, wait files, extra fields) work -without overriding this method on the subclass. - -#### Signature - -```typescript -defineTool(opts: SwaigFunctionOptions): this -``` - -#### Parameters - - - -#### Returns - -`this` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 465. - -*** - -### extractSipUsername - -Extract the SIP username from a request body's call.to field. -Mirrors Python's `@staticmethod extract_sip_username()`. - -**Modifiers:** `static` - -#### Signature - -```typescript -extractSipUsername(requestBody: Record): string | null -``` - -#### Parameters - - - The parsed request body containing call information. - - -#### Returns - -`string | null` — The extracted SIP username, or null if not found. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 787. - -*** - -### getAllFunctions - -Snapshot of all registered SWAIG functions keyed by name. -(Python parity: `ToolRegistry.get_all_functions`.) - -#### Signature - -```typescript -getAllFunctions(): Record> -``` - -#### Returns - -`Record>` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 529. - -*** - -### getApp - -Get the Hono application for mounting or testing. -This is the TypeScript equivalent of Python's `as_router()`, which returns -a FastAPI `APIRouter`. Both expose the underlying app/router so callers can -mount it into a larger framework. Use `asRouter()` when porting Python code -that calls `as_router()` directly. - -#### Signature - -```typescript -getApp(): Hono -``` - -#### Returns - -`Hono` — The configured Hono app. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 898. - -*** - -### getBasicAuthCredentials - -Get the basic-auth credentials used by this service. -Mirrors Python's `get_basic_auth_credentials()`. - -#### Signature - - - - ```typescript - getBasicAuthCredentials(includeSource?: false): [string, string] - ``` - - - - ```typescript - getBasicAuthCredentials( - includeSource: true - ): [string, string, "provided" | "environment" | "generated"] - ``` - - - -#### Parameters (Overload 1) - - - When true, a third element indicating the credential source is appended. - - -#### Parameters (Overload 2) - - - When true, a third element indicating the credential source is appended. - - -#### Returns (Overload 1) - -`[string, string]` — A tuple of \[username, password] or \[username, password, source]. - -#### Returns (Overload 2) - -`[string, string, "provided" | "environment" | "generated"]` — A tuple of \[username, password] or \[username, password, source]. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 863. - -*** - -### getBuilder - -Get the underlying SwmlBuilder for direct manipulation. - -#### Signature - -```typescript -getBuilder(): SwmlBuilder -``` - -#### Returns - -`SwmlBuilder` — The SwmlBuilder instance. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 632. - -*** - -### getDocument - -Get the SWML document as a dictionary. -Alias for `renderSwml()` that matches Python's `get_document()` name. - -#### Signature - -```typescript -getDocument(): Record -``` - -#### Returns - -`Record` — The SWML document. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 706. - -*** - -### getFunction - -Get a registered SWAIG function entry, or undefined. -(Python parity: `ToolRegistry.get_function`.) - -#### Signature - -```typescript -getFunction(name: string): Record | SwaigFunction | undefined -``` - -#### Parameters - - - -#### Returns - -`Record | SwaigFunction | undefined` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 523. - -*** - -### getRegisteredTools - -Get a summary of all registered tools with their names, descriptions, and -parameter schemas. Lifted from AgentBase so the swaig-test CLI can list -tools on a non-AgentBase SWMLService target (sidecar / standalone SWAIG -host). - -#### Signature - -```typescript -getRegisteredTools(): { description: string; name: string; parameters: Record }[] -``` - -#### Returns - -`{ description: string; name: string; parameters: Record }[]` — Array of tool descriptors. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 557. - -*** - -### getTool - -Look up a registered SwaigFunction by name. Lifted from AgentBase so -`swaig-test --exec ` works against a non-AgentBase SWMLService -target. - -#### Signature - -```typescript -getTool(name: string): SwaigFunction | undefined -``` - -#### Parameters - - - The tool name to search for. - - -#### Returns - -`SwaigFunction | undefined` — The SwaigFunction instance, or undefined if not found or not a SwaigFunction. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 581. - -*** - -### hasFunction - -Whether a SWAIG function with the given name is registered. -(Python parity: `ToolRegistry.has_function`.) - -#### Signature - -```typescript -hasFunction(name: string): boolean -``` - -#### Parameters - - - -#### Returns - -`boolean` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 517. - -*** - -### hasTool - -Whether a tool with the given name is registered. - -#### Signature - -```typescript -hasTool(name: string): boolean -``` - -#### Parameters - - - -#### Returns - -`boolean` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 511. - -*** - -### listToolNames - -List registered tool names in insertion order (Map preserves it). - -#### Signature - -```typescript -listToolNames(): string[] -``` - -#### Returns - -`string[]` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 545. - -*** - -### manualSetProxyUrl - -Manually set the proxy base URL used for webhook URL generation. -Mirrors Python's `manual_set_proxy_url()`. - -#### Signature - -```typescript -manualSetProxyUrl(url: string): this -``` - -#### Parameters - - - The external-facing base URL (trailing slashes are stripped). - - -#### Returns - -`this` — This service for chaining. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 879. - -*** - -### onFunctionCall - -Dispatch a function call to the registered handler. -Returns null when the function isn't registered or has no handler. -Subclasses (AgentBase) override to add session-token validation -and FunctionResult-shape normalization. Return type is wide enough -to accommodate the agent override (which may also return void -shapes for fire-and-forget tool calls). - -#### Signature - -```typescript -onFunctionCall( - name: string, - args: Record, - rawData: Record -): string | void | Record | FunctionResult | Promise | FunctionResult> | null | undefined -``` - -#### Parameters - - - - - - - -#### Returns - -`string | void | Record | FunctionResult | Promise | FunctionResult> | null | undefined` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 490. - -*** - -### registerAdditionalRoutes - -Extension point: register additional Hono routes after SWMLService -mounts /health, /ready, /swaig, and the main route. AgentBase uses -this to add /post\_prompt, /check\_for\_input, /debug\_events, /mcp. - -#### Signature - -```typescript -registerAdditionalRoutes(_app: Hono): void -``` - -#### Parameters - - - -#### Returns - -`void` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 604. - -*** - -### registerRoutingCallback - -Register a routing callback at a given path. -When a POST request arrives at `path`, the callback is invoked with the -parsed request body. If it returns a string, the response is a 307 redirect -to that route; if it returns null, normal SWML serving continues. -Mirrors Python's `register_routing_callback()`. - -#### Signature - -```typescript -registerRoutingCallback( - callbackFn: RoutingCallback, - path: string = '/sip' -): void -``` - -#### Parameters - - - Callback receiving the request body and returning a route or null. - - - - HTTP path for the callback (default '/sip'). - - -#### Returns - -`void` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 742. - -*** - -### registerSwaigFunction - -Register a SwaigFunction instance or a raw function descriptor (DataMap). - -#### Signature - -```typescript -registerSwaigFunction(fn: Record | SwaigFunction): this -``` - -#### Parameters - - - -#### Returns - -`this` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 472. - -*** - -### registerVerbHandler - -Register a custom verb handler. -Mirrors Python's `register_verb_handler()`. - -#### Signature - -```typescript -registerVerbHandler(handler: SWMLVerbHandler): void -``` - -#### Parameters - - - The verb handler to register. - - -#### Returns - -`void` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 726. - -*** - -### removeFunction - -Remove a registered SWAIG function. Returns true when removed, -false when not found. (Python parity: -`ToolRegistry.remove_function`.) - -#### Signature - -```typescript -removeFunction(name: string): boolean -``` - -#### Parameters - - - -#### Returns - -`boolean` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 540. - -*** - -### renderDocument - -Render the SWML document as a JSON string. -Mirrors Python's `render_document()`. - -#### Signature - -```typescript -renderDocument(): string -``` - -#### Returns - -`string` — JSON-encoded SWML document. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 715. - -*** - -### renderSwml - -Render the SWML document. - -Subclass-override-friendly signature: AgentBase overrides this with -`(callId?: string, modifications?: Record): string` -to return a serialized JSON string built from prompts + dynamic config. -Plain SWMLService returns the in-memory document object. - -#### Signature - -```typescript -renderSwml( - _callId?: string, - _modifications?: Record -): string | Record -``` - -#### Parameters - - - - - -#### Returns - -`string | Record` — The SWML document (object) or its serialized form (subclass). - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 694. - -*** - -### resetDocument - -Reset the SWML document to an empty state. -Mirrors Python's `reset_document()`. - -#### Signature - -```typescript -resetDocument(): this -``` - -#### Returns - -`this` — This service for chaining. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 679. - -*** - -### run - -Start the HTTP server. - -Matches Python's `serve()` parameters including SSL options. When -`SWAIG_CLI_MODE=true` is set in the environment (e.g. while running the -`swaig-test` CLI) the call is a no-op. - -#### Signature - -```typescript -run( - hostOrOpts?: string | { domain?: string; host?: string; port?: number; sslCert?: string; sslEnabled?: boolean; sslKey?: string }, - port?: number, - opts?: { ...4 fields } -): Promise -``` - -#### Parameters - - - - - Port. Defaults to `this.port` (constructor value) or `3000`. - - - - Optional SSL/TLS configuration overrides. - - - Domain used for HSTS header configuration. - - - - Path to the PEM certificate file. - - - - When `true`, serve over HTTPS. - - - - Path to the PEM private key file. - - - -#### Returns - -`Promise` — Resolves once the server has begun listening. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 929. - -*** - -### serve - -Start the HTTP server. Alias for [run](/docs/sdk-reference/reference/typescript/swml-service#run) provided for cross-SDK -consistency with Python's `serve()` method — callers porting from -Python can use this name without changes. - -#### Signature - -```typescript -serve( - ...args: [hostOrOpts: string | { domain?: string; host?: string; port?: number; sslCert?: string; sslEnabled?: boolean; sslKey?: string }, port: number, opts: { domain?: string; sslCert?: string; sslEnabled?: boolean; sslKey?: string }] -): Promise -``` - -#### Parameters - - - Forwarded unchanged to [run](/docs/sdk-reference/reference/typescript/swml-service#run). - - -#### Returns - -`Promise` — Resolves once the server has begun listening. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 1001. - -*** - -### setOnRequestCallback - -Set a callback invoked per-request to dynamically build SWML. -When set, the static SwmlBuilder is ignored and the callback's -returned SwmlBuilder is used instead. - -#### Signature - -```typescript -setOnRequestCallback(cb: OnRequestCallback): this -``` - -#### Parameters - - - Callback receiving query params, body params, and headers. - - -#### Returns - -`this` — This service for chaining. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 850. - -*** - -### stop - -Stop the HTTP server. -Mirrors Python's `stop()`. - -#### Signature - -```typescript -stop(): void -``` - -#### Returns - -`void` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 1009. - -*** - -### swaigPreDispatch - -Extension point: invoked between argument parsing and function dispatch -on POST /swaig. Returns \[target, shortCircuit]: when shortCircuit is -non-null, it's returned directly without dispatching. AgentBase may -override to add session-token validation or ephemeral dynamic-config. - -#### Signature - -```typescript -swaigPreDispatch( - _requestData: Record, - _funcName: string -): [SWMLService, unknown] -``` - -#### Parameters - - - - - -#### Returns - -`[SWMLService, unknown]` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 592. - -*** - -### validateBasicAuth - -Validate provided basic-auth credentials against the configured ones -using a constant-time comparison. (Python parity: -`AuthMixin.validate_basic_auth(username, password)`.) - -#### Signature - -```typescript -validateBasicAuth( - username: string, - password: string -): boolean | Promise -``` - -#### Parameters - - - - - -#### Returns - -`boolean | Promise` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 241. - -## Type Aliases - -### OnRequestCallback - -Callback invoked per-request to dynamically build SWML. - -#### Signature - -```typescript -type OnRequestCallback = (queryParams: Record, bodyParams: Record, headers: Record) => SwmlBuilder | Promise -``` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 140. - -## Interfaces - -### SWMLServiceOptions - -Configuration options for SWMLService. - -#### Signature - -```typescript -interface SWMLServiceOptions -``` - -#### Properties - - - Basic auth credentials as \[username, password]. - - - - Path to a security configuration file. - - - - Host to bind the web server to (default '0.0.0.0'). - - - - Service display name. Required to match Python SDK where `name` is a positional required parameter. - - - - Port to bind the web server to (default PORT env var or 3000). - - - - HTTP route path (default '/'). - - - - Path to a JSON Schema file for verb validation. - - - - Enable schema validation (default true). Can also be disabled via SWML\_SKIP\_SCHEMA\_VALIDATION=true. - - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 155. - -*** - -### SWMLVerbHandler - -Interface for custom SWML verb handlers. -Mirrors Python SDK's `SWMLVerbHandler` abstract base class. - -#### Signature - -```typescript -interface SWMLVerbHandler -``` - -#### Methods - -##### buildConfig - -Build a verb configuration from keyword arguments. - -###### Signature - -```typescript -buildConfig(kwargs: Record): Record -``` - -###### Parameters - - - -###### Returns - -`Record` - -###### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 34. - -*** - -##### getVerbName - -Return the verb name this handler manages. - -###### Signature - -```typescript -getVerbName(): string -``` - -###### Returns - -`string` - -###### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 30. - -*** - -##### validateConfig - -Validate a verb configuration. Returns \[isValid, errorMessages]. - -###### Signature - -```typescript -validateConfig(config: Record): [boolean, string[]] -``` - -###### Parameters - - - -###### Returns - -`[boolean, string[]]` - -###### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 32. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 28. - -## Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 202. diff --git a/fern/products/sdk-reference/typescript/swml-service/security-config/index.mdx b/fern/products/sdk-reference/typescript/swml-service/security-config/index.mdx deleted file mode 100644 index 27ce41f496..0000000000 --- a/fern/products/sdk-reference/typescript/swml-service/security-config/index.mdx +++ /dev/null @@ -1,128 +0,0 @@ ---- -slug: "/reference/typescript/swml-service/security-config" -title: "SecurityConfig" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "SWMLService.SecurityConfig" - parent: "SWMLService" - module: "SWMLService" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts" ---- -# `SecurityConfig` - -Unified security configuration. -Mirrors Python SDK's `SecurityConfig` — reads from env vars and optional config file. - -## Signature - -```typescript -class SecurityConfig -``` - -## Properties - - - Basic auth password from config, or null. - - - - Basic auth username from config, or null. - - - - Domain name for SSL. - - - - Filesystem path to the PEM certificate. - - - - Whether SSL is enabled. - - - - Filesystem path to the PEM private key. - - -## Methods - -### constructor - -#### Signature - -```typescript -constructor(opts?: { ...2 fields }): SecurityConfig -``` - -#### Parameters - - - - - - - -#### Returns - -`SecurityConfig` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 82. - -*** - -### getBasicAuth - -Get basic auth credentials from security config, or null if not configured. - -#### Signature - -```typescript -getBasicAuth(): [string, string] | null -``` - -#### Returns - -`[string, string] | null` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 121. - -*** - -### validateSslConfig - -Validate that SSL cert and key files are present when SSL is enabled. - -#### Signature - -```typescript -validateSslConfig(): [boolean, string | null] -``` - -#### Returns - -`[boolean, string | null]` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 129. - -## Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 66. diff --git a/fern/products/sdk-reference/typescript/swml-service/verb-handler-registry/index.mdx b/fern/products/sdk-reference/typescript/swml-service/verb-handler-registry/index.mdx deleted file mode 100644 index 526b422de6..0000000000 --- a/fern/products/sdk-reference/typescript/swml-service/verb-handler-registry/index.mdx +++ /dev/null @@ -1,122 +0,0 @@ ---- -slug: "/reference/typescript/swml-service/verb-handler-registry" -title: "VerbHandlerRegistry" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "SWMLService.VerbHandlerRegistry" - parent: "SWMLService" - module: "SWMLService" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts" ---- -# `VerbHandlerRegistry` - -Registry for custom SWML verb handlers. -Mirrors Python SDK's `VerbHandlerRegistry`. - -## Signature - -```typescript -class VerbHandlerRegistry -``` - -## Methods - -### constructor - -#### Signature - -```typescript -constructor(): VerbHandlerRegistry -``` - -#### Returns - -`VerbHandlerRegistry` - -*** - -### getHandler - -Get the handler for a specific verb, or undefined if none registered. - -#### Signature - -```typescript -getHandler(verbName: string): SWMLVerbHandler | undefined -``` - -#### Parameters - - - -#### Returns - -`SWMLVerbHandler | undefined` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 50. - -*** - -### hasHandler - -Check whether a handler exists for the given verb. - -#### Signature - -```typescript -hasHandler(verbName: string): boolean -``` - -#### Parameters - - - -#### Returns - -`boolean` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 55. - -*** - -### registerHandler - -Register a custom verb handler. - -#### Signature - -```typescript -registerHandler(handler: SWMLVerbHandler): void -``` - -#### Parameters - - - -#### Returns - -`void` - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 45. - -## Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 41. diff --git a/fern/products/sdk-reference/typescript/swml-verb-methods.generated/index.mdx b/fern/products/sdk-reference/typescript/swml-verb-methods.generated/index.mdx deleted file mode 100644 index b83ff8f28b..0000000000 --- a/fern/products/sdk-reference/typescript/swml-verb-methods.generated/index.mdx +++ /dev/null @@ -1,111 +0,0 @@ ---- -slug: "/reference/typescript/swml-verb-methods.generated" -title: "SwmlVerbMethods.generated" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "module" - language: "typescript" - qualified_name: "SwmlVerbMethods.generated" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts" ---- -# `SwmlVerbMethods.generated` - -## Signature - -```typescript -module SwmlVerbMethods.generated -``` - -## Interfaces - -### AiVerbConfig - -AUTO-GENERATED FILE — do not edit manually. -Generated by: npx tsx src/generateVerbTypes.ts - -Provides TypeScript interface augmentation for all SWML verb methods -auto-installed on SwmlBuilder from schema.json. - -#### Signature - -```typescript -interface AiVerbConfig -``` - -#### Properties - - - Optional post-prompt text sent to the LLM after the conversation ends. - - - - URL to receive post-prompt status callbacks. - - - - Text prompt for the AI agent (mutually exclusive with prompt when using POM). - - - - SignalWire AI Gateway (SWAIG) configuration for custom function/tool definitions. - - -#### Source - -[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) - -Line 11. - -*** - -### PlayVerbConfig - -#### Signature - -```typescript -interface PlayVerbConfig -``` - -#### Properties - - - If true, auto-answer the call before playing audio. Default true. - - - - Gender for text-to-speech. The `"male" | "female"` literals are autocompleted + typo-checked; any other string is still accepted (WEAK GROUNDING: no `enum:` in the SWML schema, Python never validates — convention, not schema). - - - - Language code for text-to-speech (e.g. "en-US"). - - - - Voice name to use for text-to-speech (e.g. "Polly.Joanna"). - - - - Single URL to play (mutually exclusive with urls). - - - - Array of URLs to play (mutually exclusive with url). - - - - Volume level for audio playback. Valid range -40 to 40. Default 0. - - -#### Source - -[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) - -Line 24. - -## Source - -[`src/SwmlVerbMethods.generated.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlVerbMethods.generated.ts) - -Line 1. diff --git a/fern/products/sdk-reference/typescript/type-inference/index.mdx b/fern/products/sdk-reference/typescript/type-inference/index.mdx deleted file mode 100644 index ad43334604..0000000000 --- a/fern/products/sdk-reference/typescript/type-inference/index.mdx +++ /dev/null @@ -1,255 +0,0 @@ ---- -slug: "/reference/typescript/type-inference" -title: "TypeInference" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "module" - language: "typescript" - qualified_name: "TypeInference" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/TypeInference.ts" ---- -# `TypeInference` - -## Signature - -```typescript -module TypeInference -``` - -## Functions - -### createTypedHandlerWrapper - -Create a wrapper function that adapts a typed handler to the standard -`(args, rawData) => result` SWAIG handler signature. - -The wrapper extracts named parameters from the args dict and passes them -as positional arguments to the original function. - -#### Signature - -```typescript -createTypedHandlerWrapper( - fn: TypedToolHandler, - paramNames: string[], - hasRawData: boolean -): SwaigHandler -``` - -#### Parameters - - - The typed handler whose parameters match `paramNames` in order. - - - - Ordered list of parameter names extracted from `fn`, produced by [inferSchema](/docs/sdk-reference/reference/typescript/type-inference#infer-schema). - - - - When `true`, the raw-data record is appended as the final positional argument to mirror the old-style handler shape. - - -#### Returns - -`SwaigHandler` — A [SwaigHandler](/docs/sdk-reference/reference/typescript/swaig-function#swaig-handler) suitable for registration with [AgentBase.defineTool](/docs/sdk-reference/reference/typescript/agent-base#define-tool). - -#### Source - -[`src/TypeInference.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/TypeInference.ts) - -Line 227. - -*** - -### inferSchema - -Infer a JSON Schema from a function's parameters. - -Extracts parameter names and infers JSON Schema types from default-value -literals: - -- Number literals → `"integer"` (whole numbers) or `"number"` (decimals) -- String literals → `"string"` -- Boolean literals → `"boolean"` -- No default → `"string"` (and the parameter is marked required) - -#### Signature - -```typescript -inferSchema(fn: IntrospectableFn): InferredSchema | null -``` - -#### Parameters - - - The function to inspect. Arrow functions, regular functions, and method shorthand all work. Typed as [IntrospectableFn](/docs/sdk-reference/reference/typescript/type-inference#introspectable-fn) because only the parameter list is read — the handler's return is irrelevant to schema inference (a [TypedToolHandler](/docs/sdk-reference/reference/typescript/type-inference#typed-tool-handler) satisfies this). - - -#### Returns - -`InferredSchema | null` — An [InferredSchema](/docs/sdk-reference/reference/typescript/type-inference#inferred-schema) describing the parameters, or `null` when the function looks like an old-style `(args, rawData)` SWAIG handler (in which case no inference is attempted). - -#### Source - -[`src/TypeInference.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/TypeInference.ts) - -Line 151. - -*** - -### parseFunctionParams - -Parse function parameter names and default values from source code. - -Handles arrow functions, regular functions, and method shorthand. - -#### Signature - -```typescript -parseFunctionParams(source: string): ParsedParam[] -``` - -#### Parameters - - - The function source text, typically from `fn.toString()`. - - -#### Returns - -`ParsedParam[]` — An array of `{ name, defaultValue? }` records in declaration order. Returns an empty array if no parameter list is present. - -#### Source - -[`src/TypeInference.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/TypeInference.ts) - -Line 76. - -## Type Aliases - -### IntrospectableFn - -A function the SDK _introspects_ (reads `fn.toString()` to recover parameter -names/defaults) but whose return value it does not consume. `inferSchema` -only inspects the parameter list, so — unlike [TypedToolHandler](/docs/sdk-reference/reference/typescript/type-inference#typed-tool-handler) — its -input is return-agnostic. Still a precise improvement over the bare -`Function`: it is a _callable_ (rejecting non-functions) with an arbitrary -concrete parameter list (`...args: never[]` accepts any), and any return. -Every [TypedToolHandler](/docs/sdk-reference/reference/typescript/type-inference#typed-tool-handler) is assignable to it. - -#### Signature - -```typescript -type IntrospectableFn = (args: never[]) => unknown -``` - -#### Source - -[`src/TypeInference.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/TypeInference.ts) - -Line 47. - -*** - -### TypedToolHandler - -A typed SWAIG tool handler: a function the SDK introspects and wraps so it -receives the AI-extracted arguments as _named positional parameters_ (any -arity, optionally with a trailing `rawData` record) rather than the raw -`(args, rawData)` pair of [SwaigHandler](/docs/sdk-reference/reference/typescript/swaig-function#swaig-handler). - -This is the precise replacement for the bare `Function` type at the -typed-tool sites: it constrains the value to a _callable whose return is a -valid SWAIG result_ (a [FunctionResult](/docs/sdk-reference/reference/typescript/function-result), a `{ response }`-style record, -or a string — sync or async), which `Function` does not — so a non-callable, -or a callable returning `void`/`boolean`/etc., is now a compile-time error. - -Parameters are `...args: never[]` rather than `...unknown[]`: the handler's -real parameters are user-named with arbitrary types (`(city: string, days = 5) => …`) and are recovered from `fn.toString()` by [inferSchema](/docs/sdk-reference/reference/typescript/type-inference#infer-schema), so -the type must accept _any_ concrete positional list. Under -`strictFunctionTypes`, `never[]` makes the parameter position accept any -function (every param type is a supertype of `never`) while still pinning the -return type — exactly "callable returning a SWAIG result, params don't -matter". (`...unknown[]` would wrongly REJECT a `(city: string) => …` handler, -defeating the purpose.) - -#### Signature - -```typescript -type TypedToolHandler = (args: never[]) => FunctionResult | Record | string | Promise | string> -``` - -#### Source - -[`src/TypeInference.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/TypeInference.ts) - -Line 34. - -## Interfaces - -### InferredSchema - -Result of schema inference from a function. - -#### Signature - -```typescript -interface InferredSchema -``` - -#### Properties - - - Whether the function accepts a rawData parameter. - - - - JSON Schema properties keyed by parameter name. - - - - Ordered parameter names (excluding rawData). - - - - List of required parameter names (those without defaults). - - -#### Source - -[`src/TypeInference.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/TypeInference.ts) - -Line 56. - -*** - -### ParsedParam - -A parsed function parameter with optional default value. - -#### Signature - -```typescript -interface ParsedParam -``` - -#### Properties - - - - - -#### Source - -[`src/TypeInference.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/TypeInference.ts) - -Line 50. - -## Source - -[`src/TypeInference.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/TypeInference.ts) - -Line 1. diff --git a/fern/products/sdk-reference/typescript/types/index.mdx b/fern/products/sdk-reference/typescript/types/index.mdx deleted file mode 100644 index be355d5ef7..0000000000 --- a/fern/products/sdk-reference/typescript/types/index.mdx +++ /dev/null @@ -1,290 +0,0 @@ ---- -slug: "/reference/typescript/types" -title: "types" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "module" - language: "typescript" - qualified_name: "types" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/types.ts" ---- -# `types` - -## Signature - -```typescript -module types -``` - -## Type Aliases - -### DynamicConfigCallback - -Callback invoked on each SWML request to dynamically modify an ephemeral copy of the agent. - -The ephemeral agent is typed as `import('./AgentBase.js').AgentBase` at -call sites but kept as a generic type parameter here to avoid a circular -import between `types.ts` and `AgentBase.ts`. Cast or import the type -explicitly at the call site if you need specific methods. - -#### Signature - -```typescript -type DynamicConfigCallback = (queryParams: Record, bodyParams: Record, headers: Record, agent: TAgent) => void | Promise -``` - -#### Source - -[`src/types.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/types.ts) - -Line 155. - -*** - -### SummaryCallback - -Callback invoked when a post-prompt summary is received at the end of a call. - -#### Signature - -```typescript -type SummaryCallback = (summary: Record | null, rawData: Record) => void | Promise -``` - -#### Source - -[`src/types.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/types.ts) - -Line 167. - -## Interfaces - -### AgentOptions - -Configuration options for constructing an AgentBase instance. - -#### Signature - -```typescript -interface AgentOptions -``` - -#### Properties - - - Unique identifier for this agent instance; auto-generated if omitted. - - - - Whether to automatically insert an "answer" verb in the SWML call flow (defaults to true). - - - - Explicit basic-auth credentials as \[username, password]; auto-generated if omitted. - - - - Whether to enable the check-for-input override endpoint. When true, a `/check_for_input` route is registered that allows external callers to inject input checks at runtime. Defaults to false. - - - - Path to a JSON configuration file. When provided, the file is loaded at construction time and its `service` section can override name, route, host, and port (constructor arguments still take precedence over file values). - - - - Default webhook URL for SWAIG function callbacks. - - - - Whether to enable the post-prompt override endpoint. When true, a `/post_prompt_override` route is registered that allows external callers to replace the post-prompt text at runtime. Defaults to false. - - - - Hostname to bind the HTTP server to (defaults to "0.0.0.0"). - - - - Display name of the agent, also used as default basic-auth username when credentials are auto-generated. - - - - List of native function names to include in the SWAIG configuration. - - - - Port number for the HTTP server (defaults to env PORT or 3000). - - - - Whether to record the call (defaults to false). - - - - Recording format, e.g. "mp4" (defaults to "mp4"). - - - - Whether to record in stereo (defaults to true). - - - - HTTP route path the agent listens on (defaults to "/"). - - - - Path to a JSON Schema file for SWML validation. When provided, rendered SWML documents are validated against this schema. Falls back to the built-in schema if omitted. - - - - Whether to validate rendered SWML against the schema. Can also be disabled via the `SWML_SKIP_SCHEMA_VALIDATION` env var. Defaults to true. - - - - SignalWire Signing Key for verifying inbound webhook signatures. When set, AgentBase auto-mounts the webhook signature validation middleware on POST /, /swaig, and /post\_prompt; unsigned or mis-signed requests are rejected with 403. Falls back to the `SIGNALWIRE_SIGNING_KEY` environment variable when omitted. When both are unset, signature validation is disabled and the agent emits a one-time warning on startup so operators notice. Per `porting-sdk/webhooks.md`: this MUST be treated as secret — never logged, never echoed to clients, never included in error messages. - - - - When true, suppresses all log output. - - - - Session token expiry in seconds (defaults to 3600). - - - - Whether to use POM-based prompt rendering (defaults to true). - - - - When true, the webhook validation middleware honors `X-Forwarded-Proto` / `X-Forwarded-Host` headers when reconstructing the public URL the platform POSTed to. Default false because proxy headers are spoofable; opt in only when you control the proxy. The `SWML_PROXY_URL_BASE` env var always takes precedence over both forwarded headers and the raw request URL. - - -#### Source - -[`src/types.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/types.ts) - -Line 6. - -*** - -### FunctionInclude - -Reference to an external SWAIG function endpoint to include in the AI configuration. - -#### Signature - -```typescript -interface FunctionInclude -``` - -#### Properties - - - List of function names available at the remote endpoint. - - - - Optional metadata to pass along with the include. - - - - URL of the remote SWAIG endpoint. - - -#### Source - -[`src/types.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/types.ts) - -Line 133. - -*** - -### LanguageConfig - -Configuration for a supported language in the AI agent. - -#### Signature - -```typescript -interface LanguageConfig -``` - -#### Properties - - - BCP-47 language code (e.g. "en-US"). - - - - TTS engine identifier. - - - - Filler phrases keyed by category for this language. - - - - Per-function filler phrases, keyed by function name then language code. - - - - Human-readable language name (e.g. "English"). - - - - Optional per-language params dict (engine-specific tuning, voice settings, etc.). Emitted as the language object's `params` key in SWML — only present in the wire payload when non-empty so existing entries remain byte-identical when no params are passed. - - - - Speech recognition model identifier. - - - - Voice identifier to use for this language. - - -#### Source - -[`src/types.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/types.ts) - -Line 98. - -*** - -### PronunciationRule - -Rule for overriding how the TTS engine pronounces a specific word or phrase. - -#### Signature - -```typescript -interface PronunciationRule -``` - -#### Properties - - - Whether the match should be case-insensitive. - - - - The text pattern to match. - - - - The replacement pronunciation. - - -#### Source - -[`src/types.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/types.ts) - -Line 123. - -## Source - -[`src/types.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/types.ts) - -Line 1. diff --git a/fern/products/sdk-reference/typescript/web-service/index.mdx b/fern/products/sdk-reference/typescript/web-service/index.mdx deleted file mode 100644 index 5b2e07aac5..0000000000 --- a/fern/products/sdk-reference/typescript/web-service/index.mdx +++ /dev/null @@ -1,330 +0,0 @@ ---- -slug: "/reference/typescript/web-service" -title: "WebService" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "WebService" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/WebService.ts" ---- -# `WebService` - -Static file serving service with HTTP API. - -Provides configurable static file hosting with per-route directory mounting, -extension filtering, file size limits, HTTP Basic Auth, CORS, directory -browsing, and optional SSL/TLS. Mirrors the Python SDK's `WebService` class. - -Useful when an agent or prefab needs to serve supporting assets — prompts, audio -files, images — from the same process without running a separate nginx / CDN. - -## Signature - -```typescript -class WebService -``` - -## Examples - -```typescript -import { WebService } from '@signalwire/sdk'; - -const web = new WebService({ - port: 8080, - directories: { '/audio': './public/audio' }, - allowedExtensions: ['.mp3', '.wav'], -}); - -await web.serve(); -// GET http://host:8080/audio/greeting.mp3 -``` - -## Properties - - - Allowlist of file extensions, or null to allow all (subject to blocklist). - - - - Blocklist of file extensions and file names. - - - - Map of URL route prefixes to local directory paths. - - - - Whether CORS is enabled. - - - - Whether directory listings are enabled. - - - - Maximum file size in bytes that will be served. - - - - Port the service binds to. - - - - The SSL/TLS configuration for this service. Mirrors the Python SDK's `security` attribute (`SecurityConfig`), which exposes SSL settings for post-construction inspection. In the Python SDK `SecurityConfig` also covers CORS origins, HSTS, allowed hosts, and rate limiting; in this SDK those concerns are configured via their own constructor options (`enableCors`, `ssl`, etc.) and Hono middleware rather than a single combined object. - - -## Methods - -### addDirectory - -Add a new directory to serve at a URL route prefix. - -#### Signature - -```typescript -addDirectory(route: string, directory: string): void -``` - -#### Parameters - - - URL prefix (e.g. '/docs'). - - - - Local directory path to serve. - - -#### Returns - -`void` - -#### Throws - -- If the directory does not exist or is not a directory. - -#### Source - -[`src/WebService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/WebService.ts) - -Line 184. - -*** - -### constructor - -Create a WebService. - -#### Signature - -```typescript -constructor(options?: WebServiceOptions): WebService -``` - -#### Parameters - - - Configuration options for the service. - - -#### Returns - -`WebService` - -#### Source - -[`src/WebService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/WebService.ts) - -Line 152. - -*** - -### getApp - -Get the Hono application for mounting or testing. - -#### Signature - -```typescript -getApp(): Hono -``` - -#### Returns - -`Hono` — The configured Hono app. - -#### Source - -[`src/WebService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/WebService.ts) - -Line 218. - -*** - -### removeDirectory - -Remove a previously added directory route from the bookkeeping map. - -Note: Hono does not support dynamic route removal; a server restart -is required for the route to fully stop responding. - -#### Signature - -```typescript -removeDirectory(route: string): void -``` - -#### Parameters - - - The URL route prefix to remove. - - -#### Returns - -`void` - -#### Source - -[`src/WebService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/WebService.ts) - -Line 207. - -*** - -### start - -Start the HTTP(S) service. - -When `SWAIG_CLI_MODE=true` is set in the environment, the call is a -no-op so config can be inspected without binding a port. - -#### Signature - -```typescript -start( - host?: string, - port?: number, - sslCert?: string, - sslKey?: string -): Promise -``` - -#### Parameters - - - Bind address. Defaults to `'0.0.0.0'`. - - - - Port override. Defaults to `this.port`. - - - - Path to SSL certificate file (overrides `SslConfig`). - - - - Path to SSL key file (overrides `SslConfig`). - - -#### Returns - -`Promise` — Resolves once the server has begun listening. - -#### Source - -[`src/WebService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/WebService.ts) - -Line 250. - -*** - -### stop - -Stop the service and release resources. - -#### Signature - -```typescript -stop(): void -``` - -#### Returns - -`void` - -#### Source - -[`src/WebService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/WebService.ts) - -Line 302. - -## Interfaces - -### WebServiceOptions - -Configuration options for WebService. - -#### Signature - -```typescript -interface WebServiceOptions -``` - -#### Properties - - - Allowlist of file extensions (e.g. \['.html', '.css']). Default: all allowed. - - - - Basic auth credentials as \[username, password]. Default: none. - - - - Blocklist of file extensions or names. Default: \['.env', '.git', '.gitignore', '.key', '.pem', '.crt', '.pyc', '**pycache**', '.DS\_Store', '.swp'] - - - - Path to a JSON config file. Default: none. - - - - Map of URL route prefixes to local directory paths. Default: \{\}. - - - - Enable CORS. Default: true. - - - - Serve directory listings and fall back to index.html. Default: false. - - - - Maximum file size in bytes. Default: 104857600 (100 MB). - - - - Port to bind to. Default: 8002. - - - - SSL/TLS configuration options. - - -#### Source - -[`src/WebService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/WebService.ts) - -Line 53. - -## Source - -[`src/WebService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/WebService.ts) - -Line 120. diff --git a/fern/products/sdk-reference/typescript/webhook-middleware/index.mdx b/fern/products/sdk-reference/typescript/webhook-middleware/index.mdx deleted file mode 100644 index 1a1b656676..0000000000 --- a/fern/products/sdk-reference/typescript/webhook-middleware/index.mdx +++ /dev/null @@ -1,106 +0,0 @@ ---- -slug: "/reference/typescript/webhook-middleware" -title: "WebhookMiddleware" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "module" - language: "typescript" - qualified_name: "WebhookMiddleware" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/WebhookMiddleware.ts" ---- -# `WebhookMiddleware` - -## Signature - -```typescript -module WebhookMiddleware -``` - -## Constants - - - Canonical lowercase header names (Hono's c.req.header() is case-insensitive). - - - - -## Functions - -### webhookValidationMiddleware - -Build a Hono middleware that enforces SignalWire webhook signature -validation. - -The middleware: - -1. Captures the raw body (`await c.req.text()`) BEFORE any other - consumer reads the stream. The string is stashed at `c.set('rawBody')` - so the downstream handler can re-parse without re-reading the stream. -2. Pulls the `X-SignalWire-Signature` header (or the `X-Twilio-Signature` - alias). -3. Reconstructs the public URL (`SWML_PROXY_URL_BASE` env > forwarded - headers when `trustProxy` > raw request URL). -4. Calls [validateWebhookSignature](/docs/sdk-reference/reference/typescript/webhook-validator#validate-webhook-signature). -5. On any failure: responds 403 with no body detail (would leak which - branch failed). Does NOT call `next()`. -6. On success: `next()`. - -#### Signature - -```typescript -webhookValidationMiddleware(opts: WebhookValidationOptions): MiddlewareHandler -``` - -#### Parameters - - - -#### Returns - -`MiddlewareHandler` - -#### Throws - -- Error at construction time if `signingKey` is empty. - -#### Source - -[`src/WebhookMiddleware.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/WebhookMiddleware.ts) - -Line 126. - -## Interfaces - -### WebhookValidationOptions - -Options for [webhookValidationMiddleware](/docs/sdk-reference/reference/typescript/webhook-middleware#webhook-validation-middleware). - -#### Signature - -```typescript -interface WebhookValidationOptions -``` - -#### Properties - - - The customer's Signing Key. Required; passing an empty string throws at construction time (it's a programming error, not a runtime failure). - - - - When true, honor `X-Forwarded-Proto` / `X-Forwarded-Host` headers when reconstructing the URL. Default false — proxy headers are spoofable, so opt in only when you control the proxy. - - -#### Source - -[`src/WebhookMiddleware.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/WebhookMiddleware.ts) - -Line 42. - -## Source - -[`src/WebhookMiddleware.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/WebhookMiddleware.ts) - -Line 1. diff --git a/fern/products/sdk-reference/typescript/webhook-validator/index.mdx b/fern/products/sdk-reference/typescript/webhook-validator/index.mdx deleted file mode 100644 index 3e5d7b8791..0000000000 --- a/fern/products/sdk-reference/typescript/webhook-validator/index.mdx +++ /dev/null @@ -1,173 +0,0 @@ ---- -slug: "/reference/typescript/webhook-validator" -title: "WebhookValidator" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "module" - language: "typescript" - qualified_name: "WebhookValidator" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/WebhookValidator.ts" ---- -# `WebhookValidator` - -## Signature - -```typescript -module WebhookValidator -``` - -## Functions - -### validateRequest - -Legacy `@signalwire/compatibility-api` drop-in entry point. - -If `paramsOrRawBody` is a string, delegates to -[validateWebhookSignature](/docs/sdk-reference/reference/typescript/webhook-validator#validate-webhook-signature) (Scheme A then Scheme B with parsed form). - -If it's a record, Map, or list of \[key, value] tuples, treats it as -pre-parsed form params and runs Scheme B directly (with URL port -normalization and optional bodySHA256 fallback). - -The parameter type matches Python's -`Union[str, Mapping[str, Any], List[Tuple[str, Any]], None]` for -cross-language signature parity. `Map` is also -accepted at runtime for ergonomic TS usage. - -#### Signature - -```typescript -validateRequest( - signingKey: string, - signature: string, - url: string, - paramsOrRawBody: string | Record | [string, unknown][] | null | undefined -): boolean -``` - -#### Parameters - - - Customer's Signing Key. Empty / null throws Error. - - - - Header value. Missing / empty returns false. - - - - Full URL SignalWire POSTed to. - - - - String raw body OR pre-parsed form params. - - -#### Returns - -`boolean` — true on match, false otherwise. - -#### Throws - -- Error when `signingKey` is missing. -- TypeError when `paramsOrRawBody` is neither a string nor a record/Map/array of tuples (e.g. a plain number). - -#### Source - -[`src/WebhookValidator.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/WebhookValidator.ts) - -Line 373. - -*** - -### validateWebhookSignature - -Validate a SignalWire webhook signature against both schemes (A then B). - -#### Signature - -```typescript -validateWebhookSignature( - signingKey: string, - signature: string, - url: string, - rawBody: string -): boolean -``` - -#### Parameters - - - The customer's Signing Key from the Dashboard. Empty / null throws `Error` — that's a programming error, not a validation failure. - - - - The `X-SignalWire-Signature` header value (or `X-Twilio-Signature` for cXML compat). Missing / empty returns `false` without throwing. - - - - The full URL SignalWire POSTed to (scheme, host, optional port, path, query). Must match what the platform saw — see the URL reconstruction section of porting-sdk/webhooks.md. - - - - The raw request body bytes as a UTF-8 string, BEFORE any JSON / form parsing. Must be a string — passing a parsed object throws `TypeError`. - - -#### Returns - -`boolean` — `true` if the signature matches either Scheme A (hex JSON) or Scheme B (base64 form, with port-normalization variants and optional bodySHA256 fallback). `false` otherwise. - -#### Throws - -- Error when `signingKey` is missing / empty. -- TypeError when `rawBody` is not a string. - -#### Source - -[`src/WebhookValidator.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/WebhookValidator.ts) - -Line 300. - -## Type Aliases - -### FormParams - -#### Signature - -```typescript -type FormParams = Record | [string, FormParamValue][] | Map -``` - -#### Source - -[`src/WebhookValidator.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/WebhookValidator.ts) - -Line 30. - -*** - -### FormParamValue - -Form params can be a record, a list of \[key, value] tuples, or a Map. Values -may be a string, number, boolean, null/undefined, or an array of those for -repeated keys. - -#### Signature - -```typescript -type FormParamValue = string | number | boolean | null | undefined -``` - -#### Source - -[`src/WebhookValidator.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/WebhookValidator.ts) - -Line 29. - -## Source - -[`src/WebhookValidator.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/WebhookValidator.ts) - -Line 1. From 0cffaa594f623c512f097016d4e64f23b5844820 Mon Sep 17 00:00:00 2001 From: Devon-White Date: Fri, 12 Jun 2026 09:16:51 -0400 Subject: [PATCH 4/8] SDK Reference: flatten REST resources under rest/ (python/ts/rust) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Collapse the SDK's REST `namespaces` grouping so resource clients (addresses, calling, compat, video, …) render directly under rest/ — matching the hand-written server-SDK reference — for the SDKs whose resources are sub-modules. fern check: 0 broken links. --- fern/products/sdk-reference/python/_meta.json | 2 +- .../addresses/addresses-resource/index.mdx | 4 +- .../rest/{namespaces => }/addresses/index.mdx | 8 +- .../calling/calling-namespace/index.mdx | 4 +- .../rest/{namespaces => }/calling/index.mdx | 8 +- .../chat/chat-resource/index.mdx | 4 +- .../rest/{namespaces => }/chat/index.mdx | 8 +- .../compat/compat-accounts/index.mdx | 4 +- .../compat/compat-applications/index.mdx | 4 +- .../compat/compat-calls/index.mdx | 4 +- .../compat/compat-conferences/index.mdx | 4 +- .../compat/compat-faxes/index.mdx | 4 +- .../compat/compat-laml-bins/index.mdx | 4 +- .../compat/compat-messages/index.mdx | 4 +- .../compat/compat-namespace/index.mdx | 4 +- .../compat/compat-phone-numbers/index.mdx | 4 +- .../compat/compat-queues/index.mdx | 4 +- .../compat/compat-recordings/index.mdx | 4 +- .../compat/compat-tokens/index.mdx | 4 +- .../compat/compat-transcriptions/index.mdx | 4 +- .../rest/{namespaces => }/compat/index.mdx | 32 ++--- .../datasphere/datasphere-documents/index.mdx | 4 +- .../datasphere/datasphere-namespace/index.mdx | 4 +- .../{namespaces => }/datasphere/index.mdx | 10 +- .../auto-materialized-webhook/index.mdx | 6 +- .../fabric/call-flows-resource/index.mdx | 6 +- .../conference-rooms-resource/index.mdx | 6 +- .../cxml-applications-resource/index.mdx | 6 +- .../fabric/cxml-webhooks-resource/index.mdx | 6 +- .../fabric/fabric-addresses/index.mdx | 4 +- .../fabric/fabric-namespace/index.mdx | 4 +- .../fabric/fabric-resource-put/index.mdx | 4 +- .../fabric/fabric-resource/index.mdx | 4 +- .../fabric/fabric-tokens/index.mdx | 4 +- .../fabric/generic-resources/index.mdx | 4 +- .../rest/{namespaces => }/fabric/index.mdx | 32 ++--- .../fabric/subscribers-resource/index.mdx | 6 +- .../fabric/swml-webhooks-resource/index.mdx | 6 +- .../imported-numbers-resource/index.mdx | 4 +- .../imported-numbers/index.mdx | 8 +- .../sdk-reference/python/rest/index.mdx | 82 +++++++++++- .../logs/conference-logs/index.mdx | 4 +- .../{namespaces => }/logs/fax-logs/index.mdx | 4 +- .../rest/{namespaces => }/logs/index.mdx | 16 +-- .../logs/logs-namespace/index.mdx | 4 +- .../logs/message-logs/index.mdx | 4 +- .../logs/voice-logs/index.mdx | 4 +- .../rest/{namespaces => }/lookup/index.mdx | 8 +- .../lookup/lookup-resource/index.mdx | 4 +- .../rest/{namespaces => }/mfa/index.mdx | 8 +- .../mfa/mfa-resource/index.mdx | 4 +- .../python/rest/namespaces/index.mdx | 120 ------------------ .../{namespaces => }/number-groups/index.mdx | 8 +- .../number-groups-resource/index.mdx | 4 +- .../{namespaces => }/phone-numbers/index.mdx | 8 +- .../phone-numbers-resource/index.mdx | 4 +- .../rest/{namespaces => }/project/index.mdx | 10 +- .../project/project-namespace/index.mdx | 4 +- .../project/project-tokens/index.mdx | 4 +- .../rest/{namespaces => }/pubsub/index.mdx | 8 +- .../pubsub/pub-sub-resource/index.mdx | 4 +- .../rest/{namespaces => }/queues/index.mdx | 8 +- .../queues/queues-resource/index.mdx | 4 +- .../{namespaces => }/recordings/index.mdx | 8 +- .../recordings/recordings-resource/index.mdx | 4 +- .../rest/{namespaces => }/registry/index.mdx | 16 +-- .../registry/registry-brands/index.mdx | 4 +- .../registry/registry-campaigns/index.mdx | 4 +- .../registry/registry-namespace/index.mdx | 4 +- .../registry/registry-numbers/index.mdx | 4 +- .../registry/registry-orders/index.mdx | 4 +- .../{namespaces => }/short-codes/index.mdx | 8 +- .../short-codes-resource/index.mdx | 4 +- .../{namespaces => }/sip-profile/index.mdx | 8 +- .../sip-profile-resource/index.mdx | 4 +- .../verified-callers/index.mdx | 8 +- .../verified-callers-resource/index.mdx | 4 +- .../rest/{namespaces => }/video/index.mdx | 22 ++-- .../video/video-conference-tokens/index.mdx | 4 +- .../video/video-conferences/index.mdx | 4 +- .../video/video-namespace/index.mdx | 4 +- .../video/video-room-recordings/index.mdx | 4 +- .../video/video-room-sessions/index.mdx | 4 +- .../video/video-room-tokens/index.mdx | 4 +- .../video/video-rooms/index.mdx | 4 +- .../video/video-streams/index.mdx | 4 +- fern/products/sdk-reference/rust/_meta.json | 2 +- .../rest/{namespaces => }/calling/index.mdx | 6 +- .../compat/compat-accounts/index.mdx | 4 +- .../compat/compat-applications/index.mdx | 4 +- .../compat/compat-calls/index.mdx | 4 +- .../compat/compat-conferences/index.mdx | 4 +- .../compat/compat-faxes/index.mdx | 4 +- .../compat/compat-laml-bins/index.mdx | 4 +- .../compat/compat-messages/index.mdx | 4 +- .../compat/compat-phone-numbers/index.mdx | 4 +- .../compat/compat-queues/index.mdx | 4 +- .../compat/compat-recordings/index.mdx | 4 +- .../compat/compat-tokens/index.mdx | 4 +- .../compat/compat-transcriptions/index.mdx | 4 +- .../rest/{namespaces => }/compat/index.mdx | 6 +- .../rest/{namespaces => }/compat/index__2.mdx | 30 ++--- .../datasphere/datasphere-documents/index.mdx | 4 +- .../datasphere/datasphere-namespace/index.mdx | 4 +- .../{namespaces => }/datasphere/index.mdx | 10 +- .../fabric/call-flows-resource/index.mdx | 4 +- .../conference-rooms-resource/index.mdx | 4 +- .../cxml-applications-resource/index.mdx | 4 +- .../fabric/fabric-addresses/index.mdx | 4 +- .../fabric/fabric-tokens/index.mdx | 4 +- .../fabric/generic-resources/index.mdx | 4 +- .../rest/{namespaces => }/fabric/index.mdx | 6 +- .../rest/{namespaces => }/fabric/index__2.mdx | 20 +-- .../fabric/subscribers-resource/index.mdx | 4 +- .../sdk-reference/rust/rest/index.mdx | 58 ++++++++- .../logs/conference-logs/index.mdx | 4 +- .../{namespaces => }/logs/fax-logs/index.mdx | 4 +- .../rust/rest/{namespaces => }/logs/index.mdx | 6 +- .../rest/{namespaces => }/logs/index__2.mdx | 14 +- .../logs/message-logs/index.mdx | 4 +- .../logs/voice-logs/index.mdx | 4 +- .../rust/rest/{namespaces => }/mfa/index.mdx | 6 +- .../rust/rest/namespaces/index.mdx | 84 ------------ .../{namespaces => }/number-groups/index.mdx | 8 +- .../number-groups/number-groups/index.mdx | 4 +- .../rest/{namespaces => }/project/index.mdx | 6 +- .../{namespaces => }/project/index__2.mdx | 8 +- .../project/project-tokens/index.mdx | 4 +- .../rest/{namespaces => }/queues/index.mdx | 6 +- .../rest/{namespaces => }/registry/index.mdx | 6 +- .../{namespaces => }/registry/index__2.mdx | 14 +- .../registry/registry-brands/index.mdx | 4 +- .../registry/registry-campaigns/index.mdx | 4 +- .../registry/registry-numbers/index.mdx | 4 +- .../registry/registry-orders/index.mdx | 4 +- .../{namespaces => }/sip-profile/index.mdx | 8 +- .../sip-profile/sip-profile/index.mdx | 4 +- .../rest/{namespaces => }/video/index.mdx | 6 +- .../rest/{namespaces => }/video/index__2.mdx | 20 +-- .../video/video-conference-tokens/index.mdx | 4 +- .../video/video-conferences/index.mdx | 4 +- .../video/video-room-recordings/index.mdx | 4 +- .../video/video-room-sessions/index.mdx | 4 +- .../video/video-room-tokens/index.mdx | 4 +- .../video/video-rooms/index.mdx | 4 +- .../video/video-streams/index.mdx | 4 +- .../sdk-reference/typescript/_meta.json | 2 +- .../addresses/addresses-resource/index.mdx | 4 +- .../rest/{namespaces => }/addresses/index.mdx | 8 +- .../rest/base/base-resource/index.mdx | 2 +- .../typescript/rest/call-handler/index.mdx | 2 +- .../calling/calling-namespace/index.mdx | 4 +- .../rest/{namespaces => }/calling/index.mdx | 8 +- .../chat/chat-resource/index.mdx | 4 +- .../rest/{namespaces => }/chat/index.mdx | 8 +- .../compat/compat-accounts/index.mdx | 4 +- .../compat/compat-applications/index.mdx | 4 +- .../compat/compat-calls/index.mdx | 8 +- .../compat/compat-conferences/index.mdx | 6 +- .../compat/compat-faxes/index.mdx | 4 +- .../compat/compat-laml-bins/index.mdx | 4 +- .../compat/compat-messages/index.mdx | 4 +- .../compat/compat-namespace/index.mdx | 4 +- .../compat/compat-phone-numbers/index.mdx | 4 +- .../compat/compat-queues/index.mdx | 4 +- .../compat/compat-recordings/index.mdx | 4 +- .../compat/compat-tokens/index.mdx | 4 +- .../compat/compat-transcriptions/index.mdx | 4 +- .../rest/{namespaces => }/compat/index.mdx | 32 ++--- .../datasphere/datasphere-documents/index.mdx | 4 +- .../datasphere/datasphere-namespace/index.mdx | 4 +- .../{namespaces => }/datasphere/index.mdx | 10 +- .../index.mdx | 6 +- .../fabric/call-flows-resource/index.mdx | 6 +- .../conference-rooms-resource/index.mdx | 6 +- .../cxml-applications-resource/index.mdx | 6 +- .../fabric/cxml-webhooks-resource/index.mdx | 6 +- .../fabric/fabric-addresses/index.mdx | 4 +- .../fabric/fabric-namespace/index.mdx | 8 +- .../fabric/fabric-resource-put/index.mdx | 4 +- .../fabric/fabric-resource/index.mdx | 4 +- .../fabric/fabric-tokens/index.mdx | 4 +- .../fabric/generic-resources/index.mdx | 6 +- .../rest/{namespaces => }/fabric/index.mdx | 32 ++--- .../fabric/subscribers-resource/index.mdx | 6 +- .../fabric/swml-webhooks-resource/index.mdx | 6 +- .../imported-numbers-resource/index.mdx | 4 +- .../imported-numbers/index.mdx | 8 +- .../sdk-reference/typescript/rest/index.mdx | 42 +++++- .../logs/conference-logs/index.mdx | 4 +- .../{namespaces => }/logs/fax-logs/index.mdx | 4 +- .../rest/{namespaces => }/logs/index.mdx | 16 +-- .../logs/logs-namespace/index.mdx | 4 +- .../logs/message-logs/index.mdx | 4 +- .../logs/voice-logs/index.mdx | 4 +- .../rest/{namespaces => }/lookup/index.mdx | 8 +- .../lookup/lookup-resource/index.mdx | 4 +- .../rest/{namespaces => }/mfa/index.mdx | 8 +- .../mfa/mfa-resource/index.mdx | 10 +- .../typescript/rest/namespaces/index.mdx | 60 --------- .../{namespaces => }/number-groups/index.mdx | 8 +- .../number-groups-resource/index.mdx | 4 +- .../{namespaces => }/phone-numbers/index.mdx | 16 +-- .../phone-numbers-resource/index.mdx | 4 +- .../rest/{namespaces => }/project/index.mdx | 10 +- .../project/project-namespace/index.mdx | 4 +- .../project/project-tokens/index.mdx | 4 +- .../rest/{namespaces => }/pubsub/index.mdx | 8 +- .../pubsub/pub-sub-resource/index.mdx | 4 +- .../rest/{namespaces => }/queues/index.mdx | 8 +- .../queues/queues-resource/index.mdx | 4 +- .../{namespaces => }/recordings/index.mdx | 8 +- .../recordings/recordings-resource/index.mdx | 4 +- .../rest/{namespaces => }/registry/index.mdx | 16 +-- .../registry/registry-brands/index.mdx | 4 +- .../registry/registry-campaigns/index.mdx | 4 +- .../registry/registry-namespace/index.mdx | 4 +- .../registry/registry-numbers/index.mdx | 4 +- .../registry/registry-orders/index.mdx | 4 +- .../{namespaces => }/short-codes/index.mdx | 8 +- .../short-codes-resource/index.mdx | 4 +- .../{namespaces => }/sip-profile/index.mdx | 8 +- .../sip-profile-resource/index.mdx | 4 +- .../verified-callers/index.mdx | 8 +- .../verified-callers-resource/index.mdx | 4 +- .../rest/{namespaces => }/video/index.mdx | 22 ++-- .../video/video-conference-tokens/index.mdx | 4 +- .../video/video-conferences/index.mdx | 4 +- .../video/video-namespace/index.mdx | 4 +- .../video/video-room-recordings/index.mdx | 4 +- .../video/video-room-sessions/index.mdx | 4 +- .../video/video-room-tokens/index.mdx | 4 +- .../video/video-rooms/index.mdx | 4 +- .../video/video-streams/index.mdx | 4 +- 234 files changed, 880 insertions(+), 968 deletions(-) rename fern/products/sdk-reference/python/rest/{namespaces => }/addresses/addresses-resource/index.mdx (95%) rename fern/products/sdk-reference/python/rest/{namespaces => }/addresses/index.mdx (83%) rename fern/products/sdk-reference/python/rest/{namespaces => }/calling/calling-namespace/index.mdx (99%) rename fern/products/sdk-reference/python/rest/{namespaces => }/calling/index.mdx (84%) rename fern/products/sdk-reference/python/rest/{namespaces => }/chat/chat-resource/index.mdx (93%) rename fern/products/sdk-reference/python/rest/{namespaces => }/chat/index.mdx (84%) rename fern/products/sdk-reference/python/rest/{namespaces => }/compat/compat-accounts/index.mdx (95%) rename fern/products/sdk-reference/python/rest/{namespaces => }/compat/compat-applications/index.mdx (91%) rename fern/products/sdk-reference/python/rest/{namespaces => }/compat/compat-calls/index.mdx (96%) rename fern/products/sdk-reference/python/rest/{namespaces => }/compat/compat-conferences/index.mdx (98%) rename fern/products/sdk-reference/python/rest/{namespaces => }/compat/compat-faxes/index.mdx (95%) rename fern/products/sdk-reference/python/rest/{namespaces => }/compat/compat-laml-bins/index.mdx (91%) rename fern/products/sdk-reference/python/rest/{namespaces => }/compat/compat-messages/index.mdx (95%) rename fern/products/sdk-reference/python/rest/{namespaces => }/compat/compat-namespace/index.mdx (94%) rename fern/products/sdk-reference/python/rest/{namespaces => }/compat/compat-phone-numbers/index.mdx (97%) rename fern/products/sdk-reference/python/rest/{namespaces => }/compat/compat-queues/index.mdx (95%) rename fern/products/sdk-reference/python/rest/{namespaces => }/compat/compat-recordings/index.mdx (94%) rename fern/products/sdk-reference/python/rest/{namespaces => }/compat/compat-tokens/index.mdx (94%) rename fern/products/sdk-reference/python/rest/{namespaces => }/compat/compat-transcriptions/index.mdx (93%) rename fern/products/sdk-reference/python/rest/{namespaces => }/compat/index.mdx (74%) rename fern/products/sdk-reference/python/rest/{namespaces => }/datasphere/datasphere-documents/index.mdx (95%) rename fern/products/sdk-reference/python/rest/{namespaces => }/datasphere/datasphere-namespace/index.mdx (90%) rename fern/products/sdk-reference/python/rest/{namespaces => }/datasphere/index.mdx (80%) rename fern/products/sdk-reference/python/rest/{namespaces => }/fabric/auto-materialized-webhook/index.mdx (90%) rename fern/products/sdk-reference/python/rest/{namespaces => }/fabric/call-flows-resource/index.mdx (92%) rename fern/products/sdk-reference/python/rest/{namespaces => }/fabric/conference-rooms-resource/index.mdx (88%) rename fern/products/sdk-reference/python/rest/{namespaces => }/fabric/cxml-applications-resource/index.mdx (87%) rename fern/products/sdk-reference/python/rest/{namespaces => }/fabric/cxml-webhooks-resource/index.mdx (81%) rename fern/products/sdk-reference/python/rest/{namespaces => }/fabric/fabric-addresses/index.mdx (93%) rename fern/products/sdk-reference/python/rest/{namespaces => }/fabric/fabric-namespace/index.mdx (95%) rename fern/products/sdk-reference/python/rest/{namespaces => }/fabric/fabric-resource-put/index.mdx (87%) rename fern/products/sdk-reference/python/rest/{namespaces => }/fabric/fabric-resource/index.mdx (88%) rename fern/products/sdk-reference/python/rest/{namespaces => }/fabric/fabric-tokens/index.mdx (96%) rename fern/products/sdk-reference/python/rest/{namespaces => }/fabric/generic-resources/index.mdx (97%) rename fern/products/sdk-reference/python/rest/{namespaces => }/fabric/index.mdx (72%) rename fern/products/sdk-reference/python/rest/{namespaces => }/fabric/subscribers-resource/index.mdx (94%) rename fern/products/sdk-reference/python/rest/{namespaces => }/fabric/swml-webhooks-resource/index.mdx (81%) rename fern/products/sdk-reference/python/rest/{namespaces => }/imported-numbers/imported-numbers-resource/index.mdx (91%) rename fern/products/sdk-reference/python/rest/{namespaces => }/imported-numbers/index.mdx (82%) rename fern/products/sdk-reference/python/rest/{namespaces => }/logs/conference-logs/index.mdx (91%) rename fern/products/sdk-reference/python/rest/{namespaces => }/logs/fax-logs/index.mdx (93%) rename fern/products/sdk-reference/python/rest/{namespaces => }/logs/index.mdx (79%) rename fern/products/sdk-reference/python/rest/{namespaces => }/logs/logs-namespace/index.mdx (92%) rename fern/products/sdk-reference/python/rest/{namespaces => }/logs/message-logs/index.mdx (93%) rename fern/products/sdk-reference/python/rest/{namespaces => }/logs/voice-logs/index.mdx (94%) rename fern/products/sdk-reference/python/rest/{namespaces => }/lookup/index.mdx (83%) rename fern/products/sdk-reference/python/rest/{namespaces => }/lookup/lookup-resource/index.mdx (93%) rename fern/products/sdk-reference/python/rest/{namespaces => }/mfa/index.mdx (84%) rename fern/products/sdk-reference/python/rest/{namespaces => }/mfa/mfa-resource/index.mdx (95%) delete mode 100644 fern/products/sdk-reference/python/rest/namespaces/index.mdx rename fern/products/sdk-reference/python/rest/{namespaces => }/number-groups/index.mdx (82%) rename fern/products/sdk-reference/python/rest/{namespaces => }/number-groups/number-groups-resource/index.mdx (95%) rename fern/products/sdk-reference/python/rest/{namespaces => }/phone-numbers/index.mdx (82%) rename fern/products/sdk-reference/python/rest/{namespaces => }/phone-numbers/phone-numbers-resource/index.mdx (98%) rename fern/products/sdk-reference/python/rest/{namespaces => }/project/index.mdx (81%) rename fern/products/sdk-reference/python/rest/{namespaces => }/project/project-namespace/index.mdx (90%) rename fern/products/sdk-reference/python/rest/{namespaces => }/project/project-tokens/index.mdx (95%) rename fern/products/sdk-reference/python/rest/{namespaces => }/pubsub/index.mdx (83%) rename fern/products/sdk-reference/python/rest/{namespaces => }/pubsub/pub-sub-resource/index.mdx (93%) rename fern/products/sdk-reference/python/rest/{namespaces => }/queues/index.mdx (83%) rename fern/products/sdk-reference/python/rest/{namespaces => }/queues/queues-resource/index.mdx (95%) rename fern/products/sdk-reference/python/rest/{namespaces => }/recordings/index.mdx (83%) rename fern/products/sdk-reference/python/rest/{namespaces => }/recordings/recordings-resource/index.mdx (94%) rename fern/products/sdk-reference/python/rest/{namespaces => }/registry/index.mdx (76%) rename fern/products/sdk-reference/python/rest/{namespaces => }/registry/registry-brands/index.mdx (95%) rename fern/products/sdk-reference/python/rest/{namespaces => }/registry/registry-campaigns/index.mdx (96%) rename fern/products/sdk-reference/python/rest/{namespaces => }/registry/registry-namespace/index.mdx (92%) rename fern/products/sdk-reference/python/rest/{namespaces => }/registry/registry-numbers/index.mdx (90%) rename fern/products/sdk-reference/python/rest/{namespaces => }/registry/registry-orders/index.mdx (90%) rename fern/products/sdk-reference/python/rest/{namespaces => }/short-codes/index.mdx (83%) rename fern/products/sdk-reference/python/rest/{namespaces => }/short-codes/short-codes-resource/index.mdx (94%) rename fern/products/sdk-reference/python/rest/{namespaces => }/sip-profile/index.mdx (82%) rename fern/products/sdk-reference/python/rest/{namespaces => }/sip-profile/sip-profile-resource/index.mdx (93%) rename fern/products/sdk-reference/python/rest/{namespaces => }/verified-callers/index.mdx (82%) rename fern/products/sdk-reference/python/rest/{namespaces => }/verified-callers/verified-callers-resource/index.mdx (93%) rename fern/products/sdk-reference/python/rest/{namespaces => }/video/index.mdx (75%) rename fern/products/sdk-reference/python/rest/{namespaces => }/video/video-conference-tokens/index.mdx (92%) rename fern/products/sdk-reference/python/rest/{namespaces => }/video/video-conferences/index.mdx (95%) rename fern/products/sdk-reference/python/rest/{namespaces => }/video/video-namespace/index.mdx (93%) rename fern/products/sdk-reference/python/rest/{namespaces => }/video/video-room-recordings/index.mdx (95%) rename fern/products/sdk-reference/python/rest/{namespaces => }/video/video-room-sessions/index.mdx (96%) rename fern/products/sdk-reference/python/rest/{namespaces => }/video/video-room-tokens/index.mdx (91%) rename fern/products/sdk-reference/python/rest/{namespaces => }/video/video-rooms/index.mdx (93%) rename fern/products/sdk-reference/python/rest/{namespaces => }/video/video-streams/index.mdx (94%) rename fern/products/sdk-reference/rust/rest/{namespaces => }/calling/index.mdx (99%) rename fern/products/sdk-reference/rust/rest/{namespaces => }/compat/compat-accounts/index.mdx (96%) rename fern/products/sdk-reference/rust/rest/{namespaces => }/compat/compat-applications/index.mdx (96%) rename fern/products/sdk-reference/rust/rest/{namespaces => }/compat/compat-calls/index.mdx (97%) rename fern/products/sdk-reference/rust/rest/{namespaces => }/compat/compat-conferences/index.mdx (98%) rename fern/products/sdk-reference/rust/rest/{namespaces => }/compat/compat-faxes/index.mdx (97%) rename fern/products/sdk-reference/rust/rest/{namespaces => }/compat/compat-laml-bins/index.mdx (96%) rename fern/products/sdk-reference/rust/rest/{namespaces => }/compat/compat-messages/index.mdx (97%) rename fern/products/sdk-reference/rust/rest/{namespaces => }/compat/compat-phone-numbers/index.mdx (97%) rename fern/products/sdk-reference/rust/rest/{namespaces => }/compat/compat-queues/index.mdx (97%) rename fern/products/sdk-reference/rust/rest/{namespaces => }/compat/compat-recordings/index.mdx (95%) rename fern/products/sdk-reference/rust/rest/{namespaces => }/compat/compat-tokens/index.mdx (95%) rename fern/products/sdk-reference/rust/rest/{namespaces => }/compat/compat-transcriptions/index.mdx (95%) rename fern/products/sdk-reference/rust/rest/{namespaces => }/compat/index.mdx (97%) rename fern/products/sdk-reference/rust/rest/{namespaces => }/compat/index__2.mdx (57%) rename fern/products/sdk-reference/rust/rest/{namespaces => }/datasphere/datasphere-documents/index.mdx (97%) rename fern/products/sdk-reference/rust/rest/{namespaces => }/datasphere/datasphere-namespace/index.mdx (92%) rename fern/products/sdk-reference/rust/rest/{namespaces => }/datasphere/index.mdx (75%) rename fern/products/sdk-reference/rust/rest/{namespaces => }/fabric/call-flows-resource/index.mdx (97%) rename fern/products/sdk-reference/rust/rest/{namespaces => }/fabric/conference-rooms-resource/index.mdx (96%) rename fern/products/sdk-reference/rust/rest/{namespaces => }/fabric/cxml-applications-resource/index.mdx (96%) rename fern/products/sdk-reference/rust/rest/{namespaces => }/fabric/fabric-addresses/index.mdx (95%) rename fern/products/sdk-reference/rust/rest/{namespaces => }/fabric/fabric-tokens/index.mdx (96%) rename fern/products/sdk-reference/rust/rest/{namespaces => }/fabric/generic-resources/index.mdx (96%) rename fern/products/sdk-reference/rust/rest/{namespaces => }/fabric/index.mdx (98%) rename fern/products/sdk-reference/rust/rest/{namespaces => }/fabric/index__2.mdx (55%) rename fern/products/sdk-reference/rust/rest/{namespaces => }/fabric/subscribers-resource/index.mdx (98%) rename fern/products/sdk-reference/rust/rest/{namespaces => }/logs/conference-logs/index.mdx (94%) rename fern/products/sdk-reference/rust/rest/{namespaces => }/logs/fax-logs/index.mdx (95%) rename fern/products/sdk-reference/rust/rest/{namespaces => }/logs/index.mdx (95%) rename fern/products/sdk-reference/rust/rest/{namespaces => }/logs/index__2.mdx (62%) rename fern/products/sdk-reference/rust/rest/{namespaces => }/logs/message-logs/index.mdx (95%) rename fern/products/sdk-reference/rust/rest/{namespaces => }/logs/voice-logs/index.mdx (96%) rename fern/products/sdk-reference/rust/rest/{namespaces => }/mfa/index.mdx (95%) delete mode 100644 fern/products/sdk-reference/rust/rest/namespaces/index.mdx rename fern/products/sdk-reference/rust/rest/{namespaces => }/number-groups/index.mdx (78%) rename fern/products/sdk-reference/rust/rest/{namespaces => }/number-groups/number-groups/index.mdx (97%) rename fern/products/sdk-reference/rust/rest/{namespaces => }/project/index.mdx (91%) rename fern/products/sdk-reference/rust/rest/{namespaces => }/project/index__2.mdx (66%) rename fern/products/sdk-reference/rust/rest/{namespaces => }/project/project-tokens/index.mdx (95%) rename fern/products/sdk-reference/rust/rest/{namespaces => }/queues/index.mdx (97%) rename fern/products/sdk-reference/rust/rest/{namespaces => }/registry/index.mdx (95%) rename fern/products/sdk-reference/rust/rest/{namespaces => }/registry/index__2.mdx (58%) rename fern/products/sdk-reference/rust/rest/{namespaces => }/registry/registry-brands/index.mdx (96%) rename fern/products/sdk-reference/rust/rest/{namespaces => }/registry/registry-campaigns/index.mdx (96%) rename fern/products/sdk-reference/rust/rest/{namespaces => }/registry/registry-numbers/index.mdx (93%) rename fern/products/sdk-reference/rust/rest/{namespaces => }/registry/registry-orders/index.mdx (93%) rename fern/products/sdk-reference/rust/rest/{namespaces => }/sip-profile/index.mdx (79%) rename fern/products/sdk-reference/rust/rest/{namespaces => }/sip-profile/sip-profile/index.mdx (95%) rename fern/products/sdk-reference/rust/rest/{namespaces => }/video/index.mdx (96%) rename fern/products/sdk-reference/rust/rest/{namespaces => }/video/index__2.mdx (57%) rename fern/products/sdk-reference/rust/rest/{namespaces => }/video/video-conference-tokens/index.mdx (94%) rename fern/products/sdk-reference/rust/rest/{namespaces => }/video/video-conferences/index.mdx (97%) rename fern/products/sdk-reference/rust/rest/{namespaces => }/video/video-room-recordings/index.mdx (96%) rename fern/products/sdk-reference/rust/rest/{namespaces => }/video/video-room-sessions/index.mdx (96%) rename fern/products/sdk-reference/rust/rest/{namespaces => }/video/video-room-tokens/index.mdx (94%) rename fern/products/sdk-reference/rust/rest/{namespaces => }/video/video-rooms/index.mdx (97%) rename fern/products/sdk-reference/rust/rest/{namespaces => }/video/video-streams/index.mdx (96%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/addresses/addresses-resource/index.mdx (96%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/addresses/index.mdx (79%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/calling/calling-namespace/index.mdx (99%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/calling/index.mdx (80%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/chat/chat-resource/index.mdx (94%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/chat/index.mdx (80%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/compat/compat-accounts/index.mdx (96%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/compat/compat-applications/index.mdx (97%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/compat/compat-calls/index.mdx (96%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/compat/compat-conferences/index.mdx (98%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/compat/compat-faxes/index.mdx (98%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/compat/compat-laml-bins/index.mdx (97%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/compat/compat-messages/index.mdx (98%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/compat/compat-namespace/index.mdx (96%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/compat/compat-phone-numbers/index.mdx (98%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/compat/compat-queues/index.mdx (98%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/compat/compat-recordings/index.mdx (96%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/compat/compat-tokens/index.mdx (96%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/compat/compat-transcriptions/index.mdx (96%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/compat/index.mdx (73%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/datasphere/datasphere-documents/index.mdx (98%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/datasphere/datasphere-namespace/index.mdx (92%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/datasphere/index.mdx (76%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/fabric/auto-materialized-webhook-resource/index.mdx (96%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/fabric/call-flows-resource/index.mdx (97%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/fabric/conference-rooms-resource/index.mdx (96%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/fabric/cxml-applications-resource/index.mdx (96%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/fabric/cxml-webhooks-resource/index.mdx (96%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/fabric/fabric-addresses/index.mdx (95%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/fabric/fabric-namespace/index.mdx (89%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/fabric/fabric-resource-put/index.mdx (97%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/fabric/fabric-resource/index.mdx (97%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/fabric/fabric-tokens/index.mdx (97%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/fabric/generic-resources/index.mdx (88%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/fabric/index.mdx (71%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/fabric/subscribers-resource/index.mdx (98%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/fabric/swml-webhooks-resource/index.mdx (96%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/imported-numbers/imported-numbers-resource/index.mdx (93%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/imported-numbers/index.mdx (78%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/logs/conference-logs/index.mdx (94%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/logs/fax-logs/index.mdx (95%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/logs/index.mdx (75%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/logs/logs-namespace/index.mdx (93%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/logs/message-logs/index.mdx (95%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/logs/voice-logs/index.mdx (96%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/lookup/index.mdx (80%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/lookup/lookup-resource/index.mdx (95%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/mfa/index.mdx (81%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/mfa/mfa-resource/index.mdx (88%) delete mode 100644 fern/products/sdk-reference/typescript/rest/namespaces/index.mdx rename fern/products/sdk-reference/typescript/rest/{namespaces => }/number-groups/index.mdx (79%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/number-groups/number-groups-resource/index.mdx (98%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/phone-numbers/index.mdx (83%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/phone-numbers/phone-numbers-resource/index.mdx (99%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/project/index.mdx (77%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/project/project-namespace/index.mdx (91%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/project/project-tokens/index.mdx (96%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/pubsub/index.mdx (79%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/pubsub/pub-sub-resource/index.mdx (94%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/queues/index.mdx (80%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/queues/queues-resource/index.mdx (98%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/recordings/index.mdx (79%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/recordings/recordings-resource/index.mdx (95%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/registry/index.mdx (73%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/registry/registry-brands/index.mdx (97%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/registry/registry-campaigns/index.mdx (97%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/registry/registry-namespace/index.mdx (93%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/registry/registry-numbers/index.mdx (94%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/registry/registry-orders/index.mdx (94%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/short-codes/index.mdx (79%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/short-codes/short-codes-resource/index.mdx (96%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/sip-profile/index.mdx (79%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/sip-profile/sip-profile-resource/index.mdx (94%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/verified-callers/index.mdx (78%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/verified-callers/verified-callers-resource/index.mdx (97%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/video/index.mdx (71%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/video/video-conference-tokens/index.mdx (95%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/video/video-conferences/index.mdx (98%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/video/video-namespace/index.mdx (95%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/video/video-room-recordings/index.mdx (96%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/video/video-room-sessions/index.mdx (97%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/video/video-room-tokens/index.mdx (94%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/video/video-rooms/index.mdx (98%) rename fern/products/sdk-reference/typescript/rest/{namespaces => }/video/video-streams/index.mdx (96%) diff --git a/fern/products/sdk-reference/python/_meta.json b/fern/products/sdk-reference/python/_meta.json index 705282ce7e..195ffb5d7d 100644 --- a/fern/products/sdk-reference/python/_meta.json +++ b/fern/products/sdk-reference/python/_meta.json @@ -6,5 +6,5 @@ "format": "mdx", "platform": "fern", "base_slug": "/reference/python", - "item_count": 2483 + "item_count": 2482 } \ No newline at end of file diff --git a/fern/products/sdk-reference/python/rest/namespaces/addresses/addresses-resource/index.mdx b/fern/products/sdk-reference/python/rest/addresses/addresses-resource/index.mdx similarity index 95% rename from fern/products/sdk-reference/python/rest/namespaces/addresses/addresses-resource/index.mdx rename to fern/products/sdk-reference/python/rest/addresses/addresses-resource/index.mdx index a0e09d4b00..12d7462950 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/addresses/addresses-resource/index.mdx +++ b/fern/products/sdk-reference/python/rest/addresses/addresses-resource/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/addresses/addresses-resource" +slug: "/reference/python/rest/addresses/addresses-resource" title: "AddressesResource" sdk_label: "Python SDK" icon: "python" @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.rest.namespaces.addresses.AddressesResource" parent: "signalwire.rest.namespaces.addresses" - module: "rest.namespaces.addresses" + module: "rest.addresses" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/addresses.py" --- # `AddressesResource` diff --git a/fern/products/sdk-reference/python/rest/namespaces/addresses/index.mdx b/fern/products/sdk-reference/python/rest/addresses/index.mdx similarity index 83% rename from fern/products/sdk-reference/python/rest/namespaces/addresses/index.mdx rename to fern/products/sdk-reference/python/rest/addresses/index.mdx index 70eb494dbe..3bb4ba42a0 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/addresses/index.mdx +++ b/fern/products/sdk-reference/python/rest/addresses/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/addresses" +slug: "/reference/python/rest/addresses" title: "addresses" sdk_label: "Python SDK" icon: "python" @@ -8,8 +8,8 @@ lustri: kind: "module" language: "python" qualified_name: "signalwire.rest.namespaces.addresses" - parent: "signalwire.rest.namespaces" - module: "rest.namespaces" + parent: "signalwire.rest" + module: "rest" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/addresses.py" --- # `addresses` @@ -30,7 +30,7 @@ module addresses ## Classes - + Address management (no update endpoint). diff --git a/fern/products/sdk-reference/python/rest/namespaces/calling/calling-namespace/index.mdx b/fern/products/sdk-reference/python/rest/calling/calling-namespace/index.mdx similarity index 99% rename from fern/products/sdk-reference/python/rest/namespaces/calling/calling-namespace/index.mdx rename to fern/products/sdk-reference/python/rest/calling/calling-namespace/index.mdx index 6611970dcf..74a2ce0fe7 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/calling/calling-namespace/index.mdx +++ b/fern/products/sdk-reference/python/rest/calling/calling-namespace/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/calling/calling-namespace" +slug: "/reference/python/rest/calling/calling-namespace" title: "CallingNamespace" sdk_label: "Python SDK" icon: "python" @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.rest.namespaces.calling.CallingNamespace" parent: "signalwire.rest.namespaces.calling" - module: "rest.namespaces.calling" + module: "rest.calling" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py" --- # `CallingNamespace` diff --git a/fern/products/sdk-reference/python/rest/namespaces/calling/index.mdx b/fern/products/sdk-reference/python/rest/calling/index.mdx similarity index 84% rename from fern/products/sdk-reference/python/rest/namespaces/calling/index.mdx rename to fern/products/sdk-reference/python/rest/calling/index.mdx index acad569ac7..e3aa287c9d 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/calling/index.mdx +++ b/fern/products/sdk-reference/python/rest/calling/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/calling" +slug: "/reference/python/rest/calling" title: "calling" sdk_label: "Python SDK" icon: "python" @@ -8,8 +8,8 @@ lustri: kind: "module" language: "python" qualified_name: "signalwire.rest.namespaces.calling" - parent: "signalwire.rest.namespaces" - module: "rest.namespaces" + parent: "signalwire.rest" + module: "rest" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py" --- # `calling` @@ -30,7 +30,7 @@ module calling ## Classes - + REST call control — all 37 commands dispatched via single POST endpoint. diff --git a/fern/products/sdk-reference/python/rest/namespaces/chat/chat-resource/index.mdx b/fern/products/sdk-reference/python/rest/chat/chat-resource/index.mdx similarity index 93% rename from fern/products/sdk-reference/python/rest/namespaces/chat/chat-resource/index.mdx rename to fern/products/sdk-reference/python/rest/chat/chat-resource/index.mdx index e581ea5032..0782fedb86 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/chat/chat-resource/index.mdx +++ b/fern/products/sdk-reference/python/rest/chat/chat-resource/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/chat/chat-resource" +slug: "/reference/python/rest/chat/chat-resource" title: "ChatResource" sdk_label: "Python SDK" icon: "python" @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.rest.namespaces.chat.ChatResource" parent: "signalwire.rest.namespaces.chat" - module: "rest.namespaces.chat" + module: "rest.chat" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/chat.py" --- # `ChatResource` diff --git a/fern/products/sdk-reference/python/rest/namespaces/chat/index.mdx b/fern/products/sdk-reference/python/rest/chat/index.mdx similarity index 84% rename from fern/products/sdk-reference/python/rest/namespaces/chat/index.mdx rename to fern/products/sdk-reference/python/rest/chat/index.mdx index b8fc40edca..8f952581ee 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/chat/index.mdx +++ b/fern/products/sdk-reference/python/rest/chat/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/chat" +slug: "/reference/python/rest/chat" title: "chat" sdk_label: "Python SDK" icon: "python" @@ -8,8 +8,8 @@ lustri: kind: "module" language: "python" qualified_name: "signalwire.rest.namespaces.chat" - parent: "signalwire.rest.namespaces" - module: "rest.namespaces" + parent: "signalwire.rest" + module: "rest" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/chat.py" --- # `chat` @@ -30,7 +30,7 @@ module chat ## Classes - + Chat token generation. diff --git a/fern/products/sdk-reference/python/rest/namespaces/compat/compat-accounts/index.mdx b/fern/products/sdk-reference/python/rest/compat/compat-accounts/index.mdx similarity index 95% rename from fern/products/sdk-reference/python/rest/namespaces/compat/compat-accounts/index.mdx rename to fern/products/sdk-reference/python/rest/compat/compat-accounts/index.mdx index e9fe7ab8c3..6b34674033 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/compat/compat-accounts/index.mdx +++ b/fern/products/sdk-reference/python/rest/compat/compat-accounts/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/compat/compat-accounts" +slug: "/reference/python/rest/compat/compat-accounts" title: "CompatAccounts" sdk_label: "Python SDK" icon: "python" @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.rest.namespaces.compat.CompatAccounts" parent: "signalwire.rest.namespaces.compat" - module: "rest.namespaces.compat" + module: "rest.compat" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py" --- # `CompatAccounts` diff --git a/fern/products/sdk-reference/python/rest/namespaces/compat/compat-applications/index.mdx b/fern/products/sdk-reference/python/rest/compat/compat-applications/index.mdx similarity index 91% rename from fern/products/sdk-reference/python/rest/namespaces/compat/compat-applications/index.mdx rename to fern/products/sdk-reference/python/rest/compat/compat-applications/index.mdx index 3125807d20..188f170d70 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/compat/compat-applications/index.mdx +++ b/fern/products/sdk-reference/python/rest/compat/compat-applications/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/compat/compat-applications" +slug: "/reference/python/rest/compat/compat-applications" title: "CompatApplications" sdk_label: "Python SDK" icon: "python" @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.rest.namespaces.compat.CompatApplications" parent: "signalwire.rest.namespaces.compat" - module: "rest.namespaces.compat" + module: "rest.compat" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py" --- # `CompatApplications` diff --git a/fern/products/sdk-reference/python/rest/namespaces/compat/compat-calls/index.mdx b/fern/products/sdk-reference/python/rest/compat/compat-calls/index.mdx similarity index 96% rename from fern/products/sdk-reference/python/rest/namespaces/compat/compat-calls/index.mdx rename to fern/products/sdk-reference/python/rest/compat/compat-calls/index.mdx index b5dc295ef4..e52fe8e875 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/compat/compat-calls/index.mdx +++ b/fern/products/sdk-reference/python/rest/compat/compat-calls/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/compat/compat-calls" +slug: "/reference/python/rest/compat/compat-calls" title: "CompatCalls" sdk_label: "Python SDK" icon: "python" @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.rest.namespaces.compat.CompatCalls" parent: "signalwire.rest.namespaces.compat" - module: "rest.namespaces.compat" + module: "rest.compat" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py" --- # `CompatCalls` diff --git a/fern/products/sdk-reference/python/rest/namespaces/compat/compat-conferences/index.mdx b/fern/products/sdk-reference/python/rest/compat/compat-conferences/index.mdx similarity index 98% rename from fern/products/sdk-reference/python/rest/namespaces/compat/compat-conferences/index.mdx rename to fern/products/sdk-reference/python/rest/compat/compat-conferences/index.mdx index 918da49a4a..169aa25c6c 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/compat/compat-conferences/index.mdx +++ b/fern/products/sdk-reference/python/rest/compat/compat-conferences/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/compat/compat-conferences" +slug: "/reference/python/rest/compat/compat-conferences" title: "CompatConferences" sdk_label: "Python SDK" icon: "python" @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.rest.namespaces.compat.CompatConferences" parent: "signalwire.rest.namespaces.compat" - module: "rest.namespaces.compat" + module: "rest.compat" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py" --- # `CompatConferences` diff --git a/fern/products/sdk-reference/python/rest/namespaces/compat/compat-faxes/index.mdx b/fern/products/sdk-reference/python/rest/compat/compat-faxes/index.mdx similarity index 95% rename from fern/products/sdk-reference/python/rest/namespaces/compat/compat-faxes/index.mdx rename to fern/products/sdk-reference/python/rest/compat/compat-faxes/index.mdx index 3785a7b1da..3629ef24e4 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/compat/compat-faxes/index.mdx +++ b/fern/products/sdk-reference/python/rest/compat/compat-faxes/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/compat/compat-faxes" +slug: "/reference/python/rest/compat/compat-faxes" title: "CompatFaxes" sdk_label: "Python SDK" icon: "python" @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.rest.namespaces.compat.CompatFaxes" parent: "signalwire.rest.namespaces.compat" - module: "rest.namespaces.compat" + module: "rest.compat" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py" --- # `CompatFaxes` diff --git a/fern/products/sdk-reference/python/rest/namespaces/compat/compat-laml-bins/index.mdx b/fern/products/sdk-reference/python/rest/compat/compat-laml-bins/index.mdx similarity index 91% rename from fern/products/sdk-reference/python/rest/namespaces/compat/compat-laml-bins/index.mdx rename to fern/products/sdk-reference/python/rest/compat/compat-laml-bins/index.mdx index a72efb126d..6c0dccddb9 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/compat/compat-laml-bins/index.mdx +++ b/fern/products/sdk-reference/python/rest/compat/compat-laml-bins/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/compat/compat-laml-bins" +slug: "/reference/python/rest/compat/compat-laml-bins" title: "CompatLamlBins" sdk_label: "Python SDK" icon: "python" @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.rest.namespaces.compat.CompatLamlBins" parent: "signalwire.rest.namespaces.compat" - module: "rest.namespaces.compat" + module: "rest.compat" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py" --- # `CompatLamlBins` diff --git a/fern/products/sdk-reference/python/rest/namespaces/compat/compat-messages/index.mdx b/fern/products/sdk-reference/python/rest/compat/compat-messages/index.mdx similarity index 95% rename from fern/products/sdk-reference/python/rest/namespaces/compat/compat-messages/index.mdx rename to fern/products/sdk-reference/python/rest/compat/compat-messages/index.mdx index a370c220e6..8e349b1c8f 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/compat/compat-messages/index.mdx +++ b/fern/products/sdk-reference/python/rest/compat/compat-messages/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/compat/compat-messages" +slug: "/reference/python/rest/compat/compat-messages" title: "CompatMessages" sdk_label: "Python SDK" icon: "python" @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.rest.namespaces.compat.CompatMessages" parent: "signalwire.rest.namespaces.compat" - module: "rest.namespaces.compat" + module: "rest.compat" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py" --- # `CompatMessages` diff --git a/fern/products/sdk-reference/python/rest/namespaces/compat/compat-namespace/index.mdx b/fern/products/sdk-reference/python/rest/compat/compat-namespace/index.mdx similarity index 94% rename from fern/products/sdk-reference/python/rest/namespaces/compat/compat-namespace/index.mdx rename to fern/products/sdk-reference/python/rest/compat/compat-namespace/index.mdx index e0d4c68931..a061e28bdb 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/compat/compat-namespace/index.mdx +++ b/fern/products/sdk-reference/python/rest/compat/compat-namespace/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/compat/compat-namespace" +slug: "/reference/python/rest/compat/compat-namespace" title: "CompatNamespace" sdk_label: "Python SDK" icon: "python" @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.rest.namespaces.compat.CompatNamespace" parent: "signalwire.rest.namespaces.compat" - module: "rest.namespaces.compat" + module: "rest.compat" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py" --- # `CompatNamespace` diff --git a/fern/products/sdk-reference/python/rest/namespaces/compat/compat-phone-numbers/index.mdx b/fern/products/sdk-reference/python/rest/compat/compat-phone-numbers/index.mdx similarity index 97% rename from fern/products/sdk-reference/python/rest/namespaces/compat/compat-phone-numbers/index.mdx rename to fern/products/sdk-reference/python/rest/compat/compat-phone-numbers/index.mdx index 72d5b45f20..c39be123db 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/compat/compat-phone-numbers/index.mdx +++ b/fern/products/sdk-reference/python/rest/compat/compat-phone-numbers/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/compat/compat-phone-numbers" +slug: "/reference/python/rest/compat/compat-phone-numbers" title: "CompatPhoneNumbers" sdk_label: "Python SDK" icon: "python" @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.rest.namespaces.compat.CompatPhoneNumbers" parent: "signalwire.rest.namespaces.compat" - module: "rest.namespaces.compat" + module: "rest.compat" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py" --- # `CompatPhoneNumbers` diff --git a/fern/products/sdk-reference/python/rest/namespaces/compat/compat-queues/index.mdx b/fern/products/sdk-reference/python/rest/compat/compat-queues/index.mdx similarity index 95% rename from fern/products/sdk-reference/python/rest/namespaces/compat/compat-queues/index.mdx rename to fern/products/sdk-reference/python/rest/compat/compat-queues/index.mdx index ecc8f303fa..759a66870c 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/compat/compat-queues/index.mdx +++ b/fern/products/sdk-reference/python/rest/compat/compat-queues/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/compat/compat-queues" +slug: "/reference/python/rest/compat/compat-queues" title: "CompatQueues" sdk_label: "Python SDK" icon: "python" @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.rest.namespaces.compat.CompatQueues" parent: "signalwire.rest.namespaces.compat" - module: "rest.namespaces.compat" + module: "rest.compat" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py" --- # `CompatQueues` diff --git a/fern/products/sdk-reference/python/rest/namespaces/compat/compat-recordings/index.mdx b/fern/products/sdk-reference/python/rest/compat/compat-recordings/index.mdx similarity index 94% rename from fern/products/sdk-reference/python/rest/namespaces/compat/compat-recordings/index.mdx rename to fern/products/sdk-reference/python/rest/compat/compat-recordings/index.mdx index 621b9d67c8..bff3355068 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/compat/compat-recordings/index.mdx +++ b/fern/products/sdk-reference/python/rest/compat/compat-recordings/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/compat/compat-recordings" +slug: "/reference/python/rest/compat/compat-recordings" title: "CompatRecordings" sdk_label: "Python SDK" icon: "python" @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.rest.namespaces.compat.CompatRecordings" parent: "signalwire.rest.namespaces.compat" - module: "rest.namespaces.compat" + module: "rest.compat" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py" --- # `CompatRecordings` diff --git a/fern/products/sdk-reference/python/rest/namespaces/compat/compat-tokens/index.mdx b/fern/products/sdk-reference/python/rest/compat/compat-tokens/index.mdx similarity index 94% rename from fern/products/sdk-reference/python/rest/namespaces/compat/compat-tokens/index.mdx rename to fern/products/sdk-reference/python/rest/compat/compat-tokens/index.mdx index 71a2e6e782..7ef845d535 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/compat/compat-tokens/index.mdx +++ b/fern/products/sdk-reference/python/rest/compat/compat-tokens/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/compat/compat-tokens" +slug: "/reference/python/rest/compat/compat-tokens" title: "CompatTokens" sdk_label: "Python SDK" icon: "python" @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.rest.namespaces.compat.CompatTokens" parent: "signalwire.rest.namespaces.compat" - module: "rest.namespaces.compat" + module: "rest.compat" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py" --- # `CompatTokens` diff --git a/fern/products/sdk-reference/python/rest/namespaces/compat/compat-transcriptions/index.mdx b/fern/products/sdk-reference/python/rest/compat/compat-transcriptions/index.mdx similarity index 93% rename from fern/products/sdk-reference/python/rest/namespaces/compat/compat-transcriptions/index.mdx rename to fern/products/sdk-reference/python/rest/compat/compat-transcriptions/index.mdx index 8c8dbfc363..9204636dbb 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/compat/compat-transcriptions/index.mdx +++ b/fern/products/sdk-reference/python/rest/compat/compat-transcriptions/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/compat/compat-transcriptions" +slug: "/reference/python/rest/compat/compat-transcriptions" title: "CompatTranscriptions" sdk_label: "Python SDK" icon: "python" @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.rest.namespaces.compat.CompatTranscriptions" parent: "signalwire.rest.namespaces.compat" - module: "rest.namespaces.compat" + module: "rest.compat" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py" --- # `CompatTranscriptions` diff --git a/fern/products/sdk-reference/python/rest/namespaces/compat/index.mdx b/fern/products/sdk-reference/python/rest/compat/index.mdx similarity index 74% rename from fern/products/sdk-reference/python/rest/namespaces/compat/index.mdx rename to fern/products/sdk-reference/python/rest/compat/index.mdx index 260f034645..34bddbf1c9 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/compat/index.mdx +++ b/fern/products/sdk-reference/python/rest/compat/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/compat" +slug: "/reference/python/rest/compat" title: "compat" sdk_label: "Python SDK" icon: "python" @@ -8,8 +8,8 @@ lustri: kind: "module" language: "python" qualified_name: "signalwire.rest.namespaces.compat" - parent: "signalwire.rest.namespaces" - module: "rest.namespaces" + parent: "signalwire.rest" + module: "rest" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/compat.py" --- # `compat` @@ -30,55 +30,55 @@ module compat ## Classes - + Compat account/subproject management. - + Compat application management. - + Compat call management with recording and stream sub-resources. - + Compat conference management with participants, recordings, and streams. - + Compat fax management with media sub-resources. - + Compat cXML/LaML script management. - + Compat message management with media sub-resources. - + Twilio-compatible LAML API namespace with AccountSid scoping. - + Compat phone number management. - + Compat queue management with members. - + Compat recording management. - + Compat API token management. - + Compat transcription management. diff --git a/fern/products/sdk-reference/python/rest/namespaces/datasphere/datasphere-documents/index.mdx b/fern/products/sdk-reference/python/rest/datasphere/datasphere-documents/index.mdx similarity index 95% rename from fern/products/sdk-reference/python/rest/namespaces/datasphere/datasphere-documents/index.mdx rename to fern/products/sdk-reference/python/rest/datasphere/datasphere-documents/index.mdx index be23eab292..8e4b25e7bc 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/datasphere/datasphere-documents/index.mdx +++ b/fern/products/sdk-reference/python/rest/datasphere/datasphere-documents/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/datasphere/datasphere-documents" +slug: "/reference/python/rest/datasphere/datasphere-documents" title: "DatasphereDocuments" sdk_label: "Python SDK" icon: "python" @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.rest.namespaces.datasphere.DatasphereDocuments" parent: "signalwire.rest.namespaces.datasphere" - module: "rest.namespaces.datasphere" + module: "rest.datasphere" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/datasphere.py" --- # `DatasphereDocuments` diff --git a/fern/products/sdk-reference/python/rest/namespaces/datasphere/datasphere-namespace/index.mdx b/fern/products/sdk-reference/python/rest/datasphere/datasphere-namespace/index.mdx similarity index 90% rename from fern/products/sdk-reference/python/rest/namespaces/datasphere/datasphere-namespace/index.mdx rename to fern/products/sdk-reference/python/rest/datasphere/datasphere-namespace/index.mdx index d7b3046796..669f970eaf 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/datasphere/datasphere-namespace/index.mdx +++ b/fern/products/sdk-reference/python/rest/datasphere/datasphere-namespace/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/datasphere/datasphere-namespace" +slug: "/reference/python/rest/datasphere/datasphere-namespace" title: "DatasphereNamespace" sdk_label: "Python SDK" icon: "python" @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.rest.namespaces.datasphere.DatasphereNamespace" parent: "signalwire.rest.namespaces.datasphere" - module: "rest.namespaces.datasphere" + module: "rest.datasphere" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/datasphere.py" --- # `DatasphereNamespace` diff --git a/fern/products/sdk-reference/python/rest/namespaces/datasphere/index.mdx b/fern/products/sdk-reference/python/rest/datasphere/index.mdx similarity index 80% rename from fern/products/sdk-reference/python/rest/namespaces/datasphere/index.mdx rename to fern/products/sdk-reference/python/rest/datasphere/index.mdx index 5ca74809a5..e32f00a8f2 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/datasphere/index.mdx +++ b/fern/products/sdk-reference/python/rest/datasphere/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/datasphere" +slug: "/reference/python/rest/datasphere" title: "datasphere" sdk_label: "Python SDK" icon: "python" @@ -8,8 +8,8 @@ lustri: kind: "module" language: "python" qualified_name: "signalwire.rest.namespaces.datasphere" - parent: "signalwire.rest.namespaces" - module: "rest.namespaces" + parent: "signalwire.rest" + module: "rest" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/datasphere.py" --- # `datasphere` @@ -30,11 +30,11 @@ module datasphere ## Classes - + Document management with search and chunk operations. - + Datasphere API namespace. diff --git a/fern/products/sdk-reference/python/rest/namespaces/fabric/auto-materialized-webhook/index.mdx b/fern/products/sdk-reference/python/rest/fabric/auto-materialized-webhook/index.mdx similarity index 90% rename from fern/products/sdk-reference/python/rest/namespaces/fabric/auto-materialized-webhook/index.mdx rename to fern/products/sdk-reference/python/rest/fabric/auto-materialized-webhook/index.mdx index 4d93cd3255..e2f3ad6fd8 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/fabric/auto-materialized-webhook/index.mdx +++ b/fern/products/sdk-reference/python/rest/fabric/auto-materialized-webhook/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/fabric/auto-materialized-webhook" +slug: "/reference/python/rest/fabric/auto-materialized-webhook" title: "AutoMaterializedWebhook" sdk_label: "Python SDK" icon: "python" @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.rest.namespaces.fabric.AutoMaterializedWebhook" parent: "signalwire.rest.namespaces.fabric" - module: "rest.namespaces.fabric" + module: "rest.fabric" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py" --- # `AutoMaterializedWebhook` @@ -30,7 +30,7 @@ class AutoMaterializedWebhook(FabricResource) ## Inheritance -**Extends:** [FabricResource](/docs/sdk-reference/reference/python/rest/namespaces/fabric/fabric-resource) +**Extends:** [FabricResource](/docs/sdk-reference/reference/python/rest/fabric/fabric-resource) ## Methods diff --git a/fern/products/sdk-reference/python/rest/namespaces/fabric/call-flows-resource/index.mdx b/fern/products/sdk-reference/python/rest/fabric/call-flows-resource/index.mdx similarity index 92% rename from fern/products/sdk-reference/python/rest/namespaces/fabric/call-flows-resource/index.mdx rename to fern/products/sdk-reference/python/rest/fabric/call-flows-resource/index.mdx index 95e268ef2f..73dca6c3c1 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/fabric/call-flows-resource/index.mdx +++ b/fern/products/sdk-reference/python/rest/fabric/call-flows-resource/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/fabric/call-flows-resource" +slug: "/reference/python/rest/fabric/call-flows-resource" title: "CallFlowsResource" sdk_label: "Python SDK" icon: "python" @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.rest.namespaces.fabric.CallFlowsResource" parent: "signalwire.rest.namespaces.fabric" - module: "rest.namespaces.fabric" + module: "rest.fabric" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py" --- # `CallFlowsResource` @@ -26,7 +26,7 @@ class CallFlowsResource(FabricResourcePUT) ## Inheritance -**Extends:** [FabricResourcePUT](/docs/sdk-reference/reference/python/rest/namespaces/fabric/fabric-resource-put) +**Extends:** [FabricResourcePUT](/docs/sdk-reference/reference/python/rest/fabric/fabric-resource-put) ## Methods diff --git a/fern/products/sdk-reference/python/rest/namespaces/fabric/conference-rooms-resource/index.mdx b/fern/products/sdk-reference/python/rest/fabric/conference-rooms-resource/index.mdx similarity index 88% rename from fern/products/sdk-reference/python/rest/namespaces/fabric/conference-rooms-resource/index.mdx rename to fern/products/sdk-reference/python/rest/fabric/conference-rooms-resource/index.mdx index 1ce0ef96c9..9b3012460f 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/fabric/conference-rooms-resource/index.mdx +++ b/fern/products/sdk-reference/python/rest/fabric/conference-rooms-resource/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/fabric/conference-rooms-resource" +slug: "/reference/python/rest/fabric/conference-rooms-resource" title: "ConferenceRoomsResource" sdk_label: "Python SDK" icon: "python" @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.rest.namespaces.fabric.ConferenceRoomsResource" parent: "signalwire.rest.namespaces.fabric" - module: "rest.namespaces.fabric" + module: "rest.fabric" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py" --- # `ConferenceRoomsResource` @@ -24,7 +24,7 @@ class ConferenceRoomsResource(FabricResourcePUT) ## Inheritance -**Extends:** [FabricResourcePUT](/docs/sdk-reference/reference/python/rest/namespaces/fabric/fabric-resource-put) +**Extends:** [FabricResourcePUT](/docs/sdk-reference/reference/python/rest/fabric/fabric-resource-put) ## Methods diff --git a/fern/products/sdk-reference/python/rest/namespaces/fabric/cxml-applications-resource/index.mdx b/fern/products/sdk-reference/python/rest/fabric/cxml-applications-resource/index.mdx similarity index 87% rename from fern/products/sdk-reference/python/rest/namespaces/fabric/cxml-applications-resource/index.mdx rename to fern/products/sdk-reference/python/rest/fabric/cxml-applications-resource/index.mdx index 54dbfc1d24..a4bbc344f5 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/fabric/cxml-applications-resource/index.mdx +++ b/fern/products/sdk-reference/python/rest/fabric/cxml-applications-resource/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/fabric/cxml-applications-resource" +slug: "/reference/python/rest/fabric/cxml-applications-resource" title: "CxmlApplicationsResource" sdk_label: "Python SDK" icon: "python" @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.rest.namespaces.fabric.CxmlApplicationsResource" parent: "signalwire.rest.namespaces.fabric" - module: "rest.namespaces.fabric" + module: "rest.fabric" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py" --- # `CxmlApplicationsResource` @@ -24,7 +24,7 @@ class CxmlApplicationsResource(FabricResourcePUT) ## Inheritance -**Extends:** [FabricResourcePUT](/docs/sdk-reference/reference/python/rest/namespaces/fabric/fabric-resource-put) +**Extends:** [FabricResourcePUT](/docs/sdk-reference/reference/python/rest/fabric/fabric-resource-put) ## Methods diff --git a/fern/products/sdk-reference/python/rest/namespaces/fabric/cxml-webhooks-resource/index.mdx b/fern/products/sdk-reference/python/rest/fabric/cxml-webhooks-resource/index.mdx similarity index 81% rename from fern/products/sdk-reference/python/rest/namespaces/fabric/cxml-webhooks-resource/index.mdx rename to fern/products/sdk-reference/python/rest/fabric/cxml-webhooks-resource/index.mdx index 5e34368f66..fb21820da2 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/fabric/cxml-webhooks-resource/index.mdx +++ b/fern/products/sdk-reference/python/rest/fabric/cxml-webhooks-resource/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/fabric/cxml-webhooks-resource" +slug: "/reference/python/rest/fabric/cxml-webhooks-resource" title: "CxmlWebhooksResource" sdk_label: "Python SDK" icon: "python" @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.rest.namespaces.fabric.CxmlWebhooksResource" parent: "signalwire.rest.namespaces.fabric" - module: "rest.namespaces.fabric" + module: "rest.fabric" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py" --- # `CxmlWebhooksResource` @@ -22,7 +22,7 @@ class CxmlWebhooksResource(AutoMaterializedWebhook) ## Inheritance -**Extends:** [AutoMaterializedWebhook](/docs/sdk-reference/reference/python/rest/namespaces/fabric/auto-materialized-webhook) +**Extends:** [AutoMaterializedWebhook](/docs/sdk-reference/reference/python/rest/fabric/auto-materialized-webhook) ## Source diff --git a/fern/products/sdk-reference/python/rest/namespaces/fabric/fabric-addresses/index.mdx b/fern/products/sdk-reference/python/rest/fabric/fabric-addresses/index.mdx similarity index 93% rename from fern/products/sdk-reference/python/rest/namespaces/fabric/fabric-addresses/index.mdx rename to fern/products/sdk-reference/python/rest/fabric/fabric-addresses/index.mdx index 4b308597bf..2ed4a83c28 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/fabric/fabric-addresses/index.mdx +++ b/fern/products/sdk-reference/python/rest/fabric/fabric-addresses/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/fabric/fabric-addresses" +slug: "/reference/python/rest/fabric/fabric-addresses" title: "FabricAddresses" sdk_label: "Python SDK" icon: "python" @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.rest.namespaces.fabric.FabricAddresses" parent: "signalwire.rest.namespaces.fabric" - module: "rest.namespaces.fabric" + module: "rest.fabric" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py" --- # `FabricAddresses` diff --git a/fern/products/sdk-reference/python/rest/namespaces/fabric/fabric-namespace/index.mdx b/fern/products/sdk-reference/python/rest/fabric/fabric-namespace/index.mdx similarity index 95% rename from fern/products/sdk-reference/python/rest/namespaces/fabric/fabric-namespace/index.mdx rename to fern/products/sdk-reference/python/rest/fabric/fabric-namespace/index.mdx index 6837a86da7..e727e7a413 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/fabric/fabric-namespace/index.mdx +++ b/fern/products/sdk-reference/python/rest/fabric/fabric-namespace/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/fabric/fabric-namespace" +slug: "/reference/python/rest/fabric/fabric-namespace" title: "FabricNamespace" sdk_label: "Python SDK" icon: "python" @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.rest.namespaces.fabric.FabricNamespace" parent: "signalwire.rest.namespaces.fabric" - module: "rest.namespaces.fabric" + module: "rest.fabric" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py" --- # `FabricNamespace` diff --git a/fern/products/sdk-reference/python/rest/namespaces/fabric/fabric-resource-put/index.mdx b/fern/products/sdk-reference/python/rest/fabric/fabric-resource-put/index.mdx similarity index 87% rename from fern/products/sdk-reference/python/rest/namespaces/fabric/fabric-resource-put/index.mdx rename to fern/products/sdk-reference/python/rest/fabric/fabric-resource-put/index.mdx index ccbcff569f..7a3da7889e 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/fabric/fabric-resource-put/index.mdx +++ b/fern/products/sdk-reference/python/rest/fabric/fabric-resource-put/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/fabric/fabric-resource-put" +slug: "/reference/python/rest/fabric/fabric-resource-put" title: "FabricResourcePUT" sdk_label: "Python SDK" icon: "python" @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.rest.namespaces.fabric.FabricResourcePUT" parent: "signalwire.rest.namespaces.fabric" - module: "rest.namespaces.fabric" + module: "rest.fabric" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py" --- # `FabricResourcePUT` diff --git a/fern/products/sdk-reference/python/rest/namespaces/fabric/fabric-resource/index.mdx b/fern/products/sdk-reference/python/rest/fabric/fabric-resource/index.mdx similarity index 88% rename from fern/products/sdk-reference/python/rest/namespaces/fabric/fabric-resource/index.mdx rename to fern/products/sdk-reference/python/rest/fabric/fabric-resource/index.mdx index 43bce17cd4..1f2c31eb67 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/fabric/fabric-resource/index.mdx +++ b/fern/products/sdk-reference/python/rest/fabric/fabric-resource/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/fabric/fabric-resource" +slug: "/reference/python/rest/fabric/fabric-resource" title: "FabricResource" sdk_label: "Python SDK" icon: "python" @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.rest.namespaces.fabric.FabricResource" parent: "signalwire.rest.namespaces.fabric" - module: "rest.namespaces.fabric" + module: "rest.fabric" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py" --- # `FabricResource` diff --git a/fern/products/sdk-reference/python/rest/namespaces/fabric/fabric-tokens/index.mdx b/fern/products/sdk-reference/python/rest/fabric/fabric-tokens/index.mdx similarity index 96% rename from fern/products/sdk-reference/python/rest/namespaces/fabric/fabric-tokens/index.mdx rename to fern/products/sdk-reference/python/rest/fabric/fabric-tokens/index.mdx index bd776192be..7fdd1985c8 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/fabric/fabric-tokens/index.mdx +++ b/fern/products/sdk-reference/python/rest/fabric/fabric-tokens/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/fabric/fabric-tokens" +slug: "/reference/python/rest/fabric/fabric-tokens" title: "FabricTokens" sdk_label: "Python SDK" icon: "python" @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.rest.namespaces.fabric.FabricTokens" parent: "signalwire.rest.namespaces.fabric" - module: "rest.namespaces.fabric" + module: "rest.fabric" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py" --- # `FabricTokens` diff --git a/fern/products/sdk-reference/python/rest/namespaces/fabric/generic-resources/index.mdx b/fern/products/sdk-reference/python/rest/fabric/generic-resources/index.mdx similarity index 97% rename from fern/products/sdk-reference/python/rest/namespaces/fabric/generic-resources/index.mdx rename to fern/products/sdk-reference/python/rest/fabric/generic-resources/index.mdx index c4d85fc959..af774768e6 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/fabric/generic-resources/index.mdx +++ b/fern/products/sdk-reference/python/rest/fabric/generic-resources/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/fabric/generic-resources" +slug: "/reference/python/rest/fabric/generic-resources" title: "GenericResources" sdk_label: "Python SDK" icon: "python" @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.rest.namespaces.fabric.GenericResources" parent: "signalwire.rest.namespaces.fabric" - module: "rest.namespaces.fabric" + module: "rest.fabric" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py" --- # `GenericResources` diff --git a/fern/products/sdk-reference/python/rest/namespaces/fabric/index.mdx b/fern/products/sdk-reference/python/rest/fabric/index.mdx similarity index 72% rename from fern/products/sdk-reference/python/rest/namespaces/fabric/index.mdx rename to fern/products/sdk-reference/python/rest/fabric/index.mdx index 7130fd89f7..9a37bd1ede 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/fabric/index.mdx +++ b/fern/products/sdk-reference/python/rest/fabric/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/fabric" +slug: "/reference/python/rest/fabric" title: "fabric" sdk_label: "Python SDK" icon: "python" @@ -8,8 +8,8 @@ lustri: kind: "module" language: "python" qualified_name: "signalwire.rest.namespaces.fabric" - parent: "signalwire.rest.namespaces" - module: "rest.namespaces" + parent: "signalwire.rest" + module: "rest" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py" --- # `fabric` @@ -30,53 +30,53 @@ module fabric ## Classes - + Fabric webhook resource that's normally auto-created by phone\_numbers.set\_\*. - + Call flows with version management. - + Conference rooms — uses singular 'conference\_room' for sub-resource paths. - + cXML applications — no create method (read/update/delete only). - + - + Read-only fabric addresses. - + Fabric API namespace grouping all resource types. - + Standard fabric resource with CRUD + addresses. - + Fabric resource that uses PUT for updates. - + Subscriber, guest, invite, and embed token creation. - + Generic resource operations across all fabric resource types. - + Subscribers with SIP endpoint management. - + ## Source diff --git a/fern/products/sdk-reference/python/rest/namespaces/fabric/subscribers-resource/index.mdx b/fern/products/sdk-reference/python/rest/fabric/subscribers-resource/index.mdx similarity index 94% rename from fern/products/sdk-reference/python/rest/namespaces/fabric/subscribers-resource/index.mdx rename to fern/products/sdk-reference/python/rest/fabric/subscribers-resource/index.mdx index ff9a3cff87..a36c8496f7 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/fabric/subscribers-resource/index.mdx +++ b/fern/products/sdk-reference/python/rest/fabric/subscribers-resource/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/fabric/subscribers-resource" +slug: "/reference/python/rest/fabric/subscribers-resource" title: "SubscribersResource" sdk_label: "Python SDK" icon: "python" @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.rest.namespaces.fabric.SubscribersResource" parent: "signalwire.rest.namespaces.fabric" - module: "rest.namespaces.fabric" + module: "rest.fabric" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py" --- # `SubscribersResource` @@ -24,7 +24,7 @@ class SubscribersResource(FabricResourcePUT) ## Inheritance -**Extends:** [FabricResourcePUT](/docs/sdk-reference/reference/python/rest/namespaces/fabric/fabric-resource-put) +**Extends:** [FabricResourcePUT](/docs/sdk-reference/reference/python/rest/fabric/fabric-resource-put) ## Methods diff --git a/fern/products/sdk-reference/python/rest/namespaces/fabric/swml-webhooks-resource/index.mdx b/fern/products/sdk-reference/python/rest/fabric/swml-webhooks-resource/index.mdx similarity index 81% rename from fern/products/sdk-reference/python/rest/namespaces/fabric/swml-webhooks-resource/index.mdx rename to fern/products/sdk-reference/python/rest/fabric/swml-webhooks-resource/index.mdx index 35ab53a8e2..3732d9dbbb 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/fabric/swml-webhooks-resource/index.mdx +++ b/fern/products/sdk-reference/python/rest/fabric/swml-webhooks-resource/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/fabric/swml-webhooks-resource" +slug: "/reference/python/rest/fabric/swml-webhooks-resource" title: "SwmlWebhooksResource" sdk_label: "Python SDK" icon: "python" @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.rest.namespaces.fabric.SwmlWebhooksResource" parent: "signalwire.rest.namespaces.fabric" - module: "rest.namespaces.fabric" + module: "rest.fabric" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/fabric.py" --- # `SwmlWebhooksResource` @@ -22,7 +22,7 @@ class SwmlWebhooksResource(AutoMaterializedWebhook) ## Inheritance -**Extends:** [AutoMaterializedWebhook](/docs/sdk-reference/reference/python/rest/namespaces/fabric/auto-materialized-webhook) +**Extends:** [AutoMaterializedWebhook](/docs/sdk-reference/reference/python/rest/fabric/auto-materialized-webhook) ## Source diff --git a/fern/products/sdk-reference/python/rest/namespaces/imported-numbers/imported-numbers-resource/index.mdx b/fern/products/sdk-reference/python/rest/imported-numbers/imported-numbers-resource/index.mdx similarity index 91% rename from fern/products/sdk-reference/python/rest/namespaces/imported-numbers/imported-numbers-resource/index.mdx rename to fern/products/sdk-reference/python/rest/imported-numbers/imported-numbers-resource/index.mdx index cbb34e8c8d..c663d7a136 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/imported-numbers/imported-numbers-resource/index.mdx +++ b/fern/products/sdk-reference/python/rest/imported-numbers/imported-numbers-resource/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/imported-numbers/imported-numbers-resource" +slug: "/reference/python/rest/imported-numbers/imported-numbers-resource" title: "ImportedNumbersResource" sdk_label: "Python SDK" icon: "python" @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.rest.namespaces.imported_numbers.ImportedNumbersResource" parent: "signalwire.rest.namespaces.imported_numbers" - module: "rest.namespaces.imported_numbers" + module: "rest.imported_numbers" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/imported_numbers.py" --- # `ImportedNumbersResource` diff --git a/fern/products/sdk-reference/python/rest/namespaces/imported-numbers/index.mdx b/fern/products/sdk-reference/python/rest/imported-numbers/index.mdx similarity index 82% rename from fern/products/sdk-reference/python/rest/namespaces/imported-numbers/index.mdx rename to fern/products/sdk-reference/python/rest/imported-numbers/index.mdx index 1f39c838ba..9ba2c4a183 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/imported-numbers/index.mdx +++ b/fern/products/sdk-reference/python/rest/imported-numbers/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/imported-numbers" +slug: "/reference/python/rest/imported-numbers" title: "imported_numbers" sdk_label: "Python SDK" icon: "python" @@ -8,8 +8,8 @@ lustri: kind: "module" language: "python" qualified_name: "signalwire.rest.namespaces.imported_numbers" - parent: "signalwire.rest.namespaces" - module: "rest.namespaces" + parent: "signalwire.rest" + module: "rest" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/imported_numbers.py" --- # `imported_numbers` @@ -30,7 +30,7 @@ module imported_numbers ## Classes - + Import externally-hosted phone numbers. diff --git a/fern/products/sdk-reference/python/rest/index.mdx b/fern/products/sdk-reference/python/rest/index.mdx index c52c8a2219..b034310d4b 100644 --- a/fern/products/sdk-reference/python/rest/index.mdx +++ b/fern/products/sdk-reference/python/rest/index.mdx @@ -32,15 +32,95 @@ module rest ## Modules + + Copyright (c) 2025 SignalWire + + Copyright (c) 2025 SignalWire + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + Copyright (c) 2025 SignalWire - + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + Copyright (c) 2025 SignalWire diff --git a/fern/products/sdk-reference/python/rest/namespaces/logs/conference-logs/index.mdx b/fern/products/sdk-reference/python/rest/logs/conference-logs/index.mdx similarity index 91% rename from fern/products/sdk-reference/python/rest/namespaces/logs/conference-logs/index.mdx rename to fern/products/sdk-reference/python/rest/logs/conference-logs/index.mdx index 5d48553be2..179720cc8f 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/logs/conference-logs/index.mdx +++ b/fern/products/sdk-reference/python/rest/logs/conference-logs/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/logs/conference-logs" +slug: "/reference/python/rest/logs/conference-logs" title: "ConferenceLogs" sdk_label: "Python SDK" icon: "python" @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.rest.namespaces.logs.ConferenceLogs" parent: "signalwire.rest.namespaces.logs" - module: "rest.namespaces.logs" + module: "rest.logs" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/logs.py" --- # `ConferenceLogs` diff --git a/fern/products/sdk-reference/python/rest/namespaces/logs/fax-logs/index.mdx b/fern/products/sdk-reference/python/rest/logs/fax-logs/index.mdx similarity index 93% rename from fern/products/sdk-reference/python/rest/namespaces/logs/fax-logs/index.mdx rename to fern/products/sdk-reference/python/rest/logs/fax-logs/index.mdx index 88b49148a3..308a878b6d 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/logs/fax-logs/index.mdx +++ b/fern/products/sdk-reference/python/rest/logs/fax-logs/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/logs/fax-logs" +slug: "/reference/python/rest/logs/fax-logs" title: "FaxLogs" sdk_label: "Python SDK" icon: "python" @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.rest.namespaces.logs.FaxLogs" parent: "signalwire.rest.namespaces.logs" - module: "rest.namespaces.logs" + module: "rest.logs" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/logs.py" --- # `FaxLogs` diff --git a/fern/products/sdk-reference/python/rest/namespaces/logs/index.mdx b/fern/products/sdk-reference/python/rest/logs/index.mdx similarity index 79% rename from fern/products/sdk-reference/python/rest/namespaces/logs/index.mdx rename to fern/products/sdk-reference/python/rest/logs/index.mdx index a81bb36f91..9b582f1c3c 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/logs/index.mdx +++ b/fern/products/sdk-reference/python/rest/logs/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/logs" +slug: "/reference/python/rest/logs" title: "logs" sdk_label: "Python SDK" icon: "python" @@ -8,8 +8,8 @@ lustri: kind: "module" language: "python" qualified_name: "signalwire.rest.namespaces.logs" - parent: "signalwire.rest.namespaces" - module: "rest.namespaces" + parent: "signalwire.rest" + module: "rest" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/logs.py" --- # `logs` @@ -30,23 +30,23 @@ module logs ## Classes - + Conference log queries. - + Fax log queries. - + Logs API namespace. - + Message log queries. - + Voice log queries. diff --git a/fern/products/sdk-reference/python/rest/namespaces/logs/logs-namespace/index.mdx b/fern/products/sdk-reference/python/rest/logs/logs-namespace/index.mdx similarity index 92% rename from fern/products/sdk-reference/python/rest/namespaces/logs/logs-namespace/index.mdx rename to fern/products/sdk-reference/python/rest/logs/logs-namespace/index.mdx index 5ff5fa78cb..270353b260 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/logs/logs-namespace/index.mdx +++ b/fern/products/sdk-reference/python/rest/logs/logs-namespace/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/logs/logs-namespace" +slug: "/reference/python/rest/logs/logs-namespace" title: "LogsNamespace" sdk_label: "Python SDK" icon: "python" @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.rest.namespaces.logs.LogsNamespace" parent: "signalwire.rest.namespaces.logs" - module: "rest.namespaces.logs" + module: "rest.logs" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/logs.py" --- # `LogsNamespace` diff --git a/fern/products/sdk-reference/python/rest/namespaces/logs/message-logs/index.mdx b/fern/products/sdk-reference/python/rest/logs/message-logs/index.mdx similarity index 93% rename from fern/products/sdk-reference/python/rest/namespaces/logs/message-logs/index.mdx rename to fern/products/sdk-reference/python/rest/logs/message-logs/index.mdx index dddf0df728..9999234a42 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/logs/message-logs/index.mdx +++ b/fern/products/sdk-reference/python/rest/logs/message-logs/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/logs/message-logs" +slug: "/reference/python/rest/logs/message-logs" title: "MessageLogs" sdk_label: "Python SDK" icon: "python" @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.rest.namespaces.logs.MessageLogs" parent: "signalwire.rest.namespaces.logs" - module: "rest.namespaces.logs" + module: "rest.logs" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/logs.py" --- # `MessageLogs` diff --git a/fern/products/sdk-reference/python/rest/namespaces/logs/voice-logs/index.mdx b/fern/products/sdk-reference/python/rest/logs/voice-logs/index.mdx similarity index 94% rename from fern/products/sdk-reference/python/rest/namespaces/logs/voice-logs/index.mdx rename to fern/products/sdk-reference/python/rest/logs/voice-logs/index.mdx index 75f1f4bdcb..33515f1f88 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/logs/voice-logs/index.mdx +++ b/fern/products/sdk-reference/python/rest/logs/voice-logs/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/logs/voice-logs" +slug: "/reference/python/rest/logs/voice-logs" title: "VoiceLogs" sdk_label: "Python SDK" icon: "python" @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.rest.namespaces.logs.VoiceLogs" parent: "signalwire.rest.namespaces.logs" - module: "rest.namespaces.logs" + module: "rest.logs" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/logs.py" --- # `VoiceLogs` diff --git a/fern/products/sdk-reference/python/rest/namespaces/lookup/index.mdx b/fern/products/sdk-reference/python/rest/lookup/index.mdx similarity index 83% rename from fern/products/sdk-reference/python/rest/namespaces/lookup/index.mdx rename to fern/products/sdk-reference/python/rest/lookup/index.mdx index 1401c95e04..af7bb66907 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/lookup/index.mdx +++ b/fern/products/sdk-reference/python/rest/lookup/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/lookup" +slug: "/reference/python/rest/lookup" title: "lookup" sdk_label: "Python SDK" icon: "python" @@ -8,8 +8,8 @@ lustri: kind: "module" language: "python" qualified_name: "signalwire.rest.namespaces.lookup" - parent: "signalwire.rest.namespaces" - module: "rest.namespaces" + parent: "signalwire.rest" + module: "rest" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/lookup.py" --- # `lookup` @@ -30,7 +30,7 @@ module lookup ## Classes - + Phone number lookup (carrier, CNAM). diff --git a/fern/products/sdk-reference/python/rest/namespaces/lookup/lookup-resource/index.mdx b/fern/products/sdk-reference/python/rest/lookup/lookup-resource/index.mdx similarity index 93% rename from fern/products/sdk-reference/python/rest/namespaces/lookup/lookup-resource/index.mdx rename to fern/products/sdk-reference/python/rest/lookup/lookup-resource/index.mdx index fee81c240e..378d9457a9 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/lookup/lookup-resource/index.mdx +++ b/fern/products/sdk-reference/python/rest/lookup/lookup-resource/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/lookup/lookup-resource" +slug: "/reference/python/rest/lookup/lookup-resource" title: "LookupResource" sdk_label: "Python SDK" icon: "python" @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.rest.namespaces.lookup.LookupResource" parent: "signalwire.rest.namespaces.lookup" - module: "rest.namespaces.lookup" + module: "rest.lookup" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/lookup.py" --- # `LookupResource` diff --git a/fern/products/sdk-reference/python/rest/namespaces/mfa/index.mdx b/fern/products/sdk-reference/python/rest/mfa/index.mdx similarity index 84% rename from fern/products/sdk-reference/python/rest/namespaces/mfa/index.mdx rename to fern/products/sdk-reference/python/rest/mfa/index.mdx index 56e4a4e458..56a398f5f6 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/mfa/index.mdx +++ b/fern/products/sdk-reference/python/rest/mfa/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/mfa" +slug: "/reference/python/rest/mfa" title: "mfa" sdk_label: "Python SDK" icon: "python" @@ -8,8 +8,8 @@ lustri: kind: "module" language: "python" qualified_name: "signalwire.rest.namespaces.mfa" - parent: "signalwire.rest.namespaces" - module: "rest.namespaces" + parent: "signalwire.rest" + module: "rest" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/mfa.py" --- # `mfa` @@ -30,7 +30,7 @@ module mfa ## Classes - + Multi-factor authentication via SMS or phone call. diff --git a/fern/products/sdk-reference/python/rest/namespaces/mfa/mfa-resource/index.mdx b/fern/products/sdk-reference/python/rest/mfa/mfa-resource/index.mdx similarity index 95% rename from fern/products/sdk-reference/python/rest/namespaces/mfa/mfa-resource/index.mdx rename to fern/products/sdk-reference/python/rest/mfa/mfa-resource/index.mdx index deecbc3f68..b15d16fbaf 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/mfa/mfa-resource/index.mdx +++ b/fern/products/sdk-reference/python/rest/mfa/mfa-resource/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/mfa/mfa-resource" +slug: "/reference/python/rest/mfa/mfa-resource" title: "MfaResource" sdk_label: "Python SDK" icon: "python" @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.rest.namespaces.mfa.MfaResource" parent: "signalwire.rest.namespaces.mfa" - module: "rest.namespaces.mfa" + module: "rest.mfa" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/mfa.py" --- # `MfaResource` diff --git a/fern/products/sdk-reference/python/rest/namespaces/index.mdx b/fern/products/sdk-reference/python/rest/namespaces/index.mdx deleted file mode 100644 index d5042005b8..0000000000 --- a/fern/products/sdk-reference/python/rest/namespaces/index.mdx +++ /dev/null @@ -1,120 +0,0 @@ ---- -slug: "/reference/python/rest/namespaces" -title: "namespaces" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.rest.namespaces" - parent: "signalwire.rest" - module: "rest" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/__init__.py" ---- -# `namespaces` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module namespaces -``` - -## Modules - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - -## Source - -[`signalwire/signalwire/rest/namespaces/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/__init__.py) diff --git a/fern/products/sdk-reference/python/rest/namespaces/number-groups/index.mdx b/fern/products/sdk-reference/python/rest/number-groups/index.mdx similarity index 82% rename from fern/products/sdk-reference/python/rest/namespaces/number-groups/index.mdx rename to fern/products/sdk-reference/python/rest/number-groups/index.mdx index f4d0c324ff..2eb3268e50 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/number-groups/index.mdx +++ b/fern/products/sdk-reference/python/rest/number-groups/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/number-groups" +slug: "/reference/python/rest/number-groups" title: "number_groups" sdk_label: "Python SDK" icon: "python" @@ -8,8 +8,8 @@ lustri: kind: "module" language: "python" qualified_name: "signalwire.rest.namespaces.number_groups" - parent: "signalwire.rest.namespaces" - module: "rest.namespaces" + parent: "signalwire.rest" + module: "rest" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/number_groups.py" --- # `number_groups` @@ -30,7 +30,7 @@ module number_groups ## Classes - + Number group management with membership operations. diff --git a/fern/products/sdk-reference/python/rest/namespaces/number-groups/number-groups-resource/index.mdx b/fern/products/sdk-reference/python/rest/number-groups/number-groups-resource/index.mdx similarity index 95% rename from fern/products/sdk-reference/python/rest/namespaces/number-groups/number-groups-resource/index.mdx rename to fern/products/sdk-reference/python/rest/number-groups/number-groups-resource/index.mdx index df41d2d986..9477f1eedd 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/number-groups/number-groups-resource/index.mdx +++ b/fern/products/sdk-reference/python/rest/number-groups/number-groups-resource/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/number-groups/number-groups-resource" +slug: "/reference/python/rest/number-groups/number-groups-resource" title: "NumberGroupsResource" sdk_label: "Python SDK" icon: "python" @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.rest.namespaces.number_groups.NumberGroupsResource" parent: "signalwire.rest.namespaces.number_groups" - module: "rest.namespaces.number_groups" + module: "rest.number_groups" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/number_groups.py" --- # `NumberGroupsResource` diff --git a/fern/products/sdk-reference/python/rest/namespaces/phone-numbers/index.mdx b/fern/products/sdk-reference/python/rest/phone-numbers/index.mdx similarity index 82% rename from fern/products/sdk-reference/python/rest/namespaces/phone-numbers/index.mdx rename to fern/products/sdk-reference/python/rest/phone-numbers/index.mdx index 2fc1297b63..386d5e8a34 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/phone-numbers/index.mdx +++ b/fern/products/sdk-reference/python/rest/phone-numbers/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/phone-numbers" +slug: "/reference/python/rest/phone-numbers" title: "phone_numbers" sdk_label: "Python SDK" icon: "python" @@ -8,8 +8,8 @@ lustri: kind: "module" language: "python" qualified_name: "signalwire.rest.namespaces.phone_numbers" - parent: "signalwire.rest.namespaces" - module: "rest.namespaces" + parent: "signalwire.rest" + module: "rest" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/phone_numbers.py" --- # `phone_numbers` @@ -30,7 +30,7 @@ module phone_numbers ## Classes - + Phone number management. diff --git a/fern/products/sdk-reference/python/rest/namespaces/phone-numbers/phone-numbers-resource/index.mdx b/fern/products/sdk-reference/python/rest/phone-numbers/phone-numbers-resource/index.mdx similarity index 98% rename from fern/products/sdk-reference/python/rest/namespaces/phone-numbers/phone-numbers-resource/index.mdx rename to fern/products/sdk-reference/python/rest/phone-numbers/phone-numbers-resource/index.mdx index 6a861b4164..9e1907331f 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/phone-numbers/phone-numbers-resource/index.mdx +++ b/fern/products/sdk-reference/python/rest/phone-numbers/phone-numbers-resource/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/phone-numbers/phone-numbers-resource" +slug: "/reference/python/rest/phone-numbers/phone-numbers-resource" title: "PhoneNumbersResource" sdk_label: "Python SDK" icon: "python" @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.rest.namespaces.phone_numbers.PhoneNumbersResource" parent: "signalwire.rest.namespaces.phone_numbers" - module: "rest.namespaces.phone_numbers" + module: "rest.phone_numbers" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/phone_numbers.py" --- # `PhoneNumbersResource` diff --git a/fern/products/sdk-reference/python/rest/namespaces/project/index.mdx b/fern/products/sdk-reference/python/rest/project/index.mdx similarity index 81% rename from fern/products/sdk-reference/python/rest/namespaces/project/index.mdx rename to fern/products/sdk-reference/python/rest/project/index.mdx index 5c7a396ef3..3509fdb838 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/project/index.mdx +++ b/fern/products/sdk-reference/python/rest/project/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/project" +slug: "/reference/python/rest/project" title: "project" sdk_label: "Python SDK" icon: "python" @@ -8,8 +8,8 @@ lustri: kind: "module" language: "python" qualified_name: "signalwire.rest.namespaces.project" - parent: "signalwire.rest.namespaces" - module: "rest.namespaces" + parent: "signalwire.rest" + module: "rest" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/project.py" --- # `project` @@ -30,11 +30,11 @@ module project ## Classes - + Project API namespace. - + Project API token management. diff --git a/fern/products/sdk-reference/python/rest/namespaces/project/project-namespace/index.mdx b/fern/products/sdk-reference/python/rest/project/project-namespace/index.mdx similarity index 90% rename from fern/products/sdk-reference/python/rest/namespaces/project/project-namespace/index.mdx rename to fern/products/sdk-reference/python/rest/project/project-namespace/index.mdx index 6b7ea34994..e33953d2c5 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/project/project-namespace/index.mdx +++ b/fern/products/sdk-reference/python/rest/project/project-namespace/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/project/project-namespace" +slug: "/reference/python/rest/project/project-namespace" title: "ProjectNamespace" sdk_label: "Python SDK" icon: "python" @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.rest.namespaces.project.ProjectNamespace" parent: "signalwire.rest.namespaces.project" - module: "rest.namespaces.project" + module: "rest.project" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/project.py" --- # `ProjectNamespace` diff --git a/fern/products/sdk-reference/python/rest/namespaces/project/project-tokens/index.mdx b/fern/products/sdk-reference/python/rest/project/project-tokens/index.mdx similarity index 95% rename from fern/products/sdk-reference/python/rest/namespaces/project/project-tokens/index.mdx rename to fern/products/sdk-reference/python/rest/project/project-tokens/index.mdx index 8911e88150..4d6e009815 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/project/project-tokens/index.mdx +++ b/fern/products/sdk-reference/python/rest/project/project-tokens/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/project/project-tokens" +slug: "/reference/python/rest/project/project-tokens" title: "ProjectTokens" sdk_label: "Python SDK" icon: "python" @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.rest.namespaces.project.ProjectTokens" parent: "signalwire.rest.namespaces.project" - module: "rest.namespaces.project" + module: "rest.project" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/project.py" --- # `ProjectTokens` diff --git a/fern/products/sdk-reference/python/rest/namespaces/pubsub/index.mdx b/fern/products/sdk-reference/python/rest/pubsub/index.mdx similarity index 83% rename from fern/products/sdk-reference/python/rest/namespaces/pubsub/index.mdx rename to fern/products/sdk-reference/python/rest/pubsub/index.mdx index 21f38c4f64..d6435aaa9e 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/pubsub/index.mdx +++ b/fern/products/sdk-reference/python/rest/pubsub/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/pubsub" +slug: "/reference/python/rest/pubsub" title: "pubsub" sdk_label: "Python SDK" icon: "python" @@ -8,8 +8,8 @@ lustri: kind: "module" language: "python" qualified_name: "signalwire.rest.namespaces.pubsub" - parent: "signalwire.rest.namespaces" - module: "rest.namespaces" + parent: "signalwire.rest" + module: "rest" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/pubsub.py" --- # `pubsub` @@ -30,7 +30,7 @@ module pubsub ## Classes - + PubSub token generation. diff --git a/fern/products/sdk-reference/python/rest/namespaces/pubsub/pub-sub-resource/index.mdx b/fern/products/sdk-reference/python/rest/pubsub/pub-sub-resource/index.mdx similarity index 93% rename from fern/products/sdk-reference/python/rest/namespaces/pubsub/pub-sub-resource/index.mdx rename to fern/products/sdk-reference/python/rest/pubsub/pub-sub-resource/index.mdx index 236b793634..2509a5b6ba 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/pubsub/pub-sub-resource/index.mdx +++ b/fern/products/sdk-reference/python/rest/pubsub/pub-sub-resource/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/pubsub/pub-sub-resource" +slug: "/reference/python/rest/pubsub/pub-sub-resource" title: "PubSubResource" sdk_label: "Python SDK" icon: "python" @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.rest.namespaces.pubsub.PubSubResource" parent: "signalwire.rest.namespaces.pubsub" - module: "rest.namespaces.pubsub" + module: "rest.pubsub" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/pubsub.py" --- # `PubSubResource` diff --git a/fern/products/sdk-reference/python/rest/namespaces/queues/index.mdx b/fern/products/sdk-reference/python/rest/queues/index.mdx similarity index 83% rename from fern/products/sdk-reference/python/rest/namespaces/queues/index.mdx rename to fern/products/sdk-reference/python/rest/queues/index.mdx index 355b515274..86ae968840 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/queues/index.mdx +++ b/fern/products/sdk-reference/python/rest/queues/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/queues" +slug: "/reference/python/rest/queues" title: "queues" sdk_label: "Python SDK" icon: "python" @@ -8,8 +8,8 @@ lustri: kind: "module" language: "python" qualified_name: "signalwire.rest.namespaces.queues" - parent: "signalwire.rest.namespaces" - module: "rest.namespaces" + parent: "signalwire.rest" + module: "rest" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/queues.py" --- # `queues` @@ -30,7 +30,7 @@ module queues ## Classes - + Queue management with member operations. diff --git a/fern/products/sdk-reference/python/rest/namespaces/queues/queues-resource/index.mdx b/fern/products/sdk-reference/python/rest/queues/queues-resource/index.mdx similarity index 95% rename from fern/products/sdk-reference/python/rest/namespaces/queues/queues-resource/index.mdx rename to fern/products/sdk-reference/python/rest/queues/queues-resource/index.mdx index bac9fabf4d..dec356efc5 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/queues/queues-resource/index.mdx +++ b/fern/products/sdk-reference/python/rest/queues/queues-resource/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/queues/queues-resource" +slug: "/reference/python/rest/queues/queues-resource" title: "QueuesResource" sdk_label: "Python SDK" icon: "python" @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.rest.namespaces.queues.QueuesResource" parent: "signalwire.rest.namespaces.queues" - module: "rest.namespaces.queues" + module: "rest.queues" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/queues.py" --- # `QueuesResource` diff --git a/fern/products/sdk-reference/python/rest/namespaces/recordings/index.mdx b/fern/products/sdk-reference/python/rest/recordings/index.mdx similarity index 83% rename from fern/products/sdk-reference/python/rest/namespaces/recordings/index.mdx rename to fern/products/sdk-reference/python/rest/recordings/index.mdx index f8776834e3..6dafde9f1a 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/recordings/index.mdx +++ b/fern/products/sdk-reference/python/rest/recordings/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/recordings" +slug: "/reference/python/rest/recordings" title: "recordings" sdk_label: "Python SDK" icon: "python" @@ -8,8 +8,8 @@ lustri: kind: "module" language: "python" qualified_name: "signalwire.rest.namespaces.recordings" - parent: "signalwire.rest.namespaces" - module: "rest.namespaces" + parent: "signalwire.rest" + module: "rest" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/recordings.py" --- # `recordings` @@ -30,7 +30,7 @@ module recordings ## Classes - + Recording management (read-only + delete). diff --git a/fern/products/sdk-reference/python/rest/namespaces/recordings/recordings-resource/index.mdx b/fern/products/sdk-reference/python/rest/recordings/recordings-resource/index.mdx similarity index 94% rename from fern/products/sdk-reference/python/rest/namespaces/recordings/recordings-resource/index.mdx rename to fern/products/sdk-reference/python/rest/recordings/recordings-resource/index.mdx index be382eb7bd..6c25c5a9db 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/recordings/recordings-resource/index.mdx +++ b/fern/products/sdk-reference/python/rest/recordings/recordings-resource/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/recordings/recordings-resource" +slug: "/reference/python/rest/recordings/recordings-resource" title: "RecordingsResource" sdk_label: "Python SDK" icon: "python" @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.rest.namespaces.recordings.RecordingsResource" parent: "signalwire.rest.namespaces.recordings" - module: "rest.namespaces.recordings" + module: "rest.recordings" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/recordings.py" --- # `RecordingsResource` diff --git a/fern/products/sdk-reference/python/rest/namespaces/registry/index.mdx b/fern/products/sdk-reference/python/rest/registry/index.mdx similarity index 76% rename from fern/products/sdk-reference/python/rest/namespaces/registry/index.mdx rename to fern/products/sdk-reference/python/rest/registry/index.mdx index 44e87b10f5..6de0c6471d 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/registry/index.mdx +++ b/fern/products/sdk-reference/python/rest/registry/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/registry" +slug: "/reference/python/rest/registry" title: "registry" sdk_label: "Python SDK" icon: "python" @@ -8,8 +8,8 @@ lustri: kind: "module" language: "python" qualified_name: "signalwire.rest.namespaces.registry" - parent: "signalwire.rest.namespaces" - module: "rest.namespaces" + parent: "signalwire.rest" + module: "rest" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py" --- # `registry` @@ -30,23 +30,23 @@ module registry ## Classes - + 10DLC brand management. - + 10DLC campaign management. - + 10DLC Campaign Registry namespace. - + 10DLC number assignment management. - + 10DLC assignment order management. diff --git a/fern/products/sdk-reference/python/rest/namespaces/registry/registry-brands/index.mdx b/fern/products/sdk-reference/python/rest/registry/registry-brands/index.mdx similarity index 95% rename from fern/products/sdk-reference/python/rest/namespaces/registry/registry-brands/index.mdx rename to fern/products/sdk-reference/python/rest/registry/registry-brands/index.mdx index 9138d55d3b..5fb78cad2c 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/registry/registry-brands/index.mdx +++ b/fern/products/sdk-reference/python/rest/registry/registry-brands/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/registry/registry-brands" +slug: "/reference/python/rest/registry/registry-brands" title: "RegistryBrands" sdk_label: "Python SDK" icon: "python" @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.rest.namespaces.registry.RegistryBrands" parent: "signalwire.rest.namespaces.registry" - module: "rest.namespaces.registry" + module: "rest.registry" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py" --- # `RegistryBrands` diff --git a/fern/products/sdk-reference/python/rest/namespaces/registry/registry-campaigns/index.mdx b/fern/products/sdk-reference/python/rest/registry/registry-campaigns/index.mdx similarity index 96% rename from fern/products/sdk-reference/python/rest/namespaces/registry/registry-campaigns/index.mdx rename to fern/products/sdk-reference/python/rest/registry/registry-campaigns/index.mdx index ec90698d08..cd82978b2b 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/registry/registry-campaigns/index.mdx +++ b/fern/products/sdk-reference/python/rest/registry/registry-campaigns/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/registry/registry-campaigns" +slug: "/reference/python/rest/registry/registry-campaigns" title: "RegistryCampaigns" sdk_label: "Python SDK" icon: "python" @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.rest.namespaces.registry.RegistryCampaigns" parent: "signalwire.rest.namespaces.registry" - module: "rest.namespaces.registry" + module: "rest.registry" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py" --- # `RegistryCampaigns` diff --git a/fern/products/sdk-reference/python/rest/namespaces/registry/registry-namespace/index.mdx b/fern/products/sdk-reference/python/rest/registry/registry-namespace/index.mdx similarity index 92% rename from fern/products/sdk-reference/python/rest/namespaces/registry/registry-namespace/index.mdx rename to fern/products/sdk-reference/python/rest/registry/registry-namespace/index.mdx index 0cca43394b..a37b1759c8 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/registry/registry-namespace/index.mdx +++ b/fern/products/sdk-reference/python/rest/registry/registry-namespace/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/registry/registry-namespace" +slug: "/reference/python/rest/registry/registry-namespace" title: "RegistryNamespace" sdk_label: "Python SDK" icon: "python" @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.rest.namespaces.registry.RegistryNamespace" parent: "signalwire.rest.namespaces.registry" - module: "rest.namespaces.registry" + module: "rest.registry" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py" --- # `RegistryNamespace` diff --git a/fern/products/sdk-reference/python/rest/namespaces/registry/registry-numbers/index.mdx b/fern/products/sdk-reference/python/rest/registry/registry-numbers/index.mdx similarity index 90% rename from fern/products/sdk-reference/python/rest/namespaces/registry/registry-numbers/index.mdx rename to fern/products/sdk-reference/python/rest/registry/registry-numbers/index.mdx index f77b1b5f90..ba2e53a95a 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/registry/registry-numbers/index.mdx +++ b/fern/products/sdk-reference/python/rest/registry/registry-numbers/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/registry/registry-numbers" +slug: "/reference/python/rest/registry/registry-numbers" title: "RegistryNumbers" sdk_label: "Python SDK" icon: "python" @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.rest.namespaces.registry.RegistryNumbers" parent: "signalwire.rest.namespaces.registry" - module: "rest.namespaces.registry" + module: "rest.registry" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py" --- # `RegistryNumbers` diff --git a/fern/products/sdk-reference/python/rest/namespaces/registry/registry-orders/index.mdx b/fern/products/sdk-reference/python/rest/registry/registry-orders/index.mdx similarity index 90% rename from fern/products/sdk-reference/python/rest/namespaces/registry/registry-orders/index.mdx rename to fern/products/sdk-reference/python/rest/registry/registry-orders/index.mdx index 9755a2ed14..f4cab28393 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/registry/registry-orders/index.mdx +++ b/fern/products/sdk-reference/python/rest/registry/registry-orders/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/registry/registry-orders" +slug: "/reference/python/rest/registry/registry-orders" title: "RegistryOrders" sdk_label: "Python SDK" icon: "python" @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.rest.namespaces.registry.RegistryOrders" parent: "signalwire.rest.namespaces.registry" - module: "rest.namespaces.registry" + module: "rest.registry" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/registry.py" --- # `RegistryOrders` diff --git a/fern/products/sdk-reference/python/rest/namespaces/short-codes/index.mdx b/fern/products/sdk-reference/python/rest/short-codes/index.mdx similarity index 83% rename from fern/products/sdk-reference/python/rest/namespaces/short-codes/index.mdx rename to fern/products/sdk-reference/python/rest/short-codes/index.mdx index c6f188fdd3..441d5b3847 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/short-codes/index.mdx +++ b/fern/products/sdk-reference/python/rest/short-codes/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/short-codes" +slug: "/reference/python/rest/short-codes" title: "short_codes" sdk_label: "Python SDK" icon: "python" @@ -8,8 +8,8 @@ lustri: kind: "module" language: "python" qualified_name: "signalwire.rest.namespaces.short_codes" - parent: "signalwire.rest.namespaces" - module: "rest.namespaces" + parent: "signalwire.rest" + module: "rest" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/short_codes.py" --- # `short_codes` @@ -30,7 +30,7 @@ module short_codes ## Classes - + Short code management (read + update only). diff --git a/fern/products/sdk-reference/python/rest/namespaces/short-codes/short-codes-resource/index.mdx b/fern/products/sdk-reference/python/rest/short-codes/short-codes-resource/index.mdx similarity index 94% rename from fern/products/sdk-reference/python/rest/namespaces/short-codes/short-codes-resource/index.mdx rename to fern/products/sdk-reference/python/rest/short-codes/short-codes-resource/index.mdx index d0f64fbc6d..2765935851 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/short-codes/short-codes-resource/index.mdx +++ b/fern/products/sdk-reference/python/rest/short-codes/short-codes-resource/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/short-codes/short-codes-resource" +slug: "/reference/python/rest/short-codes/short-codes-resource" title: "ShortCodesResource" sdk_label: "Python SDK" icon: "python" @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.rest.namespaces.short_codes.ShortCodesResource" parent: "signalwire.rest.namespaces.short_codes" - module: "rest.namespaces.short_codes" + module: "rest.short_codes" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/short_codes.py" --- # `ShortCodesResource` diff --git a/fern/products/sdk-reference/python/rest/namespaces/sip-profile/index.mdx b/fern/products/sdk-reference/python/rest/sip-profile/index.mdx similarity index 82% rename from fern/products/sdk-reference/python/rest/namespaces/sip-profile/index.mdx rename to fern/products/sdk-reference/python/rest/sip-profile/index.mdx index f4d79ec58a..489bb2603a 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/sip-profile/index.mdx +++ b/fern/products/sdk-reference/python/rest/sip-profile/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/sip-profile" +slug: "/reference/python/rest/sip-profile" title: "sip_profile" sdk_label: "Python SDK" icon: "python" @@ -8,8 +8,8 @@ lustri: kind: "module" language: "python" qualified_name: "signalwire.rest.namespaces.sip_profile" - parent: "signalwire.rest.namespaces" - module: "rest.namespaces" + parent: "signalwire.rest" + module: "rest" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/sip_profile.py" --- # `sip_profile` @@ -30,7 +30,7 @@ module sip_profile ## Classes - + Project SIP profile (singleton resource). diff --git a/fern/products/sdk-reference/python/rest/namespaces/sip-profile/sip-profile-resource/index.mdx b/fern/products/sdk-reference/python/rest/sip-profile/sip-profile-resource/index.mdx similarity index 93% rename from fern/products/sdk-reference/python/rest/namespaces/sip-profile/sip-profile-resource/index.mdx rename to fern/products/sdk-reference/python/rest/sip-profile/sip-profile-resource/index.mdx index 4c41e1154c..d83026b02c 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/sip-profile/sip-profile-resource/index.mdx +++ b/fern/products/sdk-reference/python/rest/sip-profile/sip-profile-resource/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/sip-profile/sip-profile-resource" +slug: "/reference/python/rest/sip-profile/sip-profile-resource" title: "SipProfileResource" sdk_label: "Python SDK" icon: "python" @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.rest.namespaces.sip_profile.SipProfileResource" parent: "signalwire.rest.namespaces.sip_profile" - module: "rest.namespaces.sip_profile" + module: "rest.sip_profile" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/sip_profile.py" --- # `SipProfileResource` diff --git a/fern/products/sdk-reference/python/rest/namespaces/verified-callers/index.mdx b/fern/products/sdk-reference/python/rest/verified-callers/index.mdx similarity index 82% rename from fern/products/sdk-reference/python/rest/namespaces/verified-callers/index.mdx rename to fern/products/sdk-reference/python/rest/verified-callers/index.mdx index 9f781ee64a..b71268fbb4 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/verified-callers/index.mdx +++ b/fern/products/sdk-reference/python/rest/verified-callers/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/verified-callers" +slug: "/reference/python/rest/verified-callers" title: "verified_callers" sdk_label: "Python SDK" icon: "python" @@ -8,8 +8,8 @@ lustri: kind: "module" language: "python" qualified_name: "signalwire.rest.namespaces.verified_callers" - parent: "signalwire.rest.namespaces" - module: "rest.namespaces" + parent: "signalwire.rest" + module: "rest" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/verified_callers.py" --- # `verified_callers` @@ -30,7 +30,7 @@ module verified_callers ## Classes - + Verified caller ID management with verification flow. diff --git a/fern/products/sdk-reference/python/rest/namespaces/verified-callers/verified-callers-resource/index.mdx b/fern/products/sdk-reference/python/rest/verified-callers/verified-callers-resource/index.mdx similarity index 93% rename from fern/products/sdk-reference/python/rest/namespaces/verified-callers/verified-callers-resource/index.mdx rename to fern/products/sdk-reference/python/rest/verified-callers/verified-callers-resource/index.mdx index 6665125114..1f0e95d6d3 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/verified-callers/verified-callers-resource/index.mdx +++ b/fern/products/sdk-reference/python/rest/verified-callers/verified-callers-resource/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/verified-callers/verified-callers-resource" +slug: "/reference/python/rest/verified-callers/verified-callers-resource" title: "VerifiedCallersResource" sdk_label: "Python SDK" icon: "python" @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.rest.namespaces.verified_callers.VerifiedCallersResource" parent: "signalwire.rest.namespaces.verified_callers" - module: "rest.namespaces.verified_callers" + module: "rest.verified_callers" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/verified_callers.py" --- # `VerifiedCallersResource` diff --git a/fern/products/sdk-reference/python/rest/namespaces/video/index.mdx b/fern/products/sdk-reference/python/rest/video/index.mdx similarity index 75% rename from fern/products/sdk-reference/python/rest/namespaces/video/index.mdx rename to fern/products/sdk-reference/python/rest/video/index.mdx index 2e848a8510..e99946dedc 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/video/index.mdx +++ b/fern/products/sdk-reference/python/rest/video/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/video" +slug: "/reference/python/rest/video" title: "video" sdk_label: "Python SDK" icon: "python" @@ -8,8 +8,8 @@ lustri: kind: "module" language: "python" qualified_name: "signalwire.rest.namespaces.video" - parent: "signalwire.rest.namespaces" - module: "rest.namespaces" + parent: "signalwire.rest" + module: "rest" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py" --- # `video` @@ -30,35 +30,35 @@ module video ## Classes - + Video conference management with tokens and streams. - + Video conference token management. - + Video API namespace. - + Video room recording management. - + Video room management with streams. - + Video room session management. - + Video room token generation. - + Video stream management. diff --git a/fern/products/sdk-reference/python/rest/namespaces/video/video-conference-tokens/index.mdx b/fern/products/sdk-reference/python/rest/video/video-conference-tokens/index.mdx similarity index 92% rename from fern/products/sdk-reference/python/rest/namespaces/video/video-conference-tokens/index.mdx rename to fern/products/sdk-reference/python/rest/video/video-conference-tokens/index.mdx index 78253fef8a..686d29fb00 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/video/video-conference-tokens/index.mdx +++ b/fern/products/sdk-reference/python/rest/video/video-conference-tokens/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/video/video-conference-tokens" +slug: "/reference/python/rest/video/video-conference-tokens" title: "VideoConferenceTokens" sdk_label: "Python SDK" icon: "python" @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.rest.namespaces.video.VideoConferenceTokens" parent: "signalwire.rest.namespaces.video" - module: "rest.namespaces.video" + module: "rest.video" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py" --- # `VideoConferenceTokens` diff --git a/fern/products/sdk-reference/python/rest/namespaces/video/video-conferences/index.mdx b/fern/products/sdk-reference/python/rest/video/video-conferences/index.mdx similarity index 95% rename from fern/products/sdk-reference/python/rest/namespaces/video/video-conferences/index.mdx rename to fern/products/sdk-reference/python/rest/video/video-conferences/index.mdx index 1e9cd1fd2c..27833db98b 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/video/video-conferences/index.mdx +++ b/fern/products/sdk-reference/python/rest/video/video-conferences/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/video/video-conferences" +slug: "/reference/python/rest/video/video-conferences" title: "VideoConferences" sdk_label: "Python SDK" icon: "python" @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.rest.namespaces.video.VideoConferences" parent: "signalwire.rest.namespaces.video" - module: "rest.namespaces.video" + module: "rest.video" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py" --- # `VideoConferences` diff --git a/fern/products/sdk-reference/python/rest/namespaces/video/video-namespace/index.mdx b/fern/products/sdk-reference/python/rest/video/video-namespace/index.mdx similarity index 93% rename from fern/products/sdk-reference/python/rest/namespaces/video/video-namespace/index.mdx rename to fern/products/sdk-reference/python/rest/video/video-namespace/index.mdx index c4e137bdc6..66e9955d7e 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/video/video-namespace/index.mdx +++ b/fern/products/sdk-reference/python/rest/video/video-namespace/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/video/video-namespace" +slug: "/reference/python/rest/video/video-namespace" title: "VideoNamespace" sdk_label: "Python SDK" icon: "python" @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.rest.namespaces.video.VideoNamespace" parent: "signalwire.rest.namespaces.video" - module: "rest.namespaces.video" + module: "rest.video" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py" --- # `VideoNamespace` diff --git a/fern/products/sdk-reference/python/rest/namespaces/video/video-room-recordings/index.mdx b/fern/products/sdk-reference/python/rest/video/video-room-recordings/index.mdx similarity index 95% rename from fern/products/sdk-reference/python/rest/namespaces/video/video-room-recordings/index.mdx rename to fern/products/sdk-reference/python/rest/video/video-room-recordings/index.mdx index a0fcb82a35..83302ed0c8 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/video/video-room-recordings/index.mdx +++ b/fern/products/sdk-reference/python/rest/video/video-room-recordings/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/video/video-room-recordings" +slug: "/reference/python/rest/video/video-room-recordings" title: "VideoRoomRecordings" sdk_label: "Python SDK" icon: "python" @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.rest.namespaces.video.VideoRoomRecordings" parent: "signalwire.rest.namespaces.video" - module: "rest.namespaces.video" + module: "rest.video" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py" --- # `VideoRoomRecordings` diff --git a/fern/products/sdk-reference/python/rest/namespaces/video/video-room-sessions/index.mdx b/fern/products/sdk-reference/python/rest/video/video-room-sessions/index.mdx similarity index 96% rename from fern/products/sdk-reference/python/rest/namespaces/video/video-room-sessions/index.mdx rename to fern/products/sdk-reference/python/rest/video/video-room-sessions/index.mdx index 3635143b24..d3b6e6b294 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/video/video-room-sessions/index.mdx +++ b/fern/products/sdk-reference/python/rest/video/video-room-sessions/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/video/video-room-sessions" +slug: "/reference/python/rest/video/video-room-sessions" title: "VideoRoomSessions" sdk_label: "Python SDK" icon: "python" @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.rest.namespaces.video.VideoRoomSessions" parent: "signalwire.rest.namespaces.video" - module: "rest.namespaces.video" + module: "rest.video" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py" --- # `VideoRoomSessions` diff --git a/fern/products/sdk-reference/python/rest/namespaces/video/video-room-tokens/index.mdx b/fern/products/sdk-reference/python/rest/video/video-room-tokens/index.mdx similarity index 91% rename from fern/products/sdk-reference/python/rest/namespaces/video/video-room-tokens/index.mdx rename to fern/products/sdk-reference/python/rest/video/video-room-tokens/index.mdx index 3d8410efbe..a06dfc3b82 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/video/video-room-tokens/index.mdx +++ b/fern/products/sdk-reference/python/rest/video/video-room-tokens/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/video/video-room-tokens" +slug: "/reference/python/rest/video/video-room-tokens" title: "VideoRoomTokens" sdk_label: "Python SDK" icon: "python" @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.rest.namespaces.video.VideoRoomTokens" parent: "signalwire.rest.namespaces.video" - module: "rest.namespaces.video" + module: "rest.video" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py" --- # `VideoRoomTokens` diff --git a/fern/products/sdk-reference/python/rest/namespaces/video/video-rooms/index.mdx b/fern/products/sdk-reference/python/rest/video/video-rooms/index.mdx similarity index 93% rename from fern/products/sdk-reference/python/rest/namespaces/video/video-rooms/index.mdx rename to fern/products/sdk-reference/python/rest/video/video-rooms/index.mdx index 610042de98..fd5c7ee7e8 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/video/video-rooms/index.mdx +++ b/fern/products/sdk-reference/python/rest/video/video-rooms/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/video/video-rooms" +slug: "/reference/python/rest/video/video-rooms" title: "VideoRooms" sdk_label: "Python SDK" icon: "python" @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.rest.namespaces.video.VideoRooms" parent: "signalwire.rest.namespaces.video" - module: "rest.namespaces.video" + module: "rest.video" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py" --- # `VideoRooms` diff --git a/fern/products/sdk-reference/python/rest/namespaces/video/video-streams/index.mdx b/fern/products/sdk-reference/python/rest/video/video-streams/index.mdx similarity index 94% rename from fern/products/sdk-reference/python/rest/namespaces/video/video-streams/index.mdx rename to fern/products/sdk-reference/python/rest/video/video-streams/index.mdx index 15735b3a72..7ebc4ae95b 100644 --- a/fern/products/sdk-reference/python/rest/namespaces/video/video-streams/index.mdx +++ b/fern/products/sdk-reference/python/rest/video/video-streams/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/rest/namespaces/video/video-streams" +slug: "/reference/python/rest/video/video-streams" title: "VideoStreams" sdk_label: "Python SDK" icon: "python" @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.rest.namespaces.video.VideoStreams" parent: "signalwire.rest.namespaces.video" - module: "rest.namespaces.video" + module: "rest.video" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/video.py" --- # `VideoStreams` diff --git a/fern/products/sdk-reference/rust/_meta.json b/fern/products/sdk-reference/rust/_meta.json index cceef1937b..7cbb27c58a 100644 --- a/fern/products/sdk-reference/rust/_meta.json +++ b/fern/products/sdk-reference/rust/_meta.json @@ -6,5 +6,5 @@ "format": "mdx", "platform": "fern", "base_slug": "/reference/rust", - "item_count": 1910 + "item_count": 1909 } \ No newline at end of file diff --git a/fern/products/sdk-reference/rust/rest/namespaces/calling/index.mdx b/fern/products/sdk-reference/rust/rest/calling/index.mdx similarity index 99% rename from fern/products/sdk-reference/rust/rest/namespaces/calling/index.mdx rename to fern/products/sdk-reference/rust/rest/calling/index.mdx index 3955448bdc..39350f0086 100644 --- a/fern/products/sdk-reference/rust/rest/namespaces/calling/index.mdx +++ b/fern/products/sdk-reference/rust/rest/calling/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/rust/rest/namespaces/calling" +slug: "/reference/rust/rest/calling" title: "calling" sdk_label: "Rust SDK" icon: "rust" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "rust" qualified_name: "signalwire::rest::namespaces::calling" - parent: "signalwire::rest::namespaces" - module: "rest.namespaces" + parent: "signalwire::rest" + module: "rest" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/calling.rs" visibility: "public" --- diff --git a/fern/products/sdk-reference/rust/rest/namespaces/compat/compat-accounts/index.mdx b/fern/products/sdk-reference/rust/rest/compat/compat-accounts/index.mdx similarity index 96% rename from fern/products/sdk-reference/rust/rest/namespaces/compat/compat-accounts/index.mdx rename to fern/products/sdk-reference/rust/rest/compat/compat-accounts/index.mdx index 0a7296edf7..712578b473 100644 --- a/fern/products/sdk-reference/rust/rest/namespaces/compat/compat-accounts/index.mdx +++ b/fern/products/sdk-reference/rust/rest/compat/compat-accounts/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/rust/rest/namespaces/compat/compat-accounts" +slug: "/reference/rust/rest/compat/compat-accounts" title: "CompatAccounts" sdk_label: "Rust SDK" icon: "rust" @@ -9,7 +9,7 @@ lustri: language: "rust" qualified_name: "signalwire::rest::namespaces::compat::CompatAccounts" parent: "rest.namespaces.compat" - module: "rest.namespaces.compat" + module: "rest.compat" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs" visibility: "public" --- diff --git a/fern/products/sdk-reference/rust/rest/namespaces/compat/compat-applications/index.mdx b/fern/products/sdk-reference/rust/rest/compat/compat-applications/index.mdx similarity index 96% rename from fern/products/sdk-reference/rust/rest/namespaces/compat/compat-applications/index.mdx rename to fern/products/sdk-reference/rust/rest/compat/compat-applications/index.mdx index db7bba8f4c..8bd95bf155 100644 --- a/fern/products/sdk-reference/rust/rest/namespaces/compat/compat-applications/index.mdx +++ b/fern/products/sdk-reference/rust/rest/compat/compat-applications/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/rust/rest/namespaces/compat/compat-applications" +slug: "/reference/rust/rest/compat/compat-applications" title: "CompatApplications" sdk_label: "Rust SDK" icon: "rust" @@ -9,7 +9,7 @@ lustri: language: "rust" qualified_name: "signalwire::rest::namespaces::compat::CompatApplications" parent: "rest.namespaces.compat" - module: "rest.namespaces.compat" + module: "rest.compat" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs" visibility: "public" --- diff --git a/fern/products/sdk-reference/rust/rest/namespaces/compat/compat-calls/index.mdx b/fern/products/sdk-reference/rust/rest/compat/compat-calls/index.mdx similarity index 97% rename from fern/products/sdk-reference/rust/rest/namespaces/compat/compat-calls/index.mdx rename to fern/products/sdk-reference/rust/rest/compat/compat-calls/index.mdx index b9a9d46f15..7a9a483642 100644 --- a/fern/products/sdk-reference/rust/rest/namespaces/compat/compat-calls/index.mdx +++ b/fern/products/sdk-reference/rust/rest/compat/compat-calls/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/rust/rest/namespaces/compat/compat-calls" +slug: "/reference/rust/rest/compat/compat-calls" title: "CompatCalls" sdk_label: "Rust SDK" icon: "rust" @@ -9,7 +9,7 @@ lustri: language: "rust" qualified_name: "signalwire::rest::namespaces::compat::CompatCalls" parent: "rest.namespaces.compat" - module: "rest.namespaces.compat" + module: "rest.compat" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs" visibility: "public" --- diff --git a/fern/products/sdk-reference/rust/rest/namespaces/compat/compat-conferences/index.mdx b/fern/products/sdk-reference/rust/rest/compat/compat-conferences/index.mdx similarity index 98% rename from fern/products/sdk-reference/rust/rest/namespaces/compat/compat-conferences/index.mdx rename to fern/products/sdk-reference/rust/rest/compat/compat-conferences/index.mdx index 97fd6ffc23..50af26996b 100644 --- a/fern/products/sdk-reference/rust/rest/namespaces/compat/compat-conferences/index.mdx +++ b/fern/products/sdk-reference/rust/rest/compat/compat-conferences/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/rust/rest/namespaces/compat/compat-conferences" +slug: "/reference/rust/rest/compat/compat-conferences" title: "CompatConferences" sdk_label: "Rust SDK" icon: "rust" @@ -9,7 +9,7 @@ lustri: language: "rust" qualified_name: "signalwire::rest::namespaces::compat::CompatConferences" parent: "rest.namespaces.compat" - module: "rest.namespaces.compat" + module: "rest.compat" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs" visibility: "public" --- diff --git a/fern/products/sdk-reference/rust/rest/namespaces/compat/compat-faxes/index.mdx b/fern/products/sdk-reference/rust/rest/compat/compat-faxes/index.mdx similarity index 97% rename from fern/products/sdk-reference/rust/rest/namespaces/compat/compat-faxes/index.mdx rename to fern/products/sdk-reference/rust/rest/compat/compat-faxes/index.mdx index 056188f334..1a58eb4c9a 100644 --- a/fern/products/sdk-reference/rust/rest/namespaces/compat/compat-faxes/index.mdx +++ b/fern/products/sdk-reference/rust/rest/compat/compat-faxes/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/rust/rest/namespaces/compat/compat-faxes" +slug: "/reference/rust/rest/compat/compat-faxes" title: "CompatFaxes" sdk_label: "Rust SDK" icon: "rust" @@ -9,7 +9,7 @@ lustri: language: "rust" qualified_name: "signalwire::rest::namespaces::compat::CompatFaxes" parent: "rest.namespaces.compat" - module: "rest.namespaces.compat" + module: "rest.compat" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs" visibility: "public" --- diff --git a/fern/products/sdk-reference/rust/rest/namespaces/compat/compat-laml-bins/index.mdx b/fern/products/sdk-reference/rust/rest/compat/compat-laml-bins/index.mdx similarity index 96% rename from fern/products/sdk-reference/rust/rest/namespaces/compat/compat-laml-bins/index.mdx rename to fern/products/sdk-reference/rust/rest/compat/compat-laml-bins/index.mdx index e78830a9b3..7347483dbe 100644 --- a/fern/products/sdk-reference/rust/rest/namespaces/compat/compat-laml-bins/index.mdx +++ b/fern/products/sdk-reference/rust/rest/compat/compat-laml-bins/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/rust/rest/namespaces/compat/compat-laml-bins" +slug: "/reference/rust/rest/compat/compat-laml-bins" title: "CompatLamlBins" sdk_label: "Rust SDK" icon: "rust" @@ -9,7 +9,7 @@ lustri: language: "rust" qualified_name: "signalwire::rest::namespaces::compat::CompatLamlBins" parent: "rest.namespaces.compat" - module: "rest.namespaces.compat" + module: "rest.compat" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs" visibility: "public" --- diff --git a/fern/products/sdk-reference/rust/rest/namespaces/compat/compat-messages/index.mdx b/fern/products/sdk-reference/rust/rest/compat/compat-messages/index.mdx similarity index 97% rename from fern/products/sdk-reference/rust/rest/namespaces/compat/compat-messages/index.mdx rename to fern/products/sdk-reference/rust/rest/compat/compat-messages/index.mdx index 039736067b..faaaf7d3ce 100644 --- a/fern/products/sdk-reference/rust/rest/namespaces/compat/compat-messages/index.mdx +++ b/fern/products/sdk-reference/rust/rest/compat/compat-messages/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/rust/rest/namespaces/compat/compat-messages" +slug: "/reference/rust/rest/compat/compat-messages" title: "CompatMessages" sdk_label: "Rust SDK" icon: "rust" @@ -9,7 +9,7 @@ lustri: language: "rust" qualified_name: "signalwire::rest::namespaces::compat::CompatMessages" parent: "rest.namespaces.compat" - module: "rest.namespaces.compat" + module: "rest.compat" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs" visibility: "public" --- diff --git a/fern/products/sdk-reference/rust/rest/namespaces/compat/compat-phone-numbers/index.mdx b/fern/products/sdk-reference/rust/rest/compat/compat-phone-numbers/index.mdx similarity index 97% rename from fern/products/sdk-reference/rust/rest/namespaces/compat/compat-phone-numbers/index.mdx rename to fern/products/sdk-reference/rust/rest/compat/compat-phone-numbers/index.mdx index b5882fef83..f328a2ec6b 100644 --- a/fern/products/sdk-reference/rust/rest/namespaces/compat/compat-phone-numbers/index.mdx +++ b/fern/products/sdk-reference/rust/rest/compat/compat-phone-numbers/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/rust/rest/namespaces/compat/compat-phone-numbers" +slug: "/reference/rust/rest/compat/compat-phone-numbers" title: "CompatPhoneNumbers" sdk_label: "Rust SDK" icon: "rust" @@ -9,7 +9,7 @@ lustri: language: "rust" qualified_name: "signalwire::rest::namespaces::compat::CompatPhoneNumbers" parent: "rest.namespaces.compat" - module: "rest.namespaces.compat" + module: "rest.compat" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs" visibility: "public" --- diff --git a/fern/products/sdk-reference/rust/rest/namespaces/compat/compat-queues/index.mdx b/fern/products/sdk-reference/rust/rest/compat/compat-queues/index.mdx similarity index 97% rename from fern/products/sdk-reference/rust/rest/namespaces/compat/compat-queues/index.mdx rename to fern/products/sdk-reference/rust/rest/compat/compat-queues/index.mdx index 4ceac9adf1..40096c49c2 100644 --- a/fern/products/sdk-reference/rust/rest/namespaces/compat/compat-queues/index.mdx +++ b/fern/products/sdk-reference/rust/rest/compat/compat-queues/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/rust/rest/namespaces/compat/compat-queues" +slug: "/reference/rust/rest/compat/compat-queues" title: "CompatQueues" sdk_label: "Rust SDK" icon: "rust" @@ -9,7 +9,7 @@ lustri: language: "rust" qualified_name: "signalwire::rest::namespaces::compat::CompatQueues" parent: "rest.namespaces.compat" - module: "rest.namespaces.compat" + module: "rest.compat" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs" visibility: "public" --- diff --git a/fern/products/sdk-reference/rust/rest/namespaces/compat/compat-recordings/index.mdx b/fern/products/sdk-reference/rust/rest/compat/compat-recordings/index.mdx similarity index 95% rename from fern/products/sdk-reference/rust/rest/namespaces/compat/compat-recordings/index.mdx rename to fern/products/sdk-reference/rust/rest/compat/compat-recordings/index.mdx index 69b18b9223..c0d2706278 100644 --- a/fern/products/sdk-reference/rust/rest/namespaces/compat/compat-recordings/index.mdx +++ b/fern/products/sdk-reference/rust/rest/compat/compat-recordings/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/rust/rest/namespaces/compat/compat-recordings" +slug: "/reference/rust/rest/compat/compat-recordings" title: "CompatRecordings" sdk_label: "Rust SDK" icon: "rust" @@ -9,7 +9,7 @@ lustri: language: "rust" qualified_name: "signalwire::rest::namespaces::compat::CompatRecordings" parent: "rest.namespaces.compat" - module: "rest.namespaces.compat" + module: "rest.compat" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs" visibility: "public" --- diff --git a/fern/products/sdk-reference/rust/rest/namespaces/compat/compat-tokens/index.mdx b/fern/products/sdk-reference/rust/rest/compat/compat-tokens/index.mdx similarity index 95% rename from fern/products/sdk-reference/rust/rest/namespaces/compat/compat-tokens/index.mdx rename to fern/products/sdk-reference/rust/rest/compat/compat-tokens/index.mdx index b45f265f89..0be11fe5f0 100644 --- a/fern/products/sdk-reference/rust/rest/namespaces/compat/compat-tokens/index.mdx +++ b/fern/products/sdk-reference/rust/rest/compat/compat-tokens/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/rust/rest/namespaces/compat/compat-tokens" +slug: "/reference/rust/rest/compat/compat-tokens" title: "CompatTokens" sdk_label: "Rust SDK" icon: "rust" @@ -9,7 +9,7 @@ lustri: language: "rust" qualified_name: "signalwire::rest::namespaces::compat::CompatTokens" parent: "rest.namespaces.compat" - module: "rest.namespaces.compat" + module: "rest.compat" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs" visibility: "public" --- diff --git a/fern/products/sdk-reference/rust/rest/namespaces/compat/compat-transcriptions/index.mdx b/fern/products/sdk-reference/rust/rest/compat/compat-transcriptions/index.mdx similarity index 95% rename from fern/products/sdk-reference/rust/rest/namespaces/compat/compat-transcriptions/index.mdx rename to fern/products/sdk-reference/rust/rest/compat/compat-transcriptions/index.mdx index 0a47fb54d3..46aa991b93 100644 --- a/fern/products/sdk-reference/rust/rest/namespaces/compat/compat-transcriptions/index.mdx +++ b/fern/products/sdk-reference/rust/rest/compat/compat-transcriptions/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/rust/rest/namespaces/compat/compat-transcriptions" +slug: "/reference/rust/rest/compat/compat-transcriptions" title: "CompatTranscriptions" sdk_label: "Rust SDK" icon: "rust" @@ -9,7 +9,7 @@ lustri: language: "rust" qualified_name: "signalwire::rest::namespaces::compat::CompatTranscriptions" parent: "rest.namespaces.compat" - module: "rest.namespaces.compat" + module: "rest.compat" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs" visibility: "public" --- diff --git a/fern/products/sdk-reference/rust/rest/namespaces/compat/index.mdx b/fern/products/sdk-reference/rust/rest/compat/index.mdx similarity index 97% rename from fern/products/sdk-reference/rust/rest/namespaces/compat/index.mdx rename to fern/products/sdk-reference/rust/rest/compat/index.mdx index bbf3810687..88db10e470 100644 --- a/fern/products/sdk-reference/rust/rest/namespaces/compat/index.mdx +++ b/fern/products/sdk-reference/rust/rest/compat/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/rust/rest/namespaces/compat" +slug: "/reference/rust/rest/compat" title: "compat" sdk_label: "Rust SDK" icon: "rust" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "rust" qualified_name: "signalwire::rest::namespaces::compat" - parent: "signalwire::rest::namespaces" - module: "rest.namespaces" + parent: "signalwire::rest" + module: "rest" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs" visibility: "public" --- diff --git a/fern/products/sdk-reference/rust/rest/namespaces/compat/index__2.mdx b/fern/products/sdk-reference/rust/rest/compat/index__2.mdx similarity index 57% rename from fern/products/sdk-reference/rust/rest/namespaces/compat/index__2.mdx rename to fern/products/sdk-reference/rust/rest/compat/index__2.mdx index a4fe875579..6273221530 100644 --- a/fern/products/sdk-reference/rust/rest/namespaces/compat/index__2.mdx +++ b/fern/products/sdk-reference/rust/rest/compat/index__2.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/rust/rest/namespaces/compat/index__2" +slug: "/reference/rust/rest/compat/index__2" title: "compat" sdk_label: "Rust SDK" icon: "rust" @@ -8,35 +8,35 @@ lustri: kind: "module" language: "rust" qualified_name: "rest.namespaces.compat" - parent: "signalwire::rest::namespaces" - module: "rest.namespaces" + parent: "signalwire::rest" + module: "rest" --- # `compat` ## Classes - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/fern/products/sdk-reference/rust/rest/namespaces/datasphere/datasphere-documents/index.mdx b/fern/products/sdk-reference/rust/rest/datasphere/datasphere-documents/index.mdx similarity index 97% rename from fern/products/sdk-reference/rust/rest/namespaces/datasphere/datasphere-documents/index.mdx rename to fern/products/sdk-reference/rust/rest/datasphere/datasphere-documents/index.mdx index 1e82c10b52..3397683624 100644 --- a/fern/products/sdk-reference/rust/rest/namespaces/datasphere/datasphere-documents/index.mdx +++ b/fern/products/sdk-reference/rust/rest/datasphere/datasphere-documents/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/rust/rest/namespaces/datasphere/datasphere-documents" +slug: "/reference/rust/rest/datasphere/datasphere-documents" title: "DatasphereDocuments" sdk_label: "Rust SDK" icon: "rust" @@ -9,7 +9,7 @@ lustri: language: "rust" qualified_name: "signalwire::rest::namespaces::datasphere::DatasphereDocuments" parent: "signalwire::rest::namespaces::datasphere" - module: "rest.namespaces.datasphere" + module: "rest.datasphere" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/datasphere.rs" visibility: "public" --- diff --git a/fern/products/sdk-reference/rust/rest/namespaces/datasphere/datasphere-namespace/index.mdx b/fern/products/sdk-reference/rust/rest/datasphere/datasphere-namespace/index.mdx similarity index 92% rename from fern/products/sdk-reference/rust/rest/namespaces/datasphere/datasphere-namespace/index.mdx rename to fern/products/sdk-reference/rust/rest/datasphere/datasphere-namespace/index.mdx index f5cfadde52..444a2e97e6 100644 --- a/fern/products/sdk-reference/rust/rest/namespaces/datasphere/datasphere-namespace/index.mdx +++ b/fern/products/sdk-reference/rust/rest/datasphere/datasphere-namespace/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/rust/rest/namespaces/datasphere/datasphere-namespace" +slug: "/reference/rust/rest/datasphere/datasphere-namespace" title: "DatasphereNamespace" sdk_label: "Rust SDK" icon: "rust" @@ -9,7 +9,7 @@ lustri: language: "rust" qualified_name: "signalwire::rest::namespaces::datasphere::DatasphereNamespace" parent: "signalwire::rest::namespaces::datasphere" - module: "rest.namespaces.datasphere" + module: "rest.datasphere" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/datasphere.rs" visibility: "public" --- diff --git a/fern/products/sdk-reference/rust/rest/namespaces/datasphere/index.mdx b/fern/products/sdk-reference/rust/rest/datasphere/index.mdx similarity index 75% rename from fern/products/sdk-reference/rust/rest/namespaces/datasphere/index.mdx rename to fern/products/sdk-reference/rust/rest/datasphere/index.mdx index 938d084e84..fbb3dc5d06 100644 --- a/fern/products/sdk-reference/rust/rest/namespaces/datasphere/index.mdx +++ b/fern/products/sdk-reference/rust/rest/datasphere/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/rust/rest/namespaces/datasphere" +slug: "/reference/rust/rest/datasphere" title: "datasphere" sdk_label: "Rust SDK" icon: "rust" @@ -8,8 +8,8 @@ lustri: kind: "module" language: "rust" qualified_name: "signalwire::rest::namespaces::datasphere" - parent: "signalwire::rest::namespaces" - module: "rest.namespaces" + parent: "signalwire::rest" + module: "rest" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/datasphere.rs" visibility: "public" --- @@ -18,11 +18,11 @@ lustri: ## Classes - + Datasphere documents resource. - + Datasphere API namespace — exposes documents. diff --git a/fern/products/sdk-reference/rust/rest/namespaces/fabric/call-flows-resource/index.mdx b/fern/products/sdk-reference/rust/rest/fabric/call-flows-resource/index.mdx similarity index 97% rename from fern/products/sdk-reference/rust/rest/namespaces/fabric/call-flows-resource/index.mdx rename to fern/products/sdk-reference/rust/rest/fabric/call-flows-resource/index.mdx index 7d28d2a293..60ff04b0d7 100644 --- a/fern/products/sdk-reference/rust/rest/namespaces/fabric/call-flows-resource/index.mdx +++ b/fern/products/sdk-reference/rust/rest/fabric/call-flows-resource/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/rust/rest/namespaces/fabric/call-flows-resource" +slug: "/reference/rust/rest/fabric/call-flows-resource" title: "CallFlowsResource" sdk_label: "Rust SDK" icon: "rust" @@ -9,7 +9,7 @@ lustri: language: "rust" qualified_name: "signalwire::rest::namespaces::fabric::CallFlowsResource" parent: "rest.namespaces.fabric" - module: "rest.namespaces.fabric" + module: "rest.fabric" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs" visibility: "public" --- diff --git a/fern/products/sdk-reference/rust/rest/namespaces/fabric/conference-rooms-resource/index.mdx b/fern/products/sdk-reference/rust/rest/fabric/conference-rooms-resource/index.mdx similarity index 96% rename from fern/products/sdk-reference/rust/rest/namespaces/fabric/conference-rooms-resource/index.mdx rename to fern/products/sdk-reference/rust/rest/fabric/conference-rooms-resource/index.mdx index c9424f4f6f..fd81f0d0ef 100644 --- a/fern/products/sdk-reference/rust/rest/namespaces/fabric/conference-rooms-resource/index.mdx +++ b/fern/products/sdk-reference/rust/rest/fabric/conference-rooms-resource/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/rust/rest/namespaces/fabric/conference-rooms-resource" +slug: "/reference/rust/rest/fabric/conference-rooms-resource" title: "ConferenceRoomsResource" sdk_label: "Rust SDK" icon: "rust" @@ -9,7 +9,7 @@ lustri: language: "rust" qualified_name: "signalwire::rest::namespaces::fabric::ConferenceRoomsResource" parent: "rest.namespaces.fabric" - module: "rest.namespaces.fabric" + module: "rest.fabric" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs" visibility: "public" --- diff --git a/fern/products/sdk-reference/rust/rest/namespaces/fabric/cxml-applications-resource/index.mdx b/fern/products/sdk-reference/rust/rest/fabric/cxml-applications-resource/index.mdx similarity index 96% rename from fern/products/sdk-reference/rust/rest/namespaces/fabric/cxml-applications-resource/index.mdx rename to fern/products/sdk-reference/rust/rest/fabric/cxml-applications-resource/index.mdx index 5f5ade15e5..a0c1537d6f 100644 --- a/fern/products/sdk-reference/rust/rest/namespaces/fabric/cxml-applications-resource/index.mdx +++ b/fern/products/sdk-reference/rust/rest/fabric/cxml-applications-resource/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/rust/rest/namespaces/fabric/cxml-applications-resource" +slug: "/reference/rust/rest/fabric/cxml-applications-resource" title: "CxmlApplicationsResource" sdk_label: "Rust SDK" icon: "rust" @@ -9,7 +9,7 @@ lustri: language: "rust" qualified_name: "signalwire::rest::namespaces::fabric::CxmlApplicationsResource" parent: "rest.namespaces.fabric" - module: "rest.namespaces.fabric" + module: "rest.fabric" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs" visibility: "public" --- diff --git a/fern/products/sdk-reference/rust/rest/namespaces/fabric/fabric-addresses/index.mdx b/fern/products/sdk-reference/rust/rest/fabric/fabric-addresses/index.mdx similarity index 95% rename from fern/products/sdk-reference/rust/rest/namespaces/fabric/fabric-addresses/index.mdx rename to fern/products/sdk-reference/rust/rest/fabric/fabric-addresses/index.mdx index 276c55b993..9672bc7d3f 100644 --- a/fern/products/sdk-reference/rust/rest/namespaces/fabric/fabric-addresses/index.mdx +++ b/fern/products/sdk-reference/rust/rest/fabric/fabric-addresses/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/rust/rest/namespaces/fabric/fabric-addresses" +slug: "/reference/rust/rest/fabric/fabric-addresses" title: "FabricAddresses" sdk_label: "Rust SDK" icon: "rust" @@ -9,7 +9,7 @@ lustri: language: "rust" qualified_name: "signalwire::rest::namespaces::fabric::FabricAddresses" parent: "rest.namespaces.fabric" - module: "rest.namespaces.fabric" + module: "rest.fabric" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs" visibility: "public" --- diff --git a/fern/products/sdk-reference/rust/rest/namespaces/fabric/fabric-tokens/index.mdx b/fern/products/sdk-reference/rust/rest/fabric/fabric-tokens/index.mdx similarity index 96% rename from fern/products/sdk-reference/rust/rest/namespaces/fabric/fabric-tokens/index.mdx rename to fern/products/sdk-reference/rust/rest/fabric/fabric-tokens/index.mdx index eec3514831..7e45e598af 100644 --- a/fern/products/sdk-reference/rust/rest/namespaces/fabric/fabric-tokens/index.mdx +++ b/fern/products/sdk-reference/rust/rest/fabric/fabric-tokens/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/rust/rest/namespaces/fabric/fabric-tokens" +slug: "/reference/rust/rest/fabric/fabric-tokens" title: "FabricTokens" sdk_label: "Rust SDK" icon: "rust" @@ -9,7 +9,7 @@ lustri: language: "rust" qualified_name: "signalwire::rest::namespaces::fabric::FabricTokens" parent: "rest.namespaces.fabric" - module: "rest.namespaces.fabric" + module: "rest.fabric" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs" visibility: "public" --- diff --git a/fern/products/sdk-reference/rust/rest/namespaces/fabric/generic-resources/index.mdx b/fern/products/sdk-reference/rust/rest/fabric/generic-resources/index.mdx similarity index 96% rename from fern/products/sdk-reference/rust/rest/namespaces/fabric/generic-resources/index.mdx rename to fern/products/sdk-reference/rust/rest/fabric/generic-resources/index.mdx index 9d2125de23..5c37e10835 100644 --- a/fern/products/sdk-reference/rust/rest/namespaces/fabric/generic-resources/index.mdx +++ b/fern/products/sdk-reference/rust/rest/fabric/generic-resources/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/rust/rest/namespaces/fabric/generic-resources" +slug: "/reference/rust/rest/fabric/generic-resources" title: "GenericResources" sdk_label: "Rust SDK" icon: "rust" @@ -9,7 +9,7 @@ lustri: language: "rust" qualified_name: "signalwire::rest::namespaces::fabric::GenericResources" parent: "rest.namespaces.fabric" - module: "rest.namespaces.fabric" + module: "rest.fabric" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs" visibility: "public" --- diff --git a/fern/products/sdk-reference/rust/rest/namespaces/fabric/index.mdx b/fern/products/sdk-reference/rust/rest/fabric/index.mdx similarity index 98% rename from fern/products/sdk-reference/rust/rest/namespaces/fabric/index.mdx rename to fern/products/sdk-reference/rust/rest/fabric/index.mdx index 3ce5fc5d8f..6565826ae2 100644 --- a/fern/products/sdk-reference/rust/rest/namespaces/fabric/index.mdx +++ b/fern/products/sdk-reference/rust/rest/fabric/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/rust/rest/namespaces/fabric" +slug: "/reference/rust/rest/fabric" title: "fabric" sdk_label: "Rust SDK" icon: "rust" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "rust" qualified_name: "signalwire::rest::namespaces::fabric" - parent: "signalwire::rest::namespaces" - module: "rest.namespaces" + parent: "signalwire::rest" + module: "rest" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs" visibility: "public" --- diff --git a/fern/products/sdk-reference/rust/rest/namespaces/fabric/index__2.mdx b/fern/products/sdk-reference/rust/rest/fabric/index__2.mdx similarity index 55% rename from fern/products/sdk-reference/rust/rest/namespaces/fabric/index__2.mdx rename to fern/products/sdk-reference/rust/rest/fabric/index__2.mdx index cd70e1d9ad..74a3ed98cb 100644 --- a/fern/products/sdk-reference/rust/rest/namespaces/fabric/index__2.mdx +++ b/fern/products/sdk-reference/rust/rest/fabric/index__2.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/rust/rest/namespaces/fabric/index__2" +slug: "/reference/rust/rest/fabric/index__2" title: "fabric" sdk_label: "Rust SDK" icon: "rust" @@ -8,25 +8,25 @@ lustri: kind: "module" language: "rust" qualified_name: "rest.namespaces.fabric" - parent: "signalwire::rest::namespaces" - module: "rest.namespaces" + parent: "signalwire::rest" + module: "rest" --- # `fabric` ## Classes - + - + - + - + - + - + - + diff --git a/fern/products/sdk-reference/rust/rest/namespaces/fabric/subscribers-resource/index.mdx b/fern/products/sdk-reference/rust/rest/fabric/subscribers-resource/index.mdx similarity index 98% rename from fern/products/sdk-reference/rust/rest/namespaces/fabric/subscribers-resource/index.mdx rename to fern/products/sdk-reference/rust/rest/fabric/subscribers-resource/index.mdx index 8dda44f538..252dbd56af 100644 --- a/fern/products/sdk-reference/rust/rest/namespaces/fabric/subscribers-resource/index.mdx +++ b/fern/products/sdk-reference/rust/rest/fabric/subscribers-resource/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/rust/rest/namespaces/fabric/subscribers-resource" +slug: "/reference/rust/rest/fabric/subscribers-resource" title: "SubscribersResource" sdk_label: "Rust SDK" icon: "rust" @@ -9,7 +9,7 @@ lustri: language: "rust" qualified_name: "signalwire::rest::namespaces::fabric::SubscribersResource" parent: "rest.namespaces.fabric" - module: "rest.namespaces.fabric" + module: "rest.fabric" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs" visibility: "public" --- diff --git a/fern/products/sdk-reference/rust/rest/index.mdx b/fern/products/sdk-reference/rust/rest/index.mdx index 7ac94d70dd..e808ebbdd3 100644 --- a/fern/products/sdk-reference/rust/rest/index.mdx +++ b/fern/products/sdk-reference/rust/rest/index.mdx @@ -13,24 +13,80 @@ lustri: --- # `rest` +## Classes + + + + Calling API namespace. + + + + Compat (Twilio-compatible LAML) API namespace. + + + + REST API namespace modules. Fabric API namespace — resource composition, addresses, and tokens. + + + + Logs namespace — message, voice, fax, conference logs (read-only). + + + + MFA (Multi-Factor Authentication) namespace. + + + + Project API namespace — exposes the API token sub-resource. + + + + Queues namespace. + + + + 10DLC Campaign Registry namespace — brands, campaigns, orders, numbers. + + + + Video API namespace — rooms, sessions, recordings, conferences, tokens, streams. + + + ## Modules + + + + REST module -- SignalWire REST API client, HTTP transport, and CRUD resource helpers. + + - + + + Paginated iterator over `links.next`-cursor responses. + + + + + + + + ## Source diff --git a/fern/products/sdk-reference/rust/rest/namespaces/logs/conference-logs/index.mdx b/fern/products/sdk-reference/rust/rest/logs/conference-logs/index.mdx similarity index 94% rename from fern/products/sdk-reference/rust/rest/namespaces/logs/conference-logs/index.mdx rename to fern/products/sdk-reference/rust/rest/logs/conference-logs/index.mdx index 5061a92e24..44d1a0e13b 100644 --- a/fern/products/sdk-reference/rust/rest/namespaces/logs/conference-logs/index.mdx +++ b/fern/products/sdk-reference/rust/rest/logs/conference-logs/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/rust/rest/namespaces/logs/conference-logs" +slug: "/reference/rust/rest/logs/conference-logs" title: "ConferenceLogs" sdk_label: "Rust SDK" icon: "rust" @@ -9,7 +9,7 @@ lustri: language: "rust" qualified_name: "signalwire::rest::namespaces::logs::ConferenceLogs" parent: "rest.namespaces.logs" - module: "rest.namespaces.logs" + module: "rest.logs" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs" visibility: "public" --- diff --git a/fern/products/sdk-reference/rust/rest/namespaces/logs/fax-logs/index.mdx b/fern/products/sdk-reference/rust/rest/logs/fax-logs/index.mdx similarity index 95% rename from fern/products/sdk-reference/rust/rest/namespaces/logs/fax-logs/index.mdx rename to fern/products/sdk-reference/rust/rest/logs/fax-logs/index.mdx index 4a7f8fa6c9..b80880345d 100644 --- a/fern/products/sdk-reference/rust/rest/namespaces/logs/fax-logs/index.mdx +++ b/fern/products/sdk-reference/rust/rest/logs/fax-logs/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/rust/rest/namespaces/logs/fax-logs" +slug: "/reference/rust/rest/logs/fax-logs" title: "FaxLogs" sdk_label: "Rust SDK" icon: "rust" @@ -9,7 +9,7 @@ lustri: language: "rust" qualified_name: "signalwire::rest::namespaces::logs::FaxLogs" parent: "rest.namespaces.logs" - module: "rest.namespaces.logs" + module: "rest.logs" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs" visibility: "public" --- diff --git a/fern/products/sdk-reference/rust/rest/namespaces/logs/index.mdx b/fern/products/sdk-reference/rust/rest/logs/index.mdx similarity index 95% rename from fern/products/sdk-reference/rust/rest/namespaces/logs/index.mdx rename to fern/products/sdk-reference/rust/rest/logs/index.mdx index 2c8f9606d1..5d7e890150 100644 --- a/fern/products/sdk-reference/rust/rest/namespaces/logs/index.mdx +++ b/fern/products/sdk-reference/rust/rest/logs/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/rust/rest/namespaces/logs" +slug: "/reference/rust/rest/logs" title: "logs" sdk_label: "Rust SDK" icon: "rust" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "rust" qualified_name: "signalwire::rest::namespaces::logs" - parent: "signalwire::rest::namespaces" - module: "rest.namespaces" + parent: "signalwire::rest" + module: "rest" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs" visibility: "public" --- diff --git a/fern/products/sdk-reference/rust/rest/namespaces/logs/index__2.mdx b/fern/products/sdk-reference/rust/rest/logs/index__2.mdx similarity index 62% rename from fern/products/sdk-reference/rust/rest/namespaces/logs/index__2.mdx rename to fern/products/sdk-reference/rust/rest/logs/index__2.mdx index ee793e5da8..21bed34d11 100644 --- a/fern/products/sdk-reference/rust/rest/namespaces/logs/index__2.mdx +++ b/fern/products/sdk-reference/rust/rest/logs/index__2.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/rust/rest/namespaces/logs/index__2" +slug: "/reference/rust/rest/logs/index__2" title: "logs" sdk_label: "Rust SDK" icon: "rust" @@ -8,19 +8,19 @@ lustri: kind: "module" language: "rust" qualified_name: "rest.namespaces.logs" - parent: "signalwire::rest::namespaces" - module: "rest.namespaces" + parent: "signalwire::rest" + module: "rest" --- # `logs` ## Classes - + - + - + - + diff --git a/fern/products/sdk-reference/rust/rest/namespaces/logs/message-logs/index.mdx b/fern/products/sdk-reference/rust/rest/logs/message-logs/index.mdx similarity index 95% rename from fern/products/sdk-reference/rust/rest/namespaces/logs/message-logs/index.mdx rename to fern/products/sdk-reference/rust/rest/logs/message-logs/index.mdx index 019bce6df6..414f1be0a5 100644 --- a/fern/products/sdk-reference/rust/rest/namespaces/logs/message-logs/index.mdx +++ b/fern/products/sdk-reference/rust/rest/logs/message-logs/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/rust/rest/namespaces/logs/message-logs" +slug: "/reference/rust/rest/logs/message-logs" title: "MessageLogs" sdk_label: "Rust SDK" icon: "rust" @@ -9,7 +9,7 @@ lustri: language: "rust" qualified_name: "signalwire::rest::namespaces::logs::MessageLogs" parent: "rest.namespaces.logs" - module: "rest.namespaces.logs" + module: "rest.logs" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs" visibility: "public" --- diff --git a/fern/products/sdk-reference/rust/rest/namespaces/logs/voice-logs/index.mdx b/fern/products/sdk-reference/rust/rest/logs/voice-logs/index.mdx similarity index 96% rename from fern/products/sdk-reference/rust/rest/namespaces/logs/voice-logs/index.mdx rename to fern/products/sdk-reference/rust/rest/logs/voice-logs/index.mdx index 04416063df..7c37c4c934 100644 --- a/fern/products/sdk-reference/rust/rest/namespaces/logs/voice-logs/index.mdx +++ b/fern/products/sdk-reference/rust/rest/logs/voice-logs/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/rust/rest/namespaces/logs/voice-logs" +slug: "/reference/rust/rest/logs/voice-logs" title: "VoiceLogs" sdk_label: "Rust SDK" icon: "rust" @@ -9,7 +9,7 @@ lustri: language: "rust" qualified_name: "signalwire::rest::namespaces::logs::VoiceLogs" parent: "rest.namespaces.logs" - module: "rest.namespaces.logs" + module: "rest.logs" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs" visibility: "public" --- diff --git a/fern/products/sdk-reference/rust/rest/namespaces/mfa/index.mdx b/fern/products/sdk-reference/rust/rest/mfa/index.mdx similarity index 95% rename from fern/products/sdk-reference/rust/rest/namespaces/mfa/index.mdx rename to fern/products/sdk-reference/rust/rest/mfa/index.mdx index 03aaee3a22..b3ef97a02a 100644 --- a/fern/products/sdk-reference/rust/rest/namespaces/mfa/index.mdx +++ b/fern/products/sdk-reference/rust/rest/mfa/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/rust/rest/namespaces/mfa" +slug: "/reference/rust/rest/mfa" title: "mfa" sdk_label: "Rust SDK" icon: "rust" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "rust" qualified_name: "signalwire::rest::namespaces::mfa" - parent: "signalwire::rest::namespaces" - module: "rest.namespaces" + parent: "signalwire::rest" + module: "rest" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/mfa.rs" visibility: "public" --- diff --git a/fern/products/sdk-reference/rust/rest/namespaces/index.mdx b/fern/products/sdk-reference/rust/rest/namespaces/index.mdx deleted file mode 100644 index 2a35f920fd..0000000000 --- a/fern/products/sdk-reference/rust/rest/namespaces/index.mdx +++ /dev/null @@ -1,84 +0,0 @@ ---- -slug: "/reference/rust/rest/namespaces" -title: "namespaces" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "signalwire::rest::namespaces" - parent: "signalwire::rest" - module: "rest" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/mod.rs" - visibility: "public" ---- -# `namespaces` - -## Classes - - - - Calling API namespace. - - - - Compat (Twilio-compatible LAML) API namespace. - - - - REST API namespace modules. Fabric API namespace — resource composition, addresses, and tokens. - - - - Logs namespace — message, voice, fax, conference logs (read-only). - - - - MFA (Multi-Factor Authentication) namespace. - - - - Project API namespace — exposes the API token sub-resource. - - - - Queues namespace. - - - - 10DLC Campaign Registry namespace — brands, campaigns, orders, numbers. - - - - Video API namespace — rooms, sessions, recordings, conferences, tokens, streams. - - - -## Modules - - - - - - - - - - - - - - - - - - - - - -## Source - -[`src/rest/namespaces/mod.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/mod.rs) - -Line 1. diff --git a/fern/products/sdk-reference/rust/rest/namespaces/number-groups/index.mdx b/fern/products/sdk-reference/rust/rest/number-groups/index.mdx similarity index 78% rename from fern/products/sdk-reference/rust/rest/namespaces/number-groups/index.mdx rename to fern/products/sdk-reference/rust/rest/number-groups/index.mdx index 0c7e3a737c..458bcba799 100644 --- a/fern/products/sdk-reference/rust/rest/namespaces/number-groups/index.mdx +++ b/fern/products/sdk-reference/rust/rest/number-groups/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/rust/rest/namespaces/number-groups" +slug: "/reference/rust/rest/number-groups" title: "number_groups" sdk_label: "Rust SDK" icon: "rust" @@ -8,8 +8,8 @@ lustri: kind: "module" language: "rust" qualified_name: "signalwire::rest::namespaces::number_groups" - parent: "signalwire::rest::namespaces" - module: "rest.namespaces" + parent: "signalwire::rest" + module: "rest" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs" visibility: "public" --- @@ -18,7 +18,7 @@ lustri: ## Classes - + Number Groups namespace. diff --git a/fern/products/sdk-reference/rust/rest/namespaces/number-groups/number-groups/index.mdx b/fern/products/sdk-reference/rust/rest/number-groups/number-groups/index.mdx similarity index 97% rename from fern/products/sdk-reference/rust/rest/namespaces/number-groups/number-groups/index.mdx rename to fern/products/sdk-reference/rust/rest/number-groups/number-groups/index.mdx index 9b1eac2dc1..a1823a3eec 100644 --- a/fern/products/sdk-reference/rust/rest/namespaces/number-groups/number-groups/index.mdx +++ b/fern/products/sdk-reference/rust/rest/number-groups/number-groups/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/rust/rest/namespaces/number-groups/number-groups" +slug: "/reference/rust/rest/number-groups/number-groups" title: "NumberGroups" sdk_label: "Rust SDK" icon: "rust" @@ -9,7 +9,7 @@ lustri: language: "rust" qualified_name: "signalwire::rest::namespaces::number_groups::NumberGroups" parent: "signalwire::rest::namespaces::number_groups" - module: "rest.namespaces.number_groups" + module: "rest.number_groups" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs" visibility: "public" --- diff --git a/fern/products/sdk-reference/rust/rest/namespaces/project/index.mdx b/fern/products/sdk-reference/rust/rest/project/index.mdx similarity index 91% rename from fern/products/sdk-reference/rust/rest/namespaces/project/index.mdx rename to fern/products/sdk-reference/rust/rest/project/index.mdx index 30aa621655..f5307ec0cd 100644 --- a/fern/products/sdk-reference/rust/rest/namespaces/project/index.mdx +++ b/fern/products/sdk-reference/rust/rest/project/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/rust/rest/namespaces/project" +slug: "/reference/rust/rest/project" title: "project" sdk_label: "Rust SDK" icon: "rust" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "rust" qualified_name: "signalwire::rest::namespaces::project" - parent: "signalwire::rest::namespaces" - module: "rest.namespaces" + parent: "signalwire::rest" + module: "rest" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/project.rs" visibility: "public" --- diff --git a/fern/products/sdk-reference/rust/rest/namespaces/project/index__2.mdx b/fern/products/sdk-reference/rust/rest/project/index__2.mdx similarity index 66% rename from fern/products/sdk-reference/rust/rest/namespaces/project/index__2.mdx rename to fern/products/sdk-reference/rust/rest/project/index__2.mdx index f664928de1..b36ef8591d 100644 --- a/fern/products/sdk-reference/rust/rest/namespaces/project/index__2.mdx +++ b/fern/products/sdk-reference/rust/rest/project/index__2.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/rust/rest/namespaces/project/index__2" +slug: "/reference/rust/rest/project/index__2" title: "project" sdk_label: "Rust SDK" icon: "rust" @@ -8,15 +8,15 @@ lustri: kind: "module" language: "rust" qualified_name: "rest.namespaces.project" - parent: "signalwire::rest::namespaces" - module: "rest.namespaces" + parent: "signalwire::rest" + module: "rest" --- # `project` ## Classes - + Project API token management. diff --git a/fern/products/sdk-reference/rust/rest/namespaces/project/project-tokens/index.mdx b/fern/products/sdk-reference/rust/rest/project/project-tokens/index.mdx similarity index 95% rename from fern/products/sdk-reference/rust/rest/namespaces/project/project-tokens/index.mdx rename to fern/products/sdk-reference/rust/rest/project/project-tokens/index.mdx index 48e9b5a194..8b6eddcbbf 100644 --- a/fern/products/sdk-reference/rust/rest/namespaces/project/project-tokens/index.mdx +++ b/fern/products/sdk-reference/rust/rest/project/project-tokens/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/rust/rest/namespaces/project/project-tokens" +slug: "/reference/rust/rest/project/project-tokens" title: "ProjectTokens" sdk_label: "Rust SDK" icon: "rust" @@ -9,7 +9,7 @@ lustri: language: "rust" qualified_name: "signalwire::rest::namespaces::project::ProjectTokens" parent: "rest.namespaces.project" - module: "rest.namespaces.project" + module: "rest.project" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/project.rs" visibility: "public" --- diff --git a/fern/products/sdk-reference/rust/rest/namespaces/queues/index.mdx b/fern/products/sdk-reference/rust/rest/queues/index.mdx similarity index 97% rename from fern/products/sdk-reference/rust/rest/namespaces/queues/index.mdx rename to fern/products/sdk-reference/rust/rest/queues/index.mdx index 48a1c3627c..3ff875bb0f 100644 --- a/fern/products/sdk-reference/rust/rest/namespaces/queues/index.mdx +++ b/fern/products/sdk-reference/rust/rest/queues/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/rust/rest/namespaces/queues" +slug: "/reference/rust/rest/queues" title: "queues" sdk_label: "Rust SDK" icon: "rust" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "rust" qualified_name: "signalwire::rest::namespaces::queues" - parent: "signalwire::rest::namespaces" - module: "rest.namespaces" + parent: "signalwire::rest" + module: "rest" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/queues.rs" visibility: "public" --- diff --git a/fern/products/sdk-reference/rust/rest/namespaces/registry/index.mdx b/fern/products/sdk-reference/rust/rest/registry/index.mdx similarity index 95% rename from fern/products/sdk-reference/rust/rest/namespaces/registry/index.mdx rename to fern/products/sdk-reference/rust/rest/registry/index.mdx index b4afcd9969..702bddca5a 100644 --- a/fern/products/sdk-reference/rust/rest/namespaces/registry/index.mdx +++ b/fern/products/sdk-reference/rust/rest/registry/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/rust/rest/namespaces/registry" +slug: "/reference/rust/rest/registry" title: "registry" sdk_label: "Rust SDK" icon: "rust" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "rust" qualified_name: "signalwire::rest::namespaces::registry" - parent: "signalwire::rest::namespaces" - module: "rest.namespaces" + parent: "signalwire::rest" + module: "rest" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs" visibility: "public" --- diff --git a/fern/products/sdk-reference/rust/rest/namespaces/registry/index__2.mdx b/fern/products/sdk-reference/rust/rest/registry/index__2.mdx similarity index 58% rename from fern/products/sdk-reference/rust/rest/namespaces/registry/index__2.mdx rename to fern/products/sdk-reference/rust/rest/registry/index__2.mdx index 4d78d86d99..a0f488eae3 100644 --- a/fern/products/sdk-reference/rust/rest/namespaces/registry/index__2.mdx +++ b/fern/products/sdk-reference/rust/rest/registry/index__2.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/rust/rest/namespaces/registry/index__2" +slug: "/reference/rust/rest/registry/index__2" title: "registry" sdk_label: "Rust SDK" icon: "rust" @@ -8,19 +8,19 @@ lustri: kind: "module" language: "rust" qualified_name: "rest.namespaces.registry" - parent: "signalwire::rest::namespaces" - module: "rest.namespaces" + parent: "signalwire::rest" + module: "rest" --- # `registry` ## Classes - + - + - + - + diff --git a/fern/products/sdk-reference/rust/rest/namespaces/registry/registry-brands/index.mdx b/fern/products/sdk-reference/rust/rest/registry/registry-brands/index.mdx similarity index 96% rename from fern/products/sdk-reference/rust/rest/namespaces/registry/registry-brands/index.mdx rename to fern/products/sdk-reference/rust/rest/registry/registry-brands/index.mdx index 91c7f26dc7..59db8467a6 100644 --- a/fern/products/sdk-reference/rust/rest/namespaces/registry/registry-brands/index.mdx +++ b/fern/products/sdk-reference/rust/rest/registry/registry-brands/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/rust/rest/namespaces/registry/registry-brands" +slug: "/reference/rust/rest/registry/registry-brands" title: "RegistryBrands" sdk_label: "Rust SDK" icon: "rust" @@ -9,7 +9,7 @@ lustri: language: "rust" qualified_name: "signalwire::rest::namespaces::registry::RegistryBrands" parent: "rest.namespaces.registry" - module: "rest.namespaces.registry" + module: "rest.registry" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs" visibility: "public" --- diff --git a/fern/products/sdk-reference/rust/rest/namespaces/registry/registry-campaigns/index.mdx b/fern/products/sdk-reference/rust/rest/registry/registry-campaigns/index.mdx similarity index 96% rename from fern/products/sdk-reference/rust/rest/namespaces/registry/registry-campaigns/index.mdx rename to fern/products/sdk-reference/rust/rest/registry/registry-campaigns/index.mdx index ab49250b84..be84a1b9f9 100644 --- a/fern/products/sdk-reference/rust/rest/namespaces/registry/registry-campaigns/index.mdx +++ b/fern/products/sdk-reference/rust/rest/registry/registry-campaigns/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/rust/rest/namespaces/registry/registry-campaigns" +slug: "/reference/rust/rest/registry/registry-campaigns" title: "RegistryCampaigns" sdk_label: "Rust SDK" icon: "rust" @@ -9,7 +9,7 @@ lustri: language: "rust" qualified_name: "signalwire::rest::namespaces::registry::RegistryCampaigns" parent: "rest.namespaces.registry" - module: "rest.namespaces.registry" + module: "rest.registry" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs" visibility: "public" --- diff --git a/fern/products/sdk-reference/rust/rest/namespaces/registry/registry-numbers/index.mdx b/fern/products/sdk-reference/rust/rest/registry/registry-numbers/index.mdx similarity index 93% rename from fern/products/sdk-reference/rust/rest/namespaces/registry/registry-numbers/index.mdx rename to fern/products/sdk-reference/rust/rest/registry/registry-numbers/index.mdx index 0925ede6eb..4a36966bb8 100644 --- a/fern/products/sdk-reference/rust/rest/namespaces/registry/registry-numbers/index.mdx +++ b/fern/products/sdk-reference/rust/rest/registry/registry-numbers/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/rust/rest/namespaces/registry/registry-numbers" +slug: "/reference/rust/rest/registry/registry-numbers" title: "RegistryNumbers" sdk_label: "Rust SDK" icon: "rust" @@ -9,7 +9,7 @@ lustri: language: "rust" qualified_name: "signalwire::rest::namespaces::registry::RegistryNumbers" parent: "rest.namespaces.registry" - module: "rest.namespaces.registry" + module: "rest.registry" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs" visibility: "public" --- diff --git a/fern/products/sdk-reference/rust/rest/namespaces/registry/registry-orders/index.mdx b/fern/products/sdk-reference/rust/rest/registry/registry-orders/index.mdx similarity index 93% rename from fern/products/sdk-reference/rust/rest/namespaces/registry/registry-orders/index.mdx rename to fern/products/sdk-reference/rust/rest/registry/registry-orders/index.mdx index 635acd9030..c397e6b8ba 100644 --- a/fern/products/sdk-reference/rust/rest/namespaces/registry/registry-orders/index.mdx +++ b/fern/products/sdk-reference/rust/rest/registry/registry-orders/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/rust/rest/namespaces/registry/registry-orders" +slug: "/reference/rust/rest/registry/registry-orders" title: "RegistryOrders" sdk_label: "Rust SDK" icon: "rust" @@ -9,7 +9,7 @@ lustri: language: "rust" qualified_name: "signalwire::rest::namespaces::registry::RegistryOrders" parent: "rest.namespaces.registry" - module: "rest.namespaces.registry" + module: "rest.registry" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs" visibility: "public" --- diff --git a/fern/products/sdk-reference/rust/rest/namespaces/sip-profile/index.mdx b/fern/products/sdk-reference/rust/rest/sip-profile/index.mdx similarity index 79% rename from fern/products/sdk-reference/rust/rest/namespaces/sip-profile/index.mdx rename to fern/products/sdk-reference/rust/rest/sip-profile/index.mdx index bc345130ee..a477b68c75 100644 --- a/fern/products/sdk-reference/rust/rest/namespaces/sip-profile/index.mdx +++ b/fern/products/sdk-reference/rust/rest/sip-profile/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/rust/rest/namespaces/sip-profile" +slug: "/reference/rust/rest/sip-profile" title: "sip_profile" sdk_label: "Rust SDK" icon: "rust" @@ -8,8 +8,8 @@ lustri: kind: "module" language: "rust" qualified_name: "signalwire::rest::namespaces::sip_profile" - parent: "signalwire::rest::namespaces" - module: "rest.namespaces" + parent: "signalwire::rest" + module: "rest" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/sip_profile.rs" visibility: "public" --- @@ -18,7 +18,7 @@ lustri: ## Classes - + SIP Profile (singleton resource) namespace. diff --git a/fern/products/sdk-reference/rust/rest/namespaces/sip-profile/sip-profile/index.mdx b/fern/products/sdk-reference/rust/rest/sip-profile/sip-profile/index.mdx similarity index 95% rename from fern/products/sdk-reference/rust/rest/namespaces/sip-profile/sip-profile/index.mdx rename to fern/products/sdk-reference/rust/rest/sip-profile/sip-profile/index.mdx index 75b4ee8f22..d56bb09963 100644 --- a/fern/products/sdk-reference/rust/rest/namespaces/sip-profile/sip-profile/index.mdx +++ b/fern/products/sdk-reference/rust/rest/sip-profile/sip-profile/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/rust/rest/namespaces/sip-profile/sip-profile" +slug: "/reference/rust/rest/sip-profile/sip-profile" title: "SipProfile" sdk_label: "Rust SDK" icon: "rust" @@ -9,7 +9,7 @@ lustri: language: "rust" qualified_name: "signalwire::rest::namespaces::sip_profile::SipProfile" parent: "signalwire::rest::namespaces::sip_profile" - module: "rest.namespaces.sip_profile" + module: "rest.sip_profile" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/sip_profile.rs" visibility: "public" --- diff --git a/fern/products/sdk-reference/rust/rest/namespaces/video/index.mdx b/fern/products/sdk-reference/rust/rest/video/index.mdx similarity index 96% rename from fern/products/sdk-reference/rust/rest/namespaces/video/index.mdx rename to fern/products/sdk-reference/rust/rest/video/index.mdx index ae22dda4f6..710cd44442 100644 --- a/fern/products/sdk-reference/rust/rest/namespaces/video/index.mdx +++ b/fern/products/sdk-reference/rust/rest/video/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/rust/rest/namespaces/video" +slug: "/reference/rust/rest/video" title: "video" sdk_label: "Rust SDK" icon: "rust" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "rust" qualified_name: "signalwire::rest::namespaces::video" - parent: "signalwire::rest::namespaces" - module: "rest.namespaces" + parent: "signalwire::rest" + module: "rest" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs" visibility: "public" --- diff --git a/fern/products/sdk-reference/rust/rest/namespaces/video/index__2.mdx b/fern/products/sdk-reference/rust/rest/video/index__2.mdx similarity index 57% rename from fern/products/sdk-reference/rust/rest/namespaces/video/index__2.mdx rename to fern/products/sdk-reference/rust/rest/video/index__2.mdx index 2166008050..7346ae7be3 100644 --- a/fern/products/sdk-reference/rust/rest/namespaces/video/index__2.mdx +++ b/fern/products/sdk-reference/rust/rest/video/index__2.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/rust/rest/namespaces/video/index__2" +slug: "/reference/rust/rest/video/index__2" title: "video" sdk_label: "Rust SDK" icon: "rust" @@ -8,25 +8,25 @@ lustri: kind: "module" language: "rust" qualified_name: "rest.namespaces.video" - parent: "signalwire::rest::namespaces" - module: "rest.namespaces" + parent: "signalwire::rest" + module: "rest" --- # `video` ## Classes - + - + - + - + - + - + - + diff --git a/fern/products/sdk-reference/rust/rest/namespaces/video/video-conference-tokens/index.mdx b/fern/products/sdk-reference/rust/rest/video/video-conference-tokens/index.mdx similarity index 94% rename from fern/products/sdk-reference/rust/rest/namespaces/video/video-conference-tokens/index.mdx rename to fern/products/sdk-reference/rust/rest/video/video-conference-tokens/index.mdx index c7de5548b4..d84811bb47 100644 --- a/fern/products/sdk-reference/rust/rest/namespaces/video/video-conference-tokens/index.mdx +++ b/fern/products/sdk-reference/rust/rest/video/video-conference-tokens/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/rust/rest/namespaces/video/video-conference-tokens" +slug: "/reference/rust/rest/video/video-conference-tokens" title: "VideoConferenceTokens" sdk_label: "Rust SDK" icon: "rust" @@ -9,7 +9,7 @@ lustri: language: "rust" qualified_name: "signalwire::rest::namespaces::video::VideoConferenceTokens" parent: "rest.namespaces.video" - module: "rest.namespaces.video" + module: "rest.video" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs" visibility: "public" --- diff --git a/fern/products/sdk-reference/rust/rest/namespaces/video/video-conferences/index.mdx b/fern/products/sdk-reference/rust/rest/video/video-conferences/index.mdx similarity index 97% rename from fern/products/sdk-reference/rust/rest/namespaces/video/video-conferences/index.mdx rename to fern/products/sdk-reference/rust/rest/video/video-conferences/index.mdx index 7b636d4673..a10b148bbb 100644 --- a/fern/products/sdk-reference/rust/rest/namespaces/video/video-conferences/index.mdx +++ b/fern/products/sdk-reference/rust/rest/video/video-conferences/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/rust/rest/namespaces/video/video-conferences" +slug: "/reference/rust/rest/video/video-conferences" title: "VideoConferences" sdk_label: "Rust SDK" icon: "rust" @@ -9,7 +9,7 @@ lustri: language: "rust" qualified_name: "signalwire::rest::namespaces::video::VideoConferences" parent: "rest.namespaces.video" - module: "rest.namespaces.video" + module: "rest.video" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs" visibility: "public" --- diff --git a/fern/products/sdk-reference/rust/rest/namespaces/video/video-room-recordings/index.mdx b/fern/products/sdk-reference/rust/rest/video/video-room-recordings/index.mdx similarity index 96% rename from fern/products/sdk-reference/rust/rest/namespaces/video/video-room-recordings/index.mdx rename to fern/products/sdk-reference/rust/rest/video/video-room-recordings/index.mdx index f1a60c4f3d..c8f4c9fe87 100644 --- a/fern/products/sdk-reference/rust/rest/namespaces/video/video-room-recordings/index.mdx +++ b/fern/products/sdk-reference/rust/rest/video/video-room-recordings/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/rust/rest/namespaces/video/video-room-recordings" +slug: "/reference/rust/rest/video/video-room-recordings" title: "VideoRoomRecordings" sdk_label: "Rust SDK" icon: "rust" @@ -9,7 +9,7 @@ lustri: language: "rust" qualified_name: "signalwire::rest::namespaces::video::VideoRoomRecordings" parent: "rest.namespaces.video" - module: "rest.namespaces.video" + module: "rest.video" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs" visibility: "public" --- diff --git a/fern/products/sdk-reference/rust/rest/namespaces/video/video-room-sessions/index.mdx b/fern/products/sdk-reference/rust/rest/video/video-room-sessions/index.mdx similarity index 96% rename from fern/products/sdk-reference/rust/rest/namespaces/video/video-room-sessions/index.mdx rename to fern/products/sdk-reference/rust/rest/video/video-room-sessions/index.mdx index 25109e03d3..301c6210ca 100644 --- a/fern/products/sdk-reference/rust/rest/namespaces/video/video-room-sessions/index.mdx +++ b/fern/products/sdk-reference/rust/rest/video/video-room-sessions/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/rust/rest/namespaces/video/video-room-sessions" +slug: "/reference/rust/rest/video/video-room-sessions" title: "VideoRoomSessions" sdk_label: "Rust SDK" icon: "rust" @@ -9,7 +9,7 @@ lustri: language: "rust" qualified_name: "signalwire::rest::namespaces::video::VideoRoomSessions" parent: "rest.namespaces.video" - module: "rest.namespaces.video" + module: "rest.video" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs" visibility: "public" --- diff --git a/fern/products/sdk-reference/rust/rest/namespaces/video/video-room-tokens/index.mdx b/fern/products/sdk-reference/rust/rest/video/video-room-tokens/index.mdx similarity index 94% rename from fern/products/sdk-reference/rust/rest/namespaces/video/video-room-tokens/index.mdx rename to fern/products/sdk-reference/rust/rest/video/video-room-tokens/index.mdx index 4a93570668..c05fbc21a5 100644 --- a/fern/products/sdk-reference/rust/rest/namespaces/video/video-room-tokens/index.mdx +++ b/fern/products/sdk-reference/rust/rest/video/video-room-tokens/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/rust/rest/namespaces/video/video-room-tokens" +slug: "/reference/rust/rest/video/video-room-tokens" title: "VideoRoomTokens" sdk_label: "Rust SDK" icon: "rust" @@ -9,7 +9,7 @@ lustri: language: "rust" qualified_name: "signalwire::rest::namespaces::video::VideoRoomTokens" parent: "rest.namespaces.video" - module: "rest.namespaces.video" + module: "rest.video" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs" visibility: "public" --- diff --git a/fern/products/sdk-reference/rust/rest/namespaces/video/video-rooms/index.mdx b/fern/products/sdk-reference/rust/rest/video/video-rooms/index.mdx similarity index 97% rename from fern/products/sdk-reference/rust/rest/namespaces/video/video-rooms/index.mdx rename to fern/products/sdk-reference/rust/rest/video/video-rooms/index.mdx index d5b42f7383..643010e240 100644 --- a/fern/products/sdk-reference/rust/rest/namespaces/video/video-rooms/index.mdx +++ b/fern/products/sdk-reference/rust/rest/video/video-rooms/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/rust/rest/namespaces/video/video-rooms" +slug: "/reference/rust/rest/video/video-rooms" title: "VideoRooms" sdk_label: "Rust SDK" icon: "rust" @@ -9,7 +9,7 @@ lustri: language: "rust" qualified_name: "signalwire::rest::namespaces::video::VideoRooms" parent: "rest.namespaces.video" - module: "rest.namespaces.video" + module: "rest.video" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs" visibility: "public" --- diff --git a/fern/products/sdk-reference/rust/rest/namespaces/video/video-streams/index.mdx b/fern/products/sdk-reference/rust/rest/video/video-streams/index.mdx similarity index 96% rename from fern/products/sdk-reference/rust/rest/namespaces/video/video-streams/index.mdx rename to fern/products/sdk-reference/rust/rest/video/video-streams/index.mdx index 22593c2332..7342a6561d 100644 --- a/fern/products/sdk-reference/rust/rest/namespaces/video/video-streams/index.mdx +++ b/fern/products/sdk-reference/rust/rest/video/video-streams/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/rust/rest/namespaces/video/video-streams" +slug: "/reference/rust/rest/video/video-streams" title: "VideoStreams" sdk_label: "Rust SDK" icon: "rust" @@ -9,7 +9,7 @@ lustri: language: "rust" qualified_name: "signalwire::rest::namespaces::video::VideoStreams" parent: "rest.namespaces.video" - module: "rest.namespaces.video" + module: "rest.video" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs" visibility: "public" --- diff --git a/fern/products/sdk-reference/typescript/_meta.json b/fern/products/sdk-reference/typescript/_meta.json index e9e2be89b4..596564fde5 100644 --- a/fern/products/sdk-reference/typescript/_meta.json +++ b/fern/products/sdk-reference/typescript/_meta.json @@ -6,5 +6,5 @@ "format": "mdx", "platform": "fern", "base_slug": "/reference/typescript", - "item_count": 3913 + "item_count": 3912 } \ No newline at end of file diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/addresses/addresses-resource/index.mdx b/fern/products/sdk-reference/typescript/rest/addresses/addresses-resource/index.mdx similarity index 96% rename from fern/products/sdk-reference/typescript/rest/namespaces/addresses/addresses-resource/index.mdx rename to fern/products/sdk-reference/typescript/rest/addresses/addresses-resource/index.mdx index 38ddfc7c57..479749cfec 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/addresses/addresses-resource/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/addresses/addresses-resource/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/addresses/addresses-resource" +slug: "/reference/typescript/rest/addresses/addresses-resource" title: "AddressesResource" sdk_label: "TypeScript SDK" icon: "typescript" @@ -9,7 +9,7 @@ lustri: language: "typescript" qualified_name: "rest.namespaces.addresses.AddressesResource" parent: "rest.namespaces.addresses" - module: "rest.namespaces.addresses" + module: "rest.addresses" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/addresses.ts" --- # `AddressesResource` diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/addresses/index.mdx b/fern/products/sdk-reference/typescript/rest/addresses/index.mdx similarity index 79% rename from fern/products/sdk-reference/typescript/rest/namespaces/addresses/index.mdx rename to fern/products/sdk-reference/typescript/rest/addresses/index.mdx index d359cb4426..3b4935ce43 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/addresses/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/addresses/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/addresses" +slug: "/reference/typescript/rest/addresses" title: "addresses" sdk_label: "TypeScript SDK" icon: "typescript" @@ -8,8 +8,8 @@ lustri: kind: "module" language: "typescript" qualified_name: "rest.namespaces.addresses" - parent: "rest.namespaces" - module: "rest.namespaces" + parent: "rest" + module: "rest" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/addresses.ts" --- # `addresses` @@ -23,7 +23,7 @@ module addresses ## Classes - + Address management (no update endpoint). diff --git a/fern/products/sdk-reference/typescript/rest/base/base-resource/index.mdx b/fern/products/sdk-reference/typescript/rest/base/base-resource/index.mdx index 81c99dac4e..761e00c92b 100644 --- a/fern/products/sdk-reference/typescript/rest/base/base-resource/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/base/base-resource/index.mdx @@ -16,7 +16,7 @@ lustri: Abstract base class for all REST resources. -Every namespace resource (e.g. [PhoneNumbersResource](/docs/sdk-reference/reference/typescript/rest/namespaces/phone-numbers/phone-numbers-resource), [VideoRooms](/docs/sdk-reference/reference/typescript/rest/namespaces/video/video-rooms)) +Every namespace resource (e.g. [PhoneNumbersResource](/docs/sdk-reference/reference/typescript/rest/phone-numbers/phone-numbers-resource), [VideoRooms](/docs/sdk-reference/reference/typescript/rest/video/video-rooms)) extends this class to get a typed reference to the shared [HttpClient](/docs/sdk-reference/reference/typescript/rest/http-client) and a small path-building helper. Not exported for direct use — subclass it. diff --git a/fern/products/sdk-reference/typescript/rest/call-handler/index.mdx b/fern/products/sdk-reference/typescript/rest/call-handler/index.mdx index 5c013aecc5..c798f5c8a9 100644 --- a/fern/products/sdk-reference/typescript/rest/call-handler/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/call-handler/index.mdx @@ -23,7 +23,7 @@ module callHandler ## Constants - PhoneCallHandler — enum of `call_handler` values accepted by [PhoneNumbersResource.update](/docs/sdk-reference/reference/typescript/rest/namespaces/phone-numbers/phone-numbers-resource#update). Named `PhoneCallHandler` (not `CallHandler`) to avoid colliding with the RELAY client's inbound-call-handler callback type already exported from `src/relay/types.ts`. Setting a phone number's `call_handler` + the handler-specific companion field routes inbound calls and auto-materializes the matching Fabric resource on the server. See the high-level helpers on [PhoneNumbersResource](/docs/sdk-reference/reference/typescript/rest/namespaces/phone-numbers/phone-numbers-resource) (`setSwmlWebhook`, `setCxmlWebhook`, `setCxmlApplication`, `setAiAgent`, `setCallFlow`, `setRelayApplication`, `setRelayTopic`). | Member | Wire value | Companion field | Auto-creates Fabric resource | |---|---|---|---| | `RELAY_SCRIPT` | `relay_script` | `call_relay_script_url` | `swml_webhook` | | `LAML_WEBHOOKS` | `laml_webhooks` | `call_request_url` | `cxml_webhook` | | `LAML_APPLICATION` | `laml_application` | `call_laml_application_id` | `cxml_application` | | `AI_AGENT` | `ai_agent` | `call_ai_agent_id` | `ai_agent` | | `CALL_FLOW` | `call_flow` | `call_flow_id` | `call_flow` | | `RELAY_APPLICATION` | `relay_application` | `call_relay_application` | `relay_application` | | `RELAY_TOPIC` | `relay_topic` | `call_relay_topic` | _(routes via RELAY)_ | | `RELAY_CONTEXT` | `relay_context` | `call_relay_context` | _(legacy, prefer topic)_ | | `RELAY_CONNECTOR` | `relay_connector` | _(connector config)_ | _(internal)_ | | `VIDEO_ROOM` | `video_room` | `call_video_room_id` | _(routes to Video API)_ | | `DIALOGFLOW` | `dialogflow` | `call_dialogflow_agent_id` | _(none)_ | Note: `LAML_WEBHOOKS` (wire value `laml_webhooks`) produces a **cXML** handler, not a generic webhook. For SWML, use `RELAY_SCRIPT`. + PhoneCallHandler — enum of `call_handler` values accepted by [PhoneNumbersResource.update](/docs/sdk-reference/reference/typescript/rest/phone-numbers/phone-numbers-resource#update). Named `PhoneCallHandler` (not `CallHandler`) to avoid colliding with the RELAY client's inbound-call-handler callback type already exported from `src/relay/types.ts`. Setting a phone number's `call_handler` + the handler-specific companion field routes inbound calls and auto-materializes the matching Fabric resource on the server. See the high-level helpers on [PhoneNumbersResource](/docs/sdk-reference/reference/typescript/rest/phone-numbers/phone-numbers-resource) (`setSwmlWebhook`, `setCxmlWebhook`, `setCxmlApplication`, `setAiAgent`, `setCallFlow`, `setRelayApplication`, `setRelayTopic`). | Member | Wire value | Companion field | Auto-creates Fabric resource | |---|---|---|---| | `RELAY_SCRIPT` | `relay_script` | `call_relay_script_url` | `swml_webhook` | | `LAML_WEBHOOKS` | `laml_webhooks` | `call_request_url` | `cxml_webhook` | | `LAML_APPLICATION` | `laml_application` | `call_laml_application_id` | `cxml_application` | | `AI_AGENT` | `ai_agent` | `call_ai_agent_id` | `ai_agent` | | `CALL_FLOW` | `call_flow` | `call_flow_id` | `call_flow` | | `RELAY_APPLICATION` | `relay_application` | `call_relay_application` | `relay_application` | | `RELAY_TOPIC` | `relay_topic` | `call_relay_topic` | _(routes via RELAY)_ | | `RELAY_CONTEXT` | `relay_context` | `call_relay_context` | _(legacy, prefer topic)_ | | `RELAY_CONNECTOR` | `relay_connector` | _(connector config)_ | _(internal)_ | | `VIDEO_ROOM` | `video_room` | `call_video_room_id` | _(routes to Video API)_ | | `DIALOGFLOW` | `dialogflow` | `call_dialogflow_agent_id` | _(none)_ | Note: `LAML_WEBHOOKS` (wire value `laml_webhooks`) produces a **cXML** handler, not a generic webhook. For SWML, use `RELAY_SCRIPT`. ## Type Aliases diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/calling/calling-namespace/index.mdx b/fern/products/sdk-reference/typescript/rest/calling/calling-namespace/index.mdx similarity index 99% rename from fern/products/sdk-reference/typescript/rest/namespaces/calling/calling-namespace/index.mdx rename to fern/products/sdk-reference/typescript/rest/calling/calling-namespace/index.mdx index 458345ec4a..911b55af64 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/calling/calling-namespace/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/calling/calling-namespace/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/calling/calling-namespace" +slug: "/reference/typescript/rest/calling/calling-namespace" title: "CallingNamespace" sdk_label: "TypeScript SDK" icon: "typescript" @@ -9,7 +9,7 @@ lustri: language: "typescript" qualified_name: "rest.namespaces.calling.CallingNamespace" parent: "rest.namespaces.calling" - module: "rest.namespaces.calling" + module: "rest.calling" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts" --- # `CallingNamespace` diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/calling/index.mdx b/fern/products/sdk-reference/typescript/rest/calling/index.mdx similarity index 80% rename from fern/products/sdk-reference/typescript/rest/namespaces/calling/index.mdx rename to fern/products/sdk-reference/typescript/rest/calling/index.mdx index a150c01ce1..1d43e93856 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/calling/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/calling/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/calling" +slug: "/reference/typescript/rest/calling" title: "calling" sdk_label: "TypeScript SDK" icon: "typescript" @@ -8,8 +8,8 @@ lustri: kind: "module" language: "typescript" qualified_name: "rest.namespaces.calling" - parent: "rest.namespaces" - module: "rest.namespaces" + parent: "rest" + module: "rest" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts" --- # `calling` @@ -23,7 +23,7 @@ module calling ## Classes - + REST call control — all 37 commands dispatched via a single POST endpoint. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/chat/chat-resource/index.mdx b/fern/products/sdk-reference/typescript/rest/chat/chat-resource/index.mdx similarity index 94% rename from fern/products/sdk-reference/typescript/rest/namespaces/chat/chat-resource/index.mdx rename to fern/products/sdk-reference/typescript/rest/chat/chat-resource/index.mdx index 7208051345..04b23e3ff2 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/chat/chat-resource/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/chat/chat-resource/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/chat/chat-resource" +slug: "/reference/typescript/rest/chat/chat-resource" title: "ChatResource" sdk_label: "TypeScript SDK" icon: "typescript" @@ -9,7 +9,7 @@ lustri: language: "typescript" qualified_name: "rest.namespaces.chat.ChatResource" parent: "rest.namespaces.chat" - module: "rest.namespaces.chat" + module: "rest.chat" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/chat.ts" --- # `ChatResource` diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/chat/index.mdx b/fern/products/sdk-reference/typescript/rest/chat/index.mdx similarity index 80% rename from fern/products/sdk-reference/typescript/rest/namespaces/chat/index.mdx rename to fern/products/sdk-reference/typescript/rest/chat/index.mdx index cb43bc664d..0cf0603d28 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/chat/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/chat/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/chat" +slug: "/reference/typescript/rest/chat" title: "chat" sdk_label: "TypeScript SDK" icon: "typescript" @@ -8,8 +8,8 @@ lustri: kind: "module" language: "typescript" qualified_name: "rest.namespaces.chat" - parent: "rest.namespaces" - module: "rest.namespaces" + parent: "rest" + module: "rest" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/chat.ts" --- # `chat` @@ -23,7 +23,7 @@ module chat ## Classes - + Chat token generation. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-accounts/index.mdx b/fern/products/sdk-reference/typescript/rest/compat/compat-accounts/index.mdx similarity index 96% rename from fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-accounts/index.mdx rename to fern/products/sdk-reference/typescript/rest/compat/compat-accounts/index.mdx index ebad349d47..fa3459ab8b 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-accounts/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/compat/compat-accounts/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/compat/compat-accounts" +slug: "/reference/typescript/rest/compat/compat-accounts" title: "CompatAccounts" sdk_label: "TypeScript SDK" icon: "typescript" @@ -9,7 +9,7 @@ lustri: language: "typescript" qualified_name: "rest.namespaces.compat.CompatAccounts" parent: "rest.namespaces.compat" - module: "rest.namespaces.compat" + module: "rest.compat" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts" --- # `CompatAccounts` diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-applications/index.mdx b/fern/products/sdk-reference/typescript/rest/compat/compat-applications/index.mdx similarity index 97% rename from fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-applications/index.mdx rename to fern/products/sdk-reference/typescript/rest/compat/compat-applications/index.mdx index 6ae57d526a..6b3a2f4574 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-applications/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/compat/compat-applications/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/compat/compat-applications" +slug: "/reference/typescript/rest/compat/compat-applications" title: "CompatApplications" sdk_label: "TypeScript SDK" icon: "typescript" @@ -9,7 +9,7 @@ lustri: language: "typescript" qualified_name: "rest.namespaces.compat.CompatApplications" parent: "rest.namespaces.compat" - module: "rest.namespaces.compat" + module: "rest.compat" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts" --- # `CompatApplications` diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-calls/index.mdx b/fern/products/sdk-reference/typescript/rest/compat/compat-calls/index.mdx similarity index 96% rename from fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-calls/index.mdx rename to fern/products/sdk-reference/typescript/rest/compat/compat-calls/index.mdx index 1234307721..2488a50ab7 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-calls/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/compat/compat-calls/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/compat/compat-calls" +slug: "/reference/typescript/rest/compat/compat-calls" title: "CompatCalls" sdk_label: "TypeScript SDK" icon: "typescript" @@ -9,7 +9,7 @@ lustri: language: "typescript" qualified_name: "rest.namespaces.compat.CompatCalls" parent: "rest.namespaces.compat" - module: "rest.namespaces.compat" + module: "rest.compat" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts" --- # `CompatCalls` @@ -271,7 +271,7 @@ stopStream(callSid: string, streamSid: string, body: any = {}): Promise - Stream SID returned by [startStream](/docs/sdk-reference/reference/typescript/rest/namespaces/compat/compat-calls#start-stream). + Stream SID returned by [startStream](/docs/sdk-reference/reference/typescript/rest/compat/compat-calls#start-stream). @@ -351,7 +351,7 @@ updateRecording( - Recording SID returned by [startRecording](/docs/sdk-reference/reference/typescript/rest/namespaces/compat/compat-calls#start-recording). + Recording SID returned by [startRecording](/docs/sdk-reference/reference/typescript/rest/compat/compat-calls#start-recording). diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-conferences/index.mdx b/fern/products/sdk-reference/typescript/rest/compat/compat-conferences/index.mdx similarity index 98% rename from fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-conferences/index.mdx rename to fern/products/sdk-reference/typescript/rest/compat/compat-conferences/index.mdx index 61e7b7785a..89b47133d8 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-conferences/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/compat/compat-conferences/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/compat/compat-conferences" +slug: "/reference/typescript/rest/compat/compat-conferences" title: "CompatConferences" sdk_label: "TypeScript SDK" icon: "typescript" @@ -9,7 +9,7 @@ lustri: language: "typescript" qualified_name: "rest.namespaces.compat.CompatConferences" parent: "rest.namespaces.compat" - module: "rest.namespaces.compat" + module: "rest.compat" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts" --- # `CompatConferences` @@ -391,7 +391,7 @@ stopStream( - Stream SID returned by [startStream](/docs/sdk-reference/reference/typescript/rest/namespaces/compat/compat-conferences#start-stream). + Stream SID returned by [startStream](/docs/sdk-reference/reference/typescript/rest/compat/compat-conferences#start-stream). diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-faxes/index.mdx b/fern/products/sdk-reference/typescript/rest/compat/compat-faxes/index.mdx similarity index 98% rename from fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-faxes/index.mdx rename to fern/products/sdk-reference/typescript/rest/compat/compat-faxes/index.mdx index ba7650d7eb..086e7437ce 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-faxes/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/compat/compat-faxes/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/compat/compat-faxes" +slug: "/reference/typescript/rest/compat/compat-faxes" title: "CompatFaxes" sdk_label: "TypeScript SDK" icon: "typescript" @@ -9,7 +9,7 @@ lustri: language: "typescript" qualified_name: "rest.namespaces.compat.CompatFaxes" parent: "rest.namespaces.compat" - module: "rest.namespaces.compat" + module: "rest.compat" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts" --- # `CompatFaxes` diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-laml-bins/index.mdx b/fern/products/sdk-reference/typescript/rest/compat/compat-laml-bins/index.mdx similarity index 97% rename from fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-laml-bins/index.mdx rename to fern/products/sdk-reference/typescript/rest/compat/compat-laml-bins/index.mdx index b9dfae7bc1..6e95cb36b5 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-laml-bins/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/compat/compat-laml-bins/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/compat/compat-laml-bins" +slug: "/reference/typescript/rest/compat/compat-laml-bins" title: "CompatLamlBins" sdk_label: "TypeScript SDK" icon: "typescript" @@ -9,7 +9,7 @@ lustri: language: "typescript" qualified_name: "rest.namespaces.compat.CompatLamlBins" parent: "rest.namespaces.compat" - module: "rest.namespaces.compat" + module: "rest.compat" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts" --- # `CompatLamlBins` diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-messages/index.mdx b/fern/products/sdk-reference/typescript/rest/compat/compat-messages/index.mdx similarity index 98% rename from fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-messages/index.mdx rename to fern/products/sdk-reference/typescript/rest/compat/compat-messages/index.mdx index 2a4d54f9d1..25112102f5 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-messages/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/compat/compat-messages/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/compat/compat-messages" +slug: "/reference/typescript/rest/compat/compat-messages" title: "CompatMessages" sdk_label: "TypeScript SDK" icon: "typescript" @@ -9,7 +9,7 @@ lustri: language: "typescript" qualified_name: "rest.namespaces.compat.CompatMessages" parent: "rest.namespaces.compat" - module: "rest.namespaces.compat" + module: "rest.compat" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts" --- # `CompatMessages` diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-namespace/index.mdx b/fern/products/sdk-reference/typescript/rest/compat/compat-namespace/index.mdx similarity index 96% rename from fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-namespace/index.mdx rename to fern/products/sdk-reference/typescript/rest/compat/compat-namespace/index.mdx index bd9a7d3fd1..3d8268fe24 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-namespace/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/compat/compat-namespace/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/compat/compat-namespace" +slug: "/reference/typescript/rest/compat/compat-namespace" title: "CompatNamespace" sdk_label: "TypeScript SDK" icon: "typescript" @@ -9,7 +9,7 @@ lustri: language: "typescript" qualified_name: "rest.namespaces.compat.CompatNamespace" parent: "rest.namespaces.compat" - module: "rest.namespaces.compat" + module: "rest.compat" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts" --- # `CompatNamespace` diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-phone-numbers/index.mdx b/fern/products/sdk-reference/typescript/rest/compat/compat-phone-numbers/index.mdx similarity index 98% rename from fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-phone-numbers/index.mdx rename to fern/products/sdk-reference/typescript/rest/compat/compat-phone-numbers/index.mdx index 93ba7aa0b3..40d183c7c5 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-phone-numbers/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/compat/compat-phone-numbers/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/compat/compat-phone-numbers" +slug: "/reference/typescript/rest/compat/compat-phone-numbers" title: "CompatPhoneNumbers" sdk_label: "TypeScript SDK" icon: "typescript" @@ -9,7 +9,7 @@ lustri: language: "typescript" qualified_name: "rest.namespaces.compat.CompatPhoneNumbers" parent: "rest.namespaces.compat" - module: "rest.namespaces.compat" + module: "rest.compat" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts" --- # `CompatPhoneNumbers` diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-queues/index.mdx b/fern/products/sdk-reference/typescript/rest/compat/compat-queues/index.mdx similarity index 98% rename from fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-queues/index.mdx rename to fern/products/sdk-reference/typescript/rest/compat/compat-queues/index.mdx index 470f0df260..6dacb4d918 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-queues/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/compat/compat-queues/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/compat/compat-queues" +slug: "/reference/typescript/rest/compat/compat-queues" title: "CompatQueues" sdk_label: "TypeScript SDK" icon: "typescript" @@ -9,7 +9,7 @@ lustri: language: "typescript" qualified_name: "rest.namespaces.compat.CompatQueues" parent: "rest.namespaces.compat" - module: "rest.namespaces.compat" + module: "rest.compat" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts" --- # `CompatQueues` diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-recordings/index.mdx b/fern/products/sdk-reference/typescript/rest/compat/compat-recordings/index.mdx similarity index 96% rename from fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-recordings/index.mdx rename to fern/products/sdk-reference/typescript/rest/compat/compat-recordings/index.mdx index b7336d2f38..0cf5541a27 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-recordings/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/compat/compat-recordings/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/compat/compat-recordings" +slug: "/reference/typescript/rest/compat/compat-recordings" title: "CompatRecordings" sdk_label: "TypeScript SDK" icon: "typescript" @@ -9,7 +9,7 @@ lustri: language: "typescript" qualified_name: "rest.namespaces.compat.CompatRecordings" parent: "rest.namespaces.compat" - module: "rest.namespaces.compat" + module: "rest.compat" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts" --- # `CompatRecordings` diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-tokens/index.mdx b/fern/products/sdk-reference/typescript/rest/compat/compat-tokens/index.mdx similarity index 96% rename from fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-tokens/index.mdx rename to fern/products/sdk-reference/typescript/rest/compat/compat-tokens/index.mdx index 25369b6bb7..5accb5ac85 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-tokens/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/compat/compat-tokens/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/compat/compat-tokens" +slug: "/reference/typescript/rest/compat/compat-tokens" title: "CompatTokens" sdk_label: "TypeScript SDK" icon: "typescript" @@ -9,7 +9,7 @@ lustri: language: "typescript" qualified_name: "rest.namespaces.compat.CompatTokens" parent: "rest.namespaces.compat" - module: "rest.namespaces.compat" + module: "rest.compat" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts" --- # `CompatTokens` diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-transcriptions/index.mdx b/fern/products/sdk-reference/typescript/rest/compat/compat-transcriptions/index.mdx similarity index 96% rename from fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-transcriptions/index.mdx rename to fern/products/sdk-reference/typescript/rest/compat/compat-transcriptions/index.mdx index e7bcfb03a9..524c88cb25 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/compat/compat-transcriptions/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/compat/compat-transcriptions/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/compat/compat-transcriptions" +slug: "/reference/typescript/rest/compat/compat-transcriptions" title: "CompatTranscriptions" sdk_label: "TypeScript SDK" icon: "typescript" @@ -9,7 +9,7 @@ lustri: language: "typescript" qualified_name: "rest.namespaces.compat.CompatTranscriptions" parent: "rest.namespaces.compat" - module: "rest.namespaces.compat" + module: "rest.compat" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts" --- # `CompatTranscriptions` diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/compat/index.mdx b/fern/products/sdk-reference/typescript/rest/compat/index.mdx similarity index 73% rename from fern/products/sdk-reference/typescript/rest/namespaces/compat/index.mdx rename to fern/products/sdk-reference/typescript/rest/compat/index.mdx index 56be215a05..8666c0646a 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/compat/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/compat/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/compat" +slug: "/reference/typescript/rest/compat" title: "compat" sdk_label: "TypeScript SDK" icon: "typescript" @@ -8,8 +8,8 @@ lustri: kind: "module" language: "typescript" qualified_name: "rest.namespaces.compat" - parent: "rest.namespaces" - module: "rest.namespaces" + parent: "rest" + module: "rest" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/compat.ts" --- # `compat` @@ -23,55 +23,55 @@ module compat ## Classes - + Compat account / subproject management (Twilio-compatible LAML). - + Compat application management (LAML-style `Applications`). - + Compat call management with recording and stream sub-resources. - + Compat conference management with participants, recordings, and streams. - + Compat fax management with media sub-resources. - + Compat cXML / LaML Bin management. - + Compat message management with media sub-resources. - + Twilio-compatible LAML API namespace with AccountSid scoping. - + Compat phone number management with searching, purchasing, and import. - + Compat queue management with member operations. - + Compat recording management (list / get / delete). - + Compat API token management (non-LAML — uses `PATCH`). - + Compat transcription management (list / get / delete). diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/datasphere/datasphere-documents/index.mdx b/fern/products/sdk-reference/typescript/rest/datasphere/datasphere-documents/index.mdx similarity index 98% rename from fern/products/sdk-reference/typescript/rest/namespaces/datasphere/datasphere-documents/index.mdx rename to fern/products/sdk-reference/typescript/rest/datasphere/datasphere-documents/index.mdx index 31fb3a5532..55b34690ee 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/datasphere/datasphere-documents/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/datasphere/datasphere-documents/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/datasphere/datasphere-documents" +slug: "/reference/typescript/rest/datasphere/datasphere-documents" title: "DatasphereDocuments" sdk_label: "TypeScript SDK" icon: "typescript" @@ -9,7 +9,7 @@ lustri: language: "typescript" qualified_name: "rest.namespaces.datasphere.DatasphereDocuments" parent: "rest.namespaces.datasphere" - module: "rest.namespaces.datasphere" + module: "rest.datasphere" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/datasphere.ts" --- # `DatasphereDocuments` diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/datasphere/datasphere-namespace/index.mdx b/fern/products/sdk-reference/typescript/rest/datasphere/datasphere-namespace/index.mdx similarity index 92% rename from fern/products/sdk-reference/typescript/rest/namespaces/datasphere/datasphere-namespace/index.mdx rename to fern/products/sdk-reference/typescript/rest/datasphere/datasphere-namespace/index.mdx index be9f8c03a4..f428d546c7 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/datasphere/datasphere-namespace/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/datasphere/datasphere-namespace/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/datasphere/datasphere-namespace" +slug: "/reference/typescript/rest/datasphere/datasphere-namespace" title: "DatasphereNamespace" sdk_label: "TypeScript SDK" icon: "typescript" @@ -9,7 +9,7 @@ lustri: language: "typescript" qualified_name: "rest.namespaces.datasphere.DatasphereNamespace" parent: "rest.namespaces.datasphere" - module: "rest.namespaces.datasphere" + module: "rest.datasphere" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/datasphere.ts" --- # `DatasphereNamespace` diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/datasphere/index.mdx b/fern/products/sdk-reference/typescript/rest/datasphere/index.mdx similarity index 76% rename from fern/products/sdk-reference/typescript/rest/namespaces/datasphere/index.mdx rename to fern/products/sdk-reference/typescript/rest/datasphere/index.mdx index fc9a2cf677..bec80caa39 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/datasphere/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/datasphere/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/datasphere" +slug: "/reference/typescript/rest/datasphere" title: "datasphere" sdk_label: "TypeScript SDK" icon: "typescript" @@ -8,8 +8,8 @@ lustri: kind: "module" language: "typescript" qualified_name: "rest.namespaces.datasphere" - parent: "rest.namespaces" - module: "rest.namespaces" + parent: "rest" + module: "rest" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/datasphere.ts" --- # `datasphere` @@ -23,11 +23,11 @@ module datasphere ## Classes - + Document management with search and chunk operations. - + Datasphere API namespace. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/fabric/auto-materialized-webhook-resource/index.mdx b/fern/products/sdk-reference/typescript/rest/fabric/auto-materialized-webhook-resource/index.mdx similarity index 96% rename from fern/products/sdk-reference/typescript/rest/namespaces/fabric/auto-materialized-webhook-resource/index.mdx rename to fern/products/sdk-reference/typescript/rest/fabric/auto-materialized-webhook-resource/index.mdx index 125e8f8682..e303dce5fa 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/fabric/auto-materialized-webhook-resource/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/fabric/auto-materialized-webhook-resource/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/fabric/auto-materialized-webhook-resource" +slug: "/reference/typescript/rest/fabric/auto-materialized-webhook-resource" title: "AutoMaterializedWebhookResource" sdk_label: "TypeScript SDK" icon: "typescript" @@ -9,7 +9,7 @@ lustri: language: "typescript" qualified_name: "rest.namespaces.fabric.AutoMaterializedWebhookResource" parent: "rest.namespaces.fabric" - module: "rest.namespaces.fabric" + module: "rest.fabric" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts" --- # `AutoMaterializedWebhookResource` @@ -33,7 +33,7 @@ class AutoMaterializedWebhookResource extends FabricResource ## Inheritance -**Extends:** [FabricResource](/docs/sdk-reference/reference/typescript/rest/namespaces/fabric/fabric-resource) +**Extends:** [FabricResource](/docs/sdk-reference/reference/typescript/rest/fabric/fabric-resource) ## Methods diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/fabric/call-flows-resource/index.mdx b/fern/products/sdk-reference/typescript/rest/fabric/call-flows-resource/index.mdx similarity index 97% rename from fern/products/sdk-reference/typescript/rest/namespaces/fabric/call-flows-resource/index.mdx rename to fern/products/sdk-reference/typescript/rest/fabric/call-flows-resource/index.mdx index cda9274afc..70316979d4 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/fabric/call-flows-resource/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/fabric/call-flows-resource/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/fabric/call-flows-resource" +slug: "/reference/typescript/rest/fabric/call-flows-resource" title: "CallFlowsResource" sdk_label: "TypeScript SDK" icon: "typescript" @@ -9,7 +9,7 @@ lustri: language: "typescript" qualified_name: "rest.namespaces.fabric.CallFlowsResource" parent: "rest.namespaces.fabric" - module: "rest.namespaces.fabric" + module: "rest.fabric" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts" --- # `CallFlowsResource` @@ -24,7 +24,7 @@ class CallFlowsResource extends FabricResourcePUT ## Inheritance -**Extends:** [FabricResourcePUT](/docs/sdk-reference/reference/typescript/rest/namespaces/fabric/fabric-resource-put) +**Extends:** [FabricResourcePUT](/docs/sdk-reference/reference/typescript/rest/fabric/fabric-resource-put) ## Methods diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/fabric/conference-rooms-resource/index.mdx b/fern/products/sdk-reference/typescript/rest/fabric/conference-rooms-resource/index.mdx similarity index 96% rename from fern/products/sdk-reference/typescript/rest/namespaces/fabric/conference-rooms-resource/index.mdx rename to fern/products/sdk-reference/typescript/rest/fabric/conference-rooms-resource/index.mdx index 99deaad843..f80c3621bf 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/fabric/conference-rooms-resource/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/fabric/conference-rooms-resource/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/fabric/conference-rooms-resource" +slug: "/reference/typescript/rest/fabric/conference-rooms-resource" title: "ConferenceRoomsResource" sdk_label: "TypeScript SDK" icon: "typescript" @@ -9,7 +9,7 @@ lustri: language: "typescript" qualified_name: "rest.namespaces.fabric.ConferenceRoomsResource" parent: "rest.namespaces.fabric" - module: "rest.namespaces.fabric" + module: "rest.fabric" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts" --- # `ConferenceRoomsResource` @@ -24,7 +24,7 @@ class ConferenceRoomsResource extends FabricResourcePUT ## Inheritance -**Extends:** [FabricResourcePUT](/docs/sdk-reference/reference/typescript/rest/namespaces/fabric/fabric-resource-put) +**Extends:** [FabricResourcePUT](/docs/sdk-reference/reference/typescript/rest/fabric/fabric-resource-put) ## Methods diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/fabric/cxml-applications-resource/index.mdx b/fern/products/sdk-reference/typescript/rest/fabric/cxml-applications-resource/index.mdx similarity index 96% rename from fern/products/sdk-reference/typescript/rest/namespaces/fabric/cxml-applications-resource/index.mdx rename to fern/products/sdk-reference/typescript/rest/fabric/cxml-applications-resource/index.mdx index 5f797186b4..94c126bdbc 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/fabric/cxml-applications-resource/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/fabric/cxml-applications-resource/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/fabric/cxml-applications-resource" +slug: "/reference/typescript/rest/fabric/cxml-applications-resource" title: "CxmlApplicationsResource" sdk_label: "TypeScript SDK" icon: "typescript" @@ -9,7 +9,7 @@ lustri: language: "typescript" qualified_name: "rest.namespaces.fabric.CxmlApplicationsResource" parent: "rest.namespaces.fabric" - module: "rest.namespaces.fabric" + module: "rest.fabric" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts" --- # `CxmlApplicationsResource` @@ -24,7 +24,7 @@ class CxmlApplicationsResource extends FabricResourcePUT ## Inheritance -**Extends:** [FabricResourcePUT](/docs/sdk-reference/reference/typescript/rest/namespaces/fabric/fabric-resource-put) +**Extends:** [FabricResourcePUT](/docs/sdk-reference/reference/typescript/rest/fabric/fabric-resource-put) ## Methods diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/fabric/cxml-webhooks-resource/index.mdx b/fern/products/sdk-reference/typescript/rest/fabric/cxml-webhooks-resource/index.mdx similarity index 96% rename from fern/products/sdk-reference/typescript/rest/namespaces/fabric/cxml-webhooks-resource/index.mdx rename to fern/products/sdk-reference/typescript/rest/fabric/cxml-webhooks-resource/index.mdx index 32db1f345e..11e81695a2 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/fabric/cxml-webhooks-resource/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/fabric/cxml-webhooks-resource/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/fabric/cxml-webhooks-resource" +slug: "/reference/typescript/rest/fabric/cxml-webhooks-resource" title: "CxmlWebhooksResource" sdk_label: "TypeScript SDK" icon: "typescript" @@ -9,7 +9,7 @@ lustri: language: "typescript" qualified_name: "rest.namespaces.fabric.CxmlWebhooksResource" parent: "rest.namespaces.fabric" - module: "rest.namespaces.fabric" + module: "rest.fabric" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts" --- # `CxmlWebhooksResource` @@ -24,7 +24,7 @@ class CxmlWebhooksResource extends AutoMaterializedWebhookResource ## Inheritance -**Extends:** [AutoMaterializedWebhookResource](/docs/sdk-reference/reference/typescript/rest/namespaces/fabric/auto-materialized-webhook-resource) +**Extends:** [AutoMaterializedWebhookResource](/docs/sdk-reference/reference/typescript/rest/fabric/auto-materialized-webhook-resource) ## Methods diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/fabric/fabric-addresses/index.mdx b/fern/products/sdk-reference/typescript/rest/fabric/fabric-addresses/index.mdx similarity index 95% rename from fern/products/sdk-reference/typescript/rest/namespaces/fabric/fabric-addresses/index.mdx rename to fern/products/sdk-reference/typescript/rest/fabric/fabric-addresses/index.mdx index e26b701a2e..eea4b18432 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/fabric/fabric-addresses/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/fabric/fabric-addresses/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/fabric/fabric-addresses" +slug: "/reference/typescript/rest/fabric/fabric-addresses" title: "FabricAddresses" sdk_label: "TypeScript SDK" icon: "typescript" @@ -9,7 +9,7 @@ lustri: language: "typescript" qualified_name: "rest.namespaces.fabric.FabricAddresses" parent: "rest.namespaces.fabric" - module: "rest.namespaces.fabric" + module: "rest.fabric" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts" --- # `FabricAddresses` diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/fabric/fabric-namespace/index.mdx b/fern/products/sdk-reference/typescript/rest/fabric/fabric-namespace/index.mdx similarity index 89% rename from fern/products/sdk-reference/typescript/rest/namespaces/fabric/fabric-namespace/index.mdx rename to fern/products/sdk-reference/typescript/rest/fabric/fabric-namespace/index.mdx index 42fb105e3a..8b7037d819 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/fabric/fabric-namespace/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/fabric/fabric-namespace/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/fabric/fabric-namespace" +slug: "/reference/typescript/rest/fabric/fabric-namespace" title: "FabricNamespace" sdk_label: "TypeScript SDK" icon: "typescript" @@ -9,7 +9,7 @@ lustri: language: "typescript" qualified_name: "rest.namespaces.fabric.FabricNamespace" parent: "rest.namespaces.fabric" - module: "rest.namespaces.fabric" + module: "rest.fabric" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts" --- # `FabricNamespace` @@ -59,7 +59,7 @@ const token = await client.fabric.tokens.createSubscriberToken({ subscriber_id: - cXML webhook CRUD. **Auto-materialized** as a side-effect of [PhoneNumbersResource.setCxmlWebhook](/docs/sdk-reference/reference/typescript/rest/namespaces/phone-numbers/phone-numbers-resource#set-cxml-webhook); direct `create` produces an orphan resource and emits a deprecation warning. + cXML webhook CRUD. **Auto-materialized** as a side-effect of [PhoneNumbersResource.setCxmlWebhook](/docs/sdk-reference/reference/typescript/rest/phone-numbers/phone-numbers-resource#set-cxml-webhook); direct `create` produces an orphan resource and emits a deprecation warning. @@ -91,7 +91,7 @@ const token = await client.fabric.tokens.createSubscriberToken({ subscriber_id: - SWML webhook CRUD. **Auto-materialized** as a side-effect of [PhoneNumbersResource.setSwmlWebhook](/docs/sdk-reference/reference/typescript/rest/namespaces/phone-numbers/phone-numbers-resource#set-swml-webhook); direct `create` produces an orphan resource and emits a deprecation warning. + SWML webhook CRUD. **Auto-materialized** as a side-effect of [PhoneNumbersResource.setSwmlWebhook](/docs/sdk-reference/reference/typescript/rest/phone-numbers/phone-numbers-resource#set-swml-webhook); direct `create` produces an orphan resource and emits a deprecation warning. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/fabric/fabric-resource-put/index.mdx b/fern/products/sdk-reference/typescript/rest/fabric/fabric-resource-put/index.mdx similarity index 97% rename from fern/products/sdk-reference/typescript/rest/namespaces/fabric/fabric-resource-put/index.mdx rename to fern/products/sdk-reference/typescript/rest/fabric/fabric-resource-put/index.mdx index e4bb36ed58..6ccb4be986 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/fabric/fabric-resource-put/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/fabric/fabric-resource-put/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/fabric/fabric-resource-put" +slug: "/reference/typescript/rest/fabric/fabric-resource-put" title: "FabricResourcePUT" sdk_label: "TypeScript SDK" icon: "typescript" @@ -9,7 +9,7 @@ lustri: language: "typescript" qualified_name: "rest.namespaces.fabric.FabricResourcePUT" parent: "rest.namespaces.fabric" - module: "rest.namespaces.fabric" + module: "rest.fabric" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts" --- # `FabricResourcePUT` diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/fabric/fabric-resource/index.mdx b/fern/products/sdk-reference/typescript/rest/fabric/fabric-resource/index.mdx similarity index 97% rename from fern/products/sdk-reference/typescript/rest/namespaces/fabric/fabric-resource/index.mdx rename to fern/products/sdk-reference/typescript/rest/fabric/fabric-resource/index.mdx index 2da2b13cc3..dc0cad2bb4 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/fabric/fabric-resource/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/fabric/fabric-resource/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/fabric/fabric-resource" +slug: "/reference/typescript/rest/fabric/fabric-resource" title: "FabricResource" sdk_label: "TypeScript SDK" icon: "typescript" @@ -9,7 +9,7 @@ lustri: language: "typescript" qualified_name: "rest.namespaces.fabric.FabricResource" parent: "rest.namespaces.fabric" - module: "rest.namespaces.fabric" + module: "rest.fabric" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts" --- # `FabricResource` diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/fabric/fabric-tokens/index.mdx b/fern/products/sdk-reference/typescript/rest/fabric/fabric-tokens/index.mdx similarity index 97% rename from fern/products/sdk-reference/typescript/rest/namespaces/fabric/fabric-tokens/index.mdx rename to fern/products/sdk-reference/typescript/rest/fabric/fabric-tokens/index.mdx index 573c5fe618..3dc55731b6 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/fabric/fabric-tokens/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/fabric/fabric-tokens/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/fabric/fabric-tokens" +slug: "/reference/typescript/rest/fabric/fabric-tokens" title: "FabricTokens" sdk_label: "TypeScript SDK" icon: "typescript" @@ -9,7 +9,7 @@ lustri: language: "typescript" qualified_name: "rest.namespaces.fabric.FabricTokens" parent: "rest.namespaces.fabric" - module: "rest.namespaces.fabric" + module: "rest.fabric" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts" --- # `FabricTokens` diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/fabric/generic-resources/index.mdx b/fern/products/sdk-reference/typescript/rest/fabric/generic-resources/index.mdx similarity index 88% rename from fern/products/sdk-reference/typescript/rest/namespaces/fabric/generic-resources/index.mdx rename to fern/products/sdk-reference/typescript/rest/fabric/generic-resources/index.mdx index 9225452227..1c7bb1489c 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/fabric/generic-resources/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/fabric/generic-resources/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/fabric/generic-resources" +slug: "/reference/typescript/rest/fabric/generic-resources" title: "GenericResources" sdk_label: "TypeScript SDK" icon: "typescript" @@ -9,7 +9,7 @@ lustri: language: "typescript" qualified_name: "rest.namespaces.fabric.GenericResources" parent: "rest.namespaces.fabric" - module: "rest.namespaces.fabric" + module: "rest.fabric" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts" --- # `GenericResources` @@ -67,7 +67,7 @@ Line 319. ### assignPhoneRoute - **Deprecated.** For the common cases — SWML webhooks, cXML webhooks, AI agents — this endpoint **does not work**. Bindings for those are configured on the phone number via [PhoneNumbersResource.setSwmlWebhook](/docs/sdk-reference/reference/typescript/rest/namespaces/phone-numbers/phone-numbers-resource#set-swml-webhook) / `setCxmlWebhook` / `setAiAgent`, and the Fabric resource is auto-materialized by the server. Calling this method against `swml_webhook`, `cxml_webhook`, or `ai_agent` resource IDs returns `404` or `422`. The endpoint (`POST /api/fabric/resources/{id}/phone_routes`) applies only to a narrow set of legacy resource types listed in `rest-apis/relay-rest/openapi.yaml`. Emits a one-time deprecation warning on first call; kept for backwards compatibility. + **Deprecated.** For the common cases — SWML webhooks, cXML webhooks, AI agents — this endpoint **does not work**. Bindings for those are configured on the phone number via [PhoneNumbersResource.setSwmlWebhook](/docs/sdk-reference/reference/typescript/rest/phone-numbers/phone-numbers-resource#set-swml-webhook) / `setCxmlWebhook` / `setAiAgent`, and the Fabric resource is auto-materialized by the server. Calling this method against `swml_webhook`, `cxml_webhook`, or `ai_agent` resource IDs returns `404` or `422`. The endpoint (`POST /api/fabric/resources/{id}/phone_routes`) applies only to a narrow set of legacy resource types listed in `rest-apis/relay-rest/openapi.yaml`. Emits a one-time deprecation warning on first call; kept for backwards compatibility. Assign a phone route to a fabric resource. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/fabric/index.mdx b/fern/products/sdk-reference/typescript/rest/fabric/index.mdx similarity index 71% rename from fern/products/sdk-reference/typescript/rest/namespaces/fabric/index.mdx rename to fern/products/sdk-reference/typescript/rest/fabric/index.mdx index 71f7a0d75f..dc1eaaa062 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/fabric/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/fabric/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/fabric" +slug: "/reference/typescript/rest/fabric" title: "fabric" sdk_label: "TypeScript SDK" icon: "typescript" @@ -8,8 +8,8 @@ lustri: kind: "module" language: "typescript" qualified_name: "rest.namespaces.fabric" - parent: "rest.namespaces" - module: "rest.namespaces" + parent: "rest" + module: "rest" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts" --- # `fabric` @@ -23,55 +23,55 @@ module fabric ## Classes - + Fabric webhook resource that is normally auto-materialized by the corresponding `phoneNumbers.set*Webhook` helper. - + Call flows with version management. Uses singular `call_flow` for sub-resource paths. - + Conference rooms — uses singular 'conference\_room' for sub-resource paths. - + cXML applications — no create method (read/update/delete only). - + Auto-materialized cXML webhook — normally created via `phoneNumbers.setCxmlWebhook`. - + Read-only fabric addresses. - + Fabric API namespace grouping all resource types. - + Standard fabric resource with CRUD + addresses (PATCH updates). - + Fabric resource that uses PUT for updates. - + Subscriber, guest, invite, and embed token creation. - + Generic resource operations across all fabric resource types. - + Subscribers with SIP endpoint management. - + Auto-materialized SWML webhook — normally created via `phoneNumbers.setSwmlWebhook`. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/fabric/subscribers-resource/index.mdx b/fern/products/sdk-reference/typescript/rest/fabric/subscribers-resource/index.mdx similarity index 98% rename from fern/products/sdk-reference/typescript/rest/namespaces/fabric/subscribers-resource/index.mdx rename to fern/products/sdk-reference/typescript/rest/fabric/subscribers-resource/index.mdx index 030e13573d..f9ac90b798 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/fabric/subscribers-resource/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/fabric/subscribers-resource/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/fabric/subscribers-resource" +slug: "/reference/typescript/rest/fabric/subscribers-resource" title: "SubscribersResource" sdk_label: "TypeScript SDK" icon: "typescript" @@ -9,7 +9,7 @@ lustri: language: "typescript" qualified_name: "rest.namespaces.fabric.SubscribersResource" parent: "rest.namespaces.fabric" - module: "rest.namespaces.fabric" + module: "rest.fabric" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts" --- # `SubscribersResource` @@ -24,7 +24,7 @@ class SubscribersResource extends FabricResourcePUT ## Inheritance -**Extends:** [FabricResourcePUT](/docs/sdk-reference/reference/typescript/rest/namespaces/fabric/fabric-resource-put) +**Extends:** [FabricResourcePUT](/docs/sdk-reference/reference/typescript/rest/fabric/fabric-resource-put) ## Methods diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/fabric/swml-webhooks-resource/index.mdx b/fern/products/sdk-reference/typescript/rest/fabric/swml-webhooks-resource/index.mdx similarity index 96% rename from fern/products/sdk-reference/typescript/rest/namespaces/fabric/swml-webhooks-resource/index.mdx rename to fern/products/sdk-reference/typescript/rest/fabric/swml-webhooks-resource/index.mdx index 9223b18f8e..eaa219298a 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/fabric/swml-webhooks-resource/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/fabric/swml-webhooks-resource/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/fabric/swml-webhooks-resource" +slug: "/reference/typescript/rest/fabric/swml-webhooks-resource" title: "SwmlWebhooksResource" sdk_label: "TypeScript SDK" icon: "typescript" @@ -9,7 +9,7 @@ lustri: language: "typescript" qualified_name: "rest.namespaces.fabric.SwmlWebhooksResource" parent: "rest.namespaces.fabric" - module: "rest.namespaces.fabric" + module: "rest.fabric" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/fabric.ts" --- # `SwmlWebhooksResource` @@ -24,7 +24,7 @@ class SwmlWebhooksResource extends AutoMaterializedWebhookResource ## Inheritance -**Extends:** [AutoMaterializedWebhookResource](/docs/sdk-reference/reference/typescript/rest/namespaces/fabric/auto-materialized-webhook-resource) +**Extends:** [AutoMaterializedWebhookResource](/docs/sdk-reference/reference/typescript/rest/fabric/auto-materialized-webhook-resource) ## Methods diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/imported-numbers/imported-numbers-resource/index.mdx b/fern/products/sdk-reference/typescript/rest/imported-numbers/imported-numbers-resource/index.mdx similarity index 93% rename from fern/products/sdk-reference/typescript/rest/namespaces/imported-numbers/imported-numbers-resource/index.mdx rename to fern/products/sdk-reference/typescript/rest/imported-numbers/imported-numbers-resource/index.mdx index b49267c62f..7d74faac39 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/imported-numbers/imported-numbers-resource/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/imported-numbers/imported-numbers-resource/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/imported-numbers/imported-numbers-resource" +slug: "/reference/typescript/rest/imported-numbers/imported-numbers-resource" title: "ImportedNumbersResource" sdk_label: "TypeScript SDK" icon: "typescript" @@ -9,7 +9,7 @@ lustri: language: "typescript" qualified_name: "rest.namespaces.imported-numbers.ImportedNumbersResource" parent: "rest.namespaces.imported-numbers" - module: "rest.namespaces.imported-numbers" + module: "rest.imported-numbers" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/imported-numbers.ts" --- # `ImportedNumbersResource` diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/imported-numbers/index.mdx b/fern/products/sdk-reference/typescript/rest/imported-numbers/index.mdx similarity index 78% rename from fern/products/sdk-reference/typescript/rest/namespaces/imported-numbers/index.mdx rename to fern/products/sdk-reference/typescript/rest/imported-numbers/index.mdx index 52e7bc6fcb..31dc3bad26 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/imported-numbers/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/imported-numbers/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/imported-numbers" +slug: "/reference/typescript/rest/imported-numbers" title: "imported-numbers" sdk_label: "TypeScript SDK" icon: "typescript" @@ -8,8 +8,8 @@ lustri: kind: "module" language: "typescript" qualified_name: "rest.namespaces.imported-numbers" - parent: "rest.namespaces" - module: "rest.namespaces" + parent: "rest" + module: "rest" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/imported-numbers.ts" --- # `imported-numbers` @@ -23,7 +23,7 @@ module imported-numbers ## Classes - + Import externally-hosted phone numbers. diff --git a/fern/products/sdk-reference/typescript/rest/index.mdx b/fern/products/sdk-reference/typescript/rest/index.mdx index c7787dcfc2..d6f1eaa101 100644 --- a/fern/products/sdk-reference/typescript/rest/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/index.mdx @@ -37,15 +37,55 @@ module rest ## Modules + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ## Source diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/logs/conference-logs/index.mdx b/fern/products/sdk-reference/typescript/rest/logs/conference-logs/index.mdx similarity index 94% rename from fern/products/sdk-reference/typescript/rest/namespaces/logs/conference-logs/index.mdx rename to fern/products/sdk-reference/typescript/rest/logs/conference-logs/index.mdx index 57d366646a..9b8060d4de 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/logs/conference-logs/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/logs/conference-logs/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/logs/conference-logs" +slug: "/reference/typescript/rest/logs/conference-logs" title: "ConferenceLogs" sdk_label: "TypeScript SDK" icon: "typescript" @@ -9,7 +9,7 @@ lustri: language: "typescript" qualified_name: "rest.namespaces.logs.ConferenceLogs" parent: "rest.namespaces.logs" - module: "rest.namespaces.logs" + module: "rest.logs" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/logs.ts" --- # `ConferenceLogs` diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/logs/fax-logs/index.mdx b/fern/products/sdk-reference/typescript/rest/logs/fax-logs/index.mdx similarity index 95% rename from fern/products/sdk-reference/typescript/rest/namespaces/logs/fax-logs/index.mdx rename to fern/products/sdk-reference/typescript/rest/logs/fax-logs/index.mdx index 5b7a0908c2..6193a69aef 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/logs/fax-logs/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/logs/fax-logs/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/logs/fax-logs" +slug: "/reference/typescript/rest/logs/fax-logs" title: "FaxLogs" sdk_label: "TypeScript SDK" icon: "typescript" @@ -9,7 +9,7 @@ lustri: language: "typescript" qualified_name: "rest.namespaces.logs.FaxLogs" parent: "rest.namespaces.logs" - module: "rest.namespaces.logs" + module: "rest.logs" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/logs.ts" --- # `FaxLogs` diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/logs/index.mdx b/fern/products/sdk-reference/typescript/rest/logs/index.mdx similarity index 75% rename from fern/products/sdk-reference/typescript/rest/namespaces/logs/index.mdx rename to fern/products/sdk-reference/typescript/rest/logs/index.mdx index 43b51994cc..3775935287 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/logs/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/logs/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/logs" +slug: "/reference/typescript/rest/logs" title: "logs" sdk_label: "TypeScript SDK" icon: "typescript" @@ -8,8 +8,8 @@ lustri: kind: "module" language: "typescript" qualified_name: "rest.namespaces.logs" - parent: "rest.namespaces" - module: "rest.namespaces" + parent: "rest" + module: "rest" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/logs.ts" --- # `logs` @@ -23,23 +23,23 @@ module logs ## Classes - + Conference log queries. - + Fax log queries. - + Logs API namespace. - + Message log queries. - + Voice log queries. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/logs/logs-namespace/index.mdx b/fern/products/sdk-reference/typescript/rest/logs/logs-namespace/index.mdx similarity index 93% rename from fern/products/sdk-reference/typescript/rest/namespaces/logs/logs-namespace/index.mdx rename to fern/products/sdk-reference/typescript/rest/logs/logs-namespace/index.mdx index 7da15aa50c..5bf2579956 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/logs/logs-namespace/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/logs/logs-namespace/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/logs/logs-namespace" +slug: "/reference/typescript/rest/logs/logs-namespace" title: "LogsNamespace" sdk_label: "TypeScript SDK" icon: "typescript" @@ -9,7 +9,7 @@ lustri: language: "typescript" qualified_name: "rest.namespaces.logs.LogsNamespace" parent: "rest.namespaces.logs" - module: "rest.namespaces.logs" + module: "rest.logs" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/logs.ts" --- # `LogsNamespace` diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/logs/message-logs/index.mdx b/fern/products/sdk-reference/typescript/rest/logs/message-logs/index.mdx similarity index 95% rename from fern/products/sdk-reference/typescript/rest/namespaces/logs/message-logs/index.mdx rename to fern/products/sdk-reference/typescript/rest/logs/message-logs/index.mdx index 09360e440c..bb65e9b48d 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/logs/message-logs/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/logs/message-logs/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/logs/message-logs" +slug: "/reference/typescript/rest/logs/message-logs" title: "MessageLogs" sdk_label: "TypeScript SDK" icon: "typescript" @@ -9,7 +9,7 @@ lustri: language: "typescript" qualified_name: "rest.namespaces.logs.MessageLogs" parent: "rest.namespaces.logs" - module: "rest.namespaces.logs" + module: "rest.logs" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/logs.ts" --- # `MessageLogs` diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/logs/voice-logs/index.mdx b/fern/products/sdk-reference/typescript/rest/logs/voice-logs/index.mdx similarity index 96% rename from fern/products/sdk-reference/typescript/rest/namespaces/logs/voice-logs/index.mdx rename to fern/products/sdk-reference/typescript/rest/logs/voice-logs/index.mdx index 10d7f5bbf2..d2a2c5ff3d 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/logs/voice-logs/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/logs/voice-logs/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/logs/voice-logs" +slug: "/reference/typescript/rest/logs/voice-logs" title: "VoiceLogs" sdk_label: "TypeScript SDK" icon: "typescript" @@ -9,7 +9,7 @@ lustri: language: "typescript" qualified_name: "rest.namespaces.logs.VoiceLogs" parent: "rest.namespaces.logs" - module: "rest.namespaces.logs" + module: "rest.logs" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/logs.ts" --- # `VoiceLogs` diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/lookup/index.mdx b/fern/products/sdk-reference/typescript/rest/lookup/index.mdx similarity index 80% rename from fern/products/sdk-reference/typescript/rest/namespaces/lookup/index.mdx rename to fern/products/sdk-reference/typescript/rest/lookup/index.mdx index 2ae8d589c8..bbf74fca5c 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/lookup/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/lookup/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/lookup" +slug: "/reference/typescript/rest/lookup" title: "lookup" sdk_label: "TypeScript SDK" icon: "typescript" @@ -8,8 +8,8 @@ lustri: kind: "module" language: "typescript" qualified_name: "rest.namespaces.lookup" - parent: "rest.namespaces" - module: "rest.namespaces" + parent: "rest" + module: "rest" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/lookup.ts" --- # `lookup` @@ -23,7 +23,7 @@ module lookup ## Classes - + Phone number lookup (carrier, CNAM). diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/lookup/lookup-resource/index.mdx b/fern/products/sdk-reference/typescript/rest/lookup/lookup-resource/index.mdx similarity index 95% rename from fern/products/sdk-reference/typescript/rest/namespaces/lookup/lookup-resource/index.mdx rename to fern/products/sdk-reference/typescript/rest/lookup/lookup-resource/index.mdx index fb456fc169..3a4da7bb0d 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/lookup/lookup-resource/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/lookup/lookup-resource/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/lookup/lookup-resource" +slug: "/reference/typescript/rest/lookup/lookup-resource" title: "LookupResource" sdk_label: "TypeScript SDK" icon: "typescript" @@ -9,7 +9,7 @@ lustri: language: "typescript" qualified_name: "rest.namespaces.lookup.LookupResource" parent: "rest.namespaces.lookup" - module: "rest.namespaces.lookup" + module: "rest.lookup" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/lookup.ts" --- # `LookupResource` diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/mfa/index.mdx b/fern/products/sdk-reference/typescript/rest/mfa/index.mdx similarity index 81% rename from fern/products/sdk-reference/typescript/rest/namespaces/mfa/index.mdx rename to fern/products/sdk-reference/typescript/rest/mfa/index.mdx index 353c5f6fb5..36bc526a5a 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/mfa/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/mfa/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/mfa" +slug: "/reference/typescript/rest/mfa" title: "mfa" sdk_label: "TypeScript SDK" icon: "typescript" @@ -8,8 +8,8 @@ lustri: kind: "module" language: "typescript" qualified_name: "rest.namespaces.mfa" - parent: "rest.namespaces" - module: "rest.namespaces" + parent: "rest" + module: "rest" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/mfa.ts" --- # `mfa` @@ -23,7 +23,7 @@ module mfa ## Classes - + Multi-factor authentication via SMS or phone call. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/mfa/mfa-resource/index.mdx b/fern/products/sdk-reference/typescript/rest/mfa/mfa-resource/index.mdx similarity index 88% rename from fern/products/sdk-reference/typescript/rest/namespaces/mfa/mfa-resource/index.mdx rename to fern/products/sdk-reference/typescript/rest/mfa/mfa-resource/index.mdx index 5a2b4e7227..a78f972c3c 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/mfa/mfa-resource/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/mfa/mfa-resource/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/mfa/mfa-resource" +slug: "/reference/typescript/rest/mfa/mfa-resource" title: "MfaResource" sdk_label: "TypeScript SDK" icon: "typescript" @@ -9,7 +9,7 @@ lustri: language: "typescript" qualified_name: "rest.namespaces.mfa.MfaResource" parent: "rest.namespaces.mfa" - module: "rest.namespaces.mfa" + module: "rest.mfa" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/mfa.ts" --- # `MfaResource` @@ -56,7 +56,7 @@ call(body: any): Promise #### Returns -`Promise` — The MFA request record; its `id` is used by [verify](/docs/sdk-reference/reference/typescript/rest/namespaces/mfa/mfa-resource#verify). +`Promise` — The MFA request record; its `id` is used by [verify](/docs/sdk-reference/reference/typescript/rest/mfa/mfa-resource#verify). #### Throws @@ -113,7 +113,7 @@ sms(body: any): Promise #### Returns -`Promise` — The MFA request record; its `id` is used by [verify](/docs/sdk-reference/reference/typescript/rest/namespaces/mfa/mfa-resource#verify). +`Promise` — The MFA request record; its `id` is used by [verify](/docs/sdk-reference/reference/typescript/rest/mfa/mfa-resource#verify). #### Throws @@ -140,7 +140,7 @@ verify(requestId: string, body: any): Promise #### Parameters - The `id` returned from [sms](/docs/sdk-reference/reference/typescript/rest/namespaces/mfa/mfa-resource#sms) or [call](/docs/sdk-reference/reference/typescript/rest/namespaces/mfa/mfa-resource#call). + The `id` returned from [sms](/docs/sdk-reference/reference/typescript/rest/mfa/mfa-resource#sms) or [call](/docs/sdk-reference/reference/typescript/rest/mfa/mfa-resource#call). diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/index.mdx b/fern/products/sdk-reference/typescript/rest/namespaces/index.mdx deleted file mode 100644 index f0e7c99640..0000000000 --- a/fern/products/sdk-reference/typescript/rest/namespaces/index.mdx +++ /dev/null @@ -1,60 +0,0 @@ ---- -slug: "/reference/typescript/rest/namespaces" -title: "namespaces" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "module" - language: "typescript" - qualified_name: "rest.namespaces" - parent: "rest" - module: "rest" ---- -# `namespaces` - -## Modules - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/number-groups/index.mdx b/fern/products/sdk-reference/typescript/rest/number-groups/index.mdx similarity index 79% rename from fern/products/sdk-reference/typescript/rest/namespaces/number-groups/index.mdx rename to fern/products/sdk-reference/typescript/rest/number-groups/index.mdx index 3394a46277..d7bd2d9f86 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/number-groups/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/number-groups/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/number-groups" +slug: "/reference/typescript/rest/number-groups" title: "number-groups" sdk_label: "TypeScript SDK" icon: "typescript" @@ -8,8 +8,8 @@ lustri: kind: "module" language: "typescript" qualified_name: "rest.namespaces.number-groups" - parent: "rest.namespaces" - module: "rest.namespaces" + parent: "rest" + module: "rest" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/number-groups.ts" --- # `number-groups` @@ -23,7 +23,7 @@ module number-groups ## Classes - + Number group management with membership operations. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/number-groups/number-groups-resource/index.mdx b/fern/products/sdk-reference/typescript/rest/number-groups/number-groups-resource/index.mdx similarity index 98% rename from fern/products/sdk-reference/typescript/rest/namespaces/number-groups/number-groups-resource/index.mdx rename to fern/products/sdk-reference/typescript/rest/number-groups/number-groups-resource/index.mdx index 0f41f7b19e..ec09c36ce7 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/number-groups/number-groups-resource/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/number-groups/number-groups-resource/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/number-groups/number-groups-resource" +slug: "/reference/typescript/rest/number-groups/number-groups-resource" title: "NumberGroupsResource" sdk_label: "TypeScript SDK" icon: "typescript" @@ -9,7 +9,7 @@ lustri: language: "typescript" qualified_name: "rest.namespaces.number-groups.NumberGroupsResource" parent: "rest.namespaces.number-groups" - module: "rest.namespaces.number-groups" + module: "rest.number-groups" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/number-groups.ts" --- # `NumberGroupsResource` diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/phone-numbers/index.mdx b/fern/products/sdk-reference/typescript/rest/phone-numbers/index.mdx similarity index 83% rename from fern/products/sdk-reference/typescript/rest/namespaces/phone-numbers/index.mdx rename to fern/products/sdk-reference/typescript/rest/phone-numbers/index.mdx index 1034609369..92bd82e036 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/phone-numbers/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/phone-numbers/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/phone-numbers" +slug: "/reference/typescript/rest/phone-numbers" title: "phone-numbers" sdk_label: "TypeScript SDK" icon: "typescript" @@ -8,8 +8,8 @@ lustri: kind: "module" language: "typescript" qualified_name: "rest.namespaces.phone-numbers" - parent: "rest.namespaces" - module: "rest.namespaces" + parent: "rest" + module: "rest" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/phone-numbers.ts" --- # `phone-numbers` @@ -23,7 +23,7 @@ module phone-numbers ## Classes - + Phone number management. @@ -32,7 +32,7 @@ module phone-numbers ### SetCallFlowParams -Parameters for [PhoneNumbersResource.setCallFlow](/docs/sdk-reference/reference/typescript/rest/namespaces/phone-numbers/phone-numbers-resource#set-call-flow). +Parameters for [PhoneNumbersResource.setCallFlow](/docs/sdk-reference/reference/typescript/rest/phone-numbers/phone-numbers-resource#set-call-flow). #### Signature @@ -60,7 +60,7 @@ Line 30. ### SetCxmlWebhookParams -Parameters for [PhoneNumbersResource.setCxmlWebhook](/docs/sdk-reference/reference/typescript/rest/namespaces/phone-numbers/phone-numbers-resource#set-cxml-webhook). +Parameters for [PhoneNumbersResource.setCxmlWebhook](/docs/sdk-reference/reference/typescript/rest/phone-numbers/phone-numbers-resource#set-cxml-webhook). #### Signature @@ -92,7 +92,7 @@ Line 18. ### SetRelayTopicParams -Parameters for [PhoneNumbersResource.setRelayTopic](/docs/sdk-reference/reference/typescript/rest/namespaces/phone-numbers/phone-numbers-resource#set-relay-topic). +Parameters for [PhoneNumbersResource.setRelayTopic](/docs/sdk-reference/reference/typescript/rest/phone-numbers/phone-numbers-resource#set-relay-topic). #### Signature @@ -120,7 +120,7 @@ Line 43. ### SetSwmlWebhookExtra -Optional companion fields for [PhoneNumbersResource.setSwmlWebhook](/docs/sdk-reference/reference/typescript/rest/namespaces/phone-numbers/phone-numbers-resource#set-swml-webhook). +Optional companion fields for [PhoneNumbersResource.setSwmlWebhook](/docs/sdk-reference/reference/typescript/rest/phone-numbers/phone-numbers-resource#set-swml-webhook). #### Signature diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/phone-numbers/phone-numbers-resource/index.mdx b/fern/products/sdk-reference/typescript/rest/phone-numbers/phone-numbers-resource/index.mdx similarity index 99% rename from fern/products/sdk-reference/typescript/rest/namespaces/phone-numbers/phone-numbers-resource/index.mdx rename to fern/products/sdk-reference/typescript/rest/phone-numbers/phone-numbers-resource/index.mdx index d03ce9a06f..178a965788 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/phone-numbers/phone-numbers-resource/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/phone-numbers/phone-numbers-resource/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/phone-numbers/phone-numbers-resource" +slug: "/reference/typescript/rest/phone-numbers/phone-numbers-resource" title: "PhoneNumbersResource" sdk_label: "TypeScript SDK" icon: "typescript" @@ -9,7 +9,7 @@ lustri: language: "typescript" qualified_name: "rest.namespaces.phone-numbers.PhoneNumbersResource" parent: "rest.namespaces.phone-numbers" - module: "rest.namespaces.phone-numbers" + module: "rest.phone-numbers" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/phone-numbers.ts" --- # `PhoneNumbersResource` diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/project/index.mdx b/fern/products/sdk-reference/typescript/rest/project/index.mdx similarity index 77% rename from fern/products/sdk-reference/typescript/rest/namespaces/project/index.mdx rename to fern/products/sdk-reference/typescript/rest/project/index.mdx index 7c939876d0..d7167992e9 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/project/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/project/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/project" +slug: "/reference/typescript/rest/project" title: "project" sdk_label: "TypeScript SDK" icon: "typescript" @@ -8,8 +8,8 @@ lustri: kind: "module" language: "typescript" qualified_name: "rest.namespaces.project" - parent: "rest.namespaces" - module: "rest.namespaces" + parent: "rest" + module: "rest" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/project.ts" --- # `project` @@ -23,11 +23,11 @@ module project ## Classes - + Project API namespace. - + Project API token management. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/project/project-namespace/index.mdx b/fern/products/sdk-reference/typescript/rest/project/project-namespace/index.mdx similarity index 91% rename from fern/products/sdk-reference/typescript/rest/namespaces/project/project-namespace/index.mdx rename to fern/products/sdk-reference/typescript/rest/project/project-namespace/index.mdx index fccbd34e8f..de3fe0bede 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/project/project-namespace/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/project/project-namespace/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/project/project-namespace" +slug: "/reference/typescript/rest/project/project-namespace" title: "ProjectNamespace" sdk_label: "TypeScript SDK" icon: "typescript" @@ -9,7 +9,7 @@ lustri: language: "typescript" qualified_name: "rest.namespaces.project.ProjectNamespace" parent: "rest.namespaces.project" - module: "rest.namespaces.project" + module: "rest.project" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/project.ts" --- # `ProjectNamespace` diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/project/project-tokens/index.mdx b/fern/products/sdk-reference/typescript/rest/project/project-tokens/index.mdx similarity index 96% rename from fern/products/sdk-reference/typescript/rest/namespaces/project/project-tokens/index.mdx rename to fern/products/sdk-reference/typescript/rest/project/project-tokens/index.mdx index 2130e6c4b7..55c6f28117 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/project/project-tokens/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/project/project-tokens/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/project/project-tokens" +slug: "/reference/typescript/rest/project/project-tokens" title: "ProjectTokens" sdk_label: "TypeScript SDK" icon: "typescript" @@ -9,7 +9,7 @@ lustri: language: "typescript" qualified_name: "rest.namespaces.project.ProjectTokens" parent: "rest.namespaces.project" - module: "rest.namespaces.project" + module: "rest.project" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/project.ts" --- # `ProjectTokens` diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/pubsub/index.mdx b/fern/products/sdk-reference/typescript/rest/pubsub/index.mdx similarity index 79% rename from fern/products/sdk-reference/typescript/rest/namespaces/pubsub/index.mdx rename to fern/products/sdk-reference/typescript/rest/pubsub/index.mdx index cad92e949f..c09d81bb8c 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/pubsub/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/pubsub/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/pubsub" +slug: "/reference/typescript/rest/pubsub" title: "pubsub" sdk_label: "TypeScript SDK" icon: "typescript" @@ -8,8 +8,8 @@ lustri: kind: "module" language: "typescript" qualified_name: "rest.namespaces.pubsub" - parent: "rest.namespaces" - module: "rest.namespaces" + parent: "rest" + module: "rest" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/pubsub.ts" --- # `pubsub` @@ -23,7 +23,7 @@ module pubsub ## Classes - + PubSub token generation. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/pubsub/pub-sub-resource/index.mdx b/fern/products/sdk-reference/typescript/rest/pubsub/pub-sub-resource/index.mdx similarity index 94% rename from fern/products/sdk-reference/typescript/rest/namespaces/pubsub/pub-sub-resource/index.mdx rename to fern/products/sdk-reference/typescript/rest/pubsub/pub-sub-resource/index.mdx index d3834fcd8b..1b46021308 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/pubsub/pub-sub-resource/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/pubsub/pub-sub-resource/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/pubsub/pub-sub-resource" +slug: "/reference/typescript/rest/pubsub/pub-sub-resource" title: "PubSubResource" sdk_label: "TypeScript SDK" icon: "typescript" @@ -9,7 +9,7 @@ lustri: language: "typescript" qualified_name: "rest.namespaces.pubsub.PubSubResource" parent: "rest.namespaces.pubsub" - module: "rest.namespaces.pubsub" + module: "rest.pubsub" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/pubsub.ts" --- # `PubSubResource` diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/queues/index.mdx b/fern/products/sdk-reference/typescript/rest/queues/index.mdx similarity index 80% rename from fern/products/sdk-reference/typescript/rest/namespaces/queues/index.mdx rename to fern/products/sdk-reference/typescript/rest/queues/index.mdx index 9ff3bdd7ab..cdbca3b22b 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/queues/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/queues/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/queues" +slug: "/reference/typescript/rest/queues" title: "queues" sdk_label: "TypeScript SDK" icon: "typescript" @@ -8,8 +8,8 @@ lustri: kind: "module" language: "typescript" qualified_name: "rest.namespaces.queues" - parent: "rest.namespaces" - module: "rest.namespaces" + parent: "rest" + module: "rest" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/queues.ts" --- # `queues` @@ -23,7 +23,7 @@ module queues ## Classes - + Queue management with member operations. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/queues/queues-resource/index.mdx b/fern/products/sdk-reference/typescript/rest/queues/queues-resource/index.mdx similarity index 98% rename from fern/products/sdk-reference/typescript/rest/namespaces/queues/queues-resource/index.mdx rename to fern/products/sdk-reference/typescript/rest/queues/queues-resource/index.mdx index e2ca39f675..b8d46b0197 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/queues/queues-resource/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/queues/queues-resource/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/queues/queues-resource" +slug: "/reference/typescript/rest/queues/queues-resource" title: "QueuesResource" sdk_label: "TypeScript SDK" icon: "typescript" @@ -9,7 +9,7 @@ lustri: language: "typescript" qualified_name: "rest.namespaces.queues.QueuesResource" parent: "rest.namespaces.queues" - module: "rest.namespaces.queues" + module: "rest.queues" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/queues.ts" --- # `QueuesResource` diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/recordings/index.mdx b/fern/products/sdk-reference/typescript/rest/recordings/index.mdx similarity index 79% rename from fern/products/sdk-reference/typescript/rest/namespaces/recordings/index.mdx rename to fern/products/sdk-reference/typescript/rest/recordings/index.mdx index 87736b2546..de57c62095 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/recordings/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/recordings/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/recordings" +slug: "/reference/typescript/rest/recordings" title: "recordings" sdk_label: "TypeScript SDK" icon: "typescript" @@ -8,8 +8,8 @@ lustri: kind: "module" language: "typescript" qualified_name: "rest.namespaces.recordings" - parent: "rest.namespaces" - module: "rest.namespaces" + parent: "rest" + module: "rest" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/recordings.ts" --- # `recordings` @@ -23,7 +23,7 @@ module recordings ## Classes - + Recording management (read-only + delete). diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/recordings/recordings-resource/index.mdx b/fern/products/sdk-reference/typescript/rest/recordings/recordings-resource/index.mdx similarity index 95% rename from fern/products/sdk-reference/typescript/rest/namespaces/recordings/recordings-resource/index.mdx rename to fern/products/sdk-reference/typescript/rest/recordings/recordings-resource/index.mdx index 8bfb68ec1f..a865be1ed4 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/recordings/recordings-resource/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/recordings/recordings-resource/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/recordings/recordings-resource" +slug: "/reference/typescript/rest/recordings/recordings-resource" title: "RecordingsResource" sdk_label: "TypeScript SDK" icon: "typescript" @@ -9,7 +9,7 @@ lustri: language: "typescript" qualified_name: "rest.namespaces.recordings.RecordingsResource" parent: "rest.namespaces.recordings" - module: "rest.namespaces.recordings" + module: "rest.recordings" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/recordings.ts" --- # `RecordingsResource` diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/registry/index.mdx b/fern/products/sdk-reference/typescript/rest/registry/index.mdx similarity index 73% rename from fern/products/sdk-reference/typescript/rest/namespaces/registry/index.mdx rename to fern/products/sdk-reference/typescript/rest/registry/index.mdx index 9e186a2832..be7f97a0e2 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/registry/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/registry/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/registry" +slug: "/reference/typescript/rest/registry" title: "registry" sdk_label: "TypeScript SDK" icon: "typescript" @@ -8,8 +8,8 @@ lustri: kind: "module" language: "typescript" qualified_name: "rest.namespaces.registry" - parent: "rest.namespaces" - module: "rest.namespaces" + parent: "rest" + module: "rest" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/registry.ts" --- # `registry` @@ -23,23 +23,23 @@ module registry ## Classes - + 10DLC brand management. - + 10DLC campaign management. - + 10DLC Campaign Registry namespace. - + 10DLC number assignment management. - + 10DLC assignment order management. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/registry/registry-brands/index.mdx b/fern/products/sdk-reference/typescript/rest/registry/registry-brands/index.mdx similarity index 97% rename from fern/products/sdk-reference/typescript/rest/namespaces/registry/registry-brands/index.mdx rename to fern/products/sdk-reference/typescript/rest/registry/registry-brands/index.mdx index 26c0a1b4e0..e2efbfb986 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/registry/registry-brands/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/registry/registry-brands/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/registry/registry-brands" +slug: "/reference/typescript/rest/registry/registry-brands" title: "RegistryBrands" sdk_label: "TypeScript SDK" icon: "typescript" @@ -9,7 +9,7 @@ lustri: language: "typescript" qualified_name: "rest.namespaces.registry.RegistryBrands" parent: "rest.namespaces.registry" - module: "rest.namespaces.registry" + module: "rest.registry" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/registry.ts" --- # `RegistryBrands` diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/registry/registry-campaigns/index.mdx b/fern/products/sdk-reference/typescript/rest/registry/registry-campaigns/index.mdx similarity index 97% rename from fern/products/sdk-reference/typescript/rest/namespaces/registry/registry-campaigns/index.mdx rename to fern/products/sdk-reference/typescript/rest/registry/registry-campaigns/index.mdx index 8cc368a2b6..2b353de712 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/registry/registry-campaigns/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/registry/registry-campaigns/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/registry/registry-campaigns" +slug: "/reference/typescript/rest/registry/registry-campaigns" title: "RegistryCampaigns" sdk_label: "TypeScript SDK" icon: "typescript" @@ -9,7 +9,7 @@ lustri: language: "typescript" qualified_name: "rest.namespaces.registry.RegistryCampaigns" parent: "rest.namespaces.registry" - module: "rest.namespaces.registry" + module: "rest.registry" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/registry.ts" --- # `RegistryCampaigns` diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/registry/registry-namespace/index.mdx b/fern/products/sdk-reference/typescript/rest/registry/registry-namespace/index.mdx similarity index 93% rename from fern/products/sdk-reference/typescript/rest/namespaces/registry/registry-namespace/index.mdx rename to fern/products/sdk-reference/typescript/rest/registry/registry-namespace/index.mdx index f8ff90cdc9..dcefa311f2 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/registry/registry-namespace/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/registry/registry-namespace/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/registry/registry-namespace" +slug: "/reference/typescript/rest/registry/registry-namespace" title: "RegistryNamespace" sdk_label: "TypeScript SDK" icon: "typescript" @@ -9,7 +9,7 @@ lustri: language: "typescript" qualified_name: "rest.namespaces.registry.RegistryNamespace" parent: "rest.namespaces.registry" - module: "rest.namespaces.registry" + module: "rest.registry" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/registry.ts" --- # `RegistryNamespace` diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/registry/registry-numbers/index.mdx b/fern/products/sdk-reference/typescript/rest/registry/registry-numbers/index.mdx similarity index 94% rename from fern/products/sdk-reference/typescript/rest/namespaces/registry/registry-numbers/index.mdx rename to fern/products/sdk-reference/typescript/rest/registry/registry-numbers/index.mdx index 4d86a5527d..1d862abfab 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/registry/registry-numbers/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/registry/registry-numbers/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/registry/registry-numbers" +slug: "/reference/typescript/rest/registry/registry-numbers" title: "RegistryNumbers" sdk_label: "TypeScript SDK" icon: "typescript" @@ -9,7 +9,7 @@ lustri: language: "typescript" qualified_name: "rest.namespaces.registry.RegistryNumbers" parent: "rest.namespaces.registry" - module: "rest.namespaces.registry" + module: "rest.registry" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/registry.ts" --- # `RegistryNumbers` diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/registry/registry-orders/index.mdx b/fern/products/sdk-reference/typescript/rest/registry/registry-orders/index.mdx similarity index 94% rename from fern/products/sdk-reference/typescript/rest/namespaces/registry/registry-orders/index.mdx rename to fern/products/sdk-reference/typescript/rest/registry/registry-orders/index.mdx index 91ec98aebb..93ee87c9b7 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/registry/registry-orders/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/registry/registry-orders/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/registry/registry-orders" +slug: "/reference/typescript/rest/registry/registry-orders" title: "RegistryOrders" sdk_label: "TypeScript SDK" icon: "typescript" @@ -9,7 +9,7 @@ lustri: language: "typescript" qualified_name: "rest.namespaces.registry.RegistryOrders" parent: "rest.namespaces.registry" - module: "rest.namespaces.registry" + module: "rest.registry" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/registry.ts" --- # `RegistryOrders` diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/short-codes/index.mdx b/fern/products/sdk-reference/typescript/rest/short-codes/index.mdx similarity index 79% rename from fern/products/sdk-reference/typescript/rest/namespaces/short-codes/index.mdx rename to fern/products/sdk-reference/typescript/rest/short-codes/index.mdx index 712cc0fbbd..41afa1795c 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/short-codes/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/short-codes/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/short-codes" +slug: "/reference/typescript/rest/short-codes" title: "short-codes" sdk_label: "TypeScript SDK" icon: "typescript" @@ -8,8 +8,8 @@ lustri: kind: "module" language: "typescript" qualified_name: "rest.namespaces.short-codes" - parent: "rest.namespaces" - module: "rest.namespaces" + parent: "rest" + module: "rest" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/short-codes.ts" --- # `short-codes` @@ -23,7 +23,7 @@ module short-codes ## Classes - + Short code management (read + update only). diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/short-codes/short-codes-resource/index.mdx b/fern/products/sdk-reference/typescript/rest/short-codes/short-codes-resource/index.mdx similarity index 96% rename from fern/products/sdk-reference/typescript/rest/namespaces/short-codes/short-codes-resource/index.mdx rename to fern/products/sdk-reference/typescript/rest/short-codes/short-codes-resource/index.mdx index 074d0a5710..ab4cc7ccc0 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/short-codes/short-codes-resource/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/short-codes/short-codes-resource/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/short-codes/short-codes-resource" +slug: "/reference/typescript/rest/short-codes/short-codes-resource" title: "ShortCodesResource" sdk_label: "TypeScript SDK" icon: "typescript" @@ -9,7 +9,7 @@ lustri: language: "typescript" qualified_name: "rest.namespaces.short-codes.ShortCodesResource" parent: "rest.namespaces.short-codes" - module: "rest.namespaces.short-codes" + module: "rest.short-codes" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/short-codes.ts" --- # `ShortCodesResource` diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/sip-profile/index.mdx b/fern/products/sdk-reference/typescript/rest/sip-profile/index.mdx similarity index 79% rename from fern/products/sdk-reference/typescript/rest/namespaces/sip-profile/index.mdx rename to fern/products/sdk-reference/typescript/rest/sip-profile/index.mdx index 480f21a5f0..5a0fa6a92c 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/sip-profile/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/sip-profile/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/sip-profile" +slug: "/reference/typescript/rest/sip-profile" title: "sip-profile" sdk_label: "TypeScript SDK" icon: "typescript" @@ -8,8 +8,8 @@ lustri: kind: "module" language: "typescript" qualified_name: "rest.namespaces.sip-profile" - parent: "rest.namespaces" - module: "rest.namespaces" + parent: "rest" + module: "rest" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/sip-profile.ts" --- # `sip-profile` @@ -23,7 +23,7 @@ module sip-profile ## Classes - + Project SIP profile (singleton resource). diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/sip-profile/sip-profile-resource/index.mdx b/fern/products/sdk-reference/typescript/rest/sip-profile/sip-profile-resource/index.mdx similarity index 94% rename from fern/products/sdk-reference/typescript/rest/namespaces/sip-profile/sip-profile-resource/index.mdx rename to fern/products/sdk-reference/typescript/rest/sip-profile/sip-profile-resource/index.mdx index 18b38c2e02..f4f020a5cf 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/sip-profile/sip-profile-resource/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/sip-profile/sip-profile-resource/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/sip-profile/sip-profile-resource" +slug: "/reference/typescript/rest/sip-profile/sip-profile-resource" title: "SipProfileResource" sdk_label: "TypeScript SDK" icon: "typescript" @@ -9,7 +9,7 @@ lustri: language: "typescript" qualified_name: "rest.namespaces.sip-profile.SipProfileResource" parent: "rest.namespaces.sip-profile" - module: "rest.namespaces.sip-profile" + module: "rest.sip-profile" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/sip-profile.ts" --- # `SipProfileResource` diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/verified-callers/index.mdx b/fern/products/sdk-reference/typescript/rest/verified-callers/index.mdx similarity index 78% rename from fern/products/sdk-reference/typescript/rest/namespaces/verified-callers/index.mdx rename to fern/products/sdk-reference/typescript/rest/verified-callers/index.mdx index 745076597b..7479536cad 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/verified-callers/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/verified-callers/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/verified-callers" +slug: "/reference/typescript/rest/verified-callers" title: "verified-callers" sdk_label: "TypeScript SDK" icon: "typescript" @@ -8,8 +8,8 @@ lustri: kind: "module" language: "typescript" qualified_name: "rest.namespaces.verified-callers" - parent: "rest.namespaces" - module: "rest.namespaces" + parent: "rest" + module: "rest" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/verified-callers.ts" --- # `verified-callers` @@ -23,7 +23,7 @@ module verified-callers ## Classes - + Verified caller ID management with verification flow. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/verified-callers/verified-callers-resource/index.mdx b/fern/products/sdk-reference/typescript/rest/verified-callers/verified-callers-resource/index.mdx similarity index 97% rename from fern/products/sdk-reference/typescript/rest/namespaces/verified-callers/verified-callers-resource/index.mdx rename to fern/products/sdk-reference/typescript/rest/verified-callers/verified-callers-resource/index.mdx index a4779995f2..be97938725 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/verified-callers/verified-callers-resource/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/verified-callers/verified-callers-resource/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/verified-callers/verified-callers-resource" +slug: "/reference/typescript/rest/verified-callers/verified-callers-resource" title: "VerifiedCallersResource" sdk_label: "TypeScript SDK" icon: "typescript" @@ -9,7 +9,7 @@ lustri: language: "typescript" qualified_name: "rest.namespaces.verified-callers.VerifiedCallersResource" parent: "rest.namespaces.verified-callers" - module: "rest.namespaces.verified-callers" + module: "rest.verified-callers" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/verified-callers.ts" --- # `VerifiedCallersResource` diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/video/index.mdx b/fern/products/sdk-reference/typescript/rest/video/index.mdx similarity index 71% rename from fern/products/sdk-reference/typescript/rest/namespaces/video/index.mdx rename to fern/products/sdk-reference/typescript/rest/video/index.mdx index 8b22832e45..461bdf0d29 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/video/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/video/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/video" +slug: "/reference/typescript/rest/video" title: "video" sdk_label: "TypeScript SDK" icon: "typescript" @@ -8,8 +8,8 @@ lustri: kind: "module" language: "typescript" qualified_name: "rest.namespaces.video" - parent: "rest.namespaces" - module: "rest.namespaces" + parent: "rest" + module: "rest" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/video.ts" --- # `video` @@ -23,35 +23,35 @@ module video ## Classes - + Video conference management with tokens and streams. - + Video conference token management. - + Video API namespace. - + Video room recording management. - + Video room management with streams. - + Video room session management. - + Video room token generation. - + Video stream management. diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/video/video-conference-tokens/index.mdx b/fern/products/sdk-reference/typescript/rest/video/video-conference-tokens/index.mdx similarity index 95% rename from fern/products/sdk-reference/typescript/rest/namespaces/video/video-conference-tokens/index.mdx rename to fern/products/sdk-reference/typescript/rest/video/video-conference-tokens/index.mdx index 6b751a8239..cdc9a04be1 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/video/video-conference-tokens/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/video/video-conference-tokens/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/video/video-conference-tokens" +slug: "/reference/typescript/rest/video/video-conference-tokens" title: "VideoConferenceTokens" sdk_label: "TypeScript SDK" icon: "typescript" @@ -9,7 +9,7 @@ lustri: language: "typescript" qualified_name: "rest.namespaces.video.VideoConferenceTokens" parent: "rest.namespaces.video" - module: "rest.namespaces.video" + module: "rest.video" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/video.ts" --- # `VideoConferenceTokens` diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/video/video-conferences/index.mdx b/fern/products/sdk-reference/typescript/rest/video/video-conferences/index.mdx similarity index 98% rename from fern/products/sdk-reference/typescript/rest/namespaces/video/video-conferences/index.mdx rename to fern/products/sdk-reference/typescript/rest/video/video-conferences/index.mdx index b4d49d6de1..08d4eb39a3 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/video/video-conferences/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/video/video-conferences/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/video/video-conferences" +slug: "/reference/typescript/rest/video/video-conferences" title: "VideoConferences" sdk_label: "TypeScript SDK" icon: "typescript" @@ -9,7 +9,7 @@ lustri: language: "typescript" qualified_name: "rest.namespaces.video.VideoConferences" parent: "rest.namespaces.video" - module: "rest.namespaces.video" + module: "rest.video" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/video.ts" --- # `VideoConferences` diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/video/video-namespace/index.mdx b/fern/products/sdk-reference/typescript/rest/video/video-namespace/index.mdx similarity index 95% rename from fern/products/sdk-reference/typescript/rest/namespaces/video/video-namespace/index.mdx rename to fern/products/sdk-reference/typescript/rest/video/video-namespace/index.mdx index eb8371d448..59fb2e7753 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/video/video-namespace/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/video/video-namespace/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/video/video-namespace" +slug: "/reference/typescript/rest/video/video-namespace" title: "VideoNamespace" sdk_label: "TypeScript SDK" icon: "typescript" @@ -9,7 +9,7 @@ lustri: language: "typescript" qualified_name: "rest.namespaces.video.VideoNamespace" parent: "rest.namespaces.video" - module: "rest.namespaces.video" + module: "rest.video" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/video.ts" --- # `VideoNamespace` diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/video/video-room-recordings/index.mdx b/fern/products/sdk-reference/typescript/rest/video/video-room-recordings/index.mdx similarity index 96% rename from fern/products/sdk-reference/typescript/rest/namespaces/video/video-room-recordings/index.mdx rename to fern/products/sdk-reference/typescript/rest/video/video-room-recordings/index.mdx index 2c3ee91eaa..097e65ea31 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/video/video-room-recordings/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/video/video-room-recordings/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/video/video-room-recordings" +slug: "/reference/typescript/rest/video/video-room-recordings" title: "VideoRoomRecordings" sdk_label: "TypeScript SDK" icon: "typescript" @@ -9,7 +9,7 @@ lustri: language: "typescript" qualified_name: "rest.namespaces.video.VideoRoomRecordings" parent: "rest.namespaces.video" - module: "rest.namespaces.video" + module: "rest.video" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/video.ts" --- # `VideoRoomRecordings` diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/video/video-room-sessions/index.mdx b/fern/products/sdk-reference/typescript/rest/video/video-room-sessions/index.mdx similarity index 97% rename from fern/products/sdk-reference/typescript/rest/namespaces/video/video-room-sessions/index.mdx rename to fern/products/sdk-reference/typescript/rest/video/video-room-sessions/index.mdx index 82bb4784f3..9cf1c8ae0f 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/video/video-room-sessions/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/video/video-room-sessions/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/video/video-room-sessions" +slug: "/reference/typescript/rest/video/video-room-sessions" title: "VideoRoomSessions" sdk_label: "TypeScript SDK" icon: "typescript" @@ -9,7 +9,7 @@ lustri: language: "typescript" qualified_name: "rest.namespaces.video.VideoRoomSessions" parent: "rest.namespaces.video" - module: "rest.namespaces.video" + module: "rest.video" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/video.ts" --- # `VideoRoomSessions` diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/video/video-room-tokens/index.mdx b/fern/products/sdk-reference/typescript/rest/video/video-room-tokens/index.mdx similarity index 94% rename from fern/products/sdk-reference/typescript/rest/namespaces/video/video-room-tokens/index.mdx rename to fern/products/sdk-reference/typescript/rest/video/video-room-tokens/index.mdx index 660037bb20..9b2f343be5 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/video/video-room-tokens/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/video/video-room-tokens/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/video/video-room-tokens" +slug: "/reference/typescript/rest/video/video-room-tokens" title: "VideoRoomTokens" sdk_label: "TypeScript SDK" icon: "typescript" @@ -9,7 +9,7 @@ lustri: language: "typescript" qualified_name: "rest.namespaces.video.VideoRoomTokens" parent: "rest.namespaces.video" - module: "rest.namespaces.video" + module: "rest.video" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/video.ts" --- # `VideoRoomTokens` diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/video/video-rooms/index.mdx b/fern/products/sdk-reference/typescript/rest/video/video-rooms/index.mdx similarity index 98% rename from fern/products/sdk-reference/typescript/rest/namespaces/video/video-rooms/index.mdx rename to fern/products/sdk-reference/typescript/rest/video/video-rooms/index.mdx index 866df76069..2c39bb9dea 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/video/video-rooms/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/video/video-rooms/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/video/video-rooms" +slug: "/reference/typescript/rest/video/video-rooms" title: "VideoRooms" sdk_label: "TypeScript SDK" icon: "typescript" @@ -9,7 +9,7 @@ lustri: language: "typescript" qualified_name: "rest.namespaces.video.VideoRooms" parent: "rest.namespaces.video" - module: "rest.namespaces.video" + module: "rest.video" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/video.ts" --- # `VideoRooms` diff --git a/fern/products/sdk-reference/typescript/rest/namespaces/video/video-streams/index.mdx b/fern/products/sdk-reference/typescript/rest/video/video-streams/index.mdx similarity index 96% rename from fern/products/sdk-reference/typescript/rest/namespaces/video/video-streams/index.mdx rename to fern/products/sdk-reference/typescript/rest/video/video-streams/index.mdx index 228d27dc84..e33c4244e6 100644 --- a/fern/products/sdk-reference/typescript/rest/namespaces/video/video-streams/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/video/video-streams/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/rest/namespaces/video/video-streams" +slug: "/reference/typescript/rest/video/video-streams" title: "VideoStreams" sdk_label: "TypeScript SDK" icon: "typescript" @@ -9,7 +9,7 @@ lustri: language: "typescript" qualified_name: "rest.namespaces.video.VideoStreams" parent: "rest.namespaces.video" - module: "rest.namespaces.video" + module: "rest.video" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/video.ts" --- # `VideoStreams` From c45bb0141d9c3110f2433aa91d231bb5a17f97b2 Mon Sep 17 00:00:00 2001 From: Devon-White Date: Fri, 12 Jun 2026 10:03:45 -0400 Subject: [PATCH 5/8] SDK Reference: relay/actions + agents/configuration groupings; fix relay/relay doubling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - python: lift *Action classes into relay/actions/ and group auth/config under agents/configuration/ — matching the manual server-SDK reference. Same for rust/dotnet (actions) and typescript (configuration). - go/java/php: fix relay/rest path doubling (their extractors include the module's own name in module_path, producing relay/relay) by flattening the duplicated wrapper. fern check: 0 broken links. --- fern/products/sdk-reference/dotnet/_meta.json | 2 +- .../relay/{ => actions}/action/index.mdx | 6 +- .../relay/{ => actions}/ai-action/index.mdx | 8 +- .../{ => actions}/collect-action/index.mdx | 8 +- .../{ => actions}/detect-action/index.mdx | 8 +- .../relay/{ => actions}/fax-action/index.mdx | 8 +- .../dotnet/relay/actions/index.mdx | 62 ++ .../relay/{ => actions}/pay-action/index.mdx | 8 +- .../relay/{ => actions}/play-action/index.mdx | 8 +- .../{ => actions}/record-action/index.mdx | 8 +- .../{ => actions}/stream-action/index.mdx | 8 +- .../relay/{ => actions}/tap-action/index.mdx | 8 +- .../{ => actions}/transcribe-action/index.mdx | 8 +- .../sdk-reference/dotnet/relay/index.mdx | 46 +- fern/products/sdk-reference/go/_meta.json | 2 +- .../go/relay/{relay => }/action/index.mdx | 6 +- .../go/relay/{relay => }/ai-action/index.mdx | 6 +- .../go/relay/{relay => }/ai-event/index.mdx | 6 +- .../{relay => }/call-receive-event/index.mdx | 6 +- .../{relay => }/call-state-event/index.mdx | 6 +- .../go/relay/{relay => }/call/index.mdx | 6 +- .../{relay => }/calling-error-event/index.mdx | 6 +- .../go/relay/{relay => }/client/index.mdx | 6 +- .../{relay => }/collect-action/index.mdx | 6 +- .../relay/{relay => }/collect-event/index.mdx | 6 +- .../{relay => }/collect-params/index.mdx | 6 +- .../{relay => }/conference-event/index.mdx | 6 +- .../relay/{relay => }/connect-event/index.mdx | 6 +- .../relay/{relay => }/denoise-event/index.mdx | 6 +- .../relay/{relay => }/detect-action/index.mdx | 6 +- .../relay/{relay => }/detect-event/index.mdx | 6 +- .../go/relay/{relay => }/device/index.mdx | 6 +- .../go/relay/{relay => }/dial-event/index.mdx | 6 +- .../go/relay/{relay => }/echo-event/index.mdx | 6 +- .../go/relay/{relay => }/fax-action/index.mdx | 6 +- .../go/relay/{relay => }/fax-event/index.mdx | 6 +- .../go/relay/{relay => }/hold-event/index.mdx | 6 +- .../products/sdk-reference/go/relay/index.mdx | 479 ++++++++++- .../message-receive-event/index.mdx | 6 +- .../{relay => }/message-state-event/index.mdx | 6 +- .../go/relay/{relay => }/message/index.mdx | 6 +- .../go/relay/{relay => }/pay-action/index.mdx | 6 +- .../go/relay/{relay => }/pay-event/index.mdx | 6 +- .../relay/{relay => }/play-action/index.mdx | 6 +- .../go/relay/{relay => }/play-event/index.mdx | 6 +- .../relay/{relay => }/queue-event/index.mdx | 6 +- .../relay/{relay => }/record-action/index.mdx | 6 +- .../relay/{relay => }/record-event/index.mdx | 6 +- .../relay/{relay => }/refer-event/index.mdx | 6 +- .../relay/{relay => }/relay-error/index.mdx | 6 +- .../relay/{relay => }/relay-event/index.mdx | 6 +- .../sdk-reference/go/relay/relay/index.mdx | 495 ----------- .../{relay => }/send-digits-event/index.mdx | 6 +- .../standalone-collect-action/index.mdx | 6 +- .../relay/{relay => }/stream-action/index.mdx | 6 +- .../relay/{relay => }/stream-event/index.mdx | 6 +- .../go/relay/{relay => }/tap-action/index.mdx | 6 +- .../go/relay/{relay => }/tap-event/index.mdx | 6 +- .../{relay => }/transcribe-action/index.mdx | 6 +- .../{relay => }/transcribe-event/index.mdx | 6 +- .../rest/{rest => }/crud-resource/index.mdx | 6 +- .../go/rest/{rest => }/http-client/index.mdx | 6 +- fern/products/sdk-reference/go/rest/index.mdx | 26 +- .../{rest => }/paginated-iterator/index.mdx | 6 +- .../go/rest/{rest => }/rest-client/index.mdx | 6 +- .../sdk-reference/go/rest/rest/index.mdx | 38 - .../signal-wire-rest-error/index.mdx | 6 +- fern/products/sdk-reference/java/_meta.json | 2 +- .../{relay => }/action/ai-action/index.mdx | 6 +- .../action/collect-action/index.mdx | 6 +- .../action/detect-action/index.mdx | 6 +- .../java/relay/{relay => }/action/index.mdx | 6 +- .../relay/{relay => }/action/index__2.mdx | 30 +- .../{relay => }/action/pay-action/index.mdx | 6 +- .../{relay => }/action/play-action/index.mdx | 6 +- .../action/play-and-collect-action/index.mdx | 6 +- .../action/receive-fax-action/index.mdx | 6 +- .../action/record-action/index.mdx | 6 +- .../action/send-fax-action/index.mdx | 6 +- .../action/stream-action/index.mdx | 6 +- .../{relay => }/action/tap-action/index.mdx | 6 +- .../action/transcribe-action/index.mdx | 6 +- .../java/relay/{relay => }/call/index.mdx | 6 +- .../relay/{relay => }/constants/index.mdx | 6 +- .../java/relay/{relay => }/device/index.mdx | 6 +- .../sdk-reference/java/relay/index.mdx | 691 +++++++++++++++- .../java/relay/{relay => }/message/index.mdx | 6 +- .../relay-client/builder/index.mdx | 4 +- .../relay/{relay => }/relay-client/index.mdx | 6 +- .../{relay => }/relay-client/index__2.mdx | 8 +- .../relay/{relay => }/relay-error/index.mdx | 6 +- .../authorization-state-event/index.mdx | 6 +- .../relay-event/call-collect-event/index.mdx | 6 +- .../relay-event/call-connect-event/index.mdx | 6 +- .../relay-event/call-detect-event/index.mdx | 6 +- .../relay-event/call-dial-event/index.mdx | 6 +- .../relay-event/call-fax-event/index.mdx | 6 +- .../relay-event/call-pay-event/index.mdx | 6 +- .../relay-event/call-play-event/index.mdx | 6 +- .../relay-event/call-receive-event/index.mdx | 6 +- .../relay-event/call-record-event/index.mdx | 6 +- .../relay-event/call-refer-event/index.mdx | 6 +- .../call-send-digits-event/index.mdx | 6 +- .../relay-event/call-state-event/index.mdx | 6 +- .../relay-event/call-stream-event/index.mdx | 6 +- .../relay-event/call-tap-event/index.mdx | 6 +- .../call-transcribe-event/index.mdx | 6 +- .../relay-event/conference-event/index.mdx | 6 +- .../relay/{relay => }/relay-event/index.mdx | 6 +- .../{relay => }/relay-event/index__2.mdx | 46 +- .../messaging-receive-event/index.mdx | 6 +- .../messaging-state-event/index.mdx | 6 +- .../relay-event/queue-event/index.mdx | 6 +- .../sdk-reference/java/relay/relay/index.mdx | 709 ---------------- .../rest/{rest => }/crud-resource/index.mdx | 6 +- .../rest/{rest => }/http-client/index.mdx | 6 +- .../sdk-reference/java/rest/index.mdx | 193 ++++- .../compat-applications/index.mdx | 2 +- .../compat-namespace/compat-calls/index.mdx | 2 +- .../compat-namespace/compat-faxes/index.mdx | 2 +- .../compat-laml-bins/index.mdx | 2 +- .../compat-messages/index.mdx | 2 +- .../compat-namespace/compat-queues/index.mdx | 2 +- .../datasphere-documents/index.mdx | 2 +- .../call-flows-resource/index.mdx | 2 +- .../conference-rooms-resource/index.mdx | 2 +- .../cxml-applications-resource/index.mdx | 2 +- .../fabric-subscribers/index.mdx | 2 +- .../video-conferences/index.mdx | 2 +- .../video-namespace/video-rooms/index.mdx | 2 +- .../{rest => }/paginated-iterator/index.mdx | 6 +- .../{rest => }/rest-client/builder/index.mdx | 4 +- .../rest/{rest => }/rest-client/index.mdx | 6 +- .../rest/{rest => }/rest-client/index__2.mdx | 8 +- .../java/rest/{rest => }/rest-error/index.mdx | 6 +- .../sdk-reference/java/rest/rest/index.mdx | 211 ----- fern/products/sdk-reference/php/_meta.json | 2 +- .../php/relay/{relay => }/action/index.mdx | 6 +- .../php/relay/{relay => }/ai-action/index.mdx | 8 +- .../php/relay/{relay => }/call/index.mdx | 6 +- .../php/relay/{relay => }/client/index.mdx | 6 +- .../{relay => }/collect-action/index.mdx | 8 +- .../php/relay/{relay => }/constants/index.mdx | 6 +- .../relay/{relay => }/detect-action/index.mdx | 8 +- .../php/relay/{relay => }/device/index.mdx | 6 +- .../php/relay/{relay => }/event/index.mdx | 6 +- .../relay/{relay => }/fax-action/index.mdx | 8 +- .../sdk-reference/php/relay/index__2.mdx | 766 ++++++++++++++++- .../php/relay/{relay => }/message/index.mdx | 6 +- .../relay/{relay => }/pay-action/index.mdx | 8 +- .../relay/{relay => }/play-action/index.mdx | 8 +- .../relay/{relay => }/record-action/index.mdx | 8 +- .../relay/{relay => }/relay-error/index.mdx | 6 +- .../sdk-reference/php/relay/relay/index.mdx | 782 ------------------ .../relay/{relay => }/stream-action/index.mdx | 8 +- .../relay/{relay => }/tap-action/index.mdx | 8 +- .../{relay => }/transcribe-action/index.mdx | 8 +- .../relay/{relay => }/web-socket/index.mdx | 6 +- .../rest/{rest => }/base-resource/index.mdx | 6 +- .../rest/{rest => }/crud-resource/index.mdx | 8 +- .../{rest => }/crud-with-addresses/index.mdx | 8 +- .../php/rest/{rest => }/http-client/index.mdx | 6 +- .../sdk-reference/php/rest/index__2.mdx | 34 +- .../{rest => }/paginated-iterator/index.mdx | 6 +- .../php/rest/{rest => }/rest-client/index.mdx | 6 +- .../sdk-reference/php/rest/rest/index.mdx | 46 -- .../signal-wire-rest-error/index.mdx | 6 +- fern/products/sdk-reference/python/_meta.json | 2 +- .../auth-handler/index.mdx | 6 +- .../auth-handler/index__2.mdx | 6 +- .../config-loader/index.mdx | 6 +- .../config-loader/index__2.mdx | 6 +- .../python/agents/configuration/index.mdx | 46 ++ .../configuration}/security-config/index.mdx | 6 +- .../security-config/index__2.mdx | 6 +- .../sdk-reference/python/agents/index.mdx | 16 +- .../sdk-reference/python/core/index.mdx | 12 - fern/products/sdk-reference/python/index.mdx | 1 + .../relay/{call => actions}/action/index.mdx | 4 +- .../{call => actions}/ai-action/index.mdx | 6 +- .../collect-action/index.mdx | 6 +- .../{call => actions}/detect-action/index.mdx | 6 +- .../{call => actions}/fax-action/index.mdx | 6 +- .../{call/index__2.mdx => actions/index.mdx} | 34 +- .../{call => actions}/pay-action/index.mdx | 6 +- .../{call => actions}/play-action/index.mdx | 6 +- .../{call => actions}/record-action/index.mdx | 6 +- .../standalone-collect-action/index.mdx | 6 +- .../{call => actions}/stream-action/index.mdx | 6 +- .../{call => actions}/tap-action/index.mdx | 6 +- .../transcribe-action/index.mdx | 6 +- .../sdk-reference/python/relay/index.mdx | 2 - .../sdk-reference/python/relay/index__2.mdx | 18 + fern/products/sdk-reference/rust/_meta.json | 2 +- fern/products/sdk-reference/rust/index.mdx | 1 + .../rust/relay/{ => actions}/action/index.mdx | 4 +- .../{action => actions}/ai-action/index.mdx | 4 +- .../collect-action/index.mdx | 4 +- .../detect-action/index.mdx | 4 +- .../{action => actions}/fax-action/index.mdx | 4 +- .../index__2.mdx => actions/index.mdx} | 34 +- .../{action => actions}/pay-action/index.mdx | 4 +- .../{action => actions}/play-action/index.mdx | 4 +- .../record-action/index.mdx | 4 +- .../stream-action/index.mdx | 4 +- .../{action => actions}/tap-action/index.mdx | 4 +- .../transcribe-action/index.mdx | 4 +- .../sdk-reference/rust/relay/index.mdx | 6 - .../sdk-reference/rust/relay/index__2.mdx | 18 + .../sdk-reference/typescript/_meta.json | 2 +- .../auth-handler/index.mdx | 8 +- .../auth-handler/index__2.mdx | 10 +- .../config-loader/index.mdx | 12 +- .../typescript/agents/configuration/index.mdx | 32 + .../sdk-reference/typescript/agents/index.mdx | 12 +- 215 files changed, 2972 insertions(+), 2982 deletions(-) rename fern/products/sdk-reference/dotnet/relay/{ => actions}/action/index.mdx (98%) rename fern/products/sdk-reference/dotnet/relay/{ => actions}/ai-action/index.mdx (91%) rename fern/products/sdk-reference/dotnet/relay/{ => actions}/collect-action/index.mdx (96%) rename fern/products/sdk-reference/dotnet/relay/{ => actions}/detect-action/index.mdx (93%) rename fern/products/sdk-reference/dotnet/relay/{ => actions}/fax-action/index.mdx (92%) create mode 100644 fern/products/sdk-reference/dotnet/relay/actions/index.mdx rename fern/products/sdk-reference/dotnet/relay/{ => actions}/pay-action/index.mdx (91%) rename fern/products/sdk-reference/dotnet/relay/{ => actions}/play-action/index.mdx (94%) rename fern/products/sdk-reference/dotnet/relay/{ => actions}/record-action/index.mdx (94%) rename fern/products/sdk-reference/dotnet/relay/{ => actions}/stream-action/index.mdx (91%) rename fern/products/sdk-reference/dotnet/relay/{ => actions}/tap-action/index.mdx (91%) rename fern/products/sdk-reference/dotnet/relay/{ => actions}/transcribe-action/index.mdx (91%) rename fern/products/sdk-reference/go/relay/{relay => }/action/index.mdx (95%) rename fern/products/sdk-reference/go/relay/{relay => }/ai-action/index.mdx (88%) rename fern/products/sdk-reference/go/relay/{relay => }/ai-event/index.mdx (87%) rename fern/products/sdk-reference/go/relay/{relay => }/call-receive-event/index.mdx (90%) rename fern/products/sdk-reference/go/relay/{relay => }/call-state-event/index.mdx (89%) rename fern/products/sdk-reference/go/relay/{relay => }/call/index.mdx (99%) rename fern/products/sdk-reference/go/relay/{relay => }/calling-error-event/index.mdx (86%) rename fern/products/sdk-reference/go/relay/{relay => }/client/index.mdx (99%) rename fern/products/sdk-reference/go/relay/{relay => }/collect-action/index.mdx (93%) rename fern/products/sdk-reference/go/relay/{relay => }/collect-event/index.mdx (88%) rename fern/products/sdk-reference/go/relay/{relay => }/collect-params/index.mdx (94%) rename fern/products/sdk-reference/go/relay/{relay => }/conference-event/index.mdx (89%) rename fern/products/sdk-reference/go/relay/{relay => }/connect-event/index.mdx (86%) rename fern/products/sdk-reference/go/relay/{relay => }/denoise-event/index.mdx (87%) rename fern/products/sdk-reference/go/relay/{relay => }/detect-action/index.mdx (88%) rename fern/products/sdk-reference/go/relay/{relay => }/detect-event/index.mdx (86%) rename fern/products/sdk-reference/go/relay/{relay => }/device/index.mdx (96%) rename fern/products/sdk-reference/go/relay/{relay => }/dial-event/index.mdx (93%) rename fern/products/sdk-reference/go/relay/{relay => }/echo-event/index.mdx (86%) rename fern/products/sdk-reference/go/relay/{relay => }/fax-action/index.mdx (90%) rename fern/products/sdk-reference/go/relay/{relay => }/fax-event/index.mdx (86%) rename fern/products/sdk-reference/go/relay/{relay => }/hold-event/index.mdx (86%) rename fern/products/sdk-reference/go/relay/{relay => }/message-receive-event/index.mdx (91%) rename fern/products/sdk-reference/go/relay/{relay => }/message-state-event/index.mdx (93%) rename fern/products/sdk-reference/go/relay/{relay => }/message/index.mdx (98%) rename fern/products/sdk-reference/go/relay/{relay => }/pay-action/index.mdx (88%) rename fern/products/sdk-reference/go/relay/{relay => }/pay-event/index.mdx (87%) rename fern/products/sdk-reference/go/relay/{relay => }/play-action/index.mdx (93%) rename fern/products/sdk-reference/go/relay/{relay => }/play-event/index.mdx (86%) rename fern/products/sdk-reference/go/relay/{relay => }/queue-event/index.mdx (92%) rename fern/products/sdk-reference/go/relay/{relay => }/record-action/index.mdx (93%) rename fern/products/sdk-reference/go/relay/{relay => }/record-event/index.mdx (90%) rename fern/products/sdk-reference/go/relay/{relay => }/refer-event/index.mdx (89%) rename fern/products/sdk-reference/go/relay/{relay => }/relay-error/index.mdx (94%) rename fern/products/sdk-reference/go/relay/{relay => }/relay-event/index.mdx (97%) delete mode 100644 fern/products/sdk-reference/go/relay/relay/index.mdx rename fern/products/sdk-reference/go/relay/{relay => }/send-digits-event/index.mdx (86%) rename fern/products/sdk-reference/go/relay/{relay => }/standalone-collect-action/index.mdx (91%) rename fern/products/sdk-reference/go/relay/{relay => }/stream-action/index.mdx (88%) rename fern/products/sdk-reference/go/relay/{relay => }/stream-event/index.mdx (89%) rename fern/products/sdk-reference/go/relay/{relay => }/tap-action/index.mdx (88%) rename fern/products/sdk-reference/go/relay/{relay => }/tap-event/index.mdx (89%) rename fern/products/sdk-reference/go/relay/{relay => }/transcribe-action/index.mdx (88%) rename fern/products/sdk-reference/go/relay/{relay => }/transcribe-event/index.mdx (92%) rename fern/products/sdk-reference/go/rest/{rest => }/crud-resource/index.mdx (96%) rename fern/products/sdk-reference/go/rest/{rest => }/http-client/index.mdx (97%) rename fern/products/sdk-reference/go/rest/{rest => }/paginated-iterator/index.mdx (93%) rename fern/products/sdk-reference/go/rest/{rest => }/rest-client/index.mdx (97%) delete mode 100644 fern/products/sdk-reference/go/rest/rest/index.mdx rename fern/products/sdk-reference/go/rest/{rest => }/signal-wire-rest-error/index.mdx (90%) rename fern/products/sdk-reference/java/relay/{relay => }/action/ai-action/index.mdx (91%) rename fern/products/sdk-reference/java/relay/{relay => }/action/collect-action/index.mdx (91%) rename fern/products/sdk-reference/java/relay/{relay => }/action/detect-action/index.mdx (89%) rename fern/products/sdk-reference/java/relay/{relay => }/action/index.mdx (98%) rename fern/products/sdk-reference/java/relay/{relay => }/action/index__2.mdx (75%) rename fern/products/sdk-reference/java/relay/{relay => }/action/pay-action/index.mdx (89%) rename fern/products/sdk-reference/java/relay/{relay => }/action/play-action/index.mdx (93%) rename fern/products/sdk-reference/java/relay/{relay => }/action/play-and-collect-action/index.mdx (91%) rename fern/products/sdk-reference/java/relay/{relay => }/action/receive-fax-action/index.mdx (89%) rename fern/products/sdk-reference/java/relay/{relay => }/action/record-action/index.mdx (93%) rename fern/products/sdk-reference/java/relay/{relay => }/action/send-fax-action/index.mdx (89%) rename fern/products/sdk-reference/java/relay/{relay => }/action/stream-action/index.mdx (91%) rename fern/products/sdk-reference/java/relay/{relay => }/action/tap-action/index.mdx (91%) rename fern/products/sdk-reference/java/relay/{relay => }/action/transcribe-action/index.mdx (91%) rename fern/products/sdk-reference/java/relay/{relay => }/call/index.mdx (99%) rename fern/products/sdk-reference/java/relay/{relay => }/constants/index.mdx (99%) rename fern/products/sdk-reference/java/relay/{relay => }/device/index.mdx (98%) rename fern/products/sdk-reference/java/relay/{relay => }/message/index.mdx (99%) rename fern/products/sdk-reference/java/relay/{relay => }/relay-client/builder/index.mdx (97%) rename fern/products/sdk-reference/java/relay/{relay => }/relay-client/index.mdx (99%) rename fern/products/sdk-reference/java/relay/{relay => }/relay-client/index__2.mdx (67%) rename fern/products/sdk-reference/java/relay/{relay => }/relay-error/index.mdx (93%) rename fern/products/sdk-reference/java/relay/{relay => }/relay-event/authorization-state-event/index.mdx (92%) rename fern/products/sdk-reference/java/relay/{relay => }/relay-event/call-collect-event/index.mdx (95%) rename fern/products/sdk-reference/java/relay/{relay => }/relay-event/call-connect-event/index.mdx (94%) rename fern/products/sdk-reference/java/relay/{relay => }/relay-event/call-detect-event/index.mdx (95%) rename fern/products/sdk-reference/java/relay/{relay => }/relay-event/call-dial-event/index.mdx (96%) rename fern/products/sdk-reference/java/relay/{relay => }/relay-event/call-fax-event/index.mdx (94%) rename fern/products/sdk-reference/java/relay/{relay => }/relay-event/call-pay-event/index.mdx (94%) rename fern/products/sdk-reference/java/relay/{relay => }/relay-event/call-play-event/index.mdx (94%) rename fern/products/sdk-reference/java/relay/{relay => }/relay-event/call-receive-event/index.mdx (95%) rename fern/products/sdk-reference/java/relay/{relay => }/relay-event/call-record-event/index.mdx (96%) rename fern/products/sdk-reference/java/relay/{relay => }/relay-event/call-refer-event/index.mdx (94%) rename fern/products/sdk-reference/java/relay/{relay => }/relay-event/call-send-digits-event/index.mdx (93%) rename fern/products/sdk-reference/java/relay/{relay => }/relay-event/call-state-event/index.mdx (96%) rename fern/products/sdk-reference/java/relay/{relay => }/relay-event/call-stream-event/index.mdx (94%) rename fern/products/sdk-reference/java/relay/{relay => }/relay-event/call-tap-event/index.mdx (94%) rename fern/products/sdk-reference/java/relay/{relay => }/relay-event/call-transcribe-event/index.mdx (94%) rename fern/products/sdk-reference/java/relay/{relay => }/relay-event/conference-event/index.mdx (94%) rename fern/products/sdk-reference/java/relay/{relay => }/relay-event/index.mdx (97%) rename fern/products/sdk-reference/java/relay/{relay => }/relay-event/index__2.mdx (69%) rename fern/products/sdk-reference/java/relay/{relay => }/relay-event/messaging-receive-event/index.mdx (97%) rename fern/products/sdk-reference/java/relay/{relay => }/relay-event/messaging-state-event/index.mdx (97%) rename fern/products/sdk-reference/java/relay/{relay => }/relay-event/queue-event/index.mdx (94%) delete mode 100644 fern/products/sdk-reference/java/relay/relay/index.mdx rename fern/products/sdk-reference/java/rest/{rest => }/crud-resource/index.mdx (97%) rename fern/products/sdk-reference/java/rest/{rest => }/http-client/index.mdx (98%) rename fern/products/sdk-reference/java/rest/{rest => }/paginated-iterator/index.mdx (97%) rename fern/products/sdk-reference/java/rest/{rest => }/rest-client/builder/index.mdx (96%) rename fern/products/sdk-reference/java/rest/{rest => }/rest-client/index.mdx (99%) rename fern/products/sdk-reference/java/rest/{rest => }/rest-client/index__2.mdx (68%) rename fern/products/sdk-reference/java/rest/{rest => }/rest-error/index.mdx (97%) delete mode 100644 fern/products/sdk-reference/java/rest/rest/index.mdx rename fern/products/sdk-reference/php/relay/{relay => }/action/index.mdx (98%) rename fern/products/sdk-reference/php/relay/{relay => }/ai-action/index.mdx (98%) rename fern/products/sdk-reference/php/relay/{relay => }/call/index.mdx (99%) rename fern/products/sdk-reference/php/relay/{relay => }/client/index.mdx (99%) rename fern/products/sdk-reference/php/relay/{relay => }/collect-action/index.mdx (98%) rename fern/products/sdk-reference/php/relay/{relay => }/constants/index.mdx (97%) rename fern/products/sdk-reference/php/relay/{relay => }/detect-action/index.mdx (98%) rename fern/products/sdk-reference/php/relay/{relay => }/device/index.mdx (98%) rename fern/products/sdk-reference/php/relay/{relay => }/event/index.mdx (98%) rename fern/products/sdk-reference/php/relay/{relay => }/fax-action/index.mdx (98%) rename fern/products/sdk-reference/php/relay/{relay => }/message/index.mdx (98%) rename fern/products/sdk-reference/php/relay/{relay => }/pay-action/index.mdx (98%) rename fern/products/sdk-reference/php/relay/{relay => }/play-action/index.mdx (98%) rename fern/products/sdk-reference/php/relay/{relay => }/record-action/index.mdx (98%) rename fern/products/sdk-reference/php/relay/{relay => }/relay-error/index.mdx (91%) delete mode 100644 fern/products/sdk-reference/php/relay/relay/index.mdx rename fern/products/sdk-reference/php/relay/{relay => }/stream-action/index.mdx (98%) rename fern/products/sdk-reference/php/relay/{relay => }/tap-action/index.mdx (98%) rename fern/products/sdk-reference/php/relay/{relay => }/transcribe-action/index.mdx (97%) rename fern/products/sdk-reference/php/relay/{relay => }/web-socket/index.mdx (98%) rename fern/products/sdk-reference/php/rest/{rest => }/base-resource/index.mdx (95%) rename fern/products/sdk-reference/php/rest/{rest => }/crud-resource/index.mdx (96%) rename fern/products/sdk-reference/php/rest/{rest => }/crud-with-addresses/index.mdx (97%) rename fern/products/sdk-reference/php/rest/{rest => }/http-client/index.mdx (98%) rename fern/products/sdk-reference/php/rest/{rest => }/paginated-iterator/index.mdx (98%) rename fern/products/sdk-reference/php/rest/{rest => }/rest-client/index.mdx (99%) delete mode 100644 fern/products/sdk-reference/php/rest/rest/index.mdx rename fern/products/sdk-reference/php/rest/{rest => }/signal-wire-rest-error/index.mdx (95%) rename fern/products/sdk-reference/python/agents/{ => configuration}/auth-handler/index.mdx (85%) rename fern/products/sdk-reference/python/agents/{ => configuration}/auth-handler/index__2.mdx (96%) rename fern/products/sdk-reference/python/agents/{ => configuration}/config-loader/index.mdx (85%) rename fern/products/sdk-reference/python/agents/{ => configuration}/config-loader/index__2.mdx (97%) create mode 100644 fern/products/sdk-reference/python/agents/configuration/index.mdx rename fern/products/sdk-reference/python/{core => agents/configuration}/security-config/index.mdx (87%) rename fern/products/sdk-reference/python/{core => agents/configuration}/security-config/index__2.mdx (97%) rename fern/products/sdk-reference/python/relay/{call => actions}/action/index.mdx (96%) rename fern/products/sdk-reference/python/relay/{call => actions}/ai-action/index.mdx (93%) rename fern/products/sdk-reference/python/relay/{call => actions}/collect-action/index.mdx (95%) rename fern/products/sdk-reference/python/relay/{call => actions}/detect-action/index.mdx (93%) rename fern/products/sdk-reference/python/relay/{call => actions}/fax-action/index.mdx (93%) rename fern/products/sdk-reference/python/relay/{call/index__2.mdx => actions/index.mdx} (74%) rename fern/products/sdk-reference/python/relay/{call => actions}/pay-action/index.mdx (93%) rename fern/products/sdk-reference/python/relay/{call => actions}/play-action/index.mdx (95%) rename fern/products/sdk-reference/python/relay/{call => actions}/record-action/index.mdx (95%) rename fern/products/sdk-reference/python/relay/{call => actions}/standalone-collect-action/index.mdx (94%) rename fern/products/sdk-reference/python/relay/{call => actions}/stream-action/index.mdx (93%) rename fern/products/sdk-reference/python/relay/{call => actions}/tap-action/index.mdx (93%) rename fern/products/sdk-reference/python/relay/{call => actions}/transcribe-action/index.mdx (93%) create mode 100644 fern/products/sdk-reference/python/relay/index__2.mdx rename fern/products/sdk-reference/rust/relay/{ => actions}/action/index.mdx (98%) rename fern/products/sdk-reference/rust/relay/{action => actions}/ai-action/index.mdx (95%) rename fern/products/sdk-reference/rust/relay/{action => actions}/collect-action/index.mdx (96%) rename fern/products/sdk-reference/rust/relay/{action => actions}/detect-action/index.mdx (96%) rename fern/products/sdk-reference/rust/relay/{action => actions}/fax-action/index.mdx (96%) rename fern/products/sdk-reference/rust/relay/{action/index__2.mdx => actions/index.mdx} (55%) rename fern/products/sdk-reference/rust/relay/{action => actions}/pay-action/index.mdx (95%) rename fern/products/sdk-reference/rust/relay/{action => actions}/play-action/index.mdx (96%) rename fern/products/sdk-reference/rust/relay/{action => actions}/record-action/index.mdx (97%) rename fern/products/sdk-reference/rust/relay/{action => actions}/stream-action/index.mdx (95%) rename fern/products/sdk-reference/rust/relay/{action => actions}/tap-action/index.mdx (95%) rename fern/products/sdk-reference/rust/relay/{action => actions}/transcribe-action/index.mdx (95%) create mode 100644 fern/products/sdk-reference/rust/relay/index__2.mdx rename fern/products/sdk-reference/typescript/agents/{ => configuration}/auth-handler/index.mdx (97%) rename fern/products/sdk-reference/typescript/agents/{ => configuration}/auth-handler/index__2.mdx (82%) rename fern/products/sdk-reference/typescript/agents/{ => configuration}/config-loader/index.mdx (96%) create mode 100644 fern/products/sdk-reference/typescript/agents/configuration/index.mdx diff --git a/fern/products/sdk-reference/dotnet/_meta.json b/fern/products/sdk-reference/dotnet/_meta.json index 0385dd0a32..14e174a604 100644 --- a/fern/products/sdk-reference/dotnet/_meta.json +++ b/fern/products/sdk-reference/dotnet/_meta.json @@ -6,5 +6,5 @@ "format": "mdx", "platform": "fern", "base_slug": "/reference/dotnet", - "item_count": 1447 + "item_count": 1448 } \ No newline at end of file diff --git a/fern/products/sdk-reference/dotnet/relay/action/index.mdx b/fern/products/sdk-reference/dotnet/relay/actions/action/index.mdx similarity index 98% rename from fern/products/sdk-reference/dotnet/relay/action/index.mdx rename to fern/products/sdk-reference/dotnet/relay/actions/action/index.mdx index 6ccdf78e00..e305cae580 100644 --- a/fern/products/sdk-reference/dotnet/relay/action/index.mdx +++ b/fern/products/sdk-reference/dotnet/relay/actions/action/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/dotnet/relay/action" +slug: "/reference/dotnet/relay/actions/action" title: "Action" sdk_label: ".NET SDK" icon: "dotnet" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "dotnet" qualified_name: "SignalWire.Relay.Action" - parent: "relay" - module: "relay" + parent: "relay.actions" + module: "relay.SignalWire.Relay" source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs" visibility: "public" --- diff --git a/fern/products/sdk-reference/dotnet/relay/ai-action/index.mdx b/fern/products/sdk-reference/dotnet/relay/actions/ai-action/index.mdx similarity index 91% rename from fern/products/sdk-reference/dotnet/relay/ai-action/index.mdx rename to fern/products/sdk-reference/dotnet/relay/actions/ai-action/index.mdx index f71334d0d7..9059105cdc 100644 --- a/fern/products/sdk-reference/dotnet/relay/ai-action/index.mdx +++ b/fern/products/sdk-reference/dotnet/relay/actions/ai-action/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/dotnet/relay/ai-action" +slug: "/reference/dotnet/relay/actions/ai-action" title: "AIAction" sdk_label: ".NET SDK" icon: "dotnet" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "dotnet" qualified_name: "SignalWire.Relay.AIAction" - parent: "relay" - module: "relay" + parent: "relay.actions" + module: "relay.SignalWire.Relay" source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs" visibility: "public" --- @@ -25,7 +25,7 @@ public class AIAction : Action ## Inheritance -**Extends:** [SignalWire.Relay.Action](/docs/sdk-reference/reference/dotnet/relay/action) +**Extends:** [SignalWire.Relay.Action](/docs/sdk-reference/reference/dotnet/relay/actions/action) ## Methods diff --git a/fern/products/sdk-reference/dotnet/relay/collect-action/index.mdx b/fern/products/sdk-reference/dotnet/relay/actions/collect-action/index.mdx similarity index 96% rename from fern/products/sdk-reference/dotnet/relay/collect-action/index.mdx rename to fern/products/sdk-reference/dotnet/relay/actions/collect-action/index.mdx index cc24bdce57..3bca069158 100644 --- a/fern/products/sdk-reference/dotnet/relay/collect-action/index.mdx +++ b/fern/products/sdk-reference/dotnet/relay/actions/collect-action/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/dotnet/relay/collect-action" +slug: "/reference/dotnet/relay/actions/collect-action" title: "CollectAction" sdk_label: ".NET SDK" icon: "dotnet" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "dotnet" qualified_name: "SignalWire.Relay.CollectAction" - parent: "relay" - module: "relay" + parent: "relay.actions" + module: "relay.SignalWire.Relay" source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs" visibility: "public" --- @@ -29,7 +29,7 @@ public class CollectAction : Action ## Inheritance -**Extends:** [SignalWire.Relay.Action](/docs/sdk-reference/reference/dotnet/relay/action) +**Extends:** [SignalWire.Relay.Action](/docs/sdk-reference/reference/dotnet/relay/actions/action) ## Properties diff --git a/fern/products/sdk-reference/dotnet/relay/detect-action/index.mdx b/fern/products/sdk-reference/dotnet/relay/actions/detect-action/index.mdx similarity index 93% rename from fern/products/sdk-reference/dotnet/relay/detect-action/index.mdx rename to fern/products/sdk-reference/dotnet/relay/actions/detect-action/index.mdx index be3c827035..6954285b75 100644 --- a/fern/products/sdk-reference/dotnet/relay/detect-action/index.mdx +++ b/fern/products/sdk-reference/dotnet/relay/actions/detect-action/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/dotnet/relay/detect-action" +slug: "/reference/dotnet/relay/actions/detect-action" title: "DetectAction" sdk_label: ".NET SDK" icon: "dotnet" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "dotnet" qualified_name: "SignalWire.Relay.DetectAction" - parent: "relay" - module: "relay" + parent: "relay.actions" + module: "relay.SignalWire.Relay" source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs" visibility: "public" --- @@ -25,7 +25,7 @@ public class DetectAction : Action ## Inheritance -**Extends:** [SignalWire.Relay.Action](/docs/sdk-reference/reference/dotnet/relay/action) +**Extends:** [SignalWire.Relay.Action](/docs/sdk-reference/reference/dotnet/relay/actions/action) ## Properties diff --git a/fern/products/sdk-reference/dotnet/relay/fax-action/index.mdx b/fern/products/sdk-reference/dotnet/relay/actions/fax-action/index.mdx similarity index 92% rename from fern/products/sdk-reference/dotnet/relay/fax-action/index.mdx rename to fern/products/sdk-reference/dotnet/relay/actions/fax-action/index.mdx index e2515ee3b4..fb5664e562 100644 --- a/fern/products/sdk-reference/dotnet/relay/fax-action/index.mdx +++ b/fern/products/sdk-reference/dotnet/relay/actions/fax-action/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/dotnet/relay/fax-action" +slug: "/reference/dotnet/relay/actions/fax-action" title: "FaxAction" sdk_label: ".NET SDK" icon: "dotnet" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "dotnet" qualified_name: "SignalWire.Relay.FaxAction" - parent: "relay" - module: "relay" + parent: "relay.actions" + module: "relay.SignalWire.Relay" source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs" visibility: "public" --- @@ -25,7 +25,7 @@ public class FaxAction : Action ## Inheritance -**Extends:** [SignalWire.Relay.Action](/docs/sdk-reference/reference/dotnet/relay/action) +**Extends:** [SignalWire.Relay.Action](/docs/sdk-reference/reference/dotnet/relay/actions/action) ## Properties diff --git a/fern/products/sdk-reference/dotnet/relay/actions/index.mdx b/fern/products/sdk-reference/dotnet/relay/actions/index.mdx new file mode 100644 index 0000000000..431cf59a6f --- /dev/null +++ b/fern/products/sdk-reference/dotnet/relay/actions/index.mdx @@ -0,0 +1,62 @@ +--- +slug: "/reference/dotnet/relay/actions" +title: "actions" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "module" + language: "dotnet" + qualified_name: "relay.actions" + parent: "relay" + module: "relay" +--- +# `actions` + +## Classes + + + + Base class for all RELAY call actions (play, record, collect, etc.). An Action is the client-side handle returned when you start an asynchronous operation on a call. It accumulates events, tracks state, and resolves once the operation reaches a terminal state. Uses <xref href="System.Threading.Tasks.TaskCompletionSource" data-throw-if-not-resolved="false"></xref> for native async/await support. + + + + Handle for calling.ai operations. + + + + Handle for calling.collect (and play\_and\_collect) operations. Note: play\_and\_collect emits intermediate calling.call.play events that must be silently ignored so they do not pollute the collect action's state. + + + + Handle for calling.detect operations. + + + + Handle for calling.fax operations (send or receive). + + + + Handle for calling.pay operations. + + + + Handle for calling.play operations. + + + + Handle for calling.record operations. + + + + Handle for calling.stream operations. + + + + Handle for calling.tap operations. + + + + Handle for calling.transcribe operations. + + diff --git a/fern/products/sdk-reference/dotnet/relay/pay-action/index.mdx b/fern/products/sdk-reference/dotnet/relay/actions/pay-action/index.mdx similarity index 91% rename from fern/products/sdk-reference/dotnet/relay/pay-action/index.mdx rename to fern/products/sdk-reference/dotnet/relay/actions/pay-action/index.mdx index abb25f3892..fb25679dc0 100644 --- a/fern/products/sdk-reference/dotnet/relay/pay-action/index.mdx +++ b/fern/products/sdk-reference/dotnet/relay/actions/pay-action/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/dotnet/relay/pay-action" +slug: "/reference/dotnet/relay/actions/pay-action" title: "PayAction" sdk_label: ".NET SDK" icon: "dotnet" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "dotnet" qualified_name: "SignalWire.Relay.PayAction" - parent: "relay" - module: "relay" + parent: "relay.actions" + module: "relay.SignalWire.Relay" source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs" visibility: "public" --- @@ -25,7 +25,7 @@ public class PayAction : Action ## Inheritance -**Extends:** [SignalWire.Relay.Action](/docs/sdk-reference/reference/dotnet/relay/action) +**Extends:** [SignalWire.Relay.Action](/docs/sdk-reference/reference/dotnet/relay/actions/action) ## Methods diff --git a/fern/products/sdk-reference/dotnet/relay/play-action/index.mdx b/fern/products/sdk-reference/dotnet/relay/actions/play-action/index.mdx similarity index 94% rename from fern/products/sdk-reference/dotnet/relay/play-action/index.mdx rename to fern/products/sdk-reference/dotnet/relay/actions/play-action/index.mdx index 63a1f53508..81488759c2 100644 --- a/fern/products/sdk-reference/dotnet/relay/play-action/index.mdx +++ b/fern/products/sdk-reference/dotnet/relay/actions/play-action/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/dotnet/relay/play-action" +slug: "/reference/dotnet/relay/actions/play-action" title: "PlayAction" sdk_label: ".NET SDK" icon: "dotnet" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "dotnet" qualified_name: "SignalWire.Relay.PlayAction" - parent: "relay" - module: "relay" + parent: "relay.actions" + module: "relay.SignalWire.Relay" source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs" visibility: "public" --- @@ -25,7 +25,7 @@ public class PlayAction : Action ## Inheritance -**Extends:** [SignalWire.Relay.Action](/docs/sdk-reference/reference/dotnet/relay/action) +**Extends:** [SignalWire.Relay.Action](/docs/sdk-reference/reference/dotnet/relay/actions/action) ## Methods diff --git a/fern/products/sdk-reference/dotnet/relay/record-action/index.mdx b/fern/products/sdk-reference/dotnet/relay/actions/record-action/index.mdx similarity index 94% rename from fern/products/sdk-reference/dotnet/relay/record-action/index.mdx rename to fern/products/sdk-reference/dotnet/relay/actions/record-action/index.mdx index d0ed962a33..5585cbb746 100644 --- a/fern/products/sdk-reference/dotnet/relay/record-action/index.mdx +++ b/fern/products/sdk-reference/dotnet/relay/actions/record-action/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/dotnet/relay/record-action" +slug: "/reference/dotnet/relay/actions/record-action" title: "RecordAction" sdk_label: ".NET SDK" icon: "dotnet" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "dotnet" qualified_name: "SignalWire.Relay.RecordAction" - parent: "relay" - module: "relay" + parent: "relay.actions" + module: "relay.SignalWire.Relay" source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs" visibility: "public" --- @@ -25,7 +25,7 @@ public class RecordAction : Action ## Inheritance -**Extends:** [SignalWire.Relay.Action](/docs/sdk-reference/reference/dotnet/relay/action) +**Extends:** [SignalWire.Relay.Action](/docs/sdk-reference/reference/dotnet/relay/actions/action) ## Properties diff --git a/fern/products/sdk-reference/dotnet/relay/stream-action/index.mdx b/fern/products/sdk-reference/dotnet/relay/actions/stream-action/index.mdx similarity index 91% rename from fern/products/sdk-reference/dotnet/relay/stream-action/index.mdx rename to fern/products/sdk-reference/dotnet/relay/actions/stream-action/index.mdx index c028127865..ec7f9a2ff3 100644 --- a/fern/products/sdk-reference/dotnet/relay/stream-action/index.mdx +++ b/fern/products/sdk-reference/dotnet/relay/actions/stream-action/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/dotnet/relay/stream-action" +slug: "/reference/dotnet/relay/actions/stream-action" title: "StreamAction" sdk_label: ".NET SDK" icon: "dotnet" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "dotnet" qualified_name: "SignalWire.Relay.StreamAction" - parent: "relay" - module: "relay" + parent: "relay.actions" + module: "relay.SignalWire.Relay" source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs" visibility: "public" --- @@ -25,7 +25,7 @@ public class StreamAction : Action ## Inheritance -**Extends:** [SignalWire.Relay.Action](/docs/sdk-reference/reference/dotnet/relay/action) +**Extends:** [SignalWire.Relay.Action](/docs/sdk-reference/reference/dotnet/relay/actions/action) ## Methods diff --git a/fern/products/sdk-reference/dotnet/relay/tap-action/index.mdx b/fern/products/sdk-reference/dotnet/relay/actions/tap-action/index.mdx similarity index 91% rename from fern/products/sdk-reference/dotnet/relay/tap-action/index.mdx rename to fern/products/sdk-reference/dotnet/relay/actions/tap-action/index.mdx index 84e6a1a55f..b20d9b433d 100644 --- a/fern/products/sdk-reference/dotnet/relay/tap-action/index.mdx +++ b/fern/products/sdk-reference/dotnet/relay/actions/tap-action/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/dotnet/relay/tap-action" +slug: "/reference/dotnet/relay/actions/tap-action" title: "TapAction" sdk_label: ".NET SDK" icon: "dotnet" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "dotnet" qualified_name: "SignalWire.Relay.TapAction" - parent: "relay" - module: "relay" + parent: "relay.actions" + module: "relay.SignalWire.Relay" source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs" visibility: "public" --- @@ -25,7 +25,7 @@ public class TapAction : Action ## Inheritance -**Extends:** [SignalWire.Relay.Action](/docs/sdk-reference/reference/dotnet/relay/action) +**Extends:** [SignalWire.Relay.Action](/docs/sdk-reference/reference/dotnet/relay/actions/action) ## Methods diff --git a/fern/products/sdk-reference/dotnet/relay/transcribe-action/index.mdx b/fern/products/sdk-reference/dotnet/relay/actions/transcribe-action/index.mdx similarity index 91% rename from fern/products/sdk-reference/dotnet/relay/transcribe-action/index.mdx rename to fern/products/sdk-reference/dotnet/relay/actions/transcribe-action/index.mdx index ecb07af7cc..fc85ec1ad7 100644 --- a/fern/products/sdk-reference/dotnet/relay/transcribe-action/index.mdx +++ b/fern/products/sdk-reference/dotnet/relay/actions/transcribe-action/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/dotnet/relay/transcribe-action" +slug: "/reference/dotnet/relay/actions/transcribe-action" title: "TranscribeAction" sdk_label: ".NET SDK" icon: "dotnet" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "dotnet" qualified_name: "SignalWire.Relay.TranscribeAction" - parent: "relay" - module: "relay" + parent: "relay.actions" + module: "relay.SignalWire.Relay" source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs" visibility: "public" --- @@ -25,7 +25,7 @@ public class TranscribeAction : Action ## Inheritance -**Extends:** [SignalWire.Relay.Action](/docs/sdk-reference/reference/dotnet/relay/action) +**Extends:** [SignalWire.Relay.Action](/docs/sdk-reference/reference/dotnet/relay/actions/action) ## Methods diff --git a/fern/products/sdk-reference/dotnet/relay/index.mdx b/fern/products/sdk-reference/dotnet/relay/index.mdx index bd36a3ad49..1ec5f75d02 100644 --- a/fern/products/sdk-reference/dotnet/relay/index.mdx +++ b/fern/products/sdk-reference/dotnet/relay/index.mdx @@ -14,14 +14,6 @@ lustri: ## Classes - - Base class for all RELAY call actions (play, record, collect, etc.). An Action is the client-side handle returned when you start an asynchronous operation on a call. It accumulates events, tracks state, and resolves once the operation reaches a terminal state. Uses <xref href="System.Threading.Tasks.TaskCompletionSource" data-throw-if-not-resolved="false"></xref> for native async/await support. - - - - Handle for calling.ai operations. - - Represents a RELAY voice call. Holds call-level state, dispatches server events to registered listeners and to in-flight Action objects, and exposes every calling.\* RPC method as a first-class C# method. @@ -34,18 +26,10 @@ lustri: RELAY Client -- manages the WebSocket connection to SignalWire, sends JSON-RPC 2.0 requests, and dispatches inbound events to the correct Call or Message objects. Uses async/await with <xref href="System.Threading.Tasks.TaskCompletionSource" data-throw-if-not-resolved="false"></xref> for the native C# async pattern instead of polling loops. - - Handle for calling.collect (and play\_and\_collect) operations. Note: play\_and\_collect emits intermediate calling.call.play events that must be silently ignored so they do not pollute the collect action's state. - - Protocol constants for the RELAY WebSocket interface. Defines protocol version, call/dial/message states, terminal states, and per-event-type action terminal states. - - Handle for calling.detect operations. - - A typed RELAY device object — the `{type, params}` shape that recurs across `connect` / `refer` / `dial` / `tap` and the ringback list. @@ -58,10 +42,6 @@ lustri: Represents a single RELAY event received from the server. Carries the event type, a timestamp, and the params dictionary from which call\_id, node\_id, control\_id, tag, and state are extracted. - - Handle for calling.fax operations (send or receive). - - Represents a RELAY messaging message (SMS / MMS). A Message is created when you send or receive a message through the RELAY messaging namespace. It accumulates state-change events and resolves once the message reaches a terminal state (delivered, undelivered, or failed). Uses <xref href="System.Threading.Tasks.TaskCompletionSource" data-throw-if-not-resolved="false"></xref> for native async/await support. @@ -69,30 +49,12 @@ lustri: Wire-string mapping, parsing, and terminal-state predicate for <xref href="SignalWire.Relay.MessageState" data-throw-if-not-resolved="false"></xref>. + - - Handle for calling.pay operations. - - - - Handle for calling.play operations. - - - - Handle for calling.record operations. - - - - Handle for calling.stream operations. - - - - Handle for calling.tap operations. - +## Modules - - Handle for calling.transcribe operations. - + + ## Enums diff --git a/fern/products/sdk-reference/go/_meta.json b/fern/products/sdk-reference/go/_meta.json index ba8f71ad92..a651569812 100644 --- a/fern/products/sdk-reference/go/_meta.json +++ b/fern/products/sdk-reference/go/_meta.json @@ -6,5 +6,5 @@ "format": "mdx", "platform": "fern", "base_slug": "/reference/go", - "item_count": 2289 + "item_count": 2287 } \ No newline at end of file diff --git a/fern/products/sdk-reference/go/relay/relay/action/index.mdx b/fern/products/sdk-reference/go/relay/action/index.mdx similarity index 95% rename from fern/products/sdk-reference/go/relay/relay/action/index.mdx rename to fern/products/sdk-reference/go/relay/action/index.mdx index b5f69122c9..505b2e7a2f 100644 --- a/fern/products/sdk-reference/go/relay/relay/action/index.mdx +++ b/fern/products/sdk-reference/go/relay/action/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/go/relay/relay/action" +slug: "/reference/go/relay/action" title: "Action" sdk_label: "Go SDK" icon: "golang" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "go" qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.Action" - parent: "relay.relay" - module: "relay.relay" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "relay" source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go" --- # `Action` diff --git a/fern/products/sdk-reference/go/relay/relay/ai-action/index.mdx b/fern/products/sdk-reference/go/relay/ai-action/index.mdx similarity index 88% rename from fern/products/sdk-reference/go/relay/relay/ai-action/index.mdx rename to fern/products/sdk-reference/go/relay/ai-action/index.mdx index f280b7a818..78631fe425 100644 --- a/fern/products/sdk-reference/go/relay/relay/ai-action/index.mdx +++ b/fern/products/sdk-reference/go/relay/ai-action/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/go/relay/relay/ai-action" +slug: "/reference/go/relay/ai-action" title: "AIAction" sdk_label: "Go SDK" icon: "golang" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "go" qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.AIAction" - parent: "relay.relay" - module: "relay.relay" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "relay" source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go" --- # `AIAction` diff --git a/fern/products/sdk-reference/go/relay/relay/ai-event/index.mdx b/fern/products/sdk-reference/go/relay/ai-event/index.mdx similarity index 87% rename from fern/products/sdk-reference/go/relay/relay/ai-event/index.mdx rename to fern/products/sdk-reference/go/relay/ai-event/index.mdx index 6fdfdf346d..ad9e2f94fe 100644 --- a/fern/products/sdk-reference/go/relay/relay/ai-event/index.mdx +++ b/fern/products/sdk-reference/go/relay/ai-event/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/go/relay/relay/ai-event" +slug: "/reference/go/relay/ai-event" title: "AIEvent" sdk_label: "Go SDK" icon: "golang" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "go" qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.AIEvent" - parent: "relay.relay" - module: "relay.relay" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "relay" source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" --- # `AIEvent` diff --git a/fern/products/sdk-reference/go/relay/relay/call-receive-event/index.mdx b/fern/products/sdk-reference/go/relay/call-receive-event/index.mdx similarity index 90% rename from fern/products/sdk-reference/go/relay/relay/call-receive-event/index.mdx rename to fern/products/sdk-reference/go/relay/call-receive-event/index.mdx index ed6572a523..f2d9d9492b 100644 --- a/fern/products/sdk-reference/go/relay/relay/call-receive-event/index.mdx +++ b/fern/products/sdk-reference/go/relay/call-receive-event/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/go/relay/relay/call-receive-event" +slug: "/reference/go/relay/call-receive-event" title: "CallReceiveEvent" sdk_label: "Go SDK" icon: "golang" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "go" qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.CallReceiveEvent" - parent: "relay.relay" - module: "relay.relay" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "relay" source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" --- # `CallReceiveEvent` diff --git a/fern/products/sdk-reference/go/relay/relay/call-state-event/index.mdx b/fern/products/sdk-reference/go/relay/call-state-event/index.mdx similarity index 89% rename from fern/products/sdk-reference/go/relay/relay/call-state-event/index.mdx rename to fern/products/sdk-reference/go/relay/call-state-event/index.mdx index a4140ae238..5ed196795c 100644 --- a/fern/products/sdk-reference/go/relay/relay/call-state-event/index.mdx +++ b/fern/products/sdk-reference/go/relay/call-state-event/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/go/relay/relay/call-state-event" +slug: "/reference/go/relay/call-state-event" title: "CallStateEvent" sdk_label: "Go SDK" icon: "golang" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "go" qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.CallStateEvent" - parent: "relay.relay" - module: "relay.relay" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "relay" source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" --- # `CallStateEvent` diff --git a/fern/products/sdk-reference/go/relay/relay/call/index.mdx b/fern/products/sdk-reference/go/relay/call/index.mdx similarity index 99% rename from fern/products/sdk-reference/go/relay/relay/call/index.mdx rename to fern/products/sdk-reference/go/relay/call/index.mdx index 3a3b1cff90..1afa798036 100644 --- a/fern/products/sdk-reference/go/relay/relay/call/index.mdx +++ b/fern/products/sdk-reference/go/relay/call/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/go/relay/relay/call" +slug: "/reference/go/relay/call" title: "Call" sdk_label: "Go SDK" icon: "golang" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "go" qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.Call" - parent: "relay.relay" - module: "relay.relay" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "relay" source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go" --- # `Call` diff --git a/fern/products/sdk-reference/go/relay/relay/calling-error-event/index.mdx b/fern/products/sdk-reference/go/relay/calling-error-event/index.mdx similarity index 86% rename from fern/products/sdk-reference/go/relay/relay/calling-error-event/index.mdx rename to fern/products/sdk-reference/go/relay/calling-error-event/index.mdx index 874969c8ac..82804d55da 100644 --- a/fern/products/sdk-reference/go/relay/relay/calling-error-event/index.mdx +++ b/fern/products/sdk-reference/go/relay/calling-error-event/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/go/relay/relay/calling-error-event" +slug: "/reference/go/relay/calling-error-event" title: "CallingErrorEvent" sdk_label: "Go SDK" icon: "golang" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "go" qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.CallingErrorEvent" - parent: "relay.relay" - module: "relay.relay" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "relay" source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" --- # `CallingErrorEvent` diff --git a/fern/products/sdk-reference/go/relay/relay/client/index.mdx b/fern/products/sdk-reference/go/relay/client/index.mdx similarity index 99% rename from fern/products/sdk-reference/go/relay/relay/client/index.mdx rename to fern/products/sdk-reference/go/relay/client/index.mdx index bb4f782d5e..2c62610ff0 100644 --- a/fern/products/sdk-reference/go/relay/relay/client/index.mdx +++ b/fern/products/sdk-reference/go/relay/client/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/go/relay/relay/client" +slug: "/reference/go/relay/client" title: "Client" sdk_label: "Go SDK" icon: "golang" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "go" qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.Client" - parent: "relay.relay" - module: "relay.relay" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "relay" source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/client.go" --- # `Client` diff --git a/fern/products/sdk-reference/go/relay/relay/collect-action/index.mdx b/fern/products/sdk-reference/go/relay/collect-action/index.mdx similarity index 93% rename from fern/products/sdk-reference/go/relay/relay/collect-action/index.mdx rename to fern/products/sdk-reference/go/relay/collect-action/index.mdx index e5bd37c032..751bf5ded5 100644 --- a/fern/products/sdk-reference/go/relay/relay/collect-action/index.mdx +++ b/fern/products/sdk-reference/go/relay/collect-action/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/go/relay/relay/collect-action" +slug: "/reference/go/relay/collect-action" title: "CollectAction" sdk_label: "Go SDK" icon: "golang" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "go" qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.CollectAction" - parent: "relay.relay" - module: "relay.relay" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "relay" source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go" --- # `CollectAction` diff --git a/fern/products/sdk-reference/go/relay/relay/collect-event/index.mdx b/fern/products/sdk-reference/go/relay/collect-event/index.mdx similarity index 88% rename from fern/products/sdk-reference/go/relay/relay/collect-event/index.mdx rename to fern/products/sdk-reference/go/relay/collect-event/index.mdx index f8b2ccca82..6ad3170fdf 100644 --- a/fern/products/sdk-reference/go/relay/relay/collect-event/index.mdx +++ b/fern/products/sdk-reference/go/relay/collect-event/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/go/relay/relay/collect-event" +slug: "/reference/go/relay/collect-event" title: "CollectEvent" sdk_label: "Go SDK" icon: "golang" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "go" qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.CollectEvent" - parent: "relay.relay" - module: "relay.relay" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "relay" source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" --- # `CollectEvent` diff --git a/fern/products/sdk-reference/go/relay/relay/collect-params/index.mdx b/fern/products/sdk-reference/go/relay/collect-params/index.mdx similarity index 94% rename from fern/products/sdk-reference/go/relay/relay/collect-params/index.mdx rename to fern/products/sdk-reference/go/relay/collect-params/index.mdx index 5aad327039..eef94ffba0 100644 --- a/fern/products/sdk-reference/go/relay/relay/collect-params/index.mdx +++ b/fern/products/sdk-reference/go/relay/collect-params/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/go/relay/relay/collect-params" +slug: "/reference/go/relay/collect-params" title: "CollectParams" sdk_label: "Go SDK" icon: "golang" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "go" qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.CollectParams" - parent: "relay.relay" - module: "relay.relay" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "relay" source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/call.go" --- # `CollectParams` diff --git a/fern/products/sdk-reference/go/relay/relay/conference-event/index.mdx b/fern/products/sdk-reference/go/relay/conference-event/index.mdx similarity index 89% rename from fern/products/sdk-reference/go/relay/relay/conference-event/index.mdx rename to fern/products/sdk-reference/go/relay/conference-event/index.mdx index 934e94b8de..143e6a6879 100644 --- a/fern/products/sdk-reference/go/relay/relay/conference-event/index.mdx +++ b/fern/products/sdk-reference/go/relay/conference-event/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/go/relay/relay/conference-event" +slug: "/reference/go/relay/conference-event" title: "ConferenceEvent" sdk_label: "Go SDK" icon: "golang" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "go" qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.ConferenceEvent" - parent: "relay.relay" - module: "relay.relay" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "relay" source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" --- # `ConferenceEvent` diff --git a/fern/products/sdk-reference/go/relay/relay/connect-event/index.mdx b/fern/products/sdk-reference/go/relay/connect-event/index.mdx similarity index 86% rename from fern/products/sdk-reference/go/relay/relay/connect-event/index.mdx rename to fern/products/sdk-reference/go/relay/connect-event/index.mdx index e5f94c35c6..4160da8a9d 100644 --- a/fern/products/sdk-reference/go/relay/relay/connect-event/index.mdx +++ b/fern/products/sdk-reference/go/relay/connect-event/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/go/relay/relay/connect-event" +slug: "/reference/go/relay/connect-event" title: "ConnectEvent" sdk_label: "Go SDK" icon: "golang" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "go" qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.ConnectEvent" - parent: "relay.relay" - module: "relay.relay" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "relay" source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" --- # `ConnectEvent` diff --git a/fern/products/sdk-reference/go/relay/relay/denoise-event/index.mdx b/fern/products/sdk-reference/go/relay/denoise-event/index.mdx similarity index 87% rename from fern/products/sdk-reference/go/relay/relay/denoise-event/index.mdx rename to fern/products/sdk-reference/go/relay/denoise-event/index.mdx index 0fffb659e8..b7bdb8b79a 100644 --- a/fern/products/sdk-reference/go/relay/relay/denoise-event/index.mdx +++ b/fern/products/sdk-reference/go/relay/denoise-event/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/go/relay/relay/denoise-event" +slug: "/reference/go/relay/denoise-event" title: "DenoiseEvent" sdk_label: "Go SDK" icon: "golang" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "go" qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.DenoiseEvent" - parent: "relay.relay" - module: "relay.relay" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "relay" source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" --- # `DenoiseEvent` diff --git a/fern/products/sdk-reference/go/relay/relay/detect-action/index.mdx b/fern/products/sdk-reference/go/relay/detect-action/index.mdx similarity index 88% rename from fern/products/sdk-reference/go/relay/relay/detect-action/index.mdx rename to fern/products/sdk-reference/go/relay/detect-action/index.mdx index 790f21aee3..dbd0552f8c 100644 --- a/fern/products/sdk-reference/go/relay/relay/detect-action/index.mdx +++ b/fern/products/sdk-reference/go/relay/detect-action/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/go/relay/relay/detect-action" +slug: "/reference/go/relay/detect-action" title: "DetectAction" sdk_label: "Go SDK" icon: "golang" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "go" qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.DetectAction" - parent: "relay.relay" - module: "relay.relay" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "relay" source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go" --- # `DetectAction` diff --git a/fern/products/sdk-reference/go/relay/relay/detect-event/index.mdx b/fern/products/sdk-reference/go/relay/detect-event/index.mdx similarity index 86% rename from fern/products/sdk-reference/go/relay/relay/detect-event/index.mdx rename to fern/products/sdk-reference/go/relay/detect-event/index.mdx index 95fc28fe61..bbd92aab71 100644 --- a/fern/products/sdk-reference/go/relay/relay/detect-event/index.mdx +++ b/fern/products/sdk-reference/go/relay/detect-event/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/go/relay/relay/detect-event" +slug: "/reference/go/relay/detect-event" title: "DetectEvent" sdk_label: "Go SDK" icon: "golang" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "go" qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.DetectEvent" - parent: "relay.relay" - module: "relay.relay" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "relay" source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" --- # `DetectEvent` diff --git a/fern/products/sdk-reference/go/relay/relay/device/index.mdx b/fern/products/sdk-reference/go/relay/device/index.mdx similarity index 96% rename from fern/products/sdk-reference/go/relay/relay/device/index.mdx rename to fern/products/sdk-reference/go/relay/device/index.mdx index 1db40a9add..c31d1caae8 100644 --- a/fern/products/sdk-reference/go/relay/relay/device/index.mdx +++ b/fern/products/sdk-reference/go/relay/device/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/go/relay/relay/device" +slug: "/reference/go/relay/device" title: "Device" sdk_label: "Go SDK" icon: "golang" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "go" qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.Device" - parent: "relay.relay" - module: "relay.relay" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "relay" source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/device.go" --- # `Device` diff --git a/fern/products/sdk-reference/go/relay/relay/dial-event/index.mdx b/fern/products/sdk-reference/go/relay/dial-event/index.mdx similarity index 93% rename from fern/products/sdk-reference/go/relay/relay/dial-event/index.mdx rename to fern/products/sdk-reference/go/relay/dial-event/index.mdx index e303af13a0..6ea0c42583 100644 --- a/fern/products/sdk-reference/go/relay/relay/dial-event/index.mdx +++ b/fern/products/sdk-reference/go/relay/dial-event/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/go/relay/relay/dial-event" +slug: "/reference/go/relay/dial-event" title: "DialEvent" sdk_label: "Go SDK" icon: "golang" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "go" qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.DialEvent" - parent: "relay.relay" - module: "relay.relay" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "relay" source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" --- # `DialEvent` diff --git a/fern/products/sdk-reference/go/relay/relay/echo-event/index.mdx b/fern/products/sdk-reference/go/relay/echo-event/index.mdx similarity index 86% rename from fern/products/sdk-reference/go/relay/relay/echo-event/index.mdx rename to fern/products/sdk-reference/go/relay/echo-event/index.mdx index d0dd67e0ab..c42dff497d 100644 --- a/fern/products/sdk-reference/go/relay/relay/echo-event/index.mdx +++ b/fern/products/sdk-reference/go/relay/echo-event/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/go/relay/relay/echo-event" +slug: "/reference/go/relay/echo-event" title: "EchoEvent" sdk_label: "Go SDK" icon: "golang" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "go" qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.EchoEvent" - parent: "relay.relay" - module: "relay.relay" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "relay" source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" --- # `EchoEvent` diff --git a/fern/products/sdk-reference/go/relay/relay/fax-action/index.mdx b/fern/products/sdk-reference/go/relay/fax-action/index.mdx similarity index 90% rename from fern/products/sdk-reference/go/relay/relay/fax-action/index.mdx rename to fern/products/sdk-reference/go/relay/fax-action/index.mdx index 1e31549fb4..6d09b856c5 100644 --- a/fern/products/sdk-reference/go/relay/relay/fax-action/index.mdx +++ b/fern/products/sdk-reference/go/relay/fax-action/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/go/relay/relay/fax-action" +slug: "/reference/go/relay/fax-action" title: "FaxAction" sdk_label: "Go SDK" icon: "golang" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "go" qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.FaxAction" - parent: "relay.relay" - module: "relay.relay" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "relay" source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go" --- # `FaxAction` diff --git a/fern/products/sdk-reference/go/relay/relay/fax-event/index.mdx b/fern/products/sdk-reference/go/relay/fax-event/index.mdx similarity index 86% rename from fern/products/sdk-reference/go/relay/relay/fax-event/index.mdx rename to fern/products/sdk-reference/go/relay/fax-event/index.mdx index 62665edf16..3dd19758ae 100644 --- a/fern/products/sdk-reference/go/relay/relay/fax-event/index.mdx +++ b/fern/products/sdk-reference/go/relay/fax-event/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/go/relay/relay/fax-event" +slug: "/reference/go/relay/fax-event" title: "FaxEvent" sdk_label: "Go SDK" icon: "golang" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "go" qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.FaxEvent" - parent: "relay.relay" - module: "relay.relay" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "relay" source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" --- # `FaxEvent` diff --git a/fern/products/sdk-reference/go/relay/relay/hold-event/index.mdx b/fern/products/sdk-reference/go/relay/hold-event/index.mdx similarity index 86% rename from fern/products/sdk-reference/go/relay/relay/hold-event/index.mdx rename to fern/products/sdk-reference/go/relay/hold-event/index.mdx index 8d0d473bfb..22fac26526 100644 --- a/fern/products/sdk-reference/go/relay/relay/hold-event/index.mdx +++ b/fern/products/sdk-reference/go/relay/hold-event/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/go/relay/relay/hold-event" +slug: "/reference/go/relay/hold-event" title: "HoldEvent" sdk_label: "Go SDK" icon: "golang" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "go" qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.HoldEvent" - parent: "relay.relay" - module: "relay.relay" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "relay" source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" --- # `HoldEvent` diff --git a/fern/products/sdk-reference/go/relay/index.mdx b/fern/products/sdk-reference/go/relay/index.mdx index 9f459294e3..da20c22186 100644 --- a/fern/products/sdk-reference/go/relay/index.mdx +++ b/fern/products/sdk-reference/go/relay/index.mdx @@ -334,10 +334,180 @@ package relay Protocol version for the SignalWire Blade protocol. -## Modules +## Classes - + + Action represents a long-running operation on a call, such as playing audio, recording, or collecting input. Callers can Wait for completion, check status, or register a completion callback. + + + + AIAction represents a long-running AI operation on a call. + + + + AIEvent represents a calling.call.ai event. + + + + Call represents an active voice call managed through the RELAY client. It exposes methods for every calling operation supported by SignalWire, grouped into logical categories: lifecycle, audio, recording, bridging, DTMF, detection, fax, tap, streaming, conferencing, AI, hold/denoise, room/queue, pay, and transcription. + + + + CallingErrorEvent represents a calling.call.error event. + + + + CallReceiveEvent represents a calling.call.receive event for inbound calls. + + + + CallStateEvent represents a calling.call.state event. + + + + Client is the main RELAY WebSocket client that manages a persistent connection to SignalWire, handles Blade/JSON-RPC 2.0 authentication, event dispatch, and exposes high-level Dial/SendMessage methods. + + + + CollectAction represents a play-and-collect operation. + + + + CollectEvent represents a calling.call.collect event. + + + + CollectParams holds named parameters for the Collect method, matching Python's collect() named arguments. The fields are placed at the top level of the on-wire calling.collect frame (NOT nested under a "collect" object) — mirroring Python's params\["digits"] = digits at relay/call.py:583. + + + + ConferenceEvent represents a calling.call.conference event. + + + + ConnectEvent represents a calling.call.connect event. + + + + DenoiseEvent represents a calling.call.denoise event. + + + + DetectAction represents a long-running detect operation (e.g. machine detection). + + + + DetectEvent represents a calling.call.detect event. + + + + Device is a typed view of the \{type, params\} object that RELAY passes across connect / refer / dial / tap. It types the SHAPE only — the discriminant `type` stays a string because the set of device types is NOT schema-enumerated (the wire schema declares `type` as a free string; grounding: porting-sdk/relay-protocol/calling.\{connect,dial,refer,tap\}. params.json, where each device is \{required:\["type"], properties:\{type: \{type:string\}, params:\{\}\}\}). + + + + DialEvent represents a calling.call.dial event. + + + + EchoEvent represents a calling.call.echo event. + + + + FaxAction represents a long-running fax send/receive operation. methodPrefix distinguishes "send\_fax" from "receive\_fax" and is used to build the operation-specific stop command (e.g. "calling.send\_fax.stop"). + + + + FaxEvent represents a calling.call.fax event. + + + + HoldEvent represents a calling.call.hold event. + + + + Message represents an SMS/MMS message tracked through its lifecycle. + + + + MessageReceiveEvent represents a messaging.receive event. + + + + MessageStateEvent represents a messaging.state event. + + + + PayAction represents a long-running pay operation. + + + + PayEvent represents a calling.call.pay event. + + + + PlayAction represents a long-running play operation with media controls. + + + + PlayEvent represents a calling.call.play event. + + + + QueueEvent represents a calling.call.queue event. + + + + RecordAction represents a long-running record operation. + + + + RecordEvent represents a calling.call.record event. + + + + ReferEvent represents a calling.call.refer event. + + + + RelayError is a typed error returned by the RELAY protocol client. It carries the numeric code and message from the server so callers can programmatically inspect failures via errors.As. + + + + RelayEvent is the base event type for all events received from the SignalWire RELAY service. It carries an event type string and a generic parameter map that can be queried via helper methods. + + + + SendDigitsEvent represents a calling.call.send\_digits event. + + + + StandaloneCollectAction represents a standalone collect (without play). + + + + StreamAction represents a long-running media stream operation. + + + + StreamEvent represents a calling.call.stream event. + + + + TapAction represents a long-running tap operation. + + + + TapEvent represents a calling.call.tap event. + + + + TranscribeAction represents a long-running transcription operation. + + + + TranscribeEvent represents a calling.call.transcribe event. + ## Functions @@ -3592,6 +3762,311 @@ type TTSOption alias Line 73. +## Enums + +### CallState + +CallState is the lifecycle state of a Call as a typed defined-string kind. The underlying string is the exact wire token (e.g. "answered"), so a CallState is interchangeable with the bare string the reference uses. + +Server-emitted and growable: prefer IsKnown()/IsTerminal() over an exhaustive switch so an unrecognized future state does not break callers. + +#### Signature + +```go +type CallState alias +``` + +#### Methods + +##### IsKnown + +IsKnown reports whether s is one of the documented call lifecycle states. A false result means the server emitted a state this SDK build doesn't name yet — the value is still carried, just not recognized. + +###### Signature + +```go +func (CallState) IsKnown() bool +``` + +###### Returns + +`bool` + +###### Source + +[`pkg/relay/states.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/states.go) + +Line 58. + +*** + +##### IsTerminal + +IsTerminal reports whether s is a terminal call state (no further transitions expected). For a call the single terminal state is "ended", matching Python's CALL\_STATE\_ENDED gate in relay/call.py (the \_ended future resolves only on "ended"). + +###### Signature + +```go +func (CallState) IsTerminal() bool +``` + +###### Returns + +`bool` + +###### Source + +[`pkg/relay/states.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/states.go) + +Line 70. + +*** + +##### String + +String returns the wire token (identical to the underlying string). + +###### Signature + +```go +func (CallState) String() string +``` + +###### Returns + +`string` + +###### Source + +[`pkg/relay/states.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/states.go) + +Line 53. + +#### Source + +[`pkg/relay/states.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/states.go) + +Line 39. + +*** + +### DialState + +DialState is the outcome state of a calling.dial operation as a typed defined-string kind, read from the wire "dial\_state" field. It is a SEPARATE vocabulary from CallState (and from the connect/bridge states): a dial progresses dialing -> answered (winner found) or dialing -> failed (no device answered). Grounded in Python relay/client.py:950. + +Distinct Go type from CallState/MessageState so the three can never be mixed. + +#### Signature + +```go +type DialState alias +``` + +#### Methods + +##### IsKnown + +IsKnown reports whether s is one of the documented dial outcome states. + +###### Signature + +```go +func (DialState) IsKnown() bool +``` + +###### Returns + +`bool` + +###### Source + +[`pkg/relay/states.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/states.go) + +Line 99. + +*** + +##### IsTerminal + +IsTerminal reports whether s is a terminal dial outcome — "answered" (a winning call was found) or "failed" (no device answered). "dialing" is progress and is NOT terminal. Mirrors Python's \_handle\_dial\_event, which resolves the dial future on "answered", rejects it on "failed", and treats "dialing" as a progress event that doesn't settle the future (relay/client.py:976-1006). + +###### Signature + +```go +func (DialState) IsTerminal() bool +``` + +###### Returns + +`bool` + +###### Source + +[`pkg/relay/states.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/states.go) + +Line 113. + +*** + +##### String + +String returns the wire token (identical to the underlying string). + +###### Signature + +```go +func (DialState) String() string +``` + +###### Returns + +`string` + +###### Source + +[`pkg/relay/states.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/states.go) + +Line 96. + +#### Source + +[`pkg/relay/states.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/states.go) + +Line 85. + +*** + +### MessageState + +MessageState is the delivery lifecycle state of a Message as a typed defined-string kind. The underlying string is the exact wire token (the "message\_state" field), so it is interchangeable with the bare string the reference uses. + +Server-emitted and growable: prefer IsKnown()/IsTerminal(). A SEPARATE vocabulary from CallState/DialState — distinct Go type. + +#### Signature + +```go +type MessageState alias +``` + +#### Methods + +##### IsKnown + +IsKnown reports whether s is one of the documented message delivery states. + +###### Signature + +```go +func (MessageState) IsKnown() bool +``` + +###### Returns + +`bool` + +###### Source + +[`pkg/relay/states.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/states.go) + +Line 146. + +*** + +##### IsTerminal + +IsTerminal reports whether s is a terminal OUTBOUND delivery state — one of delivered, undelivered, failed — matching Python's MESSAGE\_TERMINAL\_STATES (relay/constants.py). These are the states on which an outbound send settles. + +Note: the inbound terminal state "received" is intentionally NOT counted here, to mirror Python exactly (received is excluded from MESSAGE\_TERMINAL\_STATES — the inbound flow doesn't await). The internal helper isTerminalMessageState (message.go) additionally treats "received" as terminal so a Wait() on an inbound message returns immediately; that is a separate, behavior-only concern and is deliberately not folded into this grounded predicate. + +###### Signature + +```go +func (MessageState) IsTerminal() bool +``` + +###### Returns + +`bool` + +###### Source + +[`pkg/relay/states.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/states.go) + +Line 166. + +*** + +##### String + +String returns the wire token (identical to the underlying string). + +###### Signature + +```go +func (MessageState) String() string +``` + +###### Returns + +`string` + +###### Source + +[`pkg/relay/states.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/states.go) + +Line 143. + +#### Source + +[`pkg/relay/states.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/states.go) + +Line 128. + +*** + +### TTSGender + +TTSGender is the closed set of text-to-speech voice genders as a defined string type with typed constants. WithTTSGender (the play\_tts / prompt\_tts gender option) takes it, giving Go callers editor autocompletion plus call-site typo checking — a bare string like "femail" only fails downstream, whereas a mistyped constant fails to compile. + +Because Go auto-converts untyped string-constant literals to a defined string type, every call site keeps working both ways: + +``` +relay.WithTTSGender(relay.GenderFemale) // typed const — autocompleted +relay.WithTTSGender("female") // bare string literal still compiles +``` + +TTSGender is a string subtype, so the value written into the \{"type":"tts","params":\{"gender":...\}\} media entry is byte-identical to the bare string the reference uses — parity with Python's play\_tts/prompt\_tts gender keyword (a plain str). + +#### Signature + +```go +type TTSGender alias +``` + +#### Examples + + + + ```go + relay.WithTTSGender(relay.GenderFemale) // typed const — autocompleted + relay.WithTTSGender("female") // bare string literal still compiles + ``` + + + + ```go + relay.WithTTSGender(relay.GenderFemale) // typed const — autocompleted + relay.WithTTSGender("female") // bare string literal still compiles + ``` + + + +#### Source + +[`pkg/relay/tts_gender.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/tts_gender.go) + +Line 19. + ## Source [`pkg/relay/action.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go) diff --git a/fern/products/sdk-reference/go/relay/relay/message-receive-event/index.mdx b/fern/products/sdk-reference/go/relay/message-receive-event/index.mdx similarity index 91% rename from fern/products/sdk-reference/go/relay/relay/message-receive-event/index.mdx rename to fern/products/sdk-reference/go/relay/message-receive-event/index.mdx index 18c4a1a62a..eb62286d0d 100644 --- a/fern/products/sdk-reference/go/relay/relay/message-receive-event/index.mdx +++ b/fern/products/sdk-reference/go/relay/message-receive-event/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/go/relay/relay/message-receive-event" +slug: "/reference/go/relay/message-receive-event" title: "MessageReceiveEvent" sdk_label: "Go SDK" icon: "golang" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "go" qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.MessageReceiveEvent" - parent: "relay.relay" - module: "relay.relay" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "relay" source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" --- # `MessageReceiveEvent` diff --git a/fern/products/sdk-reference/go/relay/relay/message-state-event/index.mdx b/fern/products/sdk-reference/go/relay/message-state-event/index.mdx similarity index 93% rename from fern/products/sdk-reference/go/relay/relay/message-state-event/index.mdx rename to fern/products/sdk-reference/go/relay/message-state-event/index.mdx index 9bf68a6525..e0bf3e23c7 100644 --- a/fern/products/sdk-reference/go/relay/relay/message-state-event/index.mdx +++ b/fern/products/sdk-reference/go/relay/message-state-event/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/go/relay/relay/message-state-event" +slug: "/reference/go/relay/message-state-event" title: "MessageStateEvent" sdk_label: "Go SDK" icon: "golang" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "go" qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.MessageStateEvent" - parent: "relay.relay" - module: "relay.relay" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "relay" source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" --- # `MessageStateEvent` diff --git a/fern/products/sdk-reference/go/relay/relay/message/index.mdx b/fern/products/sdk-reference/go/relay/message/index.mdx similarity index 98% rename from fern/products/sdk-reference/go/relay/relay/message/index.mdx rename to fern/products/sdk-reference/go/relay/message/index.mdx index 89f75d7a4a..45bc1b99e6 100644 --- a/fern/products/sdk-reference/go/relay/relay/message/index.mdx +++ b/fern/products/sdk-reference/go/relay/message/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/go/relay/relay/message" +slug: "/reference/go/relay/message" title: "Message" sdk_label: "Go SDK" icon: "golang" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "go" qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.Message" - parent: "relay.relay" - module: "relay.relay" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "relay" source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/message.go" --- # `Message` diff --git a/fern/products/sdk-reference/go/relay/relay/pay-action/index.mdx b/fern/products/sdk-reference/go/relay/pay-action/index.mdx similarity index 88% rename from fern/products/sdk-reference/go/relay/relay/pay-action/index.mdx rename to fern/products/sdk-reference/go/relay/pay-action/index.mdx index b42de93257..895dc6f8ce 100644 --- a/fern/products/sdk-reference/go/relay/relay/pay-action/index.mdx +++ b/fern/products/sdk-reference/go/relay/pay-action/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/go/relay/relay/pay-action" +slug: "/reference/go/relay/pay-action" title: "PayAction" sdk_label: "Go SDK" icon: "golang" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "go" qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.PayAction" - parent: "relay.relay" - module: "relay.relay" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "relay" source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go" --- # `PayAction` diff --git a/fern/products/sdk-reference/go/relay/relay/pay-event/index.mdx b/fern/products/sdk-reference/go/relay/pay-event/index.mdx similarity index 87% rename from fern/products/sdk-reference/go/relay/relay/pay-event/index.mdx rename to fern/products/sdk-reference/go/relay/pay-event/index.mdx index 6db9dc84d8..6eace15615 100644 --- a/fern/products/sdk-reference/go/relay/relay/pay-event/index.mdx +++ b/fern/products/sdk-reference/go/relay/pay-event/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/go/relay/relay/pay-event" +slug: "/reference/go/relay/pay-event" title: "PayEvent" sdk_label: "Go SDK" icon: "golang" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "go" qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.PayEvent" - parent: "relay.relay" - module: "relay.relay" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "relay" source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" --- # `PayEvent` diff --git a/fern/products/sdk-reference/go/relay/relay/play-action/index.mdx b/fern/products/sdk-reference/go/relay/play-action/index.mdx similarity index 93% rename from fern/products/sdk-reference/go/relay/relay/play-action/index.mdx rename to fern/products/sdk-reference/go/relay/play-action/index.mdx index 56668c1238..d961267ea8 100644 --- a/fern/products/sdk-reference/go/relay/relay/play-action/index.mdx +++ b/fern/products/sdk-reference/go/relay/play-action/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/go/relay/relay/play-action" +slug: "/reference/go/relay/play-action" title: "PlayAction" sdk_label: "Go SDK" icon: "golang" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "go" qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.PlayAction" - parent: "relay.relay" - module: "relay.relay" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "relay" source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go" --- # `PlayAction` diff --git a/fern/products/sdk-reference/go/relay/relay/play-event/index.mdx b/fern/products/sdk-reference/go/relay/play-event/index.mdx similarity index 86% rename from fern/products/sdk-reference/go/relay/relay/play-event/index.mdx rename to fern/products/sdk-reference/go/relay/play-event/index.mdx index a5b804b668..e0f450f150 100644 --- a/fern/products/sdk-reference/go/relay/relay/play-event/index.mdx +++ b/fern/products/sdk-reference/go/relay/play-event/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/go/relay/relay/play-event" +slug: "/reference/go/relay/play-event" title: "PlayEvent" sdk_label: "Go SDK" icon: "golang" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "go" qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.PlayEvent" - parent: "relay.relay" - module: "relay.relay" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "relay" source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" --- # `PlayEvent` diff --git a/fern/products/sdk-reference/go/relay/relay/queue-event/index.mdx b/fern/products/sdk-reference/go/relay/queue-event/index.mdx similarity index 92% rename from fern/products/sdk-reference/go/relay/relay/queue-event/index.mdx rename to fern/products/sdk-reference/go/relay/queue-event/index.mdx index 66c8c714e7..8953413f4c 100644 --- a/fern/products/sdk-reference/go/relay/relay/queue-event/index.mdx +++ b/fern/products/sdk-reference/go/relay/queue-event/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/go/relay/relay/queue-event" +slug: "/reference/go/relay/queue-event" title: "QueueEvent" sdk_label: "Go SDK" icon: "golang" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "go" qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.QueueEvent" - parent: "relay.relay" - module: "relay.relay" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "relay" source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" --- # `QueueEvent` diff --git a/fern/products/sdk-reference/go/relay/relay/record-action/index.mdx b/fern/products/sdk-reference/go/relay/record-action/index.mdx similarity index 93% rename from fern/products/sdk-reference/go/relay/relay/record-action/index.mdx rename to fern/products/sdk-reference/go/relay/record-action/index.mdx index ccec052423..04d9842554 100644 --- a/fern/products/sdk-reference/go/relay/relay/record-action/index.mdx +++ b/fern/products/sdk-reference/go/relay/record-action/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/go/relay/relay/record-action" +slug: "/reference/go/relay/record-action" title: "RecordAction" sdk_label: "Go SDK" icon: "golang" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "go" qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.RecordAction" - parent: "relay.relay" - module: "relay.relay" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "relay" source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go" --- # `RecordAction` diff --git a/fern/products/sdk-reference/go/relay/relay/record-event/index.mdx b/fern/products/sdk-reference/go/relay/record-event/index.mdx similarity index 90% rename from fern/products/sdk-reference/go/relay/relay/record-event/index.mdx rename to fern/products/sdk-reference/go/relay/record-event/index.mdx index 5b09a47b90..2bc5e731f0 100644 --- a/fern/products/sdk-reference/go/relay/relay/record-event/index.mdx +++ b/fern/products/sdk-reference/go/relay/record-event/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/go/relay/relay/record-event" +slug: "/reference/go/relay/record-event" title: "RecordEvent" sdk_label: "Go SDK" icon: "golang" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "go" qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.RecordEvent" - parent: "relay.relay" - module: "relay.relay" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "relay" source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" --- # `RecordEvent` diff --git a/fern/products/sdk-reference/go/relay/relay/refer-event/index.mdx b/fern/products/sdk-reference/go/relay/refer-event/index.mdx similarity index 89% rename from fern/products/sdk-reference/go/relay/relay/refer-event/index.mdx rename to fern/products/sdk-reference/go/relay/refer-event/index.mdx index b21a1266c3..a5b387bdcc 100644 --- a/fern/products/sdk-reference/go/relay/relay/refer-event/index.mdx +++ b/fern/products/sdk-reference/go/relay/refer-event/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/go/relay/relay/refer-event" +slug: "/reference/go/relay/refer-event" title: "ReferEvent" sdk_label: "Go SDK" icon: "golang" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "go" qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.ReferEvent" - parent: "relay.relay" - module: "relay.relay" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "relay" source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" --- # `ReferEvent` diff --git a/fern/products/sdk-reference/go/relay/relay/relay-error/index.mdx b/fern/products/sdk-reference/go/relay/relay-error/index.mdx similarity index 94% rename from fern/products/sdk-reference/go/relay/relay/relay-error/index.mdx rename to fern/products/sdk-reference/go/relay/relay-error/index.mdx index 7ee1048143..b085753612 100644 --- a/fern/products/sdk-reference/go/relay/relay/relay-error/index.mdx +++ b/fern/products/sdk-reference/go/relay/relay-error/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/go/relay/relay/relay-error" +slug: "/reference/go/relay/relay-error" title: "RelayError" sdk_label: "Go SDK" icon: "golang" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "go" qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.RelayError" - parent: "relay.relay" - module: "relay.relay" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "relay" source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/error.go" --- # `RelayError` diff --git a/fern/products/sdk-reference/go/relay/relay/relay-event/index.mdx b/fern/products/sdk-reference/go/relay/relay-event/index.mdx similarity index 97% rename from fern/products/sdk-reference/go/relay/relay/relay-event/index.mdx rename to fern/products/sdk-reference/go/relay/relay-event/index.mdx index 8c191c4ea7..ed2f2f37e5 100644 --- a/fern/products/sdk-reference/go/relay/relay/relay-event/index.mdx +++ b/fern/products/sdk-reference/go/relay/relay-event/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/go/relay/relay/relay-event" +slug: "/reference/go/relay/relay-event" title: "RelayEvent" sdk_label: "Go SDK" icon: "golang" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "go" qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.RelayEvent" - parent: "relay.relay" - module: "relay.relay" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "relay" source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" --- # `RelayEvent` diff --git a/fern/products/sdk-reference/go/relay/relay/index.mdx b/fern/products/sdk-reference/go/relay/relay/index.mdx deleted file mode 100644 index c186eb7c49..0000000000 --- a/fern/products/sdk-reference/go/relay/relay/index.mdx +++ /dev/null @@ -1,495 +0,0 @@ ---- -slug: "/reference/go/relay/relay" -title: "relay" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "module" - language: "go" - qualified_name: "relay.relay" - parent: "github.com/signalwire/signalwire-go/pkg/relay" - module: "relay" ---- -# `relay` - -## Classes - - - - Action represents a long-running operation on a call, such as playing audio, recording, or collecting input. Callers can Wait for completion, check status, or register a completion callback. - - - - AIAction represents a long-running AI operation on a call. - - - - AIEvent represents a calling.call.ai event. - - - - Call represents an active voice call managed through the RELAY client. It exposes methods for every calling operation supported by SignalWire, grouped into logical categories: lifecycle, audio, recording, bridging, DTMF, detection, fax, tap, streaming, conferencing, AI, hold/denoise, room/queue, pay, and transcription. - - - - CallingErrorEvent represents a calling.call.error event. - - - - CallReceiveEvent represents a calling.call.receive event for inbound calls. - - - - CallStateEvent represents a calling.call.state event. - - - - Client is the main RELAY WebSocket client that manages a persistent connection to SignalWire, handles Blade/JSON-RPC 2.0 authentication, event dispatch, and exposes high-level Dial/SendMessage methods. - - - - CollectAction represents a play-and-collect operation. - - - - CollectEvent represents a calling.call.collect event. - - - - CollectParams holds named parameters for the Collect method, matching Python's collect() named arguments. The fields are placed at the top level of the on-wire calling.collect frame (NOT nested under a "collect" object) — mirroring Python's params\["digits"] = digits at relay/call.py:583. - - - - ConferenceEvent represents a calling.call.conference event. - - - - ConnectEvent represents a calling.call.connect event. - - - - DenoiseEvent represents a calling.call.denoise event. - - - - DetectAction represents a long-running detect operation (e.g. machine detection). - - - - DetectEvent represents a calling.call.detect event. - - - - Device is a typed view of the \{type, params\} object that RELAY passes across connect / refer / dial / tap. It types the SHAPE only — the discriminant `type` stays a string because the set of device types is NOT schema-enumerated (the wire schema declares `type` as a free string; grounding: porting-sdk/relay-protocol/calling.\{connect,dial,refer,tap\}. params.json, where each device is \{required:\["type"], properties:\{type: \{type:string\}, params:\{\}\}\}). - - - - DialEvent represents a calling.call.dial event. - - - - EchoEvent represents a calling.call.echo event. - - - - FaxAction represents a long-running fax send/receive operation. methodPrefix distinguishes "send\_fax" from "receive\_fax" and is used to build the operation-specific stop command (e.g. "calling.send\_fax.stop"). - - - - FaxEvent represents a calling.call.fax event. - - - - HoldEvent represents a calling.call.hold event. - - - - Message represents an SMS/MMS message tracked through its lifecycle. - - - - MessageReceiveEvent represents a messaging.receive event. - - - - MessageStateEvent represents a messaging.state event. - - - - PayAction represents a long-running pay operation. - - - - PayEvent represents a calling.call.pay event. - - - - PlayAction represents a long-running play operation with media controls. - - - - PlayEvent represents a calling.call.play event. - - - - QueueEvent represents a calling.call.queue event. - - - - RecordAction represents a long-running record operation. - - - - RecordEvent represents a calling.call.record event. - - - - ReferEvent represents a calling.call.refer event. - - - - RelayError is a typed error returned by the RELAY protocol client. It carries the numeric code and message from the server so callers can programmatically inspect failures via errors.As. - - - - RelayEvent is the base event type for all events received from the SignalWire RELAY service. It carries an event type string and a generic parameter map that can be queried via helper methods. - - - - SendDigitsEvent represents a calling.call.send\_digits event. - - - - StandaloneCollectAction represents a standalone collect (without play). - - - - StreamAction represents a long-running media stream operation. - - - - StreamEvent represents a calling.call.stream event. - - - - TapAction represents a long-running tap operation. - - - - TapEvent represents a calling.call.tap event. - - - - TranscribeAction represents a long-running transcription operation. - - - - TranscribeEvent represents a calling.call.transcribe event. - - - -## Enums - -### CallState - -CallState is the lifecycle state of a Call as a typed defined-string kind. The underlying string is the exact wire token (e.g. "answered"), so a CallState is interchangeable with the bare string the reference uses. - -Server-emitted and growable: prefer IsKnown()/IsTerminal() over an exhaustive switch so an unrecognized future state does not break callers. - -#### Signature - -```go -type CallState alias -``` - -#### Methods - -##### IsKnown - -IsKnown reports whether s is one of the documented call lifecycle states. A false result means the server emitted a state this SDK build doesn't name yet — the value is still carried, just not recognized. - -###### Signature - -```go -func (CallState) IsKnown() bool -``` - -###### Returns - -`bool` - -###### Source - -[`pkg/relay/states.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/states.go) - -Line 58. - -*** - -##### IsTerminal - -IsTerminal reports whether s is a terminal call state (no further transitions expected). For a call the single terminal state is "ended", matching Python's CALL\_STATE\_ENDED gate in relay/call.py (the \_ended future resolves only on "ended"). - -###### Signature - -```go -func (CallState) IsTerminal() bool -``` - -###### Returns - -`bool` - -###### Source - -[`pkg/relay/states.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/states.go) - -Line 70. - -*** - -##### String - -String returns the wire token (identical to the underlying string). - -###### Signature - -```go -func (CallState) String() string -``` - -###### Returns - -`string` - -###### Source - -[`pkg/relay/states.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/states.go) - -Line 53. - -#### Source - -[`pkg/relay/states.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/states.go) - -Line 39. - -*** - -### DialState - -DialState is the outcome state of a calling.dial operation as a typed defined-string kind, read from the wire "dial\_state" field. It is a SEPARATE vocabulary from CallState (and from the connect/bridge states): a dial progresses dialing -> answered (winner found) or dialing -> failed (no device answered). Grounded in Python relay/client.py:950. - -Distinct Go type from CallState/MessageState so the three can never be mixed. - -#### Signature - -```go -type DialState alias -``` - -#### Methods - -##### IsKnown - -IsKnown reports whether s is one of the documented dial outcome states. - -###### Signature - -```go -func (DialState) IsKnown() bool -``` - -###### Returns - -`bool` - -###### Source - -[`pkg/relay/states.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/states.go) - -Line 99. - -*** - -##### IsTerminal - -IsTerminal reports whether s is a terminal dial outcome — "answered" (a winning call was found) or "failed" (no device answered). "dialing" is progress and is NOT terminal. Mirrors Python's \_handle\_dial\_event, which resolves the dial future on "answered", rejects it on "failed", and treats "dialing" as a progress event that doesn't settle the future (relay/client.py:976-1006). - -###### Signature - -```go -func (DialState) IsTerminal() bool -``` - -###### Returns - -`bool` - -###### Source - -[`pkg/relay/states.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/states.go) - -Line 113. - -*** - -##### String - -String returns the wire token (identical to the underlying string). - -###### Signature - -```go -func (DialState) String() string -``` - -###### Returns - -`string` - -###### Source - -[`pkg/relay/states.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/states.go) - -Line 96. - -#### Source - -[`pkg/relay/states.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/states.go) - -Line 85. - -*** - -### MessageState - -MessageState is the delivery lifecycle state of a Message as a typed defined-string kind. The underlying string is the exact wire token (the "message\_state" field), so it is interchangeable with the bare string the reference uses. - -Server-emitted and growable: prefer IsKnown()/IsTerminal(). A SEPARATE vocabulary from CallState/DialState — distinct Go type. - -#### Signature - -```go -type MessageState alias -``` - -#### Methods - -##### IsKnown - -IsKnown reports whether s is one of the documented message delivery states. - -###### Signature - -```go -func (MessageState) IsKnown() bool -``` - -###### Returns - -`bool` - -###### Source - -[`pkg/relay/states.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/states.go) - -Line 146. - -*** - -##### IsTerminal - -IsTerminal reports whether s is a terminal OUTBOUND delivery state — one of delivered, undelivered, failed — matching Python's MESSAGE\_TERMINAL\_STATES (relay/constants.py). These are the states on which an outbound send settles. - -Note: the inbound terminal state "received" is intentionally NOT counted here, to mirror Python exactly (received is excluded from MESSAGE\_TERMINAL\_STATES — the inbound flow doesn't await). The internal helper isTerminalMessageState (message.go) additionally treats "received" as terminal so a Wait() on an inbound message returns immediately; that is a separate, behavior-only concern and is deliberately not folded into this grounded predicate. - -###### Signature - -```go -func (MessageState) IsTerminal() bool -``` - -###### Returns - -`bool` - -###### Source - -[`pkg/relay/states.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/states.go) - -Line 166. - -*** - -##### String - -String returns the wire token (identical to the underlying string). - -###### Signature - -```go -func (MessageState) String() string -``` - -###### Returns - -`string` - -###### Source - -[`pkg/relay/states.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/states.go) - -Line 143. - -#### Source - -[`pkg/relay/states.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/states.go) - -Line 128. - -*** - -### TTSGender - -TTSGender is the closed set of text-to-speech voice genders as a defined string type with typed constants. WithTTSGender (the play\_tts / prompt\_tts gender option) takes it, giving Go callers editor autocompletion plus call-site typo checking — a bare string like "femail" only fails downstream, whereas a mistyped constant fails to compile. - -Because Go auto-converts untyped string-constant literals to a defined string type, every call site keeps working both ways: - -``` -relay.WithTTSGender(relay.GenderFemale) // typed const — autocompleted -relay.WithTTSGender("female") // bare string literal still compiles -``` - -TTSGender is a string subtype, so the value written into the \{"type":"tts","params":\{"gender":...\}\} media entry is byte-identical to the bare string the reference uses — parity with Python's play\_tts/prompt\_tts gender keyword (a plain str). - -#### Signature - -```go -type TTSGender alias -``` - -#### Examples - - - - ```go - relay.WithTTSGender(relay.GenderFemale) // typed const — autocompleted - relay.WithTTSGender("female") // bare string literal still compiles - ``` - - - - ```go - relay.WithTTSGender(relay.GenderFemale) // typed const — autocompleted - relay.WithTTSGender("female") // bare string literal still compiles - ``` - - - -#### Source - -[`pkg/relay/tts_gender.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/tts_gender.go) - -Line 19. diff --git a/fern/products/sdk-reference/go/relay/relay/send-digits-event/index.mdx b/fern/products/sdk-reference/go/relay/send-digits-event/index.mdx similarity index 86% rename from fern/products/sdk-reference/go/relay/relay/send-digits-event/index.mdx rename to fern/products/sdk-reference/go/relay/send-digits-event/index.mdx index 2f893c4687..4542a70f2f 100644 --- a/fern/products/sdk-reference/go/relay/relay/send-digits-event/index.mdx +++ b/fern/products/sdk-reference/go/relay/send-digits-event/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/go/relay/relay/send-digits-event" +slug: "/reference/go/relay/send-digits-event" title: "SendDigitsEvent" sdk_label: "Go SDK" icon: "golang" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "go" qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.SendDigitsEvent" - parent: "relay.relay" - module: "relay.relay" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "relay" source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" --- # `SendDigitsEvent` diff --git a/fern/products/sdk-reference/go/relay/relay/standalone-collect-action/index.mdx b/fern/products/sdk-reference/go/relay/standalone-collect-action/index.mdx similarity index 91% rename from fern/products/sdk-reference/go/relay/relay/standalone-collect-action/index.mdx rename to fern/products/sdk-reference/go/relay/standalone-collect-action/index.mdx index c04f9301af..bac303721b 100644 --- a/fern/products/sdk-reference/go/relay/relay/standalone-collect-action/index.mdx +++ b/fern/products/sdk-reference/go/relay/standalone-collect-action/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/go/relay/relay/standalone-collect-action" +slug: "/reference/go/relay/standalone-collect-action" title: "StandaloneCollectAction" sdk_label: "Go SDK" icon: "golang" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "go" qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.StandaloneCollectAction" - parent: "relay.relay" - module: "relay.relay" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "relay" source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go" --- # `StandaloneCollectAction` diff --git a/fern/products/sdk-reference/go/relay/relay/stream-action/index.mdx b/fern/products/sdk-reference/go/relay/stream-action/index.mdx similarity index 88% rename from fern/products/sdk-reference/go/relay/relay/stream-action/index.mdx rename to fern/products/sdk-reference/go/relay/stream-action/index.mdx index 691d29d399..be2b55c59b 100644 --- a/fern/products/sdk-reference/go/relay/relay/stream-action/index.mdx +++ b/fern/products/sdk-reference/go/relay/stream-action/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/go/relay/relay/stream-action" +slug: "/reference/go/relay/stream-action" title: "StreamAction" sdk_label: "Go SDK" icon: "golang" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "go" qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.StreamAction" - parent: "relay.relay" - module: "relay.relay" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "relay" source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go" --- # `StreamAction` diff --git a/fern/products/sdk-reference/go/relay/relay/stream-event/index.mdx b/fern/products/sdk-reference/go/relay/stream-event/index.mdx similarity index 89% rename from fern/products/sdk-reference/go/relay/relay/stream-event/index.mdx rename to fern/products/sdk-reference/go/relay/stream-event/index.mdx index f1a5a7feeb..af2a485950 100644 --- a/fern/products/sdk-reference/go/relay/relay/stream-event/index.mdx +++ b/fern/products/sdk-reference/go/relay/stream-event/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/go/relay/relay/stream-event" +slug: "/reference/go/relay/stream-event" title: "StreamEvent" sdk_label: "Go SDK" icon: "golang" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "go" qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.StreamEvent" - parent: "relay.relay" - module: "relay.relay" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "relay" source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" --- # `StreamEvent` diff --git a/fern/products/sdk-reference/go/relay/relay/tap-action/index.mdx b/fern/products/sdk-reference/go/relay/tap-action/index.mdx similarity index 88% rename from fern/products/sdk-reference/go/relay/relay/tap-action/index.mdx rename to fern/products/sdk-reference/go/relay/tap-action/index.mdx index f40d13223f..c4996785f1 100644 --- a/fern/products/sdk-reference/go/relay/relay/tap-action/index.mdx +++ b/fern/products/sdk-reference/go/relay/tap-action/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/go/relay/relay/tap-action" +slug: "/reference/go/relay/tap-action" title: "TapAction" sdk_label: "Go SDK" icon: "golang" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "go" qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.TapAction" - parent: "relay.relay" - module: "relay.relay" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "relay" source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go" --- # `TapAction` diff --git a/fern/products/sdk-reference/go/relay/relay/tap-event/index.mdx b/fern/products/sdk-reference/go/relay/tap-event/index.mdx similarity index 89% rename from fern/products/sdk-reference/go/relay/relay/tap-event/index.mdx rename to fern/products/sdk-reference/go/relay/tap-event/index.mdx index 7563da7522..fe4d62e20d 100644 --- a/fern/products/sdk-reference/go/relay/relay/tap-event/index.mdx +++ b/fern/products/sdk-reference/go/relay/tap-event/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/go/relay/relay/tap-event" +slug: "/reference/go/relay/tap-event" title: "TapEvent" sdk_label: "Go SDK" icon: "golang" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "go" qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.TapEvent" - parent: "relay.relay" - module: "relay.relay" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "relay" source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" --- # `TapEvent` diff --git a/fern/products/sdk-reference/go/relay/relay/transcribe-action/index.mdx b/fern/products/sdk-reference/go/relay/transcribe-action/index.mdx similarity index 88% rename from fern/products/sdk-reference/go/relay/relay/transcribe-action/index.mdx rename to fern/products/sdk-reference/go/relay/transcribe-action/index.mdx index 4a152bdb6d..4632fdc9a0 100644 --- a/fern/products/sdk-reference/go/relay/relay/transcribe-action/index.mdx +++ b/fern/products/sdk-reference/go/relay/transcribe-action/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/go/relay/relay/transcribe-action" +slug: "/reference/go/relay/transcribe-action" title: "TranscribeAction" sdk_label: "Go SDK" icon: "golang" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "go" qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.TranscribeAction" - parent: "relay.relay" - module: "relay.relay" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "relay" source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/action.go" --- # `TranscribeAction` diff --git a/fern/products/sdk-reference/go/relay/relay/transcribe-event/index.mdx b/fern/products/sdk-reference/go/relay/transcribe-event/index.mdx similarity index 92% rename from fern/products/sdk-reference/go/relay/relay/transcribe-event/index.mdx rename to fern/products/sdk-reference/go/relay/transcribe-event/index.mdx index ee6d9d0b2d..3809fad381 100644 --- a/fern/products/sdk-reference/go/relay/relay/transcribe-event/index.mdx +++ b/fern/products/sdk-reference/go/relay/transcribe-event/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/go/relay/relay/transcribe-event" +slug: "/reference/go/relay/transcribe-event" title: "TranscribeEvent" sdk_label: "Go SDK" icon: "golang" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "go" qualified_name: "github.com/signalwire/signalwire-go/pkg/relay.TranscribeEvent" - parent: "relay.relay" - module: "relay.relay" + parent: "github.com/signalwire/signalwire-go/pkg/relay" + module: "relay" source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/relay/event.go" --- # `TranscribeEvent` diff --git a/fern/products/sdk-reference/go/rest/rest/crud-resource/index.mdx b/fern/products/sdk-reference/go/rest/crud-resource/index.mdx similarity index 96% rename from fern/products/sdk-reference/go/rest/rest/crud-resource/index.mdx rename to fern/products/sdk-reference/go/rest/crud-resource/index.mdx index 8c4ad6e588..c12b27a880 100644 --- a/fern/products/sdk-reference/go/rest/rest/crud-resource/index.mdx +++ b/fern/products/sdk-reference/go/rest/crud-resource/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/go/rest/rest/crud-resource" +slug: "/reference/go/rest/crud-resource" title: "CrudResource" sdk_label: "Go SDK" icon: "golang" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "go" qualified_name: "github.com/signalwire/signalwire-go/pkg/rest.CrudResource" - parent: "rest.rest" - module: "rest.rest" + parent: "github.com/signalwire/signalwire-go/pkg/rest" + module: "rest" source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go" --- # `CrudResource` diff --git a/fern/products/sdk-reference/go/rest/rest/http-client/index.mdx b/fern/products/sdk-reference/go/rest/http-client/index.mdx similarity index 97% rename from fern/products/sdk-reference/go/rest/rest/http-client/index.mdx rename to fern/products/sdk-reference/go/rest/http-client/index.mdx index 7502256cd8..a1de3f1267 100644 --- a/fern/products/sdk-reference/go/rest/rest/http-client/index.mdx +++ b/fern/products/sdk-reference/go/rest/http-client/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/go/rest/rest/http-client" +slug: "/reference/go/rest/http-client" title: "HttpClient" sdk_label: "Go SDK" icon: "golang" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "go" qualified_name: "github.com/signalwire/signalwire-go/pkg/rest.HttpClient" - parent: "rest.rest" - module: "rest.rest" + parent: "github.com/signalwire/signalwire-go/pkg/rest" + module: "rest" source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go" --- # `HttpClient` diff --git a/fern/products/sdk-reference/go/rest/index.mdx b/fern/products/sdk-reference/go/rest/index.mdx index edaa44e145..cb9eb72e8f 100644 --- a/fern/products/sdk-reference/go/rest/index.mdx +++ b/fern/products/sdk-reference/go/rest/index.mdx @@ -22,12 +22,34 @@ It includes an HTTP transport layer, generic CRUD resource abstractions, paginat package rest ``` +## Classes + + + + CrudResource provides standard List, Create, Get, Update, Delete operations against a REST collection endpoint. Update defaults to PATCH; set UpdateMethod to "PUT" to override. + + + + HttpClient is a thin wrapper around net/http that provides Basic Auth, JSON encoding/decoding, and standard headers for SignalWire API calls. + + + + PaginatedIterator walks through paginated API responses one page at a time. Each call to Next returns the items from the current page, a boolean indicating whether more pages exist, and any error encountered. + + + + RestClient is the top-level REST client for the SignalWire platform. It provides namespaced access to all SignalWire API domains. + + + + SignalWireRestError is returned when the SignalWire REST API responds with a non-2xx status code. + + + ## Modules - - ## Functions diff --git a/fern/products/sdk-reference/go/rest/rest/paginated-iterator/index.mdx b/fern/products/sdk-reference/go/rest/paginated-iterator/index.mdx similarity index 93% rename from fern/products/sdk-reference/go/rest/rest/paginated-iterator/index.mdx rename to fern/products/sdk-reference/go/rest/paginated-iterator/index.mdx index 04b8e4b11d..f1317df8f2 100644 --- a/fern/products/sdk-reference/go/rest/rest/paginated-iterator/index.mdx +++ b/fern/products/sdk-reference/go/rest/paginated-iterator/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/go/rest/rest/paginated-iterator" +slug: "/reference/go/rest/paginated-iterator" title: "PaginatedIterator" sdk_label: "Go SDK" icon: "golang" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "go" qualified_name: "github.com/signalwire/signalwire-go/pkg/rest.PaginatedIterator" - parent: "rest.rest" - module: "rest.rest" + parent: "github.com/signalwire/signalwire-go/pkg/rest" + module: "rest" source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go" --- # `PaginatedIterator` diff --git a/fern/products/sdk-reference/go/rest/rest/rest-client/index.mdx b/fern/products/sdk-reference/go/rest/rest-client/index.mdx similarity index 97% rename from fern/products/sdk-reference/go/rest/rest/rest-client/index.mdx rename to fern/products/sdk-reference/go/rest/rest-client/index.mdx index bf37400a84..90a08ed747 100644 --- a/fern/products/sdk-reference/go/rest/rest/rest-client/index.mdx +++ b/fern/products/sdk-reference/go/rest/rest-client/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/go/rest/rest/rest-client" +slug: "/reference/go/rest/rest-client" title: "RestClient" sdk_label: "Go SDK" icon: "golang" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "go" qualified_name: "github.com/signalwire/signalwire-go/pkg/rest.RestClient" - parent: "rest.rest" - module: "rest.rest" + parent: "github.com/signalwire/signalwire-go/pkg/rest" + module: "rest" source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/rest_client.go" --- # `RestClient` diff --git a/fern/products/sdk-reference/go/rest/rest/index.mdx b/fern/products/sdk-reference/go/rest/rest/index.mdx deleted file mode 100644 index d843da72c1..0000000000 --- a/fern/products/sdk-reference/go/rest/rest/index.mdx +++ /dev/null @@ -1,38 +0,0 @@ ---- -slug: "/reference/go/rest/rest" -title: "rest" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "module" - language: "go" - qualified_name: "rest.rest" - parent: "github.com/signalwire/signalwire-go/pkg/rest" - module: "rest" ---- -# `rest` - -## Classes - - - - CrudResource provides standard List, Create, Get, Update, Delete operations against a REST collection endpoint. Update defaults to PATCH; set UpdateMethod to "PUT" to override. - - - - HttpClient is a thin wrapper around net/http that provides Basic Auth, JSON encoding/decoding, and standard headers for SignalWire API calls. - - - - PaginatedIterator walks through paginated API responses one page at a time. Each call to Next returns the items from the current page, a boolean indicating whether more pages exist, and any error encountered. - - - - RestClient is the top-level REST client for the SignalWire platform. It provides namespaced access to all SignalWire API domains. - - - - SignalWireRestError is returned when the SignalWire REST API responds with a non-2xx status code. - - diff --git a/fern/products/sdk-reference/go/rest/rest/signal-wire-rest-error/index.mdx b/fern/products/sdk-reference/go/rest/signal-wire-rest-error/index.mdx similarity index 90% rename from fern/products/sdk-reference/go/rest/rest/signal-wire-rest-error/index.mdx rename to fern/products/sdk-reference/go/rest/signal-wire-rest-error/index.mdx index 95fe3446f8..a0f483c4cb 100644 --- a/fern/products/sdk-reference/go/rest/rest/signal-wire-rest-error/index.mdx +++ b/fern/products/sdk-reference/go/rest/signal-wire-rest-error/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/go/rest/rest/signal-wire-rest-error" +slug: "/reference/go/rest/signal-wire-rest-error" title: "SignalWireRestError" sdk_label: "Go SDK" icon: "golang" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "go" qualified_name: "github.com/signalwire/signalwire-go/pkg/rest.SignalWireRestError" - parent: "rest.rest" - module: "rest.rest" + parent: "github.com/signalwire/signalwire-go/pkg/rest" + module: "rest" source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/rest/client.go" --- # `SignalWireRestError` diff --git a/fern/products/sdk-reference/java/_meta.json b/fern/products/sdk-reference/java/_meta.json index 81855778e8..ed90ba41c9 100644 --- a/fern/products/sdk-reference/java/_meta.json +++ b/fern/products/sdk-reference/java/_meta.json @@ -6,5 +6,5 @@ "format": "mdx", "platform": "fern", "base_slug": "/reference/java", - "item_count": 1944 + "item_count": 1942 } \ No newline at end of file diff --git a/fern/products/sdk-reference/java/relay/relay/action/ai-action/index.mdx b/fern/products/sdk-reference/java/relay/action/ai-action/index.mdx similarity index 91% rename from fern/products/sdk-reference/java/relay/relay/action/ai-action/index.mdx rename to fern/products/sdk-reference/java/relay/action/ai-action/index.mdx index 41410c76b1..978a2d596b 100644 --- a/fern/products/sdk-reference/java/relay/relay/action/ai-action/index.mdx +++ b/fern/products/sdk-reference/java/relay/action/ai-action/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/java/relay/relay/action/ai-action" +slug: "/reference/java/relay/action/ai-action" title: "AiAction" sdk_label: "Java SDK" icon: "java" @@ -9,7 +9,7 @@ lustri: language: "java" qualified_name: "com.signalwire.sdk.relay.Action.AiAction" parent: "relay.relay.Action" - module: "relay.relay.Action" + module: "relay.Action" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java" visibility: "public" --- @@ -27,7 +27,7 @@ public static class AiAction extends Action ## Inheritance -**Extends:** [Action](/docs/sdk-reference/reference/java/relay/relay/action) +**Extends:** [Action](/docs/sdk-reference/reference/java/relay/action) ## Methods diff --git a/fern/products/sdk-reference/java/relay/relay/action/collect-action/index.mdx b/fern/products/sdk-reference/java/relay/action/collect-action/index.mdx similarity index 91% rename from fern/products/sdk-reference/java/relay/relay/action/collect-action/index.mdx rename to fern/products/sdk-reference/java/relay/action/collect-action/index.mdx index b70412add6..b4d2ec6f1c 100644 --- a/fern/products/sdk-reference/java/relay/relay/action/collect-action/index.mdx +++ b/fern/products/sdk-reference/java/relay/action/collect-action/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/java/relay/relay/action/collect-action" +slug: "/reference/java/relay/action/collect-action" title: "CollectAction" sdk_label: "Java SDK" icon: "java" @@ -9,7 +9,7 @@ lustri: language: "java" qualified_name: "com.signalwire.sdk.relay.Action.CollectAction" parent: "relay.relay.Action" - module: "relay.relay.Action" + module: "relay.Action" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java" visibility: "public" --- @@ -27,7 +27,7 @@ public static class CollectAction extends Action ## Inheritance -**Extends:** [Action](/docs/sdk-reference/reference/java/relay/relay/action) +**Extends:** [Action](/docs/sdk-reference/reference/java/relay/action) ## Methods diff --git a/fern/products/sdk-reference/java/relay/relay/action/detect-action/index.mdx b/fern/products/sdk-reference/java/relay/action/detect-action/index.mdx similarity index 89% rename from fern/products/sdk-reference/java/relay/relay/action/detect-action/index.mdx rename to fern/products/sdk-reference/java/relay/action/detect-action/index.mdx index d89e9ee77a..1e301ba589 100644 --- a/fern/products/sdk-reference/java/relay/relay/action/detect-action/index.mdx +++ b/fern/products/sdk-reference/java/relay/action/detect-action/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/java/relay/relay/action/detect-action" +slug: "/reference/java/relay/action/detect-action" title: "DetectAction" sdk_label: "Java SDK" icon: "java" @@ -9,7 +9,7 @@ lustri: language: "java" qualified_name: "com.signalwire.sdk.relay.Action.DetectAction" parent: "relay.relay.Action" - module: "relay.relay.Action" + module: "relay.Action" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java" visibility: "public" --- @@ -27,7 +27,7 @@ public static class DetectAction extends Action ## Inheritance -**Extends:** [Action](/docs/sdk-reference/reference/java/relay/relay/action) +**Extends:** [Action](/docs/sdk-reference/reference/java/relay/action) ## Methods diff --git a/fern/products/sdk-reference/java/relay/relay/action/index.mdx b/fern/products/sdk-reference/java/relay/action/index.mdx similarity index 98% rename from fern/products/sdk-reference/java/relay/relay/action/index.mdx rename to fern/products/sdk-reference/java/relay/action/index.mdx index 5e356bcb5b..5086ffc025 100644 --- a/fern/products/sdk-reference/java/relay/relay/action/index.mdx +++ b/fern/products/sdk-reference/java/relay/action/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/java/relay/relay/action" +slug: "/reference/java/relay/action" title: "Action" sdk_label: "Java SDK" icon: "java" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.relay.Action" - parent: "relay.relay" - module: "relay.relay" + parent: "com.signalwire.sdk.relay" + module: "relay" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java" visibility: "public" --- diff --git a/fern/products/sdk-reference/java/relay/relay/action/index__2.mdx b/fern/products/sdk-reference/java/relay/action/index__2.mdx similarity index 75% rename from fern/products/sdk-reference/java/relay/relay/action/index__2.mdx rename to fern/products/sdk-reference/java/relay/action/index__2.mdx index 4d96f50599..a774ab18e2 100644 --- a/fern/products/sdk-reference/java/relay/relay/action/index__2.mdx +++ b/fern/products/sdk-reference/java/relay/action/index__2.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/java/relay/relay/action/index__2" +slug: "/reference/java/relay/action/index__2" title: "Action" sdk_label: "Java SDK" icon: "java" @@ -8,59 +8,59 @@ lustri: kind: "module" language: "java" qualified_name: "relay.relay.Action" - parent: "relay.relay" - module: "relay.relay" + parent: "com.signalwire.sdk.relay" + module: "relay" --- # `Action` ## Classes - + AI action with stop sub-command. - + Collect action with stop and start\_input\_timers sub-commands. - + Detect action with stop sub-command. - + Pay action with stop sub-command. - + Play action with pause, resume, volume, and stop sub-commands. - + Play-and-collect action. <p> Shares one `control_id` across both play and collect phases. Events arrive as BOTH `calling.call.play` and `calling.call.collect`. This action only resolves on collect events, NOT play events. - + Receive fax action with stop sub-command. - + Record action with pause, resume, and stop sub-commands. - + Send fax action with stop sub-command. - + Stream action with stop sub-command. - + Tap action with stop sub-command. - + Transcribe action with stop sub-command. diff --git a/fern/products/sdk-reference/java/relay/relay/action/pay-action/index.mdx b/fern/products/sdk-reference/java/relay/action/pay-action/index.mdx similarity index 89% rename from fern/products/sdk-reference/java/relay/relay/action/pay-action/index.mdx rename to fern/products/sdk-reference/java/relay/action/pay-action/index.mdx index b7d46c9ff5..beeffdc94d 100644 --- a/fern/products/sdk-reference/java/relay/relay/action/pay-action/index.mdx +++ b/fern/products/sdk-reference/java/relay/action/pay-action/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/java/relay/relay/action/pay-action" +slug: "/reference/java/relay/action/pay-action" title: "PayAction" sdk_label: "Java SDK" icon: "java" @@ -9,7 +9,7 @@ lustri: language: "java" qualified_name: "com.signalwire.sdk.relay.Action.PayAction" parent: "relay.relay.Action" - module: "relay.relay.Action" + module: "relay.Action" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java" visibility: "public" --- @@ -27,7 +27,7 @@ public static class PayAction extends Action ## Inheritance -**Extends:** [Action](/docs/sdk-reference/reference/java/relay/relay/action) +**Extends:** [Action](/docs/sdk-reference/reference/java/relay/action) ## Methods diff --git a/fern/products/sdk-reference/java/relay/relay/action/play-action/index.mdx b/fern/products/sdk-reference/java/relay/action/play-action/index.mdx similarity index 93% rename from fern/products/sdk-reference/java/relay/relay/action/play-action/index.mdx rename to fern/products/sdk-reference/java/relay/action/play-action/index.mdx index 97fe0228fd..6f42b40e9e 100644 --- a/fern/products/sdk-reference/java/relay/relay/action/play-action/index.mdx +++ b/fern/products/sdk-reference/java/relay/action/play-action/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/java/relay/relay/action/play-action" +slug: "/reference/java/relay/action/play-action" title: "PlayAction" sdk_label: "Java SDK" icon: "java" @@ -9,7 +9,7 @@ lustri: language: "java" qualified_name: "com.signalwire.sdk.relay.Action.PlayAction" parent: "relay.relay.Action" - module: "relay.relay.Action" + module: "relay.Action" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java" visibility: "public" --- @@ -27,7 +27,7 @@ public static class PlayAction extends Action ## Inheritance -**Extends:** [Action](/docs/sdk-reference/reference/java/relay/relay/action) +**Extends:** [Action](/docs/sdk-reference/reference/java/relay/action) ## Methods diff --git a/fern/products/sdk-reference/java/relay/relay/action/play-and-collect-action/index.mdx b/fern/products/sdk-reference/java/relay/action/play-and-collect-action/index.mdx similarity index 91% rename from fern/products/sdk-reference/java/relay/relay/action/play-and-collect-action/index.mdx rename to fern/products/sdk-reference/java/relay/action/play-and-collect-action/index.mdx index 55af03ed80..8320fe0f64 100644 --- a/fern/products/sdk-reference/java/relay/relay/action/play-and-collect-action/index.mdx +++ b/fern/products/sdk-reference/java/relay/action/play-and-collect-action/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/java/relay/relay/action/play-and-collect-action" +slug: "/reference/java/relay/action/play-and-collect-action" title: "PlayAndCollectAction" sdk_label: "Java SDK" icon: "java" @@ -9,7 +9,7 @@ lustri: language: "java" qualified_name: "com.signalwire.sdk.relay.Action.PlayAndCollectAction" parent: "relay.relay.Action" - module: "relay.relay.Action" + module: "relay.Action" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java" visibility: "public" --- @@ -32,7 +32,7 @@ public static class PlayAndCollectAction extends Action ## Inheritance -**Extends:** [Action](/docs/sdk-reference/reference/java/relay/relay/action) +**Extends:** [Action](/docs/sdk-reference/reference/java/relay/action) ## Methods diff --git a/fern/products/sdk-reference/java/relay/relay/action/receive-fax-action/index.mdx b/fern/products/sdk-reference/java/relay/action/receive-fax-action/index.mdx similarity index 89% rename from fern/products/sdk-reference/java/relay/relay/action/receive-fax-action/index.mdx rename to fern/products/sdk-reference/java/relay/action/receive-fax-action/index.mdx index 11ddd99fb6..be19b15b79 100644 --- a/fern/products/sdk-reference/java/relay/relay/action/receive-fax-action/index.mdx +++ b/fern/products/sdk-reference/java/relay/action/receive-fax-action/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/java/relay/relay/action/receive-fax-action" +slug: "/reference/java/relay/action/receive-fax-action" title: "ReceiveFaxAction" sdk_label: "Java SDK" icon: "java" @@ -9,7 +9,7 @@ lustri: language: "java" qualified_name: "com.signalwire.sdk.relay.Action.ReceiveFaxAction" parent: "relay.relay.Action" - module: "relay.relay.Action" + module: "relay.Action" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java" visibility: "public" --- @@ -27,7 +27,7 @@ public static class ReceiveFaxAction extends Action ## Inheritance -**Extends:** [Action](/docs/sdk-reference/reference/java/relay/relay/action) +**Extends:** [Action](/docs/sdk-reference/reference/java/relay/action) ## Methods diff --git a/fern/products/sdk-reference/java/relay/relay/action/record-action/index.mdx b/fern/products/sdk-reference/java/relay/action/record-action/index.mdx similarity index 93% rename from fern/products/sdk-reference/java/relay/relay/action/record-action/index.mdx rename to fern/products/sdk-reference/java/relay/action/record-action/index.mdx index a6f2a3c998..ef213708c4 100644 --- a/fern/products/sdk-reference/java/relay/relay/action/record-action/index.mdx +++ b/fern/products/sdk-reference/java/relay/action/record-action/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/java/relay/relay/action/record-action" +slug: "/reference/java/relay/action/record-action" title: "RecordAction" sdk_label: "Java SDK" icon: "java" @@ -9,7 +9,7 @@ lustri: language: "java" qualified_name: "com.signalwire.sdk.relay.Action.RecordAction" parent: "relay.relay.Action" - module: "relay.relay.Action" + module: "relay.Action" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java" visibility: "public" --- @@ -27,7 +27,7 @@ public static class RecordAction extends Action ## Inheritance -**Extends:** [Action](/docs/sdk-reference/reference/java/relay/relay/action) +**Extends:** [Action](/docs/sdk-reference/reference/java/relay/action) ## Methods diff --git a/fern/products/sdk-reference/java/relay/relay/action/send-fax-action/index.mdx b/fern/products/sdk-reference/java/relay/action/send-fax-action/index.mdx similarity index 89% rename from fern/products/sdk-reference/java/relay/relay/action/send-fax-action/index.mdx rename to fern/products/sdk-reference/java/relay/action/send-fax-action/index.mdx index cd7255a475..ad8910a64c 100644 --- a/fern/products/sdk-reference/java/relay/relay/action/send-fax-action/index.mdx +++ b/fern/products/sdk-reference/java/relay/action/send-fax-action/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/java/relay/relay/action/send-fax-action" +slug: "/reference/java/relay/action/send-fax-action" title: "SendFaxAction" sdk_label: "Java SDK" icon: "java" @@ -9,7 +9,7 @@ lustri: language: "java" qualified_name: "com.signalwire.sdk.relay.Action.SendFaxAction" parent: "relay.relay.Action" - module: "relay.relay.Action" + module: "relay.Action" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java" visibility: "public" --- @@ -27,7 +27,7 @@ public static class SendFaxAction extends Action ## Inheritance -**Extends:** [Action](/docs/sdk-reference/reference/java/relay/relay/action) +**Extends:** [Action](/docs/sdk-reference/reference/java/relay/action) ## Methods diff --git a/fern/products/sdk-reference/java/relay/relay/action/stream-action/index.mdx b/fern/products/sdk-reference/java/relay/action/stream-action/index.mdx similarity index 91% rename from fern/products/sdk-reference/java/relay/relay/action/stream-action/index.mdx rename to fern/products/sdk-reference/java/relay/action/stream-action/index.mdx index ce9de7b3fe..e4a35bdf29 100644 --- a/fern/products/sdk-reference/java/relay/relay/action/stream-action/index.mdx +++ b/fern/products/sdk-reference/java/relay/action/stream-action/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/java/relay/relay/action/stream-action" +slug: "/reference/java/relay/action/stream-action" title: "StreamAction" sdk_label: "Java SDK" icon: "java" @@ -9,7 +9,7 @@ lustri: language: "java" qualified_name: "com.signalwire.sdk.relay.Action.StreamAction" parent: "relay.relay.Action" - module: "relay.relay.Action" + module: "relay.Action" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java" visibility: "public" --- @@ -27,7 +27,7 @@ public static class StreamAction extends Action ## Inheritance -**Extends:** [Action](/docs/sdk-reference/reference/java/relay/relay/action) +**Extends:** [Action](/docs/sdk-reference/reference/java/relay/action) ## Methods diff --git a/fern/products/sdk-reference/java/relay/relay/action/tap-action/index.mdx b/fern/products/sdk-reference/java/relay/action/tap-action/index.mdx similarity index 91% rename from fern/products/sdk-reference/java/relay/relay/action/tap-action/index.mdx rename to fern/products/sdk-reference/java/relay/action/tap-action/index.mdx index c96161912c..e4005b3de9 100644 --- a/fern/products/sdk-reference/java/relay/relay/action/tap-action/index.mdx +++ b/fern/products/sdk-reference/java/relay/action/tap-action/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/java/relay/relay/action/tap-action" +slug: "/reference/java/relay/action/tap-action" title: "TapAction" sdk_label: "Java SDK" icon: "java" @@ -9,7 +9,7 @@ lustri: language: "java" qualified_name: "com.signalwire.sdk.relay.Action.TapAction" parent: "relay.relay.Action" - module: "relay.relay.Action" + module: "relay.Action" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java" visibility: "public" --- @@ -27,7 +27,7 @@ public static class TapAction extends Action ## Inheritance -**Extends:** [Action](/docs/sdk-reference/reference/java/relay/relay/action) +**Extends:** [Action](/docs/sdk-reference/reference/java/relay/action) ## Methods diff --git a/fern/products/sdk-reference/java/relay/relay/action/transcribe-action/index.mdx b/fern/products/sdk-reference/java/relay/action/transcribe-action/index.mdx similarity index 91% rename from fern/products/sdk-reference/java/relay/relay/action/transcribe-action/index.mdx rename to fern/products/sdk-reference/java/relay/action/transcribe-action/index.mdx index 7e81716443..e92d3f05fe 100644 --- a/fern/products/sdk-reference/java/relay/relay/action/transcribe-action/index.mdx +++ b/fern/products/sdk-reference/java/relay/action/transcribe-action/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/java/relay/relay/action/transcribe-action" +slug: "/reference/java/relay/action/transcribe-action" title: "TranscribeAction" sdk_label: "Java SDK" icon: "java" @@ -9,7 +9,7 @@ lustri: language: "java" qualified_name: "com.signalwire.sdk.relay.Action.TranscribeAction" parent: "relay.relay.Action" - module: "relay.relay.Action" + module: "relay.Action" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java" visibility: "public" --- @@ -27,7 +27,7 @@ public static class TranscribeAction extends Action ## Inheritance -**Extends:** [Action](/docs/sdk-reference/reference/java/relay/relay/action) +**Extends:** [Action](/docs/sdk-reference/reference/java/relay/action) ## Methods diff --git a/fern/products/sdk-reference/java/relay/relay/call/index.mdx b/fern/products/sdk-reference/java/relay/call/index.mdx similarity index 99% rename from fern/products/sdk-reference/java/relay/relay/call/index.mdx rename to fern/products/sdk-reference/java/relay/call/index.mdx index 8203072606..1ad6e236d5 100644 --- a/fern/products/sdk-reference/java/relay/relay/call/index.mdx +++ b/fern/products/sdk-reference/java/relay/call/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/java/relay/relay/call" +slug: "/reference/java/relay/call" title: "Call" sdk_label: "Java SDK" icon: "java" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.relay.Call" - parent: "relay.relay" - module: "relay.relay" + parent: "com.signalwire.sdk.relay" + module: "relay" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Call.java" visibility: "public" --- diff --git a/fern/products/sdk-reference/java/relay/relay/constants/index.mdx b/fern/products/sdk-reference/java/relay/constants/index.mdx similarity index 99% rename from fern/products/sdk-reference/java/relay/relay/constants/index.mdx rename to fern/products/sdk-reference/java/relay/constants/index.mdx index cf23c0dd98..cb0144e617 100644 --- a/fern/products/sdk-reference/java/relay/relay/constants/index.mdx +++ b/fern/products/sdk-reference/java/relay/constants/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/java/relay/relay/constants" +slug: "/reference/java/relay/constants" title: "Constants" sdk_label: "Java SDK" icon: "java" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.relay.Constants" - parent: "relay.relay" - module: "relay.relay" + parent: "com.signalwire.sdk.relay" + module: "relay" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Constants.java" visibility: "public" --- diff --git a/fern/products/sdk-reference/java/relay/relay/device/index.mdx b/fern/products/sdk-reference/java/relay/device/index.mdx similarity index 98% rename from fern/products/sdk-reference/java/relay/relay/device/index.mdx rename to fern/products/sdk-reference/java/relay/device/index.mdx index 848bff387a..cebb212131 100644 --- a/fern/products/sdk-reference/java/relay/relay/device/index.mdx +++ b/fern/products/sdk-reference/java/relay/device/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/java/relay/relay/device" +slug: "/reference/java/relay/device" title: "Device" sdk_label: "Java SDK" icon: "java" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.relay.Device" - parent: "relay.relay" - module: "relay.relay" + parent: "com.signalwire.sdk.relay" + module: "relay" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Device.java" visibility: "public" --- diff --git a/fern/products/sdk-reference/java/relay/index.mdx b/fern/products/sdk-reference/java/relay/index.mdx index 9a96c32530..3a2adbb220 100644 --- a/fern/products/sdk-reference/java/relay/index.mdx +++ b/fern/products/sdk-reference/java/relay/index.mdx @@ -17,8 +17,697 @@ lustri: package com.signalwire.sdk.relay ``` +## Classes + + + + Base class for long-running call actions tracked by `control_id`. <p> Actions support three completion patterns: <ol> <li><b>Wait inline</b>: `action.waitForCompletion()` blocks until terminal</li> <li><b>Fire and forget</b>: don't wait, check `isDone()` later</li> <li><b>Callback</b>: pass an `onCompleted` callback that fires on terminal state</li> </ol> <p> Subclasses add action-specific sub-commands (pause, resume, volume, etc.). + + + + Represents a RELAY call with 30+ methods organized by category. <p> Methods are grouped into: <ul> <li><b>Simple fire-and-response</b>: answer, hangup, pass, hold, etc.</li> <li><b>Action-based</b>: play, record, detect, collect, etc. + + + + Constants for the SignalWire RELAY protocol. <p> Includes call states, end reasons, message states, event types, and action terminal states used throughout the RELAY client. + + + + A typed view of the RELAY params\} device object that recurs as a raw Object> across `Call#connect`, `Call#refer`, `RelayClient#dial` and `Call#tap`. <p>The wire shape is fixed (extracted from switchblade's `PublicCallConnectParams` / `PublicCallDialParams` / `PublicCallReferParams` / `PublicCallTapParams`, mirrored in `porting-sdk/relay-protocol/calling.*.params.json`): every device is an object with a required string `type` discriminant and a `params` sub-object whose shape depends on the type (a `phone` carries `to_number`/`from_number`, a `sip` carries `to`/ `headers`, etc.). + + + + Represents an SMS/MMS message with state tracking. <p> Messages are simpler than calls: they have a `message_id`, progress through states (queued, initiated, sent, delivered), and support completion waiting. <p> State progression: <ul> <li>Success: queued -> initiated -> sent -> delivered</li> <li>Failure: queued -> initiated -> failed/undelivered</li> </ul> Terminal states: delivered, undelivered, failed + + + + RELAY WebSocket connection manager. <p> Manages WebSocket connections to the SignalWire RELAY service using JSON-RPC 2.0. Implements the four correlation mechanisms: <ol> <li>JSON-RPC id -> CompletableFuture for RPC response matching</li> <li>call\_id -> Call for event routing</li> <li>control\_id -> Action per Call for action event routing</li> <li>tag -> CompletableFuture\ for dial correlation</li> </ol> <p> Also handles: <ul> <li>Event ACK for every `signalwire.event`</li> <li>Ping/pong for `signalwire.ping`</li> <li>Exponential backoff reconnection</li> <li>Authorization state for fast reconnection</li> <li>Server-initiated disconnect with restart flag</li> <li>Dynamic context subscription via receive/unreceive</li> <li>Message tracking by message\_id</li> </ul> <pre>client = RelayClient.builder() .project("project-id") .token("api-token") .space("example.signalwire.com") .contexts(List.of("default")) .build(); client.onCall(call -> \{ call.answer(); var action = call.play(List.of(Map.of("type", "tts", "params", Map.of("text", "Hello!")))); action.waitForCompletion(); call.hangup();); client.run(); \}</pre> + + + + Runtime exception for RELAY-level failures (dial timeout, dial failed, connect rejected, etc.). + + + + Base class for all RELAY events. <p> Events arrive as `signalwire.event` messages with nested params: <pre> \{ "params": \{ "event\_type": "calling.call.play", "timestamp": 123457.1234, "params": \{ "call\_id": "...", "control\_id": "...", "state": "finished" \} \} \} </pre> Subclasses provide typed access to specific event payloads. + + + ## Modules - + + + + + + +## Enums + +### CallState + +The lifecycle state of a RELAY `Call`, as a typed, compile-time-checked +closed set. + +<p>The RELAY server pushes the current call state as a bare string on every +`calling.call.state` event (`created` → `ringing` → +`answered` → `ending` → `ended`). + +This enum mirrors the +five values the Python reference declares in +`signalwire/relay/constants.py` as `CALL_STATE_*` +(`Constants#CALL_STATE_CREATED` … `Constants#CALL_STATE_ENDED`). + +<p>It is exposed <em>alongside</em> the existing string getter, never instead +of it: `Call#getState()` keeps returning the raw wire string (parity +with Python, forward-compatible with any value the server later adds), while +`Call#getCallState()` returns `Optional<CallState>` for callers +who want a typed, switch-exhaustive handle and a `#isTerminal()` +predicate. + +<pre>raw = call.getState(); // "answered" (always present, parity) +Optional<CallState> typed = call.getCallState(); +if (typed.map(CallState::isTerminal).orElse(false)) { + // call has reached ENDED +}</pre> + +<p><strong>Server-emitted, growable.</strong> These values mirror what the +server sends and the set can grow in a future protocol revision. So +`#fromWire(String)` returns `null` (and `Call#getCallState()` +`Optional.empty()`) for an unrecognised value rather than throwing — +an unknown state must never crash event dispatch. This is the Java analog of +Rust's `#[non_exhaustive]` + a fallible `from_str`. + +<p><strong>This is a DISTINCT vocabulary from `DialState` and +`MessageState`.</strong> A `Call`'s lifecycle state +(`created/ringing/answered/ending/ended`) is not the dial <em>outcome</em> +(`dialing/answered/failed`) and not a message delivery state +(`queued/…/delivered`). The three are modelled as three separate enums +and are never conflated — mirroring the three separate `*_STATE_*` +blocks in the Python reference's `constants.py`. + +#### Signature + +```java +public enum CallState +``` + +#### Variants + + + The call has been answered and media is flowing. + + + + The call object has been created but no leg is ringing yet. + + + + Terminal: the call has ended. + + + + The call is in the process of tearing down. + + + + The call is ringing (alerting). + + +#### Methods + +##### fromWire + +Parse a wire string into a `CallState`, or return `null` if +it is not one of the five recognised states. + +Because the set mirrors +server-emitted values that may grow, an unknown string is tolerated +(returns `null`) rather than rejected with an exception — the Java +analog of a fallible `from_str` over a `#[non_exhaustive]` +enum. + +**Modifiers:** `static` + +###### Signature + +```java +public static CallState fromWire(String wire) +``` + +###### Parameters + + + the candidate wire string (case-sensitive), may be `null`. + + +###### Returns + +`CallState` — the matching constant, or `null` if none matches. + +###### Source + +[`src/main/java/com/signalwire/sdk/relay/CallState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/CallState.java) + +Line 106. + +*** + +##### getValue + +The canonical wire string for this state (`"created"` / +`"ringing"` / `"answered"` / `"ending"` / +`"ended"`) — exactly the value the server sends on +`calling.call.state`. + +Equivalent to PHP's backed-enum +`->value`. + +###### Signature + +```java +public String getValue() +``` + +###### Returns + +`String` — the lower-case state name as it appears on the wire. + +###### Source + +[`src/main/java/com/signalwire/sdk/relay/CallState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/CallState.java) + +Line 78. + +*** + +##### isTerminal + +Whether this is a <em>terminal</em> state — i.e. + +the call has reached +the end of its lifecycle and will not transition further. Only +`#ENDED` is terminal (matching `Call#isEnded()` and the +reference's `CALL_STATE_ENDED` terminal check); `#ENDING` is <em>not</em> terminal because an `ended` event still follows. + +###### Signature + +```java +public boolean isTerminal() +``` + +###### Returns + +`boolean` — `true` iff this state is `#ENDED`. + +###### Source + +[`src/main/java/com/signalwire/sdk/relay/CallState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/CallState.java) + +Line 91. + +*** + +##### valueOf + +**Modifiers:** `static` + +###### Signature + +```java +public static CallState valueOf(String name) +``` + +###### Parameters + + + +###### Returns + +`CallState` + +###### Source + +[`src/main/java/com/signalwire/sdk/relay/CallState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/CallState.java) + +*** + +##### values + +**Modifiers:** `static` + +###### Signature + +```java +public static CallState[] values() +``` + +###### Returns + +`CallState[]` + +###### Source + +[`src/main/java/com/signalwire/sdk/relay/CallState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/CallState.java) + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/CallState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/CallState.java) + +Line 50. + +*** + +### DialState + +The outcome state of an outbound `calling.dial`, as a typed, +compile-time-checked closed set. + +<p>A dial progresses `dialing` → `answered` (a leg won) or +`dialing` → `failed` (every leg gave up). + +The RELAY server reports +it as the bare `dial_state` field on each `calling.call.dial` +event. This enum mirrors the three values the Java port declares in +`Constants` as `DIAL_STATE_*` +(`Constants#DIAL_STATE_DIALING` / `Constants#DIAL_STATE_ANSWERED` +/ `Constants#DIAL_STATE_FAILED`), which back the dial-completion logic +in `RelayClient.handleDialEvent`. + +<p>It is exposed <em>alongside</em> the existing string getter, never instead +of it: `RelayEvent.CallDialEvent#getDialState()` keeps returning the raw +wire string (parity with Python, forward-compatible), while +`RelayEvent.CallDialEvent#getDialStateEnum()` returns +`Optional<DialState>` for callers who want a typed handle and an +`#isTerminal()` predicate. + +<p><strong>Terminal semantics.</strong> Unlike `CallState` (where only +`ended` is terminal), <em>both</em> `#ANSWERED` and `#FAILED` +are terminal dial outcomes — each resolves the pending dial (one completes the +`CompletableFuture<Call>`, the other fails it). Only `#DIALING` is +non-terminal. So "terminal" here means "the dial has a final outcome", +matching the `answered`/`failed` branches that resolve the dial in +`RelayClient`. + +<pre>// "answered" (always present, parity) +event.getDialStateEnum() + .filter(DialState::isTerminal) // ANSWERED or FAILED + .ifPresent(s -> ...);</pre> + +<p><strong>Server-emitted, growable</strong> — `#fromWire(String)` +returns `null` for an unrecognised value rather than throwing (the Java +analog of Rust's `#[non_exhaustive]` + fallible `from_str`); an +unknown dial state must never crash event dispatch. + +<p><strong>This is a DISTINCT vocabulary from `CallState` and +`MessageState`.</strong> A dial outcome (`dialing/answered/failed`) +is not a call lifecycle state and not a message delivery state. Note in +particular `answered` appears in <em>both</em> `DialState` and +`CallState` but means different things (the dial won vs. the call leg is +up) — the two enums are never shared. + +#### Signature + +```java +public enum DialState +``` + +#### Variants + + + Terminal: a leg answered and the dial resolved to a `Call`. + + + + The dial is in progress; legs are ringing. Non-terminal. + + + + Terminal: every leg failed and the dial did not connect. + + +#### Methods + +##### fromWire + +Parse a wire string into a `DialState`, or return `null` if +it is not one of the three recognised dial states. + +Because the set +mirrors server-emitted values that may grow, an unknown string is +tolerated (returns `null`) rather than rejected with an exception. + +**Modifiers:** `static` + +###### Signature + +```java +public static DialState fromWire(String wire) +``` + +###### Parameters + + + the candidate wire string (case-sensitive), may be `null`. + + +###### Returns + +`DialState` — the matching constant, or `null` if none matches. + +###### Source + +[`src/main/java/com/signalwire/sdk/relay/DialState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/DialState.java) + +Line 104. + +*** + +##### getValue + +The canonical wire string for this dial outcome (`"dialing"` / +`"answered"` / `"failed"`) — exactly the `dial_state` +value the server sends on `calling.call.dial`. + +Equivalent to PHP's +backed-enum `->value`. + +###### Signature + +```java +public String getValue() +``` + +###### Returns + +`String` — the lower-case dial-state name as it appears on the wire. + +###### Source + +[`src/main/java/com/signalwire/sdk/relay/DialState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/DialState.java) + +Line 79. + +*** + +##### isTerminal + +Whether this is a <em>terminal</em> dial outcome — i.e. + +the dial has a +final result and will not transition further. Both `#ANSWERED` and +`#FAILED` are terminal (each resolves the pending dial); only +`#DIALING` is non-terminal. + +###### Signature + +```java +public boolean isTerminal() +``` + +###### Returns + +`boolean` — `true` iff this state is `#ANSWERED` or `#FAILED`. + +###### Source + +[`src/main/java/com/signalwire/sdk/relay/DialState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/DialState.java) + +Line 91. + +*** + +##### valueOf + +**Modifiers:** `static` + +###### Signature + +```java +public static DialState valueOf(String name) +``` + +###### Parameters + + + +###### Returns + +`DialState` + +###### Source + +[`src/main/java/com/signalwire/sdk/relay/DialState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/DialState.java) + +*** + +##### values + +**Modifiers:** `static` + +###### Signature + +```java +public static DialState[] values() +``` + +###### Returns + +`DialState[]` + +###### Source + +[`src/main/java/com/signalwire/sdk/relay/DialState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/DialState.java) + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/DialState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/DialState.java) + +Line 56. + +*** + +### MessageState + +The delivery state of a RELAY `Message`, as a typed, +compile-time-checked closed set. + +<p>An outbound message progresses `queued` → `initiated` → +`sent` → `delivered` (success) or → `undelivered` / +`failed` (failure); an inbound message arrives as `received`. + +The +RELAY server reports the state as the bare `message_state` field on +`messaging.state` (outbound) and `messaging.receive` (inbound) +events. This enum mirrors the seven values the Python reference declares in +`signalwire/relay/constants.py` as `MESSAGE_STATE_*` +(`Constants#MESSAGE_STATE_QUEUED` … `Constants#MESSAGE_STATE_RECEIVED`). +The `messaging.state` wire schema enumerates the six outbound values; +`received` is the inbound-only seventh. + +<p>It is exposed <em>alongside</em> the existing string getter, never instead +of it: `Message#getState()` keeps returning the raw wire string (parity +with Python, forward-compatible), while `Message#getMessageState()` +returns `Optional<MessageState>` for callers who want a typed handle and +an `#isTerminal()` predicate. + +<pre>raw = msg.getState(); // "delivered" (always present, parity) +msg.getMessageState() + .filter(MessageState::isTerminal) // DELIVERED / UNDELIVERED / FAILED + .ifPresent(s -> ...);</pre> + +<p><strong>Terminal semantics.</strong> The terminal set is +`#DELIVERED`, `#UNDELIVERED`, `#FAILED` — exactly the +reference's `MESSAGE_TERMINAL_STATES` and the set +`Constants#isTerminalMessageState(String)` checks (the state at which +`Message` resolves its completion future). `received` is NOT +terminal: it is an inbound arrival, not the end of an outbound delivery +lifecycle. + +<p><strong>Server-emitted, growable</strong> — `#fromWire(String)` +returns `null` for an unrecognised value rather than throwing (the Java +analog of Rust's `#[non_exhaustive]` + fallible `from_str`); an +unknown message state must never crash event dispatch. + +<p><strong>This is a DISTINCT vocabulary from `CallState` and +`DialState`.</strong> A message delivery state is neither a call +lifecycle state nor a dial outcome; the three enums are never conflated. + +#### Signature + +```java +public enum MessageState +``` + +#### Variants + + + Terminal: the message was delivered. + + + + Terminal: the send failed. + + + + Sending has been initiated. + + + + The message is queued for sending. + + + + An inbound message was received (inbound-only; not a terminal delivery state). + + + + The message has left for the carrier. + + + + Terminal: the carrier reported non-delivery. + + +#### Methods + +##### fromWire + +Parse a wire string into a `MessageState`, or return `null` +if it is not one of the seven recognised states. + +Because the set mirrors +server-emitted values that may grow, an unknown string is tolerated +(returns `null`) rather than rejected with an exception. + +**Modifiers:** `static` + +###### Signature + +```java +public static MessageState fromWire(String wire) +``` + +###### Parameters + + + the candidate wire string (case-sensitive), may be `null`. + + +###### Returns + +`MessageState` — the matching constant, or `null` if none matches. + +###### Source + +[`src/main/java/com/signalwire/sdk/relay/MessageState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/MessageState.java) + +Line 114. + +*** + +##### getValue + +The canonical wire string for this state (`"queued"` / +`"initiated"` / `"sent"` / `"delivered"` / +`"undelivered"` / `"failed"` / `"received"`) — exactly +the `message_state` value the server sends. + +Equivalent to PHP's +backed-enum `->value`. + +###### Signature + +```java +public String getValue() +``` + +###### Returns + +`String` — the lower-case state name as it appears on the wire. + +###### Source + +[`src/main/java/com/signalwire/sdk/relay/MessageState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/MessageState.java) + +Line 86. + +*** + +##### isTerminal + +Whether this is a <em>terminal</em> delivery state — i.e. + +the outbound +message has a final delivery outcome and will not transition further. The +terminal set is `#DELIVERED`, `#UNDELIVERED`, `#FAILED` +(matching the reference's `MESSAGE_TERMINAL_STATES` and +`Constants#isTerminalMessageState(String)`). `#RECEIVED` is +NOT terminal (it is an inbound arrival, not an outbound completion). + +###### Signature + +```java +public boolean isTerminal() +``` + +###### Returns + +`boolean` — `true` iff this state is `#DELIVERED`, `#UNDELIVERED`, or `#FAILED`. + +###### Source + +[`src/main/java/com/signalwire/sdk/relay/MessageState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/MessageState.java) + +Line 101. + +*** + +##### valueOf + +**Modifiers:** `static` + +###### Signature + +```java +public static MessageState valueOf(String name) +``` + +###### Parameters + + + +###### Returns + +`MessageState` + +###### Source + +[`src/main/java/com/signalwire/sdk/relay/MessageState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/MessageState.java) + +*** + +##### values + +**Modifiers:** `static` + +###### Signature + +```java +public static MessageState[] values() +``` + +###### Returns + +`MessageState[]` + +###### Source + +[`src/main/java/com/signalwire/sdk/relay/MessageState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/MessageState.java) + +#### Source + +[`src/main/java/com/signalwire/sdk/relay/MessageState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/MessageState.java) + +Line 54. diff --git a/fern/products/sdk-reference/java/relay/relay/message/index.mdx b/fern/products/sdk-reference/java/relay/message/index.mdx similarity index 99% rename from fern/products/sdk-reference/java/relay/relay/message/index.mdx rename to fern/products/sdk-reference/java/relay/message/index.mdx index 8a059e0f5d..51e2ea67e5 100644 --- a/fern/products/sdk-reference/java/relay/relay/message/index.mdx +++ b/fern/products/sdk-reference/java/relay/message/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/java/relay/relay/message" +slug: "/reference/java/relay/message" title: "Message" sdk_label: "Java SDK" icon: "java" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.relay.Message" - parent: "relay.relay" - module: "relay.relay" + parent: "com.signalwire.sdk.relay" + module: "relay" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Message.java" visibility: "public" --- diff --git a/fern/products/sdk-reference/java/relay/relay/relay-client/builder/index.mdx b/fern/products/sdk-reference/java/relay/relay-client/builder/index.mdx similarity index 97% rename from fern/products/sdk-reference/java/relay/relay/relay-client/builder/index.mdx rename to fern/products/sdk-reference/java/relay/relay-client/builder/index.mdx index 64e127ce83..f6b57aa2ed 100644 --- a/fern/products/sdk-reference/java/relay/relay/relay-client/builder/index.mdx +++ b/fern/products/sdk-reference/java/relay/relay-client/builder/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/java/relay/relay/relay-client/builder" +slug: "/reference/java/relay/relay-client/builder" title: "Builder" sdk_label: "Java SDK" icon: "java" @@ -9,7 +9,7 @@ lustri: language: "java" qualified_name: "com.signalwire.sdk.relay.RelayClient.Builder" parent: "relay.relay.RelayClient" - module: "relay.relay.RelayClient" + module: "relay.RelayClient" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java" visibility: "public" --- diff --git a/fern/products/sdk-reference/java/relay/relay/relay-client/index.mdx b/fern/products/sdk-reference/java/relay/relay-client/index.mdx similarity index 99% rename from fern/products/sdk-reference/java/relay/relay/relay-client/index.mdx rename to fern/products/sdk-reference/java/relay/relay-client/index.mdx index c613800c7d..9f1c4b2f17 100644 --- a/fern/products/sdk-reference/java/relay/relay/relay-client/index.mdx +++ b/fern/products/sdk-reference/java/relay/relay-client/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/java/relay/relay/relay-client" +slug: "/reference/java/relay/relay-client" title: "RelayClient" sdk_label: "Java SDK" icon: "java" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.relay.RelayClient" - parent: "relay.relay" - module: "relay.relay" + parent: "com.signalwire.sdk.relay" + module: "relay" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java" visibility: "public" --- diff --git a/fern/products/sdk-reference/java/relay/relay/relay-client/index__2.mdx b/fern/products/sdk-reference/java/relay/relay-client/index__2.mdx similarity index 67% rename from fern/products/sdk-reference/java/relay/relay/relay-client/index__2.mdx rename to fern/products/sdk-reference/java/relay/relay-client/index__2.mdx index f665b20ca4..1dc23bb095 100644 --- a/fern/products/sdk-reference/java/relay/relay/relay-client/index__2.mdx +++ b/fern/products/sdk-reference/java/relay/relay-client/index__2.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/java/relay/relay/relay-client/index__2" +slug: "/reference/java/relay/relay-client/index__2" title: "RelayClient" sdk_label: "Java SDK" icon: "java" @@ -8,13 +8,13 @@ lustri: kind: "module" language: "java" qualified_name: "relay.relay.RelayClient" - parent: "relay.relay" - module: "relay.relay" + parent: "com.signalwire.sdk.relay" + module: "relay" --- # `RelayClient` ## Classes - + diff --git a/fern/products/sdk-reference/java/relay/relay/relay-error/index.mdx b/fern/products/sdk-reference/java/relay/relay-error/index.mdx similarity index 93% rename from fern/products/sdk-reference/java/relay/relay/relay-error/index.mdx rename to fern/products/sdk-reference/java/relay/relay-error/index.mdx index e225f9243e..0a49b57541 100644 --- a/fern/products/sdk-reference/java/relay/relay/relay-error/index.mdx +++ b/fern/products/sdk-reference/java/relay/relay-error/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/java/relay/relay/relay-error" +slug: "/reference/java/relay/relay-error" title: "RelayError" sdk_label: "Java SDK" icon: "java" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.relay.RelayError" - parent: "relay.relay" - module: "relay.relay" + parent: "com.signalwire.sdk.relay" + module: "relay" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayError.java" visibility: "public" --- diff --git a/fern/products/sdk-reference/java/relay/relay/relay-event/authorization-state-event/index.mdx b/fern/products/sdk-reference/java/relay/relay-event/authorization-state-event/index.mdx similarity index 92% rename from fern/products/sdk-reference/java/relay/relay/relay-event/authorization-state-event/index.mdx rename to fern/products/sdk-reference/java/relay/relay-event/authorization-state-event/index.mdx index 8178bbd882..ffc80770a1 100644 --- a/fern/products/sdk-reference/java/relay/relay/relay-event/authorization-state-event/index.mdx +++ b/fern/products/sdk-reference/java/relay/relay-event/authorization-state-event/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/java/relay/relay/relay-event/authorization-state-event" +slug: "/reference/java/relay/relay-event/authorization-state-event" title: "AuthorizationStateEvent" sdk_label: "Java SDK" icon: "java" @@ -9,7 +9,7 @@ lustri: language: "java" qualified_name: "com.signalwire.sdk.relay.RelayEvent.AuthorizationStateEvent" parent: "relay.relay.RelayEvent" - module: "relay.relay.RelayEvent" + module: "relay.RelayEvent" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" visibility: "public" --- @@ -27,7 +27,7 @@ public static class AuthorizationStateEvent extends RelayEvent ## Inheritance -**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/relay/relay/relay-event) +**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/relay/relay-event) ## Methods diff --git a/fern/products/sdk-reference/java/relay/relay/relay-event/call-collect-event/index.mdx b/fern/products/sdk-reference/java/relay/relay-event/call-collect-event/index.mdx similarity index 95% rename from fern/products/sdk-reference/java/relay/relay/relay-event/call-collect-event/index.mdx rename to fern/products/sdk-reference/java/relay/relay-event/call-collect-event/index.mdx index 42b8d8feda..8ba0985f5f 100644 --- a/fern/products/sdk-reference/java/relay/relay/relay-event/call-collect-event/index.mdx +++ b/fern/products/sdk-reference/java/relay/relay-event/call-collect-event/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/java/relay/relay/relay-event/call-collect-event" +slug: "/reference/java/relay/relay-event/call-collect-event" title: "CallCollectEvent" sdk_label: "Java SDK" icon: "java" @@ -9,7 +9,7 @@ lustri: language: "java" qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallCollectEvent" parent: "relay.relay.RelayEvent" - module: "relay.relay.RelayEvent" + module: "relay.RelayEvent" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" visibility: "public" --- @@ -27,7 +27,7 @@ public static class CallCollectEvent extends RelayEvent ## Inheritance -**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/relay/relay/relay-event) +**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/relay/relay-event) ## Methods diff --git a/fern/products/sdk-reference/java/relay/relay/relay-event/call-connect-event/index.mdx b/fern/products/sdk-reference/java/relay/relay-event/call-connect-event/index.mdx similarity index 94% rename from fern/products/sdk-reference/java/relay/relay/relay-event/call-connect-event/index.mdx rename to fern/products/sdk-reference/java/relay/relay-event/call-connect-event/index.mdx index fc647b57dd..1ff1603082 100644 --- a/fern/products/sdk-reference/java/relay/relay/relay-event/call-connect-event/index.mdx +++ b/fern/products/sdk-reference/java/relay/relay-event/call-connect-event/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/java/relay/relay/relay-event/call-connect-event" +slug: "/reference/java/relay/relay-event/call-connect-event" title: "CallConnectEvent" sdk_label: "Java SDK" icon: "java" @@ -9,7 +9,7 @@ lustri: language: "java" qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallConnectEvent" parent: "relay.relay.RelayEvent" - module: "relay.relay.RelayEvent" + module: "relay.RelayEvent" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" visibility: "public" --- @@ -27,7 +27,7 @@ public static class CallConnectEvent extends RelayEvent ## Inheritance -**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/relay/relay/relay-event) +**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/relay/relay-event) ## Methods diff --git a/fern/products/sdk-reference/java/relay/relay/relay-event/call-detect-event/index.mdx b/fern/products/sdk-reference/java/relay/relay-event/call-detect-event/index.mdx similarity index 95% rename from fern/products/sdk-reference/java/relay/relay/relay-event/call-detect-event/index.mdx rename to fern/products/sdk-reference/java/relay/relay-event/call-detect-event/index.mdx index 8c2c05b944..5c9b51651f 100644 --- a/fern/products/sdk-reference/java/relay/relay/relay-event/call-detect-event/index.mdx +++ b/fern/products/sdk-reference/java/relay/relay-event/call-detect-event/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/java/relay/relay/relay-event/call-detect-event" +slug: "/reference/java/relay/relay-event/call-detect-event" title: "CallDetectEvent" sdk_label: "Java SDK" icon: "java" @@ -9,7 +9,7 @@ lustri: language: "java" qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallDetectEvent" parent: "relay.relay.RelayEvent" - module: "relay.relay.RelayEvent" + module: "relay.RelayEvent" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" visibility: "public" --- @@ -27,7 +27,7 @@ public static class CallDetectEvent extends RelayEvent ## Inheritance -**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/relay/relay/relay-event) +**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/relay/relay-event) ## Methods diff --git a/fern/products/sdk-reference/java/relay/relay/relay-event/call-dial-event/index.mdx b/fern/products/sdk-reference/java/relay/relay-event/call-dial-event/index.mdx similarity index 96% rename from fern/products/sdk-reference/java/relay/relay/relay-event/call-dial-event/index.mdx rename to fern/products/sdk-reference/java/relay/relay-event/call-dial-event/index.mdx index 1f2f7195a8..74dd88629d 100644 --- a/fern/products/sdk-reference/java/relay/relay/relay-event/call-dial-event/index.mdx +++ b/fern/products/sdk-reference/java/relay/relay-event/call-dial-event/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/java/relay/relay/relay-event/call-dial-event" +slug: "/reference/java/relay/relay-event/call-dial-event" title: "CallDialEvent" sdk_label: "Java SDK" icon: "java" @@ -9,7 +9,7 @@ lustri: language: "java" qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallDialEvent" parent: "relay.relay.RelayEvent" - module: "relay.relay.RelayEvent" + module: "relay.RelayEvent" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" visibility: "public" --- @@ -32,7 +32,7 @@ public static class CallDialEvent extends RelayEvent ## Inheritance -**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/relay/relay/relay-event) +**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/relay/relay-event) ## Methods diff --git a/fern/products/sdk-reference/java/relay/relay/relay-event/call-fax-event/index.mdx b/fern/products/sdk-reference/java/relay/relay-event/call-fax-event/index.mdx similarity index 94% rename from fern/products/sdk-reference/java/relay/relay/relay-event/call-fax-event/index.mdx rename to fern/products/sdk-reference/java/relay/relay-event/call-fax-event/index.mdx index 702a6098cc..44ca68b5dd 100644 --- a/fern/products/sdk-reference/java/relay/relay/relay-event/call-fax-event/index.mdx +++ b/fern/products/sdk-reference/java/relay/relay-event/call-fax-event/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/java/relay/relay/relay-event/call-fax-event" +slug: "/reference/java/relay/relay-event/call-fax-event" title: "CallFaxEvent" sdk_label: "Java SDK" icon: "java" @@ -9,7 +9,7 @@ lustri: language: "java" qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallFaxEvent" parent: "relay.relay.RelayEvent" - module: "relay.relay.RelayEvent" + module: "relay.RelayEvent" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" visibility: "public" --- @@ -27,7 +27,7 @@ public static class CallFaxEvent extends RelayEvent ## Inheritance -**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/relay/relay/relay-event) +**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/relay/relay-event) ## Methods diff --git a/fern/products/sdk-reference/java/relay/relay/relay-event/call-pay-event/index.mdx b/fern/products/sdk-reference/java/relay/relay-event/call-pay-event/index.mdx similarity index 94% rename from fern/products/sdk-reference/java/relay/relay/relay-event/call-pay-event/index.mdx rename to fern/products/sdk-reference/java/relay/relay-event/call-pay-event/index.mdx index 5b33930136..3bfbf31f8a 100644 --- a/fern/products/sdk-reference/java/relay/relay/relay-event/call-pay-event/index.mdx +++ b/fern/products/sdk-reference/java/relay/relay-event/call-pay-event/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/java/relay/relay/relay-event/call-pay-event" +slug: "/reference/java/relay/relay-event/call-pay-event" title: "CallPayEvent" sdk_label: "Java SDK" icon: "java" @@ -9,7 +9,7 @@ lustri: language: "java" qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallPayEvent" parent: "relay.relay.RelayEvent" - module: "relay.relay.RelayEvent" + module: "relay.RelayEvent" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" visibility: "public" --- @@ -27,7 +27,7 @@ public static class CallPayEvent extends RelayEvent ## Inheritance -**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/relay/relay/relay-event) +**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/relay/relay-event) ## Methods diff --git a/fern/products/sdk-reference/java/relay/relay/relay-event/call-play-event/index.mdx b/fern/products/sdk-reference/java/relay/relay-event/call-play-event/index.mdx similarity index 94% rename from fern/products/sdk-reference/java/relay/relay/relay-event/call-play-event/index.mdx rename to fern/products/sdk-reference/java/relay/relay-event/call-play-event/index.mdx index b9124cd2c8..307ff969e0 100644 --- a/fern/products/sdk-reference/java/relay/relay/relay-event/call-play-event/index.mdx +++ b/fern/products/sdk-reference/java/relay/relay-event/call-play-event/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/java/relay/relay/relay-event/call-play-event" +slug: "/reference/java/relay/relay-event/call-play-event" title: "CallPlayEvent" sdk_label: "Java SDK" icon: "java" @@ -9,7 +9,7 @@ lustri: language: "java" qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallPlayEvent" parent: "relay.relay.RelayEvent" - module: "relay.relay.RelayEvent" + module: "relay.RelayEvent" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" visibility: "public" --- @@ -27,7 +27,7 @@ public static class CallPlayEvent extends RelayEvent ## Inheritance -**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/relay/relay/relay-event) +**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/relay/relay-event) ## Methods diff --git a/fern/products/sdk-reference/java/relay/relay/relay-event/call-receive-event/index.mdx b/fern/products/sdk-reference/java/relay/relay-event/call-receive-event/index.mdx similarity index 95% rename from fern/products/sdk-reference/java/relay/relay/relay-event/call-receive-event/index.mdx rename to fern/products/sdk-reference/java/relay/relay-event/call-receive-event/index.mdx index c62e26fb79..7269173adb 100644 --- a/fern/products/sdk-reference/java/relay/relay/relay-event/call-receive-event/index.mdx +++ b/fern/products/sdk-reference/java/relay/relay-event/call-receive-event/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/java/relay/relay/relay-event/call-receive-event" +slug: "/reference/java/relay/relay-event/call-receive-event" title: "CallReceiveEvent" sdk_label: "Java SDK" icon: "java" @@ -9,7 +9,7 @@ lustri: language: "java" qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallReceiveEvent" parent: "relay.relay.RelayEvent" - module: "relay.relay.RelayEvent" + module: "relay.RelayEvent" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" visibility: "public" --- @@ -27,7 +27,7 @@ public static class CallReceiveEvent extends RelayEvent ## Inheritance -**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/relay/relay/relay-event) +**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/relay/relay-event) ## Methods diff --git a/fern/products/sdk-reference/java/relay/relay/relay-event/call-record-event/index.mdx b/fern/products/sdk-reference/java/relay/relay-event/call-record-event/index.mdx similarity index 96% rename from fern/products/sdk-reference/java/relay/relay/relay-event/call-record-event/index.mdx rename to fern/products/sdk-reference/java/relay/relay-event/call-record-event/index.mdx index 0bf0254871..0cadd265ef 100644 --- a/fern/products/sdk-reference/java/relay/relay/relay-event/call-record-event/index.mdx +++ b/fern/products/sdk-reference/java/relay/relay-event/call-record-event/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/java/relay/relay/relay-event/call-record-event" +slug: "/reference/java/relay/relay-event/call-record-event" title: "CallRecordEvent" sdk_label: "Java SDK" icon: "java" @@ -9,7 +9,7 @@ lustri: language: "java" qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallRecordEvent" parent: "relay.relay.RelayEvent" - module: "relay.relay.RelayEvent" + module: "relay.RelayEvent" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" visibility: "public" --- @@ -27,7 +27,7 @@ public static class CallRecordEvent extends RelayEvent ## Inheritance -**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/relay/relay/relay-event) +**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/relay/relay-event) ## Methods diff --git a/fern/products/sdk-reference/java/relay/relay/relay-event/call-refer-event/index.mdx b/fern/products/sdk-reference/java/relay/relay-event/call-refer-event/index.mdx similarity index 94% rename from fern/products/sdk-reference/java/relay/relay/relay-event/call-refer-event/index.mdx rename to fern/products/sdk-reference/java/relay/relay-event/call-refer-event/index.mdx index 7fdc7795b3..63e05950c7 100644 --- a/fern/products/sdk-reference/java/relay/relay/relay-event/call-refer-event/index.mdx +++ b/fern/products/sdk-reference/java/relay/relay-event/call-refer-event/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/java/relay/relay/relay-event/call-refer-event" +slug: "/reference/java/relay/relay-event/call-refer-event" title: "CallReferEvent" sdk_label: "Java SDK" icon: "java" @@ -9,7 +9,7 @@ lustri: language: "java" qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallReferEvent" parent: "relay.relay.RelayEvent" - module: "relay.relay.RelayEvent" + module: "relay.RelayEvent" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" visibility: "public" --- @@ -27,7 +27,7 @@ public static class CallReferEvent extends RelayEvent ## Inheritance -**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/relay/relay/relay-event) +**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/relay/relay-event) ## Methods diff --git a/fern/products/sdk-reference/java/relay/relay/relay-event/call-send-digits-event/index.mdx b/fern/products/sdk-reference/java/relay/relay-event/call-send-digits-event/index.mdx similarity index 93% rename from fern/products/sdk-reference/java/relay/relay/relay-event/call-send-digits-event/index.mdx rename to fern/products/sdk-reference/java/relay/relay-event/call-send-digits-event/index.mdx index 6d288bf54d..c62b437b5b 100644 --- a/fern/products/sdk-reference/java/relay/relay/relay-event/call-send-digits-event/index.mdx +++ b/fern/products/sdk-reference/java/relay/relay-event/call-send-digits-event/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/java/relay/relay/relay-event/call-send-digits-event" +slug: "/reference/java/relay/relay-event/call-send-digits-event" title: "CallSendDigitsEvent" sdk_label: "Java SDK" icon: "java" @@ -9,7 +9,7 @@ lustri: language: "java" qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallSendDigitsEvent" parent: "relay.relay.RelayEvent" - module: "relay.relay.RelayEvent" + module: "relay.RelayEvent" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" visibility: "public" --- @@ -27,7 +27,7 @@ public static class CallSendDigitsEvent extends RelayEvent ## Inheritance -**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/relay/relay/relay-event) +**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/relay/relay-event) ## Methods diff --git a/fern/products/sdk-reference/java/relay/relay/relay-event/call-state-event/index.mdx b/fern/products/sdk-reference/java/relay/relay-event/call-state-event/index.mdx similarity index 96% rename from fern/products/sdk-reference/java/relay/relay/relay-event/call-state-event/index.mdx rename to fern/products/sdk-reference/java/relay/relay-event/call-state-event/index.mdx index 1b6c7b0f43..96f3b5c150 100644 --- a/fern/products/sdk-reference/java/relay/relay/relay-event/call-state-event/index.mdx +++ b/fern/products/sdk-reference/java/relay/relay-event/call-state-event/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/java/relay/relay/relay-event/call-state-event" +slug: "/reference/java/relay/relay-event/call-state-event" title: "CallStateEvent" sdk_label: "Java SDK" icon: "java" @@ -9,7 +9,7 @@ lustri: language: "java" qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallStateEvent" parent: "relay.relay.RelayEvent" - module: "relay.relay.RelayEvent" + module: "relay.RelayEvent" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" visibility: "public" --- @@ -27,7 +27,7 @@ public static class CallStateEvent extends RelayEvent ## Inheritance -**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/relay/relay/relay-event) +**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/relay/relay-event) ## Methods diff --git a/fern/products/sdk-reference/java/relay/relay/relay-event/call-stream-event/index.mdx b/fern/products/sdk-reference/java/relay/relay-event/call-stream-event/index.mdx similarity index 94% rename from fern/products/sdk-reference/java/relay/relay/relay-event/call-stream-event/index.mdx rename to fern/products/sdk-reference/java/relay/relay-event/call-stream-event/index.mdx index 566f7b9790..b8d3b876a3 100644 --- a/fern/products/sdk-reference/java/relay/relay/relay-event/call-stream-event/index.mdx +++ b/fern/products/sdk-reference/java/relay/relay-event/call-stream-event/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/java/relay/relay/relay-event/call-stream-event" +slug: "/reference/java/relay/relay-event/call-stream-event" title: "CallStreamEvent" sdk_label: "Java SDK" icon: "java" @@ -9,7 +9,7 @@ lustri: language: "java" qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallStreamEvent" parent: "relay.relay.RelayEvent" - module: "relay.relay.RelayEvent" + module: "relay.RelayEvent" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" visibility: "public" --- @@ -27,7 +27,7 @@ public static class CallStreamEvent extends RelayEvent ## Inheritance -**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/relay/relay/relay-event) +**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/relay/relay-event) ## Methods diff --git a/fern/products/sdk-reference/java/relay/relay/relay-event/call-tap-event/index.mdx b/fern/products/sdk-reference/java/relay/relay-event/call-tap-event/index.mdx similarity index 94% rename from fern/products/sdk-reference/java/relay/relay/relay-event/call-tap-event/index.mdx rename to fern/products/sdk-reference/java/relay/relay-event/call-tap-event/index.mdx index b5c94a9525..ab830616f1 100644 --- a/fern/products/sdk-reference/java/relay/relay/relay-event/call-tap-event/index.mdx +++ b/fern/products/sdk-reference/java/relay/relay-event/call-tap-event/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/java/relay/relay/relay-event/call-tap-event" +slug: "/reference/java/relay/relay-event/call-tap-event" title: "CallTapEvent" sdk_label: "Java SDK" icon: "java" @@ -9,7 +9,7 @@ lustri: language: "java" qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallTapEvent" parent: "relay.relay.RelayEvent" - module: "relay.relay.RelayEvent" + module: "relay.RelayEvent" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" visibility: "public" --- @@ -27,7 +27,7 @@ public static class CallTapEvent extends RelayEvent ## Inheritance -**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/relay/relay/relay-event) +**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/relay/relay-event) ## Methods diff --git a/fern/products/sdk-reference/java/relay/relay/relay-event/call-transcribe-event/index.mdx b/fern/products/sdk-reference/java/relay/relay-event/call-transcribe-event/index.mdx similarity index 94% rename from fern/products/sdk-reference/java/relay/relay/relay-event/call-transcribe-event/index.mdx rename to fern/products/sdk-reference/java/relay/relay-event/call-transcribe-event/index.mdx index f89d1204e6..70467e7930 100644 --- a/fern/products/sdk-reference/java/relay/relay/relay-event/call-transcribe-event/index.mdx +++ b/fern/products/sdk-reference/java/relay/relay-event/call-transcribe-event/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/java/relay/relay/relay-event/call-transcribe-event" +slug: "/reference/java/relay/relay-event/call-transcribe-event" title: "CallTranscribeEvent" sdk_label: "Java SDK" icon: "java" @@ -9,7 +9,7 @@ lustri: language: "java" qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallTranscribeEvent" parent: "relay.relay.RelayEvent" - module: "relay.relay.RelayEvent" + module: "relay.RelayEvent" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" visibility: "public" --- @@ -27,7 +27,7 @@ public static class CallTranscribeEvent extends RelayEvent ## Inheritance -**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/relay/relay/relay-event) +**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/relay/relay-event) ## Methods diff --git a/fern/products/sdk-reference/java/relay/relay/relay-event/conference-event/index.mdx b/fern/products/sdk-reference/java/relay/relay-event/conference-event/index.mdx similarity index 94% rename from fern/products/sdk-reference/java/relay/relay/relay-event/conference-event/index.mdx rename to fern/products/sdk-reference/java/relay/relay-event/conference-event/index.mdx index af9fe2aba1..a597ec7348 100644 --- a/fern/products/sdk-reference/java/relay/relay/relay-event/conference-event/index.mdx +++ b/fern/products/sdk-reference/java/relay/relay-event/conference-event/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/java/relay/relay/relay-event/conference-event" +slug: "/reference/java/relay/relay-event/conference-event" title: "ConferenceEvent" sdk_label: "Java SDK" icon: "java" @@ -9,7 +9,7 @@ lustri: language: "java" qualified_name: "com.signalwire.sdk.relay.RelayEvent.ConferenceEvent" parent: "relay.relay.RelayEvent" - module: "relay.relay.RelayEvent" + module: "relay.RelayEvent" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" visibility: "public" --- @@ -27,7 +27,7 @@ public static class ConferenceEvent extends RelayEvent ## Inheritance -**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/relay/relay/relay-event) +**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/relay/relay-event) ## Methods diff --git a/fern/products/sdk-reference/java/relay/relay/relay-event/index.mdx b/fern/products/sdk-reference/java/relay/relay-event/index.mdx similarity index 97% rename from fern/products/sdk-reference/java/relay/relay/relay-event/index.mdx rename to fern/products/sdk-reference/java/relay/relay-event/index.mdx index 4a36800bb1..a895617bd4 100644 --- a/fern/products/sdk-reference/java/relay/relay/relay-event/index.mdx +++ b/fern/products/sdk-reference/java/relay/relay-event/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/java/relay/relay/relay-event" +slug: "/reference/java/relay/relay-event" title: "RelayEvent" sdk_label: "Java SDK" icon: "java" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.relay.RelayEvent" - parent: "relay.relay" - module: "relay.relay" + parent: "com.signalwire.sdk.relay" + module: "relay" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" visibility: "public" --- diff --git a/fern/products/sdk-reference/java/relay/relay/relay-event/index__2.mdx b/fern/products/sdk-reference/java/relay/relay-event/index__2.mdx similarity index 69% rename from fern/products/sdk-reference/java/relay/relay/relay-event/index__2.mdx rename to fern/products/sdk-reference/java/relay/relay-event/index__2.mdx index 95fdad951d..e4fe5c1f73 100644 --- a/fern/products/sdk-reference/java/relay/relay/relay-event/index__2.mdx +++ b/fern/products/sdk-reference/java/relay/relay-event/index__2.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/java/relay/relay/relay-event/index__2" +slug: "/reference/java/relay/relay-event/index__2" title: "RelayEvent" sdk_label: "Java SDK" icon: "java" @@ -8,91 +8,91 @@ lustri: kind: "module" language: "java" qualified_name: "relay.relay.RelayEvent" - parent: "relay.relay" - module: "relay.relay" + parent: "com.signalwire.sdk.relay" + module: "relay" --- # `RelayEvent` ## Classes - + Authorization state event (`signalwire.authorization.state`). - + Collect event (`calling.call.collect`). - + Connect event (`calling.call.connect`). - + Detect event (`calling.call.detect`). - + Dial completion event (`calling.call.dial`). <p> Note: No top-level `call_id`. - + Fax event (`calling.call.fax`). - + Pay event (`calling.call.pay`). - + Play event (`calling.call.play`). - + Inbound call event (`calling.call.receive`). - + Record event (`calling.call.record`). - + Refer event (`calling.call.refer`). - + Send digits event (`calling.call.send_digits`). - + Call state change event (`calling.call.state`). - + Stream event (`calling.call.stream`). - + Tap event (`calling.call.tap`). - + Transcribe event (`calling.call.transcribe`). - + Conference event (`calling.conference`). - + Inbound messaging event (`messaging.receive`). - + Outbound messaging state event (`messaging.state`). - + Queue event (`calling.queue`). diff --git a/fern/products/sdk-reference/java/relay/relay/relay-event/messaging-receive-event/index.mdx b/fern/products/sdk-reference/java/relay/relay-event/messaging-receive-event/index.mdx similarity index 97% rename from fern/products/sdk-reference/java/relay/relay/relay-event/messaging-receive-event/index.mdx rename to fern/products/sdk-reference/java/relay/relay-event/messaging-receive-event/index.mdx index 290086941b..55aeb51f21 100644 --- a/fern/products/sdk-reference/java/relay/relay/relay-event/messaging-receive-event/index.mdx +++ b/fern/products/sdk-reference/java/relay/relay-event/messaging-receive-event/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/java/relay/relay/relay-event/messaging-receive-event" +slug: "/reference/java/relay/relay-event/messaging-receive-event" title: "MessagingReceiveEvent" sdk_label: "Java SDK" icon: "java" @@ -9,7 +9,7 @@ lustri: language: "java" qualified_name: "com.signalwire.sdk.relay.RelayEvent.MessagingReceiveEvent" parent: "relay.relay.RelayEvent" - module: "relay.relay.RelayEvent" + module: "relay.RelayEvent" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" visibility: "public" --- @@ -27,7 +27,7 @@ public static class MessagingReceiveEvent extends RelayEvent ## Inheritance -**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/relay/relay/relay-event) +**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/relay/relay-event) ## Methods diff --git a/fern/products/sdk-reference/java/relay/relay/relay-event/messaging-state-event/index.mdx b/fern/products/sdk-reference/java/relay/relay-event/messaging-state-event/index.mdx similarity index 97% rename from fern/products/sdk-reference/java/relay/relay/relay-event/messaging-state-event/index.mdx rename to fern/products/sdk-reference/java/relay/relay-event/messaging-state-event/index.mdx index b0f847a603..b9dd3cbf19 100644 --- a/fern/products/sdk-reference/java/relay/relay/relay-event/messaging-state-event/index.mdx +++ b/fern/products/sdk-reference/java/relay/relay-event/messaging-state-event/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/java/relay/relay/relay-event/messaging-state-event" +slug: "/reference/java/relay/relay-event/messaging-state-event" title: "MessagingStateEvent" sdk_label: "Java SDK" icon: "java" @@ -9,7 +9,7 @@ lustri: language: "java" qualified_name: "com.signalwire.sdk.relay.RelayEvent.MessagingStateEvent" parent: "relay.relay.RelayEvent" - module: "relay.relay.RelayEvent" + module: "relay.RelayEvent" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" visibility: "public" --- @@ -27,7 +27,7 @@ public static class MessagingStateEvent extends RelayEvent ## Inheritance -**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/relay/relay/relay-event) +**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/relay/relay-event) ## Methods diff --git a/fern/products/sdk-reference/java/relay/relay/relay-event/queue-event/index.mdx b/fern/products/sdk-reference/java/relay/relay-event/queue-event/index.mdx similarity index 94% rename from fern/products/sdk-reference/java/relay/relay/relay-event/queue-event/index.mdx rename to fern/products/sdk-reference/java/relay/relay-event/queue-event/index.mdx index 2d4046bcec..427a333ab1 100644 --- a/fern/products/sdk-reference/java/relay/relay/relay-event/queue-event/index.mdx +++ b/fern/products/sdk-reference/java/relay/relay-event/queue-event/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/java/relay/relay/relay-event/queue-event" +slug: "/reference/java/relay/relay-event/queue-event" title: "QueueEvent" sdk_label: "Java SDK" icon: "java" @@ -9,7 +9,7 @@ lustri: language: "java" qualified_name: "com.signalwire.sdk.relay.RelayEvent.QueueEvent" parent: "relay.relay.RelayEvent" - module: "relay.relay.RelayEvent" + module: "relay.RelayEvent" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" visibility: "public" --- @@ -27,7 +27,7 @@ public static class QueueEvent extends RelayEvent ## Inheritance -**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/relay/relay/relay-event) +**Extends:** [RelayEvent](/docs/sdk-reference/reference/java/relay/relay-event) ## Methods diff --git a/fern/products/sdk-reference/java/relay/relay/index.mdx b/fern/products/sdk-reference/java/relay/relay/index.mdx deleted file mode 100644 index f29e05488e..0000000000 --- a/fern/products/sdk-reference/java/relay/relay/index.mdx +++ /dev/null @@ -1,709 +0,0 @@ ---- -slug: "/reference/java/relay/relay" -title: "relay" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "module" - language: "java" - qualified_name: "relay.relay" - parent: "com.signalwire.sdk.relay" - module: "relay" ---- -# `relay` - -## Classes - - - - Base class for long-running call actions tracked by `control_id`. <p> Actions support three completion patterns: <ol> <li><b>Wait inline</b>: `action.waitForCompletion()` blocks until terminal</li> <li><b>Fire and forget</b>: don't wait, check `isDone()` later</li> <li><b>Callback</b>: pass an `onCompleted` callback that fires on terminal state</li> </ol> <p> Subclasses add action-specific sub-commands (pause, resume, volume, etc.). - - - - Represents a RELAY call with 30+ methods organized by category. <p> Methods are grouped into: <ul> <li><b>Simple fire-and-response</b>: answer, hangup, pass, hold, etc.</li> <li><b>Action-based</b>: play, record, detect, collect, etc. - - - - Constants for the SignalWire RELAY protocol. <p> Includes call states, end reasons, message states, event types, and action terminal states used throughout the RELAY client. - - - - A typed view of the RELAY params\} device object that recurs as a raw Object> across `Call#connect`, `Call#refer`, `RelayClient#dial` and `Call#tap`. <p>The wire shape is fixed (extracted from switchblade's `PublicCallConnectParams` / `PublicCallDialParams` / `PublicCallReferParams` / `PublicCallTapParams`, mirrored in `porting-sdk/relay-protocol/calling.*.params.json`): every device is an object with a required string `type` discriminant and a `params` sub-object whose shape depends on the type (a `phone` carries `to_number`/`from_number`, a `sip` carries `to`/ `headers`, etc.). - - - - Represents an SMS/MMS message with state tracking. <p> Messages are simpler than calls: they have a `message_id`, progress through states (queued, initiated, sent, delivered), and support completion waiting. <p> State progression: <ul> <li>Success: queued -> initiated -> sent -> delivered</li> <li>Failure: queued -> initiated -> failed/undelivered</li> </ul> Terminal states: delivered, undelivered, failed - - - - RELAY WebSocket connection manager. <p> Manages WebSocket connections to the SignalWire RELAY service using JSON-RPC 2.0. Implements the four correlation mechanisms: <ol> <li>JSON-RPC id -> CompletableFuture for RPC response matching</li> <li>call\_id -> Call for event routing</li> <li>control\_id -> Action per Call for action event routing</li> <li>tag -> CompletableFuture\ for dial correlation</li> </ol> <p> Also handles: <ul> <li>Event ACK for every `signalwire.event`</li> <li>Ping/pong for `signalwire.ping`</li> <li>Exponential backoff reconnection</li> <li>Authorization state for fast reconnection</li> <li>Server-initiated disconnect with restart flag</li> <li>Dynamic context subscription via receive/unreceive</li> <li>Message tracking by message\_id</li> </ul> <pre>client = RelayClient.builder() .project("project-id") .token("api-token") .space("example.signalwire.com") .contexts(List.of("default")) .build(); client.onCall(call -> \{ call.answer(); var action = call.play(List.of(Map.of("type", "tts", "params", Map.of("text", "Hello!")))); action.waitForCompletion(); call.hangup();); client.run(); \}</pre> - - - - Runtime exception for RELAY-level failures (dial timeout, dial failed, connect rejected, etc.). - - - - Base class for all RELAY events. <p> Events arrive as `signalwire.event` messages with nested params: <pre> \{ "params": \{ "event\_type": "calling.call.play", "timestamp": 123457.1234, "params": \{ "call\_id": "...", "control\_id": "...", "state": "finished" \} \} \} </pre> Subclasses provide typed access to specific event payloads. - - - -## Modules - - - - - - - - - -## Enums - -### CallState - -The lifecycle state of a RELAY `Call`, as a typed, compile-time-checked -closed set. - -<p>The RELAY server pushes the current call state as a bare string on every -`calling.call.state` event (`created` → `ringing` → -`answered` → `ending` → `ended`). - -This enum mirrors the -five values the Python reference declares in -`signalwire/relay/constants.py` as `CALL_STATE_*` -(`Constants#CALL_STATE_CREATED` … `Constants#CALL_STATE_ENDED`). - -<p>It is exposed <em>alongside</em> the existing string getter, never instead -of it: `Call#getState()` keeps returning the raw wire string (parity -with Python, forward-compatible with any value the server later adds), while -`Call#getCallState()` returns `Optional<CallState>` for callers -who want a typed, switch-exhaustive handle and a `#isTerminal()` -predicate. - -<pre>raw = call.getState(); // "answered" (always present, parity) -Optional<CallState> typed = call.getCallState(); -if (typed.map(CallState::isTerminal).orElse(false)) { - // call has reached ENDED -}</pre> - -<p><strong>Server-emitted, growable.</strong> These values mirror what the -server sends and the set can grow in a future protocol revision. So -`#fromWire(String)` returns `null` (and `Call#getCallState()` -`Optional.empty()`) for an unrecognised value rather than throwing — -an unknown state must never crash event dispatch. This is the Java analog of -Rust's `#[non_exhaustive]` + a fallible `from_str`. - -<p><strong>This is a DISTINCT vocabulary from `DialState` and -`MessageState`.</strong> A `Call`'s lifecycle state -(`created/ringing/answered/ending/ended`) is not the dial <em>outcome</em> -(`dialing/answered/failed`) and not a message delivery state -(`queued/…/delivered`). The three are modelled as three separate enums -and are never conflated — mirroring the three separate `*_STATE_*` -blocks in the Python reference's `constants.py`. - -#### Signature - -```java -public enum CallState -``` - -#### Variants - - - The call has been answered and media is flowing. - - - - The call object has been created but no leg is ringing yet. - - - - Terminal: the call has ended. - - - - The call is in the process of tearing down. - - - - The call is ringing (alerting). - - -#### Methods - -##### fromWire - -Parse a wire string into a `CallState`, or return `null` if -it is not one of the five recognised states. - -Because the set mirrors -server-emitted values that may grow, an unknown string is tolerated -(returns `null`) rather than rejected with an exception — the Java -analog of a fallible `from_str` over a `#[non_exhaustive]` -enum. - -**Modifiers:** `static` - -###### Signature - -```java -public static CallState fromWire(String wire) -``` - -###### Parameters - - - the candidate wire string (case-sensitive), may be `null`. - - -###### Returns - -`CallState` — the matching constant, or `null` if none matches. - -###### Source - -[`src/main/java/com/signalwire/sdk/relay/CallState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/CallState.java) - -Line 106. - -*** - -##### getValue - -The canonical wire string for this state (`"created"` / -`"ringing"` / `"answered"` / `"ending"` / -`"ended"`) — exactly the value the server sends on -`calling.call.state`. - -Equivalent to PHP's backed-enum -`->value`. - -###### Signature - -```java -public String getValue() -``` - -###### Returns - -`String` — the lower-case state name as it appears on the wire. - -###### Source - -[`src/main/java/com/signalwire/sdk/relay/CallState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/CallState.java) - -Line 78. - -*** - -##### isTerminal - -Whether this is a <em>terminal</em> state — i.e. - -the call has reached -the end of its lifecycle and will not transition further. Only -`#ENDED` is terminal (matching `Call#isEnded()` and the -reference's `CALL_STATE_ENDED` terminal check); `#ENDING` is <em>not</em> terminal because an `ended` event still follows. - -###### Signature - -```java -public boolean isTerminal() -``` - -###### Returns - -`boolean` — `true` iff this state is `#ENDED`. - -###### Source - -[`src/main/java/com/signalwire/sdk/relay/CallState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/CallState.java) - -Line 91. - -*** - -##### valueOf - -**Modifiers:** `static` - -###### Signature - -```java -public static CallState valueOf(String name) -``` - -###### Parameters - - - -###### Returns - -`CallState` - -###### Source - -[`src/main/java/com/signalwire/sdk/relay/CallState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/CallState.java) - -*** - -##### values - -**Modifiers:** `static` - -###### Signature - -```java -public static CallState[] values() -``` - -###### Returns - -`CallState[]` - -###### Source - -[`src/main/java/com/signalwire/sdk/relay/CallState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/CallState.java) - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/CallState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/CallState.java) - -Line 50. - -*** - -### DialState - -The outcome state of an outbound `calling.dial`, as a typed, -compile-time-checked closed set. - -<p>A dial progresses `dialing` → `answered` (a leg won) or -`dialing` → `failed` (every leg gave up). - -The RELAY server reports -it as the bare `dial_state` field on each `calling.call.dial` -event. This enum mirrors the three values the Java port declares in -`Constants` as `DIAL_STATE_*` -(`Constants#DIAL_STATE_DIALING` / `Constants#DIAL_STATE_ANSWERED` -/ `Constants#DIAL_STATE_FAILED`), which back the dial-completion logic -in `RelayClient.handleDialEvent`. - -<p>It is exposed <em>alongside</em> the existing string getter, never instead -of it: `RelayEvent.CallDialEvent#getDialState()` keeps returning the raw -wire string (parity with Python, forward-compatible), while -`RelayEvent.CallDialEvent#getDialStateEnum()` returns -`Optional<DialState>` for callers who want a typed handle and an -`#isTerminal()` predicate. - -<p><strong>Terminal semantics.</strong> Unlike `CallState` (where only -`ended` is terminal), <em>both</em> `#ANSWERED` and `#FAILED` -are terminal dial outcomes — each resolves the pending dial (one completes the -`CompletableFuture<Call>`, the other fails it). Only `#DIALING` is -non-terminal. So "terminal" here means "the dial has a final outcome", -matching the `answered`/`failed` branches that resolve the dial in -`RelayClient`. - -<pre>// "answered" (always present, parity) -event.getDialStateEnum() - .filter(DialState::isTerminal) // ANSWERED or FAILED - .ifPresent(s -> ...);</pre> - -<p><strong>Server-emitted, growable</strong> — `#fromWire(String)` -returns `null` for an unrecognised value rather than throwing (the Java -analog of Rust's `#[non_exhaustive]` + fallible `from_str`); an -unknown dial state must never crash event dispatch. - -<p><strong>This is a DISTINCT vocabulary from `CallState` and -`MessageState`.</strong> A dial outcome (`dialing/answered/failed`) -is not a call lifecycle state and not a message delivery state. Note in -particular `answered` appears in <em>both</em> `DialState` and -`CallState` but means different things (the dial won vs. the call leg is -up) — the two enums are never shared. - -#### Signature - -```java -public enum DialState -``` - -#### Variants - - - Terminal: a leg answered and the dial resolved to a `Call`. - - - - The dial is in progress; legs are ringing. Non-terminal. - - - - Terminal: every leg failed and the dial did not connect. - - -#### Methods - -##### fromWire - -Parse a wire string into a `DialState`, or return `null` if -it is not one of the three recognised dial states. - -Because the set -mirrors server-emitted values that may grow, an unknown string is -tolerated (returns `null`) rather than rejected with an exception. - -**Modifiers:** `static` - -###### Signature - -```java -public static DialState fromWire(String wire) -``` - -###### Parameters - - - the candidate wire string (case-sensitive), may be `null`. - - -###### Returns - -`DialState` — the matching constant, or `null` if none matches. - -###### Source - -[`src/main/java/com/signalwire/sdk/relay/DialState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/DialState.java) - -Line 104. - -*** - -##### getValue - -The canonical wire string for this dial outcome (`"dialing"` / -`"answered"` / `"failed"`) — exactly the `dial_state` -value the server sends on `calling.call.dial`. - -Equivalent to PHP's -backed-enum `->value`. - -###### Signature - -```java -public String getValue() -``` - -###### Returns - -`String` — the lower-case dial-state name as it appears on the wire. - -###### Source - -[`src/main/java/com/signalwire/sdk/relay/DialState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/DialState.java) - -Line 79. - -*** - -##### isTerminal - -Whether this is a <em>terminal</em> dial outcome — i.e. - -the dial has a -final result and will not transition further. Both `#ANSWERED` and -`#FAILED` are terminal (each resolves the pending dial); only -`#DIALING` is non-terminal. - -###### Signature - -```java -public boolean isTerminal() -``` - -###### Returns - -`boolean` — `true` iff this state is `#ANSWERED` or `#FAILED`. - -###### Source - -[`src/main/java/com/signalwire/sdk/relay/DialState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/DialState.java) - -Line 91. - -*** - -##### valueOf - -**Modifiers:** `static` - -###### Signature - -```java -public static DialState valueOf(String name) -``` - -###### Parameters - - - -###### Returns - -`DialState` - -###### Source - -[`src/main/java/com/signalwire/sdk/relay/DialState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/DialState.java) - -*** - -##### values - -**Modifiers:** `static` - -###### Signature - -```java -public static DialState[] values() -``` - -###### Returns - -`DialState[]` - -###### Source - -[`src/main/java/com/signalwire/sdk/relay/DialState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/DialState.java) - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/DialState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/DialState.java) - -Line 56. - -*** - -### MessageState - -The delivery state of a RELAY `Message`, as a typed, -compile-time-checked closed set. - -<p>An outbound message progresses `queued` → `initiated` → -`sent` → `delivered` (success) or → `undelivered` / -`failed` (failure); an inbound message arrives as `received`. - -The -RELAY server reports the state as the bare `message_state` field on -`messaging.state` (outbound) and `messaging.receive` (inbound) -events. This enum mirrors the seven values the Python reference declares in -`signalwire/relay/constants.py` as `MESSAGE_STATE_*` -(`Constants#MESSAGE_STATE_QUEUED` … `Constants#MESSAGE_STATE_RECEIVED`). -The `messaging.state` wire schema enumerates the six outbound values; -`received` is the inbound-only seventh. - -<p>It is exposed <em>alongside</em> the existing string getter, never instead -of it: `Message#getState()` keeps returning the raw wire string (parity -with Python, forward-compatible), while `Message#getMessageState()` -returns `Optional<MessageState>` for callers who want a typed handle and -an `#isTerminal()` predicate. - -<pre>raw = msg.getState(); // "delivered" (always present, parity) -msg.getMessageState() - .filter(MessageState::isTerminal) // DELIVERED / UNDELIVERED / FAILED - .ifPresent(s -> ...);</pre> - -<p><strong>Terminal semantics.</strong> The terminal set is -`#DELIVERED`, `#UNDELIVERED`, `#FAILED` — exactly the -reference's `MESSAGE_TERMINAL_STATES` and the set -`Constants#isTerminalMessageState(String)` checks (the state at which -`Message` resolves its completion future). `received` is NOT -terminal: it is an inbound arrival, not the end of an outbound delivery -lifecycle. - -<p><strong>Server-emitted, growable</strong> — `#fromWire(String)` -returns `null` for an unrecognised value rather than throwing (the Java -analog of Rust's `#[non_exhaustive]` + fallible `from_str`); an -unknown message state must never crash event dispatch. - -<p><strong>This is a DISTINCT vocabulary from `CallState` and -`DialState`.</strong> A message delivery state is neither a call -lifecycle state nor a dial outcome; the three enums are never conflated. - -#### Signature - -```java -public enum MessageState -``` - -#### Variants - - - Terminal: the message was delivered. - - - - Terminal: the send failed. - - - - Sending has been initiated. - - - - The message is queued for sending. - - - - An inbound message was received (inbound-only; not a terminal delivery state). - - - - The message has left for the carrier. - - - - Terminal: the carrier reported non-delivery. - - -#### Methods - -##### fromWire - -Parse a wire string into a `MessageState`, or return `null` -if it is not one of the seven recognised states. - -Because the set mirrors -server-emitted values that may grow, an unknown string is tolerated -(returns `null`) rather than rejected with an exception. - -**Modifiers:** `static` - -###### Signature - -```java -public static MessageState fromWire(String wire) -``` - -###### Parameters - - - the candidate wire string (case-sensitive), may be `null`. - - -###### Returns - -`MessageState` — the matching constant, or `null` if none matches. - -###### Source - -[`src/main/java/com/signalwire/sdk/relay/MessageState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/MessageState.java) - -Line 114. - -*** - -##### getValue - -The canonical wire string for this state (`"queued"` / -`"initiated"` / `"sent"` / `"delivered"` / -`"undelivered"` / `"failed"` / `"received"`) — exactly -the `message_state` value the server sends. - -Equivalent to PHP's -backed-enum `->value`. - -###### Signature - -```java -public String getValue() -``` - -###### Returns - -`String` — the lower-case state name as it appears on the wire. - -###### Source - -[`src/main/java/com/signalwire/sdk/relay/MessageState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/MessageState.java) - -Line 86. - -*** - -##### isTerminal - -Whether this is a <em>terminal</em> delivery state — i.e. - -the outbound -message has a final delivery outcome and will not transition further. The -terminal set is `#DELIVERED`, `#UNDELIVERED`, `#FAILED` -(matching the reference's `MESSAGE_TERMINAL_STATES` and -`Constants#isTerminalMessageState(String)`). `#RECEIVED` is -NOT terminal (it is an inbound arrival, not an outbound completion). - -###### Signature - -```java -public boolean isTerminal() -``` - -###### Returns - -`boolean` — `true` iff this state is `#DELIVERED`, `#UNDELIVERED`, or `#FAILED`. - -###### Source - -[`src/main/java/com/signalwire/sdk/relay/MessageState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/MessageState.java) - -Line 101. - -*** - -##### valueOf - -**Modifiers:** `static` - -###### Signature - -```java -public static MessageState valueOf(String name) -``` - -###### Parameters - - - -###### Returns - -`MessageState` - -###### Source - -[`src/main/java/com/signalwire/sdk/relay/MessageState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/MessageState.java) - -*** - -##### values - -**Modifiers:** `static` - -###### Signature - -```java -public static MessageState[] values() -``` - -###### Returns - -`MessageState[]` - -###### Source - -[`src/main/java/com/signalwire/sdk/relay/MessageState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/MessageState.java) - -#### Source - -[`src/main/java/com/signalwire/sdk/relay/MessageState.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/MessageState.java) - -Line 54. diff --git a/fern/products/sdk-reference/java/rest/rest/crud-resource/index.mdx b/fern/products/sdk-reference/java/rest/crud-resource/index.mdx similarity index 97% rename from fern/products/sdk-reference/java/rest/rest/crud-resource/index.mdx rename to fern/products/sdk-reference/java/rest/crud-resource/index.mdx index 9c10627f3c..10d9e61732 100644 --- a/fern/products/sdk-reference/java/rest/rest/crud-resource/index.mdx +++ b/fern/products/sdk-reference/java/rest/crud-resource/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/java/rest/rest/crud-resource" +slug: "/reference/java/rest/crud-resource" title: "CrudResource" sdk_label: "Java SDK" icon: "java" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.rest.CrudResource" - parent: "rest.rest" - module: "rest.rest" + parent: "com.signalwire.sdk.rest" + module: "rest" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/CrudResource.java" visibility: "public" --- diff --git a/fern/products/sdk-reference/java/rest/rest/http-client/index.mdx b/fern/products/sdk-reference/java/rest/http-client/index.mdx similarity index 98% rename from fern/products/sdk-reference/java/rest/rest/http-client/index.mdx rename to fern/products/sdk-reference/java/rest/http-client/index.mdx index 37296e8d6b..184d848d21 100644 --- a/fern/products/sdk-reference/java/rest/rest/http-client/index.mdx +++ b/fern/products/sdk-reference/java/rest/http-client/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/java/rest/rest/http-client" +slug: "/reference/java/rest/http-client" title: "HttpClient" sdk_label: "Java SDK" icon: "java" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.rest.HttpClient" - parent: "rest.rest" - module: "rest.rest" + parent: "com.signalwire.sdk.rest" + module: "rest" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/HttpClient.java" visibility: "public" --- diff --git a/fern/products/sdk-reference/java/rest/index.mdx b/fern/products/sdk-reference/java/rest/index.mdx index 4c3b0d3bf7..3f11d61cbc 100644 --- a/fern/products/sdk-reference/java/rest/index.mdx +++ b/fern/products/sdk-reference/java/rest/index.mdx @@ -17,10 +17,201 @@ lustri: package com.signalwire.sdk.rest ``` +## Classes + + + + Generic CRUD resource for REST API namespaces. <p> Provides standard list, get, create, update, and delete operations against a base path. + + + + HTTP client for the SignalWire REST API. <p> Uses `java.net.http.HttpClient` (JDK 11+ built-in) with Basic Auth and JSON content types. + + + + Iterator that walks paged REST responses by following the `links.next` cursor. <p>Mirrors `signalwire.rest._pagination.PaginatedIterator`: the constructor records the `http` client, path, query params, and the data-list key without performing an HTTP fetch. + + + + SignalWire REST API client with all 21 namespaces. <p> Uses `java.net.http.HttpClient` with Basic Auth. + + + + Exception for SignalWire REST API errors. <p> Contains the HTTP status code and error message from the server. + + + ## Modules - + + +## Enums + +### PhoneCallHandler + +Values accepted for `call_handler` on +java.util.Map) phoneNumbers().update. + +<p> +Named `PhoneCallHandler` (not `CallHandler`) to avoid colliding +with the RELAY client's inbound-call-handler callback type. +<p> +Setting a phone number's `call_handler` + the handler-specific +companion field routes inbound calls and auto-materializes the matching +Fabric resource on the server. + +See the typed helpers on +`com.signalwire.sdk.rest.namespaces.PhoneNumbersNamespace` +(`setSwmlWebhook`, `setCxmlWebhook`, ...). + +<p>Binding table: +<pre> +Enum member Companion field (required) Auto-creates resource +----------------- -------------------------------- --------------------- +RELAY_SCRIPT call_relay_script_url swml_webhook +LAML_WEBHOOKS call_request_url cxml_webhook +LAML_APPLICATION call_laml_application_id cxml_application +AI_AGENT call_ai_agent_id ai_agent +CALL_FLOW call_flow_id call_flow +RELAY_APPLICATION call_relay_application relay_application +RELAY_TOPIC call_relay_topic (routes via RELAY) +RELAY_CONTEXT call_relay_context (legacy, prefer topic) +RELAY_CONNECTOR (connector config) (internal) +VIDEO_ROOM call_video_room_id (routes to Video API) +DIALOGFLOW call_dialogflow_agent_id (none) +</pre> + +<p>Note: `#LAML_WEBHOOKS` (wire value `laml_webhooks`) produces +a <b>cXML</b> handler, not a generic webhook. For SWML, use +`#RELAY_SCRIPT`. + +#### Signature + +```java +public enum PhoneCallHandler +``` + +#### Variants + + + + + + + + + + + + + + + + + + + + + + + +#### Methods + +##### toString + +Returns the wire value so this enum serializes transparently into +request bodies without an explicit `.wireValue()` indirection. + +**Decorators:** `@Override` + +###### Signature + +```java +public String toString() +``` + +###### Returns + +`String` + +###### Source + +[`src/main/java/com/signalwire/sdk/rest/PhoneCallHandler.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/PhoneCallHandler.java) + +Line 74. + +*** + +##### valueOf + +**Modifiers:** `static` + +###### Signature + +```java +public static PhoneCallHandler valueOf(String name) +``` + +###### Parameters + + + +###### Returns + +`PhoneCallHandler` + +###### Source + +[`src/main/java/com/signalwire/sdk/rest/PhoneCallHandler.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/PhoneCallHandler.java) + +*** + +##### values + +**Modifiers:** `static` + +###### Signature + +```java +public static PhoneCallHandler[] values() +``` + +###### Returns + +`PhoneCallHandler[]` + +###### Source + +[`src/main/java/com/signalwire/sdk/rest/PhoneCallHandler.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/PhoneCallHandler.java) + +*** + +##### wireValue + +The wire value sent on the `call_handler` field. + +###### Signature + +```java +public String wireValue() +``` + +###### Returns + +`String` + +###### Source + +[`src/main/java/com/signalwire/sdk/rest/PhoneCallHandler.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/PhoneCallHandler.java) + +Line 66. + +#### Source + +[`src/main/java/com/signalwire/sdk/rest/PhoneCallHandler.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/PhoneCallHandler.java) + +Line 43. diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-applications/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-applications/index.mdx index 88f91b4c4c..212180d4e7 100644 --- a/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-applications/index.mdx +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-applications/index.mdx @@ -29,7 +29,7 @@ public static class CompatApplications extends CrudResource ## Inheritance -**Extends:** [CrudResource](/docs/sdk-reference/reference/java/rest/rest/crud-resource) +**Extends:** [CrudResource](/docs/sdk-reference/reference/java/rest/crud-resource) ## Methods diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-calls/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-calls/index.mdx index fec2b61c74..e9195f1e96 100644 --- a/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-calls/index.mdx +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-calls/index.mdx @@ -27,7 +27,7 @@ public static class CompatCalls extends CrudResource ## Inheritance -**Extends:** [CrudResource](/docs/sdk-reference/reference/java/rest/rest/crud-resource) +**Extends:** [CrudResource](/docs/sdk-reference/reference/java/rest/crud-resource) ## Methods diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-faxes/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-faxes/index.mdx index d0d9ea29ee..3bf9524072 100644 --- a/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-faxes/index.mdx +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-faxes/index.mdx @@ -27,7 +27,7 @@ public static class CompatFaxes extends CrudResource ## Inheritance -**Extends:** [CrudResource](/docs/sdk-reference/reference/java/rest/rest/crud-resource) +**Extends:** [CrudResource](/docs/sdk-reference/reference/java/rest/crud-resource) ## Methods diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-laml-bins/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-laml-bins/index.mdx index 9759528819..d6cdf3330d 100644 --- a/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-laml-bins/index.mdx +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-laml-bins/index.mdx @@ -29,7 +29,7 @@ public static class CompatLamlBins extends CrudResource ## Inheritance -**Extends:** [CrudResource](/docs/sdk-reference/reference/java/rest/rest/crud-resource) +**Extends:** [CrudResource](/docs/sdk-reference/reference/java/rest/crud-resource) ## Methods diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-messages/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-messages/index.mdx index a929544e17..ec3068dcca 100644 --- a/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-messages/index.mdx +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-messages/index.mdx @@ -27,7 +27,7 @@ public static class CompatMessages extends CrudResource ## Inheritance -**Extends:** [CrudResource](/docs/sdk-reference/reference/java/rest/rest/crud-resource) +**Extends:** [CrudResource](/docs/sdk-reference/reference/java/rest/crud-resource) ## Methods diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-queues/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-queues/index.mdx index 57caacb281..28025b44c9 100644 --- a/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-queues/index.mdx +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-queues/index.mdx @@ -27,7 +27,7 @@ public static class CompatQueues extends CrudResource ## Inheritance -**Extends:** [CrudResource](/docs/sdk-reference/reference/java/rest/rest/crud-resource) +**Extends:** [CrudResource](/docs/sdk-reference/reference/java/rest/crud-resource) ## Methods diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/datasphere-namespace/datasphere-documents/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/datasphere-namespace/datasphere-documents/index.mdx index ebdd01c70a..c95476b04e 100644 --- a/fern/products/sdk-reference/java/rest/namespaces/namespaces/datasphere-namespace/datasphere-documents/index.mdx +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/datasphere-namespace/datasphere-documents/index.mdx @@ -27,7 +27,7 @@ public static class DatasphereDocuments extends CrudResource ## Inheritance -**Extends:** [CrudResource](/docs/sdk-reference/reference/java/rest/rest/crud-resource) +**Extends:** [CrudResource](/docs/sdk-reference/reference/java/rest/crud-resource) ## Methods diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/call-flows-resource/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/call-flows-resource/index.mdx index 8882a9216a..37efb5fb6f 100644 --- a/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/call-flows-resource/index.mdx +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/call-flows-resource/index.mdx @@ -29,7 +29,7 @@ public static class CallFlowsResource extends CrudResource ## Inheritance -**Extends:** [CrudResource](/docs/sdk-reference/reference/java/rest/rest/crud-resource) +**Extends:** [CrudResource](/docs/sdk-reference/reference/java/rest/crud-resource) ## Methods diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/conference-rooms-resource/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/conference-rooms-resource/index.mdx index 23d43a5056..d489e98ea3 100644 --- a/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/conference-rooms-resource/index.mdx +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/conference-rooms-resource/index.mdx @@ -27,7 +27,7 @@ public static class ConferenceRoomsResource extends CrudResource ## Inheritance -**Extends:** [CrudResource](/docs/sdk-reference/reference/java/rest/rest/crud-resource) +**Extends:** [CrudResource](/docs/sdk-reference/reference/java/rest/crud-resource) ## Methods diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/cxml-applications-resource/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/cxml-applications-resource/index.mdx index ca34c1707b..c9ee78ca85 100644 --- a/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/cxml-applications-resource/index.mdx +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/cxml-applications-resource/index.mdx @@ -28,7 +28,7 @@ public static class CxmlApplicationsResource extends CrudResource ## Inheritance -**Extends:** [CrudResource](/docs/sdk-reference/reference/java/rest/rest/crud-resource) +**Extends:** [CrudResource](/docs/sdk-reference/reference/java/rest/crud-resource) ## Methods diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/fabric-subscribers/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/fabric-subscribers/index.mdx index 5d2c655092..6bdd3e1bcf 100644 --- a/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/fabric-subscribers/index.mdx +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/fabric-subscribers/index.mdx @@ -29,7 +29,7 @@ public static class FabricSubscribers extends CrudResource ## Inheritance -**Extends:** [CrudResource](/docs/sdk-reference/reference/java/rest/rest/crud-resource) +**Extends:** [CrudResource](/docs/sdk-reference/reference/java/rest/crud-resource) ## Methods diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/video-conferences/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/video-conferences/index.mdx index b3def72ee5..4fd4193d16 100644 --- a/fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/video-conferences/index.mdx +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/video-conferences/index.mdx @@ -29,7 +29,7 @@ public static class VideoConferences extends CrudResource ## Inheritance -**Extends:** [CrudResource](/docs/sdk-reference/reference/java/rest/rest/crud-resource) +**Extends:** [CrudResource](/docs/sdk-reference/reference/java/rest/crud-resource) ## Methods diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/video-rooms/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/video-rooms/index.mdx index 4be5c253d7..ee2eb51f54 100644 --- a/fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/video-rooms/index.mdx +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/video-rooms/index.mdx @@ -29,7 +29,7 @@ public static class VideoRooms extends CrudResource ## Inheritance -**Extends:** [CrudResource](/docs/sdk-reference/reference/java/rest/rest/crud-resource) +**Extends:** [CrudResource](/docs/sdk-reference/reference/java/rest/crud-resource) ## Methods diff --git a/fern/products/sdk-reference/java/rest/rest/paginated-iterator/index.mdx b/fern/products/sdk-reference/java/rest/paginated-iterator/index.mdx similarity index 97% rename from fern/products/sdk-reference/java/rest/rest/paginated-iterator/index.mdx rename to fern/products/sdk-reference/java/rest/paginated-iterator/index.mdx index 508bb0a698..8cc67d3475 100644 --- a/fern/products/sdk-reference/java/rest/rest/paginated-iterator/index.mdx +++ b/fern/products/sdk-reference/java/rest/paginated-iterator/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/java/rest/rest/paginated-iterator" +slug: "/reference/java/rest/paginated-iterator" title: "PaginatedIterator" sdk_label: "Java SDK" icon: "java" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.rest.PaginatedIterator" - parent: "rest.rest" - module: "rest.rest" + parent: "com.signalwire.sdk.rest" + module: "rest" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/PaginatedIterator.java" visibility: "public" --- diff --git a/fern/products/sdk-reference/java/rest/rest/rest-client/builder/index.mdx b/fern/products/sdk-reference/java/rest/rest-client/builder/index.mdx similarity index 96% rename from fern/products/sdk-reference/java/rest/rest/rest-client/builder/index.mdx rename to fern/products/sdk-reference/java/rest/rest-client/builder/index.mdx index a378bf616b..21f2f792d6 100644 --- a/fern/products/sdk-reference/java/rest/rest/rest-client/builder/index.mdx +++ b/fern/products/sdk-reference/java/rest/rest-client/builder/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/java/rest/rest/rest-client/builder" +slug: "/reference/java/rest/rest-client/builder" title: "Builder" sdk_label: "Java SDK" icon: "java" @@ -9,7 +9,7 @@ lustri: language: "java" qualified_name: "com.signalwire.sdk.rest.RestClient.Builder" parent: "rest.rest.RestClient" - module: "rest.rest.RestClient" + module: "rest.RestClient" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java" visibility: "public" --- diff --git a/fern/products/sdk-reference/java/rest/rest/rest-client/index.mdx b/fern/products/sdk-reference/java/rest/rest-client/index.mdx similarity index 99% rename from fern/products/sdk-reference/java/rest/rest/rest-client/index.mdx rename to fern/products/sdk-reference/java/rest/rest-client/index.mdx index 523319a5c3..ea74353289 100644 --- a/fern/products/sdk-reference/java/rest/rest/rest-client/index.mdx +++ b/fern/products/sdk-reference/java/rest/rest-client/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/java/rest/rest/rest-client" +slug: "/reference/java/rest/rest-client" title: "RestClient" sdk_label: "Java SDK" icon: "java" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.rest.RestClient" - parent: "rest.rest" - module: "rest.rest" + parent: "com.signalwire.sdk.rest" + module: "rest" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java" visibility: "public" --- diff --git a/fern/products/sdk-reference/java/rest/rest/rest-client/index__2.mdx b/fern/products/sdk-reference/java/rest/rest-client/index__2.mdx similarity index 68% rename from fern/products/sdk-reference/java/rest/rest/rest-client/index__2.mdx rename to fern/products/sdk-reference/java/rest/rest-client/index__2.mdx index 37df8b22f4..2d95974161 100644 --- a/fern/products/sdk-reference/java/rest/rest/rest-client/index__2.mdx +++ b/fern/products/sdk-reference/java/rest/rest-client/index__2.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/java/rest/rest/rest-client/index__2" +slug: "/reference/java/rest/rest-client/index__2" title: "RestClient" sdk_label: "Java SDK" icon: "java" @@ -8,13 +8,13 @@ lustri: kind: "module" language: "java" qualified_name: "rest.rest.RestClient" - parent: "rest.rest" - module: "rest.rest" + parent: "com.signalwire.sdk.rest" + module: "rest" --- # `RestClient` ## Classes - + diff --git a/fern/products/sdk-reference/java/rest/rest/rest-error/index.mdx b/fern/products/sdk-reference/java/rest/rest-error/index.mdx similarity index 97% rename from fern/products/sdk-reference/java/rest/rest/rest-error/index.mdx rename to fern/products/sdk-reference/java/rest/rest-error/index.mdx index 5c33b82179..311cc987da 100644 --- a/fern/products/sdk-reference/java/rest/rest/rest-error/index.mdx +++ b/fern/products/sdk-reference/java/rest/rest-error/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/java/rest/rest/rest-error" +slug: "/reference/java/rest/rest-error" title: "RestError" sdk_label: "Java SDK" icon: "java" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.rest.RestError" - parent: "rest.rest" - module: "rest.rest" + parent: "com.signalwire.sdk.rest" + module: "rest" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestError.java" visibility: "public" --- diff --git a/fern/products/sdk-reference/java/rest/rest/index.mdx b/fern/products/sdk-reference/java/rest/rest/index.mdx deleted file mode 100644 index d28372ea34..0000000000 --- a/fern/products/sdk-reference/java/rest/rest/index.mdx +++ /dev/null @@ -1,211 +0,0 @@ ---- -slug: "/reference/java/rest/rest" -title: "rest" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "module" - language: "java" - qualified_name: "rest.rest" - parent: "com.signalwire.sdk.rest" - module: "rest" ---- -# `rest` - -## Classes - - - - Generic CRUD resource for REST API namespaces. <p> Provides standard list, get, create, update, and delete operations against a base path. - - - - HTTP client for the SignalWire REST API. <p> Uses `java.net.http.HttpClient` (JDK 11+ built-in) with Basic Auth and JSON content types. - - - - Iterator that walks paged REST responses by following the `links.next` cursor. <p>Mirrors `signalwire.rest._pagination.PaginatedIterator`: the constructor records the `http` client, path, query params, and the data-list key without performing an HTTP fetch. - - - - SignalWire REST API client with all 21 namespaces. <p> Uses `java.net.http.HttpClient` with Basic Auth. - - - - Exception for SignalWire REST API errors. <p> Contains the HTTP status code and error message from the server. - - - -## Modules - - - - - -## Enums - -### PhoneCallHandler - -Values accepted for `call_handler` on -java.util.Map) phoneNumbers().update. - -<p> -Named `PhoneCallHandler` (not `CallHandler`) to avoid colliding -with the RELAY client's inbound-call-handler callback type. -<p> -Setting a phone number's `call_handler` + the handler-specific -companion field routes inbound calls and auto-materializes the matching -Fabric resource on the server. - -See the typed helpers on -`com.signalwire.sdk.rest.namespaces.PhoneNumbersNamespace` -(`setSwmlWebhook`, `setCxmlWebhook`, ...). - -<p>Binding table: -<pre> -Enum member Companion field (required) Auto-creates resource ------------------ -------------------------------- --------------------- -RELAY_SCRIPT call_relay_script_url swml_webhook -LAML_WEBHOOKS call_request_url cxml_webhook -LAML_APPLICATION call_laml_application_id cxml_application -AI_AGENT call_ai_agent_id ai_agent -CALL_FLOW call_flow_id call_flow -RELAY_APPLICATION call_relay_application relay_application -RELAY_TOPIC call_relay_topic (routes via RELAY) -RELAY_CONTEXT call_relay_context (legacy, prefer topic) -RELAY_CONNECTOR (connector config) (internal) -VIDEO_ROOM call_video_room_id (routes to Video API) -DIALOGFLOW call_dialogflow_agent_id (none) -</pre> - -<p>Note: `#LAML_WEBHOOKS` (wire value `laml_webhooks`) produces -a <b>cXML</b> handler, not a generic webhook. For SWML, use -`#RELAY_SCRIPT`. - -#### Signature - -```java -public enum PhoneCallHandler -``` - -#### Variants - - - - - - - - - - - - - - - - - - - - - - - -#### Methods - -##### toString - -Returns the wire value so this enum serializes transparently into -request bodies without an explicit `.wireValue()` indirection. - -**Decorators:** `@Override` - -###### Signature - -```java -public String toString() -``` - -###### Returns - -`String` - -###### Source - -[`src/main/java/com/signalwire/sdk/rest/PhoneCallHandler.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/PhoneCallHandler.java) - -Line 74. - -*** - -##### valueOf - -**Modifiers:** `static` - -###### Signature - -```java -public static PhoneCallHandler valueOf(String name) -``` - -###### Parameters - - - -###### Returns - -`PhoneCallHandler` - -###### Source - -[`src/main/java/com/signalwire/sdk/rest/PhoneCallHandler.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/PhoneCallHandler.java) - -*** - -##### values - -**Modifiers:** `static` - -###### Signature - -```java -public static PhoneCallHandler[] values() -``` - -###### Returns - -`PhoneCallHandler[]` - -###### Source - -[`src/main/java/com/signalwire/sdk/rest/PhoneCallHandler.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/PhoneCallHandler.java) - -*** - -##### wireValue - -The wire value sent on the `call_handler` field. - -###### Signature - -```java -public String wireValue() -``` - -###### Returns - -`String` - -###### Source - -[`src/main/java/com/signalwire/sdk/rest/PhoneCallHandler.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/PhoneCallHandler.java) - -Line 66. - -#### Source - -[`src/main/java/com/signalwire/sdk/rest/PhoneCallHandler.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/PhoneCallHandler.java) - -Line 43. diff --git a/fern/products/sdk-reference/php/_meta.json b/fern/products/sdk-reference/php/_meta.json index 3851088432..1a73f87f6c 100644 --- a/fern/products/sdk-reference/php/_meta.json +++ b/fern/products/sdk-reference/php/_meta.json @@ -6,5 +6,5 @@ "format": "mdx", "platform": "fern", "base_slug": "/reference/php", - "item_count": 1633 + "item_count": 1631 } \ No newline at end of file diff --git a/fern/products/sdk-reference/php/relay/relay/action/index.mdx b/fern/products/sdk-reference/php/relay/action/index.mdx similarity index 98% rename from fern/products/sdk-reference/php/relay/relay/action/index.mdx rename to fern/products/sdk-reference/php/relay/action/index.mdx index 8e1f8261ba..f6548bf0e6 100644 --- a/fern/products/sdk-reference/php/relay/relay/action/index.mdx +++ b/fern/products/sdk-reference/php/relay/action/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/php/relay/relay/action" +slug: "/reference/php/relay/action" title: "Action" sdk_label: "PHP SDK" icon: "php" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "php" qualified_name: "SignalWire\\Relay\\Action" - parent: "relay.Relay" - module: "relay.Relay" + parent: "relay" + module: "relay" source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php" --- # `Action` diff --git a/fern/products/sdk-reference/php/relay/relay/ai-action/index.mdx b/fern/products/sdk-reference/php/relay/ai-action/index.mdx similarity index 98% rename from fern/products/sdk-reference/php/relay/relay/ai-action/index.mdx rename to fern/products/sdk-reference/php/relay/ai-action/index.mdx index f8baab5d42..0c1fa4679d 100644 --- a/fern/products/sdk-reference/php/relay/relay/ai-action/index.mdx +++ b/fern/products/sdk-reference/php/relay/ai-action/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/php/relay/relay/ai-action" +slug: "/reference/php/relay/ai-action" title: "AIAction" sdk_label: "PHP SDK" icon: "php" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "php" qualified_name: "SignalWire\\Relay\\AIAction" - parent: "relay.Relay" - module: "relay.Relay" + parent: "relay" + module: "relay" source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php" --- # `AIAction` @@ -24,7 +24,7 @@ class AIAction extends Action ## Inheritance -**Extends:** [SignalWire\Relay\Action](/docs/sdk-reference/reference/php/relay/relay/action) +**Extends:** [SignalWire\Relay\Action](/docs/sdk-reference/reference/php/relay/action) ## Methods diff --git a/fern/products/sdk-reference/php/relay/relay/call/index.mdx b/fern/products/sdk-reference/php/relay/call/index.mdx similarity index 99% rename from fern/products/sdk-reference/php/relay/relay/call/index.mdx rename to fern/products/sdk-reference/php/relay/call/index.mdx index c832def2f2..9c4c828a52 100644 --- a/fern/products/sdk-reference/php/relay/relay/call/index.mdx +++ b/fern/products/sdk-reference/php/relay/call/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/php/relay/relay/call" +slug: "/reference/php/relay/call" title: "Call" sdk_label: "PHP SDK" icon: "php" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "php" qualified_name: "SignalWire\\Relay\\Call" - parent: "relay.Relay" - module: "relay.Relay" + parent: "relay" + module: "relay" source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php" --- # `Call` diff --git a/fern/products/sdk-reference/php/relay/relay/client/index.mdx b/fern/products/sdk-reference/php/relay/client/index.mdx similarity index 99% rename from fern/products/sdk-reference/php/relay/relay/client/index.mdx rename to fern/products/sdk-reference/php/relay/client/index.mdx index 78f0ac1ea5..c1566edc34 100644 --- a/fern/products/sdk-reference/php/relay/relay/client/index.mdx +++ b/fern/products/sdk-reference/php/relay/client/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/php/relay/relay/client" +slug: "/reference/php/relay/client" title: "Client" sdk_label: "PHP SDK" icon: "php" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "php" qualified_name: "SignalWire\\Relay\\Client" - parent: "relay.Relay" - module: "relay.Relay" + parent: "relay" + module: "relay" source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Client.php" --- # `Client` diff --git a/fern/products/sdk-reference/php/relay/relay/collect-action/index.mdx b/fern/products/sdk-reference/php/relay/collect-action/index.mdx similarity index 98% rename from fern/products/sdk-reference/php/relay/relay/collect-action/index.mdx rename to fern/products/sdk-reference/php/relay/collect-action/index.mdx index 780ecce2d3..58d680520d 100644 --- a/fern/products/sdk-reference/php/relay/relay/collect-action/index.mdx +++ b/fern/products/sdk-reference/php/relay/collect-action/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/php/relay/relay/collect-action" +slug: "/reference/php/relay/collect-action" title: "CollectAction" sdk_label: "PHP SDK" icon: "php" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "php" qualified_name: "SignalWire\\Relay\\CollectAction" - parent: "relay.Relay" - module: "relay.Relay" + parent: "relay" + module: "relay" source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php" --- # `CollectAction` @@ -28,7 +28,7 @@ class CollectAction extends Action ## Inheritance -**Extends:** [SignalWire\Relay\Action](/docs/sdk-reference/reference/php/relay/relay/action) +**Extends:** [SignalWire\Relay\Action](/docs/sdk-reference/reference/php/relay/action) ## Methods diff --git a/fern/products/sdk-reference/php/relay/relay/constants/index.mdx b/fern/products/sdk-reference/php/relay/constants/index.mdx similarity index 97% rename from fern/products/sdk-reference/php/relay/relay/constants/index.mdx rename to fern/products/sdk-reference/php/relay/constants/index.mdx index 14fffae16a..659c22e760 100644 --- a/fern/products/sdk-reference/php/relay/relay/constants/index.mdx +++ b/fern/products/sdk-reference/php/relay/constants/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/php/relay/relay/constants" +slug: "/reference/php/relay/constants" title: "Constants" sdk_label: "PHP SDK" icon: "php" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "php" qualified_name: "SignalWire\\Relay\\Constants" - parent: "relay.Relay" - module: "relay.Relay" + parent: "relay" + module: "relay" source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Constants.php" --- # `Constants` diff --git a/fern/products/sdk-reference/php/relay/relay/detect-action/index.mdx b/fern/products/sdk-reference/php/relay/detect-action/index.mdx similarity index 98% rename from fern/products/sdk-reference/php/relay/relay/detect-action/index.mdx rename to fern/products/sdk-reference/php/relay/detect-action/index.mdx index 26b8d95524..11b9e31191 100644 --- a/fern/products/sdk-reference/php/relay/relay/detect-action/index.mdx +++ b/fern/products/sdk-reference/php/relay/detect-action/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/php/relay/relay/detect-action" +slug: "/reference/php/relay/detect-action" title: "DetectAction" sdk_label: "PHP SDK" icon: "php" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "php" qualified_name: "SignalWire\\Relay\\DetectAction" - parent: "relay.Relay" - module: "relay.Relay" + parent: "relay" + module: "relay" source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php" --- # `DetectAction` @@ -24,7 +24,7 @@ class DetectAction extends Action ## Inheritance -**Extends:** [SignalWire\Relay\Action](/docs/sdk-reference/reference/php/relay/relay/action) +**Extends:** [SignalWire\Relay\Action](/docs/sdk-reference/reference/php/relay/action) ## Methods diff --git a/fern/products/sdk-reference/php/relay/relay/device/index.mdx b/fern/products/sdk-reference/php/relay/device/index.mdx similarity index 98% rename from fern/products/sdk-reference/php/relay/relay/device/index.mdx rename to fern/products/sdk-reference/php/relay/device/index.mdx index f5b6fd1789..2db7cadbbc 100644 --- a/fern/products/sdk-reference/php/relay/relay/device/index.mdx +++ b/fern/products/sdk-reference/php/relay/device/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/php/relay/relay/device" +slug: "/reference/php/relay/device" title: "Device" sdk_label: "PHP SDK" icon: "php" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "php" qualified_name: "SignalWire\\Relay\\Device" - parent: "relay.Relay" - module: "relay.Relay" + parent: "relay" + module: "relay" source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Device.php" --- # `Device` diff --git a/fern/products/sdk-reference/php/relay/relay/event/index.mdx b/fern/products/sdk-reference/php/relay/event/index.mdx similarity index 98% rename from fern/products/sdk-reference/php/relay/relay/event/index.mdx rename to fern/products/sdk-reference/php/relay/event/index.mdx index 95e2fd79e3..1fe9bc0da9 100644 --- a/fern/products/sdk-reference/php/relay/relay/event/index.mdx +++ b/fern/products/sdk-reference/php/relay/event/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/php/relay/relay/event" +slug: "/reference/php/relay/event" title: "Event" sdk_label: "PHP SDK" icon: "php" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "php" qualified_name: "SignalWire\\Relay\\Event" - parent: "relay.Relay" - module: "relay.Relay" + parent: "relay" + module: "relay" source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Event.php" --- # `Event` diff --git a/fern/products/sdk-reference/php/relay/relay/fax-action/index.mdx b/fern/products/sdk-reference/php/relay/fax-action/index.mdx similarity index 98% rename from fern/products/sdk-reference/php/relay/relay/fax-action/index.mdx rename to fern/products/sdk-reference/php/relay/fax-action/index.mdx index 6a36b042de..08e477ee0d 100644 --- a/fern/products/sdk-reference/php/relay/relay/fax-action/index.mdx +++ b/fern/products/sdk-reference/php/relay/fax-action/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/php/relay/relay/fax-action" +slug: "/reference/php/relay/fax-action" title: "FaxAction" sdk_label: "PHP SDK" icon: "php" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "php" qualified_name: "SignalWire\\Relay\\FaxAction" - parent: "relay.Relay" - module: "relay.Relay" + parent: "relay" + module: "relay" source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php" --- # `FaxAction` @@ -24,7 +24,7 @@ class FaxAction extends Action ## Inheritance -**Extends:** [SignalWire\Relay\Action](/docs/sdk-reference/reference/php/relay/relay/action) +**Extends:** [SignalWire\Relay\Action](/docs/sdk-reference/reference/php/relay/action) ## Methods diff --git a/fern/products/sdk-reference/php/relay/index__2.mdx b/fern/products/sdk-reference/php/relay/index__2.mdx index 0e83449229..5377284256 100644 --- a/fern/products/sdk-reference/php/relay/index__2.mdx +++ b/fern/products/sdk-reference/php/relay/index__2.mdx @@ -11,8 +11,770 @@ lustri: --- # `relay` -## Modules +## Classes - + + Base class for all RELAY call actions (play, record, collect, etc.). + + + + Handle for calling.ai operations. + + + + Represents a RELAY voice call. + + + + RELAY Client – manages the WebSocket connection to SignalWire, sends + + + + Handle for calling.collect (and play\_and\_collect) operations. + + + + + + Handle for calling.detect operations (fax-tone, digit, machine, etc.). + + + + A RELAY `{type, params}` device descriptor, as an immutable typed value + + + + An immutable RELAY event value object. + + + + Handle for calling.fax operations (send or receive). + + + + Represents a RELAY messaging message (SMS / MMS). + + + + Handle for calling.pay operations. + + + + Handle for calling.play operations. + + + + Handle for calling.record operations. + + + + Exception type for RELAY-protocol-level failures. + + + + Handle for calling.stream operations. + + + + Handle for calling.tap operations. + + + + Handle for calling.transcribe operations. + + + + RELAY WebSocket transport. + + +## Enums + +### CallState + +RELAY call lifecycle state, as a typed, compile-time-checked closed set. + +A call moves through these states over its lifetime: + +``` +created → ringing → answered → ending → ended +``` + +The five members are exactly the \{@see Constants\}::CALL\_STATE\_\* tokens +(grounded in the Python reference's `relay/constants.py` CALL\_STATES tuple); +each backing string IS the wire value the server emits in a +`calling.call.state` event's `call_state` / `state` field. \{@see Call\} +keeps the bare-string `$state` property for parity with the Python reference +(which models state as a plain `str`); this enum is offered ALONGSIDE it via +the typed \{@see Call::callState()\} accessor — autocompletion and an +exhaustive `match` at the call site, with the string preserved. + +``` +$call->state; // 'answered' (string, parity) +$call->callState(); // CallState::Answered (typed) +$call->callState()?->isTerminal(); // false +``` + +Server states can GROW (the wire vocabulary is owned by the server, not the +SDK), so \{@see CallState::tryFromWire()\} maps an unknown value to `null` +rather than throwing — a forward-compatible coerce. This is a PHP +PORT\_ADDITION: the Python reference uses a bare `str`. + +This is the CALL-state vocabulary ONLY. It is deliberately NOT unified with +\{@see DialState\} (dial-outcome) or \{@see MessageState\} (message-delivery) — +three distinct vocabularies that must never be conflated. + +#### Signature + +```php +final enum CallState implements UnitEnum, BackedEnum +``` + +#### Inheritance + +**Implements:** `UnitEnum`, `BackedEnum` + +#### Properties + + + + + +#### Constants + + + The call has been answered and is up. + + + + The call object exists but nothing has happened yet (the default). + + + + The call has ended — the one terminal state. + + + + The call is tearing down. + + + + The call is ringing the destination. + + +#### Variants + + + The call has been answered and is up. + + + + The call object exists but nothing has happened yet (the default). + + + + The call has ended — the one terminal state. + + + + The call is tearing down. + + + + The call is ringing the destination. + + +#### Methods + +##### cases + +**Modifiers:** `static` + +###### Signature + +```php +public static function cases(): array +``` + +###### Returns + +`array` + +*** + +##### from + +**Modifiers:** `static` + +###### Signature + +```php +public static function from(string|int $value): static +``` + +###### Parameters + + + +###### Returns + +`static` + +*** + +##### isTerminal + +True once the call has reached its terminal state. + +Terminal = \{@see CallState::Ended\} only, matching +\{@see Constants\}::CALL\_TERMINAL\_STATES (`['ended' => true]`). A terminal +state is what resolves every in-flight action on the call. + +###### Signature + +```php +public function isTerminal(): bool +``` + +###### Returns + +`bool` + +###### Source + +[`SignalWire/Relay/CallState.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/CallState.php) + +Line 60. + +*** + +##### tryFrom + +**Modifiers:** `static` + +###### Signature + +```php +public static function tryFrom(string|int $value): ?static +``` + +###### Parameters + + + +###### Returns + +`?static` + +*** + +##### tryFromWire + +Coerce a wire string (or null) to this enum, mapping any value outside + +the known closed set — or null — to null instead of throwing. + +Use this when reading a SERVER-emitted state: the wire vocabulary is +owned by the server and may grow, so an unrecognised value is not an +error — the caller falls back to the raw string. (Contrast PHP's +built-in \{@see CallState::from()\}, which throws \ValueError on a miss.) + +**Modifiers:** `static` + +###### Signature + +```php +public static function tryFromWire(?string $wire): ?SignalWire\Relay\CallState +``` + +###### Parameters + + + The raw `call_state` / `state` value from the wire. + + +###### Returns + +`?SignalWire\Relay\CallState` + +###### Source + +[`SignalWire/Relay/CallState.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/CallState.php) + +Line 76. + +#### Source + +[`SignalWire/Relay/CallState.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/CallState.php) + +Line 36. + +*** + +### DialState + +RELAY dial outcome state, as a typed, compile-time-checked closed set. + +A `calling.call.dial` event carries a `dial_state` (or legacy `state`) that +reports how the outbound dial is progressing: + +``` +dialing → (answered | failed | no_answer | busy) +``` + +The Python reference's `RelayClient` documents the core three +(`dialing | answered | failed`, see `relay/client.py`'s dial-event handler); +this port's \{@see Client::handleDialEvent()\} additionally treats the wire's +`no_answer` / `busy` as terminal failures, so they are modelled here too. +Each backing string IS the wire value. \{@see Constants\}::DIAL\_STATE\_\* keeps +the bare-string constants for parity (the Python reference reads +`dial_state` as a plain `str`); this enum is offered ALONGSIDE them. + +``` +DialState::Answered->value; // 'answered' (wire string) +DialState::tryFromWire('failed'); // DialState::Failed +DialState::Failed->isTerminal(); // true +DialState::Dialing->isTerminal(); // false (still in progress) +``` + +Server states can GROW, so \{@see DialState::tryFromWire()\} maps an unknown +value to `null` rather than throwing — a forward-compatible coerce. This is +a PHP PORT\_ADDITION: the Python reference uses a bare `str`. + +This is the DIAL-outcome vocabulary ONLY. It is deliberately NOT unified +with \{@see CallState\} (call-lifecycle) or \{@see MessageState\} +(message-delivery) — three distinct vocabularies that must never be +conflated. (Note `answered` appears in both CallState and DialState but +means different things — a call lifecycle phase vs a dial outcome — which is +exactly why the vocabularies are kept apart.) + +#### Signature + +```php +final enum DialState implements UnitEnum, BackedEnum +``` + +#### Inheritance + +**Implements:** `UnitEnum`, `BackedEnum` + +#### Properties + + + + + +#### Constants + + + A leg answered — the dial succeeded with a winner. + + + + Every leg returned busy. + + + + The dial is in progress, no leg has been picked yet. + + + + The dial failed outright. + + + + No leg answered before the dial timed out. + + +#### Variants + + + A leg answered — the dial succeeded with a winner. + + + + Every leg returned busy. + + + + The dial is in progress, no leg has been picked yet. + + + + The dial failed outright. + + + + No leg answered before the dial timed out. + + +#### Methods + +##### cases + +**Modifiers:** `static` + +###### Signature + +```php +public static function cases(): array +``` + +###### Returns + +`array` + +*** + +##### from + +**Modifiers:** `static` + +###### Signature + +```php +public static function from(string|int $value): static +``` + +###### Parameters + + + +###### Returns + +`static` + +*** + +##### isTerminal + +True once the dial has reached a terminal outcome. + +Terminal = any state other than \{@see DialState::Dialing\} — i.e. a +winner answered (\{@see DialState::Answered\}) or the dial gave up +(failed / no-answer / busy). This mirrors +\{@see Client::handleDialEvent()\}, which resolves (or rejects) the +pending dial on exactly these states and keeps waiting while `dialing`. + +###### Signature + +```php +public function isTerminal(): bool +``` + +###### Returns + +`bool` + +###### Source + +[`SignalWire/Relay/DialState.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/DialState.php) + +Line 65. + +*** + +##### tryFrom + +**Modifiers:** `static` + +###### Signature + +```php +public static function tryFrom(string|int $value): ?static +``` + +###### Parameters + + + +###### Returns + +`?static` + +*** + +##### tryFromWire + +Coerce a wire string (or null) to this enum, mapping any value outside + +the known closed set — or null — to null instead of throwing. + +Use this when reading a SERVER-emitted `dial_state`: the wire vocabulary +is owned by the server and may grow, so an unrecognised value is not an +error — the caller falls back to the raw string. (Contrast PHP's +built-in \{@see DialState::from()\}, which throws \ValueError on a miss.) + +**Modifiers:** `static` + +###### Signature + +```php +public static function tryFromWire(?string $wire): ?SignalWire\Relay\DialState +``` + +###### Parameters + + + The raw `dial_state` / `state` value from the wire. + + +###### Returns + +`?SignalWire\Relay\DialState` + +###### Source + +[`SignalWire/Relay/DialState.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/DialState.php) + +Line 81. + +#### Source + +[`SignalWire/Relay/DialState.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/DialState.php) + +Line 39. + +*** + +### MessageState + +RELAY message delivery state, as a typed, compile-time-checked closed set. + +A \{@see Message\} progresses through these states as the server reports +delivery via `messaging.state` events: + +``` +queued → initiated → sent → (delivered | undelivered | failed) +``` + +plus `received` for an inbound message. The seven members are exactly the +\{@see Constants\}::MESSAGE\_STATE\_\* tokens (grounded in the Python reference's +`relay/constants.py` MESSAGE\_STATE\_\* + MESSAGE\_TERMINAL\_STATES); each +backing string IS the wire value the server emits in the `message_state` / +`state` field. \{@see Message\} keeps the bare-string `getState()` accessor +for parity with the Python reference (which models state as a plain `str`); +this enum is offered ALONGSIDE it via the typed +\{@see Message::messageState()\} accessor. + +``` +$msg->getState(); // 'delivered' (string, parity) +$msg->messageState(); // MessageState::Delivered (typed) +$msg->messageState()?->isTerminal(); // true +``` + +Server states can GROW, so \{@see MessageState::tryFromWire()\} maps an +unknown value to `null` rather than throwing — a forward-compatible coerce. +This is a PHP PORT\_ADDITION: the Python reference uses a bare `str`. + +This is the MESSAGE-delivery vocabulary ONLY. It is deliberately NOT unified +with \{@see CallState\} (call-lifecycle) or \{@see DialState\} (dial-outcome) — +three distinct vocabularies that must never be conflated. (Note `failed` +appears in both MessageState and DialState but means different things — +message-delivery failure vs dial-outcome failure.) + +#### Signature + +```php +final enum MessageState implements UnitEnum, BackedEnum +``` + +#### Inheritance + +**Implements:** `UnitEnum`, `BackedEnum` + +#### Properties + + + + + +#### Constants + + + The message was delivered to the carrier/handset (terminal, success). + + + + The message failed to send (terminal, failure). + + + + Sending has been initiated. + + + + The message is queued for sending (the initial state). + + + + An inbound message was received. + + + + The message has left the platform. + + + + Delivery was attempted but not confirmed (terminal, failure). + + +#### Variants + + + The message was delivered to the carrier/handset (terminal, success). + + + + The message failed to send (terminal, failure). + + + + Sending has been initiated. + + + + The message is queued for sending (the initial state). + + + + An inbound message was received. + + + + The message has left the platform. + + + + Delivery was attempted but not confirmed (terminal, failure). + + +#### Methods + +##### cases + +**Modifiers:** `static` + +###### Signature + +```php +public static function cases(): array +``` + +###### Returns + +`array` + +*** + +##### from + +**Modifiers:** `static` + +###### Signature + +```php +public static function from(string|int $value): static +``` + +###### Parameters + + + +###### Returns + +`static` + +*** + +##### isTerminal + +True once the message has reached a terminal delivery state. + +Terminal = \{@see MessageState::Delivered\}, \{@see MessageState::Undelivered\}, +or \{@see MessageState::Failed\}, matching +\{@see Constants\}::MESSAGE\_TERMINAL\_STATES — the three states on which +\{@see Message::dispatchEvent()\} auto-resolves the message. Note `received` +is NOT terminal here (it mirrors the Python reference, whose +MESSAGE\_TERMINAL\_STATES excludes it). + +###### Signature + +```php +public function isTerminal(): bool +``` + +###### Returns + +`bool` + +###### Source + +[`SignalWire/Relay/MessageState.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/MessageState.php) + +Line 71. + +*** + +##### tryFrom + +**Modifiers:** `static` + +###### Signature + +```php +public static function tryFrom(string|int $value): ?static +``` + +###### Parameters + + + +###### Returns + +`?static` + +*** + +##### tryFromWire + +Coerce a wire string (or null) to this enum, mapping any value outside + +the known closed set — or null — to null instead of throwing. + +Use this when reading a SERVER-emitted `message_state`: the wire +vocabulary is owned by the server and may grow, so an unrecognised value +is not an error — the caller falls back to the raw string. (Contrast +PHP's built-in \{@see MessageState::from()\}, which throws \ValueError on a +miss.) + +**Modifiers:** `static` + +###### Signature + +```php +public static function tryFromWire(?string $wire): ?SignalWire\Relay\MessageState +``` + +###### Parameters + + + The raw `message_state` / `state` value from the wire. + + +###### Returns + +`?SignalWire\Relay\MessageState` + +###### Source + +[`SignalWire/Relay/MessageState.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/MessageState.php) + +Line 91. + +#### Source + +[`SignalWire/Relay/MessageState.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/MessageState.php) + +Line 38. diff --git a/fern/products/sdk-reference/php/relay/relay/message/index.mdx b/fern/products/sdk-reference/php/relay/message/index.mdx similarity index 98% rename from fern/products/sdk-reference/php/relay/relay/message/index.mdx rename to fern/products/sdk-reference/php/relay/message/index.mdx index e3a998ddb8..a818724d08 100644 --- a/fern/products/sdk-reference/php/relay/relay/message/index.mdx +++ b/fern/products/sdk-reference/php/relay/message/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/php/relay/relay/message" +slug: "/reference/php/relay/message" title: "Message" sdk_label: "PHP SDK" icon: "php" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "php" qualified_name: "SignalWire\\Relay\\Message" - parent: "relay.Relay" - module: "relay.Relay" + parent: "relay" + module: "relay" source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Message.php" --- # `Message` diff --git a/fern/products/sdk-reference/php/relay/relay/pay-action/index.mdx b/fern/products/sdk-reference/php/relay/pay-action/index.mdx similarity index 98% rename from fern/products/sdk-reference/php/relay/relay/pay-action/index.mdx rename to fern/products/sdk-reference/php/relay/pay-action/index.mdx index 5e57464d30..9b72aa9e71 100644 --- a/fern/products/sdk-reference/php/relay/relay/pay-action/index.mdx +++ b/fern/products/sdk-reference/php/relay/pay-action/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/php/relay/relay/pay-action" +slug: "/reference/php/relay/pay-action" title: "PayAction" sdk_label: "PHP SDK" icon: "php" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "php" qualified_name: "SignalWire\\Relay\\PayAction" - parent: "relay.Relay" - module: "relay.Relay" + parent: "relay" + module: "relay" source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php" --- # `PayAction` @@ -24,7 +24,7 @@ class PayAction extends Action ## Inheritance -**Extends:** [SignalWire\Relay\Action](/docs/sdk-reference/reference/php/relay/relay/action) +**Extends:** [SignalWire\Relay\Action](/docs/sdk-reference/reference/php/relay/action) ## Methods diff --git a/fern/products/sdk-reference/php/relay/relay/play-action/index.mdx b/fern/products/sdk-reference/php/relay/play-action/index.mdx similarity index 98% rename from fern/products/sdk-reference/php/relay/relay/play-action/index.mdx rename to fern/products/sdk-reference/php/relay/play-action/index.mdx index 7540057296..b1ed5abbca 100644 --- a/fern/products/sdk-reference/php/relay/relay/play-action/index.mdx +++ b/fern/products/sdk-reference/php/relay/play-action/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/php/relay/relay/play-action" +slug: "/reference/php/relay/play-action" title: "PlayAction" sdk_label: "PHP SDK" icon: "php" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "php" qualified_name: "SignalWire\\Relay\\PlayAction" - parent: "relay.Relay" - module: "relay.Relay" + parent: "relay" + module: "relay" source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php" --- # `PlayAction` @@ -24,7 +24,7 @@ class PlayAction extends Action ## Inheritance -**Extends:** [SignalWire\Relay\Action](/docs/sdk-reference/reference/php/relay/relay/action) +**Extends:** [SignalWire\Relay\Action](/docs/sdk-reference/reference/php/relay/action) ## Methods diff --git a/fern/products/sdk-reference/php/relay/relay/record-action/index.mdx b/fern/products/sdk-reference/php/relay/record-action/index.mdx similarity index 98% rename from fern/products/sdk-reference/php/relay/relay/record-action/index.mdx rename to fern/products/sdk-reference/php/relay/record-action/index.mdx index ea1019f54c..a6107ed2bc 100644 --- a/fern/products/sdk-reference/php/relay/relay/record-action/index.mdx +++ b/fern/products/sdk-reference/php/relay/record-action/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/php/relay/relay/record-action" +slug: "/reference/php/relay/record-action" title: "RecordAction" sdk_label: "PHP SDK" icon: "php" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "php" qualified_name: "SignalWire\\Relay\\RecordAction" - parent: "relay.Relay" - module: "relay.Relay" + parent: "relay" + module: "relay" source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php" --- # `RecordAction` @@ -24,7 +24,7 @@ class RecordAction extends Action ## Inheritance -**Extends:** [SignalWire\Relay\Action](/docs/sdk-reference/reference/php/relay/relay/action) +**Extends:** [SignalWire\Relay\Action](/docs/sdk-reference/reference/php/relay/action) ## Methods diff --git a/fern/products/sdk-reference/php/relay/relay/relay-error/index.mdx b/fern/products/sdk-reference/php/relay/relay-error/index.mdx similarity index 91% rename from fern/products/sdk-reference/php/relay/relay/relay-error/index.mdx rename to fern/products/sdk-reference/php/relay/relay-error/index.mdx index 5a33c7b779..40d9d9f8f3 100644 --- a/fern/products/sdk-reference/php/relay/relay/relay-error/index.mdx +++ b/fern/products/sdk-reference/php/relay/relay-error/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/php/relay/relay/relay-error" +slug: "/reference/php/relay/relay-error" title: "RelayError" sdk_label: "PHP SDK" icon: "php" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "php" qualified_name: "SignalWire\\Relay\\RelayError" - parent: "relay.Relay" - module: "relay.Relay" + parent: "relay" + module: "relay" source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/RelayError.php" --- # `RelayError` diff --git a/fern/products/sdk-reference/php/relay/relay/index.mdx b/fern/products/sdk-reference/php/relay/relay/index.mdx deleted file mode 100644 index 31d9267e56..0000000000 --- a/fern/products/sdk-reference/php/relay/relay/index.mdx +++ /dev/null @@ -1,782 +0,0 @@ ---- -slug: "/reference/php/relay/relay" -title: "Relay" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "module" - language: "php" - qualified_name: "relay.Relay" - parent: "relay" - module: "relay" ---- -# `Relay` - -## Classes - - - - Base class for all RELAY call actions (play, record, collect, etc.). - - - - Handle for calling.ai operations. - - - - Represents a RELAY voice call. - - - - RELAY Client – manages the WebSocket connection to SignalWire, sends - - - - Handle for calling.collect (and play\_and\_collect) operations. - - - - - - Handle for calling.detect operations (fax-tone, digit, machine, etc.). - - - - A RELAY `{type, params}` device descriptor, as an immutable typed value - - - - An immutable RELAY event value object. - - - - Handle for calling.fax operations (send or receive). - - - - Represents a RELAY messaging message (SMS / MMS). - - - - Handle for calling.pay operations. - - - - Handle for calling.play operations. - - - - Handle for calling.record operations. - - - - Exception type for RELAY-protocol-level failures. - - - - Handle for calling.stream operations. - - - - Handle for calling.tap operations. - - - - Handle for calling.transcribe operations. - - - - RELAY WebSocket transport. - - - -## Enums - -### CallState - -RELAY call lifecycle state, as a typed, compile-time-checked closed set. - -A call moves through these states over its lifetime: - -``` -created → ringing → answered → ending → ended -``` - -The five members are exactly the \{@see Constants\}::CALL\_STATE\_\* tokens -(grounded in the Python reference's `relay/constants.py` CALL\_STATES tuple); -each backing string IS the wire value the server emits in a -`calling.call.state` event's `call_state` / `state` field. \{@see Call\} -keeps the bare-string `$state` property for parity with the Python reference -(which models state as a plain `str`); this enum is offered ALONGSIDE it via -the typed \{@see Call::callState()\} accessor — autocompletion and an -exhaustive `match` at the call site, with the string preserved. - -``` -$call->state; // 'answered' (string, parity) -$call->callState(); // CallState::Answered (typed) -$call->callState()?->isTerminal(); // false -``` - -Server states can GROW (the wire vocabulary is owned by the server, not the -SDK), so \{@see CallState::tryFromWire()\} maps an unknown value to `null` -rather than throwing — a forward-compatible coerce. This is a PHP -PORT\_ADDITION: the Python reference uses a bare `str`. - -This is the CALL-state vocabulary ONLY. It is deliberately NOT unified with -\{@see DialState\} (dial-outcome) or \{@see MessageState\} (message-delivery) — -three distinct vocabularies that must never be conflated. - -#### Signature - -```php -final enum CallState implements UnitEnum, BackedEnum -``` - -#### Inheritance - -**Implements:** `UnitEnum`, `BackedEnum` - -#### Properties - - - - - -#### Constants - - - The call has been answered and is up. - - - - The call object exists but nothing has happened yet (the default). - - - - The call has ended — the one terminal state. - - - - The call is tearing down. - - - - The call is ringing the destination. - - -#### Variants - - - The call has been answered and is up. - - - - The call object exists but nothing has happened yet (the default). - - - - The call has ended — the one terminal state. - - - - The call is tearing down. - - - - The call is ringing the destination. - - -#### Methods - -##### cases - -**Modifiers:** `static` - -###### Signature - -```php -public static function cases(): array -``` - -###### Returns - -`array` - -*** - -##### from - -**Modifiers:** `static` - -###### Signature - -```php -public static function from(string|int $value): static -``` - -###### Parameters - - - -###### Returns - -`static` - -*** - -##### isTerminal - -True once the call has reached its terminal state. - -Terminal = \{@see CallState::Ended\} only, matching -\{@see Constants\}::CALL\_TERMINAL\_STATES (`['ended' => true]`). A terminal -state is what resolves every in-flight action on the call. - -###### Signature - -```php -public function isTerminal(): bool -``` - -###### Returns - -`bool` - -###### Source - -[`SignalWire/Relay/CallState.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/CallState.php) - -Line 60. - -*** - -##### tryFrom - -**Modifiers:** `static` - -###### Signature - -```php -public static function tryFrom(string|int $value): ?static -``` - -###### Parameters - - - -###### Returns - -`?static` - -*** - -##### tryFromWire - -Coerce a wire string (or null) to this enum, mapping any value outside - -the known closed set — or null — to null instead of throwing. - -Use this when reading a SERVER-emitted state: the wire vocabulary is -owned by the server and may grow, so an unrecognised value is not an -error — the caller falls back to the raw string. (Contrast PHP's -built-in \{@see CallState::from()\}, which throws \ValueError on a miss.) - -**Modifiers:** `static` - -###### Signature - -```php -public static function tryFromWire(?string $wire): ?SignalWire\Relay\CallState -``` - -###### Parameters - - - The raw `call_state` / `state` value from the wire. - - -###### Returns - -`?SignalWire\Relay\CallState` - -###### Source - -[`SignalWire/Relay/CallState.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/CallState.php) - -Line 76. - -#### Source - -[`SignalWire/Relay/CallState.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/CallState.php) - -Line 36. - -*** - -### DialState - -RELAY dial outcome state, as a typed, compile-time-checked closed set. - -A `calling.call.dial` event carries a `dial_state` (or legacy `state`) that -reports how the outbound dial is progressing: - -``` -dialing → (answered | failed | no_answer | busy) -``` - -The Python reference's `RelayClient` documents the core three -(`dialing | answered | failed`, see `relay/client.py`'s dial-event handler); -this port's \{@see Client::handleDialEvent()\} additionally treats the wire's -`no_answer` / `busy` as terminal failures, so they are modelled here too. -Each backing string IS the wire value. \{@see Constants\}::DIAL\_STATE\_\* keeps -the bare-string constants for parity (the Python reference reads -`dial_state` as a plain `str`); this enum is offered ALONGSIDE them. - -``` -DialState::Answered->value; // 'answered' (wire string) -DialState::tryFromWire('failed'); // DialState::Failed -DialState::Failed->isTerminal(); // true -DialState::Dialing->isTerminal(); // false (still in progress) -``` - -Server states can GROW, so \{@see DialState::tryFromWire()\} maps an unknown -value to `null` rather than throwing — a forward-compatible coerce. This is -a PHP PORT\_ADDITION: the Python reference uses a bare `str`. - -This is the DIAL-outcome vocabulary ONLY. It is deliberately NOT unified -with \{@see CallState\} (call-lifecycle) or \{@see MessageState\} -(message-delivery) — three distinct vocabularies that must never be -conflated. (Note `answered` appears in both CallState and DialState but -means different things — a call lifecycle phase vs a dial outcome — which is -exactly why the vocabularies are kept apart.) - -#### Signature - -```php -final enum DialState implements UnitEnum, BackedEnum -``` - -#### Inheritance - -**Implements:** `UnitEnum`, `BackedEnum` - -#### Properties - - - - - -#### Constants - - - A leg answered — the dial succeeded with a winner. - - - - Every leg returned busy. - - - - The dial is in progress, no leg has been picked yet. - - - - The dial failed outright. - - - - No leg answered before the dial timed out. - - -#### Variants - - - A leg answered — the dial succeeded with a winner. - - - - Every leg returned busy. - - - - The dial is in progress, no leg has been picked yet. - - - - The dial failed outright. - - - - No leg answered before the dial timed out. - - -#### Methods - -##### cases - -**Modifiers:** `static` - -###### Signature - -```php -public static function cases(): array -``` - -###### Returns - -`array` - -*** - -##### from - -**Modifiers:** `static` - -###### Signature - -```php -public static function from(string|int $value): static -``` - -###### Parameters - - - -###### Returns - -`static` - -*** - -##### isTerminal - -True once the dial has reached a terminal outcome. - -Terminal = any state other than \{@see DialState::Dialing\} — i.e. a -winner answered (\{@see DialState::Answered\}) or the dial gave up -(failed / no-answer / busy). This mirrors -\{@see Client::handleDialEvent()\}, which resolves (or rejects) the -pending dial on exactly these states and keeps waiting while `dialing`. - -###### Signature - -```php -public function isTerminal(): bool -``` - -###### Returns - -`bool` - -###### Source - -[`SignalWire/Relay/DialState.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/DialState.php) - -Line 65. - -*** - -##### tryFrom - -**Modifiers:** `static` - -###### Signature - -```php -public static function tryFrom(string|int $value): ?static -``` - -###### Parameters - - - -###### Returns - -`?static` - -*** - -##### tryFromWire - -Coerce a wire string (or null) to this enum, mapping any value outside - -the known closed set — or null — to null instead of throwing. - -Use this when reading a SERVER-emitted `dial_state`: the wire vocabulary -is owned by the server and may grow, so an unrecognised value is not an -error — the caller falls back to the raw string. (Contrast PHP's -built-in \{@see DialState::from()\}, which throws \ValueError on a miss.) - -**Modifiers:** `static` - -###### Signature - -```php -public static function tryFromWire(?string $wire): ?SignalWire\Relay\DialState -``` - -###### Parameters - - - The raw `dial_state` / `state` value from the wire. - - -###### Returns - -`?SignalWire\Relay\DialState` - -###### Source - -[`SignalWire/Relay/DialState.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/DialState.php) - -Line 81. - -#### Source - -[`SignalWire/Relay/DialState.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/DialState.php) - -Line 39. - -*** - -### MessageState - -RELAY message delivery state, as a typed, compile-time-checked closed set. - -A \{@see Message\} progresses through these states as the server reports -delivery via `messaging.state` events: - -``` -queued → initiated → sent → (delivered | undelivered | failed) -``` - -plus `received` for an inbound message. The seven members are exactly the -\{@see Constants\}::MESSAGE\_STATE\_\* tokens (grounded in the Python reference's -`relay/constants.py` MESSAGE\_STATE\_\* + MESSAGE\_TERMINAL\_STATES); each -backing string IS the wire value the server emits in the `message_state` / -`state` field. \{@see Message\} keeps the bare-string `getState()` accessor -for parity with the Python reference (which models state as a plain `str`); -this enum is offered ALONGSIDE it via the typed -\{@see Message::messageState()\} accessor. - -``` -$msg->getState(); // 'delivered' (string, parity) -$msg->messageState(); // MessageState::Delivered (typed) -$msg->messageState()?->isTerminal(); // true -``` - -Server states can GROW, so \{@see MessageState::tryFromWire()\} maps an -unknown value to `null` rather than throwing — a forward-compatible coerce. -This is a PHP PORT\_ADDITION: the Python reference uses a bare `str`. - -This is the MESSAGE-delivery vocabulary ONLY. It is deliberately NOT unified -with \{@see CallState\} (call-lifecycle) or \{@see DialState\} (dial-outcome) — -three distinct vocabularies that must never be conflated. (Note `failed` -appears in both MessageState and DialState but means different things — -message-delivery failure vs dial-outcome failure.) - -#### Signature - -```php -final enum MessageState implements UnitEnum, BackedEnum -``` - -#### Inheritance - -**Implements:** `UnitEnum`, `BackedEnum` - -#### Properties - - - - - -#### Constants - - - The message was delivered to the carrier/handset (terminal, success). - - - - The message failed to send (terminal, failure). - - - - Sending has been initiated. - - - - The message is queued for sending (the initial state). - - - - An inbound message was received. - - - - The message has left the platform. - - - - Delivery was attempted but not confirmed (terminal, failure). - - -#### Variants - - - The message was delivered to the carrier/handset (terminal, success). - - - - The message failed to send (terminal, failure). - - - - Sending has been initiated. - - - - The message is queued for sending (the initial state). - - - - An inbound message was received. - - - - The message has left the platform. - - - - Delivery was attempted but not confirmed (terminal, failure). - - -#### Methods - -##### cases - -**Modifiers:** `static` - -###### Signature - -```php -public static function cases(): array -``` - -###### Returns - -`array` - -*** - -##### from - -**Modifiers:** `static` - -###### Signature - -```php -public static function from(string|int $value): static -``` - -###### Parameters - - - -###### Returns - -`static` - -*** - -##### isTerminal - -True once the message has reached a terminal delivery state. - -Terminal = \{@see MessageState::Delivered\}, \{@see MessageState::Undelivered\}, -or \{@see MessageState::Failed\}, matching -\{@see Constants\}::MESSAGE\_TERMINAL\_STATES — the three states on which -\{@see Message::dispatchEvent()\} auto-resolves the message. Note `received` -is NOT terminal here (it mirrors the Python reference, whose -MESSAGE\_TERMINAL\_STATES excludes it). - -###### Signature - -```php -public function isTerminal(): bool -``` - -###### Returns - -`bool` - -###### Source - -[`SignalWire/Relay/MessageState.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/MessageState.php) - -Line 71. - -*** - -##### tryFrom - -**Modifiers:** `static` - -###### Signature - -```php -public static function tryFrom(string|int $value): ?static -``` - -###### Parameters - - - -###### Returns - -`?static` - -*** - -##### tryFromWire - -Coerce a wire string (or null) to this enum, mapping any value outside - -the known closed set — or null — to null instead of throwing. - -Use this when reading a SERVER-emitted `message_state`: the wire -vocabulary is owned by the server and may grow, so an unrecognised value -is not an error — the caller falls back to the raw string. (Contrast -PHP's built-in \{@see MessageState::from()\}, which throws \ValueError on a -miss.) - -**Modifiers:** `static` - -###### Signature - -```php -public static function tryFromWire(?string $wire): ?SignalWire\Relay\MessageState -``` - -###### Parameters - - - The raw `message_state` / `state` value from the wire. - - -###### Returns - -`?SignalWire\Relay\MessageState` - -###### Source - -[`SignalWire/Relay/MessageState.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/MessageState.php) - -Line 91. - -#### Source - -[`SignalWire/Relay/MessageState.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/MessageState.php) - -Line 38. diff --git a/fern/products/sdk-reference/php/relay/relay/stream-action/index.mdx b/fern/products/sdk-reference/php/relay/stream-action/index.mdx similarity index 98% rename from fern/products/sdk-reference/php/relay/relay/stream-action/index.mdx rename to fern/products/sdk-reference/php/relay/stream-action/index.mdx index 33a35234f2..d6fb654335 100644 --- a/fern/products/sdk-reference/php/relay/relay/stream-action/index.mdx +++ b/fern/products/sdk-reference/php/relay/stream-action/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/php/relay/relay/stream-action" +slug: "/reference/php/relay/stream-action" title: "StreamAction" sdk_label: "PHP SDK" icon: "php" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "php" qualified_name: "SignalWire\\Relay\\StreamAction" - parent: "relay.Relay" - module: "relay.Relay" + parent: "relay" + module: "relay" source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php" --- # `StreamAction` @@ -24,7 +24,7 @@ class StreamAction extends Action ## Inheritance -**Extends:** [SignalWire\Relay\Action](/docs/sdk-reference/reference/php/relay/relay/action) +**Extends:** [SignalWire\Relay\Action](/docs/sdk-reference/reference/php/relay/action) ## Methods diff --git a/fern/products/sdk-reference/php/relay/relay/tap-action/index.mdx b/fern/products/sdk-reference/php/relay/tap-action/index.mdx similarity index 98% rename from fern/products/sdk-reference/php/relay/relay/tap-action/index.mdx rename to fern/products/sdk-reference/php/relay/tap-action/index.mdx index bf29feaa59..7810a418d6 100644 --- a/fern/products/sdk-reference/php/relay/relay/tap-action/index.mdx +++ b/fern/products/sdk-reference/php/relay/tap-action/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/php/relay/relay/tap-action" +slug: "/reference/php/relay/tap-action" title: "TapAction" sdk_label: "PHP SDK" icon: "php" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "php" qualified_name: "SignalWire\\Relay\\TapAction" - parent: "relay.Relay" - module: "relay.Relay" + parent: "relay" + module: "relay" source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php" --- # `TapAction` @@ -24,7 +24,7 @@ class TapAction extends Action ## Inheritance -**Extends:** [SignalWire\Relay\Action](/docs/sdk-reference/reference/php/relay/relay/action) +**Extends:** [SignalWire\Relay\Action](/docs/sdk-reference/reference/php/relay/action) ## Methods diff --git a/fern/products/sdk-reference/php/relay/relay/transcribe-action/index.mdx b/fern/products/sdk-reference/php/relay/transcribe-action/index.mdx similarity index 97% rename from fern/products/sdk-reference/php/relay/relay/transcribe-action/index.mdx rename to fern/products/sdk-reference/php/relay/transcribe-action/index.mdx index a357ae8183..104ffc365b 100644 --- a/fern/products/sdk-reference/php/relay/relay/transcribe-action/index.mdx +++ b/fern/products/sdk-reference/php/relay/transcribe-action/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/php/relay/relay/transcribe-action" +slug: "/reference/php/relay/transcribe-action" title: "TranscribeAction" sdk_label: "PHP SDK" icon: "php" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "php" qualified_name: "SignalWire\\Relay\\TranscribeAction" - parent: "relay.Relay" - module: "relay.Relay" + parent: "relay" + module: "relay" source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php" --- # `TranscribeAction` @@ -24,7 +24,7 @@ class TranscribeAction extends Action ## Inheritance -**Extends:** [SignalWire\Relay\Action](/docs/sdk-reference/reference/php/relay/relay/action) +**Extends:** [SignalWire\Relay\Action](/docs/sdk-reference/reference/php/relay/action) ## Methods diff --git a/fern/products/sdk-reference/php/relay/relay/web-socket/index.mdx b/fern/products/sdk-reference/php/relay/web-socket/index.mdx similarity index 98% rename from fern/products/sdk-reference/php/relay/relay/web-socket/index.mdx rename to fern/products/sdk-reference/php/relay/web-socket/index.mdx index 6b7e986667..6eec03a514 100644 --- a/fern/products/sdk-reference/php/relay/relay/web-socket/index.mdx +++ b/fern/products/sdk-reference/php/relay/web-socket/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/php/relay/relay/web-socket" +slug: "/reference/php/relay/web-socket" title: "WebSocket" sdk_label: "PHP SDK" icon: "php" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "php" qualified_name: "SignalWire\\Relay\\WebSocket" - parent: "relay.Relay" - module: "relay.Relay" + parent: "relay" + module: "relay" source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/WebSocket.php" --- # `WebSocket` diff --git a/fern/products/sdk-reference/php/rest/rest/base-resource/index.mdx b/fern/products/sdk-reference/php/rest/base-resource/index.mdx similarity index 95% rename from fern/products/sdk-reference/php/rest/rest/base-resource/index.mdx rename to fern/products/sdk-reference/php/rest/base-resource/index.mdx index 602ba57be5..39eaa97e99 100644 --- a/fern/products/sdk-reference/php/rest/rest/base-resource/index.mdx +++ b/fern/products/sdk-reference/php/rest/base-resource/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/php/rest/rest/base-resource" +slug: "/reference/php/rest/base-resource" title: "BaseResource" sdk_label: "PHP SDK" icon: "php" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "php" qualified_name: "SignalWire\\REST\\BaseResource" - parent: "rest.REST" - module: "rest.REST" + parent: "rest" + module: "rest" source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php" --- # `BaseResource` diff --git a/fern/products/sdk-reference/php/rest/rest/crud-resource/index.mdx b/fern/products/sdk-reference/php/rest/crud-resource/index.mdx similarity index 96% rename from fern/products/sdk-reference/php/rest/rest/crud-resource/index.mdx rename to fern/products/sdk-reference/php/rest/crud-resource/index.mdx index 4f7c89fcef..6491a83787 100644 --- a/fern/products/sdk-reference/php/rest/rest/crud-resource/index.mdx +++ b/fern/products/sdk-reference/php/rest/crud-resource/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/php/rest/rest/crud-resource" +slug: "/reference/php/rest/crud-resource" title: "CrudResource" sdk_label: "PHP SDK" icon: "php" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "php" qualified_name: "SignalWire\\REST\\CrudResource" - parent: "rest.REST" - module: "rest.REST" + parent: "rest" + module: "rest" source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php" --- # `CrudResource` @@ -27,7 +27,7 @@ class CrudResource extends BaseResource ## Inheritance -**Extends:** [SignalWire\REST\BaseResource](/docs/sdk-reference/reference/php/rest/rest/base-resource) +**Extends:** [SignalWire\REST\BaseResource](/docs/sdk-reference/reference/php/rest/base-resource) ## Methods diff --git a/fern/products/sdk-reference/php/rest/rest/crud-with-addresses/index.mdx b/fern/products/sdk-reference/php/rest/crud-with-addresses/index.mdx similarity index 97% rename from fern/products/sdk-reference/php/rest/rest/crud-with-addresses/index.mdx rename to fern/products/sdk-reference/php/rest/crud-with-addresses/index.mdx index 0165207b1d..20d12e68cf 100644 --- a/fern/products/sdk-reference/php/rest/rest/crud-with-addresses/index.mdx +++ b/fern/products/sdk-reference/php/rest/crud-with-addresses/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/php/rest/rest/crud-with-addresses" +slug: "/reference/php/rest/crud-with-addresses" title: "CrudWithAddresses" sdk_label: "PHP SDK" icon: "php" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "php" qualified_name: "SignalWire\\REST\\CrudWithAddresses" - parent: "rest.REST" - module: "rest.REST" + parent: "rest" + module: "rest" source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php" --- # `CrudWithAddresses` @@ -27,7 +27,7 @@ class CrudWithAddresses extends CrudResource ## Inheritance -**Extends:** [SignalWire\REST\CrudResource](/docs/sdk-reference/reference/php/rest/rest/crud-resource) +**Extends:** [SignalWire\REST\CrudResource](/docs/sdk-reference/reference/php/rest/crud-resource) ## Methods diff --git a/fern/products/sdk-reference/php/rest/rest/http-client/index.mdx b/fern/products/sdk-reference/php/rest/http-client/index.mdx similarity index 98% rename from fern/products/sdk-reference/php/rest/rest/http-client/index.mdx rename to fern/products/sdk-reference/php/rest/http-client/index.mdx index f70c7c0a38..6a2039ed7f 100644 --- a/fern/products/sdk-reference/php/rest/rest/http-client/index.mdx +++ b/fern/products/sdk-reference/php/rest/http-client/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/php/rest/rest/http-client" +slug: "/reference/php/rest/http-client" title: "HttpClient" sdk_label: "PHP SDK" icon: "php" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "php" qualified_name: "SignalWire\\REST\\HttpClient" - parent: "rest.REST" - module: "rest.REST" + parent: "rest" + module: "rest" source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/HttpClient.php" --- # `HttpClient` diff --git a/fern/products/sdk-reference/php/rest/index__2.mdx b/fern/products/sdk-reference/php/rest/index__2.mdx index b66353d9ab..550fa11a75 100644 --- a/fern/products/sdk-reference/php/rest/index__2.mdx +++ b/fern/products/sdk-reference/php/rest/index__2.mdx @@ -11,10 +11,40 @@ lustri: --- # `rest` +## Classes + + + + Common base class for namespace and resource classes. + + + + Generic CRUD wrapper around an HttpClient and a base API path. + + + + CRUD resource that also supports listing addresses for an item. + + + + Low-level HTTP client for SignalWire REST APIs. + + + + Iterates items across paginated API responses. + + + + Top-level SignalWire REST client. + + + + Exception thrown when a SignalWire REST API request fails with a non-2xx status. + + + ## Modules - - diff --git a/fern/products/sdk-reference/php/rest/rest/paginated-iterator/index.mdx b/fern/products/sdk-reference/php/rest/paginated-iterator/index.mdx similarity index 98% rename from fern/products/sdk-reference/php/rest/rest/paginated-iterator/index.mdx rename to fern/products/sdk-reference/php/rest/paginated-iterator/index.mdx index a914723c4b..92ad68490d 100644 --- a/fern/products/sdk-reference/php/rest/rest/paginated-iterator/index.mdx +++ b/fern/products/sdk-reference/php/rest/paginated-iterator/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/php/rest/rest/paginated-iterator" +slug: "/reference/php/rest/paginated-iterator" title: "PaginatedIterator" sdk_label: "PHP SDK" icon: "php" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "php" qualified_name: "SignalWire\\REST\\PaginatedIterator" - parent: "rest.REST" - module: "rest.REST" + parent: "rest" + module: "rest" source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/PaginatedIterator.php" --- # `PaginatedIterator` diff --git a/fern/products/sdk-reference/php/rest/rest/rest-client/index.mdx b/fern/products/sdk-reference/php/rest/rest-client/index.mdx similarity index 99% rename from fern/products/sdk-reference/php/rest/rest/rest-client/index.mdx rename to fern/products/sdk-reference/php/rest/rest-client/index.mdx index 7c17e41bc9..49b3171b33 100644 --- a/fern/products/sdk-reference/php/rest/rest/rest-client/index.mdx +++ b/fern/products/sdk-reference/php/rest/rest-client/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/php/rest/rest/rest-client" +slug: "/reference/php/rest/rest-client" title: "RestClient" sdk_label: "PHP SDK" icon: "php" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "php" qualified_name: "SignalWire\\REST\\RestClient" - parent: "rest.REST" - module: "rest.REST" + parent: "rest" + module: "rest" source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php" --- # `RestClient` diff --git a/fern/products/sdk-reference/php/rest/rest/index.mdx b/fern/products/sdk-reference/php/rest/rest/index.mdx deleted file mode 100644 index 6984ab2016..0000000000 --- a/fern/products/sdk-reference/php/rest/rest/index.mdx +++ /dev/null @@ -1,46 +0,0 @@ ---- -slug: "/reference/php/rest/rest" -title: "REST" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "module" - language: "php" - qualified_name: "rest.REST" - parent: "rest" - module: "rest" ---- -# `REST` - -## Classes - - - - Common base class for namespace and resource classes. - - - - Generic CRUD wrapper around an HttpClient and a base API path. - - - - CRUD resource that also supports listing addresses for an item. - - - - Low-level HTTP client for SignalWire REST APIs. - - - - Iterates items across paginated API responses. - - - - Top-level SignalWire REST client. - - - - Exception thrown when a SignalWire REST API request fails with a non-2xx status. - - diff --git a/fern/products/sdk-reference/php/rest/rest/signal-wire-rest-error/index.mdx b/fern/products/sdk-reference/php/rest/signal-wire-rest-error/index.mdx similarity index 95% rename from fern/products/sdk-reference/php/rest/rest/signal-wire-rest-error/index.mdx rename to fern/products/sdk-reference/php/rest/signal-wire-rest-error/index.mdx index c2f775216a..ca2a999d4f 100644 --- a/fern/products/sdk-reference/php/rest/rest/signal-wire-rest-error/index.mdx +++ b/fern/products/sdk-reference/php/rest/signal-wire-rest-error/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/php/rest/rest/signal-wire-rest-error" +slug: "/reference/php/rest/signal-wire-rest-error" title: "SignalWireRestError" sdk_label: "PHP SDK" icon: "php" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "php" qualified_name: "SignalWire\\REST\\SignalWireRestError" - parent: "rest.REST" - module: "rest.REST" + parent: "rest" + module: "rest" source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/SignalWireRestError.php" --- # `SignalWireRestError` diff --git a/fern/products/sdk-reference/python/_meta.json b/fern/products/sdk-reference/python/_meta.json index 195ffb5d7d..f0ec3c73f2 100644 --- a/fern/products/sdk-reference/python/_meta.json +++ b/fern/products/sdk-reference/python/_meta.json @@ -6,5 +6,5 @@ "format": "mdx", "platform": "fern", "base_slug": "/reference/python", - "item_count": 2482 + "item_count": 2484 } \ No newline at end of file diff --git a/fern/products/sdk-reference/python/agents/auth-handler/index.mdx b/fern/products/sdk-reference/python/agents/configuration/auth-handler/index.mdx similarity index 85% rename from fern/products/sdk-reference/python/agents/auth-handler/index.mdx rename to fern/products/sdk-reference/python/agents/configuration/auth-handler/index.mdx index 118f821b7e..dc66eee575 100644 --- a/fern/products/sdk-reference/python/agents/auth-handler/index.mdx +++ b/fern/products/sdk-reference/python/agents/configuration/auth-handler/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/agents/auth-handler" +slug: "/reference/python/agents/configuration/auth-handler" title: "auth_handler" sdk_label: "Python SDK" icon: "python" @@ -8,8 +8,8 @@ lustri: kind: "module" language: "python" qualified_name: "signalwire.core.auth_handler" - parent: "agents" - module: "agents" + parent: "agents.configuration" + module: "agents.configuration" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/auth_handler.py" --- # `auth_handler` diff --git a/fern/products/sdk-reference/python/agents/auth-handler/index__2.mdx b/fern/products/sdk-reference/python/agents/configuration/auth-handler/index__2.mdx similarity index 96% rename from fern/products/sdk-reference/python/agents/auth-handler/index__2.mdx rename to fern/products/sdk-reference/python/agents/configuration/auth-handler/index__2.mdx index a062237a7a..5415dd41fb 100644 --- a/fern/products/sdk-reference/python/agents/auth-handler/index__2.mdx +++ b/fern/products/sdk-reference/python/agents/configuration/auth-handler/index__2.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/agents/auth-handler/index__2" +slug: "/reference/python/agents/configuration/auth-handler/index__2" title: "AuthHandler" sdk_label: "Python SDK" icon: "python" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "python" qualified_name: "signalwire.core.auth_handler.AuthHandler" - parent: "agents" - module: "agents" + parent: "agents.configuration" + module: "agents.configuration" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/auth_handler.py" --- # `AuthHandler` diff --git a/fern/products/sdk-reference/python/agents/config-loader/index.mdx b/fern/products/sdk-reference/python/agents/configuration/config-loader/index.mdx similarity index 85% rename from fern/products/sdk-reference/python/agents/config-loader/index.mdx rename to fern/products/sdk-reference/python/agents/configuration/config-loader/index.mdx index d841711a14..91c6f71c2d 100644 --- a/fern/products/sdk-reference/python/agents/config-loader/index.mdx +++ b/fern/products/sdk-reference/python/agents/configuration/config-loader/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/agents/config-loader" +slug: "/reference/python/agents/configuration/config-loader" title: "config_loader" sdk_label: "Python SDK" icon: "python" @@ -8,8 +8,8 @@ lustri: kind: "module" language: "python" qualified_name: "signalwire.core.config_loader" - parent: "agents" - module: "agents" + parent: "agents.configuration" + module: "agents.configuration" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/config_loader.py" --- # `config_loader` diff --git a/fern/products/sdk-reference/python/agents/config-loader/index__2.mdx b/fern/products/sdk-reference/python/agents/configuration/config-loader/index__2.mdx similarity index 97% rename from fern/products/sdk-reference/python/agents/config-loader/index__2.mdx rename to fern/products/sdk-reference/python/agents/configuration/config-loader/index__2.mdx index 2c671bba6e..0e107cfb56 100644 --- a/fern/products/sdk-reference/python/agents/config-loader/index__2.mdx +++ b/fern/products/sdk-reference/python/agents/configuration/config-loader/index__2.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/agents/config-loader/index__2" +slug: "/reference/python/agents/configuration/config-loader/index__2" title: "ConfigLoader" sdk_label: "Python SDK" icon: "python" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "python" qualified_name: "signalwire.core.config_loader.ConfigLoader" - parent: "agents" - module: "agents" + parent: "agents.configuration" + module: "agents.configuration" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/config_loader.py" --- # `ConfigLoader` diff --git a/fern/products/sdk-reference/python/agents/configuration/index.mdx b/fern/products/sdk-reference/python/agents/configuration/index.mdx new file mode 100644 index 0000000000..30ca815280 --- /dev/null +++ b/fern/products/sdk-reference/python/agents/configuration/index.mdx @@ -0,0 +1,46 @@ +--- +slug: "/reference/python/agents/configuration" +title: "configuration" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "agents.configuration" + parent: "agents" + module: "agents" +--- +# `configuration` + +## Classes + + + + Unified authentication handler supporting multiple auth methods. + + + + Configuration loader with environment variable substitution. + + + + Unified security configuration for SignalWire services. + + + +## Modules + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + + + Copyright (c) 2025 SignalWire + + diff --git a/fern/products/sdk-reference/python/core/security-config/index.mdx b/fern/products/sdk-reference/python/agents/configuration/security-config/index.mdx similarity index 87% rename from fern/products/sdk-reference/python/core/security-config/index.mdx rename to fern/products/sdk-reference/python/agents/configuration/security-config/index.mdx index 9a5a4eb262..1b42040f05 100644 --- a/fern/products/sdk-reference/python/core/security-config/index.mdx +++ b/fern/products/sdk-reference/python/agents/configuration/security-config/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/core/security-config" +slug: "/reference/python/agents/configuration/security-config" title: "security_config" sdk_label: "Python SDK" icon: "python" @@ -8,8 +8,8 @@ lustri: kind: "module" language: "python" qualified_name: "signalwire.core.security_config" - parent: "core" - module: "core" + parent: "agents.configuration" + module: "agents.configuration" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security_config.py" --- # `security_config` diff --git a/fern/products/sdk-reference/python/core/security-config/index__2.mdx b/fern/products/sdk-reference/python/agents/configuration/security-config/index__2.mdx similarity index 97% rename from fern/products/sdk-reference/python/core/security-config/index__2.mdx rename to fern/products/sdk-reference/python/agents/configuration/security-config/index__2.mdx index 85aa157ed4..fce68c714d 100644 --- a/fern/products/sdk-reference/python/core/security-config/index__2.mdx +++ b/fern/products/sdk-reference/python/agents/configuration/security-config/index__2.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/core/security-config/index__2" +slug: "/reference/python/agents/configuration/security-config/index__2" title: "SecurityConfig" sdk_label: "Python SDK" icon: "python" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "python" qualified_name: "signalwire.core.security_config.SecurityConfig" - parent: "core" - module: "core" + parent: "agents.configuration" + module: "agents.configuration" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security_config.py" --- # `SecurityConfig` diff --git a/fern/products/sdk-reference/python/agents/index.mdx b/fern/products/sdk-reference/python/agents/index.mdx index 371436b5a3..13252eae42 100644 --- a/fern/products/sdk-reference/python/agents/index.mdx +++ b/fern/products/sdk-reference/python/agents/index.mdx @@ -22,14 +22,6 @@ lustri: Server for hosting multiple SignalWire AI Agents under a single FastAPI application. - - Unified authentication handler supporting multiple auth methods. - - - - Configuration loader with environment variable substitution. - - Builder class for creating SWAIG data\_map configurations. @@ -82,17 +74,11 @@ lustri: Copyright (c) 2025 SignalWire - - Copyright (c) 2025 SignalWire - - Copyright (c) 2025 SignalWire - - Copyright (c) 2025 SignalWire - + Copyright (c) 2025 SignalWire diff --git a/fern/products/sdk-reference/python/core/index.mdx b/fern/products/sdk-reference/python/core/index.mdx index fd7a653bdf..a0e5c58834 100644 --- a/fern/products/sdk-reference/python/core/index.mdx +++ b/fern/products/sdk-reference/python/core/index.mdx @@ -11,14 +11,6 @@ lustri: --- # `core` -## Classes - - - - Unified security configuration for SignalWire services. - - - ## Modules @@ -30,10 +22,6 @@ lustri: Copyright (c) 2025 SignalWire - - Copyright (c) 2025 SignalWire - - Copyright (c) 2025 SignalWire diff --git a/fern/products/sdk-reference/python/index.mdx b/fern/products/sdk-reference/python/index.mdx index d1a4cf642c..4da14a288e 100644 --- a/fern/products/sdk-reference/python/index.mdx +++ b/fern/products/sdk-reference/python/index.mdx @@ -13,6 +13,7 @@ lustri: - [`agents`](/docs/sdk-reference/reference/python/agents) - [`core`](/docs/sdk-reference/reference/python/core) - [`relay`](/docs/sdk-reference/reference/python/relay) +- [`relay`](/docs/sdk-reference/reference/python/relay) - [`rest`](/docs/sdk-reference/reference/python/rest) - [`signalwire`](/docs/sdk-reference/reference/python/signalwire) diff --git a/fern/products/sdk-reference/python/relay/call/action/index.mdx b/fern/products/sdk-reference/python/relay/actions/action/index.mdx similarity index 96% rename from fern/products/sdk-reference/python/relay/call/action/index.mdx rename to fern/products/sdk-reference/python/relay/actions/action/index.mdx index fadc380473..0aec287986 100644 --- a/fern/products/sdk-reference/python/relay/call/action/index.mdx +++ b/fern/products/sdk-reference/python/relay/actions/action/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/relay/call/action" +slug: "/reference/python/relay/actions/action" title: "Action" sdk_label: "Python SDK" icon: "python" @@ -8,7 +8,7 @@ lustri: kind: "class" language: "python" qualified_name: "signalwire.relay.call.Action" - parent: "relay.call" + parent: "relay.actions" module: "relay.call" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py" --- diff --git a/fern/products/sdk-reference/python/relay/call/ai-action/index.mdx b/fern/products/sdk-reference/python/relay/actions/ai-action/index.mdx similarity index 93% rename from fern/products/sdk-reference/python/relay/call/ai-action/index.mdx rename to fern/products/sdk-reference/python/relay/actions/ai-action/index.mdx index 0c1300ba86..1219d52ebb 100644 --- a/fern/products/sdk-reference/python/relay/call/ai-action/index.mdx +++ b/fern/products/sdk-reference/python/relay/actions/ai-action/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/relay/call/ai-action" +slug: "/reference/python/relay/actions/ai-action" title: "AIAction" sdk_label: "Python SDK" icon: "python" @@ -8,7 +8,7 @@ lustri: kind: "class" language: "python" qualified_name: "signalwire.relay.call.AIAction" - parent: "relay.call" + parent: "relay.actions" module: "relay.call" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py" --- @@ -24,7 +24,7 @@ class AIAction(Action) ## Inheritance -**Extends:** [Action](/docs/sdk-reference/reference/python/relay/call/action) +**Extends:** [Action](/docs/sdk-reference/reference/python/relay/actions/action) ## Methods diff --git a/fern/products/sdk-reference/python/relay/call/collect-action/index.mdx b/fern/products/sdk-reference/python/relay/actions/collect-action/index.mdx similarity index 95% rename from fern/products/sdk-reference/python/relay/call/collect-action/index.mdx rename to fern/products/sdk-reference/python/relay/actions/collect-action/index.mdx index 941349994d..e414cab47b 100644 --- a/fern/products/sdk-reference/python/relay/call/collect-action/index.mdx +++ b/fern/products/sdk-reference/python/relay/actions/collect-action/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/relay/call/collect-action" +slug: "/reference/python/relay/actions/collect-action" title: "CollectAction" sdk_label: "Python SDK" icon: "python" @@ -8,7 +8,7 @@ lustri: kind: "class" language: "python" qualified_name: "signalwire.relay.call.CollectAction" - parent: "relay.call" + parent: "relay.actions" module: "relay.call" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py" --- @@ -24,7 +24,7 @@ class CollectAction(Action) ## Inheritance -**Extends:** [Action](/docs/sdk-reference/reference/python/relay/call/action) +**Extends:** [Action](/docs/sdk-reference/reference/python/relay/actions/action) ## Methods diff --git a/fern/products/sdk-reference/python/relay/call/detect-action/index.mdx b/fern/products/sdk-reference/python/relay/actions/detect-action/index.mdx similarity index 93% rename from fern/products/sdk-reference/python/relay/call/detect-action/index.mdx rename to fern/products/sdk-reference/python/relay/actions/detect-action/index.mdx index 674ef7027f..bdb88987d6 100644 --- a/fern/products/sdk-reference/python/relay/call/detect-action/index.mdx +++ b/fern/products/sdk-reference/python/relay/actions/detect-action/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/relay/call/detect-action" +slug: "/reference/python/relay/actions/detect-action" title: "DetectAction" sdk_label: "Python SDK" icon: "python" @@ -8,7 +8,7 @@ lustri: kind: "class" language: "python" qualified_name: "signalwire.relay.call.DetectAction" - parent: "relay.call" + parent: "relay.actions" module: "relay.call" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py" --- @@ -24,7 +24,7 @@ class DetectAction(Action) ## Inheritance -**Extends:** [Action](/docs/sdk-reference/reference/python/relay/call/action) +**Extends:** [Action](/docs/sdk-reference/reference/python/relay/actions/action) ## Methods diff --git a/fern/products/sdk-reference/python/relay/call/fax-action/index.mdx b/fern/products/sdk-reference/python/relay/actions/fax-action/index.mdx similarity index 93% rename from fern/products/sdk-reference/python/relay/call/fax-action/index.mdx rename to fern/products/sdk-reference/python/relay/actions/fax-action/index.mdx index b2e09bff51..2c2482c975 100644 --- a/fern/products/sdk-reference/python/relay/call/fax-action/index.mdx +++ b/fern/products/sdk-reference/python/relay/actions/fax-action/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/relay/call/fax-action" +slug: "/reference/python/relay/actions/fax-action" title: "FaxAction" sdk_label: "Python SDK" icon: "python" @@ -8,7 +8,7 @@ lustri: kind: "class" language: "python" qualified_name: "signalwire.relay.call.FaxAction" - parent: "relay.call" + parent: "relay.actions" module: "relay.call" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py" --- @@ -24,7 +24,7 @@ class FaxAction(Action) ## Inheritance -**Extends:** [Action](/docs/sdk-reference/reference/python/relay/call/action) +**Extends:** [Action](/docs/sdk-reference/reference/python/relay/actions/action) ## Methods diff --git a/fern/products/sdk-reference/python/relay/call/index__2.mdx b/fern/products/sdk-reference/python/relay/actions/index.mdx similarity index 74% rename from fern/products/sdk-reference/python/relay/call/index__2.mdx rename to fern/products/sdk-reference/python/relay/actions/index.mdx index 90cac9f603..a44929368c 100644 --- a/fern/products/sdk-reference/python/relay/call/index__2.mdx +++ b/fern/products/sdk-reference/python/relay/actions/index.mdx @@ -1,66 +1,66 @@ --- -slug: "/reference/python/relay/call/index__2" -title: "call" +slug: "/reference/python/relay/actions" +title: "actions" sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true kind: "module" language: "python" - qualified_name: "relay.call" - parent: "signalwire.relay" + qualified_name: "relay.actions" + parent: "relay" module: "relay" --- -# `call` +# `actions` ## Classes - + Base class for async action handles (play, record, detect, etc.). - + Handle for an active AI agent session. - + Handle for play\_and\_collect or standalone collect. - + Handle for an active detect operation. - + Handle for an active send\_fax or receive\_fax operation. - + Handle for an active pay operation. - + Handle for an active play operation. - + Handle for an active record operation. - + Handle for standalone calling.collect (without play). - + Handle for an active stream operation. - + Handle for an active tap operation. - + Handle for an active transcribe operation. diff --git a/fern/products/sdk-reference/python/relay/call/pay-action/index.mdx b/fern/products/sdk-reference/python/relay/actions/pay-action/index.mdx similarity index 93% rename from fern/products/sdk-reference/python/relay/call/pay-action/index.mdx rename to fern/products/sdk-reference/python/relay/actions/pay-action/index.mdx index de252008b5..181be47185 100644 --- a/fern/products/sdk-reference/python/relay/call/pay-action/index.mdx +++ b/fern/products/sdk-reference/python/relay/actions/pay-action/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/relay/call/pay-action" +slug: "/reference/python/relay/actions/pay-action" title: "PayAction" sdk_label: "Python SDK" icon: "python" @@ -8,7 +8,7 @@ lustri: kind: "class" language: "python" qualified_name: "signalwire.relay.call.PayAction" - parent: "relay.call" + parent: "relay.actions" module: "relay.call" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py" --- @@ -24,7 +24,7 @@ class PayAction(Action) ## Inheritance -**Extends:** [Action](/docs/sdk-reference/reference/python/relay/call/action) +**Extends:** [Action](/docs/sdk-reference/reference/python/relay/actions/action) ## Methods diff --git a/fern/products/sdk-reference/python/relay/call/play-action/index.mdx b/fern/products/sdk-reference/python/relay/actions/play-action/index.mdx similarity index 95% rename from fern/products/sdk-reference/python/relay/call/play-action/index.mdx rename to fern/products/sdk-reference/python/relay/actions/play-action/index.mdx index cb34ceaad8..635b8908c5 100644 --- a/fern/products/sdk-reference/python/relay/call/play-action/index.mdx +++ b/fern/products/sdk-reference/python/relay/actions/play-action/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/relay/call/play-action" +slug: "/reference/python/relay/actions/play-action" title: "PlayAction" sdk_label: "Python SDK" icon: "python" @@ -8,7 +8,7 @@ lustri: kind: "class" language: "python" qualified_name: "signalwire.relay.call.PlayAction" - parent: "relay.call" + parent: "relay.actions" module: "relay.call" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py" --- @@ -24,7 +24,7 @@ class PlayAction(Action) ## Inheritance -**Extends:** [Action](/docs/sdk-reference/reference/python/relay/call/action) +**Extends:** [Action](/docs/sdk-reference/reference/python/relay/actions/action) ## Methods diff --git a/fern/products/sdk-reference/python/relay/call/record-action/index.mdx b/fern/products/sdk-reference/python/relay/actions/record-action/index.mdx similarity index 95% rename from fern/products/sdk-reference/python/relay/call/record-action/index.mdx rename to fern/products/sdk-reference/python/relay/actions/record-action/index.mdx index efba2bffe6..4c889aa313 100644 --- a/fern/products/sdk-reference/python/relay/call/record-action/index.mdx +++ b/fern/products/sdk-reference/python/relay/actions/record-action/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/relay/call/record-action" +slug: "/reference/python/relay/actions/record-action" title: "RecordAction" sdk_label: "Python SDK" icon: "python" @@ -8,7 +8,7 @@ lustri: kind: "class" language: "python" qualified_name: "signalwire.relay.call.RecordAction" - parent: "relay.call" + parent: "relay.actions" module: "relay.call" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py" --- @@ -24,7 +24,7 @@ class RecordAction(Action) ## Inheritance -**Extends:** [Action](/docs/sdk-reference/reference/python/relay/call/action) +**Extends:** [Action](/docs/sdk-reference/reference/python/relay/actions/action) ## Methods diff --git a/fern/products/sdk-reference/python/relay/call/standalone-collect-action/index.mdx b/fern/products/sdk-reference/python/relay/actions/standalone-collect-action/index.mdx similarity index 94% rename from fern/products/sdk-reference/python/relay/call/standalone-collect-action/index.mdx rename to fern/products/sdk-reference/python/relay/actions/standalone-collect-action/index.mdx index 96cd5b107e..3c78a1317b 100644 --- a/fern/products/sdk-reference/python/relay/call/standalone-collect-action/index.mdx +++ b/fern/products/sdk-reference/python/relay/actions/standalone-collect-action/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/relay/call/standalone-collect-action" +slug: "/reference/python/relay/actions/standalone-collect-action" title: "StandaloneCollectAction" sdk_label: "Python SDK" icon: "python" @@ -8,7 +8,7 @@ lustri: kind: "class" language: "python" qualified_name: "signalwire.relay.call.StandaloneCollectAction" - parent: "relay.call" + parent: "relay.actions" module: "relay.call" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py" --- @@ -24,7 +24,7 @@ class StandaloneCollectAction(Action) ## Inheritance -**Extends:** [Action](/docs/sdk-reference/reference/python/relay/call/action) +**Extends:** [Action](/docs/sdk-reference/reference/python/relay/actions/action) ## Methods diff --git a/fern/products/sdk-reference/python/relay/call/stream-action/index.mdx b/fern/products/sdk-reference/python/relay/actions/stream-action/index.mdx similarity index 93% rename from fern/products/sdk-reference/python/relay/call/stream-action/index.mdx rename to fern/products/sdk-reference/python/relay/actions/stream-action/index.mdx index 05ad9e6173..d92fb9b959 100644 --- a/fern/products/sdk-reference/python/relay/call/stream-action/index.mdx +++ b/fern/products/sdk-reference/python/relay/actions/stream-action/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/relay/call/stream-action" +slug: "/reference/python/relay/actions/stream-action" title: "StreamAction" sdk_label: "Python SDK" icon: "python" @@ -8,7 +8,7 @@ lustri: kind: "class" language: "python" qualified_name: "signalwire.relay.call.StreamAction" - parent: "relay.call" + parent: "relay.actions" module: "relay.call" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py" --- @@ -24,7 +24,7 @@ class StreamAction(Action) ## Inheritance -**Extends:** [Action](/docs/sdk-reference/reference/python/relay/call/action) +**Extends:** [Action](/docs/sdk-reference/reference/python/relay/actions/action) ## Methods diff --git a/fern/products/sdk-reference/python/relay/call/tap-action/index.mdx b/fern/products/sdk-reference/python/relay/actions/tap-action/index.mdx similarity index 93% rename from fern/products/sdk-reference/python/relay/call/tap-action/index.mdx rename to fern/products/sdk-reference/python/relay/actions/tap-action/index.mdx index 961a49b042..d836dda465 100644 --- a/fern/products/sdk-reference/python/relay/call/tap-action/index.mdx +++ b/fern/products/sdk-reference/python/relay/actions/tap-action/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/relay/call/tap-action" +slug: "/reference/python/relay/actions/tap-action" title: "TapAction" sdk_label: "Python SDK" icon: "python" @@ -8,7 +8,7 @@ lustri: kind: "class" language: "python" qualified_name: "signalwire.relay.call.TapAction" - parent: "relay.call" + parent: "relay.actions" module: "relay.call" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py" --- @@ -24,7 +24,7 @@ class TapAction(Action) ## Inheritance -**Extends:** [Action](/docs/sdk-reference/reference/python/relay/call/action) +**Extends:** [Action](/docs/sdk-reference/reference/python/relay/actions/action) ## Methods diff --git a/fern/products/sdk-reference/python/relay/call/transcribe-action/index.mdx b/fern/products/sdk-reference/python/relay/actions/transcribe-action/index.mdx similarity index 93% rename from fern/products/sdk-reference/python/relay/call/transcribe-action/index.mdx rename to fern/products/sdk-reference/python/relay/actions/transcribe-action/index.mdx index 339444ba01..6972ffcb59 100644 --- a/fern/products/sdk-reference/python/relay/call/transcribe-action/index.mdx +++ b/fern/products/sdk-reference/python/relay/actions/transcribe-action/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/relay/call/transcribe-action" +slug: "/reference/python/relay/actions/transcribe-action" title: "TranscribeAction" sdk_label: "Python SDK" icon: "python" @@ -8,7 +8,7 @@ lustri: kind: "class" language: "python" qualified_name: "signalwire.relay.call.TranscribeAction" - parent: "relay.call" + parent: "relay.actions" module: "relay.call" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py" --- @@ -24,7 +24,7 @@ class TranscribeAction(Action) ## Inheritance -**Extends:** [Action](/docs/sdk-reference/reference/python/relay/call/action) +**Extends:** [Action](/docs/sdk-reference/reference/python/relay/actions/action) ## Methods diff --git a/fern/products/sdk-reference/python/relay/index.mdx b/fern/products/sdk-reference/python/relay/index.mdx index cd2e05467a..e2e4b930c4 100644 --- a/fern/products/sdk-reference/python/relay/index.mdx +++ b/fern/products/sdk-reference/python/relay/index.mdx @@ -39,8 +39,6 @@ module relay ## Modules - - RelayClient — WebSocket + JSON-RPC 2.0 protocol + event dispatch. diff --git a/fern/products/sdk-reference/python/relay/index__2.mdx b/fern/products/sdk-reference/python/relay/index__2.mdx new file mode 100644 index 0000000000..546a7681ca --- /dev/null +++ b/fern/products/sdk-reference/python/relay/index__2.mdx @@ -0,0 +1,18 @@ +--- +slug: "/reference/python/relay/index__2" +title: "relay" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "module" + language: "python" + qualified_name: "relay" +--- +# `relay` + +## Modules + + + + diff --git a/fern/products/sdk-reference/rust/_meta.json b/fern/products/sdk-reference/rust/_meta.json index 7cbb27c58a..cceef1937b 100644 --- a/fern/products/sdk-reference/rust/_meta.json +++ b/fern/products/sdk-reference/rust/_meta.json @@ -6,5 +6,5 @@ "format": "mdx", "platform": "fern", "base_slug": "/reference/rust", - "item_count": 1909 + "item_count": 1910 } \ No newline at end of file diff --git a/fern/products/sdk-reference/rust/index.mdx b/fern/products/sdk-reference/rust/index.mdx index d181244e76..da1bd1f568 100644 --- a/fern/products/sdk-reference/rust/index.mdx +++ b/fern/products/sdk-reference/rust/index.mdx @@ -14,6 +14,7 @@ Version: **1.1.2** - [`agents`](/docs/sdk-reference/reference/rust/agents) - [`core`](/docs/sdk-reference/reference/rust/core) - [`relay`](/docs/sdk-reference/reference/rust/relay) +- [`relay`](/docs/sdk-reference/reference/rust/relay) - [`rest`](/docs/sdk-reference/reference/rust/rest) - [`signalwire`](/docs/sdk-reference/reference/rust/signalwire) diff --git a/fern/products/sdk-reference/rust/relay/action/index.mdx b/fern/products/sdk-reference/rust/relay/actions/action/index.mdx similarity index 98% rename from fern/products/sdk-reference/rust/relay/action/index.mdx rename to fern/products/sdk-reference/rust/relay/actions/action/index.mdx index 57d2a7a4d6..68e3bf0c41 100644 --- a/fern/products/sdk-reference/rust/relay/action/index.mdx +++ b/fern/products/sdk-reference/rust/relay/actions/action/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/rust/relay/action" +slug: "/reference/rust/relay/actions/action" title: "action" sdk_label: "Rust SDK" icon: "rust" @@ -8,7 +8,7 @@ lustri: kind: "class" language: "rust" qualified_name: "signalwire::relay::action" - parent: "signalwire::relay" + parent: "relay.actions" module: "relay" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs" visibility: "public" diff --git a/fern/products/sdk-reference/rust/relay/action/ai-action/index.mdx b/fern/products/sdk-reference/rust/relay/actions/ai-action/index.mdx similarity index 95% rename from fern/products/sdk-reference/rust/relay/action/ai-action/index.mdx rename to fern/products/sdk-reference/rust/relay/actions/ai-action/index.mdx index b3090f43a2..269e636bc3 100644 --- a/fern/products/sdk-reference/rust/relay/action/ai-action/index.mdx +++ b/fern/products/sdk-reference/rust/relay/actions/ai-action/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/rust/relay/action/ai-action" +slug: "/reference/rust/relay/actions/ai-action" title: "AIAction" sdk_label: "Rust SDK" icon: "rust" @@ -8,7 +8,7 @@ lustri: kind: "class" language: "rust" qualified_name: "signalwire::relay::action::AIAction" - parent: "relay.action" + parent: "relay.actions" module: "relay.action" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs" visibility: "public" diff --git a/fern/products/sdk-reference/rust/relay/action/collect-action/index.mdx b/fern/products/sdk-reference/rust/relay/actions/collect-action/index.mdx similarity index 96% rename from fern/products/sdk-reference/rust/relay/action/collect-action/index.mdx rename to fern/products/sdk-reference/rust/relay/actions/collect-action/index.mdx index 1597931006..553c3c8cb6 100644 --- a/fern/products/sdk-reference/rust/relay/action/collect-action/index.mdx +++ b/fern/products/sdk-reference/rust/relay/actions/collect-action/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/rust/relay/action/collect-action" +slug: "/reference/rust/relay/actions/collect-action" title: "CollectAction" sdk_label: "Rust SDK" icon: "rust" @@ -8,7 +8,7 @@ lustri: kind: "class" language: "rust" qualified_name: "signalwire::relay::action::CollectAction" - parent: "relay.action" + parent: "relay.actions" module: "relay.action" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs" visibility: "public" diff --git a/fern/products/sdk-reference/rust/relay/action/detect-action/index.mdx b/fern/products/sdk-reference/rust/relay/actions/detect-action/index.mdx similarity index 96% rename from fern/products/sdk-reference/rust/relay/action/detect-action/index.mdx rename to fern/products/sdk-reference/rust/relay/actions/detect-action/index.mdx index 7b92993d0f..6c06baa55d 100644 --- a/fern/products/sdk-reference/rust/relay/action/detect-action/index.mdx +++ b/fern/products/sdk-reference/rust/relay/actions/detect-action/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/rust/relay/action/detect-action" +slug: "/reference/rust/relay/actions/detect-action" title: "DetectAction" sdk_label: "Rust SDK" icon: "rust" @@ -8,7 +8,7 @@ lustri: kind: "class" language: "rust" qualified_name: "signalwire::relay::action::DetectAction" - parent: "relay.action" + parent: "relay.actions" module: "relay.action" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs" visibility: "public" diff --git a/fern/products/sdk-reference/rust/relay/action/fax-action/index.mdx b/fern/products/sdk-reference/rust/relay/actions/fax-action/index.mdx similarity index 96% rename from fern/products/sdk-reference/rust/relay/action/fax-action/index.mdx rename to fern/products/sdk-reference/rust/relay/actions/fax-action/index.mdx index f692877cdf..d4da6006d3 100644 --- a/fern/products/sdk-reference/rust/relay/action/fax-action/index.mdx +++ b/fern/products/sdk-reference/rust/relay/actions/fax-action/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/rust/relay/action/fax-action" +slug: "/reference/rust/relay/actions/fax-action" title: "FaxAction" sdk_label: "Rust SDK" icon: "rust" @@ -8,7 +8,7 @@ lustri: kind: "class" language: "rust" qualified_name: "signalwire::relay::action::FaxAction" - parent: "relay.action" + parent: "relay.actions" module: "relay.action" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs" visibility: "public" diff --git a/fern/products/sdk-reference/rust/relay/action/index__2.mdx b/fern/products/sdk-reference/rust/relay/actions/index.mdx similarity index 55% rename from fern/products/sdk-reference/rust/relay/action/index__2.mdx rename to fern/products/sdk-reference/rust/relay/actions/index.mdx index e5650df1bf..47db3ca35a 100644 --- a/fern/products/sdk-reference/rust/relay/action/index__2.mdx +++ b/fern/products/sdk-reference/rust/relay/actions/index.mdx @@ -1,38 +1,42 @@ --- -slug: "/reference/rust/relay/action/index__2" -title: "action" +slug: "/reference/rust/relay/actions" +title: "actions" sdk_label: "Rust SDK" icon: "rust" lustri: auto_generated: true kind: "module" language: "rust" - qualified_name: "relay.action" - parent: "signalwire::relay" + qualified_name: "relay.actions" + parent: "relay" module: "relay" --- -# `action` +# `actions` ## Classes - + + Base class for all RELAY call actions (play, record, collect, etc.). + - + - + - + - + - + - + - + - + - + + + diff --git a/fern/products/sdk-reference/rust/relay/action/pay-action/index.mdx b/fern/products/sdk-reference/rust/relay/actions/pay-action/index.mdx similarity index 95% rename from fern/products/sdk-reference/rust/relay/action/pay-action/index.mdx rename to fern/products/sdk-reference/rust/relay/actions/pay-action/index.mdx index 22d2449b87..48c6bfb31e 100644 --- a/fern/products/sdk-reference/rust/relay/action/pay-action/index.mdx +++ b/fern/products/sdk-reference/rust/relay/actions/pay-action/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/rust/relay/action/pay-action" +slug: "/reference/rust/relay/actions/pay-action" title: "PayAction" sdk_label: "Rust SDK" icon: "rust" @@ -8,7 +8,7 @@ lustri: kind: "class" language: "rust" qualified_name: "signalwire::relay::action::PayAction" - parent: "relay.action" + parent: "relay.actions" module: "relay.action" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs" visibility: "public" diff --git a/fern/products/sdk-reference/rust/relay/action/play-action/index.mdx b/fern/products/sdk-reference/rust/relay/actions/play-action/index.mdx similarity index 96% rename from fern/products/sdk-reference/rust/relay/action/play-action/index.mdx rename to fern/products/sdk-reference/rust/relay/actions/play-action/index.mdx index 1313a61b04..31974e11dc 100644 --- a/fern/products/sdk-reference/rust/relay/action/play-action/index.mdx +++ b/fern/products/sdk-reference/rust/relay/actions/play-action/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/rust/relay/action/play-action" +slug: "/reference/rust/relay/actions/play-action" title: "PlayAction" sdk_label: "Rust SDK" icon: "rust" @@ -8,7 +8,7 @@ lustri: kind: "class" language: "rust" qualified_name: "signalwire::relay::action::PlayAction" - parent: "relay.action" + parent: "relay.actions" module: "relay.action" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs" visibility: "public" diff --git a/fern/products/sdk-reference/rust/relay/action/record-action/index.mdx b/fern/products/sdk-reference/rust/relay/actions/record-action/index.mdx similarity index 97% rename from fern/products/sdk-reference/rust/relay/action/record-action/index.mdx rename to fern/products/sdk-reference/rust/relay/actions/record-action/index.mdx index c0f2e951d5..fb9700d755 100644 --- a/fern/products/sdk-reference/rust/relay/action/record-action/index.mdx +++ b/fern/products/sdk-reference/rust/relay/actions/record-action/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/rust/relay/action/record-action" +slug: "/reference/rust/relay/actions/record-action" title: "RecordAction" sdk_label: "Rust SDK" icon: "rust" @@ -8,7 +8,7 @@ lustri: kind: "class" language: "rust" qualified_name: "signalwire::relay::action::RecordAction" - parent: "relay.action" + parent: "relay.actions" module: "relay.action" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs" visibility: "public" diff --git a/fern/products/sdk-reference/rust/relay/action/stream-action/index.mdx b/fern/products/sdk-reference/rust/relay/actions/stream-action/index.mdx similarity index 95% rename from fern/products/sdk-reference/rust/relay/action/stream-action/index.mdx rename to fern/products/sdk-reference/rust/relay/actions/stream-action/index.mdx index ff7cf73125..7f28a9bfd0 100644 --- a/fern/products/sdk-reference/rust/relay/action/stream-action/index.mdx +++ b/fern/products/sdk-reference/rust/relay/actions/stream-action/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/rust/relay/action/stream-action" +slug: "/reference/rust/relay/actions/stream-action" title: "StreamAction" sdk_label: "Rust SDK" icon: "rust" @@ -8,7 +8,7 @@ lustri: kind: "class" language: "rust" qualified_name: "signalwire::relay::action::StreamAction" - parent: "relay.action" + parent: "relay.actions" module: "relay.action" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs" visibility: "public" diff --git a/fern/products/sdk-reference/rust/relay/action/tap-action/index.mdx b/fern/products/sdk-reference/rust/relay/actions/tap-action/index.mdx similarity index 95% rename from fern/products/sdk-reference/rust/relay/action/tap-action/index.mdx rename to fern/products/sdk-reference/rust/relay/actions/tap-action/index.mdx index d08338d92f..042fbd8c38 100644 --- a/fern/products/sdk-reference/rust/relay/action/tap-action/index.mdx +++ b/fern/products/sdk-reference/rust/relay/actions/tap-action/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/rust/relay/action/tap-action" +slug: "/reference/rust/relay/actions/tap-action" title: "TapAction" sdk_label: "Rust SDK" icon: "rust" @@ -8,7 +8,7 @@ lustri: kind: "class" language: "rust" qualified_name: "signalwire::relay::action::TapAction" - parent: "relay.action" + parent: "relay.actions" module: "relay.action" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs" visibility: "public" diff --git a/fern/products/sdk-reference/rust/relay/action/transcribe-action/index.mdx b/fern/products/sdk-reference/rust/relay/actions/transcribe-action/index.mdx similarity index 95% rename from fern/products/sdk-reference/rust/relay/action/transcribe-action/index.mdx rename to fern/products/sdk-reference/rust/relay/actions/transcribe-action/index.mdx index 6353872c49..e184d13ac8 100644 --- a/fern/products/sdk-reference/rust/relay/action/transcribe-action/index.mdx +++ b/fern/products/sdk-reference/rust/relay/actions/transcribe-action/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/rust/relay/action/transcribe-action" +slug: "/reference/rust/relay/actions/transcribe-action" title: "TranscribeAction" sdk_label: "Rust SDK" icon: "rust" @@ -8,7 +8,7 @@ lustri: kind: "class" language: "rust" qualified_name: "signalwire::relay::action::TranscribeAction" - parent: "relay.action" + parent: "relay.actions" module: "relay.action" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs" visibility: "public" diff --git a/fern/products/sdk-reference/rust/relay/index.mdx b/fern/products/sdk-reference/rust/relay/index.mdx index ed32d33858..f973ecc386 100644 --- a/fern/products/sdk-reference/rust/relay/index.mdx +++ b/fern/products/sdk-reference/rust/relay/index.mdx @@ -16,10 +16,6 @@ lustri: ## Classes - - Base class for all RELAY call actions (play, record, collect, etc.). - - Represents a RELAY voice call. @@ -44,8 +40,6 @@ lustri: ## Modules - - RELAY module -- real-time event signalling over WebSocket (JSON-RPC 2.0). diff --git a/fern/products/sdk-reference/rust/relay/index__2.mdx b/fern/products/sdk-reference/rust/relay/index__2.mdx new file mode 100644 index 0000000000..9e7410b496 --- /dev/null +++ b/fern/products/sdk-reference/rust/relay/index__2.mdx @@ -0,0 +1,18 @@ +--- +slug: "/reference/rust/relay/index__2" +title: "relay" +sdk_label: "Rust SDK" +icon: "rust" +lustri: + auto_generated: true + kind: "module" + language: "rust" + qualified_name: "relay" +--- +# `relay` + +## Modules + + + + diff --git a/fern/products/sdk-reference/typescript/_meta.json b/fern/products/sdk-reference/typescript/_meta.json index 596564fde5..e9e2be89b4 100644 --- a/fern/products/sdk-reference/typescript/_meta.json +++ b/fern/products/sdk-reference/typescript/_meta.json @@ -6,5 +6,5 @@ "format": "mdx", "platform": "fern", "base_slug": "/reference/typescript", - "item_count": 3912 + "item_count": 3913 } \ No newline at end of file diff --git a/fern/products/sdk-reference/typescript/agents/auth-handler/index.mdx b/fern/products/sdk-reference/typescript/agents/configuration/auth-handler/index.mdx similarity index 97% rename from fern/products/sdk-reference/typescript/agents/auth-handler/index.mdx rename to fern/products/sdk-reference/typescript/agents/configuration/auth-handler/index.mdx index 1347ecbe38..4d07d5fbec 100644 --- a/fern/products/sdk-reference/typescript/agents/auth-handler/index.mdx +++ b/fern/products/sdk-reference/typescript/agents/configuration/auth-handler/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/agents/auth-handler" +slug: "/reference/typescript/agents/configuration/auth-handler" title: "AuthHandler" sdk_label: "TypeScript SDK" icon: "typescript" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "typescript" qualified_name: "AuthHandler" - parent: "agents" - module: "agents" + parent: "agents.configuration" + module: "agents.configuration" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/AuthHandler.ts" --- # `AuthHandler` @@ -64,7 +64,7 @@ Create an Express/Connect-compatible middleware adapter. This serves as the framework-agnostic equivalent of Python's `get_fastapi_dependency`. For standalone validation without a -framework, use [validate](/docs/sdk-reference/reference/typescript/agents/auth-handler#validate) directly. +framework, use [validate](/docs/sdk-reference/reference/typescript/agents/configuration/auth-handler#validate) directly. #### Signature diff --git a/fern/products/sdk-reference/typescript/agents/auth-handler/index__2.mdx b/fern/products/sdk-reference/typescript/agents/configuration/auth-handler/index__2.mdx similarity index 82% rename from fern/products/sdk-reference/typescript/agents/auth-handler/index__2.mdx rename to fern/products/sdk-reference/typescript/agents/configuration/auth-handler/index__2.mdx index 8a4cdf2360..3e56cec644 100644 --- a/fern/products/sdk-reference/typescript/agents/auth-handler/index__2.mdx +++ b/fern/products/sdk-reference/typescript/agents/configuration/auth-handler/index__2.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/agents/auth-handler/index__2" +slug: "/reference/typescript/agents/configuration/auth-handler/index__2" title: "AuthHandler" sdk_label: "TypeScript SDK" icon: "typescript" @@ -7,9 +7,9 @@ lustri: auto_generated: true kind: "module" language: "typescript" - qualified_name: "agents.AuthHandler" - parent: "agents" - module: "agents" + qualified_name: "agents.configuration.AuthHandler" + parent: "agents.configuration" + module: "agents.configuration" --- # `AuthHandler` @@ -17,7 +17,7 @@ lustri: ### AuthConfig -Configuration for one or more authentication methods checked by [AuthHandler](/docs/sdk-reference/reference/typescript/agents/auth-handler). +Configuration for one or more authentication methods checked by [AuthHandler](/docs/sdk-reference/reference/typescript/agents/configuration/auth-handler). #### Signature diff --git a/fern/products/sdk-reference/typescript/agents/config-loader/index.mdx b/fern/products/sdk-reference/typescript/agents/configuration/config-loader/index.mdx similarity index 96% rename from fern/products/sdk-reference/typescript/agents/config-loader/index.mdx rename to fern/products/sdk-reference/typescript/agents/configuration/config-loader/index.mdx index b1b41ba2ff..a18eff16c8 100644 --- a/fern/products/sdk-reference/typescript/agents/config-loader/index.mdx +++ b/fern/products/sdk-reference/typescript/agents/configuration/config-loader/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/typescript/agents/config-loader" +slug: "/reference/typescript/agents/configuration/config-loader" title: "ConfigLoader" sdk_label: "TypeScript SDK" icon: "typescript" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "typescript" qualified_name: "ConfigLoader" - parent: "agents" - module: "agents" + parent: "agents.configuration" + module: "agents.configuration" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/ConfigLoader.ts" --- # `ConfigLoader` @@ -159,7 +159,7 @@ Line 247. ### getConfig -Alias for [getAll](/docs/sdk-reference/reference/typescript/agents/config-loader#get-all) — matches the Python SDK's `get_config()` method name. +Alias for [getAll](/docs/sdk-reference/reference/typescript/agents/configuration/config-loader#get-all) — matches the Python SDK's `get_config()` method name. #### Signature @@ -181,7 +181,7 @@ Line 255. ### getConfigFile -Alias for [getFilePath](/docs/sdk-reference/reference/typescript/agents/config-loader#get-file-path) — matches the Python SDK's `get_config_file()` method name. +Alias for [getFilePath](/docs/sdk-reference/reference/typescript/agents/configuration/config-loader#get-file-path) — matches the Python SDK's `get_config_file()` method name. #### Signature @@ -286,7 +286,7 @@ Check if a configuration was loaded. **Deliberate deviation from Python `has_config()`:** Python returns `True` only when a file was loaded (`self._config is not None`). This TypeScript implementation also returns `true` when data was loaded via -[loadFromObject](/docs/sdk-reference/reference/typescript/agents/config-loader#load-from-object), because `loadFromObject` is an extra TS-only method +[loadFromObject](/docs/sdk-reference/reference/typescript/agents/configuration/config-loader#load-from-object), because `loadFromObject` is an extra TS-only method with no Python equivalent. Treating object-loaded data as "configured" is the correct semantic for the TS API surface. diff --git a/fern/products/sdk-reference/typescript/agents/configuration/index.mdx b/fern/products/sdk-reference/typescript/agents/configuration/index.mdx new file mode 100644 index 0000000000..7d00ee17fa --- /dev/null +++ b/fern/products/sdk-reference/typescript/agents/configuration/index.mdx @@ -0,0 +1,32 @@ +--- +slug: "/reference/typescript/agents/configuration" +title: "configuration" +sdk_label: "TypeScript SDK" +icon: "typescript" +lustri: + auto_generated: true + kind: "module" + language: "typescript" + qualified_name: "agents.configuration" + parent: "agents" + module: "agents" +--- +# `configuration` + +## Classes + + + + Multi-method authentication handler with timing-safe credential comparison. + + + + JSON configuration file loader with environment variable interpolation and dot-notation access. + + + +## Modules + + + + diff --git a/fern/products/sdk-reference/typescript/agents/index.mdx b/fern/products/sdk-reference/typescript/agents/index.mdx index 8d99f5a66c..200e34ba4b 100644 --- a/fern/products/sdk-reference/typescript/agents/index.mdx +++ b/fern/products/sdk-reference/typescript/agents/index.mdx @@ -22,14 +22,6 @@ lustri: Multi-agent HTTP server that hosts multiple AgentBase instances on distinct route prefixes. - - Multi-method authentication handler with timing-safe credential comparison. - - - - JSON configuration file loader with environment variable interpolation and dot-notation access. - - Builder for multi-step, multi-context AI agent workflows. @@ -90,10 +82,10 @@ lustri: ## Modules - - + + From 2f45021834ff8a0ad57354b23899b3bd2a9593cc Mon Sep 17 00:00:00 2001 From: Devon-White Date: Fri, 12 Jun 2026 12:21:13 -0400 Subject: [PATCH 6/8] SDK Reference: four-section nav + collapse single-class namespaces MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Regenerate all 10 SDK references (compact layout) and restructure the sidebar to match the hand-written server-sdks reference. Navigation (sdk-reference.yml): each language now lists four explicit top-level sections — Core / Agents / RELAY / REST Client — instead of a single auto-expanded ./ folder. This gives a clean, curated sidebar and excludes package-root wrapper pages. Content (Lustri namespace_shape + compact-layout fixes): - REST namespaces that wrap a single resource class (addresses, chat, mfa, queues, …) now render that class's methods inline on the namespace page instead of a redundant nested -resource/ subpage. Multi-resource namespaces (compat, fabric, video, …) stay expanded. - relay/call no longer double-renders (module + class) — single page. - TypeScript top-level free functions are routed into their namespace: the skill-registry helpers live under Agents; the restClient factory (duplicate of the RestClient class already under REST) is dropped. Backed by Lustri engine fixes (collapse single-class modules, root-level free-function moves, synth-chain container reuse). --- fern/products/sdk-reference/cpp/_meta.json | 2 +- .../products/sdk-reference/cpp/core/index.mdx | 8 +- .../sdk-reference/cpp/core/logging/index.mdx | 118 +- .../cpp/core/logging/logger/index.mdx | 138 - fern/products/sdk-reference/cpp/index.mdx | 1 - .../products/sdk-reference/cpp/rest/index.mdx | 6 - .../rest-client/addresses-namespace/index.mdx | 2 +- .../rest-client/calling-namespace/index.mdx | 2 +- .../rest/rest-client/chat-namespace/index.mdx | 2 +- .../rest-client/compat-accounts/index.mdx | 2 +- .../rest-client/compat-applications/index.mdx | 2 +- .../rest/rest-client/compat-calls/index.mdx | 2 +- .../rest-client/compat-conferences/index.mdx | 2 +- .../rest/rest-client/compat-faxes/index.mdx | 2 +- .../rest-client/compat-laml-bins/index.mdx | 2 +- .../rest-client/compat-messages/index.mdx | 2 +- .../rest-client/compat-namespace/index.mdx | 2 +- .../compat-phone-numbers/index.mdx | 2 +- .../rest/rest-client/compat-queues/index.mdx | 2 +- .../rest-client/compat-recordings/index.mdx | 2 +- .../rest/rest-client/compat-tokens/index.mdx | 2 +- .../compat-transcriptions/index.mdx | 2 +- .../datasphere-documents/index.mdx | 2 +- .../datasphere-namespace/index.mdx | 2 +- .../rest-client/fabric-addresses/index.mdx | 2 +- .../rest-client/fabric-call-flows/index.mdx | 2 +- .../fabric-conference-rooms/index.mdx | 2 +- .../fabric-cxml-applications/index.mdx | 2 +- .../fabric-generic-resources/index.mdx | 2 +- .../rest-client/fabric-namespace/index.mdx | 2 +- .../rest-client/fabric-resource-put/index.mdx | 2 +- .../rest-client/fabric-resource/index.mdx | 2 +- .../rest-client/fabric-subscribers/index.mdx | 2 +- .../rest/rest-client/fabric-tokens/index.mdx | 2 +- .../imported-numbers-namespace/index.mdx | 2 +- .../cpp/rest/rest-client/index.mdx | 122 + .../cpp/rest/rest-client/index__2.mdx | 142 - .../rest-client/logs-conferences/index.mdx | 2 +- .../cpp/rest/rest-client/logs-fax/index.mdx | 2 +- .../rest/rest-client/logs-messages/index.mdx | 2 +- .../rest/rest-client/logs-namespace/index.mdx | 2 +- .../cpp/rest/rest-client/logs-voice/index.mdx | 2 +- .../rest-client/lookup-namespace/index.mdx | 2 +- .../rest/rest-client/mfa-namespace/index.mdx | 2 +- .../number-groups-namespace/index.mdx | 2 +- .../call-flow-options/index.mdx | 2 +- .../cxml-webhook-options/index.mdx | 2 +- .../phone-numbers-namespace/index.mdx | 18 +- .../phone-numbers-namespace/index__2.mdx | 30 - .../relay-topic-options/index.mdx | 2 +- .../rest-client/project-namespace/index.mdx | 2 +- .../rest/rest-client/project-tokens/index.mdx | 2 +- .../rest-client/pub-sub-namespace/index.mdx | 2 +- .../rest-client/queues-namespace/index.mdx | 2 +- .../recordings-namespace/index.mdx | 2 +- .../rest-client/registry-brands/index.mdx | 2 +- .../rest-client/registry-campaigns/index.mdx | 2 +- .../rest-client/registry-namespace/index.mdx | 2 +- .../rest-client/registry-numbers/index.mdx | 2 +- .../rest-client/registry-orders/index.mdx | 2 +- .../short-codes-namespace/index.mdx | 2 +- .../sip-profile-namespace/index.mdx | 2 +- .../verified-callers-namespace/index.mdx | 2 +- .../video-conference-tokens/index.mdx | 2 +- .../rest-client/video-conferences/index.mdx | 2 +- .../rest-client/video-namespace/index.mdx | 2 +- .../video-room-recordings/index.mdx | 2 +- .../rest-client/video-room-sessions/index.mdx | 2 +- .../rest-client/video-room-tokens/index.mdx | 2 +- .../rest/rest-client/video-rooms/index.mdx | 2 +- .../rest/rest-client/video-streams/index.mdx | 2 +- .../sdk-reference/cpp/signalwire/index.mdx | 248 +- .../cpp/signalwire/logger/index.mdx | 264 -- .../dotnet/agents/data-map/index.mdx | 514 +-- .../dotnet/agents/data-map/index__2.mdx | 14 - .../data-map/signal-wire.data-map/index.mdx | 515 +++ .../sdk-reference/dotnet/agents/index.mdx | 10 +- .../dotnet/agents/server/index.mdx | 2 +- .../index.mdx | 9 +- .../dotnet/agents/serverless/index.mdx | 2 +- .../index.mdx | 9 +- .../dotnet/core/logging/index.mdx | 2 +- .../{logger => signal-wire.logging}/index.mdx | 9 +- fern/products/sdk-reference/go/_meta.json | 2 +- .../go/agents/datamap/datamap/index.mdx | 2 +- .../sdk-reference/go/agents/datamap/index.mdx | 6 + .../go/agents/datamap/index__2.mdx | 20 - .../sdk-reference/go/agents/index.mdx | 10 +- .../sdk-reference/go/agents/lambda/index.mdx | 94 +- .../go/agents/lambda/lambda/handler/index.mdx | 85 - .../go/agents/lambda/lambda/index.mdx | 22 - fern/products/sdk-reference/go/core/index.mdx | 8 +- .../sdk-reference/go/core/logging/index.mdx | 110 +- .../go/core/logging/logging/index.mdx | 8 - .../go/core/logging/logging/logger/index.mdx | 125 - fern/products/sdk-reference/java/_meta.json | 2 +- .../agents/agent/agent/agent-base/index.mdx | 2940 ----------------- .../agent/agent/agent-base/index__2.mdx | 67 - .../agent/{agent-base => }/builder/index.mdx | 6 +- .../java/agents/agent/agent/index.mdx | 53 +- .../sdk-reference/java/agents/agent/index.mdx | 2923 +++++++++++++++- .../java/agents/cli/cli/index.mdx | 22 - .../java/agents/cli/cli/swaig-test/index.mdx | 136 - .../sdk-reference/java/agents/cli/index.mdx | 121 +- .../java/agents/cli/simulation/index.mdx | 6 +- .../cli/simulation/simulation/index.mdx | 345 +- .../simulation/serverless-simulator/index.mdx | 288 -- .../serverless-simulator/index__2.mdx | 82 - .../sdk-reference/java/agents/index.mdx | 24 +- .../java/agents/runtime/index.mdx | 100 +- .../java/agents/runtime/runtime/index.mdx | 8 - .../runtime/lambda-url-resolver/index.mdx | 117 - .../java/agents/server/index.mdx | 444 ++- .../server/server/agent-server/index.mdx | 459 --- .../java/agents/server/server/index.mdx | 22 - .../java/agents/swaig/swaig/index.mdx | 6 - .../swaig/parameter-schema/builder/index.mdx | 2 +- .../swaig/swaig/parameter-schema/index.mdx | 8 + .../swaig/swaig/parameter-schema/index__2.mdx | 22 - .../java/agents/swml/swml/index.mdx | 6 - .../agents/swml/swml/schema-utils/index.mdx | 8 + .../swml/swml/schema-utils/index__2.mdx | 22 - .../swml/schema-utils/verb-info/index.mdx | 2 +- .../java/com/signalwire/sdk/sdk/index.mdx | 196 +- .../signalwire/sdk/sdk/signalwire/index.mdx | 209 -- .../sdk-reference/java/core/index.mdx | 16 +- .../sdk-reference/java/core/logging/index.mdx | 312 +- .../java/core/logging/logging/index.mdx | 98 +- .../core/logging/logging/logger/index.mdx | 329 -- .../core/logging/logging/logger/index__2.mdx | 106 - .../java/core/security/security/index.mdx | 6 - .../index.mdx | 2 +- .../security/webhook-filter/index.mdx | 8 + .../security/webhook-filter/index__2.mdx | 22 - .../sdk-reference/java/core/utils/index.mdx | 65 +- .../java/core/utils/utils/index.mdx | 22 - .../core/utils/utils/url-validator/index.mdx | 80 - fern/products/sdk-reference/java/index.mdx | 1 - .../java/relay/action/ai-action/index.mdx | 2 +- .../relay/action/collect-action/index.mdx | 2 +- .../java/relay/action/detect-action/index.mdx | 2 +- .../sdk-reference/java/relay/action/index.mdx | 52 + .../java/relay/action/index__2.mdx | 66 - .../java/relay/action/pay-action/index.mdx | 2 +- .../java/relay/action/play-action/index.mdx | 2 +- .../action/play-and-collect-action/index.mdx | 2 +- .../relay/action/receive-fax-action/index.mdx | 2 +- .../java/relay/action/record-action/index.mdx | 2 +- .../relay/action/send-fax-action/index.mdx | 2 +- .../java/relay/action/stream-action/index.mdx | 2 +- .../java/relay/action/tap-action/index.mdx | 2 +- .../relay/action/transcribe-action/index.mdx | 2 +- .../sdk-reference/java/relay/index.mdx | 10 - .../java/relay/relay-client/builder/index.mdx | 2 +- .../java/relay/relay-client/index.mdx | 6 + .../java/relay/relay-client/index__2.mdx | 20 - .../authorization-state-event/index.mdx | 2 +- .../relay-event/call-collect-event/index.mdx | 2 +- .../relay-event/call-connect-event/index.mdx | 2 +- .../relay-event/call-detect-event/index.mdx | 2 +- .../relay-event/call-dial-event/index.mdx | 2 +- .../relay-event/call-fax-event/index.mdx | 2 +- .../relay-event/call-pay-event/index.mdx | 2 +- .../relay-event/call-play-event/index.mdx | 2 +- .../relay-event/call-receive-event/index.mdx | 2 +- .../relay-event/call-record-event/index.mdx | 2 +- .../relay-event/call-refer-event/index.mdx | 2 +- .../call-send-digits-event/index.mdx | 2 +- .../relay-event/call-state-event/index.mdx | 2 +- .../relay-event/call-stream-event/index.mdx | 2 +- .../relay-event/call-tap-event/index.mdx | 2 +- .../call-transcribe-event/index.mdx | 2 +- .../relay-event/conference-event/index.mdx | 2 +- .../java/relay/relay-event/index.mdx | 84 + .../java/relay/relay-event/index__2.mdx | 98 - .../messaging-receive-event/index.mdx | 2 +- .../messaging-state-event/index.mdx | 2 +- .../relay/relay-event/queue-event/index.mdx | 2 +- .../sdk-reference/java/rest/index.mdx | 2 - .../compat-accounts/index.mdx | 2 +- .../compat-applications/index.mdx | 2 +- .../compat-namespace/compat-calls/index.mdx | 2 +- .../compat-conferences/index.mdx | 2 +- .../compat-namespace/compat-faxes/index.mdx | 2 +- .../compat-laml-bins/index.mdx | 2 +- .../compat-messages/index.mdx | 2 +- .../compat-phone-numbers/index.mdx | 2 +- .../compat-namespace/compat-queues/index.mdx | 2 +- .../compat-recordings/index.mdx | 2 +- .../compat-namespace/compat-tokens/index.mdx | 2 +- .../compat-transcriptions/index.mdx | 2 +- .../namespaces/compat-namespace/index.mdx | 52 + .../namespaces/compat-namespace/index__2.mdx | 66 - .../datasphere-documents/index.mdx | 2 +- .../namespaces/datasphere-namespace/index.mdx | 8 + .../datasphere-namespace/index__2.mdx | 22 - .../call-flows-resource/index.mdx | 2 +- .../conference-rooms-resource/index.mdx | 2 +- .../cxml-applications-resource/index.mdx | 2 +- .../fabric-addresses/index.mdx | 2 +- .../fabric-subscribers/index.mdx | 2 +- .../fabric-namespace/fabric-tokens/index.mdx | 2 +- .../generic-resources/index.mdx | 2 +- .../namespaces/fabric-namespace/index.mdx | 32 + .../namespaces/fabric-namespace/index__2.mdx | 46 - .../java/rest/namespaces/namespaces/index.mdx | 18 - .../logs-namespace/conference-logs/index.mdx | 2 +- .../logs-namespace/fax-logs/index.mdx | 2 +- .../namespaces/logs-namespace/index.mdx | 20 + .../namespaces/logs-namespace/index__2.mdx | 34 - .../logs-namespace/message-logs/index.mdx | 2 +- .../logs-namespace/voice-logs/index.mdx | 2 +- .../namespaces/project-namespace/index.mdx | 8 + .../namespaces/project-namespace/index__2.mdx | 22 - .../project-tokens/index.mdx | 2 +- .../namespaces/registry-namespace/index.mdx | 20 + .../registry-namespace/index__2.mdx | 34 - .../registry-brands/index.mdx | 2 +- .../registry-campaigns/index.mdx | 2 +- .../registry-numbers/index.mdx | 2 +- .../registry-orders/index.mdx | 2 +- .../namespaces/video-namespace/index.mdx | 28 + .../namespaces/video-namespace/index__2.mdx | 42 - .../video-conference-tokens/index.mdx | 2 +- .../video-conferences/index.mdx | 2 +- .../video-room-recordings/index.mdx | 2 +- .../video-room-sessions/index.mdx | 2 +- .../video-namespace/video-rooms/index.mdx | 2 +- .../video-namespace/video-streams/index.mdx | 2 +- .../java/rest/rest-client/builder/index.mdx | 2 +- .../java/rest/rest-client/index.mdx | 6 + .../java/rest/rest-client/index__2.mdx | 20 - fern/products/sdk-reference/php/_meta.json | 2 +- .../sdk-reference/php/agents/index.mdx | 10 +- .../sdk-reference/php/agents/server/index.mdx | 463 ++- .../server/server/agent-server/index.mdx | 477 --- .../php/agents/server/server/index.mdx | 20 - .../php/agents/serverless/index.mdx | 243 +- .../serverless/serverless/adapter/index.mdx | 259 -- .../agents/serverless/serverless/index.mdx | 8 - fern/products/sdk-reference/php/index.mdx | 2 - .../sdk-reference/php/relay/action/index.mdx | 2 +- .../php/relay/ai-action/index.mdx | 2 +- .../sdk-reference/php/relay/call/index.mdx | 2 +- .../sdk-reference/php/relay/client/index.mdx | 2 +- .../php/relay/collect-action/index.mdx | 2 +- .../php/relay/constants/index.mdx | 2 +- .../php/relay/detect-action/index.mdx | 2 +- .../sdk-reference/php/relay/device/index.mdx | 2 +- .../sdk-reference/php/relay/event/index.mdx | 2 +- .../php/relay/fax-action/index.mdx | 2 +- .../sdk-reference/php/relay/index.mdx | 768 +++++ .../sdk-reference/php/relay/index__2.mdx | 780 ----- .../sdk-reference/php/relay/message/index.mdx | 2 +- .../php/relay/pay-action/index.mdx | 2 +- .../php/relay/play-action/index.mdx | 2 +- .../php/relay/record-action/index.mdx | 2 +- .../php/relay/relay-error/index.mdx | 2 +- .../php/relay/stream-action/index.mdx | 2 +- .../php/relay/tap-action/index.mdx | 2 +- .../php/relay/transcribe-action/index.mdx | 2 +- .../php/relay/web-socket/index.mdx | 2 +- .../php/rest/base-resource/index.mdx | 2 +- .../php/rest/crud-resource/index.mdx | 2 +- .../php/rest/crud-with-addresses/index.mdx | 2 +- .../php/rest/http-client/index.mdx | 2 +- .../products/sdk-reference/php/rest/index.mdx | 38 + .../sdk-reference/php/rest/index__2.mdx | 50 - .../php/rest/namespaces/index.mdx | 2 +- .../php/rest/paginated-iterator/index.mdx | 2 +- .../php/rest/rest-client/index.mdx | 2 +- .../php/rest/signal-wire-rest-error/index.mdx | 2 +- fern/products/sdk-reference/python/_meta.json | 2 +- .../python/agents/agent-base/index.mdx | 757 ++++- .../python/agents/agent-base/index__2.mdx | 779 ----- .../agent-server/add-security-headers.mdx | 2 +- .../python/agents/agent-server/index.mdx | 383 ++- .../python/agents/agent-server/index__2.mdx | 403 --- .../python/agents/agent/prompt/index.mdx | 4 +- .../agents/agent/prompt/manager/index.mdx | 420 ++- .../prompt/manager/prompt-manager/index.mdx | 434 --- .../agents/agent/tools/decorator/index.mdx | 73 +- .../tools/decorator/tool-decorator/index.mdx | 85 - .../python/agents/agent/tools/index.mdx | 10 +- .../agents/agent/tools/registry/index.mdx | 295 +- .../tools/registry/tool-registry/index.mdx | 309 -- .../custom-argument-parser/index.mdx | 123 - .../cli/core/argparse-helpers/index.mdx | 109 +- .../python/agents/cli/core/index.mdx | 18 +- .../agents/cli/core/service-loader/index.mdx | 71 +- .../service-loader/service-capture/index.mdx | 83 - .../configuration/auth-handler/index.mdx | 200 +- .../configuration/auth-handler/index__2.mdx | 220 -- .../configuration/config-loader/index.mdx | 273 +- .../configuration/config-loader/index__2.mdx | 293 -- .../python/agents/configuration/index.mdx | 22 +- .../configuration/security-config/index.mdx | 290 +- .../security-config/index__2.mdx | 310 -- .../python/agents/data-map/index.mdx | 642 +++- .../python/agents/data-map/index__2.mdx | 660 ---- .../python/agents/function-result/index.mdx | 2233 ++++++++++++- .../agents/function-result/index__2.mdx | 2253 ------------- .../python/agents/gateway-service/index.mdx | 22 - .../gateway-service/mcp-gateway/index.mdx | 105 - .../sdk-reference/python/agents/index.mdx | 68 +- .../mcp-gateway/gateway-service/index.mdx | 87 +- .../gateway-service}/set-security-headers.mdx | 4 +- .../python/agents/mcp-gateway/index.mdx | 8 +- .../ai-config-mixin/ai-config-mixin/index.mdx | 963 ------ .../agents/mixins/ai-config-mixin/index.mdx | 949 +++++- .../mixins/auth-mixin/auth-mixin/index.mdx | 93 - .../python/agents/mixins/auth-mixin/index.mdx | 79 +- .../python/agents/mixins/index.mdx | 20 +- .../agents/mixins/mcp-server-mixin/index.mdx | 21 +- .../mcp-server-mixin/index.mdx | 29 - .../agents/mixins/prompt-mixin/index.mdx | 400 ++- .../prompt-mixin/prompt-mixin/index.mdx | 414 --- .../agents/mixins/serverless-mixin/index.mdx | 53 +- .../serverless-mixin/index.mdx | 65 - .../agents/mixins/skill-mixin/index.mdx | 125 +- .../mixins/skill-mixin/skill-mixin/index.mdx | 139 - .../agents/mixins/state-mixin/index.mdx | 51 +- .../mixins/state-mixin/state-mixin/index.mdx | 65 - .../python/agents/mixins/tool-mixin/index.mdx | 295 +- .../mixins/tool-mixin/tool-mixin/index.mdx | 309 -- .../python/agents/mixins/web-mixin/index.mdx | 393 ++- .../mixins/web-mixin/web-mixin/index.mdx | 405 --- .../python/agents/pom-builder/index.mdx | 361 +- .../python/agents/pom-builder/index__2.mdx | 381 --- .../concierge/concierge-agent/index.mdx | 210 -- .../python/agents/prefabs/concierge/index.mdx | 194 +- .../prefabs/faq-bot/faq-bot-agent/index.mdx | 168 - .../python/agents/prefabs/faq-bot/index.mdx | 152 +- .../python/agents/prefabs/index.mdx | 12 +- .../agents/prefabs/info-gatherer/index.mdx | 206 +- .../info-gatherer-agent/index.mdx | 222 -- .../agents/prefabs/receptionist/index.mdx | 106 +- .../receptionist/receptionist-agent/index.mdx | 122 - .../python/agents/prefabs/survey/index.mdx | 209 +- .../prefabs/survey/survey-agent/index.mdx | 225 -- .../document-processor/index.mdx | 151 - .../search/document-processor/index__2.mdx | 137 +- .../index-builder/index-builder/index.mdx | 271 -- .../agents/search/index-builder/index__2.mdx | 257 +- .../python/agents/search/index.mdx | 32 +- .../python/agents/search/migration/index.mdx | 166 +- .../migration/search-index-migrator/index.mdx | 180 - .../agents/search/search-engine/index__2.mdx | 166 +- .../search-engine/search-engine/index.mdx | 180 - .../agents/search/search-service/index.mdx | 14 + .../agents/search/search-service/index__2.mdx | 14 - .../search-service/search-request/index.mdx | 2 +- .../search-service/search-response/index.mdx | 2 +- .../search-service/search-result/index.mdx | 2 +- .../search-service/search-service/index.mdx | 2 +- .../python/agents/skill-base/index.mdx | 418 ++- .../python/agents/skill-base/index__2.mdx | 436 --- .../python/agents/skill-manager/index.mdx | 185 +- .../python/agents/skill-manager/index__2.mdx | 203 -- .../agents/skills/api-ninjas-trivia/index.mdx | 4 +- .../skill/api-ninjas-trivia-skill/index.mdx | 227 -- .../skills/api-ninjas-trivia/skill/index.mdx | 211 +- .../agents/skills/claude-skills/index.mdx | 4 +- .../skill/claude-skills-skill/index.mdx | 182 - .../skills/claude-skills/skill/index.mdx | 164 +- .../skills/datasphere-serverless/index.mdx | 4 +- .../data-sphere-serverless-skill/index.mdx | 206 -- .../datasphere-serverless/skill/index.mdx | 192 +- .../python/agents/skills/datasphere/index.mdx | 4 +- .../skill/data-sphere-skill/index.mdx | 228 -- .../agents/skills/datasphere/skill/index.mdx | 214 +- .../python/agents/skills/datetime/index.mdx | 4 +- .../datetime/skill/date-time-skill/index.mdx | 161 - .../agents/skills/datetime/skill/index.mdx | 147 +- .../skill/google-maps-skill/index.mdx | 2 +- .../python/agents/skills/index.mdx | 12 +- .../agents/skills/info-gatherer/index.mdx | 4 +- .../skills/info-gatherer/skill/index.mdx | 141 +- .../skill/info-gatherer-skill/index.mdx | 155 - .../python/agents/skills/joke/index.mdx | 4 +- .../python/agents/skills/joke/skill/index.mdx | 166 +- .../skills/joke/skill/joke-skill/index.mdx | 180 - .../python/agents/skills/math/index.mdx | 4 +- .../python/agents/skills/math/skill/index.mdx | 147 +- .../skills/math/skill/math-skill/index.mdx | 161 - .../agents/skills/mcp-gateway/index.mdx | 4 +- .../agents/skills/mcp-gateway/skill/index.mdx | 167 +- .../skill/mcp-gateway-skill/index.mdx | 183 - .../skills/native-vector-search/index.mdx | 4 +- .../native-vector-search/skill/index.mdx | 220 +- .../native-vector-search-skill/index.mdx | 234 -- .../skills/play-background-file/index.mdx | 4 +- .../play-background-file/skill/index.mdx | 191 +- .../play-background-file-skill/index.mdx | 207 -- .../python/agents/skills/registry/index.mdx | 262 +- .../skills/registry/skill-registry/index.mdx | 276 -- .../python/agents/skills/spider/index.mdx | 4 +- .../agents/skills/spider/skill/index.mdx | 224 +- .../spider/skill/spider-skill/index.mdx | 238 -- .../agents/skills/swml-transfer/index.mdx | 4 +- .../skills/swml-transfer/skill/index.mdx | 170 +- .../skill/swml-transfer-skill/index.mdx | 184 -- .../agents/skills/weather-api/index.mdx | 4 +- .../agents/skills/weather-api/skill/index.mdx | 168 +- .../skill/weather-api-skill/index.mdx | 184 -- .../skill-improved/web-search-skill/index.mdx | 2 +- .../skill-original/web-search-skill/index.mdx | 2 +- .../skill/web-search-skill/index.mdx | 2 +- .../agents/skills/wikipedia-search/index.mdx | 4 +- .../skills/wikipedia-search/skill/index.mdx | 177 +- .../skill/wikipedia-search-skill/index.mdx | 191 -- .../python/agents/swaig-function/index.mdx | 282 +- .../python/agents/swaig-function/index__2.mdx | 302 -- .../python/agents/swml-builder/index.mdx | 396 ++- .../python/agents/swml-builder/index__2.mdx | 414 --- .../python/agents/swml-renderer/index.mdx | 164 +- .../python/agents/swml-renderer/index__2.mdx | 182 - .../python/agents/swml-service/index.mdx | 617 +++- .../python/agents/swml-service/index__2.mdx | 639 ---- .../sdk-reference/python/agents/web/index.mdx | 4 +- .../python/agents/web/web-service/index.mdx | 220 +- .../web/web-service/web-service/index.mdx | 234 -- .../python/core/security/index.mdx | 8 +- .../core/security/session-manager/index.mdx | 356 +- .../session-manager/session-manager/index.mdx | 370 --- .../addresses/addresses-resource/index.mdx | 133 - .../python/rest/addresses/index.mdx | 119 +- .../python/rest/call-handler/index.mdx | 64 +- .../call-handler/phone-call-handler/index.mdx | 80 - .../rest/calling/calling-namespace/index.mdx | 863 ----- .../python/rest/calling/index.mdx | 849 ++++- .../python/rest/chat/chat-resource/index.mdx | 73 - .../sdk-reference/python/rest/chat/index.mdx | 59 +- .../python/rest/client/index.mdx | 119 +- .../python/rest/client/rest-client/index.mdx | 133 - .../imported-numbers-resource/index.mdx | 73 - .../python/rest/imported-numbers/index.mdx | 59 +- .../sdk-reference/python/rest/index.mdx | 72 +- .../python/rest/lookup/index.mdx | 61 +- .../rest/lookup/lookup-resource/index.mdx | 75 - .../sdk-reference/python/rest/mfa/index.mdx | 101 +- .../python/rest/mfa/mfa-resource/index.mdx | 115 - .../python/rest/number-groups/index.mdx | 123 +- .../number-groups-resource/index.mdx | 137 - .../python/rest/phone-numbers/index.mdx | 316 +- .../phone-numbers-resource/index.mdx | 330 -- .../python/rest/pubsub/index.mdx | 59 +- .../rest/pubsub/pub-sub-resource/index.mdx | 73 - .../python/rest/queues/index.mdx | 103 +- .../rest/queues/queues-resource/index.mdx | 117 - .../python/rest/recordings/index.mdx | 99 +- .../recordings/recordings-resource/index.mdx | 113 - .../python/rest/short-codes/index.mdx | 101 +- .../short-codes-resource/index.mdx | 115 - .../python/rest/sip-profile/index.mdx | 75 +- .../sip-profile-resource/index.mdx | 89 - .../python/rest/verified-callers/index.mdx | 81 +- .../verified-callers-resource/index.mdx | 95 - fern/products/sdk-reference/ruby/_meta.json | 2 +- .../agent-body-limit-middleware/index.mdx | 2 +- .../index.mdx | 2 +- .../agent-timing-safe-basic-auth/index.mdx | 2 +- .../ruby/agents/agent-base/index.mdx | 12 + .../ruby/agents/agent-base/index__2.mdx | 26 - .../sdk-reference/ruby/agents/index.mdx | 8 +- .../ruby/agents/serverless/index.mdx | 133 +- .../serverless/lambda-handler/index.mdx | 151 - .../sdk-reference/ruby/agents/swml/index.mdx | 6 - .../ruby/agents/swml/service/index.mdx | 12 + .../ruby/agents/swml/service/index__2.mdx | 26 - .../security-headers-middleware/index.mdx | 2 +- .../service/timing-safe-basic-auth/index.mdx | 2 +- .../sdk-reference/ruby/core/index.mdx | 10 +- .../sdk-reference/ruby/core/logging/index.mdx | 140 +- .../ruby/core/logging/logger/index.mdx | 156 - fern/products/sdk-reference/ruby/index.mdx | 2 - .../ruby/relay/action-timeout-error/index.mdx | 2 +- .../sdk-reference/ruby/relay/action/index.mdx | 2 +- .../ruby/relay/ai-action/index.mdx | 2 +- .../ruby/relay/call-receive-event/index.mdx | 2 +- .../ruby/relay/call-state-event/index.mdx | 2 +- .../ruby/relay/call-state/index.mdx | 2 +- .../sdk-reference/ruby/relay/call/index.mdx | 2 +- .../ruby/relay/calling-error-event/index.mdx | 2 +- .../sdk-reference/ruby/relay/client/index.mdx | 2 +- .../ruby/relay/collect-action/index.mdx | 2 +- .../ruby/relay/collect-config/index.mdx | 2 +- .../ruby/relay/collect-event/index.mdx | 2 +- .../ruby/relay/conference-event/index.mdx | 2 +- .../ruby/relay/connect-event/index.mdx | 2 +- .../ruby/relay/denoise-event/index.mdx | 2 +- .../ruby/relay/detect-action/index.mdx | 2 +- .../ruby/relay/detect-event/index.mdx | 2 +- .../sdk-reference/ruby/relay/device/index.mdx | 2 +- .../ruby/relay/dial-event/index.mdx | 2 +- .../ruby/relay/dial-state/index.mdx | 2 +- .../ruby/relay/echo-event/index.mdx | 2 +- .../ruby/relay/fax-action/index.mdx | 2 +- .../ruby/relay/fax-event/index.mdx | 2 +- .../ruby/relay/hold-event/index.mdx | 2 +- .../sdk-reference/ruby/relay/index.mdx | 192 ++ .../sdk-reference/ruby/relay/index__2.mdx | 204 -- .../relay/message-receive-event/index.mdx | 2 +- .../ruby/relay/message-state-event/index.mdx | 2 +- .../ruby/relay/message-state/index.mdx | 2 +- .../ruby/relay/message/index.mdx | 2 +- .../ruby/relay/pay-action/index.mdx | 2 +- .../ruby/relay/pay-event/index.mdx | 2 +- .../ruby/relay/play-action/index.mdx | 2 +- .../ruby/relay/play-event/index.mdx | 2 +- .../ruby/relay/queue-event/index.mdx | 2 +- .../ruby/relay/record-action/index.mdx | 2 +- .../ruby/relay/record-event/index.mdx | 2 +- .../ruby/relay/refer-event/index.mdx | 2 +- .../ruby/relay/relay-error/index.mdx | 2 +- .../ruby/relay/relay-event/index.mdx | 2 +- .../ruby/relay/send-digits-event/index.mdx | 2 +- .../relay/standalone-collect-action/index.mdx | 2 +- .../ruby/relay/stream-action/index.mdx | 2 +- .../ruby/relay/stream-event/index.mdx | 2 +- .../ruby/relay/tap-action/index.mdx | 2 +- .../ruby/relay/tap-event/index.mdx | 2 +- .../ruby/relay/transcribe-action/index.mdx | 2 +- .../ruby/relay/transcribe-event/index.mdx | 2 +- .../ruby/rest/base-resource/index.mdx | 2 +- .../ruby/rest/crud-resource/index.mdx | 2 +- .../ruby/rest/crud-with-addresses/index.mdx | 2 +- .../ruby/rest/http-client/index.mdx | 2 +- .../sdk-reference/ruby/rest/index.mdx | 42 + .../sdk-reference/ruby/rest/index__2.mdx | 54 - .../ruby/rest/namespaces/index.mdx | 2 +- .../ruby/rest/paginated-iterator/index.mdx | 2 +- .../ruby/rest/phone-call-handler/index.mdx | 2 +- .../ruby/rest/rest-client/index.mdx | 2 +- .../rest/signal-wire-rest-error/index.mdx | 2 +- fern/products/sdk-reference/rust/_meta.json | 2 +- .../sdk-reference/rust/agents/index.mdx | 8 +- .../sdk-reference/rust/agents/pom/index.mdx | 6 - .../rust/agents/pom/index__2.mdx | 535 ++- .../rust/agents/pom/pom/index.mdx | 22 - .../pom/pom/prompt-object-model/index.mdx | 547 --- .../concierge/concierge-agent/index.mdx | 161 - .../rust/agents/prefabs/concierge/index.mdx | 147 +- .../prefabs/faq-bot/faq-bot-agent/index.mdx | 150 - .../rust/agents/prefabs/faq-bot/index.mdx | 136 +- .../rust/agents/prefabs/index.mdx | 30 +- .../agents/prefabs/info-gatherer/index.mdx | 112 +- .../info-gatherer-agent/index.mdx | 126 - .../agents/prefabs/receptionist/index.mdx | 128 +- .../receptionist/receptionist-agent/index.mdx | 142 - .../rust/agents/prefabs/survey/index.mdx | 126 +- .../prefabs/survey/survey-agent/index.mdx | 140 - .../agent-server/agent-server/index.mdx | 507 --- .../rust/agents/server/agent-server/index.mdx | 493 ++- .../rust/agents/server/index.mdx | 10 +- .../rust/agents/serverless/adapter/index.mdx | 184 ++ .../agents/serverless/adapter/index__2.mdx | 198 -- .../rust/agents/serverless/index.mdx | 6 - .../api-ninjas-trivia/index.mdx | 178 - .../builtin/api-ninjas-trivia/index.mdx | 164 +- .../claude-skills/claude-skills/index.mdx | 218 -- .../skills/builtin/claude-skills/index.mdx | 204 +- .../custom-skills/custom-skills/index.mdx | 178 - .../skills/builtin/custom-skills/index.mdx | 164 +- .../datasphere-serverless/index.mdx | 218 -- .../builtin/datasphere-serverless/index.mdx | 204 +- .../builtin/google-maps/google-maps/index.mdx | 198 -- .../skills/builtin/google-maps/index.mdx | 184 +- .../rust/agents/skills/builtin/index.mdx | 72 +- .../skills/builtin/info-gatherer/index.mdx | 204 +- .../info-gatherer/info-gatherer/index.mdx | 218 -- .../skills/builtin/mcp-gateway/index.mdx | 204 +- .../builtin/mcp-gateway/mcp-gateway/index.mdx | 218 -- .../builtin/native-vector-search/index.mdx | 184 +- .../native-vector-search/index.mdx | 198 -- .../builtin/play-background-file/index.mdx | 164 +- .../play-background-file/index.mdx | 178 - .../skills/builtin/swml-transfer/index.mdx | 204 +- .../swml-transfer/swml-transfer/index.mdx | 218 -- .../skills/builtin/weather-api/index.mdx | 144 +- .../builtin/weather-api/weather-api/index.mdx | 158 - .../skills/builtin/web-search/index.mdx | 257 +- .../builtin/web-search/web-search/index.mdx | 271 -- .../skills/builtin/wikipedia-search/index.mdx | 169 +- .../wikipedia-search/index.mdx | 183 - .../rust/agents/skills/index.mdx | 24 +- .../rust/agents/skills/skill-base/index.mdx | 316 +- .../skills/skill-base/skill-params/index.mdx | 330 -- .../agents/skills/skill-manager/index.mdx | 230 +- .../skill-manager/skill-manager/index.mdx | 244 -- .../rust/agents/skills/skill-name/index.mdx | 159 +- .../parse-skill-name-error/index.mdx | 155 - .../agents/skills/skill-registry/index.mdx | 152 +- .../skill-registry/skill-registry/index.mdx | 166 - .../function-result/function-result/index.mdx | 1899 ----------- .../agents/swaig/function-result/index.mdx | 1885 ++++++++++- .../sdk-reference/rust/agents/swaig/index.mdx | 12 +- .../rust/agents/swaig/media-enums/index.mdx | 168 +- .../parse-media-enum-error/index.mdx | 155 - .../sdk-reference/rust/agents/swml/index.mdx | 12 +- .../rust/agents/swml/schema/index.mdx | 70 +- .../agents/swml/schema/verb-info/index.mdx | 84 - .../rust/agents/swml/service/index.mdx | 12 + .../rust/agents/swml/service/index__2.mdx | 26 - .../swml/service/service-options/index.mdx | 2 +- .../agents/swml/service/tool-def/index.mdx | 2 +- .../rust/core/security/index.mdx | 10 +- .../core/security/session-manager/index.mdx | 207 +- .../session-manager/session-manager/index.mdx | 221 -- fern/products/sdk-reference/rust/index.mdx | 1 - .../sdk-reference/rust/rest/client/index.mdx | 712 +++- .../rust/rest/client/rest-client/index.mdx | 726 ---- .../rest/compat/compat-accounts/index.mdx | 2 +- .../rest/compat/compat-applications/index.mdx | 2 +- .../rust/rest/compat/compat-calls/index.mdx | 2 +- .../rest/compat/compat-conferences/index.mdx | 2 +- .../rust/rest/compat/compat-faxes/index.mdx | 2 +- .../rest/compat/compat-laml-bins/index.mdx | 2 +- .../rest/compat/compat-messages/index.mdx | 2 +- .../compat/compat-phone-numbers/index.mdx | 2 +- .../rust/rest/compat/compat-queues/index.mdx | 2 +- .../rest/compat/compat-recordings/index.mdx | 2 +- .../rust/rest/compat/compat-tokens/index.mdx | 2 +- .../compat/compat-transcriptions/index.mdx | 2 +- .../sdk-reference/rust/rest/compat/index.mdx | 28 + .../rust/rest/compat/index__2.mdx | 42 - .../crud-resource/crud-resource/index.mdx | 231 -- .../rust/rest/crud-resource/index.mdx | 217 +- .../sdk-reference/rust/rest/error/index.mdx | 177 +- .../error/signal-wire-rest-error/index.mdx | 190 -- .../rest/fabric/call-flows-resource/index.mdx | 2 +- .../conference-rooms-resource/index.mdx | 2 +- .../cxml-applications-resource/index.mdx | 2 +- .../rest/fabric/fabric-addresses/index.mdx | 2 +- .../rust/rest/fabric/fabric-tokens/index.mdx | 2 +- .../rest/fabric/generic-resources/index.mdx | 2 +- .../sdk-reference/rust/rest/fabric/index.mdx | 18 + .../rust/rest/fabric/index__2.mdx | 32 - .../fabric/subscribers-resource/index.mdx | 2 +- .../sdk-reference/rust/rest/index.mdx | 52 +- .../rust/rest/logs/conference-logs/index.mdx | 2 +- .../rust/rest/logs/fax-logs/index.mdx | 2 +- .../sdk-reference/rust/rest/logs/index.mdx | 12 + .../sdk-reference/rust/rest/logs/index__2.mdx | 26 - .../rust/rest/logs/message-logs/index.mdx | 2 +- .../rust/rest/logs/voice-logs/index.mdx | 2 +- .../rust/rest/number-groups/index.mdx | 289 +- .../number-groups/number-groups/index.mdx | 303 -- .../rust/rest/pagination/index.mdx | 256 +- .../pagination/paginated-iterator/index.mdx | 267 -- .../sdk-reference/rust/rest/project/index.mdx | 8 + .../rust/rest/project/index__2.mdx | 22 - .../rest/project/project-tokens/index.mdx | 2 +- .../rust/rest/registry/index.mdx | 12 + .../rust/rest/registry/index__2.mdx | 26 - .../rest/registry/registry-brands/index.mdx | 2 +- .../registry/registry-campaigns/index.mdx | 2 +- .../rest/registry/registry-numbers/index.mdx | 2 +- .../rest/registry/registry-orders/index.mdx | 2 +- .../rust/rest/sip-profile/index.mdx | 112 +- .../rest/sip-profile/sip-profile/index.mdx | 126 - .../sdk-reference/rust/rest/video/index.mdx | 18 + .../rust/rest/video/index__2.mdx | 32 - .../video/video-conference-tokens/index.mdx | 2 +- .../rest/video/video-conferences/index.mdx | 2 +- .../video/video-room-recordings/index.mdx | 2 +- .../rest/video/video-room-sessions/index.mdx | 2 +- .../rest/video/video-room-tokens/index.mdx | 2 +- .../rust/rest/video/video-rooms/index.mdx | 2 +- .../rust/rest/video/video-streams/index.mdx | 2 +- .../sdk-reference/rust/signalwire/index.mdx | 63 +- .../rust/signalwire/skill-spec/index.mdx | 76 - fern/products/sdk-reference/sdk-reference.yml | 135 +- .../sdk-reference/typescript/_meta.json | 2 +- .../typescript/add-skill-directory.mdx | 41 - .../typescript/agents/agent-base/index.mdx | 2 +- .../configuration/auth-handler/index.mdx | 44 + .../configuration/auth-handler/index__2.mdx | 58 - .../typescript/agents/configuration/index.mdx | 6 - .../agents/context-builder/context/index.mdx | 2 +- .../context-builder/gather-info/index.mdx | 2 +- .../context-builder/gather-question/index.mdx | 2 +- .../agents/context-builder/index.mdx | 20 + .../agents/context-builder/index__2.mdx | 34 - .../agents/context-builder/step/index.mdx | 2 +- .../agents/function-result/index.mdx | 92 + .../agents/function-result/index__2.mdx | 106 - .../sdk-reference/typescript/agents/index.mdx | 131 +- .../agents/parameter-schema/index.mdx | 63 +- .../agents/parameter-schema/index__2.mdx | 73 - .../typescript/agents/pom-builder/index.mdx | 54 +- .../agents/pom-builder/index__2.mdx | 66 - .../agents/pom-builder/pom-section/index.mdx | 2 +- .../typescript/agents/pom/index.mdx | 6 - .../agents/pom/prompt-object-model/index.mdx | 40 + .../pom/prompt-object-model/index__2.mdx | 54 - .../pom/prompt-object-model/section/index.mdx | 2 +- .../agents/prefabs/concierge-agent/index.mdx | 58 +- .../prefabs/concierge-agent/index__2.mdx | 70 - .../agents/prefabs/faq-bot-agent/index.mdx | 94 +- .../agents/prefabs/faq-bot-agent/index__2.mdx | 106 - .../typescript/agents/prefabs/index.mdx | 14 - .../prefabs/info-gatherer-agent/index.mdx | 74 +- .../prefabs/info-gatherer-agent/index__2.mdx | 86 - .../prefabs/receptionist-agent/index.mdx | 90 +- .../prefabs/receptionist-agent/index__2.mdx | 102 - .../agents/prefabs/survey-agent/index.mdx | 114 +- .../agents/prefabs/survey-agent/index__2.mdx | 126 - .../typescript/agents/schema-utils/index.mdx | 60 + .../agents/schema-utils/index__2.mdx | 74 - .../agents/serverless-adapter/index.mdx | 84 + .../agents/serverless-adapter/index__2.mdx | 98 - .../agents/session-manager/index.mdx | 32 + .../agents/session-manager/index__2.mdx | 46 - .../api-ninjas-trivia-skill/index.mdx | 709 ---- .../builtin/api-ninjas-trivia/index.mdx | 692 +++- .../ask-claude/ask-claude-skill/index.mdx | 716 ---- .../skills/builtin/ask-claude/index.mdx | 699 +++- .../claude-skills-skill/index.mdx | 731 ---- .../skills/builtin/claude-skills/index.mdx | 714 +++- .../custom-skills-skill/index.mdx | 746 ----- .../skills/builtin/custom-skills/index.mdx | 729 +++- .../data-sphere-serverless-skill/index.mdx | 716 ---- .../builtin/datasphere-serverless/index.mdx | 699 +++- .../datasphere/data-sphere-skill/index.mdx | 721 ---- .../skills/builtin/datasphere/index.mdx | 704 +++- .../datetime/date-time-skill/index.mdx | 717 ---- .../agents/skills/builtin/datetime/index.mdx | 700 +++- .../google-maps/google-maps-skill/index.mdx | 715 ---- .../skills/builtin/google-maps/index.mdx | 698 +++- .../agents/skills/builtin/index.mdx | 78 +- .../skills/builtin/info-gatherer/index.mdx | 714 +++- .../info-gatherer-skill/index.mdx | 731 ---- .../agents/skills/builtin/joke/index.mdx | 699 +++- .../skills/builtin/joke/joke-skill/index.mdx | 716 ---- .../agents/skills/builtin/math/index.mdx | 700 +++- .../skills/builtin/math/math-skill/index.mdx | 717 ---- .../skills/builtin/mcp-gateway/index.mdx | 703 +++- .../mcp-gateway/mcp-gateway-skill/index.mdx | 720 ---- .../builtin/native-vector-search/index.mdx | 701 +++- .../native-vector-search-skill/index.mdx | 718 ---- .../builtin/play-background-file/index.mdx | 702 +++- .../play-background-file-skill/index.mdx | 719 ---- .../agents/skills/builtin/spider/index.mdx | 701 +++- .../builtin/spider/spider-skill/index.mdx | 718 ---- .../skills/builtin/swml-transfer/index.mdx | 704 +++- .../swml-transfer-skill/index.mdx | 721 ---- .../skills/builtin/weather-api/index.mdx | 715 +++- .../weather-api/weather-api-skill/index.mdx | 732 ---- .../skills/builtin/web-search/index.mdx | 719 +++- .../web-search/web-search-skill/index.mdx | 736 ----- .../skills/builtin/wikipedia-search/index.mdx | 741 ++++- .../wikipedia-search-skill/index.mdx | 758 ----- .../typescript/agents/skills/index.mdx | 4 - .../agents/skills/skill-base/index.mdx | 174 + .../agents/skills/skill-base/index__2.mdx | 188 -- .../agents/skills/skill-registry/index.mdx | 56 +- .../agents/skills/skill-registry/index__2.mdx | 68 - .../typescript/agents/ssl-config/index.mdx | 44 + .../typescript/agents/ssl-config/index__2.mdx | 58 - .../agents/swaig-function/index.mdx | 68 + .../agents/swaig-function/index__2.mdx | 82 - .../typescript/agents/swml-builder/index.mdx | 32 + .../agents/swml-builder/index__2.mdx | 46 - .../typescript/agents/swml-service/index.mdx | 157 + .../agents/swml-service/index__2.mdx | 171 - .../swml-service/security-config/index.mdx | 2 +- .../verb-handler-registry/index.mdx | 2 +- .../typescript/agents/web-service/index.mdx | 60 + .../agents/web-service/index__2.mdx | 74 - .../sdk-reference/typescript/index.mdx | 1 - .../typescript/list-skills-with-params.mdx | 34 - .../sdk-reference/typescript/list-skills.mdx | 36 - .../typescript/register-skill.mdx | 40 - .../relay/action/ai-action/index.mdx | 4 +- .../relay/action/collect-action/index.mdx | 4 +- .../relay/action/detect-action/index.mdx | 4 +- .../relay/action/fax-action/index.mdx | 4 +- .../typescript/relay/action/index.mdx | 102 +- .../typescript/relay/action/index__2.mdx | 110 - .../relay/action/pay-action/index.mdx | 4 +- .../relay/action/play-action/index.mdx | 4 +- .../relay/action/record-action/index.mdx | 4 +- .../standalone-collect-action/index.mdx | 4 +- .../relay/action/stream-action/index.mdx | 4 +- .../relay/action/tap-action/index.mdx | 4 +- .../relay/action/transcribe-action/index.mdx | 4 +- .../typescript/relay/call/index.mdx | 61 +- .../typescript/relay/call/index__2.mdx | 61 - .../sdk-reference/typescript/relay/index.mdx | 6 - .../typescript/relay/message/index.mdx | 2 +- .../typescript/relay/relay-client/index.mdx | 8 +- .../relay-event/call-receive-event/index.mdx | 2 +- .../relay-event/call-state-event/index.mdx | 2 +- .../relay-event/calling-error-event/index.mdx | 2 +- .../relay/relay-event/collect-event/index.mdx | 2 +- .../relay-event/conference-event/index.mdx | 2 +- .../relay/relay-event/connect-event/index.mdx | 2 +- .../relay/relay-event/denoise-event/index.mdx | 2 +- .../relay/relay-event/detect-event/index.mdx | 2 +- .../relay/relay-event/dial-event/index.mdx | 2 +- .../relay/relay-event/echo-event/index.mdx | 2 +- .../relay/relay-event/fax-event/index.mdx | 2 +- .../relay/relay-event/hold-event/index.mdx | 2 +- .../typescript/relay/relay-event/index.mdx | 96 + .../typescript/relay/relay-event/index__2.mdx | 110 - .../message-receive-event/index.mdx | 2 +- .../relay-event/message-state-event/index.mdx | 2 +- .../relay/relay-event/pay-event/index.mdx | 2 +- .../relay/relay-event/play-event/index.mdx | 2 +- .../relay/relay-event/queue-event/index.mdx | 2 +- .../relay/relay-event/record-event/index.mdx | 2 +- .../relay/relay-event/refer-event/index.mdx | 2 +- .../relay-event/send-digits-event/index.mdx | 2 +- .../relay/relay-event/stream-event/index.mdx | 2 +- .../relay/relay-event/tap-event/index.mdx | 2 +- .../relay-event/transcribe-event/index.mdx | 2 +- .../sdk-reference/typescript/rest-client.mdx | 70 - .../addresses/addresses-resource/index.mdx | 187 -- .../typescript/rest/addresses/index.mdx | 170 +- .../rest/base/base-resource/index.mdx | 2 +- .../typescript/rest/call-handler/index.mdx | 2 +- .../rest/calling/calling-namespace/index.mdx | 1414 -------- .../typescript/rest/calling/index.mdx | 1397 +++++++- .../rest/chat/chat-resource/index.mdx | 92 - .../typescript/rest/chat/index.mdx | 75 +- .../rest/fabric/fabric-namespace/index.mdx | 4 +- .../rest/fabric/generic-resources/index.mdx | 2 +- .../typescript/rest/http-client/index.mdx | 2 +- .../imported-numbers-resource/index.mdx | 91 - .../rest/imported-numbers/index.mdx | 74 +- .../sdk-reference/typescript/rest/index.mdx | 222 +- .../typescript/rest/lookup/index.mdx | 84 +- .../rest/lookup/lookup-resource/index.mdx | 101 - .../typescript/rest/mfa/index.mdx | 151 +- .../rest/mfa/mfa-resource/index.mdx | 168 - .../typescript/rest/number-groups/index.mdx | 345 +- .../number-groups-resource/index.mdx | 362 -- .../typescript/rest/phone-numbers/index.mdx | 562 +++- .../phone-numbers-resource/index.mdx | 571 ---- .../typescript/rest/pubsub/index.mdx | 75 +- .../rest/pubsub/pub-sub-resource/index.mdx | 92 - .../typescript/rest/queues/index.mdx | 313 +- .../rest/queues/queues-resource/index.mdx | 330 -- .../typescript/rest/recordings/index.mdx | 138 +- .../recordings/recordings-resource/index.mdx | 155 - .../typescript/rest/rest-client/index.mdx | 167 - .../typescript/rest/short-codes/index.mdx | 142 +- .../short-codes-resource/index.mdx | 159 - .../typescript/rest/sip-profile/index.mdx | 100 +- .../sip-profile-resource/index.mdx | 117 - .../rest/verified-callers/index.mdx | 279 +- .../verified-callers-resource/index.mdx | 296 -- 853 files changed, 54517 insertions(+), 61166 deletions(-) delete mode 100644 fern/products/sdk-reference/cpp/core/logging/logger/index.mdx delete mode 100644 fern/products/sdk-reference/cpp/rest/rest-client/index__2.mdx delete mode 100644 fern/products/sdk-reference/cpp/rest/rest-client/phone-numbers-namespace/index__2.mdx delete mode 100644 fern/products/sdk-reference/cpp/signalwire/logger/index.mdx delete mode 100644 fern/products/sdk-reference/dotnet/agents/data-map/index__2.mdx create mode 100644 fern/products/sdk-reference/dotnet/agents/data-map/signal-wire.data-map/index.mdx rename fern/products/sdk-reference/dotnet/agents/server/{agent-server => signal-wire.server}/index.mdx (97%) rename fern/products/sdk-reference/dotnet/agents/serverless/{adapter => signal-wire.serverless}/index.mdx (95%) rename fern/products/sdk-reference/dotnet/core/logging/{logger => signal-wire.logging}/index.mdx (95%) delete mode 100644 fern/products/sdk-reference/go/agents/datamap/index__2.mdx delete mode 100644 fern/products/sdk-reference/go/agents/lambda/lambda/handler/index.mdx delete mode 100644 fern/products/sdk-reference/go/agents/lambda/lambda/index.mdx delete mode 100644 fern/products/sdk-reference/go/core/logging/logging/logger/index.mdx delete mode 100644 fern/products/sdk-reference/java/agents/agent/agent/agent-base/index.mdx delete mode 100644 fern/products/sdk-reference/java/agents/agent/agent/agent-base/index__2.mdx rename fern/products/sdk-reference/java/agents/agent/agent/{agent-base => }/builder/index.mdx (98%) delete mode 100644 fern/products/sdk-reference/java/agents/cli/cli/index.mdx delete mode 100644 fern/products/sdk-reference/java/agents/cli/cli/swaig-test/index.mdx delete mode 100644 fern/products/sdk-reference/java/agents/cli/simulation/simulation/serverless-simulator/index.mdx delete mode 100644 fern/products/sdk-reference/java/agents/cli/simulation/simulation/serverless-simulator/index__2.mdx delete mode 100644 fern/products/sdk-reference/java/agents/runtime/runtime/lambda-url-resolver/index.mdx delete mode 100644 fern/products/sdk-reference/java/agents/server/server/agent-server/index.mdx delete mode 100644 fern/products/sdk-reference/java/agents/server/server/index.mdx delete mode 100644 fern/products/sdk-reference/java/agents/swaig/swaig/parameter-schema/index__2.mdx delete mode 100644 fern/products/sdk-reference/java/agents/swml/swml/schema-utils/index__2.mdx delete mode 100644 fern/products/sdk-reference/java/com/signalwire/sdk/sdk/signalwire/index.mdx delete mode 100644 fern/products/sdk-reference/java/core/logging/logging/logger/index.mdx delete mode 100644 fern/products/sdk-reference/java/core/logging/logging/logger/index__2.mdx delete mode 100644 fern/products/sdk-reference/java/core/security/security/webhook-filter/index__2.mdx delete mode 100644 fern/products/sdk-reference/java/core/utils/utils/index.mdx delete mode 100644 fern/products/sdk-reference/java/core/utils/utils/url-validator/index.mdx delete mode 100644 fern/products/sdk-reference/java/relay/action/index__2.mdx delete mode 100644 fern/products/sdk-reference/java/relay/relay-client/index__2.mdx delete mode 100644 fern/products/sdk-reference/java/relay/relay-event/index__2.mdx delete mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/index__2.mdx delete mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/datasphere-namespace/index__2.mdx delete mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/index__2.mdx delete mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/logs-namespace/index__2.mdx delete mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/project-namespace/index__2.mdx delete mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/registry-namespace/index__2.mdx delete mode 100644 fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/index__2.mdx delete mode 100644 fern/products/sdk-reference/java/rest/rest-client/index__2.mdx delete mode 100644 fern/products/sdk-reference/php/agents/server/server/agent-server/index.mdx delete mode 100644 fern/products/sdk-reference/php/agents/server/server/index.mdx delete mode 100644 fern/products/sdk-reference/php/agents/serverless/serverless/adapter/index.mdx delete mode 100644 fern/products/sdk-reference/php/relay/index__2.mdx delete mode 100644 fern/products/sdk-reference/php/rest/index__2.mdx delete mode 100644 fern/products/sdk-reference/python/agents/agent-base/index__2.mdx delete mode 100644 fern/products/sdk-reference/python/agents/agent-server/index__2.mdx delete mode 100644 fern/products/sdk-reference/python/agents/agent/prompt/manager/prompt-manager/index.mdx delete mode 100644 fern/products/sdk-reference/python/agents/agent/tools/decorator/tool-decorator/index.mdx delete mode 100644 fern/products/sdk-reference/python/agents/agent/tools/registry/tool-registry/index.mdx delete mode 100644 fern/products/sdk-reference/python/agents/cli/core/argparse-helpers/custom-argument-parser/index.mdx delete mode 100644 fern/products/sdk-reference/python/agents/cli/core/service-loader/service-capture/index.mdx delete mode 100644 fern/products/sdk-reference/python/agents/configuration/auth-handler/index__2.mdx delete mode 100644 fern/products/sdk-reference/python/agents/configuration/config-loader/index__2.mdx delete mode 100644 fern/products/sdk-reference/python/agents/configuration/security-config/index__2.mdx delete mode 100644 fern/products/sdk-reference/python/agents/data-map/index__2.mdx delete mode 100644 fern/products/sdk-reference/python/agents/function-result/index__2.mdx delete mode 100644 fern/products/sdk-reference/python/agents/gateway-service/index.mdx delete mode 100644 fern/products/sdk-reference/python/agents/gateway-service/mcp-gateway/index.mdx rename fern/products/sdk-reference/python/agents/{gateway-service/mcp-gateway => mcp-gateway/gateway-service}/set-security-headers.mdx (88%) delete mode 100644 fern/products/sdk-reference/python/agents/mixins/ai-config-mixin/ai-config-mixin/index.mdx delete mode 100644 fern/products/sdk-reference/python/agents/mixins/auth-mixin/auth-mixin/index.mdx delete mode 100644 fern/products/sdk-reference/python/agents/mixins/mcp-server-mixin/mcp-server-mixin/index.mdx delete mode 100644 fern/products/sdk-reference/python/agents/mixins/prompt-mixin/prompt-mixin/index.mdx delete mode 100644 fern/products/sdk-reference/python/agents/mixins/serverless-mixin/serverless-mixin/index.mdx delete mode 100644 fern/products/sdk-reference/python/agents/mixins/skill-mixin/skill-mixin/index.mdx delete mode 100644 fern/products/sdk-reference/python/agents/mixins/state-mixin/state-mixin/index.mdx delete mode 100644 fern/products/sdk-reference/python/agents/mixins/tool-mixin/tool-mixin/index.mdx delete mode 100644 fern/products/sdk-reference/python/agents/mixins/web-mixin/web-mixin/index.mdx delete mode 100644 fern/products/sdk-reference/python/agents/pom-builder/index__2.mdx delete mode 100644 fern/products/sdk-reference/python/agents/prefabs/concierge/concierge-agent/index.mdx delete mode 100644 fern/products/sdk-reference/python/agents/prefabs/faq-bot/faq-bot-agent/index.mdx delete mode 100644 fern/products/sdk-reference/python/agents/prefabs/info-gatherer/info-gatherer-agent/index.mdx delete mode 100644 fern/products/sdk-reference/python/agents/prefabs/receptionist/receptionist-agent/index.mdx delete mode 100644 fern/products/sdk-reference/python/agents/prefabs/survey/survey-agent/index.mdx delete mode 100644 fern/products/sdk-reference/python/agents/search/document-processor/document-processor/index.mdx delete mode 100644 fern/products/sdk-reference/python/agents/search/index-builder/index-builder/index.mdx delete mode 100644 fern/products/sdk-reference/python/agents/search/migration/search-index-migrator/index.mdx delete mode 100644 fern/products/sdk-reference/python/agents/search/search-engine/search-engine/index.mdx delete mode 100644 fern/products/sdk-reference/python/agents/skill-base/index__2.mdx delete mode 100644 fern/products/sdk-reference/python/agents/skill-manager/index__2.mdx delete mode 100644 fern/products/sdk-reference/python/agents/skills/api-ninjas-trivia/skill/api-ninjas-trivia-skill/index.mdx delete mode 100644 fern/products/sdk-reference/python/agents/skills/claude-skills/skill/claude-skills-skill/index.mdx delete mode 100644 fern/products/sdk-reference/python/agents/skills/datasphere-serverless/skill/data-sphere-serverless-skill/index.mdx delete mode 100644 fern/products/sdk-reference/python/agents/skills/datasphere/skill/data-sphere-skill/index.mdx delete mode 100644 fern/products/sdk-reference/python/agents/skills/datetime/skill/date-time-skill/index.mdx delete mode 100644 fern/products/sdk-reference/python/agents/skills/info-gatherer/skill/info-gatherer-skill/index.mdx delete mode 100644 fern/products/sdk-reference/python/agents/skills/joke/skill/joke-skill/index.mdx delete mode 100644 fern/products/sdk-reference/python/agents/skills/math/skill/math-skill/index.mdx delete mode 100644 fern/products/sdk-reference/python/agents/skills/mcp-gateway/skill/mcp-gateway-skill/index.mdx delete mode 100644 fern/products/sdk-reference/python/agents/skills/native-vector-search/skill/native-vector-search-skill/index.mdx delete mode 100644 fern/products/sdk-reference/python/agents/skills/play-background-file/skill/play-background-file-skill/index.mdx delete mode 100644 fern/products/sdk-reference/python/agents/skills/registry/skill-registry/index.mdx delete mode 100644 fern/products/sdk-reference/python/agents/skills/spider/skill/spider-skill/index.mdx delete mode 100644 fern/products/sdk-reference/python/agents/skills/swml-transfer/skill/swml-transfer-skill/index.mdx delete mode 100644 fern/products/sdk-reference/python/agents/skills/weather-api/skill/weather-api-skill/index.mdx delete mode 100644 fern/products/sdk-reference/python/agents/skills/wikipedia-search/skill/wikipedia-search-skill/index.mdx delete mode 100644 fern/products/sdk-reference/python/agents/swaig-function/index__2.mdx delete mode 100644 fern/products/sdk-reference/python/agents/swml-builder/index__2.mdx delete mode 100644 fern/products/sdk-reference/python/agents/swml-renderer/index__2.mdx delete mode 100644 fern/products/sdk-reference/python/agents/swml-service/index__2.mdx delete mode 100644 fern/products/sdk-reference/python/agents/web/web-service/web-service/index.mdx delete mode 100644 fern/products/sdk-reference/python/core/security/session-manager/session-manager/index.mdx delete mode 100644 fern/products/sdk-reference/python/rest/addresses/addresses-resource/index.mdx delete mode 100644 fern/products/sdk-reference/python/rest/call-handler/phone-call-handler/index.mdx delete mode 100644 fern/products/sdk-reference/python/rest/calling/calling-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/python/rest/chat/chat-resource/index.mdx delete mode 100644 fern/products/sdk-reference/python/rest/client/rest-client/index.mdx delete mode 100644 fern/products/sdk-reference/python/rest/imported-numbers/imported-numbers-resource/index.mdx delete mode 100644 fern/products/sdk-reference/python/rest/lookup/lookup-resource/index.mdx delete mode 100644 fern/products/sdk-reference/python/rest/mfa/mfa-resource/index.mdx delete mode 100644 fern/products/sdk-reference/python/rest/number-groups/number-groups-resource/index.mdx delete mode 100644 fern/products/sdk-reference/python/rest/phone-numbers/phone-numbers-resource/index.mdx delete mode 100644 fern/products/sdk-reference/python/rest/pubsub/pub-sub-resource/index.mdx delete mode 100644 fern/products/sdk-reference/python/rest/queues/queues-resource/index.mdx delete mode 100644 fern/products/sdk-reference/python/rest/recordings/recordings-resource/index.mdx delete mode 100644 fern/products/sdk-reference/python/rest/short-codes/short-codes-resource/index.mdx delete mode 100644 fern/products/sdk-reference/python/rest/sip-profile/sip-profile-resource/index.mdx delete mode 100644 fern/products/sdk-reference/python/rest/verified-callers/verified-callers-resource/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/agents/agent-base/index__2.mdx delete mode 100644 fern/products/sdk-reference/ruby/agents/serverless/lambda-handler/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/agents/swml/service/index__2.mdx delete mode 100644 fern/products/sdk-reference/ruby/core/logging/logger/index.mdx delete mode 100644 fern/products/sdk-reference/ruby/relay/index__2.mdx delete mode 100644 fern/products/sdk-reference/ruby/rest/index__2.mdx delete mode 100644 fern/products/sdk-reference/rust/agents/pom/pom/index.mdx delete mode 100644 fern/products/sdk-reference/rust/agents/pom/pom/prompt-object-model/index.mdx delete mode 100644 fern/products/sdk-reference/rust/agents/prefabs/concierge/concierge-agent/index.mdx delete mode 100644 fern/products/sdk-reference/rust/agents/prefabs/faq-bot/faq-bot-agent/index.mdx delete mode 100644 fern/products/sdk-reference/rust/agents/prefabs/info-gatherer/info-gatherer-agent/index.mdx delete mode 100644 fern/products/sdk-reference/rust/agents/prefabs/receptionist/receptionist-agent/index.mdx delete mode 100644 fern/products/sdk-reference/rust/agents/prefabs/survey/survey-agent/index.mdx delete mode 100644 fern/products/sdk-reference/rust/agents/server/agent-server/agent-server/index.mdx delete mode 100644 fern/products/sdk-reference/rust/agents/serverless/adapter/index__2.mdx delete mode 100644 fern/products/sdk-reference/rust/agents/skills/builtin/api-ninjas-trivia/api-ninjas-trivia/index.mdx delete mode 100644 fern/products/sdk-reference/rust/agents/skills/builtin/claude-skills/claude-skills/index.mdx delete mode 100644 fern/products/sdk-reference/rust/agents/skills/builtin/custom-skills/custom-skills/index.mdx delete mode 100644 fern/products/sdk-reference/rust/agents/skills/builtin/datasphere-serverless/datasphere-serverless/index.mdx delete mode 100644 fern/products/sdk-reference/rust/agents/skills/builtin/google-maps/google-maps/index.mdx delete mode 100644 fern/products/sdk-reference/rust/agents/skills/builtin/info-gatherer/info-gatherer/index.mdx delete mode 100644 fern/products/sdk-reference/rust/agents/skills/builtin/mcp-gateway/mcp-gateway/index.mdx delete mode 100644 fern/products/sdk-reference/rust/agents/skills/builtin/native-vector-search/native-vector-search/index.mdx delete mode 100644 fern/products/sdk-reference/rust/agents/skills/builtin/play-background-file/play-background-file/index.mdx delete mode 100644 fern/products/sdk-reference/rust/agents/skills/builtin/swml-transfer/swml-transfer/index.mdx delete mode 100644 fern/products/sdk-reference/rust/agents/skills/builtin/weather-api/weather-api/index.mdx delete mode 100644 fern/products/sdk-reference/rust/agents/skills/builtin/web-search/web-search/index.mdx delete mode 100644 fern/products/sdk-reference/rust/agents/skills/builtin/wikipedia-search/wikipedia-search/index.mdx delete mode 100644 fern/products/sdk-reference/rust/agents/skills/skill-base/skill-params/index.mdx delete mode 100644 fern/products/sdk-reference/rust/agents/skills/skill-manager/skill-manager/index.mdx delete mode 100644 fern/products/sdk-reference/rust/agents/skills/skill-name/parse-skill-name-error/index.mdx delete mode 100644 fern/products/sdk-reference/rust/agents/skills/skill-registry/skill-registry/index.mdx delete mode 100644 fern/products/sdk-reference/rust/agents/swaig/function-result/function-result/index.mdx delete mode 100644 fern/products/sdk-reference/rust/agents/swaig/media-enums/parse-media-enum-error/index.mdx delete mode 100644 fern/products/sdk-reference/rust/agents/swml/schema/verb-info/index.mdx delete mode 100644 fern/products/sdk-reference/rust/agents/swml/service/index__2.mdx delete mode 100644 fern/products/sdk-reference/rust/core/security/session-manager/session-manager/index.mdx delete mode 100644 fern/products/sdk-reference/rust/rest/client/rest-client/index.mdx delete mode 100644 fern/products/sdk-reference/rust/rest/compat/index__2.mdx delete mode 100644 fern/products/sdk-reference/rust/rest/crud-resource/crud-resource/index.mdx delete mode 100644 fern/products/sdk-reference/rust/rest/error/signal-wire-rest-error/index.mdx delete mode 100644 fern/products/sdk-reference/rust/rest/fabric/index__2.mdx delete mode 100644 fern/products/sdk-reference/rust/rest/logs/index__2.mdx delete mode 100644 fern/products/sdk-reference/rust/rest/number-groups/number-groups/index.mdx delete mode 100644 fern/products/sdk-reference/rust/rest/pagination/paginated-iterator/index.mdx delete mode 100644 fern/products/sdk-reference/rust/rest/project/index__2.mdx delete mode 100644 fern/products/sdk-reference/rust/rest/registry/index__2.mdx delete mode 100644 fern/products/sdk-reference/rust/rest/sip-profile/sip-profile/index.mdx delete mode 100644 fern/products/sdk-reference/rust/rest/video/index__2.mdx delete mode 100644 fern/products/sdk-reference/rust/signalwire/skill-spec/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/add-skill-directory.mdx delete mode 100644 fern/products/sdk-reference/typescript/agents/configuration/auth-handler/index__2.mdx delete mode 100644 fern/products/sdk-reference/typescript/agents/context-builder/index__2.mdx delete mode 100644 fern/products/sdk-reference/typescript/agents/function-result/index__2.mdx delete mode 100644 fern/products/sdk-reference/typescript/agents/parameter-schema/index__2.mdx delete mode 100644 fern/products/sdk-reference/typescript/agents/pom-builder/index__2.mdx delete mode 100644 fern/products/sdk-reference/typescript/agents/pom/prompt-object-model/index__2.mdx delete mode 100644 fern/products/sdk-reference/typescript/agents/prefabs/concierge-agent/index__2.mdx delete mode 100644 fern/products/sdk-reference/typescript/agents/prefabs/faq-bot-agent/index__2.mdx delete mode 100644 fern/products/sdk-reference/typescript/agents/prefabs/info-gatherer-agent/index__2.mdx delete mode 100644 fern/products/sdk-reference/typescript/agents/prefabs/receptionist-agent/index__2.mdx delete mode 100644 fern/products/sdk-reference/typescript/agents/prefabs/survey-agent/index__2.mdx delete mode 100644 fern/products/sdk-reference/typescript/agents/schema-utils/index__2.mdx delete mode 100644 fern/products/sdk-reference/typescript/agents/serverless-adapter/index__2.mdx delete mode 100644 fern/products/sdk-reference/typescript/agents/session-manager/index__2.mdx delete mode 100644 fern/products/sdk-reference/typescript/agents/skills/builtin/api-ninjas-trivia/api-ninjas-trivia-skill/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/agents/skills/builtin/ask-claude/ask-claude-skill/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/agents/skills/builtin/claude-skills/claude-skills-skill/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/agents/skills/builtin/custom-skills/custom-skills-skill/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/agents/skills/builtin/datasphere-serverless/data-sphere-serverless-skill/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/agents/skills/builtin/datasphere/data-sphere-skill/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/agents/skills/builtin/datetime/date-time-skill/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/agents/skills/builtin/google-maps/google-maps-skill/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/agents/skills/builtin/info-gatherer/info-gatherer-skill/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/agents/skills/builtin/joke/joke-skill/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/agents/skills/builtin/math/math-skill/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/agents/skills/builtin/mcp-gateway/mcp-gateway-skill/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/agents/skills/builtin/native-vector-search/native-vector-search-skill/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/agents/skills/builtin/play-background-file/play-background-file-skill/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/agents/skills/builtin/spider/spider-skill/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/agents/skills/builtin/swml-transfer/swml-transfer-skill/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/agents/skills/builtin/weather-api/weather-api-skill/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/agents/skills/builtin/web-search/web-search-skill/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/agents/skills/builtin/wikipedia-search/wikipedia-search-skill/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/agents/skills/skill-base/index__2.mdx delete mode 100644 fern/products/sdk-reference/typescript/agents/skills/skill-registry/index__2.mdx delete mode 100644 fern/products/sdk-reference/typescript/agents/ssl-config/index__2.mdx delete mode 100644 fern/products/sdk-reference/typescript/agents/swaig-function/index__2.mdx delete mode 100644 fern/products/sdk-reference/typescript/agents/swml-builder/index__2.mdx delete mode 100644 fern/products/sdk-reference/typescript/agents/swml-service/index__2.mdx delete mode 100644 fern/products/sdk-reference/typescript/agents/web-service/index__2.mdx delete mode 100644 fern/products/sdk-reference/typescript/list-skills-with-params.mdx delete mode 100644 fern/products/sdk-reference/typescript/list-skills.mdx delete mode 100644 fern/products/sdk-reference/typescript/register-skill.mdx delete mode 100644 fern/products/sdk-reference/typescript/relay/action/index__2.mdx delete mode 100644 fern/products/sdk-reference/typescript/relay/call/index__2.mdx delete mode 100644 fern/products/sdk-reference/typescript/relay/relay-event/index__2.mdx delete mode 100644 fern/products/sdk-reference/typescript/rest-client.mdx delete mode 100644 fern/products/sdk-reference/typescript/rest/addresses/addresses-resource/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/rest/calling/calling-namespace/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/rest/chat/chat-resource/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/rest/imported-numbers/imported-numbers-resource/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/rest/lookup/lookup-resource/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/rest/mfa/mfa-resource/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/rest/number-groups/number-groups-resource/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/rest/phone-numbers/phone-numbers-resource/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/rest/pubsub/pub-sub-resource/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/rest/queues/queues-resource/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/rest/recordings/recordings-resource/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/rest/rest-client/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/rest/short-codes/short-codes-resource/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/rest/sip-profile/sip-profile-resource/index.mdx delete mode 100644 fern/products/sdk-reference/typescript/rest/verified-callers/verified-callers-resource/index.mdx diff --git a/fern/products/sdk-reference/cpp/_meta.json b/fern/products/sdk-reference/cpp/_meta.json index 2227cce79b..8d27cb69c9 100644 --- a/fern/products/sdk-reference/cpp/_meta.json +++ b/fern/products/sdk-reference/cpp/_meta.json @@ -6,5 +6,5 @@ "format": "mdx", "platform": "fern", "base_slug": "/reference/cpp", - "item_count": 1823 + "item_count": 1819 } \ No newline at end of file diff --git a/fern/products/sdk-reference/cpp/core/index.mdx b/fern/products/sdk-reference/cpp/core/index.mdx index a0ff2e28d1..62d54f3fa4 100644 --- a/fern/products/sdk-reference/cpp/core/index.mdx +++ b/fern/products/sdk-reference/cpp/core/index.mdx @@ -11,13 +11,17 @@ lustri: --- # `core` +## Classes + + + + + ## Modules - - diff --git a/fern/products/sdk-reference/cpp/core/logging/index.mdx b/fern/products/sdk-reference/cpp/core/logging/index.mdx index 888cb0ee0b..90afe58f3a 100644 --- a/fern/products/sdk-reference/cpp/core/logging/index.mdx +++ b/fern/products/sdk-reference/cpp/core/logging/index.mdx @@ -5,7 +5,7 @@ sdk_label: "C++ SDK" icon: "cpp" lustri: auto_generated: true - kind: "module" + kind: "class" language: "cpp" qualified_name: "signalwire::logging" parent: "core" @@ -17,14 +17,118 @@ lustri: ## Signature ```cpp -namespace signalwire::logging +class signalwire::logging::Logger ``` -## Classes +## Methods - - - +### debug + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +void debug(std::string_view msg) const +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/logging/logger.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging/logger.hpp) + +Line 35. + +*** + +### error + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +void error(std::string_view msg) const +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/logging/logger.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging/logger.hpp) + +Line 47. + +*** + +### info + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +void info(std::string_view msg) const +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/logging/logger.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging/logger.hpp) + +Line 39. + +*** + +### Logger + +**Modifiers:** `explicit` `inline` + +#### Signature + +```cpp +void Logger(const std::string & name) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/logging/logger.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging/logger.hpp) + +Line 29. + +*** + +### warn + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +void warn(std::string_view msg) const +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/logging/logger.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging/logger.hpp) + +Line 43. ## Functions @@ -106,4 +210,4 @@ Line 13. [`include/signalwire/logging/logger.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging/logger.hpp) -Line 11. +Line 27. diff --git a/fern/products/sdk-reference/cpp/core/logging/logger/index.mdx b/fern/products/sdk-reference/cpp/core/logging/logger/index.mdx deleted file mode 100644 index 6515520653..0000000000 --- a/fern/products/sdk-reference/cpp/core/logging/logger/index.mdx +++ /dev/null @@ -1,138 +0,0 @@ ---- -slug: "/reference/cpp/core/logging/logger" -title: "Logger" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::logging::Logger" - parent: "signalwire::logging" - module: "core.logging" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging/logger.hpp" - visibility: "public" ---- -# `Logger` - -## Signature - -```cpp -class signalwire::logging::Logger -``` - -## Methods - -### debug - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -void debug(std::string_view msg) const -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/logging/logger.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging/logger.hpp) - -Line 35. - -*** - -### error - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -void error(std::string_view msg) const -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/logging/logger.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging/logger.hpp) - -Line 47. - -*** - -### info - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -void info(std::string_view msg) const -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/logging/logger.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging/logger.hpp) - -Line 39. - -*** - -### Logger - -**Modifiers:** `explicit` `inline` - -#### Signature - -```cpp -void Logger(const std::string & name) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/logging/logger.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging/logger.hpp) - -Line 29. - -*** - -### warn - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -void warn(std::string_view msg) const -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/logging/logger.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging/logger.hpp) - -Line 43. - -## Source - -[`include/signalwire/logging/logger.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging/logger.hpp) - -Line 27. diff --git a/fern/products/sdk-reference/cpp/index.mdx b/fern/products/sdk-reference/cpp/index.mdx index 65d6e494d6..5eb406e921 100644 --- a/fern/products/sdk-reference/cpp/index.mdx +++ b/fern/products/sdk-reference/cpp/index.mdx @@ -14,5 +14,4 @@ lustri: - [`core`](/docs/sdk-reference/reference/cpp/core) - [`relay`](/docs/sdk-reference/reference/cpp/relay) - [`rest`](/docs/sdk-reference/reference/cpp/rest) -- [`signalwire`](/docs/sdk-reference/reference/cpp/signalwire) diff --git a/fern/products/sdk-reference/cpp/rest/index.mdx b/fern/products/sdk-reference/cpp/rest/index.mdx index 48250fc9fe..e07c3648bd 100644 --- a/fern/products/sdk-reference/cpp/rest/index.mdx +++ b/fern/products/sdk-reference/cpp/rest/index.mdx @@ -42,12 +42,6 @@ namespace signalwire::rest -## Modules - - - - - ## Functions ### make\_headers diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/addresses-namespace/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/addresses-namespace/index.mdx index 067e185429..f97d55e269 100644 --- a/fern/products/sdk-reference/cpp/rest/rest-client/addresses-namespace/index.mdx +++ b/fern/products/sdk-reference/cpp/rest/rest-client/addresses-namespace/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "cpp" qualified_name: "signalwire::rest::RestClient::AddressesNamespace" - parent: "rest.RestClient" + parent: "signalwire::rest::RestClient" module: "rest.RestClient" source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" visibility: "public" diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/calling-namespace/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/calling-namespace/index.mdx index 1c78ffe307..9a0c1a149b 100644 --- a/fern/products/sdk-reference/cpp/rest/rest-client/calling-namespace/index.mdx +++ b/fern/products/sdk-reference/cpp/rest/rest-client/calling-namespace/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "cpp" qualified_name: "signalwire::rest::RestClient::CallingNamespace" - parent: "rest.RestClient" + parent: "signalwire::rest::RestClient" module: "rest.RestClient" source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" visibility: "public" diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/chat-namespace/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/chat-namespace/index.mdx index 1a19af3c23..d70590c1bb 100644 --- a/fern/products/sdk-reference/cpp/rest/rest-client/chat-namespace/index.mdx +++ b/fern/products/sdk-reference/cpp/rest/rest-client/chat-namespace/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "cpp" qualified_name: "signalwire::rest::RestClient::ChatNamespace" - parent: "rest.RestClient" + parent: "signalwire::rest::RestClient" module: "rest.RestClient" source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" visibility: "public" diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/compat-accounts/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/compat-accounts/index.mdx index 44d612dc3c..daa01ced69 100644 --- a/fern/products/sdk-reference/cpp/rest/rest-client/compat-accounts/index.mdx +++ b/fern/products/sdk-reference/cpp/rest/rest-client/compat-accounts/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "cpp" qualified_name: "signalwire::rest::RestClient::CompatAccounts" - parent: "rest.RestClient" + parent: "signalwire::rest::RestClient" module: "rest.RestClient" source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" visibility: "public" diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/compat-applications/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/compat-applications/index.mdx index a528875cd8..0fdf4dc428 100644 --- a/fern/products/sdk-reference/cpp/rest/rest-client/compat-applications/index.mdx +++ b/fern/products/sdk-reference/cpp/rest/rest-client/compat-applications/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "cpp" qualified_name: "signalwire::rest::RestClient::CompatApplications" - parent: "rest.RestClient" + parent: "signalwire::rest::RestClient" module: "rest.RestClient" source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" visibility: "public" diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/compat-calls/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/compat-calls/index.mdx index 73a6f31e5b..fc2777d86e 100644 --- a/fern/products/sdk-reference/cpp/rest/rest-client/compat-calls/index.mdx +++ b/fern/products/sdk-reference/cpp/rest/rest-client/compat-calls/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "cpp" qualified_name: "signalwire::rest::RestClient::CompatCalls" - parent: "rest.RestClient" + parent: "signalwire::rest::RestClient" module: "rest.RestClient" source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" visibility: "public" diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/compat-conferences/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/compat-conferences/index.mdx index 09755a8f4a..e2d50408f4 100644 --- a/fern/products/sdk-reference/cpp/rest/rest-client/compat-conferences/index.mdx +++ b/fern/products/sdk-reference/cpp/rest/rest-client/compat-conferences/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "cpp" qualified_name: "signalwire::rest::RestClient::CompatConferences" - parent: "rest.RestClient" + parent: "signalwire::rest::RestClient" module: "rest.RestClient" source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" visibility: "public" diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/compat-faxes/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/compat-faxes/index.mdx index 668239c201..024bf56529 100644 --- a/fern/products/sdk-reference/cpp/rest/rest-client/compat-faxes/index.mdx +++ b/fern/products/sdk-reference/cpp/rest/rest-client/compat-faxes/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "cpp" qualified_name: "signalwire::rest::RestClient::CompatFaxes" - parent: "rest.RestClient" + parent: "signalwire::rest::RestClient" module: "rest.RestClient" source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" visibility: "public" diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/compat-laml-bins/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/compat-laml-bins/index.mdx index a391238dd2..7101298e88 100644 --- a/fern/products/sdk-reference/cpp/rest/rest-client/compat-laml-bins/index.mdx +++ b/fern/products/sdk-reference/cpp/rest/rest-client/compat-laml-bins/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "cpp" qualified_name: "signalwire::rest::RestClient::CompatLamlBins" - parent: "rest.RestClient" + parent: "signalwire::rest::RestClient" module: "rest.RestClient" source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" visibility: "public" diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/compat-messages/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/compat-messages/index.mdx index ff32d8fc5e..a7322ce90b 100644 --- a/fern/products/sdk-reference/cpp/rest/rest-client/compat-messages/index.mdx +++ b/fern/products/sdk-reference/cpp/rest/rest-client/compat-messages/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "cpp" qualified_name: "signalwire::rest::RestClient::CompatMessages" - parent: "rest.RestClient" + parent: "signalwire::rest::RestClient" module: "rest.RestClient" source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" visibility: "public" diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/compat-namespace/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/compat-namespace/index.mdx index 9999cd99ff..edd7334b68 100644 --- a/fern/products/sdk-reference/cpp/rest/rest-client/compat-namespace/index.mdx +++ b/fern/products/sdk-reference/cpp/rest/rest-client/compat-namespace/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "cpp" qualified_name: "signalwire::rest::RestClient::CompatNamespace" - parent: "rest.RestClient" + parent: "signalwire::rest::RestClient" module: "rest.RestClient" source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" visibility: "public" diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/compat-phone-numbers/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/compat-phone-numbers/index.mdx index cda3836a7a..47c84083bb 100644 --- a/fern/products/sdk-reference/cpp/rest/rest-client/compat-phone-numbers/index.mdx +++ b/fern/products/sdk-reference/cpp/rest/rest-client/compat-phone-numbers/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "cpp" qualified_name: "signalwire::rest::RestClient::CompatPhoneNumbers" - parent: "rest.RestClient" + parent: "signalwire::rest::RestClient" module: "rest.RestClient" source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" visibility: "public" diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/compat-queues/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/compat-queues/index.mdx index 28ce786596..17f2e9d3e4 100644 --- a/fern/products/sdk-reference/cpp/rest/rest-client/compat-queues/index.mdx +++ b/fern/products/sdk-reference/cpp/rest/rest-client/compat-queues/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "cpp" qualified_name: "signalwire::rest::RestClient::CompatQueues" - parent: "rest.RestClient" + parent: "signalwire::rest::RestClient" module: "rest.RestClient" source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" visibility: "public" diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/compat-recordings/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/compat-recordings/index.mdx index 6d455c86b7..994ce9b6a3 100644 --- a/fern/products/sdk-reference/cpp/rest/rest-client/compat-recordings/index.mdx +++ b/fern/products/sdk-reference/cpp/rest/rest-client/compat-recordings/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "cpp" qualified_name: "signalwire::rest::RestClient::CompatRecordings" - parent: "rest.RestClient" + parent: "signalwire::rest::RestClient" module: "rest.RestClient" source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" visibility: "public" diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/compat-tokens/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/compat-tokens/index.mdx index b1efcf2199..f6b4ea1e2a 100644 --- a/fern/products/sdk-reference/cpp/rest/rest-client/compat-tokens/index.mdx +++ b/fern/products/sdk-reference/cpp/rest/rest-client/compat-tokens/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "cpp" qualified_name: "signalwire::rest::RestClient::CompatTokens" - parent: "rest.RestClient" + parent: "signalwire::rest::RestClient" module: "rest.RestClient" source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" visibility: "public" diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/compat-transcriptions/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/compat-transcriptions/index.mdx index d194c04992..5fce33cbcf 100644 --- a/fern/products/sdk-reference/cpp/rest/rest-client/compat-transcriptions/index.mdx +++ b/fern/products/sdk-reference/cpp/rest/rest-client/compat-transcriptions/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "cpp" qualified_name: "signalwire::rest::RestClient::CompatTranscriptions" - parent: "rest.RestClient" + parent: "signalwire::rest::RestClient" module: "rest.RestClient" source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" visibility: "public" diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/datasphere-documents/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/datasphere-documents/index.mdx index 2d4e68c084..b2f11a6c4b 100644 --- a/fern/products/sdk-reference/cpp/rest/rest-client/datasphere-documents/index.mdx +++ b/fern/products/sdk-reference/cpp/rest/rest-client/datasphere-documents/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "cpp" qualified_name: "signalwire::rest::RestClient::DatasphereDocuments" - parent: "rest.RestClient" + parent: "signalwire::rest::RestClient" module: "rest.RestClient" source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" visibility: "public" diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/datasphere-namespace/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/datasphere-namespace/index.mdx index ff2153e943..f2633ca467 100644 --- a/fern/products/sdk-reference/cpp/rest/rest-client/datasphere-namespace/index.mdx +++ b/fern/products/sdk-reference/cpp/rest/rest-client/datasphere-namespace/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "cpp" qualified_name: "signalwire::rest::RestClient::DatasphereNamespace" - parent: "rest.RestClient" + parent: "signalwire::rest::RestClient" module: "rest.RestClient" source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" visibility: "public" diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/fabric-addresses/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/fabric-addresses/index.mdx index 7b8d9be757..0a8718b557 100644 --- a/fern/products/sdk-reference/cpp/rest/rest-client/fabric-addresses/index.mdx +++ b/fern/products/sdk-reference/cpp/rest/rest-client/fabric-addresses/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "cpp" qualified_name: "signalwire::rest::RestClient::FabricAddresses" - parent: "rest.RestClient" + parent: "signalwire::rest::RestClient" module: "rest.RestClient" source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" visibility: "public" diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/fabric-call-flows/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/fabric-call-flows/index.mdx index 3d424da525..3ccbc7fe10 100644 --- a/fern/products/sdk-reference/cpp/rest/rest-client/fabric-call-flows/index.mdx +++ b/fern/products/sdk-reference/cpp/rest/rest-client/fabric-call-flows/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "cpp" qualified_name: "signalwire::rest::RestClient::FabricCallFlows" - parent: "rest.RestClient" + parent: "signalwire::rest::RestClient" module: "rest.RestClient" source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" visibility: "public" diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/fabric-conference-rooms/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/fabric-conference-rooms/index.mdx index 820de65ecd..e5cc9835d1 100644 --- a/fern/products/sdk-reference/cpp/rest/rest-client/fabric-conference-rooms/index.mdx +++ b/fern/products/sdk-reference/cpp/rest/rest-client/fabric-conference-rooms/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "cpp" qualified_name: "signalwire::rest::RestClient::FabricConferenceRooms" - parent: "rest.RestClient" + parent: "signalwire::rest::RestClient" module: "rest.RestClient" source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" visibility: "public" diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/fabric-cxml-applications/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/fabric-cxml-applications/index.mdx index 49ffbe312d..f7c3b2fde6 100644 --- a/fern/products/sdk-reference/cpp/rest/rest-client/fabric-cxml-applications/index.mdx +++ b/fern/products/sdk-reference/cpp/rest/rest-client/fabric-cxml-applications/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "cpp" qualified_name: "signalwire::rest::RestClient::FabricCxmlApplications" - parent: "rest.RestClient" + parent: "signalwire::rest::RestClient" module: "rest.RestClient" source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" visibility: "public" diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/fabric-generic-resources/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/fabric-generic-resources/index.mdx index d1ba745ab3..80ce7d6844 100644 --- a/fern/products/sdk-reference/cpp/rest/rest-client/fabric-generic-resources/index.mdx +++ b/fern/products/sdk-reference/cpp/rest/rest-client/fabric-generic-resources/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "cpp" qualified_name: "signalwire::rest::RestClient::FabricGenericResources" - parent: "rest.RestClient" + parent: "signalwire::rest::RestClient" module: "rest.RestClient" source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" visibility: "public" diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/fabric-namespace/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/fabric-namespace/index.mdx index 4ecf18b6f8..5a30e301e6 100644 --- a/fern/products/sdk-reference/cpp/rest/rest-client/fabric-namespace/index.mdx +++ b/fern/products/sdk-reference/cpp/rest/rest-client/fabric-namespace/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "cpp" qualified_name: "signalwire::rest::RestClient::FabricNamespace" - parent: "rest.RestClient" + parent: "signalwire::rest::RestClient" module: "rest.RestClient" source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" visibility: "public" diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/fabric-resource-put/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/fabric-resource-put/index.mdx index 26b562eb48..f895bdaf1c 100644 --- a/fern/products/sdk-reference/cpp/rest/rest-client/fabric-resource-put/index.mdx +++ b/fern/products/sdk-reference/cpp/rest/rest-client/fabric-resource-put/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "cpp" qualified_name: "signalwire::rest::RestClient::FabricResourcePUT" - parent: "rest.RestClient" + parent: "signalwire::rest::RestClient" module: "rest.RestClient" source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" visibility: "public" diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/fabric-resource/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/fabric-resource/index.mdx index 751ff73b04..0da4100a78 100644 --- a/fern/products/sdk-reference/cpp/rest/rest-client/fabric-resource/index.mdx +++ b/fern/products/sdk-reference/cpp/rest/rest-client/fabric-resource/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "cpp" qualified_name: "signalwire::rest::RestClient::FabricResource" - parent: "rest.RestClient" + parent: "signalwire::rest::RestClient" module: "rest.RestClient" source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" visibility: "public" diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/fabric-subscribers/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/fabric-subscribers/index.mdx index 8d4e9a9279..a1a61850e2 100644 --- a/fern/products/sdk-reference/cpp/rest/rest-client/fabric-subscribers/index.mdx +++ b/fern/products/sdk-reference/cpp/rest/rest-client/fabric-subscribers/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "cpp" qualified_name: "signalwire::rest::RestClient::FabricSubscribers" - parent: "rest.RestClient" + parent: "signalwire::rest::RestClient" module: "rest.RestClient" source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" visibility: "public" diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/fabric-tokens/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/fabric-tokens/index.mdx index 9214f64b11..0a60c7d206 100644 --- a/fern/products/sdk-reference/cpp/rest/rest-client/fabric-tokens/index.mdx +++ b/fern/products/sdk-reference/cpp/rest/rest-client/fabric-tokens/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "cpp" qualified_name: "signalwire::rest::RestClient::FabricTokens" - parent: "rest.RestClient" + parent: "signalwire::rest::RestClient" module: "rest.RestClient" source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" visibility: "public" diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/imported-numbers-namespace/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/imported-numbers-namespace/index.mdx index ac6ff10100..7aee448aa8 100644 --- a/fern/products/sdk-reference/cpp/rest/rest-client/imported-numbers-namespace/index.mdx +++ b/fern/products/sdk-reference/cpp/rest/rest-client/imported-numbers-namespace/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "cpp" qualified_name: "signalwire::rest::RestClient::ImportedNumbersNamespace" - parent: "rest.RestClient" + parent: "signalwire::rest::RestClient" module: "rest.RestClient" source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" visibility: "public" diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/index.mdx index d7116a97c7..9c1a521421 100644 --- a/fern/products/sdk-reference/cpp/rest/rest-client/index.mdx +++ b/fern/products/sdk-reference/cpp/rest/rest-client/index.mdx @@ -23,6 +23,128 @@ Top-level SignalWire REST client with all API namespaces. class signalwire::rest::RestClient ``` +## Classes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ## Methods ### addresses diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/index__2.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/index__2.mdx deleted file mode 100644 index f3d7d60836..0000000000 --- a/fern/products/sdk-reference/cpp/rest/rest-client/index__2.mdx +++ /dev/null @@ -1,142 +0,0 @@ ---- -slug: "/reference/cpp/rest/rest-client/index__2" -title: "RestClient" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "module" - language: "cpp" - qualified_name: "rest.RestClient" - parent: "signalwire::rest" - module: "rest" ---- -# `RestClient` - -## Classes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -## Modules - - - - diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/logs-conferences/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/logs-conferences/index.mdx index 5fb91ae76a..2e246bc8ad 100644 --- a/fern/products/sdk-reference/cpp/rest/rest-client/logs-conferences/index.mdx +++ b/fern/products/sdk-reference/cpp/rest/rest-client/logs-conferences/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "cpp" qualified_name: "signalwire::rest::RestClient::LogsConferences" - parent: "rest.RestClient" + parent: "signalwire::rest::RestClient" module: "rest.RestClient" source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" visibility: "public" diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/logs-fax/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/logs-fax/index.mdx index cb578a9812..292fb8e64e 100644 --- a/fern/products/sdk-reference/cpp/rest/rest-client/logs-fax/index.mdx +++ b/fern/products/sdk-reference/cpp/rest/rest-client/logs-fax/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "cpp" qualified_name: "signalwire::rest::RestClient::LogsFax" - parent: "rest.RestClient" + parent: "signalwire::rest::RestClient" module: "rest.RestClient" source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" visibility: "public" diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/logs-messages/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/logs-messages/index.mdx index a35f1eeabf..c6438b1704 100644 --- a/fern/products/sdk-reference/cpp/rest/rest-client/logs-messages/index.mdx +++ b/fern/products/sdk-reference/cpp/rest/rest-client/logs-messages/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "cpp" qualified_name: "signalwire::rest::RestClient::LogsMessages" - parent: "rest.RestClient" + parent: "signalwire::rest::RestClient" module: "rest.RestClient" source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" visibility: "public" diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/logs-namespace/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/logs-namespace/index.mdx index 7127783bb9..fe27820f11 100644 --- a/fern/products/sdk-reference/cpp/rest/rest-client/logs-namespace/index.mdx +++ b/fern/products/sdk-reference/cpp/rest/rest-client/logs-namespace/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "cpp" qualified_name: "signalwire::rest::RestClient::LogsNamespace" - parent: "rest.RestClient" + parent: "signalwire::rest::RestClient" module: "rest.RestClient" source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" visibility: "public" diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/logs-voice/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/logs-voice/index.mdx index 1a2c5cb09d..7a8e21afdf 100644 --- a/fern/products/sdk-reference/cpp/rest/rest-client/logs-voice/index.mdx +++ b/fern/products/sdk-reference/cpp/rest/rest-client/logs-voice/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "cpp" qualified_name: "signalwire::rest::RestClient::LogsVoice" - parent: "rest.RestClient" + parent: "signalwire::rest::RestClient" module: "rest.RestClient" source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" visibility: "public" diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/lookup-namespace/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/lookup-namespace/index.mdx index c01be60503..351cb3835a 100644 --- a/fern/products/sdk-reference/cpp/rest/rest-client/lookup-namespace/index.mdx +++ b/fern/products/sdk-reference/cpp/rest/rest-client/lookup-namespace/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "cpp" qualified_name: "signalwire::rest::RestClient::LookupNamespace" - parent: "rest.RestClient" + parent: "signalwire::rest::RestClient" module: "rest.RestClient" source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" visibility: "public" diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/mfa-namespace/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/mfa-namespace/index.mdx index 40132d50df..1281ef5759 100644 --- a/fern/products/sdk-reference/cpp/rest/rest-client/mfa-namespace/index.mdx +++ b/fern/products/sdk-reference/cpp/rest/rest-client/mfa-namespace/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "cpp" qualified_name: "signalwire::rest::RestClient::MFANamespace" - parent: "rest.RestClient" + parent: "signalwire::rest::RestClient" module: "rest.RestClient" source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" visibility: "public" diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/number-groups-namespace/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/number-groups-namespace/index.mdx index 4e56f432f6..a03a459678 100644 --- a/fern/products/sdk-reference/cpp/rest/rest-client/number-groups-namespace/index.mdx +++ b/fern/products/sdk-reference/cpp/rest/rest-client/number-groups-namespace/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "cpp" qualified_name: "signalwire::rest::RestClient::NumberGroupsNamespace" - parent: "rest.RestClient" + parent: "signalwire::rest::RestClient" module: "rest.RestClient" source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" visibility: "public" diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/phone-numbers-namespace/call-flow-options/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/phone-numbers-namespace/call-flow-options/index.mdx index 7a13c75ff5..d7faa1d110 100644 --- a/fern/products/sdk-reference/cpp/rest/rest-client/phone-numbers-namespace/call-flow-options/index.mdx +++ b/fern/products/sdk-reference/cpp/rest/rest-client/phone-numbers-namespace/call-flow-options/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "cpp" qualified_name: "signalwire::rest::RestClient::PhoneNumbersNamespace::CallFlowOptions" - parent: "rest.RestClient.PhoneNumbersNamespace" + parent: "signalwire::rest::RestClient::PhoneNumbersNamespace" module: "rest.RestClient.PhoneNumbersNamespace" source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" visibility: "public" diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/phone-numbers-namespace/cxml-webhook-options/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/phone-numbers-namespace/cxml-webhook-options/index.mdx index 56a6233ca5..5541a74c4d 100644 --- a/fern/products/sdk-reference/cpp/rest/rest-client/phone-numbers-namespace/cxml-webhook-options/index.mdx +++ b/fern/products/sdk-reference/cpp/rest/rest-client/phone-numbers-namespace/cxml-webhook-options/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "cpp" qualified_name: "signalwire::rest::RestClient::PhoneNumbersNamespace::CxmlWebhookOptions" - parent: "rest.RestClient.PhoneNumbersNamespace" + parent: "signalwire::rest::RestClient::PhoneNumbersNamespace" module: "rest.RestClient.PhoneNumbersNamespace" source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" visibility: "public" diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/phone-numbers-namespace/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/phone-numbers-namespace/index.mdx index a7d42977fc..1e81bf5a35 100644 --- a/fern/products/sdk-reference/cpp/rest/rest-client/phone-numbers-namespace/index.mdx +++ b/fern/products/sdk-reference/cpp/rest/rest-client/phone-numbers-namespace/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "cpp" qualified_name: "signalwire::rest::RestClient::PhoneNumbersNamespace" - parent: "rest.RestClient" + parent: "signalwire::rest::RestClient" module: "rest.RestClient" source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" visibility: "public" @@ -25,6 +25,22 @@ struct signalwire::rest::RestClient::PhoneNumbersNamespace : signalwire::rest::C **Extends:** [signalwire::rest::CrudResource](/docs/sdk-reference/reference/cpp/rest/crud-resource) +## Classes + + + + Options for binding a phone number to a call flow. + + + + Options for binding a phone number to a cXML (Twilio-compat) webhook. + + + + Options for binding a phone number to a RELAY topic. + + + ## Methods ### buy diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/phone-numbers-namespace/index__2.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/phone-numbers-namespace/index__2.mdx deleted file mode 100644 index aab2f7aa06..0000000000 --- a/fern/products/sdk-reference/cpp/rest/rest-client/phone-numbers-namespace/index__2.mdx +++ /dev/null @@ -1,30 +0,0 @@ ---- -slug: "/reference/cpp/rest/rest-client/phone-numbers-namespace/index__2" -title: "PhoneNumbersNamespace" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "module" - language: "cpp" - qualified_name: "rest.RestClient.PhoneNumbersNamespace" - parent: "rest.RestClient" - module: "rest.RestClient" ---- -# `PhoneNumbersNamespace` - -## Classes - - - - Options for binding a phone number to a call flow. - - - - Options for binding a phone number to a cXML (Twilio-compat) webhook. - - - - Options for binding a phone number to a RELAY topic. - - diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/phone-numbers-namespace/relay-topic-options/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/phone-numbers-namespace/relay-topic-options/index.mdx index 1d866624d4..10a7f2ca45 100644 --- a/fern/products/sdk-reference/cpp/rest/rest-client/phone-numbers-namespace/relay-topic-options/index.mdx +++ b/fern/products/sdk-reference/cpp/rest/rest-client/phone-numbers-namespace/relay-topic-options/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "cpp" qualified_name: "signalwire::rest::RestClient::PhoneNumbersNamespace::RelayTopicOptions" - parent: "rest.RestClient.PhoneNumbersNamespace" + parent: "signalwire::rest::RestClient::PhoneNumbersNamespace" module: "rest.RestClient.PhoneNumbersNamespace" source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" visibility: "public" diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/project-namespace/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/project-namespace/index.mdx index d04bab895d..f423930d16 100644 --- a/fern/products/sdk-reference/cpp/rest/rest-client/project-namespace/index.mdx +++ b/fern/products/sdk-reference/cpp/rest/rest-client/project-namespace/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "cpp" qualified_name: "signalwire::rest::RestClient::ProjectNamespace" - parent: "rest.RestClient" + parent: "signalwire::rest::RestClient" module: "rest.RestClient" source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" visibility: "public" diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/project-tokens/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/project-tokens/index.mdx index 1af0c80d7a..7b0ec64dbc 100644 --- a/fern/products/sdk-reference/cpp/rest/rest-client/project-tokens/index.mdx +++ b/fern/products/sdk-reference/cpp/rest/rest-client/project-tokens/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "cpp" qualified_name: "signalwire::rest::RestClient::ProjectTokens" - parent: "rest.RestClient" + parent: "signalwire::rest::RestClient" module: "rest.RestClient" source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" visibility: "public" diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/pub-sub-namespace/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/pub-sub-namespace/index.mdx index da635743dc..ca2ece7578 100644 --- a/fern/products/sdk-reference/cpp/rest/rest-client/pub-sub-namespace/index.mdx +++ b/fern/products/sdk-reference/cpp/rest/rest-client/pub-sub-namespace/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "cpp" qualified_name: "signalwire::rest::RestClient::PubSubNamespace" - parent: "rest.RestClient" + parent: "signalwire::rest::RestClient" module: "rest.RestClient" source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" visibility: "public" diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/queues-namespace/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/queues-namespace/index.mdx index 39f4d47fb9..8717bb6844 100644 --- a/fern/products/sdk-reference/cpp/rest/rest-client/queues-namespace/index.mdx +++ b/fern/products/sdk-reference/cpp/rest/rest-client/queues-namespace/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "cpp" qualified_name: "signalwire::rest::RestClient::QueuesNamespace" - parent: "rest.RestClient" + parent: "signalwire::rest::RestClient" module: "rest.RestClient" source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" visibility: "public" diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/recordings-namespace/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/recordings-namespace/index.mdx index fbe9333b6f..e8b74b1fbc 100644 --- a/fern/products/sdk-reference/cpp/rest/rest-client/recordings-namespace/index.mdx +++ b/fern/products/sdk-reference/cpp/rest/rest-client/recordings-namespace/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "cpp" qualified_name: "signalwire::rest::RestClient::RecordingsNamespace" - parent: "rest.RestClient" + parent: "signalwire::rest::RestClient" module: "rest.RestClient" source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" visibility: "public" diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/registry-brands/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/registry-brands/index.mdx index 176853ce6d..bf58e9159f 100644 --- a/fern/products/sdk-reference/cpp/rest/rest-client/registry-brands/index.mdx +++ b/fern/products/sdk-reference/cpp/rest/rest-client/registry-brands/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "cpp" qualified_name: "signalwire::rest::RestClient::RegistryBrands" - parent: "rest.RestClient" + parent: "signalwire::rest::RestClient" module: "rest.RestClient" source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" visibility: "public" diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/registry-campaigns/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/registry-campaigns/index.mdx index 3d1adeda44..9664ece022 100644 --- a/fern/products/sdk-reference/cpp/rest/rest-client/registry-campaigns/index.mdx +++ b/fern/products/sdk-reference/cpp/rest/rest-client/registry-campaigns/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "cpp" qualified_name: "signalwire::rest::RestClient::RegistryCampaigns" - parent: "rest.RestClient" + parent: "signalwire::rest::RestClient" module: "rest.RestClient" source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" visibility: "public" diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/registry-namespace/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/registry-namespace/index.mdx index d1376e2de9..0479bec1f1 100644 --- a/fern/products/sdk-reference/cpp/rest/rest-client/registry-namespace/index.mdx +++ b/fern/products/sdk-reference/cpp/rest/rest-client/registry-namespace/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "cpp" qualified_name: "signalwire::rest::RestClient::RegistryNamespace" - parent: "rest.RestClient" + parent: "signalwire::rest::RestClient" module: "rest.RestClient" source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" visibility: "public" diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/registry-numbers/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/registry-numbers/index.mdx index 835e9a1115..87b8c12a7b 100644 --- a/fern/products/sdk-reference/cpp/rest/rest-client/registry-numbers/index.mdx +++ b/fern/products/sdk-reference/cpp/rest/rest-client/registry-numbers/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "cpp" qualified_name: "signalwire::rest::RestClient::RegistryNumbers" - parent: "rest.RestClient" + parent: "signalwire::rest::RestClient" module: "rest.RestClient" source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" visibility: "public" diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/registry-orders/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/registry-orders/index.mdx index 5432fd4b07..23d08cc2ee 100644 --- a/fern/products/sdk-reference/cpp/rest/rest-client/registry-orders/index.mdx +++ b/fern/products/sdk-reference/cpp/rest/rest-client/registry-orders/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "cpp" qualified_name: "signalwire::rest::RestClient::RegistryOrders" - parent: "rest.RestClient" + parent: "signalwire::rest::RestClient" module: "rest.RestClient" source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" visibility: "public" diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/short-codes-namespace/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/short-codes-namespace/index.mdx index 0a98b9a20e..ec0ef73245 100644 --- a/fern/products/sdk-reference/cpp/rest/rest-client/short-codes-namespace/index.mdx +++ b/fern/products/sdk-reference/cpp/rest/rest-client/short-codes-namespace/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "cpp" qualified_name: "signalwire::rest::RestClient::ShortCodesNamespace" - parent: "rest.RestClient" + parent: "signalwire::rest::RestClient" module: "rest.RestClient" source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" visibility: "public" diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/sip-profile-namespace/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/sip-profile-namespace/index.mdx index fcbe48c46f..021c853464 100644 --- a/fern/products/sdk-reference/cpp/rest/rest-client/sip-profile-namespace/index.mdx +++ b/fern/products/sdk-reference/cpp/rest/rest-client/sip-profile-namespace/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "cpp" qualified_name: "signalwire::rest::RestClient::SipProfileNamespace" - parent: "rest.RestClient" + parent: "signalwire::rest::RestClient" module: "rest.RestClient" source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" visibility: "public" diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/verified-callers-namespace/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/verified-callers-namespace/index.mdx index 76669e4b75..48292c689e 100644 --- a/fern/products/sdk-reference/cpp/rest/rest-client/verified-callers-namespace/index.mdx +++ b/fern/products/sdk-reference/cpp/rest/rest-client/verified-callers-namespace/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "cpp" qualified_name: "signalwire::rest::RestClient::VerifiedCallersNamespace" - parent: "rest.RestClient" + parent: "signalwire::rest::RestClient" module: "rest.RestClient" source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" visibility: "public" diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/video-conference-tokens/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/video-conference-tokens/index.mdx index f1b7ca894e..124f8965c3 100644 --- a/fern/products/sdk-reference/cpp/rest/rest-client/video-conference-tokens/index.mdx +++ b/fern/products/sdk-reference/cpp/rest/rest-client/video-conference-tokens/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "cpp" qualified_name: "signalwire::rest::RestClient::VideoConferenceTokens" - parent: "rest.RestClient" + parent: "signalwire::rest::RestClient" module: "rest.RestClient" source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" visibility: "public" diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/video-conferences/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/video-conferences/index.mdx index eddbe47ed5..69e7fe7b4b 100644 --- a/fern/products/sdk-reference/cpp/rest/rest-client/video-conferences/index.mdx +++ b/fern/products/sdk-reference/cpp/rest/rest-client/video-conferences/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "cpp" qualified_name: "signalwire::rest::RestClient::VideoConferences" - parent: "rest.RestClient" + parent: "signalwire::rest::RestClient" module: "rest.RestClient" source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" visibility: "public" diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/video-namespace/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/video-namespace/index.mdx index e8870b1887..48d3b6a29a 100644 --- a/fern/products/sdk-reference/cpp/rest/rest-client/video-namespace/index.mdx +++ b/fern/products/sdk-reference/cpp/rest/rest-client/video-namespace/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "cpp" qualified_name: "signalwire::rest::RestClient::VideoNamespace" - parent: "rest.RestClient" + parent: "signalwire::rest::RestClient" module: "rest.RestClient" source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" visibility: "public" diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/video-room-recordings/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/video-room-recordings/index.mdx index 4940ba70d8..81fbab6001 100644 --- a/fern/products/sdk-reference/cpp/rest/rest-client/video-room-recordings/index.mdx +++ b/fern/products/sdk-reference/cpp/rest/rest-client/video-room-recordings/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "cpp" qualified_name: "signalwire::rest::RestClient::VideoRoomRecordings" - parent: "rest.RestClient" + parent: "signalwire::rest::RestClient" module: "rest.RestClient" source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" visibility: "public" diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/video-room-sessions/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/video-room-sessions/index.mdx index db93baeed7..21ae7ef5d4 100644 --- a/fern/products/sdk-reference/cpp/rest/rest-client/video-room-sessions/index.mdx +++ b/fern/products/sdk-reference/cpp/rest/rest-client/video-room-sessions/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "cpp" qualified_name: "signalwire::rest::RestClient::VideoRoomSessions" - parent: "rest.RestClient" + parent: "signalwire::rest::RestClient" module: "rest.RestClient" source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" visibility: "public" diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/video-room-tokens/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/video-room-tokens/index.mdx index da10a1f4b3..ca649fe078 100644 --- a/fern/products/sdk-reference/cpp/rest/rest-client/video-room-tokens/index.mdx +++ b/fern/products/sdk-reference/cpp/rest/rest-client/video-room-tokens/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "cpp" qualified_name: "signalwire::rest::RestClient::VideoRoomTokens" - parent: "rest.RestClient" + parent: "signalwire::rest::RestClient" module: "rest.RestClient" source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" visibility: "public" diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/video-rooms/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/video-rooms/index.mdx index eda3e68101..5484f327cc 100644 --- a/fern/products/sdk-reference/cpp/rest/rest-client/video-rooms/index.mdx +++ b/fern/products/sdk-reference/cpp/rest/rest-client/video-rooms/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "cpp" qualified_name: "signalwire::rest::RestClient::VideoRooms" - parent: "rest.RestClient" + parent: "signalwire::rest::RestClient" module: "rest.RestClient" source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" visibility: "public" diff --git a/fern/products/sdk-reference/cpp/rest/rest-client/video-streams/index.mdx b/fern/products/sdk-reference/cpp/rest/rest-client/video-streams/index.mdx index d5d29a6639..b9770f2855 100644 --- a/fern/products/sdk-reference/cpp/rest/rest-client/video-streams/index.mdx +++ b/fern/products/sdk-reference/cpp/rest/rest-client/video-streams/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "cpp" qualified_name: "signalwire::rest::RestClient::VideoStreams" - parent: "rest.RestClient" + parent: "signalwire::rest::RestClient" module: "rest.RestClient" source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/rest/rest_client.hpp" visibility: "public" diff --git a/fern/products/sdk-reference/cpp/signalwire/index.mdx b/fern/products/sdk-reference/cpp/signalwire/index.mdx index ec40519795..546cfd128b 100644 --- a/fern/products/sdk-reference/cpp/signalwire/index.mdx +++ b/fern/products/sdk-reference/cpp/signalwire/index.mdx @@ -5,10 +5,10 @@ sdk_label: "C++ SDK" icon: "cpp" lustri: auto_generated: true - kind: "module" + kind: "class" language: "cpp" qualified_name: "signalwire" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp" + source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging.hpp" --- # `signalwire` @@ -23,14 +23,244 @@ All comparisons use CRYPTO\_memcmp (constant-time) so the secret is not leaked o ## Signature ```cpp -namespace signalwire +class signalwire::Logger ``` -## Classes +## Methods - - - +### debug + +**Modifiers:** `inline` + +#### Signature + +```cpp +void debug(std::string_view msg) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/logging.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging.hpp) + +Line 73. + +*** + +### error + +**Modifiers:** `inline` + +#### Signature + +```cpp +void error(std::string_view msg) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/logging.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging.hpp) + +Line 76. + +*** + +### info + +**Modifiers:** `inline` + +#### Signature + +```cpp +void info(std::string_view msg) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/logging.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging.hpp) + +Line 74. + +*** + +### instance + +**Modifiers:** `static` `inline` + +#### Signature + +```cpp +Logger & instance() +``` + +#### Returns + +`Logger &` + +#### Source + +[`include/signalwire/logging.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging.hpp) + +Line 22. + +*** + +### is\_suppressed + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +bool is_suppressed() const +``` + +#### Returns + +`bool` + +#### Source + +[`include/signalwire/logging.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging.hpp) + +Line 46. + +*** + +### level + +**Modifiers:** `const` `inline` + +#### Signature + +```cpp +LogLevel level() const +``` + +#### Returns + +`LogLevel` + +#### Source + +[`include/signalwire/logging.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging.hpp) + +Line 32. + +*** + +### log + +**Modifiers:** `inline` + +#### Signature + +```cpp +void log(LogLevel level, std::string_view message) +``` + +#### Parameters + + + + + +#### Source + +[`include/signalwire/logging.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging.hpp) + +Line 53. + +*** + +### set\_level + +**Modifiers:** `inline` + +#### Signature + +```cpp +void set_level(LogLevel level) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/logging.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging.hpp) + +Line 27. + +*** + +### suppress + +**Modifiers:** `inline` + +#### Signature + +```cpp +void suppress() +``` + +#### Source + +[`include/signalwire/logging.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging.hpp) + +Line 36. + +*** + +### unsuppress + +**Modifiers:** `inline` + +#### Signature + +```cpp +void unsuppress() +``` + +#### Source + +[`include/signalwire/logging.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging.hpp) + +Line 41. + +*** + +### warn + +**Modifiers:** `inline` + +#### Signature + +```cpp +void warn(std::string_view msg) +``` + +#### Parameters + + + +#### Source + +[`include/signalwire/logging.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging.hpp) + +Line 75. ## Functions @@ -404,6 +634,6 @@ Line 12. ## Source -[`include/signalwire/agent/agent_base.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/agent/agent_base.hpp) +[`include/signalwire/logging.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging.hpp) -Line 29. +Line 20. diff --git a/fern/products/sdk-reference/cpp/signalwire/logger/index.mdx b/fern/products/sdk-reference/cpp/signalwire/logger/index.mdx deleted file mode 100644 index 96689a1e02..0000000000 --- a/fern/products/sdk-reference/cpp/signalwire/logger/index.mdx +++ /dev/null @@ -1,264 +0,0 @@ ---- -slug: "/reference/cpp/signalwire/logger" -title: "Logger" -sdk_label: "C++ SDK" -icon: "cpp" -lustri: - auto_generated: true - kind: "class" - language: "cpp" - qualified_name: "signalwire::Logger" - parent: "signalwire" - module: "signalwire" - source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging.hpp" - visibility: "public" ---- -# `Logger` - -## Signature - -```cpp -class signalwire::Logger -``` - -## Methods - -### debug - -**Modifiers:** `inline` - -#### Signature - -```cpp -void debug(std::string_view msg) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/logging.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging.hpp) - -Line 73. - -*** - -### error - -**Modifiers:** `inline` - -#### Signature - -```cpp -void error(std::string_view msg) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/logging.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging.hpp) - -Line 76. - -*** - -### info - -**Modifiers:** `inline` - -#### Signature - -```cpp -void info(std::string_view msg) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/logging.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging.hpp) - -Line 74. - -*** - -### instance - -**Modifiers:** `static` `inline` - -#### Signature - -```cpp -Logger & instance() -``` - -#### Returns - -`Logger &` - -#### Source - -[`include/signalwire/logging.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging.hpp) - -Line 22. - -*** - -### is\_suppressed - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -bool is_suppressed() const -``` - -#### Returns - -`bool` - -#### Source - -[`include/signalwire/logging.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging.hpp) - -Line 46. - -*** - -### level - -**Modifiers:** `const` `inline` - -#### Signature - -```cpp -LogLevel level() const -``` - -#### Returns - -`LogLevel` - -#### Source - -[`include/signalwire/logging.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging.hpp) - -Line 32. - -*** - -### log - -**Modifiers:** `inline` - -#### Signature - -```cpp -void log(LogLevel level, std::string_view message) -``` - -#### Parameters - - - - - -#### Source - -[`include/signalwire/logging.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging.hpp) - -Line 53. - -*** - -### set\_level - -**Modifiers:** `inline` - -#### Signature - -```cpp -void set_level(LogLevel level) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/logging.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging.hpp) - -Line 27. - -*** - -### suppress - -**Modifiers:** `inline` - -#### Signature - -```cpp -void suppress() -``` - -#### Source - -[`include/signalwire/logging.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging.hpp) - -Line 36. - -*** - -### unsuppress - -**Modifiers:** `inline` - -#### Signature - -```cpp -void unsuppress() -``` - -#### Source - -[`include/signalwire/logging.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging.hpp) - -Line 41. - -*** - -### warn - -**Modifiers:** `inline` - -#### Signature - -```cpp -void warn(std::string_view msg) -``` - -#### Parameters - - - -#### Source - -[`include/signalwire/logging.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging.hpp) - -Line 75. - -## Source - -[`include/signalwire/logging.hpp`](https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging.hpp) - -Line 20. diff --git a/fern/products/sdk-reference/dotnet/agents/data-map/index.mdx b/fern/products/sdk-reference/dotnet/agents/data-map/index.mdx index 9c6b13c348..b7ee8af26d 100644 --- a/fern/products/sdk-reference/dotnet/agents/data-map/index.mdx +++ b/fern/products/sdk-reference/dotnet/agents/data-map/index.mdx @@ -1,516 +1,22 @@ --- slug: "/reference/dotnet/agents/data-map" -title: "DataMap" +title: "data-map" sdk_label: ".NET SDK" icon: "dotnet" lustri: auto_generated: true - kind: "class" + kind: "module" language: "dotnet" - qualified_name: "SignalWire.DataMap.DataMap" + qualified_name: "agents.data-map" parent: "agents" module: "agents" - source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs" - visibility: "public" --- -# `DataMap` +# `data-map` -Builds a SWAIG data-map function definition with parameters, expressions, webhooks, -and output configuration. All builder methods return `this` for fluent chaining. +## Classes -## Signature - -```dotnet -public class DataMap -``` - -## Methods - -### Body(Dictionary\) - -#### Signature - -```dotnet -public DataMap Body(Dictionary data) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.DataMap.DataMap` - -#### Source - -[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) - -Line 172. - -*** - -### CreateExpressionTool(string, string, List\>, List\>) - -**Modifiers:** `static` - -#### Signature - -```dotnet -public static Dictionary CreateExpressionTool(string name, string purpose, List> parameters, List> expressions) -``` - -#### Parameters - - - - - - - - - -#### Returns - -`Dictionary` - -#### Source - -[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) - -Line 263. - -*** - -### CreateSimpleApiTool(string, string, List\>, string, string, object, Dictionary\?) - -**Modifiers:** `static` - -#### Signature - -```dotnet -public static Dictionary CreateSimpleApiTool(string name, string purpose, List> parameters, string method, string url, object output, Dictionary? headers = null) -``` - -#### Parameters - - - - - - - - - - - - - - - -#### Returns - -`Dictionary` - -#### Source - -[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) - -Line 244. - -*** - -### DataMap(string) - -#### Signature - -```dotnet -public DataMap(string functionName) -``` - -#### Parameters - - - -#### Source - -[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) - -Line 22. - -*** - -### Description(string) - -Alias for <xref href="SignalWire.DataMap.DataMap.Purpose(System.String)" data-throw-if-not-resolved="false"></xref>. Sets the LLM-facing tool -description. This string is read by the model to decide WHEN -to call this tool. See <xref href="SignalWire.DataMap.DataMap.Purpose(System.String)" data-throw-if-not-resolved="false"></xref> for bad-vs-good -examples. - -#### Signature - -```dotnet -public DataMap Description(string desc) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.DataMap.DataMap` - -#### Source - -[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) - -Line 59. - -*** - -### ErrorKeys(List\) - -#### Signature - -```dotnet -public DataMap ErrorKeys(List keys) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.DataMap.DataMap` - -#### Source - -[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) - -Line 203. - -*** - -### Expression(string, string, object, object?) - -#### Signature - -```dotnet -public DataMap Expression(string testValue, string pattern, object output, object? nomatchOutput = null) -``` - -#### Parameters - - - - - - - - - -#### Returns - -`SignalWire.DataMap.DataMap` - -#### Source - -[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) - -Line 109. - -*** - -### FallbackOutput(object) - -#### Signature - -```dotnet -public DataMap FallbackOutput(object result) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.DataMap.DataMap` - -#### Source - -[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) - -Line 196. - -*** - -### ForEach(Dictionary\) - -#### Signature - -```dotnet -public DataMap ForEach(Dictionary config) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.DataMap.DataMap` - -#### Source - -[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) - -Line 184. - -*** - -### GlobalErrorKeys(List\) - -#### Signature - -```dotnet -public DataMap GlobalErrorKeys(List keys) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.DataMap.DataMap` - -#### Source - -[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) - -Line 209. - -*** - -### Output(object) - -#### Signature - -```dotnet -public DataMap Output(object result) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.DataMap.DataMap` - -#### Source - -[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) - -Line 190. - -*** - -### Parameter(string, string, string, bool, List\?) - -Add a parameter to this data-map tool — the <code class="paramref">description</code> -is LLM-FACING. - -<p>Each parameter description is rendered into the OpenAI -tool schema under `parameters.properties.<name>.description` -and sent to the model. The model uses it to decide HOW to fill -in the argument from user speech. It is prompt engineering, not -developer FYI.</p> - -<p><b>Bad vs good:</b></p> -<pre><code class="lang-csharp">BAD : .Parameter("city", "string", "the city") -GOOD: .Parameter("city", "string", - "The name of the city to get weather for, e.g. " - + "'San Francisco'. Ask the user if they did not " - + "provide one. Include the state or country if the " - + "city name is ambiguous.")</code></pre> - -#### Signature - -```dotnet -public DataMap Parameter(string name, string type, string description, bool required = false, List? enumValues = null) -``` - -#### Parameters - - - - - - - - - - - -#### Returns - -`SignalWire.DataMap.DataMap` - -#### Source - -[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) - -Line 81. - -*** - -### Params(Dictionary\) - -#### Signature - -```dotnet -public DataMap Params(Dictionary data) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.DataMap.DataMap` - -#### Source - -[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) - -Line 178. - -*** - -### Purpose(string) - -Set the LLM-facing tool description (the "purpose"). PROMPT -ENGINEERING, not developer documentation. - -<p>The description string is rendered into the OpenAI tool -schema `description` field on every LLM turn. The model -reads it to decide WHEN to call this tool. A vague -<xref href="SignalWire.DataMap.DataMap.Purpose(System.String)" data-throw-if-not-resolved="false"></xref> is the #1 cause of "the model has the -right tool but doesn't call it" failures with data-map tools.</p> - -<p><b>Bad vs good:</b></p> -<pre><code class="lang-csharp">BAD : .Purpose("weather api") -GOOD: .Purpose("Get the current weather conditions and " - + "forecast for a specific city. Use this " - + "whenever the user asks about weather, " - + "temperature, rain, or similar conditions in a " - + "named location.")</code></pre> - -#### Signature - -```dotnet -public DataMap Purpose(string desc) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.DataMap.DataMap` - -#### Source - -[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) - -Line 47. - -*** - -### ToSwaigFunction() - -#### Signature - -```dotnet -public Dictionary ToSwaigFunction() -``` - -#### Returns - -`Dictionary` - -#### Source - -[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) - -Line 215. - -*** - -### Webhook(string, string, Dictionary\?, string, bool, List\?) - -#### Signature - -```dotnet -public DataMap Webhook(string method, string url, Dictionary? headers = null, string formParam = "", bool inputArgsAsParams = false, List? requireArgs = null) -``` - -#### Parameters - - - - - - - - - - - - - -#### Returns - -`SignalWire.DataMap.DataMap` - -#### Source - -[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) - -Line 131. - -*** - -### WebhookExpressions(List\>) - -#### Signature - -```dotnet -public DataMap WebhookExpressions(List> expressions) -``` - -#### Parameters - - - -#### Returns - -`SignalWire.DataMap.DataMap` - -#### Source - -[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) - -Line 166. - -## Source - -[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) - -Line 8. + + + Builds a SWAIG data-map function definition with parameters, expressions, webhooks, and output configuration. All builder methods return `this` for fluent chaining. + + diff --git a/fern/products/sdk-reference/dotnet/agents/data-map/index__2.mdx b/fern/products/sdk-reference/dotnet/agents/data-map/index__2.mdx deleted file mode 100644 index d3dbce0e96..0000000000 --- a/fern/products/sdk-reference/dotnet/agents/data-map/index__2.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -slug: "/reference/dotnet/agents/data-map/index__2" -title: "data-map" -sdk_label: ".NET SDK" -icon: "dotnet" -lustri: - auto_generated: true - kind: "module" - language: "dotnet" - qualified_name: "agents.data-map" - parent: "agents" - module: "agents" ---- -# `data-map` diff --git a/fern/products/sdk-reference/dotnet/agents/data-map/signal-wire.data-map/index.mdx b/fern/products/sdk-reference/dotnet/agents/data-map/signal-wire.data-map/index.mdx new file mode 100644 index 0000000000..25171cec63 --- /dev/null +++ b/fern/products/sdk-reference/dotnet/agents/data-map/signal-wire.data-map/index.mdx @@ -0,0 +1,515 @@ +--- +slug: "/reference/dotnet/agents/data-map/signal-wire.data-map" +title: "SignalWire.DataMap" +sdk_label: ".NET SDK" +icon: "dotnet" +lustri: + auto_generated: true + kind: "class" + language: "dotnet" + qualified_name: "SignalWire.DataMap" + parent: "agents.data-map" + module: "agents.data-map" + source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs" +--- +# `SignalWire.DataMap` + +Builds a SWAIG data-map function definition with parameters, expressions, webhooks, +and output configuration. All builder methods return `this` for fluent chaining. + +## Signature + +```dotnet +public class DataMap +``` + +## Methods + +### Body(Dictionary\) + +#### Signature + +```dotnet +public DataMap Body(Dictionary data) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.DataMap.DataMap` + +#### Source + +[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) + +Line 172. + +*** + +### CreateExpressionTool(string, string, List\>, List\>) + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static Dictionary CreateExpressionTool(string name, string purpose, List> parameters, List> expressions) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) + +Line 263. + +*** + +### CreateSimpleApiTool(string, string, List\>, string, string, object, Dictionary\?) + +**Modifiers:** `static` + +#### Signature + +```dotnet +public static Dictionary CreateSimpleApiTool(string name, string purpose, List> parameters, string method, string url, object output, Dictionary? headers = null) +``` + +#### Parameters + + + + + + + + + + + + + + + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) + +Line 244. + +*** + +### DataMap(string) + +#### Signature + +```dotnet +public DataMap(string functionName) +``` + +#### Parameters + + + +#### Source + +[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) + +Line 22. + +*** + +### Description(string) + +Alias for <xref href="SignalWire.DataMap.DataMap.Purpose(System.String)" data-throw-if-not-resolved="false"></xref>. Sets the LLM-facing tool +description. This string is read by the model to decide WHEN +to call this tool. See <xref href="SignalWire.DataMap.DataMap.Purpose(System.String)" data-throw-if-not-resolved="false"></xref> for bad-vs-good +examples. + +#### Signature + +```dotnet +public DataMap Description(string desc) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.DataMap.DataMap` + +#### Source + +[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) + +Line 59. + +*** + +### ErrorKeys(List\) + +#### Signature + +```dotnet +public DataMap ErrorKeys(List keys) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.DataMap.DataMap` + +#### Source + +[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) + +Line 203. + +*** + +### Expression(string, string, object, object?) + +#### Signature + +```dotnet +public DataMap Expression(string testValue, string pattern, object output, object? nomatchOutput = null) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`SignalWire.DataMap.DataMap` + +#### Source + +[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) + +Line 109. + +*** + +### FallbackOutput(object) + +#### Signature + +```dotnet +public DataMap FallbackOutput(object result) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.DataMap.DataMap` + +#### Source + +[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) + +Line 196. + +*** + +### ForEach(Dictionary\) + +#### Signature + +```dotnet +public DataMap ForEach(Dictionary config) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.DataMap.DataMap` + +#### Source + +[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) + +Line 184. + +*** + +### GlobalErrorKeys(List\) + +#### Signature + +```dotnet +public DataMap GlobalErrorKeys(List keys) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.DataMap.DataMap` + +#### Source + +[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) + +Line 209. + +*** + +### Output(object) + +#### Signature + +```dotnet +public DataMap Output(object result) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.DataMap.DataMap` + +#### Source + +[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) + +Line 190. + +*** + +### Parameter(string, string, string, bool, List\?) + +Add a parameter to this data-map tool — the <code class="paramref">description</code> +is LLM-FACING. + +<p>Each parameter description is rendered into the OpenAI +tool schema under `parameters.properties.<name>.description` +and sent to the model. The model uses it to decide HOW to fill +in the argument from user speech. It is prompt engineering, not +developer FYI.</p> + +<p><b>Bad vs good:</b></p> +<pre><code class="lang-csharp">BAD : .Parameter("city", "string", "the city") +GOOD: .Parameter("city", "string", + "The name of the city to get weather for, e.g. " + + "'San Francisco'. Ask the user if they did not " + + "provide one. Include the state or country if the " + + "city name is ambiguous.")</code></pre> + +#### Signature + +```dotnet +public DataMap Parameter(string name, string type, string description, bool required = false, List? enumValues = null) +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`SignalWire.DataMap.DataMap` + +#### Source + +[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) + +Line 81. + +*** + +### Params(Dictionary\) + +#### Signature + +```dotnet +public DataMap Params(Dictionary data) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.DataMap.DataMap` + +#### Source + +[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) + +Line 178. + +*** + +### Purpose(string) + +Set the LLM-facing tool description (the "purpose"). PROMPT +ENGINEERING, not developer documentation. + +<p>The description string is rendered into the OpenAI tool +schema `description` field on every LLM turn. The model +reads it to decide WHEN to call this tool. A vague +<xref href="SignalWire.DataMap.DataMap.Purpose(System.String)" data-throw-if-not-resolved="false"></xref> is the #1 cause of "the model has the +right tool but doesn't call it" failures with data-map tools.</p> + +<p><b>Bad vs good:</b></p> +<pre><code class="lang-csharp">BAD : .Purpose("weather api") +GOOD: .Purpose("Get the current weather conditions and " + + "forecast for a specific city. Use this " + + "whenever the user asks about weather, " + + "temperature, rain, or similar conditions in a " + + "named location.")</code></pre> + +#### Signature + +```dotnet +public DataMap Purpose(string desc) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.DataMap.DataMap` + +#### Source + +[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) + +Line 47. + +*** + +### ToSwaigFunction() + +#### Signature + +```dotnet +public Dictionary ToSwaigFunction() +``` + +#### Returns + +`Dictionary` + +#### Source + +[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) + +Line 215. + +*** + +### Webhook(string, string, Dictionary\?, string, bool, List\?) + +#### Signature + +```dotnet +public DataMap Webhook(string method, string url, Dictionary? headers = null, string formParam = "", bool inputArgsAsParams = false, List? requireArgs = null) +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`SignalWire.DataMap.DataMap` + +#### Source + +[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) + +Line 131. + +*** + +### WebhookExpressions(List\>) + +#### Signature + +```dotnet +public DataMap WebhookExpressions(List> expressions) +``` + +#### Parameters + + + +#### Returns + +`SignalWire.DataMap.DataMap` + +#### Source + +[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) + +Line 166. + +## Source + +[`src/SignalWire/DataMap/DataMap.cs`](https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/DataMap/DataMap.cs) + +Line 8. diff --git a/fern/products/sdk-reference/dotnet/agents/index.mdx b/fern/products/sdk-reference/dotnet/agents/index.mdx index 4b28bc4d9a..0a9ed63a7f 100644 --- a/fern/products/sdk-reference/dotnet/agents/index.mdx +++ b/fern/products/sdk-reference/dotnet/agents/index.mdx @@ -11,14 +11,6 @@ lustri: --- # `agents` -## Classes - - - - Builds a SWAIG data-map function definition with parameters, expressions, webhooks, and output configuration. All builder methods return `this` for fluent chaining. - - - ## Modules @@ -26,7 +18,7 @@ lustri: - + diff --git a/fern/products/sdk-reference/dotnet/agents/server/index.mdx b/fern/products/sdk-reference/dotnet/agents/server/index.mdx index fd90ce86c2..4b65db907c 100644 --- a/fern/products/sdk-reference/dotnet/agents/server/index.mdx +++ b/fern/products/sdk-reference/dotnet/agents/server/index.mdx @@ -16,7 +16,7 @@ lustri: ## Classes - + Multi-agent HTTP server. Registers agents at routes, dispatches requests by longest prefix match, serves static files with path-traversal protection, handles health/ready/root-index, and supports SIP routing. diff --git a/fern/products/sdk-reference/dotnet/agents/server/agent-server/index.mdx b/fern/products/sdk-reference/dotnet/agents/server/signal-wire.server/index.mdx similarity index 97% rename from fern/products/sdk-reference/dotnet/agents/server/agent-server/index.mdx rename to fern/products/sdk-reference/dotnet/agents/server/signal-wire.server/index.mdx index fe248ca384..6ba158bbfd 100644 --- a/fern/products/sdk-reference/dotnet/agents/server/agent-server/index.mdx +++ b/fern/products/sdk-reference/dotnet/agents/server/signal-wire.server/index.mdx @@ -1,19 +1,18 @@ --- -slug: "/reference/dotnet/agents/server/agent-server" -title: "AgentServer" +slug: "/reference/dotnet/agents/server/signal-wire.server" +title: "SignalWire.Server" sdk_label: ".NET SDK" icon: "dotnet" lustri: auto_generated: true kind: "class" language: "dotnet" - qualified_name: "SignalWire.Server.AgentServer" + qualified_name: "SignalWire.Server" parent: "agents.server" module: "agents.server" source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/obj/Release/net8.0/System.Text.RegularExpressions.Generator/System.Text.RegularExpressions.Generator.RegexGenerator/RegexGenerator.g.cs" - visibility: "public" --- -# `AgentServer` +# `SignalWire.Server` Multi-agent HTTP server. Registers agents at routes, dispatches requests by longest prefix match, serves static files with path-traversal protection, diff --git a/fern/products/sdk-reference/dotnet/agents/serverless/index.mdx b/fern/products/sdk-reference/dotnet/agents/serverless/index.mdx index fff9f259fc..cf37e9a096 100644 --- a/fern/products/sdk-reference/dotnet/agents/serverless/index.mdx +++ b/fern/products/sdk-reference/dotnet/agents/serverless/index.mdx @@ -16,7 +16,7 @@ lustri: ## Classes - + Auto-detect and handle serverless environments (Lambda, Azure, GCF, CGI) or fall back to the built-in ASP.NET server. diff --git a/fern/products/sdk-reference/dotnet/agents/serverless/adapter/index.mdx b/fern/products/sdk-reference/dotnet/agents/serverless/signal-wire.serverless/index.mdx similarity index 95% rename from fern/products/sdk-reference/dotnet/agents/serverless/adapter/index.mdx rename to fern/products/sdk-reference/dotnet/agents/serverless/signal-wire.serverless/index.mdx index f4313af970..184cfc31ae 100644 --- a/fern/products/sdk-reference/dotnet/agents/serverless/adapter/index.mdx +++ b/fern/products/sdk-reference/dotnet/agents/serverless/signal-wire.serverless/index.mdx @@ -1,19 +1,18 @@ --- -slug: "/reference/dotnet/agents/serverless/adapter" -title: "Adapter" +slug: "/reference/dotnet/agents/serverless/signal-wire.serverless" +title: "SignalWire.Serverless" sdk_label: ".NET SDK" icon: "dotnet" lustri: auto_generated: true kind: "class" language: "dotnet" - qualified_name: "SignalWire.Serverless.Adapter" + qualified_name: "SignalWire.Serverless" parent: "agents.serverless" module: "agents.serverless" source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Serverless/Adapter.cs" - visibility: "public" --- -# `Adapter` +# `SignalWire.Serverless` Auto-detect and handle serverless environments (Lambda, Azure, GCF, CGI) or fall back to the built-in ASP.NET server. diff --git a/fern/products/sdk-reference/dotnet/core/logging/index.mdx b/fern/products/sdk-reference/dotnet/core/logging/index.mdx index 13c74e6539..6e1842076d 100644 --- a/fern/products/sdk-reference/dotnet/core/logging/index.mdx +++ b/fern/products/sdk-reference/dotnet/core/logging/index.mdx @@ -16,7 +16,7 @@ lustri: ## Classes - + ## Enums diff --git a/fern/products/sdk-reference/dotnet/core/logging/logger/index.mdx b/fern/products/sdk-reference/dotnet/core/logging/signal-wire.logging/index.mdx similarity index 95% rename from fern/products/sdk-reference/dotnet/core/logging/logger/index.mdx rename to fern/products/sdk-reference/dotnet/core/logging/signal-wire.logging/index.mdx index a05f9a9eae..c887d6e7bc 100644 --- a/fern/products/sdk-reference/dotnet/core/logging/logger/index.mdx +++ b/fern/products/sdk-reference/dotnet/core/logging/signal-wire.logging/index.mdx @@ -1,19 +1,18 @@ --- -slug: "/reference/dotnet/core/logging/logger" -title: "Logger" +slug: "/reference/dotnet/core/logging/signal-wire.logging" +title: "SignalWire.Logging" sdk_label: ".NET SDK" icon: "dotnet" lustri: auto_generated: true kind: "class" language: "dotnet" - qualified_name: "SignalWire.Logging.Logger" + qualified_name: "SignalWire.Logging" parent: "core.logging" module: "core.logging" source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Logging/Logger.cs" - visibility: "public" --- -# `Logger` +# `SignalWire.Logging` **Modifiers:** `sealed` diff --git a/fern/products/sdk-reference/go/_meta.json b/fern/products/sdk-reference/go/_meta.json index a651569812..91c400179c 100644 --- a/fern/products/sdk-reference/go/_meta.json +++ b/fern/products/sdk-reference/go/_meta.json @@ -6,5 +6,5 @@ "format": "mdx", "platform": "fern", "base_slug": "/reference/go", - "item_count": 2287 + "item_count": 2283 } \ No newline at end of file diff --git a/fern/products/sdk-reference/go/agents/datamap/datamap/index.mdx b/fern/products/sdk-reference/go/agents/datamap/datamap/index.mdx index b0a4df66ac..034ee42c94 100644 --- a/fern/products/sdk-reference/go/agents/datamap/datamap/index.mdx +++ b/fern/products/sdk-reference/go/agents/datamap/datamap/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "module" language: "go" qualified_name: "agents.datamap.datamap" - parent: "agents.datamap" + parent: "github.com/signalwire/signalwire-go/pkg/datamap" module: "agents.datamap" --- # `datamap` diff --git a/fern/products/sdk-reference/go/agents/datamap/index.mdx b/fern/products/sdk-reference/go/agents/datamap/index.mdx index 2b77e63395..09a3f4ad5e 100644 --- a/fern/products/sdk-reference/go/agents/datamap/index.mdx +++ b/fern/products/sdk-reference/go/agents/datamap/index.mdx @@ -46,6 +46,12 @@ type DataMap struct +## Modules + + + + + ## Methods ### Body diff --git a/fern/products/sdk-reference/go/agents/datamap/index__2.mdx b/fern/products/sdk-reference/go/agents/datamap/index__2.mdx deleted file mode 100644 index a6e92394e9..0000000000 --- a/fern/products/sdk-reference/go/agents/datamap/index__2.mdx +++ /dev/null @@ -1,20 +0,0 @@ ---- -slug: "/reference/go/agents/datamap/index__2" -title: "datamap" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "module" - language: "go" - qualified_name: "agents.datamap" - parent: "agents" - module: "agents" ---- -# `datamap` - -## Modules - - - - diff --git a/fern/products/sdk-reference/go/agents/index.mdx b/fern/products/sdk-reference/go/agents/index.mdx index 9c45bda825..b94f4c5f34 100644 --- a/fern/products/sdk-reference/go/agents/index.mdx +++ b/fern/products/sdk-reference/go/agents/index.mdx @@ -17,6 +17,10 @@ lustri: DataMap is a fluent builder for SWAIG data\_map function definitions. Data map tools execute on SignalWire servers without needing a webhook endpoint. + + + Handler wraps an http.Handler so it can service AWS Lambda invocations. Construct one with NewHandler. + ## Modules @@ -30,12 +34,6 @@ lustri: Package contexts provides the Contexts & Steps workflow system for SignalWire AI agents. - - - - Package lambda adapts a net/http handler produced by the SignalWire Agents SDK (typically agent.AsRouter()) so it can run inside AWS Lambda. - - Package livewire provides a LiveKit-compatible API surface that runs on SignalWire's platform. Developers can use familiar LiveKit struct and function names — just change the import path to get SignalWire's infrastructure handling STT, TTS, VAD, LLM, and call control. diff --git a/fern/products/sdk-reference/go/agents/lambda/index.mdx b/fern/products/sdk-reference/go/agents/lambda/index.mdx index 57d66acba5..bc8b073521 100644 --- a/fern/products/sdk-reference/go/agents/lambda/index.mdx +++ b/fern/products/sdk-reference/go/agents/lambda/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Go SDK" icon: "golang" lustri: auto_generated: true - kind: "module" + kind: "class" language: "go" qualified_name: "github.com/signalwire/signalwire-go/pkg/lambda" parent: "agents" @@ -14,40 +14,12 @@ lustri: --- # `lambda` -Package lambda adapts a net/http handler produced by the SignalWire Agents SDK (typically agent.AsRouter()) so it can run inside AWS Lambda. - -The adapter translates a Lambda invocation event into a synthetic \*http.Request, runs the underlying handler against an in-memory response recorder, and marshals the recorder's result back into the Lambda response type that matches the invoking event. - -Two event shapes are supported, because they are the two ways an AI agent is realistically exposed over HTTP on Lambda: - -- Lambda Function URLs (events.LambdaFunctionURLRequest / LambdaFunctionURLResponse). This is the simplest deployment and the one we recommend; no API Gateway is required. -- API Gateway HTTP API v2 (events.APIGatewayV2HTTPRequest / APIGatewayV2HTTPResponse). Identical payload shape in practice, but consumers with an API Gateway layer want the exact response type rather than an assignable alias. - -The classic REST API (v1) payload is intentionally not supported as a first-class path to keep this package small. Users who need v1 can wrap it via github.com/awslabs/aws-lambda-go-api-proxy. - -``` -package main - -import ( - "github.com/aws/aws-lambda-go/lambda" - swlambda "github.com/signalwire/signalwire-go/pkg/lambda" - "github.com/signalwire/signalwire-go/pkg/agent" -) - -var a = agent.NewAgentBase(agent.WithName("MyAgent"), agent.WithRoute("/my-agent")) -var handler = swlambda.NewHandler(a.AsRouter()) - -func main() { - lambda.Start(handler.HandleFunctionURL) -} -``` - -Because agent.AsRouter() installs routes relative to the agent's Route (e.g. /my-agent, /my-agent/swaig), the Lambda event's RawPath must line up with that Route. Lambda Function URLs preserve the full request path unchanged, so no rewriting is needed in the common case. +Handler wraps an http.Handler so it can service AWS Lambda invocations. Construct one with NewHandler. ## Signature ```go -package lambda +type Handler struct ``` ## Examples @@ -92,11 +64,61 @@ package lambda -## Modules +## Methods + +### HandleAPIGatewayV2 + +HandleAPIGatewayV2 processes an API Gateway HTTP API v2 invocation. The payload shape is virtually identical to Function URLs, but the response type differs, so we provide a dedicated entry point. + +#### Signature + +```go +func (*Handler) HandleAPIGatewayV2(ctx context.Context, req events.APIGatewayV2HTTPRequest) (events.APIGatewayV2HTTPResponse, error) +``` + +#### Parameters + + + + + +#### Returns + +`(events.APIGatewayV2HTTPResponse, error)` - - - +#### Source + +[`pkg/lambda/lambda.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/lambda/lambda.go) + +Line 107. + +*** + +### HandleFunctionURL + +HandleFunctionURL processes a Lambda Function URL invocation. It is intended to be passed to github.com/aws/aws-lambda-go/lambda.Start. + +#### Signature + +```go +func (*Handler) HandleFunctionURL(ctx context.Context, req events.LambdaFunctionURLRequest) (events.LambdaFunctionURLResponse, error) +``` + +#### Parameters + + + + + +#### Returns + +`(events.LambdaFunctionURLResponse, error)` + +#### Source + +[`pkg/lambda/lambda.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/lambda/lambda.go) + +Line 84. ## Functions @@ -129,3 +151,5 @@ Line 75. ## Source [`pkg/lambda/lambda.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/lambda/lambda.go) + +Line 65. diff --git a/fern/products/sdk-reference/go/agents/lambda/lambda/handler/index.mdx b/fern/products/sdk-reference/go/agents/lambda/lambda/handler/index.mdx deleted file mode 100644 index 3ca22f0f20..0000000000 --- a/fern/products/sdk-reference/go/agents/lambda/lambda/handler/index.mdx +++ /dev/null @@ -1,85 +0,0 @@ ---- -slug: "/reference/go/agents/lambda/lambda/handler" -title: "Handler" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/lambda.Handler" - parent: "agents.lambda.lambda" - module: "agents.lambda.lambda" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/lambda/lambda.go" ---- -# `Handler` - -Handler wraps an http.Handler so it can service AWS Lambda invocations. Construct one with NewHandler. - -## Signature - -```go -type Handler struct -``` - -## Methods - -### HandleAPIGatewayV2 - -HandleAPIGatewayV2 processes an API Gateway HTTP API v2 invocation. The payload shape is virtually identical to Function URLs, but the response type differs, so we provide a dedicated entry point. - -#### Signature - -```go -func (*Handler) HandleAPIGatewayV2(ctx context.Context, req events.APIGatewayV2HTTPRequest) (events.APIGatewayV2HTTPResponse, error) -``` - -#### Parameters - - - - - -#### Returns - -`(events.APIGatewayV2HTTPResponse, error)` - -#### Source - -[`pkg/lambda/lambda.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/lambda/lambda.go) - -Line 107. - -*** - -### HandleFunctionURL - -HandleFunctionURL processes a Lambda Function URL invocation. It is intended to be passed to github.com/aws/aws-lambda-go/lambda.Start. - -#### Signature - -```go -func (*Handler) HandleFunctionURL(ctx context.Context, req events.LambdaFunctionURLRequest) (events.LambdaFunctionURLResponse, error) -``` - -#### Parameters - - - - - -#### Returns - -`(events.LambdaFunctionURLResponse, error)` - -#### Source - -[`pkg/lambda/lambda.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/lambda/lambda.go) - -Line 84. - -## Source - -[`pkg/lambda/lambda.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/lambda/lambda.go) - -Line 65. diff --git a/fern/products/sdk-reference/go/agents/lambda/lambda/index.mdx b/fern/products/sdk-reference/go/agents/lambda/lambda/index.mdx deleted file mode 100644 index 3ed754caaf..0000000000 --- a/fern/products/sdk-reference/go/agents/lambda/lambda/index.mdx +++ /dev/null @@ -1,22 +0,0 @@ ---- -slug: "/reference/go/agents/lambda/lambda" -title: "lambda" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "module" - language: "go" - qualified_name: "agents.lambda.lambda" - parent: "github.com/signalwire/signalwire-go/pkg/lambda" - module: "agents.lambda" ---- -# `lambda` - -## Classes - - - - Handler wraps an http.Handler so it can service AWS Lambda invocations. Construct one with NewHandler. - - diff --git a/fern/products/sdk-reference/go/core/index.mdx b/fern/products/sdk-reference/go/core/index.mdx index e72184041e..b69a8e51bc 100644 --- a/fern/products/sdk-reference/go/core/index.mdx +++ b/fern/products/sdk-reference/go/core/index.mdx @@ -11,13 +11,17 @@ lustri: --- # `core` -## Modules +## Classes - Package logging provides structured logging for the SignalWire AI Agents SDK. + Logger is a named logger that respects global log level settings. + +## Modules + + Package security provides session management and token-based authentication for SWAIG function calls, preventing unauthorized tool execution. diff --git a/fern/products/sdk-reference/go/core/logging/index.mdx b/fern/products/sdk-reference/go/core/logging/index.mdx index 10caf0eee0..184df1d881 100644 --- a/fern/products/sdk-reference/go/core/logging/index.mdx +++ b/fern/products/sdk-reference/go/core/logging/index.mdx @@ -5,23 +5,21 @@ sdk_label: "Go SDK" icon: "golang" lustri: auto_generated: true - kind: "module" + kind: "class" language: "go" qualified_name: "github.com/signalwire/signalwire-go/pkg/logging" parent: "core" module: "core" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/logging/log_level.go" + source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/logging/logger.go" --- # `logging` -Package logging provides structured logging for the SignalWire AI Agents SDK. - -It supports log levels (debug, info, warn, error), named loggers per component, and can be suppressed globally for CLI tools or testing. +Logger is a named logger that respects global log level settings. ## Signature ```go -package logging +type Logger struct ``` ## Constants @@ -66,6 +64,102 @@ package logging +## Methods + +### Debug + +Debug logs a message at debug level. + +#### Signature + +```go +func (*Logger) Debug(format string, args ...any) +``` + +#### Parameters + + + + + +#### Source + +[`pkg/logging/logger.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/logging/logger.go) + +Line 153. + +*** + +### Error + +Error logs a message at error level. + +#### Signature + +```go +func (*Logger) Error(format string, args ...any) +``` + +#### Parameters + + + + + +#### Source + +[`pkg/logging/logger.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/logging/logger.go) + +Line 168. + +*** + +### Info + +Info logs a message at info level. + +#### Signature + +```go +func (*Logger) Info(format string, args ...any) +``` + +#### Parameters + + + + + +#### Source + +[`pkg/logging/logger.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/logging/logger.go) + +Line 158. + +*** + +### Warn + +Warn logs a message at warn level. + +#### Signature + +```go +func (*Logger) Warn(format string, args ...any) +``` + +#### Parameters + + + + + +#### Source + +[`pkg/logging/logger.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/logging/logger.go) + +Line 163. + ## Functions ### GetGlobalLevel @@ -240,4 +334,6 @@ Line 110. ## Source -[`pkg/logging/log_level.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/logging/log_level.go) +[`pkg/logging/logger.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/logging/logger.go) + +Line 124. diff --git a/fern/products/sdk-reference/go/core/logging/logging/index.mdx b/fern/products/sdk-reference/go/core/logging/logging/index.mdx index 8a4f47a363..f3ba62be0d 100644 --- a/fern/products/sdk-reference/go/core/logging/logging/index.mdx +++ b/fern/products/sdk-reference/go/core/logging/logging/index.mdx @@ -13,14 +13,6 @@ lustri: --- # `logging` -## Classes - - - - Logger is a named logger that respects global log level settings. - - - ## Enums ### Level diff --git a/fern/products/sdk-reference/go/core/logging/logging/logger/index.mdx b/fern/products/sdk-reference/go/core/logging/logging/logger/index.mdx deleted file mode 100644 index 5d7966284e..0000000000 --- a/fern/products/sdk-reference/go/core/logging/logging/logger/index.mdx +++ /dev/null @@ -1,125 +0,0 @@ ---- -slug: "/reference/go/core/logging/logging/logger" -title: "Logger" -sdk_label: "Go SDK" -icon: "golang" -lustri: - auto_generated: true - kind: "class" - language: "go" - qualified_name: "github.com/signalwire/signalwire-go/pkg/logging.Logger" - parent: "core.logging.logging" - module: "core.logging.logging" - source_url: "https://github.com/signalwire/signalwire-go/blob/main/pkg/logging/logger.go" ---- -# `Logger` - -Logger is a named logger that respects global log level settings. - -## Signature - -```go -type Logger struct -``` - -## Methods - -### Debug - -Debug logs a message at debug level. - -#### Signature - -```go -func (*Logger) Debug(format string, args ...any) -``` - -#### Parameters - - - - - -#### Source - -[`pkg/logging/logger.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/logging/logger.go) - -Line 153. - -*** - -### Error - -Error logs a message at error level. - -#### Signature - -```go -func (*Logger) Error(format string, args ...any) -``` - -#### Parameters - - - - - -#### Source - -[`pkg/logging/logger.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/logging/logger.go) - -Line 168. - -*** - -### Info - -Info logs a message at info level. - -#### Signature - -```go -func (*Logger) Info(format string, args ...any) -``` - -#### Parameters - - - - - -#### Source - -[`pkg/logging/logger.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/logging/logger.go) - -Line 158. - -*** - -### Warn - -Warn logs a message at warn level. - -#### Signature - -```go -func (*Logger) Warn(format string, args ...any) -``` - -#### Parameters - - - - - -#### Source - -[`pkg/logging/logger.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/logging/logger.go) - -Line 163. - -## Source - -[`pkg/logging/logger.go`](https://github.com/signalwire/signalwire-go/blob/main/pkg/logging/logger.go) - -Line 124. diff --git a/fern/products/sdk-reference/java/_meta.json b/fern/products/sdk-reference/java/_meta.json index ed90ba41c9..9557e53c51 100644 --- a/fern/products/sdk-reference/java/_meta.json +++ b/fern/products/sdk-reference/java/_meta.json @@ -6,5 +6,5 @@ "format": "mdx", "platform": "fern", "base_slug": "/reference/java", - "item_count": 1942 + "item_count": 1914 } \ No newline at end of file diff --git a/fern/products/sdk-reference/java/agents/agent/agent/agent-base/index.mdx b/fern/products/sdk-reference/java/agents/agent/agent/agent-base/index.mdx deleted file mode 100644 index b35d4c97ba..0000000000 --- a/fern/products/sdk-reference/java/agents/agent/agent/agent-base/index.mdx +++ /dev/null @@ -1,2940 +0,0 @@ ---- -slug: "/reference/java/agents/agent/agent/agent-base" -title: "AgentBase" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.agent.AgentBase" - parent: "agents.agent.agent" - module: "agents.agent.agent" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java" - visibility: "public" ---- -# `AgentBase` - -Base class for all SignalWire AI agents. -Composes prompt management, tool registration, AI config, HTTP serving, -skills integration, and SWML rendering. - -Use the builder pattern: - -<pre> -var agent = AgentBase.builder() - .name("my-agent") - .route("/") - .port(3000) - .build(); -</pre> - -## Signature - -```java -public class AgentBase extends Service -``` - -## Inheritance - -**Extends:** [Service](/docs/sdk-reference/reference/java/agents/swml/swml/service) - -## Constants - - - The complete set of internal SWAIG function names that accept fillers, matching the SWAIGInternalFiller schema definition. \

Any name outside this set is silently ignored by the runtime — \`#setInternalFillersMap(java.util.Map)\` and String, java.util.List) warn if you pass an unknown name. \

Notable absences: \`change\_step\`, \`gather\_submit\`, or arbitrary user-defined SWAIG function names are NOT supported. - - -## Methods - -### addAnswerVerb - -#### Signature - -```java -public AgentBase addAnswerVerb(String verbName, Object verbData) -``` - -#### Parameters - - - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 976. - -*** - -### addFunctionInclude - -#### Signature - -```java -public AgentBase addFunctionInclude(String url, Map functions) -``` - -#### Parameters - - - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 939. - -*** - -### addHint - -#### Signature - -```java -public AgentBase addHint(String hint) -``` - -#### Parameters - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 671. - -*** - -### addHints - -#### Signature - -```java -public AgentBase addHints(List newHints) -``` - -#### Parameters - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 676. - -*** - -### addInternalFiller - -Add internal fillers for a single internal function and language. - -<p>See `#setInternalFillersMap(java.util.Map)` for the complete -list of supported function names and an explanation of what fillers -do. - -Names outside the supported set log a warning and are stored, but -the runtime will not play them. - -#### Signature - - - - ```java - public AgentBase addInternalFiller(String text, String file) - ``` - - - - ```java - public AgentBase addInternalFiller( - String functionName, - String languageCode, - List fillers - ) - ``` - - - -#### Parameters (Overload 1) - - - - - -#### Parameters (Overload 2) - - - one of `#SUPPORTED_INTERNAL_FILLER_NAMES`. - - - - BCP-47 language code (e.g. `"en-US"`). - - - - phrases to speak while the function runs. - - -#### Returns (Overload 1) - -`AgentBase` - -#### Returns (Overload 2) - -`AgentBase` — this agent for chaining. - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 897. - -*** - -### addLanguage - -Add a language configuration with an optional per-language `params` -dict (engine-specific tuning, voice settings, etc.). - -The `params` -key is only emitted into SWML when non-empty so existing language -entries stay byte-identical when no params are passed. -Mirrors Python's add\_language(params=...) addition. - -#### Signature - - - - ```java - public AgentBase addLanguage(String name, String code, String voice) - ``` - - - - ```java - public AgentBase addLanguage( - String name, - String code, - String voice, - String speechModel, - String fillerWord, - String engine - ) - ``` - - - - ```java - public AgentBase addLanguage( - String name, - String code, - String voice, - String speechModel, - String fillerWord, - String engine, - Map params - ) - ``` - - - -#### Parameters (Overload 1) - - - - - - - -#### Parameters (Overload 2) - - - - - - - - - - - - - -#### Parameters (Overload 3) - - - - - - - - - - - - - - - -#### Returns (Overload 1) - -`AgentBase` - -#### Returns (Overload 2) - -`AgentBase` - -#### Returns (Overload 3) - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 686. - -*** - -### addMcpServer - -Add an external MCP server for tool discovery and invocation. -Tools are discovered via MCP protocol at session start and added to SWAIG. - -#### Signature - - - - ```java - public AgentBase addMcpServer( - String url, - Map headers, - boolean resources, - Map resourceVars - ) - ``` - - - - ```java - public AgentBase addMcpServer(String url) - ``` - - - - ```java - public AgentBase addMcpServer(String url, Map headers) - ``` - - - -#### Parameters (Overload 1) - - - MCP server HTTP endpoint URL - - - - Optional HTTP headers (e.g. Authorization) - - - - Whether to fetch resources into global\_data - - - - Variables for URI template substitution - - -#### Parameters (Overload 2) - - - -#### Parameters (Overload 3) - - - - - -#### Returns (Overload 1) - -`AgentBase` — this for chaining - -#### Returns (Overload 2) - -`AgentBase` - -#### Returns (Overload 3) - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1131. - -*** - -### addPatternHint - -#### Signature - -```java -public AgentBase addPatternHint(String pattern) -``` - -#### Parameters - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 681. - -*** - -### addPostAiVerb - -#### Signature - -```java -public AgentBase addPostAiVerb(String verbName, Object verbData) -``` - -#### Parameters - - - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 990. - -*** - -### addPostAnswerVerb - -#### Signature - -```java -public AgentBase addPostAnswerVerb(String verbName, Object verbData) -``` - -#### Parameters - - - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 983. - -*** - -### addPreAnswerVerb - -#### Signature - -```java -public AgentBase addPreAnswerVerb(String verbName, Object verbData) -``` - -#### Parameters - - - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 969. - -*** - -### addPronunciation - -#### Signature - -```java -public AgentBase addPronunciation( - String replace, - String with, - boolean ignoreCase -) -``` - -#### Parameters - - - - - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 760. - -*** - -### addSkill - -Typed overload of Map). - -Accepts a built-in -`SkillName` so a misspelled skill fails at compile time instead of -silently no-op-ing on the server. Delegates to the string path via -`SkillName#getValue()`, so wire behavior is identical. - -#### Signature - - - - ```java - public AgentBase addSkill(String skillName, Map params) - ``` - - - - ```java - public AgentBase addSkill(SkillName skillName, Map params) - ``` - - - -#### Parameters (Overload 1) - - - - - -#### Parameters (Overload 2) - - - - - -#### Returns (Overload 1) - -`AgentBase` - -#### Returns (Overload 2) - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1040. - -*** - -### addSwaigQueryParams - -#### Signature - -```java -public AgentBase addSwaigQueryParams(Map params) -``` - -#### Parameters - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1102. - -*** - -### builder - -**Modifiers:** `static` - -#### Signature - -```java -public static Builder builder() -``` - -#### Returns - -`Builder` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 160. - -*** - -### buildMcpToolList - -Build MCP tool list from registered tools. - -#### Signature - -```java -public List> buildMcpToolList() -``` - -#### Returns - -`List>` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1190. - -*** - -### clearPostAiVerbs - -#### Signature - -```java -public AgentBase clearPostAiVerbs() -``` - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 999. - -*** - -### clearPostAnswerVerbs - -#### Signature - -```java -public AgentBase clearPostAnswerVerbs() -``` - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 998. - -*** - -### clearPreAnswerVerbs - -#### Signature - -```java -public AgentBase clearPreAnswerVerbs() -``` - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 997. - -*** - -### clearSwaigQueryParams - -#### Signature - -```java -public AgentBase clearSwaigQueryParams() -``` - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1107. - -*** - -### clone - -Create a deep copy of this agent for per-request customization. - -#### Signature - -```java -public AgentBase clone() -``` - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1737. - -*** - -### contexts - -#### Signature - -```java -public ContextBuilder contexts() -``` - -#### Returns - -`ContextBuilder` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1017. - -*** - -### createToolToken - -Mint a per-call SWAIG-function token via the agent's SessionManager. - -<p>Python parity: `state_mixin.StateMixin._create_tool_token`. -Returns an empty string when the underlying SessionManager throws -(Python catches all exceptions and returns "" on error). - -#### Signature - -```java -public String createToolToken(String toolName, String callId) -``` - -#### Parameters - - - - - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 640. - -*** - -### defineContexts - -Define or return the ContextBuilder for this agent. - -The builder is -wired to report registered SWAIG tool names back so that its -`validate()` can check for collisions with reserved native tool -names (`next_step`, `change_context`, `gather_submit`). - -#### Signature - -```java -public ContextBuilder defineContexts() -``` - -#### Returns - -`ContextBuilder` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1011. - -*** - -### defineTool - -Register a SWAIG tool (function) that the AI can invoke during a call. - -<h3>How this becomes a tool the model sees</h3> - -<p>A SWAIG function is <b>exactly the same concept</b> as a "tool" in -native OpenAI / Anthropic tool calling. - -On every LLM turn, the SDK -renders each registered SWAIG function into the OpenAI tool schema: - -<pre>"type": "function", - "function": { - "name": "your_name_here", - "description": "your description text", - "parameters": { ... your JSON schema ... - } -} -}</pre> - -<p>That schema is sent to the model as part of the same API call that -produces the next assistant message. The model reads: -<ul> - <li>the function `description` to decide WHEN to call this tool</li> - <li>each parameter `description` (inside parameters) to decide - HOW to fill in that argument from the user's utterance</li> -</ul> - -<p>This means <b>descriptions are prompt engineering</b>, not developer -comments. A vague description is the #1 cause of "the model has the -right tool but doesn't call it" failures. - -<h3>Bad vs good descriptions</h3> -<pre>: description: "Lookup function" -GOOD: description: "Look up a customer's account details by account " - + "number. Use this BEFORE quoting any account-" - + "specific info (balance, plan, status). Do not " - + "use for general product questions." - -BAD : parameters : Map.of("id", Map.of("type", "string", -"description", "the id")) -GOOD: parameters : Map.of("account\_number", Map.of("type", "string", -"description", "The customer's 8-digit account " -\+ "number, no dashes or spaces. Ask the user if " -\+ "they don't provide it."))</pre> - -<h3>Tool count matters</h3> - -<p>LLM tool selection accuracy degrades past ~7-8 simultaneously-active -tools per call. Use `com.signalwire.sdk.contexts.Step#setFunctions(Object)` -to partition tools across steps so only the relevant subset is active -at any moment. - -**Decorators:** `@Override` - -#### Signature - - - - ```java - public AgentBase defineTool( - String name, - String description, - Map parameters, - ToolHandler handler - ) - ``` - - - - ```java - public AgentBase defineTool(ToolDefinition toolDef) - ``` - - - -#### Parameters (Overload 1) - - - the function name (snake\_case verb recommended). - - - - LLM-facing description of when to call this tool. - - - - JSON-schema properties map with LLM-facing descriptions for each parameter. - - - - the Java handler invoked when the model calls this tool. - - -#### Parameters (Overload 2) - - - -#### Returns (Overload 1) - -`AgentBase` - -#### Returns (Overload 2) - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 575. - -*** - -### defineTools - -**Decorators:** `@Override` - -#### Signature - -```java -public AgentBase defineTools(List toolDefs) -``` - -#### Parameters - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 594. - -*** - -### detectServerlessBaseUrl - -Resolve a base URL from environment variables alone (proxy or -serverless platform). - -Returns `null` if no suitable env -vars are set. - -<p>This is used by both the HTTP server path (when no proxy is -manually set) and by non-HTTP transports such as the Lambda -adapter, so they agree on the origin to use for webhook URLs. - -<p>The returned origin is a bare scheme + host(:port) with NO -route appended — callers must layer their route on top via -`#buildWebhookUrl(String)` and the post-prompt URL builder. -This matters: it is how we guarantee that the agent's route -always appears in webhook URLs regardless of which source -produced the base. - -#### Signature - - - - ```java - public String detectServerlessBaseUrl() - ``` - - - - ```java - public String detectServerlessBaseUrl(EnvProvider env) - ``` - - - -#### Parameters (Overload 2) - - - environment variable source. - - -#### Returns (Overload 1) - -`String` — base URL, or `null`. - -#### Returns (Overload 2) - -`String` — base URL, or `null`. - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1855. - -*** - -### enableDebugEvents - -#### Signature - -```java -public AgentBase enableDebugEvents() -``` - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 934. - -*** - -### enableDebugRoutes - -#### Signature - -```java -public AgentBase enableDebugRoutes() -``` - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1112. - -*** - -### enableMcpServer - -Expose this agent's tools as an MCP server endpoint at /mcp. -Adds a JSON-RPC 2.0 endpoint that MCP clients can connect to. - -#### Signature - -```java -public AgentBase enableMcpServer() -``` - -#### Returns - -`AgentBase` — this for chaining - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1168. - -*** - -### enableSipRouting - -#### Signature - -```java -public AgentBase enableSipRouting() -``` - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1293. - -*** - -### extractSipUsername - -Extract the username portion from a SIP URI. - -<p> -Handles formats: -<ul> - <li>`sip:user@host` -> `user`</li> - <li>`sip:user@host:port` -> `user`</li> - <li>`user@host` -> `user`</li> - <li>`+15551234567` -> `+15551234567` (returned as-is)</li> -</ul> - -**Modifiers:** `static` - -#### Signature - -```java -public static String extractSipUsername(String sipUri) -``` - -#### Parameters - - - The SIP URI or phone number - - -#### Returns - -`String` — The extracted username, or the original string if no @ is found - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1324. - -*** - -### getAuthPassword - -#### Signature - -```java -public String getAuthPassword() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1374. - -*** - -### getAuthUser - -#### Signature - -```java -public String getAuthUser() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1373. - -*** - -### getContexts - -Returns the contexts dictionary as serialised SWML, or null when no -contexts have been defined yet. - -Mirrors Python's PromptManager.get\_contexts which returns the contexts -dict or None. - -#### Signature - -```java -public Map getContexts() -``` - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 498. - -*** - -### getDynamicConfigCallback - -#### Signature - -```java -public DynamicConfigCallback getDynamicConfigCallback() -``` - -#### Returns - -`DynamicConfigCallback` — the dynamic config callback, or `null` if none set. Exposed primarily so alternative transports (e.g. the Lambda adapter) can invoke it outside the HTTP server path. - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1504. - -*** - -### getGlobalData - -#### Signature - -```java -public Map getGlobalData() -``` - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 796. - -*** - -### getHost - -#### Signature - -```java -public String getHost() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1371. - -*** - -### getLanguageParams - -Read the per-language `params` dict for a previously-added language. -Returns null when the code is unknown or params were never set. -Mirrors Python's get\_language\_params. - -**Decorators:** `@SuppressWarnings` - -#### Signature - -```java -public Map getLanguageParams(String code) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 743. - -*** - -### getMcpServers - -Get configured MCP servers (read-only). - -#### Signature - -```java -public List> getMcpServers() -``` - -#### Returns - -`List>` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1183. - -*** - -### getName - -#### Signature - -```java -public String getName() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1369. - -*** - -### getNormalisedRoute - -Return the agent's route normalised to an empty string for the -root route or `"/"` otherwise. - -Exposed so non-HTTP -transports can construct paths correctly. - -#### Signature - -```java -public String getNormalisedRoute() -``` - -#### Returns - -`String` — normalised route prefix. - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1522. - -*** - -### getOnSummaryCallback - -#### Signature - -```java -public BiConsumer,Map> getOnSummaryCallback() -``` - -#### Returns - -`BiConsumer,Map>` — the post-prompt summary callback, or `null`. - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1511. - -*** - -### getPom - -Read-only snapshot of the agent's POM as a typed -`PromptObjectModel`. - -Wraps the internal map-based section list so -callers get the rich Section / render API without mutating internal -state. - -<p>Python parity: `agent.pom` instance attribute -(agent_base.py line 209). Returns `null` when `usePom` is -false (mirroring Python's = None). - -#### Signature - -```java -public PromptObjectModel getPom() -``` - -#### Returns - -`PromptObjectModel` — typed POM wrapper, or `null` when POM mode is off. - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 484. - -*** - -### getPort - -#### Signature - -```java -public int getPort() -``` - -#### Returns - -`int` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1372. - -*** - -### getPostPrompt - -Returns the post-prompt text that was set via setPostPrompt, or null -when none has been set. - -Mirrors Python's PromptManager.get\_post\_prompt / -PromptMixin.get\_post\_prompt — used by SWML rendering when a post-prompt -is configured. - -#### Signature - -```java -public String getPostPrompt() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 438. - -*** - -### getPrompt - -#### Signature - -```java -public Object getPrompt() -``` - -#### Returns - -`Object` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 421. - -*** - -### getRawPrompt - -Returns the raw prompt text whatever setPromptText stored, or null when -no raw prompt has been set. - -Distinct from getPrompt() which may return -a POM map when usePom is true. - -Mirrors Python's PromptManager.get\_raw\_prompt. - -#### Signature - -```java -public String getRawPrompt() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 449. - -*** - -### getRoute - -#### Signature - -```java -public String getRoute() -``` - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1370. - -*** - -### getSigningKey - -#### Signature - -```java -public String getSigningKey() -``` - -#### Returns - -`String` — the configured Signing Key for SignalWire webhook signature validation (resolved from the builder or `SIGNALWIRE_SIGNING_KEY` env), or `null` when validation is disabled. - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1382. - -*** - -### getSipUsernames - -#### Signature - -```java -public Set getSipUsernames() -``` - -#### Returns - -`Set` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1308. - -*** - -### getSkillManager - -#### Signature - -```java -public SkillManager getSkillManager() -``` - -#### Returns - -`SkillManager` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1525. - -*** - -### getTools - -#### Signature - -```java -public Map getTools() -``` - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 625. - -*** - -### handleMcpRequest - -Handle an MCP JSON-RPC 2.0 request. - -Returns the response map. - -#### Signature - -```java -public Map handleMcpRequest(Map body) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1211. - -*** - -### hasSkill - -Typed overload of `#hasSkill(String)` (see Map)). - -#### Signature - - - - ```java - public boolean hasSkill(String skillName) - ``` - - - - ```java - public boolean hasSkill(SkillName skillName) - ``` - - - -#### Parameters (Overload 1) - - - -#### Parameters (Overload 2) - - - -#### Returns (Overload 1) - -`boolean` - -#### Returns (Overload 2) - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1069. - -*** - -### hasTool - -#### Signature - -```java -public boolean hasTool(String name) -``` - -#### Parameters - - - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 629. - -*** - -### isMcpServerEnabled - -Check if MCP server endpoint is enabled. - -#### Signature - -```java -public boolean isMcpServerEnabled() -``` - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1176. - -*** - -### isSipRoutingEnabled - -#### Signature - -```java -public boolean isSipRoutingEnabled() -``` - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1307. - -*** - -### isTrustProxyForSignature - -#### Signature - -```java -public boolean isTrustProxyForSignature() -``` - -#### Returns - -`boolean` — whether webhook URL reconstruction trusts `X-Forwarded-Proto` / `X-Forwarded-Host` headers during signature validation. - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1389. - -*** - -### listSkills - -#### Signature - -```java -public List listSkills() -``` - -#### Returns - -`List` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1065. - -*** - -### manualSetProxyUrl - -#### Signature - -```java -public AgentBase manualSetProxyUrl(String url) -``` - -#### Parameters - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1097. - -*** - -### onDebugEvent - -#### Signature - -```java -public AgentBase onDebugEvent(Consumer> callback) -``` - -#### Parameters - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1360. - -*** - -### onFunctionCall - -#### Signature - -```java -public FunctionResult onFunctionCall( - String name, - Map args, - Map rawData -) -``` - -#### Parameters - - - - - - - -#### Returns - -`FunctionResult` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 600. - -*** - -### onSummary - -#### Signature - -```java -public AgentBase onSummary( - BiConsumer,Map> callback -) -``` - -#### Parameters - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1355. - -*** - -### promptAddSection - -#### Signature - - - - ```java - public AgentBase promptAddSection( - String title, - String body, - List bullets - ) - ``` - - - - ```java - public AgentBase promptAddSection(String title, String body) - ``` - - - -#### Parameters (Overload 1) - - - - - - - -#### Parameters (Overload 2) - - - - - -#### Returns (Overload 1) - -`AgentBase` - -#### Returns (Overload 2) - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 368. - -*** - -### promptAddSubsection - -#### Signature - -```java -public AgentBase promptAddSubsection( - String parentTitle, - String title, - String body -) -``` - -#### Parameters - - - - - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 384. - -*** - -### promptAddToSection - -#### Signature - -```java -public AgentBase promptAddToSection(String title, List bullets) -``` - -#### Parameters - - - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 400. - -*** - -### promptHasSection - -#### Signature - -```java -public boolean promptHasSection(String title) -``` - -#### Parameters - - - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 412. - -*** - -### registerAdditionalRoutes - -**Decorators:** `@Override` - -#### Signature - -```java -protected void registerAdditionalRoutes( - com.sun.net.httpserver.HttpServer server -) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1962. - -*** - -### registerSipUsername - -#### Signature - -```java -public AgentBase registerSipUsername(String username) -``` - -#### Parameters - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1298. - -*** - -### registerSwaigFunction - -**Decorators:** `@Override` - -#### Signature - -```java -public AgentBase registerSwaigFunction(Map swaigFunc) -``` - -#### Parameters - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 588. - -*** - -### removeSkill - -Typed overload of `#removeSkill(String)` (see Map)). - -#### Signature - - - - ```java - public AgentBase removeSkill(String skillName) - ``` - - - - ```java - public AgentBase removeSkill(SkillName skillName) - ``` - - - -#### Parameters (Overload 1) - - - -#### Parameters (Overload 2) - - - -#### Returns (Overload 1) - -`AgentBase` - -#### Returns (Overload 2) - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1055. - -*** - -### renderMainSwml - -**Decorators:** `@Override` - -#### Signature - -```java -protected Map renderMainSwml(HttpExchange exchange) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1930. - -*** - -### renderSwml - -Render the complete SWML document. -5 phases: pre-answer, answer, post-answer, AI, post-AI - -#### Signature - -```java -public Map renderSwml(String baseUrl) -``` - -#### Parameters - - - -#### Returns - -`Map` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1535. - -*** - -### renderSwmlJson - -Render SWML as a JSON string. - -#### Signature - -```java -public String renderSwmlJson(String baseUrl) -``` - -#### Parameters - - - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1726. - -*** - -### resetContexts - -Remove all contexts, returning the agent to a no-contexts state. -This is a convenience wrapper around `defineContexts().reset()`. -Use it in a dynamic config callback when you need to rebuild -contexts from scratch for a specific request. - -#### Signature - -```java -public AgentBase resetContexts() -``` - -#### Returns - -`AgentBase` — this agent for chaining. - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1029. - -*** - -### run - -Start the agent server. - -Equivalent to `#serve()` (inherited). - -#### Signature - -```java -public void run() -``` - -#### Throws - -- `IOException` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 2088. - -*** - -### setDynamicConfigCallback - -#### Signature - -```java -public AgentBase setDynamicConfigCallback(DynamicConfigCallback callback) -``` - -#### Parameters - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1082. - -*** - -### setFunctionIncludes - -#### Signature - -```java -public AgentBase setFunctionIncludes(List> includes) -``` - -#### Parameters - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 947. - -*** - -### setGlobalData - -#### Signature - -```java -public AgentBase setGlobalData(Map data) -``` - -#### Parameters - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 785. - -*** - -### setInternalFillers - -#### Signature - -```java -public AgentBase setInternalFillers(List> fillers) -``` - -#### Parameters - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 836. - -*** - -### setInternalFillersMap - -Set internal fillers for native SWAIG functions. - -<p>Internal fillers are short phrases the AI agent speaks (via TTS) -while an internal/native function is running, so the caller doesn't -hear dead air during transitions or background work. - -<p>Supported function names (match the SWAIGInternalFiller schema): -`hangup`, `check_time`, `wait_for_user`, -`wait_seconds`, `adjust_response_latency`, -`next_step`, `change_context`, `get_visual_input`, -`get_ideal_strategy`. - -See -`#SUPPORTED_INTERNAL_FILLER_NAMES`. - -<p>Notably NOT supported: `change_step`, `gather_submit`, or -arbitrary user-defined SWAIG function names. The runtime only honors -fillers for the names listed above; everything else is silently -ignored at the SWML level. This method warns at registration time if -you pass an unknown name so you catch the typo early. - -#### Signature - -```java -public AgentBase setInternalFillersMap( - Map>> fillers -) -``` - -#### Parameters - - - map of → language\_code → phrases. - - -#### Returns - -`AgentBase` — this agent for chaining. - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 865. - -*** - -### setLanguageParams - -Set (or replace) the per-language `params` dict on an already-added -language. - -Empty/null params removes the key. Unknown code is a no-op. -Returns self for chaining. Mirrors Python's set\_language\_params. - -#### Signature - -```java -public AgentBase setLanguageParams(String code, Map params) -``` - -#### Parameters - - - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 724. - -*** - -### setLanguages - -#### Signature - -```java -public AgentBase setLanguages(List> langs) -``` - -#### Parameters - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 754. - -*** - -### setNativeFunctions - -#### Signature - -```java -public AgentBase setNativeFunctions(List funcs) -``` - -#### Parameters - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 800. - -*** - -### setParam - -#### Signature - -```java -public AgentBase setParam(String key, Object value) -``` - -#### Parameters - - - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 775. - -*** - -### setParams - -#### Signature - -```java -public AgentBase setParams(Map newParams) -``` - -#### Parameters - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 780. - -*** - -### setPostPrompt - -#### Signature - -```java -public AgentBase setPostPrompt(String text) -``` - -#### Parameters - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 363. - -*** - -### setPostPromptLlmParams - -#### Signature - -```java -public AgentBase setPostPromptLlmParams(Map llmParams) -``` - -#### Parameters - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 959. - -*** - -### setPostPromptUrl - -#### Signature - -```java -public AgentBase setPostPromptUrl(String url) -``` - -#### Parameters - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1092. - -*** - -### setPromptLlmParams - -#### Signature - -```java -public AgentBase setPromptLlmParams(Map llmParams) -``` - -#### Parameters - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 953. - -*** - -### setPromptPom - -Sets the prompt as a list of POM section maps. - -Each section map -supports keys "title", "body", "bullets", "numbered", -"numbered\_bullets", and "subsections". Switches the agent to POM mode. - -Mirrors Python's PromptManager.set\_prompt\_pom — accepts a list of -section dicts and stores them in pomSections. - -#### Signature - -```java -public AgentBase setPromptPom(List> pom) -``` - -#### Parameters - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 461. - -*** - -### setPromptText - -#### Signature - -```java -public AgentBase setPromptText(String text) -``` - -#### Parameters - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 357. - -*** - -### setPronunciations - -#### Signature - -```java -public AgentBase setPronunciations(List> prons) -``` - -#### Parameters - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 769. - -*** - -### setWebHookUrl - -#### Signature - -```java -public AgentBase setWebHookUrl(String url) -``` - -#### Parameters - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1087. - -*** - -### updateGlobalData - -#### Signature - -```java -public AgentBase updateGlobalData(Map data) -``` - -#### Parameters - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 791. - -*** - -### validateSignedWebhook - -Override the `Service` hook to enforce SignalWire webhook -signature validation when a `#signingKey` is configured. - -Returns -`true` (no-op) when `signingKey` is unset; per -porting-sdk/webhooks.md, the AgentBase MUST NOT silently reject -unsigned requests when no key is configured (a prominent startup -warning is the documented behavior instead — emitted in -`Builder#build()`). - -<p>The signature header is read from `X-SignalWire-Signature` -(or its `X-Twilio-Signature` legacy alias). The URL is -reconstructed from proxy headers / `SWML_PROXY_URL_BASE` / -the request itself, and the validator is called with the raw body -bytes the caller already captured. - -**Decorators:** `@Override` - -#### Signature - -```java -protected boolean validateSignedWebhook( - com.sun.net.httpserver.HttpExchange exchange, - String rawBody -) -``` - -#### Parameters - - - the inbound HttpExchange. - - - - the raw UTF-8 body string that was already read from the exchange. - - -#### Returns - -`boolean` — `true` when validation passes (or no key is configured). - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1426. - -*** - -### validateToolToken - -Validate a per-call SWAIG-function token. - -Returns false when the -function is not registered, when the SessionManager rejects the -token, or on any underlying exception. - -<p>Python parity: `state_mixin.StateMixin.validate_tool_token` -— rejects unknown functions up-front and swallows exceptions. - -#### Signature - -```java -public boolean validateToolToken( - String functionName, - String token, - String callId -) -``` - -#### Parameters - - - - - - - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 656. - -*** - -### validateWebhook - -Public delegate around `#validateSignedWebhook` so external -front-doors (e.g. - -`com.signalwire.sdk.server.AgentServer`, a -Lambda adapter, etc.) can run the same logic the in-process HTTP -server does. Mirrors the no-op-when-unset behavior described in -porting-sdk/webhooks.md. - -#### Signature - -```java -public boolean validateWebhook( - com.sun.net.httpserver.HttpExchange exchange, - String rawBody -) -``` - -#### Parameters - - - the inbound HttpExchange. - - - - raw UTF-8 body string. - - -#### Returns - -`boolean` — `true` when validation passes (or no key is configured). - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 1402. - -## Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 55. diff --git a/fern/products/sdk-reference/java/agents/agent/agent/agent-base/index__2.mdx b/fern/products/sdk-reference/java/agents/agent/agent/agent-base/index__2.mdx deleted file mode 100644 index 64f9a94a43..0000000000 --- a/fern/products/sdk-reference/java/agents/agent/agent/agent-base/index__2.mdx +++ /dev/null @@ -1,67 +0,0 @@ ---- -slug: "/reference/java/agents/agent/agent/agent-base/index__2" -title: "AgentBase" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "module" - language: "java" - qualified_name: "agents.agent.agent.AgentBase" - parent: "agents.agent.agent" - module: "agents.agent.agent" ---- -# `AgentBase` - -## Classes - - - - - -## Interfaces - -### DynamicConfigCallback - -#### Signature - -```java -public interface DynamicConfigCallback -``` - -#### Methods - -##### configure - -###### Signature - -```java -void configure( - Map queryParams, - Map bodyParams, - Map> headers, - AgentBase agent -) -``` - -###### Parameters - - - - - - - - - -###### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 2100. - -#### Source - -[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) - -Line 2098. diff --git a/fern/products/sdk-reference/java/agents/agent/agent/agent-base/builder/index.mdx b/fern/products/sdk-reference/java/agents/agent/agent/builder/index.mdx similarity index 98% rename from fern/products/sdk-reference/java/agents/agent/agent/agent-base/builder/index.mdx rename to fern/products/sdk-reference/java/agents/agent/agent/builder/index.mdx index 181b966635..f77bd2a76c 100644 --- a/fern/products/sdk-reference/java/agents/agent/agent/agent-base/builder/index.mdx +++ b/fern/products/sdk-reference/java/agents/agent/agent/builder/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/java/agents/agent/agent/agent-base/builder" +slug: "/reference/java/agents/agent/agent/builder" title: "Builder" sdk_label: "Java SDK" icon: "java" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.agent.AgentBase.Builder" - parent: "agents.agent.agent.AgentBase" - module: "agents.agent.agent.AgentBase" + parent: "agents.agent.agent" + module: "agents.agent.agent" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java" visibility: "public" --- diff --git a/fern/products/sdk-reference/java/agents/agent/agent/index.mdx b/fern/products/sdk-reference/java/agents/agent/agent/index.mdx index 2418fb9d4d..28155f762f 100644 --- a/fern/products/sdk-reference/java/agents/agent/agent/index.mdx +++ b/fern/products/sdk-reference/java/agents/agent/agent/index.mdx @@ -16,13 +16,52 @@ lustri: ## Classes - - Base class for all SignalWire AI agents. Composes prompt management, tool registration, AI config, HTTP serving, skills integration, and SWML rendering. Use the builder pattern: <pre> var agent = AgentBase.builder() .name("my-agent") .route("/") .port(3000) .build(); </pre> - + -## Modules +## Interfaces - - - +### DynamicConfigCallback + +#### Signature + +```java +public interface DynamicConfigCallback +``` + +#### Methods + +##### configure + +###### Signature + +```java +void configure( + Map queryParams, + Map bodyParams, + Map> headers, + AgentBase agent +) +``` + +###### Parameters + + + + + + + + + +###### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 2100. + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 2098. diff --git a/fern/products/sdk-reference/java/agents/agent/index.mdx b/fern/products/sdk-reference/java/agents/agent/index.mdx index b55daf0ea8..39920528c5 100644 --- a/fern/products/sdk-reference/java/agents/agent/index.mdx +++ b/fern/products/sdk-reference/java/agents/agent/index.mdx @@ -5,22 +5,2941 @@ sdk_label: "Java SDK" icon: "java" lustri: auto_generated: true - kind: "module" + kind: "class" language: "java" qualified_name: "com.signalwire.sdk.agent" parent: "agents" module: "agents" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java" --- # `agent` +Base class for all SignalWire AI agents. +Composes prompt management, tool registration, AI config, HTTP serving, +skills integration, and SWML rendering. + +Use the builder pattern: + +<pre> +var agent = AgentBase.builder() + .name("my-agent") + .route("/") + .port(3000) + .build(); +</pre> + ## Signature ```java -package com.signalwire.sdk.agent +public class AgentBase extends Service ``` +## Inheritance + +**Extends:** [Service](/docs/sdk-reference/reference/java/agents/swml/swml/service) + +## Constants + + + The complete set of internal SWAIG function names that accept fillers, matching the SWAIGInternalFiller schema definition. \

Any name outside this set is silently ignored by the runtime — \`#setInternalFillersMap(java.util.Map)\` and String, java.util.List) warn if you pass an unknown name. \

Notable absences: \`change\_step\`, \`gather\_submit\`, or arbitrary user-defined SWAIG function names are NOT supported. + + ## Modules + +## Methods + +### addAnswerVerb + +#### Signature + +```java +public AgentBase addAnswerVerb(String verbName, Object verbData) +``` + +#### Parameters + + + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 976. + +*** + +### addFunctionInclude + +#### Signature + +```java +public AgentBase addFunctionInclude(String url, Map functions) +``` + +#### Parameters + + + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 939. + +*** + +### addHint + +#### Signature + +```java +public AgentBase addHint(String hint) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 671. + +*** + +### addHints + +#### Signature + +```java +public AgentBase addHints(List newHints) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 676. + +*** + +### addInternalFiller + +Add internal fillers for a single internal function and language. + +<p>See `#setInternalFillersMap(java.util.Map)` for the complete +list of supported function names and an explanation of what fillers +do. + +Names outside the supported set log a warning and are stored, but +the runtime will not play them. + +#### Signature + + + + ```java + public AgentBase addInternalFiller(String text, String file) + ``` + + + + ```java + public AgentBase addInternalFiller( + String functionName, + String languageCode, + List fillers + ) + ``` + + + +#### Parameters (Overload 1) + + + + + +#### Parameters (Overload 2) + + + one of `#SUPPORTED_INTERNAL_FILLER_NAMES`. + + + + BCP-47 language code (e.g. `"en-US"`). + + + + phrases to speak while the function runs. + + +#### Returns (Overload 1) + +`AgentBase` + +#### Returns (Overload 2) + +`AgentBase` — this agent for chaining. + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 897. + +*** + +### addLanguage + +Add a language configuration with an optional per-language `params` +dict (engine-specific tuning, voice settings, etc.). + +The `params` +key is only emitted into SWML when non-empty so existing language +entries stay byte-identical when no params are passed. +Mirrors Python's add\_language(params=...) addition. + +#### Signature + + + + ```java + public AgentBase addLanguage(String name, String code, String voice) + ``` + + + + ```java + public AgentBase addLanguage( + String name, + String code, + String voice, + String speechModel, + String fillerWord, + String engine + ) + ``` + + + + ```java + public AgentBase addLanguage( + String name, + String code, + String voice, + String speechModel, + String fillerWord, + String engine, + Map params + ) + ``` + + + +#### Parameters (Overload 1) + + + + + + + +#### Parameters (Overload 2) + + + + + + + + + + + + + +#### Parameters (Overload 3) + + + + + + + + + + + + + + + +#### Returns (Overload 1) + +`AgentBase` + +#### Returns (Overload 2) + +`AgentBase` + +#### Returns (Overload 3) + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 686. + +*** + +### addMcpServer + +Add an external MCP server for tool discovery and invocation. +Tools are discovered via MCP protocol at session start and added to SWAIG. + +#### Signature + + + + ```java + public AgentBase addMcpServer( + String url, + Map headers, + boolean resources, + Map resourceVars + ) + ``` + + + + ```java + public AgentBase addMcpServer(String url) + ``` + + + + ```java + public AgentBase addMcpServer(String url, Map headers) + ``` + + + +#### Parameters (Overload 1) + + + MCP server HTTP endpoint URL + + + + Optional HTTP headers (e.g. Authorization) + + + + Whether to fetch resources into global\_data + + + + Variables for URI template substitution + + +#### Parameters (Overload 2) + + + +#### Parameters (Overload 3) + + + + + +#### Returns (Overload 1) + +`AgentBase` — this for chaining + +#### Returns (Overload 2) + +`AgentBase` + +#### Returns (Overload 3) + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1131. + +*** + +### addPatternHint + +#### Signature + +```java +public AgentBase addPatternHint(String pattern) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 681. + +*** + +### addPostAiVerb + +#### Signature + +```java +public AgentBase addPostAiVerb(String verbName, Object verbData) +``` + +#### Parameters + + + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 990. + +*** + +### addPostAnswerVerb + +#### Signature + +```java +public AgentBase addPostAnswerVerb(String verbName, Object verbData) +``` + +#### Parameters + + + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 983. + +*** + +### addPreAnswerVerb + +#### Signature + +```java +public AgentBase addPreAnswerVerb(String verbName, Object verbData) +``` + +#### Parameters + + + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 969. + +*** + +### addPronunciation + +#### Signature + +```java +public AgentBase addPronunciation( + String replace, + String with, + boolean ignoreCase +) +``` + +#### Parameters + + + + + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 760. + +*** + +### addSkill + +Typed overload of Map). + +Accepts a built-in +`SkillName` so a misspelled skill fails at compile time instead of +silently no-op-ing on the server. Delegates to the string path via +`SkillName#getValue()`, so wire behavior is identical. + +#### Signature + + + + ```java + public AgentBase addSkill(String skillName, Map params) + ``` + + + + ```java + public AgentBase addSkill(SkillName skillName, Map params) + ``` + + + +#### Parameters (Overload 1) + + + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`AgentBase` + +#### Returns (Overload 2) + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1040. + +*** + +### addSwaigQueryParams + +#### Signature + +```java +public AgentBase addSwaigQueryParams(Map params) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1102. + +*** + +### builder + +**Modifiers:** `static` + +#### Signature + +```java +public static Builder builder() +``` + +#### Returns + +`Builder` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 160. + +*** + +### buildMcpToolList + +Build MCP tool list from registered tools. + +#### Signature + +```java +public List> buildMcpToolList() +``` + +#### Returns + +`List>` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1190. + +*** + +### clearPostAiVerbs + +#### Signature + +```java +public AgentBase clearPostAiVerbs() +``` + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 999. + +*** + +### clearPostAnswerVerbs + +#### Signature + +```java +public AgentBase clearPostAnswerVerbs() +``` + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 998. + +*** + +### clearPreAnswerVerbs + +#### Signature + +```java +public AgentBase clearPreAnswerVerbs() +``` + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 997. + +*** + +### clearSwaigQueryParams + +#### Signature + +```java +public AgentBase clearSwaigQueryParams() +``` + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1107. + +*** + +### clone + +Create a deep copy of this agent for per-request customization. + +#### Signature + +```java +public AgentBase clone() +``` + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1737. + +*** + +### contexts + +#### Signature + +```java +public ContextBuilder contexts() +``` + +#### Returns + +`ContextBuilder` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1017. + +*** + +### createToolToken + +Mint a per-call SWAIG-function token via the agent's SessionManager. + +<p>Python parity: `state_mixin.StateMixin._create_tool_token`. +Returns an empty string when the underlying SessionManager throws +(Python catches all exceptions and returns "" on error). + +#### Signature + +```java +public String createToolToken(String toolName, String callId) +``` + +#### Parameters + + + + + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 640. + +*** + +### defineContexts + +Define or return the ContextBuilder for this agent. + +The builder is +wired to report registered SWAIG tool names back so that its +`validate()` can check for collisions with reserved native tool +names (`next_step`, `change_context`, `gather_submit`). + +#### Signature + +```java +public ContextBuilder defineContexts() +``` + +#### Returns + +`ContextBuilder` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1011. + +*** + +### defineTool + +Register a SWAIG tool (function) that the AI can invoke during a call. + +<h3>How this becomes a tool the model sees</h3> + +<p>A SWAIG function is <b>exactly the same concept</b> as a "tool" in +native OpenAI / Anthropic tool calling. + +On every LLM turn, the SDK +renders each registered SWAIG function into the OpenAI tool schema: + +<pre>"type": "function", + "function": { + "name": "your_name_here", + "description": "your description text", + "parameters": { ... your JSON schema ... + } +} +}</pre> + +<p>That schema is sent to the model as part of the same API call that +produces the next assistant message. The model reads: +<ul> + <li>the function `description` to decide WHEN to call this tool</li> + <li>each parameter `description` (inside parameters) to decide + HOW to fill in that argument from the user's utterance</li> +</ul> + +<p>This means <b>descriptions are prompt engineering</b>, not developer +comments. A vague description is the #1 cause of "the model has the +right tool but doesn't call it" failures. + +<h3>Bad vs good descriptions</h3> +<pre>: description: "Lookup function" +GOOD: description: "Look up a customer's account details by account " + + "number. Use this BEFORE quoting any account-" + + "specific info (balance, plan, status). Do not " + + "use for general product questions." + +BAD : parameters : Map.of("id", Map.of("type", "string", +"description", "the id")) +GOOD: parameters : Map.of("account\_number", Map.of("type", "string", +"description", "The customer's 8-digit account " +\+ "number, no dashes or spaces. Ask the user if " +\+ "they don't provide it."))</pre> + +<h3>Tool count matters</h3> + +<p>LLM tool selection accuracy degrades past ~7-8 simultaneously-active +tools per call. Use `com.signalwire.sdk.contexts.Step#setFunctions(Object)` +to partition tools across steps so only the relevant subset is active +at any moment. + +**Decorators:** `@Override` + +#### Signature + + + + ```java + public AgentBase defineTool( + String name, + String description, + Map parameters, + ToolHandler handler + ) + ``` + + + + ```java + public AgentBase defineTool(ToolDefinition toolDef) + ``` + + + +#### Parameters (Overload 1) + + + the function name (snake\_case verb recommended). + + + + LLM-facing description of when to call this tool. + + + + JSON-schema properties map with LLM-facing descriptions for each parameter. + + + + the Java handler invoked when the model calls this tool. + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`AgentBase` + +#### Returns (Overload 2) + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 575. + +*** + +### defineTools + +**Decorators:** `@Override` + +#### Signature + +```java +public AgentBase defineTools(List toolDefs) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 594. + +*** + +### detectServerlessBaseUrl + +Resolve a base URL from environment variables alone (proxy or +serverless platform). + +Returns `null` if no suitable env +vars are set. + +<p>This is used by both the HTTP server path (when no proxy is +manually set) and by non-HTTP transports such as the Lambda +adapter, so they agree on the origin to use for webhook URLs. + +<p>The returned origin is a bare scheme + host(:port) with NO +route appended — callers must layer their route on top via +`#buildWebhookUrl(String)` and the post-prompt URL builder. +This matters: it is how we guarantee that the agent's route +always appears in webhook URLs regardless of which source +produced the base. + +#### Signature + + + + ```java + public String detectServerlessBaseUrl() + ``` + + + + ```java + public String detectServerlessBaseUrl(EnvProvider env) + ``` + + + +#### Parameters (Overload 2) + + + environment variable source. + + +#### Returns (Overload 1) + +`String` — base URL, or `null`. + +#### Returns (Overload 2) + +`String` — base URL, or `null`. + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1855. + +*** + +### enableDebugEvents + +#### Signature + +```java +public AgentBase enableDebugEvents() +``` + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 934. + +*** + +### enableDebugRoutes + +#### Signature + +```java +public AgentBase enableDebugRoutes() +``` + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1112. + +*** + +### enableMcpServer + +Expose this agent's tools as an MCP server endpoint at /mcp. +Adds a JSON-RPC 2.0 endpoint that MCP clients can connect to. + +#### Signature + +```java +public AgentBase enableMcpServer() +``` + +#### Returns + +`AgentBase` — this for chaining + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1168. + +*** + +### enableSipRouting + +#### Signature + +```java +public AgentBase enableSipRouting() +``` + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1293. + +*** + +### extractSipUsername + +Extract the username portion from a SIP URI. + +<p> +Handles formats: +<ul> + <li>`sip:user@host` -> `user`</li> + <li>`sip:user@host:port` -> `user`</li> + <li>`user@host` -> `user`</li> + <li>`+15551234567` -> `+15551234567` (returned as-is)</li> +</ul> + +**Modifiers:** `static` + +#### Signature + +```java +public static String extractSipUsername(String sipUri) +``` + +#### Parameters + + + The SIP URI or phone number + + +#### Returns + +`String` — The extracted username, or the original string if no @ is found + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1324. + +*** + +### getAuthPassword + +#### Signature + +```java +public String getAuthPassword() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1374. + +*** + +### getAuthUser + +#### Signature + +```java +public String getAuthUser() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1373. + +*** + +### getContexts + +Returns the contexts dictionary as serialised SWML, or null when no +contexts have been defined yet. + +Mirrors Python's PromptManager.get\_contexts which returns the contexts +dict or None. + +#### Signature + +```java +public Map getContexts() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 498. + +*** + +### getDynamicConfigCallback + +#### Signature + +```java +public DynamicConfigCallback getDynamicConfigCallback() +``` + +#### Returns + +`DynamicConfigCallback` — the dynamic config callback, or `null` if none set. Exposed primarily so alternative transports (e.g. the Lambda adapter) can invoke it outside the HTTP server path. + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1504. + +*** + +### getGlobalData + +#### Signature + +```java +public Map getGlobalData() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 796. + +*** + +### getHost + +#### Signature + +```java +public String getHost() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1371. + +*** + +### getLanguageParams + +Read the per-language `params` dict for a previously-added language. +Returns null when the code is unknown or params were never set. +Mirrors Python's get\_language\_params. + +**Decorators:** `@SuppressWarnings` + +#### Signature + +```java +public Map getLanguageParams(String code) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 743. + +*** + +### getMcpServers + +Get configured MCP servers (read-only). + +#### Signature + +```java +public List> getMcpServers() +``` + +#### Returns + +`List>` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1183. + +*** + +### getName + +#### Signature + +```java +public String getName() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1369. + +*** + +### getNormalisedRoute + +Return the agent's route normalised to an empty string for the +root route or `"/"` otherwise. + +Exposed so non-HTTP +transports can construct paths correctly. + +#### Signature + +```java +public String getNormalisedRoute() +``` + +#### Returns + +`String` — normalised route prefix. + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1522. + +*** + +### getOnSummaryCallback + +#### Signature + +```java +public BiConsumer,Map> getOnSummaryCallback() +``` + +#### Returns + +`BiConsumer,Map>` — the post-prompt summary callback, or `null`. + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1511. + +*** + +### getPom + +Read-only snapshot of the agent's POM as a typed +`PromptObjectModel`. + +Wraps the internal map-based section list so +callers get the rich Section / render API without mutating internal +state. + +<p>Python parity: `agent.pom` instance attribute +(agent_base.py line 209). Returns `null` when `usePom` is +false (mirroring Python's = None). + +#### Signature + +```java +public PromptObjectModel getPom() +``` + +#### Returns + +`PromptObjectModel` — typed POM wrapper, or `null` when POM mode is off. + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 484. + +*** + +### getPort + +#### Signature + +```java +public int getPort() +``` + +#### Returns + +`int` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1372. + +*** + +### getPostPrompt + +Returns the post-prompt text that was set via setPostPrompt, or null +when none has been set. + +Mirrors Python's PromptManager.get\_post\_prompt / +PromptMixin.get\_post\_prompt — used by SWML rendering when a post-prompt +is configured. + +#### Signature + +```java +public String getPostPrompt() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 438. + +*** + +### getPrompt + +#### Signature + +```java +public Object getPrompt() +``` + +#### Returns + +`Object` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 421. + +*** + +### getRawPrompt + +Returns the raw prompt text whatever setPromptText stored, or null when +no raw prompt has been set. + +Distinct from getPrompt() which may return +a POM map when usePom is true. + +Mirrors Python's PromptManager.get\_raw\_prompt. + +#### Signature + +```java +public String getRawPrompt() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 449. + +*** + +### getRoute + +#### Signature + +```java +public String getRoute() +``` + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1370. + +*** + +### getSigningKey + +#### Signature + +```java +public String getSigningKey() +``` + +#### Returns + +`String` — the configured Signing Key for SignalWire webhook signature validation (resolved from the builder or `SIGNALWIRE_SIGNING_KEY` env), or `null` when validation is disabled. + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1382. + +*** + +### getSipUsernames + +#### Signature + +```java +public Set getSipUsernames() +``` + +#### Returns + +`Set` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1308. + +*** + +### getSkillManager + +#### Signature + +```java +public SkillManager getSkillManager() +``` + +#### Returns + +`SkillManager` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1525. + +*** + +### getTools + +#### Signature + +```java +public Map getTools() +``` + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 625. + +*** + +### handleMcpRequest + +Handle an MCP JSON-RPC 2.0 request. + +Returns the response map. + +#### Signature + +```java +public Map handleMcpRequest(Map body) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1211. + +*** + +### hasSkill + +Typed overload of `#hasSkill(String)` (see Map)). + +#### Signature + + + + ```java + public boolean hasSkill(String skillName) + ``` + + + + ```java + public boolean hasSkill(SkillName skillName) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`boolean` + +#### Returns (Overload 2) + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1069. + +*** + +### hasTool + +#### Signature + +```java +public boolean hasTool(String name) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 629. + +*** + +### isMcpServerEnabled + +Check if MCP server endpoint is enabled. + +#### Signature + +```java +public boolean isMcpServerEnabled() +``` + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1176. + +*** + +### isSipRoutingEnabled + +#### Signature + +```java +public boolean isSipRoutingEnabled() +``` + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1307. + +*** + +### isTrustProxyForSignature + +#### Signature + +```java +public boolean isTrustProxyForSignature() +``` + +#### Returns + +`boolean` — whether webhook URL reconstruction trusts `X-Forwarded-Proto` / `X-Forwarded-Host` headers during signature validation. + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1389. + +*** + +### listSkills + +#### Signature + +```java +public List listSkills() +``` + +#### Returns + +`List` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1065. + +*** + +### manualSetProxyUrl + +#### Signature + +```java +public AgentBase manualSetProxyUrl(String url) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1097. + +*** + +### onDebugEvent + +#### Signature + +```java +public AgentBase onDebugEvent(Consumer> callback) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1360. + +*** + +### onFunctionCall + +#### Signature + +```java +public FunctionResult onFunctionCall( + String name, + Map args, + Map rawData +) +``` + +#### Parameters + + + + + + + +#### Returns + +`FunctionResult` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 600. + +*** + +### onSummary + +#### Signature + +```java +public AgentBase onSummary( + BiConsumer,Map> callback +) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1355. + +*** + +### promptAddSection + +#### Signature + + + + ```java + public AgentBase promptAddSection( + String title, + String body, + List bullets + ) + ``` + + + + ```java + public AgentBase promptAddSection(String title, String body) + ``` + + + +#### Parameters (Overload 1) + + + + + + + +#### Parameters (Overload 2) + + + + + +#### Returns (Overload 1) + +`AgentBase` + +#### Returns (Overload 2) + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 368. + +*** + +### promptAddSubsection + +#### Signature + +```java +public AgentBase promptAddSubsection( + String parentTitle, + String title, + String body +) +``` + +#### Parameters + + + + + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 384. + +*** + +### promptAddToSection + +#### Signature + +```java +public AgentBase promptAddToSection(String title, List bullets) +``` + +#### Parameters + + + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 400. + +*** + +### promptHasSection + +#### Signature + +```java +public boolean promptHasSection(String title) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 412. + +*** + +### registerAdditionalRoutes + +**Decorators:** `@Override` + +#### Signature + +```java +protected void registerAdditionalRoutes( + com.sun.net.httpserver.HttpServer server +) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1962. + +*** + +### registerSipUsername + +#### Signature + +```java +public AgentBase registerSipUsername(String username) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1298. + +*** + +### registerSwaigFunction + +**Decorators:** `@Override` + +#### Signature + +```java +public AgentBase registerSwaigFunction(Map swaigFunc) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 588. + +*** + +### removeSkill + +Typed overload of `#removeSkill(String)` (see Map)). + +#### Signature + + + + ```java + public AgentBase removeSkill(String skillName) + ``` + + + + ```java + public AgentBase removeSkill(SkillName skillName) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`AgentBase` + +#### Returns (Overload 2) + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1055. + +*** + +### renderMainSwml + +**Decorators:** `@Override` + +#### Signature + +```java +protected Map renderMainSwml(HttpExchange exchange) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1930. + +*** + +### renderSwml + +Render the complete SWML document. +5 phases: pre-answer, answer, post-answer, AI, post-AI + +#### Signature + +```java +public Map renderSwml(String baseUrl) +``` + +#### Parameters + + + +#### Returns + +`Map` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1535. + +*** + +### renderSwmlJson + +Render SWML as a JSON string. + +#### Signature + +```java +public String renderSwmlJson(String baseUrl) +``` + +#### Parameters + + + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1726. + +*** + +### resetContexts + +Remove all contexts, returning the agent to a no-contexts state. +This is a convenience wrapper around `defineContexts().reset()`. +Use it in a dynamic config callback when you need to rebuild +contexts from scratch for a specific request. + +#### Signature + +```java +public AgentBase resetContexts() +``` + +#### Returns + +`AgentBase` — this agent for chaining. + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1029. + +*** + +### run + +Start the agent server. + +Equivalent to `#serve()` (inherited). + +#### Signature + +```java +public void run() +``` + +#### Throws + +- `IOException` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 2088. + +*** + +### setDynamicConfigCallback + +#### Signature + +```java +public AgentBase setDynamicConfigCallback(DynamicConfigCallback callback) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1082. + +*** + +### setFunctionIncludes + +#### Signature + +```java +public AgentBase setFunctionIncludes(List> includes) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 947. + +*** + +### setGlobalData + +#### Signature + +```java +public AgentBase setGlobalData(Map data) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 785. + +*** + +### setInternalFillers + +#### Signature + +```java +public AgentBase setInternalFillers(List> fillers) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 836. + +*** + +### setInternalFillersMap + +Set internal fillers for native SWAIG functions. + +<p>Internal fillers are short phrases the AI agent speaks (via TTS) +while an internal/native function is running, so the caller doesn't +hear dead air during transitions or background work. + +<p>Supported function names (match the SWAIGInternalFiller schema): +`hangup`, `check_time`, `wait_for_user`, +`wait_seconds`, `adjust_response_latency`, +`next_step`, `change_context`, `get_visual_input`, +`get_ideal_strategy`. + +See +`#SUPPORTED_INTERNAL_FILLER_NAMES`. + +<p>Notably NOT supported: `change_step`, `gather_submit`, or +arbitrary user-defined SWAIG function names. The runtime only honors +fillers for the names listed above; everything else is silently +ignored at the SWML level. This method warns at registration time if +you pass an unknown name so you catch the typo early. + +#### Signature + +```java +public AgentBase setInternalFillersMap( + Map>> fillers +) +``` + +#### Parameters + + + map of → language\_code → phrases. + + +#### Returns + +`AgentBase` — this agent for chaining. + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 865. + +*** + +### setLanguageParams + +Set (or replace) the per-language `params` dict on an already-added +language. + +Empty/null params removes the key. Unknown code is a no-op. +Returns self for chaining. Mirrors Python's set\_language\_params. + +#### Signature + +```java +public AgentBase setLanguageParams(String code, Map params) +``` + +#### Parameters + + + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 724. + +*** + +### setLanguages + +#### Signature + +```java +public AgentBase setLanguages(List> langs) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 754. + +*** + +### setNativeFunctions + +#### Signature + +```java +public AgentBase setNativeFunctions(List funcs) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 800. + +*** + +### setParam + +#### Signature + +```java +public AgentBase setParam(String key, Object value) +``` + +#### Parameters + + + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 775. + +*** + +### setParams + +#### Signature + +```java +public AgentBase setParams(Map newParams) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 780. + +*** + +### setPostPrompt + +#### Signature + +```java +public AgentBase setPostPrompt(String text) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 363. + +*** + +### setPostPromptLlmParams + +#### Signature + +```java +public AgentBase setPostPromptLlmParams(Map llmParams) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 959. + +*** + +### setPostPromptUrl + +#### Signature + +```java +public AgentBase setPostPromptUrl(String url) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1092. + +*** + +### setPromptLlmParams + +#### Signature + +```java +public AgentBase setPromptLlmParams(Map llmParams) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 953. + +*** + +### setPromptPom + +Sets the prompt as a list of POM section maps. + +Each section map +supports keys "title", "body", "bullets", "numbered", +"numbered\_bullets", and "subsections". Switches the agent to POM mode. + +Mirrors Python's PromptManager.set\_prompt\_pom — accepts a list of +section dicts and stores them in pomSections. + +#### Signature + +```java +public AgentBase setPromptPom(List> pom) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 461. + +*** + +### setPromptText + +#### Signature + +```java +public AgentBase setPromptText(String text) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 357. + +*** + +### setPronunciations + +#### Signature + +```java +public AgentBase setPronunciations(List> prons) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 769. + +*** + +### setWebHookUrl + +#### Signature + +```java +public AgentBase setWebHookUrl(String url) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1087. + +*** + +### updateGlobalData + +#### Signature + +```java +public AgentBase updateGlobalData(Map data) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 791. + +*** + +### validateSignedWebhook + +Override the `Service` hook to enforce SignalWire webhook +signature validation when a `#signingKey` is configured. + +Returns +`true` (no-op) when `signingKey` is unset; per +porting-sdk/webhooks.md, the AgentBase MUST NOT silently reject +unsigned requests when no key is configured (a prominent startup +warning is the documented behavior instead — emitted in +`Builder#build()`). + +<p>The signature header is read from `X-SignalWire-Signature` +(or its `X-Twilio-Signature` legacy alias). The URL is +reconstructed from proxy headers / `SWML_PROXY_URL_BASE` / +the request itself, and the validator is called with the raw body +bytes the caller already captured. + +**Decorators:** `@Override` + +#### Signature + +```java +protected boolean validateSignedWebhook( + com.sun.net.httpserver.HttpExchange exchange, + String rawBody +) +``` + +#### Parameters + + + the inbound HttpExchange. + + + + the raw UTF-8 body string that was already read from the exchange. + + +#### Returns + +`boolean` — `true` when validation passes (or no key is configured). + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1426. + +*** + +### validateToolToken + +Validate a per-call SWAIG-function token. + +Returns false when the +function is not registered, when the SessionManager rejects the +token, or on any underlying exception. + +<p>Python parity: `state_mixin.StateMixin.validate_tool_token` +— rejects unknown functions up-front and swallows exceptions. + +#### Signature + +```java +public boolean validateToolToken( + String functionName, + String token, + String callId +) +``` + +#### Parameters + + + + + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 656. + +*** + +### validateWebhook + +Public delegate around `#validateSignedWebhook` so external +front-doors (e.g. + +`com.signalwire.sdk.server.AgentServer`, a +Lambda adapter, etc.) can run the same logic the in-process HTTP +server does. Mirrors the no-op-when-unset behavior described in +porting-sdk/webhooks.md. + +#### Signature + +```java +public boolean validateWebhook( + com.sun.net.httpserver.HttpExchange exchange, + String rawBody +) +``` + +#### Parameters + + + the inbound HttpExchange. + + + + raw UTF-8 body string. + + +#### Returns + +`boolean` — `true` when validation passes (or no key is configured). + +#### Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 1402. + +## Source + +[`src/main/java/com/signalwire/sdk/agent/AgentBase.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/agent/AgentBase.java) + +Line 55. diff --git a/fern/products/sdk-reference/java/agents/cli/cli/index.mdx b/fern/products/sdk-reference/java/agents/cli/cli/index.mdx deleted file mode 100644 index eaaed05a07..0000000000 --- a/fern/products/sdk-reference/java/agents/cli/cli/index.mdx +++ /dev/null @@ -1,22 +0,0 @@ ---- -slug: "/reference/java/agents/cli/cli" -title: "cli" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "module" - language: "java" - qualified_name: "agents.cli.cli" - parent: "com.signalwire.sdk.cli" - module: "agents.cli" ---- -# `cli` - -## Classes - - - - CLI tool for testing SWAIG functions against an agent. <p> Uses only JDK classes (java.net.http.HttpClient) -- no external dependencies. <p> Two modes: <ul> <li><b>URL mode</b> — hit a running agent HTTP server.</li> <li><b>Simulation mode</b> — \ loads the agent class directly and routes invocation through the matching serverless adapter (e.g. - - diff --git a/fern/products/sdk-reference/java/agents/cli/cli/swaig-test/index.mdx b/fern/products/sdk-reference/java/agents/cli/cli/swaig-test/index.mdx deleted file mode 100644 index 22ba49d22d..0000000000 --- a/fern/products/sdk-reference/java/agents/cli/cli/swaig-test/index.mdx +++ /dev/null @@ -1,136 +0,0 @@ ---- -slug: "/reference/java/agents/cli/cli/swaig-test" -title: "SwaigTest" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.cli.SwaigTest" - parent: "agents.cli.cli" - module: "agents.cli.cli" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/SwaigTest.java" - visibility: "public" ---- -# `SwaigTest` - -CLI tool for testing SWAIG functions against an agent. - -<p> -Uses only JDK classes (java.net.http.HttpClient) -- no external dependencies. -<p> -Two modes: -<ul> - <li><b>URL mode</b> — hit a running agent HTTP server.</li> - <li><b>Simulation mode</b> — <platform> loads the - agent class directly and routes invocation through the matching - serverless adapter (e.g. - -`LambdaAgentHandler`) instead of -the HTTP server. Uses an injected `EnvProvider` to mask the -real process env with simulated values, since Java cannot mutate -`System#getenv()`.</li> - -</ul> -<p> -Usage: -<pre> - swaig-test --url http://user:pass@localhost:3000 --list-tools - swaig-test --url http://user:pass@localhost:3000 --dump-swml - swaig-test --url http://user:pass@localhost:3000 --exec tool_name --param key=value - swaig-test <agent-class> --simulate-serverless lambda --dump-swml - swaig-test <agent-class> --simulate-serverless lambda --exec tool_name --param k=v - swaig-test <agent-class> --simulate-serverless lambda -</pre> - -## Signature - -```java -public class SwaigTest -``` - -## Methods - -### \ - -#### Signature - -```java -public () -``` - -#### Source - -[`src/main/java/com/signalwire/sdk/cli/SwaigTest.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/SwaigTest.java) - -*** - -### main - -**Modifiers:** `static` - -#### Signature - -```java -public static void main(String[] args) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/cli/SwaigTest.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/SwaigTest.java) - -Line 75. - -*** - -### run - -Run the CLI and return the exit code. - -Extracted so tests can drive -`main` without calling `System#exit(int)`. - -**Modifiers:** `static` - -#### Signature - - - - ```java - public static int run(String[] args) - ``` - - - - ```java - private void run() - ``` - - - -#### Parameters (Overload 1) - - - command-line arguments. - - -#### Returns (Overload 1) - -`int` — 0 on success, non-zero on error. - -#### Source - -[`src/main/java/com/signalwire/sdk/cli/SwaigTest.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/SwaigTest.java) - -Line 87. - -## Source - -[`src/main/java/com/signalwire/sdk/cli/SwaigTest.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/SwaigTest.java) - -Line 44. diff --git a/fern/products/sdk-reference/java/agents/cli/index.mdx b/fern/products/sdk-reference/java/agents/cli/index.mdx index cdb925986e..020f3ba9df 100644 --- a/fern/products/sdk-reference/java/agents/cli/index.mdx +++ b/fern/products/sdk-reference/java/agents/cli/index.mdx @@ -5,24 +5,137 @@ sdk_label: "Java SDK" icon: "java" lustri: auto_generated: true - kind: "module" + kind: "class" language: "java" qualified_name: "com.signalwire.sdk.cli" parent: "agents" module: "agents" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/SwaigTest.java" --- # `cli` +CLI tool for testing SWAIG functions against an agent. + +<p> +Uses only JDK classes (java.net.http.HttpClient) -- no external dependencies. +<p> +Two modes: +<ul> + <li><b>URL mode</b> — hit a running agent HTTP server.</li> + <li><b>Simulation mode</b> — <platform> loads the + agent class directly and routes invocation through the matching + serverless adapter (e.g. + +`LambdaAgentHandler`) instead of +the HTTP server. Uses an injected `EnvProvider` to mask the +real process env with simulated values, since Java cannot mutate +`System#getenv()`.</li> + +</ul> +<p> +Usage: +<pre> + swaig-test --url http://user:pass@localhost:3000 --list-tools + swaig-test --url http://user:pass@localhost:3000 --dump-swml + swaig-test --url http://user:pass@localhost:3000 --exec tool_name --param key=value + swaig-test <agent-class> --simulate-serverless lambda --dump-swml + swaig-test <agent-class> --simulate-serverless lambda --exec tool_name --param k=v + swaig-test <agent-class> --simulate-serverless lambda +</pre> + ## Signature ```java -package com.signalwire.sdk.cli +public class SwaigTest ``` ## Modules - - + +## Methods + +### \ + +#### Signature + +```java +public () +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/cli/SwaigTest.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/SwaigTest.java) + +*** + +### main + +**Modifiers:** `static` + +#### Signature + +```java +public static void main(String[] args) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/cli/SwaigTest.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/SwaigTest.java) + +Line 75. + +*** + +### run + +Run the CLI and return the exit code. + +Extracted so tests can drive +`main` without calling `System#exit(int)`. + +**Modifiers:** `static` + +#### Signature + + + + ```java + public static int run(String[] args) + ``` + + + + ```java + private void run() + ``` + + + +#### Parameters (Overload 1) + + + command-line arguments. + + +#### Returns (Overload 1) + +`int` — 0 on success, non-zero on error. + +#### Source + +[`src/main/java/com/signalwire/sdk/cli/SwaigTest.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/SwaigTest.java) + +Line 87. + +## Source + +[`src/main/java/com/signalwire/sdk/cli/SwaigTest.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/SwaigTest.java) + +Line 44. diff --git a/fern/products/sdk-reference/java/agents/cli/simulation/index.mdx b/fern/products/sdk-reference/java/agents/cli/simulation/index.mdx index 9f1437c4e1..3b55f8ab17 100644 --- a/fern/products/sdk-reference/java/agents/cli/simulation/index.mdx +++ b/fern/products/sdk-reference/java/agents/cli/simulation/index.mdx @@ -13,8 +13,10 @@ lustri: --- # `simulation` -## Modules +## Classes - + + Build a layered `EnvProvider` that overlays simulated serverless environment values on top of the real process environment. <p>Java cannot mutate `System#getenv()` at runtime (the map it returns is an immutable snapshot of the OS env). + diff --git a/fern/products/sdk-reference/java/agents/cli/simulation/simulation/index.mdx b/fern/products/sdk-reference/java/agents/cli/simulation/simulation/index.mdx index 90258349e3..4bdb239802 100644 --- a/fern/products/sdk-reference/java/agents/cli/simulation/simulation/index.mdx +++ b/fern/products/sdk-reference/java/agents/cli/simulation/simulation/index.mdx @@ -5,30 +5,351 @@ sdk_label: "Java SDK" icon: "java" lustri: auto_generated: true - kind: "module" + kind: "class" language: "java" qualified_name: "com.signalwire.sdk.cli.simulation" parent: "agents.cli.simulation" module: "agents.cli.simulation" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java" --- # `simulation` +Build a layered `EnvProvider` that overlays simulated serverless +environment values on top of the real process environment. + +<p>Java cannot mutate `System#getenv()` at runtime (the map it +returns is an immutable snapshot of the OS env). + +To implement the +\--simulate-serverless flag in the same spirit as +Python's `mock_env.py`, we therefore cannot "set env vars then +clean up" — we instead compose an injectable `EnvProvider` and +thread it through every code path in the SDK that reads env vars. + +<p>Accepts only the platforms the port actually implements. Ports that +add CGI / GCF / Azure support later should extend +`#presetFor(Platform)`. + +<p>Mirrors the clear-and-warn semantics of Python's +`_clear_conflicting_env`: `SWML_PROXY_URL_BASE` is masked +in the simulated view so that platform-specific URL generation is +actually exercised. If the caller's real OS env has +`SWML_PROXY_URL_BASE` set, the simulator does <b>not</b> mutate +the real env — it simply returns `null` for that key through the +layered `EnvProvider`. Callers that want to surface the mismatch +to the user can check `#proxyUrlBaseMaskedFromRealEnv()`. + +**Modifiers:** `final` + ## Signature ```java -package com.signalwire.sdk.cli.simulation +public final class ServerlessSimulator +``` + +## Methods + +### \ + +Build a simulator for the given platform using the real process +environment as the fallback layer. + +#### Signature + + + + ```java + public (Platform platform) + ``` + + + + ```java + public ( + Platform platform, + EnvProvider realEnv, + Map overrides + ) + ``` + + + +#### Parameters (Overload 1) + + + platform to simulate. + + +#### Parameters (Overload 2) + + + platform to simulate. + + + + fallback env provider (usually `EnvProvider#SYSTEM`). + + + + user-supplied overrides on top of the platform preset. + + +#### Source + +[`src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java) + +Line 100. + +*** + +### buildEnvProvider + +Build the layered `EnvProvider`. + +Precedence is: + +<ol> + <li>masked keys — always return `null`.</li> + <li>simulated values — overlaid on the real env.</li> + <li>Real env — everything else passes through.</li> +</ol> + +#### Signature + +```java +public EnvProvider buildEnvProvider() +``` + +#### Returns + +`EnvProvider` — layered env provider. + +#### Source + +[`src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java) + +Line 199. + +*** + +### getMaskedKeys + +#### Signature + +```java +public Set getMaskedKeys() ``` -## Classes +#### Returns + +`Set` — an immutable view of the keys that are masked (returned as `null`) regardless of what the real env has for them. + +#### Source + +[`src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java) + +Line 174. + +*** + +### getPlatform + +#### Signature + +```java +public Platform getPlatform() +``` + +#### Returns + +`Platform` — the simulated platform. + +#### Source + +[`src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java) + +Line 158. + +*** + +### getSimulatedEnv + +#### Signature + +```java +public Map getSimulatedEnv() +``` + +#### Returns + +`Map` — the map of simulated values layered on top of the real env. The returned map is a defensive copy. + +#### Source + +[`src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java) + +Line 166. + +*** + +### parsePlatform + +Parse the CLI-string form of a platform. + +Accepts only values this +port supports; unknown strings throw `IllegalArgumentException` +so the CLI can surface a clear error instead of silently falling +back. + +**Modifiers:** `static` + +#### Signature + +```java +public static Platform parsePlatform(String s) +``` + +#### Parameters + + + user-supplied platform string. + + +#### Returns + +`Platform` — the matching `Platform`. + +#### Throws + +- `IllegalArgumentException` — for unsupported platforms. + +#### Source + +[`src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java) + +Line 80. + +*** + +### presetFor + +Default env-var preset for a platform, mirroring Python's +`ServerlessSimulator.PLATFORM_PRESETS`. + +**Modifiers:** `static` + +#### Signature + +```java +public static Map presetFor(Platform platform) +``` + +#### Parameters + + + platform. + + +#### Returns + +`Map` — the preset map (never null). + +#### Source + +[`src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java) + +Line 142. + +*** + +### proxyUrlBaseMaskedFromRealEnv + +#### Signature + +```java +public boolean proxyUrlBaseMaskedFromRealEnv() +``` + +#### Returns + +`boolean` — `true` if the real process env has `SWML_PROXY_URL_BASE` set — i.e. the simulated view is hiding a real value the user might not have intended. The CLI uses this to print a warning that mirrors Python's behaviour. + +#### Source + +[`src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java) + +Line 184. + +## Enums + +### Platform + +Platforms the Java port supports simulating today. + +#### Signature + +```java +public enum Platform +``` + +#### Variants + + + AWS Lambda. + + +#### Methods + +##### valueOf + +**Modifiers:** `static` + +###### Signature + +```java +public static Platform valueOf(String name) +``` + +###### Parameters + + + +###### Returns + +`Platform` + +###### Source + +[`src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java) + +*** + +##### values + +**Modifiers:** `static` + +###### Signature + +```java +public static Platform[] values() +``` + +###### Returns + +`Platform[]` + +###### Source + +[`src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java) + +#### Source + +[`src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java) + +Line 39. - - - Build a layered `EnvProvider` that overlays simulated serverless environment values on top of the real process environment. <p>Java cannot mutate `System#getenv()` at runtime (the map it returns is an immutable snapshot of the OS env). - - +## Source -## Modules +[`src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java) - - - +Line 36. diff --git a/fern/products/sdk-reference/java/agents/cli/simulation/simulation/serverless-simulator/index.mdx b/fern/products/sdk-reference/java/agents/cli/simulation/simulation/serverless-simulator/index.mdx deleted file mode 100644 index d77f94fe8a..0000000000 --- a/fern/products/sdk-reference/java/agents/cli/simulation/simulation/serverless-simulator/index.mdx +++ /dev/null @@ -1,288 +0,0 @@ ---- -slug: "/reference/java/agents/cli/simulation/simulation/serverless-simulator" -title: "ServerlessSimulator" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.cli.simulation.ServerlessSimulator" - parent: "com.signalwire.sdk.cli.simulation" - module: "agents.cli.simulation.simulation" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java" - visibility: "public" ---- -# `ServerlessSimulator` - -Build a layered `EnvProvider` that overlays simulated serverless -environment values on top of the real process environment. - -<p>Java cannot mutate `System#getenv()` at runtime (the map it -returns is an immutable snapshot of the OS env). - -To implement the -\--simulate-serverless flag in the same spirit as -Python's `mock_env.py`, we therefore cannot "set env vars then -clean up" — we instead compose an injectable `EnvProvider` and -thread it through every code path in the SDK that reads env vars. - -<p>Accepts only the platforms the port actually implements. Ports that -add CGI / GCF / Azure support later should extend -`#presetFor(Platform)`. - -<p>Mirrors the clear-and-warn semantics of Python's -`_clear_conflicting_env`: `SWML_PROXY_URL_BASE` is masked -in the simulated view so that platform-specific URL generation is -actually exercised. If the caller's real OS env has -`SWML_PROXY_URL_BASE` set, the simulator does <b>not</b> mutate -the real env — it simply returns `null` for that key through the -layered `EnvProvider`. Callers that want to surface the mismatch -to the user can check `#proxyUrlBaseMaskedFromRealEnv()`. - -**Modifiers:** `final` - -## Signature - -```java -public final class ServerlessSimulator -``` - -## Methods - -### \ - -Build a simulator for the given platform using the real process -environment as the fallback layer. - -#### Signature - - - - ```java - public (Platform platform) - ``` - - - - ```java - public ( - Platform platform, - EnvProvider realEnv, - Map overrides - ) - ``` - - - -#### Parameters (Overload 1) - - - platform to simulate. - - -#### Parameters (Overload 2) - - - platform to simulate. - - - - fallback env provider (usually `EnvProvider#SYSTEM`). - - - - user-supplied overrides on top of the platform preset. - - -#### Source - -[`src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java) - -Line 100. - -*** - -### buildEnvProvider - -Build the layered `EnvProvider`. - -Precedence is: - -<ol> - <li>masked keys — always return `null`.</li> - <li>simulated values — overlaid on the real env.</li> - <li>Real env — everything else passes through.</li> -</ol> - -#### Signature - -```java -public EnvProvider buildEnvProvider() -``` - -#### Returns - -`EnvProvider` — layered env provider. - -#### Source - -[`src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java) - -Line 199. - -*** - -### getMaskedKeys - -#### Signature - -```java -public Set getMaskedKeys() -``` - -#### Returns - -`Set` — an immutable view of the keys that are masked (returned as `null`) regardless of what the real env has for them. - -#### Source - -[`src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java) - -Line 174. - -*** - -### getPlatform - -#### Signature - -```java -public Platform getPlatform() -``` - -#### Returns - -`Platform` — the simulated platform. - -#### Source - -[`src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java) - -Line 158. - -*** - -### getSimulatedEnv - -#### Signature - -```java -public Map getSimulatedEnv() -``` - -#### Returns - -`Map` — the map of simulated values layered on top of the real env. The returned map is a defensive copy. - -#### Source - -[`src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java) - -Line 166. - -*** - -### parsePlatform - -Parse the CLI-string form of a platform. - -Accepts only values this -port supports; unknown strings throw `IllegalArgumentException` -so the CLI can surface a clear error instead of silently falling -back. - -**Modifiers:** `static` - -#### Signature - -```java -public static Platform parsePlatform(String s) -``` - -#### Parameters - - - user-supplied platform string. - - -#### Returns - -`Platform` — the matching `Platform`. - -#### Throws - -- `IllegalArgumentException` — for unsupported platforms. - -#### Source - -[`src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java) - -Line 80. - -*** - -### presetFor - -Default env-var preset for a platform, mirroring Python's -`ServerlessSimulator.PLATFORM_PRESETS`. - -**Modifiers:** `static` - -#### Signature - -```java -public static Map presetFor(Platform platform) -``` - -#### Parameters - - - platform. - - -#### Returns - -`Map` — the preset map (never null). - -#### Source - -[`src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java) - -Line 142. - -*** - -### proxyUrlBaseMaskedFromRealEnv - -#### Signature - -```java -public boolean proxyUrlBaseMaskedFromRealEnv() -``` - -#### Returns - -`boolean` — `true` if the real process env has `SWML_PROXY_URL_BASE` set — i.e. the simulated view is hiding a real value the user might not have intended. The CLI uses this to print a warning that mirrors Python's behaviour. - -#### Source - -[`src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java) - -Line 184. - -## Source - -[`src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java) - -Line 36. diff --git a/fern/products/sdk-reference/java/agents/cli/simulation/simulation/serverless-simulator/index__2.mdx b/fern/products/sdk-reference/java/agents/cli/simulation/simulation/serverless-simulator/index__2.mdx deleted file mode 100644 index d4d10c18f4..0000000000 --- a/fern/products/sdk-reference/java/agents/cli/simulation/simulation/serverless-simulator/index__2.mdx +++ /dev/null @@ -1,82 +0,0 @@ ---- -slug: "/reference/java/agents/cli/simulation/simulation/serverless-simulator/index__2" -title: "ServerlessSimulator" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "module" - language: "java" - qualified_name: "agents.cli.simulation.simulation.ServerlessSimulator" - parent: "com.signalwire.sdk.cli.simulation" - module: "agents.cli.simulation.simulation" ---- -# `ServerlessSimulator` - -## Enums - -### Platform - -Platforms the Java port supports simulating today. - -#### Signature - -```java -public enum Platform -``` - -#### Variants - - - AWS Lambda. - - -#### Methods - -##### valueOf - -**Modifiers:** `static` - -###### Signature - -```java -public static Platform valueOf(String name) -``` - -###### Parameters - - - -###### Returns - -`Platform` - -###### Source - -[`src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java) - -*** - -##### values - -**Modifiers:** `static` - -###### Signature - -```java -public static Platform[] values() -``` - -###### Returns - -`Platform[]` - -###### Source - -[`src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java) - -#### Source - -[`src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/cli/simulation/ServerlessSimulator.java) - -Line 39. diff --git a/fern/products/sdk-reference/java/agents/index.mdx b/fern/products/sdk-reference/java/agents/index.mdx index e04bf5a683..3e38889339 100644 --- a/fern/products/sdk-reference/java/agents/index.mdx +++ b/fern/products/sdk-reference/java/agents/index.mdx @@ -14,28 +14,36 @@ lustri: ## Classes + + Base class for all SignalWire AI agents. Composes prompt management, tool registration, AI config, HTTP serving, skills integration, and SWML rendering. Use the builder pattern: <pre> var agent = AgentBase.builder() .name("my-agent") .route("/") .port(3000) .build(); </pre> + + + + CLI tool for testing SWAIG functions against an agent. <p> Uses only JDK classes (java.net.http.HttpClient) -- no external dependencies. <p> Two modes: <ul> <li><b>URL mode</b> — hit a running agent HTTP server.</li> <li><b>Simulation mode</b> — \ loads the agent class directly and routes invocation through the matching serverless adapter (e.g. + + Fluent builder for creating SWAIG data\_map configurations. <p> DataMap tools execute on SignalWire servers without requiring webhook endpoints. Supports variable expansion: `${args.param`\}, `${response.field`\}, `${global_data.key`\}, `${foreach.item`\}. <p> All methods return `this` for fluent chaining. + + + Resolve the base URL of a SignalWire agent running as an AWS Lambda function, from standard Lambda environment variables. <p>Precedence — highest first: <ol> <li>`AWS_LAMBDA_FUNCTION_URL` — the Function URL explicitly assigned to this Lambda (the only variant that is guaranteed correct; synthetic fallbacks below assume the Function URL service was used and the function name matches the public subdomain, which is typically true but not guaranteed).</li> <li>Synthesised `https://{AWS_LAMBDA_FUNCTION_NAME`.lambda-url.\{AWS\_REGION\}.on.aws\} — built when the Function URL env var is not present but the standard Lambda identity variables are.</li> </ol> <p>This class returns a bare origin (scheme + host). + + + + Multi-agent hosting server. Registers multiple agents on different routes and dispatches requests accordingly. + ## Modules - - - - - - - - diff --git a/fern/products/sdk-reference/java/agents/runtime/index.mdx b/fern/products/sdk-reference/java/agents/runtime/index.mdx index d08c0920de..27ceadc7e3 100644 --- a/fern/products/sdk-reference/java/agents/runtime/index.mdx +++ b/fern/products/sdk-reference/java/agents/runtime/index.mdx @@ -5,18 +5,46 @@ sdk_label: "Java SDK" icon: "java" lustri: auto_generated: true - kind: "module" + kind: "class" language: "java" qualified_name: "com.signalwire.sdk.runtime" parent: "agents" module: "agents" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/LambdaUrlResolver.java" --- # `runtime` +Resolve the base URL of a SignalWire agent running as an AWS Lambda +function, from standard Lambda environment variables. + +<p>Precedence — highest first: +<ol> + <li>`AWS_LAMBDA_FUNCTION_URL` — the Function URL explicitly + assigned to this Lambda (the only variant that is guaranteed + correct; synthetic fallbacks below assume the Function URL + service was used and the function name matches the public + subdomain, which is typically true but not guaranteed).</li> + <li>Synthesised `https://{AWS_LAMBDA_FUNCTION_NAME`.lambda-url.{AWS_REGION}.on.aws} + — built when the Function URL env var is not present but the + standard Lambda identity variables are.</li> +</ol> + +<p>This class returns a bare origin (scheme + host). + +It intentionally +does NOT append any route — callers (e.g. `AgentBase.buildWebhookUrl`) +are responsible for appending the agent's route + endpoint path. This +keeps the route-preservation invariant intact regardless of which +source produced the base URL. + +<p>Mirrors the Lambda branch of `get_full_url()` in the Python SDK. + +**Modifiers:** `final` + ## Signature ```java -package com.signalwire.sdk.runtime +public final class LambdaUrlResolver ``` ## Modules @@ -26,3 +54,71 @@ package com.signalwire.sdk.runtime + +## Methods + +### \ + +Create a resolver backed by the real process environment. + +#### Signature + + + + ```java + public () + ``` + + + + ```java + public (EnvProvider env) + ``` + + + +#### Parameters (Overload 2) + + + environment variable source. + + +#### Source + +[`src/main/java/com/signalwire/sdk/runtime/LambdaUrlResolver.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/LambdaUrlResolver.java) + +Line 34. + +*** + +### resolveBaseUrl + +Return the base URL for the Lambda, without any trailing slash. + +<p>Returns `null` if none of the expected env vars are set +(which typically means we're not actually running on Lambda). + +The +caller should then fall back to its normal base-URL detection. + +#### Signature + +```java +public String resolveBaseUrl() +``` + +#### Returns + +`String` — bare origin (e.g. `https://xyz.lambda-url.us-east-1.on.aws`), or `null`. + +#### Source + +[`src/main/java/com/signalwire/sdk/runtime/LambdaUrlResolver.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/LambdaUrlResolver.java) + +Line 58. + +## Source + +[`src/main/java/com/signalwire/sdk/runtime/LambdaUrlResolver.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/LambdaUrlResolver.java) + +Line 27. diff --git a/fern/products/sdk-reference/java/agents/runtime/runtime/index.mdx b/fern/products/sdk-reference/java/agents/runtime/runtime/index.mdx index d5ffac06c2..28e431faee 100644 --- a/fern/products/sdk-reference/java/agents/runtime/runtime/index.mdx +++ b/fern/products/sdk-reference/java/agents/runtime/runtime/index.mdx @@ -13,14 +13,6 @@ lustri: --- # `runtime` -## Classes - - - - Resolve the base URL of a SignalWire agent running as an AWS Lambda function, from standard Lambda environment variables. <p>Precedence — highest first: <ol> <li>`AWS_LAMBDA_FUNCTION_URL` — the Function URL explicitly assigned to this Lambda (the only variant that is guaranteed correct; synthetic fallbacks below assume the Function URL service was used and the function name matches the public subdomain, which is typically true but not guaranteed).</li> <li>Synthesised `https://{AWS_LAMBDA_FUNCTION_NAME`.lambda-url.\{AWS\_REGION\}.on.aws\} — built when the Function URL env var is not present but the standard Lambda identity variables are.</li> </ol> <p>This class returns a bare origin (scheme + host). - - - ## Interfaces ### EnvProvider diff --git a/fern/products/sdk-reference/java/agents/runtime/runtime/lambda-url-resolver/index.mdx b/fern/products/sdk-reference/java/agents/runtime/runtime/lambda-url-resolver/index.mdx deleted file mode 100644 index 2c53085059..0000000000 --- a/fern/products/sdk-reference/java/agents/runtime/runtime/lambda-url-resolver/index.mdx +++ /dev/null @@ -1,117 +0,0 @@ ---- -slug: "/reference/java/agents/runtime/runtime/lambda-url-resolver" -title: "LambdaUrlResolver" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.runtime.LambdaUrlResolver" - parent: "agents.runtime.runtime" - module: "agents.runtime.runtime" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/LambdaUrlResolver.java" - visibility: "public" ---- -# `LambdaUrlResolver` - -Resolve the base URL of a SignalWire agent running as an AWS Lambda -function, from standard Lambda environment variables. - -<p>Precedence — highest first: -<ol> - <li>`AWS_LAMBDA_FUNCTION_URL` — the Function URL explicitly - assigned to this Lambda (the only variant that is guaranteed - correct; synthetic fallbacks below assume the Function URL - service was used and the function name matches the public - subdomain, which is typically true but not guaranteed).</li> - <li>Synthesised `https://{AWS_LAMBDA_FUNCTION_NAME`.lambda-url.{AWS_REGION}.on.aws} - — built when the Function URL env var is not present but the - standard Lambda identity variables are.</li> -</ol> - -<p>This class returns a bare origin (scheme + host). - -It intentionally -does NOT append any route — callers (e.g. `AgentBase.buildWebhookUrl`) -are responsible for appending the agent's route + endpoint path. This -keeps the route-preservation invariant intact regardless of which -source produced the base URL. - -<p>Mirrors the Lambda branch of `get_full_url()` in the Python SDK. - -**Modifiers:** `final` - -## Signature - -```java -public final class LambdaUrlResolver -``` - -## Methods - -### \ - -Create a resolver backed by the real process environment. - -#### Signature - - - - ```java - public () - ``` - - - - ```java - public (EnvProvider env) - ``` - - - -#### Parameters (Overload 2) - - - environment variable source. - - -#### Source - -[`src/main/java/com/signalwire/sdk/runtime/LambdaUrlResolver.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/LambdaUrlResolver.java) - -Line 34. - -*** - -### resolveBaseUrl - -Return the base URL for the Lambda, without any trailing slash. - -<p>Returns `null` if none of the expected env vars are set -(which typically means we're not actually running on Lambda). - -The -caller should then fall back to its normal base-URL detection. - -#### Signature - -```java -public String resolveBaseUrl() -``` - -#### Returns - -`String` — bare origin (e.g. `https://xyz.lambda-url.us-east-1.on.aws`), or `null`. - -#### Source - -[`src/main/java/com/signalwire/sdk/runtime/LambdaUrlResolver.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/LambdaUrlResolver.java) - -Line 58. - -## Source - -[`src/main/java/com/signalwire/sdk/runtime/LambdaUrlResolver.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/runtime/LambdaUrlResolver.java) - -Line 27. diff --git a/fern/products/sdk-reference/java/agents/server/index.mdx b/fern/products/sdk-reference/java/agents/server/index.mdx index 9310db09cf..cd8de70fa3 100644 --- a/fern/products/sdk-reference/java/agents/server/index.mdx +++ b/fern/products/sdk-reference/java/agents/server/index.mdx @@ -5,22 +5,454 @@ sdk_label: "Java SDK" icon: "java" lustri: auto_generated: true - kind: "module" + kind: "class" language: "java" qualified_name: "com.signalwire.sdk.server" parent: "agents" module: "agents" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java" --- # `server` +Multi-agent hosting server. +Registers multiple agents on different routes and dispatches requests accordingly. + ## Signature ```java -package com.signalwire.sdk.server +public class AgentServer implements AutoCloseable ``` -## Modules +## Inheritance + +**Implements:** `AutoCloseable` + +## Methods + +### \ + +#### Signature + + + + ```java + public () + ``` + + + + ```java + public (int port) + ``` + + + + ```java + public (String host, int port) + ``` + + + +#### Parameters (Overload 2) + + + +#### Parameters (Overload 3) + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) + +Line 61. + +*** + +### close + +`AutoCloseable` entry point so the multi-agent server can be +run inside a try-with-resources block: + +<pre>{@code +try (var server = new AgentServer(host, port)) { + server.register(agent); + server.run(); + // ... + +`AutoCloseable` entry point so the multi-agent server can be +run inside a try-with-resources block: + +<pre>(var server = new AgentServer(host, port)) { + server.register(agent); + server.run(); + // ... serve ... // close() runs here: the HTTP listener is shut down +}</pre> + +Delegates to `#stop()`, releasing the bound HTTP(S) listener and +its socket. Idempotent: harmless if the server was never started or is +already stopped. + +**Decorators:** `@Override` + +#### Signature + +```java +public void close() +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) + +Line 730. + +*** + +### enableTls + +Serve over HTTPS using an explicit PEM certificate chain and PKCS#8 +private key. + +This is the explicit-cert option that parallels Python's +ssl\_key=...); it takes +precedence over the `SWML_SSL_*` environment variables. + +<p>`certPath` must be a PEM file containing the leaf (and any +intermediate) certificates; `keyPath` must be the matching +unencrypted PKCS#8 private key in PEM form. When both resolve at +`#run()` time the server binds a +`com.sun.net.httpserver.HttpsServer`. + +#### Signature + +```java +public AgentServer enableTls(String certPath, String keyPath) +``` + +#### Parameters + + + filesystem path to the PEM certificate file + + + + filesystem path to the PEM PKCS#8 private-key file + + +#### Returns + +`AgentServer` + +#### Source + +[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) + +Line 180. + +*** + +### getAgent + +Get agent for a route. + +#### Signature + +```java +public AgentBase getAgent(String route) +``` + +#### Parameters + + + +#### Returns + +`AgentBase` + +#### Source + +[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) + +Line 129. + +*** + +### getRoutes + +List all registered routes. + +#### Signature + +```java +public Set getRoutes() +``` + +#### Returns + +`Set` + +#### Source + +[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) + +Line 136. + +*** + +### getSipRoute + +Get route for a SIP username. + +#### Signature + +```java +public String getSipRoute(String username) +``` + +#### Parameters + + + +#### Returns + +`String` + +#### Source + +[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) + +Line 304. + +*** + +### isTlsEnabled + +Reports whether the server will serve HTTPS, resolving the explicit +cert/key option and then the `SWML_SSL_*` environment variables +the same way `#run()` does. + +A configured cert/key must both point +at existing files for TLS to be considered enabled. + +#### Signature + +```java +public boolean isTlsEnabled() +``` + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) + +Line 192. + +*** + +### register + +Register an agent at a specific route. + +#### Signature + + + + ```java + public AgentServer register(AgentBase agent, String route) + ``` + + + + ```java + public AgentServer register(AgentBase agent) + ``` + + + +#### Parameters (Overload 1) + + + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`AgentServer` + +#### Returns (Overload 2) + +`AgentServer` + +#### Source + +[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) + +Line 90. + +*** + +### registerSipRoute + +Register a SIP username to route to a specific agent. + +#### Signature + +```java +public AgentServer registerSipRoute(String username, String route) +``` + +#### Parameters + + + + + +#### Returns + +`AgentServer` + +#### Source + +[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) + +Line 296. + +*** + +### run + +Start the multi-agent server. + +#### Signature + +```java +public void run() +``` + +#### Throws + +- `IOException` + +#### Source + +[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) + +Line 315. + +*** + +### serveStaticFiles + +Serve static files from a directory at a specific route. + +#### Signature + +```java +public AgentServer serveStaticFiles(String directory, String route) +``` + +#### Parameters + + + Filesystem path to the directory containing static files + + + + URL route prefix (e.g., "/static" or "/assets") + + +#### Returns + +`AgentServer` + +#### Source + +[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) + +Line 155. + +*** + +### setStaticFilesDir + +Set directory for serving static files at /static route. + +#### Signature + +```java +public AgentServer setStaticFilesDir(String dir) +``` + +#### Parameters + + + +#### Returns + +`AgentServer` + +#### Source + +[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) + +Line 143. + +*** + +### stop + +Stop the server. + +#### Signature + +```java +public void stop() +``` + +#### Source + +[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) + +Line 707. + +*** + +### unregister + +Unregister an agent from a route. + +#### Signature + +```java +public AgentServer unregister(String route) +``` + +#### Parameters + + + +#### Returns + +`AgentServer` + +#### Source + +[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) + +Line 115. + +## Source + +[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) - - - +Line 39. diff --git a/fern/products/sdk-reference/java/agents/server/server/agent-server/index.mdx b/fern/products/sdk-reference/java/agents/server/server/agent-server/index.mdx deleted file mode 100644 index cbc3802cbf..0000000000 --- a/fern/products/sdk-reference/java/agents/server/server/agent-server/index.mdx +++ /dev/null @@ -1,459 +0,0 @@ ---- -slug: "/reference/java/agents/server/server/agent-server" -title: "AgentServer" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.server.AgentServer" - parent: "agents.server.server" - module: "agents.server.server" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java" - visibility: "public" ---- -# `AgentServer` - -Multi-agent hosting server. -Registers multiple agents on different routes and dispatches requests accordingly. - -## Signature - -```java -public class AgentServer implements AutoCloseable -``` - -## Inheritance - -**Implements:** `AutoCloseable` - -## Methods - -### \ - -#### Signature - - - - ```java - public () - ``` - - - - ```java - public (int port) - ``` - - - - ```java - public (String host, int port) - ``` - - - -#### Parameters (Overload 2) - - - -#### Parameters (Overload 3) - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) - -Line 61. - -*** - -### close - -`AutoCloseable` entry point so the multi-agent server can be -run inside a try-with-resources block: - -<pre>{@code -try (var server = new AgentServer(host, port)) { - server.register(agent); - server.run(); - // ... - -`AutoCloseable` entry point so the multi-agent server can be -run inside a try-with-resources block: - -<pre>(var server = new AgentServer(host, port)) { - server.register(agent); - server.run(); - // ... serve ... // close() runs here: the HTTP listener is shut down -}</pre> - -Delegates to `#stop()`, releasing the bound HTTP(S) listener and -its socket. Idempotent: harmless if the server was never started or is -already stopped. - -**Decorators:** `@Override` - -#### Signature - -```java -public void close() -``` - -#### Source - -[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) - -Line 730. - -*** - -### enableTls - -Serve over HTTPS using an explicit PEM certificate chain and PKCS#8 -private key. - -This is the explicit-cert option that parallels Python's -ssl\_key=...); it takes -precedence over the `SWML_SSL_*` environment variables. - -<p>`certPath` must be a PEM file containing the leaf (and any -intermediate) certificates; `keyPath` must be the matching -unencrypted PKCS#8 private key in PEM form. When both resolve at -`#run()` time the server binds a -`com.sun.net.httpserver.HttpsServer`. - -#### Signature - -```java -public AgentServer enableTls(String certPath, String keyPath) -``` - -#### Parameters - - - filesystem path to the PEM certificate file - - - - filesystem path to the PEM PKCS#8 private-key file - - -#### Returns - -`AgentServer` - -#### Source - -[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) - -Line 180. - -*** - -### getAgent - -Get agent for a route. - -#### Signature - -```java -public AgentBase getAgent(String route) -``` - -#### Parameters - - - -#### Returns - -`AgentBase` - -#### Source - -[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) - -Line 129. - -*** - -### getRoutes - -List all registered routes. - -#### Signature - -```java -public Set getRoutes() -``` - -#### Returns - -`Set` - -#### Source - -[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) - -Line 136. - -*** - -### getSipRoute - -Get route for a SIP username. - -#### Signature - -```java -public String getSipRoute(String username) -``` - -#### Parameters - - - -#### Returns - -`String` - -#### Source - -[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) - -Line 304. - -*** - -### isTlsEnabled - -Reports whether the server will serve HTTPS, resolving the explicit -cert/key option and then the `SWML_SSL_*` environment variables -the same way `#run()` does. - -A configured cert/key must both point -at existing files for TLS to be considered enabled. - -#### Signature - -```java -public boolean isTlsEnabled() -``` - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) - -Line 192. - -*** - -### register - -Register an agent at a specific route. - -#### Signature - - - - ```java - public AgentServer register(AgentBase agent, String route) - ``` - - - - ```java - public AgentServer register(AgentBase agent) - ``` - - - -#### Parameters (Overload 1) - - - - - -#### Parameters (Overload 2) - - - -#### Returns (Overload 1) - -`AgentServer` - -#### Returns (Overload 2) - -`AgentServer` - -#### Source - -[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) - -Line 90. - -*** - -### registerSipRoute - -Register a SIP username to route to a specific agent. - -#### Signature - -```java -public AgentServer registerSipRoute(String username, String route) -``` - -#### Parameters - - - - - -#### Returns - -`AgentServer` - -#### Source - -[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) - -Line 296. - -*** - -### run - -Start the multi-agent server. - -#### Signature - -```java -public void run() -``` - -#### Throws - -- `IOException` - -#### Source - -[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) - -Line 315. - -*** - -### serveStaticFiles - -Serve static files from a directory at a specific route. - -#### Signature - -```java -public AgentServer serveStaticFiles(String directory, String route) -``` - -#### Parameters - - - Filesystem path to the directory containing static files - - - - URL route prefix (e.g., "/static" or "/assets") - - -#### Returns - -`AgentServer` - -#### Source - -[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) - -Line 155. - -*** - -### setStaticFilesDir - -Set directory for serving static files at /static route. - -#### Signature - -```java -public AgentServer setStaticFilesDir(String dir) -``` - -#### Parameters - - - -#### Returns - -`AgentServer` - -#### Source - -[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) - -Line 143. - -*** - -### stop - -Stop the server. - -#### Signature - -```java -public void stop() -``` - -#### Source - -[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) - -Line 707. - -*** - -### unregister - -Unregister an agent from a route. - -#### Signature - -```java -public AgentServer unregister(String route) -``` - -#### Parameters - - - -#### Returns - -`AgentServer` - -#### Source - -[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) - -Line 115. - -## Source - -[`src/main/java/com/signalwire/sdk/server/AgentServer.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/server/AgentServer.java) - -Line 39. diff --git a/fern/products/sdk-reference/java/agents/server/server/index.mdx b/fern/products/sdk-reference/java/agents/server/server/index.mdx deleted file mode 100644 index 55bec4e7cf..0000000000 --- a/fern/products/sdk-reference/java/agents/server/server/index.mdx +++ /dev/null @@ -1,22 +0,0 @@ ---- -slug: "/reference/java/agents/server/server" -title: "server" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "module" - language: "java" - qualified_name: "agents.server.server" - parent: "com.signalwire.sdk.server" - module: "agents.server" ---- -# `server` - -## Classes - - - - Multi-agent hosting server. Registers multiple agents on different routes and dispatches requests accordingly. - - diff --git a/fern/products/sdk-reference/java/agents/swaig/swaig/index.mdx b/fern/products/sdk-reference/java/agents/swaig/swaig/index.mdx index b8c0677e55..b36f3fd1ff 100644 --- a/fern/products/sdk-reference/java/agents/swaig/swaig/index.mdx +++ b/fern/products/sdk-reference/java/agents/swaig/swaig/index.mdx @@ -29,12 +29,6 @@ lustri: -## Modules - - - - - ## Interfaces ### ToolHandler diff --git a/fern/products/sdk-reference/java/agents/swaig/swaig/parameter-schema/builder/index.mdx b/fern/products/sdk-reference/java/agents/swaig/swaig/parameter-schema/builder/index.mdx index 27d763e6b2..809e78ad75 100644 --- a/fern/products/sdk-reference/java/agents/swaig/swaig/parameter-schema/builder/index.mdx +++ b/fern/products/sdk-reference/java/agents/swaig/swaig/parameter-schema/builder/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.swaig.ParameterSchema.Builder" - parent: "agents.swaig.swaig.ParameterSchema" + parent: "com.signalwire.sdk.swaig.ParameterSchema" module: "agents.swaig.swaig.ParameterSchema" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swaig/ParameterSchema.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/agents/swaig/swaig/parameter-schema/index.mdx b/fern/products/sdk-reference/java/agents/swaig/swaig/parameter-schema/index.mdx index 88d1074025..f663e4a921 100644 --- a/fern/products/sdk-reference/java/agents/swaig/swaig/parameter-schema/index.mdx +++ b/fern/products/sdk-reference/java/agents/swaig/swaig/parameter-schema/index.mdx @@ -74,6 +74,14 @@ matching the hand-written convention of not emitting an empty list. public final class ParameterSchema ``` +## Classes + + + + Fluent builder accumulating properties and required names, then emitting the JSON-Schema `parameters` Map via `#build()`. + + + ## Methods ### builder diff --git a/fern/products/sdk-reference/java/agents/swaig/swaig/parameter-schema/index__2.mdx b/fern/products/sdk-reference/java/agents/swaig/swaig/parameter-schema/index__2.mdx deleted file mode 100644 index 9f31886fa4..0000000000 --- a/fern/products/sdk-reference/java/agents/swaig/swaig/parameter-schema/index__2.mdx +++ /dev/null @@ -1,22 +0,0 @@ ---- -slug: "/reference/java/agents/swaig/swaig/parameter-schema/index__2" -title: "ParameterSchema" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "module" - language: "java" - qualified_name: "agents.swaig.swaig.ParameterSchema" - parent: "agents.swaig.swaig" - module: "agents.swaig.swaig" ---- -# `ParameterSchema` - -## Classes - - - - Fluent builder accumulating properties and required names, then emitting the JSON-Schema `parameters` Map via `#build()`. - - diff --git a/fern/products/sdk-reference/java/agents/swml/swml/index.mdx b/fern/products/sdk-reference/java/agents/swml/swml/index.mdx index 478630858e..118afb5f72 100644 --- a/fern/products/sdk-reference/java/agents/swml/swml/index.mdx +++ b/fern/products/sdk-reference/java/agents/swml/swml/index.mdx @@ -37,12 +37,6 @@ lustri: -## Modules - - - - - ## Interfaces ### WireEnum diff --git a/fern/products/sdk-reference/java/agents/swml/swml/schema-utils/index.mdx b/fern/products/sdk-reference/java/agents/swml/swml/schema-utils/index.mdx index 1ce25e1885..b565c15cc4 100644 --- a/fern/products/sdk-reference/java/agents/swml/swml/schema-utils/index.mdx +++ b/fern/products/sdk-reference/java/agents/swml/swml/schema-utils/index.mdx @@ -42,6 +42,14 @@ Python's `_validate_verb_lightweight()` exactly.</p> public class SchemaUtils ``` +## Classes + + + + A verb extracted from the schema. + + + ## Methods ### \ diff --git a/fern/products/sdk-reference/java/agents/swml/swml/schema-utils/index__2.mdx b/fern/products/sdk-reference/java/agents/swml/swml/schema-utils/index__2.mdx deleted file mode 100644 index 4142697a33..0000000000 --- a/fern/products/sdk-reference/java/agents/swml/swml/schema-utils/index__2.mdx +++ /dev/null @@ -1,22 +0,0 @@ ---- -slug: "/reference/java/agents/swml/swml/schema-utils/index__2" -title: "SchemaUtils" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "module" - language: "java" - qualified_name: "agents.swml.swml.SchemaUtils" - parent: "agents.swml.swml" - module: "agents.swml.swml" ---- -# `SchemaUtils` - -## Classes - - - - A verb extracted from the schema. - - diff --git a/fern/products/sdk-reference/java/agents/swml/swml/schema-utils/verb-info/index.mdx b/fern/products/sdk-reference/java/agents/swml/swml/schema-utils/verb-info/index.mdx index 96a0f29b46..02b08fb9be 100644 --- a/fern/products/sdk-reference/java/agents/swml/swml/schema-utils/verb-info/index.mdx +++ b/fern/products/sdk-reference/java/agents/swml/swml/schema-utils/verb-info/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.swml.SchemaUtils.VerbInfo" - parent: "agents.swml.swml.SchemaUtils" + parent: "com.signalwire.sdk.swml.SchemaUtils" module: "agents.swml.swml.SchemaUtils" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/swml/SchemaUtils.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/sdk/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/sdk/index.mdx index 145fd9357a..c7540eb357 100644 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/sdk/index.mdx +++ b/fern/products/sdk-reference/java/com/signalwire/sdk/sdk/index.mdx @@ -5,23 +5,203 @@ sdk_label: "Java SDK" icon: "java" lustri: auto_generated: true - kind: "module" + kind: "class" language: "java" qualified_name: "com.signalwire.sdk" module: "com.signalwire.sdk" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/Signalwire.java" --- # `sdk` +Top-level convenience entry points — mirror Python's +`signalwire/__init__.py` package-level helpers +(`RestClient`, `register_skill`, +`add_skill_directory`, `list_skills_with_params`). + +<p>This is a static-only utility class; it cannot be instantiated. + +The +helpers delegate to the underlying classes (RestClient, SkillRegistry) +so they're a strict thin layer. + +<p>The audit projects each method onto the canonical Python +`signalwire.<name>` free-function path via a per-port +`FREE_FUNCTION_PROJECTIONS` entry in +`scripts/enumerate_signatures.py`. + +**Modifiers:** `final` + ## Signature ```java -package com.signalwire.sdk +public final class Signalwire ``` -## Classes +## Methods + +### addSkillDirectory + +Add a directory to search for skills. + +<p>Mirrors Python's `signalwire.add_skill_directory(path)` — +delegates to the singleton `SkillRegistry` instance so +third-party skill collections can be registered by path. +Subsequent calls accumulate (de-duplicated) into a shared +external paths list. + +**Modifiers:** `static` + +#### Signature + +```java +public static void addSkillDirectory(String path) +``` + +#### Parameters + + + absolute or relative path to a directory containing skill subdirectories + + +#### Throws + +- `IllegalArgumentException` — when the path doesn't exist or isn't a directory + +#### Source + +[`src/main/java/com/signalwire/sdk/Signalwire.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/Signalwire.java) + +Line 177. + +*** + +### listSkillsWithParams + +Get complete schema for all available skills. + +<p>Mirrors Python's `signalwire.list_skills_with_params()`. +Returns a map keyed by skill name where each value contains +parameter metadata. + +Useful for GUI configuration tools, API +documentation, or programmatic skill discovery. + +<p>Java skills don't carry rich Python-style parameter +introspection in v1, so each entry contains the skill name and an +empty parameter map; built-in skills that expose +`parameterSchema()` get richer detail. + +**Modifiers:** `static` + +#### Signature + +```java +public static Map> listSkillsWithParams() +``` + +#### Returns + +`Map>` — map of skill name to schema metadata + +#### Source + +[`src/main/java/com/signalwire/sdk/Signalwire.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/Signalwire.java) + +Line 196. + +*** + +### registerSkill + +Register a custom skill class with the global `SkillRegistry`. + +<p>Mirrors Python's `signalwire.register_skill(skill_class)`. +Java skills are constructed via a no-arg constructor (the +registry stores `Supplier<SkillBase>` factories), so we +adapt the supplied class reference into a factory using +reflection. + +Throws `IllegalArgumentException` when the +class can't be instantiated reflectively or when its skill name +cannot be derived. + +**Modifiers:** `static` + +#### Signature + +```java +public static void registerSkill(Class skillClass) +``` + +#### Parameters + + + a `SkillBase` subclass + + +#### Source + +[`src/main/java/com/signalwire/sdk/Signalwire.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/Signalwire.java) + +Line 129. + +*** + +### RestClient + +Construct a `RestClient` from positional or keyword +credentials. + +<p>Mirrors Python's top-level **kwargs) factory. + +Supports two call shapes: + +<ul> + <li>token, space) — three positional + strings, mapping straight onto the Java builder.</li> + <li>kwargs) — variadic-shaped form + matching Python's signature exactly. `args` is an + array of three strings (project/token/space) or empty; + `kwargs` carries the same fields by name.</li> +</ul> + +<p>The audit projects this method onto Python's +**kwargs) via +`FREE_FUNCTION_PROJECTIONS`. + +**Modifiers:** `static` + +#### Signature + +```java +public static RestClient RestClient( + List args, + Map kwargs +) +``` + +#### Parameters + + + positional credentials — empty or token, space] + + + + keyword credentials — recognised keys are `project` / `project_id`, `token`, and `space` / `host` + + +#### Returns + +`RestClient` — a fully wired `RestClient` instance + +#### Source + +[`src/main/java/com/signalwire/sdk/Signalwire.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/Signalwire.java) + +Line 87. + +## Source + +[`src/main/java/com/signalwire/sdk/Signalwire.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/Signalwire.java) - - - Top-level convenience entry points — mirror Python's `signalwire/__init__.py` package-level helpers (`RestClient`, `register_skill`, `add_skill_directory`, `list_skills_with_params`). <p>This is a static-only utility class; it cannot be instantiated. - - +Line 34. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/sdk/signalwire/index.mdx b/fern/products/sdk-reference/java/com/signalwire/sdk/sdk/signalwire/index.mdx deleted file mode 100644 index 68001809b7..0000000000 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/sdk/signalwire/index.mdx +++ /dev/null @@ -1,209 +0,0 @@ ---- -slug: "/reference/java/com/signalwire/sdk/sdk/signalwire" -title: "Signalwire" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.Signalwire" - parent: "com.signalwire.sdk" - module: "com.signalwire.sdk" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/Signalwire.java" - visibility: "public" ---- -# `Signalwire` - -Top-level convenience entry points — mirror Python's -`signalwire/__init__.py` package-level helpers -(`RestClient`, `register_skill`, -`add_skill_directory`, `list_skills_with_params`). - -<p>This is a static-only utility class; it cannot be instantiated. - -The -helpers delegate to the underlying classes (RestClient, SkillRegistry) -so they're a strict thin layer. - -<p>The audit projects each method onto the canonical Python -`signalwire.<name>` free-function path via a per-port -`FREE_FUNCTION_PROJECTIONS` entry in -`scripts/enumerate_signatures.py`. - -**Modifiers:** `final` - -## Signature - -```java -public final class Signalwire -``` - -## Methods - -### addSkillDirectory - -Add a directory to search for skills. - -<p>Mirrors Python's `signalwire.add_skill_directory(path)` — -delegates to the singleton `SkillRegistry` instance so -third-party skill collections can be registered by path. -Subsequent calls accumulate (de-duplicated) into a shared -external paths list. - -**Modifiers:** `static` - -#### Signature - -```java -public static void addSkillDirectory(String path) -``` - -#### Parameters - - - absolute or relative path to a directory containing skill subdirectories - - -#### Throws - -- `IllegalArgumentException` — when the path doesn't exist or isn't a directory - -#### Source - -[`src/main/java/com/signalwire/sdk/Signalwire.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/Signalwire.java) - -Line 177. - -*** - -### listSkillsWithParams - -Get complete schema for all available skills. - -<p>Mirrors Python's `signalwire.list_skills_with_params()`. -Returns a map keyed by skill name where each value contains -parameter metadata. - -Useful for GUI configuration tools, API -documentation, or programmatic skill discovery. - -<p>Java skills don't carry rich Python-style parameter -introspection in v1, so each entry contains the skill name and an -empty parameter map; built-in skills that expose -`parameterSchema()` get richer detail. - -**Modifiers:** `static` - -#### Signature - -```java -public static Map> listSkillsWithParams() -``` - -#### Returns - -`Map>` — map of skill name to schema metadata - -#### Source - -[`src/main/java/com/signalwire/sdk/Signalwire.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/Signalwire.java) - -Line 196. - -*** - -### registerSkill - -Register a custom skill class with the global `SkillRegistry`. - -<p>Mirrors Python's `signalwire.register_skill(skill_class)`. -Java skills are constructed via a no-arg constructor (the -registry stores `Supplier<SkillBase>` factories), so we -adapt the supplied class reference into a factory using -reflection. - -Throws `IllegalArgumentException` when the -class can't be instantiated reflectively or when its skill name -cannot be derived. - -**Modifiers:** `static` - -#### Signature - -```java -public static void registerSkill(Class skillClass) -``` - -#### Parameters - - - a `SkillBase` subclass - - -#### Source - -[`src/main/java/com/signalwire/sdk/Signalwire.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/Signalwire.java) - -Line 129. - -*** - -### RestClient - -Construct a `RestClient` from positional or keyword -credentials. - -<p>Mirrors Python's top-level **kwargs) factory. - -Supports two call shapes: - -<ul> - <li>token, space) — three positional - strings, mapping straight onto the Java builder.</li> - <li>kwargs) — variadic-shaped form - matching Python's signature exactly. `args` is an - array of three strings (project/token/space) or empty; - `kwargs` carries the same fields by name.</li> -</ul> - -<p>The audit projects this method onto Python's -**kwargs) via -`FREE_FUNCTION_PROJECTIONS`. - -**Modifiers:** `static` - -#### Signature - -```java -public static RestClient RestClient( - List args, - Map kwargs -) -``` - -#### Parameters - - - positional credentials — empty or token, space] - - - - keyword credentials — recognised keys are `project` / `project_id`, `token`, and `space` / `host` - - -#### Returns - -`RestClient` — a fully wired `RestClient` instance - -#### Source - -[`src/main/java/com/signalwire/sdk/Signalwire.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/Signalwire.java) - -Line 87. - -## Source - -[`src/main/java/com/signalwire/sdk/Signalwire.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/Signalwire.java) - -Line 34. diff --git a/fern/products/sdk-reference/java/core/index.mdx b/fern/products/sdk-reference/java/core/index.mdx index 2c588a0f37..d99500e5bb 100644 --- a/fern/products/sdk-reference/java/core/index.mdx +++ b/fern/products/sdk-reference/java/core/index.mdx @@ -11,12 +11,20 @@ lustri: --- # `core` -## Modules +## Classes - + + Simple logging system with level control via environment variables. <p> Levels: DEBUG, INFO, WARN, ERROR, OFF <p> Environment variables: <ul> <li>SIGNALWIRE\_LOG\_LEVEL - set log level (debug/info/warn/error/off)</li> <li>SIGNALWIRE\_LOG\_MODE - set to "off" to suppress all output</li> </ul> + - + + SSRF-prevention guard for user-supplied URLs. <p> Mirrors Python's `signalwire.utils.url_validator.validate_url`: rejects non-http(s) schemes, missing hostnames, and any URL whose hostname resolves to a private / loopback / link-local / cloud-metadata IP. + + - +## Modules + + + diff --git a/fern/products/sdk-reference/java/core/logging/index.mdx b/fern/products/sdk-reference/java/core/logging/index.mdx index 4e28a2c702..98c547481d 100644 --- a/fern/products/sdk-reference/java/core/logging/index.mdx +++ b/fern/products/sdk-reference/java/core/logging/index.mdx @@ -5,18 +5,32 @@ sdk_label: "Java SDK" icon: "java" lustri: auto_generated: true - kind: "module" + kind: "class" language: "java" qualified_name: "com.signalwire.sdk.logging" parent: "core" module: "core" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java" --- # `logging` +Simple logging system with level control via environment variables. + +<p> +Levels: DEBUG, INFO, WARN, ERROR, OFF +<p> +Environment variables: +<ul> + <li>SIGNALWIRE_LOG_LEVEL - set log level (debug/info/warn/error/off)</li> + <li>SIGNALWIRE_LOG_MODE - set to "off" to suppress all output</li> +</ul> + +**Modifiers:** `final` + ## Signature ```java -package com.signalwire.sdk.logging +public final class Logger ``` ## Modules @@ -24,3 +38,297 @@ package com.signalwire.sdk.logging + +## Methods + +### \ + +#### Signature + +```java +public (String name) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/logging/Logger.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java) + +Line 63. + +*** + +### debug + +#### Signature + + + + ```java + public void debug(String message) + ``` + + + + ```java + public void debug(String format, Object args) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/logging/Logger.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java) + +Line 87. + +*** + +### error + +#### Signature + + + + ```java + public void error(String message) + ``` + + + + ```java + public void error(String format, Object args) + ``` + + + + ```java + public void error(String message, Throwable t) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Parameters (Overload 3) + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/logging/Logger.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java) + +Line 111. + +*** + +### getGlobalLevel + +**Modifiers:** `static` + +#### Signature + +```java +public static Level getGlobalLevel() +``` + +#### Returns + +`Level` + +#### Source + +[`src/main/java/com/signalwire/sdk/logging/Logger.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java) + +Line 79. + +*** + +### getLogger + +**Modifiers:** `static` + +#### Signature + + + + ```java + public static Logger getLogger(String name) + ``` + + + + ```java + public static Logger getLogger(Class clazz) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + +#### Returns (Overload 1) + +`Logger` + +#### Returns (Overload 2) + +`Logger` + +#### Source + +[`src/main/java/com/signalwire/sdk/logging/Logger.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java) + +Line 67. + +*** + +### info + +#### Signature + + + + ```java + public void info(String message) + ``` + + + + ```java + public void info(String format, Object args) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/logging/Logger.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java) + +Line 95. + +*** + +### isEnabled + +#### Signature + +```java +public boolean isEnabled(Level level) +``` + +#### Parameters + + + +#### Returns + +`boolean` + +#### Source + +[`src/main/java/com/signalwire/sdk/logging/Logger.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java) + +Line 83. + +*** + +### setGlobalLevel + +**Modifiers:** `static` + +#### Signature + +```java +public static void setGlobalLevel(Level level) +``` + +#### Parameters + + + +#### Source + +[`src/main/java/com/signalwire/sdk/logging/Logger.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java) + +Line 75. + +*** + +### warn + +#### Signature + + + + ```java + public void warn(String message) + ``` + + + + ```java + public void warn(String format, Object args) + ``` + + + +#### Parameters (Overload 1) + + + +#### Parameters (Overload 2) + + + + + +#### Source + +[`src/main/java/com/signalwire/sdk/logging/Logger.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java) + +Line 103. + +## Source + +[`src/main/java/com/signalwire/sdk/logging/Logger.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java) + +Line 20. diff --git a/fern/products/sdk-reference/java/core/logging/logging/index.mdx b/fern/products/sdk-reference/java/core/logging/logging/index.mdx index fc1ca73973..5c2a7417a5 100644 --- a/fern/products/sdk-reference/java/core/logging/logging/index.mdx +++ b/fern/products/sdk-reference/java/core/logging/logging/index.mdx @@ -13,16 +13,94 @@ lustri: --- # `logging` -## Classes +## Enums - - - Simple logging system with level control via environment variables. <p> Levels: DEBUG, INFO, WARN, ERROR, OFF <p> Environment variables: <ul> <li>SIGNALWIRE\_LOG\_LEVEL - set log level (debug/info/warn/error/off)</li> <li>SIGNALWIRE\_LOG\_MODE - set to "off" to suppress all output</li> </ul> - - +### Level -## Modules +#### Signature - - - +```java +public enum Level +``` + +#### Variants + + + + + + + + + + + +#### Methods + +##### getValue + +###### Signature + +```java +public int getValue() +``` + +###### Returns + +`int` + +###### Source + +[`src/main/java/com/signalwire/sdk/logging/Logger.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java) + +Line 31. + +*** + +##### valueOf + +**Modifiers:** `static` + +###### Signature + +```java +public static Level valueOf(String name) +``` + +###### Parameters + + + +###### Returns + +`Level` + +###### Source + +[`src/main/java/com/signalwire/sdk/logging/Logger.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java) + +*** + +##### values + +**Modifiers:** `static` + +###### Signature + +```java +public static Level[] values() +``` + +###### Returns + +`Level[]` + +###### Source + +[`src/main/java/com/signalwire/sdk/logging/Logger.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java) + +#### Source + +[`src/main/java/com/signalwire/sdk/logging/Logger.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java) + +Line 22. diff --git a/fern/products/sdk-reference/java/core/logging/logging/logger/index.mdx b/fern/products/sdk-reference/java/core/logging/logging/logger/index.mdx deleted file mode 100644 index 3466274c5d..0000000000 --- a/fern/products/sdk-reference/java/core/logging/logging/logger/index.mdx +++ /dev/null @@ -1,329 +0,0 @@ ---- -slug: "/reference/java/core/logging/logging/logger" -title: "Logger" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.logging.Logger" - parent: "core.logging.logging" - module: "core.logging.logging" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java" - visibility: "public" ---- -# `Logger` - -Simple logging system with level control via environment variables. - -<p> -Levels: DEBUG, INFO, WARN, ERROR, OFF -<p> -Environment variables: -<ul> - <li>SIGNALWIRE_LOG_LEVEL - set log level (debug/info/warn/error/off)</li> - <li>SIGNALWIRE_LOG_MODE - set to "off" to suppress all output</li> -</ul> - -**Modifiers:** `final` - -## Signature - -```java -public final class Logger -``` - -## Methods - -### \ - -#### Signature - -```java -public (String name) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/logging/Logger.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java) - -Line 63. - -*** - -### debug - -#### Signature - - - - ```java - public void debug(String message) - ``` - - - - ```java - public void debug(String format, Object args) - ``` - - - -#### Parameters (Overload 1) - - - -#### Parameters (Overload 2) - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/logging/Logger.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java) - -Line 87. - -*** - -### error - -#### Signature - - - - ```java - public void error(String message) - ``` - - - - ```java - public void error(String format, Object args) - ``` - - - - ```java - public void error(String message, Throwable t) - ``` - - - -#### Parameters (Overload 1) - - - -#### Parameters (Overload 2) - - - - - -#### Parameters (Overload 3) - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/logging/Logger.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java) - -Line 111. - -*** - -### getGlobalLevel - -**Modifiers:** `static` - -#### Signature - -```java -public static Level getGlobalLevel() -``` - -#### Returns - -`Level` - -#### Source - -[`src/main/java/com/signalwire/sdk/logging/Logger.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java) - -Line 79. - -*** - -### getLogger - -**Modifiers:** `static` - -#### Signature - - - - ```java - public static Logger getLogger(String name) - ``` - - - - ```java - public static Logger getLogger(Class clazz) - ``` - - - -#### Parameters (Overload 1) - - - -#### Parameters (Overload 2) - - - -#### Returns (Overload 1) - -`Logger` - -#### Returns (Overload 2) - -`Logger` - -#### Source - -[`src/main/java/com/signalwire/sdk/logging/Logger.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java) - -Line 67. - -*** - -### info - -#### Signature - - - - ```java - public void info(String message) - ``` - - - - ```java - public void info(String format, Object args) - ``` - - - -#### Parameters (Overload 1) - - - -#### Parameters (Overload 2) - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/logging/Logger.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java) - -Line 95. - -*** - -### isEnabled - -#### Signature - -```java -public boolean isEnabled(Level level) -``` - -#### Parameters - - - -#### Returns - -`boolean` - -#### Source - -[`src/main/java/com/signalwire/sdk/logging/Logger.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java) - -Line 83. - -*** - -### setGlobalLevel - -**Modifiers:** `static` - -#### Signature - -```java -public static void setGlobalLevel(Level level) -``` - -#### Parameters - - - -#### Source - -[`src/main/java/com/signalwire/sdk/logging/Logger.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java) - -Line 75. - -*** - -### warn - -#### Signature - - - - ```java - public void warn(String message) - ``` - - - - ```java - public void warn(String format, Object args) - ``` - - - -#### Parameters (Overload 1) - - - -#### Parameters (Overload 2) - - - - - -#### Source - -[`src/main/java/com/signalwire/sdk/logging/Logger.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java) - -Line 103. - -## Source - -[`src/main/java/com/signalwire/sdk/logging/Logger.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java) - -Line 20. diff --git a/fern/products/sdk-reference/java/core/logging/logging/logger/index__2.mdx b/fern/products/sdk-reference/java/core/logging/logging/logger/index__2.mdx deleted file mode 100644 index f05d1ef616..0000000000 --- a/fern/products/sdk-reference/java/core/logging/logging/logger/index__2.mdx +++ /dev/null @@ -1,106 +0,0 @@ ---- -slug: "/reference/java/core/logging/logging/logger/index__2" -title: "Logger" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "module" - language: "java" - qualified_name: "core.logging.logging.Logger" - parent: "core.logging.logging" - module: "core.logging.logging" ---- -# `Logger` - -## Enums - -### Level - -#### Signature - -```java -public enum Level -``` - -#### Variants - - - - - - - - - - - -#### Methods - -##### getValue - -###### Signature - -```java -public int getValue() -``` - -###### Returns - -`int` - -###### Source - -[`src/main/java/com/signalwire/sdk/logging/Logger.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java) - -Line 31. - -*** - -##### valueOf - -**Modifiers:** `static` - -###### Signature - -```java -public static Level valueOf(String name) -``` - -###### Parameters - - - -###### Returns - -`Level` - -###### Source - -[`src/main/java/com/signalwire/sdk/logging/Logger.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java) - -*** - -##### values - -**Modifiers:** `static` - -###### Signature - -```java -public static Level[] values() -``` - -###### Returns - -`Level[]` - -###### Source - -[`src/main/java/com/signalwire/sdk/logging/Logger.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java) - -#### Source - -[`src/main/java/com/signalwire/sdk/logging/Logger.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/logging/Logger.java) - -Line 22. diff --git a/fern/products/sdk-reference/java/core/security/security/index.mdx b/fern/products/sdk-reference/java/core/security/security/index.mdx index 5412cfa328..7f997c541b 100644 --- a/fern/products/sdk-reference/java/core/security/security/index.mdx +++ b/fern/products/sdk-reference/java/core/security/security/index.mdx @@ -28,9 +28,3 @@ lustri: Webhook signature validation for SignalWire-signed HTTP requests. <p>Implements both schemes from `porting-sdk/webhooks.md`: <ul> <li><b>Scheme A</b> (RELAY/SWML/JSON): url + rawBody)).</li> <li><b>Scheme B</b> (Compat/cXML form): url + sortedFormParams)) with optional `bodySHA256` query-param fallback for JSON-on-compat-surface.</li> </ul> <p>All signature comparisons use byte\[]) (constant-time) so the secret cannot be leaked through timing differences. <p>Public API: <ul> <li>String, String, String) — combined entry point.</li> <li>String, String, Object) — legacy `@signalwire/compatibility-api` drop-in alias.</li> </ul> <p>This is a stateless utility — every method is static and the class is not intended to be instantiated. - -## Modules - - - - diff --git a/fern/products/sdk-reference/java/core/security/security/webhook-filter/cached-body-http-servlet-request/index.mdx b/fern/products/sdk-reference/java/core/security/security/webhook-filter/cached-body-http-servlet-request/index.mdx index 02a9c25b3a..e855978018 100644 --- a/fern/products/sdk-reference/java/core/security/security/webhook-filter/cached-body-http-servlet-request/index.mdx +++ b/fern/products/sdk-reference/java/core/security/security/webhook-filter/cached-body-http-servlet-request/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.security.WebhookFilter.CachedBodyHttpServletRequest" - parent: "core.security.security.WebhookFilter" + parent: "com.signalwire.sdk.security.WebhookFilter" module: "core.security.security.WebhookFilter" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/security/WebhookFilter.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/core/security/security/webhook-filter/index.mdx b/fern/products/sdk-reference/java/core/security/security/webhook-filter/index.mdx index b3643ee9b1..a3e7a4e00c 100644 --- a/fern/products/sdk-reference/java/core/security/security/webhook-filter/index.mdx +++ b/fern/products/sdk-reference/java/core/security/security/webhook-filter/index.mdx @@ -62,6 +62,14 @@ public class WebhookFilter implements Filter **Implements:** `Filter` +## Classes + + + + `HttpServletRequestWrapper` that buffers the request body so it can be read multiple times (once by the filter for signature validation, once by the downstream handler for parsing). + + + ## Methods ### \ diff --git a/fern/products/sdk-reference/java/core/security/security/webhook-filter/index__2.mdx b/fern/products/sdk-reference/java/core/security/security/webhook-filter/index__2.mdx deleted file mode 100644 index 9154f49af5..0000000000 --- a/fern/products/sdk-reference/java/core/security/security/webhook-filter/index__2.mdx +++ /dev/null @@ -1,22 +0,0 @@ ---- -slug: "/reference/java/core/security/security/webhook-filter/index__2" -title: "WebhookFilter" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "module" - language: "java" - qualified_name: "core.security.security.WebhookFilter" - parent: "core.security.security" - module: "core.security.security" ---- -# `WebhookFilter` - -## Classes - - - - `HttpServletRequestWrapper` that buffers the request body so it can be read multiple times (once by the filter for signature validation, once by the downstream handler for parsing). - - diff --git a/fern/products/sdk-reference/java/core/utils/index.mdx b/fern/products/sdk-reference/java/core/utils/index.mdx index f81f9f9a6d..706ad3cb36 100644 --- a/fern/products/sdk-reference/java/core/utils/index.mdx +++ b/fern/products/sdk-reference/java/core/utils/index.mdx @@ -5,22 +5,75 @@ sdk_label: "Java SDK" icon: "java" lustri: auto_generated: true - kind: "module" + kind: "class" language: "java" qualified_name: "com.signalwire.sdk.utils" parent: "core" module: "core" + source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/utils/UrlValidator.java" --- # `utils` +SSRF-prevention guard for user-supplied URLs. + +<p> +Mirrors Python's `signalwire.utils.url_validator.validate_url`: +rejects non-http(s) schemes, missing hostnames, and any URL whose +hostname resolves to a private / loopback / link-local / cloud-metadata +IP. + +The `allowPrivate` parameter (or the +`SWML_ALLOW_PRIVATE_URLS` env var with value "1", "true" or "yes", +case-insensitive) bypasses the IP-blocklist check. + +<p> +Projected onto the Python free function name `validate_url` via +scripts/enumerate_signatures.py. + +**Modifiers:** `final` + ## Signature ```java -package com.signalwire.sdk.utils +public final class UrlValidator +``` + +## Methods + +### validateUrl + +Validate that a URL is safe to fetch. + +**Modifiers:** `static` + +#### Signature + +```java +public static boolean validateUrl(String url, boolean allowPrivate) ``` -## Modules +#### Parameters + + + URL string to validate. + + + + when true, bypass the IP-blocklist check. + + +#### Returns + +`boolean` — true when the URL is safe to fetch, false otherwise. + +#### Source + +[`src/main/java/com/signalwire/sdk/utils/UrlValidator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/utils/UrlValidator.java) + +Line 73. + +## Source + +[`src/main/java/com/signalwire/sdk/utils/UrlValidator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/utils/UrlValidator.java) - - - +Line 30. diff --git a/fern/products/sdk-reference/java/core/utils/utils/index.mdx b/fern/products/sdk-reference/java/core/utils/utils/index.mdx deleted file mode 100644 index d4a5c22e85..0000000000 --- a/fern/products/sdk-reference/java/core/utils/utils/index.mdx +++ /dev/null @@ -1,22 +0,0 @@ ---- -slug: "/reference/java/core/utils/utils" -title: "utils" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "module" - language: "java" - qualified_name: "core.utils.utils" - parent: "com.signalwire.sdk.utils" - module: "core.utils" ---- -# `utils` - -## Classes - - - - SSRF-prevention guard for user-supplied URLs. <p> Mirrors Python's `signalwire.utils.url_validator.validate_url`: rejects non-http(s) schemes, missing hostnames, and any URL whose hostname resolves to a private / loopback / link-local / cloud-metadata IP. - - diff --git a/fern/products/sdk-reference/java/core/utils/utils/url-validator/index.mdx b/fern/products/sdk-reference/java/core/utils/utils/url-validator/index.mdx deleted file mode 100644 index a8ad758ef1..0000000000 --- a/fern/products/sdk-reference/java/core/utils/utils/url-validator/index.mdx +++ /dev/null @@ -1,80 +0,0 @@ ---- -slug: "/reference/java/core/utils/utils/url-validator" -title: "UrlValidator" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "class" - language: "java" - qualified_name: "com.signalwire.sdk.utils.UrlValidator" - parent: "core.utils.utils" - module: "core.utils.utils" - source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/utils/UrlValidator.java" - visibility: "public" ---- -# `UrlValidator` - -SSRF-prevention guard for user-supplied URLs. - -<p> -Mirrors Python's `signalwire.utils.url_validator.validate_url`: -rejects non-http(s) schemes, missing hostnames, and any URL whose -hostname resolves to a private / loopback / link-local / cloud-metadata -IP. - -The `allowPrivate` parameter (or the -`SWML_ALLOW_PRIVATE_URLS` env var with value "1", "true" or "yes", -case-insensitive) bypasses the IP-blocklist check. - -<p> -Projected onto the Python free function name `validate_url` via -scripts/enumerate_signatures.py. - -**Modifiers:** `final` - -## Signature - -```java -public final class UrlValidator -``` - -## Methods - -### validateUrl - -Validate that a URL is safe to fetch. - -**Modifiers:** `static` - -#### Signature - -```java -public static boolean validateUrl(String url, boolean allowPrivate) -``` - -#### Parameters - - - URL string to validate. - - - - when true, bypass the IP-blocklist check. - - -#### Returns - -`boolean` — true when the URL is safe to fetch, false otherwise. - -#### Source - -[`src/main/java/com/signalwire/sdk/utils/UrlValidator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/utils/UrlValidator.java) - -Line 73. - -## Source - -[`src/main/java/com/signalwire/sdk/utils/UrlValidator.java`](https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/utils/UrlValidator.java) - -Line 30. diff --git a/fern/products/sdk-reference/java/index.mdx b/fern/products/sdk-reference/java/index.mdx index caae56f844..94726e8c63 100644 --- a/fern/products/sdk-reference/java/index.mdx +++ b/fern/products/sdk-reference/java/index.mdx @@ -14,5 +14,4 @@ lustri: - [`core`](/docs/sdk-reference/reference/java/core) - [`relay`](/docs/sdk-reference/reference/java/relay) - [`rest`](/docs/sdk-reference/reference/java/rest) -- [`sdk`](/docs/sdk-reference/reference/java/com/signalwire/sdk/sdk) diff --git a/fern/products/sdk-reference/java/relay/action/ai-action/index.mdx b/fern/products/sdk-reference/java/relay/action/ai-action/index.mdx index 978a2d596b..0e75fa9eaf 100644 --- a/fern/products/sdk-reference/java/relay/action/ai-action/index.mdx +++ b/fern/products/sdk-reference/java/relay/action/ai-action/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.relay.Action.AiAction" - parent: "relay.relay.Action" + parent: "com.signalwire.sdk.relay.Action" module: "relay.Action" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/relay/action/collect-action/index.mdx b/fern/products/sdk-reference/java/relay/action/collect-action/index.mdx index b4d2ec6f1c..79f9728732 100644 --- a/fern/products/sdk-reference/java/relay/action/collect-action/index.mdx +++ b/fern/products/sdk-reference/java/relay/action/collect-action/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.relay.Action.CollectAction" - parent: "relay.relay.Action" + parent: "com.signalwire.sdk.relay.Action" module: "relay.Action" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/relay/action/detect-action/index.mdx b/fern/products/sdk-reference/java/relay/action/detect-action/index.mdx index 1e301ba589..115109c5a0 100644 --- a/fern/products/sdk-reference/java/relay/action/detect-action/index.mdx +++ b/fern/products/sdk-reference/java/relay/action/detect-action/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.relay.Action.DetectAction" - parent: "relay.relay.Action" + parent: "com.signalwire.sdk.relay.Action" module: "relay.Action" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/relay/action/index.mdx b/fern/products/sdk-reference/java/relay/action/index.mdx index 5086ffc025..5e041383eb 100644 --- a/fern/products/sdk-reference/java/relay/action/index.mdx +++ b/fern/products/sdk-reference/java/relay/action/index.mdx @@ -33,6 +33,58 @@ Subclasses add action-specific sub-commands (pause, resume, volume, etc.). public class Action ``` +## Classes + + + + AI action with stop sub-command. + + + + Collect action with stop and start\_input\_timers sub-commands. + + + + Detect action with stop sub-command. + + + + Pay action with stop sub-command. + + + + Play action with pause, resume, volume, and stop sub-commands. + + + + Play-and-collect action. <p> Shares one `control_id` across both play and collect phases. Events arrive as BOTH `calling.call.play` and `calling.call.collect`. This action only resolves on collect events, NOT play events. + + + + Receive fax action with stop sub-command. + + + + Record action with pause, resume, and stop sub-commands. + + + + Send fax action with stop sub-command. + + + + Stream action with stop sub-command. + + + + Tap action with stop sub-command. + + + + Transcribe action with stop sub-command. + + + ## Methods ### \ diff --git a/fern/products/sdk-reference/java/relay/action/index__2.mdx b/fern/products/sdk-reference/java/relay/action/index__2.mdx deleted file mode 100644 index a774ab18e2..0000000000 --- a/fern/products/sdk-reference/java/relay/action/index__2.mdx +++ /dev/null @@ -1,66 +0,0 @@ ---- -slug: "/reference/java/relay/action/index__2" -title: "Action" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "module" - language: "java" - qualified_name: "relay.relay.Action" - parent: "com.signalwire.sdk.relay" - module: "relay" ---- -# `Action` - -## Classes - - - - AI action with stop sub-command. - - - - Collect action with stop and start\_input\_timers sub-commands. - - - - Detect action with stop sub-command. - - - - Pay action with stop sub-command. - - - - Play action with pause, resume, volume, and stop sub-commands. - - - - Play-and-collect action. <p> Shares one `control_id` across both play and collect phases. Events arrive as BOTH `calling.call.play` and `calling.call.collect`. This action only resolves on collect events, NOT play events. - - - - Receive fax action with stop sub-command. - - - - Record action with pause, resume, and stop sub-commands. - - - - Send fax action with stop sub-command. - - - - Stream action with stop sub-command. - - - - Tap action with stop sub-command. - - - - Transcribe action with stop sub-command. - - diff --git a/fern/products/sdk-reference/java/relay/action/pay-action/index.mdx b/fern/products/sdk-reference/java/relay/action/pay-action/index.mdx index beeffdc94d..d704e967bc 100644 --- a/fern/products/sdk-reference/java/relay/action/pay-action/index.mdx +++ b/fern/products/sdk-reference/java/relay/action/pay-action/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.relay.Action.PayAction" - parent: "relay.relay.Action" + parent: "com.signalwire.sdk.relay.Action" module: "relay.Action" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/relay/action/play-action/index.mdx b/fern/products/sdk-reference/java/relay/action/play-action/index.mdx index 6f42b40e9e..8e1215a73b 100644 --- a/fern/products/sdk-reference/java/relay/action/play-action/index.mdx +++ b/fern/products/sdk-reference/java/relay/action/play-action/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.relay.Action.PlayAction" - parent: "relay.relay.Action" + parent: "com.signalwire.sdk.relay.Action" module: "relay.Action" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/relay/action/play-and-collect-action/index.mdx b/fern/products/sdk-reference/java/relay/action/play-and-collect-action/index.mdx index 8320fe0f64..c21242a300 100644 --- a/fern/products/sdk-reference/java/relay/action/play-and-collect-action/index.mdx +++ b/fern/products/sdk-reference/java/relay/action/play-and-collect-action/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.relay.Action.PlayAndCollectAction" - parent: "relay.relay.Action" + parent: "com.signalwire.sdk.relay.Action" module: "relay.Action" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/relay/action/receive-fax-action/index.mdx b/fern/products/sdk-reference/java/relay/action/receive-fax-action/index.mdx index be19b15b79..71f568a73a 100644 --- a/fern/products/sdk-reference/java/relay/action/receive-fax-action/index.mdx +++ b/fern/products/sdk-reference/java/relay/action/receive-fax-action/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.relay.Action.ReceiveFaxAction" - parent: "relay.relay.Action" + parent: "com.signalwire.sdk.relay.Action" module: "relay.Action" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/relay/action/record-action/index.mdx b/fern/products/sdk-reference/java/relay/action/record-action/index.mdx index ef213708c4..7f27cd6488 100644 --- a/fern/products/sdk-reference/java/relay/action/record-action/index.mdx +++ b/fern/products/sdk-reference/java/relay/action/record-action/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.relay.Action.RecordAction" - parent: "relay.relay.Action" + parent: "com.signalwire.sdk.relay.Action" module: "relay.Action" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/relay/action/send-fax-action/index.mdx b/fern/products/sdk-reference/java/relay/action/send-fax-action/index.mdx index ad8910a64c..ee1e187886 100644 --- a/fern/products/sdk-reference/java/relay/action/send-fax-action/index.mdx +++ b/fern/products/sdk-reference/java/relay/action/send-fax-action/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.relay.Action.SendFaxAction" - parent: "relay.relay.Action" + parent: "com.signalwire.sdk.relay.Action" module: "relay.Action" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/relay/action/stream-action/index.mdx b/fern/products/sdk-reference/java/relay/action/stream-action/index.mdx index e4a35bdf29..104781cd16 100644 --- a/fern/products/sdk-reference/java/relay/action/stream-action/index.mdx +++ b/fern/products/sdk-reference/java/relay/action/stream-action/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.relay.Action.StreamAction" - parent: "relay.relay.Action" + parent: "com.signalwire.sdk.relay.Action" module: "relay.Action" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/relay/action/tap-action/index.mdx b/fern/products/sdk-reference/java/relay/action/tap-action/index.mdx index e4005b3de9..2f0f9816ed 100644 --- a/fern/products/sdk-reference/java/relay/action/tap-action/index.mdx +++ b/fern/products/sdk-reference/java/relay/action/tap-action/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.relay.Action.TapAction" - parent: "relay.relay.Action" + parent: "com.signalwire.sdk.relay.Action" module: "relay.Action" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/relay/action/transcribe-action/index.mdx b/fern/products/sdk-reference/java/relay/action/transcribe-action/index.mdx index e92d3f05fe..d8b74c9d6c 100644 --- a/fern/products/sdk-reference/java/relay/action/transcribe-action/index.mdx +++ b/fern/products/sdk-reference/java/relay/action/transcribe-action/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.relay.Action.TranscribeAction" - parent: "relay.relay.Action" + parent: "com.signalwire.sdk.relay.Action" module: "relay.Action" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/Action.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/relay/index.mdx b/fern/products/sdk-reference/java/relay/index.mdx index 3a2adbb220..0af58e0d1a 100644 --- a/fern/products/sdk-reference/java/relay/index.mdx +++ b/fern/products/sdk-reference/java/relay/index.mdx @@ -53,16 +53,6 @@ package com.signalwire.sdk.relay -## Modules - - - - - - - - - ## Enums ### CallState diff --git a/fern/products/sdk-reference/java/relay/relay-client/builder/index.mdx b/fern/products/sdk-reference/java/relay/relay-client/builder/index.mdx index f6b57aa2ed..64950234f5 100644 --- a/fern/products/sdk-reference/java/relay/relay-client/builder/index.mdx +++ b/fern/products/sdk-reference/java/relay/relay-client/builder/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.relay.RelayClient.Builder" - parent: "relay.relay.RelayClient" + parent: "com.signalwire.sdk.relay.RelayClient" module: "relay.RelayClient" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayClient.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/relay/relay-client/index.mdx b/fern/products/sdk-reference/java/relay/relay-client/index.mdx index 9f1c4b2f17..43275454fa 100644 --- a/fern/products/sdk-reference/java/relay/relay-client/index.mdx +++ b/fern/products/sdk-reference/java/relay/relay-client/index.mdx @@ -65,6 +65,12 @@ public class RelayClient implements AutoCloseable **Implements:** `AutoCloseable` +## Classes + + + + + ## Methods ### builder diff --git a/fern/products/sdk-reference/java/relay/relay-client/index__2.mdx b/fern/products/sdk-reference/java/relay/relay-client/index__2.mdx deleted file mode 100644 index 1dc23bb095..0000000000 --- a/fern/products/sdk-reference/java/relay/relay-client/index__2.mdx +++ /dev/null @@ -1,20 +0,0 @@ ---- -slug: "/reference/java/relay/relay-client/index__2" -title: "RelayClient" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "module" - language: "java" - qualified_name: "relay.relay.RelayClient" - parent: "com.signalwire.sdk.relay" - module: "relay" ---- -# `RelayClient` - -## Classes - - - - diff --git a/fern/products/sdk-reference/java/relay/relay-event/authorization-state-event/index.mdx b/fern/products/sdk-reference/java/relay/relay-event/authorization-state-event/index.mdx index ffc80770a1..921d530518 100644 --- a/fern/products/sdk-reference/java/relay/relay-event/authorization-state-event/index.mdx +++ b/fern/products/sdk-reference/java/relay/relay-event/authorization-state-event/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.relay.RelayEvent.AuthorizationStateEvent" - parent: "relay.relay.RelayEvent" + parent: "com.signalwire.sdk.relay.RelayEvent" module: "relay.RelayEvent" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/relay/relay-event/call-collect-event/index.mdx b/fern/products/sdk-reference/java/relay/relay-event/call-collect-event/index.mdx index 8ba0985f5f..5212a1dabf 100644 --- a/fern/products/sdk-reference/java/relay/relay-event/call-collect-event/index.mdx +++ b/fern/products/sdk-reference/java/relay/relay-event/call-collect-event/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallCollectEvent" - parent: "relay.relay.RelayEvent" + parent: "com.signalwire.sdk.relay.RelayEvent" module: "relay.RelayEvent" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/relay/relay-event/call-connect-event/index.mdx b/fern/products/sdk-reference/java/relay/relay-event/call-connect-event/index.mdx index 1ff1603082..f70ce00510 100644 --- a/fern/products/sdk-reference/java/relay/relay-event/call-connect-event/index.mdx +++ b/fern/products/sdk-reference/java/relay/relay-event/call-connect-event/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallConnectEvent" - parent: "relay.relay.RelayEvent" + parent: "com.signalwire.sdk.relay.RelayEvent" module: "relay.RelayEvent" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/relay/relay-event/call-detect-event/index.mdx b/fern/products/sdk-reference/java/relay/relay-event/call-detect-event/index.mdx index 5c9b51651f..ee25c90948 100644 --- a/fern/products/sdk-reference/java/relay/relay-event/call-detect-event/index.mdx +++ b/fern/products/sdk-reference/java/relay/relay-event/call-detect-event/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallDetectEvent" - parent: "relay.relay.RelayEvent" + parent: "com.signalwire.sdk.relay.RelayEvent" module: "relay.RelayEvent" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/relay/relay-event/call-dial-event/index.mdx b/fern/products/sdk-reference/java/relay/relay-event/call-dial-event/index.mdx index 74dd88629d..f129695473 100644 --- a/fern/products/sdk-reference/java/relay/relay-event/call-dial-event/index.mdx +++ b/fern/products/sdk-reference/java/relay/relay-event/call-dial-event/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallDialEvent" - parent: "relay.relay.RelayEvent" + parent: "com.signalwire.sdk.relay.RelayEvent" module: "relay.RelayEvent" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/relay/relay-event/call-fax-event/index.mdx b/fern/products/sdk-reference/java/relay/relay-event/call-fax-event/index.mdx index 44ca68b5dd..6530401c37 100644 --- a/fern/products/sdk-reference/java/relay/relay-event/call-fax-event/index.mdx +++ b/fern/products/sdk-reference/java/relay/relay-event/call-fax-event/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallFaxEvent" - parent: "relay.relay.RelayEvent" + parent: "com.signalwire.sdk.relay.RelayEvent" module: "relay.RelayEvent" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/relay/relay-event/call-pay-event/index.mdx b/fern/products/sdk-reference/java/relay/relay-event/call-pay-event/index.mdx index 3bfbf31f8a..0d89d669d5 100644 --- a/fern/products/sdk-reference/java/relay/relay-event/call-pay-event/index.mdx +++ b/fern/products/sdk-reference/java/relay/relay-event/call-pay-event/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallPayEvent" - parent: "relay.relay.RelayEvent" + parent: "com.signalwire.sdk.relay.RelayEvent" module: "relay.RelayEvent" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/relay/relay-event/call-play-event/index.mdx b/fern/products/sdk-reference/java/relay/relay-event/call-play-event/index.mdx index 307ff969e0..c007a76a79 100644 --- a/fern/products/sdk-reference/java/relay/relay-event/call-play-event/index.mdx +++ b/fern/products/sdk-reference/java/relay/relay-event/call-play-event/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallPlayEvent" - parent: "relay.relay.RelayEvent" + parent: "com.signalwire.sdk.relay.RelayEvent" module: "relay.RelayEvent" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/relay/relay-event/call-receive-event/index.mdx b/fern/products/sdk-reference/java/relay/relay-event/call-receive-event/index.mdx index 7269173adb..08869bdcfa 100644 --- a/fern/products/sdk-reference/java/relay/relay-event/call-receive-event/index.mdx +++ b/fern/products/sdk-reference/java/relay/relay-event/call-receive-event/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallReceiveEvent" - parent: "relay.relay.RelayEvent" + parent: "com.signalwire.sdk.relay.RelayEvent" module: "relay.RelayEvent" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/relay/relay-event/call-record-event/index.mdx b/fern/products/sdk-reference/java/relay/relay-event/call-record-event/index.mdx index 0cadd265ef..73cd27a7cd 100644 --- a/fern/products/sdk-reference/java/relay/relay-event/call-record-event/index.mdx +++ b/fern/products/sdk-reference/java/relay/relay-event/call-record-event/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallRecordEvent" - parent: "relay.relay.RelayEvent" + parent: "com.signalwire.sdk.relay.RelayEvent" module: "relay.RelayEvent" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/relay/relay-event/call-refer-event/index.mdx b/fern/products/sdk-reference/java/relay/relay-event/call-refer-event/index.mdx index 63e05950c7..a659a7d729 100644 --- a/fern/products/sdk-reference/java/relay/relay-event/call-refer-event/index.mdx +++ b/fern/products/sdk-reference/java/relay/relay-event/call-refer-event/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallReferEvent" - parent: "relay.relay.RelayEvent" + parent: "com.signalwire.sdk.relay.RelayEvent" module: "relay.RelayEvent" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/relay/relay-event/call-send-digits-event/index.mdx b/fern/products/sdk-reference/java/relay/relay-event/call-send-digits-event/index.mdx index c62b437b5b..e7e1e72409 100644 --- a/fern/products/sdk-reference/java/relay/relay-event/call-send-digits-event/index.mdx +++ b/fern/products/sdk-reference/java/relay/relay-event/call-send-digits-event/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallSendDigitsEvent" - parent: "relay.relay.RelayEvent" + parent: "com.signalwire.sdk.relay.RelayEvent" module: "relay.RelayEvent" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/relay/relay-event/call-state-event/index.mdx b/fern/products/sdk-reference/java/relay/relay-event/call-state-event/index.mdx index 96f3b5c150..2200ec32df 100644 --- a/fern/products/sdk-reference/java/relay/relay-event/call-state-event/index.mdx +++ b/fern/products/sdk-reference/java/relay/relay-event/call-state-event/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallStateEvent" - parent: "relay.relay.RelayEvent" + parent: "com.signalwire.sdk.relay.RelayEvent" module: "relay.RelayEvent" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/relay/relay-event/call-stream-event/index.mdx b/fern/products/sdk-reference/java/relay/relay-event/call-stream-event/index.mdx index b8d3b876a3..7a40a7ccae 100644 --- a/fern/products/sdk-reference/java/relay/relay-event/call-stream-event/index.mdx +++ b/fern/products/sdk-reference/java/relay/relay-event/call-stream-event/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallStreamEvent" - parent: "relay.relay.RelayEvent" + parent: "com.signalwire.sdk.relay.RelayEvent" module: "relay.RelayEvent" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/relay/relay-event/call-tap-event/index.mdx b/fern/products/sdk-reference/java/relay/relay-event/call-tap-event/index.mdx index ab830616f1..0388140c92 100644 --- a/fern/products/sdk-reference/java/relay/relay-event/call-tap-event/index.mdx +++ b/fern/products/sdk-reference/java/relay/relay-event/call-tap-event/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallTapEvent" - parent: "relay.relay.RelayEvent" + parent: "com.signalwire.sdk.relay.RelayEvent" module: "relay.RelayEvent" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/relay/relay-event/call-transcribe-event/index.mdx b/fern/products/sdk-reference/java/relay/relay-event/call-transcribe-event/index.mdx index 70467e7930..45772b5941 100644 --- a/fern/products/sdk-reference/java/relay/relay-event/call-transcribe-event/index.mdx +++ b/fern/products/sdk-reference/java/relay/relay-event/call-transcribe-event/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.relay.RelayEvent.CallTranscribeEvent" - parent: "relay.relay.RelayEvent" + parent: "com.signalwire.sdk.relay.RelayEvent" module: "relay.RelayEvent" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/relay/relay-event/conference-event/index.mdx b/fern/products/sdk-reference/java/relay/relay-event/conference-event/index.mdx index a597ec7348..fcaf23c75a 100644 --- a/fern/products/sdk-reference/java/relay/relay-event/conference-event/index.mdx +++ b/fern/products/sdk-reference/java/relay/relay-event/conference-event/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.relay.RelayEvent.ConferenceEvent" - parent: "relay.relay.RelayEvent" + parent: "com.signalwire.sdk.relay.RelayEvent" module: "relay.RelayEvent" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/relay/relay-event/index.mdx b/fern/products/sdk-reference/java/relay/relay-event/index.mdx index a895617bd4..4759326efb 100644 --- a/fern/products/sdk-reference/java/relay/relay-event/index.mdx +++ b/fern/products/sdk-reference/java/relay/relay-event/index.mdx @@ -36,6 +36,90 @@ Subclasses provide typed access to specific event payloads. public class RelayEvent ``` +## Classes + + + + Authorization state event (`signalwire.authorization.state`). + + + + Collect event (`calling.call.collect`). + + + + Connect event (`calling.call.connect`). + + + + Detect event (`calling.call.detect`). + + + + Dial completion event (`calling.call.dial`). <p> Note: No top-level `call_id`. + + + + Fax event (`calling.call.fax`). + + + + Pay event (`calling.call.pay`). + + + + Play event (`calling.call.play`). + + + + Inbound call event (`calling.call.receive`). + + + + Record event (`calling.call.record`). + + + + Refer event (`calling.call.refer`). + + + + Send digits event (`calling.call.send_digits`). + + + + Call state change event (`calling.call.state`). + + + + Stream event (`calling.call.stream`). + + + + Tap event (`calling.call.tap`). + + + + Transcribe event (`calling.call.transcribe`). + + + + Conference event (`calling.conference`). + + + + Inbound messaging event (`messaging.receive`). + + + + Outbound messaging state event (`messaging.state`). + + + + Queue event (`calling.queue`). + + + ## Methods ### \ diff --git a/fern/products/sdk-reference/java/relay/relay-event/index__2.mdx b/fern/products/sdk-reference/java/relay/relay-event/index__2.mdx deleted file mode 100644 index e4fe5c1f73..0000000000 --- a/fern/products/sdk-reference/java/relay/relay-event/index__2.mdx +++ /dev/null @@ -1,98 +0,0 @@ ---- -slug: "/reference/java/relay/relay-event/index__2" -title: "RelayEvent" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "module" - language: "java" - qualified_name: "relay.relay.RelayEvent" - parent: "com.signalwire.sdk.relay" - module: "relay" ---- -# `RelayEvent` - -## Classes - - - - Authorization state event (`signalwire.authorization.state`). - - - - Collect event (`calling.call.collect`). - - - - Connect event (`calling.call.connect`). - - - - Detect event (`calling.call.detect`). - - - - Dial completion event (`calling.call.dial`). <p> Note: No top-level `call_id`. - - - - Fax event (`calling.call.fax`). - - - - Pay event (`calling.call.pay`). - - - - Play event (`calling.call.play`). - - - - Inbound call event (`calling.call.receive`). - - - - Record event (`calling.call.record`). - - - - Refer event (`calling.call.refer`). - - - - Send digits event (`calling.call.send_digits`). - - - - Call state change event (`calling.call.state`). - - - - Stream event (`calling.call.stream`). - - - - Tap event (`calling.call.tap`). - - - - Transcribe event (`calling.call.transcribe`). - - - - Conference event (`calling.conference`). - - - - Inbound messaging event (`messaging.receive`). - - - - Outbound messaging state event (`messaging.state`). - - - - Queue event (`calling.queue`). - - diff --git a/fern/products/sdk-reference/java/relay/relay-event/messaging-receive-event/index.mdx b/fern/products/sdk-reference/java/relay/relay-event/messaging-receive-event/index.mdx index 55aeb51f21..521166e209 100644 --- a/fern/products/sdk-reference/java/relay/relay-event/messaging-receive-event/index.mdx +++ b/fern/products/sdk-reference/java/relay/relay-event/messaging-receive-event/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.relay.RelayEvent.MessagingReceiveEvent" - parent: "relay.relay.RelayEvent" + parent: "com.signalwire.sdk.relay.RelayEvent" module: "relay.RelayEvent" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/relay/relay-event/messaging-state-event/index.mdx b/fern/products/sdk-reference/java/relay/relay-event/messaging-state-event/index.mdx index b9dd3cbf19..bd6fae09be 100644 --- a/fern/products/sdk-reference/java/relay/relay-event/messaging-state-event/index.mdx +++ b/fern/products/sdk-reference/java/relay/relay-event/messaging-state-event/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.relay.RelayEvent.MessagingStateEvent" - parent: "relay.relay.RelayEvent" + parent: "com.signalwire.sdk.relay.RelayEvent" module: "relay.RelayEvent" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/relay/relay-event/queue-event/index.mdx b/fern/products/sdk-reference/java/relay/relay-event/queue-event/index.mdx index 427a333ab1..4740ee00d9 100644 --- a/fern/products/sdk-reference/java/relay/relay-event/queue-event/index.mdx +++ b/fern/products/sdk-reference/java/relay/relay-event/queue-event/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.relay.RelayEvent.QueueEvent" - parent: "relay.relay.RelayEvent" + parent: "com.signalwire.sdk.relay.RelayEvent" module: "relay.RelayEvent" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/relay/RelayEvent.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/rest/index.mdx b/fern/products/sdk-reference/java/rest/index.mdx index 3f11d61cbc..a64cab349e 100644 --- a/fern/products/sdk-reference/java/rest/index.mdx +++ b/fern/products/sdk-reference/java/rest/index.mdx @@ -45,8 +45,6 @@ package com.signalwire.sdk.rest - - ## Enums diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-accounts/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-accounts/index.mdx index 60ff87f05a..3cabaa65c4 100644 --- a/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-accounts/index.mdx +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-accounts/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.rest.namespaces.CompatNamespace.CompatAccounts" - parent: "rest.namespaces.namespaces.CompatNamespace" + parent: "com.signalwire.sdk.rest.namespaces.CompatNamespace" module: "rest.namespaces.namespaces.CompatNamespace" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-applications/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-applications/index.mdx index 212180d4e7..73da810219 100644 --- a/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-applications/index.mdx +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-applications/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.rest.namespaces.CompatNamespace.CompatApplications" - parent: "rest.namespaces.namespaces.CompatNamespace" + parent: "com.signalwire.sdk.rest.namespaces.CompatNamespace" module: "rest.namespaces.namespaces.CompatNamespace" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-calls/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-calls/index.mdx index e9195f1e96..3895ea8afd 100644 --- a/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-calls/index.mdx +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-calls/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.rest.namespaces.CompatNamespace.CompatCalls" - parent: "rest.namespaces.namespaces.CompatNamespace" + parent: "com.signalwire.sdk.rest.namespaces.CompatNamespace" module: "rest.namespaces.namespaces.CompatNamespace" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-conferences/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-conferences/index.mdx index 0de5937789..b559087cd5 100644 --- a/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-conferences/index.mdx +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-conferences/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.rest.namespaces.CompatNamespace.CompatConferences" - parent: "rest.namespaces.namespaces.CompatNamespace" + parent: "com.signalwire.sdk.rest.namespaces.CompatNamespace" module: "rest.namespaces.namespaces.CompatNamespace" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-faxes/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-faxes/index.mdx index 3bf9524072..6fd8b38d04 100644 --- a/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-faxes/index.mdx +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-faxes/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.rest.namespaces.CompatNamespace.CompatFaxes" - parent: "rest.namespaces.namespaces.CompatNamespace" + parent: "com.signalwire.sdk.rest.namespaces.CompatNamespace" module: "rest.namespaces.namespaces.CompatNamespace" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-laml-bins/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-laml-bins/index.mdx index d6cdf3330d..e6def29eec 100644 --- a/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-laml-bins/index.mdx +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-laml-bins/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.rest.namespaces.CompatNamespace.CompatLamlBins" - parent: "rest.namespaces.namespaces.CompatNamespace" + parent: "com.signalwire.sdk.rest.namespaces.CompatNamespace" module: "rest.namespaces.namespaces.CompatNamespace" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-messages/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-messages/index.mdx index ec3068dcca..944bdf1be8 100644 --- a/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-messages/index.mdx +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-messages/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.rest.namespaces.CompatNamespace.CompatMessages" - parent: "rest.namespaces.namespaces.CompatNamespace" + parent: "com.signalwire.sdk.rest.namespaces.CompatNamespace" module: "rest.namespaces.namespaces.CompatNamespace" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-phone-numbers/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-phone-numbers/index.mdx index 030dd67001..5cb846f109 100644 --- a/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-phone-numbers/index.mdx +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-phone-numbers/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.rest.namespaces.CompatNamespace.CompatPhoneNumbers" - parent: "rest.namespaces.namespaces.CompatNamespace" + parent: "com.signalwire.sdk.rest.namespaces.CompatNamespace" module: "rest.namespaces.namespaces.CompatNamespace" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-queues/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-queues/index.mdx index 28025b44c9..d646fedb26 100644 --- a/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-queues/index.mdx +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-queues/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.rest.namespaces.CompatNamespace.CompatQueues" - parent: "rest.namespaces.namespaces.CompatNamespace" + parent: "com.signalwire.sdk.rest.namespaces.CompatNamespace" module: "rest.namespaces.namespaces.CompatNamespace" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-recordings/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-recordings/index.mdx index 8c597add9b..e64893def4 100644 --- a/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-recordings/index.mdx +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-recordings/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.rest.namespaces.CompatNamespace.CompatRecordings" - parent: "rest.namespaces.namespaces.CompatNamespace" + parent: "com.signalwire.sdk.rest.namespaces.CompatNamespace" module: "rest.namespaces.namespaces.CompatNamespace" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-tokens/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-tokens/index.mdx index 4cf720a7e7..9a7f3474d6 100644 --- a/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-tokens/index.mdx +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-tokens/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.rest.namespaces.CompatNamespace.CompatTokens" - parent: "rest.namespaces.namespaces.CompatNamespace" + parent: "com.signalwire.sdk.rest.namespaces.CompatNamespace" module: "rest.namespaces.namespaces.CompatNamespace" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-transcriptions/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-transcriptions/index.mdx index fb30b12133..405507281a 100644 --- a/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-transcriptions/index.mdx +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/compat-transcriptions/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.rest.namespaces.CompatNamespace.CompatTranscriptions" - parent: "rest.namespaces.namespaces.CompatNamespace" + parent: "com.signalwire.sdk.rest.namespaces.CompatNamespace" module: "rest.namespaces.namespaces.CompatNamespace" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/CompatNamespace.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/index.mdx index 19377a89a9..423f73518b 100644 --- a/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/index.mdx +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/index.mdx @@ -30,6 +30,58 @@ paths here begin with `/laml/2010-04-01/Accounts/...`. public class CompatNamespace ``` +## Classes + + + + Compat account / sub-project management. <p>Mirrors `signalwire.rest.namespaces.compat.CompatAccounts`: accounts.create lives at the top-level `/Accounts` collection (no AccountSid prefix); accounts.get/update operate on `/Accounts/{sid`\}. + + + + Compat application management. + + + + Compat call management with recording and stream sub-resources. + + + + Compat conference management with participants, recordings, and stream sub-resources. + + + + Compat fax management with media sub-resources. + + + + Compat cXML/LaML script bin management. + + + + Compat message management with media sub-resources. + + + + Compat IncomingPhoneNumbers + AvailablePhoneNumbers management. + + + + Compat queue management with member operations. + + + + Compat recording management. + + + + Compat API token management. + + + + Compat transcription management. + + + ## Methods ### \ diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/index__2.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/index__2.mdx deleted file mode 100644 index 3af6a5aa03..0000000000 --- a/fern/products/sdk-reference/java/rest/namespaces/namespaces/compat-namespace/index__2.mdx +++ /dev/null @@ -1,66 +0,0 @@ ---- -slug: "/reference/java/rest/namespaces/namespaces/compat-namespace/index__2" -title: "CompatNamespace" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "module" - language: "java" - qualified_name: "rest.namespaces.namespaces.CompatNamespace" - parent: "com.signalwire.sdk.rest.namespaces" - module: "rest.namespaces.namespaces" ---- -# `CompatNamespace` - -## Classes - - - - Compat account / sub-project management. <p>Mirrors `signalwire.rest.namespaces.compat.CompatAccounts`: accounts.create lives at the top-level `/Accounts` collection (no AccountSid prefix); accounts.get/update operate on `/Accounts/{sid`\}. - - - - Compat application management. - - - - Compat call management with recording and stream sub-resources. - - - - Compat conference management with participants, recordings, and stream sub-resources. - - - - Compat fax management with media sub-resources. - - - - Compat cXML/LaML script bin management. - - - - Compat message management with media sub-resources. - - - - Compat IncomingPhoneNumbers + AvailablePhoneNumbers management. - - - - Compat queue management with member operations. - - - - Compat recording management. - - - - Compat API token management. - - - - Compat transcription management. - - diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/datasphere-namespace/datasphere-documents/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/datasphere-namespace/datasphere-documents/index.mdx index c95476b04e..b6de724da8 100644 --- a/fern/products/sdk-reference/java/rest/namespaces/namespaces/datasphere-namespace/datasphere-documents/index.mdx +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/datasphere-namespace/datasphere-documents/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.rest.namespaces.DatasphereNamespace.DatasphereDocuments" - parent: "rest.namespaces.namespaces.DatasphereNamespace" + parent: "com.signalwire.sdk.rest.namespaces.DatasphereNamespace" module: "rest.namespaces.namespaces.DatasphereNamespace" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/DatasphereNamespace.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/datasphere-namespace/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/datasphere-namespace/index.mdx index e1335aaaff..22a1aa51ac 100644 --- a/fern/products/sdk-reference/java/rest/namespaces/namespaces/datasphere-namespace/index.mdx +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/datasphere-namespace/index.mdx @@ -27,6 +27,14 @@ operations. public class DatasphereNamespace ``` +## Classes + + + + Document management with search and chunk operations. + + + ## Methods ### \ diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/datasphere-namespace/index__2.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/datasphere-namespace/index__2.mdx deleted file mode 100644 index 1e8eebe2a7..0000000000 --- a/fern/products/sdk-reference/java/rest/namespaces/namespaces/datasphere-namespace/index__2.mdx +++ /dev/null @@ -1,22 +0,0 @@ ---- -slug: "/reference/java/rest/namespaces/namespaces/datasphere-namespace/index__2" -title: "DatasphereNamespace" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "module" - language: "java" - qualified_name: "rest.namespaces.namespaces.DatasphereNamespace" - parent: "com.signalwire.sdk.rest.namespaces" - module: "rest.namespaces.namespaces" ---- -# `DatasphereNamespace` - -## Classes - - - - Document management with search and chunk operations. - - diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/call-flows-resource/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/call-flows-resource/index.mdx index 37efb5fb6f..8322f0a755 100644 --- a/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/call-flows-resource/index.mdx +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/call-flows-resource/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.rest.namespaces.FabricNamespace.CallFlowsResource" - parent: "rest.namespaces.namespaces.FabricNamespace" + parent: "com.signalwire.sdk.rest.namespaces.FabricNamespace" module: "rest.namespaces.namespaces.FabricNamespace" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/conference-rooms-resource/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/conference-rooms-resource/index.mdx index d489e98ea3..722bee16a2 100644 --- a/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/conference-rooms-resource/index.mdx +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/conference-rooms-resource/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.rest.namespaces.FabricNamespace.ConferenceRoomsResource" - parent: "rest.namespaces.namespaces.FabricNamespace" + parent: "com.signalwire.sdk.rest.namespaces.FabricNamespace" module: "rest.namespaces.namespaces.FabricNamespace" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/cxml-applications-resource/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/cxml-applications-resource/index.mdx index c9ee78ca85..81a5c1b557 100644 --- a/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/cxml-applications-resource/index.mdx +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/cxml-applications-resource/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.rest.namespaces.FabricNamespace.CxmlApplicationsResource" - parent: "rest.namespaces.namespaces.FabricNamespace" + parent: "com.signalwire.sdk.rest.namespaces.FabricNamespace" module: "rest.namespaces.namespaces.FabricNamespace" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/fabric-addresses/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/fabric-addresses/index.mdx index 406f9ad7de..97bfc3c324 100644 --- a/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/fabric-addresses/index.mdx +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/fabric-addresses/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.rest.namespaces.FabricNamespace.FabricAddresses" - parent: "rest.namespaces.namespaces.FabricNamespace" + parent: "com.signalwire.sdk.rest.namespaces.FabricNamespace" module: "rest.namespaces.namespaces.FabricNamespace" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/fabric-subscribers/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/fabric-subscribers/index.mdx index 6bdd3e1bcf..a062127f27 100644 --- a/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/fabric-subscribers/index.mdx +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/fabric-subscribers/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.rest.namespaces.FabricNamespace.FabricSubscribers" - parent: "rest.namespaces.namespaces.FabricNamespace" + parent: "com.signalwire.sdk.rest.namespaces.FabricNamespace" module: "rest.namespaces.namespaces.FabricNamespace" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/fabric-tokens/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/fabric-tokens/index.mdx index b8e236395e..b17dfb6e78 100644 --- a/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/fabric-tokens/index.mdx +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/fabric-tokens/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.rest.namespaces.FabricNamespace.FabricTokens" - parent: "rest.namespaces.namespaces.FabricNamespace" + parent: "com.signalwire.sdk.rest.namespaces.FabricNamespace" module: "rest.namespaces.namespaces.FabricNamespace" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/generic-resources/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/generic-resources/index.mdx index d85a7f4870..787010ceae 100644 --- a/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/generic-resources/index.mdx +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/generic-resources/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.rest.namespaces.FabricNamespace.GenericResources" - parent: "rest.namespaces.namespaces.FabricNamespace" + parent: "com.signalwire.sdk.rest.namespaces.FabricNamespace" module: "rest.namespaces.namespaces.FabricNamespace" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/FabricNamespace.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/index.mdx index ae9f1e9660..f8461b0940 100644 --- a/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/index.mdx +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/index.mdx @@ -32,6 +32,38 @@ domain-application assignment. public class FabricNamespace ``` +## Classes + + + + Call flows resource — uses PUT for update and rewrites the path segment to singular `call_flow` for sub-collection paths (per the API spec). + + + + Conference rooms — singular `conference_room` for sub-collections. + + + + cXML applications — read/update/delete only (no create endpoint exists). Calling `create` raises `UnsupportedOperationException`. + + + + Read-only fabric addresses collection (top-level). + + + + Subscribers resource with SIP-endpoint sub-resource. + + + + Subscriber, guest, invite, and embed token endpoints (all POST). + + + + Generic operations against `/api/fabric/resources`: list, get, delete, plus address listing and domain-application assignment. + + + ## Methods ### \ diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/index__2.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/index__2.mdx deleted file mode 100644 index 08f5a97478..0000000000 --- a/fern/products/sdk-reference/java/rest/namespaces/namespaces/fabric-namespace/index__2.mdx +++ /dev/null @@ -1,46 +0,0 @@ ---- -slug: "/reference/java/rest/namespaces/namespaces/fabric-namespace/index__2" -title: "FabricNamespace" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "module" - language: "java" - qualified_name: "rest.namespaces.namespaces.FabricNamespace" - parent: "com.signalwire.sdk.rest.namespaces" - module: "rest.namespaces.namespaces" ---- -# `FabricNamespace` - -## Classes - - - - Call flows resource — uses PUT for update and rewrites the path segment to singular `call_flow` for sub-collection paths (per the API spec). - - - - Conference rooms — singular `conference_room` for sub-collections. - - - - cXML applications — read/update/delete only (no create endpoint exists). Calling `create` raises `UnsupportedOperationException`. - - - - Read-only fabric addresses collection (top-level). - - - - Subscribers resource with SIP-endpoint sub-resource. - - - - Subscriber, guest, invite, and embed token endpoints (all POST). - - - - Generic operations against `/api/fabric/resources`: list, get, delete, plus address listing and domain-application assignment. - - diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/index.mdx index f934123a77..af5705e43a 100644 --- a/fern/products/sdk-reference/java/rest/namespaces/namespaces/index.mdx +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/index.mdx @@ -142,21 +142,3 @@ package com.signalwire.sdk.rest.namespaces REST namespace for the Video API: rooms, room sessions/recordings, conferences, conference tokens, and individual streams. <p>Mirrors `signalwire.rest.namespaces.video.VideoNamespace`. - -## Modules - - - - - - - - - - - - - - - - diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/logs-namespace/conference-logs/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/logs-namespace/conference-logs/index.mdx index 120967b8bf..ff796b5720 100644 --- a/fern/products/sdk-reference/java/rest/namespaces/namespaces/logs-namespace/conference-logs/index.mdx +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/logs-namespace/conference-logs/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.rest.namespaces.LogsNamespace.ConferenceLogs" - parent: "rest.namespaces.namespaces.LogsNamespace" + parent: "com.signalwire.sdk.rest.namespaces.LogsNamespace" module: "rest.namespaces.namespaces.LogsNamespace" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/logs-namespace/fax-logs/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/logs-namespace/fax-logs/index.mdx index ec12828251..bcabdb1a24 100644 --- a/fern/products/sdk-reference/java/rest/namespaces/namespaces/logs-namespace/fax-logs/index.mdx +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/logs-namespace/fax-logs/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.rest.namespaces.LogsNamespace.FaxLogs" - parent: "rest.namespaces.namespaces.LogsNamespace" + parent: "com.signalwire.sdk.rest.namespaces.LogsNamespace" module: "rest.namespaces.namespaces.LogsNamespace" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/logs-namespace/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/logs-namespace/index.mdx index 5c3e0bb295..baab27f9e5 100644 --- a/fern/products/sdk-reference/java/rest/namespaces/namespaces/logs-namespace/index.mdx +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/logs-namespace/index.mdx @@ -27,6 +27,26 @@ voice → /voice/logs, fax → /fax/logs, conference → /logs/conferences). public class LogsNamespace ``` +## Classes + + + + Conference logs — list-only. + + + + Fax logs — list + per-id get. + + + + Read-only logs supporting list + per-id get. + + + + Voice logs add a per-id events sub-collection. + + + ## Methods ### \ diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/logs-namespace/index__2.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/logs-namespace/index__2.mdx deleted file mode 100644 index 55ecf0342f..0000000000 --- a/fern/products/sdk-reference/java/rest/namespaces/namespaces/logs-namespace/index__2.mdx +++ /dev/null @@ -1,34 +0,0 @@ ---- -slug: "/reference/java/rest/namespaces/namespaces/logs-namespace/index__2" -title: "LogsNamespace" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "module" - language: "java" - qualified_name: "rest.namespaces.namespaces.LogsNamespace" - parent: "com.signalwire.sdk.rest.namespaces" - module: "rest.namespaces.namespaces" ---- -# `LogsNamespace` - -## Classes - - - - Conference logs — list-only. - - - - Fax logs — list + per-id get. - - - - Read-only logs supporting list + per-id get. - - - - Voice logs add a per-id events sub-collection. - - diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/logs-namespace/message-logs/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/logs-namespace/message-logs/index.mdx index 15b5574090..df8ce348c6 100644 --- a/fern/products/sdk-reference/java/rest/namespaces/namespaces/logs-namespace/message-logs/index.mdx +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/logs-namespace/message-logs/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.rest.namespaces.LogsNamespace.MessageLogs" - parent: "rest.namespaces.namespaces.LogsNamespace" + parent: "com.signalwire.sdk.rest.namespaces.LogsNamespace" module: "rest.namespaces.namespaces.LogsNamespace" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/logs-namespace/voice-logs/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/logs-namespace/voice-logs/index.mdx index 13a7025128..133d483e92 100644 --- a/fern/products/sdk-reference/java/rest/namespaces/namespaces/logs-namespace/voice-logs/index.mdx +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/logs-namespace/voice-logs/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.rest.namespaces.LogsNamespace.VoiceLogs" - parent: "rest.namespaces.namespaces.LogsNamespace" + parent: "com.signalwire.sdk.rest.namespaces.LogsNamespace" module: "rest.namespaces.namespaces.LogsNamespace" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/LogsNamespace.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/project-namespace/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/project-namespace/index.mdx index 84e59440c9..b11a1f353d 100644 --- a/fern/products/sdk-reference/java/rest/namespaces/namespaces/project-namespace/index.mdx +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/project-namespace/index.mdx @@ -27,6 +27,14 @@ DELETE for revoke). public class ProjectNamespace ``` +## Classes + + + + Project API token management. + + + ## Methods ### \ diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/project-namespace/index__2.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/project-namespace/index__2.mdx deleted file mode 100644 index dde6a0994c..0000000000 --- a/fern/products/sdk-reference/java/rest/namespaces/namespaces/project-namespace/index__2.mdx +++ /dev/null @@ -1,22 +0,0 @@ ---- -slug: "/reference/java/rest/namespaces/namespaces/project-namespace/index__2" -title: "ProjectNamespace" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "module" - language: "java" - qualified_name: "rest.namespaces.namespaces.ProjectNamespace" - parent: "com.signalwire.sdk.rest.namespaces" - module: "rest.namespaces.namespaces" ---- -# `ProjectNamespace` - -## Classes - - - - Project API token management. - - diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/project-namespace/project-tokens/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/project-namespace/project-tokens/index.mdx index a9b37885f5..02f622a7cc 100644 --- a/fern/products/sdk-reference/java/rest/namespaces/namespaces/project-namespace/project-tokens/index.mdx +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/project-namespace/project-tokens/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.rest.namespaces.ProjectNamespace.ProjectTokens" - parent: "rest.namespaces.namespaces.ProjectNamespace" + parent: "com.signalwire.sdk.rest.namespaces.ProjectNamespace" module: "rest.namespaces.namespaces.ProjectNamespace" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/ProjectNamespace.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/registry-namespace/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/registry-namespace/index.mdx index dd6da9077c..011354204b 100644 --- a/fern/products/sdk-reference/java/rest/namespaces/namespaces/registry-namespace/index.mdx +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/registry-namespace/index.mdx @@ -26,6 +26,26 @@ All endpoints sit under `/api/relay/rest/registry/beta`. public class RegistryNamespace ``` +## Classes + + + + 10DLC brand management — list / create / get plus brand-scoped campaign sub-resources. + + + + 10DLC campaign management — get / update (PUT) plus number / order sub-resources. + + + + 10DLC number-assignment management — release a number. + + + + 10DLC assignment-order management — read-only get. + + + ## Methods ### \ diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/registry-namespace/index__2.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/registry-namespace/index__2.mdx deleted file mode 100644 index dee855f7de..0000000000 --- a/fern/products/sdk-reference/java/rest/namespaces/namespaces/registry-namespace/index__2.mdx +++ /dev/null @@ -1,34 +0,0 @@ ---- -slug: "/reference/java/rest/namespaces/namespaces/registry-namespace/index__2" -title: "RegistryNamespace" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "module" - language: "java" - qualified_name: "rest.namespaces.namespaces.RegistryNamespace" - parent: "com.signalwire.sdk.rest.namespaces" - module: "rest.namespaces.namespaces" ---- -# `RegistryNamespace` - -## Classes - - - - 10DLC brand management — list / create / get plus brand-scoped campaign sub-resources. - - - - 10DLC campaign management — get / update (PUT) plus number / order sub-resources. - - - - 10DLC number-assignment management — release a number. - - - - 10DLC assignment-order management — read-only get. - - diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/registry-namespace/registry-brands/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/registry-namespace/registry-brands/index.mdx index 7a815414dc..0dabd036d2 100644 --- a/fern/products/sdk-reference/java/rest/namespaces/namespaces/registry-namespace/registry-brands/index.mdx +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/registry-namespace/registry-brands/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.rest.namespaces.RegistryNamespace.RegistryBrands" - parent: "rest.namespaces.namespaces.RegistryNamespace" + parent: "com.signalwire.sdk.rest.namespaces.RegistryNamespace" module: "rest.namespaces.namespaces.RegistryNamespace" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/registry-namespace/registry-campaigns/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/registry-namespace/registry-campaigns/index.mdx index ab32d22ebf..aee4b3db61 100644 --- a/fern/products/sdk-reference/java/rest/namespaces/namespaces/registry-namespace/registry-campaigns/index.mdx +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/registry-namespace/registry-campaigns/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.rest.namespaces.RegistryNamespace.RegistryCampaigns" - parent: "rest.namespaces.namespaces.RegistryNamespace" + parent: "com.signalwire.sdk.rest.namespaces.RegistryNamespace" module: "rest.namespaces.namespaces.RegistryNamespace" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/registry-namespace/registry-numbers/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/registry-namespace/registry-numbers/index.mdx index ce6438e265..83ed24d128 100644 --- a/fern/products/sdk-reference/java/rest/namespaces/namespaces/registry-namespace/registry-numbers/index.mdx +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/registry-namespace/registry-numbers/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.rest.namespaces.RegistryNamespace.RegistryNumbers" - parent: "rest.namespaces.namespaces.RegistryNamespace" + parent: "com.signalwire.sdk.rest.namespaces.RegistryNamespace" module: "rest.namespaces.namespaces.RegistryNamespace" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/registry-namespace/registry-orders/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/registry-namespace/registry-orders/index.mdx index 9dc47b05ea..c0b4608f84 100644 --- a/fern/products/sdk-reference/java/rest/namespaces/namespaces/registry-namespace/registry-orders/index.mdx +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/registry-namespace/registry-orders/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.rest.namespaces.RegistryNamespace.RegistryOrders" - parent: "rest.namespaces.namespaces.RegistryNamespace" + parent: "com.signalwire.sdk.rest.namespaces.RegistryNamespace" module: "rest.namespaces.namespaces.RegistryNamespace" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/RegistryNamespace.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/index.mdx index d6a05fbb4c..b345307588 100644 --- a/fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/index.mdx +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/index.mdx @@ -31,6 +31,34 @@ stream id. public class VideoNamespace ``` +## Classes + + + + Video conferences with token + stream sub-collections. + + + + Video conference tokens (top-level): get + reset. + + + + Top-level video room recordings collection: list, get, delete, plus a per-recording events sub-collection. + + + + Video room management with stream sub-resources. + + + + Video room sessions: list, get, plus events / members / recordings sub-collections. + + + + Top-level streams resource (per stream id): get / update (PUT) / delete. + + + ## Methods ### \ diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/index__2.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/index__2.mdx deleted file mode 100644 index d905f5b125..0000000000 --- a/fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/index__2.mdx +++ /dev/null @@ -1,42 +0,0 @@ ---- -slug: "/reference/java/rest/namespaces/namespaces/video-namespace/index__2" -title: "VideoNamespace" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "module" - language: "java" - qualified_name: "rest.namespaces.namespaces.VideoNamespace" - parent: "com.signalwire.sdk.rest.namespaces" - module: "rest.namespaces.namespaces" ---- -# `VideoNamespace` - -## Classes - - - - Video conferences with token + stream sub-collections. - - - - Video conference tokens (top-level): get + reset. - - - - Top-level video room recordings collection: list, get, delete, plus a per-recording events sub-collection. - - - - Video room management with stream sub-resources. - - - - Video room sessions: list, get, plus events / members / recordings sub-collections. - - - - Top-level streams resource (per stream id): get / update (PUT) / delete. - - diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/video-conference-tokens/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/video-conference-tokens/index.mdx index 5fd7724e27..7ad33e93f2 100644 --- a/fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/video-conference-tokens/index.mdx +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/video-conference-tokens/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.rest.namespaces.VideoNamespace.VideoConferenceTokens" - parent: "rest.namespaces.namespaces.VideoNamespace" + parent: "com.signalwire.sdk.rest.namespaces.VideoNamespace" module: "rest.namespaces.namespaces.VideoNamespace" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/video-conferences/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/video-conferences/index.mdx index 4fd4193d16..052f303a08 100644 --- a/fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/video-conferences/index.mdx +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/video-conferences/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.rest.namespaces.VideoNamespace.VideoConferences" - parent: "rest.namespaces.namespaces.VideoNamespace" + parent: "com.signalwire.sdk.rest.namespaces.VideoNamespace" module: "rest.namespaces.namespaces.VideoNamespace" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/video-room-recordings/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/video-room-recordings/index.mdx index 30fa4055fd..86029428c5 100644 --- a/fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/video-room-recordings/index.mdx +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/video-room-recordings/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.rest.namespaces.VideoNamespace.VideoRoomRecordings" - parent: "rest.namespaces.namespaces.VideoNamespace" + parent: "com.signalwire.sdk.rest.namespaces.VideoNamespace" module: "rest.namespaces.namespaces.VideoNamespace" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/video-room-sessions/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/video-room-sessions/index.mdx index 5c6704084b..e376eb9270 100644 --- a/fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/video-room-sessions/index.mdx +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/video-room-sessions/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.rest.namespaces.VideoNamespace.VideoRoomSessions" - parent: "rest.namespaces.namespaces.VideoNamespace" + parent: "com.signalwire.sdk.rest.namespaces.VideoNamespace" module: "rest.namespaces.namespaces.VideoNamespace" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/video-rooms/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/video-rooms/index.mdx index ee2eb51f54..f4dd11a002 100644 --- a/fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/video-rooms/index.mdx +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/video-rooms/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.rest.namespaces.VideoNamespace.VideoRooms" - parent: "rest.namespaces.namespaces.VideoNamespace" + parent: "com.signalwire.sdk.rest.namespaces.VideoNamespace" module: "rest.namespaces.namespaces.VideoNamespace" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/video-streams/index.mdx b/fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/video-streams/index.mdx index 49da1710ca..0cc4313223 100644 --- a/fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/video-streams/index.mdx +++ b/fern/products/sdk-reference/java/rest/namespaces/namespaces/video-namespace/video-streams/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.rest.namespaces.VideoNamespace.VideoStreams" - parent: "rest.namespaces.namespaces.VideoNamespace" + parent: "com.signalwire.sdk.rest.namespaces.VideoNamespace" module: "rest.namespaces.namespaces.VideoNamespace" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/namespaces/VideoNamespace.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/rest/rest-client/builder/index.mdx b/fern/products/sdk-reference/java/rest/rest-client/builder/index.mdx index 21f2f792d6..d75996ef87 100644 --- a/fern/products/sdk-reference/java/rest/rest-client/builder/index.mdx +++ b/fern/products/sdk-reference/java/rest/rest-client/builder/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk.rest.RestClient.Builder" - parent: "rest.rest.RestClient" + parent: "com.signalwire.sdk.rest.RestClient" module: "rest.RestClient" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/rest/RestClient.java" visibility: "public" diff --git a/fern/products/sdk-reference/java/rest/rest-client/index.mdx b/fern/products/sdk-reference/java/rest/rest-client/index.mdx index ea74353289..c206a92738 100644 --- a/fern/products/sdk-reference/java/rest/rest-client/index.mdx +++ b/fern/products/sdk-reference/java/rest/rest-client/index.mdx @@ -38,6 +38,12 @@ var docs = client.datasphere().documents().list();</pre> public class RestClient ``` +## Classes + + + + + ## Methods ### addresses diff --git a/fern/products/sdk-reference/java/rest/rest-client/index__2.mdx b/fern/products/sdk-reference/java/rest/rest-client/index__2.mdx deleted file mode 100644 index 2d95974161..0000000000 --- a/fern/products/sdk-reference/java/rest/rest-client/index__2.mdx +++ /dev/null @@ -1,20 +0,0 @@ ---- -slug: "/reference/java/rest/rest-client/index__2" -title: "RestClient" -sdk_label: "Java SDK" -icon: "java" -lustri: - auto_generated: true - kind: "module" - language: "java" - qualified_name: "rest.rest.RestClient" - parent: "com.signalwire.sdk.rest" - module: "rest" ---- -# `RestClient` - -## Classes - - - - diff --git a/fern/products/sdk-reference/php/_meta.json b/fern/products/sdk-reference/php/_meta.json index 1a73f87f6c..5629ad2571 100644 --- a/fern/products/sdk-reference/php/_meta.json +++ b/fern/products/sdk-reference/php/_meta.json @@ -6,5 +6,5 @@ "format": "mdx", "platform": "fern", "base_slug": "/reference/php", - "item_count": 1631 + "item_count": 1626 } \ No newline at end of file diff --git a/fern/products/sdk-reference/php/agents/index.mdx b/fern/products/sdk-reference/php/agents/index.mdx index 64b179bd65..8833741bac 100644 --- a/fern/products/sdk-reference/php/agents/index.mdx +++ b/fern/products/sdk-reference/php/agents/index.mdx @@ -15,6 +15,12 @@ lustri: + + + + + Auto-detect and handle serverless environments (Lambda, GCF, Azure, CGI) + ## Modules @@ -24,10 +30,6 @@ lustri: - - - - diff --git a/fern/products/sdk-reference/php/agents/server/index.mdx b/fern/products/sdk-reference/php/agents/server/index.mdx index 94f63ac942..c06d869d62 100644 --- a/fern/products/sdk-reference/php/agents/server/index.mdx +++ b/fern/products/sdk-reference/php/agents/server/index.mdx @@ -5,22 +5,473 @@ sdk_label: "PHP SDK" icon: "php" lustri: auto_generated: true - kind: "module" + kind: "class" language: "php" qualified_name: "SignalWire\\Server" parent: "agents" module: "agents" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php" --- # `Server` ## Signature ```php -namespace SignalWire\Server +class AgentServer ``` -## Modules +## Methods - - - +### \_\_construct + +#### Signature + +```php +public function __construct( + ?string $host = NULL, + ?int $port = NULL, + string $logLevel = 'info' +) +``` + +#### Parameters + + + + + + + +#### Source + +[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) + +Line 59. + +*** + +### getAgent + +Get an agent by route. + +#### Signature + +```php +public function getAgent(string $route): ?SignalWire\Agent\AgentBase +``` + +#### Parameters + + + +#### Returns + +`?SignalWire\Agent\AgentBase` + +#### Source + +[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) + +Line 119. + +*** + +### getAgents + +Get all registered routes (sorted). + +#### Signature + +```php +public function getAgents(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) + +Line 109. + +*** + +### getHost + +#### Signature + +```php +public function getHost(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) + +Line 424. + +*** + +### getPort + +#### Signature + +```php +public function getPort(): int +``` + +#### Returns + +`int` + +#### Source + +[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) + +Line 429. + +*** + +### getSipAutoMap + +#### Signature + +```php +public function getSipAutoMap(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) + +Line 178. + +*** + +### getSipRoute + +#### Signature + +```php +public function getSipRoute(): string +``` + +#### Returns + +`string` + +#### Source + +[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) + +Line 173. + +*** + +### getSipUsernameMapping + +Get the SIP username mapping. + +#### Signature + +```php +public function getSipUsernameMapping(): array +``` + +#### Returns + +`array` + +#### Source + +[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) + +Line 206. + +*** + +### handleRequest + +Handle an HTTP request and return \[status, headers, body]. + +#### Signature + +```php +public function handleRequest( + string $method, + string $path, + array $headers = array ( +), + ?string $body = NULL +): array +``` + +#### Parameters + + + + + + + + + +#### Returns + +`array` + +#### Source + +[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) + +Line 242. + +*** + +### isSipRoutingEnabled + +Check if SIP routing is enabled. + +#### Signature + +```php +public function isSipRoutingEnabled(): bool +``` + +#### Returns + +`bool` + +#### Source + +[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) + +Line 196. + +*** + +### register + +Register an agent at a route. + +#### Signature + +```php +public function register( + SignalWire\Agent\AgentBase $agent, + ?string $route = NULL +): SignalWire\Server\AgentServer +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire\Server\AgentServer` + +#### Throws + +- `\RuntimeException` — If the route is already registered. + +#### Source + +[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) + +Line 79. + +*** + +### registerSipUsername + +Map a SIP username to a route. + +#### Signature + +```php +public function registerSipUsername( + string $username, + string $route +): SignalWire\Server\AgentServer +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire\Server\AgentServer` + +#### Source + +[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) + +Line 186. + +*** + +### run + +Start the server (blocking). + +#### Signature + +```php +public function run(): void +``` + +#### Source + +[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) + +Line 296. + +*** + +### serve + +Start the server (blocking). + +Mirrors Python's AgentServer SSL handling: when `SWML_SSL_ENABLED` is +truthy and `SWML_SSL_CERT_PATH` / `SWML_SSL_KEY_PATH` point at a +readable cert + key, the server is served over verified HTTPS via a +Workerman SSL worker. Otherwise it falls back to PHP's built-in +(plaintext HTTP) server. + +#### Signature + +```php +public function serve(): void +``` + +#### Source + +[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) + +Line 310. + +*** + +### serveStatic + +Serve static files from a directory under a URL prefix. + +#### Signature + +```php +public function serveStatic( + string $directory, + string $urlPrefix +): SignalWire\Server\AgentServer +``` + +#### Parameters + + + + + +#### Returns + +`SignalWire\Server\AgentServer` + +#### Throws + +- `\RuntimeException` — If the directory does not exist. + +#### Source + +[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) + +Line 220. + +*** + +### setupSipRouting + +Set up central SIP-based routing for the server. + +Mirrors Python's AgentServer.setup\_sip\_routing(route, auto\_map). When +called with no args, defaults match Python: route="/sip", auto\_map=true. + +#### Signature + +```php +public function setupSipRouting( + string $route = '/sip', + bool $auto_map = true +): SignalWire\Server\AgentServer +``` + +#### Parameters + + + Path for SIP routing (default "/sip"). Leading slash is added if missing; trailing slash is stripped. + + + + If true, existing agents have their SIP usernames auto-derived from their route. + + +#### Returns + +`SignalWire\Server\AgentServer` + +#### Source + +[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) + +Line 141. + +*** + +### unregister + +Unregister an agent from a route. + +#### Signature + +```php +public function unregister(string $route): SignalWire\Server\AgentServer +``` + +#### Parameters + + + +#### Returns + +`SignalWire\Server\AgentServer` + +#### Source + +[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) + +Line 96. + +## Source + +[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) + +Line 10. diff --git a/fern/products/sdk-reference/php/agents/server/server/agent-server/index.mdx b/fern/products/sdk-reference/php/agents/server/server/agent-server/index.mdx deleted file mode 100644 index caa7c42d35..0000000000 --- a/fern/products/sdk-reference/php/agents/server/server/agent-server/index.mdx +++ /dev/null @@ -1,477 +0,0 @@ ---- -slug: "/reference/php/agents/server/server/agent-server" -title: "AgentServer" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\Server\\AgentServer" - parent: "agents.Server.Server" - module: "agents.Server.Server" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php" ---- -# `AgentServer` - -## Signature - -```php -class AgentServer -``` - -## Methods - -### \_\_construct - -#### Signature - -```php -public function __construct( - ?string $host = NULL, - ?int $port = NULL, - string $logLevel = 'info' -) -``` - -#### Parameters - - - - - - - -#### Source - -[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) - -Line 59. - -*** - -### getAgent - -Get an agent by route. - -#### Signature - -```php -public function getAgent(string $route): ?SignalWire\Agent\AgentBase -``` - -#### Parameters - - - -#### Returns - -`?SignalWire\Agent\AgentBase` - -#### Source - -[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) - -Line 119. - -*** - -### getAgents - -Get all registered routes (sorted). - -#### Signature - -```php -public function getAgents(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) - -Line 109. - -*** - -### getHost - -#### Signature - -```php -public function getHost(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) - -Line 424. - -*** - -### getPort - -#### Signature - -```php -public function getPort(): int -``` - -#### Returns - -`int` - -#### Source - -[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) - -Line 429. - -*** - -### getSipAutoMap - -#### Signature - -```php -public function getSipAutoMap(): bool -``` - -#### Returns - -`bool` - -#### Source - -[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) - -Line 178. - -*** - -### getSipRoute - -#### Signature - -```php -public function getSipRoute(): string -``` - -#### Returns - -`string` - -#### Source - -[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) - -Line 173. - -*** - -### getSipUsernameMapping - -Get the SIP username mapping. - -#### Signature - -```php -public function getSipUsernameMapping(): array -``` - -#### Returns - -`array` - -#### Source - -[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) - -Line 206. - -*** - -### handleRequest - -Handle an HTTP request and return \[status, headers, body]. - -#### Signature - -```php -public function handleRequest( - string $method, - string $path, - array $headers = array ( -), - ?string $body = NULL -): array -``` - -#### Parameters - - - - - - - - - -#### Returns - -`array` - -#### Source - -[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) - -Line 242. - -*** - -### isSipRoutingEnabled - -Check if SIP routing is enabled. - -#### Signature - -```php -public function isSipRoutingEnabled(): bool -``` - -#### Returns - -`bool` - -#### Source - -[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) - -Line 196. - -*** - -### register - -Register an agent at a route. - -#### Signature - -```php -public function register( - SignalWire\Agent\AgentBase $agent, - ?string $route = NULL -): SignalWire\Server\AgentServer -``` - -#### Parameters - - - - - -#### Returns - -`SignalWire\Server\AgentServer` - -#### Throws - -- `\RuntimeException` — If the route is already registered. - -#### Source - -[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) - -Line 79. - -*** - -### registerSipUsername - -Map a SIP username to a route. - -#### Signature - -```php -public function registerSipUsername( - string $username, - string $route -): SignalWire\Server\AgentServer -``` - -#### Parameters - - - - - -#### Returns - -`SignalWire\Server\AgentServer` - -#### Source - -[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) - -Line 186. - -*** - -### run - -Start the server (blocking). - -#### Signature - -```php -public function run(): void -``` - -#### Source - -[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) - -Line 296. - -*** - -### serve - -Start the server (blocking). - -Mirrors Python's AgentServer SSL handling: when `SWML_SSL_ENABLED` is -truthy and `SWML_SSL_CERT_PATH` / `SWML_SSL_KEY_PATH` point at a -readable cert + key, the server is served over verified HTTPS via a -Workerman SSL worker. Otherwise it falls back to PHP's built-in -(plaintext HTTP) server. - -#### Signature - -```php -public function serve(): void -``` - -#### Source - -[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) - -Line 310. - -*** - -### serveStatic - -Serve static files from a directory under a URL prefix. - -#### Signature - -```php -public function serveStatic( - string $directory, - string $urlPrefix -): SignalWire\Server\AgentServer -``` - -#### Parameters - - - - - -#### Returns - -`SignalWire\Server\AgentServer` - -#### Throws - -- `\RuntimeException` — If the directory does not exist. - -#### Source - -[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) - -Line 220. - -*** - -### setupSipRouting - -Set up central SIP-based routing for the server. - -Mirrors Python's AgentServer.setup\_sip\_routing(route, auto\_map). When -called with no args, defaults match Python: route="/sip", auto\_map=true. - -#### Signature - -```php -public function setupSipRouting( - string $route = '/sip', - bool $auto_map = true -): SignalWire\Server\AgentServer -``` - -#### Parameters - - - Path for SIP routing (default "/sip"). Leading slash is added if missing; trailing slash is stripped. - - - - If true, existing agents have their SIP usernames auto-derived from their route. - - -#### Returns - -`SignalWire\Server\AgentServer` - -#### Source - -[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) - -Line 141. - -*** - -### unregister - -Unregister an agent from a route. - -#### Signature - -```php -public function unregister(string $route): SignalWire\Server\AgentServer -``` - -#### Parameters - - - -#### Returns - -`SignalWire\Server\AgentServer` - -#### Source - -[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) - -Line 96. - -## Source - -[`SignalWire/Server/AgentServer.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Server/AgentServer.php) - -Line 10. diff --git a/fern/products/sdk-reference/php/agents/server/server/index.mdx b/fern/products/sdk-reference/php/agents/server/server/index.mdx deleted file mode 100644 index 05d430d33b..0000000000 --- a/fern/products/sdk-reference/php/agents/server/server/index.mdx +++ /dev/null @@ -1,20 +0,0 @@ ---- -slug: "/reference/php/agents/server/server" -title: "Server" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "module" - language: "php" - qualified_name: "agents.Server.Server" - parent: "SignalWire\\Server" - module: "agents.Server" ---- -# `Server` - -## Classes - - - - diff --git a/fern/products/sdk-reference/php/agents/serverless/index.mdx b/fern/products/sdk-reference/php/agents/serverless/index.mdx index 6ef0752ab8..e6f3b6c14e 100644 --- a/fern/products/sdk-reference/php/agents/serverless/index.mdx +++ b/fern/products/sdk-reference/php/agents/serverless/index.mdx @@ -5,18 +5,23 @@ sdk_label: "PHP SDK" icon: "php" lustri: auto_generated: true - kind: "module" + kind: "class" language: "php" qualified_name: "SignalWire\\Serverless" parent: "agents" module: "agents" + source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Serverless/Adapter.php" --- # `Serverless` +Auto-detect and handle serverless environments (Lambda, GCF, Azure, CGI) + +or fall back to the built-in PHP server. + ## Signature ```php -namespace SignalWire\Serverless +class Adapter ``` ## Modules @@ -24,3 +29,237 @@ namespace SignalWire\Serverless + +## Methods + +### detect + +Detect the current runtime environment. + +**Modifiers:** `static` + +#### Signature + +```php +public static function detect(): string +``` + +#### Returns + +`string` — One of 'lambda', 'gcf', 'azure', 'cgi', or 'server'. For a typed result, see \{@see detectMode()\}. + +#### Source + +[`SignalWire/Serverless/Adapter.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Serverless/Adapter.php) + +Line 19. + +*** + +### detectMode + +Detect the current runtime environment as a typed \{@see ExecutionMode\}. + +The typed counterpart to \{@see detect()\}: same detection logic and +precedence, but returns the enum (autocompletion, exhaustive `match`, +`->isServerless()`) instead of a bare string. `detectMode()->value` +equals `detect()`. + +**Modifiers:** `static` + +#### Signature + +```php +public static function detectMode(): SignalWire\Serverless\ExecutionMode +``` + +#### Returns + +`SignalWire\Serverless\ExecutionMode` + +#### Source + +[`SignalWire/Serverless/Adapter.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Serverless/Adapter.php) + +Line 32. + +*** + +### handleAzure + +Handle an Azure Functions invocation. + +Extracts method, path, headers, and body from the Azure request +array, calls agent->handleRequest(), and returns an Azure-compatible +response array. + +**Modifiers:** `static` + +#### Signature + +```php +public static function handleAzure(object $agent, array $request): array +``` + +#### Parameters + + + An AgentBase or Service instance with handleRequest(). + + + + The Azure Functions HTTP request array. + + +#### Returns + +`array` — Azure response format \{status, headers, body\}. + +#### Source + +[`SignalWire/Serverless/Adapter.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Serverless/Adapter.php) + +Line 141. + +*** + +### handleCgi + +Handle a CGI/FastCGI invocation. + +Reads REQUEST\_METHOD, PATH\_INFO, CONTENT\_TYPE from $_SERVER, +reads body from php://input, parses headers from HTTP_\* env vars, +and outputs the status line, headers, and body to stdout. + +**Modifiers:** `static` + +#### Signature + +```php +public static function handleCgi(object $agent): void +``` + +#### Parameters + + + An AgentBase or Service instance with handleRequest(). + + +#### Source + +[`SignalWire/Serverless/Adapter.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Serverless/Adapter.php) + +Line 171. + +*** + +### handleGcf + +Handle a Google Cloud Function invocation. + +Reads from php://input and $\_SERVER, calls agent->handleRequest(), +then outputs headers and body directly to the response stream. + +**Modifiers:** `static` + +#### Signature + +```php +public static function handleGcf(object $agent): void +``` + +#### Parameters + + + An AgentBase or Service instance with handleRequest(). + + +#### Source + +[`SignalWire/Serverless/Adapter.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Serverless/Adapter.php) + +Line 103. + +*** + +### handleLambda + +Handle an AWS Lambda (API Gateway) invocation. + +Extracts method, path, headers, and body from the API Gateway event +format, calls agent->handleRequest(), and returns an API Gateway +compatible response. + +**Modifiers:** `static` + +#### Signature + +```php +public static function handleLambda(object $agent, array $event, object $context): array +``` + +#### Parameters + + + An AgentBase or Service instance with handleRequest(). + + + + The API Gateway event payload. + + + + The Lambda context object. + + +#### Returns + +`array` — API Gateway response format \{statusCode, headers, body\}. + +#### Source + +[`SignalWire/Serverless/Adapter.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Serverless/Adapter.php) + +Line 65. + +*** + +### serve + +Auto-detect the runtime environment and serve the agent. + +For serverless environments, calls the appropriate handler. +For 'server', calls agent->run(). + +**Modifiers:** `static` + +#### Signature + +```php +public static function serve( + object $agent, + SignalWire\Serverless\ExecutionMode|string|null $mode = NULL +): void +``` + +#### Parameters + + + An AgentBase or Service instance. + + + + Optional explicit mode override. Pass an \{@see ExecutionMode\} (typed) or its backing string ('lambda'/'gcf'/'azure'/'cgi'/'server', for parity) to pin the dispatch instead of auto-detecting via \{@see detectMode()\}. An out-of-set string raises \ValueError. Defaults to null (auto-detect), preserving the original single-argument behaviour. + + +#### Source + +[`SignalWire/Serverless/Adapter.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Serverless/Adapter.php) + +Line 221. + +## Source + +[`SignalWire/Serverless/Adapter.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Serverless/Adapter.php) + +Line 11. diff --git a/fern/products/sdk-reference/php/agents/serverless/serverless/adapter/index.mdx b/fern/products/sdk-reference/php/agents/serverless/serverless/adapter/index.mdx deleted file mode 100644 index cad04cd995..0000000000 --- a/fern/products/sdk-reference/php/agents/serverless/serverless/adapter/index.mdx +++ /dev/null @@ -1,259 +0,0 @@ ---- -slug: "/reference/php/agents/serverless/serverless/adapter" -title: "Adapter" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "class" - language: "php" - qualified_name: "SignalWire\\Serverless\\Adapter" - parent: "agents.Serverless.Serverless" - module: "agents.Serverless.Serverless" - source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Serverless/Adapter.php" ---- -# `Adapter` - -Auto-detect and handle serverless environments (Lambda, GCF, Azure, CGI) - -or fall back to the built-in PHP server. - -## Signature - -```php -class Adapter -``` - -## Methods - -### detect - -Detect the current runtime environment. - -**Modifiers:** `static` - -#### Signature - -```php -public static function detect(): string -``` - -#### Returns - -`string` — One of 'lambda', 'gcf', 'azure', 'cgi', or 'server'. For a typed result, see \{@see detectMode()\}. - -#### Source - -[`SignalWire/Serverless/Adapter.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Serverless/Adapter.php) - -Line 19. - -*** - -### detectMode - -Detect the current runtime environment as a typed \{@see ExecutionMode\}. - -The typed counterpart to \{@see detect()\}: same detection logic and -precedence, but returns the enum (autocompletion, exhaustive `match`, -`->isServerless()`) instead of a bare string. `detectMode()->value` -equals `detect()`. - -**Modifiers:** `static` - -#### Signature - -```php -public static function detectMode(): SignalWire\Serverless\ExecutionMode -``` - -#### Returns - -`SignalWire\Serverless\ExecutionMode` - -#### Source - -[`SignalWire/Serverless/Adapter.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Serverless/Adapter.php) - -Line 32. - -*** - -### handleAzure - -Handle an Azure Functions invocation. - -Extracts method, path, headers, and body from the Azure request -array, calls agent->handleRequest(), and returns an Azure-compatible -response array. - -**Modifiers:** `static` - -#### Signature - -```php -public static function handleAzure(object $agent, array $request): array -``` - -#### Parameters - - - An AgentBase or Service instance with handleRequest(). - - - - The Azure Functions HTTP request array. - - -#### Returns - -`array` — Azure response format \{status, headers, body\}. - -#### Source - -[`SignalWire/Serverless/Adapter.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Serverless/Adapter.php) - -Line 141. - -*** - -### handleCgi - -Handle a CGI/FastCGI invocation. - -Reads REQUEST\_METHOD, PATH\_INFO, CONTENT\_TYPE from $_SERVER, -reads body from php://input, parses headers from HTTP_\* env vars, -and outputs the status line, headers, and body to stdout. - -**Modifiers:** `static` - -#### Signature - -```php -public static function handleCgi(object $agent): void -``` - -#### Parameters - - - An AgentBase or Service instance with handleRequest(). - - -#### Source - -[`SignalWire/Serverless/Adapter.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Serverless/Adapter.php) - -Line 171. - -*** - -### handleGcf - -Handle a Google Cloud Function invocation. - -Reads from php://input and $\_SERVER, calls agent->handleRequest(), -then outputs headers and body directly to the response stream. - -**Modifiers:** `static` - -#### Signature - -```php -public static function handleGcf(object $agent): void -``` - -#### Parameters - - - An AgentBase or Service instance with handleRequest(). - - -#### Source - -[`SignalWire/Serverless/Adapter.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Serverless/Adapter.php) - -Line 103. - -*** - -### handleLambda - -Handle an AWS Lambda (API Gateway) invocation. - -Extracts method, path, headers, and body from the API Gateway event -format, calls agent->handleRequest(), and returns an API Gateway -compatible response. - -**Modifiers:** `static` - -#### Signature - -```php -public static function handleLambda(object $agent, array $event, object $context): array -``` - -#### Parameters - - - An AgentBase or Service instance with handleRequest(). - - - - The API Gateway event payload. - - - - The Lambda context object. - - -#### Returns - -`array` — API Gateway response format \{statusCode, headers, body\}. - -#### Source - -[`SignalWire/Serverless/Adapter.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Serverless/Adapter.php) - -Line 65. - -*** - -### serve - -Auto-detect the runtime environment and serve the agent. - -For serverless environments, calls the appropriate handler. -For 'server', calls agent->run(). - -**Modifiers:** `static` - -#### Signature - -```php -public static function serve( - object $agent, - SignalWire\Serverless\ExecutionMode|string|null $mode = NULL -): void -``` - -#### Parameters - - - An AgentBase or Service instance. - - - - Optional explicit mode override. Pass an \{@see ExecutionMode\} (typed) or its backing string ('lambda'/'gcf'/'azure'/'cgi'/'server', for parity) to pin the dispatch instead of auto-detecting via \{@see detectMode()\}. An out-of-set string raises \ValueError. Defaults to null (auto-detect), preserving the original single-argument behaviour. - - -#### Source - -[`SignalWire/Serverless/Adapter.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Serverless/Adapter.php) - -Line 221. - -## Source - -[`SignalWire/Serverless/Adapter.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Serverless/Adapter.php) - -Line 11. diff --git a/fern/products/sdk-reference/php/agents/serverless/serverless/index.mdx b/fern/products/sdk-reference/php/agents/serverless/serverless/index.mdx index 28dc0331f6..db81e9313f 100644 --- a/fern/products/sdk-reference/php/agents/serverless/serverless/index.mdx +++ b/fern/products/sdk-reference/php/agents/serverless/serverless/index.mdx @@ -13,14 +13,6 @@ lustri: --- # `Serverless` -## Classes - - - - Auto-detect and handle serverless environments (Lambda, GCF, Azure, CGI) - - - ## Enums ### ExecutionMode diff --git a/fern/products/sdk-reference/php/index.mdx b/fern/products/sdk-reference/php/index.mdx index a99159ad87..6a63c77e1d 100644 --- a/fern/products/sdk-reference/php/index.mdx +++ b/fern/products/sdk-reference/php/index.mdx @@ -13,7 +13,5 @@ lustri: - [`agents`](/docs/sdk-reference/reference/php/agents) - [`core`](/docs/sdk-reference/reference/php/core) - [`Relay`](/docs/sdk-reference/reference/php/relay) -- [`relay`](/docs/sdk-reference/reference/php/relay) - [`REST`](/docs/sdk-reference/reference/php/rest) -- [`rest`](/docs/sdk-reference/reference/php/rest) diff --git a/fern/products/sdk-reference/php/relay/action/index.mdx b/fern/products/sdk-reference/php/relay/action/index.mdx index f6548bf0e6..71d5e4108d 100644 --- a/fern/products/sdk-reference/php/relay/action/index.mdx +++ b/fern/products/sdk-reference/php/relay/action/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "php" qualified_name: "SignalWire\\Relay\\Action" - parent: "relay" + parent: "SignalWire\\Relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php" --- diff --git a/fern/products/sdk-reference/php/relay/ai-action/index.mdx b/fern/products/sdk-reference/php/relay/ai-action/index.mdx index 0c1fa4679d..141545180f 100644 --- a/fern/products/sdk-reference/php/relay/ai-action/index.mdx +++ b/fern/products/sdk-reference/php/relay/ai-action/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "php" qualified_name: "SignalWire\\Relay\\AIAction" - parent: "relay" + parent: "SignalWire\\Relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php" --- diff --git a/fern/products/sdk-reference/php/relay/call/index.mdx b/fern/products/sdk-reference/php/relay/call/index.mdx index 9c4c828a52..0897d43baa 100644 --- a/fern/products/sdk-reference/php/relay/call/index.mdx +++ b/fern/products/sdk-reference/php/relay/call/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "php" qualified_name: "SignalWire\\Relay\\Call" - parent: "relay" + parent: "SignalWire\\Relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Call.php" --- diff --git a/fern/products/sdk-reference/php/relay/client/index.mdx b/fern/products/sdk-reference/php/relay/client/index.mdx index c1566edc34..ccaae1321f 100644 --- a/fern/products/sdk-reference/php/relay/client/index.mdx +++ b/fern/products/sdk-reference/php/relay/client/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "php" qualified_name: "SignalWire\\Relay\\Client" - parent: "relay" + parent: "SignalWire\\Relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Client.php" --- diff --git a/fern/products/sdk-reference/php/relay/collect-action/index.mdx b/fern/products/sdk-reference/php/relay/collect-action/index.mdx index 58d680520d..1b50a4eea0 100644 --- a/fern/products/sdk-reference/php/relay/collect-action/index.mdx +++ b/fern/products/sdk-reference/php/relay/collect-action/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "php" qualified_name: "SignalWire\\Relay\\CollectAction" - parent: "relay" + parent: "SignalWire\\Relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php" --- diff --git a/fern/products/sdk-reference/php/relay/constants/index.mdx b/fern/products/sdk-reference/php/relay/constants/index.mdx index 659c22e760..60103d450e 100644 --- a/fern/products/sdk-reference/php/relay/constants/index.mdx +++ b/fern/products/sdk-reference/php/relay/constants/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "php" qualified_name: "SignalWire\\Relay\\Constants" - parent: "relay" + parent: "SignalWire\\Relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Constants.php" --- diff --git a/fern/products/sdk-reference/php/relay/detect-action/index.mdx b/fern/products/sdk-reference/php/relay/detect-action/index.mdx index 11b9e31191..0098b3de59 100644 --- a/fern/products/sdk-reference/php/relay/detect-action/index.mdx +++ b/fern/products/sdk-reference/php/relay/detect-action/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "php" qualified_name: "SignalWire\\Relay\\DetectAction" - parent: "relay" + parent: "SignalWire\\Relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php" --- diff --git a/fern/products/sdk-reference/php/relay/device/index.mdx b/fern/products/sdk-reference/php/relay/device/index.mdx index 2db7cadbbc..e26d179985 100644 --- a/fern/products/sdk-reference/php/relay/device/index.mdx +++ b/fern/products/sdk-reference/php/relay/device/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "php" qualified_name: "SignalWire\\Relay\\Device" - parent: "relay" + parent: "SignalWire\\Relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Device.php" --- diff --git a/fern/products/sdk-reference/php/relay/event/index.mdx b/fern/products/sdk-reference/php/relay/event/index.mdx index 1fe9bc0da9..c060f382b5 100644 --- a/fern/products/sdk-reference/php/relay/event/index.mdx +++ b/fern/products/sdk-reference/php/relay/event/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "php" qualified_name: "SignalWire\\Relay\\Event" - parent: "relay" + parent: "SignalWire\\Relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Event.php" --- diff --git a/fern/products/sdk-reference/php/relay/fax-action/index.mdx b/fern/products/sdk-reference/php/relay/fax-action/index.mdx index 08e477ee0d..4e51c169fc 100644 --- a/fern/products/sdk-reference/php/relay/fax-action/index.mdx +++ b/fern/products/sdk-reference/php/relay/fax-action/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "php" qualified_name: "SignalWire\\Relay\\FaxAction" - parent: "relay" + parent: "SignalWire\\Relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php" --- diff --git a/fern/products/sdk-reference/php/relay/index.mdx b/fern/products/sdk-reference/php/relay/index.mdx index e2f97038b2..85ec9e8751 100644 --- a/fern/products/sdk-reference/php/relay/index.mdx +++ b/fern/products/sdk-reference/php/relay/index.mdx @@ -16,3 +16,771 @@ lustri: ```php namespace SignalWire\Relay ``` + +## Classes + + + + Base class for all RELAY call actions (play, record, collect, etc.). + + + + Handle for calling.ai operations. + + + + Represents a RELAY voice call. + + + + RELAY Client – manages the WebSocket connection to SignalWire, sends + + + + Handle for calling.collect (and play\_and\_collect) operations. + + + + + + Handle for calling.detect operations (fax-tone, digit, machine, etc.). + + + + A RELAY `{type, params}` device descriptor, as an immutable typed value + + + + An immutable RELAY event value object. + + + + Handle for calling.fax operations (send or receive). + + + + Represents a RELAY messaging message (SMS / MMS). + + + + Handle for calling.pay operations. + + + + Handle for calling.play operations. + + + + Handle for calling.record operations. + + + + Exception type for RELAY-protocol-level failures. + + + + Handle for calling.stream operations. + + + + Handle for calling.tap operations. + + + + Handle for calling.transcribe operations. + + + + RELAY WebSocket transport. + + + +## Enums + +### CallState + +RELAY call lifecycle state, as a typed, compile-time-checked closed set. + +A call moves through these states over its lifetime: + +``` +created → ringing → answered → ending → ended +``` + +The five members are exactly the \{@see Constants\}::CALL\_STATE\_\* tokens +(grounded in the Python reference's `relay/constants.py` CALL\_STATES tuple); +each backing string IS the wire value the server emits in a +`calling.call.state` event's `call_state` / `state` field. \{@see Call\} +keeps the bare-string `$state` property for parity with the Python reference +(which models state as a plain `str`); this enum is offered ALONGSIDE it via +the typed \{@see Call::callState()\} accessor — autocompletion and an +exhaustive `match` at the call site, with the string preserved. + +``` +$call->state; // 'answered' (string, parity) +$call->callState(); // CallState::Answered (typed) +$call->callState()?->isTerminal(); // false +``` + +Server states can GROW (the wire vocabulary is owned by the server, not the +SDK), so \{@see CallState::tryFromWire()\} maps an unknown value to `null` +rather than throwing — a forward-compatible coerce. This is a PHP +PORT\_ADDITION: the Python reference uses a bare `str`. + +This is the CALL-state vocabulary ONLY. It is deliberately NOT unified with +\{@see DialState\} (dial-outcome) or \{@see MessageState\} (message-delivery) — +three distinct vocabularies that must never be conflated. + +#### Signature + +```php +final enum CallState implements UnitEnum, BackedEnum +``` + +#### Inheritance + +**Implements:** `UnitEnum`, `BackedEnum` + +#### Properties + + + + + +#### Constants + + + The call has been answered and is up. + + + + The call object exists but nothing has happened yet (the default). + + + + The call has ended — the one terminal state. + + + + The call is tearing down. + + + + The call is ringing the destination. + + +#### Variants + + + The call has been answered and is up. + + + + The call object exists but nothing has happened yet (the default). + + + + The call has ended — the one terminal state. + + + + The call is tearing down. + + + + The call is ringing the destination. + + +#### Methods + +##### cases + +**Modifiers:** `static` + +###### Signature + +```php +public static function cases(): array +``` + +###### Returns + +`array` + +*** + +##### from + +**Modifiers:** `static` + +###### Signature + +```php +public static function from(string|int $value): static +``` + +###### Parameters + + + +###### Returns + +`static` + +*** + +##### isTerminal + +True once the call has reached its terminal state. + +Terminal = \{@see CallState::Ended\} only, matching +\{@see Constants\}::CALL\_TERMINAL\_STATES (`['ended' => true]`). A terminal +state is what resolves every in-flight action on the call. + +###### Signature + +```php +public function isTerminal(): bool +``` + +###### Returns + +`bool` + +###### Source + +[`SignalWire/Relay/CallState.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/CallState.php) + +Line 60. + +*** + +##### tryFrom + +**Modifiers:** `static` + +###### Signature + +```php +public static function tryFrom(string|int $value): ?static +``` + +###### Parameters + + + +###### Returns + +`?static` + +*** + +##### tryFromWire + +Coerce a wire string (or null) to this enum, mapping any value outside + +the known closed set — or null — to null instead of throwing. + +Use this when reading a SERVER-emitted state: the wire vocabulary is +owned by the server and may grow, so an unrecognised value is not an +error — the caller falls back to the raw string. (Contrast PHP's +built-in \{@see CallState::from()\}, which throws \ValueError on a miss.) + +**Modifiers:** `static` + +###### Signature + +```php +public static function tryFromWire(?string $wire): ?SignalWire\Relay\CallState +``` + +###### Parameters + + + The raw `call_state` / `state` value from the wire. + + +###### Returns + +`?SignalWire\Relay\CallState` + +###### Source + +[`SignalWire/Relay/CallState.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/CallState.php) + +Line 76. + +#### Source + +[`SignalWire/Relay/CallState.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/CallState.php) + +Line 36. + +*** + +### DialState + +RELAY dial outcome state, as a typed, compile-time-checked closed set. + +A `calling.call.dial` event carries a `dial_state` (or legacy `state`) that +reports how the outbound dial is progressing: + +``` +dialing → (answered | failed | no_answer | busy) +``` + +The Python reference's `RelayClient` documents the core three +(`dialing | answered | failed`, see `relay/client.py`'s dial-event handler); +this port's \{@see Client::handleDialEvent()\} additionally treats the wire's +`no_answer` / `busy` as terminal failures, so they are modelled here too. +Each backing string IS the wire value. \{@see Constants\}::DIAL\_STATE\_\* keeps +the bare-string constants for parity (the Python reference reads +`dial_state` as a plain `str`); this enum is offered ALONGSIDE them. + +``` +DialState::Answered->value; // 'answered' (wire string) +DialState::tryFromWire('failed'); // DialState::Failed +DialState::Failed->isTerminal(); // true +DialState::Dialing->isTerminal(); // false (still in progress) +``` + +Server states can GROW, so \{@see DialState::tryFromWire()\} maps an unknown +value to `null` rather than throwing — a forward-compatible coerce. This is +a PHP PORT\_ADDITION: the Python reference uses a bare `str`. + +This is the DIAL-outcome vocabulary ONLY. It is deliberately NOT unified +with \{@see CallState\} (call-lifecycle) or \{@see MessageState\} +(message-delivery) — three distinct vocabularies that must never be +conflated. (Note `answered` appears in both CallState and DialState but +means different things — a call lifecycle phase vs a dial outcome — which is +exactly why the vocabularies are kept apart.) + +#### Signature + +```php +final enum DialState implements UnitEnum, BackedEnum +``` + +#### Inheritance + +**Implements:** `UnitEnum`, `BackedEnum` + +#### Properties + + + + + +#### Constants + + + A leg answered — the dial succeeded with a winner. + + + + Every leg returned busy. + + + + The dial is in progress, no leg has been picked yet. + + + + The dial failed outright. + + + + No leg answered before the dial timed out. + + +#### Variants + + + A leg answered — the dial succeeded with a winner. + + + + Every leg returned busy. + + + + The dial is in progress, no leg has been picked yet. + + + + The dial failed outright. + + + + No leg answered before the dial timed out. + + +#### Methods + +##### cases + +**Modifiers:** `static` + +###### Signature + +```php +public static function cases(): array +``` + +###### Returns + +`array` + +*** + +##### from + +**Modifiers:** `static` + +###### Signature + +```php +public static function from(string|int $value): static +``` + +###### Parameters + + + +###### Returns + +`static` + +*** + +##### isTerminal + +True once the dial has reached a terminal outcome. + +Terminal = any state other than \{@see DialState::Dialing\} — i.e. a +winner answered (\{@see DialState::Answered\}) or the dial gave up +(failed / no-answer / busy). This mirrors +\{@see Client::handleDialEvent()\}, which resolves (or rejects) the +pending dial on exactly these states and keeps waiting while `dialing`. + +###### Signature + +```php +public function isTerminal(): bool +``` + +###### Returns + +`bool` + +###### Source + +[`SignalWire/Relay/DialState.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/DialState.php) + +Line 65. + +*** + +##### tryFrom + +**Modifiers:** `static` + +###### Signature + +```php +public static function tryFrom(string|int $value): ?static +``` + +###### Parameters + + + +###### Returns + +`?static` + +*** + +##### tryFromWire + +Coerce a wire string (or null) to this enum, mapping any value outside + +the known closed set — or null — to null instead of throwing. + +Use this when reading a SERVER-emitted `dial_state`: the wire vocabulary +is owned by the server and may grow, so an unrecognised value is not an +error — the caller falls back to the raw string. (Contrast PHP's +built-in \{@see DialState::from()\}, which throws \ValueError on a miss.) + +**Modifiers:** `static` + +###### Signature + +```php +public static function tryFromWire(?string $wire): ?SignalWire\Relay\DialState +``` + +###### Parameters + + + The raw `dial_state` / `state` value from the wire. + + +###### Returns + +`?SignalWire\Relay\DialState` + +###### Source + +[`SignalWire/Relay/DialState.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/DialState.php) + +Line 81. + +#### Source + +[`SignalWire/Relay/DialState.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/DialState.php) + +Line 39. + +*** + +### MessageState + +RELAY message delivery state, as a typed, compile-time-checked closed set. + +A \{@see Message\} progresses through these states as the server reports +delivery via `messaging.state` events: + +``` +queued → initiated → sent → (delivered | undelivered | failed) +``` + +plus `received` for an inbound message. The seven members are exactly the +\{@see Constants\}::MESSAGE\_STATE\_\* tokens (grounded in the Python reference's +`relay/constants.py` MESSAGE\_STATE\_\* + MESSAGE\_TERMINAL\_STATES); each +backing string IS the wire value the server emits in the `message_state` / +`state` field. \{@see Message\} keeps the bare-string `getState()` accessor +for parity with the Python reference (which models state as a plain `str`); +this enum is offered ALONGSIDE it via the typed +\{@see Message::messageState()\} accessor. + +``` +$msg->getState(); // 'delivered' (string, parity) +$msg->messageState(); // MessageState::Delivered (typed) +$msg->messageState()?->isTerminal(); // true +``` + +Server states can GROW, so \{@see MessageState::tryFromWire()\} maps an +unknown value to `null` rather than throwing — a forward-compatible coerce. +This is a PHP PORT\_ADDITION: the Python reference uses a bare `str`. + +This is the MESSAGE-delivery vocabulary ONLY. It is deliberately NOT unified +with \{@see CallState\} (call-lifecycle) or \{@see DialState\} (dial-outcome) — +three distinct vocabularies that must never be conflated. (Note `failed` +appears in both MessageState and DialState but means different things — +message-delivery failure vs dial-outcome failure.) + +#### Signature + +```php +final enum MessageState implements UnitEnum, BackedEnum +``` + +#### Inheritance + +**Implements:** `UnitEnum`, `BackedEnum` + +#### Properties + + + + + +#### Constants + + + The message was delivered to the carrier/handset (terminal, success). + + + + The message failed to send (terminal, failure). + + + + Sending has been initiated. + + + + The message is queued for sending (the initial state). + + + + An inbound message was received. + + + + The message has left the platform. + + + + Delivery was attempted but not confirmed (terminal, failure). + + +#### Variants + + + The message was delivered to the carrier/handset (terminal, success). + + + + The message failed to send (terminal, failure). + + + + Sending has been initiated. + + + + The message is queued for sending (the initial state). + + + + An inbound message was received. + + + + The message has left the platform. + + + + Delivery was attempted but not confirmed (terminal, failure). + + +#### Methods + +##### cases + +**Modifiers:** `static` + +###### Signature + +```php +public static function cases(): array +``` + +###### Returns + +`array` + +*** + +##### from + +**Modifiers:** `static` + +###### Signature + +```php +public static function from(string|int $value): static +``` + +###### Parameters + + + +###### Returns + +`static` + +*** + +##### isTerminal + +True once the message has reached a terminal delivery state. + +Terminal = \{@see MessageState::Delivered\}, \{@see MessageState::Undelivered\}, +or \{@see MessageState::Failed\}, matching +\{@see Constants\}::MESSAGE\_TERMINAL\_STATES — the three states on which +\{@see Message::dispatchEvent()\} auto-resolves the message. Note `received` +is NOT terminal here (it mirrors the Python reference, whose +MESSAGE\_TERMINAL\_STATES excludes it). + +###### Signature + +```php +public function isTerminal(): bool +``` + +###### Returns + +`bool` + +###### Source + +[`SignalWire/Relay/MessageState.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/MessageState.php) + +Line 71. + +*** + +##### tryFrom + +**Modifiers:** `static` + +###### Signature + +```php +public static function tryFrom(string|int $value): ?static +``` + +###### Parameters + + + +###### Returns + +`?static` + +*** + +##### tryFromWire + +Coerce a wire string (or null) to this enum, mapping any value outside + +the known closed set — or null — to null instead of throwing. + +Use this when reading a SERVER-emitted `message_state`: the wire +vocabulary is owned by the server and may grow, so an unrecognised value +is not an error — the caller falls back to the raw string. (Contrast +PHP's built-in \{@see MessageState::from()\}, which throws \ValueError on a +miss.) + +**Modifiers:** `static` + +###### Signature + +```php +public static function tryFromWire(?string $wire): ?SignalWire\Relay\MessageState +``` + +###### Parameters + + + The raw `message_state` / `state` value from the wire. + + +###### Returns + +`?SignalWire\Relay\MessageState` + +###### Source + +[`SignalWire/Relay/MessageState.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/MessageState.php) + +Line 91. + +#### Source + +[`SignalWire/Relay/MessageState.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/MessageState.php) + +Line 38. diff --git a/fern/products/sdk-reference/php/relay/index__2.mdx b/fern/products/sdk-reference/php/relay/index__2.mdx deleted file mode 100644 index 5377284256..0000000000 --- a/fern/products/sdk-reference/php/relay/index__2.mdx +++ /dev/null @@ -1,780 +0,0 @@ ---- -slug: "/reference/php/relay/index__2" -title: "relay" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "module" - language: "php" - qualified_name: "relay" ---- -# `relay` - -## Classes - - - - Base class for all RELAY call actions (play, record, collect, etc.). - - - - Handle for calling.ai operations. - - - - Represents a RELAY voice call. - - - - RELAY Client – manages the WebSocket connection to SignalWire, sends - - - - Handle for calling.collect (and play\_and\_collect) operations. - - - - - - Handle for calling.detect operations (fax-tone, digit, machine, etc.). - - - - A RELAY `{type, params}` device descriptor, as an immutable typed value - - - - An immutable RELAY event value object. - - - - Handle for calling.fax operations (send or receive). - - - - Represents a RELAY messaging message (SMS / MMS). - - - - Handle for calling.pay operations. - - - - Handle for calling.play operations. - - - - Handle for calling.record operations. - - - - Exception type for RELAY-protocol-level failures. - - - - Handle for calling.stream operations. - - - - Handle for calling.tap operations. - - - - Handle for calling.transcribe operations. - - - - RELAY WebSocket transport. - - - -## Enums - -### CallState - -RELAY call lifecycle state, as a typed, compile-time-checked closed set. - -A call moves through these states over its lifetime: - -``` -created → ringing → answered → ending → ended -``` - -The five members are exactly the \{@see Constants\}::CALL\_STATE\_\* tokens -(grounded in the Python reference's `relay/constants.py` CALL\_STATES tuple); -each backing string IS the wire value the server emits in a -`calling.call.state` event's `call_state` / `state` field. \{@see Call\} -keeps the bare-string `$state` property for parity with the Python reference -(which models state as a plain `str`); this enum is offered ALONGSIDE it via -the typed \{@see Call::callState()\} accessor — autocompletion and an -exhaustive `match` at the call site, with the string preserved. - -``` -$call->state; // 'answered' (string, parity) -$call->callState(); // CallState::Answered (typed) -$call->callState()?->isTerminal(); // false -``` - -Server states can GROW (the wire vocabulary is owned by the server, not the -SDK), so \{@see CallState::tryFromWire()\} maps an unknown value to `null` -rather than throwing — a forward-compatible coerce. This is a PHP -PORT\_ADDITION: the Python reference uses a bare `str`. - -This is the CALL-state vocabulary ONLY. It is deliberately NOT unified with -\{@see DialState\} (dial-outcome) or \{@see MessageState\} (message-delivery) — -three distinct vocabularies that must never be conflated. - -#### Signature - -```php -final enum CallState implements UnitEnum, BackedEnum -``` - -#### Inheritance - -**Implements:** `UnitEnum`, `BackedEnum` - -#### Properties - - - - - -#### Constants - - - The call has been answered and is up. - - - - The call object exists but nothing has happened yet (the default). - - - - The call has ended — the one terminal state. - - - - The call is tearing down. - - - - The call is ringing the destination. - - -#### Variants - - - The call has been answered and is up. - - - - The call object exists but nothing has happened yet (the default). - - - - The call has ended — the one terminal state. - - - - The call is tearing down. - - - - The call is ringing the destination. - - -#### Methods - -##### cases - -**Modifiers:** `static` - -###### Signature - -```php -public static function cases(): array -``` - -###### Returns - -`array` - -*** - -##### from - -**Modifiers:** `static` - -###### Signature - -```php -public static function from(string|int $value): static -``` - -###### Parameters - - - -###### Returns - -`static` - -*** - -##### isTerminal - -True once the call has reached its terminal state. - -Terminal = \{@see CallState::Ended\} only, matching -\{@see Constants\}::CALL\_TERMINAL\_STATES (`['ended' => true]`). A terminal -state is what resolves every in-flight action on the call. - -###### Signature - -```php -public function isTerminal(): bool -``` - -###### Returns - -`bool` - -###### Source - -[`SignalWire/Relay/CallState.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/CallState.php) - -Line 60. - -*** - -##### tryFrom - -**Modifiers:** `static` - -###### Signature - -```php -public static function tryFrom(string|int $value): ?static -``` - -###### Parameters - - - -###### Returns - -`?static` - -*** - -##### tryFromWire - -Coerce a wire string (or null) to this enum, mapping any value outside - -the known closed set — or null — to null instead of throwing. - -Use this when reading a SERVER-emitted state: the wire vocabulary is -owned by the server and may grow, so an unrecognised value is not an -error — the caller falls back to the raw string. (Contrast PHP's -built-in \{@see CallState::from()\}, which throws \ValueError on a miss.) - -**Modifiers:** `static` - -###### Signature - -```php -public static function tryFromWire(?string $wire): ?SignalWire\Relay\CallState -``` - -###### Parameters - - - The raw `call_state` / `state` value from the wire. - - -###### Returns - -`?SignalWire\Relay\CallState` - -###### Source - -[`SignalWire/Relay/CallState.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/CallState.php) - -Line 76. - -#### Source - -[`SignalWire/Relay/CallState.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/CallState.php) - -Line 36. - -*** - -### DialState - -RELAY dial outcome state, as a typed, compile-time-checked closed set. - -A `calling.call.dial` event carries a `dial_state` (or legacy `state`) that -reports how the outbound dial is progressing: - -``` -dialing → (answered | failed | no_answer | busy) -``` - -The Python reference's `RelayClient` documents the core three -(`dialing | answered | failed`, see `relay/client.py`'s dial-event handler); -this port's \{@see Client::handleDialEvent()\} additionally treats the wire's -`no_answer` / `busy` as terminal failures, so they are modelled here too. -Each backing string IS the wire value. \{@see Constants\}::DIAL\_STATE\_\* keeps -the bare-string constants for parity (the Python reference reads -`dial_state` as a plain `str`); this enum is offered ALONGSIDE them. - -``` -DialState::Answered->value; // 'answered' (wire string) -DialState::tryFromWire('failed'); // DialState::Failed -DialState::Failed->isTerminal(); // true -DialState::Dialing->isTerminal(); // false (still in progress) -``` - -Server states can GROW, so \{@see DialState::tryFromWire()\} maps an unknown -value to `null` rather than throwing — a forward-compatible coerce. This is -a PHP PORT\_ADDITION: the Python reference uses a bare `str`. - -This is the DIAL-outcome vocabulary ONLY. It is deliberately NOT unified -with \{@see CallState\} (call-lifecycle) or \{@see MessageState\} -(message-delivery) — three distinct vocabularies that must never be -conflated. (Note `answered` appears in both CallState and DialState but -means different things — a call lifecycle phase vs a dial outcome — which is -exactly why the vocabularies are kept apart.) - -#### Signature - -```php -final enum DialState implements UnitEnum, BackedEnum -``` - -#### Inheritance - -**Implements:** `UnitEnum`, `BackedEnum` - -#### Properties - - - - - -#### Constants - - - A leg answered — the dial succeeded with a winner. - - - - Every leg returned busy. - - - - The dial is in progress, no leg has been picked yet. - - - - The dial failed outright. - - - - No leg answered before the dial timed out. - - -#### Variants - - - A leg answered — the dial succeeded with a winner. - - - - Every leg returned busy. - - - - The dial is in progress, no leg has been picked yet. - - - - The dial failed outright. - - - - No leg answered before the dial timed out. - - -#### Methods - -##### cases - -**Modifiers:** `static` - -###### Signature - -```php -public static function cases(): array -``` - -###### Returns - -`array` - -*** - -##### from - -**Modifiers:** `static` - -###### Signature - -```php -public static function from(string|int $value): static -``` - -###### Parameters - - - -###### Returns - -`static` - -*** - -##### isTerminal - -True once the dial has reached a terminal outcome. - -Terminal = any state other than \{@see DialState::Dialing\} — i.e. a -winner answered (\{@see DialState::Answered\}) or the dial gave up -(failed / no-answer / busy). This mirrors -\{@see Client::handleDialEvent()\}, which resolves (or rejects) the -pending dial on exactly these states and keeps waiting while `dialing`. - -###### Signature - -```php -public function isTerminal(): bool -``` - -###### Returns - -`bool` - -###### Source - -[`SignalWire/Relay/DialState.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/DialState.php) - -Line 65. - -*** - -##### tryFrom - -**Modifiers:** `static` - -###### Signature - -```php -public static function tryFrom(string|int $value): ?static -``` - -###### Parameters - - - -###### Returns - -`?static` - -*** - -##### tryFromWire - -Coerce a wire string (or null) to this enum, mapping any value outside - -the known closed set — or null — to null instead of throwing. - -Use this when reading a SERVER-emitted `dial_state`: the wire vocabulary -is owned by the server and may grow, so an unrecognised value is not an -error — the caller falls back to the raw string. (Contrast PHP's -built-in \{@see DialState::from()\}, which throws \ValueError on a miss.) - -**Modifiers:** `static` - -###### Signature - -```php -public static function tryFromWire(?string $wire): ?SignalWire\Relay\DialState -``` - -###### Parameters - - - The raw `dial_state` / `state` value from the wire. - - -###### Returns - -`?SignalWire\Relay\DialState` - -###### Source - -[`SignalWire/Relay/DialState.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/DialState.php) - -Line 81. - -#### Source - -[`SignalWire/Relay/DialState.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/DialState.php) - -Line 39. - -*** - -### MessageState - -RELAY message delivery state, as a typed, compile-time-checked closed set. - -A \{@see Message\} progresses through these states as the server reports -delivery via `messaging.state` events: - -``` -queued → initiated → sent → (delivered | undelivered | failed) -``` - -plus `received` for an inbound message. The seven members are exactly the -\{@see Constants\}::MESSAGE\_STATE\_\* tokens (grounded in the Python reference's -`relay/constants.py` MESSAGE\_STATE\_\* + MESSAGE\_TERMINAL\_STATES); each -backing string IS the wire value the server emits in the `message_state` / -`state` field. \{@see Message\} keeps the bare-string `getState()` accessor -for parity with the Python reference (which models state as a plain `str`); -this enum is offered ALONGSIDE it via the typed -\{@see Message::messageState()\} accessor. - -``` -$msg->getState(); // 'delivered' (string, parity) -$msg->messageState(); // MessageState::Delivered (typed) -$msg->messageState()?->isTerminal(); // true -``` - -Server states can GROW, so \{@see MessageState::tryFromWire()\} maps an -unknown value to `null` rather than throwing — a forward-compatible coerce. -This is a PHP PORT\_ADDITION: the Python reference uses a bare `str`. - -This is the MESSAGE-delivery vocabulary ONLY. It is deliberately NOT unified -with \{@see CallState\} (call-lifecycle) or \{@see DialState\} (dial-outcome) — -three distinct vocabularies that must never be conflated. (Note `failed` -appears in both MessageState and DialState but means different things — -message-delivery failure vs dial-outcome failure.) - -#### Signature - -```php -final enum MessageState implements UnitEnum, BackedEnum -``` - -#### Inheritance - -**Implements:** `UnitEnum`, `BackedEnum` - -#### Properties - - - - - -#### Constants - - - The message was delivered to the carrier/handset (terminal, success). - - - - The message failed to send (terminal, failure). - - - - Sending has been initiated. - - - - The message is queued for sending (the initial state). - - - - An inbound message was received. - - - - The message has left the platform. - - - - Delivery was attempted but not confirmed (terminal, failure). - - -#### Variants - - - The message was delivered to the carrier/handset (terminal, success). - - - - The message failed to send (terminal, failure). - - - - Sending has been initiated. - - - - The message is queued for sending (the initial state). - - - - An inbound message was received. - - - - The message has left the platform. - - - - Delivery was attempted but not confirmed (terminal, failure). - - -#### Methods - -##### cases - -**Modifiers:** `static` - -###### Signature - -```php -public static function cases(): array -``` - -###### Returns - -`array` - -*** - -##### from - -**Modifiers:** `static` - -###### Signature - -```php -public static function from(string|int $value): static -``` - -###### Parameters - - - -###### Returns - -`static` - -*** - -##### isTerminal - -True once the message has reached a terminal delivery state. - -Terminal = \{@see MessageState::Delivered\}, \{@see MessageState::Undelivered\}, -or \{@see MessageState::Failed\}, matching -\{@see Constants\}::MESSAGE\_TERMINAL\_STATES — the three states on which -\{@see Message::dispatchEvent()\} auto-resolves the message. Note `received` -is NOT terminal here (it mirrors the Python reference, whose -MESSAGE\_TERMINAL\_STATES excludes it). - -###### Signature - -```php -public function isTerminal(): bool -``` - -###### Returns - -`bool` - -###### Source - -[`SignalWire/Relay/MessageState.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/MessageState.php) - -Line 71. - -*** - -##### tryFrom - -**Modifiers:** `static` - -###### Signature - -```php -public static function tryFrom(string|int $value): ?static -``` - -###### Parameters - - - -###### Returns - -`?static` - -*** - -##### tryFromWire - -Coerce a wire string (or null) to this enum, mapping any value outside - -the known closed set — or null — to null instead of throwing. - -Use this when reading a SERVER-emitted `message_state`: the wire -vocabulary is owned by the server and may grow, so an unrecognised value -is not an error — the caller falls back to the raw string. (Contrast -PHP's built-in \{@see MessageState::from()\}, which throws \ValueError on a -miss.) - -**Modifiers:** `static` - -###### Signature - -```php -public static function tryFromWire(?string $wire): ?SignalWire\Relay\MessageState -``` - -###### Parameters - - - The raw `message_state` / `state` value from the wire. - - -###### Returns - -`?SignalWire\Relay\MessageState` - -###### Source - -[`SignalWire/Relay/MessageState.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/MessageState.php) - -Line 91. - -#### Source - -[`SignalWire/Relay/MessageState.php`](https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/MessageState.php) - -Line 38. diff --git a/fern/products/sdk-reference/php/relay/message/index.mdx b/fern/products/sdk-reference/php/relay/message/index.mdx index a818724d08..6f72f1d718 100644 --- a/fern/products/sdk-reference/php/relay/message/index.mdx +++ b/fern/products/sdk-reference/php/relay/message/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "php" qualified_name: "SignalWire\\Relay\\Message" - parent: "relay" + parent: "SignalWire\\Relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Message.php" --- diff --git a/fern/products/sdk-reference/php/relay/pay-action/index.mdx b/fern/products/sdk-reference/php/relay/pay-action/index.mdx index 9b72aa9e71..e7369ad93d 100644 --- a/fern/products/sdk-reference/php/relay/pay-action/index.mdx +++ b/fern/products/sdk-reference/php/relay/pay-action/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "php" qualified_name: "SignalWire\\Relay\\PayAction" - parent: "relay" + parent: "SignalWire\\Relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php" --- diff --git a/fern/products/sdk-reference/php/relay/play-action/index.mdx b/fern/products/sdk-reference/php/relay/play-action/index.mdx index b1ed5abbca..4214a5844c 100644 --- a/fern/products/sdk-reference/php/relay/play-action/index.mdx +++ b/fern/products/sdk-reference/php/relay/play-action/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "php" qualified_name: "SignalWire\\Relay\\PlayAction" - parent: "relay" + parent: "SignalWire\\Relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php" --- diff --git a/fern/products/sdk-reference/php/relay/record-action/index.mdx b/fern/products/sdk-reference/php/relay/record-action/index.mdx index a6107ed2bc..14ba27a487 100644 --- a/fern/products/sdk-reference/php/relay/record-action/index.mdx +++ b/fern/products/sdk-reference/php/relay/record-action/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "php" qualified_name: "SignalWire\\Relay\\RecordAction" - parent: "relay" + parent: "SignalWire\\Relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php" --- diff --git a/fern/products/sdk-reference/php/relay/relay-error/index.mdx b/fern/products/sdk-reference/php/relay/relay-error/index.mdx index 40d9d9f8f3..b7ad33235d 100644 --- a/fern/products/sdk-reference/php/relay/relay-error/index.mdx +++ b/fern/products/sdk-reference/php/relay/relay-error/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "php" qualified_name: "SignalWire\\Relay\\RelayError" - parent: "relay" + parent: "SignalWire\\Relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/RelayError.php" --- diff --git a/fern/products/sdk-reference/php/relay/stream-action/index.mdx b/fern/products/sdk-reference/php/relay/stream-action/index.mdx index d6fb654335..5856cfddef 100644 --- a/fern/products/sdk-reference/php/relay/stream-action/index.mdx +++ b/fern/products/sdk-reference/php/relay/stream-action/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "php" qualified_name: "SignalWire\\Relay\\StreamAction" - parent: "relay" + parent: "SignalWire\\Relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php" --- diff --git a/fern/products/sdk-reference/php/relay/tap-action/index.mdx b/fern/products/sdk-reference/php/relay/tap-action/index.mdx index 7810a418d6..62de18518d 100644 --- a/fern/products/sdk-reference/php/relay/tap-action/index.mdx +++ b/fern/products/sdk-reference/php/relay/tap-action/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "php" qualified_name: "SignalWire\\Relay\\TapAction" - parent: "relay" + parent: "SignalWire\\Relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php" --- diff --git a/fern/products/sdk-reference/php/relay/transcribe-action/index.mdx b/fern/products/sdk-reference/php/relay/transcribe-action/index.mdx index 104ffc365b..6649301635 100644 --- a/fern/products/sdk-reference/php/relay/transcribe-action/index.mdx +++ b/fern/products/sdk-reference/php/relay/transcribe-action/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "php" qualified_name: "SignalWire\\Relay\\TranscribeAction" - parent: "relay" + parent: "SignalWire\\Relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/Action.php" --- diff --git a/fern/products/sdk-reference/php/relay/web-socket/index.mdx b/fern/products/sdk-reference/php/relay/web-socket/index.mdx index 6eec03a514..3d2145b881 100644 --- a/fern/products/sdk-reference/php/relay/web-socket/index.mdx +++ b/fern/products/sdk-reference/php/relay/web-socket/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "php" qualified_name: "SignalWire\\Relay\\WebSocket" - parent: "relay" + parent: "SignalWire\\Relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/Relay/WebSocket.php" --- diff --git a/fern/products/sdk-reference/php/rest/base-resource/index.mdx b/fern/products/sdk-reference/php/rest/base-resource/index.mdx index 39eaa97e99..8565e9edbc 100644 --- a/fern/products/sdk-reference/php/rest/base-resource/index.mdx +++ b/fern/products/sdk-reference/php/rest/base-resource/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "php" qualified_name: "SignalWire\\REST\\BaseResource" - parent: "rest" + parent: "SignalWire\\REST" module: "rest" source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php" --- diff --git a/fern/products/sdk-reference/php/rest/crud-resource/index.mdx b/fern/products/sdk-reference/php/rest/crud-resource/index.mdx index 6491a83787..e5fc5db9aa 100644 --- a/fern/products/sdk-reference/php/rest/crud-resource/index.mdx +++ b/fern/products/sdk-reference/php/rest/crud-resource/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "php" qualified_name: "SignalWire\\REST\\CrudResource" - parent: "rest" + parent: "SignalWire\\REST" module: "rest" source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php" --- diff --git a/fern/products/sdk-reference/php/rest/crud-with-addresses/index.mdx b/fern/products/sdk-reference/php/rest/crud-with-addresses/index.mdx index 20d12e68cf..10c7b49ebe 100644 --- a/fern/products/sdk-reference/php/rest/crud-with-addresses/index.mdx +++ b/fern/products/sdk-reference/php/rest/crud-with-addresses/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "php" qualified_name: "SignalWire\\REST\\CrudWithAddresses" - parent: "rest" + parent: "SignalWire\\REST" module: "rest" source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/CrudResource.php" --- diff --git a/fern/products/sdk-reference/php/rest/http-client/index.mdx b/fern/products/sdk-reference/php/rest/http-client/index.mdx index 6a2039ed7f..8452351df0 100644 --- a/fern/products/sdk-reference/php/rest/http-client/index.mdx +++ b/fern/products/sdk-reference/php/rest/http-client/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "php" qualified_name: "SignalWire\\REST\\HttpClient" - parent: "rest" + parent: "SignalWire\\REST" module: "rest" source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/HttpClient.php" --- diff --git a/fern/products/sdk-reference/php/rest/index.mdx b/fern/products/sdk-reference/php/rest/index.mdx index 73bdf96a2c..68b2485cf9 100644 --- a/fern/products/sdk-reference/php/rest/index.mdx +++ b/fern/products/sdk-reference/php/rest/index.mdx @@ -16,3 +16,41 @@ lustri: ```php namespace SignalWire\REST ``` + +## Classes + + + + Common base class for namespace and resource classes. + + + + Generic CRUD wrapper around an HttpClient and a base API path. + + + + CRUD resource that also supports listing addresses for an item. + + + + Low-level HTTP client for SignalWire REST APIs. + + + + Iterates items across paginated API responses. + + + + Top-level SignalWire REST client. + + + + Exception thrown when a SignalWire REST API request fails with a non-2xx status. + + + +## Modules + + + + diff --git a/fern/products/sdk-reference/php/rest/index__2.mdx b/fern/products/sdk-reference/php/rest/index__2.mdx deleted file mode 100644 index 550fa11a75..0000000000 --- a/fern/products/sdk-reference/php/rest/index__2.mdx +++ /dev/null @@ -1,50 +0,0 @@ ---- -slug: "/reference/php/rest/index__2" -title: "rest" -sdk_label: "PHP SDK" -icon: "php" -lustri: - auto_generated: true - kind: "module" - language: "php" - qualified_name: "rest" ---- -# `rest` - -## Classes - - - - Common base class for namespace and resource classes. - - - - Generic CRUD wrapper around an HttpClient and a base API path. - - - - CRUD resource that also supports listing addresses for an item. - - - - Low-level HTTP client for SignalWire REST APIs. - - - - Iterates items across paginated API responses. - - - - Top-level SignalWire REST client. - - - - Exception thrown when a SignalWire REST API request fails with a non-2xx status. - - - -## Modules - - - - diff --git a/fern/products/sdk-reference/php/rest/namespaces/index.mdx b/fern/products/sdk-reference/php/rest/namespaces/index.mdx index ab3ed956c3..b9b87bf5bc 100644 --- a/fern/products/sdk-reference/php/rest/namespaces/index.mdx +++ b/fern/products/sdk-reference/php/rest/namespaces/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "module" language: "php" qualified_name: "rest.Namespaces" - parent: "rest" + parent: "SignalWire\\REST" module: "rest" --- # `Namespaces` diff --git a/fern/products/sdk-reference/php/rest/paginated-iterator/index.mdx b/fern/products/sdk-reference/php/rest/paginated-iterator/index.mdx index 92ad68490d..e6d11be0da 100644 --- a/fern/products/sdk-reference/php/rest/paginated-iterator/index.mdx +++ b/fern/products/sdk-reference/php/rest/paginated-iterator/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "php" qualified_name: "SignalWire\\REST\\PaginatedIterator" - parent: "rest" + parent: "SignalWire\\REST" module: "rest" source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/PaginatedIterator.php" --- diff --git a/fern/products/sdk-reference/php/rest/rest-client/index.mdx b/fern/products/sdk-reference/php/rest/rest-client/index.mdx index 49b3171b33..c2dc203dd0 100644 --- a/fern/products/sdk-reference/php/rest/rest-client/index.mdx +++ b/fern/products/sdk-reference/php/rest/rest-client/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "php" qualified_name: "SignalWire\\REST\\RestClient" - parent: "rest" + parent: "SignalWire\\REST" module: "rest" source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/RestClient.php" --- diff --git a/fern/products/sdk-reference/php/rest/signal-wire-rest-error/index.mdx b/fern/products/sdk-reference/php/rest/signal-wire-rest-error/index.mdx index ca2a999d4f..5fc1af7ebc 100644 --- a/fern/products/sdk-reference/php/rest/signal-wire-rest-error/index.mdx +++ b/fern/products/sdk-reference/php/rest/signal-wire-rest-error/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "php" qualified_name: "SignalWire\\REST\\SignalWireRestError" - parent: "rest" + parent: "SignalWire\\REST" module: "rest" source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/REST/SignalWireRestError.php" --- diff --git a/fern/products/sdk-reference/python/_meta.json b/fern/products/sdk-reference/python/_meta.json index f0ec3c73f2..805bad8059 100644 --- a/fern/products/sdk-reference/python/_meta.json +++ b/fern/products/sdk-reference/python/_meta.json @@ -6,5 +6,5 @@ "format": "mdx", "platform": "fern", "base_slug": "/reference/python", - "item_count": 2484 + "item_count": 2411 } \ No newline at end of file diff --git a/fern/products/sdk-reference/python/agents/agent-base/index.mdx b/fern/products/sdk-reference/python/agents/agent-base/index.mdx index 1c03e68267..3710a1ad4c 100644 --- a/fern/products/sdk-reference/python/agents/agent-base/index.mdx +++ b/fern/products/sdk-reference/python/agents/agent-base/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.core.agent_base" parent: "agents" @@ -14,23 +14,768 @@ lustri: --- # `agent_base` -Copyright (c) 2025 SignalWire +Base class for all SignalWire AI Agents. -This file is part of the SignalWire SDK. +This class extends SWMLService and provides enhanced functionality for building agents including: -Licensed under the MIT License. -See LICENSE file in the project root for full license information. +- Prompt building and customization +- SWML rendering +- SWAIG function definition and execution +- Web service for serving SWML and handling webhooks +- Security and session management + +Subclassing options: + +1. Simple override of get\_prompt() for raw text +2. Using prompt\_\* methods for structured prompts +3. Declarative PROMPT\_SECTIONS class attribute ## Signature ```python -module agent_base +class AgentBase(AuthMixin, WebMixin, SWMLService, PromptMixin, SkillMixin, AIConfigMixin, ServerlessMixin, StateMixin, MCPServerMixin) ``` +## Inheritance + +**Extends:** `AuthMixin`, `WebMixin`, `SWMLService`, `PromptMixin`, `SkillMixin`, `AIConfigMixin`, `ServerlessMixin`, `StateMixin`, `MCPServerMixin` + ## Properties + + + + + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +Initialize a new agent + +#### Signature + +```python +__init__( + name: str, + route: str = '/', + host: str = '0.0.0.0', + port: Optional[int] = None, + basic_auth: Optional[Tuple[str, str]] = None, + use_pom: bool = True, + token_expiry_secs: int = 3600, + auto_answer: bool = True, + record_call: bool = False, + record_format: str = 'mp4', + record_stereo: bool = True, + default_webhook_url: Optional[str] = None, + agent_id: Optional[str] = None, + native_functions: Optional[List[str]] = None, + schema_path: Optional[str] = None, + suppress_logs: bool = False, + enable_post_prompt_override: bool = False, + check_for_input_override: bool = False, + config_file: Optional[str] = None, + schema_validation: bool = True, + signing_key: Optional[str] = None, + trust_proxy_for_signature: bool = False +) +``` + +#### Parameters + + + Agent name/identifier + + + + HTTP route path for this agent + + + + Host to bind the web server to + + + + Port to bind the web server to + + + + Optional (username, password) tuple for basic auth + + + + Whether to use POM for prompt building + + + + Seconds until tokens expire + + + + Whether to automatically answer calls + + + + Whether to record calls + + + + Recording format + + + + Whether to record in stereo + + + + Optional default webhook URL for all SWAIG functions + + + + Optional unique ID for this agent, generated if not provided + + + + Optional list of native functions to include in the SWAIG object + + + + Optional path to the schema file + + + + Whether to suppress structured logs + + + + Whether to enable post-prompt override + + + + Whether to enable check-for-input override + + + + Optional path to configuration file + + + + Enable SWML schema validation. Default True. Can also be disabled via SWML\_SKIP\_SCHEMA\_VALIDATION=1 env var. + + + + Optional SignalWire Signing Key (from Dashboard → API Credentials). When set, webhook signature validation is enforced on POST /, /swaig, /post\_prompt — unsigned or invalidly-signed requests get a 403. Falls back to the SIGNALWIRE\_SIGNING\_KEY env var if not passed. See porting-sdk/webhooks.md for the contract. + + + + If True, honor X-Forwarded-Proto / X-Forwarded-Host when reconstructing the URL during signature validation. Default False — proxy headers are spoofable, so opt in only when you control the proxy chain. + + +#### Source + +[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) + +Line 108. + +*** + +### add\_answer\_verb + +Configure the answer verb. + +The answer verb connects the call. Use this method to customize +answer behavior, such as setting max\_duration. + +> \[!NOTE] +> +> ### Set maximum call duration to 1 hour +> +> agent.add\_answer\_verb(\{"max\_duration": 3600\}) + +#### Signature + +```python +add_answer_verb(config: Optional[Dict[str, Any]] = None) -> AgentBase +``` + +#### Parameters + + + Optional answer verb configuration (e.g., \{"max\_duration": 3600\}) + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) + +Line 536. + +*** + +### add\_post\_ai\_verb + +Add a verb to run after the AI conversation ends. + +Post-AI verbs run when the AI completes its conversation. Common uses +include clean disconnects, transfers, and logging. + +> \[!NOTE] +> +> ### Log call completion and hang up +> +> agent.add\_post\_ai\_verb("request", \{ +> "url": "https://api.example.com/call-complete", +> "method": "POST" +> \}) +> agent.add\_post\_ai\_verb("hangup", \{\}) + +#### Signature + +```python +add_post_ai_verb(verb_name: str, config: Dict[str, Any]) -> AgentBase +``` + +#### Parameters + + + The SWML verb name (e.g., "hangup", "transfer", "request") + + + + Verb configuration dictionary + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) + +Line 581. + +*** + +### add\_post\_answer\_verb + +Add a verb to run after the call is answered but before the AI starts. + +Post-answer verbs run after the call is connected. Common uses include +welcome messages, legal disclaimers, and hold music. + +> \[!NOTE] +> +> ### Play welcome message +> +> agent.add\_post\_answer\_verb("play", \{ +> "url": "say:Welcome to Acme Corporation." +> \}) +> +> ### Brief pause +> +> agent.add\_post\_answer\_verb("sleep", \{"time": 500\}) + +#### Signature + +```python +add_post_answer_verb(verb_name: str, config: Dict[str, Any]) -> AgentBase +``` + +#### Parameters + + + The SWML verb name (e.g., "play", "sleep") + + + + Verb configuration dictionary + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) + +Line 556. + +*** + +### add\_pre\_answer\_verb + +Add a verb to run before the call is answered. + +Pre-answer verbs execute while the call is still ringing. Only certain +verbs are safe to use before answering: + +> \[!NOTE] +> cond, if, eval, set, unset, hangup, send\_sms, sleep, +> stop\_record\_call, stop\_denoise, stop\_tap + +Verbs with auto\_answer option (play, connect): Must include +"auto\_answer": False in config to prevent automatic answering. + +> \[!NOTE] +> +> ### Play ringback tone before answering +> +> agent.add\_pre\_answer\_verb("play", \{ +> "urls": \["ring:us"], +> "auto\_answer": False +> \}) + +#### Signature + +```python +add_pre_answer_verb(verb_name: str, config: Dict[str, Any]) -> AgentBase +``` + +#### Parameters + + + The SWML verb name (e.g., "play", "sleep", "request") + + + + Verb configuration dictionary + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Throws + +- `ValueError` — If verb is not safe for pre-answer use + +#### Source + +[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) + +Line 488. + +*** + +### add\_swaig\_query\_params + +Add query parameters that will be included in all SWAIG webhook URLs + +This is particularly useful for preserving dynamic configuration state +across SWAIG callbacks. For example, if your dynamic config adds skills +based on query parameters, you can pass those same parameters through +to the SWAIG webhook so the same configuration is applied. + +> \[!NOTE] +> def dynamic\_config(query\_params, body\_params, headers, agent): +> if query\_params.get('tier') == 'premium': +> agent.add\_skill('advanced\_search') +> \# Preserve the tier param so SWAIG callbacks work +> agent.add\_swaig\_query\_params(\{'tier': 'premium'\}) + +#### Signature + +```python +add_swaig_query_params(params: Dict[str, str]) -> AgentBase +``` + +#### Parameters + + + Dictionary of query parameters to add to SWAIG URLs + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) + +Line 753. + +*** + +### auto\_map\_sip\_usernames + +Automatically register common SIP usernames based on this agent's +name and route + +#### Signature + +```python +auto_map_sip_usernames() -> AgentBase +``` + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) + +Line 700. + +*** + +### clear\_post\_ai\_verbs + +Remove all post-AI verbs. + +#### Signature + +```python +clear_post_ai_verbs() -> AgentBase +``` + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) + +Line 626. + +*** + +### clear\_post\_answer\_verbs + +Remove all post-answer verbs. + +#### Signature + +```python +clear_post_answer_verbs() -> AgentBase +``` + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) + +Line 616. + +*** + +### clear\_pre\_answer\_verbs + +Remove all pre-answer verbs. + +#### Signature + +```python +clear_pre_answer_verbs() -> AgentBase +``` + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) + +Line 606. + +*** + +### clear\_swaig\_query\_params + +Clear all SWAIG query parameters + +#### Signature + +```python +clear_swaig_query_params() -> AgentBase +``` + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) + +Line 779. + +*** + +### enable\_sip\_routing + +Enable SIP-based routing for this agent + +This allows the agent to automatically route SIP requests based on SIP usernames. +When enabled, an endpoint at the specified path is automatically created +that will handle SIP requests and deliver them to this agent. + +#### Signature + +```python +enable_sip_routing(auto_map: bool = True, path: str = '/sip') -> AgentBase +``` + +#### Parameters + + + Whether to automatically map common SIP usernames to this agent (based on the agent name and route path) + + + + The path to register the SIP routing endpoint (default: "/sip") + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) + +Line 638. + +*** + +### get\_full\_url + +Get the full URL for this agent's endpoint + +#### Signature + +```python +get_full_url(include_auth: bool = False) -> str +``` + +#### Parameters + + + Whether to include authentication credentials in the URL + + +#### Returns + +`str` — Full URL including host, port, and route (with auth if requested) + +#### Source + +[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) + +Line 351. + +*** + +### get\_name + +Get agent name + +#### Signature + +```python +get_name() -> str +``` + +#### Returns + +`str` — Agent name + +#### Source + +[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) + +Line 342. + +*** + +### on\_debug\_event + +Register a handler for debug webhook events. + +Use as a decorator to receive real-time debug events from the AI module +during calls. Requires enable\_debug\_events() to be called first. + +> \[!NOTE] +> event\_type (str): The event label (e.g. "barge", "llm\_error", "session\_start") +> data (dict): The full event payload including call\_id, label, and event-specific fields + +The handler may be sync or async. + +> \[!NOTE] +> @agent.on\_debug\_event +> def handle(event\_type, data): +> if event\_type == "barge": +> print(f"Barge detected: \{data.get('barge\_elapsed\_ms')\}ms") + +#### Signature + +```python +on_debug_event(handler: Callable) -> Callable +``` + +#### Parameters + + + Callback function with signature (event\_type: str, data: dict) + + +#### Returns + +`Callable` — The handler function (unchanged), for use as a decorator + +#### Source + +[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) + +Line 458. + +*** + +### on\_summary + +Called when a post-prompt summary is received + +#### Signature + +```python +on_summary( + summary: Optional[Dict[str, Any]], + raw_data: Optional[Dict[str, Any]] = None +) -> None +``` + +#### Parameters + + + The summary object or None if no summary was found + + + + The complete raw POST data from the request + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) + +Line 447. + +*** + +### register\_sip\_username + +Register a SIP username that should be routed to this agent + +#### Signature + +```python +register_sip_username(sip_username: str) -> AgentBase +``` + +#### Parameters + + + SIP username to register + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) + +Line 682. + +*** + +### set\_post\_prompt\_url + +Override the default post\_prompt\_url with a supplied URL string + +#### Signature + +```python +set_post_prompt_url(url: str) -> AgentBase +``` + +#### Parameters + + + The URL to use for post-prompt summary delivery + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) + +Line 740. + +*** + +### set\_web\_hook\_url + +Override the default web\_hook\_url with a supplied URL string + +#### Signature + +```python +set_web_hook_url(url: str) -> AgentBase +``` + +#### Parameters + + + The URL to use for SWAIG function webhooks + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) + +Line 727. + ## Source [`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) + +Line 78. diff --git a/fern/products/sdk-reference/python/agents/agent-base/index__2.mdx b/fern/products/sdk-reference/python/agents/agent-base/index__2.mdx deleted file mode 100644 index 6510e25560..0000000000 --- a/fern/products/sdk-reference/python/agents/agent-base/index__2.mdx +++ /dev/null @@ -1,779 +0,0 @@ ---- -slug: "/reference/python/agents/agent-base/index__2" -title: "AgentBase" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.core.agent_base.AgentBase" - parent: "agents" - module: "agents" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py" ---- -# `AgentBase` - -Base class for all SignalWire AI Agents. - -This class extends SWMLService and provides enhanced functionality for building agents including: - -- Prompt building and customization -- SWML rendering -- SWAIG function definition and execution -- Web service for serving SWML and handling webhooks -- Security and session management - -Subclassing options: - -1. Simple override of get\_prompt() for raw text -2. Using prompt\_\* methods for structured prompts -3. Declarative PROMPT\_SECTIONS class attribute - -## Signature - -```python -class AgentBase(AuthMixin, WebMixin, SWMLService, PromptMixin, SkillMixin, AIConfigMixin, ServerlessMixin, StateMixin, MCPServerMixin) -``` - -## Inheritance - -**Extends:** [AuthMixin](/docs/sdk-reference/reference/python/agents/mixins/auth-mixin/auth-mixin), [WebMixin](/docs/sdk-reference/reference/python/agents/mixins/web-mixin/web-mixin), [SWMLService](/docs/sdk-reference/reference/python/agents/swml-service/index__2), [PromptMixin](/docs/sdk-reference/reference/python/agents/mixins/prompt-mixin/prompt-mixin), [SkillMixin](/docs/sdk-reference/reference/python/agents/mixins/skill-mixin/skill-mixin), [AIConfigMixin](/docs/sdk-reference/reference/python/agents/mixins/ai-config-mixin/ai-config-mixin), [ServerlessMixin](/docs/sdk-reference/reference/python/agents/mixins/serverless-mixin/serverless-mixin), [StateMixin](/docs/sdk-reference/reference/python/agents/mixins/state-mixin/state-mixin), [MCPServerMixin](/docs/sdk-reference/reference/python/agents/mixins/mcp-server-mixin/mcp-server-mixin) - -## Properties - - - - - - - - - - - - - - - - - -## Methods - -### \_\_init\_\_ - -Initialize a new agent - -#### Signature - -```python -__init__( - name: str, - route: str = '/', - host: str = '0.0.0.0', - port: Optional[int] = None, - basic_auth: Optional[Tuple[str, str]] = None, - use_pom: bool = True, - token_expiry_secs: int = 3600, - auto_answer: bool = True, - record_call: bool = False, - record_format: str = 'mp4', - record_stereo: bool = True, - default_webhook_url: Optional[str] = None, - agent_id: Optional[str] = None, - native_functions: Optional[List[str]] = None, - schema_path: Optional[str] = None, - suppress_logs: bool = False, - enable_post_prompt_override: bool = False, - check_for_input_override: bool = False, - config_file: Optional[str] = None, - schema_validation: bool = True, - signing_key: Optional[str] = None, - trust_proxy_for_signature: bool = False -) -``` - -#### Parameters - - - Agent name/identifier - - - - HTTP route path for this agent - - - - Host to bind the web server to - - - - Port to bind the web server to - - - - Optional (username, password) tuple for basic auth - - - - Whether to use POM for prompt building - - - - Seconds until tokens expire - - - - Whether to automatically answer calls - - - - Whether to record calls - - - - Recording format - - - - Whether to record in stereo - - - - Optional default webhook URL for all SWAIG functions - - - - Optional unique ID for this agent, generated if not provided - - - - Optional list of native functions to include in the SWAIG object - - - - Optional path to the schema file - - - - Whether to suppress structured logs - - - - Whether to enable post-prompt override - - - - Whether to enable check-for-input override - - - - Optional path to configuration file - - - - Enable SWML schema validation. Default True. Can also be disabled via SWML\_SKIP\_SCHEMA\_VALIDATION=1 env var. - - - - Optional SignalWire Signing Key (from Dashboard → API Credentials). When set, webhook signature validation is enforced on POST /, /swaig, /post\_prompt — unsigned or invalidly-signed requests get a 403. Falls back to the SIGNALWIRE\_SIGNING\_KEY env var if not passed. See porting-sdk/webhooks.md for the contract. - - - - If True, honor X-Forwarded-Proto / X-Forwarded-Host when reconstructing the URL during signature validation. Default False — proxy headers are spoofable, so opt in only when you control the proxy chain. - - -#### Source - -[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) - -Line 108. - -*** - -### add\_answer\_verb - -Configure the answer verb. - -The answer verb connects the call. Use this method to customize -answer behavior, such as setting max\_duration. - -> \[!NOTE] -> -> ### Set maximum call duration to 1 hour -> -> agent.add\_answer\_verb(\{"max\_duration": 3600\}) - -#### Signature - -```python -add_answer_verb(config: Optional[Dict[str, Any]] = None) -> AgentBase -``` - -#### Parameters - - - Optional answer verb configuration (e.g., \{"max\_duration": 3600\}) - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) - -Line 536. - -*** - -### add\_post\_ai\_verb - -Add a verb to run after the AI conversation ends. - -Post-AI verbs run when the AI completes its conversation. Common uses -include clean disconnects, transfers, and logging. - -> \[!NOTE] -> -> ### Log call completion and hang up -> -> agent.add\_post\_ai\_verb("request", \{ -> "url": "https://api.example.com/call-complete", -> "method": "POST" -> \}) -> agent.add\_post\_ai\_verb("hangup", \{\}) - -#### Signature - -```python -add_post_ai_verb(verb_name: str, config: Dict[str, Any]) -> AgentBase -``` - -#### Parameters - - - The SWML verb name (e.g., "hangup", "transfer", "request") - - - - Verb configuration dictionary - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) - -Line 581. - -*** - -### add\_post\_answer\_verb - -Add a verb to run after the call is answered but before the AI starts. - -Post-answer verbs run after the call is connected. Common uses include -welcome messages, legal disclaimers, and hold music. - -> \[!NOTE] -> -> ### Play welcome message -> -> agent.add\_post\_answer\_verb("play", \{ -> "url": "say:Welcome to Acme Corporation." -> \}) -> -> ### Brief pause -> -> agent.add\_post\_answer\_verb("sleep", \{"time": 500\}) - -#### Signature - -```python -add_post_answer_verb(verb_name: str, config: Dict[str, Any]) -> AgentBase -``` - -#### Parameters - - - The SWML verb name (e.g., "play", "sleep") - - - - Verb configuration dictionary - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) - -Line 556. - -*** - -### add\_pre\_answer\_verb - -Add a verb to run before the call is answered. - -Pre-answer verbs execute while the call is still ringing. Only certain -verbs are safe to use before answering: - -> \[!NOTE] -> cond, if, eval, set, unset, hangup, send\_sms, sleep, -> stop\_record\_call, stop\_denoise, stop\_tap - -Verbs with auto\_answer option (play, connect): Must include -"auto\_answer": False in config to prevent automatic answering. - -> \[!NOTE] -> -> ### Play ringback tone before answering -> -> agent.add\_pre\_answer\_verb("play", \{ -> "urls": \["ring:us"], -> "auto\_answer": False -> \}) - -#### Signature - -```python -add_pre_answer_verb(verb_name: str, config: Dict[str, Any]) -> AgentBase -``` - -#### Parameters - - - The SWML verb name (e.g., "play", "sleep", "request") - - - - Verb configuration dictionary - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Throws - -- `ValueError` — If verb is not safe for pre-answer use - -#### Source - -[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) - -Line 488. - -*** - -### add\_swaig\_query\_params - -Add query parameters that will be included in all SWAIG webhook URLs - -This is particularly useful for preserving dynamic configuration state -across SWAIG callbacks. For example, if your dynamic config adds skills -based on query parameters, you can pass those same parameters through -to the SWAIG webhook so the same configuration is applied. - -> \[!NOTE] -> def dynamic\_config(query\_params, body\_params, headers, agent): -> if query\_params.get('tier') == 'premium': -> agent.add\_skill('advanced\_search') -> \# Preserve the tier param so SWAIG callbacks work -> agent.add\_swaig\_query\_params(\{'tier': 'premium'\}) - -#### Signature - -```python -add_swaig_query_params(params: Dict[str, str]) -> AgentBase -``` - -#### Parameters - - - Dictionary of query parameters to add to SWAIG URLs - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) - -Line 753. - -*** - -### auto\_map\_sip\_usernames - -Automatically register common SIP usernames based on this agent's -name and route - -#### Signature - -```python -auto_map_sip_usernames() -> AgentBase -``` - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) - -Line 700. - -*** - -### clear\_post\_ai\_verbs - -Remove all post-AI verbs. - -#### Signature - -```python -clear_post_ai_verbs() -> AgentBase -``` - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) - -Line 626. - -*** - -### clear\_post\_answer\_verbs - -Remove all post-answer verbs. - -#### Signature - -```python -clear_post_answer_verbs() -> AgentBase -``` - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) - -Line 616. - -*** - -### clear\_pre\_answer\_verbs - -Remove all pre-answer verbs. - -#### Signature - -```python -clear_pre_answer_verbs() -> AgentBase -``` - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) - -Line 606. - -*** - -### clear\_swaig\_query\_params - -Clear all SWAIG query parameters - -#### Signature - -```python -clear_swaig_query_params() -> AgentBase -``` - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) - -Line 779. - -*** - -### enable\_sip\_routing - -Enable SIP-based routing for this agent - -This allows the agent to automatically route SIP requests based on SIP usernames. -When enabled, an endpoint at the specified path is automatically created -that will handle SIP requests and deliver them to this agent. - -#### Signature - -```python -enable_sip_routing(auto_map: bool = True, path: str = '/sip') -> AgentBase -``` - -#### Parameters - - - Whether to automatically map common SIP usernames to this agent (based on the agent name and route path) - - - - The path to register the SIP routing endpoint (default: "/sip") - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) - -Line 638. - -*** - -### get\_full\_url - -Get the full URL for this agent's endpoint - -#### Signature - -```python -get_full_url(include_auth: bool = False) -> str -``` - -#### Parameters - - - Whether to include authentication credentials in the URL - - -#### Returns - -`str` — Full URL including host, port, and route (with auth if requested) - -#### Source - -[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) - -Line 351. - -*** - -### get\_name - -Get agent name - -#### Signature - -```python -get_name() -> str -``` - -#### Returns - -`str` — Agent name - -#### Source - -[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) - -Line 342. - -*** - -### on\_debug\_event - -Register a handler for debug webhook events. - -Use as a decorator to receive real-time debug events from the AI module -during calls. Requires enable\_debug\_events() to be called first. - -> \[!NOTE] -> event\_type (str): The event label (e.g. "barge", "llm\_error", "session\_start") -> data (dict): The full event payload including call\_id, label, and event-specific fields - -The handler may be sync or async. - -> \[!NOTE] -> @agent.on\_debug\_event -> def handle(event\_type, data): -> if event\_type == "barge": -> print(f"Barge detected: \{data.get('barge\_elapsed\_ms')\}ms") - -#### Signature - -```python -on_debug_event(handler: Callable) -> Callable -``` - -#### Parameters - - - Callback function with signature (event\_type: str, data: dict) - - -#### Returns - -`Callable` — The handler function (unchanged), for use as a decorator - -#### Source - -[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) - -Line 458. - -*** - -### on\_summary - -Called when a post-prompt summary is received - -#### Signature - -```python -on_summary( - summary: Optional[Dict[str, Any]], - raw_data: Optional[Dict[str, Any]] = None -) -> None -``` - -#### Parameters - - - The summary object or None if no summary was found - - - - The complete raw POST data from the request - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) - -Line 447. - -*** - -### register\_sip\_username - -Register a SIP username that should be routed to this agent - -#### Signature - -```python -register_sip_username(sip_username: str) -> AgentBase -``` - -#### Parameters - - - SIP username to register - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) - -Line 682. - -*** - -### set\_post\_prompt\_url - -Override the default post\_prompt\_url with a supplied URL string - -#### Signature - -```python -set_post_prompt_url(url: str) -> AgentBase -``` - -#### Parameters - - - The URL to use for post-prompt summary delivery - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) - -Line 740. - -*** - -### set\_web\_hook\_url - -Override the default web\_hook\_url with a supplied URL string - -#### Signature - -```python -set_web_hook_url(url: str) -> AgentBase -``` - -#### Parameters - - - The URL to use for SWAIG function webhooks - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) - -Line 727. - -## Source - -[`signalwire/signalwire/core/agent_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent_base.py) - -Line 78. diff --git a/fern/products/sdk-reference/python/agents/agent-server/add-security-headers.mdx b/fern/products/sdk-reference/python/agents/agent-server/add-security-headers.mdx index 89d68b6c8d..b09f71e496 100644 --- a/fern/products/sdk-reference/python/agents/agent-server/add-security-headers.mdx +++ b/fern/products/sdk-reference/python/agents/agent-server/add-security-headers.mdx @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.agent_server.AgentServer.__init__.add_security_headers" parent: "signalwire.agent_server.AgentServer.__init__" - module: "agents.AgentServer" + module: "agents.agent_server" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/agent_server.py" --- # `add_security_headers` diff --git a/fern/products/sdk-reference/python/agents/agent-server/index.mdx b/fern/products/sdk-reference/python/agents/agent-server/index.mdx index 194213cf9f..f3c4a73988 100644 --- a/fern/products/sdk-reference/python/agents/agent-server/index.mdx +++ b/fern/products/sdk-reference/python/agents/agent-server/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.agent_server" parent: "agents" @@ -14,19 +14,390 @@ lustri: --- # `agent_server` -Copyright (c) 2025 SignalWire +Server for hosting multiple SignalWire AI Agents under a single FastAPI application. -This file is part of the SignalWire SDK. +This allows you to run multiple agents on different routes of the same server, +which is useful for deployment and resource management. -Licensed under the MIT License. -See LICENSE file in the project root for full license information. +> \[!NOTE] +> server = AgentServer() +> server.register(SupportAgent(), "/support") +> server.register(SalesAgent(), "/sales") +> server.run() ## Signature ```python -module agent_server +class AgentServer ``` +## Properties + + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +Initialize a new agent server + +#### Signature + +```python +__init__(host: str = '0.0.0.0', port: int = 3000, log_level: str = 'info') +``` + +#### Parameters + + + Host to bind the server to + + + + Port to bind the server to + + + + Logging level (debug, info, warning, error, critical) + + +#### Source + +[`signalwire/signalwire/agent_server.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/agent_server.py) + +Line 45. + +*** + +### get\_agent + +Get an agent by route + +#### Signature + +```python +get_agent(route: str) -> Optional[AgentBase] +``` + +#### Parameters + + + The route of the agent + + +#### Returns + +`Optional[AgentBase]` — The agent or None if not found + +#### Source + +[`signalwire/signalwire/agent_server.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/agent_server.py) + +Line 310. + +*** + +### get\_agents + +Get all registered agents + +#### Signature + +```python +get_agents() -> List[Tuple[str, AgentBase]] +``` + +#### Returns + +`List[Tuple[str, AgentBase]]` — List of (route, agent) tuples + +#### Source + +[`signalwire/signalwire/agent_server.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/agent_server.py) + +Line 301. + +*** + +### register + +Register an agent with the server + +#### Signature + +```python +register(agent: AgentBase, route: Optional[str] = None) -> None +``` + +#### Parameters + + + The agent to register + + + + Optional route to override the agent's default route + + +#### Returns + +`None` + +#### Throws + +- `ValueError` — If the route is already in use + +#### Source + +[`signalwire/signalwire/agent_server.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/agent_server.py) + +Line 102. + +*** + +### register\_global\_routing\_callback + +Register a routing callback across all agents + +This allows you to add unified routing logic to all agents at the same path. + +#### Signature + +```python +register_global_routing_callback( + callback_fn: Callable[Request, Dict[str, Any], Optional[str]], + path: str +) -> None +``` + +#### Parameters + + + The callback function to register + + + + The path to register the callback at + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/agent_server.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/agent_server.py) + +Line 652. + +*** + +### register\_sip\_username + +Register a mapping from SIP username to agent route + +#### Signature + +```python +register_sip_username(username: str, route: str) -> None +``` + +#### Parameters + + + The SIP username + + + + The route to the agent + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/agent_server.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/agent_server.py) + +Line 210. + +*** + +### run + +Universal run method that automatically detects environment and handles accordingly + +Detects execution mode and routes appropriately: + +- Server mode: Starts uvicorn server with FastAPI +- CGI mode: Uses same routing logic but outputs CGI headers +- Lambda mode: Uses same routing logic but returns Lambda response + +#### Signature + +```python +run( + event = None, + context = None, + host: Optional[str] = None, + port: Optional[int] = None +) -> Any +``` + +#### Parameters + + + Serverless event object (Lambda, Cloud Functions) + + + + Serverless context object (Lambda, Cloud Functions) + + + + Optional host to override the default (server mode only) + + + + Optional port to override the default (server mode only) + + +#### Returns + +`Any` — Response for serverless modes, None for server mode + +#### Source + +[`signalwire/signalwire/agent_server.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/agent_server.py) + +Line 328. + +*** + +### serve\_static\_files + +Serve static files from a directory. + +This method properly integrates static file serving with agent routes, +ensuring that agent routes take priority over static files. + +Unlike using StaticFiles.mount("/", ...) directly on self.app, this method +uses explicit route handlers that work correctly with agent routes. + +> \[!NOTE] +> server = AgentServer() +> server.register(SupportAgent(), "/support") +> server.serve\_static\_files("./web") # Serves at / +> +> ### /support -> SupportAgent +> +> ### /index.html -> ./web/index.html +> +> ### / -> ./web/index.html + +#### Signature + +```python +serve_static_files(directory: str, route: str = '/') -> None +``` + +#### Parameters + + + Path to the directory containing static files + + + + URL path prefix for static files (default: "/" for root) + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/agent_server.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/agent_server.py) + +Line 675. + +*** + +### setup\_sip\_routing + +Set up central SIP-based routing for the server + +This configures all agents to handle SIP requests at the specified path, +using a coordinated routing system where each agent checks if it can +handle SIP requests for specific usernames. + +#### Signature + +```python +setup_sip_routing(route: str = '/sip', auto_map: bool = True) -> None +``` + +#### Parameters + + + The path for SIP routing (default: "/sip") + + + + Whether to automatically map SIP usernames to agent routes + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/agent_server.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/agent_server.py) + +Line 147. + +*** + +### unregister + +Unregister an agent from the server + +#### Signature + +```python +unregister(route: str) -> bool +``` + +#### Parameters + + + The route of the agent to unregister + + +#### Returns + +`bool` — True if the agent was unregistered, False if not found + +#### Source + +[`signalwire/signalwire/agent_server.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/agent_server.py) + +Line 274. + ## Source [`signalwire/signalwire/agent_server.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/agent_server.py) + +Line 31. diff --git a/fern/products/sdk-reference/python/agents/agent-server/index__2.mdx b/fern/products/sdk-reference/python/agents/agent-server/index__2.mdx deleted file mode 100644 index 4b3c197323..0000000000 --- a/fern/products/sdk-reference/python/agents/agent-server/index__2.mdx +++ /dev/null @@ -1,403 +0,0 @@ ---- -slug: "/reference/python/agents/agent-server/index__2" -title: "AgentServer" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.agent_server.AgentServer" - parent: "agents" - module: "agents" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/agent_server.py" ---- -# `AgentServer` - -Server for hosting multiple SignalWire AI Agents under a single FastAPI application. - -This allows you to run multiple agents on different routes of the same server, -which is useful for deployment and resource management. - -> \[!NOTE] -> server = AgentServer() -> server.register(SupportAgent(), "/support") -> server.register(SalesAgent(), "/sales") -> server.run() - -## Signature - -```python -class AgentServer -``` - -## Properties - - - - - - - - - - - - - -## Methods - -### \_\_init\_\_ - -Initialize a new agent server - -#### Signature - -```python -__init__(host: str = '0.0.0.0', port: int = 3000, log_level: str = 'info') -``` - -#### Parameters - - - Host to bind the server to - - - - Port to bind the server to - - - - Logging level (debug, info, warning, error, critical) - - -#### Source - -[`signalwire/signalwire/agent_server.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/agent_server.py) - -Line 45. - -*** - -### get\_agent - -Get an agent by route - -#### Signature - -```python -get_agent(route: str) -> Optional[AgentBase] -``` - -#### Parameters - - - The route of the agent - - -#### Returns - -`Optional[AgentBase]` — The agent or None if not found - -#### Source - -[`signalwire/signalwire/agent_server.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/agent_server.py) - -Line 310. - -*** - -### get\_agents - -Get all registered agents - -#### Signature - -```python -get_agents() -> List[Tuple[str, AgentBase]] -``` - -#### Returns - -`List[Tuple[str, AgentBase]]` — List of (route, agent) tuples - -#### Source - -[`signalwire/signalwire/agent_server.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/agent_server.py) - -Line 301. - -*** - -### register - -Register an agent with the server - -#### Signature - -```python -register(agent: AgentBase, route: Optional[str] = None) -> None -``` - -#### Parameters - - - The agent to register - - - - Optional route to override the agent's default route - - -#### Returns - -`None` - -#### Throws - -- `ValueError` — If the route is already in use - -#### Source - -[`signalwire/signalwire/agent_server.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/agent_server.py) - -Line 102. - -*** - -### register\_global\_routing\_callback - -Register a routing callback across all agents - -This allows you to add unified routing logic to all agents at the same path. - -#### Signature - -```python -register_global_routing_callback( - callback_fn: Callable[Request, Dict[str, Any], Optional[str]], - path: str -) -> None -``` - -#### Parameters - - - The callback function to register - - - - The path to register the callback at - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/agent_server.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/agent_server.py) - -Line 652. - -*** - -### register\_sip\_username - -Register a mapping from SIP username to agent route - -#### Signature - -```python -register_sip_username(username: str, route: str) -> None -``` - -#### Parameters - - - The SIP username - - - - The route to the agent - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/agent_server.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/agent_server.py) - -Line 210. - -*** - -### run - -Universal run method that automatically detects environment and handles accordingly - -Detects execution mode and routes appropriately: - -- Server mode: Starts uvicorn server with FastAPI -- CGI mode: Uses same routing logic but outputs CGI headers -- Lambda mode: Uses same routing logic but returns Lambda response - -#### Signature - -```python -run( - event = None, - context = None, - host: Optional[str] = None, - port: Optional[int] = None -) -> Any -``` - -#### Parameters - - - Serverless event object (Lambda, Cloud Functions) - - - - Serverless context object (Lambda, Cloud Functions) - - - - Optional host to override the default (server mode only) - - - - Optional port to override the default (server mode only) - - -#### Returns - -`Any` — Response for serverless modes, None for server mode - -#### Source - -[`signalwire/signalwire/agent_server.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/agent_server.py) - -Line 328. - -*** - -### serve\_static\_files - -Serve static files from a directory. - -This method properly integrates static file serving with agent routes, -ensuring that agent routes take priority over static files. - -Unlike using StaticFiles.mount("/", ...) directly on self.app, this method -uses explicit route handlers that work correctly with agent routes. - -> \[!NOTE] -> server = AgentServer() -> server.register(SupportAgent(), "/support") -> server.serve\_static\_files("./web") # Serves at / -> -> ### /support -> SupportAgent -> -> ### /index.html -> ./web/index.html -> -> ### / -> ./web/index.html - -#### Signature - -```python -serve_static_files(directory: str, route: str = '/') -> None -``` - -#### Parameters - - - Path to the directory containing static files - - - - URL path prefix for static files (default: "/" for root) - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/agent_server.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/agent_server.py) - -Line 675. - -*** - -### setup\_sip\_routing - -Set up central SIP-based routing for the server - -This configures all agents to handle SIP requests at the specified path, -using a coordinated routing system where each agent checks if it can -handle SIP requests for specific usernames. - -#### Signature - -```python -setup_sip_routing(route: str = '/sip', auto_map: bool = True) -> None -``` - -#### Parameters - - - The path for SIP routing (default: "/sip") - - - - Whether to automatically map SIP usernames to agent routes - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/agent_server.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/agent_server.py) - -Line 147. - -*** - -### unregister - -Unregister an agent from the server - -#### Signature - -```python -unregister(route: str) -> bool -``` - -#### Parameters - - - The route of the agent to unregister - - -#### Returns - -`bool` — True if the agent was unregistered, False if not found - -#### Source - -[`signalwire/signalwire/agent_server.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/agent_server.py) - -Line 274. - -## Source - -[`signalwire/signalwire/agent_server.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/agent_server.py) - -Line 31. diff --git a/fern/products/sdk-reference/python/agents/agent/prompt/index.mdx b/fern/products/sdk-reference/python/agents/agent/prompt/index.mdx index 3d8193a41a..dab1053223 100644 --- a/fern/products/sdk-reference/python/agents/agent/prompt/index.mdx +++ b/fern/products/sdk-reference/python/agents/agent/prompt/index.mdx @@ -31,11 +31,11 @@ module prompt -## Modules +## Classes - Copyright (c) 2025 SignalWire + Manages prompt building and configuration. diff --git a/fern/products/sdk-reference/python/agents/agent/prompt/manager/index.mdx b/fern/products/sdk-reference/python/agents/agent/prompt/manager/index.mdx index 5b13502b26..e3037b1081 100644 --- a/fern/products/sdk-reference/python/agents/agent/prompt/manager/index.mdx +++ b/fern/products/sdk-reference/python/agents/agent/prompt/manager/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.core.agent.prompt.manager" parent: "signalwire.core.agent.prompt" @@ -14,31 +14,423 @@ lustri: --- # `manager` -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. +Manages prompt building and configuration. ## Signature ```python -module manager +class PromptManager ``` ## Properties + + -## Classes +## Methods + +### \_\_init\_\_ + +Initialize PromptManager with reference to parent agent. + +#### Signature + +```python +__init__(agent) +``` + +#### Parameters + + + Parent AgentBase instance + + +#### Source + +[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) + +Line 23. + +*** + +### define\_contexts + +Define contexts for the agent. + +#### Signature + +```python +define_contexts(contexts: Union[Dict[str, Any], Any]) -> None +``` + +#### Parameters + + + Context configuration (dict or ContextBuilder) + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) + +Line 73. + +*** + +### get\_contexts + +Get the contexts configuration. + +#### Signature + +```python +get_contexts() -> Optional[Dict[str, Any]] +``` + +#### Returns + +`Optional[Dict[str, Any]]` — Contexts dict or None + +#### Source + +[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) + +Line 300. + +*** + +### get\_post\_prompt + +Get the post-prompt text. + +#### Signature + +```python +get_post_prompt() -> Optional[str] +``` + +#### Returns + +`Optional[str]` — Post-prompt text or None + +#### Source + +[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) + +Line 291. + +*** + +### get\_prompt + +Get the prompt configuration. + +#### Signature + +```python +get_prompt() -> Optional[Union[str, List[Dict[str, Any]]]] +``` + +#### Returns + +`Optional[Union[str, List[Dict[str, Any]]]]` — Prompt text or sections or None + +#### Source + +[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) + +Line 273. + +*** + +### get\_raw\_prompt + +Get the raw prompt text if set. + +#### Signature + +```python +get_raw_prompt() -> Optional[str] +``` + +#### Returns + +`Optional[str]` — Raw prompt text or None + +#### Source + +[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) + +Line 282. + +*** + +### prompt\_add\_section + +Add a section to the prompt. + +#### Signature + +```python +prompt_add_section( + title: str, + body: str = '', + bullets: Optional[List[str]] = None, + numbered: bool = False, + numbered_bullets: bool = False, + subsections: Optional[List[Dict[str, Any]]] = None +) -> None +``` + +#### Parameters + + + Section title + + + + Optional section body text + + + + Optional list of bullet points + + + + Whether this section should be numbered + + + + Whether bullets should be numbered + + + + Optional list of subsection objects + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) + +Line 127. + +*** + +### prompt\_add\_subsection + +Add a subsection to an existing section (creating parent if needed). + +#### Signature + +```python +prompt_add_subsection( + parent_title: str, + title: str, + body: str = '', + bullets: Optional[List[str]] = None +) -> None +``` + +#### Parameters + + + Parent section title + + + + Subsection title + + + + Optional subsection body text + + + + Optional list of bullet points + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) + +Line 220. + +*** + +### prompt\_add\_to\_section + +Add content to an existing section (creating it if needed). + +#### Signature + +```python +prompt_add_to_section( + title: str, + body: Optional[str] = None, + bullet: Optional[str] = None, + bullets: Optional[List[str]] = None +) -> None +``` + +#### Parameters + + + Section title + + + + Optional text to append to section body + + + + Optional single bullet point to add + + + + Optional list of bullet points to add + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) + +Line 179. + +*** + +### prompt\_has\_section + +Check if a section exists in the prompt. + +#### Signature + +```python +prompt_has_section(title: str) -> bool +``` + +#### Parameters + + + Section title to check + + +#### Returns + +`bool` — True if section exists, False otherwise + +#### Source - - - Manages prompt building and configuration. - - +[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) + +Line 258. + +*** + +### set\_post\_prompt + +Set the post-prompt text. + +#### Signature + +```python +set_post_prompt(text: str) -> None +``` + +#### Parameters + + + Post-prompt text + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) + +Line 102. + +*** + +### set\_prompt\_pom + +Set the prompt as a POM dictionary. + +#### Signature + +```python +set_prompt_pom(pom: List[Dict[str, Any]]) -> None +``` + +#### Parameters + + + POM dictionary structure + + +#### Returns + +`None` + +#### Throws + +- `ValueError` — If use\_pom is False + +#### Source + +[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) + +Line 112. + +*** + +### set\_prompt\_text + +Set the agent's prompt as raw text. + +#### Signature + +```python +set_prompt_text(text: str) -> None +``` + +#### Parameters + + + Prompt text + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) + +Line 91. ## Source [`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) + +Line 20. diff --git a/fern/products/sdk-reference/python/agents/agent/prompt/manager/prompt-manager/index.mdx b/fern/products/sdk-reference/python/agents/agent/prompt/manager/prompt-manager/index.mdx deleted file mode 100644 index 9895845a1c..0000000000 --- a/fern/products/sdk-reference/python/agents/agent/prompt/manager/prompt-manager/index.mdx +++ /dev/null @@ -1,434 +0,0 @@ ---- -slug: "/reference/python/agents/agent/prompt/manager/prompt-manager" -title: "PromptManager" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.core.agent.prompt.manager.PromptManager" - parent: "signalwire.core.agent.prompt.manager" - module: "agents.agent.prompt.manager" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py" ---- -# `PromptManager` - -Manages prompt building and configuration. - -## Signature - -```python -class PromptManager -``` - -## Properties - - - -## Methods - -### \_\_init\_\_ - -Initialize PromptManager with reference to parent agent. - -#### Signature - -```python -__init__(agent) -``` - -#### Parameters - - - Parent AgentBase instance - - -#### Source - -[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) - -Line 23. - -*** - -### define\_contexts - -Define contexts for the agent. - -#### Signature - -```python -define_contexts(contexts: Union[Dict[str, Any], Any]) -> None -``` - -#### Parameters - - - Context configuration (dict or ContextBuilder) - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) - -Line 73. - -*** - -### get\_contexts - -Get the contexts configuration. - -#### Signature - -```python -get_contexts() -> Optional[Dict[str, Any]] -``` - -#### Returns - -`Optional[Dict[str, Any]]` — Contexts dict or None - -#### Source - -[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) - -Line 300. - -*** - -### get\_post\_prompt - -Get the post-prompt text. - -#### Signature - -```python -get_post_prompt() -> Optional[str] -``` - -#### Returns - -`Optional[str]` — Post-prompt text or None - -#### Source - -[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) - -Line 291. - -*** - -### get\_prompt - -Get the prompt configuration. - -#### Signature - -```python -get_prompt() -> Optional[Union[str, List[Dict[str, Any]]]] -``` - -#### Returns - -`Optional[Union[str, List[Dict[str, Any]]]]` — Prompt text or sections or None - -#### Source - -[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) - -Line 273. - -*** - -### get\_raw\_prompt - -Get the raw prompt text if set. - -#### Signature - -```python -get_raw_prompt() -> Optional[str] -``` - -#### Returns - -`Optional[str]` — Raw prompt text or None - -#### Source - -[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) - -Line 282. - -*** - -### prompt\_add\_section - -Add a section to the prompt. - -#### Signature - -```python -prompt_add_section( - title: str, - body: str = '', - bullets: Optional[List[str]] = None, - numbered: bool = False, - numbered_bullets: bool = False, - subsections: Optional[List[Dict[str, Any]]] = None -) -> None -``` - -#### Parameters - - - Section title - - - - Optional section body text - - - - Optional list of bullet points - - - - Whether this section should be numbered - - - - Whether bullets should be numbered - - - - Optional list of subsection objects - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) - -Line 127. - -*** - -### prompt\_add\_subsection - -Add a subsection to an existing section (creating parent if needed). - -#### Signature - -```python -prompt_add_subsection( - parent_title: str, - title: str, - body: str = '', - bullets: Optional[List[str]] = None -) -> None -``` - -#### Parameters - - - Parent section title - - - - Subsection title - - - - Optional subsection body text - - - - Optional list of bullet points - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) - -Line 220. - -*** - -### prompt\_add\_to\_section - -Add content to an existing section (creating it if needed). - -#### Signature - -```python -prompt_add_to_section( - title: str, - body: Optional[str] = None, - bullet: Optional[str] = None, - bullets: Optional[List[str]] = None -) -> None -``` - -#### Parameters - - - Section title - - - - Optional text to append to section body - - - - Optional single bullet point to add - - - - Optional list of bullet points to add - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) - -Line 179. - -*** - -### prompt\_has\_section - -Check if a section exists in the prompt. - -#### Signature - -```python -prompt_has_section(title: str) -> bool -``` - -#### Parameters - - - Section title to check - - -#### Returns - -`bool` — True if section exists, False otherwise - -#### Source - -[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) - -Line 258. - -*** - -### set\_post\_prompt - -Set the post-prompt text. - -#### Signature - -```python -set_post_prompt(text: str) -> None -``` - -#### Parameters - - - Post-prompt text - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) - -Line 102. - -*** - -### set\_prompt\_pom - -Set the prompt as a POM dictionary. - -#### Signature - -```python -set_prompt_pom(pom: List[Dict[str, Any]]) -> None -``` - -#### Parameters - - - POM dictionary structure - - -#### Returns - -`None` - -#### Throws - -- `ValueError` — If use\_pom is False - -#### Source - -[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) - -Line 112. - -*** - -### set\_prompt\_text - -Set the agent's prompt as raw text. - -#### Signature - -```python -set_prompt_text(text: str) -> None -``` - -#### Parameters - - - Prompt text - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) - -Line 91. - -## Source - -[`signalwire/signalwire/core/agent/prompt/manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/prompt/manager.py) - -Line 20. diff --git a/fern/products/sdk-reference/python/agents/agent/tools/decorator/index.mdx b/fern/products/sdk-reference/python/agents/agent/tools/decorator/index.mdx index 0fcb835997..c0af7f3263 100644 --- a/fern/products/sdk-reference/python/agents/agent/tools/decorator/index.mdx +++ b/fern/products/sdk-reference/python/agents/agent/tools/decorator/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.core.agent.tools.decorator" parent: "signalwire.core.agent.tools" @@ -14,31 +14,76 @@ lustri: --- # `decorator` -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. +Handles tool decoration logic. ## Signature ```python -module decorator +class ToolDecorator ``` ## Properties -## Classes +## Methods + +### create\_class\_decorator + +Create class tool decorator. + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +create_class_decorator() +``` + +#### Returns + +Decorator function + +#### Source + +[`signalwire/signalwire/core/agent/tools/decorator.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/decorator.py) + +Line 132. + +*** - - - Handles tool decoration logic. - - +### create\_instance\_decorator + +Create instance tool decorator. + +**Modifiers:** `static` + +#### Signature + +```python +@staticmethod +create_instance_decorator(registry) +``` + +#### Parameters + + + ToolRegistry instance to register with + + +#### Returns + +Decorator function + +#### Source + +[`signalwire/signalwire/core/agent/tools/decorator.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/decorator.py) + +Line 23. ## Source [`signalwire/signalwire/core/agent/tools/decorator.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/decorator.py) + +Line 20. diff --git a/fern/products/sdk-reference/python/agents/agent/tools/decorator/tool-decorator/index.mdx b/fern/products/sdk-reference/python/agents/agent/tools/decorator/tool-decorator/index.mdx deleted file mode 100644 index d9dad9095f..0000000000 --- a/fern/products/sdk-reference/python/agents/agent/tools/decorator/tool-decorator/index.mdx +++ /dev/null @@ -1,85 +0,0 @@ ---- -slug: "/reference/python/agents/agent/tools/decorator/tool-decorator" -title: "ToolDecorator" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.core.agent.tools.decorator.ToolDecorator" - parent: "signalwire.core.agent.tools.decorator" - module: "agents.agent.tools.decorator" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/decorator.py" ---- -# `ToolDecorator` - -Handles tool decoration logic. - -## Signature - -```python -class ToolDecorator -``` - -## Methods - -### create\_class\_decorator - -Create class tool decorator. - -**Modifiers:** `classmethod` - -#### Signature - -```python -@classmethod -create_class_decorator() -``` - -#### Returns - -Decorator function - -#### Source - -[`signalwire/signalwire/core/agent/tools/decorator.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/decorator.py) - -Line 132. - -*** - -### create\_instance\_decorator - -Create instance tool decorator. - -**Modifiers:** `static` - -#### Signature - -```python -@staticmethod -create_instance_decorator(registry) -``` - -#### Parameters - - - ToolRegistry instance to register with - - -#### Returns - -Decorator function - -#### Source - -[`signalwire/signalwire/core/agent/tools/decorator.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/decorator.py) - -Line 23. - -## Source - -[`signalwire/signalwire/core/agent/tools/decorator.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/decorator.py) - -Line 20. diff --git a/fern/products/sdk-reference/python/agents/agent/tools/index.mdx b/fern/products/sdk-reference/python/agents/agent/tools/index.mdx index 59e831242a..d22e25365f 100644 --- a/fern/products/sdk-reference/python/agents/agent/tools/index.mdx +++ b/fern/products/sdk-reference/python/agents/agent/tools/index.mdx @@ -31,17 +31,21 @@ module tools -## Modules +## Classes - Copyright (c) 2025 SignalWire + Handles tool decoration logic. - Copyright (c) 2025 SignalWire + Manages SWAIG function registration. + +## Modules + + Copyright (c) 2025 SignalWire diff --git a/fern/products/sdk-reference/python/agents/agent/tools/registry/index.mdx b/fern/products/sdk-reference/python/agents/agent/tools/registry/index.mdx index edaaf81c16..a7a3ee2c8f 100644 --- a/fern/products/sdk-reference/python/agents/agent/tools/registry/index.mdx +++ b/fern/products/sdk-reference/python/agents/agent/tools/registry/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.core.agent.tools.registry" parent: "signalwire.core.agent.tools" @@ -14,31 +14,298 @@ lustri: --- # `registry` -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. +Manages SWAIG function registration. ## Signature ```python -module registry +class ToolRegistry ``` ## Properties + + -## Classes +## Methods + +### \_\_init\_\_ + +Initialize ToolRegistry with reference to parent agent. + +#### Signature + +```python +__init__(agent) +``` + +#### Parameters + + + Parent AgentBase instance + + +#### Source + +[`signalwire/signalwire/core/agent/tools/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/registry.py) + +Line 24. + +*** + +### define\_tool + +Define a SWAIG function that the AI can call. + +#### Signature + +```python +define_tool( + name: str, + description: str, + parameters: Dict[str, Any], + handler: Callable, + secure: bool = True, + fillers: Optional[Dict[str, List[str]]] = None, + wait_file: Optional[str] = None, + wait_file_loops: Optional[int] = None, + webhook_url: Optional[str] = None, + required: Optional[List[str]] = None, + is_typed_handler: bool = False, + **swaig_fields = {} +) -> None +``` + +#### Parameters + + + Function name (must be unique) + + + + Function description for the AI + + + + JSON Schema of parameters + + + + Function to call when invoked + + + + Whether to require token validation + + + + Optional dict mapping language codes to arrays of filler phrases (deprecated) + + + + Optional URL to audio file to play while function executes + + + + Optional number of times to loop the wait\_file + + + + Optional external webhook URL to use instead of local handling + + + + Optional list of required parameter names + + + + Whether the handler uses type-hinted parameters + + + + +#### Returns + +`None` + +#### Throws + +- `ValueError` — If tool name already exists + +#### Source + +[`signalwire/signalwire/core/agent/tools/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/registry.py) + +Line 35. + +*** + +### get\_all\_functions + +Get all registered functions. + +#### Signature + +```python +get_all_functions() -> Dict[str, Union[SWAIGFunction, Dict[str, Any]]] +``` + +#### Returns + +`Dict[str, Union[SWAIGFunction, Dict[str, Any]]]` — Dictionary of function name to function object/dict + +#### Source + +[`signalwire/signalwire/core/agent/tools/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/registry.py) + +Line 204. + +*** + +### get\_function + +Get a registered function by name. + +#### Signature + +```python +get_function(name: str) -> Optional[Union[SWAIGFunction, Dict[str, Any]]] +``` + +#### Parameters + + + Function name + + +#### Returns - - - Manages SWAIG function registration. - - +`Optional[Union[SWAIGFunction, Dict[str, Any]]]` — SWAIGFunction instance or raw function dict, or None if not found + +#### Source + +[`signalwire/signalwire/core/agent/tools/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/registry.py) + +Line 192. + +*** + +### has\_function + +Check if a function is registered. + +#### Signature + +```python +has_function(name: str) -> bool +``` + +#### Parameters + + + Function name + + +#### Returns + +`bool` — True if function exists, False otherwise + +#### Source + +[`signalwire/signalwire/core/agent/tools/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/registry.py) + +Line 213. + +*** + +### register\_class\_decorated\_tools + +Register tools defined with @AgentBase.tool class decorator. + +This method scans the class for methods decorated with @AgentBase.tool +and registers them automatically. If parameters are not explicitly +provided and the function has type-hinted parameters, the schema +is inferred from the type hints. + +#### Signature + +```python +register_class_decorated_tools() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/core/agent/tools/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/registry.py) + +Line 116. + +*** + +### register\_swaig\_function + +Register a raw SWAIG function dictionary (e.g., from DataMap.to\_swaig\_function()). + +#### Signature + +```python +register_swaig_function(function_dict: Dict[str, Any]) -> None +``` + +#### Parameters + + + Complete SWAIG function definition dictionary + + +#### Returns + +`None` + +#### Throws + +- `ValueError` — If function name missing or already exists + +#### Source + +[`signalwire/signalwire/core/agent/tools/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/registry.py) + +Line 90. + +*** + +### remove\_function + +Remove a registered function. + +#### Signature + +```python +remove_function(name: str) -> bool +``` + +#### Parameters + + + Function name + + +#### Returns + +`bool` — True if removed, False if not found + +#### Source + +[`signalwire/signalwire/core/agent/tools/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/registry.py) + +Line 225. ## Source [`signalwire/signalwire/core/agent/tools/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/registry.py) + +Line 21. diff --git a/fern/products/sdk-reference/python/agents/agent/tools/registry/tool-registry/index.mdx b/fern/products/sdk-reference/python/agents/agent/tools/registry/tool-registry/index.mdx deleted file mode 100644 index cd343d9f01..0000000000 --- a/fern/products/sdk-reference/python/agents/agent/tools/registry/tool-registry/index.mdx +++ /dev/null @@ -1,309 +0,0 @@ ---- -slug: "/reference/python/agents/agent/tools/registry/tool-registry" -title: "ToolRegistry" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.core.agent.tools.registry.ToolRegistry" - parent: "signalwire.core.agent.tools.registry" - module: "agents.agent.tools.registry" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/registry.py" ---- -# `ToolRegistry` - -Manages SWAIG function registration. - -## Signature - -```python -class ToolRegistry -``` - -## Properties - - - -## Methods - -### \_\_init\_\_ - -Initialize ToolRegistry with reference to parent agent. - -#### Signature - -```python -__init__(agent) -``` - -#### Parameters - - - Parent AgentBase instance - - -#### Source - -[`signalwire/signalwire/core/agent/tools/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/registry.py) - -Line 24. - -*** - -### define\_tool - -Define a SWAIG function that the AI can call. - -#### Signature - -```python -define_tool( - name: str, - description: str, - parameters: Dict[str, Any], - handler: Callable, - secure: bool = True, - fillers: Optional[Dict[str, List[str]]] = None, - wait_file: Optional[str] = None, - wait_file_loops: Optional[int] = None, - webhook_url: Optional[str] = None, - required: Optional[List[str]] = None, - is_typed_handler: bool = False, - **swaig_fields = {} -) -> None -``` - -#### Parameters - - - Function name (must be unique) - - - - Function description for the AI - - - - JSON Schema of parameters - - - - Function to call when invoked - - - - Whether to require token validation - - - - Optional dict mapping language codes to arrays of filler phrases (deprecated) - - - - Optional URL to audio file to play while function executes - - - - Optional number of times to loop the wait\_file - - - - Optional external webhook URL to use instead of local handling - - - - Optional list of required parameter names - - - - Whether the handler uses type-hinted parameters - - - - -#### Returns - -`None` - -#### Throws - -- `ValueError` — If tool name already exists - -#### Source - -[`signalwire/signalwire/core/agent/tools/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/registry.py) - -Line 35. - -*** - -### get\_all\_functions - -Get all registered functions. - -#### Signature - -```python -get_all_functions() -> Dict[str, Union[SWAIGFunction, Dict[str, Any]]] -``` - -#### Returns - -`Dict[str, Union[SWAIGFunction, Dict[str, Any]]]` — Dictionary of function name to function object/dict - -#### Source - -[`signalwire/signalwire/core/agent/tools/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/registry.py) - -Line 204. - -*** - -### get\_function - -Get a registered function by name. - -#### Signature - -```python -get_function(name: str) -> Optional[Union[SWAIGFunction, Dict[str, Any]]] -``` - -#### Parameters - - - Function name - - -#### Returns - -`Optional[Union[SWAIGFunction, Dict[str, Any]]]` — SWAIGFunction instance or raw function dict, or None if not found - -#### Source - -[`signalwire/signalwire/core/agent/tools/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/registry.py) - -Line 192. - -*** - -### has\_function - -Check if a function is registered. - -#### Signature - -```python -has_function(name: str) -> bool -``` - -#### Parameters - - - Function name - - -#### Returns - -`bool` — True if function exists, False otherwise - -#### Source - -[`signalwire/signalwire/core/agent/tools/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/registry.py) - -Line 213. - -*** - -### register\_class\_decorated\_tools - -Register tools defined with @AgentBase.tool class decorator. - -This method scans the class for methods decorated with @AgentBase.tool -and registers them automatically. If parameters are not explicitly -provided and the function has type-hinted parameters, the schema -is inferred from the type hints. - -#### Signature - -```python -register_class_decorated_tools() -> None -``` - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/core/agent/tools/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/registry.py) - -Line 116. - -*** - -### register\_swaig\_function - -Register a raw SWAIG function dictionary (e.g., from DataMap.to\_swaig\_function()). - -#### Signature - -```python -register_swaig_function(function_dict: Dict[str, Any]) -> None -``` - -#### Parameters - - - Complete SWAIG function definition dictionary - - -#### Returns - -`None` - -#### Throws - -- `ValueError` — If function name missing or already exists - -#### Source - -[`signalwire/signalwire/core/agent/tools/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/registry.py) - -Line 90. - -*** - -### remove\_function - -Remove a registered function. - -#### Signature - -```python -remove_function(name: str) -> bool -``` - -#### Parameters - - - Function name - - -#### Returns - -`bool` — True if removed, False if not found - -#### Source - -[`signalwire/signalwire/core/agent/tools/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/registry.py) - -Line 225. - -## Source - -[`signalwire/signalwire/core/agent/tools/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/agent/tools/registry.py) - -Line 21. diff --git a/fern/products/sdk-reference/python/agents/cli/core/argparse-helpers/custom-argument-parser/index.mdx b/fern/products/sdk-reference/python/agents/cli/core/argparse-helpers/custom-argument-parser/index.mdx deleted file mode 100644 index 4ca91e87fe..0000000000 --- a/fern/products/sdk-reference/python/agents/cli/core/argparse-helpers/custom-argument-parser/index.mdx +++ /dev/null @@ -1,123 +0,0 @@ ---- -slug: "/reference/python/agents/cli/core/argparse-helpers/custom-argument-parser" -title: "CustomArgumentParser" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.cli.core.argparse_helpers.CustomArgumentParser" - parent: "signalwire.cli.core.argparse_helpers" - module: "agents.cli.core.argparse_helpers" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/argparse_helpers.py" ---- -# `CustomArgumentParser` - -Custom ArgumentParser with better error handling - -## Signature - -```python -class CustomArgumentParser(argparse.ArgumentParser) -``` - -## Inheritance - -**Extends:** `argparse.ArgumentParser` - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(*args = (), **kwargs = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/cli/core/argparse_helpers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/argparse_helpers.py) - -Line 23. - -*** - -### error - -Override error method to provide user-friendly error messages - -#### Signature - -```python -error(message) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/cli/core/argparse_helpers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/argparse_helpers.py) - -Line 33. - -*** - -### parse\_args - -Override parse\_args to provide custom error handling for missing arguments - -#### Signature - -```python -parse_args(args = None, namespace = None) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/cli/core/argparse_helpers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/argparse_helpers.py) - -Line 58. - -*** - -### print\_usage - -Override print\_usage to suppress output when we want custom error handling - -#### Signature - -```python -print_usage(file = None) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/cli/core/argparse_helpers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/argparse_helpers.py) - -Line 52. - -## Source - -[`signalwire/signalwire/cli/core/argparse_helpers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/argparse_helpers.py) - -Line 20. diff --git a/fern/products/sdk-reference/python/agents/cli/core/argparse-helpers/index.mdx b/fern/products/sdk-reference/python/agents/cli/core/argparse-helpers/index.mdx index b0313af5a9..d60d40ddb4 100644 --- a/fern/products/sdk-reference/python/agents/cli/core/argparse-helpers/index.mdx +++ b/fern/products/sdk-reference/python/agents/cli/core/argparse-helpers/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.cli.core.argparse_helpers" parent: "signalwire.cli.core" @@ -14,26 +14,107 @@ lustri: --- # `argparse_helpers` -Copyright (c) 2025 SignalWire +Custom ArgumentParser with better error handling -This file is part of the SignalWire SDK. +## Signature -Licensed under the MIT License. -See LICENSE file in the project root for full license information. +```python +class CustomArgumentParser(argparse.ArgumentParser) +``` -## Signature +## Inheritance + +**Extends:** `argparse.ArgumentParser` + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(*args = (), **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/cli/core/argparse_helpers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/argparse_helpers.py) + +Line 23. + +*** + +### error + +Override error method to provide user-friendly error messages + +#### Signature + +```python +error(message) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/cli/core/argparse_helpers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/argparse_helpers.py) + +Line 33. + +*** + +### parse\_args + +Override parse\_args to provide custom error handling for missing arguments + +#### Signature ```python -module argparse_helpers +parse_args(args = None, namespace = None) ``` -## Classes +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/cli/core/argparse_helpers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/argparse_helpers.py) + +Line 58. - - - Custom ArgumentParser with better error handling - - +*** + +### print\_usage + +Override print\_usage to suppress output when we want custom error handling + +#### Signature + +```python +print_usage(file = None) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/cli/core/argparse_helpers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/argparse_helpers.py) + +Line 52. ## Functions @@ -73,3 +154,5 @@ Line 82. ## Source [`signalwire/signalwire/cli/core/argparse_helpers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/argparse_helpers.py) + +Line 20. diff --git a/fern/products/sdk-reference/python/agents/cli/core/index.mdx b/fern/products/sdk-reference/python/agents/cli/core/index.mdx index 74ac178367..95c546bfb2 100644 --- a/fern/products/sdk-reference/python/agents/cli/core/index.mdx +++ b/fern/products/sdk-reference/python/agents/cli/core/index.mdx @@ -27,22 +27,26 @@ See LICENSE file in the project root for full license information. module core ``` -## Modules +## Classes - - Copyright (c) 2025 SignalWire + + Custom ArgumentParser with better error handling - - Copyright (c) 2025 SignalWire + + Captures SWMLService instances when they try to run/serve + - +## Modules + + + Copyright (c) 2025 SignalWire - + Copyright (c) 2025 SignalWire diff --git a/fern/products/sdk-reference/python/agents/cli/core/service-loader/index.mdx b/fern/products/sdk-reference/python/agents/cli/core/service-loader/index.mdx index c92eef3642..97dde23747 100644 --- a/fern/products/sdk-reference/python/agents/cli/core/service-loader/index.mdx +++ b/fern/products/sdk-reference/python/agents/cli/core/service-loader/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.cli.core.service_loader" parent: "signalwire.cli.core" @@ -14,30 +14,71 @@ lustri: --- # `service_loader` -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. +Captures SWMLService instances when they try to run/serve ## Signature ```python -module service_loader +class ServiceCapture ``` +## Properties + + + + + ## Constants -## Classes +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__() +``` + +#### Source + +[`signalwire/signalwire/cli/core/service_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/service_loader.py) + +Line 40. + +*** + +### capture + +Execute a service file and capture any services that try to run - - - Captures SWMLService instances when they try to run/serve - - +#### Signature + +```python +capture(service_path: str, suppress_output: bool = False) -> List[SWMLService] +``` + +#### Parameters + + + Path to the Python file + + + + If True, suppress stdout during module execution + + +#### Returns + +`List[SWMLService]` — List of captured SWMLService instances + +#### Source + +[`signalwire/signalwire/cli/core/service_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/service_loader.py) + +Line 44. ## Functions @@ -216,3 +257,5 @@ Line 135. ## Source [`signalwire/signalwire/cli/core/service_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/service_loader.py) + +Line 37. diff --git a/fern/products/sdk-reference/python/agents/cli/core/service-loader/service-capture/index.mdx b/fern/products/sdk-reference/python/agents/cli/core/service-loader/service-capture/index.mdx deleted file mode 100644 index e93973c8f9..0000000000 --- a/fern/products/sdk-reference/python/agents/cli/core/service-loader/service-capture/index.mdx +++ /dev/null @@ -1,83 +0,0 @@ ---- -slug: "/reference/python/agents/cli/core/service-loader/service-capture" -title: "ServiceCapture" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.cli.core.service_loader.ServiceCapture" - parent: "signalwire.cli.core.service_loader" - module: "agents.cli.core.service_loader" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/service_loader.py" ---- -# `ServiceCapture` - -Captures SWMLService instances when they try to run/serve - -## Signature - -```python -class ServiceCapture -``` - -## Properties - - - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__() -``` - -#### Source - -[`signalwire/signalwire/cli/core/service_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/service_loader.py) - -Line 40. - -*** - -### capture - -Execute a service file and capture any services that try to run - -#### Signature - -```python -capture(service_path: str, suppress_output: bool = False) -> List[SWMLService] -``` - -#### Parameters - - - Path to the Python file - - - - If True, suppress stdout during module execution - - -#### Returns - -`List[SWMLService]` — List of captured SWMLService instances - -#### Source - -[`signalwire/signalwire/cli/core/service_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/service_loader.py) - -Line 44. - -## Source - -[`signalwire/signalwire/cli/core/service_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/cli/core/service_loader.py) - -Line 37. diff --git a/fern/products/sdk-reference/python/agents/configuration/auth-handler/index.mdx b/fern/products/sdk-reference/python/agents/configuration/auth-handler/index.mdx index dc66eee575..c4ec1255e9 100644 --- a/fern/products/sdk-reference/python/agents/configuration/auth-handler/index.mdx +++ b/fern/products/sdk-reference/python/agents/configuration/auth-handler/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.core.auth_handler" parent: "agents.configuration" @@ -14,23 +14,209 @@ lustri: --- # `auth_handler` -Copyright (c) 2025 SignalWire +Unified authentication handler supporting multiple auth methods. -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. +This class provides a clean pattern for handling Basic Auth, Bearer tokens, +and API keys across all SignalWire services. ## Signature ```python -module auth_handler +class AuthHandler ``` ## Properties + + + + + + +## Methods + +### \_\_init\_\_ + +Initialize auth handler with security configuration. + +#### Signature + +```python +__init__(security_config: SecurityConfig) +``` + +#### Parameters + + + SecurityConfig instance with auth settings + + +#### Source + +[`signalwire/signalwire/core/auth_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/auth_handler.py) + +Line 38. + +*** + +### flask\_decorator + +Flask decorator for authentication. + +This provides compatibility with Flask-based services like MCP Gateway. + +#### Signature + +```python +flask_decorator(f: Callable) -> Callable +``` + +#### Parameters + + + +#### Returns + +`Callable` + +#### Source + +[`signalwire/signalwire/core/auth_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/auth_handler.py) + +Line 160. + +*** + +### get\_auth\_info + +Get information about configured auth methods + +#### Signature + +```python +get_auth_info() -> Dict[str, Any] +``` + +#### Returns + +`Dict[str, Any]` + +#### Source + +[`signalwire/signalwire/core/auth_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/auth_handler.py) + +Line 209. + +*** + +### get\_fastapi\_dependency + +Get FastAPI dependency for authentication. + +#### Signature + +```python +get_fastapi_dependency(optional: bool = False) +``` + +#### Parameters + + + If True, authentication is optional + + +#### Returns + +FastAPI dependency function + +#### Source + +[`signalwire/signalwire/core/auth_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/auth_handler.py) + +Line 114. + +*** + +### verify\_api\_key + +Verify API key + +#### Signature + +```python +verify_api_key(api_key: str) -> bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/core/auth_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/auth_handler.py) + +Line 106. + +*** + +### verify\_basic\_auth + +Verify basic auth credentials + +#### Signature + +```python +verify_basic_auth(credentials: HTTPBasicCredentials) -> bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/core/auth_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/auth_handler.py) + +Line 81. + +*** + +### verify\_bearer\_token + +Verify bearer token + +#### Signature + +```python +verify_bearer_token(credentials: HTTPAuthorizationCredentials) -> bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/core/auth_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/auth_handler.py) + +Line 96. + ## Source [`signalwire/signalwire/core/auth_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/auth_handler.py) + +Line 30. diff --git a/fern/products/sdk-reference/python/agents/configuration/auth-handler/index__2.mdx b/fern/products/sdk-reference/python/agents/configuration/auth-handler/index__2.mdx deleted file mode 100644 index 5415dd41fb..0000000000 --- a/fern/products/sdk-reference/python/agents/configuration/auth-handler/index__2.mdx +++ /dev/null @@ -1,220 +0,0 @@ ---- -slug: "/reference/python/agents/configuration/auth-handler/index__2" -title: "AuthHandler" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.core.auth_handler.AuthHandler" - parent: "agents.configuration" - module: "agents.configuration" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/auth_handler.py" ---- -# `AuthHandler` - -Unified authentication handler supporting multiple auth methods. - -This class provides a clean pattern for handling Basic Auth, Bearer tokens, -and API keys across all SignalWire services. - -## Signature - -```python -class AuthHandler -``` - -## Properties - - - - - - - -## Methods - -### \_\_init\_\_ - -Initialize auth handler with security configuration. - -#### Signature - -```python -__init__(security_config: SecurityConfig) -``` - -#### Parameters - - - SecurityConfig instance with auth settings - - -#### Source - -[`signalwire/signalwire/core/auth_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/auth_handler.py) - -Line 38. - -*** - -### flask\_decorator - -Flask decorator for authentication. - -This provides compatibility with Flask-based services like MCP Gateway. - -#### Signature - -```python -flask_decorator(f: Callable) -> Callable -``` - -#### Parameters - - - -#### Returns - -`Callable` - -#### Source - -[`signalwire/signalwire/core/auth_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/auth_handler.py) - -Line 160. - -*** - -### get\_auth\_info - -Get information about configured auth methods - -#### Signature - -```python -get_auth_info() -> Dict[str, Any] -``` - -#### Returns - -`Dict[str, Any]` - -#### Source - -[`signalwire/signalwire/core/auth_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/auth_handler.py) - -Line 209. - -*** - -### get\_fastapi\_dependency - -Get FastAPI dependency for authentication. - -#### Signature - -```python -get_fastapi_dependency(optional: bool = False) -``` - -#### Parameters - - - If True, authentication is optional - - -#### Returns - -FastAPI dependency function - -#### Source - -[`signalwire/signalwire/core/auth_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/auth_handler.py) - -Line 114. - -*** - -### verify\_api\_key - -Verify API key - -#### Signature - -```python -verify_api_key(api_key: str) -> bool -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`signalwire/signalwire/core/auth_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/auth_handler.py) - -Line 106. - -*** - -### verify\_basic\_auth - -Verify basic auth credentials - -#### Signature - -```python -verify_basic_auth(credentials: HTTPBasicCredentials) -> bool -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`signalwire/signalwire/core/auth_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/auth_handler.py) - -Line 81. - -*** - -### verify\_bearer\_token - -Verify bearer token - -#### Signature - -```python -verify_bearer_token(credentials: HTTPAuthorizationCredentials) -> bool -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`signalwire/signalwire/core/auth_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/auth_handler.py) - -Line 96. - -## Source - -[`signalwire/signalwire/core/auth_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/auth_handler.py) - -Line 30. diff --git a/fern/products/sdk-reference/python/agents/configuration/config-loader/index.mdx b/fern/products/sdk-reference/python/agents/configuration/config-loader/index.mdx index 91c6f71c2d..9f41096f5c 100644 --- a/fern/products/sdk-reference/python/agents/configuration/config-loader/index.mdx +++ b/fern/products/sdk-reference/python/agents/configuration/config-loader/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.core.config_loader" parent: "agents.configuration" @@ -14,23 +14,282 @@ lustri: --- # `config_loader` -Copyright (c) 2025 SignalWire +Configuration loader with environment variable substitution. -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. +Supports $\{VAR|default\} syntax for referencing environment variables +within JSON configuration files. This provides a clean pattern for +configuration across all SignalWire services. ## Signature ```python -module config_loader +class ConfigLoader ``` ## Properties + + +## Methods + +### \_\_init\_\_ + +Initialize config loader. + +#### Signature + +```python +__init__(config_paths: Optional[List[str]] = None) +``` + +#### Parameters + + + Optional list of config file paths to check. If not provided, uses default search paths. + + +#### Source + +[`signalwire/signalwire/core/config_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/config_loader.py) + +Line 28. + +*** + +### find\_config\_file + +Static method to find a config file for a service. + +**Modifiers:** `static` + +#### Signature + +```python +@staticmethod +find_config_file( + service_name: Optional[str] = None, + additional_paths: Optional[List[str]] = None +) -> Optional[str] +``` + +#### Parameters + + + Optional service name for service-specific config + + + + Additional paths to check + + +#### Returns + +`Optional[str]` — Path to the first config file found, or None + +#### Source + +[`signalwire/signalwire/core/config_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/config_loader.py) + +Line 224. + +*** + +### get + +Get a configuration value by dot-notation path. + +#### Signature + +```python +get(key_path: str, default: Any = None) -> Any +``` + +#### Parameters + + + Dot-separated path (e.g., "security.ssl\_enabled") + + + + Default value if path not found + + +#### Returns + +`Any` — The configuration value with variables substituted + +#### Source + +[`signalwire/signalwire/core/config_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/config_loader.py) + +Line 129. + +*** + +### get\_config + +Get the raw configuration (before substitution). + +#### Signature + +```python +get_config() -> Dict[str, Any] +``` + +#### Returns + +`Dict[str, Any]` + +#### Source + +[`signalwire/signalwire/core/config_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/config_loader.py) + +Line 73. + +*** + +### get\_config\_file + +Get the path of the loaded config file. + +#### Signature + +```python +get_config_file() -> Optional[str] +``` + +#### Returns + +`Optional[str]` + +#### Source + +[`signalwire/signalwire/core/config_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/config_loader.py) + +Line 69. + +*** + +### get\_section + +Get an entire configuration section. + +#### Signature + +```python +get_section(section: str) -> Dict[str, Any] +``` + +#### Parameters + + + The section name (e.g., "security", "server") + + +#### Returns + +`Dict[str, Any]` — The configuration section with all variables substituted + +#### Source + +[`signalwire/signalwire/core/config_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/config_loader.py) + +Line 156. + +*** + +### has\_config + +Check if a configuration was loaded. + +#### Signature + +```python +has_config() -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/core/config_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/config_loader.py) + +Line 65. + +*** + +### merge\_with\_env + +Merge configuration with environment variables. + +Config file takes precedence over environment variables, +but config can reference env vars via substitution. + +#### Signature + +```python +merge_with_env(env_prefix: str = 'SWML_') -> Dict[str, Any] +``` + +#### Parameters + + + Prefix for environment variables to consider + + +#### Returns + +`Dict[str, Any]` — Merged configuration dictionary + +#### Source + +[`signalwire/signalwire/core/config_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/config_loader.py) + +Line 171. + +*** + +### substitute\_vars + +Recursively substitute environment variables in configuration values. + +Supports $\{VAR|default\} syntax where: + +- VAR is the environment variable name +- default is the fallback value if VAR is not set + +#### Signature + +```python +substitute_vars(value: Any, max_depth: int = 10) -> Any +``` + +#### Parameters + + + The value to process (can be string, dict, list, etc.) + + + + Maximum recursion depth to prevent infinite loops + + +#### Returns + +`Any` — The value with all environment variables substituted + +#### Source + +[`signalwire/signalwire/core/config_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/config_loader.py) + +Line 77. + ## Source [`signalwire/signalwire/core/config_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/config_loader.py) + +Line 19. diff --git a/fern/products/sdk-reference/python/agents/configuration/config-loader/index__2.mdx b/fern/products/sdk-reference/python/agents/configuration/config-loader/index__2.mdx deleted file mode 100644 index 0e107cfb56..0000000000 --- a/fern/products/sdk-reference/python/agents/configuration/config-loader/index__2.mdx +++ /dev/null @@ -1,293 +0,0 @@ ---- -slug: "/reference/python/agents/configuration/config-loader/index__2" -title: "ConfigLoader" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.core.config_loader.ConfigLoader" - parent: "agents.configuration" - module: "agents.configuration" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/config_loader.py" ---- -# `ConfigLoader` - -Configuration loader with environment variable substitution. - -Supports $\{VAR|default\} syntax for referencing environment variables -within JSON configuration files. This provides a clean pattern for -configuration across all SignalWire services. - -## Signature - -```python -class ConfigLoader -``` - -## Properties - - - -## Methods - -### \_\_init\_\_ - -Initialize config loader. - -#### Signature - -```python -__init__(config_paths: Optional[List[str]] = None) -``` - -#### Parameters - - - Optional list of config file paths to check. If not provided, uses default search paths. - - -#### Source - -[`signalwire/signalwire/core/config_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/config_loader.py) - -Line 28. - -*** - -### find\_config\_file - -Static method to find a config file for a service. - -**Modifiers:** `static` - -#### Signature - -```python -@staticmethod -find_config_file( - service_name: Optional[str] = None, - additional_paths: Optional[List[str]] = None -) -> Optional[str] -``` - -#### Parameters - - - Optional service name for service-specific config - - - - Additional paths to check - - -#### Returns - -`Optional[str]` — Path to the first config file found, or None - -#### Source - -[`signalwire/signalwire/core/config_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/config_loader.py) - -Line 224. - -*** - -### get - -Get a configuration value by dot-notation path. - -#### Signature - -```python -get(key_path: str, default: Any = None) -> Any -``` - -#### Parameters - - - Dot-separated path (e.g., "security.ssl\_enabled") - - - - Default value if path not found - - -#### Returns - -`Any` — The configuration value with variables substituted - -#### Source - -[`signalwire/signalwire/core/config_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/config_loader.py) - -Line 129. - -*** - -### get\_config - -Get the raw configuration (before substitution). - -#### Signature - -```python -get_config() -> Dict[str, Any] -``` - -#### Returns - -`Dict[str, Any]` - -#### Source - -[`signalwire/signalwire/core/config_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/config_loader.py) - -Line 73. - -*** - -### get\_config\_file - -Get the path of the loaded config file. - -#### Signature - -```python -get_config_file() -> Optional[str] -``` - -#### Returns - -`Optional[str]` - -#### Source - -[`signalwire/signalwire/core/config_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/config_loader.py) - -Line 69. - -*** - -### get\_section - -Get an entire configuration section. - -#### Signature - -```python -get_section(section: str) -> Dict[str, Any] -``` - -#### Parameters - - - The section name (e.g., "security", "server") - - -#### Returns - -`Dict[str, Any]` — The configuration section with all variables substituted - -#### Source - -[`signalwire/signalwire/core/config_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/config_loader.py) - -Line 156. - -*** - -### has\_config - -Check if a configuration was loaded. - -#### Signature - -```python -has_config() -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`signalwire/signalwire/core/config_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/config_loader.py) - -Line 65. - -*** - -### merge\_with\_env - -Merge configuration with environment variables. - -Config file takes precedence over environment variables, -but config can reference env vars via substitution. - -#### Signature - -```python -merge_with_env(env_prefix: str = 'SWML_') -> Dict[str, Any] -``` - -#### Parameters - - - Prefix for environment variables to consider - - -#### Returns - -`Dict[str, Any]` — Merged configuration dictionary - -#### Source - -[`signalwire/signalwire/core/config_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/config_loader.py) - -Line 171. - -*** - -### substitute\_vars - -Recursively substitute environment variables in configuration values. - -Supports $\{VAR|default\} syntax where: - -- VAR is the environment variable name -- default is the fallback value if VAR is not set - -#### Signature - -```python -substitute_vars(value: Any, max_depth: int = 10) -> Any -``` - -#### Parameters - - - The value to process (can be string, dict, list, etc.) - - - - Maximum recursion depth to prevent infinite loops - - -#### Returns - -`Any` — The value with all environment variables substituted - -#### Source - -[`signalwire/signalwire/core/config_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/config_loader.py) - -Line 77. - -## Source - -[`signalwire/signalwire/core/config_loader.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/config_loader.py) - -Line 19. diff --git a/fern/products/sdk-reference/python/agents/configuration/index.mdx b/fern/products/sdk-reference/python/agents/configuration/index.mdx index 30ca815280..eb4e7da120 100644 --- a/fern/products/sdk-reference/python/agents/configuration/index.mdx +++ b/fern/products/sdk-reference/python/agents/configuration/index.mdx @@ -15,32 +15,16 @@ lustri: ## Classes - - - Unified authentication handler supporting multiple auth methods. - - - - Configuration loader with environment variable substitution. - - - - Unified security configuration for SignalWire services. - - - -## Modules - - Copyright (c) 2025 SignalWire + Unified authentication handler supporting multiple auth methods. - Copyright (c) 2025 SignalWire + Configuration loader with environment variable substitution. - Copyright (c) 2025 SignalWire + Unified security configuration for SignalWire services. diff --git a/fern/products/sdk-reference/python/agents/configuration/security-config/index.mdx b/fern/products/sdk-reference/python/agents/configuration/security-config/index.mdx index 1b42040f05..e8e70671cf 100644 --- a/fern/products/sdk-reference/python/agents/configuration/security-config/index.mdx +++ b/fern/products/sdk-reference/python/agents/configuration/security-config/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.core.security_config" parent: "agents.configuration" @@ -14,25 +14,301 @@ lustri: --- # `security_config` -Copyright (c) 2025 SignalWire +Unified security configuration for SignalWire services. -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. +This class provides centralized security settings that can be used by +both SWML and Search services, ensuring consistent security behavior. ## Signature ```python -module security_config +class SecurityConfig ``` ## Properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +Initialize security configuration. + +#### Signature + +```python +__init__(config_file: Optional[str] = None, service_name: Optional[str] = None) +``` + +#### Parameters + + + Optional path to config file + + + + Optional service name for finding service-specific config + + +#### Source + +[`signalwire/signalwire/core/security_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security_config.py) + +Line 60. + +*** + +### get\_basic\_auth + +Get basic auth credentials, generating if not set. + +If no basic auth password is configured (e.g. SWML\_BASIC\_AUTH\_PASSWORD +env var is unset and the SDK caller didn't pass one explicitly), the +SDK falls back to a random password generated via secrets.token\_urlsafe. +That password lives only in memory and is regenerated on every process +start, so any external caller (tests, RPC clients, MCP) that doesn't +share the auto-generated value will get HTTP 401. + +We log a warning the first time the auto-generated fallback fires so +the failure mode is visible in logs instead of silently breaking +external callers. Set SWML\_BASIC\_AUTH\_USER / SWML\_BASIC\_AUTH\_PASSWORD +(or load .env before constructing the agent) to suppress the warning. + +#### Signature + +```python +get_basic_auth() -> Tuple[str, str] +``` + +#### Returns + +`Tuple[str, str]` — Tuple of (username, password) + +#### Source + +[`signalwire/signalwire/core/security_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security_config.py) + +Line 247. + +*** + +### get\_cors\_config + +Get CORS configuration for FastAPI. + +#### Signature + +```python +get_cors_config() -> Dict[str, Any] +``` + +#### Returns + +`Dict[str, Any]` — Dictionary of CORS settings + +#### Source + +[`signalwire/signalwire/core/security_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security_config.py) + +Line 328. + +*** + +### get\_security\_headers + +Get security headers to add to responses. + +#### Signature + +```python +get_security_headers(is_https: bool = False) -> Dict[str, str] +``` + +#### Parameters + + + Whether the connection is over HTTPS + + +#### Returns + +`Dict[str, str]` — Dictionary of security headers + +#### Source + +[`signalwire/signalwire/core/security_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security_config.py) + +Line 290. + +*** + +### get\_ssl\_context\_kwargs + +Get SSL context kwargs for uvicorn. + +#### Signature + +```python +get_ssl_context_kwargs() -> Dict[str, Any] +``` + +#### Returns + +`Dict[str, Any]` — Dictionary of SSL parameters for uvicorn + +#### Source + +[`signalwire/signalwire/core/security_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security_config.py) + +Line 226. + +*** + +### get\_url\_scheme + +Get the URL scheme based on SSL configuration + +#### Signature + +```python +get_url_scheme() -> str +``` + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/core/security_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security_config.py) + +Line 342. + +*** + +### load\_from\_env + +Load configuration from environment variables + +#### Signature + +```python +load_from_env() +``` + +#### Source + +[`signalwire/signalwire/core/security_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security_config.py) + +Line 168. + +*** + +### log\_config + +Log the current security configuration + +#### Signature + +```python +log_config(service_name: str) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/core/security_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security_config.py) + +Line 346. + +*** + +### should\_allow\_host + +Check if a host is allowed. + +#### Signature + +```python +should_allow_host(host: str) -> bool +``` + +#### Parameters + + + The host to check + + +#### Returns + +`bool` — True if the host is allowed + +#### Source + +[`signalwire/signalwire/core/security_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security_config.py) + +Line 313. + +*** + +### validate\_ssl\_config + +Validate SSL configuration. + +#### Signature + +```python +validate_ssl_config() -> Tuple[bool, Optional[str]] +``` + +#### Returns + +`Tuple[bool, Optional[str]]` — Tuple of (is\_valid, error\_message) + +#### Source + +[`signalwire/signalwire/core/security_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security_config.py) + +Line 202. + ## Source [`signalwire/signalwire/core/security_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security_config.py) + +Line 19. diff --git a/fern/products/sdk-reference/python/agents/configuration/security-config/index__2.mdx b/fern/products/sdk-reference/python/agents/configuration/security-config/index__2.mdx deleted file mode 100644 index fce68c714d..0000000000 --- a/fern/products/sdk-reference/python/agents/configuration/security-config/index__2.mdx +++ /dev/null @@ -1,310 +0,0 @@ ---- -slug: "/reference/python/agents/configuration/security-config/index__2" -title: "SecurityConfig" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.core.security_config.SecurityConfig" - parent: "agents.configuration" - module: "agents.configuration" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security_config.py" ---- -# `SecurityConfig` - -Unified security configuration for SignalWire services. - -This class provides centralized security settings that can be used by -both SWML and Search services, ensuring consistent security behavior. - -## Signature - -```python -class SecurityConfig -``` - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -## Methods - -### \_\_init\_\_ - -Initialize security configuration. - -#### Signature - -```python -__init__(config_file: Optional[str] = None, service_name: Optional[str] = None) -``` - -#### Parameters - - - Optional path to config file - - - - Optional service name for finding service-specific config - - -#### Source - -[`signalwire/signalwire/core/security_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security_config.py) - -Line 60. - -*** - -### get\_basic\_auth - -Get basic auth credentials, generating if not set. - -If no basic auth password is configured (e.g. SWML\_BASIC\_AUTH\_PASSWORD -env var is unset and the SDK caller didn't pass one explicitly), the -SDK falls back to a random password generated via secrets.token\_urlsafe. -That password lives only in memory and is regenerated on every process -start, so any external caller (tests, RPC clients, MCP) that doesn't -share the auto-generated value will get HTTP 401. - -We log a warning the first time the auto-generated fallback fires so -the failure mode is visible in logs instead of silently breaking -external callers. Set SWML\_BASIC\_AUTH\_USER / SWML\_BASIC\_AUTH\_PASSWORD -(or load .env before constructing the agent) to suppress the warning. - -#### Signature - -```python -get_basic_auth() -> Tuple[str, str] -``` - -#### Returns - -`Tuple[str, str]` — Tuple of (username, password) - -#### Source - -[`signalwire/signalwire/core/security_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security_config.py) - -Line 247. - -*** - -### get\_cors\_config - -Get CORS configuration for FastAPI. - -#### Signature - -```python -get_cors_config() -> Dict[str, Any] -``` - -#### Returns - -`Dict[str, Any]` — Dictionary of CORS settings - -#### Source - -[`signalwire/signalwire/core/security_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security_config.py) - -Line 328. - -*** - -### get\_security\_headers - -Get security headers to add to responses. - -#### Signature - -```python -get_security_headers(is_https: bool = False) -> Dict[str, str] -``` - -#### Parameters - - - Whether the connection is over HTTPS - - -#### Returns - -`Dict[str, str]` — Dictionary of security headers - -#### Source - -[`signalwire/signalwire/core/security_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security_config.py) - -Line 290. - -*** - -### get\_ssl\_context\_kwargs - -Get SSL context kwargs for uvicorn. - -#### Signature - -```python -get_ssl_context_kwargs() -> Dict[str, Any] -``` - -#### Returns - -`Dict[str, Any]` — Dictionary of SSL parameters for uvicorn - -#### Source - -[`signalwire/signalwire/core/security_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security_config.py) - -Line 226. - -*** - -### get\_url\_scheme - -Get the URL scheme based on SSL configuration - -#### Signature - -```python -get_url_scheme() -> str -``` - -#### Returns - -`str` - -#### Source - -[`signalwire/signalwire/core/security_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security_config.py) - -Line 342. - -*** - -### load\_from\_env - -Load configuration from environment variables - -#### Signature - -```python -load_from_env() -``` - -#### Source - -[`signalwire/signalwire/core/security_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security_config.py) - -Line 168. - -*** - -### log\_config - -Log the current security configuration - -#### Signature - -```python -log_config(service_name: str) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/core/security_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security_config.py) - -Line 346. - -*** - -### should\_allow\_host - -Check if a host is allowed. - -#### Signature - -```python -should_allow_host(host: str) -> bool -``` - -#### Parameters - - - The host to check - - -#### Returns - -`bool` — True if the host is allowed - -#### Source - -[`signalwire/signalwire/core/security_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security_config.py) - -Line 313. - -*** - -### validate\_ssl\_config - -Validate SSL configuration. - -#### Signature - -```python -validate_ssl_config() -> Tuple[bool, Optional[str]] -``` - -#### Returns - -`Tuple[bool, Optional[str]]` — Tuple of (is\_valid, error\_message) - -#### Source - -[`signalwire/signalwire/core/security_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security_config.py) - -Line 202. - -## Source - -[`signalwire/signalwire/core/security_config.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security_config.py) - -Line 19. diff --git a/fern/products/sdk-reference/python/agents/data-map/index.mdx b/fern/products/sdk-reference/python/agents/data-map/index.mdx index 4e16f488e2..d4d13f0990 100644 --- a/fern/products/sdk-reference/python/agents/data-map/index.mdx +++ b/fern/products/sdk-reference/python/agents/data-map/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.core.data_map" parent: "agents" @@ -14,19 +14,645 @@ lustri: --- # `data_map` -Copyright (c) 2025 SignalWire +Builder class for creating SWAIG data\_map configurations. + +This provides a fluent interface for building data\_map tools that execute +on the SignalWire server without requiring webhook endpoints. Works similar +to FunctionResult but for building data\_map structures. + +> \[!NOTE] +> +> # Simple API call - output goes inside webhook +> +> data\_map = (DataMap('get\_weather') +> .purpose('Get current weather information') +> .parameter('location', 'string', 'City name', required=True) +> .webhook('GET', 'https://api.weather.com/v1/current?key=API\_KEY\&q=$\{location\}') +> .output(FunctionResult('Weather in $\{location\}: $\{response.current.condition.text\}, $\{response.current.temp\_f\}°F')) +> ) +> +> # Multiple webhooks with fallback +> +> data\_map = (DataMap('search\_multi') +> .purpose('Search with fallback APIs') +> .parameter('query', 'string', 'Search query', required=True) +> .webhook('GET', 'https://api.primary.com/search?q=$\{query\}') +> .output(FunctionResult('Primary result: $\{response.title\}')) +> .webhook('GET', 'https://api.fallback.com/search?q=$\{query\}') +> .output(FunctionResult('Fallback result: $\{response.title\}')) +> .fallback\_output(FunctionResult('Sorry, all search APIs are unavailable')) +> ) +> +> # Expression-based responses (no API calls) +> +> data\_map = (DataMap('file\_control') +> .purpose('Control file playback') +> .parameter('command', 'string', 'Playback command') +> .parameter('filename', 'string', 'File to control', required=False) +> .expression('$\{args.command\}', r'start._', FunctionResult().add\_action('start\_playbook', \{'file': '$\{args.filename\}'\})) +> .expression('$\{args.command\}', r'stop._', FunctionResult().add\_action('stop\_playback', True)) +> ) +> +> # API with array processing +> +> data\_map = (DataMap('search\_docs') +> .purpose('Search documentation') +> .parameter('query', 'string', 'Search query', required=True) +> .webhook('POST', 'https://api.docs.com/search', headers=\{'Authorization': 'Bearer TOKEN'\}) +> .body(\{'query': '$\{query\}', 'limit': 3\}) +> .output(FunctionResult('Found: $\{response.results\[0].title\} - $\{response.results\[0].summary\}')) +> .foreach('$\{response.results\}') +> ) -This file is part of the SignalWire SDK. +## Signature + +```python +class DataMap +``` -Licensed under the MIT License. -See LICENSE file in the project root for full license information. +## Examples -## Signature +```python +# Multiple webhooks with fallback +data_map = (DataMap('search_multi') + .purpose('Search with fallback APIs') + .parameter('query', 'string', 'Search query', required=True) + .webhook('GET', 'https://api.primary.com/search?q=${query}') + .output(FunctionResult('Primary result: ${response.title}')) + .webhook('GET', 'https://api.fallback.com/search?q=${query}') + .output(FunctionResult('Fallback result: ${response.title}')) + .fallback_output(FunctionResult('Sorry, all search APIs are unavailable')) +) + +# Expression-based responses (no API calls) +data_map = (DataMap('file_control') + .purpose('Control file playback') + .parameter('command', 'string', 'Playback command') + .parameter('filename', 'string', 'File to control', required=False) + .expression('${args.command}', r'start.*', FunctionResult().add_action('start_playbook', {'file': '${args.filename}'})) + .expression('${args.command}', r'stop.*', FunctionResult().add_action('stop_playback', True)) +) + +# API with array processing +data_map = (DataMap('search_docs') + .purpose('Search documentation') + .parameter('query', 'string', 'Search query', required=True) + .webhook('POST', 'https://api.docs.com/search', headers={'Authorization': 'Bearer TOKEN'}) + .body({'query': '${query}', 'limit': 3}) + .output(FunctionResult('Found: ${response.results[0].title} - ${response.results[0].summary}')) + .foreach('${response.results}') +) +``` + +## Properties + + + +## Methods + +### \_\_init\_\_ + +Initialize a new DataMap builder + +#### Signature + +```python +__init__(function_name: str) +``` + +#### Parameters + + + Name of the SWAIG function this data\_map will create + + +#### Source + +[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) + +Line 67. + +*** + +### body + +Set request body for the last added webhook (POST/PUT requests) + +#### Signature ```python -module data_map +body(data: Dict[str, Any]) -> DataMap ``` +#### Parameters + + + Request body data (can include $\{variable\} substitutions) + + +#### Returns + +`DataMap` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) + +Line 255. + +*** + +### description + +Set the function description (alias for purpose). + +See purpose() for guidance on writing description text the LLM +can act on. + +#### Signature + +```python +description(description: str) -> DataMap +``` + +#### Parameters + + + LLM-facing description of what this function does and when to use it. + + +#### Returns + +`DataMap` — Self for method chaining. + +#### Source + +[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) + +Line 110. + +*** + +### error\_keys + +Set error keys for the most recent webhook (if webhooks exist) or top-level + +#### Signature + +```python +error_keys(keys: List[str]) -> DataMap +``` + +#### Parameters + + + List of JSON keys whose presence indicates an error + + +#### Returns + +`DataMap` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) + +Line 356. + +*** + +### expression + +Add an expression pattern for pattern-based responses + +#### Signature + +```python +expression( + test_value: str, + pattern: Union[str, Pattern], + output: FunctionResult, + nomatch_output: Optional[FunctionResult] = None +) -> DataMap +``` + +#### Parameters + + + Template string to test (e.g., "$\{args.command\}") + + + + Regex pattern string or compiled Pattern object to match against + + + + FunctionResult to return when pattern matches + + + + Optional FunctionResult to return when pattern doesn't match + + +#### Returns + +`DataMap` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) + +Line 173. + +*** + +### fallback\_output + +Set a fallback output result at the top level (used when all webhooks fail) + +#### Signature + +```python +fallback_output(result: FunctionResult) -> DataMap +``` + +#### Parameters + + + FunctionResult defining the fallback response + + +#### Returns + +`DataMap` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) + +Line 343. + +*** + +### foreach + +Process an array from the webhook response using foreach mechanism + +``` + Args: + foreach_config: Either: + - Dict: Foreach configuration with keys: + - input_key: Key in API response containing the array + - output_key: Name for the built string variable + - max: Maximum number of items to process (optional) + - append: Template string to append for each item + + Returns: + Self for method chaining + + Example: + .foreach({ + "input_key": "results", + "output_key": "formatted_results", + "max": 3, + "append": "Result: ${this.title} - ${this.summary} +``` + +" +\}) + +#### Signature + +```python +foreach(foreach_config: Dict[str, Any]) -> DataMap +``` + +#### Parameters + + + +#### Returns + +`DataMap` + +#### Examples + +```python + Args: + foreach_config: Either: + - Dict: Foreach configuration with keys: + - input_key: Key in API response containing the array + - output_key: Name for the built string variable + - max: Maximum number of items to process (optional) + - append: Template string to append for each item + + Returns: + Self for method chaining + + Example: + .foreach({ + "input_key": "results", + "output_key": "formatted_results", + "max": 3, + "append": "Result: ${this.title} - ${this.summary} +``` + +#### Source + +[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) + +Line 287. + +*** + +### global\_error\_keys + +Set top-level error keys (applies to all webhooks) + +#### Signature + +```python +global_error_keys(keys: List[str]) -> DataMap +``` + +#### Parameters + + + List of JSON keys whose presence indicates an error + + +#### Returns + +`DataMap` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) + +Line 374. + +*** + +### output + +Set the output result for the most recent webhook + +#### Signature + +```python +output(result: FunctionResult) -> DataMap +``` + +#### Parameters + + + FunctionResult defining the response for this webhook + + +#### Returns + +`DataMap` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) + +Line 327. + +*** + +### parameter + +Add a function parameter. + +Just like the function-level `description`, this parameter +`description` is sent to the LLM as part of the tool schema and +is read by the model when deciding HOW to fill in the argument. +Write it as an instruction to the model: + +- Bad: "the id" +- Good: "The customer's 8-digit account number, no dashes or + spaces. Ask the user if they don't provide it." + +#### Signature + +```python +parameter( + name: str, + param_type: str, + description: str, + required: bool = False, + enum: Optional[List[str]] = None +) -> DataMap +``` + +#### Parameters + + + Parameter name. Becomes a key in the tool schema's `properties` object and is what the model emits. + + + + JSON schema type (string, number, boolean, array, object). + + + + LLM-facing parameter description. See above — this should tell the model what value to put here, in what format, and where to source it. + + + + Whether parameter is required. + + + + Optional list of allowed values. The model will only emit values from this list. + + +#### Returns + +`DataMap` — Self for method chaining. + +#### Source + +[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) + +Line 126. + +*** + +### params + +Set request params for the last added webhook (alias for body) + +#### Signature + +```python +params(data: Dict[str, Any]) -> DataMap +``` + +#### Parameters + + + Request params data (can include $\{variable\} substitutions) + + +#### Returns + +`DataMap` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) + +Line 271. + +*** + +### purpose + +Set the function description that the LLM will read. + +A DataMap creates a SWAIG function that gets sent to the model in +OpenAI tool-schema format. This `description` field is what the +model reads on every turn to decide WHEN to call the tool. It is +prompt-engineered text, not developer documentation: + +- Bad: "Search function" +- Good: "Search the company's knowledge base for help articles + matching a user query. Use this when the user asks a + product or how-to question that the base prompt does + not cover." + +Vague descriptions are the most common cause of "the model has +the right tool but doesn't call it" failures. + +#### Signature + +```python +purpose(description: str) -> DataMap +``` + +#### Parameters + + + LLM-facing description of what this function does and when to use it. See above. + + +#### Returns + +`DataMap` — Self for method chaining. + +#### Source + +[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) + +Line 82. + +*** + +### to\_swaig\_function + +Convert this DataMap to a SWAIG function definition + +#### Signature + +```python +to_swaig_function() -> Dict[str, Any] +``` + +#### Returns + +`Dict[str, Any]` — Dictionary with function definition and data\_map instead of url + +#### Source + +[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) + +Line 387. + +*** + +### webhook + +Add a webhook API call + +#### Signature + +```python +webhook( + method: str, + url: str, + headers: Optional[Dict[str, str]] = None, + form_param: Optional[str] = None, + input_args_as_params: bool = False, + require_args: Optional[List[str]] = None +) -> DataMap +``` + +#### Parameters + + + HTTP method (GET, POST, PUT, DELETE, etc.) + + + + API endpoint URL (can include $\{variable\} substitutions) + + + + Optional HTTP headers + + + + Send JSON body as single form parameter with this name + + + + Merge function arguments into params + + + + Only execute if these arguments are present + + +#### Returns + +`DataMap` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) + +Line 204. + +*** + +### webhook\_expressions + +Add expressions that run after the most recent webhook completes + +#### Signature + +```python +webhook_expressions(expressions: List[Dict[str, Any]]) -> DataMap +``` + +#### Parameters + + + List of expression definitions to check post-webhook + + +#### Returns + +`DataMap` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) + +Line 239. + ## Functions ### create\_expression\_tool @@ -135,3 +761,5 @@ Line 439. ## Source [`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) + +Line 19. diff --git a/fern/products/sdk-reference/python/agents/data-map/index__2.mdx b/fern/products/sdk-reference/python/agents/data-map/index__2.mdx deleted file mode 100644 index edf8c698e1..0000000000 --- a/fern/products/sdk-reference/python/agents/data-map/index__2.mdx +++ /dev/null @@ -1,660 +0,0 @@ ---- -slug: "/reference/python/agents/data-map/index__2" -title: "DataMap" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.core.data_map.DataMap" - parent: "agents" - module: "agents" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py" ---- -# `DataMap` - -Builder class for creating SWAIG data\_map configurations. - -This provides a fluent interface for building data\_map tools that execute -on the SignalWire server without requiring webhook endpoints. Works similar -to FunctionResult but for building data\_map structures. - -> \[!NOTE] -> -> # Simple API call - output goes inside webhook -> -> data\_map = (DataMap('get\_weather') -> .purpose('Get current weather information') -> .parameter('location', 'string', 'City name', required=True) -> .webhook('GET', 'https://api.weather.com/v1/current?key=API\_KEY\&q=$\{location\}') -> .output(FunctionResult('Weather in $\{location\}: $\{response.current.condition.text\}, $\{response.current.temp\_f\}°F')) -> ) -> -> # Multiple webhooks with fallback -> -> data\_map = (DataMap('search\_multi') -> .purpose('Search with fallback APIs') -> .parameter('query', 'string', 'Search query', required=True) -> .webhook('GET', 'https://api.primary.com/search?q=$\{query\}') -> .output(FunctionResult('Primary result: $\{response.title\}')) -> .webhook('GET', 'https://api.fallback.com/search?q=$\{query\}') -> .output(FunctionResult('Fallback result: $\{response.title\}')) -> .fallback\_output(FunctionResult('Sorry, all search APIs are unavailable')) -> ) -> -> # Expression-based responses (no API calls) -> -> data\_map = (DataMap('file\_control') -> .purpose('Control file playback') -> .parameter('command', 'string', 'Playback command') -> .parameter('filename', 'string', 'File to control', required=False) -> .expression('$\{args.command\}', r'start._', FunctionResult().add\_action('start\_playbook', \{'file': '$\{args.filename\}'\})) -> .expression('$\{args.command\}', r'stop._', FunctionResult().add\_action('stop\_playback', True)) -> ) -> -> # API with array processing -> -> data\_map = (DataMap('search\_docs') -> .purpose('Search documentation') -> .parameter('query', 'string', 'Search query', required=True) -> .webhook('POST', 'https://api.docs.com/search', headers=\{'Authorization': 'Bearer TOKEN'\}) -> .body(\{'query': '$\{query\}', 'limit': 3\}) -> .output(FunctionResult('Found: $\{response.results\[0].title\} - $\{response.results\[0].summary\}')) -> .foreach('$\{response.results\}') -> ) - -## Signature - -```python -class DataMap -``` - -## Examples - -```python -# Multiple webhooks with fallback -data_map = (DataMap('search_multi') - .purpose('Search with fallback APIs') - .parameter('query', 'string', 'Search query', required=True) - .webhook('GET', 'https://api.primary.com/search?q=${query}') - .output(FunctionResult('Primary result: ${response.title}')) - .webhook('GET', 'https://api.fallback.com/search?q=${query}') - .output(FunctionResult('Fallback result: ${response.title}')) - .fallback_output(FunctionResult('Sorry, all search APIs are unavailable')) -) - -# Expression-based responses (no API calls) -data_map = (DataMap('file_control') - .purpose('Control file playback') - .parameter('command', 'string', 'Playback command') - .parameter('filename', 'string', 'File to control', required=False) - .expression('${args.command}', r'start.*', FunctionResult().add_action('start_playbook', {'file': '${args.filename}'})) - .expression('${args.command}', r'stop.*', FunctionResult().add_action('stop_playback', True)) -) - -# API with array processing -data_map = (DataMap('search_docs') - .purpose('Search documentation') - .parameter('query', 'string', 'Search query', required=True) - .webhook('POST', 'https://api.docs.com/search', headers={'Authorization': 'Bearer TOKEN'}) - .body({'query': '${query}', 'limit': 3}) - .output(FunctionResult('Found: ${response.results[0].title} - ${response.results[0].summary}')) - .foreach('${response.results}') -) -``` - -## Properties - - - -## Methods - -### \_\_init\_\_ - -Initialize a new DataMap builder - -#### Signature - -```python -__init__(function_name: str) -``` - -#### Parameters - - - Name of the SWAIG function this data\_map will create - - -#### Source - -[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) - -Line 67. - -*** - -### body - -Set request body for the last added webhook (POST/PUT requests) - -#### Signature - -```python -body(data: Dict[str, Any]) -> DataMap -``` - -#### Parameters - - - Request body data (can include $\{variable\} substitutions) - - -#### Returns - -`DataMap` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) - -Line 255. - -*** - -### description - -Set the function description (alias for purpose). - -See purpose() for guidance on writing description text the LLM -can act on. - -#### Signature - -```python -description(description: str) -> DataMap -``` - -#### Parameters - - - LLM-facing description of what this function does and when to use it. - - -#### Returns - -`DataMap` — Self for method chaining. - -#### Source - -[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) - -Line 110. - -*** - -### error\_keys - -Set error keys for the most recent webhook (if webhooks exist) or top-level - -#### Signature - -```python -error_keys(keys: List[str]) -> DataMap -``` - -#### Parameters - - - List of JSON keys whose presence indicates an error - - -#### Returns - -`DataMap` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) - -Line 356. - -*** - -### expression - -Add an expression pattern for pattern-based responses - -#### Signature - -```python -expression( - test_value: str, - pattern: Union[str, Pattern], - output: FunctionResult, - nomatch_output: Optional[FunctionResult] = None -) -> DataMap -``` - -#### Parameters - - - Template string to test (e.g., "$\{args.command\}") - - - - Regex pattern string or compiled Pattern object to match against - - - - FunctionResult to return when pattern matches - - - - Optional FunctionResult to return when pattern doesn't match - - -#### Returns - -`DataMap` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) - -Line 173. - -*** - -### fallback\_output - -Set a fallback output result at the top level (used when all webhooks fail) - -#### Signature - -```python -fallback_output(result: FunctionResult) -> DataMap -``` - -#### Parameters - - - FunctionResult defining the fallback response - - -#### Returns - -`DataMap` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) - -Line 343. - -*** - -### foreach - -Process an array from the webhook response using foreach mechanism - -``` - Args: - foreach_config: Either: - - Dict: Foreach configuration with keys: - - input_key: Key in API response containing the array - - output_key: Name for the built string variable - - max: Maximum number of items to process (optional) - - append: Template string to append for each item - - Returns: - Self for method chaining - - Example: - .foreach({ - "input_key": "results", - "output_key": "formatted_results", - "max": 3, - "append": "Result: ${this.title} - ${this.summary} -``` - -" -\}) - -#### Signature - -```python -foreach(foreach_config: Dict[str, Any]) -> DataMap -``` - -#### Parameters - - - -#### Returns - -`DataMap` - -#### Examples - -```python - Args: - foreach_config: Either: - - Dict: Foreach configuration with keys: - - input_key: Key in API response containing the array - - output_key: Name for the built string variable - - max: Maximum number of items to process (optional) - - append: Template string to append for each item - - Returns: - Self for method chaining - - Example: - .foreach({ - "input_key": "results", - "output_key": "formatted_results", - "max": 3, - "append": "Result: ${this.title} - ${this.summary} -``` - -#### Source - -[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) - -Line 287. - -*** - -### global\_error\_keys - -Set top-level error keys (applies to all webhooks) - -#### Signature - -```python -global_error_keys(keys: List[str]) -> DataMap -``` - -#### Parameters - - - List of JSON keys whose presence indicates an error - - -#### Returns - -`DataMap` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) - -Line 374. - -*** - -### output - -Set the output result for the most recent webhook - -#### Signature - -```python -output(result: FunctionResult) -> DataMap -``` - -#### Parameters - - - FunctionResult defining the response for this webhook - - -#### Returns - -`DataMap` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) - -Line 327. - -*** - -### parameter - -Add a function parameter. - -Just like the function-level `description`, this parameter -`description` is sent to the LLM as part of the tool schema and -is read by the model when deciding HOW to fill in the argument. -Write it as an instruction to the model: - -- Bad: "the id" -- Good: "The customer's 8-digit account number, no dashes or - spaces. Ask the user if they don't provide it." - -#### Signature - -```python -parameter( - name: str, - param_type: str, - description: str, - required: bool = False, - enum: Optional[List[str]] = None -) -> DataMap -``` - -#### Parameters - - - Parameter name. Becomes a key in the tool schema's `properties` object and is what the model emits. - - - - JSON schema type (string, number, boolean, array, object). - - - - LLM-facing parameter description. See above — this should tell the model what value to put here, in what format, and where to source it. - - - - Whether parameter is required. - - - - Optional list of allowed values. The model will only emit values from this list. - - -#### Returns - -`DataMap` — Self for method chaining. - -#### Source - -[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) - -Line 126. - -*** - -### params - -Set request params for the last added webhook (alias for body) - -#### Signature - -```python -params(data: Dict[str, Any]) -> DataMap -``` - -#### Parameters - - - Request params data (can include $\{variable\} substitutions) - - -#### Returns - -`DataMap` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) - -Line 271. - -*** - -### purpose - -Set the function description that the LLM will read. - -A DataMap creates a SWAIG function that gets sent to the model in -OpenAI tool-schema format. This `description` field is what the -model reads on every turn to decide WHEN to call the tool. It is -prompt-engineered text, not developer documentation: - -- Bad: "Search function" -- Good: "Search the company's knowledge base for help articles - matching a user query. Use this when the user asks a - product or how-to question that the base prompt does - not cover." - -Vague descriptions are the most common cause of "the model has -the right tool but doesn't call it" failures. - -#### Signature - -```python -purpose(description: str) -> DataMap -``` - -#### Parameters - - - LLM-facing description of what this function does and when to use it. See above. - - -#### Returns - -`DataMap` — Self for method chaining. - -#### Source - -[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) - -Line 82. - -*** - -### to\_swaig\_function - -Convert this DataMap to a SWAIG function definition - -#### Signature - -```python -to_swaig_function() -> Dict[str, Any] -``` - -#### Returns - -`Dict[str, Any]` — Dictionary with function definition and data\_map instead of url - -#### Source - -[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) - -Line 387. - -*** - -### webhook - -Add a webhook API call - -#### Signature - -```python -webhook( - method: str, - url: str, - headers: Optional[Dict[str, str]] = None, - form_param: Optional[str] = None, - input_args_as_params: bool = False, - require_args: Optional[List[str]] = None -) -> DataMap -``` - -#### Parameters - - - HTTP method (GET, POST, PUT, DELETE, etc.) - - - - API endpoint URL (can include $\{variable\} substitutions) - - - - Optional HTTP headers - - - - Send JSON body as single form parameter with this name - - - - Merge function arguments into params - - - - Only execute if these arguments are present - - -#### Returns - -`DataMap` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) - -Line 204. - -*** - -### webhook\_expressions - -Add expressions that run after the most recent webhook completes - -#### Signature - -```python -webhook_expressions(expressions: List[Dict[str, Any]]) -> DataMap -``` - -#### Parameters - - - List of expression definitions to check post-webhook - - -#### Returns - -`DataMap` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) - -Line 239. - -## Source - -[`signalwire/signalwire/core/data_map.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/data_map.py) - -Line 19. diff --git a/fern/products/sdk-reference/python/agents/function-result/index.mdx b/fern/products/sdk-reference/python/agents/function-result/index.mdx index 77b9740b36..8b9c42e56a 100644 --- a/fern/products/sdk-reference/python/agents/function-result/index.mdx +++ b/fern/products/sdk-reference/python/agents/function-result/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.core.function_result" parent: "agents" @@ -14,23 +14,2242 @@ lustri: --- # `function_result` -Copyright (c) 2025 SignalWire +Wrapper around SWAIG function responses that handles proper formatting +of response text and actions. -This file is part of the SignalWire SDK. +The result object has three main components: -Licensed under the MIT License. -See LICENSE file in the project root for full license information. +1. response: Text the AI should say back to the user +2. action: List of structured actions to execute +3. post\_process: Whether to let AI take another turn before executing actions + +Post-processing behavior: + +- post\_process=False (default): Execute actions immediately after AI response +- post\_process=True: Let AI respond to user one more time, then execute actions + +This is useful for confirmation workflows like: +"I'll transfer you to sales. Do you have any other questions first?" +(AI can handle follow-up, then execute the transfer) + +> \[!NOTE] +> return FunctionResult("Found your order") +> +> # With actions +> +> return ( +> FunctionResult("I'll transfer you to support") +> .add\_action("transfer", \{"dest": "support"\}) +> ) +> +> # With simple action value +> +> return ( +> FunctionResult("I'll confirm that") +> .add\_action("confirm", True) +> ) +> +> # With multiple actions +> +> return ( +> FunctionResult("Processing your request") +> .add\_actions(\[ +> \{"set\_global\_data": \{"key": "value"\}\}, +> \{"play": \{"url": "music.mp3"\}\} +> ]) +> ) +> +> # With post-processing enabled +> +> return ( +> FunctionResult("Let me transfer you to billing", post\_process=True) +> .connect("+15551234567", final=True) +> ) +> +> # Using the connect helper +> +> return ( +> FunctionResult("I'll transfer you to our sales team now") +> .connect("sales@company.com", final=False, from\_addr="+15559876543") +> ) ## Signature ```python -module function_result +class FunctionResult +``` + +## Examples + +```python +# With actions +return ( + FunctionResult("I'll transfer you to support") + .add_action("transfer", {"dest": "support"}) +) + +# With simple action value +return ( + FunctionResult("I'll confirm that") + .add_action("confirm", True) +) + +# With multiple actions +return ( + FunctionResult("Processing your request") + .add_actions([ + {"set_global_data": {"key": "value"}}, + {"play": {"url": "music.mp3"}} + ]) +) + +# With post-processing enabled +return ( + FunctionResult("Let me transfer you to billing", post_process=True) + .connect("+15551234567", final=True) +) + +# Using the connect helper +return ( + FunctionResult("I'll transfer you to our sales team now") + .connect("sales@company.com", final=False, from_addr="+15559876543") +) ``` ## Properties + + + + + + -## Source +## Methods + +### \_\_init\_\_ + +Initialize a new SWAIG function result + +#### Signature + +```python +__init__(response: Optional[str] = None, post_process: bool = False) +``` + +#### Parameters + + + Optional natural language response to include + + + + Whether to let AI take another turn before executing actions. Defaults to False (execute actions immediately after response). + + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 71. + +*** + +### add\_action + +Add a structured action to the response + +#### Signature + +```python +add_action(name: str, data: Any) -> FunctionResult +``` + +#### Parameters + + + The name/type of the action (e.g., "play", "transfer") + + + + The data for the action - can be a string, boolean, object, or array + + +#### Returns + +`FunctionResult` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 114. + +*** + +### add\_actions + +Add multiple structured actions to the response + +#### Signature + +```python +add_actions(actions: List[Dict[str, Any]]) -> FunctionResult +``` + +#### Parameters + + + List of action objects to add to the response + + +#### Returns + +`FunctionResult` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 128. + +*** + +### add\_dynamic\_hints + +Add dynamic speech recognition hints during a call. + +Hints improve speech recognition accuracy for domain-specific terms. +Each hint can be a simple string or a pronunciation pattern object. + +> \[!NOTE] +> result = ( +> FunctionResult("I'll listen for that name") +> .add\_dynamic\_hints(\[ +> "Cabby", +> \{"pattern": "cab bee", "replace": "Cabby", "ignore\_case": True\} +> ]) +> ) + +#### Signature + +```python +add_dynamic_hints(hints: List[Union[str, Dict[str, Any]]]) -> FunctionResult +``` + +#### Parameters + + + List of hints, where each entry is either: + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 525. + +*** + +### clear\_dynamic\_hints + +Clear all dynamic speech recognition hints. + +Removes all hints previously added via add\_dynamic\_hints(). + +#### Signature + +```python +clear_dynamic_hints() -> FunctionResult +``` + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 554. + +*** + +### connect + +Add a connect action to transfer/connect the call to another destination. + +This is a convenience method that abstracts the SWML connect verb, so users +don't need to manually construct SWML documents. + +Transfer behavior: + +- final=True: Permanent transfer - call exits the agent completely, + SWML replaces the agent and call continues there +- final=False: Temporary transfer - if far end hangs up, call returns + to the agent to continue the conversation + +> \[!NOTE] +> +> ### Permanent transfer to a phone number +> +> result.connect("+15551234567", final=True) +> +> ### Temporary transfer to SIP address with custom caller ID +> +> result.connect("support@company.com", final=False, from\_addr="+15559876543") + +#### Signature + +```python +connect( + destination: str, + final: bool = True, + from_addr: Optional[str] = None +) -> FunctionResult +``` + +#### Parameters + + + Where to connect the call (phone number, SIP address, etc.) + + + + Whether this is a permanent transfer (True) or temporary (False). Defaults to True for permanent transfers. + + + + Optional caller ID override (phone number or SIP address). If None, uses the current call's from address. + + +#### Returns + +`FunctionResult` — Self for method chaining + +#### Examples + +```python +# Temporary transfer to SIP address with custom caller ID +result.connect("support@company.com", final=False, from_addr="+15559876543") +``` + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 141. + +*** + +### create\_payment\_action + +Create a payment action for use in payment prompts. + +**Modifiers:** `static` + +#### Signature + +```python +@staticmethod +create_payment_action(action_type: str, phrase: str) -> Dict[str, str] +``` + +#### Parameters + + + "Say" for text-to-speech or "Play" for audio file + + + + Sentence to say or URL to play + + +#### Returns + +`Dict[str, str]` — Dictionary representing the action + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 1472. + +*** + +### create\_payment\_parameter + +Create a payment parameter for use with pay() method. + +**Modifiers:** `static` + +#### Signature + +```python +@staticmethod +create_payment_parameter(name: str, value: str) -> Dict[str, str] +``` + +#### Parameters + + + Parameter name + + + + Parameter value + + +#### Returns + +`Dict[str, str]` — Dictionary representing the parameter + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 1489. + +*** + +### create\_payment\_prompt + +Create a payment prompt structure for use with pay() method. + +**Modifiers:** `static` + +#### Signature + +```python +@staticmethod +create_payment_prompt( + for_situation: str, + actions: List[Dict[str, str]], + card_type: Optional[str] = None, + error_type: Optional[str] = None +) -> Dict[str, Any] +``` + +#### Parameters + + + Situation to use prompt for (e.g., "payment-card-number") + + + + List of actions with 'type' and 'phrase' keys + + + + Space-separated card types for this prompt + + + + Space-separated error types for this prompt + + +#### Returns + +`Dict[str, Any]` — Dictionary representing the prompt structure + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 1444. + +*** + +### enable\_extensive\_data + +Send full data to LLM for this turn only, then use smaller replacement +in subsequent turns. + +#### Signature + +```python +enable_extensive_data(enabled: bool = True) -> FunctionResult +``` + +#### Parameters + + + Whether to send extensive data this turn only + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 652. + +*** + +### enable\_functions\_on\_timeout + +Enable function calls on speaker timeout. + +#### Signature + +```python +enable_functions_on_timeout(enabled: bool = True) -> FunctionResult +``` + +#### Parameters + + + Whether to enable functions on timeout + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 640. + +*** + +### execute\_rpc + +Execute an RPC method on a call using SWML. + +This is a generic helper for executing RPC commands. For common operations, +consider using the specific helpers: rpc\_dial(), rpc\_ai\_message(), rpc\_ai\_unhold(). + +> \[!NOTE] +> result = ( +> FunctionResult("Executing RPC") +> .execute\_rpc( +> method="ai\_message", +> call\_id="some-call-id", +> params=\{"role": "system", "message\_text": "Hello"\} +> ) +> ) + +#### Signature + +```python +execute_rpc( + method: str, + params: Optional[Dict[str, Any]] = None, + call_id: Optional[str] = None, + node_id: Optional[str] = None +) -> FunctionResult +``` + +#### Parameters + + + The RPC method to execute (e.g., "dial", "ai\_message", "ai\_unhold") + + + + Parameters for the RPC method (optional) + + + + Target call ID for the RPC (optional) + + + + Target node ID for the RPC (optional) + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 1290. + +*** + +### execute\_swml + +Execute SWML content with optional transfer behavior. + +#### Signature + +```python +execute_swml(swml_content, transfer: bool = False) -> FunctionResult +``` + +#### Parameters + + + Can be: + + + + Boolean - whether call should exit agent after execution + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 396. + +*** + +### hangup + +Terminate the call. + +#### Signature + +```python +hangup() -> FunctionResult +``` + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source [`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 433. + +*** + +### hold + +Put the call on hold with optional timeout. + +#### Signature + +```python +hold(timeout: int = 300) -> FunctionResult +``` + +#### Parameters + + + Timeout in seconds (max 900, default 300) + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 442. + +*** + +### join\_conference + +Join an ad-hoc audio conference with RELAY and CXML calls using SWML. + +This is a virtual helper that generates SWML to join audio conferences +with extensive configuration options for call management and recording. + +#### Signature + +```python +join_conference( + name: str, + muted: bool = False, + beep: str = 'true', + start_on_enter: bool = True, + end_on_exit: bool = False, + wait_url: Optional[str] = None, + max_participants: int = 250, + record: str = 'do-not-record', + region: Optional[str] = None, + trim: str = 'trim-silence', + coach: Optional[str] = None, + status_callback_event: Optional[str] = None, + status_callback: Optional[str] = None, + status_callback_method: str = 'POST', + recording_status_callback: Optional[str] = None, + recording_status_callback_method: str = 'POST', + recording_status_callback_event: str = 'completed', + result: Optional[Any] = None +) -> FunctionResult +``` + +#### Parameters + + + Name of conference (required) + + + + Whether to join muted (default: False) + + + + Beep configuration - "true", "false", "onEnter", "onExit" (default: "true") + + + + Whether conference starts when this participant enters (default: True) + + + + Whether conference ends when this participant exits (default: False) + + + + SWML URL for hold music (default: None for default hold music) + + + + Maximum participants \<= 250 (default: 250) + + + + Recording mode - "do-not-record", "record-from-start" (default: "do-not-record") + + + + Conference region (default: None) + + + + Trim silence - "trim-silence", "do-not-trim" (default: "trim-silence") + + + + SWML Call ID or CXML CallSid for coaching (default: None) + + + + Events to report - "start end join leave mute hold modify speaker announcement" (default: None) + + + + URL for status callbacks (default: None) + + + + HTTP method - "GET", "POST" (default: "POST") + + + + URL for recording status callbacks (default: None) + + + + HTTP method - "GET", "POST" (default: "POST") + + + + Recording events - "in-progress completed absent" (default: "completed") + + + + Switch on return\_value when object \{\} or cond when array \[] (default: None) + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Throws + +- `ValueError` — If beep value is invalid or max\_participants exceeds 250 + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 1049. + +*** + +### join\_room + +Join a RELAY room using SWML. + +This is a virtual helper that generates SWML to join a RELAY room, +which enables multi-party communication and collaboration. + +#### Signature + +```python +join_room(name: str) -> FunctionResult +``` + +#### Parameters + + + The name of the room to join (required) + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 991. + +*** + +### pay + +Process payment using SWML pay action. + +This is a virtual helper that generates SWML for payment processing. + +#### Signature + +```python +pay( + payment_connector_url: str, + input_method: str = 'dtmf', + status_url: Optional[str] = None, + payment_method: str = 'credit-card', + timeout: int = 5, + max_attempts: int = 1, + security_code: bool = True, + postal_code: Union[bool, str] = True, + min_postal_code_length: int = 0, + token_type: str = 'reusable', + charge_amount: Optional[str] = None, + currency: str = 'usd', + language: str = 'en-US', + voice: str = 'woman', + description: Optional[str] = None, + valid_card_types: str = 'visa mastercard amex', + parameters: Optional[List[Dict[str, str]]] = None, + prompts: Optional[List[Dict[str, Any]]] = None, + ai_response: Optional[str] = 'The payment status is ${pay_result}, do not mention anything else about collecting payment if successful.' +) -> FunctionResult +``` + +#### Parameters + + + URL to make payment requests to (required) + + + + Method to collect payment details. The SWML pay verb only accepts "dtmf" (schema `input` is `const: "dtmf"`); the earlier "voice" option was never valid. + + + + URL for status change notifications + + + + Payment method ("credit-card" currently supported) + + + + Seconds to wait for next digit (default: 5) + + + + Number of retry attempts (default: 1) + + + + Whether to prompt for security code (default: True) + + + + Whether to prompt for postal code, or actual postcode + + + + Minimum postal code digits (default: 0) + + + + Payment type ("one-time" or "reusable", default: "reusable") + + + + Amount to charge as decimal string + + + + Currency code (default: "usd") + + + + Language for prompts (default: "en-US") + + + + TTS voice to use (default: "woman") + + + + Custom payment description + + + + Space-separated card types (default: "visa mastercard amex") + + + + Array of name/value pairs for payment connector + + + + Array of custom prompt configurations + + + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 797. + +*** + +### play\_background\_file + +Play audio or video file in background. + +#### Signature + +```python +play_background_file(filename: str, wait: bool = False) -> FunctionResult +``` + +#### Parameters + + + Audio/video filename/path + + + + Whether to suppress attention-getting behavior during playback + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 500. + +*** + +### record\_call + +Start background call recording using SWML. + +This is a virtual helper that generates SWML to start recording the call +in the background. Unlike foreground recording, the script continues +executing while recording happens in the background. + +#### Signature + +```python +record_call( + control_id: Optional[str] = None, + stereo: bool = False, + format: Literal['wav', 'mp3', 'mp4'] = 'wav', + direction: Literal['speak', 'listen', 'both'] = 'both', + terminators: Optional[str] = None, + beep: bool = False, + input_sensitivity: float = 44.0, + initial_timeout: Optional[float] = None, + end_silence_timeout: Optional[float] = None, + max_length: Optional[float] = None, + status_url: Optional[str] = None +) -> FunctionResult +``` + +#### Parameters + + + Identifier for this recording (for use with stop\_record\_call) + + + + Record in stereo (default: False) + + + + Recording format - "wav", "mp3", or "mp4" (default: "wav") + + + + Audio direction - "speak", "listen", or "both" (default: "both") + + + + Digits that stop recording when pressed + + + + Play beep before recording (default: False) + + + + Input sensitivity for recording (default: 44.0) + + + + Time in seconds to wait for speech start (for voicemail-style recording) + + + + Time in seconds to wait in silence before ending (for voicemail-style recording) + + + + Maximum recording length in seconds + + + + URL to send recording status events to + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 885. + +*** + +### remove\_global\_data + +Remove global agent data variables. + +#### Signature + +```python +remove_global_data(keys: Union[str, List[str]]) -> FunctionResult +``` + +#### Parameters + + + Single key string or list of keys to remove + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 592. + +*** + +### remove\_metadata + +Remove metadata from current function's meta\_data\_token scope. + +#### Signature + +```python +remove_metadata(keys: Union[str, List[str]]) -> FunctionResult +``` + +#### Parameters + + + Single key string or list of keys to remove + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 616. + +*** + +### replace\_in\_history + +After first send, replace tool\_call+result pair in conversation history. + +#### Signature + +```python +replace_in_history(text: Union[str, bool] = True) -> FunctionResult +``` + +#### Parameters + + + String = replace tool\_call with an assistant message containing this text. True = remove the tool\_call+result pair from history entirely. + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 665. + +*** + +### rpc\_ai\_message + +Inject a message into an AI agent on another call using execute\_rpc. + +This is useful for cross-call communication, such as notifying a held +caller's AI agent about a status change or instructing it to relay +a message. + +> \[!NOTE] +> result = ( +> FunctionResult("I'll let them know.") +> .rpc\_ai\_message( +> call\_id=original\_call\_id, +> message\_text="The person you were trying to reach is unavailable. Please take a message." +> ) +> ) + +#### Signature + +```python +rpc_ai_message( + call_id: str, + message_text: str, + role: str = 'system' +) -> FunctionResult +``` + +#### Parameters + + + The call ID of the target call + + + + The message text to inject into the AI conversation + + + + The role for the message, typically "system" (default: "system") + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 1383. + +*** + +### rpc\_ai\_unhold + +Unhold another call using execute\_rpc. + +This releases a call from hold state, typically used after injecting +a message to the held caller's AI agent. + +> \[!NOTE] +> result = ( +> FunctionResult("Understood, I'll let them know.") +> .rpc\_ai\_message(call\_id, "No one is available. Please take a message.") +> .rpc\_ai\_unhold(call\_id) +> ) + +#### Signature + +```python +rpc_ai_unhold(call_id: str) -> FunctionResult +``` + +#### Parameters + + + The call ID of the call to unhold + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 1418. + +*** + +### rpc\_dial + +Dial out to a number with a destination SWML URL using execute\_rpc. + +This is commonly used in call screening scenarios where you place a caller +on hold and dial out to a human, with the dest\_swml specifying what agent +handles the outbound leg. + +> \[!NOTE] +> result = ( +> FunctionResult("Please hold while I connect you.") +> .hold(timeout=120) +> .rpc\_dial( +> to\_number="+15551234567", +> from\_number="+15559876543", +> dest\_swml="https://example.com/call-agent?caller=John" +> ) +> ) + +#### Signature + +```python +rpc_dial( + to_number: str, + from_number: str, + dest_swml: str, + device_type: str = 'phone' +) -> FunctionResult +``` + +#### Parameters + + + Phone number to dial (E.164 format) + + + + Caller ID to use (E.164 format) + + + + URL to the SWML that handles the outbound call + + + + Device type, typically "phone" (default: "phone") + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 1340. + +*** + +### say + +Make the agent speak specific text. + +#### Signature + +```python +say(text: str) -> FunctionResult +``` + +#### Parameters + + + Text for agent to speak + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 488. + +*** + +### send\_sms + +Send a text message to a PSTN phone number using SWML. + +This is a virtual helper that generates SWML to send SMS messages. +Either body or media (or both) must be provided. + +#### Signature + +```python +send_sms( + to_number: str, + from_number: str, + body: Optional[str] = None, + media: Optional[List[str]] = None, + tags: Optional[List[str]] = None, + region: Optional[str] = None +) -> FunctionResult +``` + +#### Parameters + + + Phone number in E.164 format to send to + + + + Phone number in E.164 format to send from + + + + Body text of the message (optional if media provided) + + + + Array of URLs to send in the message (optional if body provided) + + + + Array of tags to associate with the message for UI searching + + + + Region to originate the message from + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Throws + +- `ValueError` — If neither body nor media is provided + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 741. + +*** + +### set\_end\_of\_speech\_timeout + +Adjust end of speech timeout - milliseconds of silence after speaking +has been detected to finalize speech recognition. + +#### Signature + +```python +set_end_of_speech_timeout(milliseconds: int) -> FunctionResult +``` + +#### Parameters + + + Timeout in milliseconds + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 566. + +*** + +### set\_metadata + +Set metadata scoped to current function's meta\_data\_token. + +#### Signature + +```python +set_metadata(data: Dict[str, Any]) -> FunctionResult +``` + +#### Parameters + + + Dictionary of key-value pairs for metadata + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 604. + +*** + +### set\_post\_process + +Set whether to enable post-processing for this result. + +Post-processing allows the AI to take one more turn with the user +before executing any actions. This is useful for confirmation workflows. + +#### Signature + +```python +set_post_process(post_process: bool) -> FunctionResult +``` + +#### Parameters + + + True to let AI respond once more before executing actions, False to execute actions immediately after the response. + + +#### Returns + +`FunctionResult` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 97. + +*** + +### set\_response + +Set the natural language response text + +#### Signature + +```python +set_response(response: str) -> FunctionResult +``` + +#### Parameters + + + The text the AI should say + + +#### Returns + +`FunctionResult` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 84. + +*** + +### set\_speech\_event\_timeout + +Adjust speech event timeout - milliseconds since last speech detection +event to finalize recognition. Works better in noisy environments. + +#### Signature + +```python +set_speech_event_timeout(milliseconds: int) -> FunctionResult +``` + +#### Parameters + + + Timeout in milliseconds + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 579. + +*** + +### simulate\_user\_input + +Queue simulated user input. + +#### Signature + +```python +simulate_user_input(text: str) -> FunctionResult +``` + +#### Parameters + + + Text to simulate as user input + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 729. + +*** + +### sip\_refer + +Send SIP REFER to a SIP call using SWML. + +This is a virtual helper that generates SWML to send a SIP REFER +message, which is used for call transfer in SIP environments. + +#### Signature + +```python +sip_refer(to_uri: str) -> FunctionResult +``` + +#### Parameters + + + The SIP URI to send the REFER to (required) + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 1020. + +*** + +### stop + +Stop the agent execution. + +#### Signature + +```python +stop() -> FunctionResult +``` + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 479. + +*** + +### stop\_background\_file + +Stop currently playing background file. + +#### Signature + +```python +stop_background_file() -> FunctionResult +``` + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 516. + +*** + +### stop\_record\_call + +Stop an active background call recording using SWML. + +This is a virtual helper that generates SWML to stop a recording that +was started with record\_call(). + +#### Signature + +```python +stop_record_call(control_id: Optional[str] = None) -> FunctionResult +``` + +#### Parameters + + + Identifier for the recording to stop. If not provided, the most recent recording will be stopped. + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 959. + +*** + +### stop\_tap + +Stop an active tap stream using SWML. + +This is a virtual helper that generates SWML to stop a tap stream +that was started with tap(). + +#### Signature + +```python +stop_tap(control_id: Optional[str] = None) -> FunctionResult +``` + +#### Parameters + + + ID of the tap to stop (optional) If not set, the last tap started will be stopped + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 1256. + +*** + +### switch\_context + +Change agent context/prompt during conversation. + +#### Signature + +```python +switch_context( + system_prompt: Optional[str] = None, + user_prompt: Optional[str] = None, + consolidate: bool = False, + full_reset: bool = False +) -> FunctionResult +``` + +#### Parameters + + + New system prompt + + + + User message to add + + + + Whether to summarize existing conversation + + + + Whether to do complete context reset + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 699. + +*** + +### swml\_change\_context + +Force the conversation into a different context. + +Webhook-triggered context changes bypass any `valid_contexts` clamp. +Step state resets (cur\_step = 0) on entry. The new context's first +step's instructions are injected on the next turn. + +#### Communicating intent to the destination context + +Same pattern as swml\_change\_step: the model reads your FunctionResult's +`response` text as the tool result before it sees the destination +context's first step. Put your reason there: + +``` +FunctionResult( + "I'm transferring you to billing because your question is " + "about an invoice charge." +).swml_change_context("billing") +``` + +For structured carry-over, use update\_global\_data() and reference the +values via $\{var\} expansion in the destination context's step text. + +Note that conversation history is preserved across context switches +unless the destination context is marked `isolated=True`. The model +retains everything the user said in the previous context — you do +not need to re-state it. + +> \[!NOTE] +> result = ( +> FunctionResult("Transferring you to technical support.") +> .update\_global\_data(\{"original\_issue": user\_problem\}) +> .swml\_change\_context("technical\_support") +> ) + +#### Signature + +```python +swml_change_context(context_name: str) -> FunctionResult +``` + +#### Parameters + + + Name of the context to switch to. Must exist in the agent's context map. + + +#### Returns + +`FunctionResult` — Self for method chaining. + +#### Examples + +```python +FunctionResult( + "I'm transferring you to billing because your question is " + "about an invoice charge." +).swml_change_context("billing") +``` + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 353. + +*** + +### swml\_change\_step + +Force the conversation into a specific step in the current context. + +This is a workflow-level transition driven by your webhook, not by the +model. Webhook-triggered step changes bypass any `valid_steps` clamp +on the current step (the model's `next_step` tool is the constrained +path; this is the unconstrained one). Use it when something the user +said unambiguously requires moving the flow forward. + +#### Communicating intent to the destination step + +When the model arrives at the new step, the next thing it sees in +history is the tool result that contained this action — i.e., your +FunctionResult's `response` text. Put your "why" there. The model +reads it before the new step's injected instructions: + +``` +FunctionResult( + "Premium plan confirmed. Now collecting payment details." +).swml_change_step("collect_payment") +``` + +For structured data the destination step needs (account number, +plan tier, etc.), pair this with `update_global_data()` and reference +the values from the destination step's `text` via $\{var\} expansion: + +``` +(FunctionResult("Premium plan confirmed.") + .update_global_data({"plan": "premium", "billing_cycle": "annual"}) + .swml_change_step("collect_payment")) +``` + +And in the destination step's text: + +``` +step.set_text( + "Collect payment for the ${plan} plan, billed ${billing_cycle}. " + "Confirm the amount with the user before proceeding." +) +``` + +> \[!NOTE] +> result = ( +> FunctionResult("Starting a new hand") +> .update\_global\_data(\{"chips": 1000\}) +> .swml\_change\_step("betting") +> ) + +#### Signature + +```python +swml_change_step(step_name: str) -> FunctionResult +``` + +#### Parameters + + + Name of the step to transition to. The step must exist in the current context. + + +#### Returns + +`FunctionResult` — Self for method chaining. + +#### Examples + + + + ```python + FunctionResult( + "Premium plan confirmed. Now collecting payment details." + ).swml_change_step("collect_payment") + ``` + + + + ```python + (FunctionResult("Premium plan confirmed.") + .update_global_data({"plan": "premium", "billing_cycle": "annual"}) + .swml_change_step("collect_payment")) + ``` + + + + ```python + step.set_text( + "Collect payment for the ${plan} plan, billed ${billing_cycle}. " + "Confirm the amount with the user before proceeding." + ) + ``` + + + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 301. + +*** + +### swml\_transfer + +Add a SWML transfer action with AI response setup for when transfer completes. + +This is a virtual helper that generates SWML to transfer the call to another +destination and sets up an AI response for when the transfer completes and +control returns to the agent. + +For transfers, you typically want to enable post-processing so the AI speaks +the response first before executing the transfer. + +> \[!NOTE] +> +> ### Permanent transfer (default) +> +> result = ( +> FunctionResult("I'm transferring you to support", post\_process=True) +> .swml\_transfer( +> "https://support.example.com/swml", +> "Goodbye!" # Won't be used since final=True by default +> ) +> ) +> +> ### Temporary transfer with return +> +> result.swml\_transfer( +> dest, +> "The support call is complete. How else can I help?", +> final=False +> ) + +#### Signature + +```python +swml_transfer(dest: str, ai_response: str, final: bool = True) -> FunctionResult +``` + +#### Parameters + + + Destination URL for the transfer (SWML endpoint, SIP address, etc.) + + + + Message the AI should say when transfer completes and control returns + + + + Whether this is a permanent transfer (True) or temporary (False). Defaults to True for permanent transfers (same as connect method). + + +#### Returns + +`FunctionResult` — Self for method chaining + +#### Examples + +```python +# Temporary transfer with return +result.swml_transfer( + dest, + "The support call is complete. How else can I help?", + final=False +) +``` + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 191. + +*** + +### swml\_user\_event + +Send a user event through SWML to update the client UI. + +This is a convenience method for sending user events to connected clients, +commonly used for real-time UI updates in interactive applications. + +> \[!NOTE] +> result = ( +> FunctionResult("You have blackjack!") +> .swml\_user\_event(\{ +> "type": "cards\_dealt", +> "player\_hand": player\_cards, +> "dealer\_hand": dealer\_cards, +> "player\_score": 21 +> \}) +> ) + +#### Signature + +```python +swml_user_event(event_data: Dict[str, Any]) -> FunctionResult +``` + +#### Parameters + + + Dictionary containing the event type and any associated data Example: \{"type": "cards\_dealt", "player\_hand": \[...], "score": 21\} + + +#### Returns + +`FunctionResult` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 263. + +*** + +### tap + +Start background call tap using SWML. + +This is a virtual helper that generates SWML to start background call tapping. +Media is streamed over Websocket or RTP to customer controlled URI. + +#### Signature + +```python +tap( + uri: str, + control_id: Optional[str] = None, + direction: Literal['speak', 'hear', 'both'] = 'both', + codec: Literal['PCMU', 'PCMA'] = 'PCMU', + rtp_ptime: int = 20, + status_url: Optional[str] = None +) -> FunctionResult +``` + +#### Parameters + + + Destination of tap media stream (required) Formats: rtp://IP:port, ws://example.com, or wss://example.com + + + + Identifier for this tap to use with stop\_tap (optional) Default is generated and stored in tap\_control\_id variable + + + + Direction of audio to tap (default: "both") "speak" = what party says "hear" = what party hears\ + "both" = what party hears and says + + + + Codec for tap media stream - "PCMU" or "PCMA" (default: "PCMU") + + + + Packetization time in milliseconds for RTP (default: 20) + + + + URL for status change requests (optional) + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Throws + +- `ValueError` — If direction or codec values are invalid + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 1186. + +*** + +### to\_dict + +Convert to the JSON structure expected by SWAIG + +The result must have at least one of: + +- 'response': Text to be spoken by the AI +- 'action': Array of action objects + +Optional: + +- 'post\_process': Boolean controlling when actions execute + +#### Signature + +```python +to_dict() -> Dict[str, Any] +``` + +#### Returns + +`Dict[str, Any]` — Dictionary in SWAIG function response format + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 1506. + +*** + +### toggle\_functions + +Enable/disable specific SWAIG functions. + +#### Signature + +```python +toggle_functions(function_toggles: List[Dict[str, Any]]) -> FunctionResult +``` + +#### Parameters + + + List of dicts with 'function' and 'active' keys + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 628. + +*** + +### update\_global\_data + +Update global agent data variables. + +This is a convenience method that abstracts the set\_global\_data action. +Global data persists across the entire agent session and is available +in prompt variables and can be accessed by all functions. + +#### Signature + +```python +update_global_data(data: Dict[str, Any]) -> FunctionResult +``` + +#### Parameters + + + Dictionary of key-value pairs to set/update in global data + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 247. + +*** + +### update\_settings + +Update agent runtime settings. + +Supported settings: + +- frequency-penalty: Float (-2.0 to 2.0) +- presence-penalty: Float (-2.0 to 2.0) +- max-tokens: Integer (0 to 4096) +- top-p: Float (0.0 to 1.0) +- confidence: Float (0.0 to 1.0) +- barge-confidence: Float (0.0 to 1.0) +- temperature: Float (0.0 to 2.0, clamped to 1.5) + +#### Signature + +```python +update_settings(settings: Dict[str, Any]) -> FunctionResult +``` + +#### Parameters + + + Dictionary of settings to update + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 678. + +*** + +### wait\_for\_user + +Control how agent waits for user input. + +#### Signature + +```python +wait_for_user( + enabled: Optional[bool] = None, + timeout: Optional[int] = None, + answer_first: bool = False +) -> FunctionResult +``` + +#### Parameters + + + Boolean to enable/disable waiting + + + + Number of seconds to wait + + + + Special "answer\_first" mode + + +#### Returns + +`FunctionResult` — self for method chaining + +#### Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 456. + +## Source + +[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) + +Line 17. diff --git a/fern/products/sdk-reference/python/agents/function-result/index__2.mdx b/fern/products/sdk-reference/python/agents/function-result/index__2.mdx deleted file mode 100644 index 3b568f299a..0000000000 --- a/fern/products/sdk-reference/python/agents/function-result/index__2.mdx +++ /dev/null @@ -1,2253 +0,0 @@ ---- -slug: "/reference/python/agents/function-result/index__2" -title: "FunctionResult" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.core.function_result.FunctionResult" - parent: "agents" - module: "agents" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py" ---- -# `FunctionResult` - -Wrapper around SWAIG function responses that handles proper formatting -of response text and actions. - -The result object has three main components: - -1. response: Text the AI should say back to the user -2. action: List of structured actions to execute -3. post\_process: Whether to let AI take another turn before executing actions - -Post-processing behavior: - -- post\_process=False (default): Execute actions immediately after AI response -- post\_process=True: Let AI respond to user one more time, then execute actions - -This is useful for confirmation workflows like: -"I'll transfer you to sales. Do you have any other questions first?" -(AI can handle follow-up, then execute the transfer) - -> \[!NOTE] -> return FunctionResult("Found your order") -> -> # With actions -> -> return ( -> FunctionResult("I'll transfer you to support") -> .add\_action("transfer", \{"dest": "support"\}) -> ) -> -> # With simple action value -> -> return ( -> FunctionResult("I'll confirm that") -> .add\_action("confirm", True) -> ) -> -> # With multiple actions -> -> return ( -> FunctionResult("Processing your request") -> .add\_actions(\[ -> \{"set\_global\_data": \{"key": "value"\}\}, -> \{"play": \{"url": "music.mp3"\}\} -> ]) -> ) -> -> # With post-processing enabled -> -> return ( -> FunctionResult("Let me transfer you to billing", post\_process=True) -> .connect("+15551234567", final=True) -> ) -> -> # Using the connect helper -> -> return ( -> FunctionResult("I'll transfer you to our sales team now") -> .connect("sales@company.com", final=False, from\_addr="+15559876543") -> ) - -## Signature - -```python -class FunctionResult -``` - -## Examples - -```python -# With actions -return ( - FunctionResult("I'll transfer you to support") - .add_action("transfer", {"dest": "support"}) -) - -# With simple action value -return ( - FunctionResult("I'll confirm that") - .add_action("confirm", True) -) - -# With multiple actions -return ( - FunctionResult("Processing your request") - .add_actions([ - {"set_global_data": {"key": "value"}}, - {"play": {"url": "music.mp3"}} - ]) -) - -# With post-processing enabled -return ( - FunctionResult("Let me transfer you to billing", post_process=True) - .connect("+15551234567", final=True) -) - -# Using the connect helper -return ( - FunctionResult("I'll transfer you to our sales team now") - .connect("sales@company.com", final=False, from_addr="+15559876543") -) -``` - -## Properties - - - - - - - -## Methods - -### \_\_init\_\_ - -Initialize a new SWAIG function result - -#### Signature - -```python -__init__(response: Optional[str] = None, post_process: bool = False) -``` - -#### Parameters - - - Optional natural language response to include - - - - Whether to let AI take another turn before executing actions. Defaults to False (execute actions immediately after response). - - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 71. - -*** - -### add\_action - -Add a structured action to the response - -#### Signature - -```python -add_action(name: str, data: Any) -> FunctionResult -``` - -#### Parameters - - - The name/type of the action (e.g., "play", "transfer") - - - - The data for the action - can be a string, boolean, object, or array - - -#### Returns - -`FunctionResult` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 114. - -*** - -### add\_actions - -Add multiple structured actions to the response - -#### Signature - -```python -add_actions(actions: List[Dict[str, Any]]) -> FunctionResult -``` - -#### Parameters - - - List of action objects to add to the response - - -#### Returns - -`FunctionResult` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 128. - -*** - -### add\_dynamic\_hints - -Add dynamic speech recognition hints during a call. - -Hints improve speech recognition accuracy for domain-specific terms. -Each hint can be a simple string or a pronunciation pattern object. - -> \[!NOTE] -> result = ( -> FunctionResult("I'll listen for that name") -> .add\_dynamic\_hints(\[ -> "Cabby", -> \{"pattern": "cab bee", "replace": "Cabby", "ignore\_case": True\} -> ]) -> ) - -#### Signature - -```python -add_dynamic_hints(hints: List[Union[str, Dict[str, Any]]]) -> FunctionResult -``` - -#### Parameters - - - List of hints, where each entry is either: - - -#### Returns - -`FunctionResult` — self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 525. - -*** - -### clear\_dynamic\_hints - -Clear all dynamic speech recognition hints. - -Removes all hints previously added via add\_dynamic\_hints(). - -#### Signature - -```python -clear_dynamic_hints() -> FunctionResult -``` - -#### Returns - -`FunctionResult` — self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 554. - -*** - -### connect - -Add a connect action to transfer/connect the call to another destination. - -This is a convenience method that abstracts the SWML connect verb, so users -don't need to manually construct SWML documents. - -Transfer behavior: - -- final=True: Permanent transfer - call exits the agent completely, - SWML replaces the agent and call continues there -- final=False: Temporary transfer - if far end hangs up, call returns - to the agent to continue the conversation - -> \[!NOTE] -> -> ### Permanent transfer to a phone number -> -> result.connect("+15551234567", final=True) -> -> ### Temporary transfer to SIP address with custom caller ID -> -> result.connect("support@company.com", final=False, from\_addr="+15559876543") - -#### Signature - -```python -connect( - destination: str, - final: bool = True, - from_addr: Optional[str] = None -) -> FunctionResult -``` - -#### Parameters - - - Where to connect the call (phone number, SIP address, etc.) - - - - Whether this is a permanent transfer (True) or temporary (False). Defaults to True for permanent transfers. - - - - Optional caller ID override (phone number or SIP address). If None, uses the current call's from address. - - -#### Returns - -`FunctionResult` — Self for method chaining - -#### Examples - -```python -# Temporary transfer to SIP address with custom caller ID -result.connect("support@company.com", final=False, from_addr="+15559876543") -``` - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 141. - -*** - -### create\_payment\_action - -Create a payment action for use in payment prompts. - -**Modifiers:** `static` - -#### Signature - -```python -@staticmethod -create_payment_action(action_type: str, phrase: str) -> Dict[str, str] -``` - -#### Parameters - - - "Say" for text-to-speech or "Play" for audio file - - - - Sentence to say or URL to play - - -#### Returns - -`Dict[str, str]` — Dictionary representing the action - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 1472. - -*** - -### create\_payment\_parameter - -Create a payment parameter for use with pay() method. - -**Modifiers:** `static` - -#### Signature - -```python -@staticmethod -create_payment_parameter(name: str, value: str) -> Dict[str, str] -``` - -#### Parameters - - - Parameter name - - - - Parameter value - - -#### Returns - -`Dict[str, str]` — Dictionary representing the parameter - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 1489. - -*** - -### create\_payment\_prompt - -Create a payment prompt structure for use with pay() method. - -**Modifiers:** `static` - -#### Signature - -```python -@staticmethod -create_payment_prompt( - for_situation: str, - actions: List[Dict[str, str]], - card_type: Optional[str] = None, - error_type: Optional[str] = None -) -> Dict[str, Any] -``` - -#### Parameters - - - Situation to use prompt for (e.g., "payment-card-number") - - - - List of actions with 'type' and 'phrase' keys - - - - Space-separated card types for this prompt - - - - Space-separated error types for this prompt - - -#### Returns - -`Dict[str, Any]` — Dictionary representing the prompt structure - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 1444. - -*** - -### enable\_extensive\_data - -Send full data to LLM for this turn only, then use smaller replacement -in subsequent turns. - -#### Signature - -```python -enable_extensive_data(enabled: bool = True) -> FunctionResult -``` - -#### Parameters - - - Whether to send extensive data this turn only - - -#### Returns - -`FunctionResult` — self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 652. - -*** - -### enable\_functions\_on\_timeout - -Enable function calls on speaker timeout. - -#### Signature - -```python -enable_functions_on_timeout(enabled: bool = True) -> FunctionResult -``` - -#### Parameters - - - Whether to enable functions on timeout - - -#### Returns - -`FunctionResult` — self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 640. - -*** - -### execute\_rpc - -Execute an RPC method on a call using SWML. - -This is a generic helper for executing RPC commands. For common operations, -consider using the specific helpers: rpc\_dial(), rpc\_ai\_message(), rpc\_ai\_unhold(). - -> \[!NOTE] -> result = ( -> FunctionResult("Executing RPC") -> .execute\_rpc( -> method="ai\_message", -> call\_id="some-call-id", -> params=\{"role": "system", "message\_text": "Hello"\} -> ) -> ) - -#### Signature - -```python -execute_rpc( - method: str, - params: Optional[Dict[str, Any]] = None, - call_id: Optional[str] = None, - node_id: Optional[str] = None -) -> FunctionResult -``` - -#### Parameters - - - The RPC method to execute (e.g., "dial", "ai\_message", "ai\_unhold") - - - - Parameters for the RPC method (optional) - - - - Target call ID for the RPC (optional) - - - - Target node ID for the RPC (optional) - - -#### Returns - -`FunctionResult` — self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 1290. - -*** - -### execute\_swml - -Execute SWML content with optional transfer behavior. - -#### Signature - -```python -execute_swml(swml_content, transfer: bool = False) -> FunctionResult -``` - -#### Parameters - - - Can be: - - - - Boolean - whether call should exit agent after execution - - -#### Returns - -`FunctionResult` — self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 396. - -*** - -### hangup - -Terminate the call. - -#### Signature - -```python -hangup() -> FunctionResult -``` - -#### Returns - -`FunctionResult` — self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 433. - -*** - -### hold - -Put the call on hold with optional timeout. - -#### Signature - -```python -hold(timeout: int = 300) -> FunctionResult -``` - -#### Parameters - - - Timeout in seconds (max 900, default 300) - - -#### Returns - -`FunctionResult` — self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 442. - -*** - -### join\_conference - -Join an ad-hoc audio conference with RELAY and CXML calls using SWML. - -This is a virtual helper that generates SWML to join audio conferences -with extensive configuration options for call management and recording. - -#### Signature - -```python -join_conference( - name: str, - muted: bool = False, - beep: str = 'true', - start_on_enter: bool = True, - end_on_exit: bool = False, - wait_url: Optional[str] = None, - max_participants: int = 250, - record: str = 'do-not-record', - region: Optional[str] = None, - trim: str = 'trim-silence', - coach: Optional[str] = None, - status_callback_event: Optional[str] = None, - status_callback: Optional[str] = None, - status_callback_method: str = 'POST', - recording_status_callback: Optional[str] = None, - recording_status_callback_method: str = 'POST', - recording_status_callback_event: str = 'completed', - result: Optional[Any] = None -) -> FunctionResult -``` - -#### Parameters - - - Name of conference (required) - - - - Whether to join muted (default: False) - - - - Beep configuration - "true", "false", "onEnter", "onExit" (default: "true") - - - - Whether conference starts when this participant enters (default: True) - - - - Whether conference ends when this participant exits (default: False) - - - - SWML URL for hold music (default: None for default hold music) - - - - Maximum participants \<= 250 (default: 250) - - - - Recording mode - "do-not-record", "record-from-start" (default: "do-not-record") - - - - Conference region (default: None) - - - - Trim silence - "trim-silence", "do-not-trim" (default: "trim-silence") - - - - SWML Call ID or CXML CallSid for coaching (default: None) - - - - Events to report - "start end join leave mute hold modify speaker announcement" (default: None) - - - - URL for status callbacks (default: None) - - - - HTTP method - "GET", "POST" (default: "POST") - - - - URL for recording status callbacks (default: None) - - - - HTTP method - "GET", "POST" (default: "POST") - - - - Recording events - "in-progress completed absent" (default: "completed") - - - - Switch on return\_value when object \{\} or cond when array \[] (default: None) - - -#### Returns - -`FunctionResult` — self for method chaining - -#### Throws - -- `ValueError` — If beep value is invalid or max\_participants exceeds 250 - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 1049. - -*** - -### join\_room - -Join a RELAY room using SWML. - -This is a virtual helper that generates SWML to join a RELAY room, -which enables multi-party communication and collaboration. - -#### Signature - -```python -join_room(name: str) -> FunctionResult -``` - -#### Parameters - - - The name of the room to join (required) - - -#### Returns - -`FunctionResult` — self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 991. - -*** - -### pay - -Process payment using SWML pay action. - -This is a virtual helper that generates SWML for payment processing. - -#### Signature - -```python -pay( - payment_connector_url: str, - input_method: str = 'dtmf', - status_url: Optional[str] = None, - payment_method: str = 'credit-card', - timeout: int = 5, - max_attempts: int = 1, - security_code: bool = True, - postal_code: Union[bool, str] = True, - min_postal_code_length: int = 0, - token_type: str = 'reusable', - charge_amount: Optional[str] = None, - currency: str = 'usd', - language: str = 'en-US', - voice: str = 'woman', - description: Optional[str] = None, - valid_card_types: str = 'visa mastercard amex', - parameters: Optional[List[Dict[str, str]]] = None, - prompts: Optional[List[Dict[str, Any]]] = None, - ai_response: Optional[str] = 'The payment status is ${pay_result}, do not mention anything else about collecting payment if successful.' -) -> FunctionResult -``` - -#### Parameters - - - URL to make payment requests to (required) - - - - Method to collect payment details. The SWML pay verb only accepts "dtmf" (schema `input` is `const: "dtmf"`); the earlier "voice" option was never valid. - - - - URL for status change notifications - - - - Payment method ("credit-card" currently supported) - - - - Seconds to wait for next digit (default: 5) - - - - Number of retry attempts (default: 1) - - - - Whether to prompt for security code (default: True) - - - - Whether to prompt for postal code, or actual postcode - - - - Minimum postal code digits (default: 0) - - - - Payment type ("one-time" or "reusable", default: "reusable") - - - - Amount to charge as decimal string - - - - Currency code (default: "usd") - - - - Language for prompts (default: "en-US") - - - - TTS voice to use (default: "woman") - - - - Custom payment description - - - - Space-separated card types (default: "visa mastercard amex") - - - - Array of name/value pairs for payment connector - - - - Array of custom prompt configurations - - - - -#### Returns - -`FunctionResult` — self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 797. - -*** - -### play\_background\_file - -Play audio or video file in background. - -#### Signature - -```python -play_background_file(filename: str, wait: bool = False) -> FunctionResult -``` - -#### Parameters - - - Audio/video filename/path - - - - Whether to suppress attention-getting behavior during playback - - -#### Returns - -`FunctionResult` — self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 500. - -*** - -### record\_call - -Start background call recording using SWML. - -This is a virtual helper that generates SWML to start recording the call -in the background. Unlike foreground recording, the script continues -executing while recording happens in the background. - -#### Signature - -```python -record_call( - control_id: Optional[str] = None, - stereo: bool = False, - format: Literal['wav', 'mp3', 'mp4'] = 'wav', - direction: Literal['speak', 'listen', 'both'] = 'both', - terminators: Optional[str] = None, - beep: bool = False, - input_sensitivity: float = 44.0, - initial_timeout: Optional[float] = None, - end_silence_timeout: Optional[float] = None, - max_length: Optional[float] = None, - status_url: Optional[str] = None -) -> FunctionResult -``` - -#### Parameters - - - Identifier for this recording (for use with stop\_record\_call) - - - - Record in stereo (default: False) - - - - Recording format - "wav", "mp3", or "mp4" (default: "wav") - - - - Audio direction - "speak", "listen", or "both" (default: "both") - - - - Digits that stop recording when pressed - - - - Play beep before recording (default: False) - - - - Input sensitivity for recording (default: 44.0) - - - - Time in seconds to wait for speech start (for voicemail-style recording) - - - - Time in seconds to wait in silence before ending (for voicemail-style recording) - - - - Maximum recording length in seconds - - - - URL to send recording status events to - - -#### Returns - -`FunctionResult` — self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 885. - -*** - -### remove\_global\_data - -Remove global agent data variables. - -#### Signature - -```python -remove_global_data(keys: Union[str, List[str]]) -> FunctionResult -``` - -#### Parameters - - - Single key string or list of keys to remove - - -#### Returns - -`FunctionResult` — self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 592. - -*** - -### remove\_metadata - -Remove metadata from current function's meta\_data\_token scope. - -#### Signature - -```python -remove_metadata(keys: Union[str, List[str]]) -> FunctionResult -``` - -#### Parameters - - - Single key string or list of keys to remove - - -#### Returns - -`FunctionResult` — self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 616. - -*** - -### replace\_in\_history - -After first send, replace tool\_call+result pair in conversation history. - -#### Signature - -```python -replace_in_history(text: Union[str, bool] = True) -> FunctionResult -``` - -#### Parameters - - - String = replace tool\_call with an assistant message containing this text. True = remove the tool\_call+result pair from history entirely. - - -#### Returns - -`FunctionResult` — self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 665. - -*** - -### rpc\_ai\_message - -Inject a message into an AI agent on another call using execute\_rpc. - -This is useful for cross-call communication, such as notifying a held -caller's AI agent about a status change or instructing it to relay -a message. - -> \[!NOTE] -> result = ( -> FunctionResult("I'll let them know.") -> .rpc\_ai\_message( -> call\_id=original\_call\_id, -> message\_text="The person you were trying to reach is unavailable. Please take a message." -> ) -> ) - -#### Signature - -```python -rpc_ai_message( - call_id: str, - message_text: str, - role: str = 'system' -) -> FunctionResult -``` - -#### Parameters - - - The call ID of the target call - - - - The message text to inject into the AI conversation - - - - The role for the message, typically "system" (default: "system") - - -#### Returns - -`FunctionResult` — self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 1383. - -*** - -### rpc\_ai\_unhold - -Unhold another call using execute\_rpc. - -This releases a call from hold state, typically used after injecting -a message to the held caller's AI agent. - -> \[!NOTE] -> result = ( -> FunctionResult("Understood, I'll let them know.") -> .rpc\_ai\_message(call\_id, "No one is available. Please take a message.") -> .rpc\_ai\_unhold(call\_id) -> ) - -#### Signature - -```python -rpc_ai_unhold(call_id: str) -> FunctionResult -``` - -#### Parameters - - - The call ID of the call to unhold - - -#### Returns - -`FunctionResult` — self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 1418. - -*** - -### rpc\_dial - -Dial out to a number with a destination SWML URL using execute\_rpc. - -This is commonly used in call screening scenarios where you place a caller -on hold and dial out to a human, with the dest\_swml specifying what agent -handles the outbound leg. - -> \[!NOTE] -> result = ( -> FunctionResult("Please hold while I connect you.") -> .hold(timeout=120) -> .rpc\_dial( -> to\_number="+15551234567", -> from\_number="+15559876543", -> dest\_swml="https://example.com/call-agent?caller=John" -> ) -> ) - -#### Signature - -```python -rpc_dial( - to_number: str, - from_number: str, - dest_swml: str, - device_type: str = 'phone' -) -> FunctionResult -``` - -#### Parameters - - - Phone number to dial (E.164 format) - - - - Caller ID to use (E.164 format) - - - - URL to the SWML that handles the outbound call - - - - Device type, typically "phone" (default: "phone") - - -#### Returns - -`FunctionResult` — self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 1340. - -*** - -### say - -Make the agent speak specific text. - -#### Signature - -```python -say(text: str) -> FunctionResult -``` - -#### Parameters - - - Text for agent to speak - - -#### Returns - -`FunctionResult` — self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 488. - -*** - -### send\_sms - -Send a text message to a PSTN phone number using SWML. - -This is a virtual helper that generates SWML to send SMS messages. -Either body or media (or both) must be provided. - -#### Signature - -```python -send_sms( - to_number: str, - from_number: str, - body: Optional[str] = None, - media: Optional[List[str]] = None, - tags: Optional[List[str]] = None, - region: Optional[str] = None -) -> FunctionResult -``` - -#### Parameters - - - Phone number in E.164 format to send to - - - - Phone number in E.164 format to send from - - - - Body text of the message (optional if media provided) - - - - Array of URLs to send in the message (optional if body provided) - - - - Array of tags to associate with the message for UI searching - - - - Region to originate the message from - - -#### Returns - -`FunctionResult` — self for method chaining - -#### Throws - -- `ValueError` — If neither body nor media is provided - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 741. - -*** - -### set\_end\_of\_speech\_timeout - -Adjust end of speech timeout - milliseconds of silence after speaking -has been detected to finalize speech recognition. - -#### Signature - -```python -set_end_of_speech_timeout(milliseconds: int) -> FunctionResult -``` - -#### Parameters - - - Timeout in milliseconds - - -#### Returns - -`FunctionResult` — self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 566. - -*** - -### set\_metadata - -Set metadata scoped to current function's meta\_data\_token. - -#### Signature - -```python -set_metadata(data: Dict[str, Any]) -> FunctionResult -``` - -#### Parameters - - - Dictionary of key-value pairs for metadata - - -#### Returns - -`FunctionResult` — self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 604. - -*** - -### set\_post\_process - -Set whether to enable post-processing for this result. - -Post-processing allows the AI to take one more turn with the user -before executing any actions. This is useful for confirmation workflows. - -#### Signature - -```python -set_post_process(post_process: bool) -> FunctionResult -``` - -#### Parameters - - - True to let AI respond once more before executing actions, False to execute actions immediately after the response. - - -#### Returns - -`FunctionResult` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 97. - -*** - -### set\_response - -Set the natural language response text - -#### Signature - -```python -set_response(response: str) -> FunctionResult -``` - -#### Parameters - - - The text the AI should say - - -#### Returns - -`FunctionResult` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 84. - -*** - -### set\_speech\_event\_timeout - -Adjust speech event timeout - milliseconds since last speech detection -event to finalize recognition. Works better in noisy environments. - -#### Signature - -```python -set_speech_event_timeout(milliseconds: int) -> FunctionResult -``` - -#### Parameters - - - Timeout in milliseconds - - -#### Returns - -`FunctionResult` — self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 579. - -*** - -### simulate\_user\_input - -Queue simulated user input. - -#### Signature - -```python -simulate_user_input(text: str) -> FunctionResult -``` - -#### Parameters - - - Text to simulate as user input - - -#### Returns - -`FunctionResult` — self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 729. - -*** - -### sip\_refer - -Send SIP REFER to a SIP call using SWML. - -This is a virtual helper that generates SWML to send a SIP REFER -message, which is used for call transfer in SIP environments. - -#### Signature - -```python -sip_refer(to_uri: str) -> FunctionResult -``` - -#### Parameters - - - The SIP URI to send the REFER to (required) - - -#### Returns - -`FunctionResult` — self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 1020. - -*** - -### stop - -Stop the agent execution. - -#### Signature - -```python -stop() -> FunctionResult -``` - -#### Returns - -`FunctionResult` — self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 479. - -*** - -### stop\_background\_file - -Stop currently playing background file. - -#### Signature - -```python -stop_background_file() -> FunctionResult -``` - -#### Returns - -`FunctionResult` — self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 516. - -*** - -### stop\_record\_call - -Stop an active background call recording using SWML. - -This is a virtual helper that generates SWML to stop a recording that -was started with record\_call(). - -#### Signature - -```python -stop_record_call(control_id: Optional[str] = None) -> FunctionResult -``` - -#### Parameters - - - Identifier for the recording to stop. If not provided, the most recent recording will be stopped. - - -#### Returns - -`FunctionResult` — self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 959. - -*** - -### stop\_tap - -Stop an active tap stream using SWML. - -This is a virtual helper that generates SWML to stop a tap stream -that was started with tap(). - -#### Signature - -```python -stop_tap(control_id: Optional[str] = None) -> FunctionResult -``` - -#### Parameters - - - ID of the tap to stop (optional) If not set, the last tap started will be stopped - - -#### Returns - -`FunctionResult` — self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 1256. - -*** - -### switch\_context - -Change agent context/prompt during conversation. - -#### Signature - -```python -switch_context( - system_prompt: Optional[str] = None, - user_prompt: Optional[str] = None, - consolidate: bool = False, - full_reset: bool = False -) -> FunctionResult -``` - -#### Parameters - - - New system prompt - - - - User message to add - - - - Whether to summarize existing conversation - - - - Whether to do complete context reset - - -#### Returns - -`FunctionResult` — self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 699. - -*** - -### swml\_change\_context - -Force the conversation into a different context. - -Webhook-triggered context changes bypass any `valid_contexts` clamp. -Step state resets (cur\_step = 0) on entry. The new context's first -step's instructions are injected on the next turn. - -#### Communicating intent to the destination context - -Same pattern as swml\_change\_step: the model reads your FunctionResult's -`response` text as the tool result before it sees the destination -context's first step. Put your reason there: - -``` -FunctionResult( - "I'm transferring you to billing because your question is " - "about an invoice charge." -).swml_change_context("billing") -``` - -For structured carry-over, use update\_global\_data() and reference the -values via $\{var\} expansion in the destination context's step text. - -Note that conversation history is preserved across context switches -unless the destination context is marked `isolated=True`. The model -retains everything the user said in the previous context — you do -not need to re-state it. - -> \[!NOTE] -> result = ( -> FunctionResult("Transferring you to technical support.") -> .update\_global\_data(\{"original\_issue": user\_problem\}) -> .swml\_change\_context("technical\_support") -> ) - -#### Signature - -```python -swml_change_context(context_name: str) -> FunctionResult -``` - -#### Parameters - - - Name of the context to switch to. Must exist in the agent's context map. - - -#### Returns - -`FunctionResult` — Self for method chaining. - -#### Examples - -```python -FunctionResult( - "I'm transferring you to billing because your question is " - "about an invoice charge." -).swml_change_context("billing") -``` - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 353. - -*** - -### swml\_change\_step - -Force the conversation into a specific step in the current context. - -This is a workflow-level transition driven by your webhook, not by the -model. Webhook-triggered step changes bypass any `valid_steps` clamp -on the current step (the model's `next_step` tool is the constrained -path; this is the unconstrained one). Use it when something the user -said unambiguously requires moving the flow forward. - -#### Communicating intent to the destination step - -When the model arrives at the new step, the next thing it sees in -history is the tool result that contained this action — i.e., your -FunctionResult's `response` text. Put your "why" there. The model -reads it before the new step's injected instructions: - -``` -FunctionResult( - "Premium plan confirmed. Now collecting payment details." -).swml_change_step("collect_payment") -``` - -For structured data the destination step needs (account number, -plan tier, etc.), pair this with `update_global_data()` and reference -the values from the destination step's `text` via $\{var\} expansion: - -``` -(FunctionResult("Premium plan confirmed.") - .update_global_data({"plan": "premium", "billing_cycle": "annual"}) - .swml_change_step("collect_payment")) -``` - -And in the destination step's text: - -``` -step.set_text( - "Collect payment for the ${plan} plan, billed ${billing_cycle}. " - "Confirm the amount with the user before proceeding." -) -``` - -> \[!NOTE] -> result = ( -> FunctionResult("Starting a new hand") -> .update\_global\_data(\{"chips": 1000\}) -> .swml\_change\_step("betting") -> ) - -#### Signature - -```python -swml_change_step(step_name: str) -> FunctionResult -``` - -#### Parameters - - - Name of the step to transition to. The step must exist in the current context. - - -#### Returns - -`FunctionResult` — Self for method chaining. - -#### Examples - - - - ```python - FunctionResult( - "Premium plan confirmed. Now collecting payment details." - ).swml_change_step("collect_payment") - ``` - - - - ```python - (FunctionResult("Premium plan confirmed.") - .update_global_data({"plan": "premium", "billing_cycle": "annual"}) - .swml_change_step("collect_payment")) - ``` - - - - ```python - step.set_text( - "Collect payment for the ${plan} plan, billed ${billing_cycle}. " - "Confirm the amount with the user before proceeding." - ) - ``` - - - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 301. - -*** - -### swml\_transfer - -Add a SWML transfer action with AI response setup for when transfer completes. - -This is a virtual helper that generates SWML to transfer the call to another -destination and sets up an AI response for when the transfer completes and -control returns to the agent. - -For transfers, you typically want to enable post-processing so the AI speaks -the response first before executing the transfer. - -> \[!NOTE] -> -> ### Permanent transfer (default) -> -> result = ( -> FunctionResult("I'm transferring you to support", post\_process=True) -> .swml\_transfer( -> "https://support.example.com/swml", -> "Goodbye!" # Won't be used since final=True by default -> ) -> ) -> -> ### Temporary transfer with return -> -> result.swml\_transfer( -> dest, -> "The support call is complete. How else can I help?", -> final=False -> ) - -#### Signature - -```python -swml_transfer(dest: str, ai_response: str, final: bool = True) -> FunctionResult -``` - -#### Parameters - - - Destination URL for the transfer (SWML endpoint, SIP address, etc.) - - - - Message the AI should say when transfer completes and control returns - - - - Whether this is a permanent transfer (True) or temporary (False). Defaults to True for permanent transfers (same as connect method). - - -#### Returns - -`FunctionResult` — Self for method chaining - -#### Examples - -```python -# Temporary transfer with return -result.swml_transfer( - dest, - "The support call is complete. How else can I help?", - final=False -) -``` - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 191. - -*** - -### swml\_user\_event - -Send a user event through SWML to update the client UI. - -This is a convenience method for sending user events to connected clients, -commonly used for real-time UI updates in interactive applications. - -> \[!NOTE] -> result = ( -> FunctionResult("You have blackjack!") -> .swml\_user\_event(\{ -> "type": "cards\_dealt", -> "player\_hand": player\_cards, -> "dealer\_hand": dealer\_cards, -> "player\_score": 21 -> \}) -> ) - -#### Signature - -```python -swml_user_event(event_data: Dict[str, Any]) -> FunctionResult -``` - -#### Parameters - - - Dictionary containing the event type and any associated data Example: \{"type": "cards\_dealt", "player\_hand": \[...], "score": 21\} - - -#### Returns - -`FunctionResult` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 263. - -*** - -### tap - -Start background call tap using SWML. - -This is a virtual helper that generates SWML to start background call tapping. -Media is streamed over Websocket or RTP to customer controlled URI. - -#### Signature - -```python -tap( - uri: str, - control_id: Optional[str] = None, - direction: Literal['speak', 'hear', 'both'] = 'both', - codec: Literal['PCMU', 'PCMA'] = 'PCMU', - rtp_ptime: int = 20, - status_url: Optional[str] = None -) -> FunctionResult -``` - -#### Parameters - - - Destination of tap media stream (required) Formats: rtp://IP:port, ws://example.com, or wss://example.com - - - - Identifier for this tap to use with stop\_tap (optional) Default is generated and stored in tap\_control\_id variable - - - - Direction of audio to tap (default: "both") "speak" = what party says "hear" = what party hears\ - "both" = what party hears and says - - - - Codec for tap media stream - "PCMU" or "PCMA" (default: "PCMU") - - - - Packetization time in milliseconds for RTP (default: 20) - - - - URL for status change requests (optional) - - -#### Returns - -`FunctionResult` — self for method chaining - -#### Throws - -- `ValueError` — If direction or codec values are invalid - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 1186. - -*** - -### to\_dict - -Convert to the JSON structure expected by SWAIG - -The result must have at least one of: - -- 'response': Text to be spoken by the AI -- 'action': Array of action objects - -Optional: - -- 'post\_process': Boolean controlling when actions execute - -#### Signature - -```python -to_dict() -> Dict[str, Any] -``` - -#### Returns - -`Dict[str, Any]` — Dictionary in SWAIG function response format - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 1506. - -*** - -### toggle\_functions - -Enable/disable specific SWAIG functions. - -#### Signature - -```python -toggle_functions(function_toggles: List[Dict[str, Any]]) -> FunctionResult -``` - -#### Parameters - - - List of dicts with 'function' and 'active' keys - - -#### Returns - -`FunctionResult` — self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 628. - -*** - -### update\_global\_data - -Update global agent data variables. - -This is a convenience method that abstracts the set\_global\_data action. -Global data persists across the entire agent session and is available -in prompt variables and can be accessed by all functions. - -#### Signature - -```python -update_global_data(data: Dict[str, Any]) -> FunctionResult -``` - -#### Parameters - - - Dictionary of key-value pairs to set/update in global data - - -#### Returns - -`FunctionResult` — self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 247. - -*** - -### update\_settings - -Update agent runtime settings. - -Supported settings: - -- frequency-penalty: Float (-2.0 to 2.0) -- presence-penalty: Float (-2.0 to 2.0) -- max-tokens: Integer (0 to 4096) -- top-p: Float (0.0 to 1.0) -- confidence: Float (0.0 to 1.0) -- barge-confidence: Float (0.0 to 1.0) -- temperature: Float (0.0 to 2.0, clamped to 1.5) - -#### Signature - -```python -update_settings(settings: Dict[str, Any]) -> FunctionResult -``` - -#### Parameters - - - Dictionary of settings to update - - -#### Returns - -`FunctionResult` — self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 678. - -*** - -### wait\_for\_user - -Control how agent waits for user input. - -#### Signature - -```python -wait_for_user( - enabled: Optional[bool] = None, - timeout: Optional[int] = None, - answer_first: bool = False -) -> FunctionResult -``` - -#### Parameters - - - Boolean to enable/disable waiting - - - - Number of seconds to wait - - - - Special "answer\_first" mode - - -#### Returns - -`FunctionResult` — self for method chaining - -#### Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 456. - -## Source - -[`signalwire/signalwire/core/function_result.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/function_result.py) - -Line 17. diff --git a/fern/products/sdk-reference/python/agents/gateway-service/index.mdx b/fern/products/sdk-reference/python/agents/gateway-service/index.mdx deleted file mode 100644 index 887a09d763..0000000000 --- a/fern/products/sdk-reference/python/agents/gateway-service/index.mdx +++ /dev/null @@ -1,22 +0,0 @@ ---- -slug: "/reference/python/agents/gateway-service" -title: "gateway_service" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "agents.gateway_service" - parent: "agents" - module: "agents" ---- -# `gateway_service` - -## Classes - - - - Main gateway service class - - diff --git a/fern/products/sdk-reference/python/agents/gateway-service/mcp-gateway/index.mdx b/fern/products/sdk-reference/python/agents/gateway-service/mcp-gateway/index.mdx deleted file mode 100644 index 721425d97a..0000000000 --- a/fern/products/sdk-reference/python/agents/gateway-service/mcp-gateway/index.mdx +++ /dev/null @@ -1,105 +0,0 @@ ---- -slug: "/reference/python/agents/gateway-service/mcp-gateway" -title: "MCPGateway" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.mcp_gateway.gateway_service.MCPGateway" - parent: "agents.gateway_service" - module: "agents.gateway_service" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/gateway_service.py" ---- -# `MCPGateway` - -Main gateway service class - -## Signature - -```python -class MCPGateway -``` - -## Properties - - - - - - - - - - - - - - - - - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(config_path: str = 'config.json') -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/mcp_gateway/gateway_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/gateway_service.py) - -Line 55. - -*** - -### run - -Run the gateway service - -#### Signature - -```python -run() -``` - -#### Source - -[`signalwire/signalwire/mcp_gateway/gateway_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/gateway_service.py) - -Line 478. - -*** - -### shutdown - -Shutdown the gateway service - -#### Signature - -```python -shutdown() -``` - -#### Source - -[`signalwire/signalwire/mcp_gateway/gateway_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/gateway_service.py) - -Line 520. - -## Source - -[`signalwire/signalwire/mcp_gateway/gateway_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/gateway_service.py) - -Line 52. diff --git a/fern/products/sdk-reference/python/agents/index.mdx b/fern/products/sdk-reference/python/agents/index.mdx index 13252eae42..dc5202b704 100644 --- a/fern/products/sdk-reference/python/agents/index.mdx +++ b/fern/products/sdk-reference/python/agents/index.mdx @@ -14,47 +14,47 @@ lustri: ## Classes - + Base class for all SignalWire AI Agents. - + Server for hosting multiple SignalWire AI Agents under a single FastAPI application. - + Builder class for creating SWAIG data\_map configurations. - + Wrapper around SWAIG function responses that handles proper formatting of response text and actions. - + Builder class for creating structured prompts using the Prompt Object Model. - + Abstract base class for all agent skills - + Manages loading and lifecycle of agent skills - + Represents a SWAIG function — i.e., a tool the AI model can call. - + Fluent builder for SWML documents - + Renders SWML documents for SignalWire AI Agents with AI and SWAIG components - + Base class for creating and serving SWML documents. @@ -66,14 +66,6 @@ lustri: Copyright (c) 2025 SignalWire - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - Copyright (c) 2025 SignalWire @@ -84,16 +76,6 @@ lustri: Copyright (c) 2025 SignalWire - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire @@ -112,10 +94,6 @@ lustri: - - Copyright (c) 2025 SignalWire - - Copyright (c) 2025 SignalWire @@ -124,38 +102,14 @@ lustri: Copyright (c) 2025 SignalWire - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - Copyright (c) 2025 SignalWire - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - Copyright (c) 2025 SignalWire - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - Copyright (c) 2025 SignalWire diff --git a/fern/products/sdk-reference/python/agents/mcp-gateway/gateway-service/index.mdx b/fern/products/sdk-reference/python/agents/mcp-gateway/gateway-service/index.mdx index 64bdb887b3..bbd2d6bd2d 100644 --- a/fern/products/sdk-reference/python/agents/mcp-gateway/gateway-service/index.mdx +++ b/fern/products/sdk-reference/python/agents/mcp-gateway/gateway-service/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.mcp_gateway.gateway_service" parent: "signalwire.mcp_gateway" @@ -14,23 +14,92 @@ lustri: --- # `gateway_service` -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. +Main gateway service class ## Signature ```python -module gateway_service +class MCPGateway ``` ## Properties + + + + + + + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(config_path: str = 'config.json') +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/mcp_gateway/gateway_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/gateway_service.py) + +Line 55. + +*** + +### run + +Run the gateway service + +#### Signature + +```python +run() +``` + +#### Source + +[`signalwire/signalwire/mcp_gateway/gateway_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/gateway_service.py) + +Line 478. + +*** + +### shutdown + +Shutdown the gateway service + +#### Signature + +```python +shutdown() +``` + +#### Source + +[`signalwire/signalwire/mcp_gateway/gateway_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/gateway_service.py) + +Line 520. + ## Functions ### main @@ -52,3 +121,5 @@ Line 557. ## Source [`signalwire/signalwire/mcp_gateway/gateway_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/gateway_service.py) + +Line 52. diff --git a/fern/products/sdk-reference/python/agents/gateway-service/mcp-gateway/set-security-headers.mdx b/fern/products/sdk-reference/python/agents/mcp-gateway/gateway-service/set-security-headers.mdx similarity index 88% rename from fern/products/sdk-reference/python/agents/gateway-service/mcp-gateway/set-security-headers.mdx rename to fern/products/sdk-reference/python/agents/mcp-gateway/gateway-service/set-security-headers.mdx index b96aea9031..3c55311075 100644 --- a/fern/products/sdk-reference/python/agents/gateway-service/mcp-gateway/set-security-headers.mdx +++ b/fern/products/sdk-reference/python/agents/mcp-gateway/gateway-service/set-security-headers.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/python/agents/gateway-service/mcp-gateway/set-security-headers" +slug: "/reference/python/agents/mcp-gateway/gateway-service/set-security-headers" title: "set_security_headers" sdk_label: "Python SDK" icon: "python" @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.mcp_gateway.gateway_service.MCPGateway.__init__.set_security_headers" parent: "signalwire.mcp_gateway.gateway_service.MCPGateway.__init__" - module: "agents.gateway_service.MCPGateway" + module: "agents.mcp_gateway.gateway_service" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/mcp_gateway/gateway_service.py" --- # `set_security_headers` diff --git a/fern/products/sdk-reference/python/agents/mcp-gateway/index.mdx b/fern/products/sdk-reference/python/agents/mcp-gateway/index.mdx index cd76b310d7..0617d8dcb2 100644 --- a/fern/products/sdk-reference/python/agents/mcp-gateway/index.mdx +++ b/fern/products/sdk-reference/python/agents/mcp-gateway/index.mdx @@ -31,13 +31,17 @@ module mcp_gateway -## Modules +## Classes - Copyright (c) 2025 SignalWire + Main gateway service class + +## Modules + + Copyright (c) 2025 SignalWire diff --git a/fern/products/sdk-reference/python/agents/mixins/ai-config-mixin/ai-config-mixin/index.mdx b/fern/products/sdk-reference/python/agents/mixins/ai-config-mixin/ai-config-mixin/index.mdx deleted file mode 100644 index 152b64bea0..0000000000 --- a/fern/products/sdk-reference/python/agents/mixins/ai-config-mixin/ai-config-mixin/index.mdx +++ /dev/null @@ -1,963 +0,0 @@ ---- -slug: "/reference/python/agents/mixins/ai-config-mixin/ai-config-mixin" -title: "AIConfigMixin" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.core.mixins.ai_config_mixin.AIConfigMixin" - parent: "signalwire.core.mixins.ai_config_mixin" - module: "agents.mixins.ai_config_mixin" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py" ---- -# `AIConfigMixin` - -Mixin class containing all AI configuration methods for AgentBase - -## Signature - -```python -class AIConfigMixin -``` - -## Properties - - - -## Methods - -### add\_function\_include - -Add a remote function include to the SWAIG configuration - -#### Signature - -```python -add_function_include( - url: str, - functions: List[str], - meta_data: Optional[Dict[str, Any]] = None -) -> AgentBase -``` - -#### Parameters - - - URL to fetch remote functions from - - - - List of function names to include - - - - Optional metadata to include with the function include - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) - -Line 502. - -*** - -### add\_hint - -Add a simple string hint to help the AI agent understand certain words better - -#### Signature - -```python -add_hint(hint: str) -> AgentBase -``` - -#### Parameters - - - The hint string to add - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) - -Line 19. - -*** - -### add\_hints - -Add multiple string hints - -#### Signature - -```python -add_hints(hints: List[str]) -> AgentBase -``` - -#### Parameters - - - List of hint strings - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) - -Line 33. - -*** - -### add\_internal\_filler - -Add internal fillers for a single internal function and language. - -See set\_internal\_fillers() for the complete list of supported -function\_name values and an explanation of what fillers do. - -> \[!NOTE] -> agent.add\_internal\_filler( -> "change\_context", "en-US", -> \["Let me switch over to that...", "One moment..."] -> ) - -#### Signature - -```python -add_internal_filler( - function_name: str, - language_code: str, - fillers: List[str] -) -> AgentBase -``` - -#### Parameters - - - One of the supported internal function names (see SUPPORTED\_INTERNAL\_FILLER\_NAMES). Common values: 'next\_step', 'change\_context', 'check\_time', 'wait\_for\_user', 'hangup'. Names outside the supported set log a warning and are ignored by the runtime. - - - - Language code (e.g. 'en-US', 'es', 'fr'). - - - - List of filler phrases for this function and language. - - -#### Returns - -`AgentBase` — Self for method chaining. - -#### Source - -[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) - -Line 425. - -*** - -### add\_language - -Add a language configuration to support multilingual conversations - -### Simple voice name - -agent.add\_language("English", "en-US", "en-US-Neural2-F") - -### Explicit parameters - -agent.add\_language("English", "en-US", "josh", engine="elevenlabs", model="eleven\_turbo\_v2\_5") - -### Combined format - -agent.add\_language("English", "en-US", "elevenlabs.josh:eleven\_turbo\_v2\_5") - -### Per-language params (engine-specific knobs) - -agent.add\_language("English", "en-US", "josh", -engine="elevenlabs", -params=\{"stability": 0.5, "similarity\_boost": 0.75\}) - -#### Signature - -```python -add_language( - name: str, - code: str, - voice: str, - speech_fillers: Optional[List[str]] = None, - function_fillers: Optional[List[str]] = None, - engine: Optional[str] = None, - model: Optional[str] = None, - params: Optional[Dict[str, Any]] = None -) -> AgentBase -``` - -#### Parameters - - - Name of the language (e.g., "English", "French") - - - - Language code (e.g., "en-US", "fr-FR") - - - - TTS voice to use. Can be a simple name (e.g., "en-US-Neural2-F") or a combined format "engine.voice:model" (e.g., "elevenlabs.josh:eleven\_turbo\_v2\_5") - - - - Optional list of filler phrases for natural speech - - - - Optional list of filler phrases during function calls - - - - Optional explicit engine name (e.g., "elevenlabs", "rime") - - - - Optional explicit model name (e.g., "eleven\_turbo\_v2\_5", "arcana") - - - - Optional per-language params dict (engine-specific tuning, voice settings, etc.). Emitted as the language object's `params` key in SWML. - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Examples - -```python -# Explicit parameters -agent.add_language("English", "en-US", "josh", engine="elevenlabs", model="eleven_turbo_v2_5") - -# Combined format -agent.add_language("English", "en-US", "elevenlabs.josh:eleven_turbo_v2_5") - -# Per-language params (engine-specific knobs) -agent.add_language("English", "en-US", "josh", - engine="elevenlabs", - params={"stability": 0.5, "similarity_boost": 0.75}) -``` - -#### Source - -[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) - -Line 75. - -*** - -### add\_mcp\_server - -Add an external MCP server for tool discovery and invocation. - -Tools are discovered via the MCP protocol at session start and -registered as SWAIG functions. Resources are optionally fetched -into global\_data. - -#### Signature - -```python -add_mcp_server( - url: str, - headers: Optional[Dict[str, str]] = None, - resources: bool = False, - resource_vars: Optional[Dict[str, str]] = None -) -> AgentBase -``` - -#### Parameters - - - MCP server HTTP endpoint URL - - - - Optional HTTP headers (e.g. \{"Authorization": "Bearer sk-xxx"\}) - - - - Whether to fetch resources into global\_data - - - - Variables for URI template substitution (e.g. \{"caller\_id": "$\{caller\_id\_number\}"\}) - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) - -Line 546. - -*** - -### add\_pattern\_hint - -Add a complex hint with pattern matching - -#### Signature - -```python -add_pattern_hint( - hint: str, - pattern: str, - replace: str, - ignore_case: bool = False -) -> AgentBase -``` - -#### Parameters - - - The hint to match - - - - Regular expression pattern - - - - Text to replace the hint with - - - - Whether to ignore case when matching - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) - -Line 49. - -*** - -### add\_pronunciation - -Add a pronunciation rule to help the AI speak certain words correctly - -#### Signature - -```python -add_pronunciation( - replace: str, - with_text: str, - ignore_case: bool = False -) -> AgentBase -``` - -#### Parameters - - - The expression to replace - - - - The phonetic spelling to use instead - - - - Whether to ignore case when matching - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) - -Line 217. - -*** - -### enable\_debug\_events - -Enable debug event webhook for this agent. - -When enabled, the AI module will POST real-time debug events to a -/debug\_events endpoint on this agent during calls. Events are -automatically logged via the agent's structured logger, and can -optionally be handled with a custom callback via on\_debug\_event(). - -> \[!NOTE] -> agent = AgentBase("my\_agent") -> agent.enable\_debug\_events(level=1) -> -> @agent.on\_debug\_event -> def handle\_debug(event\_type, data): -> if event\_type == "llm\_error": -> alert\_ops\_team(data) - -#### Signature - -```python -enable_debug_events(level: int = 1) -> AgentBase -``` - -#### Parameters - - - Debug event verbosity level. 1 = high-level events (barge, errors, session start/end, step changes) 2+ = adds high-volume events (every LLM request/response, conversation\_add) - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Examples - -```python -@agent.on_debug_event -def handle_debug(event_type, data): - if event_type == "llm_error": - alert_ops_team(data) -``` - -#### Source - -[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) - -Line 472. - -*** - -### enable\_mcp\_server - -Expose this agent's @tool functions as an MCP server endpoint. - -Adds a /mcp route that speaks JSON-RPC 2.0 (MCP protocol). -Other MCP clients (Claude Desktop, other agents, etc.) can -connect and use the same tools. The agent's SWML output also -references this endpoint for native MCP tool discovery. - -#### Signature - -```python -enable_mcp_server() -> AgentBase -``` - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) - -Line 574. - -*** - -### get\_language\_params - -Read the per-language `params` dict for a previously-added language. - -#### Signature - -```python -get_language_params(code: str) -> Optional[Dict[str, Any]] -``` - -#### Parameters - - - Language code as previously passed to `add_language`. - - -#### Returns - -`Optional[Dict[str, Any]]` — The params dict if set, `None` otherwise (including when the code is unknown). - -#### Source - -[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) - -Line 188. - -*** - -### set\_function\_includes - -Set the complete list of function includes - -#### Signature - -```python -set_function_includes(includes: List[Dict[str, Any]]) -> AgentBase -``` - -#### Parameters - - - List of include objects, each with url and functions properties - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) - -Line 525. - -*** - -### set\_global\_data - -Merge data into the global data available to the AI throughout the conversation. - -This merges (not replaces) so that skills and other callers can each -contribute keys without clobbering each other. - -#### Signature - -```python -set_global_data(data: Dict[str, Any]) -> AgentBase -``` - -#### Parameters - - - Dictionary of global data to merge - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) - -Line 286. - -*** - -### set\_internal\_fillers - -Set internal fillers for native SWAIG functions. - -Internal fillers are short phrases the AI agent speaks (via TTS) while -an internal/native function is running, so the caller doesn't hear -dead air during transitions or background work. - -Supported function names (matches the SWAIGInternalFiller schema): - -``` -hangup — when the agent is hanging up -check_time — when checking the time -wait_for_user — when waiting for user input -wait_seconds — during deliberate pauses -adjust_response_latency — when adjusting response timing -next_step — transitioning between steps in prompt.contexts -change_context — switching between contexts in prompt.contexts -get_visual_input — processing visual input (enable_vision=True) -get_ideal_strategy — thinking (enable_thinking=True) -``` - -Notably NOT supported: change\_step, gather\_submit, or arbitrary -user-defined SWAIG function names. The runtime only honors fillers -for the names listed above; everything else is silently ignored at -the SWML level. This method warns at registration time if you pass -an unknown name so you catch the typo early. - -Without internal fillers, callers hear dead air during context -switches and other internal transitions — set this on every agent -that uses contexts/steps with audio. - -> \[!NOTE] -> agent.set\_internal\_fillers(\{ -> "next\_step": \{ -> "en-US": \["Moving to the next step...", "Great, let's continue..."], -> "es": \["Pasando al siguiente paso...", "Excelente, continuemos..."] -> \}, -> "change\_context": \{ -> "en-US": \["Let me switch modes...", "One moment..."] -> \}, -> "check\_time": \{ -> "en-US": \["Let me check the time...", "Getting the current time..."] -> \} -> \}) - -#### Signature - -```python -set_internal_fillers( - internal_fillers: Dict[str, Dict[str, List[str]]] -) -> AgentBase -``` - -#### Parameters - - - Dictionary mapping function names to language-specific filler phrases. Format: \{"function\_name": \{"language\_code": \["phrase1", "phrase2"]\}\} - - -#### Returns - -`AgentBase` — Self for method chaining. - -#### Examples - -```python -hangup — when the agent is hanging up -check_time — when checking the time -wait_for_user — when waiting for user input -wait_seconds — during deliberate pauses -adjust_response_latency — when adjusting response timing -next_step — transitioning between steps in prompt.contexts -change_context — switching between contexts in prompt.contexts -get_visual_input — processing visual input (enable_vision=True) -get_ideal_strategy — thinking (enable_thinking=True) -``` - -#### Source - -[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) - -Line 353. - -*** - -### set\_language\_params - -Set (or replace) the per-language `params` dict on an already-added -language. Useful when language entries are built up via add\_language() -first and engine-specific tuning is added later (e.g., from a config -loader). Returns self for chaining. - -#### Signature - -```python -set_language_params(code: str, params: Dict[str, Any]) -> AgentBase -``` - -#### Parameters - - - Language code as previously passed to `add_language` (e.g. `"en-US"`). - - - - Engine-specific params dict to attach. Empty dict removes the key. - - -#### Returns - -`AgentBase` — Self for method chaining. No-op if the code isn't found. - -#### Source - -[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) - -Line 165. - -*** - -### set\_languages - -Set all language configurations at once - -#### Signature - -```python -set_languages(languages: List[Dict[str, Any]]) -> AgentBase -``` - -#### Parameters - - - List of language configuration dictionaries - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) - -Line 203. - -*** - -### set\_native\_functions - -Set the list of native functions to enable - -#### Signature - -```python -set_native_functions(function_names: List[str]) -> AgentBase -``` - -#### Parameters - - - List of native function names - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) - -Line 323. - -*** - -### set\_param - -Set a single AI parameter - -#### Signature - -```python -set_param(key: str, value: Any) -> AgentBase -``` - -#### Parameters - - - Parameter name - - - - Parameter value - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) - -Line 257. - -*** - -### set\_params - -Set multiple AI parameters at once - -#### Signature - -```python -set_params(params: Dict[str, Any]) -> AgentBase -``` - -#### Parameters - - - Dictionary of parameter name/value pairs - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) - -Line 272. - -*** - -### set\_post\_prompt\_llm\_params - -Set LLM parameters for the post-prompt. - -Accepts any parameters which will be passed through to the SignalWire server. -The server will validate and apply parameters based on the target model's capabilities. - -> \[!NOTE] -> model: The AI model to use (gpt-4o-mini, gpt-4.1-mini, gpt-4.1-nano, nova-micro, nova-lite, qwen3-235b-A22b-instruct) -> temperature: Randomness setting. Lower values make output more deterministic. -> top\_p: Alternative to temperature. Controls nucleus sampling. -> presence\_penalty: Topic diversity. Positive values encourage new topics. -> frequency\_penalty: Repetition control. Positive values reduce repetition. - -Note: Parameters are model-specific and will be validated by the server. -Invalid parameters for the selected model will be handled/ignored by the server. -barge\_confidence is not applicable to post-prompt. - -> \[!NOTE] -> agent.set\_post\_prompt\_llm\_params( -> model="gpt-4o-mini", -> temperature=0.5, # More deterministic for post-prompt -> top\_p=0.9 -> ) - -#### Signature - -```python -set_post_prompt_llm_params(**params = {}) -> AgentBase -``` - -#### Parameters - - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) - -Line 624. - -*** - -### set\_prompt\_llm\_params - -Set LLM parameters for the main prompt. - -Accepts any parameters which will be passed through to the SignalWire server. -The server will validate and apply parameters based on the target model's capabilities. - -> \[!NOTE] -> model: The AI model to use (gpt-4o-mini, gpt-4.1-mini, gpt-4.1-nano, nova-micro, nova-lite, qwen3-235b-A22b-instruct) -> temperature: Randomness setting. Lower values make output more deterministic. -> top\_p: Alternative to temperature. Controls nucleus sampling. -> barge\_confidence: ASR confidence to interrupt. Higher values make it harder to interrupt. -> presence\_penalty: Topic diversity. Positive values encourage new topics. -> frequency\_penalty: Repetition control. Positive values reduce repetition. - -Note: Parameters are model-specific and will be validated by the server. -Invalid parameters for the selected model will be handled/ignored by the server. - -> \[!NOTE] -> agent.set\_prompt\_llm\_params( -> model="nova-micro", # Using Amazon's nova-micro model -> temperature=0.7, -> top\_p=0.9, -> barge\_confidence=0.6 -> ) - -#### Signature - -```python -set_prompt_llm_params(**params = {}) -> AgentBase -``` - -#### Parameters - - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) - -Line 589. - -*** - -### set\_pronunciations - -Set all pronunciation rules at once - -#### Signature - -```python -set_pronunciations(pronunciations: List[Dict[str, Any]]) -> AgentBase -``` - -#### Parameters - - - List of pronunciation rule dictionaries - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) - -Line 243. - -*** - -### update\_global\_data - -Update the global data with new values - -#### Signature - -```python -update_global_data(data: Dict[str, Any]) -> AgentBase -``` - -#### Parameters - - - Dictionary of global data to update - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) - -Line 306. - -## Source - -[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) - -Line 14. diff --git a/fern/products/sdk-reference/python/agents/mixins/ai-config-mixin/index.mdx b/fern/products/sdk-reference/python/agents/mixins/ai-config-mixin/index.mdx index 7b4f021289..2984cc634f 100644 --- a/fern/products/sdk-reference/python/agents/mixins/ai-config-mixin/index.mdx +++ b/fern/products/sdk-reference/python/agents/mixins/ai-config-mixin/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.core.mixins.ai_config_mixin" parent: "signalwire.core.mixins" @@ -14,27 +14,950 @@ lustri: --- # `ai_config_mixin` -Copyright (c) 2025 SignalWire +Mixin class containing all AI configuration methods for AgentBase -This file is part of the SignalWire SDK. +## Signature -Licensed under the MIT License. -See LICENSE file in the project root for full license information. +```python +class AIConfigMixin +``` -## Signature +## Properties + + + +## Methods + +### add\_function\_include + +Add a remote function include to the SWAIG configuration + +#### Signature + +```python +add_function_include( + url: str, + functions: List[str], + meta_data: Optional[Dict[str, Any]] = None +) -> AgentBase +``` + +#### Parameters + + + URL to fetch remote functions from + + + + List of function names to include + + + + Optional metadata to include with the function include + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 502. + +*** + +### add\_hint + +Add a simple string hint to help the AI agent understand certain words better + +#### Signature + +```python +add_hint(hint: str) -> AgentBase +``` + +#### Parameters + + + The hint string to add + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 19. + +*** + +### add\_hints + +Add multiple string hints + +#### Signature + +```python +add_hints(hints: List[str]) -> AgentBase +``` + +#### Parameters + + + List of hint strings + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 33. + +*** + +### add\_internal\_filler + +Add internal fillers for a single internal function and language. + +See set\_internal\_fillers() for the complete list of supported +function\_name values and an explanation of what fillers do. + +> \[!NOTE] +> agent.add\_internal\_filler( +> "change\_context", "en-US", +> \["Let me switch over to that...", "One moment..."] +> ) + +#### Signature + +```python +add_internal_filler( + function_name: str, + language_code: str, + fillers: List[str] +) -> AgentBase +``` + +#### Parameters + + + One of the supported internal function names (see SUPPORTED\_INTERNAL\_FILLER\_NAMES). Common values: 'next\_step', 'change\_context', 'check\_time', 'wait\_for\_user', 'hangup'. Names outside the supported set log a warning and are ignored by the runtime. + + + + Language code (e.g. 'en-US', 'es', 'fr'). + + + + List of filler phrases for this function and language. + + +#### Returns + +`AgentBase` — Self for method chaining. + +#### Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 425. + +*** + +### add\_language + +Add a language configuration to support multilingual conversations + +### Simple voice name + +agent.add\_language("English", "en-US", "en-US-Neural2-F") + +### Explicit parameters + +agent.add\_language("English", "en-US", "josh", engine="elevenlabs", model="eleven\_turbo\_v2\_5") + +### Combined format + +agent.add\_language("English", "en-US", "elevenlabs.josh:eleven\_turbo\_v2\_5") + +### Per-language params (engine-specific knobs) + +agent.add\_language("English", "en-US", "josh", +engine="elevenlabs", +params=\{"stability": 0.5, "similarity\_boost": 0.75\}) + +#### Signature + +```python +add_language( + name: str, + code: str, + voice: str, + speech_fillers: Optional[List[str]] = None, + function_fillers: Optional[List[str]] = None, + engine: Optional[str] = None, + model: Optional[str] = None, + params: Optional[Dict[str, Any]] = None +) -> AgentBase +``` + +#### Parameters + + + Name of the language (e.g., "English", "French") + + + + Language code (e.g., "en-US", "fr-FR") + + + + TTS voice to use. Can be a simple name (e.g., "en-US-Neural2-F") or a combined format "engine.voice:model" (e.g., "elevenlabs.josh:eleven\_turbo\_v2\_5") + + + + Optional list of filler phrases for natural speech + + + + Optional list of filler phrases during function calls + + + + Optional explicit engine name (e.g., "elevenlabs", "rime") + + + + Optional explicit model name (e.g., "eleven\_turbo\_v2\_5", "arcana") + + + + Optional per-language params dict (engine-specific tuning, voice settings, etc.). Emitted as the language object's `params` key in SWML. + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Examples + +```python +# Explicit parameters +agent.add_language("English", "en-US", "josh", engine="elevenlabs", model="eleven_turbo_v2_5") + +# Combined format +agent.add_language("English", "en-US", "elevenlabs.josh:eleven_turbo_v2_5") + +# Per-language params (engine-specific knobs) +agent.add_language("English", "en-US", "josh", + engine="elevenlabs", + params={"stability": 0.5, "similarity_boost": 0.75}) +``` + +#### Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 75. + +*** + +### add\_mcp\_server + +Add an external MCP server for tool discovery and invocation. + +Tools are discovered via the MCP protocol at session start and +registered as SWAIG functions. Resources are optionally fetched +into global\_data. + +#### Signature + +```python +add_mcp_server( + url: str, + headers: Optional[Dict[str, str]] = None, + resources: bool = False, + resource_vars: Optional[Dict[str, str]] = None +) -> AgentBase +``` + +#### Parameters + + + MCP server HTTP endpoint URL + + + + Optional HTTP headers (e.g. \{"Authorization": "Bearer sk-xxx"\}) + + + + Whether to fetch resources into global\_data + + + + Variables for URI template substitution (e.g. \{"caller\_id": "$\{caller\_id\_number\}"\}) + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 546. + +*** + +### add\_pattern\_hint + +Add a complex hint with pattern matching + +#### Signature + +```python +add_pattern_hint( + hint: str, + pattern: str, + replace: str, + ignore_case: bool = False +) -> AgentBase +``` + +#### Parameters + + + The hint to match + + + + Regular expression pattern + + + + Text to replace the hint with + + + + Whether to ignore case when matching + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 49. + +*** + +### add\_pronunciation + +Add a pronunciation rule to help the AI speak certain words correctly + +#### Signature + +```python +add_pronunciation( + replace: str, + with_text: str, + ignore_case: bool = False +) -> AgentBase +``` + +#### Parameters + + + The expression to replace + + + + The phonetic spelling to use instead + + + + Whether to ignore case when matching + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 217. + +*** + +### enable\_debug\_events + +Enable debug event webhook for this agent. + +When enabled, the AI module will POST real-time debug events to a +/debug\_events endpoint on this agent during calls. Events are +automatically logged via the agent's structured logger, and can +optionally be handled with a custom callback via on\_debug\_event(). + +> \[!NOTE] +> agent = AgentBase("my\_agent") +> agent.enable\_debug\_events(level=1) +> +> @agent.on\_debug\_event +> def handle\_debug(event\_type, data): +> if event\_type == "llm\_error": +> alert\_ops\_team(data) + +#### Signature + +```python +enable_debug_events(level: int = 1) -> AgentBase +``` + +#### Parameters + + + Debug event verbosity level. 1 = high-level events (barge, errors, session start/end, step changes) 2+ = adds high-volume events (every LLM request/response, conversation\_add) + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Examples + +```python +@agent.on_debug_event +def handle_debug(event_type, data): + if event_type == "llm_error": + alert_ops_team(data) +``` + +#### Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 472. + +*** + +### enable\_mcp\_server + +Expose this agent's @tool functions as an MCP server endpoint. + +Adds a /mcp route that speaks JSON-RPC 2.0 (MCP protocol). +Other MCP clients (Claude Desktop, other agents, etc.) can +connect and use the same tools. The agent's SWML output also +references this endpoint for native MCP tool discovery. + +#### Signature + +```python +enable_mcp_server() -> AgentBase +``` + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 574. + +*** + +### get\_language\_params + +Read the per-language `params` dict for a previously-added language. + +#### Signature + +```python +get_language_params(code: str) -> Optional[Dict[str, Any]] +``` + +#### Parameters + + + Language code as previously passed to `add_language`. + + +#### Returns + +`Optional[Dict[str, Any]]` — The params dict if set, `None` otherwise (including when the code is unknown). + +#### Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 188. + +*** + +### set\_function\_includes + +Set the complete list of function includes + +#### Signature + +```python +set_function_includes(includes: List[Dict[str, Any]]) -> AgentBase +``` + +#### Parameters + + + List of include objects, each with url and functions properties + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 525. + +*** + +### set\_global\_data + +Merge data into the global data available to the AI throughout the conversation. + +This merges (not replaces) so that skills and other callers can each +contribute keys without clobbering each other. + +#### Signature ```python -module ai_config_mixin +set_global_data(data: Dict[str, Any]) -> AgentBase ``` -## Classes +#### Parameters + + + Dictionary of global data to merge + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 286. + +*** + +### set\_internal\_fillers + +Set internal fillers for native SWAIG functions. + +Internal fillers are short phrases the AI agent speaks (via TTS) while +an internal/native function is running, so the caller doesn't hear +dead air during transitions or background work. + +Supported function names (matches the SWAIGInternalFiller schema): + +``` +hangup — when the agent is hanging up +check_time — when checking the time +wait_for_user — when waiting for user input +wait_seconds — during deliberate pauses +adjust_response_latency — when adjusting response timing +next_step — transitioning between steps in prompt.contexts +change_context — switching between contexts in prompt.contexts +get_visual_input — processing visual input (enable_vision=True) +get_ideal_strategy — thinking (enable_thinking=True) +``` + +Notably NOT supported: change\_step, gather\_submit, or arbitrary +user-defined SWAIG function names. The runtime only honors fillers +for the names listed above; everything else is silently ignored at +the SWML level. This method warns at registration time if you pass +an unknown name so you catch the typo early. + +Without internal fillers, callers hear dead air during context +switches and other internal transitions — set this on every agent +that uses contexts/steps with audio. + +> \[!NOTE] +> agent.set\_internal\_fillers(\{ +> "next\_step": \{ +> "en-US": \["Moving to the next step...", "Great, let's continue..."], +> "es": \["Pasando al siguiente paso...", "Excelente, continuemos..."] +> \}, +> "change\_context": \{ +> "en-US": \["Let me switch modes...", "One moment..."] +> \}, +> "check\_time": \{ +> "en-US": \["Let me check the time...", "Getting the current time..."] +> \} +> \}) + +#### Signature + +```python +set_internal_fillers( + internal_fillers: Dict[str, Dict[str, List[str]]] +) -> AgentBase +``` + +#### Parameters + + + Dictionary mapping function names to language-specific filler phrases. Format: \{"function\_name": \{"language\_code": \["phrase1", "phrase2"]\}\} + + +#### Returns + +`AgentBase` — Self for method chaining. - - - Mixin class containing all AI configuration methods for AgentBase - - +#### Examples + +```python +hangup — when the agent is hanging up +check_time — when checking the time +wait_for_user — when waiting for user input +wait_seconds — during deliberate pauses +adjust_response_latency — when adjusting response timing +next_step — transitioning between steps in prompt.contexts +change_context — switching between contexts in prompt.contexts +get_visual_input — processing visual input (enable_vision=True) +get_ideal_strategy — thinking (enable_thinking=True) +``` + +#### Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 353. + +*** + +### set\_language\_params + +Set (or replace) the per-language `params` dict on an already-added +language. Useful when language entries are built up via add\_language() +first and engine-specific tuning is added later (e.g., from a config +loader). Returns self for chaining. + +#### Signature + +```python +set_language_params(code: str, params: Dict[str, Any]) -> AgentBase +``` + +#### Parameters + + + Language code as previously passed to `add_language` (e.g. `"en-US"`). + + + + Engine-specific params dict to attach. Empty dict removes the key. + + +#### Returns + +`AgentBase` — Self for method chaining. No-op if the code isn't found. + +#### Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 165. + +*** + +### set\_languages + +Set all language configurations at once + +#### Signature + +```python +set_languages(languages: List[Dict[str, Any]]) -> AgentBase +``` + +#### Parameters + + + List of language configuration dictionaries + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 203. + +*** + +### set\_native\_functions + +Set the list of native functions to enable + +#### Signature + +```python +set_native_functions(function_names: List[str]) -> AgentBase +``` + +#### Parameters + + + List of native function names + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 323. + +*** + +### set\_param + +Set a single AI parameter + +#### Signature + +```python +set_param(key: str, value: Any) -> AgentBase +``` + +#### Parameters + + + Parameter name + + + + Parameter value + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 257. + +*** + +### set\_params + +Set multiple AI parameters at once + +#### Signature + +```python +set_params(params: Dict[str, Any]) -> AgentBase +``` + +#### Parameters + + + Dictionary of parameter name/value pairs + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 272. + +*** + +### set\_post\_prompt\_llm\_params + +Set LLM parameters for the post-prompt. + +Accepts any parameters which will be passed through to the SignalWire server. +The server will validate and apply parameters based on the target model's capabilities. + +> \[!NOTE] +> model: The AI model to use (gpt-4o-mini, gpt-4.1-mini, gpt-4.1-nano, nova-micro, nova-lite, qwen3-235b-A22b-instruct) +> temperature: Randomness setting. Lower values make output more deterministic. +> top\_p: Alternative to temperature. Controls nucleus sampling. +> presence\_penalty: Topic diversity. Positive values encourage new topics. +> frequency\_penalty: Repetition control. Positive values reduce repetition. + +Note: Parameters are model-specific and will be validated by the server. +Invalid parameters for the selected model will be handled/ignored by the server. +barge\_confidence is not applicable to post-prompt. + +> \[!NOTE] +> agent.set\_post\_prompt\_llm\_params( +> model="gpt-4o-mini", +> temperature=0.5, # More deterministic for post-prompt +> top\_p=0.9 +> ) + +#### Signature + +```python +set_post_prompt_llm_params(**params = {}) -> AgentBase +``` + +#### Parameters + + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 624. + +*** + +### set\_prompt\_llm\_params + +Set LLM parameters for the main prompt. + +Accepts any parameters which will be passed through to the SignalWire server. +The server will validate and apply parameters based on the target model's capabilities. + +> \[!NOTE] +> model: The AI model to use (gpt-4o-mini, gpt-4.1-mini, gpt-4.1-nano, nova-micro, nova-lite, qwen3-235b-A22b-instruct) +> temperature: Randomness setting. Lower values make output more deterministic. +> top\_p: Alternative to temperature. Controls nucleus sampling. +> barge\_confidence: ASR confidence to interrupt. Higher values make it harder to interrupt. +> presence\_penalty: Topic diversity. Positive values encourage new topics. +> frequency\_penalty: Repetition control. Positive values reduce repetition. + +Note: Parameters are model-specific and will be validated by the server. +Invalid parameters for the selected model will be handled/ignored by the server. + +> \[!NOTE] +> agent.set\_prompt\_llm\_params( +> model="nova-micro", # Using Amazon's nova-micro model +> temperature=0.7, +> top\_p=0.9, +> barge\_confidence=0.6 +> ) + +#### Signature + +```python +set_prompt_llm_params(**params = {}) -> AgentBase +``` + +#### Parameters + + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 589. + +*** + +### set\_pronunciations + +Set all pronunciation rules at once + +#### Signature + +```python +set_pronunciations(pronunciations: List[Dict[str, Any]]) -> AgentBase +``` + +#### Parameters + + + List of pronunciation rule dictionaries + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 243. + +*** + +### update\_global\_data + +Update the global data with new values + +#### Signature + +```python +update_global_data(data: Dict[str, Any]) -> AgentBase +``` + +#### Parameters + + + Dictionary of global data to update + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 306. ## Source [`signalwire/signalwire/core/mixins/ai_config_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/ai_config_mixin.py) + +Line 14. diff --git a/fern/products/sdk-reference/python/agents/mixins/auth-mixin/auth-mixin/index.mdx b/fern/products/sdk-reference/python/agents/mixins/auth-mixin/auth-mixin/index.mdx deleted file mode 100644 index 8934767413..0000000000 --- a/fern/products/sdk-reference/python/agents/mixins/auth-mixin/auth-mixin/index.mdx +++ /dev/null @@ -1,93 +0,0 @@ ---- -slug: "/reference/python/agents/mixins/auth-mixin/auth-mixin" -title: "AuthMixin" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.core.mixins.auth_mixin.AuthMixin" - parent: "signalwire.core.mixins.auth_mixin" - module: "agents.mixins.auth_mixin" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/auth_mixin.py" ---- -# `AuthMixin` - -Mixin class containing all authentication-related methods for AgentBase - -## Signature - -```python -class AuthMixin -``` - -## Methods - -### get\_basic\_auth\_credentials - -Get the basic auth credentials - -#### Signature - -```python -get_basic_auth_credentials( - include_source: bool = False -) -> Union[Tuple[str, str], Tuple[str, str, str]] -``` - -#### Parameters - - - Whether to include the source of the credentials - - -#### Returns - -`Union[Tuple[str, str], Tuple[str, str, str]]` — If include\_source is False: (username, password) tuple If include\_source is True: (username, password, source) tuple, where source is one of: "provided", "environment", or "generated" - -#### Source - -[`signalwire/signalwire/core/mixins/auth_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/auth_mixin.py) - -Line 42. - -*** - -### validate\_basic\_auth - -Validate basic auth credentials - -This method can be overridden by subclasses. - -#### Signature - -```python -validate_basic_auth(username: str, password: str) -> bool -``` - -#### Parameters - - - Username from request - - - - Password from request - - -#### Returns - -`bool` — True if valid, False otherwise - -#### Source - -[`signalwire/signalwire/core/mixins/auth_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/auth_mixin.py) - -Line 24. - -## Source - -[`signalwire/signalwire/core/mixins/auth_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/auth_mixin.py) - -Line 19. diff --git a/fern/products/sdk-reference/python/agents/mixins/auth-mixin/index.mdx b/fern/products/sdk-reference/python/agents/mixins/auth-mixin/index.mdx index 3f3c00d921..52a1756ac1 100644 --- a/fern/products/sdk-reference/python/agents/mixins/auth-mixin/index.mdx +++ b/fern/products/sdk-reference/python/agents/mixins/auth-mixin/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.core.mixins.auth_mixin" parent: "signalwire.core.mixins" @@ -14,27 +14,80 @@ lustri: --- # `auth_mixin` -Copyright (c) 2025 SignalWire +Mixin class containing all authentication-related methods for AgentBase -This file is part of the SignalWire SDK. +## Signature -Licensed under the MIT License. -See LICENSE file in the project root for full license information. +```python +class AuthMixin +``` -## Signature +## Methods + +### get\_basic\_auth\_credentials + +Get the basic auth credentials + +#### Signature ```python -module auth_mixin +get_basic_auth_credentials( + include_source: bool = False +) -> Union[Tuple[str, str], Tuple[str, str, str]] ``` -## Classes +#### Parameters + + + Whether to include the source of the credentials + + +#### Returns + +`Union[Tuple[str, str], Tuple[str, str, str]]` — If include\_source is False: (username, password) tuple If include\_source is True: (username, password, source) tuple, where source is one of: "provided", "environment", or "generated" + +#### Source + +[`signalwire/signalwire/core/mixins/auth_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/auth_mixin.py) + +Line 42. + +*** + +### validate\_basic\_auth - - - Mixin class containing all authentication-related methods for AgentBase - - +Validate basic auth credentials + +This method can be overridden by subclasses. + +#### Signature + +```python +validate_basic_auth(username: str, password: str) -> bool +``` + +#### Parameters + + + Username from request + + + + Password from request + + +#### Returns + +`bool` — True if valid, False otherwise + +#### Source + +[`signalwire/signalwire/core/mixins/auth_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/auth_mixin.py) + +Line 24. ## Source [`signalwire/signalwire/core/mixins/auth_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/auth_mixin.py) + +Line 19. diff --git a/fern/products/sdk-reference/python/agents/mixins/index.mdx b/fern/products/sdk-reference/python/agents/mixins/index.mdx index 89b3f1d1bb..4e1fd3f537 100644 --- a/fern/products/sdk-reference/python/agents/mixins/index.mdx +++ b/fern/products/sdk-reference/python/agents/mixins/index.mdx @@ -31,43 +31,43 @@ module mixins -## Modules +## Classes - Copyright (c) 2025 SignalWire + Mixin class containing all AI configuration methods for AgentBase - Copyright (c) 2025 SignalWire + Mixin class containing all authentication-related methods for AgentBase - Copyright (c) 2025 SignalWire + Mixin that adds MCP server endpoint to an agent - Copyright (c) 2025 SignalWire + Mixin class containing all prompt-related methods for AgentBase - Copyright (c) 2025 SignalWire + Mixin class containing all serverless/cloud platform methods for AgentBase - Copyright (c) 2025 SignalWire + Mixin class containing all skill management methods for AgentBase - Copyright (c) 2025 SignalWire + Mixin class containing all state and session management methods for AgentBase - Copyright (c) 2025 SignalWire + Mixin class containing all tool/function-related methods for AgentBase - Copyright (c) 2025 SignalWire + Mixin class containing all web server and routing-related methods for AgentBase diff --git a/fern/products/sdk-reference/python/agents/mixins/mcp-server-mixin/index.mdx b/fern/products/sdk-reference/python/agents/mixins/mcp-server-mixin/index.mdx index bacc4efc89..f0098092c5 100644 --- a/fern/products/sdk-reference/python/agents/mixins/mcp-server-mixin/index.mdx +++ b/fern/products/sdk-reference/python/agents/mixins/mcp-server-mixin/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.core.mixins.mcp_server_mixin" parent: "signalwire.core.mixins" @@ -14,31 +14,20 @@ lustri: --- # `mcp_server_mixin` -Copyright (c) 2025 SignalWire - -MCP Server Mixin for AgentBase - -Exposes @tool decorated functions as an MCP server endpoint at /mcp. -Handles the MCP JSON-RPC 2.0 protocol: initialize, tools/list, tools/call. +Mixin that adds MCP server endpoint to an agent ## Signature ```python -module mcp_server_mixin +class MCPServerMixin ``` ## Properties -## Classes - - - - Mixin that adds MCP server endpoint to an agent - - - ## Source [`signalwire/signalwire/core/mixins/mcp_server_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/mcp_server_mixin.py) + +Line 18. diff --git a/fern/products/sdk-reference/python/agents/mixins/mcp-server-mixin/mcp-server-mixin/index.mdx b/fern/products/sdk-reference/python/agents/mixins/mcp-server-mixin/mcp-server-mixin/index.mdx deleted file mode 100644 index cb86faf5bd..0000000000 --- a/fern/products/sdk-reference/python/agents/mixins/mcp-server-mixin/mcp-server-mixin/index.mdx +++ /dev/null @@ -1,29 +0,0 @@ ---- -slug: "/reference/python/agents/mixins/mcp-server-mixin/mcp-server-mixin" -title: "MCPServerMixin" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.core.mixins.mcp_server_mixin.MCPServerMixin" - parent: "signalwire.core.mixins.mcp_server_mixin" - module: "agents.mixins.mcp_server_mixin" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/mcp_server_mixin.py" ---- -# `MCPServerMixin` - -Mixin that adds MCP server endpoint to an agent - -## Signature - -```python -class MCPServerMixin -``` - -## Source - -[`signalwire/signalwire/core/mixins/mcp_server_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/mcp_server_mixin.py) - -Line 18. diff --git a/fern/products/sdk-reference/python/agents/mixins/prompt-mixin/index.mdx b/fern/products/sdk-reference/python/agents/mixins/prompt-mixin/index.mdx index 3eb0c08b6e..9e86f84a03 100644 --- a/fern/products/sdk-reference/python/agents/mixins/prompt-mixin/index.mdx +++ b/fern/products/sdk-reference/python/agents/mixins/prompt-mixin/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.core.mixins.prompt_mixin" parent: "signalwire.core.mixins" @@ -14,27 +14,401 @@ lustri: --- # `prompt_mixin` -Copyright (c) 2025 SignalWire +Mixin class containing all prompt-related methods for AgentBase -This file is part of the SignalWire SDK. +## Signature + +```python +class PromptMixin +``` -Licensed under the MIT License. -See LICENSE file in the project root for full license information. +## Properties -## Signature + + Get the ContextBuilder for this agent + + +## Methods + +### define\_contexts + +Define contexts and steps for this agent (alternative to POM/prompt) + +> \[!NOTE] +> Contexts can coexist with traditional prompts. The restriction is only +> that you can't mix POM sections with raw text in the main prompt. + +#### Signature + +```python +define_contexts(contexts = None) -> Union[AgentBase, ContextBuilder] +``` + +#### Parameters + + + Optional context configuration (dict or ContextBuilder) + + +#### Returns + +`Union[AgentBase, ContextBuilder]` — ContextBuilder for method chaining if no contexts provided + +#### Source + +[`signalwire/signalwire/core/mixins/prompt_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/prompt_mixin.py) + +Line 121. + +*** + +### get\_post\_prompt + +Get the post-prompt for the agent + +#### Signature ```python -module prompt_mixin +get_post_prompt() -> Optional[str] ``` -## Classes +#### Returns + +`Optional[str]` — Post-prompt text or None if not set + +#### Source + +[`signalwire/signalwire/core/mixins/prompt_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/prompt_mixin.py) + +Line 374. + +*** + +### get\_prompt + +Get the prompt for the agent + +#### Signature + +```python +get_prompt() -> Union[str, List[Dict[str, Any]]] +``` + +#### Returns + +`Union[str, List[Dict[str, Any]]]` — Either a string prompt or a POM object as list of dicts + +#### Source + +[`signalwire/signalwire/core/mixins/prompt_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/prompt_mixin.py) + +Line 327. + +*** + +### prompt\_add\_section + +Add a section to the prompt + +#### Signature + +```python +prompt_add_section( + title: str, + body: str = '', + bullets: Optional[List[str]] = None, + numbered: bool = False, + numbered_bullets: bool = False, + subsections: Optional[List[Dict[str, Any]]] = None +) -> AgentBase +``` + +#### Parameters + + + Section title + + + + Optional section body text + + + + Optional list of bullet points + + + + Whether this section should be numbered + + + + Whether bullets should be numbered + + + + Optional list of subsection objects + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/prompt_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/prompt_mixin.py) + +Line 228. + +*** + +### prompt\_add\_subsection + +Add a subsection to an existing section (creating parent if needed) + +#### Signature + +```python +prompt_add_subsection( + parent_title: str, + title: str, + body: str = '', + bullets: Optional[List[str]] = None +) -> AgentBase +``` + +#### Parameters + + + Parent section title + + + + Subsection title + + + + Optional subsection body text + + + + Optional list of bullet points + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/prompt_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/prompt_mixin.py) + +Line 288. + +*** + +### prompt\_add\_to\_section + +Add content to an existing section (creating it if needed) + +#### Signature + +```python +prompt_add_to_section( + title: str, + body: Optional[str] = None, + bullet: Optional[str] = None, + bullets: Optional[List[str]] = None +) -> AgentBase +``` + +#### Parameters + + + Section title + + + + Optional text to append to section body + - - - Mixin class containing all prompt-related methods for AgentBase - - + + Optional single bullet point to add + + + + Optional list of bullet points to add + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/prompt_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/prompt_mixin.py) + +Line 261. + +*** + +### prompt\_has\_section + +Check if a section exists in the prompt + +#### Signature + +```python +prompt_has_section(title: str) -> bool +``` + +#### Parameters + + + Section title to check + + +#### Returns + +`bool` — True if section exists, False otherwise + +#### Source + +[`signalwire/signalwire/core/mixins/prompt_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/prompt_mixin.py) + +Line 315. + +*** + +### reset\_contexts + +Remove all contexts, returning the agent to a no-contexts state. + +This is a convenience wrapper around `define_contexts().reset()`. +Use it in a dynamic config callback when you need to rebuild +contexts from scratch for a specific request. + +Example:: + +``` +def on_dynamic_config(query, body, headers, agent): + if query.get("transfer"): + agent.reset_contexts() + ctx = agent.define_contexts().add_context("default") + ctx.add_step("route").set_text("Route the caller.") +``` + +#### Signature + +```python +reset_contexts() -> AgentBase +``` + +#### Returns + +`AgentBase` — Self for method chaining. + +#### Examples + +```python +def on_dynamic_config(query, body, headers, agent): + if query.get("transfer"): + agent.reset_contexts() + ctx = agent.define_contexts().add_context("default") + ctx.add_step("route").set_text("Route the caller.") +``` + +#### Source + +[`signalwire/signalwire/core/mixins/prompt_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/prompt_mixin.py) + +Line 157. + +*** + +### set\_post\_prompt + +Set the post-prompt text for summary generation + +#### Signature + +```python +set_post_prompt(text: str) -> AgentBase +``` + +#### Parameters + + + The post-prompt text + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/prompt_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/prompt_mixin.py) + +Line 202. + +*** + +### set\_prompt\_pom + +Set the prompt as a POM dictionary + +#### Signature + +```python +set_prompt_pom(pom: List[Dict[str, Any]]) -> AgentBase +``` + +#### Parameters + + + POM dictionary structure + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/prompt_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/prompt_mixin.py) + +Line 215. + +*** + +### set\_prompt\_text + +Set the prompt as raw text instead of using POM + +#### Signature + +```python +set_prompt_text(text: str) -> AgentBase +``` + +#### Parameters + + + The raw prompt text + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/prompt_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/prompt_mixin.py) + +Line 189. ## Source [`signalwire/signalwire/core/mixins/prompt_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/prompt_mixin.py) + +Line 19. diff --git a/fern/products/sdk-reference/python/agents/mixins/prompt-mixin/prompt-mixin/index.mdx b/fern/products/sdk-reference/python/agents/mixins/prompt-mixin/prompt-mixin/index.mdx deleted file mode 100644 index 17a1cb7afa..0000000000 --- a/fern/products/sdk-reference/python/agents/mixins/prompt-mixin/prompt-mixin/index.mdx +++ /dev/null @@ -1,414 +0,0 @@ ---- -slug: "/reference/python/agents/mixins/prompt-mixin/prompt-mixin" -title: "PromptMixin" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.core.mixins.prompt_mixin.PromptMixin" - parent: "signalwire.core.mixins.prompt_mixin" - module: "agents.mixins.prompt_mixin" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/prompt_mixin.py" ---- -# `PromptMixin` - -Mixin class containing all prompt-related methods for AgentBase - -## Signature - -```python -class PromptMixin -``` - -## Properties - - - Get the ContextBuilder for this agent - - -## Methods - -### define\_contexts - -Define contexts and steps for this agent (alternative to POM/prompt) - -> \[!NOTE] -> Contexts can coexist with traditional prompts. The restriction is only -> that you can't mix POM sections with raw text in the main prompt. - -#### Signature - -```python -define_contexts(contexts = None) -> Union[AgentBase, ContextBuilder] -``` - -#### Parameters - - - Optional context configuration (dict or ContextBuilder) - - -#### Returns - -`Union[AgentBase, ContextBuilder]` — ContextBuilder for method chaining if no contexts provided - -#### Source - -[`signalwire/signalwire/core/mixins/prompt_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/prompt_mixin.py) - -Line 121. - -*** - -### get\_post\_prompt - -Get the post-prompt for the agent - -#### Signature - -```python -get_post_prompt() -> Optional[str] -``` - -#### Returns - -`Optional[str]` — Post-prompt text or None if not set - -#### Source - -[`signalwire/signalwire/core/mixins/prompt_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/prompt_mixin.py) - -Line 374. - -*** - -### get\_prompt - -Get the prompt for the agent - -#### Signature - -```python -get_prompt() -> Union[str, List[Dict[str, Any]]] -``` - -#### Returns - -`Union[str, List[Dict[str, Any]]]` — Either a string prompt or a POM object as list of dicts - -#### Source - -[`signalwire/signalwire/core/mixins/prompt_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/prompt_mixin.py) - -Line 327. - -*** - -### prompt\_add\_section - -Add a section to the prompt - -#### Signature - -```python -prompt_add_section( - title: str, - body: str = '', - bullets: Optional[List[str]] = None, - numbered: bool = False, - numbered_bullets: bool = False, - subsections: Optional[List[Dict[str, Any]]] = None -) -> AgentBase -``` - -#### Parameters - - - Section title - - - - Optional section body text - - - - Optional list of bullet points - - - - Whether this section should be numbered - - - - Whether bullets should be numbered - - - - Optional list of subsection objects - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/mixins/prompt_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/prompt_mixin.py) - -Line 228. - -*** - -### prompt\_add\_subsection - -Add a subsection to an existing section (creating parent if needed) - -#### Signature - -```python -prompt_add_subsection( - parent_title: str, - title: str, - body: str = '', - bullets: Optional[List[str]] = None -) -> AgentBase -``` - -#### Parameters - - - Parent section title - - - - Subsection title - - - - Optional subsection body text - - - - Optional list of bullet points - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/mixins/prompt_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/prompt_mixin.py) - -Line 288. - -*** - -### prompt\_add\_to\_section - -Add content to an existing section (creating it if needed) - -#### Signature - -```python -prompt_add_to_section( - title: str, - body: Optional[str] = None, - bullet: Optional[str] = None, - bullets: Optional[List[str]] = None -) -> AgentBase -``` - -#### Parameters - - - Section title - - - - Optional text to append to section body - - - - Optional single bullet point to add - - - - Optional list of bullet points to add - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/mixins/prompt_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/prompt_mixin.py) - -Line 261. - -*** - -### prompt\_has\_section - -Check if a section exists in the prompt - -#### Signature - -```python -prompt_has_section(title: str) -> bool -``` - -#### Parameters - - - Section title to check - - -#### Returns - -`bool` — True if section exists, False otherwise - -#### Source - -[`signalwire/signalwire/core/mixins/prompt_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/prompt_mixin.py) - -Line 315. - -*** - -### reset\_contexts - -Remove all contexts, returning the agent to a no-contexts state. - -This is a convenience wrapper around `define_contexts().reset()`. -Use it in a dynamic config callback when you need to rebuild -contexts from scratch for a specific request. - -Example:: - -``` -def on_dynamic_config(query, body, headers, agent): - if query.get("transfer"): - agent.reset_contexts() - ctx = agent.define_contexts().add_context("default") - ctx.add_step("route").set_text("Route the caller.") -``` - -#### Signature - -```python -reset_contexts() -> AgentBase -``` - -#### Returns - -`AgentBase` — Self for method chaining. - -#### Examples - -```python -def on_dynamic_config(query, body, headers, agent): - if query.get("transfer"): - agent.reset_contexts() - ctx = agent.define_contexts().add_context("default") - ctx.add_step("route").set_text("Route the caller.") -``` - -#### Source - -[`signalwire/signalwire/core/mixins/prompt_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/prompt_mixin.py) - -Line 157. - -*** - -### set\_post\_prompt - -Set the post-prompt text for summary generation - -#### Signature - -```python -set_post_prompt(text: str) -> AgentBase -``` - -#### Parameters - - - The post-prompt text - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/mixins/prompt_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/prompt_mixin.py) - -Line 202. - -*** - -### set\_prompt\_pom - -Set the prompt as a POM dictionary - -#### Signature - -```python -set_prompt_pom(pom: List[Dict[str, Any]]) -> AgentBase -``` - -#### Parameters - - - POM dictionary structure - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/mixins/prompt_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/prompt_mixin.py) - -Line 215. - -*** - -### set\_prompt\_text - -Set the prompt as raw text instead of using POM - -#### Signature - -```python -set_prompt_text(text: str) -> AgentBase -``` - -#### Parameters - - - The raw prompt text - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/mixins/prompt_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/prompt_mixin.py) - -Line 189. - -## Source - -[`signalwire/signalwire/core/mixins/prompt_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/prompt_mixin.py) - -Line 19. diff --git a/fern/products/sdk-reference/python/agents/mixins/serverless-mixin/index.mdx b/fern/products/sdk-reference/python/agents/mixins/serverless-mixin/index.mdx index 36c5d44922..feb6720c50 100644 --- a/fern/products/sdk-reference/python/agents/mixins/serverless-mixin/index.mdx +++ b/fern/products/sdk-reference/python/agents/mixins/serverless-mixin/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.core.mixins.serverless_mixin" parent: "signalwire.core.mixins" @@ -14,31 +14,56 @@ lustri: --- # `serverless_mixin` -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. +Mixin class containing all serverless/cloud platform methods for AgentBase ## Signature ```python -module serverless_mixin +class ServerlessMixin ``` ## Constants -## Classes +## Methods + +### handle\_serverless\_request + +Handle serverless environment requests (CGI, Lambda, Cloud Functions) + +#### Signature + +```python +handle_serverless_request(event = None, context = None, mode = None) +``` + +#### Parameters - - - Mixin class containing all serverless/cloud platform methods for AgentBase - - + + Serverless event object (Lambda, Cloud Functions) + + + + Serverless context object (Lambda, Cloud Functions) + + + + Override execution mode (from force\_mode in run()) + + +#### Returns + +Response appropriate for the serverless platform + +#### Source + +[`signalwire/signalwire/core/mixins/serverless_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/serverless_mixin.py) + +Line 28. ## Source [`signalwire/signalwire/core/mixins/serverless_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/serverless_mixin.py) + +Line 23. diff --git a/fern/products/sdk-reference/python/agents/mixins/serverless-mixin/serverless-mixin/index.mdx b/fern/products/sdk-reference/python/agents/mixins/serverless-mixin/serverless-mixin/index.mdx deleted file mode 100644 index 2b4d96bc16..0000000000 --- a/fern/products/sdk-reference/python/agents/mixins/serverless-mixin/serverless-mixin/index.mdx +++ /dev/null @@ -1,65 +0,0 @@ ---- -slug: "/reference/python/agents/mixins/serverless-mixin/serverless-mixin" -title: "ServerlessMixin" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.core.mixins.serverless_mixin.ServerlessMixin" - parent: "signalwire.core.mixins.serverless_mixin" - module: "agents.mixins.serverless_mixin" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/serverless_mixin.py" ---- -# `ServerlessMixin` - -Mixin class containing all serverless/cloud platform methods for AgentBase - -## Signature - -```python -class ServerlessMixin -``` - -## Methods - -### handle\_serverless\_request - -Handle serverless environment requests (CGI, Lambda, Cloud Functions) - -#### Signature - -```python -handle_serverless_request(event = None, context = None, mode = None) -``` - -#### Parameters - - - Serverless event object (Lambda, Cloud Functions) - - - - Serverless context object (Lambda, Cloud Functions) - - - - Override execution mode (from force\_mode in run()) - - -#### Returns - -Response appropriate for the serverless platform - -#### Source - -[`signalwire/signalwire/core/mixins/serverless_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/serverless_mixin.py) - -Line 28. - -## Source - -[`signalwire/signalwire/core/mixins/serverless_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/serverless_mixin.py) - -Line 23. diff --git a/fern/products/sdk-reference/python/agents/mixins/skill-mixin/index.mdx b/fern/products/sdk-reference/python/agents/mixins/skill-mixin/index.mdx index 8a6809b6d3..6a255a3175 100644 --- a/fern/products/sdk-reference/python/agents/mixins/skill-mixin/index.mdx +++ b/fern/products/sdk-reference/python/agents/mixins/skill-mixin/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.core.mixins.skill_mixin" parent: "signalwire.core.mixins" @@ -14,27 +14,126 @@ lustri: --- # `skill_mixin` -Copyright (c) 2025 SignalWire +Mixin class containing all skill management methods for AgentBase -This file is part of the SignalWire SDK. +## Signature -Licensed under the MIT License. -See LICENSE file in the project root for full license information. +```python +class SkillMixin +``` -## Signature +## Methods + +### add\_skill + +Add a skill to this agent + +#### Signature + +```python +add_skill(skill_name: str, params: Optional[Dict[str, Any]] = None) -> AgentBase +``` + +#### Parameters + + + Name of the skill to add + + + + Optional parameters to pass to the skill for configuration + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Throws + +- `ValueError` — If skill not found or failed to load with detailed error message + +#### Source + +[`signalwire/signalwire/core/mixins/skill_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/skill_mixin.py) + +Line 18. + +*** + +### has\_skill + +Check if skill is loaded + +#### Signature + +```python +has_skill(skill_name: str) -> bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/core/mixins/skill_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/skill_mixin.py) + +Line 53. + +*** + +### list\_skills + +List currently loaded skills + +#### Signature + +```python +list_skills() -> List[str] +``` + +#### Returns + +`List[str]` + +#### Source + +[`signalwire/signalwire/core/mixins/skill_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/skill_mixin.py) + +Line 49. + +*** + +### remove\_skill + +Remove a skill from this agent + +#### Signature ```python -module skill_mixin +remove_skill(skill_name: str) -> AgentBase ``` -## Classes +#### Parameters - - - Mixin class containing all skill management methods for AgentBase - - + + +#### Returns + +`AgentBase` + +#### Source + +[`signalwire/signalwire/core/mixins/skill_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/skill_mixin.py) + +Line 44. ## Source [`signalwire/signalwire/core/mixins/skill_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/skill_mixin.py) + +Line 13. diff --git a/fern/products/sdk-reference/python/agents/mixins/skill-mixin/skill-mixin/index.mdx b/fern/products/sdk-reference/python/agents/mixins/skill-mixin/skill-mixin/index.mdx deleted file mode 100644 index f60e77b88b..0000000000 --- a/fern/products/sdk-reference/python/agents/mixins/skill-mixin/skill-mixin/index.mdx +++ /dev/null @@ -1,139 +0,0 @@ ---- -slug: "/reference/python/agents/mixins/skill-mixin/skill-mixin" -title: "SkillMixin" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.core.mixins.skill_mixin.SkillMixin" - parent: "signalwire.core.mixins.skill_mixin" - module: "agents.mixins.skill_mixin" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/skill_mixin.py" ---- -# `SkillMixin` - -Mixin class containing all skill management methods for AgentBase - -## Signature - -```python -class SkillMixin -``` - -## Methods - -### add\_skill - -Add a skill to this agent - -#### Signature - -```python -add_skill(skill_name: str, params: Optional[Dict[str, Any]] = None) -> AgentBase -``` - -#### Parameters - - - Name of the skill to add - - - - Optional parameters to pass to the skill for configuration - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Throws - -- `ValueError` — If skill not found or failed to load with detailed error message - -#### Source - -[`signalwire/signalwire/core/mixins/skill_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/skill_mixin.py) - -Line 18. - -*** - -### has\_skill - -Check if skill is loaded - -#### Signature - -```python -has_skill(skill_name: str) -> bool -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`signalwire/signalwire/core/mixins/skill_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/skill_mixin.py) - -Line 53. - -*** - -### list\_skills - -List currently loaded skills - -#### Signature - -```python -list_skills() -> List[str] -``` - -#### Returns - -`List[str]` - -#### Source - -[`signalwire/signalwire/core/mixins/skill_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/skill_mixin.py) - -Line 49. - -*** - -### remove\_skill - -Remove a skill from this agent - -#### Signature - -```python -remove_skill(skill_name: str) -> AgentBase -``` - -#### Parameters - - - -#### Returns - -`AgentBase` - -#### Source - -[`signalwire/signalwire/core/mixins/skill_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/skill_mixin.py) - -Line 44. - -## Source - -[`signalwire/signalwire/core/mixins/skill_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/skill_mixin.py) - -Line 13. diff --git a/fern/products/sdk-reference/python/agents/mixins/state-mixin/index.mdx b/fern/products/sdk-reference/python/agents/mixins/state-mixin/index.mdx index 1a95788a26..36ebe1bf7f 100644 --- a/fern/products/sdk-reference/python/agents/mixins/state-mixin/index.mdx +++ b/fern/products/sdk-reference/python/agents/mixins/state-mixin/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.core.mixins.state_mixin" parent: "signalwire.core.mixins" @@ -14,27 +14,52 @@ lustri: --- # `state_mixin` -Copyright (c) 2025 SignalWire +Mixin class containing all state and session management methods for AgentBase -This file is part of the SignalWire SDK. +## Signature -Licensed under the MIT License. -See LICENSE file in the project root for full license information. +```python +class StateMixin +``` -## Signature +## Methods + +### validate\_tool\_token + +Validate a tool token + +#### Signature ```python -module state_mixin +validate_tool_token(function_name: str, token: str, call_id: str) -> bool ``` -## Classes +#### Parameters + + + Name of the function/tool + - - - Mixin class containing all state and session management methods for AgentBase - - + + Token to validate + + + + Call ID for the session + + +#### Returns + +`bool` — True if token is valid, False otherwise + +#### Source + +[`signalwire/signalwire/core/mixins/state_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/state_mixin.py) + +Line 43. ## Source [`signalwire/signalwire/core/mixins/state_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/state_mixin.py) + +Line 15. diff --git a/fern/products/sdk-reference/python/agents/mixins/state-mixin/state-mixin/index.mdx b/fern/products/sdk-reference/python/agents/mixins/state-mixin/state-mixin/index.mdx deleted file mode 100644 index 07ae3324fd..0000000000 --- a/fern/products/sdk-reference/python/agents/mixins/state-mixin/state-mixin/index.mdx +++ /dev/null @@ -1,65 +0,0 @@ ---- -slug: "/reference/python/agents/mixins/state-mixin/state-mixin" -title: "StateMixin" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.core.mixins.state_mixin.StateMixin" - parent: "signalwire.core.mixins.state_mixin" - module: "agents.mixins.state_mixin" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/state_mixin.py" ---- -# `StateMixin` - -Mixin class containing all state and session management methods for AgentBase - -## Signature - -```python -class StateMixin -``` - -## Methods - -### validate\_tool\_token - -Validate a tool token - -#### Signature - -```python -validate_tool_token(function_name: str, token: str, call_id: str) -> bool -``` - -#### Parameters - - - Name of the function/tool - - - - Token to validate - - - - Call ID for the session - - -#### Returns - -`bool` — True if token is valid, False otherwise - -#### Source - -[`signalwire/signalwire/core/mixins/state_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/state_mixin.py) - -Line 43. - -## Source - -[`signalwire/signalwire/core/mixins/state_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/state_mixin.py) - -Line 15. diff --git a/fern/products/sdk-reference/python/agents/mixins/tool-mixin/index.mdx b/fern/products/sdk-reference/python/agents/mixins/tool-mixin/index.mdx index 431bdf479b..ac2f8f54d3 100644 --- a/fern/products/sdk-reference/python/agents/mixins/tool-mixin/index.mdx +++ b/fern/products/sdk-reference/python/agents/mixins/tool-mixin/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.core.mixins.tool_mixin" parent: "signalwire.core.mixins" @@ -14,27 +14,296 @@ lustri: --- # `tool_mixin` -Copyright (c) 2025 SignalWire +Mixin class containing all tool/function-related methods for AgentBase -This file is part of the SignalWire SDK. +## Signature -Licensed under the MIT License. -See LICENSE file in the project root for full license information. +```python +class ToolMixin +``` -## Signature +## Methods + +### define\_tool + +Define a SWAIG function the AI can call. + +#### How this becomes a tool the model sees + +SWAIG functions are NOT a separate concept from "LLM tools" — they +ARE the tools, exposed to the model in exactly the same shape as +native OpenAI / Anthropic tool calling. Under the hood, the SDK +renders each SWAIG function into an OpenAI-format tool schema: + +``` +{"type": "function", "function": { + "name": "", + "description": "", + "parameters": {} +}} +``` + +That schema is sent to the model on every turn. The model reads +the `description` field and the per-parameter `description` +strings inside `parameters` to decide WHEN to call this tool and +HOW to fill in the arguments. + +Treat description text as prompt engineering, not as developer +documentation: + +- Bad: "Lookup function" + +- Bad: "Internal helper for account fetching" + +- Good: "Look up a customer's account details by their account + number. Use this BEFORE quoting any account-specific + information (balance, plan, status, billing date)." + +- Bad parameter: "the id" + +- Good parameter: "The customer's account number, exactly 8 + digits, no dashes or spaces. Ask the user if + they don't provide it." + +Vague descriptions are the #1 cause of "the model has the right +tool but doesn't call it" failures. Be specific about WHEN to +use the tool, what makes it the right choice over alternatives, +and any preconditions on the arguments. + +Tool count matters too: LLM tool selection accuracy degrades past +\~7-8 simultaneously-active tools per call. If you have many tools, +partition them across steps using Step.set\_functions() so only +the relevant subset is active at any moment. + +> \[!NOTE] +> agent.define\_tool( +> name="lookup\_account", +> description=( +> "Look up a customer's account details by their account " +> "number. Use this BEFORE quoting any account-specific " +> "information. Do not call it for general questions about " +> "the product." +> ), +> parameters=\{ +> "type": "object", +> "properties": \{ +> "account\_number": \{ +> "type": "string", +> "description": ( +> "The customer's 8-digit account number, " +> "no dashes. Ask the user if not provided." +> ), +> \} +> \}, +> "required": \["account\_number"], +> \}, +> handler=self.handle\_lookup\_account, +> ) + +#### Signature ```python -module tool_mixin +define_tool( + name: str, + description: str, + parameters: Dict[str, Any], + handler: Callable, + secure: bool = True, + fillers: Optional[Dict[str, List[str]]] = None, + webhook_url: Optional[str] = None, + required: Optional[List[str]] = None, + is_typed_handler: bool = False, + **swaig_fields = {} +) -> AgentBase ``` -## Classes +#### Parameters + + + Function name. Must be unique across all SWAIG functions on this agent. Becomes the `name` field in the OpenAI tool schema and is what the model emits when it picks this tool. Use snake\_case; the model picks up naming conventions from this field too. + + + + The function description as the LLM will read it. See above — this is prompt-engineered text, not internal docs. Explain what the tool does, when to use it, and what NOT to use it for if there are sibling tools the model might confuse it with. + + + + JSON Schema for the function's arguments. The per-property `description` fields inside the schema are also LLM-facing — give every parameter a description that tells the model how to fill it in (format, source, constraints). + + + + Python callable invoked when the model calls this tool. Receives parsed args and the raw request data. Should return a FunctionResult or dict; anything else logs a warning and is stringified. + + + + Whether to require SWAIG token validation on the webhook callback. + - - - Mixin class containing all tool/function-related methods for AgentBase - - + + Optional dict mapping language codes to arrays of filler phrases the AI speaks while the function executes. Format: \{"en-US": \["one moment...", "checking..."]\} + + + + Optional external webhook URL. If set, the SDK does not handle the call locally — the model's tool call is forwarded to this URL. + + + + Optional list of required parameter names. May also be set inside `parameters["required"]`. + + + + Whether the handler uses type-hinted parameters (auto-wrapped from inferred schema). + + + + +#### Returns + +`AgentBase` — Self for method chaining. + +#### Examples + +```python +{"type": "function", "function": { + "name": "", + "description": "", + "parameters": {} +}} +``` + +#### Source + +[`signalwire/signalwire/core/mixins/tool_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/tool_mixin.py) + +Line 26. + +*** + +### define\_tools + +Define the tools this agent can use + +This method can be overridden by subclasses. + +#### Signature + +```python +define_tools() -> List[SWAIGFunction] +``` + +#### Returns + +`List[SWAIGFunction]` — List of SWAIGFunction objects or raw dictionaries (for data\_map tools) + +#### Source + +[`signalwire/signalwire/core/mixins/tool_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/tool_mixin.py) + +Line 200. + +*** + +### on\_function\_call + +Called when a SWAIG function is invoked + +#### Signature + +```python +on_function_call( + name: str, + args: Dict[str, Any], + raw_data: Optional[Dict[str, Any]] = None +) -> Any +``` + +#### Parameters + + + Function name + + + + Function arguments + + + + Raw request data + + +#### Returns + +`Any` — Function result + +#### Source + +[`signalwire/signalwire/core/mixins/tool_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/tool_mixin.py) + +Line 219. + +*** + +### register\_swaig\_function + +Register a raw SWAIG function dictionary (e.g., from DataMap.to\_swaig\_function()) + +#### Signature + +```python +register_swaig_function(function_dict: Dict[str, Any]) -> AgentBase +``` + +#### Parameters + + + Complete SWAIG function definition dictionary + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/tool_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/tool_mixin.py) + +Line 162. + +*** + +### tool + +Class method decorator for defining SWAIG tools + +Used as: + +@AgentBase.tool(name="example\_function", parameters=\{...\}) +def example\_function(self, param1): +\# ... + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +tool(name = None, **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/core/mixins/tool_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/tool_mixin.py) + +Line 187. ## Source [`signalwire/signalwire/core/mixins/tool_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/tool_mixin.py) + +Line 21. diff --git a/fern/products/sdk-reference/python/agents/mixins/tool-mixin/tool-mixin/index.mdx b/fern/products/sdk-reference/python/agents/mixins/tool-mixin/tool-mixin/index.mdx deleted file mode 100644 index eab0e3179a..0000000000 --- a/fern/products/sdk-reference/python/agents/mixins/tool-mixin/tool-mixin/index.mdx +++ /dev/null @@ -1,309 +0,0 @@ ---- -slug: "/reference/python/agents/mixins/tool-mixin/tool-mixin" -title: "ToolMixin" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.core.mixins.tool_mixin.ToolMixin" - parent: "signalwire.core.mixins.tool_mixin" - module: "agents.mixins.tool_mixin" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/tool_mixin.py" ---- -# `ToolMixin` - -Mixin class containing all tool/function-related methods for AgentBase - -## Signature - -```python -class ToolMixin -``` - -## Methods - -### define\_tool - -Define a SWAIG function the AI can call. - -#### How this becomes a tool the model sees - -SWAIG functions are NOT a separate concept from "LLM tools" — they -ARE the tools, exposed to the model in exactly the same shape as -native OpenAI / Anthropic tool calling. Under the hood, the SDK -renders each SWAIG function into an OpenAI-format tool schema: - -``` -{"type": "function", "function": { - "name": "", - "description": "", - "parameters": {} -}} -``` - -That schema is sent to the model on every turn. The model reads -the `description` field and the per-parameter `description` -strings inside `parameters` to decide WHEN to call this tool and -HOW to fill in the arguments. - -Treat description text as prompt engineering, not as developer -documentation: - -- Bad: "Lookup function" - -- Bad: "Internal helper for account fetching" - -- Good: "Look up a customer's account details by their account - number. Use this BEFORE quoting any account-specific - information (balance, plan, status, billing date)." - -- Bad parameter: "the id" - -- Good parameter: "The customer's account number, exactly 8 - digits, no dashes or spaces. Ask the user if - they don't provide it." - -Vague descriptions are the #1 cause of "the model has the right -tool but doesn't call it" failures. Be specific about WHEN to -use the tool, what makes it the right choice over alternatives, -and any preconditions on the arguments. - -Tool count matters too: LLM tool selection accuracy degrades past -\~7-8 simultaneously-active tools per call. If you have many tools, -partition them across steps using Step.set\_functions() so only -the relevant subset is active at any moment. - -> \[!NOTE] -> agent.define\_tool( -> name="lookup\_account", -> description=( -> "Look up a customer's account details by their account " -> "number. Use this BEFORE quoting any account-specific " -> "information. Do not call it for general questions about " -> "the product." -> ), -> parameters=\{ -> "type": "object", -> "properties": \{ -> "account\_number": \{ -> "type": "string", -> "description": ( -> "The customer's 8-digit account number, " -> "no dashes. Ask the user if not provided." -> ), -> \} -> \}, -> "required": \["account\_number"], -> \}, -> handler=self.handle\_lookup\_account, -> ) - -#### Signature - -```python -define_tool( - name: str, - description: str, - parameters: Dict[str, Any], - handler: Callable, - secure: bool = True, - fillers: Optional[Dict[str, List[str]]] = None, - webhook_url: Optional[str] = None, - required: Optional[List[str]] = None, - is_typed_handler: bool = False, - **swaig_fields = {} -) -> AgentBase -``` - -#### Parameters - - - Function name. Must be unique across all SWAIG functions on this agent. Becomes the `name` field in the OpenAI tool schema and is what the model emits when it picks this tool. Use snake\_case; the model picks up naming conventions from this field too. - - - - The function description as the LLM will read it. See above — this is prompt-engineered text, not internal docs. Explain what the tool does, when to use it, and what NOT to use it for if there are sibling tools the model might confuse it with. - - - - JSON Schema for the function's arguments. The per-property `description` fields inside the schema are also LLM-facing — give every parameter a description that tells the model how to fill it in (format, source, constraints). - - - - Python callable invoked when the model calls this tool. Receives parsed args and the raw request data. Should return a FunctionResult or dict; anything else logs a warning and is stringified. - - - - Whether to require SWAIG token validation on the webhook callback. - - - - Optional dict mapping language codes to arrays of filler phrases the AI speaks while the function executes. Format: \{"en-US": \["one moment...", "checking..."]\} - - - - Optional external webhook URL. If set, the SDK does not handle the call locally — the model's tool call is forwarded to this URL. - - - - Optional list of required parameter names. May also be set inside `parameters["required"]`. - - - - Whether the handler uses type-hinted parameters (auto-wrapped from inferred schema). - - - - -#### Returns - -`AgentBase` — Self for method chaining. - -#### Examples - -```python -{"type": "function", "function": { - "name": "", - "description": "", - "parameters": {} -}} -``` - -#### Source - -[`signalwire/signalwire/core/mixins/tool_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/tool_mixin.py) - -Line 26. - -*** - -### define\_tools - -Define the tools this agent can use - -This method can be overridden by subclasses. - -#### Signature - -```python -define_tools() -> List[SWAIGFunction] -``` - -#### Returns - -`List[SWAIGFunction]` — List of SWAIGFunction objects or raw dictionaries (for data\_map tools) - -#### Source - -[`signalwire/signalwire/core/mixins/tool_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/tool_mixin.py) - -Line 200. - -*** - -### on\_function\_call - -Called when a SWAIG function is invoked - -#### Signature - -```python -on_function_call( - name: str, - args: Dict[str, Any], - raw_data: Optional[Dict[str, Any]] = None -) -> Any -``` - -#### Parameters - - - Function name - - - - Function arguments - - - - Raw request data - - -#### Returns - -`Any` — Function result - -#### Source - -[`signalwire/signalwire/core/mixins/tool_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/tool_mixin.py) - -Line 219. - -*** - -### register\_swaig\_function - -Register a raw SWAIG function dictionary (e.g., from DataMap.to\_swaig\_function()) - -#### Signature - -```python -register_swaig_function(function_dict: Dict[str, Any]) -> AgentBase -``` - -#### Parameters - - - Complete SWAIG function definition dictionary - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/mixins/tool_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/tool_mixin.py) - -Line 162. - -*** - -### tool - -Class method decorator for defining SWAIG tools - -Used as: - -@AgentBase.tool(name="example\_function", parameters=\{...\}) -def example\_function(self, param1): -\# ... - -**Modifiers:** `classmethod` - -#### Signature - -```python -@classmethod -tool(name = None, **kwargs = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/core/mixins/tool_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/tool_mixin.py) - -Line 187. - -## Source - -[`signalwire/signalwire/core/mixins/tool_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/tool_mixin.py) - -Line 21. diff --git a/fern/products/sdk-reference/python/agents/mixins/web-mixin/index.mdx b/fern/products/sdk-reference/python/agents/mixins/web-mixin/index.mdx index 10699f150b..59611cbad7 100644 --- a/fern/products/sdk-reference/python/agents/mixins/web-mixin/index.mdx +++ b/fern/products/sdk-reference/python/agents/mixins/web-mixin/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.core.mixins.web_mixin" parent: "signalwire.core.mixins" @@ -14,31 +14,396 @@ lustri: --- # `web_mixin` -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. +Mixin class containing all web server and routing-related methods for AgentBase ## Signature ```python -module web_mixin +class WebMixin ``` ## Constants -## Classes +## Methods + +### as\_router + +Get a FastAPI router for this agent + +#### Signature + +```python +as_router() -> APIRouter +``` + +#### Returns + +`APIRouter` — FastAPI router + +#### Source + +[`signalwire/signalwire/core/mixins/web_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/web_mixin.py) + +Line 133. + +*** + +### enable\_debug\_routes + +Enable debug routes for testing and development + +#### Signature + +```python +enable_debug_routes() -> AgentBase +``` + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/web_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/web_mixin.py) + +Line 1244. + +*** + +### get\_app + +Get the FastAPI application instance for deployment adapters like Lambda/Mangum + +This method ensures the FastAPI app is properly initialized and configured, +then returns it for use with deployment adapters like Mangum for AWS Lambda. + +#### Signature + +```python +get_app() +``` + +#### Returns + +The configured FastAPI application instance + +#### Source + +[`signalwire/signalwire/core/mixins/web_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/web_mixin.py) + +Line 41. + +*** + +### manual\_set\_proxy\_url + +Manually set the proxy URL base for webhook callbacks + +This can be called at runtime to set or update the proxy URL + +#### Signature + +```python +manual_set_proxy_url(proxy_url: str) -> AgentBase +``` + +#### Parameters + + + The base URL to use for webhooks (e.g., https://example.ngrok.io) + + +#### Returns + +`AgentBase` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/mixins/web_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/web_mixin.py) + +Line 1191. + +*** + +### on\_request + +Called when SWML is requested, with request data when available + +This method overrides SWMLService's on\_request to properly handle SWML generation +for AI Agents. + +#### Signature + +```python +on_request( + request_data: Optional[dict] = None, + callback_path: Optional[str] = None +) -> Optional[dict] +``` + +#### Parameters + + + Optional dictionary containing the parsed POST body + + + + Optional callback path + + +#### Returns + +`Optional[dict]` — None to use the default SWML rendering (which will call \_render\_swml) + +#### Source + +[`signalwire/signalwire/core/mixins/web_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/web_mixin.py) + +Line 1079. + +*** + +### on\_swml\_request + +Customization point for subclasses to modify SWML based on request data + +#### Signature + +```python +on_swml_request( + request_data: Optional[dict] = None, + callback_path: Optional[str] = None, + request: Optional[Request] = None +) -> Optional[dict] +``` + +#### Parameters + + + Optional dictionary containing the parsed POST body + + + + Optional callback path + + + + Optional FastAPI Request object for accessing query params, headers, etc. + + +#### Returns + +`Optional[dict]` — Optional dict with modifications to apply to the SWML document + +#### Source + +[`signalwire/signalwire/core/mixins/web_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/web_mixin.py) - - - Mixin class containing all web server and routing-related methods for AgentBase - - +Line 1100. + +*** + +### register\_routing\_callback + +Register a callback function that will be called to determine routing +based on POST data. + +When a routing callback is registered, an endpoint at the specified path is automatically +created that will handle requests. This endpoint will use the callback to +determine if the request should be processed by this service or redirected. + +The callback should take a request object and request body dictionary and return: + +- A route string if it should be routed to a different endpoint +- None if normal processing should continue + +#### Signature + +```python +register_routing_callback( + callback_fn: Callable[Request, Dict[str, Any], Optional[str]], + path: str = '/sip' +) -> None +``` + +#### Parameters + + + The callback function to register + + + + The path where this callback should be registered (default: "/sip") + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/core/mixins/web_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/web_mixin.py) + +Line 1131. + +*** + +### run + +Smart run method that automatically detects environment and handles accordingly + +#### Signature + +```python +run( + event = None, + context = None, + force_mode = None, + host: Optional[str] = None, + port: Optional[int] = None +) +``` + +#### Parameters + + + Serverless event object (Lambda, Cloud Functions) + + + + Serverless context object (Lambda, Cloud Functions) + + + + Override automatic mode detection for testing + + + + Host override for server mode + + + + Port override for server mode + + +#### Returns + +Response for serverless modes, None for server mode + +#### Source + +[`signalwire/signalwire/core/mixins/web_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/web_mixin.py) + +Line 305. + +*** + +### serve + +Start a web server for this agent + +#### Signature + +```python +serve(host: Optional[str] = None, port: Optional[int] = None) -> None +``` + +#### Parameters + + + Optional host to override the default + + + + Optional port to override the default + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/core/mixins/web_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/web_mixin.py) + +Line 153. + +*** + +### set\_dynamic\_config\_callback + +Set a callback function for dynamic agent configuration + +This callback receives the actual agent instance, allowing you to dynamically +configure ANY aspect of the agent including adding skills, modifying prompts, +changing parameters, etc. based on request data. + +> \[!NOTE] +> def my\_config(query\_params, body\_params, headers, agent): +> if query\_params.get('tier') == 'premium': +> agent.add\_skill("advanced\_search") +> agent.add\_language("English", "en-US", "premium\_voice") +> agent.set\_params(\{"end\_of\_speech\_timeout": 500\}) +> agent.set\_global\_data(\{"tier": query\_params.get('tier', 'standard')\}) +> +> my\_agent.set\_dynamic\_config\_callback(my\_config) + +#### Signature + +```python +set_dynamic_config_callback( + callback: Callable[dict, dict, dict, AgentBase, None] +) -> AgentBase +``` + +#### Parameters + + + Function that takes (query\_params, body\_params, headers, agent) and configures the agent using any available methods like: - agent.add\_skill(...) - agent.add\_language(...) - agent.prompt\_add\_section(...) - agent.set\_params(...) - agent.set\_global\_data(...) - agent.define\_tool(...) + + +#### Returns + +`AgentBase` + +#### Examples + +```python +my_agent.set_dynamic_config_callback(my_config) +``` + +#### Source + +[`signalwire/signalwire/core/mixins/web_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/web_mixin.py) + +Line 1160. + +*** + +### setup\_graceful\_shutdown + +Setup signal handlers for graceful shutdown (useful for Kubernetes) + +#### Signature + +```python +setup_graceful_shutdown() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/core/mixins/web_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/web_mixin.py) + +Line 1218. ## Source [`signalwire/signalwire/core/mixins/web_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/web_mixin.py) + +Line 36. diff --git a/fern/products/sdk-reference/python/agents/mixins/web-mixin/web-mixin/index.mdx b/fern/products/sdk-reference/python/agents/mixins/web-mixin/web-mixin/index.mdx deleted file mode 100644 index a633ef01d1..0000000000 --- a/fern/products/sdk-reference/python/agents/mixins/web-mixin/web-mixin/index.mdx +++ /dev/null @@ -1,405 +0,0 @@ ---- -slug: "/reference/python/agents/mixins/web-mixin/web-mixin" -title: "WebMixin" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.core.mixins.web_mixin.WebMixin" - parent: "signalwire.core.mixins.web_mixin" - module: "agents.mixins.web_mixin" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/web_mixin.py" ---- -# `WebMixin` - -Mixin class containing all web server and routing-related methods for AgentBase - -## Signature - -```python -class WebMixin -``` - -## Methods - -### as\_router - -Get a FastAPI router for this agent - -#### Signature - -```python -as_router() -> APIRouter -``` - -#### Returns - -`APIRouter` — FastAPI router - -#### Source - -[`signalwire/signalwire/core/mixins/web_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/web_mixin.py) - -Line 133. - -*** - -### enable\_debug\_routes - -Enable debug routes for testing and development - -#### Signature - -```python -enable_debug_routes() -> AgentBase -``` - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/mixins/web_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/web_mixin.py) - -Line 1244. - -*** - -### get\_app - -Get the FastAPI application instance for deployment adapters like Lambda/Mangum - -This method ensures the FastAPI app is properly initialized and configured, -then returns it for use with deployment adapters like Mangum for AWS Lambda. - -#### Signature - -```python -get_app() -``` - -#### Returns - -The configured FastAPI application instance - -#### Source - -[`signalwire/signalwire/core/mixins/web_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/web_mixin.py) - -Line 41. - -*** - -### manual\_set\_proxy\_url - -Manually set the proxy URL base for webhook callbacks - -This can be called at runtime to set or update the proxy URL - -#### Signature - -```python -manual_set_proxy_url(proxy_url: str) -> AgentBase -``` - -#### Parameters - - - The base URL to use for webhooks (e.g., https://example.ngrok.io) - - -#### Returns - -`AgentBase` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/mixins/web_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/web_mixin.py) - -Line 1191. - -*** - -### on\_request - -Called when SWML is requested, with request data when available - -This method overrides SWMLService's on\_request to properly handle SWML generation -for AI Agents. - -#### Signature - -```python -on_request( - request_data: Optional[dict] = None, - callback_path: Optional[str] = None -) -> Optional[dict] -``` - -#### Parameters - - - Optional dictionary containing the parsed POST body - - - - Optional callback path - - -#### Returns - -`Optional[dict]` — None to use the default SWML rendering (which will call \_render\_swml) - -#### Source - -[`signalwire/signalwire/core/mixins/web_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/web_mixin.py) - -Line 1079. - -*** - -### on\_swml\_request - -Customization point for subclasses to modify SWML based on request data - -#### Signature - -```python -on_swml_request( - request_data: Optional[dict] = None, - callback_path: Optional[str] = None, - request: Optional[Request] = None -) -> Optional[dict] -``` - -#### Parameters - - - Optional dictionary containing the parsed POST body - - - - Optional callback path - - - - Optional FastAPI Request object for accessing query params, headers, etc. - - -#### Returns - -`Optional[dict]` — Optional dict with modifications to apply to the SWML document - -#### Source - -[`signalwire/signalwire/core/mixins/web_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/web_mixin.py) - -Line 1100. - -*** - -### register\_routing\_callback - -Register a callback function that will be called to determine routing -based on POST data. - -When a routing callback is registered, an endpoint at the specified path is automatically -created that will handle requests. This endpoint will use the callback to -determine if the request should be processed by this service or redirected. - -The callback should take a request object and request body dictionary and return: - -- A route string if it should be routed to a different endpoint -- None if normal processing should continue - -#### Signature - -```python -register_routing_callback( - callback_fn: Callable[Request, Dict[str, Any], Optional[str]], - path: str = '/sip' -) -> None -``` - -#### Parameters - - - The callback function to register - - - - The path where this callback should be registered (default: "/sip") - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/core/mixins/web_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/web_mixin.py) - -Line 1131. - -*** - -### run - -Smart run method that automatically detects environment and handles accordingly - -#### Signature - -```python -run( - event = None, - context = None, - force_mode = None, - host: Optional[str] = None, - port: Optional[int] = None -) -``` - -#### Parameters - - - Serverless event object (Lambda, Cloud Functions) - - - - Serverless context object (Lambda, Cloud Functions) - - - - Override automatic mode detection for testing - - - - Host override for server mode - - - - Port override for server mode - - -#### Returns - -Response for serverless modes, None for server mode - -#### Source - -[`signalwire/signalwire/core/mixins/web_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/web_mixin.py) - -Line 305. - -*** - -### serve - -Start a web server for this agent - -#### Signature - -```python -serve(host: Optional[str] = None, port: Optional[int] = None) -> None -``` - -#### Parameters - - - Optional host to override the default - - - - Optional port to override the default - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/core/mixins/web_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/web_mixin.py) - -Line 153. - -*** - -### set\_dynamic\_config\_callback - -Set a callback function for dynamic agent configuration - -This callback receives the actual agent instance, allowing you to dynamically -configure ANY aspect of the agent including adding skills, modifying prompts, -changing parameters, etc. based on request data. - -> \[!NOTE] -> def my\_config(query\_params, body\_params, headers, agent): -> if query\_params.get('tier') == 'premium': -> agent.add\_skill("advanced\_search") -> agent.add\_language("English", "en-US", "premium\_voice") -> agent.set\_params(\{"end\_of\_speech\_timeout": 500\}) -> agent.set\_global\_data(\{"tier": query\_params.get('tier', 'standard')\}) -> -> my\_agent.set\_dynamic\_config\_callback(my\_config) - -#### Signature - -```python -set_dynamic_config_callback( - callback: Callable[dict, dict, dict, AgentBase, None] -) -> AgentBase -``` - -#### Parameters - - - Function that takes (query\_params, body\_params, headers, agent) and configures the agent using any available methods like: - agent.add\_skill(...) - agent.add\_language(...) - agent.prompt\_add\_section(...) - agent.set\_params(...) - agent.set\_global\_data(...) - agent.define\_tool(...) - - -#### Returns - -`AgentBase` - -#### Examples - -```python -my_agent.set_dynamic_config_callback(my_config) -``` - -#### Source - -[`signalwire/signalwire/core/mixins/web_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/web_mixin.py) - -Line 1160. - -*** - -### setup\_graceful\_shutdown - -Setup signal handlers for graceful shutdown (useful for Kubernetes) - -#### Signature - -```python -setup_graceful_shutdown() -> None -``` - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/core/mixins/web_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/web_mixin.py) - -Line 1218. - -## Source - -[`signalwire/signalwire/core/mixins/web_mixin.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/mixins/web_mixin.py) - -Line 36. diff --git a/fern/products/sdk-reference/python/agents/pom-builder/index.mdx b/fern/products/sdk-reference/python/agents/pom-builder/index.mdx index 5f2a4b5f5e..18b989fe16 100644 --- a/fern/products/sdk-reference/python/agents/pom-builder/index.mdx +++ b/fern/products/sdk-reference/python/agents/pom-builder/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.core.pom_builder" parent: "agents" @@ -14,19 +14,368 @@ lustri: --- # `pom_builder` -Copyright (c) 2025 SignalWire +Builder class for creating structured prompts using the Prompt Object Model. -This file is part of the SignalWire SDK. +This class is a flexible wrapper around the POM API that allows for: -Licensed under the MIT License. -See LICENSE file in the project root for full license information. +- Dynamic creation of sections on demand +- Adding content to existing sections +- Nesting subsections +- Rendering to markdown or XML + +Unlike previous implementations, there are no predefined section types - +you can create any section structure that fits your needs. ## Signature ```python -module pom_builder +class PomBuilder +``` + +## Properties + + + +## Methods + +### \_\_init\_\_ + +Initialize a new POM builder with an empty POM + +#### Signature + +```python +__init__() +``` + +#### Source + +[`signalwire/signalwire/core/pom_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/pom_builder.py) + +Line 33. + +*** + +### add\_section + +Add a new section to the POM + +#### Signature + +```python +add_section( + title: str, + body: str = '', + bullets: Optional[List[str]] = None, + numbered: bool = False, + numbered_bullets: bool = False, + subsections: Optional[List[Dict[str, Any]]] = None +) -> PomBuilder ``` +#### Parameters + + + Section title + + + + Optional body text + + + + Optional list of bullet points + + + + Whether to number this section + + + + Whether to number bullet points + + + + Optional list of subsection objects + + +#### Returns + +`PomBuilder` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/pom_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/pom_builder.py) + +Line 38. + +*** + +### add\_subsection + +Add a subsection to an existing section, creating the parent if needed + +#### Signature + +```python +add_subsection( + parent_title: str, + title: str, + body: str = '', + bullets: Optional[List[str]] = None +) -> PomBuilder +``` + +#### Parameters + + + Title of the parent section + + + + Title for the new subsection + + + + Optional body text + + + + Optional list of bullet points + + +#### Returns + +`PomBuilder` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/pom_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/pom_builder.py) + +Line 115. + +*** + +### add\_to\_section + +Add content to an existing section + +#### Signature + +```python +add_to_section( + title: str, + body: Optional[str] = None, + bullet: Optional[str] = None, + bullets: Optional[List[str]] = None +) -> PomBuilder +``` + +#### Parameters + + + Section title + + + + Text to append to the section body + + + + Single bullet to add + + + + List of bullets to add + + +#### Returns + +`PomBuilder` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/pom_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/pom_builder.py) + +Line 80. + +*** + +### from\_sections + +Create a PomBuilder from a list of section dictionaries + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +from_sections(sections: List[Dict[str, Any]]) -> PomBuilder +``` + +#### Parameters + + + List of section definition dictionaries + + +#### Returns + +`PomBuilder` — A new PomBuilder instance with the sections added + +#### Source + +[`signalwire/signalwire/core/pom_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/pom_builder.py) + +Line 181. + +*** + +### get\_section + +Get a section by title + +#### Signature + +```python +get_section(title: str) -> Optional[Section] +``` + +#### Parameters + + + Section title + + +#### Returns + +`Optional[Section]` — Section object or None if not found + +#### Source + +[`signalwire/signalwire/core/pom_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/pom_builder.py) + +Line 153. + +*** + +### has\_section + +Check if a section with the given title exists + +#### Signature + +```python +has_section(title: str) -> bool +``` + +#### Parameters + + + Section title to check + + +#### Returns + +`bool` — True if the section exists, False otherwise + +#### Source + +[`signalwire/signalwire/core/pom_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/pom_builder.py) + +Line 141. + +*** + +### render\_markdown + +Render the POM as markdown + +#### Signature + +```python +render_markdown() -> str +``` + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/core/pom_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/pom_builder.py) + +Line 165. + +*** + +### render\_xml + +Render the POM as XML + +#### Signature + +```python +render_xml() -> str +``` + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/core/pom_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/pom_builder.py) + +Line 169. + +*** + +### to\_dict + +Convert the POM to a list of section dictionaries + +#### Signature + +```python +to_dict() -> List[Dict[str, Any]] +``` + +#### Returns + +`List[Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/core/pom_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/pom_builder.py) + +Line 173. + +*** + +### to\_json + +Convert the POM to a JSON string + +#### Signature + +```python +to_json() -> str +``` + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/core/pom_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/pom_builder.py) + +Line 177. + ## Source [`signalwire/signalwire/core/pom_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/pom_builder.py) + +Line 19. diff --git a/fern/products/sdk-reference/python/agents/pom-builder/index__2.mdx b/fern/products/sdk-reference/python/agents/pom-builder/index__2.mdx deleted file mode 100644 index 4df93e3cb8..0000000000 --- a/fern/products/sdk-reference/python/agents/pom-builder/index__2.mdx +++ /dev/null @@ -1,381 +0,0 @@ ---- -slug: "/reference/python/agents/pom-builder/index__2" -title: "PomBuilder" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.core.pom_builder.PomBuilder" - parent: "agents" - module: "agents" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/pom_builder.py" ---- -# `PomBuilder` - -Builder class for creating structured prompts using the Prompt Object Model. - -This class is a flexible wrapper around the POM API that allows for: - -- Dynamic creation of sections on demand -- Adding content to existing sections -- Nesting subsections -- Rendering to markdown or XML - -Unlike previous implementations, there are no predefined section types - -you can create any section structure that fits your needs. - -## Signature - -```python -class PomBuilder -``` - -## Properties - - - -## Methods - -### \_\_init\_\_ - -Initialize a new POM builder with an empty POM - -#### Signature - -```python -__init__() -``` - -#### Source - -[`signalwire/signalwire/core/pom_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/pom_builder.py) - -Line 33. - -*** - -### add\_section - -Add a new section to the POM - -#### Signature - -```python -add_section( - title: str, - body: str = '', - bullets: Optional[List[str]] = None, - numbered: bool = False, - numbered_bullets: bool = False, - subsections: Optional[List[Dict[str, Any]]] = None -) -> PomBuilder -``` - -#### Parameters - - - Section title - - - - Optional body text - - - - Optional list of bullet points - - - - Whether to number this section - - - - Whether to number bullet points - - - - Optional list of subsection objects - - -#### Returns - -`PomBuilder` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/pom_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/pom_builder.py) - -Line 38. - -*** - -### add\_subsection - -Add a subsection to an existing section, creating the parent if needed - -#### Signature - -```python -add_subsection( - parent_title: str, - title: str, - body: str = '', - bullets: Optional[List[str]] = None -) -> PomBuilder -``` - -#### Parameters - - - Title of the parent section - - - - Title for the new subsection - - - - Optional body text - - - - Optional list of bullet points - - -#### Returns - -`PomBuilder` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/pom_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/pom_builder.py) - -Line 115. - -*** - -### add\_to\_section - -Add content to an existing section - -#### Signature - -```python -add_to_section( - title: str, - body: Optional[str] = None, - bullet: Optional[str] = None, - bullets: Optional[List[str]] = None -) -> PomBuilder -``` - -#### Parameters - - - Section title - - - - Text to append to the section body - - - - Single bullet to add - - - - List of bullets to add - - -#### Returns - -`PomBuilder` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/pom_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/pom_builder.py) - -Line 80. - -*** - -### from\_sections - -Create a PomBuilder from a list of section dictionaries - -**Modifiers:** `classmethod` - -#### Signature - -```python -@classmethod -from_sections(sections: List[Dict[str, Any]]) -> PomBuilder -``` - -#### Parameters - - - List of section definition dictionaries - - -#### Returns - -`PomBuilder` — A new PomBuilder instance with the sections added - -#### Source - -[`signalwire/signalwire/core/pom_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/pom_builder.py) - -Line 181. - -*** - -### get\_section - -Get a section by title - -#### Signature - -```python -get_section(title: str) -> Optional[Section] -``` - -#### Parameters - - - Section title - - -#### Returns - -`Optional[Section]` — Section object or None if not found - -#### Source - -[`signalwire/signalwire/core/pom_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/pom_builder.py) - -Line 153. - -*** - -### has\_section - -Check if a section with the given title exists - -#### Signature - -```python -has_section(title: str) -> bool -``` - -#### Parameters - - - Section title to check - - -#### Returns - -`bool` — True if the section exists, False otherwise - -#### Source - -[`signalwire/signalwire/core/pom_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/pom_builder.py) - -Line 141. - -*** - -### render\_markdown - -Render the POM as markdown - -#### Signature - -```python -render_markdown() -> str -``` - -#### Returns - -`str` - -#### Source - -[`signalwire/signalwire/core/pom_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/pom_builder.py) - -Line 165. - -*** - -### render\_xml - -Render the POM as XML - -#### Signature - -```python -render_xml() -> str -``` - -#### Returns - -`str` - -#### Source - -[`signalwire/signalwire/core/pom_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/pom_builder.py) - -Line 169. - -*** - -### to\_dict - -Convert the POM to a list of section dictionaries - -#### Signature - -```python -to_dict() -> List[Dict[str, Any]] -``` - -#### Returns - -`List[Dict[str, Any]]` - -#### Source - -[`signalwire/signalwire/core/pom_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/pom_builder.py) - -Line 173. - -*** - -### to\_json - -Convert the POM to a JSON string - -#### Signature - -```python -to_json() -> str -``` - -#### Returns - -`str` - -#### Source - -[`signalwire/signalwire/core/pom_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/pom_builder.py) - -Line 177. - -## Source - -[`signalwire/signalwire/core/pom_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/pom_builder.py) - -Line 19. diff --git a/fern/products/sdk-reference/python/agents/prefabs/concierge/concierge-agent/index.mdx b/fern/products/sdk-reference/python/agents/prefabs/concierge/concierge-agent/index.mdx deleted file mode 100644 index e6b6eed60b..0000000000 --- a/fern/products/sdk-reference/python/agents/prefabs/concierge/concierge-agent/index.mdx +++ /dev/null @@ -1,210 +0,0 @@ ---- -slug: "/reference/python/agents/prefabs/concierge/concierge-agent" -title: "ConciergeAgent" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.prefabs.concierge.ConciergeAgent" - parent: "signalwire.prefabs.concierge" - module: "agents.prefabs.concierge" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/concierge.py" ---- -# `ConciergeAgent` - -A prefab agent designed to act as a virtual concierge, providing information -and services to users. - -This agent will: - -1. Welcome users and explain available services -2. Answer questions about amenities, hours, and directions -3. Help with bookings and reservations -4. Provide personalized recommendations - -> \[!NOTE] -> agent = ConciergeAgent( -> venue\_name="Grand Hotel", -> services=\["room service", "spa bookings", "restaurant reservations"], -> amenities=\{ -> "pool": \{"hours": "7 AM - 10 PM", "location": "2nd Floor"\}, -> "gym": \{"hours": "24 hours", "location": "3rd Floor"\} -> \} -> ) - -## Signature - -```python -class ConciergeAgent(AgentBase) -``` - -## Inheritance - -**Extends:** [AgentBase](/docs/sdk-reference/reference/python/agents/agent-base/index__2) - -## Properties - - - - - - - - - - - -## Methods - -### \_\_init\_\_ - -Initialize a concierge agent - -#### Signature - -```python -__init__( - venue_name: str, - services: List[str], - amenities: Dict[str, Dict[str, str]], - hours_of_operation: Optional[Dict[str, str]] = None, - special_instructions: Optional[List[str]] = None, - welcome_message: Optional[str] = None, - name: str = 'concierge', - route: str = '/concierge', - **kwargs = {} -) -``` - -#### Parameters - - - Name of the venue or business - - - - List of services offered - - - - Dictionary of amenities with details - - - - Optional dictionary of operating hours - - - - Optional list of special instructions - - - - Optional custom welcome message - - - - Agent name for the route - - - - HTTP route for this agent - - - - -#### Source - -[`signalwire/signalwire/prefabs/concierge.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/concierge.py) - -Line 45. - -*** - -### check\_availability - -Check availability for a service on a specific date and time - -This is a simulated function that would typically connect to a real booking system. -In this example, it returns a mock availability response. - -**Decorators:** `@AgentBase.tool(Any, Any, Any)` - -#### Signature - -```python -check_availability(args, raw_data) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/prefabs/concierge.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/concierge.py) - -Line 184. - -*** - -### get\_directions - -Provide directions to a specific location or amenity - -**Decorators:** `@AgentBase.tool(Any, Any, Any)` - -#### Signature - -```python -get_directions(args, raw_data) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/prefabs/concierge.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/concierge.py) - -Line 226. - -*** - -### on\_summary - -Process the interaction summary - -#### Signature - -```python -on_summary(summary, raw_data = None) -``` - -#### Parameters - - - Summary data from the conversation - - - - The complete raw POST data from the request - - -#### Source - -[`signalwire/signalwire/prefabs/concierge.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/concierge.py) - -Line 253. - -## Source - -[`signalwire/signalwire/prefabs/concierge.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/concierge.py) - -Line 23. diff --git a/fern/products/sdk-reference/python/agents/prefabs/concierge/index.mdx b/fern/products/sdk-reference/python/agents/prefabs/concierge/index.mdx index 49cf9267f7..a9b73694ce 100644 --- a/fern/products/sdk-reference/python/agents/prefabs/concierge/index.mdx +++ b/fern/products/sdk-reference/python/agents/prefabs/concierge/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.prefabs.concierge" parent: "signalwire.prefabs" @@ -14,27 +14,197 @@ lustri: --- # `concierge` -Copyright (c) 2025 SignalWire +A prefab agent designed to act as a virtual concierge, providing information +and services to users. -This file is part of the SignalWire SDK. +This agent will: -Licensed under the MIT License. -See LICENSE file in the project root for full license information. +1. Welcome users and explain available services +2. Answer questions about amenities, hours, and directions +3. Help with bookings and reservations +4. Provide personalized recommendations + +> \[!NOTE] +> agent = ConciergeAgent( +> venue\_name="Grand Hotel", +> services=\["room service", "spa bookings", "restaurant reservations"], +> amenities=\{ +> "pool": \{"hours": "7 AM - 10 PM", "location": "2nd Floor"\}, +> "gym": \{"hours": "24 hours", "location": "3rd Floor"\} +> \} +> ) ## Signature ```python -module concierge +class ConciergeAgent(AgentBase) +``` + +## Inheritance + +**Extends:** `AgentBase` + +## Properties + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +Initialize a concierge agent + +#### Signature + +```python +__init__( + venue_name: str, + services: List[str], + amenities: Dict[str, Dict[str, str]], + hours_of_operation: Optional[Dict[str, str]] = None, + special_instructions: Optional[List[str]] = None, + welcome_message: Optional[str] = None, + name: str = 'concierge', + route: str = '/concierge', + **kwargs = {} +) +``` + +#### Parameters + + + Name of the venue or business + + + + List of services offered + + + + Dictionary of amenities with details + + + + Optional dictionary of operating hours + + + + Optional list of special instructions + + + + Optional custom welcome message + + + + Agent name for the route + + + + HTTP route for this agent + + + + +#### Source + +[`signalwire/signalwire/prefabs/concierge.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/concierge.py) + +Line 45. + +*** + +### check\_availability + +Check availability for a service on a specific date and time + +This is a simulated function that would typically connect to a real booking system. +In this example, it returns a mock availability response. + +**Decorators:** `@AgentBase.tool(Any, Any, Any)` + +#### Signature + +```python +check_availability(args, raw_data) ``` -## Classes +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/prefabs/concierge.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/concierge.py) + +Line 184. + +*** + +### get\_directions + +Provide directions to a specific location or amenity + +**Decorators:** `@AgentBase.tool(Any, Any, Any)` + +#### Signature + +```python +get_directions(args, raw_data) +``` + +#### Parameters + + + + - - - A prefab agent designed to act as a virtual concierge, providing information and services to users. - - +#### Source + +[`signalwire/signalwire/prefabs/concierge.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/concierge.py) + +Line 226. + +*** + +### on\_summary + +Process the interaction summary + +#### Signature + +```python +on_summary(summary, raw_data = None) +``` + +#### Parameters + + + Summary data from the conversation + + + + The complete raw POST data from the request + + +#### Source + +[`signalwire/signalwire/prefabs/concierge.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/concierge.py) + +Line 253. ## Source [`signalwire/signalwire/prefabs/concierge.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/concierge.py) + +Line 23. diff --git a/fern/products/sdk-reference/python/agents/prefabs/faq-bot/faq-bot-agent/index.mdx b/fern/products/sdk-reference/python/agents/prefabs/faq-bot/faq-bot-agent/index.mdx deleted file mode 100644 index afabdecdbb..0000000000 --- a/fern/products/sdk-reference/python/agents/prefabs/faq-bot/faq-bot-agent/index.mdx +++ /dev/null @@ -1,168 +0,0 @@ ---- -slug: "/reference/python/agents/prefabs/faq-bot/faq-bot-agent" -title: "FAQBotAgent" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.prefabs.faq_bot.FAQBotAgent" - parent: "signalwire.prefabs.faq_bot" - module: "agents.prefabs.faq_bot" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/faq_bot.py" ---- -# `FAQBotAgent` - -A prefab agent designed to answer frequently asked questions based on -a provided list of question/answer pairs. - -This agent will: - -1. Match user questions against the FAQ database -2. Provide the most relevant answer -3. Suggest other relevant questions when appropriate - -> \[!NOTE] -> agent = FAQBotAgent( -> faqs=\[ -> \{ -> "question": "What is SignalWire?", -> "answer": "SignalWire is a developer-friendly cloud communications platform." -> \}, -> \{ -> "question": "How much does it cost?", -> "answer": "SignalWire offers pay-as-you-go pricing with no monthly fees." -> \} -> ] -> ) - -## Signature - -```python -class FAQBotAgent(AgentBase) -``` - -## Inheritance - -**Extends:** [AgentBase](/docs/sdk-reference/reference/python/agents/agent-base/index__2) - -## Properties - - - - - - - -## Methods - -### \_\_init\_\_ - -Initialize an FAQ bot agent - -#### Signature - -```python -__init__( - faqs: List[Dict[str, str]], - suggest_related: bool = True, - persona: Optional[str] = None, - name: str = 'faq_bot', - route: str = '/faq', - **kwargs = {} -) -``` - -#### Parameters - - - List of FAQ items, each with: - - - - Whether to suggest related questions - - - - Optional custom personality description - - - - Agent name for the route - - - - HTTP route for this agent - - - - -#### Source - -[`signalwire/signalwire/prefabs/faq_bot.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/faq_bot.py) - -Line 47. - -*** - -### on\_summary - -Process the interaction summary - -#### Signature - -```python -on_summary(summary, raw_data = None) -``` - -#### Parameters - - - Summary data from the conversation - - - - The complete raw POST data from the request - - -#### Source - -[`signalwire/signalwire/prefabs/faq_bot.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/faq_bot.py) - -Line 287. - -*** - -### search\_faqs - -Search for FAQs matching a specific query or category - -This function helps find relevant FAQs based on a search query or category. -It returns matching FAQs in order of relevance. - -**Decorators:** `@AgentBase.tool(Any, Any, Any)` - -#### Signature - -```python -search_faqs(args, raw_data) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/prefabs/faq_bot.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/faq_bot.py) - -Line 216. - -## Source - -[`signalwire/signalwire/prefabs/faq_bot.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/faq_bot.py) - -Line 22. diff --git a/fern/products/sdk-reference/python/agents/prefabs/faq-bot/index.mdx b/fern/products/sdk-reference/python/agents/prefabs/faq-bot/index.mdx index e249b85a88..c23e0bcccd 100644 --- a/fern/products/sdk-reference/python/agents/prefabs/faq-bot/index.mdx +++ b/fern/products/sdk-reference/python/agents/prefabs/faq-bot/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.prefabs.faq_bot" parent: "signalwire.prefabs" @@ -14,27 +14,155 @@ lustri: --- # `faq_bot` -Copyright (c) 2025 SignalWire +A prefab agent designed to answer frequently asked questions based on +a provided list of question/answer pairs. -This file is part of the SignalWire SDK. +This agent will: -Licensed under the MIT License. -See LICENSE file in the project root for full license information. +1. Match user questions against the FAQ database +2. Provide the most relevant answer +3. Suggest other relevant questions when appropriate + +> \[!NOTE] +> agent = FAQBotAgent( +> faqs=\[ +> \{ +> "question": "What is SignalWire?", +> "answer": "SignalWire is a developer-friendly cloud communications platform." +> \}, +> \{ +> "question": "How much does it cost?", +> "answer": "SignalWire offers pay-as-you-go pricing with no monthly fees." +> \} +> ] +> ) ## Signature ```python -module faq_bot +class FAQBotAgent(AgentBase) +``` + +## Inheritance + +**Extends:** `AgentBase` + +## Properties + + + + + + + +## Methods + +### \_\_init\_\_ + +Initialize an FAQ bot agent + +#### Signature + +```python +__init__( + faqs: List[Dict[str, str]], + suggest_related: bool = True, + persona: Optional[str] = None, + name: str = 'faq_bot', + route: str = '/faq', + **kwargs = {} +) +``` + +#### Parameters + + + List of FAQ items, each with: + + + + Whether to suggest related questions + + + + Optional custom personality description + + + + Agent name for the route + + + + HTTP route for this agent + + + + +#### Source + +[`signalwire/signalwire/prefabs/faq_bot.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/faq_bot.py) + +Line 47. + +*** + +### on\_summary + +Process the interaction summary + +#### Signature + +```python +on_summary(summary, raw_data = None) ``` -## Classes +#### Parameters + + + Summary data from the conversation + + + + The complete raw POST data from the request + + +#### Source + +[`signalwire/signalwire/prefabs/faq_bot.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/faq_bot.py) + +Line 287. + +*** + +### search\_faqs + +Search for FAQs matching a specific query or category - - - A prefab agent designed to answer frequently asked questions based on a provided list of question/answer pairs. - - +This function helps find relevant FAQs based on a search query or category. +It returns matching FAQs in order of relevance. + +**Decorators:** `@AgentBase.tool(Any, Any, Any)` + +#### Signature + +```python +search_faqs(args, raw_data) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/prefabs/faq_bot.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/faq_bot.py) + +Line 216. ## Source [`signalwire/signalwire/prefabs/faq_bot.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/faq_bot.py) + +Line 22. diff --git a/fern/products/sdk-reference/python/agents/prefabs/index.mdx b/fern/products/sdk-reference/python/agents/prefabs/index.mdx index 7c2318acc9..9ce92ecaf7 100644 --- a/fern/products/sdk-reference/python/agents/prefabs/index.mdx +++ b/fern/products/sdk-reference/python/agents/prefabs/index.mdx @@ -31,27 +31,27 @@ module prefabs -## Modules +## Classes - Copyright (c) 2025 SignalWire + A prefab agent designed to act as a virtual concierge, providing information and services to users. - Copyright (c) 2025 SignalWire + A prefab agent designed to answer frequently asked questions based on a provided list of question/answer pairs. - Copyright (c) 2025 SignalWire + A prefab agent designed to collect answers to a series of questions. - Copyright (c) 2025 SignalWire + A prefab agent designed to act as a receptionist that: 1. Greets callers 2. Collects basic information about their needs 3. Transfers them to the appropriate department - Copyright (c) 2025 SignalWire + A prefab agent designed to conduct automated surveys with users. diff --git a/fern/products/sdk-reference/python/agents/prefabs/info-gatherer/index.mdx b/fern/products/sdk-reference/python/agents/prefabs/info-gatherer/index.mdx index c1f36687c9..29290e2ce0 100644 --- a/fern/products/sdk-reference/python/agents/prefabs/info-gatherer/index.mdx +++ b/fern/products/sdk-reference/python/agents/prefabs/info-gatherer/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.prefabs.info_gatherer" parent: "signalwire.prefabs" @@ -14,27 +14,209 @@ lustri: --- # `info_gatherer` -Copyright (c) 2025 SignalWire +A prefab agent designed to collect answers to a series of questions. -This file is part of the SignalWire SDK. +This agent will: -Licensed under the MIT License. -See LICENSE file in the project root for full license information. +1. Ask if the user is ready to begin +2. Ask each question in sequence +3. Store the answers for later use + +> \[!NOTE] +> agent = InfoGathererAgent( +> questions=\[ +> \{"key\_name": "full\_name", "question\_text": "What is your full name?"\}, +> \{"key\_name": "email", "question\_text": "What is your email address?", "confirm": True\}, +> \{"key\_name": "reason", "question\_text": "How can I help you today?"\} +> ] +> ) ## Signature ```python -module info_gatherer +class InfoGathererAgent(AgentBase) +``` + +## Inheritance + +**Extends:** `AgentBase` + +## Methods + +### \_\_init\_\_ + +Initialize an information gathering agent + +#### Signature + +```python +__init__( + questions: Optional[List[Dict[str, str]]] = None, + name: str = 'info_gatherer', + route: str = '/info_gatherer', + **kwargs = {} +) +``` + +#### Parameters + + + Optional list of questions to ask. If None, questions will be determined dynamically via a callback function. Each question dict should have: + + + + Agent name for the route + + + + HTTP route for this agent + + + + +#### Source + +[`signalwire/signalwire/prefabs/info_gatherer.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/info_gatherer.py) + +Line 43. + +*** + +### on\_swml\_request + +Handle dynamic configuration using the callback function + +This method is called when SWML is requested and allows us to configure +the agent just-in-time using the provided callback. + +#### Signature + +```python +on_swml_request(request_data = None, callback_path = None, request = None) +``` + +#### Parameters + + + + + + + +#### Source + +[`signalwire/signalwire/prefabs/info_gatherer.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/info_gatherer.py) + +Line 158. + +*** + +### set\_question\_callback + +Set a callback function for dynamic question configuration + +> \[!NOTE] +> def my\_question\_callback(query\_params, body\_params, headers): +> question\_set = query\_params.get('set', 'default') +> if question\_set == 'support': +> return \[ +> \{"key\_name": "name", "question\_text": "What is your name?"\}, +> \{"key\_name": "issue", "question\_text": "What's the issue?"\} +> ] +> else: +> return \[\{"key\_name": "name", "question\_text": "What is your name?"\}] +> +> agent.set\_question\_callback(my\_question\_callback) + +#### Signature + +```python +set_question_callback( + callback: Callable[dict, dict, dict, List[Dict[str, str]]] +) ``` -## Classes +#### Parameters - - - A prefab agent designed to collect answers to a series of questions. - - + + Function that takes (query\_params, body\_params, headers) and returns a list of question dictionaries. Each question dict should have: - key\_name: Identifier for storing the answer - question\_text: The actual question to ask the user - confirm: (Optional) If True, agent will confirm answer before submitting + + +#### Examples + +```python +agent.set_question_callback(my_question_callback) +``` + +#### Source + +[`signalwire/signalwire/prefabs/info_gatherer.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/info_gatherer.py) + +Line 93. + +*** + +### start\_questions + +Start the question sequence by retrieving the first question + +This function gets the current question index from global\_data +and returns the corresponding question. + +**Decorators:** `@AgentBase.tool(Any, Any, Any)` + +#### Signature + +```python +start_questions(args, raw_data) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/prefabs/info_gatherer.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/info_gatherer.py) + +Line 258. + +*** + +### submit\_answer + +Submit an answer to the current question and move to the next one + +This function: + +1. Stores the answer in global\_data +2. Increments the question index +3. Returns the next question or completion message + +**Decorators:** `@AgentBase.tool(Any, Any, Any)` + +#### Signature + +```python +submit_answer(args, raw_data) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/prefabs/info_gatherer.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/info_gatherer.py) + +Line 296. ## Source [`signalwire/signalwire/prefabs/info_gatherer.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/info_gatherer.py) + +Line 24. diff --git a/fern/products/sdk-reference/python/agents/prefabs/info-gatherer/info-gatherer-agent/index.mdx b/fern/products/sdk-reference/python/agents/prefabs/info-gatherer/info-gatherer-agent/index.mdx deleted file mode 100644 index 5ce83e98ef..0000000000 --- a/fern/products/sdk-reference/python/agents/prefabs/info-gatherer/info-gatherer-agent/index.mdx +++ /dev/null @@ -1,222 +0,0 @@ ---- -slug: "/reference/python/agents/prefabs/info-gatherer/info-gatherer-agent" -title: "InfoGathererAgent" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.prefabs.info_gatherer.InfoGathererAgent" - parent: "signalwire.prefabs.info_gatherer" - module: "agents.prefabs.info_gatherer" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/info_gatherer.py" ---- -# `InfoGathererAgent` - -A prefab agent designed to collect answers to a series of questions. - -This agent will: - -1. Ask if the user is ready to begin -2. Ask each question in sequence -3. Store the answers for later use - -> \[!NOTE] -> agent = InfoGathererAgent( -> questions=\[ -> \{"key\_name": "full\_name", "question\_text": "What is your full name?"\}, -> \{"key\_name": "email", "question\_text": "What is your email address?", "confirm": True\}, -> \{"key\_name": "reason", "question\_text": "How can I help you today?"\} -> ] -> ) - -## Signature - -```python -class InfoGathererAgent(AgentBase) -``` - -## Inheritance - -**Extends:** [AgentBase](/docs/sdk-reference/reference/python/agents/agent-base/index__2) - -## Methods - -### \_\_init\_\_ - -Initialize an information gathering agent - -#### Signature - -```python -__init__( - questions: Optional[List[Dict[str, str]]] = None, - name: str = 'info_gatherer', - route: str = '/info_gatherer', - **kwargs = {} -) -``` - -#### Parameters - - - Optional list of questions to ask. If None, questions will be determined dynamically via a callback function. Each question dict should have: - - - - Agent name for the route - - - - HTTP route for this agent - - - - -#### Source - -[`signalwire/signalwire/prefabs/info_gatherer.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/info_gatherer.py) - -Line 43. - -*** - -### on\_swml\_request - -Handle dynamic configuration using the callback function - -This method is called when SWML is requested and allows us to configure -the agent just-in-time using the provided callback. - -#### Signature - -```python -on_swml_request(request_data = None, callback_path = None, request = None) -``` - -#### Parameters - - - - - - - -#### Source - -[`signalwire/signalwire/prefabs/info_gatherer.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/info_gatherer.py) - -Line 158. - -*** - -### set\_question\_callback - -Set a callback function for dynamic question configuration - -> \[!NOTE] -> def my\_question\_callback(query\_params, body\_params, headers): -> question\_set = query\_params.get('set', 'default') -> if question\_set == 'support': -> return \[ -> \{"key\_name": "name", "question\_text": "What is your name?"\}, -> \{"key\_name": "issue", "question\_text": "What's the issue?"\} -> ] -> else: -> return \[\{"key\_name": "name", "question\_text": "What is your name?"\}] -> -> agent.set\_question\_callback(my\_question\_callback) - -#### Signature - -```python -set_question_callback( - callback: Callable[dict, dict, dict, List[Dict[str, str]]] -) -``` - -#### Parameters - - - Function that takes (query\_params, body\_params, headers) and returns a list of question dictionaries. Each question dict should have: - key\_name: Identifier for storing the answer - question\_text: The actual question to ask the user - confirm: (Optional) If True, agent will confirm answer before submitting - - -#### Examples - -```python -agent.set_question_callback(my_question_callback) -``` - -#### Source - -[`signalwire/signalwire/prefabs/info_gatherer.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/info_gatherer.py) - -Line 93. - -*** - -### start\_questions - -Start the question sequence by retrieving the first question - -This function gets the current question index from global\_data -and returns the corresponding question. - -**Decorators:** `@AgentBase.tool(Any, Any, Any)` - -#### Signature - -```python -start_questions(args, raw_data) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/prefabs/info_gatherer.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/info_gatherer.py) - -Line 258. - -*** - -### submit\_answer - -Submit an answer to the current question and move to the next one - -This function: - -1. Stores the answer in global\_data -2. Increments the question index -3. Returns the next question or completion message - -**Decorators:** `@AgentBase.tool(Any, Any, Any)` - -#### Signature - -```python -submit_answer(args, raw_data) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/prefabs/info_gatherer.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/info_gatherer.py) - -Line 296. - -## Source - -[`signalwire/signalwire/prefabs/info_gatherer.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/info_gatherer.py) - -Line 24. diff --git a/fern/products/sdk-reference/python/agents/prefabs/receptionist/index.mdx b/fern/products/sdk-reference/python/agents/prefabs/receptionist/index.mdx index 6513033fc3..01acf6a3a6 100644 --- a/fern/products/sdk-reference/python/agents/prefabs/receptionist/index.mdx +++ b/fern/products/sdk-reference/python/agents/prefabs/receptionist/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.prefabs.receptionist" parent: "signalwire.prefabs" @@ -14,27 +14,109 @@ lustri: --- # `receptionist` -Copyright (c) 2025 SignalWire +A prefab agent designed to act as a receptionist that: -This file is part of the SignalWire SDK. +1. Greets callers +2. Collects basic information about their needs +3. Transfers them to the appropriate department -Licensed under the MIT License. -See LICENSE file in the project root for full license information. +> \[!NOTE] +> agent = ReceptionistAgent( +> departments=\[ +> \{"name": "sales", "description": "For product inquiries, pricing, and purchasing", "number": "+15551235555"\}, +> \{"name": "support", "description": "For technical help and troubleshooting", "number": "+15551236666"\} +> ] +> ) ## Signature ```python -module receptionist +class ReceptionistAgent(AgentBase) ``` -## Classes +## Inheritance - - - A prefab agent designed to act as a receptionist that: 1. Greets callers 2. Collects basic information about their needs 3. Transfers them to the appropriate department - - +**Extends:** `AgentBase` + +## Methods + +### \_\_init\_\_ + +Initialize a receptionist agent + +#### Signature + +```python +__init__( + departments: List[Dict[str, str]], + name: str = 'receptionist', + route: str = '/receptionist', + greeting: str = 'Thank you for calling. How can I help you today?', + voice: str = 'rime.spore', + **kwargs = {} +) +``` + +#### Parameters + + + List of departments to transfer to, each with: + + + + Agent name for the route + + + + HTTP route for this agent + + + + Initial greeting message + + + + Voice ID to use + + + + +#### Source + +[`signalwire/signalwire/prefabs/receptionist.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/receptionist.py) + +Line 37. + +*** + +### on\_summary + +Process the conversation summary + +#### Signature + +```python +on_summary(summary, raw_data = None) +``` + +#### Parameters + + + Summary data from the conversation + + + + The complete raw POST data from the request + + +#### Source + +[`signalwire/signalwire/prefabs/receptionist.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/receptionist.py) + +Line 278. ## Source [`signalwire/signalwire/prefabs/receptionist.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/receptionist.py) + +Line 21. diff --git a/fern/products/sdk-reference/python/agents/prefabs/receptionist/receptionist-agent/index.mdx b/fern/products/sdk-reference/python/agents/prefabs/receptionist/receptionist-agent/index.mdx deleted file mode 100644 index 84f4f097bc..0000000000 --- a/fern/products/sdk-reference/python/agents/prefabs/receptionist/receptionist-agent/index.mdx +++ /dev/null @@ -1,122 +0,0 @@ ---- -slug: "/reference/python/agents/prefabs/receptionist/receptionist-agent" -title: "ReceptionistAgent" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.prefabs.receptionist.ReceptionistAgent" - parent: "signalwire.prefabs.receptionist" - module: "agents.prefabs.receptionist" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/receptionist.py" ---- -# `ReceptionistAgent` - -A prefab agent designed to act as a receptionist that: - -1. Greets callers -2. Collects basic information about their needs -3. Transfers them to the appropriate department - -> \[!NOTE] -> agent = ReceptionistAgent( -> departments=\[ -> \{"name": "sales", "description": "For product inquiries, pricing, and purchasing", "number": "+15551235555"\}, -> \{"name": "support", "description": "For technical help and troubleshooting", "number": "+15551236666"\} -> ] -> ) - -## Signature - -```python -class ReceptionistAgent(AgentBase) -``` - -## Inheritance - -**Extends:** [AgentBase](/docs/sdk-reference/reference/python/agents/agent-base/index__2) - -## Methods - -### \_\_init\_\_ - -Initialize a receptionist agent - -#### Signature - -```python -__init__( - departments: List[Dict[str, str]], - name: str = 'receptionist', - route: str = '/receptionist', - greeting: str = 'Thank you for calling. How can I help you today?', - voice: str = 'rime.spore', - **kwargs = {} -) -``` - -#### Parameters - - - List of departments to transfer to, each with: - - - - Agent name for the route - - - - HTTP route for this agent - - - - Initial greeting message - - - - Voice ID to use - - - - -#### Source - -[`signalwire/signalwire/prefabs/receptionist.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/receptionist.py) - -Line 37. - -*** - -### on\_summary - -Process the conversation summary - -#### Signature - -```python -on_summary(summary, raw_data = None) -``` - -#### Parameters - - - Summary data from the conversation - - - - The complete raw POST data from the request - - -#### Source - -[`signalwire/signalwire/prefabs/receptionist.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/receptionist.py) - -Line 278. - -## Source - -[`signalwire/signalwire/prefabs/receptionist.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/receptionist.py) - -Line 21. diff --git a/fern/products/sdk-reference/python/agents/prefabs/survey/index.mdx b/fern/products/sdk-reference/python/agents/prefabs/survey/index.mdx index 14282c125f..5953464c71 100644 --- a/fern/products/sdk-reference/python/agents/prefabs/survey/index.mdx +++ b/fern/products/sdk-reference/python/agents/prefabs/survey/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.prefabs.survey" parent: "signalwire.prefabs" @@ -14,27 +14,212 @@ lustri: --- # `survey` -Copyright (c) 2025 SignalWire +A prefab agent designed to conduct automated surveys with users. -This file is part of the SignalWire SDK. +This agent will: -Licensed under the MIT License. -See LICENSE file in the project root for full license information. +1. Introduce the survey purpose and structure +2. Ask predefined questions in sequence +3. Collect and validate responses +4. Provide a summary of collected responses + +> \[!NOTE] +> agent = SurveyAgent( +> survey\_name="Customer Satisfaction Survey", +> introduction="We'd like to get your feedback on your recent experience.", +> questions=\[ +> \{ +> "id": "satisfaction", +> "text": "How satisfied were you with our service?", +> "type": "rating", +> "scale": 5, +> "required": True +> \}, +> \{ +> "id": "comments", +> "text": "Do you have any additional comments?", +> "type": "open\_ended", +> "required": False +> \} +> ] +> ) ## Signature ```python -module survey +class SurveyAgent(AgentBase) +``` + +## Inheritance + +**Extends:** `AgentBase` + +## Properties + + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +Initialize a survey agent + +#### Signature + +```python +__init__( + survey_name: str, + questions: List[Dict[str, Any]], + introduction: Optional[str] = None, + conclusion: Optional[str] = None, + brand_name: Optional[str] = None, + max_retries: int = 2, + name: str = 'survey', + route: str = '/survey', + **kwargs = {} +) +``` + +#### Parameters + + + Name of the survey + + + + List of question objects with the following keys: + + + + Optional custom introduction message + + + + Optional custom conclusion message + + + + Optional brand or company name + + + + Maximum number of times to retry invalid answers + + + + Name for the agent (default: "survey") + + + + HTTP route for the agent (default: "/survey") + + + + +#### Source + +[`signalwire/signalwire/prefabs/survey.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/survey.py) + +Line 55. + +*** + +### log\_response + +Log a validated response to a survey question + +This function would typically connect to a database or API to store the response. +In this example, it just acknowledges that the response was received. + +**Decorators:** `@AgentBase.tool(Any, Any, Any)` + +#### Signature + +```python +log_response(args, raw_data) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/prefabs/survey.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/survey.py) + +Line 314. + +*** + +### on\_summary + +Process the survey results summary + +#### Signature + +```python +on_summary(summary, raw_data = None) +``` + +#### Parameters + + + Summary data containing survey responses + + + + The complete raw POST data from the request + + +#### Source + +[`signalwire/signalwire/prefabs/survey.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/survey.py) + +Line 351. + +*** + +### validate\_response + +Validate if a response meets the requirements for a specific question + +This function checks if a user's response is valid for the specified question +based on the question type and constraints. + +**Decorators:** `@AgentBase.tool(Any, Any, Any)` + +#### Signature + +```python +validate_response(args, raw_data) ``` -## Classes +#### Parameters + + + + - - - A prefab agent designed to conduct automated surveys with users. - - +#### Source + +[`signalwire/signalwire/prefabs/survey.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/survey.py) + +Line 246. ## Source [`signalwire/signalwire/prefabs/survey.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/survey.py) + +Line 23. diff --git a/fern/products/sdk-reference/python/agents/prefabs/survey/survey-agent/index.mdx b/fern/products/sdk-reference/python/agents/prefabs/survey/survey-agent/index.mdx deleted file mode 100644 index 11adbbbd53..0000000000 --- a/fern/products/sdk-reference/python/agents/prefabs/survey/survey-agent/index.mdx +++ /dev/null @@ -1,225 +0,0 @@ ---- -slug: "/reference/python/agents/prefabs/survey/survey-agent" -title: "SurveyAgent" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.prefabs.survey.SurveyAgent" - parent: "signalwire.prefabs.survey" - module: "agents.prefabs.survey" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/survey.py" ---- -# `SurveyAgent` - -A prefab agent designed to conduct automated surveys with users. - -This agent will: - -1. Introduce the survey purpose and structure -2. Ask predefined questions in sequence -3. Collect and validate responses -4. Provide a summary of collected responses - -> \[!NOTE] -> agent = SurveyAgent( -> survey\_name="Customer Satisfaction Survey", -> introduction="We'd like to get your feedback on your recent experience.", -> questions=\[ -> \{ -> "id": "satisfaction", -> "text": "How satisfied were you with our service?", -> "type": "rating", -> "scale": 5, -> "required": True -> \}, -> \{ -> "id": "comments", -> "text": "Do you have any additional comments?", -> "type": "open\_ended", -> "required": False -> \} -> ] -> ) - -## Signature - -```python -class SurveyAgent(AgentBase) -``` - -## Inheritance - -**Extends:** [AgentBase](/docs/sdk-reference/reference/python/agents/agent-base/index__2) - -## Properties - - - - - - - - - - - - - -## Methods - -### \_\_init\_\_ - -Initialize a survey agent - -#### Signature - -```python -__init__( - survey_name: str, - questions: List[Dict[str, Any]], - introduction: Optional[str] = None, - conclusion: Optional[str] = None, - brand_name: Optional[str] = None, - max_retries: int = 2, - name: str = 'survey', - route: str = '/survey', - **kwargs = {} -) -``` - -#### Parameters - - - Name of the survey - - - - List of question objects with the following keys: - - - - Optional custom introduction message - - - - Optional custom conclusion message - - - - Optional brand or company name - - - - Maximum number of times to retry invalid answers - - - - Name for the agent (default: "survey") - - - - HTTP route for the agent (default: "/survey") - - - - -#### Source - -[`signalwire/signalwire/prefabs/survey.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/survey.py) - -Line 55. - -*** - -### log\_response - -Log a validated response to a survey question - -This function would typically connect to a database or API to store the response. -In this example, it just acknowledges that the response was received. - -**Decorators:** `@AgentBase.tool(Any, Any, Any)` - -#### Signature - -```python -log_response(args, raw_data) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/prefabs/survey.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/survey.py) - -Line 314. - -*** - -### on\_summary - -Process the survey results summary - -#### Signature - -```python -on_summary(summary, raw_data = None) -``` - -#### Parameters - - - Summary data containing survey responses - - - - The complete raw POST data from the request - - -#### Source - -[`signalwire/signalwire/prefabs/survey.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/survey.py) - -Line 351. - -*** - -### validate\_response - -Validate if a response meets the requirements for a specific question - -This function checks if a user's response is valid for the specified question -based on the question type and constraints. - -**Decorators:** `@AgentBase.tool(Any, Any, Any)` - -#### Signature - -```python -validate_response(args, raw_data) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/prefabs/survey.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/survey.py) - -Line 246. - -## Source - -[`signalwire/signalwire/prefabs/survey.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/prefabs/survey.py) - -Line 23. diff --git a/fern/products/sdk-reference/python/agents/search/document-processor/document-processor/index.mdx b/fern/products/sdk-reference/python/agents/search/document-processor/document-processor/index.mdx deleted file mode 100644 index 99addf6cde..0000000000 --- a/fern/products/sdk-reference/python/agents/search/document-processor/document-processor/index.mdx +++ /dev/null @@ -1,151 +0,0 @@ ---- -slug: "/reference/python/agents/search/document-processor/document-processor" -title: "DocumentProcessor" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.search.document_processor.DocumentProcessor" - parent: "signalwire.search.document_processor" - module: "agents.search.document_processor" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/document_processor.py" ---- -# `DocumentProcessor` - -Enhanced document processor with smart chunking capabilities - -## Signature - -```python -class DocumentProcessor -``` - -## Properties - - - - - - - - - - - - - - - -## Methods - -### \_\_init\_\_ - -Initialize document processor - -#### Signature - -```python -__init__( - chunking_strategy: str = 'sentence', - max_sentences_per_chunk: int = 5, - chunk_size: int = 50, - chunk_overlap: int = 10, - split_newlines: Optional[int] = None, - index_nlp_backend: str = 'nltk', - verbose: bool = False, - semantic_threshold: float = 0.5, - topic_threshold: float = 0.3 -) -``` - -#### Parameters - - - Strategy for chunking documents: - - - - For sentence strategy (default: 5) - - - - For sliding strategy - words per chunk (default: 50) - - - - For sliding strategy - overlap in words (default: 10) - - - - For sentence strategy - split on multiple newlines (optional) - - - - NLP backend for indexing (default: 'nltk') - - - - Whether to enable verbose logging (default: False) - - - - Similarity threshold for semantic chunking (default: 0.5) - - - - Similarity threshold for topic chunking (default: 0.3) - - -#### Source - -[`signalwire/signalwire/search/document_processor.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/document_processor.py) - -Line 82. - -*** - -### create\_chunks - -Create chunks from document content using specified chunking strategy - -#### Signature - -```python -create_chunks( - content: str, - filename: str, - file_type: str -) -> List[Dict[str, Any]] -``` - -#### Parameters - - - Document content (string) - should be the actual content, not a file path - - - - Name of the file (for metadata) - - - - File extension/type - - -#### Returns - -`List[Dict[str, Any]]` — List of chunk dictionaries - -#### Source - -[`signalwire/signalwire/search/document_processor.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/document_processor.py) - -Line 128. - -## Source - -[`signalwire/signalwire/search/document_processor.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/document_processor.py) - -Line 79. diff --git a/fern/products/sdk-reference/python/agents/search/document-processor/index__2.mdx b/fern/products/sdk-reference/python/agents/search/document-processor/index__2.mdx index 89de4f6eb2..984156bd17 100644 --- a/fern/products/sdk-reference/python/agents/search/document-processor/index__2.mdx +++ b/fern/products/sdk-reference/python/agents/search/document-processor/index__2.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.search.document_processor" parent: "signalwire.search" @@ -14,31 +14,140 @@ lustri: --- # `document_processor` -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. +Enhanced document processor with smart chunking capabilities ## Signature ```python -module document_processor +class DocumentProcessor ``` ## Properties + + + + + + -## Classes + + + + + + + + +## Methods + +### \_\_init\_\_ + +Initialize document processor + +#### Signature + +```python +__init__( + chunking_strategy: str = 'sentence', + max_sentences_per_chunk: int = 5, + chunk_size: int = 50, + chunk_overlap: int = 10, + split_newlines: Optional[int] = None, + index_nlp_backend: str = 'nltk', + verbose: bool = False, + semantic_threshold: float = 0.5, + topic_threshold: float = 0.3 +) +``` + +#### Parameters + + + Strategy for chunking documents: + + + + For sentence strategy (default: 5) + + + + For sliding strategy - words per chunk (default: 50) + + + + For sliding strategy - overlap in words (default: 10) + + + + For sentence strategy - split on multiple newlines (optional) + + + + NLP backend for indexing (default: 'nltk') + + + + Whether to enable verbose logging (default: False) + - - - Enhanced document processor with smart chunking capabilities - - + + Similarity threshold for semantic chunking (default: 0.5) + + + + Similarity threshold for topic chunking (default: 0.3) + + +#### Source + +[`signalwire/signalwire/search/document_processor.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/document_processor.py) + +Line 82. + +*** + +### create\_chunks + +Create chunks from document content using specified chunking strategy + +#### Signature + +```python +create_chunks( + content: str, + filename: str, + file_type: str +) -> List[Dict[str, Any]] +``` + +#### Parameters + + + Document content (string) - should be the actual content, not a file path + + + + Name of the file (for metadata) + + + + File extension/type + + +#### Returns + +`List[Dict[str, Any]]` — List of chunk dictionaries + +#### Source + +[`signalwire/signalwire/search/document_processor.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/document_processor.py) + +Line 128. ## Source [`signalwire/signalwire/search/document_processor.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/document_processor.py) + +Line 79. diff --git a/fern/products/sdk-reference/python/agents/search/index-builder/index-builder/index.mdx b/fern/products/sdk-reference/python/agents/search/index-builder/index-builder/index.mdx deleted file mode 100644 index 31ba9086a7..0000000000 --- a/fern/products/sdk-reference/python/agents/search/index-builder/index-builder/index.mdx +++ /dev/null @@ -1,271 +0,0 @@ ---- -slug: "/reference/python/agents/search/index-builder/index-builder" -title: "IndexBuilder" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.search.index_builder.IndexBuilder" - parent: "signalwire.search.index_builder" - module: "agents.search.index_builder" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/index_builder.py" ---- -# `IndexBuilder` - -Build searchable indexes from document directories - -## Signature - -```python -class IndexBuilder -``` - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -## Methods - -### \_\_init\_\_ - -Initialize the index builder - -#### Signature - -```python -__init__( - model_name: str = 'sentence-transformers/all-mpnet-base-v2', - chunking_strategy: str = 'sentence', - max_sentences_per_chunk: int = 5, - chunk_size: int = 50, - chunk_overlap: int = 10, - split_newlines: Optional[int] = None, - index_nlp_backend: str = 'nltk', - verbose: bool = False, - semantic_threshold: float = 0.5, - topic_threshold: float = 0.3, - backend: str = 'sqlite', - connection_string: Optional[str] = None -) -``` - -#### Parameters - - - Name of the sentence transformer model to use - - - - Strategy for chunking documents ('sentence', 'sliding', 'paragraph', 'page', 'semantic', 'topic', 'qa', 'json') - - - - For sentence strategy (default: 5) - - - - For sliding strategy - words per chunk (default: 50) - - - - For sliding strategy - overlap in words (default: 10) - - - - For sentence strategy - split on multiple newlines (optional) - - - - NLP backend for indexing (default: 'nltk') - - - - Whether to enable verbose logging (default: False) - - - - Similarity threshold for semantic chunking (default: 0.5) - - - - Similarity threshold for topic chunking (default: 0.3) - - - - Storage backend ('sqlite' or 'pgvector') (default: 'sqlite') - - - - PostgreSQL connection string for pgvector backend - - -#### Source - -[`signalwire/signalwire/search/index_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/index_builder.py) - -Line 38. - -*** - -### build\_index - -Build complete search index from a single directory - -#### Signature - -```python -build_index( - source_dir: str, - output_file: str, - file_types: List[str], - exclude_patterns: Optional[List[str]] = None, - languages: List[str] = None, - tags: Optional[List[str]] = None -) -``` - -#### Parameters - - - Directory to scan for documents - - - - Output .swsearch file path - - - - List of file extensions to include - - - - Glob patterns to exclude - - - - List of languages to support - - - - Global tags to add to all chunks - - -#### Source - -[`signalwire/signalwire/search/index_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/index_builder.py) - -Line 283. - -*** - -### build\_index\_from\_sources - -Build complete search index from multiple sources (files and directories) - -#### Signature - -```python -build_index_from_sources( - sources: List[Path], - output_file: str, - file_types: List[str], - exclude_patterns: Optional[List[str]] = None, - languages: List[str] = None, - tags: Optional[List[str]] = None, - overwrite: bool = False -) -``` - -#### Parameters - - - List of Path objects (files and/or directories) - - - - Output .swsearch file path - - - - List of file extensions to include for directories - - - - Glob patterns to exclude - - - - List of languages to support - - - - Global tags to add to all chunks - - - - -#### Source - -[`signalwire/signalwire/search/index_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/index_builder.py) - -Line 164. - -*** - -### validate\_index - -Validate an existing search index - -#### Signature - -```python -validate_index(index_file: str) -> Dict[str, Any] -``` - -#### Parameters - - - -#### Returns - -`Dict[str, Any]` - -#### Source - -[`signalwire/signalwire/search/index_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/index_builder.py) - -Line 687. - -## Source - -[`signalwire/signalwire/search/index_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/index_builder.py) - -Line 35. diff --git a/fern/products/sdk-reference/python/agents/search/index-builder/index__2.mdx b/fern/products/sdk-reference/python/agents/search/index-builder/index__2.mdx index 9cc2796a19..a19dec2072 100644 --- a/fern/products/sdk-reference/python/agents/search/index-builder/index__2.mdx +++ b/fern/products/sdk-reference/python/agents/search/index-builder/index__2.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.search.index_builder" parent: "signalwire.search" @@ -14,31 +14,260 @@ lustri: --- # `index_builder` -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. +Build searchable indexes from document directories ## Signature ```python -module index_builder +class IndexBuilder ``` ## Properties + + + + + + + + + + + + + + -## Classes + + + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +Initialize the index builder + +#### Signature + +```python +__init__( + model_name: str = 'sentence-transformers/all-mpnet-base-v2', + chunking_strategy: str = 'sentence', + max_sentences_per_chunk: int = 5, + chunk_size: int = 50, + chunk_overlap: int = 10, + split_newlines: Optional[int] = None, + index_nlp_backend: str = 'nltk', + verbose: bool = False, + semantic_threshold: float = 0.5, + topic_threshold: float = 0.3, + backend: str = 'sqlite', + connection_string: Optional[str] = None +) +``` + +#### Parameters + + + Name of the sentence transformer model to use + + + + Strategy for chunking documents ('sentence', 'sliding', 'paragraph', 'page', 'semantic', 'topic', 'qa', 'json') + + + + For sentence strategy (default: 5) + + + + For sliding strategy - words per chunk (default: 50) + + + + For sliding strategy - overlap in words (default: 10) + + + + For sentence strategy - split on multiple newlines (optional) + + + + NLP backend for indexing (default: 'nltk') + + + + Whether to enable verbose logging (default: False) + + + + Similarity threshold for semantic chunking (default: 0.5) + + + + Similarity threshold for topic chunking (default: 0.3) + + + + Storage backend ('sqlite' or 'pgvector') (default: 'sqlite') + + + + PostgreSQL connection string for pgvector backend + + +#### Source + +[`signalwire/signalwire/search/index_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/index_builder.py) + +Line 38. + +*** + +### build\_index + +Build complete search index from a single directory + +#### Signature + +```python +build_index( + source_dir: str, + output_file: str, + file_types: List[str], + exclude_patterns: Optional[List[str]] = None, + languages: List[str] = None, + tags: Optional[List[str]] = None +) +``` - - - Build searchable indexes from document directories - - +#### Parameters + + + Directory to scan for documents + + + + Output .swsearch file path + + + + List of file extensions to include + + + + Glob patterns to exclude + + + + List of languages to support + + + + Global tags to add to all chunks + + +#### Source + +[`signalwire/signalwire/search/index_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/index_builder.py) + +Line 283. + +*** + +### build\_index\_from\_sources + +Build complete search index from multiple sources (files and directories) + +#### Signature + +```python +build_index_from_sources( + sources: List[Path], + output_file: str, + file_types: List[str], + exclude_patterns: Optional[List[str]] = None, + languages: List[str] = None, + tags: Optional[List[str]] = None, + overwrite: bool = False +) +``` + +#### Parameters + + + List of Path objects (files and/or directories) + + + + Output .swsearch file path + + + + List of file extensions to include for directories + + + + Glob patterns to exclude + + + + List of languages to support + + + + Global tags to add to all chunks + + + + +#### Source + +[`signalwire/signalwire/search/index_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/index_builder.py) + +Line 164. + +*** + +### validate\_index + +Validate an existing search index + +#### Signature + +```python +validate_index(index_file: str) -> Dict[str, Any] +``` + +#### Parameters + + + +#### Returns + +`Dict[str, Any]` + +#### Source + +[`signalwire/signalwire/search/index_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/index_builder.py) + +Line 687. ## Source [`signalwire/signalwire/search/index_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/index_builder.py) + +Line 35. diff --git a/fern/products/sdk-reference/python/agents/search/index.mdx b/fern/products/sdk-reference/python/agents/search/index.mdx index 719b442dbb..35775a5b9b 100644 --- a/fern/products/sdk-reference/python/agents/search/index.mdx +++ b/fern/products/sdk-reference/python/agents/search/index.mdx @@ -34,10 +34,26 @@ module search ## Classes + + Enhanced document processor with smart chunking capabilities + + + + Build searchable indexes from document directories + + + + Migrate search indexes between different backends + + + + Hybrid search engine for vector and keyword search + + @@ -46,18 +62,6 @@ module search ## Modules - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - - - Copyright (c) 2025 SignalWire - - Copyright (c) 2025 SignalWire @@ -70,10 +74,6 @@ module search Copyright (c) 2025 SignalWire - - Copyright (c) 2025 SignalWire - - Copyright (c) 2025 SignalWire diff --git a/fern/products/sdk-reference/python/agents/search/migration/index.mdx b/fern/products/sdk-reference/python/agents/search/migration/index.mdx index 05a7229762..5ef3ef1e82 100644 --- a/fern/products/sdk-reference/python/agents/search/migration/index.mdx +++ b/fern/products/sdk-reference/python/agents/search/migration/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.search.migration" parent: "signalwire.search" @@ -14,31 +14,169 @@ lustri: --- # `migration` -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. +Migrate search indexes between different backends ## Signature ```python -module migration +class SearchIndexMigrator ``` ## Properties -## Classes + + +## Methods + +### \_\_init\_\_ + +Initialize the migrator + +#### Signature + +```python +__init__(verbose: bool = False) +``` + +#### Parameters + + + Enable verbose output + + +#### Source + +[`signalwire/signalwire/search/migration.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/migration.py) + +Line 29. + +*** + +### get\_index\_info - - - Migrate search indexes between different backends - - +Get information about a search index + +#### Signature + +```python +get_index_info(index_path: str) -> Dict[str, Any] +``` + +#### Parameters + + + Path to index file or pgvector collection identifier + + +#### Returns + +`Dict[str, Any]` — Index information including type, config, and statistics + +#### Source + +[`signalwire/signalwire/search/migration.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/migration.py) + +Line 382. + +*** + +### migrate\_pgvector\_to\_sqlite + +Migrate a pgvector collection to SQLite .swsearch format + +#### Signature + +```python +migrate_pgvector_to_sqlite( + connection_string: str, + collection_name: str, + output_path: str, + batch_size: int = 100 +) -> Dict[str, Any] +``` + +#### Parameters + + + PostgreSQL connection string + + + + Name of the pgvector collection + + + + Output .swsearch file path + + + + Number of chunks to fetch at once + + +#### Returns + +`Dict[str, Any]` — Migration statistics + +#### Source + +[`signalwire/signalwire/search/migration.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/migration.py) + +Line 237. + +*** + +### migrate\_sqlite\_to\_pgvector + +Migrate a .swsearch SQLite index to pgvector + +#### Signature + +```python +migrate_sqlite_to_pgvector( + sqlite_path: str, + connection_string: str, + collection_name: str, + overwrite: bool = False, + batch_size: int = 100 +) -> Dict[str, Any] +``` + +#### Parameters + + + Path to .swsearch file + + + + PostgreSQL connection string + + + + Name for the pgvector collection + + + + Whether to overwrite existing collection + + + + Number of chunks to insert at once + + +#### Returns + +`Dict[str, Any]` — Migration statistics + +#### Source + +[`signalwire/signalwire/search/migration.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/migration.py) + +Line 38. ## Source [`signalwire/signalwire/search/migration.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/migration.py) + +Line 26. diff --git a/fern/products/sdk-reference/python/agents/search/migration/search-index-migrator/index.mdx b/fern/products/sdk-reference/python/agents/search/migration/search-index-migrator/index.mdx deleted file mode 100644 index 21627fdcd6..0000000000 --- a/fern/products/sdk-reference/python/agents/search/migration/search-index-migrator/index.mdx +++ /dev/null @@ -1,180 +0,0 @@ ---- -slug: "/reference/python/agents/search/migration/search-index-migrator" -title: "SearchIndexMigrator" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.search.migration.SearchIndexMigrator" - parent: "signalwire.search.migration" - module: "agents.search.migration" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/migration.py" ---- -# `SearchIndexMigrator` - -Migrate search indexes between different backends - -## Signature - -```python -class SearchIndexMigrator -``` - -## Properties - - - -## Methods - -### \_\_init\_\_ - -Initialize the migrator - -#### Signature - -```python -__init__(verbose: bool = False) -``` - -#### Parameters - - - Enable verbose output - - -#### Source - -[`signalwire/signalwire/search/migration.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/migration.py) - -Line 29. - -*** - -### get\_index\_info - -Get information about a search index - -#### Signature - -```python -get_index_info(index_path: str) -> Dict[str, Any] -``` - -#### Parameters - - - Path to index file or pgvector collection identifier - - -#### Returns - -`Dict[str, Any]` — Index information including type, config, and statistics - -#### Source - -[`signalwire/signalwire/search/migration.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/migration.py) - -Line 382. - -*** - -### migrate\_pgvector\_to\_sqlite - -Migrate a pgvector collection to SQLite .swsearch format - -#### Signature - -```python -migrate_pgvector_to_sqlite( - connection_string: str, - collection_name: str, - output_path: str, - batch_size: int = 100 -) -> Dict[str, Any] -``` - -#### Parameters - - - PostgreSQL connection string - - - - Name of the pgvector collection - - - - Output .swsearch file path - - - - Number of chunks to fetch at once - - -#### Returns - -`Dict[str, Any]` — Migration statistics - -#### Source - -[`signalwire/signalwire/search/migration.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/migration.py) - -Line 237. - -*** - -### migrate\_sqlite\_to\_pgvector - -Migrate a .swsearch SQLite index to pgvector - -#### Signature - -```python -migrate_sqlite_to_pgvector( - sqlite_path: str, - connection_string: str, - collection_name: str, - overwrite: bool = False, - batch_size: int = 100 -) -> Dict[str, Any] -``` - -#### Parameters - - - Path to .swsearch file - - - - PostgreSQL connection string - - - - Name for the pgvector collection - - - - Whether to overwrite existing collection - - - - Number of chunks to insert at once - - -#### Returns - -`Dict[str, Any]` — Migration statistics - -#### Source - -[`signalwire/signalwire/search/migration.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/migration.py) - -Line 38. - -## Source - -[`signalwire/signalwire/search/migration.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/migration.py) - -Line 26. diff --git a/fern/products/sdk-reference/python/agents/search/search-engine/index__2.mdx b/fern/products/sdk-reference/python/agents/search/search-engine/index__2.mdx index da946a3a5a..259418e031 100644 --- a/fern/products/sdk-reference/python/agents/search/search-engine/index__2.mdx +++ b/fern/products/sdk-reference/python/agents/search/search-engine/index__2.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.search.search_engine" parent: "signalwire.search" @@ -14,33 +14,171 @@ lustri: --- # `search_engine` -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. +Hybrid search engine for vector and keyword search ## Signature ```python -module search_engine +class SearchEngine ``` ## Properties + + + + + + + + + + -## Classes +## Methods + +### \_\_init\_\_ + +Initialize search engine + +#### Signature + +```python +__init__( + backend: str = 'sqlite', + index_path: Optional[str] = None, + connection_string: Optional[str] = None, + collection_name: Optional[str] = None, + model = None +) +``` + +#### Parameters + + + Storage backend ('sqlite' or 'pgvector') + + + + Path to .swsearch file (for sqlite backend) + + + + PostgreSQL connection string (for pgvector backend) + + + + Collection name (for pgvector backend) + + + + Optional sentence transformer model + + +#### Source + +[`signalwire/signalwire/search/search_engine.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_engine.py) + +Line 30. + +*** + +### get\_stats + +Get statistics about the search index + +#### Signature + +```python +get_stats() -> Dict[str, Any] +``` - - - Hybrid search engine for vector and keyword search - - +#### Returns + +`Dict[str, Any]` + +#### Source + +[`signalwire/signalwire/search/search_engine.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_engine.py) + +Line 1346. + +*** + +### search + +Unified hybrid search: backends fetch candidates, SearchEngine post-processes. + +> \[!NOTE] +> +> 1. fetch\_candidates(k = count \* search\_multiplier) — per-source signals +> 2. \_process\_candidates — score / boost / dedupe / diversity +> 3. return top `count` + +Backends (sqlite, pgvector, future) only implement candidate fetching. +All quality logic (max-signal scoring with agreement boost, exact-match +boosting, content dedup, filename diversity, match-type diversity) runs +once here and therefore applies to every backend uniformly. + +#### Signature + +```python +search( + query_vector: List[float], + enhanced_text: str, + count: int = 3, + similarity_threshold: float = 0.0, + tags: Optional[List[str]] = None, + keyword_weight: Optional[float] = None, + original_query: Optional[str] = None +) -> List[Dict[str, Any]] +``` + +#### Parameters + + + Embedding vector for the query + + + + Processed query text for keyword search + + + + Number of results to return + + + + Minimum similarity score (applied to raw vector pre-merge so the threshold is intuitive) + + + + Filter by tags + + + + Accepted for API stability; scoring is max-signal-wins with agreement boost, so this is no-op currently + + + + Original query for exact matching / filename match + + +#### Returns + +`List[Dict[str, Any]]` — List of search results with scores and metadata + +#### Source + +[`signalwire/signalwire/search/search_engine.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_engine.py) + +Line 79. ## Source [`signalwire/signalwire/search/search_engine.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_engine.py) + +Line 27. diff --git a/fern/products/sdk-reference/python/agents/search/search-engine/search-engine/index.mdx b/fern/products/sdk-reference/python/agents/search/search-engine/search-engine/index.mdx deleted file mode 100644 index 289bb603de..0000000000 --- a/fern/products/sdk-reference/python/agents/search/search-engine/search-engine/index.mdx +++ /dev/null @@ -1,180 +0,0 @@ ---- -slug: "/reference/python/agents/search/search-engine/search-engine" -title: "SearchEngine" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.search.search_engine.SearchEngine" - parent: "signalwire.search.search_engine" - module: "agents.search.search_engine" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_engine.py" ---- -# `SearchEngine` - -Hybrid search engine for vector and keyword search - -## Signature - -```python -class SearchEngine -``` - -## Properties - - - - - - - - - - - -## Methods - -### \_\_init\_\_ - -Initialize search engine - -#### Signature - -```python -__init__( - backend: str = 'sqlite', - index_path: Optional[str] = None, - connection_string: Optional[str] = None, - collection_name: Optional[str] = None, - model = None -) -``` - -#### Parameters - - - Storage backend ('sqlite' or 'pgvector') - - - - Path to .swsearch file (for sqlite backend) - - - - PostgreSQL connection string (for pgvector backend) - - - - Collection name (for pgvector backend) - - - - Optional sentence transformer model - - -#### Source - -[`signalwire/signalwire/search/search_engine.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_engine.py) - -Line 30. - -*** - -### get\_stats - -Get statistics about the search index - -#### Signature - -```python -get_stats() -> Dict[str, Any] -``` - -#### Returns - -`Dict[str, Any]` - -#### Source - -[`signalwire/signalwire/search/search_engine.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_engine.py) - -Line 1346. - -*** - -### search - -Unified hybrid search: backends fetch candidates, SearchEngine post-processes. - -> \[!NOTE] -> -> 1. fetch\_candidates(k = count \* search\_multiplier) — per-source signals -> 2. \_process\_candidates — score / boost / dedupe / diversity -> 3. return top `count` - -Backends (sqlite, pgvector, future) only implement candidate fetching. -All quality logic (max-signal scoring with agreement boost, exact-match -boosting, content dedup, filename diversity, match-type diversity) runs -once here and therefore applies to every backend uniformly. - -#### Signature - -```python -search( - query_vector: List[float], - enhanced_text: str, - count: int = 3, - similarity_threshold: float = 0.0, - tags: Optional[List[str]] = None, - keyword_weight: Optional[float] = None, - original_query: Optional[str] = None -) -> List[Dict[str, Any]] -``` - -#### Parameters - - - Embedding vector for the query - - - - Processed query text for keyword search - - - - Number of results to return - - - - Minimum similarity score (applied to raw vector pre-merge so the threshold is intuitive) - - - - Filter by tags - - - - Accepted for API stability; scoring is max-signal-wins with agreement boost, so this is no-op currently - - - - Original query for exact matching / filename match - - -#### Returns - -`List[Dict[str, Any]]` — List of search results with scores and metadata - -#### Source - -[`signalwire/signalwire/search/search_engine.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_engine.py) - -Line 79. - -## Source - -[`signalwire/signalwire/search/search_engine.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_engine.py) - -Line 27. diff --git a/fern/products/sdk-reference/python/agents/search/search-service/index.mdx b/fern/products/sdk-reference/python/agents/search/search-service/index.mdx index 07c4f68df3..c67aa8c921 100644 --- a/fern/products/sdk-reference/python/agents/search/search-service/index.mdx +++ b/fern/products/sdk-reference/python/agents/search/search-service/index.mdx @@ -20,6 +20,20 @@ lustri: class SearchService ``` +## Classes + + + + + + + + + + Local search service with HTTP API supporting both SQLite and pgvector backends + + + ## Methods ### \_\_init\_\_ diff --git a/fern/products/sdk-reference/python/agents/search/search-service/index__2.mdx b/fern/products/sdk-reference/python/agents/search/search-service/index__2.mdx index 87c18bcf2a..a4f2776a9e 100644 --- a/fern/products/sdk-reference/python/agents/search/search-service/index__2.mdx +++ b/fern/products/sdk-reference/python/agents/search/search-service/index__2.mdx @@ -31,20 +31,6 @@ module search_service -## Classes - - - - - - - - - - Local search service with HTTP API supporting both SQLite and pgvector backends - - - ## Source [`signalwire/signalwire/search/search_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_service.py) diff --git a/fern/products/sdk-reference/python/agents/search/search-service/search-request/index.mdx b/fern/products/sdk-reference/python/agents/search/search-service/search-request/index.mdx index b23f14559c..930f89ad46 100644 --- a/fern/products/sdk-reference/python/agents/search/search-service/search-request/index.mdx +++ b/fern/products/sdk-reference/python/agents/search/search-service/search-request/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "python" qualified_name: "signalwire.search.search_service.SearchRequest" - parent: "signalwire.search.search_service" + parent: "signalwire.search.SearchService" module: "agents.search.search_service" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_service.py" --- diff --git a/fern/products/sdk-reference/python/agents/search/search-service/search-response/index.mdx b/fern/products/sdk-reference/python/agents/search/search-service/search-response/index.mdx index 6e7817e0e7..caba806dfb 100644 --- a/fern/products/sdk-reference/python/agents/search/search-service/search-response/index.mdx +++ b/fern/products/sdk-reference/python/agents/search/search-service/search-response/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "python" qualified_name: "signalwire.search.search_service.SearchResponse" - parent: "signalwire.search.search_service" + parent: "signalwire.search.SearchService" module: "agents.search.search_service" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_service.py" --- diff --git a/fern/products/sdk-reference/python/agents/search/search-service/search-result/index.mdx b/fern/products/sdk-reference/python/agents/search/search-service/search-result/index.mdx index 873d856085..1028dfe3eb 100644 --- a/fern/products/sdk-reference/python/agents/search/search-service/search-result/index.mdx +++ b/fern/products/sdk-reference/python/agents/search/search-service/search-result/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "python" qualified_name: "signalwire.search.search_service.SearchResult" - parent: "signalwire.search.search_service" + parent: "signalwire.search.SearchService" module: "agents.search.search_service" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_service.py" --- diff --git a/fern/products/sdk-reference/python/agents/search/search-service/search-service/index.mdx b/fern/products/sdk-reference/python/agents/search/search-service/search-service/index.mdx index 0f52095545..1418285b6f 100644 --- a/fern/products/sdk-reference/python/agents/search/search-service/search-service/index.mdx +++ b/fern/products/sdk-reference/python/agents/search/search-service/search-service/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "python" qualified_name: "signalwire.search.search_service.SearchService" - parent: "signalwire.search.search_service" + parent: "signalwire.search.SearchService" module: "agents.search.search_service" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/search/search_service.py" --- diff --git a/fern/products/sdk-reference/python/agents/skill-base/index.mdx b/fern/products/sdk-reference/python/agents/skill-base/index.mdx index 23f4525607..5219b87e20 100644 --- a/fern/products/sdk-reference/python/agents/skill-base/index.mdx +++ b/fern/products/sdk-reference/python/agents/skill-base/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.core.skill_base" parent: "agents" @@ -14,19 +14,423 @@ lustri: --- # `skill_base` -Copyright (c) 2025 SignalWire +Abstract base class for all agent skills -This file is part of the SignalWire SDK. +## Signature -Licensed under the MIT License. -See LICENSE file in the project root for full license information. +```python +class SkillBase(ABC) +``` -## Signature +## Inheritance + +**Extends:** `ABC` + +## Properties + + + + + + + + + + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(agent: AgentBase, params: Optional[Dict[str, Any]] = None) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) + +Line 32. + +*** + +### cleanup + +Cleanup when skill is removed or agent shuts down + +#### Signature + +```python +cleanup() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) + +Line 99. + +*** + +### define\_tool + +Wrapper method that automatically includes swaig\_fields when defining tools. + +This method delegates to self.agent.define\_tool() but automatically merges +any swaig\_fields configured for this skill. Skills should use this method +instead of calling self.agent.define\_tool() directly. + +#### Signature + +```python +define_tool(**kwargs = {}) -> None +``` + +#### Parameters + + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) + +Line 58. + +*** + +### get\_global\_data + +Return data to add to agent's global context + +#### Signature + +```python +get_global_data() -> Dict[str, Any] +``` + +#### Returns + +`Dict[str, Any]` + +#### Source + +[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) + +Line 84. + +*** + +### get\_hints + +Return speech recognition hints for this skill + +#### Signature + +```python +get_hints() -> List[str] +``` + +#### Returns + +`List[str]` + +#### Source + +[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) + +Line 80. + +*** + +### get\_instance\_key + +Get the key used to track this skill instance + +For skills that support multiple instances (SUPPORTS\_MULTIPLE\_INSTANCES = True), +this method can be overridden to provide a unique key for each instance. + +Default implementation: + +- If SUPPORTS\_MULTIPLE\_INSTANCES is False: returns SKILL\_NAME +- If SUPPORTS\_MULTIPLE\_INSTANCES is True: returns SKILL\_NAME + "\_" + tool\_name + (where tool\_name comes from params\['tool\_name'] or defaults to the skill name) + +#### Signature + +```python +get_instance_key() -> str +``` + +#### Returns + +`str` — Unique key for this skill instance + +#### Source + +[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) + +Line 126. + +*** + +### get\_parameter\_schema + +Get the parameter schema for this skill + +This method returns metadata about all parameters the skill accepts, +including their types, descriptions, default values, and whether they +are required or should be hidden (e.g., API keys). + +The base implementation provides common parameters available to all skills. +Subclasses should override this method and merge their specific parameters +with the base schema. + +> \[!NOTE] +> \{ +> "tool\_name": \{ +> "type": "string", +> "description": "Name for the tool when using multiple instances", +> "default": "my\_skill", +> "required": False +> \}, +> "api\_key": \{ +> "type": "string", +> "description": "API key for the service", +> "required": True, +> "hidden": True, +> "env\_var": "MY\_API\_KEY" +> \} +> \} + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +get_parameter_schema() -> Dict[str, Dict[str, Any]] +``` + +#### Returns + +`Dict[str, Dict[str, Any]]` — Dict\[str, Dict\[str, Any]]: Parameter schema where keys are parameter names and values are dictionaries containing: + +#### Source + +[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) + +Line 197. + +*** + +### get\_prompt\_sections + +Return prompt sections to add to agent. +Returns empty list if skip\_prompt is set to True in params. + +#### Signature + +```python +get_prompt_sections() -> List[Dict[str, Any]] +``` + +#### Returns + +`List[Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) + +Line 88. + +*** + +### get\_skill\_data + +Read this skill instance's namespaced data from raw\_data global\_data. + +#### Signature ```python -module skill_base +get_skill_data(raw_data: Dict[str, Any]) -> Dict[str, Any] ``` +#### Parameters + + + The raw\_data dict passed to SWAIG function handlers, expected to contain a 'global\_data' key. + + +#### Returns + +`Dict[str, Any]` — The skill's namespaced state, or empty dict if not found. + +#### Source + +[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) + +Line 164. + +*** + +### register\_tools + +Register SWAIG tools with the agent + +**Modifiers:** `abstract` + +#### Signature + +```python +register_tools() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) + +Line 53. + +*** + +### setup + +Setup the skill (validate env vars, initialize APIs, etc.) +Returns True if setup successful, False otherwise + +**Modifiers:** `abstract` + +#### Signature + +```python +setup() -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) + +Line 45. + +*** + +### update\_skill\_data + +Write this skill instance's namespaced data into a FunctionResult. + +Wraps the data under the skill's namespace key and calls +result.update\_global\_data(). + +#### Signature + +```python +update_skill_data( + result: FunctionResult, + data: Dict[str, Any] +) -> FunctionResult +``` + +#### Parameters + + + The FunctionResult to add the global\_data update to. + + + + The skill state dict to store under the namespace. + + +#### Returns + +`FunctionResult` — The result, for method chaining. + +#### Source + +[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) + +Line 179. + +*** + +### validate\_env\_vars + +Check if all required environment variables are set + +#### Signature + +```python +validate_env_vars() -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) + +Line 103. + +*** + +### validate\_packages + +Check if all required packages are available + +#### Signature + +```python +validate_packages() -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) + +Line 112. + ## Source [`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) + +Line 19. diff --git a/fern/products/sdk-reference/python/agents/skill-base/index__2.mdx b/fern/products/sdk-reference/python/agents/skill-base/index__2.mdx deleted file mode 100644 index ab6747c97a..0000000000 --- a/fern/products/sdk-reference/python/agents/skill-base/index__2.mdx +++ /dev/null @@ -1,436 +0,0 @@ ---- -slug: "/reference/python/agents/skill-base/index__2" -title: "SkillBase" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.core.skill_base.SkillBase" - parent: "agents" - module: "agents" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py" ---- -# `SkillBase` - -Abstract base class for all agent skills - -## Signature - -```python -class SkillBase(ABC) -``` - -## Inheritance - -**Extends:** `ABC` - -## Properties - - - - - - - - - - - - - - - - - - - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(agent: AgentBase, params: Optional[Dict[str, Any]] = None) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) - -Line 32. - -*** - -### cleanup - -Cleanup when skill is removed or agent shuts down - -#### Signature - -```python -cleanup() -> None -``` - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) - -Line 99. - -*** - -### define\_tool - -Wrapper method that automatically includes swaig\_fields when defining tools. - -This method delegates to self.agent.define\_tool() but automatically merges -any swaig\_fields configured for this skill. Skills should use this method -instead of calling self.agent.define\_tool() directly. - -#### Signature - -```python -define_tool(**kwargs = {}) -> None -``` - -#### Parameters - - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) - -Line 58. - -*** - -### get\_global\_data - -Return data to add to agent's global context - -#### Signature - -```python -get_global_data() -> Dict[str, Any] -``` - -#### Returns - -`Dict[str, Any]` - -#### Source - -[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) - -Line 84. - -*** - -### get\_hints - -Return speech recognition hints for this skill - -#### Signature - -```python -get_hints() -> List[str] -``` - -#### Returns - -`List[str]` - -#### Source - -[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) - -Line 80. - -*** - -### get\_instance\_key - -Get the key used to track this skill instance - -For skills that support multiple instances (SUPPORTS\_MULTIPLE\_INSTANCES = True), -this method can be overridden to provide a unique key for each instance. - -Default implementation: - -- If SUPPORTS\_MULTIPLE\_INSTANCES is False: returns SKILL\_NAME -- If SUPPORTS\_MULTIPLE\_INSTANCES is True: returns SKILL\_NAME + "\_" + tool\_name - (where tool\_name comes from params\['tool\_name'] or defaults to the skill name) - -#### Signature - -```python -get_instance_key() -> str -``` - -#### Returns - -`str` — Unique key for this skill instance - -#### Source - -[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) - -Line 126. - -*** - -### get\_parameter\_schema - -Get the parameter schema for this skill - -This method returns metadata about all parameters the skill accepts, -including their types, descriptions, default values, and whether they -are required or should be hidden (e.g., API keys). - -The base implementation provides common parameters available to all skills. -Subclasses should override this method and merge their specific parameters -with the base schema. - -> \[!NOTE] -> \{ -> "tool\_name": \{ -> "type": "string", -> "description": "Name for the tool when using multiple instances", -> "default": "my\_skill", -> "required": False -> \}, -> "api\_key": \{ -> "type": "string", -> "description": "API key for the service", -> "required": True, -> "hidden": True, -> "env\_var": "MY\_API\_KEY" -> \} -> \} - -**Modifiers:** `classmethod` - -#### Signature - -```python -@classmethod -get_parameter_schema() -> Dict[str, Dict[str, Any]] -``` - -#### Returns - -`Dict[str, Dict[str, Any]]` — Dict\[str, Dict\[str, Any]]: Parameter schema where keys are parameter names and values are dictionaries containing: - -#### Source - -[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) - -Line 197. - -*** - -### get\_prompt\_sections - -Return prompt sections to add to agent. -Returns empty list if skip\_prompt is set to True in params. - -#### Signature - -```python -get_prompt_sections() -> List[Dict[str, Any]] -``` - -#### Returns - -`List[Dict[str, Any]]` - -#### Source - -[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) - -Line 88. - -*** - -### get\_skill\_data - -Read this skill instance's namespaced data from raw\_data global\_data. - -#### Signature - -```python -get_skill_data(raw_data: Dict[str, Any]) -> Dict[str, Any] -``` - -#### Parameters - - - The raw\_data dict passed to SWAIG function handlers, expected to contain a 'global\_data' key. - - -#### Returns - -`Dict[str, Any]` — The skill's namespaced state, or empty dict if not found. - -#### Source - -[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) - -Line 164. - -*** - -### register\_tools - -Register SWAIG tools with the agent - -**Modifiers:** `abstract` - -#### Signature - -```python -register_tools() -> None -``` - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) - -Line 53. - -*** - -### setup - -Setup the skill (validate env vars, initialize APIs, etc.) -Returns True if setup successful, False otherwise - -**Modifiers:** `abstract` - -#### Signature - -```python -setup() -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) - -Line 45. - -*** - -### update\_skill\_data - -Write this skill instance's namespaced data into a FunctionResult. - -Wraps the data under the skill's namespace key and calls -result.update\_global\_data(). - -#### Signature - -```python -update_skill_data( - result: FunctionResult, - data: Dict[str, Any] -) -> FunctionResult -``` - -#### Parameters - - - The FunctionResult to add the global\_data update to. - - - - The skill state dict to store under the namespace. - - -#### Returns - -`FunctionResult` — The result, for method chaining. - -#### Source - -[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) - -Line 179. - -*** - -### validate\_env\_vars - -Check if all required environment variables are set - -#### Signature - -```python -validate_env_vars() -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) - -Line 103. - -*** - -### validate\_packages - -Check if all required packages are available - -#### Signature - -```python -validate_packages() -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) - -Line 112. - -## Source - -[`signalwire/signalwire/core/skill_base.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_base.py) - -Line 19. diff --git a/fern/products/sdk-reference/python/agents/skill-manager/index.mdx b/fern/products/sdk-reference/python/agents/skill-manager/index.mdx index a7ee1fef1b..729b36dec2 100644 --- a/fern/products/sdk-reference/python/agents/skill-manager/index.mdx +++ b/fern/products/sdk-reference/python/agents/skill-manager/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.core.skill_manager" parent: "agents" @@ -14,19 +14,190 @@ lustri: --- # `skill_manager` -Copyright (c) 2025 SignalWire +Manages loading and lifecycle of agent skills -This file is part of the SignalWire SDK. +## Signature + +```python +class SkillManager +``` -Licensed under the MIT License. -See LICENSE file in the project root for full license information. +## Properties -## Signature + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(agent) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/core/skill_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_manager.py) + +Line 17. + +*** + +### get\_skill + +Get a loaded skill instance by identifier + +#### Signature + +```python +get_skill(skill_identifier: str) -> Optional[SkillBase] +``` + +#### Parameters + + + Either a skill name or an instance key + + +#### Returns + +`Optional[SkillBase]` — The skill instance if found, None otherwise + +#### Source + +[`signalwire/signalwire/core/skill_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_manager.py) + +Line 228. + +*** + +### has\_skill + +Check if skill is currently loaded + +#### Signature + +```python +has_skill(skill_identifier: str) -> bool +``` + +#### Parameters + + + Either a skill name or an instance key + + +#### Returns + +`bool` — True if loaded, False otherwise + +#### Source + +[`signalwire/signalwire/core/skill_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_manager.py) + +Line 212. + +*** + +### list\_loaded\_skills + +List instance keys of currently loaded skills + +#### Signature + +```python +list_loaded_skills() -> List[str] +``` + +#### Returns + +`List[str]` + +#### Source + +[`signalwire/signalwire/core/skill_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_manager.py) + +Line 208. + +*** + +### load\_skill + +Load and setup a skill by name + +#### Signature + +```python +load_skill( + skill_name: str, + skill_class: Type[SkillBase] = None, + params: Optional[Dict[str, Any]] = None +) -> tuple[bool, str] +``` + +#### Parameters + + + Name of the skill to load + + + + Optional skill class (if not provided, will try to find it) + + + + Optional parameters to pass to the skill + + +#### Returns + +`tuple[bool, str]` — (success, error\_message) - error\_message is empty string if successful + +#### Source + +[`signalwire/signalwire/core/skill_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_manager.py) + +Line 22. + +*** + +### unload\_skill + +Unload a skill and cleanup + +#### Signature ```python -module skill_manager +unload_skill(skill_identifier: str) -> bool ``` +#### Parameters + + + Either a skill name or an instance key + + +#### Returns + +`bool` — True if successfully unloaded, False otherwise + +#### Source + +[`signalwire/signalwire/core/skill_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_manager.py) + +Line 176. + ## Source [`signalwire/signalwire/core/skill_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_manager.py) + +Line 14. diff --git a/fern/products/sdk-reference/python/agents/skill-manager/index__2.mdx b/fern/products/sdk-reference/python/agents/skill-manager/index__2.mdx deleted file mode 100644 index f33a85e162..0000000000 --- a/fern/products/sdk-reference/python/agents/skill-manager/index__2.mdx +++ /dev/null @@ -1,203 +0,0 @@ ---- -slug: "/reference/python/agents/skill-manager/index__2" -title: "SkillManager" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.core.skill_manager.SkillManager" - parent: "agents" - module: "agents" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_manager.py" ---- -# `SkillManager` - -Manages loading and lifecycle of agent skills - -## Signature - -```python -class SkillManager -``` - -## Properties - - - - - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(agent) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/core/skill_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_manager.py) - -Line 17. - -*** - -### get\_skill - -Get a loaded skill instance by identifier - -#### Signature - -```python -get_skill(skill_identifier: str) -> Optional[SkillBase] -``` - -#### Parameters - - - Either a skill name or an instance key - - -#### Returns - -`Optional[SkillBase]` — The skill instance if found, None otherwise - -#### Source - -[`signalwire/signalwire/core/skill_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_manager.py) - -Line 228. - -*** - -### has\_skill - -Check if skill is currently loaded - -#### Signature - -```python -has_skill(skill_identifier: str) -> bool -``` - -#### Parameters - - - Either a skill name or an instance key - - -#### Returns - -`bool` — True if loaded, False otherwise - -#### Source - -[`signalwire/signalwire/core/skill_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_manager.py) - -Line 212. - -*** - -### list\_loaded\_skills - -List instance keys of currently loaded skills - -#### Signature - -```python -list_loaded_skills() -> List[str] -``` - -#### Returns - -`List[str]` - -#### Source - -[`signalwire/signalwire/core/skill_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_manager.py) - -Line 208. - -*** - -### load\_skill - -Load and setup a skill by name - -#### Signature - -```python -load_skill( - skill_name: str, - skill_class: Type[SkillBase] = None, - params: Optional[Dict[str, Any]] = None -) -> tuple[bool, str] -``` - -#### Parameters - - - Name of the skill to load - - - - Optional skill class (if not provided, will try to find it) - - - - Optional parameters to pass to the skill - - -#### Returns - -`tuple[bool, str]` — (success, error\_message) - error\_message is empty string if successful - -#### Source - -[`signalwire/signalwire/core/skill_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_manager.py) - -Line 22. - -*** - -### unload\_skill - -Unload a skill and cleanup - -#### Signature - -```python -unload_skill(skill_identifier: str) -> bool -``` - -#### Parameters - - - Either a skill name or an instance key - - -#### Returns - -`bool` — True if successfully unloaded, False otherwise - -#### Source - -[`signalwire/signalwire/core/skill_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_manager.py) - -Line 176. - -## Source - -[`signalwire/signalwire/core/skill_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/skill_manager.py) - -Line 14. diff --git a/fern/products/sdk-reference/python/agents/skills/api-ninjas-trivia/index.mdx b/fern/products/sdk-reference/python/agents/skills/api-ninjas-trivia/index.mdx index 95865aee96..f60fd086a8 100644 --- a/fern/products/sdk-reference/python/agents/skills/api-ninjas-trivia/index.mdx +++ b/fern/products/sdk-reference/python/agents/skills/api-ninjas-trivia/index.mdx @@ -31,11 +31,11 @@ module api_ninjas_trivia -## Modules +## Classes - Copyright (c) 2025 SignalWire + Skill for getting trivia questions from API Ninjas with configurable categories. diff --git a/fern/products/sdk-reference/python/agents/skills/api-ninjas-trivia/skill/api-ninjas-trivia-skill/index.mdx b/fern/products/sdk-reference/python/agents/skills/api-ninjas-trivia/skill/api-ninjas-trivia-skill/index.mdx deleted file mode 100644 index ba2b760880..0000000000 --- a/fern/products/sdk-reference/python/agents/skills/api-ninjas-trivia/skill/api-ninjas-trivia-skill/index.mdx +++ /dev/null @@ -1,227 +0,0 @@ ---- -slug: "/reference/python/agents/skills/api-ninjas-trivia/skill/api-ninjas-trivia-skill" -title: "ApiNinjasTriviaSkill" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.skills.api_ninjas_trivia.skill.ApiNinjasTriviaSkill" - parent: "signalwire.skills.api_ninjas_trivia.skill" - module: "agents.skills.api_ninjas_trivia.skill" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/api_ninjas_trivia/skill.py" ---- -# `ApiNinjasTriviaSkill` - -Skill for getting trivia questions from API Ninjas with configurable categories. - -Supports multiple instances with different tool names and category combinations. -Uses DataMap for serverless execution with dynamic enum generation. - -Configuration: - -- tool\_name: Custom name for the generated SWAIG function -- api\_key: API Ninjas API key -- categories: Array of category strings to enable - -Available categories: - -- artliterature: Art and Literature -- language: Language -- sciencenature: Science and Nature -- general: General Knowledge -- fooddrink: Food and Drink -- peopleplaces: People and Places -- geography: Geography -- historyholidays: History and Holidays -- entertainment: Entertainment -- toysgames: Toys and Games -- music: Music -- mathematics: Mathematics -- religionmythology: Religion and Mythology -- sportsleisure: Sports and Leisure - -> \[!NOTE] -> agent.add\_skill("api\_ninjas\_trivia", \{ -> "tool\_name": "get\_science\_trivia", -> "api\_key": "your\_api\_key", -> "categories": \["sciencenature", "mathematics", "general"] -> \}) - -## Signature - -```python -class ApiNinjasTriviaSkill(SkillBase) -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/python/agents/skill-base/index__2) - -## Properties - - - - - - - - - - - - - - - - - -## Methods - -### \_\_init\_\_ - -Initialize the skill with configuration parameters. - -#### Signature - -```python -__init__(agent, params: Dict[str, Any] = None) -``` - -#### Parameters - - - The agent instance this skill belongs to - - - - Configuration dictionary containing: - - -#### Source - -[`signalwire/signalwire/skills/api_ninjas_trivia/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/api_ninjas_trivia/skill.py) - -Line 81. - -*** - -### get\_instance\_key - -Generate a unique instance key for this skill configuration. - -#### Signature - -```python -get_instance_key() -> str -``` - -#### Returns - -`str` — Unique key combining skill name and tool name - -#### Source - -[`signalwire/signalwire/skills/api_ninjas_trivia/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/api_ninjas_trivia/skill.py) - -Line 139. - -*** - -### get\_parameter\_schema - -Get the parameter schema for the API Ninjas Trivia skill. - -Returns parameter definitions for GUI configuration. - -**Modifiers:** `classmethod` - -#### Signature - -```python -@classmethod -get_parameter_schema() -> Dict[str, Dict[str, Any]] -``` - -#### Returns - -`Dict[str, Dict[str, Any]]` - -#### Source - -[`signalwire/signalwire/skills/api_ninjas_trivia/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/api_ninjas_trivia/skill.py) - -Line 203. - -*** - -### get\_tools - -Generate the SWAIG tool with DataMap webhook. - -#### Signature - -```python -get_tools() -> List[Dict[str, Any]] -``` - -#### Returns - -`List[Dict[str, Any]]` — List containing the generated tool configuration - -#### Source - -[`signalwire/signalwire/skills/api_ninjas_trivia/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/api_ninjas_trivia/skill.py) - -Line 148. - -*** - -### register\_tools - -Register SWAIG tools with the agent - -#### Signature - -```python -register_tools() -> None -``` - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/skills/api_ninjas_trivia/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/api_ninjas_trivia/skill.py) - -Line 130. - -*** - -### setup - -Setup the skill - validates API key is available. - -#### Signature - -```python -setup() -> bool -``` - -#### Returns - -`bool` — True if setup successful - -#### Source - -[`signalwire/signalwire/skills/api_ninjas_trivia/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/api_ninjas_trivia/skill.py) - -Line 120. - -## Source - -[`signalwire/signalwire/skills/api_ninjas_trivia/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/api_ninjas_trivia/skill.py) - -Line 22. diff --git a/fern/products/sdk-reference/python/agents/skills/api-ninjas-trivia/skill/index.mdx b/fern/products/sdk-reference/python/agents/skills/api-ninjas-trivia/skill/index.mdx index 82e89d46b1..3d9efc5a84 100644 --- a/fern/products/sdk-reference/python/agents/skills/api-ninjas-trivia/skill/index.mdx +++ b/fern/products/sdk-reference/python/agents/skills/api-ninjas-trivia/skill/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.skills.api_ninjas_trivia.skill" parent: "signalwire.skills.api_ninjas_trivia" @@ -14,27 +14,214 @@ lustri: --- # `skill` -Copyright (c) 2025 SignalWire +Skill for getting trivia questions from API Ninjas with configurable categories. -This file is part of the SignalWire SDK. +Supports multiple instances with different tool names and category combinations. +Uses DataMap for serverless execution with dynamic enum generation. -Licensed under the MIT License. -See LICENSE file in the project root for full license information. +Configuration: + +- tool\_name: Custom name for the generated SWAIG function +- api\_key: API Ninjas API key +- categories: Array of category strings to enable + +Available categories: + +- artliterature: Art and Literature +- language: Language +- sciencenature: Science and Nature +- general: General Knowledge +- fooddrink: Food and Drink +- peopleplaces: People and Places +- geography: Geography +- historyholidays: History and Holidays +- entertainment: Entertainment +- toysgames: Toys and Games +- music: Music +- mathematics: Mathematics +- religionmythology: Religion and Mythology +- sportsleisure: Sports and Leisure + +> \[!NOTE] +> agent.add\_skill("api\_ninjas\_trivia", \{ +> "tool\_name": "get\_science\_trivia", +> "api\_key": "your\_api\_key", +> "categories": \["sciencenature", "mathematics", "general"] +> \}) ## Signature ```python -module skill +class ApiNinjasTriviaSkill(SkillBase) +``` + +## Inheritance + +**Extends:** `SkillBase` + +## Properties + + + + + + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +Initialize the skill with configuration parameters. + +#### Signature + +```python +__init__(agent, params: Dict[str, Any] = None) +``` + +#### Parameters + + + The agent instance this skill belongs to + + + + Configuration dictionary containing: + + +#### Source + +[`signalwire/signalwire/skills/api_ninjas_trivia/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/api_ninjas_trivia/skill.py) + +Line 81. + +*** + +### get\_instance\_key + +Generate a unique instance key for this skill configuration. + +#### Signature + +```python +get_instance_key() -> str ``` -## Classes +#### Returns - - - Skill for getting trivia questions from API Ninjas with configurable categories. - - +`str` — Unique key combining skill name and tool name + +#### Source + +[`signalwire/signalwire/skills/api_ninjas_trivia/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/api_ninjas_trivia/skill.py) + +Line 139. + +*** + +### get\_parameter\_schema + +Get the parameter schema for the API Ninjas Trivia skill. + +Returns parameter definitions for GUI configuration. + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +get_parameter_schema() -> Dict[str, Dict[str, Any]] +``` + +#### Returns + +`Dict[str, Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/api_ninjas_trivia/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/api_ninjas_trivia/skill.py) + +Line 203. + +*** + +### get\_tools + +Generate the SWAIG tool with DataMap webhook. + +#### Signature + +```python +get_tools() -> List[Dict[str, Any]] +``` + +#### Returns + +`List[Dict[str, Any]]` — List containing the generated tool configuration + +#### Source + +[`signalwire/signalwire/skills/api_ninjas_trivia/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/api_ninjas_trivia/skill.py) + +Line 148. + +*** + +### register\_tools + +Register SWAIG tools with the agent + +#### Signature + +```python +register_tools() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/skills/api_ninjas_trivia/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/api_ninjas_trivia/skill.py) + +Line 130. + +*** + +### setup + +Setup the skill - validates API key is available. + +#### Signature + +```python +setup() -> bool +``` + +#### Returns + +`bool` — True if setup successful + +#### Source + +[`signalwire/signalwire/skills/api_ninjas_trivia/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/api_ninjas_trivia/skill.py) + +Line 120. ## Source [`signalwire/signalwire/skills/api_ninjas_trivia/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/api_ninjas_trivia/skill.py) + +Line 22. diff --git a/fern/products/sdk-reference/python/agents/skills/claude-skills/index.mdx b/fern/products/sdk-reference/python/agents/skills/claude-skills/index.mdx index b7a906eb8b..a6e36b88df 100644 --- a/fern/products/sdk-reference/python/agents/skills/claude-skills/index.mdx +++ b/fern/products/sdk-reference/python/agents/skills/claude-skills/index.mdx @@ -27,11 +27,11 @@ See LICENSE file in the project root for full license information. module claude_skills ``` -## Modules +## Classes - Copyright (c) 2025 SignalWire + Load Claude-style SKILL.md files as SignalWire agent tools. diff --git a/fern/products/sdk-reference/python/agents/skills/claude-skills/skill/claude-skills-skill/index.mdx b/fern/products/sdk-reference/python/agents/skills/claude-skills/skill/claude-skills-skill/index.mdx deleted file mode 100644 index 48732bcde4..0000000000 --- a/fern/products/sdk-reference/python/agents/skills/claude-skills/skill/claude-skills-skill/index.mdx +++ /dev/null @@ -1,182 +0,0 @@ ---- -slug: "/reference/python/agents/skills/claude-skills/skill/claude-skills-skill" -title: "ClaudeSkillsSkill" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.skills.claude_skills.skill.ClaudeSkillsSkill" - parent: "signalwire.skills.claude_skills.skill" - module: "agents.skills.claude_skills.skill" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/claude_skills/skill.py" ---- -# `ClaudeSkillsSkill` - -Load Claude-style SKILL.md files as SignalWire agent tools. - -This skill parses Claude Code skill directories and makes them available -as SWAIG tools that the AI can call. Each Claude skill becomes a tool -that returns the skill's instructions when invoked. - -> ## \[!NOTE] -> -> name: skill-name -> description: When to use this skill -> ----------------------------------- -> -> Markdown instructions here... -> Use $ARGUMENTS for passed args. - -## Signature - -```python -class ClaudeSkillsSkill(SkillBase) -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/python/agents/skill-base/index__2) - -## Examples - -```python -Markdown instructions here... -Use $ARGUMENTS for passed args. -``` - -## Properties - - - - - - - - - - - - - -## Methods - -### get\_hints - -Return speech recognition hints based on loaded skills. - -#### Signature - -```python -get_hints() -> List[str] -``` - -#### Returns - -`List[str]` - -#### Source - -[`signalwire/signalwire/skills/claude_skills/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/claude_skills/skill.py) - -Line 610. - -*** - -### get\_instance\_key - -Return unique key for this skill instance. - -#### Signature - -```python -get_instance_key() -> str -``` - -#### Returns - -`str` - -#### Source - -[`signalwire/signalwire/skills/claude_skills/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/claude_skills/skill.py) - -Line 667. - -*** - -### get\_parameter\_schema - -Get the parameter schema for the Claude skills loader. - -**Modifiers:** `classmethod` - -#### Signature - -```python -@classmethod -get_parameter_schema() -> Dict[str, Dict[str, Any]] -``` - -#### Returns - -`Dict[str, Dict[str, Any]]` - -#### Source - -[`signalwire/signalwire/skills/claude_skills/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/claude_skills/skill.py) - -Line 673. - -*** - -### register\_tools - -Register a SWAIG tool for each discovered Claude skill. - -#### Signature - -```python -register_tools() -> None -``` - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/skills/claude_skills/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/claude_skills/skill.py) - -Line 518. - -*** - -### setup - -Setup the Claude skills loader. - -Discovers and parses all SKILL.md files in the configured directory. - -#### Signature - -```python -setup() -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`signalwire/signalwire/skills/claude_skills/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/claude_skills/skill.py) - -Line 63. - -## Source - -[`signalwire/signalwire/skills/claude_skills/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/claude_skills/skill.py) - -Line 38. diff --git a/fern/products/sdk-reference/python/agents/skills/claude-skills/skill/index.mdx b/fern/products/sdk-reference/python/agents/skills/claude-skills/skill/index.mdx index d41dd4c240..24bd1750e0 100644 --- a/fern/products/sdk-reference/python/agents/skills/claude-skills/skill/index.mdx +++ b/fern/products/sdk-reference/python/agents/skills/claude-skills/skill/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.skills.claude_skills.skill" parent: "signalwire.skills.claude_skills" @@ -14,31 +14,171 @@ lustri: --- # `skill` -Copyright (c) 2025 SignalWire +Load Claude-style SKILL.md files as SignalWire agent tools. -This file is part of the SignalWire SDK. +This skill parses Claude Code skill directories and makes them available +as SWAIG tools that the AI can call. Each Claude skill becomes a tool +that returns the skill's instructions when invoked. -Licensed under the MIT License. -See LICENSE file in the project root for full license information. +> ## \[!NOTE] +> +> name: skill-name +> description: When to use this skill +> ----------------------------------- +> +> Markdown instructions here... +> Use $ARGUMENTS for passed args. ## Signature ```python -module skill +class ClaudeSkillsSkill(SkillBase) +``` + +## Inheritance + +**Extends:** `SkillBase` + +## Examples + +```python +Markdown instructions here... +Use $ARGUMENTS for passed args. ``` ## Properties -## Classes + + + + + + + + + + + + +## Methods + +### get\_hints + +Return speech recognition hints based on loaded skills. + +#### Signature + +```python +get_hints() -> List[str] +``` + +#### Returns + +`List[str]` + +#### Source + +[`signalwire/signalwire/skills/claude_skills/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/claude_skills/skill.py) + +Line 610. + +*** + +### get\_instance\_key + +Return unique key for this skill instance. + +#### Signature + +```python +get_instance_key() -> str +``` + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/skills/claude_skills/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/claude_skills/skill.py) + +Line 667. + +*** + +### get\_parameter\_schema - - - Load Claude-style SKILL.md files as SignalWire agent tools. - - +Get the parameter schema for the Claude skills loader. + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +get_parameter_schema() -> Dict[str, Dict[str, Any]] +``` + +#### Returns + +`Dict[str, Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/claude_skills/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/claude_skills/skill.py) + +Line 673. + +*** + +### register\_tools + +Register a SWAIG tool for each discovered Claude skill. + +#### Signature + +```python +register_tools() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/skills/claude_skills/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/claude_skills/skill.py) + +Line 518. + +*** + +### setup + +Setup the Claude skills loader. + +Discovers and parses all SKILL.md files in the configured directory. + +#### Signature + +```python +setup() -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/skills/claude_skills/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/claude_skills/skill.py) + +Line 63. ## Source [`signalwire/signalwire/skills/claude_skills/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/claude_skills/skill.py) + +Line 38. diff --git a/fern/products/sdk-reference/python/agents/skills/datasphere-serverless/index.mdx b/fern/products/sdk-reference/python/agents/skills/datasphere-serverless/index.mdx index da6405325c..93dcadbbef 100644 --- a/fern/products/sdk-reference/python/agents/skills/datasphere-serverless/index.mdx +++ b/fern/products/sdk-reference/python/agents/skills/datasphere-serverless/index.mdx @@ -27,11 +27,11 @@ See LICENSE file in the project root for full license information. module datasphere_serverless ``` -## Modules +## Classes - Copyright (c) 2025 SignalWire + SignalWire DataSphere knowledge search using DataMap (serverless execution) diff --git a/fern/products/sdk-reference/python/agents/skills/datasphere-serverless/skill/data-sphere-serverless-skill/index.mdx b/fern/products/sdk-reference/python/agents/skills/datasphere-serverless/skill/data-sphere-serverless-skill/index.mdx deleted file mode 100644 index a72961322c..0000000000 --- a/fern/products/sdk-reference/python/agents/skills/datasphere-serverless/skill/data-sphere-serverless-skill/index.mdx +++ /dev/null @@ -1,206 +0,0 @@ ---- -slug: "/reference/python/agents/skills/datasphere-serverless/skill/data-sphere-serverless-skill" -title: "DataSphereServerlessSkill" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.skills.datasphere_serverless.skill.DataSphereServerlessSkill" - parent: "signalwire.skills.datasphere_serverless.skill" - module: "agents.skills.datasphere_serverless.skill" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere_serverless/skill.py" ---- -# `DataSphereServerlessSkill` - -SignalWire DataSphere knowledge search using DataMap (serverless execution) - -## Signature - -```python -class DataSphereServerlessSkill(SkillBase) -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/python/agents/skill-base/index__2) - -## Properties - - - - - - - - - - - - - -## Methods - -### get\_global\_data - -Return global data for agent context - -#### Signature - -```python -get_global_data() -> Dict[str, Any] -``` - -#### Returns - -`Dict[str, Any]` - -#### Source - -[`signalwire/signalwire/skills/datasphere_serverless/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere_serverless/skill.py) - -Line 216. - -*** - -### get\_hints - -Return speech recognition hints - -#### Signature - -```python -get_hints() -> List[str] -``` - -#### Returns - -`List[str]` - -#### Source - -[`signalwire/signalwire/skills/datasphere_serverless/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere_serverless/skill.py) - -Line 212. - -*** - -### get\_instance\_key - -Get the key used to track this skill instance - -For DataSphere Serverless, we use 'search\_knowledge' as the default tool name - -#### Signature - -```python -get_instance_key() -> str -``` - -#### Returns - -`str` - -#### Source - -[`signalwire/signalwire/skills/datasphere_serverless/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere_serverless/skill.py) - -Line 111. - -*** - -### get\_parameter\_schema - -Get parameter schema for DataSphere Serverless skill - -**Modifiers:** `classmethod` - -#### Signature - -```python -@classmethod -get_parameter_schema() -> Dict[str, Dict[str, Any]] -``` - -#### Returns - -`Dict[str, Dict[str, Any]]` - -#### Source - -[`signalwire/signalwire/skills/datasphere_serverless/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere_serverless/skill.py) - -Line 29. - -*** - -### get\_prompt\_sections - -Return prompt sections to add to agent - -#### Signature - -```python -get_prompt_sections() -> List[Dict[str, Any]] -``` - -#### Returns - -`List[Dict[str, Any]]` - -#### Source - -[`signalwire/signalwire/skills/datasphere_serverless/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere_serverless/skill.py) - -Line 224. - -*** - -### register\_tools - -Register knowledge search tool using DataMap - -#### Signature - -```python -register_tools() -> None -``` - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/skills/datasphere_serverless/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere_serverless/skill.py) - -Line 161. - -*** - -### setup - -Setup the datasphere serverless skill - -#### Signature - -```python -setup() -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`signalwire/signalwire/skills/datasphere_serverless/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere_serverless/skill.py) - -Line 120. - -## Source - -[`signalwire/signalwire/skills/datasphere_serverless/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere_serverless/skill.py) - -Line 17. diff --git a/fern/products/sdk-reference/python/agents/skills/datasphere-serverless/skill/index.mdx b/fern/products/sdk-reference/python/agents/skills/datasphere-serverless/skill/index.mdx index f90272fb78..dc30940738 100644 --- a/fern/products/sdk-reference/python/agents/skills/datasphere-serverless/skill/index.mdx +++ b/fern/products/sdk-reference/python/agents/skills/datasphere-serverless/skill/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.skills.datasphere_serverless.skill" parent: "signalwire.skills.datasphere_serverless" @@ -14,27 +14,193 @@ lustri: --- # `skill` -Copyright (c) 2025 SignalWire +SignalWire DataSphere knowledge search using DataMap (serverless execution) -This file is part of the SignalWire SDK. +## Signature -Licensed under the MIT License. -See LICENSE file in the project root for full license information. +```python +class DataSphereServerlessSkill(SkillBase) +``` -## Signature +## Inheritance + +**Extends:** `SkillBase` + +## Properties + + + + + + + + + + + + + +## Methods + +### get\_global\_data + +Return global data for agent context + +#### Signature ```python -module skill +get_global_data() -> Dict[str, Any] ``` -## Classes +#### Returns + +`Dict[str, Any]` + +#### Source + +[`signalwire/signalwire/skills/datasphere_serverless/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere_serverless/skill.py) + +Line 216. + +*** + +### get\_hints + +Return speech recognition hints + +#### Signature + +```python +get_hints() -> List[str] +``` + +#### Returns + +`List[str]` + +#### Source + +[`signalwire/signalwire/skills/datasphere_serverless/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere_serverless/skill.py) + +Line 212. + +*** + +### get\_instance\_key + +Get the key used to track this skill instance + +For DataSphere Serverless, we use 'search\_knowledge' as the default tool name + +#### Signature + +```python +get_instance_key() -> str +``` + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/skills/datasphere_serverless/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere_serverless/skill.py) + +Line 111. + +*** + +### get\_parameter\_schema + +Get parameter schema for DataSphere Serverless skill - - - SignalWire DataSphere knowledge search using DataMap (serverless execution) - - +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +get_parameter_schema() -> Dict[str, Dict[str, Any]] +``` + +#### Returns + +`Dict[str, Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/datasphere_serverless/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere_serverless/skill.py) + +Line 29. + +*** + +### get\_prompt\_sections + +Return prompt sections to add to agent + +#### Signature + +```python +get_prompt_sections() -> List[Dict[str, Any]] +``` + +#### Returns + +`List[Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/datasphere_serverless/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere_serverless/skill.py) + +Line 224. + +*** + +### register\_tools + +Register knowledge search tool using DataMap + +#### Signature + +```python +register_tools() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/skills/datasphere_serverless/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere_serverless/skill.py) + +Line 161. + +*** + +### setup + +Setup the datasphere serverless skill + +#### Signature + +```python +setup() -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/skills/datasphere_serverless/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere_serverless/skill.py) + +Line 120. ## Source [`signalwire/signalwire/skills/datasphere_serverless/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere_serverless/skill.py) + +Line 17. diff --git a/fern/products/sdk-reference/python/agents/skills/datasphere/index.mdx b/fern/products/sdk-reference/python/agents/skills/datasphere/index.mdx index 5009612f5f..d3177fd7fa 100644 --- a/fern/products/sdk-reference/python/agents/skills/datasphere/index.mdx +++ b/fern/products/sdk-reference/python/agents/skills/datasphere/index.mdx @@ -31,11 +31,11 @@ module datasphere -## Modules +## Classes - Copyright (c) 2025 SignalWire + SignalWire DataSphere knowledge search capability diff --git a/fern/products/sdk-reference/python/agents/skills/datasphere/skill/data-sphere-skill/index.mdx b/fern/products/sdk-reference/python/agents/skills/datasphere/skill/data-sphere-skill/index.mdx deleted file mode 100644 index c03735e3e6..0000000000 --- a/fern/products/sdk-reference/python/agents/skills/datasphere/skill/data-sphere-skill/index.mdx +++ /dev/null @@ -1,228 +0,0 @@ ---- -slug: "/reference/python/agents/skills/datasphere/skill/data-sphere-skill" -title: "DataSphereSkill" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.skills.datasphere.skill.DataSphereSkill" - parent: "signalwire.skills.datasphere.skill" - module: "agents.skills.datasphere.skill" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere/skill.py" ---- -# `DataSphereSkill` - -SignalWire DataSphere knowledge search capability - -## Signature - -```python -class DataSphereSkill(SkillBase) -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/python/agents/skill-base/index__2) - -## Properties - - - - - - - - - - - - - -## Methods - -### cleanup - -Clean up resources when skill is unloaded. - -#### Signature - -```python -cleanup() -> None -``` - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/skills/datasphere/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere/skill.py) - -Line 280. - -*** - -### get\_global\_data - -Return global data for agent context - -#### Signature - -```python -get_global_data() -> Dict[str, Any] -``` - -#### Returns - -`Dict[str, Any]` - -#### Source - -[`signalwire/signalwire/skills/datasphere/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere/skill.py) - -Line 294. - -*** - -### get\_hints - -Return speech recognition hints - -#### Signature - -```python -get_hints() -> List[str] -``` - -#### Returns - -`List[str]` - -#### Source - -[`signalwire/signalwire/skills/datasphere/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere/skill.py) - -Line 285. - -*** - -### get\_instance\_key - -Get the key used to track this skill instance - -For DataSphere, we use 'search\_knowledge' as the default tool name instead of 'datasphere' - -#### Signature - -```python -get_instance_key() -> str -``` - -#### Returns - -`str` - -#### Source - -[`signalwire/signalwire/skills/datasphere/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere/skill.py) - -Line 111. - -*** - -### get\_parameter\_schema - -Get parameter schema for DataSphere skill - -**Modifiers:** `classmethod` - -#### Signature - -```python -@classmethod -get_parameter_schema() -> Dict[str, Dict[str, Any]] -``` - -#### Returns - -`Dict[str, Dict[str, Any]]` - -#### Source - -[`signalwire/signalwire/skills/datasphere/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere/skill.py) - -Line 29. - -*** - -### get\_prompt\_sections - -Return prompt sections to add to agent - -#### Signature - -```python -get_prompt_sections() -> List[Dict[str, Any]] -``` - -#### Returns - -`List[Dict[str, Any]]` - -#### Source - -[`signalwire/signalwire/skills/datasphere/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere/skill.py) - -Line 302. - -*** - -### register\_tools - -Register knowledge search tool with the agent - -#### Signature - -```python -register_tools() -> None -``` - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/skills/datasphere/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere/skill.py) - -Line 160. - -*** - -### setup - -Setup the datasphere skill - -#### Signature - -```python -setup() -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`signalwire/signalwire/skills/datasphere/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere/skill.py) - -Line 120. - -## Source - -[`signalwire/signalwire/skills/datasphere/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere/skill.py) - -Line 17. diff --git a/fern/products/sdk-reference/python/agents/skills/datasphere/skill/index.mdx b/fern/products/sdk-reference/python/agents/skills/datasphere/skill/index.mdx index 2db97f0785..db41d226ea 100644 --- a/fern/products/sdk-reference/python/agents/skills/datasphere/skill/index.mdx +++ b/fern/products/sdk-reference/python/agents/skills/datasphere/skill/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.skills.datasphere.skill" parent: "signalwire.skills.datasphere" @@ -14,27 +14,215 @@ lustri: --- # `skill` -Copyright (c) 2025 SignalWire +SignalWire DataSphere knowledge search capability -This file is part of the SignalWire SDK. +## Signature -Licensed under the MIT License. -See LICENSE file in the project root for full license information. +```python +class DataSphereSkill(SkillBase) +``` -## Signature +## Inheritance + +**Extends:** `SkillBase` + +## Properties + + + + + + + + + + + + + +## Methods + +### cleanup + +Clean up resources when skill is unloaded. + +#### Signature + +```python +cleanup() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/skills/datasphere/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere/skill.py) + +Line 280. + +*** + +### get\_global\_data + +Return global data for agent context + +#### Signature + +```python +get_global_data() -> Dict[str, Any] +``` + +#### Returns + +`Dict[str, Any]` + +#### Source + +[`signalwire/signalwire/skills/datasphere/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere/skill.py) + +Line 294. + +*** + +### get\_hints + +Return speech recognition hints + +#### Signature + +```python +get_hints() -> List[str] +``` + +#### Returns + +`List[str]` + +#### Source + +[`signalwire/signalwire/skills/datasphere/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere/skill.py) + +Line 285. + +*** + +### get\_instance\_key + +Get the key used to track this skill instance + +For DataSphere, we use 'search\_knowledge' as the default tool name instead of 'datasphere' + +#### Signature + +```python +get_instance_key() -> str +``` + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/skills/datasphere/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere/skill.py) + +Line 111. + +*** + +### get\_parameter\_schema + +Get parameter schema for DataSphere skill + +**Modifiers:** `classmethod` + +#### Signature ```python -module skill +@classmethod +get_parameter_schema() -> Dict[str, Dict[str, Any]] ``` -## Classes +#### Returns + +`Dict[str, Dict[str, Any]]` + +#### Source - - - SignalWire DataSphere knowledge search capability - - +[`signalwire/signalwire/skills/datasphere/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere/skill.py) + +Line 29. + +*** + +### get\_prompt\_sections + +Return prompt sections to add to agent + +#### Signature + +```python +get_prompt_sections() -> List[Dict[str, Any]] +``` + +#### Returns + +`List[Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/datasphere/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere/skill.py) + +Line 302. + +*** + +### register\_tools + +Register knowledge search tool with the agent + +#### Signature + +```python +register_tools() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/skills/datasphere/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere/skill.py) + +Line 160. + +*** + +### setup + +Setup the datasphere skill + +#### Signature + +```python +setup() -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/skills/datasphere/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere/skill.py) + +Line 120. ## Source [`signalwire/signalwire/skills/datasphere/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datasphere/skill.py) + +Line 17. diff --git a/fern/products/sdk-reference/python/agents/skills/datetime/index.mdx b/fern/products/sdk-reference/python/agents/skills/datetime/index.mdx index 5e482f1034..9839a27b6b 100644 --- a/fern/products/sdk-reference/python/agents/skills/datetime/index.mdx +++ b/fern/products/sdk-reference/python/agents/skills/datetime/index.mdx @@ -27,11 +27,11 @@ See LICENSE file in the project root for full license information. module datetime ``` -## Modules +## Classes - Copyright (c) 2025 SignalWire + Provides current date, time, and timezone information diff --git a/fern/products/sdk-reference/python/agents/skills/datetime/skill/date-time-skill/index.mdx b/fern/products/sdk-reference/python/agents/skills/datetime/skill/date-time-skill/index.mdx deleted file mode 100644 index a43f934c94..0000000000 --- a/fern/products/sdk-reference/python/agents/skills/datetime/skill/date-time-skill/index.mdx +++ /dev/null @@ -1,161 +0,0 @@ ---- -slug: "/reference/python/agents/skills/datetime/skill/date-time-skill" -title: "DateTimeSkill" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.skills.datetime.skill.DateTimeSkill" - parent: "signalwire.skills.datetime.skill" - module: "agents.skills.datetime.skill" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datetime/skill.py" ---- -# `DateTimeSkill` - -Provides current date, time, and timezone information - -## Signature - -```python -class DateTimeSkill(SkillBase) -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/python/agents/skill-base/index__2) - -## Properties - - - - - - - - - - - -## Methods - -### get\_hints - -Return speech recognition hints - -#### Signature - -```python -get_hints() -> List[str] -``` - -#### Returns - -`List[str]` - -#### Source - -[`signalwire/signalwire/skills/datetime/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datetime/skill.py) - -Line 93. - -*** - -### get\_parameter\_schema - -Get the parameter schema for the datetime skill - -The datetime skill has no custom parameters - it inherits only -the base parameters from SkillBase. - -**Modifiers:** `classmethod` - -#### Signature - -```python -@classmethod -get_parameter_schema() -> Dict[str, Dict[str, Any]] -``` - -#### Returns - -`Dict[str, Dict[str, Any]]` - -#### Source - -[`signalwire/signalwire/skills/datetime/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datetime/skill.py) - -Line 113. - -*** - -### get\_prompt\_sections - -Return prompt sections to add to agent - -#### Signature - -```python -get_prompt_sections() -> List[Dict[str, Any]] -``` - -#### Returns - -`List[Dict[str, Any]]` - -#### Source - -[`signalwire/signalwire/skills/datetime/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datetime/skill.py) - -Line 99. - -*** - -### register\_tools - -Register datetime tools with the agent - -#### Signature - -```python -register_tools() -> None -``` - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/skills/datetime/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datetime/skill.py) - -Line 30. - -*** - -### setup - -Setup the datetime skill - -#### Signature - -```python -setup() -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`signalwire/signalwire/skills/datetime/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datetime/skill.py) - -Line 26. - -## Source - -[`signalwire/signalwire/skills/datetime/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datetime/skill.py) - -Line 17. diff --git a/fern/products/sdk-reference/python/agents/skills/datetime/skill/index.mdx b/fern/products/sdk-reference/python/agents/skills/datetime/skill/index.mdx index ebf7fe6cdc..d5538dd6ac 100644 --- a/fern/products/sdk-reference/python/agents/skills/datetime/skill/index.mdx +++ b/fern/products/sdk-reference/python/agents/skills/datetime/skill/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.skills.datetime.skill" parent: "signalwire.skills.datetime" @@ -14,27 +14,148 @@ lustri: --- # `skill` -Copyright (c) 2025 SignalWire +Provides current date, time, and timezone information -This file is part of the SignalWire SDK. +## Signature -Licensed under the MIT License. -See LICENSE file in the project root for full license information. +```python +class DateTimeSkill(SkillBase) +``` -## Signature +## Inheritance + +**Extends:** `SkillBase` + +## Properties + + + + + + + + + + + +## Methods + +### get\_hints + +Return speech recognition hints + +#### Signature + +```python +get_hints() -> List[str] +``` + +#### Returns + +`List[str]` + +#### Source + +[`signalwire/signalwire/skills/datetime/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datetime/skill.py) + +Line 93. + +*** + +### get\_parameter\_schema + +Get the parameter schema for the datetime skill + +The datetime skill has no custom parameters - it inherits only +the base parameters from SkillBase. + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +get_parameter_schema() -> Dict[str, Dict[str, Any]] +``` + +#### Returns + +`Dict[str, Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/datetime/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datetime/skill.py) + +Line 113. + +*** + +### get\_prompt\_sections + +Return prompt sections to add to agent + +#### Signature + +```python +get_prompt_sections() -> List[Dict[str, Any]] +``` + +#### Returns + +`List[Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/datetime/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datetime/skill.py) + +Line 99. + +*** + +### register\_tools + +Register datetime tools with the agent + +#### Signature ```python -module skill +register_tools() -> None ``` -## Classes +#### Returns - - - Provides current date, time, and timezone information - - +`None` + +#### Source + +[`signalwire/signalwire/skills/datetime/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datetime/skill.py) + +Line 30. + +*** + +### setup + +Setup the datetime skill + +#### Signature + +```python +setup() -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/skills/datetime/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datetime/skill.py) + +Line 26. ## Source [`signalwire/signalwire/skills/datetime/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/datetime/skill.py) + +Line 17. diff --git a/fern/products/sdk-reference/python/agents/skills/google-maps/skill/google-maps-skill/index.mdx b/fern/products/sdk-reference/python/agents/skills/google-maps/skill/google-maps-skill/index.mdx index 644c43b24f..7bdc49e1c0 100644 --- a/fern/products/sdk-reference/python/agents/skills/google-maps/skill/google-maps-skill/index.mdx +++ b/fern/products/sdk-reference/python/agents/skills/google-maps/skill/google-maps-skill/index.mdx @@ -24,7 +24,7 @@ class GoogleMapsSkill(SkillBase) ## Inheritance -**Extends:** [SkillBase](/docs/sdk-reference/reference/python/agents/skill-base/index__2) +**Extends:** `SkillBase` ## Properties diff --git a/fern/products/sdk-reference/python/agents/skills/index.mdx b/fern/products/sdk-reference/python/agents/skills/index.mdx index 152db3de29..92eb163162 100644 --- a/fern/products/sdk-reference/python/agents/skills/index.mdx +++ b/fern/products/sdk-reference/python/agents/skills/index.mdx @@ -31,6 +31,14 @@ module skills +## Classes + + + + Global registry for on-demand skill loading + + + ## Modules @@ -82,10 +90,6 @@ module skills Copyright (c) 2025 SignalWire - - Copyright (c) 2025 SignalWire - - Copyright (c) 2025 SignalWire diff --git a/fern/products/sdk-reference/python/agents/skills/info-gatherer/index.mdx b/fern/products/sdk-reference/python/agents/skills/info-gatherer/index.mdx index df27f3dc99..611a000989 100644 --- a/fern/products/sdk-reference/python/agents/skills/info-gatherer/index.mdx +++ b/fern/products/sdk-reference/python/agents/skills/info-gatherer/index.mdx @@ -27,11 +27,11 @@ See LICENSE file in the project root for full license information. module info_gatherer ``` -## Modules +## Classes - Copyright (c) 2025 SignalWire + Skill that guides an AI agent through a series of questions, collecting and storing answers in namespaced global\_data. diff --git a/fern/products/sdk-reference/python/agents/skills/info-gatherer/skill/index.mdx b/fern/products/sdk-reference/python/agents/skills/info-gatherer/skill/index.mdx index dc002fe6bf..b617edc4d3 100644 --- a/fern/products/sdk-reference/python/agents/skills/info-gatherer/skill/index.mdx +++ b/fern/products/sdk-reference/python/agents/skills/info-gatherer/skill/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.skills.info_gatherer.skill" parent: "signalwire.skills.info_gatherer" @@ -14,27 +14,142 @@ lustri: --- # `skill` -Copyright (c) 2025 SignalWire +Skill that guides an AI agent through a series of questions, collecting +and storing answers in namespaced global\_data. -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. +Supports multiple instances with different prefixes so several +question sets can coexist on a single agent (e.g. "intake" and +"medical" questionnaires running side by side). ## Signature ```python -module skill +class InfoGathererSkill(SkillBase) +``` + +## Inheritance + +**Extends:** `SkillBase` + +## Properties + + + + + + + + + + + + + +## Methods + +### get\_global\_data + +#### Signature + +```python +get_global_data() -> Dict[str, Any] +``` + +#### Returns + +`Dict[str, Any]` + +#### Source + +[`signalwire/signalwire/skills/info_gatherer/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/info_gatherer/skill.py) + +Line 127. + +*** + +### get\_instance\_key + +#### Signature + +```python +get_instance_key() -> str +``` + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/skills/info_gatherer/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/info_gatherer/skill.py) + +Line 81. + +*** + +### get\_parameter\_schema + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +get_parameter_schema() -> Dict[str, Dict[str, Any]] +``` + +#### Returns + +`Dict[str, Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/info_gatherer/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/info_gatherer/skill.py) + +Line 33. + +*** + +### register\_tools + +#### Signature + +```python +register_tools() -> None ``` -## Classes +#### Returns - - - Skill that guides an AI agent through a series of questions, collecting and storing answers in namespaced global\_data. - - +`None` + +#### Source + +[`signalwire/signalwire/skills/info_gatherer/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/info_gatherer/skill.py) + +Line 162. + +*** + +### setup + +#### Signature + +```python +setup() -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/skills/info_gatherer/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/info_gatherer/skill.py) + +Line 91. ## Source [`signalwire/signalwire/skills/info_gatherer/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/info_gatherer/skill.py) + +Line 16. diff --git a/fern/products/sdk-reference/python/agents/skills/info-gatherer/skill/info-gatherer-skill/index.mdx b/fern/products/sdk-reference/python/agents/skills/info-gatherer/skill/info-gatherer-skill/index.mdx deleted file mode 100644 index 9536a75572..0000000000 --- a/fern/products/sdk-reference/python/agents/skills/info-gatherer/skill/info-gatherer-skill/index.mdx +++ /dev/null @@ -1,155 +0,0 @@ ---- -slug: "/reference/python/agents/skills/info-gatherer/skill/info-gatherer-skill" -title: "InfoGathererSkill" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.skills.info_gatherer.skill.InfoGathererSkill" - parent: "signalwire.skills.info_gatherer.skill" - module: "agents.skills.info_gatherer.skill" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/info_gatherer/skill.py" ---- -# `InfoGathererSkill` - -Skill that guides an AI agent through a series of questions, collecting -and storing answers in namespaced global\_data. - -Supports multiple instances with different prefixes so several -question sets can coexist on a single agent (e.g. "intake" and -"medical" questionnaires running side by side). - -## Signature - -```python -class InfoGathererSkill(SkillBase) -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/python/agents/skill-base/index__2) - -## Properties - - - - - - - - - - - - - -## Methods - -### get\_global\_data - -#### Signature - -```python -get_global_data() -> Dict[str, Any] -``` - -#### Returns - -`Dict[str, Any]` - -#### Source - -[`signalwire/signalwire/skills/info_gatherer/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/info_gatherer/skill.py) - -Line 127. - -*** - -### get\_instance\_key - -#### Signature - -```python -get_instance_key() -> str -``` - -#### Returns - -`str` - -#### Source - -[`signalwire/signalwire/skills/info_gatherer/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/info_gatherer/skill.py) - -Line 81. - -*** - -### get\_parameter\_schema - -**Modifiers:** `classmethod` - -#### Signature - -```python -@classmethod -get_parameter_schema() -> Dict[str, Dict[str, Any]] -``` - -#### Returns - -`Dict[str, Dict[str, Any]]` - -#### Source - -[`signalwire/signalwire/skills/info_gatherer/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/info_gatherer/skill.py) - -Line 33. - -*** - -### register\_tools - -#### Signature - -```python -register_tools() -> None -``` - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/skills/info_gatherer/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/info_gatherer/skill.py) - -Line 162. - -*** - -### setup - -#### Signature - -```python -setup() -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`signalwire/signalwire/skills/info_gatherer/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/info_gatherer/skill.py) - -Line 91. - -## Source - -[`signalwire/signalwire/skills/info_gatherer/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/info_gatherer/skill.py) - -Line 16. diff --git a/fern/products/sdk-reference/python/agents/skills/joke/index.mdx b/fern/products/sdk-reference/python/agents/skills/joke/index.mdx index 2bb1d6269e..2730f29adb 100644 --- a/fern/products/sdk-reference/python/agents/skills/joke/index.mdx +++ b/fern/products/sdk-reference/python/agents/skills/joke/index.mdx @@ -27,11 +27,11 @@ See LICENSE file in the project root for full license information. module joke ``` -## Modules +## Classes - Copyright (c) 2025 SignalWire + Joke telling capability using API Ninjas with DataMap diff --git a/fern/products/sdk-reference/python/agents/skills/joke/skill/index.mdx b/fern/products/sdk-reference/python/agents/skills/joke/skill/index.mdx index 0f44807791..2a8f19eadf 100644 --- a/fern/products/sdk-reference/python/agents/skills/joke/skill/index.mdx +++ b/fern/products/sdk-reference/python/agents/skills/joke/skill/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.skills.joke.skill" parent: "signalwire.skills.joke" @@ -14,27 +14,167 @@ lustri: --- # `skill` -Copyright (c) 2025 SignalWire +Joke telling capability using API Ninjas with DataMap -This file is part of the SignalWire SDK. +## Signature + +```python +class JokeSkill(SkillBase) +``` -Licensed under the MIT License. -See LICENSE file in the project root for full license information. +## Inheritance -## Signature +**Extends:** `SkillBase` + +## Properties + + + + + + + + + + + +## Methods + +### get\_global\_data + +Return global data to be available in DataMap variables + +#### Signature + +```python +get_global_data() -> Dict[str, Any] +``` + +#### Returns + +`Dict[str, Any]` + +#### Source + +[`signalwire/signalwire/skills/joke/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/joke/skill.py) + +Line 91. + +*** + +### get\_hints + +Return speech recognition hints + +#### Signature + +```python +get_hints() -> List[str] +``` + +#### Returns + +`List[str]` + +#### Source + +[`signalwire/signalwire/skills/joke/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/joke/skill.py) + +Line 82. + +*** + +### get\_parameter\_schema + +Get parameter schema for joke skill + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +get_parameter_schema() -> Dict[str, Dict[str, Any]] +``` + +#### Returns + +`Dict[str, Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/joke/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/joke/skill.py) + +Line 26. + +*** + +### get\_prompt\_sections + +Return prompt sections to add to agent + +#### Signature ```python -module skill +get_prompt_sections() -> List[Dict[str, Any]] ``` -## Classes +#### Returns + +`List[Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/joke/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/joke/skill.py) + +Line 97. - - - Joke telling capability using API Ninjas with DataMap - - +*** + +### register\_tools + +Register joke tool using DataMap + +#### Signature + +```python +register_tools() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/skills/joke/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/joke/skill.py) + +Line 64. + +*** + +### setup + +Setup the joke skill + +#### Signature + +```python +setup() -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/skills/joke/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/joke/skill.py) + +Line 47. ## Source [`signalwire/signalwire/skills/joke/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/joke/skill.py) + +Line 17. diff --git a/fern/products/sdk-reference/python/agents/skills/joke/skill/joke-skill/index.mdx b/fern/products/sdk-reference/python/agents/skills/joke/skill/joke-skill/index.mdx deleted file mode 100644 index aa3cdd5c9a..0000000000 --- a/fern/products/sdk-reference/python/agents/skills/joke/skill/joke-skill/index.mdx +++ /dev/null @@ -1,180 +0,0 @@ ---- -slug: "/reference/python/agents/skills/joke/skill/joke-skill" -title: "JokeSkill" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.skills.joke.skill.JokeSkill" - parent: "signalwire.skills.joke.skill" - module: "agents.skills.joke.skill" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/joke/skill.py" ---- -# `JokeSkill` - -Joke telling capability using API Ninjas with DataMap - -## Signature - -```python -class JokeSkill(SkillBase) -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/python/agents/skill-base/index__2) - -## Properties - - - - - - - - - - - -## Methods - -### get\_global\_data - -Return global data to be available in DataMap variables - -#### Signature - -```python -get_global_data() -> Dict[str, Any] -``` - -#### Returns - -`Dict[str, Any]` - -#### Source - -[`signalwire/signalwire/skills/joke/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/joke/skill.py) - -Line 91. - -*** - -### get\_hints - -Return speech recognition hints - -#### Signature - -```python -get_hints() -> List[str] -``` - -#### Returns - -`List[str]` - -#### Source - -[`signalwire/signalwire/skills/joke/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/joke/skill.py) - -Line 82. - -*** - -### get\_parameter\_schema - -Get parameter schema for joke skill - -**Modifiers:** `classmethod` - -#### Signature - -```python -@classmethod -get_parameter_schema() -> Dict[str, Dict[str, Any]] -``` - -#### Returns - -`Dict[str, Dict[str, Any]]` - -#### Source - -[`signalwire/signalwire/skills/joke/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/joke/skill.py) - -Line 26. - -*** - -### get\_prompt\_sections - -Return prompt sections to add to agent - -#### Signature - -```python -get_prompt_sections() -> List[Dict[str, Any]] -``` - -#### Returns - -`List[Dict[str, Any]]` - -#### Source - -[`signalwire/signalwire/skills/joke/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/joke/skill.py) - -Line 97. - -*** - -### register\_tools - -Register joke tool using DataMap - -#### Signature - -```python -register_tools() -> None -``` - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/skills/joke/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/joke/skill.py) - -Line 64. - -*** - -### setup - -Setup the joke skill - -#### Signature - -```python -setup() -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`signalwire/signalwire/skills/joke/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/joke/skill.py) - -Line 47. - -## Source - -[`signalwire/signalwire/skills/joke/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/joke/skill.py) - -Line 17. diff --git a/fern/products/sdk-reference/python/agents/skills/math/index.mdx b/fern/products/sdk-reference/python/agents/skills/math/index.mdx index 210b1a9525..9e8b0b12e8 100644 --- a/fern/products/sdk-reference/python/agents/skills/math/index.mdx +++ b/fern/products/sdk-reference/python/agents/skills/math/index.mdx @@ -27,11 +27,11 @@ See LICENSE file in the project root for full license information. module math ``` -## Modules +## Classes - Copyright (c) 2025 SignalWire + Provides basic mathematical calculation capabilities diff --git a/fern/products/sdk-reference/python/agents/skills/math/skill/index.mdx b/fern/products/sdk-reference/python/agents/skills/math/skill/index.mdx index 82f8400a56..8f983ad371 100644 --- a/fern/products/sdk-reference/python/agents/skills/math/skill/index.mdx +++ b/fern/products/sdk-reference/python/agents/skills/math/skill/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.skills.math.skill" parent: "signalwire.skills.math" @@ -14,27 +14,148 @@ lustri: --- # `skill` -Copyright (c) 2025 SignalWire +Provides basic mathematical calculation capabilities -This file is part of the SignalWire SDK. +## Signature -Licensed under the MIT License. -See LICENSE file in the project root for full license information. +```python +class MathSkill(SkillBase) +``` -## Signature +## Inheritance + +**Extends:** `SkillBase` + +## Properties + + + + + + + + + + + +## Methods + +### get\_hints + +Return speech recognition hints + +#### Signature + +```python +get_hints() -> List[str] +``` + +#### Returns + +`List[str]` + +#### Source + +[`signalwire/signalwire/skills/math/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/math/skill.py) + +Line 108. + +*** + +### get\_parameter\_schema + +Get the parameter schema for the math skill + +The math skill has no custom parameters - it inherits only +the base parameters from SkillBase. + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +get_parameter_schema() -> Dict[str, Dict[str, Any]] +``` + +#### Returns + +`Dict[str, Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/math/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/math/skill.py) + +Line 131. + +*** + +### get\_prompt\_sections + +Return prompt sections to add to agent + +#### Signature + +```python +get_prompt_sections() -> List[Dict[str, Any]] +``` + +#### Returns + +`List[Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/math/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/math/skill.py) + +Line 117. + +*** + +### register\_tools + +Register math tools with the agent + +#### Signature ```python -module skill +register_tools() -> None ``` -## Classes +#### Returns - - - Provides basic mathematical calculation capabilities - - +`None` + +#### Source + +[`signalwire/signalwire/skills/math/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/math/skill.py) + +Line 30. + +*** + +### setup + +Setup the math skill + +#### Signature + +```python +setup() -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/skills/math/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/math/skill.py) + +Line 26. ## Source [`signalwire/signalwire/skills/math/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/math/skill.py) + +Line 17. diff --git a/fern/products/sdk-reference/python/agents/skills/math/skill/math-skill/index.mdx b/fern/products/sdk-reference/python/agents/skills/math/skill/math-skill/index.mdx deleted file mode 100644 index 972c671dc4..0000000000 --- a/fern/products/sdk-reference/python/agents/skills/math/skill/math-skill/index.mdx +++ /dev/null @@ -1,161 +0,0 @@ ---- -slug: "/reference/python/agents/skills/math/skill/math-skill" -title: "MathSkill" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.skills.math.skill.MathSkill" - parent: "signalwire.skills.math.skill" - module: "agents.skills.math.skill" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/math/skill.py" ---- -# `MathSkill` - -Provides basic mathematical calculation capabilities - -## Signature - -```python -class MathSkill(SkillBase) -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/python/agents/skill-base/index__2) - -## Properties - - - - - - - - - - - -## Methods - -### get\_hints - -Return speech recognition hints - -#### Signature - -```python -get_hints() -> List[str] -``` - -#### Returns - -`List[str]` - -#### Source - -[`signalwire/signalwire/skills/math/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/math/skill.py) - -Line 108. - -*** - -### get\_parameter\_schema - -Get the parameter schema for the math skill - -The math skill has no custom parameters - it inherits only -the base parameters from SkillBase. - -**Modifiers:** `classmethod` - -#### Signature - -```python -@classmethod -get_parameter_schema() -> Dict[str, Dict[str, Any]] -``` - -#### Returns - -`Dict[str, Dict[str, Any]]` - -#### Source - -[`signalwire/signalwire/skills/math/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/math/skill.py) - -Line 131. - -*** - -### get\_prompt\_sections - -Return prompt sections to add to agent - -#### Signature - -```python -get_prompt_sections() -> List[Dict[str, Any]] -``` - -#### Returns - -`List[Dict[str, Any]]` - -#### Source - -[`signalwire/signalwire/skills/math/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/math/skill.py) - -Line 117. - -*** - -### register\_tools - -Register math tools with the agent - -#### Signature - -```python -register_tools() -> None -``` - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/skills/math/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/math/skill.py) - -Line 30. - -*** - -### setup - -Setup the math skill - -#### Signature - -```python -setup() -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`signalwire/signalwire/skills/math/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/math/skill.py) - -Line 26. - -## Source - -[`signalwire/signalwire/skills/math/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/math/skill.py) - -Line 17. diff --git a/fern/products/sdk-reference/python/agents/skills/mcp-gateway/index.mdx b/fern/products/sdk-reference/python/agents/skills/mcp-gateway/index.mdx index 563d9b5cb6..14805b9bf8 100644 --- a/fern/products/sdk-reference/python/agents/skills/mcp-gateway/index.mdx +++ b/fern/products/sdk-reference/python/agents/skills/mcp-gateway/index.mdx @@ -27,11 +27,11 @@ See LICENSE file in the project root for full license information. module mcp_gateway ``` -## Modules +## Classes - Copyright (c) 2025 SignalWire + MCP Gateway Skill - Bridge MCP servers with SWAIG functions diff --git a/fern/products/sdk-reference/python/agents/skills/mcp-gateway/skill/index.mdx b/fern/products/sdk-reference/python/agents/skills/mcp-gateway/skill/index.mdx index 07530d5a4a..2bc980156e 100644 --- a/fern/products/sdk-reference/python/agents/skills/mcp-gateway/skill/index.mdx +++ b/fern/products/sdk-reference/python/agents/skills/mcp-gateway/skill/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.skills.mcp_gateway.skill" parent: "signalwire.skills.mcp_gateway" @@ -14,31 +14,172 @@ lustri: --- # `skill` -Copyright (c) 2025 SignalWire +MCP Gateway Skill - Bridge MCP servers with SWAIG functions -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. +This skill connects SignalWire agents to MCP (Model Context Protocol) servers +through a gateway service, dynamically creating SWAIG functions for MCP tools. ## Signature ```python -module skill +class MCPGatewaySkill(SkillBase) ``` +## Inheritance + +**Extends:** `SkillBase` + ## Properties -## Classes + + + + + + + + + + +## Methods + +### get\_global\_data + +Return global data for DataMap variables + +#### Signature + +```python +get_global_data() -> Dict[str, Any] +``` + +#### Returns + +`Dict[str, Any]` + +#### Source + +[`signalwire/signalwire/skills/mcp_gateway/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/mcp_gateway/skill.py) + +Line 392. + +*** + +### get\_hints + +Return speech recognition hints + +#### Signature + +```python +get_hints() -> List[str] +``` + +#### Returns + +`List[str]` + +#### Source + +[`signalwire/signalwire/skills/mcp_gateway/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/mcp_gateway/skill.py) + +Line 381. + +*** + +### get\_parameter\_schema + +Get parameter schema for MCP Gateway skill + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +get_parameter_schema() -> Dict[str, Dict[str, Any]] +``` + +#### Returns + +`Dict[str, Dict[str, Any]]` - - - MCP Gateway Skill - Bridge MCP servers with SWAIG functions - - +#### Source + +[`signalwire/signalwire/skills/mcp_gateway/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/mcp_gateway/skill.py) + +Line 36. + +*** + +### get\_prompt\_sections + +Return prompt sections to add to agent + +#### Signature + +```python +get_prompt_sections() -> List[Dict[str, Any]] +``` + +#### Returns + +`List[Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/mcp_gateway/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/mcp_gateway/skill.py) + +Line 401. + +*** + +### register\_tools + +Register SWAIG tools from MCP services + +#### Signature + +```python +register_tools() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/skills/mcp_gateway/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/mcp_gateway/skill.py) + +Line 185. + +*** + +### setup + +Setup and validate skill configuration + +#### Signature + +```python +setup() -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/skills/mcp_gateway/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/mcp_gateway/skill.py) + +Line 118. ## Source [`signalwire/signalwire/skills/mcp_gateway/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/mcp_gateway/skill.py) + +Line 22. diff --git a/fern/products/sdk-reference/python/agents/skills/mcp-gateway/skill/mcp-gateway-skill/index.mdx b/fern/products/sdk-reference/python/agents/skills/mcp-gateway/skill/mcp-gateway-skill/index.mdx deleted file mode 100644 index 0229cc555f..0000000000 --- a/fern/products/sdk-reference/python/agents/skills/mcp-gateway/skill/mcp-gateway-skill/index.mdx +++ /dev/null @@ -1,183 +0,0 @@ ---- -slug: "/reference/python/agents/skills/mcp-gateway/skill/mcp-gateway-skill" -title: "MCPGatewaySkill" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.skills.mcp_gateway.skill.MCPGatewaySkill" - parent: "signalwire.skills.mcp_gateway.skill" - module: "agents.skills.mcp_gateway.skill" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/mcp_gateway/skill.py" ---- -# `MCPGatewaySkill` - -MCP Gateway Skill - Bridge MCP servers with SWAIG functions - -This skill connects SignalWire agents to MCP (Model Context Protocol) servers -through a gateway service, dynamically creating SWAIG functions for MCP tools. - -## Signature - -```python -class MCPGatewaySkill(SkillBase) -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/python/agents/skill-base/index__2) - -## Properties - - - - - - - - - - - -## Methods - -### get\_global\_data - -Return global data for DataMap variables - -#### Signature - -```python -get_global_data() -> Dict[str, Any] -``` - -#### Returns - -`Dict[str, Any]` - -#### Source - -[`signalwire/signalwire/skills/mcp_gateway/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/mcp_gateway/skill.py) - -Line 392. - -*** - -### get\_hints - -Return speech recognition hints - -#### Signature - -```python -get_hints() -> List[str] -``` - -#### Returns - -`List[str]` - -#### Source - -[`signalwire/signalwire/skills/mcp_gateway/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/mcp_gateway/skill.py) - -Line 381. - -*** - -### get\_parameter\_schema - -Get parameter schema for MCP Gateway skill - -**Modifiers:** `classmethod` - -#### Signature - -```python -@classmethod -get_parameter_schema() -> Dict[str, Dict[str, Any]] -``` - -#### Returns - -`Dict[str, Dict[str, Any]]` - -#### Source - -[`signalwire/signalwire/skills/mcp_gateway/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/mcp_gateway/skill.py) - -Line 36. - -*** - -### get\_prompt\_sections - -Return prompt sections to add to agent - -#### Signature - -```python -get_prompt_sections() -> List[Dict[str, Any]] -``` - -#### Returns - -`List[Dict[str, Any]]` - -#### Source - -[`signalwire/signalwire/skills/mcp_gateway/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/mcp_gateway/skill.py) - -Line 401. - -*** - -### register\_tools - -Register SWAIG tools from MCP services - -#### Signature - -```python -register_tools() -> None -``` - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/skills/mcp_gateway/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/mcp_gateway/skill.py) - -Line 185. - -*** - -### setup - -Setup and validate skill configuration - -#### Signature - -```python -setup() -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`signalwire/signalwire/skills/mcp_gateway/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/mcp_gateway/skill.py) - -Line 118. - -## Source - -[`signalwire/signalwire/skills/mcp_gateway/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/mcp_gateway/skill.py) - -Line 22. diff --git a/fern/products/sdk-reference/python/agents/skills/native-vector-search/index.mdx b/fern/products/sdk-reference/python/agents/skills/native-vector-search/index.mdx index 16c163f823..7a5c0c3c8a 100644 --- a/fern/products/sdk-reference/python/agents/skills/native-vector-search/index.mdx +++ b/fern/products/sdk-reference/python/agents/skills/native-vector-search/index.mdx @@ -27,11 +27,11 @@ See LICENSE file in the project root for full license information. module native_vector_search ``` -## Modules +## Classes - Copyright (c) 2025 SignalWire + Native vector search capability using local document indexes or remote search servers diff --git a/fern/products/sdk-reference/python/agents/skills/native-vector-search/skill/index.mdx b/fern/products/sdk-reference/python/agents/skills/native-vector-search/skill/index.mdx index 9ce4eb8b26..064136423d 100644 --- a/fern/products/sdk-reference/python/agents/skills/native-vector-search/skill/index.mdx +++ b/fern/products/sdk-reference/python/agents/skills/native-vector-search/skill/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.skills.native_vector_search.skill" parent: "signalwire.skills.native_vector_search" @@ -14,27 +14,221 @@ lustri: --- # `skill` -Copyright (c) 2025 SignalWire +Native vector search capability using local document indexes or remote search servers -This file is part of the SignalWire SDK. +## Signature -Licensed under the MIT License. -See LICENSE file in the project root for full license information. +```python +class NativeVectorSearchSkill(SkillBase) +``` -## Signature +## Inheritance + +**Extends:** `SkillBase` + +## Properties + + + + + + + + + + + + + +## Methods + +### cleanup + +Cleanup when skill is removed or agent shuts down + +#### Signature + +```python +cleanup() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/skills/native_vector_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/native_vector_search/skill.py) + +Line 818. + +*** + +### get\_global\_data + +Return data to add to agent's global context + +#### Signature + +```python +get_global_data() -> Dict[str, Any] +``` + +#### Returns + +`Dict[str, Any]` + +#### Source + +[`signalwire/signalwire/skills/native_vector_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/native_vector_search/skill.py) + +Line 783. + +*** + +### get\_hints + +Return speech recognition hints for this skill + +#### Signature + +```python +get_hints() -> List[str] +``` + +#### Returns + +`List[str]` + +#### Source + +[`signalwire/signalwire/skills/native_vector_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/native_vector_search/skill.py) + +Line 767. + +*** + +### get\_instance\_key + +Get the key used to track this skill instance + +For native vector search, we use the tool name to differentiate instances + +#### Signature + +```python +get_instance_key() -> str +``` + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/skills/native_vector_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/native_vector_search/skill.py) + +Line 231. + +*** + +### get\_parameter\_schema + +Get parameter schema for Native Vector Search skill + +This skill supports three modes of operation: + +1. Network Mode: Set 'remote\_url' to connect to a remote search server +2. Local pgvector: Set backend='pgvector' with connection\_string and collection\_name +3. Local SQLite: Set 'index\_file' to use a local .swsearch file (default) + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +get_parameter_schema() -> Dict[str, Dict[str, Any]] +``` + +#### Returns + +`Dict[str, Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/native_vector_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/native_vector_search/skill.py) + +Line 31. + +*** + +### get\_prompt\_sections + +Return prompt sections to add to agent + +#### Signature + +```python +get_prompt_sections() -> List[Dict[str, Any]] +``` + +#### Returns + +`List[Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/native_vector_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/native_vector_search/skill.py) + +Line 796. + +*** + +### register\_tools + +Register native vector search tool with the agent + +#### Signature ```python -module skill +register_tools() -> None ``` -## Classes +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/skills/native_vector_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/native_vector_search/skill.py) - - - Native vector search capability using local document indexes or remote search servers - - +Line 468. + +*** + +### setup + +Setup the native vector search skill + +#### Signature + +```python +setup() -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/skills/native_vector_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/native_vector_search/skill.py) + +Line 241. ## Source [`signalwire/signalwire/skills/native_vector_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/native_vector_search/skill.py) + +Line 19. diff --git a/fern/products/sdk-reference/python/agents/skills/native-vector-search/skill/native-vector-search-skill/index.mdx b/fern/products/sdk-reference/python/agents/skills/native-vector-search/skill/native-vector-search-skill/index.mdx deleted file mode 100644 index eece036140..0000000000 --- a/fern/products/sdk-reference/python/agents/skills/native-vector-search/skill/native-vector-search-skill/index.mdx +++ /dev/null @@ -1,234 +0,0 @@ ---- -slug: "/reference/python/agents/skills/native-vector-search/skill/native-vector-search-skill" -title: "NativeVectorSearchSkill" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.skills.native_vector_search.skill.NativeVectorSearchSkill" - parent: "signalwire.skills.native_vector_search.skill" - module: "agents.skills.native_vector_search.skill" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/native_vector_search/skill.py" ---- -# `NativeVectorSearchSkill` - -Native vector search capability using local document indexes or remote search servers - -## Signature - -```python -class NativeVectorSearchSkill(SkillBase) -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/python/agents/skill-base/index__2) - -## Properties - - - - - - - - - - - - - -## Methods - -### cleanup - -Cleanup when skill is removed or agent shuts down - -#### Signature - -```python -cleanup() -> None -``` - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/skills/native_vector_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/native_vector_search/skill.py) - -Line 818. - -*** - -### get\_global\_data - -Return data to add to agent's global context - -#### Signature - -```python -get_global_data() -> Dict[str, Any] -``` - -#### Returns - -`Dict[str, Any]` - -#### Source - -[`signalwire/signalwire/skills/native_vector_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/native_vector_search/skill.py) - -Line 783. - -*** - -### get\_hints - -Return speech recognition hints for this skill - -#### Signature - -```python -get_hints() -> List[str] -``` - -#### Returns - -`List[str]` - -#### Source - -[`signalwire/signalwire/skills/native_vector_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/native_vector_search/skill.py) - -Line 767. - -*** - -### get\_instance\_key - -Get the key used to track this skill instance - -For native vector search, we use the tool name to differentiate instances - -#### Signature - -```python -get_instance_key() -> str -``` - -#### Returns - -`str` - -#### Source - -[`signalwire/signalwire/skills/native_vector_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/native_vector_search/skill.py) - -Line 231. - -*** - -### get\_parameter\_schema - -Get parameter schema for Native Vector Search skill - -This skill supports three modes of operation: - -1. Network Mode: Set 'remote\_url' to connect to a remote search server -2. Local pgvector: Set backend='pgvector' with connection\_string and collection\_name -3. Local SQLite: Set 'index\_file' to use a local .swsearch file (default) - -**Modifiers:** `classmethod` - -#### Signature - -```python -@classmethod -get_parameter_schema() -> Dict[str, Dict[str, Any]] -``` - -#### Returns - -`Dict[str, Dict[str, Any]]` - -#### Source - -[`signalwire/signalwire/skills/native_vector_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/native_vector_search/skill.py) - -Line 31. - -*** - -### get\_prompt\_sections - -Return prompt sections to add to agent - -#### Signature - -```python -get_prompt_sections() -> List[Dict[str, Any]] -``` - -#### Returns - -`List[Dict[str, Any]]` - -#### Source - -[`signalwire/signalwire/skills/native_vector_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/native_vector_search/skill.py) - -Line 796. - -*** - -### register\_tools - -Register native vector search tool with the agent - -#### Signature - -```python -register_tools() -> None -``` - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/skills/native_vector_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/native_vector_search/skill.py) - -Line 468. - -*** - -### setup - -Setup the native vector search skill - -#### Signature - -```python -setup() -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`signalwire/signalwire/skills/native_vector_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/native_vector_search/skill.py) - -Line 241. - -## Source - -[`signalwire/signalwire/skills/native_vector_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/native_vector_search/skill.py) - -Line 19. diff --git a/fern/products/sdk-reference/python/agents/skills/play-background-file/index.mdx b/fern/products/sdk-reference/python/agents/skills/play-background-file/index.mdx index c5fa1bd487..a19e0694ee 100644 --- a/fern/products/sdk-reference/python/agents/skills/play-background-file/index.mdx +++ b/fern/products/sdk-reference/python/agents/skills/play-background-file/index.mdx @@ -31,11 +31,11 @@ module play_background_file -## Modules +## Classes - Copyright (c) 2025 SignalWire + Skill for playing background files (audio/video) with configurable tool names. diff --git a/fern/products/sdk-reference/python/agents/skills/play-background-file/skill/index.mdx b/fern/products/sdk-reference/python/agents/skills/play-background-file/skill/index.mdx index ea8dedb6d8..52c541c617 100644 --- a/fern/products/sdk-reference/python/agents/skills/play-background-file/skill/index.mdx +++ b/fern/products/sdk-reference/python/agents/skills/play-background-file/skill/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.skills.play_background_file.skill" parent: "signalwire.skills.play_background_file" @@ -14,27 +14,194 @@ lustri: --- # `skill` -Copyright (c) 2025 SignalWire +Skill for playing background files (audio/video) with configurable tool names. -This file is part of the SignalWire SDK. +Supports multiple instances with different tool names and file collections. +Uses DataMap for serverless execution with dynamic enum generation. -Licensed under the MIT License. -See LICENSE file in the project root for full license information. +Configuration: + +- tool\_name: Custom name for the generated SWAIG function +- files: Array of file objects with key, description, url, and optional wait + +> \[!NOTE] +> agent.add\_skill("play\_background\_file", \{ +> "tool\_name": "play\_testimonial", +> "files": \[ +> \{ +> "key": "massey", +> "description": "Customer success story from Massey Energy", +> "url": "https://example.com/massey.mp4", +> "wait": True +> \} +> ] +> \}) ## Signature ```python -module skill +class PlayBackgroundFileSkill(SkillBase) +``` + +## Inheritance + +**Extends:** `SkillBase` + +## Properties + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +Initialize the skill with configuration parameters. + +#### Signature + +```python +__init__(agent, params: Dict[str, Any] = None) +``` + +#### Parameters + + + The agent instance this skill belongs to + + + + Configuration dictionary containing: + + +#### Source + +[`signalwire/signalwire/skills/play_background_file/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/play_background_file/skill.py) + +Line 87. + +*** + +### get\_instance\_key + +Generate a unique instance key for this skill configuration. + +#### Signature + +```python +get_instance_key() -> str +``` + +#### Returns + +`str` — Unique key combining skill name and tool name + +#### Source + +[`signalwire/signalwire/skills/play_background_file/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/play_background_file/skill.py) + +Line 131. + +*** + +### get\_parameter\_schema + +Get parameter schema for Play Background File skill + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +get_parameter_schema() -> Dict[str, Dict[str, Any]] ``` -## Classes +#### Returns - - - Skill for playing background files (audio/video) with configurable tool names. - - +`Dict[str, Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/play_background_file/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/play_background_file/skill.py) + +Line 51. + +*** + +### get\_tools + +Generate the SWAIG tool with DataMap expressions. + +#### Signature + +```python +get_tools() -> List[Dict[str, Any]] +``` + +#### Returns + +`List[Dict[str, Any]]` — List containing the generated tool configuration + +#### Source + +[`signalwire/signalwire/skills/play_background_file/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/play_background_file/skill.py) + +Line 158. + +*** + +### register\_tools + +Register SWAIG tools with the agent + +#### Signature + +```python +register_tools() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/skills/play_background_file/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/play_background_file/skill.py) + +Line 149. + +*** + +### setup + +Setup the skill - no external dependencies needed. + +#### Signature + +```python +setup() -> bool +``` + +#### Returns + +`bool` — True if setup successful + +#### Source + +[`signalwire/signalwire/skills/play_background_file/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/play_background_file/skill.py) + +Line 140. ## Source [`signalwire/signalwire/skills/play_background_file/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/play_background_file/skill.py) + +Line 22. diff --git a/fern/products/sdk-reference/python/agents/skills/play-background-file/skill/play-background-file-skill/index.mdx b/fern/products/sdk-reference/python/agents/skills/play-background-file/skill/play-background-file-skill/index.mdx deleted file mode 100644 index 8e5fc5ce41..0000000000 --- a/fern/products/sdk-reference/python/agents/skills/play-background-file/skill/play-background-file-skill/index.mdx +++ /dev/null @@ -1,207 +0,0 @@ ---- -slug: "/reference/python/agents/skills/play-background-file/skill/play-background-file-skill" -title: "PlayBackgroundFileSkill" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.skills.play_background_file.skill.PlayBackgroundFileSkill" - parent: "signalwire.skills.play_background_file.skill" - module: "agents.skills.play_background_file.skill" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/play_background_file/skill.py" ---- -# `PlayBackgroundFileSkill` - -Skill for playing background files (audio/video) with configurable tool names. - -Supports multiple instances with different tool names and file collections. -Uses DataMap for serverless execution with dynamic enum generation. - -Configuration: - -- tool\_name: Custom name for the generated SWAIG function -- files: Array of file objects with key, description, url, and optional wait - -> \[!NOTE] -> agent.add\_skill("play\_background\_file", \{ -> "tool\_name": "play\_testimonial", -> "files": \[ -> \{ -> "key": "massey", -> "description": "Customer success story from Massey Energy", -> "url": "https://example.com/massey.mp4", -> "wait": True -> \} -> ] -> \}) - -## Signature - -```python -class PlayBackgroundFileSkill(SkillBase) -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/python/agents/skill-base/index__2) - -## Properties - - - - - - - - - - - -## Methods - -### \_\_init\_\_ - -Initialize the skill with configuration parameters. - -#### Signature - -```python -__init__(agent, params: Dict[str, Any] = None) -``` - -#### Parameters - - - The agent instance this skill belongs to - - - - Configuration dictionary containing: - - -#### Source - -[`signalwire/signalwire/skills/play_background_file/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/play_background_file/skill.py) - -Line 87. - -*** - -### get\_instance\_key - -Generate a unique instance key for this skill configuration. - -#### Signature - -```python -get_instance_key() -> str -``` - -#### Returns - -`str` — Unique key combining skill name and tool name - -#### Source - -[`signalwire/signalwire/skills/play_background_file/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/play_background_file/skill.py) - -Line 131. - -*** - -### get\_parameter\_schema - -Get parameter schema for Play Background File skill - -**Modifiers:** `classmethod` - -#### Signature - -```python -@classmethod -get_parameter_schema() -> Dict[str, Dict[str, Any]] -``` - -#### Returns - -`Dict[str, Dict[str, Any]]` - -#### Source - -[`signalwire/signalwire/skills/play_background_file/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/play_background_file/skill.py) - -Line 51. - -*** - -### get\_tools - -Generate the SWAIG tool with DataMap expressions. - -#### Signature - -```python -get_tools() -> List[Dict[str, Any]] -``` - -#### Returns - -`List[Dict[str, Any]]` — List containing the generated tool configuration - -#### Source - -[`signalwire/signalwire/skills/play_background_file/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/play_background_file/skill.py) - -Line 158. - -*** - -### register\_tools - -Register SWAIG tools with the agent - -#### Signature - -```python -register_tools() -> None -``` - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/skills/play_background_file/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/play_background_file/skill.py) - -Line 149. - -*** - -### setup - -Setup the skill - no external dependencies needed. - -#### Signature - -```python -setup() -> bool -``` - -#### Returns - -`bool` — True if setup successful - -#### Source - -[`signalwire/signalwire/skills/play_background_file/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/play_background_file/skill.py) - -Line 140. - -## Source - -[`signalwire/signalwire/skills/play_background_file/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/play_background_file/skill.py) - -Line 22. diff --git a/fern/products/sdk-reference/python/agents/skills/registry/index.mdx b/fern/products/sdk-reference/python/agents/skills/registry/index.mdx index b9ac9b7a1a..32b23689ad 100644 --- a/fern/products/sdk-reference/python/agents/skills/registry/index.mdx +++ b/fern/products/sdk-reference/python/agents/skills/registry/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.skills.registry" parent: "signalwire.skills" @@ -14,31 +14,265 @@ lustri: --- # `registry` -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. +Global registry for on-demand skill loading ## Signature ```python -module registry +class SkillRegistry ``` ## Properties + + -## Classes +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__() +``` + +#### Source + +[`signalwire/signalwire/skills/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/registry.py) + +Line 25. + +*** + +### add\_skill\_directory + +Add a directory to search for skills + +This allows third-party skill collections to be registered by path. +Skills in these directories should follow the same structure as built-in skills: + +- Each skill in its own subdirectory +- skill.py file containing the skill class + +> \[!NOTE] +> skill\_registry.add\_skill\_directory('/opt/custom\_skills') +> +> ### Now agent.add\_skill('my\_custom\_skill') will search in this directory + +#### Signature + +```python +add_skill_directory(path: str) -> None +``` + +#### Parameters + + + Path to directory containing skill subdirectories + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/skills/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/registry.py) + +Line 353. + +*** + +### discover\_skills + +Discover and return all available skills. + +Skills load on-demand, so there is nothing to eagerly register; this +scans the skills package and returns metadata for everything +discoverable, so callers can enumerate what is available. + +#### Signature + +```python +discover_skills() -> List[Dict[str, str]] +``` + +#### Returns + +`List[Dict[str, str]]` + +#### Source + +[`signalwire/signalwire/skills/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/registry.py) + +Line 122. + +*** + +### get\_all\_skills\_schema + +Get complete schema for all available skills including parameter metadata + +This method scans all available skills and returns a comprehensive schema +that includes skill metadata and parameter definitions suitable for GUI +configuration or API documentation. + +> \[!NOTE] +> \{ +> "web\_search": \{ +> "name": "web\_search", +> "description": "Search the web for information", +> "version": "1.0.0", +> "supports\_multiple\_instances": True, +> "required\_packages": \["bs4", "requests"], +> "required\_env\_vars": \[], +> "parameters": \{ +> "api\_key": \{ +> "type": "string", +> "description": "Google API key", +> "required": True, +> "hidden": True, +> "env\_var": "GOOGLE\_SEARCH\_API\_KEY" +> \}, +> ... +> \}, +> "source": "built-in" +> \} +> \} + +#### Signature + +```python +get_all_skills_schema() -> Dict[str, Dict[str, Any]] +``` + +#### Returns + +`Dict[str, Dict[str, Any]]` — Dict\[str, Dict\[str, Any]]: Complete skill schema where keys are skill names and values contain: + +#### Source + +[`signalwire/signalwire/skills/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/registry.py) + +Line 232. - - - Global registry for on-demand skill loading - - +*** + +### get\_skill\_class + +Get skill class by name, loading on-demand if needed + +#### Signature + +```python +get_skill_class(skill_name: str) -> Optional[Type[SkillBase]] +``` + +#### Parameters + + + +#### Returns + +`Optional[Type[SkillBase]]` + +#### Source + +[`signalwire/signalwire/skills/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/registry.py) + +Line 199. + +*** + +### list\_all\_skill\_sources + +List all skill sources and the skills available from each + +Returns a dictionary mapping source types to lists of skill names: +\{ +'built-in': \['datetime', 'math', ...], +'external\_paths': \['custom\_skill1', ...], +'entry\_points': \['weather', ...], +'registered': \['my\_skill', ...] +\} + +#### Signature + +```python +list_all_skill_sources() -> Dict[str, List[str]] +``` + +#### Returns + +`Dict[str, List[str]]` + +#### Source + +[`signalwire/signalwire/skills/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/registry.py) + +Line 439. + +*** + +### list\_skills + +List all available skills by scanning directories (only when explicitly requested) + +#### Signature + +```python +list_skills() -> List[Dict[str, str]] +``` + +#### Returns + +`List[Dict[str, str]]` + +#### Source + +[`signalwire/signalwire/skills/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/registry.py) + +Line 208. + +*** + +### register\_skill + +Register a skill class directly + +This allows third-party code to register skill classes without +requiring them to be in a specific directory structure. + +> \[!NOTE] +> from my\_custom\_skills import MyWeatherSkill +> skill\_registry.register\_skill(MyWeatherSkill) + +#### Signature + +```python +register_skill(skill_class: Type[SkillBase]) -> None +``` + +#### Parameters + + + A class that inherits from SkillBase + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/skills/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/registry.py) + +Line 135. ## Source [`signalwire/signalwire/skills/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/registry.py) + +Line 22. diff --git a/fern/products/sdk-reference/python/agents/skills/registry/skill-registry/index.mdx b/fern/products/sdk-reference/python/agents/skills/registry/skill-registry/index.mdx deleted file mode 100644 index 2e7005b00e..0000000000 --- a/fern/products/sdk-reference/python/agents/skills/registry/skill-registry/index.mdx +++ /dev/null @@ -1,276 +0,0 @@ ---- -slug: "/reference/python/agents/skills/registry/skill-registry" -title: "SkillRegistry" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.skills.registry.SkillRegistry" - parent: "signalwire.skills.registry" - module: "agents.skills.registry" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/registry.py" ---- -# `SkillRegistry` - -Global registry for on-demand skill loading - -## Signature - -```python -class SkillRegistry -``` - -## Properties - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__() -``` - -#### Source - -[`signalwire/signalwire/skills/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/registry.py) - -Line 25. - -*** - -### add\_skill\_directory - -Add a directory to search for skills - -This allows third-party skill collections to be registered by path. -Skills in these directories should follow the same structure as built-in skills: - -- Each skill in its own subdirectory -- skill.py file containing the skill class - -> \[!NOTE] -> skill\_registry.add\_skill\_directory('/opt/custom\_skills') -> -> ### Now agent.add\_skill('my\_custom\_skill') will search in this directory - -#### Signature - -```python -add_skill_directory(path: str) -> None -``` - -#### Parameters - - - Path to directory containing skill subdirectories - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/skills/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/registry.py) - -Line 353. - -*** - -### discover\_skills - -Discover and return all available skills. - -Skills load on-demand, so there is nothing to eagerly register; this -scans the skills package and returns metadata for everything -discoverable, so callers can enumerate what is available. - -#### Signature - -```python -discover_skills() -> List[Dict[str, str]] -``` - -#### Returns - -`List[Dict[str, str]]` - -#### Source - -[`signalwire/signalwire/skills/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/registry.py) - -Line 122. - -*** - -### get\_all\_skills\_schema - -Get complete schema for all available skills including parameter metadata - -This method scans all available skills and returns a comprehensive schema -that includes skill metadata and parameter definitions suitable for GUI -configuration or API documentation. - -> \[!NOTE] -> \{ -> "web\_search": \{ -> "name": "web\_search", -> "description": "Search the web for information", -> "version": "1.0.0", -> "supports\_multiple\_instances": True, -> "required\_packages": \["bs4", "requests"], -> "required\_env\_vars": \[], -> "parameters": \{ -> "api\_key": \{ -> "type": "string", -> "description": "Google API key", -> "required": True, -> "hidden": True, -> "env\_var": "GOOGLE\_SEARCH\_API\_KEY" -> \}, -> ... -> \}, -> "source": "built-in" -> \} -> \} - -#### Signature - -```python -get_all_skills_schema() -> Dict[str, Dict[str, Any]] -``` - -#### Returns - -`Dict[str, Dict[str, Any]]` — Dict\[str, Dict\[str, Any]]: Complete skill schema where keys are skill names and values contain: - -#### Source - -[`signalwire/signalwire/skills/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/registry.py) - -Line 232. - -*** - -### get\_skill\_class - -Get skill class by name, loading on-demand if needed - -#### Signature - -```python -get_skill_class(skill_name: str) -> Optional[Type[SkillBase]] -``` - -#### Parameters - - - -#### Returns - -`Optional[Type[SkillBase]]` - -#### Source - -[`signalwire/signalwire/skills/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/registry.py) - -Line 199. - -*** - -### list\_all\_skill\_sources - -List all skill sources and the skills available from each - -Returns a dictionary mapping source types to lists of skill names: -\{ -'built-in': \['datetime', 'math', ...], -'external\_paths': \['custom\_skill1', ...], -'entry\_points': \['weather', ...], -'registered': \['my\_skill', ...] -\} - -#### Signature - -```python -list_all_skill_sources() -> Dict[str, List[str]] -``` - -#### Returns - -`Dict[str, List[str]]` - -#### Source - -[`signalwire/signalwire/skills/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/registry.py) - -Line 439. - -*** - -### list\_skills - -List all available skills by scanning directories (only when explicitly requested) - -#### Signature - -```python -list_skills() -> List[Dict[str, str]] -``` - -#### Returns - -`List[Dict[str, str]]` - -#### Source - -[`signalwire/signalwire/skills/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/registry.py) - -Line 208. - -*** - -### register\_skill - -Register a skill class directly - -This allows third-party code to register skill classes without -requiring them to be in a specific directory structure. - -> \[!NOTE] -> from my\_custom\_skills import MyWeatherSkill -> skill\_registry.register\_skill(MyWeatherSkill) - -#### Signature - -```python -register_skill(skill_class: Type[SkillBase]) -> None -``` - -#### Parameters - - - A class that inherits from SkillBase - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/skills/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/registry.py) - -Line 135. - -## Source - -[`signalwire/signalwire/skills/registry.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/registry.py) - -Line 22. diff --git a/fern/products/sdk-reference/python/agents/skills/spider/index.mdx b/fern/products/sdk-reference/python/agents/skills/spider/index.mdx index 3ceafac5d3..7b5cce2a9f 100644 --- a/fern/products/sdk-reference/python/agents/skills/spider/index.mdx +++ b/fern/products/sdk-reference/python/agents/skills/spider/index.mdx @@ -31,11 +31,11 @@ module spider -## Modules +## Classes - Copyright (c) 2025 SignalWire + Fast web scraping skill optimized for speed and token efficiency. diff --git a/fern/products/sdk-reference/python/agents/skills/spider/skill/index.mdx b/fern/products/sdk-reference/python/agents/skills/spider/skill/index.mdx index 2b83e82c1d..e392041aed 100644 --- a/fern/products/sdk-reference/python/agents/skills/spider/skill/index.mdx +++ b/fern/products/sdk-reference/python/agents/skills/spider/skill/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.skills.spider.skill" parent: "signalwire.skills.spider" @@ -14,27 +14,225 @@ lustri: --- # `skill` -Copyright (c) 2025 SignalWire +Fast web scraping skill optimized for speed and token efficiency. -This file is part of the SignalWire SDK. +## Signature -Licensed under the MIT License. -See LICENSE file in the project root for full license information. +```python +class SpiderSkill(SkillBase) +``` -## Signature +## Inheritance + +**Extends:** `SkillBase` + +## Properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +Initialize the spider skill with configuration parameters. + +#### Signature + +```python +__init__(agent, params: Dict[str, Any]) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/skills/spider/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/spider/skill.py) + +Line 150. + +*** + +### cleanup + +Clean up resources when skill is unloaded. + +#### Signature + +```python +cleanup() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/skills/spider/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/spider/skill.py) + +Line 620. + +*** + +### get\_hints + +Return speech recognition hints for this skill. + +#### Signature ```python -module skill +get_hints() -> List[str] ``` -## Classes +#### Returns - - - Fast web scraping skill optimized for speed and token efficiency. - - +`List[str]` + +#### Source + +[`signalwire/signalwire/skills/spider/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/spider/skill.py) + +Line 613. + +*** + +### get\_instance\_key + +Return unique key for this skill instance. + +#### Signature + +```python +get_instance_key() -> str +``` + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/skills/spider/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/spider/skill.py) + +Line 191. + +*** + +### get\_parameter\_schema + +Get parameter schema for Spider skill + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +get_parameter_schema() -> Dict[str, Dict[str, Any]] +``` + +#### Returns + +`Dict[str, Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/spider/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/spider/skill.py) + +Line 37. + +*** + +### register\_tools + +Register the web scraping tools with the agent. + +#### Signature + +```python +register_tools() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/skills/spider/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/spider/skill.py) + +Line 229. + +*** + +### setup + +Validate configuration and setup the skill. + +#### Signature + +```python +setup() -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/skills/spider/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/spider/skill.py) + +Line 196. ## Source [`signalwire/signalwire/skills/spider/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/spider/skill.py) + +Line 24. diff --git a/fern/products/sdk-reference/python/agents/skills/spider/skill/spider-skill/index.mdx b/fern/products/sdk-reference/python/agents/skills/spider/skill/spider-skill/index.mdx deleted file mode 100644 index 00b52fea9a..0000000000 --- a/fern/products/sdk-reference/python/agents/skills/spider/skill/spider-skill/index.mdx +++ /dev/null @@ -1,238 +0,0 @@ ---- -slug: "/reference/python/agents/skills/spider/skill/spider-skill" -title: "SpiderSkill" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.skills.spider.skill.SpiderSkill" - parent: "signalwire.skills.spider.skill" - module: "agents.skills.spider.skill" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/spider/skill.py" ---- -# `SpiderSkill` - -Fast web scraping skill optimized for speed and token efficiency. - -## Signature - -```python -class SpiderSkill(SkillBase) -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/python/agents/skill-base/index__2) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -## Methods - -### \_\_init\_\_ - -Initialize the spider skill with configuration parameters. - -#### Signature - -```python -__init__(agent, params: Dict[str, Any]) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/skills/spider/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/spider/skill.py) - -Line 150. - -*** - -### cleanup - -Clean up resources when skill is unloaded. - -#### Signature - -```python -cleanup() -> None -``` - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/skills/spider/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/spider/skill.py) - -Line 620. - -*** - -### get\_hints - -Return speech recognition hints for this skill. - -#### Signature - -```python -get_hints() -> List[str] -``` - -#### Returns - -`List[str]` - -#### Source - -[`signalwire/signalwire/skills/spider/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/spider/skill.py) - -Line 613. - -*** - -### get\_instance\_key - -Return unique key for this skill instance. - -#### Signature - -```python -get_instance_key() -> str -``` - -#### Returns - -`str` - -#### Source - -[`signalwire/signalwire/skills/spider/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/spider/skill.py) - -Line 191. - -*** - -### get\_parameter\_schema - -Get parameter schema for Spider skill - -**Modifiers:** `classmethod` - -#### Signature - -```python -@classmethod -get_parameter_schema() -> Dict[str, Dict[str, Any]] -``` - -#### Returns - -`Dict[str, Dict[str, Any]]` - -#### Source - -[`signalwire/signalwire/skills/spider/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/spider/skill.py) - -Line 37. - -*** - -### register\_tools - -Register the web scraping tools with the agent. - -#### Signature - -```python -register_tools() -> None -``` - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/skills/spider/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/spider/skill.py) - -Line 229. - -*** - -### setup - -Validate configuration and setup the skill. - -#### Signature - -```python -setup() -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`signalwire/signalwire/skills/spider/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/spider/skill.py) - -Line 196. - -## Source - -[`signalwire/signalwire/skills/spider/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/spider/skill.py) - -Line 24. diff --git a/fern/products/sdk-reference/python/agents/skills/swml-transfer/index.mdx b/fern/products/sdk-reference/python/agents/skills/swml-transfer/index.mdx index c952e99b1a..44b087dfbe 100644 --- a/fern/products/sdk-reference/python/agents/skills/swml-transfer/index.mdx +++ b/fern/products/sdk-reference/python/agents/skills/swml-transfer/index.mdx @@ -27,11 +27,11 @@ See LICENSE file in the project root for full license information. module swml_transfer ``` -## Modules +## Classes - Copyright (c) 2025 SignalWire + Skill for transferring calls between agents using SWML with pattern matching diff --git a/fern/products/sdk-reference/python/agents/skills/swml-transfer/skill/index.mdx b/fern/products/sdk-reference/python/agents/skills/swml-transfer/skill/index.mdx index 273d9caae8..05168aee2a 100644 --- a/fern/products/sdk-reference/python/agents/skills/swml-transfer/skill/index.mdx +++ b/fern/products/sdk-reference/python/agents/skills/swml-transfer/skill/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.skills.swml_transfer.skill" parent: "signalwire.skills.swml_transfer" @@ -14,27 +14,171 @@ lustri: --- # `skill` -Copyright (c) 2025 SignalWire +Skill for transferring calls between agents using SWML with pattern matching -This file is part of the SignalWire SDK. +## Signature + +```python +class SWMLTransferSkill(SkillBase) +``` -Licensed under the MIT License. -See LICENSE file in the project root for full license information. +## Inheritance -## Signature +**Extends:** `SkillBase` + +## Properties + + + + + + + + + + + + + +## Methods + +### get\_hints + +Return speech recognition hints + +#### Signature + +```python +get_hints() -> List[str] +``` + +#### Returns + +`List[str]` + +#### Source + +[`signalwire/signalwire/skills/swml_transfer/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/swml_transfer/skill.py) + +Line 266. + +*** + +### get\_instance\_key + +Get the key used to track this skill instance + +For SWML transfer, we use the tool name to differentiate instances + +#### Signature + +```python +get_instance_key() -> str +``` + +#### Returns + +`str` + +#### Source + +[`signalwire/signalwire/skills/swml_transfer/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/swml_transfer/skill.py) + +Line 120. + +*** + +### get\_parameter\_schema + +Get parameter schema for SWML Transfer skill + +**Modifiers:** `classmethod` + +#### Signature ```python -module skill +@classmethod +get_parameter_schema() -> Dict[str, Dict[str, Any]] ``` -## Classes +#### Returns - - - Skill for transferring calls between agents using SWML with pattern matching - - +`Dict[str, Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/swml_transfer/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/swml_transfer/skill.py) + +Line 30. + +*** + +### get\_prompt\_sections + +Return prompt sections to add to agent + +#### Signature + +```python +get_prompt_sections() -> List[Dict[str, Any]] +``` + +#### Returns + +`List[Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/swml_transfer/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/swml_transfer/skill.py) + +Line 297. + +*** + +### register\_tools + +Register the transfer tool with pattern matching + +#### Signature + +```python +register_tools() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/skills/swml_transfer/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/swml_transfer/skill.py) + +Line 180. + +*** + +### setup + +Setup and validate skill configuration + +#### Signature + +```python +setup() -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/skills/swml_transfer/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/swml_transfer/skill.py) + +Line 129. ## Source [`signalwire/signalwire/skills/swml_transfer/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/swml_transfer/skill.py) + +Line 18. diff --git a/fern/products/sdk-reference/python/agents/skills/swml-transfer/skill/swml-transfer-skill/index.mdx b/fern/products/sdk-reference/python/agents/skills/swml-transfer/skill/swml-transfer-skill/index.mdx deleted file mode 100644 index 0486570348..0000000000 --- a/fern/products/sdk-reference/python/agents/skills/swml-transfer/skill/swml-transfer-skill/index.mdx +++ /dev/null @@ -1,184 +0,0 @@ ---- -slug: "/reference/python/agents/skills/swml-transfer/skill/swml-transfer-skill" -title: "SWMLTransferSkill" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.skills.swml_transfer.skill.SWMLTransferSkill" - parent: "signalwire.skills.swml_transfer.skill" - module: "agents.skills.swml_transfer.skill" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/swml_transfer/skill.py" ---- -# `SWMLTransferSkill` - -Skill for transferring calls between agents using SWML with pattern matching - -## Signature - -```python -class SWMLTransferSkill(SkillBase) -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/python/agents/skill-base/index__2) - -## Properties - - - - - - - - - - - - - -## Methods - -### get\_hints - -Return speech recognition hints - -#### Signature - -```python -get_hints() -> List[str] -``` - -#### Returns - -`List[str]` - -#### Source - -[`signalwire/signalwire/skills/swml_transfer/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/swml_transfer/skill.py) - -Line 266. - -*** - -### get\_instance\_key - -Get the key used to track this skill instance - -For SWML transfer, we use the tool name to differentiate instances - -#### Signature - -```python -get_instance_key() -> str -``` - -#### Returns - -`str` - -#### Source - -[`signalwire/signalwire/skills/swml_transfer/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/swml_transfer/skill.py) - -Line 120. - -*** - -### get\_parameter\_schema - -Get parameter schema for SWML Transfer skill - -**Modifiers:** `classmethod` - -#### Signature - -```python -@classmethod -get_parameter_schema() -> Dict[str, Dict[str, Any]] -``` - -#### Returns - -`Dict[str, Dict[str, Any]]` - -#### Source - -[`signalwire/signalwire/skills/swml_transfer/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/swml_transfer/skill.py) - -Line 30. - -*** - -### get\_prompt\_sections - -Return prompt sections to add to agent - -#### Signature - -```python -get_prompt_sections() -> List[Dict[str, Any]] -``` - -#### Returns - -`List[Dict[str, Any]]` - -#### Source - -[`signalwire/signalwire/skills/swml_transfer/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/swml_transfer/skill.py) - -Line 297. - -*** - -### register\_tools - -Register the transfer tool with pattern matching - -#### Signature - -```python -register_tools() -> None -``` - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/skills/swml_transfer/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/swml_transfer/skill.py) - -Line 180. - -*** - -### setup - -Setup and validate skill configuration - -#### Signature - -```python -setup() -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`signalwire/signalwire/skills/swml_transfer/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/swml_transfer/skill.py) - -Line 129. - -## Source - -[`signalwire/signalwire/skills/swml_transfer/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/swml_transfer/skill.py) - -Line 18. diff --git a/fern/products/sdk-reference/python/agents/skills/weather-api/index.mdx b/fern/products/sdk-reference/python/agents/skills/weather-api/index.mdx index 596a6a03b0..c67344d176 100644 --- a/fern/products/sdk-reference/python/agents/skills/weather-api/index.mdx +++ b/fern/products/sdk-reference/python/agents/skills/weather-api/index.mdx @@ -31,11 +31,11 @@ module weather_api -## Modules +## Classes - Copyright (c) 2025 SignalWire + Skill for getting weather information from WeatherAPI.com. diff --git a/fern/products/sdk-reference/python/agents/skills/weather-api/skill/index.mdx b/fern/products/sdk-reference/python/agents/skills/weather-api/skill/index.mdx index e3a9ed619d..985bd34faa 100644 --- a/fern/products/sdk-reference/python/agents/skills/weather-api/skill/index.mdx +++ b/fern/products/sdk-reference/python/agents/skills/weather-api/skill/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.skills.weather_api.skill" parent: "signalwire.skills.weather_api" @@ -14,27 +14,171 @@ lustri: --- # `skill` -Copyright (c) 2025 SignalWire +Skill for getting weather information from WeatherAPI.com. -This file is part of the SignalWire SDK. +Provides current weather data with configurable temperature units and +TTS-optimized natural language responses. -Licensed under the MIT License. -See LICENSE file in the project root for full license information. +Configuration: + +- tool\_name: Custom name for the generated SWAIG function +- api\_key: WeatherAPI.com API key +- temperature\_unit: "fahrenheit" or "celsius" for temperature display + +> \[!NOTE] +> agent.add\_skill("weather\_api", \{ +> "tool\_name": "get\_weather", +> "api\_key": "your\_weatherapi\_key", +> "temperature\_unit": "fahrenheit" +> \}) ## Signature ```python -module skill +class WeatherApiSkill(SkillBase) +``` + +## Inheritance + +**Extends:** `SkillBase` + +## Properties + + + + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +Initialize the skill with configuration parameters. + +#### Signature + +```python +__init__(agent, params: Dict[str, Any] = None) +``` + +#### Parameters + + + The agent instance this skill belongs to + + + + Configuration dictionary containing: + + +#### Source + +[`signalwire/signalwire/skills/weather_api/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/weather_api/skill.py) + +Line 75. + +*** + +### get\_parameter\_schema + +Get parameter schema for weather API skill + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +get_parameter_schema() -> Dict[str, Dict[str, Any]] +``` + +#### Returns + +`Dict[str, Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/weather_api/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/weather_api/skill.py) + +Line 47. + +*** + +### get\_tools + +Generate the SWAIG tool with DataMap webhook. + +#### Signature + +```python +get_tools() -> List[Dict[str, Any]] ``` -## Classes +#### Returns + +`List[Dict[str, Any]]` — List containing the generated tool configuration + +#### Source + +[`signalwire/signalwire/skills/weather_api/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/weather_api/skill.py) + +Line 125. + +*** + +### register\_tools + +Register SWAIG tools with the agent + +#### Signature + +```python +register_tools() -> None +``` - - - Skill for getting weather information from WeatherAPI.com. - - +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/skills/weather_api/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/weather_api/skill.py) + +Line 116. + +*** + +### setup + +Setup the skill - validates API key is available. + +#### Signature + +```python +setup() -> bool +``` + +#### Returns + +`bool` — True if setup successful + +#### Source + +[`signalwire/signalwire/skills/weather_api/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/weather_api/skill.py) + +Line 106. ## Source [`signalwire/signalwire/skills/weather_api/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/weather_api/skill.py) + +Line 22. diff --git a/fern/products/sdk-reference/python/agents/skills/weather-api/skill/weather-api-skill/index.mdx b/fern/products/sdk-reference/python/agents/skills/weather-api/skill/weather-api-skill/index.mdx deleted file mode 100644 index 803f0f1b80..0000000000 --- a/fern/products/sdk-reference/python/agents/skills/weather-api/skill/weather-api-skill/index.mdx +++ /dev/null @@ -1,184 +0,0 @@ ---- -slug: "/reference/python/agents/skills/weather-api/skill/weather-api-skill" -title: "WeatherApiSkill" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.skills.weather_api.skill.WeatherApiSkill" - parent: "signalwire.skills.weather_api.skill" - module: "agents.skills.weather_api.skill" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/weather_api/skill.py" ---- -# `WeatherApiSkill` - -Skill for getting weather information from WeatherAPI.com. - -Provides current weather data with configurable temperature units and -TTS-optimized natural language responses. - -Configuration: - -- tool\_name: Custom name for the generated SWAIG function -- api\_key: WeatherAPI.com API key -- temperature\_unit: "fahrenheit" or "celsius" for temperature display - -> \[!NOTE] -> agent.add\_skill("weather\_api", \{ -> "tool\_name": "get\_weather", -> "api\_key": "your\_weatherapi\_key", -> "temperature\_unit": "fahrenheit" -> \}) - -## Signature - -```python -class WeatherApiSkill(SkillBase) -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/python/agents/skill-base/index__2) - -## Properties - - - - - - - - - - - - - - - -## Methods - -### \_\_init\_\_ - -Initialize the skill with configuration parameters. - -#### Signature - -```python -__init__(agent, params: Dict[str, Any] = None) -``` - -#### Parameters - - - The agent instance this skill belongs to - - - - Configuration dictionary containing: - - -#### Source - -[`signalwire/signalwire/skills/weather_api/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/weather_api/skill.py) - -Line 75. - -*** - -### get\_parameter\_schema - -Get parameter schema for weather API skill - -**Modifiers:** `classmethod` - -#### Signature - -```python -@classmethod -get_parameter_schema() -> Dict[str, Dict[str, Any]] -``` - -#### Returns - -`Dict[str, Dict[str, Any]]` - -#### Source - -[`signalwire/signalwire/skills/weather_api/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/weather_api/skill.py) - -Line 47. - -*** - -### get\_tools - -Generate the SWAIG tool with DataMap webhook. - -#### Signature - -```python -get_tools() -> List[Dict[str, Any]] -``` - -#### Returns - -`List[Dict[str, Any]]` — List containing the generated tool configuration - -#### Source - -[`signalwire/signalwire/skills/weather_api/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/weather_api/skill.py) - -Line 125. - -*** - -### register\_tools - -Register SWAIG tools with the agent - -#### Signature - -```python -register_tools() -> None -``` - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/skills/weather_api/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/weather_api/skill.py) - -Line 116. - -*** - -### setup - -Setup the skill - validates API key is available. - -#### Signature - -```python -setup() -> bool -``` - -#### Returns - -`bool` — True if setup successful - -#### Source - -[`signalwire/signalwire/skills/weather_api/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/weather_api/skill.py) - -Line 106. - -## Source - -[`signalwire/signalwire/skills/weather_api/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/weather_api/skill.py) - -Line 22. diff --git a/fern/products/sdk-reference/python/agents/skills/web-search/skill-improved/web-search-skill/index.mdx b/fern/products/sdk-reference/python/agents/skills/web-search/skill-improved/web-search-skill/index.mdx index 4ea0acad7c..05b6cd27fd 100644 --- a/fern/products/sdk-reference/python/agents/skills/web-search/skill-improved/web-search-skill/index.mdx +++ b/fern/products/sdk-reference/python/agents/skills/web-search/skill-improved/web-search-skill/index.mdx @@ -24,7 +24,7 @@ class WebSearchSkill(SkillBase) ## Inheritance -**Extends:** [SkillBase](/docs/sdk-reference/reference/python/agents/skill-base/index__2) +**Extends:** `SkillBase` ## Properties diff --git a/fern/products/sdk-reference/python/agents/skills/web-search/skill-original/web-search-skill/index.mdx b/fern/products/sdk-reference/python/agents/skills/web-search/skill-original/web-search-skill/index.mdx index d483571222..7fe6d2cd6a 100644 --- a/fern/products/sdk-reference/python/agents/skills/web-search/skill-original/web-search-skill/index.mdx +++ b/fern/products/sdk-reference/python/agents/skills/web-search/skill-original/web-search-skill/index.mdx @@ -24,7 +24,7 @@ class WebSearchSkill(SkillBase) ## Inheritance -**Extends:** [SkillBase](/docs/sdk-reference/reference/python/agents/skill-base/index__2) +**Extends:** `SkillBase` ## Properties diff --git a/fern/products/sdk-reference/python/agents/skills/web-search/skill/web-search-skill/index.mdx b/fern/products/sdk-reference/python/agents/skills/web-search/skill/web-search-skill/index.mdx index 2ad7c2b5c3..82f6c7564d 100644 --- a/fern/products/sdk-reference/python/agents/skills/web-search/skill/web-search-skill/index.mdx +++ b/fern/products/sdk-reference/python/agents/skills/web-search/skill/web-search-skill/index.mdx @@ -24,7 +24,7 @@ class WebSearchSkill(SkillBase) ## Inheritance -**Extends:** [SkillBase](/docs/sdk-reference/reference/python/agents/skill-base/index__2) +**Extends:** `SkillBase` ## Properties diff --git a/fern/products/sdk-reference/python/agents/skills/wikipedia-search/index.mdx b/fern/products/sdk-reference/python/agents/skills/wikipedia-search/index.mdx index 7c1b2058d0..b59fbe5802 100644 --- a/fern/products/sdk-reference/python/agents/skills/wikipedia-search/index.mdx +++ b/fern/products/sdk-reference/python/agents/skills/wikipedia-search/index.mdx @@ -31,11 +31,11 @@ module wikipedia_search -## Modules +## Classes - Copyright (c) 2025 SignalWire + Skill for searching Wikipedia articles and retrieving content. diff --git a/fern/products/sdk-reference/python/agents/skills/wikipedia-search/skill/index.mdx b/fern/products/sdk-reference/python/agents/skills/wikipedia-search/skill/index.mdx index 176220c106..38d7394ce1 100644 --- a/fern/products/sdk-reference/python/agents/skills/wikipedia-search/skill/index.mdx +++ b/fern/products/sdk-reference/python/agents/skills/wikipedia-search/skill/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.skills.wikipedia_search.skill" parent: "signalwire.skills.wikipedia_search" @@ -14,27 +14,178 @@ lustri: --- # `skill` -Copyright (c) 2025 SignalWire +Skill for searching Wikipedia articles and retrieving content. -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. +This skill uses the Wikipedia API to search for articles and retrieve +their introductory content, similar to getting a summary of a topic. ## Signature ```python -module skill +class WikipediaSearchSkill(SkillBase) +``` + +## Inheritance + +**Extends:** `SkillBase` + +## Properties + + + + + + + + + + + + + +## Methods + +### get\_hints + +Return speech recognition hints for better accuracy. + +#### Signature + +```python +get_hints() -> list +``` + +#### Returns + +`list` — List of words/phrases to help with speech recognition + +#### Source + +[`signalwire/signalwire/skills/wikipedia_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/wikipedia_search/skill.py) + +Line 198. + +*** + +### get\_parameter\_schema + +Get parameter schema for Wikipedia search skill + +**Modifiers:** `classmethod` + +#### Signature + +```python +@classmethod +get_parameter_schema() -> Dict[str, Dict[str, Any]] +``` + +#### Returns + +`Dict[str, Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/skills/wikipedia_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/wikipedia_search/skill.py) + +Line 40. + +*** + +### get\_prompt\_sections + +Return additional context for the agent prompt. + +#### Signature + +```python +get_prompt_sections() -> list +``` + +#### Returns + +`list` — List of prompt sections to add to the agent + +#### Source + +[`signalwire/signalwire/skills/wikipedia_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/wikipedia_search/skill.py) + +Line 181. + +*** + +### register\_tools + +Register the SWAIG tool for Wikipedia search. + +#### Signature + +```python +register_tools() -> None ``` -## Classes +#### Returns - - - Skill for searching Wikipedia articles and retrieving content. - - +`None` + +#### Source + +[`signalwire/signalwire/skills/wikipedia_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/wikipedia_search/skill.py) + +Line 83. + +*** + +### search\_wiki + +Search Wikipedia for articles matching the query. + +#### Signature + +```python +search_wiki(query: str) -> str +``` + +#### Parameters + + + The search term to look up + + +#### Returns + +`str` — String containing the Wikipedia article content or error message + +#### Source + +[`signalwire/signalwire/skills/wikipedia_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/wikipedia_search/skill.py) + +Line 110. + +*** + +### setup + +Setup the Wikipedia search skill. + +#### Signature + +```python +setup() -> bool +``` + +#### Returns + +`bool` — True if setup successful, False otherwise + +#### Source + +[`signalwire/signalwire/skills/wikipedia_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/wikipedia_search/skill.py) + +Line 62. ## Source [`signalwire/signalwire/skills/wikipedia_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/wikipedia_search/skill.py) + +Line 22. diff --git a/fern/products/sdk-reference/python/agents/skills/wikipedia-search/skill/wikipedia-search-skill/index.mdx b/fern/products/sdk-reference/python/agents/skills/wikipedia-search/skill/wikipedia-search-skill/index.mdx deleted file mode 100644 index 9e41c7f2be..0000000000 --- a/fern/products/sdk-reference/python/agents/skills/wikipedia-search/skill/wikipedia-search-skill/index.mdx +++ /dev/null @@ -1,191 +0,0 @@ ---- -slug: "/reference/python/agents/skills/wikipedia-search/skill/wikipedia-search-skill" -title: "WikipediaSearchSkill" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.skills.wikipedia_search.skill.WikipediaSearchSkill" - parent: "signalwire.skills.wikipedia_search.skill" - module: "agents.skills.wikipedia_search.skill" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/wikipedia_search/skill.py" ---- -# `WikipediaSearchSkill` - -Skill for searching Wikipedia articles and retrieving content. - -This skill uses the Wikipedia API to search for articles and retrieve -their introductory content, similar to getting a summary of a topic. - -## Signature - -```python -class WikipediaSearchSkill(SkillBase) -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/python/agents/skill-base/index__2) - -## Properties - - - - - - - - - - - - - -## Methods - -### get\_hints - -Return speech recognition hints for better accuracy. - -#### Signature - -```python -get_hints() -> list -``` - -#### Returns - -`list` — List of words/phrases to help with speech recognition - -#### Source - -[`signalwire/signalwire/skills/wikipedia_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/wikipedia_search/skill.py) - -Line 198. - -*** - -### get\_parameter\_schema - -Get parameter schema for Wikipedia search skill - -**Modifiers:** `classmethod` - -#### Signature - -```python -@classmethod -get_parameter_schema() -> Dict[str, Dict[str, Any]] -``` - -#### Returns - -`Dict[str, Dict[str, Any]]` - -#### Source - -[`signalwire/signalwire/skills/wikipedia_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/wikipedia_search/skill.py) - -Line 40. - -*** - -### get\_prompt\_sections - -Return additional context for the agent prompt. - -#### Signature - -```python -get_prompt_sections() -> list -``` - -#### Returns - -`list` — List of prompt sections to add to the agent - -#### Source - -[`signalwire/signalwire/skills/wikipedia_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/wikipedia_search/skill.py) - -Line 181. - -*** - -### register\_tools - -Register the SWAIG tool for Wikipedia search. - -#### Signature - -```python -register_tools() -> None -``` - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/skills/wikipedia_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/wikipedia_search/skill.py) - -Line 83. - -*** - -### search\_wiki - -Search Wikipedia for articles matching the query. - -#### Signature - -```python -search_wiki(query: str) -> str -``` - -#### Parameters - - - The search term to look up - - -#### Returns - -`str` — String containing the Wikipedia article content or error message - -#### Source - -[`signalwire/signalwire/skills/wikipedia_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/wikipedia_search/skill.py) - -Line 110. - -*** - -### setup - -Setup the Wikipedia search skill. - -#### Signature - -```python -setup() -> bool -``` - -#### Returns - -`bool` — True if setup successful, False otherwise - -#### Source - -[`signalwire/signalwire/skills/wikipedia_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/wikipedia_search/skill.py) - -Line 62. - -## Source - -[`signalwire/signalwire/skills/wikipedia_search/skill.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/skills/wikipedia_search/skill.py) - -Line 22. diff --git a/fern/products/sdk-reference/python/agents/swaig-function/index.mdx b/fern/products/sdk-reference/python/agents/swaig-function/index.mdx index 9be0e39f8e..081244206d 100644 --- a/fern/products/sdk-reference/python/agents/swaig-function/index.mdx +++ b/fern/products/sdk-reference/python/agents/swaig-function/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.core.swaig_function" parent: "agents" @@ -14,19 +14,289 @@ lustri: --- # `swaig_function` -Copyright (c) 2025 SignalWire +Represents a SWAIG function — i.e., a tool the AI model can call. -This file is part of the SignalWire SDK. +A SWAIG function is exactly the same concept as a "tool" in native +OpenAI / Anthropic tool calling. Each SWAIGFunction is rendered into +the OpenAI tool schema format and sent to the model on every turn: -Licensed under the MIT License. -See LICENSE file in the project root for full license information. +``` +{"type": "function", "function": { + "name": self.name, + "description": self.description, + "parameters": self.parameters, +}} +``` + +The model parses `description` (and the `description` inside each +parameter) to decide WHEN to call the tool and HOW to fill in the +arguments. Both fields are prompt-engineered text — the quality of +your descriptions directly drives tool-selection accuracy. + +Use AgentBase.define\_tool() to create one (it builds the +SWAIGFunction for you and registers it). Use the @agent.tool() +decorator for the same thing in class-based agents. ## Signature ```python -module swaig_function +class SWAIGFunction +``` + +## Examples + +```python +{"type": "function", "function": { + "name": self.name, + "description": self.description, + "parameters": self.parameters, +}} +``` + +## Properties + + + + + + + + + + + + + + + + + + + + + + + + + + + +## Methods + +### \_\_call\_\_ + +Call the underlying handler function + +#### Signature + +```python +__call__(*args = (), **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/core/swaig_function.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swaig_function.py) + +Line 133. + +*** + +### \_\_init\_\_ + +Initialize a new SWAIG function. + +#### Signature + +```python +__init__( + name: str, + handler: Callable, + description: str, + parameters: Dict[str, Dict] = None, + secure: bool = False, + fillers: Optional[Dict[str, List[str]]] = None, + wait_file: Optional[str] = None, + wait_file_loops: Optional[int] = None, + webhook_url: Optional[str] = None, + required: Optional[List[str]] = None, + is_typed_handler: bool = False, + **extra_swaig_fields = {} +) ``` +#### Parameters + + + Function name. Becomes the `name` field in the OpenAI tool schema sent to the model — what the model emits when it decides to call this tool. + + + + Python callable invoked when the model calls this tool. + + + + LLM-facing description. The model reads this on every turn to decide whether to call the tool. Be specific about WHEN to use it and what makes it the right choice over sibling tools — vague descriptions are the most common cause of "model has the right tool but doesn't call it" failures. + + + + JSON Schema for the arguments. Per-property `description` strings inside the schema are also LLM-facing — write them as instructions to the model on how to fill in each argument. + + + + Whether this function requires SWAIG token validation. + + + + Optional dictionary of filler phrases by language code (deprecated, use wait\_file). + + + + Optional URL to audio file to play while function executes. + + + + Optional number of times to loop the wait\_file. + + + + Optional external webhook URL to use instead of local handling. + + + + Optional list of required parameter names. + + + + Whether the handler uses type-hinted parameters (auto-wrapped). + + + + +#### Source + +[`signalwire/signalwire/core/swaig_function.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swaig_function.py) + +Line 44. + +*** + +### execute + +Execute the function with the given arguments + +#### Signature + +```python +execute( + args: Dict[str, Any], + raw_data: Optional[Dict[str, Any]] = None +) -> Dict[str, Any] +``` + +#### Parameters + + + Parsed arguments for the function + + + + Optional raw request data + + +#### Returns + +`Dict[str, Any]` — Function result as a dictionary (from FunctionResult.to\_dict()) + +#### Source + +[`signalwire/signalwire/core/swaig_function.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swaig_function.py) + +Line 139. + +*** + +### to\_swaig + +Convert this function to a SWAIG-compatible JSON object for SWML + +#### Signature + +```python +to_swaig( + base_url: str, + token: Optional[str] = None, + call_id: Optional[str] = None, + include_auth: bool = True +) -> Dict[str, Any] +``` + +#### Parameters + + + Base URL for the webhook + + + + Optional auth token to include + + + + Optional call ID for session tracking + + + + Whether to include auth credentials in URL + + +#### Returns + +`Dict[str, Any]` — Dictionary representation for the SWAIG array in SWML + +#### Source + +[`signalwire/signalwire/core/swaig_function.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swaig_function.py) + +Line 234. + +*** + +### validate\_args + +Validate the arguments against the parameter schema. + +Uses jsonschema\_rs if available for fast validation, falls back to +jsonschema if available, otherwise skips validation. + +#### Signature + +```python +validate_args(args: Dict[str, Any]) -> tuple +``` + +#### Parameters + + + Arguments to validate + + +#### Returns + +`tuple` — Tuple of (is\_valid: bool, errors: list\[str]) If no validation library is available, returns (True, \[]) + +#### Source + +[`signalwire/signalwire/core/swaig_function.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swaig_function.py) + +Line 180. + ## Source [`signalwire/signalwire/core/swaig_function.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swaig_function.py) + +Line 21. diff --git a/fern/products/sdk-reference/python/agents/swaig-function/index__2.mdx b/fern/products/sdk-reference/python/agents/swaig-function/index__2.mdx deleted file mode 100644 index 9b26cf9ded..0000000000 --- a/fern/products/sdk-reference/python/agents/swaig-function/index__2.mdx +++ /dev/null @@ -1,302 +0,0 @@ ---- -slug: "/reference/python/agents/swaig-function/index__2" -title: "SWAIGFunction" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.core.swaig_function.SWAIGFunction" - parent: "agents" - module: "agents" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swaig_function.py" ---- -# `SWAIGFunction` - -Represents a SWAIG function — i.e., a tool the AI model can call. - -A SWAIG function is exactly the same concept as a "tool" in native -OpenAI / Anthropic tool calling. Each SWAIGFunction is rendered into -the OpenAI tool schema format and sent to the model on every turn: - -``` -{"type": "function", "function": { - "name": self.name, - "description": self.description, - "parameters": self.parameters, -}} -``` - -The model parses `description` (and the `description` inside each -parameter) to decide WHEN to call the tool and HOW to fill in the -arguments. Both fields are prompt-engineered text — the quality of -your descriptions directly drives tool-selection accuracy. - -Use AgentBase.define\_tool() to create one (it builds the -SWAIGFunction for you and registers it). Use the @agent.tool() -decorator for the same thing in class-based agents. - -## Signature - -```python -class SWAIGFunction -``` - -## Examples - -```python -{"type": "function", "function": { - "name": self.name, - "description": self.description, - "parameters": self.parameters, -}} -``` - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - -## Methods - -### \_\_call\_\_ - -Call the underlying handler function - -#### Signature - -```python -__call__(*args = (), **kwargs = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/core/swaig_function.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swaig_function.py) - -Line 133. - -*** - -### \_\_init\_\_ - -Initialize a new SWAIG function. - -#### Signature - -```python -__init__( - name: str, - handler: Callable, - description: str, - parameters: Dict[str, Dict] = None, - secure: bool = False, - fillers: Optional[Dict[str, List[str]]] = None, - wait_file: Optional[str] = None, - wait_file_loops: Optional[int] = None, - webhook_url: Optional[str] = None, - required: Optional[List[str]] = None, - is_typed_handler: bool = False, - **extra_swaig_fields = {} -) -``` - -#### Parameters - - - Function name. Becomes the `name` field in the OpenAI tool schema sent to the model — what the model emits when it decides to call this tool. - - - - Python callable invoked when the model calls this tool. - - - - LLM-facing description. The model reads this on every turn to decide whether to call the tool. Be specific about WHEN to use it and what makes it the right choice over sibling tools — vague descriptions are the most common cause of "model has the right tool but doesn't call it" failures. - - - - JSON Schema for the arguments. Per-property `description` strings inside the schema are also LLM-facing — write them as instructions to the model on how to fill in each argument. - - - - Whether this function requires SWAIG token validation. - - - - Optional dictionary of filler phrases by language code (deprecated, use wait\_file). - - - - Optional URL to audio file to play while function executes. - - - - Optional number of times to loop the wait\_file. - - - - Optional external webhook URL to use instead of local handling. - - - - Optional list of required parameter names. - - - - Whether the handler uses type-hinted parameters (auto-wrapped). - - - - -#### Source - -[`signalwire/signalwire/core/swaig_function.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swaig_function.py) - -Line 44. - -*** - -### execute - -Execute the function with the given arguments - -#### Signature - -```python -execute( - args: Dict[str, Any], - raw_data: Optional[Dict[str, Any]] = None -) -> Dict[str, Any] -``` - -#### Parameters - - - Parsed arguments for the function - - - - Optional raw request data - - -#### Returns - -`Dict[str, Any]` — Function result as a dictionary (from FunctionResult.to\_dict()) - -#### Source - -[`signalwire/signalwire/core/swaig_function.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swaig_function.py) - -Line 139. - -*** - -### to\_swaig - -Convert this function to a SWAIG-compatible JSON object for SWML - -#### Signature - -```python -to_swaig( - base_url: str, - token: Optional[str] = None, - call_id: Optional[str] = None, - include_auth: bool = True -) -> Dict[str, Any] -``` - -#### Parameters - - - Base URL for the webhook - - - - Optional auth token to include - - - - Optional call ID for session tracking - - - - Whether to include auth credentials in URL - - -#### Returns - -`Dict[str, Any]` — Dictionary representation for the SWAIG array in SWML - -#### Source - -[`signalwire/signalwire/core/swaig_function.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swaig_function.py) - -Line 234. - -*** - -### validate\_args - -Validate the arguments against the parameter schema. - -Uses jsonschema\_rs if available for fast validation, falls back to -jsonschema if available, otherwise skips validation. - -#### Signature - -```python -validate_args(args: Dict[str, Any]) -> tuple -``` - -#### Parameters - - - Arguments to validate - - -#### Returns - -`tuple` — Tuple of (is\_valid: bool, errors: list\[str]) If no validation library is available, returns (True, \[]) - -#### Source - -[`signalwire/signalwire/core/swaig_function.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swaig_function.py) - -Line 180. - -## Source - -[`signalwire/signalwire/core/swaig_function.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swaig_function.py) - -Line 21. diff --git a/fern/products/sdk-reference/python/agents/swml-builder/index.mdx b/fern/products/sdk-reference/python/agents/swml-builder/index.mdx index d8a56540fa..a95e9a07cc 100644 --- a/fern/products/sdk-reference/python/agents/swml-builder/index.mdx +++ b/fern/products/sdk-reference/python/agents/swml-builder/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.core.swml_builder" parent: "agents" @@ -14,23 +14,405 @@ lustri: --- # `swml_builder` -Copyright (c) 2025 SignalWire +Fluent builder for SWML documents -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. +This class provides a fluent interface for building SWML documents +by chaining method calls. It delegates to an underlying SWMLService +instance for the actual document creation. ## Signature ```python -module swml_builder +class SWMLBuilder ``` +## Properties + + + ## Constants +## Methods + +### \_\_getattr\_\_ + +Dynamically generate and return SWML verb methods when accessed + +This method is called when an attribute lookup fails through the normal +mechanisms. It checks if the attribute name corresponds to a SWML verb +defined in the schema, and if so, dynamically creates a method for that verb. + +#### Signature + +```python +__getattr__(name: str) -> Any +``` + +#### Parameters + + + The name of the attribute being accessed + + +#### Returns + +`Any` — The dynamically created verb method if name is a valid SWML verb, otherwise raises AttributeError + +#### Throws + +- `AttributeError` — If name is not a valid SWML verb + +#### Source + +[`signalwire/signalwire/core/swml_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_builder.py) + +Line 326. + +*** + +### \_\_init\_\_ + +Initialize with a SWMLService instance + +#### Signature + +```python +__init__(service: SWMLService) +``` + +#### Parameters + + + The SWMLService to delegate to + + +#### Source + +[`signalwire/signalwire/core/swml_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_builder.py) + +Line 39. + +*** + +### add\_section + +Add a new section to the document + +#### Signature + +```python +add_section(section_name: str) -> Self +``` + +#### Parameters + + + Name of the section to add + + +#### Returns + +`Self` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/swml_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_builder.py) + +Line 206. + +*** + +### ai + +Add an 'ai' verb to the main section + +#### Signature + +```python +ai( + prompt_text: Optional[str] = None, + prompt_pom: Optional[List[Dict[str, Any]]] = None, + post_prompt: Optional[str] = None, + post_prompt_url: Optional[str] = None, + swaig: Optional[Dict[str, Any]] = None, + **kwargs = {} +) -> Self +``` + +#### Parameters + + + Text prompt for the AI (mutually exclusive with prompt\_pom) + + + + POM structure for the AI prompt (mutually exclusive with prompt\_text) + + + + Optional post-prompt text + + + + Optional URL for post-prompt processing + + + + Optional SWAIG configuration + + + + +#### Returns + +`Self` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/swml_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_builder.py) + +Line 89. + +*** + +### answer + +Add an 'answer' verb to the main section + +#### Signature + +```python +answer(max_duration: Optional[int] = None, codecs: Optional[str] = None) -> Self +``` + +#### Parameters + + + Maximum duration in seconds + + + + Comma-separated list of codecs + + +#### Returns + +`Self` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/swml_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_builder.py) + +Line 54. + +*** + +### build + +Build and return the SWML document + +#### Signature + +```python +build() -> Dict[str, Any] +``` + +#### Returns + +`Dict[str, Any]` — The complete SWML document as a dictionary + +#### Source + +[`signalwire/signalwire/core/swml_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_builder.py) + +Line 219. + +*** + +### hangup + +Add a 'hangup' verb to the main section + +#### Signature + +```python +hangup(reason: Optional[str] = None) -> Self +``` + +#### Parameters + + + Optional reason for hangup + + +#### Returns + +`Self` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/swml_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_builder.py) + +Line 73. + +*** + +### play + +Add a 'play' verb to the main section + +#### Signature + +```python +play( + url: Optional[str] = None, + urls: Optional[List[str]] = None, + volume: Optional[float] = None, + say_voice: Optional[str] = None, + say_language: Optional[str] = None, + say_gender: Optional[str] = None, + auto_answer: Optional[bool] = None +) -> Self +``` + +#### Parameters + + + Single URL to play (mutually exclusive with urls) + + + + List of URLs to play (mutually exclusive with url) + + + + Volume level (-40 to 40) + + + + Voice for text-to-speech + + + + Language for text-to-speech + + + + Gender for text-to-speech + + + + Whether to auto-answer the call + + +#### Returns + +`Self` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/swml_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_builder.py) + +Line 132. + +*** + +### render + +Build and render the SWML document as a JSON string + +#### Signature + +```python +render() -> str +``` + +#### Returns + +`str` — The complete SWML document as a JSON string + +#### Source + +[`signalwire/signalwire/core/swml_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_builder.py) + +Line 228. + +*** + +### reset + +Reset the document to an empty state + +#### Signature + +```python +reset() -> Self +``` + +#### Returns + +`Self` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/swml_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_builder.py) + +Line 237. + +*** + +### say + +Add a 'play' verb with say: prefix for text-to-speech + +#### Signature + +```python +say( + text: str, + voice: Optional[str] = None, + language: Optional[str] = None, + gender: Optional[str] = None, + volume: Optional[float] = None +) -> Self +``` + +#### Parameters + + + Text to speak + + + + Voice for text-to-speech + + + + Language for text-to-speech + + + + Gender for text-to-speech + + + + Volume level (-40 to 40) + + +#### Returns + +`Self` — Self for method chaining + +#### Source + +[`signalwire/signalwire/core/swml_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_builder.py) + +Line 178. + ## Source [`signalwire/signalwire/core/swml_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_builder.py) + +Line 30. diff --git a/fern/products/sdk-reference/python/agents/swml-builder/index__2.mdx b/fern/products/sdk-reference/python/agents/swml-builder/index__2.mdx deleted file mode 100644 index a9ac2e688a..0000000000 --- a/fern/products/sdk-reference/python/agents/swml-builder/index__2.mdx +++ /dev/null @@ -1,414 +0,0 @@ ---- -slug: "/reference/python/agents/swml-builder/index__2" -title: "SWMLBuilder" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.core.swml_builder.SWMLBuilder" - parent: "agents" - module: "agents" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_builder.py" ---- -# `SWMLBuilder` - -Fluent builder for SWML documents - -This class provides a fluent interface for building SWML documents -by chaining method calls. It delegates to an underlying SWMLService -instance for the actual document creation. - -## Signature - -```python -class SWMLBuilder -``` - -## Properties - - - -## Methods - -### \_\_getattr\_\_ - -Dynamically generate and return SWML verb methods when accessed - -This method is called when an attribute lookup fails through the normal -mechanisms. It checks if the attribute name corresponds to a SWML verb -defined in the schema, and if so, dynamically creates a method for that verb. - -#### Signature - -```python -__getattr__(name: str) -> Any -``` - -#### Parameters - - - The name of the attribute being accessed - - -#### Returns - -`Any` — The dynamically created verb method if name is a valid SWML verb, otherwise raises AttributeError - -#### Throws - -- `AttributeError` — If name is not a valid SWML verb - -#### Source - -[`signalwire/signalwire/core/swml_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_builder.py) - -Line 326. - -*** - -### \_\_init\_\_ - -Initialize with a SWMLService instance - -#### Signature - -```python -__init__(service: SWMLService) -``` - -#### Parameters - - - The SWMLService to delegate to - - -#### Source - -[`signalwire/signalwire/core/swml_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_builder.py) - -Line 39. - -*** - -### add\_section - -Add a new section to the document - -#### Signature - -```python -add_section(section_name: str) -> Self -``` - -#### Parameters - - - Name of the section to add - - -#### Returns - -`Self` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/swml_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_builder.py) - -Line 206. - -*** - -### ai - -Add an 'ai' verb to the main section - -#### Signature - -```python -ai( - prompt_text: Optional[str] = None, - prompt_pom: Optional[List[Dict[str, Any]]] = None, - post_prompt: Optional[str] = None, - post_prompt_url: Optional[str] = None, - swaig: Optional[Dict[str, Any]] = None, - **kwargs = {} -) -> Self -``` - -#### Parameters - - - Text prompt for the AI (mutually exclusive with prompt\_pom) - - - - POM structure for the AI prompt (mutually exclusive with prompt\_text) - - - - Optional post-prompt text - - - - Optional URL for post-prompt processing - - - - Optional SWAIG configuration - - - - -#### Returns - -`Self` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/swml_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_builder.py) - -Line 89. - -*** - -### answer - -Add an 'answer' verb to the main section - -#### Signature - -```python -answer(max_duration: Optional[int] = None, codecs: Optional[str] = None) -> Self -``` - -#### Parameters - - - Maximum duration in seconds - - - - Comma-separated list of codecs - - -#### Returns - -`Self` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/swml_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_builder.py) - -Line 54. - -*** - -### build - -Build and return the SWML document - -#### Signature - -```python -build() -> Dict[str, Any] -``` - -#### Returns - -`Dict[str, Any]` — The complete SWML document as a dictionary - -#### Source - -[`signalwire/signalwire/core/swml_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_builder.py) - -Line 219. - -*** - -### hangup - -Add a 'hangup' verb to the main section - -#### Signature - -```python -hangup(reason: Optional[str] = None) -> Self -``` - -#### Parameters - - - Optional reason for hangup - - -#### Returns - -`Self` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/swml_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_builder.py) - -Line 73. - -*** - -### play - -Add a 'play' verb to the main section - -#### Signature - -```python -play( - url: Optional[str] = None, - urls: Optional[List[str]] = None, - volume: Optional[float] = None, - say_voice: Optional[str] = None, - say_language: Optional[str] = None, - say_gender: Optional[str] = None, - auto_answer: Optional[bool] = None -) -> Self -``` - -#### Parameters - - - Single URL to play (mutually exclusive with urls) - - - - List of URLs to play (mutually exclusive with url) - - - - Volume level (-40 to 40) - - - - Voice for text-to-speech - - - - Language for text-to-speech - - - - Gender for text-to-speech - - - - Whether to auto-answer the call - - -#### Returns - -`Self` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/swml_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_builder.py) - -Line 132. - -*** - -### render - -Build and render the SWML document as a JSON string - -#### Signature - -```python -render() -> str -``` - -#### Returns - -`str` — The complete SWML document as a JSON string - -#### Source - -[`signalwire/signalwire/core/swml_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_builder.py) - -Line 228. - -*** - -### reset - -Reset the document to an empty state - -#### Signature - -```python -reset() -> Self -``` - -#### Returns - -`Self` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/swml_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_builder.py) - -Line 237. - -*** - -### say - -Add a 'play' verb with say: prefix for text-to-speech - -#### Signature - -```python -say( - text: str, - voice: Optional[str] = None, - language: Optional[str] = None, - gender: Optional[str] = None, - volume: Optional[float] = None -) -> Self -``` - -#### Parameters - - - Text to speak - - - - Voice for text-to-speech - - - - Language for text-to-speech - - - - Gender for text-to-speech - - - - Volume level (-40 to 40) - - -#### Returns - -`Self` — Self for method chaining - -#### Source - -[`signalwire/signalwire/core/swml_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_builder.py) - -Line 178. - -## Source - -[`signalwire/signalwire/core/swml_builder.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_builder.py) - -Line 30. diff --git a/fern/products/sdk-reference/python/agents/swml-renderer/index.mdx b/fern/products/sdk-reference/python/agents/swml-renderer/index.mdx index 5bb8dacb7f..57e69b85a5 100644 --- a/fern/products/sdk-reference/python/agents/swml-renderer/index.mdx +++ b/fern/products/sdk-reference/python/agents/swml-renderer/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.core.swml_renderer" parent: "agents" @@ -14,19 +14,169 @@ lustri: --- # `swml_renderer` -Copyright (c) 2025 SignalWire +Renders SWML documents for SignalWire AI Agents with AI and SWAIG components -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. +This class provides methods for rendering SWML documents using the SWMLService architecture. ## Signature ```python -module swml_renderer +class SwmlRenderer ``` +## Methods + +### render\_function\_response\_swml + +Generate a SWML document for a function response + +**Modifiers:** `static` + +#### Signature + +```python +@staticmethod +render_function_response_swml( + response_text: str, + service: SWMLService, + actions: Optional[List[Dict[str, Any]]] = None, + format: str = 'json' +) -> str +``` + +#### Parameters + + + Text response to include in the document + + + + SWMLService instance to use + + + + Optional list of actions to perform + + + + Output format (json or yaml) + + +#### Returns + +`str` — SWML document as a string + +#### Source + +[`signalwire/signalwire/core/swml_renderer.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_renderer.py) + +Line 150. + +*** + +### render\_swml + +Generate a complete SWML document with AI configuration + +**Modifiers:** `static` + +#### Signature + +```python +@staticmethod +render_swml( + prompt: Union[str, List[Dict[str, Any]]], + service: SWMLService, + post_prompt: Optional[str] = None, + post_prompt_url: Optional[str] = None, + swaig_functions: Optional[List[Dict[str, Any]]] = None, + startup_hook_url: Optional[str] = None, + hangup_hook_url: Optional[str] = None, + prompt_is_pom: bool = False, + params: Optional[Dict[str, Any]] = None, + add_answer: bool = False, + record_call: bool = False, + record_format: str = 'mp4', + record_stereo: bool = True, + format: str = 'json', + default_webhook_url: Optional[str] = None +) -> str +``` + +#### Parameters + + + AI prompt text or POM structure + + + + SWMLService instance to use for document building + + + + Optional post-prompt text + + + + Optional post-prompt URL + + + + List of SWAIG function definitions + + + + Optional startup hook URL + + + + Optional hangup hook URL + + + + Whether prompt is POM format + + + + Additional AI verb parameters + + + + Whether to add answer verb + + + + Whether to add record\_call verb + + + + Recording format + + + + Whether to record in stereo + + + + Output format (json or yaml) + + + + Default webhook URL for SWAIG functions + + +#### Returns + +`str` — SWML document as a string + +#### Source + +[`signalwire/signalwire/core/swml_renderer.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_renderer.py) + +Line 28. + ## Source [`signalwire/signalwire/core/swml_renderer.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_renderer.py) + +Line 21. diff --git a/fern/products/sdk-reference/python/agents/swml-renderer/index__2.mdx b/fern/products/sdk-reference/python/agents/swml-renderer/index__2.mdx deleted file mode 100644 index e7ce46938c..0000000000 --- a/fern/products/sdk-reference/python/agents/swml-renderer/index__2.mdx +++ /dev/null @@ -1,182 +0,0 @@ ---- -slug: "/reference/python/agents/swml-renderer/index__2" -title: "SwmlRenderer" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.core.swml_renderer.SwmlRenderer" - parent: "agents" - module: "agents" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_renderer.py" ---- -# `SwmlRenderer` - -Renders SWML documents for SignalWire AI Agents with AI and SWAIG components - -This class provides methods for rendering SWML documents using the SWMLService architecture. - -## Signature - -```python -class SwmlRenderer -``` - -## Methods - -### render\_function\_response\_swml - -Generate a SWML document for a function response - -**Modifiers:** `static` - -#### Signature - -```python -@staticmethod -render_function_response_swml( - response_text: str, - service: SWMLService, - actions: Optional[List[Dict[str, Any]]] = None, - format: str = 'json' -) -> str -``` - -#### Parameters - - - Text response to include in the document - - - - SWMLService instance to use - - - - Optional list of actions to perform - - - - Output format (json or yaml) - - -#### Returns - -`str` — SWML document as a string - -#### Source - -[`signalwire/signalwire/core/swml_renderer.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_renderer.py) - -Line 150. - -*** - -### render\_swml - -Generate a complete SWML document with AI configuration - -**Modifiers:** `static` - -#### Signature - -```python -@staticmethod -render_swml( - prompt: Union[str, List[Dict[str, Any]]], - service: SWMLService, - post_prompt: Optional[str] = None, - post_prompt_url: Optional[str] = None, - swaig_functions: Optional[List[Dict[str, Any]]] = None, - startup_hook_url: Optional[str] = None, - hangup_hook_url: Optional[str] = None, - prompt_is_pom: bool = False, - params: Optional[Dict[str, Any]] = None, - add_answer: bool = False, - record_call: bool = False, - record_format: str = 'mp4', - record_stereo: bool = True, - format: str = 'json', - default_webhook_url: Optional[str] = None -) -> str -``` - -#### Parameters - - - AI prompt text or POM structure - - - - SWMLService instance to use for document building - - - - Optional post-prompt text - - - - Optional post-prompt URL - - - - List of SWAIG function definitions - - - - Optional startup hook URL - - - - Optional hangup hook URL - - - - Whether prompt is POM format - - - - Additional AI verb parameters - - - - Whether to add answer verb - - - - Whether to add record\_call verb - - - - Recording format - - - - Whether to record in stereo - - - - Output format (json or yaml) - - - - Default webhook URL for SWAIG functions - - -#### Returns - -`str` — SWML document as a string - -#### Source - -[`signalwire/signalwire/core/swml_renderer.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_renderer.py) - -Line 28. - -## Source - -[`signalwire/signalwire/core/swml_renderer.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_renderer.py) - -Line 21. diff --git a/fern/products/sdk-reference/python/agents/swml-service/index.mdx b/fern/products/sdk-reference/python/agents/swml-service/index.mdx index 4e9478c9e3..f60b2fe736 100644 --- a/fern/products/sdk-reference/python/agents/swml-service/index.mdx +++ b/fern/products/sdk-reference/python/agents/swml-service/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.core.swml_service" parent: "agents" @@ -14,27 +14,632 @@ lustri: --- # `swml_service` -Copyright (c) 2025 SignalWire +Base class for creating and serving SWML documents. -This file is part of the SignalWire SDK. +This class provides core functionality for: -Licensed under the MIT License. -See LICENSE file in the project root for full license information. +- Loading and validating SWML schema +- Creating SWML documents +- Setting up web endpoints for serving SWML +- Managing authentication +- Registering SWML functions + +It serves as the foundation for more specialized services like AgentBase. ## Signature ```python -module swml_service +class SWMLService(ToolMixin) ``` +## Inheritance + +**Extends:** `ToolMixin` + ## Properties + + + + Check if full JSON Schema validation is enabled. + + + + + + + + + + + + + + + + + + + + + + + + ## Constants +## Methods + +### \_\_getattr\_\_ + +Dynamically generate and return SWML verb methods when accessed + +This method is called when an attribute lookup fails through the normal +mechanisms. It checks if the attribute name corresponds to a SWML verb +defined in the schema, and if so, dynamically creates a method for that verb. + +#### Signature + +```python +__getattr__(name: str) -> Any +``` + +#### Parameters + + + The name of the attribute being accessed + + +#### Returns + +`Any` — The dynamically created verb method if name is a valid SWML verb, otherwise raises AttributeError + +#### Throws + +- `AttributeError` — If name is not a valid SWML verb + +#### Source + +[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) + +Line 256. + +*** + +### \_\_init\_\_ + +Initialize a new SWML service + +#### Signature + +```python +__init__( + name: str, + route: str = '/', + host: str = '0.0.0.0', + port: Optional[int] = None, + basic_auth: Optional[Tuple[str, str]] = None, + schema_path: Optional[str] = None, + config_file: Optional[str] = None, + schema_validation: bool = True +) +``` + +#### Parameters + + + Service name/identifier + + + + HTTP route path for this service + + + + Host to bind the web server to + + + + Port to bind the web server to + + + + Optional (username, password) tuple for basic auth + + + + Optional path to the schema file + + + + Optional path to configuration file + + + + Enable schema validation. Default True. Can also be disabled via SWML\_SKIP\_SCHEMA\_VALIDATION=1 env var. + + +#### Source + +[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) + +Line 70. + +*** + +### add\_section + +Add a new section to the document + +#### Signature + +```python +add_section(section_name: str) -> bool +``` + +#### Parameters + + + Name of the section to add + + +#### Returns + +`bool` — True if the section was added, False if it already exists + +#### Source + +[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) + +Line 473. + +*** + +### add\_verb + +Add a verb to the main section of the current document + +#### Signature + +```python +add_verb(verb_name: str, config: Union[Dict[str, Any], int]) -> bool +``` + +#### Parameters + + + The name of the verb to add + + + + Configuration for the verb or direct value for certain verbs (e.g., sleep) + + +#### Returns + +`bool` — True if the verb was added successfully, False otherwise + +#### Source + +[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) + +Line 433. + +*** + +### add\_verb\_to\_section + +Add a verb to a specific section + +#### Signature + +```python +add_verb_to_section( + section_name: str, + verb_name: str, + config: Union[Dict[str, Any], int] +) -> bool +``` + +#### Parameters + + + Name of the section to add to + + + + The name of the verb to add + + + + Configuration for the verb or direct value for certain verbs (e.g., sleep) + + +#### Returns + +`bool` — True if the verb was added successfully, False otherwise + +#### Source + +[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) + +Line 489. + +*** + +### as\_router + +Create a FastAPI router for this service + +#### Signature + +```python +as_router() -> APIRouter +``` + +#### Returns + +`APIRouter` — FastAPI router + +#### Source + +[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) + +Line 561. + +*** + +### extract\_sip\_username + +Extract SIP username from request body + +This extracts the username portion of a SIP URI from the 'to' field +in the call data of a request body. + +**Modifiers:** `static` + +#### Signature + +```python +@staticmethod +extract_sip_username(request_body: Dict[str, Any]) -> Optional[str] +``` + +#### Parameters + + + The parsed JSON body of the request + + +#### Returns + +`Optional[str]` — The extracted SIP username, or None if not found + +#### Source + +[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) + +Line 821. + +*** + +### get\_basic\_auth\_credentials + +Get the basic auth credentials + +#### Signature + +```python +get_basic_auth_credentials( + include_source: bool = False +) -> Union[Tuple[str, str], Tuple[str, str, str]] +``` + +#### Parameters + + + Whether to include the source of the credentials + + +#### Returns + +`Union[Tuple[str, str], Tuple[str, str, str]]` — (username, password) tuple or (username, password, source) tuple if include\_source is True + +#### Source + +[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) + +Line 1133. + +*** + +### get\_document + +Get the current SWML document + +#### Signature + +```python +get_document() -> Dict[str, Any] +``` + +#### Returns + +`Dict[str, Any]` — The current SWML document as a dictionary + +#### Source + +[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) + +Line 534. + +*** + +### manual\_set\_proxy\_url + +Manually set the proxy URL base for webhook callbacks + +This can be called at runtime to set or update the proxy URL + +#### Signature + +```python +manual_set_proxy_url(proxy_url: str) -> None +``` + +#### Parameters + + + The base URL to use for webhooks (e.g., https://example.ngrok.io) + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) + +Line 1399. + +*** + +### on\_request + +Called when SWML is requested, with request data when available + +Subclasses can override this to inspect or modify SWML based on the request + +#### Signature + +```python +on_request( + request_data: Optional[dict] = None, + callback_path: Optional[str] = None +) -> Optional[dict] +``` + +#### Parameters + + + Optional dictionary containing the parsed POST body + + + + Optional callback path + + +#### Returns + +`Optional[dict]` — Optional dict to modify/augment the SWML document + +#### Source + +[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) + +Line 941. + +*** + +### register\_routing\_callback + +Register a callback function that will be called to determine routing +based on POST data. + +When a routing callback is registered, an endpoint at the specified path is automatically +created that will handle requests. This endpoint will use the callback to +determine if the request should be processed by this service or redirected. + +The callback should take a request object and request body dictionary and return: + +- A route string if it should be routed to a different endpoint +- None if normal processing should continue + +#### Signature + +```python +register_routing_callback( + callback_fn: Callable[Request, Dict[str, Any], Optional[str]], + path: str = '/sip' +) -> None +``` + +#### Parameters + + + The callback function to register + + + + The path where this callback should be registered (default: "/sip") + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) + +Line 795. + +*** + +### register\_verb\_handler + +Register a custom verb handler + +#### Signature + +```python +register_verb_handler(handler: SWMLVerbHandler) -> None +``` + +#### Parameters + + + The verb handler to register + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) + +Line 552. + +*** + +### render\_document + +Render the current SWML document as a JSON string + +#### Signature + +```python +render_document() -> str +``` + +#### Returns + +`str` — The current SWML document as a JSON string + +#### Source + +[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) + +Line 543. + +*** + +### reset\_document + +Reset the current document to an empty state + +#### Signature + +```python +reset_document() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) + +Line 427. + +*** + +### serve + +Start a web server for this service + +#### Signature + +```python +serve( + host: Optional[str] = None, + port: Optional[int] = None, + ssl_cert: Optional[str] = None, + ssl_key: Optional[str] = None, + ssl_enabled: Optional[bool] = None, + domain: Optional[str] = None +) -> None +``` + +#### Parameters + + + Host to bind to (defaults to self.host) + + + + Port to bind to (defaults to self.port) + + + + Path to SSL certificate file + + + + Path to SSL key file + + + + Whether to enable SSL + + + + Domain name for SSL certificate + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) + +Line 957. + +*** + +### stop + +Stop the web server + +#### Signature + +```python +stop() -> None +``` + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) + +Line 1098. + ## Source [`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) + +Line 56. diff --git a/fern/products/sdk-reference/python/agents/swml-service/index__2.mdx b/fern/products/sdk-reference/python/agents/swml-service/index__2.mdx deleted file mode 100644 index 4ee0f2a427..0000000000 --- a/fern/products/sdk-reference/python/agents/swml-service/index__2.mdx +++ /dev/null @@ -1,639 +0,0 @@ ---- -slug: "/reference/python/agents/swml-service/index__2" -title: "SWMLService" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.core.swml_service.SWMLService" - parent: "agents" - module: "agents" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py" ---- -# `SWMLService` - -Base class for creating and serving SWML documents. - -This class provides core functionality for: - -- Loading and validating SWML schema -- Creating SWML documents -- Setting up web endpoints for serving SWML -- Managing authentication -- Registering SWML functions - -It serves as the foundation for more specialized services like AgentBase. - -## Signature - -```python -class SWMLService(ToolMixin) -``` - -## Inheritance - -**Extends:** [ToolMixin](/docs/sdk-reference/reference/python/agents/mixins/tool-mixin/tool-mixin) - -## Properties - - - - - Check if full JSON Schema validation is enabled. - - - - - - - - - - - - - - - - - - - - - - - - -## Methods - -### \_\_getattr\_\_ - -Dynamically generate and return SWML verb methods when accessed - -This method is called when an attribute lookup fails through the normal -mechanisms. It checks if the attribute name corresponds to a SWML verb -defined in the schema, and if so, dynamically creates a method for that verb. - -#### Signature - -```python -__getattr__(name: str) -> Any -``` - -#### Parameters - - - The name of the attribute being accessed - - -#### Returns - -`Any` — The dynamically created verb method if name is a valid SWML verb, otherwise raises AttributeError - -#### Throws - -- `AttributeError` — If name is not a valid SWML verb - -#### Source - -[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) - -Line 256. - -*** - -### \_\_init\_\_ - -Initialize a new SWML service - -#### Signature - -```python -__init__( - name: str, - route: str = '/', - host: str = '0.0.0.0', - port: Optional[int] = None, - basic_auth: Optional[Tuple[str, str]] = None, - schema_path: Optional[str] = None, - config_file: Optional[str] = None, - schema_validation: bool = True -) -``` - -#### Parameters - - - Service name/identifier - - - - HTTP route path for this service - - - - Host to bind the web server to - - - - Port to bind the web server to - - - - Optional (username, password) tuple for basic auth - - - - Optional path to the schema file - - - - Optional path to configuration file - - - - Enable schema validation. Default True. Can also be disabled via SWML\_SKIP\_SCHEMA\_VALIDATION=1 env var. - - -#### Source - -[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) - -Line 70. - -*** - -### add\_section - -Add a new section to the document - -#### Signature - -```python -add_section(section_name: str) -> bool -``` - -#### Parameters - - - Name of the section to add - - -#### Returns - -`bool` — True if the section was added, False if it already exists - -#### Source - -[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) - -Line 473. - -*** - -### add\_verb - -Add a verb to the main section of the current document - -#### Signature - -```python -add_verb(verb_name: str, config: Union[Dict[str, Any], int]) -> bool -``` - -#### Parameters - - - The name of the verb to add - - - - Configuration for the verb or direct value for certain verbs (e.g., sleep) - - -#### Returns - -`bool` — True if the verb was added successfully, False otherwise - -#### Source - -[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) - -Line 433. - -*** - -### add\_verb\_to\_section - -Add a verb to a specific section - -#### Signature - -```python -add_verb_to_section( - section_name: str, - verb_name: str, - config: Union[Dict[str, Any], int] -) -> bool -``` - -#### Parameters - - - Name of the section to add to - - - - The name of the verb to add - - - - Configuration for the verb or direct value for certain verbs (e.g., sleep) - - -#### Returns - -`bool` — True if the verb was added successfully, False otherwise - -#### Source - -[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) - -Line 489. - -*** - -### as\_router - -Create a FastAPI router for this service - -#### Signature - -```python -as_router() -> APIRouter -``` - -#### Returns - -`APIRouter` — FastAPI router - -#### Source - -[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) - -Line 561. - -*** - -### extract\_sip\_username - -Extract SIP username from request body - -This extracts the username portion of a SIP URI from the 'to' field -in the call data of a request body. - -**Modifiers:** `static` - -#### Signature - -```python -@staticmethod -extract_sip_username(request_body: Dict[str, Any]) -> Optional[str] -``` - -#### Parameters - - - The parsed JSON body of the request - - -#### Returns - -`Optional[str]` — The extracted SIP username, or None if not found - -#### Source - -[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) - -Line 821. - -*** - -### get\_basic\_auth\_credentials - -Get the basic auth credentials - -#### Signature - -```python -get_basic_auth_credentials( - include_source: bool = False -) -> Union[Tuple[str, str], Tuple[str, str, str]] -``` - -#### Parameters - - - Whether to include the source of the credentials - - -#### Returns - -`Union[Tuple[str, str], Tuple[str, str, str]]` — (username, password) tuple or (username, password, source) tuple if include\_source is True - -#### Source - -[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) - -Line 1133. - -*** - -### get\_document - -Get the current SWML document - -#### Signature - -```python -get_document() -> Dict[str, Any] -``` - -#### Returns - -`Dict[str, Any]` — The current SWML document as a dictionary - -#### Source - -[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) - -Line 534. - -*** - -### manual\_set\_proxy\_url - -Manually set the proxy URL base for webhook callbacks - -This can be called at runtime to set or update the proxy URL - -#### Signature - -```python -manual_set_proxy_url(proxy_url: str) -> None -``` - -#### Parameters - - - The base URL to use for webhooks (e.g., https://example.ngrok.io) - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) - -Line 1399. - -*** - -### on\_request - -Called when SWML is requested, with request data when available - -Subclasses can override this to inspect or modify SWML based on the request - -#### Signature - -```python -on_request( - request_data: Optional[dict] = None, - callback_path: Optional[str] = None -) -> Optional[dict] -``` - -#### Parameters - - - Optional dictionary containing the parsed POST body - - - - Optional callback path - - -#### Returns - -`Optional[dict]` — Optional dict to modify/augment the SWML document - -#### Source - -[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) - -Line 941. - -*** - -### register\_routing\_callback - -Register a callback function that will be called to determine routing -based on POST data. - -When a routing callback is registered, an endpoint at the specified path is automatically -created that will handle requests. This endpoint will use the callback to -determine if the request should be processed by this service or redirected. - -The callback should take a request object and request body dictionary and return: - -- A route string if it should be routed to a different endpoint -- None if normal processing should continue - -#### Signature - -```python -register_routing_callback( - callback_fn: Callable[Request, Dict[str, Any], Optional[str]], - path: str = '/sip' -) -> None -``` - -#### Parameters - - - The callback function to register - - - - The path where this callback should be registered (default: "/sip") - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) - -Line 795. - -*** - -### register\_verb\_handler - -Register a custom verb handler - -#### Signature - -```python -register_verb_handler(handler: SWMLVerbHandler) -> None -``` - -#### Parameters - - - The verb handler to register - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) - -Line 552. - -*** - -### render\_document - -Render the current SWML document as a JSON string - -#### Signature - -```python -render_document() -> str -``` - -#### Returns - -`str` — The current SWML document as a JSON string - -#### Source - -[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) - -Line 543. - -*** - -### reset\_document - -Reset the current document to an empty state - -#### Signature - -```python -reset_document() -> None -``` - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) - -Line 427. - -*** - -### serve - -Start a web server for this service - -#### Signature - -```python -serve( - host: Optional[str] = None, - port: Optional[int] = None, - ssl_cert: Optional[str] = None, - ssl_key: Optional[str] = None, - ssl_enabled: Optional[bool] = None, - domain: Optional[str] = None -) -> None -``` - -#### Parameters - - - Host to bind to (defaults to self.host) - - - - Port to bind to (defaults to self.port) - - - - Path to SSL certificate file - - - - Path to SSL key file - - - - Whether to enable SSL - - - - Domain name for SSL certificate - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) - -Line 957. - -*** - -### stop - -Stop the web server - -#### Signature - -```python -stop() -> None -``` - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) - -Line 1098. - -## Source - -[`signalwire/signalwire/core/swml_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/swml_service.py) - -Line 56. diff --git a/fern/products/sdk-reference/python/agents/web/index.mdx b/fern/products/sdk-reference/python/agents/web/index.mdx index 5c5e834e9e..19b2f6f7e8 100644 --- a/fern/products/sdk-reference/python/agents/web/index.mdx +++ b/fern/products/sdk-reference/python/agents/web/index.mdx @@ -31,11 +31,11 @@ module web -## Modules +## Classes - Copyright (c) 2025 SignalWire + Static file serving service with HTTP API diff --git a/fern/products/sdk-reference/python/agents/web/web-service/index.mdx b/fern/products/sdk-reference/python/agents/web/web-service/index.mdx index df2178e7e4..b2d36ce7f2 100644 --- a/fern/products/sdk-reference/python/agents/web/web-service/index.mdx +++ b/fern/products/sdk-reference/python/agents/web/web-service/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.web.web_service" parent: "signalwire.web" @@ -14,31 +14,223 @@ lustri: --- # `web_service` -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. +Static file serving service with HTTP API ## Signature ```python -module web_service +class WebService ``` ## Properties + + + + + + + + + + + + -## Classes + + + + + + +## Methods + +### \_\_init\_\_ + +Initialize WebService + +#### Signature + +```python +__init__( + port: int = 8002, + directories: Dict[str, str] = None, + basic_auth: Optional[Tuple[str, str]] = None, + config_file: Optional[str] = None, + enable_directory_browsing: bool = False, + allowed_extensions: Optional[list] = None, + blocked_extensions: Optional[list] = None, + max_file_size: int = 100 * 1024 * 1024, + enable_cors: bool = True +) +``` + +#### Parameters + + + Port to bind to (default: 8002) + + + + Dict mapping URL paths to local directories + + + + Optional tuple of (username, password) + + + + Optional configuration file path + + + + Allow directory listing + - - - Static file serving service with HTTP API - - + + List of allowed file extensions (e.g., \['.html', '.css']) + + + + List of blocked extensions (e.g., \['.env', '.git']) + + + + Maximum file size in bytes to serve + + + + Enable CORS support + + +#### Source + +[`signalwire/signalwire/web/web_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/web/web_service.py) + +Line 44. + +*** + +### add\_directory + +Add a new directory to serve + +#### Signature + +```python +add_directory(route: str, directory: str) -> None +``` + +#### Parameters + + + URL path to mount at (e.g., "/docs") + + + + Local directory path to serve + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/web/web_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/web/web_service.py) + +Line 461. + +*** + +### remove\_directory + +Remove a directory from being served + +#### Signature + +```python +remove_directory(route: str) -> None +``` + +#### Parameters + + + URL path to remove + + +#### Returns + +`None` + +#### Source + +[`signalwire/signalwire/web/web_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/web/web_service.py) + +Line 487. + +*** + +### start + +Start the service with optional HTTPS support + +#### Signature + +```python +start( + host: str = '0.0.0.0', + port: Optional[int] = None, + ssl_cert: Optional[str] = None, + ssl_key: Optional[str] = None +) +``` + +#### Parameters + + + Host to bind to (default: "0.0.0.0") + + + + Port to bind to (default: self.port) + + + + Path to SSL certificate file (overrides environment) + + + + Path to SSL key file (overrides environment) + + +#### Source + +[`signalwire/signalwire/web/web_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/web/web_service.py) + +Line 501. + +*** + +### stop + +Stop the service (placeholder for cleanup) + +#### Signature + +```python +stop() +``` + +#### Source + +[`signalwire/signalwire/web/web_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/web/web_service.py) + +Line 566. ## Source [`signalwire/signalwire/web/web_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/web/web_service.py) + +Line 41. diff --git a/fern/products/sdk-reference/python/agents/web/web-service/web-service/index.mdx b/fern/products/sdk-reference/python/agents/web/web-service/web-service/index.mdx deleted file mode 100644 index 74a6ef53da..0000000000 --- a/fern/products/sdk-reference/python/agents/web/web-service/web-service/index.mdx +++ /dev/null @@ -1,234 +0,0 @@ ---- -slug: "/reference/python/agents/web/web-service/web-service" -title: "WebService" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.web.web_service.WebService" - parent: "signalwire.web.web_service" - module: "agents.web.web_service" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/web/web_service.py" ---- -# `WebService` - -Static file serving service with HTTP API - -## Signature - -```python -class WebService -``` - -## Properties - - - - - - - - - - - - - - - - - - - -## Methods - -### \_\_init\_\_ - -Initialize WebService - -#### Signature - -```python -__init__( - port: int = 8002, - directories: Dict[str, str] = None, - basic_auth: Optional[Tuple[str, str]] = None, - config_file: Optional[str] = None, - enable_directory_browsing: bool = False, - allowed_extensions: Optional[list] = None, - blocked_extensions: Optional[list] = None, - max_file_size: int = 100 * 1024 * 1024, - enable_cors: bool = True -) -``` - -#### Parameters - - - Port to bind to (default: 8002) - - - - Dict mapping URL paths to local directories - - - - Optional tuple of (username, password) - - - - Optional configuration file path - - - - Allow directory listing - - - - List of allowed file extensions (e.g., \['.html', '.css']) - - - - List of blocked extensions (e.g., \['.env', '.git']) - - - - Maximum file size in bytes to serve - - - - Enable CORS support - - -#### Source - -[`signalwire/signalwire/web/web_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/web/web_service.py) - -Line 44. - -*** - -### add\_directory - -Add a new directory to serve - -#### Signature - -```python -add_directory(route: str, directory: str) -> None -``` - -#### Parameters - - - URL path to mount at (e.g., "/docs") - - - - Local directory path to serve - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/web/web_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/web/web_service.py) - -Line 461. - -*** - -### remove\_directory - -Remove a directory from being served - -#### Signature - -```python -remove_directory(route: str) -> None -``` - -#### Parameters - - - URL path to remove - - -#### Returns - -`None` - -#### Source - -[`signalwire/signalwire/web/web_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/web/web_service.py) - -Line 487. - -*** - -### start - -Start the service with optional HTTPS support - -#### Signature - -```python -start( - host: str = '0.0.0.0', - port: Optional[int] = None, - ssl_cert: Optional[str] = None, - ssl_key: Optional[str] = None -) -``` - -#### Parameters - - - Host to bind to (default: "0.0.0.0") - - - - Port to bind to (default: self.port) - - - - Path to SSL certificate file (overrides environment) - - - - Path to SSL key file (overrides environment) - - -#### Source - -[`signalwire/signalwire/web/web_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/web/web_service.py) - -Line 501. - -*** - -### stop - -Stop the service (placeholder for cleanup) - -#### Signature - -```python -stop() -``` - -#### Source - -[`signalwire/signalwire/web/web_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/web/web_service.py) - -Line 566. - -## Source - -[`signalwire/signalwire/web/web_service.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/web/web_service.py) - -Line 41. diff --git a/fern/products/sdk-reference/python/core/security/index.mdx b/fern/products/sdk-reference/python/core/security/index.mdx index 6b61bdb131..06be28a704 100644 --- a/fern/products/sdk-reference/python/core/security/index.mdx +++ b/fern/products/sdk-reference/python/core/security/index.mdx @@ -31,13 +31,17 @@ module security -## Modules +## Classes - Copyright (c) 2025 SignalWire + Manages security tokens for function calls + +## Modules + + FastAPI middleware / dependency for SignalWire webhook signature validation. diff --git a/fern/products/sdk-reference/python/core/security/session-manager/index.mdx b/fern/products/sdk-reference/python/core/security/session-manager/index.mdx index d8582a23af..74ec6896ff 100644 --- a/fern/products/sdk-reference/python/core/security/session-manager/index.mdx +++ b/fern/products/sdk-reference/python/core/security/session-manager/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.core.security.session_manager" parent: "signalwire.core.security" @@ -14,27 +14,357 @@ lustri: --- # `session_manager` -Copyright (c) 2025 SignalWire +Manages security tokens for function calls -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. +This implementation is completely stateless - it does not track call sessions +or store any information in memory. All validation is done using cryptographic +signatures with the tokens containing all necessary information. ## Signature ```python -module session_manager +class SessionManager +``` + +## Properties + + + + + +## Methods + +### \_\_init\_\_ + +Initialize the session manager + +#### Signature + +```python +__init__(token_expiry_secs: int = 900, secret_key: Optional[str] = None) +``` + +#### Parameters + + + Seconds until tokens expire (default: 15 minutes) + + + + Secret key for signing tokens (generated if not provided) + + +#### Source + +[`signalwire/signalwire/core/security/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/session_manager.py) + +Line 31. + +*** + +### activate\_session + +Legacy method, does nothing but returns success + +#### Signature + +```python +activate_session(call_id: str) -> bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/core/security/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/session_manager.py) + +Line 184. + +*** + +### create\_session + +Create a new session ID if one isn't provided + +#### Signature + +```python +create_session(call_id: Optional[str] = None) -> str +``` + +#### Parameters + + + Optional call ID, generated if not provided + + +#### Returns + +`str` — The call\_id for the session + +#### Source + +[`signalwire/signalwire/core/security/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/session_manager.py) + +Line 44. + +*** + +### create\_tool\_token + +Alias for generate\_token to maintain backward compatibility + +#### Signature + +```python +create_tool_token(function_name: str, call_id: str) -> str +``` + +#### Parameters + + + Name of the function to generate a token for + + + + Call session ID + + +#### Returns + +`str` — A secure token + +#### Source + +[`signalwire/signalwire/core/security/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/session_manager.py) + +Line 92. + +*** + +### debug\_token + +Debug a token without validating it + +This method decodes the token and extracts its components for debugging purposes +without performing validation. Requires \_debug\_mode to be True. + +#### Signature + +```python +debug_token(token: str) -> Dict[str, Any] +``` + +#### Parameters + + + The token to debug + + +#### Returns + +`Dict[str, Any]` — Dictionary with token components and analysis + +#### Source + +[`signalwire/signalwire/core/security/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/session_manager.py) + +Line 208. + +*** + +### end\_session + +Legacy method, does nothing but returns success + +#### Signature + +```python +end_session(call_id: str) -> bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/core/security/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/session_manager.py) + +Line 190. + +*** + +### generate\_token + +Generate a secure self-contained token for a function call + +#### Signature + +```python +generate_token(function_name: str, call_id: str) -> str +``` + +#### Parameters + + + Name of the function to generate a token for + + + + Call session ID + + +#### Returns + +`str` — A secure token + +#### Source + +[`signalwire/signalwire/core/security/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/session_manager.py) + +Line 60. + +*** + +### get\_session\_metadata + +Legacy method, always returns empty metadata + +#### Signature + +```python +get_session_metadata(call_id: str) -> Optional[Dict[str, Any]] +``` + +#### Parameters + + + +#### Returns + +`Optional[Dict[str, Any]]` + +#### Source + +[`signalwire/signalwire/core/security/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/session_manager.py) + +Line 196. + +*** + +### set\_session\_metadata + +Legacy method, does nothing but returns success + +#### Signature + +```python +set_session_metadata(call_id: str, key: str, value: Any) -> bool +``` + +#### Parameters + + + + + + + +#### Returns + +`bool` + +#### Source + +[`signalwire/signalwire/core/security/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/session_manager.py) + +Line 202. + +*** + +### validate\_token + +Validate a function call token + +#### Signature + +```python +validate_token(call_id: str, function_name: str, token: str) -> bool +``` + +#### Parameters + + + Call session ID + + + + Name of the function being called + + + + Token to validate + + +#### Returns + +`bool` — True if valid, False otherwise + +#### Source + +[`signalwire/signalwire/core/security/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/session_manager.py) + +Line 105. + +*** + +### validate\_tool\_token + +Alias for validate\_token to maintain backward compatibility + +#### Signature + +```python +validate_tool_token(function_name: str, token: str, call_id: str) -> bool ``` -## Classes +#### Parameters + + + Name of the function being called + + + + Token to validate + + + + Call session ID + + +#### Returns - - - Manages security tokens for function calls - - +`bool` — True if valid, False otherwise + +#### Source + +[`signalwire/signalwire/core/security/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/session_manager.py) + +Line 167. ## Source [`signalwire/signalwire/core/security/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/session_manager.py) + +Line 23. diff --git a/fern/products/sdk-reference/python/core/security/session-manager/session-manager/index.mdx b/fern/products/sdk-reference/python/core/security/session-manager/session-manager/index.mdx deleted file mode 100644 index 2092ebfc71..0000000000 --- a/fern/products/sdk-reference/python/core/security/session-manager/session-manager/index.mdx +++ /dev/null @@ -1,370 +0,0 @@ ---- -slug: "/reference/python/core/security/session-manager/session-manager" -title: "SessionManager" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.core.security.session_manager.SessionManager" - parent: "signalwire.core.security.session_manager" - module: "core.security.session_manager" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/session_manager.py" ---- -# `SessionManager` - -Manages security tokens for function calls - -This implementation is completely stateless - it does not track call sessions -or store any information in memory. All validation is done using cryptographic -signatures with the tokens containing all necessary information. - -## Signature - -```python -class SessionManager -``` - -## Properties - - - - - -## Methods - -### \_\_init\_\_ - -Initialize the session manager - -#### Signature - -```python -__init__(token_expiry_secs: int = 900, secret_key: Optional[str] = None) -``` - -#### Parameters - - - Seconds until tokens expire (default: 15 minutes) - - - - Secret key for signing tokens (generated if not provided) - - -#### Source - -[`signalwire/signalwire/core/security/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/session_manager.py) - -Line 31. - -*** - -### activate\_session - -Legacy method, does nothing but returns success - -#### Signature - -```python -activate_session(call_id: str) -> bool -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`signalwire/signalwire/core/security/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/session_manager.py) - -Line 184. - -*** - -### create\_session - -Create a new session ID if one isn't provided - -#### Signature - -```python -create_session(call_id: Optional[str] = None) -> str -``` - -#### Parameters - - - Optional call ID, generated if not provided - - -#### Returns - -`str` — The call\_id for the session - -#### Source - -[`signalwire/signalwire/core/security/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/session_manager.py) - -Line 44. - -*** - -### create\_tool\_token - -Alias for generate\_token to maintain backward compatibility - -#### Signature - -```python -create_tool_token(function_name: str, call_id: str) -> str -``` - -#### Parameters - - - Name of the function to generate a token for - - - - Call session ID - - -#### Returns - -`str` — A secure token - -#### Source - -[`signalwire/signalwire/core/security/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/session_manager.py) - -Line 92. - -*** - -### debug\_token - -Debug a token without validating it - -This method decodes the token and extracts its components for debugging purposes -without performing validation. Requires \_debug\_mode to be True. - -#### Signature - -```python -debug_token(token: str) -> Dict[str, Any] -``` - -#### Parameters - - - The token to debug - - -#### Returns - -`Dict[str, Any]` — Dictionary with token components and analysis - -#### Source - -[`signalwire/signalwire/core/security/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/session_manager.py) - -Line 208. - -*** - -### end\_session - -Legacy method, does nothing but returns success - -#### Signature - -```python -end_session(call_id: str) -> bool -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`signalwire/signalwire/core/security/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/session_manager.py) - -Line 190. - -*** - -### generate\_token - -Generate a secure self-contained token for a function call - -#### Signature - -```python -generate_token(function_name: str, call_id: str) -> str -``` - -#### Parameters - - - Name of the function to generate a token for - - - - Call session ID - - -#### Returns - -`str` — A secure token - -#### Source - -[`signalwire/signalwire/core/security/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/session_manager.py) - -Line 60. - -*** - -### get\_session\_metadata - -Legacy method, always returns empty metadata - -#### Signature - -```python -get_session_metadata(call_id: str) -> Optional[Dict[str, Any]] -``` - -#### Parameters - - - -#### Returns - -`Optional[Dict[str, Any]]` - -#### Source - -[`signalwire/signalwire/core/security/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/session_manager.py) - -Line 196. - -*** - -### set\_session\_metadata - -Legacy method, does nothing but returns success - -#### Signature - -```python -set_session_metadata(call_id: str, key: str, value: Any) -> bool -``` - -#### Parameters - - - - - - - -#### Returns - -`bool` - -#### Source - -[`signalwire/signalwire/core/security/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/session_manager.py) - -Line 202. - -*** - -### validate\_token - -Validate a function call token - -#### Signature - -```python -validate_token(call_id: str, function_name: str, token: str) -> bool -``` - -#### Parameters - - - Call session ID - - - - Name of the function being called - - - - Token to validate - - -#### Returns - -`bool` — True if valid, False otherwise - -#### Source - -[`signalwire/signalwire/core/security/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/session_manager.py) - -Line 105. - -*** - -### validate\_tool\_token - -Alias for validate\_token to maintain backward compatibility - -#### Signature - -```python -validate_tool_token(function_name: str, token: str, call_id: str) -> bool -``` - -#### Parameters - - - Name of the function being called - - - - Token to validate - - - - Call session ID - - -#### Returns - -`bool` — True if valid, False otherwise - -#### Source - -[`signalwire/signalwire/core/security/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/session_manager.py) - -Line 167. - -## Source - -[`signalwire/signalwire/core/security/session_manager.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/security/session_manager.py) - -Line 23. diff --git a/fern/products/sdk-reference/python/rest/addresses/addresses-resource/index.mdx b/fern/products/sdk-reference/python/rest/addresses/addresses-resource/index.mdx deleted file mode 100644 index 12d7462950..0000000000 --- a/fern/products/sdk-reference/python/rest/addresses/addresses-resource/index.mdx +++ /dev/null @@ -1,133 +0,0 @@ ---- -slug: "/reference/python/rest/addresses/addresses-resource" -title: "AddressesResource" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.addresses.AddressesResource" - parent: "signalwire.rest.namespaces.addresses" - module: "rest.addresses" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/addresses.py" ---- -# `AddressesResource` - -Address management (no update endpoint). - -## Signature - -```python -class AddressesResource(BaseResource) -``` - -## Inheritance - -**Extends:** `BaseResource` - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(http) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/addresses.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/addresses.py) - -Line 20. - -*** - -### create - -#### Signature - -```python -create(**kwargs = {}) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/addresses.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/addresses.py) - -Line 26. - -*** - -### delete - -#### Signature - -```python -delete(address_id) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/addresses.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/addresses.py) - -Line 32. - -*** - -### get - -#### Signature - -```python -get(address_id) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/addresses.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/addresses.py) - -Line 29. - -*** - -### list - -#### Signature - -```python -list(**params = {}) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/addresses.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/addresses.py) - -Line 23. - -## Source - -[`signalwire/signalwire/rest/namespaces/addresses.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/addresses.py) - -Line 17. diff --git a/fern/products/sdk-reference/python/rest/addresses/index.mdx b/fern/products/sdk-reference/python/rest/addresses/index.mdx index 3bb4ba42a0..2dcf4e6fd2 100644 --- a/fern/products/sdk-reference/python/rest/addresses/index.mdx +++ b/fern/products/sdk-reference/python/rest/addresses/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.rest.namespaces.addresses" parent: "signalwire.rest" @@ -14,27 +14,120 @@ lustri: --- # `addresses` -Copyright (c) 2025 SignalWire +Address management (no update endpoint). -This file is part of the SignalWire SDK. +## Signature -Licensed under the MIT License. -See LICENSE file in the project root for full license information. +```python +class AddressesResource(BaseResource) +``` -## Signature +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### \_\_init\_\_ + +#### Signature ```python -module addresses +__init__(http) ``` -## Classes +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/addresses.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/addresses.py) + +Line 20. + +*** + +### create + +#### Signature + +```python +create(**kwargs = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/addresses.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/addresses.py) + +Line 26. + +*** + +### delete + +#### Signature + +```python +delete(address_id) +``` - - - Address management (no update endpoint). - - +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/addresses.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/addresses.py) + +Line 32. + +*** + +### get + +#### Signature + +```python +get(address_id) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/addresses.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/addresses.py) + +Line 29. + +*** + +### list + +#### Signature + +```python +list(**params = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/addresses.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/addresses.py) + +Line 23. ## Source [`signalwire/signalwire/rest/namespaces/addresses.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/addresses.py) + +Line 17. diff --git a/fern/products/sdk-reference/python/rest/call-handler/index.mdx b/fern/products/sdk-reference/python/rest/call-handler/index.mdx index 522df80a95..9eab03fdfd 100644 --- a/fern/products/sdk-reference/python/rest/call-handler/index.mdx +++ b/fern/products/sdk-reference/python/rest/call-handler/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.rest.call_handler" parent: "signalwire.rest" @@ -14,27 +14,67 @@ lustri: --- # `call_handler` -Copyright (c) 2025 SignalWire +`call_handler` values for `phone_numbers.update`. -This file is part of the SignalWire SDK. +Each value is a `str` subclass, so passing the enum member directly into +`phone_numbers.update(..., call_handler=PhoneCallHandler.RELAY_SCRIPT)` +serializes to the wire value without `.value` indirection. -Licensed under the MIT License. -See LICENSE file in the project root for full license information. +\================= ============================= ======================= +Enum member Companion field (required) Auto-creates resource +\================= ============================= ======================= +RELAY\_SCRIPT call\_relay\_script\_url swml\_webhook +LAML\_WEBHOOKS call\_request\_url cxml\_webhook +LAML\_APPLICATION call\_laml\_application\_id cxml\_application +AI\_AGENT call\_ai\_agent\_id ai\_agent +CALL\_FLOW call\_flow\_id call\_flow +RELAY\_APPLICATION call\_relay\_application relay\_application +RELAY\_TOPIC call\_relay\_topic (routes via RELAY) +RELAY\_CONTEXT call\_relay\_context (legacy, prefer topic) +RELAY\_CONNECTOR (connector config) (internal) +VIDEO\_ROOM call\_video\_room\_id (routes to Video API) +DIALOGFLOW call\_dialogflow\_agent\_id (none) +\================= ============================= ======================= + +Note: `LAML_WEBHOOKS` (wire value `laml_webhooks`) produces a **cXML** +handler, not a generic webhook. For SWML, use `RELAY_SCRIPT`. ## Signature ```python -module call_handler +class PhoneCallHandler(str, Enum) ``` -## Classes +## Inheritance + +**Extends:** `str`, `Enum` + +## Properties + + + + + + + + - - - `call_handler` values for `phone_numbers.update`. - - + + + + + + + + + + + + + ## Source [`signalwire/signalwire/rest/call_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/call_handler.py) + +Line 25. diff --git a/fern/products/sdk-reference/python/rest/call-handler/phone-call-handler/index.mdx b/fern/products/sdk-reference/python/rest/call-handler/phone-call-handler/index.mdx deleted file mode 100644 index 863c39d370..0000000000 --- a/fern/products/sdk-reference/python/rest/call-handler/phone-call-handler/index.mdx +++ /dev/null @@ -1,80 +0,0 @@ ---- -slug: "/reference/python/rest/call-handler/phone-call-handler" -title: "PhoneCallHandler" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.call_handler.PhoneCallHandler" - parent: "signalwire.rest.call_handler" - module: "rest.call_handler" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/call_handler.py" ---- -# `PhoneCallHandler` - -`call_handler` values for `phone_numbers.update`. - -Each value is a `str` subclass, so passing the enum member directly into -`phone_numbers.update(..., call_handler=PhoneCallHandler.RELAY_SCRIPT)` -serializes to the wire value without `.value` indirection. - -\================= ============================= ======================= -Enum member Companion field (required) Auto-creates resource -\================= ============================= ======================= -RELAY\_SCRIPT call\_relay\_script\_url swml\_webhook -LAML\_WEBHOOKS call\_request\_url cxml\_webhook -LAML\_APPLICATION call\_laml\_application\_id cxml\_application -AI\_AGENT call\_ai\_agent\_id ai\_agent -CALL\_FLOW call\_flow\_id call\_flow -RELAY\_APPLICATION call\_relay\_application relay\_application -RELAY\_TOPIC call\_relay\_topic (routes via RELAY) -RELAY\_CONTEXT call\_relay\_context (legacy, prefer topic) -RELAY\_CONNECTOR (connector config) (internal) -VIDEO\_ROOM call\_video\_room\_id (routes to Video API) -DIALOGFLOW call\_dialogflow\_agent\_id (none) -\================= ============================= ======================= - -Note: `LAML_WEBHOOKS` (wire value `laml_webhooks`) produces a **cXML** -handler, not a generic webhook. For SWML, use `RELAY_SCRIPT`. - -## Signature - -```python -class PhoneCallHandler(str, Enum) -``` - -## Inheritance - -**Extends:** `str`, `Enum` - -## Properties - - - - - - - - - - - - - - - - - - - - - - - -## Source - -[`signalwire/signalwire/rest/call_handler.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/call_handler.py) - -Line 25. diff --git a/fern/products/sdk-reference/python/rest/calling/calling-namespace/index.mdx b/fern/products/sdk-reference/python/rest/calling/calling-namespace/index.mdx deleted file mode 100644 index 74a2ce0fe7..0000000000 --- a/fern/products/sdk-reference/python/rest/calling/calling-namespace/index.mdx +++ /dev/null @@ -1,863 +0,0 @@ ---- -slug: "/reference/python/rest/calling/calling-namespace" -title: "CallingNamespace" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.calling.CallingNamespace" - parent: "signalwire.rest.namespaces.calling" - module: "rest.calling" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py" ---- -# `CallingNamespace` - -REST call control — all 37 commands dispatched via single POST endpoint. - -## Signature - -```python -class CallingNamespace(BaseResource) -``` - -## Inheritance - -**Extends:** `BaseResource` - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(http) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 22. - -*** - -### ai\_hold - -#### Signature - -```python -ai_hold(call_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 125. - -*** - -### ai\_message - -#### Signature - -```python -ai_message(call_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 122. - -*** - -### ai\_stop - -#### Signature - -```python -ai_stop(call_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 131. - -*** - -### ai\_unhold - -#### Signature - -```python -ai_unhold(call_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 128. - -*** - -### collect - -#### Signature - -```python -collect(call_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 77. - -*** - -### collect\_start\_input\_timers - -#### Signature - -```python -collect_start_input_timers(call_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 83. - -*** - -### collect\_stop - -#### Signature - -```python -collect_stop(call_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 80. - -*** - -### denoise - -#### Signature - -```python -denoise(call_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 108. - -*** - -### denoise\_stop - -#### Signature - -```python -denoise_stop(call_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 111. - -*** - -### detect - -#### Signature - -```python -detect(call_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 87. - -*** - -### detect\_stop - -#### Signature - -```python -detect_stop(call_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 90. - -*** - -### dial - -#### Signature - -```python -dial(**params = {}) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 32. - -*** - -### disconnect - -#### Signature - -```python -disconnect(call_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 44. - -*** - -### end - -#### Signature - -```python -end(call_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 38. - -*** - -### live\_transcribe - -#### Signature - -```python -live_transcribe(call_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 135. - -*** - -### live\_translate - -#### Signature - -```python -live_translate(call_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 138. - -*** - -### play - -#### Signature - -```python -play(call_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 48. - -*** - -### play\_pause - -#### Signature - -```python -play_pause(call_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 51. - -*** - -### play\_resume - -#### Signature - -```python -play_resume(call_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 54. - -*** - -### play\_stop - -#### Signature - -```python -play_stop(call_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 57. - -*** - -### play\_volume - -#### Signature - -```python -play_volume(call_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 60. - -*** - -### receive\_fax\_stop - -#### Signature - -```python -receive_fax_stop(call_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 145. - -*** - -### record - -#### Signature - -```python -record(call_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 64. - -*** - -### record\_pause - -#### Signature - -```python -record_pause(call_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 67. - -*** - -### record\_resume - -#### Signature - -```python -record_resume(call_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 70. - -*** - -### record\_stop - -#### Signature - -```python -record_stop(call_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 73. - -*** - -### refer - -#### Signature - -```python -refer(call_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 149. - -*** - -### send\_fax\_stop - -#### Signature - -```python -send_fax_stop(call_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 142. - -*** - -### stream - -#### Signature - -```python -stream(call_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 101. - -*** - -### stream\_stop - -#### Signature - -```python -stream_stop(call_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 104. - -*** - -### tap - -#### Signature - -```python -tap(call_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 94. - -*** - -### tap\_stop - -#### Signature - -```python -tap_stop(call_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 97. - -*** - -### transcribe - -#### Signature - -```python -transcribe(call_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 115. - -*** - -### transcribe\_stop - -#### Signature - -```python -transcribe_stop(call_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 118. - -*** - -### transfer - -#### Signature - -```python -transfer(call_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 41. - -*** - -### update - -#### Signature - -```python -update(**params = {}) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 35. - -*** - -### user\_event - -#### Signature - -```python -user_event(call_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 153. - -## Source - -[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) - -Line 19. diff --git a/fern/products/sdk-reference/python/rest/calling/index.mdx b/fern/products/sdk-reference/python/rest/calling/index.mdx index e3aa287c9d..957698d7a8 100644 --- a/fern/products/sdk-reference/python/rest/calling/index.mdx +++ b/fern/products/sdk-reference/python/rest/calling/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.rest.namespaces.calling" parent: "signalwire.rest" @@ -14,27 +14,850 @@ lustri: --- # `calling` -Copyright (c) 2025 SignalWire +REST call control — all 37 commands dispatched via single POST endpoint. -This file is part of the SignalWire SDK. +## Signature -Licensed under the MIT License. -See LICENSE file in the project root for full license information. +```python +class CallingNamespace(BaseResource) +``` -## Signature +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(http) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 22. + +*** + +### ai\_hold + +#### Signature + +```python +ai_hold(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 125. + +*** + +### ai\_message + +#### Signature + +```python +ai_message(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 122. + +*** + +### ai\_stop + +#### Signature + +```python +ai_stop(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 131. + +*** + +### ai\_unhold + +#### Signature + +```python +ai_unhold(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 128. + +*** + +### collect + +#### Signature + +```python +collect(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 77. + +*** + +### collect\_start\_input\_timers + +#### Signature + +```python +collect_start_input_timers(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 83. + +*** + +### collect\_stop + +#### Signature + +```python +collect_stop(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 80. + +*** + +### denoise + +#### Signature + +```python +denoise(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 108. + +*** + +### denoise\_stop + +#### Signature + +```python +denoise_stop(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 111. + +*** + +### detect + +#### Signature + +```python +detect(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 87. + +*** + +### detect\_stop + +#### Signature + +```python +detect_stop(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 90. + +*** + +### dial + +#### Signature + +```python +dial(**params = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 32. + +*** + +### disconnect + +#### Signature + +```python +disconnect(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 44. + +*** + +### end + +#### Signature + +```python +end(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 38. + +*** + +### live\_transcribe + +#### Signature + +```python +live_transcribe(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 135. + +*** + +### live\_translate + +#### Signature + +```python +live_translate(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 138. + +*** + +### play + +#### Signature + +```python +play(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 48. + +*** + +### play\_pause + +#### Signature + +```python +play_pause(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 51. + +*** + +### play\_resume + +#### Signature + +```python +play_resume(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 54. + +*** + +### play\_stop + +#### Signature + +```python +play_stop(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 57. + +*** + +### play\_volume + +#### Signature + +```python +play_volume(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 60. + +*** + +### receive\_fax\_stop + +#### Signature + +```python +receive_fax_stop(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 145. + +*** + +### record + +#### Signature + +```python +record(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 64. + +*** + +### record\_pause + +#### Signature + +```python +record_pause(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 67. + +*** + +### record\_resume + +#### Signature + +```python +record_resume(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 70. + +*** + +### record\_stop + +#### Signature + +```python +record_stop(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 73. + +*** + +### refer + +#### Signature + +```python +refer(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 149. + +*** + +### send\_fax\_stop + +#### Signature + +```python +send_fax_stop(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 142. + +*** + +### stream + +#### Signature + +```python +stream(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 101. + +*** + +### stream\_stop + +#### Signature + +```python +stream_stop(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 104. + +*** + +### tap + +#### Signature ```python -module calling +tap(call_id, **params = {}) ``` -## Classes +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 94. + +*** - - - REST call control — all 37 commands dispatched via single POST endpoint. - - +### tap\_stop + +#### Signature + +```python +tap_stop(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 97. + +*** + +### transcribe + +#### Signature + +```python +transcribe(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 115. + +*** + +### transcribe\_stop + +#### Signature + +```python +transcribe_stop(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 118. + +*** + +### transfer + +#### Signature + +```python +transfer(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 41. + +*** + +### update + +#### Signature + +```python +update(**params = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 35. + +*** + +### user\_event + +#### Signature + +```python +user_event(call_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 153. ## Source [`signalwire/signalwire/rest/namespaces/calling.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/calling.py) + +Line 19. diff --git a/fern/products/sdk-reference/python/rest/chat/chat-resource/index.mdx b/fern/products/sdk-reference/python/rest/chat/chat-resource/index.mdx deleted file mode 100644 index 0782fedb86..0000000000 --- a/fern/products/sdk-reference/python/rest/chat/chat-resource/index.mdx +++ /dev/null @@ -1,73 +0,0 @@ ---- -slug: "/reference/python/rest/chat/chat-resource" -title: "ChatResource" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.chat.ChatResource" - parent: "signalwire.rest.namespaces.chat" - module: "rest.chat" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/chat.py" ---- -# `ChatResource` - -Chat token generation. - -## Signature - -```python -class ChatResource(BaseResource) -``` - -## Inheritance - -**Extends:** `BaseResource` - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(http) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/chat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/chat.py) - -Line 20. - -*** - -### create\_token - -#### Signature - -```python -create_token(**kwargs = {}) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/chat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/chat.py) - -Line 23. - -## Source - -[`signalwire/signalwire/rest/namespaces/chat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/chat.py) - -Line 17. diff --git a/fern/products/sdk-reference/python/rest/chat/index.mdx b/fern/products/sdk-reference/python/rest/chat/index.mdx index 8f952581ee..89a9df3186 100644 --- a/fern/products/sdk-reference/python/rest/chat/index.mdx +++ b/fern/products/sdk-reference/python/rest/chat/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.rest.namespaces.chat" parent: "signalwire.rest" @@ -14,27 +14,60 @@ lustri: --- # `chat` -Copyright (c) 2025 SignalWire +Chat token generation. -This file is part of the SignalWire SDK. +## Signature -Licensed under the MIT License. -See LICENSE file in the project root for full license information. +```python +class ChatResource(BaseResource) +``` -## Signature +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### \_\_init\_\_ + +#### Signature ```python -module chat +__init__(http) ``` -## Classes +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/chat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/chat.py) + +Line 20. - - - Chat token generation. - - +*** + +### create\_token + +#### Signature + +```python +create_token(**kwargs = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/chat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/chat.py) + +Line 23. ## Source [`signalwire/signalwire/rest/namespaces/chat.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/chat.py) + +Line 17. diff --git a/fern/products/sdk-reference/python/rest/client/index.mdx b/fern/products/sdk-reference/python/rest/client/index.mdx index 43dcd7e2f6..8179ef4629 100644 --- a/fern/products/sdk-reference/python/rest/client/index.mdx +++ b/fern/products/sdk-reference/python/rest/client/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.rest.client" parent: "signalwire.rest" @@ -14,27 +14,120 @@ lustri: --- # `client` -Copyright (c) 2025 SignalWire +REST client for the SignalWire platform APIs. -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. +> \[!NOTE] +> client = RestClient( +> project="your-project-id", +> token="your-api-token", +> host="your-space.signalwire.com", +> ) +> +> # Or use environment variables: +> +> # SIGNALWIRE\_PROJECT\_ID, SIGNALWIRE\_API\_TOKEN, SIGNALWIRE\_SPACE +> +> client = RestClient() +> +> # Use namespaced resources +> +> client.fabric.ai\_agents.list() +> client.calling.play(call\_id, play=\[...]) +> client.phone\_numbers.search(area\_code="512") +> client.video.rooms.create(name="standup") +> client.compat.calls.list() ## Signature ```python -module client +class RestClient +``` + +## Examples + +```python +# Or use environment variables: +# SIGNALWIRE_PROJECT_ID, SIGNALWIRE_API_TOKEN, SIGNALWIRE_SPACE +client = RestClient() + +# Use namespaced resources +client.fabric.ai_agents.list() +client.calling.play(call_id, play=[...]) +client.phone_numbers.search(area_code="512") +client.video.rooms.create(name="standup") +client.compat.calls.list() ``` -## Classes +## Properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - REST client for the SignalWire platform APIs. - - + + + + + + + + + + + + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(project = None, token = None, host = None) +``` + +#### Parameters + + + + + + + +#### Source + +[`signalwire/signalwire/rest/client.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/client.py) + +Line 61. ## Source [`signalwire/signalwire/rest/client.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/client.py) + +Line 39. diff --git a/fern/products/sdk-reference/python/rest/client/rest-client/index.mdx b/fern/products/sdk-reference/python/rest/client/rest-client/index.mdx deleted file mode 100644 index 593cd86557..0000000000 --- a/fern/products/sdk-reference/python/rest/client/rest-client/index.mdx +++ /dev/null @@ -1,133 +0,0 @@ ---- -slug: "/reference/python/rest/client/rest-client" -title: "RestClient" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.client.RestClient" - parent: "signalwire.rest.client" - module: "rest.client" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/client.py" ---- -# `RestClient` - -REST client for the SignalWire platform APIs. - -> \[!NOTE] -> client = RestClient( -> project="your-project-id", -> token="your-api-token", -> host="your-space.signalwire.com", -> ) -> -> # Or use environment variables: -> -> # SIGNALWIRE\_PROJECT\_ID, SIGNALWIRE\_API\_TOKEN, SIGNALWIRE\_SPACE -> -> client = RestClient() -> -> # Use namespaced resources -> -> client.fabric.ai\_agents.list() -> client.calling.play(call\_id, play=\[...]) -> client.phone\_numbers.search(area\_code="512") -> client.video.rooms.create(name="standup") -> client.compat.calls.list() - -## Signature - -```python -class RestClient -``` - -## Examples - -```python -# Or use environment variables: -# SIGNALWIRE_PROJECT_ID, SIGNALWIRE_API_TOKEN, SIGNALWIRE_SPACE -client = RestClient() - -# Use namespaced resources -client.fabric.ai_agents.list() -client.calling.play(call_id, play=[...]) -client.phone_numbers.search(area_code="512") -client.video.rooms.create(name="standup") -client.compat.calls.list() -``` - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(project = None, token = None, host = None) -``` - -#### Parameters - - - - - - - -#### Source - -[`signalwire/signalwire/rest/client.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/client.py) - -Line 61. - -## Source - -[`signalwire/signalwire/rest/client.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/client.py) - -Line 39. diff --git a/fern/products/sdk-reference/python/rest/imported-numbers/imported-numbers-resource/index.mdx b/fern/products/sdk-reference/python/rest/imported-numbers/imported-numbers-resource/index.mdx deleted file mode 100644 index c663d7a136..0000000000 --- a/fern/products/sdk-reference/python/rest/imported-numbers/imported-numbers-resource/index.mdx +++ /dev/null @@ -1,73 +0,0 @@ ---- -slug: "/reference/python/rest/imported-numbers/imported-numbers-resource" -title: "ImportedNumbersResource" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.imported_numbers.ImportedNumbersResource" - parent: "signalwire.rest.namespaces.imported_numbers" - module: "rest.imported_numbers" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/imported_numbers.py" ---- -# `ImportedNumbersResource` - -Import externally-hosted phone numbers. - -## Signature - -```python -class ImportedNumbersResource(BaseResource) -``` - -## Inheritance - -**Extends:** `BaseResource` - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(http) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/imported_numbers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/imported_numbers.py) - -Line 20. - -*** - -### create - -#### Signature - -```python -create(**kwargs = {}) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/imported_numbers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/imported_numbers.py) - -Line 23. - -## Source - -[`signalwire/signalwire/rest/namespaces/imported_numbers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/imported_numbers.py) - -Line 17. diff --git a/fern/products/sdk-reference/python/rest/imported-numbers/index.mdx b/fern/products/sdk-reference/python/rest/imported-numbers/index.mdx index 9ba2c4a183..c6f6a389dc 100644 --- a/fern/products/sdk-reference/python/rest/imported-numbers/index.mdx +++ b/fern/products/sdk-reference/python/rest/imported-numbers/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.rest.namespaces.imported_numbers" parent: "signalwire.rest" @@ -14,27 +14,60 @@ lustri: --- # `imported_numbers` -Copyright (c) 2025 SignalWire +Import externally-hosted phone numbers. -This file is part of the SignalWire SDK. +## Signature -Licensed under the MIT License. -See LICENSE file in the project root for full license information. +```python +class ImportedNumbersResource(BaseResource) +``` -## Signature +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### \_\_init\_\_ + +#### Signature ```python -module imported_numbers +__init__(http) ``` -## Classes +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/imported_numbers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/imported_numbers.py) + +Line 20. - - - Import externally-hosted phone numbers. - - +*** + +### create + +#### Signature + +```python +create(**kwargs = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/imported_numbers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/imported_numbers.py) + +Line 23. ## Source [`signalwire/signalwire/rest/namespaces/imported_numbers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/imported_numbers.py) + +Line 17. diff --git a/fern/products/sdk-reference/python/rest/index.mdx b/fern/products/sdk-reference/python/rest/index.mdx index b034310d4b..f4cfcc788c 100644 --- a/fern/products/sdk-reference/python/rest/index.mdx +++ b/fern/products/sdk-reference/python/rest/index.mdx @@ -29,94 +29,98 @@ module rest -## Modules +## Classes - Copyright (c) 2025 SignalWire + Address management (no update endpoint). - Copyright (c) 2025 SignalWire + `call_handler` values for `phone_numbers.update`. - Copyright (c) 2025 SignalWire + REST call control — all 37 commands dispatched via single POST endpoint. - Copyright (c) 2025 SignalWire + Chat token generation. - Copyright (c) 2025 SignalWire + REST client for the SignalWire platform APIs. - - Copyright (c) 2025 SignalWire + + Import externally-hosted phone numbers. - - Copyright (c) 2025 SignalWire + + Phone number lookup (carrier, CNAM). - - Copyright (c) 2025 SignalWire + + Multi-factor authentication via SMS or phone call. - - Copyright (c) 2025 SignalWire + + Number group management with membership operations. - - Copyright (c) 2025 SignalWire + + Phone number management. - - Copyright (c) 2025 SignalWire + + PubSub token generation. - - Copyright (c) 2025 SignalWire + + Queue management with member operations. - - Copyright (c) 2025 SignalWire + + Recording management (read-only + delete). - - Copyright (c) 2025 SignalWire + + Short code management (read + update only). - - Copyright (c) 2025 SignalWire + + Project SIP profile (singleton resource). - - Copyright (c) 2025 SignalWire + + Verified caller ID management with verification flow. + - +## Modules + + + Copyright (c) 2025 SignalWire - + Copyright (c) 2025 SignalWire - + Copyright (c) 2025 SignalWire - + Copyright (c) 2025 SignalWire - + Copyright (c) 2025 SignalWire - + Copyright (c) 2025 SignalWire diff --git a/fern/products/sdk-reference/python/rest/lookup/index.mdx b/fern/products/sdk-reference/python/rest/lookup/index.mdx index af7bb66907..15da1fdf67 100644 --- a/fern/products/sdk-reference/python/rest/lookup/index.mdx +++ b/fern/products/sdk-reference/python/rest/lookup/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.rest.namespaces.lookup" parent: "signalwire.rest" @@ -14,27 +14,62 @@ lustri: --- # `lookup` -Copyright (c) 2025 SignalWire +Phone number lookup (carrier, CNAM). -This file is part of the SignalWire SDK. +## Signature -Licensed under the MIT License. -See LICENSE file in the project root for full license information. +```python +class LookupResource(BaseResource) +``` -## Signature +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(http) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/lookup.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/lookup.py) + +Line 20. + +*** + +### phone\_number + +#### Signature ```python -module lookup +phone_number(e164, **params = {}) ``` -## Classes +#### Parameters - - - Phone number lookup (carrier, CNAM). - - + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/lookup.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/lookup.py) + +Line 23. ## Source [`signalwire/signalwire/rest/namespaces/lookup.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/lookup.py) + +Line 17. diff --git a/fern/products/sdk-reference/python/rest/lookup/lookup-resource/index.mdx b/fern/products/sdk-reference/python/rest/lookup/lookup-resource/index.mdx deleted file mode 100644 index 378d9457a9..0000000000 --- a/fern/products/sdk-reference/python/rest/lookup/lookup-resource/index.mdx +++ /dev/null @@ -1,75 +0,0 @@ ---- -slug: "/reference/python/rest/lookup/lookup-resource" -title: "LookupResource" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.lookup.LookupResource" - parent: "signalwire.rest.namespaces.lookup" - module: "rest.lookup" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/lookup.py" ---- -# `LookupResource` - -Phone number lookup (carrier, CNAM). - -## Signature - -```python -class LookupResource(BaseResource) -``` - -## Inheritance - -**Extends:** `BaseResource` - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(http) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/lookup.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/lookup.py) - -Line 20. - -*** - -### phone\_number - -#### Signature - -```python -phone_number(e164, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/lookup.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/lookup.py) - -Line 23. - -## Source - -[`signalwire/signalwire/rest/namespaces/lookup.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/lookup.py) - -Line 17. diff --git a/fern/products/sdk-reference/python/rest/mfa/index.mdx b/fern/products/sdk-reference/python/rest/mfa/index.mdx index 56a398f5f6..addef47c83 100644 --- a/fern/products/sdk-reference/python/rest/mfa/index.mdx +++ b/fern/products/sdk-reference/python/rest/mfa/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.rest.namespaces.mfa" parent: "signalwire.rest" @@ -14,27 +14,102 @@ lustri: --- # `mfa` -Copyright (c) 2025 SignalWire +Multi-factor authentication via SMS or phone call. -This file is part of the SignalWire SDK. +## Signature -Licensed under the MIT License. -See LICENSE file in the project root for full license information. +```python +class MfaResource(BaseResource) +``` -## Signature +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(http) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/mfa.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/mfa.py) + +Line 20. + +*** + +### call + +#### Signature + +```python +call(**kwargs = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/mfa.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/mfa.py) + +Line 26. + +*** + +### sms + +#### Signature ```python -module mfa +sms(**kwargs = {}) ``` -## Classes +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/mfa.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/mfa.py) + +Line 23. + +*** - - - Multi-factor authentication via SMS or phone call. - - +### verify + +#### Signature + +```python +verify(request_id, **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/mfa.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/mfa.py) + +Line 29. ## Source [`signalwire/signalwire/rest/namespaces/mfa.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/mfa.py) + +Line 17. diff --git a/fern/products/sdk-reference/python/rest/mfa/mfa-resource/index.mdx b/fern/products/sdk-reference/python/rest/mfa/mfa-resource/index.mdx deleted file mode 100644 index b15d16fbaf..0000000000 --- a/fern/products/sdk-reference/python/rest/mfa/mfa-resource/index.mdx +++ /dev/null @@ -1,115 +0,0 @@ ---- -slug: "/reference/python/rest/mfa/mfa-resource" -title: "MfaResource" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.mfa.MfaResource" - parent: "signalwire.rest.namespaces.mfa" - module: "rest.mfa" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/mfa.py" ---- -# `MfaResource` - -Multi-factor authentication via SMS or phone call. - -## Signature - -```python -class MfaResource(BaseResource) -``` - -## Inheritance - -**Extends:** `BaseResource` - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(http) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/mfa.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/mfa.py) - -Line 20. - -*** - -### call - -#### Signature - -```python -call(**kwargs = {}) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/mfa.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/mfa.py) - -Line 26. - -*** - -### sms - -#### Signature - -```python -sms(**kwargs = {}) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/mfa.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/mfa.py) - -Line 23. - -*** - -### verify - -#### Signature - -```python -verify(request_id, **kwargs = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/mfa.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/mfa.py) - -Line 29. - -## Source - -[`signalwire/signalwire/rest/namespaces/mfa.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/mfa.py) - -Line 17. diff --git a/fern/products/sdk-reference/python/rest/number-groups/index.mdx b/fern/products/sdk-reference/python/rest/number-groups/index.mdx index 2eb3268e50..7150d9808b 100644 --- a/fern/products/sdk-reference/python/rest/number-groups/index.mdx +++ b/fern/products/sdk-reference/python/rest/number-groups/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.rest.namespaces.number_groups" parent: "signalwire.rest" @@ -14,27 +14,124 @@ lustri: --- # `number_groups` -Copyright (c) 2025 SignalWire +Number group management with membership operations. -This file is part of the SignalWire SDK. +## Signature -Licensed under the MIT License. -See LICENSE file in the project root for full license information. +```python +class NumberGroupsResource(CrudResource) +``` -## Signature +## Inheritance + +**Extends:** `CrudResource` + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(http) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/number_groups.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/number_groups.py) + +Line 22. + +*** + +### add\_membership + +#### Signature ```python -module number_groups +add_membership(group_id, **kwargs = {}) ``` -## Classes +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/number_groups.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/number_groups.py) + +Line 31. + +*** + +### delete\_membership + +#### Signature + +```python +delete_membership(membership_id) +``` - - - Number group management with membership operations. - - +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/number_groups.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/number_groups.py) + +Line 40. + +*** + +### get\_membership + +#### Signature + +```python +get_membership(membership_id) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/number_groups.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/number_groups.py) + +Line 37. + +*** + +### list\_memberships + +#### Signature + +```python +list_memberships(group_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/number_groups.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/number_groups.py) + +Line 25. ## Source [`signalwire/signalwire/rest/namespaces/number_groups.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/number_groups.py) + +Line 17. diff --git a/fern/products/sdk-reference/python/rest/number-groups/number-groups-resource/index.mdx b/fern/products/sdk-reference/python/rest/number-groups/number-groups-resource/index.mdx deleted file mode 100644 index 9477f1eedd..0000000000 --- a/fern/products/sdk-reference/python/rest/number-groups/number-groups-resource/index.mdx +++ /dev/null @@ -1,137 +0,0 @@ ---- -slug: "/reference/python/rest/number-groups/number-groups-resource" -title: "NumberGroupsResource" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.number_groups.NumberGroupsResource" - parent: "signalwire.rest.namespaces.number_groups" - module: "rest.number_groups" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/number_groups.py" ---- -# `NumberGroupsResource` - -Number group management with membership operations. - -## Signature - -```python -class NumberGroupsResource(CrudResource) -``` - -## Inheritance - -**Extends:** `CrudResource` - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(http) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/number_groups.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/number_groups.py) - -Line 22. - -*** - -### add\_membership - -#### Signature - -```python -add_membership(group_id, **kwargs = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/number_groups.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/number_groups.py) - -Line 31. - -*** - -### delete\_membership - -#### Signature - -```python -delete_membership(membership_id) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/number_groups.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/number_groups.py) - -Line 40. - -*** - -### get\_membership - -#### Signature - -```python -get_membership(membership_id) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/number_groups.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/number_groups.py) - -Line 37. - -*** - -### list\_memberships - -#### Signature - -```python -list_memberships(group_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/number_groups.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/number_groups.py) - -Line 25. - -## Source - -[`signalwire/signalwire/rest/namespaces/number_groups.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/number_groups.py) - -Line 17. diff --git a/fern/products/sdk-reference/python/rest/phone-numbers/index.mdx b/fern/products/sdk-reference/python/rest/phone-numbers/index.mdx index 386d5e8a34..101bb3847e 100644 --- a/fern/products/sdk-reference/python/rest/phone-numbers/index.mdx +++ b/fern/products/sdk-reference/python/rest/phone-numbers/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.rest.namespaces.phone_numbers" parent: "signalwire.rest" @@ -14,27 +14,317 @@ lustri: --- # `phone_numbers` -Copyright (c) 2025 SignalWire +Phone number management. -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. +Supports the standard CRUD surface plus typed helpers for binding an +inbound call to a handler (SWML webhook, cXML webhook, AI agent, call +flow, RELAY application/topic). The binding model is: set +`call_handler` + the handler-specific companion field on the phone +number; the server auto-materializes the matching Fabric resource. +See :mod:`signalwire.rest.call_handler` for the enum, and the +porting-sdk's `phone-binding.md` for the full model. ## Signature ```python -module phone_numbers +class PhoneNumbersResource(CrudResource) +``` + +## Inheritance + +**Extends:** `CrudResource` + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(http) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/phone_numbers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/phone_numbers.py) + +Line 34. + +*** + +### search + +#### Signature + +```python +search(**params = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/phone_numbers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/phone_numbers.py) + +Line 37. + +*** + +### set\_ai\_agent + +Route inbound calls to an AI Agent Fabric resource by ID. + +#### Signature + +```python +set_ai_agent(resource_id: str, agent_id: str, **extra = {}) -> dict +``` + +#### Parameters + + + + + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/rest/namespaces/phone_numbers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/phone_numbers.py) + +Line 95. + +*** + +### set\_call\_flow + +Route inbound calls to a Call Flow by ID. + +`version` accepts `"working_copy"` or `"current_deployed"` +(server default when omitted). + +#### Signature + +```python +set_call_flow( + resource_id: str, + flow_id: str, + version: Optional[str] = None, + **extra = {} +) -> dict +``` + +#### Parameters + + + + + + + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/rest/namespaces/phone_numbers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/phone_numbers.py) + +Line 104. + +*** + +### set\_cxml\_application + +Route inbound calls to an existing cXML application by ID. + +#### Signature + +```python +set_cxml_application( + resource_id: str, + application_id: str, + **extra = {} +) -> dict +``` + +#### Parameters + + + + + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/rest/namespaces/phone_numbers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/phone_numbers.py) + +Line 86. + +*** + +### set\_cxml\_webhook + +Route inbound calls to a cXML (Twilio-compat / LAML) webhook. + +Despite the wire value `laml_webhooks` being plural, this creates +a single `cxml_webhook` Fabric resource. `fallback_url` is used +when the primary URL fails; `status_callback_url` receives call +status updates. + +#### Signature + +```python +set_cxml_webhook( + resource_id: str, + url: str, + fallback_url: Optional[str] = None, + status_callback_url: Optional[str] = None, + **extra = {} +) -> dict +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/rest/namespaces/phone_numbers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/phone_numbers.py) + +Line 60. + +*** + +### set\_relay\_application + +Route inbound calls to a named RELAY application. + +#### Signature + +```python +set_relay_application(resource_id: str, name: str, **extra = {}) -> dict +``` + +#### Parameters + + + + + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/rest/namespaces/phone_numbers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/phone_numbers.py) + +Line 125. + +*** + +### set\_relay\_topic + +Route inbound calls to a RELAY topic (client subscription). + +#### Signature + +```python +set_relay_topic( + resource_id: str, + topic: str, + status_callback_url: Optional[str] = None, + **extra = {} +) -> dict +``` + +#### Parameters + + + + + + + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/rest/namespaces/phone_numbers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/phone_numbers.py) + +Line 134. + +*** + +### set\_swml\_webhook + +Route inbound calls to an SWML webhook URL. + +Your backend returns an SWML document per call. The server +auto-creates a `swml_webhook` Fabric resource keyed off this URL. + +#### Signature + +```python +set_swml_webhook(resource_id: str, url: str, **extra = {}) -> dict ``` -## Classes +#### Parameters - - - Phone number management. - - + + + + + + +#### Returns + +`dict` + +#### Source + +[`signalwire/signalwire/rest/namespaces/phone_numbers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/phone_numbers.py) + +Line 47. ## Source [`signalwire/signalwire/rest/namespaces/phone_numbers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/phone_numbers.py) + +Line 20. diff --git a/fern/products/sdk-reference/python/rest/phone-numbers/phone-numbers-resource/index.mdx b/fern/products/sdk-reference/python/rest/phone-numbers/phone-numbers-resource/index.mdx deleted file mode 100644 index 9e1907331f..0000000000 --- a/fern/products/sdk-reference/python/rest/phone-numbers/phone-numbers-resource/index.mdx +++ /dev/null @@ -1,330 +0,0 @@ ---- -slug: "/reference/python/rest/phone-numbers/phone-numbers-resource" -title: "PhoneNumbersResource" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.phone_numbers.PhoneNumbersResource" - parent: "signalwire.rest.namespaces.phone_numbers" - module: "rest.phone_numbers" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/phone_numbers.py" ---- -# `PhoneNumbersResource` - -Phone number management. - -Supports the standard CRUD surface plus typed helpers for binding an -inbound call to a handler (SWML webhook, cXML webhook, AI agent, call -flow, RELAY application/topic). The binding model is: set -`call_handler` + the handler-specific companion field on the phone -number; the server auto-materializes the matching Fabric resource. -See :mod:`signalwire.rest.call_handler` for the enum, and the -porting-sdk's `phone-binding.md` for the full model. - -## Signature - -```python -class PhoneNumbersResource(CrudResource) -``` - -## Inheritance - -**Extends:** `CrudResource` - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(http) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/phone_numbers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/phone_numbers.py) - -Line 34. - -*** - -### search - -#### Signature - -```python -search(**params = {}) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/phone_numbers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/phone_numbers.py) - -Line 37. - -*** - -### set\_ai\_agent - -Route inbound calls to an AI Agent Fabric resource by ID. - -#### Signature - -```python -set_ai_agent(resource_id: str, agent_id: str, **extra = {}) -> dict -``` - -#### Parameters - - - - - - - -#### Returns - -`dict` - -#### Source - -[`signalwire/signalwire/rest/namespaces/phone_numbers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/phone_numbers.py) - -Line 95. - -*** - -### set\_call\_flow - -Route inbound calls to a Call Flow by ID. - -`version` accepts `"working_copy"` or `"current_deployed"` -(server default when omitted). - -#### Signature - -```python -set_call_flow( - resource_id: str, - flow_id: str, - version: Optional[str] = None, - **extra = {} -) -> dict -``` - -#### Parameters - - - - - - - - - -#### Returns - -`dict` - -#### Source - -[`signalwire/signalwire/rest/namespaces/phone_numbers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/phone_numbers.py) - -Line 104. - -*** - -### set\_cxml\_application - -Route inbound calls to an existing cXML application by ID. - -#### Signature - -```python -set_cxml_application( - resource_id: str, - application_id: str, - **extra = {} -) -> dict -``` - -#### Parameters - - - - - - - -#### Returns - -`dict` - -#### Source - -[`signalwire/signalwire/rest/namespaces/phone_numbers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/phone_numbers.py) - -Line 86. - -*** - -### set\_cxml\_webhook - -Route inbound calls to a cXML (Twilio-compat / LAML) webhook. - -Despite the wire value `laml_webhooks` being plural, this creates -a single `cxml_webhook` Fabric resource. `fallback_url` is used -when the primary URL fails; `status_callback_url` receives call -status updates. - -#### Signature - -```python -set_cxml_webhook( - resource_id: str, - url: str, - fallback_url: Optional[str] = None, - status_callback_url: Optional[str] = None, - **extra = {} -) -> dict -``` - -#### Parameters - - - - - - - - - - - -#### Returns - -`dict` - -#### Source - -[`signalwire/signalwire/rest/namespaces/phone_numbers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/phone_numbers.py) - -Line 60. - -*** - -### set\_relay\_application - -Route inbound calls to a named RELAY application. - -#### Signature - -```python -set_relay_application(resource_id: str, name: str, **extra = {}) -> dict -``` - -#### Parameters - - - - - - - -#### Returns - -`dict` - -#### Source - -[`signalwire/signalwire/rest/namespaces/phone_numbers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/phone_numbers.py) - -Line 125. - -*** - -### set\_relay\_topic - -Route inbound calls to a RELAY topic (client subscription). - -#### Signature - -```python -set_relay_topic( - resource_id: str, - topic: str, - status_callback_url: Optional[str] = None, - **extra = {} -) -> dict -``` - -#### Parameters - - - - - - - - - -#### Returns - -`dict` - -#### Source - -[`signalwire/signalwire/rest/namespaces/phone_numbers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/phone_numbers.py) - -Line 134. - -*** - -### set\_swml\_webhook - -Route inbound calls to an SWML webhook URL. - -Your backend returns an SWML document per call. The server -auto-creates a `swml_webhook` Fabric resource keyed off this URL. - -#### Signature - -```python -set_swml_webhook(resource_id: str, url: str, **extra = {}) -> dict -``` - -#### Parameters - - - - - - - -#### Returns - -`dict` - -#### Source - -[`signalwire/signalwire/rest/namespaces/phone_numbers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/phone_numbers.py) - -Line 47. - -## Source - -[`signalwire/signalwire/rest/namespaces/phone_numbers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/phone_numbers.py) - -Line 20. diff --git a/fern/products/sdk-reference/python/rest/pubsub/index.mdx b/fern/products/sdk-reference/python/rest/pubsub/index.mdx index d6435aaa9e..2d41a8813e 100644 --- a/fern/products/sdk-reference/python/rest/pubsub/index.mdx +++ b/fern/products/sdk-reference/python/rest/pubsub/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.rest.namespaces.pubsub" parent: "signalwire.rest" @@ -14,27 +14,60 @@ lustri: --- # `pubsub` -Copyright (c) 2025 SignalWire +PubSub token generation. -This file is part of the SignalWire SDK. +## Signature -Licensed under the MIT License. -See LICENSE file in the project root for full license information. +```python +class PubSubResource(BaseResource) +``` -## Signature +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### \_\_init\_\_ + +#### Signature ```python -module pubsub +__init__(http) ``` -## Classes +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/pubsub.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/pubsub.py) + +Line 20. - - - PubSub token generation. - - +*** + +### create\_token + +#### Signature + +```python +create_token(**kwargs = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/pubsub.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/pubsub.py) + +Line 23. ## Source [`signalwire/signalwire/rest/namespaces/pubsub.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/pubsub.py) + +Line 17. diff --git a/fern/products/sdk-reference/python/rest/pubsub/pub-sub-resource/index.mdx b/fern/products/sdk-reference/python/rest/pubsub/pub-sub-resource/index.mdx deleted file mode 100644 index 2509a5b6ba..0000000000 --- a/fern/products/sdk-reference/python/rest/pubsub/pub-sub-resource/index.mdx +++ /dev/null @@ -1,73 +0,0 @@ ---- -slug: "/reference/python/rest/pubsub/pub-sub-resource" -title: "PubSubResource" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.pubsub.PubSubResource" - parent: "signalwire.rest.namespaces.pubsub" - module: "rest.pubsub" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/pubsub.py" ---- -# `PubSubResource` - -PubSub token generation. - -## Signature - -```python -class PubSubResource(BaseResource) -``` - -## Inheritance - -**Extends:** `BaseResource` - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(http) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/pubsub.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/pubsub.py) - -Line 20. - -*** - -### create\_token - -#### Signature - -```python -create_token(**kwargs = {}) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/pubsub.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/pubsub.py) - -Line 23. - -## Source - -[`signalwire/signalwire/rest/namespaces/pubsub.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/pubsub.py) - -Line 17. diff --git a/fern/products/sdk-reference/python/rest/queues/index.mdx b/fern/products/sdk-reference/python/rest/queues/index.mdx index 86ae968840..a382b9c664 100644 --- a/fern/products/sdk-reference/python/rest/queues/index.mdx +++ b/fern/products/sdk-reference/python/rest/queues/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.rest.namespaces.queues" parent: "signalwire.rest" @@ -14,27 +14,104 @@ lustri: --- # `queues` -Copyright (c) 2025 SignalWire +Queue management with member operations. -This file is part of the SignalWire SDK. +## Signature -Licensed under the MIT License. -See LICENSE file in the project root for full license information. +```python +class QueuesResource(CrudResource) +``` -## Signature +## Inheritance + +**Extends:** `CrudResource` + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(http) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/queues.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/queues.py) + +Line 22. + +*** + +### get\_member + +#### Signature ```python -module queues +get_member(queue_id, member_id) ``` -## Classes +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/queues.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/queues.py) + +Line 31. - - - Queue management with member operations. - - +*** + +### get\_next\_member + +#### Signature + +```python +get_next_member(queue_id) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/queues.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/queues.py) + +Line 28. + +*** + +### list\_members + +#### Signature + +```python +list_members(queue_id, **params = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/queues.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/queues.py) + +Line 25. ## Source [`signalwire/signalwire/rest/namespaces/queues.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/queues.py) + +Line 17. diff --git a/fern/products/sdk-reference/python/rest/queues/queues-resource/index.mdx b/fern/products/sdk-reference/python/rest/queues/queues-resource/index.mdx deleted file mode 100644 index dec356efc5..0000000000 --- a/fern/products/sdk-reference/python/rest/queues/queues-resource/index.mdx +++ /dev/null @@ -1,117 +0,0 @@ ---- -slug: "/reference/python/rest/queues/queues-resource" -title: "QueuesResource" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.queues.QueuesResource" - parent: "signalwire.rest.namespaces.queues" - module: "rest.queues" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/queues.py" ---- -# `QueuesResource` - -Queue management with member operations. - -## Signature - -```python -class QueuesResource(CrudResource) -``` - -## Inheritance - -**Extends:** `CrudResource` - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(http) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/queues.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/queues.py) - -Line 22. - -*** - -### get\_member - -#### Signature - -```python -get_member(queue_id, member_id) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/queues.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/queues.py) - -Line 31. - -*** - -### get\_next\_member - -#### Signature - -```python -get_next_member(queue_id) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/queues.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/queues.py) - -Line 28. - -*** - -### list\_members - -#### Signature - -```python -list_members(queue_id, **params = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/queues.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/queues.py) - -Line 25. - -## Source - -[`signalwire/signalwire/rest/namespaces/queues.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/queues.py) - -Line 17. diff --git a/fern/products/sdk-reference/python/rest/recordings/index.mdx b/fern/products/sdk-reference/python/rest/recordings/index.mdx index 6dafde9f1a..e0451f7cd0 100644 --- a/fern/products/sdk-reference/python/rest/recordings/index.mdx +++ b/fern/products/sdk-reference/python/rest/recordings/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.rest.namespaces.recordings" parent: "signalwire.rest" @@ -14,27 +14,100 @@ lustri: --- # `recordings` -Copyright (c) 2025 SignalWire +Recording management (read-only + delete). -This file is part of the SignalWire SDK. +## Signature -Licensed under the MIT License. -See LICENSE file in the project root for full license information. +```python +class RecordingsResource(BaseResource) +``` -## Signature +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### \_\_init\_\_ + +#### Signature ```python -module recordings +__init__(http) ``` -## Classes +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/recordings.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/recordings.py) + +Line 20. + +*** + +### delete + +#### Signature + +```python +delete(recording_id) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/recordings.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/recordings.py) + +Line 29. - - - Recording management (read-only + delete). - - +*** + +### get + +#### Signature + +```python +get(recording_id) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/recordings.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/recordings.py) + +Line 26. + +*** + +### list + +#### Signature + +```python +list(**params = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/recordings.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/recordings.py) + +Line 23. ## Source [`signalwire/signalwire/rest/namespaces/recordings.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/recordings.py) + +Line 17. diff --git a/fern/products/sdk-reference/python/rest/recordings/recordings-resource/index.mdx b/fern/products/sdk-reference/python/rest/recordings/recordings-resource/index.mdx deleted file mode 100644 index 6c25c5a9db..0000000000 --- a/fern/products/sdk-reference/python/rest/recordings/recordings-resource/index.mdx +++ /dev/null @@ -1,113 +0,0 @@ ---- -slug: "/reference/python/rest/recordings/recordings-resource" -title: "RecordingsResource" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.recordings.RecordingsResource" - parent: "signalwire.rest.namespaces.recordings" - module: "rest.recordings" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/recordings.py" ---- -# `RecordingsResource` - -Recording management (read-only + delete). - -## Signature - -```python -class RecordingsResource(BaseResource) -``` - -## Inheritance - -**Extends:** `BaseResource` - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(http) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/recordings.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/recordings.py) - -Line 20. - -*** - -### delete - -#### Signature - -```python -delete(recording_id) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/recordings.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/recordings.py) - -Line 29. - -*** - -### get - -#### Signature - -```python -get(recording_id) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/recordings.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/recordings.py) - -Line 26. - -*** - -### list - -#### Signature - -```python -list(**params = {}) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/recordings.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/recordings.py) - -Line 23. - -## Source - -[`signalwire/signalwire/rest/namespaces/recordings.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/recordings.py) - -Line 17. diff --git a/fern/products/sdk-reference/python/rest/short-codes/index.mdx b/fern/products/sdk-reference/python/rest/short-codes/index.mdx index 441d5b3847..0255e109f6 100644 --- a/fern/products/sdk-reference/python/rest/short-codes/index.mdx +++ b/fern/products/sdk-reference/python/rest/short-codes/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.rest.namespaces.short_codes" parent: "signalwire.rest" @@ -14,27 +14,102 @@ lustri: --- # `short_codes` -Copyright (c) 2025 SignalWire +Short code management (read + update only). -This file is part of the SignalWire SDK. +## Signature -Licensed under the MIT License. -See LICENSE file in the project root for full license information. +```python +class ShortCodesResource(BaseResource) +``` -## Signature +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(http) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/short_codes.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/short_codes.py) + +Line 20. + +*** + +### get + +#### Signature + +```python +get(short_code_id) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/short_codes.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/short_codes.py) + +Line 26. + +*** + +### list + +#### Signature ```python -module short_codes +list(**params = {}) ``` -## Classes +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/short_codes.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/short_codes.py) + +Line 23. + +*** - - - Short code management (read + update only). - - +### update + +#### Signature + +```python +update(short_code_id, **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/short_codes.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/short_codes.py) + +Line 29. ## Source [`signalwire/signalwire/rest/namespaces/short_codes.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/short_codes.py) + +Line 17. diff --git a/fern/products/sdk-reference/python/rest/short-codes/short-codes-resource/index.mdx b/fern/products/sdk-reference/python/rest/short-codes/short-codes-resource/index.mdx deleted file mode 100644 index 2765935851..0000000000 --- a/fern/products/sdk-reference/python/rest/short-codes/short-codes-resource/index.mdx +++ /dev/null @@ -1,115 +0,0 @@ ---- -slug: "/reference/python/rest/short-codes/short-codes-resource" -title: "ShortCodesResource" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.short_codes.ShortCodesResource" - parent: "signalwire.rest.namespaces.short_codes" - module: "rest.short_codes" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/short_codes.py" ---- -# `ShortCodesResource` - -Short code management (read + update only). - -## Signature - -```python -class ShortCodesResource(BaseResource) -``` - -## Inheritance - -**Extends:** `BaseResource` - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(http) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/short_codes.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/short_codes.py) - -Line 20. - -*** - -### get - -#### Signature - -```python -get(short_code_id) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/short_codes.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/short_codes.py) - -Line 26. - -*** - -### list - -#### Signature - -```python -list(**params = {}) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/short_codes.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/short_codes.py) - -Line 23. - -*** - -### update - -#### Signature - -```python -update(short_code_id, **kwargs = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/short_codes.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/short_codes.py) - -Line 29. - -## Source - -[`signalwire/signalwire/rest/namespaces/short_codes.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/short_codes.py) - -Line 17. diff --git a/fern/products/sdk-reference/python/rest/sip-profile/index.mdx b/fern/products/sdk-reference/python/rest/sip-profile/index.mdx index 489bb2603a..9ce579f5d8 100644 --- a/fern/products/sdk-reference/python/rest/sip-profile/index.mdx +++ b/fern/products/sdk-reference/python/rest/sip-profile/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.rest.namespaces.sip_profile" parent: "signalwire.rest" @@ -14,27 +14,76 @@ lustri: --- # `sip_profile` -Copyright (c) 2025 SignalWire +Project SIP profile (singleton resource). -This file is part of the SignalWire SDK. +## Signature -Licensed under the MIT License. -See LICENSE file in the project root for full license information. +```python +class SipProfileResource(BaseResource) +``` -## Signature +## Inheritance + +**Extends:** `BaseResource` + +## Methods + +### \_\_init\_\_ + +#### Signature ```python -module sip_profile +__init__(http) ``` -## Classes +#### Parameters + + - - - Project SIP profile (singleton resource). - - +#### Source + +[`signalwire/signalwire/rest/namespaces/sip_profile.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/sip_profile.py) + +Line 20. + +*** + +### get + +#### Signature + +```python +get() +``` + +#### Source + +[`signalwire/signalwire/rest/namespaces/sip_profile.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/sip_profile.py) + +Line 23. + +*** + +### update + +#### Signature + +```python +update(**kwargs = {}) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/sip_profile.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/sip_profile.py) + +Line 26. ## Source [`signalwire/signalwire/rest/namespaces/sip_profile.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/sip_profile.py) + +Line 17. diff --git a/fern/products/sdk-reference/python/rest/sip-profile/sip-profile-resource/index.mdx b/fern/products/sdk-reference/python/rest/sip-profile/sip-profile-resource/index.mdx deleted file mode 100644 index d83026b02c..0000000000 --- a/fern/products/sdk-reference/python/rest/sip-profile/sip-profile-resource/index.mdx +++ /dev/null @@ -1,89 +0,0 @@ ---- -slug: "/reference/python/rest/sip-profile/sip-profile-resource" -title: "SipProfileResource" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.sip_profile.SipProfileResource" - parent: "signalwire.rest.namespaces.sip_profile" - module: "rest.sip_profile" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/sip_profile.py" ---- -# `SipProfileResource` - -Project SIP profile (singleton resource). - -## Signature - -```python -class SipProfileResource(BaseResource) -``` - -## Inheritance - -**Extends:** `BaseResource` - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(http) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/sip_profile.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/sip_profile.py) - -Line 20. - -*** - -### get - -#### Signature - -```python -get() -``` - -#### Source - -[`signalwire/signalwire/rest/namespaces/sip_profile.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/sip_profile.py) - -Line 23. - -*** - -### update - -#### Signature - -```python -update(**kwargs = {}) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/sip_profile.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/sip_profile.py) - -Line 26. - -## Source - -[`signalwire/signalwire/rest/namespaces/sip_profile.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/sip_profile.py) - -Line 17. diff --git a/fern/products/sdk-reference/python/rest/verified-callers/index.mdx b/fern/products/sdk-reference/python/rest/verified-callers/index.mdx index b71268fbb4..049cf8d5e2 100644 --- a/fern/products/sdk-reference/python/rest/verified-callers/index.mdx +++ b/fern/products/sdk-reference/python/rest/verified-callers/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Python SDK" icon: "python" lustri: auto_generated: true - kind: "module" + kind: "class" language: "python" qualified_name: "signalwire.rest.namespaces.verified_callers" parent: "signalwire.rest" @@ -14,27 +14,82 @@ lustri: --- # `verified_callers` -Copyright (c) 2025 SignalWire +Verified caller ID management with verification flow. -This file is part of the SignalWire SDK. +## Signature -Licensed under the MIT License. -See LICENSE file in the project root for full license information. +```python +class VerifiedCallersResource(CrudResource) +``` -## Signature +## Inheritance + +**Extends:** `CrudResource` + +## Methods + +### \_\_init\_\_ + +#### Signature + +```python +__init__(http) +``` + +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/verified_callers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/verified_callers.py) + +Line 22. + +*** + +### redial\_verification + +#### Signature ```python -module verified_callers +redial_verification(caller_id) ``` -## Classes +#### Parameters + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/verified_callers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/verified_callers.py) + +Line 25. + +*** + +### submit\_verification - - - Verified caller ID management with verification flow. - - +#### Signature + +```python +submit_verification(caller_id, **kwargs = {}) +``` + +#### Parameters + + + + + +#### Source + +[`signalwire/signalwire/rest/namespaces/verified_callers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/verified_callers.py) + +Line 28. ## Source [`signalwire/signalwire/rest/namespaces/verified_callers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/verified_callers.py) + +Line 17. diff --git a/fern/products/sdk-reference/python/rest/verified-callers/verified-callers-resource/index.mdx b/fern/products/sdk-reference/python/rest/verified-callers/verified-callers-resource/index.mdx deleted file mode 100644 index 1f0e95d6d3..0000000000 --- a/fern/products/sdk-reference/python/rest/verified-callers/verified-callers-resource/index.mdx +++ /dev/null @@ -1,95 +0,0 @@ ---- -slug: "/reference/python/rest/verified-callers/verified-callers-resource" -title: "VerifiedCallersResource" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "class" - language: "python" - qualified_name: "signalwire.rest.namespaces.verified_callers.VerifiedCallersResource" - parent: "signalwire.rest.namespaces.verified_callers" - module: "rest.verified_callers" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/verified_callers.py" ---- -# `VerifiedCallersResource` - -Verified caller ID management with verification flow. - -## Signature - -```python -class VerifiedCallersResource(CrudResource) -``` - -## Inheritance - -**Extends:** `CrudResource` - -## Methods - -### \_\_init\_\_ - -#### Signature - -```python -__init__(http) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/verified_callers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/verified_callers.py) - -Line 22. - -*** - -### redial\_verification - -#### Signature - -```python -redial_verification(caller_id) -``` - -#### Parameters - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/verified_callers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/verified_callers.py) - -Line 25. - -*** - -### submit\_verification - -#### Signature - -```python -submit_verification(caller_id, **kwargs = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/rest/namespaces/verified_callers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/verified_callers.py) - -Line 28. - -## Source - -[`signalwire/signalwire/rest/namespaces/verified_callers.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/rest/namespaces/verified_callers.py) - -Line 17. diff --git a/fern/products/sdk-reference/ruby/_meta.json b/fern/products/sdk-reference/ruby/_meta.json index d57355e159..31ed89c584 100644 --- a/fern/products/sdk-reference/ruby/_meta.json +++ b/fern/products/sdk-reference/ruby/_meta.json @@ -6,5 +6,5 @@ "format": "mdx", "platform": "fern", "base_slug": "/reference/ruby", - "item_count": 1784 + "item_count": 1778 } \ No newline at end of file diff --git a/fern/products/sdk-reference/ruby/agents/agent-base/agent-body-limit-middleware/index.mdx b/fern/products/sdk-reference/ruby/agents/agent-base/agent-body-limit-middleware/index.mdx index 8f4f13a6cc..7061495988 100644 --- a/fern/products/sdk-reference/ruby/agents/agent-base/agent-body-limit-middleware/index.mdx +++ b/fern/products/sdk-reference/ruby/agents/agent-base/agent-body-limit-middleware/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "ruby" qualified_name: "SignalWire::AgentBase::AgentBodyLimitMiddleware" - parent: "agents.AgentBase" + parent: "SignalWire::AgentBase" module: "agents.AgentBase" source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb" visibility: "public" diff --git a/fern/products/sdk-reference/ruby/agents/agent-base/agent-security-headers-middleware/index.mdx b/fern/products/sdk-reference/ruby/agents/agent-base/agent-security-headers-middleware/index.mdx index 59aa2b084a..26e76122c0 100644 --- a/fern/products/sdk-reference/ruby/agents/agent-base/agent-security-headers-middleware/index.mdx +++ b/fern/products/sdk-reference/ruby/agents/agent-base/agent-security-headers-middleware/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "ruby" qualified_name: "SignalWire::AgentBase::AgentSecurityHeadersMiddleware" - parent: "agents.AgentBase" + parent: "SignalWire::AgentBase" module: "agents.AgentBase" source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb" visibility: "public" diff --git a/fern/products/sdk-reference/ruby/agents/agent-base/agent-timing-safe-basic-auth/index.mdx b/fern/products/sdk-reference/ruby/agents/agent-base/agent-timing-safe-basic-auth/index.mdx index 7c1a96648b..9e2ead0f91 100644 --- a/fern/products/sdk-reference/ruby/agents/agent-base/agent-timing-safe-basic-auth/index.mdx +++ b/fern/products/sdk-reference/ruby/agents/agent-base/agent-timing-safe-basic-auth/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "ruby" qualified_name: "SignalWire::AgentBase::AgentTimingSafeBasicAuth" - parent: "agents.AgentBase" + parent: "SignalWire::AgentBase" module: "agents.AgentBase" source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/agent/agent_base.rb" visibility: "public" diff --git a/fern/products/sdk-reference/ruby/agents/agent-base/index.mdx b/fern/products/sdk-reference/ruby/agents/agent-base/index.mdx index c58350044a..dfd8a685ad 100644 --- a/fern/products/sdk-reference/ruby/agents/agent-base/index.mdx +++ b/fern/products/sdk-reference/ruby/agents/agent-base/index.mdx @@ -59,6 +59,18 @@ class AgentBase < SignalWire::SWML::Service The complete set of internal SWAIG function names that accept fillers, matching the SWAIGInternalFiller schema definition. Any name outside this set is silently ignored by the runtime — +set\_internal\_fillers+ and +add\_internal\_filler+ warn if you pass an unknown name. Notable absences: +change\_step+, +gather\_submit+, or arbitrary user-defined SWAIG function names are NOT supported. +## Classes + + + + + + \================================================================== Rack Middleware ================================================================== + + + + + ## Methods ### add\_answer\_verb diff --git a/fern/products/sdk-reference/ruby/agents/agent-base/index__2.mdx b/fern/products/sdk-reference/ruby/agents/agent-base/index__2.mdx deleted file mode 100644 index e7274f008b..0000000000 --- a/fern/products/sdk-reference/ruby/agents/agent-base/index__2.mdx +++ /dev/null @@ -1,26 +0,0 @@ ---- -slug: "/reference/ruby/agents/agent-base/index__2" -title: "AgentBase" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "module" - language: "ruby" - qualified_name: "agents.AgentBase" - parent: "agents" - module: "agents" ---- -# `AgentBase` - -## Classes - - - - - - \================================================================== Rack Middleware ================================================================== - - - - diff --git a/fern/products/sdk-reference/ruby/agents/index.mdx b/fern/products/sdk-reference/ruby/agents/index.mdx index 7b93923a7a..52c45d2c1c 100644 --- a/fern/products/sdk-reference/ruby/agents/index.mdx +++ b/fern/products/sdk-reference/ruby/agents/index.mdx @@ -25,13 +25,15 @@ lustri: Fluent builder for server-side DataMap tools. + + + Adapter that lets an AWS Lambda function invoke a Rack application. + ## Modules - - @@ -42,8 +44,6 @@ lustri: Runtime environment detection. - - diff --git a/fern/products/sdk-reference/ruby/agents/serverless/index.mdx b/fern/products/sdk-reference/ruby/agents/serverless/index.mdx index a8741f72a8..8f5f49e667 100644 --- a/fern/products/sdk-reference/ruby/agents/serverless/index.mdx +++ b/fern/products/sdk-reference/ruby/agents/serverless/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Ruby SDK" icon: "ruby" lustri: auto_generated: true - kind: "module" + kind: "class" language: "ruby" qualified_name: "SignalWire::Serverless" parent: "agents" @@ -15,22 +15,137 @@ lustri: --- # `Serverless` +Adapter that lets an AWS Lambda function invoke a Rack application. + +Typical usage from a Lambda entrypoint file: + +require 'signalwire' + +AGENT = SignalWire::AgentBase.new(name: 'my-agent', route: '/') + +# ...configure AGENT... + +HANDLER = SignalWire::Serverless::LambdaHandler.new(AGENT.rack\_app) + +def handler(event:, context:) +HANDLER.call(event, context) +end + +The adapter accepts events from either Lambda Function URLs / API +Gateway HTTP API (payload format v2) or the classic API Gateway REST +API (payload format v1) and returns a response in the matching +shape. Any triple returned by the Rack app (status, headers, body) +is translated into the +\{statusCode:, headers:, body:\}+ shape +expected by Lambda. + +The adapter never reaches out to the network and has no gem +dependencies beyond what the SignalWire SDK already requires, so it +can be bundled directly into a Lambda zip. + ## Signature ```ruby -module Serverless +class LambdaHandler < Object +``` + +## Inheritance + +**Extends:** `Object` + +## Methods + +### call + +Invoke the wrapped Rack application with a Lambda event. + +#### Signature + +```ruby +def call(event, _context = nil) +``` + +#### Parameters + + + the Lambda invocation event + + + + the Lambda context (ignored) + + +#### Returns + +`Hash` — a Lambda-shaped response hash + +#### Source + +[`lib/signalwire/serverless/lambda_handler.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/serverless/lambda_handler.rb) + +Line 53. + +*** + +### for + +Class-level convenience so consumers can use ++SignalWire::Serverless::LambdaHandler.for(agent)+ without +duplicating +.rack\_app+ at the call site. + +#### Signature + +```ruby +def for(agent_or_app) +``` + +#### Parameters + + + either an AgentBase (responds to +rack\_app+) or any Rack-compatible application + + +#### Returns + +`LambdaHandler` + +#### Source + +[`lib/signalwire/serverless/lambda_handler.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/serverless/lambda_handler.rb) + +Line 71. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(app) ``` -## Classes +#### Parameters + + + a Rack-compatible application + + +#### Returns + +`LambdaHandler` — a new instance of LambdaHandler + +#### Throws + +- `ArgumentError` + +#### Source + +[`lib/signalwire/serverless/lambda_handler.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/serverless/lambda_handler.rb) - - - Adapter that lets an AWS Lambda function invoke a Rack application. - - +Line 42. ## Source [`lib/signalwire/serverless/lambda_handler.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/serverless/lambda_handler.rb) -Line 14. +Line 40. diff --git a/fern/products/sdk-reference/ruby/agents/serverless/lambda-handler/index.mdx b/fern/products/sdk-reference/ruby/agents/serverless/lambda-handler/index.mdx deleted file mode 100644 index 84fcbc8ce6..0000000000 --- a/fern/products/sdk-reference/ruby/agents/serverless/lambda-handler/index.mdx +++ /dev/null @@ -1,151 +0,0 @@ ---- -slug: "/reference/ruby/agents/serverless/lambda-handler" -title: "LambdaHandler" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Serverless::LambdaHandler" - parent: "SignalWire::Serverless" - module: "agents.Serverless" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/serverless/lambda_handler.rb" - visibility: "public" ---- -# `LambdaHandler` - -Adapter that lets an AWS Lambda function invoke a Rack application. - -Typical usage from a Lambda entrypoint file: - -require 'signalwire' - -AGENT = SignalWire::AgentBase.new(name: 'my-agent', route: '/') - -# ...configure AGENT... - -HANDLER = SignalWire::Serverless::LambdaHandler.new(AGENT.rack\_app) - -def handler(event:, context:) -HANDLER.call(event, context) -end - -The adapter accepts events from either Lambda Function URLs / API -Gateway HTTP API (payload format v2) or the classic API Gateway REST -API (payload format v1) and returns a response in the matching -shape. Any triple returned by the Rack app (status, headers, body) -is translated into the +\{statusCode:, headers:, body:\}+ shape -expected by Lambda. - -The adapter never reaches out to the network and has no gem -dependencies beyond what the SignalWire SDK already requires, so it -can be bundled directly into a Lambda zip. - -## Signature - -```ruby -class LambdaHandler < Object -``` - -## Inheritance - -**Extends:** `Object` - -## Methods - -### call - -Invoke the wrapped Rack application with a Lambda event. - -#### Signature - -```ruby -def call(event, _context = nil) -``` - -#### Parameters - - - the Lambda invocation event - - - - the Lambda context (ignored) - - -#### Returns - -`Hash` — a Lambda-shaped response hash - -#### Source - -[`lib/signalwire/serverless/lambda_handler.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/serverless/lambda_handler.rb) - -Line 53. - -*** - -### for - -Class-level convenience so consumers can use -+SignalWire::Serverless::LambdaHandler.for(agent)+ without -duplicating +.rack\_app+ at the call site. - -#### Signature - -```ruby -def for(agent_or_app) -``` - -#### Parameters - - - either an AgentBase (responds to +rack\_app+) or any Rack-compatible application - - -#### Returns - -`LambdaHandler` - -#### Source - -[`lib/signalwire/serverless/lambda_handler.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/serverless/lambda_handler.rb) - -Line 71. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(app) -``` - -#### Parameters - - - a Rack-compatible application - - -#### Returns - -`LambdaHandler` — a new instance of LambdaHandler - -#### Throws - -- `ArgumentError` - -#### Source - -[`lib/signalwire/serverless/lambda_handler.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/serverless/lambda_handler.rb) - -Line 42. - -## Source - -[`lib/signalwire/serverless/lambda_handler.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/serverless/lambda_handler.rb) - -Line 40. diff --git a/fern/products/sdk-reference/ruby/agents/swml/index.mdx b/fern/products/sdk-reference/ruby/agents/swml/index.mdx index a3af54dc85..e1c1a1d38f 100644 --- a/fern/products/sdk-reference/ruby/agents/swml/index.mdx +++ b/fern/products/sdk-reference/ruby/agents/swml/index.mdx @@ -31,12 +31,6 @@ module SWML -## Modules - - - - - ## Methods ### reset\_schema! diff --git a/fern/products/sdk-reference/ruby/agents/swml/service/index.mdx b/fern/products/sdk-reference/ruby/agents/swml/service/index.mdx index b4ad877a47..73eb1188ec 100644 --- a/fern/products/sdk-reference/ruby/agents/swml/service/index.mdx +++ b/fern/products/sdk-reference/ruby/agents/swml/service/index.mdx @@ -31,6 +31,18 @@ class Service < Object Maximum request body size enforced on /swaig and the main route (1 MB). +## Classes + + + + \------------------------------------------------------------------ Middleware: security headers ------------------------------------------------------------------ + + + + \------------------------------------------------------------------ Middleware: timing-safe Basic-Auth ------------------------------------------------------------------ + + + ## Methods ### all\_functions diff --git a/fern/products/sdk-reference/ruby/agents/swml/service/index__2.mdx b/fern/products/sdk-reference/ruby/agents/swml/service/index__2.mdx deleted file mode 100644 index 4d09d11ee4..0000000000 --- a/fern/products/sdk-reference/ruby/agents/swml/service/index__2.mdx +++ /dev/null @@ -1,26 +0,0 @@ ---- -slug: "/reference/ruby/agents/swml/service/index__2" -title: "Service" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "module" - language: "ruby" - qualified_name: "agents.SWML.Service" - parent: "SignalWire::SWML" - module: "agents.SWML" ---- -# `Service` - -## Classes - - - - \------------------------------------------------------------------ Middleware: security headers ------------------------------------------------------------------ - - - - \------------------------------------------------------------------ Middleware: timing-safe Basic-Auth ------------------------------------------------------------------ - - diff --git a/fern/products/sdk-reference/ruby/agents/swml/service/security-headers-middleware/index.mdx b/fern/products/sdk-reference/ruby/agents/swml/service/security-headers-middleware/index.mdx index 6b6161f207..60ce160933 100644 --- a/fern/products/sdk-reference/ruby/agents/swml/service/security-headers-middleware/index.mdx +++ b/fern/products/sdk-reference/ruby/agents/swml/service/security-headers-middleware/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "ruby" qualified_name: "SignalWire::SWML::Service::SecurityHeadersMiddleware" - parent: "agents.SWML.Service" + parent: "SignalWire::SWML::Service" module: "agents.SWML.Service" source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb" visibility: "public" diff --git a/fern/products/sdk-reference/ruby/agents/swml/service/timing-safe-basic-auth/index.mdx b/fern/products/sdk-reference/ruby/agents/swml/service/timing-safe-basic-auth/index.mdx index 8c45b49cd4..bc71ecc776 100644 --- a/fern/products/sdk-reference/ruby/agents/swml/service/timing-safe-basic-auth/index.mdx +++ b/fern/products/sdk-reference/ruby/agents/swml/service/timing-safe-basic-auth/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "ruby" qualified_name: "SignalWire::SWML::Service::TimingSafeBasicAuth" - parent: "agents.SWML.Service" + parent: "SignalWire::SWML::Service" module: "agents.SWML.Service" source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/swml/service.rb" visibility: "public" diff --git a/fern/products/sdk-reference/ruby/core/index.mdx b/fern/products/sdk-reference/ruby/core/index.mdx index d255f517f6..e6b3fd5bd3 100644 --- a/fern/products/sdk-reference/ruby/core/index.mdx +++ b/fern/products/sdk-reference/ruby/core/index.mdx @@ -11,13 +11,19 @@ lustri: --- # `core` +## Classes + + + + \------------------------------------------------------------------- + + + ## Modules - - diff --git a/fern/products/sdk-reference/ruby/core/logging/index.mdx b/fern/products/sdk-reference/ruby/core/logging/index.mdx index 1e2cc73921..bec3a54fd2 100644 --- a/fern/products/sdk-reference/ruby/core/logging/index.mdx +++ b/fern/products/sdk-reference/ruby/core/logging/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Ruby SDK" icon: "ruby" lustri: auto_generated: true - kind: "module" + kind: "class" language: "ruby" qualified_name: "SignalWire::Logging" parent: "core" @@ -15,25 +15,63 @@ lustri: --- # `Logging` +*** + ## Signature ```ruby -module Logging +class Logger < Object ``` +## Inheritance + +**Extends:** `Object` + ## Constants -## Classes +## Methods - - - \------------------------------------------------------------------- - - +### debug -## Methods +#### Signature + +```ruby +def debug(msg) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/logging.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/logging.rb) + +Line 44. + +*** + +### error + +#### Signature + +```ruby +def error(msg) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/logging.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/logging.rb) + +Line 56. + +*** ### global\_level @@ -81,6 +119,50 @@ Line 15. *** +### info + +#### Signature + +```ruby +def info(msg) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/logging.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/logging.rb) + +Line 48. + +*** + +### initialize + +#### Signature + +```ruby +def initialize(name) +``` + +#### Parameters + + + +#### Returns + +`Logger` — a new instance of Logger + +#### Source + +[`lib/signalwire/logging.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/logging.rb) + +Line 39. + +*** + ### logger Convenience factory @@ -103,6 +185,24 @@ Line 31. *** +### name + +Returns the value of attribute name. + +#### Signature + +```ruby +attr_reader name -> Object +``` + +#### Source + +[`lib/signalwire/logging.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/logging.rb) + +Line 37. + +*** + ### reset! #### Signature @@ -137,8 +237,28 @@ def suppressed? Line 26. +*** + +### warn + +#### Signature + +```ruby +def warn(msg) +``` + +#### Parameters + + + +#### Source + +[`lib/signalwire/logging.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/logging.rb) + +Line 52. + ## Source [`lib/signalwire/logging.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/logging.rb) -Line 4. +Line 36. diff --git a/fern/products/sdk-reference/ruby/core/logging/logger/index.mdx b/fern/products/sdk-reference/ruby/core/logging/logger/index.mdx deleted file mode 100644 index de7e72904c..0000000000 --- a/fern/products/sdk-reference/ruby/core/logging/logger/index.mdx +++ /dev/null @@ -1,156 +0,0 @@ ---- -slug: "/reference/ruby/core/logging/logger" -title: "Logger" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "class" - language: "ruby" - qualified_name: "SignalWire::Logging::Logger" - parent: "SignalWire::Logging" - module: "core.Logging" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/logging.rb" - visibility: "public" ---- -# `Logger` - -*** - -## Signature - -```ruby -class Logger < Object -``` - -## Inheritance - -**Extends:** `Object` - -## Methods - -### debug - -#### Signature - -```ruby -def debug(msg) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/logging.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/logging.rb) - -Line 44. - -*** - -### error - -#### Signature - -```ruby -def error(msg) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/logging.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/logging.rb) - -Line 56. - -*** - -### info - -#### Signature - -```ruby -def info(msg) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/logging.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/logging.rb) - -Line 48. - -*** - -### initialize - -#### Signature - -```ruby -def initialize(name) -``` - -#### Parameters - - - -#### Returns - -`Logger` — a new instance of Logger - -#### Source - -[`lib/signalwire/logging.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/logging.rb) - -Line 39. - -*** - -### name - -Returns the value of attribute name. - -#### Signature - -```ruby -attr_reader name -> Object -``` - -#### Source - -[`lib/signalwire/logging.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/logging.rb) - -Line 37. - -*** - -### warn - -#### Signature - -```ruby -def warn(msg) -``` - -#### Parameters - - - -#### Source - -[`lib/signalwire/logging.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/logging.rb) - -Line 52. - -## Source - -[`lib/signalwire/logging.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/logging.rb) - -Line 36. diff --git a/fern/products/sdk-reference/ruby/index.mdx b/fern/products/sdk-reference/ruby/index.mdx index fc9648a4d8..d2b2f24076 100644 --- a/fern/products/sdk-reference/ruby/index.mdx +++ b/fern/products/sdk-reference/ruby/index.mdx @@ -13,8 +13,6 @@ lustri: - [`agents`](/docs/sdk-reference/reference/ruby/agents) - [`core`](/docs/sdk-reference/reference/ruby/core) - [`Relay`](/docs/sdk-reference/reference/ruby/relay) -- [`relay`](/docs/sdk-reference/reference/ruby/relay) - [`REST`](/docs/sdk-reference/reference/ruby/rest) -- [`rest`](/docs/sdk-reference/reference/ruby/rest) - [`SignalWire`](/docs/sdk-reference/reference/ruby/signal-wire) diff --git a/fern/products/sdk-reference/ruby/relay/action-timeout-error/index.mdx b/fern/products/sdk-reference/ruby/relay/action-timeout-error/index.mdx index 46e45cf40b..32c4bddd99 100644 --- a/fern/products/sdk-reference/ruby/relay/action-timeout-error/index.mdx +++ b/fern/products/sdk-reference/ruby/relay/action-timeout-error/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "ruby" qualified_name: "SignalWire::Relay::ActionTimeoutError" - parent: "relay" + parent: "SignalWire::Relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb" visibility: "public" diff --git a/fern/products/sdk-reference/ruby/relay/action/index.mdx b/fern/products/sdk-reference/ruby/relay/action/index.mdx index 7873e96f0e..44ede71161 100644 --- a/fern/products/sdk-reference/ruby/relay/action/index.mdx +++ b/fern/products/sdk-reference/ruby/relay/action/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "ruby" qualified_name: "SignalWire::Relay::Action" - parent: "relay" + parent: "SignalWire::Relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb" visibility: "public" diff --git a/fern/products/sdk-reference/ruby/relay/ai-action/index.mdx b/fern/products/sdk-reference/ruby/relay/ai-action/index.mdx index 73b82f8d6e..71d0a5347b 100644 --- a/fern/products/sdk-reference/ruby/relay/ai-action/index.mdx +++ b/fern/products/sdk-reference/ruby/relay/ai-action/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "ruby" qualified_name: "SignalWire::Relay::AIAction" - parent: "relay" + parent: "SignalWire::Relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb" visibility: "public" diff --git a/fern/products/sdk-reference/ruby/relay/call-receive-event/index.mdx b/fern/products/sdk-reference/ruby/relay/call-receive-event/index.mdx index b06084e164..b253154e40 100644 --- a/fern/products/sdk-reference/ruby/relay/call-receive-event/index.mdx +++ b/fern/products/sdk-reference/ruby/relay/call-receive-event/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "ruby" qualified_name: "SignalWire::Relay::CallReceiveEvent" - parent: "relay" + parent: "SignalWire::Relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" visibility: "public" diff --git a/fern/products/sdk-reference/ruby/relay/call-state-event/index.mdx b/fern/products/sdk-reference/ruby/relay/call-state-event/index.mdx index e487dd5a66..e0b0be4a77 100644 --- a/fern/products/sdk-reference/ruby/relay/call-state-event/index.mdx +++ b/fern/products/sdk-reference/ruby/relay/call-state-event/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "ruby" qualified_name: "SignalWire::Relay::CallStateEvent" - parent: "relay" + parent: "SignalWire::Relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" visibility: "public" diff --git a/fern/products/sdk-reference/ruby/relay/call-state/index.mdx b/fern/products/sdk-reference/ruby/relay/call-state/index.mdx index 0c812d0cf8..f65477e3e3 100644 --- a/fern/products/sdk-reference/ruby/relay/call-state/index.mdx +++ b/fern/products/sdk-reference/ruby/relay/call-state/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "module" language: "ruby" qualified_name: "SignalWire::Relay::CallState" - parent: "relay" + parent: "SignalWire::Relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/constants.rb" visibility: "public" diff --git a/fern/products/sdk-reference/ruby/relay/call/index.mdx b/fern/products/sdk-reference/ruby/relay/call/index.mdx index ea61372d80..92cf9f0aaf 100644 --- a/fern/products/sdk-reference/ruby/relay/call/index.mdx +++ b/fern/products/sdk-reference/ruby/relay/call/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "ruby" qualified_name: "SignalWire::Relay::Call" - parent: "relay" + parent: "SignalWire::Relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/call.rb" visibility: "public" diff --git a/fern/products/sdk-reference/ruby/relay/calling-error-event/index.mdx b/fern/products/sdk-reference/ruby/relay/calling-error-event/index.mdx index 8c70bd2aa7..e4c9abb164 100644 --- a/fern/products/sdk-reference/ruby/relay/calling-error-event/index.mdx +++ b/fern/products/sdk-reference/ruby/relay/calling-error-event/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "ruby" qualified_name: "SignalWire::Relay::CallingErrorEvent" - parent: "relay" + parent: "SignalWire::Relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" visibility: "public" diff --git a/fern/products/sdk-reference/ruby/relay/client/index.mdx b/fern/products/sdk-reference/ruby/relay/client/index.mdx index bea12fe97b..90c28d47ad 100644 --- a/fern/products/sdk-reference/ruby/relay/client/index.mdx +++ b/fern/products/sdk-reference/ruby/relay/client/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "ruby" qualified_name: "SignalWire::Relay::Client" - parent: "relay" + parent: "SignalWire::Relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb" visibility: "public" diff --git a/fern/products/sdk-reference/ruby/relay/collect-action/index.mdx b/fern/products/sdk-reference/ruby/relay/collect-action/index.mdx index bcfc76f1d4..b5ac39d618 100644 --- a/fern/products/sdk-reference/ruby/relay/collect-action/index.mdx +++ b/fern/products/sdk-reference/ruby/relay/collect-action/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "ruby" qualified_name: "SignalWire::Relay::CollectAction" - parent: "relay" + parent: "SignalWire::Relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb" visibility: "public" diff --git a/fern/products/sdk-reference/ruby/relay/collect-config/index.mdx b/fern/products/sdk-reference/ruby/relay/collect-config/index.mdx index b2939be2ca..58d472df7c 100644 --- a/fern/products/sdk-reference/ruby/relay/collect-config/index.mdx +++ b/fern/products/sdk-reference/ruby/relay/collect-config/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "ruby" qualified_name: "SignalWire::Relay::CollectConfig" - parent: "relay" + parent: "SignalWire::Relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/collect_config.rb" visibility: "public" diff --git a/fern/products/sdk-reference/ruby/relay/collect-event/index.mdx b/fern/products/sdk-reference/ruby/relay/collect-event/index.mdx index f78944807a..cd5d9577b7 100644 --- a/fern/products/sdk-reference/ruby/relay/collect-event/index.mdx +++ b/fern/products/sdk-reference/ruby/relay/collect-event/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "ruby" qualified_name: "SignalWire::Relay::CollectEvent" - parent: "relay" + parent: "SignalWire::Relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" visibility: "public" diff --git a/fern/products/sdk-reference/ruby/relay/conference-event/index.mdx b/fern/products/sdk-reference/ruby/relay/conference-event/index.mdx index 8e414d2d60..21a0207220 100644 --- a/fern/products/sdk-reference/ruby/relay/conference-event/index.mdx +++ b/fern/products/sdk-reference/ruby/relay/conference-event/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "ruby" qualified_name: "SignalWire::Relay::ConferenceEvent" - parent: "relay" + parent: "SignalWire::Relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" visibility: "public" diff --git a/fern/products/sdk-reference/ruby/relay/connect-event/index.mdx b/fern/products/sdk-reference/ruby/relay/connect-event/index.mdx index b33296ddf2..c1b0fd480a 100644 --- a/fern/products/sdk-reference/ruby/relay/connect-event/index.mdx +++ b/fern/products/sdk-reference/ruby/relay/connect-event/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "ruby" qualified_name: "SignalWire::Relay::ConnectEvent" - parent: "relay" + parent: "SignalWire::Relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" visibility: "public" diff --git a/fern/products/sdk-reference/ruby/relay/denoise-event/index.mdx b/fern/products/sdk-reference/ruby/relay/denoise-event/index.mdx index 1ccb50a3c1..ba09a95ddc 100644 --- a/fern/products/sdk-reference/ruby/relay/denoise-event/index.mdx +++ b/fern/products/sdk-reference/ruby/relay/denoise-event/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "ruby" qualified_name: "SignalWire::Relay::DenoiseEvent" - parent: "relay" + parent: "SignalWire::Relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" visibility: "public" diff --git a/fern/products/sdk-reference/ruby/relay/detect-action/index.mdx b/fern/products/sdk-reference/ruby/relay/detect-action/index.mdx index 9434f2b0e4..723c3f4e2d 100644 --- a/fern/products/sdk-reference/ruby/relay/detect-action/index.mdx +++ b/fern/products/sdk-reference/ruby/relay/detect-action/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "ruby" qualified_name: "SignalWire::Relay::DetectAction" - parent: "relay" + parent: "SignalWire::Relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb" visibility: "public" diff --git a/fern/products/sdk-reference/ruby/relay/detect-event/index.mdx b/fern/products/sdk-reference/ruby/relay/detect-event/index.mdx index 7dd9228879..a86a1ca231 100644 --- a/fern/products/sdk-reference/ruby/relay/detect-event/index.mdx +++ b/fern/products/sdk-reference/ruby/relay/detect-event/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "ruby" qualified_name: "SignalWire::Relay::DetectEvent" - parent: "relay" + parent: "SignalWire::Relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" visibility: "public" diff --git a/fern/products/sdk-reference/ruby/relay/device/index.mdx b/fern/products/sdk-reference/ruby/relay/device/index.mdx index a300d58311..b3f2a49ac6 100644 --- a/fern/products/sdk-reference/ruby/relay/device/index.mdx +++ b/fern/products/sdk-reference/ruby/relay/device/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "ruby" qualified_name: "SignalWire::Relay::Device" - parent: "relay" + parent: "SignalWire::Relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/device.rb" visibility: "public" diff --git a/fern/products/sdk-reference/ruby/relay/dial-event/index.mdx b/fern/products/sdk-reference/ruby/relay/dial-event/index.mdx index c9d7c5935d..0c5d10fe6a 100644 --- a/fern/products/sdk-reference/ruby/relay/dial-event/index.mdx +++ b/fern/products/sdk-reference/ruby/relay/dial-event/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "ruby" qualified_name: "SignalWire::Relay::DialEvent" - parent: "relay" + parent: "SignalWire::Relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" visibility: "public" diff --git a/fern/products/sdk-reference/ruby/relay/dial-state/index.mdx b/fern/products/sdk-reference/ruby/relay/dial-state/index.mdx index 781fad6b5d..fde789d7f0 100644 --- a/fern/products/sdk-reference/ruby/relay/dial-state/index.mdx +++ b/fern/products/sdk-reference/ruby/relay/dial-state/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "module" language: "ruby" qualified_name: "SignalWire::Relay::DialState" - parent: "relay" + parent: "SignalWire::Relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/constants.rb" visibility: "public" diff --git a/fern/products/sdk-reference/ruby/relay/echo-event/index.mdx b/fern/products/sdk-reference/ruby/relay/echo-event/index.mdx index 37006f418b..92d3fe4a95 100644 --- a/fern/products/sdk-reference/ruby/relay/echo-event/index.mdx +++ b/fern/products/sdk-reference/ruby/relay/echo-event/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "ruby" qualified_name: "SignalWire::Relay::EchoEvent" - parent: "relay" + parent: "SignalWire::Relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" visibility: "public" diff --git a/fern/products/sdk-reference/ruby/relay/fax-action/index.mdx b/fern/products/sdk-reference/ruby/relay/fax-action/index.mdx index b55c006298..318675733d 100644 --- a/fern/products/sdk-reference/ruby/relay/fax-action/index.mdx +++ b/fern/products/sdk-reference/ruby/relay/fax-action/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "ruby" qualified_name: "SignalWire::Relay::FaxAction" - parent: "relay" + parent: "SignalWire::Relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb" visibility: "public" diff --git a/fern/products/sdk-reference/ruby/relay/fax-event/index.mdx b/fern/products/sdk-reference/ruby/relay/fax-event/index.mdx index dd93495156..e5049d6be4 100644 --- a/fern/products/sdk-reference/ruby/relay/fax-event/index.mdx +++ b/fern/products/sdk-reference/ruby/relay/fax-event/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "ruby" qualified_name: "SignalWire::Relay::FaxEvent" - parent: "relay" + parent: "SignalWire::Relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" visibility: "public" diff --git a/fern/products/sdk-reference/ruby/relay/hold-event/index.mdx b/fern/products/sdk-reference/ruby/relay/hold-event/index.mdx index f234f9ac39..88daa07f33 100644 --- a/fern/products/sdk-reference/ruby/relay/hold-event/index.mdx +++ b/fern/products/sdk-reference/ruby/relay/hold-event/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "ruby" qualified_name: "SignalWire::Relay::HoldEvent" - parent: "relay" + parent: "SignalWire::Relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" visibility: "public" diff --git a/fern/products/sdk-reference/ruby/relay/index.mdx b/fern/products/sdk-reference/ruby/relay/index.mdx index 0d5021a582..86d04ea1b6 100644 --- a/fern/products/sdk-reference/ruby/relay/index.mdx +++ b/fern/products/sdk-reference/ruby/relay/index.mdx @@ -238,6 +238,198 @@ module Relay +## Classes + + + + Base class for async action handles (play, record, detect, etc.). + + + + Raised when an action times out waiting for completion. + + + + Handle for an active AI agent session. + + + + Represents a live RELAY call. + + + + calling.error + + + + calling.call.receive + + + + calling.call.state + + + + RelayClient -- WebSocket + JSON-RPC 2.0 protocol + event dispatch. + + + + Handle for play\_and\_collect or standalone collect. + + + + A typed RELAY +collect+ configuration: the known-shape options object the input-collection wrappers (\{Call#collect\}, \{Call#play\_and\_collect\}, \{Call#prompt\_tts\}, \{Call#prompt\_audio\}) currently take as a raw Hash and pass through verbatim onto the +calling.collect+ / +calling.play\_and\_collect+ wire frame. + + + + calling.call.collect + + + + calling.conference + + + + calling.call.connect + + + + calling.call.denoise + + + + Handle for an active detect operation. + + + + calling.call.detect + + + + A typed RELAY +device+ descriptor: the +\{ "type" => ..., "params" => \{...\} \}+ object handed to \{Call#connect\}, \{Call#refer\}, \{Call#tap\_audio\}, and \{Client#dial\} (where it nests inside the +devices+ list-of-lists). + + + + calling.call.dial + + + + calling.call.echo + + + + Handle for send\_fax or receive\_fax. + + + + calling.call.fax + + + + calling.call.hold + + + + Represents a single SMS/MMS message. + + + + messaging.receive + + + + messaging.state + + + + Handle for an active pay operation. + + + + calling.call.pay + + + + Handle for an active play operation. + + + + calling.call.play + + + + calling.call.queue + + + + Handle for an active record operation. + + + + calling.call.record + + + + calling.call.refer + + + + Raised for RELAY JSON-RPC errors. + + + + Base event wrapper for raw signalwire.event payloads. Subclasses provide typed accessors for specific event types. + + + + calling.call.send\_digits + + + + Handle for standalone calling.collect (without play). + + + + Handle for an active stream operation. + + + + calling.call.stream + + + + Handle for an active tap operation. + + + + calling.call.tap + + + + Handle for an active transcribe operation. + + + + calling.call.transcribe + + + +## Modules + + + + Named, frozen view over the call-state vocabulary. Additive: the wire value stays a bare String everywhere (the events carry +call\_state+ as a String, +Call#state+ is a String), and the flat +CALL\_STATE\_\*+ constants above remain the single source of the literals. This module wraps them with the Wave-A/Tier-1 idiom — a frozen +ALL+ ordered list, a frozen +TERMINAL+ set, and a +terminal?+ predicate — so callers can ask +CallState.terminal?(state)+ instead of hard-coding +== "ended"+. + + + + Named, frozen view over the outbound-dial vocabulary. Unlike call/message states, the reference exposes _no_ flat dial-state constants — the values are grounded in +signalwire/relay/client.py+'s +_handle\_dial\_event+ docstring ("`dial_state` — `dialing` | `answered` | `failed`") and the mock dial-dance. This module names them (+DIAL\_STATE_\*+ above are the single source) and adds +ALL+ + +TERMINAL+ + +terminal?+. + + + + Named, frozen view over the messaging-state vocabulary. Additive: the wire value stays a bare String (+Message#state+, the +message\_state+ event field). Wraps the flat +MESSAGE\_STATE\_\*+ constants (the single source of the literals) with +ALL+ + +TERMINAL+ + +terminal?+, so callers can ask +MessageState.terminal?(state)+ instead of re-deriving the set. + + + ## Methods ### parse\_event diff --git a/fern/products/sdk-reference/ruby/relay/index__2.mdx b/fern/products/sdk-reference/ruby/relay/index__2.mdx deleted file mode 100644 index 6f23d883c4..0000000000 --- a/fern/products/sdk-reference/ruby/relay/index__2.mdx +++ /dev/null @@ -1,204 +0,0 @@ ---- -slug: "/reference/ruby/relay/index__2" -title: "relay" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "module" - language: "ruby" - qualified_name: "relay" ---- -# `relay` - -## Classes - - - - Base class for async action handles (play, record, detect, etc.). - - - - Raised when an action times out waiting for completion. - - - - Handle for an active AI agent session. - - - - Represents a live RELAY call. - - - - calling.error - - - - calling.call.receive - - - - calling.call.state - - - - RelayClient -- WebSocket + JSON-RPC 2.0 protocol + event dispatch. - - - - Handle for play\_and\_collect or standalone collect. - - - - A typed RELAY +collect+ configuration: the known-shape options object the input-collection wrappers (\{Call#collect\}, \{Call#play\_and\_collect\}, \{Call#prompt\_tts\}, \{Call#prompt\_audio\}) currently take as a raw Hash and pass through verbatim onto the +calling.collect+ / +calling.play\_and\_collect+ wire frame. - - - - calling.call.collect - - - - calling.conference - - - - calling.call.connect - - - - calling.call.denoise - - - - Handle for an active detect operation. - - - - calling.call.detect - - - - A typed RELAY +device+ descriptor: the +\{ "type" => ..., "params" => \{...\} \}+ object handed to \{Call#connect\}, \{Call#refer\}, \{Call#tap\_audio\}, and \{Client#dial\} (where it nests inside the +devices+ list-of-lists). - - - - calling.call.dial - - - - calling.call.echo - - - - Handle for send\_fax or receive\_fax. - - - - calling.call.fax - - - - calling.call.hold - - - - Represents a single SMS/MMS message. - - - - messaging.receive - - - - messaging.state - - - - Handle for an active pay operation. - - - - calling.call.pay - - - - Handle for an active play operation. - - - - calling.call.play - - - - calling.call.queue - - - - Handle for an active record operation. - - - - calling.call.record - - - - calling.call.refer - - - - Raised for RELAY JSON-RPC errors. - - - - Base event wrapper for raw signalwire.event payloads. Subclasses provide typed accessors for specific event types. - - - - calling.call.send\_digits - - - - Handle for standalone calling.collect (without play). - - - - Handle for an active stream operation. - - - - calling.call.stream - - - - Handle for an active tap operation. - - - - calling.call.tap - - - - Handle for an active transcribe operation. - - - - calling.call.transcribe - - - -## Modules - - - - Named, frozen view over the call-state vocabulary. Additive: the wire value stays a bare String everywhere (the events carry +call\_state+ as a String, +Call#state+ is a String), and the flat +CALL\_STATE\_\*+ constants above remain the single source of the literals. This module wraps them with the Wave-A/Tier-1 idiom — a frozen +ALL+ ordered list, a frozen +TERMINAL+ set, and a +terminal?+ predicate — so callers can ask +CallState.terminal?(state)+ instead of hard-coding +== "ended"+. - - - - Named, frozen view over the outbound-dial vocabulary. Unlike call/message states, the reference exposes _no_ flat dial-state constants — the values are grounded in +signalwire/relay/client.py+'s +_handle\_dial\_event+ docstring ("`dial_state` — `dialing` | `answered` | `failed`") and the mock dial-dance. This module names them (+DIAL\_STATE_\*+ above are the single source) and adds +ALL+ + +TERMINAL+ + +terminal?+. - - - - Named, frozen view over the messaging-state vocabulary. Additive: the wire value stays a bare String (+Message#state+, the +message\_state+ event field). Wraps the flat +MESSAGE\_STATE\_\*+ constants (the single source of the literals) with +ALL+ + +TERMINAL+ + +terminal?+, so callers can ask +MessageState.terminal?(state)+ instead of re-deriving the set. - - diff --git a/fern/products/sdk-reference/ruby/relay/message-receive-event/index.mdx b/fern/products/sdk-reference/ruby/relay/message-receive-event/index.mdx index b8a901eb8e..2ac2ab7d3d 100644 --- a/fern/products/sdk-reference/ruby/relay/message-receive-event/index.mdx +++ b/fern/products/sdk-reference/ruby/relay/message-receive-event/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "ruby" qualified_name: "SignalWire::Relay::MessageReceiveEvent" - parent: "relay" + parent: "SignalWire::Relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" visibility: "public" diff --git a/fern/products/sdk-reference/ruby/relay/message-state-event/index.mdx b/fern/products/sdk-reference/ruby/relay/message-state-event/index.mdx index 65d48fff2a..f406e9dcaa 100644 --- a/fern/products/sdk-reference/ruby/relay/message-state-event/index.mdx +++ b/fern/products/sdk-reference/ruby/relay/message-state-event/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "ruby" qualified_name: "SignalWire::Relay::MessageStateEvent" - parent: "relay" + parent: "SignalWire::Relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" visibility: "public" diff --git a/fern/products/sdk-reference/ruby/relay/message-state/index.mdx b/fern/products/sdk-reference/ruby/relay/message-state/index.mdx index ea1e548967..d07c46b1ce 100644 --- a/fern/products/sdk-reference/ruby/relay/message-state/index.mdx +++ b/fern/products/sdk-reference/ruby/relay/message-state/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "module" language: "ruby" qualified_name: "SignalWire::Relay::MessageState" - parent: "relay" + parent: "SignalWire::Relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/constants.rb" visibility: "public" diff --git a/fern/products/sdk-reference/ruby/relay/message/index.mdx b/fern/products/sdk-reference/ruby/relay/message/index.mdx index 9978e8986b..4077520dbb 100644 --- a/fern/products/sdk-reference/ruby/relay/message/index.mdx +++ b/fern/products/sdk-reference/ruby/relay/message/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "ruby" qualified_name: "SignalWire::Relay::Message" - parent: "relay" + parent: "SignalWire::Relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/message.rb" visibility: "public" diff --git a/fern/products/sdk-reference/ruby/relay/pay-action/index.mdx b/fern/products/sdk-reference/ruby/relay/pay-action/index.mdx index 2829d714c1..4a11f07cc2 100644 --- a/fern/products/sdk-reference/ruby/relay/pay-action/index.mdx +++ b/fern/products/sdk-reference/ruby/relay/pay-action/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "ruby" qualified_name: "SignalWire::Relay::PayAction" - parent: "relay" + parent: "SignalWire::Relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb" visibility: "public" diff --git a/fern/products/sdk-reference/ruby/relay/pay-event/index.mdx b/fern/products/sdk-reference/ruby/relay/pay-event/index.mdx index aca2177de1..8566675670 100644 --- a/fern/products/sdk-reference/ruby/relay/pay-event/index.mdx +++ b/fern/products/sdk-reference/ruby/relay/pay-event/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "ruby" qualified_name: "SignalWire::Relay::PayEvent" - parent: "relay" + parent: "SignalWire::Relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" visibility: "public" diff --git a/fern/products/sdk-reference/ruby/relay/play-action/index.mdx b/fern/products/sdk-reference/ruby/relay/play-action/index.mdx index daaa98ad66..86f02c75a0 100644 --- a/fern/products/sdk-reference/ruby/relay/play-action/index.mdx +++ b/fern/products/sdk-reference/ruby/relay/play-action/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "ruby" qualified_name: "SignalWire::Relay::PlayAction" - parent: "relay" + parent: "SignalWire::Relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb" visibility: "public" diff --git a/fern/products/sdk-reference/ruby/relay/play-event/index.mdx b/fern/products/sdk-reference/ruby/relay/play-event/index.mdx index c65e622a8a..7d23e28dee 100644 --- a/fern/products/sdk-reference/ruby/relay/play-event/index.mdx +++ b/fern/products/sdk-reference/ruby/relay/play-event/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "ruby" qualified_name: "SignalWire::Relay::PlayEvent" - parent: "relay" + parent: "SignalWire::Relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" visibility: "public" diff --git a/fern/products/sdk-reference/ruby/relay/queue-event/index.mdx b/fern/products/sdk-reference/ruby/relay/queue-event/index.mdx index 6eb7c224b2..5b10b59671 100644 --- a/fern/products/sdk-reference/ruby/relay/queue-event/index.mdx +++ b/fern/products/sdk-reference/ruby/relay/queue-event/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "ruby" qualified_name: "SignalWire::Relay::QueueEvent" - parent: "relay" + parent: "SignalWire::Relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" visibility: "public" diff --git a/fern/products/sdk-reference/ruby/relay/record-action/index.mdx b/fern/products/sdk-reference/ruby/relay/record-action/index.mdx index 995e7a4ab8..5f0d53fb61 100644 --- a/fern/products/sdk-reference/ruby/relay/record-action/index.mdx +++ b/fern/products/sdk-reference/ruby/relay/record-action/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "ruby" qualified_name: "SignalWire::Relay::RecordAction" - parent: "relay" + parent: "SignalWire::Relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb" visibility: "public" diff --git a/fern/products/sdk-reference/ruby/relay/record-event/index.mdx b/fern/products/sdk-reference/ruby/relay/record-event/index.mdx index 3444e11a33..e8b92cac43 100644 --- a/fern/products/sdk-reference/ruby/relay/record-event/index.mdx +++ b/fern/products/sdk-reference/ruby/relay/record-event/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "ruby" qualified_name: "SignalWire::Relay::RecordEvent" - parent: "relay" + parent: "SignalWire::Relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" visibility: "public" diff --git a/fern/products/sdk-reference/ruby/relay/refer-event/index.mdx b/fern/products/sdk-reference/ruby/relay/refer-event/index.mdx index 273e4fecc1..c0a1fe4865 100644 --- a/fern/products/sdk-reference/ruby/relay/refer-event/index.mdx +++ b/fern/products/sdk-reference/ruby/relay/refer-event/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "ruby" qualified_name: "SignalWire::Relay::ReferEvent" - parent: "relay" + parent: "SignalWire::Relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" visibility: "public" diff --git a/fern/products/sdk-reference/ruby/relay/relay-error/index.mdx b/fern/products/sdk-reference/ruby/relay/relay-error/index.mdx index 2f0fe189ca..73416ad24c 100644 --- a/fern/products/sdk-reference/ruby/relay/relay-error/index.mdx +++ b/fern/products/sdk-reference/ruby/relay/relay-error/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "ruby" qualified_name: "SignalWire::Relay::RelayError" - parent: "relay" + parent: "SignalWire::Relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/client.rb" visibility: "public" diff --git a/fern/products/sdk-reference/ruby/relay/relay-event/index.mdx b/fern/products/sdk-reference/ruby/relay/relay-event/index.mdx index 14410230a5..ac87b913e8 100644 --- a/fern/products/sdk-reference/ruby/relay/relay-event/index.mdx +++ b/fern/products/sdk-reference/ruby/relay/relay-event/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "ruby" qualified_name: "SignalWire::Relay::RelayEvent" - parent: "relay" + parent: "SignalWire::Relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" visibility: "public" diff --git a/fern/products/sdk-reference/ruby/relay/send-digits-event/index.mdx b/fern/products/sdk-reference/ruby/relay/send-digits-event/index.mdx index c74f704d07..d7e5d09e6f 100644 --- a/fern/products/sdk-reference/ruby/relay/send-digits-event/index.mdx +++ b/fern/products/sdk-reference/ruby/relay/send-digits-event/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "ruby" qualified_name: "SignalWire::Relay::SendDigitsEvent" - parent: "relay" + parent: "SignalWire::Relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" visibility: "public" diff --git a/fern/products/sdk-reference/ruby/relay/standalone-collect-action/index.mdx b/fern/products/sdk-reference/ruby/relay/standalone-collect-action/index.mdx index 94f2baaf57..2c001ff556 100644 --- a/fern/products/sdk-reference/ruby/relay/standalone-collect-action/index.mdx +++ b/fern/products/sdk-reference/ruby/relay/standalone-collect-action/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "ruby" qualified_name: "SignalWire::Relay::StandaloneCollectAction" - parent: "relay" + parent: "SignalWire::Relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb" visibility: "public" diff --git a/fern/products/sdk-reference/ruby/relay/stream-action/index.mdx b/fern/products/sdk-reference/ruby/relay/stream-action/index.mdx index 7a1a323ad5..fff2a96690 100644 --- a/fern/products/sdk-reference/ruby/relay/stream-action/index.mdx +++ b/fern/products/sdk-reference/ruby/relay/stream-action/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "ruby" qualified_name: "SignalWire::Relay::StreamAction" - parent: "relay" + parent: "SignalWire::Relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb" visibility: "public" diff --git a/fern/products/sdk-reference/ruby/relay/stream-event/index.mdx b/fern/products/sdk-reference/ruby/relay/stream-event/index.mdx index 47407d4add..a360f98517 100644 --- a/fern/products/sdk-reference/ruby/relay/stream-event/index.mdx +++ b/fern/products/sdk-reference/ruby/relay/stream-event/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "ruby" qualified_name: "SignalWire::Relay::StreamEvent" - parent: "relay" + parent: "SignalWire::Relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" visibility: "public" diff --git a/fern/products/sdk-reference/ruby/relay/tap-action/index.mdx b/fern/products/sdk-reference/ruby/relay/tap-action/index.mdx index e032df1105..bb8064a249 100644 --- a/fern/products/sdk-reference/ruby/relay/tap-action/index.mdx +++ b/fern/products/sdk-reference/ruby/relay/tap-action/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "ruby" qualified_name: "SignalWire::Relay::TapAction" - parent: "relay" + parent: "SignalWire::Relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb" visibility: "public" diff --git a/fern/products/sdk-reference/ruby/relay/tap-event/index.mdx b/fern/products/sdk-reference/ruby/relay/tap-event/index.mdx index 07c1048768..8f59de405e 100644 --- a/fern/products/sdk-reference/ruby/relay/tap-event/index.mdx +++ b/fern/products/sdk-reference/ruby/relay/tap-event/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "ruby" qualified_name: "SignalWire::Relay::TapEvent" - parent: "relay" + parent: "SignalWire::Relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" visibility: "public" diff --git a/fern/products/sdk-reference/ruby/relay/transcribe-action/index.mdx b/fern/products/sdk-reference/ruby/relay/transcribe-action/index.mdx index a4fd0b5630..0166e19df5 100644 --- a/fern/products/sdk-reference/ruby/relay/transcribe-action/index.mdx +++ b/fern/products/sdk-reference/ruby/relay/transcribe-action/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "ruby" qualified_name: "SignalWire::Relay::TranscribeAction" - parent: "relay" + parent: "SignalWire::Relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/action.rb" visibility: "public" diff --git a/fern/products/sdk-reference/ruby/relay/transcribe-event/index.mdx b/fern/products/sdk-reference/ruby/relay/transcribe-event/index.mdx index a16040401e..8eab6d309e 100644 --- a/fern/products/sdk-reference/ruby/relay/transcribe-event/index.mdx +++ b/fern/products/sdk-reference/ruby/relay/transcribe-event/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "ruby" qualified_name: "SignalWire::Relay::TranscribeEvent" - parent: "relay" + parent: "SignalWire::Relay" module: "relay" source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/relay/relay_event.rb" visibility: "public" diff --git a/fern/products/sdk-reference/ruby/rest/base-resource/index.mdx b/fern/products/sdk-reference/ruby/rest/base-resource/index.mdx index 6c2cad4e4d..3370134de6 100644 --- a/fern/products/sdk-reference/ruby/rest/base-resource/index.mdx +++ b/fern/products/sdk-reference/ruby/rest/base-resource/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "ruby" qualified_name: "SignalWire::REST::BaseResource" - parent: "rest" + parent: "SignalWire::REST" module: "rest" source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb" visibility: "public" diff --git a/fern/products/sdk-reference/ruby/rest/crud-resource/index.mdx b/fern/products/sdk-reference/ruby/rest/crud-resource/index.mdx index 4a9cafe088..c5a7592a46 100644 --- a/fern/products/sdk-reference/ruby/rest/crud-resource/index.mdx +++ b/fern/products/sdk-reference/ruby/rest/crud-resource/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "ruby" qualified_name: "SignalWire::REST::CrudResource" - parent: "rest" + parent: "SignalWire::REST" module: "rest" source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb" visibility: "public" diff --git a/fern/products/sdk-reference/ruby/rest/crud-with-addresses/index.mdx b/fern/products/sdk-reference/ruby/rest/crud-with-addresses/index.mdx index 3747780e04..7032d1c6c4 100644 --- a/fern/products/sdk-reference/ruby/rest/crud-with-addresses/index.mdx +++ b/fern/products/sdk-reference/ruby/rest/crud-with-addresses/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "ruby" qualified_name: "SignalWire::REST::CrudWithAddresses" - parent: "rest" + parent: "SignalWire::REST" module: "rest" source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb" visibility: "public" diff --git a/fern/products/sdk-reference/ruby/rest/http-client/index.mdx b/fern/products/sdk-reference/ruby/rest/http-client/index.mdx index 2e9622c89d..4fa58312f3 100644 --- a/fern/products/sdk-reference/ruby/rest/http-client/index.mdx +++ b/fern/products/sdk-reference/ruby/rest/http-client/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "ruby" qualified_name: "SignalWire::REST::HttpClient" - parent: "rest" + parent: "SignalWire::REST" module: "rest" source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb" visibility: "public" diff --git a/fern/products/sdk-reference/ruby/rest/index.mdx b/fern/products/sdk-reference/ruby/rest/index.mdx index ff692b6929..4f1b46befe 100644 --- a/fern/products/sdk-reference/ruby/rest/index.mdx +++ b/fern/products/sdk-reference/ruby/rest/index.mdx @@ -19,6 +19,48 @@ lustri: module REST ``` +## Classes + + + + Base for all namespace/resource classes. + + + + Standard CRUD resource with list/create/get/update/delete. + + + + CRUD resource that also supports listing the addresses bound to a resource. Mirrors Python's +signalwire.rest.\_base.CrudWithAddresses+: it adds a single +list\_addresses+ helper on top of the standard list/create/get/update/delete surface, issuing +GET \{base\_path\}/\{resource\_id\}/addresses+. + + + + Thin wrapper around Net::HTTP with Basic Auth and JSON handling. + + + + Iterates items across paginated API responses. + + + + REST client for the SignalWire platform APIs. + + + + Raised when the SignalWire REST API returns a non-2xx response. + + + +## Modules + + + + + + PhoneCallHandler -- enum-like constants of the +call\_handler+ values accepted by +phone\_numbers.update+. + + + ## Source [`lib/signalwire/rest/pagination.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/pagination.rb) diff --git a/fern/products/sdk-reference/ruby/rest/index__2.mdx b/fern/products/sdk-reference/ruby/rest/index__2.mdx deleted file mode 100644 index 1ad7072bfd..0000000000 --- a/fern/products/sdk-reference/ruby/rest/index__2.mdx +++ /dev/null @@ -1,54 +0,0 @@ ---- -slug: "/reference/ruby/rest/index__2" -title: "rest" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "module" - language: "ruby" - qualified_name: "rest" ---- -# `rest` - -## Classes - - - - Base for all namespace/resource classes. - - - - Standard CRUD resource with list/create/get/update/delete. - - - - CRUD resource that also supports listing the addresses bound to a resource. Mirrors Python's +signalwire.rest.\_base.CrudWithAddresses+: it adds a single +list\_addresses+ helper on top of the standard list/create/get/update/delete surface, issuing +GET \{base\_path\}/\{resource\_id\}/addresses+. - - - - Thin wrapper around Net::HTTP with Basic Auth and JSON handling. - - - - Iterates items across paginated API responses. - - - - REST client for the SignalWire platform APIs. - - - - Raised when the SignalWire REST API returns a non-2xx response. - - - -## Modules - - - - - - PhoneCallHandler -- enum-like constants of the +call\_handler+ values accepted by +phone\_numbers.update+. - - diff --git a/fern/products/sdk-reference/ruby/rest/namespaces/index.mdx b/fern/products/sdk-reference/ruby/rest/namespaces/index.mdx index 3a5edca9ee..6ea61f2aab 100644 --- a/fern/products/sdk-reference/ruby/rest/namespaces/index.mdx +++ b/fern/products/sdk-reference/ruby/rest/namespaces/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "module" language: "ruby" qualified_name: "SignalWire::REST::Namespaces" - parent: "rest" + parent: "SignalWire::REST" module: "rest" source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/namespaces/mfa.rb" visibility: "public" diff --git a/fern/products/sdk-reference/ruby/rest/paginated-iterator/index.mdx b/fern/products/sdk-reference/ruby/rest/paginated-iterator/index.mdx index 1ff4ed452b..ebed0a9a15 100644 --- a/fern/products/sdk-reference/ruby/rest/paginated-iterator/index.mdx +++ b/fern/products/sdk-reference/ruby/rest/paginated-iterator/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "ruby" qualified_name: "SignalWire::REST::PaginatedIterator" - parent: "rest" + parent: "SignalWire::REST" module: "rest" source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/pagination.rb" visibility: "public" diff --git a/fern/products/sdk-reference/ruby/rest/phone-call-handler/index.mdx b/fern/products/sdk-reference/ruby/rest/phone-call-handler/index.mdx index f3fa5abc50..89e41259b4 100644 --- a/fern/products/sdk-reference/ruby/rest/phone-call-handler/index.mdx +++ b/fern/products/sdk-reference/ruby/rest/phone-call-handler/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "module" language: "ruby" qualified_name: "SignalWire::REST::PhoneCallHandler" - parent: "rest" + parent: "SignalWire::REST" module: "rest" source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/phone_call_handler.rb" visibility: "public" diff --git a/fern/products/sdk-reference/ruby/rest/rest-client/index.mdx b/fern/products/sdk-reference/ruby/rest/rest-client/index.mdx index 3b935bca4a..6ec9b06b04 100644 --- a/fern/products/sdk-reference/ruby/rest/rest-client/index.mdx +++ b/fern/products/sdk-reference/ruby/rest/rest-client/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "ruby" qualified_name: "SignalWire::REST::RestClient" - parent: "rest" + parent: "SignalWire::REST" module: "rest" source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/rest_client.rb" visibility: "public" diff --git a/fern/products/sdk-reference/ruby/rest/signal-wire-rest-error/index.mdx b/fern/products/sdk-reference/ruby/rest/signal-wire-rest-error/index.mdx index a77f45aeaa..2c99dac8b9 100644 --- a/fern/products/sdk-reference/ruby/rest/signal-wire-rest-error/index.mdx +++ b/fern/products/sdk-reference/ruby/rest/signal-wire-rest-error/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "ruby" qualified_name: "SignalWire::REST::SignalWireRestError" - parent: "rest" + parent: "SignalWire::REST" module: "rest" source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/rest/http_client.rb" visibility: "public" diff --git a/fern/products/sdk-reference/rust/_meta.json b/fern/products/sdk-reference/rust/_meta.json index cceef1937b..00dc4901fd 100644 --- a/fern/products/sdk-reference/rust/_meta.json +++ b/fern/products/sdk-reference/rust/_meta.json @@ -6,5 +6,5 @@ "format": "mdx", "platform": "fern", "base_slug": "/reference/rust", - "item_count": 1910 + "item_count": 1866 } \ No newline at end of file diff --git a/fern/products/sdk-reference/rust/agents/index.mdx b/fern/products/sdk-reference/rust/agents/index.mdx index 498f727f97..0f1232aca9 100644 --- a/fern/products/sdk-reference/rust/agents/index.mdx +++ b/fern/products/sdk-reference/rust/agents/index.mdx @@ -17,6 +17,10 @@ lustri: Fluent builder for DataMap-based SWAIG function definitions. + + + Root container for a Prompt Object Model document. + ## Modules @@ -32,10 +36,6 @@ lustri: Prompt Object Model (POM) - - `PromptObjectModel` — root container for a POM document. - - diff --git a/fern/products/sdk-reference/rust/agents/pom/index.mdx b/fern/products/sdk-reference/rust/agents/pom/index.mdx index aaa3ee1604..f9e05ad750 100644 --- a/fern/products/sdk-reference/rust/agents/pom/index.mdx +++ b/fern/products/sdk-reference/rust/agents/pom/index.mdx @@ -36,12 +36,6 @@ byte-for-byte — the cross-port parity contract lives in -## Modules - - - - - ## Source [`src/pom/mod.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/mod.rs) diff --git a/fern/products/sdk-reference/rust/agents/pom/index__2.mdx b/fern/products/sdk-reference/rust/agents/pom/index__2.mdx index cd74aa7e78..9fa950019e 100644 --- a/fern/products/sdk-reference/rust/agents/pom/index__2.mdx +++ b/fern/products/sdk-reference/rust/agents/pom/index__2.mdx @@ -5,7 +5,7 @@ sdk_label: "Rust SDK" icon: "rust" lustri: auto_generated: true - kind: "module" + kind: "class" language: "rust" qualified_name: "signalwire::pom::pom" parent: "agents" @@ -15,22 +15,533 @@ lustri: --- # `pom` -`PromptObjectModel` — root container for a POM document. +Root container for a Prompt Object Model document. -Direct port of `signalwire.pom.pom.PromptObjectModel` -(signalwire-python/signalwire/signalwire/pom/pom.py:234-540). +Mirrors Python's `signalwire.pom.pom.PromptObjectModel`. Construct +with \[`PromptObjectModel::new`], populate with [`add_section`], +then render via [`render_markdown`], [`render_xml`], [`to_json`], +or [`to_yaml`]. -Owns a `Vec

` (the top-level sections) and exposes -markdown / XML / JSON / YAML rendering plus structural helpers -(`add_section`, `find_section`, `add_pom_as_subsection`). +[`add_section`]: PromptObjectModel::add_section -All renderers match Python byte-for-byte — the cross-port -parity contract is asserted in -`signalwire-python/tests/unit/pom/test_pom_render_parity.py` and -mirrored in this crate's inline tests. +[`render_markdown`]: PromptObjectModel::render_markdown + +[`render_xml`]: PromptObjectModel::render_xml + +[`to_json`]: PromptObjectModel::to_json + +[`to_yaml`]: PromptObjectModel::to_yaml + +**Decorators:** `@must_use` + +## Signature + +```rust +struct PromptObjectModel { /* fields */ } +``` + +## Inheritance + +**Implements:** `Debug`, `Clone`, `Default`, `PartialEq`, `Eq` + +## Properties + + + Top-level sections, in insertion order. Only the _first_ entry may have `title = None`; all others must carry a title (Python raises `ValueError` otherwise — see `add_section`). + + +## Methods + +### add\_pom\_as\_subsection + +Append every top-level section of `pom_to_add` as a +subsection of the section identified by `target_title`. + +Mirrors Python's `add_pom_as_subsection(target, pom_to_add)` +where `target` is a section title. Returns `Err` when no +section with the given title exists. + +#### Signature + +```rust +fn add_pom_as_subsection( + &mut self, + target_title: &str, + pom_to_add: &? +) -> ?<(), ?> +``` + +#### Parameters + + + + + +#### Returns + +`?<(), ?>` + +#### Source + +[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) + +Line 252. + +*** + +### add\_section + +Append a top-level section with the given title and body. + +Mirrors Python's `PromptObjectModel.add_section(title, body=...)`. +Only the _first_ section may pass `title = None`; subsequent +`None` titles return `Err`. + +Returns a mutable reference to the new section so callers +can keep configuring it (Python returns the `Section` object +— Rust's borrow checker makes a `&mut` reference the +equivalent shape). + +#### Signature + +```rust +fn add_section(&mut self, title: ?) -> ?<&mut ?, ?> +``` + +#### Parameters + + + +#### Returns + +`?<&mut ?, ?>` + +#### Source + +[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) + +Line 97. + +*** + +### add\_section\_with + +Append a top-level section with title + body in one call. +Convenience wrapper that mirrors Python's keyword-style +`add_section(title=..., body=...)`. + +#### Signature + +```rust +fn add_section_with: ?>( + &mut self, + title: ?, + body: impl ? +) -> ?<&mut ?, ?> +``` + +#### Type Parameters + + + +#### Parameters + + + + + +#### Returns + +`?<&mut ?, ?>` + +#### Source + +[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) + +Line 108. + +*** + +### clone + +#### Signature + +```rust +fn clone(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) + +Line 31. + +*** + +### default + +#### Signature + +```rust +fn default() -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) + +Line 31. + +*** + +### eq + +#### Signature + +```rust +fn eq(&self, other: &?) -> bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) + +Line 31. + +*** + +### find\_section + +Find the first section (recursively, depth-first) with the +given title. Returns `None` when no match. Mirrors Python's +`find_section`. + +#### Signature + +```rust +fn find_section(&self, title: &str) -> ?<&?> +``` + +#### Parameters + + + +#### Returns + +`?<&?>` + +#### Source + +[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) + +Line 121. + +*** + +### find\_section\_mut + +Mutable variant of \[`find_section`]. + +[`find_section`]: PromptObjectModel::find_section + +#### Signature + +```rust +fn find_section_mut(&mut self, title: &str) -> ?<&mut ?> +``` + +#### Parameters + + + +#### Returns + +`?<&mut ?>` + +#### Source + +[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) + +Line 139. + +*** + +### fmt + +#### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) + +Line 31. + +*** + +### from\_json + +Parse a JSON string into a \[`PromptObjectModel`]. Mirrors +Python's `PromptObjectModel.from_json(json_data)`. + +Returns `Err(String)` with a descriptive message on parse +errors, matching Python's `ValueError`. + +#### Signature + +```rust +fn from_json(json_str: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) + +Line 55. + +*** + +### from\_value + +Build a model from a parsed `serde_json::Value`. Used by +both \[`from_json`] and \[`from_yaml`]. + +[`from_json`]: PromptObjectModel::from_json + +[`from_yaml`]: PromptObjectModel::from_yaml + +#### Signature + +```rust +fn from_value(value: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) + +Line 74. + +*** + +### from\_yaml + +Parse a YAML string into a \[`PromptObjectModel`]. Mirrors +Python's `PromptObjectModel.from_yaml(yaml_data)`. + +#### Signature + +```rust +fn from_yaml(yaml_str: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) + +Line 63. + +*** + +### new + +Construct an empty model. Mirrors Python's +`PromptObjectModel()` constructor. + +#### Signature + +```rust +fn new() -> Self +``` + +#### Returns + +`Self` + +#### Source + +[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) + +Line 44. + +*** + +### render\_markdown + +Render the entire model as markdown. Matches Python's +`render_markdown` byte-for-byte. + +#### Signature + +```rust +fn render_markdown(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) + +Line 195. + +*** + +### render\_xml + +Render the entire model as XML. Matches Python's +`render_xml` byte-for-byte. + +#### Signature + +```rust +fn render_xml(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) + +Line 219. + +*** + +### to\_json + +Render the model as a JSON string (indent=2). Matches +Python's `to_json` byte-for-byte: `json.dumps([...], indent=2)`. + +#### Signature + +```rust +fn to_json(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) + +Line 164. + +*** + +### to\_value + +Convert the model to a `serde_json::Value` (a JSON array of +section dicts). Mirrors Python's `to_dict`. The Rust name +follows serde idiom (`to_value`) but the cross-port surface +audit treats `to_value` ≡ `to_dict`. + +#### Signature + +```rust +fn to_value(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) + +Line 158. + +*** + +### to\_yaml + +Render the model as a YAML string. Matches PyYAML's output +shape (`default_flow_style=False, sort_keys=False`). + +We hand-emit YAML rather than rely on `serde_norway::to_string` +because the latter (a) sorts keys alphabetically when fed a +`serde_json::Value` (which uses BTreeMap internally) and +(b) doesn't expose a switch to disable that. The POM +document shape is fully constrained — list of dicts with +known string/list-of-string/list-of-dict values — so a +targeted emitter is straightforward and guarantees parity. + +#### Signature + +```rust +fn to_yaml(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) + +Line 181. ## Source [`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) -Line 1. +Line 33. diff --git a/fern/products/sdk-reference/rust/agents/pom/pom/index.mdx b/fern/products/sdk-reference/rust/agents/pom/pom/index.mdx deleted file mode 100644 index 3a323b5aeb..0000000000 --- a/fern/products/sdk-reference/rust/agents/pom/pom/index.mdx +++ /dev/null @@ -1,22 +0,0 @@ ---- -slug: "/reference/rust/agents/pom/pom" -title: "pom" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "agents.pom.pom" - parent: "signalwire::pom" - module: "agents.pom" ---- -# `pom` - -## Classes - - - - Root container for a Prompt Object Model document. - - diff --git a/fern/products/sdk-reference/rust/agents/pom/pom/prompt-object-model/index.mdx b/fern/products/sdk-reference/rust/agents/pom/pom/prompt-object-model/index.mdx deleted file mode 100644 index fc4493b4a2..0000000000 --- a/fern/products/sdk-reference/rust/agents/pom/pom/prompt-object-model/index.mdx +++ /dev/null @@ -1,547 +0,0 @@ ---- -slug: "/reference/rust/agents/pom/pom/prompt-object-model" -title: "PromptObjectModel" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::pom::pom::PromptObjectModel" - parent: "agents.pom.pom" - module: "agents.pom.pom" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs" - visibility: "public" ---- -# `PromptObjectModel` - -Root container for a Prompt Object Model document. - -Mirrors Python's `signalwire.pom.pom.PromptObjectModel`. Construct -with \[`PromptObjectModel::new`], populate with [`add_section`], -then render via [`render_markdown`], [`render_xml`], [`to_json`], -or [`to_yaml`]. - -[`add_section`]: PromptObjectModel::add_section - -[`render_markdown`]: PromptObjectModel::render_markdown - -[`render_xml`]: PromptObjectModel::render_xml - -[`to_json`]: PromptObjectModel::to_json - -[`to_yaml`]: PromptObjectModel::to_yaml - -**Decorators:** `@must_use` - -## Signature - -```rust -struct PromptObjectModel { /* fields */ } -``` - -## Inheritance - -**Implements:** `Debug`, `Clone`, `Default`, `PartialEq`, `Eq` - -## Properties - - - Top-level sections, in insertion order. Only the _first_ entry may have `title = None`; all others must carry a title (Python raises `ValueError` otherwise — see `add_section`). - - -## Methods - -### add\_pom\_as\_subsection - -Append every top-level section of `pom_to_add` as a -subsection of the section identified by `target_title`. - -Mirrors Python's `add_pom_as_subsection(target, pom_to_add)` -where `target` is a section title. Returns `Err` when no -section with the given title exists. - -#### Signature - -```rust -fn add_pom_as_subsection( - &mut self, - target_title: &str, - pom_to_add: &? -) -> ?<(), ?> -``` - -#### Parameters - - - - - -#### Returns - -`?<(), ?>` - -#### Source - -[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) - -Line 252. - -*** - -### add\_section - -Append a top-level section with the given title and body. - -Mirrors Python's `PromptObjectModel.add_section(title, body=...)`. -Only the _first_ section may pass `title = None`; subsequent -`None` titles return `Err`. - -Returns a mutable reference to the new section so callers -can keep configuring it (Python returns the `Section` object -— Rust's borrow checker makes a `&mut` reference the -equivalent shape). - -#### Signature - -```rust -fn add_section(&mut self, title: ?) -> ?<&mut ?, ?> -``` - -#### Parameters - - - -#### Returns - -`?<&mut ?, ?>` - -#### Source - -[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) - -Line 97. - -*** - -### add\_section\_with - -Append a top-level section with title + body in one call. -Convenience wrapper that mirrors Python's keyword-style -`add_section(title=..., body=...)`. - -#### Signature - -```rust -fn add_section_with: ?>( - &mut self, - title: ?, - body: impl ? -) -> ?<&mut ?, ?> -``` - -#### Type Parameters - - - -#### Parameters - - - - - -#### Returns - -`?<&mut ?, ?>` - -#### Source - -[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) - -Line 108. - -*** - -### clone - -#### Signature - -```rust -fn clone(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) - -Line 31. - -*** - -### default - -#### Signature - -```rust -fn default() -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) - -Line 31. - -*** - -### eq - -#### Signature - -```rust -fn eq(&self, other: &?) -> bool -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) - -Line 31. - -*** - -### find\_section - -Find the first section (recursively, depth-first) with the -given title. Returns `None` when no match. Mirrors Python's -`find_section`. - -#### Signature - -```rust -fn find_section(&self, title: &str) -> ?<&?> -``` - -#### Parameters - - - -#### Returns - -`?<&?>` - -#### Source - -[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) - -Line 121. - -*** - -### find\_section\_mut - -Mutable variant of \[`find_section`]. - -[`find_section`]: PromptObjectModel::find_section - -#### Signature - -```rust -fn find_section_mut(&mut self, title: &str) -> ?<&mut ?> -``` - -#### Parameters - - - -#### Returns - -`?<&mut ?>` - -#### Source - -[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) - -Line 139. - -*** - -### fmt - -#### Signature - -```rust -fn fmt(&self, f: &mut ?<'_>) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) - -Line 31. - -*** - -### from\_json - -Parse a JSON string into a \[`PromptObjectModel`]. Mirrors -Python's `PromptObjectModel.from_json(json_data)`. - -Returns `Err(String)` with a descriptive message on parse -errors, matching Python's `ValueError`. - -#### Signature - -```rust -fn from_json(json_str: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) - -Line 55. - -*** - -### from\_value - -Build a model from a parsed `serde_json::Value`. Used by -both \[`from_json`] and \[`from_yaml`]. - -[`from_json`]: PromptObjectModel::from_json - -[`from_yaml`]: PromptObjectModel::from_yaml - -#### Signature - -```rust -fn from_value(value: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) - -Line 74. - -*** - -### from\_yaml - -Parse a YAML string into a \[`PromptObjectModel`]. Mirrors -Python's `PromptObjectModel.from_yaml(yaml_data)`. - -#### Signature - -```rust -fn from_yaml(yaml_str: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) - -Line 63. - -*** - -### new - -Construct an empty model. Mirrors Python's -`PromptObjectModel()` constructor. - -#### Signature - -```rust -fn new() -> Self -``` - -#### Returns - -`Self` - -#### Source - -[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) - -Line 44. - -*** - -### render\_markdown - -Render the entire model as markdown. Matches Python's -`render_markdown` byte-for-byte. - -#### Signature - -```rust -fn render_markdown(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) - -Line 195. - -*** - -### render\_xml - -Render the entire model as XML. Matches Python's -`render_xml` byte-for-byte. - -#### Signature - -```rust -fn render_xml(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) - -Line 219. - -*** - -### to\_json - -Render the model as a JSON string (indent=2). Matches -Python's `to_json` byte-for-byte: `json.dumps([...], indent=2)`. - -#### Signature - -```rust -fn to_json(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) - -Line 164. - -*** - -### to\_value - -Convert the model to a `serde_json::Value` (a JSON array of -section dicts). Mirrors Python's `to_dict`. The Rust name -follows serde idiom (`to_value`) but the cross-port surface -audit treats `to_value` ≡ `to_dict`. - -#### Signature - -```rust -fn to_value(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) - -Line 158. - -*** - -### to\_yaml - -Render the model as a YAML string. Matches PyYAML's output -shape (`default_flow_style=False, sort_keys=False`). - -We hand-emit YAML rather than rely on `serde_norway::to_string` -because the latter (a) sorts keys alphabetically when fed a -`serde_json::Value` (which uses BTreeMap internally) and -(b) doesn't expose a switch to disable that. The POM -document shape is fully constrained — list of dicts with -known string/list-of-string/list-of-dict values — so a -targeted emitter is straightforward and guarantees parity. - -#### Signature - -```rust -fn to_yaml(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) - -Line 181. - -## Source - -[`src/pom/pom.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/pom/pom.rs) - -Line 33. diff --git a/fern/products/sdk-reference/rust/agents/prefabs/concierge/concierge-agent/index.mdx b/fern/products/sdk-reference/rust/agents/prefabs/concierge/concierge-agent/index.mdx deleted file mode 100644 index 0a26202ded..0000000000 --- a/fern/products/sdk-reference/rust/agents/prefabs/concierge/concierge-agent/index.mdx +++ /dev/null @@ -1,161 +0,0 @@ ---- -slug: "/reference/rust/agents/prefabs/concierge/concierge-agent" -title: "ConciergeAgent" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::prefabs::concierge::ConciergeAgent" - parent: "signalwire::prefabs::concierge" - module: "agents.prefabs.concierge" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/concierge.rs" - visibility: "public" ---- -# `ConciergeAgent` - -A pre-built concierge agent for venues — answers questions about services, -amenities, hours, and provides directions. - -## Signature - -```rust -struct ConciergeAgent { /* fields */ } -``` - -## Methods - -### agent - -#### Signature - -```rust -fn agent(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/prefabs/concierge.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/concierge.rs) - -Line 227. - -*** - -### agent\_mut - -#### Signature - -```rust -fn agent_mut(&mut self) -> &mut ? -``` - -#### Returns - -`&mut ?` - -#### Source - -[`src/prefabs/concierge.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/concierge.rs) - -Line 231. - -*** - -### amenities - -#### Signature - -```rust -fn amenities(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/prefabs/concierge.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/concierge.rs) - -Line 243. - -*** - -### new - -Create a new ConciergeAgent. - -#### Signature - -```rust -fn new(name: &str, venue_info: &?, route: ?<&str>) -> Self -``` - -#### Parameters - - - - - - - -#### Returns - -`Self` - -#### Source - -[`src/prefabs/concierge.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/concierge.rs) - -Line 25. - -*** - -### services - -#### Signature - -```rust -fn services(&self) -> &[?] -``` - -#### Returns - -`&[?]` - -#### Source - -[`src/prefabs/concierge.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/concierge.rs) - -Line 239. - -*** - -### venue\_name - -#### Signature - -```rust -fn venue_name(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/prefabs/concierge.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/concierge.rs) - -Line 235. - -## Source - -[`src/prefabs/concierge.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/concierge.rs) - -Line 10. diff --git a/fern/products/sdk-reference/rust/agents/prefabs/concierge/index.mdx b/fern/products/sdk-reference/rust/agents/prefabs/concierge/index.mdx index 749484cb2e..2ba6f34084 100644 --- a/fern/products/sdk-reference/rust/agents/prefabs/concierge/index.mdx +++ b/fern/products/sdk-reference/rust/agents/prefabs/concierge/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Rust SDK" icon: "rust" lustri: auto_generated: true - kind: "module" + kind: "class" language: "rust" qualified_name: "signalwire::prefabs::concierge" parent: "signalwire::prefabs" @@ -15,16 +15,147 @@ lustri: --- # `concierge` -## Classes +A pre-built concierge agent for venues — answers questions about services, +amenities, hours, and provides directions. - - - A pre-built concierge agent for venues — answers questions about services, amenities, hours, and provides directions. - - +## Signature + +```rust +struct ConciergeAgent { /* fields */ } +``` + +## Methods + +### agent + +#### Signature + +```rust +fn agent(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/prefabs/concierge.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/concierge.rs) + +Line 227. + +*** + +### agent\_mut + +#### Signature + +```rust +fn agent_mut(&mut self) -> &mut ? +``` + +#### Returns + +`&mut ?` + +#### Source + +[`src/prefabs/concierge.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/concierge.rs) + +Line 231. + +*** + +### amenities + +#### Signature + +```rust +fn amenities(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/prefabs/concierge.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/concierge.rs) + +Line 243. + +*** + +### new + +Create a new ConciergeAgent. + +#### Signature + +```rust +fn new(name: &str, venue_info: &?, route: ?<&str>) -> Self +``` + +#### Parameters + + + + + + + +#### Returns + +`Self` + +#### Source + +[`src/prefabs/concierge.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/concierge.rs) + +Line 25. + +*** + +### services + +#### Signature + +```rust +fn services(&self) -> &[?] +``` + +#### Returns + +`&[?]` + +#### Source + +[`src/prefabs/concierge.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/concierge.rs) + +Line 239. + +*** + +### venue\_name + +#### Signature + +```rust +fn venue_name(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/prefabs/concierge.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/concierge.rs) + +Line 235. ## Source [`src/prefabs/concierge.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/concierge.rs) -Line 1. +Line 10. diff --git a/fern/products/sdk-reference/rust/agents/prefabs/faq-bot/faq-bot-agent/index.mdx b/fern/products/sdk-reference/rust/agents/prefabs/faq-bot/faq-bot-agent/index.mdx deleted file mode 100644 index cc3eab4ee5..0000000000 --- a/fern/products/sdk-reference/rust/agents/prefabs/faq-bot/faq-bot-agent/index.mdx +++ /dev/null @@ -1,150 +0,0 @@ ---- -slug: "/reference/rust/agents/prefabs/faq-bot/faq-bot-agent" -title: "FAQBotAgent" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::prefabs::faq_bot::FAQBotAgent" - parent: "signalwire::prefabs::faq_bot" - module: "agents.prefabs.faq_bot" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/faq_bot.rs" - visibility: "public" ---- -# `FAQBotAgent` - -A pre-built FAQ bot agent that provides answers from a knowledge base. - -## Signature - -```rust -struct FAQBotAgent { /* fields */ } -``` - -## Methods - -### agent - -#### Signature - -```rust -fn agent(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/prefabs/faq_bot.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/faq_bot.rs) - -Line 172. - -*** - -### agent\_mut - -#### Signature - -```rust -fn agent_mut(&mut self) -> &mut ? -``` - -#### Returns - -`&mut ?` - -#### Source - -[`src/prefabs/faq_bot.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/faq_bot.rs) - -Line 176. - -*** - -### faqs - -#### Signature - -```rust -fn faqs(&self) -> &[?] -``` - -#### Returns - -`&[?]` - -#### Source - -[`src/prefabs/faq_bot.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/faq_bot.rs) - -Line 180. - -*** - -### new - -Create a new FAQBotAgent. - -#### Signature - -```rust -fn new( - name: &str, - faqs: ?, - suggest_related: bool, - persona: ?<&str>, - route: ?<&str> -) -> Self -``` - -#### Parameters - - - - - - - - - - - -#### Returns - -`Self` - -#### Source - -[`src/prefabs/faq_bot.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/faq_bot.rs) - -Line 22. - -*** - -### suggest\_related - -#### Signature - -```rust -fn suggest_related(&self) -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`src/prefabs/faq_bot.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/faq_bot.rs) - -Line 184. - -## Source - -[`src/prefabs/faq_bot.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/faq_bot.rs) - -Line 7. diff --git a/fern/products/sdk-reference/rust/agents/prefabs/faq-bot/index.mdx b/fern/products/sdk-reference/rust/agents/prefabs/faq-bot/index.mdx index d5ef33058e..db15613e91 100644 --- a/fern/products/sdk-reference/rust/agents/prefabs/faq-bot/index.mdx +++ b/fern/products/sdk-reference/rust/agents/prefabs/faq-bot/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Rust SDK" icon: "rust" lustri: auto_generated: true - kind: "module" + kind: "class" language: "rust" qualified_name: "signalwire::prefabs::faq_bot" parent: "signalwire::prefabs" @@ -15,16 +15,136 @@ lustri: --- # `faq_bot` -## Classes +A pre-built FAQ bot agent that provides answers from a knowledge base. - - - A pre-built FAQ bot agent that provides answers from a knowledge base. - - +## Signature + +```rust +struct FAQBotAgent { /* fields */ } +``` + +## Methods + +### agent + +#### Signature + +```rust +fn agent(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/prefabs/faq_bot.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/faq_bot.rs) + +Line 172. + +*** + +### agent\_mut + +#### Signature + +```rust +fn agent_mut(&mut self) -> &mut ? +``` + +#### Returns + +`&mut ?` + +#### Source + +[`src/prefabs/faq_bot.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/faq_bot.rs) + +Line 176. + +*** + +### faqs + +#### Signature + +```rust +fn faqs(&self) -> &[?] +``` + +#### Returns + +`&[?]` + +#### Source + +[`src/prefabs/faq_bot.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/faq_bot.rs) + +Line 180. + +*** + +### new + +Create a new FAQBotAgent. + +#### Signature + +```rust +fn new( + name: &str, + faqs: ?, + suggest_related: bool, + persona: ?<&str>, + route: ?<&str> +) -> Self +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`Self` + +#### Source + +[`src/prefabs/faq_bot.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/faq_bot.rs) + +Line 22. + +*** + +### suggest\_related + +#### Signature + +```rust +fn suggest_related(&self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/prefabs/faq_bot.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/faq_bot.rs) + +Line 184. ## Source [`src/prefabs/faq_bot.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/faq_bot.rs) -Line 1. +Line 7. diff --git a/fern/products/sdk-reference/rust/agents/prefabs/index.mdx b/fern/products/sdk-reference/rust/agents/prefabs/index.mdx index a74646a655..6b44647322 100644 --- a/fern/products/sdk-reference/rust/agents/prefabs/index.mdx +++ b/fern/products/sdk-reference/rust/agents/prefabs/index.mdx @@ -15,22 +15,36 @@ lustri: --- # `prefabs` -## Modules +## Classes - - Amazon Bedrock voice-to-voice agent. + + A pre-built concierge agent for venues — answers questions about services, amenities, hours, and provides directions. - + + A pre-built FAQ bot agent that provides answers from a knowledge base. + - + + A pre-built agent that asks a series of questions and collects answers. + + + + A pre-built receptionist agent that routes callers to departments. + - + + A pre-built agent for conducting surveys with typed question validation. + + - +## Modules - + + + Amazon Bedrock voice-to-voice agent. + ## Source diff --git a/fern/products/sdk-reference/rust/agents/prefabs/info-gatherer/index.mdx b/fern/products/sdk-reference/rust/agents/prefabs/info-gatherer/index.mdx index 9f5495dfc0..b937f19098 100644 --- a/fern/products/sdk-reference/rust/agents/prefabs/info-gatherer/index.mdx +++ b/fern/products/sdk-reference/rust/agents/prefabs/info-gatherer/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Rust SDK" icon: "rust" lustri: auto_generated: true - kind: "module" + kind: "class" language: "rust" qualified_name: "signalwire::prefabs::info_gatherer" parent: "signalwire::prefabs" @@ -15,16 +15,112 @@ lustri: --- # `info_gatherer` -## Classes +A pre-built agent that asks a series of questions and collects answers. - - - A pre-built agent that asks a series of questions and collects answers. - - +## Signature + +```rust +struct InfoGathererAgent { /* fields */ } +``` + +## Methods + +### agent + +Access the underlying `AgentBase`. + +#### Signature + +```rust +fn agent(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/prefabs/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/info_gatherer.rs) + +Line 96. + +*** + +### agent\_mut + +Access the underlying `AgentBase` mutably. + +#### Signature + +```rust +fn agent_mut(&mut self) -> &mut ? +``` + +#### Returns + +`&mut ?` + +#### Source + +[`src/prefabs/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/info_gatherer.rs) + +Line 101. + +*** + +### new + +Create a new InfoGathererAgent. + +#### Signature + +```rust +fn new(name: &str, questions: ?, route: ?<&str>) -> Self +``` + +#### Parameters + + + + + + + +#### Returns + +`Self` + +#### Source + +[`src/prefabs/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/info_gatherer.rs) + +Line 19. + +*** + +### questions + +Get the configured questions. + +#### Signature + +```rust +fn questions(&self) -> &[?] +``` + +#### Returns + +`&[?]` + +#### Source + +[`src/prefabs/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/info_gatherer.rs) + +Line 106. ## Source [`src/prefabs/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/info_gatherer.rs) -Line 1. +Line 7. diff --git a/fern/products/sdk-reference/rust/agents/prefabs/info-gatherer/info-gatherer-agent/index.mdx b/fern/products/sdk-reference/rust/agents/prefabs/info-gatherer/info-gatherer-agent/index.mdx deleted file mode 100644 index 5911b39489..0000000000 --- a/fern/products/sdk-reference/rust/agents/prefabs/info-gatherer/info-gatherer-agent/index.mdx +++ /dev/null @@ -1,126 +0,0 @@ ---- -slug: "/reference/rust/agents/prefabs/info-gatherer/info-gatherer-agent" -title: "InfoGathererAgent" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::prefabs::info_gatherer::InfoGathererAgent" - parent: "signalwire::prefabs::info_gatherer" - module: "agents.prefabs.info_gatherer" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/info_gatherer.rs" - visibility: "public" ---- -# `InfoGathererAgent` - -A pre-built agent that asks a series of questions and collects answers. - -## Signature - -```rust -struct InfoGathererAgent { /* fields */ } -``` - -## Methods - -### agent - -Access the underlying `AgentBase`. - -#### Signature - -```rust -fn agent(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/prefabs/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/info_gatherer.rs) - -Line 96. - -*** - -### agent\_mut - -Access the underlying `AgentBase` mutably. - -#### Signature - -```rust -fn agent_mut(&mut self) -> &mut ? -``` - -#### Returns - -`&mut ?` - -#### Source - -[`src/prefabs/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/info_gatherer.rs) - -Line 101. - -*** - -### new - -Create a new InfoGathererAgent. - -#### Signature - -```rust -fn new(name: &str, questions: ?, route: ?<&str>) -> Self -``` - -#### Parameters - - - - - - - -#### Returns - -`Self` - -#### Source - -[`src/prefabs/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/info_gatherer.rs) - -Line 19. - -*** - -### questions - -Get the configured questions. - -#### Signature - -```rust -fn questions(&self) -> &[?] -``` - -#### Returns - -`&[?]` - -#### Source - -[`src/prefabs/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/info_gatherer.rs) - -Line 106. - -## Source - -[`src/prefabs/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/info_gatherer.rs) - -Line 7. diff --git a/fern/products/sdk-reference/rust/agents/prefabs/receptionist/index.mdx b/fern/products/sdk-reference/rust/agents/prefabs/receptionist/index.mdx index d8746a85ce..0ab52a38ae 100644 --- a/fern/products/sdk-reference/rust/agents/prefabs/receptionist/index.mdx +++ b/fern/products/sdk-reference/rust/agents/prefabs/receptionist/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Rust SDK" icon: "rust" lustri: auto_generated: true - kind: "module" + kind: "class" language: "rust" qualified_name: "signalwire::prefabs::receptionist" parent: "signalwire::prefabs" @@ -15,16 +15,128 @@ lustri: --- # `receptionist` -## Classes +A pre-built receptionist agent that routes callers to departments. - - - A pre-built receptionist agent that routes callers to departments. - - +## Signature + +```rust +struct ReceptionistAgent { /* fields */ } +``` + +## Methods + +### agent + +#### Signature + +```rust +fn agent(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/prefabs/receptionist.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/receptionist.rs) + +Line 154. + +*** + +### agent\_mut + +#### Signature + +```rust +fn agent_mut(&mut self) -> &mut ? +``` + +#### Returns + +`&mut ?` + +#### Source + +[`src/prefabs/receptionist.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/receptionist.rs) + +Line 158. + +*** + +### departments + +#### Signature + +```rust +fn departments(&self) -> &[?] +``` + +#### Returns + +`&[?]` + +#### Source + +[`src/prefabs/receptionist.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/receptionist.rs) + +Line 162. + +*** + +### greeting + +#### Signature + +```rust +fn greeting(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/prefabs/receptionist.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/receptionist.rs) + +Line 166. + +*** + +### new + +Create a new ReceptionistAgent. + +#### Signature + +```rust +fn new(name: &str, departments: ?, greeting: ?<&str>, route: ?<&str>) -> Self +``` + +#### Parameters + + + + + + + + + +#### Returns + +`Self` + +#### Source + +[`src/prefabs/receptionist.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/receptionist.rs) + +Line 21. ## Source [`src/prefabs/receptionist.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/receptionist.rs) -Line 1. +Line 7. diff --git a/fern/products/sdk-reference/rust/agents/prefabs/receptionist/receptionist-agent/index.mdx b/fern/products/sdk-reference/rust/agents/prefabs/receptionist/receptionist-agent/index.mdx deleted file mode 100644 index eaa97f1fc4..0000000000 --- a/fern/products/sdk-reference/rust/agents/prefabs/receptionist/receptionist-agent/index.mdx +++ /dev/null @@ -1,142 +0,0 @@ ---- -slug: "/reference/rust/agents/prefabs/receptionist/receptionist-agent" -title: "ReceptionistAgent" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::prefabs::receptionist::ReceptionistAgent" - parent: "signalwire::prefabs::receptionist" - module: "agents.prefabs.receptionist" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/receptionist.rs" - visibility: "public" ---- -# `ReceptionistAgent` - -A pre-built receptionist agent that routes callers to departments. - -## Signature - -```rust -struct ReceptionistAgent { /* fields */ } -``` - -## Methods - -### agent - -#### Signature - -```rust -fn agent(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/prefabs/receptionist.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/receptionist.rs) - -Line 154. - -*** - -### agent\_mut - -#### Signature - -```rust -fn agent_mut(&mut self) -> &mut ? -``` - -#### Returns - -`&mut ?` - -#### Source - -[`src/prefabs/receptionist.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/receptionist.rs) - -Line 158. - -*** - -### departments - -#### Signature - -```rust -fn departments(&self) -> &[?] -``` - -#### Returns - -`&[?]` - -#### Source - -[`src/prefabs/receptionist.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/receptionist.rs) - -Line 162. - -*** - -### greeting - -#### Signature - -```rust -fn greeting(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/prefabs/receptionist.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/receptionist.rs) - -Line 166. - -*** - -### new - -Create a new ReceptionistAgent. - -#### Signature - -```rust -fn new(name: &str, departments: ?, greeting: ?<&str>, route: ?<&str>) -> Self -``` - -#### Parameters - - - - - - - - - -#### Returns - -`Self` - -#### Source - -[`src/prefabs/receptionist.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/receptionist.rs) - -Line 21. - -## Source - -[`src/prefabs/receptionist.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/receptionist.rs) - -Line 7. diff --git a/fern/products/sdk-reference/rust/agents/prefabs/survey/index.mdx b/fern/products/sdk-reference/rust/agents/prefabs/survey/index.mdx index 9b8b6bcad4..2455eb21dd 100644 --- a/fern/products/sdk-reference/rust/agents/prefabs/survey/index.mdx +++ b/fern/products/sdk-reference/rust/agents/prefabs/survey/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Rust SDK" icon: "rust" lustri: auto_generated: true - kind: "module" + kind: "class" language: "rust" qualified_name: "signalwire::prefabs::survey" parent: "signalwire::prefabs" @@ -15,16 +15,126 @@ lustri: --- # `survey` -## Classes +A pre-built agent for conducting surveys with typed question validation. - - - A pre-built agent for conducting surveys with typed question validation. - - +## Signature + +```rust +struct SurveyAgent { /* fields */ } +``` + +## Methods + +### agent + +#### Signature + +```rust +fn agent(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/prefabs/survey.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/survey.rs) + +Line 240. + +*** + +### agent\_mut + +#### Signature + +```rust +fn agent_mut(&mut self) -> &mut ? +``` + +#### Returns + +`&mut ?` + +#### Source + +[`src/prefabs/survey.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/survey.rs) + +Line 244. + +*** + +### new + +Create a new SurveyAgent. + +#### Signature + +```rust +fn new(name: &str, questions: ?, options: ?<&?>) -> Self +``` + +#### Parameters + + + + + + + +#### Returns + +`Self` + +#### Source + +[`src/prefabs/survey.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/survey.rs) + +Line 21. + +*** + +### survey\_name + +#### Signature + +```rust +fn survey_name(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/prefabs/survey.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/survey.rs) + +Line 248. + +*** + +### survey\_questions + +#### Signature + +```rust +fn survey_questions(&self) -> &[?] +``` + +#### Returns + +`&[?]` + +#### Source + +[`src/prefabs/survey.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/survey.rs) + +Line 252. ## Source [`src/prefabs/survey.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/survey.rs) -Line 1. +Line 7. diff --git a/fern/products/sdk-reference/rust/agents/prefabs/survey/survey-agent/index.mdx b/fern/products/sdk-reference/rust/agents/prefabs/survey/survey-agent/index.mdx deleted file mode 100644 index 824b3cbad8..0000000000 --- a/fern/products/sdk-reference/rust/agents/prefabs/survey/survey-agent/index.mdx +++ /dev/null @@ -1,140 +0,0 @@ ---- -slug: "/reference/rust/agents/prefabs/survey/survey-agent" -title: "SurveyAgent" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::prefabs::survey::SurveyAgent" - parent: "signalwire::prefabs::survey" - module: "agents.prefabs.survey" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/survey.rs" - visibility: "public" ---- -# `SurveyAgent` - -A pre-built agent for conducting surveys with typed question validation. - -## Signature - -```rust -struct SurveyAgent { /* fields */ } -``` - -## Methods - -### agent - -#### Signature - -```rust -fn agent(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/prefabs/survey.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/survey.rs) - -Line 240. - -*** - -### agent\_mut - -#### Signature - -```rust -fn agent_mut(&mut self) -> &mut ? -``` - -#### Returns - -`&mut ?` - -#### Source - -[`src/prefabs/survey.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/survey.rs) - -Line 244. - -*** - -### new - -Create a new SurveyAgent. - -#### Signature - -```rust -fn new(name: &str, questions: ?, options: ?<&?>) -> Self -``` - -#### Parameters - - - - - - - -#### Returns - -`Self` - -#### Source - -[`src/prefabs/survey.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/survey.rs) - -Line 21. - -*** - -### survey\_name - -#### Signature - -```rust -fn survey_name(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/prefabs/survey.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/survey.rs) - -Line 248. - -*** - -### survey\_questions - -#### Signature - -```rust -fn survey_questions(&self) -> &[?] -``` - -#### Returns - -`&[?]` - -#### Source - -[`src/prefabs/survey.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/survey.rs) - -Line 252. - -## Source - -[`src/prefabs/survey.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/prefabs/survey.rs) - -Line 7. diff --git a/fern/products/sdk-reference/rust/agents/server/agent-server/agent-server/index.mdx b/fern/products/sdk-reference/rust/agents/server/agent-server/agent-server/index.mdx deleted file mode 100644 index 5d2cafdd32..0000000000 --- a/fern/products/sdk-reference/rust/agents/server/agent-server/agent-server/index.mdx +++ /dev/null @@ -1,507 +0,0 @@ ---- -slug: "/reference/rust/agents/server/agent-server/agent-server" -title: "AgentServer" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::server::agent_server::AgentServer" - parent: "signalwire::server::agent_server" - module: "agents.server.agent_server" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs" - visibility: "public" ---- -# `AgentServer` - -Multi-agent HTTP server that dispatches requests to registered agents -by longest-prefix route matching. - -## Signature - -```rust -struct AgentServer { /* fields */ } -``` - -## Methods - -### get\_agent - -Get an agent by route. - -#### Signature - -```rust -fn get_agent(&self, route: &str) -> ?<&?> -``` - -#### Parameters - - - -#### Returns - -`?<&?>` - -#### Source - -[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) - -Line 133. - -*** - -### get\_agent\_mut - -Get a mutable reference to an agent by route. - -#### Signature - -```rust -fn get_agent_mut(&mut self, route: &str) -> ?<&mut ?> -``` - -#### Parameters - - - -#### Returns - -`?<&mut ?>` - -#### Source - -[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) - -Line 139. - -*** - -### get\_agents - -Get all registered routes (sorted). - -#### Signature - -```rust -fn get_agents(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) - -Line 126. - -*** - -### handle\_request - -Handle an HTTP request and return `(status, headers, body)`. - -#### Signature - -```rust -fn handle_request( - &self, - method: &str, - path: &str, - headers: &?, - body: &str -) -> (u16, ?, ?) -``` - -#### Parameters - - - - - - - - - -#### Returns - -`(u16, ?, ?)` - -#### Source - -[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) - -Line 309. - -*** - -### host - -#### Signature - -```rust -fn host(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) - -Line 414. - -*** - -### is\_sip\_routing\_enabled - -Check if SIP routing is enabled. - -#### Signature - -```rust -fn is_sip_routing_enabled(&self) -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) - -Line 163. - -*** - -### new - -#### Signature - -```rust -fn new(host: ?<&str>, port: ?) -> Self -``` - -#### Parameters - - - - - -#### Returns - -`Self` - -#### Source - -[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) - -Line 65. - -*** - -### port - -#### Signature - -```rust -fn port(&self) -> u16 -``` - -#### Returns - -`u16` - -#### Source - -[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) - -Line 418. - -*** - -### register - -Register an agent at its default route (from the agent's service), -or at an explicit route override. - -**Errors:** - -Returns \[`ServerError::RouteAlreadyRegistered`] if the route is taken. - -#### Signature - -```rust -fn register(&mut self, agent: ?, route: ?<&str>) -> ?<(), ?> -``` - -#### Parameters - - - - - -#### Returns - -`?<(), ?>` - -#### Source - -[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) - -Line 95. - -*** - -### register\_global\_routing\_callback - -Register a routing callback that runs on every request whose -path matches the configured `path`. Returning `Some(route)` from -the callback redirects handling to that registered agent; -returning `None` falls through to normal longest-prefix -dispatch. - -Mirrors Python's -`AgentServer.register_global_routing_callback(callback_fn, path)`. - -In Python the callback signature is -`(request, body) -> Optional[route]`; the Rust signature passes -`(path, headers, parsed_body)` since Rust does not carry a -FastAPI request object. - -#### Signature - -```rust -fn register_global_routing_callback( - &mut self, - callback: ?, - path: &str -) -> &mut Self -``` - -#### Parameters - - - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) - -Line 238. - -*** - -### register\_sip\_username - -Map a SIP username to a route. - -#### Signature - -```rust -fn register_sip_username(&mut self, username: &str, route: &str) -> &mut Self -``` - -#### Parameters - - - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) - -Line 155. - -*** - -### run - -Run the HTTP server on the configured host:port, blocking the -current thread until the listener exits. - -Mirrors Python's `AgentServer.run(host, port)`. The optional -`host` and `port` arguments override the values supplied at -construction time (matching the Python contract). - -#### Signature - -```rust -fn run(&self, host: ?<&str>, port: ?) -``` - -#### Parameters - - - - - -#### Source - -[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) - -Line 258. - -*** - -### serve\_static - -Serve static files from a directory under a URL prefix. - -**Errors:** - -Returns \[`ServerError::StaticDir`] if the directory does not exist or is -not a directory. - -#### Signature - -```rust -fn serve_static(&mut self, directory: &str, url_prefix: &str) -> ?<(), ?> -``` - -#### Parameters - - - - - -#### Returns - -`?<(), ?>` - -#### Source - -[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) - -Line 181. - -*** - -### serve\_static\_files - -Serve static files from a directory under a URL prefix. - -This is the named-mirror of Python's -`AgentServer.serve_static_files(directory, route="/")`. Behaves -identically to \[`AgentServer::serve_static`] (which kept the -shorter Rust-idiomatic name) — both are kept so existing code -keeps working and the Python-name parity is preserved for the -surface diff. - -**Errors:** - -Returns \[`ServerError::StaticDir`] if the directory does not exist. - -#### Signature - -```rust -fn serve_static_files(&mut self, directory: &str, route: &str) -> ?<(), ?> -``` - -#### Parameters - - - - - -#### Returns - -`?<(), ?>` - -#### Source - -[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) - -Line 213. - -*** - -### setup\_sip\_routing - -Enable SIP-based routing. - -#### Signature - -```rust -fn setup_sip_routing(&mut self) -> &mut Self -``` - -#### Returns - -`&mut Self` - -#### Source - -[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) - -Line 149. - -*** - -### sip\_username\_mapping - -Get the SIP username mapping. - -#### Signature - -```rust -fn sip_username_mapping(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) - -Line 168. - -*** - -### unregister - -Unregister an agent from a route. - -#### Signature - -```rust -fn unregister(&mut self, route: &str) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) - -Line 119. - -## Source - -[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) - -Line 50. diff --git a/fern/products/sdk-reference/rust/agents/server/agent-server/index.mdx b/fern/products/sdk-reference/rust/agents/server/agent-server/index.mdx index e0ade4fbf9..6335d88c7e 100644 --- a/fern/products/sdk-reference/rust/agents/server/agent-server/index.mdx +++ b/fern/products/sdk-reference/rust/agents/server/agent-server/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Rust SDK" icon: "rust" lustri: auto_generated: true - kind: "module" + kind: "class" language: "rust" qualified_name: "signalwire::server::agent_server" parent: "signalwire::server" @@ -15,13 +15,490 @@ lustri: --- # `agent_server` -## Classes +Multi-agent HTTP server that dispatches requests to registered agents +by longest-prefix route matching. - - - Multi-agent HTTP server that dispatches requests to registered agents by longest-prefix route matching. - - +## Signature + +```rust +struct AgentServer { /* fields */ } +``` + +## Methods + +### get\_agent + +Get an agent by route. + +#### Signature + +```rust +fn get_agent(&self, route: &str) -> ?<&?> +``` + +#### Parameters + + + +#### Returns + +`?<&?>` + +#### Source + +[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) + +Line 133. + +*** + +### get\_agent\_mut + +Get a mutable reference to an agent by route. + +#### Signature + +```rust +fn get_agent_mut(&mut self, route: &str) -> ?<&mut ?> +``` + +#### Parameters + + + +#### Returns + +`?<&mut ?>` + +#### Source + +[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) + +Line 139. + +*** + +### get\_agents + +Get all registered routes (sorted). + +#### Signature + +```rust +fn get_agents(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) + +Line 126. + +*** + +### handle\_request + +Handle an HTTP request and return `(status, headers, body)`. + +#### Signature + +```rust +fn handle_request( + &self, + method: &str, + path: &str, + headers: &?, + body: &str +) -> (u16, ?, ?) +``` + +#### Parameters + + + + + + + + + +#### Returns + +`(u16, ?, ?)` + +#### Source + +[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) + +Line 309. + +*** + +### host + +#### Signature + +```rust +fn host(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) + +Line 414. + +*** + +### is\_sip\_routing\_enabled + +Check if SIP routing is enabled. + +#### Signature + +```rust +fn is_sip_routing_enabled(&self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) + +Line 163. + +*** + +### new + +#### Signature + +```rust +fn new(host: ?<&str>, port: ?) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) + +Line 65. + +*** + +### port + +#### Signature + +```rust +fn port(&self) -> u16 +``` + +#### Returns + +`u16` + +#### Source + +[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) + +Line 418. + +*** + +### register + +Register an agent at its default route (from the agent's service), +or at an explicit route override. + +**Errors:** + +Returns \[`ServerError::RouteAlreadyRegistered`] if the route is taken. + +#### Signature + +```rust +fn register(&mut self, agent: ?, route: ?<&str>) -> ?<(), ?> +``` + +#### Parameters + + + + + +#### Returns + +`?<(), ?>` + +#### Source + +[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) + +Line 95. + +*** + +### register\_global\_routing\_callback + +Register a routing callback that runs on every request whose +path matches the configured `path`. Returning `Some(route)` from +the callback redirects handling to that registered agent; +returning `None` falls through to normal longest-prefix +dispatch. + +Mirrors Python's +`AgentServer.register_global_routing_callback(callback_fn, path)`. + +In Python the callback signature is +`(request, body) -> Optional[route]`; the Rust signature passes +`(path, headers, parsed_body)` since Rust does not carry a +FastAPI request object. + +#### Signature + +```rust +fn register_global_routing_callback( + &mut self, + callback: ?, + path: &str +) -> &mut Self +``` + +#### Parameters + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) + +Line 238. + +*** + +### register\_sip\_username + +Map a SIP username to a route. + +#### Signature + +```rust +fn register_sip_username(&mut self, username: &str, route: &str) -> &mut Self +``` + +#### Parameters + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) + +Line 155. + +*** + +### run + +Run the HTTP server on the configured host:port, blocking the +current thread until the listener exits. + +Mirrors Python's `AgentServer.run(host, port)`. The optional +`host` and `port` arguments override the values supplied at +construction time (matching the Python contract). + +#### Signature + +```rust +fn run(&self, host: ?<&str>, port: ?) +``` + +#### Parameters + + + + + +#### Source + +[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) + +Line 258. + +*** + +### serve\_static + +Serve static files from a directory under a URL prefix. + +**Errors:** + +Returns \[`ServerError::StaticDir`] if the directory does not exist or is +not a directory. + +#### Signature + +```rust +fn serve_static(&mut self, directory: &str, url_prefix: &str) -> ?<(), ?> +``` + +#### Parameters + + + + + +#### Returns + +`?<(), ?>` + +#### Source + +[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) + +Line 181. + +*** + +### serve\_static\_files + +Serve static files from a directory under a URL prefix. + +This is the named-mirror of Python's +`AgentServer.serve_static_files(directory, route="/")`. Behaves +identically to \[`AgentServer::serve_static`] (which kept the +shorter Rust-idiomatic name) — both are kept so existing code +keeps working and the Python-name parity is preserved for the +surface diff. + +**Errors:** + +Returns \[`ServerError::StaticDir`] if the directory does not exist. + +#### Signature + +```rust +fn serve_static_files(&mut self, directory: &str, route: &str) -> ?<(), ?> +``` + +#### Parameters + + + + + +#### Returns + +`?<(), ?>` + +#### Source + +[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) + +Line 213. + +*** + +### setup\_sip\_routing + +Enable SIP-based routing. + +#### Signature + +```rust +fn setup_sip_routing(&mut self) -> &mut Self +``` + +#### Returns + +`&mut Self` + +#### Source + +[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) + +Line 149. + +*** + +### sip\_username\_mapping + +Get the SIP username mapping. + +#### Signature + +```rust +fn sip_username_mapping(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) + +Line 168. + +*** + +### unregister + +Unregister an agent from a route. + +#### Signature + +```rust +fn unregister(&mut self, route: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) + +Line 119. ## Type Aliases @@ -55,4 +532,4 @@ Line 23. [`src/server/agent_server.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/server/agent_server.rs) -Line 1. +Line 50. diff --git a/fern/products/sdk-reference/rust/agents/server/index.mdx b/fern/products/sdk-reference/rust/agents/server/index.mdx index db4128038b..d31b6beeae 100644 --- a/fern/products/sdk-reference/rust/agents/server/index.mdx +++ b/fern/products/sdk-reference/rust/agents/server/index.mdx @@ -15,11 +15,17 @@ lustri: --- # `server` -## Modules +## Classes - + + Multi-agent HTTP server that dispatches requests to registered agents by longest-prefix route matching. + + +## Modules + + Typed error for the `AgentServer` surface and the shared HTTP(S) bind path. diff --git a/fern/products/sdk-reference/rust/agents/serverless/adapter/index.mdx b/fern/products/sdk-reference/rust/agents/serverless/adapter/index.mdx index 3e54b8e3ce..49facc44b0 100644 --- a/fern/products/sdk-reference/rust/agents/serverless/adapter/index.mdx +++ b/fern/products/sdk-reference/rust/agents/serverless/adapter/index.mdx @@ -155,6 +155,190 @@ fn status_text(code: u16) -> &'static str Line 207. +## Interfaces + +### RequestHandler + +Trait that the agent/service must implement so the adapter can +forward requests to it. + +#### Signature + +```rust +trait RequestHandler +``` + +#### Methods + +##### handle\_request + +Handle an HTTP request, returning (status\_code, headers, body). + +###### Signature + +```rust +fn handle_request( + &self, + method: &str, + path: &str, + headers: &?, + body: &str +) -> (u16, ?, ?) +``` + +###### Parameters + + + + + + + + + +###### Returns + +`(u16, ?, ?)` + +###### Source + +[`src/serverless/adapter.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/serverless/adapter.rs) + +Line 37. + +#### Source + +[`src/serverless/adapter.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/serverless/adapter.rs) + +Line 35. + +## Enums + +### RuntimeEnvironment + +Detected runtime environment. + +`#[non_exhaustive]` because the set of recognised serverless hosts mirrors +what \[`Adapter::detect`] probes for at runtime and is expected to grow +(new FaaS platforms) without that being a breaking change — downstream +`match` arms must include a wildcard. + +#### Signature + +```rust +enum RuntimeEnvironment +``` + +#### Inheritance + +**Implements:** `Debug`, `Clone`, `PartialEq`, `Eq` + +#### Variants + + + + + + + + + + + +#### Methods + +##### as\_str + +###### Signature + +```rust +fn as_str(&self) -> &'static str +``` + +###### Returns + +`&'static str` + +###### Source + +[`src/serverless/adapter.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/serverless/adapter.rs) + +Line 22. + +*** + +##### clone + +###### Signature + +```rust +fn clone(&self) -> ? +``` + +###### Returns + +`?` + +###### Source + +[`src/serverless/adapter.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/serverless/adapter.rs) + +Line 10. + +*** + +##### eq + +###### Signature + +```rust +fn eq(&self, other: &?) -> bool +``` + +###### Parameters + + + +###### Returns + +`bool` + +###### Source + +[`src/serverless/adapter.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/serverless/adapter.rs) + +Line 10. + +*** + +##### fmt + +###### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +###### Parameters + + + +###### Returns + +`?` + +###### Source + +[`src/serverless/adapter.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/serverless/adapter.rs) + +Line 10. + +#### Source + +[`src/serverless/adapter.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/serverless/adapter.rs) + +Line 13. + ## Source [`src/serverless/adapter.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/serverless/adapter.rs) diff --git a/fern/products/sdk-reference/rust/agents/serverless/adapter/index__2.mdx b/fern/products/sdk-reference/rust/agents/serverless/adapter/index__2.mdx deleted file mode 100644 index d02df65511..0000000000 --- a/fern/products/sdk-reference/rust/agents/serverless/adapter/index__2.mdx +++ /dev/null @@ -1,198 +0,0 @@ ---- -slug: "/reference/rust/agents/serverless/adapter/index__2" -title: "adapter" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "agents.serverless.adapter" - parent: "signalwire::serverless" - module: "agents.serverless" ---- -# `adapter` - -## Interfaces - -### RequestHandler - -Trait that the agent/service must implement so the adapter can -forward requests to it. - -#### Signature - -```rust -trait RequestHandler -``` - -#### Methods - -##### handle\_request - -Handle an HTTP request, returning (status\_code, headers, body). - -###### Signature - -```rust -fn handle_request( - &self, - method: &str, - path: &str, - headers: &?, - body: &str -) -> (u16, ?, ?) -``` - -###### Parameters - - - - - - - - - -###### Returns - -`(u16, ?, ?)` - -###### Source - -[`src/serverless/adapter.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/serverless/adapter.rs) - -Line 37. - -#### Source - -[`src/serverless/adapter.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/serverless/adapter.rs) - -Line 35. - -## Enums - -### RuntimeEnvironment - -Detected runtime environment. - -`#[non_exhaustive]` because the set of recognised serverless hosts mirrors -what \[`Adapter::detect`] probes for at runtime and is expected to grow -(new FaaS platforms) without that being a breaking change — downstream -`match` arms must include a wildcard. - -#### Signature - -```rust -enum RuntimeEnvironment -``` - -#### Inheritance - -**Implements:** `Debug`, `Clone`, `PartialEq`, `Eq` - -#### Variants - - - - - - - - - - - -#### Methods - -##### as\_str - -###### Signature - -```rust -fn as_str(&self) -> &'static str -``` - -###### Returns - -`&'static str` - -###### Source - -[`src/serverless/adapter.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/serverless/adapter.rs) - -Line 22. - -*** - -##### clone - -###### Signature - -```rust -fn clone(&self) -> ? -``` - -###### Returns - -`?` - -###### Source - -[`src/serverless/adapter.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/serverless/adapter.rs) - -Line 10. - -*** - -##### eq - -###### Signature - -```rust -fn eq(&self, other: &?) -> bool -``` - -###### Parameters - - - -###### Returns - -`bool` - -###### Source - -[`src/serverless/adapter.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/serverless/adapter.rs) - -Line 10. - -*** - -##### fmt - -###### Signature - -```rust -fn fmt(&self, f: &mut ?<'_>) -> ? -``` - -###### Parameters - - - -###### Returns - -`?` - -###### Source - -[`src/serverless/adapter.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/serverless/adapter.rs) - -Line 10. - -#### Source - -[`src/serverless/adapter.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/serverless/adapter.rs) - -Line 13. diff --git a/fern/products/sdk-reference/rust/agents/serverless/index.mdx b/fern/products/sdk-reference/rust/agents/serverless/index.mdx index 63e120e16b..51d0be27a5 100644 --- a/fern/products/sdk-reference/rust/agents/serverless/index.mdx +++ b/fern/products/sdk-reference/rust/agents/serverless/index.mdx @@ -23,12 +23,6 @@ lustri: -## Modules - - - - - ## Source [`src/serverless/mod.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/serverless/mod.rs) diff --git a/fern/products/sdk-reference/rust/agents/skills/builtin/api-ninjas-trivia/api-ninjas-trivia/index.mdx b/fern/products/sdk-reference/rust/agents/skills/builtin/api-ninjas-trivia/api-ninjas-trivia/index.mdx deleted file mode 100644 index b22dc58ad2..0000000000 --- a/fern/products/sdk-reference/rust/agents/skills/builtin/api-ninjas-trivia/api-ninjas-trivia/index.mdx +++ /dev/null @@ -1,178 +0,0 @@ ---- -slug: "/reference/rust/agents/skills/builtin/api-ninjas-trivia/api-ninjas-trivia" -title: "ApiNinjasTrivia" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::skills::builtin::api_ninjas_trivia::ApiNinjasTrivia" - parent: "signalwire::skills::builtin::api_ninjas_trivia" - module: "agents.skills.builtin.api_ninjas_trivia" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/api_ninjas_trivia.rs" - visibility: "public" ---- -# `ApiNinjasTrivia` - -Get trivia questions from API Ninjas (DataMap-based). - -## Signature - -```rust -struct ApiNinjasTrivia { /* fields */ } -``` - -## Inheritance - -**Implements:** `SkillBase` - -## Methods - -### description - -#### Signature - -```rust -fn description(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/skills/builtin/api_ninjas_trivia.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/api_ninjas_trivia.rs) - -Line 41. - -*** - -### name - -#### Signature - -```rust -fn name(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/skills/builtin/api_ninjas_trivia.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/api_ninjas_trivia.rs) - -Line 37. - -*** - -### new - -#### Signature - -```rust -fn new(params: ?) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/skills/builtin/api_ninjas_trivia.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/api_ninjas_trivia.rs) - -Line 29. - -*** - -### params - -#### Signature - -```rust -fn params(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/skills/builtin/api_ninjas_trivia.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/api_ninjas_trivia.rs) - -Line 49. - -*** - -### register\_tools - -#### Signature - -```rust -fn register_tools(&self, agent: &mut ?) -``` - -#### Parameters - - - -#### Source - -[`src/skills/builtin/api_ninjas_trivia.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/api_ninjas_trivia.rs) - -Line 57. - -*** - -### setup - -#### Signature - -```rust -fn setup(&mut self) -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/api_ninjas_trivia.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/api_ninjas_trivia.rs) - -Line 53. - -*** - -### supports\_multiple\_instances - -#### Signature - -```rust -fn supports_multiple_instances(&self) -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/api_ninjas_trivia.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/api_ninjas_trivia.rs) - -Line 45. - -## Source - -[`src/skills/builtin/api_ninjas_trivia.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/api_ninjas_trivia.rs) - -Line 24. diff --git a/fern/products/sdk-reference/rust/agents/skills/builtin/api-ninjas-trivia/index.mdx b/fern/products/sdk-reference/rust/agents/skills/builtin/api-ninjas-trivia/index.mdx index c8f683ddb1..448b7c1bd2 100644 --- a/fern/products/sdk-reference/rust/agents/skills/builtin/api-ninjas-trivia/index.mdx +++ b/fern/products/sdk-reference/rust/agents/skills/builtin/api-ninjas-trivia/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Rust SDK" icon: "rust" lustri: auto_generated: true - kind: "module" + kind: "class" language: "rust" qualified_name: "signalwire::skills::builtin::api_ninjas_trivia" parent: "signalwire::skills::builtin" @@ -15,16 +15,164 @@ lustri: --- # `api_ninjas_trivia` -## Classes +Get trivia questions from API Ninjas (DataMap-based). - - - Get trivia questions from API Ninjas (DataMap-based). - - +## Signature + +```rust +struct ApiNinjasTrivia { /* fields */ } +``` + +## Inheritance + +**Implements:** `SkillBase` + +## Methods + +### description + +#### Signature + +```rust +fn description(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/api_ninjas_trivia.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/api_ninjas_trivia.rs) + +Line 41. + +*** + +### name + +#### Signature + +```rust +fn name(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/api_ninjas_trivia.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/api_ninjas_trivia.rs) + +Line 37. + +*** + +### new + +#### Signature + +```rust +fn new(params: ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/skills/builtin/api_ninjas_trivia.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/api_ninjas_trivia.rs) + +Line 29. + +*** + +### params + +#### Signature + +```rust +fn params(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/skills/builtin/api_ninjas_trivia.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/api_ninjas_trivia.rs) + +Line 49. + +*** + +### register\_tools + +#### Signature + +```rust +fn register_tools(&self, agent: &mut ?) +``` + +#### Parameters + + + +#### Source + +[`src/skills/builtin/api_ninjas_trivia.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/api_ninjas_trivia.rs) + +Line 57. + +*** + +### setup + +#### Signature + +```rust +fn setup(&mut self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/api_ninjas_trivia.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/api_ninjas_trivia.rs) + +Line 53. + +*** + +### supports\_multiple\_instances + +#### Signature + +```rust +fn supports_multiple_instances(&self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/api_ninjas_trivia.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/api_ninjas_trivia.rs) + +Line 45. ## Source [`src/skills/builtin/api_ninjas_trivia.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/api_ninjas_trivia.rs) -Line 1. +Line 24. diff --git a/fern/products/sdk-reference/rust/agents/skills/builtin/claude-skills/claude-skills/index.mdx b/fern/products/sdk-reference/rust/agents/skills/builtin/claude-skills/claude-skills/index.mdx deleted file mode 100644 index c297d4773d..0000000000 --- a/fern/products/sdk-reference/rust/agents/skills/builtin/claude-skills/claude-skills/index.mdx +++ /dev/null @@ -1,218 +0,0 @@ ---- -slug: "/reference/rust/agents/skills/builtin/claude-skills/claude-skills" -title: "ClaudeSkills" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::skills::builtin::claude_skills::ClaudeSkills" - parent: "signalwire::skills::builtin::claude_skills" - module: "agents.skills.builtin.claude_skills" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/claude_skills.rs" - visibility: "public" ---- -# `ClaudeSkills` - -Load Claude SKILL.md files as agent tools (handler-based). - -## Signature - -```rust -struct ClaudeSkills { /* fields */ } -``` - -## Inheritance - -**Implements:** `SkillBase` - -## Methods - -### description - -#### Signature - -```rust -fn description(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/skills/builtin/claude_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/claude_skills.rs) - -Line 25. - -*** - -### get\_hints - -#### Signature - -```rust -fn get_hints(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/skills/builtin/claude_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/claude_skills.rs) - -Line 105. - -*** - -### get\_prompt\_sections - -#### Signature - -```rust -fn get_prompt_sections(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/skills/builtin/claude_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/claude_skills.rs) - -Line 109. - -*** - -### name - -#### Signature - -```rust -fn name(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/skills/builtin/claude_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/claude_skills.rs) - -Line 21. - -*** - -### new - -#### Signature - -```rust -fn new(params: ?) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/skills/builtin/claude_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/claude_skills.rs) - -Line 13. - -*** - -### params - -#### Signature - -```rust -fn params(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/skills/builtin/claude_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/claude_skills.rs) - -Line 33. - -*** - -### register\_tools - -#### Signature - -```rust -fn register_tools(&self, agent: &mut ?) -``` - -#### Parameters - - - -#### Source - -[`src/skills/builtin/claude_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/claude_skills.rs) - -Line 41. - -*** - -### setup - -#### Signature - -```rust -fn setup(&mut self) -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/claude_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/claude_skills.rs) - -Line 37. - -*** - -### supports\_multiple\_instances - -#### Signature - -```rust -fn supports_multiple_instances(&self) -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/claude_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/claude_skills.rs) - -Line 29. - -## Source - -[`src/skills/builtin/claude_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/claude_skills.rs) - -Line 8. diff --git a/fern/products/sdk-reference/rust/agents/skills/builtin/claude-skills/index.mdx b/fern/products/sdk-reference/rust/agents/skills/builtin/claude-skills/index.mdx index 70a54a7990..16d77a684d 100644 --- a/fern/products/sdk-reference/rust/agents/skills/builtin/claude-skills/index.mdx +++ b/fern/products/sdk-reference/rust/agents/skills/builtin/claude-skills/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Rust SDK" icon: "rust" lustri: auto_generated: true - kind: "module" + kind: "class" language: "rust" qualified_name: "signalwire::skills::builtin::claude_skills" parent: "signalwire::skills::builtin" @@ -15,16 +15,204 @@ lustri: --- # `claude_skills` -## Classes +Load Claude SKILL.md files as agent tools (handler-based). - - - Load Claude SKILL.md files as agent tools (handler-based). - - +## Signature + +```rust +struct ClaudeSkills { /* fields */ } +``` + +## Inheritance + +**Implements:** `SkillBase` + +## Methods + +### description + +#### Signature + +```rust +fn description(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/claude_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/claude_skills.rs) + +Line 25. + +*** + +### get\_hints + +#### Signature + +```rust +fn get_hints(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/builtin/claude_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/claude_skills.rs) + +Line 105. + +*** + +### get\_prompt\_sections + +#### Signature + +```rust +fn get_prompt_sections(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/builtin/claude_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/claude_skills.rs) + +Line 109. + +*** + +### name + +#### Signature + +```rust +fn name(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/claude_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/claude_skills.rs) + +Line 21. + +*** + +### new + +#### Signature + +```rust +fn new(params: ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/skills/builtin/claude_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/claude_skills.rs) + +Line 13. + +*** + +### params + +#### Signature + +```rust +fn params(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/skills/builtin/claude_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/claude_skills.rs) + +Line 33. + +*** + +### register\_tools + +#### Signature + +```rust +fn register_tools(&self, agent: &mut ?) +``` + +#### Parameters + + + +#### Source + +[`src/skills/builtin/claude_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/claude_skills.rs) + +Line 41. + +*** + +### setup + +#### Signature + +```rust +fn setup(&mut self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/claude_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/claude_skills.rs) + +Line 37. + +*** + +### supports\_multiple\_instances + +#### Signature + +```rust +fn supports_multiple_instances(&self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/claude_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/claude_skills.rs) + +Line 29. ## Source [`src/skills/builtin/claude_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/claude_skills.rs) -Line 1. +Line 8. diff --git a/fern/products/sdk-reference/rust/agents/skills/builtin/custom-skills/custom-skills/index.mdx b/fern/products/sdk-reference/rust/agents/skills/builtin/custom-skills/custom-skills/index.mdx deleted file mode 100644 index 3d77c6a6e0..0000000000 --- a/fern/products/sdk-reference/rust/agents/skills/builtin/custom-skills/custom-skills/index.mdx +++ /dev/null @@ -1,178 +0,0 @@ ---- -slug: "/reference/rust/agents/skills/builtin/custom-skills/custom-skills" -title: "CustomSkills" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::skills::builtin::custom_skills::CustomSkills" - parent: "signalwire::skills::builtin::custom_skills" - module: "agents.skills.builtin.custom_skills" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/custom_skills.rs" - visibility: "public" ---- -# `CustomSkills` - -Register user-defined custom tools. - -## Signature - -```rust -struct CustomSkills { /* fields */ } -``` - -## Inheritance - -**Implements:** `SkillBase` - -## Methods - -### description - -#### Signature - -```rust -fn description(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/skills/builtin/custom_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/custom_skills.rs) - -Line 24. - -*** - -### name - -#### Signature - -```rust -fn name(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/skills/builtin/custom_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/custom_skills.rs) - -Line 20. - -*** - -### new - -#### Signature - -```rust -fn new(params: ?) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/skills/builtin/custom_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/custom_skills.rs) - -Line 12. - -*** - -### params - -#### Signature - -```rust -fn params(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/skills/builtin/custom_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/custom_skills.rs) - -Line 32. - -*** - -### register\_tools - -#### Signature - -```rust -fn register_tools(&self, agent: &mut ?) -``` - -#### Parameters - - - -#### Source - -[`src/skills/builtin/custom_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/custom_skills.rs) - -Line 40. - -*** - -### setup - -#### Signature - -```rust -fn setup(&mut self) -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/custom_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/custom_skills.rs) - -Line 36. - -*** - -### supports\_multiple\_instances - -#### Signature - -```rust -fn supports_multiple_instances(&self) -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/custom_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/custom_skills.rs) - -Line 28. - -## Source - -[`src/skills/builtin/custom_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/custom_skills.rs) - -Line 7. diff --git a/fern/products/sdk-reference/rust/agents/skills/builtin/custom-skills/index.mdx b/fern/products/sdk-reference/rust/agents/skills/builtin/custom-skills/index.mdx index 6058b862f8..9585c44db6 100644 --- a/fern/products/sdk-reference/rust/agents/skills/builtin/custom-skills/index.mdx +++ b/fern/products/sdk-reference/rust/agents/skills/builtin/custom-skills/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Rust SDK" icon: "rust" lustri: auto_generated: true - kind: "module" + kind: "class" language: "rust" qualified_name: "signalwire::skills::builtin::custom_skills" parent: "signalwire::skills::builtin" @@ -15,16 +15,164 @@ lustri: --- # `custom_skills` -## Classes +Register user-defined custom tools. - - - Register user-defined custom tools. - - +## Signature + +```rust +struct CustomSkills { /* fields */ } +``` + +## Inheritance + +**Implements:** `SkillBase` + +## Methods + +### description + +#### Signature + +```rust +fn description(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/custom_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/custom_skills.rs) + +Line 24. + +*** + +### name + +#### Signature + +```rust +fn name(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/custom_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/custom_skills.rs) + +Line 20. + +*** + +### new + +#### Signature + +```rust +fn new(params: ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/skills/builtin/custom_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/custom_skills.rs) + +Line 12. + +*** + +### params + +#### Signature + +```rust +fn params(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/skills/builtin/custom_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/custom_skills.rs) + +Line 32. + +*** + +### register\_tools + +#### Signature + +```rust +fn register_tools(&self, agent: &mut ?) +``` + +#### Parameters + + + +#### Source + +[`src/skills/builtin/custom_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/custom_skills.rs) + +Line 40. + +*** + +### setup + +#### Signature + +```rust +fn setup(&mut self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/custom_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/custom_skills.rs) + +Line 36. + +*** + +### supports\_multiple\_instances + +#### Signature + +```rust +fn supports_multiple_instances(&self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/custom_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/custom_skills.rs) + +Line 28. ## Source [`src/skills/builtin/custom_skills.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/custom_skills.rs) -Line 1. +Line 7. diff --git a/fern/products/sdk-reference/rust/agents/skills/builtin/datasphere-serverless/datasphere-serverless/index.mdx b/fern/products/sdk-reference/rust/agents/skills/builtin/datasphere-serverless/datasphere-serverless/index.mdx deleted file mode 100644 index 3eb6c09780..0000000000 --- a/fern/products/sdk-reference/rust/agents/skills/builtin/datasphere-serverless/datasphere-serverless/index.mdx +++ /dev/null @@ -1,218 +0,0 @@ ---- -slug: "/reference/rust/agents/skills/builtin/datasphere-serverless/datasphere-serverless" -title: "DatasphereServerless" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::skills::builtin::datasphere_serverless::DatasphereServerless" - parent: "signalwire::skills::builtin::datasphere_serverless" - module: "agents.skills.builtin.datasphere_serverless" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere_serverless.rs" - visibility: "public" ---- -# `DatasphereServerless` - -Search knowledge using SignalWire DataSphere with serverless DataMap execution. - -## Signature - -```rust -struct DatasphereServerless { /* fields */ } -``` - -## Inheritance - -**Implements:** `SkillBase` - -## Methods - -### description - -#### Signature - -```rust -fn description(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/skills/builtin/datasphere_serverless.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere_serverless.rs) - -Line 26. - -*** - -### get\_global\_data - -#### Signature - -```rust -fn get_global_data(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/skills/builtin/datasphere_serverless.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere_serverless.rs) - -Line 125. - -*** - -### get\_prompt\_sections - -#### Signature - -```rust -fn get_prompt_sections(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/skills/builtin/datasphere_serverless.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere_serverless.rs) - -Line 142. - -*** - -### name - -#### Signature - -```rust -fn name(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/skills/builtin/datasphere_serverless.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere_serverless.rs) - -Line 22. - -*** - -### new - -#### Signature - -```rust -fn new(params: ?) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/skills/builtin/datasphere_serverless.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere_serverless.rs) - -Line 14. - -*** - -### params - -#### Signature - -```rust -fn params(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/skills/builtin/datasphere_serverless.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere_serverless.rs) - -Line 34. - -*** - -### register\_tools - -#### Signature - -```rust -fn register_tools(&self, agent: &mut ?) -``` - -#### Parameters - - - -#### Source - -[`src/skills/builtin/datasphere_serverless.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere_serverless.rs) - -Line 47. - -*** - -### setup - -#### Signature - -```rust -fn setup(&mut self) -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/datasphere_serverless.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere_serverless.rs) - -Line 38. - -*** - -### supports\_multiple\_instances - -#### Signature - -```rust -fn supports_multiple_instances(&self) -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/datasphere_serverless.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere_serverless.rs) - -Line 30. - -## Source - -[`src/skills/builtin/datasphere_serverless.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere_serverless.rs) - -Line 9. diff --git a/fern/products/sdk-reference/rust/agents/skills/builtin/datasphere-serverless/index.mdx b/fern/products/sdk-reference/rust/agents/skills/builtin/datasphere-serverless/index.mdx index 369247ede5..d2e0c6ccbd 100644 --- a/fern/products/sdk-reference/rust/agents/skills/builtin/datasphere-serverless/index.mdx +++ b/fern/products/sdk-reference/rust/agents/skills/builtin/datasphere-serverless/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Rust SDK" icon: "rust" lustri: auto_generated: true - kind: "module" + kind: "class" language: "rust" qualified_name: "signalwire::skills::builtin::datasphere_serverless" parent: "signalwire::skills::builtin" @@ -15,16 +15,204 @@ lustri: --- # `datasphere_serverless` -## Classes +Search knowledge using SignalWire DataSphere with serverless DataMap execution. - - - Search knowledge using SignalWire DataSphere with serverless DataMap execution. - - +## Signature + +```rust +struct DatasphereServerless { /* fields */ } +``` + +## Inheritance + +**Implements:** `SkillBase` + +## Methods + +### description + +#### Signature + +```rust +fn description(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/datasphere_serverless.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere_serverless.rs) + +Line 26. + +*** + +### get\_global\_data + +#### Signature + +```rust +fn get_global_data(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/builtin/datasphere_serverless.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere_serverless.rs) + +Line 125. + +*** + +### get\_prompt\_sections + +#### Signature + +```rust +fn get_prompt_sections(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/builtin/datasphere_serverless.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere_serverless.rs) + +Line 142. + +*** + +### name + +#### Signature + +```rust +fn name(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/datasphere_serverless.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere_serverless.rs) + +Line 22. + +*** + +### new + +#### Signature + +```rust +fn new(params: ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/skills/builtin/datasphere_serverless.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere_serverless.rs) + +Line 14. + +*** + +### params + +#### Signature + +```rust +fn params(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/skills/builtin/datasphere_serverless.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere_serverless.rs) + +Line 34. + +*** + +### register\_tools + +#### Signature + +```rust +fn register_tools(&self, agent: &mut ?) +``` + +#### Parameters + + + +#### Source + +[`src/skills/builtin/datasphere_serverless.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere_serverless.rs) + +Line 47. + +*** + +### setup + +#### Signature + +```rust +fn setup(&mut self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/datasphere_serverless.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere_serverless.rs) + +Line 38. + +*** + +### supports\_multiple\_instances + +#### Signature + +```rust +fn supports_multiple_instances(&self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/datasphere_serverless.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere_serverless.rs) + +Line 30. ## Source [`src/skills/builtin/datasphere_serverless.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/datasphere_serverless.rs) -Line 1. +Line 9. diff --git a/fern/products/sdk-reference/rust/agents/skills/builtin/google-maps/google-maps/index.mdx b/fern/products/sdk-reference/rust/agents/skills/builtin/google-maps/google-maps/index.mdx deleted file mode 100644 index a7ac51887d..0000000000 --- a/fern/products/sdk-reference/rust/agents/skills/builtin/google-maps/google-maps/index.mdx +++ /dev/null @@ -1,198 +0,0 @@ ---- -slug: "/reference/rust/agents/skills/builtin/google-maps/google-maps" -title: "GoogleMaps" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::skills::builtin::google_maps::GoogleMaps" - parent: "signalwire::skills::builtin::google_maps" - module: "agents.skills.builtin.google_maps" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/google_maps.rs" - visibility: "public" ---- -# `GoogleMaps` - -Validate addresses and compute driving routes using Google Maps (DataMap-based). - -## Signature - -```rust -struct GoogleMaps { /* fields */ } -``` - -## Inheritance - -**Implements:** `SkillBase` - -## Methods - -### description - -#### Signature - -```rust -fn description(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/skills/builtin/google_maps.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/google_maps.rs) - -Line 24. - -*** - -### get\_hints - -#### Signature - -```rust -fn get_hints(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/skills/builtin/google_maps.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/google_maps.rs) - -Line 157. - -*** - -### get\_prompt\_sections - -#### Signature - -```rust -fn get_prompt_sections(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/skills/builtin/google_maps.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/google_maps.rs) - -Line 168. - -*** - -### name - -#### Signature - -```rust -fn name(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/skills/builtin/google_maps.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/google_maps.rs) - -Line 20. - -*** - -### new - -#### Signature - -```rust -fn new(params: ?) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/skills/builtin/google_maps.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/google_maps.rs) - -Line 12. - -*** - -### params - -#### Signature - -```rust -fn params(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/skills/builtin/google_maps.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/google_maps.rs) - -Line 28. - -*** - -### register\_tools - -#### Signature - -```rust -fn register_tools(&self, agent: &mut ?) -``` - -#### Parameters - - - -#### Source - -[`src/skills/builtin/google_maps.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/google_maps.rs) - -Line 36. - -*** - -### setup - -#### Signature - -```rust -fn setup(&mut self) -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/google_maps.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/google_maps.rs) - -Line 32. - -## Source - -[`src/skills/builtin/google_maps.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/google_maps.rs) - -Line 7. diff --git a/fern/products/sdk-reference/rust/agents/skills/builtin/google-maps/index.mdx b/fern/products/sdk-reference/rust/agents/skills/builtin/google-maps/index.mdx index 26788fa1af..25e8f55d19 100644 --- a/fern/products/sdk-reference/rust/agents/skills/builtin/google-maps/index.mdx +++ b/fern/products/sdk-reference/rust/agents/skills/builtin/google-maps/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Rust SDK" icon: "rust" lustri: auto_generated: true - kind: "module" + kind: "class" language: "rust" qualified_name: "signalwire::skills::builtin::google_maps" parent: "signalwire::skills::builtin" @@ -15,16 +15,184 @@ lustri: --- # `google_maps` -## Classes +Validate addresses and compute driving routes using Google Maps (DataMap-based). - - - Validate addresses and compute driving routes using Google Maps (DataMap-based). - - +## Signature + +```rust +struct GoogleMaps { /* fields */ } +``` + +## Inheritance + +**Implements:** `SkillBase` + +## Methods + +### description + +#### Signature + +```rust +fn description(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/google_maps.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/google_maps.rs) + +Line 24. + +*** + +### get\_hints + +#### Signature + +```rust +fn get_hints(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/builtin/google_maps.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/google_maps.rs) + +Line 157. + +*** + +### get\_prompt\_sections + +#### Signature + +```rust +fn get_prompt_sections(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/builtin/google_maps.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/google_maps.rs) + +Line 168. + +*** + +### name + +#### Signature + +```rust +fn name(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/google_maps.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/google_maps.rs) + +Line 20. + +*** + +### new + +#### Signature + +```rust +fn new(params: ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/skills/builtin/google_maps.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/google_maps.rs) + +Line 12. + +*** + +### params + +#### Signature + +```rust +fn params(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/skills/builtin/google_maps.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/google_maps.rs) + +Line 28. + +*** + +### register\_tools + +#### Signature + +```rust +fn register_tools(&self, agent: &mut ?) +``` + +#### Parameters + + + +#### Source + +[`src/skills/builtin/google_maps.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/google_maps.rs) + +Line 36. + +*** + +### setup + +#### Signature + +```rust +fn setup(&mut self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/google_maps.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/google_maps.rs) + +Line 32. ## Source [`src/skills/builtin/google_maps.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/google_maps.rs) -Line 1. +Line 7. diff --git a/fern/products/sdk-reference/rust/agents/skills/builtin/index.mdx b/fern/products/sdk-reference/rust/agents/skills/builtin/index.mdx index 8c8aebb2b5..03e0469cda 100644 --- a/fern/products/sdk-reference/rust/agents/skills/builtin/index.mdx +++ b/fern/products/sdk-reference/rust/agents/skills/builtin/index.mdx @@ -18,14 +18,38 @@ lustri: ## Classes + + Get trivia questions from API Ninjas (DataMap-based). + + + + Load Claude SKILL.md files as agent tools (handler-based). + + + + Register user-defined custom tools. + + Search knowledge using SignalWire DataSphere RAG stack. + + Search knowledge using SignalWire DataSphere with serverless DataMap execution. + + Get current date, time, and timezone information. + + Validate addresses and compute driving routes using Google Maps (DataMap-based). + + + + Gather answers to a configurable list of questions (handler-based). + + Tell jokes using the API Ninjas joke API (DataMap-based). @@ -34,39 +58,37 @@ lustri: Perform basic mathematical calculations. - - Fast web scraping and crawling capabilities (handler-based). + + Bridge MCP servers with SWAIG functions (handler-based). - - -## Modules - - - - - - - - - - - - - - + + Search document indexes using vector similarity and keyword search (handler-based). + - + + Control background file playback (DataMap-based). + - + + Fast web scraping and crawling capabilities (handler-based). + - + + Transfer calls between agents based on pattern matching (DataMap-based). + - + + Get current weather information from WeatherAPI.com (DataMap-based). + - + + Search the web using Google Custom Search API. + - + + Search Wikipedia and get article summaries. + ## Source diff --git a/fern/products/sdk-reference/rust/agents/skills/builtin/info-gatherer/index.mdx b/fern/products/sdk-reference/rust/agents/skills/builtin/info-gatherer/index.mdx index d0ba5ed46b..3167d9bf17 100644 --- a/fern/products/sdk-reference/rust/agents/skills/builtin/info-gatherer/index.mdx +++ b/fern/products/sdk-reference/rust/agents/skills/builtin/info-gatherer/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Rust SDK" icon: "rust" lustri: auto_generated: true - kind: "module" + kind: "class" language: "rust" qualified_name: "signalwire::skills::builtin::info_gatherer" parent: "signalwire::skills::builtin" @@ -15,16 +15,204 @@ lustri: --- # `info_gatherer` -## Classes +Gather answers to a configurable list of questions (handler-based). - - - Gather answers to a configurable list of questions (handler-based). - - +## Signature + +```rust +struct InfoGatherer { /* fields */ } +``` + +## Inheritance + +**Implements:** `SkillBase` + +## Methods + +### description + +#### Signature + +```rust +fn description(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/info_gatherer.rs) + +Line 25. + +*** + +### get\_global\_data + +#### Signature + +```rust +fn get_global_data(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/builtin/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/info_gatherer.rs) + +Line 171. + +*** + +### get\_prompt\_sections + +#### Signature + +```rust +fn get_prompt_sections(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/builtin/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/info_gatherer.rs) + +Line 187. + +*** + +### name + +#### Signature + +```rust +fn name(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/info_gatherer.rs) + +Line 21. + +*** + +### new + +#### Signature + +```rust +fn new(params: ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/skills/builtin/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/info_gatherer.rs) + +Line 13. + +*** + +### params + +#### Signature + +```rust +fn params(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/skills/builtin/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/info_gatherer.rs) + +Line 33. + +*** + +### register\_tools + +#### Signature + +```rust +fn register_tools(&self, agent: &mut ?) +``` + +#### Parameters + + + +#### Source + +[`src/skills/builtin/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/info_gatherer.rs) + +Line 42. + +*** + +### setup + +#### Signature + +```rust +fn setup(&mut self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/info_gatherer.rs) + +Line 37. + +*** + +### supports\_multiple\_instances + +#### Signature + +```rust +fn supports_multiple_instances(&self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/info_gatherer.rs) + +Line 29. ## Source [`src/skills/builtin/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/info_gatherer.rs) -Line 1. +Line 8. diff --git a/fern/products/sdk-reference/rust/agents/skills/builtin/info-gatherer/info-gatherer/index.mdx b/fern/products/sdk-reference/rust/agents/skills/builtin/info-gatherer/info-gatherer/index.mdx deleted file mode 100644 index 5caf9790e5..0000000000 --- a/fern/products/sdk-reference/rust/agents/skills/builtin/info-gatherer/info-gatherer/index.mdx +++ /dev/null @@ -1,218 +0,0 @@ ---- -slug: "/reference/rust/agents/skills/builtin/info-gatherer/info-gatherer" -title: "InfoGatherer" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::skills::builtin::info_gatherer::InfoGatherer" - parent: "signalwire::skills::builtin::info_gatherer" - module: "agents.skills.builtin.info_gatherer" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/info_gatherer.rs" - visibility: "public" ---- -# `InfoGatherer` - -Gather answers to a configurable list of questions (handler-based). - -## Signature - -```rust -struct InfoGatherer { /* fields */ } -``` - -## Inheritance - -**Implements:** `SkillBase` - -## Methods - -### description - -#### Signature - -```rust -fn description(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/skills/builtin/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/info_gatherer.rs) - -Line 25. - -*** - -### get\_global\_data - -#### Signature - -```rust -fn get_global_data(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/skills/builtin/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/info_gatherer.rs) - -Line 171. - -*** - -### get\_prompt\_sections - -#### Signature - -```rust -fn get_prompt_sections(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/skills/builtin/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/info_gatherer.rs) - -Line 187. - -*** - -### name - -#### Signature - -```rust -fn name(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/skills/builtin/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/info_gatherer.rs) - -Line 21. - -*** - -### new - -#### Signature - -```rust -fn new(params: ?) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/skills/builtin/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/info_gatherer.rs) - -Line 13. - -*** - -### params - -#### Signature - -```rust -fn params(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/skills/builtin/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/info_gatherer.rs) - -Line 33. - -*** - -### register\_tools - -#### Signature - -```rust -fn register_tools(&self, agent: &mut ?) -``` - -#### Parameters - - - -#### Source - -[`src/skills/builtin/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/info_gatherer.rs) - -Line 42. - -*** - -### setup - -#### Signature - -```rust -fn setup(&mut self) -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/info_gatherer.rs) - -Line 37. - -*** - -### supports\_multiple\_instances - -#### Signature - -```rust -fn supports_multiple_instances(&self) -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/info_gatherer.rs) - -Line 29. - -## Source - -[`src/skills/builtin/info_gatherer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/info_gatherer.rs) - -Line 8. diff --git a/fern/products/sdk-reference/rust/agents/skills/builtin/mcp-gateway/index.mdx b/fern/products/sdk-reference/rust/agents/skills/builtin/mcp-gateway/index.mdx index 0d337227b2..3273e4b69c 100644 --- a/fern/products/sdk-reference/rust/agents/skills/builtin/mcp-gateway/index.mdx +++ b/fern/products/sdk-reference/rust/agents/skills/builtin/mcp-gateway/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Rust SDK" icon: "rust" lustri: auto_generated: true - kind: "module" + kind: "class" language: "rust" qualified_name: "signalwire::skills::builtin::mcp_gateway" parent: "signalwire::skills::builtin" @@ -15,16 +15,204 @@ lustri: --- # `mcp_gateway` -## Classes +Bridge MCP servers with SWAIG functions (handler-based). - - - Bridge MCP servers with SWAIG functions (handler-based). - - +## Signature + +```rust +struct McpGateway { /* fields */ } +``` + +## Inheritance + +**Implements:** `SkillBase` + +## Methods + +### description + +#### Signature + +```rust +fn description(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/mcp_gateway.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/mcp_gateway.rs) + +Line 25. + +*** + +### get\_global\_data + +#### Signature + +```rust +fn get_global_data(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/builtin/mcp_gateway.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/mcp_gateway.rs) + +Line 201. + +*** + +### get\_hints + +#### Signature + +```rust +fn get_hints(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/builtin/mcp_gateway.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/mcp_gateway.rs) + +Line 185. + +*** + +### get\_prompt\_sections + +#### Signature + +```rust +fn get_prompt_sections(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/builtin/mcp_gateway.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/mcp_gateway.rs) + +Line 218. + +*** + +### name + +#### Signature + +```rust +fn name(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/mcp_gateway.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/mcp_gateway.rs) + +Line 21. + +*** + +### new + +#### Signature + +```rust +fn new(params: ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/skills/builtin/mcp_gateway.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/mcp_gateway.rs) + +Line 13. + +*** + +### params + +#### Signature + +```rust +fn params(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/skills/builtin/mcp_gateway.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/mcp_gateway.rs) + +Line 29. + +*** + +### register\_tools + +#### Signature + +```rust +fn register_tools(&self, agent: &mut ?) +``` + +#### Parameters + + + +#### Source + +[`src/skills/builtin/mcp_gateway.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/mcp_gateway.rs) + +Line 37. + +*** + +### setup + +#### Signature + +```rust +fn setup(&mut self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/mcp_gateway.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/mcp_gateway.rs) + +Line 33. ## Source [`src/skills/builtin/mcp_gateway.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/mcp_gateway.rs) -Line 1. +Line 8. diff --git a/fern/products/sdk-reference/rust/agents/skills/builtin/mcp-gateway/mcp-gateway/index.mdx b/fern/products/sdk-reference/rust/agents/skills/builtin/mcp-gateway/mcp-gateway/index.mdx deleted file mode 100644 index 000e4c1e5f..0000000000 --- a/fern/products/sdk-reference/rust/agents/skills/builtin/mcp-gateway/mcp-gateway/index.mdx +++ /dev/null @@ -1,218 +0,0 @@ ---- -slug: "/reference/rust/agents/skills/builtin/mcp-gateway/mcp-gateway" -title: "McpGateway" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::skills::builtin::mcp_gateway::McpGateway" - parent: "signalwire::skills::builtin::mcp_gateway" - module: "agents.skills.builtin.mcp_gateway" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/mcp_gateway.rs" - visibility: "public" ---- -# `McpGateway` - -Bridge MCP servers with SWAIG functions (handler-based). - -## Signature - -```rust -struct McpGateway { /* fields */ } -``` - -## Inheritance - -**Implements:** `SkillBase` - -## Methods - -### description - -#### Signature - -```rust -fn description(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/skills/builtin/mcp_gateway.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/mcp_gateway.rs) - -Line 25. - -*** - -### get\_global\_data - -#### Signature - -```rust -fn get_global_data(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/skills/builtin/mcp_gateway.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/mcp_gateway.rs) - -Line 201. - -*** - -### get\_hints - -#### Signature - -```rust -fn get_hints(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/skills/builtin/mcp_gateway.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/mcp_gateway.rs) - -Line 185. - -*** - -### get\_prompt\_sections - -#### Signature - -```rust -fn get_prompt_sections(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/skills/builtin/mcp_gateway.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/mcp_gateway.rs) - -Line 218. - -*** - -### name - -#### Signature - -```rust -fn name(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/skills/builtin/mcp_gateway.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/mcp_gateway.rs) - -Line 21. - -*** - -### new - -#### Signature - -```rust -fn new(params: ?) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/skills/builtin/mcp_gateway.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/mcp_gateway.rs) - -Line 13. - -*** - -### params - -#### Signature - -```rust -fn params(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/skills/builtin/mcp_gateway.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/mcp_gateway.rs) - -Line 29. - -*** - -### register\_tools - -#### Signature - -```rust -fn register_tools(&self, agent: &mut ?) -``` - -#### Parameters - - - -#### Source - -[`src/skills/builtin/mcp_gateway.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/mcp_gateway.rs) - -Line 37. - -*** - -### setup - -#### Signature - -```rust -fn setup(&mut self) -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/mcp_gateway.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/mcp_gateway.rs) - -Line 33. - -## Source - -[`src/skills/builtin/mcp_gateway.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/mcp_gateway.rs) - -Line 8. diff --git a/fern/products/sdk-reference/rust/agents/skills/builtin/native-vector-search/index.mdx b/fern/products/sdk-reference/rust/agents/skills/builtin/native-vector-search/index.mdx index dca0294248..22aa66de97 100644 --- a/fern/products/sdk-reference/rust/agents/skills/builtin/native-vector-search/index.mdx +++ b/fern/products/sdk-reference/rust/agents/skills/builtin/native-vector-search/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Rust SDK" icon: "rust" lustri: auto_generated: true - kind: "module" + kind: "class" language: "rust" qualified_name: "signalwire::skills::builtin::native_vector_search" parent: "signalwire::skills::builtin" @@ -15,16 +15,184 @@ lustri: --- # `native_vector_search` -## Classes +Search document indexes using vector similarity and keyword search (handler-based). - - - Search document indexes using vector similarity and keyword search (handler-based). - - +## Signature + +```rust +struct NativeVectorSearch { /* fields */ } +``` + +## Inheritance + +**Implements:** `SkillBase` + +## Methods + +### description + +#### Signature + +```rust +fn description(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/native_vector_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/native_vector_search.rs) + +Line 25. + +*** + +### get\_hints + +#### Signature + +```rust +fn get_hints(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/builtin/native_vector_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/native_vector_search.rs) + +Line 98. + +*** + +### name + +#### Signature + +```rust +fn name(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/native_vector_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/native_vector_search.rs) + +Line 21. + +*** + +### new + +#### Signature + +```rust +fn new(params: ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/skills/builtin/native_vector_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/native_vector_search.rs) + +Line 13. + +*** + +### params + +#### Signature + +```rust +fn params(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/skills/builtin/native_vector_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/native_vector_search.rs) + +Line 33. + +*** + +### register\_tools + +#### Signature + +```rust +fn register_tools(&self, agent: &mut ?) +``` + +#### Parameters + + + +#### Source + +[`src/skills/builtin/native_vector_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/native_vector_search.rs) + +Line 41. + +*** + +### setup + +#### Signature + +```rust +fn setup(&mut self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/native_vector_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/native_vector_search.rs) + +Line 37. + +*** + +### supports\_multiple\_instances + +#### Signature + +```rust +fn supports_multiple_instances(&self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/native_vector_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/native_vector_search.rs) + +Line 29. ## Source [`src/skills/builtin/native_vector_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/native_vector_search.rs) -Line 1. +Line 8. diff --git a/fern/products/sdk-reference/rust/agents/skills/builtin/native-vector-search/native-vector-search/index.mdx b/fern/products/sdk-reference/rust/agents/skills/builtin/native-vector-search/native-vector-search/index.mdx deleted file mode 100644 index 4375c7bced..0000000000 --- a/fern/products/sdk-reference/rust/agents/skills/builtin/native-vector-search/native-vector-search/index.mdx +++ /dev/null @@ -1,198 +0,0 @@ ---- -slug: "/reference/rust/agents/skills/builtin/native-vector-search/native-vector-search" -title: "NativeVectorSearch" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::skills::builtin::native_vector_search::NativeVectorSearch" - parent: "signalwire::skills::builtin::native_vector_search" - module: "agents.skills.builtin.native_vector_search" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/native_vector_search.rs" - visibility: "public" ---- -# `NativeVectorSearch` - -Search document indexes using vector similarity and keyword search (handler-based). - -## Signature - -```rust -struct NativeVectorSearch { /* fields */ } -``` - -## Inheritance - -**Implements:** `SkillBase` - -## Methods - -### description - -#### Signature - -```rust -fn description(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/skills/builtin/native_vector_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/native_vector_search.rs) - -Line 25. - -*** - -### get\_hints - -#### Signature - -```rust -fn get_hints(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/skills/builtin/native_vector_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/native_vector_search.rs) - -Line 98. - -*** - -### name - -#### Signature - -```rust -fn name(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/skills/builtin/native_vector_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/native_vector_search.rs) - -Line 21. - -*** - -### new - -#### Signature - -```rust -fn new(params: ?) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/skills/builtin/native_vector_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/native_vector_search.rs) - -Line 13. - -*** - -### params - -#### Signature - -```rust -fn params(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/skills/builtin/native_vector_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/native_vector_search.rs) - -Line 33. - -*** - -### register\_tools - -#### Signature - -```rust -fn register_tools(&self, agent: &mut ?) -``` - -#### Parameters - - - -#### Source - -[`src/skills/builtin/native_vector_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/native_vector_search.rs) - -Line 41. - -*** - -### setup - -#### Signature - -```rust -fn setup(&mut self) -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/native_vector_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/native_vector_search.rs) - -Line 37. - -*** - -### supports\_multiple\_instances - -#### Signature - -```rust -fn supports_multiple_instances(&self) -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/native_vector_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/native_vector_search.rs) - -Line 29. - -## Source - -[`src/skills/builtin/native_vector_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/native_vector_search.rs) - -Line 8. diff --git a/fern/products/sdk-reference/rust/agents/skills/builtin/play-background-file/index.mdx b/fern/products/sdk-reference/rust/agents/skills/builtin/play-background-file/index.mdx index ae12926158..e0e6a06476 100644 --- a/fern/products/sdk-reference/rust/agents/skills/builtin/play-background-file/index.mdx +++ b/fern/products/sdk-reference/rust/agents/skills/builtin/play-background-file/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Rust SDK" icon: "rust" lustri: auto_generated: true - kind: "module" + kind: "class" language: "rust" qualified_name: "signalwire::skills::builtin::play_background_file" parent: "signalwire::skills::builtin" @@ -15,16 +15,164 @@ lustri: --- # `play_background_file` -## Classes +Control background file playback (DataMap-based). - - - Control background file playback (DataMap-based). - - +## Signature + +```rust +struct PlayBackgroundFile { /* fields */ } +``` + +## Inheritance + +**Implements:** `SkillBase` + +## Methods + +### description + +#### Signature + +```rust +fn description(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/play_background_file.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/play_background_file.rs) + +Line 24. + +*** + +### name + +#### Signature + +```rust +fn name(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/play_background_file.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/play_background_file.rs) + +Line 20. + +*** + +### new + +#### Signature + +```rust +fn new(params: ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/skills/builtin/play_background_file.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/play_background_file.rs) + +Line 12. + +*** + +### params + +#### Signature + +```rust +fn params(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/skills/builtin/play_background_file.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/play_background_file.rs) + +Line 32. + +*** + +### register\_tools + +#### Signature + +```rust +fn register_tools(&self, agent: &mut ?) +``` + +#### Parameters + + + +#### Source + +[`src/skills/builtin/play_background_file.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/play_background_file.rs) + +Line 41. + +*** + +### setup + +#### Signature + +```rust +fn setup(&mut self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/play_background_file.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/play_background_file.rs) + +Line 36. + +*** + +### supports\_multiple\_instances + +#### Signature + +```rust +fn supports_multiple_instances(&self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/play_background_file.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/play_background_file.rs) + +Line 28. ## Source [`src/skills/builtin/play_background_file.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/play_background_file.rs) -Line 1. +Line 7. diff --git a/fern/products/sdk-reference/rust/agents/skills/builtin/play-background-file/play-background-file/index.mdx b/fern/products/sdk-reference/rust/agents/skills/builtin/play-background-file/play-background-file/index.mdx deleted file mode 100644 index 6cf4a73815..0000000000 --- a/fern/products/sdk-reference/rust/agents/skills/builtin/play-background-file/play-background-file/index.mdx +++ /dev/null @@ -1,178 +0,0 @@ ---- -slug: "/reference/rust/agents/skills/builtin/play-background-file/play-background-file" -title: "PlayBackgroundFile" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::skills::builtin::play_background_file::PlayBackgroundFile" - parent: "signalwire::skills::builtin::play_background_file" - module: "agents.skills.builtin.play_background_file" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/play_background_file.rs" - visibility: "public" ---- -# `PlayBackgroundFile` - -Control background file playback (DataMap-based). - -## Signature - -```rust -struct PlayBackgroundFile { /* fields */ } -``` - -## Inheritance - -**Implements:** `SkillBase` - -## Methods - -### description - -#### Signature - -```rust -fn description(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/skills/builtin/play_background_file.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/play_background_file.rs) - -Line 24. - -*** - -### name - -#### Signature - -```rust -fn name(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/skills/builtin/play_background_file.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/play_background_file.rs) - -Line 20. - -*** - -### new - -#### Signature - -```rust -fn new(params: ?) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/skills/builtin/play_background_file.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/play_background_file.rs) - -Line 12. - -*** - -### params - -#### Signature - -```rust -fn params(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/skills/builtin/play_background_file.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/play_background_file.rs) - -Line 32. - -*** - -### register\_tools - -#### Signature - -```rust -fn register_tools(&self, agent: &mut ?) -``` - -#### Parameters - - - -#### Source - -[`src/skills/builtin/play_background_file.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/play_background_file.rs) - -Line 41. - -*** - -### setup - -#### Signature - -```rust -fn setup(&mut self) -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/play_background_file.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/play_background_file.rs) - -Line 36. - -*** - -### supports\_multiple\_instances - -#### Signature - -```rust -fn supports_multiple_instances(&self) -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/play_background_file.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/play_background_file.rs) - -Line 28. - -## Source - -[`src/skills/builtin/play_background_file.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/play_background_file.rs) - -Line 7. diff --git a/fern/products/sdk-reference/rust/agents/skills/builtin/swml-transfer/index.mdx b/fern/products/sdk-reference/rust/agents/skills/builtin/swml-transfer/index.mdx index d6555b310a..33a2c418a6 100644 --- a/fern/products/sdk-reference/rust/agents/skills/builtin/swml-transfer/index.mdx +++ b/fern/products/sdk-reference/rust/agents/skills/builtin/swml-transfer/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Rust SDK" icon: "rust" lustri: auto_generated: true - kind: "module" + kind: "class" language: "rust" qualified_name: "signalwire::skills::builtin::swml_transfer" parent: "signalwire::skills::builtin" @@ -15,16 +15,204 @@ lustri: --- # `swml_transfer` -## Classes +Transfer calls between agents based on pattern matching (DataMap-based). - - - Transfer calls between agents based on pattern matching (DataMap-based). - - +## Signature + +```rust +struct SwmlTransfer { /* fields */ } +``` + +## Inheritance + +**Implements:** `SkillBase` + +## Methods + +### description + +#### Signature + +```rust +fn description(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/swml_transfer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/swml_transfer.rs) + +Line 24. + +*** + +### get\_hints + +#### Signature + +```rust +fn get_hints(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/builtin/swml_transfer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/swml_transfer.rs) + +Line 169. + +*** + +### get\_prompt\_sections + +#### Signature + +```rust +fn get_prompt_sections(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/builtin/swml_transfer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/swml_transfer.rs) + +Line 190. + +*** + +### name + +#### Signature + +```rust +fn name(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/swml_transfer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/swml_transfer.rs) + +Line 20. + +*** + +### new + +#### Signature + +```rust +fn new(params: ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/skills/builtin/swml_transfer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/swml_transfer.rs) + +Line 12. + +*** + +### params + +#### Signature + +```rust +fn params(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/skills/builtin/swml_transfer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/swml_transfer.rs) + +Line 32. + +*** + +### register\_tools + +#### Signature + +```rust +fn register_tools(&self, agent: &mut ?) +``` + +#### Parameters + + + +#### Source + +[`src/skills/builtin/swml_transfer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/swml_transfer.rs) + +Line 45. + +*** + +### setup + +#### Signature + +```rust +fn setup(&mut self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/swml_transfer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/swml_transfer.rs) + +Line 36. + +*** + +### supports\_multiple\_instances + +#### Signature + +```rust +fn supports_multiple_instances(&self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/swml_transfer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/swml_transfer.rs) + +Line 28. ## Source [`src/skills/builtin/swml_transfer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/swml_transfer.rs) -Line 1. +Line 7. diff --git a/fern/products/sdk-reference/rust/agents/skills/builtin/swml-transfer/swml-transfer/index.mdx b/fern/products/sdk-reference/rust/agents/skills/builtin/swml-transfer/swml-transfer/index.mdx deleted file mode 100644 index dc7b929015..0000000000 --- a/fern/products/sdk-reference/rust/agents/skills/builtin/swml-transfer/swml-transfer/index.mdx +++ /dev/null @@ -1,218 +0,0 @@ ---- -slug: "/reference/rust/agents/skills/builtin/swml-transfer/swml-transfer" -title: "SwmlTransfer" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::skills::builtin::swml_transfer::SwmlTransfer" - parent: "signalwire::skills::builtin::swml_transfer" - module: "agents.skills.builtin.swml_transfer" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/swml_transfer.rs" - visibility: "public" ---- -# `SwmlTransfer` - -Transfer calls between agents based on pattern matching (DataMap-based). - -## Signature - -```rust -struct SwmlTransfer { /* fields */ } -``` - -## Inheritance - -**Implements:** `SkillBase` - -## Methods - -### description - -#### Signature - -```rust -fn description(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/skills/builtin/swml_transfer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/swml_transfer.rs) - -Line 24. - -*** - -### get\_hints - -#### Signature - -```rust -fn get_hints(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/skills/builtin/swml_transfer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/swml_transfer.rs) - -Line 169. - -*** - -### get\_prompt\_sections - -#### Signature - -```rust -fn get_prompt_sections(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/skills/builtin/swml_transfer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/swml_transfer.rs) - -Line 190. - -*** - -### name - -#### Signature - -```rust -fn name(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/skills/builtin/swml_transfer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/swml_transfer.rs) - -Line 20. - -*** - -### new - -#### Signature - -```rust -fn new(params: ?) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/skills/builtin/swml_transfer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/swml_transfer.rs) - -Line 12. - -*** - -### params - -#### Signature - -```rust -fn params(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/skills/builtin/swml_transfer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/swml_transfer.rs) - -Line 32. - -*** - -### register\_tools - -#### Signature - -```rust -fn register_tools(&self, agent: &mut ?) -``` - -#### Parameters - - - -#### Source - -[`src/skills/builtin/swml_transfer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/swml_transfer.rs) - -Line 45. - -*** - -### setup - -#### Signature - -```rust -fn setup(&mut self) -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/swml_transfer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/swml_transfer.rs) - -Line 36. - -*** - -### supports\_multiple\_instances - -#### Signature - -```rust -fn supports_multiple_instances(&self) -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/swml_transfer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/swml_transfer.rs) - -Line 28. - -## Source - -[`src/skills/builtin/swml_transfer.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/swml_transfer.rs) - -Line 7. diff --git a/fern/products/sdk-reference/rust/agents/skills/builtin/weather-api/index.mdx b/fern/products/sdk-reference/rust/agents/skills/builtin/weather-api/index.mdx index 58bf581718..cf5f8cb549 100644 --- a/fern/products/sdk-reference/rust/agents/skills/builtin/weather-api/index.mdx +++ b/fern/products/sdk-reference/rust/agents/skills/builtin/weather-api/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Rust SDK" icon: "rust" lustri: auto_generated: true - kind: "module" + kind: "class" language: "rust" qualified_name: "signalwire::skills::builtin::weather_api" parent: "signalwire::skills::builtin" @@ -15,16 +15,144 @@ lustri: --- # `weather_api` -## Classes +Get current weather information from WeatherAPI.com (DataMap-based). - - - Get current weather information from WeatherAPI.com (DataMap-based). - - +## Signature + +```rust +struct WeatherApi { /* fields */ } +``` + +## Inheritance + +**Implements:** `SkillBase` + +## Methods + +### description + +#### Signature + +```rust +fn description(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/weather_api.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/weather_api.rs) + +Line 24. + +*** + +### name + +#### Signature + +```rust +fn name(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/weather_api.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/weather_api.rs) + +Line 20. + +*** + +### new + +#### Signature + +```rust +fn new(params: ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/skills/builtin/weather_api.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/weather_api.rs) + +Line 12. + +*** + +### params + +#### Signature + +```rust +fn params(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/skills/builtin/weather_api.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/weather_api.rs) + +Line 28. + +*** + +### register\_tools + +#### Signature + +```rust +fn register_tools(&self, agent: &mut ?) +``` + +#### Parameters + + + +#### Source + +[`src/skills/builtin/weather_api.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/weather_api.rs) + +Line 36. + +*** + +### setup + +#### Signature + +```rust +fn setup(&mut self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/weather_api.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/weather_api.rs) + +Line 32. ## Source [`src/skills/builtin/weather_api.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/weather_api.rs) -Line 1. +Line 7. diff --git a/fern/products/sdk-reference/rust/agents/skills/builtin/weather-api/weather-api/index.mdx b/fern/products/sdk-reference/rust/agents/skills/builtin/weather-api/weather-api/index.mdx deleted file mode 100644 index cf6e0a1b54..0000000000 --- a/fern/products/sdk-reference/rust/agents/skills/builtin/weather-api/weather-api/index.mdx +++ /dev/null @@ -1,158 +0,0 @@ ---- -slug: "/reference/rust/agents/skills/builtin/weather-api/weather-api" -title: "WeatherApi" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::skills::builtin::weather_api::WeatherApi" - parent: "signalwire::skills::builtin::weather_api" - module: "agents.skills.builtin.weather_api" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/weather_api.rs" - visibility: "public" ---- -# `WeatherApi` - -Get current weather information from WeatherAPI.com (DataMap-based). - -## Signature - -```rust -struct WeatherApi { /* fields */ } -``` - -## Inheritance - -**Implements:** `SkillBase` - -## Methods - -### description - -#### Signature - -```rust -fn description(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/skills/builtin/weather_api.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/weather_api.rs) - -Line 24. - -*** - -### name - -#### Signature - -```rust -fn name(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/skills/builtin/weather_api.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/weather_api.rs) - -Line 20. - -*** - -### new - -#### Signature - -```rust -fn new(params: ?) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/skills/builtin/weather_api.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/weather_api.rs) - -Line 12. - -*** - -### params - -#### Signature - -```rust -fn params(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/skills/builtin/weather_api.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/weather_api.rs) - -Line 28. - -*** - -### register\_tools - -#### Signature - -```rust -fn register_tools(&self, agent: &mut ?) -``` - -#### Parameters - - - -#### Source - -[`src/skills/builtin/weather_api.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/weather_api.rs) - -Line 36. - -*** - -### setup - -#### Signature - -```rust -fn setup(&mut self) -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/weather_api.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/weather_api.rs) - -Line 32. - -## Source - -[`src/skills/builtin/weather_api.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/weather_api.rs) - -Line 7. diff --git a/fern/products/sdk-reference/rust/agents/skills/builtin/web-search/index.mdx b/fern/products/sdk-reference/rust/agents/skills/builtin/web-search/index.mdx index 86fe0c7cc9..404f011ec1 100644 --- a/fern/products/sdk-reference/rust/agents/skills/builtin/web-search/index.mdx +++ b/fern/products/sdk-reference/rust/agents/skills/builtin/web-search/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Rust SDK" icon: "rust" lustri: auto_generated: true - kind: "module" + kind: "class" language: "rust" qualified_name: "signalwire::skills::builtin::web_search" parent: "signalwire::skills::builtin" @@ -15,16 +15,257 @@ lustri: --- # `web_search` -## Classes +Search the web using Google Custom Search API. - - - Search the web using Google Custom Search API. - - +Mirrors Python's `signalwire.skills.web_search`: the SDK issues a +real HTTP GET to Google CSE (`https://www.googleapis.com/customsearch/v1`) +with the query, key, and CSE ID in the query string, and parses the +JSON response. The base URL can be overridden via the +`WEB_SEARCH_BASE_URL` env var (used by `audit_skills_dispatch.py`'s +fixture). Without that override, the URL points at Google. + +## Signature + +```rust +struct WebSearch { /* fields */ } +``` + +## Inheritance + +**Implements:** `SkillBase` + +## Methods + +### description + +#### Signature + +```rust +fn description(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/web_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/web_search.rs) + +Line 44. + +*** + +### get\_global\_data + +#### Signature + +```rust +fn get_global_data(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/builtin/web_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/web_search.rs) + +Line 248. + +*** + +### get\_parameter\_schema + +Advertise the accepted parameters, including the latency-control set +(Python `WebSearchSkill.get_parameter_schema`, commit 295745b). Every +param `register_tools` reads must appear here so it is discoverable; +the inline test module guards against the recurring "read a param but +forgot the schema entry" drift class. + +#### Signature + +```rust +fn get_parameter_schema(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/builtin/web_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/web_search.rs) + +Line 278. + +*** + +### get\_prompt\_sections + +#### Signature + +```rust +fn get_prompt_sections(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/builtin/web_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/web_search.rs) + +Line 258. + +*** + +### name + +#### Signature + +```rust +fn name(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/web_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/web_search.rs) + +Line 40. + +*** + +### new + +#### Signature + +```rust +fn new(params: ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/skills/builtin/web_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/web_search.rs) + +Line 32. + +*** + +### params + +#### Signature + +```rust +fn params(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/skills/builtin/web_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/web_search.rs) + +Line 56. + +*** + +### register\_tools + +#### Signature + +```rust +fn register_tools(&self, agent: &mut ?) +``` + +#### Parameters + + + +#### Source + +[`src/skills/builtin/web_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/web_search.rs) + +Line 73. + +*** + +### setup + +#### Signature + +```rust +fn setup(&mut self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/web_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/web_search.rs) + +Line 60. + +*** + +### supports\_multiple\_instances + +#### Signature + +```rust +fn supports_multiple_instances(&self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/web_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/web_search.rs) + +Line 52. + +*** + +### version + +#### Signature + +```rust +fn version(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/web_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/web_search.rs) + +Line 48. ## Source [`src/skills/builtin/web_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/web_search.rs) -Line 1. +Line 27. diff --git a/fern/products/sdk-reference/rust/agents/skills/builtin/web-search/web-search/index.mdx b/fern/products/sdk-reference/rust/agents/skills/builtin/web-search/web-search/index.mdx deleted file mode 100644 index af749b196b..0000000000 --- a/fern/products/sdk-reference/rust/agents/skills/builtin/web-search/web-search/index.mdx +++ /dev/null @@ -1,271 +0,0 @@ ---- -slug: "/reference/rust/agents/skills/builtin/web-search/web-search" -title: "WebSearch" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::skills::builtin::web_search::WebSearch" - parent: "signalwire::skills::builtin::web_search" - module: "agents.skills.builtin.web_search" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/web_search.rs" - visibility: "public" ---- -# `WebSearch` - -Search the web using Google Custom Search API. - -Mirrors Python's `signalwire.skills.web_search`: the SDK issues a -real HTTP GET to Google CSE (`https://www.googleapis.com/customsearch/v1`) -with the query, key, and CSE ID in the query string, and parses the -JSON response. The base URL can be overridden via the -`WEB_SEARCH_BASE_URL` env var (used by `audit_skills_dispatch.py`'s -fixture). Without that override, the URL points at Google. - -## Signature - -```rust -struct WebSearch { /* fields */ } -``` - -## Inheritance - -**Implements:** `SkillBase` - -## Methods - -### description - -#### Signature - -```rust -fn description(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/skills/builtin/web_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/web_search.rs) - -Line 44. - -*** - -### get\_global\_data - -#### Signature - -```rust -fn get_global_data(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/skills/builtin/web_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/web_search.rs) - -Line 248. - -*** - -### get\_parameter\_schema - -Advertise the accepted parameters, including the latency-control set -(Python `WebSearchSkill.get_parameter_schema`, commit 295745b). Every -param `register_tools` reads must appear here so it is discoverable; -the inline test module guards against the recurring "read a param but -forgot the schema entry" drift class. - -#### Signature - -```rust -fn get_parameter_schema(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/skills/builtin/web_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/web_search.rs) - -Line 278. - -*** - -### get\_prompt\_sections - -#### Signature - -```rust -fn get_prompt_sections(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/skills/builtin/web_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/web_search.rs) - -Line 258. - -*** - -### name - -#### Signature - -```rust -fn name(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/skills/builtin/web_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/web_search.rs) - -Line 40. - -*** - -### new - -#### Signature - -```rust -fn new(params: ?) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/skills/builtin/web_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/web_search.rs) - -Line 32. - -*** - -### params - -#### Signature - -```rust -fn params(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/skills/builtin/web_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/web_search.rs) - -Line 56. - -*** - -### register\_tools - -#### Signature - -```rust -fn register_tools(&self, agent: &mut ?) -``` - -#### Parameters - - - -#### Source - -[`src/skills/builtin/web_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/web_search.rs) - -Line 73. - -*** - -### setup - -#### Signature - -```rust -fn setup(&mut self) -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/web_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/web_search.rs) - -Line 60. - -*** - -### supports\_multiple\_instances - -#### Signature - -```rust -fn supports_multiple_instances(&self) -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/web_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/web_search.rs) - -Line 52. - -*** - -### version - -#### Signature - -```rust -fn version(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/skills/builtin/web_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/web_search.rs) - -Line 48. - -## Source - -[`src/skills/builtin/web_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/web_search.rs) - -Line 27. diff --git a/fern/products/sdk-reference/rust/agents/skills/builtin/wikipedia-search/index.mdx b/fern/products/sdk-reference/rust/agents/skills/builtin/wikipedia-search/index.mdx index 69a740d1ed..c80ff4c00f 100644 --- a/fern/products/sdk-reference/rust/agents/skills/builtin/wikipedia-search/index.mdx +++ b/fern/products/sdk-reference/rust/agents/skills/builtin/wikipedia-search/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Rust SDK" icon: "rust" lustri: auto_generated: true - kind: "module" + kind: "class" language: "rust" qualified_name: "signalwire::skills::builtin::wikipedia_search" parent: "signalwire::skills::builtin" @@ -15,16 +15,169 @@ lustri: --- # `wikipedia_search` -## Classes +Search Wikipedia and get article summaries. - - - Search Wikipedia and get article summaries. - - +Mirrors Python's `signalwire.skills.wikipedia_search`: real HTTP GET +against the Wikipedia REST API. The base URL can be overridden by +setting `WIKIPEDIA_BASE_URL` (used by `audit_skills_dispatch.py`'s +fixture). Defaults to `https://en.wikipedia.org`. + +## Signature + +```rust +struct WikipediaSearch { /* fields */ } +``` + +## Inheritance + +**Implements:** `SkillBase` + +## Methods + +### description + +#### Signature + +```rust +fn description(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/wikipedia_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/wikipedia_search.rs) + +Line 30. + +*** + +### get\_prompt\_sections + +#### Signature + +```rust +fn get_prompt_sections(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/builtin/wikipedia_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/wikipedia_search.rs) + +Line 129. + +*** + +### name + +#### Signature + +```rust +fn name(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/builtin/wikipedia_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/wikipedia_search.rs) + +Line 26. + +*** + +### new + +#### Signature + +```rust +fn new(params: ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/skills/builtin/wikipedia_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/wikipedia_search.rs) + +Line 18. + +*** + +### params + +#### Signature + +```rust +fn params(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/skills/builtin/wikipedia_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/wikipedia_search.rs) + +Line 34. + +*** + +### register\_tools + +#### Signature + +```rust +fn register_tools(&self, agent: &mut ?) +``` + +#### Parameters + + + +#### Source + +[`src/skills/builtin/wikipedia_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/wikipedia_search.rs) + +Line 42. + +*** + +### setup + +#### Signature + +```rust +fn setup(&mut self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/skills/builtin/wikipedia_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/wikipedia_search.rs) + +Line 38. ## Source [`src/skills/builtin/wikipedia_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/wikipedia_search.rs) -Line 1. +Line 13. diff --git a/fern/products/sdk-reference/rust/agents/skills/builtin/wikipedia-search/wikipedia-search/index.mdx b/fern/products/sdk-reference/rust/agents/skills/builtin/wikipedia-search/wikipedia-search/index.mdx deleted file mode 100644 index adc66075d6..0000000000 --- a/fern/products/sdk-reference/rust/agents/skills/builtin/wikipedia-search/wikipedia-search/index.mdx +++ /dev/null @@ -1,183 +0,0 @@ ---- -slug: "/reference/rust/agents/skills/builtin/wikipedia-search/wikipedia-search" -title: "WikipediaSearch" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::skills::builtin::wikipedia_search::WikipediaSearch" - parent: "signalwire::skills::builtin::wikipedia_search" - module: "agents.skills.builtin.wikipedia_search" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/wikipedia_search.rs" - visibility: "public" ---- -# `WikipediaSearch` - -Search Wikipedia and get article summaries. - -Mirrors Python's `signalwire.skills.wikipedia_search`: real HTTP GET -against the Wikipedia REST API. The base URL can be overridden by -setting `WIKIPEDIA_BASE_URL` (used by `audit_skills_dispatch.py`'s -fixture). Defaults to `https://en.wikipedia.org`. - -## Signature - -```rust -struct WikipediaSearch { /* fields */ } -``` - -## Inheritance - -**Implements:** `SkillBase` - -## Methods - -### description - -#### Signature - -```rust -fn description(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/skills/builtin/wikipedia_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/wikipedia_search.rs) - -Line 30. - -*** - -### get\_prompt\_sections - -#### Signature - -```rust -fn get_prompt_sections(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/skills/builtin/wikipedia_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/wikipedia_search.rs) - -Line 129. - -*** - -### name - -#### Signature - -```rust -fn name(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/skills/builtin/wikipedia_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/wikipedia_search.rs) - -Line 26. - -*** - -### new - -#### Signature - -```rust -fn new(params: ?) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/skills/builtin/wikipedia_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/wikipedia_search.rs) - -Line 18. - -*** - -### params - -#### Signature - -```rust -fn params(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/skills/builtin/wikipedia_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/wikipedia_search.rs) - -Line 34. - -*** - -### register\_tools - -#### Signature - -```rust -fn register_tools(&self, agent: &mut ?) -``` - -#### Parameters - - - -#### Source - -[`src/skills/builtin/wikipedia_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/wikipedia_search.rs) - -Line 42. - -*** - -### setup - -#### Signature - -```rust -fn setup(&mut self) -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`src/skills/builtin/wikipedia_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/wikipedia_search.rs) - -Line 38. - -## Source - -[`src/skills/builtin/wikipedia_search.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/builtin/wikipedia_search.rs) - -Line 13. diff --git a/fern/products/sdk-reference/rust/agents/skills/index.mdx b/fern/products/sdk-reference/rust/agents/skills/index.mdx index cfe83a0422..9035c04681 100644 --- a/fern/products/sdk-reference/rust/agents/skills/index.mdx +++ b/fern/products/sdk-reference/rust/agents/skills/index.mdx @@ -15,20 +15,30 @@ lustri: --- # `skills` -## Modules +## Classes - - - + + Parameters holder used by the default `SkillBase` implementations. + - + + Manages loaded skills for an agent — validates, sets up, and merges skill contributions (tools, hints, global data, prompt sections) into the agent. + - Built-in skill names as a typed, compile-time-checked closed set. + Error returned when a string is parsed into \[`SkillName`] (via \[`FromStr`]) but does not name one of the built-in skills. + + + + Public interface to the global skill registry. + + +## Modules - + + ## Source diff --git a/fern/products/sdk-reference/rust/agents/skills/skill-base/index.mdx b/fern/products/sdk-reference/rust/agents/skills/skill-base/index.mdx index 1178a33b1a..79c203f62f 100644 --- a/fern/products/sdk-reference/rust/agents/skills/skill-base/index.mdx +++ b/fern/products/sdk-reference/rust/agents/skills/skill-base/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Rust SDK" icon: "rust" lustri: auto_generated: true - kind: "module" + kind: "class" language: "rust" qualified_name: "signalwire::skills::skill_base" parent: "signalwire::skills" @@ -15,13 +15,313 @@ lustri: --- # `skill_base` -## Classes +Parameters holder used by the default `SkillBase` implementations. - - - Parameters holder used by the default `SkillBase` implementations. - - +## Signature + +```rust +struct SkillParams { /* fields */ } +``` + +## Inheritance + +**Implements:** `Debug`, `Clone` + +## Properties + + + +## Methods + +### clone + +#### Signature + +```rust +fn clone(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 125. + +*** + +### empty + +#### Signature + +```rust +fn empty() -> Self +``` + +#### Returns + +`Self` + +#### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 135. + +*** + +### fmt + +#### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 125. + +*** + +### get\_array + +#### Signature + +```rust +fn get_array(&self, key: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 166. + +*** + +### get\_bool + +#### Signature + +```rust +fn get_bool(&self, key: &str) -> bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 147. + +*** + +### get\_bool\_or + +Like `get_bool` but returns `default` when the key is +absent (or not a boolean). Needed for params whose documented default +is `true` — `get_bool` always falls back to `false`. + +#### Signature + +```rust +fn get_bool_or(&self, key: &str, default: bool) -> bool +``` + +#### Parameters + + + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 154. + +*** + +### get\_f64 + +#### Signature + +```rust +fn get_f64(&self, key: &str, default: f64) -> f64 +``` + +#### Parameters + + + + + +#### Returns + +`f64` + +#### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 162. + +*** + +### get\_i64 + +#### Signature + +```rust +fn get_i64(&self, key: &str, default: i64) -> i64 +``` + +#### Parameters + + + + + +#### Returns + +`i64` + +#### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 158. + +*** + +### get\_object + +#### Signature + +```rust +fn get_object(&self, key: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 174. + +*** + +### get\_str + +#### Signature + +```rust +fn get_str(&self, key: &str) -> ?<&str> +``` + +#### Parameters + + + +#### Returns + +`?<&str>` + +#### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 139. + +*** + +### get\_str\_or + +#### Signature + +```rust +fn get_str_or(&self, key: &str, default: &str) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 143. + +*** + +### new + +#### Signature + +```rust +fn new(params: ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) + +Line 131. ## Functions @@ -452,4 +752,4 @@ Line 9. [`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) -Line 1. +Line 126. diff --git a/fern/products/sdk-reference/rust/agents/skills/skill-base/skill-params/index.mdx b/fern/products/sdk-reference/rust/agents/skills/skill-base/skill-params/index.mdx deleted file mode 100644 index d41c04c2d1..0000000000 --- a/fern/products/sdk-reference/rust/agents/skills/skill-base/skill-params/index.mdx +++ /dev/null @@ -1,330 +0,0 @@ ---- -slug: "/reference/rust/agents/skills/skill-base/skill-params" -title: "SkillParams" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::skills::skill_base::SkillParams" - parent: "signalwire::skills::skill_base" - module: "agents.skills.skill_base" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs" - visibility: "public" ---- -# `SkillParams` - -Parameters holder used by the default `SkillBase` implementations. - -## Signature - -```rust -struct SkillParams { /* fields */ } -``` - -## Inheritance - -**Implements:** `Debug`, `Clone` - -## Properties - - - -## Methods - -### clone - -#### Signature - -```rust -fn clone(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) - -Line 125. - -*** - -### empty - -#### Signature - -```rust -fn empty() -> Self -``` - -#### Returns - -`Self` - -#### Source - -[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) - -Line 135. - -*** - -### fmt - -#### Signature - -```rust -fn fmt(&self, f: &mut ?<'_>) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) - -Line 125. - -*** - -### get\_array - -#### Signature - -```rust -fn get_array(&self, key: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) - -Line 166. - -*** - -### get\_bool - -#### Signature - -```rust -fn get_bool(&self, key: &str) -> bool -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) - -Line 147. - -*** - -### get\_bool\_or - -Like `get_bool` but returns `default` when the key is -absent (or not a boolean). Needed for params whose documented default -is `true` — `get_bool` always falls back to `false`. - -#### Signature - -```rust -fn get_bool_or(&self, key: &str, default: bool) -> bool -``` - -#### Parameters - - - - - -#### Returns - -`bool` - -#### Source - -[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) - -Line 154. - -*** - -### get\_f64 - -#### Signature - -```rust -fn get_f64(&self, key: &str, default: f64) -> f64 -``` - -#### Parameters - - - - - -#### Returns - -`f64` - -#### Source - -[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) - -Line 162. - -*** - -### get\_i64 - -#### Signature - -```rust -fn get_i64(&self, key: &str, default: i64) -> i64 -``` - -#### Parameters - - - - - -#### Returns - -`i64` - -#### Source - -[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) - -Line 158. - -*** - -### get\_object - -#### Signature - -```rust -fn get_object(&self, key: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) - -Line 174. - -*** - -### get\_str - -#### Signature - -```rust -fn get_str(&self, key: &str) -> ?<&str> -``` - -#### Parameters - - - -#### Returns - -`?<&str>` - -#### Source - -[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) - -Line 139. - -*** - -### get\_str\_or - -#### Signature - -```rust -fn get_str_or(&self, key: &str, default: &str) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) - -Line 143. - -*** - -### new - -#### Signature - -```rust -fn new(params: ?) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) - -Line 131. - -## Source - -[`src/skills/skill_base.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_base.rs) - -Line 126. diff --git a/fern/products/sdk-reference/rust/agents/skills/skill-manager/index.mdx b/fern/products/sdk-reference/rust/agents/skills/skill-manager/index.mdx index 1073c26e63..b024a27a08 100644 --- a/fern/products/sdk-reference/rust/agents/skills/skill-manager/index.mdx +++ b/fern/products/sdk-reference/rust/agents/skills/skill-manager/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Rust SDK" icon: "rust" lustri: auto_generated: true - kind: "module" + kind: "class" language: "rust" qualified_name: "signalwire::skills::skill_manager" parent: "signalwire::skills" @@ -15,16 +15,230 @@ lustri: --- # `skill_manager` -## Classes +Manages loaded skills for an agent — validates, sets up, and merges skill +contributions (tools, hints, global data, prompt sections) into the agent. - - - Manages loaded skills for an agent — validates, sets up, and merges skill contributions (tools, hints, global data, prompt sections) into the agent. - - +## Signature + +```rust +struct SkillManager { /* fields */ } +``` + +## Inheritance + +**Implements:** `Default` + +## Methods + +### default + +#### Signature + +```rust +fn default() -> Self +``` + +#### Returns + +`Self` + +#### Source + +[`src/skills/skill_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_manager.rs) + +Line 207. + +*** + +### get\_skill + +Get a reference to a loaded skill. + +#### Signature + +```rust +fn get_skill(&self, key: &str) -> ?> +``` + +#### Parameters + + + +#### Returns + +`?>` + +#### Source + +[`src/skills/skill_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_manager.rs) + +Line 201. + +*** + +### has\_skill + +Check if a skill is loaded. + +#### Signature + +```rust +fn has_skill(&self, key: &str) -> bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/skill_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_manager.rs) + +Line 196. + +*** + +### list\_skills + +List all loaded skill instance keys. + +#### Signature + +```rust +fn list_skills(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/skill_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_manager.rs) + +Line 189. + +*** + +### load\_skill + +Load a skill by registry name, creating it via the registry factory. + +Returns `(true, "")` on success, or `(false, reason)` on failure. + +#### Signature + +```rust +fn load_skill( + &mut self, + skill_name: &str, + params: ?, + agent: &mut ? +) -> (bool, ?) +``` + +#### Parameters + + + + + + + +#### Returns + +`(bool, ?)` + +#### Source + +[`src/skills/skill_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_manager.rs) + +Line 26. + +*** + +### load\_skill\_instance + +Load a skill from a pre-constructed instance. + +#### Signature + +```rust +fn load_skill_instance( + &mut self, + instance: ?, + agent: &mut ? +) -> (bool, ?) +``` + +#### Parameters + + + + + +#### Returns + +`(bool, ?)` + +#### Source + +[`src/skills/skill_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_manager.rs) + +Line 113. + +*** + +### new + +#### Signature + +```rust +fn new() -> Self +``` + +#### Returns + +`Self` + +#### Source + +[`src/skills/skill_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_manager.rs) + +Line 17. + +*** + +### unload\_skill + +Unload a skill by instance key. + +#### Signature + +```rust +fn unload_skill(&mut self, key: &str) -> bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/skill_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_manager.rs) + +Line 184. ## Source [`src/skills/skill_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_manager.rs) -Line 1. +Line 12. diff --git a/fern/products/sdk-reference/rust/agents/skills/skill-manager/skill-manager/index.mdx b/fern/products/sdk-reference/rust/agents/skills/skill-manager/skill-manager/index.mdx deleted file mode 100644 index 136f628aea..0000000000 --- a/fern/products/sdk-reference/rust/agents/skills/skill-manager/skill-manager/index.mdx +++ /dev/null @@ -1,244 +0,0 @@ ---- -slug: "/reference/rust/agents/skills/skill-manager/skill-manager" -title: "SkillManager" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::skills::skill_manager::SkillManager" - parent: "signalwire::skills::skill_manager" - module: "agents.skills.skill_manager" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_manager.rs" - visibility: "public" ---- -# `SkillManager` - -Manages loaded skills for an agent — validates, sets up, and merges skill -contributions (tools, hints, global data, prompt sections) into the agent. - -## Signature - -```rust -struct SkillManager { /* fields */ } -``` - -## Inheritance - -**Implements:** `Default` - -## Methods - -### default - -#### Signature - -```rust -fn default() -> Self -``` - -#### Returns - -`Self` - -#### Source - -[`src/skills/skill_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_manager.rs) - -Line 207. - -*** - -### get\_skill - -Get a reference to a loaded skill. - -#### Signature - -```rust -fn get_skill(&self, key: &str) -> ?> -``` - -#### Parameters - - - -#### Returns - -`?>` - -#### Source - -[`src/skills/skill_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_manager.rs) - -Line 201. - -*** - -### has\_skill - -Check if a skill is loaded. - -#### Signature - -```rust -fn has_skill(&self, key: &str) -> bool -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/skills/skill_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_manager.rs) - -Line 196. - -*** - -### list\_skills - -List all loaded skill instance keys. - -#### Signature - -```rust -fn list_skills(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/skills/skill_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_manager.rs) - -Line 189. - -*** - -### load\_skill - -Load a skill by registry name, creating it via the registry factory. - -Returns `(true, "")` on success, or `(false, reason)` on failure. - -#### Signature - -```rust -fn load_skill( - &mut self, - skill_name: &str, - params: ?, - agent: &mut ? -) -> (bool, ?) -``` - -#### Parameters - - - - - - - -#### Returns - -`(bool, ?)` - -#### Source - -[`src/skills/skill_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_manager.rs) - -Line 26. - -*** - -### load\_skill\_instance - -Load a skill from a pre-constructed instance. - -#### Signature - -```rust -fn load_skill_instance( - &mut self, - instance: ?, - agent: &mut ? -) -> (bool, ?) -``` - -#### Parameters - - - - - -#### Returns - -`(bool, ?)` - -#### Source - -[`src/skills/skill_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_manager.rs) - -Line 113. - -*** - -### new - -#### Signature - -```rust -fn new() -> Self -``` - -#### Returns - -`Self` - -#### Source - -[`src/skills/skill_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_manager.rs) - -Line 17. - -*** - -### unload\_skill - -Unload a skill by instance key. - -#### Signature - -```rust -fn unload_skill(&mut self, key: &str) -> bool -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/skills/skill_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_manager.rs) - -Line 184. - -## Source - -[`src/skills/skill_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_manager.rs) - -Line 12. diff --git a/fern/products/sdk-reference/rust/agents/skills/skill-name/index.mdx b/fern/products/sdk-reference/rust/agents/skills/skill-name/index.mdx index 10cd74a5cb..b9c881c956 100644 --- a/fern/products/sdk-reference/rust/agents/skills/skill-name/index.mdx +++ b/fern/products/sdk-reference/rust/agents/skills/skill-name/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Rust SDK" icon: "rust" lustri: auto_generated: true - kind: "module" + kind: "class" language: "rust" qualified_name: "signalwire::skills::skill_name" parent: "signalwire::skills" @@ -15,34 +15,25 @@ lustri: --- # `skill_name` -Built-in skill names as a typed, compile-time-checked closed set. +Error returned when a string is parsed into \[`SkillName`] (via \[`FromStr`]) +but does not name one of the built-in skills. -Skill names are an open _string_ set in the Python reference (`add_skill` -takes a bare `str`), which keeps parity and lets callers load custom / -third-party skills. The downside is that a typo — `add_skill("datetiem")` -— compiles fine and only fails later at the server. \[`SkillName`] gives the -18 built-in skills a typed alternative so the typo fails at the **call -site** with editor autocompletion, while the string path stays available -for parity and custom skills. +Unlike the SWAIG media enums, the skill-name set is _open_ (custom skills +are valid), so most callers want the inherent \[`SkillName::from_str`] which +returns `None` for a custom name. The \[`FromStr`] impl exists for the +idiomatic `"datetime".parse::()` and reports the offending input +when it is not a built-in. -`AgentBase::add_skill`, -`remove_skill` and -`has_skill` keep their `&str` -parameter (parity with Python's `str`); \[`SkillName`] plugs into them via -\[`SkillName::as_str`] / \[`AsRef`], so the wire behaviour is identical: +## Signature -```no_run -use signalwire::agent::{AgentBase, AgentOptions}; -use signalwire::skills::SkillName; -use serde_json::json; - -let mut agent = AgentBase::new(AgentOptions::new("demo")); -agent.add_skill(SkillName::Datetime.as_str(), json!({})); // typed, autocompleted -agent.add_skill("datetime", json!({})); // string still works (parity) -agent.add_skill("my_custom_skill", json!({})); // open set: custom skills ok -assert!(agent.has_skill(SkillName::Datetime.as_str())); +```rust +struct ParseSkillNameError { /* fields */ } ``` +## Inheritance + +**Implements:** `Debug`, `Clone`, `PartialEq`, `Eq`, `Display`, [Error](/docs/sdk-reference/reference/rust/core/security/webhook-layer/webhook-validate#error) + ## Examples ```rust @@ -57,13 +48,119 @@ agent.add_skill("my_custom_skill", json!({})); // open set: custom sk assert!(agent.has_skill(SkillName::Datetime.as_str())); ``` -## Classes +## Methods + +### clone + +#### Signature + +```rust +fn clone(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) + +Line 40. + +*** + +### eq + +#### Signature + +```rust +fn eq(&self, other: &?) -> bool +``` + +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) + +Line 40. + +*** + +### fmt + +#### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) + +Line 40. + +*** + +### fmt + +#### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) + +Line 53. + +*** + +### input + +The string that failed to parse as a built-in skill name. + +#### Signature + +```rust +fn input(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) - - - Error returned when a string is parsed into \[`SkillName`] (via \[`FromStr`]) but does not name one of the built-in skills. - - +Line 47. ## Enums @@ -513,4 +610,4 @@ Line 69. [`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) -Line 1. +Line 41. diff --git a/fern/products/sdk-reference/rust/agents/skills/skill-name/parse-skill-name-error/index.mdx b/fern/products/sdk-reference/rust/agents/skills/skill-name/parse-skill-name-error/index.mdx deleted file mode 100644 index 103e919e8c..0000000000 --- a/fern/products/sdk-reference/rust/agents/skills/skill-name/parse-skill-name-error/index.mdx +++ /dev/null @@ -1,155 +0,0 @@ ---- -slug: "/reference/rust/agents/skills/skill-name/parse-skill-name-error" -title: "ParseSkillNameError" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::skills::skill_name::ParseSkillNameError" - parent: "signalwire::skills::skill_name" - module: "agents.skills.skill_name" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs" - visibility: "public" ---- -# `ParseSkillNameError` - -Error returned when a string is parsed into \[`SkillName`] (via \[`FromStr`]) -but does not name one of the built-in skills. - -Unlike the SWAIG media enums, the skill-name set is _open_ (custom skills -are valid), so most callers want the inherent \[`SkillName::from_str`] which -returns `None` for a custom name. The \[`FromStr`] impl exists for the -idiomatic `"datetime".parse::()` and reports the offending input -when it is not a built-in. - -## Signature - -```rust -struct ParseSkillNameError { /* fields */ } -``` - -## Inheritance - -**Implements:** `Debug`, `Clone`, `PartialEq`, `Eq`, `Display`, [Error](/docs/sdk-reference/reference/rust/core/security/webhook-layer/webhook-validate#error) - -## Methods - -### clone - -#### Signature - -```rust -fn clone(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) - -Line 40. - -*** - -### eq - -#### Signature - -```rust -fn eq(&self, other: &?) -> bool -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) - -Line 40. - -*** - -### fmt - -#### Signature - -```rust -fn fmt(&self, f: &mut ?<'_>) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) - -Line 40. - -*** - -### fmt - -#### Signature - -```rust -fn fmt(&self, f: &mut ?<'_>) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) - -Line 53. - -*** - -### input - -The string that failed to parse as a built-in skill name. - -#### Signature - -```rust -fn input(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) - -Line 47. - -## Source - -[`src/skills/skill_name.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_name.rs) - -Line 41. diff --git a/fern/products/sdk-reference/rust/agents/skills/skill-registry/index.mdx b/fern/products/sdk-reference/rust/agents/skills/skill-registry/index.mdx index d393ca4145..f56995137e 100644 --- a/fern/products/sdk-reference/rust/agents/skills/skill-registry/index.mdx +++ b/fern/products/sdk-reference/rust/agents/skills/skill-registry/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Rust SDK" icon: "rust" lustri: auto_generated: true - kind: "module" + kind: "class" language: "rust" qualified_name: "signalwire::skills::skill_registry" parent: "signalwire::skills" @@ -15,13 +15,149 @@ lustri: --- # `skill_registry` -## Classes +Public interface to the global skill registry. - - - Public interface to the global skill registry. - - +## Signature + +```rust +struct SkillRegistry; +``` + +## Methods + +### add\_skill\_directory + +Register an external directory containing third-party skill +factories. + +Mirrors Python's +`signalwire.skills.registry.SkillRegistry.add_skill_directory`. +Rust cannot dynamically load `.rs` files the way Python loads +`.py` modules from a directory; in Rust, third-party skills +must call \[`SkillRegistry::register_skill`] at startup. The +path is recorded for introspection / logging purposes (matching +the Python `_external_paths` field) so the surface contract +matches. + +**Errors:** + +Returns an error string if the directory does not exist or is +not a directory. + +#### Signature + +```rust +fn add_skill_directory(path: &str) -> ?<(), ?> +``` + +#### Parameters + + + +#### Returns + +`?<(), ?>` + +#### Source + +[`src/skills/skill_registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_registry.rs) + +Line 172. + +*** + +### external\_paths + +Read the list of external skill directories registered via +\[`SkillRegistry::add_skill_directory`]. + +#### Signature + +```rust +fn external_paths() -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/skill_registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_registry.rs) + +Line 190. + +*** + +### get\_factory + +Get the factory for a skill by name. + +#### Signature + +```rust +fn get_factory(name: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/skills/skill_registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_registry.rs) + +Line 130. + +*** + +### list\_skills + +List all registered skill names (sorted). + +#### Signature + +```rust +fn list_skills() -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/skills/skill_registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_registry.rs) + +Line 150. + +*** + +### register\_skill + +Register a custom skill factory. + +#### Signature + +```rust +fn register_skill(name: &str, factory: ?) +``` + +#### Parameters + + + + + +#### Source + +[`src/skills/skill_registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_registry.rs) + +Line 124. ## Type Aliases @@ -45,4 +181,4 @@ Line 11. [`src/skills/skill_registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_registry.rs) -Line 1. +Line 120. diff --git a/fern/products/sdk-reference/rust/agents/skills/skill-registry/skill-registry/index.mdx b/fern/products/sdk-reference/rust/agents/skills/skill-registry/skill-registry/index.mdx deleted file mode 100644 index 19c0cb098c..0000000000 --- a/fern/products/sdk-reference/rust/agents/skills/skill-registry/skill-registry/index.mdx +++ /dev/null @@ -1,166 +0,0 @@ ---- -slug: "/reference/rust/agents/skills/skill-registry/skill-registry" -title: "SkillRegistry" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::skills::skill_registry::SkillRegistry" - parent: "signalwire::skills::skill_registry" - module: "agents.skills.skill_registry" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_registry.rs" - visibility: "public" ---- -# `SkillRegistry` - -Public interface to the global skill registry. - -## Signature - -```rust -struct SkillRegistry; -``` - -## Methods - -### add\_skill\_directory - -Register an external directory containing third-party skill -factories. - -Mirrors Python's -`signalwire.skills.registry.SkillRegistry.add_skill_directory`. -Rust cannot dynamically load `.rs` files the way Python loads -`.py` modules from a directory; in Rust, third-party skills -must call \[`SkillRegistry::register_skill`] at startup. The -path is recorded for introspection / logging purposes (matching -the Python `_external_paths` field) so the surface contract -matches. - -**Errors:** - -Returns an error string if the directory does not exist or is -not a directory. - -#### Signature - -```rust -fn add_skill_directory(path: &str) -> ?<(), ?> -``` - -#### Parameters - - - -#### Returns - -`?<(), ?>` - -#### Source - -[`src/skills/skill_registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_registry.rs) - -Line 172. - -*** - -### external\_paths - -Read the list of external skill directories registered via -\[`SkillRegistry::add_skill_directory`]. - -#### Signature - -```rust -fn external_paths() -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/skills/skill_registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_registry.rs) - -Line 190. - -*** - -### get\_factory - -Get the factory for a skill by name. - -#### Signature - -```rust -fn get_factory(name: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/skills/skill_registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_registry.rs) - -Line 130. - -*** - -### list\_skills - -List all registered skill names (sorted). - -#### Signature - -```rust -fn list_skills() -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/skills/skill_registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_registry.rs) - -Line 150. - -*** - -### register\_skill - -Register a custom skill factory. - -#### Signature - -```rust -fn register_skill(name: &str, factory: ?) -``` - -#### Parameters - - - - - -#### Source - -[`src/skills/skill_registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_registry.rs) - -Line 124. - -## Source - -[`src/skills/skill_registry.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/skills/skill_registry.rs) - -Line 120. diff --git a/fern/products/sdk-reference/rust/agents/swaig/function-result/function-result/index.mdx b/fern/products/sdk-reference/rust/agents/swaig/function-result/function-result/index.mdx deleted file mode 100644 index 8a1a970c9f..0000000000 --- a/fern/products/sdk-reference/rust/agents/swaig/function-result/function-result/index.mdx +++ /dev/null @@ -1,1899 +0,0 @@ ---- -slug: "/reference/rust/agents/swaig/function-result/function-result" -title: "FunctionResult" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::swaig::function_result::FunctionResult" - parent: "signalwire::swaig::function_result" - module: "agents.swaig.function_result" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs" - visibility: "public" ---- -# `FunctionResult` - -Result returned from a SWAIG function handler. - -Serialises to match the Python reference's `to_dict()`: `response` is omitted when empty, -`action` when empty, and `post_process` unless there are actions; an otherwise-empty result -defaults to `{"response": "Action completed."}`. - -**Decorators:** `@must_use` - -## Signature - -```rust -struct FunctionResult { /* fields */ } -``` - -## Inheritance - -**Implements:** `Debug`, `Clone`, `Default` - -## Methods - -### add\_action - -#### Signature - -```rust -fn add_action(&mut self, action: ?) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 133. - -*** - -### add\_actions - -#### Signature - -```rust -fn add_actions(&mut self, actions: ?) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 138. - -*** - -### add\_dynamic\_hints - -#### Signature - -```rust -fn add_dynamic_hints(&mut self, hints: ?) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 552. - -*** - -### clear\_dynamic\_hints - -Clear all dynamic speech-recognition hints. - -Mirrors the Python reference (`FunctionResult.clear_dynamic_hints`), -which appends `{"clear_dynamic_hints": {}}` — the value is an **empty -object**, not a boolean. (`json!({})` serialises to `{}`.) - -#### Signature - -```rust -fn clear_dynamic_hints(&mut self) -> &mut Self -``` - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 562. - -*** - -### clone - -#### Signature - -```rust -fn clone(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 96. - -*** - -### connect - -#### Signature - -```rust -fn connect(&mut self, destination: &str, _final: bool, from: &str) -> &mut Self -``` - -#### Parameters - - - - - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 200. - -*** - -### create\_payment\_action - -Create a payment action for use in payment prompts. - -Mirrors the Python reference (`FunctionResult.create_payment_action`): -`{"type": action_type, "phrase": phrase}` (`action_type` is `"Say"` for -text-to-speech or `"Play"` for an audio file). - -#### Signature - -```rust -fn create_payment_action(action_type: &str, phrase: &str) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 1225. - -*** - -### create\_payment\_parameter - -Create a payment parameter (name/value pair) for use with `pay`. - -Mirrors the Python reference (`FunctionResult.create_payment_parameter`): -`{"name": name, "value": value}`. - -#### Signature - -```rust -fn create_payment_parameter(name: &str, value: &str) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 1236. - -*** - -### create\_payment\_prompt - -Create a payment-prompt structure for use with `pay`. - -Mirrors the Python reference (`FunctionResult.create_payment_prompt`): -`{"for": for_situation, "actions": actions, "card_type"?, "error_type"?}`. -`actions` is the list of `{type, phrase}` action objects (a JSON array). -`card_type`/`error_type` are emitted only when non-empty. - -#### Signature - -```rust -fn create_payment_prompt( - for_situation: &str, - actions: ?, - card_type: &str, - error_type: &str -) -> ? -``` - -#### Parameters - - - - - - - - - -#### Returns - -`?` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 1202. - -*** - -### default - -#### Signature - -```rust -fn default() -> Self -``` - -#### Returns - -`Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 1245. - -*** - -### enable\_extensive\_data - -#### Signature - -```rust -fn enable_extensive_data(&mut self, enabled: bool) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 600. - -*** - -### enable\_functions\_on\_timeout - -Python: add\_action("functions\_on\_speaker\_timeout", enabled). - -#### Signature - -```rust -fn enable_functions_on_timeout(&mut self, enabled: bool) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 594. - -*** - -### execute\_rpc - -Execute an RPC method on a call (SWML `execute_rpc`). - -Mirrors the Python reference (`FunctionResult.execute_rpc`): the rpc -params are keyed `{method, call_id?, node_id?, params?}` where -`call_id` and `node_id` are **TOP-LEVEL siblings** of `method`/`params` -(NOT nested inside `params`), and the whole `{"execute_rpc": ...}` verb -is wrapped in a canonical SWML document via `execute_swml` — never a -bare action key. There is **no** `jsonrpc` envelope (the previous port -invented one — removed) and method strings are **bare** (`"dial"`, not -`"calling.dial"`). `call_id`/`node_id` are emitted only when non-empty; -`params` is emitted only when it is a non-empty value (Python's -`if params:` — an empty object/null is dropped). - -#### Signature - -```rust -fn execute_rpc( - &mut self, - method: &str, - params: ?, - call_id: &str, - node_id: &str -) -> &mut Self -``` - -#### Parameters - - - - - - - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 1110. - -*** - -### execute\_swml - -Execute SWML content, optionally marking the call to exit the agent -afterward (`transfer = true`). - -Mirrors the Python reference (`FunctionResult.execute_swml`): the action -key is **always** `"SWML"`; when `transfer` is set, a `"transfer": "true"` -flag is added **inside** the SWML dict (it is not a separate action key). - -Input normalisation matches Python: - -- A JSON **string** is parsed to a dict so the transfer flag can be added; - if it is not valid JSON it falls back to `{"raw_swml": ""}`. -- A JSON **object** is used as-is (a copy, so the transfer flag does not - mutate the caller's value). -- Any other JSON scalar/array is wrapped as `{"raw_swml": }`, - the same fallback Python uses for a non-dict, non-string `swml_content`. - -#### Signature - -```rust -fn execute_swml(&mut self, swml_content: ?, transfer: bool) -> &mut Self -``` - -#### Parameters - - - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 627. - -*** - -### fmt - -#### Signature - -```rust -fn fmt(&self, f: &mut ?<'_>) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 96. - -*** - -### hangup - -#### Signature - -```rust -fn hangup(&mut self) -> &mut Self -``` - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 252. - -*** - -### hold - -#### Signature - -```rust -fn hold(&mut self, timeout: i64) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 258. - -*** - -### join\_conference - -Join an ad-hoc audio conference (SWML `join_conference`). - -Mirrors the Python reference -(`FunctionResult.join_conference`) — `name` is required and the -remaining 18 parameters are optional with the reference's defaults. -`wait_url` carries the hold-music URL (Python has no `hold_audio` -parameter; this port previously invented one — it is removed). - -The seven closed-set / range validations from the reference are -reproduced and return `Err(message)` with the reference's exact -`ValueError` text (Rust's idiomatic recoverable-validation channel — -the `Err` type is out-of-band to the cross-language audit, which -unwraps `Result` to `T`): - -- `beep` ∈ `{true, false, onEnter, onExit}` -- `0 < max_participants <= 250` -- `record` ∈ `{do-not-record, record-from-start}` -- `trim` ∈ `{trim-silence, do-not-trim}` -- `status_callback_method` ∈ `{GET, POST}` -- `recording_status_callback_method` ∈ `{GET, POST}` -- `name` (trimmed) must not be empty - -When every parameter is left at its default the `join_conference` value -is the bare conference name string; otherwise it is a `{"name": ...}` -object carrying every non-default parameter under its snake\_case wire -key. Either way the verb is wrapped in the canonical SWML document -(`{"SWML": {version, sections: {main: [{join_conference: ...}]}}}`), -matching the reference (which routes join\_conference through -`execute_swml`) — never a bare verb. - -#### Signature - -```rust -fn join_conference( - &mut self, - name: &str, - muted: bool, - beep: &str, - start_on_enter: bool, - end_on_exit: bool, - wait_url: ?<&str>, - max_participants: i64, - record: &str, - region: ?<&str>, - trim: &str, - coach: ?<&str>, - status_callback_event: ?<&str>, - status_callback: ?<&str>, - status_callback_method: &str, - recording_status_callback: ?<&str>, - recording_status_callback_method: &str, - recording_status_callback_event: &str, - result: ? -) -> ?<&mut Self, ?> -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -#### Returns - -`?<&mut Self, ?>` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 695. - -*** - -### join\_room - -Join a RELAY room (SWML `join_room`). Wrapped in a SWML document, -matching the Python reference. - -#### Signature - -```rust -fn join_room(&mut self, name: &str) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 852. - -*** - -### new - -#### Signature - -```rust -fn new() -> Self -``` - -#### Returns - -`Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 105. - -*** - -### pay - -Process a payment (SWML `pay`). - -Mirrors the Python reference (`FunctionResult.pay`) exactly, including its -wire-key choices and value rendering: - -- the verb is wrapped in a SWML document whose `main` section is - `[{set: {ai_response}}, {pay: pay_params}]` — never a bare verb; -- the input-method key is **`input`** (not `input_method`); -- the status-callback key is **`status_url`** (the previous port invented - `action_url` — removed); -- `timeout`, `max_attempts`, `min_postal_code_length` are **stringified**; - `security_code` is rendered lower-case (`"true"`/`"false"`); -- `payment_method`, `token_type`, `currency`, `language`, `voice`, - `valid_card_types`, and `postal_code` are always emitted; `status_url`, - `charge_amount`, `description`, `parameters`, and `prompts` are emitted - only when supplied. - -`postal_code` is taken as the already-rendered wire string (pass -`"true"`/`"false"` for the boolean cases, or the literal postcode), -mirroring the reference's `Union[bool, str]`. `parameters`/`prompts` are -JSON arrays (`Value::Null` to omit). An empty `ai_response` uses the -reference's default status message. - -#### Signature - -```rust -fn pay( - &mut self, - payment_connector_url: &str, - input_method: &str, - status_url: &str, - payment_method: &str, - timeout: i64, - max_attempts: i64, - security_code: bool, - postal_code: &str, - min_postal_code_length: i64, - token_type: &str, - charge_amount: &str, - currency: &str, - language: &str, - voice: &str, - description: &str, - valid_card_types: &str, - parameters: ?, - prompts: ?, - ai_response: &str -) -> &mut Self -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 1011. - -*** - -### play\_background\_file - -Play an audio/video file in the background. - -Mirrors the Python reference (`FunctionResult.play_background_file`): the -action key is `"playback_bg"`. With `wait = true` the value is -`{"file": filename, "wait": true}` (suppress attention-getting behaviour); -otherwise it is the bare filename string. - -#### Signature - -```rust -fn play_background_file(&mut self, filename: &str, wait: bool) -> &mut Self -``` - -#### Parameters - - - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 439. - -*** - -### record\_call - -Start background call recording (SWML `record_call`). - -Mirrors the Python reference (`FunctionResult.record_call`): the verb is -wrapped in a SWML document (`{"SWML": {version, sections: {main: [{record_call: params}]}}}`) — never a bare verb — and the reference's -two closed-set validations are reproduced, returning `Err(message)` with -the exact reference `ValueError` text: - -- `format` ∈ `{wav, mp3, mp4}` -- `direction` ∈ `{speak, listen, both}` - -`stereo`, `format`, `direction`, `beep`, and `input_sensitivity` are -**always** emitted (matching the reference, which seeds `record_params` -with all five); `control_id`, `terminators`, `initial_timeout`, -`end_silence_timeout`, `max_length`, and `status_url` are emitted only -when supplied. There is no `initiator` field — the previous port invented -it; it is removed. - -#### Signature - -```rust -fn record_call>: ?>, impl Into>: ?>>( - &mut self, - control_id: &str, - stereo: bool, - format: impl ?>, - direction: impl ?>, - terminators: &str, - beep: bool, - input_sensitivity: f64, - initial_timeout: ?, - end_silence_timeout: ?, - max_length: ?, - status_url: &str -) -> ?<&mut Self, ?> -``` - -#### Type Parameters - - - - - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - -#### Returns - -`?<&mut Self, ?>` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 473. - -*** - -### remove\_global\_data - -Python: add\_action("unset\_global\_data", keys) — the value is the bare key -(Python's `Union[str, List[str]]`, passed through verbatim): a single key -emits the **bare string** (`"plan"`), a list emits the **array** -(`["plan", "chips"]`); no `{"keys": ...}` wrapper. Accepts both call -styles via `impl Into` (`"plan"` or `vec!["plan", "chips"]`). - -#### Signature - -```rust -fn remove_global_data: ?>( - &mut self, - keys: impl ? -) -> &mut Self -``` - -#### Type Parameters - - - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 307. - -*** - -### remove\_metadata - -Python: add\_action("unset\_meta\_data", keys) — the value is the bare key -(Python's `Union[str, List[str]]`, passed through verbatim): a single key -emits the **bare string** (`"token"`), a list emits the **array** -(`["token", "count"]`); no `{"keys": ...}` wrapper. Accepts both call -styles via `impl Into`. - -#### Signature - -```rust -fn remove_metadata: ?>( - &mut self, - keys: impl ? -) -> &mut Self -``` - -#### Type Parameters - - - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 323. - -*** - -### replace\_in\_history - -After first send, replace the tool\_call+result pair in conversation -history. - -Mirrors the Python reference (`FunctionResult.replace_in_history`, whose -`text` parameter is `Union[str, bool] = True`): the action key is -`"replace_in_history"`. `Some(t)` replaces the tool call with an assistant -message containing `t`; `None` uses the default `true`, which removes the -tool\_call+result pair from history entirely. - -#### Signature - -```rust -fn replace_in_history(&mut self, text: ?<&str>) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 418. - -*** - -### rpc\_ai\_message - -Inject a message into an AI agent on another call (via `execute_rpc`). - -Mirrors the Python reference (`FunctionResult.rpc_ai_message`): method -`"ai_message"`, `call_id` carried as the TOP-LEVEL execute\_rpc sibling, -params `{role, message_text}`. `role` defaults to `"system"` and is -caller-overridable (the previous port omitted `role` and mis-nested -`call_id` — fixed). - -#### Signature - -```rust -fn rpc_ai_message( - &mut self, - call_id: &str, - message_text: &str, - role: &str -) -> &mut Self -``` - -#### Parameters - - - - - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 1167. - -*** - -### rpc\_ai\_unhold - -Unhold another call (via `execute_rpc`). - -Mirrors the Python reference (`FunctionResult.rpc_ai_unhold`): method -`"ai_unhold"`, `call_id` as the TOP-LEVEL execute\_rpc sibling, params -`{}` (which `execute_rpc` drops, since it is empty). - -#### Signature - -```rust -fn rpc_ai_unhold(&mut self, call_id: &str) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 1180. - -*** - -### rpc\_dial - -Dial out to a number with a destination SWML URL (via `execute_rpc`). - -Mirrors the Python reference (`FunctionResult.rpc_dial`): method `"dial"`, -params `{devices: {type: device_type, params: {to_number, from_number}}, -dest_swml}`. `device_type` defaults to `"phone"` and is caller-overridable -(the previous port hard-coded the device and invented -`call_timeout`/`region` — removed). - -#### Signature - -```rust -fn rpc_dial( - &mut self, - to_number: &str, - from_number: &str, - dest_swml: &str, - device_type: &str -) -> &mut Self -``` - -#### Parameters - - - - - - - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 1140. - -*** - -### say - -#### Signature - -```rust -fn say(&mut self, text: &str) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 428. - -*** - -### send\_sms - -Send a text message to a PSTN number (SWML `send_sms`). - -Mirrors the Python reference (`FunctionResult.send_sms`): the verb is -wrapped in a SWML document — never a bare verb. The reference's -validation is reproduced, returning `Err` with the exact reference -`ValueError` text when neither `body` nor `media` is provided. `body` is -emitted only when non-empty; `media`, `tags`, and `region` are emitted -only when supplied. - -#### Signature - -```rust -fn send_sms( - &mut self, - to: &str, - from: &str, - body: &str, - media: ?<&str>, - tags: ?<&str>, - region: &str -) -> ?<&mut Self, ?> -``` - -#### Parameters - - - - - - - - - - - - - -#### Returns - -`?<&mut Self, ?>` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 955. - -*** - -### set\_end\_of\_speech\_timeout - -#### Signature - -```rust -fn set_end_of_speech_timeout(&mut self, ms: i64) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 567. - -*** - -### set\_metadata - -#### Signature - -```rust -fn set_metadata(&mut self, data: ?) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 313. - -*** - -### set\_post\_process - -#### Signature - -```rust -fn set_post_process(&mut self, val: bool) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 128. - -*** - -### set\_response - -#### Signature - -```rust -fn set_response(&mut self, text: &str) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 123. - -*** - -### set\_speech\_event\_timeout - -#### Signature - -```rust -fn set_speech_event_timeout(&mut self, ms: i64) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 572. - -*** - -### simulate\_user\_input - -Queue simulated user input. - -Mirrors the Python reference (`FunctionResult.simulate_user_input`): -the action key is **`user_input`** (the previous port emitted -`simulate_user_input`, which is the _method_ name, not the wire key). - -#### Signature - -```rust -fn simulate_user_input(&mut self, text: &str) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 1189. - -*** - -### sip\_refer - -Send a SIP REFER (SWML `sip_refer`). Wrapped in a SWML document, matching -the Python reference. - -#### Signature - -```rust -fn sip_refer(&mut self, to_uri: &str) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 859. - -*** - -### stop - -#### Signature - -```rust -fn stop(&mut self) -> &mut Self -``` - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 290. - -*** - -### stop\_background\_file - -Python: add\_action("stop\_playback\_bg", True). - -#### Signature - -```rust -fn stop_background_file(&mut self) -> &mut Self -``` - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 450. - -*** - -### stop\_record\_call - -Stop an active background recording (SWML `stop_record_call`). - -Mirrors the Python reference: the verb is wrapped in a SWML document. The -params are `{"control_id": ...}` when supplied, else `{}` (most-recent). - -#### Signature - -```rust -fn stop_record_call(&mut self, control_id: &str) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 540. - -*** - -### stop\_tap - -Stop an active tap stream (SWML `stop_tap`). Wrapped in a SWML document, -matching the Python reference. - -#### Signature - -```rust -fn stop_tap(&mut self, control_id: &str) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 937. - -*** - -### switch\_context - -Change the agent context/prompt during the conversation. - -Mirrors the Python reference (`FunctionResult.switch_context`): when only -`system_prompt` is supplied (no `user_prompt`/`consolidate`/`full_reset`, -and — for this port's documented `isolated` extension — no `isolated`), -the action value is the **bare system-prompt string** -(`{"context_switch": ""}`). Otherwise it is the object form -carrying every set field. - -#### Signature - -```rust -fn switch_context( - &mut self, - system_prompt: &str, - user_prompt: &str, - consolidate: bool, - full_reset: bool, - isolated: bool -) -> &mut Self -``` - -#### Parameters - - - - - - - - - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 369. - -*** - -### swml\_change\_context - -Python: add\_action("change\_context", context\_name) — the value is the -bare context name string (not a `context_switch` dict). - -#### Signature - -```rust -fn swml_change_context(&mut self, context_name: &str) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 356. - -*** - -### swml\_change\_step - -Python: add\_action("change\_step", step\_name) — the value is the bare step -name string (not a `context_switch` dict). - -#### Signature - -```rust -fn swml_change_step(&mut self, step_name: &str) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 349. - -*** - -### swml\_transfer - -Add a SWML transfer action with an AI response set up for when the -transfer completes and control returns to the agent. - -Mirrors the Python reference (`FunctionResult.swml_transfer`): emits a -SWML document whose `main` section is `[{set: {ai_response}}, {transfer: -{dest}}]`, with a top-level `"transfer": str(final).lower()` flag marking -whether the transfer is permanent (`final = true`, the default) or -temporary. `ai_response` is carried inside the SWML `set` verb (it is NOT -assigned to `self.response`). - -#### Signature - -```rust -fn swml_transfer( - &mut self, - dest: &str, - ai_response: &str, - _final: bool -) -> &mut Self -``` - -#### Parameters - - - - - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 233. - -*** - -### swml\_user\_event - -Send a user event through SWML to update the client UI. - -Mirrors the Python reference (`FunctionResult.swml_user_event`): emits a -`"SWML"` action whose `main` section nests the event payload under -`{"user_event": {"event": event_data}}`. - -#### Signature - -```rust -fn swml_user_event(&mut self, event_data: ?) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 334. - -*** - -### tap - -Start a background call tap (SWML `tap`). - -Mirrors the Python reference (`FunctionResult.tap`): the verb is wrapped -in a SWML document — never a bare verb — and the reference's three -validations are reproduced, returning `Err(message)` with the exact -reference `ValueError` text: - -- `direction` ∈ `{speak, hear, both}` -- `codec` ∈ `{PCMU, PCMA}` -- `rtp_ptime > 0` - -Only `uri` is always emitted; `control_id`, `direction`, `codec`, -`rtp_ptime`, and `status_url` are emitted only when they differ from the -reference defaults (`direction="both"`, `codec="PCMU"`, `rtp_ptime=20`). - -#### Signature - -```rust -fn tap>: ?>, impl Into>: ?>>( - &mut self, - uri: &str, - control_id: &str, - direction: impl ?>, - codec: impl ?>, - rtp_ptime: i64, - status_url: &str -) -> ?<&mut Self, ?> -``` - -#### Type Parameters - - - - - -#### Parameters - - - - - - - - - - - - - -#### Returns - -`?<&mut Self, ?>` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 878. - -*** - -### to\_json - -Compact JSON string. - -#### Signature - -```rust -fn to_json(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 178. - -*** - -### to\_value - -Serialise to a JSON value. - -- `response` is always included. -- `action` is only included if at least one action exists. -- `post_process` is only included if `true`. - -#### Signature - -```rust -fn to_value(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 150. - -*** - -### toggle\_functions - -Enable/disable specific SWAIG functions. - -Mirrors the Python reference (`FunctionResult.toggle_functions`), which -takes a `List[Dict[str, Any]]` (each dict carries `function` + `active`, -plus any further keys) and passes it through verbatim via -`add_action("toggle_functions", function_toggles)`. The action value is -therefore the **ordered list as-is** — order is preserved and arbitrary -keys/values survive. A `HashMap` cannot express this (it -drops ordering and forbids extra keys / non-bool values), so the -parameter is the bare `Vec` list, exactly like `add_dynamic_hints`. - -#### Signature - -```rust -fn toggle_functions(&mut self, function_toggles: ?) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 587. - -*** - -### update\_global\_data - -#### Signature - -```rust -fn update_global_data(&mut self, data: ?) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 297. - -*** - -### update\_settings - -Python: add\_action("settings", settings). - -#### Signature - -```rust -fn update_settings(&mut self, settings: ?) -> &mut Self -``` - -#### Parameters - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 606. - -*** - -### wait\_for\_user - -Control how the agent waits for user input. - -Mirrors the Python reference (`FunctionResult.wait_for_user`): the action -value is a **scalar**, chosen by the same precedence — -`answer_first` (the string `"answer_first"`) > `timeout` (bare int) > -`enabled` (bare bool) > the default bare bool `true`. - -#### Signature - -```rust -fn wait_for_user( - &mut self, - enabled: ?, - timeout: ?, - answer_first: ? -) -> &mut Self -``` - -#### Parameters - - - - - - - -#### Returns - -`&mut Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 271. - -*** - -### with\_response - -#### Signature - -```rust -fn with_response(response: &str) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 113. - -## Source - -[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) - -Line 98. diff --git a/fern/products/sdk-reference/rust/agents/swaig/function-result/index.mdx b/fern/products/sdk-reference/rust/agents/swaig/function-result/index.mdx index 170411d64d..0528eb7f1c 100644 --- a/fern/products/sdk-reference/rust/agents/swaig/function-result/index.mdx +++ b/fern/products/sdk-reference/rust/agents/swaig/function-result/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Rust SDK" icon: "rust" lustri: auto_generated: true - kind: "module" + kind: "class" language: "rust" qualified_name: "signalwire::swaig::function_result" parent: "signalwire::swaig" @@ -15,13 +15,1882 @@ lustri: --- # `function_result` -## Classes +Result returned from a SWAIG function handler. - - - Result returned from a SWAIG function handler. - - +Serialises to match the Python reference's `to_dict()`: `response` is omitted when empty, +`action` when empty, and `post_process` unless there are actions; an otherwise-empty result +defaults to `{"response": "Action completed."}`. + +**Decorators:** `@must_use` + +## Signature + +```rust +struct FunctionResult { /* fields */ } +``` + +## Inheritance + +**Implements:** `Debug`, `Clone`, `Default` + +## Methods + +### add\_action + +#### Signature + +```rust +fn add_action(&mut self, action: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 133. + +*** + +### add\_actions + +#### Signature + +```rust +fn add_actions(&mut self, actions: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 138. + +*** + +### add\_dynamic\_hints + +#### Signature + +```rust +fn add_dynamic_hints(&mut self, hints: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 552. + +*** + +### clear\_dynamic\_hints + +Clear all dynamic speech-recognition hints. + +Mirrors the Python reference (`FunctionResult.clear_dynamic_hints`), +which appends `{"clear_dynamic_hints": {}}` — the value is an **empty +object**, not a boolean. (`json!({})` serialises to `{}`.) + +#### Signature + +```rust +fn clear_dynamic_hints(&mut self) -> &mut Self +``` + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 562. + +*** + +### clone + +#### Signature + +```rust +fn clone(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 96. + +*** + +### connect + +#### Signature + +```rust +fn connect(&mut self, destination: &str, _final: bool, from: &str) -> &mut Self +``` + +#### Parameters + + + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 200. + +*** + +### create\_payment\_action + +Create a payment action for use in payment prompts. + +Mirrors the Python reference (`FunctionResult.create_payment_action`): +`{"type": action_type, "phrase": phrase}` (`action_type` is `"Say"` for +text-to-speech or `"Play"` for an audio file). + +#### Signature + +```rust +fn create_payment_action(action_type: &str, phrase: &str) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 1225. + +*** + +### create\_payment\_parameter + +Create a payment parameter (name/value pair) for use with `pay`. + +Mirrors the Python reference (`FunctionResult.create_payment_parameter`): +`{"name": name, "value": value}`. + +#### Signature + +```rust +fn create_payment_parameter(name: &str, value: &str) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 1236. + +*** + +### create\_payment\_prompt + +Create a payment-prompt structure for use with `pay`. + +Mirrors the Python reference (`FunctionResult.create_payment_prompt`): +`{"for": for_situation, "actions": actions, "card_type"?, "error_type"?}`. +`actions` is the list of `{type, phrase}` action objects (a JSON array). +`card_type`/`error_type` are emitted only when non-empty. + +#### Signature + +```rust +fn create_payment_prompt( + for_situation: &str, + actions: ?, + card_type: &str, + error_type: &str +) -> ? +``` + +#### Parameters + + + + + + + + + +#### Returns + +`?` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 1202. + +*** + +### default + +#### Signature + +```rust +fn default() -> Self +``` + +#### Returns + +`Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 1245. + +*** + +### enable\_extensive\_data + +#### Signature + +```rust +fn enable_extensive_data(&mut self, enabled: bool) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 600. + +*** + +### enable\_functions\_on\_timeout + +Python: add\_action("functions\_on\_speaker\_timeout", enabled). + +#### Signature + +```rust +fn enable_functions_on_timeout(&mut self, enabled: bool) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 594. + +*** + +### execute\_rpc + +Execute an RPC method on a call (SWML `execute_rpc`). + +Mirrors the Python reference (`FunctionResult.execute_rpc`): the rpc +params are keyed `{method, call_id?, node_id?, params?}` where +`call_id` and `node_id` are **TOP-LEVEL siblings** of `method`/`params` +(NOT nested inside `params`), and the whole `{"execute_rpc": ...}` verb +is wrapped in a canonical SWML document via `execute_swml` — never a +bare action key. There is **no** `jsonrpc` envelope (the previous port +invented one — removed) and method strings are **bare** (`"dial"`, not +`"calling.dial"`). `call_id`/`node_id` are emitted only when non-empty; +`params` is emitted only when it is a non-empty value (Python's +`if params:` — an empty object/null is dropped). + +#### Signature + +```rust +fn execute_rpc( + &mut self, + method: &str, + params: ?, + call_id: &str, + node_id: &str +) -> &mut Self +``` + +#### Parameters + + + + + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 1110. + +*** + +### execute\_swml + +Execute SWML content, optionally marking the call to exit the agent +afterward (`transfer = true`). + +Mirrors the Python reference (`FunctionResult.execute_swml`): the action +key is **always** `"SWML"`; when `transfer` is set, a `"transfer": "true"` +flag is added **inside** the SWML dict (it is not a separate action key). + +Input normalisation matches Python: + +- A JSON **string** is parsed to a dict so the transfer flag can be added; + if it is not valid JSON it falls back to `{"raw_swml": ""}`. +- A JSON **object** is used as-is (a copy, so the transfer flag does not + mutate the caller's value). +- Any other JSON scalar/array is wrapped as `{"raw_swml": }`, + the same fallback Python uses for a non-dict, non-string `swml_content`. + +#### Signature + +```rust +fn execute_swml(&mut self, swml_content: ?, transfer: bool) -> &mut Self +``` + +#### Parameters + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 627. + +*** + +### fmt + +#### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 96. + +*** + +### hangup + +#### Signature + +```rust +fn hangup(&mut self) -> &mut Self +``` + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 252. + +*** + +### hold + +#### Signature + +```rust +fn hold(&mut self, timeout: i64) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 258. + +*** + +### join\_conference + +Join an ad-hoc audio conference (SWML `join_conference`). + +Mirrors the Python reference +(`FunctionResult.join_conference`) — `name` is required and the +remaining 18 parameters are optional with the reference's defaults. +`wait_url` carries the hold-music URL (Python has no `hold_audio` +parameter; this port previously invented one — it is removed). + +The seven closed-set / range validations from the reference are +reproduced and return `Err(message)` with the reference's exact +`ValueError` text (Rust's idiomatic recoverable-validation channel — +the `Err` type is out-of-band to the cross-language audit, which +unwraps `Result` to `T`): + +- `beep` ∈ `{true, false, onEnter, onExit}` +- `0 < max_participants <= 250` +- `record` ∈ `{do-not-record, record-from-start}` +- `trim` ∈ `{trim-silence, do-not-trim}` +- `status_callback_method` ∈ `{GET, POST}` +- `recording_status_callback_method` ∈ `{GET, POST}` +- `name` (trimmed) must not be empty + +When every parameter is left at its default the `join_conference` value +is the bare conference name string; otherwise it is a `{"name": ...}` +object carrying every non-default parameter under its snake\_case wire +key. Either way the verb is wrapped in the canonical SWML document +(`{"SWML": {version, sections: {main: [{join_conference: ...}]}}}`), +matching the reference (which routes join\_conference through +`execute_swml`) — never a bare verb. + +#### Signature + +```rust +fn join_conference( + &mut self, + name: &str, + muted: bool, + beep: &str, + start_on_enter: bool, + end_on_exit: bool, + wait_url: ?<&str>, + max_participants: i64, + record: &str, + region: ?<&str>, + trim: &str, + coach: ?<&str>, + status_callback_event: ?<&str>, + status_callback: ?<&str>, + status_callback_method: &str, + recording_status_callback: ?<&str>, + recording_status_callback_method: &str, + recording_status_callback_event: &str, + result: ? +) -> ?<&mut Self, ?> +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`?<&mut Self, ?>` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 695. + +*** + +### join\_room + +Join a RELAY room (SWML `join_room`). Wrapped in a SWML document, +matching the Python reference. + +#### Signature + +```rust +fn join_room(&mut self, name: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 852. + +*** + +### new + +#### Signature + +```rust +fn new() -> Self +``` + +#### Returns + +`Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 105. + +*** + +### pay + +Process a payment (SWML `pay`). + +Mirrors the Python reference (`FunctionResult.pay`) exactly, including its +wire-key choices and value rendering: + +- the verb is wrapped in a SWML document whose `main` section is + `[{set: {ai_response}}, {pay: pay_params}]` — never a bare verb; +- the input-method key is **`input`** (not `input_method`); +- the status-callback key is **`status_url`** (the previous port invented + `action_url` — removed); +- `timeout`, `max_attempts`, `min_postal_code_length` are **stringified**; + `security_code` is rendered lower-case (`"true"`/`"false"`); +- `payment_method`, `token_type`, `currency`, `language`, `voice`, + `valid_card_types`, and `postal_code` are always emitted; `status_url`, + `charge_amount`, `description`, `parameters`, and `prompts` are emitted + only when supplied. + +`postal_code` is taken as the already-rendered wire string (pass +`"true"`/`"false"` for the boolean cases, or the literal postcode), +mirroring the reference's `Union[bool, str]`. `parameters`/`prompts` are +JSON arrays (`Value::Null` to omit). An empty `ai_response` uses the +reference's default status message. + +#### Signature + +```rust +fn pay( + &mut self, + payment_connector_url: &str, + input_method: &str, + status_url: &str, + payment_method: &str, + timeout: i64, + max_attempts: i64, + security_code: bool, + postal_code: &str, + min_postal_code_length: i64, + token_type: &str, + charge_amount: &str, + currency: &str, + language: &str, + voice: &str, + description: &str, + valid_card_types: &str, + parameters: ?, + prompts: ?, + ai_response: &str +) -> &mut Self +``` + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 1011. + +*** + +### play\_background\_file + +Play an audio/video file in the background. + +Mirrors the Python reference (`FunctionResult.play_background_file`): the +action key is `"playback_bg"`. With `wait = true` the value is +`{"file": filename, "wait": true}` (suppress attention-getting behaviour); +otherwise it is the bare filename string. + +#### Signature + +```rust +fn play_background_file(&mut self, filename: &str, wait: bool) -> &mut Self +``` + +#### Parameters + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 439. + +*** + +### record\_call + +Start background call recording (SWML `record_call`). + +Mirrors the Python reference (`FunctionResult.record_call`): the verb is +wrapped in a SWML document (`{"SWML": {version, sections: {main: [{record_call: params}]}}}`) — never a bare verb — and the reference's +two closed-set validations are reproduced, returning `Err(message)` with +the exact reference `ValueError` text: + +- `format` ∈ `{wav, mp3, mp4}` +- `direction` ∈ `{speak, listen, both}` + +`stereo`, `format`, `direction`, `beep`, and `input_sensitivity` are +**always** emitted (matching the reference, which seeds `record_params` +with all five); `control_id`, `terminators`, `initial_timeout`, +`end_silence_timeout`, `max_length`, and `status_url` are emitted only +when supplied. There is no `initiator` field — the previous port invented +it; it is removed. + +#### Signature + +```rust +fn record_call>: ?>, impl Into>: ?>>( + &mut self, + control_id: &str, + stereo: bool, + format: impl ?>, + direction: impl ?>, + terminators: &str, + beep: bool, + input_sensitivity: f64, + initial_timeout: ?, + end_silence_timeout: ?, + max_length: ?, + status_url: &str +) -> ?<&mut Self, ?> +``` + +#### Type Parameters + + + + + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + +#### Returns + +`?<&mut Self, ?>` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 473. + +*** + +### remove\_global\_data + +Python: add\_action("unset\_global\_data", keys) — the value is the bare key +(Python's `Union[str, List[str]]`, passed through verbatim): a single key +emits the **bare string** (`"plan"`), a list emits the **array** +(`["plan", "chips"]`); no `{"keys": ...}` wrapper. Accepts both call +styles via `impl Into` (`"plan"` or `vec!["plan", "chips"]`). + +#### Signature + +```rust +fn remove_global_data: ?>( + &mut self, + keys: impl ? +) -> &mut Self +``` + +#### Type Parameters + + + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 307. + +*** + +### remove\_metadata + +Python: add\_action("unset\_meta\_data", keys) — the value is the bare key +(Python's `Union[str, List[str]]`, passed through verbatim): a single key +emits the **bare string** (`"token"`), a list emits the **array** +(`["token", "count"]`); no `{"keys": ...}` wrapper. Accepts both call +styles via `impl Into`. + +#### Signature + +```rust +fn remove_metadata: ?>( + &mut self, + keys: impl ? +) -> &mut Self +``` + +#### Type Parameters + + + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 323. + +*** + +### replace\_in\_history + +After first send, replace the tool\_call+result pair in conversation +history. + +Mirrors the Python reference (`FunctionResult.replace_in_history`, whose +`text` parameter is `Union[str, bool] = True`): the action key is +`"replace_in_history"`. `Some(t)` replaces the tool call with an assistant +message containing `t`; `None` uses the default `true`, which removes the +tool\_call+result pair from history entirely. + +#### Signature + +```rust +fn replace_in_history(&mut self, text: ?<&str>) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 418. + +*** + +### rpc\_ai\_message + +Inject a message into an AI agent on another call (via `execute_rpc`). + +Mirrors the Python reference (`FunctionResult.rpc_ai_message`): method +`"ai_message"`, `call_id` carried as the TOP-LEVEL execute\_rpc sibling, +params `{role, message_text}`. `role` defaults to `"system"` and is +caller-overridable (the previous port omitted `role` and mis-nested +`call_id` — fixed). + +#### Signature + +```rust +fn rpc_ai_message( + &mut self, + call_id: &str, + message_text: &str, + role: &str +) -> &mut Self +``` + +#### Parameters + + + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 1167. + +*** + +### rpc\_ai\_unhold + +Unhold another call (via `execute_rpc`). + +Mirrors the Python reference (`FunctionResult.rpc_ai_unhold`): method +`"ai_unhold"`, `call_id` as the TOP-LEVEL execute\_rpc sibling, params +`{}` (which `execute_rpc` drops, since it is empty). + +#### Signature + +```rust +fn rpc_ai_unhold(&mut self, call_id: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 1180. + +*** + +### rpc\_dial + +Dial out to a number with a destination SWML URL (via `execute_rpc`). + +Mirrors the Python reference (`FunctionResult.rpc_dial`): method `"dial"`, +params `{devices: {type: device_type, params: {to_number, from_number}}, +dest_swml}`. `device_type` defaults to `"phone"` and is caller-overridable +(the previous port hard-coded the device and invented +`call_timeout`/`region` — removed). + +#### Signature + +```rust +fn rpc_dial( + &mut self, + to_number: &str, + from_number: &str, + dest_swml: &str, + device_type: &str +) -> &mut Self +``` + +#### Parameters + + + + + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 1140. + +*** + +### say + +#### Signature + +```rust +fn say(&mut self, text: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 428. + +*** + +### send\_sms + +Send a text message to a PSTN number (SWML `send_sms`). + +Mirrors the Python reference (`FunctionResult.send_sms`): the verb is +wrapped in a SWML document — never a bare verb. The reference's +validation is reproduced, returning `Err` with the exact reference +`ValueError` text when neither `body` nor `media` is provided. `body` is +emitted only when non-empty; `media`, `tags`, and `region` are emitted +only when supplied. + +#### Signature + +```rust +fn send_sms( + &mut self, + to: &str, + from: &str, + body: &str, + media: ?<&str>, + tags: ?<&str>, + region: &str +) -> ?<&mut Self, ?> +``` + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`?<&mut Self, ?>` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 955. + +*** + +### set\_end\_of\_speech\_timeout + +#### Signature + +```rust +fn set_end_of_speech_timeout(&mut self, ms: i64) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 567. + +*** + +### set\_metadata + +#### Signature + +```rust +fn set_metadata(&mut self, data: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 313. + +*** + +### set\_post\_process + +#### Signature + +```rust +fn set_post_process(&mut self, val: bool) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 128. + +*** + +### set\_response + +#### Signature + +```rust +fn set_response(&mut self, text: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 123. + +*** + +### set\_speech\_event\_timeout + +#### Signature + +```rust +fn set_speech_event_timeout(&mut self, ms: i64) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 572. + +*** + +### simulate\_user\_input + +Queue simulated user input. + +Mirrors the Python reference (`FunctionResult.simulate_user_input`): +the action key is **`user_input`** (the previous port emitted +`simulate_user_input`, which is the _method_ name, not the wire key). + +#### Signature + +```rust +fn simulate_user_input(&mut self, text: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 1189. + +*** + +### sip\_refer + +Send a SIP REFER (SWML `sip_refer`). Wrapped in a SWML document, matching +the Python reference. + +#### Signature + +```rust +fn sip_refer(&mut self, to_uri: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 859. + +*** + +### stop + +#### Signature + +```rust +fn stop(&mut self) -> &mut Self +``` + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 290. + +*** + +### stop\_background\_file + +Python: add\_action("stop\_playback\_bg", True). + +#### Signature + +```rust +fn stop_background_file(&mut self) -> &mut Self +``` + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 450. + +*** + +### stop\_record\_call + +Stop an active background recording (SWML `stop_record_call`). + +Mirrors the Python reference: the verb is wrapped in a SWML document. The +params are `{"control_id": ...}` when supplied, else `{}` (most-recent). + +#### Signature + +```rust +fn stop_record_call(&mut self, control_id: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 540. + +*** + +### stop\_tap + +Stop an active tap stream (SWML `stop_tap`). Wrapped in a SWML document, +matching the Python reference. + +#### Signature + +```rust +fn stop_tap(&mut self, control_id: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 937. + +*** + +### switch\_context + +Change the agent context/prompt during the conversation. + +Mirrors the Python reference (`FunctionResult.switch_context`): when only +`system_prompt` is supplied (no `user_prompt`/`consolidate`/`full_reset`, +and — for this port's documented `isolated` extension — no `isolated`), +the action value is the **bare system-prompt string** +(`{"context_switch": ""}`). Otherwise it is the object form +carrying every set field. + +#### Signature + +```rust +fn switch_context( + &mut self, + system_prompt: &str, + user_prompt: &str, + consolidate: bool, + full_reset: bool, + isolated: bool +) -> &mut Self +``` + +#### Parameters + + + + + + + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 369. + +*** + +### swml\_change\_context + +Python: add\_action("change\_context", context\_name) — the value is the +bare context name string (not a `context_switch` dict). + +#### Signature + +```rust +fn swml_change_context(&mut self, context_name: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 356. + +*** + +### swml\_change\_step + +Python: add\_action("change\_step", step\_name) — the value is the bare step +name string (not a `context_switch` dict). + +#### Signature + +```rust +fn swml_change_step(&mut self, step_name: &str) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 349. + +*** + +### swml\_transfer + +Add a SWML transfer action with an AI response set up for when the +transfer completes and control returns to the agent. + +Mirrors the Python reference (`FunctionResult.swml_transfer`): emits a +SWML document whose `main` section is `[{set: {ai_response}}, {transfer: +{dest}}]`, with a top-level `"transfer": str(final).lower()` flag marking +whether the transfer is permanent (`final = true`, the default) or +temporary. `ai_response` is carried inside the SWML `set` verb (it is NOT +assigned to `self.response`). + +#### Signature + +```rust +fn swml_transfer( + &mut self, + dest: &str, + ai_response: &str, + _final: bool +) -> &mut Self +``` + +#### Parameters + + + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 233. + +*** + +### swml\_user\_event + +Send a user event through SWML to update the client UI. + +Mirrors the Python reference (`FunctionResult.swml_user_event`): emits a +`"SWML"` action whose `main` section nests the event payload under +`{"user_event": {"event": event_data}}`. + +#### Signature + +```rust +fn swml_user_event(&mut self, event_data: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 334. + +*** + +### tap + +Start a background call tap (SWML `tap`). + +Mirrors the Python reference (`FunctionResult.tap`): the verb is wrapped +in a SWML document — never a bare verb — and the reference's three +validations are reproduced, returning `Err(message)` with the exact +reference `ValueError` text: + +- `direction` ∈ `{speak, hear, both}` +- `codec` ∈ `{PCMU, PCMA}` +- `rtp_ptime > 0` + +Only `uri` is always emitted; `control_id`, `direction`, `codec`, +`rtp_ptime`, and `status_url` are emitted only when they differ from the +reference defaults (`direction="both"`, `codec="PCMU"`, `rtp_ptime=20`). + +#### Signature + +```rust +fn tap>: ?>, impl Into>: ?>>( + &mut self, + uri: &str, + control_id: &str, + direction: impl ?>, + codec: impl ?>, + rtp_ptime: i64, + status_url: &str +) -> ?<&mut Self, ?> +``` + +#### Type Parameters + + + + + +#### Parameters + + + + + + + + + + + + + +#### Returns + +`?<&mut Self, ?>` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 878. + +*** + +### to\_json + +Compact JSON string. + +#### Signature + +```rust +fn to_json(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 178. + +*** + +### to\_value + +Serialise to a JSON value. + +- `response` is always included. +- `action` is only included if at least one action exists. +- `post_process` is only included if `true`. + +#### Signature + +```rust +fn to_value(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 150. + +*** + +### toggle\_functions + +Enable/disable specific SWAIG functions. + +Mirrors the Python reference (`FunctionResult.toggle_functions`), which +takes a `List[Dict[str, Any]]` (each dict carries `function` + `active`, +plus any further keys) and passes it through verbatim via +`add_action("toggle_functions", function_toggles)`. The action value is +therefore the **ordered list as-is** — order is preserved and arbitrary +keys/values survive. A `HashMap` cannot express this (it +drops ordering and forbids extra keys / non-bool values), so the +parameter is the bare `Vec` list, exactly like `add_dynamic_hints`. + +#### Signature + +```rust +fn toggle_functions(&mut self, function_toggles: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 587. + +*** + +### update\_global\_data + +#### Signature + +```rust +fn update_global_data(&mut self, data: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 297. + +*** + +### update\_settings + +Python: add\_action("settings", settings). + +#### Signature + +```rust +fn update_settings(&mut self, settings: ?) -> &mut Self +``` + +#### Parameters + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 606. + +*** + +### wait\_for\_user + +Control how the agent waits for user input. + +Mirrors the Python reference (`FunctionResult.wait_for_user`): the action +value is a **scalar**, chosen by the same precedence — +`answer_first` (the string `"answer_first"`) > `timeout` (bare int) > +`enabled` (bare bool) > the default bare bool `true`. + +#### Signature + +```rust +fn wait_for_user( + &mut self, + enabled: ?, + timeout: ?, + answer_first: ? +) -> &mut Self +``` + +#### Parameters + + + + + + + +#### Returns + +`&mut Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 271. + +*** + +### with\_response + +#### Signature + +```rust +fn with_response(response: &str) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) + +Line 113. ## Enums @@ -327,4 +2196,4 @@ Line 36. [`src/swaig/function_result.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/function_result.rs) -Line 1. +Line 98. diff --git a/fern/products/sdk-reference/rust/agents/swaig/index.mdx b/fern/products/sdk-reference/rust/agents/swaig/index.mdx index f2c9a9d6c0..25dbb26a0c 100644 --- a/fern/products/sdk-reference/rust/agents/swaig/index.mdx +++ b/fern/products/sdk-reference/rust/agents/swaig/index.mdx @@ -15,15 +15,21 @@ lustri: --- # `swaig` -## Modules +## Classes - + + Result returned from a SWAIG function handler. + - Typed, compile-time-checked closed sets for SWML media-action parameters. + Error returned when a string is parsed into one of the closed-set media enums (via \[`FromStr`]) but is not a recognised wire value. + +## Modules + + Typed builder for SWAIG tool-parameter JSON schemas. diff --git a/fern/products/sdk-reference/rust/agents/swaig/media-enums/index.mdx b/fern/products/sdk-reference/rust/agents/swaig/media-enums/index.mdx index c5792ae7a7..d4a1465fdf 100644 --- a/fern/products/sdk-reference/rust/agents/swaig/media-enums/index.mdx +++ b/fern/products/sdk-reference/rust/agents/swaig/media-enums/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Rust SDK" icon: "rust" lustri: auto_generated: true - kind: "module" + kind: "class" language: "rust" qualified_name: "signalwire::swaig::media_enums" parent: "signalwire::swaig" @@ -15,32 +15,28 @@ lustri: --- # `media_enums` -Typed, compile-time-checked closed sets for SWML media-action parameters. +Error returned when a string is parsed into one of the closed-set media +enums (via \[`FromStr`]) but is not a recognised wire value. -Several `FunctionResult` media helpers take -parameters that the Python reference _validates_ against a fixed set and -rejects with `ValueError` otherwise: +Carries the offending input and the enum's accepted set so the message is +actionable — e.g. `"foo" is not a valid RecordFormat (expected one of: +wav, mp3, mp4)`. This is the typed analogue of the Python reference's +`ValueError`, surfaced through the idiomatic `"wav".parse::()` +entry point. -\| Helper | Parameter | Allowed values (Python reference) | -\|-------------------|-------------|------------------------------------------| -\| `record_call` | `format` | `"wav"`, `"mp3"`, `"mp4"` | -\| `record_call` | `direction` | `"speak"`, `"listen"`, `"both"` | -\| `tap` | `direction` | `"speak"`, `"hear"`, `"both"` | -\| `tap` | `codec` | `"PCMU"`, `"PCMA"` | +## Signature -In Python a typo (`record_call(format="ogg")`) only fails at runtime with a -`ValueError`. These enums give the same closed sets a typed alternative so -the typo fails at the **call site** with editor autocompletion and -exhaustive matching. +```rust +struct ParseMediaEnumError { /* fields */ } +``` -The consuming methods take `format: impl Into>` (and -likewise for `direction`/`codec`), so the **same parameter** accepts both -the typed enum _and_ a raw wire string (\[`MediaArg`] wraps the two). The raw -`&str` path stays available for Python parity / forward-compat; an out-of-set -raw value is still rejected in the method body with the reference's exact -`ValueError` text, and the emitted SWML is byte-identical either way: +## Inheritance -```no_run +**Implements:** `Debug`, `Clone`, `PartialEq`, `Eq`, `Display`, [Error](/docs/sdk-reference/reference/rust/core/security/webhook-layer/webhook-validate#error) + +## Examples + +```rust use signalwire::swaig::FunctionResult; use signalwire::swaig::{RecordFormat, RecordDirection}; @@ -52,33 +48,119 @@ fr.record_call("rec1", false, RecordFormat::Mp3, RecordDirection::Both, fr.record_call("rec2", false, "mp3", "both", "", false, 44.0, None, None, None, "").unwrap(); ``` -Note that `record_call`'s direction set (`speak`/`listen`/`both`) and -`tap`'s direction set (`speak`/`hear`/`both`) are **different** — `tap` uses -`hear` where `record_call` uses `listen` — so they are modelled as two -distinct enums, \[`RecordDirection`] and \[`TapDirection`], faithfully -mirroring the reference's two separate validation lists. +## Methods -## Examples +### clone + +#### Signature ```rust -use signalwire::swaig::FunctionResult; -use signalwire::swaig::{RecordFormat, RecordDirection}; +fn clone(&self) -> ? +``` -let mut fr = FunctionResult::new(); -// typed + autocompleted — identical wire shape to the bare strings below -fr.record_call("rec1", false, RecordFormat::Mp3, RecordDirection::Both, - "", false, 44.0, None, None, None, "").unwrap(); -// bare strings still work (Python parity) -fr.record_call("rec2", false, "mp3", "both", "", false, 44.0, None, None, None, "").unwrap(); +#### Returns + +`?` + +#### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 55. + +*** + +### eq + +#### Signature + +```rust +fn eq(&self, other: &?) -> bool ``` -## Classes +#### Parameters + + + +#### Returns + +`bool` + +#### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 55. + +*** + +### fmt + +#### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 55. + +*** + +### fmt + +#### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) + +Line 81. + +*** + +### input + +The string that failed to parse. + +#### Signature + +```rust +fn input(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - - - Error returned when a string is parsed into one of the closed-set media enums (via \[`FromStr`]) but is not a recognised wire value. - - +Line 75. ## Enums @@ -1936,4 +2018,4 @@ Line 268. [`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) -Line 1. +Line 56. diff --git a/fern/products/sdk-reference/rust/agents/swaig/media-enums/parse-media-enum-error/index.mdx b/fern/products/sdk-reference/rust/agents/swaig/media-enums/parse-media-enum-error/index.mdx deleted file mode 100644 index c05ca0d469..0000000000 --- a/fern/products/sdk-reference/rust/agents/swaig/media-enums/parse-media-enum-error/index.mdx +++ /dev/null @@ -1,155 +0,0 @@ ---- -slug: "/reference/rust/agents/swaig/media-enums/parse-media-enum-error" -title: "ParseMediaEnumError" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::swaig::media_enums::ParseMediaEnumError" - parent: "signalwire::swaig::media_enums" - module: "agents.swaig.media_enums" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs" - visibility: "public" ---- -# `ParseMediaEnumError` - -Error returned when a string is parsed into one of the closed-set media -enums (via \[`FromStr`]) but is not a recognised wire value. - -Carries the offending input and the enum's accepted set so the message is -actionable — e.g. `"foo" is not a valid RecordFormat (expected one of: -wav, mp3, mp4)`. This is the typed analogue of the Python reference's -`ValueError`, surfaced through the idiomatic `"wav".parse::()` -entry point. - -## Signature - -```rust -struct ParseMediaEnumError { /* fields */ } -``` - -## Inheritance - -**Implements:** `Debug`, `Clone`, `PartialEq`, `Eq`, `Display`, [Error](/docs/sdk-reference/reference/rust/core/security/webhook-layer/webhook-validate#error) - -## Methods - -### clone - -#### Signature - -```rust -fn clone(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 55. - -*** - -### eq - -#### Signature - -```rust -fn eq(&self, other: &?) -> bool -``` - -#### Parameters - - - -#### Returns - -`bool` - -#### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 55. - -*** - -### fmt - -#### Signature - -```rust -fn fmt(&self, f: &mut ?<'_>) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 55. - -*** - -### fmt - -#### Signature - -```rust -fn fmt(&self, f: &mut ?<'_>) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 81. - -*** - -### input - -The string that failed to parse. - -#### Signature - -```rust -fn input(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 75. - -## Source - -[`src/swaig/media_enums.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swaig/media_enums.rs) - -Line 56. diff --git a/fern/products/sdk-reference/rust/agents/swml/index.mdx b/fern/products/sdk-reference/rust/agents/swml/index.mdx index 1d9cb7f544..067020e3e4 100644 --- a/fern/products/sdk-reference/rust/agents/swml/index.mdx +++ b/fern/products/sdk-reference/rust/agents/swml/index.mdx @@ -22,19 +22,15 @@ lustri: SWML document: version + named sections containing verb arrays. + + Metadata about a single SWML verb extracted from the schema. + + SWML service: holds a document, auth credentials, and handles HTTP requests. -## Modules - - - - - - - ## Source [`src/swml/mod.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/mod.rs) diff --git a/fern/products/sdk-reference/rust/agents/swml/schema/index.mdx b/fern/products/sdk-reference/rust/agents/swml/schema/index.mdx index 3ef371a968..51c11075cb 100644 --- a/fern/products/sdk-reference/rust/agents/swml/schema/index.mdx +++ b/fern/products/sdk-reference/rust/agents/swml/schema/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Rust SDK" icon: "rust" lustri: auto_generated: true - kind: "module" + kind: "class" language: "rust" qualified_name: "signalwire::swml::schema" parent: "signalwire::swml" @@ -15,13 +15,67 @@ lustri: --- # `schema` -## Classes +Metadata about a single SWML verb extracted from the schema. - - - Metadata about a single SWML verb extracted from the schema. - - +## Signature + +```rust +struct VerbInfo { /* fields */ } +``` + +## Inheritance + +**Implements:** `Debug`, `Clone` + +## Properties + + + + + +## Methods + +### clone + +#### Signature + +```rust +fn clone(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/swml/schema.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/schema.rs) + +Line 6. + +*** + +### fmt + +#### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/swml/schema.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/schema.rs) + +Line 6. ## Functions @@ -123,4 +177,4 @@ Line 87. [`src/swml/schema.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/schema.rs) -Line 1. +Line 7. diff --git a/fern/products/sdk-reference/rust/agents/swml/schema/verb-info/index.mdx b/fern/products/sdk-reference/rust/agents/swml/schema/verb-info/index.mdx deleted file mode 100644 index 39c0e1e367..0000000000 --- a/fern/products/sdk-reference/rust/agents/swml/schema/verb-info/index.mdx +++ /dev/null @@ -1,84 +0,0 @@ ---- -slug: "/reference/rust/agents/swml/schema/verb-info" -title: "VerbInfo" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::swml::schema::VerbInfo" - parent: "signalwire::swml::schema" - module: "agents.swml.schema" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/swml/schema.rs" - visibility: "public" ---- -# `VerbInfo` - -Metadata about a single SWML verb extracted from the schema. - -## Signature - -```rust -struct VerbInfo { /* fields */ } -``` - -## Inheritance - -**Implements:** `Debug`, `Clone` - -## Properties - - - - - -## Methods - -### clone - -#### Signature - -```rust -fn clone(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/swml/schema.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/schema.rs) - -Line 6. - -*** - -### fmt - -#### Signature - -```rust -fn fmt(&self, f: &mut ?<'_>) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/swml/schema.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/schema.rs) - -Line 6. - -## Source - -[`src/swml/schema.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/swml/schema.rs) - -Line 7. diff --git a/fern/products/sdk-reference/rust/agents/swml/service/index.mdx b/fern/products/sdk-reference/rust/agents/swml/service/index.mdx index 34f9c4d5ed..4a59026699 100644 --- a/fern/products/sdk-reference/rust/agents/swml/service/index.mdx +++ b/fern/products/sdk-reference/rust/agents/swml/service/index.mdx @@ -23,6 +23,18 @@ SWML service: holds a document, auth credentials, and handles HTTP requests. struct Service { /* fields */ } ``` +## Classes + + + + Options for constructing a `Service`. + + + + Tool registered on a `Service` for SWAIG dispatch. The `definition` field holds the rendered SWAIG function dict (function/purpose/argument); `handler` is `None` for raw / DataMap-style functions, where dispatch happens server-side rather than in this process. + + + ## Methods ### add\_verb diff --git a/fern/products/sdk-reference/rust/agents/swml/service/index__2.mdx b/fern/products/sdk-reference/rust/agents/swml/service/index__2.mdx deleted file mode 100644 index b06ecafff7..0000000000 --- a/fern/products/sdk-reference/rust/agents/swml/service/index__2.mdx +++ /dev/null @@ -1,26 +0,0 @@ ---- -slug: "/reference/rust/agents/swml/service/index__2" -title: "service" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "agents.swml.service" - parent: "signalwire::swml" - module: "agents.swml" ---- -# `service` - -## Classes - - - - Options for constructing a `Service`. - - - - Tool registered on a `Service` for SWAIG dispatch. The `definition` field holds the rendered SWAIG function dict (function/purpose/argument); `handler` is `None` for raw / DataMap-style functions, where dispatch happens server-side rather than in this process. - - diff --git a/fern/products/sdk-reference/rust/agents/swml/service/service-options/index.mdx b/fern/products/sdk-reference/rust/agents/swml/service/service-options/index.mdx index b51a3c0141..5eeac5cca1 100644 --- a/fern/products/sdk-reference/rust/agents/swml/service/service-options/index.mdx +++ b/fern/products/sdk-reference/rust/agents/swml/service/service-options/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "rust" qualified_name: "signalwire::swml::service::ServiceOptions" - parent: "agents.swml.service" + parent: "signalwire::swml::service" module: "agents.swml.service" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs" visibility: "public" diff --git a/fern/products/sdk-reference/rust/agents/swml/service/tool-def/index.mdx b/fern/products/sdk-reference/rust/agents/swml/service/tool-def/index.mdx index f6b007e0a5..5a818801fb 100644 --- a/fern/products/sdk-reference/rust/agents/swml/service/tool-def/index.mdx +++ b/fern/products/sdk-reference/rust/agents/swml/service/tool-def/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "rust" qualified_name: "signalwire::swml::service::ToolDef" - parent: "agents.swml.service" + parent: "signalwire::swml::service" module: "agents.swml.service" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/swml/service.rs" visibility: "public" diff --git a/fern/products/sdk-reference/rust/core/security/index.mdx b/fern/products/sdk-reference/rust/core/security/index.mdx index ba0d12a7ac..4203333303 100644 --- a/fern/products/sdk-reference/rust/core/security/index.mdx +++ b/fern/products/sdk-reference/rust/core/security/index.mdx @@ -15,11 +15,17 @@ lustri: --- # `security` -## Modules +## Classes - + + Session manager that generates and validates HMAC-signed tokens. + + +## Modules + + Webhook signature validation for SignalWire-signed HTTP requests. diff --git a/fern/products/sdk-reference/rust/core/security/session-manager/index.mdx b/fern/products/sdk-reference/rust/core/security/session-manager/index.mdx index 2e540ad6ba..849b9104fa 100644 --- a/fern/products/sdk-reference/rust/core/security/session-manager/index.mdx +++ b/fern/products/sdk-reference/rust/core/security/session-manager/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Rust SDK" icon: "rust" lustri: auto_generated: true - kind: "module" + kind: "class" language: "rust" qualified_name: "signalwire::security::session_manager" parent: "signalwire::security" @@ -15,16 +15,207 @@ lustri: --- # `session_manager` -## Classes +Session manager that generates and validates HMAC-signed tokens. - - - Session manager that generates and validates HMAC-signed tokens. - - +Tokens bind a function name and call ID together with an expiry time, +preventing replay attacks and cross-function/cross-call misuse. + +## Signature + +```rust +struct SessionManager { /* fields */ } +``` + +## Inheritance + +**Implements:** `Clone` + +## Methods + +### clone + +#### Signature + +```rust +fn clone(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/security/session_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/session_manager.rs) + +Line 13. + +*** + +### create\_session + +Create or confirm a session, returning the call ID. + +#### Signature + +```rust +fn create_session(&self, call_id: ?<&str>) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/security/session_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/session_manager.rs) + +Line 41. + +*** + +### create\_token + +Generate an HMAC-SHA256 signed token for a given function and call. + +Token format (before base64url encoding): +`{call_id}.{function_name}.{expiry}.{nonce}.{hmac_hex}` + +#### Signature + +```rust +fn create_token(&self, function_name: &str, call_id: &str) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/security/session_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/session_manager.rs) + +Line 52. + +*** + +### new + +Create a new session manager with a random 32-byte secret. + +#### Signature + +```rust +fn new(token_expiry_secs: u64) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/security/session_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/session_manager.rs) + +Line 21. + +*** + +### token\_expiry\_secs + +Get the configured token expiry in seconds. + +#### Signature + +```rust +fn token_expiry_secs(&self) -> u64 +``` + +#### Returns + +`u64` + +#### Source + +[`src/security/session_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/session_manager.rs) + +Line 36. + +*** + +### validate\_token + +Validate a token against the expected function name and call ID. + +Uses timing-safe comparison for all security-critical fields. + +#### Signature + +```rust +fn validate_token( + &self, + function_name: &str, + call_id: &str, + token: &str +) -> bool +``` + +#### Parameters + + + + + + + +#### Returns + +`bool` + +#### Source + +[`src/security/session_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/session_manager.rs) + +Line 70. + +*** + +### with\_defaults + +Create a new session manager with the default expiry (3600 seconds). + +#### Signature + +```rust +fn with_defaults() -> Self +``` + +#### Returns + +`Self` + +#### Source + +[`src/security/session_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/session_manager.rs) + +Line 31. ## Source [`src/security/session_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/session_manager.rs) -Line 1. +Line 14. diff --git a/fern/products/sdk-reference/rust/core/security/session-manager/session-manager/index.mdx b/fern/products/sdk-reference/rust/core/security/session-manager/session-manager/index.mdx deleted file mode 100644 index bea53ffea7..0000000000 --- a/fern/products/sdk-reference/rust/core/security/session-manager/session-manager/index.mdx +++ /dev/null @@ -1,221 +0,0 @@ ---- -slug: "/reference/rust/core/security/session-manager/session-manager" -title: "SessionManager" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::security::session_manager::SessionManager" - parent: "signalwire::security::session_manager" - module: "core.security.session_manager" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/security/session_manager.rs" - visibility: "public" ---- -# `SessionManager` - -Session manager that generates and validates HMAC-signed tokens. - -Tokens bind a function name and call ID together with an expiry time, -preventing replay attacks and cross-function/cross-call misuse. - -## Signature - -```rust -struct SessionManager { /* fields */ } -``` - -## Inheritance - -**Implements:** `Clone` - -## Methods - -### clone - -#### Signature - -```rust -fn clone(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/security/session_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/session_manager.rs) - -Line 13. - -*** - -### create\_session - -Create or confirm a session, returning the call ID. - -#### Signature - -```rust -fn create_session(&self, call_id: ?<&str>) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/security/session_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/session_manager.rs) - -Line 41. - -*** - -### create\_token - -Generate an HMAC-SHA256 signed token for a given function and call. - -Token format (before base64url encoding): -`{call_id}.{function_name}.{expiry}.{nonce}.{hmac_hex}` - -#### Signature - -```rust -fn create_token(&self, function_name: &str, call_id: &str) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/security/session_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/session_manager.rs) - -Line 52. - -*** - -### new - -Create a new session manager with a random 32-byte secret. - -#### Signature - -```rust -fn new(token_expiry_secs: u64) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/security/session_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/session_manager.rs) - -Line 21. - -*** - -### token\_expiry\_secs - -Get the configured token expiry in seconds. - -#### Signature - -```rust -fn token_expiry_secs(&self) -> u64 -``` - -#### Returns - -`u64` - -#### Source - -[`src/security/session_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/session_manager.rs) - -Line 36. - -*** - -### validate\_token - -Validate a token against the expected function name and call ID. - -Uses timing-safe comparison for all security-critical fields. - -#### Signature - -```rust -fn validate_token( - &self, - function_name: &str, - call_id: &str, - token: &str -) -> bool -``` - -#### Parameters - - - - - - - -#### Returns - -`bool` - -#### Source - -[`src/security/session_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/session_manager.rs) - -Line 70. - -*** - -### with\_defaults - -Create a new session manager with the default expiry (3600 seconds). - -#### Signature - -```rust -fn with_defaults() -> Self -``` - -#### Returns - -`Self` - -#### Source - -[`src/security/session_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/session_manager.rs) - -Line 31. - -## Source - -[`src/security/session_manager.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/security/session_manager.rs) - -Line 14. diff --git a/fern/products/sdk-reference/rust/index.mdx b/fern/products/sdk-reference/rust/index.mdx index da1bd1f568..26bebc7e52 100644 --- a/fern/products/sdk-reference/rust/index.mdx +++ b/fern/products/sdk-reference/rust/index.mdx @@ -16,5 +16,4 @@ Version: **1.1.2** - [`relay`](/docs/sdk-reference/reference/rust/relay) - [`relay`](/docs/sdk-reference/reference/rust/relay) - [`rest`](/docs/sdk-reference/reference/rust/rest) -- [`signalwire`](/docs/sdk-reference/reference/rust/signalwire) diff --git a/fern/products/sdk-reference/rust/rest/client/index.mdx b/fern/products/sdk-reference/rust/rest/client/index.mdx index 57165fd34e..9edfb531f6 100644 --- a/fern/products/sdk-reference/rust/rest/client/index.mdx +++ b/fern/products/sdk-reference/rust/rest/client/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Rust SDK" icon: "rust" lustri: auto_generated: true - kind: "module" + kind: "class" language: "rust" qualified_name: "signalwire::rest::client" parent: "signalwire::rest" @@ -15,16 +15,712 @@ lustri: --- # `client` -## Classes +Top-level SignalWire REST client. - - - Top-level SignalWire REST client. - - +Provides lazy access to every API namespace (fabric, calling, +phone\_numbers, datasphere, video, compat, etc.). Credentials can +be supplied explicitly or pulled from environment variables. + +Production HTTP transport is `ureq` (sync, blocking, real network +I/O). Tests can substitute a stub via \[`with_http`]. + +## Signature + +```rust +struct RestClient { /* fields */ } +``` + +## Methods + +### addresses + +Addresses. + +#### Signature + +```rust +fn addresses(&self) -> ?<'_> +``` + +#### Returns + +`?<'_>` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 187. + +*** + +### base\_url + +#### Signature + +```rust +fn base_url(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 131. + +*** + +### calling + +Calling API (37 call-control commands). + +#### Signature + +```rust +fn calling(&self) -> ?<'_> +``` + +#### Returns + +`?<'_>` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 153. + +*** + +### chat + +Chat tokens. + +#### Signature + +```rust +fn chat(&self) -> ?<'_> +``` + +#### Returns + +`?<'_>` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 258. + +*** + +### compat + +Compatibility (Twilio-compatible LAML) API namespace. + +Returns a `Compat` handle whose +sub-resources (`calls`, `messages`, `faxes`, `phone_numbers`, +`conferences`, `recordings`, `transcriptions`, `applications`, +`laml_bins`, `queues`, `tokens`, `accounts`) cover the full Python +`client.compat.*` surface. + +#### Signature + +```rust +fn compat(&self) -> ?<'_> +``` + +#### Returns + +`?<'_>` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 182. + +*** + +### datasphere + +Datasphere namespace (documents + chunks + search). + +#### Signature + +```rust +fn datasphere(&self) -> ?<'_> +``` + +#### Returns + +`?<'_>` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 163. + +*** + +### fabric + +Fabric API (sub-resources: subscribers, sip\_endpoints, call\_flows, ...). + +#### Signature + +```rust +fn fabric(&self) -> ?<'_> +``` + +#### Returns + +`?<'_>` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 148. + +*** + +### from\_env + +Create from environment variables. + +#### Signature + +```rust +fn from_env() -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 109. + +*** + +### http + +#### Signature + +```rust +fn http(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 135. + +*** + +### imported\_numbers + +Imported phone numbers. + +#### Signature + +```rust +fn imported_numbers(&self) -> ?<'_> +``` + +#### Returns + +`?<'_>` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 228. + +*** + +### logs + +Logs (messages, voice, fax, conferences). + +#### Signature + +```rust +fn logs(&self) -> ?<'_> +``` + +#### Returns + +`?<'_>` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 243. + +*** + +### lookup + +Phone number lookup. + +#### Signature + +```rust +fn lookup(&self) -> ?<'_> +``` + +#### Returns + +`?<'_>` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 218. + +*** + +### mfa + +Multi-factor authentication (sms/call/verify). + +#### Signature + +```rust +fn mfa(&self) -> ?<'_> +``` + +#### Returns + +`?<'_>` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 233. + +*** + +### new + +Create a new REST client with explicit credentials. The base URL +resolves to `https://{space}`. Use \[`with_base_url`] to override +(e.g. for fixture-driven tests pointed at `http://127.0.0.1:N`). + +#### Signature + +```rust +fn new(project_id: &str, token: &str, space: &str) -> ? +``` + +#### Parameters + + + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 26. + +*** + +### number\_groups + +Number groups (CRUD + membership operations). + +#### Signature + +```rust +fn number_groups(&self) -> ?<'_> +``` + +#### Returns + +`?<'_>` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 202. + +*** + +### phone\_numbers + +Phone numbers. + +#### Signature + +```rust +fn phone_numbers(&self) -> ?<'_> +``` + +#### Returns + +`?<'_>` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 158. + +*** + +### project + +Project namespace (exposes `tokens` sub-resource). + +#### Signature + +```rust +fn project(&self) -> ?<'_> +``` + +#### Returns + +`?<'_>` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 248. + +*** + +### project\_id + +#### Signature + +```rust +fn project_id(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 119. + +*** + +### pubsub + +PubSub tokens. + +#### Signature + +```rust +fn pubsub(&self) -> ?<'_> +``` + +#### Returns + +`?<'_>` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 253. + +*** + +### queues + +Queues namespace (CRUD + member operations). + +#### Signature + +```rust +fn queues(&self) -> ?<'_> +``` + +#### Returns + +`?<'_>` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 192. + +*** + +### recordings + +Recordings. + +#### Signature + +```rust +fn recordings(&self) -> ?<'_> +``` + +#### Returns + +`?<'_>` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 197. + +*** + +### registry + +Registry (10DLC brands, campaigns, orders, numbers). + +#### Signature + +```rust +fn registry(&self) -> ?<'_> +``` + +#### Returns + +`?<'_>` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 238. + +*** + +### short\_codes + +Short codes. + +#### Signature + +```rust +fn short_codes(&self) -> ?<'_> +``` + +#### Returns + +`?<'_>` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 223. + +*** + +### sip\_profile + +Project SIP profile (singular: singleton resource at +`/api/relay/rest/sip_profile`). + +#### Signature + +```rust +fn sip_profile(&self) -> ?<'_> +``` + +#### Returns + +`?<'_>` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 213. + +*** + +### space + +#### Signature + +```rust +fn space(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 127. + +*** + +### token + +#### Signature + +```rust +fn token(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 123. + +*** + +### verified\_callers + +Verified callers. + +#### Signature + +```rust +fn verified_callers(&self) -> ?<'_> +``` + +#### Returns + +`?<'_>` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 207. + +*** + +### video + +Video API namespace (rooms, sessions, recordings, conferences, +tokens, streams). + +#### Signature + +```rust +fn video(&self) -> ?<'_> +``` + +#### Returns + +`?<'_>` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 171. + +*** + +### with\_base\_url + +Create a REST client with an explicit base URL. Used by audit +harnesses and integration tests to point at a local fixture +without going through the `https://{space}` resolution. Production +callers should use \[`new`] instead. + +#### Signature + +```rust +fn with_base_url(project_id: &str, token: &str, base_url: &str) -> ? +``` + +#### Parameters + + + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 64. + +*** + +### with\_http + +Create a REST client with a specific HTTP client (for testing). + +#### Signature + +```rust +fn with_http(project_id: &str, token: &str, space: &str, http: ?) -> ? +``` + +#### Parameters + + + + + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) + +Line 90. ## Source [`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) -Line 1. +Line 14. diff --git a/fern/products/sdk-reference/rust/rest/client/rest-client/index.mdx b/fern/products/sdk-reference/rust/rest/client/rest-client/index.mdx deleted file mode 100644 index 4483908276..0000000000 --- a/fern/products/sdk-reference/rust/rest/client/rest-client/index.mdx +++ /dev/null @@ -1,726 +0,0 @@ ---- -slug: "/reference/rust/rest/client/rest-client" -title: "RestClient" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::rest::client::RestClient" - parent: "signalwire::rest::client" - module: "rest.client" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs" - visibility: "public" ---- -# `RestClient` - -Top-level SignalWire REST client. - -Provides lazy access to every API namespace (fabric, calling, -phone\_numbers, datasphere, video, compat, etc.). Credentials can -be supplied explicitly or pulled from environment variables. - -Production HTTP transport is `ureq` (sync, blocking, real network -I/O). Tests can substitute a stub via \[`with_http`]. - -## Signature - -```rust -struct RestClient { /* fields */ } -``` - -## Methods - -### addresses - -Addresses. - -#### Signature - -```rust -fn addresses(&self) -> ?<'_> -``` - -#### Returns - -`?<'_>` - -#### Source - -[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) - -Line 187. - -*** - -### base\_url - -#### Signature - -```rust -fn base_url(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) - -Line 131. - -*** - -### calling - -Calling API (37 call-control commands). - -#### Signature - -```rust -fn calling(&self) -> ?<'_> -``` - -#### Returns - -`?<'_>` - -#### Source - -[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) - -Line 153. - -*** - -### chat - -Chat tokens. - -#### Signature - -```rust -fn chat(&self) -> ?<'_> -``` - -#### Returns - -`?<'_>` - -#### Source - -[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) - -Line 258. - -*** - -### compat - -Compatibility (Twilio-compatible LAML) API namespace. - -Returns a `Compat` handle whose -sub-resources (`calls`, `messages`, `faxes`, `phone_numbers`, -`conferences`, `recordings`, `transcriptions`, `applications`, -`laml_bins`, `queues`, `tokens`, `accounts`) cover the full Python -`client.compat.*` surface. - -#### Signature - -```rust -fn compat(&self) -> ?<'_> -``` - -#### Returns - -`?<'_>` - -#### Source - -[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) - -Line 182. - -*** - -### datasphere - -Datasphere namespace (documents + chunks + search). - -#### Signature - -```rust -fn datasphere(&self) -> ?<'_> -``` - -#### Returns - -`?<'_>` - -#### Source - -[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) - -Line 163. - -*** - -### fabric - -Fabric API (sub-resources: subscribers, sip\_endpoints, call\_flows, ...). - -#### Signature - -```rust -fn fabric(&self) -> ?<'_> -``` - -#### Returns - -`?<'_>` - -#### Source - -[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) - -Line 148. - -*** - -### from\_env - -Create from environment variables. - -#### Signature - -```rust -fn from_env() -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) - -Line 109. - -*** - -### http - -#### Signature - -```rust -fn http(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) - -Line 135. - -*** - -### imported\_numbers - -Imported phone numbers. - -#### Signature - -```rust -fn imported_numbers(&self) -> ?<'_> -``` - -#### Returns - -`?<'_>` - -#### Source - -[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) - -Line 228. - -*** - -### logs - -Logs (messages, voice, fax, conferences). - -#### Signature - -```rust -fn logs(&self) -> ?<'_> -``` - -#### Returns - -`?<'_>` - -#### Source - -[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) - -Line 243. - -*** - -### lookup - -Phone number lookup. - -#### Signature - -```rust -fn lookup(&self) -> ?<'_> -``` - -#### Returns - -`?<'_>` - -#### Source - -[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) - -Line 218. - -*** - -### mfa - -Multi-factor authentication (sms/call/verify). - -#### Signature - -```rust -fn mfa(&self) -> ?<'_> -``` - -#### Returns - -`?<'_>` - -#### Source - -[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) - -Line 233. - -*** - -### new - -Create a new REST client with explicit credentials. The base URL -resolves to `https://{space}`. Use \[`with_base_url`] to override -(e.g. for fixture-driven tests pointed at `http://127.0.0.1:N`). - -#### Signature - -```rust -fn new(project_id: &str, token: &str, space: &str) -> ? -``` - -#### Parameters - - - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) - -Line 26. - -*** - -### number\_groups - -Number groups (CRUD + membership operations). - -#### Signature - -```rust -fn number_groups(&self) -> ?<'_> -``` - -#### Returns - -`?<'_>` - -#### Source - -[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) - -Line 202. - -*** - -### phone\_numbers - -Phone numbers. - -#### Signature - -```rust -fn phone_numbers(&self) -> ?<'_> -``` - -#### Returns - -`?<'_>` - -#### Source - -[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) - -Line 158. - -*** - -### project - -Project namespace (exposes `tokens` sub-resource). - -#### Signature - -```rust -fn project(&self) -> ?<'_> -``` - -#### Returns - -`?<'_>` - -#### Source - -[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) - -Line 248. - -*** - -### project\_id - -#### Signature - -```rust -fn project_id(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) - -Line 119. - -*** - -### pubsub - -PubSub tokens. - -#### Signature - -```rust -fn pubsub(&self) -> ?<'_> -``` - -#### Returns - -`?<'_>` - -#### Source - -[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) - -Line 253. - -*** - -### queues - -Queues namespace (CRUD + member operations). - -#### Signature - -```rust -fn queues(&self) -> ?<'_> -``` - -#### Returns - -`?<'_>` - -#### Source - -[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) - -Line 192. - -*** - -### recordings - -Recordings. - -#### Signature - -```rust -fn recordings(&self) -> ?<'_> -``` - -#### Returns - -`?<'_>` - -#### Source - -[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) - -Line 197. - -*** - -### registry - -Registry (10DLC brands, campaigns, orders, numbers). - -#### Signature - -```rust -fn registry(&self) -> ?<'_> -``` - -#### Returns - -`?<'_>` - -#### Source - -[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) - -Line 238. - -*** - -### short\_codes - -Short codes. - -#### Signature - -```rust -fn short_codes(&self) -> ?<'_> -``` - -#### Returns - -`?<'_>` - -#### Source - -[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) - -Line 223. - -*** - -### sip\_profile - -Project SIP profile (singular: singleton resource at -`/api/relay/rest/sip_profile`). - -#### Signature - -```rust -fn sip_profile(&self) -> ?<'_> -``` - -#### Returns - -`?<'_>` - -#### Source - -[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) - -Line 213. - -*** - -### space - -#### Signature - -```rust -fn space(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) - -Line 127. - -*** - -### token - -#### Signature - -```rust -fn token(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) - -Line 123. - -*** - -### verified\_callers - -Verified callers. - -#### Signature - -```rust -fn verified_callers(&self) -> ?<'_> -``` - -#### Returns - -`?<'_>` - -#### Source - -[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) - -Line 207. - -*** - -### video - -Video API namespace (rooms, sessions, recordings, conferences, -tokens, streams). - -#### Signature - -```rust -fn video(&self) -> ?<'_> -``` - -#### Returns - -`?<'_>` - -#### Source - -[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) - -Line 171. - -*** - -### with\_base\_url - -Create a REST client with an explicit base URL. Used by audit -harnesses and integration tests to point at a local fixture -without going through the `https://{space}` resolution. Production -callers should use \[`new`] instead. - -#### Signature - -```rust -fn with_base_url(project_id: &str, token: &str, base_url: &str) -> ? -``` - -#### Parameters - - - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) - -Line 64. - -*** - -### with\_http - -Create a REST client with a specific HTTP client (for testing). - -#### Signature - -```rust -fn with_http(project_id: &str, token: &str, space: &str, http: ?) -> ? -``` - -#### Parameters - - - - - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) - -Line 90. - -## Source - -[`src/rest/client.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/client.rs) - -Line 14. diff --git a/fern/products/sdk-reference/rust/rest/compat/compat-accounts/index.mdx b/fern/products/sdk-reference/rust/rest/compat/compat-accounts/index.mdx index 712578b473..20231e58e9 100644 --- a/fern/products/sdk-reference/rust/rest/compat/compat-accounts/index.mdx +++ b/fern/products/sdk-reference/rust/rest/compat/compat-accounts/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "rust" qualified_name: "signalwire::rest::namespaces::compat::CompatAccounts" - parent: "rest.namespaces.compat" + parent: "signalwire::rest::namespaces::compat" module: "rest.compat" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs" visibility: "public" diff --git a/fern/products/sdk-reference/rust/rest/compat/compat-applications/index.mdx b/fern/products/sdk-reference/rust/rest/compat/compat-applications/index.mdx index 8bd95bf155..07ab8870ce 100644 --- a/fern/products/sdk-reference/rust/rest/compat/compat-applications/index.mdx +++ b/fern/products/sdk-reference/rust/rest/compat/compat-applications/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "rust" qualified_name: "signalwire::rest::namespaces::compat::CompatApplications" - parent: "rest.namespaces.compat" + parent: "signalwire::rest::namespaces::compat" module: "rest.compat" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs" visibility: "public" diff --git a/fern/products/sdk-reference/rust/rest/compat/compat-calls/index.mdx b/fern/products/sdk-reference/rust/rest/compat/compat-calls/index.mdx index 7a9a483642..f78ce29b3d 100644 --- a/fern/products/sdk-reference/rust/rest/compat/compat-calls/index.mdx +++ b/fern/products/sdk-reference/rust/rest/compat/compat-calls/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "rust" qualified_name: "signalwire::rest::namespaces::compat::CompatCalls" - parent: "rest.namespaces.compat" + parent: "signalwire::rest::namespaces::compat" module: "rest.compat" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs" visibility: "public" diff --git a/fern/products/sdk-reference/rust/rest/compat/compat-conferences/index.mdx b/fern/products/sdk-reference/rust/rest/compat/compat-conferences/index.mdx index 50af26996b..ed2d4c70e4 100644 --- a/fern/products/sdk-reference/rust/rest/compat/compat-conferences/index.mdx +++ b/fern/products/sdk-reference/rust/rest/compat/compat-conferences/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "rust" qualified_name: "signalwire::rest::namespaces::compat::CompatConferences" - parent: "rest.namespaces.compat" + parent: "signalwire::rest::namespaces::compat" module: "rest.compat" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs" visibility: "public" diff --git a/fern/products/sdk-reference/rust/rest/compat/compat-faxes/index.mdx b/fern/products/sdk-reference/rust/rest/compat/compat-faxes/index.mdx index 1a58eb4c9a..cb5c6bac8c 100644 --- a/fern/products/sdk-reference/rust/rest/compat/compat-faxes/index.mdx +++ b/fern/products/sdk-reference/rust/rest/compat/compat-faxes/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "rust" qualified_name: "signalwire::rest::namespaces::compat::CompatFaxes" - parent: "rest.namespaces.compat" + parent: "signalwire::rest::namespaces::compat" module: "rest.compat" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs" visibility: "public" diff --git a/fern/products/sdk-reference/rust/rest/compat/compat-laml-bins/index.mdx b/fern/products/sdk-reference/rust/rest/compat/compat-laml-bins/index.mdx index 7347483dbe..5d8dc9d7ce 100644 --- a/fern/products/sdk-reference/rust/rest/compat/compat-laml-bins/index.mdx +++ b/fern/products/sdk-reference/rust/rest/compat/compat-laml-bins/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "rust" qualified_name: "signalwire::rest::namespaces::compat::CompatLamlBins" - parent: "rest.namespaces.compat" + parent: "signalwire::rest::namespaces::compat" module: "rest.compat" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs" visibility: "public" diff --git a/fern/products/sdk-reference/rust/rest/compat/compat-messages/index.mdx b/fern/products/sdk-reference/rust/rest/compat/compat-messages/index.mdx index faaaf7d3ce..6cc7a8c73f 100644 --- a/fern/products/sdk-reference/rust/rest/compat/compat-messages/index.mdx +++ b/fern/products/sdk-reference/rust/rest/compat/compat-messages/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "rust" qualified_name: "signalwire::rest::namespaces::compat::CompatMessages" - parent: "rest.namespaces.compat" + parent: "signalwire::rest::namespaces::compat" module: "rest.compat" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs" visibility: "public" diff --git a/fern/products/sdk-reference/rust/rest/compat/compat-phone-numbers/index.mdx b/fern/products/sdk-reference/rust/rest/compat/compat-phone-numbers/index.mdx index f328a2ec6b..fd8e51e6f9 100644 --- a/fern/products/sdk-reference/rust/rest/compat/compat-phone-numbers/index.mdx +++ b/fern/products/sdk-reference/rust/rest/compat/compat-phone-numbers/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "rust" qualified_name: "signalwire::rest::namespaces::compat::CompatPhoneNumbers" - parent: "rest.namespaces.compat" + parent: "signalwire::rest::namespaces::compat" module: "rest.compat" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs" visibility: "public" diff --git a/fern/products/sdk-reference/rust/rest/compat/compat-queues/index.mdx b/fern/products/sdk-reference/rust/rest/compat/compat-queues/index.mdx index 40096c49c2..a951f25772 100644 --- a/fern/products/sdk-reference/rust/rest/compat/compat-queues/index.mdx +++ b/fern/products/sdk-reference/rust/rest/compat/compat-queues/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "rust" qualified_name: "signalwire::rest::namespaces::compat::CompatQueues" - parent: "rest.namespaces.compat" + parent: "signalwire::rest::namespaces::compat" module: "rest.compat" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs" visibility: "public" diff --git a/fern/products/sdk-reference/rust/rest/compat/compat-recordings/index.mdx b/fern/products/sdk-reference/rust/rest/compat/compat-recordings/index.mdx index c0d2706278..56a577a4cc 100644 --- a/fern/products/sdk-reference/rust/rest/compat/compat-recordings/index.mdx +++ b/fern/products/sdk-reference/rust/rest/compat/compat-recordings/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "rust" qualified_name: "signalwire::rest::namespaces::compat::CompatRecordings" - parent: "rest.namespaces.compat" + parent: "signalwire::rest::namespaces::compat" module: "rest.compat" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs" visibility: "public" diff --git a/fern/products/sdk-reference/rust/rest/compat/compat-tokens/index.mdx b/fern/products/sdk-reference/rust/rest/compat/compat-tokens/index.mdx index 0be11fe5f0..83cfdb6da8 100644 --- a/fern/products/sdk-reference/rust/rest/compat/compat-tokens/index.mdx +++ b/fern/products/sdk-reference/rust/rest/compat/compat-tokens/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "rust" qualified_name: "signalwire::rest::namespaces::compat::CompatTokens" - parent: "rest.namespaces.compat" + parent: "signalwire::rest::namespaces::compat" module: "rest.compat" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs" visibility: "public" diff --git a/fern/products/sdk-reference/rust/rest/compat/compat-transcriptions/index.mdx b/fern/products/sdk-reference/rust/rest/compat/compat-transcriptions/index.mdx index 46aa991b93..38b5ff009e 100644 --- a/fern/products/sdk-reference/rust/rest/compat/compat-transcriptions/index.mdx +++ b/fern/products/sdk-reference/rust/rest/compat/compat-transcriptions/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "rust" qualified_name: "signalwire::rest::namespaces::compat::CompatTranscriptions" - parent: "rest.namespaces.compat" + parent: "signalwire::rest::namespaces::compat" module: "rest.compat" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/compat.rs" visibility: "public" diff --git a/fern/products/sdk-reference/rust/rest/compat/index.mdx b/fern/products/sdk-reference/rust/rest/compat/index.mdx index 88db10e470..444cfbcb3f 100644 --- a/fern/products/sdk-reference/rust/rest/compat/index.mdx +++ b/fern/products/sdk-reference/rust/rest/compat/index.mdx @@ -28,6 +28,34 @@ is rooted under that. struct Compat { /* fields */ } ``` +## Classes + + + + + + + + + + + + + + + + + + + + + + + + + + + ## Methods ### account\_sid diff --git a/fern/products/sdk-reference/rust/rest/compat/index__2.mdx b/fern/products/sdk-reference/rust/rest/compat/index__2.mdx deleted file mode 100644 index 6273221530..0000000000 --- a/fern/products/sdk-reference/rust/rest/compat/index__2.mdx +++ /dev/null @@ -1,42 +0,0 @@ ---- -slug: "/reference/rust/rest/compat/index__2" -title: "compat" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "rest.namespaces.compat" - parent: "signalwire::rest" - module: "rest" ---- -# `compat` - -## Classes - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/fern/products/sdk-reference/rust/rest/crud-resource/crud-resource/index.mdx b/fern/products/sdk-reference/rust/rest/crud-resource/crud-resource/index.mdx deleted file mode 100644 index d9d87f7285..0000000000 --- a/fern/products/sdk-reference/rust/rest/crud-resource/crud-resource/index.mdx +++ /dev/null @@ -1,231 +0,0 @@ ---- -slug: "/reference/rust/rest/crud-resource/crud-resource" -title: "CrudResource" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::rest::crud_resource::CrudResource" - parent: "signalwire::rest::crud_resource" - module: "rest.crud_resource" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/crud_resource.rs" - visibility: "public" ---- -# `CrudResource` - -Generic CRUD wrapper around an HttpClient and a base API path. - -Provides list / create / get / update / delete for any REST resource -that follows the standard SignalWire collection+item URL pattern. - -## Signature - -```rust -struct CrudResource { /* fields */ } -``` - -## Methods - -### base\_path - -#### Signature - -```rust -fn base_path(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/rest/crud_resource.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/crud_resource.rs) - -Line 25. - -*** - -### client - -#### Signature - -```rust -fn client(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/rest/crud_resource.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/crud_resource.rs) - -Line 29. - -*** - -### create - -Create a new resource (POST basePath). - -#### Signature - -```rust -fn create(&self, data: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/crud_resource.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/crud_resource.rs) - -Line 47. - -*** - -### delete - -Delete a resource by ID (DELETE basePath/\{id\}). - -#### Signature - -```rust -fn delete(&self, id: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/crud_resource.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/crud_resource.rs) - -Line 62. - -*** - -### get - -Retrieve a single resource by ID (GET basePath/\{id\}). - -#### Signature - -```rust -fn get(&self, id: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/crud_resource.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/crud_resource.rs) - -Line 52. - -*** - -### list - -List resources (GET basePath). - -#### Signature - -```rust -fn list(&self, params: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/crud_resource.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/crud_resource.rs) - -Line 42. - -*** - -### new - -#### Signature - -```rust -fn new(client: &'a ?, base_path: &str) -> Self -``` - -#### Parameters - - - - - -#### Returns - -`Self` - -#### Source - -[`src/rest/crud_resource.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/crud_resource.rs) - -Line 18. - -*** - -### update - -Update a resource by ID (PUT basePath/\{id\}). - -#### Signature - -```rust -fn update(&self, id: &str, data: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/crud_resource.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/crud_resource.rs) - -Line 57. - -## Source - -[`src/rest/crud_resource.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/crud_resource.rs) - -Line 12. diff --git a/fern/products/sdk-reference/rust/rest/crud-resource/index.mdx b/fern/products/sdk-reference/rust/rest/crud-resource/index.mdx index 5b7cc6ab90..a0f901f09b 100644 --- a/fern/products/sdk-reference/rust/rest/crud-resource/index.mdx +++ b/fern/products/sdk-reference/rust/rest/crud-resource/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Rust SDK" icon: "rust" lustri: auto_generated: true - kind: "module" + kind: "class" language: "rust" qualified_name: "signalwire::rest::crud_resource" parent: "signalwire::rest" @@ -15,16 +15,217 @@ lustri: --- # `crud_resource` -## Classes +Generic CRUD wrapper around an HttpClient and a base API path. - - - Generic CRUD wrapper around an HttpClient and a base API path. - - +Provides list / create / get / update / delete for any REST resource +that follows the standard SignalWire collection+item URL pattern. + +## Signature + +```rust +struct CrudResource { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/crud_resource.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/crud_resource.rs) + +Line 25. + +*** + +### client + +#### Signature + +```rust +fn client(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/rest/crud_resource.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/crud_resource.rs) + +Line 29. + +*** + +### create + +Create a new resource (POST basePath). + +#### Signature + +```rust +fn create(&self, data: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/crud_resource.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/crud_resource.rs) + +Line 47. + +*** + +### delete + +Delete a resource by ID (DELETE basePath/\{id\}). + +#### Signature + +```rust +fn delete(&self, id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/crud_resource.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/crud_resource.rs) + +Line 62. + +*** + +### get + +Retrieve a single resource by ID (GET basePath/\{id\}). + +#### Signature + +```rust +fn get(&self, id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/crud_resource.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/crud_resource.rs) + +Line 52. + +*** + +### list + +List resources (GET basePath). + +#### Signature + +```rust +fn list(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/crud_resource.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/crud_resource.rs) + +Line 42. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?, base_path: &str) -> Self +``` + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/crud_resource.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/crud_resource.rs) + +Line 18. + +*** + +### update + +Update a resource by ID (PUT basePath/\{id\}). + +#### Signature + +```rust +fn update(&self, id: &str, data: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/crud_resource.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/crud_resource.rs) + +Line 57. ## Source [`src/rest/crud_resource.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/crud_resource.rs) -Line 1. +Line 12. diff --git a/fern/products/sdk-reference/rust/rest/error/index.mdx b/fern/products/sdk-reference/rust/rest/error/index.mdx index eb385ea18c..f65e57f699 100644 --- a/fern/products/sdk-reference/rust/rest/error/index.mdx +++ b/fern/products/sdk-reference/rust/rest/error/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Rust SDK" icon: "rust" lustri: auto_generated: true - kind: "module" + kind: "class" language: "rust" qualified_name: "signalwire::rest::error" parent: "signalwire::rest" @@ -15,19 +15,176 @@ lustri: --- # `error` -REST module -- SignalWire REST API client, HTTP transport, and CRUD -resource helpers. +Exception thrown when a SignalWire REST API request fails with a non-2xx status. -## Classes +## Signature - - - Exception thrown when a SignalWire REST API request fails with a non-2xx status. - - +```rust +struct SignalWireRestError { /* fields */ } +``` + +## Inheritance + +**Implements:** `Debug`, `Clone`, `Display`, [Error](/docs/sdk-reference/reference/rust/core/security/webhook-layer/webhook-validate#error) + +## Methods + +### clone + +#### Signature + +```rust +fn clone(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/rest/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/error.rs) + +Line 4. + +*** + +### fmt + +#### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/error.rs) + +Line 4. + +*** + +### fmt + +#### Signature + +```rust +fn fmt(&self, f: &mut ?<'_>) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/error.rs) + +Line 34. + +*** + +### message + +#### Signature + +```rust +fn message(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/error.rs) + +Line 20. + +*** + +### new + +#### Signature + +```rust +fn new(message: &str, status_code: u16, response_body: &str) -> Self +``` + +#### Parameters + + + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/error.rs) + +Line 12. + +*** + +### response\_body + +#### Signature + +```rust +fn response_body(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/error.rs) + +Line 28. + +*** + +### status\_code + +#### Signature + +```rust +fn status_code(&self) -> u16 +``` + +#### Returns + +`u16` + +#### Source + +[`src/rest/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/error.rs) + +Line 24. ## Source [`src/rest/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/error.rs) -Line 1. +Line 5. diff --git a/fern/products/sdk-reference/rust/rest/error/signal-wire-rest-error/index.mdx b/fern/products/sdk-reference/rust/rest/error/signal-wire-rest-error/index.mdx deleted file mode 100644 index b2204928cc..0000000000 --- a/fern/products/sdk-reference/rust/rest/error/signal-wire-rest-error/index.mdx +++ /dev/null @@ -1,190 +0,0 @@ ---- -slug: "/reference/rust/rest/error/signal-wire-rest-error" -title: "SignalWireRestError" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::rest::error::SignalWireRestError" - parent: "signalwire::rest::error" - module: "rest.error" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/error.rs" - visibility: "public" ---- -# `SignalWireRestError` - -Exception thrown when a SignalWire REST API request fails with a non-2xx status. - -## Signature - -```rust -struct SignalWireRestError { /* fields */ } -``` - -## Inheritance - -**Implements:** `Debug`, `Clone`, `Display`, [Error](/docs/sdk-reference/reference/rust/core/security/webhook-layer/webhook-validate#error) - -## Methods - -### clone - -#### Signature - -```rust -fn clone(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/rest/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/error.rs) - -Line 4. - -*** - -### fmt - -#### Signature - -```rust -fn fmt(&self, f: &mut ?<'_>) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/error.rs) - -Line 4. - -*** - -### fmt - -#### Signature - -```rust -fn fmt(&self, f: &mut ?<'_>) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/error.rs) - -Line 34. - -*** - -### message - -#### Signature - -```rust -fn message(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/rest/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/error.rs) - -Line 20. - -*** - -### new - -#### Signature - -```rust -fn new(message: &str, status_code: u16, response_body: &str) -> Self -``` - -#### Parameters - - - - - - - -#### Returns - -`Self` - -#### Source - -[`src/rest/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/error.rs) - -Line 12. - -*** - -### response\_body - -#### Signature - -```rust -fn response_body(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/rest/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/error.rs) - -Line 28. - -*** - -### status\_code - -#### Signature - -```rust -fn status_code(&self) -> u16 -``` - -#### Returns - -`u16` - -#### Source - -[`src/rest/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/error.rs) - -Line 24. - -## Source - -[`src/rest/error.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/error.rs) - -Line 5. diff --git a/fern/products/sdk-reference/rust/rest/fabric/call-flows-resource/index.mdx b/fern/products/sdk-reference/rust/rest/fabric/call-flows-resource/index.mdx index 60ff04b0d7..36c0e2b69b 100644 --- a/fern/products/sdk-reference/rust/rest/fabric/call-flows-resource/index.mdx +++ b/fern/products/sdk-reference/rust/rest/fabric/call-flows-resource/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "rust" qualified_name: "signalwire::rest::namespaces::fabric::CallFlowsResource" - parent: "rest.namespaces.fabric" + parent: "signalwire::rest::namespaces::fabric" module: "rest.fabric" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs" visibility: "public" diff --git a/fern/products/sdk-reference/rust/rest/fabric/conference-rooms-resource/index.mdx b/fern/products/sdk-reference/rust/rest/fabric/conference-rooms-resource/index.mdx index fd81f0d0ef..2736f1e722 100644 --- a/fern/products/sdk-reference/rust/rest/fabric/conference-rooms-resource/index.mdx +++ b/fern/products/sdk-reference/rust/rest/fabric/conference-rooms-resource/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "rust" qualified_name: "signalwire::rest::namespaces::fabric::ConferenceRoomsResource" - parent: "rest.namespaces.fabric" + parent: "signalwire::rest::namespaces::fabric" module: "rest.fabric" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs" visibility: "public" diff --git a/fern/products/sdk-reference/rust/rest/fabric/cxml-applications-resource/index.mdx b/fern/products/sdk-reference/rust/rest/fabric/cxml-applications-resource/index.mdx index a0c1537d6f..2baf982e70 100644 --- a/fern/products/sdk-reference/rust/rest/fabric/cxml-applications-resource/index.mdx +++ b/fern/products/sdk-reference/rust/rest/fabric/cxml-applications-resource/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "rust" qualified_name: "signalwire::rest::namespaces::fabric::CxmlApplicationsResource" - parent: "rest.namespaces.fabric" + parent: "signalwire::rest::namespaces::fabric" module: "rest.fabric" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs" visibility: "public" diff --git a/fern/products/sdk-reference/rust/rest/fabric/fabric-addresses/index.mdx b/fern/products/sdk-reference/rust/rest/fabric/fabric-addresses/index.mdx index 9672bc7d3f..752537affc 100644 --- a/fern/products/sdk-reference/rust/rest/fabric/fabric-addresses/index.mdx +++ b/fern/products/sdk-reference/rust/rest/fabric/fabric-addresses/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "rust" qualified_name: "signalwire::rest::namespaces::fabric::FabricAddresses" - parent: "rest.namespaces.fabric" + parent: "signalwire::rest::namespaces::fabric" module: "rest.fabric" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs" visibility: "public" diff --git a/fern/products/sdk-reference/rust/rest/fabric/fabric-tokens/index.mdx b/fern/products/sdk-reference/rust/rest/fabric/fabric-tokens/index.mdx index 7e45e598af..d03b046271 100644 --- a/fern/products/sdk-reference/rust/rest/fabric/fabric-tokens/index.mdx +++ b/fern/products/sdk-reference/rust/rest/fabric/fabric-tokens/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "rust" qualified_name: "signalwire::rest::namespaces::fabric::FabricTokens" - parent: "rest.namespaces.fabric" + parent: "signalwire::rest::namespaces::fabric" module: "rest.fabric" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs" visibility: "public" diff --git a/fern/products/sdk-reference/rust/rest/fabric/generic-resources/index.mdx b/fern/products/sdk-reference/rust/rest/fabric/generic-resources/index.mdx index 5c37e10835..0bdf89ab7c 100644 --- a/fern/products/sdk-reference/rust/rest/fabric/generic-resources/index.mdx +++ b/fern/products/sdk-reference/rust/rest/fabric/generic-resources/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "rust" qualified_name: "signalwire::rest::namespaces::fabric::GenericResources" - parent: "rest.namespaces.fabric" + parent: "signalwire::rest::namespaces::fabric" module: "rest.fabric" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs" visibility: "public" diff --git a/fern/products/sdk-reference/rust/rest/fabric/index.mdx b/fern/products/sdk-reference/rust/rest/fabric/index.mdx index 6565826ae2..f9946db64e 100644 --- a/fern/products/sdk-reference/rust/rest/fabric/index.mdx +++ b/fern/products/sdk-reference/rust/rest/fabric/index.mdx @@ -27,6 +27,24 @@ Python SDK. struct Fabric { /* fields */ } ``` +## Classes + + + + + + + + + + + + + + + + + ## Methods ### addresses diff --git a/fern/products/sdk-reference/rust/rest/fabric/index__2.mdx b/fern/products/sdk-reference/rust/rest/fabric/index__2.mdx deleted file mode 100644 index 74a3ed98cb..0000000000 --- a/fern/products/sdk-reference/rust/rest/fabric/index__2.mdx +++ /dev/null @@ -1,32 +0,0 @@ ---- -slug: "/reference/rust/rest/fabric/index__2" -title: "fabric" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "rest.namespaces.fabric" - parent: "signalwire::rest" - module: "rest" ---- -# `fabric` - -## Classes - - - - - - - - - - - - - - - - diff --git a/fern/products/sdk-reference/rust/rest/fabric/subscribers-resource/index.mdx b/fern/products/sdk-reference/rust/rest/fabric/subscribers-resource/index.mdx index 252dbd56af..0ded688fec 100644 --- a/fern/products/sdk-reference/rust/rest/fabric/subscribers-resource/index.mdx +++ b/fern/products/sdk-reference/rust/rest/fabric/subscribers-resource/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "rust" qualified_name: "signalwire::rest::namespaces::fabric::SubscribersResource" - parent: "rest.namespaces.fabric" + parent: "signalwire::rest::namespaces::fabric" module: "rest.fabric" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/fabric.rs" visibility: "public" diff --git a/fern/products/sdk-reference/rust/rest/index.mdx b/fern/products/sdk-reference/rust/rest/index.mdx index e808ebbdd3..ab65a45b9a 100644 --- a/fern/products/sdk-reference/rust/rest/index.mdx +++ b/fern/products/sdk-reference/rust/rest/index.mdx @@ -20,10 +20,22 @@ lustri: Calling API namespace. + + Top-level SignalWire REST client. + + Compat (Twilio-compatible LAML) API namespace. + + Generic CRUD wrapper around an HttpClient and a base API path. + + + + Exception thrown when a SignalWire REST API request fails with a non-2xx status. + + REST API namespace modules. Fabric API namespace — resource composition, addresses, and tokens. @@ -36,6 +48,14 @@ lustri: MFA (Multi-Factor Authentication) namespace. + + Number Groups namespace. + + + + Streaming iterator that walks a `links.next`-paginated REST endpoint. + + Project API namespace — exposes the API token sub-resource. @@ -48,6 +68,10 @@ lustri: 10DLC Campaign Registry namespace — brands, campaigns, orders, numbers. + + SIP Profile (singleton resource) namespace. + + Video API namespace — rooms, sessions, recordings, conferences, tokens, streams. @@ -56,37 +80,9 @@ lustri: ## Modules - - - - - - - - REST module -- SignalWire REST API client, HTTP transport, and CRUD resource helpers. - - - - - - - - - - - Paginated iterator over `links.next`-cursor responses. - - - - - - - - - ## Source diff --git a/fern/products/sdk-reference/rust/rest/logs/conference-logs/index.mdx b/fern/products/sdk-reference/rust/rest/logs/conference-logs/index.mdx index 44d1a0e13b..fe6ee33f09 100644 --- a/fern/products/sdk-reference/rust/rest/logs/conference-logs/index.mdx +++ b/fern/products/sdk-reference/rust/rest/logs/conference-logs/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "rust" qualified_name: "signalwire::rest::namespaces::logs::ConferenceLogs" - parent: "rest.namespaces.logs" + parent: "signalwire::rest::namespaces::logs" module: "rest.logs" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs" visibility: "public" diff --git a/fern/products/sdk-reference/rust/rest/logs/fax-logs/index.mdx b/fern/products/sdk-reference/rust/rest/logs/fax-logs/index.mdx index b80880345d..3c51262402 100644 --- a/fern/products/sdk-reference/rust/rest/logs/fax-logs/index.mdx +++ b/fern/products/sdk-reference/rust/rest/logs/fax-logs/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "rust" qualified_name: "signalwire::rest::namespaces::logs::FaxLogs" - parent: "rest.namespaces.logs" + parent: "signalwire::rest::namespaces::logs" module: "rest.logs" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs" visibility: "public" diff --git a/fern/products/sdk-reference/rust/rest/logs/index.mdx b/fern/products/sdk-reference/rust/rest/logs/index.mdx index 5d7e890150..9a745d57a9 100644 --- a/fern/products/sdk-reference/rust/rest/logs/index.mdx +++ b/fern/products/sdk-reference/rust/rest/logs/index.mdx @@ -27,6 +27,18 @@ specs live in different documents. struct Logs { /* fields */ } ``` +## Classes + + + + + + + + + + + ## Methods ### client diff --git a/fern/products/sdk-reference/rust/rest/logs/index__2.mdx b/fern/products/sdk-reference/rust/rest/logs/index__2.mdx deleted file mode 100644 index 21bed34d11..0000000000 --- a/fern/products/sdk-reference/rust/rest/logs/index__2.mdx +++ /dev/null @@ -1,26 +0,0 @@ ---- -slug: "/reference/rust/rest/logs/index__2" -title: "logs" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "rest.namespaces.logs" - parent: "signalwire::rest" - module: "rest" ---- -# `logs` - -## Classes - - - - - - - - - - diff --git a/fern/products/sdk-reference/rust/rest/logs/message-logs/index.mdx b/fern/products/sdk-reference/rust/rest/logs/message-logs/index.mdx index 414f1be0a5..7f450820fd 100644 --- a/fern/products/sdk-reference/rust/rest/logs/message-logs/index.mdx +++ b/fern/products/sdk-reference/rust/rest/logs/message-logs/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "rust" qualified_name: "signalwire::rest::namespaces::logs::MessageLogs" - parent: "rest.namespaces.logs" + parent: "signalwire::rest::namespaces::logs" module: "rest.logs" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs" visibility: "public" diff --git a/fern/products/sdk-reference/rust/rest/logs/voice-logs/index.mdx b/fern/products/sdk-reference/rust/rest/logs/voice-logs/index.mdx index 7c37c4c934..bb72a73380 100644 --- a/fern/products/sdk-reference/rust/rest/logs/voice-logs/index.mdx +++ b/fern/products/sdk-reference/rust/rest/logs/voice-logs/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "rust" qualified_name: "signalwire::rest::namespaces::logs::VoiceLogs" - parent: "rest.namespaces.logs" + parent: "signalwire::rest::namespaces::logs" module: "rest.logs" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/logs.rs" visibility: "public" diff --git a/fern/products/sdk-reference/rust/rest/number-groups/index.mdx b/fern/products/sdk-reference/rust/rest/number-groups/index.mdx index 458bcba799..0a3ae305c4 100644 --- a/fern/products/sdk-reference/rust/rest/number-groups/index.mdx +++ b/fern/products/sdk-reference/rust/rest/number-groups/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Rust SDK" icon: "rust" lustri: auto_generated: true - kind: "module" + kind: "class" language: "rust" qualified_name: "signalwire::rest::namespaces::number_groups" parent: "signalwire::rest" @@ -15,16 +15,289 @@ lustri: --- # `number_groups` -## Classes +Number Groups namespace. - - - Number Groups namespace. - - +Mirrors `signalwire.rest.namespaces.number_groups.NumberGroupsResource`. +Provides standard CRUD over `/api/relay/rest/number_groups` plus the +membership endpoints rooted at the same collection and at the +project-scoped `/api/relay/rest/number_group_memberships` collection. + +## Signature + +```rust +struct NumberGroups { /* fields */ } +``` + +## Methods + +### add\_membership + +#### Signature + +```rust +fn add_membership(&self, group_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/number_groups.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs) + +Line 88. + +*** + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/number_groups.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs) + +Line 27. + +*** + +### create + +#### Signature + +```rust +fn create(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/number_groups.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs) + +Line 51. + +*** + +### delete + +#### Signature + +```rust +fn delete(&self, group_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/number_groups.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs) + +Line 69. + +*** + +### delete\_membership + +#### Signature + +```rust +fn delete_membership(&self, membership_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/number_groups.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs) + +Line 111. + +*** + +### get + +#### Signature + +```rust +fn get(&self, group_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/number_groups.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs) + +Line 55. + +*** + +### get\_membership + +#### Signature + +```rust +fn get_membership(&self, membership_id: &str) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/number_groups.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs) + +Line 100. + +*** + +### list + +#### Signature + +```rust +fn list(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/number_groups.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs) + +Line 46. + +*** + +### list\_memberships + +GET /api/relay/rest/number\_groups/\{id\}/number\_group\_memberships + +#### Signature + +```rust +fn list_memberships(&self, group_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/number_groups.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs) + +Line 75. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/number_groups.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs) + +Line 20. + +*** + +### update + +#### Signature + +```rust +fn update(&self, group_id: &str, params: &?) -> ? +``` + +#### Parameters + + + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/number_groups.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs) + +Line 60. ## Source [`src/rest/namespaces/number_groups.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs) -Line 1. +Line 14. diff --git a/fern/products/sdk-reference/rust/rest/number-groups/number-groups/index.mdx b/fern/products/sdk-reference/rust/rest/number-groups/number-groups/index.mdx deleted file mode 100644 index a1823a3eec..0000000000 --- a/fern/products/sdk-reference/rust/rest/number-groups/number-groups/index.mdx +++ /dev/null @@ -1,303 +0,0 @@ ---- -slug: "/reference/rust/rest/number-groups/number-groups" -title: "NumberGroups" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::rest::namespaces::number_groups::NumberGroups" - parent: "signalwire::rest::namespaces::number_groups" - module: "rest.number_groups" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs" - visibility: "public" ---- -# `NumberGroups` - -Number Groups namespace. - -Mirrors `signalwire.rest.namespaces.number_groups.NumberGroupsResource`. -Provides standard CRUD over `/api/relay/rest/number_groups` plus the -membership endpoints rooted at the same collection and at the -project-scoped `/api/relay/rest/number_group_memberships` collection. - -## Signature - -```rust -struct NumberGroups { /* fields */ } -``` - -## Methods - -### add\_membership - -#### Signature - -```rust -fn add_membership(&self, group_id: &str, params: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/number_groups.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs) - -Line 88. - -*** - -### base\_path - -#### Signature - -```rust -fn base_path(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/rest/namespaces/number_groups.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs) - -Line 27. - -*** - -### create - -#### Signature - -```rust -fn create(&self, params: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/number_groups.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs) - -Line 51. - -*** - -### delete - -#### Signature - -```rust -fn delete(&self, group_id: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/number_groups.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs) - -Line 69. - -*** - -### delete\_membership - -#### Signature - -```rust -fn delete_membership(&self, membership_id: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/number_groups.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs) - -Line 111. - -*** - -### get - -#### Signature - -```rust -fn get(&self, group_id: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/number_groups.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs) - -Line 55. - -*** - -### get\_membership - -#### Signature - -```rust -fn get_membership(&self, membership_id: &str) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/number_groups.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs) - -Line 100. - -*** - -### list - -#### Signature - -```rust -fn list(&self, params: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/number_groups.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs) - -Line 46. - -*** - -### list\_memberships - -GET /api/relay/rest/number\_groups/\{id\}/number\_group\_memberships - -#### Signature - -```rust -fn list_memberships(&self, group_id: &str, params: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/number_groups.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs) - -Line 75. - -*** - -### new - -#### Signature - -```rust -fn new(client: &'a ?) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/rest/namespaces/number_groups.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs) - -Line 20. - -*** - -### update - -#### Signature - -```rust -fn update(&self, group_id: &str, params: &?) -> ? -``` - -#### Parameters - - - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/number_groups.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs) - -Line 60. - -## Source - -[`src/rest/namespaces/number_groups.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/number_groups.rs) - -Line 14. diff --git a/fern/products/sdk-reference/rust/rest/pagination/index.mdx b/fern/products/sdk-reference/rust/rest/pagination/index.mdx index e66d42d3fa..569c879f24 100644 --- a/fern/products/sdk-reference/rust/rest/pagination/index.mdx +++ b/fern/products/sdk-reference/rust/rest/pagination/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Rust SDK" icon: "rust" lustri: auto_generated: true - kind: "module" + kind: "class" language: "rust" qualified_name: "signalwire::rest::pagination" parent: "signalwire::rest" @@ -15,23 +15,253 @@ lustri: --- # `pagination` -Paginated iterator over `links.next`-cursor responses. +Streaming iterator that walks a `links.next`-paginated REST endpoint. -Mirrors `signalwire.rest._pagination.PaginatedIterator` from the Python -SDK. Construction is lazy — no HTTP is dispatched until the iterator is -first stepped. Each fetch follows the response's `links.next` cursor; -when the cursor is empty/missing, the iterator is exhausted. +Holds a borrowed reference to the \[`HttpClient`] for the duration of +iteration. Use the \[`Iterator`] impl (`for item in it { ... }`) or +step manually via \[`PaginatedIterator::next_item`]. -## Classes +## Signature - - - Streaming iterator that walks a `links.next`-paginated REST endpoint. - - +```rust +struct PaginatedIterator { /* fields */ } +``` + +## Inheritance + +**Implements:** `Iterator` + +## Methods + +### data\_key + +#### Signature + +```rust +fn data_key(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/pagination.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/pagination.rs) + +Line 79. + +*** + +### http + +#### Signature + +```rust +fn http(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/rest/pagination.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/pagination.rs) + +Line 67. + +*** + +### index + +#### Signature + +```rust +fn index(&self) -> usize +``` + +#### Returns + +`usize` + +#### Source + +[`src/rest/pagination.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/pagination.rs) + +Line 83. + +*** + +### is\_done + +#### Signature + +```rust +fn is_done(&self) -> bool +``` + +#### Returns + +`bool` + +#### Source + +[`src/rest/pagination.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/pagination.rs) + +Line 91. + +*** + +### items + +#### Signature + +```rust +fn items(&self) -> &[?] +``` + +#### Returns + +`&[?]` + +#### Source + +[`src/rest/pagination.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/pagination.rs) + +Line 87. + +*** + +### new + +Construct a new iterator. + +`params` and `data_key` mirror the Python signature: the body field +containing the items array is named `data_key` (typically `"data"`), +and `params` is forwarded on the first GET. + +#### Signature + +```rust +fn new(http: &'a ?, path: &str, params: ?, data_key: &str) -> Self +``` + +#### Parameters + + + + + + + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/pagination.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/pagination.rs) + +Line 48. + +*** + +### next + +#### Signature + +```rust +fn next(&mut self) -> ?<::Item> +``` + +#### Returns + +`?<::Item>` + +#### Source + +[`src/rest/pagination.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/pagination.rs) + +Line 161. + +*** + +### next\_item + +Fetch the next item, dispatching a new page request if needed. +Returns `Ok(None)` when the cursor is exhausted. + +#### Signature + +```rust +fn next_item(&mut self) -> ?, ?> +``` + +#### Returns + +`?, ?>` + +#### Source + +[`src/rest/pagination.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/pagination.rs) + +Line 97. + +*** + +### params + +#### Signature + +```rust +fn params(&self) -> &? +``` + +#### Returns + +`&?` + +#### Source + +[`src/rest/pagination.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/pagination.rs) + +Line 75. + +*** + +### path + +#### Signature + +```rust +fn path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/pagination.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/pagination.rs) + +Line 71. + +## Type Aliases + +### Item + +#### Source + +[`src/rest/pagination.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/pagination.rs) + +Line 159. ## Source [`src/rest/pagination.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/pagination.rs) -Line 7. +Line 26. diff --git a/fern/products/sdk-reference/rust/rest/pagination/paginated-iterator/index.mdx b/fern/products/sdk-reference/rust/rest/pagination/paginated-iterator/index.mdx deleted file mode 100644 index 7d01108bac..0000000000 --- a/fern/products/sdk-reference/rust/rest/pagination/paginated-iterator/index.mdx +++ /dev/null @@ -1,267 +0,0 @@ ---- -slug: "/reference/rust/rest/pagination/paginated-iterator" -title: "PaginatedIterator" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::rest::pagination::PaginatedIterator" - parent: "signalwire::rest::pagination" - module: "rest.pagination" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/pagination.rs" - visibility: "public" ---- -# `PaginatedIterator` - -Streaming iterator that walks a `links.next`-paginated REST endpoint. - -Holds a borrowed reference to the \[`HttpClient`] for the duration of -iteration. Use the \[`Iterator`] impl (`for item in it { ... }`) or -step manually via \[`PaginatedIterator::next_item`]. - -## Signature - -```rust -struct PaginatedIterator { /* fields */ } -``` - -## Inheritance - -**Implements:** `Iterator` - -## Methods - -### data\_key - -#### Signature - -```rust -fn data_key(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/rest/pagination.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/pagination.rs) - -Line 79. - -*** - -### http - -#### Signature - -```rust -fn http(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/rest/pagination.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/pagination.rs) - -Line 67. - -*** - -### index - -#### Signature - -```rust -fn index(&self) -> usize -``` - -#### Returns - -`usize` - -#### Source - -[`src/rest/pagination.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/pagination.rs) - -Line 83. - -*** - -### is\_done - -#### Signature - -```rust -fn is_done(&self) -> bool -``` - -#### Returns - -`bool` - -#### Source - -[`src/rest/pagination.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/pagination.rs) - -Line 91. - -*** - -### items - -#### Signature - -```rust -fn items(&self) -> &[?] -``` - -#### Returns - -`&[?]` - -#### Source - -[`src/rest/pagination.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/pagination.rs) - -Line 87. - -*** - -### new - -Construct a new iterator. - -`params` and `data_key` mirror the Python signature: the body field -containing the items array is named `data_key` (typically `"data"`), -and `params` is forwarded on the first GET. - -#### Signature - -```rust -fn new(http: &'a ?, path: &str, params: ?, data_key: &str) -> Self -``` - -#### Parameters - - - - - - - - - -#### Returns - -`Self` - -#### Source - -[`src/rest/pagination.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/pagination.rs) - -Line 48. - -*** - -### next - -#### Signature - -```rust -fn next(&mut self) -> ?<::Item> -``` - -#### Returns - -`?<::Item>` - -#### Source - -[`src/rest/pagination.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/pagination.rs) - -Line 161. - -*** - -### next\_item - -Fetch the next item, dispatching a new page request if needed. -Returns `Ok(None)` when the cursor is exhausted. - -#### Signature - -```rust -fn next_item(&mut self) -> ?, ?> -``` - -#### Returns - -`?, ?>` - -#### Source - -[`src/rest/pagination.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/pagination.rs) - -Line 97. - -*** - -### params - -#### Signature - -```rust -fn params(&self) -> &? -``` - -#### Returns - -`&?` - -#### Source - -[`src/rest/pagination.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/pagination.rs) - -Line 75. - -*** - -### path - -#### Signature - -```rust -fn path(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/rest/pagination.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/pagination.rs) - -Line 71. - -## Type Aliases - -### Item - -#### Source - -[`src/rest/pagination.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/pagination.rs) - -Line 159. - -## Source - -[`src/rest/pagination.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/pagination.rs) - -Line 26. diff --git a/fern/products/sdk-reference/rust/rest/project/index.mdx b/fern/products/sdk-reference/rust/rest/project/index.mdx index f5307ec0cd..e1ab5e584c 100644 --- a/fern/products/sdk-reference/rust/rest/project/index.mdx +++ b/fern/products/sdk-reference/rust/rest/project/index.mdx @@ -25,6 +25,14 @@ Mirrors `signalwire.rest.namespaces.project.ProjectNamespace`. struct Project { /* fields */ } ``` +## Classes + + + + Project API token management. + + + ## Methods ### new diff --git a/fern/products/sdk-reference/rust/rest/project/index__2.mdx b/fern/products/sdk-reference/rust/rest/project/index__2.mdx deleted file mode 100644 index b36ef8591d..0000000000 --- a/fern/products/sdk-reference/rust/rest/project/index__2.mdx +++ /dev/null @@ -1,22 +0,0 @@ ---- -slug: "/reference/rust/rest/project/index__2" -title: "project" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "rest.namespaces.project" - parent: "signalwire::rest" - module: "rest" ---- -# `project` - -## Classes - - - - Project API token management. - - diff --git a/fern/products/sdk-reference/rust/rest/project/project-tokens/index.mdx b/fern/products/sdk-reference/rust/rest/project/project-tokens/index.mdx index 8b6eddcbbf..e78ca2d611 100644 --- a/fern/products/sdk-reference/rust/rest/project/project-tokens/index.mdx +++ b/fern/products/sdk-reference/rust/rest/project/project-tokens/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "rust" qualified_name: "signalwire::rest::namespaces::project::ProjectTokens" - parent: "rest.namespaces.project" + parent: "signalwire::rest::namespaces::project" module: "rest.project" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/project.rs" visibility: "public" diff --git a/fern/products/sdk-reference/rust/rest/registry/index.mdx b/fern/products/sdk-reference/rust/rest/registry/index.mdx index 702bddca5a..2e598fe91c 100644 --- a/fern/products/sdk-reference/rust/rest/registry/index.mdx +++ b/fern/products/sdk-reference/rust/rest/registry/index.mdx @@ -26,6 +26,18 @@ sub-resource lives under `/api/relay/rest/registry/beta`. struct Registry { /* fields */ } ``` +## Classes + + + + + + + + + + + ## Methods ### brands diff --git a/fern/products/sdk-reference/rust/rest/registry/index__2.mdx b/fern/products/sdk-reference/rust/rest/registry/index__2.mdx deleted file mode 100644 index a0f488eae3..0000000000 --- a/fern/products/sdk-reference/rust/rest/registry/index__2.mdx +++ /dev/null @@ -1,26 +0,0 @@ ---- -slug: "/reference/rust/rest/registry/index__2" -title: "registry" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "rest.namespaces.registry" - parent: "signalwire::rest" - module: "rest" ---- -# `registry` - -## Classes - - - - - - - - - - diff --git a/fern/products/sdk-reference/rust/rest/registry/registry-brands/index.mdx b/fern/products/sdk-reference/rust/rest/registry/registry-brands/index.mdx index 59db8467a6..ebf2a5c04f 100644 --- a/fern/products/sdk-reference/rust/rest/registry/registry-brands/index.mdx +++ b/fern/products/sdk-reference/rust/rest/registry/registry-brands/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "rust" qualified_name: "signalwire::rest::namespaces::registry::RegistryBrands" - parent: "rest.namespaces.registry" + parent: "signalwire::rest::namespaces::registry" module: "rest.registry" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs" visibility: "public" diff --git a/fern/products/sdk-reference/rust/rest/registry/registry-campaigns/index.mdx b/fern/products/sdk-reference/rust/rest/registry/registry-campaigns/index.mdx index be84a1b9f9..0084b846e1 100644 --- a/fern/products/sdk-reference/rust/rest/registry/registry-campaigns/index.mdx +++ b/fern/products/sdk-reference/rust/rest/registry/registry-campaigns/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "rust" qualified_name: "signalwire::rest::namespaces::registry::RegistryCampaigns" - parent: "rest.namespaces.registry" + parent: "signalwire::rest::namespaces::registry" module: "rest.registry" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs" visibility: "public" diff --git a/fern/products/sdk-reference/rust/rest/registry/registry-numbers/index.mdx b/fern/products/sdk-reference/rust/rest/registry/registry-numbers/index.mdx index 4a36966bb8..92f64e44a1 100644 --- a/fern/products/sdk-reference/rust/rest/registry/registry-numbers/index.mdx +++ b/fern/products/sdk-reference/rust/rest/registry/registry-numbers/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "rust" qualified_name: "signalwire::rest::namespaces::registry::RegistryNumbers" - parent: "rest.namespaces.registry" + parent: "signalwire::rest::namespaces::registry" module: "rest.registry" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs" visibility: "public" diff --git a/fern/products/sdk-reference/rust/rest/registry/registry-orders/index.mdx b/fern/products/sdk-reference/rust/rest/registry/registry-orders/index.mdx index c397e6b8ba..dfc365661b 100644 --- a/fern/products/sdk-reference/rust/rest/registry/registry-orders/index.mdx +++ b/fern/products/sdk-reference/rust/rest/registry/registry-orders/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "rust" qualified_name: "signalwire::rest::namespaces::registry::RegistryOrders" - parent: "rest.namespaces.registry" + parent: "signalwire::rest::namespaces::registry" module: "rest.registry" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/registry.rs" visibility: "public" diff --git a/fern/products/sdk-reference/rust/rest/sip-profile/index.mdx b/fern/products/sdk-reference/rust/rest/sip-profile/index.mdx index a477b68c75..6dd2838e9b 100644 --- a/fern/products/sdk-reference/rust/rest/sip-profile/index.mdx +++ b/fern/products/sdk-reference/rust/rest/sip-profile/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Rust SDK" icon: "rust" lustri: auto_generated: true - kind: "module" + kind: "class" language: "rust" qualified_name: "signalwire::rest::namespaces::sip_profile" parent: "signalwire::rest" @@ -15,16 +15,112 @@ lustri: --- # `sip_profile` -## Classes +SIP Profile (singleton resource) namespace. - - - SIP Profile (singleton resource) namespace. - - +Mirrors `signalwire.rest.namespaces.sip_profile.SipProfileResource`. +Rooted at `/api/relay/rest/sip_profile` (singular) — the project has +exactly one SIP profile, so there is no list/create/delete. + +## Signature + +```rust +struct SipProfile { /* fields */ } +``` + +## Methods + +### base\_path + +#### Signature + +```rust +fn base_path(&self) -> &str +``` + +#### Returns + +`&str` + +#### Source + +[`src/rest/namespaces/sip_profile.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/sip_profile.rs) + +Line 24. + +*** + +### get + +GET /api/relay/rest/sip\_profile — fetch the current profile. + +#### Signature + +```rust +fn get(&self) -> ? +``` + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/sip_profile.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/sip_profile.rs) + +Line 29. + +*** + +### new + +#### Signature + +```rust +fn new(client: &'a ?) -> Self +``` + +#### Parameters + + + +#### Returns + +`Self` + +#### Source + +[`src/rest/namespaces/sip_profile.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/sip_profile.rs) + +Line 17. + +*** + +### update + +PUT /api/relay/rest/sip\_profile — update the SIP profile. + +#### Signature + +```rust +fn update(&self, params: &?) -> ? +``` + +#### Parameters + + + +#### Returns + +`?` + +#### Source + +[`src/rest/namespaces/sip_profile.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/sip_profile.rs) + +Line 34. ## Source [`src/rest/namespaces/sip_profile.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/sip_profile.rs) -Line 1. +Line 11. diff --git a/fern/products/sdk-reference/rust/rest/sip-profile/sip-profile/index.mdx b/fern/products/sdk-reference/rust/rest/sip-profile/sip-profile/index.mdx deleted file mode 100644 index d56bb09963..0000000000 --- a/fern/products/sdk-reference/rust/rest/sip-profile/sip-profile/index.mdx +++ /dev/null @@ -1,126 +0,0 @@ ---- -slug: "/reference/rust/rest/sip-profile/sip-profile" -title: "SipProfile" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::rest::namespaces::sip_profile::SipProfile" - parent: "signalwire::rest::namespaces::sip_profile" - module: "rest.sip_profile" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/sip_profile.rs" - visibility: "public" ---- -# `SipProfile` - -SIP Profile (singleton resource) namespace. - -Mirrors `signalwire.rest.namespaces.sip_profile.SipProfileResource`. -Rooted at `/api/relay/rest/sip_profile` (singular) — the project has -exactly one SIP profile, so there is no list/create/delete. - -## Signature - -```rust -struct SipProfile { /* fields */ } -``` - -## Methods - -### base\_path - -#### Signature - -```rust -fn base_path(&self) -> &str -``` - -#### Returns - -`&str` - -#### Source - -[`src/rest/namespaces/sip_profile.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/sip_profile.rs) - -Line 24. - -*** - -### get - -GET /api/relay/rest/sip\_profile — fetch the current profile. - -#### Signature - -```rust -fn get(&self) -> ? -``` - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/sip_profile.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/sip_profile.rs) - -Line 29. - -*** - -### new - -#### Signature - -```rust -fn new(client: &'a ?) -> Self -``` - -#### Parameters - - - -#### Returns - -`Self` - -#### Source - -[`src/rest/namespaces/sip_profile.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/sip_profile.rs) - -Line 17. - -*** - -### update - -PUT /api/relay/rest/sip\_profile — update the SIP profile. - -#### Signature - -```rust -fn update(&self, params: &?) -> ? -``` - -#### Parameters - - - -#### Returns - -`?` - -#### Source - -[`src/rest/namespaces/sip_profile.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/sip_profile.rs) - -Line 34. - -## Source - -[`src/rest/namespaces/sip_profile.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/sip_profile.rs) - -Line 11. diff --git a/fern/products/sdk-reference/rust/rest/video/index.mdx b/fern/products/sdk-reference/rust/rest/video/index.mdx index 710cd44442..22fb90d901 100644 --- a/fern/products/sdk-reference/rust/rest/video/index.mdx +++ b/fern/products/sdk-reference/rust/rest/video/index.mdx @@ -28,6 +28,24 @@ Python class. struct Video { /* fields */ } ``` +## Classes + + + + + + + + + + + + + + + + + ## Methods ### client diff --git a/fern/products/sdk-reference/rust/rest/video/index__2.mdx b/fern/products/sdk-reference/rust/rest/video/index__2.mdx deleted file mode 100644 index 7346ae7be3..0000000000 --- a/fern/products/sdk-reference/rust/rest/video/index__2.mdx +++ /dev/null @@ -1,32 +0,0 @@ ---- -slug: "/reference/rust/rest/video/index__2" -title: "video" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "module" - language: "rust" - qualified_name: "rest.namespaces.video" - parent: "signalwire::rest" - module: "rest" ---- -# `video` - -## Classes - - - - - - - - - - - - - - - - diff --git a/fern/products/sdk-reference/rust/rest/video/video-conference-tokens/index.mdx b/fern/products/sdk-reference/rust/rest/video/video-conference-tokens/index.mdx index d84811bb47..0fad18361c 100644 --- a/fern/products/sdk-reference/rust/rest/video/video-conference-tokens/index.mdx +++ b/fern/products/sdk-reference/rust/rest/video/video-conference-tokens/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "rust" qualified_name: "signalwire::rest::namespaces::video::VideoConferenceTokens" - parent: "rest.namespaces.video" + parent: "signalwire::rest::namespaces::video" module: "rest.video" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs" visibility: "public" diff --git a/fern/products/sdk-reference/rust/rest/video/video-conferences/index.mdx b/fern/products/sdk-reference/rust/rest/video/video-conferences/index.mdx index a10b148bbb..9184de9953 100644 --- a/fern/products/sdk-reference/rust/rest/video/video-conferences/index.mdx +++ b/fern/products/sdk-reference/rust/rest/video/video-conferences/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "rust" qualified_name: "signalwire::rest::namespaces::video::VideoConferences" - parent: "rest.namespaces.video" + parent: "signalwire::rest::namespaces::video" module: "rest.video" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs" visibility: "public" diff --git a/fern/products/sdk-reference/rust/rest/video/video-room-recordings/index.mdx b/fern/products/sdk-reference/rust/rest/video/video-room-recordings/index.mdx index c8f4c9fe87..f3d3230c5b 100644 --- a/fern/products/sdk-reference/rust/rest/video/video-room-recordings/index.mdx +++ b/fern/products/sdk-reference/rust/rest/video/video-room-recordings/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "rust" qualified_name: "signalwire::rest::namespaces::video::VideoRoomRecordings" - parent: "rest.namespaces.video" + parent: "signalwire::rest::namespaces::video" module: "rest.video" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs" visibility: "public" diff --git a/fern/products/sdk-reference/rust/rest/video/video-room-sessions/index.mdx b/fern/products/sdk-reference/rust/rest/video/video-room-sessions/index.mdx index 301c6210ca..40c0ad2ea2 100644 --- a/fern/products/sdk-reference/rust/rest/video/video-room-sessions/index.mdx +++ b/fern/products/sdk-reference/rust/rest/video/video-room-sessions/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "rust" qualified_name: "signalwire::rest::namespaces::video::VideoRoomSessions" - parent: "rest.namespaces.video" + parent: "signalwire::rest::namespaces::video" module: "rest.video" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs" visibility: "public" diff --git a/fern/products/sdk-reference/rust/rest/video/video-room-tokens/index.mdx b/fern/products/sdk-reference/rust/rest/video/video-room-tokens/index.mdx index c05fbc21a5..7d06868e39 100644 --- a/fern/products/sdk-reference/rust/rest/video/video-room-tokens/index.mdx +++ b/fern/products/sdk-reference/rust/rest/video/video-room-tokens/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "rust" qualified_name: "signalwire::rest::namespaces::video::VideoRoomTokens" - parent: "rest.namespaces.video" + parent: "signalwire::rest::namespaces::video" module: "rest.video" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs" visibility: "public" diff --git a/fern/products/sdk-reference/rust/rest/video/video-rooms/index.mdx b/fern/products/sdk-reference/rust/rest/video/video-rooms/index.mdx index 643010e240..12e976543e 100644 --- a/fern/products/sdk-reference/rust/rest/video/video-rooms/index.mdx +++ b/fern/products/sdk-reference/rust/rest/video/video-rooms/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "rust" qualified_name: "signalwire::rest::namespaces::video::VideoRooms" - parent: "rest.namespaces.video" + parent: "signalwire::rest::namespaces::video" module: "rest.video" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs" visibility: "public" diff --git a/fern/products/sdk-reference/rust/rest/video/video-streams/index.mdx b/fern/products/sdk-reference/rust/rest/video/video-streams/index.mdx index 7342a6561d..da1a1f8134 100644 --- a/fern/products/sdk-reference/rust/rest/video/video-streams/index.mdx +++ b/fern/products/sdk-reference/rust/rest/video/video-streams/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "rust" qualified_name: "signalwire::rest::namespaces::video::VideoStreams" - parent: "rest.namespaces.video" + parent: "signalwire::rest::namespaces::video" module: "rest.video" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/rest/namespaces/video.rs" visibility: "public" diff --git a/fern/products/sdk-reference/rust/signalwire/index.mdx b/fern/products/sdk-reference/rust/signalwire/index.mdx index 8df9aa227d..87ac0a1dbe 100644 --- a/fern/products/sdk-reference/rust/signalwire/index.mdx +++ b/fern/products/sdk-reference/rust/signalwire/index.mdx @@ -5,7 +5,7 @@ sdk_label: "Rust SDK" icon: "rust" lustri: auto_generated: true - kind: "module" + kind: "class" language: "rust" qualified_name: "signalwire" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/lib.rs" @@ -13,13 +13,60 @@ lustri: --- # `signalwire` -## Classes +Skill registration descriptor — Rust's analogue of a Python skill +class. Bundles a skill's registration name with its factory closure +into a single value so \[`register_skill`] can mirror Python's +one-argument signature. - - - Skill registration descriptor — Rust's analogue of a Python skill class. Bundles a skill's registration name with its factory closure into a single value so \[`register_skill`] can mirror Python's one-argument signature. - - +**Decorators:** `@must_use` + +## Signature + +```rust +struct SkillSpec { /* fields */ } +``` + +## Properties + + + Factory closure that constructs a \[`skills::SkillBase`] from a JSON parameters map. + + + + Snake-case skill name used as the registry key. + + +## Methods + +### new + +Convenience constructor. + +#### Signature + +```rust +fn new: ?>(name: impl ?, factory: ?) -> Self +``` + +#### Type Parameters + + + +#### Parameters + + + + + +#### Returns + +`Self` + +#### Source + +[`src/lib.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/lib.rs) + +Line 109. ## Functions @@ -197,4 +244,4 @@ Line 140. [`src/lib.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/lib.rs) -Line 1. +Line 99. diff --git a/fern/products/sdk-reference/rust/signalwire/skill-spec/index.mdx b/fern/products/sdk-reference/rust/signalwire/skill-spec/index.mdx deleted file mode 100644 index 7a3f77b453..0000000000 --- a/fern/products/sdk-reference/rust/signalwire/skill-spec/index.mdx +++ /dev/null @@ -1,76 +0,0 @@ ---- -slug: "/reference/rust/signalwire/skill-spec" -title: "SkillSpec" -sdk_label: "Rust SDK" -icon: "rust" -lustri: - auto_generated: true - kind: "class" - language: "rust" - qualified_name: "signalwire::SkillSpec" - parent: "signalwire" - source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/lib.rs" - visibility: "public" ---- -# `SkillSpec` - -Skill registration descriptor — Rust's analogue of a Python skill -class. Bundles a skill's registration name with its factory closure -into a single value so \[`register_skill`] can mirror Python's -one-argument signature. - -**Decorators:** `@must_use` - -## Signature - -```rust -struct SkillSpec { /* fields */ } -``` - -## Properties - - - Factory closure that constructs a \[`skills::SkillBase`] from a JSON parameters map. - - - - Snake-case skill name used as the registry key. - - -## Methods - -### new - -Convenience constructor. - -#### Signature - -```rust -fn new: ?>(name: impl ?, factory: ?) -> Self -``` - -#### Type Parameters - - - -#### Parameters - - - - - -#### Returns - -`Self` - -#### Source - -[`src/lib.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/lib.rs) - -Line 109. - -## Source - -[`src/lib.rs`](https://github.com/signalwire/signalwire-rust/blob/main/src/lib.rs) - -Line 99. diff --git a/fern/products/sdk-reference/sdk-reference.yml b/fern/products/sdk-reference/sdk-reference.yml index 51880d83fe..0275a2a608 100644 --- a/fern/products/sdk-reference/sdk-reference.yml +++ b/fern/products/sdk-reference/sdk-reference.yml @@ -3,6 +3,11 @@ tabs: display-name: Reference icon: fa-regular fa-code +# Each SDK is organized into the same four conceptual areas as the hand-written +# server-sdks reference: Core · Agents · RELAY · REST Client. The per-language +# markdown is generated by the Lustri pipeline (namespace_shape reshape); listing +# the four folders explicitly (rather than a single ./ folder) gives a clean, +# curated top-level sidebar and excludes any package-root wrapper pages. navigation: - tab: reference variants: @@ -10,71 +15,161 @@ navigation: icon: brands fa-js default: true layout: - - folder: ./typescript - title: TypeScript SDK + - folder: ./typescript/core + title: Core + collapsed: false + - folder: ./typescript/agents + title: Agents + collapsed: false + - folder: ./typescript/relay + title: RELAY + collapsed: false + - folder: ./typescript/rest + title: REST Client collapsed: false - title: Python icon: brands fa-python layout: - - folder: ./python - title: Python SDK + - folder: ./python/core + title: Core + collapsed: false + - folder: ./python/agents + title: Agents + collapsed: false + - folder: ./python/relay + title: RELAY + collapsed: false + - folder: ./python/rest + title: REST Client collapsed: false - title: Ruby icon: fa-regular fa-gem layout: - - folder: ./ruby - title: Ruby SDK + - folder: ./ruby/core + title: Core + collapsed: false + - folder: ./ruby/agents + title: Agents + collapsed: false + - folder: ./ruby/relay + title: RELAY + collapsed: false + - folder: ./ruby/rest + title: REST Client collapsed: false - title: Go icon: fa-regular fa-code layout: - - folder: ./go - title: Go SDK + - folder: ./go/core + title: Core + collapsed: false + - folder: ./go/agents + title: Agents + collapsed: false + - folder: ./go/relay + title: RELAY + collapsed: false + - folder: ./go/rest + title: REST Client collapsed: false - title: Java icon: brands fa-java layout: - - folder: ./java - title: Java SDK + - folder: ./java/core + title: Core + collapsed: false + - folder: ./java/agents + title: Agents + collapsed: false + - folder: ./java/relay + title: RELAY + collapsed: false + - folder: ./java/rest + title: REST Client collapsed: false - title: .NET slug: dotnet icon: brands fa-microsoft layout: - - folder: ./dotnet - title: .NET SDK + - folder: ./dotnet/core + title: Core + collapsed: false + - folder: ./dotnet/agents + title: Agents + collapsed: false + - folder: ./dotnet/relay + title: RELAY + collapsed: false + - folder: ./dotnet/rest + title: REST Client collapsed: false - title: PHP icon: brands fa-php layout: - - folder: ./php - title: PHP SDK + - folder: ./php/core + title: Core + collapsed: false + - folder: ./php/agents + title: Agents + collapsed: false + - folder: ./php/relay + title: RELAY + collapsed: false + - folder: ./php/rest + title: REST Client collapsed: false - title: Rust icon: brands fa-rust layout: - - folder: ./rust - title: Rust SDK + - folder: ./rust/core + title: Core + collapsed: false + - folder: ./rust/agents + title: Agents + collapsed: false + - folder: ./rust/relay + title: RELAY + collapsed: false + - folder: ./rust/rest + title: REST Client collapsed: false - title: C++ slug: cpp icon: fa-regular fa-code layout: - - folder: ./cpp - title: C++ SDK + - folder: ./cpp/core + title: Core + collapsed: false + - folder: ./cpp/agents + title: Agents + collapsed: false + - folder: ./cpp/relay + title: RELAY + collapsed: false + - folder: ./cpp/rest + title: REST Client collapsed: false - title: Perl icon: fa-regular fa-code layout: - - folder: ./perl - title: Perl SDK + - folder: ./perl/core + title: Core + collapsed: false + - folder: ./perl/agents + title: Agents + collapsed: false + - folder: ./perl/relay + title: RELAY + collapsed: false + - folder: ./perl/rest + title: REST Client collapsed: false diff --git a/fern/products/sdk-reference/typescript/_meta.json b/fern/products/sdk-reference/typescript/_meta.json index e9e2be89b4..e214eb893f 100644 --- a/fern/products/sdk-reference/typescript/_meta.json +++ b/fern/products/sdk-reference/typescript/_meta.json @@ -6,5 +6,5 @@ "format": "mdx", "platform": "fern", "base_slug": "/reference/typescript", - "item_count": 3913 + "item_count": 3854 } \ No newline at end of file diff --git a/fern/products/sdk-reference/typescript/add-skill-directory.mdx b/fern/products/sdk-reference/typescript/add-skill-directory.mdx deleted file mode 100644 index 13a543ee23..0000000000 --- a/fern/products/sdk-reference/typescript/add-skill-directory.mdx +++ /dev/null @@ -1,41 +0,0 @@ ---- -slug: "/reference/typescript/add-skill-directory" -title: "addSkillDirectory" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "function" - language: "typescript" - qualified_name: "addSkillDirectory" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/index.ts" ---- -# `addSkillDirectory` - -Register a directory to search for additional skill modules. - -Equivalent to Python's `add_skill_directory(path)`. Proxies to -`SkillRegistry.addSearchPath()`. Callers who want on-disk dynamic -discovery can pair this with `SkillRegistry.discoverFromDirectory()`. - -## Signature - -```typescript -addSkillDirectory(path: string): void -``` - -## Parameters - - - Absolute path to a directory containing skill files. - - -## Returns - -`void` - -## Source - -[`src/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/index.ts) - -Line 318. diff --git a/fern/products/sdk-reference/typescript/agents/agent-base/index.mdx b/fern/products/sdk-reference/typescript/agents/agent-base/index.mdx index d6f6bb7110..23d9fcadb2 100644 --- a/fern/products/sdk-reference/typescript/agents/agent-base/index.mdx +++ b/fern/products/sdk-reference/typescript/agents/agent-base/index.mdx @@ -129,7 +129,7 @@ class AgentBase extends SWMLService - Public accessor for the agent's POM as a `PromptObjectModel` instance. Python parity: `agent.pom` instance attribute (agent\_base.py line 209) is a `signalwire.pom.pom.PromptObjectModel` when `use_pom=True`, or `None` otherwise. This getter returns the equivalent TypeScript `PromptObjectModel` instance — callers can use `addSection`, `findSection`, `renderMarkdown`, `renderXml`, `toJson`, `toYaml` exactly as in Python. The instance returned is a fresh snapshot built from the current `PomBuilder` state, so mutating it does not feed back into the agent's internal builder. To mutate the agent's prompt, use `promptAddSection` / `promptAddToSection` / `promptAddSubsection`. + Public accessor for the agent's POM as a [PromptObjectModel](/docs/sdk-reference/reference/typescript/agents/pom/prompt-object-model) instance. Python parity: `agent.pom` instance attribute (agent\_base.py line 209) is a `signalwire.pom.pom.PromptObjectModel` when `use_pom=True`, or `None` otherwise. This getter returns the equivalent TypeScript `PromptObjectModel` instance — callers can use `addSection`, `findSection`, `renderMarkdown`, `renderXml`, `toJson`, `toYaml` exactly as in Python. The instance returned is a fresh snapshot built from the current `PomBuilder` state, so mutating it does not feed back into the agent's internal builder. To mutate the agent's prompt, use `promptAddSection` / `promptAddToSection` / `promptAddSubsection`. diff --git a/fern/products/sdk-reference/typescript/agents/configuration/auth-handler/index.mdx b/fern/products/sdk-reference/typescript/agents/configuration/auth-handler/index.mdx index 4d07d5fbec..d934b2a344 100644 --- a/fern/products/sdk-reference/typescript/agents/configuration/auth-handler/index.mdx +++ b/fern/products/sdk-reference/typescript/agents/configuration/auth-handler/index.mdx @@ -336,6 +336,50 @@ verifyBearerToken(token: string): boolean Line 139. +## Interfaces + +### AuthConfig + +Configuration for one or more authentication methods checked by [AuthHandler](/docs/sdk-reference/reference/typescript/agents/configuration/auth-handler). + +#### Signature + +```typescript +interface AuthConfig +``` + +#### Properties + + + When explicitly set to false, deny requests if no auth methods are configured. + + + + API key matched against the X-Api-Key header. + + + + Custom header name for API key lookup (default: 'X-Api-Key'). + + + + Basic auth credentials as a \[username, password] tuple. + + + + Bearer token matched against the Authorization header. + + + + Custom validator function; return true to allow the request. + + +#### Source + +[`src/AuthHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AuthHandler.ts) + +Line 14. + ## Source [`src/AuthHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AuthHandler.ts) diff --git a/fern/products/sdk-reference/typescript/agents/configuration/auth-handler/index__2.mdx b/fern/products/sdk-reference/typescript/agents/configuration/auth-handler/index__2.mdx deleted file mode 100644 index 3e56cec644..0000000000 --- a/fern/products/sdk-reference/typescript/agents/configuration/auth-handler/index__2.mdx +++ /dev/null @@ -1,58 +0,0 @@ ---- -slug: "/reference/typescript/agents/configuration/auth-handler/index__2" -title: "AuthHandler" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "module" - language: "typescript" - qualified_name: "agents.configuration.AuthHandler" - parent: "agents.configuration" - module: "agents.configuration" ---- -# `AuthHandler` - -## Interfaces - -### AuthConfig - -Configuration for one or more authentication methods checked by [AuthHandler](/docs/sdk-reference/reference/typescript/agents/configuration/auth-handler). - -#### Signature - -```typescript -interface AuthConfig -``` - -#### Properties - - - When explicitly set to false, deny requests if no auth methods are configured. - - - - API key matched against the X-Api-Key header. - - - - Custom header name for API key lookup (default: 'X-Api-Key'). - - - - Basic auth credentials as a \[username, password] tuple. - - - - Bearer token matched against the Authorization header. - - - - Custom validator function; return true to allow the request. - - -#### Source - -[`src/AuthHandler.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/AuthHandler.ts) - -Line 14. diff --git a/fern/products/sdk-reference/typescript/agents/configuration/index.mdx b/fern/products/sdk-reference/typescript/agents/configuration/index.mdx index 7d00ee17fa..25292cc6f4 100644 --- a/fern/products/sdk-reference/typescript/agents/configuration/index.mdx +++ b/fern/products/sdk-reference/typescript/agents/configuration/index.mdx @@ -24,9 +24,3 @@ lustri: JSON configuration file loader with environment variable interpolation and dot-notation access. - -## Modules - - - - diff --git a/fern/products/sdk-reference/typescript/agents/context-builder/context/index.mdx b/fern/products/sdk-reference/typescript/agents/context-builder/context/index.mdx index 448b2f23eb..41a1d8d453 100644 --- a/fern/products/sdk-reference/typescript/agents/context-builder/context/index.mdx +++ b/fern/products/sdk-reference/typescript/agents/context-builder/context/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "typescript" qualified_name: "ContextBuilder.Context" - parent: "agents.ContextBuilder" + parent: "ContextBuilder" module: "agents.ContextBuilder" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts" --- diff --git a/fern/products/sdk-reference/typescript/agents/context-builder/gather-info/index.mdx b/fern/products/sdk-reference/typescript/agents/context-builder/gather-info/index.mdx index a876490710..90909cd497 100644 --- a/fern/products/sdk-reference/typescript/agents/context-builder/gather-info/index.mdx +++ b/fern/products/sdk-reference/typescript/agents/context-builder/gather-info/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "typescript" qualified_name: "ContextBuilder.GatherInfo" - parent: "agents.ContextBuilder" + parent: "ContextBuilder" module: "agents.ContextBuilder" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts" --- diff --git a/fern/products/sdk-reference/typescript/agents/context-builder/gather-question/index.mdx b/fern/products/sdk-reference/typescript/agents/context-builder/gather-question/index.mdx index 187630595e..037cd933f1 100644 --- a/fern/products/sdk-reference/typescript/agents/context-builder/gather-question/index.mdx +++ b/fern/products/sdk-reference/typescript/agents/context-builder/gather-question/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "typescript" qualified_name: "ContextBuilder.GatherQuestion" - parent: "agents.ContextBuilder" + parent: "ContextBuilder" module: "agents.ContextBuilder" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts" --- diff --git a/fern/products/sdk-reference/typescript/agents/context-builder/index.mdx b/fern/products/sdk-reference/typescript/agents/context-builder/index.mdx index 4e4b180711..a7bac6f230 100644 --- a/fern/products/sdk-reference/typescript/agents/context-builder/index.mdx +++ b/fern/products/sdk-reference/typescript/agents/context-builder/index.mdx @@ -103,6 +103,26 @@ agent.defineContexts(contexts); Reserved tool names auto-injected by the runtime when contexts/steps are present. User-defined SWAIG tools must not collide with these names. ContextBuilder.validate() rejects any agent that registers a user tool sharing one of these names — the runtime would never call the user tool because the native one wins. +## Classes + + + + A named context containing ordered steps, prompt configuration, and navigation rules. + + + + Collects structured information from the user through a series of questions. + + + + Represents a single question within a gather operation. + + + + A single step within a context, with prompt content, criteria, function restrictions, and navigation rules. + + + ## Methods ### addContext diff --git a/fern/products/sdk-reference/typescript/agents/context-builder/index__2.mdx b/fern/products/sdk-reference/typescript/agents/context-builder/index__2.mdx deleted file mode 100644 index 4359fbd2c6..0000000000 --- a/fern/products/sdk-reference/typescript/agents/context-builder/index__2.mdx +++ /dev/null @@ -1,34 +0,0 @@ ---- -slug: "/reference/typescript/agents/context-builder/index__2" -title: "ContextBuilder" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "module" - language: "typescript" - qualified_name: "agents.ContextBuilder" - parent: "agents" - module: "agents" ---- -# `ContextBuilder` - -## Classes - - - - A named context containing ordered steps, prompt configuration, and navigation rules. - - - - Collects structured information from the user through a series of questions. - - - - Represents a single question within a gather operation. - - - - A single step within a context, with prompt content, criteria, function restrictions, and navigation rules. - - diff --git a/fern/products/sdk-reference/typescript/agents/context-builder/step/index.mdx b/fern/products/sdk-reference/typescript/agents/context-builder/step/index.mdx index bfd7ca9b69..fb0350c813 100644 --- a/fern/products/sdk-reference/typescript/agents/context-builder/step/index.mdx +++ b/fern/products/sdk-reference/typescript/agents/context-builder/step/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "typescript" qualified_name: "ContextBuilder.Step" - parent: "agents.ContextBuilder" + parent: "ContextBuilder" module: "agents.ContextBuilder" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/ContextBuilder.ts" --- diff --git a/fern/products/sdk-reference/typescript/agents/function-result/index.mdx b/fern/products/sdk-reference/typescript/agents/function-result/index.mdx index eaa32a9d00..880962a00f 100644 --- a/fern/products/sdk-reference/typescript/agents/function-result/index.mdx +++ b/fern/products/sdk-reference/typescript/agents/function-result/index.mdx @@ -1691,6 +1691,98 @@ waitForUser(opts?: { ...3 fields }): this Line 206. +## Interfaces + +### PaymentAction + +A single action within a payment prompt (e.g., say or play). + +#### Signature + +```typescript +interface PaymentAction +``` + +#### Properties + + + The phrase or URL to use for this action. + + + + The action type (e.g., "say", "play"). + + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 21. + +*** + +### PaymentParameter + +A custom key-value parameter passed to the payment connector. + +#### Signature + +```typescript +interface PaymentParameter +``` + +#### Properties + + + The parameter name. + + + + The parameter value. + + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 29. + +*** + +### PaymentPrompt + +Prompt configuration for a payment collection flow. + +#### Signature + +```typescript +interface PaymentPrompt +``` + +#### Properties + + + Actions to perform for this prompt. + + + + Optional card type filter for this prompt. + + + + Optional error type this prompt handles. + + + + The situation this prompt applies to (e.g., "payment-card-number"). + + +#### Source + +[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) + +Line 9. + ## Source [`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) diff --git a/fern/products/sdk-reference/typescript/agents/function-result/index__2.mdx b/fern/products/sdk-reference/typescript/agents/function-result/index__2.mdx deleted file mode 100644 index 7cf7720965..0000000000 --- a/fern/products/sdk-reference/typescript/agents/function-result/index__2.mdx +++ /dev/null @@ -1,106 +0,0 @@ ---- -slug: "/reference/typescript/agents/function-result/index__2" -title: "FunctionResult" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "module" - language: "typescript" - qualified_name: "agents.FunctionResult" - parent: "agents" - module: "agents" ---- -# `FunctionResult` - -## Interfaces - -### PaymentAction - -A single action within a payment prompt (e.g., say or play). - -#### Signature - -```typescript -interface PaymentAction -``` - -#### Properties - - - The phrase or URL to use for this action. - - - - The action type (e.g., "say", "play"). - - -#### Source - -[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) - -Line 21. - -*** - -### PaymentParameter - -A custom key-value parameter passed to the payment connector. - -#### Signature - -```typescript -interface PaymentParameter -``` - -#### Properties - - - The parameter name. - - - - The parameter value. - - -#### Source - -[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) - -Line 29. - -*** - -### PaymentPrompt - -Prompt configuration for a payment collection flow. - -#### Signature - -```typescript -interface PaymentPrompt -``` - -#### Properties - - - Actions to perform for this prompt. - - - - Optional card type filter for this prompt. - - - - Optional error type this prompt handles. - - - - The situation this prompt applies to (e.g., "payment-card-number"). - - -#### Source - -[`src/FunctionResult.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/FunctionResult.ts) - -Line 9. diff --git a/fern/products/sdk-reference/typescript/agents/index.mdx b/fern/products/sdk-reference/typescript/agents/index.mdx index 200e34ba4b..225729c296 100644 --- a/fern/products/sdk-reference/typescript/agents/index.mdx +++ b/fern/products/sdk-reference/typescript/agents/index.mdx @@ -35,7 +35,7 @@ lustri: - Fluent builder producing a [ParameterSchemaObject](/docs/sdk-reference/reference/typescript/agents/parameter-schema/index__2#parameter-schema-object) byte-identical to the equivalent hand-written `parameters` blob. Every method returns `this` for chaining; call `build` to obtain the plain object to hand to `defineTool`/`defineTypedTool`. + Fluent builder producing a [ParameterSchemaObject](/docs/sdk-reference/reference/typescript/agents/parameter-schema#parameter-schema-object) byte-identical to the equivalent hand-written `parameters` blob. Every method returns `this` for chaining; call `build` to obtain the plain object to hand to `defineTool`/`defineTypedTool`. @@ -86,39 +86,130 @@ lustri: - - - - - - - - - + - + + - +## Functions - +### addSkillDirectory - +Register a directory to search for additional skill modules. - +Equivalent to Python's `add_skill_directory(path)`. Proxies to +`SkillRegistry.addSearchPath()`. Callers who want on-disk dynamic +discovery can pair this with `SkillRegistry.discoverFromDirectory()`. - +#### Signature - +```typescript +addSkillDirectory(path: string): void +``` - +#### Parameters - - + + Absolute path to a directory containing skill files. + + +#### Returns + +`void` + +#### Source + +[`src/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/index.ts) + +Line 318. + +*** + +### listSkills + +List metadata for all registered skills. + +Equivalent to Python's `list_skills()` — proxies to the singleton +[SkillRegistry](/docs/sdk-reference/reference/typescript/agents/skills/skill-registry). Python's version returns a plain dict keyed by +skill name; this returns an array of `_SkillSchemaInfo` entries +(the TS shape is richer and includes the name field). + +#### Signature + +```typescript +listSkills(): SkillSchemaInfo[] +``` + +#### Returns + +`SkillSchemaInfo[]` — Array of skill metadata entries. + +#### Source + +[`src/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/index.ts) + +Line 281. + +*** + +### listSkillsWithParams + +Get full schema for all registered skills, including parameter metadata. + +Equivalent to Python's `list_skills_with_params()`. Useful for GUI +configuration tools, API documentation, and programmatic skill discovery. + +#### Signature + +```typescript +listSkillsWithParams(): Record +``` + +#### Returns + +`Record` — Map of skill name to `schema info`. + +#### Source + +[`src/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/index.ts) + +Line 293. + +*** + +### registerSkill + +Register a custom skill class with the global [SkillRegistry](/docs/sdk-reference/reference/typescript/agents/skills/skill-registry). + +Equivalent to Python's `register_skill(skill_class)`. Allows third-party +code to register skills directly, bypassing the built-in directory scan. + +#### Signature + +```typescript +registerSkill(skillClass: typeof SkillBase): void +``` + +#### Parameters + + + Skill class to register (a subclass of [SkillBase](/docs/sdk-reference/reference/typescript/agents/skills/skill-base)). + + +#### Returns + +`void` + +#### Source + +[`src/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/index.ts) + +Line 305. diff --git a/fern/products/sdk-reference/typescript/agents/parameter-schema/index.mdx b/fern/products/sdk-reference/typescript/agents/parameter-schema/index.mdx index 661156612f..c61bcc7aa0 100644 --- a/fern/products/sdk-reference/typescript/agents/parameter-schema/index.mdx +++ b/fern/products/sdk-reference/typescript/agents/parameter-schema/index.mdx @@ -14,7 +14,7 @@ lustri: --- # `ParameterSchema` -Fluent builder producing a [ParameterSchemaObject](/docs/sdk-reference/reference/typescript/agents/parameter-schema/index__2#parameter-schema-object) byte-identical to +Fluent builder producing a [ParameterSchemaObject](/docs/sdk-reference/reference/typescript/agents/parameter-schema#parameter-schema-object) byte-identical to the equivalent hand-written `parameters` blob. Every method returns `this` for chaining; call `build` to obtain the plain object to hand to `defineTool`/`defineTypedTool`. @@ -142,7 +142,7 @@ build(): ParameterSchemaObject #### Returns -`ParameterSchemaObject` — A fresh [ParameterSchemaObject](/docs/sdk-reference/reference/typescript/agents/parameter-schema/index__2#parameter-schema-object); safe to mutate without affecting the builder. +`ParameterSchemaObject` — A fresh [ParameterSchemaObject](/docs/sdk-reference/reference/typescript/agents/parameter-schema#parameter-schema-object); safe to mutate without affecting the builder. #### Source @@ -657,6 +657,65 @@ type TapDirection = typeof TAP_DIRECTIONS[number] Line 91. +## Interfaces + +### ParameterProperty + +A single JSON-Schema property entry inside a tool's `parameters.properties`. +Mirrors the shape the model reads on every turn: `type` + LLM-facing +`description`, with an optional `enum` / `items` and any extra JSON-Schema +keywords (`minLength`, `pattern`, `format`, …) merged through verbatim. + +#### Signature + +```typescript +interface ParameterProperty +``` + +#### Properties + + + + + + + + + +#### Source + +[`src/ParameterSchema.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts) + +Line 112. + +*** + +### ParameterSchemaObject + +The serialised SWAIG parameter schema: a JSON-Schema `object`. This is the +exact shape `defineTool({ parameters })` accepts and what the SDK renders +into the OpenAI tool schema's `parameters` field. + +#### Signature + +```typescript +interface ParameterSchemaObject +``` + +#### Properties + + + + + + + +#### Source + +[`src/ParameterSchema.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts) + +Line 125. + ## Source [`src/ParameterSchema.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts) diff --git a/fern/products/sdk-reference/typescript/agents/parameter-schema/index__2.mdx b/fern/products/sdk-reference/typescript/agents/parameter-schema/index__2.mdx deleted file mode 100644 index 19ccb518df..0000000000 --- a/fern/products/sdk-reference/typescript/agents/parameter-schema/index__2.mdx +++ /dev/null @@ -1,73 +0,0 @@ ---- -slug: "/reference/typescript/agents/parameter-schema/index__2" -title: "ParameterSchema" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "module" - language: "typescript" - qualified_name: "agents.ParameterSchema" - parent: "agents" - module: "agents" ---- -# `ParameterSchema` - -## Interfaces - -### ParameterProperty - -A single JSON-Schema property entry inside a tool's `parameters.properties`. -Mirrors the shape the model reads on every turn: `type` + LLM-facing -`description`, with an optional `enum` / `items` and any extra JSON-Schema -keywords (`minLength`, `pattern`, `format`, …) merged through verbatim. - -#### Signature - -```typescript -interface ParameterProperty -``` - -#### Properties - - - - - - - - - -#### Source - -[`src/ParameterSchema.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts) - -Line 112. - -*** - -### ParameterSchemaObject - -The serialised SWAIG parameter schema: a JSON-Schema `object`. This is the -exact shape `defineTool({ parameters })` accepts and what the SDK renders -into the OpenAI tool schema's `parameters` field. - -#### Signature - -```typescript -interface ParameterSchemaObject -``` - -#### Properties - - - - - - - -#### Source - -[`src/ParameterSchema.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ParameterSchema.ts) - -Line 125. diff --git a/fern/products/sdk-reference/typescript/agents/pom-builder/index.mdx b/fern/products/sdk-reference/typescript/agents/pom-builder/index.mdx index a93a3c2621..1a2e864359 100644 --- a/fern/products/sdk-reference/typescript/agents/pom-builder/index.mdx +++ b/fern/products/sdk-reference/typescript/agents/pom-builder/index.mdx @@ -54,9 +54,17 @@ const systemPrompt = pom.renderMarkdown(); ## Properties - Returns the underlying `PromptObjectModel` for the builder. Mirrors Python's `PomBuilder.pom` attribute (the wrapped low-level model). Returns a fresh `PromptObjectModel` populated from the builder's current sections; mutations on the returned instance do not propagate back to this builder. + Returns the underlying [PromptObjectModel](/docs/sdk-reference/reference/typescript/agents/pom/prompt-object-model) for the builder. Mirrors Python's `PomBuilder.pom` attribute (the wrapped low-level model). Returns a fresh `PromptObjectModel` populated from the builder's current sections; mutations on the returned instance do not propagate back to this builder. +## Classes + + + + A single section in a Prompt Object Model, with optional title, body, bullets, and nested subsections. + + + ## Methods ### addPomAsSubsection @@ -451,6 +459,50 @@ toJson(): string Line 404. +## Interfaces + +### PomSectionData + +Serializable representation of a POM section, used for JSON export. + +#### Signature + +```typescript +interface PomSectionData +``` + +#### Properties + + + Section body paragraph text. + + + + List of bullet point strings. + + + + Whether subsections are numbered. + + + + Whether bullet points are rendered as a numbered list. + + + + Nested child sections. + + + + Section heading text. + + +#### Source + +[`src/PomBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts) + +Line 12. + ## Source [`src/PomBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts) diff --git a/fern/products/sdk-reference/typescript/agents/pom-builder/index__2.mdx b/fern/products/sdk-reference/typescript/agents/pom-builder/index__2.mdx deleted file mode 100644 index 7b73900cf5..0000000000 --- a/fern/products/sdk-reference/typescript/agents/pom-builder/index__2.mdx +++ /dev/null @@ -1,66 +0,0 @@ ---- -slug: "/reference/typescript/agents/pom-builder/index__2" -title: "PomBuilder" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "module" - language: "typescript" - qualified_name: "agents.PomBuilder" - parent: "agents" - module: "agents" ---- -# `PomBuilder` - -## Classes - - - - A single section in a Prompt Object Model, with optional title, body, bullets, and nested subsections. - - - -## Interfaces - -### PomSectionData - -Serializable representation of a POM section, used for JSON export. - -#### Signature - -```typescript -interface PomSectionData -``` - -#### Properties - - - Section body paragraph text. - - - - List of bullet point strings. - - - - Whether subsections are numbered. - - - - Whether bullet points are rendered as a numbered list. - - - - Nested child sections. - - - - Section heading text. - - -#### Source - -[`src/PomBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts) - -Line 12. diff --git a/fern/products/sdk-reference/typescript/agents/pom-builder/pom-section/index.mdx b/fern/products/sdk-reference/typescript/agents/pom-builder/pom-section/index.mdx index 78458ea2ca..0c27dcdcf3 100644 --- a/fern/products/sdk-reference/typescript/agents/pom-builder/pom-section/index.mdx +++ b/fern/products/sdk-reference/typescript/agents/pom-builder/pom-section/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "typescript" qualified_name: "PomBuilder.PomSection" - parent: "agents.PomBuilder" + parent: "PomBuilder" module: "agents.PomBuilder" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/PomBuilder.ts" --- diff --git a/fern/products/sdk-reference/typescript/agents/pom/index.mdx b/fern/products/sdk-reference/typescript/agents/pom/index.mdx index 24f90749f7..9ea3079e38 100644 --- a/fern/products/sdk-reference/typescript/agents/pom/index.mdx +++ b/fern/products/sdk-reference/typescript/agents/pom/index.mdx @@ -20,9 +20,3 @@ lustri: The Prompt Object Model — a structured, serializable representation of a full prompt document. Direct port of Python's `signalwire.pom.pom.PromptObjectModel`. - -## Modules - - - - diff --git a/fern/products/sdk-reference/typescript/agents/pom/prompt-object-model/index.mdx b/fern/products/sdk-reference/typescript/agents/pom/prompt-object-model/index.mdx index 4c1fb81cab..724183f20e 100644 --- a/fern/products/sdk-reference/typescript/agents/pom/prompt-object-model/index.mdx +++ b/fern/products/sdk-reference/typescript/agents/pom/prompt-object-model/index.mdx @@ -34,6 +34,14 @@ class PromptObjectModel Top-level sections in the model. +## Classes + + + + A section in the Prompt Object Model. + + + ## Methods ### addPomAsSubsection @@ -326,6 +334,38 @@ toYaml(): string Line 330. +## Interfaces + +### SectionData + +Plain serializable representation of a section, used for JSON/YAML and `to_dict()` exchange. + +#### Signature + +```typescript +interface SectionData +``` + +#### Properties + + + + + + + + + + + + + +#### Source + +[`src/POM/PromptObjectModel.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts) + +Line 19. + ## Source [`src/POM/PromptObjectModel.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts) diff --git a/fern/products/sdk-reference/typescript/agents/pom/prompt-object-model/index__2.mdx b/fern/products/sdk-reference/typescript/agents/pom/prompt-object-model/index__2.mdx deleted file mode 100644 index ad2bbf2716..0000000000 --- a/fern/products/sdk-reference/typescript/agents/pom/prompt-object-model/index__2.mdx +++ /dev/null @@ -1,54 +0,0 @@ ---- -slug: "/reference/typescript/agents/pom/prompt-object-model/index__2" -title: "PromptObjectModel" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "module" - language: "typescript" - qualified_name: "agents.POM.PromptObjectModel" - parent: "agents.POM" - module: "agents.POM" ---- -# `PromptObjectModel` - -## Classes - - - - A section in the Prompt Object Model. - - - -## Interfaces - -### SectionData - -Plain serializable representation of a section, used for JSON/YAML and `to_dict()` exchange. - -#### Signature - -```typescript -interface SectionData -``` - -#### Properties - - - - - - - - - - - - - -#### Source - -[`src/POM/PromptObjectModel.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts) - -Line 19. diff --git a/fern/products/sdk-reference/typescript/agents/pom/prompt-object-model/section/index.mdx b/fern/products/sdk-reference/typescript/agents/pom/prompt-object-model/section/index.mdx index 7023629e27..0dc3e36d35 100644 --- a/fern/products/sdk-reference/typescript/agents/pom/prompt-object-model/section/index.mdx +++ b/fern/products/sdk-reference/typescript/agents/pom/prompt-object-model/section/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "typescript" qualified_name: "POM.PromptObjectModel.Section" - parent: "agents.POM.PromptObjectModel" + parent: "POM.PromptObjectModel" module: "agents.POM.PromptObjectModel" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/POM/PromptObjectModel.ts" --- diff --git a/fern/products/sdk-reference/typescript/agents/prefabs/concierge-agent/index.mdx b/fern/products/sdk-reference/typescript/agents/prefabs/concierge-agent/index.mdx index 6d0bb78f6b..184adb740c 100644 --- a/fern/products/sdk-reference/typescript/agents/prefabs/concierge-agent/index.mdx +++ b/fern/products/sdk-reference/typescript/agents/prefabs/concierge-agent/index.mdx @@ -94,7 +94,7 @@ await agent.serve({ port: 3000 }); - Public accessor for the agent's POM as a `PromptObjectModel` instance. Python parity: `agent.pom` instance attribute (agent\_base.py line 209) is a `signalwire.pom.pom.PromptObjectModel` when `use_pom=True`, or `None` otherwise. This getter returns the equivalent TypeScript `PromptObjectModel` instance — callers can use `addSection`, `findSection`, `renderMarkdown`, `renderXml`, `toJson`, `toYaml` exactly as in Python. The instance returned is a fresh snapshot built from the current `PomBuilder` state, so mutating it does not feed back into the agent's internal builder. To mutate the agent's prompt, use `promptAddSection` / `promptAddToSection` / `promptAddSubsection`. + Public accessor for the agent's POM as a [PromptObjectModel](/docs/sdk-reference/reference/typescript/agents/pom/prompt-object-model) instance. Python parity: `agent.pom` instance attribute (agent\_base.py line 209) is a `signalwire.pom.pom.PromptObjectModel` when `use_pom=True`, or `None` otherwise. This getter returns the equivalent TypeScript `PromptObjectModel` instance — callers can use `addSection`, `findSection`, `renderMarkdown`, `renderXml`, `toJson`, `toYaml` exactly as in Python. The instance returned is a fresh snapshot built from the current `PomBuilder` state, so mutating it does not feed back into the agent's internal builder. To mutate the agent's prompt, use `promptAddSection` / `promptAddToSection` / `promptAddSubsection`. @@ -3694,6 +3694,62 @@ createConciergeAgent(config: ConciergeConfig): ConciergeAgent Line 305. +## Interfaces + +### ConciergeConfig + +Configuration for the [ConciergeAgent](/docs/sdk-reference/reference/typescript/agents/prefabs/concierge-agent). + +#### Signature + +```typescript +interface ConciergeConfig +``` + +#### Properties + + + Additional AgentBase options forwarded to `super()`. + + + + Dictionary of amenities, each mapping to a dict of detail keys/values. + + + + Optional hours of operation by category (e.g. `{ default: "9 AM - 5 PM" }`). + + + + Agent display name (defaults to `"concierge"`). + + + + HTTP route for this agent (defaults to `"/concierge"`). + + + + List of services offered by the venue (required). + + + + Optional special instructions appended to the agent's instruction bullets. + + + + Name of the venue or business (required). + + + + Optional custom welcome message spoken as a non-bargeable static greeting. + + +#### Source + +[`src/prefabs/ConciergeAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/ConciergeAgent.ts) + +Line 16. + ## Source [`src/prefabs/ConciergeAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/ConciergeAgent.ts) diff --git a/fern/products/sdk-reference/typescript/agents/prefabs/concierge-agent/index__2.mdx b/fern/products/sdk-reference/typescript/agents/prefabs/concierge-agent/index__2.mdx deleted file mode 100644 index 37bf388560..0000000000 --- a/fern/products/sdk-reference/typescript/agents/prefabs/concierge-agent/index__2.mdx +++ /dev/null @@ -1,70 +0,0 @@ ---- -slug: "/reference/typescript/agents/prefabs/concierge-agent/index__2" -title: "ConciergeAgent" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "module" - language: "typescript" - qualified_name: "agents.prefabs.ConciergeAgent" - parent: "prefabs" - module: "agents.prefabs" ---- -# `ConciergeAgent` - -## Interfaces - -### ConciergeConfig - -Configuration for the [ConciergeAgent](/docs/sdk-reference/reference/typescript/agents/prefabs/concierge-agent). - -#### Signature - -```typescript -interface ConciergeConfig -``` - -#### Properties - - - Additional AgentBase options forwarded to `super()`. - - - - Dictionary of amenities, each mapping to a dict of detail keys/values. - - - - Optional hours of operation by category (e.g. `{ default: "9 AM - 5 PM" }`). - - - - Agent display name (defaults to `"concierge"`). - - - - HTTP route for this agent (defaults to `"/concierge"`). - - - - List of services offered by the venue (required). - - - - Optional special instructions appended to the agent's instruction bullets. - - - - Name of the venue or business (required). - - - - Optional custom welcome message spoken as a non-bargeable static greeting. - - -#### Source - -[`src/prefabs/ConciergeAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/ConciergeAgent.ts) - -Line 16. diff --git a/fern/products/sdk-reference/typescript/agents/prefabs/faq-bot-agent/index.mdx b/fern/products/sdk-reference/typescript/agents/prefabs/faq-bot-agent/index.mdx index 8719613bfc..7bd86b0ac0 100644 --- a/fern/products/sdk-reference/typescript/agents/prefabs/faq-bot-agent/index.mdx +++ b/fern/products/sdk-reference/typescript/agents/prefabs/faq-bot-agent/index.mdx @@ -99,7 +99,7 @@ await agent.serve({ port: 3000 }); - Public accessor for the agent's POM as a `PromptObjectModel` instance. Python parity: `agent.pom` instance attribute (agent\_base.py line 209) is a `signalwire.pom.pom.PromptObjectModel` when `use_pom=True`, or `None` otherwise. This getter returns the equivalent TypeScript `PromptObjectModel` instance — callers can use `addSection`, `findSection`, `renderMarkdown`, `renderXml`, `toJson`, `toYaml` exactly as in Python. The instance returned is a fresh snapshot built from the current `PomBuilder` state, so mutating it does not feed back into the agent's internal builder. To mutate the agent's prompt, use `promptAddSection` / `promptAddToSection` / `promptAddSubsection`. + Public accessor for the agent's POM as a [PromptObjectModel](/docs/sdk-reference/reference/typescript/agents/pom/prompt-object-model) instance. Python parity: `agent.pom` instance attribute (agent\_base.py line 209) is a `signalwire.pom.pom.PromptObjectModel` when `use_pom=True`, or `None` otherwise. This getter returns the equivalent TypeScript `PromptObjectModel` instance — callers can use `addSection`, `findSection`, `renderMarkdown`, `renderXml`, `toJson`, `toYaml` exactly as in Python. The instance returned is a fresh snapshot built from the current `PomBuilder` state, so mutating it does not feed back into the agent's internal builder. To mutate the agent's prompt, use `promptAddSection` / `promptAddToSection` / `promptAddSubsection`. @@ -3691,6 +3691,98 @@ createFAQBotAgent(config: FAQBotConfig): FAQBotAgent Line 411. +## Interfaces + +### FAQBotConfig + +Configuration for the [FAQBotAgent](/docs/sdk-reference/reference/typescript/agents/prefabs/faq-bot-agent). + +#### Signature + +```typescript +interface FAQBotConfig +``` + +#### Properties + + + Additional AgentBase options forwarded to super(). + + + + Message spoken when no FAQ matches the query. + + + + Phone number to transfer to on escalation. If not set, escalate tool is not registered. + + + + List of FAQ entries for the knowledge base. + + + + Agent display name (defaults to `"faq_bot"`). + + + + Custom personality description for the agent's "Personality" prompt section. + + + + HTTP route for this agent (defaults to `"/faq"`). + + + + Whether to suggest related questions alongside a match. Default `true`. + + + + Minimum match score (0-1) for an FAQ to be considered a match. Default 0.5. + + +#### Source + +[`src/prefabs/FAQBotAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/FAQBotAgent.ts) + +Line 30. + +*** + +### FAQEntry + +A single frequently-asked-question entry consumed by [FAQBotAgent](/docs/sdk-reference/reference/typescript/agents/prefabs/faq-bot-agent). + +#### Signature + +```typescript +interface FAQEntry +``` + +#### Properties + + + The answer to provide when this FAQ matches. + + + + Taxonomy categories this FAQ belongs to (used for filtering and hints). + + + + Additional keywords to boost matching accuracy. + + + + The representative question text. + + +#### Source + +[`src/prefabs/FAQBotAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/FAQBotAgent.ts) + +Line 18. + ## Source [`src/prefabs/FAQBotAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/FAQBotAgent.ts) diff --git a/fern/products/sdk-reference/typescript/agents/prefabs/faq-bot-agent/index__2.mdx b/fern/products/sdk-reference/typescript/agents/prefabs/faq-bot-agent/index__2.mdx deleted file mode 100644 index 80bf24e23c..0000000000 --- a/fern/products/sdk-reference/typescript/agents/prefabs/faq-bot-agent/index__2.mdx +++ /dev/null @@ -1,106 +0,0 @@ ---- -slug: "/reference/typescript/agents/prefabs/faq-bot-agent/index__2" -title: "FAQBotAgent" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "module" - language: "typescript" - qualified_name: "agents.prefabs.FAQBotAgent" - parent: "prefabs" - module: "agents.prefabs" ---- -# `FAQBotAgent` - -## Interfaces - -### FAQBotConfig - -Configuration for the [FAQBotAgent](/docs/sdk-reference/reference/typescript/agents/prefabs/faq-bot-agent). - -#### Signature - -```typescript -interface FAQBotConfig -``` - -#### Properties - - - Additional AgentBase options forwarded to super(). - - - - Message spoken when no FAQ matches the query. - - - - Phone number to transfer to on escalation. If not set, escalate tool is not registered. - - - - List of FAQ entries for the knowledge base. - - - - Agent display name (defaults to `"faq_bot"`). - - - - Custom personality description for the agent's "Personality" prompt section. - - - - HTTP route for this agent (defaults to `"/faq"`). - - - - Whether to suggest related questions alongside a match. Default `true`. - - - - Minimum match score (0-1) for an FAQ to be considered a match. Default 0.5. - - -#### Source - -[`src/prefabs/FAQBotAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/FAQBotAgent.ts) - -Line 30. - -*** - -### FAQEntry - -A single frequently-asked-question entry consumed by [FAQBotAgent](/docs/sdk-reference/reference/typescript/agents/prefabs/faq-bot-agent). - -#### Signature - -```typescript -interface FAQEntry -``` - -#### Properties - - - The answer to provide when this FAQ matches. - - - - Taxonomy categories this FAQ belongs to (used for filtering and hints). - - - - Additional keywords to boost matching accuracy. - - - - The representative question text. - - -#### Source - -[`src/prefabs/FAQBotAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/FAQBotAgent.ts) - -Line 18. diff --git a/fern/products/sdk-reference/typescript/agents/prefabs/index.mdx b/fern/products/sdk-reference/typescript/agents/prefabs/index.mdx index e9c17dd803..d2e93421d2 100644 --- a/fern/products/sdk-reference/typescript/agents/prefabs/index.mdx +++ b/fern/products/sdk-reference/typescript/agents/prefabs/index.mdx @@ -44,20 +44,6 @@ module prefabs -## Modules - - - - - - - - - - - - - ## Source [`src/prefabs/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/index.ts) diff --git a/fern/products/sdk-reference/typescript/agents/prefabs/info-gatherer-agent/index.mdx b/fern/products/sdk-reference/typescript/agents/prefabs/info-gatherer-agent/index.mdx index 0119725fbe..bf322dcdc3 100644 --- a/fern/products/sdk-reference/typescript/agents/prefabs/info-gatherer-agent/index.mdx +++ b/fern/products/sdk-reference/typescript/agents/prefabs/info-gatherer-agent/index.mdx @@ -107,7 +107,7 @@ class InfoGathererAgent extends AgentBase - Public accessor for the agent's POM as a `PromptObjectModel` instance. Python parity: `agent.pom` instance attribute (agent\_base.py line 209) is a `signalwire.pom.pom.PromptObjectModel` when `use_pom=True`, or `None` otherwise. This getter returns the equivalent TypeScript `PromptObjectModel` instance — callers can use `addSection`, `findSection`, `renderMarkdown`, `renderXml`, `toJson`, `toYaml` exactly as in Python. The instance returned is a fresh snapshot built from the current `PomBuilder` state, so mutating it does not feed back into the agent's internal builder. To mutate the agent's prompt, use `promptAddSection` / `promptAddToSection` / `promptAddSubsection`. + Public accessor for the agent's POM as a [PromptObjectModel](/docs/sdk-reference/reference/typescript/agents/pom/prompt-object-model) instance. Python parity: `agent.pom` instance attribute (agent\_base.py line 209) is a `signalwire.pom.pom.PromptObjectModel` when `use_pom=True`, or `None` otherwise. This getter returns the equivalent TypeScript `PromptObjectModel` instance — callers can use `addSection`, `findSection`, `renderMarkdown`, `renderXml`, `toJson`, `toYaml` exactly as in Python. The instance returned is a fresh snapshot built from the current `PomBuilder` state, so mutating it does not feed back into the agent's internal builder. To mutate the agent's prompt, use `promptAddSection` / `promptAddToSection` / `promptAddSubsection`. @@ -3747,6 +3747,78 @@ type InfoGathererQuestionCallback = (queryParams: Record, bodyPa Line 31. +## Interfaces + +### InfoGathererConfig + +Configuration for the InfoGathererAgent. + +#### Signature + +```typescript +interface InfoGathererConfig +``` + +#### Properties + + + Additional AgentBase options forwarded to super(). + + + + Agent display name (defaults to `"info_gatherer"`). + + + + Convenience alternative to calling `setQuestionCallback()` after construction. Only consulted when `questions` is not provided. + + + + Optional list of questions to ask. When omitted, the agent runs in dynamic mode and resolves questions via the callback registered with `setQuestionCallback()` (or via `questionCallback` below). + + + + HTTP route for this agent (defaults to `"/info_gatherer"`). + + +#### Source + +[`src/prefabs/InfoGathererAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/InfoGathererAgent.ts) + +Line 38. + +*** + +### InfoGathererQuestion + +A single question in the information-gathering flow. + +#### Signature + +```typescript +interface InfoGathererQuestion +``` + +#### Properties + + + When true, the agent insists the caller confirms before submitting. + + + + Identifier used as the key when storing the caller's answer. + + + + The question text to ask the caller. + + +#### Source + +[`src/prefabs/InfoGathererAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/InfoGathererAgent.ts) + +Line 17. + ## Source [`src/prefabs/InfoGathererAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/InfoGathererAgent.ts) diff --git a/fern/products/sdk-reference/typescript/agents/prefabs/info-gatherer-agent/index__2.mdx b/fern/products/sdk-reference/typescript/agents/prefabs/info-gatherer-agent/index__2.mdx deleted file mode 100644 index 29588487a0..0000000000 --- a/fern/products/sdk-reference/typescript/agents/prefabs/info-gatherer-agent/index__2.mdx +++ /dev/null @@ -1,86 +0,0 @@ ---- -slug: "/reference/typescript/agents/prefabs/info-gatherer-agent/index__2" -title: "InfoGathererAgent" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "module" - language: "typescript" - qualified_name: "agents.prefabs.InfoGathererAgent" - parent: "prefabs" - module: "agents.prefabs" ---- -# `InfoGathererAgent` - -## Interfaces - -### InfoGathererConfig - -Configuration for the InfoGathererAgent. - -#### Signature - -```typescript -interface InfoGathererConfig -``` - -#### Properties - - - Additional AgentBase options forwarded to super(). - - - - Agent display name (defaults to `"info_gatherer"`). - - - - Convenience alternative to calling `setQuestionCallback()` after construction. Only consulted when `questions` is not provided. - - - - Optional list of questions to ask. When omitted, the agent runs in dynamic mode and resolves questions via the callback registered with `setQuestionCallback()` (or via `questionCallback` below). - - - - HTTP route for this agent (defaults to `"/info_gatherer"`). - - -#### Source - -[`src/prefabs/InfoGathererAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/InfoGathererAgent.ts) - -Line 38. - -*** - -### InfoGathererQuestion - -A single question in the information-gathering flow. - -#### Signature - -```typescript -interface InfoGathererQuestion -``` - -#### Properties - - - When true, the agent insists the caller confirms before submitting. - - - - Identifier used as the key when storing the caller's answer. - - - - The question text to ask the caller. - - -#### Source - -[`src/prefabs/InfoGathererAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/InfoGathererAgent.ts) - -Line 17. diff --git a/fern/products/sdk-reference/typescript/agents/prefabs/receptionist-agent/index.mdx b/fern/products/sdk-reference/typescript/agents/prefabs/receptionist-agent/index.mdx index 0ca1a179af..c03d2ae356 100644 --- a/fern/products/sdk-reference/typescript/agents/prefabs/receptionist-agent/index.mdx +++ b/fern/products/sdk-reference/typescript/agents/prefabs/receptionist-agent/index.mdx @@ -89,7 +89,7 @@ await agent.serve({ port: 3000 }); - Public accessor for the agent's POM as a `PromptObjectModel` instance. Python parity: `agent.pom` instance attribute (agent\_base.py line 209) is a `signalwire.pom.pom.PromptObjectModel` when `use_pom=True`, or `None` otherwise. This getter returns the equivalent TypeScript `PromptObjectModel` instance — callers can use `addSection`, `findSection`, `renderMarkdown`, `renderXml`, `toJson`, `toYaml` exactly as in Python. The instance returned is a fresh snapshot built from the current `PomBuilder` state, so mutating it does not feed back into the agent's internal builder. To mutate the agent's prompt, use `promptAddSection` / `promptAddToSection` / `promptAddSubsection`. + Public accessor for the agent's POM as a [PromptObjectModel](/docs/sdk-reference/reference/typescript/agents/pom/prompt-object-model) instance. Python parity: `agent.pom` instance attribute (agent\_base.py line 209) is a `signalwire.pom.pom.PromptObjectModel` when `use_pom=True`, or `None` otherwise. This getter returns the equivalent TypeScript `PromptObjectModel` instance — callers can use `addSection`, `findSection`, `renderMarkdown`, `renderXml`, `toJson`, `toYaml` exactly as in Python. The instance returned is a fresh snapshot built from the current `PomBuilder` state, so mutating it does not feed back into the agent's internal builder. To mutate the agent's prompt, use `promptAddSection` / `promptAddToSection` / `promptAddSubsection`. @@ -3680,6 +3680,94 @@ createReceptionistAgent(config: ReceptionistConfig): ReceptionistAgent Line 391. +## Interfaces + +### ReceptionistConfig + +Configuration for the [ReceptionistAgent](/docs/sdk-reference/reference/typescript/agents/prefabs/receptionist-agent). + +#### Signature + +```typescript +interface ReceptionistConfig +``` + +#### Properties + + + Additional AgentBase options forwarded to super(). + + + + Whether visitor check-in functionality is enabled. Default `false`. + + + + Optional company name. Appended to the greeting when provided. + + + + Departments the agent can transfer callers to. + + + + Initial greeting message. Defaults to the Python receptionist greeting. + + + + Agent display name (defaults to `"receptionist"`). + + + + Callback fired when a visitor checks in. + + + + HTTP route for this agent (defaults to `"/receptionist"`). + + + + Voice identifier passed to `addLanguage`. Defaults to `"rime.spore"`. + + +#### Source + +[`src/prefabs/ReceptionistAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/ReceptionistAgent.ts) + +Line 27. + +*** + +### ReceptionistDepartment + +A department the receptionist can route callers to. + +#### Signature + +```typescript +interface ReceptionistDepartment +``` + +#### Properties + + + Description of the department's purpose (shown to the AI). + + + + Department identifier (e.g. `"sales"`, `"support"`). + + + + Phone number (or SIP address) used by `transfer_call`. + + +#### Source + +[`src/prefabs/ReceptionistAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/ReceptionistAgent.ts) + +Line 17. + ## Source [`src/prefabs/ReceptionistAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/ReceptionistAgent.ts) diff --git a/fern/products/sdk-reference/typescript/agents/prefabs/receptionist-agent/index__2.mdx b/fern/products/sdk-reference/typescript/agents/prefabs/receptionist-agent/index__2.mdx deleted file mode 100644 index 44ee85bce5..0000000000 --- a/fern/products/sdk-reference/typescript/agents/prefabs/receptionist-agent/index__2.mdx +++ /dev/null @@ -1,102 +0,0 @@ ---- -slug: "/reference/typescript/agents/prefabs/receptionist-agent/index__2" -title: "ReceptionistAgent" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "module" - language: "typescript" - qualified_name: "agents.prefabs.ReceptionistAgent" - parent: "prefabs" - module: "agents.prefabs" ---- -# `ReceptionistAgent` - -## Interfaces - -### ReceptionistConfig - -Configuration for the [ReceptionistAgent](/docs/sdk-reference/reference/typescript/agents/prefabs/receptionist-agent). - -#### Signature - -```typescript -interface ReceptionistConfig -``` - -#### Properties - - - Additional AgentBase options forwarded to super(). - - - - Whether visitor check-in functionality is enabled. Default `false`. - - - - Optional company name. Appended to the greeting when provided. - - - - Departments the agent can transfer callers to. - - - - Initial greeting message. Defaults to the Python receptionist greeting. - - - - Agent display name (defaults to `"receptionist"`). - - - - Callback fired when a visitor checks in. - - - - HTTP route for this agent (defaults to `"/receptionist"`). - - - - Voice identifier passed to `addLanguage`. Defaults to `"rime.spore"`. - - -#### Source - -[`src/prefabs/ReceptionistAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/ReceptionistAgent.ts) - -Line 27. - -*** - -### ReceptionistDepartment - -A department the receptionist can route callers to. - -#### Signature - -```typescript -interface ReceptionistDepartment -``` - -#### Properties - - - Description of the department's purpose (shown to the AI). - - - - Department identifier (e.g. `"sales"`, `"support"`). - - - - Phone number (or SIP address) used by `transfer_call`. - - -#### Source - -[`src/prefabs/ReceptionistAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/ReceptionistAgent.ts) - -Line 17. diff --git a/fern/products/sdk-reference/typescript/agents/prefabs/survey-agent/index.mdx b/fern/products/sdk-reference/typescript/agents/prefabs/survey-agent/index.mdx index 3dc1c36815..cbbf0d1410 100644 --- a/fern/products/sdk-reference/typescript/agents/prefabs/survey-agent/index.mdx +++ b/fern/products/sdk-reference/typescript/agents/prefabs/survey-agent/index.mdx @@ -101,7 +101,7 @@ await agent.serve({ port: 3000 }); - Public accessor for the agent's POM as a `PromptObjectModel` instance. Python parity: `agent.pom` instance attribute (agent\_base.py line 209) is a `signalwire.pom.pom.PromptObjectModel` when `use_pom=True`, or `None` otherwise. This getter returns the equivalent TypeScript `PromptObjectModel` instance — callers can use `addSection`, `findSection`, `renderMarkdown`, `renderXml`, `toJson`, `toYaml` exactly as in Python. The instance returned is a fresh snapshot built from the current `PomBuilder` state, so mutating it does not feed back into the agent's internal builder. To mutate the agent's prompt, use `promptAddSection` / `promptAddToSection` / `promptAddSubsection`. + Public accessor for the agent's POM as a [PromptObjectModel](/docs/sdk-reference/reference/typescript/agents/pom/prompt-object-model) instance. Python parity: `agent.pom` instance attribute (agent\_base.py line 209) is a `signalwire.pom.pom.PromptObjectModel` when `use_pom=True`, or `None` otherwise. This getter returns the equivalent TypeScript `PromptObjectModel` instance — callers can use `addSection`, `findSection`, `renderMarkdown`, `renderXml`, `toJson`, `toYaml` exactly as in Python. The instance returned is a fresh snapshot built from the current `PomBuilder` state, so mutating it does not feed back into the agent's internal builder. To mutate the agent's prompt, use `promptAddSection` / `promptAddToSection` / `promptAddSubsection`. @@ -3705,6 +3705,118 @@ createSurveyAgent(config: SurveyConfig): SurveyAgent Line 667. +## Interfaces + +### SurveyConfig + +Configuration for the [SurveyAgent](/docs/sdk-reference/reference/typescript/agents/prefabs/survey-agent). + +#### Signature + +```typescript +interface SurveyConfig +``` + +#### Properties + + + Additional AgentBase options forwarded to super(). + + + + Brand or company name the agent represents (matches Python `brand_name`). + + + + Message after the survey is complete (matches Python `conclusion`). + + + + Opening message before the first question (matches Python `introduction`). + + + + Maximum number of times to retry invalid answers. Defaults to 2. + + + + Agent display name (defaults to `"survey"`). + + + + Callback fired when the survey is finished. + + + + Ordered list of survey questions. + + + + HTTP route for this agent (defaults to `"/survey"`). + + + + Human-readable survey name, used in prompts and global data. + + +#### Source + +[`src/prefabs/SurveyAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/SurveyAgent.ts) + +Line 52. + +*** + +### SurveyQuestion + +A single survey question consumed by [SurveyAgent](/docs/sdk-reference/reference/typescript/agents/prefabs/survey-agent). + +#### Signature + +```typescript +interface SurveyQuestion +``` + +#### Properties + + + Unique question identifier. + + + + Next question ID after this one. + + + + Options for multiple\_choice questions. + + + + Points awarded for answers. + + + + Whether the question requires an answer. Defaults to `true`. Mirrors the Python `required` flag on each question dict. + + + + For `rating` questions, the upper bound of the scale (1..scale). Defaults to 5 (matching the Python prefab) when unspecified. + + + + The question text to ask the caller. + + + + Question type determines validation and display. + + +#### Source + +[`src/prefabs/SurveyAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/SurveyAgent.ts) + +Line 17. + ## Source [`src/prefabs/SurveyAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/SurveyAgent.ts) diff --git a/fern/products/sdk-reference/typescript/agents/prefabs/survey-agent/index__2.mdx b/fern/products/sdk-reference/typescript/agents/prefabs/survey-agent/index__2.mdx deleted file mode 100644 index 35c4167c16..0000000000 --- a/fern/products/sdk-reference/typescript/agents/prefabs/survey-agent/index__2.mdx +++ /dev/null @@ -1,126 +0,0 @@ ---- -slug: "/reference/typescript/agents/prefabs/survey-agent/index__2" -title: "SurveyAgent" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "module" - language: "typescript" - qualified_name: "agents.prefabs.SurveyAgent" - parent: "prefabs" - module: "agents.prefabs" ---- -# `SurveyAgent` - -## Interfaces - -### SurveyConfig - -Configuration for the [SurveyAgent](/docs/sdk-reference/reference/typescript/agents/prefabs/survey-agent). - -#### Signature - -```typescript -interface SurveyConfig -``` - -#### Properties - - - Additional AgentBase options forwarded to super(). - - - - Brand or company name the agent represents (matches Python `brand_name`). - - - - Message after the survey is complete (matches Python `conclusion`). - - - - Opening message before the first question (matches Python `introduction`). - - - - Maximum number of times to retry invalid answers. Defaults to 2. - - - - Agent display name (defaults to `"survey"`). - - - - Callback fired when the survey is finished. - - - - Ordered list of survey questions. - - - - HTTP route for this agent (defaults to `"/survey"`). - - - - Human-readable survey name, used in prompts and global data. - - -#### Source - -[`src/prefabs/SurveyAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/SurveyAgent.ts) - -Line 52. - -*** - -### SurveyQuestion - -A single survey question consumed by [SurveyAgent](/docs/sdk-reference/reference/typescript/agents/prefabs/survey-agent). - -#### Signature - -```typescript -interface SurveyQuestion -``` - -#### Properties - - - Unique question identifier. - - - - Next question ID after this one. - - - - Options for multiple\_choice questions. - - - - Points awarded for answers. - - - - Whether the question requires an answer. Defaults to `true`. Mirrors the Python `required` flag on each question dict. - - - - For `rating` questions, the upper bound of the scale (1..scale). Defaults to 5 (matching the Python prefab) when unspecified. - - - - The question text to ask the caller. - - - - Question type determines validation and display. - - -#### Source - -[`src/prefabs/SurveyAgent.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/prefabs/SurveyAgent.ts) - -Line 17. diff --git a/fern/products/sdk-reference/typescript/agents/schema-utils/index.mdx b/fern/products/sdk-reference/typescript/agents/schema-utils/index.mdx index c900e26432..6886542d6c 100644 --- a/fern/products/sdk-reference/typescript/agents/schema-utils/index.mdx +++ b/fern/products/sdk-reference/typescript/agents/schema-utils/index.mdx @@ -297,6 +297,66 @@ validateVerb(verbName: string, config: unknown): ValidationResult Line 181. +## Interfaces + +### ValidationResult + +Result of validating a SWML document. + +#### Signature + +```typescript +interface ValidationResult +``` + +#### Properties + + + List of human-readable error messages; empty when valid. + + + + Whether the document passed all validation checks. + + +#### Source + +[`src/SchemaUtils.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SchemaUtils.ts) + +Line 12. + +*** + +### VerbDefinition + +A verb definition extracted from the schema. + +#### Signature + +```typescript +interface VerbDefinition +``` + +#### Properties + + + The raw JSON Schema definition object for this verb. + + + + The verb name as used in SWML (e.g. "answer", "hangup", "sip\_refer"). + + + + The PascalCase schema definition name (e.g. "Answer", "Hangup", "SIPRefer"). + + +#### Source + +[`src/SchemaUtils.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SchemaUtils.ts) + +Line 20. + ## Source [`src/SchemaUtils.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SchemaUtils.ts) diff --git a/fern/products/sdk-reference/typescript/agents/schema-utils/index__2.mdx b/fern/products/sdk-reference/typescript/agents/schema-utils/index__2.mdx deleted file mode 100644 index 021fa2de09..0000000000 --- a/fern/products/sdk-reference/typescript/agents/schema-utils/index__2.mdx +++ /dev/null @@ -1,74 +0,0 @@ ---- -slug: "/reference/typescript/agents/schema-utils/index__2" -title: "SchemaUtils" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "module" - language: "typescript" - qualified_name: "agents.SchemaUtils" - parent: "agents" - module: "agents" ---- -# `SchemaUtils` - -## Interfaces - -### ValidationResult - -Result of validating a SWML document. - -#### Signature - -```typescript -interface ValidationResult -``` - -#### Properties - - - List of human-readable error messages; empty when valid. - - - - Whether the document passed all validation checks. - - -#### Source - -[`src/SchemaUtils.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SchemaUtils.ts) - -Line 12. - -*** - -### VerbDefinition - -A verb definition extracted from the schema. - -#### Signature - -```typescript -interface VerbDefinition -``` - -#### Properties - - - The raw JSON Schema definition object for this verb. - - - - The verb name as used in SWML (e.g. "answer", "hangup", "sip\_refer"). - - - - The PascalCase schema definition name (e.g. "Answer", "Hangup", "SIPRefer"). - - -#### Source - -[`src/SchemaUtils.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SchemaUtils.ts) - -Line 20. diff --git a/fern/products/sdk-reference/typescript/agents/serverless-adapter/index.mdx b/fern/products/sdk-reference/typescript/agents/serverless-adapter/index.mdx index edc17e0743..1fc33edbe3 100644 --- a/fern/products/sdk-reference/typescript/agents/serverless-adapter/index.mdx +++ b/fern/products/sdk-reference/typescript/agents/serverless-adapter/index.mdx @@ -305,6 +305,90 @@ type ServerlessPlatform = "lambda" | "gcf" | "azure" | "cgi" | "auto" Line 13. +## Interfaces + +### ServerlessEvent + +Normalized incoming event from a serverless platform. + +#### Signature + +```typescript +interface ServerlessEvent +``` + +#### Properties + + + Request body, either raw JSON string or parsed object. + + + + Request headers as key-value pairs. + + + + HTTP method (AWS Lambda style). + + + + HTTP method (GCF/Azure style). + + + + Request path. + + + + Query string parameters as key-value pairs. + + + + Raw request path (AWS API Gateway v2). + + + + Platform-specific request context metadata. + + +#### Source + +[`src/ServerlessAdapter.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ServerlessAdapter.ts) + +Line 16. + +*** + +### ServerlessResponse + +Normalized outgoing response returned to a serverless platform. + +#### Signature + +```typescript +interface ServerlessResponse +``` + +#### Properties + + + Response body as a string. + + + + Response headers as key-value pairs. + + + + HTTP status code. + + +#### Source + +[`src/ServerlessAdapter.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ServerlessAdapter.ts) + +Line 36. + ## Source [`src/ServerlessAdapter.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ServerlessAdapter.ts) diff --git a/fern/products/sdk-reference/typescript/agents/serverless-adapter/index__2.mdx b/fern/products/sdk-reference/typescript/agents/serverless-adapter/index__2.mdx deleted file mode 100644 index 07eb0d90a2..0000000000 --- a/fern/products/sdk-reference/typescript/agents/serverless-adapter/index__2.mdx +++ /dev/null @@ -1,98 +0,0 @@ ---- -slug: "/reference/typescript/agents/serverless-adapter/index__2" -title: "ServerlessAdapter" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "module" - language: "typescript" - qualified_name: "agents.ServerlessAdapter" - parent: "agents" - module: "agents" ---- -# `ServerlessAdapter` - -## Interfaces - -### ServerlessEvent - -Normalized incoming event from a serverless platform. - -#### Signature - -```typescript -interface ServerlessEvent -``` - -#### Properties - - - Request body, either raw JSON string or parsed object. - - - - Request headers as key-value pairs. - - - - HTTP method (AWS Lambda style). - - - - HTTP method (GCF/Azure style). - - - - Request path. - - - - Query string parameters as key-value pairs. - - - - Raw request path (AWS API Gateway v2). - - - - Platform-specific request context metadata. - - -#### Source - -[`src/ServerlessAdapter.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ServerlessAdapter.ts) - -Line 16. - -*** - -### ServerlessResponse - -Normalized outgoing response returned to a serverless platform. - -#### Signature - -```typescript -interface ServerlessResponse -``` - -#### Properties - - - Response body as a string. - - - - Response headers as key-value pairs. - - - - HTTP status code. - - -#### Source - -[`src/ServerlessAdapter.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/ServerlessAdapter.ts) - -Line 36. diff --git a/fern/products/sdk-reference/typescript/agents/session-manager/index.mdx b/fern/products/sdk-reference/typescript/agents/session-manager/index.mdx index 1ff0a75ee5..4edc161701 100644 --- a/fern/products/sdk-reference/typescript/agents/session-manager/index.mdx +++ b/fern/products/sdk-reference/typescript/agents/session-manager/index.mdx @@ -475,6 +475,38 @@ validateToolToken(functionName: string, token: string, callId: string): boolean Line 156. +## Interfaces + +### DebugTokenResult + +Decoded token debug info matching the Python SDK's nested return structure. + +#### Signature + +```typescript +interface DebugTokenResult +``` + +#### Properties + + + + + + + + + + + + + +#### Source + +[`src/SessionManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SessionManager.ts) + +Line 12. + ## Source [`src/SessionManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SessionManager.ts) diff --git a/fern/products/sdk-reference/typescript/agents/session-manager/index__2.mdx b/fern/products/sdk-reference/typescript/agents/session-manager/index__2.mdx deleted file mode 100644 index c2799927f6..0000000000 --- a/fern/products/sdk-reference/typescript/agents/session-manager/index__2.mdx +++ /dev/null @@ -1,46 +0,0 @@ ---- -slug: "/reference/typescript/agents/session-manager/index__2" -title: "SessionManager" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "module" - language: "typescript" - qualified_name: "agents.SessionManager" - parent: "agents" - module: "agents" ---- -# `SessionManager` - -## Interfaces - -### DebugTokenResult - -Decoded token debug info matching the Python SDK's nested return structure. - -#### Signature - -```typescript -interface DebugTokenResult -``` - -#### Properties - - - - - - - - - - - - - -#### Source - -[`src/SessionManager.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SessionManager.ts) - -Line 12. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/api-ninjas-trivia/api-ninjas-trivia-skill/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/api-ninjas-trivia/api-ninjas-trivia-skill/index.mdx deleted file mode 100644 index 79eb425b75..0000000000 --- a/fern/products/sdk-reference/typescript/agents/skills/builtin/api-ninjas-trivia/api-ninjas-trivia-skill/index.mdx +++ /dev/null @@ -1,709 +0,0 @@ ---- -slug: "/reference/typescript/agents/skills/builtin/api-ninjas-trivia/api-ninjas-trivia-skill" -title: "ApiNinjasTriviaSkill" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "skills.builtin.api_ninjas_trivia.ApiNinjasTriviaSkill" - parent: "skills.builtin.api_ninjas_trivia" - module: "agents.skills.builtin.api_ninjas_trivia" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/api_ninjas_trivia.ts" ---- -# `ApiNinjasTriviaSkill` - -Fetches trivia questions from the API Ninjas service. - -Tier 2 built-in skill. Requires the `API_NINJAS_KEY` environment variable. -Supports optional `default_category` and `reveal_answer` config options. - -## Signature - -```typescript -class ApiNinjasTriviaSkill extends SkillBase -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/agents/skills/skill-base) - -## Examples - -```typescript -agent.addSkill('api_ninjas_trivia', { default_category: 'sciencenature' }); -``` - -## Properties - - - Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. - - - - Configuration options provided at construction time. - - - - Unique identifier for this skill instance (includes timestamp and random bytes). - - - - Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. - - - - Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. - - - - Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. - - - - Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. - - - - Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. - - - - Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. - - - - The registered name of this skill type. - - - - Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. - - - - Additional SWAIG fields extracted from config, merged into tool definitions. - - -## Methods - -### cleanup - -Cleanup resources. Called when the skill is removed from an agent. - -#### Signature - -```typescript -cleanup(): Promise -``` - -#### Returns - -`Promise` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 469. - -*** - -### constructor - -Create a new skill instance. - -Python parity: `core/skill_base.py:32-43`. -Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` -is left as `None` on the subclass. TS throws the equivalent when the static -defaults haven't been overridden. - -#### Signature - -```typescript -constructor(config?: SkillConfig): ApiNinjasTriviaSkill -``` - -#### Parameters - - - Optional configuration key-value pairs (Python: `params`). - - -#### Returns - -`ApiNinjasTriviaSkill` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 282. - -*** - -### defineTool - -Imperatively register a tool with this skill. - -Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. -Merges `this.swaigFields` into the tool definition (explicit fields on -`toolDef` take precedence), then pushes the result into `_dynamicTools` -so the default `getTools()` returns it at SWML render time. - -Intended for skills whose tool shape depends on config evaluated at -`setup()` time. Skills with a static tool list should override -`getTools()` instead. - -#### Signature - -```typescript -defineTool(toolDef: SkillToolDefinition): void -``` - -#### Parameters - - - The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 351. - -*** - -### getAgent - -Return the agent that owns this skill, asserting it is non-null. -Equivalent to accessing `self.agent` in Python, where the agent reference -is always set before `setup()` is called. - -The SkillManager lifecycle guarantees that `setAgent()` is called before -`setup()`, so this method is safe to use inside `setup()` and in any -tool handler invoked during an active agent session. - -#### Signature - -```typescript -getAgent(): AgentBase -``` - -#### Returns - -`AgentBase` — The owning `AgentBase` instance. - -#### Throws - -- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 261. - -*** - -### getConfig - -Get a configuration value by key, falling back to a default if not set. - -#### Signature - -```typescript -getConfig(key: string, defaultValue?: T): T -``` - -#### Type Parameters - - - -#### Parameters - - - The configuration key to look up. - - - - Value to return if the key is not present. - - -#### Returns - -`T` — The configuration value cast to type T, or the default value. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 524. - -*** - -### getDataMapTools - -Optional DataMap-style tool definitions. Skills that build their own -SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them -here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. - -Python equivalent: the direct `self.agent.register_swaig_function(fn)` -call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). -Default returns `[]` — skills using only the declarative `getTools()` path -do not need to override this. - -#### Signature - -```typescript -getDataMapTools(): Record[] -``` - -#### Returns - -`Record[]` — Array of fully-built SWAIG function dicts. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 372. - -*** - -### getGlobalData - -Get global data to merge into the agent's global data store. - -#### Signature - -```typescript -getGlobalData(): Record -``` - -#### Returns - -`Record` — Key-value pairs to be merged into the agent's global data. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 410. - -*** - -### getHints - -#### Signature - -```typescript -getHints(): string[] -``` - -#### Returns - -`string[]` — Speech recognition hints for trivia-related keywords. - -#### Source - -[`src/skills/builtin/api_ninjas_trivia.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/api_ninjas_trivia.ts) - -Line 278. - -*** - -### getInstanceKey - -Produce a compound instance key matching Python `get_instance_key` -(skill.py:139-146): `f"{SKILL_NAME}_{self.tool_name}"` with -`tool_name` defaulting to `'get_trivia'` (skill.py:95). The base -`SkillBase.getInstanceKey` uses `this.skillName` as the fallback, -so we override to match Python's `'get_trivia'` default. - -#### Signature - -```typescript -getInstanceKey(): string -``` - -#### Returns - -`string` - -#### Source - -[`src/skills/builtin/api_ninjas_trivia.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/api_ninjas_trivia.ts) - -Line 114. - -*** - -### getParameterSchema - -Get the parameter schema for this skill class, describing all accepted configuration options. -Subclasses should override and call `super.getParameterSchema()` to include base parameters. - -Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): -returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a -`tool_name` entry with `default: cls.SKILL_NAME` for classes with -`SUPPORTS_MULTIPLE_INSTANCES = true`. - -**Modifiers:** `static` - -#### Signature - -```typescript -getParameterSchema(): Record -``` - -#### Returns - -`Record` — Record mapping parameter names to their schema entries. - -#### Source - -[`src/skills/builtin/api_ninjas_trivia.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/api_ninjas_trivia.ts) - -Line 68. - -*** - -### getPromptSections - -Get prompt sections to inject into the agent's system prompt. -Respects the `skip_prompt` config option — returns `[]` if set to `true`. -Subclasses should override `_getPromptSections()` instead of this method. - -#### Signature - -```typescript -getPromptSections(): SkillPromptSection[] -``` - -#### Returns - -`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 382. - -*** - -### getSkillData - -Read this skill's data from a raw call data object's global\_data. - -#### Signature - -```typescript -getSkillData(rawData: Record): Record -``` - -#### Parameters - - - The raw request data containing global\_data. - - -#### Returns - -`Record` — The skill's stored data, or an empty object if not found. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 450. - -*** - -### getSkillNamespace - -Get the namespaced key for storing per-skill data in global\_data. - -#### Signature - -```typescript -getSkillNamespace(): string -``` - -#### Returns - -`string` — A string like "skill:datetime" or "skill:my\_prefix". - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 440. - -*** - -### getTools - -#### Signature - -```typescript -getTools(): SkillToolDefinition[] -``` - -#### Returns - -`SkillToolDefinition[]` — A single trivia tool (configurable name) that fetches a random trivia question with optional category. - -#### Source - -[`src/skills/builtin/api_ninjas_trivia.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/api_ninjas_trivia.ts) - -Line 120. - -*** - -### hasAllEnvVars - -Check if all required environment variables are present. -Convenience wrapper around `validateEnvVars()` that returns a boolean, -matching the Python `validate_env_vars() -> bool` return type. - -#### Signature - -```typescript -hasAllEnvVars(): boolean -``` - -#### Returns - -`boolean` — `true` if all required env vars are set, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 544. - -*** - -### hasAllPackages - -Check if all required packages declared in the manifest are available. -Convenience wrapper around `validatePackages()` that returns a boolean, -matching the Python `validate_packages() -> bool` return type. - -#### Signature - -```typescript -hasAllPackages(): Promise -``` - -#### Returns - -`Promise` — `true` if all required packages are importable, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 579. - -*** - -### isInitialized - -Check if the skill has been initialized by the SkillManager. - -#### Signature - -```typescript -isInitialized(): boolean -``` - -#### Returns - -`boolean` — True if setup() has completed and the skill is marked initialized. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 507. - -*** - -### markInitialized - -Mark the skill as initialized (called by SkillManager). - -#### Signature - -```typescript -markInitialized(): void -``` - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 514. - -*** - -### setAgent - -Set the agent reference for this skill. -Called by the SkillManager/AgentBase when the skill is attached to an agent. -Python equivalent: `self.agent = agent` in `__init__`. - -#### Signature - -```typescript -setAgent(agent: AgentBase): void -``` - -#### Parameters - - - The agent that owns this skill. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 534. - -*** - -### setup - -Setup the skill. Called when the skill is added to an agent. -Override to perform initialization (API connections, config validation, etc.) - -#### Signature - -```typescript -setup(): Promise -``` - -#### Returns - -`Promise` — `true` if setup succeeded, `false` otherwise. Python equivalent: abstract `setup() -> bool`. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 313. - -*** - -### updateSkillData - -Update this skill's namespaced data on a FunctionResult via updateGlobalData. - -#### Signature - -```typescript -updateSkillData( - result: FunctionResult, - data: Record -): FunctionResult -``` - -#### Parameters - - - The FunctionResult to update. - - - - The data to store under this skill's namespace. - - -#### Returns - -`FunctionResult` — The FunctionResult for chaining. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 462. - -*** - -### validateEnvVars - -Validate that all required environment variables declared on the skill class -are set in the current process environment. - -Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` -directly. TS reads the same static from the class. - -Returns the list of missing variable names so callers can produce actionable -error messages. This differs from Python's `validate_env_vars() -> bool` -return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/agents/skills/builtin/api-ninjas-trivia/api-ninjas-trivia-skill#has-all-env-vars) is the boolean equivalent. - -#### Signature - -```typescript -validateEnvVars(): string[] -``` - -#### Returns - -`string[]` — Array of missing environment variable names (empty if all are present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 486. - -*** - -### validatePackages - -Validate that all required packages declared on the skill class can be imported. - -Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` -directly and tries `importlib.import_module(pkg)` for each; TS does the -equivalent with a dynamic `import()`. - -#### Signature - -```typescript -validatePackages(): Promise -``` - -#### Returns - -`Promise` — Array of package names that could not be imported (empty if all present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 557. - -## Source - -[`src/skills/builtin/api_ninjas_trivia.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/api_ninjas_trivia.ts) - -Line 59. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/api-ninjas-trivia/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/api-ninjas-trivia/index.mdx index 9ca75100cf..e7ee74c033 100644 --- a/fern/products/sdk-reference/typescript/agents/skills/builtin/api-ninjas-trivia/index.mdx +++ b/fern/products/sdk-reference/typescript/agents/skills/builtin/api-ninjas-trivia/index.mdx @@ -5,7 +5,7 @@ sdk_label: "TypeScript SDK" icon: "typescript" lustri: auto_generated: true - kind: "module" + kind: "class" language: "typescript" qualified_name: "skills.builtin.api_ninjas_trivia" parent: "skills.builtin" @@ -14,19 +14,693 @@ lustri: --- # `api_ninjas_trivia` +Fetches trivia questions from the API Ninjas service. + +Tier 2 built-in skill. Requires the `API_NINJAS_KEY` environment variable. +Supports optional `default_category` and `reveal_answer` config options. + ## Signature ```typescript -module api_ninjas_trivia +class ApiNinjasTriviaSkill extends SkillBase +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/agents/skills/skill-base) + +## Examples + +```typescript +agent.addSkill('api_ninjas_trivia', { default_category: 'sciencenature' }); +``` + +## Properties + + + Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. + + + + Configuration options provided at construction time. + + + + Unique identifier for this skill instance (includes timestamp and random bytes). + + + + Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. + + + + Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. + + + + Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. + + + + Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. + + + + Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. + + + + Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. + + + + The registered name of this skill type. + + + + Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. + + + + Additional SWAIG fields extracted from config, merged into tool definitions. + + +## Methods + +### cleanup + +Cleanup resources. Called when the skill is removed from an agent. + +#### Signature + +```typescript +cleanup(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 469. + +*** + +### constructor + +Create a new skill instance. + +Python parity: `core/skill_base.py:32-43`. +Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` +is left as `None` on the subclass. TS throws the equivalent when the static +defaults haven't been overridden. + +#### Signature + +```typescript +constructor(config?: SkillConfig): ApiNinjasTriviaSkill ``` -## Classes +#### Parameters + + + Optional configuration key-value pairs (Python: `params`). + + +#### Returns + +`ApiNinjasTriviaSkill` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 282. + +*** + +### defineTool + +Imperatively register a tool with this skill. + +Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. +Merges `this.swaigFields` into the tool definition (explicit fields on +`toolDef` take precedence), then pushes the result into `_dynamicTools` +so the default `getTools()` returns it at SWML render time. + +Intended for skills whose tool shape depends on config evaluated at +`setup()` time. Skills with a static tool list should override +`getTools()` instead. + +#### Signature + +```typescript +defineTool(toolDef: SkillToolDefinition): void +``` + +#### Parameters + + + The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 351. + +*** + +### getAgent + +Return the agent that owns this skill, asserting it is non-null. +Equivalent to accessing `self.agent` in Python, where the agent reference +is always set before `setup()` is called. + +The SkillManager lifecycle guarantees that `setAgent()` is called before +`setup()`, so this method is safe to use inside `setup()` and in any +tool handler invoked during an active agent session. + +#### Signature + +```typescript +getAgent(): AgentBase +``` + +#### Returns + +`AgentBase` — The owning `AgentBase` instance. + +#### Throws + +- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 261. + +*** + +### getConfig + +Get a configuration value by key, falling back to a default if not set. + +#### Signature + +```typescript +getConfig(key: string, defaultValue?: T): T +``` + +#### Type Parameters + + + +#### Parameters + + + The configuration key to look up. + + + + Value to return if the key is not present. + + +#### Returns + +`T` — The configuration value cast to type T, or the default value. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 524. + +*** + +### getDataMapTools + +Optional DataMap-style tool definitions. Skills that build their own +SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them +here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. + +Python equivalent: the direct `self.agent.register_swaig_function(fn)` +call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). +Default returns `[]` — skills using only the declarative `getTools()` path +do not need to override this. + +#### Signature + +```typescript +getDataMapTools(): Record[] +``` + +#### Returns + +`Record[]` — Array of fully-built SWAIG function dicts. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 372. + +*** + +### getGlobalData + +Get global data to merge into the agent's global data store. + +#### Signature + +```typescript +getGlobalData(): Record +``` + +#### Returns + +`Record` — Key-value pairs to be merged into the agent's global data. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 410. + +*** + +### getHints + +#### Signature + +```typescript +getHints(): string[] +``` + +#### Returns + +`string[]` — Speech recognition hints for trivia-related keywords. + +#### Source + +[`src/skills/builtin/api_ninjas_trivia.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/api_ninjas_trivia.ts) + +Line 278. + +*** + +### getInstanceKey + +Produce a compound instance key matching Python `get_instance_key` +(skill.py:139-146): `f"{SKILL_NAME}_{self.tool_name}"` with +`tool_name` defaulting to `'get_trivia'` (skill.py:95). The base +`SkillBase.getInstanceKey` uses `this.skillName` as the fallback, +so we override to match Python's `'get_trivia'` default. + +#### Signature + +```typescript +getInstanceKey(): string +``` + +#### Returns + +`string` + +#### Source + +[`src/skills/builtin/api_ninjas_trivia.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/api_ninjas_trivia.ts) + +Line 114. + +*** + +### getParameterSchema + +Get the parameter schema for this skill class, describing all accepted configuration options. +Subclasses should override and call `super.getParameterSchema()` to include base parameters. + +Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): +returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a +`tool_name` entry with `default: cls.SKILL_NAME` for classes with +`SUPPORTS_MULTIPLE_INSTANCES = true`. + +**Modifiers:** `static` + +#### Signature + +```typescript +getParameterSchema(): Record +``` + +#### Returns + +`Record` — Record mapping parameter names to their schema entries. + +#### Source + +[`src/skills/builtin/api_ninjas_trivia.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/api_ninjas_trivia.ts) + +Line 68. + +*** + +### getPromptSections + +Get prompt sections to inject into the agent's system prompt. +Respects the `skip_prompt` config option — returns `[]` if set to `true`. +Subclasses should override `_getPromptSections()` instead of this method. + +#### Signature + +```typescript +getPromptSections(): SkillPromptSection[] +``` + +#### Returns + +`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 382. + +*** + +### getSkillData + +Read this skill's data from a raw call data object's global\_data. + +#### Signature + +```typescript +getSkillData(rawData: Record): Record +``` + +#### Parameters + + + The raw request data containing global\_data. + + +#### Returns + +`Record` — The skill's stored data, or an empty object if not found. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 450. + +*** + +### getSkillNamespace + +Get the namespaced key for storing per-skill data in global\_data. + +#### Signature + +```typescript +getSkillNamespace(): string +``` + +#### Returns + +`string` — A string like "skill:datetime" or "skill:my\_prefix". + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 440. + +*** + +### getTools + +#### Signature + +```typescript +getTools(): SkillToolDefinition[] +``` + +#### Returns + +`SkillToolDefinition[]` — A single trivia tool (configurable name) that fetches a random trivia question with optional category. + +#### Source + +[`src/skills/builtin/api_ninjas_trivia.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/api_ninjas_trivia.ts) + +Line 120. + +*** + +### hasAllEnvVars + +Check if all required environment variables are present. +Convenience wrapper around `validateEnvVars()` that returns a boolean, +matching the Python `validate_env_vars() -> bool` return type. + +#### Signature + +```typescript +hasAllEnvVars(): boolean +``` + +#### Returns + +`boolean` — `true` if all required env vars are set, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 544. + +*** + +### hasAllPackages + +Check if all required packages declared in the manifest are available. +Convenience wrapper around `validatePackages()` that returns a boolean, +matching the Python `validate_packages() -> bool` return type. + +#### Signature + +```typescript +hasAllPackages(): Promise +``` + +#### Returns + +`Promise` — `true` if all required packages are importable, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 579. + +*** + +### isInitialized + +Check if the skill has been initialized by the SkillManager. + +#### Signature + +```typescript +isInitialized(): boolean +``` + +#### Returns + +`boolean` — True if setup() has completed and the skill is marked initialized. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 507. + +*** + +### markInitialized + +Mark the skill as initialized (called by SkillManager). + +#### Signature + +```typescript +markInitialized(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 514. + +*** + +### setAgent + +Set the agent reference for this skill. +Called by the SkillManager/AgentBase when the skill is attached to an agent. +Python equivalent: `self.agent = agent` in `__init__`. + +#### Signature + +```typescript +setAgent(agent: AgentBase): void +``` + +#### Parameters + + + The agent that owns this skill. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 534. + +*** + +### setup + +Setup the skill. Called when the skill is added to an agent. +Override to perform initialization (API connections, config validation, etc.) + +#### Signature + +```typescript +setup(): Promise +``` + +#### Returns + +`Promise` — `true` if setup succeeded, `false` otherwise. Python equivalent: abstract `setup() -> bool`. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 313. + +*** + +### updateSkillData + +Update this skill's namespaced data on a FunctionResult via updateGlobalData. + +#### Signature + +```typescript +updateSkillData( + result: FunctionResult, + data: Record +): FunctionResult +``` + +#### Parameters + + + The FunctionResult to update. + + + + The data to store under this skill's namespace. + + +#### Returns + +`FunctionResult` — The FunctionResult for chaining. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 462. + +*** + +### validateEnvVars + +Validate that all required environment variables declared on the skill class +are set in the current process environment. + +Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` +directly. TS reads the same static from the class. + +Returns the list of missing variable names so callers can produce actionable +error messages. This differs from Python's `validate_env_vars() -> bool` +return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/agents/skills/builtin/api-ninjas-trivia#has-all-env-vars) is the boolean equivalent. + +#### Signature + +```typescript +validateEnvVars(): string[] +``` + +#### Returns + +`string[]` — Array of missing environment variable names (empty if all are present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 486. + +*** + +### validatePackages + +Validate that all required packages declared on the skill class can be imported. + +Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` +directly and tries `importlib.import_module(pkg)` for each; TS does the +equivalent with a dynamic `import()`. + +#### Signature + +```typescript +validatePackages(): Promise +``` + +#### Returns + +`Promise` — Array of package names that could not be imported (empty if all present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - - - Fetches trivia questions from the API Ninjas service. - - +Line 557. ## Functions @@ -60,4 +734,4 @@ Line 288. [`src/skills/builtin/api_ninjas_trivia.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/api_ninjas_trivia.ts) -Line 1. +Line 59. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/ask-claude/ask-claude-skill/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/ask-claude/ask-claude-skill/index.mdx deleted file mode 100644 index 79c8c93f81..0000000000 --- a/fern/products/sdk-reference/typescript/agents/skills/builtin/ask-claude/ask-claude-skill/index.mdx +++ /dev/null @@ -1,716 +0,0 @@ ---- -slug: "/reference/typescript/agents/skills/builtin/ask-claude/ask-claude-skill" -title: "AskClaudeSkill" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "skills.builtin.ask_claude.AskClaudeSkill" - parent: "skills.builtin.ask_claude" - module: "agents.skills.builtin.ask_claude" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/ask_claude.ts" ---- -# `AskClaudeSkill` - -Provides access to Anthropic's Claude AI for sub-queries and complex reasoning. - -Tier 3 built-in skill. Requires the `ANTHROPIC_API_KEY` environment variable. -Supports `model` and `max_tokens` config options to control which Claude model -is used and the maximum response length. - -## Signature - -```typescript -class AskClaudeSkill extends SkillBase -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/agents/skills/skill-base) - -## Examples - -```typescript -agent.addSkill('ask_claude', { model: 'claude-sonnet-4-6', max_tokens: 512 }); -``` - -## Properties - - - Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. - - - - Configuration options provided at construction time. - - - - Unique identifier for this skill instance (includes timestamp and random bytes). - - - - Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. - - - - Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. - - - - Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. - - - - Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. - - - - Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. - - - - Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. - - - - The registered name of this skill type. - - - - Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. - - - - Additional SWAIG fields extracted from config, merged into tool definitions. - - -## Methods - -### cleanup - -Cleanup resources. Called when the skill is removed from an agent. - -#### Signature - -```typescript -cleanup(): Promise -``` - -#### Returns - -`Promise` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 469. - -*** - -### constructor - -Create a new skill instance. - -Python parity: `core/skill_base.py:32-43`. -Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` -is left as `None` on the subclass. TS throws the equivalent when the static -defaults haven't been overridden. - -#### Signature - -```typescript -constructor(config?: SkillConfig): AskClaudeSkill -``` - -#### Parameters - - - Optional configuration key-value pairs (Python: `params`). - - -#### Returns - -`AskClaudeSkill` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 282. - -*** - -### defineTool - -Imperatively register a tool with this skill. - -Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. -Merges `this.swaigFields` into the tool definition (explicit fields on -`toolDef` take precedence), then pushes the result into `_dynamicTools` -so the default `getTools()` returns it at SWML render time. - -Intended for skills whose tool shape depends on config evaluated at -`setup()` time. Skills with a static tool list should override -`getTools()` instead. - -#### Signature - -```typescript -defineTool(toolDef: SkillToolDefinition): void -``` - -#### Parameters - - - The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 351. - -*** - -### getAgent - -Return the agent that owns this skill, asserting it is non-null. -Equivalent to accessing `self.agent` in Python, where the agent reference -is always set before `setup()` is called. - -The SkillManager lifecycle guarantees that `setAgent()` is called before -`setup()`, so this method is safe to use inside `setup()` and in any -tool handler invoked during an active agent session. - -#### Signature - -```typescript -getAgent(): AgentBase -``` - -#### Returns - -`AgentBase` — The owning `AgentBase` instance. - -#### Throws - -- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 261. - -*** - -### getConfig - -Get a configuration value by key, falling back to a default if not set. - -#### Signature - -```typescript -getConfig(key: string, defaultValue?: T): T -``` - -#### Type Parameters - - - -#### Parameters - - - The configuration key to look up. - - - - Value to return if the key is not present. - - -#### Returns - -`T` — The configuration value cast to type T, or the default value. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 524. - -*** - -### getDataMapTools - -Optional DataMap-style tool definitions. Skills that build their own -SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them -here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. - -Python equivalent: the direct `self.agent.register_swaig_function(fn)` -call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). -Default returns `[]` — skills using only the declarative `getTools()` path -do not need to override this. - -#### Signature - -```typescript -getDataMapTools(): Record[] -``` - -#### Returns - -`Record[]` — Array of fully-built SWAIG function dicts. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 372. - -*** - -### getGlobalData - -Get global data to merge into the agent's global data store. - -#### Signature - -```typescript -getGlobalData(): Record -``` - -#### Returns - -`Record` — Key-value pairs to be merged into the agent's global data. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 410. - -*** - -### getHints - -Get speech recognition hints relevant to this skill. - -#### Signature - -```typescript -getHints(): string[] -``` - -#### Returns - -`string[]` — Array of hint strings to improve speech recognition accuracy. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 402. - -*** - -### getInstanceKey - -Get the instance key used for deduplication in the SkillManager. - -For single-instance skills (`SUPPORTS_MULTIPLE_INSTANCES = false`), returns -the skill name. For multi-instance skills, returns `${skillName}_${toolName}` -using the `tool_name` config (falls back to the skill name). - -Matches Python's `SkillBase.get_instance_key()` default (`skill_base.py:141-146`). -Multi-instance subclasses only need to override when their key derivation -depends on config beyond `tool_name`. - -#### Signature - -```typescript -getInstanceKey(): string -``` - -#### Returns - -`string` — A unique key identifying this skill instance. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 427. - -*** - -### getParameterSchema - -Get the parameter schema for this skill class, describing all accepted configuration options. -Subclasses should override and call `super.getParameterSchema()` to include base parameters. - -Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): -returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a -`tool_name` entry with `default: cls.SKILL_NAME` for classes with -`SUPPORTS_MULTIPLE_INSTANCES = true`. - -**Modifiers:** `static` - -#### Signature - -```typescript -getParameterSchema(): Record -``` - -#### Returns - -`Record` — Record mapping parameter names to their schema entries. - -#### Source - -[`src/skills/builtin/ask_claude.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/ask_claude.ts) - -Line 88. - -*** - -### getPromptSections - -Get prompt sections to inject into the agent's system prompt. -Respects the `skip_prompt` config option — returns `[]` if set to `true`. -Subclasses should override `_getPromptSections()` instead of this method. - -#### Signature - -```typescript -getPromptSections(): SkillPromptSection[] -``` - -#### Returns - -`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 382. - -*** - -### getSkillData - -Read this skill's data from a raw call data object's global\_data. - -#### Signature - -```typescript -getSkillData(rawData: Record): Record -``` - -#### Parameters - - - The raw request data containing global\_data. - - -#### Returns - -`Record` — The skill's stored data, or an empty object if not found. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 450. - -*** - -### getSkillNamespace - -Get the namespaced key for storing per-skill data in global\_data. - -#### Signature - -```typescript -getSkillNamespace(): string -``` - -#### Returns - -`string` — A string like "skill:datetime" or "skill:my\_prefix". - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 440. - -*** - -### getTools - -#### Signature - -```typescript -getTools(): SkillToolDefinition[] -``` - -#### Returns - -`SkillToolDefinition[]` — A single `ask_claude` tool that sends prompts to the Claude API. - -#### Source - -[`src/skills/builtin/ask_claude.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/ask_claude.ts) - -Line 112. - -*** - -### hasAllEnvVars - -Check if all required environment variables are present. -Convenience wrapper around `validateEnvVars()` that returns a boolean, -matching the Python `validate_env_vars() -> bool` return type. - -#### Signature - -```typescript -hasAllEnvVars(): boolean -``` - -#### Returns - -`boolean` — `true` if all required env vars are set, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 544. - -*** - -### hasAllPackages - -Check if all required packages declared in the manifest are available. -Convenience wrapper around `validatePackages()` that returns a boolean, -matching the Python `validate_packages() -> bool` return type. - -#### Signature - -```typescript -hasAllPackages(): Promise -``` - -#### Returns - -`Promise` — `true` if all required packages are importable, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 579. - -*** - -### isInitialized - -Check if the skill has been initialized by the SkillManager. - -#### Signature - -```typescript -isInitialized(): boolean -``` - -#### Returns - -`boolean` — True if setup() has completed and the skill is marked initialized. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 507. - -*** - -### markInitialized - -Mark the skill as initialized (called by SkillManager). - -#### Signature - -```typescript -markInitialized(): void -``` - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 514. - -*** - -### setAgent - -Set the agent reference for this skill. -Called by the SkillManager/AgentBase when the skill is attached to an agent. -Python equivalent: `self.agent = agent` in `__init__`. - -#### Signature - -```typescript -setAgent(agent: AgentBase): void -``` - -#### Parameters - - - The agent that owns this skill. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 534. - -*** - -### setup - -Setup the skill. Called when the skill is added to an agent. -Override to perform initialization (API connections, config validation, etc.) - -#### Signature - -```typescript -setup(): Promise -``` - -#### Returns - -`Promise` — `true` if setup succeeded, `false` otherwise. Python equivalent: abstract `setup() -> bool`. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 313. - -*** - -### updateSkillData - -Update this skill's namespaced data on a FunctionResult via updateGlobalData. - -#### Signature - -```typescript -updateSkillData( - result: FunctionResult, - data: Record -): FunctionResult -``` - -#### Parameters - - - The FunctionResult to update. - - - - The data to store under this skill's namespace. - - -#### Returns - -`FunctionResult` — The FunctionResult for chaining. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 462. - -*** - -### validateEnvVars - -Validate that all required environment variables declared on the skill class -are set in the current process environment. - -Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` -directly. TS reads the same static from the class. - -Returns the list of missing variable names so callers can produce actionable -error messages. This differs from Python's `validate_env_vars() -> bool` -return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/agents/skills/builtin/ask-claude/ask-claude-skill#has-all-env-vars) is the boolean equivalent. - -#### Signature - -```typescript -validateEnvVars(): string[] -``` - -#### Returns - -`string[]` — Array of missing environment variable names (empty if all are present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 486. - -*** - -### validatePackages - -Validate that all required packages declared on the skill class can be imported. - -Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` -directly and tries `importlib.import_module(pkg)` for each; TS does the -equivalent with a dynamic `import()`. - -#### Signature - -```typescript -validatePackages(): Promise -``` - -#### Returns - -`Promise` — Array of package names that could not be imported (empty if all present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 557. - -## Source - -[`src/skills/builtin/ask_claude.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/ask_claude.ts) - -Line 81. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/ask-claude/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/ask-claude/index.mdx index e2d580fcf8..40b460ba9a 100644 --- a/fern/products/sdk-reference/typescript/agents/skills/builtin/ask-claude/index.mdx +++ b/fern/products/sdk-reference/typescript/agents/skills/builtin/ask-claude/index.mdx @@ -5,7 +5,7 @@ sdk_label: "TypeScript SDK" icon: "typescript" lustri: auto_generated: true - kind: "module" + kind: "class" language: "typescript" qualified_name: "skills.builtin.ask_claude" parent: "skills.builtin" @@ -14,19 +14,700 @@ lustri: --- # `ask_claude` +Provides access to Anthropic's Claude AI for sub-queries and complex reasoning. + +Tier 3 built-in skill. Requires the `ANTHROPIC_API_KEY` environment variable. +Supports `model` and `max_tokens` config options to control which Claude model +is used and the maximum response length. + ## Signature ```typescript -module ask_claude +class AskClaudeSkill extends SkillBase +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/agents/skills/skill-base) + +## Examples + +```typescript +agent.addSkill('ask_claude', { model: 'claude-sonnet-4-6', max_tokens: 512 }); +``` + +## Properties + + + Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. + + + + Configuration options provided at construction time. + + + + Unique identifier for this skill instance (includes timestamp and random bytes). + + + + Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. + + + + Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. + + + + Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. + + + + Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. + + + + Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. + + + + Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. + + + + The registered name of this skill type. + + + + Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. + + + + Additional SWAIG fields extracted from config, merged into tool definitions. + + +## Methods + +### cleanup + +Cleanup resources. Called when the skill is removed from an agent. + +#### Signature + +```typescript +cleanup(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 469. + +*** + +### constructor + +Create a new skill instance. + +Python parity: `core/skill_base.py:32-43`. +Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` +is left as `None` on the subclass. TS throws the equivalent when the static +defaults haven't been overridden. + +#### Signature + +```typescript +constructor(config?: SkillConfig): AskClaudeSkill +``` + +#### Parameters + + + Optional configuration key-value pairs (Python: `params`). + + +#### Returns + +`AskClaudeSkill` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 282. + +*** + +### defineTool + +Imperatively register a tool with this skill. + +Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. +Merges `this.swaigFields` into the tool definition (explicit fields on +`toolDef` take precedence), then pushes the result into `_dynamicTools` +so the default `getTools()` returns it at SWML render time. + +Intended for skills whose tool shape depends on config evaluated at +`setup()` time. Skills with a static tool list should override +`getTools()` instead. + +#### Signature + +```typescript +defineTool(toolDef: SkillToolDefinition): void +``` + +#### Parameters + + + The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 351. + +*** + +### getAgent + +Return the agent that owns this skill, asserting it is non-null. +Equivalent to accessing `self.agent` in Python, where the agent reference +is always set before `setup()` is called. + +The SkillManager lifecycle guarantees that `setAgent()` is called before +`setup()`, so this method is safe to use inside `setup()` and in any +tool handler invoked during an active agent session. + +#### Signature + +```typescript +getAgent(): AgentBase +``` + +#### Returns + +`AgentBase` — The owning `AgentBase` instance. + +#### Throws + +- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 261. + +*** + +### getConfig + +Get a configuration value by key, falling back to a default if not set. + +#### Signature + +```typescript +getConfig(key: string, defaultValue?: T): T +``` + +#### Type Parameters + + + +#### Parameters + + + The configuration key to look up. + + + + Value to return if the key is not present. + + +#### Returns + +`T` — The configuration value cast to type T, or the default value. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 524. + +*** + +### getDataMapTools + +Optional DataMap-style tool definitions. Skills that build their own +SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them +here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. + +Python equivalent: the direct `self.agent.register_swaig_function(fn)` +call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). +Default returns `[]` — skills using only the declarative `getTools()` path +do not need to override this. + +#### Signature + +```typescript +getDataMapTools(): Record[] +``` + +#### Returns + +`Record[]` — Array of fully-built SWAIG function dicts. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 372. + +*** + +### getGlobalData + +Get global data to merge into the agent's global data store. + +#### Signature + +```typescript +getGlobalData(): Record +``` + +#### Returns + +`Record` — Key-value pairs to be merged into the agent's global data. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 410. + +*** + +### getHints + +Get speech recognition hints relevant to this skill. + +#### Signature + +```typescript +getHints(): string[] +``` + +#### Returns + +`string[]` — Array of hint strings to improve speech recognition accuracy. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 402. + +*** + +### getInstanceKey + +Get the instance key used for deduplication in the SkillManager. + +For single-instance skills (`SUPPORTS_MULTIPLE_INSTANCES = false`), returns +the skill name. For multi-instance skills, returns `${skillName}_${toolName}` +using the `tool_name` config (falls back to the skill name). + +Matches Python's `SkillBase.get_instance_key()` default (`skill_base.py:141-146`). +Multi-instance subclasses only need to override when their key derivation +depends on config beyond `tool_name`. + +#### Signature + +```typescript +getInstanceKey(): string +``` + +#### Returns + +`string` — A unique key identifying this skill instance. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 427. + +*** + +### getParameterSchema + +Get the parameter schema for this skill class, describing all accepted configuration options. +Subclasses should override and call `super.getParameterSchema()` to include base parameters. + +Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): +returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a +`tool_name` entry with `default: cls.SKILL_NAME` for classes with +`SUPPORTS_MULTIPLE_INSTANCES = true`. + +**Modifiers:** `static` + +#### Signature + +```typescript +getParameterSchema(): Record +``` + +#### Returns + +`Record` — Record mapping parameter names to their schema entries. + +#### Source + +[`src/skills/builtin/ask_claude.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/ask_claude.ts) + +Line 88. + +*** + +### getPromptSections + +Get prompt sections to inject into the agent's system prompt. +Respects the `skip_prompt` config option — returns `[]` if set to `true`. +Subclasses should override `_getPromptSections()` instead of this method. + +#### Signature + +```typescript +getPromptSections(): SkillPromptSection[] +``` + +#### Returns + +`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 382. + +*** + +### getSkillData + +Read this skill's data from a raw call data object's global\_data. + +#### Signature + +```typescript +getSkillData(rawData: Record): Record +``` + +#### Parameters + + + The raw request data containing global\_data. + + +#### Returns + +`Record` — The skill's stored data, or an empty object if not found. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 450. + +*** + +### getSkillNamespace + +Get the namespaced key for storing per-skill data in global\_data. + +#### Signature + +```typescript +getSkillNamespace(): string +``` + +#### Returns + +`string` — A string like "skill:datetime" or "skill:my\_prefix". + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 440. + +*** + +### getTools + +#### Signature + +```typescript +getTools(): SkillToolDefinition[] ``` -## Classes +#### Returns + +`SkillToolDefinition[]` — A single `ask_claude` tool that sends prompts to the Claude API. + +#### Source + +[`src/skills/builtin/ask_claude.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/ask_claude.ts) + +Line 112. + +*** + +### hasAllEnvVars + +Check if all required environment variables are present. +Convenience wrapper around `validateEnvVars()` that returns a boolean, +matching the Python `validate_env_vars() -> bool` return type. + +#### Signature + +```typescript +hasAllEnvVars(): boolean +``` + +#### Returns + +`boolean` — `true` if all required env vars are set, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 544. + +*** + +### hasAllPackages + +Check if all required packages declared in the manifest are available. +Convenience wrapper around `validatePackages()` that returns a boolean, +matching the Python `validate_packages() -> bool` return type. + +#### Signature + +```typescript +hasAllPackages(): Promise +``` + +#### Returns + +`Promise` — `true` if all required packages are importable, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 579. + +*** + +### isInitialized + +Check if the skill has been initialized by the SkillManager. + +#### Signature + +```typescript +isInitialized(): boolean +``` + +#### Returns + +`boolean` — True if setup() has completed and the skill is marked initialized. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 507. + +*** + +### markInitialized + +Mark the skill as initialized (called by SkillManager). + +#### Signature + +```typescript +markInitialized(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 514. + +*** + +### setAgent + +Set the agent reference for this skill. +Called by the SkillManager/AgentBase when the skill is attached to an agent. +Python equivalent: `self.agent = agent` in `__init__`. + +#### Signature + +```typescript +setAgent(agent: AgentBase): void +``` + +#### Parameters + + + The agent that owns this skill. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 534. + +*** + +### setup + +Setup the skill. Called when the skill is added to an agent. +Override to perform initialization (API connections, config validation, etc.) + +#### Signature + +```typescript +setup(): Promise +``` + +#### Returns + +`Promise` — `true` if setup succeeded, `false` otherwise. Python equivalent: abstract `setup() -> bool`. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 313. + +*** + +### updateSkillData + +Update this skill's namespaced data on a FunctionResult via updateGlobalData. + +#### Signature + +```typescript +updateSkillData( + result: FunctionResult, + data: Record +): FunctionResult +``` + +#### Parameters + + + The FunctionResult to update. + + + + The data to store under this skill's namespace. + + +#### Returns + +`FunctionResult` — The FunctionResult for chaining. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 462. + +*** + +### validateEnvVars + +Validate that all required environment variables declared on the skill class +are set in the current process environment. + +Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` +directly. TS reads the same static from the class. + +Returns the list of missing variable names so callers can produce actionable +error messages. This differs from Python's `validate_env_vars() -> bool` +return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/agents/skills/builtin/ask-claude#has-all-env-vars) is the boolean equivalent. + +#### Signature + +```typescript +validateEnvVars(): string[] +``` + +#### Returns + +`string[]` — Array of missing environment variable names (empty if all are present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 486. + +*** + +### validatePackages + +Validate that all required packages declared on the skill class can be imported. + +Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` +directly and tries `importlib.import_module(pkg)` for each; TS does the +equivalent with a dynamic `import()`. + +#### Signature + +```typescript +validatePackages(): Promise +``` + +#### Returns + +`Promise` — Array of package names that could not be imported (empty if all present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - - - Provides access to Anthropic's Claude AI for sub-queries and complex reasoning. - - +Line 557. ## Functions @@ -60,4 +741,4 @@ Line 244. [`src/skills/builtin/ask_claude.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/ask_claude.ts) -Line 1. +Line 81. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/claude-skills/claude-skills-skill/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/claude-skills/claude-skills-skill/index.mdx deleted file mode 100644 index 7c23545e02..0000000000 --- a/fern/products/sdk-reference/typescript/agents/skills/builtin/claude-skills/claude-skills-skill/index.mdx +++ /dev/null @@ -1,731 +0,0 @@ ---- -slug: "/reference/typescript/agents/skills/builtin/claude-skills/claude-skills-skill" -title: "ClaudeSkillsSkill" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "skills.builtin.claude_skills.ClaudeSkillsSkill" - parent: "skills.builtin.claude_skills" - module: "agents.skills.builtin.claude_skills" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/claude_skills.ts" ---- -# `ClaudeSkillsSkill` - -Load Claude-style SKILL.md files as SignalWire agent tools. - -This skill parses Claude Code skill directories and makes them available -as SWAIG tools that the AI can call. Each Claude skill becomes a tool -that returns the skill's instructions when invoked. - -## Signature - -```typescript -class ClaudeSkillsSkill extends SkillBase -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/agents/skills/skill-base) - -## Examples - -```typescript -agent.addSkill('claude_skills', { skills_dir: './claude-skills' }); -``` - -## Properties - - - Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. - - - - Configuration options provided at construction time. - - - - Unique identifier for this skill instance (includes timestamp and random bytes). - - - - Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. - - - - Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. - - - - Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. - - - - Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. - - - - Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. - - - - Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. - - - - The registered name of this skill type. - - - - Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. - - - - Additional SWAIG fields extracted from config, merged into tool definitions. - - -## Methods - -### cleanup - -Cleanup resources. Called when the skill is removed from an agent. - -#### Signature - -```typescript -cleanup(): Promise -``` - -#### Returns - -`Promise` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 469. - -*** - -### constructor - -Create a new skill instance. - -Python parity: `core/skill_base.py:32-43`. -Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` -is left as `None` on the subclass. TS throws the equivalent when the static -defaults haven't been overridden. - -#### Signature - -```typescript -constructor(config?: SkillConfig): ClaudeSkillsSkill -``` - -#### Parameters - - - Optional configuration key-value pairs (Python: `params`). - - -#### Returns - -`ClaudeSkillsSkill` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 282. - -*** - -### defineTool - -Imperatively register a tool with this skill. - -Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. -Merges `this.swaigFields` into the tool definition (explicit fields on -`toolDef` take precedence), then pushes the result into `_dynamicTools` -so the default `getTools()` returns it at SWML render time. - -Intended for skills whose tool shape depends on config evaluated at -`setup()` time. Skills with a static tool list should override -`getTools()` instead. - -#### Signature - -```typescript -defineTool(toolDef: SkillToolDefinition): void -``` - -#### Parameters - - - The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 351. - -*** - -### getAgent - -Return the agent that owns this skill, asserting it is non-null. -Equivalent to accessing `self.agent` in Python, where the agent reference -is always set before `setup()` is called. - -The SkillManager lifecycle guarantees that `setAgent()` is called before -`setup()`, so this method is safe to use inside `setup()` and in any -tool handler invoked during an active agent session. - -#### Signature - -```typescript -getAgent(): AgentBase -``` - -#### Returns - -`AgentBase` — The owning `AgentBase` instance. - -#### Throws - -- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 261. - -*** - -### getConfig - -Get a configuration value by key, falling back to a default if not set. - -#### Signature - -```typescript -getConfig(key: string, defaultValue?: T): T -``` - -#### Type Parameters - - - -#### Parameters - - - The configuration key to look up. - - - - Value to return if the key is not present. - - -#### Returns - -`T` — The configuration value cast to type T, or the default value. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 524. - -*** - -### getDataMapTools - -Optional DataMap-style tool definitions. Skills that build their own -SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them -here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. - -Python equivalent: the direct `self.agent.register_swaig_function(fn)` -call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). -Default returns `[]` — skills using only the declarative `getTools()` path -do not need to override this. - -#### Signature - -```typescript -getDataMapTools(): Record[] -``` - -#### Returns - -`Record[]` — Array of fully-built SWAIG function dicts. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 372. - -*** - -### getGlobalData - -Get global data to merge into the agent's global data store. - -#### Signature - -```typescript -getGlobalData(): Record -``` - -#### Returns - -`Record` — Key-value pairs to be merged into the agent's global data. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 410. - -*** - -### getHints - -Get speech recognition hints relevant to this skill. - -#### Signature - -```typescript -getHints(): string[] -``` - -#### Returns - -`string[]` — Array of hint strings to improve speech recognition accuracy. - -#### Source - -[`src/skills/builtin/claude_skills.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/claude_skills.ts) - -Line 898. - -*** - -### getInstanceKey - -Get the instance key used for deduplication in the SkillManager. - -For single-instance skills (`SUPPORTS_MULTIPLE_INSTANCES = false`), returns -the skill name. For multi-instance skills, returns `${skillName}_${toolName}` -using the `tool_name` config (falls back to the skill name). - -Matches Python's `SkillBase.get_instance_key()` default (`skill_base.py:141-146`). -Multi-instance subclasses only need to override when their key derivation -depends on config beyond `tool_name`. - -#### Signature - -```typescript -getInstanceKey(): string -``` - -#### Returns - -`string` — A unique key identifying this skill instance. - -#### Source - -[`src/skills/builtin/claude_skills.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/claude_skills.ts) - -Line 964. - -*** - -### getParameterSchema - -Get the parameter schema for this skill class, describing all accepted configuration options. -Subclasses should override and call `super.getParameterSchema()` to include base parameters. - -Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): -returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a -`tool_name` entry with `default: cls.SKILL_NAME` for classes with -`SUPPORTS_MULTIPLE_INSTANCES = true`. - -**Modifiers:** `static` - -#### Signature - -```typescript -getParameterSchema(): Record -``` - -#### Returns - -`Record` — Record mapping parameter names to their schema entries. - -#### Source - -[`src/skills/builtin/claude_skills.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/claude_skills.ts) - -Line 99. - -*** - -### getPromptSections - -Get prompt sections to inject into the agent's system prompt. -Respects the `skip_prompt` config option — returns `[]` if set to `true`. -Subclasses should override `_getPromptSections()` instead of this method. - -#### Signature - -```typescript -getPromptSections(): SkillPromptSection[] -``` - -#### Returns - -`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 382. - -*** - -### getSkillData - -Read this skill's data from a raw call data object's global\_data. - -#### Signature - -```typescript -getSkillData(rawData: Record): Record -``` - -#### Parameters - - - The raw request data containing global\_data. - - -#### Returns - -`Record` — The skill's stored data, or an empty object if not found. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 450. - -*** - -### getSkillNamespace - -Get the namespaced key for storing per-skill data in global\_data. - -#### Signature - -```typescript -getSkillNamespace(): string -``` - -#### Returns - -`string` — A string like "skill:datetime" or "skill:my\_prefix". - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 440. - -*** - -### getTools - -Return the SWAIG tool definitions this skill provides. - -Default implementation returns tools registered imperatively via -`defineTool()`. Skills using the declarative pattern override this -method to return a static array built from their config. - -Python parity: replaces the `@abstractmethod register_tools()` contract -— Python skills call `self.define_tool(...)` inside `register_tools()`; -TypeScript skills either call `this.defineTool(...)` in `setup()` (and -let the default `getTools()` return them) or override `getTools()` -directly. - -#### Signature - -```typescript -getTools(): SkillToolDefinition[] -``` - -#### Returns - -`SkillToolDefinition[]` — Array of tool definitions to register with the agent. - -#### Source - -[`src/skills/builtin/claude_skills.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/claude_skills.ts) - -Line 762. - -*** - -### hasAllEnvVars - -Check if all required environment variables are present. -Convenience wrapper around `validateEnvVars()` that returns a boolean, -matching the Python `validate_env_vars() -> bool` return type. - -#### Signature - -```typescript -hasAllEnvVars(): boolean -``` - -#### Returns - -`boolean` — `true` if all required env vars are set, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 544. - -*** - -### hasAllPackages - -Check if all required packages declared in the manifest are available. -Convenience wrapper around `validatePackages()` that returns a boolean, -matching the Python `validate_packages() -> bool` return type. - -#### Signature - -```typescript -hasAllPackages(): Promise -``` - -#### Returns - -`Promise` — `true` if all required packages are importable, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 579. - -*** - -### isInitialized - -Check if the skill has been initialized by the SkillManager. - -#### Signature - -```typescript -isInitialized(): boolean -``` - -#### Returns - -`boolean` — True if setup() has completed and the skill is marked initialized. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 507. - -*** - -### markInitialized - -Mark the skill as initialized (called by SkillManager). - -#### Signature - -```typescript -markInitialized(): void -``` - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 514. - -*** - -### setAgent - -Set the agent reference for this skill. -Called by the SkillManager/AgentBase when the skill is attached to an agent. -Python equivalent: `self.agent = agent` in `__init__`. - -#### Signature - -```typescript -setAgent(agent: AgentBase): void -``` - -#### Parameters - - - The agent that owns this skill. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 534. - -*** - -### setup - -Setup the Claude skills loader — discovers and parses all SKILL.md files. - -Returns `true` on success and `false` on any failure (missing path, -invalid path, stat failure, or non-directory), mirroring the Python -skill's `setup() -> bool` contract. - -#### Signature - -```typescript -setup(): Promise -``` - -#### Returns - -`Promise` - -#### Source - -[`src/skills/builtin/claude_skills.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/claude_skills.ts) - -Line 186. - -*** - -### updateSkillData - -Update this skill's namespaced data on a FunctionResult via updateGlobalData. - -#### Signature - -```typescript -updateSkillData( - result: FunctionResult, - data: Record -): FunctionResult -``` - -#### Parameters - - - The FunctionResult to update. - - - - The data to store under this skill's namespace. - - -#### Returns - -`FunctionResult` — The FunctionResult for chaining. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 462. - -*** - -### validateEnvVars - -Validate that all required environment variables declared on the skill class -are set in the current process environment. - -Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` -directly. TS reads the same static from the class. - -Returns the list of missing variable names so callers can produce actionable -error messages. This differs from Python's `validate_env_vars() -> bool` -return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/agents/skills/builtin/claude-skills/claude-skills-skill#has-all-env-vars) is the boolean equivalent. - -#### Signature - -```typescript -validateEnvVars(): string[] -``` - -#### Returns - -`string[]` — Array of missing environment variable names (empty if all are present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 486. - -*** - -### validatePackages - -Validate that all required packages declared on the skill class can be imported. - -Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` -directly and tries `importlib.import_module(pkg)` for each; TS does the -equivalent with a dynamic `import()`. - -#### Signature - -```typescript -validatePackages(): Promise -``` - -#### Returns - -`Promise` — Array of package names that could not be imported (empty if all present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 557. - -## Source - -[`src/skills/builtin/claude_skills.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/claude_skills.ts) - -Line 81. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/claude-skills/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/claude-skills/index.mdx index f9cae187bb..0178063f52 100644 --- a/fern/products/sdk-reference/typescript/agents/skills/builtin/claude-skills/index.mdx +++ b/fern/products/sdk-reference/typescript/agents/skills/builtin/claude-skills/index.mdx @@ -5,7 +5,7 @@ sdk_label: "TypeScript SDK" icon: "typescript" lustri: auto_generated: true - kind: "module" + kind: "class" language: "typescript" qualified_name: "skills.builtin.claude_skills" parent: "skills.builtin" @@ -14,19 +14,715 @@ lustri: --- # `claude_skills` +Load Claude-style SKILL.md files as SignalWire agent tools. + +This skill parses Claude Code skill directories and makes them available +as SWAIG tools that the AI can call. Each Claude skill becomes a tool +that returns the skill's instructions when invoked. + ## Signature ```typescript -module claude_skills +class ClaudeSkillsSkill extends SkillBase +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/agents/skills/skill-base) + +## Examples + +```typescript +agent.addSkill('claude_skills', { skills_dir: './claude-skills' }); +``` + +## Properties + + + Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. + + + + Configuration options provided at construction time. + + + + Unique identifier for this skill instance (includes timestamp and random bytes). + + + + Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. + + + + Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. + + + + Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. + + + + Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. + + + + Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. + + + + Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. + + + + The registered name of this skill type. + + + + Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. + + + + Additional SWAIG fields extracted from config, merged into tool definitions. + + +## Methods + +### cleanup + +Cleanup resources. Called when the skill is removed from an agent. + +#### Signature + +```typescript +cleanup(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 469. + +*** + +### constructor + +Create a new skill instance. + +Python parity: `core/skill_base.py:32-43`. +Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` +is left as `None` on the subclass. TS throws the equivalent when the static +defaults haven't been overridden. + +#### Signature + +```typescript +constructor(config?: SkillConfig): ClaudeSkillsSkill +``` + +#### Parameters + + + Optional configuration key-value pairs (Python: `params`). + + +#### Returns + +`ClaudeSkillsSkill` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 282. + +*** + +### defineTool + +Imperatively register a tool with this skill. + +Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. +Merges `this.swaigFields` into the tool definition (explicit fields on +`toolDef` take precedence), then pushes the result into `_dynamicTools` +so the default `getTools()` returns it at SWML render time. + +Intended for skills whose tool shape depends on config evaluated at +`setup()` time. Skills with a static tool list should override +`getTools()` instead. + +#### Signature + +```typescript +defineTool(toolDef: SkillToolDefinition): void +``` + +#### Parameters + + + The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 351. + +*** + +### getAgent + +Return the agent that owns this skill, asserting it is non-null. +Equivalent to accessing `self.agent` in Python, where the agent reference +is always set before `setup()` is called. + +The SkillManager lifecycle guarantees that `setAgent()` is called before +`setup()`, so this method is safe to use inside `setup()` and in any +tool handler invoked during an active agent session. + +#### Signature + +```typescript +getAgent(): AgentBase ``` -## Classes +#### Returns + +`AgentBase` — The owning `AgentBase` instance. + +#### Throws + +- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 261. + +*** + +### getConfig + +Get a configuration value by key, falling back to a default if not set. + +#### Signature + +```typescript +getConfig(key: string, defaultValue?: T): T +``` + +#### Type Parameters + + + +#### Parameters + + + The configuration key to look up. + + + + Value to return if the key is not present. + + +#### Returns + +`T` — The configuration value cast to type T, or the default value. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 524. + +*** + +### getDataMapTools + +Optional DataMap-style tool definitions. Skills that build their own +SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them +here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. + +Python equivalent: the direct `self.agent.register_swaig_function(fn)` +call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). +Default returns `[]` — skills using only the declarative `getTools()` path +do not need to override this. + +#### Signature + +```typescript +getDataMapTools(): Record[] +``` + +#### Returns + +`Record[]` — Array of fully-built SWAIG function dicts. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 372. + +*** + +### getGlobalData + +Get global data to merge into the agent's global data store. + +#### Signature + +```typescript +getGlobalData(): Record +``` + +#### Returns + +`Record` — Key-value pairs to be merged into the agent's global data. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 410. + +*** + +### getHints + +Get speech recognition hints relevant to this skill. + +#### Signature + +```typescript +getHints(): string[] +``` + +#### Returns + +`string[]` — Array of hint strings to improve speech recognition accuracy. + +#### Source + +[`src/skills/builtin/claude_skills.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/claude_skills.ts) + +Line 898. + +*** + +### getInstanceKey + +Get the instance key used for deduplication in the SkillManager. + +For single-instance skills (`SUPPORTS_MULTIPLE_INSTANCES = false`), returns +the skill name. For multi-instance skills, returns `${skillName}_${toolName}` +using the `tool_name` config (falls back to the skill name). + +Matches Python's `SkillBase.get_instance_key()` default (`skill_base.py:141-146`). +Multi-instance subclasses only need to override when their key derivation +depends on config beyond `tool_name`. + +#### Signature + +```typescript +getInstanceKey(): string +``` + +#### Returns + +`string` — A unique key identifying this skill instance. + +#### Source + +[`src/skills/builtin/claude_skills.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/claude_skills.ts) + +Line 964. + +*** + +### getParameterSchema + +Get the parameter schema for this skill class, describing all accepted configuration options. +Subclasses should override and call `super.getParameterSchema()` to include base parameters. + +Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): +returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a +`tool_name` entry with `default: cls.SKILL_NAME` for classes with +`SUPPORTS_MULTIPLE_INSTANCES = true`. + +**Modifiers:** `static` + +#### Signature + +```typescript +getParameterSchema(): Record +``` + +#### Returns + +`Record` — Record mapping parameter names to their schema entries. + +#### Source + +[`src/skills/builtin/claude_skills.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/claude_skills.ts) + +Line 99. + +*** + +### getPromptSections + +Get prompt sections to inject into the agent's system prompt. +Respects the `skip_prompt` config option — returns `[]` if set to `true`. +Subclasses should override `_getPromptSections()` instead of this method. + +#### Signature + +```typescript +getPromptSections(): SkillPromptSection[] +``` + +#### Returns + +`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 382. + +*** + +### getSkillData + +Read this skill's data from a raw call data object's global\_data. + +#### Signature + +```typescript +getSkillData(rawData: Record): Record +``` + +#### Parameters + + + The raw request data containing global\_data. + + +#### Returns + +`Record` — The skill's stored data, or an empty object if not found. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 450. + +*** + +### getSkillNamespace + +Get the namespaced key for storing per-skill data in global\_data. + +#### Signature + +```typescript +getSkillNamespace(): string +``` + +#### Returns + +`string` — A string like "skill:datetime" or "skill:my\_prefix". + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 440. + +*** + +### getTools + +Return the SWAIG tool definitions this skill provides. + +Default implementation returns tools registered imperatively via +`defineTool()`. Skills using the declarative pattern override this +method to return a static array built from their config. + +Python parity: replaces the `@abstractmethod register_tools()` contract +— Python skills call `self.define_tool(...)` inside `register_tools()`; +TypeScript skills either call `this.defineTool(...)` in `setup()` (and +let the default `getTools()` return them) or override `getTools()` +directly. + +#### Signature + +```typescript +getTools(): SkillToolDefinition[] +``` + +#### Returns + +`SkillToolDefinition[]` — Array of tool definitions to register with the agent. + +#### Source + +[`src/skills/builtin/claude_skills.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/claude_skills.ts) + +Line 762. + +*** + +### hasAllEnvVars + +Check if all required environment variables are present. +Convenience wrapper around `validateEnvVars()` that returns a boolean, +matching the Python `validate_env_vars() -> bool` return type. + +#### Signature + +```typescript +hasAllEnvVars(): boolean +``` + +#### Returns + +`boolean` — `true` if all required env vars are set, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 544. + +*** + +### hasAllPackages + +Check if all required packages declared in the manifest are available. +Convenience wrapper around `validatePackages()` that returns a boolean, +matching the Python `validate_packages() -> bool` return type. + +#### Signature + +```typescript +hasAllPackages(): Promise +``` + +#### Returns + +`Promise` — `true` if all required packages are importable, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 579. + +*** + +### isInitialized + +Check if the skill has been initialized by the SkillManager. + +#### Signature + +```typescript +isInitialized(): boolean +``` + +#### Returns + +`boolean` — True if setup() has completed and the skill is marked initialized. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 507. + +*** + +### markInitialized + +Mark the skill as initialized (called by SkillManager). + +#### Signature + +```typescript +markInitialized(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 514. + +*** + +### setAgent + +Set the agent reference for this skill. +Called by the SkillManager/AgentBase when the skill is attached to an agent. +Python equivalent: `self.agent = agent` in `__init__`. + +#### Signature + +```typescript +setAgent(agent: AgentBase): void +``` + +#### Parameters + + + The agent that owns this skill. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 534. + +*** + +### setup + +Setup the Claude skills loader — discovers and parses all SKILL.md files. + +Returns `true` on success and `false` on any failure (missing path, +invalid path, stat failure, or non-directory), mirroring the Python +skill's `setup() -> bool` contract. + +#### Signature + +```typescript +setup(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/skills/builtin/claude_skills.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/claude_skills.ts) + +Line 186. + +*** + +### updateSkillData + +Update this skill's namespaced data on a FunctionResult via updateGlobalData. + +#### Signature + +```typescript +updateSkillData( + result: FunctionResult, + data: Record +): FunctionResult +``` + +#### Parameters + + + The FunctionResult to update. + + + + The data to store under this skill's namespace. + + +#### Returns + +`FunctionResult` — The FunctionResult for chaining. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 462. + +*** + +### validateEnvVars + +Validate that all required environment variables declared on the skill class +are set in the current process environment. + +Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` +directly. TS reads the same static from the class. + +Returns the list of missing variable names so callers can produce actionable +error messages. This differs from Python's `validate_env_vars() -> bool` +return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/agents/skills/builtin/claude-skills#has-all-env-vars) is the boolean equivalent. + +#### Signature + +```typescript +validateEnvVars(): string[] +``` + +#### Returns + +`string[]` — Array of missing environment variable names (empty if all are present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 486. + +*** + +### validatePackages + +Validate that all required packages declared on the skill class can be imported. + +Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` +directly and tries `importlib.import_module(pkg)` for each; TS does the +equivalent with a dynamic `import()`. + +#### Signature + +```typescript +validatePackages(): Promise +``` + +#### Returns + +`Promise` — Array of package names that could not be imported (empty if all present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - - - Load Claude-style SKILL.md files as SignalWire agent tools. - - +Line 557. ## Functions @@ -60,4 +756,4 @@ Line 981. [`src/skills/builtin/claude_skills.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/claude_skills.ts) -Line 1. +Line 81. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/custom-skills/custom-skills-skill/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/custom-skills/custom-skills-skill/index.mdx deleted file mode 100644 index c33eddac6e..0000000000 --- a/fern/products/sdk-reference/typescript/agents/skills/builtin/custom-skills/custom-skills-skill/index.mdx +++ /dev/null @@ -1,746 +0,0 @@ ---- -slug: "/reference/typescript/agents/skills/builtin/custom-skills/custom-skills-skill" -title: "CustomSkillsSkill" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "skills.builtin.custom_skills.CustomSkillsSkill" - parent: "skills.builtin.custom_skills" - module: "agents.skills.builtin.custom_skills" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/custom_skills.ts" ---- -# `CustomSkillsSkill` - -A meta-skill that registers user-defined tools from configuration. - -Tier 2 built-in skill with no external dependencies. Allows users to define -arbitrary tools via config without writing skill classes. Each tool definition -specifies a name, description, parameters, and a JavaScript handler function -body that is compiled via the Function constructor at instantiation time. - -**Security warning:** This skill uses `new Function()` to compile user-provided -code at runtime. It is gated behind the `SWML_ALLOW_CUSTOM_HANDLER_CODE=true` -environment variable to prevent unintended code execution. - -## Signature - -```typescript -class CustomSkillsSkill extends SkillBase -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/agents/skills/skill-base) - -## Examples - -```typescript -// Requires SWML_ALLOW_CUSTOM_HANDLER_CODE=true -agent.addSkill('custom_skills', { - tools: [ - { - name: 'echo', - description: 'Echo back the caller-supplied message.', - parameters: { type: 'object', properties: { msg: { type: 'string' } } }, - handlerBody: 'return new FunctionResult(args.msg);', - }, - ], -}); -``` - -## Properties - - - Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. - - - - Configuration options provided at construction time. - - - - Unique identifier for this skill instance (includes timestamp and random bytes). - - - - Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. - - - - Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. - - - - Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. - - - - Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. - - - - Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. - - - - Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. - - - - The registered name of this skill type. - - - - Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. - - - - Additional SWAIG fields extracted from config, merged into tool definitions. - - -## Methods - -### cleanup - -Cleanup resources. Called when the skill is removed from an agent. - -#### Signature - -```typescript -cleanup(): Promise -``` - -#### Returns - -`Promise` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 469. - -*** - -### constructor - -#### Signature - -```typescript -constructor(config?: SkillConfig): CustomSkillsSkill -``` - -#### Parameters - - - Configuration object containing a `tools` array of custom tool definitions. - - -#### Returns - -`CustomSkillsSkill` - -#### Source - -[`src/skills/builtin/custom_skills.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/custom_skills.ts) - -Line 106. - -*** - -### defineTool - -Imperatively register a tool with this skill. - -Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. -Merges `this.swaigFields` into the tool definition (explicit fields on -`toolDef` take precedence), then pushes the result into `_dynamicTools` -so the default `getTools()` returns it at SWML render time. - -Intended for skills whose tool shape depends on config evaluated at -`setup()` time. Skills with a static tool list should override -`getTools()` instead. - -#### Signature - -```typescript -defineTool(toolDef: SkillToolDefinition): void -``` - -#### Parameters - - - The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 351. - -*** - -### getAgent - -Return the agent that owns this skill, asserting it is non-null. -Equivalent to accessing `self.agent` in Python, where the agent reference -is always set before `setup()` is called. - -The SkillManager lifecycle guarantees that `setAgent()` is called before -`setup()`, so this method is safe to use inside `setup()` and in any -tool handler invoked during an active agent session. - -#### Signature - -```typescript -getAgent(): AgentBase -``` - -#### Returns - -`AgentBase` — The owning `AgentBase` instance. - -#### Throws - -- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 261. - -*** - -### getCompilationErrors - -Get handler compilation errors for diagnostic purposes. - -#### Signature - -```typescript -getCompilationErrors(): Map -``` - -#### Returns - -`Map` — A copy of the map from tool name to error message. - -#### Source - -[`src/skills/builtin/custom_skills.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/custom_skills.ts) - -Line 315. - -*** - -### getConfig - -Get a configuration value by key, falling back to a default if not set. - -#### Signature - -```typescript -getConfig(key: string, defaultValue?: T): T -``` - -#### Type Parameters - - - -#### Parameters - - - The configuration key to look up. - - - - Value to return if the key is not present. - - -#### Returns - -`T` — The configuration value cast to type T, or the default value. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 524. - -*** - -### getDataMapTools - -Optional DataMap-style tool definitions. Skills that build their own -SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them -here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. - -Python equivalent: the direct `self.agent.register_swaig_function(fn)` -call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). -Default returns `[]` — skills using only the declarative `getTools()` path -do not need to override this. - -#### Signature - -```typescript -getDataMapTools(): Record[] -``` - -#### Returns - -`Record[]` — Array of fully-built SWAIG function dicts. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 372. - -*** - -### getGlobalData - -Get global data to merge into the agent's global data store. - -#### Signature - -```typescript -getGlobalData(): Record -``` - -#### Returns - -`Record` — Key-value pairs to be merged into the agent's global data. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 410. - -*** - -### getHints - -Get speech recognition hints relevant to this skill. - -#### Signature - -```typescript -getHints(): string[] -``` - -#### Returns - -`string[]` — Array of hint strings to improve speech recognition accuracy. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 402. - -*** - -### getInstanceKey - -Get the instance key used for deduplication in the SkillManager. - -For single-instance skills (`SUPPORTS_MULTIPLE_INSTANCES = false`), returns -the skill name. For multi-instance skills, returns `${skillName}_${toolName}` -using the `tool_name` config (falls back to the skill name). - -Matches Python's `SkillBase.get_instance_key()` default (`skill_base.py:141-146`). -Multi-instance subclasses only need to override when their key derivation -depends on config beyond `tool_name`. - -#### Signature - -```typescript -getInstanceKey(): string -``` - -#### Returns - -`string` — A unique key identifying this skill instance. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 427. - -*** - -### getParameterSchema - -Get the parameter schema for this skill class, describing all accepted configuration options. -Subclasses should override and call `super.getParameterSchema()` to include base parameters. - -Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): -returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a -`tool_name` entry with `default: cls.SKILL_NAME` for classes with -`SUPPORTS_MULTIPLE_INSTANCES = true`. - -**Modifiers:** `static` - -#### Signature - -```typescript -getParameterSchema(): Record -``` - -#### Returns - -`Record` — Record mapping parameter names to their schema entries. - -#### Source - -[`src/skills/builtin/custom_skills.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/custom_skills.ts) - -Line 111. - -*** - -### getPromptSections - -Get prompt sections to inject into the agent's system prompt. -Respects the `skip_prompt` config option — returns `[]` if set to `true`. -Subclasses should override `_getPromptSections()` instead of this method. - -#### Signature - -```typescript -getPromptSections(): SkillPromptSection[] -``` - -#### Returns - -`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 382. - -*** - -### getSkillData - -Read this skill's data from a raw call data object's global\_data. - -#### Signature - -```typescript -getSkillData(rawData: Record): Record -``` - -#### Parameters - - - The raw request data containing global\_data. - - -#### Returns - -`Record` — The skill's stored data, or an empty object if not found. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 450. - -*** - -### getSkillNamespace - -Get the namespaced key for storing per-skill data in global\_data. - -#### Signature - -```typescript -getSkillNamespace(): string -``` - -#### Returns - -`string` — A string like "skill:datetime" or "skill:my\_prefix". - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 440. - -*** - -### getTools - -#### Signature - -```typescript -getTools(): SkillToolDefinition[] -``` - -#### Returns - -`SkillToolDefinition[]` — Array of dynamically generated tools from the configuration, with compiled handlers. - -#### Source - -[`src/skills/builtin/custom_skills.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/custom_skills.ts) - -Line 181. - -*** - -### hasAllEnvVars - -Check if all required environment variables are present. -Convenience wrapper around `validateEnvVars()` that returns a boolean, -matching the Python `validate_env_vars() -> bool` return type. - -#### Signature - -```typescript -hasAllEnvVars(): boolean -``` - -#### Returns - -`boolean` — `true` if all required env vars are set, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 544. - -*** - -### hasAllPackages - -Check if all required packages declared in the manifest are available. -Convenience wrapper around `validatePackages()` that returns a boolean, -matching the Python `validate_packages() -> bool` return type. - -#### Signature - -```typescript -hasAllPackages(): Promise -``` - -#### Returns - -`Promise` — `true` if all required packages are importable, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 579. - -*** - -### isInitialized - -Check if the skill has been initialized by the SkillManager. - -#### Signature - -```typescript -isInitialized(): boolean -``` - -#### Returns - -`boolean` — True if setup() has completed and the skill is marked initialized. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 507. - -*** - -### markInitialized - -Mark the skill as initialized (called by SkillManager). - -#### Signature - -```typescript -markInitialized(): void -``` - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 514. - -*** - -### setAgent - -Set the agent reference for this skill. -Called by the SkillManager/AgentBase when the skill is attached to an agent. -Python equivalent: `self.agent = agent` in `__init__`. - -#### Signature - -```typescript -setAgent(agent: AgentBase): void -``` - -#### Parameters - - - The agent that owns this skill. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 534. - -*** - -### setup - -Setup the skill. Called when the skill is added to an agent. -Override to perform initialization (API connections, config validation, etc.) - -#### Signature - -```typescript -setup(): Promise -``` - -#### Returns - -`Promise` — `true` if setup succeeded, `false` otherwise. Python equivalent: abstract `setup() -> bool`. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 313. - -*** - -### updateSkillData - -Update this skill's namespaced data on a FunctionResult via updateGlobalData. - -#### Signature - -```typescript -updateSkillData( - result: FunctionResult, - data: Record -): FunctionResult -``` - -#### Parameters - - - The FunctionResult to update. - - - - The data to store under this skill's namespace. - - -#### Returns - -`FunctionResult` — The FunctionResult for chaining. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 462. - -*** - -### validateEnvVars - -Validate that all required environment variables declared on the skill class -are set in the current process environment. - -Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` -directly. TS reads the same static from the class. - -Returns the list of missing variable names so callers can produce actionable -error messages. This differs from Python's `validate_env_vars() -> bool` -return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/agents/skills/builtin/custom-skills/custom-skills-skill#has-all-env-vars) is the boolean equivalent. - -#### Signature - -```typescript -validateEnvVars(): string[] -``` - -#### Returns - -`string[]` — Array of missing environment variable names (empty if all are present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 486. - -*** - -### validatePackages - -Validate that all required packages declared on the skill class can be imported. - -Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` -directly and tries `importlib.import_module(pkg)` for each; TS does the -equivalent with a dynamic `import()`. - -#### Signature - -```typescript -validatePackages(): Promise -``` - -#### Returns - -`Promise` — Array of package names that could not be imported (empty if all present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 557. - -## Source - -[`src/skills/builtin/custom_skills.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/custom_skills.ts) - -Line 94. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/custom-skills/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/custom-skills/index.mdx index 94dcc565e1..e5c61e5120 100644 --- a/fern/products/sdk-reference/typescript/agents/skills/builtin/custom-skills/index.mdx +++ b/fern/products/sdk-reference/typescript/agents/skills/builtin/custom-skills/index.mdx @@ -5,7 +5,7 @@ sdk_label: "TypeScript SDK" icon: "typescript" lustri: auto_generated: true - kind: "module" + kind: "class" language: "typescript" qualified_name: "skills.builtin.custom_skills" parent: "skills.builtin" @@ -14,19 +14,730 @@ lustri: --- # `custom_skills` +A meta-skill that registers user-defined tools from configuration. + +Tier 2 built-in skill with no external dependencies. Allows users to define +arbitrary tools via config without writing skill classes. Each tool definition +specifies a name, description, parameters, and a JavaScript handler function +body that is compiled via the Function constructor at instantiation time. + +**Security warning:** This skill uses `new Function()` to compile user-provided +code at runtime. It is gated behind the `SWML_ALLOW_CUSTOM_HANDLER_CODE=true` +environment variable to prevent unintended code execution. + ## Signature ```typescript -module custom_skills +class CustomSkillsSkill extends SkillBase +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/agents/skills/skill-base) + +## Examples + +```typescript +// Requires SWML_ALLOW_CUSTOM_HANDLER_CODE=true +agent.addSkill('custom_skills', { + tools: [ + { + name: 'echo', + description: 'Echo back the caller-supplied message.', + parameters: { type: 'object', properties: { msg: { type: 'string' } } }, + handlerBody: 'return new FunctionResult(args.msg);', + }, + ], +}); +``` + +## Properties + + + Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. + + + + Configuration options provided at construction time. + + + + Unique identifier for this skill instance (includes timestamp and random bytes). + + + + Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. + + + + Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. + + + + Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. + + + + Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. + + + + Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. + + + + Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. + + + + The registered name of this skill type. + + + + Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. + + + + Additional SWAIG fields extracted from config, merged into tool definitions. + + +## Methods + +### cleanup + +Cleanup resources. Called when the skill is removed from an agent. + +#### Signature + +```typescript +cleanup(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 469. + +*** + +### constructor + +#### Signature + +```typescript +constructor(config?: SkillConfig): CustomSkillsSkill +``` + +#### Parameters + + + Configuration object containing a `tools` array of custom tool definitions. + + +#### Returns + +`CustomSkillsSkill` + +#### Source + +[`src/skills/builtin/custom_skills.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/custom_skills.ts) + +Line 106. + +*** + +### defineTool + +Imperatively register a tool with this skill. + +Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. +Merges `this.swaigFields` into the tool definition (explicit fields on +`toolDef` take precedence), then pushes the result into `_dynamicTools` +so the default `getTools()` returns it at SWML render time. + +Intended for skills whose tool shape depends on config evaluated at +`setup()` time. Skills with a static tool list should override +`getTools()` instead. + +#### Signature + +```typescript +defineTool(toolDef: SkillToolDefinition): void +``` + +#### Parameters + + + The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 351. + +*** + +### getAgent + +Return the agent that owns this skill, asserting it is non-null. +Equivalent to accessing `self.agent` in Python, where the agent reference +is always set before `setup()` is called. + +The SkillManager lifecycle guarantees that `setAgent()` is called before +`setup()`, so this method is safe to use inside `setup()` and in any +tool handler invoked during an active agent session. + +#### Signature + +```typescript +getAgent(): AgentBase +``` + +#### Returns + +`AgentBase` — The owning `AgentBase` instance. + +#### Throws + +- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 261. + +*** + +### getCompilationErrors + +Get handler compilation errors for diagnostic purposes. + +#### Signature + +```typescript +getCompilationErrors(): Map +``` + +#### Returns + +`Map` — A copy of the map from tool name to error message. + +#### Source + +[`src/skills/builtin/custom_skills.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/custom_skills.ts) + +Line 315. + +*** + +### getConfig + +Get a configuration value by key, falling back to a default if not set. + +#### Signature + +```typescript +getConfig(key: string, defaultValue?: T): T +``` + +#### Type Parameters + + + +#### Parameters + + + The configuration key to look up. + + + + Value to return if the key is not present. + + +#### Returns + +`T` — The configuration value cast to type T, or the default value. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 524. + +*** + +### getDataMapTools + +Optional DataMap-style tool definitions. Skills that build their own +SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them +here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. + +Python equivalent: the direct `self.agent.register_swaig_function(fn)` +call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). +Default returns `[]` — skills using only the declarative `getTools()` path +do not need to override this. + +#### Signature + +```typescript +getDataMapTools(): Record[] +``` + +#### Returns + +`Record[]` — Array of fully-built SWAIG function dicts. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 372. + +*** + +### getGlobalData + +Get global data to merge into the agent's global data store. + +#### Signature + +```typescript +getGlobalData(): Record +``` + +#### Returns + +`Record` — Key-value pairs to be merged into the agent's global data. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 410. + +*** + +### getHints + +Get speech recognition hints relevant to this skill. + +#### Signature + +```typescript +getHints(): string[] +``` + +#### Returns + +`string[]` — Array of hint strings to improve speech recognition accuracy. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 402. + +*** + +### getInstanceKey + +Get the instance key used for deduplication in the SkillManager. + +For single-instance skills (`SUPPORTS_MULTIPLE_INSTANCES = false`), returns +the skill name. For multi-instance skills, returns `${skillName}_${toolName}` +using the `tool_name` config (falls back to the skill name). + +Matches Python's `SkillBase.get_instance_key()` default (`skill_base.py:141-146`). +Multi-instance subclasses only need to override when their key derivation +depends on config beyond `tool_name`. + +#### Signature + +```typescript +getInstanceKey(): string +``` + +#### Returns + +`string` — A unique key identifying this skill instance. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 427. + +*** + +### getParameterSchema + +Get the parameter schema for this skill class, describing all accepted configuration options. +Subclasses should override and call `super.getParameterSchema()` to include base parameters. + +Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): +returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a +`tool_name` entry with `default: cls.SKILL_NAME` for classes with +`SUPPORTS_MULTIPLE_INSTANCES = true`. + +**Modifiers:** `static` + +#### Signature + +```typescript +getParameterSchema(): Record +``` + +#### Returns + +`Record` — Record mapping parameter names to their schema entries. + +#### Source + +[`src/skills/builtin/custom_skills.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/custom_skills.ts) + +Line 111. + +*** + +### getPromptSections + +Get prompt sections to inject into the agent's system prompt. +Respects the `skip_prompt` config option — returns `[]` if set to `true`. +Subclasses should override `_getPromptSections()` instead of this method. + +#### Signature + +```typescript +getPromptSections(): SkillPromptSection[] +``` + +#### Returns + +`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 382. + +*** + +### getSkillData + +Read this skill's data from a raw call data object's global\_data. + +#### Signature + +```typescript +getSkillData(rawData: Record): Record +``` + +#### Parameters + + + The raw request data containing global\_data. + + +#### Returns + +`Record` — The skill's stored data, or an empty object if not found. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 450. + +*** + +### getSkillNamespace + +Get the namespaced key for storing per-skill data in global\_data. + +#### Signature + +```typescript +getSkillNamespace(): string +``` + +#### Returns + +`string` — A string like "skill:datetime" or "skill:my\_prefix". + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 440. + +*** + +### getTools + +#### Signature + +```typescript +getTools(): SkillToolDefinition[] +``` + +#### Returns + +`SkillToolDefinition[]` — Array of dynamically generated tools from the configuration, with compiled handlers. + +#### Source + +[`src/skills/builtin/custom_skills.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/custom_skills.ts) + +Line 181. + +*** + +### hasAllEnvVars + +Check if all required environment variables are present. +Convenience wrapper around `validateEnvVars()` that returns a boolean, +matching the Python `validate_env_vars() -> bool` return type. + +#### Signature + +```typescript +hasAllEnvVars(): boolean ``` -## Classes +#### Returns + +`boolean` — `true` if all required env vars are set, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 544. + +*** + +### hasAllPackages + +Check if all required packages declared in the manifest are available. +Convenience wrapper around `validatePackages()` that returns a boolean, +matching the Python `validate_packages() -> bool` return type. + +#### Signature + +```typescript +hasAllPackages(): Promise +``` + +#### Returns + +`Promise` — `true` if all required packages are importable, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 579. + +*** + +### isInitialized + +Check if the skill has been initialized by the SkillManager. + +#### Signature + +```typescript +isInitialized(): boolean +``` + +#### Returns + +`boolean` — True if setup() has completed and the skill is marked initialized. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 507. + +*** + +### markInitialized + +Mark the skill as initialized (called by SkillManager). + +#### Signature + +```typescript +markInitialized(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 514. + +*** + +### setAgent + +Set the agent reference for this skill. +Called by the SkillManager/AgentBase when the skill is attached to an agent. +Python equivalent: `self.agent = agent` in `__init__`. + +#### Signature + +```typescript +setAgent(agent: AgentBase): void +``` + +#### Parameters + + + The agent that owns this skill. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 534. + +*** + +### setup + +Setup the skill. Called when the skill is added to an agent. +Override to perform initialization (API connections, config validation, etc.) + +#### Signature + +```typescript +setup(): Promise +``` + +#### Returns + +`Promise` — `true` if setup succeeded, `false` otherwise. Python equivalent: abstract `setup() -> bool`. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 313. + +*** + +### updateSkillData + +Update this skill's namespaced data on a FunctionResult via updateGlobalData. + +#### Signature + +```typescript +updateSkillData( + result: FunctionResult, + data: Record +): FunctionResult +``` + +#### Parameters + + + The FunctionResult to update. + + + + The data to store under this skill's namespace. + + +#### Returns + +`FunctionResult` — The FunctionResult for chaining. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 462. + +*** + +### validateEnvVars + +Validate that all required environment variables declared on the skill class +are set in the current process environment. + +Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` +directly. TS reads the same static from the class. + +Returns the list of missing variable names so callers can produce actionable +error messages. This differs from Python's `validate_env_vars() -> bool` +return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/agents/skills/builtin/custom-skills#has-all-env-vars) is the boolean equivalent. + +#### Signature + +```typescript +validateEnvVars(): string[] +``` + +#### Returns + +`string[]` — Array of missing environment variable names (empty if all are present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 486. + +*** + +### validatePackages + +Validate that all required packages declared on the skill class can be imported. + +Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` +directly and tries `importlib.import_module(pkg)` for each; TS does the +equivalent with a dynamic `import()`. + +#### Signature + +```typescript +validatePackages(): Promise +``` + +#### Returns + +`Promise` — Array of package names that could not be imported (empty if all present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - - - A meta-skill that registers user-defined tools from configuration. - - +Line 557. ## Functions @@ -60,4 +771,4 @@ Line 325. [`src/skills/builtin/custom_skills.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/custom_skills.ts) -Line 1. +Line 94. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/datasphere-serverless/data-sphere-serverless-skill/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/datasphere-serverless/data-sphere-serverless-skill/index.mdx deleted file mode 100644 index 6f4dd9935b..0000000000 --- a/fern/products/sdk-reference/typescript/agents/skills/builtin/datasphere-serverless/data-sphere-serverless-skill/index.mdx +++ /dev/null @@ -1,716 +0,0 @@ ---- -slug: "/reference/typescript/agents/skills/builtin/datasphere-serverless/data-sphere-serverless-skill" -title: "DataSphereServerlessSkill" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "skills.builtin.datasphere_serverless.DataSphereServerlessSkill" - parent: "skills.builtin.datasphere_serverless" - module: "agents.skills.builtin.datasphere_serverless" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere_serverless.ts" ---- -# `DataSphereServerlessSkill` - -Searches SignalWire DataSphere using a server-side DataMap for serverless execution. - -Tier 3 built-in skill that generates a DataMap configuration SignalWire -executes directly, without a webhook endpoint. Supports `document_id`, -`count`, `distance`, `tags`, `language`, `pos_to_expand`, `max_synonyms`, -and `no_results_message` config options. - -## Signature - -```typescript -class DataSphereServerlessSkill extends SkillBase -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/agents/skills/skill-base) - -## Examples - -```typescript -agent.addSkill('datasphere_serverless', { - document_id: 'doc_abc123', - count: 3, -}); -``` - -## Properties - - - Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. - - - - Configuration options provided at construction time. - - - - Unique identifier for this skill instance (includes timestamp and random bytes). - - - - Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. - - - - Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. - - - - Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. - - - - Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. - - - - Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. - - - - Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. - - - - The registered name of this skill type. - - - - Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. - - - - Additional SWAIG fields extracted from config, merged into tool definitions. - - -## Methods - -### cleanup - -Cleanup resources. Called when the skill is removed from an agent. - -#### Signature - -```typescript -cleanup(): Promise -``` - -#### Returns - -`Promise` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 469. - -*** - -### constructor - -Create a new skill instance. - -Python parity: `core/skill_base.py:32-43`. -Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` -is left as `None` on the subclass. TS throws the equivalent when the static -defaults haven't been overridden. - -#### Signature - -```typescript -constructor(config?: SkillConfig): DataSphereServerlessSkill -``` - -#### Parameters - - - Optional configuration key-value pairs (Python: `params`). - - -#### Returns - -`DataSphereServerlessSkill` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 282. - -*** - -### defineTool - -Imperatively register a tool with this skill. - -Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. -Merges `this.swaigFields` into the tool definition (explicit fields on -`toolDef` take precedence), then pushes the result into `_dynamicTools` -so the default `getTools()` returns it at SWML render time. - -Intended for skills whose tool shape depends on config evaluated at -`setup()` time. Skills with a static tool list should override -`getTools()` instead. - -#### Signature - -```typescript -defineTool(toolDef: SkillToolDefinition): void -``` - -#### Parameters - - - The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 351. - -*** - -### getAgent - -Return the agent that owns this skill, asserting it is non-null. -Equivalent to accessing `self.agent` in Python, where the agent reference -is always set before `setup()` is called. - -The SkillManager lifecycle guarantees that `setAgent()` is called before -`setup()`, so this method is safe to use inside `setup()` and in any -tool handler invoked during an active agent session. - -#### Signature - -```typescript -getAgent(): AgentBase -``` - -#### Returns - -`AgentBase` — The owning `AgentBase` instance. - -#### Throws - -- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 261. - -*** - -### getConfig - -Get a configuration value by key, falling back to a default if not set. - -#### Signature - -```typescript -getConfig(key: string, defaultValue?: T): T -``` - -#### Type Parameters - - - -#### Parameters - - - The configuration key to look up. - - - - Value to return if the key is not present. - - -#### Returns - -`T` — The configuration value cast to type T, or the default value. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 524. - -*** - -### getDataMapTools - -Get DataMap-based tool definitions for server-side execution. -These are registered directly in the SWML output as data\_map functions -rather than as webhook-backed SWAIG tools. - -#### Signature - -```typescript -getDataMapTools(): Record[] -``` - -#### Returns - -`Record[]` — Array containing the DataSphere search DataMap function definition. - -#### Source - -[`src/skills/builtin/datasphere_serverless.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere_serverless.ts) - -Line 317. - -*** - -### getGlobalData - -Global data injected into the agent's SWML/SWAIG context. Matches -Python's `get_global_data()` shape so downstream consumers can -detect DataSphere availability. - -#### Signature - -```typescript -getGlobalData(): Record -``` - -#### Returns - -`Record` - -#### Source - -[`src/skills/builtin/datasphere_serverless.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere_serverless.ts) - -Line 164. - -*** - -### getHints - -Get speech recognition hints relevant to this skill. - -#### Signature - -```typescript -getHints(): string[] -``` - -#### Returns - -`string[]` — Array of hint strings to improve speech recognition accuracy. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 402. - -*** - -### getInstanceKey - -Instance key for the SkillManager. Defaults to -`datasphere_serverless_search_knowledge`, matching the Python SDK default. -When `tool_name` is set, uses `datasphere_serverless_`. - -#### Signature - -```typescript -getInstanceKey(): string -``` - -#### Returns - -`string` - -#### Source - -[`src/skills/builtin/datasphere_serverless.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere_serverless.ts) - -Line 135. - -*** - -### getParameterSchema - -Get the parameter schema for this skill class, describing all accepted configuration options. -Subclasses should override and call `super.getParameterSchema()` to include base parameters. - -Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): -returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a -`tool_name` entry with `default: cls.SKILL_NAME` for classes with -`SUPPORTS_MULTIPLE_INSTANCES = true`. - -**Modifiers:** `static` - -#### Signature - -```typescript -getParameterSchema(): Record -``` - -#### Returns - -`Record` — Record mapping parameter names to their schema entries. - -#### Source - -[`src/skills/builtin/datasphere_serverless.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere_serverless.ts) - -Line 55. - -*** - -### getPromptSections - -Get prompt sections to inject into the agent's system prompt. -Respects the `skip_prompt` config option — returns `[]` if set to `true`. -Subclasses should override `_getPromptSections()` instead of this method. - -#### Signature - -```typescript -getPromptSections(): SkillPromptSection[] -``` - -#### Returns - -`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 382. - -*** - -### getSkillData - -Read this skill's data from a raw call data object's global\_data. - -#### Signature - -```typescript -getSkillData(rawData: Record): Record -``` - -#### Parameters - - - The raw request data containing global\_data. - - -#### Returns - -`Record` — The skill's stored data, or an empty object if not found. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 450. - -*** - -### getSkillNamespace - -Get the namespaced key for storing per-skill data in global\_data. - -#### Signature - -```typescript -getSkillNamespace(): string -``` - -#### Returns - -`string` — A string like "skill:datetime" or "skill:my\_prefix". - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 440. - -*** - -### getTools - -Return a stub tool definition since this skill uses DataMap-based execution. -The actual DataMap function is provided by getDataMapTools(). - -#### Signature - -```typescript -getTools(): SkillToolDefinition[] -``` - -#### Returns - -`SkillToolDefinition[]` — A single stub tool (named via `tool_name`) that explains its DataMap nature. - -#### Source - -[`src/skills/builtin/datasphere_serverless.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere_serverless.ts) - -Line 287. - -*** - -### hasAllEnvVars - -Check if all required environment variables are present. -Convenience wrapper around `validateEnvVars()` that returns a boolean, -matching the Python `validate_env_vars() -> bool` return type. - -#### Signature - -```typescript -hasAllEnvVars(): boolean -``` - -#### Returns - -`boolean` — `true` if all required env vars are set, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 544. - -*** - -### hasAllPackages - -Check if all required packages declared in the manifest are available. -Convenience wrapper around `validatePackages()` that returns a boolean, -matching the Python `validate_packages() -> bool` return type. - -#### Signature - -```typescript -hasAllPackages(): Promise -``` - -#### Returns - -`Promise` — `true` if all required packages are importable, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 579. - -*** - -### isInitialized - -Check if the skill has been initialized by the SkillManager. - -#### Signature - -```typescript -isInitialized(): boolean -``` - -#### Returns - -`boolean` — True if setup() has completed and the skill is marked initialized. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 507. - -*** - -### markInitialized - -Mark the skill as initialized (called by SkillManager). - -#### Signature - -```typescript -markInitialized(): void -``` - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 514. - -*** - -### setAgent - -Set the agent reference for this skill. -Called by the SkillManager/AgentBase when the skill is attached to an agent. -Python equivalent: `self.agent = agent` in `__init__`. - -#### Signature - -```typescript -setAgent(agent: AgentBase): void -``` - -#### Parameters - - - The agent that owns this skill. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 534. - -*** - -### setup - -Validate required configuration parameters before the skill becomes active. - -Mirrors Python's `setup()` which checks `space_name`, `project_id`, `token`, -and `document_id` and returns `False` (logging an error) if any are absent. - -#### Signature - -```typescript -setup(): Promise -``` - -#### Returns - -`Promise` — `true` if all required params are present, `false` otherwise. - -#### Source - -[`src/skills/builtin/datasphere_serverless.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere_serverless.ts) - -Line 147. - -*** - -### updateSkillData - -Update this skill's namespaced data on a FunctionResult via updateGlobalData. - -#### Signature - -```typescript -updateSkillData( - result: FunctionResult, - data: Record -): FunctionResult -``` - -#### Parameters - - - The FunctionResult to update. - - - - The data to store under this skill's namespace. - - -#### Returns - -`FunctionResult` — The FunctionResult for chaining. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 462. - -*** - -### validateEnvVars - -Validate that all required environment variables declared on the skill class -are set in the current process environment. - -Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` -directly. TS reads the same static from the class. - -Returns the list of missing variable names so callers can produce actionable -error messages. This differs from Python's `validate_env_vars() -> bool` -return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/agents/skills/builtin/datasphere-serverless/data-sphere-serverless-skill#has-all-env-vars) is the boolean equivalent. - -#### Signature - -```typescript -validateEnvVars(): string[] -``` - -#### Returns - -`string[]` — Array of missing environment variable names (empty if all are present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 486. - -*** - -### validatePackages - -Validate that all required packages declared on the skill class can be imported. - -Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` -directly and tries `importlib.import_module(pkg)` for each; TS does the -equivalent with a dynamic `import()`. - -#### Signature - -```typescript -validatePackages(): Promise -``` - -#### Returns - -`Promise` — Array of package names that could not be imported (empty if all present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 557. - -## Source - -[`src/skills/builtin/datasphere_serverless.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere_serverless.ts) - -Line 45. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/datasphere-serverless/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/datasphere-serverless/index.mdx index e8b69273de..873de9aa4a 100644 --- a/fern/products/sdk-reference/typescript/agents/skills/builtin/datasphere-serverless/index.mdx +++ b/fern/products/sdk-reference/typescript/agents/skills/builtin/datasphere-serverless/index.mdx @@ -5,7 +5,7 @@ sdk_label: "TypeScript SDK" icon: "typescript" lustri: auto_generated: true - kind: "module" + kind: "class" language: "typescript" qualified_name: "skills.builtin.datasphere_serverless" parent: "skills.builtin" @@ -14,19 +14,700 @@ lustri: --- # `datasphere_serverless` +Searches SignalWire DataSphere using a server-side DataMap for serverless execution. + +Tier 3 built-in skill that generates a DataMap configuration SignalWire +executes directly, without a webhook endpoint. Supports `document_id`, +`count`, `distance`, `tags`, `language`, `pos_to_expand`, `max_synonyms`, +and `no_results_message` config options. + ## Signature ```typescript -module datasphere_serverless +class DataSphereServerlessSkill extends SkillBase +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/agents/skills/skill-base) + +## Examples + +```typescript +agent.addSkill('datasphere_serverless', { + document_id: 'doc_abc123', + count: 3, +}); +``` + +## Properties + + + Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. + + + + Configuration options provided at construction time. + + + + Unique identifier for this skill instance (includes timestamp and random bytes). + + + + Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. + + + + Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. + + + + Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. + + + + Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. + + + + Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. + + + + Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. + + + + The registered name of this skill type. + + + + Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. + + + + Additional SWAIG fields extracted from config, merged into tool definitions. + + +## Methods + +### cleanup + +Cleanup resources. Called when the skill is removed from an agent. + +#### Signature + +```typescript +cleanup(): Promise ``` -## Classes +#### Returns + +`Promise` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 469. + +*** + +### constructor + +Create a new skill instance. + +Python parity: `core/skill_base.py:32-43`. +Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` +is left as `None` on the subclass. TS throws the equivalent when the static +defaults haven't been overridden. + +#### Signature + +```typescript +constructor(config?: SkillConfig): DataSphereServerlessSkill +``` + +#### Parameters + + + Optional configuration key-value pairs (Python: `params`). + + +#### Returns + +`DataSphereServerlessSkill` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 282. + +*** + +### defineTool + +Imperatively register a tool with this skill. + +Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. +Merges `this.swaigFields` into the tool definition (explicit fields on +`toolDef` take precedence), then pushes the result into `_dynamicTools` +so the default `getTools()` returns it at SWML render time. + +Intended for skills whose tool shape depends on config evaluated at +`setup()` time. Skills with a static tool list should override +`getTools()` instead. + +#### Signature + +```typescript +defineTool(toolDef: SkillToolDefinition): void +``` + +#### Parameters + + + The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 351. + +*** + +### getAgent + +Return the agent that owns this skill, asserting it is non-null. +Equivalent to accessing `self.agent` in Python, where the agent reference +is always set before `setup()` is called. + +The SkillManager lifecycle guarantees that `setAgent()` is called before +`setup()`, so this method is safe to use inside `setup()` and in any +tool handler invoked during an active agent session. + +#### Signature + +```typescript +getAgent(): AgentBase +``` + +#### Returns + +`AgentBase` — The owning `AgentBase` instance. + +#### Throws + +- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 261. + +*** + +### getConfig + +Get a configuration value by key, falling back to a default if not set. + +#### Signature + +```typescript +getConfig(key: string, defaultValue?: T): T +``` + +#### Type Parameters + + + +#### Parameters + + + The configuration key to look up. + + + + Value to return if the key is not present. + + +#### Returns + +`T` — The configuration value cast to type T, or the default value. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 524. + +*** + +### getDataMapTools + +Get DataMap-based tool definitions for server-side execution. +These are registered directly in the SWML output as data\_map functions +rather than as webhook-backed SWAIG tools. + +#### Signature + +```typescript +getDataMapTools(): Record[] +``` + +#### Returns + +`Record[]` — Array containing the DataSphere search DataMap function definition. + +#### Source + +[`src/skills/builtin/datasphere_serverless.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere_serverless.ts) + +Line 317. + +*** + +### getGlobalData + +Global data injected into the agent's SWML/SWAIG context. Matches +Python's `get_global_data()` shape so downstream consumers can +detect DataSphere availability. + +#### Signature + +```typescript +getGlobalData(): Record +``` + +#### Returns + +`Record` + +#### Source + +[`src/skills/builtin/datasphere_serverless.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere_serverless.ts) + +Line 164. + +*** + +### getHints + +Get speech recognition hints relevant to this skill. + +#### Signature + +```typescript +getHints(): string[] +``` + +#### Returns + +`string[]` — Array of hint strings to improve speech recognition accuracy. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 402. + +*** + +### getInstanceKey + +Instance key for the SkillManager. Defaults to +`datasphere_serverless_search_knowledge`, matching the Python SDK default. +When `tool_name` is set, uses `datasphere_serverless_`. + +#### Signature + +```typescript +getInstanceKey(): string +``` + +#### Returns + +`string` + +#### Source + +[`src/skills/builtin/datasphere_serverless.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere_serverless.ts) + +Line 135. + +*** + +### getParameterSchema + +Get the parameter schema for this skill class, describing all accepted configuration options. +Subclasses should override and call `super.getParameterSchema()` to include base parameters. + +Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): +returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a +`tool_name` entry with `default: cls.SKILL_NAME` for classes with +`SUPPORTS_MULTIPLE_INSTANCES = true`. + +**Modifiers:** `static` + +#### Signature + +```typescript +getParameterSchema(): Record +``` + +#### Returns + +`Record` — Record mapping parameter names to their schema entries. + +#### Source + +[`src/skills/builtin/datasphere_serverless.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere_serverless.ts) + +Line 55. + +*** + +### getPromptSections + +Get prompt sections to inject into the agent's system prompt. +Respects the `skip_prompt` config option — returns `[]` if set to `true`. +Subclasses should override `_getPromptSections()` instead of this method. + +#### Signature + +```typescript +getPromptSections(): SkillPromptSection[] +``` + +#### Returns + +`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 382. + +*** + +### getSkillData + +Read this skill's data from a raw call data object's global\_data. + +#### Signature + +```typescript +getSkillData(rawData: Record): Record +``` + +#### Parameters + + + The raw request data containing global\_data. + + +#### Returns + +`Record` — The skill's stored data, or an empty object if not found. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 450. + +*** + +### getSkillNamespace + +Get the namespaced key for storing per-skill data in global\_data. + +#### Signature + +```typescript +getSkillNamespace(): string +``` + +#### Returns + +`string` — A string like "skill:datetime" or "skill:my\_prefix". + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 440. + +*** + +### getTools + +Return a stub tool definition since this skill uses DataMap-based execution. +The actual DataMap function is provided by getDataMapTools(). + +#### Signature + +```typescript +getTools(): SkillToolDefinition[] +``` + +#### Returns + +`SkillToolDefinition[]` — A single stub tool (named via `tool_name`) that explains its DataMap nature. + +#### Source + +[`src/skills/builtin/datasphere_serverless.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere_serverless.ts) + +Line 287. + +*** + +### hasAllEnvVars + +Check if all required environment variables are present. +Convenience wrapper around `validateEnvVars()` that returns a boolean, +matching the Python `validate_env_vars() -> bool` return type. + +#### Signature + +```typescript +hasAllEnvVars(): boolean +``` + +#### Returns + +`boolean` — `true` if all required env vars are set, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 544. + +*** + +### hasAllPackages + +Check if all required packages declared in the manifest are available. +Convenience wrapper around `validatePackages()` that returns a boolean, +matching the Python `validate_packages() -> bool` return type. + +#### Signature + +```typescript +hasAllPackages(): Promise +``` + +#### Returns + +`Promise` — `true` if all required packages are importable, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 579. + +*** + +### isInitialized + +Check if the skill has been initialized by the SkillManager. + +#### Signature + +```typescript +isInitialized(): boolean +``` + +#### Returns + +`boolean` — True if setup() has completed and the skill is marked initialized. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 507. + +*** + +### markInitialized + +Mark the skill as initialized (called by SkillManager). + +#### Signature + +```typescript +markInitialized(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 514. + +*** + +### setAgent + +Set the agent reference for this skill. +Called by the SkillManager/AgentBase when the skill is attached to an agent. +Python equivalent: `self.agent = agent` in `__init__`. + +#### Signature + +```typescript +setAgent(agent: AgentBase): void +``` + +#### Parameters + + + The agent that owns this skill. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 534. + +*** + +### setup + +Validate required configuration parameters before the skill becomes active. + +Mirrors Python's `setup()` which checks `space_name`, `project_id`, `token`, +and `document_id` and returns `False` (logging an error) if any are absent. + +#### Signature + +```typescript +setup(): Promise +``` + +#### Returns + +`Promise` — `true` if all required params are present, `false` otherwise. + +#### Source + +[`src/skills/builtin/datasphere_serverless.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere_serverless.ts) + +Line 147. + +*** + +### updateSkillData + +Update this skill's namespaced data on a FunctionResult via updateGlobalData. + +#### Signature + +```typescript +updateSkillData( + result: FunctionResult, + data: Record +): FunctionResult +``` + +#### Parameters + + + The FunctionResult to update. + + + + The data to store under this skill's namespace. + + +#### Returns + +`FunctionResult` — The FunctionResult for chaining. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 462. + +*** + +### validateEnvVars + +Validate that all required environment variables declared on the skill class +are set in the current process environment. + +Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` +directly. TS reads the same static from the class. + +Returns the list of missing variable names so callers can produce actionable +error messages. This differs from Python's `validate_env_vars() -> bool` +return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/agents/skills/builtin/datasphere-serverless#has-all-env-vars) is the boolean equivalent. + +#### Signature + +```typescript +validateEnvVars(): string[] +``` + +#### Returns + +`string[]` — Array of missing environment variable names (empty if all are present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 486. + +*** + +### validatePackages + +Validate that all required packages declared on the skill class can be imported. + +Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` +directly and tries `importlib.import_module(pkg)` for each; TS does the +equivalent with a dynamic `import()`. + +#### Signature + +```typescript +validatePackages(): Promise +``` + +#### Returns + +`Promise` — Array of package names that could not be imported (empty if all present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - - - Searches SignalWire DataSphere using a server-side DataMap for serverless execution. - - +Line 557. ## Functions @@ -60,4 +741,4 @@ Line 345. [`src/skills/builtin/datasphere_serverless.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere_serverless.ts) -Line 1. +Line 45. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/datasphere/data-sphere-skill/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/datasphere/data-sphere-skill/index.mdx deleted file mode 100644 index 62480fd000..0000000000 --- a/fern/products/sdk-reference/typescript/agents/skills/builtin/datasphere/data-sphere-skill/index.mdx +++ /dev/null @@ -1,721 +0,0 @@ ---- -slug: "/reference/typescript/agents/skills/builtin/datasphere/data-sphere-skill" -title: "DataSphereSkill" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "skills.builtin.datasphere.DataSphereSkill" - parent: "skills.builtin.datasphere" - module: "agents.skills.builtin.datasphere" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere.ts" ---- -# `DataSphereSkill` - -Searches SignalWire DataSphere for knowledge base content using semantic search. - -Tier 3 built-in skill. Credentials can be supplied via params or fall back to -`SIGNALWIRE_PROJECT_ID`, `SIGNALWIRE_TOKEN`, and `SIGNALWIRE_SPACE` environment -variables. Supports `count`, `distance`, `tags`, `language`, `pos_to_expand`, -`max_synonyms`, and `no_results_message` config options. - -## Signature - -```typescript -class DataSphereSkill extends SkillBase -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/agents/skills/skill-base) - -## Examples - -```typescript -agent.addSkill('datasphere', { - document_id: 'doc_abc123', - count: 3, - tags: ['faq'], -}); -``` - -## Properties - - - Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. - - - - Configuration options provided at construction time. - - - - Unique identifier for this skill instance (includes timestamp and random bytes). - - - - Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. - - - - Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. - - - - Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. - - - - Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. - - - - Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. - - - - Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. - - - - The registered name of this skill type. - - - - Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. - - - - Additional SWAIG fields extracted from config, merged into tool definitions. - - -## Methods - -### cleanup - -Cleanup resources. Called when the skill is removed from an agent. - -#### Signature - -```typescript -cleanup(): Promise -``` - -#### Returns - -`Promise` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 469. - -*** - -### constructor - -Create a new skill instance. - -Python parity: `core/skill_base.py:32-43`. -Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` -is left as `None` on the subclass. TS throws the equivalent when the static -defaults haven't been overridden. - -#### Signature - -```typescript -constructor(config?: SkillConfig): DataSphereSkill -``` - -#### Parameters - - - Optional configuration key-value pairs (Python: `params`). - - -#### Returns - -`DataSphereSkill` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 282. - -*** - -### defineTool - -Imperatively register a tool with this skill. - -Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. -Merges `this.swaigFields` into the tool definition (explicit fields on -`toolDef` take precedence), then pushes the result into `_dynamicTools` -so the default `getTools()` returns it at SWML render time. - -Intended for skills whose tool shape depends on config evaluated at -`setup()` time. Skills with a static tool list should override -`getTools()` instead. - -#### Signature - -```typescript -defineTool(toolDef: SkillToolDefinition): void -``` - -#### Parameters - - - The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 351. - -*** - -### getAgent - -Return the agent that owns this skill, asserting it is non-null. -Equivalent to accessing `self.agent` in Python, where the agent reference -is always set before `setup()` is called. - -The SkillManager lifecycle guarantees that `setAgent()` is called before -`setup()`, so this method is safe to use inside `setup()` and in any -tool handler invoked during an active agent session. - -#### Signature - -```typescript -getAgent(): AgentBase -``` - -#### Returns - -`AgentBase` — The owning `AgentBase` instance. - -#### Throws - -- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 261. - -*** - -### getConfig - -Get a configuration value by key, falling back to a default if not set. - -#### Signature - -```typescript -getConfig(key: string, defaultValue?: T): T -``` - -#### Type Parameters - - - -#### Parameters - - - The configuration key to look up. - - - - Value to return if the key is not present. - - -#### Returns - -`T` — The configuration value cast to type T, or the default value. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 524. - -*** - -### getDataMapTools - -Optional DataMap-style tool definitions. Skills that build their own -SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them -here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. - -Python equivalent: the direct `self.agent.register_swaig_function(fn)` -call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). -Default returns `[]` — skills using only the declarative `getTools()` path -do not need to override this. - -#### Signature - -```typescript -getDataMapTools(): Record[] -``` - -#### Returns - -`Record[]` — Array of fully-built SWAIG function dicts. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 372. - -*** - -### getGlobalData - -Global data injected into the agent's SWML context. Matches Python's -`get_global_data()` so downstream consumers can detect DataSphere -availability, the configured `document_id`, and the knowledge provider. - -#### Signature - -```typescript -getGlobalData(): Record -``` - -#### Returns - -`Record` - -#### Source - -[`src/skills/builtin/datasphere.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere.ts) - -Line 179. - -*** - -### getHints - -Get speech recognition hints relevant to this skill. - -#### Signature - -```typescript -getHints(): string[] -``` - -#### Returns - -`string[]` — Array of hint strings to improve speech recognition accuracy. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 402. - -*** - -### getInstanceKey - -Instance key for the SkillManager. Defaults to `datasphere_search_knowledge`, -matching the Python SDK default. When `tool_name` is set, uses -`datasphere_`. - -#### Signature - -```typescript -getInstanceKey(): string -``` - -#### Returns - -`string` - -#### Source - -[`src/skills/builtin/datasphere.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere.ts) - -Line 169. - -*** - -### getParameterSchema - -Get the parameter schema for this skill class, describing all accepted configuration options. -Subclasses should override and call `super.getParameterSchema()` to include base parameters. - -Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): -returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a -`tool_name` entry with `default: cls.SKILL_NAME` for classes with -`SUPPORTS_MULTIPLE_INSTANCES = true`. - -**Modifiers:** `static` - -#### Signature - -```typescript -getParameterSchema(): Record -``` - -#### Returns - -`Record` — Record mapping parameter names to their schema entries. - -#### Source - -[`src/skills/builtin/datasphere.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere.ts) - -Line 81. - -*** - -### getPromptSections - -Get prompt sections to inject into the agent's system prompt. -Respects the `skip_prompt` config option — returns `[]` if set to `true`. -Subclasses should override `_getPromptSections()` instead of this method. - -#### Signature - -```typescript -getPromptSections(): SkillPromptSection[] -``` - -#### Returns - -`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 382. - -*** - -### getSkillData - -Read this skill's data from a raw call data object's global\_data. - -#### Signature - -```typescript -getSkillData(rawData: Record): Record -``` - -#### Parameters - - - The raw request data containing global\_data. - - -#### Returns - -`Record` — The skill's stored data, or an empty object if not found. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 450. - -*** - -### getSkillNamespace - -Get the namespaced key for storing per-skill data in global\_data. - -#### Signature - -```typescript -getSkillNamespace(): string -``` - -#### Returns - -`string` — A string like "skill:datetime" or "skill:my\_prefix". - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 440. - -*** - -### getTools - -#### Signature - -```typescript -getTools(): SkillToolDefinition[] -``` - -#### Returns - -`SkillToolDefinition[]` — A single tool (named via `tool_name`) that performs semantic search. - -#### Source - -[`src/skills/builtin/datasphere.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere.ts) - -Line 224. - -*** - -### hasAllEnvVars - -Check if all required environment variables are present. -Convenience wrapper around `validateEnvVars()` that returns a boolean, -matching the Python `validate_env_vars() -> bool` return type. - -#### Signature - -```typescript -hasAllEnvVars(): boolean -``` - -#### Returns - -`boolean` — `true` if all required env vars are set, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 544. - -*** - -### hasAllPackages - -Check if all required packages declared in the manifest are available. -Convenience wrapper around `validatePackages()` that returns a boolean, -matching the Python `validate_packages() -> bool` return type. - -#### Signature - -```typescript -hasAllPackages(): Promise -``` - -#### Returns - -`Promise` — `true` if all required packages are importable, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 579. - -*** - -### isInitialized - -Check if the skill has been initialized by the SkillManager. - -#### Signature - -```typescript -isInitialized(): boolean -``` - -#### Returns - -`boolean` — True if setup() has completed and the skill is marked initialized. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 507. - -*** - -### markInitialized - -Mark the skill as initialized (called by SkillManager). - -#### Signature - -```typescript -markInitialized(): void -``` - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 514. - -*** - -### setAgent - -Set the agent reference for this skill. -Called by the SkillManager/AgentBase when the skill is attached to an agent. -Python equivalent: `self.agent = agent` in `__init__`. - -#### Signature - -```typescript -setAgent(agent: AgentBase): void -``` - -#### Parameters - - - The agent that owns this skill. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 534. - -*** - -### setup - -Validate required credentials before the skill becomes active. - -Mirrors Python skills/datasphere/skill.py:120-128: `setup()` returns false -when any of `space_name`, `project_id`, `token`, or `document_id` is -missing from either config or env. Fails closed so SkillManager refuses -to register a skill that would break at call time. - -#### Signature - -```typescript -setup(): Promise -``` - -#### Returns - -`Promise` - -#### Source - -[`src/skills/builtin/datasphere.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere.ts) - -Line 195. - -*** - -### updateSkillData - -Update this skill's namespaced data on a FunctionResult via updateGlobalData. - -#### Signature - -```typescript -updateSkillData( - result: FunctionResult, - data: Record -): FunctionResult -``` - -#### Parameters - - - The FunctionResult to update. - - - - The data to store under this skill's namespace. - - -#### Returns - -`FunctionResult` — The FunctionResult for chaining. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 462. - -*** - -### validateEnvVars - -Validate that all required environment variables declared on the skill class -are set in the current process environment. - -Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` -directly. TS reads the same static from the class. - -Returns the list of missing variable names so callers can produce actionable -error messages. This differs from Python's `validate_env_vars() -> bool` -return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/agents/skills/builtin/datasphere/data-sphere-skill#has-all-env-vars) is the boolean equivalent. - -#### Signature - -```typescript -validateEnvVars(): string[] -``` - -#### Returns - -`string[]` — Array of missing environment variable names (empty if all are present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 486. - -*** - -### validatePackages - -Validate that all required packages declared on the skill class can be imported. - -Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` -directly and tries `importlib.import_module(pkg)` for each; TS does the -equivalent with a dynamic `import()`. - -#### Signature - -```typescript -validatePackages(): Promise -``` - -#### Returns - -`Promise` — Array of package names that could not be imported (empty if all present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 557. - -## Source - -[`src/skills/builtin/datasphere.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere.ts) - -Line 71. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/datasphere/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/datasphere/index.mdx index 42cdc5154a..7202224e6c 100644 --- a/fern/products/sdk-reference/typescript/agents/skills/builtin/datasphere/index.mdx +++ b/fern/products/sdk-reference/typescript/agents/skills/builtin/datasphere/index.mdx @@ -5,7 +5,7 @@ sdk_label: "TypeScript SDK" icon: "typescript" lustri: auto_generated: true - kind: "module" + kind: "class" language: "typescript" qualified_name: "skills.builtin.datasphere" parent: "skills.builtin" @@ -14,19 +14,705 @@ lustri: --- # `datasphere` +Searches SignalWire DataSphere for knowledge base content using semantic search. + +Tier 3 built-in skill. Credentials can be supplied via params or fall back to +`SIGNALWIRE_PROJECT_ID`, `SIGNALWIRE_TOKEN`, and `SIGNALWIRE_SPACE` environment +variables. Supports `count`, `distance`, `tags`, `language`, `pos_to_expand`, +`max_synonyms`, and `no_results_message` config options. + ## Signature ```typescript -module datasphere +class DataSphereSkill extends SkillBase +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/agents/skills/skill-base) + +## Examples + +```typescript +agent.addSkill('datasphere', { + document_id: 'doc_abc123', + count: 3, + tags: ['faq'], +}); +``` + +## Properties + + + Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. + + + + Configuration options provided at construction time. + + + + Unique identifier for this skill instance (includes timestamp and random bytes). + + + + Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. + + + + Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. + + + + Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. + + + + Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. + + + + Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. + + + + Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. + + + + The registered name of this skill type. + + + + Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. + + + + Additional SWAIG fields extracted from config, merged into tool definitions. + + +## Methods + +### cleanup + +Cleanup resources. Called when the skill is removed from an agent. + +#### Signature + +```typescript +cleanup(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 469. + +*** + +### constructor + +Create a new skill instance. + +Python parity: `core/skill_base.py:32-43`. +Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` +is left as `None` on the subclass. TS throws the equivalent when the static +defaults haven't been overridden. + +#### Signature + +```typescript +constructor(config?: SkillConfig): DataSphereSkill +``` + +#### Parameters + + + Optional configuration key-value pairs (Python: `params`). + + +#### Returns + +`DataSphereSkill` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 282. + +*** + +### defineTool + +Imperatively register a tool with this skill. + +Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. +Merges `this.swaigFields` into the tool definition (explicit fields on +`toolDef` take precedence), then pushes the result into `_dynamicTools` +so the default `getTools()` returns it at SWML render time. + +Intended for skills whose tool shape depends on config evaluated at +`setup()` time. Skills with a static tool list should override +`getTools()` instead. + +#### Signature + +```typescript +defineTool(toolDef: SkillToolDefinition): void +``` + +#### Parameters + + + The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 351. + +*** + +### getAgent + +Return the agent that owns this skill, asserting it is non-null. +Equivalent to accessing `self.agent` in Python, where the agent reference +is always set before `setup()` is called. + +The SkillManager lifecycle guarantees that `setAgent()` is called before +`setup()`, so this method is safe to use inside `setup()` and in any +tool handler invoked during an active agent session. + +#### Signature + +```typescript +getAgent(): AgentBase +``` + +#### Returns + +`AgentBase` — The owning `AgentBase` instance. + +#### Throws + +- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 261. + +*** + +### getConfig + +Get a configuration value by key, falling back to a default if not set. + +#### Signature + +```typescript +getConfig(key: string, defaultValue?: T): T +``` + +#### Type Parameters + + + +#### Parameters + + + The configuration key to look up. + + + + Value to return if the key is not present. + + +#### Returns + +`T` — The configuration value cast to type T, or the default value. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 524. + +*** + +### getDataMapTools + +Optional DataMap-style tool definitions. Skills that build their own +SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them +here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. + +Python equivalent: the direct `self.agent.register_swaig_function(fn)` +call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). +Default returns `[]` — skills using only the declarative `getTools()` path +do not need to override this. + +#### Signature + +```typescript +getDataMapTools(): Record[] +``` + +#### Returns + +`Record[]` — Array of fully-built SWAIG function dicts. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 372. + +*** + +### getGlobalData + +Global data injected into the agent's SWML context. Matches Python's +`get_global_data()` so downstream consumers can detect DataSphere +availability, the configured `document_id`, and the knowledge provider. + +#### Signature + +```typescript +getGlobalData(): Record +``` + +#### Returns + +`Record` + +#### Source + +[`src/skills/builtin/datasphere.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere.ts) + +Line 179. + +*** + +### getHints + +Get speech recognition hints relevant to this skill. + +#### Signature + +```typescript +getHints(): string[] +``` + +#### Returns + +`string[]` — Array of hint strings to improve speech recognition accuracy. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 402. + +*** + +### getInstanceKey + +Instance key for the SkillManager. Defaults to `datasphere_search_knowledge`, +matching the Python SDK default. When `tool_name` is set, uses +`datasphere_`. + +#### Signature + +```typescript +getInstanceKey(): string +``` + +#### Returns + +`string` + +#### Source + +[`src/skills/builtin/datasphere.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere.ts) + +Line 169. + +*** + +### getParameterSchema + +Get the parameter schema for this skill class, describing all accepted configuration options. +Subclasses should override and call `super.getParameterSchema()` to include base parameters. + +Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): +returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a +`tool_name` entry with `default: cls.SKILL_NAME` for classes with +`SUPPORTS_MULTIPLE_INSTANCES = true`. + +**Modifiers:** `static` + +#### Signature + +```typescript +getParameterSchema(): Record +``` + +#### Returns + +`Record` — Record mapping parameter names to their schema entries. + +#### Source + +[`src/skills/builtin/datasphere.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere.ts) + +Line 81. + +*** + +### getPromptSections + +Get prompt sections to inject into the agent's system prompt. +Respects the `skip_prompt` config option — returns `[]` if set to `true`. +Subclasses should override `_getPromptSections()` instead of this method. + +#### Signature + +```typescript +getPromptSections(): SkillPromptSection[] +``` + +#### Returns + +`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 382. + +*** + +### getSkillData + +Read this skill's data from a raw call data object's global\_data. + +#### Signature + +```typescript +getSkillData(rawData: Record): Record +``` + +#### Parameters + + + The raw request data containing global\_data. + + +#### Returns + +`Record` — The skill's stored data, or an empty object if not found. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 450. + +*** + +### getSkillNamespace + +Get the namespaced key for storing per-skill data in global\_data. + +#### Signature + +```typescript +getSkillNamespace(): string +``` + +#### Returns + +`string` — A string like "skill:datetime" or "skill:my\_prefix". + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 440. + +*** + +### getTools + +#### Signature + +```typescript +getTools(): SkillToolDefinition[] +``` + +#### Returns + +`SkillToolDefinition[]` — A single tool (named via `tool_name`) that performs semantic search. + +#### Source + +[`src/skills/builtin/datasphere.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere.ts) + +Line 224. + +*** + +### hasAllEnvVars + +Check if all required environment variables are present. +Convenience wrapper around `validateEnvVars()` that returns a boolean, +matching the Python `validate_env_vars() -> bool` return type. + +#### Signature + +```typescript +hasAllEnvVars(): boolean +``` + +#### Returns + +`boolean` — `true` if all required env vars are set, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 544. + +*** + +### hasAllPackages + +Check if all required packages declared in the manifest are available. +Convenience wrapper around `validatePackages()` that returns a boolean, +matching the Python `validate_packages() -> bool` return type. + +#### Signature + +```typescript +hasAllPackages(): Promise +``` + +#### Returns + +`Promise` — `true` if all required packages are importable, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 579. + +*** + +### isInitialized + +Check if the skill has been initialized by the SkillManager. + +#### Signature + +```typescript +isInitialized(): boolean +``` + +#### Returns + +`boolean` — True if setup() has completed and the skill is marked initialized. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 507. + +*** + +### markInitialized + +Mark the skill as initialized (called by SkillManager). + +#### Signature + +```typescript +markInitialized(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 514. + +*** + +### setAgent + +Set the agent reference for this skill. +Called by the SkillManager/AgentBase when the skill is attached to an agent. +Python equivalent: `self.agent = agent` in `__init__`. + +#### Signature + +```typescript +setAgent(agent: AgentBase): void +``` + +#### Parameters + + + The agent that owns this skill. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 534. + +*** + +### setup + +Validate required credentials before the skill becomes active. + +Mirrors Python skills/datasphere/skill.py:120-128: `setup()` returns false +when any of `space_name`, `project_id`, `token`, or `document_id` is +missing from either config or env. Fails closed so SkillManager refuses +to register a skill that would break at call time. + +#### Signature + +```typescript +setup(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/skills/builtin/datasphere.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere.ts) + +Line 195. + +*** + +### updateSkillData + +Update this skill's namespaced data on a FunctionResult via updateGlobalData. + +#### Signature + +```typescript +updateSkillData( + result: FunctionResult, + data: Record +): FunctionResult ``` -## Classes +#### Parameters + + + The FunctionResult to update. + + + + The data to store under this skill's namespace. + + +#### Returns + +`FunctionResult` — The FunctionResult for chaining. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 462. + +*** + +### validateEnvVars + +Validate that all required environment variables declared on the skill class +are set in the current process environment. + +Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` +directly. TS reads the same static from the class. + +Returns the list of missing variable names so callers can produce actionable +error messages. This differs from Python's `validate_env_vars() -> bool` +return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/agents/skills/builtin/datasphere#has-all-env-vars) is the boolean equivalent. + +#### Signature + +```typescript +validateEnvVars(): string[] +``` + +#### Returns + +`string[]` — Array of missing environment variable names (empty if all are present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 486. + +*** + +### validatePackages + +Validate that all required packages declared on the skill class can be imported. + +Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` +directly and tries `importlib.import_module(pkg)` for each; TS does the +equivalent with a dynamic `import()`. + +#### Signature + +```typescript +validatePackages(): Promise +``` + +#### Returns + +`Promise` — Array of package names that could not be imported (empty if all present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - - - Searches SignalWire DataSphere for knowledge base content using semantic search. - - +Line 557. ## Functions @@ -60,4 +746,4 @@ Line 457. [`src/skills/builtin/datasphere.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datasphere.ts) -Line 1. +Line 71. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/datetime/date-time-skill/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/datetime/date-time-skill/index.mdx deleted file mode 100644 index 0e2c9db5ad..0000000000 --- a/fern/products/sdk-reference/typescript/agents/skills/builtin/datetime/date-time-skill/index.mdx +++ /dev/null @@ -1,717 +0,0 @@ ---- -slug: "/reference/typescript/agents/skills/builtin/datetime/date-time-skill" -title: "DateTimeSkill" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "skills.builtin.datetime.DateTimeSkill" - parent: "skills.builtin.datetime" - module: "agents.skills.builtin.datetime" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datetime.ts" ---- -# `DateTimeSkill` - -Provides the current date and time with optional timezone support. - -Tier 1 built-in skill with no external dependencies. Supports all IANA -timezone identifiers via the Intl.DateTimeFormat API. - -Registers two SWAIG tools: `get_current_time` and `get_current_date`. - -## Signature - -```typescript -class DateTimeSkill extends SkillBase -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/agents/skills/skill-base) - -## Examples - -```typescript -agent.addSkill('datetime'); -``` - -## Properties - - - Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. - - - - Configuration options provided at construction time. - - - - Unique identifier for this skill instance (includes timestamp and random bytes). - - - - Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. - - - - Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. - - - - Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. - - - - Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. - - - - Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. - - - - Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. - - - - The registered name of this skill type. - - - - Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. - - - - Additional SWAIG fields extracted from config, merged into tool definitions. - - -## Methods - -### cleanup - -Cleanup resources. Called when the skill is removed from an agent. - -#### Signature - -```typescript -cleanup(): Promise -``` - -#### Returns - -`Promise` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 469. - -*** - -### constructor - -Create a new skill instance. - -Python parity: `core/skill_base.py:32-43`. -Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` -is left as `None` on the subclass. TS throws the equivalent when the static -defaults haven't been overridden. - -#### Signature - -```typescript -constructor(config?: SkillConfig): DateTimeSkill -``` - -#### Parameters - - - Optional configuration key-value pairs (Python: `params`). - - -#### Returns - -`DateTimeSkill` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 282. - -*** - -### defineTool - -Imperatively register a tool with this skill. - -Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. -Merges `this.swaigFields` into the tool definition (explicit fields on -`toolDef` take precedence), then pushes the result into `_dynamicTools` -so the default `getTools()` returns it at SWML render time. - -Intended for skills whose tool shape depends on config evaluated at -`setup()` time. Skills with a static tool list should override -`getTools()` instead. - -#### Signature - -```typescript -defineTool(toolDef: SkillToolDefinition): void -``` - -#### Parameters - - - The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 351. - -*** - -### getAgent - -Return the agent that owns this skill, asserting it is non-null. -Equivalent to accessing `self.agent` in Python, where the agent reference -is always set before `setup()` is called. - -The SkillManager lifecycle guarantees that `setAgent()` is called before -`setup()`, so this method is safe to use inside `setup()` and in any -tool handler invoked during an active agent session. - -#### Signature - -```typescript -getAgent(): AgentBase -``` - -#### Returns - -`AgentBase` — The owning `AgentBase` instance. - -#### Throws - -- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 261. - -*** - -### getConfig - -Get a configuration value by key, falling back to a default if not set. - -#### Signature - -```typescript -getConfig(key: string, defaultValue?: T): T -``` - -#### Type Parameters - - - -#### Parameters - - - The configuration key to look up. - - - - Value to return if the key is not present. - - -#### Returns - -`T` — The configuration value cast to type T, or the default value. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 524. - -*** - -### getDataMapTools - -Optional DataMap-style tool definitions. Skills that build their own -SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them -here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. - -Python equivalent: the direct `self.agent.register_swaig_function(fn)` -call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). -Default returns `[]` — skills using only the declarative `getTools()` path -do not need to override this. - -#### Signature - -```typescript -getDataMapTools(): Record[] -``` - -#### Returns - -`Record[]` — Array of fully-built SWAIG function dicts. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 372. - -*** - -### getGlobalData - -Get global data to merge into the agent's global data store. - -#### Signature - -```typescript -getGlobalData(): Record -``` - -#### Returns - -`Record` — Key-value pairs to be merged into the agent's global data. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 410. - -*** - -### getHints - -Get speech recognition hints relevant to this skill. - -#### Signature - -```typescript -getHints(): string[] -``` - -#### Returns - -`string[]` — Array of hint strings to improve speech recognition accuracy. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 402. - -*** - -### getInstanceKey - -Get the instance key used for deduplication in the SkillManager. - -For single-instance skills (`SUPPORTS_MULTIPLE_INSTANCES = false`), returns -the skill name. For multi-instance skills, returns `${skillName}_${toolName}` -using the `tool_name` config (falls back to the skill name). - -Matches Python's `SkillBase.get_instance_key()` default (`skill_base.py:141-146`). -Multi-instance subclasses only need to override when their key derivation -depends on config beyond `tool_name`. - -#### Signature - -```typescript -getInstanceKey(): string -``` - -#### Returns - -`string` — A unique key identifying this skill instance. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 427. - -*** - -### getParameterSchema - -Get the parameter schema for this skill class, describing all accepted configuration options. -Subclasses should override and call `super.getParameterSchema()` to include base parameters. - -Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): -returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a -`tool_name` entry with `default: cls.SKILL_NAME` for classes with -`SUPPORTS_MULTIPLE_INSTANCES = true`. - -**Modifiers:** `static` - -#### Signature - -```typescript -getParameterSchema(): Record -``` - -#### Returns - -`Record` — Record mapping parameter names to their schema entries. - -#### Source - -[`src/skills/builtin/datetime.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datetime.ts) - -Line 38. - -*** - -### getPromptSections - -Get prompt sections to inject into the agent's system prompt. -Respects the `skip_prompt` config option — returns `[]` if set to `true`. -Subclasses should override `_getPromptSections()` instead of this method. - -#### Signature - -```typescript -getPromptSections(): SkillPromptSection[] -``` - -#### Returns - -`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 382. - -*** - -### getSkillData - -Read this skill's data from a raw call data object's global\_data. - -#### Signature - -```typescript -getSkillData(rawData: Record): Record -``` - -#### Parameters - - - The raw request data containing global\_data. - - -#### Returns - -`Record` — The skill's stored data, or an empty object if not found. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 450. - -*** - -### getSkillNamespace - -Get the namespaced key for storing per-skill data in global\_data. - -#### Signature - -```typescript -getSkillNamespace(): string -``` - -#### Returns - -`string` — A string like "skill:datetime" or "skill:my\_prefix". - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 440. - -*** - -### getTools - -#### Signature - -```typescript -getTools(): SkillToolDefinition[] -``` - -#### Returns - -`SkillToolDefinition[]` — Two tools: `get_current_time` and `get_current_date`, each accepting an optional IANA timezone and defaulting to UTC. - -#### Source - -[`src/skills/builtin/datetime.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datetime.ts) - -Line 46. - -*** - -### hasAllEnvVars - -Check if all required environment variables are present. -Convenience wrapper around `validateEnvVars()` that returns a boolean, -matching the Python `validate_env_vars() -> bool` return type. - -#### Signature - -```typescript -hasAllEnvVars(): boolean -``` - -#### Returns - -`boolean` — `true` if all required env vars are set, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 544. - -*** - -### hasAllPackages - -Check if all required packages declared in the manifest are available. -Convenience wrapper around `validatePackages()` that returns a boolean, -matching the Python `validate_packages() -> bool` return type. - -#### Signature - -```typescript -hasAllPackages(): Promise -``` - -#### Returns - -`Promise` — `true` if all required packages are importable, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 579. - -*** - -### isInitialized - -Check if the skill has been initialized by the SkillManager. - -#### Signature - -```typescript -isInitialized(): boolean -``` - -#### Returns - -`boolean` — True if setup() has completed and the skill is marked initialized. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 507. - -*** - -### markInitialized - -Mark the skill as initialized (called by SkillManager). - -#### Signature - -```typescript -markInitialized(): void -``` - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 514. - -*** - -### setAgent - -Set the agent reference for this skill. -Called by the SkillManager/AgentBase when the skill is attached to an agent. -Python equivalent: `self.agent = agent` in `__init__`. - -#### Signature - -```typescript -setAgent(agent: AgentBase): void -``` - -#### Parameters - - - The agent that owns this skill. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 534. - -*** - -### setup - -Setup the skill. Called when the skill is added to an agent. -Override to perform initialization (API connections, config validation, etc.) - -#### Signature - -```typescript -setup(): Promise -``` - -#### Returns - -`Promise` — `true` if setup succeeded, `false` otherwise. Python equivalent: abstract `setup() -> bool`. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 313. - -*** - -### updateSkillData - -Update this skill's namespaced data on a FunctionResult via updateGlobalData. - -#### Signature - -```typescript -updateSkillData( - result: FunctionResult, - data: Record -): FunctionResult -``` - -#### Parameters - - - The FunctionResult to update. - - - - The data to store under this skill's namespace. - - -#### Returns - -`FunctionResult` — The FunctionResult for chaining. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 462. - -*** - -### validateEnvVars - -Validate that all required environment variables declared on the skill class -are set in the current process environment. - -Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` -directly. TS reads the same static from the class. - -Returns the list of missing variable names so callers can produce actionable -error messages. This differs from Python's `validate_env_vars() -> bool` -return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/agents/skills/builtin/datetime/date-time-skill#has-all-env-vars) is the boolean equivalent. - -#### Signature - -```typescript -validateEnvVars(): string[] -``` - -#### Returns - -`string[]` — Array of missing environment variable names (empty if all are present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 486. - -*** - -### validatePackages - -Validate that all required packages declared on the skill class can be imported. - -Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` -directly and tries `importlib.import_module(pkg)` for each; TS does the -equivalent with a dynamic `import()`. - -#### Signature - -```typescript -validatePackages(): Promise -``` - -#### Returns - -`Promise` — Array of package names that could not be imported (empty if all present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 557. - -## Source - -[`src/skills/builtin/datetime.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datetime.ts) - -Line 29. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/datetime/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/datetime/index.mdx index ac1d2ec2fe..6c19f688c8 100644 --- a/fern/products/sdk-reference/typescript/agents/skills/builtin/datetime/index.mdx +++ b/fern/products/sdk-reference/typescript/agents/skills/builtin/datetime/index.mdx @@ -5,7 +5,7 @@ sdk_label: "TypeScript SDK" icon: "typescript" lustri: auto_generated: true - kind: "module" + kind: "class" language: "typescript" qualified_name: "skills.builtin.datetime" parent: "skills.builtin" @@ -14,19 +14,701 @@ lustri: --- # `datetime` +Provides the current date and time with optional timezone support. + +Tier 1 built-in skill with no external dependencies. Supports all IANA +timezone identifiers via the Intl.DateTimeFormat API. + +Registers two SWAIG tools: `get_current_time` and `get_current_date`. + ## Signature ```typescript -module datetime +class DateTimeSkill extends SkillBase +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/agents/skills/skill-base) + +## Examples + +```typescript +agent.addSkill('datetime'); +``` + +## Properties + + + Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. + + + + Configuration options provided at construction time. + + + + Unique identifier for this skill instance (includes timestamp and random bytes). + + + + Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. + + + + Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. + + + + Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. + + + + Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. + + + + Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. + + + + Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. + + + + The registered name of this skill type. + + + + Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. + + + + Additional SWAIG fields extracted from config, merged into tool definitions. + + +## Methods + +### cleanup + +Cleanup resources. Called when the skill is removed from an agent. + +#### Signature + +```typescript +cleanup(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 469. + +*** + +### constructor + +Create a new skill instance. + +Python parity: `core/skill_base.py:32-43`. +Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` +is left as `None` on the subclass. TS throws the equivalent when the static +defaults haven't been overridden. + +#### Signature + +```typescript +constructor(config?: SkillConfig): DateTimeSkill +``` + +#### Parameters + + + Optional configuration key-value pairs (Python: `params`). + + +#### Returns + +`DateTimeSkill` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 282. + +*** + +### defineTool + +Imperatively register a tool with this skill. + +Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. +Merges `this.swaigFields` into the tool definition (explicit fields on +`toolDef` take precedence), then pushes the result into `_dynamicTools` +so the default `getTools()` returns it at SWML render time. + +Intended for skills whose tool shape depends on config evaluated at +`setup()` time. Skills with a static tool list should override +`getTools()` instead. + +#### Signature + +```typescript +defineTool(toolDef: SkillToolDefinition): void +``` + +#### Parameters + + + The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 351. + +*** + +### getAgent + +Return the agent that owns this skill, asserting it is non-null. +Equivalent to accessing `self.agent` in Python, where the agent reference +is always set before `setup()` is called. + +The SkillManager lifecycle guarantees that `setAgent()` is called before +`setup()`, so this method is safe to use inside `setup()` and in any +tool handler invoked during an active agent session. + +#### Signature + +```typescript +getAgent(): AgentBase +``` + +#### Returns + +`AgentBase` — The owning `AgentBase` instance. + +#### Throws + +- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 261. + +*** + +### getConfig + +Get a configuration value by key, falling back to a default if not set. + +#### Signature + +```typescript +getConfig(key: string, defaultValue?: T): T +``` + +#### Type Parameters + + + +#### Parameters + + + The configuration key to look up. + + + + Value to return if the key is not present. + + +#### Returns + +`T` — The configuration value cast to type T, or the default value. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 524. + +*** + +### getDataMapTools + +Optional DataMap-style tool definitions. Skills that build their own +SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them +here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. + +Python equivalent: the direct `self.agent.register_swaig_function(fn)` +call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). +Default returns `[]` — skills using only the declarative `getTools()` path +do not need to override this. + +#### Signature + +```typescript +getDataMapTools(): Record[] +``` + +#### Returns + +`Record[]` — Array of fully-built SWAIG function dicts. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 372. + +*** + +### getGlobalData + +Get global data to merge into the agent's global data store. + +#### Signature + +```typescript +getGlobalData(): Record +``` + +#### Returns + +`Record` — Key-value pairs to be merged into the agent's global data. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 410. + +*** + +### getHints + +Get speech recognition hints relevant to this skill. + +#### Signature + +```typescript +getHints(): string[] ``` -## Classes +#### Returns + +`string[]` — Array of hint strings to improve speech recognition accuracy. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 402. + +*** + +### getInstanceKey + +Get the instance key used for deduplication in the SkillManager. + +For single-instance skills (`SUPPORTS_MULTIPLE_INSTANCES = false`), returns +the skill name. For multi-instance skills, returns `${skillName}_${toolName}` +using the `tool_name` config (falls back to the skill name). + +Matches Python's `SkillBase.get_instance_key()` default (`skill_base.py:141-146`). +Multi-instance subclasses only need to override when their key derivation +depends on config beyond `tool_name`. + +#### Signature + +```typescript +getInstanceKey(): string +``` + +#### Returns + +`string` — A unique key identifying this skill instance. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 427. + +*** + +### getParameterSchema + +Get the parameter schema for this skill class, describing all accepted configuration options. +Subclasses should override and call `super.getParameterSchema()` to include base parameters. + +Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): +returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a +`tool_name` entry with `default: cls.SKILL_NAME` for classes with +`SUPPORTS_MULTIPLE_INSTANCES = true`. + +**Modifiers:** `static` + +#### Signature + +```typescript +getParameterSchema(): Record +``` + +#### Returns + +`Record` — Record mapping parameter names to their schema entries. + +#### Source + +[`src/skills/builtin/datetime.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datetime.ts) + +Line 38. + +*** + +### getPromptSections + +Get prompt sections to inject into the agent's system prompt. +Respects the `skip_prompt` config option — returns `[]` if set to `true`. +Subclasses should override `_getPromptSections()` instead of this method. + +#### Signature + +```typescript +getPromptSections(): SkillPromptSection[] +``` + +#### Returns + +`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 382. + +*** + +### getSkillData + +Read this skill's data from a raw call data object's global\_data. + +#### Signature + +```typescript +getSkillData(rawData: Record): Record +``` + +#### Parameters + + + The raw request data containing global\_data. + + +#### Returns + +`Record` — The skill's stored data, or an empty object if not found. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 450. + +*** + +### getSkillNamespace + +Get the namespaced key for storing per-skill data in global\_data. + +#### Signature + +```typescript +getSkillNamespace(): string +``` + +#### Returns + +`string` — A string like "skill:datetime" or "skill:my\_prefix". + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 440. + +*** + +### getTools + +#### Signature + +```typescript +getTools(): SkillToolDefinition[] +``` + +#### Returns + +`SkillToolDefinition[]` — Two tools: `get_current_time` and `get_current_date`, each accepting an optional IANA timezone and defaulting to UTC. + +#### Source + +[`src/skills/builtin/datetime.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datetime.ts) + +Line 46. + +*** + +### hasAllEnvVars + +Check if all required environment variables are present. +Convenience wrapper around `validateEnvVars()` that returns a boolean, +matching the Python `validate_env_vars() -> bool` return type. + +#### Signature + +```typescript +hasAllEnvVars(): boolean +``` + +#### Returns + +`boolean` — `true` if all required env vars are set, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 544. + +*** + +### hasAllPackages + +Check if all required packages declared in the manifest are available. +Convenience wrapper around `validatePackages()` that returns a boolean, +matching the Python `validate_packages() -> bool` return type. + +#### Signature + +```typescript +hasAllPackages(): Promise +``` + +#### Returns + +`Promise` — `true` if all required packages are importable, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 579. + +*** + +### isInitialized + +Check if the skill has been initialized by the SkillManager. + +#### Signature + +```typescript +isInitialized(): boolean +``` + +#### Returns + +`boolean` — True if setup() has completed and the skill is marked initialized. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 507. + +*** + +### markInitialized + +Mark the skill as initialized (called by SkillManager). + +#### Signature + +```typescript +markInitialized(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 514. + +*** + +### setAgent + +Set the agent reference for this skill. +Called by the SkillManager/AgentBase when the skill is attached to an agent. +Python equivalent: `self.agent = agent` in `__init__`. + +#### Signature + +```typescript +setAgent(agent: AgentBase): void +``` + +#### Parameters + + + The agent that owns this skill. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 534. + +*** + +### setup + +Setup the skill. Called when the skill is added to an agent. +Override to perform initialization (API connections, config validation, etc.) + +#### Signature + +```typescript +setup(): Promise +``` + +#### Returns + +`Promise` — `true` if setup succeeded, `false` otherwise. Python equivalent: abstract `setup() -> bool`. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 313. + +*** + +### updateSkillData + +Update this skill's namespaced data on a FunctionResult via updateGlobalData. + +#### Signature + +```typescript +updateSkillData( + result: FunctionResult, + data: Record +): FunctionResult +``` + +#### Parameters + + + The FunctionResult to update. + + + + The data to store under this skill's namespace. + + +#### Returns + +`FunctionResult` — The FunctionResult for chaining. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 462. + +*** + +### validateEnvVars + +Validate that all required environment variables declared on the skill class +are set in the current process environment. + +Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` +directly. TS reads the same static from the class. + +Returns the list of missing variable names so callers can produce actionable +error messages. This differs from Python's `validate_env_vars() -> bool` +return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/agents/skills/builtin/datetime#has-all-env-vars) is the boolean equivalent. + +#### Signature + +```typescript +validateEnvVars(): string[] +``` + +#### Returns + +`string[]` — Array of missing environment variable names (empty if all are present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 486. + +*** + +### validatePackages + +Validate that all required packages declared on the skill class can be imported. + +Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` +directly and tries `importlib.import_module(pkg)` for each; TS does the +equivalent with a dynamic `import()`. + +#### Signature + +```typescript +validatePackages(): Promise +``` + +#### Returns + +`Promise` — Array of package names that could not be imported (empty if all present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - - - Provides the current date and time with optional timezone support. - - +Line 557. ## Functions @@ -60,4 +742,4 @@ Line 135. [`src/skills/builtin/datetime.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/datetime.ts) -Line 1. +Line 29. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/google-maps/google-maps-skill/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/google-maps/google-maps-skill/index.mdx deleted file mode 100644 index ace362e5cb..0000000000 --- a/fern/products/sdk-reference/typescript/agents/skills/builtin/google-maps/google-maps-skill/index.mdx +++ /dev/null @@ -1,715 +0,0 @@ ---- -slug: "/reference/typescript/agents/skills/builtin/google-maps/google-maps-skill" -title: "GoogleMapsSkill" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "skills.builtin.google_maps.GoogleMapsSkill" - parent: "skills.builtin.google_maps" - module: "agents.skills.builtin.google_maps" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/google_maps.ts" ---- -# `GoogleMapsSkill` - -Provides driving/walking/transit directions and place search via Google Maps APIs. - -Tier 3 built-in skill. Requires the `GOOGLE_MAPS_API_KEY` environment variable. -Supports a `default_mode` config option ("driving"|"walking"|"bicycling"|"transit"). - -## Signature - -```typescript -class GoogleMapsSkill extends SkillBase -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/agents/skills/skill-base) - -## Examples - -```typescript -agent.addSkill('google_maps', { default_mode: 'driving' }); -``` - -## Properties - - - Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. - - - - Configuration options provided at construction time. - - - - Unique identifier for this skill instance (includes timestamp and random bytes). - - - - Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. - - - - Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. - - - - Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. - - - - Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. - - - - Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. - - - - Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. - - - - The registered name of this skill type. - - - - Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. - - - - Additional SWAIG fields extracted from config, merged into tool definitions. - - -## Methods - -### cleanup - -Cleanup resources. Called when the skill is removed from an agent. - -#### Signature - -```typescript -cleanup(): Promise -``` - -#### Returns - -`Promise` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 469. - -*** - -### constructor - -Create a new skill instance. - -Python parity: `core/skill_base.py:32-43`. -Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` -is left as `None` on the subclass. TS throws the equivalent when the static -defaults haven't been overridden. - -#### Signature - -```typescript -constructor(config?: SkillConfig): GoogleMapsSkill -``` - -#### Parameters - - - Optional configuration key-value pairs (Python: `params`). - - -#### Returns - -`GoogleMapsSkill` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 282. - -*** - -### defineTool - -Imperatively register a tool with this skill. - -Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. -Merges `this.swaigFields` into the tool definition (explicit fields on -`toolDef` take precedence), then pushes the result into `_dynamicTools` -so the default `getTools()` returns it at SWML render time. - -Intended for skills whose tool shape depends on config evaluated at -`setup()` time. Skills with a static tool list should override -`getTools()` instead. - -#### Signature - -```typescript -defineTool(toolDef: SkillToolDefinition): void -``` - -#### Parameters - - - The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 351. - -*** - -### getAgent - -Return the agent that owns this skill, asserting it is non-null. -Equivalent to accessing `self.agent` in Python, where the agent reference -is always set before `setup()` is called. - -The SkillManager lifecycle guarantees that `setAgent()` is called before -`setup()`, so this method is safe to use inside `setup()` and in any -tool handler invoked during an active agent session. - -#### Signature - -```typescript -getAgent(): AgentBase -``` - -#### Returns - -`AgentBase` — The owning `AgentBase` instance. - -#### Throws - -- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 261. - -*** - -### getConfig - -Get a configuration value by key, falling back to a default if not set. - -#### Signature - -```typescript -getConfig(key: string, defaultValue?: T): T -``` - -#### Type Parameters - - - -#### Parameters - - - The configuration key to look up. - - - - Value to return if the key is not present. - - -#### Returns - -`T` — The configuration value cast to type T, or the default value. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 524. - -*** - -### getDataMapTools - -Optional DataMap-style tool definitions. Skills that build their own -SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them -here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. - -Python equivalent: the direct `self.agent.register_swaig_function(fn)` -call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). -Default returns `[]` — skills using only the declarative `getTools()` path -do not need to override this. - -#### Signature - -```typescript -getDataMapTools(): Record[] -``` - -#### Returns - -`Record[]` — Array of fully-built SWAIG function dicts. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 372. - -*** - -### getGlobalData - -Get global data to merge into the agent's global data store. - -#### Signature - -```typescript -getGlobalData(): Record -``` - -#### Returns - -`Record` — Key-value pairs to be merged into the agent's global data. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 410. - -*** - -### getHints - -#### Signature - -```typescript -getHints(): string[] -``` - -#### Returns - -`string[]` — Speech recognition hints for maps/directions keywords. - -#### Source - -[`src/skills/builtin/google_maps.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/google_maps.ts) - -Line 174. - -*** - -### getInstanceKey - -Get the instance key used for deduplication in the SkillManager. - -For single-instance skills (`SUPPORTS_MULTIPLE_INSTANCES = false`), returns -the skill name. For multi-instance skills, returns `${skillName}_${toolName}` -using the `tool_name` config (falls back to the skill name). - -Matches Python's `SkillBase.get_instance_key()` default (`skill_base.py:141-146`). -Multi-instance subclasses only need to override when their key derivation -depends on config beyond `tool_name`. - -#### Signature - -```typescript -getInstanceKey(): string -``` - -#### Returns - -`string` — A unique key identifying this skill instance. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 427. - -*** - -### getParameterSchema - -Get the parameter schema for this skill class, describing all accepted configuration options. -Subclasses should override and call `super.getParameterSchema()` to include base parameters. - -Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): -returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a -`tool_name` entry with `default: cls.SKILL_NAME` for classes with -`SUPPORTS_MULTIPLE_INSTANCES = true`. - -**Modifiers:** `static` - -#### Signature - -```typescript -getParameterSchema(): Record -``` - -#### Returns - -`Record` — Record mapping parameter names to their schema entries. - -#### Source - -[`src/skills/builtin/google_maps.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/google_maps.ts) - -Line 119. - -*** - -### getPromptSections - -Get prompt sections to inject into the agent's system prompt. -Respects the `skip_prompt` config option — returns `[]` if set to `true`. -Subclasses should override `_getPromptSections()` instead of this method. - -#### Signature - -```typescript -getPromptSections(): SkillPromptSection[] -``` - -#### Returns - -`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 382. - -*** - -### getSkillData - -Read this skill's data from a raw call data object's global\_data. - -#### Signature - -```typescript -getSkillData(rawData: Record): Record -``` - -#### Parameters - - - The raw request data containing global\_data. - - -#### Returns - -`Record` — The skill's stored data, or an empty object if not found. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 450. - -*** - -### getSkillNamespace - -Get the namespaced key for storing per-skill data in global\_data. - -#### Signature - -```typescript -getSkillNamespace(): string -``` - -#### Returns - -`string` — A string like "skill:datetime" or "skill:my\_prefix". - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 440. - -*** - -### getTools - -#### Signature - -```typescript -getTools(): SkillToolDefinition[] -``` - -#### Returns - -`SkillToolDefinition[]` — Two tools: `get_directions` for route info and `find_place` for place discovery. - -#### Source - -[`src/skills/builtin/google_maps.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/google_maps.ts) - -Line 179. - -*** - -### hasAllEnvVars - -Check if all required environment variables are present. -Convenience wrapper around `validateEnvVars()` that returns a boolean, -matching the Python `validate_env_vars() -> bool` return type. - -#### Signature - -```typescript -hasAllEnvVars(): boolean -``` - -#### Returns - -`boolean` — `true` if all required env vars are set, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 544. - -*** - -### hasAllPackages - -Check if all required packages declared in the manifest are available. -Convenience wrapper around `validatePackages()` that returns a boolean, -matching the Python `validate_packages() -> bool` return type. - -#### Signature - -```typescript -hasAllPackages(): Promise -``` - -#### Returns - -`Promise` — `true` if all required packages are importable, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 579. - -*** - -### isInitialized - -Check if the skill has been initialized by the SkillManager. - -#### Signature - -```typescript -isInitialized(): boolean -``` - -#### Returns - -`boolean` — True if setup() has completed and the skill is marked initialized. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 507. - -*** - -### markInitialized - -Mark the skill as initialized (called by SkillManager). - -#### Signature - -```typescript -markInitialized(): void -``` - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 514. - -*** - -### setAgent - -Set the agent reference for this skill. -Called by the SkillManager/AgentBase when the skill is attached to an agent. -Python equivalent: `self.agent = agent` in `__init__`. - -#### Signature - -```typescript -setAgent(agent: AgentBase): void -``` - -#### Parameters - - - The agent that owns this skill. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 534. - -*** - -### setup - -Fail-fast when GOOGLE\_MAPS\_API\_KEY is not set, mirroring Python's -`setup()` validation. The env var is the only credential source for -this skill, so loading it without the key would produce runtime -errors on every tool call. - -#### Signature - -```typescript -setup(): Promise -``` - -#### Returns - -`Promise` — `true` if the API key is present, `false` otherwise. - -#### Source - -[`src/skills/builtin/google_maps.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/google_maps.ts) - -Line 165. - -*** - -### updateSkillData - -Update this skill's namespaced data on a FunctionResult via updateGlobalData. - -#### Signature - -```typescript -updateSkillData( - result: FunctionResult, - data: Record -): FunctionResult -``` - -#### Parameters - - - The FunctionResult to update. - - - - The data to store under this skill's namespace. - - -#### Returns - -`FunctionResult` — The FunctionResult for chaining. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 462. - -*** - -### validateEnvVars - -Validate that all required environment variables declared on the skill class -are set in the current process environment. - -Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` -directly. TS reads the same static from the class. - -Returns the list of missing variable names so callers can produce actionable -error messages. This differs from Python's `validate_env_vars() -> bool` -return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/agents/skills/builtin/google-maps/google-maps-skill#has-all-env-vars) is the boolean equivalent. - -#### Signature - -```typescript -validateEnvVars(): string[] -``` - -#### Returns - -`string[]` — Array of missing environment variable names (empty if all are present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 486. - -*** - -### validatePackages - -Validate that all required packages declared on the skill class can be imported. - -Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` -directly and tries `importlib.import_module(pkg)` for each; TS does the -equivalent with a dynamic `import()`. - -#### Signature - -```typescript -validatePackages(): Promise -``` - -#### Returns - -`Promise` — Array of package names that could not be imported (empty if all present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 557. - -## Source - -[`src/skills/builtin/google_maps.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/google_maps.ts) - -Line 107. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/google-maps/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/google-maps/index.mdx index f37a981fd9..69df127e7d 100644 --- a/fern/products/sdk-reference/typescript/agents/skills/builtin/google-maps/index.mdx +++ b/fern/products/sdk-reference/typescript/agents/skills/builtin/google-maps/index.mdx @@ -5,7 +5,7 @@ sdk_label: "TypeScript SDK" icon: "typescript" lustri: auto_generated: true - kind: "module" + kind: "class" language: "typescript" qualified_name: "skills.builtin.google_maps" parent: "skills.builtin" @@ -14,19 +14,699 @@ lustri: --- # `google_maps` +Provides driving/walking/transit directions and place search via Google Maps APIs. + +Tier 3 built-in skill. Requires the `GOOGLE_MAPS_API_KEY` environment variable. +Supports a `default_mode` config option ("driving"|"walking"|"bicycling"|"transit"). + ## Signature ```typescript -module google_maps +class GoogleMapsSkill extends SkillBase +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/agents/skills/skill-base) + +## Examples + +```typescript +agent.addSkill('google_maps', { default_mode: 'driving' }); +``` + +## Properties + + + Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. + + + + Configuration options provided at construction time. + + + + Unique identifier for this skill instance (includes timestamp and random bytes). + + + + Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. + + + + Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. + + + + Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. + + + + Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. + + + + Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. + + + + Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. + + + + The registered name of this skill type. + + + + Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. + + + + Additional SWAIG fields extracted from config, merged into tool definitions. + + +## Methods + +### cleanup + +Cleanup resources. Called when the skill is removed from an agent. + +#### Signature + +```typescript +cleanup(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 469. + +*** + +### constructor + +Create a new skill instance. + +Python parity: `core/skill_base.py:32-43`. +Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` +is left as `None` on the subclass. TS throws the equivalent when the static +defaults haven't been overridden. + +#### Signature + +```typescript +constructor(config?: SkillConfig): GoogleMapsSkill +``` + +#### Parameters + + + Optional configuration key-value pairs (Python: `params`). + + +#### Returns + +`GoogleMapsSkill` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 282. + +*** + +### defineTool + +Imperatively register a tool with this skill. + +Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. +Merges `this.swaigFields` into the tool definition (explicit fields on +`toolDef` take precedence), then pushes the result into `_dynamicTools` +so the default `getTools()` returns it at SWML render time. + +Intended for skills whose tool shape depends on config evaluated at +`setup()` time. Skills with a static tool list should override +`getTools()` instead. + +#### Signature + +```typescript +defineTool(toolDef: SkillToolDefinition): void +``` + +#### Parameters + + + The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 351. + +*** + +### getAgent + +Return the agent that owns this skill, asserting it is non-null. +Equivalent to accessing `self.agent` in Python, where the agent reference +is always set before `setup()` is called. + +The SkillManager lifecycle guarantees that `setAgent()` is called before +`setup()`, so this method is safe to use inside `setup()` and in any +tool handler invoked during an active agent session. + +#### Signature + +```typescript +getAgent(): AgentBase +``` + +#### Returns + +`AgentBase` — The owning `AgentBase` instance. + +#### Throws + +- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 261. + +*** + +### getConfig + +Get a configuration value by key, falling back to a default if not set. + +#### Signature + +```typescript +getConfig(key: string, defaultValue?: T): T +``` + +#### Type Parameters + + + +#### Parameters + + + The configuration key to look up. + + + + Value to return if the key is not present. + + +#### Returns + +`T` — The configuration value cast to type T, or the default value. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 524. + +*** + +### getDataMapTools + +Optional DataMap-style tool definitions. Skills that build their own +SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them +here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. + +Python equivalent: the direct `self.agent.register_swaig_function(fn)` +call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). +Default returns `[]` — skills using only the declarative `getTools()` path +do not need to override this. + +#### Signature + +```typescript +getDataMapTools(): Record[] +``` + +#### Returns + +`Record[]` — Array of fully-built SWAIG function dicts. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 372. + +*** + +### getGlobalData + +Get global data to merge into the agent's global data store. + +#### Signature + +```typescript +getGlobalData(): Record +``` + +#### Returns + +`Record` — Key-value pairs to be merged into the agent's global data. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 410. + +*** + +### getHints + +#### Signature + +```typescript +getHints(): string[] ``` -## Classes +#### Returns + +`string[]` — Speech recognition hints for maps/directions keywords. + +#### Source + +[`src/skills/builtin/google_maps.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/google_maps.ts) + +Line 174. + +*** + +### getInstanceKey + +Get the instance key used for deduplication in the SkillManager. + +For single-instance skills (`SUPPORTS_MULTIPLE_INSTANCES = false`), returns +the skill name. For multi-instance skills, returns `${skillName}_${toolName}` +using the `tool_name` config (falls back to the skill name). + +Matches Python's `SkillBase.get_instance_key()` default (`skill_base.py:141-146`). +Multi-instance subclasses only need to override when their key derivation +depends on config beyond `tool_name`. + +#### Signature + +```typescript +getInstanceKey(): string +``` + +#### Returns + +`string` — A unique key identifying this skill instance. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 427. + +*** + +### getParameterSchema + +Get the parameter schema for this skill class, describing all accepted configuration options. +Subclasses should override and call `super.getParameterSchema()` to include base parameters. + +Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): +returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a +`tool_name` entry with `default: cls.SKILL_NAME` for classes with +`SUPPORTS_MULTIPLE_INSTANCES = true`. + +**Modifiers:** `static` + +#### Signature + +```typescript +getParameterSchema(): Record +``` + +#### Returns + +`Record` — Record mapping parameter names to their schema entries. + +#### Source + +[`src/skills/builtin/google_maps.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/google_maps.ts) + +Line 119. + +*** + +### getPromptSections + +Get prompt sections to inject into the agent's system prompt. +Respects the `skip_prompt` config option — returns `[]` if set to `true`. +Subclasses should override `_getPromptSections()` instead of this method. + +#### Signature + +```typescript +getPromptSections(): SkillPromptSection[] +``` + +#### Returns + +`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 382. + +*** + +### getSkillData + +Read this skill's data from a raw call data object's global\_data. + +#### Signature + +```typescript +getSkillData(rawData: Record): Record +``` + +#### Parameters + + + The raw request data containing global\_data. + + +#### Returns + +`Record` — The skill's stored data, or an empty object if not found. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 450. + +*** + +### getSkillNamespace + +Get the namespaced key for storing per-skill data in global\_data. + +#### Signature + +```typescript +getSkillNamespace(): string +``` + +#### Returns + +`string` — A string like "skill:datetime" or "skill:my\_prefix". + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 440. + +*** + +### getTools + +#### Signature + +```typescript +getTools(): SkillToolDefinition[] +``` + +#### Returns + +`SkillToolDefinition[]` — Two tools: `get_directions` for route info and `find_place` for place discovery. + +#### Source + +[`src/skills/builtin/google_maps.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/google_maps.ts) + +Line 179. + +*** + +### hasAllEnvVars + +Check if all required environment variables are present. +Convenience wrapper around `validateEnvVars()` that returns a boolean, +matching the Python `validate_env_vars() -> bool` return type. + +#### Signature + +```typescript +hasAllEnvVars(): boolean +``` + +#### Returns + +`boolean` — `true` if all required env vars are set, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 544. + +*** + +### hasAllPackages + +Check if all required packages declared in the manifest are available. +Convenience wrapper around `validatePackages()` that returns a boolean, +matching the Python `validate_packages() -> bool` return type. + +#### Signature + +```typescript +hasAllPackages(): Promise +``` + +#### Returns + +`Promise` — `true` if all required packages are importable, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 579. + +*** + +### isInitialized + +Check if the skill has been initialized by the SkillManager. + +#### Signature + +```typescript +isInitialized(): boolean +``` + +#### Returns + +`boolean` — True if setup() has completed and the skill is marked initialized. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 507. + +*** + +### markInitialized + +Mark the skill as initialized (called by SkillManager). + +#### Signature + +```typescript +markInitialized(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 514. + +*** + +### setAgent + +Set the agent reference for this skill. +Called by the SkillManager/AgentBase when the skill is attached to an agent. +Python equivalent: `self.agent = agent` in `__init__`. + +#### Signature + +```typescript +setAgent(agent: AgentBase): void +``` + +#### Parameters + + + The agent that owns this skill. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 534. + +*** + +### setup + +Fail-fast when GOOGLE\_MAPS\_API\_KEY is not set, mirroring Python's +`setup()` validation. The env var is the only credential source for +this skill, so loading it without the key would produce runtime +errors on every tool call. + +#### Signature + +```typescript +setup(): Promise +``` + +#### Returns + +`Promise` — `true` if the API key is present, `false` otherwise. + +#### Source + +[`src/skills/builtin/google_maps.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/google_maps.ts) + +Line 165. + +*** + +### updateSkillData + +Update this skill's namespaced data on a FunctionResult via updateGlobalData. + +#### Signature + +```typescript +updateSkillData( + result: FunctionResult, + data: Record +): FunctionResult +``` + +#### Parameters + + + The FunctionResult to update. + + + + The data to store under this skill's namespace. + + +#### Returns + +`FunctionResult` — The FunctionResult for chaining. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 462. + +*** + +### validateEnvVars + +Validate that all required environment variables declared on the skill class +are set in the current process environment. + +Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` +directly. TS reads the same static from the class. + +Returns the list of missing variable names so callers can produce actionable +error messages. This differs from Python's `validate_env_vars() -> bool` +return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/agents/skills/builtin/google-maps#has-all-env-vars) is the boolean equivalent. + +#### Signature + +```typescript +validateEnvVars(): string[] +``` + +#### Returns + +`string[]` — Array of missing environment variable names (empty if all are present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 486. + +*** + +### validatePackages + +Validate that all required packages declared on the skill class can be imported. + +Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` +directly and tries `importlib.import_module(pkg)` for each; TS does the +equivalent with a dynamic `import()`. + +#### Signature + +```typescript +validatePackages(): Promise +``` + +#### Returns + +`Promise` — Array of package names that could not be imported (empty if all present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - - - Provides driving/walking/transit directions and place search via Google Maps APIs. - - +Line 557. ## Functions @@ -60,4 +740,4 @@ Line 654. [`src/skills/builtin/google_maps.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/google_maps.ts) -Line 1. +Line 107. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/index.mdx index 5b8f1db2fb..d5e87b70a1 100644 --- a/fern/products/sdk-reference/typescript/agents/skills/builtin/index.mdx +++ b/fern/products/sdk-reference/typescript/agents/skills/builtin/index.mdx @@ -20,46 +20,84 @@ lustri: module builtin ``` -## Modules +## Classes - + + Fetches trivia questions from the API Ninjas service. + - + + Provides access to Anthropic's Claude AI for sub-queries and complex reasoning. + - + + Load Claude-style SKILL.md files as SignalWire agent tools. + - + + A meta-skill that registers user-defined tools from configuration. + - + + Searches SignalWire DataSphere for knowledge base content using semantic search. + - + + Searches SignalWire DataSphere using a server-side DataMap for serverless execution. + - + + Provides the current date and time with optional timezone support. + - + + Provides driving/walking/transit directions and place search via Google Maps APIs. + - + + Collects answers to a configurable list of questions, one at a time. + - + + Tells random jokes from a curated built-in collection. + - + + Evaluates mathematical expressions safely using a sandboxed parser. + - + + Bridge MCP (Model Context Protocol) servers with SWAIG functions. + - + + Document search using TF-IDF in-memory scoring or a remote search server. + - + + Controls background audio playback during calls via SWML actions. + - + + Fast web scraping skill optimized for speed and token efficiency. + - + + Transfer calls between agents based on pattern matching. + - + + Fetches current weather data from OpenWeatherMap for any location worldwide. + - + + Searches the web using the Google Custom Search JSON API. + - + + Searches Wikipedia for article summaries and extracts. + ## Functions diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/info-gatherer/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/info-gatherer/index.mdx index eb565b6092..5528ac7b14 100644 --- a/fern/products/sdk-reference/typescript/agents/skills/builtin/info-gatherer/index.mdx +++ b/fern/products/sdk-reference/typescript/agents/skills/builtin/info-gatherer/index.mdx @@ -5,7 +5,7 @@ sdk_label: "TypeScript SDK" icon: "typescript" lustri: auto_generated: true - kind: "module" + kind: "class" language: "typescript" qualified_name: "skills.builtin.info_gatherer" parent: "skills.builtin" @@ -14,19 +14,715 @@ lustri: --- # `info_gatherer` +Collects answers to a configurable list of questions, one at a time. + +Mirrors Python `InfoGathererSkill` exactly: the same required +`questions` config, the same `prefix` / `completion_message` options, +the same two tools (`start_questions`, `submit_answer`), and the same +state shape in `global_data`. + ## Signature ```typescript -module info_gatherer +class InfoGathererSkill extends SkillBase +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/agents/skills/skill-base) + +## Examples + +```typescript +agent.addSkill('info_gatherer', { + questions: [ + { key_name: 'name', question_text: 'What is your name?' }, + { key_name: 'email', question_text: 'Your email?', confirm: true }, + ], +}); +``` + +## Properties + + + Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. + + + + Configuration options provided at construction time. + + + + Unique identifier for this skill instance (includes timestamp and random bytes). + + + + Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. + + + + Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. + + + + Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. + + + + Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. + + + + Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. + + + + Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. + + + + The registered name of this skill type. + + + + Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. + + + + Additional SWAIG fields extracted from config, merged into tool definitions. + + +## Methods + +### cleanup + +Cleanup resources. Called when the skill is removed from an agent. + +#### Signature + +```typescript +cleanup(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 469. + +*** + +### constructor + +Create a new skill instance. + +Python parity: `core/skill_base.py:32-43`. +Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` +is left as `None` on the subclass. TS throws the equivalent when the static +defaults haven't been overridden. + +#### Signature + +```typescript +constructor(config?: SkillConfig): InfoGathererSkill +``` + +#### Parameters + + + Optional configuration key-value pairs (Python: `params`). + + +#### Returns + +`InfoGathererSkill` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 282. + +*** + +### defineTool + +Imperatively register a tool with this skill. + +Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. +Merges `this.swaigFields` into the tool definition (explicit fields on +`toolDef` take precedence), then pushes the result into `_dynamicTools` +so the default `getTools()` returns it at SWML render time. + +Intended for skills whose tool shape depends on config evaluated at +`setup()` time. Skills with a static tool list should override +`getTools()` instead. + +#### Signature + +```typescript +defineTool(toolDef: SkillToolDefinition): void +``` + +#### Parameters + + + The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 351. + +*** + +### getAgent + +Return the agent that owns this skill, asserting it is non-null. +Equivalent to accessing `self.agent` in Python, where the agent reference +is always set before `setup()` is called. + +The SkillManager lifecycle guarantees that `setAgent()` is called before +`setup()`, so this method is safe to use inside `setup()` and in any +tool handler invoked during an active agent session. + +#### Signature + +```typescript +getAgent(): AgentBase +``` + +#### Returns + +`AgentBase` — The owning `AgentBase` instance. + +#### Throws + +- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 261. + +*** + +### getConfig + +Get a configuration value by key, falling back to a default if not set. + +#### Signature + +```typescript +getConfig(key: string, defaultValue?: T): T +``` + +#### Type Parameters + + + +#### Parameters + + + The configuration key to look up. + + + + Value to return if the key is not present. + + +#### Returns + +`T` — The configuration value cast to type T, or the default value. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 524. + +*** + +### getDataMapTools + +Optional DataMap-style tool definitions. Skills that build their own +SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them +here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. + +Python equivalent: the direct `self.agent.register_swaig_function(fn)` +call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). +Default returns `[]` — skills using only the declarative `getTools()` path +do not need to override this. + +#### Signature + +```typescript +getDataMapTools(): Record[] +``` + +#### Returns + +`Record[]` — Array of fully-built SWAIG function dicts. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 372. + +*** + +### getGlobalData + +Seed SWAIG `global_data` with the initial question state under this +skill's namespace. Mirrors Python `get_global_data()` (skill.py:127-135). + +Defensive no-op when the skill was not successfully set up (empty +`questions`). Python relies on the SkillManager to skip unloaded skills; +TS adds this guard so `getGlobalData()` called without a successful +`setup()` returns `{}` instead of a malformed state payload. + +#### Signature + +```typescript +getGlobalData(): Record +``` + +#### Returns + +`Record` + +#### Source + +[`src/skills/builtin/info_gatherer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/info_gatherer.ts) + +Line 170. + +*** + +### getHints + +Get speech recognition hints relevant to this skill. + +#### Signature + +```typescript +getHints(): string[] +``` + +#### Returns + +`string[]` — Array of hint strings to improve speech recognition accuracy. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 402. + +*** + +### getInstanceKey + +Instance key for the SkillManager. When `prefix` is configured, returns +`info_gatherer_` to support multi-instance use. Matches Python's +`get_instance_key()` (skill.py:81-85). + +#### Signature + +```typescript +getInstanceKey(): string +``` + +#### Returns + +`string` + +#### Source + +[`src/skills/builtin/info_gatherer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/info_gatherer.ts) + +Line 116. + +*** + +### getParameterSchema + +Get the parameter schema for this skill class, describing all accepted configuration options. +Subclasses should override and call `super.getParameterSchema()` to include base parameters. + +Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): +returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a +`tool_name` entry with `default: cls.SKILL_NAME` for classes with +`SUPPORTS_MULTIPLE_INSTANCES = true`. + +**Modifiers:** `static` + +#### Signature + +```typescript +getParameterSchema(): Record +``` + +#### Returns + +`Record` — Record mapping parameter names to their schema entries. + +#### Source + +[`src/skills/builtin/info_gatherer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/info_gatherer.ts) + +Line 78. + +*** + +### getPromptSections + +Get prompt sections to inject into the agent's system prompt. +Respects the `skip_prompt` config option — returns `[]` if set to `true`. +Subclasses should override `_getPromptSections()` instead of this method. + +#### Signature + +```typescript +getPromptSections(): SkillPromptSection[] +``` + +#### Returns + +`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 382. + +*** + +### getSkillData + +Read this skill's data from a raw call data object's global\_data. + +#### Signature + +```typescript +getSkillData(rawData: Record): Record +``` + +#### Parameters + + + The raw request data containing global\_data. + + +#### Returns + +`Record` — The skill's stored data, or an empty object if not found. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 450. + +*** + +### getSkillNamespace + +Get the namespaced key for storing per-skill data in global\_data. + +#### Signature + +```typescript +getSkillNamespace(): string ``` -## Classes +#### Returns + +`string` — A string like "skill:datetime" or "skill:my\_prefix". + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 440. + +*** + +### getTools + +Register the two sequential-flow tools. Mirrors Python +`register_tools()` (skill.py:162-184). Returns an empty array when +`setup()` did not complete (no questions) so the skill never exposes +half-initialized tools. + +#### Signature + +```typescript +getTools(): SkillToolDefinition[] +``` + +#### Returns + +`SkillToolDefinition[]` + +#### Source + +[`src/skills/builtin/info_gatherer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/info_gatherer.ts) + +Line 189. + +*** + +### hasAllEnvVars + +Check if all required environment variables are present. +Convenience wrapper around `validateEnvVars()` that returns a boolean, +matching the Python `validate_env_vars() -> bool` return type. + +#### Signature + +```typescript +hasAllEnvVars(): boolean +``` + +#### Returns + +`boolean` — `true` if all required env vars are set, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 544. + +*** + +### hasAllPackages + +Check if all required packages declared in the manifest are available. +Convenience wrapper around `validatePackages()` that returns a boolean, +matching the Python `validate_packages() -> bool` return type. + +#### Signature + +```typescript +hasAllPackages(): Promise +``` + +#### Returns + +`Promise` — `true` if all required packages are importable, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 579. + +*** + +### isInitialized + +Check if the skill has been initialized by the SkillManager. + +#### Signature + +```typescript +isInitialized(): boolean +``` + +#### Returns + +`boolean` — True if setup() has completed and the skill is marked initialized. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 507. + +*** + +### markInitialized + +Mark the skill as initialized (called by SkillManager). + +#### Signature + +```typescript +markInitialized(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 514. + +*** + +### setAgent + +Set the agent reference for this skill. +Called by the SkillManager/AgentBase when the skill is attached to an agent. +Python equivalent: `self.agent = agent` in `__init__`. + +#### Signature + +```typescript +setAgent(agent: AgentBase): void +``` + +#### Parameters + + + The agent that owns this skill. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 534. + +*** + +### setup + +Validate the `questions` config, derive tool names (with optional prefix), +and cache the completion message. + +Python parity: skill.py:91-121. Returns `false` (logging an error) when +`questions` is missing or fails validation; setup must produce a +functional skill or fail closed. + +#### Signature + +```typescript +setup(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/skills/builtin/info_gatherer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/info_gatherer.ts) + +Line 129. + +*** + +### updateSkillData + +Update this skill's namespaced data on a FunctionResult via updateGlobalData. + +#### Signature + +```typescript +updateSkillData( + result: FunctionResult, + data: Record +): FunctionResult +``` + +#### Parameters + + + The FunctionResult to update. + + + + The data to store under this skill's namespace. + + +#### Returns + +`FunctionResult` — The FunctionResult for chaining. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 462. + +*** + +### validateEnvVars + +Validate that all required environment variables declared on the skill class +are set in the current process environment. + +Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` +directly. TS reads the same static from the class. + +Returns the list of missing variable names so callers can produce actionable +error messages. This differs from Python's `validate_env_vars() -> bool` +return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/agents/skills/builtin/info-gatherer#has-all-env-vars) is the boolean equivalent. + +#### Signature + +```typescript +validateEnvVars(): string[] +``` + +#### Returns + +`string[]` — Array of missing environment variable names (empty if all are present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 486. + +*** + +### validatePackages + +Validate that all required packages declared on the skill class can be imported. + +Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` +directly and tries `importlib.import_module(pkg)` for each; TS does the +equivalent with a dynamic `import()`. + +#### Signature + +```typescript +validatePackages(): Promise +``` + +#### Returns + +`Promise` — Array of package names that could not be imported (empty if all present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - - - Collects answers to a configurable list of questions, one at a time. - - +Line 557. ## Functions @@ -60,4 +756,4 @@ Line 413. [`src/skills/builtin/info_gatherer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/info_gatherer.ts) -Line 1. +Line 60. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/info-gatherer/info-gatherer-skill/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/info-gatherer/info-gatherer-skill/index.mdx deleted file mode 100644 index 3a1ca443e0..0000000000 --- a/fern/products/sdk-reference/typescript/agents/skills/builtin/info-gatherer/info-gatherer-skill/index.mdx +++ /dev/null @@ -1,731 +0,0 @@ ---- -slug: "/reference/typescript/agents/skills/builtin/info-gatherer/info-gatherer-skill" -title: "InfoGathererSkill" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "skills.builtin.info_gatherer.InfoGathererSkill" - parent: "skills.builtin.info_gatherer" - module: "agents.skills.builtin.info_gatherer" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/info_gatherer.ts" ---- -# `InfoGathererSkill` - -Collects answers to a configurable list of questions, one at a time. - -Mirrors Python `InfoGathererSkill` exactly: the same required -`questions` config, the same `prefix` / `completion_message` options, -the same two tools (`start_questions`, `submit_answer`), and the same -state shape in `global_data`. - -## Signature - -```typescript -class InfoGathererSkill extends SkillBase -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/agents/skills/skill-base) - -## Examples - -```typescript -agent.addSkill('info_gatherer', { - questions: [ - { key_name: 'name', question_text: 'What is your name?' }, - { key_name: 'email', question_text: 'Your email?', confirm: true }, - ], -}); -``` - -## Properties - - - Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. - - - - Configuration options provided at construction time. - - - - Unique identifier for this skill instance (includes timestamp and random bytes). - - - - Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. - - - - Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. - - - - Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. - - - - Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. - - - - Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. - - - - Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. - - - - The registered name of this skill type. - - - - Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. - - - - Additional SWAIG fields extracted from config, merged into tool definitions. - - -## Methods - -### cleanup - -Cleanup resources. Called when the skill is removed from an agent. - -#### Signature - -```typescript -cleanup(): Promise -``` - -#### Returns - -`Promise` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 469. - -*** - -### constructor - -Create a new skill instance. - -Python parity: `core/skill_base.py:32-43`. -Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` -is left as `None` on the subclass. TS throws the equivalent when the static -defaults haven't been overridden. - -#### Signature - -```typescript -constructor(config?: SkillConfig): InfoGathererSkill -``` - -#### Parameters - - - Optional configuration key-value pairs (Python: `params`). - - -#### Returns - -`InfoGathererSkill` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 282. - -*** - -### defineTool - -Imperatively register a tool with this skill. - -Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. -Merges `this.swaigFields` into the tool definition (explicit fields on -`toolDef` take precedence), then pushes the result into `_dynamicTools` -so the default `getTools()` returns it at SWML render time. - -Intended for skills whose tool shape depends on config evaluated at -`setup()` time. Skills with a static tool list should override -`getTools()` instead. - -#### Signature - -```typescript -defineTool(toolDef: SkillToolDefinition): void -``` - -#### Parameters - - - The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 351. - -*** - -### getAgent - -Return the agent that owns this skill, asserting it is non-null. -Equivalent to accessing `self.agent` in Python, where the agent reference -is always set before `setup()` is called. - -The SkillManager lifecycle guarantees that `setAgent()` is called before -`setup()`, so this method is safe to use inside `setup()` and in any -tool handler invoked during an active agent session. - -#### Signature - -```typescript -getAgent(): AgentBase -``` - -#### Returns - -`AgentBase` — The owning `AgentBase` instance. - -#### Throws - -- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 261. - -*** - -### getConfig - -Get a configuration value by key, falling back to a default if not set. - -#### Signature - -```typescript -getConfig(key: string, defaultValue?: T): T -``` - -#### Type Parameters - - - -#### Parameters - - - The configuration key to look up. - - - - Value to return if the key is not present. - - -#### Returns - -`T` — The configuration value cast to type T, or the default value. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 524. - -*** - -### getDataMapTools - -Optional DataMap-style tool definitions. Skills that build their own -SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them -here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. - -Python equivalent: the direct `self.agent.register_swaig_function(fn)` -call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). -Default returns `[]` — skills using only the declarative `getTools()` path -do not need to override this. - -#### Signature - -```typescript -getDataMapTools(): Record[] -``` - -#### Returns - -`Record[]` — Array of fully-built SWAIG function dicts. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 372. - -*** - -### getGlobalData - -Seed SWAIG `global_data` with the initial question state under this -skill's namespace. Mirrors Python `get_global_data()` (skill.py:127-135). - -Defensive no-op when the skill was not successfully set up (empty -`questions`). Python relies on the SkillManager to skip unloaded skills; -TS adds this guard so `getGlobalData()` called without a successful -`setup()` returns `{}` instead of a malformed state payload. - -#### Signature - -```typescript -getGlobalData(): Record -``` - -#### Returns - -`Record` - -#### Source - -[`src/skills/builtin/info_gatherer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/info_gatherer.ts) - -Line 170. - -*** - -### getHints - -Get speech recognition hints relevant to this skill. - -#### Signature - -```typescript -getHints(): string[] -``` - -#### Returns - -`string[]` — Array of hint strings to improve speech recognition accuracy. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 402. - -*** - -### getInstanceKey - -Instance key for the SkillManager. When `prefix` is configured, returns -`info_gatherer_` to support multi-instance use. Matches Python's -`get_instance_key()` (skill.py:81-85). - -#### Signature - -```typescript -getInstanceKey(): string -``` - -#### Returns - -`string` - -#### Source - -[`src/skills/builtin/info_gatherer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/info_gatherer.ts) - -Line 116. - -*** - -### getParameterSchema - -Get the parameter schema for this skill class, describing all accepted configuration options. -Subclasses should override and call `super.getParameterSchema()` to include base parameters. - -Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): -returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a -`tool_name` entry with `default: cls.SKILL_NAME` for classes with -`SUPPORTS_MULTIPLE_INSTANCES = true`. - -**Modifiers:** `static` - -#### Signature - -```typescript -getParameterSchema(): Record -``` - -#### Returns - -`Record` — Record mapping parameter names to their schema entries. - -#### Source - -[`src/skills/builtin/info_gatherer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/info_gatherer.ts) - -Line 78. - -*** - -### getPromptSections - -Get prompt sections to inject into the agent's system prompt. -Respects the `skip_prompt` config option — returns `[]` if set to `true`. -Subclasses should override `_getPromptSections()` instead of this method. - -#### Signature - -```typescript -getPromptSections(): SkillPromptSection[] -``` - -#### Returns - -`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 382. - -*** - -### getSkillData - -Read this skill's data from a raw call data object's global\_data. - -#### Signature - -```typescript -getSkillData(rawData: Record): Record -``` - -#### Parameters - - - The raw request data containing global\_data. - - -#### Returns - -`Record` — The skill's stored data, or an empty object if not found. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 450. - -*** - -### getSkillNamespace - -Get the namespaced key for storing per-skill data in global\_data. - -#### Signature - -```typescript -getSkillNamespace(): string -``` - -#### Returns - -`string` — A string like "skill:datetime" or "skill:my\_prefix". - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 440. - -*** - -### getTools - -Register the two sequential-flow tools. Mirrors Python -`register_tools()` (skill.py:162-184). Returns an empty array when -`setup()` did not complete (no questions) so the skill never exposes -half-initialized tools. - -#### Signature - -```typescript -getTools(): SkillToolDefinition[] -``` - -#### Returns - -`SkillToolDefinition[]` - -#### Source - -[`src/skills/builtin/info_gatherer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/info_gatherer.ts) - -Line 189. - -*** - -### hasAllEnvVars - -Check if all required environment variables are present. -Convenience wrapper around `validateEnvVars()` that returns a boolean, -matching the Python `validate_env_vars() -> bool` return type. - -#### Signature - -```typescript -hasAllEnvVars(): boolean -``` - -#### Returns - -`boolean` — `true` if all required env vars are set, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 544. - -*** - -### hasAllPackages - -Check if all required packages declared in the manifest are available. -Convenience wrapper around `validatePackages()` that returns a boolean, -matching the Python `validate_packages() -> bool` return type. - -#### Signature - -```typescript -hasAllPackages(): Promise -``` - -#### Returns - -`Promise` — `true` if all required packages are importable, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 579. - -*** - -### isInitialized - -Check if the skill has been initialized by the SkillManager. - -#### Signature - -```typescript -isInitialized(): boolean -``` - -#### Returns - -`boolean` — True if setup() has completed and the skill is marked initialized. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 507. - -*** - -### markInitialized - -Mark the skill as initialized (called by SkillManager). - -#### Signature - -```typescript -markInitialized(): void -``` - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 514. - -*** - -### setAgent - -Set the agent reference for this skill. -Called by the SkillManager/AgentBase when the skill is attached to an agent. -Python equivalent: `self.agent = agent` in `__init__`. - -#### Signature - -```typescript -setAgent(agent: AgentBase): void -``` - -#### Parameters - - - The agent that owns this skill. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 534. - -*** - -### setup - -Validate the `questions` config, derive tool names (with optional prefix), -and cache the completion message. - -Python parity: skill.py:91-121. Returns `false` (logging an error) when -`questions` is missing or fails validation; setup must produce a -functional skill or fail closed. - -#### Signature - -```typescript -setup(): Promise -``` - -#### Returns - -`Promise` - -#### Source - -[`src/skills/builtin/info_gatherer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/info_gatherer.ts) - -Line 129. - -*** - -### updateSkillData - -Update this skill's namespaced data on a FunctionResult via updateGlobalData. - -#### Signature - -```typescript -updateSkillData( - result: FunctionResult, - data: Record -): FunctionResult -``` - -#### Parameters - - - The FunctionResult to update. - - - - The data to store under this skill's namespace. - - -#### Returns - -`FunctionResult` — The FunctionResult for chaining. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 462. - -*** - -### validateEnvVars - -Validate that all required environment variables declared on the skill class -are set in the current process environment. - -Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` -directly. TS reads the same static from the class. - -Returns the list of missing variable names so callers can produce actionable -error messages. This differs from Python's `validate_env_vars() -> bool` -return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/agents/skills/builtin/info-gatherer/info-gatherer-skill#has-all-env-vars) is the boolean equivalent. - -#### Signature - -```typescript -validateEnvVars(): string[] -``` - -#### Returns - -`string[]` — Array of missing environment variable names (empty if all are present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 486. - -*** - -### validatePackages - -Validate that all required packages declared on the skill class can be imported. - -Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` -directly and tries `importlib.import_module(pkg)` for each; TS does the -equivalent with a dynamic `import()`. - -#### Signature - -```typescript -validatePackages(): Promise -``` - -#### Returns - -`Promise` — Array of package names that could not be imported (empty if all present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 557. - -## Source - -[`src/skills/builtin/info_gatherer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/info_gatherer.ts) - -Line 60. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/joke/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/joke/index.mdx index 77b7f3cef3..6ffd11aba9 100644 --- a/fern/products/sdk-reference/typescript/agents/skills/builtin/joke/index.mdx +++ b/fern/products/sdk-reference/typescript/agents/skills/builtin/joke/index.mdx @@ -5,7 +5,7 @@ sdk_label: "TypeScript SDK" icon: "typescript" lustri: auto_generated: true - kind: "module" + kind: "class" language: "typescript" qualified_name: "skills.builtin.joke" parent: "skills.builtin" @@ -14,19 +14,700 @@ lustri: --- # `joke` +Tells random jokes from a curated built-in collection. + +Tier 1 built-in skill with no external dependencies. Includes general, +programming, and dad joke categories. + ## Signature ```typescript -module joke +class JokeSkill extends SkillBase +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/agents/skills/skill-base) + +## Examples + +```typescript +agent.addSkill('joke'); +``` + +## Properties + + + Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. + + + + Configuration options provided at construction time. + + + + Unique identifier for this skill instance (includes timestamp and random bytes). + + + + Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. + + + + Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. + + + + Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. + + + + Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. + + + + Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. + + + + Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. + + + + The registered name of this skill type. + + + + Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. + + + + Additional SWAIG fields extracted from config, merged into tool definitions. + + +## Methods + +### cleanup + +Cleanup resources. Called when the skill is removed from an agent. + +#### Signature + +```typescript +cleanup(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 469. + +*** + +### constructor + +Create a new skill instance. + +Python parity: `core/skill_base.py:32-43`. +Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` +is left as `None` on the subclass. TS throws the equivalent when the static +defaults haven't been overridden. + +#### Signature + +```typescript +constructor(config?: SkillConfig): JokeSkill +``` + +#### Parameters + + + Optional configuration key-value pairs (Python: `params`). + + +#### Returns + +`JokeSkill` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 282. + +*** + +### defineTool + +Imperatively register a tool with this skill. + +Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. +Merges `this.swaigFields` into the tool definition (explicit fields on +`toolDef` take precedence), then pushes the result into `_dynamicTools` +so the default `getTools()` returns it at SWML render time. + +Intended for skills whose tool shape depends on config evaluated at +`setup()` time. Skills with a static tool list should override +`getTools()` instead. + +#### Signature + +```typescript +defineTool(toolDef: SkillToolDefinition): void +``` + +#### Parameters + + + The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 351. + +*** + +### getAgent + +Return the agent that owns this skill, asserting it is non-null. +Equivalent to accessing `self.agent` in Python, where the agent reference +is always set before `setup()` is called. + +The SkillManager lifecycle guarantees that `setAgent()` is called before +`setup()`, so this method is safe to use inside `setup()` and in any +tool handler invoked during an active agent session. + +#### Signature + +```typescript +getAgent(): AgentBase +``` + +#### Returns + +`AgentBase` — The owning `AgentBase` instance. + +#### Throws + +- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 261. + +*** + +### getConfig + +Get a configuration value by key, falling back to a default if not set. + +#### Signature + +```typescript +getConfig(key: string, defaultValue?: T): T +``` + +#### Type Parameters + + + +#### Parameters + + + The configuration key to look up. + + + + Value to return if the key is not present. + + +#### Returns + +`T` — The configuration value cast to type T, or the default value. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 524. + +*** + +### getDataMapTools + +Optional DataMap-style tool definitions. Skills that build their own +SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them +here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. + +Python equivalent: the direct `self.agent.register_swaig_function(fn)` +call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). +Default returns `[]` — skills using only the declarative `getTools()` path +do not need to override this. + +#### Signature + +```typescript +getDataMapTools(): Record[] +``` + +#### Returns + +`Record[]` — Array of fully-built SWAIG function dicts. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 372. + +*** + +### getGlobalData + +Signal to the agent prompt that the joke skill is active. Python +parity: `get_global_data` returns `{"joke_skill_enabled": true}`. + +#### Signature + +```typescript +getGlobalData(): Record +``` + +#### Returns + +`Record` + +#### Source + +[`src/skills/builtin/joke.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/joke.ts) + +Line 119. + +*** + +### getHints + +Get speech recognition hints relevant to this skill. + +#### Signature + +```typescript +getHints(): string[] ``` -## Classes +#### Returns + +`string[]` — Array of hint strings to improve speech recognition accuracy. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 402. + +*** + +### getInstanceKey + +Get the instance key used for deduplication in the SkillManager. + +For single-instance skills (`SUPPORTS_MULTIPLE_INSTANCES = false`), returns +the skill name. For multi-instance skills, returns `${skillName}_${toolName}` +using the `tool_name` config (falls back to the skill name). + +Matches Python's `SkillBase.get_instance_key()` default (`skill_base.py:141-146`). +Multi-instance subclasses only need to override when their key derivation +depends on config beyond `tool_name`. + +#### Signature + +```typescript +getInstanceKey(): string +``` + +#### Returns + +`string` — A unique key identifying this skill instance. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 427. + +*** + +### getParameterSchema + +Get the parameter schema for this skill class, describing all accepted configuration options. +Subclasses should override and call `super.getParameterSchema()` to include base parameters. + +Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): +returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a +`tool_name` entry with `default: cls.SKILL_NAME` for classes with +`SUPPORTS_MULTIPLE_INSTANCES = true`. + +**Modifiers:** `static` + +#### Signature + +```typescript +getParameterSchema(): Record +``` + +#### Returns + +`Record` — Record mapping parameter names to their schema entries. + +#### Source + +[`src/skills/builtin/joke.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/joke.ts) + +Line 104. + +*** + +### getPromptSections + +Get prompt sections to inject into the agent's system prompt. +Respects the `skip_prompt` config option — returns `[]` if set to `true`. +Subclasses should override `_getPromptSections()` instead of this method. + +#### Signature + +```typescript +getPromptSections(): SkillPromptSection[] +``` + +#### Returns + +`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 382. + +*** + +### getSkillData + +Read this skill's data from a raw call data object's global\_data. + +#### Signature + +```typescript +getSkillData(rawData: Record): Record +``` + +#### Parameters + + + The raw request data containing global\_data. + + +#### Returns + +`Record` — The skill's stored data, or an empty object if not found. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 450. + +*** + +### getSkillNamespace + +Get the namespaced key for storing per-skill data in global\_data. + +#### Signature + +```typescript +getSkillNamespace(): string +``` + +#### Returns + +`string` — A string like "skill:datetime" or "skill:my\_prefix". + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 440. + +*** + +### getTools + +#### Signature + +```typescript +getTools(): SkillToolDefinition[] +``` + +#### Returns + +`SkillToolDefinition[]` — A single joke tool (configurable name) that returns a random joke with optional category filter. + +#### Source + +[`src/skills/builtin/joke.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/joke.ts) + +Line 124. + +*** + +### hasAllEnvVars + +Check if all required environment variables are present. +Convenience wrapper around `validateEnvVars()` that returns a boolean, +matching the Python `validate_env_vars() -> bool` return type. + +#### Signature + +```typescript +hasAllEnvVars(): boolean +``` + +#### Returns + +`boolean` — `true` if all required env vars are set, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 544. + +*** + +### hasAllPackages + +Check if all required packages declared in the manifest are available. +Convenience wrapper around `validatePackages()` that returns a boolean, +matching the Python `validate_packages() -> bool` return type. + +#### Signature + +```typescript +hasAllPackages(): Promise +``` + +#### Returns + +`Promise` — `true` if all required packages are importable, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 579. + +*** + +### isInitialized + +Check if the skill has been initialized by the SkillManager. + +#### Signature + +```typescript +isInitialized(): boolean +``` + +#### Returns + +`boolean` — True if setup() has completed and the skill is marked initialized. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 507. + +*** + +### markInitialized + +Mark the skill as initialized (called by SkillManager). + +#### Signature + +```typescript +markInitialized(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 514. + +*** + +### setAgent + +Set the agent reference for this skill. +Called by the SkillManager/AgentBase when the skill is attached to an agent. +Python equivalent: `self.agent = agent` in `__init__`. + +#### Signature + +```typescript +setAgent(agent: AgentBase): void +``` + +#### Parameters + + + The agent that owns this skill. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 534. + +*** + +### setup + +Setup the skill. Called when the skill is added to an agent. +Override to perform initialization (API connections, config validation, etc.) + +#### Signature + +```typescript +setup(): Promise +``` + +#### Returns + +`Promise` — `true` if setup succeeded, `false` otherwise. Python equivalent: abstract `setup() -> bool`. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 313. + +*** + +### updateSkillData + +Update this skill's namespaced data on a FunctionResult via updateGlobalData. + +#### Signature + +```typescript +updateSkillData( + result: FunctionResult, + data: Record +): FunctionResult +``` + +#### Parameters + + + The FunctionResult to update. + + + + The data to store under this skill's namespace. + + +#### Returns + +`FunctionResult` — The FunctionResult for chaining. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 462. + +*** + +### validateEnvVars + +Validate that all required environment variables declared on the skill class +are set in the current process environment. + +Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` +directly. TS reads the same static from the class. + +Returns the list of missing variable names so callers can produce actionable +error messages. This differs from Python's `validate_env_vars() -> bool` +return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/agents/skills/builtin/joke#has-all-env-vars) is the boolean equivalent. + +#### Signature + +```typescript +validateEnvVars(): string[] +``` + +#### Returns + +`string[]` — Array of missing environment variable names (empty if all are present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 486. + +*** + +### validatePackages + +Validate that all required packages declared on the skill class can be imported. + +Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` +directly and tries `importlib.import_module(pkg)` for each; TS does the +equivalent with a dynamic `import()`. + +#### Signature + +```typescript +validatePackages(): Promise +``` + +#### Returns + +`Promise` — Array of package names that could not be imported (empty if all present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - - - Tells random jokes from a curated built-in collection. - - +Line 557. ## Functions @@ -60,4 +741,4 @@ Line 194. [`src/skills/builtin/joke.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/joke.ts) -Line 1. +Line 96. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/joke/joke-skill/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/joke/joke-skill/index.mdx deleted file mode 100644 index d8e7364c78..0000000000 --- a/fern/products/sdk-reference/typescript/agents/skills/builtin/joke/joke-skill/index.mdx +++ /dev/null @@ -1,716 +0,0 @@ ---- -slug: "/reference/typescript/agents/skills/builtin/joke/joke-skill" -title: "JokeSkill" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "skills.builtin.joke.JokeSkill" - parent: "skills.builtin.joke" - module: "agents.skills.builtin.joke" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/joke.ts" ---- -# `JokeSkill` - -Tells random jokes from a curated built-in collection. - -Tier 1 built-in skill with no external dependencies. Includes general, -programming, and dad joke categories. - -## Signature - -```typescript -class JokeSkill extends SkillBase -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/agents/skills/skill-base) - -## Examples - -```typescript -agent.addSkill('joke'); -``` - -## Properties - - - Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. - - - - Configuration options provided at construction time. - - - - Unique identifier for this skill instance (includes timestamp and random bytes). - - - - Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. - - - - Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. - - - - Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. - - - - Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. - - - - Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. - - - - Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. - - - - The registered name of this skill type. - - - - Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. - - - - Additional SWAIG fields extracted from config, merged into tool definitions. - - -## Methods - -### cleanup - -Cleanup resources. Called when the skill is removed from an agent. - -#### Signature - -```typescript -cleanup(): Promise -``` - -#### Returns - -`Promise` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 469. - -*** - -### constructor - -Create a new skill instance. - -Python parity: `core/skill_base.py:32-43`. -Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` -is left as `None` on the subclass. TS throws the equivalent when the static -defaults haven't been overridden. - -#### Signature - -```typescript -constructor(config?: SkillConfig): JokeSkill -``` - -#### Parameters - - - Optional configuration key-value pairs (Python: `params`). - - -#### Returns - -`JokeSkill` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 282. - -*** - -### defineTool - -Imperatively register a tool with this skill. - -Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. -Merges `this.swaigFields` into the tool definition (explicit fields on -`toolDef` take precedence), then pushes the result into `_dynamicTools` -so the default `getTools()` returns it at SWML render time. - -Intended for skills whose tool shape depends on config evaluated at -`setup()` time. Skills with a static tool list should override -`getTools()` instead. - -#### Signature - -```typescript -defineTool(toolDef: SkillToolDefinition): void -``` - -#### Parameters - - - The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 351. - -*** - -### getAgent - -Return the agent that owns this skill, asserting it is non-null. -Equivalent to accessing `self.agent` in Python, where the agent reference -is always set before `setup()` is called. - -The SkillManager lifecycle guarantees that `setAgent()` is called before -`setup()`, so this method is safe to use inside `setup()` and in any -tool handler invoked during an active agent session. - -#### Signature - -```typescript -getAgent(): AgentBase -``` - -#### Returns - -`AgentBase` — The owning `AgentBase` instance. - -#### Throws - -- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 261. - -*** - -### getConfig - -Get a configuration value by key, falling back to a default if not set. - -#### Signature - -```typescript -getConfig(key: string, defaultValue?: T): T -``` - -#### Type Parameters - - - -#### Parameters - - - The configuration key to look up. - - - - Value to return if the key is not present. - - -#### Returns - -`T` — The configuration value cast to type T, or the default value. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 524. - -*** - -### getDataMapTools - -Optional DataMap-style tool definitions. Skills that build their own -SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them -here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. - -Python equivalent: the direct `self.agent.register_swaig_function(fn)` -call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). -Default returns `[]` — skills using only the declarative `getTools()` path -do not need to override this. - -#### Signature - -```typescript -getDataMapTools(): Record[] -``` - -#### Returns - -`Record[]` — Array of fully-built SWAIG function dicts. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 372. - -*** - -### getGlobalData - -Signal to the agent prompt that the joke skill is active. Python -parity: `get_global_data` returns `{"joke_skill_enabled": true}`. - -#### Signature - -```typescript -getGlobalData(): Record -``` - -#### Returns - -`Record` - -#### Source - -[`src/skills/builtin/joke.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/joke.ts) - -Line 119. - -*** - -### getHints - -Get speech recognition hints relevant to this skill. - -#### Signature - -```typescript -getHints(): string[] -``` - -#### Returns - -`string[]` — Array of hint strings to improve speech recognition accuracy. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 402. - -*** - -### getInstanceKey - -Get the instance key used for deduplication in the SkillManager. - -For single-instance skills (`SUPPORTS_MULTIPLE_INSTANCES = false`), returns -the skill name. For multi-instance skills, returns `${skillName}_${toolName}` -using the `tool_name` config (falls back to the skill name). - -Matches Python's `SkillBase.get_instance_key()` default (`skill_base.py:141-146`). -Multi-instance subclasses only need to override when their key derivation -depends on config beyond `tool_name`. - -#### Signature - -```typescript -getInstanceKey(): string -``` - -#### Returns - -`string` — A unique key identifying this skill instance. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 427. - -*** - -### getParameterSchema - -Get the parameter schema for this skill class, describing all accepted configuration options. -Subclasses should override and call `super.getParameterSchema()` to include base parameters. - -Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): -returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a -`tool_name` entry with `default: cls.SKILL_NAME` for classes with -`SUPPORTS_MULTIPLE_INSTANCES = true`. - -**Modifiers:** `static` - -#### Signature - -```typescript -getParameterSchema(): Record -``` - -#### Returns - -`Record` — Record mapping parameter names to their schema entries. - -#### Source - -[`src/skills/builtin/joke.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/joke.ts) - -Line 104. - -*** - -### getPromptSections - -Get prompt sections to inject into the agent's system prompt. -Respects the `skip_prompt` config option — returns `[]` if set to `true`. -Subclasses should override `_getPromptSections()` instead of this method. - -#### Signature - -```typescript -getPromptSections(): SkillPromptSection[] -``` - -#### Returns - -`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 382. - -*** - -### getSkillData - -Read this skill's data from a raw call data object's global\_data. - -#### Signature - -```typescript -getSkillData(rawData: Record): Record -``` - -#### Parameters - - - The raw request data containing global\_data. - - -#### Returns - -`Record` — The skill's stored data, or an empty object if not found. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 450. - -*** - -### getSkillNamespace - -Get the namespaced key for storing per-skill data in global\_data. - -#### Signature - -```typescript -getSkillNamespace(): string -``` - -#### Returns - -`string` — A string like "skill:datetime" or "skill:my\_prefix". - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 440. - -*** - -### getTools - -#### Signature - -```typescript -getTools(): SkillToolDefinition[] -``` - -#### Returns - -`SkillToolDefinition[]` — A single joke tool (configurable name) that returns a random joke with optional category filter. - -#### Source - -[`src/skills/builtin/joke.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/joke.ts) - -Line 124. - -*** - -### hasAllEnvVars - -Check if all required environment variables are present. -Convenience wrapper around `validateEnvVars()` that returns a boolean, -matching the Python `validate_env_vars() -> bool` return type. - -#### Signature - -```typescript -hasAllEnvVars(): boolean -``` - -#### Returns - -`boolean` — `true` if all required env vars are set, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 544. - -*** - -### hasAllPackages - -Check if all required packages declared in the manifest are available. -Convenience wrapper around `validatePackages()` that returns a boolean, -matching the Python `validate_packages() -> bool` return type. - -#### Signature - -```typescript -hasAllPackages(): Promise -``` - -#### Returns - -`Promise` — `true` if all required packages are importable, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 579. - -*** - -### isInitialized - -Check if the skill has been initialized by the SkillManager. - -#### Signature - -```typescript -isInitialized(): boolean -``` - -#### Returns - -`boolean` — True if setup() has completed and the skill is marked initialized. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 507. - -*** - -### markInitialized - -Mark the skill as initialized (called by SkillManager). - -#### Signature - -```typescript -markInitialized(): void -``` - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 514. - -*** - -### setAgent - -Set the agent reference for this skill. -Called by the SkillManager/AgentBase when the skill is attached to an agent. -Python equivalent: `self.agent = agent` in `__init__`. - -#### Signature - -```typescript -setAgent(agent: AgentBase): void -``` - -#### Parameters - - - The agent that owns this skill. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 534. - -*** - -### setup - -Setup the skill. Called when the skill is added to an agent. -Override to perform initialization (API connections, config validation, etc.) - -#### Signature - -```typescript -setup(): Promise -``` - -#### Returns - -`Promise` — `true` if setup succeeded, `false` otherwise. Python equivalent: abstract `setup() -> bool`. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 313. - -*** - -### updateSkillData - -Update this skill's namespaced data on a FunctionResult via updateGlobalData. - -#### Signature - -```typescript -updateSkillData( - result: FunctionResult, - data: Record -): FunctionResult -``` - -#### Parameters - - - The FunctionResult to update. - - - - The data to store under this skill's namespace. - - -#### Returns - -`FunctionResult` — The FunctionResult for chaining. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 462. - -*** - -### validateEnvVars - -Validate that all required environment variables declared on the skill class -are set in the current process environment. - -Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` -directly. TS reads the same static from the class. - -Returns the list of missing variable names so callers can produce actionable -error messages. This differs from Python's `validate_env_vars() -> bool` -return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/agents/skills/builtin/joke/joke-skill#has-all-env-vars) is the boolean equivalent. - -#### Signature - -```typescript -validateEnvVars(): string[] -``` - -#### Returns - -`string[]` — Array of missing environment variable names (empty if all are present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 486. - -*** - -### validatePackages - -Validate that all required packages declared on the skill class can be imported. - -Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` -directly and tries `importlib.import_module(pkg)` for each; TS does the -equivalent with a dynamic `import()`. - -#### Signature - -```typescript -validatePackages(): Promise -``` - -#### Returns - -`Promise` — Array of package names that could not be imported (empty if all present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 557. - -## Source - -[`src/skills/builtin/joke.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/joke.ts) - -Line 96. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/math/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/math/index.mdx index 96b9efae9d..da2fb12644 100644 --- a/fern/products/sdk-reference/typescript/agents/skills/builtin/math/index.mdx +++ b/fern/products/sdk-reference/typescript/agents/skills/builtin/math/index.mdx @@ -5,7 +5,7 @@ sdk_label: "TypeScript SDK" icon: "typescript" lustri: auto_generated: true - kind: "module" + kind: "class" language: "typescript" qualified_name: "skills.builtin.math" parent: "skills.builtin" @@ -14,19 +14,701 @@ lustri: --- # `math` +Evaluates mathematical expressions safely using a sandboxed parser. + +Tier 1 built-in skill with no external dependencies. Only allows digits, +basic arithmetic operators, parentheses, decimal points, and spaces. + +Registers a single SWAIG tool: `calculate`. + ## Signature ```typescript -module math +class MathSkill extends SkillBase +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/agents/skills/skill-base) + +## Examples + +```typescript +agent.addSkill('math'); +``` + +## Properties + + + Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. + + + + Configuration options provided at construction time. + + + + Unique identifier for this skill instance (includes timestamp and random bytes). + + + + Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. + + + + Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. + + + + Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. + + + + Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. + + + + Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. + + + + Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. + + + + The registered name of this skill type. + + + + Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. + + + + Additional SWAIG fields extracted from config, merged into tool definitions. + + +## Methods + +### cleanup + +Cleanup resources. Called when the skill is removed from an agent. + +#### Signature + +```typescript +cleanup(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 469. + +*** + +### constructor + +Create a new skill instance. + +Python parity: `core/skill_base.py:32-43`. +Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` +is left as `None` on the subclass. TS throws the equivalent when the static +defaults haven't been overridden. + +#### Signature + +```typescript +constructor(config?: SkillConfig): MathSkill +``` + +#### Parameters + + + Optional configuration key-value pairs (Python: `params`). + + +#### Returns + +`MathSkill` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 282. + +*** + +### defineTool + +Imperatively register a tool with this skill. + +Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. +Merges `this.swaigFields` into the tool definition (explicit fields on +`toolDef` take precedence), then pushes the result into `_dynamicTools` +so the default `getTools()` returns it at SWML render time. + +Intended for skills whose tool shape depends on config evaluated at +`setup()` time. Skills with a static tool list should override +`getTools()` instead. + +#### Signature + +```typescript +defineTool(toolDef: SkillToolDefinition): void +``` + +#### Parameters + + + The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 351. + +*** + +### getAgent + +Return the agent that owns this skill, asserting it is non-null. +Equivalent to accessing `self.agent` in Python, where the agent reference +is always set before `setup()` is called. + +The SkillManager lifecycle guarantees that `setAgent()` is called before +`setup()`, so this method is safe to use inside `setup()` and in any +tool handler invoked during an active agent session. + +#### Signature + +```typescript +getAgent(): AgentBase +``` + +#### Returns + +`AgentBase` — The owning `AgentBase` instance. + +#### Throws + +- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 261. + +*** + +### getConfig + +Get a configuration value by key, falling back to a default if not set. + +#### Signature + +```typescript +getConfig(key: string, defaultValue?: T): T +``` + +#### Type Parameters + + + +#### Parameters + + + The configuration key to look up. + + + + Value to return if the key is not present. + + +#### Returns + +`T` — The configuration value cast to type T, or the default value. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 524. + +*** + +### getDataMapTools + +Optional DataMap-style tool definitions. Skills that build their own +SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them +here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. + +Python equivalent: the direct `self.agent.register_swaig_function(fn)` +call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). +Default returns `[]` — skills using only the declarative `getTools()` path +do not need to override this. + +#### Signature + +```typescript +getDataMapTools(): Record[] +``` + +#### Returns + +`Record[]` — Array of fully-built SWAIG function dicts. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 372. + +*** + +### getGlobalData + +Get global data to merge into the agent's global data store. + +#### Signature + +```typescript +getGlobalData(): Record +``` + +#### Returns + +`Record` — Key-value pairs to be merged into the agent's global data. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 410. + +*** + +### getHints + +Get speech recognition hints relevant to this skill. + +#### Signature + +```typescript +getHints(): string[] ``` -## Classes +#### Returns + +`string[]` — Array of hint strings to improve speech recognition accuracy. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 402. + +*** + +### getInstanceKey + +Get the instance key used for deduplication in the SkillManager. + +For single-instance skills (`SUPPORTS_MULTIPLE_INSTANCES = false`), returns +the skill name. For multi-instance skills, returns `${skillName}_${toolName}` +using the `tool_name` config (falls back to the skill name). + +Matches Python's `SkillBase.get_instance_key()` default (`skill_base.py:141-146`). +Multi-instance subclasses only need to override when their key derivation +depends on config beyond `tool_name`. + +#### Signature + +```typescript +getInstanceKey(): string +``` + +#### Returns + +`string` — A unique key identifying this skill instance. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 427. + +*** + +### getParameterSchema + +Get the parameter schema for this skill class, describing all accepted configuration options. +Subclasses should override and call `super.getParameterSchema()` to include base parameters. + +Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): +returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a +`tool_name` entry with `default: cls.SKILL_NAME` for classes with +`SUPPORTS_MULTIPLE_INSTANCES = true`. + +**Modifiers:** `static` + +#### Signature + +```typescript +getParameterSchema(): Record +``` + +#### Returns + +`Record` — Record mapping parameter names to their schema entries. + +#### Source + +[`src/skills/builtin/math.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/math.ts) + +Line 83. + +*** + +### getPromptSections + +Get prompt sections to inject into the agent's system prompt. +Respects the `skip_prompt` config option — returns `[]` if set to `true`. +Subclasses should override `_getPromptSections()` instead of this method. + +#### Signature + +```typescript +getPromptSections(): SkillPromptSection[] +``` + +#### Returns + +`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 382. + +*** + +### getSkillData + +Read this skill's data from a raw call data object's global\_data. + +#### Signature + +```typescript +getSkillData(rawData: Record): Record +``` + +#### Parameters + + + The raw request data containing global\_data. + + +#### Returns + +`Record` — The skill's stored data, or an empty object if not found. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 450. + +*** + +### getSkillNamespace + +Get the namespaced key for storing per-skill data in global\_data. + +#### Signature + +```typescript +getSkillNamespace(): string +``` + +#### Returns + +`string` — A string like "skill:datetime" or "skill:my\_prefix". + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 440. + +*** + +### getTools + +#### Signature + +```typescript +getTools(): SkillToolDefinition[] +``` + +#### Returns + +`SkillToolDefinition[]` — A single `calculate` tool that evaluates a math expression string. + +#### Source + +[`src/skills/builtin/math.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/math.ts) + +Line 88. + +*** + +### hasAllEnvVars + +Check if all required environment variables are present. +Convenience wrapper around `validateEnvVars()` that returns a boolean, +matching the Python `validate_env_vars() -> bool` return type. + +#### Signature + +```typescript +hasAllEnvVars(): boolean +``` + +#### Returns + +`boolean` — `true` if all required env vars are set, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 544. + +*** + +### hasAllPackages + +Check if all required packages declared in the manifest are available. +Convenience wrapper around `validatePackages()` that returns a boolean, +matching the Python `validate_packages() -> bool` return type. + +#### Signature + +```typescript +hasAllPackages(): Promise +``` + +#### Returns + +`Promise` — `true` if all required packages are importable, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 579. + +*** + +### isInitialized + +Check if the skill has been initialized by the SkillManager. + +#### Signature + +```typescript +isInitialized(): boolean +``` + +#### Returns + +`boolean` — True if setup() has completed and the skill is marked initialized. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 507. + +*** + +### markInitialized + +Mark the skill as initialized (called by SkillManager). + +#### Signature + +```typescript +markInitialized(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 514. + +*** + +### setAgent + +Set the agent reference for this skill. +Called by the SkillManager/AgentBase when the skill is attached to an agent. +Python equivalent: `self.agent = agent` in `__init__`. + +#### Signature + +```typescript +setAgent(agent: AgentBase): void +``` + +#### Parameters + + + The agent that owns this skill. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 534. + +*** + +### setup + +Setup the skill. Called when the skill is added to an agent. +Override to perform initialization (API connections, config validation, etc.) + +#### Signature + +```typescript +setup(): Promise +``` + +#### Returns + +`Promise` — `true` if setup succeeded, `false` otherwise. Python equivalent: abstract `setup() -> bool`. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 313. + +*** + +### updateSkillData + +Update this skill's namespaced data on a FunctionResult via updateGlobalData. + +#### Signature + +```typescript +updateSkillData( + result: FunctionResult, + data: Record +): FunctionResult +``` + +#### Parameters + + + The FunctionResult to update. + + + + The data to store under this skill's namespace. + + +#### Returns + +`FunctionResult` — The FunctionResult for chaining. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 462. + +*** + +### validateEnvVars + +Validate that all required environment variables declared on the skill class +are set in the current process environment. + +Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` +directly. TS reads the same static from the class. + +Returns the list of missing variable names so callers can produce actionable +error messages. This differs from Python's `validate_env_vars() -> bool` +return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/agents/skills/builtin/math#has-all-env-vars) is the boolean equivalent. + +#### Signature + +```typescript +validateEnvVars(): string[] +``` + +#### Returns + +`string[]` — Array of missing environment variable names (empty if all are present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 486. + +*** + +### validatePackages + +Validate that all required packages declared on the skill class can be imported. + +Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` +directly and tries `importlib.import_module(pkg)` for each; TS does the +equivalent with a dynamic `import()`. + +#### Signature + +```typescript +validatePackages(): Promise +``` + +#### Returns + +`Promise` — Array of package names that could not be imported (empty if all present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - - - Evaluates mathematical expressions safely using a sandboxed parser. - - +Line 557. ## Functions @@ -60,4 +742,4 @@ Line 147. [`src/skills/builtin/math.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/math.ts) -Line 1. +Line 75. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/math/math-skill/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/math/math-skill/index.mdx deleted file mode 100644 index 07c225a26c..0000000000 --- a/fern/products/sdk-reference/typescript/agents/skills/builtin/math/math-skill/index.mdx +++ /dev/null @@ -1,717 +0,0 @@ ---- -slug: "/reference/typescript/agents/skills/builtin/math/math-skill" -title: "MathSkill" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "skills.builtin.math.MathSkill" - parent: "skills.builtin.math" - module: "agents.skills.builtin.math" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/math.ts" ---- -# `MathSkill` - -Evaluates mathematical expressions safely using a sandboxed parser. - -Tier 1 built-in skill with no external dependencies. Only allows digits, -basic arithmetic operators, parentheses, decimal points, and spaces. - -Registers a single SWAIG tool: `calculate`. - -## Signature - -```typescript -class MathSkill extends SkillBase -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/agents/skills/skill-base) - -## Examples - -```typescript -agent.addSkill('math'); -``` - -## Properties - - - Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. - - - - Configuration options provided at construction time. - - - - Unique identifier for this skill instance (includes timestamp and random bytes). - - - - Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. - - - - Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. - - - - Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. - - - - Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. - - - - Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. - - - - Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. - - - - The registered name of this skill type. - - - - Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. - - - - Additional SWAIG fields extracted from config, merged into tool definitions. - - -## Methods - -### cleanup - -Cleanup resources. Called when the skill is removed from an agent. - -#### Signature - -```typescript -cleanup(): Promise -``` - -#### Returns - -`Promise` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 469. - -*** - -### constructor - -Create a new skill instance. - -Python parity: `core/skill_base.py:32-43`. -Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` -is left as `None` on the subclass. TS throws the equivalent when the static -defaults haven't been overridden. - -#### Signature - -```typescript -constructor(config?: SkillConfig): MathSkill -``` - -#### Parameters - - - Optional configuration key-value pairs (Python: `params`). - - -#### Returns - -`MathSkill` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 282. - -*** - -### defineTool - -Imperatively register a tool with this skill. - -Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. -Merges `this.swaigFields` into the tool definition (explicit fields on -`toolDef` take precedence), then pushes the result into `_dynamicTools` -so the default `getTools()` returns it at SWML render time. - -Intended for skills whose tool shape depends on config evaluated at -`setup()` time. Skills with a static tool list should override -`getTools()` instead. - -#### Signature - -```typescript -defineTool(toolDef: SkillToolDefinition): void -``` - -#### Parameters - - - The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 351. - -*** - -### getAgent - -Return the agent that owns this skill, asserting it is non-null. -Equivalent to accessing `self.agent` in Python, where the agent reference -is always set before `setup()` is called. - -The SkillManager lifecycle guarantees that `setAgent()` is called before -`setup()`, so this method is safe to use inside `setup()` and in any -tool handler invoked during an active agent session. - -#### Signature - -```typescript -getAgent(): AgentBase -``` - -#### Returns - -`AgentBase` — The owning `AgentBase` instance. - -#### Throws - -- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 261. - -*** - -### getConfig - -Get a configuration value by key, falling back to a default if not set. - -#### Signature - -```typescript -getConfig(key: string, defaultValue?: T): T -``` - -#### Type Parameters - - - -#### Parameters - - - The configuration key to look up. - - - - Value to return if the key is not present. - - -#### Returns - -`T` — The configuration value cast to type T, or the default value. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 524. - -*** - -### getDataMapTools - -Optional DataMap-style tool definitions. Skills that build their own -SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them -here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. - -Python equivalent: the direct `self.agent.register_swaig_function(fn)` -call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). -Default returns `[]` — skills using only the declarative `getTools()` path -do not need to override this. - -#### Signature - -```typescript -getDataMapTools(): Record[] -``` - -#### Returns - -`Record[]` — Array of fully-built SWAIG function dicts. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 372. - -*** - -### getGlobalData - -Get global data to merge into the agent's global data store. - -#### Signature - -```typescript -getGlobalData(): Record -``` - -#### Returns - -`Record` — Key-value pairs to be merged into the agent's global data. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 410. - -*** - -### getHints - -Get speech recognition hints relevant to this skill. - -#### Signature - -```typescript -getHints(): string[] -``` - -#### Returns - -`string[]` — Array of hint strings to improve speech recognition accuracy. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 402. - -*** - -### getInstanceKey - -Get the instance key used for deduplication in the SkillManager. - -For single-instance skills (`SUPPORTS_MULTIPLE_INSTANCES = false`), returns -the skill name. For multi-instance skills, returns `${skillName}_${toolName}` -using the `tool_name` config (falls back to the skill name). - -Matches Python's `SkillBase.get_instance_key()` default (`skill_base.py:141-146`). -Multi-instance subclasses only need to override when their key derivation -depends on config beyond `tool_name`. - -#### Signature - -```typescript -getInstanceKey(): string -``` - -#### Returns - -`string` — A unique key identifying this skill instance. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 427. - -*** - -### getParameterSchema - -Get the parameter schema for this skill class, describing all accepted configuration options. -Subclasses should override and call `super.getParameterSchema()` to include base parameters. - -Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): -returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a -`tool_name` entry with `default: cls.SKILL_NAME` for classes with -`SUPPORTS_MULTIPLE_INSTANCES = true`. - -**Modifiers:** `static` - -#### Signature - -```typescript -getParameterSchema(): Record -``` - -#### Returns - -`Record` — Record mapping parameter names to their schema entries. - -#### Source - -[`src/skills/builtin/math.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/math.ts) - -Line 83. - -*** - -### getPromptSections - -Get prompt sections to inject into the agent's system prompt. -Respects the `skip_prompt` config option — returns `[]` if set to `true`. -Subclasses should override `_getPromptSections()` instead of this method. - -#### Signature - -```typescript -getPromptSections(): SkillPromptSection[] -``` - -#### Returns - -`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 382. - -*** - -### getSkillData - -Read this skill's data from a raw call data object's global\_data. - -#### Signature - -```typescript -getSkillData(rawData: Record): Record -``` - -#### Parameters - - - The raw request data containing global\_data. - - -#### Returns - -`Record` — The skill's stored data, or an empty object if not found. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 450. - -*** - -### getSkillNamespace - -Get the namespaced key for storing per-skill data in global\_data. - -#### Signature - -```typescript -getSkillNamespace(): string -``` - -#### Returns - -`string` — A string like "skill:datetime" or "skill:my\_prefix". - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 440. - -*** - -### getTools - -#### Signature - -```typescript -getTools(): SkillToolDefinition[] -``` - -#### Returns - -`SkillToolDefinition[]` — A single `calculate` tool that evaluates a math expression string. - -#### Source - -[`src/skills/builtin/math.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/math.ts) - -Line 88. - -*** - -### hasAllEnvVars - -Check if all required environment variables are present. -Convenience wrapper around `validateEnvVars()` that returns a boolean, -matching the Python `validate_env_vars() -> bool` return type. - -#### Signature - -```typescript -hasAllEnvVars(): boolean -``` - -#### Returns - -`boolean` — `true` if all required env vars are set, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 544. - -*** - -### hasAllPackages - -Check if all required packages declared in the manifest are available. -Convenience wrapper around `validatePackages()` that returns a boolean, -matching the Python `validate_packages() -> bool` return type. - -#### Signature - -```typescript -hasAllPackages(): Promise -``` - -#### Returns - -`Promise` — `true` if all required packages are importable, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 579. - -*** - -### isInitialized - -Check if the skill has been initialized by the SkillManager. - -#### Signature - -```typescript -isInitialized(): boolean -``` - -#### Returns - -`boolean` — True if setup() has completed and the skill is marked initialized. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 507. - -*** - -### markInitialized - -Mark the skill as initialized (called by SkillManager). - -#### Signature - -```typescript -markInitialized(): void -``` - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 514. - -*** - -### setAgent - -Set the agent reference for this skill. -Called by the SkillManager/AgentBase when the skill is attached to an agent. -Python equivalent: `self.agent = agent` in `__init__`. - -#### Signature - -```typescript -setAgent(agent: AgentBase): void -``` - -#### Parameters - - - The agent that owns this skill. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 534. - -*** - -### setup - -Setup the skill. Called when the skill is added to an agent. -Override to perform initialization (API connections, config validation, etc.) - -#### Signature - -```typescript -setup(): Promise -``` - -#### Returns - -`Promise` — `true` if setup succeeded, `false` otherwise. Python equivalent: abstract `setup() -> bool`. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 313. - -*** - -### updateSkillData - -Update this skill's namespaced data on a FunctionResult via updateGlobalData. - -#### Signature - -```typescript -updateSkillData( - result: FunctionResult, - data: Record -): FunctionResult -``` - -#### Parameters - - - The FunctionResult to update. - - - - The data to store under this skill's namespace. - - -#### Returns - -`FunctionResult` — The FunctionResult for chaining. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 462. - -*** - -### validateEnvVars - -Validate that all required environment variables declared on the skill class -are set in the current process environment. - -Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` -directly. TS reads the same static from the class. - -Returns the list of missing variable names so callers can produce actionable -error messages. This differs from Python's `validate_env_vars() -> bool` -return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/agents/skills/builtin/math/math-skill#has-all-env-vars) is the boolean equivalent. - -#### Signature - -```typescript -validateEnvVars(): string[] -``` - -#### Returns - -`string[]` — Array of missing environment variable names (empty if all are present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 486. - -*** - -### validatePackages - -Validate that all required packages declared on the skill class can be imported. - -Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` -directly and tries `importlib.import_module(pkg)` for each; TS does the -equivalent with a dynamic `import()`. - -#### Signature - -```typescript -validatePackages(): Promise -``` - -#### Returns - -`Promise` — Array of package names that could not be imported (empty if all present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 557. - -## Source - -[`src/skills/builtin/math.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/math.ts) - -Line 75. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/mcp-gateway/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/mcp-gateway/index.mdx index 9998a70c68..fc05bdb1d4 100644 --- a/fern/products/sdk-reference/typescript/agents/skills/builtin/mcp-gateway/index.mdx +++ b/fern/products/sdk-reference/typescript/agents/skills/builtin/mcp-gateway/index.mdx @@ -5,7 +5,7 @@ sdk_label: "TypeScript SDK" icon: "typescript" lustri: auto_generated: true - kind: "module" + kind: "class" language: "typescript" qualified_name: "skills.builtin.mcp_gateway" parent: "skills.builtin" @@ -14,19 +14,704 @@ lustri: --- # `mcp_gateway` +Bridge MCP (Model Context Protocol) servers with SWAIG functions. + +When configured, calls a gateway's `/services` endpoint to discover MCP +services, enumerates each service's tools, and registers them as SWAIG +tools prefixed with `tool_prefix` (default `mcp_`). A hidden hangup hook +tool cleans up MCP sessions when the call ends. + ## Signature ```typescript -module mcp_gateway +class McpGatewaySkill extends SkillBase +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/agents/skills/skill-base) + +## Examples + +```typescript +agent.addSkill('mcp_gateway', { + gateway_url: 'https://mcp-gateway.example.com', + tool_prefix: 'mcp_', +}); +``` + +## Properties + + + Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. + + + + Configuration options provided at construction time. + + + + Unique identifier for this skill instance (includes timestamp and random bytes). + + + + Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. + + + + Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. + + + + Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. + + + + Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. + + + + Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. + + + + Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. + + + + The registered name of this skill type. + + + + Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. + + + + Additional SWAIG fields extracted from config, merged into tool definitions. + + +## Methods + +### cleanup + +Cleanup resources. Called when the skill is removed from an agent. + +#### Signature + +```typescript +cleanup(): Promise ``` -## Classes +#### Returns + +`Promise` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 469. + +*** + +### constructor + +Create a new skill instance. + +Python parity: `core/skill_base.py:32-43`. +Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` +is left as `None` on the subclass. TS throws the equivalent when the static +defaults haven't been overridden. + +#### Signature + +```typescript +constructor(config?: SkillConfig): McpGatewaySkill +``` + +#### Parameters + + + Optional configuration key-value pairs (Python: `params`). + + +#### Returns + +`McpGatewaySkill` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 282. + +*** + +### defineTool + +Imperatively register a tool with this skill. + +Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. +Merges `this.swaigFields` into the tool definition (explicit fields on +`toolDef` take precedence), then pushes the result into `_dynamicTools` +so the default `getTools()` returns it at SWML render time. + +Intended for skills whose tool shape depends on config evaluated at +`setup()` time. Skills with a static tool list should override +`getTools()` instead. + +#### Signature + +```typescript +defineTool(toolDef: SkillToolDefinition): void +``` + +#### Parameters + + + The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 351. + +*** + +### getAgent + +Return the agent that owns this skill, asserting it is non-null. +Equivalent to accessing `self.agent` in Python, where the agent reference +is always set before `setup()` is called. + +The SkillManager lifecycle guarantees that `setAgent()` is called before +`setup()`, so this method is safe to use inside `setup()` and in any +tool handler invoked during an active agent session. + +#### Signature + +```typescript +getAgent(): AgentBase +``` + +#### Returns + +`AgentBase` — The owning `AgentBase` instance. + +#### Throws + +- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 261. + +*** + +### getConfig + +Get a configuration value by key, falling back to a default if not set. + +#### Signature + +```typescript +getConfig(key: string, defaultValue?: T): T +``` + +#### Type Parameters + + + +#### Parameters + + + The configuration key to look up. + + + + Value to return if the key is not present. + + +#### Returns + +`T` — The configuration value cast to type T, or the default value. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 524. + +*** + +### getDataMapTools + +Optional DataMap-style tool definitions. Skills that build their own +SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them +here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. + +Python equivalent: the direct `self.agent.register_swaig_function(fn)` +call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). +Default returns `[]` — skills using only the declarative `getTools()` path +do not need to override this. + +#### Signature + +```typescript +getDataMapTools(): Record[] +``` + +#### Returns + +`Record[]` — Array of fully-built SWAIG function dicts. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 372. + +*** + +### getGlobalData + +Get global data to merge into the agent's global data store. + +#### Signature + +```typescript +getGlobalData(): Record +``` + +#### Returns + +`Record` — Key-value pairs to be merged into the agent's global data. + +#### Source + +[`src/skills/builtin/mcp_gateway.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/mcp_gateway.ts) + +Line 271. + +*** + +### getHints + +Get speech recognition hints relevant to this skill. + +#### Signature + +```typescript +getHints(): string[] +``` + +#### Returns + +`string[]` — Array of hint strings to improve speech recognition accuracy. + +#### Source + +[`src/skills/builtin/mcp_gateway.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/mcp_gateway.ts) + +Line 257. + +*** + +### getInstanceKey + +Get the instance key used for deduplication in the SkillManager. + +For single-instance skills (`SUPPORTS_MULTIPLE_INSTANCES = false`), returns +the skill name. For multi-instance skills, returns `${skillName}_${toolName}` +using the `tool_name` config (falls back to the skill name). + +Matches Python's `SkillBase.get_instance_key()` default (`skill_base.py:141-146`). +Multi-instance subclasses only need to override when their key derivation +depends on config beyond `tool_name`. + +#### Signature + +```typescript +getInstanceKey(): string +``` + +#### Returns + +`string` — A unique key identifying this skill instance. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 427. + +*** + +### getParameterSchema + +Get the parameter schema for this skill class, describing all accepted configuration options. +Subclasses should override and call `super.getParameterSchema()` to include base parameters. + +Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): +returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a +`tool_name` entry with `default: cls.SKILL_NAME` for classes with +`SUPPORTS_MULTIPLE_INSTANCES = true`. + +**Modifiers:** `static` + +#### Signature + +```typescript +getParameterSchema(): Record +``` + +#### Returns + +`Record` — Record mapping parameter names to their schema entries. + +#### Source + +[`src/skills/builtin/mcp_gateway.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/mcp_gateway.ts) + +Line 71. + +*** + +### getPromptSections + +Get prompt sections to inject into the agent's system prompt. +Respects the `skip_prompt` config option — returns `[]` if set to `true`. +Subclasses should override `_getPromptSections()` instead of this method. + +#### Signature + +```typescript +getPromptSections(): SkillPromptSection[] +``` + +#### Returns + +`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 382. + +*** + +### getSkillData + +Read this skill's data from a raw call data object's global\_data. + +#### Signature + +```typescript +getSkillData(rawData: Record): Record +``` + +#### Parameters + + + The raw request data containing global\_data. + + +#### Returns + +`Record` — The skill's stored data, or an empty object if not found. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 450. + +*** + +### getSkillNamespace + +Get the namespaced key for storing per-skill data in global\_data. + +#### Signature + +```typescript +getSkillNamespace(): string +``` + +#### Returns + +`string` — A string like "skill:datetime" or "skill:my\_prefix". + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 440. + +*** + +### getTools + +#### Signature + +```typescript +getTools(): SkillToolDefinition[] +``` + +#### Returns + +`SkillToolDefinition[]` — Dynamically discovered MCP tools plus an internal hangup-cleanup tool. If discovery has not completed, returns a single fallback `mcp_invoke` tool that explains configuration is missing. + +#### Source + +[`src/skills/builtin/mcp_gateway.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/mcp_gateway.ts) + +Line 290. + +*** + +### hasAllEnvVars + +Check if all required environment variables are present. +Convenience wrapper around `validateEnvVars()` that returns a boolean, +matching the Python `validate_env_vars() -> bool` return type. + +#### Signature + +```typescript +hasAllEnvVars(): boolean +``` + +#### Returns + +`boolean` — `true` if all required env vars are set, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 544. + +*** + +### hasAllPackages + +Check if all required packages declared in the manifest are available. +Convenience wrapper around `validatePackages()` that returns a boolean, +matching the Python `validate_packages() -> bool` return type. + +#### Signature + +```typescript +hasAllPackages(): Promise +``` + +#### Returns + +`Promise` — `true` if all required packages are importable, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 579. + +*** + +### isInitialized + +Check if the skill has been initialized by the SkillManager. + +#### Signature + +```typescript +isInitialized(): boolean +``` + +#### Returns + +`boolean` — True if setup() has completed and the skill is marked initialized. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 507. + +*** + +### markInitialized + +Mark the skill as initialized (called by SkillManager). + +#### Signature + +```typescript +markInitialized(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 514. + +*** + +### setAgent + +Set the agent reference for this skill. +Called by the SkillManager/AgentBase when the skill is attached to an agent. +Python equivalent: `self.agent = agent` in `__init__`. + +#### Signature + +```typescript +setAgent(agent: AgentBase): void +``` + +#### Parameters + + + The agent that owns this skill. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 534. + +*** + +### setup + +Setup the skill. Called when the skill is added to an agent. +Override to perform initialization (API connections, config validation, etc.) + +#### Signature + +```typescript +setup(): Promise +``` + +#### Returns + +`Promise` — `true` if setup succeeded, `false` otherwise. Python equivalent: abstract `setup() -> bool`. + +#### Source + +[`src/skills/builtin/mcp_gateway.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/mcp_gateway.ts) + +Line 173. + +*** + +### updateSkillData + +Update this skill's namespaced data on a FunctionResult via updateGlobalData. + +#### Signature + +```typescript +updateSkillData( + result: FunctionResult, + data: Record +): FunctionResult +``` + +#### Parameters + + + The FunctionResult to update. + + + + The data to store under this skill's namespace. + + +#### Returns + +`FunctionResult` — The FunctionResult for chaining. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 462. + +*** + +### validateEnvVars + +Validate that all required environment variables declared on the skill class +are set in the current process environment. + +Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` +directly. TS reads the same static from the class. + +Returns the list of missing variable names so callers can produce actionable +error messages. This differs from Python's `validate_env_vars() -> bool` +return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/agents/skills/builtin/mcp-gateway#has-all-env-vars) is the boolean equivalent. + +#### Signature + +```typescript +validateEnvVars(): string[] +``` + +#### Returns + +`string[]` — Array of missing environment variable names (empty if all are present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 486. + +*** + +### validatePackages + +Validate that all required packages declared on the skill class can be imported. + +Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` +directly and tries `importlib.import_module(pkg)` for each; TS does the +equivalent with a dynamic `import()`. + +#### Signature + +```typescript +validatePackages(): Promise +``` + +#### Returns + +`Promise` — Array of package names that could not be imported (empty if all present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - - - Bridge MCP (Model Context Protocol) servers with SWAIG functions. - - +Line 557. ## Functions @@ -60,4 +745,4 @@ Line 683. [`src/skills/builtin/mcp_gateway.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/mcp_gateway.ts) -Line 1. +Line 61. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/mcp-gateway/mcp-gateway-skill/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/mcp-gateway/mcp-gateway-skill/index.mdx deleted file mode 100644 index ddc0353d49..0000000000 --- a/fern/products/sdk-reference/typescript/agents/skills/builtin/mcp-gateway/mcp-gateway-skill/index.mdx +++ /dev/null @@ -1,720 +0,0 @@ ---- -slug: "/reference/typescript/agents/skills/builtin/mcp-gateway/mcp-gateway-skill" -title: "McpGatewaySkill" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "skills.builtin.mcp_gateway.McpGatewaySkill" - parent: "skills.builtin.mcp_gateway" - module: "agents.skills.builtin.mcp_gateway" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/mcp_gateway.ts" ---- -# `McpGatewaySkill` - -Bridge MCP (Model Context Protocol) servers with SWAIG functions. - -When configured, calls a gateway's `/services` endpoint to discover MCP -services, enumerates each service's tools, and registers them as SWAIG -tools prefixed with `tool_prefix` (default `mcp_`). A hidden hangup hook -tool cleans up MCP sessions when the call ends. - -## Signature - -```typescript -class McpGatewaySkill extends SkillBase -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/agents/skills/skill-base) - -## Examples - -```typescript -agent.addSkill('mcp_gateway', { - gateway_url: 'https://mcp-gateway.example.com', - tool_prefix: 'mcp_', -}); -``` - -## Properties - - - Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. - - - - Configuration options provided at construction time. - - - - Unique identifier for this skill instance (includes timestamp and random bytes). - - - - Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. - - - - Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. - - - - Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. - - - - Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. - - - - Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. - - - - Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. - - - - The registered name of this skill type. - - - - Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. - - - - Additional SWAIG fields extracted from config, merged into tool definitions. - - -## Methods - -### cleanup - -Cleanup resources. Called when the skill is removed from an agent. - -#### Signature - -```typescript -cleanup(): Promise -``` - -#### Returns - -`Promise` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 469. - -*** - -### constructor - -Create a new skill instance. - -Python parity: `core/skill_base.py:32-43`. -Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` -is left as `None` on the subclass. TS throws the equivalent when the static -defaults haven't been overridden. - -#### Signature - -```typescript -constructor(config?: SkillConfig): McpGatewaySkill -``` - -#### Parameters - - - Optional configuration key-value pairs (Python: `params`). - - -#### Returns - -`McpGatewaySkill` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 282. - -*** - -### defineTool - -Imperatively register a tool with this skill. - -Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. -Merges `this.swaigFields` into the tool definition (explicit fields on -`toolDef` take precedence), then pushes the result into `_dynamicTools` -so the default `getTools()` returns it at SWML render time. - -Intended for skills whose tool shape depends on config evaluated at -`setup()` time. Skills with a static tool list should override -`getTools()` instead. - -#### Signature - -```typescript -defineTool(toolDef: SkillToolDefinition): void -``` - -#### Parameters - - - The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 351. - -*** - -### getAgent - -Return the agent that owns this skill, asserting it is non-null. -Equivalent to accessing `self.agent` in Python, where the agent reference -is always set before `setup()` is called. - -The SkillManager lifecycle guarantees that `setAgent()` is called before -`setup()`, so this method is safe to use inside `setup()` and in any -tool handler invoked during an active agent session. - -#### Signature - -```typescript -getAgent(): AgentBase -``` - -#### Returns - -`AgentBase` — The owning `AgentBase` instance. - -#### Throws - -- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 261. - -*** - -### getConfig - -Get a configuration value by key, falling back to a default if not set. - -#### Signature - -```typescript -getConfig(key: string, defaultValue?: T): T -``` - -#### Type Parameters - - - -#### Parameters - - - The configuration key to look up. - - - - Value to return if the key is not present. - - -#### Returns - -`T` — The configuration value cast to type T, or the default value. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 524. - -*** - -### getDataMapTools - -Optional DataMap-style tool definitions. Skills that build their own -SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them -here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. - -Python equivalent: the direct `self.agent.register_swaig_function(fn)` -call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). -Default returns `[]` — skills using only the declarative `getTools()` path -do not need to override this. - -#### Signature - -```typescript -getDataMapTools(): Record[] -``` - -#### Returns - -`Record[]` — Array of fully-built SWAIG function dicts. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 372. - -*** - -### getGlobalData - -Get global data to merge into the agent's global data store. - -#### Signature - -```typescript -getGlobalData(): Record -``` - -#### Returns - -`Record` — Key-value pairs to be merged into the agent's global data. - -#### Source - -[`src/skills/builtin/mcp_gateway.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/mcp_gateway.ts) - -Line 271. - -*** - -### getHints - -Get speech recognition hints relevant to this skill. - -#### Signature - -```typescript -getHints(): string[] -``` - -#### Returns - -`string[]` — Array of hint strings to improve speech recognition accuracy. - -#### Source - -[`src/skills/builtin/mcp_gateway.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/mcp_gateway.ts) - -Line 257. - -*** - -### getInstanceKey - -Get the instance key used for deduplication in the SkillManager. - -For single-instance skills (`SUPPORTS_MULTIPLE_INSTANCES = false`), returns -the skill name. For multi-instance skills, returns `${skillName}_${toolName}` -using the `tool_name` config (falls back to the skill name). - -Matches Python's `SkillBase.get_instance_key()` default (`skill_base.py:141-146`). -Multi-instance subclasses only need to override when their key derivation -depends on config beyond `tool_name`. - -#### Signature - -```typescript -getInstanceKey(): string -``` - -#### Returns - -`string` — A unique key identifying this skill instance. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 427. - -*** - -### getParameterSchema - -Get the parameter schema for this skill class, describing all accepted configuration options. -Subclasses should override and call `super.getParameterSchema()` to include base parameters. - -Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): -returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a -`tool_name` entry with `default: cls.SKILL_NAME` for classes with -`SUPPORTS_MULTIPLE_INSTANCES = true`. - -**Modifiers:** `static` - -#### Signature - -```typescript -getParameterSchema(): Record -``` - -#### Returns - -`Record` — Record mapping parameter names to their schema entries. - -#### Source - -[`src/skills/builtin/mcp_gateway.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/mcp_gateway.ts) - -Line 71. - -*** - -### getPromptSections - -Get prompt sections to inject into the agent's system prompt. -Respects the `skip_prompt` config option — returns `[]` if set to `true`. -Subclasses should override `_getPromptSections()` instead of this method. - -#### Signature - -```typescript -getPromptSections(): SkillPromptSection[] -``` - -#### Returns - -`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 382. - -*** - -### getSkillData - -Read this skill's data from a raw call data object's global\_data. - -#### Signature - -```typescript -getSkillData(rawData: Record): Record -``` - -#### Parameters - - - The raw request data containing global\_data. - - -#### Returns - -`Record` — The skill's stored data, or an empty object if not found. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 450. - -*** - -### getSkillNamespace - -Get the namespaced key for storing per-skill data in global\_data. - -#### Signature - -```typescript -getSkillNamespace(): string -``` - -#### Returns - -`string` — A string like "skill:datetime" or "skill:my\_prefix". - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 440. - -*** - -### getTools - -#### Signature - -```typescript -getTools(): SkillToolDefinition[] -``` - -#### Returns - -`SkillToolDefinition[]` — Dynamically discovered MCP tools plus an internal hangup-cleanup tool. If discovery has not completed, returns a single fallback `mcp_invoke` tool that explains configuration is missing. - -#### Source - -[`src/skills/builtin/mcp_gateway.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/mcp_gateway.ts) - -Line 290. - -*** - -### hasAllEnvVars - -Check if all required environment variables are present. -Convenience wrapper around `validateEnvVars()` that returns a boolean, -matching the Python `validate_env_vars() -> bool` return type. - -#### Signature - -```typescript -hasAllEnvVars(): boolean -``` - -#### Returns - -`boolean` — `true` if all required env vars are set, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 544. - -*** - -### hasAllPackages - -Check if all required packages declared in the manifest are available. -Convenience wrapper around `validatePackages()` that returns a boolean, -matching the Python `validate_packages() -> bool` return type. - -#### Signature - -```typescript -hasAllPackages(): Promise -``` - -#### Returns - -`Promise` — `true` if all required packages are importable, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 579. - -*** - -### isInitialized - -Check if the skill has been initialized by the SkillManager. - -#### Signature - -```typescript -isInitialized(): boolean -``` - -#### Returns - -`boolean` — True if setup() has completed and the skill is marked initialized. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 507. - -*** - -### markInitialized - -Mark the skill as initialized (called by SkillManager). - -#### Signature - -```typescript -markInitialized(): void -``` - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 514. - -*** - -### setAgent - -Set the agent reference for this skill. -Called by the SkillManager/AgentBase when the skill is attached to an agent. -Python equivalent: `self.agent = agent` in `__init__`. - -#### Signature - -```typescript -setAgent(agent: AgentBase): void -``` - -#### Parameters - - - The agent that owns this skill. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 534. - -*** - -### setup - -Setup the skill. Called when the skill is added to an agent. -Override to perform initialization (API connections, config validation, etc.) - -#### Signature - -```typescript -setup(): Promise -``` - -#### Returns - -`Promise` — `true` if setup succeeded, `false` otherwise. Python equivalent: abstract `setup() -> bool`. - -#### Source - -[`src/skills/builtin/mcp_gateway.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/mcp_gateway.ts) - -Line 173. - -*** - -### updateSkillData - -Update this skill's namespaced data on a FunctionResult via updateGlobalData. - -#### Signature - -```typescript -updateSkillData( - result: FunctionResult, - data: Record -): FunctionResult -``` - -#### Parameters - - - The FunctionResult to update. - - - - The data to store under this skill's namespace. - - -#### Returns - -`FunctionResult` — The FunctionResult for chaining. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 462. - -*** - -### validateEnvVars - -Validate that all required environment variables declared on the skill class -are set in the current process environment. - -Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` -directly. TS reads the same static from the class. - -Returns the list of missing variable names so callers can produce actionable -error messages. This differs from Python's `validate_env_vars() -> bool` -return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/agents/skills/builtin/mcp-gateway/mcp-gateway-skill#has-all-env-vars) is the boolean equivalent. - -#### Signature - -```typescript -validateEnvVars(): string[] -``` - -#### Returns - -`string[]` — Array of missing environment variable names (empty if all are present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 486. - -*** - -### validatePackages - -Validate that all required packages declared on the skill class can be imported. - -Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` -directly and tries `importlib.import_module(pkg)` for each; TS does the -equivalent with a dynamic `import()`. - -#### Signature - -```typescript -validatePackages(): Promise -``` - -#### Returns - -`Promise` — Array of package names that could not be imported (empty if all present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 557. - -## Source - -[`src/skills/builtin/mcp_gateway.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/mcp_gateway.ts) - -Line 61. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/native-vector-search/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/native-vector-search/index.mdx index 8f2dc09397..19a810aa61 100644 --- a/fern/products/sdk-reference/typescript/agents/skills/builtin/native-vector-search/index.mdx +++ b/fern/products/sdk-reference/typescript/agents/skills/builtin/native-vector-search/index.mdx @@ -5,7 +5,7 @@ sdk_label: "TypeScript SDK" icon: "typescript" lustri: auto_generated: true - kind: "module" + kind: "class" language: "typescript" qualified_name: "skills.builtin.native_vector_search" parent: "skills.builtin" @@ -14,19 +14,702 @@ lustri: --- # `native_vector_search` +Document search using TF-IDF in-memory scoring or a remote search server. + +Multi-instance capable (distinguished by `tool_name` + `index_file`). + ## Signature ```typescript -module native_vector_search +class NativeVectorSearchSkill extends SkillBase +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/agents/skills/skill-base) + +## Examples + +```typescript +agent.addSkill('native_vector_search', { + tool_name: 'search_docs', + index_file: './data/support-docs.json', + count: 3, +}); +``` + +## Properties + + + Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. + + + + Configuration options provided at construction time. + + + + Unique identifier for this skill instance (includes timestamp and random bytes). + + + + Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. + + + + Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. + + + + Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. + + + + Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. + + + + Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. + + + + Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. + + + + The registered name of this skill type. + + + + Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. + + + + Additional SWAIG fields extracted from config, merged into tool definitions. + + +## Methods + +### cleanup + +Cleanup resources. Called when the skill is removed from an agent. + +#### Signature + +```typescript +cleanup(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/skills/builtin/native_vector_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/native_vector_search.ts) + +Line 546. + +*** + +### constructor + +Create a new skill instance. + +Python parity: `core/skill_base.py:32-43`. +Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` +is left as `None` on the subclass. TS throws the equivalent when the static +defaults haven't been overridden. + +#### Signature + +```typescript +constructor(config?: SkillConfig): NativeVectorSearchSkill +``` + +#### Parameters + + + Optional configuration key-value pairs (Python: `params`). + + +#### Returns + +`NativeVectorSearchSkill` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 282. + +*** + +### defineTool + +Imperatively register a tool with this skill. + +Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. +Merges `this.swaigFields` into the tool definition (explicit fields on +`toolDef` take precedence), then pushes the result into `_dynamicTools` +so the default `getTools()` returns it at SWML render time. + +Intended for skills whose tool shape depends on config evaluated at +`setup()` time. Skills with a static tool list should override +`getTools()` instead. + +#### Signature + +```typescript +defineTool(toolDef: SkillToolDefinition): void +``` + +#### Parameters + + + The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 351. + +*** + +### getAgent + +Return the agent that owns this skill, asserting it is non-null. +Equivalent to accessing `self.agent` in Python, where the agent reference +is always set before `setup()` is called. + +The SkillManager lifecycle guarantees that `setAgent()` is called before +`setup()`, so this method is safe to use inside `setup()` and in any +tool handler invoked during an active agent session. + +#### Signature + +```typescript +getAgent(): AgentBase +``` + +#### Returns + +`AgentBase` — The owning `AgentBase` instance. + +#### Throws + +- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 261. + +*** + +### getConfig + +Get a configuration value by key, falling back to a default if not set. + +#### Signature + +```typescript +getConfig(key: string, defaultValue?: T): T +``` + +#### Type Parameters + + + +#### Parameters + + + The configuration key to look up. + + + + Value to return if the key is not present. + + +#### Returns + +`T` — The configuration value cast to type T, or the default value. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 524. + +*** + +### getDataMapTools + +Optional DataMap-style tool definitions. Skills that build their own +SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them +here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. + +Python equivalent: the direct `self.agent.register_swaig_function(fn)` +call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). +Default returns `[]` — skills using only the declarative `getTools()` path +do not need to override this. + +#### Signature + +```typescript +getDataMapTools(): Record[] ``` -## Classes +#### Returns + +`Record[]` — Array of fully-built SWAIG function dicts. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 372. + +*** + +### getGlobalData + +Get global data to merge into the agent's global data store. + +#### Signature + +```typescript +getGlobalData(): Record +``` + +#### Returns + +`Record` — Key-value pairs to be merged into the agent's global data. + +#### Source + +[`src/skills/builtin/native_vector_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/native_vector_search.ts) + +Line 535. + +*** + +### getHints + +Get speech recognition hints relevant to this skill. + +#### Signature + +```typescript +getHints(): string[] +``` + +#### Returns + +`string[]` — Array of hint strings to improve speech recognition accuracy. + +#### Source + +[`src/skills/builtin/native_vector_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/native_vector_search.ts) + +Line 529. + +*** + +### getInstanceKey + +Get the instance key used for deduplication in the SkillManager. + +For single-instance skills (`SUPPORTS_MULTIPLE_INSTANCES = false`), returns +the skill name. For multi-instance skills, returns `${skillName}_${toolName}` +using the `tool_name` config (falls back to the skill name). + +Matches Python's `SkillBase.get_instance_key()` default (`skill_base.py:141-146`). +Multi-instance subclasses only need to override when their key derivation +depends on config beyond `tool_name`. + +#### Signature + +```typescript +getInstanceKey(): string +``` + +#### Returns + +`string` — A unique key identifying this skill instance. + +#### Source + +[`src/skills/builtin/native_vector_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/native_vector_search.ts) + +Line 406. + +*** + +### getParameterSchema + +Get the parameter schema for this skill class, describing all accepted configuration options. +Subclasses should override and call `super.getParameterSchema()` to include base parameters. + +Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): +returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a +`tool_name` entry with `default: cls.SKILL_NAME` for classes with +`SUPPORTS_MULTIPLE_INSTANCES = true`. + +**Modifiers:** `static` + +#### Signature + +```typescript +getParameterSchema(): Record +``` + +#### Returns + +`Record` — Record mapping parameter names to their schema entries. + +#### Source + +[`src/skills/builtin/native_vector_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/native_vector_search.ts) + +Line 169. + +*** + +### getPromptSections + +Get prompt sections to inject into the agent's system prompt. +Respects the `skip_prompt` config option — returns `[]` if set to `true`. +Subclasses should override `_getPromptSections()` instead of this method. + +#### Signature + +```typescript +getPromptSections(): SkillPromptSection[] +``` + +#### Returns + +`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 382. + +*** + +### getSkillData + +Read this skill's data from a raw call data object's global\_data. + +#### Signature + +```typescript +getSkillData(rawData: Record): Record +``` + +#### Parameters + + + The raw request data containing global\_data. + + +#### Returns + +`Record` — The skill's stored data, or an empty object if not found. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 450. + +*** + +### getSkillNamespace + +Get the namespaced key for storing per-skill data in global\_data. + +#### Signature + +```typescript +getSkillNamespace(): string +``` + +#### Returns + +`string` — A string like "skill:datetime" or "skill:my\_prefix". + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 440. + +*** + +### getTools + +#### Signature + +```typescript +getTools(): SkillToolDefinition[] +``` + +#### Returns + +`SkillToolDefinition[]` — A single search tool using the configured `tool_name` (default `search_knowledge`). + +#### Source + +[`src/skills/builtin/native_vector_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/native_vector_search.ts) + +Line 588. + +*** + +### hasAllEnvVars + +Check if all required environment variables are present. +Convenience wrapper around `validateEnvVars()` that returns a boolean, +matching the Python `validate_env_vars() -> bool` return type. + +#### Signature + +```typescript +hasAllEnvVars(): boolean +``` + +#### Returns + +`boolean` — `true` if all required env vars are set, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 544. + +*** + +### hasAllPackages + +Check if all required packages declared in the manifest are available. +Convenience wrapper around `validatePackages()` that returns a boolean, +matching the Python `validate_packages() -> bool` return type. + +#### Signature + +```typescript +hasAllPackages(): Promise +``` + +#### Returns + +`Promise` — `true` if all required packages are importable, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 579. + +*** + +### isInitialized + +Check if the skill has been initialized by the SkillManager. + +#### Signature + +```typescript +isInitialized(): boolean +``` + +#### Returns + +`boolean` — True if setup() has completed and the skill is marked initialized. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 507. + +*** + +### markInitialized + +Mark the skill as initialized (called by SkillManager). + +#### Signature + +```typescript +markInitialized(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 514. + +*** + +### setAgent + +Set the agent reference for this skill. +Called by the SkillManager/AgentBase when the skill is attached to an agent. +Python equivalent: `self.agent = agent` in `__init__`. + +#### Signature + +```typescript +setAgent(agent: AgentBase): void +``` + +#### Parameters + + + The agent that owns this skill. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 534. + +*** + +### setup + +Setup the skill. Called when the skill is added to an agent. +Override to perform initialization (API connections, config validation, etc.) + +#### Signature + +```typescript +setup(): Promise +``` + +#### Returns + +`Promise` — `true` if setup succeeded, `false` otherwise. Python equivalent: abstract `setup() -> bool`. + +#### Source + +[`src/skills/builtin/native_vector_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/native_vector_search.ts) + +Line 412. + +*** + +### updateSkillData + +Update this skill's namespaced data on a FunctionResult via updateGlobalData. + +#### Signature + +```typescript +updateSkillData( + result: FunctionResult, + data: Record +): FunctionResult +``` + +#### Parameters + + + The FunctionResult to update. + + + + The data to store under this skill's namespace. + + +#### Returns + +`FunctionResult` — The FunctionResult for chaining. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 462. + +*** + +### validateEnvVars + +Validate that all required environment variables declared on the skill class +are set in the current process environment. + +Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` +directly. TS reads the same static from the class. + +Returns the list of missing variable names so callers can produce actionable +error messages. This differs from Python's `validate_env_vars() -> bool` +return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/agents/skills/builtin/native-vector-search#has-all-env-vars) is the boolean equivalent. + +#### Signature + +```typescript +validateEnvVars(): string[] +``` + +#### Returns + +`string[]` — Array of missing environment variable names (empty if all are present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 486. + +*** + +### validatePackages + +Validate that all required packages declared on the skill class can be imported. + +Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` +directly and tries `importlib.import_module(pkg)` for each; TS does the +equivalent with a dynamic `import()`. + +#### Signature + +```typescript +validatePackages(): Promise +``` + +#### Returns + +`Promise` — Array of package names that could not be imported (empty if all present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - - - Document search using TF-IDF in-memory scoring or a remote search server. - - +Line 557. ## Functions @@ -90,4 +773,4 @@ Line 47. [`src/skills/builtin/native_vector_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/native_vector_search.ts) -Line 1. +Line 159. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/native-vector-search/native-vector-search-skill/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/native-vector-search/native-vector-search-skill/index.mdx deleted file mode 100644 index 531f94e5a9..0000000000 --- a/fern/products/sdk-reference/typescript/agents/skills/builtin/native-vector-search/native-vector-search-skill/index.mdx +++ /dev/null @@ -1,718 +0,0 @@ ---- -slug: "/reference/typescript/agents/skills/builtin/native-vector-search/native-vector-search-skill" -title: "NativeVectorSearchSkill" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "skills.builtin.native_vector_search.NativeVectorSearchSkill" - parent: "skills.builtin.native_vector_search" - module: "agents.skills.builtin.native_vector_search" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/native_vector_search.ts" ---- -# `NativeVectorSearchSkill` - -Document search using TF-IDF in-memory scoring or a remote search server. - -Multi-instance capable (distinguished by `tool_name` + `index_file`). - -## Signature - -```typescript -class NativeVectorSearchSkill extends SkillBase -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/agents/skills/skill-base) - -## Examples - -```typescript -agent.addSkill('native_vector_search', { - tool_name: 'search_docs', - index_file: './data/support-docs.json', - count: 3, -}); -``` - -## Properties - - - Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. - - - - Configuration options provided at construction time. - - - - Unique identifier for this skill instance (includes timestamp and random bytes). - - - - Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. - - - - Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. - - - - Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. - - - - Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. - - - - Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. - - - - Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. - - - - The registered name of this skill type. - - - - Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. - - - - Additional SWAIG fields extracted from config, merged into tool definitions. - - -## Methods - -### cleanup - -Cleanup resources. Called when the skill is removed from an agent. - -#### Signature - -```typescript -cleanup(): Promise -``` - -#### Returns - -`Promise` - -#### Source - -[`src/skills/builtin/native_vector_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/native_vector_search.ts) - -Line 546. - -*** - -### constructor - -Create a new skill instance. - -Python parity: `core/skill_base.py:32-43`. -Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` -is left as `None` on the subclass. TS throws the equivalent when the static -defaults haven't been overridden. - -#### Signature - -```typescript -constructor(config?: SkillConfig): NativeVectorSearchSkill -``` - -#### Parameters - - - Optional configuration key-value pairs (Python: `params`). - - -#### Returns - -`NativeVectorSearchSkill` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 282. - -*** - -### defineTool - -Imperatively register a tool with this skill. - -Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. -Merges `this.swaigFields` into the tool definition (explicit fields on -`toolDef` take precedence), then pushes the result into `_dynamicTools` -so the default `getTools()` returns it at SWML render time. - -Intended for skills whose tool shape depends on config evaluated at -`setup()` time. Skills with a static tool list should override -`getTools()` instead. - -#### Signature - -```typescript -defineTool(toolDef: SkillToolDefinition): void -``` - -#### Parameters - - - The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 351. - -*** - -### getAgent - -Return the agent that owns this skill, asserting it is non-null. -Equivalent to accessing `self.agent` in Python, where the agent reference -is always set before `setup()` is called. - -The SkillManager lifecycle guarantees that `setAgent()` is called before -`setup()`, so this method is safe to use inside `setup()` and in any -tool handler invoked during an active agent session. - -#### Signature - -```typescript -getAgent(): AgentBase -``` - -#### Returns - -`AgentBase` — The owning `AgentBase` instance. - -#### Throws - -- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 261. - -*** - -### getConfig - -Get a configuration value by key, falling back to a default if not set. - -#### Signature - -```typescript -getConfig(key: string, defaultValue?: T): T -``` - -#### Type Parameters - - - -#### Parameters - - - The configuration key to look up. - - - - Value to return if the key is not present. - - -#### Returns - -`T` — The configuration value cast to type T, or the default value. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 524. - -*** - -### getDataMapTools - -Optional DataMap-style tool definitions. Skills that build their own -SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them -here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. - -Python equivalent: the direct `self.agent.register_swaig_function(fn)` -call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). -Default returns `[]` — skills using only the declarative `getTools()` path -do not need to override this. - -#### Signature - -```typescript -getDataMapTools(): Record[] -``` - -#### Returns - -`Record[]` — Array of fully-built SWAIG function dicts. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 372. - -*** - -### getGlobalData - -Get global data to merge into the agent's global data store. - -#### Signature - -```typescript -getGlobalData(): Record -``` - -#### Returns - -`Record` — Key-value pairs to be merged into the agent's global data. - -#### Source - -[`src/skills/builtin/native_vector_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/native_vector_search.ts) - -Line 535. - -*** - -### getHints - -Get speech recognition hints relevant to this skill. - -#### Signature - -```typescript -getHints(): string[] -``` - -#### Returns - -`string[]` — Array of hint strings to improve speech recognition accuracy. - -#### Source - -[`src/skills/builtin/native_vector_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/native_vector_search.ts) - -Line 529. - -*** - -### getInstanceKey - -Get the instance key used for deduplication in the SkillManager. - -For single-instance skills (`SUPPORTS_MULTIPLE_INSTANCES = false`), returns -the skill name. For multi-instance skills, returns `${skillName}_${toolName}` -using the `tool_name` config (falls back to the skill name). - -Matches Python's `SkillBase.get_instance_key()` default (`skill_base.py:141-146`). -Multi-instance subclasses only need to override when their key derivation -depends on config beyond `tool_name`. - -#### Signature - -```typescript -getInstanceKey(): string -``` - -#### Returns - -`string` — A unique key identifying this skill instance. - -#### Source - -[`src/skills/builtin/native_vector_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/native_vector_search.ts) - -Line 406. - -*** - -### getParameterSchema - -Get the parameter schema for this skill class, describing all accepted configuration options. -Subclasses should override and call `super.getParameterSchema()` to include base parameters. - -Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): -returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a -`tool_name` entry with `default: cls.SKILL_NAME` for classes with -`SUPPORTS_MULTIPLE_INSTANCES = true`. - -**Modifiers:** `static` - -#### Signature - -```typescript -getParameterSchema(): Record -``` - -#### Returns - -`Record` — Record mapping parameter names to their schema entries. - -#### Source - -[`src/skills/builtin/native_vector_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/native_vector_search.ts) - -Line 169. - -*** - -### getPromptSections - -Get prompt sections to inject into the agent's system prompt. -Respects the `skip_prompt` config option — returns `[]` if set to `true`. -Subclasses should override `_getPromptSections()` instead of this method. - -#### Signature - -```typescript -getPromptSections(): SkillPromptSection[] -``` - -#### Returns - -`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 382. - -*** - -### getSkillData - -Read this skill's data from a raw call data object's global\_data. - -#### Signature - -```typescript -getSkillData(rawData: Record): Record -``` - -#### Parameters - - - The raw request data containing global\_data. - - -#### Returns - -`Record` — The skill's stored data, or an empty object if not found. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 450. - -*** - -### getSkillNamespace - -Get the namespaced key for storing per-skill data in global\_data. - -#### Signature - -```typescript -getSkillNamespace(): string -``` - -#### Returns - -`string` — A string like "skill:datetime" or "skill:my\_prefix". - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 440. - -*** - -### getTools - -#### Signature - -```typescript -getTools(): SkillToolDefinition[] -``` - -#### Returns - -`SkillToolDefinition[]` — A single search tool using the configured `tool_name` (default `search_knowledge`). - -#### Source - -[`src/skills/builtin/native_vector_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/native_vector_search.ts) - -Line 588. - -*** - -### hasAllEnvVars - -Check if all required environment variables are present. -Convenience wrapper around `validateEnvVars()` that returns a boolean, -matching the Python `validate_env_vars() -> bool` return type. - -#### Signature - -```typescript -hasAllEnvVars(): boolean -``` - -#### Returns - -`boolean` — `true` if all required env vars are set, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 544. - -*** - -### hasAllPackages - -Check if all required packages declared in the manifest are available. -Convenience wrapper around `validatePackages()` that returns a boolean, -matching the Python `validate_packages() -> bool` return type. - -#### Signature - -```typescript -hasAllPackages(): Promise -``` - -#### Returns - -`Promise` — `true` if all required packages are importable, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 579. - -*** - -### isInitialized - -Check if the skill has been initialized by the SkillManager. - -#### Signature - -```typescript -isInitialized(): boolean -``` - -#### Returns - -`boolean` — True if setup() has completed and the skill is marked initialized. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 507. - -*** - -### markInitialized - -Mark the skill as initialized (called by SkillManager). - -#### Signature - -```typescript -markInitialized(): void -``` - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 514. - -*** - -### setAgent - -Set the agent reference for this skill. -Called by the SkillManager/AgentBase when the skill is attached to an agent. -Python equivalent: `self.agent = agent` in `__init__`. - -#### Signature - -```typescript -setAgent(agent: AgentBase): void -``` - -#### Parameters - - - The agent that owns this skill. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 534. - -*** - -### setup - -Setup the skill. Called when the skill is added to an agent. -Override to perform initialization (API connections, config validation, etc.) - -#### Signature - -```typescript -setup(): Promise -``` - -#### Returns - -`Promise` — `true` if setup succeeded, `false` otherwise. Python equivalent: abstract `setup() -> bool`. - -#### Source - -[`src/skills/builtin/native_vector_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/native_vector_search.ts) - -Line 412. - -*** - -### updateSkillData - -Update this skill's namespaced data on a FunctionResult via updateGlobalData. - -#### Signature - -```typescript -updateSkillData( - result: FunctionResult, - data: Record -): FunctionResult -``` - -#### Parameters - - - The FunctionResult to update. - - - - The data to store under this skill's namespace. - - -#### Returns - -`FunctionResult` — The FunctionResult for chaining. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 462. - -*** - -### validateEnvVars - -Validate that all required environment variables declared on the skill class -are set in the current process environment. - -Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` -directly. TS reads the same static from the class. - -Returns the list of missing variable names so callers can produce actionable -error messages. This differs from Python's `validate_env_vars() -> bool` -return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/agents/skills/builtin/native-vector-search/native-vector-search-skill#has-all-env-vars) is the boolean equivalent. - -#### Signature - -```typescript -validateEnvVars(): string[] -``` - -#### Returns - -`string[]` — Array of missing environment variable names (empty if all are present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 486. - -*** - -### validatePackages - -Validate that all required packages declared on the skill class can be imported. - -Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` -directly and tries `importlib.import_module(pkg)` for each; TS does the -equivalent with a dynamic `import()`. - -#### Signature - -```typescript -validatePackages(): Promise -``` - -#### Returns - -`Promise` — Array of package names that could not be imported (empty if all present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 557. - -## Source - -[`src/skills/builtin/native_vector_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/native_vector_search.ts) - -Line 159. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/play-background-file/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/play-background-file/index.mdx index 9b82b1b4b4..680715763c 100644 --- a/fern/products/sdk-reference/typescript/agents/skills/builtin/play-background-file/index.mdx +++ b/fern/products/sdk-reference/typescript/agents/skills/builtin/play-background-file/index.mdx @@ -5,7 +5,7 @@ sdk_label: "TypeScript SDK" icon: "typescript" lustri: auto_generated: true - kind: "module" + kind: "class" language: "typescript" qualified_name: "skills.builtin.play_background_file" parent: "skills.builtin" @@ -14,19 +14,703 @@ lustri: --- # `play_background_file` +Controls background audio playback during calls via SWML actions. + +Tier 2 built-in skill with no external dependencies. Provides tools to play +and stop background audio files (e.g., hold music, ambient sounds). Supports +two configuration modes: + +- Pre-configured `files` array (matches the Python skill): emits a single + configurable tool whose `action` enum maps to `start_` / `stop` + values that trigger the corresponding file playback. +- Free-form `default_file_url` / `allowed_domains`: emits two tools, + `play_background` (arbitrary URL) and `stop_background`. + ## Signature ```typescript -module play_background_file +class PlayBackgroundFileSkill extends SkillBase +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/agents/skills/skill-base) + +## Examples + +```typescript +agent.addSkill('play_background_file', { + files: [ + { key: 'hold', url: 'https://cdn.example.com/hold-music.mp3', description: 'Hold music' }, + ], +}); +``` + +## Properties + + + Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. + + + + Configuration options provided at construction time. + + + + Unique identifier for this skill instance (includes timestamp and random bytes). + + + + Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. + + + + Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. + + + + Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. + + + + Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. + + + + Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. + + + + Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. + + + + The registered name of this skill type. + + + + Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. + + + + Additional SWAIG fields extracted from config, merged into tool definitions. + + +## Methods + +### cleanup + +Cleanup resources. Called when the skill is removed from an agent. + +#### Signature + +```typescript +cleanup(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 469. + +*** + +### constructor + +Create a new skill instance. + +Python parity: `core/skill_base.py:32-43`. +Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` +is left as `None` on the subclass. TS throws the equivalent when the static +defaults haven't been overridden. + +#### Signature + +```typescript +constructor(config?: SkillConfig): PlayBackgroundFileSkill +``` + +#### Parameters + + + Optional configuration key-value pairs (Python: `params`). + + +#### Returns + +`PlayBackgroundFileSkill` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 282. + +*** + +### defineTool + +Imperatively register a tool with this skill. + +Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. +Merges `this.swaigFields` into the tool definition (explicit fields on +`toolDef` take precedence), then pushes the result into `_dynamicTools` +so the default `getTools()` returns it at SWML render time. + +Intended for skills whose tool shape depends on config evaluated at +`setup()` time. Skills with a static tool list should override +`getTools()` instead. + +#### Signature + +```typescript +defineTool(toolDef: SkillToolDefinition): void +``` + +#### Parameters + + + The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 351. + +*** + +### getAgent + +Return the agent that owns this skill, asserting it is non-null. +Equivalent to accessing `self.agent` in Python, where the agent reference +is always set before `setup()` is called. + +The SkillManager lifecycle guarantees that `setAgent()` is called before +`setup()`, so this method is safe to use inside `setup()` and in any +tool handler invoked during an active agent session. + +#### Signature + +```typescript +getAgent(): AgentBase +``` + +#### Returns + +`AgentBase` — The owning `AgentBase` instance. + +#### Throws + +- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 261. + +*** + +### getConfig + +Get a configuration value by key, falling back to a default if not set. + +#### Signature + +```typescript +getConfig(key: string, defaultValue?: T): T +``` + +#### Type Parameters + + + +#### Parameters + + + The configuration key to look up. + + + + Value to return if the key is not present. + + +#### Returns + +`T` — The configuration value cast to type T, or the default value. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 524. + +*** + +### getDataMapTools + +Optional DataMap-style tool definitions. Skills that build their own +SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them +here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. + +Python equivalent: the direct `self.agent.register_swaig_function(fn)` +call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). +Default returns `[]` — skills using only the declarative `getTools()` path +do not need to override this. + +#### Signature + +```typescript +getDataMapTools(): Record[] +``` + +#### Returns + +`Record[]` — Array of fully-built SWAIG function dicts. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 372. + +*** + +### getGlobalData + +Get global data to merge into the agent's global data store. + +#### Signature + +```typescript +getGlobalData(): Record +``` + +#### Returns + +`Record` — Key-value pairs to be merged into the agent's global data. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 410. + +*** + +### getHints + +Get speech recognition hints relevant to this skill. + +#### Signature + +```typescript +getHints(): string[] +``` + +#### Returns + +`string[]` — Array of hint strings to improve speech recognition accuracy. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 402. + +*** + +### getInstanceKey + +Produce a compound instance key so multiple copies of the skill with +distinct `tool_name` values can coexist in a single agent. + +#### Signature + +```typescript +getInstanceKey(): string +``` + +#### Returns + +`string` + +#### Source + +[`src/skills/builtin/play_background_file.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/play_background_file.ts) + +Line 114. + +*** + +### getParameterSchema + +Get the parameter schema for this skill class, describing all accepted configuration options. +Subclasses should override and call `super.getParameterSchema()` to include base parameters. + +Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): +returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a +`tool_name` entry with `default: cls.SKILL_NAME` for classes with +`SUPPORTS_MULTIPLE_INSTANCES = true`. + +**Modifiers:** `static` + +#### Signature + +```typescript +getParameterSchema(): Record +``` + +#### Returns + +`Record` — Record mapping parameter names to their schema entries. + +#### Source + +[`src/skills/builtin/play_background_file.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/play_background_file.ts) + +Line 58. + +*** + +### getPromptSections + +Get prompt sections to inject into the agent's system prompt. +Respects the `skip_prompt` config option — returns `[]` if set to `true`. +Subclasses should override `_getPromptSections()` instead of this method. + +#### Signature + +```typescript +getPromptSections(): SkillPromptSection[] +``` + +#### Returns + +`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 382. + +*** + +### getSkillData + +Read this skill's data from a raw call data object's global\_data. + +#### Signature + +```typescript +getSkillData(rawData: Record): Record +``` + +#### Parameters + + + The raw request data containing global\_data. + + +#### Returns + +`Record` — The skill's stored data, or an empty object if not found. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 450. + +*** + +### getSkillNamespace + +Get the namespaced key for storing per-skill data in global\_data. + +#### Signature + +```typescript +getSkillNamespace(): string +``` + +#### Returns + +`string` — A string like "skill:datetime" or "skill:my\_prefix". + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 440. + +*** + +### getTools + +#### Signature + +```typescript +getTools(): SkillToolDefinition[] ``` -## Classes +#### Returns + +`SkillToolDefinition[]` — Either a single enum-based tool (when pre-configured `files` are supplied — matches Python), or two free-form tools (`play_background` and `stop_background`) when only `default_file_url`/`allowed_domains` are configured. + +#### Source + +[`src/skills/builtin/play_background_file.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/play_background_file.ts) + +Line 138. + +*** + +### hasAllEnvVars + +Check if all required environment variables are present. +Convenience wrapper around `validateEnvVars()` that returns a boolean, +matching the Python `validate_env_vars() -> bool` return type. + +#### Signature + +```typescript +hasAllEnvVars(): boolean +``` + +#### Returns + +`boolean` — `true` if all required env vars are set, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 544. + +*** + +### hasAllPackages + +Check if all required packages declared in the manifest are available. +Convenience wrapper around `validatePackages()` that returns a boolean, +matching the Python `validate_packages() -> bool` return type. + +#### Signature + +```typescript +hasAllPackages(): Promise +``` + +#### Returns + +`Promise` — `true` if all required packages are importable, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 579. + +*** + +### isInitialized + +Check if the skill has been initialized by the SkillManager. + +#### Signature + +```typescript +isInitialized(): boolean +``` + +#### Returns + +`boolean` — True if setup() has completed and the skill is marked initialized. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 507. + +*** + +### markInitialized + +Mark the skill as initialized (called by SkillManager). + +#### Signature + +```typescript +markInitialized(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 514. + +*** + +### setAgent + +Set the agent reference for this skill. +Called by the SkillManager/AgentBase when the skill is attached to an agent. +Python equivalent: `self.agent = agent` in `__init__`. + +#### Signature + +```typescript +setAgent(agent: AgentBase): void +``` + +#### Parameters + + + The agent that owns this skill. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 534. + +*** + +### setup + +Setup the skill. Called when the skill is added to an agent. +Override to perform initialization (API connections, config validation, etc.) + +#### Signature + +```typescript +setup(): Promise +``` + +#### Returns + +`Promise` — `true` if setup succeeded, `false` otherwise. Python equivalent: abstract `setup() -> bool`. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 313. + +*** + +### updateSkillData + +Update this skill's namespaced data on a FunctionResult via updateGlobalData. + +#### Signature + +```typescript +updateSkillData( + result: FunctionResult, + data: Record +): FunctionResult +``` + +#### Parameters + + + The FunctionResult to update. + + + + The data to store under this skill's namespace. + + +#### Returns + +`FunctionResult` — The FunctionResult for chaining. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 462. + +*** + +### validateEnvVars + +Validate that all required environment variables declared on the skill class +are set in the current process environment. + +Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` +directly. TS reads the same static from the class. + +Returns the list of missing variable names so callers can produce actionable +error messages. This differs from Python's `validate_env_vars() -> bool` +return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/agents/skills/builtin/play-background-file#has-all-env-vars) is the boolean equivalent. + +#### Signature + +```typescript +validateEnvVars(): string[] +``` + +#### Returns + +`string[]` — Array of missing environment variable names (empty if all are present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 486. + +*** + +### validatePackages + +Validate that all required packages declared on the skill class can be imported. + +Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` +directly and tries `importlib.import_module(pkg)` for each; TS does the +equivalent with a dynamic `import()`. + +#### Signature + +```typescript +validatePackages(): Promise +``` + +#### Returns + +`Promise` — Array of package names that could not be imported (empty if all present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - - - Controls background audio playback during calls via SWML actions. - - +Line 557. ## Functions @@ -60,4 +744,4 @@ Line 365. [`src/skills/builtin/play_background_file.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/play_background_file.ts) -Line 1. +Line 52. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/play-background-file/play-background-file-skill/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/play-background-file/play-background-file-skill/index.mdx deleted file mode 100644 index 5b6ca24c3e..0000000000 --- a/fern/products/sdk-reference/typescript/agents/skills/builtin/play-background-file/play-background-file-skill/index.mdx +++ /dev/null @@ -1,719 +0,0 @@ ---- -slug: "/reference/typescript/agents/skills/builtin/play-background-file/play-background-file-skill" -title: "PlayBackgroundFileSkill" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "skills.builtin.play_background_file.PlayBackgroundFileSkill" - parent: "skills.builtin.play_background_file" - module: "agents.skills.builtin.play_background_file" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/play_background_file.ts" ---- -# `PlayBackgroundFileSkill` - -Controls background audio playback during calls via SWML actions. - -Tier 2 built-in skill with no external dependencies. Provides tools to play -and stop background audio files (e.g., hold music, ambient sounds). Supports -two configuration modes: - -- Pre-configured `files` array (matches the Python skill): emits a single - configurable tool whose `action` enum maps to `start_` / `stop` - values that trigger the corresponding file playback. -- Free-form `default_file_url` / `allowed_domains`: emits two tools, - `play_background` (arbitrary URL) and `stop_background`. - -## Signature - -```typescript -class PlayBackgroundFileSkill extends SkillBase -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/agents/skills/skill-base) - -## Examples - -```typescript -agent.addSkill('play_background_file', { - files: [ - { key: 'hold', url: 'https://cdn.example.com/hold-music.mp3', description: 'Hold music' }, - ], -}); -``` - -## Properties - - - Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. - - - - Configuration options provided at construction time. - - - - Unique identifier for this skill instance (includes timestamp and random bytes). - - - - Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. - - - - Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. - - - - Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. - - - - Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. - - - - Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. - - - - Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. - - - - The registered name of this skill type. - - - - Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. - - - - Additional SWAIG fields extracted from config, merged into tool definitions. - - -## Methods - -### cleanup - -Cleanup resources. Called when the skill is removed from an agent. - -#### Signature - -```typescript -cleanup(): Promise -``` - -#### Returns - -`Promise` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 469. - -*** - -### constructor - -Create a new skill instance. - -Python parity: `core/skill_base.py:32-43`. -Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` -is left as `None` on the subclass. TS throws the equivalent when the static -defaults haven't been overridden. - -#### Signature - -```typescript -constructor(config?: SkillConfig): PlayBackgroundFileSkill -``` - -#### Parameters - - - Optional configuration key-value pairs (Python: `params`). - - -#### Returns - -`PlayBackgroundFileSkill` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 282. - -*** - -### defineTool - -Imperatively register a tool with this skill. - -Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. -Merges `this.swaigFields` into the tool definition (explicit fields on -`toolDef` take precedence), then pushes the result into `_dynamicTools` -so the default `getTools()` returns it at SWML render time. - -Intended for skills whose tool shape depends on config evaluated at -`setup()` time. Skills with a static tool list should override -`getTools()` instead. - -#### Signature - -```typescript -defineTool(toolDef: SkillToolDefinition): void -``` - -#### Parameters - - - The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 351. - -*** - -### getAgent - -Return the agent that owns this skill, asserting it is non-null. -Equivalent to accessing `self.agent` in Python, where the agent reference -is always set before `setup()` is called. - -The SkillManager lifecycle guarantees that `setAgent()` is called before -`setup()`, so this method is safe to use inside `setup()` and in any -tool handler invoked during an active agent session. - -#### Signature - -```typescript -getAgent(): AgentBase -``` - -#### Returns - -`AgentBase` — The owning `AgentBase` instance. - -#### Throws - -- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 261. - -*** - -### getConfig - -Get a configuration value by key, falling back to a default if not set. - -#### Signature - -```typescript -getConfig(key: string, defaultValue?: T): T -``` - -#### Type Parameters - - - -#### Parameters - - - The configuration key to look up. - - - - Value to return if the key is not present. - - -#### Returns - -`T` — The configuration value cast to type T, or the default value. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 524. - -*** - -### getDataMapTools - -Optional DataMap-style tool definitions. Skills that build their own -SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them -here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. - -Python equivalent: the direct `self.agent.register_swaig_function(fn)` -call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). -Default returns `[]` — skills using only the declarative `getTools()` path -do not need to override this. - -#### Signature - -```typescript -getDataMapTools(): Record[] -``` - -#### Returns - -`Record[]` — Array of fully-built SWAIG function dicts. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 372. - -*** - -### getGlobalData - -Get global data to merge into the agent's global data store. - -#### Signature - -```typescript -getGlobalData(): Record -``` - -#### Returns - -`Record` — Key-value pairs to be merged into the agent's global data. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 410. - -*** - -### getHints - -Get speech recognition hints relevant to this skill. - -#### Signature - -```typescript -getHints(): string[] -``` - -#### Returns - -`string[]` — Array of hint strings to improve speech recognition accuracy. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 402. - -*** - -### getInstanceKey - -Produce a compound instance key so multiple copies of the skill with -distinct `tool_name` values can coexist in a single agent. - -#### Signature - -```typescript -getInstanceKey(): string -``` - -#### Returns - -`string` - -#### Source - -[`src/skills/builtin/play_background_file.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/play_background_file.ts) - -Line 114. - -*** - -### getParameterSchema - -Get the parameter schema for this skill class, describing all accepted configuration options. -Subclasses should override and call `super.getParameterSchema()` to include base parameters. - -Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): -returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a -`tool_name` entry with `default: cls.SKILL_NAME` for classes with -`SUPPORTS_MULTIPLE_INSTANCES = true`. - -**Modifiers:** `static` - -#### Signature - -```typescript -getParameterSchema(): Record -``` - -#### Returns - -`Record` — Record mapping parameter names to their schema entries. - -#### Source - -[`src/skills/builtin/play_background_file.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/play_background_file.ts) - -Line 58. - -*** - -### getPromptSections - -Get prompt sections to inject into the agent's system prompt. -Respects the `skip_prompt` config option — returns `[]` if set to `true`. -Subclasses should override `_getPromptSections()` instead of this method. - -#### Signature - -```typescript -getPromptSections(): SkillPromptSection[] -``` - -#### Returns - -`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 382. - -*** - -### getSkillData - -Read this skill's data from a raw call data object's global\_data. - -#### Signature - -```typescript -getSkillData(rawData: Record): Record -``` - -#### Parameters - - - The raw request data containing global\_data. - - -#### Returns - -`Record` — The skill's stored data, or an empty object if not found. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 450. - -*** - -### getSkillNamespace - -Get the namespaced key for storing per-skill data in global\_data. - -#### Signature - -```typescript -getSkillNamespace(): string -``` - -#### Returns - -`string` — A string like "skill:datetime" or "skill:my\_prefix". - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 440. - -*** - -### getTools - -#### Signature - -```typescript -getTools(): SkillToolDefinition[] -``` - -#### Returns - -`SkillToolDefinition[]` — Either a single enum-based tool (when pre-configured `files` are supplied — matches Python), or two free-form tools (`play_background` and `stop_background`) when only `default_file_url`/`allowed_domains` are configured. - -#### Source - -[`src/skills/builtin/play_background_file.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/play_background_file.ts) - -Line 138. - -*** - -### hasAllEnvVars - -Check if all required environment variables are present. -Convenience wrapper around `validateEnvVars()` that returns a boolean, -matching the Python `validate_env_vars() -> bool` return type. - -#### Signature - -```typescript -hasAllEnvVars(): boolean -``` - -#### Returns - -`boolean` — `true` if all required env vars are set, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 544. - -*** - -### hasAllPackages - -Check if all required packages declared in the manifest are available. -Convenience wrapper around `validatePackages()` that returns a boolean, -matching the Python `validate_packages() -> bool` return type. - -#### Signature - -```typescript -hasAllPackages(): Promise -``` - -#### Returns - -`Promise` — `true` if all required packages are importable, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 579. - -*** - -### isInitialized - -Check if the skill has been initialized by the SkillManager. - -#### Signature - -```typescript -isInitialized(): boolean -``` - -#### Returns - -`boolean` — True if setup() has completed and the skill is marked initialized. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 507. - -*** - -### markInitialized - -Mark the skill as initialized (called by SkillManager). - -#### Signature - -```typescript -markInitialized(): void -``` - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 514. - -*** - -### setAgent - -Set the agent reference for this skill. -Called by the SkillManager/AgentBase when the skill is attached to an agent. -Python equivalent: `self.agent = agent` in `__init__`. - -#### Signature - -```typescript -setAgent(agent: AgentBase): void -``` - -#### Parameters - - - The agent that owns this skill. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 534. - -*** - -### setup - -Setup the skill. Called when the skill is added to an agent. -Override to perform initialization (API connections, config validation, etc.) - -#### Signature - -```typescript -setup(): Promise -``` - -#### Returns - -`Promise` — `true` if setup succeeded, `false` otherwise. Python equivalent: abstract `setup() -> bool`. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 313. - -*** - -### updateSkillData - -Update this skill's namespaced data on a FunctionResult via updateGlobalData. - -#### Signature - -```typescript -updateSkillData( - result: FunctionResult, - data: Record -): FunctionResult -``` - -#### Parameters - - - The FunctionResult to update. - - - - The data to store under this skill's namespace. - - -#### Returns - -`FunctionResult` — The FunctionResult for chaining. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 462. - -*** - -### validateEnvVars - -Validate that all required environment variables declared on the skill class -are set in the current process environment. - -Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` -directly. TS reads the same static from the class. - -Returns the list of missing variable names so callers can produce actionable -error messages. This differs from Python's `validate_env_vars() -> bool` -return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/agents/skills/builtin/play-background-file/play-background-file-skill#has-all-env-vars) is the boolean equivalent. - -#### Signature - -```typescript -validateEnvVars(): string[] -``` - -#### Returns - -`string[]` — Array of missing environment variable names (empty if all are present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 486. - -*** - -### validatePackages - -Validate that all required packages declared on the skill class can be imported. - -Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` -directly and tries `importlib.import_module(pkg)` for each; TS does the -equivalent with a dynamic `import()`. - -#### Signature - -```typescript -validatePackages(): Promise -``` - -#### Returns - -`Promise` — Array of package names that could not be imported (empty if all present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 557. - -## Source - -[`src/skills/builtin/play_background_file.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/play_background_file.ts) - -Line 52. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/spider/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/spider/index.mdx index 95ba4ff76f..e365135c57 100644 --- a/fern/products/sdk-reference/typescript/agents/skills/builtin/spider/index.mdx +++ b/fern/products/sdk-reference/typescript/agents/skills/builtin/spider/index.mdx @@ -5,7 +5,7 @@ sdk_label: "TypeScript SDK" icon: "typescript" lustri: auto_generated: true - kind: "module" + kind: "class" language: "typescript" qualified_name: "skills.builtin.spider" parent: "skills.builtin" @@ -14,19 +14,702 @@ lustri: --- # `spider` +Fast web scraping skill optimized for speed and token efficiency. + +Multi-instance capable. Port of the Python `SpiderSkill` with three tools: +`scrape_url`, `crawl_site`, and `extract_structured_data`. Configuration +mirrors the Python schema (delay, concurrent\_requests, timeout, max\_pages, +max\_depth, extract\_type, max\_text\_length, clean\_text, selectors, +follow\_patterns, user\_agent, headers, follow\_robots\_txt, cache\_enabled). + ## Signature ```typescript -module spider +class SpiderSkill extends SkillBase +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/agents/skills/skill-base) + +## Examples + +```typescript +agent.addSkill('spider', { max_pages: 5, max_depth: 2 }); +``` + +## Properties + + + Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. + + + + Configuration options provided at construction time. + + + + Unique identifier for this skill instance (includes timestamp and random bytes). + + + + Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. + + + + Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. + + + + Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. + + + + Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. + + + + Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. + + + + Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. + + + + The registered name of this skill type. + + + + Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. + + + + Additional SWAIG fields extracted from config, merged into tool definitions. + + +## Methods + +### cleanup + +Cleanup resources. Called when the skill is removed from an agent. + +#### Signature + +```typescript +cleanup(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/skills/builtin/spider.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/spider.ts) + +Line 321. + +*** + +### constructor + +Create a new skill instance. + +Python parity: `core/skill_base.py:32-43`. +Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` +is left as `None` on the subclass. TS throws the equivalent when the static +defaults haven't been overridden. + +#### Signature + +```typescript +constructor(config?: SkillConfig): SpiderSkill +``` + +#### Parameters + + + Optional configuration key-value pairs (Python: `params`). + + +#### Returns + +`SpiderSkill` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 282. + +*** + +### defineTool + +Imperatively register a tool with this skill. + +Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. +Merges `this.swaigFields` into the tool definition (explicit fields on +`toolDef` take precedence), then pushes the result into `_dynamicTools` +so the default `getTools()` returns it at SWML render time. + +Intended for skills whose tool shape depends on config evaluated at +`setup()` time. Skills with a static tool list should override +`getTools()` instead. + +#### Signature + +```typescript +defineTool(toolDef: SkillToolDefinition): void +``` + +#### Parameters + + + The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 351. + +*** + +### getAgent + +Return the agent that owns this skill, asserting it is non-null. +Equivalent to accessing `self.agent` in Python, where the agent reference +is always set before `setup()` is called. + +The SkillManager lifecycle guarantees that `setAgent()` is called before +`setup()`, so this method is safe to use inside `setup()` and in any +tool handler invoked during an active agent session. + +#### Signature + +```typescript +getAgent(): AgentBase +``` + +#### Returns + +`AgentBase` — The owning `AgentBase` instance. + +#### Throws + +- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 261. + +*** + +### getConfig + +Get a configuration value by key, falling back to a default if not set. + +#### Signature + +```typescript +getConfig(key: string, defaultValue?: T): T +``` + +#### Type Parameters + + + +#### Parameters + + + The configuration key to look up. + + + + Value to return if the key is not present. + + +#### Returns + +`T` — The configuration value cast to type T, or the default value. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 524. + +*** + +### getDataMapTools + +Optional DataMap-style tool definitions. Skills that build their own +SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them +here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. + +Python equivalent: the direct `self.agent.register_swaig_function(fn)` +call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). +Default returns `[]` — skills using only the declarative `getTools()` path +do not need to override this. + +#### Signature + +```typescript +getDataMapTools(): Record[] +``` + +#### Returns + +`Record[]` — Array of fully-built SWAIG function dicts. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 372. + +*** + +### getGlobalData + +Get global data to merge into the agent's global data store. + +#### Signature + +```typescript +getGlobalData(): Record +``` + +#### Returns + +`Record` — Key-value pairs to be merged into the agent's global data. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 410. + +*** + +### getHints + +Get speech recognition hints relevant to this skill. + +#### Signature + +```typescript +getHints(): string[] +``` + +#### Returns + +`string[]` — Array of hint strings to improve speech recognition accuracy. + +#### Source + +[`src/skills/builtin/spider.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/spider.ts) + +Line 308. + +*** + +### getInstanceKey + +Get the instance key used for deduplication in the SkillManager. + +For single-instance skills (`SUPPORTS_MULTIPLE_INSTANCES = false`), returns +the skill name. For multi-instance skills, returns `${skillName}_${toolName}` +using the `tool_name` config (falls back to the skill name). + +Matches Python's `SkillBase.get_instance_key()` default (`skill_base.py:141-146`). +Multi-instance subclasses only need to override when their key derivation +depends on config beyond `tool_name`. + +#### Signature + +```typescript +getInstanceKey(): string +``` + +#### Returns + +`string` — A unique key identifying this skill instance. + +#### Source + +[`src/skills/builtin/spider.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/spider.ts) + +Line 211. + +*** + +### getParameterSchema + +Get the parameter schema for this skill class, describing all accepted configuration options. +Subclasses should override and call `super.getParameterSchema()` to include base parameters. + +Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): +returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a +`tool_name` entry with `default: cls.SKILL_NAME` for classes with +`SUPPORTS_MULTIPLE_INSTANCES = true`. + +**Modifiers:** `static` + +#### Signature + +```typescript +getParameterSchema(): Record +``` + +#### Returns + +`Record` — Record mapping parameter names to their schema entries. + +#### Source + +[`src/skills/builtin/spider.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/spider.ts) + +Line 81. + +*** + +### getPromptSections + +Get prompt sections to inject into the agent's system prompt. +Respects the `skip_prompt` config option — returns `[]` if set to `true`. +Subclasses should override `_getPromptSections()` instead of this method. + +#### Signature + +```typescript +getPromptSections(): SkillPromptSection[] +``` + +#### Returns + +`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 382. + +*** + +### getSkillData + +Read this skill's data from a raw call data object's global\_data. + +#### Signature + +```typescript +getSkillData(rawData: Record): Record +``` + +#### Parameters + + + The raw request data containing global\_data. + + +#### Returns + +`Record` — The skill's stored data, or an empty object if not found. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 450. + +*** + +### getSkillNamespace + +Get the namespaced key for storing per-skill data in global\_data. + +#### Signature + +```typescript +getSkillNamespace(): string ``` -## Classes +#### Returns + +`string` — A string like "skill:datetime" or "skill:my\_prefix". + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 440. + +*** + +### getTools + +#### Signature + +```typescript +getTools(): SkillToolDefinition[] +``` + +#### Returns + +`SkillToolDefinition[]` — Three tools: `scrape_url`, `crawl_site`, and `extract_structured_data`. + +#### Source + +[`src/skills/builtin/spider.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/spider.ts) + +Line 329. + +*** + +### hasAllEnvVars + +Check if all required environment variables are present. +Convenience wrapper around `validateEnvVars()` that returns a boolean, +matching the Python `validate_env_vars() -> bool` return type. + +#### Signature + +```typescript +hasAllEnvVars(): boolean +``` + +#### Returns + +`boolean` — `true` if all required env vars are set, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 544. + +*** + +### hasAllPackages + +Check if all required packages declared in the manifest are available. +Convenience wrapper around `validatePackages()` that returns a boolean, +matching the Python `validate_packages() -> bool` return type. + +#### Signature + +```typescript +hasAllPackages(): Promise +``` + +#### Returns + +`Promise` — `true` if all required packages are importable, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 579. + +*** + +### isInitialized + +Check if the skill has been initialized by the SkillManager. + +#### Signature + +```typescript +isInitialized(): boolean +``` + +#### Returns + +`boolean` — True if setup() has completed and the skill is marked initialized. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 507. + +*** + +### markInitialized + +Mark the skill as initialized (called by SkillManager). + +#### Signature + +```typescript +markInitialized(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 514. + +*** + +### setAgent + +Set the agent reference for this skill. +Called by the SkillManager/AgentBase when the skill is attached to an agent. +Python equivalent: `self.agent = agent` in `__init__`. + +#### Signature + +```typescript +setAgent(agent: AgentBase): void +``` + +#### Parameters + + + The agent that owns this skill. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 534. + +*** + +### setup + +Setup the skill. Called when the skill is added to an agent. +Override to perform initialization (API connections, config validation, etc.) + +#### Signature + +```typescript +setup(): Promise +``` + +#### Returns + +`Promise` — `true` if setup succeeded, `false` otherwise. Python equivalent: abstract `setup() -> bool`. + +#### Source + +[`src/skills/builtin/spider.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/spider.ts) + +Line 216. + +*** + +### updateSkillData + +Update this skill's namespaced data on a FunctionResult via updateGlobalData. + +#### Signature + +```typescript +updateSkillData( + result: FunctionResult, + data: Record +): FunctionResult +``` + +#### Parameters + + + The FunctionResult to update. + + + + The data to store under this skill's namespace. + + +#### Returns + +`FunctionResult` — The FunctionResult for chaining. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 462. + +*** + +### validateEnvVars + +Validate that all required environment variables declared on the skill class +are set in the current process environment. + +Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` +directly. TS reads the same static from the class. + +Returns the list of missing variable names so callers can produce actionable +error messages. This differs from Python's `validate_env_vars() -> bool` +return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/agents/skills/builtin/spider#has-all-env-vars) is the boolean equivalent. + +#### Signature + +```typescript +validateEnvVars(): string[] +``` + +#### Returns + +`string[]` — Array of missing environment variable names (empty if all are present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 486. + +*** + +### validatePackages + +Validate that all required packages declared on the skill class can be imported. + +Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` +directly and tries `importlib.import_module(pkg)` for each; TS does the +equivalent with a dynamic `import()`. + +#### Signature + +```typescript +validatePackages(): Promise +``` + +#### Returns + +`Promise` — Array of package names that could not be imported (empty if all present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - - - Fast web scraping skill optimized for speed and token efficiency. - - +Line 557. ## Functions @@ -60,4 +743,4 @@ Line 937. [`src/skills/builtin/spider.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/spider.ts) -Line 1. +Line 71. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/spider/spider-skill/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/spider/spider-skill/index.mdx deleted file mode 100644 index 38ea1db34d..0000000000 --- a/fern/products/sdk-reference/typescript/agents/skills/builtin/spider/spider-skill/index.mdx +++ /dev/null @@ -1,718 +0,0 @@ ---- -slug: "/reference/typescript/agents/skills/builtin/spider/spider-skill" -title: "SpiderSkill" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "skills.builtin.spider.SpiderSkill" - parent: "skills.builtin.spider" - module: "agents.skills.builtin.spider" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/spider.ts" ---- -# `SpiderSkill` - -Fast web scraping skill optimized for speed and token efficiency. - -Multi-instance capable. Port of the Python `SpiderSkill` with three tools: -`scrape_url`, `crawl_site`, and `extract_structured_data`. Configuration -mirrors the Python schema (delay, concurrent\_requests, timeout, max\_pages, -max\_depth, extract\_type, max\_text\_length, clean\_text, selectors, -follow\_patterns, user\_agent, headers, follow\_robots\_txt, cache\_enabled). - -## Signature - -```typescript -class SpiderSkill extends SkillBase -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/agents/skills/skill-base) - -## Examples - -```typescript -agent.addSkill('spider', { max_pages: 5, max_depth: 2 }); -``` - -## Properties - - - Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. - - - - Configuration options provided at construction time. - - - - Unique identifier for this skill instance (includes timestamp and random bytes). - - - - Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. - - - - Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. - - - - Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. - - - - Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. - - - - Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. - - - - Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. - - - - The registered name of this skill type. - - - - Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. - - - - Additional SWAIG fields extracted from config, merged into tool definitions. - - -## Methods - -### cleanup - -Cleanup resources. Called when the skill is removed from an agent. - -#### Signature - -```typescript -cleanup(): Promise -``` - -#### Returns - -`Promise` - -#### Source - -[`src/skills/builtin/spider.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/spider.ts) - -Line 321. - -*** - -### constructor - -Create a new skill instance. - -Python parity: `core/skill_base.py:32-43`. -Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` -is left as `None` on the subclass. TS throws the equivalent when the static -defaults haven't been overridden. - -#### Signature - -```typescript -constructor(config?: SkillConfig): SpiderSkill -``` - -#### Parameters - - - Optional configuration key-value pairs (Python: `params`). - - -#### Returns - -`SpiderSkill` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 282. - -*** - -### defineTool - -Imperatively register a tool with this skill. - -Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. -Merges `this.swaigFields` into the tool definition (explicit fields on -`toolDef` take precedence), then pushes the result into `_dynamicTools` -so the default `getTools()` returns it at SWML render time. - -Intended for skills whose tool shape depends on config evaluated at -`setup()` time. Skills with a static tool list should override -`getTools()` instead. - -#### Signature - -```typescript -defineTool(toolDef: SkillToolDefinition): void -``` - -#### Parameters - - - The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 351. - -*** - -### getAgent - -Return the agent that owns this skill, asserting it is non-null. -Equivalent to accessing `self.agent` in Python, where the agent reference -is always set before `setup()` is called. - -The SkillManager lifecycle guarantees that `setAgent()` is called before -`setup()`, so this method is safe to use inside `setup()` and in any -tool handler invoked during an active agent session. - -#### Signature - -```typescript -getAgent(): AgentBase -``` - -#### Returns - -`AgentBase` — The owning `AgentBase` instance. - -#### Throws - -- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 261. - -*** - -### getConfig - -Get a configuration value by key, falling back to a default if not set. - -#### Signature - -```typescript -getConfig(key: string, defaultValue?: T): T -``` - -#### Type Parameters - - - -#### Parameters - - - The configuration key to look up. - - - - Value to return if the key is not present. - - -#### Returns - -`T` — The configuration value cast to type T, or the default value. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 524. - -*** - -### getDataMapTools - -Optional DataMap-style tool definitions. Skills that build their own -SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them -here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. - -Python equivalent: the direct `self.agent.register_swaig_function(fn)` -call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). -Default returns `[]` — skills using only the declarative `getTools()` path -do not need to override this. - -#### Signature - -```typescript -getDataMapTools(): Record[] -``` - -#### Returns - -`Record[]` — Array of fully-built SWAIG function dicts. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 372. - -*** - -### getGlobalData - -Get global data to merge into the agent's global data store. - -#### Signature - -```typescript -getGlobalData(): Record -``` - -#### Returns - -`Record` — Key-value pairs to be merged into the agent's global data. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 410. - -*** - -### getHints - -Get speech recognition hints relevant to this skill. - -#### Signature - -```typescript -getHints(): string[] -``` - -#### Returns - -`string[]` — Array of hint strings to improve speech recognition accuracy. - -#### Source - -[`src/skills/builtin/spider.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/spider.ts) - -Line 308. - -*** - -### getInstanceKey - -Get the instance key used for deduplication in the SkillManager. - -For single-instance skills (`SUPPORTS_MULTIPLE_INSTANCES = false`), returns -the skill name. For multi-instance skills, returns `${skillName}_${toolName}` -using the `tool_name` config (falls back to the skill name). - -Matches Python's `SkillBase.get_instance_key()` default (`skill_base.py:141-146`). -Multi-instance subclasses only need to override when their key derivation -depends on config beyond `tool_name`. - -#### Signature - -```typescript -getInstanceKey(): string -``` - -#### Returns - -`string` — A unique key identifying this skill instance. - -#### Source - -[`src/skills/builtin/spider.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/spider.ts) - -Line 211. - -*** - -### getParameterSchema - -Get the parameter schema for this skill class, describing all accepted configuration options. -Subclasses should override and call `super.getParameterSchema()` to include base parameters. - -Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): -returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a -`tool_name` entry with `default: cls.SKILL_NAME` for classes with -`SUPPORTS_MULTIPLE_INSTANCES = true`. - -**Modifiers:** `static` - -#### Signature - -```typescript -getParameterSchema(): Record -``` - -#### Returns - -`Record` — Record mapping parameter names to their schema entries. - -#### Source - -[`src/skills/builtin/spider.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/spider.ts) - -Line 81. - -*** - -### getPromptSections - -Get prompt sections to inject into the agent's system prompt. -Respects the `skip_prompt` config option — returns `[]` if set to `true`. -Subclasses should override `_getPromptSections()` instead of this method. - -#### Signature - -```typescript -getPromptSections(): SkillPromptSection[] -``` - -#### Returns - -`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 382. - -*** - -### getSkillData - -Read this skill's data from a raw call data object's global\_data. - -#### Signature - -```typescript -getSkillData(rawData: Record): Record -``` - -#### Parameters - - - The raw request data containing global\_data. - - -#### Returns - -`Record` — The skill's stored data, or an empty object if not found. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 450. - -*** - -### getSkillNamespace - -Get the namespaced key for storing per-skill data in global\_data. - -#### Signature - -```typescript -getSkillNamespace(): string -``` - -#### Returns - -`string` — A string like "skill:datetime" or "skill:my\_prefix". - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 440. - -*** - -### getTools - -#### Signature - -```typescript -getTools(): SkillToolDefinition[] -``` - -#### Returns - -`SkillToolDefinition[]` — Three tools: `scrape_url`, `crawl_site`, and `extract_structured_data`. - -#### Source - -[`src/skills/builtin/spider.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/spider.ts) - -Line 329. - -*** - -### hasAllEnvVars - -Check if all required environment variables are present. -Convenience wrapper around `validateEnvVars()` that returns a boolean, -matching the Python `validate_env_vars() -> bool` return type. - -#### Signature - -```typescript -hasAllEnvVars(): boolean -``` - -#### Returns - -`boolean` — `true` if all required env vars are set, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 544. - -*** - -### hasAllPackages - -Check if all required packages declared in the manifest are available. -Convenience wrapper around `validatePackages()` that returns a boolean, -matching the Python `validate_packages() -> bool` return type. - -#### Signature - -```typescript -hasAllPackages(): Promise -``` - -#### Returns - -`Promise` — `true` if all required packages are importable, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 579. - -*** - -### isInitialized - -Check if the skill has been initialized by the SkillManager. - -#### Signature - -```typescript -isInitialized(): boolean -``` - -#### Returns - -`boolean` — True if setup() has completed and the skill is marked initialized. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 507. - -*** - -### markInitialized - -Mark the skill as initialized (called by SkillManager). - -#### Signature - -```typescript -markInitialized(): void -``` - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 514. - -*** - -### setAgent - -Set the agent reference for this skill. -Called by the SkillManager/AgentBase when the skill is attached to an agent. -Python equivalent: `self.agent = agent` in `__init__`. - -#### Signature - -```typescript -setAgent(agent: AgentBase): void -``` - -#### Parameters - - - The agent that owns this skill. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 534. - -*** - -### setup - -Setup the skill. Called when the skill is added to an agent. -Override to perform initialization (API connections, config validation, etc.) - -#### Signature - -```typescript -setup(): Promise -``` - -#### Returns - -`Promise` — `true` if setup succeeded, `false` otherwise. Python equivalent: abstract `setup() -> bool`. - -#### Source - -[`src/skills/builtin/spider.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/spider.ts) - -Line 216. - -*** - -### updateSkillData - -Update this skill's namespaced data on a FunctionResult via updateGlobalData. - -#### Signature - -```typescript -updateSkillData( - result: FunctionResult, - data: Record -): FunctionResult -``` - -#### Parameters - - - The FunctionResult to update. - - - - The data to store under this skill's namespace. - - -#### Returns - -`FunctionResult` — The FunctionResult for chaining. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 462. - -*** - -### validateEnvVars - -Validate that all required environment variables declared on the skill class -are set in the current process environment. - -Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` -directly. TS reads the same static from the class. - -Returns the list of missing variable names so callers can produce actionable -error messages. This differs from Python's `validate_env_vars() -> bool` -return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/agents/skills/builtin/spider/spider-skill#has-all-env-vars) is the boolean equivalent. - -#### Signature - -```typescript -validateEnvVars(): string[] -``` - -#### Returns - -`string[]` — Array of missing environment variable names (empty if all are present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 486. - -*** - -### validatePackages - -Validate that all required packages declared on the skill class can be imported. - -Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` -directly and tries `importlib.import_module(pkg)` for each; TS does the -equivalent with a dynamic `import()`. - -#### Signature - -```typescript -validatePackages(): Promise -``` - -#### Returns - -`Promise` — Array of package names that could not be imported (empty if all present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 557. - -## Source - -[`src/skills/builtin/spider.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/spider.ts) - -Line 71. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/swml-transfer/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/swml-transfer/index.mdx index 1cab6c2dec..a3ee28a2bb 100644 --- a/fern/products/sdk-reference/typescript/agents/skills/builtin/swml-transfer/index.mdx +++ b/fern/products/sdk-reference/typescript/agents/skills/builtin/swml-transfer/index.mdx @@ -5,7 +5,7 @@ sdk_label: "TypeScript SDK" icon: "typescript" lustri: auto_generated: true - kind: "module" + kind: "class" language: "typescript" qualified_name: "skills.builtin.swml_transfer" parent: "skills.builtin" @@ -14,19 +14,705 @@ lustri: --- # `swml_transfer` +Transfer calls between agents based on pattern matching. + +Multi-instance capable (distinguished by `tool_name`). +Accepts either Python-style `transfers` config (regex → per-entry config) +or TypeScript-style `patterns` array of named destinations. + ## Signature ```typescript -module swml_transfer +class SwmlTransferSkill extends SkillBase +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/agents/skills/skill-base) + +## Examples + +```typescript +agent.addSkill('swml_transfer', { + patterns: [ + { name: 'sales', pattern: /sales|pricing|buy/i, to: '+15551112222' }, + { name: 'support', pattern: /help|support|broken/i, to: '+15553334444' }, + ], +}); +``` + +## Properties + + + Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. + + + + Configuration options provided at construction time. + + + + Unique identifier for this skill instance (includes timestamp and random bytes). + + + + Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. + + + + Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. + + + + Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. + + + + Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. + + + + Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. + + + + Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. + + + + The registered name of this skill type. + + + + Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. + + + + Additional SWAIG fields extracted from config, merged into tool definitions. + + +## Methods + +### cleanup + +Cleanup resources. Called when the skill is removed from an agent. + +#### Signature + +```typescript +cleanup(): Promise ``` -## Classes +#### Returns + +`Promise` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 469. + +*** + +### constructor + +Create a new skill instance. + +Python parity: `core/skill_base.py:32-43`. +Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` +is left as `None` on the subclass. TS throws the equivalent when the static +defaults haven't been overridden. + +#### Signature + +```typescript +constructor(config?: SkillConfig): SwmlTransferSkill +``` + +#### Parameters + + + Optional configuration key-value pairs (Python: `params`). + + +#### Returns + +`SwmlTransferSkill` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 282. + +*** + +### defineTool + +Imperatively register a tool with this skill. + +Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. +Merges `this.swaigFields` into the tool definition (explicit fields on +`toolDef` take precedence), then pushes the result into `_dynamicTools` +so the default `getTools()` returns it at SWML render time. + +Intended for skills whose tool shape depends on config evaluated at +`setup()` time. Skills with a static tool list should override +`getTools()` instead. + +#### Signature + +```typescript +defineTool(toolDef: SkillToolDefinition): void +``` + +#### Parameters + + + The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 351. + +*** + +### getAgent + +Return the agent that owns this skill, asserting it is non-null. +Equivalent to accessing `self.agent` in Python, where the agent reference +is always set before `setup()` is called. + +The SkillManager lifecycle guarantees that `setAgent()` is called before +`setup()`, so this method is safe to use inside `setup()` and in any +tool handler invoked during an active agent session. + +#### Signature + +```typescript +getAgent(): AgentBase +``` + +#### Returns + +`AgentBase` — The owning `AgentBase` instance. + +#### Throws + +- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 261. + +*** + +### getConfig + +Get a configuration value by key, falling back to a default if not set. + +#### Signature + +```typescript +getConfig(key: string, defaultValue?: T): T +``` + +#### Type Parameters + + + +#### Parameters + + + The configuration key to look up. + + + + Value to return if the key is not present. + + +#### Returns + +`T` — The configuration value cast to type T, or the default value. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 524. + +*** + +### getDataMapTools + +Optional DataMap-style tool definitions. Skills that build their own +SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them +here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. + +Python equivalent: the direct `self.agent.register_swaig_function(fn)` +call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). +Default returns `[]` — skills using only the declarative `getTools()` path +do not need to override this. + +#### Signature + +```typescript +getDataMapTools(): Record[] +``` + +#### Returns + +`Record[]` — Array of fully-built SWAIG function dicts. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 372. + +*** + +### getGlobalData + +Get global data to merge into the agent's global data store. + +#### Signature + +```typescript +getGlobalData(): Record +``` + +#### Returns + +`Record` — Key-value pairs to be merged into the agent's global data. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 410. + +*** + +### getHints + +Get speech recognition hints relevant to this skill. + +#### Signature + +```typescript +getHints(): string[] +``` + +#### Returns + +`string[]` — Array of hint strings to improve speech recognition accuracy. + +#### Source + +[`src/skills/builtin/swml_transfer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/swml_transfer.ts) + +Line 241. + +*** + +### getInstanceKey + +Get the instance key used for deduplication in the SkillManager. + +For single-instance skills (`SUPPORTS_MULTIPLE_INSTANCES = false`), returns +the skill name. For multi-instance skills, returns `${skillName}_${toolName}` +using the `tool_name` config (falls back to the skill name). + +Matches Python's `SkillBase.get_instance_key()` default (`skill_base.py:141-146`). +Multi-instance subclasses only need to override when their key derivation +depends on config beyond `tool_name`. + +#### Signature + +```typescript +getInstanceKey(): string +``` + +#### Returns + +`string` — A unique key identifying this skill instance. + +#### Source + +[`src/skills/builtin/swml_transfer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/swml_transfer.ts) + +Line 162. + +*** + +### getParameterSchema + +Get the parameter schema for this skill class, describing all accepted configuration options. +Subclasses should override and call `super.getParameterSchema()` to include base parameters. + +Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): +returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a +`tool_name` entry with `default: cls.SKILL_NAME` for classes with +`SUPPORTS_MULTIPLE_INSTANCES = true`. + +**Modifiers:** `static` + +#### Signature + +```typescript +getParameterSchema(): Record +``` + +#### Returns + +`Record` — Record mapping parameter names to their schema entries. + +#### Source + +[`src/skills/builtin/swml_transfer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/swml_transfer.ts) + +Line 82. + +*** + +### getPromptSections + +Get prompt sections to inject into the agent's system prompt. +Respects the `skip_prompt` config option — returns `[]` if set to `true`. +Subclasses should override `_getPromptSections()` instead of this method. + +#### Signature + +```typescript +getPromptSections(): SkillPromptSection[] +``` + +#### Returns + +`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 382. + +*** + +### getSkillData + +Read this skill's data from a raw call data object's global\_data. + +#### Signature + +```typescript +getSkillData(rawData: Record): Record +``` + +#### Parameters + + + The raw request data containing global\_data. + + +#### Returns + +`Record` — The skill's stored data, or an empty object if not found. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 450. + +*** + +### getSkillNamespace + +Get the namespaced key for storing per-skill data in global\_data. + +#### Signature + +```typescript +getSkillNamespace(): string +``` + +#### Returns + +`string` — A string like "skill:datetime" or "skill:my\_prefix". + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 440. + +*** + +### getTools + +#### Signature + +```typescript +getTools(): SkillToolDefinition[] +``` + +#### Returns + +`SkillToolDefinition[]` — A `transfer_call` tool, plus `list_transfer_destinations` when patterns are configured. + +#### Source + +[`src/skills/builtin/swml_transfer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/swml_transfer.ts) + +Line 272. + +*** + +### hasAllEnvVars + +Check if all required environment variables are present. +Convenience wrapper around `validateEnvVars()` that returns a boolean, +matching the Python `validate_env_vars() -> bool` return type. + +#### Signature + +```typescript +hasAllEnvVars(): boolean +``` + +#### Returns + +`boolean` — `true` if all required env vars are set, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 544. + +*** + +### hasAllPackages + +Check if all required packages declared in the manifest are available. +Convenience wrapper around `validatePackages()` that returns a boolean, +matching the Python `validate_packages() -> bool` return type. + +#### Signature + +```typescript +hasAllPackages(): Promise +``` + +#### Returns + +`Promise` — `true` if all required packages are importable, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 579. + +*** + +### isInitialized + +Check if the skill has been initialized by the SkillManager. + +#### Signature + +```typescript +isInitialized(): boolean +``` + +#### Returns + +`boolean` — True if setup() has completed and the skill is marked initialized. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 507. + +*** + +### markInitialized + +Mark the skill as initialized (called by SkillManager). + +#### Signature + +```typescript +markInitialized(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 514. + +*** + +### setAgent + +Set the agent reference for this skill. +Called by the SkillManager/AgentBase when the skill is attached to an agent. +Python equivalent: `self.agent = agent` in `__init__`. + +#### Signature + +```typescript +setAgent(agent: AgentBase): void +``` + +#### Parameters + + + The agent that owns this skill. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 534. + +*** + +### setup + +Setup the skill. Called when the skill is added to an agent. +Override to perform initialization (API connections, config validation, etc.) + +#### Signature + +```typescript +setup(): Promise +``` + +#### Returns + +`Promise` — `true` if setup succeeded, `false` otherwise. Python equivalent: abstract `setup() -> bool`. + +#### Source + +[`src/skills/builtin/swml_transfer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/swml_transfer.ts) + +Line 167. + +*** + +### updateSkillData + +Update this skill's namespaced data on a FunctionResult via updateGlobalData. + +#### Signature + +```typescript +updateSkillData( + result: FunctionResult, + data: Record +): FunctionResult +``` + +#### Parameters + + + The FunctionResult to update. + + + + The data to store under this skill's namespace. + + +#### Returns + +`FunctionResult` — The FunctionResult for chaining. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 462. + +*** + +### validateEnvVars + +Validate that all required environment variables declared on the skill class +are set in the current process environment. + +Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` +directly. TS reads the same static from the class. + +Returns the list of missing variable names so callers can produce actionable +error messages. This differs from Python's `validate_env_vars() -> bool` +return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/agents/skills/builtin/swml-transfer#has-all-env-vars) is the boolean equivalent. + +#### Signature + +```typescript +validateEnvVars(): string[] +``` + +#### Returns + +`string[]` — Array of missing environment variable names (empty if all are present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 486. + +*** + +### validatePackages + +Validate that all required packages declared on the skill class can be imported. + +Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` +directly and tries `importlib.import_module(pkg)` for each; TS does the +equivalent with a dynamic `import()`. + +#### Signature + +```typescript +validatePackages(): Promise +``` + +#### Returns + +`Promise` — Array of package names that could not be imported (empty if all present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - - - Transfer calls between agents based on pattern matching. - - +Line 557. ## Functions @@ -60,4 +746,4 @@ Line 643. [`src/skills/builtin/swml_transfer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/swml_transfer.ts) -Line 1. +Line 73. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/swml-transfer/swml-transfer-skill/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/swml-transfer/swml-transfer-skill/index.mdx deleted file mode 100644 index 2b7f364d9b..0000000000 --- a/fern/products/sdk-reference/typescript/agents/skills/builtin/swml-transfer/swml-transfer-skill/index.mdx +++ /dev/null @@ -1,721 +0,0 @@ ---- -slug: "/reference/typescript/agents/skills/builtin/swml-transfer/swml-transfer-skill" -title: "SwmlTransferSkill" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "skills.builtin.swml_transfer.SwmlTransferSkill" - parent: "skills.builtin.swml_transfer" - module: "agents.skills.builtin.swml_transfer" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/swml_transfer.ts" ---- -# `SwmlTransferSkill` - -Transfer calls between agents based on pattern matching. - -Multi-instance capable (distinguished by `tool_name`). -Accepts either Python-style `transfers` config (regex → per-entry config) -or TypeScript-style `patterns` array of named destinations. - -## Signature - -```typescript -class SwmlTransferSkill extends SkillBase -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/agents/skills/skill-base) - -## Examples - -```typescript -agent.addSkill('swml_transfer', { - patterns: [ - { name: 'sales', pattern: /sales|pricing|buy/i, to: '+15551112222' }, - { name: 'support', pattern: /help|support|broken/i, to: '+15553334444' }, - ], -}); -``` - -## Properties - - - Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. - - - - Configuration options provided at construction time. - - - - Unique identifier for this skill instance (includes timestamp and random bytes). - - - - Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. - - - - Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. - - - - Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. - - - - Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. - - - - Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. - - - - Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. - - - - The registered name of this skill type. - - - - Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. - - - - Additional SWAIG fields extracted from config, merged into tool definitions. - - -## Methods - -### cleanup - -Cleanup resources. Called when the skill is removed from an agent. - -#### Signature - -```typescript -cleanup(): Promise -``` - -#### Returns - -`Promise` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 469. - -*** - -### constructor - -Create a new skill instance. - -Python parity: `core/skill_base.py:32-43`. -Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` -is left as `None` on the subclass. TS throws the equivalent when the static -defaults haven't been overridden. - -#### Signature - -```typescript -constructor(config?: SkillConfig): SwmlTransferSkill -``` - -#### Parameters - - - Optional configuration key-value pairs (Python: `params`). - - -#### Returns - -`SwmlTransferSkill` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 282. - -*** - -### defineTool - -Imperatively register a tool with this skill. - -Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. -Merges `this.swaigFields` into the tool definition (explicit fields on -`toolDef` take precedence), then pushes the result into `_dynamicTools` -so the default `getTools()` returns it at SWML render time. - -Intended for skills whose tool shape depends on config evaluated at -`setup()` time. Skills with a static tool list should override -`getTools()` instead. - -#### Signature - -```typescript -defineTool(toolDef: SkillToolDefinition): void -``` - -#### Parameters - - - The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 351. - -*** - -### getAgent - -Return the agent that owns this skill, asserting it is non-null. -Equivalent to accessing `self.agent` in Python, where the agent reference -is always set before `setup()` is called. - -The SkillManager lifecycle guarantees that `setAgent()` is called before -`setup()`, so this method is safe to use inside `setup()` and in any -tool handler invoked during an active agent session. - -#### Signature - -```typescript -getAgent(): AgentBase -``` - -#### Returns - -`AgentBase` — The owning `AgentBase` instance. - -#### Throws - -- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 261. - -*** - -### getConfig - -Get a configuration value by key, falling back to a default if not set. - -#### Signature - -```typescript -getConfig(key: string, defaultValue?: T): T -``` - -#### Type Parameters - - - -#### Parameters - - - The configuration key to look up. - - - - Value to return if the key is not present. - - -#### Returns - -`T` — The configuration value cast to type T, or the default value. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 524. - -*** - -### getDataMapTools - -Optional DataMap-style tool definitions. Skills that build their own -SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them -here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. - -Python equivalent: the direct `self.agent.register_swaig_function(fn)` -call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). -Default returns `[]` — skills using only the declarative `getTools()` path -do not need to override this. - -#### Signature - -```typescript -getDataMapTools(): Record[] -``` - -#### Returns - -`Record[]` — Array of fully-built SWAIG function dicts. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 372. - -*** - -### getGlobalData - -Get global data to merge into the agent's global data store. - -#### Signature - -```typescript -getGlobalData(): Record -``` - -#### Returns - -`Record` — Key-value pairs to be merged into the agent's global data. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 410. - -*** - -### getHints - -Get speech recognition hints relevant to this skill. - -#### Signature - -```typescript -getHints(): string[] -``` - -#### Returns - -`string[]` — Array of hint strings to improve speech recognition accuracy. - -#### Source - -[`src/skills/builtin/swml_transfer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/swml_transfer.ts) - -Line 241. - -*** - -### getInstanceKey - -Get the instance key used for deduplication in the SkillManager. - -For single-instance skills (`SUPPORTS_MULTIPLE_INSTANCES = false`), returns -the skill name. For multi-instance skills, returns `${skillName}_${toolName}` -using the `tool_name` config (falls back to the skill name). - -Matches Python's `SkillBase.get_instance_key()` default (`skill_base.py:141-146`). -Multi-instance subclasses only need to override when their key derivation -depends on config beyond `tool_name`. - -#### Signature - -```typescript -getInstanceKey(): string -``` - -#### Returns - -`string` — A unique key identifying this skill instance. - -#### Source - -[`src/skills/builtin/swml_transfer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/swml_transfer.ts) - -Line 162. - -*** - -### getParameterSchema - -Get the parameter schema for this skill class, describing all accepted configuration options. -Subclasses should override and call `super.getParameterSchema()` to include base parameters. - -Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): -returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a -`tool_name` entry with `default: cls.SKILL_NAME` for classes with -`SUPPORTS_MULTIPLE_INSTANCES = true`. - -**Modifiers:** `static` - -#### Signature - -```typescript -getParameterSchema(): Record -``` - -#### Returns - -`Record` — Record mapping parameter names to their schema entries. - -#### Source - -[`src/skills/builtin/swml_transfer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/swml_transfer.ts) - -Line 82. - -*** - -### getPromptSections - -Get prompt sections to inject into the agent's system prompt. -Respects the `skip_prompt` config option — returns `[]` if set to `true`. -Subclasses should override `_getPromptSections()` instead of this method. - -#### Signature - -```typescript -getPromptSections(): SkillPromptSection[] -``` - -#### Returns - -`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 382. - -*** - -### getSkillData - -Read this skill's data from a raw call data object's global\_data. - -#### Signature - -```typescript -getSkillData(rawData: Record): Record -``` - -#### Parameters - - - The raw request data containing global\_data. - - -#### Returns - -`Record` — The skill's stored data, or an empty object if not found. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 450. - -*** - -### getSkillNamespace - -Get the namespaced key for storing per-skill data in global\_data. - -#### Signature - -```typescript -getSkillNamespace(): string -``` - -#### Returns - -`string` — A string like "skill:datetime" or "skill:my\_prefix". - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 440. - -*** - -### getTools - -#### Signature - -```typescript -getTools(): SkillToolDefinition[] -``` - -#### Returns - -`SkillToolDefinition[]` — A `transfer_call` tool, plus `list_transfer_destinations` when patterns are configured. - -#### Source - -[`src/skills/builtin/swml_transfer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/swml_transfer.ts) - -Line 272. - -*** - -### hasAllEnvVars - -Check if all required environment variables are present. -Convenience wrapper around `validateEnvVars()` that returns a boolean, -matching the Python `validate_env_vars() -> bool` return type. - -#### Signature - -```typescript -hasAllEnvVars(): boolean -``` - -#### Returns - -`boolean` — `true` if all required env vars are set, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 544. - -*** - -### hasAllPackages - -Check if all required packages declared in the manifest are available. -Convenience wrapper around `validatePackages()` that returns a boolean, -matching the Python `validate_packages() -> bool` return type. - -#### Signature - -```typescript -hasAllPackages(): Promise -``` - -#### Returns - -`Promise` — `true` if all required packages are importable, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 579. - -*** - -### isInitialized - -Check if the skill has been initialized by the SkillManager. - -#### Signature - -```typescript -isInitialized(): boolean -``` - -#### Returns - -`boolean` — True if setup() has completed and the skill is marked initialized. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 507. - -*** - -### markInitialized - -Mark the skill as initialized (called by SkillManager). - -#### Signature - -```typescript -markInitialized(): void -``` - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 514. - -*** - -### setAgent - -Set the agent reference for this skill. -Called by the SkillManager/AgentBase when the skill is attached to an agent. -Python equivalent: `self.agent = agent` in `__init__`. - -#### Signature - -```typescript -setAgent(agent: AgentBase): void -``` - -#### Parameters - - - The agent that owns this skill. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 534. - -*** - -### setup - -Setup the skill. Called when the skill is added to an agent. -Override to perform initialization (API connections, config validation, etc.) - -#### Signature - -```typescript -setup(): Promise -``` - -#### Returns - -`Promise` — `true` if setup succeeded, `false` otherwise. Python equivalent: abstract `setup() -> bool`. - -#### Source - -[`src/skills/builtin/swml_transfer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/swml_transfer.ts) - -Line 167. - -*** - -### updateSkillData - -Update this skill's namespaced data on a FunctionResult via updateGlobalData. - -#### Signature - -```typescript -updateSkillData( - result: FunctionResult, - data: Record -): FunctionResult -``` - -#### Parameters - - - The FunctionResult to update. - - - - The data to store under this skill's namespace. - - -#### Returns - -`FunctionResult` — The FunctionResult for chaining. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 462. - -*** - -### validateEnvVars - -Validate that all required environment variables declared on the skill class -are set in the current process environment. - -Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` -directly. TS reads the same static from the class. - -Returns the list of missing variable names so callers can produce actionable -error messages. This differs from Python's `validate_env_vars() -> bool` -return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/agents/skills/builtin/swml-transfer/swml-transfer-skill#has-all-env-vars) is the boolean equivalent. - -#### Signature - -```typescript -validateEnvVars(): string[] -``` - -#### Returns - -`string[]` — Array of missing environment variable names (empty if all are present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 486. - -*** - -### validatePackages - -Validate that all required packages declared on the skill class can be imported. - -Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` -directly and tries `importlib.import_module(pkg)` for each; TS does the -equivalent with a dynamic `import()`. - -#### Signature - -```typescript -validatePackages(): Promise -``` - -#### Returns - -`Promise` — Array of package names that could not be imported (empty if all present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 557. - -## Source - -[`src/skills/builtin/swml_transfer.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/swml_transfer.ts) - -Line 73. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/weather-api/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/weather-api/index.mdx index 7c267fe25a..18a4c96513 100644 --- a/fern/products/sdk-reference/typescript/agents/skills/builtin/weather-api/index.mdx +++ b/fern/products/sdk-reference/typescript/agents/skills/builtin/weather-api/index.mdx @@ -5,7 +5,7 @@ sdk_label: "TypeScript SDK" icon: "typescript" lustri: auto_generated: true - kind: "module" + kind: "class" language: "typescript" qualified_name: "skills.builtin.weather_api" parent: "skills.builtin" @@ -14,19 +14,716 @@ lustri: --- # `weather_api` +Fetches current weather data from OpenWeatherMap for any location worldwide. + +Tier 2 built-in skill. Requires the `WEATHER_API_KEY` environment variable +containing a valid OpenWeatherMap API key (obtainable at openweathermap.org). +Supports metric, imperial, and standard temperature units via the `units` +config option. The `api_key` config value takes precedence over the +environment variable when both are set. + +**Provider note:** The Python reference SDK uses WeatherAPI.com +(`api.weatherapi.com/v1/current.json`). This TypeScript skill uses +OpenWeatherMap (`api.openweathermap.org/data/2.5/weather`). These providers +use different API key formats — a WeatherAPI.com key will NOT work here. +Obtain an OpenWeatherMap key at https://openweathermap.org/api. + +**Unit aliases:** For migration compatibility with the Python SDK the `units` +config also accepts `"fahrenheit"` (normalized to `"imperial"`) and +`"celsius"` (normalized to `"metric"`). + ## Signature ```typescript -module weather_api +class WeatherApiSkill extends SkillBase +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/agents/skills/skill-base) + +## Examples + +```typescript +agent.addSkill('weather_api', { units: 'imperial' }); +// or pass the key explicitly: +agent.addSkill('weather_api', { api_key: process.env.WEATHER_API_KEY }); +``` + +## Properties + + + Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. + + + + Configuration options provided at construction time. + + + + Unique identifier for this skill instance (includes timestamp and random bytes). + + + + Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. + + + + Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. + + + + Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. + + + + Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. + + + + Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. + + + + Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. + + + + The registered name of this skill type. + + + + Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. + + + + Additional SWAIG fields extracted from config, merged into tool definitions. + + +## Methods + +### cleanup + +Cleanup resources. Called when the skill is removed from an agent. + +#### Signature + +```typescript +cleanup(): Promise ``` -## Classes +#### Returns + +`Promise` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 469. + +*** + +### constructor + +Create a new skill instance. + +Python parity: `core/skill_base.py:32-43`. +Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` +is left as `None` on the subclass. TS throws the equivalent when the static +defaults haven't been overridden. + +#### Signature + +```typescript +constructor(config?: SkillConfig): WeatherApiSkill +``` + +#### Parameters + + + Optional configuration key-value pairs (Python: `params`). + + +#### Returns + +`WeatherApiSkill` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 282. + +*** + +### defineTool + +Imperatively register a tool with this skill. + +Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. +Merges `this.swaigFields` into the tool definition (explicit fields on +`toolDef` take precedence), then pushes the result into `_dynamicTools` +so the default `getTools()` returns it at SWML render time. + +Intended for skills whose tool shape depends on config evaluated at +`setup()` time. Skills with a static tool list should override +`getTools()` instead. + +#### Signature + +```typescript +defineTool(toolDef: SkillToolDefinition): void +``` + +#### Parameters + + + The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 351. + +*** + +### getAgent + +Return the agent that owns this skill, asserting it is non-null. +Equivalent to accessing `self.agent` in Python, where the agent reference +is always set before `setup()` is called. + +The SkillManager lifecycle guarantees that `setAgent()` is called before +`setup()`, so this method is safe to use inside `setup()` and in any +tool handler invoked during an active agent session. + +#### Signature + +```typescript +getAgent(): AgentBase +``` + +#### Returns + +`AgentBase` — The owning `AgentBase` instance. + +#### Throws + +- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 261. + +*** + +### getConfig + +Get a configuration value by key, falling back to a default if not set. + +#### Signature + +```typescript +getConfig(key: string, defaultValue?: T): T +``` + +#### Type Parameters + + + +#### Parameters + + + The configuration key to look up. + + + + Value to return if the key is not present. + + +#### Returns + +`T` — The configuration value cast to type T, or the default value. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 524. + +*** + +### getDataMapTools + +Optional DataMap-style tool definitions. Skills that build their own +SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them +here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. + +Python equivalent: the direct `self.agent.register_swaig_function(fn)` +call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). +Default returns `[]` — skills using only the declarative `getTools()` path +do not need to override this. + +#### Signature + +```typescript +getDataMapTools(): Record[] +``` + +#### Returns + +`Record[]` — Array of fully-built SWAIG function dicts. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 372. + +*** + +### getGlobalData + +Get global data to merge into the agent's global data store. + +#### Signature + +```typescript +getGlobalData(): Record +``` + +#### Returns + +`Record` — Key-value pairs to be merged into the agent's global data. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 410. + +*** + +### getHints + +Get speech recognition hints relevant to this skill. + +#### Signature + +```typescript +getHints(): string[] +``` + +#### Returns + +`string[]` — Array of hint strings to improve speech recognition accuracy. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 402. + +*** + +### getInstanceKey + +Get the instance key used for deduplication in the SkillManager. + +For single-instance skills (`SUPPORTS_MULTIPLE_INSTANCES = false`), returns +the skill name. For multi-instance skills, returns `${skillName}_${toolName}` +using the `tool_name` config (falls back to the skill name). + +Matches Python's `SkillBase.get_instance_key()` default (`skill_base.py:141-146`). +Multi-instance subclasses only need to override when their key derivation +depends on config beyond `tool_name`. + +#### Signature + +```typescript +getInstanceKey(): string +``` + +#### Returns + +`string` — A unique key identifying this skill instance. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 427. + +*** + +### getParameterSchema + +Get the parameter schema for this skill class, describing all accepted configuration options. +Subclasses should override and call `super.getParameterSchema()` to include base parameters. + +Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): +returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a +`tool_name` entry with `default: cls.SKILL_NAME` for classes with +`SUPPORTS_MULTIPLE_INSTANCES = true`. + +**Modifiers:** `static` + +#### Signature + +```typescript +getParameterSchema(): Record +``` + +#### Returns + +`Record` — Record mapping parameter names to their schema entries. + +#### Source + +[`src/skills/builtin/weather_api.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/weather_api.ts) + +Line 93. + +*** + +### getPromptSections + +Get prompt sections to inject into the agent's system prompt. +Respects the `skip_prompt` config option — returns `[]` if set to `true`. +Subclasses should override `_getPromptSections()` instead of this method. + +#### Signature + +```typescript +getPromptSections(): SkillPromptSection[] +``` + +#### Returns + +`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 382. + +*** + +### getSkillData + +Read this skill's data from a raw call data object's global\_data. + +#### Signature + +```typescript +getSkillData(rawData: Record): Record +``` + +#### Parameters + + + The raw request data containing global\_data. + + +#### Returns + +`Record` — The skill's stored data, or an empty object if not found. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 450. + +*** + +### getSkillNamespace + +Get the namespaced key for storing per-skill data in global\_data. + +#### Signature + +```typescript +getSkillNamespace(): string +``` + +#### Returns + +`string` — A string like "skill:datetime" or "skill:my\_prefix". + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 440. + +*** + +### getTools + +#### Signature + +```typescript +getTools(): SkillToolDefinition[] +``` + +#### Returns + +`SkillToolDefinition[]` — A single weather tool (configurable name) that fetches current weather for a location. + +#### Source + +[`src/skills/builtin/weather_api.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/weather_api.ts) + +Line 121. + +*** + +### hasAllEnvVars + +Check if all required environment variables are present. +Convenience wrapper around `validateEnvVars()` that returns a boolean, +matching the Python `validate_env_vars() -> bool` return type. + +#### Signature + +```typescript +hasAllEnvVars(): boolean +``` + +#### Returns + +`boolean` — `true` if all required env vars are set, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 544. + +*** + +### hasAllPackages + +Check if all required packages declared in the manifest are available. +Convenience wrapper around `validatePackages()` that returns a boolean, +matching the Python `validate_packages() -> bool` return type. + +#### Signature + +```typescript +hasAllPackages(): Promise +``` + +#### Returns + +`Promise` — `true` if all required packages are importable, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 579. + +*** + +### isInitialized + +Check if the skill has been initialized by the SkillManager. + +#### Signature + +```typescript +isInitialized(): boolean +``` + +#### Returns + +`boolean` — True if setup() has completed and the skill is marked initialized. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 507. + +*** + +### markInitialized + +Mark the skill as initialized (called by SkillManager). + +#### Signature + +```typescript +markInitialized(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 514. + +*** + +### setAgent + +Set the agent reference for this skill. +Called by the SkillManager/AgentBase when the skill is attached to an agent. +Python equivalent: `self.agent = agent` in `__init__`. + +#### Signature + +```typescript +setAgent(agent: AgentBase): void +``` + +#### Parameters + + + The agent that owns this skill. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 534. + +*** + +### setup + +Validates that an API key is available either via inline config or the +`WEATHER_API_KEY` environment variable. Fails fast (returns `false`) when +neither source provides a key — matching Python SDK behaviour where +`_validate_config()` raises on construction when `api_key` is absent. + +#### Signature + +```typescript +setup(): Promise +``` + +#### Returns + +`Promise` — `true` if a key is present, `false` otherwise. + +#### Source + +[`src/skills/builtin/weather_api.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/weather_api.ts) + +Line 84. + +*** + +### updateSkillData + +Update this skill's namespaced data on a FunctionResult via updateGlobalData. + +#### Signature + +```typescript +updateSkillData( + result: FunctionResult, + data: Record +): FunctionResult +``` + +#### Parameters + + + The FunctionResult to update. + + + + The data to store under this skill's namespace. + + +#### Returns + +`FunctionResult` — The FunctionResult for chaining. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 462. + +*** + +### validateEnvVars + +Validate that all required environment variables declared on the skill class +are set in the current process environment. + +Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` +directly. TS reads the same static from the class. + +Returns the list of missing variable names so callers can produce actionable +error messages. This differs from Python's `validate_env_vars() -> bool` +return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/agents/skills/builtin/weather-api#has-all-env-vars) is the boolean equivalent. + +#### Signature + +```typescript +validateEnvVars(): string[] +``` + +#### Returns + +`string[]` — Array of missing environment variable names (empty if all are present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 486. + +*** + +### validatePackages + +Validate that all required packages declared on the skill class can be imported. + +Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` +directly and tries `importlib.import_module(pkg)` for each; TS does the +equivalent with a dynamic `import()`. + +#### Signature + +```typescript +validatePackages(): Promise +``` + +#### Returns + +`Promise` — Array of package names that could not be imported (empty if all present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - - - Fetches current weather data from OpenWeatherMap for any location worldwide. - - +Line 557. ## Functions @@ -60,4 +757,4 @@ Line 271. [`src/skills/builtin/weather_api.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/weather_api.ts) -Line 1. +Line 68. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/weather-api/weather-api-skill/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/weather-api/weather-api-skill/index.mdx deleted file mode 100644 index dcc54852c1..0000000000 --- a/fern/products/sdk-reference/typescript/agents/skills/builtin/weather-api/weather-api-skill/index.mdx +++ /dev/null @@ -1,732 +0,0 @@ ---- -slug: "/reference/typescript/agents/skills/builtin/weather-api/weather-api-skill" -title: "WeatherApiSkill" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "skills.builtin.weather_api.WeatherApiSkill" - parent: "skills.builtin.weather_api" - module: "agents.skills.builtin.weather_api" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/weather_api.ts" ---- -# `WeatherApiSkill` - -Fetches current weather data from OpenWeatherMap for any location worldwide. - -Tier 2 built-in skill. Requires the `WEATHER_API_KEY` environment variable -containing a valid OpenWeatherMap API key (obtainable at openweathermap.org). -Supports metric, imperial, and standard temperature units via the `units` -config option. The `api_key` config value takes precedence over the -environment variable when both are set. - -**Provider note:** The Python reference SDK uses WeatherAPI.com -(`api.weatherapi.com/v1/current.json`). This TypeScript skill uses -OpenWeatherMap (`api.openweathermap.org/data/2.5/weather`). These providers -use different API key formats — a WeatherAPI.com key will NOT work here. -Obtain an OpenWeatherMap key at https://openweathermap.org/api. - -**Unit aliases:** For migration compatibility with the Python SDK the `units` -config also accepts `"fahrenheit"` (normalized to `"imperial"`) and -`"celsius"` (normalized to `"metric"`). - -## Signature - -```typescript -class WeatherApiSkill extends SkillBase -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/agents/skills/skill-base) - -## Examples - -```typescript -agent.addSkill('weather_api', { units: 'imperial' }); -// or pass the key explicitly: -agent.addSkill('weather_api', { api_key: process.env.WEATHER_API_KEY }); -``` - -## Properties - - - Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. - - - - Configuration options provided at construction time. - - - - Unique identifier for this skill instance (includes timestamp and random bytes). - - - - Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. - - - - Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. - - - - Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. - - - - Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. - - - - Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. - - - - Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. - - - - The registered name of this skill type. - - - - Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. - - - - Additional SWAIG fields extracted from config, merged into tool definitions. - - -## Methods - -### cleanup - -Cleanup resources. Called when the skill is removed from an agent. - -#### Signature - -```typescript -cleanup(): Promise -``` - -#### Returns - -`Promise` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 469. - -*** - -### constructor - -Create a new skill instance. - -Python parity: `core/skill_base.py:32-43`. -Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` -is left as `None` on the subclass. TS throws the equivalent when the static -defaults haven't been overridden. - -#### Signature - -```typescript -constructor(config?: SkillConfig): WeatherApiSkill -``` - -#### Parameters - - - Optional configuration key-value pairs (Python: `params`). - - -#### Returns - -`WeatherApiSkill` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 282. - -*** - -### defineTool - -Imperatively register a tool with this skill. - -Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. -Merges `this.swaigFields` into the tool definition (explicit fields on -`toolDef` take precedence), then pushes the result into `_dynamicTools` -so the default `getTools()` returns it at SWML render time. - -Intended for skills whose tool shape depends on config evaluated at -`setup()` time. Skills with a static tool list should override -`getTools()` instead. - -#### Signature - -```typescript -defineTool(toolDef: SkillToolDefinition): void -``` - -#### Parameters - - - The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 351. - -*** - -### getAgent - -Return the agent that owns this skill, asserting it is non-null. -Equivalent to accessing `self.agent` in Python, where the agent reference -is always set before `setup()` is called. - -The SkillManager lifecycle guarantees that `setAgent()` is called before -`setup()`, so this method is safe to use inside `setup()` and in any -tool handler invoked during an active agent session. - -#### Signature - -```typescript -getAgent(): AgentBase -``` - -#### Returns - -`AgentBase` — The owning `AgentBase` instance. - -#### Throws - -- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 261. - -*** - -### getConfig - -Get a configuration value by key, falling back to a default if not set. - -#### Signature - -```typescript -getConfig(key: string, defaultValue?: T): T -``` - -#### Type Parameters - - - -#### Parameters - - - The configuration key to look up. - - - - Value to return if the key is not present. - - -#### Returns - -`T` — The configuration value cast to type T, or the default value. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 524. - -*** - -### getDataMapTools - -Optional DataMap-style tool definitions. Skills that build their own -SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them -here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. - -Python equivalent: the direct `self.agent.register_swaig_function(fn)` -call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). -Default returns `[]` — skills using only the declarative `getTools()` path -do not need to override this. - -#### Signature - -```typescript -getDataMapTools(): Record[] -``` - -#### Returns - -`Record[]` — Array of fully-built SWAIG function dicts. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 372. - -*** - -### getGlobalData - -Get global data to merge into the agent's global data store. - -#### Signature - -```typescript -getGlobalData(): Record -``` - -#### Returns - -`Record` — Key-value pairs to be merged into the agent's global data. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 410. - -*** - -### getHints - -Get speech recognition hints relevant to this skill. - -#### Signature - -```typescript -getHints(): string[] -``` - -#### Returns - -`string[]` — Array of hint strings to improve speech recognition accuracy. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 402. - -*** - -### getInstanceKey - -Get the instance key used for deduplication in the SkillManager. - -For single-instance skills (`SUPPORTS_MULTIPLE_INSTANCES = false`), returns -the skill name. For multi-instance skills, returns `${skillName}_${toolName}` -using the `tool_name` config (falls back to the skill name). - -Matches Python's `SkillBase.get_instance_key()` default (`skill_base.py:141-146`). -Multi-instance subclasses only need to override when their key derivation -depends on config beyond `tool_name`. - -#### Signature - -```typescript -getInstanceKey(): string -``` - -#### Returns - -`string` — A unique key identifying this skill instance. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 427. - -*** - -### getParameterSchema - -Get the parameter schema for this skill class, describing all accepted configuration options. -Subclasses should override and call `super.getParameterSchema()` to include base parameters. - -Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): -returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a -`tool_name` entry with `default: cls.SKILL_NAME` for classes with -`SUPPORTS_MULTIPLE_INSTANCES = true`. - -**Modifiers:** `static` - -#### Signature - -```typescript -getParameterSchema(): Record -``` - -#### Returns - -`Record` — Record mapping parameter names to their schema entries. - -#### Source - -[`src/skills/builtin/weather_api.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/weather_api.ts) - -Line 93. - -*** - -### getPromptSections - -Get prompt sections to inject into the agent's system prompt. -Respects the `skip_prompt` config option — returns `[]` if set to `true`. -Subclasses should override `_getPromptSections()` instead of this method. - -#### Signature - -```typescript -getPromptSections(): SkillPromptSection[] -``` - -#### Returns - -`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 382. - -*** - -### getSkillData - -Read this skill's data from a raw call data object's global\_data. - -#### Signature - -```typescript -getSkillData(rawData: Record): Record -``` - -#### Parameters - - - The raw request data containing global\_data. - - -#### Returns - -`Record` — The skill's stored data, or an empty object if not found. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 450. - -*** - -### getSkillNamespace - -Get the namespaced key for storing per-skill data in global\_data. - -#### Signature - -```typescript -getSkillNamespace(): string -``` - -#### Returns - -`string` — A string like "skill:datetime" or "skill:my\_prefix". - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 440. - -*** - -### getTools - -#### Signature - -```typescript -getTools(): SkillToolDefinition[] -``` - -#### Returns - -`SkillToolDefinition[]` — A single weather tool (configurable name) that fetches current weather for a location. - -#### Source - -[`src/skills/builtin/weather_api.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/weather_api.ts) - -Line 121. - -*** - -### hasAllEnvVars - -Check if all required environment variables are present. -Convenience wrapper around `validateEnvVars()` that returns a boolean, -matching the Python `validate_env_vars() -> bool` return type. - -#### Signature - -```typescript -hasAllEnvVars(): boolean -``` - -#### Returns - -`boolean` — `true` if all required env vars are set, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 544. - -*** - -### hasAllPackages - -Check if all required packages declared in the manifest are available. -Convenience wrapper around `validatePackages()` that returns a boolean, -matching the Python `validate_packages() -> bool` return type. - -#### Signature - -```typescript -hasAllPackages(): Promise -``` - -#### Returns - -`Promise` — `true` if all required packages are importable, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 579. - -*** - -### isInitialized - -Check if the skill has been initialized by the SkillManager. - -#### Signature - -```typescript -isInitialized(): boolean -``` - -#### Returns - -`boolean` — True if setup() has completed and the skill is marked initialized. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 507. - -*** - -### markInitialized - -Mark the skill as initialized (called by SkillManager). - -#### Signature - -```typescript -markInitialized(): void -``` - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 514. - -*** - -### setAgent - -Set the agent reference for this skill. -Called by the SkillManager/AgentBase when the skill is attached to an agent. -Python equivalent: `self.agent = agent` in `__init__`. - -#### Signature - -```typescript -setAgent(agent: AgentBase): void -``` - -#### Parameters - - - The agent that owns this skill. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 534. - -*** - -### setup - -Validates that an API key is available either via inline config or the -`WEATHER_API_KEY` environment variable. Fails fast (returns `false`) when -neither source provides a key — matching Python SDK behaviour where -`_validate_config()` raises on construction when `api_key` is absent. - -#### Signature - -```typescript -setup(): Promise -``` - -#### Returns - -`Promise` — `true` if a key is present, `false` otherwise. - -#### Source - -[`src/skills/builtin/weather_api.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/weather_api.ts) - -Line 84. - -*** - -### updateSkillData - -Update this skill's namespaced data on a FunctionResult via updateGlobalData. - -#### Signature - -```typescript -updateSkillData( - result: FunctionResult, - data: Record -): FunctionResult -``` - -#### Parameters - - - The FunctionResult to update. - - - - The data to store under this skill's namespace. - - -#### Returns - -`FunctionResult` — The FunctionResult for chaining. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 462. - -*** - -### validateEnvVars - -Validate that all required environment variables declared on the skill class -are set in the current process environment. - -Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` -directly. TS reads the same static from the class. - -Returns the list of missing variable names so callers can produce actionable -error messages. This differs from Python's `validate_env_vars() -> bool` -return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/agents/skills/builtin/weather-api/weather-api-skill#has-all-env-vars) is the boolean equivalent. - -#### Signature - -```typescript -validateEnvVars(): string[] -``` - -#### Returns - -`string[]` — Array of missing environment variable names (empty if all are present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 486. - -*** - -### validatePackages - -Validate that all required packages declared on the skill class can be imported. - -Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` -directly and tries `importlib.import_module(pkg)` for each; TS does the -equivalent with a dynamic `import()`. - -#### Signature - -```typescript -validatePackages(): Promise -``` - -#### Returns - -`Promise` — Array of package names that could not be imported (empty if all present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 557. - -## Source - -[`src/skills/builtin/weather_api.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/weather_api.ts) - -Line 68. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/web-search/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/web-search/index.mdx index 64c810109a..c75be72230 100644 --- a/fern/products/sdk-reference/typescript/agents/skills/builtin/web-search/index.mdx +++ b/fern/products/sdk-reference/typescript/agents/skills/builtin/web-search/index.mdx @@ -5,7 +5,7 @@ sdk_label: "TypeScript SDK" icon: "typescript" lustri: auto_generated: true - kind: "module" + kind: "class" language: "typescript" qualified_name: "skills.builtin.web_search" parent: "skills.builtin" @@ -14,19 +14,720 @@ lustri: --- # `web_search` +Searches the web using the Google Custom Search JSON API. + +Tier 3 built-in skill. Credentials can be supplied via the `api_key` and +`search_engine_id` params or `GOOGLE_SEARCH_API_KEY` / +`GOOGLE_SEARCH_ENGINE_ID` (legacy: `GOOGLE_SEARCH_CX`) environment variables. + +The handler mirrors Python's `search_and_scrape_best` pipeline: fetches +`oversample_factor × num_results` candidates from Google, scrapes each +result page (SSRF-guarded, cheerio-based text extraction), scores for +quality (length + query relevance + boilerplate penalty), deduplicates by +domain, and returns the top `num_results` above `min_quality_score` with +full page content. If every scrape fails or falls below the threshold the +handler falls back to raw API snippets so the agent still has something +to say. + +Supported config: `tool_name`, `num_results`, `no_results_message`, +`safe_search`, `delay`, `max_content_length`, `oversample_factor`, +`min_quality_score`, `response_prefix`, `response_postfix`, and the +latency-control params `per_page_timeout`, `overall_deadline`, +`parallel_scrape`, `snippets_only` (Python skill.py commits 51101da + +295745b). When the overall deadline fires or no scraped page meets the +quality threshold, the handler falls back to formatting the CSE snippets. + ## Signature ```typescript -module web_search +class WebSearchSkill extends SkillBase +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/agents/skills/skill-base) + +## Examples + +```typescript +agent.addSkill('web_search', { + api_key: process.env.GOOGLE_SEARCH_API_KEY, + search_engine_id: process.env.GOOGLE_CSE_ID, + num_results: 3, +}); +``` + +## Properties + + + Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. + + + + Configuration options provided at construction time. + + + + Unique identifier for this skill instance (includes timestamp and random bytes). + + + + Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. + + + + Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. + + + + Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. + + + + Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. + + + + Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. + + + + Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. + + + + The registered name of this skill type. + + + + Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. + + + + Additional SWAIG fields extracted from config, merged into tool definitions. + + +## Methods + +### cleanup + +Cleanup resources. Called when the skill is removed from an agent. + +#### Signature + +```typescript +cleanup(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 469. + +*** + +### constructor + +Create a new skill instance. + +Python parity: `core/skill_base.py:32-43`. +Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` +is left as `None` on the subclass. TS throws the equivalent when the static +defaults haven't been overridden. + +#### Signature + +```typescript +constructor(config?: SkillConfig): WebSearchSkill +``` + +#### Parameters + + + Optional configuration key-value pairs (Python: `params`). + + +#### Returns + +`WebSearchSkill` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 282. + +*** + +### defineTool + +Imperatively register a tool with this skill. + +Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. +Merges `this.swaigFields` into the tool definition (explicit fields on +`toolDef` take precedence), then pushes the result into `_dynamicTools` +so the default `getTools()` returns it at SWML render time. + +Intended for skills whose tool shape depends on config evaluated at +`setup()` time. Skills with a static tool list should override +`getTools()` instead. + +#### Signature + +```typescript +defineTool(toolDef: SkillToolDefinition): void +``` + +#### Parameters + + + The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 351. + +*** + +### getAgent + +Return the agent that owns this skill, asserting it is non-null. +Equivalent to accessing `self.agent` in Python, where the agent reference +is always set before `setup()` is called. + +The SkillManager lifecycle guarantees that `setAgent()` is called before +`setup()`, so this method is safe to use inside `setup()` and in any +tool handler invoked during an active agent session. + +#### Signature + +```typescript +getAgent(): AgentBase +``` + +#### Returns + +`AgentBase` — The owning `AgentBase` instance. + +#### Throws + +- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 261. + +*** + +### getConfig + +Get a configuration value by key, falling back to a default if not set. + +#### Signature + +```typescript +getConfig(key: string, defaultValue?: T): T +``` + +#### Type Parameters + + + +#### Parameters + + + The configuration key to look up. + + + + Value to return if the key is not present. + + +#### Returns + +`T` — The configuration value cast to type T, or the default value. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 524. + +*** + +### getDataMapTools + +Optional DataMap-style tool definitions. Skills that build their own +SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them +here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. + +Python equivalent: the direct `self.agent.register_swaig_function(fn)` +call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). +Default returns `[]` — skills using only the declarative `getTools()` path +do not need to override this. + +#### Signature + +```typescript +getDataMapTools(): Record[] +``` + +#### Returns + +`Record[]` — Array of fully-built SWAIG function dicts. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 372. + +*** + +### getGlobalData + +Global data injected into the agent's SWML context (mirrors Python). + +#### Signature + +```typescript +getGlobalData(): Record +``` + +#### Returns + +`Record` + +#### Source + +[`src/skills/builtin/web_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/web_search.ts) + +Line 399. + +*** + +### getHints + +Get speech recognition hints relevant to this skill. + +#### Signature + +```typescript +getHints(): string[] +``` + +#### Returns + +`string[]` — Array of hint strings to improve speech recognition accuracy. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 402. + +*** + +### getInstanceKey + +Instance key for the SkillManager. Includes the configured +`search_engine_id` (or `"default"`) and `tool_name` (or `"web_search"`) +to match Python's `"{SKILL_NAME}_{search_engine_id}_{tool_name}"` scheme. + +#### Signature + +```typescript +getInstanceKey(): string +``` + +#### Returns + +`string` + +#### Source + +[`src/skills/builtin/web_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/web_search.ts) + +Line 392. + +*** + +### getParameterSchema + +Get the parameter schema for this skill class, describing all accepted configuration options. +Subclasses should override and call `super.getParameterSchema()` to include base parameters. + +Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): +returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a +`tool_name` entry with `default: cls.SKILL_NAME` for classes with +`SUPPORTS_MULTIPLE_INSTANCES = true`. + +**Modifiers:** `static` + +#### Signature + +```typescript +getParameterSchema(): Record +``` + +#### Returns + +`Record` — Record mapping parameter names to their schema entries. + +#### Source + +[`src/skills/builtin/web_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/web_search.ts) + +Line 228. + +*** + +### getPromptSections + +Get prompt sections to inject into the agent's system prompt. +Respects the `skip_prompt` config option — returns `[]` if set to `true`. +Subclasses should override `_getPromptSections()` instead of this method. + +#### Signature + +```typescript +getPromptSections(): SkillPromptSection[] +``` + +#### Returns + +`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 382. + +*** + +### getSkillData + +Read this skill's data from a raw call data object's global\_data. + +#### Signature + +```typescript +getSkillData(rawData: Record): Record +``` + +#### Parameters + + + The raw request data containing global\_data. + + +#### Returns + +`Record` — The skill's stored data, or an empty object if not found. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 450. + +*** + +### getSkillNamespace + +Get the namespaced key for storing per-skill data in global\_data. + +#### Signature + +```typescript +getSkillNamespace(): string ``` -## Classes +#### Returns + +`string` — A string like "skill:datetime" or "skill:my\_prefix". + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 440. + +*** + +### getTools + +#### Signature + +```typescript +getTools(): SkillToolDefinition[] +``` + +#### Returns + +`SkillToolDefinition[]` — A single tool (named via `tool_name`) that performs a Google Custom Search and returns formatted results. + +#### Source + +[`src/skills/builtin/web_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/web_search.ts) + +Line 416. + +*** + +### hasAllEnvVars + +Check if all required environment variables are present. +Convenience wrapper around `validateEnvVars()` that returns a boolean, +matching the Python `validate_env_vars() -> bool` return type. + +#### Signature + +```typescript +hasAllEnvVars(): boolean +``` + +#### Returns + +`boolean` — `true` if all required env vars are set, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 544. + +*** + +### hasAllPackages + +Check if all required packages declared in the manifest are available. +Convenience wrapper around `validatePackages()` that returns a boolean, +matching the Python `validate_packages() -> bool` return type. + +#### Signature + +```typescript +hasAllPackages(): Promise +``` + +#### Returns + +`Promise` — `true` if all required packages are importable, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 579. + +*** + +### isInitialized + +Check if the skill has been initialized by the SkillManager. + +#### Signature + +```typescript +isInitialized(): boolean +``` + +#### Returns + +`boolean` — True if setup() has completed and the skill is marked initialized. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 507. + +*** + +### markInitialized + +Mark the skill as initialized (called by SkillManager). + +#### Signature + +```typescript +markInitialized(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 514. + +*** + +### setAgent + +Set the agent reference for this skill. +Called by the SkillManager/AgentBase when the skill is attached to an agent. +Python equivalent: `self.agent = agent` in `__init__`. + +#### Signature + +```typescript +setAgent(agent: AgentBase): void +``` + +#### Parameters + + + The agent that owns this skill. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 534. + +*** + +### setup + +Validate required credentials before the skill becomes active. + +Mirrors Python's `setup()` (skill.py:559-600) which checks `api_key` and +`search_engine_id` and returns `False` (logging an error) if either is +absent. In the TS SDK credentials may also arrive via environment variables +(`GOOGLE_SEARCH_API_KEY` / `GOOGLE_SEARCH_ENGINE_ID` or the legacy alias +`GOOGLE_SEARCH_CX`), so both config params and env vars are checked. + +#### Signature + +```typescript +setup(): Promise +``` + +#### Returns + +`Promise` — `true` if all required credentials are present, `false` otherwise. + +#### Source + +[`src/skills/builtin/web_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/web_search.ts) + +Line 367. + +*** + +### updateSkillData + +Update this skill's namespaced data on a FunctionResult via updateGlobalData. + +#### Signature + +```typescript +updateSkillData( + result: FunctionResult, + data: Record +): FunctionResult +``` + +#### Parameters + + + The FunctionResult to update. + + + + The data to store under this skill's namespace. + + +#### Returns + +`FunctionResult` — The FunctionResult for chaining. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 462. + +*** + +### validateEnvVars + +Validate that all required environment variables declared on the skill class +are set in the current process environment. + +Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` +directly. TS reads the same static from the class. + +Returns the list of missing variable names so callers can produce actionable +error messages. This differs from Python's `validate_env_vars() -> bool` +return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/agents/skills/builtin/web-search#has-all-env-vars) is the boolean equivalent. + +#### Signature + +```typescript +validateEnvVars(): string[] +``` + +#### Returns + +`string[]` — Array of missing environment variable names (empty if all are present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 486. + +*** + +### validatePackages + +Validate that all required packages declared on the skill class can be imported. + +Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` +directly and tries `importlib.import_module(pkg)` for each; TS does the +equivalent with a dynamic `import()`. + +#### Signature + +```typescript +validatePackages(): Promise +``` + +#### Returns + +`Promise` — Array of package names that could not be imported (empty if all present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - - - Searches the web using the Google Custom Search JSON API. - - +Line 557. ## Functions @@ -60,4 +761,4 @@ Line 1351. [`src/skills/builtin/web_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/web_search.ts) -Line 1. +Line 215. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/web-search/web-search-skill/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/web-search/web-search-skill/index.mdx deleted file mode 100644 index 51e08991e9..0000000000 --- a/fern/products/sdk-reference/typescript/agents/skills/builtin/web-search/web-search-skill/index.mdx +++ /dev/null @@ -1,736 +0,0 @@ ---- -slug: "/reference/typescript/agents/skills/builtin/web-search/web-search-skill" -title: "WebSearchSkill" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "skills.builtin.web_search.WebSearchSkill" - parent: "skills.builtin.web_search" - module: "agents.skills.builtin.web_search" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/web_search.ts" ---- -# `WebSearchSkill` - -Searches the web using the Google Custom Search JSON API. - -Tier 3 built-in skill. Credentials can be supplied via the `api_key` and -`search_engine_id` params or `GOOGLE_SEARCH_API_KEY` / -`GOOGLE_SEARCH_ENGINE_ID` (legacy: `GOOGLE_SEARCH_CX`) environment variables. - -The handler mirrors Python's `search_and_scrape_best` pipeline: fetches -`oversample_factor × num_results` candidates from Google, scrapes each -result page (SSRF-guarded, cheerio-based text extraction), scores for -quality (length + query relevance + boilerplate penalty), deduplicates by -domain, and returns the top `num_results` above `min_quality_score` with -full page content. If every scrape fails or falls below the threshold the -handler falls back to raw API snippets so the agent still has something -to say. - -Supported config: `tool_name`, `num_results`, `no_results_message`, -`safe_search`, `delay`, `max_content_length`, `oversample_factor`, -`min_quality_score`, `response_prefix`, `response_postfix`, and the -latency-control params `per_page_timeout`, `overall_deadline`, -`parallel_scrape`, `snippets_only` (Python skill.py commits 51101da + -295745b). When the overall deadline fires or no scraped page meets the -quality threshold, the handler falls back to formatting the CSE snippets. - -## Signature - -```typescript -class WebSearchSkill extends SkillBase -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/agents/skills/skill-base) - -## Examples - -```typescript -agent.addSkill('web_search', { - api_key: process.env.GOOGLE_SEARCH_API_KEY, - search_engine_id: process.env.GOOGLE_CSE_ID, - num_results: 3, -}); -``` - -## Properties - - - Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. - - - - Configuration options provided at construction time. - - - - Unique identifier for this skill instance (includes timestamp and random bytes). - - - - Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. - - - - Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. - - - - Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. - - - - Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. - - - - Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. - - - - Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. - - - - The registered name of this skill type. - - - - Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. - - - - Additional SWAIG fields extracted from config, merged into tool definitions. - - -## Methods - -### cleanup - -Cleanup resources. Called when the skill is removed from an agent. - -#### Signature - -```typescript -cleanup(): Promise -``` - -#### Returns - -`Promise` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 469. - -*** - -### constructor - -Create a new skill instance. - -Python parity: `core/skill_base.py:32-43`. -Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` -is left as `None` on the subclass. TS throws the equivalent when the static -defaults haven't been overridden. - -#### Signature - -```typescript -constructor(config?: SkillConfig): WebSearchSkill -``` - -#### Parameters - - - Optional configuration key-value pairs (Python: `params`). - - -#### Returns - -`WebSearchSkill` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 282. - -*** - -### defineTool - -Imperatively register a tool with this skill. - -Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. -Merges `this.swaigFields` into the tool definition (explicit fields on -`toolDef` take precedence), then pushes the result into `_dynamicTools` -so the default `getTools()` returns it at SWML render time. - -Intended for skills whose tool shape depends on config evaluated at -`setup()` time. Skills with a static tool list should override -`getTools()` instead. - -#### Signature - -```typescript -defineTool(toolDef: SkillToolDefinition): void -``` - -#### Parameters - - - The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 351. - -*** - -### getAgent - -Return the agent that owns this skill, asserting it is non-null. -Equivalent to accessing `self.agent` in Python, where the agent reference -is always set before `setup()` is called. - -The SkillManager lifecycle guarantees that `setAgent()` is called before -`setup()`, so this method is safe to use inside `setup()` and in any -tool handler invoked during an active agent session. - -#### Signature - -```typescript -getAgent(): AgentBase -``` - -#### Returns - -`AgentBase` — The owning `AgentBase` instance. - -#### Throws - -- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 261. - -*** - -### getConfig - -Get a configuration value by key, falling back to a default if not set. - -#### Signature - -```typescript -getConfig(key: string, defaultValue?: T): T -``` - -#### Type Parameters - - - -#### Parameters - - - The configuration key to look up. - - - - Value to return if the key is not present. - - -#### Returns - -`T` — The configuration value cast to type T, or the default value. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 524. - -*** - -### getDataMapTools - -Optional DataMap-style tool definitions. Skills that build their own -SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them -here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. - -Python equivalent: the direct `self.agent.register_swaig_function(fn)` -call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). -Default returns `[]` — skills using only the declarative `getTools()` path -do not need to override this. - -#### Signature - -```typescript -getDataMapTools(): Record[] -``` - -#### Returns - -`Record[]` — Array of fully-built SWAIG function dicts. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 372. - -*** - -### getGlobalData - -Global data injected into the agent's SWML context (mirrors Python). - -#### Signature - -```typescript -getGlobalData(): Record -``` - -#### Returns - -`Record` - -#### Source - -[`src/skills/builtin/web_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/web_search.ts) - -Line 399. - -*** - -### getHints - -Get speech recognition hints relevant to this skill. - -#### Signature - -```typescript -getHints(): string[] -``` - -#### Returns - -`string[]` — Array of hint strings to improve speech recognition accuracy. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 402. - -*** - -### getInstanceKey - -Instance key for the SkillManager. Includes the configured -`search_engine_id` (or `"default"`) and `tool_name` (or `"web_search"`) -to match Python's `"{SKILL_NAME}_{search_engine_id}_{tool_name}"` scheme. - -#### Signature - -```typescript -getInstanceKey(): string -``` - -#### Returns - -`string` - -#### Source - -[`src/skills/builtin/web_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/web_search.ts) - -Line 392. - -*** - -### getParameterSchema - -Get the parameter schema for this skill class, describing all accepted configuration options. -Subclasses should override and call `super.getParameterSchema()` to include base parameters. - -Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): -returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a -`tool_name` entry with `default: cls.SKILL_NAME` for classes with -`SUPPORTS_MULTIPLE_INSTANCES = true`. - -**Modifiers:** `static` - -#### Signature - -```typescript -getParameterSchema(): Record -``` - -#### Returns - -`Record` — Record mapping parameter names to their schema entries. - -#### Source - -[`src/skills/builtin/web_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/web_search.ts) - -Line 228. - -*** - -### getPromptSections - -Get prompt sections to inject into the agent's system prompt. -Respects the `skip_prompt` config option — returns `[]` if set to `true`. -Subclasses should override `_getPromptSections()` instead of this method. - -#### Signature - -```typescript -getPromptSections(): SkillPromptSection[] -``` - -#### Returns - -`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 382. - -*** - -### getSkillData - -Read this skill's data from a raw call data object's global\_data. - -#### Signature - -```typescript -getSkillData(rawData: Record): Record -``` - -#### Parameters - - - The raw request data containing global\_data. - - -#### Returns - -`Record` — The skill's stored data, or an empty object if not found. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 450. - -*** - -### getSkillNamespace - -Get the namespaced key for storing per-skill data in global\_data. - -#### Signature - -```typescript -getSkillNamespace(): string -``` - -#### Returns - -`string` — A string like "skill:datetime" or "skill:my\_prefix". - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 440. - -*** - -### getTools - -#### Signature - -```typescript -getTools(): SkillToolDefinition[] -``` - -#### Returns - -`SkillToolDefinition[]` — A single tool (named via `tool_name`) that performs a Google Custom Search and returns formatted results. - -#### Source - -[`src/skills/builtin/web_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/web_search.ts) - -Line 416. - -*** - -### hasAllEnvVars - -Check if all required environment variables are present. -Convenience wrapper around `validateEnvVars()` that returns a boolean, -matching the Python `validate_env_vars() -> bool` return type. - -#### Signature - -```typescript -hasAllEnvVars(): boolean -``` - -#### Returns - -`boolean` — `true` if all required env vars are set, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 544. - -*** - -### hasAllPackages - -Check if all required packages declared in the manifest are available. -Convenience wrapper around `validatePackages()` that returns a boolean, -matching the Python `validate_packages() -> bool` return type. - -#### Signature - -```typescript -hasAllPackages(): Promise -``` - -#### Returns - -`Promise` — `true` if all required packages are importable, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 579. - -*** - -### isInitialized - -Check if the skill has been initialized by the SkillManager. - -#### Signature - -```typescript -isInitialized(): boolean -``` - -#### Returns - -`boolean` — True if setup() has completed and the skill is marked initialized. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 507. - -*** - -### markInitialized - -Mark the skill as initialized (called by SkillManager). - -#### Signature - -```typescript -markInitialized(): void -``` - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 514. - -*** - -### setAgent - -Set the agent reference for this skill. -Called by the SkillManager/AgentBase when the skill is attached to an agent. -Python equivalent: `self.agent = agent` in `__init__`. - -#### Signature - -```typescript -setAgent(agent: AgentBase): void -``` - -#### Parameters - - - The agent that owns this skill. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 534. - -*** - -### setup - -Validate required credentials before the skill becomes active. - -Mirrors Python's `setup()` (skill.py:559-600) which checks `api_key` and -`search_engine_id` and returns `False` (logging an error) if either is -absent. In the TS SDK credentials may also arrive via environment variables -(`GOOGLE_SEARCH_API_KEY` / `GOOGLE_SEARCH_ENGINE_ID` or the legacy alias -`GOOGLE_SEARCH_CX`), so both config params and env vars are checked. - -#### Signature - -```typescript -setup(): Promise -``` - -#### Returns - -`Promise` — `true` if all required credentials are present, `false` otherwise. - -#### Source - -[`src/skills/builtin/web_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/web_search.ts) - -Line 367. - -*** - -### updateSkillData - -Update this skill's namespaced data on a FunctionResult via updateGlobalData. - -#### Signature - -```typescript -updateSkillData( - result: FunctionResult, - data: Record -): FunctionResult -``` - -#### Parameters - - - The FunctionResult to update. - - - - The data to store under this skill's namespace. - - -#### Returns - -`FunctionResult` — The FunctionResult for chaining. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 462. - -*** - -### validateEnvVars - -Validate that all required environment variables declared on the skill class -are set in the current process environment. - -Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` -directly. TS reads the same static from the class. - -Returns the list of missing variable names so callers can produce actionable -error messages. This differs from Python's `validate_env_vars() -> bool` -return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/agents/skills/builtin/web-search/web-search-skill#has-all-env-vars) is the boolean equivalent. - -#### Signature - -```typescript -validateEnvVars(): string[] -``` - -#### Returns - -`string[]` — Array of missing environment variable names (empty if all are present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 486. - -*** - -### validatePackages - -Validate that all required packages declared on the skill class can be imported. - -Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` -directly and tries `importlib.import_module(pkg)` for each; TS does the -equivalent with a dynamic `import()`. - -#### Signature - -```typescript -validatePackages(): Promise -``` - -#### Returns - -`Promise` — Array of package names that could not be imported (empty if all present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 557. - -## Source - -[`src/skills/builtin/web_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/web_search.ts) - -Line 215. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/wikipedia-search/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/wikipedia-search/index.mdx index 95424165e2..97273227da 100644 --- a/fern/products/sdk-reference/typescript/agents/skills/builtin/wikipedia-search/index.mdx +++ b/fern/products/sdk-reference/typescript/agents/skills/builtin/wikipedia-search/index.mdx @@ -5,7 +5,7 @@ sdk_label: "TypeScript SDK" icon: "typescript" lustri: auto_generated: true - kind: "module" + kind: "class" language: "typescript" qualified_name: "skills.builtin.wikipedia_search" parent: "skills.builtin" @@ -14,19 +14,742 @@ lustri: --- # `wikipedia_search` +Searches Wikipedia for article summaries and extracts. + +Tier 3 built-in skill with no external API key required. The configured +`num_results` drives how many articles are aggregated; `no_results_message` +customizes the fallback text (supports `{query}` interpolation). + ## Signature ```typescript -module wikipedia_search +class WikipediaSearchSkill extends SkillBase +``` + +## Inheritance + +**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/agents/skills/skill-base) + +## Examples + +```typescript +agent.addSkill('wikipedia_search', { num_results: 2 }); +``` + +## Properties + + + Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. + + + + Configuration options provided at construction time. + + + + Unique identifier for this skill instance (includes timestamp and random bytes). + + + + Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. + + + + Resolved `no_results_message` template (populated in `setup()`). Protected to mirror Python's `self.no_results_message` public visibility within the class hierarchy. + + + + Resolved `num_results` value (populated in `setup()`). Public to mirror Python's `self.num_results` — accessible to subclasses and external test code inspecting skill state. + + + + Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. + + + + Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. + + + + Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. + + + + Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. + + + + Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. + + + + The registered name of this skill type. + + + + Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. + + + + Additional SWAIG fields extracted from config, merged into tool definitions. + + +## Methods + +### cleanup + +Cleanup resources. Called when the skill is removed from an agent. + +#### Signature + +```typescript +cleanup(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 469. + +*** + +### constructor + +Create a new skill instance. + +Python parity: `core/skill_base.py:32-43`. +Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` +is left as `None` on the subclass. TS throws the equivalent when the static +defaults haven't been overridden. + +#### Signature + +```typescript +constructor(config?: SkillConfig): WikipediaSearchSkill +``` + +#### Parameters + + + Optional configuration key-value pairs (Python: `params`). + + +#### Returns + +`WikipediaSearchSkill` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 282. + +*** + +### defineTool + +Imperatively register a tool with this skill. + +Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. +Merges `this.swaigFields` into the tool definition (explicit fields on +`toolDef` take precedence), then pushes the result into `_dynamicTools` +so the default `getTools()` returns it at SWML render time. + +Intended for skills whose tool shape depends on config evaluated at +`setup()` time. Skills with a static tool list should override +`getTools()` instead. + +#### Signature + +```typescript +defineTool(toolDef: SkillToolDefinition): void +``` + +#### Parameters + + + The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 351. + +*** + +### getAgent + +Return the agent that owns this skill, asserting it is non-null. +Equivalent to accessing `self.agent` in Python, where the agent reference +is always set before `setup()` is called. + +The SkillManager lifecycle guarantees that `setAgent()` is called before +`setup()`, so this method is safe to use inside `setup()` and in any +tool handler invoked during an active agent session. + +#### Signature + +```typescript +getAgent(): AgentBase +``` + +#### Returns + +`AgentBase` — The owning `AgentBase` instance. + +#### Throws + +- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 261. + +*** + +### getConfig + +Get a configuration value by key, falling back to a default if not set. + +#### Signature + +```typescript +getConfig(key: string, defaultValue?: T): T +``` + +#### Type Parameters + + + +#### Parameters + + + The configuration key to look up. + + + + Value to return if the key is not present. + + +#### Returns + +`T` — The configuration value cast to type T, or the default value. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 524. + +*** + +### getDataMapTools + +Optional DataMap-style tool definitions. Skills that build their own +SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them +here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. + +Python equivalent: the direct `self.agent.register_swaig_function(fn)` +call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). +Default returns `[]` — skills using only the declarative `getTools()` path +do not need to override this. + +#### Signature + +```typescript +getDataMapTools(): Record[] +``` + +#### Returns + +`Record[]` — Array of fully-built SWAIG function dicts. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 372. + +*** + +### getGlobalData + +Get global data to merge into the agent's global data store. + +#### Signature + +```typescript +getGlobalData(): Record +``` + +#### Returns + +`Record` — Key-value pairs to be merged into the agent's global data. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 410. + +*** + +### getHints + +Get speech recognition hints relevant to this skill. + +#### Signature + +```typescript +getHints(): string[] +``` + +#### Returns + +`string[]` — Array of hint strings to improve speech recognition accuracy. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 402. + +*** + +### getInstanceKey + +Get the instance key used for deduplication in the SkillManager. + +For single-instance skills (`SUPPORTS_MULTIPLE_INSTANCES = false`), returns +the skill name. For multi-instance skills, returns `${skillName}_${toolName}` +using the `tool_name` config (falls back to the skill name). + +Matches Python's `SkillBase.get_instance_key()` default (`skill_base.py:141-146`). +Multi-instance subclasses only need to override when their key derivation +depends on config beyond `tool_name`. + +#### Signature + +```typescript +getInstanceKey(): string +``` + +#### Returns + +`string` — A unique key identifying this skill instance. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 427. + +*** + +### getParameterSchema + +Get the parameter schema for this skill class, describing all accepted configuration options. +Subclasses should override and call `super.getParameterSchema()` to include base parameters. + +Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): +returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a +`tool_name` entry with `default: cls.SKILL_NAME` for classes with +`SUPPORTS_MULTIPLE_INSTANCES = true`. + +**Modifiers:** `static` + +#### Signature + +```typescript +getParameterSchema(): Record +``` + +#### Returns + +`Record` — Record mapping parameter names to their schema entries. + +#### Source + +[`src/skills/builtin/wikipedia_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/wikipedia_search.ts) + +Line 79. + +*** + +### getPromptSections + +Get prompt sections to inject into the agent's system prompt. +Respects the `skip_prompt` config option — returns `[]` if set to `true`. +Subclasses should override `_getPromptSections()` instead of this method. + +#### Signature + +```typescript +getPromptSections(): SkillPromptSection[] ``` -## Classes +#### Returns + +`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 382. + +*** + +### getSkillData + +Read this skill's data from a raw call data object's global\_data. + +#### Signature + +```typescript +getSkillData(rawData: Record): Record +``` + +#### Parameters + + + The raw request data containing global\_data. + + +#### Returns + +`Record` — The skill's stored data, or an empty object if not found. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 450. + +*** + +### getSkillNamespace + +Get the namespaced key for storing per-skill data in global\_data. + +#### Signature + +```typescript +getSkillNamespace(): string +``` + +#### Returns + +`string` — A string like "skill:datetime" or "skill:my\_prefix". + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 440. + +*** + +### getTools + +#### Signature + +```typescript +getTools(): SkillToolDefinition[] +``` + +#### Returns + +`SkillToolDefinition[]` — A `search_wiki` tool that fetches article summaries from Wikipedia. + +#### Source + +[`src/skills/builtin/wikipedia_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/wikipedia_search.ts) + +Line 122. + +*** + +### hasAllEnvVars + +Check if all required environment variables are present. +Convenience wrapper around `validateEnvVars()` that returns a boolean, +matching the Python `validate_env_vars() -> bool` return type. + +#### Signature + +```typescript +hasAllEnvVars(): boolean +``` + +#### Returns + +`boolean` — `true` if all required env vars are set, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 544. + +*** + +### hasAllPackages + +Check if all required packages declared in the manifest are available. +Convenience wrapper around `validatePackages()` that returns a boolean, +matching the Python `validate_packages() -> bool` return type. + +#### Signature + +```typescript +hasAllPackages(): Promise +``` + +#### Returns + +`Promise` — `true` if all required packages are importable, `false` otherwise. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 579. + +*** + +### isInitialized + +Check if the skill has been initialized by the SkillManager. + +#### Signature + +```typescript +isInitialized(): boolean +``` + +#### Returns + +`boolean` — True if setup() has completed and the skill is marked initialized. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 507. + +*** + +### markInitialized + +Mark the skill as initialized (called by SkillManager). + +#### Signature + +```typescript +markInitialized(): void +``` + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 514. + +*** + +### searchWiki + +Search Wikipedia and return a formatted text summary. + +Mirrors the Python `search_wiki()` public entry point so the logic can be +tested and reused outside the SWAIG handler. Uses `num_results` to decide +how many articles to aggregate. + +#### Signature + +```typescript +searchWiki(query: string): Promise +``` + +#### Parameters + + + Plain-text search term. + + +#### Returns + +`Promise` — Formatted text ready for display to the caller. + +#### Source + +[`src/skills/builtin/wikipedia_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/wikipedia_search.ts) + +Line 166. + +*** + +### setAgent + +Set the agent reference for this skill. +Called by the SkillManager/AgentBase when the skill is attached to an agent. +Python equivalent: `self.agent = agent` in `__init__`. + +#### Signature + +```typescript +setAgent(agent: AgentBase): void +``` + +#### Parameters + + + The agent that owns this skill. + + +#### Returns + +`void` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 534. + +*** + +### setup + +Extract config values into instance state. Enforces `num_results >= 1` +(matching Python `skill.py:_setup` `max(1, ...)` floor). The schema's +`max: 5` handles the upper bound at validation time — no runtime clamp +here, so callers passing larger values get the raw value as in Python. + +#### Signature + +```typescript +setup(): Promise +``` + +#### Returns + +`Promise` + +#### Source + +[`src/skills/builtin/wikipedia_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/wikipedia_search.ts) + +Line 103. + +*** + +### updateSkillData + +Update this skill's namespaced data on a FunctionResult via updateGlobalData. + +#### Signature + +```typescript +updateSkillData( + result: FunctionResult, + data: Record +): FunctionResult +``` + +#### Parameters + + + The FunctionResult to update. + + + + The data to store under this skill's namespace. + + +#### Returns + +`FunctionResult` — The FunctionResult for chaining. + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 462. + +*** + +### validateEnvVars + +Validate that all required environment variables declared on the skill class +are set in the current process environment. + +Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` +directly. TS reads the same static from the class. + +Returns the list of missing variable names so callers can produce actionable +error messages. This differs from Python's `validate_env_vars() -> bool` +return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/agents/skills/builtin/wikipedia-search#has-all-env-vars) is the boolean equivalent. + +#### Signature + +```typescript +validateEnvVars(): string[] +``` + +#### Returns + +`string[]` — Array of missing environment variable names (empty if all are present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 486. + +*** + +### validatePackages + +Validate that all required packages declared on the skill class can be imported. + +Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` +directly and tries `importlib.import_module(pkg)` for each; TS does the +equivalent with a dynamic `import()`. + +#### Signature + +```typescript +validatePackages(): Promise +``` + +#### Returns + +`Promise` — Array of package names that could not be imported (empty if all present). + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - - - Searches Wikipedia for article summaries and extracts. - - +Line 557. ## Functions @@ -60,4 +783,4 @@ Line 318. [`src/skills/builtin/wikipedia_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/wikipedia_search.ts) -Line 1. +Line 55. diff --git a/fern/products/sdk-reference/typescript/agents/skills/builtin/wikipedia-search/wikipedia-search-skill/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/builtin/wikipedia-search/wikipedia-search-skill/index.mdx deleted file mode 100644 index 17f86e9906..0000000000 --- a/fern/products/sdk-reference/typescript/agents/skills/builtin/wikipedia-search/wikipedia-search-skill/index.mdx +++ /dev/null @@ -1,758 +0,0 @@ ---- -slug: "/reference/typescript/agents/skills/builtin/wikipedia-search/wikipedia-search-skill" -title: "WikipediaSearchSkill" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "skills.builtin.wikipedia_search.WikipediaSearchSkill" - parent: "skills.builtin.wikipedia_search" - module: "agents.skills.builtin.wikipedia_search" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/wikipedia_search.ts" ---- -# `WikipediaSearchSkill` - -Searches Wikipedia for article summaries and extracts. - -Tier 3 built-in skill with no external API key required. The configured -`num_results` drives how many articles are aggregated; `no_results_message` -customizes the fallback text (supports `{query}` interpolation). - -## Signature - -```typescript -class WikipediaSearchSkill extends SkillBase -``` - -## Inheritance - -**Extends:** [SkillBase](/docs/sdk-reference/reference/typescript/agents/skills/skill-base) - -## Examples - -```typescript -agent.addSkill('wikipedia_search', { num_results: 2 }); -``` - -## Properties - - - Reference to the agent that owns this skill. Set via `setAgent()` when the skill is added to an agent. Python equivalent: `self.agent` (set in `__init__`). In the Python SDK `agent` is always non-null because it is injected in the constructor. In the TypeScript SDK the SkillManager always calls `setAgent()` before `setup()`, so subclasses can rely on `getAgent()` being safe to call inside `setup()` and any method invoked after it. - - - - Configuration options provided at construction time. - - - - Unique identifier for this skill instance (includes timestamp and random bytes). - - - - Logger scoped to this skill. Python equivalent: `self.logger = get_logger(...)` set in `SkillBase.__init__` so every subclass can call `self.logger.info(...)`. - - - - Resolved `no_results_message` template (populated in `setup()`). Protected to mirror Python's `self.no_results_message` public visibility within the class hierarchy. - - - - Resolved `num_results` value (populated in `setup()`). Public to mirror Python's `self.num_results` — accessible to subclasses and external test code inspecting skill state. - - - - Environment variables required for the skill to function, checked at load time by `validateEnvVars()`. Python parity: `REQUIRED_ENV_VARS: List[str] = []` at `core/skill_base.py:27`. - - - - Packages required by the skill, checked at load time by `validatePackages()`. Python parity: `REQUIRED_PACKAGES: List[str] = []` at `core/skill_base.py:26`. In TS these are npm package names importable via dynamic `import()`. - - - - Human-readable description of the skill. Subclasses MUST override. Python parity: `SKILL_DESCRIPTION: str = None` at `core/skill_base.py:24`. - - - - Unique skill name. Subclasses MUST override with a non-empty string. Python parity: `SKILL_NAME: str = None` at `core/skill_base.py:23`. Python raises `ValueError` in `__init__` when this is left as `None`; TS throws at construction when this is left as the empty default. - - - - Semantic version string. Subclasses may override; defaults to `"1.0.0"`. Python parity: `SKILL_VERSION: str = "1.0.0"` at `core/skill_base.py:25`. - - - - The registered name of this skill type. - - - - Whether this skill type supports multiple simultaneous instances (e.g., with different tool\_name). Python parity: `SUPPORTS_MULTIPLE_INSTANCES: bool = False` at `core/skill_base.py:30`. - - - - Additional SWAIG fields extracted from config, merged into tool definitions. - - -## Methods - -### cleanup - -Cleanup resources. Called when the skill is removed from an agent. - -#### Signature - -```typescript -cleanup(): Promise -``` - -#### Returns - -`Promise` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 469. - -*** - -### constructor - -Create a new skill instance. - -Python parity: `core/skill_base.py:32-43`. -Python `__init__` raises `ValueError` if `SKILL_NAME` or `SKILL_DESCRIPTION` -is left as `None` on the subclass. TS throws the equivalent when the static -defaults haven't been overridden. - -#### Signature - -```typescript -constructor(config?: SkillConfig): WikipediaSearchSkill -``` - -#### Parameters - - - Optional configuration key-value pairs (Python: `params`). - - -#### Returns - -`WikipediaSearchSkill` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 282. - -*** - -### defineTool - -Imperatively register a tool with this skill. - -Python parity: `core/skill_base.py:58` `def define_tool(self, **kwargs)`. -Merges `this.swaigFields` into the tool definition (explicit fields on -`toolDef` take precedence), then pushes the result into `_dynamicTools` -so the default `getTools()` returns it at SWML render time. - -Intended for skills whose tool shape depends on config evaluated at -`setup()` time. Skills with a static tool list should override -`getTools()` instead. - -#### Signature - -```typescript -defineTool(toolDef: SkillToolDefinition): void -``` - -#### Parameters - - - The tool definition to register. Must include at minimum `name`, `description`, `parameters`, and `handler`. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 351. - -*** - -### getAgent - -Return the agent that owns this skill, asserting it is non-null. -Equivalent to accessing `self.agent` in Python, where the agent reference -is always set before `setup()` is called. - -The SkillManager lifecycle guarantees that `setAgent()` is called before -`setup()`, so this method is safe to use inside `setup()` and in any -tool handler invoked during an active agent session. - -#### Signature - -```typescript -getAgent(): AgentBase -``` - -#### Returns - -`AgentBase` — The owning `AgentBase` instance. - -#### Throws - -- If called before `setAgent()` (i.e., before the skill is attached to an agent by the SkillManager). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 261. - -*** - -### getConfig - -Get a configuration value by key, falling back to a default if not set. - -#### Signature - -```typescript -getConfig(key: string, defaultValue?: T): T -``` - -#### Type Parameters - - - -#### Parameters - - - The configuration key to look up. - - - - Value to return if the key is not present. - - -#### Returns - -`T` — The configuration value cast to type T, or the default value. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 524. - -*** - -### getDataMapTools - -Optional DataMap-style tool definitions. Skills that build their own -SWAIG function dicts (e.g. via `DataMap.toSwaigFunction()`) return them -here and `AgentBase.addSkill()` registers each via `registerSwaigFunction`. - -Python equivalent: the direct `self.agent.register_swaig_function(fn)` -call inside `register_tools()` (e.g. `skills/datasphere_serverless/skill.py:210`). -Default returns `[]` — skills using only the declarative `getTools()` path -do not need to override this. - -#### Signature - -```typescript -getDataMapTools(): Record[] -``` - -#### Returns - -`Record[]` — Array of fully-built SWAIG function dicts. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 372. - -*** - -### getGlobalData - -Get global data to merge into the agent's global data store. - -#### Signature - -```typescript -getGlobalData(): Record -``` - -#### Returns - -`Record` — Key-value pairs to be merged into the agent's global data. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 410. - -*** - -### getHints - -Get speech recognition hints relevant to this skill. - -#### Signature - -```typescript -getHints(): string[] -``` - -#### Returns - -`string[]` — Array of hint strings to improve speech recognition accuracy. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 402. - -*** - -### getInstanceKey - -Get the instance key used for deduplication in the SkillManager. - -For single-instance skills (`SUPPORTS_MULTIPLE_INSTANCES = false`), returns -the skill name. For multi-instance skills, returns `${skillName}_${toolName}` -using the `tool_name` config (falls back to the skill name). - -Matches Python's `SkillBase.get_instance_key()` default (`skill_base.py:141-146`). -Multi-instance subclasses only need to override when their key derivation -depends on config beyond `tool_name`. - -#### Signature - -```typescript -getInstanceKey(): string -``` - -#### Returns - -`string` — A unique key identifying this skill instance. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 427. - -*** - -### getParameterSchema - -Get the parameter schema for this skill class, describing all accepted configuration options. -Subclasses should override and call `super.getParameterSchema()` to include base parameters. - -Mirrors Python's `SkillBase.get_parameter_schema()` (skill\_base.py:197-266): -returns `swaig_fields` + `skip_prompt` for all skills, and additionally adds a -`tool_name` entry with `default: cls.SKILL_NAME` for classes with -`SUPPORTS_MULTIPLE_INSTANCES = true`. - -**Modifiers:** `static` - -#### Signature - -```typescript -getParameterSchema(): Record -``` - -#### Returns - -`Record` — Record mapping parameter names to their schema entries. - -#### Source - -[`src/skills/builtin/wikipedia_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/wikipedia_search.ts) - -Line 79. - -*** - -### getPromptSections - -Get prompt sections to inject into the agent's system prompt. -Respects the `skip_prompt` config option — returns `[]` if set to `true`. -Subclasses should override `_getPromptSections()` instead of this method. - -#### Signature - -```typescript -getPromptSections(): SkillPromptSection[] -``` - -#### Returns - -`SkillPromptSection[]` — Array of prompt sections with titles, bodies, and bullets. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 382. - -*** - -### getSkillData - -Read this skill's data from a raw call data object's global\_data. - -#### Signature - -```typescript -getSkillData(rawData: Record): Record -``` - -#### Parameters - - - The raw request data containing global\_data. - - -#### Returns - -`Record` — The skill's stored data, or an empty object if not found. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 450. - -*** - -### getSkillNamespace - -Get the namespaced key for storing per-skill data in global\_data. - -#### Signature - -```typescript -getSkillNamespace(): string -``` - -#### Returns - -`string` — A string like "skill:datetime" or "skill:my\_prefix". - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 440. - -*** - -### getTools - -#### Signature - -```typescript -getTools(): SkillToolDefinition[] -``` - -#### Returns - -`SkillToolDefinition[]` — A `search_wiki` tool that fetches article summaries from Wikipedia. - -#### Source - -[`src/skills/builtin/wikipedia_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/wikipedia_search.ts) - -Line 122. - -*** - -### hasAllEnvVars - -Check if all required environment variables are present. -Convenience wrapper around `validateEnvVars()` that returns a boolean, -matching the Python `validate_env_vars() -> bool` return type. - -#### Signature - -```typescript -hasAllEnvVars(): boolean -``` - -#### Returns - -`boolean` — `true` if all required env vars are set, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 544. - -*** - -### hasAllPackages - -Check if all required packages declared in the manifest are available. -Convenience wrapper around `validatePackages()` that returns a boolean, -matching the Python `validate_packages() -> bool` return type. - -#### Signature - -```typescript -hasAllPackages(): Promise -``` - -#### Returns - -`Promise` — `true` if all required packages are importable, `false` otherwise. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 579. - -*** - -### isInitialized - -Check if the skill has been initialized by the SkillManager. - -#### Signature - -```typescript -isInitialized(): boolean -``` - -#### Returns - -`boolean` — True if setup() has completed and the skill is marked initialized. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 507. - -*** - -### markInitialized - -Mark the skill as initialized (called by SkillManager). - -#### Signature - -```typescript -markInitialized(): void -``` - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 514. - -*** - -### searchWiki - -Search Wikipedia and return a formatted text summary. - -Mirrors the Python `search_wiki()` public entry point so the logic can be -tested and reused outside the SWAIG handler. Uses `num_results` to decide -how many articles to aggregate. - -#### Signature - -```typescript -searchWiki(query: string): Promise -``` - -#### Parameters - - - Plain-text search term. - - -#### Returns - -`Promise` — Formatted text ready for display to the caller. - -#### Source - -[`src/skills/builtin/wikipedia_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/wikipedia_search.ts) - -Line 166. - -*** - -### setAgent - -Set the agent reference for this skill. -Called by the SkillManager/AgentBase when the skill is attached to an agent. -Python equivalent: `self.agent = agent` in `__init__`. - -#### Signature - -```typescript -setAgent(agent: AgentBase): void -``` - -#### Parameters - - - The agent that owns this skill. - - -#### Returns - -`void` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 534. - -*** - -### setup - -Extract config values into instance state. Enforces `num_results >= 1` -(matching Python `skill.py:_setup` `max(1, ...)` floor). The schema's -`max: 5` handles the upper bound at validation time — no runtime clamp -here, so callers passing larger values get the raw value as in Python. - -#### Signature - -```typescript -setup(): Promise -``` - -#### Returns - -`Promise` - -#### Source - -[`src/skills/builtin/wikipedia_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/wikipedia_search.ts) - -Line 103. - -*** - -### updateSkillData - -Update this skill's namespaced data on a FunctionResult via updateGlobalData. - -#### Signature - -```typescript -updateSkillData( - result: FunctionResult, - data: Record -): FunctionResult -``` - -#### Parameters - - - The FunctionResult to update. - - - - The data to store under this skill's namespace. - - -#### Returns - -`FunctionResult` — The FunctionResult for chaining. - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 462. - -*** - -### validateEnvVars - -Validate that all required environment variables declared on the skill class -are set in the current process environment. - -Python parity: `core/skill_base.py:103-110` reads `self.REQUIRED_ENV_VARS` -directly. TS reads the same static from the class. - -Returns the list of missing variable names so callers can produce actionable -error messages. This differs from Python's `validate_env_vars() -> bool` -return shape; [hasAllEnvVars](/docs/sdk-reference/reference/typescript/agents/skills/builtin/wikipedia-search/wikipedia-search-skill#has-all-env-vars) is the boolean equivalent. - -#### Signature - -```typescript -validateEnvVars(): string[] -``` - -#### Returns - -`string[]` — Array of missing environment variable names (empty if all are present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 486. - -*** - -### validatePackages - -Validate that all required packages declared on the skill class can be imported. - -Python parity: `core/skill_base.py:112-124` reads `self.REQUIRED_PACKAGES` -directly and tries `importlib.import_module(pkg)` for each; TS does the -equivalent with a dynamic `import()`. - -#### Signature - -```typescript -validatePackages(): Promise -``` - -#### Returns - -`Promise` — Array of package names that could not be imported (empty if all present). - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 557. - -## Source - -[`src/skills/builtin/wikipedia_search.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/builtin/wikipedia_search.ts) - -Line 55. diff --git a/fern/products/sdk-reference/typescript/agents/skills/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/index.mdx index 4cadd08b5f..4e67ea95b1 100644 --- a/fern/products/sdk-reference/typescript/agents/skills/index.mdx +++ b/fern/products/sdk-reference/typescript/agents/skills/index.mdx @@ -41,11 +41,7 @@ module skills - - - - ## Source diff --git a/fern/products/sdk-reference/typescript/agents/skills/skill-base/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/skill-base/index.mdx index 4781f149b9..42022bae5d 100644 --- a/fern/products/sdk-reference/typescript/agents/skills/skill-base/index.mdx +++ b/fern/products/sdk-reference/typescript/agents/skills/skill-base/index.mdx @@ -750,6 +750,180 @@ validatePackages(): Promise Line 557. +## Interfaces + +### ParameterSchemaEntry + +Schema entry describing a single skill configuration parameter. + +#### Signature + +```typescript +interface ParameterSchemaEntry +``` + +#### Properties + + + Default value used when the parameter is not provided. + + + + Human-readable description of the parameter. + + + + Allowed values for the parameter. + + + + Environment variable that can supply this parameter's value. + + + + Whether the parameter should be hidden from user-facing output (e.g., API keys). + + + + Item schema for array-type parameters. + + + + Maximum value (for numeric types). + + + + Minimum value (for numeric types). + + + + Whether the parameter must be supplied. + + + + JSON Schema type of the parameter value. + + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 61. + +*** + +### SkillConfig + +Configuration key-value pairs passed to a skill at construction time. + +#### Signature + +```typescript +interface SkillConfig +``` + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 15. + +*** + +### SkillPromptSection + +A section of prompt content injected into the agent's system prompt by a skill. + +#### Signature + +```typescript +interface SkillPromptSection +``` + +#### Properties + + + Optional body text for the section. + + + + Optional bullet points appended after the body. + + + + If true, render bullets as a numbered list instead of unordered. + + + + Section heading displayed in the prompt. + + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 49. + +*** + +### SkillToolDefinition + +Definition of a SWAIG tool provided by a skill. + +#### Signature + +```typescript +interface SkillToolDefinition +``` + +#### Properties + + + Human-readable description of what the tool does, shown to the AI. + + + + Filler phrases spoken while the tool executes, keyed by language. + + + + Handler function invoked when the tool is called. + + + + When true, the SignalWire platform automatically invokes this tool when the call ends (hangup), regardless of whether the AI explicitly calls it. Equivalent to Python's `is_hangup_hook=True` in `define_tool()`. The flag is serialised as `"is_hangup_hook": true` in the SWAIG JSON. + + + + Unique tool name used in SWAIG function registration. + + + + Parameter schema for the tool, keyed by parameter name. + + + + List of parameter names that are required. + + + + Whether the tool requires secure (authenticated) invocation. + + + + If true, suppress filler phrases while the tool executes. + + + + If true, wait for any in-flight fillers to complete before executing the tool. + + +#### Source + +[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) + +Line 20. + ## Source [`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) diff --git a/fern/products/sdk-reference/typescript/agents/skills/skill-base/index__2.mdx b/fern/products/sdk-reference/typescript/agents/skills/skill-base/index__2.mdx deleted file mode 100644 index db801ae293..0000000000 --- a/fern/products/sdk-reference/typescript/agents/skills/skill-base/index__2.mdx +++ /dev/null @@ -1,188 +0,0 @@ ---- -slug: "/reference/typescript/agents/skills/skill-base/index__2" -title: "SkillBase" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "module" - language: "typescript" - qualified_name: "agents.skills.SkillBase" - parent: "skills" - module: "agents.skills" ---- -# `SkillBase` - -## Interfaces - -### ParameterSchemaEntry - -Schema entry describing a single skill configuration parameter. - -#### Signature - -```typescript -interface ParameterSchemaEntry -``` - -#### Properties - - - Default value used when the parameter is not provided. - - - - Human-readable description of the parameter. - - - - Allowed values for the parameter. - - - - Environment variable that can supply this parameter's value. - - - - Whether the parameter should be hidden from user-facing output (e.g., API keys). - - - - Item schema for array-type parameters. - - - - Maximum value (for numeric types). - - - - Minimum value (for numeric types). - - - - Whether the parameter must be supplied. - - - - JSON Schema type of the parameter value. - - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 61. - -*** - -### SkillConfig - -Configuration key-value pairs passed to a skill at construction time. - -#### Signature - -```typescript -interface SkillConfig -``` - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 15. - -*** - -### SkillPromptSection - -A section of prompt content injected into the agent's system prompt by a skill. - -#### Signature - -```typescript -interface SkillPromptSection -``` - -#### Properties - - - Optional body text for the section. - - - - Optional bullet points appended after the body. - - - - If true, render bullets as a numbered list instead of unordered. - - - - Section heading displayed in the prompt. - - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 49. - -*** - -### SkillToolDefinition - -Definition of a SWAIG tool provided by a skill. - -#### Signature - -```typescript -interface SkillToolDefinition -``` - -#### Properties - - - Human-readable description of what the tool does, shown to the AI. - - - - Filler phrases spoken while the tool executes, keyed by language. - - - - Handler function invoked when the tool is called. - - - - When true, the SignalWire platform automatically invokes this tool when the call ends (hangup), regardless of whether the AI explicitly calls it. Equivalent to Python's `is_hangup_hook=True` in `define_tool()`. The flag is serialised as `"is_hangup_hook": true` in the SWAIG JSON. - - - - Unique tool name used in SWAIG function registration. - - - - Parameter schema for the tool, keyed by parameter name. - - - - List of parameter names that are required. - - - - Whether the tool requires secure (authenticated) invocation. - - - - If true, suppress filler phrases while the tool executes. - - - - If true, wait for any in-flight fillers to complete before executing the tool. - - -#### Source - -[`src/skills/SkillBase.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillBase.ts) - -Line 20. diff --git a/fern/products/sdk-reference/typescript/agents/skills/skill-registry/index.mdx b/fern/products/sdk-reference/typescript/agents/skills/skill-registry/index.mdx index f50c3cfc6a..c180fb56b5 100644 --- a/fern/products/sdk-reference/typescript/agents/skills/skill-registry/index.mdx +++ b/fern/products/sdk-reference/typescript/agents/skills/skill-registry/index.mdx @@ -255,7 +255,7 @@ Line 372. ### getExternalPaths Returns a copy of the external skill directories registered via -[addSkillDirectory](/docs/sdk-reference/reference/typescript/add-skill-directory). Parity surface for Python's +[addSkillDirectory](/docs/sdk-reference/reference/typescript/agents#add-skill-directory). Parity surface for Python's `_external_paths`. #### Signature @@ -592,6 +592,60 @@ unregister(name: string): boolean Line 150. +## Interfaces + +### SkillSchemaInfo + +Metadata exposed for a registered skill. Shape matches Python's +`SkillRegistry.list_skills()` / `get_all_skills_schema()` return values +(`skills/registry.py:205-227`, `229-296`). + +#### Signature + +```typescript +interface SkillSchemaInfo +``` + +#### Properties + + + Human-readable description (from `SkillBase.SKILL_DESCRIPTION`). + + + + The skill's registered name (from `SkillBase.SKILL_NAME`). + + + + Full parameter schema with types, defaults, and constraints. + + + + Environment variables required by the skill. + + + + NPM packages required by the skill. + + + + Optional source category for grouping (e.g., "builtin", "external"). + + + + Whether this skill supports multiple simultaneous instances. + + + + Semantic version string (from `SkillBase.SKILL_VERSION`). + + +#### Source + +[`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) + +Line 28. + ## Source [`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) diff --git a/fern/products/sdk-reference/typescript/agents/skills/skill-registry/index__2.mdx b/fern/products/sdk-reference/typescript/agents/skills/skill-registry/index__2.mdx deleted file mode 100644 index d02186653b..0000000000 --- a/fern/products/sdk-reference/typescript/agents/skills/skill-registry/index__2.mdx +++ /dev/null @@ -1,68 +0,0 @@ ---- -slug: "/reference/typescript/agents/skills/skill-registry/index__2" -title: "SkillRegistry" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "module" - language: "typescript" - qualified_name: "agents.skills.SkillRegistry" - parent: "skills" - module: "agents.skills" ---- -# `SkillRegistry` - -## Interfaces - -### SkillSchemaInfo - -Metadata exposed for a registered skill. Shape matches Python's -`SkillRegistry.list_skills()` / `get_all_skills_schema()` return values -(`skills/registry.py:205-227`, `229-296`). - -#### Signature - -```typescript -interface SkillSchemaInfo -``` - -#### Properties - - - Human-readable description (from `SkillBase.SKILL_DESCRIPTION`). - - - - The skill's registered name (from `SkillBase.SKILL_NAME`). - - - - Full parameter schema with types, defaults, and constraints. - - - - Environment variables required by the skill. - - - - NPM packages required by the skill. - - - - Optional source category for grouping (e.g., "builtin", "external"). - - - - Whether this skill supports multiple simultaneous instances. - - - - Semantic version string (from `SkillBase.SKILL_VERSION`). - - -#### Source - -[`src/skills/SkillRegistry.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/skills/SkillRegistry.ts) - -Line 28. diff --git a/fern/products/sdk-reference/typescript/agents/ssl-config/index.mdx b/fern/products/sdk-reference/typescript/agents/ssl-config/index.mdx index 929d37ead9..402aa029cc 100644 --- a/fern/products/sdk-reference/typescript/agents/ssl-config/index.mdx +++ b/fern/products/sdk-reference/typescript/agents/ssl-config/index.mdx @@ -208,6 +208,50 @@ isConfigured(): boolean Line 61. +## Interfaces + +### SslOptions + +Configuration options for SSL/TLS setup. + +#### Signature + +```typescript +interface SslOptions +``` + +#### Properties + + + Filesystem path to the PEM-encoded certificate. + + + + Domain name used for HSTS headers. + + + + Whether SSL is enabled. + + + + Whether to send HSTS headers; defaults to true. + + + + HSTS max-age in seconds; defaults to 31536000 (1 year). + + + + Filesystem path to the PEM-encoded private key. + + +#### Source + +[`src/SslConfig.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SslConfig.ts) + +Line 14. + ## Source [`src/SslConfig.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SslConfig.ts) diff --git a/fern/products/sdk-reference/typescript/agents/ssl-config/index__2.mdx b/fern/products/sdk-reference/typescript/agents/ssl-config/index__2.mdx deleted file mode 100644 index 28eabbda99..0000000000 --- a/fern/products/sdk-reference/typescript/agents/ssl-config/index__2.mdx +++ /dev/null @@ -1,58 +0,0 @@ ---- -slug: "/reference/typescript/agents/ssl-config/index__2" -title: "SslConfig" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "module" - language: "typescript" - qualified_name: "agents.SslConfig" - parent: "agents" - module: "agents" ---- -# `SslConfig` - -## Interfaces - -### SslOptions - -Configuration options for SSL/TLS setup. - -#### Signature - -```typescript -interface SslOptions -``` - -#### Properties - - - Filesystem path to the PEM-encoded certificate. - - - - Domain name used for HSTS headers. - - - - Whether SSL is enabled. - - - - Whether to send HSTS headers; defaults to true. - - - - HSTS max-age in seconds; defaults to 31536000 (1 year). - - - - Filesystem path to the PEM-encoded private key. - - -#### Source - -[`src/SslConfig.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SslConfig.ts) - -Line 14. diff --git a/fern/products/sdk-reference/typescript/agents/swaig-function/index.mdx b/fern/products/sdk-reference/typescript/agents/swaig-function/index.mdx index 1e0ae2b8ba..bb2f608653 100644 --- a/fern/products/sdk-reference/typescript/agents/swaig-function/index.mdx +++ b/fern/products/sdk-reference/typescript/agents/swaig-function/index.mdx @@ -255,6 +255,74 @@ type SwaigHandler = (args: Record, rawData: Record + Human-readable description of what the tool does, shown to the AI. + + + + Additional fields to merge directly into the SWAIG function definition. **Python equivalent:** `**extra_swaig_fields` kwargs on the constructor. In Python these are passed as bare keyword arguments and merged directly into the output dict via `function_def.update(self.extra_swaig_fields)`. In TypeScript the same fields are collected under this single options key and merged identically in `toSwaig()` — the wire format is identical. + + + + Language-keyed filler phrases spoken while the tool executes. + + + + The handler function called when the tool is invoked. + + + + Whether this tool uses a typed handler with named parameters. + + + + Unique name used to register and invoke this tool. + + + + JSON Schema properties describing the tool's parameters. + + + + List of required parameter names. + + + + Whether this tool requires session token authentication. + + + + Audio file URL to play while waiting for the tool to complete. + + + + Number of times to loop the wait file. + + + + External webhook URL; makes this an externally-hosted tool. + + +#### Source + +[`src/SwaigFunction.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwaigFunction.ts) + +Line 25. + ## Source [`src/SwaigFunction.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwaigFunction.ts) diff --git a/fern/products/sdk-reference/typescript/agents/swaig-function/index__2.mdx b/fern/products/sdk-reference/typescript/agents/swaig-function/index__2.mdx deleted file mode 100644 index 74bf1f6403..0000000000 --- a/fern/products/sdk-reference/typescript/agents/swaig-function/index__2.mdx +++ /dev/null @@ -1,82 +0,0 @@ ---- -slug: "/reference/typescript/agents/swaig-function/index__2" -title: "SwaigFunction" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "module" - language: "typescript" - qualified_name: "agents.SwaigFunction" - parent: "agents" - module: "agents" ---- -# `SwaigFunction` - -## Interfaces - -### SwaigFunctionOptions - -Configuration options for creating a SwaigFunction. - -#### Signature - -```typescript -interface SwaigFunctionOptions -``` - -#### Properties - - - Human-readable description of what the tool does, shown to the AI. - - - - Additional fields to merge directly into the SWAIG function definition. **Python equivalent:** `**extra_swaig_fields` kwargs on the constructor. In Python these are passed as bare keyword arguments and merged directly into the output dict via `function_def.update(self.extra_swaig_fields)`. In TypeScript the same fields are collected under this single options key and merged identically in `toSwaig()` — the wire format is identical. - - - - Language-keyed filler phrases spoken while the tool executes. - - - - The handler function called when the tool is invoked. - - - - Whether this tool uses a typed handler with named parameters. - - - - Unique name used to register and invoke this tool. - - - - JSON Schema properties describing the tool's parameters. - - - - List of required parameter names. - - - - Whether this tool requires session token authentication. - - - - Audio file URL to play while waiting for the tool to complete. - - - - Number of times to loop the wait file. - - - - External webhook URL; makes this an externally-hosted tool. - - -#### Source - -[`src/SwaigFunction.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwaigFunction.ts) - -Line 25. diff --git a/fern/products/sdk-reference/typescript/agents/swml-builder/index.mdx b/fern/products/sdk-reference/typescript/agents/swml-builder/index.mdx index cba408643f..79320db7a7 100644 --- a/fern/products/sdk-reference/typescript/agents/swml-builder/index.mdx +++ b/fern/products/sdk-reference/typescript/agents/swml-builder/index.mdx @@ -1602,6 +1602,38 @@ user_event(config: { ...1 fields }): this Line 230. +## Interfaces + +### SwmlBuilderOptions + +Options for constructing a SwmlBuilder. + +#### Signature + +```typescript +interface SwmlBuilderOptions +``` + +#### Properties + + + When false, disables verb schema validation. Defaults to true unless `SWML_SKIP_SCHEMA_VALIDATION=true` is set in the environment. + + + + An initial SWML document to seed the builder with, enabling document injection. When provided, the builder uses this document instead of creating an empty one. This mirrors the Python SDK's pattern of injecting an SWMLService instance. + + + + Optional path to a custom SWML schema JSON file. When set, the builder uses a per-instance SchemaUtils loaded from this path instead of the bundled schema. Mirrors Python's `schema_path` constructor parameter on `SWMLService`/`AgentBase`. + + +#### Source + +[`src/SwmlBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlBuilder.ts) + +Line 19. + ## Source [`src/SwmlBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlBuilder.ts) diff --git a/fern/products/sdk-reference/typescript/agents/swml-builder/index__2.mdx b/fern/products/sdk-reference/typescript/agents/swml-builder/index__2.mdx deleted file mode 100644 index 5329fb3a22..0000000000 --- a/fern/products/sdk-reference/typescript/agents/swml-builder/index__2.mdx +++ /dev/null @@ -1,46 +0,0 @@ ---- -slug: "/reference/typescript/agents/swml-builder/index__2" -title: "SwmlBuilder" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "module" - language: "typescript" - qualified_name: "agents.SwmlBuilder" - parent: "agents" - module: "agents" ---- -# `SwmlBuilder` - -## Interfaces - -### SwmlBuilderOptions - -Options for constructing a SwmlBuilder. - -#### Signature - -```typescript -interface SwmlBuilderOptions -``` - -#### Properties - - - When false, disables verb schema validation. Defaults to true unless `SWML_SKIP_SCHEMA_VALIDATION=true` is set in the environment. - - - - An initial SWML document to seed the builder with, enabling document injection. When provided, the builder uses this document instead of creating an empty one. This mirrors the Python SDK's pattern of injecting an SWMLService instance. - - - - Optional path to a custom SWML schema JSON file. When set, the builder uses a per-instance SchemaUtils loaded from this path instead of the bundled schema. Mirrors Python's `schema_path` constructor parameter on `SWMLService`/`AgentBase`. - - -#### Source - -[`src/SwmlBuilder.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SwmlBuilder.ts) - -Line 19. diff --git a/fern/products/sdk-reference/typescript/agents/swml-service/index.mdx b/fern/products/sdk-reference/typescript/agents/swml-service/index.mdx index 8436739521..15ff67192a 100644 --- a/fern/products/sdk-reference/typescript/agents/swml-service/index.mdx +++ b/fern/products/sdk-reference/typescript/agents/swml-service/index.mdx @@ -109,6 +109,18 @@ await service.serve(); Custom verb handler registry. Mirrors Python's `self.verb_registry`. +## Classes + + + + Unified security configuration. Mirrors Python SDK's `SecurityConfig` — reads from env vars and optional config file. + + + + Registry for custom SWML verb handlers. Mirrors Python SDK's `VerbHandlerRegistry`. + + + ## Methods ### addSection @@ -1218,6 +1230,151 @@ type OnRequestCallback = (queryParams: Record, bodyParams: Recor Line 140. +## Interfaces + +### SWMLServiceOptions + +Configuration options for SWMLService. + +#### Signature + +```typescript +interface SWMLServiceOptions +``` + +#### Properties + + + Basic auth credentials as \[username, password]. + + + + Path to a security configuration file. + + + + Host to bind the web server to (default '0.0.0.0'). + + + + Service display name. Required to match Python SDK where `name` is a positional required parameter. + + + + Port to bind the web server to (default PORT env var or 3000). + + + + HTTP route path (default '/'). + + + + Path to a JSON Schema file for verb validation. + + + + Enable schema validation (default true). Can also be disabled via SWML\_SKIP\_SCHEMA\_VALIDATION=true. + + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 155. + +*** + +### SWMLVerbHandler + +Interface for custom SWML verb handlers. +Mirrors Python SDK's `SWMLVerbHandler` abstract base class. + +#### Signature + +```typescript +interface SWMLVerbHandler +``` + +#### Methods + +##### buildConfig + +Build a verb configuration from keyword arguments. + +###### Signature + +```typescript +buildConfig(kwargs: Record): Record +``` + +###### Parameters + + + +###### Returns + +`Record` + +###### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 34. + +*** + +##### getVerbName + +Return the verb name this handler manages. + +###### Signature + +```typescript +getVerbName(): string +``` + +###### Returns + +`string` + +###### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 30. + +*** + +##### validateConfig + +Validate a verb configuration. Returns \[isValid, errorMessages]. + +###### Signature + +```typescript +validateConfig(config: Record): [boolean, string[]] +``` + +###### Parameters + + + +###### Returns + +`[boolean, string[]]` + +###### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 32. + +#### Source + +[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) + +Line 28. + ## Source [`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) diff --git a/fern/products/sdk-reference/typescript/agents/swml-service/index__2.mdx b/fern/products/sdk-reference/typescript/agents/swml-service/index__2.mdx deleted file mode 100644 index 84026cf615..0000000000 --- a/fern/products/sdk-reference/typescript/agents/swml-service/index__2.mdx +++ /dev/null @@ -1,171 +0,0 @@ ---- -slug: "/reference/typescript/agents/swml-service/index__2" -title: "SWMLService" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "module" - language: "typescript" - qualified_name: "agents.SWMLService" - parent: "agents" - module: "agents" ---- -# `SWMLService` - -## Classes - - - - Unified security configuration. Mirrors Python SDK's `SecurityConfig` — reads from env vars and optional config file. - - - - Registry for custom SWML verb handlers. Mirrors Python SDK's `VerbHandlerRegistry`. - - - -## Interfaces - -### SWMLServiceOptions - -Configuration options for SWMLService. - -#### Signature - -```typescript -interface SWMLServiceOptions -``` - -#### Properties - - - Basic auth credentials as \[username, password]. - - - - Path to a security configuration file. - - - - Host to bind the web server to (default '0.0.0.0'). - - - - Service display name. Required to match Python SDK where `name` is a positional required parameter. - - - - Port to bind the web server to (default PORT env var or 3000). - - - - HTTP route path (default '/'). - - - - Path to a JSON Schema file for verb validation. - - - - Enable schema validation (default true). Can also be disabled via SWML\_SKIP\_SCHEMA\_VALIDATION=true. - - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 155. - -*** - -### SWMLVerbHandler - -Interface for custom SWML verb handlers. -Mirrors Python SDK's `SWMLVerbHandler` abstract base class. - -#### Signature - -```typescript -interface SWMLVerbHandler -``` - -#### Methods - -##### buildConfig - -Build a verb configuration from keyword arguments. - -###### Signature - -```typescript -buildConfig(kwargs: Record): Record -``` - -###### Parameters - - - -###### Returns - -`Record` - -###### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 34. - -*** - -##### getVerbName - -Return the verb name this handler manages. - -###### Signature - -```typescript -getVerbName(): string -``` - -###### Returns - -`string` - -###### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 30. - -*** - -##### validateConfig - -Validate a verb configuration. Returns \[isValid, errorMessages]. - -###### Signature - -```typescript -validateConfig(config: Record): [boolean, string[]] -``` - -###### Parameters - - - -###### Returns - -`[boolean, string[]]` - -###### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 32. - -#### Source - -[`src/SWMLService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts) - -Line 28. diff --git a/fern/products/sdk-reference/typescript/agents/swml-service/security-config/index.mdx b/fern/products/sdk-reference/typescript/agents/swml-service/security-config/index.mdx index 16aeb3b7a0..076b889289 100644 --- a/fern/products/sdk-reference/typescript/agents/swml-service/security-config/index.mdx +++ b/fern/products/sdk-reference/typescript/agents/swml-service/security-config/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "typescript" qualified_name: "SWMLService.SecurityConfig" - parent: "agents.SWMLService" + parent: "SWMLService" module: "agents.SWMLService" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts" --- diff --git a/fern/products/sdk-reference/typescript/agents/swml-service/verb-handler-registry/index.mdx b/fern/products/sdk-reference/typescript/agents/swml-service/verb-handler-registry/index.mdx index 192c46627c..734850fb37 100644 --- a/fern/products/sdk-reference/typescript/agents/swml-service/verb-handler-registry/index.mdx +++ b/fern/products/sdk-reference/typescript/agents/swml-service/verb-handler-registry/index.mdx @@ -8,7 +8,7 @@ lustri: kind: "class" language: "typescript" qualified_name: "SWMLService.VerbHandlerRegistry" - parent: "agents.SWMLService" + parent: "SWMLService" module: "agents.SWMLService" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/SWMLService.ts" --- diff --git a/fern/products/sdk-reference/typescript/agents/web-service/index.mdx b/fern/products/sdk-reference/typescript/agents/web-service/index.mdx index 515dd15f1c..ab8f1af572 100644 --- a/fern/products/sdk-reference/typescript/agents/web-service/index.mdx +++ b/fern/products/sdk-reference/typescript/agents/web-service/index.mdx @@ -265,6 +265,66 @@ stop(): void Line 302. +## Interfaces + +### WebServiceOptions + +Configuration options for WebService. + +#### Signature + +```typescript +interface WebServiceOptions +``` + +#### Properties + + + Allowlist of file extensions (e.g. \['.html', '.css']). Default: all allowed. + + + + Basic auth credentials as \[username, password]. Default: none. + + + + Blocklist of file extensions or names. Default: \['.env', '.git', '.gitignore', '.key', '.pem', '.crt', '.pyc', '**pycache**', '.DS\_Store', '.swp'] + + + + Path to a JSON config file. Default: none. + + + + Map of URL route prefixes to local directory paths. Default: \{\}. + + + + Enable CORS. Default: true. + + + + Serve directory listings and fall back to index.html. Default: false. + + + + Maximum file size in bytes. Default: 104857600 (100 MB). + + + + Port to bind to. Default: 8002. + + + + SSL/TLS configuration options. + + +#### Source + +[`src/WebService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/WebService.ts) + +Line 53. + ## Source [`src/WebService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/WebService.ts) diff --git a/fern/products/sdk-reference/typescript/agents/web-service/index__2.mdx b/fern/products/sdk-reference/typescript/agents/web-service/index__2.mdx deleted file mode 100644 index 6c54331d5d..0000000000 --- a/fern/products/sdk-reference/typescript/agents/web-service/index__2.mdx +++ /dev/null @@ -1,74 +0,0 @@ ---- -slug: "/reference/typescript/agents/web-service/index__2" -title: "WebService" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "module" - language: "typescript" - qualified_name: "agents.WebService" - parent: "agents" - module: "agents" ---- -# `WebService` - -## Interfaces - -### WebServiceOptions - -Configuration options for WebService. - -#### Signature - -```typescript -interface WebServiceOptions -``` - -#### Properties - - - Allowlist of file extensions (e.g. \['.html', '.css']). Default: all allowed. - - - - Basic auth credentials as \[username, password]. Default: none. - - - - Blocklist of file extensions or names. Default: \['.env', '.git', '.gitignore', '.key', '.pem', '.crt', '.pyc', '**pycache**', '.DS\_Store', '.swp'] - - - - Path to a JSON config file. Default: none. - - - - Map of URL route prefixes to local directory paths. Default: \{\}. - - - - Enable CORS. Default: true. - - - - Serve directory listings and fall back to index.html. Default: false. - - - - Maximum file size in bytes. Default: 104857600 (100 MB). - - - - Port to bind to. Default: 8002. - - - - SSL/TLS configuration options. - - -#### Source - -[`src/WebService.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/WebService.ts) - -Line 53. diff --git a/fern/products/sdk-reference/typescript/index.mdx b/fern/products/sdk-reference/typescript/index.mdx index f2180a8dcf..b847c5962b 100644 --- a/fern/products/sdk-reference/typescript/index.mdx +++ b/fern/products/sdk-reference/typescript/index.mdx @@ -13,5 +13,4 @@ lustri: - [`agents`](/docs/sdk-reference/reference/typescript/agents) - [`core`](/docs/sdk-reference/reference/typescript/core) - [`relay`](/docs/sdk-reference/reference/typescript/relay) -- [`rest`](/docs/sdk-reference/reference/typescript/rest) diff --git a/fern/products/sdk-reference/typescript/list-skills-with-params.mdx b/fern/products/sdk-reference/typescript/list-skills-with-params.mdx deleted file mode 100644 index 39281e2469..0000000000 --- a/fern/products/sdk-reference/typescript/list-skills-with-params.mdx +++ /dev/null @@ -1,34 +0,0 @@ ---- -slug: "/reference/typescript/list-skills-with-params" -title: "listSkillsWithParams" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "function" - language: "typescript" - qualified_name: "listSkillsWithParams" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/index.ts" ---- -# `listSkillsWithParams` - -Get full schema for all registered skills, including parameter metadata. - -Equivalent to Python's `list_skills_with_params()`. Useful for GUI -configuration tools, API documentation, and programmatic skill discovery. - -## Signature - -```typescript -listSkillsWithParams(): Record -``` - -## Returns - -`Record` — Map of skill name to `schema info`. - -## Source - -[`src/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/index.ts) - -Line 293. diff --git a/fern/products/sdk-reference/typescript/list-skills.mdx b/fern/products/sdk-reference/typescript/list-skills.mdx deleted file mode 100644 index 7f49c25455..0000000000 --- a/fern/products/sdk-reference/typescript/list-skills.mdx +++ /dev/null @@ -1,36 +0,0 @@ ---- -slug: "/reference/typescript/list-skills" -title: "listSkills" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "function" - language: "typescript" - qualified_name: "listSkills" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/index.ts" ---- -# `listSkills` - -List metadata for all registered skills. - -Equivalent to Python's `list_skills()` — proxies to the singleton -`SkillRegistry`. Python's version returns a plain dict keyed by -skill name; this returns an array of `_SkillSchemaInfo` entries -(the TS shape is richer and includes the name field). - -## Signature - -```typescript -listSkills(): SkillSchemaInfo[] -``` - -## Returns - -`SkillSchemaInfo[]` — Array of skill metadata entries. - -## Source - -[`src/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/index.ts) - -Line 281. diff --git a/fern/products/sdk-reference/typescript/register-skill.mdx b/fern/products/sdk-reference/typescript/register-skill.mdx deleted file mode 100644 index 2276ce8aa6..0000000000 --- a/fern/products/sdk-reference/typescript/register-skill.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -slug: "/reference/typescript/register-skill" -title: "registerSkill" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "function" - language: "typescript" - qualified_name: "registerSkill" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/index.ts" ---- -# `registerSkill` - -Register a custom skill class with the global `SkillRegistry`. - -Equivalent to Python's `register_skill(skill_class)`. Allows third-party -code to register skills directly, bypassing the built-in directory scan. - -## Signature - -```typescript -registerSkill(skillClass: typeof SkillBase): void -``` - -## Parameters - - - Skill class to register (a subclass of `SkillBase`). - - -## Returns - -`void` - -## Source - -[`src/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/index.ts) - -Line 305. diff --git a/fern/products/sdk-reference/typescript/relay/action/ai-action/index.mdx b/fern/products/sdk-reference/typescript/relay/action/ai-action/index.mdx index 7440bf76eb..2a665dc553 100644 --- a/fern/products/sdk-reference/typescript/relay/action/ai-action/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/action/ai-action/index.mdx @@ -24,7 +24,7 @@ class AIAction extends Action ## Inheritance -**Extends:** `Action` +**Extends:** [Action](/docs/sdk-reference/reference/typescript/relay/action) ## Properties @@ -120,7 +120,7 @@ wait(timeout?: number): Promise #### Returns -`Promise` — The terminal `RelayEvent` for this action. +`Promise` — The terminal [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) for this action. #### Throws diff --git a/fern/products/sdk-reference/typescript/relay/action/collect-action/index.mdx b/fern/products/sdk-reference/typescript/relay/action/collect-action/index.mdx index 72a666d48b..b0ca14efc7 100644 --- a/fern/products/sdk-reference/typescript/relay/action/collect-action/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/action/collect-action/index.mdx @@ -24,7 +24,7 @@ class CollectAction extends Action ## Inheritance -**Extends:** `Action` +**Extends:** [Action](/docs/sdk-reference/reference/typescript/relay/action) ## Properties @@ -206,7 +206,7 @@ wait(timeout?: number): Promise #### Returns -`Promise` — The terminal `RelayEvent` for this action. +`Promise` — The terminal [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) for this action. #### Throws diff --git a/fern/products/sdk-reference/typescript/relay/action/detect-action/index.mdx b/fern/products/sdk-reference/typescript/relay/action/detect-action/index.mdx index d488496c3b..2726d954c1 100644 --- a/fern/products/sdk-reference/typescript/relay/action/detect-action/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/action/detect-action/index.mdx @@ -24,7 +24,7 @@ class DetectAction extends Action ## Inheritance -**Extends:** `Action` +**Extends:** [Action](/docs/sdk-reference/reference/typescript/relay/action) ## Properties @@ -146,7 +146,7 @@ wait(timeout?: number): Promise #### Returns -`Promise` — The terminal `RelayEvent` for this action. +`Promise` — The terminal [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) for this action. #### Throws diff --git a/fern/products/sdk-reference/typescript/relay/action/fax-action/index.mdx b/fern/products/sdk-reference/typescript/relay/action/fax-action/index.mdx index 5e7211ec78..37963e0708 100644 --- a/fern/products/sdk-reference/typescript/relay/action/fax-action/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/action/fax-action/index.mdx @@ -24,7 +24,7 @@ class FaxAction extends Action ## Inheritance -**Extends:** `Action` +**Extends:** [Action](/docs/sdk-reference/reference/typescript/relay/action) ## Properties @@ -122,7 +122,7 @@ wait(timeout?: number): Promise #### Returns -`Promise` — The terminal `RelayEvent` for this action. +`Promise` — The terminal [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) for this action. #### Throws diff --git a/fern/products/sdk-reference/typescript/relay/action/index.mdx b/fern/products/sdk-reference/typescript/relay/action/index.mdx index ed1a224cb5..fee4861d8f 100644 --- a/fern/products/sdk-reference/typescript/relay/action/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/action/index.mdx @@ -16,7 +16,7 @@ lustri: Async handle for a controllable call operation (play, record, tap, detect, etc.). -An Action is returned from the async variants on `Call` (e.g. `call.playAsync`). +An Action is returned from the async variants on [Call](/docs/sdk-reference/reference/typescript/relay/call) (e.g. `call.playAsync`). It resolves when the server emits a terminal event for its `controlId`. Use [Action.wait](/docs/sdk-reference/reference/typescript/relay/action#wait) to await completion, or register an `onCompleted` callback. @@ -57,6 +57,54 @@ console.log('Playback finished with state', event.params.state); Final event once the action terminates, or `null` while still running. +## Classes + + + + Async handle for a `calling.call.ai` action (on-call AI agent session). + + + + Async handle for a `play_and_collect` action (combined playback + input collection). + + + + Async handle for a `calling.call.detect` action (machine / fax / digit). + + + + Async handle for a `send_fax` or `receive_fax` action. + + + + Async handle for a `calling.call.pay` action (PCI-compliant payment collection). + + + + Async handle for a `calling.call.play` action — controls playback in progress. + + + + Async handle for a `calling.call.record` action — controls recording in progress. + + + + Async handle for a bare `calling.call.collect` action (no accompanying play). + + + + Async handle for a `calling.call.stream` action (outbound media stream). + + + + Async handle for a `calling.call.tap` action (media mirroring). + + + + Async handle for a `calling.call.transcribe` action (real-time transcription). + + + ## Methods ### constructor @@ -75,7 +123,7 @@ constructor( #### Parameters - Owning call (via the structural [CallLike](/docs/sdk-reference/reference/typescript/relay/action/index__2#call-like) interface). + Owning call (via the structural [CallLike](/docs/sdk-reference/reference/typescript/relay/action#call-like) interface). @@ -120,7 +168,7 @@ wait(timeout?: number): Promise #### Returns -`Promise` — The terminal `RelayEvent` for this action. +`Promise` — The terminal [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) for this action. #### Throws @@ -132,6 +180,54 @@ wait(timeout?: number): Promise Line 125. +## Interfaces + +### CallLike + +Structural subset of [Call](/docs/sdk-reference/reference/typescript/relay/call) that an Action needs — avoids a circular +import between `Call.ts` and `Action.ts`. + +#### Signature + +```typescript +interface CallLike +``` + +#### Methods + +##### \_execute + +###### Signature + +```typescript +_execute( + method: string, + extraParams?: Record +): Promise> +``` + +###### Parameters + + + + + +###### Returns + +`Promise>` + +###### Source + +[`src/relay/Action.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts) + +Line 35. + +#### Source + +[`src/relay/Action.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts) + +Line 34. + ## Source [`src/relay/Action.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts) diff --git a/fern/products/sdk-reference/typescript/relay/action/index__2.mdx b/fern/products/sdk-reference/typescript/relay/action/index__2.mdx deleted file mode 100644 index e2ad79cd46..0000000000 --- a/fern/products/sdk-reference/typescript/relay/action/index__2.mdx +++ /dev/null @@ -1,110 +0,0 @@ ---- -slug: "/reference/typescript/relay/action/index__2" -title: "Action" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "module" - language: "typescript" - qualified_name: "relay.Action" - parent: "relay" - module: "relay" ---- -# `Action` - -## Classes - - - - Async handle for a `calling.call.ai` action (on-call AI agent session). - - - - Async handle for a `play_and_collect` action (combined playback + input collection). - - - - Async handle for a `calling.call.detect` action (machine / fax / digit). - - - - Async handle for a `send_fax` or `receive_fax` action. - - - - Async handle for a `calling.call.pay` action (PCI-compliant payment collection). - - - - Async handle for a `calling.call.play` action — controls playback in progress. - - - - Async handle for a `calling.call.record` action — controls recording in progress. - - - - Async handle for a bare `calling.call.collect` action (no accompanying play). - - - - Async handle for a `calling.call.stream` action (outbound media stream). - - - - Async handle for a `calling.call.tap` action (media mirroring). - - - - Async handle for a `calling.call.transcribe` action (real-time transcription). - - - -## Interfaces - -### CallLike - -Structural subset of `Call` that an Action needs — avoids a circular -import between `Call.ts` and `Action.ts`. - -#### Signature - -```typescript -interface CallLike -``` - -#### Methods - -##### \_execute - -###### Signature - -```typescript -_execute( - method: string, - extraParams?: Record -): Promise> -``` - -###### Parameters - - - - - -###### Returns - -`Promise>` - -###### Source - -[`src/relay/Action.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts) - -Line 35. - -#### Source - -[`src/relay/Action.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Action.ts) - -Line 34. diff --git a/fern/products/sdk-reference/typescript/relay/action/pay-action/index.mdx b/fern/products/sdk-reference/typescript/relay/action/pay-action/index.mdx index 6af9cac9f5..9c61666a6b 100644 --- a/fern/products/sdk-reference/typescript/relay/action/pay-action/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/action/pay-action/index.mdx @@ -24,7 +24,7 @@ class PayAction extends Action ## Inheritance -**Extends:** `Action` +**Extends:** [Action](/docs/sdk-reference/reference/typescript/relay/action) ## Properties @@ -120,7 +120,7 @@ wait(timeout?: number): Promise #### Returns -`Promise` — The terminal `RelayEvent` for this action. +`Promise` — The terminal [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) for this action. #### Throws diff --git a/fern/products/sdk-reference/typescript/relay/action/play-action/index.mdx b/fern/products/sdk-reference/typescript/relay/action/play-action/index.mdx index 86a7604ee0..08d4a39d95 100644 --- a/fern/products/sdk-reference/typescript/relay/action/play-action/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/action/play-action/index.mdx @@ -24,7 +24,7 @@ class PlayAction extends Action ## Inheritance -**Extends:** `Action` +**Extends:** [Action](/docs/sdk-reference/reference/typescript/relay/action) ## Properties @@ -204,7 +204,7 @@ wait(timeout?: number): Promise #### Returns -`Promise` — The terminal `RelayEvent` for this action. +`Promise` — The terminal [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) for this action. #### Throws diff --git a/fern/products/sdk-reference/typescript/relay/action/record-action/index.mdx b/fern/products/sdk-reference/typescript/relay/action/record-action/index.mdx index ddc292e0fd..305c5f4508 100644 --- a/fern/products/sdk-reference/typescript/relay/action/record-action/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/action/record-action/index.mdx @@ -24,7 +24,7 @@ class RecordAction extends Action ## Inheritance -**Extends:** `Action` +**Extends:** [Action](/docs/sdk-reference/reference/typescript/relay/action) ## Properties @@ -178,7 +178,7 @@ wait(timeout?: number): Promise #### Returns -`Promise` — The terminal `RelayEvent` for this action. +`Promise` — The terminal [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) for this action. #### Throws diff --git a/fern/products/sdk-reference/typescript/relay/action/standalone-collect-action/index.mdx b/fern/products/sdk-reference/typescript/relay/action/standalone-collect-action/index.mdx index fde935a20f..003af090bd 100644 --- a/fern/products/sdk-reference/typescript/relay/action/standalone-collect-action/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/action/standalone-collect-action/index.mdx @@ -24,7 +24,7 @@ class StandaloneCollectAction extends Action ## Inheritance -**Extends:** `Action` +**Extends:** [Action](/docs/sdk-reference/reference/typescript/relay/action) ## Properties @@ -146,7 +146,7 @@ wait(timeout?: number): Promise #### Returns -`Promise` — The terminal `RelayEvent` for this action. +`Promise` — The terminal [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) for this action. #### Throws diff --git a/fern/products/sdk-reference/typescript/relay/action/stream-action/index.mdx b/fern/products/sdk-reference/typescript/relay/action/stream-action/index.mdx index 2e32c5db55..7e640d2f86 100644 --- a/fern/products/sdk-reference/typescript/relay/action/stream-action/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/action/stream-action/index.mdx @@ -24,7 +24,7 @@ class StreamAction extends Action ## Inheritance -**Extends:** `Action` +**Extends:** [Action](/docs/sdk-reference/reference/typescript/relay/action) ## Properties @@ -120,7 +120,7 @@ wait(timeout?: number): Promise #### Returns -`Promise` — The terminal `RelayEvent` for this action. +`Promise` — The terminal [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) for this action. #### Throws diff --git a/fern/products/sdk-reference/typescript/relay/action/tap-action/index.mdx b/fern/products/sdk-reference/typescript/relay/action/tap-action/index.mdx index ead4426941..12237dcabc 100644 --- a/fern/products/sdk-reference/typescript/relay/action/tap-action/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/action/tap-action/index.mdx @@ -24,7 +24,7 @@ class TapAction extends Action ## Inheritance -**Extends:** `Action` +**Extends:** [Action](/docs/sdk-reference/reference/typescript/relay/action) ## Properties @@ -120,7 +120,7 @@ wait(timeout?: number): Promise #### Returns -`Promise` — The terminal `RelayEvent` for this action. +`Promise` — The terminal [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) for this action. #### Throws diff --git a/fern/products/sdk-reference/typescript/relay/action/transcribe-action/index.mdx b/fern/products/sdk-reference/typescript/relay/action/transcribe-action/index.mdx index 87701532fc..ab3d7cc142 100644 --- a/fern/products/sdk-reference/typescript/relay/action/transcribe-action/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/action/transcribe-action/index.mdx @@ -24,7 +24,7 @@ class TranscribeAction extends Action ## Inheritance -**Extends:** `Action` +**Extends:** [Action](/docs/sdk-reference/reference/typescript/relay/action) ## Properties @@ -120,7 +120,7 @@ wait(timeout?: number): Promise #### Returns -`Promise` — The terminal `RelayEvent` for this action. +`Promise` — The terminal [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) for this action. #### Throws diff --git a/fern/products/sdk-reference/typescript/relay/call/index.mdx b/fern/products/sdk-reference/typescript/relay/call/index.mdx index eeda01d165..ee84c220af 100644 --- a/fern/products/sdk-reference/typescript/relay/call/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/call/index.mdx @@ -21,7 +21,7 @@ for inbound calls (delivered to your `onCall` handler) and for outbound dials. Each command method (`answer()`, `play()`, `record()`, etc.) returns when the platform acknowledges the command; event-driven completion is exposed via -`Action` objects returned from the async "play/record/..." variants. +[Action](/docs/sdk-reference/reference/typescript/relay/action) objects returned from the async "play/record/..." variants. ## Signature @@ -43,7 +43,7 @@ client.onCall(async (call) => { ## See Also - \- \[RelayClient]\(/docs/sdk-reference/reference/typescript/relay/relay-client) - \- \`Action\` + \- \[Action]\(/docs/sdk-reference/reference/typescript/relay/action) ## Properties @@ -2521,7 +2521,7 @@ waitFor( #### Returns -`Promise` — The first matching `RelayEvent`. +`Promise` — The first matching [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event). #### Throws @@ -2557,7 +2557,7 @@ waitForAnswered(timeout?: number): Promise #### Returns -`Promise` — The `calling.call.state` `RelayEvent` (synthesized on short-circuit). +`Promise` — The `calling.call.state` [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) (synthesized on short-circuit). #### Throws @@ -2589,7 +2589,7 @@ waitForEnded(timeout?: number): Promise #### Returns -`Promise` — The terminating `calling.call.state` `RelayEvent`. +`Promise` — The terminating `calling.call.state` [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event). #### Throws @@ -2624,7 +2624,7 @@ waitForEnding(timeout?: number): Promise #### Returns -`Promise` — The `calling.call.state` `RelayEvent` (synthesized on short-circuit). +`Promise` — The `calling.call.state` [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) (synthesized on short-circuit). #### Throws @@ -2660,7 +2660,7 @@ waitForRinging(timeout?: number): Promise #### Returns -`Promise` — The `calling.call.state` `RelayEvent` (synthesized on short-circuit). +`Promise` — The `calling.call.state` [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) (synthesized on short-circuit). #### Throws @@ -2672,6 +2672,53 @@ waitForRinging(timeout?: number): Promise Line 359. +## Interfaces + +### RelayClientLike + +Interface the Call needs from RelayClient (avoids circular import). + +#### Signature + +```typescript +interface RelayClientLike +``` + +#### Methods + +##### execute + +###### Signature + +```typescript +execute( + method: string, + params: Record +): Promise> +``` + +###### Parameters + + + + + +###### Returns + +`Promise>` + +###### Source + +[`src/relay/Call.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts) + +Line 54. + +#### Source + +[`src/relay/Call.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts) + +Line 53. + ## Source [`src/relay/Call.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts) diff --git a/fern/products/sdk-reference/typescript/relay/call/index__2.mdx b/fern/products/sdk-reference/typescript/relay/call/index__2.mdx deleted file mode 100644 index f6fc6223f1..0000000000 --- a/fern/products/sdk-reference/typescript/relay/call/index__2.mdx +++ /dev/null @@ -1,61 +0,0 @@ ---- -slug: "/reference/typescript/relay/call/index__2" -title: "Call" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "module" - language: "typescript" - qualified_name: "relay.Call" - parent: "relay" - module: "relay" ---- -# `Call` - -## Interfaces - -### RelayClientLike - -Interface the Call needs from RelayClient (avoids circular import). - -#### Signature - -```typescript -interface RelayClientLike -``` - -#### Methods - -##### execute - -###### Signature - -```typescript -execute( - method: string, - params: Record -): Promise> -``` - -###### Parameters - - - - - -###### Returns - -`Promise>` - -###### Source - -[`src/relay/Call.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts) - -Line 54. - -#### Source - -[`src/relay/Call.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/relay/Call.ts) - -Line 53. diff --git a/fern/products/sdk-reference/typescript/relay/index.mdx b/fern/products/sdk-reference/typescript/relay/index.mdx index de9d33cfa3..5aafa2ec04 100644 --- a/fern/products/sdk-reference/typescript/relay/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/index.mdx @@ -49,18 +49,12 @@ module relay ## Modules - - - - - - diff --git a/fern/products/sdk-reference/typescript/relay/message/index.mdx b/fern/products/sdk-reference/typescript/relay/message/index.mdx index a0bf88183b..1922a2d9aa 100644 --- a/fern/products/sdk-reference/typescript/relay/message/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/message/index.mdx @@ -218,7 +218,7 @@ wait(timeout?: number): Promise #### Returns -`Promise` — The final `messaging.state` `RelayEvent`. +`Promise` — The final `messaging.state` [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event). #### Throws diff --git a/fern/products/sdk-reference/typescript/relay/relay-client/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-client/index.mdx index 8b43c54421..00c843c5f4 100644 --- a/fern/products/sdk-reference/typescript/relay/relay-client/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/relay-client/index.mdx @@ -65,7 +65,7 @@ class RelayClient ## See Also -- \- \`Call\` +- \- \[Call]\(/docs/sdk-reference/reference/typescript/relay/call) \- \[Message]\(/docs/sdk-reference/reference/typescript/relay/message) ## Properties @@ -240,7 +240,7 @@ dial( #### Returns -`Promise` — A `Call` representing the answered leg. +`Promise` — A [Call](/docs/sdk-reference/reference/typescript/relay/call) representing the answered leg. #### Throws @@ -369,7 +369,7 @@ Line 560. Register the inbound call handler. The handler is invoked once per inbound call, with a fully-formed -`Call` already in state `"created"`. Answer, reject, or forward +[Call](/docs/sdk-reference/reference/typescript/relay/call) already in state `"created"`. Answer, reject, or forward the call from inside the handler. #### Signature @@ -408,7 +408,7 @@ escape hatch used by the porting-sdk audit harness to react to every event the platform pushes. Fires BEFORE typed routing, so the same event will be observed here -AND on any matching `Call` / [Message](/docs/sdk-reference/reference/typescript/relay/message). +AND on any matching [Call](/docs/sdk-reference/reference/typescript/relay/call) / [Message](/docs/sdk-reference/reference/typescript/relay/message). #### Signature diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/call-receive-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/call-receive-event/index.mdx index e22df03ee4..189ab4a8d5 100644 --- a/fern/products/sdk-reference/typescript/relay/relay-event/call-receive-event/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/relay-event/call-receive-event/index.mdx @@ -24,7 +24,7 @@ class CallReceiveEvent extends RelayEvent ## Inheritance -**Extends:** `RelayEvent` +**Extends:** [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) ## Properties diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/call-state-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/call-state-event/index.mdx index 61f2894a05..d361764f68 100644 --- a/fern/products/sdk-reference/typescript/relay/relay-event/call-state-event/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/relay-event/call-state-event/index.mdx @@ -24,7 +24,7 @@ class CallStateEvent extends RelayEvent ## Inheritance -**Extends:** `RelayEvent` +**Extends:** [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) ## Properties diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/calling-error-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/calling-error-event/index.mdx index 06047ace58..ad36c2e42a 100644 --- a/fern/products/sdk-reference/typescript/relay/relay-event/calling-error-event/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/relay-event/calling-error-event/index.mdx @@ -24,7 +24,7 @@ class CallingErrorEvent extends RelayEvent ## Inheritance -**Extends:** `RelayEvent` +**Extends:** [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) ## Properties diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/collect-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/collect-event/index.mdx index 22a2a084cd..8cd7237e20 100644 --- a/fern/products/sdk-reference/typescript/relay/relay-event/collect-event/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/relay-event/collect-event/index.mdx @@ -24,7 +24,7 @@ class CollectEvent extends RelayEvent ## Inheritance -**Extends:** `RelayEvent` +**Extends:** [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) ## Properties diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/conference-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/conference-event/index.mdx index 0613f87425..62f5d76520 100644 --- a/fern/products/sdk-reference/typescript/relay/relay-event/conference-event/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/relay-event/conference-event/index.mdx @@ -24,7 +24,7 @@ class ConferenceEvent extends RelayEvent ## Inheritance -**Extends:** `RelayEvent` +**Extends:** [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) ## Properties diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/connect-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/connect-event/index.mdx index b7bcbe089b..811948afa2 100644 --- a/fern/products/sdk-reference/typescript/relay/relay-event/connect-event/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/relay-event/connect-event/index.mdx @@ -24,7 +24,7 @@ class ConnectEvent extends RelayEvent ## Inheritance -**Extends:** `RelayEvent` +**Extends:** [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) ## Properties diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/denoise-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/denoise-event/index.mdx index d968e352c9..52b4bf7ece 100644 --- a/fern/products/sdk-reference/typescript/relay/relay-event/denoise-event/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/relay-event/denoise-event/index.mdx @@ -24,7 +24,7 @@ class DenoiseEvent extends RelayEvent ## Inheritance -**Extends:** `RelayEvent` +**Extends:** [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) ## Properties diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/detect-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/detect-event/index.mdx index a36e7c99f1..24a13c98b6 100644 --- a/fern/products/sdk-reference/typescript/relay/relay-event/detect-event/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/relay-event/detect-event/index.mdx @@ -24,7 +24,7 @@ class DetectEvent extends RelayEvent ## Inheritance -**Extends:** `RelayEvent` +**Extends:** [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) ## Properties diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/dial-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/dial-event/index.mdx index 9c7b8c1feb..df99936b37 100644 --- a/fern/products/sdk-reference/typescript/relay/relay-event/dial-event/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/relay-event/dial-event/index.mdx @@ -24,7 +24,7 @@ class DialEvent extends RelayEvent ## Inheritance -**Extends:** `RelayEvent` +**Extends:** [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) ## Properties diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/echo-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/echo-event/index.mdx index 84e7ddd1db..b430755eff 100644 --- a/fern/products/sdk-reference/typescript/relay/relay-event/echo-event/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/relay-event/echo-event/index.mdx @@ -24,7 +24,7 @@ class EchoEvent extends RelayEvent ## Inheritance -**Extends:** `RelayEvent` +**Extends:** [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) ## Properties diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/fax-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/fax-event/index.mdx index 5a7dfcd37e..6a671103d7 100644 --- a/fern/products/sdk-reference/typescript/relay/relay-event/fax-event/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/relay-event/fax-event/index.mdx @@ -24,7 +24,7 @@ class FaxEvent extends RelayEvent ## Inheritance -**Extends:** `RelayEvent` +**Extends:** [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) ## Properties diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/hold-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/hold-event/index.mdx index 6abd3edecf..80c4860165 100644 --- a/fern/products/sdk-reference/typescript/relay/relay-event/hold-event/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/relay-event/hold-event/index.mdx @@ -24,7 +24,7 @@ class HoldEvent extends RelayEvent ## Inheritance -**Extends:** `RelayEvent` +**Extends:** [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) ## Properties diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/index.mdx index 901e8cc1c0..1e96fd0a3f 100644 --- a/fern/products/sdk-reference/typescript/relay/relay-event/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/relay-event/index.mdx @@ -51,6 +51,102 @@ class RelayEvent Maps RELAY `event_type` strings to the typed event subclass that builds its wrapper. Used by [parseEvent](/docs/sdk-reference/reference/typescript/relay/relay-event#parse-event) to dispatch raw payloads. +## Classes + + + + `calling.error` — platform-emitted error against the calling namespace. + + + + `calling.call.receive` — fires when an inbound call arrives on a subscribed context. + + + + `calling.call.state` — fires on every lifecycle transition (created, ringing, answered, ending, ended). + + + + `calling.call.collect` — caller input (DTMF or speech) collected by a collect action. + + + + `calling.conference` — conference lifecycle change (created, active, ended). + + + + `calling.call.connect` — state transition when one call connects to another (dialplan/bridge). + + + + `calling.call.denoise` — noise-reduction on/off confirmation. + + + + `calling.call.detect` — answering-machine / fax / DTMF detection result. + + + + `calling.call.dial` — outbound dial progress (answered, failed, no-answer, etc.). + + + + `calling.call.echo` — test/diagnostic echo reflection from the server. + + + + `calling.call.fax` — fax send/receive progress update. + + + + `calling.call.hold` — hold/unhold state change on the call. + + + + `messaging.receive` — inbound SMS/MMS received on a subscribed context. + + + + `messaging.state` — state change for an outbound message (queued → sent → delivered/failed). + + + + `calling.call.pay` — PCI-compliant payment collection progress update. + + + + `calling.call.play` — play-media action state change (`playing`, `paused`, `finished`, `error`). + + + + `calling.call.queue` — call-queue position update (queued, waiting, member answered, timed out). + + + + `calling.call.record` — recording state change with final URL, duration, and size when finished. + + + + `calling.call.refer` — SIP REFER result (off-platform transfer response codes). + + + + `calling.call.send_digits` — progress update for DTMF digits sent out on a call. + + + + `calling.call.stream` — outbound media stream state change (e.g. RTMP/WebSocket streaming). + + + + `calling.call.tap` — media tap state change (audio mirror to an external endpoint). + + + + `calling.call.transcribe` — transcription state change and final URL/duration when finished. + + + ## Methods ### constructor diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/index__2.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/index__2.mdx deleted file mode 100644 index 147d9d5c92..0000000000 --- a/fern/products/sdk-reference/typescript/relay/relay-event/index__2.mdx +++ /dev/null @@ -1,110 +0,0 @@ ---- -slug: "/reference/typescript/relay/relay-event/index__2" -title: "RelayEvent" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "module" - language: "typescript" - qualified_name: "relay.RelayEvent" - parent: "relay" - module: "relay" ---- -# `RelayEvent` - -## Classes - - - - `calling.error` — platform-emitted error against the calling namespace. - - - - `calling.call.receive` — fires when an inbound call arrives on a subscribed context. - - - - `calling.call.state` — fires on every lifecycle transition (created, ringing, answered, ending, ended). - - - - `calling.call.collect` — caller input (DTMF or speech) collected by a collect action. - - - - `calling.conference` — conference lifecycle change (created, active, ended). - - - - `calling.call.connect` — state transition when one call connects to another (dialplan/bridge). - - - - `calling.call.denoise` — noise-reduction on/off confirmation. - - - - `calling.call.detect` — answering-machine / fax / DTMF detection result. - - - - `calling.call.dial` — outbound dial progress (answered, failed, no-answer, etc.). - - - - `calling.call.echo` — test/diagnostic echo reflection from the server. - - - - `calling.call.fax` — fax send/receive progress update. - - - - `calling.call.hold` — hold/unhold state change on the call. - - - - `messaging.receive` — inbound SMS/MMS received on a subscribed context. - - - - `messaging.state` — state change for an outbound message (queued → sent → delivered/failed). - - - - `calling.call.pay` — PCI-compliant payment collection progress update. - - - - `calling.call.play` — play-media action state change (`playing`, `paused`, `finished`, `error`). - - - - `calling.call.queue` — call-queue position update (queued, waiting, member answered, timed out). - - - - `calling.call.record` — recording state change with final URL, duration, and size when finished. - - - - `calling.call.refer` — SIP REFER result (off-platform transfer response codes). - - - - `calling.call.send_digits` — progress update for DTMF digits sent out on a call. - - - - `calling.call.stream` — outbound media stream state change (e.g. RTMP/WebSocket streaming). - - - - `calling.call.tap` — media tap state change (audio mirror to an external endpoint). - - - - `calling.call.transcribe` — transcription state change and final URL/duration when finished. - - diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/message-receive-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/message-receive-event/index.mdx index 2ba7a4de2b..56956af447 100644 --- a/fern/products/sdk-reference/typescript/relay/relay-event/message-receive-event/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/relay-event/message-receive-event/index.mdx @@ -24,7 +24,7 @@ class MessageReceiveEvent extends RelayEvent ## Inheritance -**Extends:** `RelayEvent` +**Extends:** [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) ## Properties diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/message-state-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/message-state-event/index.mdx index ed9cee0b52..89140613ea 100644 --- a/fern/products/sdk-reference/typescript/relay/relay-event/message-state-event/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/relay-event/message-state-event/index.mdx @@ -24,7 +24,7 @@ class MessageStateEvent extends RelayEvent ## Inheritance -**Extends:** `RelayEvent` +**Extends:** [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) ## Properties diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/pay-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/pay-event/index.mdx index bb41e11392..95cb88d6d1 100644 --- a/fern/products/sdk-reference/typescript/relay/relay-event/pay-event/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/relay-event/pay-event/index.mdx @@ -24,7 +24,7 @@ class PayEvent extends RelayEvent ## Inheritance -**Extends:** `RelayEvent` +**Extends:** [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) ## Properties diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/play-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/play-event/index.mdx index 80bdbe6f3d..049c1f3899 100644 --- a/fern/products/sdk-reference/typescript/relay/relay-event/play-event/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/relay-event/play-event/index.mdx @@ -24,7 +24,7 @@ class PlayEvent extends RelayEvent ## Inheritance -**Extends:** `RelayEvent` +**Extends:** [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) ## Properties diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/queue-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/queue-event/index.mdx index 61b3ead2f5..07ae78edc9 100644 --- a/fern/products/sdk-reference/typescript/relay/relay-event/queue-event/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/relay-event/queue-event/index.mdx @@ -24,7 +24,7 @@ class QueueEvent extends RelayEvent ## Inheritance -**Extends:** `RelayEvent` +**Extends:** [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) ## Properties diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/record-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/record-event/index.mdx index c22e71f20b..f3cb4a2ba1 100644 --- a/fern/products/sdk-reference/typescript/relay/relay-event/record-event/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/relay-event/record-event/index.mdx @@ -24,7 +24,7 @@ class RecordEvent extends RelayEvent ## Inheritance -**Extends:** `RelayEvent` +**Extends:** [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) ## Properties diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/refer-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/refer-event/index.mdx index 79742ec73b..4263fea541 100644 --- a/fern/products/sdk-reference/typescript/relay/relay-event/refer-event/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/relay-event/refer-event/index.mdx @@ -24,7 +24,7 @@ class ReferEvent extends RelayEvent ## Inheritance -**Extends:** `RelayEvent` +**Extends:** [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) ## Properties diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/send-digits-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/send-digits-event/index.mdx index 5f33f0d640..dc2f8c0227 100644 --- a/fern/products/sdk-reference/typescript/relay/relay-event/send-digits-event/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/relay-event/send-digits-event/index.mdx @@ -24,7 +24,7 @@ class SendDigitsEvent extends RelayEvent ## Inheritance -**Extends:** `RelayEvent` +**Extends:** [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) ## Properties diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/stream-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/stream-event/index.mdx index f69ee473e9..280cdca7c7 100644 --- a/fern/products/sdk-reference/typescript/relay/relay-event/stream-event/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/relay-event/stream-event/index.mdx @@ -24,7 +24,7 @@ class StreamEvent extends RelayEvent ## Inheritance -**Extends:** `RelayEvent` +**Extends:** [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) ## Properties diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/tap-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/tap-event/index.mdx index 82f05ad430..e457889149 100644 --- a/fern/products/sdk-reference/typescript/relay/relay-event/tap-event/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/relay-event/tap-event/index.mdx @@ -24,7 +24,7 @@ class TapEvent extends RelayEvent ## Inheritance -**Extends:** `RelayEvent` +**Extends:** [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) ## Properties diff --git a/fern/products/sdk-reference/typescript/relay/relay-event/transcribe-event/index.mdx b/fern/products/sdk-reference/typescript/relay/relay-event/transcribe-event/index.mdx index 9db59aea31..aaa6003e33 100644 --- a/fern/products/sdk-reference/typescript/relay/relay-event/transcribe-event/index.mdx +++ b/fern/products/sdk-reference/typescript/relay/relay-event/transcribe-event/index.mdx @@ -24,7 +24,7 @@ class TranscribeEvent extends RelayEvent ## Inheritance -**Extends:** `RelayEvent` +**Extends:** [RelayEvent](/docs/sdk-reference/reference/typescript/relay/relay-event) ## Properties diff --git a/fern/products/sdk-reference/typescript/rest-client.mdx b/fern/products/sdk-reference/typescript/rest-client.mdx deleted file mode 100644 index bb89a12e5b..0000000000 --- a/fern/products/sdk-reference/typescript/rest-client.mdx +++ /dev/null @@ -1,70 +0,0 @@ ---- -slug: "/reference/typescript/rest-client" -title: "restClient" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "function" - language: "typescript" - qualified_name: "restClient" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/index.ts" ---- -# `restClient` - -Construct a [RestClient](/docs/sdk-reference/reference/typescript/rest/rest-client) instance. - -Equivalent to Python's top-level `signalwire.RestClient(*args, **kwargs)` -factory — a thin wrapper that lazy-imports `signalwire.rest.RestClient` -and instantiates it. The TS class is also exported directly at module -scope (`new RestClient(...)`); this function provides parity with the -Python-style factory call. - -Note: TypeScript exports the class `RestClient` at the same name from -`./rest/index.js`. The function below is named `restClient` (camelCase) -to avoid shadowing the class. The audit adapter remaps the emitted -surface entry from `signalwire.rest_client` to `signalwire.RestClient` -via the FREE\_FN\_NAME\_OVERRIDES table in enumerate-signatures.ts. - -The signature accepts a positional `args` rest parameter and a trailing -`kwargs` record. This mirrors Python's `(*args, **kwargs)` shape so the -cross-language signature audit recognizes them as compatible. In -practice callers pass either the `kwargs` object alone or nothing. - -## Signature - -```typescript -restClient(args?: string[], kwargs?: Record): RestClient -``` - -## Parameters - - - Positional credentials (compat shim for ports that pass project/token/host positionally). Usually empty in TS. - - - - Keyword-style credentials. When omitted, reads `SIGNALWIRE_PROJECT_ID`, `SIGNALWIRE_API_TOKEN`, and `SIGNALWIRE_SPACE` from the environment. - - -## Returns - -`RestClient` — A new `_RestClient` instance bound to the supplied (or environment-derived) credentials. - -## Examples - -```typescript -import { restClient } from '@signalwire/sdk'; - -const client = restClient([], { project: 'p', token: 't', host: 'h.signalwire.com' }); -await client.compat.calls.list(); - -// Or using just the options form: -const env = restClient(); // reads env vars -``` - -## Source - -[`src/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/index.ts) - -Line 255. diff --git a/fern/products/sdk-reference/typescript/rest/addresses/addresses-resource/index.mdx b/fern/products/sdk-reference/typescript/rest/addresses/addresses-resource/index.mdx deleted file mode 100644 index 479749cfec..0000000000 --- a/fern/products/sdk-reference/typescript/rest/addresses/addresses-resource/index.mdx +++ /dev/null @@ -1,187 +0,0 @@ ---- -slug: "/reference/typescript/rest/addresses/addresses-resource" -title: "AddressesResource" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "rest.namespaces.addresses.AddressesResource" - parent: "rest.namespaces.addresses" - module: "rest.addresses" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/addresses.ts" ---- -# `AddressesResource` - -Address management (no update endpoint). - -Access via `client.addresses.*`. - -## Signature - -```typescript -class AddressesResource extends BaseResource -``` - -## Inheritance - -**Extends:** [BaseResource](/docs/sdk-reference/reference/typescript/rest/base/base-resource) - -## Methods - -### constructor - -#### Signature - -```typescript -constructor(http: HttpClient): AddressesResource -``` - -#### Parameters - - - -#### Returns - -`AddressesResource` - -#### Source - -[`src/rest/namespaces/addresses.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/addresses.ts) - -Line 17. - -*** - -### create - -Create a new address. - -#### Signature - -```typescript -create(body: any): Promise -``` - -#### Parameters - - - Address attributes (name, display name, context, etc.). - - -#### Returns - -`Promise` — The newly-created address. - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/namespaces/addresses.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/addresses.ts) - -Line 39. - -*** - -### delete - -Delete an address. - -#### Signature - -```typescript -delete(addressId: string): Promise -``` - -#### Parameters - - - Unique identifier of the address. - - -#### Returns - -`Promise` — The platform's delete response. - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/namespaces/addresses.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/addresses.ts) - -Line 61. - -*** - -### get - -Fetch a single address by ID. - -#### Signature - -```typescript -get(addressId: string): Promise -``` - -#### Parameters - - - Unique identifier of the address. - - -#### Returns - -`Promise` — The address record. - -#### Throws - -- On any non-2xx HTTP response (including `404`). - -#### Source - -[`src/rest/namespaces/addresses.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/addresses.ts) - -Line 50. - -*** - -### list - -List all addresses in the project. - -#### Signature - -```typescript -list(params?: QueryParams): Promise -``` - -#### Parameters - - - Optional filter / pagination query parameters. - - -#### Returns - -`Promise` — A paginated list of addresses. - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/namespaces/addresses.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/addresses.ts) - -Line 28. - -## Source - -[`src/rest/namespaces/addresses.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/addresses.ts) - -Line 16. diff --git a/fern/products/sdk-reference/typescript/rest/addresses/index.mdx b/fern/products/sdk-reference/typescript/rest/addresses/index.mdx index 3b4935ce43..d792edb683 100644 --- a/fern/products/sdk-reference/typescript/rest/addresses/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/addresses/index.mdx @@ -5,7 +5,7 @@ sdk_label: "TypeScript SDK" icon: "typescript" lustri: auto_generated: true - kind: "module" + kind: "class" language: "typescript" qualified_name: "rest.namespaces.addresses" parent: "rest" @@ -14,22 +14,174 @@ lustri: --- # `addresses` +Address management (no update endpoint). + +Access via `client.addresses.*`. + ## Signature ```typescript -module addresses +class AddressesResource extends BaseResource +``` + +## Inheritance + +**Extends:** [BaseResource](/docs/sdk-reference/reference/typescript/rest/base/base-resource) + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient): AddressesResource +``` + +#### Parameters + + + +#### Returns + +`AddressesResource` + +#### Source + +[`src/rest/namespaces/addresses.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/addresses.ts) + +Line 17. + +*** + +### create + +Create a new address. + +#### Signature + +```typescript +create(body: any): Promise +``` + +#### Parameters + + + Address attributes (name, display name, context, etc.). + + +#### Returns + +`Promise` — The newly-created address. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/addresses.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/addresses.ts) + +Line 39. + +*** + +### delete + +Delete an address. + +#### Signature + +```typescript +delete(addressId: string): Promise ``` -## Classes +#### Parameters + + + Unique identifier of the address. + + +#### Returns + +`Promise` — The platform's delete response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/addresses.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/addresses.ts) + +Line 61. + +*** + +### get + +Fetch a single address by ID. + +#### Signature + +```typescript +get(addressId: string): Promise +``` + +#### Parameters + + + Unique identifier of the address. + + +#### Returns + +`Promise` — The address record. + +#### Throws + +- On any non-2xx HTTP response (including `404`). + +#### Source + +[`src/rest/namespaces/addresses.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/addresses.ts) + +Line 50. + +*** + +### list + +List all addresses in the project. + +#### Signature + +```typescript +list(params?: QueryParams): Promise +``` + +#### Parameters + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — A paginated list of addresses. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/addresses.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/addresses.ts) - - - Address management (no update endpoint). - - +Line 28. ## Source [`src/rest/namespaces/addresses.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/addresses.ts) -Line 1. +Line 16. diff --git a/fern/products/sdk-reference/typescript/rest/base/base-resource/index.mdx b/fern/products/sdk-reference/typescript/rest/base/base-resource/index.mdx index 761e00c92b..460e7fb33d 100644 --- a/fern/products/sdk-reference/typescript/rest/base/base-resource/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/base/base-resource/index.mdx @@ -16,7 +16,7 @@ lustri: Abstract base class for all REST resources. -Every namespace resource (e.g. [PhoneNumbersResource](/docs/sdk-reference/reference/typescript/rest/phone-numbers/phone-numbers-resource), [VideoRooms](/docs/sdk-reference/reference/typescript/rest/video/video-rooms)) +Every namespace resource (e.g. `PhoneNumbersResource`, [VideoRooms](/docs/sdk-reference/reference/typescript/rest/video/video-rooms)) extends this class to get a typed reference to the shared [HttpClient](/docs/sdk-reference/reference/typescript/rest/http-client) and a small path-building helper. Not exported for direct use — subclass it. diff --git a/fern/products/sdk-reference/typescript/rest/call-handler/index.mdx b/fern/products/sdk-reference/typescript/rest/call-handler/index.mdx index c798f5c8a9..81c89faeca 100644 --- a/fern/products/sdk-reference/typescript/rest/call-handler/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/call-handler/index.mdx @@ -23,7 +23,7 @@ module callHandler ## Constants - PhoneCallHandler — enum of `call_handler` values accepted by [PhoneNumbersResource.update](/docs/sdk-reference/reference/typescript/rest/phone-numbers/phone-numbers-resource#update). Named `PhoneCallHandler` (not `CallHandler`) to avoid colliding with the RELAY client's inbound-call-handler callback type already exported from `src/relay/types.ts`. Setting a phone number's `call_handler` + the handler-specific companion field routes inbound calls and auto-materializes the matching Fabric resource on the server. See the high-level helpers on [PhoneNumbersResource](/docs/sdk-reference/reference/typescript/rest/phone-numbers/phone-numbers-resource) (`setSwmlWebhook`, `setCxmlWebhook`, `setCxmlApplication`, `setAiAgent`, `setCallFlow`, `setRelayApplication`, `setRelayTopic`). | Member | Wire value | Companion field | Auto-creates Fabric resource | |---|---|---|---| | `RELAY_SCRIPT` | `relay_script` | `call_relay_script_url` | `swml_webhook` | | `LAML_WEBHOOKS` | `laml_webhooks` | `call_request_url` | `cxml_webhook` | | `LAML_APPLICATION` | `laml_application` | `call_laml_application_id` | `cxml_application` | | `AI_AGENT` | `ai_agent` | `call_ai_agent_id` | `ai_agent` | | `CALL_FLOW` | `call_flow` | `call_flow_id` | `call_flow` | | `RELAY_APPLICATION` | `relay_application` | `call_relay_application` | `relay_application` | | `RELAY_TOPIC` | `relay_topic` | `call_relay_topic` | _(routes via RELAY)_ | | `RELAY_CONTEXT` | `relay_context` | `call_relay_context` | _(legacy, prefer topic)_ | | `RELAY_CONNECTOR` | `relay_connector` | _(connector config)_ | _(internal)_ | | `VIDEO_ROOM` | `video_room` | `call_video_room_id` | _(routes to Video API)_ | | `DIALOGFLOW` | `dialogflow` | `call_dialogflow_agent_id` | _(none)_ | Note: `LAML_WEBHOOKS` (wire value `laml_webhooks`) produces a **cXML** handler, not a generic webhook. For SWML, use `RELAY_SCRIPT`. + PhoneCallHandler — enum of `call_handler` values accepted by [PhoneNumbersResource.update](/docs/sdk-reference/reference/typescript/rest/phone-numbers#update). Named `PhoneCallHandler` (not `CallHandler`) to avoid colliding with the RELAY client's inbound-call-handler callback type already exported from `src/relay/types.ts`. Setting a phone number's `call_handler` + the handler-specific companion field routes inbound calls and auto-materializes the matching Fabric resource on the server. See the high-level helpers on `PhoneNumbersResource` (`setSwmlWebhook`, `setCxmlWebhook`, `setCxmlApplication`, `setAiAgent`, `setCallFlow`, `setRelayApplication`, `setRelayTopic`). | Member | Wire value | Companion field | Auto-creates Fabric resource | |---|---|---|---| | `RELAY_SCRIPT` | `relay_script` | `call_relay_script_url` | `swml_webhook` | | `LAML_WEBHOOKS` | `laml_webhooks` | `call_request_url` | `cxml_webhook` | | `LAML_APPLICATION` | `laml_application` | `call_laml_application_id` | `cxml_application` | | `AI_AGENT` | `ai_agent` | `call_ai_agent_id` | `ai_agent` | | `CALL_FLOW` | `call_flow` | `call_flow_id` | `call_flow` | | `RELAY_APPLICATION` | `relay_application` | `call_relay_application` | `relay_application` | | `RELAY_TOPIC` | `relay_topic` | `call_relay_topic` | _(routes via RELAY)_ | | `RELAY_CONTEXT` | `relay_context` | `call_relay_context` | _(legacy, prefer topic)_ | | `RELAY_CONNECTOR` | `relay_connector` | _(connector config)_ | _(internal)_ | | `VIDEO_ROOM` | `video_room` | `call_video_room_id` | _(routes to Video API)_ | | `DIALOGFLOW` | `dialogflow` | `call_dialogflow_agent_id` | _(none)_ | Note: `LAML_WEBHOOKS` (wire value `laml_webhooks`) produces a **cXML** handler, not a generic webhook. For SWML, use `RELAY_SCRIPT`. ## Type Aliases diff --git a/fern/products/sdk-reference/typescript/rest/calling/calling-namespace/index.mdx b/fern/products/sdk-reference/typescript/rest/calling/calling-namespace/index.mdx deleted file mode 100644 index 911b55af64..0000000000 --- a/fern/products/sdk-reference/typescript/rest/calling/calling-namespace/index.mdx +++ /dev/null @@ -1,1414 +0,0 @@ ---- -slug: "/reference/typescript/rest/calling/calling-namespace" -title: "CallingNamespace" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "rest.namespaces.calling.CallingNamespace" - parent: "rest.namespaces.calling" - module: "rest.calling" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts" ---- -# `CallingNamespace` - -REST call control — all 37 commands dispatched via a single POST endpoint. - -Access via `client.calling.*`. Every method issues one command against a live -call by ID and returns the platform's JSON response. - -Every command method shares the same shape: - -- First argument (when present) is the target call's ID. -- Second argument is a platform-shaped `params` object — see the - [Calling API reference](https://developer.signalwire.com/rest/signalwire-rest/endpoints/calling/) - for the fields each command accepts. -- The method returns the JSON-decoded platform response. -- Throws [RestError](/docs/sdk-reference/reference/typescript/rest/rest-error) on any non-2xx HTTP response. - -## Signature - -```typescript -class CallingNamespace extends BaseResource -``` - -## Inheritance - -**Extends:** [BaseResource](/docs/sdk-reference/reference/typescript/rest/base/base-resource) - -## Examples - - - - ```typescript - await client.calling.play(callId, { - play: [{ type: 'audio', url: 'https://cdn.example.com/hold.mp3' }], - }); - ``` - - - - ```typescript - const rec = await client.calling.record(callId, { record: { audio: {} } }); - // ... later ... - await client.calling.recordStop(callId, { control_id: rec.control_id }); - ``` - - - -## Methods - -### aiHold - -Put the AI session on hold (pause turn-taking). - -#### Signature - -```typescript -aiHold(callId: string, params: any = {}): Promise -``` - -#### Parameters - - - Target call's ID. - - - - Platform-shaped parameters. Defaults to `{}`. - - -#### Returns - -`Promise` — The platform's response. - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) - -Line 424. - -*** - -### aiMessage - -Send a message into an active AI agent session. - -#### Signature - -```typescript -aiMessage(callId: string, params: any = {}): Promise -``` - -#### Parameters - - - Target call's ID. - - - - AI message payload. Defaults to `{}`. - - -#### Returns - -`Promise` — The platform's response. - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) - -Line 412. - -*** - -### aiStop - -Terminate the active AI session on a call. - -#### Signature - -```typescript -aiStop(callId: string, params: any = {}): Promise -``` - -#### Parameters - - - Target call's ID. - - - - Platform-shaped parameters. Defaults to `{}`. - - -#### Returns - -`Promise` — The platform's response. - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) - -Line 448. - -*** - -### aiUnhold - -Resume an AI session that was on hold. - -#### Signature - -```typescript -aiUnhold(callId: string, params: any = {}): Promise -``` - -#### Parameters - - - Target call's ID. - - - - Platform-shaped parameters. Defaults to `{}`. - - -#### Returns - -`Promise` — The platform's response. - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) - -Line 436. - -*** - -### collect - -Collect DTMF / speech input from the caller. - -#### Signature - -```typescript -collect(callId: string, params: any = {}): Promise -``` - -#### Parameters - - - Target call's ID. - - - - Collect configuration (`digits`, `speech`, timeouts, etc.). Defaults to `{}`. - - -#### Returns - -`Promise` — The collect command response containing a `control_id`. - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) - -Line 242. - -*** - -### collectStartInputTimers - -Start input timers for a collect operation (useful when `initial_timeout` -should be reset after media finishes playing). - -#### Signature - -```typescript -collectStartInputTimers(callId: string, params: any = {}): Promise -``` - -#### Parameters - - - Target call's ID. - - - - Must include `control_id`. Defaults to `{}`. - - -#### Returns - -`Promise` — The platform's response. - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) - -Line 267. - -*** - -### collectStop - -Stop an in-progress collect operation. - -#### Signature - -```typescript -collectStop(callId: string, params: any = {}): Promise -``` - -#### Parameters - - - Target call's ID. - - - - Must include `control_id`. Defaults to `{}`. - - -#### Returns - -`Promise` — The platform's response. - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) - -Line 254. - -*** - -### constructor - -#### Signature - -```typescript -constructor(http: HttpClient): CallingNamespace -``` - -#### Parameters - - - -#### Returns - -`CallingNamespace` - -#### Source - -[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) - -Line 42. - -*** - -### denoise - -Enable noise reduction on the call. - -#### Signature - -```typescript -denoise(callId: string, params: any = {}): Promise -``` - -#### Parameters - - - Target call's ID. - - - - Denoise configuration. Defaults to `{}`. - - -#### Returns - -`Promise` — The platform's response. - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) - -Line 360. - -*** - -### denoiseStop - -Disable noise reduction. - -#### Signature - -```typescript -denoiseStop(callId: string, params: any = {}): Promise -``` - -#### Parameters - - - Target call's ID. - - - - Platform-shaped parameters. Defaults to `{}`. - - -#### Returns - -`Promise` — The platform's response. - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) - -Line 372. - -*** - -### detect - -Run answering-machine / fax / DTMF detection. - -#### Signature - -```typescript -detect(callId: string, params: any = {}): Promise -``` - -#### Parameters - - - Target call's ID. - - - - Detect configuration. Defaults to `{}`. - - -#### Returns - -`Promise` — The detect command response containing a `control_id`. - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) - -Line 281. - -*** - -### detectStop - -Stop an active detect operation. - -#### Signature - -```typescript -detectStop(callId: string, params: any = {}): Promise -``` - -#### Parameters - - - Target call's ID. - - - - Must include `control_id`. Defaults to `{}`. - - -#### Returns - -`Promise` — The platform's response. - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) - -Line 293. - -*** - -### dial - -Place an outbound call. - -#### Signature - -```typescript -dial(params: any = {}): Promise -``` - -#### Parameters - - - Platform-shaped dial parameters (from, to, timeout, etc.). Defaults to `{}`. - - -#### Returns - -`Promise` — The dial command response, typically containing a new `call_id`. - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) - -Line 64. - -*** - -### disconnect - -Drop one leg from a call without ending the other. - -#### Signature - -```typescript -disconnect(callId: string, params: any = {}): Promise -``` - -#### Parameters - - - Target call's ID. - - - - Platform-shaped disconnect parameters. Defaults to `{}`. - - -#### Returns - -`Promise` — The platform's response. - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) - -Line 112. - -*** - -### end - -Gracefully end a call. - -#### Signature - -```typescript -end(callId: string, params: any = {}): Promise -``` - -#### Parameters - - - Target call's ID. - - - - Platform-shaped end parameters. Defaults to `{}`. - - -#### Returns - -`Promise` — The platform's response. - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) - -Line 87. - -*** - -### liveTranscribe - -Start live transcription that emits events as speech is recognised. - -#### Signature - -```typescript -liveTranscribe(callId: string, params: any = {}): Promise -``` - -#### Parameters - - - Target call's ID. - - - - Configuration (languages, model, partials, etc.). Defaults to `{}`. - - -#### Returns - -`Promise` — The platform's response. - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) - -Line 463. - -*** - -### liveTranslate - -Start live translation between two languages. - -#### Signature - -```typescript -liveTranslate(callId: string, params: any = {}): Promise -``` - -#### Parameters - - - Target call's ID. - - - - Configuration (`source_lang`, `target_lang`, etc.). Defaults to `{}`. - - -#### Returns - -`Promise` — The platform's response. - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) - -Line 476. - -*** - -### play - -Start media playback on a call. - -#### Signature - -```typescript -play(callId: string, params: any = {}): Promise -``` - -#### Parameters - - - Target call's ID. - - - - Playback parameters — see `Play` action schema. Defaults to `{}`. - - -#### Returns - -`Promise` — The play command response, containing a `control_id` used to pause / resume / stop the playback later. - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) - -Line 127. - -*** - -### playPause - -Pause active playback. - -#### Signature - -```typescript -playPause(callId: string, params: any = {}): Promise -``` - -#### Parameters - - - Target call's ID. - - - - Must include `control_id` from the matching `play()` call. Defaults to `{}`. - - -#### Returns - -`Promise` — The platform's response. - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) - -Line 140. - -*** - -### playResume - -Resume paused playback. - -#### Signature - -```typescript -playResume(callId: string, params: any = {}): Promise -``` - -#### Parameters - - - Target call's ID. - - - - Must include `control_id`. Defaults to `{}`. - - -#### Returns - -`Promise` — The platform's response. - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) - -Line 152. - -*** - -### playStop - -Stop active playback. - -#### Signature - -```typescript -playStop(callId: string, params: any = {}): Promise -``` - -#### Parameters - - - Target call's ID. - - - - Must include `control_id`. Defaults to `{}`. - - -#### Returns - -`Promise` — The platform's response. - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) - -Line 164. - -*** - -### playVolume - -Adjust the playback volume. - -#### Signature - -```typescript -playVolume(callId: string, params: any = {}): Promise -``` - -#### Parameters - - - Target call's ID. - - - - `control_id` plus `volume` (integer dB). Defaults to `{}`. - - -#### Returns - -`Promise` — The platform's response. - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) - -Line 176. - -*** - -### receiveFaxStop - -Stop a receive-fax operation mid-stream. - -#### Signature - -```typescript -receiveFaxStop(callId: string, params: any = {}): Promise -``` - -#### Parameters - - - Target call's ID. - - - - Must include `control_id`. Defaults to `{}`. - - -#### Returns - -`Promise` — The platform's response. - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) - -Line 502. - -*** - -### record - -Start recording a call. - -#### Signature - -```typescript -record(callId: string, params: any = {}): Promise -``` - -#### Parameters - - - Target call's ID. - - - - Recording parameters (`record` config, callbacks, etc.). Defaults to `{}`. - - -#### Returns - -`Promise` — The record command response containing a `control_id`. - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) - -Line 191. - -*** - -### recordPause - -Pause an active recording. - -#### Signature - -```typescript -recordPause(callId: string, params: any = {}): Promise -``` - -#### Parameters - - - Target call's ID. - - - - Must include `control_id`. Defaults to `{}`. - - -#### Returns - -`Promise` — The platform's response. - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) - -Line 203. - -*** - -### recordResume - -Resume a paused recording. - -#### Signature - -```typescript -recordResume(callId: string, params: any = {}): Promise -``` - -#### Parameters - - - Target call's ID. - - - - Must include `control_id`. Defaults to `{}`. - - -#### Returns - -`Promise` — The platform's response. - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) - -Line 215. - -*** - -### recordStop - -Stop and finalise a recording. - -#### Signature - -```typescript -recordStop(callId: string, params: any = {}): Promise -``` - -#### Parameters - - - Target call's ID. - - - - Must include `control_id`. Defaults to `{}`. - - -#### Returns - -`Promise` — The final recording metadata. - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) - -Line 227. - -*** - -### refer - -Send a SIP REFER to transfer a call outside the platform. - -#### Signature - -```typescript -refer(callId: string, params: any = {}): Promise -``` - -#### Parameters - - - Target call's ID. - - - - REFER parameters (`refer_to`, etc.). Defaults to `{}`. - - -#### Returns - -`Promise` — The platform's response. - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) - -Line 516. - -*** - -### sendFaxStop - -Stop a send-fax operation mid-stream. - -#### Signature - -```typescript -sendFaxStop(callId: string, params: any = {}): Promise -``` - -#### Parameters - - - Target call's ID. - - - - Must include `control_id`. Defaults to `{}`. - - -#### Returns - -`Promise` — The platform's response. - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) - -Line 490. - -*** - -### stream - -Start an outbound media stream (typically to a WebSocket endpoint). - -#### Signature - -```typescript -stream(callId: string, params: any = {}): Promise -``` - -#### Parameters - - - Target call's ID. - - - - Stream configuration. Defaults to `{}`. - - -#### Returns - -`Promise` — The stream command response containing a `control_id`. - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) - -Line 334. - -*** - -### streamStop - -Stop an outbound media stream. - -#### Signature - -```typescript -streamStop(callId: string, params: any = {}): Promise -``` - -#### Parameters - - - Target call's ID. - - - - Must include `control_id`. Defaults to `{}`. - - -#### Returns - -`Promise` — The platform's response. - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) - -Line 346. - -*** - -### tap - -Start a media tap (mirror audio to an external URI). - -#### Signature - -```typescript -tap(callId: string, params: any = {}): Promise -``` - -#### Parameters - - - Target call's ID. - - - - Tap configuration (`uri`, `direction`, `codec`, etc.). Defaults to `{}`. - - -#### Returns - -`Promise` — The tap command response containing a `control_id`. - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) - -Line 308. - -*** - -### tapStop - -Stop an active media tap. - -#### Signature - -```typescript -tapStop(callId: string, params: any = {}): Promise -``` - -#### Parameters - - - Target call's ID. - - - - Must include `control_id`. Defaults to `{}`. - - -#### Returns - -`Promise` — The platform's response. - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) - -Line 320. - -*** - -### transcribe - -Start real-time transcription on the call. - -#### Signature - -```typescript -transcribe(callId: string, params: any = {}): Promise -``` - -#### Parameters - - - Target call's ID. - - - - Transcription configuration. Defaults to `{}`. - - -#### Returns - -`Promise` — The transcribe command response containing a `control_id`. - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) - -Line 386. - -*** - -### transcribeStop - -Stop real-time transcription. - -#### Signature - -```typescript -transcribeStop(callId: string, params: any = {}): Promise -``` - -#### Parameters - - - Target call's ID. - - - - Must include `control_id`. Defaults to `{}`. - - -#### Returns - -`Promise` — The final transcription metadata. - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) - -Line 398. - -*** - -### transfer - -Transfer a call to another destination. - -#### Signature - -```typescript -transfer(callId: string, params: any = {}): Promise -``` - -#### Parameters - - - Target call's ID. - - - - Platform-shaped transfer parameters (`to`, `from`, etc.). Defaults to `{}`. - - -#### Returns - -`Promise` — The platform's response. - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) - -Line 100. - -*** - -### update - -Update properties on an in-progress call. - -#### Signature - -```typescript -update(params: any = {}): Promise -``` - -#### Parameters - - - Platform-shaped update parameters. Defaults to `{}`. - - -#### Returns - -`Promise` — The platform's response. - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) - -Line 75. - -*** - -### userEvent - -Emit a custom user event on the call for your webhooks. - -#### Signature - -```typescript -userEvent(callId: string, params: any = {}): Promise -``` - -#### Parameters - - - Target call's ID. - - - - Event payload — freeform data delivered to your webhook. Defaults to `{}`. - - -#### Returns - -`Promise` — The platform's response. - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) - -Line 531. - -## Source - -[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) - -Line 41. diff --git a/fern/products/sdk-reference/typescript/rest/calling/index.mdx b/fern/products/sdk-reference/typescript/rest/calling/index.mdx index 1d43e93856..ec79cf7971 100644 --- a/fern/products/sdk-reference/typescript/rest/calling/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/calling/index.mdx @@ -5,7 +5,7 @@ sdk_label: "TypeScript SDK" icon: "typescript" lustri: auto_generated: true - kind: "module" + kind: "class" language: "typescript" qualified_name: "rest.namespaces.calling" parent: "rest" @@ -14,22 +14,1401 @@ lustri: --- # `calling` +REST call control — all 37 commands dispatched via a single POST endpoint. + +Access via `client.calling.*`. Every method issues one command against a live +call by ID and returns the platform's JSON response. + +Every command method shares the same shape: + +- First argument (when present) is the target call's ID. +- Second argument is a platform-shaped `params` object — see the + [Calling API reference](https://developer.signalwire.com/rest/signalwire-rest/endpoints/calling/) + for the fields each command accepts. +- The method returns the JSON-decoded platform response. +- Throws [RestError](/docs/sdk-reference/reference/typescript/rest/rest-error) on any non-2xx HTTP response. + ## Signature ```typescript -module calling +class CallingNamespace extends BaseResource +``` + +## Inheritance + +**Extends:** [BaseResource](/docs/sdk-reference/reference/typescript/rest/base/base-resource) + +## Examples + + + + ```typescript + await client.calling.play(callId, { + play: [{ type: 'audio', url: 'https://cdn.example.com/hold.mp3' }], + }); + ``` + + + + ```typescript + const rec = await client.calling.record(callId, { record: { audio: {} } }); + // ... later ... + await client.calling.recordStop(callId, { control_id: rec.control_id }); + ``` + + + +## Methods + +### aiHold + +Put the AI session on hold (pause turn-taking). + +#### Signature + +```typescript +aiHold(callId: string, params: any = {}): Promise +``` + +#### Parameters + + + Target call's ID. + + + + Platform-shaped parameters. Defaults to `{}`. + + +#### Returns + +`Promise` — The platform's response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 424. + +*** + +### aiMessage + +Send a message into an active AI agent session. + +#### Signature + +```typescript +aiMessage(callId: string, params: any = {}): Promise +``` + +#### Parameters + + + Target call's ID. + + + + AI message payload. Defaults to `{}`. + + +#### Returns + +`Promise` — The platform's response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 412. + +*** + +### aiStop + +Terminate the active AI session on a call. + +#### Signature + +```typescript +aiStop(callId: string, params: any = {}): Promise +``` + +#### Parameters + + + Target call's ID. + + + + Platform-shaped parameters. Defaults to `{}`. + + +#### Returns + +`Promise` — The platform's response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 448. + +*** + +### aiUnhold + +Resume an AI session that was on hold. + +#### Signature + +```typescript +aiUnhold(callId: string, params: any = {}): Promise +``` + +#### Parameters + + + Target call's ID. + + + + Platform-shaped parameters. Defaults to `{}`. + + +#### Returns + +`Promise` — The platform's response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 436. + +*** + +### collect + +Collect DTMF / speech input from the caller. + +#### Signature + +```typescript +collect(callId: string, params: any = {}): Promise +``` + +#### Parameters + + + Target call's ID. + + + + Collect configuration (`digits`, `speech`, timeouts, etc.). Defaults to `{}`. + + +#### Returns + +`Promise` — The collect command response containing a `control_id`. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 242. + +*** + +### collectStartInputTimers + +Start input timers for a collect operation (useful when `initial_timeout` +should be reset after media finishes playing). + +#### Signature + +```typescript +collectStartInputTimers(callId: string, params: any = {}): Promise +``` + +#### Parameters + + + Target call's ID. + + + + Must include `control_id`. Defaults to `{}`. + + +#### Returns + +`Promise` — The platform's response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 267. + +*** + +### collectStop + +Stop an in-progress collect operation. + +#### Signature + +```typescript +collectStop(callId: string, params: any = {}): Promise +``` + +#### Parameters + + + Target call's ID. + + + + Must include `control_id`. Defaults to `{}`. + + +#### Returns + +`Promise` — The platform's response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 254. + +*** + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient): CallingNamespace +``` + +#### Parameters + + + +#### Returns + +`CallingNamespace` + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 42. + +*** + +### denoise + +Enable noise reduction on the call. + +#### Signature + +```typescript +denoise(callId: string, params: any = {}): Promise +``` + +#### Parameters + + + Target call's ID. + + + + Denoise configuration. Defaults to `{}`. + + +#### Returns + +`Promise` — The platform's response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 360. + +*** + +### denoiseStop + +Disable noise reduction. + +#### Signature + +```typescript +denoiseStop(callId: string, params: any = {}): Promise +``` + +#### Parameters + + + Target call's ID. + + + + Platform-shaped parameters. Defaults to `{}`. + + +#### Returns + +`Promise` — The platform's response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 372. + +*** + +### detect + +Run answering-machine / fax / DTMF detection. + +#### Signature + +```typescript +detect(callId: string, params: any = {}): Promise ``` -## Classes +#### Parameters + + + Target call's ID. + + + + Detect configuration. Defaults to `{}`. + + +#### Returns + +`Promise` — The detect command response containing a `control_id`. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 281. + +*** + +### detectStop + +Stop an active detect operation. + +#### Signature + +```typescript +detectStop(callId: string, params: any = {}): Promise +``` + +#### Parameters + + + Target call's ID. + + + + Must include `control_id`. Defaults to `{}`. + + +#### Returns + +`Promise` — The platform's response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 293. + +*** + +### dial + +Place an outbound call. + +#### Signature + +```typescript +dial(params: any = {}): Promise +``` + +#### Parameters + + + Platform-shaped dial parameters (from, to, timeout, etc.). Defaults to `{}`. + + +#### Returns + +`Promise` — The dial command response, typically containing a new `call_id`. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 64. + +*** + +### disconnect + +Drop one leg from a call without ending the other. + +#### Signature + +```typescript +disconnect(callId: string, params: any = {}): Promise +``` + +#### Parameters + + + Target call's ID. + + + + Platform-shaped disconnect parameters. Defaults to `{}`. + + +#### Returns + +`Promise` — The platform's response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 112. + +*** + +### end + +Gracefully end a call. + +#### Signature + +```typescript +end(callId: string, params: any = {}): Promise +``` + +#### Parameters + + + Target call's ID. + + + + Platform-shaped end parameters. Defaults to `{}`. + + +#### Returns + +`Promise` — The platform's response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 87. + +*** + +### liveTranscribe + +Start live transcription that emits events as speech is recognised. + +#### Signature + +```typescript +liveTranscribe(callId: string, params: any = {}): Promise +``` + +#### Parameters + + + Target call's ID. + + + + Configuration (languages, model, partials, etc.). Defaults to `{}`. + + +#### Returns + +`Promise` — The platform's response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 463. + +*** + +### liveTranslate + +Start live translation between two languages. + +#### Signature + +```typescript +liveTranslate(callId: string, params: any = {}): Promise +``` + +#### Parameters + + + Target call's ID. + + + + Configuration (`source_lang`, `target_lang`, etc.). Defaults to `{}`. + + +#### Returns + +`Promise` — The platform's response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 476. + +*** + +### play + +Start media playback on a call. + +#### Signature + +```typescript +play(callId: string, params: any = {}): Promise +``` + +#### Parameters + + + Target call's ID. + + + + Playback parameters — see `Play` action schema. Defaults to `{}`. + + +#### Returns + +`Promise` — The play command response, containing a `control_id` used to pause / resume / stop the playback later. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 127. + +*** + +### playPause + +Pause active playback. + +#### Signature + +```typescript +playPause(callId: string, params: any = {}): Promise +``` + +#### Parameters + + + Target call's ID. + + + + Must include `control_id` from the matching `play()` call. Defaults to `{}`. + + +#### Returns + +`Promise` — The platform's response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 140. + +*** + +### playResume + +Resume paused playback. + +#### Signature + +```typescript +playResume(callId: string, params: any = {}): Promise +``` + +#### Parameters + + + Target call's ID. + + + + Must include `control_id`. Defaults to `{}`. + + +#### Returns + +`Promise` — The platform's response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 152. + +*** + +### playStop + +Stop active playback. + +#### Signature + +```typescript +playStop(callId: string, params: any = {}): Promise +``` + +#### Parameters + + + Target call's ID. + + + + Must include `control_id`. Defaults to `{}`. + + +#### Returns + +`Promise` — The platform's response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 164. + +*** + +### playVolume + +Adjust the playback volume. + +#### Signature + +```typescript +playVolume(callId: string, params: any = {}): Promise +``` + +#### Parameters + + + Target call's ID. + + + + `control_id` plus `volume` (integer dB). Defaults to `{}`. + + +#### Returns + +`Promise` — The platform's response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 176. + +*** + +### receiveFaxStop + +Stop a receive-fax operation mid-stream. + +#### Signature + +```typescript +receiveFaxStop(callId: string, params: any = {}): Promise +``` + +#### Parameters + + + Target call's ID. + + + + Must include `control_id`. Defaults to `{}`. + + +#### Returns + +`Promise` — The platform's response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 502. + +*** + +### record + +Start recording a call. + +#### Signature + +```typescript +record(callId: string, params: any = {}): Promise +``` + +#### Parameters + + + Target call's ID. + + + + Recording parameters (`record` config, callbacks, etc.). Defaults to `{}`. + + +#### Returns + +`Promise` — The record command response containing a `control_id`. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 191. + +*** + +### recordPause + +Pause an active recording. + +#### Signature + +```typescript +recordPause(callId: string, params: any = {}): Promise +``` + +#### Parameters + + + Target call's ID. + + + + Must include `control_id`. Defaults to `{}`. + + +#### Returns + +`Promise` — The platform's response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 203. + +*** + +### recordResume + +Resume a paused recording. + +#### Signature + +```typescript +recordResume(callId: string, params: any = {}): Promise +``` + +#### Parameters + + + Target call's ID. + + + + Must include `control_id`. Defaults to `{}`. + + +#### Returns + +`Promise` — The platform's response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 215. + +*** + +### recordStop + +Stop and finalise a recording. + +#### Signature + +```typescript +recordStop(callId: string, params: any = {}): Promise +``` + +#### Parameters + + + Target call's ID. + + + + Must include `control_id`. Defaults to `{}`. + + +#### Returns + +`Promise` — The final recording metadata. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 227. + +*** + +### refer + +Send a SIP REFER to transfer a call outside the platform. + +#### Signature + +```typescript +refer(callId: string, params: any = {}): Promise +``` + +#### Parameters + + + Target call's ID. + + + + REFER parameters (`refer_to`, etc.). Defaults to `{}`. + + +#### Returns + +`Promise` — The platform's response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 516. + +*** + +### sendFaxStop + +Stop a send-fax operation mid-stream. + +#### Signature + +```typescript +sendFaxStop(callId: string, params: any = {}): Promise +``` + +#### Parameters + + + Target call's ID. + + + + Must include `control_id`. Defaults to `{}`. + + +#### Returns + +`Promise` — The platform's response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 490. + +*** + +### stream + +Start an outbound media stream (typically to a WebSocket endpoint). + +#### Signature + +```typescript +stream(callId: string, params: any = {}): Promise +``` + +#### Parameters + + + Target call's ID. + + + + Stream configuration. Defaults to `{}`. + + +#### Returns + +`Promise` — The stream command response containing a `control_id`. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 334. + +*** + +### streamStop + +Stop an outbound media stream. + +#### Signature + +```typescript +streamStop(callId: string, params: any = {}): Promise +``` + +#### Parameters + + + Target call's ID. + + + + Must include `control_id`. Defaults to `{}`. + + +#### Returns + +`Promise` — The platform's response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 346. + +*** + +### tap + +Start a media tap (mirror audio to an external URI). + +#### Signature + +```typescript +tap(callId: string, params: any = {}): Promise +``` + +#### Parameters + + + Target call's ID. + + + + Tap configuration (`uri`, `direction`, `codec`, etc.). Defaults to `{}`. + + +#### Returns + +`Promise` — The tap command response containing a `control_id`. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 308. + +*** + +### tapStop + +Stop an active media tap. + +#### Signature + +```typescript +tapStop(callId: string, params: any = {}): Promise +``` + +#### Parameters + + + Target call's ID. + + + + Must include `control_id`. Defaults to `{}`. + + +#### Returns + +`Promise` — The platform's response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 320. + +*** + +### transcribe + +Start real-time transcription on the call. + +#### Signature + +```typescript +transcribe(callId: string, params: any = {}): Promise +``` + +#### Parameters + + + Target call's ID. + + + + Transcription configuration. Defaults to `{}`. + + +#### Returns + +`Promise` — The transcribe command response containing a `control_id`. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 386. + +*** + +### transcribeStop + +Stop real-time transcription. + +#### Signature + +```typescript +transcribeStop(callId: string, params: any = {}): Promise +``` + +#### Parameters + + + Target call's ID. + + + + Must include `control_id`. Defaults to `{}`. + + +#### Returns + +`Promise` — The final transcription metadata. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 398. + +*** + +### transfer + +Transfer a call to another destination. + +#### Signature + +```typescript +transfer(callId: string, params: any = {}): Promise +``` + +#### Parameters + + + Target call's ID. + + + + Platform-shaped transfer parameters (`to`, `from`, etc.). Defaults to `{}`. + + +#### Returns + +`Promise` — The platform's response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 100. + +*** + +### update + +Update properties on an in-progress call. + +#### Signature + +```typescript +update(params: any = {}): Promise +``` + +#### Parameters + + + Platform-shaped update parameters. Defaults to `{}`. + + +#### Returns + +`Promise` — The platform's response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) + +Line 75. + +*** + +### userEvent + +Emit a custom user event on the call for your webhooks. + +#### Signature + +```typescript +userEvent(callId: string, params: any = {}): Promise +``` + +#### Parameters + + + Target call's ID. + + + + Event payload — freeform data delivered to your webhook. Defaults to `{}`. + + +#### Returns + +`Promise` — The platform's response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) - - - REST call control — all 37 commands dispatched via a single POST endpoint. - - +Line 531. ## Source [`src/rest/namespaces/calling.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/calling.ts) -Line 1. +Line 41. diff --git a/fern/products/sdk-reference/typescript/rest/chat/chat-resource/index.mdx b/fern/products/sdk-reference/typescript/rest/chat/chat-resource/index.mdx deleted file mode 100644 index 04b23e3ff2..0000000000 --- a/fern/products/sdk-reference/typescript/rest/chat/chat-resource/index.mdx +++ /dev/null @@ -1,92 +0,0 @@ ---- -slug: "/reference/typescript/rest/chat/chat-resource" -title: "ChatResource" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "rest.namespaces.chat.ChatResource" - parent: "rest.namespaces.chat" - module: "rest.chat" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/chat.ts" ---- -# `ChatResource` - -Chat token generation. - -Access via `client.chat.*`. Issues short-lived tokens that end-user clients -use to join chat channels. - -## Signature - -```typescript -class ChatResource extends BaseResource -``` - -## Inheritance - -**Extends:** [BaseResource](/docs/sdk-reference/reference/typescript/rest/base/base-resource) - -## Methods - -### constructor - -#### Signature - -```typescript -constructor(http: HttpClient): ChatResource -``` - -#### Parameters - - - -#### Returns - -`ChatResource` - -#### Source - -[`src/rest/namespaces/chat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/chat.ts) - -Line 17. - -*** - -### createToken - -Generate a short-lived Chat token. - -#### Signature - -```typescript -createToken(body: any): Promise -``` - -#### Parameters - - - Token payload (e.g. `{ room_name, user_name, permissions }`). - - -#### Returns - -`Promise` — The token record, typically `{ token: "eyJ..." }`. - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/namespaces/chat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/chat.ts) - -Line 28. - -## Source - -[`src/rest/namespaces/chat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/chat.ts) - -Line 16. diff --git a/fern/products/sdk-reference/typescript/rest/chat/index.mdx b/fern/products/sdk-reference/typescript/rest/chat/index.mdx index 0cf0603d28..3875fb88ca 100644 --- a/fern/products/sdk-reference/typescript/rest/chat/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/chat/index.mdx @@ -5,7 +5,7 @@ sdk_label: "TypeScript SDK" icon: "typescript" lustri: auto_generated: true - kind: "module" + kind: "class" language: "typescript" qualified_name: "rest.namespaces.chat" parent: "rest" @@ -14,22 +14,79 @@ lustri: --- # `chat` +Chat token generation. + +Access via `client.chat.*`. Issues short-lived tokens that end-user clients +use to join chat channels. + ## Signature ```typescript -module chat +class ChatResource extends BaseResource ``` -## Classes +## Inheritance + +**Extends:** [BaseResource](/docs/sdk-reference/reference/typescript/rest/base/base-resource) + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient): ChatResource +``` + +#### Parameters + + + +#### Returns + +`ChatResource` + +#### Source + +[`src/rest/namespaces/chat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/chat.ts) + +Line 17. + +*** + +### createToken + +Generate a short-lived Chat token. + +#### Signature + +```typescript +createToken(body: any): Promise +``` + +#### Parameters + + + Token payload (e.g. `{ room_name, user_name, permissions }`). + + +#### Returns + +`Promise` — The token record, typically `{ token: "eyJ..." }`. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/chat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/chat.ts) - - - Chat token generation. - - +Line 28. ## Source [`src/rest/namespaces/chat.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/chat.ts) -Line 1. +Line 16. diff --git a/fern/products/sdk-reference/typescript/rest/fabric/fabric-namespace/index.mdx b/fern/products/sdk-reference/typescript/rest/fabric/fabric-namespace/index.mdx index 8b7037d819..3d1cd44c40 100644 --- a/fern/products/sdk-reference/typescript/rest/fabric/fabric-namespace/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/fabric/fabric-namespace/index.mdx @@ -59,7 +59,7 @@ const token = await client.fabric.tokens.createSubscriberToken({ subscriber_id: - cXML webhook CRUD. **Auto-materialized** as a side-effect of [PhoneNumbersResource.setCxmlWebhook](/docs/sdk-reference/reference/typescript/rest/phone-numbers/phone-numbers-resource#set-cxml-webhook); direct `create` produces an orphan resource and emits a deprecation warning. + cXML webhook CRUD. **Auto-materialized** as a side-effect of [PhoneNumbersResource.setCxmlWebhook](/docs/sdk-reference/reference/typescript/rest/phone-numbers#set-cxml-webhook); direct `create` produces an orphan resource and emits a deprecation warning. @@ -91,7 +91,7 @@ const token = await client.fabric.tokens.createSubscriberToken({ subscriber_id: - SWML webhook CRUD. **Auto-materialized** as a side-effect of [PhoneNumbersResource.setSwmlWebhook](/docs/sdk-reference/reference/typescript/rest/phone-numbers/phone-numbers-resource#set-swml-webhook); direct `create` produces an orphan resource and emits a deprecation warning. + SWML webhook CRUD. **Auto-materialized** as a side-effect of [PhoneNumbersResource.setSwmlWebhook](/docs/sdk-reference/reference/typescript/rest/phone-numbers#set-swml-webhook); direct `create` produces an orphan resource and emits a deprecation warning. diff --git a/fern/products/sdk-reference/typescript/rest/fabric/generic-resources/index.mdx b/fern/products/sdk-reference/typescript/rest/fabric/generic-resources/index.mdx index 1c7bb1489c..e6c2c3b220 100644 --- a/fern/products/sdk-reference/typescript/rest/fabric/generic-resources/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/fabric/generic-resources/index.mdx @@ -67,7 +67,7 @@ Line 319. ### assignPhoneRoute - **Deprecated.** For the common cases — SWML webhooks, cXML webhooks, AI agents — this endpoint **does not work**. Bindings for those are configured on the phone number via [PhoneNumbersResource.setSwmlWebhook](/docs/sdk-reference/reference/typescript/rest/phone-numbers/phone-numbers-resource#set-swml-webhook) / `setCxmlWebhook` / `setAiAgent`, and the Fabric resource is auto-materialized by the server. Calling this method against `swml_webhook`, `cxml_webhook`, or `ai_agent` resource IDs returns `404` or `422`. The endpoint (`POST /api/fabric/resources/{id}/phone_routes`) applies only to a narrow set of legacy resource types listed in `rest-apis/relay-rest/openapi.yaml`. Emits a one-time deprecation warning on first call; kept for backwards compatibility. + **Deprecated.** For the common cases — SWML webhooks, cXML webhooks, AI agents — this endpoint **does not work**. Bindings for those are configured on the phone number via [PhoneNumbersResource.setSwmlWebhook](/docs/sdk-reference/reference/typescript/rest/phone-numbers#set-swml-webhook) / `setCxmlWebhook` / `setAiAgent`, and the Fabric resource is auto-materialized by the server. Calling this method against `swml_webhook`, `cxml_webhook`, or `ai_agent` resource IDs returns `404` or `422`. The endpoint (`POST /api/fabric/resources/{id}/phone_routes`) applies only to a narrow set of legacy resource types listed in `rest-apis/relay-rest/openapi.yaml`. Emits a one-time deprecation warning on first call; kept for backwards compatibility. Assign a phone route to a fabric resource. diff --git a/fern/products/sdk-reference/typescript/rest/http-client/index.mdx b/fern/products/sdk-reference/typescript/rest/http-client/index.mdx index 15d018a7c8..22a3a85c59 100644 --- a/fern/products/sdk-reference/typescript/rest/http-client/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/http-client/index.mdx @@ -18,7 +18,7 @@ Low-level HTTP client used by every REST namespace resource. Handles Basic Auth, JSON encoding/decoding, and error normalisation ([RestError](/docs/sdk-reference/reference/typescript/rest/rest-error) on non-2xx). Normally you do not instantiate this -directly — construct a [RestClient](/docs/sdk-reference/reference/typescript/rest/rest-client) instead. +directly — construct a `RestClient` instead. ## Signature diff --git a/fern/products/sdk-reference/typescript/rest/imported-numbers/imported-numbers-resource/index.mdx b/fern/products/sdk-reference/typescript/rest/imported-numbers/imported-numbers-resource/index.mdx deleted file mode 100644 index 7d74faac39..0000000000 --- a/fern/products/sdk-reference/typescript/rest/imported-numbers/imported-numbers-resource/index.mdx +++ /dev/null @@ -1,91 +0,0 @@ ---- -slug: "/reference/typescript/rest/imported-numbers/imported-numbers-resource" -title: "ImportedNumbersResource" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "rest.namespaces.imported-numbers.ImportedNumbersResource" - parent: "rest.namespaces.imported-numbers" - module: "rest.imported-numbers" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/imported-numbers.ts" ---- -# `ImportedNumbersResource` - -Import externally-hosted phone numbers. - -Access via `client.importedNumbers.*`. - -## Signature - -```typescript -class ImportedNumbersResource extends BaseResource -``` - -## Inheritance - -**Extends:** [BaseResource](/docs/sdk-reference/reference/typescript/rest/base/base-resource) - -## Methods - -### constructor - -#### Signature - -```typescript -constructor(http: HttpClient): ImportedNumbersResource -``` - -#### Parameters - - - -#### Returns - -`ImportedNumbersResource` - -#### Source - -[`src/rest/namespaces/imported-numbers.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/imported-numbers.ts) - -Line 16. - -*** - -### create - -Import an externally-hosted phone number into this project. - -#### Signature - -```typescript -create(body: any): Promise -``` - -#### Parameters - - - Import payload specifying the number, carrier details, and any routing configuration required by the platform. - - -#### Returns - -`Promise` — The newly-imported phone-number record. - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/namespaces/imported-numbers.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/imported-numbers.ts) - -Line 28. - -## Source - -[`src/rest/namespaces/imported-numbers.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/imported-numbers.ts) - -Line 15. diff --git a/fern/products/sdk-reference/typescript/rest/imported-numbers/index.mdx b/fern/products/sdk-reference/typescript/rest/imported-numbers/index.mdx index 31dc3bad26..8bacd6f1e3 100644 --- a/fern/products/sdk-reference/typescript/rest/imported-numbers/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/imported-numbers/index.mdx @@ -5,7 +5,7 @@ sdk_label: "TypeScript SDK" icon: "typescript" lustri: auto_generated: true - kind: "module" + kind: "class" language: "typescript" qualified_name: "rest.namespaces.imported-numbers" parent: "rest" @@ -14,22 +14,78 @@ lustri: --- # `imported-numbers` +Import externally-hosted phone numbers. + +Access via `client.importedNumbers.*`. + ## Signature ```typescript -module imported-numbers +class ImportedNumbersResource extends BaseResource ``` -## Classes +## Inheritance + +**Extends:** [BaseResource](/docs/sdk-reference/reference/typescript/rest/base/base-resource) + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient): ImportedNumbersResource +``` + +#### Parameters + + + +#### Returns + +`ImportedNumbersResource` + +#### Source + +[`src/rest/namespaces/imported-numbers.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/imported-numbers.ts) + +Line 16. + +*** + +### create + +Import an externally-hosted phone number into this project. + +#### Signature + +```typescript +create(body: any): Promise +``` + +#### Parameters + + + Import payload specifying the number, carrier details, and any routing configuration required by the platform. + + +#### Returns + +`Promise` — The newly-imported phone-number record. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/imported-numbers.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/imported-numbers.ts) - - - Import externally-hosted phone numbers. - - +Line 28. ## Source [`src/rest/namespaces/imported-numbers.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/imported-numbers.ts) -Line 1. +Line 15. diff --git a/fern/products/sdk-reference/typescript/rest/index.mdx b/fern/products/sdk-reference/typescript/rest/index.mdx index d6f1eaa101..3f0ee80323 100644 --- a/fern/products/sdk-reference/typescript/rest/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/index.mdx @@ -5,91 +5,255 @@ sdk_label: "TypeScript SDK" icon: "typescript" lustri: auto_generated: true - kind: "module" + kind: "class" language: "typescript" qualified_name: "rest" source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/index.ts" --- # `rest` +REST client for the SignalWire platform APIs. + ## Signature ```typescript -module rest +class RestClient +``` + +## Examples + +```typescript +const client = new RestClient({ + project: 'your-project-id', + token: 'your-api-token', + host: 'your-space.signalwire.com', +}); + +// Or use env vars: SIGNALWIRE_PROJECT_ID, SIGNALWIRE_API_TOKEN, SIGNALWIRE_SPACE +const client = new RestClient(); + +// Use namespaced resources +await client.fabric.aiAgents.list(); +await client.calling.play(callId, { play: [...] }); +await client.phoneNumbers.search({ areaCode: '512' }); +await client.video.rooms.create({ name: 'standup' }); +await client.compat.calls.list(); ``` +## Properties + + + Relay Address CRUD. + + + + REST-based call control surface (all 37 commands as methods). + + + + Chat token issuance. + + + + Twilio-compatible LAML surface (legacy; prefer native namespaces for new work). + + + + Datasphere RAG — document indexing and semantic search. + + + + Fabric composition — AI Agents, SWML scripts, call flows, tokens, etc. + + + + Import externally-hosted phone numbers. + + + + Read-only message / voice / fax / conference logs. + + + + Carrier + CNAM phone-number lookups. + + + + Multi-factor authentication (SMS / voice code send + verify). + + + + Number-group CRUD plus membership operations. + + + + Phone-number CRUD plus availability search. + + + + Project-scoped API token management. + + + + PubSub token issuance. + + + + Call-queue CRUD plus member operations. + + + + Recording read / delete. + + + + US 10DLC Campaign Registry — brands, campaigns, orders, numbers. + + + + Short-code read / update. + + + + Project-level SIP profile read / update (singleton). + + + + Verified Caller ID CRUD plus verification flow. + + + + Video rooms, sessions, recordings, conferences, tokens, streams. + + ## Classes + + Address management (no update endpoint). + + + + REST call control — all 37 commands dispatched via a single POST endpoint. + + + + Chat token generation. + + Low-level HTTP client used by every REST namespace resource. - - REST client for the SignalWire platform APIs. + + Import externally-hosted phone numbers. + + + + Phone number lookup (carrier, CNAM). + + + + Multi-factor authentication via SMS or phone call. + + + + Number group management with membership operations. + + + + Phone number management. + + + + PubSub token generation. + + + + Queue management with member operations. + + + + Recording management (read-only + delete). Custom error class for REST API errors. + + + Short code management (read + update only). + + + + Project SIP profile (singleton resource). + + + + Verified caller ID management with verification flow. + ## Modules - - - - - - - - - + - + - + - + - + + - +## Methods - +### constructor - +Create a new REST client. - +#### Signature - +```typescript +constructor(options: ClientOptions = {}): RestClient +``` - +#### Parameters - + + Connection options. `project`, `token`, and `host` are required. If any are omitted they fall back to `SIGNALWIRE_PROJECT_ID`, `SIGNALWIRE_API_TOKEN`, and `SIGNALWIRE_SPACE` environment variables. + - +#### Returns - +`RestClient` - - +#### Throws + +- When `project`, `token`, or `host` is missing from both the options and the environment. + +#### Source + +[`src/rest/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/index.ts) + +Line 128. ## Source [`src/rest/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/index.ts) -Line 1. +Line 58. diff --git a/fern/products/sdk-reference/typescript/rest/lookup/index.mdx b/fern/products/sdk-reference/typescript/rest/lookup/index.mdx index bbf74fca5c..7b01055115 100644 --- a/fern/products/sdk-reference/typescript/rest/lookup/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/lookup/index.mdx @@ -5,7 +5,7 @@ sdk_label: "TypeScript SDK" icon: "typescript" lustri: auto_generated: true - kind: "module" + kind: "class" language: "typescript" qualified_name: "rest.namespaces.lookup" parent: "rest" @@ -14,22 +14,88 @@ lustri: --- # `lookup` +Phone number lookup (carrier, CNAM). + +Access via `client.lookup.*`. + ## Signature ```typescript -module lookup +class LookupResource extends BaseResource +``` + +## Inheritance + +**Extends:** [BaseResource](/docs/sdk-reference/reference/typescript/rest/base/base-resource) + +## Examples + +```typescript +const info = await client.lookup.phoneNumber('+15551234567', { include: 'carrier,caller-name' }); +``` + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient): LookupResource +``` + +#### Parameters + + + +#### Returns + +`LookupResource` + +#### Source + +[`src/rest/namespaces/lookup.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/lookup.ts) + +Line 22. + +*** + +### phoneNumber + +Look up carrier and CNAM information for a phone number. + +#### Signature + +```typescript +phoneNumber(e164: string, params?: QueryParams): Promise ``` -## Classes +#### Parameters + + + The phone number in E.164 format (e.g. `"+15551234567"`). + + + + Optional query parameters, most commonly `include: "carrier,caller-name"` to enable carrier and CNAM lookups. + + +#### Returns + +`Promise` — The lookup record containing any requested datasets. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/lookup.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/lookup.ts) - - - Phone number lookup (carrier, CNAM). - - +Line 35. ## Source [`src/rest/namespaces/lookup.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/lookup.ts) -Line 1. +Line 21. diff --git a/fern/products/sdk-reference/typescript/rest/lookup/lookup-resource/index.mdx b/fern/products/sdk-reference/typescript/rest/lookup/lookup-resource/index.mdx deleted file mode 100644 index 3a4da7bb0d..0000000000 --- a/fern/products/sdk-reference/typescript/rest/lookup/lookup-resource/index.mdx +++ /dev/null @@ -1,101 +0,0 @@ ---- -slug: "/reference/typescript/rest/lookup/lookup-resource" -title: "LookupResource" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "rest.namespaces.lookup.LookupResource" - parent: "rest.namespaces.lookup" - module: "rest.lookup" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/lookup.ts" ---- -# `LookupResource` - -Phone number lookup (carrier, CNAM). - -Access via `client.lookup.*`. - -## Signature - -```typescript -class LookupResource extends BaseResource -``` - -## Inheritance - -**Extends:** [BaseResource](/docs/sdk-reference/reference/typescript/rest/base/base-resource) - -## Examples - -```typescript -const info = await client.lookup.phoneNumber('+15551234567', { include: 'carrier,caller-name' }); -``` - -## Methods - -### constructor - -#### Signature - -```typescript -constructor(http: HttpClient): LookupResource -``` - -#### Parameters - - - -#### Returns - -`LookupResource` - -#### Source - -[`src/rest/namespaces/lookup.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/lookup.ts) - -Line 22. - -*** - -### phoneNumber - -Look up carrier and CNAM information for a phone number. - -#### Signature - -```typescript -phoneNumber(e164: string, params?: QueryParams): Promise -``` - -#### Parameters - - - The phone number in E.164 format (e.g. `"+15551234567"`). - - - - Optional query parameters, most commonly `include: "carrier,caller-name"` to enable carrier and CNAM lookups. - - -#### Returns - -`Promise` — The lookup record containing any requested datasets. - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/namespaces/lookup.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/lookup.ts) - -Line 35. - -## Source - -[`src/rest/namespaces/lookup.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/lookup.ts) - -Line 21. diff --git a/fern/products/sdk-reference/typescript/rest/mfa/index.mdx b/fern/products/sdk-reference/typescript/rest/mfa/index.mdx index 36bc526a5a..78118da3c2 100644 --- a/fern/products/sdk-reference/typescript/rest/mfa/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/mfa/index.mdx @@ -5,7 +5,7 @@ sdk_label: "TypeScript SDK" icon: "typescript" lustri: auto_generated: true - kind: "module" + kind: "class" language: "typescript" qualified_name: "rest.namespaces.mfa" parent: "rest" @@ -14,22 +14,155 @@ lustri: --- # `mfa` +Multi-factor authentication via SMS or phone call. + +Access via `client.mfa.*`. Two-step flow: call `.sms()` or `.call()` to send +a code, then `.verify()` to confirm it. + ## Signature ```typescript -module mfa +class MfaResource extends BaseResource +``` + +## Inheritance + +**Extends:** [BaseResource](/docs/sdk-reference/reference/typescript/rest/base/base-resource) + +## Examples + +```typescript +const req = await client.mfa.sms({ to: '+15551234567' }); +const result = await client.mfa.verify(req.id, { token: '123456' }); +``` + +## Methods + +### call + +Initiate MFA by placing a phone call that reads out a one-time code. + +#### Signature + +```typescript +call(body: any): Promise +``` + +#### Parameters + + + MFA request payload (typically `{ to: "+15551234567" }`). + + +#### Returns + +`Promise` — The MFA request record; its `id` is used by [verify](/docs/sdk-reference/reference/typescript/rest/mfa#verify). + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/mfa.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/mfa.ts) + +Line 46. + +*** + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient): MfaResource +``` + +#### Parameters + + + +#### Returns + +`MfaResource` + +#### Source + +[`src/rest/namespaces/mfa.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/mfa.ts) + +Line 23. + +*** + +### sms + +Initiate MFA by sending a one-time code to a phone number over SMS. + +#### Signature + +```typescript +sms(body: any): Promise +``` + +#### Parameters + + + MFA request payload (typically `{ to: "+15551234567", + message?: "Your code is {code}" }`). + + +#### Returns + +`Promise` — The MFA request record; its `id` is used by [verify](/docs/sdk-reference/reference/typescript/rest/mfa#verify). + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/mfa.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/mfa.ts) + +Line 35. + +*** + +### verify + +Verify the one-time code the user received via SMS or call. + +#### Signature + +```typescript +verify(requestId: string, body: any): Promise ``` -## Classes +#### Parameters + + + The `id` returned from [sms](/docs/sdk-reference/reference/typescript/rest/mfa#sms) or [call](/docs/sdk-reference/reference/typescript/rest/mfa#call). + + + + Verification payload (typically `{ token: "123456" }`). + + +#### Returns + +`Promise` — The verification result — success or failure shape. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/mfa.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/mfa.ts) - - - Multi-factor authentication via SMS or phone call. - - +Line 58. ## Source [`src/rest/namespaces/mfa.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/mfa.ts) -Line 1. +Line 22. diff --git a/fern/products/sdk-reference/typescript/rest/mfa/mfa-resource/index.mdx b/fern/products/sdk-reference/typescript/rest/mfa/mfa-resource/index.mdx deleted file mode 100644 index a78f972c3c..0000000000 --- a/fern/products/sdk-reference/typescript/rest/mfa/mfa-resource/index.mdx +++ /dev/null @@ -1,168 +0,0 @@ ---- -slug: "/reference/typescript/rest/mfa/mfa-resource" -title: "MfaResource" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "rest.namespaces.mfa.MfaResource" - parent: "rest.namespaces.mfa" - module: "rest.mfa" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/mfa.ts" ---- -# `MfaResource` - -Multi-factor authentication via SMS or phone call. - -Access via `client.mfa.*`. Two-step flow: call `.sms()` or `.call()` to send -a code, then `.verify()` to confirm it. - -## Signature - -```typescript -class MfaResource extends BaseResource -``` - -## Inheritance - -**Extends:** [BaseResource](/docs/sdk-reference/reference/typescript/rest/base/base-resource) - -## Examples - -```typescript -const req = await client.mfa.sms({ to: '+15551234567' }); -const result = await client.mfa.verify(req.id, { token: '123456' }); -``` - -## Methods - -### call - -Initiate MFA by placing a phone call that reads out a one-time code. - -#### Signature - -```typescript -call(body: any): Promise -``` - -#### Parameters - - - MFA request payload (typically `{ to: "+15551234567" }`). - - -#### Returns - -`Promise` — The MFA request record; its `id` is used by [verify](/docs/sdk-reference/reference/typescript/rest/mfa/mfa-resource#verify). - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/namespaces/mfa.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/mfa.ts) - -Line 46. - -*** - -### constructor - -#### Signature - -```typescript -constructor(http: HttpClient): MfaResource -``` - -#### Parameters - - - -#### Returns - -`MfaResource` - -#### Source - -[`src/rest/namespaces/mfa.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/mfa.ts) - -Line 23. - -*** - -### sms - -Initiate MFA by sending a one-time code to a phone number over SMS. - -#### Signature - -```typescript -sms(body: any): Promise -``` - -#### Parameters - - - MFA request payload (typically `{ to: "+15551234567", - message?: "Your code is {code}" }`). - - -#### Returns - -`Promise` — The MFA request record; its `id` is used by [verify](/docs/sdk-reference/reference/typescript/rest/mfa/mfa-resource#verify). - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/namespaces/mfa.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/mfa.ts) - -Line 35. - -*** - -### verify - -Verify the one-time code the user received via SMS or call. - -#### Signature - -```typescript -verify(requestId: string, body: any): Promise -``` - -#### Parameters - - - The `id` returned from [sms](/docs/sdk-reference/reference/typescript/rest/mfa/mfa-resource#sms) or [call](/docs/sdk-reference/reference/typescript/rest/mfa/mfa-resource#call). - - - - Verification payload (typically `{ token: "123456" }`). - - -#### Returns - -`Promise` — The verification result — success or failure shape. - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/namespaces/mfa.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/mfa.ts) - -Line 58. - -## Source - -[`src/rest/namespaces/mfa.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/mfa.ts) - -Line 22. diff --git a/fern/products/sdk-reference/typescript/rest/number-groups/index.mdx b/fern/products/sdk-reference/typescript/rest/number-groups/index.mdx index d7bd2d9f86..8a622a1b95 100644 --- a/fern/products/sdk-reference/typescript/rest/number-groups/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/number-groups/index.mdx @@ -5,7 +5,7 @@ sdk_label: "TypeScript SDK" icon: "typescript" lustri: auto_generated: true - kind: "module" + kind: "class" language: "typescript" qualified_name: "rest.namespaces.number-groups" parent: "rest" @@ -14,22 +14,349 @@ lustri: --- # `number-groups` +Number group management with membership operations. + +Access via `client.numberGroups.*`. Extends standard CRUD with membership helpers. + ## Signature ```typescript -module number-groups +class NumberGroupsResource extends CrudResource +``` + +## Inheritance + +**Extends:** [CrudResource](/docs/sdk-reference/reference/typescript/rest/base/crud-resource) + +## Methods + +### addMembership + +Add a phone number to a group. + +#### Signature + +```typescript +addMembership(groupId: string, body: any): Promise +``` + +#### Parameters + + + Unique identifier of the number group. + + + + Membership payload (typically `{ phone_number_id: "..." }`). + + +#### Returns + +`Promise` — The newly-created membership record. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/number-groups.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/number-groups.ts) + +Line 43. + +*** + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient): NumberGroupsResource +``` + +#### Parameters + + + +#### Returns + +`NumberGroupsResource` + +#### Source + +[`src/rest/namespaces/number-groups.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/number-groups.ts) + +Line 19. + +*** + +### create + +Create a new resource. + +#### Signature + +```typescript +create(body: any): Promise +``` + +#### Parameters + + + Request body describing the resource to create. + + +#### Returns + +`Promise` — The newly-created resource. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 55. + +*** + +### delete + +Delete a resource by ID. + +#### Signature + +```typescript +delete(resourceId: string): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + +#### Returns + +`Promise` — The platform's delete response (often an empty body on success). + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 95. + +*** + +### deleteMembership + +Remove a number from a group by deleting its membership. + +#### Signature + +```typescript +deleteMembership(membershipId: string): Promise +``` + +#### Parameters + + + Unique identifier of the membership. + + +#### Returns + +`Promise` — The platform's delete response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/number-groups.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/number-groups.ts) + +Line 65. + +*** + +### get + +Fetch a single resource by ID. + +#### Signature + +```typescript +get(resourceId: string): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + +#### Returns + +`Promise` — The resource record. + +#### Throws + +- On any non-2xx HTTP response (including `404`). + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 66. + +*** + +### getMembership + +Fetch a membership by ID. + +#### Signature + +```typescript +getMembership(membershipId: string): Promise +``` + +#### Parameters + + + Unique identifier of the membership. + + +#### Returns + +`Promise` — The membership record. + +#### Throws + +- On any non-2xx HTTP response (including `404`). + +#### Source + +[`src/rest/namespaces/number-groups.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/number-groups.ts) + +Line 54. + +*** + +### list + +List resources with optional query parameters. + +#### Signature + +```typescript +list(params?: QueryParams): Promise +``` + +#### Parameters + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — The paginated list response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 44. + +*** + +### listMemberships + +List memberships (phone-number assignments) in a group. + +#### Signature + +```typescript +listMemberships(groupId: string, params?: QueryParams): Promise +``` + +#### Parameters + + + Unique identifier of the number group. + + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — A paginated list of number-group memberships. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/number-groups.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/number-groups.ts) + +Line 31. + +*** + +### update + +Update a resource by ID. + +Uses HTTP `PATCH` by default; subclasses may set `_updateMethod = 'PUT'` +when the remote API requires a full-replacement semantics. + +#### Signature + +```typescript +update(resourceId: string, body: any): Promise ``` -## Classes +#### Parameters + + + Unique identifier of the resource. + + + + Request body with updated fields. + + +#### Returns + +`Promise` — The updated resource. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) - - - Number group management with membership operations. - - +Line 81. ## Source [`src/rest/namespaces/number-groups.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/number-groups.ts) -Line 1. +Line 16. diff --git a/fern/products/sdk-reference/typescript/rest/number-groups/number-groups-resource/index.mdx b/fern/products/sdk-reference/typescript/rest/number-groups/number-groups-resource/index.mdx deleted file mode 100644 index ec09c36ce7..0000000000 --- a/fern/products/sdk-reference/typescript/rest/number-groups/number-groups-resource/index.mdx +++ /dev/null @@ -1,362 +0,0 @@ ---- -slug: "/reference/typescript/rest/number-groups/number-groups-resource" -title: "NumberGroupsResource" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "rest.namespaces.number-groups.NumberGroupsResource" - parent: "rest.namespaces.number-groups" - module: "rest.number-groups" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/number-groups.ts" ---- -# `NumberGroupsResource` - -Number group management with membership operations. - -Access via `client.numberGroups.*`. Extends standard CRUD with membership helpers. - -## Signature - -```typescript -class NumberGroupsResource extends CrudResource -``` - -## Inheritance - -**Extends:** [CrudResource](/docs/sdk-reference/reference/typescript/rest/base/crud-resource) - -## Methods - -### addMembership - -Add a phone number to a group. - -#### Signature - -```typescript -addMembership(groupId: string, body: any): Promise -``` - -#### Parameters - - - Unique identifier of the number group. - - - - Membership payload (typically `{ phone_number_id: "..." }`). - - -#### Returns - -`Promise` — The newly-created membership record. - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/namespaces/number-groups.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/number-groups.ts) - -Line 43. - -*** - -### constructor - -#### Signature - -```typescript -constructor(http: HttpClient): NumberGroupsResource -``` - -#### Parameters - - - -#### Returns - -`NumberGroupsResource` - -#### Source - -[`src/rest/namespaces/number-groups.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/number-groups.ts) - -Line 19. - -*** - -### create - -Create a new resource. - -#### Signature - -```typescript -create(body: any): Promise -``` - -#### Parameters - - - Request body describing the resource to create. - - -#### Returns - -`Promise` — The newly-created resource. - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) - -Line 55. - -*** - -### delete - -Delete a resource by ID. - -#### Signature - -```typescript -delete(resourceId: string): Promise -``` - -#### Parameters - - - Unique identifier of the resource. - - -#### Returns - -`Promise` — The platform's delete response (often an empty body on success). - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) - -Line 95. - -*** - -### deleteMembership - -Remove a number from a group by deleting its membership. - -#### Signature - -```typescript -deleteMembership(membershipId: string): Promise -``` - -#### Parameters - - - Unique identifier of the membership. - - -#### Returns - -`Promise` — The platform's delete response. - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/namespaces/number-groups.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/number-groups.ts) - -Line 65. - -*** - -### get - -Fetch a single resource by ID. - -#### Signature - -```typescript -get(resourceId: string): Promise -``` - -#### Parameters - - - Unique identifier of the resource. - - -#### Returns - -`Promise` — The resource record. - -#### Throws - -- On any non-2xx HTTP response (including `404`). - -#### Source - -[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) - -Line 66. - -*** - -### getMembership - -Fetch a membership by ID. - -#### Signature - -```typescript -getMembership(membershipId: string): Promise -``` - -#### Parameters - - - Unique identifier of the membership. - - -#### Returns - -`Promise` — The membership record. - -#### Throws - -- On any non-2xx HTTP response (including `404`). - -#### Source - -[`src/rest/namespaces/number-groups.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/number-groups.ts) - -Line 54. - -*** - -### list - -List resources with optional query parameters. - -#### Signature - -```typescript -list(params?: QueryParams): Promise -``` - -#### Parameters - - - Optional filter / pagination query parameters. - - -#### Returns - -`Promise` — The paginated list response. - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) - -Line 44. - -*** - -### listMemberships - -List memberships (phone-number assignments) in a group. - -#### Signature - -```typescript -listMemberships(groupId: string, params?: QueryParams): Promise -``` - -#### Parameters - - - Unique identifier of the number group. - - - - Optional filter / pagination query parameters. - - -#### Returns - -`Promise` — A paginated list of number-group memberships. - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/namespaces/number-groups.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/number-groups.ts) - -Line 31. - -*** - -### update - -Update a resource by ID. - -Uses HTTP `PATCH` by default; subclasses may set `_updateMethod = 'PUT'` -when the remote API requires a full-replacement semantics. - -#### Signature - -```typescript -update(resourceId: string, body: any): Promise -``` - -#### Parameters - - - Unique identifier of the resource. - - - - Request body with updated fields. - - -#### Returns - -`Promise` — The updated resource. - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) - -Line 81. - -## Source - -[`src/rest/namespaces/number-groups.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/number-groups.ts) - -Line 16. diff --git a/fern/products/sdk-reference/typescript/rest/phone-numbers/index.mdx b/fern/products/sdk-reference/typescript/rest/phone-numbers/index.mdx index 92bd82e036..2327cfd277 100644 --- a/fern/products/sdk-reference/typescript/rest/phone-numbers/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/phone-numbers/index.mdx @@ -5,7 +5,7 @@ sdk_label: "TypeScript SDK" icon: "typescript" lustri: auto_generated: true - kind: "module" + kind: "class" language: "typescript" qualified_name: "rest.namespaces.phone-numbers" parent: "rest" @@ -14,25 +14,561 @@ lustri: --- # `phone-numbers` +Phone number management. + +Supports the standard CRUD surface plus typed helpers for binding an +inbound call to a handler (SWML webhook, cXML webhook, AI agent, call +flow, RELAY application/topic). The binding model is: set `call_handler` + +- the handler-specific companion field on the phone number; the server + auto-materializes the matching Fabric resource. See + `PhoneCallHandler` for the enum of valid `call_handler` values. + +`create` and `update` accept an untyped body object (`body: any = {}`). +No `PhoneNumberCreateParams` / `PhoneNumberUpdateParams` interfaces are +defined because the Python reference SDK uses bare `**kwargs` with no +named or typed parameters — there is no Python type contract to port. +This is an intentional IDIOMATIC\_DEVIATION: Python kwargs ↔ TS `any` object +literal with an optional default of `{}` to preserve call-without-args +semantics. If the REST API stabilises a known field set, consider adding +typed interfaces and specialising `CrudResource<>` generics here. + ## Signature ```typescript -module phone-numbers +class PhoneNumbersResource extends CrudResource ``` -## Classes +## Inheritance + +**Extends:** [CrudResource](/docs/sdk-reference/reference/typescript/rest/base/crud-resource) + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient): PhoneNumbersResource +``` + +#### Parameters + + + +#### Returns + +`PhoneNumbersResource` + +#### Source + +[`src/rest/namespaces/phone-numbers.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/phone-numbers.ts) + +Line 77. + +*** + +### create + +Purchase / create a phone number resource in this project. +Body is optional to match Python's `**kwargs` call convention. + +#### Signature + +```typescript +create(body: any = {}): Promise +``` + +#### Parameters + + + Phone-number creation payload (platform-shaped JSON). Defaults to `{}` when omitted. + + +#### Returns + +`Promise` — The newly-created phone-number resource. + +#### Throws + +- On any non-2xx HTTP response. + +#### Examples + +```typescript +const num = await client.phoneNumbers.create({ number: '+15551234567' }); +``` + +#### Source + +[`src/rest/namespaces/phone-numbers.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/phone-numbers.ts) + +Line 95. + +*** + +### delete + +Delete a resource by ID. + +#### Signature + +```typescript +delete(resourceId: string): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + +#### Returns + +`Promise` — The platform's delete response (often an empty body on success). + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 95. + +*** + +### get + +Fetch a single resource by ID. + +#### Signature + +```typescript +get(resourceId: string): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + +#### Returns + +`Promise` — The resource record. + +#### Throws + +- On any non-2xx HTTP response (including `404`). + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 66. + +*** + +### list + +List resources with optional query parameters. + +#### Signature + +```typescript +list(params?: QueryParams): Promise +``` + +#### Parameters + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — The paginated list response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 44. + +*** + +### search + +Search available phone numbers for purchase. + +#### Signature + +```typescript +search(params?: QueryParams): Promise +``` + +#### Parameters + + + Search filters (e.g. `areaCode`, `contains`, `region`, `number_type`, pagination). + + +#### Returns + +`Promise` — A paginated list of matching available numbers. + +#### Throws + +- On any non-2xx HTTP response. + +#### Examples + +```typescript +const results = await client.phoneNumbers.search({ areaCode: '512', contains: '5555' }); +``` + +#### Source + +[`src/rest/namespaces/phone-numbers.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/phone-numbers.ts) + +Line 129. + +*** + +### setAiAgent + +Route inbound calls to an AI Agent Fabric resource by ID. + +#### Signature + +```typescript +setAiAgent( + resourceId: string, + agentId: string, + extra: Record = {} +): Promise +``` + +#### Parameters + + + Unique phone-number resource ID. + + + + AI agent Fabric resource ID. + + + + Additional wire-level fields merged into the body. + + +#### Returns + +`Promise` — The updated phone-number resource. + +#### Source + +[`src/rest/namespaces/phone-numbers.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/phone-numbers.ts) + +Line 227. + +*** + +### setCallFlow + +Route inbound calls to a Call Flow by ID. + +`version` accepts `"working_copy"` or `"current_deployed"` (server +default when omitted). + +#### Signature + +```typescript +setCallFlow(resourceId: string, params: SetCallFlowParams): Promise +``` + +#### Parameters + + + Unique phone-number resource ID. + + + + Flow ID and optional pinned version plus any extra wire-level fields. + + +#### Returns + +`Promise` — The updated phone-number resource. + +#### Source + +[`src/rest/namespaces/phone-numbers.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/phone-numbers.ts) + +Line 246. + +*** + +### setCxmlApplication + +Route inbound calls to an existing cXML application by ID. + +#### Signature + +```typescript +setCxmlApplication( + resourceId: string, + applicationId: string, + extra: Record = {} +): Promise +``` + +#### Parameters + + + Unique phone-number resource ID. + + + + cXML application ID. + + + + Additional wire-level fields merged into the body. + + +#### Returns + +`Promise` — The updated phone-number resource. + +#### Source + +[`src/rest/namespaces/phone-numbers.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/phone-numbers.ts) + +Line 211. + +*** + +### setCxmlWebhook + +Route inbound calls to a cXML (Twilio-compat / LAML) webhook. + +Despite the wire value `laml_webhooks` being plural, this creates a +single `cxml_webhook` Fabric resource. `fallbackUrl` is used when the +primary URL fails; `statusCallbackUrl` receives call status updates. + +#### Signature + +```typescript +setCxmlWebhook(resourceId: string, params: SetCxmlWebhookParams): Promise +``` + +#### Parameters + + + Unique phone-number resource ID. + + + + URL and optional fallback/status URLs plus any extra wire-level fields. + + +#### Returns + +`Promise` — The updated phone-number resource. + +#### Examples + +```typescript +await client.phoneNumbers.setCxmlWebhook('pn-1', { + url: 'https://example.com/voice.xml', + fallbackUrl: 'https://example.com/fallback.xml', +}); +``` + +#### Source + +[`src/rest/namespaces/phone-numbers.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/phone-numbers.ts) + +Line 187. + +*** + +### setRelayApplication + +Route inbound calls to a named RELAY application. + +#### Signature + +```typescript +setRelayApplication( + resourceId: string, + name: string, + extra: Record = {} +): Promise +``` + +#### Parameters + + + Unique phone-number resource ID. + + + + RELAY application name. + + + + Additional wire-level fields merged into the body. + + +#### Returns + +`Promise` — The updated phone-number resource. + +#### Source + +[`src/rest/namespaces/phone-numbers.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/phone-numbers.ts) + +Line 267. + +*** + +### setRelayTopic + +Route inbound calls to a RELAY topic (client subscription). + +#### Signature + +```typescript +setRelayTopic(resourceId: string, params: SetRelayTopicParams): Promise +``` + +#### Parameters + + + Unique phone-number resource ID. + + + + Topic name and optional status-callback URL plus any extra wire-level fields. + + +#### Returns + +`Promise` — The updated phone-number resource. + +#### Source + +[`src/rest/namespaces/phone-numbers.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/phone-numbers.ts) + +Line 283. + +*** + +### setSwmlWebhook + +Route inbound calls to an SWML webhook URL. + +Your backend returns an SWML document per call. The server +auto-creates a `swml_webhook` Fabric resource keyed off this URL — +you do **not** need to call `fabric.swmlWebhooks.create` or +`fabric.resources.assignPhoneRoute`. + +#### Signature + +```typescript +setSwmlWebhook( + resourceId: string, + url: string, + extra: SetSwmlWebhookExtra = {} +): Promise +``` + +#### Parameters + + + Unique phone-number resource ID. + + + + Your backend's SWML endpoint. + + + + Additional wire-level fields (e.g. `name`) merged into the PUT body. + + +#### Returns + +`Promise` — The updated phone-number resource. + +#### Examples + +```typescript +await client.phoneNumbers.setSwmlWebhook('pn-1', 'https://example.com/swml'); +``` + +#### Source + +[`src/rest/namespaces/phone-numbers.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/phone-numbers.ts) + +Line 159. + +*** + +### update + +Update a phone number resource by ID. Body is optional to match Python `**kwargs`. + +Setting `call_handler` + the matching companion field (see +`PhoneCallHandler`) on the phone number auto-materializes the +matching Fabric resource on the server; prefer the `set*` helpers +below for the common cases. + +#### Signature + +```typescript +update(resourceId: string, body: any = {}): Promise +``` + +#### Parameters + + + Unique phone-number resource ID. + + + + Partial update payload. Defaults to `{}`. + + +#### Returns + +`Promise` — The updated phone-number resource. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/phone-numbers.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/phone-numbers.ts) - - - Phone number management. - - +Line 112. ## Interfaces ### SetCallFlowParams -Parameters for [PhoneNumbersResource.setCallFlow](/docs/sdk-reference/reference/typescript/rest/phone-numbers/phone-numbers-resource#set-call-flow). +Parameters for [PhoneNumbersResource.setCallFlow](/docs/sdk-reference/reference/typescript/rest/phone-numbers#set-call-flow). #### Signature @@ -60,7 +596,7 @@ Line 30. ### SetCxmlWebhookParams -Parameters for [PhoneNumbersResource.setCxmlWebhook](/docs/sdk-reference/reference/typescript/rest/phone-numbers/phone-numbers-resource#set-cxml-webhook). +Parameters for [PhoneNumbersResource.setCxmlWebhook](/docs/sdk-reference/reference/typescript/rest/phone-numbers#set-cxml-webhook). #### Signature @@ -92,7 +628,7 @@ Line 18. ### SetRelayTopicParams -Parameters for [PhoneNumbersResource.setRelayTopic](/docs/sdk-reference/reference/typescript/rest/phone-numbers/phone-numbers-resource#set-relay-topic). +Parameters for [PhoneNumbersResource.setRelayTopic](/docs/sdk-reference/reference/typescript/rest/phone-numbers#set-relay-topic). #### Signature @@ -120,7 +656,7 @@ Line 43. ### SetSwmlWebhookExtra -Optional companion fields for [PhoneNumbersResource.setSwmlWebhook](/docs/sdk-reference/reference/typescript/rest/phone-numbers/phone-numbers-resource#set-swml-webhook). +Optional companion fields for [PhoneNumbersResource.setSwmlWebhook](/docs/sdk-reference/reference/typescript/rest/phone-numbers#set-swml-webhook). #### Signature @@ -138,4 +674,4 @@ Line 13. [`src/rest/namespaces/phone-numbers.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/phone-numbers.ts) -Line 1. +Line 74. diff --git a/fern/products/sdk-reference/typescript/rest/phone-numbers/phone-numbers-resource/index.mdx b/fern/products/sdk-reference/typescript/rest/phone-numbers/phone-numbers-resource/index.mdx deleted file mode 100644 index 178a965788..0000000000 --- a/fern/products/sdk-reference/typescript/rest/phone-numbers/phone-numbers-resource/index.mdx +++ /dev/null @@ -1,571 +0,0 @@ ---- -slug: "/reference/typescript/rest/phone-numbers/phone-numbers-resource" -title: "PhoneNumbersResource" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "rest.namespaces.phone-numbers.PhoneNumbersResource" - parent: "rest.namespaces.phone-numbers" - module: "rest.phone-numbers" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/phone-numbers.ts" ---- -# `PhoneNumbersResource` - -Phone number management. - -Supports the standard CRUD surface plus typed helpers for binding an -inbound call to a handler (SWML webhook, cXML webhook, AI agent, call -flow, RELAY application/topic). The binding model is: set `call_handler` - -- the handler-specific companion field on the phone number; the server - auto-materializes the matching Fabric resource. See - `PhoneCallHandler` for the enum of valid `call_handler` values. - -`create` and `update` accept an untyped body object (`body: any = {}`). -No `PhoneNumberCreateParams` / `PhoneNumberUpdateParams` interfaces are -defined because the Python reference SDK uses bare `**kwargs` with no -named or typed parameters — there is no Python type contract to port. -This is an intentional IDIOMATIC\_DEVIATION: Python kwargs ↔ TS `any` object -literal with an optional default of `{}` to preserve call-without-args -semantics. If the REST API stabilises a known field set, consider adding -typed interfaces and specialising `CrudResource<>` generics here. - -## Signature - -```typescript -class PhoneNumbersResource extends CrudResource -``` - -## Inheritance - -**Extends:** [CrudResource](/docs/sdk-reference/reference/typescript/rest/base/crud-resource) - -## Methods - -### constructor - -#### Signature - -```typescript -constructor(http: HttpClient): PhoneNumbersResource -``` - -#### Parameters - - - -#### Returns - -`PhoneNumbersResource` - -#### Source - -[`src/rest/namespaces/phone-numbers.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/phone-numbers.ts) - -Line 77. - -*** - -### create - -Purchase / create a phone number resource in this project. -Body is optional to match Python's `**kwargs` call convention. - -#### Signature - -```typescript -create(body: any = {}): Promise -``` - -#### Parameters - - - Phone-number creation payload (platform-shaped JSON). Defaults to `{}` when omitted. - - -#### Returns - -`Promise` — The newly-created phone-number resource. - -#### Throws - -- On any non-2xx HTTP response. - -#### Examples - -```typescript -const num = await client.phoneNumbers.create({ number: '+15551234567' }); -``` - -#### Source - -[`src/rest/namespaces/phone-numbers.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/phone-numbers.ts) - -Line 95. - -*** - -### delete - -Delete a resource by ID. - -#### Signature - -```typescript -delete(resourceId: string): Promise -``` - -#### Parameters - - - Unique identifier of the resource. - - -#### Returns - -`Promise` — The platform's delete response (often an empty body on success). - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) - -Line 95. - -*** - -### get - -Fetch a single resource by ID. - -#### Signature - -```typescript -get(resourceId: string): Promise -``` - -#### Parameters - - - Unique identifier of the resource. - - -#### Returns - -`Promise` — The resource record. - -#### Throws - -- On any non-2xx HTTP response (including `404`). - -#### Source - -[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) - -Line 66. - -*** - -### list - -List resources with optional query parameters. - -#### Signature - -```typescript -list(params?: QueryParams): Promise -``` - -#### Parameters - - - Optional filter / pagination query parameters. - - -#### Returns - -`Promise` — The paginated list response. - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) - -Line 44. - -*** - -### search - -Search available phone numbers for purchase. - -#### Signature - -```typescript -search(params?: QueryParams): Promise -``` - -#### Parameters - - - Search filters (e.g. `areaCode`, `contains`, `region`, `number_type`, pagination). - - -#### Returns - -`Promise` — A paginated list of matching available numbers. - -#### Throws - -- On any non-2xx HTTP response. - -#### Examples - -```typescript -const results = await client.phoneNumbers.search({ areaCode: '512', contains: '5555' }); -``` - -#### Source - -[`src/rest/namespaces/phone-numbers.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/phone-numbers.ts) - -Line 129. - -*** - -### setAiAgent - -Route inbound calls to an AI Agent Fabric resource by ID. - -#### Signature - -```typescript -setAiAgent( - resourceId: string, - agentId: string, - extra: Record = {} -): Promise -``` - -#### Parameters - - - Unique phone-number resource ID. - - - - AI agent Fabric resource ID. - - - - Additional wire-level fields merged into the body. - - -#### Returns - -`Promise` — The updated phone-number resource. - -#### Source - -[`src/rest/namespaces/phone-numbers.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/phone-numbers.ts) - -Line 227. - -*** - -### setCallFlow - -Route inbound calls to a Call Flow by ID. - -`version` accepts `"working_copy"` or `"current_deployed"` (server -default when omitted). - -#### Signature - -```typescript -setCallFlow(resourceId: string, params: SetCallFlowParams): Promise -``` - -#### Parameters - - - Unique phone-number resource ID. - - - - Flow ID and optional pinned version plus any extra wire-level fields. - - -#### Returns - -`Promise` — The updated phone-number resource. - -#### Source - -[`src/rest/namespaces/phone-numbers.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/phone-numbers.ts) - -Line 246. - -*** - -### setCxmlApplication - -Route inbound calls to an existing cXML application by ID. - -#### Signature - -```typescript -setCxmlApplication( - resourceId: string, - applicationId: string, - extra: Record = {} -): Promise -``` - -#### Parameters - - - Unique phone-number resource ID. - - - - cXML application ID. - - - - Additional wire-level fields merged into the body. - - -#### Returns - -`Promise` — The updated phone-number resource. - -#### Source - -[`src/rest/namespaces/phone-numbers.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/phone-numbers.ts) - -Line 211. - -*** - -### setCxmlWebhook - -Route inbound calls to a cXML (Twilio-compat / LAML) webhook. - -Despite the wire value `laml_webhooks` being plural, this creates a -single `cxml_webhook` Fabric resource. `fallbackUrl` is used when the -primary URL fails; `statusCallbackUrl` receives call status updates. - -#### Signature - -```typescript -setCxmlWebhook(resourceId: string, params: SetCxmlWebhookParams): Promise -``` - -#### Parameters - - - Unique phone-number resource ID. - - - - URL and optional fallback/status URLs plus any extra wire-level fields. - - -#### Returns - -`Promise` — The updated phone-number resource. - -#### Examples - -```typescript -await client.phoneNumbers.setCxmlWebhook('pn-1', { - url: 'https://example.com/voice.xml', - fallbackUrl: 'https://example.com/fallback.xml', -}); -``` - -#### Source - -[`src/rest/namespaces/phone-numbers.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/phone-numbers.ts) - -Line 187. - -*** - -### setRelayApplication - -Route inbound calls to a named RELAY application. - -#### Signature - -```typescript -setRelayApplication( - resourceId: string, - name: string, - extra: Record = {} -): Promise -``` - -#### Parameters - - - Unique phone-number resource ID. - - - - RELAY application name. - - - - Additional wire-level fields merged into the body. - - -#### Returns - -`Promise` — The updated phone-number resource. - -#### Source - -[`src/rest/namespaces/phone-numbers.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/phone-numbers.ts) - -Line 267. - -*** - -### setRelayTopic - -Route inbound calls to a RELAY topic (client subscription). - -#### Signature - -```typescript -setRelayTopic(resourceId: string, params: SetRelayTopicParams): Promise -``` - -#### Parameters - - - Unique phone-number resource ID. - - - - Topic name and optional status-callback URL plus any extra wire-level fields. - - -#### Returns - -`Promise` — The updated phone-number resource. - -#### Source - -[`src/rest/namespaces/phone-numbers.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/phone-numbers.ts) - -Line 283. - -*** - -### setSwmlWebhook - -Route inbound calls to an SWML webhook URL. - -Your backend returns an SWML document per call. The server -auto-creates a `swml_webhook` Fabric resource keyed off this URL — -you do **not** need to call `fabric.swmlWebhooks.create` or -`fabric.resources.assignPhoneRoute`. - -#### Signature - -```typescript -setSwmlWebhook( - resourceId: string, - url: string, - extra: SetSwmlWebhookExtra = {} -): Promise -``` - -#### Parameters - - - Unique phone-number resource ID. - - - - Your backend's SWML endpoint. - - - - Additional wire-level fields (e.g. `name`) merged into the PUT body. - - -#### Returns - -`Promise` — The updated phone-number resource. - -#### Examples - -```typescript -await client.phoneNumbers.setSwmlWebhook('pn-1', 'https://example.com/swml'); -``` - -#### Source - -[`src/rest/namespaces/phone-numbers.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/phone-numbers.ts) - -Line 159. - -*** - -### update - -Update a phone number resource by ID. Body is optional to match Python `**kwargs`. - -Setting `call_handler` + the matching companion field (see -`PhoneCallHandler`) on the phone number auto-materializes the -matching Fabric resource on the server; prefer the `set*` helpers -below for the common cases. - -#### Signature - -```typescript -update(resourceId: string, body: any = {}): Promise -``` - -#### Parameters - - - Unique phone-number resource ID. - - - - Partial update payload. Defaults to `{}`. - - -#### Returns - -`Promise` — The updated phone-number resource. - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/namespaces/phone-numbers.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/phone-numbers.ts) - -Line 112. - -## Source - -[`src/rest/namespaces/phone-numbers.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/phone-numbers.ts) - -Line 74. diff --git a/fern/products/sdk-reference/typescript/rest/pubsub/index.mdx b/fern/products/sdk-reference/typescript/rest/pubsub/index.mdx index c09d81bb8c..2bdf1bb2ad 100644 --- a/fern/products/sdk-reference/typescript/rest/pubsub/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/pubsub/index.mdx @@ -5,7 +5,7 @@ sdk_label: "TypeScript SDK" icon: "typescript" lustri: auto_generated: true - kind: "module" + kind: "class" language: "typescript" qualified_name: "rest.namespaces.pubsub" parent: "rest" @@ -14,22 +14,79 @@ lustri: --- # `pubsub` +PubSub token generation. + +Access via `client.pubsub.*`. Issues short-lived tokens that browser / mobile +clients can use to subscribe to project channels. + ## Signature ```typescript -module pubsub +class PubSubResource extends BaseResource ``` -## Classes +## Inheritance + +**Extends:** [BaseResource](/docs/sdk-reference/reference/typescript/rest/base/base-resource) + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient): PubSubResource +``` + +#### Parameters + + + +#### Returns + +`PubSubResource` + +#### Source + +[`src/rest/namespaces/pubsub.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/pubsub.ts) + +Line 17. + +*** + +### createToken + +Generate a short-lived PubSub token. + +#### Signature + +```typescript +createToken(body: any): Promise +``` + +#### Parameters + + + Token payload (e.g. `{ namespace, channels, expires_in }`). + + +#### Returns + +`Promise` — The token record, typically `{ token: "eyJ..." }`. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/pubsub.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/pubsub.ts) - - - PubSub token generation. - - +Line 28. ## Source [`src/rest/namespaces/pubsub.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/pubsub.ts) -Line 1. +Line 16. diff --git a/fern/products/sdk-reference/typescript/rest/pubsub/pub-sub-resource/index.mdx b/fern/products/sdk-reference/typescript/rest/pubsub/pub-sub-resource/index.mdx deleted file mode 100644 index 1b46021308..0000000000 --- a/fern/products/sdk-reference/typescript/rest/pubsub/pub-sub-resource/index.mdx +++ /dev/null @@ -1,92 +0,0 @@ ---- -slug: "/reference/typescript/rest/pubsub/pub-sub-resource" -title: "PubSubResource" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "rest.namespaces.pubsub.PubSubResource" - parent: "rest.namespaces.pubsub" - module: "rest.pubsub" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/pubsub.ts" ---- -# `PubSubResource` - -PubSub token generation. - -Access via `client.pubsub.*`. Issues short-lived tokens that browser / mobile -clients can use to subscribe to project channels. - -## Signature - -```typescript -class PubSubResource extends BaseResource -``` - -## Inheritance - -**Extends:** [BaseResource](/docs/sdk-reference/reference/typescript/rest/base/base-resource) - -## Methods - -### constructor - -#### Signature - -```typescript -constructor(http: HttpClient): PubSubResource -``` - -#### Parameters - - - -#### Returns - -`PubSubResource` - -#### Source - -[`src/rest/namespaces/pubsub.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/pubsub.ts) - -Line 17. - -*** - -### createToken - -Generate a short-lived PubSub token. - -#### Signature - -```typescript -createToken(body: any): Promise -``` - -#### Parameters - - - Token payload (e.g. `{ namespace, channels, expires_in }`). - - -#### Returns - -`Promise` — The token record, typically `{ token: "eyJ..." }`. - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/namespaces/pubsub.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/pubsub.ts) - -Line 28. - -## Source - -[`src/rest/namespaces/pubsub.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/pubsub.ts) - -Line 16. diff --git a/fern/products/sdk-reference/typescript/rest/queues/index.mdx b/fern/products/sdk-reference/typescript/rest/queues/index.mdx index cdbca3b22b..42f9e6854e 100644 --- a/fern/products/sdk-reference/typescript/rest/queues/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/queues/index.mdx @@ -5,7 +5,7 @@ sdk_label: "TypeScript SDK" icon: "typescript" lustri: auto_generated: true - kind: "module" + kind: "class" language: "typescript" qualified_name: "rest.namespaces.queues" parent: "rest" @@ -14,22 +14,317 @@ lustri: --- # `queues` +Queue management with member operations. + +Access via `client.queues.*`. Extends standard CRUD with member list/fetch. + ## Signature ```typescript -module queues +class QueuesResource extends CrudResource +``` + +## Inheritance + +**Extends:** [CrudResource](/docs/sdk-reference/reference/typescript/rest/base/crud-resource) + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient): QueuesResource +``` + +#### Parameters + + + +#### Returns + +`QueuesResource` + +#### Source + +[`src/rest/namespaces/queues.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/queues.ts) + +Line 19. + +*** + +### create + +Create a new resource. + +#### Signature + +```typescript +create(body: any): Promise +``` + +#### Parameters + + + Request body describing the resource to create. + + +#### Returns + +`Promise` — The newly-created resource. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 55. + +*** + +### delete + +Delete a resource by ID. + +#### Signature + +```typescript +delete(resourceId: string): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + +#### Returns + +`Promise` — The platform's delete response (often an empty body on success). + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 95. + +*** + +### get + +Fetch a single resource by ID. + +#### Signature + +```typescript +get(resourceId: string): Promise ``` -## Classes +#### Parameters + + + Unique identifier of the resource. + + +#### Returns + +`Promise` — The resource record. + +#### Throws + +- On any non-2xx HTTP response (including `404`). + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 66. + +*** + +### getMember + +Fetch a specific queue member by ID. + +#### Signature + +```typescript +getMember(queueId: string, memberId: string): Promise +``` + +#### Parameters + + + Unique identifier of the queue. + + + + Unique identifier of the queue member. + + +#### Returns + +`Promise` — The queue member record. + +#### Throws + +- On any non-2xx HTTP response (including `404`). + +#### Source + +[`src/rest/namespaces/queues.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/queues.ts) + +Line 55. + +*** + +### getNextMember + +Get the next member to be served in a queue (FIFO head). + +#### Signature + +```typescript +getNextMember(queueId: string): Promise +``` + +#### Parameters + + + Unique identifier of the queue. + + +#### Returns + +`Promise` — The next queue member record, or a platform-shaped empty response when the queue is empty. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/queues.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/queues.ts) + +Line 43. + +*** + +### list + +List resources with optional query parameters. + +#### Signature + +```typescript +list(params?: QueryParams): Promise +``` + +#### Parameters + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — The paginated list response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 44. + +*** + +### listMembers + +List members in a queue. + +#### Signature + +```typescript +listMembers(queueId: string, params?: QueryParams): Promise +``` + +#### Parameters + + + Unique identifier of the queue. + + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — A paginated list of queue members. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/queues.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/queues.ts) + +Line 31. + +*** + +### update + +Update a resource by ID. + +Uses HTTP `PATCH` by default; subclasses may set `_updateMethod = 'PUT'` +when the remote API requires a full-replacement semantics. + +#### Signature + +```typescript +update(resourceId: string, body: any): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + + + Request body with updated fields. + + +#### Returns + +`Promise` — The updated resource. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) - - - Queue management with member operations. - - +Line 81. ## Source [`src/rest/namespaces/queues.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/queues.ts) -Line 1. +Line 16. diff --git a/fern/products/sdk-reference/typescript/rest/queues/queues-resource/index.mdx b/fern/products/sdk-reference/typescript/rest/queues/queues-resource/index.mdx deleted file mode 100644 index b8d46b0197..0000000000 --- a/fern/products/sdk-reference/typescript/rest/queues/queues-resource/index.mdx +++ /dev/null @@ -1,330 +0,0 @@ ---- -slug: "/reference/typescript/rest/queues/queues-resource" -title: "QueuesResource" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "rest.namespaces.queues.QueuesResource" - parent: "rest.namespaces.queues" - module: "rest.queues" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/queues.ts" ---- -# `QueuesResource` - -Queue management with member operations. - -Access via `client.queues.*`. Extends standard CRUD with member list/fetch. - -## Signature - -```typescript -class QueuesResource extends CrudResource -``` - -## Inheritance - -**Extends:** [CrudResource](/docs/sdk-reference/reference/typescript/rest/base/crud-resource) - -## Methods - -### constructor - -#### Signature - -```typescript -constructor(http: HttpClient): QueuesResource -``` - -#### Parameters - - - -#### Returns - -`QueuesResource` - -#### Source - -[`src/rest/namespaces/queues.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/queues.ts) - -Line 19. - -*** - -### create - -Create a new resource. - -#### Signature - -```typescript -create(body: any): Promise -``` - -#### Parameters - - - Request body describing the resource to create. - - -#### Returns - -`Promise` — The newly-created resource. - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) - -Line 55. - -*** - -### delete - -Delete a resource by ID. - -#### Signature - -```typescript -delete(resourceId: string): Promise -``` - -#### Parameters - - - Unique identifier of the resource. - - -#### Returns - -`Promise` — The platform's delete response (often an empty body on success). - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) - -Line 95. - -*** - -### get - -Fetch a single resource by ID. - -#### Signature - -```typescript -get(resourceId: string): Promise -``` - -#### Parameters - - - Unique identifier of the resource. - - -#### Returns - -`Promise` — The resource record. - -#### Throws - -- On any non-2xx HTTP response (including `404`). - -#### Source - -[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) - -Line 66. - -*** - -### getMember - -Fetch a specific queue member by ID. - -#### Signature - -```typescript -getMember(queueId: string, memberId: string): Promise -``` - -#### Parameters - - - Unique identifier of the queue. - - - - Unique identifier of the queue member. - - -#### Returns - -`Promise` — The queue member record. - -#### Throws - -- On any non-2xx HTTP response (including `404`). - -#### Source - -[`src/rest/namespaces/queues.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/queues.ts) - -Line 55. - -*** - -### getNextMember - -Get the next member to be served in a queue (FIFO head). - -#### Signature - -```typescript -getNextMember(queueId: string): Promise -``` - -#### Parameters - - - Unique identifier of the queue. - - -#### Returns - -`Promise` — The next queue member record, or a platform-shaped empty response when the queue is empty. - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/namespaces/queues.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/queues.ts) - -Line 43. - -*** - -### list - -List resources with optional query parameters. - -#### Signature - -```typescript -list(params?: QueryParams): Promise -``` - -#### Parameters - - - Optional filter / pagination query parameters. - - -#### Returns - -`Promise` — The paginated list response. - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) - -Line 44. - -*** - -### listMembers - -List members in a queue. - -#### Signature - -```typescript -listMembers(queueId: string, params?: QueryParams): Promise -``` - -#### Parameters - - - Unique identifier of the queue. - - - - Optional filter / pagination query parameters. - - -#### Returns - -`Promise` — A paginated list of queue members. - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/namespaces/queues.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/queues.ts) - -Line 31. - -*** - -### update - -Update a resource by ID. - -Uses HTTP `PATCH` by default; subclasses may set `_updateMethod = 'PUT'` -when the remote API requires a full-replacement semantics. - -#### Signature - -```typescript -update(resourceId: string, body: any): Promise -``` - -#### Parameters - - - Unique identifier of the resource. - - - - Request body with updated fields. - - -#### Returns - -`Promise` — The updated resource. - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) - -Line 81. - -## Source - -[`src/rest/namespaces/queues.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/queues.ts) - -Line 16. diff --git a/fern/products/sdk-reference/typescript/rest/recordings/index.mdx b/fern/products/sdk-reference/typescript/rest/recordings/index.mdx index de57c62095..b03b59a4c4 100644 --- a/fern/products/sdk-reference/typescript/rest/recordings/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/recordings/index.mdx @@ -5,7 +5,7 @@ sdk_label: "TypeScript SDK" icon: "typescript" lustri: auto_generated: true - kind: "module" + kind: "class" language: "typescript" qualified_name: "rest.namespaces.recordings" parent: "rest" @@ -14,22 +14,142 @@ lustri: --- # `recordings` +Recording management (read-only + delete). + +Access via `client.recordings.*`. + ## Signature ```typescript -module recordings +class RecordingsResource extends BaseResource +``` + +## Inheritance + +**Extends:** [BaseResource](/docs/sdk-reference/reference/typescript/rest/base/base-resource) + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient): RecordingsResource +``` + +#### Parameters + + + +#### Returns + +`RecordingsResource` + +#### Source + +[`src/rest/namespaces/recordings.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/recordings.ts) + +Line 17. + +*** + +### delete + +Delete a recording. + +#### Signature + +```typescript +delete(recordingId: string): Promise ``` -## Classes +#### Parameters + + + Unique identifier of the recording. + + +#### Returns + +`Promise` — The platform's delete response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/recordings.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/recordings.ts) + +Line 50. + +*** + +### get + +Fetch a recording's metadata by ID. + +#### Signature + +```typescript +get(recordingId: string): Promise +``` + +#### Parameters + + + Unique identifier of the recording. + + +#### Returns + +`Promise` — The recording metadata record. + +#### Throws + +- On any non-2xx HTTP response (including `404`). + +#### Source + +[`src/rest/namespaces/recordings.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/recordings.ts) + +Line 39. + +*** + +### list + +List recordings in the project. + +#### Signature + +```typescript +list(params?: QueryParams): Promise +``` + +#### Parameters + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — A paginated list of recordings. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/recordings.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/recordings.ts) - - - Recording management (read-only + delete). - - +Line 28. ## Source [`src/rest/namespaces/recordings.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/recordings.ts) -Line 1. +Line 16. diff --git a/fern/products/sdk-reference/typescript/rest/recordings/recordings-resource/index.mdx b/fern/products/sdk-reference/typescript/rest/recordings/recordings-resource/index.mdx deleted file mode 100644 index a865be1ed4..0000000000 --- a/fern/products/sdk-reference/typescript/rest/recordings/recordings-resource/index.mdx +++ /dev/null @@ -1,155 +0,0 @@ ---- -slug: "/reference/typescript/rest/recordings/recordings-resource" -title: "RecordingsResource" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "rest.namespaces.recordings.RecordingsResource" - parent: "rest.namespaces.recordings" - module: "rest.recordings" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/recordings.ts" ---- -# `RecordingsResource` - -Recording management (read-only + delete). - -Access via `client.recordings.*`. - -## Signature - -```typescript -class RecordingsResource extends BaseResource -``` - -## Inheritance - -**Extends:** [BaseResource](/docs/sdk-reference/reference/typescript/rest/base/base-resource) - -## Methods - -### constructor - -#### Signature - -```typescript -constructor(http: HttpClient): RecordingsResource -``` - -#### Parameters - - - -#### Returns - -`RecordingsResource` - -#### Source - -[`src/rest/namespaces/recordings.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/recordings.ts) - -Line 17. - -*** - -### delete - -Delete a recording. - -#### Signature - -```typescript -delete(recordingId: string): Promise -``` - -#### Parameters - - - Unique identifier of the recording. - - -#### Returns - -`Promise` — The platform's delete response. - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/namespaces/recordings.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/recordings.ts) - -Line 50. - -*** - -### get - -Fetch a recording's metadata by ID. - -#### Signature - -```typescript -get(recordingId: string): Promise -``` - -#### Parameters - - - Unique identifier of the recording. - - -#### Returns - -`Promise` — The recording metadata record. - -#### Throws - -- On any non-2xx HTTP response (including `404`). - -#### Source - -[`src/rest/namespaces/recordings.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/recordings.ts) - -Line 39. - -*** - -### list - -List recordings in the project. - -#### Signature - -```typescript -list(params?: QueryParams): Promise -``` - -#### Parameters - - - Optional filter / pagination query parameters. - - -#### Returns - -`Promise` — A paginated list of recordings. - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/namespaces/recordings.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/recordings.ts) - -Line 28. - -## Source - -[`src/rest/namespaces/recordings.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/recordings.ts) - -Line 16. diff --git a/fern/products/sdk-reference/typescript/rest/rest-client/index.mdx b/fern/products/sdk-reference/typescript/rest/rest-client/index.mdx deleted file mode 100644 index 357165b912..0000000000 --- a/fern/products/sdk-reference/typescript/rest/rest-client/index.mdx +++ /dev/null @@ -1,167 +0,0 @@ ---- -slug: "/reference/typescript/rest/rest-client" -title: "RestClient" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "rest.RestClient" - parent: "rest" - module: "rest" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/index.ts" ---- -# `RestClient` - -REST client for the SignalWire platform APIs. - -## Signature - -```typescript -class RestClient -``` - -## Examples - -```typescript -const client = new RestClient({ - project: 'your-project-id', - token: 'your-api-token', - host: 'your-space.signalwire.com', -}); - -// Or use env vars: SIGNALWIRE_PROJECT_ID, SIGNALWIRE_API_TOKEN, SIGNALWIRE_SPACE -const client = new RestClient(); - -// Use namespaced resources -await client.fabric.aiAgents.list(); -await client.calling.play(callId, { play: [...] }); -await client.phoneNumbers.search({ areaCode: '512' }); -await client.video.rooms.create({ name: 'standup' }); -await client.compat.calls.list(); -``` - -## Properties - - - Relay Address CRUD. - - - - REST-based call control surface (all 37 commands as methods). - - - - Chat token issuance. - - - - Twilio-compatible LAML surface (legacy; prefer native namespaces for new work). - - - - Datasphere RAG — document indexing and semantic search. - - - - Fabric composition — AI Agents, SWML scripts, call flows, tokens, etc. - - - - Import externally-hosted phone numbers. - - - - Read-only message / voice / fax / conference logs. - - - - Carrier + CNAM phone-number lookups. - - - - Multi-factor authentication (SMS / voice code send + verify). - - - - Number-group CRUD plus membership operations. - - - - Phone-number CRUD plus availability search. - - - - Project-scoped API token management. - - - - PubSub token issuance. - - - - Call-queue CRUD plus member operations. - - - - Recording read / delete. - - - - US 10DLC Campaign Registry — brands, campaigns, orders, numbers. - - - - Short-code read / update. - - - - Project-level SIP profile read / update (singleton). - - - - Verified Caller ID CRUD plus verification flow. - - - - Video rooms, sessions, recordings, conferences, tokens, streams. - - -## Methods - -### constructor - -Create a new REST client. - -#### Signature - -```typescript -constructor(options: ClientOptions = {}): RestClient -``` - -#### Parameters - - - Connection options. `project`, `token`, and `host` are required. If any are omitted they fall back to `SIGNALWIRE_PROJECT_ID`, `SIGNALWIRE_API_TOKEN`, and `SIGNALWIRE_SPACE` environment variables. - - -#### Returns - -`RestClient` - -#### Throws - -- When `project`, `token`, or `host` is missing from both the options and the environment. - -#### Source - -[`src/rest/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/index.ts) - -Line 128. - -## Source - -[`src/rest/index.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/index.ts) - -Line 58. diff --git a/fern/products/sdk-reference/typescript/rest/short-codes/index.mdx b/fern/products/sdk-reference/typescript/rest/short-codes/index.mdx index 41afa1795c..3ebbffcef2 100644 --- a/fern/products/sdk-reference/typescript/rest/short-codes/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/short-codes/index.mdx @@ -5,7 +5,7 @@ sdk_label: "TypeScript SDK" icon: "typescript" lustri: auto_generated: true - kind: "module" + kind: "class" language: "typescript" qualified_name: "rest.namespaces.short-codes" parent: "rest" @@ -14,22 +14,146 @@ lustri: --- # `short-codes` +Short code management (read + update only). + +Access via `client.shortCodes.*`. + ## Signature ```typescript -module short-codes +class ShortCodesResource extends BaseResource +``` + +## Inheritance + +**Extends:** [BaseResource](/docs/sdk-reference/reference/typescript/rest/base/base-resource) + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient): ShortCodesResource +``` + +#### Parameters + + + +#### Returns + +`ShortCodesResource` + +#### Source + +[`src/rest/namespaces/short-codes.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/short-codes.ts) + +Line 17. + +*** + +### get + +Fetch a short code by ID. + +#### Signature + +```typescript +get(shortCodeId: string): Promise +``` + +#### Parameters + + + Unique identifier of the short code. + + +#### Returns + +`Promise` — The short-code record. + +#### Throws + +- On any non-2xx HTTP response (including `404`). + +#### Source + +[`src/rest/namespaces/short-codes.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/short-codes.ts) + +Line 39. + +*** + +### list + +List short codes in the project. + +#### Signature + +```typescript +list(params?: QueryParams): Promise +``` + +#### Parameters + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — A paginated list of short codes. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/short-codes.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/short-codes.ts) + +Line 28. + +*** + +### update + +Update a short code's configuration (webhooks, friendly name, etc.). + +#### Signature + +```typescript +update(shortCodeId: string, body: any): Promise ``` -## Classes +#### Parameters + + + Unique identifier of the short code. + + + + Full updated short-code attributes (replace semantics). + + +#### Returns + +`Promise` — The updated short-code record. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/short-codes.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/short-codes.ts) - - - Short code management (read + update only). - - +Line 51. ## Source [`src/rest/namespaces/short-codes.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/short-codes.ts) -Line 1. +Line 16. diff --git a/fern/products/sdk-reference/typescript/rest/short-codes/short-codes-resource/index.mdx b/fern/products/sdk-reference/typescript/rest/short-codes/short-codes-resource/index.mdx deleted file mode 100644 index ab4cc7ccc0..0000000000 --- a/fern/products/sdk-reference/typescript/rest/short-codes/short-codes-resource/index.mdx +++ /dev/null @@ -1,159 +0,0 @@ ---- -slug: "/reference/typescript/rest/short-codes/short-codes-resource" -title: "ShortCodesResource" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "rest.namespaces.short-codes.ShortCodesResource" - parent: "rest.namespaces.short-codes" - module: "rest.short-codes" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/short-codes.ts" ---- -# `ShortCodesResource` - -Short code management (read + update only). - -Access via `client.shortCodes.*`. - -## Signature - -```typescript -class ShortCodesResource extends BaseResource -``` - -## Inheritance - -**Extends:** [BaseResource](/docs/sdk-reference/reference/typescript/rest/base/base-resource) - -## Methods - -### constructor - -#### Signature - -```typescript -constructor(http: HttpClient): ShortCodesResource -``` - -#### Parameters - - - -#### Returns - -`ShortCodesResource` - -#### Source - -[`src/rest/namespaces/short-codes.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/short-codes.ts) - -Line 17. - -*** - -### get - -Fetch a short code by ID. - -#### Signature - -```typescript -get(shortCodeId: string): Promise -``` - -#### Parameters - - - Unique identifier of the short code. - - -#### Returns - -`Promise` — The short-code record. - -#### Throws - -- On any non-2xx HTTP response (including `404`). - -#### Source - -[`src/rest/namespaces/short-codes.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/short-codes.ts) - -Line 39. - -*** - -### list - -List short codes in the project. - -#### Signature - -```typescript -list(params?: QueryParams): Promise -``` - -#### Parameters - - - Optional filter / pagination query parameters. - - -#### Returns - -`Promise` — A paginated list of short codes. - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/namespaces/short-codes.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/short-codes.ts) - -Line 28. - -*** - -### update - -Update a short code's configuration (webhooks, friendly name, etc.). - -#### Signature - -```typescript -update(shortCodeId: string, body: any): Promise -``` - -#### Parameters - - - Unique identifier of the short code. - - - - Full updated short-code attributes (replace semantics). - - -#### Returns - -`Promise` — The updated short-code record. - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/namespaces/short-codes.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/short-codes.ts) - -Line 51. - -## Source - -[`src/rest/namespaces/short-codes.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/short-codes.ts) - -Line 16. diff --git a/fern/products/sdk-reference/typescript/rest/sip-profile/index.mdx b/fern/products/sdk-reference/typescript/rest/sip-profile/index.mdx index 5a0fa6a92c..9b728a7155 100644 --- a/fern/products/sdk-reference/typescript/rest/sip-profile/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/sip-profile/index.mdx @@ -5,7 +5,7 @@ sdk_label: "TypeScript SDK" icon: "typescript" lustri: auto_generated: true - kind: "module" + kind: "class" language: "typescript" qualified_name: "rest.namespaces.sip-profile" parent: "rest" @@ -14,22 +14,104 @@ lustri: --- # `sip-profile` +Project SIP profile (singleton resource). + +Access via `client.sipProfile.*`. + ## Signature ```typescript -module sip-profile +class SipProfileResource extends BaseResource +``` + +## Inheritance + +**Extends:** [BaseResource](/docs/sdk-reference/reference/typescript/rest/base/base-resource) + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient): SipProfileResource +``` + +#### Parameters + + + +#### Returns + +`SipProfileResource` + +#### Source + +[`src/rest/namespaces/sip-profile.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/sip-profile.ts) + +Line 16. + +*** + +### get + +Fetch the project's SIP profile. + +#### Signature + +```typescript +get(): Promise +``` + +#### Returns + +`Promise` — The SIP profile record for this project. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/sip-profile.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/sip-profile.ts) + +Line 26. + +*** + +### update + +Update the project's SIP profile. + +#### Signature + +```typescript +update(body: any): Promise ``` -## Classes +#### Parameters + + + Full SIP profile attributes (replace semantics — not patch). + + +#### Returns + +`Promise` — The updated SIP profile. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/sip-profile.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/sip-profile.ts) - - - Project SIP profile (singleton resource). - - +Line 37. ## Source [`src/rest/namespaces/sip-profile.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/sip-profile.ts) -Line 1. +Line 15. diff --git a/fern/products/sdk-reference/typescript/rest/sip-profile/sip-profile-resource/index.mdx b/fern/products/sdk-reference/typescript/rest/sip-profile/sip-profile-resource/index.mdx deleted file mode 100644 index f4f020a5cf..0000000000 --- a/fern/products/sdk-reference/typescript/rest/sip-profile/sip-profile-resource/index.mdx +++ /dev/null @@ -1,117 +0,0 @@ ---- -slug: "/reference/typescript/rest/sip-profile/sip-profile-resource" -title: "SipProfileResource" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "rest.namespaces.sip-profile.SipProfileResource" - parent: "rest.namespaces.sip-profile" - module: "rest.sip-profile" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/sip-profile.ts" ---- -# `SipProfileResource` - -Project SIP profile (singleton resource). - -Access via `client.sipProfile.*`. - -## Signature - -```typescript -class SipProfileResource extends BaseResource -``` - -## Inheritance - -**Extends:** [BaseResource](/docs/sdk-reference/reference/typescript/rest/base/base-resource) - -## Methods - -### constructor - -#### Signature - -```typescript -constructor(http: HttpClient): SipProfileResource -``` - -#### Parameters - - - -#### Returns - -`SipProfileResource` - -#### Source - -[`src/rest/namespaces/sip-profile.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/sip-profile.ts) - -Line 16. - -*** - -### get - -Fetch the project's SIP profile. - -#### Signature - -```typescript -get(): Promise -``` - -#### Returns - -`Promise` — The SIP profile record for this project. - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/namespaces/sip-profile.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/sip-profile.ts) - -Line 26. - -*** - -### update - -Update the project's SIP profile. - -#### Signature - -```typescript -update(body: any): Promise -``` - -#### Parameters - - - Full SIP profile attributes (replace semantics — not patch). - - -#### Returns - -`Promise` — The updated SIP profile. - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/namespaces/sip-profile.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/sip-profile.ts) - -Line 37. - -## Source - -[`src/rest/namespaces/sip-profile.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/sip-profile.ts) - -Line 15. diff --git a/fern/products/sdk-reference/typescript/rest/verified-callers/index.mdx b/fern/products/sdk-reference/typescript/rest/verified-callers/index.mdx index 7479536cad..5be2aba8fc 100644 --- a/fern/products/sdk-reference/typescript/rest/verified-callers/index.mdx +++ b/fern/products/sdk-reference/typescript/rest/verified-callers/index.mdx @@ -5,7 +5,7 @@ sdk_label: "TypeScript SDK" icon: "typescript" lustri: auto_generated: true - kind: "module" + kind: "class" language: "typescript" qualified_name: "rest.namespaces.verified-callers" parent: "rest" @@ -14,22 +14,283 @@ lustri: --- # `verified-callers` +Verified caller ID management with verification flow. + +Access via `client.verifiedCallers.*`. Extends standard CRUD with +`redialVerification()` and `submitVerification()` for the two-step +phone-number verification handshake. + ## Signature ```typescript -module verified-callers +class VerifiedCallersResource extends CrudResource +``` + +## Inheritance + +**Extends:** [CrudResource](/docs/sdk-reference/reference/typescript/rest/base/crud-resource) + +## Methods + +### constructor + +#### Signature + +```typescript +constructor(http: HttpClient): VerifiedCallersResource +``` + +#### Parameters + + + +#### Returns + +`VerifiedCallersResource` + +#### Source + +[`src/rest/namespaces/verified-callers.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/verified-callers.ts) + +Line 20. + +*** + +### create + +Create a new resource. + +#### Signature + +```typescript +create(body: any): Promise ``` -## Classes +#### Parameters + + + Request body describing the resource to create. + + +#### Returns + +`Promise` — The newly-created resource. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 55. + +*** + +### delete + +Delete a resource by ID. + +#### Signature + +```typescript +delete(resourceId: string): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + +#### Returns + +`Promise` — The platform's delete response (often an empty body on success). + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 95. + +*** + +### get + +Fetch a single resource by ID. + +#### Signature + +```typescript +get(resourceId: string): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + +#### Returns + +`Promise` — The resource record. + +#### Throws + +- On any non-2xx HTTP response (including `404`). + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 66. + +*** + +### list + +List resources with optional query parameters. + +#### Signature + +```typescript +list(params?: QueryParams): Promise +``` + +#### Parameters + + + Optional filter / pagination query parameters. + + +#### Returns + +`Promise` — The paginated list response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) + +Line 44. + +*** + +### redialVerification + +Redial the verification call, starting the handshake over from scratch. + +#### Signature + +```typescript +redialVerification(callerId: string): Promise +``` + +#### Parameters + + + Unique identifier of the verified caller ID resource. + + +#### Returns + +`Promise` — The platform-shaped verification response. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/namespaces/verified-callers.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/verified-callers.ts) + +Line 31. + +*** + +### submitVerification + +Submit the verification code the caller received on the verification call. + +#### Signature + +```typescript +submitVerification(callerId: string, body: any): Promise +``` + +#### Parameters + + + Unique identifier of the verified caller ID resource. + + + + Verification payload (typically `{ verification_code: "1234" }`). + + +#### Returns + +`Promise` — The completed verification record. + +#### Throws + +- On any non-2xx HTTP response (including a rejected code). + +#### Source + +[`src/rest/namespaces/verified-callers.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/verified-callers.ts) + +Line 43. + +*** + +### update + +Update a resource by ID. + +Uses HTTP `PATCH` by default; subclasses may set `_updateMethod = 'PUT'` +when the remote API requires a full-replacement semantics. + +#### Signature + +```typescript +update(resourceId: string, body: any): Promise +``` + +#### Parameters + + + Unique identifier of the resource. + + + + Request body with updated fields. + + +#### Returns + +`Promise` — The updated resource. + +#### Throws + +- On any non-2xx HTTP response. + +#### Source + +[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) - - - Verified caller ID management with verification flow. - - +Line 81. ## Source [`src/rest/namespaces/verified-callers.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/verified-callers.ts) -Line 1. +Line 17. diff --git a/fern/products/sdk-reference/typescript/rest/verified-callers/verified-callers-resource/index.mdx b/fern/products/sdk-reference/typescript/rest/verified-callers/verified-callers-resource/index.mdx deleted file mode 100644 index be97938725..0000000000 --- a/fern/products/sdk-reference/typescript/rest/verified-callers/verified-callers-resource/index.mdx +++ /dev/null @@ -1,296 +0,0 @@ ---- -slug: "/reference/typescript/rest/verified-callers/verified-callers-resource" -title: "VerifiedCallersResource" -sdk_label: "TypeScript SDK" -icon: "typescript" -lustri: - auto_generated: true - kind: "class" - language: "typescript" - qualified_name: "rest.namespaces.verified-callers.VerifiedCallersResource" - parent: "rest.namespaces.verified-callers" - module: "rest.verified-callers" - source_url: "https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/verified-callers.ts" ---- -# `VerifiedCallersResource` - -Verified caller ID management with verification flow. - -Access via `client.verifiedCallers.*`. Extends standard CRUD with -`redialVerification()` and `submitVerification()` for the two-step -phone-number verification handshake. - -## Signature - -```typescript -class VerifiedCallersResource extends CrudResource -``` - -## Inheritance - -**Extends:** [CrudResource](/docs/sdk-reference/reference/typescript/rest/base/crud-resource) - -## Methods - -### constructor - -#### Signature - -```typescript -constructor(http: HttpClient): VerifiedCallersResource -``` - -#### Parameters - - - -#### Returns - -`VerifiedCallersResource` - -#### Source - -[`src/rest/namespaces/verified-callers.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/verified-callers.ts) - -Line 20. - -*** - -### create - -Create a new resource. - -#### Signature - -```typescript -create(body: any): Promise -``` - -#### Parameters - - - Request body describing the resource to create. - - -#### Returns - -`Promise` — The newly-created resource. - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) - -Line 55. - -*** - -### delete - -Delete a resource by ID. - -#### Signature - -```typescript -delete(resourceId: string): Promise -``` - -#### Parameters - - - Unique identifier of the resource. - - -#### Returns - -`Promise` — The platform's delete response (often an empty body on success). - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) - -Line 95. - -*** - -### get - -Fetch a single resource by ID. - -#### Signature - -```typescript -get(resourceId: string): Promise -``` - -#### Parameters - - - Unique identifier of the resource. - - -#### Returns - -`Promise` — The resource record. - -#### Throws - -- On any non-2xx HTTP response (including `404`). - -#### Source - -[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) - -Line 66. - -*** - -### list - -List resources with optional query parameters. - -#### Signature - -```typescript -list(params?: QueryParams): Promise -``` - -#### Parameters - - - Optional filter / pagination query parameters. - - -#### Returns - -`Promise` — The paginated list response. - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) - -Line 44. - -*** - -### redialVerification - -Redial the verification call, starting the handshake over from scratch. - -#### Signature - -```typescript -redialVerification(callerId: string): Promise -``` - -#### Parameters - - - Unique identifier of the verified caller ID resource. - - -#### Returns - -`Promise` — The platform-shaped verification response. - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/namespaces/verified-callers.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/verified-callers.ts) - -Line 31. - -*** - -### submitVerification - -Submit the verification code the caller received on the verification call. - -#### Signature - -```typescript -submitVerification(callerId: string, body: any): Promise -``` - -#### Parameters - - - Unique identifier of the verified caller ID resource. - - - - Verification payload (typically `{ verification_code: "1234" }`). - - -#### Returns - -`Promise` — The completed verification record. - -#### Throws - -- On any non-2xx HTTP response (including a rejected code). - -#### Source - -[`src/rest/namespaces/verified-callers.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/verified-callers.ts) - -Line 43. - -*** - -### update - -Update a resource by ID. - -Uses HTTP `PATCH` by default; subclasses may set `_updateMethod = 'PUT'` -when the remote API requires a full-replacement semantics. - -#### Signature - -```typescript -update(resourceId: string, body: any): Promise -``` - -#### Parameters - - - Unique identifier of the resource. - - - - Request body with updated fields. - - -#### Returns - -`Promise` — The updated resource. - -#### Throws - -- On any non-2xx HTTP response. - -#### Source - -[`src/rest/base/CrudResource.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/base/CrudResource.ts) - -Line 81. - -## Source - -[`src/rest/namespaces/verified-callers.ts`](https://github.com/signalwire/signalwire-typescript/blob/main/src/rest/namespaces/verified-callers.ts) - -Line 17. From f43a5ec0a57f481412e4266b91874d937cb1e9c8 Mon Sep 17 00:00:00 2001 From: Devon-White Date: Fri, 12 Jun 2026 12:54:42 -0400 Subject: [PATCH 7/8] SDK Reference: route package-level helpers into namespaces; fix perl mapping Regenerate all 10 SDKs after the namespace engine + perl extractor fixes: - python/ruby: skill-registry helper functions now surface under Agents (routed off the package-root module). - perl: Core/Agents now map fully (the PPI double-nesting bug is fixed), and the package facade lands under Core. - typescript, go, dotnet, perl: clean four-section trees. - java/php/cpp/rust retain a nav-excluded package-root facade dir (facade class shares the package-namespace name, so it can't be routed by name). --- fern/products/sdk-reference/perl/_meta.json | 2 +- .../agent/agent-base/agent-base/index.mdx | 1343 ----------------- .../perl/agents/agent/agent-base/index.mdx | 1335 +++++++++++++++- .../sdk-reference/perl/agents/agent/index.mdx | 2 +- .../contexts/context-builder/index.mdx | 4 +- .../signal-wire => agents}/contexts/index.mdx | 8 +- .../signal-wire => agents}/data-map/index.mdx | 6 +- .../sdk-reference/perl/agents/index.mdx | 8 + .../sdk-reference/perl/agents/pom/index.mdx | 10 +- .../agents/pom/prompt-object-model/index.mdx | 243 ++- .../prompt-object-model/index.mdx | 249 --- .../perl/agents/pom/section/index.mdx | 165 +- .../perl/agents/pom/section/section/index.mdx | 171 --- .../prefabs/concierge/concierge/index.mdx | 51 - .../perl/agents/prefabs/concierge/index.mdx | 43 +- .../agents/prefabs/faq-bot/faq-bot/index.mdx | 51 - .../perl/agents/prefabs/faq-bot/index.mdx | 43 +- .../perl/agents/prefabs/index.mdx | 2 +- .../agents/prefabs/info-gatherer/index.mdx | 43 +- .../info-gatherer/info-gatherer/index.mdx | 51 - .../agents/prefabs/receptionist/index.mdx | 43 +- .../receptionist/receptionist/index.mdx | 51 - .../perl/agents/prefabs/survey/index.mdx | 43 +- .../agents/prefabs/survey/survey/index.mdx | 51 - .../agent-server/agent-server/index.mdx | 163 -- .../perl/agents/server/agent-server/index.mdx | 155 +- .../perl/agents/server/index.mdx | 2 +- .../api-ninjas-trivia/index.mdx | 79 - .../builtin/api-ninjas-trivia/index.mdx | 71 +- .../claude-skills/claude-skills/index.mdx | 95 -- .../skills/builtin/claude-skills/index.mdx | 87 +- .../custom-skills/custom-skills/index.mdx | 79 - .../skills/builtin/custom-skills/index.mdx | 71 +- .../datasphere-serverless/index.mdx | 111 -- .../builtin/datasphere-serverless/index.mdx | 103 +- .../builtin/datasphere/datasphere/index.mdx | 131 -- .../skills/builtin/datasphere/index.mdx | 123 +- .../builtin/datetime/datetime/index.mdx | 79 - .../agents/skills/builtin/datetime/index.mdx | 71 +- .../builtin/google-maps/google-maps/index.mdx | 95 -- .../skills/builtin/google-maps/index.mdx | 87 +- .../perl/agents/skills/builtin/index.mdx | 2 +- .../skills/builtin/info-gatherer/index.mdx | 87 +- .../info-gatherer/info-gatherer/index.mdx | 95 -- .../perl/agents/skills/builtin/joke/index.mdx | 87 +- .../agents/skills/builtin/joke/joke/index.mdx | 95 -- .../perl/agents/skills/builtin/math/index.mdx | 71 +- .../agents/skills/builtin/math/math/index.mdx | 79 - .../skills/builtin/mcp-gateway/index.mdx | 103 +- .../builtin/mcp-gateway/mcp-gateway/index.mdx | 111 -- .../builtin/native-vector-search/index.mdx | 87 +- .../native-vector-search/index.mdx | 95 -- .../builtin/play-background-file/index.mdx | 71 +- .../play-background-file/index.mdx | 79 - .../agents/skills/builtin/spider/index.mdx | 107 +- .../skills/builtin/spider/spider/index.mdx | 115 -- .../skills/builtin/swml-transfer/index.mdx | 87 +- .../swml-transfer/swml-transfer/index.mdx | 95 -- .../skills/builtin/weather-api/index.mdx | 71 +- .../builtin/weather-api/weather-api/index.mdx | 79 - .../skills/builtin/web-search/index.mdx | 107 +- .../builtin/web-search/web-search/index.mdx | 115 -- .../skills/builtin/wikipedia-search/index.mdx | 91 +- .../wikipedia-search/index.mdx | 99 -- .../perl/agents/skills/index.mdx | 18 +- .../perl/agents/skills/skill-base/index.mdx | 249 ++- .../skills/skill-base/skill-base/index.mdx | 255 ---- .../agents/skills/skill-manager/index.mdx | 99 +- .../skill-manager/skill-manager/index.mdx | 107 -- .../perl/agents/skills/skill-name/index.mdx | 146 +- .../skills/skill-name/skill-name/index.mdx | 152 -- .../agents/skills/skill-registry/index.mdx | 139 +- .../skill-registry/skill-registry/index.mdx | 147 -- .../function-result/function-result/index.mdx | 896 ----------- .../agents/swaig/function-result/index.mdx | 890 ++++++++++- .../sdk-reference/perl/agents/swaig/index.mdx | 22 +- .../agents/swaig/join-conference/index.mdx | 274 +++- .../join-conference/join-conference/index.mdx | 280 ---- .../agents/swaig/parameter-schema/index.mdx | 283 +++- .../parameter-schema/index.mdx | 289 ---- .../perl/agents/swaig/record-call/index.mdx | 187 ++- .../swaig/record-call/record-call/index.mdx | 193 --- .../perl/agents/swaig/tap/index.mdx | 185 ++- .../perl/agents/swaig/tap/tap/index.mdx | 191 --- .../agents/swml/document/document/index.mdx | 201 --- .../perl/agents/swml/document/index.mdx | 193 ++- .../sdk-reference/perl/agents/swml/index.mdx | 2 +- .../perl/agents/swml/schema/index.mdx | 127 +- .../perl/agents/swml/schema/schema/index.mdx | 135 -- .../perl/agents/swml/service/index.mdx | 467 +++++- .../agents/swml/service/service/index.mdx | 475 ------ .../sdk-reference/perl/core/core/index.mdx | 2 +- .../perl/core/core/logging-config/index.mdx | 55 +- .../logging-config/logging-config/index.mdx | 63 - .../sdk-reference/perl/core/index.mdx | 12 + .../signal-wire => core}/logging/index.mdx | 8 +- .../logging/log-level/index.mdx | 4 +- .../perl/core/security/index.mdx | 10 +- .../core/security/session-manager/index.mdx | 235 ++- .../session-manager/session-manager/index.mdx | 243 --- .../security/webhook-middleware/index.mdx | 62 +- .../webhook-middleware/index.mdx | 68 - .../core/security/webhook-validator/index.mdx | 119 +- .../webhook-validator/index.mdx | 125 -- .../signal-wire/index.mdx | 17 +- .../signal-wire => core}/utils/index.mdx | 8 +- .../utils/url-validator/index.mdx | 4 +- .../perl/relay/action/action/index.mdx | 357 ----- .../sdk-reference/perl/relay/action/index.mdx | 351 ++++- .../relay/call-state/call-state/index.mdx | 168 --- .../perl/relay/call-state/index.mdx | 162 +- .../perl/relay/call/call/index.mdx | 932 ------------ .../sdk-reference/perl/relay/call/index.mdx | 926 +++++++++++- .../perl/relay/client/client/index.mdx | 359 ----- .../sdk-reference/perl/relay/client/index.mdx | 353 ++++- .../perl/relay/constants/constants/index.mdx | 77 - .../perl/relay/constants/index.mdx | 67 +- .../perl/relay/device/device/index.mdx | 106 -- .../sdk-reference/perl/relay/device/index.mdx | 100 +- .../relay/dial-state/dial-state/index.mdx | 162 -- .../perl/relay/dial-state/index.mdx | 156 +- .../perl/relay/event/event/index.mdx | 87 -- .../sdk-reference/perl/relay/event/index.mdx | 81 +- .../sdk-reference/perl/relay/index.mdx | 44 +- .../perl/relay/message-state/index.mdx | 165 +- .../message-state/message-state/index.mdx | 171 --- .../perl/relay/message/index.mdx | 207 ++- .../perl/relay/message/message/index.mdx | 213 --- .../rest/http-client/http-client/index.mdx | 135 -- .../perl/rest/http-client/index.mdx | 127 +- .../sdk-reference/perl/rest/index.mdx | 14 +- .../perl/rest/namespaces/base/base/index.mdx | 133 -- .../perl/rest/namespaces/base/index.mdx | 125 +- .../rest/namespaces/calling/calling/index.mdx | 953 ------------ .../perl/rest/namespaces/calling/index.mdx | 945 +++++++++++- .../perl/rest/namespaces/chat/chat/index.mdx | 51 - .../perl/rest/namespaces/chat/index.mdx | 43 +- .../rest/namespaces/compat/compat/index.mdx | 1273 ---------------- .../perl/rest/namespaces/compat/index.mdx | 1265 +++++++++++++++- .../datasphere/datasphere/index.mdx | 117 -- .../perl/rest/namespaces/datasphere/index.mdx | 109 +- .../rest/namespaces/fabric/fabric/index.mdx | 579 ------- .../perl/rest/namespaces/fabric/index.mdx | 571 ++++++- .../perl/rest/namespaces/index.mdx | 6 +- .../perl/rest/namespaces/logs/index.mdx | 185 ++- .../perl/rest/namespaces/logs/logs/index.mdx | 193 --- .../rest/namespaces/phone-numbers/index.mdx | 231 ++- .../phone-numbers/phone-numbers/index.mdx | 237 --- .../perl/rest/namespaces/project/index.mdx | 105 +- .../rest/namespaces/project/project/index.mdx | 113 -- .../perl/rest/namespaces/pub-sub/index.mdx | 43 +- .../rest/namespaces/pub-sub/pub-sub/index.mdx | 51 - .../perl/rest/namespaces/registry/index.mdx | 295 +++- .../namespaces/registry/registry/index.mdx | 303 ---- .../perl/rest/namespaces/resources/index.mdx | 575 ++++++- .../namespaces/resources/resources/index.mdx | 583 ------- .../perl/rest/namespaces/video/index.mdx | 483 +++++- .../rest/namespaces/video/video/index.mdx | 491 ------ .../perl/rest/pagination/index.mdx | 73 +- .../perl/rest/pagination/pagination/index.mdx | 79 - .../perl/rest/phone-call-handler/index.mdx | 59 +- .../phone-call-handler/index.mdx | 67 - .../perl/rest/rest-client/index.mdx | 19 +- .../rest/rest-client/rest-client/index.mdx | 27 - fern/products/sdk-reference/python/_meta.json | 2 +- .../sdk-reference/python/agents/index.mdx | 129 ++ fern/products/sdk-reference/python/all.mdx | 25 + fern/products/sdk-reference/python/all__2.mdx | 25 + fern/products/sdk-reference/python/index.mdx | 1 - .../sdk-reference/python/rest-client.mdx | 33 + .../python/signalwire/core/index.mdx | 36 - .../sdk-reference/python/signalwire/index.mdx | 197 --- .../products/sdk-reference/python/version.mdx | 25 + fern/products/sdk-reference/ruby/_meta.json | 2 +- .../sdk-reference/ruby/agents/index.mdx | 125 ++ fern/products/sdk-reference/ruby/index.mdx | 1 - .../sdk-reference/ruby/rest-client.mdx | 48 + .../sdk-reference/ruby/signal-wire/index.mdx | 198 --- fern/products/sdk-reference/ruby/version.mdx | 26 + 179 files changed, 15342 insertions(+), 16718 deletions(-) delete mode 100644 fern/products/sdk-reference/perl/agents/agent/agent-base/agent-base/index.mdx rename fern/products/sdk-reference/perl/{signal-wire/signal-wire => agents}/contexts/context-builder/index.mdx (83%) rename fern/products/sdk-reference/perl/{signal-wire/signal-wire => agents}/contexts/index.mdx (98%) rename fern/products/sdk-reference/perl/{signal-wire/signal-wire => agents}/data-map/index.mdx (97%) delete mode 100644 fern/products/sdk-reference/perl/agents/pom/prompt-object-model/prompt-object-model/index.mdx delete mode 100644 fern/products/sdk-reference/perl/agents/pom/section/section/index.mdx delete mode 100644 fern/products/sdk-reference/perl/agents/prefabs/concierge/concierge/index.mdx delete mode 100644 fern/products/sdk-reference/perl/agents/prefabs/faq-bot/faq-bot/index.mdx delete mode 100644 fern/products/sdk-reference/perl/agents/prefabs/info-gatherer/info-gatherer/index.mdx delete mode 100644 fern/products/sdk-reference/perl/agents/prefabs/receptionist/receptionist/index.mdx delete mode 100644 fern/products/sdk-reference/perl/agents/prefabs/survey/survey/index.mdx delete mode 100644 fern/products/sdk-reference/perl/agents/server/agent-server/agent-server/index.mdx delete mode 100644 fern/products/sdk-reference/perl/agents/skills/builtin/api-ninjas-trivia/api-ninjas-trivia/index.mdx delete mode 100644 fern/products/sdk-reference/perl/agents/skills/builtin/claude-skills/claude-skills/index.mdx delete mode 100644 fern/products/sdk-reference/perl/agents/skills/builtin/custom-skills/custom-skills/index.mdx delete mode 100644 fern/products/sdk-reference/perl/agents/skills/builtin/datasphere-serverless/datasphere-serverless/index.mdx delete mode 100644 fern/products/sdk-reference/perl/agents/skills/builtin/datasphere/datasphere/index.mdx delete mode 100644 fern/products/sdk-reference/perl/agents/skills/builtin/datetime/datetime/index.mdx delete mode 100644 fern/products/sdk-reference/perl/agents/skills/builtin/google-maps/google-maps/index.mdx delete mode 100644 fern/products/sdk-reference/perl/agents/skills/builtin/info-gatherer/info-gatherer/index.mdx delete mode 100644 fern/products/sdk-reference/perl/agents/skills/builtin/joke/joke/index.mdx delete mode 100644 fern/products/sdk-reference/perl/agents/skills/builtin/math/math/index.mdx delete mode 100644 fern/products/sdk-reference/perl/agents/skills/builtin/mcp-gateway/mcp-gateway/index.mdx delete mode 100644 fern/products/sdk-reference/perl/agents/skills/builtin/native-vector-search/native-vector-search/index.mdx delete mode 100644 fern/products/sdk-reference/perl/agents/skills/builtin/play-background-file/play-background-file/index.mdx delete mode 100644 fern/products/sdk-reference/perl/agents/skills/builtin/spider/spider/index.mdx delete mode 100644 fern/products/sdk-reference/perl/agents/skills/builtin/swml-transfer/swml-transfer/index.mdx delete mode 100644 fern/products/sdk-reference/perl/agents/skills/builtin/weather-api/weather-api/index.mdx delete mode 100644 fern/products/sdk-reference/perl/agents/skills/builtin/web-search/web-search/index.mdx delete mode 100644 fern/products/sdk-reference/perl/agents/skills/builtin/wikipedia-search/wikipedia-search/index.mdx delete mode 100644 fern/products/sdk-reference/perl/agents/skills/skill-base/skill-base/index.mdx delete mode 100644 fern/products/sdk-reference/perl/agents/skills/skill-manager/skill-manager/index.mdx delete mode 100644 fern/products/sdk-reference/perl/agents/skills/skill-name/skill-name/index.mdx delete mode 100644 fern/products/sdk-reference/perl/agents/skills/skill-registry/skill-registry/index.mdx delete mode 100644 fern/products/sdk-reference/perl/agents/swaig/function-result/function-result/index.mdx delete mode 100644 fern/products/sdk-reference/perl/agents/swaig/join-conference/join-conference/index.mdx delete mode 100644 fern/products/sdk-reference/perl/agents/swaig/parameter-schema/parameter-schema/index.mdx delete mode 100644 fern/products/sdk-reference/perl/agents/swaig/record-call/record-call/index.mdx delete mode 100644 fern/products/sdk-reference/perl/agents/swaig/tap/tap/index.mdx delete mode 100644 fern/products/sdk-reference/perl/agents/swml/document/document/index.mdx delete mode 100644 fern/products/sdk-reference/perl/agents/swml/schema/schema/index.mdx delete mode 100644 fern/products/sdk-reference/perl/agents/swml/service/service/index.mdx delete mode 100644 fern/products/sdk-reference/perl/core/core/logging-config/logging-config/index.mdx rename fern/products/sdk-reference/perl/{signal-wire/signal-wire => core}/logging/index.mdx (92%) rename fern/products/sdk-reference/perl/{signal-wire/signal-wire => core}/logging/log-level/index.mdx (97%) delete mode 100644 fern/products/sdk-reference/perl/core/security/session-manager/session-manager/index.mdx delete mode 100644 fern/products/sdk-reference/perl/core/security/webhook-middleware/webhook-middleware/index.mdx delete mode 100644 fern/products/sdk-reference/perl/core/security/webhook-validator/webhook-validator/index.mdx rename fern/products/sdk-reference/perl/{signal-wire => core}/signal-wire/index.mdx (91%) rename fern/products/sdk-reference/perl/{signal-wire/signal-wire => core}/utils/index.mdx (83%) rename fern/products/sdk-reference/perl/{signal-wire/signal-wire => core}/utils/url-validator/index.mdx (89%) delete mode 100644 fern/products/sdk-reference/perl/relay/action/action/index.mdx delete mode 100644 fern/products/sdk-reference/perl/relay/call-state/call-state/index.mdx delete mode 100644 fern/products/sdk-reference/perl/relay/call/call/index.mdx delete mode 100644 fern/products/sdk-reference/perl/relay/client/client/index.mdx delete mode 100644 fern/products/sdk-reference/perl/relay/constants/constants/index.mdx delete mode 100644 fern/products/sdk-reference/perl/relay/device/device/index.mdx delete mode 100644 fern/products/sdk-reference/perl/relay/dial-state/dial-state/index.mdx delete mode 100644 fern/products/sdk-reference/perl/relay/event/event/index.mdx delete mode 100644 fern/products/sdk-reference/perl/relay/message-state/message-state/index.mdx delete mode 100644 fern/products/sdk-reference/perl/relay/message/message/index.mdx delete mode 100644 fern/products/sdk-reference/perl/rest/http-client/http-client/index.mdx delete mode 100644 fern/products/sdk-reference/perl/rest/namespaces/base/base/index.mdx delete mode 100644 fern/products/sdk-reference/perl/rest/namespaces/calling/calling/index.mdx delete mode 100644 fern/products/sdk-reference/perl/rest/namespaces/chat/chat/index.mdx delete mode 100644 fern/products/sdk-reference/perl/rest/namespaces/compat/compat/index.mdx delete mode 100644 fern/products/sdk-reference/perl/rest/namespaces/datasphere/datasphere/index.mdx delete mode 100644 fern/products/sdk-reference/perl/rest/namespaces/fabric/fabric/index.mdx delete mode 100644 fern/products/sdk-reference/perl/rest/namespaces/logs/logs/index.mdx delete mode 100644 fern/products/sdk-reference/perl/rest/namespaces/phone-numbers/phone-numbers/index.mdx delete mode 100644 fern/products/sdk-reference/perl/rest/namespaces/project/project/index.mdx delete mode 100644 fern/products/sdk-reference/perl/rest/namespaces/pub-sub/pub-sub/index.mdx delete mode 100644 fern/products/sdk-reference/perl/rest/namespaces/registry/registry/index.mdx delete mode 100644 fern/products/sdk-reference/perl/rest/namespaces/resources/resources/index.mdx delete mode 100644 fern/products/sdk-reference/perl/rest/namespaces/video/video/index.mdx delete mode 100644 fern/products/sdk-reference/perl/rest/pagination/pagination/index.mdx delete mode 100644 fern/products/sdk-reference/perl/rest/phone-call-handler/phone-call-handler/index.mdx delete mode 100644 fern/products/sdk-reference/perl/rest/rest-client/rest-client/index.mdx create mode 100644 fern/products/sdk-reference/python/all.mdx create mode 100644 fern/products/sdk-reference/python/all__2.mdx create mode 100644 fern/products/sdk-reference/python/rest-client.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/core/index.mdx delete mode 100644 fern/products/sdk-reference/python/signalwire/index.mdx create mode 100644 fern/products/sdk-reference/python/version.mdx create mode 100644 fern/products/sdk-reference/ruby/rest-client.mdx delete mode 100644 fern/products/sdk-reference/ruby/signal-wire/index.mdx create mode 100644 fern/products/sdk-reference/ruby/version.mdx diff --git a/fern/products/sdk-reference/perl/_meta.json b/fern/products/sdk-reference/perl/_meta.json index 3d0ed6b7a4..b8c260d81c 100644 --- a/fern/products/sdk-reference/perl/_meta.json +++ b/fern/products/sdk-reference/perl/_meta.json @@ -6,5 +6,5 @@ "format": "mdx", "platform": "fern", "base_slug": "/reference/perl", - "item_count": 983 + "item_count": 913 } \ No newline at end of file diff --git a/fern/products/sdk-reference/perl/agents/agent/agent-base/agent-base/index.mdx b/fern/products/sdk-reference/perl/agents/agent/agent-base/agent-base/index.mdx deleted file mode 100644 index 2965521a5e..0000000000 --- a/fern/products/sdk-reference/perl/agents/agent/agent-base/agent-base/index.mdx +++ /dev/null @@ -1,1343 +0,0 @@ ---- -slug: "/reference/perl/agents/agent/agent-base/agent-base" -title: "AgentBase" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Agent::AgentBase" - parent: "agents.Agent.AgentBase" - module: "agents.Agent.AgentBase" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm" ---- -# `AgentBase` - -## Signature - -```perl -package SignalWire::Agent::AgentBase -``` - -## Inheritance - -**Extends:** [SignalWire::SWML::Service](/docs/sdk-reference/reference/perl/agents/swml/service/service) - -## Methods - -### add\_function\_include - -#### Signature - -```perl -sub add_function_include($include) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 659. - -*** - -### add\_hint - -#### Signature - -```perl -sub add_hint($hint) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 415. - -*** - -### add\_hints - -#### Signature - -```perl -sub add_hints($hints) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 421. - -*** - -### add\_internal\_filler - -#### Signature - -```perl -sub add_internal_filler(@args) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 616. - -*** - -### add\_language - -#### Signature - -```perl -sub add_language(@lang) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 447. - -*** - -### add\_mcp\_server - -#### Signature - -```perl -sub add_mcp_server($url, %opts) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 899. - -*** - -### add\_pattern\_hint - -#### Signature - -```perl -sub add_pattern_hint($pattern) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 441. - -*** - -### add\_post\_ai\_verb - -#### Signature - -```perl -sub add_post_ai_verb($verb_name, $verb_config) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 697. - -*** - -### add\_post\_answer\_verb - -#### Signature - -```perl -sub add_post_answer_verb($verb_name, $verb_config) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 691. - -*** - -### add\_pre\_answer\_verb - -#### Signature - -```perl -sub add_pre_answer_verb($verb_name, $verb_config) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 685. - -*** - -### add\_pronunciation - -#### Signature - -```perl -sub add_pronunciation(@pron) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 500. - -*** - -### add\_skill - -#### Signature - -```perl -sub add_skill($skill_name, $params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 807. - -*** - -### add\_swaig\_query\_params - -#### Signature - -```perl -sub add_swaig_query_params(@params) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 854. - -*** - -### BUILD - -#### Signature - -```perl -sub BUILD() -``` - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 161. - -*** - -### clear\_post\_ai\_verbs - -#### Signature - -```perl -sub clear_post_ai_verbs() -``` - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 715. - -*** - -### clear\_post\_answer\_verbs - -#### Signature - -```perl -sub clear_post_answer_verbs() -``` - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 709. - -*** - -### clear\_pre\_answer\_verbs - -#### Signature - -```perl -sub clear_pre_answer_verbs() -``` - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 703. - -*** - -### clear\_swaig\_query\_params - -#### Signature - -```perl -sub clear_swaig_query_params() -``` - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 860. - -*** - -### contexts - -#### Signature - -```perl -sub contexts() -``` - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 800. - -*** - -### create\_tool\_token - -#### Signature - -```perl -sub create_tool_token($tool_name, $call_id) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 378. - -*** - -### define\_contexts - -#### Signature - -```perl -sub define_contexts($contexts) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 735. - -*** - -### enable\_debug\_events - -#### Signature - -```perl -sub enable_debug_events($level) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 652. - -*** - -### enable\_mcp\_server - -#### Signature - -```perl -sub enable_mcp_server() -``` - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 909. - -*** - -### extract\_sip\_username - -#### Signature - -```perl -sub extract_sip_username($class_or_self, $body) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 1725. - -*** - -### get\_contexts - -#### Signature - -```perl -sub get_contexts() -``` - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 311. - -*** - -### get\_full\_url - -#### Signature - -```perl -sub get_full_url(%opts) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 1096. - -*** - -### get\_language\_params - -#### Signature - -```perl -sub get_language_params($code) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 491. - -*** - -### get\_post\_prompt - -#### Signature - -```perl -sub get_post_prompt() -``` - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 276. - -*** - -### get\_prompt - -#### Signature - -```perl -sub get_prompt() -``` - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 240. - -*** - -### get\_raw\_prompt - -#### Signature - -```perl -sub get_raw_prompt() -``` - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 286. - -*** - -### has\_skill - -#### Signature - -```perl -sub has_skill($skill_name) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 823. - -*** - -### list\_skills - -#### Signature - -```perl -sub list_skills() -``` - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 818. - -*** - -### list\_tool\_names - -#### Signature - -```perl -sub list_tool_names() -``` - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 795. - -*** - -### manual\_set\_proxy\_url - -#### Signature - -```perl -sub manual_set_proxy_url($url) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 848. - -*** - -### on\_debug\_event - -#### Signature - -```perl -sub on_debug_event($cb) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 891. - -*** - -### on\_summary - -#### Signature - -```perl -sub on_summary($summary, $raw_data) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 866. - -*** - -### pom - -#### Signature - -```perl -sub pom() -``` - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 257. - -*** - -### prompt\_add\_section - -#### Signature - -```perl -sub prompt_add_section($title, $body, %opts) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 190. - -*** - -### prompt\_add\_subsection - -#### Signature - -```perl -sub prompt_add_subsection($parent_title, $title, $body, %opts) -``` - -#### Parameters - - - - - - - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 201. - -*** - -### prompt\_add\_to\_section - -#### Signature - -```perl -sub prompt_add_to_section($title, %opts) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 215. - -*** - -### prompt\_has\_section - -#### Signature - -```perl -sub prompt_has_section($title) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 232. - -*** - -### psgi\_app - -#### Signature - -```perl -sub psgi_app() -``` - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 1271. - -*** - -### remove\_skill - -#### Signature - -```perl -sub remove_skill($skill_name) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 813. - -*** - -### render\_swml - -#### Signature - -```perl -sub render_swml($request_env) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 1111. - -*** - -### reset\_contexts - -#### Signature - -```perl -sub reset_contexts() -``` - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 782. - -*** - -### run - -#### Signature - -```perl -sub run(%opts) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 1620. - -*** - -### serve - -#### Signature - -```perl -sub serve(%opts) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 1625. - -*** - -### set\_answer\_config - -#### Signature - -```perl -sub set_answer_config($config) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 721. - -*** - -### set\_dynamic\_config\_callback - -#### Signature - -```perl -sub set_dynamic_config_callback($cb) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 830. - -*** - -### set\_function\_includes - -#### Signature - -```perl -sub set_function_includes($includes) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 665. - -*** - -### set\_global\_data - -#### Signature - -```perl -sub set_global_data($data) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 524. - -*** - -### set\_internal\_fillers - -#### Signature - -```perl -sub set_internal_fillers($fillers) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 584. - -*** - -### set\_language\_params - -#### Signature - -```perl -sub set_language_params($code, $params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 474. - -*** - -### set\_languages - -#### Signature - -```perl -sub set_languages($langs) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 464. - -*** - -### set\_native\_functions - -#### Signature - -```perl -sub set_native_functions($funcs) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 536. - -*** - -### set\_param - -#### Signature - -```perl -sub set_param($key, $value) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 512. - -*** - -### set\_params - -#### Signature - -```perl -sub set_params($p) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 518. - -*** - -### set\_post\_prompt - -#### Signature - -```perl -sub set_post_prompt($text) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 184. - -*** - -### set\_post\_prompt\_llm\_params - -#### Signature - -```perl -sub set_post_prompt_llm_params(@p) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 677. - -*** - -### set\_post\_prompt\_url - -#### Signature - -```perl -sub set_post_prompt_url($url) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 842. - -*** - -### set\_prompt\_llm\_params - -#### Signature - -```perl -sub set_prompt_llm_params(@p) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 671. - -*** - -### set\_prompt\_pom - -#### Signature - -```perl -sub set_prompt_pom($pom) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 298. - -*** - -### set\_prompt\_text - -#### Signature - -```perl -sub set_prompt_text($text) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 178. - -*** - -### set\_pronunciations - -#### Signature - -```perl -sub set_pronunciations($prons) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 506. - -*** - -### set\_web\_hook\_url - -#### Signature - -```perl -sub set_web_hook_url($url) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 836. - -*** - -### update\_global\_data - -#### Signature - -```perl -sub update_global_data($data) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 530. - -*** - -### validate\_tool\_token - -#### Signature - -```perl -sub validate_tool_token($function_name, $token, $call_id) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 396. - -## Source - -[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/agents/agent/agent-base/index.mdx b/fern/products/sdk-reference/perl/agents/agent/agent-base/index.mdx index 1eb65803f4..a8e3ee3212 100644 --- a/fern/products/sdk-reference/perl/agents/agent/agent-base/index.mdx +++ b/fern/products/sdk-reference/perl/agents/agent/agent-base/index.mdx @@ -5,16 +5,1339 @@ sdk_label: "Perl SDK" icon: "perl" lustri: auto_generated: true - kind: "module" + kind: "class" language: "perl" - qualified_name: "agents.Agent.AgentBase" + qualified_name: "SignalWire::Agent::AgentBase" parent: "agents.Agent" module: "agents.Agent" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm" --- # `AgentBase` -## Classes +## Signature - - - +```perl +package SignalWire::Agent::AgentBase +``` + +## Inheritance + +**Extends:** [SignalWire::SWML::Service](/docs/sdk-reference/reference/perl/agents/swml/service) + +## Methods + +### add\_function\_include + +#### Signature + +```perl +sub add_function_include($include) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 659. + +*** + +### add\_hint + +#### Signature + +```perl +sub add_hint($hint) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 415. + +*** + +### add\_hints + +#### Signature + +```perl +sub add_hints($hints) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 421. + +*** + +### add\_internal\_filler + +#### Signature + +```perl +sub add_internal_filler(@args) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 616. + +*** + +### add\_language + +#### Signature + +```perl +sub add_language(@lang) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 447. + +*** + +### add\_mcp\_server + +#### Signature + +```perl +sub add_mcp_server($url, %opts) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 899. + +*** + +### add\_pattern\_hint + +#### Signature + +```perl +sub add_pattern_hint($pattern) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 441. + +*** + +### add\_post\_ai\_verb + +#### Signature + +```perl +sub add_post_ai_verb($verb_name, $verb_config) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 697. + +*** + +### add\_post\_answer\_verb + +#### Signature + +```perl +sub add_post_answer_verb($verb_name, $verb_config) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 691. + +*** + +### add\_pre\_answer\_verb + +#### Signature + +```perl +sub add_pre_answer_verb($verb_name, $verb_config) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 685. + +*** + +### add\_pronunciation + +#### Signature + +```perl +sub add_pronunciation(@pron) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 500. + +*** + +### add\_skill + +#### Signature + +```perl +sub add_skill($skill_name, $params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 807. + +*** + +### add\_swaig\_query\_params + +#### Signature + +```perl +sub add_swaig_query_params(@params) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 854. + +*** + +### BUILD + +#### Signature + +```perl +sub BUILD() +``` + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 161. + +*** + +### clear\_post\_ai\_verbs + +#### Signature + +```perl +sub clear_post_ai_verbs() +``` + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 715. + +*** + +### clear\_post\_answer\_verbs + +#### Signature + +```perl +sub clear_post_answer_verbs() +``` + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 709. + +*** + +### clear\_pre\_answer\_verbs + +#### Signature + +```perl +sub clear_pre_answer_verbs() +``` + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 703. + +*** + +### clear\_swaig\_query\_params + +#### Signature + +```perl +sub clear_swaig_query_params() +``` + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 860. + +*** + +### contexts + +#### Signature + +```perl +sub contexts() +``` + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 800. + +*** + +### create\_tool\_token + +#### Signature + +```perl +sub create_tool_token($tool_name, $call_id) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 378. + +*** + +### define\_contexts + +#### Signature + +```perl +sub define_contexts($contexts) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 735. + +*** + +### enable\_debug\_events + +#### Signature + +```perl +sub enable_debug_events($level) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 652. + +*** + +### enable\_mcp\_server + +#### Signature + +```perl +sub enable_mcp_server() +``` + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 909. + +*** + +### extract\_sip\_username + +#### Signature + +```perl +sub extract_sip_username($class_or_self, $body) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 1725. + +*** + +### get\_contexts + +#### Signature + +```perl +sub get_contexts() +``` + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 311. + +*** + +### get\_full\_url + +#### Signature + +```perl +sub get_full_url(%opts) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 1096. + +*** + +### get\_language\_params + +#### Signature + +```perl +sub get_language_params($code) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 491. + +*** + +### get\_post\_prompt + +#### Signature + +```perl +sub get_post_prompt() +``` + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 276. + +*** + +### get\_prompt + +#### Signature + +```perl +sub get_prompt() +``` + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 240. + +*** + +### get\_raw\_prompt + +#### Signature + +```perl +sub get_raw_prompt() +``` + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 286. + +*** + +### has\_skill + +#### Signature + +```perl +sub has_skill($skill_name) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 823. + +*** + +### list\_skills + +#### Signature + +```perl +sub list_skills() +``` + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 818. + +*** + +### list\_tool\_names + +#### Signature + +```perl +sub list_tool_names() +``` + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 795. + +*** + +### manual\_set\_proxy\_url + +#### Signature + +```perl +sub manual_set_proxy_url($url) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 848. + +*** + +### on\_debug\_event + +#### Signature + +```perl +sub on_debug_event($cb) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 891. + +*** + +### on\_summary + +#### Signature + +```perl +sub on_summary($summary, $raw_data) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 866. + +*** + +### pom + +#### Signature + +```perl +sub pom() +``` + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 257. + +*** + +### prompt\_add\_section + +#### Signature + +```perl +sub prompt_add_section($title, $body, %opts) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 190. + +*** + +### prompt\_add\_subsection + +#### Signature + +```perl +sub prompt_add_subsection($parent_title, $title, $body, %opts) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 201. + +*** + +### prompt\_add\_to\_section + +#### Signature + +```perl +sub prompt_add_to_section($title, %opts) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 215. + +*** + +### prompt\_has\_section + +#### Signature + +```perl +sub prompt_has_section($title) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 232. + +*** + +### psgi\_app + +#### Signature + +```perl +sub psgi_app() +``` + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 1271. + +*** + +### remove\_skill + +#### Signature + +```perl +sub remove_skill($skill_name) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 813. + +*** + +### render\_swml + +#### Signature + +```perl +sub render_swml($request_env) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 1111. + +*** + +### reset\_contexts + +#### Signature + +```perl +sub reset_contexts() +``` + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 782. + +*** + +### run + +#### Signature + +```perl +sub run(%opts) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 1620. + +*** + +### serve + +#### Signature + +```perl +sub serve(%opts) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 1625. + +*** + +### set\_answer\_config + +#### Signature + +```perl +sub set_answer_config($config) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 721. + +*** + +### set\_dynamic\_config\_callback + +#### Signature + +```perl +sub set_dynamic_config_callback($cb) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 830. + +*** + +### set\_function\_includes + +#### Signature + +```perl +sub set_function_includes($includes) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 665. + +*** + +### set\_global\_data + +#### Signature + +```perl +sub set_global_data($data) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 524. + +*** + +### set\_internal\_fillers + +#### Signature + +```perl +sub set_internal_fillers($fillers) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 584. + +*** + +### set\_language\_params + +#### Signature + +```perl +sub set_language_params($code, $params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 474. + +*** + +### set\_languages + +#### Signature + +```perl +sub set_languages($langs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 464. + +*** + +### set\_native\_functions + +#### Signature + +```perl +sub set_native_functions($funcs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 536. + +*** + +### set\_param + +#### Signature + +```perl +sub set_param($key, $value) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 512. + +*** + +### set\_params + +#### Signature + +```perl +sub set_params($p) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 518. + +*** + +### set\_post\_prompt + +#### Signature + +```perl +sub set_post_prompt($text) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 184. + +*** + +### set\_post\_prompt\_llm\_params + +#### Signature + +```perl +sub set_post_prompt_llm_params(@p) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 677. + +*** + +### set\_post\_prompt\_url + +#### Signature + +```perl +sub set_post_prompt_url($url) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 842. + +*** + +### set\_prompt\_llm\_params + +#### Signature + +```perl +sub set_prompt_llm_params(@p) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 671. + +*** + +### set\_prompt\_pom + +#### Signature + +```perl +sub set_prompt_pom($pom) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 298. + +*** + +### set\_prompt\_text + +#### Signature + +```perl +sub set_prompt_text($text) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 178. + +*** + +### set\_pronunciations + +#### Signature + +```perl +sub set_pronunciations($prons) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 506. + +*** + +### set\_web\_hook\_url + +#### Signature + +```perl +sub set_web_hook_url($url) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 836. + +*** + +### update\_global\_data + +#### Signature + +```perl +sub update_global_data($data) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 530. + +*** + +### validate\_tool\_token + +#### Signature + +```perl +sub validate_tool_token($function_name, $token, $call_id) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 396. + +## Source + +[`lib/SignalWire/Agent/AgentBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Agent/AgentBase.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/agent/index.mdx b/fern/products/sdk-reference/perl/agents/agent/index.mdx index fc096df414..7a95d81e71 100644 --- a/fern/products/sdk-reference/perl/agents/agent/index.mdx +++ b/fern/products/sdk-reference/perl/agents/agent/index.mdx @@ -13,7 +13,7 @@ lustri: --- # `Agent` -## Modules +## Classes diff --git a/fern/products/sdk-reference/perl/signal-wire/signal-wire/contexts/context-builder/index.mdx b/fern/products/sdk-reference/perl/agents/contexts/context-builder/index.mdx similarity index 83% rename from fern/products/sdk-reference/perl/signal-wire/signal-wire/contexts/context-builder/index.mdx rename to fern/products/sdk-reference/perl/agents/contexts/context-builder/index.mdx index d9917151b4..4e24838c89 100644 --- a/fern/products/sdk-reference/perl/signal-wire/signal-wire/contexts/context-builder/index.mdx +++ b/fern/products/sdk-reference/perl/agents/contexts/context-builder/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/perl/signal-wire/signal-wire/contexts/context-builder" +slug: "/reference/perl/agents/contexts/context-builder" title: "ContextBuilder" sdk_label: "Perl SDK" icon: "perl" @@ -9,7 +9,7 @@ lustri: language: "perl" qualified_name: "SignalWire::Contexts::ContextBuilder" parent: "SignalWire::Contexts" - module: "SignalWire.Contexts.ContextBuilder" + module: "core.SignalWire.Contexts" source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Contexts/ContextBuilder.pm" --- # `ContextBuilder` diff --git a/fern/products/sdk-reference/perl/signal-wire/signal-wire/contexts/index.mdx b/fern/products/sdk-reference/perl/agents/contexts/index.mdx similarity index 98% rename from fern/products/sdk-reference/perl/signal-wire/signal-wire/contexts/index.mdx rename to fern/products/sdk-reference/perl/agents/contexts/index.mdx index 2e41581910..485dc30912 100644 --- a/fern/products/sdk-reference/perl/signal-wire/signal-wire/contexts/index.mdx +++ b/fern/products/sdk-reference/perl/agents/contexts/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/perl/signal-wire/signal-wire/contexts" +slug: "/reference/perl/agents/contexts" title: "Contexts" sdk_label: "Perl SDK" icon: "perl" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "perl" qualified_name: "SignalWire::Contexts" - parent: "SignalWire" - module: "SignalWire.Contexts" + parent: "agents" + module: "core.SignalWire" source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Contexts.pm" --- # `Contexts` @@ -23,7 +23,7 @@ package SignalWire::Contexts ## Modules - + ## Methods diff --git a/fern/products/sdk-reference/perl/signal-wire/signal-wire/data-map/index.mdx b/fern/products/sdk-reference/perl/agents/data-map/index.mdx similarity index 97% rename from fern/products/sdk-reference/perl/signal-wire/signal-wire/data-map/index.mdx rename to fern/products/sdk-reference/perl/agents/data-map/index.mdx index df48a455b9..d4f01bdc4c 100644 --- a/fern/products/sdk-reference/perl/signal-wire/signal-wire/data-map/index.mdx +++ b/fern/products/sdk-reference/perl/agents/data-map/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/perl/signal-wire/signal-wire/data-map" +slug: "/reference/perl/agents/data-map" title: "DataMap" sdk_label: "Perl SDK" icon: "perl" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "perl" qualified_name: "SignalWire::DataMap" - parent: "SignalWire" - module: "SignalWire.DataMap" + parent: "agents" + module: "core.SignalWire" source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/DataMap.pm" --- # `DataMap` diff --git a/fern/products/sdk-reference/perl/agents/index.mdx b/fern/products/sdk-reference/perl/agents/index.mdx index 6ce3433a7b..f3f43db944 100644 --- a/fern/products/sdk-reference/perl/agents/index.mdx +++ b/fern/products/sdk-reference/perl/agents/index.mdx @@ -11,6 +11,14 @@ lustri: --- # `agents` +## Classes + + + + + + + ## Modules diff --git a/fern/products/sdk-reference/perl/agents/pom/index.mdx b/fern/products/sdk-reference/perl/agents/pom/index.mdx index 803070e50b..ec1e376f2b 100644 --- a/fern/products/sdk-reference/perl/agents/pom/index.mdx +++ b/fern/products/sdk-reference/perl/agents/pom/index.mdx @@ -13,10 +13,14 @@ lustri: --- # `POM` -## Modules +## Classes - + + SignalWire::POM::PromptObjectModel is a Perl port of `signalwire.pom.pom.PromptObjectModel` from the Python SignalWire SDK. It owns an ordered list of SignalWire::POM::Section objects and provides JSON / YAML serialisation, Markdown / XML rendering, recursive title-based search, and POM-merging via `add_pom_as_subsection`. + - + + SignalWire::POM::Section is a Perl port of `signalwire.pom.pom.Section` from the Python SignalWire SDK. Both implementations render byte-for-byte identical Markdown/XML/JSON output so prompts authored in either language can be consumed interchangeably. + diff --git a/fern/products/sdk-reference/perl/agents/pom/prompt-object-model/index.mdx b/fern/products/sdk-reference/perl/agents/pom/prompt-object-model/index.mdx index 56cdd8a4b2..a9be099e91 100644 --- a/fern/products/sdk-reference/perl/agents/pom/prompt-object-model/index.mdx +++ b/fern/products/sdk-reference/perl/agents/pom/prompt-object-model/index.mdx @@ -5,18 +5,245 @@ sdk_label: "Perl SDK" icon: "perl" lustri: auto_generated: true - kind: "module" + kind: "class" language: "perl" - qualified_name: "agents.POM.PromptObjectModel" + qualified_name: "SignalWire::POM::PromptObjectModel" parent: "agents.POM" module: "agents.POM" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/PromptObjectModel.pm" --- # `PromptObjectModel` -## Classes +SignalWire::POM::PromptObjectModel is a Perl port of `signalwire.pom.pom.PromptObjectModel` from the Python SignalWire SDK. It owns an ordered list of SignalWire::POM::Section objects and provides JSON / YAML serialisation, Markdown / XML rendering, recursive title-based search, and POM-merging via `add_pom_as_subsection`. - - - SignalWire::POM::PromptObjectModel is a Perl port of `signalwire.pom.pom.PromptObjectModel` from the Python SignalWire SDK. It owns an ordered list of SignalWire::POM::Section objects and provides JSON / YAML serialisation, Markdown / XML rendering, recursive title-based search, and POM-merging via `add_pom_as_subsection`. - - +The serialised form is byte-for-byte identical to the Python reference; prompts authored in either language can be loaded by the other. + +**Synopsis** + +```perl +use SignalWire::POM::PromptObjectModel; +``` + +```perl +my $pom = SignalWire::POM::PromptObjectModel->new; +my $sec = $pom->add_section( + title => 'Greeting', + body => 'You are a helpful assistant.', +); +$sec->add_subsection( + title => 'Tone', + body => 'Speak warmly.', +); +``` + +```perl +print $pom->render_markdown; +print $pom->render_xml; +``` + +```perl +my $json = $pom->to_json; +my $back = SignalWire::POM::PromptObjectModel->from_json($json); +``` + +## Signature + +```perl +package SignalWire::POM::PromptObjectModel +``` + +## See Also + +- \[SignalWire::POM::Section]\(xref://SignalWire::POM::Section) + +## Methods + +### add\_pom\_as\_subsection + +#### Signature + +```perl +sub add_pom_as_subsection($target, $pom_to_add) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/POM/PromptObjectModel.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/PromptObjectModel.pm) + +Line 322. + +*** + +### add\_section + +#### Signature + +```perl +sub add_section(%opts) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/POM/PromptObjectModel.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/PromptObjectModel.pm) + +Line 169. + +*** + +### find\_section + +#### Signature + +```perl +sub find_section($title) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/POM/PromptObjectModel.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/PromptObjectModel.pm) + +Line 198. + +*** + +### from\_json + +#### Signature + +```perl +sub from_json($class_or_self, $json_data) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/POM/PromptObjectModel.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/PromptObjectModel.pm) + +Line 48. + +*** + +### from\_yaml + +#### Signature + +```perl +sub from_yaml($class_or_self, $yaml_data) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/POM/PromptObjectModel.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/PromptObjectModel.pm) + +Line 67. + +*** + +### render\_markdown + +#### Signature + +```perl +sub render_markdown() +``` + +#### Source + +[`lib/SignalWire/POM/PromptObjectModel.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/PromptObjectModel.pm) + +Line 254. + +*** + +### render\_xml + +#### Signature + +```perl +sub render_xml() +``` + +#### Source + +[`lib/SignalWire/POM/PromptObjectModel.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/PromptObjectModel.pm) + +Line 285. + +*** + +### to\_hash + +#### Signature + +```perl +sub to_hash() +``` + +#### Source + +[`lib/SignalWire/POM/PromptObjectModel.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/PromptObjectModel.pm) + +Line 246. + +*** + +### to\_json + +#### Signature + +```perl +sub to_json() +``` + +#### Source + +[`lib/SignalWire/POM/PromptObjectModel.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/PromptObjectModel.pm) + +Line 217. + +*** + +### to\_yaml + +#### Signature + +```perl +sub to_yaml() +``` + +#### Source + +[`lib/SignalWire/POM/PromptObjectModel.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/PromptObjectModel.pm) + +Line 232. + +## Source + +[`lib/SignalWire/POM/PromptObjectModel.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/PromptObjectModel.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/pom/prompt-object-model/prompt-object-model/index.mdx b/fern/products/sdk-reference/perl/agents/pom/prompt-object-model/prompt-object-model/index.mdx deleted file mode 100644 index 0d1ffe13a2..0000000000 --- a/fern/products/sdk-reference/perl/agents/pom/prompt-object-model/prompt-object-model/index.mdx +++ /dev/null @@ -1,249 +0,0 @@ ---- -slug: "/reference/perl/agents/pom/prompt-object-model/prompt-object-model" -title: "PromptObjectModel" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::POM::PromptObjectModel" - parent: "agents.POM.PromptObjectModel" - module: "agents.POM.PromptObjectModel" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/PromptObjectModel.pm" ---- -# `PromptObjectModel` - -SignalWire::POM::PromptObjectModel is a Perl port of `signalwire.pom.pom.PromptObjectModel` from the Python SignalWire SDK. It owns an ordered list of SignalWire::POM::Section objects and provides JSON / YAML serialisation, Markdown / XML rendering, recursive title-based search, and POM-merging via `add_pom_as_subsection`. - -The serialised form is byte-for-byte identical to the Python reference; prompts authored in either language can be loaded by the other. - -**Synopsis** - -```perl -use SignalWire::POM::PromptObjectModel; -``` - -```perl -my $pom = SignalWire::POM::PromptObjectModel->new; -my $sec = $pom->add_section( - title => 'Greeting', - body => 'You are a helpful assistant.', -); -$sec->add_subsection( - title => 'Tone', - body => 'Speak warmly.', -); -``` - -```perl -print $pom->render_markdown; -print $pom->render_xml; -``` - -```perl -my $json = $pom->to_json; -my $back = SignalWire::POM::PromptObjectModel->from_json($json); -``` - -## Signature - -```perl -package SignalWire::POM::PromptObjectModel -``` - -## See Also - -- \[SignalWire::POM::Section]\(xref://SignalWire::POM::Section) - -## Methods - -### add\_pom\_as\_subsection - -#### Signature - -```perl -sub add_pom_as_subsection($target, $pom_to_add) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/POM/PromptObjectModel.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/PromptObjectModel.pm) - -Line 322. - -*** - -### add\_section - -#### Signature - -```perl -sub add_section(%opts) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/POM/PromptObjectModel.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/PromptObjectModel.pm) - -Line 169. - -*** - -### find\_section - -#### Signature - -```perl -sub find_section($title) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/POM/PromptObjectModel.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/PromptObjectModel.pm) - -Line 198. - -*** - -### from\_json - -#### Signature - -```perl -sub from_json($class_or_self, $json_data) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/POM/PromptObjectModel.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/PromptObjectModel.pm) - -Line 48. - -*** - -### from\_yaml - -#### Signature - -```perl -sub from_yaml($class_or_self, $yaml_data) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/POM/PromptObjectModel.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/PromptObjectModel.pm) - -Line 67. - -*** - -### render\_markdown - -#### Signature - -```perl -sub render_markdown() -``` - -#### Source - -[`lib/SignalWire/POM/PromptObjectModel.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/PromptObjectModel.pm) - -Line 254. - -*** - -### render\_xml - -#### Signature - -```perl -sub render_xml() -``` - -#### Source - -[`lib/SignalWire/POM/PromptObjectModel.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/PromptObjectModel.pm) - -Line 285. - -*** - -### to\_hash - -#### Signature - -```perl -sub to_hash() -``` - -#### Source - -[`lib/SignalWire/POM/PromptObjectModel.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/PromptObjectModel.pm) - -Line 246. - -*** - -### to\_json - -#### Signature - -```perl -sub to_json() -``` - -#### Source - -[`lib/SignalWire/POM/PromptObjectModel.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/PromptObjectModel.pm) - -Line 217. - -*** - -### to\_yaml - -#### Signature - -```perl -sub to_yaml() -``` - -#### Source - -[`lib/SignalWire/POM/PromptObjectModel.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/PromptObjectModel.pm) - -Line 232. - -## Source - -[`lib/SignalWire/POM/PromptObjectModel.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/PromptObjectModel.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/agents/pom/section/index.mdx b/fern/products/sdk-reference/perl/agents/pom/section/index.mdx index 48d0628b40..fbfd79e1ea 100644 --- a/fern/products/sdk-reference/perl/agents/pom/section/index.mdx +++ b/fern/products/sdk-reference/perl/agents/pom/section/index.mdx @@ -5,18 +5,167 @@ sdk_label: "Perl SDK" icon: "perl" lustri: auto_generated: true - kind: "module" + kind: "class" language: "perl" - qualified_name: "agents.POM.Section" + qualified_name: "SignalWire::POM::Section" parent: "agents.POM" module: "agents.POM" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/Section.pm" --- # `Section` -## Classes +SignalWire::POM::Section is a Perl port of `signalwire.pom.pom.Section` from the Python SignalWire SDK. Both implementations render byte-for-byte identical Markdown/XML/JSON output so prompts authored in either language can be consumed interchangeably. - - - SignalWire::POM::Section is a Perl port of `signalwire.pom.pom.Section` from the Python SignalWire SDK. Both implementations render byte-for-byte identical Markdown/XML/JSON output so prompts authored in either language can be consumed interchangeably. - - +**Synopsis** + +```perl +use SignalWire::POM::Section; +``` + +```perl +my $section = SignalWire::POM::Section->new( + title => 'Greeting', + body => 'You are a helpful assistant.', + bullets => ['Be polite', 'Be concise'], +); +``` + +```perl +my $sub = $section->add_subsection( + title => 'Tone', + body => 'Speak warmly.', +); +``` + +```perl +print $section->render_markdown; +print $section->render_xml; +``` + +## Signature + +```perl +package SignalWire::POM::Section +``` + +## See Also + +- SignalWire::POM::PromptObjectModel — the top-level container that holds a list of Sections. + +## Methods + +### add\_body + +#### Signature + +```perl +sub add_body() +``` + +#### Source + +[`lib/SignalWire/POM/Section.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/Section.pm) + +Line 89. + +*** + +### add\_bullets + +#### Signature + +```perl +sub add_bullets() +``` + +#### Source + +[`lib/SignalWire/POM/Section.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/Section.pm) + +Line 96. + +*** + +### add\_subsection + +#### Signature + +```perl +sub add_subsection() +``` + +#### Source + +[`lib/SignalWire/POM/Section.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/Section.pm) + +Line 106. + +*** + +### BUILD + +#### Signature + +```perl +sub BUILD() +``` + +#### Source + +[`lib/SignalWire/POM/Section.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/Section.pm) + +Line 73. + +*** + +### render\_markdown + +#### Signature + +```perl +sub render_markdown() +``` + +#### Source + +[`lib/SignalWire/POM/Section.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/Section.pm) + +Line 153. + +*** + +### render\_xml + +#### Signature + +```perl +sub render_xml() +``` + +#### Source + +[`lib/SignalWire/POM/Section.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/Section.pm) + +Line 221. + +*** + +### to\_hash + +#### Signature + +```perl +sub to_hash() +``` + +#### Source + +[`lib/SignalWire/POM/Section.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/Section.pm) + +Line 124. + +## Source + +[`lib/SignalWire/POM/Section.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/Section.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/pom/section/section/index.mdx b/fern/products/sdk-reference/perl/agents/pom/section/section/index.mdx deleted file mode 100644 index 11e343a274..0000000000 --- a/fern/products/sdk-reference/perl/agents/pom/section/section/index.mdx +++ /dev/null @@ -1,171 +0,0 @@ ---- -slug: "/reference/perl/agents/pom/section/section" -title: "Section" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::POM::Section" - parent: "agents.POM.Section" - module: "agents.POM.Section" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/Section.pm" ---- -# `Section` - -SignalWire::POM::Section is a Perl port of `signalwire.pom.pom.Section` from the Python SignalWire SDK. Both implementations render byte-for-byte identical Markdown/XML/JSON output so prompts authored in either language can be consumed interchangeably. - -**Synopsis** - -```perl -use SignalWire::POM::Section; -``` - -```perl -my $section = SignalWire::POM::Section->new( - title => 'Greeting', - body => 'You are a helpful assistant.', - bullets => ['Be polite', 'Be concise'], -); -``` - -```perl -my $sub = $section->add_subsection( - title => 'Tone', - body => 'Speak warmly.', -); -``` - -```perl -print $section->render_markdown; -print $section->render_xml; -``` - -## Signature - -```perl -package SignalWire::POM::Section -``` - -## See Also - -- SignalWire::POM::PromptObjectModel — the top-level container that holds a list of Sections. - -## Methods - -### add\_body - -#### Signature - -```perl -sub add_body() -``` - -#### Source - -[`lib/SignalWire/POM/Section.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/Section.pm) - -Line 89. - -*** - -### add\_bullets - -#### Signature - -```perl -sub add_bullets() -``` - -#### Source - -[`lib/SignalWire/POM/Section.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/Section.pm) - -Line 96. - -*** - -### add\_subsection - -#### Signature - -```perl -sub add_subsection() -``` - -#### Source - -[`lib/SignalWire/POM/Section.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/Section.pm) - -Line 106. - -*** - -### BUILD - -#### Signature - -```perl -sub BUILD() -``` - -#### Source - -[`lib/SignalWire/POM/Section.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/Section.pm) - -Line 73. - -*** - -### render\_markdown - -#### Signature - -```perl -sub render_markdown() -``` - -#### Source - -[`lib/SignalWire/POM/Section.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/Section.pm) - -Line 153. - -*** - -### render\_xml - -#### Signature - -```perl -sub render_xml() -``` - -#### Source - -[`lib/SignalWire/POM/Section.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/Section.pm) - -Line 221. - -*** - -### to\_hash - -#### Signature - -```perl -sub to_hash() -``` - -#### Source - -[`lib/SignalWire/POM/Section.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/Section.pm) - -Line 124. - -## Source - -[`lib/SignalWire/POM/Section.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/POM/Section.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/agents/prefabs/concierge/concierge/index.mdx b/fern/products/sdk-reference/perl/agents/prefabs/concierge/concierge/index.mdx deleted file mode 100644 index 79ad06e9c4..0000000000 --- a/fern/products/sdk-reference/perl/agents/prefabs/concierge/concierge/index.mdx +++ /dev/null @@ -1,51 +0,0 @@ ---- -slug: "/reference/perl/agents/prefabs/concierge/concierge" -title: "Concierge" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Prefabs::Concierge" - parent: "agents.Prefabs.Concierge" - module: "agents.Prefabs.Concierge" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/Concierge.pm" ---- -# `Concierge` - -## Signature - -```perl -package SignalWire::Prefabs::Concierge -``` - -## Inheritance - -**Extends:** [SignalWire::Agent::AgentBase](/docs/sdk-reference/reference/perl/agents/agent/agent-base/agent-base) - -## Methods - -### BUILD - -#### Signature - -```perl -sub BUILD($args) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Prefabs/Concierge.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/Concierge.pm) - -Line 18. - -## Source - -[`lib/SignalWire/Prefabs/Concierge.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/Concierge.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/agents/prefabs/concierge/index.mdx b/fern/products/sdk-reference/perl/agents/prefabs/concierge/index.mdx index 547751ecb9..0c2a55459a 100644 --- a/fern/products/sdk-reference/perl/agents/prefabs/concierge/index.mdx +++ b/fern/products/sdk-reference/perl/agents/prefabs/concierge/index.mdx @@ -5,16 +5,47 @@ sdk_label: "Perl SDK" icon: "perl" lustri: auto_generated: true - kind: "module" + kind: "class" language: "perl" - qualified_name: "agents.Prefabs.Concierge" + qualified_name: "SignalWire::Prefabs::Concierge" parent: "agents.Prefabs" module: "agents.Prefabs" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/Concierge.pm" --- # `Concierge` -## Classes +## Signature - - - +```perl +package SignalWire::Prefabs::Concierge +``` + +## Inheritance + +**Extends:** [SignalWire::Agent::AgentBase](/docs/sdk-reference/reference/perl/agents/agent/agent-base) + +## Methods + +### BUILD + +#### Signature + +```perl +sub BUILD($args) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Prefabs/Concierge.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/Concierge.pm) + +Line 18. + +## Source + +[`lib/SignalWire/Prefabs/Concierge.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/Concierge.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/prefabs/faq-bot/faq-bot/index.mdx b/fern/products/sdk-reference/perl/agents/prefabs/faq-bot/faq-bot/index.mdx deleted file mode 100644 index 4a4aeda2a9..0000000000 --- a/fern/products/sdk-reference/perl/agents/prefabs/faq-bot/faq-bot/index.mdx +++ /dev/null @@ -1,51 +0,0 @@ ---- -slug: "/reference/perl/agents/prefabs/faq-bot/faq-bot" -title: "FAQBot" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Prefabs::FAQBot" - parent: "agents.Prefabs.FAQBot" - module: "agents.Prefabs.FAQBot" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/FAQBot.pm" ---- -# `FAQBot` - -## Signature - -```perl -package SignalWire::Prefabs::FAQBot -``` - -## Inheritance - -**Extends:** [SignalWire::Agent::AgentBase](/docs/sdk-reference/reference/perl/agents/agent/agent-base/agent-base) - -## Methods - -### BUILD - -#### Signature - -```perl -sub BUILD($args) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Prefabs/FAQBot.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/FAQBot.pm) - -Line 15. - -## Source - -[`lib/SignalWire/Prefabs/FAQBot.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/FAQBot.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/agents/prefabs/faq-bot/index.mdx b/fern/products/sdk-reference/perl/agents/prefabs/faq-bot/index.mdx index cca47ab713..8a71ee753c 100644 --- a/fern/products/sdk-reference/perl/agents/prefabs/faq-bot/index.mdx +++ b/fern/products/sdk-reference/perl/agents/prefabs/faq-bot/index.mdx @@ -5,16 +5,47 @@ sdk_label: "Perl SDK" icon: "perl" lustri: auto_generated: true - kind: "module" + kind: "class" language: "perl" - qualified_name: "agents.Prefabs.FAQBot" + qualified_name: "SignalWire::Prefabs::FAQBot" parent: "agents.Prefabs" module: "agents.Prefabs" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/FAQBot.pm" --- # `FAQBot` -## Classes +## Signature - - - +```perl +package SignalWire::Prefabs::FAQBot +``` + +## Inheritance + +**Extends:** [SignalWire::Agent::AgentBase](/docs/sdk-reference/reference/perl/agents/agent/agent-base) + +## Methods + +### BUILD + +#### Signature + +```perl +sub BUILD($args) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Prefabs/FAQBot.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/FAQBot.pm) + +Line 15. + +## Source + +[`lib/SignalWire/Prefabs/FAQBot.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/FAQBot.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/prefabs/index.mdx b/fern/products/sdk-reference/perl/agents/prefabs/index.mdx index b2f880a017..ae96a0fbb4 100644 --- a/fern/products/sdk-reference/perl/agents/prefabs/index.mdx +++ b/fern/products/sdk-reference/perl/agents/prefabs/index.mdx @@ -13,7 +13,7 @@ lustri: --- # `Prefabs` -## Modules +## Classes diff --git a/fern/products/sdk-reference/perl/agents/prefabs/info-gatherer/index.mdx b/fern/products/sdk-reference/perl/agents/prefabs/info-gatherer/index.mdx index aa4e213fcc..debc22fe97 100644 --- a/fern/products/sdk-reference/perl/agents/prefabs/info-gatherer/index.mdx +++ b/fern/products/sdk-reference/perl/agents/prefabs/info-gatherer/index.mdx @@ -5,16 +5,47 @@ sdk_label: "Perl SDK" icon: "perl" lustri: auto_generated: true - kind: "module" + kind: "class" language: "perl" - qualified_name: "agents.Prefabs.InfoGatherer" + qualified_name: "SignalWire::Prefabs::InfoGatherer" parent: "agents.Prefabs" module: "agents.Prefabs" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/InfoGatherer.pm" --- # `InfoGatherer` -## Classes +## Signature - - - +```perl +package SignalWire::Prefabs::InfoGatherer +``` + +## Inheritance + +**Extends:** [SignalWire::Agent::AgentBase](/docs/sdk-reference/reference/perl/agents/agent/agent-base) + +## Methods + +### BUILD + +#### Signature + +```perl +sub BUILD($args) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Prefabs/InfoGatherer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/InfoGatherer.pm) + +Line 13. + +## Source + +[`lib/SignalWire/Prefabs/InfoGatherer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/InfoGatherer.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/prefabs/info-gatherer/info-gatherer/index.mdx b/fern/products/sdk-reference/perl/agents/prefabs/info-gatherer/info-gatherer/index.mdx deleted file mode 100644 index 88f96396de..0000000000 --- a/fern/products/sdk-reference/perl/agents/prefabs/info-gatherer/info-gatherer/index.mdx +++ /dev/null @@ -1,51 +0,0 @@ ---- -slug: "/reference/perl/agents/prefabs/info-gatherer/info-gatherer" -title: "InfoGatherer" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Prefabs::InfoGatherer" - parent: "agents.Prefabs.InfoGatherer" - module: "agents.Prefabs.InfoGatherer" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/InfoGatherer.pm" ---- -# `InfoGatherer` - -## Signature - -```perl -package SignalWire::Prefabs::InfoGatherer -``` - -## Inheritance - -**Extends:** [SignalWire::Agent::AgentBase](/docs/sdk-reference/reference/perl/agents/agent/agent-base/agent-base) - -## Methods - -### BUILD - -#### Signature - -```perl -sub BUILD($args) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Prefabs/InfoGatherer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/InfoGatherer.pm) - -Line 13. - -## Source - -[`lib/SignalWire/Prefabs/InfoGatherer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/InfoGatherer.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/agents/prefabs/receptionist/index.mdx b/fern/products/sdk-reference/perl/agents/prefabs/receptionist/index.mdx index 2a9f689263..2de0747f93 100644 --- a/fern/products/sdk-reference/perl/agents/prefabs/receptionist/index.mdx +++ b/fern/products/sdk-reference/perl/agents/prefabs/receptionist/index.mdx @@ -5,16 +5,47 @@ sdk_label: "Perl SDK" icon: "perl" lustri: auto_generated: true - kind: "module" + kind: "class" language: "perl" - qualified_name: "agents.Prefabs.Receptionist" + qualified_name: "SignalWire::Prefabs::Receptionist" parent: "agents.Prefabs" module: "agents.Prefabs" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/Receptionist.pm" --- # `Receptionist` -## Classes +## Signature - - - +```perl +package SignalWire::Prefabs::Receptionist +``` + +## Inheritance + +**Extends:** [SignalWire::Agent::AgentBase](/docs/sdk-reference/reference/perl/agents/agent/agent-base) + +## Methods + +### BUILD + +#### Signature + +```perl +sub BUILD($args) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Prefabs/Receptionist.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/Receptionist.pm) + +Line 15. + +## Source + +[`lib/SignalWire/Prefabs/Receptionist.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/Receptionist.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/prefabs/receptionist/receptionist/index.mdx b/fern/products/sdk-reference/perl/agents/prefabs/receptionist/receptionist/index.mdx deleted file mode 100644 index 2e877965af..0000000000 --- a/fern/products/sdk-reference/perl/agents/prefabs/receptionist/receptionist/index.mdx +++ /dev/null @@ -1,51 +0,0 @@ ---- -slug: "/reference/perl/agents/prefabs/receptionist/receptionist" -title: "Receptionist" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Prefabs::Receptionist" - parent: "agents.Prefabs.Receptionist" - module: "agents.Prefabs.Receptionist" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/Receptionist.pm" ---- -# `Receptionist` - -## Signature - -```perl -package SignalWire::Prefabs::Receptionist -``` - -## Inheritance - -**Extends:** [SignalWire::Agent::AgentBase](/docs/sdk-reference/reference/perl/agents/agent/agent-base/agent-base) - -## Methods - -### BUILD - -#### Signature - -```perl -sub BUILD($args) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Prefabs/Receptionist.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/Receptionist.pm) - -Line 15. - -## Source - -[`lib/SignalWire/Prefabs/Receptionist.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/Receptionist.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/agents/prefabs/survey/index.mdx b/fern/products/sdk-reference/perl/agents/prefabs/survey/index.mdx index e806417c1f..9cb3d69a97 100644 --- a/fern/products/sdk-reference/perl/agents/prefabs/survey/index.mdx +++ b/fern/products/sdk-reference/perl/agents/prefabs/survey/index.mdx @@ -5,16 +5,47 @@ sdk_label: "Perl SDK" icon: "perl" lustri: auto_generated: true - kind: "module" + kind: "class" language: "perl" - qualified_name: "agents.Prefabs.Survey" + qualified_name: "SignalWire::Prefabs::Survey" parent: "agents.Prefabs" module: "agents.Prefabs" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/Survey.pm" --- # `Survey` -## Classes +## Signature - - - +```perl +package SignalWire::Prefabs::Survey +``` + +## Inheritance + +**Extends:** [SignalWire::Agent::AgentBase](/docs/sdk-reference/reference/perl/agents/agent/agent-base) + +## Methods + +### BUILD + +#### Signature + +```perl +sub BUILD($args) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Prefabs/Survey.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/Survey.pm) + +Line 18. + +## Source + +[`lib/SignalWire/Prefabs/Survey.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/Survey.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/prefabs/survey/survey/index.mdx b/fern/products/sdk-reference/perl/agents/prefabs/survey/survey/index.mdx deleted file mode 100644 index 7f2472d126..0000000000 --- a/fern/products/sdk-reference/perl/agents/prefabs/survey/survey/index.mdx +++ /dev/null @@ -1,51 +0,0 @@ ---- -slug: "/reference/perl/agents/prefabs/survey/survey" -title: "Survey" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Prefabs::Survey" - parent: "agents.Prefabs.Survey" - module: "agents.Prefabs.Survey" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/Survey.pm" ---- -# `Survey` - -## Signature - -```perl -package SignalWire::Prefabs::Survey -``` - -## Inheritance - -**Extends:** [SignalWire::Agent::AgentBase](/docs/sdk-reference/reference/perl/agents/agent/agent-base/agent-base) - -## Methods - -### BUILD - -#### Signature - -```perl -sub BUILD($args) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Prefabs/Survey.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/Survey.pm) - -Line 18. - -## Source - -[`lib/SignalWire/Prefabs/Survey.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Prefabs/Survey.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/agents/server/agent-server/agent-server/index.mdx b/fern/products/sdk-reference/perl/agents/server/agent-server/agent-server/index.mdx deleted file mode 100644 index 9b1e87a662..0000000000 --- a/fern/products/sdk-reference/perl/agents/server/agent-server/agent-server/index.mdx +++ /dev/null @@ -1,163 +0,0 @@ ---- -slug: "/reference/perl/agents/server/agent-server/agent-server" -title: "AgentServer" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Server::AgentServer" - parent: "agents.Server.AgentServer" - module: "agents.Server.AgentServer" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Server/AgentServer.pm" ---- -# `AgentServer` - -## Signature - -```perl -package SignalWire::Server::AgentServer -``` - -## Methods - -### get\_agent - -#### Signature - -```perl -sub get_agent($route) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Server/AgentServer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Server/AgentServer.pm) - -Line 53. - -*** - -### list\_agents - -#### Signature - -```perl -sub list_agents() -``` - -#### Source - -[`lib/SignalWire/Server/AgentServer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Server/AgentServer.pm) - -Line 48. - -*** - -### psgi\_app - -#### Signature - -```perl -sub psgi_app() -``` - -#### Source - -[`lib/SignalWire/Server/AgentServer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Server/AgentServer.pm) - -Line 73. - -*** - -### register - -#### Signature - -```perl -sub register($agent, $route) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/Server/AgentServer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Server/AgentServer.pm) - -Line 24. - -*** - -### run - -#### Signature - -```perl -sub run(%opts) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Server/AgentServer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Server/AgentServer.pm) - -Line 218. - -*** - -### serve\_static\_files - -#### Signature - -```perl -sub serve_static_files($directory, $route) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/Server/AgentServer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Server/AgentServer.pm) - -Line 58. - -*** - -### unregister - -#### Signature - -```perl -sub unregister($route) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Server/AgentServer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Server/AgentServer.pm) - -Line 40. - -## Source - -[`lib/SignalWire/Server/AgentServer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Server/AgentServer.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/agents/server/agent-server/index.mdx b/fern/products/sdk-reference/perl/agents/server/agent-server/index.mdx index de24f1db6f..ccf971eb5f 100644 --- a/fern/products/sdk-reference/perl/agents/server/agent-server/index.mdx +++ b/fern/products/sdk-reference/perl/agents/server/agent-server/index.mdx @@ -5,16 +5,159 @@ sdk_label: "Perl SDK" icon: "perl" lustri: auto_generated: true - kind: "module" + kind: "class" language: "perl" - qualified_name: "agents.Server.AgentServer" + qualified_name: "SignalWire::Server::AgentServer" parent: "agents.Server" module: "agents.Server" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Server/AgentServer.pm" --- # `AgentServer` -## Classes +## Signature - - - +```perl +package SignalWire::Server::AgentServer +``` + +## Methods + +### get\_agent + +#### Signature + +```perl +sub get_agent($route) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Server/AgentServer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Server/AgentServer.pm) + +Line 53. + +*** + +### list\_agents + +#### Signature + +```perl +sub list_agents() +``` + +#### Source + +[`lib/SignalWire/Server/AgentServer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Server/AgentServer.pm) + +Line 48. + +*** + +### psgi\_app + +#### Signature + +```perl +sub psgi_app() +``` + +#### Source + +[`lib/SignalWire/Server/AgentServer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Server/AgentServer.pm) + +Line 73. + +*** + +### register + +#### Signature + +```perl +sub register($agent, $route) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Server/AgentServer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Server/AgentServer.pm) + +Line 24. + +*** + +### run + +#### Signature + +```perl +sub run(%opts) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Server/AgentServer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Server/AgentServer.pm) + +Line 218. + +*** + +### serve\_static\_files + +#### Signature + +```perl +sub serve_static_files($directory, $route) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Server/AgentServer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Server/AgentServer.pm) + +Line 58. + +*** + +### unregister + +#### Signature + +```perl +sub unregister($route) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Server/AgentServer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Server/AgentServer.pm) + +Line 40. + +## Source + +[`lib/SignalWire/Server/AgentServer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Server/AgentServer.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/server/index.mdx b/fern/products/sdk-reference/perl/agents/server/index.mdx index 731423f3a3..5bcb158d16 100644 --- a/fern/products/sdk-reference/perl/agents/server/index.mdx +++ b/fern/products/sdk-reference/perl/agents/server/index.mdx @@ -13,7 +13,7 @@ lustri: --- # `Server` -## Modules +## Classes diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/api-ninjas-trivia/api-ninjas-trivia/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/api-ninjas-trivia/api-ninjas-trivia/index.mdx deleted file mode 100644 index 9a902022a7..0000000000 --- a/fern/products/sdk-reference/perl/agents/skills/builtin/api-ninjas-trivia/api-ninjas-trivia/index.mdx +++ /dev/null @@ -1,79 +0,0 @@ ---- -slug: "/reference/perl/agents/skills/builtin/api-ninjas-trivia/api-ninjas-trivia" -title: "ApiNinjasTrivia" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Skills::Builtin::ApiNinjasTrivia" - parent: "agents.Skills.Builtin.ApiNinjasTrivia" - module: "agents.Skills.Builtin.ApiNinjasTrivia" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/ApiNinjasTrivia.pm" ---- -# `ApiNinjasTrivia` - -## Signature - -```perl -package SignalWire::Skills::Builtin::ApiNinjasTrivia -``` - -## Inheritance - -**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/agents/skills/skill-base/skill-base) - -## Methods - -### get\_parameter\_schema - -#### Signature - -```perl -sub get_parameter_schema() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/ApiNinjasTrivia.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/ApiNinjasTrivia.pm) - -Line 95. - -*** - -### register\_tools - -#### Signature - -```perl -sub register_tools() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/ApiNinjasTrivia.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/ApiNinjasTrivia.pm) - -Line 48. - -*** - -### setup - -#### Signature - -```perl -sub setup() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/ApiNinjasTrivia.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/ApiNinjasTrivia.pm) - -Line 46. - -## Source - -[`lib/SignalWire/Skills/Builtin/ApiNinjasTrivia.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/ApiNinjasTrivia.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/api-ninjas-trivia/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/api-ninjas-trivia/index.mdx index 4f2d8f776e..444536908f 100644 --- a/fern/products/sdk-reference/perl/agents/skills/builtin/api-ninjas-trivia/index.mdx +++ b/fern/products/sdk-reference/perl/agents/skills/builtin/api-ninjas-trivia/index.mdx @@ -5,16 +5,75 @@ sdk_label: "Perl SDK" icon: "perl" lustri: auto_generated: true - kind: "module" + kind: "class" language: "perl" - qualified_name: "agents.Skills.Builtin.ApiNinjasTrivia" + qualified_name: "SignalWire::Skills::Builtin::ApiNinjasTrivia" parent: "agents.Skills.Builtin" module: "agents.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/ApiNinjasTrivia.pm" --- # `ApiNinjasTrivia` -## Classes +## Signature - - - +```perl +package SignalWire::Skills::Builtin::ApiNinjasTrivia +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/agents/skills/skill-base) + +## Methods + +### get\_parameter\_schema + +#### Signature + +```perl +sub get_parameter_schema() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/ApiNinjasTrivia.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/ApiNinjasTrivia.pm) + +Line 95. + +*** + +### register\_tools + +#### Signature + +```perl +sub register_tools() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/ApiNinjasTrivia.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/ApiNinjasTrivia.pm) + +Line 48. + +*** + +### setup + +#### Signature + +```perl +sub setup() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/ApiNinjasTrivia.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/ApiNinjasTrivia.pm) + +Line 46. + +## Source + +[`lib/SignalWire/Skills/Builtin/ApiNinjasTrivia.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/ApiNinjasTrivia.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/claude-skills/claude-skills/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/claude-skills/claude-skills/index.mdx deleted file mode 100644 index e7a6db1fbf..0000000000 --- a/fern/products/sdk-reference/perl/agents/skills/builtin/claude-skills/claude-skills/index.mdx +++ /dev/null @@ -1,95 +0,0 @@ ---- -slug: "/reference/perl/agents/skills/builtin/claude-skills/claude-skills" -title: "ClaudeSkills" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Skills::Builtin::ClaudeSkills" - parent: "agents.Skills.Builtin.ClaudeSkills" - module: "agents.Skills.Builtin.ClaudeSkills" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/ClaudeSkills.pm" ---- -# `ClaudeSkills` - -## Signature - -```perl -package SignalWire::Skills::Builtin::ClaudeSkills -``` - -## Inheritance - -**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/agents/skills/skill-base/skill-base) - -## Methods - -### get\_hints - -#### Signature - -```perl -sub get_hints() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/ClaudeSkills.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/ClaudeSkills.pm) - -Line 41. - -*** - -### get\_parameter\_schema - -#### Signature - -```perl -sub get_parameter_schema() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/ClaudeSkills.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/ClaudeSkills.pm) - -Line 46. - -*** - -### register\_tools - -#### Signature - -```perl -sub register_tools() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/ClaudeSkills.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/ClaudeSkills.pm) - -Line 16. - -*** - -### setup - -#### Signature - -```perl -sub setup() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/ClaudeSkills.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/ClaudeSkills.pm) - -Line 14. - -## Source - -[`lib/SignalWire/Skills/Builtin/ClaudeSkills.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/ClaudeSkills.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/claude-skills/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/claude-skills/index.mdx index 746e2d0405..3091613bd0 100644 --- a/fern/products/sdk-reference/perl/agents/skills/builtin/claude-skills/index.mdx +++ b/fern/products/sdk-reference/perl/agents/skills/builtin/claude-skills/index.mdx @@ -5,16 +5,91 @@ sdk_label: "Perl SDK" icon: "perl" lustri: auto_generated: true - kind: "module" + kind: "class" language: "perl" - qualified_name: "agents.Skills.Builtin.ClaudeSkills" + qualified_name: "SignalWire::Skills::Builtin::ClaudeSkills" parent: "agents.Skills.Builtin" module: "agents.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/ClaudeSkills.pm" --- # `ClaudeSkills` -## Classes +## Signature - - - +```perl +package SignalWire::Skills::Builtin::ClaudeSkills +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/agents/skills/skill-base) + +## Methods + +### get\_hints + +#### Signature + +```perl +sub get_hints() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/ClaudeSkills.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/ClaudeSkills.pm) + +Line 41. + +*** + +### get\_parameter\_schema + +#### Signature + +```perl +sub get_parameter_schema() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/ClaudeSkills.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/ClaudeSkills.pm) + +Line 46. + +*** + +### register\_tools + +#### Signature + +```perl +sub register_tools() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/ClaudeSkills.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/ClaudeSkills.pm) + +Line 16. + +*** + +### setup + +#### Signature + +```perl +sub setup() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/ClaudeSkills.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/ClaudeSkills.pm) + +Line 14. + +## Source + +[`lib/SignalWire/Skills/Builtin/ClaudeSkills.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/ClaudeSkills.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/custom-skills/custom-skills/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/custom-skills/custom-skills/index.mdx deleted file mode 100644 index 4cdfaaa144..0000000000 --- a/fern/products/sdk-reference/perl/agents/skills/builtin/custom-skills/custom-skills/index.mdx +++ /dev/null @@ -1,79 +0,0 @@ ---- -slug: "/reference/perl/agents/skills/builtin/custom-skills/custom-skills" -title: "CustomSkills" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Skills::Builtin::CustomSkills" - parent: "agents.Skills.Builtin.CustomSkills" - module: "agents.Skills.Builtin.CustomSkills" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/CustomSkills.pm" ---- -# `CustomSkills` - -## Signature - -```perl -package SignalWire::Skills::Builtin::CustomSkills -``` - -## Inheritance - -**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/agents/skills/skill-base/skill-base) - -## Methods - -### get\_parameter\_schema - -#### Signature - -```perl -sub get_parameter_schema() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/CustomSkills.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/CustomSkills.pm) - -Line 30. - -*** - -### register\_tools - -#### Signature - -```perl -sub register_tools() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/CustomSkills.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/CustomSkills.pm) - -Line 16. - -*** - -### setup - -#### Signature - -```perl -sub setup() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/CustomSkills.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/CustomSkills.pm) - -Line 14. - -## Source - -[`lib/SignalWire/Skills/Builtin/CustomSkills.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/CustomSkills.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/custom-skills/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/custom-skills/index.mdx index 88dc5db7e3..51ddfe0cf0 100644 --- a/fern/products/sdk-reference/perl/agents/skills/builtin/custom-skills/index.mdx +++ b/fern/products/sdk-reference/perl/agents/skills/builtin/custom-skills/index.mdx @@ -5,16 +5,75 @@ sdk_label: "Perl SDK" icon: "perl" lustri: auto_generated: true - kind: "module" + kind: "class" language: "perl" - qualified_name: "agents.Skills.Builtin.CustomSkills" + qualified_name: "SignalWire::Skills::Builtin::CustomSkills" parent: "agents.Skills.Builtin" module: "agents.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/CustomSkills.pm" --- # `CustomSkills` -## Classes +## Signature - - - +```perl +package SignalWire::Skills::Builtin::CustomSkills +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/agents/skills/skill-base) + +## Methods + +### get\_parameter\_schema + +#### Signature + +```perl +sub get_parameter_schema() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/CustomSkills.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/CustomSkills.pm) + +Line 30. + +*** + +### register\_tools + +#### Signature + +```perl +sub register_tools() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/CustomSkills.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/CustomSkills.pm) + +Line 16. + +*** + +### setup + +#### Signature + +```perl +sub setup() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/CustomSkills.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/CustomSkills.pm) + +Line 14. + +## Source + +[`lib/SignalWire/Skills/Builtin/CustomSkills.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/CustomSkills.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/datasphere-serverless/datasphere-serverless/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/datasphere-serverless/datasphere-serverless/index.mdx deleted file mode 100644 index 89efc4c51b..0000000000 --- a/fern/products/sdk-reference/perl/agents/skills/builtin/datasphere-serverless/datasphere-serverless/index.mdx +++ /dev/null @@ -1,111 +0,0 @@ ---- -slug: "/reference/perl/agents/skills/builtin/datasphere-serverless/datasphere-serverless" -title: "DatasphereServerless" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Skills::Builtin::DatasphereServerless" - parent: "agents.Skills.Builtin.DatasphereServerless" - module: "agents.Skills.Builtin.DatasphereServerless" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/DatasphereServerless.pm" ---- -# `DatasphereServerless` - -## Signature - -```perl -package SignalWire::Skills::Builtin::DatasphereServerless -``` - -## Inheritance - -**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/agents/skills/skill-base/skill-base) - -## Methods - -### get\_global\_data - -#### Signature - -```perl -sub get_global_data() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/DatasphereServerless.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/DatasphereServerless.pm) - -Line 47. - -*** - -### get\_hints - -#### Signature - -```perl -sub get_hints() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/DatasphereServerless.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/DatasphereServerless.pm) - -Line 45. - -*** - -### get\_parameter\_schema - -#### Signature - -```perl -sub get_parameter_schema() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/DatasphereServerless.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/DatasphereServerless.pm) - -Line 67. - -*** - -### register\_tools - -#### Signature - -```perl -sub register_tools() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/DatasphereServerless.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/DatasphereServerless.pm) - -Line 17. - -*** - -### setup - -#### Signature - -```perl -sub setup() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/DatasphereServerless.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/DatasphereServerless.pm) - -Line 15. - -## Source - -[`lib/SignalWire/Skills/Builtin/DatasphereServerless.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/DatasphereServerless.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/datasphere-serverless/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/datasphere-serverless/index.mdx index 7366119918..73c4ea23b0 100644 --- a/fern/products/sdk-reference/perl/agents/skills/builtin/datasphere-serverless/index.mdx +++ b/fern/products/sdk-reference/perl/agents/skills/builtin/datasphere-serverless/index.mdx @@ -5,16 +5,107 @@ sdk_label: "Perl SDK" icon: "perl" lustri: auto_generated: true - kind: "module" + kind: "class" language: "perl" - qualified_name: "agents.Skills.Builtin.DatasphereServerless" + qualified_name: "SignalWire::Skills::Builtin::DatasphereServerless" parent: "agents.Skills.Builtin" module: "agents.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/DatasphereServerless.pm" --- # `DatasphereServerless` -## Classes +## Signature - - - +```perl +package SignalWire::Skills::Builtin::DatasphereServerless +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/agents/skills/skill-base) + +## Methods + +### get\_global\_data + +#### Signature + +```perl +sub get_global_data() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/DatasphereServerless.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/DatasphereServerless.pm) + +Line 47. + +*** + +### get\_hints + +#### Signature + +```perl +sub get_hints() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/DatasphereServerless.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/DatasphereServerless.pm) + +Line 45. + +*** + +### get\_parameter\_schema + +#### Signature + +```perl +sub get_parameter_schema() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/DatasphereServerless.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/DatasphereServerless.pm) + +Line 67. + +*** + +### register\_tools + +#### Signature + +```perl +sub register_tools() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/DatasphereServerless.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/DatasphereServerless.pm) + +Line 17. + +*** + +### setup + +#### Signature + +```perl +sub setup() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/DatasphereServerless.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/DatasphereServerless.pm) + +Line 15. + +## Source + +[`lib/SignalWire/Skills/Builtin/DatasphereServerless.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/DatasphereServerless.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/datasphere/datasphere/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/datasphere/datasphere/index.mdx deleted file mode 100644 index b691c1a11a..0000000000 --- a/fern/products/sdk-reference/perl/agents/skills/builtin/datasphere/datasphere/index.mdx +++ /dev/null @@ -1,131 +0,0 @@ ---- -slug: "/reference/perl/agents/skills/builtin/datasphere/datasphere" -title: "Datasphere" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Skills::Builtin::Datasphere" - parent: "agents.Skills.Builtin.Datasphere" - module: "agents.Skills.Builtin.Datasphere" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Datasphere.pm" ---- -# `Datasphere` - -## Signature - -```perl -package SignalWire::Skills::Builtin::Datasphere -``` - -## Inheritance - -**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/agents/skills/skill-base/skill-base) - -## Methods - -### get\_global\_data - -#### Signature - -```perl -sub get_global_data() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/Datasphere.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Datasphere.pm) - -Line 183. - -*** - -### get\_hints - -#### Signature - -```perl -sub get_hints() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/Datasphere.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Datasphere.pm) - -Line 181. - -*** - -### get\_parameter\_schema - -#### Signature - -```perl -sub get_parameter_schema() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/Datasphere.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Datasphere.pm) - -Line 203. - -*** - -### register\_tools - -#### Signature - -```perl -sub register_tools() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/Datasphere.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Datasphere.pm) - -Line 63. - -*** - -### search\_knowledge - -#### Signature - -```perl -sub search_knowledge($query) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Skills/Builtin/Datasphere.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Datasphere.pm) - -Line 107. - -*** - -### setup - -#### Signature - -```perl -sub setup() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/Datasphere.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Datasphere.pm) - -Line 54. - -## Source - -[`lib/SignalWire/Skills/Builtin/Datasphere.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Datasphere.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/datasphere/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/datasphere/index.mdx index d9dceb89b8..bc2caf1207 100644 --- a/fern/products/sdk-reference/perl/agents/skills/builtin/datasphere/index.mdx +++ b/fern/products/sdk-reference/perl/agents/skills/builtin/datasphere/index.mdx @@ -5,16 +5,127 @@ sdk_label: "Perl SDK" icon: "perl" lustri: auto_generated: true - kind: "module" + kind: "class" language: "perl" - qualified_name: "agents.Skills.Builtin.Datasphere" + qualified_name: "SignalWire::Skills::Builtin::Datasphere" parent: "agents.Skills.Builtin" module: "agents.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Datasphere.pm" --- # `Datasphere` -## Classes +## Signature - - - +```perl +package SignalWire::Skills::Builtin::Datasphere +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/agents/skills/skill-base) + +## Methods + +### get\_global\_data + +#### Signature + +```perl +sub get_global_data() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/Datasphere.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Datasphere.pm) + +Line 183. + +*** + +### get\_hints + +#### Signature + +```perl +sub get_hints() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/Datasphere.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Datasphere.pm) + +Line 181. + +*** + +### get\_parameter\_schema + +#### Signature + +```perl +sub get_parameter_schema() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/Datasphere.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Datasphere.pm) + +Line 203. + +*** + +### register\_tools + +#### Signature + +```perl +sub register_tools() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/Datasphere.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Datasphere.pm) + +Line 63. + +*** + +### search\_knowledge + +#### Signature + +```perl +sub search_knowledge($query) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Skills/Builtin/Datasphere.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Datasphere.pm) + +Line 107. + +*** + +### setup + +#### Signature + +```perl +sub setup() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/Datasphere.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Datasphere.pm) + +Line 54. + +## Source + +[`lib/SignalWire/Skills/Builtin/Datasphere.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Datasphere.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/datetime/datetime/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/datetime/datetime/index.mdx deleted file mode 100644 index f826d99718..0000000000 --- a/fern/products/sdk-reference/perl/agents/skills/builtin/datetime/datetime/index.mdx +++ /dev/null @@ -1,79 +0,0 @@ ---- -slug: "/reference/perl/agents/skills/builtin/datetime/datetime" -title: "Datetime" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Skills::Builtin::Datetime" - parent: "agents.Skills.Builtin.Datetime" - module: "agents.Skills.Builtin.Datetime" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Datetime.pm" ---- -# `Datetime` - -## Signature - -```perl -package SignalWire::Skills::Builtin::Datetime -``` - -## Inheritance - -**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/agents/skills/skill-base/skill-base) - -## Methods - -### get\_parameter\_schema - -#### Signature - -```perl -sub get_parameter_schema() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/Datetime.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Datetime.pm) - -Line 78. - -*** - -### register\_tools - -#### Signature - -```perl -sub register_tools() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/Datetime.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Datetime.pm) - -Line 17. - -*** - -### setup - -#### Signature - -```perl -sub setup() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/Datetime.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Datetime.pm) - -Line 15. - -## Source - -[`lib/SignalWire/Skills/Builtin/Datetime.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Datetime.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/datetime/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/datetime/index.mdx index e67056b4cd..34e80b60e9 100644 --- a/fern/products/sdk-reference/perl/agents/skills/builtin/datetime/index.mdx +++ b/fern/products/sdk-reference/perl/agents/skills/builtin/datetime/index.mdx @@ -5,16 +5,75 @@ sdk_label: "Perl SDK" icon: "perl" lustri: auto_generated: true - kind: "module" + kind: "class" language: "perl" - qualified_name: "agents.Skills.Builtin.Datetime" + qualified_name: "SignalWire::Skills::Builtin::Datetime" parent: "agents.Skills.Builtin" module: "agents.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Datetime.pm" --- # `Datetime` -## Classes +## Signature - - - +```perl +package SignalWire::Skills::Builtin::Datetime +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/agents/skills/skill-base) + +## Methods + +### get\_parameter\_schema + +#### Signature + +```perl +sub get_parameter_schema() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/Datetime.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Datetime.pm) + +Line 78. + +*** + +### register\_tools + +#### Signature + +```perl +sub register_tools() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/Datetime.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Datetime.pm) + +Line 17. + +*** + +### setup + +#### Signature + +```perl +sub setup() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/Datetime.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Datetime.pm) + +Line 15. + +## Source + +[`lib/SignalWire/Skills/Builtin/Datetime.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Datetime.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/google-maps/google-maps/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/google-maps/google-maps/index.mdx deleted file mode 100644 index fc0d81fe23..0000000000 --- a/fern/products/sdk-reference/perl/agents/skills/builtin/google-maps/google-maps/index.mdx +++ /dev/null @@ -1,95 +0,0 @@ ---- -slug: "/reference/perl/agents/skills/builtin/google-maps/google-maps" -title: "GoogleMaps" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Skills::Builtin::GoogleMaps" - parent: "agents.Skills.Builtin.GoogleMaps" - module: "agents.Skills.Builtin.GoogleMaps" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/GoogleMaps.pm" ---- -# `GoogleMaps` - -## Signature - -```perl -package SignalWire::Skills::Builtin::GoogleMaps -``` - -## Inheritance - -**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/agents/skills/skill-base/skill-base) - -## Methods - -### get\_hints - -#### Signature - -```perl -sub get_hints() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/GoogleMaps.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/GoogleMaps.pm) - -Line 65. - -*** - -### get\_parameter\_schema - -#### Signature - -```perl -sub get_parameter_schema() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/GoogleMaps.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/GoogleMaps.pm) - -Line 80. - -*** - -### register\_tools - -#### Signature - -```perl -sub register_tools() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/GoogleMaps.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/GoogleMaps.pm) - -Line 16. - -*** - -### setup - -#### Signature - -```perl -sub setup() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/GoogleMaps.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/GoogleMaps.pm) - -Line 14. - -## Source - -[`lib/SignalWire/Skills/Builtin/GoogleMaps.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/GoogleMaps.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/google-maps/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/google-maps/index.mdx index 36e65c64ab..72be801d19 100644 --- a/fern/products/sdk-reference/perl/agents/skills/builtin/google-maps/index.mdx +++ b/fern/products/sdk-reference/perl/agents/skills/builtin/google-maps/index.mdx @@ -5,16 +5,91 @@ sdk_label: "Perl SDK" icon: "perl" lustri: auto_generated: true - kind: "module" + kind: "class" language: "perl" - qualified_name: "agents.Skills.Builtin.GoogleMaps" + qualified_name: "SignalWire::Skills::Builtin::GoogleMaps" parent: "agents.Skills.Builtin" module: "agents.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/GoogleMaps.pm" --- # `GoogleMaps` -## Classes +## Signature - - - +```perl +package SignalWire::Skills::Builtin::GoogleMaps +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/agents/skills/skill-base) + +## Methods + +### get\_hints + +#### Signature + +```perl +sub get_hints() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/GoogleMaps.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/GoogleMaps.pm) + +Line 65. + +*** + +### get\_parameter\_schema + +#### Signature + +```perl +sub get_parameter_schema() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/GoogleMaps.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/GoogleMaps.pm) + +Line 80. + +*** + +### register\_tools + +#### Signature + +```perl +sub register_tools() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/GoogleMaps.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/GoogleMaps.pm) + +Line 16. + +*** + +### setup + +#### Signature + +```perl +sub setup() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/GoogleMaps.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/GoogleMaps.pm) + +Line 14. + +## Source + +[`lib/SignalWire/Skills/Builtin/GoogleMaps.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/GoogleMaps.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/index.mdx index 3e0df5412b..ab25d354e3 100644 --- a/fern/products/sdk-reference/perl/agents/skills/builtin/index.mdx +++ b/fern/products/sdk-reference/perl/agents/skills/builtin/index.mdx @@ -13,7 +13,7 @@ lustri: --- # `Builtin` -## Modules +## Classes diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/info-gatherer/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/info-gatherer/index.mdx index 914e67272d..1639c1f817 100644 --- a/fern/products/sdk-reference/perl/agents/skills/builtin/info-gatherer/index.mdx +++ b/fern/products/sdk-reference/perl/agents/skills/builtin/info-gatherer/index.mdx @@ -5,16 +5,91 @@ sdk_label: "Perl SDK" icon: "perl" lustri: auto_generated: true - kind: "module" + kind: "class" language: "perl" - qualified_name: "agents.Skills.Builtin.InfoGatherer" + qualified_name: "SignalWire::Skills::Builtin::InfoGatherer" parent: "agents.Skills.Builtin" module: "agents.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/InfoGatherer.pm" --- # `InfoGatherer` -## Classes +## Signature - - - +```perl +package SignalWire::Skills::Builtin::InfoGatherer +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/agents/skills/skill-base) + +## Methods + +### get\_global\_data + +#### Signature + +```perl +sub get_global_data() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/InfoGatherer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/InfoGatherer.pm) + +Line 60. + +*** + +### get\_parameter\_schema + +#### Signature + +```perl +sub get_parameter_schema() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/InfoGatherer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/InfoGatherer.pm) + +Line 86. + +*** + +### register\_tools + +#### Signature + +```perl +sub register_tools() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/InfoGatherer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/InfoGatherer.pm) + +Line 17. + +*** + +### setup + +#### Signature + +```perl +sub setup() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/InfoGatherer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/InfoGatherer.pm) + +Line 15. + +## Source + +[`lib/SignalWire/Skills/Builtin/InfoGatherer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/InfoGatherer.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/info-gatherer/info-gatherer/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/info-gatherer/info-gatherer/index.mdx deleted file mode 100644 index 4a225b9364..0000000000 --- a/fern/products/sdk-reference/perl/agents/skills/builtin/info-gatherer/info-gatherer/index.mdx +++ /dev/null @@ -1,95 +0,0 @@ ---- -slug: "/reference/perl/agents/skills/builtin/info-gatherer/info-gatherer" -title: "InfoGatherer" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Skills::Builtin::InfoGatherer" - parent: "agents.Skills.Builtin.InfoGatherer" - module: "agents.Skills.Builtin.InfoGatherer" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/InfoGatherer.pm" ---- -# `InfoGatherer` - -## Signature - -```perl -package SignalWire::Skills::Builtin::InfoGatherer -``` - -## Inheritance - -**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/agents/skills/skill-base/skill-base) - -## Methods - -### get\_global\_data - -#### Signature - -```perl -sub get_global_data() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/InfoGatherer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/InfoGatherer.pm) - -Line 60. - -*** - -### get\_parameter\_schema - -#### Signature - -```perl -sub get_parameter_schema() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/InfoGatherer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/InfoGatherer.pm) - -Line 86. - -*** - -### register\_tools - -#### Signature - -```perl -sub register_tools() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/InfoGatherer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/InfoGatherer.pm) - -Line 17. - -*** - -### setup - -#### Signature - -```perl -sub setup() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/InfoGatherer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/InfoGatherer.pm) - -Line 15. - -## Source - -[`lib/SignalWire/Skills/Builtin/InfoGatherer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/InfoGatherer.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/joke/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/joke/index.mdx index 56e02a859d..4261776f3c 100644 --- a/fern/products/sdk-reference/perl/agents/skills/builtin/joke/index.mdx +++ b/fern/products/sdk-reference/perl/agents/skills/builtin/joke/index.mdx @@ -5,16 +5,91 @@ sdk_label: "Perl SDK" icon: "perl" lustri: auto_generated: true - kind: "module" + kind: "class" language: "perl" - qualified_name: "agents.Skills.Builtin.Joke" + qualified_name: "SignalWire::Skills::Builtin::Joke" parent: "agents.Skills.Builtin" module: "agents.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Joke.pm" --- # `Joke` -## Classes +## Signature - - - +```perl +package SignalWire::Skills::Builtin::Joke +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/agents/skills/skill-base) + +## Methods + +### get\_global\_data + +#### Signature + +```perl +sub get_global_data() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/Joke.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Joke.pm) + +Line 49. + +*** + +### get\_parameter\_schema + +#### Signature + +```perl +sub get_parameter_schema() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/Joke.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Joke.pm) + +Line 64. + +*** + +### register\_tools + +#### Signature + +```perl +sub register_tools() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/Joke.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Joke.pm) + +Line 17. + +*** + +### setup + +#### Signature + +```perl +sub setup() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/Joke.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Joke.pm) + +Line 15. + +## Source + +[`lib/SignalWire/Skills/Builtin/Joke.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Joke.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/joke/joke/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/joke/joke/index.mdx deleted file mode 100644 index 2fa4f842b3..0000000000 --- a/fern/products/sdk-reference/perl/agents/skills/builtin/joke/joke/index.mdx +++ /dev/null @@ -1,95 +0,0 @@ ---- -slug: "/reference/perl/agents/skills/builtin/joke/joke" -title: "Joke" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Skills::Builtin::Joke" - parent: "agents.Skills.Builtin.Joke" - module: "agents.Skills.Builtin.Joke" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Joke.pm" ---- -# `Joke` - -## Signature - -```perl -package SignalWire::Skills::Builtin::Joke -``` - -## Inheritance - -**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/agents/skills/skill-base/skill-base) - -## Methods - -### get\_global\_data - -#### Signature - -```perl -sub get_global_data() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/Joke.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Joke.pm) - -Line 49. - -*** - -### get\_parameter\_schema - -#### Signature - -```perl -sub get_parameter_schema() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/Joke.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Joke.pm) - -Line 64. - -*** - -### register\_tools - -#### Signature - -```perl -sub register_tools() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/Joke.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Joke.pm) - -Line 17. - -*** - -### setup - -#### Signature - -```perl -sub setup() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/Joke.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Joke.pm) - -Line 15. - -## Source - -[`lib/SignalWire/Skills/Builtin/Joke.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Joke.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/math/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/math/index.mdx index e054923a25..dcb475cfe4 100644 --- a/fern/products/sdk-reference/perl/agents/skills/builtin/math/index.mdx +++ b/fern/products/sdk-reference/perl/agents/skills/builtin/math/index.mdx @@ -5,16 +5,75 @@ sdk_label: "Perl SDK" icon: "perl" lustri: auto_generated: true - kind: "module" + kind: "class" language: "perl" - qualified_name: "agents.Skills.Builtin.Math" + qualified_name: "SignalWire::Skills::Builtin::Math" parent: "agents.Skills.Builtin" module: "agents.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Math.pm" --- # `Math` -## Classes +## Signature - - - +```perl +package SignalWire::Skills::Builtin::Math +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/agents/skills/skill-base) + +## Methods + +### get\_parameter\_schema + +#### Signature + +```perl +sub get_parameter_schema() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/Math.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Math.pm) + +Line 62. + +*** + +### register\_tools + +#### Signature + +```perl +sub register_tools() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/Math.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Math.pm) + +Line 16. + +*** + +### setup + +#### Signature + +```perl +sub setup() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/Math.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Math.pm) + +Line 14. + +## Source + +[`lib/SignalWire/Skills/Builtin/Math.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Math.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/math/math/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/math/math/index.mdx deleted file mode 100644 index 86eea238e8..0000000000 --- a/fern/products/sdk-reference/perl/agents/skills/builtin/math/math/index.mdx +++ /dev/null @@ -1,79 +0,0 @@ ---- -slug: "/reference/perl/agents/skills/builtin/math/math" -title: "Math" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Skills::Builtin::Math" - parent: "agents.Skills.Builtin.Math" - module: "agents.Skills.Builtin.Math" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Math.pm" ---- -# `Math` - -## Signature - -```perl -package SignalWire::Skills::Builtin::Math -``` - -## Inheritance - -**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/agents/skills/skill-base/skill-base) - -## Methods - -### get\_parameter\_schema - -#### Signature - -```perl -sub get_parameter_schema() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/Math.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Math.pm) - -Line 62. - -*** - -### register\_tools - -#### Signature - -```perl -sub register_tools() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/Math.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Math.pm) - -Line 16. - -*** - -### setup - -#### Signature - -```perl -sub setup() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/Math.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Math.pm) - -Line 14. - -## Source - -[`lib/SignalWire/Skills/Builtin/Math.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Math.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/mcp-gateway/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/mcp-gateway/index.mdx index 501458576b..60c656efa3 100644 --- a/fern/products/sdk-reference/perl/agents/skills/builtin/mcp-gateway/index.mdx +++ b/fern/products/sdk-reference/perl/agents/skills/builtin/mcp-gateway/index.mdx @@ -5,16 +5,107 @@ sdk_label: "Perl SDK" icon: "perl" lustri: auto_generated: true - kind: "module" + kind: "class" language: "perl" - qualified_name: "agents.Skills.Builtin.McpGateway" + qualified_name: "SignalWire::Skills::Builtin::McpGateway" parent: "agents.Skills.Builtin" module: "agents.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/McpGateway.pm" --- # `McpGateway` -## Classes +## Signature - - - +```perl +package SignalWire::Skills::Builtin::McpGateway +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/agents/skills/skill-base) + +## Methods + +### get\_global\_data + +#### Signature + +```perl +sub get_global_data() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/McpGateway.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/McpGateway.pm) + +Line 54. + +*** + +### get\_hints + +#### Signature + +```perl +sub get_hints() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/McpGateway.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/McpGateway.pm) + +Line 45. + +*** + +### get\_parameter\_schema + +#### Signature + +```perl +sub get_parameter_schema() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/McpGateway.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/McpGateway.pm) + +Line 71. + +*** + +### register\_tools + +#### Signature + +```perl +sub register_tools() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/McpGateway.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/McpGateway.pm) + +Line 16. + +*** + +### setup + +#### Signature + +```perl +sub setup() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/McpGateway.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/McpGateway.pm) + +Line 14. + +## Source + +[`lib/SignalWire/Skills/Builtin/McpGateway.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/McpGateway.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/mcp-gateway/mcp-gateway/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/mcp-gateway/mcp-gateway/index.mdx deleted file mode 100644 index f1022166ad..0000000000 --- a/fern/products/sdk-reference/perl/agents/skills/builtin/mcp-gateway/mcp-gateway/index.mdx +++ /dev/null @@ -1,111 +0,0 @@ ---- -slug: "/reference/perl/agents/skills/builtin/mcp-gateway/mcp-gateway" -title: "McpGateway" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Skills::Builtin::McpGateway" - parent: "agents.Skills.Builtin.McpGateway" - module: "agents.Skills.Builtin.McpGateway" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/McpGateway.pm" ---- -# `McpGateway` - -## Signature - -```perl -package SignalWire::Skills::Builtin::McpGateway -``` - -## Inheritance - -**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/agents/skills/skill-base/skill-base) - -## Methods - -### get\_global\_data - -#### Signature - -```perl -sub get_global_data() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/McpGateway.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/McpGateway.pm) - -Line 54. - -*** - -### get\_hints - -#### Signature - -```perl -sub get_hints() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/McpGateway.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/McpGateway.pm) - -Line 45. - -*** - -### get\_parameter\_schema - -#### Signature - -```perl -sub get_parameter_schema() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/McpGateway.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/McpGateway.pm) - -Line 71. - -*** - -### register\_tools - -#### Signature - -```perl -sub register_tools() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/McpGateway.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/McpGateway.pm) - -Line 16. - -*** - -### setup - -#### Signature - -```perl -sub setup() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/McpGateway.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/McpGateway.pm) - -Line 14. - -## Source - -[`lib/SignalWire/Skills/Builtin/McpGateway.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/McpGateway.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/native-vector-search/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/native-vector-search/index.mdx index e91779f106..c5068321ef 100644 --- a/fern/products/sdk-reference/perl/agents/skills/builtin/native-vector-search/index.mdx +++ b/fern/products/sdk-reference/perl/agents/skills/builtin/native-vector-search/index.mdx @@ -5,16 +5,91 @@ sdk_label: "Perl SDK" icon: "perl" lustri: auto_generated: true - kind: "module" + kind: "class" language: "perl" - qualified_name: "agents.Skills.Builtin.NativeVectorSearch" + qualified_name: "SignalWire::Skills::Builtin::NativeVectorSearch" parent: "agents.Skills.Builtin" module: "agents.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/NativeVectorSearch.pm" --- # `NativeVectorSearch` -## Classes +## Signature - - - +```perl +package SignalWire::Skills::Builtin::NativeVectorSearch +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/agents/skills/skill-base) + +## Methods + +### get\_hints + +#### Signature + +```perl +sub get_hints() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/NativeVectorSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/NativeVectorSearch.pm) + +Line 42. + +*** + +### get\_parameter\_schema + +#### Signature + +```perl +sub get_parameter_schema() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/NativeVectorSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/NativeVectorSearch.pm) + +Line 57. + +*** + +### register\_tools + +#### Signature + +```perl +sub register_tools() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/NativeVectorSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/NativeVectorSearch.pm) + +Line 16. + +*** + +### setup + +#### Signature + +```perl +sub setup() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/NativeVectorSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/NativeVectorSearch.pm) + +Line 14. + +## Source + +[`lib/SignalWire/Skills/Builtin/NativeVectorSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/NativeVectorSearch.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/native-vector-search/native-vector-search/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/native-vector-search/native-vector-search/index.mdx deleted file mode 100644 index a88d79e072..0000000000 --- a/fern/products/sdk-reference/perl/agents/skills/builtin/native-vector-search/native-vector-search/index.mdx +++ /dev/null @@ -1,95 +0,0 @@ ---- -slug: "/reference/perl/agents/skills/builtin/native-vector-search/native-vector-search" -title: "NativeVectorSearch" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Skills::Builtin::NativeVectorSearch" - parent: "agents.Skills.Builtin.NativeVectorSearch" - module: "agents.Skills.Builtin.NativeVectorSearch" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/NativeVectorSearch.pm" ---- -# `NativeVectorSearch` - -## Signature - -```perl -package SignalWire::Skills::Builtin::NativeVectorSearch -``` - -## Inheritance - -**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/agents/skills/skill-base/skill-base) - -## Methods - -### get\_hints - -#### Signature - -```perl -sub get_hints() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/NativeVectorSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/NativeVectorSearch.pm) - -Line 42. - -*** - -### get\_parameter\_schema - -#### Signature - -```perl -sub get_parameter_schema() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/NativeVectorSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/NativeVectorSearch.pm) - -Line 57. - -*** - -### register\_tools - -#### Signature - -```perl -sub register_tools() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/NativeVectorSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/NativeVectorSearch.pm) - -Line 16. - -*** - -### setup - -#### Signature - -```perl -sub setup() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/NativeVectorSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/NativeVectorSearch.pm) - -Line 14. - -## Source - -[`lib/SignalWire/Skills/Builtin/NativeVectorSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/NativeVectorSearch.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/play-background-file/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/play-background-file/index.mdx index 663316b870..c195ed900e 100644 --- a/fern/products/sdk-reference/perl/agents/skills/builtin/play-background-file/index.mdx +++ b/fern/products/sdk-reference/perl/agents/skills/builtin/play-background-file/index.mdx @@ -5,16 +5,75 @@ sdk_label: "Perl SDK" icon: "perl" lustri: auto_generated: true - kind: "module" + kind: "class" language: "perl" - qualified_name: "agents.Skills.Builtin.PlayBackgroundFile" + qualified_name: "SignalWire::Skills::Builtin::PlayBackgroundFile" parent: "agents.Skills.Builtin" module: "agents.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/PlayBackgroundFile.pm" --- # `PlayBackgroundFile` -## Classes +## Signature - - - +```perl +package SignalWire::Skills::Builtin::PlayBackgroundFile +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/agents/skills/skill-base) + +## Methods + +### get\_parameter\_schema + +#### Signature + +```perl +sub get_parameter_schema() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/PlayBackgroundFile.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/PlayBackgroundFile.pm) + +Line 57. + +*** + +### register\_tools + +#### Signature + +```perl +sub register_tools() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/PlayBackgroundFile.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/PlayBackgroundFile.pm) + +Line 16. + +*** + +### setup + +#### Signature + +```perl +sub setup() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/PlayBackgroundFile.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/PlayBackgroundFile.pm) + +Line 14. + +## Source + +[`lib/SignalWire/Skills/Builtin/PlayBackgroundFile.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/PlayBackgroundFile.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/play-background-file/play-background-file/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/play-background-file/play-background-file/index.mdx deleted file mode 100644 index 9cce4af9d7..0000000000 --- a/fern/products/sdk-reference/perl/agents/skills/builtin/play-background-file/play-background-file/index.mdx +++ /dev/null @@ -1,79 +0,0 @@ ---- -slug: "/reference/perl/agents/skills/builtin/play-background-file/play-background-file" -title: "PlayBackgroundFile" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Skills::Builtin::PlayBackgroundFile" - parent: "agents.Skills.Builtin.PlayBackgroundFile" - module: "agents.Skills.Builtin.PlayBackgroundFile" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/PlayBackgroundFile.pm" ---- -# `PlayBackgroundFile` - -## Signature - -```perl -package SignalWire::Skills::Builtin::PlayBackgroundFile -``` - -## Inheritance - -**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/agents/skills/skill-base/skill-base) - -## Methods - -### get\_parameter\_schema - -#### Signature - -```perl -sub get_parameter_schema() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/PlayBackgroundFile.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/PlayBackgroundFile.pm) - -Line 57. - -*** - -### register\_tools - -#### Signature - -```perl -sub register_tools() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/PlayBackgroundFile.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/PlayBackgroundFile.pm) - -Line 16. - -*** - -### setup - -#### Signature - -```perl -sub setup() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/PlayBackgroundFile.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/PlayBackgroundFile.pm) - -Line 14. - -## Source - -[`lib/SignalWire/Skills/Builtin/PlayBackgroundFile.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/PlayBackgroundFile.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/spider/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/spider/index.mdx index fd3eb76d25..a0ac602573 100644 --- a/fern/products/sdk-reference/perl/agents/skills/builtin/spider/index.mdx +++ b/fern/products/sdk-reference/perl/agents/skills/builtin/spider/index.mdx @@ -5,16 +5,111 @@ sdk_label: "Perl SDK" icon: "perl" lustri: auto_generated: true - kind: "module" + kind: "class" language: "perl" - qualified_name: "agents.Skills.Builtin.Spider" + qualified_name: "SignalWire::Skills::Builtin::Spider" parent: "agents.Skills.Builtin" module: "agents.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Spider.pm" --- # `Spider` -## Classes +## Signature - - - +```perl +package SignalWire::Skills::Builtin::Spider +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/agents/skills/skill-base) + +## Methods + +### get\_hints + +#### Signature + +```perl +sub get_hints() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/Spider.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Spider.pm) + +Line 180. + +*** + +### get\_parameter\_schema + +#### Signature + +```perl +sub get_parameter_schema() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/Spider.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Spider.pm) + +Line 184. + +*** + +### register\_tools + +#### Signature + +```perl +sub register_tools() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/Spider.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Spider.pm) + +Line 50. + +*** + +### scrape\_url + +#### Signature + +```perl +sub scrape_url($url) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Skills/Builtin/Spider.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Spider.pm) + +Line 119. + +*** + +### setup + +#### Signature + +```perl +sub setup() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/Spider.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Spider.pm) + +Line 48. + +## Source + +[`lib/SignalWire/Skills/Builtin/Spider.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Spider.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/spider/spider/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/spider/spider/index.mdx deleted file mode 100644 index bdbec2a23e..0000000000 --- a/fern/products/sdk-reference/perl/agents/skills/builtin/spider/spider/index.mdx +++ /dev/null @@ -1,115 +0,0 @@ ---- -slug: "/reference/perl/agents/skills/builtin/spider/spider" -title: "Spider" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Skills::Builtin::Spider" - parent: "agents.Skills.Builtin.Spider" - module: "agents.Skills.Builtin.Spider" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Spider.pm" ---- -# `Spider` - -## Signature - -```perl -package SignalWire::Skills::Builtin::Spider -``` - -## Inheritance - -**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/agents/skills/skill-base/skill-base) - -## Methods - -### get\_hints - -#### Signature - -```perl -sub get_hints() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/Spider.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Spider.pm) - -Line 180. - -*** - -### get\_parameter\_schema - -#### Signature - -```perl -sub get_parameter_schema() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/Spider.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Spider.pm) - -Line 184. - -*** - -### register\_tools - -#### Signature - -```perl -sub register_tools() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/Spider.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Spider.pm) - -Line 50. - -*** - -### scrape\_url - -#### Signature - -```perl -sub scrape_url($url) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Skills/Builtin/Spider.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Spider.pm) - -Line 119. - -*** - -### setup - -#### Signature - -```perl -sub setup() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/Spider.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Spider.pm) - -Line 48. - -## Source - -[`lib/SignalWire/Skills/Builtin/Spider.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/Spider.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/swml-transfer/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/swml-transfer/index.mdx index 0ab9952395..a52ee30aff 100644 --- a/fern/products/sdk-reference/perl/agents/skills/builtin/swml-transfer/index.mdx +++ b/fern/products/sdk-reference/perl/agents/skills/builtin/swml-transfer/index.mdx @@ -5,16 +5,91 @@ sdk_label: "Perl SDK" icon: "perl" lustri: auto_generated: true - kind: "module" + kind: "class" language: "perl" - qualified_name: "agents.Skills.Builtin.SwmlTransfer" + qualified_name: "SignalWire::Skills::Builtin::SwmlTransfer" parent: "agents.Skills.Builtin" module: "agents.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/SwmlTransfer.pm" --- # `SwmlTransfer` -## Classes +## Signature - - - +```perl +package SignalWire::Skills::Builtin::SwmlTransfer +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/agents/skills/skill-base) + +## Methods + +### get\_hints + +#### Signature + +```perl +sub get_hints() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/SwmlTransfer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/SwmlTransfer.pm) + +Line 57. + +*** + +### get\_parameter\_schema + +#### Signature + +```perl +sub get_parameter_schema() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/SwmlTransfer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/SwmlTransfer.pm) + +Line 82. + +*** + +### register\_tools + +#### Signature + +```perl +sub register_tools() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/SwmlTransfer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/SwmlTransfer.pm) + +Line 16. + +*** + +### setup + +#### Signature + +```perl +sub setup() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/SwmlTransfer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/SwmlTransfer.pm) + +Line 14. + +## Source + +[`lib/SignalWire/Skills/Builtin/SwmlTransfer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/SwmlTransfer.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/swml-transfer/swml-transfer/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/swml-transfer/swml-transfer/index.mdx deleted file mode 100644 index e86b0817a3..0000000000 --- a/fern/products/sdk-reference/perl/agents/skills/builtin/swml-transfer/swml-transfer/index.mdx +++ /dev/null @@ -1,95 +0,0 @@ ---- -slug: "/reference/perl/agents/skills/builtin/swml-transfer/swml-transfer" -title: "SwmlTransfer" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Skills::Builtin::SwmlTransfer" - parent: "agents.Skills.Builtin.SwmlTransfer" - module: "agents.Skills.Builtin.SwmlTransfer" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/SwmlTransfer.pm" ---- -# `SwmlTransfer` - -## Signature - -```perl -package SignalWire::Skills::Builtin::SwmlTransfer -``` - -## Inheritance - -**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/agents/skills/skill-base/skill-base) - -## Methods - -### get\_hints - -#### Signature - -```perl -sub get_hints() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/SwmlTransfer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/SwmlTransfer.pm) - -Line 57. - -*** - -### get\_parameter\_schema - -#### Signature - -```perl -sub get_parameter_schema() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/SwmlTransfer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/SwmlTransfer.pm) - -Line 82. - -*** - -### register\_tools - -#### Signature - -```perl -sub register_tools() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/SwmlTransfer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/SwmlTransfer.pm) - -Line 16. - -*** - -### setup - -#### Signature - -```perl -sub setup() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/SwmlTransfer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/SwmlTransfer.pm) - -Line 14. - -## Source - -[`lib/SignalWire/Skills/Builtin/SwmlTransfer.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/SwmlTransfer.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/weather-api/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/weather-api/index.mdx index c6b3bcdb37..9f79818aa3 100644 --- a/fern/products/sdk-reference/perl/agents/skills/builtin/weather-api/index.mdx +++ b/fern/products/sdk-reference/perl/agents/skills/builtin/weather-api/index.mdx @@ -5,16 +5,75 @@ sdk_label: "Perl SDK" icon: "perl" lustri: auto_generated: true - kind: "module" + kind: "class" language: "perl" - qualified_name: "agents.Skills.Builtin.WeatherApi" + qualified_name: "SignalWire::Skills::Builtin::WeatherApi" parent: "agents.Skills.Builtin" module: "agents.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WeatherApi.pm" --- # `WeatherApi` -## Classes +## Signature - - - +```perl +package SignalWire::Skills::Builtin::WeatherApi +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/agents/skills/skill-base) + +## Methods + +### get\_parameter\_schema + +#### Signature + +```perl +sub get_parameter_schema() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/WeatherApi.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WeatherApi.pm) + +Line 67. + +*** + +### register\_tools + +#### Signature + +```perl +sub register_tools() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/WeatherApi.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WeatherApi.pm) + +Line 16. + +*** + +### setup + +#### Signature + +```perl +sub setup() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/WeatherApi.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WeatherApi.pm) + +Line 14. + +## Source + +[`lib/SignalWire/Skills/Builtin/WeatherApi.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WeatherApi.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/weather-api/weather-api/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/weather-api/weather-api/index.mdx deleted file mode 100644 index ffbaad2614..0000000000 --- a/fern/products/sdk-reference/perl/agents/skills/builtin/weather-api/weather-api/index.mdx +++ /dev/null @@ -1,79 +0,0 @@ ---- -slug: "/reference/perl/agents/skills/builtin/weather-api/weather-api" -title: "WeatherApi" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Skills::Builtin::WeatherApi" - parent: "agents.Skills.Builtin.WeatherApi" - module: "agents.Skills.Builtin.WeatherApi" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WeatherApi.pm" ---- -# `WeatherApi` - -## Signature - -```perl -package SignalWire::Skills::Builtin::WeatherApi -``` - -## Inheritance - -**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/agents/skills/skill-base/skill-base) - -## Methods - -### get\_parameter\_schema - -#### Signature - -```perl -sub get_parameter_schema() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/WeatherApi.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WeatherApi.pm) - -Line 67. - -*** - -### register\_tools - -#### Signature - -```perl -sub register_tools() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/WeatherApi.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WeatherApi.pm) - -Line 16. - -*** - -### setup - -#### Signature - -```perl -sub setup() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/WeatherApi.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WeatherApi.pm) - -Line 14. - -## Source - -[`lib/SignalWire/Skills/Builtin/WeatherApi.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WeatherApi.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/web-search/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/web-search/index.mdx index 27ebd9be7d..5b22d20f66 100644 --- a/fern/products/sdk-reference/perl/agents/skills/builtin/web-search/index.mdx +++ b/fern/products/sdk-reference/perl/agents/skills/builtin/web-search/index.mdx @@ -5,16 +5,111 @@ sdk_label: "Perl SDK" icon: "perl" lustri: auto_generated: true - kind: "module" + kind: "class" language: "perl" - qualified_name: "agents.Skills.Builtin.WebSearch" + qualified_name: "SignalWire::Skills::Builtin::WebSearch" parent: "agents.Skills.Builtin" module: "agents.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WebSearch.pm" --- # `WebSearch` -## Classes +## Signature - - - +```perl +package SignalWire::Skills::Builtin::WebSearch +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/agents/skills/skill-base) + +## Methods + +### get\_global\_data + +#### Signature + +```perl +sub get_global_data() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/WebSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WebSearch.pm) + +Line 307. + +*** + +### get\_parameter\_schema + +#### Signature + +```perl +sub get_parameter_schema() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/WebSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WebSearch.pm) + +Line 326. + +*** + +### register\_tools + +#### Signature + +```perl +sub register_tools() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/WebSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WebSearch.pm) + +Line 138. + +*** + +### search\_web + +#### Signature + +```perl +sub search_web($query) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Skills/Builtin/WebSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WebSearch.pm) + +Line 167. + +*** + +### setup + +#### Signature + +```perl +sub setup() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/WebSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WebSearch.pm) + +Line 86. + +## Source + +[`lib/SignalWire/Skills/Builtin/WebSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WebSearch.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/web-search/web-search/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/web-search/web-search/index.mdx deleted file mode 100644 index b236adccb0..0000000000 --- a/fern/products/sdk-reference/perl/agents/skills/builtin/web-search/web-search/index.mdx +++ /dev/null @@ -1,115 +0,0 @@ ---- -slug: "/reference/perl/agents/skills/builtin/web-search/web-search" -title: "WebSearch" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Skills::Builtin::WebSearch" - parent: "agents.Skills.Builtin.WebSearch" - module: "agents.Skills.Builtin.WebSearch" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WebSearch.pm" ---- -# `WebSearch` - -## Signature - -```perl -package SignalWire::Skills::Builtin::WebSearch -``` - -## Inheritance - -**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/agents/skills/skill-base/skill-base) - -## Methods - -### get\_global\_data - -#### Signature - -```perl -sub get_global_data() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/WebSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WebSearch.pm) - -Line 307. - -*** - -### get\_parameter\_schema - -#### Signature - -```perl -sub get_parameter_schema() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/WebSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WebSearch.pm) - -Line 326. - -*** - -### register\_tools - -#### Signature - -```perl -sub register_tools() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/WebSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WebSearch.pm) - -Line 138. - -*** - -### search\_web - -#### Signature - -```perl -sub search_web($query) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Skills/Builtin/WebSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WebSearch.pm) - -Line 167. - -*** - -### setup - -#### Signature - -```perl -sub setup() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/WebSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WebSearch.pm) - -Line 86. - -## Source - -[`lib/SignalWire/Skills/Builtin/WebSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WebSearch.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/wikipedia-search/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/wikipedia-search/index.mdx index 1284a02f58..32f80591d5 100644 --- a/fern/products/sdk-reference/perl/agents/skills/builtin/wikipedia-search/index.mdx +++ b/fern/products/sdk-reference/perl/agents/skills/builtin/wikipedia-search/index.mdx @@ -5,16 +5,95 @@ sdk_label: "Perl SDK" icon: "perl" lustri: auto_generated: true - kind: "module" + kind: "class" language: "perl" - qualified_name: "agents.Skills.Builtin.WikipediaSearch" + qualified_name: "SignalWire::Skills::Builtin::WikipediaSearch" parent: "agents.Skills.Builtin" module: "agents.Skills.Builtin" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WikipediaSearch.pm" --- # `WikipediaSearch` -## Classes +## Signature - - - +```perl +package SignalWire::Skills::Builtin::WikipediaSearch +``` + +## Inheritance + +**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/agents/skills/skill-base) + +## Methods + +### get\_parameter\_schema + +#### Signature + +```perl +sub get_parameter_schema() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/WikipediaSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WikipediaSearch.pm) + +Line 189. + +*** + +### register\_tools + +#### Signature + +```perl +sub register_tools() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/WikipediaSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WikipediaSearch.pm) + +Line 77. + +*** + +### search\_wiki + +#### Signature + +```perl +sub search_wiki($query) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Skills/Builtin/WikipediaSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WikipediaSearch.pm) + +Line 112. + +*** + +### setup + +#### Signature + +```perl +sub setup() +``` + +#### Source + +[`lib/SignalWire/Skills/Builtin/WikipediaSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WikipediaSearch.pm) + +Line 64. + +## Source + +[`lib/SignalWire/Skills/Builtin/WikipediaSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WikipediaSearch.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/skills/builtin/wikipedia-search/wikipedia-search/index.mdx b/fern/products/sdk-reference/perl/agents/skills/builtin/wikipedia-search/wikipedia-search/index.mdx deleted file mode 100644 index 1ce83db4c9..0000000000 --- a/fern/products/sdk-reference/perl/agents/skills/builtin/wikipedia-search/wikipedia-search/index.mdx +++ /dev/null @@ -1,99 +0,0 @@ ---- -slug: "/reference/perl/agents/skills/builtin/wikipedia-search/wikipedia-search" -title: "WikipediaSearch" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Skills::Builtin::WikipediaSearch" - parent: "agents.Skills.Builtin.WikipediaSearch" - module: "agents.Skills.Builtin.WikipediaSearch" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WikipediaSearch.pm" ---- -# `WikipediaSearch` - -## Signature - -```perl -package SignalWire::Skills::Builtin::WikipediaSearch -``` - -## Inheritance - -**Extends:** [SignalWire::Skills::SkillBase](/docs/sdk-reference/reference/perl/agents/skills/skill-base/skill-base) - -## Methods - -### get\_parameter\_schema - -#### Signature - -```perl -sub get_parameter_schema() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/WikipediaSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WikipediaSearch.pm) - -Line 189. - -*** - -### register\_tools - -#### Signature - -```perl -sub register_tools() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/WikipediaSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WikipediaSearch.pm) - -Line 77. - -*** - -### search\_wiki - -#### Signature - -```perl -sub search_wiki($query) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Skills/Builtin/WikipediaSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WikipediaSearch.pm) - -Line 112. - -*** - -### setup - -#### Signature - -```perl -sub setup() -``` - -#### Source - -[`lib/SignalWire/Skills/Builtin/WikipediaSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WikipediaSearch.pm) - -Line 64. - -## Source - -[`lib/SignalWire/Skills/Builtin/WikipediaSearch.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/Builtin/WikipediaSearch.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/agents/skills/index.mdx b/fern/products/sdk-reference/perl/agents/skills/index.mdx index 3e564a83ad..8e028aa766 100644 --- a/fern/products/sdk-reference/perl/agents/skills/index.mdx +++ b/fern/products/sdk-reference/perl/agents/skills/index.mdx @@ -13,16 +13,24 @@ lustri: --- # `Skills` -## Modules +## Classes - - - + + SignalWire::Skills::SkillBase is the Perl port of the Python reference's `SkillBase`. Every built-in or custom skill extends it. A skill declares metadata (`skill_name`, `skill_description`, `skill_version`), optional package / environment requirements, and overrides the abstract `setup` and `register_tools` hooks to wire its SWAIG tools onto the owning agent. + - + + The 18 built-in skill names, surfaced as typed, named constants. Each constant's value is the skill's registered wire name — the exact string passed to `SkillRegistry->register_skill` in the matching `SignalWire::Skills::Builtin::*` module. + + +## Modules + + + + diff --git a/fern/products/sdk-reference/perl/agents/skills/skill-base/index.mdx b/fern/products/sdk-reference/perl/agents/skills/skill-base/index.mdx index 09202550a3..469fd4b6a1 100644 --- a/fern/products/sdk-reference/perl/agents/skills/skill-base/index.mdx +++ b/fern/products/sdk-reference/perl/agents/skills/skill-base/index.mdx @@ -5,18 +5,251 @@ sdk_label: "Perl SDK" icon: "perl" lustri: auto_generated: true - kind: "module" + kind: "class" language: "perl" - qualified_name: "agents.Skills.SkillBase" + qualified_name: "SignalWire::Skills::SkillBase" parent: "agents.Skills" module: "agents.Skills" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillBase.pm" --- # `SkillBase` -## Classes +SignalWire::Skills::SkillBase is the Perl port of the Python reference's `SkillBase`. Every built-in or custom skill extends it. A skill declares metadata (`skill_name`, `skill_description`, `skill_version`), optional package / environment requirements, and overrides the abstract `setup` and `register_tools` hooks to wire its SWAIG tools onto the owning agent. - - - SignalWire::Skills::SkillBase is the Perl port of the Python reference's `SkillBase`. Every built-in or custom skill extends it. A skill declares metadata (`skill_name`, `skill_description`, `skill_version`), optional package / environment requirements, and overrides the abstract `setup` and `register_tools` hooks to wire its SWAIG tools onto the owning agent. - - +Construction fails fast (Moo `isa` constraints): `skill_name` / `skill_description` must be non-empty strings, `agent` must be a blessed object, `required_packages` / `required_env_vars` must be arrayrefs, and `params` / `swaig_fields` must be hashrefs. + +**ATTRIBUTES** + +`skill_name`, `skill_description`, `skill_version`, `supports_multiple_instances`, `required_packages`, `required_env_vars`, `agent`, `params`, `swaig_fields`. + +**LICENSE** + +Copyright (c) 2025 SignalWire. Licensed under the MIT License. + +**METHODS** + +- `setup` / `register_tools` — abstract; a subclass **must** override both (the defaults `croak`). + +- `define_tool(%opts)` — register a SWAIG tool on the agent, merging the skill's `swaig_fields` into the definition. + +- `get_hints` / `get_global_data` / `get_prompt_sections` — default no-op contributions a subclass may override; `get_prompt_sections` honours the `skip_prompt` param. + +- `cleanup` — teardown hook (no-op by default). + +- `validate_env_vars` — true iff every `required_env_vars` entry is set in `%ENV`. + +- `get_parameter_schema` — the JSON-schema-ish description of the config params the skill accepts. + +- `get_instance_key` — the registry key for this skill instance (`skill_name`, optionally suffixed by `tool_name`). + +**Synopsis** + +```perl +package SignalWire::Skills::Builtin::MySkill; +use Moo; +extends 'SignalWire::Skills::SkillBase'; +``` + +```perl +has '+skill_name' => ( default => sub { 'my_skill' } ); +has '+skill_description' => ( default => sub { 'Does a thing' } ); +``` + +```perl +sub setup ($self) { ...; return 1; } +sub register_tools ($self) { + $self->define_tool( name => 'do_thing', ... ); +} +``` + +## Signature + +```perl +package SignalWire::Skills::SkillBase +``` + +## See Also + +- SignalWire::Skills::SkillRegistry, SignalWire::Skills::SkillManager, SignalWire::Skills::SkillName. + +## Methods + +### BUILD + +#### Signature + +```perl +sub BUILD() +``` + +#### Source + +[`lib/SignalWire/Skills/SkillBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillBase.pm) + +Line 45. + +*** + +### cleanup + +#### Signature + +```perl +sub cleanup() +``` + +#### Source + +[`lib/SignalWire/Skills/SkillBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillBase.pm) + +Line 87. + +*** + +### define\_tool + +#### Signature + +```perl +sub define_tool() +``` + +#### Source + +[`lib/SignalWire/Skills/SkillBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillBase.pm) + +Line 64. + +*** + +### get\_global\_data + +#### Signature + +```perl +sub get_global_data() +``` + +#### Source + +[`lib/SignalWire/Skills/SkillBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillBase.pm) + +Line 74. + +*** + +### get\_hints + +#### Signature + +```perl +sub get_hints() +``` + +#### Source + +[`lib/SignalWire/Skills/SkillBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillBase.pm) + +Line 70. + +*** + +### get\_instance\_key + +#### Signature + +```perl +sub get_instance_key() +``` + +#### Source + +[`lib/SignalWire/Skills/SkillBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillBase.pm) + +Line 106. + +*** + +### get\_parameter\_schema + +#### Signature + +```perl +sub get_parameter_schema() +``` + +#### Source + +[`lib/SignalWire/Skills/SkillBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillBase.pm) + +Line 98. + +*** + +### get\_prompt\_sections + +#### Signature + +```perl +sub get_prompt_sections() +``` + +#### Source + +[`lib/SignalWire/Skills/SkillBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillBase.pm) + +Line 78. + +*** + +### register\_tools + +#### Signature + +```perl +sub register_tools() +``` + +#### Source + +[`lib/SignalWire/Skills/SkillBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillBase.pm) + +Line 58. + +*** + +### setup + +#### Signature + +```perl +sub setup() +``` + +#### Source + +[`lib/SignalWire/Skills/SkillBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillBase.pm) + +Line 54. + +*** + +### validate\_env\_vars + +#### Signature + +```perl +sub validate_env_vars() +``` + +#### Source + +[`lib/SignalWire/Skills/SkillBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillBase.pm) + +Line 91. + +## Source + +[`lib/SignalWire/Skills/SkillBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillBase.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/skills/skill-base/skill-base/index.mdx b/fern/products/sdk-reference/perl/agents/skills/skill-base/skill-base/index.mdx deleted file mode 100644 index 54abac0dc8..0000000000 --- a/fern/products/sdk-reference/perl/agents/skills/skill-base/skill-base/index.mdx +++ /dev/null @@ -1,255 +0,0 @@ ---- -slug: "/reference/perl/agents/skills/skill-base/skill-base" -title: "SkillBase" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Skills::SkillBase" - parent: "agents.Skills.SkillBase" - module: "agents.Skills.SkillBase" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillBase.pm" ---- -# `SkillBase` - -SignalWire::Skills::SkillBase is the Perl port of the Python reference's `SkillBase`. Every built-in or custom skill extends it. A skill declares metadata (`skill_name`, `skill_description`, `skill_version`), optional package / environment requirements, and overrides the abstract `setup` and `register_tools` hooks to wire its SWAIG tools onto the owning agent. - -Construction fails fast (Moo `isa` constraints): `skill_name` / `skill_description` must be non-empty strings, `agent` must be a blessed object, `required_packages` / `required_env_vars` must be arrayrefs, and `params` / `swaig_fields` must be hashrefs. - -**ATTRIBUTES** - -`skill_name`, `skill_description`, `skill_version`, `supports_multiple_instances`, `required_packages`, `required_env_vars`, `agent`, `params`, `swaig_fields`. - -**LICENSE** - -Copyright (c) 2025 SignalWire. Licensed under the MIT License. - -**METHODS** - -- `setup` / `register_tools` — abstract; a subclass **must** override both (the defaults `croak`). - -- `define_tool(%opts)` — register a SWAIG tool on the agent, merging the skill's `swaig_fields` into the definition. - -- `get_hints` / `get_global_data` / `get_prompt_sections` — default no-op contributions a subclass may override; `get_prompt_sections` honours the `skip_prompt` param. - -- `cleanup` — teardown hook (no-op by default). - -- `validate_env_vars` — true iff every `required_env_vars` entry is set in `%ENV`. - -- `get_parameter_schema` — the JSON-schema-ish description of the config params the skill accepts. - -- `get_instance_key` — the registry key for this skill instance (`skill_name`, optionally suffixed by `tool_name`). - -**Synopsis** - -```perl -package SignalWire::Skills::Builtin::MySkill; -use Moo; -extends 'SignalWire::Skills::SkillBase'; -``` - -```perl -has '+skill_name' => ( default => sub { 'my_skill' } ); -has '+skill_description' => ( default => sub { 'Does a thing' } ); -``` - -```perl -sub setup ($self) { ...; return 1; } -sub register_tools ($self) { - $self->define_tool( name => 'do_thing', ... ); -} -``` - -## Signature - -```perl -package SignalWire::Skills::SkillBase -``` - -## See Also - -- SignalWire::Skills::SkillRegistry, SignalWire::Skills::SkillManager, SignalWire::Skills::SkillName. - -## Methods - -### BUILD - -#### Signature - -```perl -sub BUILD() -``` - -#### Source - -[`lib/SignalWire/Skills/SkillBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillBase.pm) - -Line 45. - -*** - -### cleanup - -#### Signature - -```perl -sub cleanup() -``` - -#### Source - -[`lib/SignalWire/Skills/SkillBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillBase.pm) - -Line 87. - -*** - -### define\_tool - -#### Signature - -```perl -sub define_tool() -``` - -#### Source - -[`lib/SignalWire/Skills/SkillBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillBase.pm) - -Line 64. - -*** - -### get\_global\_data - -#### Signature - -```perl -sub get_global_data() -``` - -#### Source - -[`lib/SignalWire/Skills/SkillBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillBase.pm) - -Line 74. - -*** - -### get\_hints - -#### Signature - -```perl -sub get_hints() -``` - -#### Source - -[`lib/SignalWire/Skills/SkillBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillBase.pm) - -Line 70. - -*** - -### get\_instance\_key - -#### Signature - -```perl -sub get_instance_key() -``` - -#### Source - -[`lib/SignalWire/Skills/SkillBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillBase.pm) - -Line 106. - -*** - -### get\_parameter\_schema - -#### Signature - -```perl -sub get_parameter_schema() -``` - -#### Source - -[`lib/SignalWire/Skills/SkillBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillBase.pm) - -Line 98. - -*** - -### get\_prompt\_sections - -#### Signature - -```perl -sub get_prompt_sections() -``` - -#### Source - -[`lib/SignalWire/Skills/SkillBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillBase.pm) - -Line 78. - -*** - -### register\_tools - -#### Signature - -```perl -sub register_tools() -``` - -#### Source - -[`lib/SignalWire/Skills/SkillBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillBase.pm) - -Line 58. - -*** - -### setup - -#### Signature - -```perl -sub setup() -``` - -#### Source - -[`lib/SignalWire/Skills/SkillBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillBase.pm) - -Line 54. - -*** - -### validate\_env\_vars - -#### Signature - -```perl -sub validate_env_vars() -``` - -#### Source - -[`lib/SignalWire/Skills/SkillBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillBase.pm) - -Line 91. - -## Source - -[`lib/SignalWire/Skills/SkillBase.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillBase.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/agents/skills/skill-manager/index.mdx b/fern/products/sdk-reference/perl/agents/skills/skill-manager/index.mdx index 31687f361b..1248125d9c 100644 --- a/fern/products/sdk-reference/perl/agents/skills/skill-manager/index.mdx +++ b/fern/products/sdk-reference/perl/agents/skills/skill-manager/index.mdx @@ -5,16 +5,103 @@ sdk_label: "Perl SDK" icon: "perl" lustri: auto_generated: true - kind: "module" + kind: "class" language: "perl" - qualified_name: "agents.Skills.SkillManager" + qualified_name: "SignalWire::Skills::SkillManager" parent: "agents.Skills" module: "agents.Skills" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillManager.pm" --- # `SkillManager` -## Classes +## Signature - - - +```perl +package SignalWire::Skills::SkillManager +``` + +## Methods + +### has\_skill + +#### Signature + +```perl +sub has_skill($key) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Skills/SkillManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillManager.pm) + +Line 108. + +*** + +### list\_skills + +#### Signature + +```perl +sub list_skills() +``` + +#### Source + +[`lib/SignalWire/Skills/SkillManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillManager.pm) + +Line 103. + +*** + +### load\_skill + +#### Signature + +```perl +sub load_skill($skill_name, $skill_class, $params) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/Skills/SkillManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillManager.pm) + +Line 13. + +*** + +### unload\_skill + +#### Signature + +```perl +sub unload_skill($key) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Skills/SkillManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillManager.pm) + +Line 93. + +## Source + +[`lib/SignalWire/Skills/SkillManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillManager.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/skills/skill-manager/skill-manager/index.mdx b/fern/products/sdk-reference/perl/agents/skills/skill-manager/skill-manager/index.mdx deleted file mode 100644 index b3292f8665..0000000000 --- a/fern/products/sdk-reference/perl/agents/skills/skill-manager/skill-manager/index.mdx +++ /dev/null @@ -1,107 +0,0 @@ ---- -slug: "/reference/perl/agents/skills/skill-manager/skill-manager" -title: "SkillManager" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Skills::SkillManager" - parent: "agents.Skills.SkillManager" - module: "agents.Skills.SkillManager" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillManager.pm" ---- -# `SkillManager` - -## Signature - -```perl -package SignalWire::Skills::SkillManager -``` - -## Methods - -### has\_skill - -#### Signature - -```perl -sub has_skill($key) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Skills/SkillManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillManager.pm) - -Line 108. - -*** - -### list\_skills - -#### Signature - -```perl -sub list_skills() -``` - -#### Source - -[`lib/SignalWire/Skills/SkillManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillManager.pm) - -Line 103. - -*** - -### load\_skill - -#### Signature - -```perl -sub load_skill($skill_name, $skill_class, $params) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/Skills/SkillManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillManager.pm) - -Line 13. - -*** - -### unload\_skill - -#### Signature - -```perl -sub unload_skill($key) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Skills/SkillManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillManager.pm) - -Line 93. - -## Source - -[`lib/SignalWire/Skills/SkillManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillManager.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/agents/skills/skill-name/index.mdx b/fern/products/sdk-reference/perl/agents/skills/skill-name/index.mdx index a5de6412ee..72a860fb8f 100644 --- a/fern/products/sdk-reference/perl/agents/skills/skill-name/index.mdx +++ b/fern/products/sdk-reference/perl/agents/skills/skill-name/index.mdx @@ -5,18 +5,148 @@ sdk_label: "Perl SDK" icon: "perl" lustri: auto_generated: true - kind: "module" + kind: "class" language: "perl" - qualified_name: "agents.Skills.SkillName" + qualified_name: "SignalWire::Skills::SkillName" parent: "agents.Skills" module: "agents.Skills" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillName.pm" --- # `SkillName` -## Classes +The 18 built-in skill names, surfaced as typed, named constants. Each constant's value is the skill's registered wire name — the exact string passed to `SkillRegistry->register_skill` in the matching `SignalWire::Skills::Builtin::*` module. - - - The 18 built-in skill names, surfaced as typed, named constants. Each constant's value is the skill's registered wire name — the exact string passed to `SkillRegistry->register_skill` in the matching `SignalWire::Skills::Builtin::*` module. - - +The constants **are** the canonical wire strings, so nothing about `AgentBase->add_skill` / `remove_skill` / `has_skill` changes: they still take a string. That keeps parity with the Python reference (a bare `str`) and leaves custom / third-party skill names working automatically — an unknown string is simply not in this set. + +This buys a single source of truth for the built-in names (otherwise they live only inside `SkillRegistry::_load_all_builtins` and the test suite), plus editor autocomplete and the membership/iteration helpers below. + +**ALL** + +my $aref = SignalWire::Skills::SkillName->all; + +Arrayref of the 18 built-in skill wire names, sorted so the order matches `SkillRegistry->list_skills`. + +**CONSTANTS** + +Exported on request via Exporter; `:all` pulls every name. The full set: `API_NINJAS_TRIVIA`, `CLAUDE_SKILLS`, `CUSTOM_SKILLS`, `DATASPHERE`, `DATASPHERE_SERVERLESS`, `DATETIME`, `GOOGLE_MAPS`, `INFO_GATHERER`, `JOKE`, `MATH`, `MCP_GATEWAY`, `NATIVE_VECTOR_SEARCH`, `PLAY_BACKGROUND_FILE`, `SPIDER`, `SWML_TRANSFER`, `WEATHER_API`, `WEB_SEARCH`, `WIKIPEDIA_SEARCH`. + +**IS BUILTIN** + +my $bool = SignalWire::Skills::SkillName->is\_builtin($name); + +True if `$name` is one of the built-in skills, false for custom / unknown names. Accepts the bareword constant too. + +**LICENSE** + +Copyright (c) 2025 SignalWire. Licensed under the MIT License. + +**Synopsis** + +```perl +use SignalWire::Skills::SkillName qw(DATETIME); +``` + +```perl +$agent->add_skill( DATETIME ); # imported constant +$agent->add_skill( 'datetime' ); # string (Python parity) +$agent->add_skill( 'my_custom_skill' ); # open set: custom skill +``` + +```perl +# Membership / iteration helpers: +SignalWire::Skills::SkillName->is_builtin('datetime'); # 1 +SignalWire::Skills::SkillName->is_builtin('my_custom'); # 0 +@{ SignalWire::Skills::SkillName->all }; # 18 names +``` + +## Signature + +```perl +package SignalWire::Skills::SkillName +``` + +## See Also + +- SignalWire::Skills::SkillRegistry, SignalWire::Skills::SkillManager, SignalWire::Skills::SkillBase. + +## Constants + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## Methods + +### all + +#### Signature + +```perl +sub all() +``` + +#### Source + +[`lib/SignalWire/Skills/SkillName.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillName.pm) + +Line 101. + +*** + +### is\_builtin + +#### Signature + +```perl +sub is_builtin($class, $name) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Skills/SkillName.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillName.pm) + +Line 108. + +## Source + +[`lib/SignalWire/Skills/SkillName.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillName.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/skills/skill-name/skill-name/index.mdx b/fern/products/sdk-reference/perl/agents/skills/skill-name/skill-name/index.mdx deleted file mode 100644 index 2ae861b123..0000000000 --- a/fern/products/sdk-reference/perl/agents/skills/skill-name/skill-name/index.mdx +++ /dev/null @@ -1,152 +0,0 @@ ---- -slug: "/reference/perl/agents/skills/skill-name/skill-name" -title: "SkillName" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Skills::SkillName" - parent: "agents.Skills.SkillName" - module: "agents.Skills.SkillName" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillName.pm" ---- -# `SkillName` - -The 18 built-in skill names, surfaced as typed, named constants. Each constant's value is the skill's registered wire name — the exact string passed to `SkillRegistry->register_skill` in the matching `SignalWire::Skills::Builtin::*` module. - -The constants **are** the canonical wire strings, so nothing about `AgentBase->add_skill` / `remove_skill` / `has_skill` changes: they still take a string. That keeps parity with the Python reference (a bare `str`) and leaves custom / third-party skill names working automatically — an unknown string is simply not in this set. - -This buys a single source of truth for the built-in names (otherwise they live only inside `SkillRegistry::_load_all_builtins` and the test suite), plus editor autocomplete and the membership/iteration helpers below. - -**ALL** - -my $aref = SignalWire::Skills::SkillName->all; - -Arrayref of the 18 built-in skill wire names, sorted so the order matches `SkillRegistry->list_skills`. - -**CONSTANTS** - -Exported on request via Exporter; `:all` pulls every name. The full set: `API_NINJAS_TRIVIA`, `CLAUDE_SKILLS`, `CUSTOM_SKILLS`, `DATASPHERE`, `DATASPHERE_SERVERLESS`, `DATETIME`, `GOOGLE_MAPS`, `INFO_GATHERER`, `JOKE`, `MATH`, `MCP_GATEWAY`, `NATIVE_VECTOR_SEARCH`, `PLAY_BACKGROUND_FILE`, `SPIDER`, `SWML_TRANSFER`, `WEATHER_API`, `WEB_SEARCH`, `WIKIPEDIA_SEARCH`. - -**IS BUILTIN** - -my $bool = SignalWire::Skills::SkillName->is\_builtin($name); - -True if `$name` is one of the built-in skills, false for custom / unknown names. Accepts the bareword constant too. - -**LICENSE** - -Copyright (c) 2025 SignalWire. Licensed under the MIT License. - -**Synopsis** - -```perl -use SignalWire::Skills::SkillName qw(DATETIME); -``` - -```perl -$agent->add_skill( DATETIME ); # imported constant -$agent->add_skill( 'datetime' ); # string (Python parity) -$agent->add_skill( 'my_custom_skill' ); # open set: custom skill -``` - -```perl -# Membership / iteration helpers: -SignalWire::Skills::SkillName->is_builtin('datetime'); # 1 -SignalWire::Skills::SkillName->is_builtin('my_custom'); # 0 -@{ SignalWire::Skills::SkillName->all }; # 18 names -``` - -## Signature - -```perl -package SignalWire::Skills::SkillName -``` - -## See Also - -- SignalWire::Skills::SkillRegistry, SignalWire::Skills::SkillManager, SignalWire::Skills::SkillBase. - -## Constants - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -## Methods - -### all - -#### Signature - -```perl -sub all() -``` - -#### Source - -[`lib/SignalWire/Skills/SkillName.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillName.pm) - -Line 101. - -*** - -### is\_builtin - -#### Signature - -```perl -sub is_builtin($class, $name) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/Skills/SkillName.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillName.pm) - -Line 108. - -## Source - -[`lib/SignalWire/Skills/SkillName.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillName.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/agents/skills/skill-registry/index.mdx b/fern/products/sdk-reference/perl/agents/skills/skill-registry/index.mdx index 497a4448f3..04519b5a34 100644 --- a/fern/products/sdk-reference/perl/agents/skills/skill-registry/index.mdx +++ b/fern/products/sdk-reference/perl/agents/skills/skill-registry/index.mdx @@ -5,16 +5,143 @@ sdk_label: "Perl SDK" icon: "perl" lustri: auto_generated: true - kind: "module" + kind: "class" language: "perl" - qualified_name: "agents.Skills.SkillRegistry" + qualified_name: "SignalWire::Skills::SkillRegistry" parent: "agents.Skills" module: "agents.Skills" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillRegistry.pm" --- # `SkillRegistry` -## Classes +## Signature - - - +```perl +package SignalWire::Skills::SkillRegistry +``` + +## Methods + +### add\_skill\_directory + +#### Signature + +```perl +sub add_skill_directory($class, $path) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Skills/SkillRegistry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillRegistry.pm) + +Line 118. + +*** + +### clear\_registry + +#### Signature + +```perl +sub clear_registry() +``` + +#### Source + +[`lib/SignalWire/Skills/SkillRegistry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillRegistry.pm) + +Line 106. + +*** + +### get\_all\_skills\_schema + +#### Signature + +```perl +sub get_all_skills_schema() +``` + +#### Source + +[`lib/SignalWire/Skills/SkillRegistry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillRegistry.pm) + +Line 54. + +*** + +### get\_factory + +#### Signature + +```perl +sub get_factory($class, $skill_name) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Skills/SkillRegistry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillRegistry.pm) + +Line 19. + +*** + +### list\_skills + +#### Signature + +```perl +sub list_skills($class) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Skills/SkillRegistry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillRegistry.pm) + +Line 39. + +*** + +### register\_skill + +#### Signature + +```perl +sub register_skill($class, $skill_name, $skill_class) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/Skills/SkillRegistry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillRegistry.pm) + +Line 14. + +## Source + +[`lib/SignalWire/Skills/SkillRegistry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillRegistry.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/skills/skill-registry/skill-registry/index.mdx b/fern/products/sdk-reference/perl/agents/skills/skill-registry/skill-registry/index.mdx deleted file mode 100644 index 5578d87399..0000000000 --- a/fern/products/sdk-reference/perl/agents/skills/skill-registry/skill-registry/index.mdx +++ /dev/null @@ -1,147 +0,0 @@ ---- -slug: "/reference/perl/agents/skills/skill-registry/skill-registry" -title: "SkillRegistry" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Skills::SkillRegistry" - parent: "agents.Skills.SkillRegistry" - module: "agents.Skills.SkillRegistry" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillRegistry.pm" ---- -# `SkillRegistry` - -## Signature - -```perl -package SignalWire::Skills::SkillRegistry -``` - -## Methods - -### add\_skill\_directory - -#### Signature - -```perl -sub add_skill_directory($class, $path) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/Skills/SkillRegistry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillRegistry.pm) - -Line 118. - -*** - -### clear\_registry - -#### Signature - -```perl -sub clear_registry() -``` - -#### Source - -[`lib/SignalWire/Skills/SkillRegistry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillRegistry.pm) - -Line 106. - -*** - -### get\_all\_skills\_schema - -#### Signature - -```perl -sub get_all_skills_schema() -``` - -#### Source - -[`lib/SignalWire/Skills/SkillRegistry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillRegistry.pm) - -Line 54. - -*** - -### get\_factory - -#### Signature - -```perl -sub get_factory($class, $skill_name) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/Skills/SkillRegistry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillRegistry.pm) - -Line 19. - -*** - -### list\_skills - -#### Signature - -```perl -sub list_skills($class) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Skills/SkillRegistry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillRegistry.pm) - -Line 39. - -*** - -### register\_skill - -#### Signature - -```perl -sub register_skill($class, $skill_name, $skill_class) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/Skills/SkillRegistry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillRegistry.pm) - -Line 14. - -## Source - -[`lib/SignalWire/Skills/SkillRegistry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Skills/SkillRegistry.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/agents/swaig/function-result/function-result/index.mdx b/fern/products/sdk-reference/perl/agents/swaig/function-result/function-result/index.mdx deleted file mode 100644 index ec64afeec9..0000000000 --- a/fern/products/sdk-reference/perl/agents/swaig/function-result/function-result/index.mdx +++ /dev/null @@ -1,896 +0,0 @@ ---- -slug: "/reference/perl/agents/swaig/function-result/function-result" -title: "FunctionResult" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::SWAIG::FunctionResult" - parent: "agents.SWAIG.FunctionResult" - module: "agents.SWAIG.FunctionResult" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm" ---- -# `FunctionResult` - -SignalWire::SWAIG::FunctionResult is the Perl port of `signalwire.core.function_result.FunctionResult`. A SWAIG function handler returns one of these to tell the agent what to say and which call-control actions to perform. The action list is serialised to the wire shape the SignalWire AI engine expects. - -Most mutators return `$self` so calls chain fluently. The constructor accepts either `new(response => $text)`, the positional shorthand `new($text)`, or `new($text, post_process => 1)`. - -The class-method payment helpers (`create_payment_prompt`, `create_payment_action`, `create_payment_parameter`) may be invoked as class or instance methods — they build plain hashrefs and hold no state. - -**ADVANCED / RPC** - -`execute_swml`, `execute_rpc`, `rpc_dial`, `rpc_ai_message`, `rpc_ai_unhold`. - -**CALL CONTROL** - -`connect`, `swml_transfer`, `hangup`, `hold`, `wait_for_user`, `stop`, `join_conference`, `join_room`, `sip_refer`, `send_sms`, `pay`. - -**CORE** - -`set_response`, `set_post_process`, `add_action`, `add_actions`. - -**LICENSE** - -Copyright (c) 2025 SignalWire. Licensed under the MIT License. - -**MEDIA** - -`say`, `play_background_file`, `stop_background_file`, `record_call`, `stop_record_call`, `tap`, `stop_tap`. - -**METHODS** - -The surface mirrors the Python reference; see that documentation for the authoritative per-argument contract. Grouped by area: - -**SERIALIZATION** - -`to_hash` (the Python `to_dict` equivalent) and `to_json`. - -**SPEECH AND AI** - -`add_dynamic_hints`, `clear_dynamic_hints`, `set_end_of_speech_timeout`, `set_speech_event_timeout`, `toggle_functions`, `enable_functions_on_timeout`, `enable_extensive_data`, `update_settings`, `simulate_user_input`. - -**STATE AND DATA** - -`update_global_data`, `remove_global_data`, `set_metadata`, `remove_metadata`, `swml_user_event`, `swml_change_step`, `swml_change_context`, `switch_context`, `replace_in_history`. - -**Synopsis** - -```perl -use SignalWire::SWAIG::FunctionResult; -``` - -```perl -# Plain spoken response: -my $result = SignalWire::SWAIG::FunctionResult->new('Order placed.'); -``` - -```perl -# Response plus call-control actions (chainable, fluent style): -my $result = SignalWire::SWAIG::FunctionResult->new - ->set_response('Connecting you now.') - ->connect('+15551234567', final => 1); -``` - -```perl -my $payload = $result->to_hash; # ready for JSON emission -my $json = $result->to_json; -``` - -## Signature - -```perl -package SignalWire::SWAIG::FunctionResult -``` - -## See Also - -- SignalWire::SWAIG::RecordCall, SignalWire::SWAIG::Tap, and SignalWire::SWAIG::JoinConference for the typed closed sets accepted by `record_call`, `tap`, and `join_conference`. - -## Methods - -### add\_action - -#### Signature - -```perl -sub add_action() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 74. - -*** - -### add\_actions - -#### Signature - -```perl -sub add_actions() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 79. - -*** - -### add\_dynamic\_hints - -#### Signature - -```perl -sub add_dynamic_hints() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 301. - -*** - -### clear\_dynamic\_hints - -#### Signature - -```perl -sub clear_dynamic_hints() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 305. - -*** - -### connect - -#### Signature - -```perl -sub connect() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 86. - -*** - -### create\_payment\_action - -#### Signature - -```perl -sub create_payment_action() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 719. - -*** - -### create\_payment\_parameter - -#### Signature - -```perl -sub create_payment_parameter() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 723. - -*** - -### create\_payment\_prompt - -#### Signature - -```perl -sub create_payment_prompt() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 703. - -*** - -### enable\_extensive\_data - -#### Signature - -```perl -sub enable_extensive_data() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 327. - -*** - -### enable\_functions\_on\_timeout - -#### Signature - -```perl -sub enable_functions_on_timeout() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 322. - -*** - -### execute\_rpc - -#### Signature - -```perl -sub execute_rpc() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 628. - -*** - -### execute\_swml - -#### Signature - -```perl -sub execute_swml() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 338. - -*** - -### hangup - -#### Signature - -```perl -sub hangup() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 127. - -*** - -### hold - -#### Signature - -```perl -sub hold() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 131. - -*** - -### join\_conference - -#### Signature - -```perl -sub join_conference() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 374. - -*** - -### join\_room - -#### Signature - -```perl -sub join_room() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 486. - -*** - -### pay - -#### Signature - -```perl -sub pay() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 573. - -*** - -### play\_background\_file - -#### Signature - -```perl -sub play_background_file() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 227. - -*** - -### record\_call - -#### Signature - -```perl -sub record_call() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 239. - -*** - -### remove\_global\_data - -#### Signature - -```perl -sub remove_global_data() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 166. - -*** - -### remove\_metadata - -#### Signature - -```perl -sub remove_metadata() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 174. - -*** - -### replace\_in\_history - -#### Signature - -```perl -sub replace_in_history() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 216. - -*** - -### rpc\_ai\_message - -#### Signature - -```perl -sub rpc_ai_message() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 672. - -*** - -### rpc\_ai\_unhold - -#### Signature - -```perl -sub rpc_ai_unhold() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 687. - -*** - -### rpc\_dial - -#### Signature - -```perl -sub rpc_dial() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 651. - -*** - -### say - -#### Signature - -```perl -sub say() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 223. - -*** - -### send\_sms - -#### Signature - -```perl -sub send_sms() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 544. - -*** - -### set\_end\_of\_speech\_timeout - -#### Signature - -```perl -sub set_end_of_speech_timeout() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 310. - -*** - -### set\_metadata - -#### Signature - -```perl -sub set_metadata() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 170. - -*** - -### set\_post\_process - -#### Signature - -```perl -sub set_post_process() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 69. - -*** - -### set\_response - -#### Signature - -```perl -sub set_response() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 64. - -*** - -### set\_speech\_event\_timeout - -#### Signature - -```perl -sub set_speech_event_timeout() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 314. - -*** - -### simulate\_user\_input - -#### Signature - -```perl -sub simulate_user_input() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 697. - -*** - -### sip\_refer - -#### Signature - -```perl -sub sip_refer() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 494. - -*** - -### stop - -#### Signature - -```perl -sub stop() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 156. - -*** - -### stop\_background\_file - -#### Signature - -```perl -sub stop_background_file() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 235. - -*** - -### stop\_record\_call - -#### Signature - -```perl -sub stop_record_call() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 287. - -*** - -### stop\_tap - -#### Signature - -```perl -sub stop_tap() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 532. - -*** - -### switch\_context - -#### Signature - -```perl -sub switch_context() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 198. - -*** - -### swml\_change\_context - -#### Signature - -```perl -sub swml_change_context() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 194. - -*** - -### swml\_change\_step - -#### Signature - -```perl -sub swml_change_step() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 190. - -*** - -### swml\_transfer - -#### Signature - -```perl -sub swml_transfer() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 107. - -*** - -### swml\_user\_event - -#### Signature - -```perl -sub swml_user_event() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 178. - -*** - -### tap - -#### Signature - -```perl -sub tap() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 502. - -*** - -### to\_hash - -#### Signature - -```perl -sub to_hash() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 729. - -*** - -### to\_json - -#### Signature - -```perl -sub to_json() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 747. - -*** - -### toggle\_functions - -#### Signature - -```perl -sub toggle_functions() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 318. - -*** - -### update\_global\_data - -#### Signature - -```perl -sub update_global_data() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 162. - -*** - -### update\_settings - -#### Signature - -```perl -sub update_settings() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 332. - -*** - -### wait\_for\_user - -#### Signature - -```perl -sub wait_for_user() -``` - -#### Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 138. - -## Source - -[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/agents/swaig/function-result/index.mdx b/fern/products/sdk-reference/perl/agents/swaig/function-result/index.mdx index 07c2f400a1..bace2f4bcb 100644 --- a/fern/products/sdk-reference/perl/agents/swaig/function-result/index.mdx +++ b/fern/products/sdk-reference/perl/agents/swaig/function-result/index.mdx @@ -5,18 +5,892 @@ sdk_label: "Perl SDK" icon: "perl" lustri: auto_generated: true - kind: "module" + kind: "class" language: "perl" - qualified_name: "agents.SWAIG.FunctionResult" + qualified_name: "SignalWire::SWAIG::FunctionResult" parent: "agents.SWAIG" module: "agents.SWAIG" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm" --- # `FunctionResult` -## Classes +SignalWire::SWAIG::FunctionResult is the Perl port of `signalwire.core.function_result.FunctionResult`. A SWAIG function handler returns one of these to tell the agent what to say and which call-control actions to perform. The action list is serialised to the wire shape the SignalWire AI engine expects. - - - SignalWire::SWAIG::FunctionResult is the Perl port of `signalwire.core.function_result.FunctionResult`. A SWAIG function handler returns one of these to tell the agent what to say and which call-control actions to perform. The action list is serialised to the wire shape the SignalWire AI engine expects. - - +Most mutators return `$self` so calls chain fluently. The constructor accepts either `new(response => $text)`, the positional shorthand `new($text)`, or `new($text, post_process => 1)`. + +The class-method payment helpers (`create_payment_prompt`, `create_payment_action`, `create_payment_parameter`) may be invoked as class or instance methods — they build plain hashrefs and hold no state. + +**ADVANCED / RPC** + +`execute_swml`, `execute_rpc`, `rpc_dial`, `rpc_ai_message`, `rpc_ai_unhold`. + +**CALL CONTROL** + +`connect`, `swml_transfer`, `hangup`, `hold`, `wait_for_user`, `stop`, `join_conference`, `join_room`, `sip_refer`, `send_sms`, `pay`. + +**CORE** + +`set_response`, `set_post_process`, `add_action`, `add_actions`. + +**LICENSE** + +Copyright (c) 2025 SignalWire. Licensed under the MIT License. + +**MEDIA** + +`say`, `play_background_file`, `stop_background_file`, `record_call`, `stop_record_call`, `tap`, `stop_tap`. + +**METHODS** + +The surface mirrors the Python reference; see that documentation for the authoritative per-argument contract. Grouped by area: + +**SERIALIZATION** + +`to_hash` (the Python `to_dict` equivalent) and `to_json`. + +**SPEECH AND AI** + +`add_dynamic_hints`, `clear_dynamic_hints`, `set_end_of_speech_timeout`, `set_speech_event_timeout`, `toggle_functions`, `enable_functions_on_timeout`, `enable_extensive_data`, `update_settings`, `simulate_user_input`. + +**STATE AND DATA** + +`update_global_data`, `remove_global_data`, `set_metadata`, `remove_metadata`, `swml_user_event`, `swml_change_step`, `swml_change_context`, `switch_context`, `replace_in_history`. + +**Synopsis** + +```perl +use SignalWire::SWAIG::FunctionResult; +``` + +```perl +# Plain spoken response: +my $result = SignalWire::SWAIG::FunctionResult->new('Order placed.'); +``` + +```perl +# Response plus call-control actions (chainable, fluent style): +my $result = SignalWire::SWAIG::FunctionResult->new + ->set_response('Connecting you now.') + ->connect('+15551234567', final => 1); +``` + +```perl +my $payload = $result->to_hash; # ready for JSON emission +my $json = $result->to_json; +``` + +## Signature + +```perl +package SignalWire::SWAIG::FunctionResult +``` + +## See Also + +- SignalWire::SWAIG::RecordCall, SignalWire::SWAIG::Tap, and SignalWire::SWAIG::JoinConference for the typed closed sets accepted by `record_call`, `tap`, and `join_conference`. + +## Methods + +### add\_action + +#### Signature + +```perl +sub add_action() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 74. + +*** + +### add\_actions + +#### Signature + +```perl +sub add_actions() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 79. + +*** + +### add\_dynamic\_hints + +#### Signature + +```perl +sub add_dynamic_hints() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 301. + +*** + +### clear\_dynamic\_hints + +#### Signature + +```perl +sub clear_dynamic_hints() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 305. + +*** + +### connect + +#### Signature + +```perl +sub connect() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 86. + +*** + +### create\_payment\_action + +#### Signature + +```perl +sub create_payment_action() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 719. + +*** + +### create\_payment\_parameter + +#### Signature + +```perl +sub create_payment_parameter() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 723. + +*** + +### create\_payment\_prompt + +#### Signature + +```perl +sub create_payment_prompt() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 703. + +*** + +### enable\_extensive\_data + +#### Signature + +```perl +sub enable_extensive_data() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 327. + +*** + +### enable\_functions\_on\_timeout + +#### Signature + +```perl +sub enable_functions_on_timeout() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 322. + +*** + +### execute\_rpc + +#### Signature + +```perl +sub execute_rpc() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 628. + +*** + +### execute\_swml + +#### Signature + +```perl +sub execute_swml() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 338. + +*** + +### hangup + +#### Signature + +```perl +sub hangup() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 127. + +*** + +### hold + +#### Signature + +```perl +sub hold() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 131. + +*** + +### join\_conference + +#### Signature + +```perl +sub join_conference() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 374. + +*** + +### join\_room + +#### Signature + +```perl +sub join_room() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 486. + +*** + +### pay + +#### Signature + +```perl +sub pay() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 573. + +*** + +### play\_background\_file + +#### Signature + +```perl +sub play_background_file() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 227. + +*** + +### record\_call + +#### Signature + +```perl +sub record_call() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 239. + +*** + +### remove\_global\_data + +#### Signature + +```perl +sub remove_global_data() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 166. + +*** + +### remove\_metadata + +#### Signature + +```perl +sub remove_metadata() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 174. + +*** + +### replace\_in\_history + +#### Signature + +```perl +sub replace_in_history() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 216. + +*** + +### rpc\_ai\_message + +#### Signature + +```perl +sub rpc_ai_message() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 672. + +*** + +### rpc\_ai\_unhold + +#### Signature + +```perl +sub rpc_ai_unhold() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 687. + +*** + +### rpc\_dial + +#### Signature + +```perl +sub rpc_dial() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 651. + +*** + +### say + +#### Signature + +```perl +sub say() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 223. + +*** + +### send\_sms + +#### Signature + +```perl +sub send_sms() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 544. + +*** + +### set\_end\_of\_speech\_timeout + +#### Signature + +```perl +sub set_end_of_speech_timeout() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 310. + +*** + +### set\_metadata + +#### Signature + +```perl +sub set_metadata() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 170. + +*** + +### set\_post\_process + +#### Signature + +```perl +sub set_post_process() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 69. + +*** + +### set\_response + +#### Signature + +```perl +sub set_response() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 64. + +*** + +### set\_speech\_event\_timeout + +#### Signature + +```perl +sub set_speech_event_timeout() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 314. + +*** + +### simulate\_user\_input + +#### Signature + +```perl +sub simulate_user_input() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 697. + +*** + +### sip\_refer + +#### Signature + +```perl +sub sip_refer() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 494. + +*** + +### stop + +#### Signature + +```perl +sub stop() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 156. + +*** + +### stop\_background\_file + +#### Signature + +```perl +sub stop_background_file() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 235. + +*** + +### stop\_record\_call + +#### Signature + +```perl +sub stop_record_call() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 287. + +*** + +### stop\_tap + +#### Signature + +```perl +sub stop_tap() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 532. + +*** + +### switch\_context + +#### Signature + +```perl +sub switch_context() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 198. + +*** + +### swml\_change\_context + +#### Signature + +```perl +sub swml_change_context() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 194. + +*** + +### swml\_change\_step + +#### Signature + +```perl +sub swml_change_step() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 190. + +*** + +### swml\_transfer + +#### Signature + +```perl +sub swml_transfer() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 107. + +*** + +### swml\_user\_event + +#### Signature + +```perl +sub swml_user_event() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 178. + +*** + +### tap + +#### Signature + +```perl +sub tap() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 502. + +*** + +### to\_hash + +#### Signature + +```perl +sub to_hash() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 729. + +*** + +### to\_json + +#### Signature + +```perl +sub to_json() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 747. + +*** + +### toggle\_functions + +#### Signature + +```perl +sub toggle_functions() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 318. + +*** + +### update\_global\_data + +#### Signature + +```perl +sub update_global_data() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 162. + +*** + +### update\_settings + +#### Signature + +```perl +sub update_settings() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 332. + +*** + +### wait\_for\_user + +#### Signature + +```perl +sub wait_for_user() +``` + +#### Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 138. + +## Source + +[`lib/SignalWire/SWAIG/FunctionResult.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/FunctionResult.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/swaig/index.mdx b/fern/products/sdk-reference/perl/agents/swaig/index.mdx index 3b0239287b..f085a03451 100644 --- a/fern/products/sdk-reference/perl/agents/swaig/index.mdx +++ b/fern/products/sdk-reference/perl/agents/swaig/index.mdx @@ -13,16 +13,26 @@ lustri: --- # `SWAIG` -## Modules +## Classes - + + SignalWire::SWAIG::FunctionResult is the Perl port of `signalwire.core.function_result.FunctionResult`. A SWAIG function handler returns one of these to tell the agent what to say and which call-control actions to perform. The action list is serialised to the wire shape the SignalWire AI engine expects. + - + + The four closed-set string parameters of SignalWire::SWAIG::FunctionResult's `join_conference` verb, surfaced as typed, named constants: + - + + A SWAIG tool's argument schema is the JSON-Schema `parameters` object that SignalWire::Agent::AgentBase's `define_tool` renders into the SWAIG function block. It is normally written by hand as nested hashrefs. This class builds the **exact same hashref** through a fluent, named, typed API: `->to_hash` returns the identical `{ type => 'object', properties => {...}, required => [...] }` structure a hand-written literal produces, byte for byte (`required` is omitted when no property was marked required, just as hand-written schemas omit it). + - + + The two closed-set string parameters of SignalWire::SWAIG::FunctionResult's `record_call` verb, surfaced as typed, named constants: + - + + The two closed-set string parameters of SignalWire::SWAIG::FunctionResult's `tap` verb, surfaced as typed, named constants: + diff --git a/fern/products/sdk-reference/perl/agents/swaig/join-conference/index.mdx b/fern/products/sdk-reference/perl/agents/swaig/join-conference/index.mdx index 18c5676add..c585111308 100644 --- a/fern/products/sdk-reference/perl/agents/swaig/join-conference/index.mdx +++ b/fern/products/sdk-reference/perl/agents/swaig/join-conference/index.mdx @@ -5,18 +5,276 @@ sdk_label: "Perl SDK" icon: "perl" lustri: auto_generated: true - kind: "module" + kind: "class" language: "perl" - qualified_name: "agents.SWAIG.JoinConference" + qualified_name: "SignalWire::SWAIG::JoinConference" parent: "agents.SWAIG" module: "agents.SWAIG" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/JoinConference.pm" --- # `JoinConference` -## Classes +The four closed-set string parameters of SignalWire::SWAIG::FunctionResult's `join_conference` verb, surfaced as typed, named constants: - - - The four closed-set string parameters of SignalWire::SWAIG::FunctionResult's `join_conference` verb, surfaced as typed, named constants: - - +- **BEEP** — beep behaviour: `true`, `false`, `onEnter`, or `onExit`. + +- **RECORD** — recording mode: `do-not-record` or `record-from-start`. + +- **TRIM** — silence trimming: `trim-silence` or `do-not-trim`. + +- **METHOD** — HTTP method for the status / recording-status callbacks: `GET` or `POST` (shared by `status_callback_method` and `recording_status_callback_method`). + +`join_conference` validates each inline and dies on anything outside the set, reproducing the Python reference's exact `ValueError` messages (e.g. `beep must be one of ['true', 'false', 'onEnter', 'onExit']`). This module hoists those literal sets into a single source of truth so the accepted values are discoverable and autocompletable. The constants **are** the canonical wire strings, so `join_conference`'s signature is unchanged, preserving Python parity. + +The constant **names** use shouting identifiers (`ON_ENTER`); the **values** are the camelCase wire strings the SWML verb expects (`onEnter`). + +**BEEPS / RECORDS / TRIMS / METHODS** + +my $aref = SignalWire::SWAIG::JoinConference->beeps; +my $aref = SignalWire::SWAIG::JoinConference->records; +my $aref = SignalWire::SWAIG::JoinConference->trims; +my $aref = SignalWire::SWAIG::JoinConference->methods; + +Arrayrefs of the accepted strings for each set, in the order `join_conference` lists them in its validation messages. + +**CONSTANTS** + +Exported on request via Exporter. Tags: `:beep`, `:record`, `:trim`, `:methods`, and `:all`. + +```perl +BEEP_TRUE => 'true' DO_NOT_RECORD => 'do-not-record' +BEEP_FALSE => 'false' RECORD_FROM_START => 'record-from-start' +ON_ENTER => 'onEnter' TRIM_SILENCE => 'trim-silence' +ON_EXIT => 'onExit' DO_NOT_TRIM => 'do-not-trim' +GET => 'GET' POST => 'POST' +``` + +**IS BEEP / IS RECORD / IS TRIM / IS METHOD** + +my $bool = SignalWire::SWAIG::JoinConference->is\_beep($value); +my $bool = SignalWire::SWAIG::JoinConference->is\_record($value); +my $bool = SignalWire::SWAIG::JoinConference->is\_trim($value); +my $bool = SignalWire::SWAIG::JoinConference->is\_method($value); + +True if `$value` is an accepted member of the corresponding set. Each accepts the bareword constant too (it is just the string). + +**LICENSE** + +Copyright (c) 2025 SignalWire. Licensed under the MIT License. + +**Synopsis** + +```perl +use SignalWire::SWAIG::JoinConference qw(ON_ENTER RECORD_FROM_START); +use SignalWire::SWAIG::FunctionResult; +``` + +```perl +my $result = SignalWire::SWAIG::FunctionResult->new; +``` + +```perl +# Named constants and bare wire strings are interchangeable: +$result->join_conference( 'lobby', + beep => ON_ENTER, + record => RECORD_FROM_START ); +$result->join_conference( 'lobby', + beep => 'onEnter', + record => 'record-from-start' ); +``` + +```perl +# Membership / iteration helpers: +SignalWire::SWAIG::JoinConference->is_beep('onEnter'); # 1 +@{ SignalWire::SWAIG::JoinConference->records }; # do-not-record,... +``` + +## Signature + +```perl +package SignalWire::SWAIG::JoinConference +``` + +## See Also + +- SignalWire::SWAIG::FunctionResult, SignalWire::SWAIG::RecordCall, SignalWire::SWAIG::Tap. + +## Constants + + + + + + + + + + + + + + + + + + + + + +## Methods + +### beeps + +#### Signature + +```perl +sub beeps() +``` + +#### Source + +[`lib/SignalWire/SWAIG/JoinConference.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/JoinConference.pm) + +Line 104. + +*** + +### is\_beep + +#### Signature + +```perl +sub is_beep($class, $value) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/SWAIG/JoinConference.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/JoinConference.pm) + +Line 117. + +*** + +### is\_method + +#### Signature + +```perl +sub is_method($class, $value) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/SWAIG/JoinConference.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/JoinConference.pm) + +Line 141. + +*** + +### is\_record + +#### Signature + +```perl +sub is_record($class, $value) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/SWAIG/JoinConference.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/JoinConference.pm) + +Line 125. + +*** + +### is\_trim + +#### Signature + +```perl +sub is_trim($class, $value) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/SWAIG/JoinConference.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/JoinConference.pm) + +Line 133. + +*** + +### methods + +#### Signature + +```perl +sub methods() +``` + +#### Source + +[`lib/SignalWire/SWAIG/JoinConference.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/JoinConference.pm) + +Line 113. + +*** + +### records + +#### Signature + +```perl +sub records() +``` + +#### Source + +[`lib/SignalWire/SWAIG/JoinConference.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/JoinConference.pm) + +Line 107. + +*** + +### trims + +#### Signature + +```perl +sub trims() +``` + +#### Source + +[`lib/SignalWire/SWAIG/JoinConference.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/JoinConference.pm) + +Line 110. + +## Source + +[`lib/SignalWire/SWAIG/JoinConference.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/JoinConference.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/swaig/join-conference/join-conference/index.mdx b/fern/products/sdk-reference/perl/agents/swaig/join-conference/join-conference/index.mdx deleted file mode 100644 index 7ca1cac199..0000000000 --- a/fern/products/sdk-reference/perl/agents/swaig/join-conference/join-conference/index.mdx +++ /dev/null @@ -1,280 +0,0 @@ ---- -slug: "/reference/perl/agents/swaig/join-conference/join-conference" -title: "JoinConference" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::SWAIG::JoinConference" - parent: "agents.SWAIG.JoinConference" - module: "agents.SWAIG.JoinConference" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/JoinConference.pm" ---- -# `JoinConference` - -The four closed-set string parameters of SignalWire::SWAIG::FunctionResult's `join_conference` verb, surfaced as typed, named constants: - -- **BEEP** — beep behaviour: `true`, `false`, `onEnter`, or `onExit`. - -- **RECORD** — recording mode: `do-not-record` or `record-from-start`. - -- **TRIM** — silence trimming: `trim-silence` or `do-not-trim`. - -- **METHOD** — HTTP method for the status / recording-status callbacks: `GET` or `POST` (shared by `status_callback_method` and `recording_status_callback_method`). - -`join_conference` validates each inline and dies on anything outside the set, reproducing the Python reference's exact `ValueError` messages (e.g. `beep must be one of ['true', 'false', 'onEnter', 'onExit']`). This module hoists those literal sets into a single source of truth so the accepted values are discoverable and autocompletable. The constants **are** the canonical wire strings, so `join_conference`'s signature is unchanged, preserving Python parity. - -The constant **names** use shouting identifiers (`ON_ENTER`); the **values** are the camelCase wire strings the SWML verb expects (`onEnter`). - -**BEEPS / RECORDS / TRIMS / METHODS** - -my $aref = SignalWire::SWAIG::JoinConference->beeps; -my $aref = SignalWire::SWAIG::JoinConference->records; -my $aref = SignalWire::SWAIG::JoinConference->trims; -my $aref = SignalWire::SWAIG::JoinConference->methods; - -Arrayrefs of the accepted strings for each set, in the order `join_conference` lists them in its validation messages. - -**CONSTANTS** - -Exported on request via Exporter. Tags: `:beep`, `:record`, `:trim`, `:methods`, and `:all`. - -```perl -BEEP_TRUE => 'true' DO_NOT_RECORD => 'do-not-record' -BEEP_FALSE => 'false' RECORD_FROM_START => 'record-from-start' -ON_ENTER => 'onEnter' TRIM_SILENCE => 'trim-silence' -ON_EXIT => 'onExit' DO_NOT_TRIM => 'do-not-trim' -GET => 'GET' POST => 'POST' -``` - -**IS BEEP / IS RECORD / IS TRIM / IS METHOD** - -my $bool = SignalWire::SWAIG::JoinConference->is\_beep($value); -my $bool = SignalWire::SWAIG::JoinConference->is\_record($value); -my $bool = SignalWire::SWAIG::JoinConference->is\_trim($value); -my $bool = SignalWire::SWAIG::JoinConference->is\_method($value); - -True if `$value` is an accepted member of the corresponding set. Each accepts the bareword constant too (it is just the string). - -**LICENSE** - -Copyright (c) 2025 SignalWire. Licensed under the MIT License. - -**Synopsis** - -```perl -use SignalWire::SWAIG::JoinConference qw(ON_ENTER RECORD_FROM_START); -use SignalWire::SWAIG::FunctionResult; -``` - -```perl -my $result = SignalWire::SWAIG::FunctionResult->new; -``` - -```perl -# Named constants and bare wire strings are interchangeable: -$result->join_conference( 'lobby', - beep => ON_ENTER, - record => RECORD_FROM_START ); -$result->join_conference( 'lobby', - beep => 'onEnter', - record => 'record-from-start' ); -``` - -```perl -# Membership / iteration helpers: -SignalWire::SWAIG::JoinConference->is_beep('onEnter'); # 1 -@{ SignalWire::SWAIG::JoinConference->records }; # do-not-record,... -``` - -## Signature - -```perl -package SignalWire::SWAIG::JoinConference -``` - -## See Also - -- SignalWire::SWAIG::FunctionResult, SignalWire::SWAIG::RecordCall, SignalWire::SWAIG::Tap. - -## Constants - - - - - - - - - - - - - - - - - - - - - -## Methods - -### beeps - -#### Signature - -```perl -sub beeps() -``` - -#### Source - -[`lib/SignalWire/SWAIG/JoinConference.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/JoinConference.pm) - -Line 104. - -*** - -### is\_beep - -#### Signature - -```perl -sub is_beep($class, $value) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/SWAIG/JoinConference.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/JoinConference.pm) - -Line 117. - -*** - -### is\_method - -#### Signature - -```perl -sub is_method($class, $value) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/SWAIG/JoinConference.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/JoinConference.pm) - -Line 141. - -*** - -### is\_record - -#### Signature - -```perl -sub is_record($class, $value) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/SWAIG/JoinConference.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/JoinConference.pm) - -Line 125. - -*** - -### is\_trim - -#### Signature - -```perl -sub is_trim($class, $value) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/SWAIG/JoinConference.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/JoinConference.pm) - -Line 133. - -*** - -### methods - -#### Signature - -```perl -sub methods() -``` - -#### Source - -[`lib/SignalWire/SWAIG/JoinConference.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/JoinConference.pm) - -Line 113. - -*** - -### records - -#### Signature - -```perl -sub records() -``` - -#### Source - -[`lib/SignalWire/SWAIG/JoinConference.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/JoinConference.pm) - -Line 107. - -*** - -### trims - -#### Signature - -```perl -sub trims() -``` - -#### Source - -[`lib/SignalWire/SWAIG/JoinConference.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/JoinConference.pm) - -Line 110. - -## Source - -[`lib/SignalWire/SWAIG/JoinConference.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/JoinConference.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/agents/swaig/parameter-schema/index.mdx b/fern/products/sdk-reference/perl/agents/swaig/parameter-schema/index.mdx index 67d37c409b..50f0b0b00b 100644 --- a/fern/products/sdk-reference/perl/agents/swaig/parameter-schema/index.mdx +++ b/fern/products/sdk-reference/perl/agents/swaig/parameter-schema/index.mdx @@ -5,18 +5,285 @@ sdk_label: "Perl SDK" icon: "perl" lustri: auto_generated: true - kind: "module" + kind: "class" language: "perl" - qualified_name: "agents.SWAIG.ParameterSchema" + qualified_name: "SignalWire::SWAIG::ParameterSchema" parent: "agents.SWAIG" module: "agents.SWAIG" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/ParameterSchema.pm" --- # `ParameterSchema` -## Classes +A SWAIG tool's argument schema is the JSON-Schema `parameters` object that SignalWire::Agent::AgentBase's `define_tool` renders into the SWAIG function block. It is normally written by hand as nested hashrefs. This class builds the **exact same hashref** through a fluent, named, typed API: `->to_hash` returns the identical `{ type => 'object', properties => {...}, required => [...] }` structure a hand-written literal produces, byte for byte (`required` is omitted when no property was marked required, just as hand-written schemas omit it). - - - A SWAIG tool's argument schema is the JSON-Schema `parameters` object that SignalWire::Agent::AgentBase's `define_tool` renders into the SWAIG function block. It is normally written by hand as nested hashrefs. This class builds the **exact same hashref** through a fluent, named, typed API: `->to_hash` returns the identical `{ type => 'object', properties => {...}, required => [...] }` structure a hand-written literal produces, byte for byte (`required` is omitted when no property was marked required, just as hand-written schemas omit it). - - +It is a **convenience over the same wire output, not a new format**. The untyped-hashref path into `define_tool` is unchanged and still accepted, so Python parity and every existing caller keep working; the builder is purely additive (see PORT\_ADDITIONS.md). This is the Perl realisation of the cross-port Tier-2 flagship idiom: a typed SWAIG tool-parameter builder. + +**LICENSE** + +Copyright (c) 2025 SignalWire. Licensed under the MIT License. + +**MARKING REQUIRED FIELDS** + +- `->required(@names)` — mark already-declared properties required. Accumulates across calls and de-duplicates on emit, preserving first-seen order. Equivalent to passing `required => 1` on each kind call. + +**NEW** + +my $schema = SignalWire::SWAIG::ParameterSchema->new; + +Construct an empty builder. + +**PROPERTY KINDS** + +Each kind method has the form `->KIND($name, $description, %opts)` and returns `$self` so calls chain. The `$description` second positional is the LLM-facing prompt text (it may also be given as `description => ...` in `%opts`). `%opts` carries the optional facets: `required => 1` (shorthand for also calling `->required($name)`), `default => ...`, `enum => [...]`, `format => ...`, and any other JSON-Schema keyword, emitted verbatim in caller-given order. + +- `->string($name, $desc, %opts)` — `{ type => 'string' }`. + +- `->number($name, $desc, %opts)` — `{ type => 'number' }`. + +- `->integer($name, $desc, %opts)` — `{ type => 'integer' }`. + +- `->boolean($name, $desc, %opts)` — `{ type => 'boolean' }`. + +- `->enum($name, $values, $desc, %opts)` — a closed-set string, `{ type => 'string', enum => [ @$values ] }`. `$values` is an arrayref of accepted values; pass a Tier-1 constant set directly (`SignalWire::SWAIG::RecordCall->formats`, `SignalWire::SWAIG::Tap->codecs`, ...) so the schema's `enum` is single-sourced from the same closed set the verb validates against. Pass `type => 'integer'` in `%opts` for a numeric enum. + +- `->array($name, $desc, %opts)` — `{ type => 'array' }`, with an optional `of => ...` element spec rendered as `items`. `of` may be a kind-name string (`'string'`, `'object'`, ...), a nested `ParameterSchema`, or a raw hashref items schema. Omit `of` for an untyped array. + +- `->object($name, $desc, %opts)` — `{ type => 'object' }`, with an optional `properties => ...` nested spec. `properties` may be a nested `ParameterSchema`, a coderef called with a fresh child schema, or a raw hashref. The nested `properties`/`required` are spliced in. Omit `properties` for an open object. + +**REQUIRED** + +$schema->required('a', 'b'); + +Mark properties required. See \["Marking required fields"]\(Marking required fields). Returns `$self`. + +**STRING / NUMBER / INTEGER / BOOLEAN / ENUM / ARRAY / OBJECT** + +Add a property of the named kind. See \["Property kinds"]\(Property kinds). Each returns `$self`. Dies on a duplicate property name. + +**TO DICT** + +Alias for "to\_hash", matching the SDK's serialiser naming. Identical output. + +**TO HASH** + +my $params = $schema->to\_hash; + +Render the JSON-Schema `parameters` hashref. `required` is omitted when empty. The result is is\_deeply- and JSON-identical to the equivalent hand-written literal and shares no references with the builder's internal state. + +**Synopsis** + +```perl +use SignalWire::SWAIG::ParameterSchema; +use SignalWire::SWAIG::RecordCall; +``` + +```perl +my $params = SignalWire::SWAIG::ParameterSchema->new + ->string('service', 'The service to book') + ->string('date', 'Appointment date, YYYY-MM-DD') + ->enum('format', SignalWire::SWAIG::RecordCall->formats, + 'Recording container format') + ->integer('seats', 'How many seats', default => 1) + ->required('service', 'date') + ->to_hash; +``` + +```perl +# $params is the SAME hashref you would have hand-written: +# { +# type => 'object', +# properties => { +# service => { type => 'string', description => 'The service to book' }, +# date => { type => 'string', description => 'Appointment date, YYYY-MM-DD' }, +# format => { type => 'string', description => 'Recording container format', +# enum => ['wav','mp3','mp4'] }, +# seats => { type => 'integer', description => 'How many seats', default => 1 }, +# }, +# required => ['service','date'], +# } +``` + +```perl +$agent->define_tool( + name => 'book_appointment', + description => 'Book an appointment for a service on a date.', + parameters => $params, # typed-built, same wire shape + handler => sub { ... }, +); +``` + +## Signature + +```perl +package SignalWire::SWAIG::ParameterSchema +``` + +## See Also + +- SignalWire::Agent::AgentBase (`define_tool`), SignalWire::SWML::Service (`define_tool`), SignalWire::SWAIG::RecordCall, SignalWire::SWAIG::Tap (Tier-1 closed-set constant sets that drop into `->enum`), SignalWire::POM::Section (sibling Tier-2 typed-builder idiom). + +## Methods + +### array + +#### Signature + +```perl +sub array() +``` + +#### Source + +[`lib/SignalWire/SWAIG/ParameterSchema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/ParameterSchema.pm) + +Line 149. + +*** + +### boolean + +#### Signature + +```perl +sub boolean() +``` + +#### Source + +[`lib/SignalWire/SWAIG/ParameterSchema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/ParameterSchema.pm) + +Line 118. + +*** + +### enum + +#### Signature + +```perl +sub enum() +``` + +#### Source + +[`lib/SignalWire/SWAIG/ParameterSchema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/ParameterSchema.pm) + +Line 129. + +*** + +### integer + +#### Signature + +```perl +sub integer() +``` + +#### Source + +[`lib/SignalWire/SWAIG/ParameterSchema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/ParameterSchema.pm) + +Line 113. + +*** + +### number + +#### Signature + +```perl +sub number() +``` + +#### Source + +[`lib/SignalWire/SWAIG/ParameterSchema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/ParameterSchema.pm) + +Line 108. + +*** + +### object + +#### Signature + +```perl +sub object() +``` + +#### Source + +[`lib/SignalWire/SWAIG/ParameterSchema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/ParameterSchema.pm) + +Line 176. + +*** + +### required + +#### Signature + +```perl +sub required() +``` + +#### Source + +[`lib/SignalWire/SWAIG/ParameterSchema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/ParameterSchema.pm) + +Line 189. + +*** + +### string + +#### Signature + +```perl +sub string() +``` + +#### Source + +[`lib/SignalWire/SWAIG/ParameterSchema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/ParameterSchema.pm) + +Line 103. + +*** + +### to\_dict + +#### Signature + +```perl +sub to_dict() +``` + +#### Source + +[`lib/SignalWire/SWAIG/ParameterSchema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/ParameterSchema.pm) + +Line 230. + +*** + +### to\_hash + +#### Signature + +```perl +sub to_hash() +``` + +#### Source + +[`lib/SignalWire/SWAIG/ParameterSchema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/ParameterSchema.pm) + +Line 210. + +## Source + +[`lib/SignalWire/SWAIG/ParameterSchema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/ParameterSchema.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/swaig/parameter-schema/parameter-schema/index.mdx b/fern/products/sdk-reference/perl/agents/swaig/parameter-schema/parameter-schema/index.mdx deleted file mode 100644 index 2be79fb5a9..0000000000 --- a/fern/products/sdk-reference/perl/agents/swaig/parameter-schema/parameter-schema/index.mdx +++ /dev/null @@ -1,289 +0,0 @@ ---- -slug: "/reference/perl/agents/swaig/parameter-schema/parameter-schema" -title: "ParameterSchema" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::SWAIG::ParameterSchema" - parent: "agents.SWAIG.ParameterSchema" - module: "agents.SWAIG.ParameterSchema" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/ParameterSchema.pm" ---- -# `ParameterSchema` - -A SWAIG tool's argument schema is the JSON-Schema `parameters` object that SignalWire::Agent::AgentBase's `define_tool` renders into the SWAIG function block. It is normally written by hand as nested hashrefs. This class builds the **exact same hashref** through a fluent, named, typed API: `->to_hash` returns the identical `{ type => 'object', properties => {...}, required => [...] }` structure a hand-written literal produces, byte for byte (`required` is omitted when no property was marked required, just as hand-written schemas omit it). - -It is a **convenience over the same wire output, not a new format**. The untyped-hashref path into `define_tool` is unchanged and still accepted, so Python parity and every existing caller keep working; the builder is purely additive (see PORT\_ADDITIONS.md). This is the Perl realisation of the cross-port Tier-2 flagship idiom: a typed SWAIG tool-parameter builder. - -**LICENSE** - -Copyright (c) 2025 SignalWire. Licensed under the MIT License. - -**MARKING REQUIRED FIELDS** - -- `->required(@names)` — mark already-declared properties required. Accumulates across calls and de-duplicates on emit, preserving first-seen order. Equivalent to passing `required => 1` on each kind call. - -**NEW** - -my $schema = SignalWire::SWAIG::ParameterSchema->new; - -Construct an empty builder. - -**PROPERTY KINDS** - -Each kind method has the form `->KIND($name, $description, %opts)` and returns `$self` so calls chain. The `$description` second positional is the LLM-facing prompt text (it may also be given as `description => ...` in `%opts`). `%opts` carries the optional facets: `required => 1` (shorthand for also calling `->required($name)`), `default => ...`, `enum => [...]`, `format => ...`, and any other JSON-Schema keyword, emitted verbatim in caller-given order. - -- `->string($name, $desc, %opts)` — `{ type => 'string' }`. - -- `->number($name, $desc, %opts)` — `{ type => 'number' }`. - -- `->integer($name, $desc, %opts)` — `{ type => 'integer' }`. - -- `->boolean($name, $desc, %opts)` — `{ type => 'boolean' }`. - -- `->enum($name, $values, $desc, %opts)` — a closed-set string, `{ type => 'string', enum => [ @$values ] }`. `$values` is an arrayref of accepted values; pass a Tier-1 constant set directly (`SignalWire::SWAIG::RecordCall->formats`, `SignalWire::SWAIG::Tap->codecs`, ...) so the schema's `enum` is single-sourced from the same closed set the verb validates against. Pass `type => 'integer'` in `%opts` for a numeric enum. - -- `->array($name, $desc, %opts)` — `{ type => 'array' }`, with an optional `of => ...` element spec rendered as `items`. `of` may be a kind-name string (`'string'`, `'object'`, ...), a nested `ParameterSchema`, or a raw hashref items schema. Omit `of` for an untyped array. - -- `->object($name, $desc, %opts)` — `{ type => 'object' }`, with an optional `properties => ...` nested spec. `properties` may be a nested `ParameterSchema`, a coderef called with a fresh child schema, or a raw hashref. The nested `properties`/`required` are spliced in. Omit `properties` for an open object. - -**REQUIRED** - -$schema->required('a', 'b'); - -Mark properties required. See \["Marking required fields"]\(Marking required fields). Returns `$self`. - -**STRING / NUMBER / INTEGER / BOOLEAN / ENUM / ARRAY / OBJECT** - -Add a property of the named kind. See \["Property kinds"]\(Property kinds). Each returns `$self`. Dies on a duplicate property name. - -**TO DICT** - -Alias for "to\_hash", matching the SDK's serialiser naming. Identical output. - -**TO HASH** - -my $params = $schema->to\_hash; - -Render the JSON-Schema `parameters` hashref. `required` is omitted when empty. The result is is\_deeply- and JSON-identical to the equivalent hand-written literal and shares no references with the builder's internal state. - -**Synopsis** - -```perl -use SignalWire::SWAIG::ParameterSchema; -use SignalWire::SWAIG::RecordCall; -``` - -```perl -my $params = SignalWire::SWAIG::ParameterSchema->new - ->string('service', 'The service to book') - ->string('date', 'Appointment date, YYYY-MM-DD') - ->enum('format', SignalWire::SWAIG::RecordCall->formats, - 'Recording container format') - ->integer('seats', 'How many seats', default => 1) - ->required('service', 'date') - ->to_hash; -``` - -```perl -# $params is the SAME hashref you would have hand-written: -# { -# type => 'object', -# properties => { -# service => { type => 'string', description => 'The service to book' }, -# date => { type => 'string', description => 'Appointment date, YYYY-MM-DD' }, -# format => { type => 'string', description => 'Recording container format', -# enum => ['wav','mp3','mp4'] }, -# seats => { type => 'integer', description => 'How many seats', default => 1 }, -# }, -# required => ['service','date'], -# } -``` - -```perl -$agent->define_tool( - name => 'book_appointment', - description => 'Book an appointment for a service on a date.', - parameters => $params, # typed-built, same wire shape - handler => sub { ... }, -); -``` - -## Signature - -```perl -package SignalWire::SWAIG::ParameterSchema -``` - -## See Also - -- SignalWire::Agent::AgentBase (`define_tool`), SignalWire::SWML::Service (`define_tool`), SignalWire::SWAIG::RecordCall, SignalWire::SWAIG::Tap (Tier-1 closed-set constant sets that drop into `->enum`), SignalWire::POM::Section (sibling Tier-2 typed-builder idiom). - -## Methods - -### array - -#### Signature - -```perl -sub array() -``` - -#### Source - -[`lib/SignalWire/SWAIG/ParameterSchema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/ParameterSchema.pm) - -Line 149. - -*** - -### boolean - -#### Signature - -```perl -sub boolean() -``` - -#### Source - -[`lib/SignalWire/SWAIG/ParameterSchema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/ParameterSchema.pm) - -Line 118. - -*** - -### enum - -#### Signature - -```perl -sub enum() -``` - -#### Source - -[`lib/SignalWire/SWAIG/ParameterSchema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/ParameterSchema.pm) - -Line 129. - -*** - -### integer - -#### Signature - -```perl -sub integer() -``` - -#### Source - -[`lib/SignalWire/SWAIG/ParameterSchema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/ParameterSchema.pm) - -Line 113. - -*** - -### number - -#### Signature - -```perl -sub number() -``` - -#### Source - -[`lib/SignalWire/SWAIG/ParameterSchema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/ParameterSchema.pm) - -Line 108. - -*** - -### object - -#### Signature - -```perl -sub object() -``` - -#### Source - -[`lib/SignalWire/SWAIG/ParameterSchema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/ParameterSchema.pm) - -Line 176. - -*** - -### required - -#### Signature - -```perl -sub required() -``` - -#### Source - -[`lib/SignalWire/SWAIG/ParameterSchema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/ParameterSchema.pm) - -Line 189. - -*** - -### string - -#### Signature - -```perl -sub string() -``` - -#### Source - -[`lib/SignalWire/SWAIG/ParameterSchema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/ParameterSchema.pm) - -Line 103. - -*** - -### to\_dict - -#### Signature - -```perl -sub to_dict() -``` - -#### Source - -[`lib/SignalWire/SWAIG/ParameterSchema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/ParameterSchema.pm) - -Line 230. - -*** - -### to\_hash - -#### Signature - -```perl -sub to_hash() -``` - -#### Source - -[`lib/SignalWire/SWAIG/ParameterSchema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/ParameterSchema.pm) - -Line 210. - -## Source - -[`lib/SignalWire/SWAIG/ParameterSchema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/ParameterSchema.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/agents/swaig/record-call/index.mdx b/fern/products/sdk-reference/perl/agents/swaig/record-call/index.mdx index 4480c10d6a..26df61fa32 100644 --- a/fern/products/sdk-reference/perl/agents/swaig/record-call/index.mdx +++ b/fern/products/sdk-reference/perl/agents/swaig/record-call/index.mdx @@ -5,18 +5,189 @@ sdk_label: "Perl SDK" icon: "perl" lustri: auto_generated: true - kind: "module" + kind: "class" language: "perl" - qualified_name: "agents.SWAIG.RecordCall" + qualified_name: "SignalWire::SWAIG::RecordCall" parent: "agents.SWAIG" module: "agents.SWAIG" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/RecordCall.pm" --- # `RecordCall` -## Classes +The two closed-set string parameters of SignalWire::SWAIG::FunctionResult's `record_call` verb, surfaced as typed, named constants: - - - The two closed-set string parameters of SignalWire::SWAIG::FunctionResult's `record_call` verb, surfaced as typed, named constants: - - +- **FORMAT** — the recording container: `wav`, `mp3`, or `mp4`. + +- **DIRECTION** — which audio channel(s) to capture: `speak`, `listen`, or `both`. + +These sets are not merely advisory. `record_call` validates both inline and dies on anything outside the set; this module hoists those literal sets into a single source of truth so the accepted values are discoverable and autocompletable instead of living only inside the `die` strings. The constants **are** the canonical wire strings, so `record_call`'s signature is unchanged — it still takes plain `format => ...` / `direction => ...` strings, preserving Python parity. + +The record `direction` here is the write-side record-channel selector. It is unrelated to the read-only inbound/outbound `direction` field on Relay message events, and it uses `listen` where SignalWire::SWAIG::Tap uses `hear` — the two vocabularies must never be unified. + +**CONSTANTS** + +Exported on request via Exporter. The `:formats` tag pulls `WAV`/`MP3`/`MP4`; `:directions` pulls `SPEAK`/`LISTEN`/`BOTH`; `:all` pulls every constant. + +```perl +WAV => 'wav' SPEAK => 'speak' +MP3 => 'mp3' LISTEN => 'listen' +MP4 => 'mp4' BOTH => 'both' +``` + +**DIRECTIONS** + +my $aref = SignalWire::SWAIG::RecordCall->directions; + +Arrayref of the accepted record-direction strings. + +**FORMATS** + +my $aref = SignalWire::SWAIG::RecordCall->formats; + +Arrayref of the accepted format strings, in the order `record_call` lists them in its validation message. + +**IS DIRECTION** + +my $bool = SignalWire::SWAIG::RecordCall->is\_direction($value); + +True if `$value` is an accepted record direction. + +**IS FORMAT** + +my $bool = SignalWire::SWAIG::RecordCall->is\_format($value); + +True if `$value` is an accepted recording format. Accepts the bareword constant too (it is just the string). + +**LICENSE** + +Copyright (c) 2025 SignalWire. Licensed under the MIT License. + +**Synopsis** + +```perl +use SignalWire::SWAIG::RecordCall qw(MP3 BOTH); +use SignalWire::SWAIG::FunctionResult; +``` + +```perl +my $result = SignalWire::SWAIG::FunctionResult->new; +``` + +```perl +# Named constants and bare wire strings are interchangeable: +$result->record_call( format => MP3, direction => BOTH ); +$result->record_call( format => 'mp3', direction => 'both' ); +``` + +```perl +# Membership / iteration helpers: +SignalWire::SWAIG::RecordCall->is_format('mp3'); # 1 +SignalWire::SWAIG::RecordCall->is_direction('hear'); # 0 (that's tap's word) +@{ SignalWire::SWAIG::RecordCall->formats }; # ('wav','mp3','mp4') +``` + +## Signature + +```perl +package SignalWire::SWAIG::RecordCall +``` + +## See Also + +- SignalWire::SWAIG::FunctionResult, SignalWire::SWAIG::Tap, SignalWire::SWAIG::JoinConference, SignalWire::Skills::SkillName, SignalWire::Logging::LogLevel. + +## Constants + + + + + + + + + + + + + +## Methods + +### directions + +#### Signature + +```perl +sub directions() +``` + +#### Source + +[`lib/SignalWire/SWAIG/RecordCall.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/RecordCall.pm) + +Line 83. + +*** + +### formats + +#### Signature + +```perl +sub formats() +``` + +#### Source + +[`lib/SignalWire/SWAIG/RecordCall.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/RecordCall.pm) + +Line 78. + +*** + +### is\_direction + +#### Signature + +```perl +sub is_direction($class, $value) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/SWAIG/RecordCall.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/RecordCall.pm) + +Line 97. + +*** + +### is\_format + +#### Signature + +```perl +sub is_format($class, $value) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/SWAIG/RecordCall.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/RecordCall.pm) + +Line 89. + +## Source + +[`lib/SignalWire/SWAIG/RecordCall.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/RecordCall.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/swaig/record-call/record-call/index.mdx b/fern/products/sdk-reference/perl/agents/swaig/record-call/record-call/index.mdx deleted file mode 100644 index 44418b5227..0000000000 --- a/fern/products/sdk-reference/perl/agents/swaig/record-call/record-call/index.mdx +++ /dev/null @@ -1,193 +0,0 @@ ---- -slug: "/reference/perl/agents/swaig/record-call/record-call" -title: "RecordCall" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::SWAIG::RecordCall" - parent: "agents.SWAIG.RecordCall" - module: "agents.SWAIG.RecordCall" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/RecordCall.pm" ---- -# `RecordCall` - -The two closed-set string parameters of SignalWire::SWAIG::FunctionResult's `record_call` verb, surfaced as typed, named constants: - -- **FORMAT** — the recording container: `wav`, `mp3`, or `mp4`. - -- **DIRECTION** — which audio channel(s) to capture: `speak`, `listen`, or `both`. - -These sets are not merely advisory. `record_call` validates both inline and dies on anything outside the set; this module hoists those literal sets into a single source of truth so the accepted values are discoverable and autocompletable instead of living only inside the `die` strings. The constants **are** the canonical wire strings, so `record_call`'s signature is unchanged — it still takes plain `format => ...` / `direction => ...` strings, preserving Python parity. - -The record `direction` here is the write-side record-channel selector. It is unrelated to the read-only inbound/outbound `direction` field on Relay message events, and it uses `listen` where SignalWire::SWAIG::Tap uses `hear` — the two vocabularies must never be unified. - -**CONSTANTS** - -Exported on request via Exporter. The `:formats` tag pulls `WAV`/`MP3`/`MP4`; `:directions` pulls `SPEAK`/`LISTEN`/`BOTH`; `:all` pulls every constant. - -```perl -WAV => 'wav' SPEAK => 'speak' -MP3 => 'mp3' LISTEN => 'listen' -MP4 => 'mp4' BOTH => 'both' -``` - -**DIRECTIONS** - -my $aref = SignalWire::SWAIG::RecordCall->directions; - -Arrayref of the accepted record-direction strings. - -**FORMATS** - -my $aref = SignalWire::SWAIG::RecordCall->formats; - -Arrayref of the accepted format strings, in the order `record_call` lists them in its validation message. - -**IS DIRECTION** - -my $bool = SignalWire::SWAIG::RecordCall->is\_direction($value); - -True if `$value` is an accepted record direction. - -**IS FORMAT** - -my $bool = SignalWire::SWAIG::RecordCall->is\_format($value); - -True if `$value` is an accepted recording format. Accepts the bareword constant too (it is just the string). - -**LICENSE** - -Copyright (c) 2025 SignalWire. Licensed under the MIT License. - -**Synopsis** - -```perl -use SignalWire::SWAIG::RecordCall qw(MP3 BOTH); -use SignalWire::SWAIG::FunctionResult; -``` - -```perl -my $result = SignalWire::SWAIG::FunctionResult->new; -``` - -```perl -# Named constants and bare wire strings are interchangeable: -$result->record_call( format => MP3, direction => BOTH ); -$result->record_call( format => 'mp3', direction => 'both' ); -``` - -```perl -# Membership / iteration helpers: -SignalWire::SWAIG::RecordCall->is_format('mp3'); # 1 -SignalWire::SWAIG::RecordCall->is_direction('hear'); # 0 (that's tap's word) -@{ SignalWire::SWAIG::RecordCall->formats }; # ('wav','mp3','mp4') -``` - -## Signature - -```perl -package SignalWire::SWAIG::RecordCall -``` - -## See Also - -- SignalWire::SWAIG::FunctionResult, SignalWire::SWAIG::Tap, SignalWire::SWAIG::JoinConference, SignalWire::Skills::SkillName, SignalWire::Logging::LogLevel. - -## Constants - - - - - - - - - - - - - -## Methods - -### directions - -#### Signature - -```perl -sub directions() -``` - -#### Source - -[`lib/SignalWire/SWAIG/RecordCall.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/RecordCall.pm) - -Line 83. - -*** - -### formats - -#### Signature - -```perl -sub formats() -``` - -#### Source - -[`lib/SignalWire/SWAIG/RecordCall.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/RecordCall.pm) - -Line 78. - -*** - -### is\_direction - -#### Signature - -```perl -sub is_direction($class, $value) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/SWAIG/RecordCall.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/RecordCall.pm) - -Line 97. - -*** - -### is\_format - -#### Signature - -```perl -sub is_format($class, $value) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/SWAIG/RecordCall.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/RecordCall.pm) - -Line 89. - -## Source - -[`lib/SignalWire/SWAIG/RecordCall.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/RecordCall.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/agents/swaig/tap/index.mdx b/fern/products/sdk-reference/perl/agents/swaig/tap/index.mdx index 7aa926c4b8..d6928c2f50 100644 --- a/fern/products/sdk-reference/perl/agents/swaig/tap/index.mdx +++ b/fern/products/sdk-reference/perl/agents/swaig/tap/index.mdx @@ -5,18 +5,187 @@ sdk_label: "Perl SDK" icon: "perl" lustri: auto_generated: true - kind: "module" + kind: "class" language: "perl" - qualified_name: "agents.SWAIG.Tap" + qualified_name: "SignalWire::SWAIG::Tap" parent: "agents.SWAIG" module: "agents.SWAIG" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/Tap.pm" --- # `Tap` -## Classes +The two closed-set string parameters of SignalWire::SWAIG::FunctionResult's `tap` verb, surfaced as typed, named constants: - - - The two closed-set string parameters of SignalWire::SWAIG::FunctionResult's `tap` verb, surfaced as typed, named constants: - - +- **DIRECTION** — which audio channel(s) to tap: `speak`, `hear`, or `both`. + +- **CODEC** — the RTP codec for the tapped media: `PCMU` or `PCMA`. + +`tap` validates both inline and dies on anything outside the set; this module hoists those literal sets into a single source of truth so the accepted values are discoverable and autocompletable instead of living only inside the `die` strings. The constants **are** the canonical wire strings, so `tap`'s signature is unchanged. + +**Distinct from RecordCall.** The tap direction set is `{speak, hear, both}`: the inbound-listen channel is `hear`, not `record_call`'s `listen`. Likewise this two-value codec set `{PCMU, PCMA}` is the SWAIG-tap codec set only — a strict subset of the RELAY connect/stream codec superset (`PCMU`, `PCMA`, `OPUS`, `G722`, ...). These vocabularies must never be conflated. + +**CODECS** + +my $aref = SignalWire::SWAIG::Tap->codecs; + +Arrayref of the accepted tap-codec strings. + +**CONSTANTS** + +Exported on request via Exporter. The `:directions` tag pulls `SPEAK`/`HEAR`/`BOTH`; `:codecs` pulls `PCMU`/`PCMA`; `:all` pulls every constant. + +```perl +SPEAK => 'speak' PCMU => 'PCMU' +HEAR => 'hear' PCMA => 'PCMA' +BOTH => 'both' +``` + +**DIRECTIONS** + +my $aref = SignalWire::SWAIG::Tap->directions; + +Arrayref of the accepted tap-direction strings. + +**IS CODEC** + +my $bool = SignalWire::SWAIG::Tap->is\_codec($value); + +True if `$value` is an accepted tap codec. + +**IS DIRECTION** + +my $bool = SignalWire::SWAIG::Tap->is\_direction($value); + +True if `$value` is an accepted tap direction. Accepts the bareword constant too (it is just the string). + +**LICENSE** + +Copyright (c) 2025 SignalWire. Licensed under the MIT License. + +**Synopsis** + +```perl +use SignalWire::SWAIG::Tap qw(SPEAK HEAR BOTH PCMU PCMA); +use SignalWire::SWAIG::FunctionResult; +``` + +```perl +my $result = SignalWire::SWAIG::FunctionResult->new; +``` + +```perl +# Named constants and bare wire strings are interchangeable: +$result->tap( 'rtp://1.2.3.4:5000', direction => HEAR, codec => PCMA ); +$result->tap( 'rtp://1.2.3.4:5000', direction => 'hear', codec => 'PCMA' ); +``` + +```perl +# Membership / iteration helpers: +SignalWire::SWAIG::Tap->is_direction('hear'); # 1 +SignalWire::SWAIG::Tap->is_codec('OPUS'); # 0 (RELAY-only codec) +@{ SignalWire::SWAIG::Tap->codecs }; # ('PCMU','PCMA') +``` + +## Signature + +```perl +package SignalWire::SWAIG::Tap +``` + +## See Also + +- SignalWire::SWAIG::FunctionResult, SignalWire::SWAIG::RecordCall, SignalWire::SWAIG::JoinConference. + +## Constants + + + + + + + + + + + +## Methods + +### codecs + +#### Signature + +```perl +sub codecs() +``` + +#### Source + +[`lib/SignalWire/SWAIG/Tap.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/Tap.pm) + +Line 85. + +*** + +### directions + +#### Signature + +```perl +sub directions() +``` + +#### Source + +[`lib/SignalWire/SWAIG/Tap.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/Tap.pm) + +Line 80. + +*** + +### is\_codec + +#### Signature + +```perl +sub is_codec($class, $value) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/SWAIG/Tap.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/Tap.pm) + +Line 99. + +*** + +### is\_direction + +#### Signature + +```perl +sub is_direction($class, $value) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/SWAIG/Tap.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/Tap.pm) + +Line 91. + +## Source + +[`lib/SignalWire/SWAIG/Tap.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/Tap.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/swaig/tap/tap/index.mdx b/fern/products/sdk-reference/perl/agents/swaig/tap/tap/index.mdx deleted file mode 100644 index 9fd013c69a..0000000000 --- a/fern/products/sdk-reference/perl/agents/swaig/tap/tap/index.mdx +++ /dev/null @@ -1,191 +0,0 @@ ---- -slug: "/reference/perl/agents/swaig/tap/tap" -title: "Tap" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::SWAIG::Tap" - parent: "agents.SWAIG.Tap" - module: "agents.SWAIG.Tap" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/Tap.pm" ---- -# `Tap` - -The two closed-set string parameters of SignalWire::SWAIG::FunctionResult's `tap` verb, surfaced as typed, named constants: - -- **DIRECTION** — which audio channel(s) to tap: `speak`, `hear`, or `both`. - -- **CODEC** — the RTP codec for the tapped media: `PCMU` or `PCMA`. - -`tap` validates both inline and dies on anything outside the set; this module hoists those literal sets into a single source of truth so the accepted values are discoverable and autocompletable instead of living only inside the `die` strings. The constants **are** the canonical wire strings, so `tap`'s signature is unchanged. - -**Distinct from RecordCall.** The tap direction set is `{speak, hear, both}`: the inbound-listen channel is `hear`, not `record_call`'s `listen`. Likewise this two-value codec set `{PCMU, PCMA}` is the SWAIG-tap codec set only — a strict subset of the RELAY connect/stream codec superset (`PCMU`, `PCMA`, `OPUS`, `G722`, ...). These vocabularies must never be conflated. - -**CODECS** - -my $aref = SignalWire::SWAIG::Tap->codecs; - -Arrayref of the accepted tap-codec strings. - -**CONSTANTS** - -Exported on request via Exporter. The `:directions` tag pulls `SPEAK`/`HEAR`/`BOTH`; `:codecs` pulls `PCMU`/`PCMA`; `:all` pulls every constant. - -```perl -SPEAK => 'speak' PCMU => 'PCMU' -HEAR => 'hear' PCMA => 'PCMA' -BOTH => 'both' -``` - -**DIRECTIONS** - -my $aref = SignalWire::SWAIG::Tap->directions; - -Arrayref of the accepted tap-direction strings. - -**IS CODEC** - -my $bool = SignalWire::SWAIG::Tap->is\_codec($value); - -True if `$value` is an accepted tap codec. - -**IS DIRECTION** - -my $bool = SignalWire::SWAIG::Tap->is\_direction($value); - -True if `$value` is an accepted tap direction. Accepts the bareword constant too (it is just the string). - -**LICENSE** - -Copyright (c) 2025 SignalWire. Licensed under the MIT License. - -**Synopsis** - -```perl -use SignalWire::SWAIG::Tap qw(SPEAK HEAR BOTH PCMU PCMA); -use SignalWire::SWAIG::FunctionResult; -``` - -```perl -my $result = SignalWire::SWAIG::FunctionResult->new; -``` - -```perl -# Named constants and bare wire strings are interchangeable: -$result->tap( 'rtp://1.2.3.4:5000', direction => HEAR, codec => PCMA ); -$result->tap( 'rtp://1.2.3.4:5000', direction => 'hear', codec => 'PCMA' ); -``` - -```perl -# Membership / iteration helpers: -SignalWire::SWAIG::Tap->is_direction('hear'); # 1 -SignalWire::SWAIG::Tap->is_codec('OPUS'); # 0 (RELAY-only codec) -@{ SignalWire::SWAIG::Tap->codecs }; # ('PCMU','PCMA') -``` - -## Signature - -```perl -package SignalWire::SWAIG::Tap -``` - -## See Also - -- SignalWire::SWAIG::FunctionResult, SignalWire::SWAIG::RecordCall, SignalWire::SWAIG::JoinConference. - -## Constants - - - - - - - - - - - -## Methods - -### codecs - -#### Signature - -```perl -sub codecs() -``` - -#### Source - -[`lib/SignalWire/SWAIG/Tap.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/Tap.pm) - -Line 85. - -*** - -### directions - -#### Signature - -```perl -sub directions() -``` - -#### Source - -[`lib/SignalWire/SWAIG/Tap.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/Tap.pm) - -Line 80. - -*** - -### is\_codec - -#### Signature - -```perl -sub is_codec($class, $value) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/SWAIG/Tap.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/Tap.pm) - -Line 99. - -*** - -### is\_direction - -#### Signature - -```perl -sub is_direction($class, $value) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/SWAIG/Tap.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/Tap.pm) - -Line 91. - -## Source - -[`lib/SignalWire/SWAIG/Tap.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWAIG/Tap.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/agents/swml/document/document/index.mdx b/fern/products/sdk-reference/perl/agents/swml/document/document/index.mdx deleted file mode 100644 index 284a1423b9..0000000000 --- a/fern/products/sdk-reference/perl/agents/swml/document/document/index.mdx +++ /dev/null @@ -1,201 +0,0 @@ ---- -slug: "/reference/perl/agents/swml/document/document" -title: "Document" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::SWML::Document" - parent: "agents.SWML.Document" - module: "agents.SWML.Document" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Document.pm" ---- -# `Document` - -## Signature - -```perl -package SignalWire::SWML::Document -``` - -## Methods - -### add\_raw\_verb - -#### Signature - -```perl -sub add_raw_verb($section_name, $verb_hash) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/SWML/Document.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Document.pm) - -Line 30. - -*** - -### add\_section - -#### Signature - -```perl -sub add_section($name) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/SWML/Document.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Document.pm) - -Line 17. - -*** - -### add\_verb - -#### Signature - -```perl -sub add_verb($section_name, $verb_name, $verb_data) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/SWML/Document.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Document.pm) - -Line 23. - -*** - -### clear\_section - -#### Signature - -```perl -sub clear_section($name) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/SWML/Document.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Document.pm) - -Line 47. - -*** - -### get\_section - -#### Signature - -```perl -sub get_section($name) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/SWML/Document.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Document.pm) - -Line 37. - -*** - -### has\_section - -#### Signature - -```perl -sub has_section($name) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/SWML/Document.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Document.pm) - -Line 42. - -*** - -### to\_hash - -#### Signature - -```perl -sub to_hash() -``` - -#### Source - -[`lib/SignalWire/SWML/Document.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Document.pm) - -Line 53. - -*** - -### to\_json - -#### Signature - -```perl -sub to_json() -``` - -#### Source - -[`lib/SignalWire/SWML/Document.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Document.pm) - -Line 61. - -*** - -### to\_pretty\_json - -#### Signature - -```perl -sub to_pretty_json() -``` - -#### Source - -[`lib/SignalWire/SWML/Document.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Document.pm) - -Line 66. - -## Source - -[`lib/SignalWire/SWML/Document.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Document.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/agents/swml/document/index.mdx b/fern/products/sdk-reference/perl/agents/swml/document/index.mdx index a676ce7ae5..29867c3cb3 100644 --- a/fern/products/sdk-reference/perl/agents/swml/document/index.mdx +++ b/fern/products/sdk-reference/perl/agents/swml/document/index.mdx @@ -5,16 +5,197 @@ sdk_label: "Perl SDK" icon: "perl" lustri: auto_generated: true - kind: "module" + kind: "class" language: "perl" - qualified_name: "agents.SWML.Document" + qualified_name: "SignalWire::SWML::Document" parent: "agents.SWML" module: "agents.SWML" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Document.pm" --- # `Document` -## Classes +## Signature - - - +```perl +package SignalWire::SWML::Document +``` + +## Methods + +### add\_raw\_verb + +#### Signature + +```perl +sub add_raw_verb($section_name, $verb_hash) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/SWML/Document.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Document.pm) + +Line 30. + +*** + +### add\_section + +#### Signature + +```perl +sub add_section($name) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/SWML/Document.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Document.pm) + +Line 17. + +*** + +### add\_verb + +#### Signature + +```perl +sub add_verb($section_name, $verb_name, $verb_data) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/SWML/Document.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Document.pm) + +Line 23. + +*** + +### clear\_section + +#### Signature + +```perl +sub clear_section($name) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/SWML/Document.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Document.pm) + +Line 47. + +*** + +### get\_section + +#### Signature + +```perl +sub get_section($name) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/SWML/Document.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Document.pm) + +Line 37. + +*** + +### has\_section + +#### Signature + +```perl +sub has_section($name) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/SWML/Document.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Document.pm) + +Line 42. + +*** + +### to\_hash + +#### Signature + +```perl +sub to_hash() +``` + +#### Source + +[`lib/SignalWire/SWML/Document.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Document.pm) + +Line 53. + +*** + +### to\_json + +#### Signature + +```perl +sub to_json() +``` + +#### Source + +[`lib/SignalWire/SWML/Document.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Document.pm) + +Line 61. + +*** + +### to\_pretty\_json + +#### Signature + +```perl +sub to_pretty_json() +``` + +#### Source + +[`lib/SignalWire/SWML/Document.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Document.pm) + +Line 66. + +## Source + +[`lib/SignalWire/SWML/Document.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Document.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/swml/index.mdx b/fern/products/sdk-reference/perl/agents/swml/index.mdx index 7f51972721..a4e7ce1517 100644 --- a/fern/products/sdk-reference/perl/agents/swml/index.mdx +++ b/fern/products/sdk-reference/perl/agents/swml/index.mdx @@ -13,7 +13,7 @@ lustri: --- # `SWML` -## Modules +## Classes diff --git a/fern/products/sdk-reference/perl/agents/swml/schema/index.mdx b/fern/products/sdk-reference/perl/agents/swml/schema/index.mdx index 0236b6c8d1..563ec2f0af 100644 --- a/fern/products/sdk-reference/perl/agents/swml/schema/index.mdx +++ b/fern/products/sdk-reference/perl/agents/swml/schema/index.mdx @@ -5,16 +5,131 @@ sdk_label: "Perl SDK" icon: "perl" lustri: auto_generated: true - kind: "module" + kind: "class" language: "perl" - qualified_name: "agents.SWML.Schema" + qualified_name: "SignalWire::SWML::Schema" parent: "agents.SWML" module: "agents.SWML" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Schema.pm" --- # `Schema` -## Classes +## Signature - - - +```perl +package SignalWire::SWML::Schema +``` + +## Methods + +### BUILD + +#### Signature + +```perl +sub BUILD() +``` + +#### Source + +[`lib/SignalWire/SWML/Schema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Schema.pm) + +Line 21. + +*** + +### get\_verb + +#### Signature + +```perl +sub get_verb($name) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/SWML/Schema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Schema.pm) + +Line 83. + +*** + +### get\_verb\_names + +#### Signature + +```perl +sub get_verb_names() +``` + +#### Source + +[`lib/SignalWire/SWML/Schema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Schema.pm) + +Line 73. + +*** + +### has\_verb + +#### Signature + +```perl +sub has_verb($name) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/SWML/Schema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Schema.pm) + +Line 78. + +*** + +### instance + +#### Signature + +```perl +sub instance($class) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/SWML/Schema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Schema.pm) + +Line 67. + +*** + +### verb\_count + +#### Signature + +```perl +sub verb_count() +``` + +#### Source + +[`lib/SignalWire/SWML/Schema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Schema.pm) + +Line 88. + +## Source + +[`lib/SignalWire/SWML/Schema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Schema.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/swml/schema/schema/index.mdx b/fern/products/sdk-reference/perl/agents/swml/schema/schema/index.mdx deleted file mode 100644 index 542bf3262f..0000000000 --- a/fern/products/sdk-reference/perl/agents/swml/schema/schema/index.mdx +++ /dev/null @@ -1,135 +0,0 @@ ---- -slug: "/reference/perl/agents/swml/schema/schema" -title: "Schema" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::SWML::Schema" - parent: "agents.SWML.Schema" - module: "agents.SWML.Schema" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Schema.pm" ---- -# `Schema` - -## Signature - -```perl -package SignalWire::SWML::Schema -``` - -## Methods - -### BUILD - -#### Signature - -```perl -sub BUILD() -``` - -#### Source - -[`lib/SignalWire/SWML/Schema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Schema.pm) - -Line 21. - -*** - -### get\_verb - -#### Signature - -```perl -sub get_verb($name) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/SWML/Schema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Schema.pm) - -Line 83. - -*** - -### get\_verb\_names - -#### Signature - -```perl -sub get_verb_names() -``` - -#### Source - -[`lib/SignalWire/SWML/Schema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Schema.pm) - -Line 73. - -*** - -### has\_verb - -#### Signature - -```perl -sub has_verb($name) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/SWML/Schema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Schema.pm) - -Line 78. - -*** - -### instance - -#### Signature - -```perl -sub instance($class) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/SWML/Schema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Schema.pm) - -Line 67. - -*** - -### verb\_count - -#### Signature - -```perl -sub verb_count() -``` - -#### Source - -[`lib/SignalWire/SWML/Schema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Schema.pm) - -Line 88. - -## Source - -[`lib/SignalWire/SWML/Schema.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Schema.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/agents/swml/service/index.mdx b/fern/products/sdk-reference/perl/agents/swml/service/index.mdx index 379ea6b4ef..8ad710466f 100644 --- a/fern/products/sdk-reference/perl/agents/swml/service/index.mdx +++ b/fern/products/sdk-reference/perl/agents/swml/service/index.mdx @@ -5,16 +5,471 @@ sdk_label: "Perl SDK" icon: "perl" lustri: auto_generated: true - kind: "module" + kind: "class" language: "perl" - qualified_name: "agents.SWML.Service" + qualified_name: "SignalWire::SWML::Service" parent: "agents.SWML" module: "agents.SWML" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm" --- # `Service` -## Classes +## Signature - - - +```perl +package SignalWire::SWML::Service +``` + +## Methods + +### can + +#### Signature + +```perl +sub can($method) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) + +Line 146. + +*** + +### define\_tool + +#### Signature + +```perl +sub define_tool(%opts) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) + +Line 402. + +*** + +### define\_tools + +#### Signature + +```perl +sub define_tools(@tool_defs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) + +Line 468. + +*** + +### extract\_sip\_username + +#### Signature + +```perl +sub extract_sip_username($class_or_self, $request_body) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) + +Line 235. + +*** + +### get\_all\_functions + +#### Signature + +```perl +sub get_all_functions() +``` + +#### Source + +[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) + +Line 452. + +*** + +### get\_basic\_auth\_credentials + +#### Signature + +```perl +sub get_basic_auth_credentials($include_source) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) + +Line 199. + +*** + +### get\_basic\_auth\_credentials\_with\_source + +#### Signature + +```perl +sub get_basic_auth_credentials_with_source() +``` + +#### Source + +[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) + +Line 219. + +*** + +### get\_function + +#### Signature + +```perl +sub get_function($name) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) + +Line 445. + +*** + +### handle\_additional\_route + +#### Signature + +```perl +sub handle_additional_route($sub_path, $request_data, $env) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) + +Line 509. + +*** + +### has\_function + +#### Signature + +```perl +sub has_function($name) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) + +Line 438. + +*** + +### list\_tool\_names + +#### Signature + +```perl +sub list_tool_names() +``` + +#### Source + +[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) + +Line 492. + +*** + +### on\_function\_call + +#### Signature + +```perl +sub on_function_call($name, $args, $raw_data) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) + +Line 484. + +*** + +### on\_request + +#### Signature + +```perl +sub on_request($request_data, $callback_path) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) + +Line 377. + +*** + +### on\_swml\_request + +#### Signature + +```perl +sub on_swml_request($request_data, $callback_path, $request) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) + +Line 390. + +*** + +### register\_routing\_callback + +#### Signature + +```perl +sub register_routing_callback($path, $cb) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) + +Line 515. + +*** + +### register\_swaig\_function + +#### Signature + +```perl +sub register_swaig_function($func_def) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) + +Line 427. + +*** + +### remove\_function + +#### Signature + +```perl +sub remove_function($name) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) + +Line 459. + +*** + +### render\_main\_swml + +#### Signature + +```perl +sub render_main_swml($env) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) + +Line 356. + +*** + +### render\_swml + +#### Signature + +```perl +sub render_swml($env) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) + +Line 362. + +*** + +### swaig\_pre\_dispatch + +#### Signature + +```perl +sub swaig_pre_dispatch($request_data, $func_name, $env) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) + +Line 501. + +*** + +### to\_psgi\_app + +#### Signature + +```perl +sub to_psgi_app() +``` + +#### Source + +[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) + +Line 299. + +*** + +### validate\_basic\_auth + +#### Signature + +```perl +sub validate_basic_auth($username, $password) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) + +Line 186. + +## Source + +[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/agents/swml/service/service/index.mdx b/fern/products/sdk-reference/perl/agents/swml/service/service/index.mdx deleted file mode 100644 index a9094a67eb..0000000000 --- a/fern/products/sdk-reference/perl/agents/swml/service/service/index.mdx +++ /dev/null @@ -1,475 +0,0 @@ ---- -slug: "/reference/perl/agents/swml/service/service" -title: "Service" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::SWML::Service" - parent: "agents.SWML.Service" - module: "agents.SWML.Service" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm" ---- -# `Service` - -## Signature - -```perl -package SignalWire::SWML::Service -``` - -## Methods - -### can - -#### Signature - -```perl -sub can($method) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) - -Line 146. - -*** - -### define\_tool - -#### Signature - -```perl -sub define_tool(%opts) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) - -Line 402. - -*** - -### define\_tools - -#### Signature - -```perl -sub define_tools(@tool_defs) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) - -Line 468. - -*** - -### extract\_sip\_username - -#### Signature - -```perl -sub extract_sip_username($class_or_self, $request_body) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) - -Line 235. - -*** - -### get\_all\_functions - -#### Signature - -```perl -sub get_all_functions() -``` - -#### Source - -[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) - -Line 452. - -*** - -### get\_basic\_auth\_credentials - -#### Signature - -```perl -sub get_basic_auth_credentials($include_source) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) - -Line 199. - -*** - -### get\_basic\_auth\_credentials\_with\_source - -#### Signature - -```perl -sub get_basic_auth_credentials_with_source() -``` - -#### Source - -[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) - -Line 219. - -*** - -### get\_function - -#### Signature - -```perl -sub get_function($name) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) - -Line 445. - -*** - -### handle\_additional\_route - -#### Signature - -```perl -sub handle_additional_route($sub_path, $request_data, $env) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) - -Line 509. - -*** - -### has\_function - -#### Signature - -```perl -sub has_function($name) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) - -Line 438. - -*** - -### list\_tool\_names - -#### Signature - -```perl -sub list_tool_names() -``` - -#### Source - -[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) - -Line 492. - -*** - -### on\_function\_call - -#### Signature - -```perl -sub on_function_call($name, $args, $raw_data) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) - -Line 484. - -*** - -### on\_request - -#### Signature - -```perl -sub on_request($request_data, $callback_path) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) - -Line 377. - -*** - -### on\_swml\_request - -#### Signature - -```perl -sub on_swml_request($request_data, $callback_path, $request) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) - -Line 390. - -*** - -### register\_routing\_callback - -#### Signature - -```perl -sub register_routing_callback($path, $cb) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) - -Line 515. - -*** - -### register\_swaig\_function - -#### Signature - -```perl -sub register_swaig_function($func_def) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) - -Line 427. - -*** - -### remove\_function - -#### Signature - -```perl -sub remove_function($name) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) - -Line 459. - -*** - -### render\_main\_swml - -#### Signature - -```perl -sub render_main_swml($env) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) - -Line 356. - -*** - -### render\_swml - -#### Signature - -```perl -sub render_swml($env) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) - -Line 362. - -*** - -### swaig\_pre\_dispatch - -#### Signature - -```perl -sub swaig_pre_dispatch($request_data, $func_name, $env) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) - -Line 501. - -*** - -### to\_psgi\_app - -#### Signature - -```perl -sub to_psgi_app() -``` - -#### Source - -[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) - -Line 299. - -*** - -### validate\_basic\_auth - -#### Signature - -```perl -sub validate_basic_auth($username, $password) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) - -Line 186. - -## Source - -[`lib/SignalWire/SWML/Service.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/SWML/Service.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/core/core/index.mdx b/fern/products/sdk-reference/perl/core/core/index.mdx index d479876312..fd1dfc969c 100644 --- a/fern/products/sdk-reference/perl/core/core/index.mdx +++ b/fern/products/sdk-reference/perl/core/core/index.mdx @@ -13,7 +13,7 @@ lustri: --- # `Core` -## Modules +## Classes diff --git a/fern/products/sdk-reference/perl/core/core/logging-config/index.mdx b/fern/products/sdk-reference/perl/core/core/logging-config/index.mdx index a95ac49ae8..5dbc225c2e 100644 --- a/fern/products/sdk-reference/perl/core/core/logging-config/index.mdx +++ b/fern/products/sdk-reference/perl/core/core/logging-config/index.mdx @@ -5,16 +5,59 @@ sdk_label: "Perl SDK" icon: "perl" lustri: auto_generated: true - kind: "module" + kind: "class" language: "perl" - qualified_name: "core.Core.LoggingConfig" + qualified_name: "SignalWire::Core::LoggingConfig" parent: "core.Core" module: "core.Core" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Core/LoggingConfig.pm" --- # `LoggingConfig` -## Classes +## Signature - - - +```perl +package SignalWire::Core::LoggingConfig +``` + +## Methods + +### get\_execution\_mode + +#### Signature + +```perl +sub get_execution_mode() +``` + +#### Source + +[`lib/SignalWire/Core/LoggingConfig.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Core/LoggingConfig.pm) + +Line 33. + +*** + +### get\_logger + +#### Signature + +```perl +sub get_logger($name) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Core/LoggingConfig.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Core/LoggingConfig.pm) + +Line 14. + +## Source + +[`lib/SignalWire/Core/LoggingConfig.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Core/LoggingConfig.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/core/core/logging-config/logging-config/index.mdx b/fern/products/sdk-reference/perl/core/core/logging-config/logging-config/index.mdx deleted file mode 100644 index b02949125b..0000000000 --- a/fern/products/sdk-reference/perl/core/core/logging-config/logging-config/index.mdx +++ /dev/null @@ -1,63 +0,0 @@ ---- -slug: "/reference/perl/core/core/logging-config/logging-config" -title: "LoggingConfig" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Core::LoggingConfig" - parent: "core.Core.LoggingConfig" - module: "core.Core.LoggingConfig" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Core/LoggingConfig.pm" ---- -# `LoggingConfig` - -## Signature - -```perl -package SignalWire::Core::LoggingConfig -``` - -## Methods - -### get\_execution\_mode - -#### Signature - -```perl -sub get_execution_mode() -``` - -#### Source - -[`lib/SignalWire/Core/LoggingConfig.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Core/LoggingConfig.pm) - -Line 33. - -*** - -### get\_logger - -#### Signature - -```perl -sub get_logger($name) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Core/LoggingConfig.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Core/LoggingConfig.pm) - -Line 14. - -## Source - -[`lib/SignalWire/Core/LoggingConfig.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Core/LoggingConfig.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/core/index.mdx b/fern/products/sdk-reference/perl/core/index.mdx index 71d57e32a8..b3235b0f3d 100644 --- a/fern/products/sdk-reference/perl/core/index.mdx +++ b/fern/products/sdk-reference/perl/core/index.mdx @@ -11,6 +11,18 @@ lustri: --- # `core` +## Classes + + + + + + SignalWire is the Perl port of the SignalWire AI Agents SDK. It provides a framework for building, deploying, and managing AI agents as self-contained web applications that expose HTTP endpoints to interact with the SignalWire platform. + + + + + ## Modules diff --git a/fern/products/sdk-reference/perl/signal-wire/signal-wire/logging/index.mdx b/fern/products/sdk-reference/perl/core/logging/index.mdx similarity index 92% rename from fern/products/sdk-reference/perl/signal-wire/signal-wire/logging/index.mdx rename to fern/products/sdk-reference/perl/core/logging/index.mdx index 33ad63137e..f8e4b06054 100644 --- a/fern/products/sdk-reference/perl/signal-wire/signal-wire/logging/index.mdx +++ b/fern/products/sdk-reference/perl/core/logging/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/perl/signal-wire/signal-wire/logging" +slug: "/reference/perl/core/logging" title: "Logging" sdk_label: "Perl SDK" icon: "perl" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "perl" qualified_name: "SignalWire::Logging" - parent: "SignalWire" - module: "SignalWire.Logging" + parent: "core" + module: "core.SignalWire" source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Logging.pm" --- # `Logging` @@ -23,7 +23,7 @@ package SignalWire::Logging ## Classes - + The four log levels, surfaced as typed, named constants whose values are the exact level strings SignalWire::Logging recognises in its private `%LEVELS` table and emits from `debug`/`info`/`warn`/`error`. diff --git a/fern/products/sdk-reference/perl/signal-wire/signal-wire/logging/log-level/index.mdx b/fern/products/sdk-reference/perl/core/logging/log-level/index.mdx similarity index 97% rename from fern/products/sdk-reference/perl/signal-wire/signal-wire/logging/log-level/index.mdx rename to fern/products/sdk-reference/perl/core/logging/log-level/index.mdx index 60794d7b56..42a58d0faa 100644 --- a/fern/products/sdk-reference/perl/signal-wire/signal-wire/logging/log-level/index.mdx +++ b/fern/products/sdk-reference/perl/core/logging/log-level/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/perl/signal-wire/signal-wire/logging/log-level" +slug: "/reference/perl/core/logging/log-level" title: "LogLevel" sdk_label: "Perl SDK" icon: "perl" @@ -9,7 +9,7 @@ lustri: language: "perl" qualified_name: "SignalWire::Logging::LogLevel" parent: "SignalWire::Logging" - module: "SignalWire.Logging.LogLevel" + module: "core.SignalWire.Logging" source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Logging/LogLevel.pm" --- # `LogLevel` diff --git a/fern/products/sdk-reference/perl/core/security/index.mdx b/fern/products/sdk-reference/perl/core/security/index.mdx index 737d2149c8..186617c3d1 100644 --- a/fern/products/sdk-reference/perl/core/security/index.mdx +++ b/fern/products/sdk-reference/perl/core/security/index.mdx @@ -13,12 +13,16 @@ lustri: --- # `Security` -## Modules +## Classes - + + Wraps a PSGI app so that incoming POST requests must carry a valid `X-SignalWire-Signature` header (or the legacy `X-Twilio-Signature`) matching the configured signing key. Invalid or missing signatures produce a 403 without ever invoking the wrapped app. + - + + Implements both signature schemes from porting-sdk/webhooks.md: + diff --git a/fern/products/sdk-reference/perl/core/security/session-manager/index.mdx b/fern/products/sdk-reference/perl/core/security/session-manager/index.mdx index 8f1742ba5d..8f37ef862e 100644 --- a/fern/products/sdk-reference/perl/core/security/session-manager/index.mdx +++ b/fern/products/sdk-reference/perl/core/security/session-manager/index.mdx @@ -5,16 +5,239 @@ sdk_label: "Perl SDK" icon: "perl" lustri: auto_generated: true - kind: "module" + kind: "class" language: "perl" - qualified_name: "core.Security.SessionManager" + qualified_name: "SignalWire::Security::SessionManager" parent: "core.Security" module: "core.Security" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/SessionManager.pm" --- # `SessionManager` -## Classes +## Signature - - - +```perl +package SignalWire::Security::SessionManager +``` + +## Methods + +### activate\_session + +#### Signature + +```perl +sub activate_session($call_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Security/SessionManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/SessionManager.pm) + +Line 127. + +*** + +### create\_session + +#### Signature + +```perl +sub create_session($call_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Security/SessionManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/SessionManager.pm) + +Line 50. + +*** + +### create\_tool\_token + +#### Signature + +```perl +sub create_tool_token($function_name, $call_id) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Security/SessionManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/SessionManager.pm) + +Line 69. + +*** + +### debug\_token + +#### Signature + +```perl +sub debug_token($token) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Security/SessionManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/SessionManager.pm) + +Line 147. + +*** + +### end\_session + +#### Signature + +```perl +sub end_session($call_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Security/SessionManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/SessionManager.pm) + +Line 132. + +*** + +### generate\_token + +#### Signature + +```perl +sub generate_token($function_name, $call_id) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Security/SessionManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/SessionManager.pm) + +Line 56. + +*** + +### get\_session\_metadata + +#### Signature + +```perl +sub get_session_metadata($call_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Security/SessionManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/SessionManager.pm) + +Line 137. + +*** + +### set\_session\_metadata + +#### Signature + +```perl +sub set_session_metadata($call_id, $key, $value) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/Security/SessionManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/SessionManager.pm) + +Line 142. + +*** + +### validate\_token + +#### Signature + +```perl +sub validate_token($call_id, $function_name, $token) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/Security/SessionManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/SessionManager.pm) + +Line 83. + +*** + +### validate\_tool\_token + +#### Signature + +```perl +sub validate_tool_token($function_name, $token, $call_id) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/Security/SessionManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/SessionManager.pm) + +Line 119. + +## Source + +[`lib/SignalWire/Security/SessionManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/SessionManager.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/core/security/session-manager/session-manager/index.mdx b/fern/products/sdk-reference/perl/core/security/session-manager/session-manager/index.mdx deleted file mode 100644 index 3e4386ca62..0000000000 --- a/fern/products/sdk-reference/perl/core/security/session-manager/session-manager/index.mdx +++ /dev/null @@ -1,243 +0,0 @@ ---- -slug: "/reference/perl/core/security/session-manager/session-manager" -title: "SessionManager" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Security::SessionManager" - parent: "core.Security.SessionManager" - module: "core.Security.SessionManager" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/SessionManager.pm" ---- -# `SessionManager` - -## Signature - -```perl -package SignalWire::Security::SessionManager -``` - -## Methods - -### activate\_session - -#### Signature - -```perl -sub activate_session($call_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Security/SessionManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/SessionManager.pm) - -Line 127. - -*** - -### create\_session - -#### Signature - -```perl -sub create_session($call_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Security/SessionManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/SessionManager.pm) - -Line 50. - -*** - -### create\_tool\_token - -#### Signature - -```perl -sub create_tool_token($function_name, $call_id) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/Security/SessionManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/SessionManager.pm) - -Line 69. - -*** - -### debug\_token - -#### Signature - -```perl -sub debug_token($token) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Security/SessionManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/SessionManager.pm) - -Line 147. - -*** - -### end\_session - -#### Signature - -```perl -sub end_session($call_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Security/SessionManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/SessionManager.pm) - -Line 132. - -*** - -### generate\_token - -#### Signature - -```perl -sub generate_token($function_name, $call_id) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/Security/SessionManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/SessionManager.pm) - -Line 56. - -*** - -### get\_session\_metadata - -#### Signature - -```perl -sub get_session_metadata($call_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Security/SessionManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/SessionManager.pm) - -Line 137. - -*** - -### set\_session\_metadata - -#### Signature - -```perl -sub set_session_metadata($call_id, $key, $value) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/Security/SessionManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/SessionManager.pm) - -Line 142. - -*** - -### validate\_token - -#### Signature - -```perl -sub validate_token($call_id, $function_name, $token) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/Security/SessionManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/SessionManager.pm) - -Line 83. - -*** - -### validate\_tool\_token - -#### Signature - -```perl -sub validate_tool_token($function_name, $token, $call_id) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/Security/SessionManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/SessionManager.pm) - -Line 119. - -## Source - -[`lib/SignalWire/Security/SessionManager.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/SessionManager.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/core/security/webhook-middleware/index.mdx b/fern/products/sdk-reference/perl/core/security/webhook-middleware/index.mdx index 19ec490f9d..e7fcb03ab3 100644 --- a/fern/products/sdk-reference/perl/core/security/webhook-middleware/index.mdx +++ b/fern/products/sdk-reference/perl/core/security/webhook-middleware/index.mdx @@ -5,18 +5,64 @@ sdk_label: "Perl SDK" icon: "perl" lustri: auto_generated: true - kind: "module" + kind: "class" language: "perl" - qualified_name: "core.Security.WebhookMiddleware" + qualified_name: "SignalWire::Security::WebhookMiddleware" parent: "core.Security" module: "core.Security" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/WebhookMiddleware.pm" --- # `WebhookMiddleware` -## Classes +Wraps a PSGI app so that incoming POST requests must carry a valid `X-SignalWire-Signature` header (or the legacy `X-Twilio-Signature`) matching the configured signing key. Invalid or missing signatures produce a 403 without ever invoking the wrapped app. - - - Wraps a PSGI app so that incoming POST requests must carry a valid `X-SignalWire-Signature` header (or the legacy `X-Twilio-Signature`) matching the configured signing key. Invalid or missing signatures produce a 403 without ever invoking the wrapped app. - - +The raw body is captured before validation and stashed on the env as `signalwire.raw_body`; `psgi.input` is rewound (or replaced with a buffer) so downstream handlers can re-read. + +**Synopsis** + +```perl +use SignalWire::Security::WebhookMiddleware; +``` + +```perl +my $wrapped = SignalWire::Security::WebhookMiddleware->wrap( + app => $psgi_app, + signing_key => $ENV{SIGNALWIRE_SIGNING_KEY}, + paths => [ '/', '/swaig', '/post_prompt' ], + trust_proxy => 1, +); +``` + +## Signature + +```perl +package SignalWire::Security::WebhookMiddleware +``` + +## Methods + +### wrap + +#### Signature + +```perl +sub wrap($class, %opts) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Security/WebhookMiddleware.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/WebhookMiddleware.pm) + +Line 63. + +## Source + +[`lib/SignalWire/Security/WebhookMiddleware.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/WebhookMiddleware.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/core/security/webhook-middleware/webhook-middleware/index.mdx b/fern/products/sdk-reference/perl/core/security/webhook-middleware/webhook-middleware/index.mdx deleted file mode 100644 index 704e0b0c9e..0000000000 --- a/fern/products/sdk-reference/perl/core/security/webhook-middleware/webhook-middleware/index.mdx +++ /dev/null @@ -1,68 +0,0 @@ ---- -slug: "/reference/perl/core/security/webhook-middleware/webhook-middleware" -title: "WebhookMiddleware" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Security::WebhookMiddleware" - parent: "core.Security.WebhookMiddleware" - module: "core.Security.WebhookMiddleware" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/WebhookMiddleware.pm" ---- -# `WebhookMiddleware` - -Wraps a PSGI app so that incoming POST requests must carry a valid `X-SignalWire-Signature` header (or the legacy `X-Twilio-Signature`) matching the configured signing key. Invalid or missing signatures produce a 403 without ever invoking the wrapped app. - -The raw body is captured before validation and stashed on the env as `signalwire.raw_body`; `psgi.input` is rewound (or replaced with a buffer) so downstream handlers can re-read. - -**Synopsis** - -```perl -use SignalWire::Security::WebhookMiddleware; -``` - -```perl -my $wrapped = SignalWire::Security::WebhookMiddleware->wrap( - app => $psgi_app, - signing_key => $ENV{SIGNALWIRE_SIGNING_KEY}, - paths => [ '/', '/swaig', '/post_prompt' ], - trust_proxy => 1, -); -``` - -## Signature - -```perl -package SignalWire::Security::WebhookMiddleware -``` - -## Methods - -### wrap - -#### Signature - -```perl -sub wrap($class, %opts) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/Security/WebhookMiddleware.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/WebhookMiddleware.pm) - -Line 63. - -## Source - -[`lib/SignalWire/Security/WebhookMiddleware.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/WebhookMiddleware.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/core/security/webhook-validator/index.mdx b/fern/products/sdk-reference/perl/core/security/webhook-validator/index.mdx index 22d9f7a5bd..30ac272d4b 100644 --- a/fern/products/sdk-reference/perl/core/security/webhook-validator/index.mdx +++ b/fern/products/sdk-reference/perl/core/security/webhook-validator/index.mdx @@ -5,18 +5,121 @@ sdk_label: "Perl SDK" icon: "perl" lustri: auto_generated: true - kind: "module" + kind: "class" language: "perl" - qualified_name: "core.Security.WebhookValidator" + qualified_name: "SignalWire::Security::WebhookValidator" parent: "core.Security" module: "core.Security" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/WebhookValidator.pm" --- # `WebhookValidator` -## Classes +Implements both signature schemes from porting-sdk/webhooks.md: - - - Implements both signature schemes from porting-sdk/webhooks.md: - - +- Scheme A (RELAY / SWML / JSON) + + `lower_hex(HMAC-SHA1(key, url + raw_body))` + +- Scheme B (Compat / cXML form) + + `base64(HMAC-SHA1(key, url + sorted_concat_form_params))`, with URL port normalization (try both with / without `:443` / `:80`) and an optional `bodySHA256` query-param fallback for JSON-on-compat. + +The combined entry point tries Scheme A first, then Scheme B in all URL / param-shape variants. All signature comparisons use a constant-time compare so the secret is not leaked across repeated requests. + +**ERROR MODES** + +- Valid signature -> returns `1` + +- Invalid signature -> returns `0` + +- Missing `$signature` -> returns `0` (never throws) + +- Missing `$signing_key` -> croaks (programming error) + +- Reference passed as `$raw_body` -> croaks + +**Synopsis** + +```perl +use SignalWire::Security::WebhookValidator qw( + validate_webhook_signature validate_request +); +``` + +```perl +# JSON / RELAY / SWML callbacks +if (validate_webhook_signature($signing_key, $sig_header, $url, $raw_body)) { + # request is genuine +} +``` + +```perl +# Legacy compat-api drop-in +if (validate_request($signing_key, $sig_header, $url, \%params)) { + # cXML / form-encoded request is genuine +} +``` + +## Signature + +```perl +package SignalWire::Security::WebhookValidator +``` + +## Methods + +### validate\_request + +#### Signature + +```perl +sub validate_request($signing_key, $signature, $url, $params_or_raw_body) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`lib/SignalWire/Security/WebhookValidator.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/WebhookValidator.pm) + +Line 309. + +*** + +### validate\_webhook\_signature + +#### Signature + +```perl +sub validate_webhook_signature($signing_key, $signature, $url, $raw_body) +``` + +#### Parameters + + + + + + + + + +#### Source + +[`lib/SignalWire/Security/WebhookValidator.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/WebhookValidator.pm) + +Line 260. + +## Source + +[`lib/SignalWire/Security/WebhookValidator.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/WebhookValidator.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/core/security/webhook-validator/webhook-validator/index.mdx b/fern/products/sdk-reference/perl/core/security/webhook-validator/webhook-validator/index.mdx deleted file mode 100644 index 194160e2c7..0000000000 --- a/fern/products/sdk-reference/perl/core/security/webhook-validator/webhook-validator/index.mdx +++ /dev/null @@ -1,125 +0,0 @@ ---- -slug: "/reference/perl/core/security/webhook-validator/webhook-validator" -title: "WebhookValidator" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Security::WebhookValidator" - parent: "core.Security.WebhookValidator" - module: "core.Security.WebhookValidator" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/WebhookValidator.pm" ---- -# `WebhookValidator` - -Implements both signature schemes from porting-sdk/webhooks.md: - -- Scheme A (RELAY / SWML / JSON) - - `lower_hex(HMAC-SHA1(key, url + raw_body))` - -- Scheme B (Compat / cXML form) - - `base64(HMAC-SHA1(key, url + sorted_concat_form_params))`, with URL port normalization (try both with / without `:443` / `:80`) and an optional `bodySHA256` query-param fallback for JSON-on-compat. - -The combined entry point tries Scheme A first, then Scheme B in all URL / param-shape variants. All signature comparisons use a constant-time compare so the secret is not leaked across repeated requests. - -**ERROR MODES** - -- Valid signature -> returns `1` - -- Invalid signature -> returns `0` - -- Missing `$signature` -> returns `0` (never throws) - -- Missing `$signing_key` -> croaks (programming error) - -- Reference passed as `$raw_body` -> croaks - -**Synopsis** - -```perl -use SignalWire::Security::WebhookValidator qw( - validate_webhook_signature validate_request -); -``` - -```perl -# JSON / RELAY / SWML callbacks -if (validate_webhook_signature($signing_key, $sig_header, $url, $raw_body)) { - # request is genuine -} -``` - -```perl -# Legacy compat-api drop-in -if (validate_request($signing_key, $sig_header, $url, \%params)) { - # cXML / form-encoded request is genuine -} -``` - -## Signature - -```perl -package SignalWire::Security::WebhookValidator -``` - -## Methods - -### validate\_request - -#### Signature - -```perl -sub validate_request($signing_key, $signature, $url, $params_or_raw_body) -``` - -#### Parameters - - - - - - - - - -#### Source - -[`lib/SignalWire/Security/WebhookValidator.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/WebhookValidator.pm) - -Line 309. - -*** - -### validate\_webhook\_signature - -#### Signature - -```perl -sub validate_webhook_signature($signing_key, $signature, $url, $raw_body) -``` - -#### Parameters - - - - - - - - - -#### Source - -[`lib/SignalWire/Security/WebhookValidator.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/WebhookValidator.pm) - -Line 260. - -## Source - -[`lib/SignalWire/Security/WebhookValidator.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Security/WebhookValidator.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/signal-wire/signal-wire/index.mdx b/fern/products/sdk-reference/perl/core/signal-wire/index.mdx similarity index 91% rename from fern/products/sdk-reference/perl/signal-wire/signal-wire/index.mdx rename to fern/products/sdk-reference/perl/core/signal-wire/index.mdx index e16993af56..6f49bd05ca 100644 --- a/fern/products/sdk-reference/perl/signal-wire/signal-wire/index.mdx +++ b/fern/products/sdk-reference/perl/core/signal-wire/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/perl/signal-wire/signal-wire" +slug: "/reference/perl/core/signal-wire" title: "SignalWire" sdk_label: "Perl SDK" icon: "perl" @@ -8,7 +8,8 @@ lustri: kind: "class" language: "perl" qualified_name: "SignalWire" - module: "SignalWire" + parent: "core" + module: "core" source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire.pm" --- # `SignalWire` @@ -188,18 +189,6 @@ $agent->run(); package SignalWire ``` -## Classes - - - - - - - - - - - ## Methods ### add\_skill\_directory diff --git a/fern/products/sdk-reference/perl/signal-wire/signal-wire/utils/index.mdx b/fern/products/sdk-reference/perl/core/utils/index.mdx similarity index 83% rename from fern/products/sdk-reference/perl/signal-wire/signal-wire/utils/index.mdx rename to fern/products/sdk-reference/perl/core/utils/index.mdx index 487d6025a4..d189fa2146 100644 --- a/fern/products/sdk-reference/perl/signal-wire/signal-wire/utils/index.mdx +++ b/fern/products/sdk-reference/perl/core/utils/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/perl/signal-wire/signal-wire/utils" +slug: "/reference/perl/core/utils" title: "Utils" sdk_label: "Perl SDK" icon: "perl" @@ -8,8 +8,8 @@ lustri: kind: "class" language: "perl" qualified_name: "SignalWire::Utils" - parent: "SignalWire" - module: "SignalWire.Utils" + parent: "core" + module: "core.SignalWire" source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Utils.pm" --- # `Utils` @@ -23,7 +23,7 @@ package SignalWire::Utils ## Classes - + ## Methods diff --git a/fern/products/sdk-reference/perl/signal-wire/signal-wire/utils/url-validator/index.mdx b/fern/products/sdk-reference/perl/core/utils/url-validator/index.mdx similarity index 89% rename from fern/products/sdk-reference/perl/signal-wire/signal-wire/utils/url-validator/index.mdx rename to fern/products/sdk-reference/perl/core/utils/url-validator/index.mdx index 45832b88fb..4f8fdd106e 100644 --- a/fern/products/sdk-reference/perl/signal-wire/signal-wire/utils/url-validator/index.mdx +++ b/fern/products/sdk-reference/perl/core/utils/url-validator/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/perl/signal-wire/signal-wire/utils/url-validator" +slug: "/reference/perl/core/utils/url-validator" title: "UrlValidator" sdk_label: "Perl SDK" icon: "perl" @@ -9,7 +9,7 @@ lustri: language: "perl" qualified_name: "SignalWire::Utils::UrlValidator" parent: "SignalWire::Utils" - module: "SignalWire.Utils.UrlValidator" + module: "core.SignalWire.Utils" source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Utils/UrlValidator.pm" --- # `UrlValidator` diff --git a/fern/products/sdk-reference/perl/relay/action/action/index.mdx b/fern/products/sdk-reference/perl/relay/action/action/index.mdx deleted file mode 100644 index 397e8aeabc..0000000000 --- a/fern/products/sdk-reference/perl/relay/action/action/index.mdx +++ /dev/null @@ -1,357 +0,0 @@ ---- -slug: "/reference/perl/relay/action/action" -title: "Action" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Relay::Action" - parent: "relay.Action" - module: "relay.Action" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm" ---- -# `Action` - -SignalWire::Relay::Action is the base class for every long-running RELAY operation (play, record, detect, collect, fax, tap, stream, pay, transcribe, AI). It tracks the `control_id` correlation key, accumulates events, exposes the latest `payload`, and resolves when the operation reaches a terminal state — mirroring the Python reference's action objects. - -Construction fails fast: `control_id` must be a non-empty string, `events` must be an arrayref, and `payload` must be a hashref (Moo `isa` constraints). These objects are normally created by SignalWire::Relay::Call, not by user code. - -**BASE METHODS** - -- `on_completed($cb)` — register a completion callback (fires immediately if already done); no-arg form returns the registered callback. - -- `is_done` — true once resolved. - -- `wait(timeout => $secs)` — block (polling) until resolved or the timeout elapses (default 30s), then return the result. - -- `stop` — send the subclass's stop verb unless already done. - -**LICENSE** - -Copyright (c) 2025 SignalWire. Licensed under the MIT License. - -**SUBCLASSES** - -Each subclass overrides the stop verb and adds result accessors: - -- **::Play** — `pause`, `resume`, `volume($vol)`. - -- **::Record** — `pause(behavior => ...)`, `resume`, and the `url` / `duration` / `size` result accessors. - -- **::Detect** — `detect_result`; resolves on the first `params.detect` payload. - -- **::Collect** / **::StandaloneCollect** — `start_input_timers`, `collect_result`; filters stray `calling.call.play` events. - -- **::Fax** — `fax_result`; stop verb depends on `_fax_type`. - -- **::Tap**, **::Stream**, **::Transcribe**, **::AI** — stop-verb-only specialisations. - -- **::Pay** — `pay_result`. - -**Synopsis** - -```perl -# Actions are returned by SignalWire::Relay::Call methods, not -# constructed directly: -my $action = $call->play_async( url => $url ); # ::Action::Play -``` - -```perl -$action->on_completed(sub ($a) { print "done: ", $a->state, "\n"; }); -my $result = $action->wait( timeout => 30 ); # block until done -$action->stop unless $action->is_done; -``` - -## Signature - -```perl -package SignalWire::Relay::Action -``` - -## Inheritance - -**Extends:** [SignalWire::Relay::Action](/docs/sdk-reference/reference/perl/relay/action/action), `SignalWire::Relay::Action::Collect` - -## See Also - -- SignalWire::Relay::Call, SignalWire::Relay::Client, SignalWire::Relay::Event. - -## Methods - -### collect\_result - -#### Signature - -```perl -sub collect_result() -``` - -#### Source - -[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) - -Line 208. - -*** - -### detect\_result - -#### Signature - -```perl -sub detect_result() -``` - -#### Source - -[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) - -Line 176. - -*** - -### duration - -#### Signature - -```perl -sub duration() -``` - -#### Source - -[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) - -Line 165. - -*** - -### fax\_result - -#### Signature - -```perl -sub fax_result() -``` - -#### Source - -[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) - -Line 264. - -*** - -### is\_done - -#### Signature - -```perl -sub is_done() -``` - -#### Source - -[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) - -Line 57. - -*** - -### on\_completed - -#### Signature - -```perl -sub on_completed() -``` - -#### Source - -[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) - -Line 43. - -*** - -### pause - -#### Signature - -```perl -sub pause() -``` - -#### Source - -[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) - -Line 120. - -*** - -### pause - -#### Signature - -```perl -sub pause() -``` - -#### Source - -[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) - -Line 147. - -*** - -### pay\_result - -#### Signature - -```perl -sub pay_result() -``` - -#### Source - -[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) - -Line 287. - -*** - -### resume - -#### Signature - -```perl -sub resume() -``` - -#### Source - -[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) - -Line 124. - -*** - -### resume - -#### Signature - -```perl -sub resume() -``` - -#### Source - -[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) - -Line 159. - -*** - -### size - -#### Signature - -```perl -sub size() -``` - -#### Source - -[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) - -Line 166. - -*** - -### start\_input\_timers - -#### Signature - -```perl -sub start_input_timers() -``` - -#### Source - -[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) - -Line 204. - -*** - -### stop - -#### Signature - -```perl -sub stop() -``` - -#### Source - -[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) - -Line 104. - -*** - -### url - -#### Signature - -```perl -sub url() -``` - -#### Source - -[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) - -Line 164. - -*** - -### volume - -#### Signature - -```perl -sub volume() -``` - -#### Source - -[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) - -Line 128. - -*** - -### wait - -#### Signature - -```perl -sub wait() -``` - -#### Source - -[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) - -Line 62. - -## Source - -[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/relay/action/index.mdx b/fern/products/sdk-reference/perl/relay/action/index.mdx index ddb00ef8c9..aabea05700 100644 --- a/fern/products/sdk-reference/perl/relay/action/index.mdx +++ b/fern/products/sdk-reference/perl/relay/action/index.mdx @@ -5,18 +5,353 @@ sdk_label: "Perl SDK" icon: "perl" lustri: auto_generated: true - kind: "module" + kind: "class" language: "perl" - qualified_name: "relay.Action" + qualified_name: "SignalWire::Relay::Action" parent: "relay" module: "relay" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm" --- # `Action` -## Classes +SignalWire::Relay::Action is the base class for every long-running RELAY operation (play, record, detect, collect, fax, tap, stream, pay, transcribe, AI). It tracks the `control_id` correlation key, accumulates events, exposes the latest `payload`, and resolves when the operation reaches a terminal state — mirroring the Python reference's action objects. - - - SignalWire::Relay::Action is the base class for every long-running RELAY operation (play, record, detect, collect, fax, tap, stream, pay, transcribe, AI). It tracks the `control_id` correlation key, accumulates events, exposes the latest `payload`, and resolves when the operation reaches a terminal state — mirroring the Python reference's action objects. - - +Construction fails fast: `control_id` must be a non-empty string, `events` must be an arrayref, and `payload` must be a hashref (Moo `isa` constraints). These objects are normally created by SignalWire::Relay::Call, not by user code. + +**BASE METHODS** + +- `on_completed($cb)` — register a completion callback (fires immediately if already done); no-arg form returns the registered callback. + +- `is_done` — true once resolved. + +- `wait(timeout => $secs)` — block (polling) until resolved or the timeout elapses (default 30s), then return the result. + +- `stop` — send the subclass's stop verb unless already done. + +**LICENSE** + +Copyright (c) 2025 SignalWire. Licensed under the MIT License. + +**SUBCLASSES** + +Each subclass overrides the stop verb and adds result accessors: + +- **::Play** — `pause`, `resume`, `volume($vol)`. + +- **::Record** — `pause(behavior => ...)`, `resume`, and the `url` / `duration` / `size` result accessors. + +- **::Detect** — `detect_result`; resolves on the first `params.detect` payload. + +- **::Collect** / **::StandaloneCollect** — `start_input_timers`, `collect_result`; filters stray `calling.call.play` events. + +- **::Fax** — `fax_result`; stop verb depends on `_fax_type`. + +- **::Tap**, **::Stream**, **::Transcribe**, **::AI** — stop-verb-only specialisations. + +- **::Pay** — `pay_result`. + +**Synopsis** + +```perl +# Actions are returned by SignalWire::Relay::Call methods, not +# constructed directly: +my $action = $call->play_async( url => $url ); # ::Action::Play +``` + +```perl +$action->on_completed(sub ($a) { print "done: ", $a->state, "\n"; }); +my $result = $action->wait( timeout => 30 ); # block until done +$action->stop unless $action->is_done; +``` + +## Signature + +```perl +package SignalWire::Relay::Action +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::Action](/docs/sdk-reference/reference/perl/relay/action), `SignalWire::Relay::Action::Collect` + +## See Also + +- SignalWire::Relay::Call, SignalWire::Relay::Client, SignalWire::Relay::Event. + +## Methods + +### collect\_result + +#### Signature + +```perl +sub collect_result() +``` + +#### Source + +[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) + +Line 208. + +*** + +### detect\_result + +#### Signature + +```perl +sub detect_result() +``` + +#### Source + +[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) + +Line 176. + +*** + +### duration + +#### Signature + +```perl +sub duration() +``` + +#### Source + +[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) + +Line 165. + +*** + +### fax\_result + +#### Signature + +```perl +sub fax_result() +``` + +#### Source + +[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) + +Line 264. + +*** + +### is\_done + +#### Signature + +```perl +sub is_done() +``` + +#### Source + +[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) + +Line 57. + +*** + +### on\_completed + +#### Signature + +```perl +sub on_completed() +``` + +#### Source + +[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) + +Line 43. + +*** + +### pause + +#### Signature + +```perl +sub pause() +``` + +#### Source + +[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) + +Line 120. + +*** + +### pause + +#### Signature + +```perl +sub pause() +``` + +#### Source + +[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) + +Line 147. + +*** + +### pay\_result + +#### Signature + +```perl +sub pay_result() +``` + +#### Source + +[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) + +Line 287. + +*** + +### resume + +#### Signature + +```perl +sub resume() +``` + +#### Source + +[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) + +Line 124. + +*** + +### resume + +#### Signature + +```perl +sub resume() +``` + +#### Source + +[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) + +Line 159. + +*** + +### size + +#### Signature + +```perl +sub size() +``` + +#### Source + +[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) + +Line 166. + +*** + +### start\_input\_timers + +#### Signature + +```perl +sub start_input_timers() +``` + +#### Source + +[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) + +Line 204. + +*** + +### stop + +#### Signature + +```perl +sub stop() +``` + +#### Source + +[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) + +Line 104. + +*** + +### url + +#### Signature + +```perl +sub url() +``` + +#### Source + +[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) + +Line 164. + +*** + +### volume + +#### Signature + +```perl +sub volume() +``` + +#### Source + +[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) + +Line 128. + +*** + +### wait + +#### Signature + +```perl +sub wait() +``` + +#### Source + +[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) + +Line 62. + +## Source + +[`lib/SignalWire/Relay/Action.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Action.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/relay/call-state/call-state/index.mdx b/fern/products/sdk-reference/perl/relay/call-state/call-state/index.mdx deleted file mode 100644 index 918a5f0174..0000000000 --- a/fern/products/sdk-reference/perl/relay/call-state/call-state/index.mdx +++ /dev/null @@ -1,168 +0,0 @@ ---- -slug: "/reference/perl/relay/call-state/call-state" -title: "CallState" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Relay::CallState" - parent: "relay.CallState" - module: "relay.CallState" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/CallState.pm" ---- -# `CallState` - -The RELAY call-lifecycle states, surfaced as typed, named constants. A call moves through `created` → `ringing` → `answered` → `ending` → `ended`. Each constant's value is the exact wire string the server sends in the `calling.call.state` event's `call_state` field. - -The constants **are** the canonical wire strings, so nothing about `SignalWire::Relay::Call->state` changes: it still reads and writes a plain string. That keeps parity with the Python reference (bare `str`) and leaves forward-compatible server states working — an unknown string is simply not in this set. - -Grounded in the Python reference's `relay/constants.py` (`CALL_STATE_*` / `CALL_STATES`) and the port's SignalWire::Relay::Constants (`CALL_STATES` / `CALL_TERMINAL_STATES`), which are the single source the lists below are derived from. - -**CONSTANTS** - -Exported on request via Exporter; `:all` pulls every state. - -```perl -CREATED => 'created' -RINGING => 'ringing' -ANSWERED => 'answered' -ENDING => 'ending' -ENDED => 'ended' -``` - -**IS STATE** - -my $bool = SignalWire::Relay::CallState->is\_state($value); - -True if `$value` is a known call state. Returns false (never dies) on `undef` or an unknown/forward-compatible value. - -**IS TERMINAL** - -my $bool = SignalWire::Relay::CallState->is\_terminal($value); - -True if `$value` is a terminal call state (the only terminal `CallState` is `ended`). Returns false on `undef`, a non-terminal state, or an unknown value — it never dies, since these mirror server-emitted values that can grow. - -**LICENSE** - -Copyright (c) 2025 SignalWire. Licensed under the MIT License. - -**STATES** - -my $aref = SignalWire::Relay::CallState->states; - -Arrayref of the call lifecycle states, in lifecycle order. - -**THREE DISTINCT STATE VOCABULARIES** - -CallState, DialState, and MessageState are **distinct** sets with **distinct** terminal members and must never be conflated. `answered` is a **non-terminal** `CallState` but a **terminal** `DialState`; `failed` is not a `CallState` at all. Each module owns its own terminal set. - -**Synopsis** - -```perl -use SignalWire::Relay::CallState qw(CREATED RINGING ANSWERED ENDING ENDED); -``` - -```perl -# Named constants and bare wire strings are interchangeable: -$call->state eq ANSWERED; # constant -$call->state eq 'answered'; # string (Python parity) -``` - -```perl -# Membership / terminality (false on unknown — never dies): -SignalWire::Relay::CallState->is_state('ringing'); # 1 -SignalWire::Relay::CallState->is_terminal('ended'); # 1 -SignalWire::Relay::CallState->is_terminal('answered'); # 0 -SignalWire::Relay::CallState->is_terminal('made_up'); # 0 -@{ SignalWire::Relay::CallState->states }; # created..ended -``` - -## Signature - -```perl -package SignalWire::Relay::CallState -``` - -## See Also - -- SignalWire::Relay::Call, SignalWire::Relay::Constants, SignalWire::Relay::DialState, SignalWire::Relay::MessageState. - -## Constants - - - - - - - - - - - -## Methods - -### is\_state - -#### Signature - -```perl -sub is_state($class, $value) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/Relay/CallState.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/CallState.pm) - -Line 84. - -*** - -### is\_terminal - -#### Signature - -```perl -sub is_terminal($class, $value) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/Relay/CallState.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/CallState.pm) - -Line 93. - -*** - -### states - -#### Signature - -```perl -sub states() -``` - -#### Source - -[`lib/SignalWire/Relay/CallState.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/CallState.pm) - -Line 78. - -## Source - -[`lib/SignalWire/Relay/CallState.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/CallState.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/relay/call-state/index.mdx b/fern/products/sdk-reference/perl/relay/call-state/index.mdx index 5817506bb9..a593b09d72 100644 --- a/fern/products/sdk-reference/perl/relay/call-state/index.mdx +++ b/fern/products/sdk-reference/perl/relay/call-state/index.mdx @@ -5,18 +5,164 @@ sdk_label: "Perl SDK" icon: "perl" lustri: auto_generated: true - kind: "module" + kind: "class" language: "perl" - qualified_name: "relay.CallState" + qualified_name: "SignalWire::Relay::CallState" parent: "relay" module: "relay" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/CallState.pm" --- # `CallState` -## Classes +The RELAY call-lifecycle states, surfaced as typed, named constants. A call moves through `created` → `ringing` → `answered` → `ending` → `ended`. Each constant's value is the exact wire string the server sends in the `calling.call.state` event's `call_state` field. - - - The RELAY call-lifecycle states, surfaced as typed, named constants. A call moves through `created` → `ringing` → `answered` → `ending` → `ended`. Each constant's value is the exact wire string the server sends in the `calling.call.state` event's `call_state` field. - - +The constants **are** the canonical wire strings, so nothing about `SignalWire::Relay::Call->state` changes: it still reads and writes a plain string. That keeps parity with the Python reference (bare `str`) and leaves forward-compatible server states working — an unknown string is simply not in this set. + +Grounded in the Python reference's `relay/constants.py` (`CALL_STATE_*` / `CALL_STATES`) and the port's SignalWire::Relay::Constants (`CALL_STATES` / `CALL_TERMINAL_STATES`), which are the single source the lists below are derived from. + +**CONSTANTS** + +Exported on request via Exporter; `:all` pulls every state. + +```perl +CREATED => 'created' +RINGING => 'ringing' +ANSWERED => 'answered' +ENDING => 'ending' +ENDED => 'ended' +``` + +**IS STATE** + +my $bool = SignalWire::Relay::CallState->is\_state($value); + +True if `$value` is a known call state. Returns false (never dies) on `undef` or an unknown/forward-compatible value. + +**IS TERMINAL** + +my $bool = SignalWire::Relay::CallState->is\_terminal($value); + +True if `$value` is a terminal call state (the only terminal `CallState` is `ended`). Returns false on `undef`, a non-terminal state, or an unknown value — it never dies, since these mirror server-emitted values that can grow. + +**LICENSE** + +Copyright (c) 2025 SignalWire. Licensed under the MIT License. + +**STATES** + +my $aref = SignalWire::Relay::CallState->states; + +Arrayref of the call lifecycle states, in lifecycle order. + +**THREE DISTINCT STATE VOCABULARIES** + +CallState, DialState, and MessageState are **distinct** sets with **distinct** terminal members and must never be conflated. `answered` is a **non-terminal** `CallState` but a **terminal** `DialState`; `failed` is not a `CallState` at all. Each module owns its own terminal set. + +**Synopsis** + +```perl +use SignalWire::Relay::CallState qw(CREATED RINGING ANSWERED ENDING ENDED); +``` + +```perl +# Named constants and bare wire strings are interchangeable: +$call->state eq ANSWERED; # constant +$call->state eq 'answered'; # string (Python parity) +``` + +```perl +# Membership / terminality (false on unknown — never dies): +SignalWire::Relay::CallState->is_state('ringing'); # 1 +SignalWire::Relay::CallState->is_terminal('ended'); # 1 +SignalWire::Relay::CallState->is_terminal('answered'); # 0 +SignalWire::Relay::CallState->is_terminal('made_up'); # 0 +@{ SignalWire::Relay::CallState->states }; # created..ended +``` + +## Signature + +```perl +package SignalWire::Relay::CallState +``` + +## See Also + +- SignalWire::Relay::Call, SignalWire::Relay::Constants, SignalWire::Relay::DialState, SignalWire::Relay::MessageState. + +## Constants + + + + + + + + + + + +## Methods + +### is\_state + +#### Signature + +```perl +sub is_state($class, $value) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Relay/CallState.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/CallState.pm) + +Line 84. + +*** + +### is\_terminal + +#### Signature + +```perl +sub is_terminal($class, $value) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Relay/CallState.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/CallState.pm) + +Line 93. + +*** + +### states + +#### Signature + +```perl +sub states() +``` + +#### Source + +[`lib/SignalWire/Relay/CallState.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/CallState.pm) + +Line 78. + +## Source + +[`lib/SignalWire/Relay/CallState.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/CallState.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/relay/call/call/index.mdx b/fern/products/sdk-reference/perl/relay/call/call/index.mdx deleted file mode 100644 index 5f7fe3cf07..0000000000 --- a/fern/products/sdk-reference/perl/relay/call/call/index.mdx +++ /dev/null @@ -1,932 +0,0 @@ ---- -slug: "/reference/perl/relay/call/call" -title: "Call" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Relay::Call" - parent: "relay.Call" - module: "relay.Call" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm" ---- -# `Call` - -SignalWire::Relay::Call is the Perl port of the Python reference's call object. It models one RELAY call: it carries call state, demultiplexes incoming events (updating state, routing to the right SignalWire::Relay::Action by `control_id`, and firing listeners), and exposes the full set of call-control verbs. - -Construction fails fast: `call_id` is required and must be a non-empty string; `device` / `peer` must be hashrefs (Moo `isa` constraints). These objects are created by SignalWire::Relay::Client. - -**ACTION-BASED VERBS** - -`play`, `record`, `detect`, `collect`, `play_and_collect`, `send_fax`, `receive_fax`, `tap`, `stream`, `pay`, `transcribe`, `ai` — each returns a SignalWire::Relay::Action subclass that tracks a `control_id` and resolves when the operation completes. - -**EVENTS** - -- `on($cb)` — register a listener invoked as `$cb->($call, $event)` for every dispatched event. The callback must be a coderef. - -- `dispatch_event($event)` — apply an incoming event (normally called by the client). - -**FIRE-AND-RESPONSE VERBS** - -`answer`, `hangup`, `pass`, `connect`, `disconnect`, `hold`, `unhold`, `denoise`, `denoise_stop`, `transfer`, `join_conference`, `leave_conference`, `echo`, `bind_digit`, `clear_digit_bindings`, `live_transcribe`, `live_translate`, `join_room`, `leave_room`, `amazon_bedrock`, `ai_message`, `ai_hold`, `ai_unhold`, `user_event`, `queue_enter`, `queue_leave`, `refer`, `send_digits`. Each forwards its keyword arguments to the matching RELAY method. - -**LICENSE** - -Copyright (c) 2025 SignalWire. Licensed under the MIT License. - -**TYPED CONVENIENCE WRAPPERS** - -`play_tts`, `play_audio`, `play_silence`, `play_ringtone` build the RELAY media object and delegate to `play`. `detect_digit`, `detect_answering_machine`, `detect_fax` build the detect object and delegate to `detect`. `prompt_tts` / `prompt_audio` play a prompt and collect input via `play_and_collect`. - -**TYPED STATE** - -`state` remains the canonical bare-string accessor (Python parity). These add the SignalWire::Relay::CallState-backed view: - -- `current_state` — the call's lifecycle state as the CallState-typed view. Returns the same wire string as `state` (the CallState constants **are** the wire strings); pair it with `SignalWire::Relay::CallState->is_state` / `->is_terminal` for membership and terminality. - -- `is_terminal` — true once the call has reached a terminal lifecycle state (`ended`). Delegates to SignalWire::Relay::CallState so the terminal definition lives in one place; returns false (never dies) on an unknown/forward-compatible state. - -**Synopsis** - -```perl -# Calls are produced by SignalWire::Relay::Client, not constructed -# directly: -$call->answer; -$call->play_tts( text => 'Hello', voice => 'en-US-Neural2-A' ); -``` - -```perl -my $rec = $call->record( record => { ... } ); # returns an Action -$rec->on_completed(sub ($a) { ... }); -``` - -```perl -$call->on(sub ($c, $event) { ... }); # raw event listener -$call->hangup; -``` - -## Signature - -```perl -package SignalWire::Relay::Call -``` - -## See Also - -- SignalWire::Relay::Client, SignalWire::Relay::Action, SignalWire::Relay::Event, SignalWire::Relay::Constants, SignalWire::Relay::CallState, SignalWire::Relay::Device. - -## Methods - -### ai - -#### Signature - -```perl -sub ai() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 491. - -*** - -### ai\_hold - -#### Signature - -```perl -sub ai_hold() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 283. - -*** - -### ai\_message - -#### Signature - -```perl -sub ai_message() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 279. - -*** - -### ai\_unhold - -#### Signature - -```perl -sub ai_unhold() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 287. - -*** - -### amazon\_bedrock - -#### Signature - -```perl -sub amazon_bedrock() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 275. - -*** - -### answer - -#### Signature - -```perl -sub answer() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 196. - -*** - -### bind\_digit - -#### Signature - -```perl -sub bind_digit() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 248. - -*** - -### clear\_digit\_bindings - -#### Signature - -```perl -sub clear_digit_bindings() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 252. - -*** - -### collect - -#### Signature - -```perl -sub collect() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 408. - -*** - -### connect - -#### Signature - -```perl -sub connect() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 208. - -*** - -### current\_state - -#### Signature - -```perl -sub current_state() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 174. - -*** - -### denoise - -#### Signature - -```perl -sub denoise() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 224. - -*** - -### denoise\_stop - -#### Signature - -```perl -sub denoise_stop() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 228. - -*** - -### detect - -#### Signature - -```perl -sub detect() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 363. - -*** - -### detect\_answering\_machine - -#### Signature - -```perl -sub detect_answering_machine() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 383. - -*** - -### detect\_digit - -#### Signature - -```perl -sub detect_digit() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 374. - -*** - -### detect\_fax - -#### Signature - -```perl -sub detect_fax() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 399. - -*** - -### disconnect - -#### Signature - -```perl -sub disconnect() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 212. - -*** - -### dispatch\_event - -#### Signature - -```perl -sub dispatch_event() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 98. - -*** - -### echo - -#### Signature - -```perl -sub echo() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 244. - -*** - -### hangup - -#### Signature - -```perl -sub hangup() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 200. - -*** - -### hold - -#### Signature - -```perl -sub hold() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 216. - -*** - -### is\_terminal - -#### Signature - -```perl -sub is_terminal() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 182. - -*** - -### join\_conference - -#### Signature - -```perl -sub join_conference() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 236. - -*** - -### join\_room - -#### Signature - -```perl -sub join_room() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 264. - -*** - -### leave\_conference - -#### Signature - -```perl -sub leave_conference() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 240. - -*** - -### leave\_room - -#### Signature - -```perl -sub leave_room() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 268. - -*** - -### live\_transcribe - -#### Signature - -```perl -sub live_transcribe() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 256. - -*** - -### live\_translate - -#### Signature - -```perl -sub live_translate() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 260. - -*** - -### on - -#### Signature - -```perl -sub on() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 156. - -*** - -### pass - -#### Signature - -```perl -sub pass() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 204. - -*** - -### pay - -#### Signature - -```perl -sub pay() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 483. - -*** - -### play - -#### Signature - -```perl -sub play() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 313. - -*** - -### play\_and\_collect - -#### Signature - -```perl -sub play_and_collect() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 412. - -*** - -### play\_audio - -#### Signature - -```perl -sub play_audio() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 337. - -*** - -### play\_ringtone - -#### Signature - -```perl -sub play_ringtone() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 350. - -*** - -### play\_silence - -#### Signature - -```perl -sub play_silence() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 344. - -*** - -### play\_tts - -#### Signature - -```perl -sub play_tts() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 326. - -*** - -### prompt\_audio - -#### Signature - -```perl -sub prompt_audio() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 436. - -*** - -### prompt\_tts - -#### Signature - -```perl -sub prompt_tts() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 422. - -*** - -### queue\_enter - -#### Signature - -```perl -sub queue_enter() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 295. - -*** - -### queue\_leave - -#### Signature - -```perl -sub queue_leave() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 299. - -*** - -### receive\_fax - -#### Signature - -```perl -sub receive_fax() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 451. - -*** - -### record - -#### Signature - -```perl -sub record() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 359. - -*** - -### refer - -#### Signature - -```perl -sub refer() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 303. - -*** - -### send\_digits - -#### Signature - -```perl -sub send_digits() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 307. - -*** - -### send\_fax - -#### Signature - -```perl -sub send_fax() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 446. - -*** - -### stream - -#### Signature - -```perl -sub stream() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 479. - -*** - -### tap - -#### Signature - -```perl -sub tap() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 475. - -*** - -### transcribe - -#### Signature - -```perl -sub transcribe() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 487. - -*** - -### transfer - -#### Signature - -```perl -sub transfer() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 232. - -*** - -### unhold - -#### Signature - -```perl -sub unhold() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 220. - -*** - -### user\_event - -#### Signature - -```perl -sub user_event() -``` - -#### Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 291. - -## Source - -[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/relay/call/index.mdx b/fern/products/sdk-reference/perl/relay/call/index.mdx index 01cfe19200..31fa56b3fb 100644 --- a/fern/products/sdk-reference/perl/relay/call/index.mdx +++ b/fern/products/sdk-reference/perl/relay/call/index.mdx @@ -5,18 +5,928 @@ sdk_label: "Perl SDK" icon: "perl" lustri: auto_generated: true - kind: "module" + kind: "class" language: "perl" - qualified_name: "relay.Call" + qualified_name: "SignalWire::Relay::Call" parent: "relay" module: "relay" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm" --- # `Call` -## Classes +SignalWire::Relay::Call is the Perl port of the Python reference's call object. It models one RELAY call: it carries call state, demultiplexes incoming events (updating state, routing to the right SignalWire::Relay::Action by `control_id`, and firing listeners), and exposes the full set of call-control verbs. - - - SignalWire::Relay::Call is the Perl port of the Python reference's call object. It models one RELAY call: it carries call state, demultiplexes incoming events (updating state, routing to the right SignalWire::Relay::Action by `control_id`, and firing listeners), and exposes the full set of call-control verbs. - - +Construction fails fast: `call_id` is required and must be a non-empty string; `device` / `peer` must be hashrefs (Moo `isa` constraints). These objects are created by SignalWire::Relay::Client. + +**ACTION-BASED VERBS** + +`play`, `record`, `detect`, `collect`, `play_and_collect`, `send_fax`, `receive_fax`, `tap`, `stream`, `pay`, `transcribe`, `ai` — each returns a SignalWire::Relay::Action subclass that tracks a `control_id` and resolves when the operation completes. + +**EVENTS** + +- `on($cb)` — register a listener invoked as `$cb->($call, $event)` for every dispatched event. The callback must be a coderef. + +- `dispatch_event($event)` — apply an incoming event (normally called by the client). + +**FIRE-AND-RESPONSE VERBS** + +`answer`, `hangup`, `pass`, `connect`, `disconnect`, `hold`, `unhold`, `denoise`, `denoise_stop`, `transfer`, `join_conference`, `leave_conference`, `echo`, `bind_digit`, `clear_digit_bindings`, `live_transcribe`, `live_translate`, `join_room`, `leave_room`, `amazon_bedrock`, `ai_message`, `ai_hold`, `ai_unhold`, `user_event`, `queue_enter`, `queue_leave`, `refer`, `send_digits`. Each forwards its keyword arguments to the matching RELAY method. + +**LICENSE** + +Copyright (c) 2025 SignalWire. Licensed under the MIT License. + +**TYPED CONVENIENCE WRAPPERS** + +`play_tts`, `play_audio`, `play_silence`, `play_ringtone` build the RELAY media object and delegate to `play`. `detect_digit`, `detect_answering_machine`, `detect_fax` build the detect object and delegate to `detect`. `prompt_tts` / `prompt_audio` play a prompt and collect input via `play_and_collect`. + +**TYPED STATE** + +`state` remains the canonical bare-string accessor (Python parity). These add the SignalWire::Relay::CallState-backed view: + +- `current_state` — the call's lifecycle state as the CallState-typed view. Returns the same wire string as `state` (the CallState constants **are** the wire strings); pair it with `SignalWire::Relay::CallState->is_state` / `->is_terminal` for membership and terminality. + +- `is_terminal` — true once the call has reached a terminal lifecycle state (`ended`). Delegates to SignalWire::Relay::CallState so the terminal definition lives in one place; returns false (never dies) on an unknown/forward-compatible state. + +**Synopsis** + +```perl +# Calls are produced by SignalWire::Relay::Client, not constructed +# directly: +$call->answer; +$call->play_tts( text => 'Hello', voice => 'en-US-Neural2-A' ); +``` + +```perl +my $rec = $call->record( record => { ... } ); # returns an Action +$rec->on_completed(sub ($a) { ... }); +``` + +```perl +$call->on(sub ($c, $event) { ... }); # raw event listener +$call->hangup; +``` + +## Signature + +```perl +package SignalWire::Relay::Call +``` + +## See Also + +- SignalWire::Relay::Client, SignalWire::Relay::Action, SignalWire::Relay::Event, SignalWire::Relay::Constants, SignalWire::Relay::CallState, SignalWire::Relay::Device. + +## Methods + +### ai + +#### Signature + +```perl +sub ai() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 491. + +*** + +### ai\_hold + +#### Signature + +```perl +sub ai_hold() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 283. + +*** + +### ai\_message + +#### Signature + +```perl +sub ai_message() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 279. + +*** + +### ai\_unhold + +#### Signature + +```perl +sub ai_unhold() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 287. + +*** + +### amazon\_bedrock + +#### Signature + +```perl +sub amazon_bedrock() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 275. + +*** + +### answer + +#### Signature + +```perl +sub answer() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 196. + +*** + +### bind\_digit + +#### Signature + +```perl +sub bind_digit() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 248. + +*** + +### clear\_digit\_bindings + +#### Signature + +```perl +sub clear_digit_bindings() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 252. + +*** + +### collect + +#### Signature + +```perl +sub collect() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 408. + +*** + +### connect + +#### Signature + +```perl +sub connect() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 208. + +*** + +### current\_state + +#### Signature + +```perl +sub current_state() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 174. + +*** + +### denoise + +#### Signature + +```perl +sub denoise() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 224. + +*** + +### denoise\_stop + +#### Signature + +```perl +sub denoise_stop() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 228. + +*** + +### detect + +#### Signature + +```perl +sub detect() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 363. + +*** + +### detect\_answering\_machine + +#### Signature + +```perl +sub detect_answering_machine() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 383. + +*** + +### detect\_digit + +#### Signature + +```perl +sub detect_digit() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 374. + +*** + +### detect\_fax + +#### Signature + +```perl +sub detect_fax() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 399. + +*** + +### disconnect + +#### Signature + +```perl +sub disconnect() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 212. + +*** + +### dispatch\_event + +#### Signature + +```perl +sub dispatch_event() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 98. + +*** + +### echo + +#### Signature + +```perl +sub echo() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 244. + +*** + +### hangup + +#### Signature + +```perl +sub hangup() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 200. + +*** + +### hold + +#### Signature + +```perl +sub hold() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 216. + +*** + +### is\_terminal + +#### Signature + +```perl +sub is_terminal() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 182. + +*** + +### join\_conference + +#### Signature + +```perl +sub join_conference() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 236. + +*** + +### join\_room + +#### Signature + +```perl +sub join_room() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 264. + +*** + +### leave\_conference + +#### Signature + +```perl +sub leave_conference() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 240. + +*** + +### leave\_room + +#### Signature + +```perl +sub leave_room() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 268. + +*** + +### live\_transcribe + +#### Signature + +```perl +sub live_transcribe() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 256. + +*** + +### live\_translate + +#### Signature + +```perl +sub live_translate() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 260. + +*** + +### on + +#### Signature + +```perl +sub on() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 156. + +*** + +### pass + +#### Signature + +```perl +sub pass() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 204. + +*** + +### pay + +#### Signature + +```perl +sub pay() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 483. + +*** + +### play + +#### Signature + +```perl +sub play() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 313. + +*** + +### play\_and\_collect + +#### Signature + +```perl +sub play_and_collect() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 412. + +*** + +### play\_audio + +#### Signature + +```perl +sub play_audio() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 337. + +*** + +### play\_ringtone + +#### Signature + +```perl +sub play_ringtone() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 350. + +*** + +### play\_silence + +#### Signature + +```perl +sub play_silence() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 344. + +*** + +### play\_tts + +#### Signature + +```perl +sub play_tts() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 326. + +*** + +### prompt\_audio + +#### Signature + +```perl +sub prompt_audio() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 436. + +*** + +### prompt\_tts + +#### Signature + +```perl +sub prompt_tts() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 422. + +*** + +### queue\_enter + +#### Signature + +```perl +sub queue_enter() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 295. + +*** + +### queue\_leave + +#### Signature + +```perl +sub queue_leave() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 299. + +*** + +### receive\_fax + +#### Signature + +```perl +sub receive_fax() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 451. + +*** + +### record + +#### Signature + +```perl +sub record() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 359. + +*** + +### refer + +#### Signature + +```perl +sub refer() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 303. + +*** + +### send\_digits + +#### Signature + +```perl +sub send_digits() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 307. + +*** + +### send\_fax + +#### Signature + +```perl +sub send_fax() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 446. + +*** + +### stream + +#### Signature + +```perl +sub stream() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 479. + +*** + +### tap + +#### Signature + +```perl +sub tap() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 475. + +*** + +### transcribe + +#### Signature + +```perl +sub transcribe() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 487. + +*** + +### transfer + +#### Signature + +```perl +sub transfer() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 232. + +*** + +### unhold + +#### Signature + +```perl +sub unhold() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 220. + +*** + +### user\_event + +#### Signature + +```perl +sub user_event() +``` + +#### Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 291. + +## Source + +[`lib/SignalWire/Relay/Call.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Call.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/relay/client/client/index.mdx b/fern/products/sdk-reference/perl/relay/client/client/index.mdx deleted file mode 100644 index 53587027b4..0000000000 --- a/fern/products/sdk-reference/perl/relay/client/client/index.mdx +++ /dev/null @@ -1,359 +0,0 @@ ---- -slug: "/reference/perl/relay/client/client" -title: "Client" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Relay::Client" - parent: "relay.Client" - module: "relay.Client" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm" ---- -# `Client` - -SignalWire::Relay::Client is the Perl port of the Python reference's `RelayClient`. It owns the RELAY WebSocket transport, performs the `signalwire.connect` handshake, runs a synchronous JSON-RPC request/ response loop, demultiplexes server-initiated events into typed SignalWire::Relay::Event objects, and routes them to the right SignalWire::Relay::Call / SignalWire::Relay::Message. - -Construction fails fast: `host` is required and must be a non-empty string; `contexts` must be an arrayref (Moo `isa` constraints). - -**CONNECTION** - -`connect` (open WS + authenticate), `disconnect`, `connect_ws`, `authenticate`, `reconnect`, `disconnect_ws`, and `run` (the blocking read loop). - -**HANDLER REGISTRATION** - -- `on_call($cb)` — `$cb->($call)` for each inbound call. - -- `on_message($cb)` — `$cb->($event)` for each inbound message. - -- `on_event($cb)` — `$cb->($event)` for every event. - -Each callback must be a coderef; each returns `$self` for chaining. - -**LICENSE** - -Copyright (c) 2025 SignalWire. Licensed under the MIT License. - -**RPC AND OPERATIONS** - -- `execute($method, $params)` — issue a JSON-RPC call and block for the result. - -- `dial(%opts)` — place an outbound call; returns the answered SignalWire::Relay::Call. - -- `send_message(%opts)` — send an SMS/MMS; returns a SignalWire::Relay::Message handle. - -- `receive($contexts)` / `unreceive($contexts)` — subscribe / unsubscribe to inbound contexts. Accepts an arrayref (canonical) or a bare list. - -**Synopsis** - -```perl -use SignalWire::Relay::Client; -``` - -```perl -my $client = SignalWire::Relay::Client->new( - host => 'relay.example.com', - project => $project, - token => $token, -); -``` - -```perl -$client->on_call(sub ($call) { $call->answer; }); -$client->connect; # opens WS + authenticates -$client->receive(['office']); # subscribe to inbound contexts -``` - -```perl -my $call = $client->dial( devices => [...] ); # outbound -my $msg = $client->send_message( to_number => $to, - from_number => $from, - body => 'hi' ); -``` - -```perl -$client->run; # block in the event loop -$client->disconnect; -``` - -## Signature - -```perl -package SignalWire::Relay::Client -``` - -## See Also - -- SignalWire::Relay::Call, SignalWire::Relay::Message, SignalWire::Relay::Event, SignalWire::Relay::Constants, and the RELAY protocol guide in porting-sdk/RELAY\_IMPLEMENTATION\_GUIDE.md. - -## Methods - -### authenticate - -#### Signature - -```perl -sub authenticate() -``` - -#### Source - -[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) - -Line 228. - -*** - -### connect - -#### Signature - -```perl -sub connect() -``` - -#### Source - -[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) - -Line 128. - -*** - -### connect\_ws - -#### Signature - -```perl -sub connect_ws() -``` - -#### Source - -[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) - -Line 142. - -*** - -### dial - -#### Signature - -```perl -sub dial() -``` - -#### Source - -[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) - -Line 411. - -*** - -### disconnect - -#### Signature - -```perl -sub disconnect() -``` - -#### Source - -[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) - -Line 138. - -*** - -### disconnect\_ws - -#### Signature - -```perl -sub disconnect_ws() -``` - -#### Source - -[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) - -Line 763. - -*** - -### execute - -#### Signature - -```perl -sub execute() -``` - -#### Source - -[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) - -Line 279. - -*** - -### on\_call - -#### Signature - -```perl -sub on_call() -``` - -#### Source - -[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) - -Line 105. - -*** - -### on\_event - -#### Signature - -```perl -sub on_event() -``` - -#### Source - -[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) - -Line 117. - -*** - -### on\_message - -#### Signature - -```perl -sub on_message() -``` - -#### Source - -[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) - -Line 111. - -*** - -### receive - -#### Signature - -```perl -sub receive($contexts) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) - -Line 372. - -*** - -### reconnect - -#### Signature - -```perl -sub reconnect() -``` - -#### Source - -[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) - -Line 731. - -*** - -### relay\_protocol - -#### Signature - -```perl -sub relay_protocol() -``` - -#### Source - -[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) - -Line 66. - -*** - -### run - -#### Signature - -```perl -sub run() -``` - -#### Source - -[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) - -Line 774. - -*** - -### send\_message - -#### Signature - -```perl -sub send_message() -``` - -#### Source - -[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) - -Line 325. - -*** - -### unreceive - -#### Signature - -```perl -sub unreceive($contexts) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) - -Line 393. - -## Source - -[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/relay/client/index.mdx b/fern/products/sdk-reference/perl/relay/client/index.mdx index e5c1343a31..bd9967e1dc 100644 --- a/fern/products/sdk-reference/perl/relay/client/index.mdx +++ b/fern/products/sdk-reference/perl/relay/client/index.mdx @@ -5,18 +5,355 @@ sdk_label: "Perl SDK" icon: "perl" lustri: auto_generated: true - kind: "module" + kind: "class" language: "perl" - qualified_name: "relay.Client" + qualified_name: "SignalWire::Relay::Client" parent: "relay" module: "relay" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm" --- # `Client` -## Classes +SignalWire::Relay::Client is the Perl port of the Python reference's `RelayClient`. It owns the RELAY WebSocket transport, performs the `signalwire.connect` handshake, runs a synchronous JSON-RPC request/ response loop, demultiplexes server-initiated events into typed SignalWire::Relay::Event objects, and routes them to the right SignalWire::Relay::Call / SignalWire::Relay::Message. - - - SignalWire::Relay::Client is the Perl port of the Python reference's `RelayClient`. It owns the RELAY WebSocket transport, performs the `signalwire.connect` handshake, runs a synchronous JSON-RPC request/ response loop, demultiplexes server-initiated events into typed SignalWire::Relay::Event objects, and routes them to the right SignalWire::Relay::Call / SignalWire::Relay::Message. - - +Construction fails fast: `host` is required and must be a non-empty string; `contexts` must be an arrayref (Moo `isa` constraints). + +**CONNECTION** + +`connect` (open WS + authenticate), `disconnect`, `connect_ws`, `authenticate`, `reconnect`, `disconnect_ws`, and `run` (the blocking read loop). + +**HANDLER REGISTRATION** + +- `on_call($cb)` — `$cb->($call)` for each inbound call. + +- `on_message($cb)` — `$cb->($event)` for each inbound message. + +- `on_event($cb)` — `$cb->($event)` for every event. + +Each callback must be a coderef; each returns `$self` for chaining. + +**LICENSE** + +Copyright (c) 2025 SignalWire. Licensed under the MIT License. + +**RPC AND OPERATIONS** + +- `execute($method, $params)` — issue a JSON-RPC call and block for the result. + +- `dial(%opts)` — place an outbound call; returns the answered SignalWire::Relay::Call. + +- `send_message(%opts)` — send an SMS/MMS; returns a SignalWire::Relay::Message handle. + +- `receive($contexts)` / `unreceive($contexts)` — subscribe / unsubscribe to inbound contexts. Accepts an arrayref (canonical) or a bare list. + +**Synopsis** + +```perl +use SignalWire::Relay::Client; +``` + +```perl +my $client = SignalWire::Relay::Client->new( + host => 'relay.example.com', + project => $project, + token => $token, +); +``` + +```perl +$client->on_call(sub ($call) { $call->answer; }); +$client->connect; # opens WS + authenticates +$client->receive(['office']); # subscribe to inbound contexts +``` + +```perl +my $call = $client->dial( devices => [...] ); # outbound +my $msg = $client->send_message( to_number => $to, + from_number => $from, + body => 'hi' ); +``` + +```perl +$client->run; # block in the event loop +$client->disconnect; +``` + +## Signature + +```perl +package SignalWire::Relay::Client +``` + +## See Also + +- SignalWire::Relay::Call, SignalWire::Relay::Message, SignalWire::Relay::Event, SignalWire::Relay::Constants, and the RELAY protocol guide in porting-sdk/RELAY\_IMPLEMENTATION\_GUIDE.md. + +## Methods + +### authenticate + +#### Signature + +```perl +sub authenticate() +``` + +#### Source + +[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) + +Line 228. + +*** + +### connect + +#### Signature + +```perl +sub connect() +``` + +#### Source + +[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) + +Line 128. + +*** + +### connect\_ws + +#### Signature + +```perl +sub connect_ws() +``` + +#### Source + +[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) + +Line 142. + +*** + +### dial + +#### Signature + +```perl +sub dial() +``` + +#### Source + +[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) + +Line 411. + +*** + +### disconnect + +#### Signature + +```perl +sub disconnect() +``` + +#### Source + +[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) + +Line 138. + +*** + +### disconnect\_ws + +#### Signature + +```perl +sub disconnect_ws() +``` + +#### Source + +[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) + +Line 763. + +*** + +### execute + +#### Signature + +```perl +sub execute() +``` + +#### Source + +[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) + +Line 279. + +*** + +### on\_call + +#### Signature + +```perl +sub on_call() +``` + +#### Source + +[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) + +Line 105. + +*** + +### on\_event + +#### Signature + +```perl +sub on_event() +``` + +#### Source + +[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) + +Line 117. + +*** + +### on\_message + +#### Signature + +```perl +sub on_message() +``` + +#### Source + +[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) + +Line 111. + +*** + +### receive + +#### Signature + +```perl +sub receive($contexts) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) + +Line 372. + +*** + +### reconnect + +#### Signature + +```perl +sub reconnect() +``` + +#### Source + +[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) + +Line 731. + +*** + +### relay\_protocol + +#### Signature + +```perl +sub relay_protocol() +``` + +#### Source + +[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) + +Line 66. + +*** + +### run + +#### Signature + +```perl +sub run() +``` + +#### Source + +[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) + +Line 774. + +*** + +### send\_message + +#### Signature + +```perl +sub send_message() +``` + +#### Source + +[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) + +Line 325. + +*** + +### unreceive + +#### Signature + +```perl +sub unreceive($contexts) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) + +Line 393. + +## Source + +[`lib/SignalWire/Relay/Client.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Client.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/relay/constants/constants/index.mdx b/fern/products/sdk-reference/perl/relay/constants/constants/index.mdx deleted file mode 100644 index 48370bfe4a..0000000000 --- a/fern/products/sdk-reference/perl/relay/constants/constants/index.mdx +++ /dev/null @@ -1,77 +0,0 @@ ---- -slug: "/reference/perl/relay/constants/constants" -title: "Constants" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "module" - language: "perl" - qualified_name: "SignalWire::Relay::Constants" - parent: "relay.Constants" - module: "relay.Constants" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Constants.pm" ---- -# `Constants` - -## Signature - -```perl -package SignalWire::Relay::Constants -``` - -## Constants - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -## Source - -[`lib/SignalWire/Relay/Constants.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Constants.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/relay/constants/index.mdx b/fern/products/sdk-reference/perl/relay/constants/index.mdx index 392eafc1d5..c195b1f536 100644 --- a/fern/products/sdk-reference/perl/relay/constants/index.mdx +++ b/fern/products/sdk-reference/perl/relay/constants/index.mdx @@ -7,14 +7,71 @@ lustri: auto_generated: true kind: "module" language: "perl" - qualified_name: "relay.Constants" + qualified_name: "SignalWire::Relay::Constants" parent: "relay" module: "relay" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Constants.pm" --- # `Constants` -## Modules +## Signature - - - +```perl +package SignalWire::Relay::Constants +``` + +## Constants + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## Source + +[`lib/SignalWire/Relay/Constants.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Constants.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/relay/device/device/index.mdx b/fern/products/sdk-reference/perl/relay/device/device/index.mdx deleted file mode 100644 index db3d5558dd..0000000000 --- a/fern/products/sdk-reference/perl/relay/device/device/index.mdx +++ /dev/null @@ -1,106 +0,0 @@ ---- -slug: "/reference/perl/relay/device/device" -title: "Device" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Relay::Device" - parent: "relay.Device" - module: "relay.Device" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Device.pm" ---- -# `Device` - -A RELAY **device** object — the `{ type, params }` pair that names one leg of a dial / connect / refer / tap target. It recurs as a raw hashref across the relay calling layer (`$client->dial(devices => [...])`, `$call->connect` / `$call->refer`, and the `device` field on SignalWire::Relay::Call / the `CallState` / `CallReceive` events). - -This class types the **shape** of that hashref so callers can build one with a constructor and named accessors instead of hand-assembling a nested map. "to\_hash" yields the byte-identical wire hashref the raw form produced, so a `Device` is a drop-in replacement wherever a device hashref is accepted — the existing relay verbs are unchanged (additive, parity-preserving). - -Grounded in `relay-protocol/calling.connect.params.json` and `calling.dial.params.json`, where each device is `{ "type": , "params": }` with `type` required. - -**LICENSE** - -Copyright (c) 2025 SignalWire. Licensed under the MIT License. - -**THE SHAPE IS TYPED; THE DISCRIMINANT IS NOT** - -`type` is kept a plain **string**: the device-type set (`phone`, `sip`, ...) is **not** enumerated in the wire schema (it is an open `{ "type": "string" }`), so turning it into a closed enum would reject valid and forward-compatible values. Per the idiom rule, this class types the **knowable shape** and leaves the **unbounded discriminant** a string. `params` is a per-type arbitrary object, also left untyped. - -Construction fails fast (Moo `isa`): `type` is required and must be a non-empty string; `params` must be a hashref when supplied. - -**TO HASH** - -my $wire = $device->to\_hash; - -Return the canonical RELAY device wire hashref `{ type, params }` — exactly the raw shape the relay verbs already accept. `params` is snapshotted at construction and copied again here, so each emitted hash is independent: mutating one `to_hash` never affects the Device or a later emission, and a mutation of the caller's original hashref after construction does not leak in. - -**TYPE** - -The device type discriminant (e.g. `phone`, `sip`). Required, read-only, a non-empty string. - -**Synopsis** - -```perl -use SignalWire::Relay::Device; -``` - -```perl -my $device = SignalWire::Relay::Device->new( - type => 'phone', - params => { - to_number => '+15551234567', - from_number => '+15557654321', - timeout => 30, - }, -); -``` - -```perl -$device->type; # 'phone' -$device->params; # { to_number => ..., from_number => ..., timeout => 30 } -``` - -```perl -# to_hash yields the exact wire hashref the relay verbs accept: -my $wire = $device->to_hash; -# { type => 'phone', params => { to_number => ..., ... } } -``` - -```perl -# Drop-in for the hand-written hashref in a devices matrix: -$call->connect( devices => [[ $device->to_hash ]] ); -``` - -## Signature - -```perl -package SignalWire::Relay::Device -``` - -## See Also - -- SignalWire::Relay::Call, SignalWire::Relay::Client, SignalWire::Relay::Event. - -## Methods - -### to\_hash - -#### Signature - -```perl -sub to_hash() -``` - -#### Source - -[`lib/SignalWire/Relay/Device.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Device.pm) - -Line 78. - -## Source - -[`lib/SignalWire/Relay/Device.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Device.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/relay/device/index.mdx b/fern/products/sdk-reference/perl/relay/device/index.mdx index bcc6249e4b..274ca9a116 100644 --- a/fern/products/sdk-reference/perl/relay/device/index.mdx +++ b/fern/products/sdk-reference/perl/relay/device/index.mdx @@ -5,18 +5,102 @@ sdk_label: "Perl SDK" icon: "perl" lustri: auto_generated: true - kind: "module" + kind: "class" language: "perl" - qualified_name: "relay.Device" + qualified_name: "SignalWire::Relay::Device" parent: "relay" module: "relay" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Device.pm" --- # `Device` -## Classes +A RELAY **device** object — the `{ type, params }` pair that names one leg of a dial / connect / refer / tap target. It recurs as a raw hashref across the relay calling layer (`$client->dial(devices => [...])`, `$call->connect` / `$call->refer`, and the `device` field on SignalWire::Relay::Call / the `CallState` / `CallReceive` events). - - - A RELAY **device** object — the `{ type, params }` pair that names one leg of a dial / connect / refer / tap target. It recurs as a raw hashref across the relay calling layer (`$client->dial(devices => [...])`, `$call->connect` / `$call->refer`, and the `device` field on SignalWire::Relay::Call / the `CallState` / `CallReceive` events). - - +This class types the **shape** of that hashref so callers can build one with a constructor and named accessors instead of hand-assembling a nested map. "to\_hash" yields the byte-identical wire hashref the raw form produced, so a `Device` is a drop-in replacement wherever a device hashref is accepted — the existing relay verbs are unchanged (additive, parity-preserving). + +Grounded in `relay-protocol/calling.connect.params.json` and `calling.dial.params.json`, where each device is `{ "type": , "params": }` with `type` required. + +**LICENSE** + +Copyright (c) 2025 SignalWire. Licensed under the MIT License. + +**THE SHAPE IS TYPED; THE DISCRIMINANT IS NOT** + +`type` is kept a plain **string**: the device-type set (`phone`, `sip`, ...) is **not** enumerated in the wire schema (it is an open `{ "type": "string" }`), so turning it into a closed enum would reject valid and forward-compatible values. Per the idiom rule, this class types the **knowable shape** and leaves the **unbounded discriminant** a string. `params` is a per-type arbitrary object, also left untyped. + +Construction fails fast (Moo `isa`): `type` is required and must be a non-empty string; `params` must be a hashref when supplied. + +**TO HASH** + +my $wire = $device->to\_hash; + +Return the canonical RELAY device wire hashref `{ type, params }` — exactly the raw shape the relay verbs already accept. `params` is snapshotted at construction and copied again here, so each emitted hash is independent: mutating one `to_hash` never affects the Device or a later emission, and a mutation of the caller's original hashref after construction does not leak in. + +**TYPE** + +The device type discriminant (e.g. `phone`, `sip`). Required, read-only, a non-empty string. + +**Synopsis** + +```perl +use SignalWire::Relay::Device; +``` + +```perl +my $device = SignalWire::Relay::Device->new( + type => 'phone', + params => { + to_number => '+15551234567', + from_number => '+15557654321', + timeout => 30, + }, +); +``` + +```perl +$device->type; # 'phone' +$device->params; # { to_number => ..., from_number => ..., timeout => 30 } +``` + +```perl +# to_hash yields the exact wire hashref the relay verbs accept: +my $wire = $device->to_hash; +# { type => 'phone', params => { to_number => ..., ... } } +``` + +```perl +# Drop-in for the hand-written hashref in a devices matrix: +$call->connect( devices => [[ $device->to_hash ]] ); +``` + +## Signature + +```perl +package SignalWire::Relay::Device +``` + +## See Also + +- SignalWire::Relay::Call, SignalWire::Relay::Client, SignalWire::Relay::Event. + +## Methods + +### to\_hash + +#### Signature + +```perl +sub to_hash() +``` + +#### Source + +[`lib/SignalWire/Relay/Device.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Device.pm) + +Line 78. + +## Source + +[`lib/SignalWire/Relay/Device.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Device.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/relay/dial-state/dial-state/index.mdx b/fern/products/sdk-reference/perl/relay/dial-state/dial-state/index.mdx deleted file mode 100644 index 05b952f323..0000000000 --- a/fern/products/sdk-reference/perl/relay/dial-state/dial-state/index.mdx +++ /dev/null @@ -1,162 +0,0 @@ ---- -slug: "/reference/perl/relay/dial-state/dial-state" -title: "DialState" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Relay::DialState" - parent: "relay.DialState" - module: "relay.DialState" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/DialState.pm" ---- -# `DialState` - -The RELAY dial-outcome states, surfaced as typed, named constants. An outbound dial reports progress via the `calling.call.dial` event's `dial_state` field: `dialing` while in progress, then a terminal outcome of `answered` (a leg picked up — the dial succeeded) or `failed` (no leg answered). Each constant's value is the exact wire string the server sends. - -The constants **are** the canonical wire strings, so the dial flow is unchanged: it still compares plain strings (see SignalWire::Relay::Client's dial dispatch, which resolves a pending dial on `answered` and rejects on `failed`). That keeps parity with the Python reference and leaves forward-compatible server states working. - -Grounded in the port's SignalWire::Relay::Constants (`DIAL_STATES` / `DIAL_TERMINAL_STATES`), which are the single source the lists below are derived from. - -**CONSTANTS** - -Exported on request via Exporter; `:all` pulls every state. - -```perl -DIALING => 'dialing' -ANSWERED => 'answered' -FAILED => 'failed' -``` - -**IS STATE** - -my $bool = SignalWire::Relay::DialState->is\_state($value); - -True if `$value` is a known dial state. Returns false (never dies) on `undef` or an unknown/forward-compatible value. - -**IS TERMINAL** - -my $bool = SignalWire::Relay::DialState->is\_terminal($value); - -True if `$value` is a terminal dial state (`answered` or `failed`). Returns false on `undef`, the in-progress `dialing` state, or an unknown value — it never dies, since these mirror server-emitted values that can grow. - -**LICENSE** - -Copyright (c) 2025 SignalWire. Licensed under the MIT License. - -**STATES** - -my $aref = SignalWire::Relay::DialState->states; - -Arrayref of the dial-outcome states, in order. - -**THREE DISTINCT STATE VOCABULARIES** - -CallState, `DialState`, and MessageState are **distinct** sets and must never be conflated. `answered` is a **terminal** `DialState` but a **non-terminal** `CallState` — the same string with opposite terminality, because they are different vocabularies. `failed` is not a `CallState` at all. - -**Synopsis** - -```perl -use SignalWire::Relay::DialState qw(DIALING ANSWERED FAILED); -``` - -```perl -# Named constants and bare wire strings are interchangeable: -$event->dial_state eq ANSWERED; # constant -$event->dial_state eq 'answered'; # string (Python parity) -``` - -```perl -# Membership / terminality (false on unknown — never dies): -SignalWire::Relay::DialState->is_state('dialing'); # 1 -SignalWire::Relay::DialState->is_terminal('answered'); # 1 -SignalWire::Relay::DialState->is_terminal('failed'); # 1 -SignalWire::Relay::DialState->is_terminal('dialing'); # 0 -@{ SignalWire::Relay::DialState->states }; # dialing, answered, failed -``` - -## Signature - -```perl -package SignalWire::Relay::DialState -``` - -## See Also - -- SignalWire::Relay::Client, SignalWire::Relay::Constants, SignalWire::Relay::CallState, SignalWire::Relay::MessageState. - -## Constants - - - - - - - -## Methods - -### is\_state - -#### Signature - -```perl -sub is_state($class, $value) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/Relay/DialState.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/DialState.pm) - -Line 85. - -*** - -### is\_terminal - -#### Signature - -```perl -sub is_terminal($class, $value) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/Relay/DialState.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/DialState.pm) - -Line 95. - -*** - -### states - -#### Signature - -```perl -sub states() -``` - -#### Source - -[`lib/SignalWire/Relay/DialState.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/DialState.pm) - -Line 79. - -## Source - -[`lib/SignalWire/Relay/DialState.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/DialState.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/relay/dial-state/index.mdx b/fern/products/sdk-reference/perl/relay/dial-state/index.mdx index 8b4156b13d..5dc3cb00a3 100644 --- a/fern/products/sdk-reference/perl/relay/dial-state/index.mdx +++ b/fern/products/sdk-reference/perl/relay/dial-state/index.mdx @@ -5,18 +5,158 @@ sdk_label: "Perl SDK" icon: "perl" lustri: auto_generated: true - kind: "module" + kind: "class" language: "perl" - qualified_name: "relay.DialState" + qualified_name: "SignalWire::Relay::DialState" parent: "relay" module: "relay" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/DialState.pm" --- # `DialState` -## Classes +The RELAY dial-outcome states, surfaced as typed, named constants. An outbound dial reports progress via the `calling.call.dial` event's `dial_state` field: `dialing` while in progress, then a terminal outcome of `answered` (a leg picked up — the dial succeeded) or `failed` (no leg answered). Each constant's value is the exact wire string the server sends. - - - The RELAY dial-outcome states, surfaced as typed, named constants. An outbound dial reports progress via the `calling.call.dial` event's `dial_state` field: `dialing` while in progress, then a terminal outcome of `answered` (a leg picked up — the dial succeeded) or `failed` (no leg answered). Each constant's value is the exact wire string the server sends. - - +The constants **are** the canonical wire strings, so the dial flow is unchanged: it still compares plain strings (see SignalWire::Relay::Client's dial dispatch, which resolves a pending dial on `answered` and rejects on `failed`). That keeps parity with the Python reference and leaves forward-compatible server states working. + +Grounded in the port's SignalWire::Relay::Constants (`DIAL_STATES` / `DIAL_TERMINAL_STATES`), which are the single source the lists below are derived from. + +**CONSTANTS** + +Exported on request via Exporter; `:all` pulls every state. + +```perl +DIALING => 'dialing' +ANSWERED => 'answered' +FAILED => 'failed' +``` + +**IS STATE** + +my $bool = SignalWire::Relay::DialState->is\_state($value); + +True if `$value` is a known dial state. Returns false (never dies) on `undef` or an unknown/forward-compatible value. + +**IS TERMINAL** + +my $bool = SignalWire::Relay::DialState->is\_terminal($value); + +True if `$value` is a terminal dial state (`answered` or `failed`). Returns false on `undef`, the in-progress `dialing` state, or an unknown value — it never dies, since these mirror server-emitted values that can grow. + +**LICENSE** + +Copyright (c) 2025 SignalWire. Licensed under the MIT License. + +**STATES** + +my $aref = SignalWire::Relay::DialState->states; + +Arrayref of the dial-outcome states, in order. + +**THREE DISTINCT STATE VOCABULARIES** + +CallState, `DialState`, and MessageState are **distinct** sets and must never be conflated. `answered` is a **terminal** `DialState` but a **non-terminal** `CallState` — the same string with opposite terminality, because they are different vocabularies. `failed` is not a `CallState` at all. + +**Synopsis** + +```perl +use SignalWire::Relay::DialState qw(DIALING ANSWERED FAILED); +``` + +```perl +# Named constants and bare wire strings are interchangeable: +$event->dial_state eq ANSWERED; # constant +$event->dial_state eq 'answered'; # string (Python parity) +``` + +```perl +# Membership / terminality (false on unknown — never dies): +SignalWire::Relay::DialState->is_state('dialing'); # 1 +SignalWire::Relay::DialState->is_terminal('answered'); # 1 +SignalWire::Relay::DialState->is_terminal('failed'); # 1 +SignalWire::Relay::DialState->is_terminal('dialing'); # 0 +@{ SignalWire::Relay::DialState->states }; # dialing, answered, failed +``` + +## Signature + +```perl +package SignalWire::Relay::DialState +``` + +## See Also + +- SignalWire::Relay::Client, SignalWire::Relay::Constants, SignalWire::Relay::CallState, SignalWire::Relay::MessageState. + +## Constants + + + + + + + +## Methods + +### is\_state + +#### Signature + +```perl +sub is_state($class, $value) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Relay/DialState.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/DialState.pm) + +Line 85. + +*** + +### is\_terminal + +#### Signature + +```perl +sub is_terminal($class, $value) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Relay/DialState.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/DialState.pm) + +Line 95. + +*** + +### states + +#### Signature + +```perl +sub states() +``` + +#### Source + +[`lib/SignalWire/Relay/DialState.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/DialState.pm) + +Line 79. + +## Source + +[`lib/SignalWire/Relay/DialState.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/DialState.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/relay/event/event/index.mdx b/fern/products/sdk-reference/perl/relay/event/event/index.mdx deleted file mode 100644 index efa09b7762..0000000000 --- a/fern/products/sdk-reference/perl/relay/event/event/index.mdx +++ /dev/null @@ -1,87 +0,0 @@ ---- -slug: "/reference/perl/relay/event/event" -title: "Event" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Relay::Event" - parent: "relay.Event" - module: "relay.Event" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Event.pm" ---- -# `Event` - -SignalWire::Relay::Event is the base class for every RELAY event the client receives. Each concrete event type is a small read-only Moo subclass that exposes the fields relevant to it (for example `::CallState` carries `call_state` / `end_reason` / `peer`, while `::MessageReceive` carries `from_number` / `body` / `media`). All subclasses inherit `event_type`, `timestamp`, and the raw `params` hashref from the base class. - -The event objects are read-only data carriers built from the server payload; they deliberately carry no `isa` constraints so a forward- compatible server shape is never rejected — unknown fields are simply ignored by Moo. - -**EVENT TYPES** - -The recognised `event_type` strings and their subclasses include the `calling.call.*` family (state, receive, dial, connect, disconnect, play, record, collect, detect, fax, tap, stream, transcribe, pay, send\_digits, refer, ai), `calling.conference`, `messaging.receive` / `messaging.state`, and the `signalwire.*` session events (`authorization.state`, `disconnect`). - -**LICENSE** - -Copyright (c) 2025 SignalWire. Licensed under the MIT License. - -**PARSE EVENT** - -my $event = SignalWire::Relay::Event->parse\_event($event\_type, $params); - -Class-method factory. Looks `$event_type` up in the internal event-class map and returns an instance of the matching subclass, populated from `$params` (which defaults to an empty hashref). Unknown event types fall back to a base SignalWire::Relay::Event carrying the raw type and params. Normally called by SignalWire::Relay::Client as it demultiplexes the WebSocket stream. - -**Synopsis** - -```perl -use SignalWire::Relay::Event; -``` - -```perl -my $event = SignalWire::Relay::Event->parse_event( - 'calling.call.state', - { call_id => $id, call_state => 'answered' }, -); -``` - -```perl -$event->event_type; # 'calling.call.state' -$event->call_state; # 'answered' (on the ::CallState subclass) -``` - -## Signature - -```perl -package SignalWire::Relay::Event -``` - -## Inheritance - -**Extends:** [SignalWire::Relay::Event](/docs/sdk-reference/reference/perl/relay/event/event) - -## See Also - -- SignalWire::Relay::Client, SignalWire::Relay::Call, SignalWire::Relay::Message. - -## Methods - -### parse\_event - -#### Signature - -```perl -sub parse_event() -``` - -#### Source - -[`lib/SignalWire/Relay/Event.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Event.pm) - -Line 259. - -## Source - -[`lib/SignalWire/Relay/Event.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Event.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/relay/event/index.mdx b/fern/products/sdk-reference/perl/relay/event/index.mdx index 9c4dc6c12a..85f99f6055 100644 --- a/fern/products/sdk-reference/perl/relay/event/index.mdx +++ b/fern/products/sdk-reference/perl/relay/event/index.mdx @@ -5,18 +5,83 @@ sdk_label: "Perl SDK" icon: "perl" lustri: auto_generated: true - kind: "module" + kind: "class" language: "perl" - qualified_name: "relay.Event" + qualified_name: "SignalWire::Relay::Event" parent: "relay" module: "relay" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Event.pm" --- # `Event` -## Classes +SignalWire::Relay::Event is the base class for every RELAY event the client receives. Each concrete event type is a small read-only Moo subclass that exposes the fields relevant to it (for example `::CallState` carries `call_state` / `end_reason` / `peer`, while `::MessageReceive` carries `from_number` / `body` / `media`). All subclasses inherit `event_type`, `timestamp`, and the raw `params` hashref from the base class. - - - SignalWire::Relay::Event is the base class for every RELAY event the client receives. Each concrete event type is a small read-only Moo subclass that exposes the fields relevant to it (for example `::CallState` carries `call_state` / `end_reason` / `peer`, while `::MessageReceive` carries `from_number` / `body` / `media`). All subclasses inherit `event_type`, `timestamp`, and the raw `params` hashref from the base class. - - +The event objects are read-only data carriers built from the server payload; they deliberately carry no `isa` constraints so a forward- compatible server shape is never rejected — unknown fields are simply ignored by Moo. + +**EVENT TYPES** + +The recognised `event_type` strings and their subclasses include the `calling.call.*` family (state, receive, dial, connect, disconnect, play, record, collect, detect, fax, tap, stream, transcribe, pay, send\_digits, refer, ai), `calling.conference`, `messaging.receive` / `messaging.state`, and the `signalwire.*` session events (`authorization.state`, `disconnect`). + +**LICENSE** + +Copyright (c) 2025 SignalWire. Licensed under the MIT License. + +**PARSE EVENT** + +my $event = SignalWire::Relay::Event->parse\_event($event\_type, $params); + +Class-method factory. Looks `$event_type` up in the internal event-class map and returns an instance of the matching subclass, populated from `$params` (which defaults to an empty hashref). Unknown event types fall back to a base SignalWire::Relay::Event carrying the raw type and params. Normally called by SignalWire::Relay::Client as it demultiplexes the WebSocket stream. + +**Synopsis** + +```perl +use SignalWire::Relay::Event; +``` + +```perl +my $event = SignalWire::Relay::Event->parse_event( + 'calling.call.state', + { call_id => $id, call_state => 'answered' }, +); +``` + +```perl +$event->event_type; # 'calling.call.state' +$event->call_state; # 'answered' (on the ::CallState subclass) +``` + +## Signature + +```perl +package SignalWire::Relay::Event +``` + +## Inheritance + +**Extends:** [SignalWire::Relay::Event](/docs/sdk-reference/reference/perl/relay/event) + +## See Also + +- SignalWire::Relay::Client, SignalWire::Relay::Call, SignalWire::Relay::Message. + +## Methods + +### parse\_event + +#### Signature + +```perl +sub parse_event() +``` + +#### Source + +[`lib/SignalWire/Relay/Event.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Event.pm) + +Line 259. + +## Source + +[`lib/SignalWire/Relay/Event.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Event.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/relay/index.mdx b/fern/products/sdk-reference/perl/relay/index.mdx index b1c26b4d20..4438507847 100644 --- a/fern/products/sdk-reference/perl/relay/index.mdx +++ b/fern/products/sdk-reference/perl/relay/index.mdx @@ -11,26 +11,48 @@ lustri: --- # `relay` -## Modules +## Classes - + + SignalWire::Relay::Action is the base class for every long-running RELAY operation (play, record, detect, collect, fax, tap, stream, pay, transcribe, AI). It tracks the `control_id` correlation key, accumulates events, exposes the latest `payload`, and resolves when the operation reaches a terminal state — mirroring the Python reference's action objects. + - + + SignalWire::Relay::Call is the Perl port of the Python reference's call object. It models one RELAY call: it carries call state, demultiplexes incoming events (updating state, routing to the right SignalWire::Relay::Action by `control_id`, and firing listeners), and exposes the full set of call-control verbs. + - + + The RELAY call-lifecycle states, surfaced as typed, named constants. A call moves through `created` → `ringing` → `answered` → `ending` → `ended`. Each constant's value is the exact wire string the server sends in the `calling.call.state` event's `call_state` field. + - + + SignalWire::Relay::Client is the Perl port of the Python reference's `RelayClient`. It owns the RELAY WebSocket transport, performs the `signalwire.connect` handshake, runs a synchronous JSON-RPC request/ response loop, demultiplexes server-initiated events into typed SignalWire::Relay::Event objects, and routes them to the right SignalWire::Relay::Call / SignalWire::Relay::Message. + - + + A RELAY **device** object — the `{ type, params }` pair that names one leg of a dial / connect / refer / tap target. It recurs as a raw hashref across the relay calling layer (`$client->dial(devices => [...])`, `$call->connect` / `$call->refer`, and the `device` field on SignalWire::Relay::Call / the `CallState` / `CallReceive` events). + - + + The RELAY dial-outcome states, surfaced as typed, named constants. An outbound dial reports progress via the `calling.call.dial` event's `dial_state` field: `dialing` while in progress, then a terminal outcome of `answered` (a leg picked up — the dial succeeded) or `failed` (no leg answered). Each constant's value is the exact wire string the server sends. + - + + SignalWire::Relay::Event is the base class for every RELAY event the client receives. Each concrete event type is a small read-only Moo subclass that exposes the fields relevant to it (for example `::CallState` carries `call_state` / `end_reason` / `peer`, while `::MessageReceive` carries `from_number` / `body` / `media`). All subclasses inherit `event_type`, `timestamp`, and the raw `params` hashref from the base class. + - + + SignalWire::Relay::Message tracks the lifecycle of a single RELAY message. It mirrors the Python reference's message handle: a message is created with a `message_id`, accumulates state from `messaging.state` events via "dispatch\_event", and resolves when it reaches a terminal state (see "MESSAGE\_TERMINAL\_STATES" in SignalWire::Relay::Constants). + - + + The RELAY message-delivery states, surfaced as typed, named constants. An outbound SMS moves through `queued` → `initiated` → `sent` and then to a terminal outcome of `delivered`, `undelivered`, or `failed`; `received` is the state of an inbound message. Each constant's value is the exact wire string the server sends in the `messaging.state` event's `message_state` field. + + - +## Modules + + + diff --git a/fern/products/sdk-reference/perl/relay/message-state/index.mdx b/fern/products/sdk-reference/perl/relay/message-state/index.mdx index 29a29a6ae0..46fc25a409 100644 --- a/fern/products/sdk-reference/perl/relay/message-state/index.mdx +++ b/fern/products/sdk-reference/perl/relay/message-state/index.mdx @@ -5,18 +5,167 @@ sdk_label: "Perl SDK" icon: "perl" lustri: auto_generated: true - kind: "module" + kind: "class" language: "perl" - qualified_name: "relay.MessageState" + qualified_name: "SignalWire::Relay::MessageState" parent: "relay" module: "relay" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/MessageState.pm" --- # `MessageState` -## Classes +The RELAY message-delivery states, surfaced as typed, named constants. An outbound SMS moves through `queued` → `initiated` → `sent` and then to a terminal outcome of `delivered`, `undelivered`, or `failed`; `received` is the state of an inbound message. Each constant's value is the exact wire string the server sends in the `messaging.state` event's `message_state` field. - - - The RELAY message-delivery states, surfaced as typed, named constants. An outbound SMS moves through `queued` → `initiated` → `sent` and then to a terminal outcome of `delivered`, `undelivered`, or `failed`; `received` is the state of an inbound message. Each constant's value is the exact wire string the server sends in the `messaging.state` event's `message_state` field. - - +The constants **are** the canonical wire strings, so nothing about `SignalWire::Relay::Message->state` changes: it still reads and writes a plain string. That keeps parity with the Python reference (bare `str`) and leaves forward-compatible server states working. + +Grounded in the Python reference's `relay/constants.py` (`MESSAGE_STATE_*` / `MESSAGE_TERMINAL_STATES`) and the port's SignalWire::Relay::Constants (`MESSAGE_STATES` / `MESSAGE_TERMINAL_STATES`), which are the single source the lists below are derived from. + +**CONSTANTS** + +Exported on request via Exporter; `:all` pulls every state. + +```perl +QUEUED => 'queued' UNDELIVERED => 'undelivered' +INITIATED => 'initiated' FAILED => 'failed' +SENT => 'sent' RECEIVED => 'received' +DELIVERED => 'delivered' +``` + +**IS STATE** + +my $bool = SignalWire::Relay::MessageState->is\_state($value); + +True if `$value` is a known message state. Returns false (never dies) on `undef` or an unknown/forward-compatible value. + +**IS TERMINAL** + +my $bool = SignalWire::Relay::MessageState->is\_terminal($value); + +True if `$value` is a terminal delivery state (`delivered`, `undelivered`, or `failed`). Returns false on `undef`, an in-flight state, `received`, or an unknown value — it never dies, since these mirror server-emitted values that can grow. + +**LICENSE** + +Copyright (c) 2025 SignalWire. Licensed under the MIT License. + +**STATES** + +my $aref = SignalWire::Relay::MessageState->states; + +Arrayref of the message-delivery states, in order. + +**THREE DISTINCT STATE VOCABULARIES** + +CallState, DialState, and `MessageState` are **distinct** sets and must never be conflated. `failed` is terminal in both `DialState` and `MessageState`, but the sets are otherwise disjoint (`MessageState` has no `dialing`/`answered`; `DialState` has no `delivered`). + +**Synopsis** + +```perl +use SignalWire::Relay::MessageState qw(QUEUED SENT DELIVERED FAILED); +``` + +```perl +# Named constants and bare wire strings are interchangeable: +$msg->state eq DELIVERED; # constant +$msg->state eq 'delivered'; # string (Python parity) +``` + +```perl +# Membership / terminality (false on unknown — never dies): +SignalWire::Relay::MessageState->is_state('sent'); # 1 +SignalWire::Relay::MessageState->is_terminal('delivered'); # 1 +SignalWire::Relay::MessageState->is_terminal('failed'); # 1 +SignalWire::Relay::MessageState->is_terminal('sent'); # 0 +@{ SignalWire::Relay::MessageState->states }; # queued..received +``` + +## Signature + +```perl +package SignalWire::Relay::MessageState +``` + +## See Also + +- SignalWire::Relay::Message, SignalWire::Relay::Constants, SignalWire::Relay::CallState, SignalWire::Relay::DialState. + +## Constants + + + + + + + + + + + + + + + +## Methods + +### is\_state + +#### Signature + +```perl +sub is_state($class, $value) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Relay/MessageState.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/MessageState.pm) + +Line 88. + +*** + +### is\_terminal + +#### Signature + +```perl +sub is_terminal($class, $value) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/Relay/MessageState.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/MessageState.pm) + +Line 98. + +*** + +### states + +#### Signature + +```perl +sub states() +``` + +#### Source + +[`lib/SignalWire/Relay/MessageState.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/MessageState.pm) + +Line 82. + +## Source + +[`lib/SignalWire/Relay/MessageState.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/MessageState.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/relay/message-state/message-state/index.mdx b/fern/products/sdk-reference/perl/relay/message-state/message-state/index.mdx deleted file mode 100644 index 2f62de3b2a..0000000000 --- a/fern/products/sdk-reference/perl/relay/message-state/message-state/index.mdx +++ /dev/null @@ -1,171 +0,0 @@ ---- -slug: "/reference/perl/relay/message-state/message-state" -title: "MessageState" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Relay::MessageState" - parent: "relay.MessageState" - module: "relay.MessageState" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/MessageState.pm" ---- -# `MessageState` - -The RELAY message-delivery states, surfaced as typed, named constants. An outbound SMS moves through `queued` → `initiated` → `sent` and then to a terminal outcome of `delivered`, `undelivered`, or `failed`; `received` is the state of an inbound message. Each constant's value is the exact wire string the server sends in the `messaging.state` event's `message_state` field. - -The constants **are** the canonical wire strings, so nothing about `SignalWire::Relay::Message->state` changes: it still reads and writes a plain string. That keeps parity with the Python reference (bare `str`) and leaves forward-compatible server states working. - -Grounded in the Python reference's `relay/constants.py` (`MESSAGE_STATE_*` / `MESSAGE_TERMINAL_STATES`) and the port's SignalWire::Relay::Constants (`MESSAGE_STATES` / `MESSAGE_TERMINAL_STATES`), which are the single source the lists below are derived from. - -**CONSTANTS** - -Exported on request via Exporter; `:all` pulls every state. - -```perl -QUEUED => 'queued' UNDELIVERED => 'undelivered' -INITIATED => 'initiated' FAILED => 'failed' -SENT => 'sent' RECEIVED => 'received' -DELIVERED => 'delivered' -``` - -**IS STATE** - -my $bool = SignalWire::Relay::MessageState->is\_state($value); - -True if `$value` is a known message state. Returns false (never dies) on `undef` or an unknown/forward-compatible value. - -**IS TERMINAL** - -my $bool = SignalWire::Relay::MessageState->is\_terminal($value); - -True if `$value` is a terminal delivery state (`delivered`, `undelivered`, or `failed`). Returns false on `undef`, an in-flight state, `received`, or an unknown value — it never dies, since these mirror server-emitted values that can grow. - -**LICENSE** - -Copyright (c) 2025 SignalWire. Licensed under the MIT License. - -**STATES** - -my $aref = SignalWire::Relay::MessageState->states; - -Arrayref of the message-delivery states, in order. - -**THREE DISTINCT STATE VOCABULARIES** - -CallState, DialState, and `MessageState` are **distinct** sets and must never be conflated. `failed` is terminal in both `DialState` and `MessageState`, but the sets are otherwise disjoint (`MessageState` has no `dialing`/`answered`; `DialState` has no `delivered`). - -**Synopsis** - -```perl -use SignalWire::Relay::MessageState qw(QUEUED SENT DELIVERED FAILED); -``` - -```perl -# Named constants and bare wire strings are interchangeable: -$msg->state eq DELIVERED; # constant -$msg->state eq 'delivered'; # string (Python parity) -``` - -```perl -# Membership / terminality (false on unknown — never dies): -SignalWire::Relay::MessageState->is_state('sent'); # 1 -SignalWire::Relay::MessageState->is_terminal('delivered'); # 1 -SignalWire::Relay::MessageState->is_terminal('failed'); # 1 -SignalWire::Relay::MessageState->is_terminal('sent'); # 0 -@{ SignalWire::Relay::MessageState->states }; # queued..received -``` - -## Signature - -```perl -package SignalWire::Relay::MessageState -``` - -## See Also - -- SignalWire::Relay::Message, SignalWire::Relay::Constants, SignalWire::Relay::CallState, SignalWire::Relay::DialState. - -## Constants - - - - - - - - - - - - - - - -## Methods - -### is\_state - -#### Signature - -```perl -sub is_state($class, $value) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/Relay/MessageState.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/MessageState.pm) - -Line 88. - -*** - -### is\_terminal - -#### Signature - -```perl -sub is_terminal($class, $value) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/Relay/MessageState.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/MessageState.pm) - -Line 98. - -*** - -### states - -#### Signature - -```perl -sub states() -``` - -#### Source - -[`lib/SignalWire/Relay/MessageState.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/MessageState.pm) - -Line 82. - -## Source - -[`lib/SignalWire/Relay/MessageState.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/MessageState.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/relay/message/index.mdx b/fern/products/sdk-reference/perl/relay/message/index.mdx index a4562da41e..2c1904e3d5 100644 --- a/fern/products/sdk-reference/perl/relay/message/index.mdx +++ b/fern/products/sdk-reference/perl/relay/message/index.mdx @@ -5,18 +5,209 @@ sdk_label: "Perl SDK" icon: "perl" lustri: auto_generated: true - kind: "module" + kind: "class" language: "perl" - qualified_name: "relay.Message" + qualified_name: "SignalWire::Relay::Message" parent: "relay" module: "relay" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Message.pm" --- # `Message` -## Classes +SignalWire::Relay::Message tracks the lifecycle of a single RELAY message. It mirrors the Python reference's message handle: a message is created with a `message_id`, accumulates state from `messaging.state` events via "dispatch\_event", and resolves when it reaches a terminal state (see "MESSAGE\_TERMINAL\_STATES" in SignalWire::Relay::Constants). - - - SignalWire::Relay::Message tracks the lifecycle of a single RELAY message. It mirrors the Python reference's message handle: a message is created with a `message_id`, accumulates state from `messaging.state` events via "dispatch\_event", and resolves when it reaches a terminal state (see "MESSAGE\_TERMINAL\_STATES" in SignalWire::Relay::Constants). - - +Construction fails fast on bad input: `message_id` must be a non-empty string, `media` / `tags` must be arrayrefs, and `segments` must be a number (Moo `isa` constraints). + +**CURRENT STATE** + +my $state = $msg->current\_state; + +The message's delivery state as the SignalWire::Relay::MessageState-typed view. Returns the same wire string as `state` (the MessageState constants **are** the wire strings); pair it with `SignalWire::Relay::MessageState->is_state` / `->is_terminal`. + +**DISPATCH EVENT** + +$msg->dispatch\_event($event); + +Apply a `messaging.state` event: update `state`/`reason`, fire event listeners, and resolve the message if the new state is terminal. Normally called by SignalWire::Relay::Client, not user code. + +**IS DONE** + +my $bool = $msg->is\_done; + +True once the message has reached a terminal state (the resolved `completed` flag set by "dispatch\_event"). + +**IS TERMINAL** + +my $bool = $msg->is\_terminal; + +True when the message's current `state` string is a terminal delivery state (`delivered`, `undelivered`, or `failed`). Delegates to SignalWire::Relay::MessageState; returns false (never dies) on an unknown/forward-compatible state. Distinct from "is\_done", which reports the resolved `completed` flag rather than classifying the `state` string. + +**LICENSE** + +Copyright (c) 2025 SignalWire. Licensed under the MIT License. + +**ON** + +$msg->on($cb); # returns $self + +Register a per-event listener invoked as `$cb->($msg, $event)` for every dispatched event. The callback must be a coderef. + +**ON COMPLETED** + +$msg->on\_completed($cb); # register; returns $self +my $cb = $msg->on\_completed; # no-arg: get the registered callback + +Register a callback invoked once with `$msg` when the message completes. If the message is already complete, the callback fires immediately. The callback must be a coderef. + +**WAIT** + +my $result = $msg->wait( timeout => 30 ); + +Block (polling) until the message completes or `timeout` seconds elapse (default 30), then return the terminal event. + +**Synopsis** + +```perl +use SignalWire::Relay::Message; +``` + +```perl +my $msg = SignalWire::Relay::Message->new( message_id => $id ); +``` + +```perl +$msg->on_completed(sub ($m) { print "final state: ", $m->state, "\n"; }); +$msg->on(sub ($m, $event) { ... }); # per-event listener +``` + +```perl +my $final = $msg->wait( timeout => 30 ); # blocks until terminal +``` + +## Signature + +```perl +package SignalWire::Relay::Message +``` + +## See Also + +- SignalWire::Relay::Client, SignalWire::Relay::Event, SignalWire::Relay::Constants, SignalWire::Relay::MessageState. + +## Methods + +### current\_state + +#### Signature + +```perl +sub current_state() +``` + +#### Source + +[`lib/SignalWire/Relay/Message.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Message.pm) + +Line 67. + +*** + +### dispatch\_event + +#### Signature + +```perl +sub dispatch_event() +``` + +#### Source + +[`lib/SignalWire/Relay/Message.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Message.pm) + +Line 115. + +*** + +### is\_done + +#### Signature + +```perl +sub is_done() +``` + +#### Source + +[`lib/SignalWire/Relay/Message.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Message.pm) + +Line 53. + +*** + +### is\_terminal + +#### Signature + +```perl +sub is_terminal() +``` + +#### Source + +[`lib/SignalWire/Relay/Message.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Message.pm) + +Line 79. + +*** + +### on + +#### Signature + +```perl +sub on() +``` + +#### Source + +[`lib/SignalWire/Relay/Message.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Message.pm) + +Line 98. + +*** + +### on\_completed + +#### Signature + +```perl +sub on_completed() +``` + +#### Source + +[`lib/SignalWire/Relay/Message.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Message.pm) + +Line 84. + +*** + +### wait + +#### Signature + +```perl +sub wait() +``` + +#### Source + +[`lib/SignalWire/Relay/Message.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Message.pm) + +Line 105. + +## Source + +[`lib/SignalWire/Relay/Message.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Message.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/relay/message/message/index.mdx b/fern/products/sdk-reference/perl/relay/message/message/index.mdx deleted file mode 100644 index 6a1c97e63c..0000000000 --- a/fern/products/sdk-reference/perl/relay/message/message/index.mdx +++ /dev/null @@ -1,213 +0,0 @@ ---- -slug: "/reference/perl/relay/message/message" -title: "Message" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::Relay::Message" - parent: "relay.Message" - module: "relay.Message" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Message.pm" ---- -# `Message` - -SignalWire::Relay::Message tracks the lifecycle of a single RELAY message. It mirrors the Python reference's message handle: a message is created with a `message_id`, accumulates state from `messaging.state` events via "dispatch\_event", and resolves when it reaches a terminal state (see "MESSAGE\_TERMINAL\_STATES" in SignalWire::Relay::Constants). - -Construction fails fast on bad input: `message_id` must be a non-empty string, `media` / `tags` must be arrayrefs, and `segments` must be a number (Moo `isa` constraints). - -**CURRENT STATE** - -my $state = $msg->current\_state; - -The message's delivery state as the SignalWire::Relay::MessageState-typed view. Returns the same wire string as `state` (the MessageState constants **are** the wire strings); pair it with `SignalWire::Relay::MessageState->is_state` / `->is_terminal`. - -**DISPATCH EVENT** - -$msg->dispatch\_event($event); - -Apply a `messaging.state` event: update `state`/`reason`, fire event listeners, and resolve the message if the new state is terminal. Normally called by SignalWire::Relay::Client, not user code. - -**IS DONE** - -my $bool = $msg->is\_done; - -True once the message has reached a terminal state (the resolved `completed` flag set by "dispatch\_event"). - -**IS TERMINAL** - -my $bool = $msg->is\_terminal; - -True when the message's current `state` string is a terminal delivery state (`delivered`, `undelivered`, or `failed`). Delegates to SignalWire::Relay::MessageState; returns false (never dies) on an unknown/forward-compatible state. Distinct from "is\_done", which reports the resolved `completed` flag rather than classifying the `state` string. - -**LICENSE** - -Copyright (c) 2025 SignalWire. Licensed under the MIT License. - -**ON** - -$msg->on($cb); # returns $self - -Register a per-event listener invoked as `$cb->($msg, $event)` for every dispatched event. The callback must be a coderef. - -**ON COMPLETED** - -$msg->on\_completed($cb); # register; returns $self -my $cb = $msg->on\_completed; # no-arg: get the registered callback - -Register a callback invoked once with `$msg` when the message completes. If the message is already complete, the callback fires immediately. The callback must be a coderef. - -**WAIT** - -my $result = $msg->wait( timeout => 30 ); - -Block (polling) until the message completes or `timeout` seconds elapse (default 30), then return the terminal event. - -**Synopsis** - -```perl -use SignalWire::Relay::Message; -``` - -```perl -my $msg = SignalWire::Relay::Message->new( message_id => $id ); -``` - -```perl -$msg->on_completed(sub ($m) { print "final state: ", $m->state, "\n"; }); -$msg->on(sub ($m, $event) { ... }); # per-event listener -``` - -```perl -my $final = $msg->wait( timeout => 30 ); # blocks until terminal -``` - -## Signature - -```perl -package SignalWire::Relay::Message -``` - -## See Also - -- SignalWire::Relay::Client, SignalWire::Relay::Event, SignalWire::Relay::Constants, SignalWire::Relay::MessageState. - -## Methods - -### current\_state - -#### Signature - -```perl -sub current_state() -``` - -#### Source - -[`lib/SignalWire/Relay/Message.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Message.pm) - -Line 67. - -*** - -### dispatch\_event - -#### Signature - -```perl -sub dispatch_event() -``` - -#### Source - -[`lib/SignalWire/Relay/Message.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Message.pm) - -Line 115. - -*** - -### is\_done - -#### Signature - -```perl -sub is_done() -``` - -#### Source - -[`lib/SignalWire/Relay/Message.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Message.pm) - -Line 53. - -*** - -### is\_terminal - -#### Signature - -```perl -sub is_terminal() -``` - -#### Source - -[`lib/SignalWire/Relay/Message.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Message.pm) - -Line 79. - -*** - -### on - -#### Signature - -```perl -sub on() -``` - -#### Source - -[`lib/SignalWire/Relay/Message.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Message.pm) - -Line 98. - -*** - -### on\_completed - -#### Signature - -```perl -sub on_completed() -``` - -#### Source - -[`lib/SignalWire/Relay/Message.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Message.pm) - -Line 84. - -*** - -### wait - -#### Signature - -```perl -sub wait() -``` - -#### Source - -[`lib/SignalWire/Relay/Message.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Message.pm) - -Line 105. - -## Source - -[`lib/SignalWire/Relay/Message.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Relay/Message.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/rest/http-client/http-client/index.mdx b/fern/products/sdk-reference/perl/rest/http-client/http-client/index.mdx deleted file mode 100644 index 8419b76bb0..0000000000 --- a/fern/products/sdk-reference/perl/rest/http-client/http-client/index.mdx +++ /dev/null @@ -1,135 +0,0 @@ ---- -slug: "/reference/perl/rest/http-client/http-client" -title: "HttpClient" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::REST::HttpClient" - parent: "rest.HttpClient" - module: "rest.HttpClient" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/HttpClient.pm" ---- -# `HttpClient` - -## Signature - -```perl -package SignalWire::REST::HttpClient -``` - -## Methods - -### delete\_request - -#### Signature - -```perl -sub delete_request($path) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/HttpClient.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/HttpClient.pm) - -Line 127. - -*** - -### get - -#### Signature - -```perl -sub get($path, %opts) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/HttpClient.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/HttpClient.pm) - -Line 107. - -*** - -### patch - -#### Signature - -```perl -sub patch($path, %opts) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/HttpClient.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/HttpClient.pm) - -Line 122. - -*** - -### post - -#### Signature - -```perl -sub post($path, %opts) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/HttpClient.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/HttpClient.pm) - -Line 112. - -*** - -### put - -#### Signature - -```perl -sub put($path, %opts) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/HttpClient.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/HttpClient.pm) - -Line 117. - -## Source - -[`lib/SignalWire/REST/HttpClient.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/HttpClient.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/rest/http-client/index.mdx b/fern/products/sdk-reference/perl/rest/http-client/index.mdx index af4769bc97..39ca6e31e0 100644 --- a/fern/products/sdk-reference/perl/rest/http-client/index.mdx +++ b/fern/products/sdk-reference/perl/rest/http-client/index.mdx @@ -5,16 +5,131 @@ sdk_label: "Perl SDK" icon: "perl" lustri: auto_generated: true - kind: "module" + kind: "class" language: "perl" - qualified_name: "rest.HttpClient" + qualified_name: "SignalWire::REST::HttpClient" parent: "rest" module: "rest" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/HttpClient.pm" --- # `HttpClient` -## Classes +## Signature - - - +```perl +package SignalWire::REST::HttpClient +``` + +## Methods + +### delete\_request + +#### Signature + +```perl +sub delete_request($path) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/HttpClient.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/HttpClient.pm) + +Line 127. + +*** + +### get + +#### Signature + +```perl +sub get($path, %opts) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/HttpClient.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/HttpClient.pm) + +Line 107. + +*** + +### patch + +#### Signature + +```perl +sub patch($path, %opts) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/HttpClient.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/HttpClient.pm) + +Line 122. + +*** + +### post + +#### Signature + +```perl +sub post($path, %opts) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/HttpClient.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/HttpClient.pm) + +Line 112. + +*** + +### put + +#### Signature + +```perl +sub put($path, %opts) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/HttpClient.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/HttpClient.pm) + +Line 117. + +## Source + +[`lib/SignalWire/REST/HttpClient.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/HttpClient.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/rest/index.mdx b/fern/products/sdk-reference/perl/rest/index.mdx index d9e8a4ec65..49e599c292 100644 --- a/fern/products/sdk-reference/perl/rest/index.mdx +++ b/fern/products/sdk-reference/perl/rest/index.mdx @@ -11,16 +11,22 @@ lustri: --- # `rest` -## Modules +## Classes - - - + + Mirrors the Python `signalwire.rest._pagination.PaginatedIterator`. Walks the `links.next` cursor until no further page is advertised. Each fetch is performed via the SDK's SignalWire::REST::HttpClient so authentication and base-URL handling is shared with the rest of the SDK. + + +## Modules + + + + diff --git a/fern/products/sdk-reference/perl/rest/namespaces/base/base/index.mdx b/fern/products/sdk-reference/perl/rest/namespaces/base/base/index.mdx deleted file mode 100644 index 30fcbeda89..0000000000 --- a/fern/products/sdk-reference/perl/rest/namespaces/base/base/index.mdx +++ /dev/null @@ -1,133 +0,0 @@ ---- -slug: "/reference/perl/rest/namespaces/base/base" -title: "Base" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::REST::Namespaces::Base" - parent: "rest.Namespaces.Base" - module: "rest.Namespaces.Base" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Base.pm" ---- -# `Base` - -## Signature - -```perl -package SignalWire::REST::Namespaces::Base -``` - -## Inheritance - -**Extends:** [SignalWire::REST::Namespaces::Base](/docs/sdk-reference/reference/perl/rest/namespaces/base/base) - -## Methods - -### create - -#### Signature - -```perl -sub create(%kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Base.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Base.pm) - -Line 29. - -*** - -### delete\_resource - -#### Signature - -```perl -sub delete_resource($resource_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Base.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Base.pm) - -Line 45. - -*** - -### get - -#### Signature - -```perl -sub get($resource_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Base.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Base.pm) - -Line 34. - -*** - -### list - -#### Signature - -```perl -sub list(@params) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Base.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Base.pm) - -Line 23. - -*** - -### update - -#### Signature - -```perl -sub update($resource_id, %kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Base.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Base.pm) - -Line 39. - -## Source - -[`lib/SignalWire/REST/Namespaces/Base.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Base.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/rest/namespaces/base/index.mdx b/fern/products/sdk-reference/perl/rest/namespaces/base/index.mdx index 66015692d1..49dcec2d47 100644 --- a/fern/products/sdk-reference/perl/rest/namespaces/base/index.mdx +++ b/fern/products/sdk-reference/perl/rest/namespaces/base/index.mdx @@ -5,16 +5,129 @@ sdk_label: "Perl SDK" icon: "perl" lustri: auto_generated: true - kind: "module" + kind: "class" language: "perl" - qualified_name: "rest.Namespaces.Base" + qualified_name: "SignalWire::REST::Namespaces::Base" parent: "rest.Namespaces" module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Base.pm" --- # `Base` -## Classes +## Signature - - - +```perl +package SignalWire::REST::Namespaces::Base +``` + +## Inheritance + +**Extends:** [SignalWire::REST::Namespaces::Base](/docs/sdk-reference/reference/perl/rest/namespaces/base) + +## Methods + +### create + +#### Signature + +```perl +sub create(%kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Base.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Base.pm) + +Line 29. + +*** + +### delete\_resource + +#### Signature + +```perl +sub delete_resource($resource_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Base.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Base.pm) + +Line 45. + +*** + +### get + +#### Signature + +```perl +sub get($resource_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Base.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Base.pm) + +Line 34. + +*** + +### list + +#### Signature + +```perl +sub list(@params) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Base.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Base.pm) + +Line 23. + +*** + +### update + +#### Signature + +```perl +sub update($resource_id, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Base.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Base.pm) + +Line 39. + +## Source + +[`lib/SignalWire/REST/Namespaces/Base.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Base.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/rest/namespaces/calling/calling/index.mdx b/fern/products/sdk-reference/perl/rest/namespaces/calling/calling/index.mdx deleted file mode 100644 index 4fdfb9c86b..0000000000 --- a/fern/products/sdk-reference/perl/rest/namespaces/calling/calling/index.mdx +++ /dev/null @@ -1,953 +0,0 @@ ---- -slug: "/reference/perl/rest/namespaces/calling/calling" -title: "Calling" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::REST::Namespaces::Calling" - parent: "rest.Namespaces.Calling" - module: "rest.Namespaces.Calling" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm" ---- -# `Calling` - -## Signature - -```perl -package SignalWire::REST::Namespaces::Calling -``` - -## Inheritance - -**Extends:** [SignalWire::REST::Namespaces::Base](/docs/sdk-reference/reference/perl/rest/namespaces/base/base) - -## Methods - -### ai\_hold - -#### Signature - -```perl -sub ai_hold($s, $id, @p) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 71. - -*** - -### ai\_message - -#### Signature - -```perl -sub ai_message($s, $id, @p) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 70. - -*** - -### ai\_stop - -#### Signature - -```perl -sub ai_stop($s, $id, @p) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 73. - -*** - -### ai\_unhold - -#### Signature - -```perl -sub ai_unhold($s, $id, @p) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 72. - -*** - -### BUILD - -#### Signature - -```perl -sub BUILD() -``` - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 9. - -*** - -### collect - -#### Signature - -```perl -sub collect($s, $id, @p) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 45. - -*** - -### collect\_start\_input\_timers - -#### Signature - -```perl -sub collect_start_input_timers($s, $id, @p) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 47. - -*** - -### collect\_stop - -#### Signature - -```perl -sub collect_stop($s, $id, @p) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 46. - -*** - -### denoise - -#### Signature - -```perl -sub denoise($s, $id, @p) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 62. - -*** - -### denoise\_stop - -#### Signature - -```perl -sub denoise_stop($s, $id, @p) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 63. - -*** - -### detect - -#### Signature - -```perl -sub detect($s, $id, @p) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 50. - -*** - -### detect\_stop - -#### Signature - -```perl -sub detect_stop($s, $id, @p) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 51. - -*** - -### dial - -#### Signature - -```perl -sub dial($s, @p) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 22. - -*** - -### disconnect - -#### Signature - -```perl -sub disconnect($s, $id, @p) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 29. - -*** - -### end - -#### Signature - -```perl -sub end($s, $id, @p) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 27. - -*** - -### live\_transcribe - -#### Signature - -```perl -sub live_transcribe($s, $id, @p) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 76. - -*** - -### live\_translate - -#### Signature - -```perl -sub live_translate($s, $id, @p) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 77. - -*** - -### play - -#### Signature - -```perl -sub play($s, $id, @p) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 32. - -*** - -### play\_pause - -#### Signature - -```perl -sub play_pause($s, $id, @p) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 33. - -*** - -### play\_resume - -#### Signature - -```perl -sub play_resume($s, $id, @p) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 34. - -*** - -### play\_stop - -#### Signature - -```perl -sub play_stop($s, $id, @p) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 35. - -*** - -### play\_volume - -#### Signature - -```perl -sub play_volume($s, $id, @p) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 36. - -*** - -### receive\_fax\_stop - -#### Signature - -```perl -sub receive_fax_stop($s, $id, @p) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 81. - -*** - -### record - -#### Signature - -```perl -sub record($s, $id, @p) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 39. - -*** - -### record\_pause - -#### Signature - -```perl -sub record_pause($s, $id, @p) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 40. - -*** - -### record\_resume - -#### Signature - -```perl -sub record_resume($s, $id, @p) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 41. - -*** - -### record\_stop - -#### Signature - -```perl -sub record_stop($s, $id, @p) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 42. - -*** - -### refer - -#### Signature - -```perl -sub refer($s, $id, @p) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 84. - -*** - -### send\_fax\_stop - -#### Signature - -```perl -sub send_fax_stop($s, $id, @p) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 80. - -*** - -### stream - -#### Signature - -```perl -sub stream($s, $id, @p) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 58. - -*** - -### stream\_stop - -#### Signature - -```perl -sub stream_stop($s, $id, @p) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 59. - -*** - -### tap - -#### Signature - -```perl -sub tap($s, $id, @p) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 54. - -*** - -### tap\_stop - -#### Signature - -```perl -sub tap_stop($s, $id, @p) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 55. - -*** - -### transcribe - -#### Signature - -```perl -sub transcribe($s, $id, @p) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 66. - -*** - -### transcribe\_stop - -#### Signature - -```perl -sub transcribe_stop($s, $id, @p) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 67. - -*** - -### transfer - -#### Signature - -```perl -sub transfer($s, $id, @p) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 28. - -*** - -### update - -#### Signature - -```perl -sub update($s, @p) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 25. - -*** - -### update\_call - -#### Signature - -```perl -sub update_call($s, @p) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 26. - -*** - -### user\_event - -#### Signature - -```perl -sub user_event($s, $id, @p) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 87. - -## Source - -[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/rest/namespaces/calling/index.mdx b/fern/products/sdk-reference/perl/rest/namespaces/calling/index.mdx index 4b8db1b175..148899e5ac 100644 --- a/fern/products/sdk-reference/perl/rest/namespaces/calling/index.mdx +++ b/fern/products/sdk-reference/perl/rest/namespaces/calling/index.mdx @@ -5,16 +5,949 @@ sdk_label: "Perl SDK" icon: "perl" lustri: auto_generated: true - kind: "module" + kind: "class" language: "perl" - qualified_name: "rest.Namespaces.Calling" + qualified_name: "SignalWire::REST::Namespaces::Calling" parent: "rest.Namespaces" module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm" --- # `Calling` -## Classes +## Signature - - - +```perl +package SignalWire::REST::Namespaces::Calling +``` + +## Inheritance + +**Extends:** [SignalWire::REST::Namespaces::Base](/docs/sdk-reference/reference/perl/rest/namespaces/base) + +## Methods + +### ai\_hold + +#### Signature + +```perl +sub ai_hold($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 71. + +*** + +### ai\_message + +#### Signature + +```perl +sub ai_message($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 70. + +*** + +### ai\_stop + +#### Signature + +```perl +sub ai_stop($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 73. + +*** + +### ai\_unhold + +#### Signature + +```perl +sub ai_unhold($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 72. + +*** + +### BUILD + +#### Signature + +```perl +sub BUILD() +``` + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 9. + +*** + +### collect + +#### Signature + +```perl +sub collect($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 45. + +*** + +### collect\_start\_input\_timers + +#### Signature + +```perl +sub collect_start_input_timers($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 47. + +*** + +### collect\_stop + +#### Signature + +```perl +sub collect_stop($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 46. + +*** + +### denoise + +#### Signature + +```perl +sub denoise($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 62. + +*** + +### denoise\_stop + +#### Signature + +```perl +sub denoise_stop($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 63. + +*** + +### detect + +#### Signature + +```perl +sub detect($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 50. + +*** + +### detect\_stop + +#### Signature + +```perl +sub detect_stop($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 51. + +*** + +### dial + +#### Signature + +```perl +sub dial($s, @p) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 22. + +*** + +### disconnect + +#### Signature + +```perl +sub disconnect($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 29. + +*** + +### end + +#### Signature + +```perl +sub end($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 27. + +*** + +### live\_transcribe + +#### Signature + +```perl +sub live_transcribe($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 76. + +*** + +### live\_translate + +#### Signature + +```perl +sub live_translate($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 77. + +*** + +### play + +#### Signature + +```perl +sub play($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 32. + +*** + +### play\_pause + +#### Signature + +```perl +sub play_pause($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 33. + +*** + +### play\_resume + +#### Signature + +```perl +sub play_resume($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 34. + +*** + +### play\_stop + +#### Signature + +```perl +sub play_stop($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 35. + +*** + +### play\_volume + +#### Signature + +```perl +sub play_volume($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 36. + +*** + +### receive\_fax\_stop + +#### Signature + +```perl +sub receive_fax_stop($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 81. + +*** + +### record + +#### Signature + +```perl +sub record($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 39. + +*** + +### record\_pause + +#### Signature + +```perl +sub record_pause($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 40. + +*** + +### record\_resume + +#### Signature + +```perl +sub record_resume($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 41. + +*** + +### record\_stop + +#### Signature + +```perl +sub record_stop($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 42. + +*** + +### refer + +#### Signature + +```perl +sub refer($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 84. + +*** + +### send\_fax\_stop + +#### Signature + +```perl +sub send_fax_stop($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 80. + +*** + +### stream + +#### Signature + +```perl +sub stream($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 58. + +*** + +### stream\_stop + +#### Signature + +```perl +sub stream_stop($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 59. + +*** + +### tap + +#### Signature + +```perl +sub tap($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 54. + +*** + +### tap\_stop + +#### Signature + +```perl +sub tap_stop($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 55. + +*** + +### transcribe + +#### Signature + +```perl +sub transcribe($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 66. + +*** + +### transcribe\_stop + +#### Signature + +```perl +sub transcribe_stop($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 67. + +*** + +### transfer + +#### Signature + +```perl +sub transfer($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 28. + +*** + +### update + +#### Signature + +```perl +sub update($s, @p) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 25. + +*** + +### update\_call + +#### Signature + +```perl +sub update_call($s, @p) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 26. + +*** + +### user\_event + +#### Signature + +```perl +sub user_event($s, $id, @p) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 87. + +## Source + +[`lib/SignalWire/REST/Namespaces/Calling.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Calling.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/rest/namespaces/chat/chat/index.mdx b/fern/products/sdk-reference/perl/rest/namespaces/chat/chat/index.mdx deleted file mode 100644 index 167d0a4093..0000000000 --- a/fern/products/sdk-reference/perl/rest/namespaces/chat/chat/index.mdx +++ /dev/null @@ -1,51 +0,0 @@ ---- -slug: "/reference/perl/rest/namespaces/chat/chat" -title: "Chat" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::REST::Namespaces::Chat" - parent: "rest.Namespaces.Chat" - module: "rest.Namespaces.Chat" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Chat.pm" ---- -# `Chat` - -## Signature - -```perl -package SignalWire::REST::Namespaces::Chat -``` - -## Inheritance - -**Extends:** [SignalWire::REST::Namespaces::Base](/docs/sdk-reference/reference/perl/rest/namespaces/base/base) - -## Methods - -### create\_token - -#### Signature - -```perl -sub create_token(%kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Chat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Chat.pm) - -Line 7. - -## Source - -[`lib/SignalWire/REST/Namespaces/Chat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Chat.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/rest/namespaces/chat/index.mdx b/fern/products/sdk-reference/perl/rest/namespaces/chat/index.mdx index 7dcf3a0500..aa60c82abf 100644 --- a/fern/products/sdk-reference/perl/rest/namespaces/chat/index.mdx +++ b/fern/products/sdk-reference/perl/rest/namespaces/chat/index.mdx @@ -5,16 +5,47 @@ sdk_label: "Perl SDK" icon: "perl" lustri: auto_generated: true - kind: "module" + kind: "class" language: "perl" - qualified_name: "rest.Namespaces.Chat" + qualified_name: "SignalWire::REST::Namespaces::Chat" parent: "rest.Namespaces" module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Chat.pm" --- # `Chat` -## Classes +## Signature - - - +```perl +package SignalWire::REST::Namespaces::Chat +``` + +## Inheritance + +**Extends:** [SignalWire::REST::Namespaces::Base](/docs/sdk-reference/reference/perl/rest/namespaces/base) + +## Methods + +### create\_token + +#### Signature + +```perl +sub create_token(%kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Chat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Chat.pm) + +Line 7. + +## Source + +[`lib/SignalWire/REST/Namespaces/Chat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Chat.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/rest/namespaces/compat/compat/index.mdx b/fern/products/sdk-reference/perl/rest/namespaces/compat/compat/index.mdx deleted file mode 100644 index 0ead95753c..0000000000 --- a/fern/products/sdk-reference/perl/rest/namespaces/compat/compat/index.mdx +++ /dev/null @@ -1,1273 +0,0 @@ ---- -slug: "/reference/perl/rest/namespaces/compat/compat" -title: "Compat" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::REST::Namespaces::Compat" - parent: "rest.Namespaces.Compat" - module: "rest.Namespaces.Compat" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm" ---- -# `Compat` - -## Signature - -```perl -package SignalWire::REST::Namespaces::Compat -``` - -## Inheritance - -**Extends:** [SignalWire::REST::Namespaces::Base](/docs/sdk-reference/reference/perl/rest/namespaces/base/base), `SignalWire::REST::Namespaces::CrudResource` - -## Methods - -### create - -#### Signature - -```perl -sub create(%kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 17. - -*** - -### create - -#### Signature - -```perl -sub create(%kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 361. - -*** - -### delete - -#### Signature - -```perl -sub delete($sid) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 227. - -*** - -### delete - -#### Signature - -```perl -sub delete($sid) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 324. - -*** - -### delete - -#### Signature - -```perl -sub delete($sid) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 351. - -*** - -### delete - -#### Signature - -```perl -sub delete($token_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 377. - -*** - -### delete\_media - -#### Signature - -```perl -sub delete_media($message_sid, $media_sid) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 83. - -*** - -### delete\_media - -#### Signature - -```perl -sub delete_media($fax_sid, $media_sid) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 109. - -*** - -### delete\_number - -#### Signature - -```perl -sub delete_number($sid) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 221. - -*** - -### delete\_recording - -#### Signature - -```perl -sub delete_recording($conference_sid, $recording_sid) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 172. - -*** - -### delete\_recording - -#### Signature - -```perl -sub delete_recording($sid) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 318. - -*** - -### delete\_token - -#### Signature - -```perl -sub delete_token($token_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 371. - -*** - -### delete\_transcription - -#### Signature - -```perl -sub delete_transcription($sid) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 345. - -*** - -### dequeue\_member - -#### Signature - -```perl -sub dequeue_member($queue_sid, $call_sid, %kwargs) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 297. - -*** - -### get - -#### Signature - -```perl -sub get($sid) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 22. - -*** - -### get - -#### Signature - -```perl -sub get($sid) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 125. - -*** - -### get - -#### Signature - -```perl -sub get($sid) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 211. - -*** - -### get - -#### Signature - -```perl -sub get($sid) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 313. - -*** - -### get - -#### Signature - -```perl -sub get($sid) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 340. - -*** - -### get\_media - -#### Signature - -```perl -sub get_media($message_sid, $media_sid) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 78. - -*** - -### get\_media - -#### Signature - -```perl -sub get_media($fax_sid, $media_sid) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 104. - -*** - -### get\_member - -#### Signature - -```perl -sub get_member($queue_sid, $call_sid) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 292. - -*** - -### get\_participant - -#### Signature - -```perl -sub get_participant($conference_sid, $call_sid) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 141. - -*** - -### get\_recording - -#### Signature - -```perl -sub get_recording($conference_sid, $recording_sid) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 162. - -*** - -### import\_number - -#### Signature - -```perl -sub import_number(%kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 232. - -*** - -### list - -#### Signature - -```perl -sub list(@params) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 11. - -*** - -### list - -#### Signature - -```perl -sub list(@params) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 119. - -*** - -### list - -#### Signature - -```perl -sub list(@params) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 200. - -*** - -### list - -#### Signature - -```perl -sub list(@params) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 307. - -*** - -### list - -#### Signature - -```perl -sub list(@params) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 334. - -*** - -### list\_available\_countries - -#### Signature - -```perl -sub list_available_countries(@params) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 238. - -*** - -### list\_media - -#### Signature - -```perl -sub list_media($message_sid, @params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 72. - -*** - -### list\_media - -#### Signature - -```perl -sub list_media($fax_sid, @params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 98. - -*** - -### list\_members - -#### Signature - -```perl -sub list_members($queue_sid, @params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 286. - -*** - -### list\_participants - -#### Signature - -```perl -sub list_participants($conference_sid, @params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 135. - -*** - -### list\_recordings - -#### Signature - -```perl -sub list_recordings($conference_sid, @params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 156. - -*** - -### purchase - -#### Signature - -```perl -sub purchase(%kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 206. - -*** - -### remove\_participant - -#### Signature - -```perl -sub remove_participant($conference_sid, $call_sid) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 151. - -*** - -### search\_local - -#### Signature - -```perl -sub search_local($country, @params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 244. - -*** - -### search\_toll\_free - -#### Signature - -```perl -sub search_toll_free($country, @params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 250. - -*** - -### start\_recording - -#### Signature - -```perl -sub start_recording($call_sid, %kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 42. - -*** - -### start\_stream - -#### Signature - -```perl -sub start_stream($call_sid, %kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 52. - -*** - -### start\_stream - -#### Signature - -```perl -sub start_stream($conference_sid, %kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 177. - -*** - -### stop\_stream - -#### Signature - -```perl -sub stop_stream($call_sid, $stream_sid, %kwargs) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 57. - -*** - -### stop\_stream - -#### Signature - -```perl -sub stop_stream($conference_sid, $stream_sid, %kwargs) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 182. - -*** - -### update - -#### Signature - -```perl -sub update($sid, %kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 27. - -*** - -### update - -#### Signature - -```perl -sub update($sid, %kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 37. - -*** - -### update - -#### Signature - -```perl -sub update($sid, %kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 67. - -*** - -### update - -#### Signature - -```perl -sub update($sid, %kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 93. - -*** - -### update - -#### Signature - -```perl -sub update($sid, %kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 130. - -*** - -### update - -#### Signature - -```perl -sub update($sid, %kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 216. - -*** - -### update - -#### Signature - -```perl -sub update($sid, %kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 261. - -*** - -### update - -#### Signature - -```perl -sub update($sid, %kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 271. - -*** - -### update - -#### Signature - -```perl -sub update($sid, %kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 281. - -*** - -### update - -#### Signature - -```perl -sub update($token_id, %kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 366. - -*** - -### update\_participant - -#### Signature - -```perl -sub update_participant($conference_sid, $call_sid, %kwargs) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 146. - -*** - -### update\_recording - -#### Signature - -```perl -sub update_recording($call_sid, $recording_sid, %kwargs) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 47. - -*** - -### update\_recording - -#### Signature - -```perl -sub update_recording($conference_sid, $recording_sid, %kwargs) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 167. - -## Source - -[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/rest/namespaces/compat/index.mdx b/fern/products/sdk-reference/perl/rest/namespaces/compat/index.mdx index bbd0528c4f..069b5e9ea5 100644 --- a/fern/products/sdk-reference/perl/rest/namespaces/compat/index.mdx +++ b/fern/products/sdk-reference/perl/rest/namespaces/compat/index.mdx @@ -5,16 +5,1269 @@ sdk_label: "Perl SDK" icon: "perl" lustri: auto_generated: true - kind: "module" + kind: "class" language: "perl" - qualified_name: "rest.Namespaces.Compat" + qualified_name: "SignalWire::REST::Namespaces::Compat" parent: "rest.Namespaces" module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm" --- # `Compat` -## Classes +## Signature - - - +```perl +package SignalWire::REST::Namespaces::Compat +``` + +## Inheritance + +**Extends:** [SignalWire::REST::Namespaces::Base](/docs/sdk-reference/reference/perl/rest/namespaces/base), `SignalWire::REST::Namespaces::CrudResource` + +## Methods + +### create + +#### Signature + +```perl +sub create(%kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 17. + +*** + +### create + +#### Signature + +```perl +sub create(%kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 361. + +*** + +### delete + +#### Signature + +```perl +sub delete($sid) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 227. + +*** + +### delete + +#### Signature + +```perl +sub delete($sid) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 324. + +*** + +### delete + +#### Signature + +```perl +sub delete($sid) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 351. + +*** + +### delete + +#### Signature + +```perl +sub delete($token_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 377. + +*** + +### delete\_media + +#### Signature + +```perl +sub delete_media($message_sid, $media_sid) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 83. + +*** + +### delete\_media + +#### Signature + +```perl +sub delete_media($fax_sid, $media_sid) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 109. + +*** + +### delete\_number + +#### Signature + +```perl +sub delete_number($sid) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 221. + +*** + +### delete\_recording + +#### Signature + +```perl +sub delete_recording($conference_sid, $recording_sid) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 172. + +*** + +### delete\_recording + +#### Signature + +```perl +sub delete_recording($sid) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 318. + +*** + +### delete\_token + +#### Signature + +```perl +sub delete_token($token_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 371. + +*** + +### delete\_transcription + +#### Signature + +```perl +sub delete_transcription($sid) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 345. + +*** + +### dequeue\_member + +#### Signature + +```perl +sub dequeue_member($queue_sid, $call_sid, %kwargs) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 297. + +*** + +### get + +#### Signature + +```perl +sub get($sid) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 22. + +*** + +### get + +#### Signature + +```perl +sub get($sid) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 125. + +*** + +### get + +#### Signature + +```perl +sub get($sid) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 211. + +*** + +### get + +#### Signature + +```perl +sub get($sid) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 313. + +*** + +### get + +#### Signature + +```perl +sub get($sid) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 340. + +*** + +### get\_media + +#### Signature + +```perl +sub get_media($message_sid, $media_sid) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 78. + +*** + +### get\_media + +#### Signature + +```perl +sub get_media($fax_sid, $media_sid) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 104. + +*** + +### get\_member + +#### Signature + +```perl +sub get_member($queue_sid, $call_sid) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 292. + +*** + +### get\_participant + +#### Signature + +```perl +sub get_participant($conference_sid, $call_sid) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 141. + +*** + +### get\_recording + +#### Signature + +```perl +sub get_recording($conference_sid, $recording_sid) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 162. + +*** + +### import\_number + +#### Signature + +```perl +sub import_number(%kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 232. + +*** + +### list + +#### Signature + +```perl +sub list(@params) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 11. + +*** + +### list + +#### Signature + +```perl +sub list(@params) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 119. + +*** + +### list + +#### Signature + +```perl +sub list(@params) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 200. + +*** + +### list + +#### Signature + +```perl +sub list(@params) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 307. + +*** + +### list + +#### Signature + +```perl +sub list(@params) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 334. + +*** + +### list\_available\_countries + +#### Signature + +```perl +sub list_available_countries(@params) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 238. + +*** + +### list\_media + +#### Signature + +```perl +sub list_media($message_sid, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 72. + +*** + +### list\_media + +#### Signature + +```perl +sub list_media($fax_sid, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 98. + +*** + +### list\_members + +#### Signature + +```perl +sub list_members($queue_sid, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 286. + +*** + +### list\_participants + +#### Signature + +```perl +sub list_participants($conference_sid, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 135. + +*** + +### list\_recordings + +#### Signature + +```perl +sub list_recordings($conference_sid, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 156. + +*** + +### purchase + +#### Signature + +```perl +sub purchase(%kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 206. + +*** + +### remove\_participant + +#### Signature + +```perl +sub remove_participant($conference_sid, $call_sid) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 151. + +*** + +### search\_local + +#### Signature + +```perl +sub search_local($country, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 244. + +*** + +### search\_toll\_free + +#### Signature + +```perl +sub search_toll_free($country, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 250. + +*** + +### start\_recording + +#### Signature + +```perl +sub start_recording($call_sid, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 42. + +*** + +### start\_stream + +#### Signature + +```perl +sub start_stream($call_sid, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 52. + +*** + +### start\_stream + +#### Signature + +```perl +sub start_stream($conference_sid, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 177. + +*** + +### stop\_stream + +#### Signature + +```perl +sub stop_stream($call_sid, $stream_sid, %kwargs) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 57. + +*** + +### stop\_stream + +#### Signature + +```perl +sub stop_stream($conference_sid, $stream_sid, %kwargs) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 182. + +*** + +### update + +#### Signature + +```perl +sub update($sid, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 27. + +*** + +### update + +#### Signature + +```perl +sub update($sid, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 37. + +*** + +### update + +#### Signature + +```perl +sub update($sid, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 67. + +*** + +### update + +#### Signature + +```perl +sub update($sid, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 93. + +*** + +### update + +#### Signature + +```perl +sub update($sid, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 130. + +*** + +### update + +#### Signature + +```perl +sub update($sid, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 216. + +*** + +### update + +#### Signature + +```perl +sub update($sid, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 261. + +*** + +### update + +#### Signature + +```perl +sub update($sid, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 271. + +*** + +### update + +#### Signature + +```perl +sub update($sid, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 281. + +*** + +### update + +#### Signature + +```perl +sub update($token_id, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 366. + +*** + +### update\_participant + +#### Signature + +```perl +sub update_participant($conference_sid, $call_sid, %kwargs) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 146. + +*** + +### update\_recording + +#### Signature + +```perl +sub update_recording($call_sid, $recording_sid, %kwargs) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 47. + +*** + +### update\_recording + +#### Signature + +```perl +sub update_recording($conference_sid, $recording_sid, %kwargs) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 167. + +## Source + +[`lib/SignalWire/REST/Namespaces/Compat.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Compat.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/rest/namespaces/datasphere/datasphere/index.mdx b/fern/products/sdk-reference/perl/rest/namespaces/datasphere/datasphere/index.mdx deleted file mode 100644 index 250a06c61b..0000000000 --- a/fern/products/sdk-reference/perl/rest/namespaces/datasphere/datasphere/index.mdx +++ /dev/null @@ -1,117 +0,0 @@ ---- -slug: "/reference/perl/rest/namespaces/datasphere/datasphere" -title: "Datasphere" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::REST::Namespaces::Datasphere" - parent: "rest.Namespaces.Datasphere" - module: "rest.Namespaces.Datasphere" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Datasphere.pm" ---- -# `Datasphere` - -## Signature - -```perl -package SignalWire::REST::Namespaces::Datasphere -``` - -## Inheritance - -**Extends:** `SignalWire::REST::Namespaces::CrudResource` - -## Methods - -### delete\_chunk - -#### Signature - -```perl -sub delete_chunk($document_id, $chunk_id) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Datasphere.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Datasphere.pm) - -Line 27. - -*** - -### get\_chunk - -#### Signature - -```perl -sub get_chunk($document_id, $chunk_id) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Datasphere.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Datasphere.pm) - -Line 22. - -*** - -### list\_chunks - -#### Signature - -```perl -sub list_chunks($document_id, @params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Datasphere.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Datasphere.pm) - -Line 16. - -*** - -### search - -#### Signature - -```perl -sub search(%kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Datasphere.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Datasphere.pm) - -Line 11. - -## Source - -[`lib/SignalWire/REST/Namespaces/Datasphere.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Datasphere.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/rest/namespaces/datasphere/index.mdx b/fern/products/sdk-reference/perl/rest/namespaces/datasphere/index.mdx index d061d734aa..7001c75376 100644 --- a/fern/products/sdk-reference/perl/rest/namespaces/datasphere/index.mdx +++ b/fern/products/sdk-reference/perl/rest/namespaces/datasphere/index.mdx @@ -5,16 +5,113 @@ sdk_label: "Perl SDK" icon: "perl" lustri: auto_generated: true - kind: "module" + kind: "class" language: "perl" - qualified_name: "rest.Namespaces.Datasphere" + qualified_name: "SignalWire::REST::Namespaces::Datasphere" parent: "rest.Namespaces" module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Datasphere.pm" --- # `Datasphere` -## Classes +## Signature - - - +```perl +package SignalWire::REST::Namespaces::Datasphere +``` + +## Inheritance + +**Extends:** `SignalWire::REST::Namespaces::CrudResource` + +## Methods + +### delete\_chunk + +#### Signature + +```perl +sub delete_chunk($document_id, $chunk_id) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Datasphere.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Datasphere.pm) + +Line 27. + +*** + +### get\_chunk + +#### Signature + +```perl +sub get_chunk($document_id, $chunk_id) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Datasphere.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Datasphere.pm) + +Line 22. + +*** + +### list\_chunks + +#### Signature + +```perl +sub list_chunks($document_id, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Datasphere.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Datasphere.pm) + +Line 16. + +*** + +### search + +#### Signature + +```perl +sub search(%kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Datasphere.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Datasphere.pm) + +Line 11. + +## Source + +[`lib/SignalWire/REST/Namespaces/Datasphere.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Datasphere.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/rest/namespaces/fabric/fabric/index.mdx b/fern/products/sdk-reference/perl/rest/namespaces/fabric/fabric/index.mdx deleted file mode 100644 index 2cf3721a0d..0000000000 --- a/fern/products/sdk-reference/perl/rest/namespaces/fabric/fabric/index.mdx +++ /dev/null @@ -1,579 +0,0 @@ ---- -slug: "/reference/perl/rest/namespaces/fabric/fabric" -title: "Fabric" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::REST::Namespaces::Fabric" - parent: "rest.Namespaces.Fabric" - module: "rest.Namespaces.Fabric" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm" ---- -# `Fabric` - -## Signature - -```perl -package SignalWire::REST::Namespaces::Fabric -``` - -## Inheritance - -**Extends:** `SignalWire::REST::Namespaces::CrudResource`, `SignalWire::REST::Namespaces::Fabric::Resource`, `SignalWire::REST::Namespaces::Fabric::AutoMaterializedWebhook`, `SignalWire::REST::Namespaces::Fabric::ResourcePUT`, [SignalWire::REST::Namespaces::Base](/docs/sdk-reference/reference/perl/rest/namespaces/base/base) - -## Methods - -### assign\_domain\_application - -#### Signature - -```perl -sub assign_domain_application($resource_id, %kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) - -Line 189. - -*** - -### assign\_phone\_route - -#### Signature - -```perl -sub assign_phone_route($resource_id, %kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) - -Line 177. - -*** - -### create - -#### Signature - -```perl -sub create(%kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) - -Line 32. - -*** - -### create - -#### Signature - -```perl -sub create(%kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) - -Line 139. - -*** - -### create\_embed\_token - -#### Signature - -```perl -sub create_embed_token(%kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) - -Line 235. - -*** - -### create\_guest\_token - -#### Signature - -```perl -sub create_guest_token(%kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) - -Line 230. - -*** - -### create\_invite\_token - -#### Signature - -```perl -sub create_invite_token(%kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) - -Line 225. - -*** - -### create\_sip\_endpoint - -#### Signature - -```perl -sub create_sip_endpoint($subscriber_id, %kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) - -Line 114. - -*** - -### create\_subscriber\_token - -#### Signature - -```perl -sub create_subscriber_token(%kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) - -Line 215. - -*** - -### delete - -#### Signature - -```perl -sub delete($resource_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) - -Line 166. - -*** - -### delete\_resource - -#### Signature - -```perl -sub delete_resource($resource_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) - -Line 160. - -*** - -### delete\_sip\_endpoint - -#### Signature - -```perl -sub delete_sip_endpoint($subscriber_id, $endpoint_id) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) - -Line 129. - -*** - -### deploy\_version - -#### Signature - -```perl -sub deploy_version($resource_id, %kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) - -Line 85. - -*** - -### get - -#### Signature - -```perl -sub get($resource_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) - -Line 155. - -*** - -### get - -#### Signature - -```perl -sub get($address_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) - -Line 205. - -*** - -### get\_sip\_endpoint - -#### Signature - -```perl -sub get_sip_endpoint($subscriber_id, $endpoint_id) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) - -Line 119. - -*** - -### list - -#### Signature - -```perl -sub list(@params) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) - -Line 149. - -*** - -### list - -#### Signature - -```perl -sub list(@params) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) - -Line 199. - -*** - -### list\_addresses - -#### Signature - -```perl -sub list_addresses($resource_id, @params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) - -Line 12. - -*** - -### list\_addresses - -#### Signature - -```perl -sub list_addresses($resource_id, @params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) - -Line 71. - -*** - -### list\_addresses - -#### Signature - -```perl -sub list_addresses($resource_id, @params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) - -Line 96. - -*** - -### list\_addresses - -#### Signature - -```perl -sub list_addresses($resource_id, @params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) - -Line 171. - -*** - -### list\_sip\_endpoints - -#### Signature - -```perl -sub list_sip_endpoints($subscriber_id, @params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) - -Line 108. - -*** - -### list\_versions - -#### Signature - -```perl -sub list_versions($resource_id, @params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) - -Line 78. - -*** - -### refresh\_subscriber\_token - -#### Signature - -```perl -sub refresh_subscriber_token(%kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) - -Line 220. - -*** - -### update\_sip\_endpoint - -#### Signature - -```perl -sub update_sip_endpoint($subscriber_id, $endpoint_id, %kwargs) -``` - -#### Parameters - - - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) - -Line 124. - -## Source - -[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/rest/namespaces/fabric/index.mdx b/fern/products/sdk-reference/perl/rest/namespaces/fabric/index.mdx index e1b001a03a..43d5a14aaf 100644 --- a/fern/products/sdk-reference/perl/rest/namespaces/fabric/index.mdx +++ b/fern/products/sdk-reference/perl/rest/namespaces/fabric/index.mdx @@ -5,16 +5,575 @@ sdk_label: "Perl SDK" icon: "perl" lustri: auto_generated: true - kind: "module" + kind: "class" language: "perl" - qualified_name: "rest.Namespaces.Fabric" + qualified_name: "SignalWire::REST::Namespaces::Fabric" parent: "rest.Namespaces" module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm" --- # `Fabric` -## Classes +## Signature - - - +```perl +package SignalWire::REST::Namespaces::Fabric +``` + +## Inheritance + +**Extends:** `SignalWire::REST::Namespaces::CrudResource`, `SignalWire::REST::Namespaces::Fabric::Resource`, `SignalWire::REST::Namespaces::Fabric::AutoMaterializedWebhook`, `SignalWire::REST::Namespaces::Fabric::ResourcePUT`, [SignalWire::REST::Namespaces::Base](/docs/sdk-reference/reference/perl/rest/namespaces/base) + +## Methods + +### assign\_domain\_application + +#### Signature + +```perl +sub assign_domain_application($resource_id, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 189. + +*** + +### assign\_phone\_route + +#### Signature + +```perl +sub assign_phone_route($resource_id, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 177. + +*** + +### create + +#### Signature + +```perl +sub create(%kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 32. + +*** + +### create + +#### Signature + +```perl +sub create(%kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 139. + +*** + +### create\_embed\_token + +#### Signature + +```perl +sub create_embed_token(%kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 235. + +*** + +### create\_guest\_token + +#### Signature + +```perl +sub create_guest_token(%kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 230. + +*** + +### create\_invite\_token + +#### Signature + +```perl +sub create_invite_token(%kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 225. + +*** + +### create\_sip\_endpoint + +#### Signature + +```perl +sub create_sip_endpoint($subscriber_id, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 114. + +*** + +### create\_subscriber\_token + +#### Signature + +```perl +sub create_subscriber_token(%kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 215. + +*** + +### delete + +#### Signature + +```perl +sub delete($resource_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 166. + +*** + +### delete\_resource + +#### Signature + +```perl +sub delete_resource($resource_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 160. + +*** + +### delete\_sip\_endpoint + +#### Signature + +```perl +sub delete_sip_endpoint($subscriber_id, $endpoint_id) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 129. + +*** + +### deploy\_version + +#### Signature + +```perl +sub deploy_version($resource_id, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 85. + +*** + +### get + +#### Signature + +```perl +sub get($resource_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 155. + +*** + +### get + +#### Signature + +```perl +sub get($address_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 205. + +*** + +### get\_sip\_endpoint + +#### Signature + +```perl +sub get_sip_endpoint($subscriber_id, $endpoint_id) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 119. + +*** + +### list + +#### Signature + +```perl +sub list(@params) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 149. + +*** + +### list + +#### Signature + +```perl +sub list(@params) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 199. + +*** + +### list\_addresses + +#### Signature + +```perl +sub list_addresses($resource_id, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 12. + +*** + +### list\_addresses + +#### Signature + +```perl +sub list_addresses($resource_id, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 71. + +*** + +### list\_addresses + +#### Signature + +```perl +sub list_addresses($resource_id, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 96. + +*** + +### list\_addresses + +#### Signature + +```perl +sub list_addresses($resource_id, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 171. + +*** + +### list\_sip\_endpoints + +#### Signature + +```perl +sub list_sip_endpoints($subscriber_id, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 108. + +*** + +### list\_versions + +#### Signature + +```perl +sub list_versions($resource_id, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 78. + +*** + +### refresh\_subscriber\_token + +#### Signature + +```perl +sub refresh_subscriber_token(%kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 220. + +*** + +### update\_sip\_endpoint + +#### Signature + +```perl +sub update_sip_endpoint($subscriber_id, $endpoint_id, %kwargs) +``` + +#### Parameters + + + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 124. + +## Source + +[`lib/SignalWire/REST/Namespaces/Fabric.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Fabric.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/rest/namespaces/index.mdx b/fern/products/sdk-reference/perl/rest/namespaces/index.mdx index 85e03d24c4..6204781569 100644 --- a/fern/products/sdk-reference/perl/rest/namespaces/index.mdx +++ b/fern/products/sdk-reference/perl/rest/namespaces/index.mdx @@ -13,7 +13,7 @@ lustri: --- # `Namespaces` -## Modules +## Classes @@ -30,7 +30,9 @@ lustri: - + + Supports the standard CRUD surface plus typed helpers for binding an inbound call to a handler (SWML webhook, cXML webhook, AI agent, call flow, RELAY application/topic). The binding model is: set `call_handler` plus the handler-specific companion field on the phone number; the server auto-materializes the matching Fabric resource. See SignalWire::REST::PhoneCallHandler for the enum. + diff --git a/fern/products/sdk-reference/perl/rest/namespaces/logs/index.mdx b/fern/products/sdk-reference/perl/rest/namespaces/logs/index.mdx index f7795340b2..6948091d1d 100644 --- a/fern/products/sdk-reference/perl/rest/namespaces/logs/index.mdx +++ b/fern/products/sdk-reference/perl/rest/namespaces/logs/index.mdx @@ -5,16 +5,189 @@ sdk_label: "Perl SDK" icon: "perl" lustri: auto_generated: true - kind: "module" + kind: "class" language: "perl" - qualified_name: "rest.Namespaces.Logs" + qualified_name: "SignalWire::REST::Namespaces::Logs" parent: "rest.Namespaces" module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Logs.pm" --- # `Logs` -## Classes +## Signature - - - +```perl +package SignalWire::REST::Namespaces::Logs +``` + +## Inheritance + +**Extends:** [SignalWire::REST::Namespaces::Base](/docs/sdk-reference/reference/perl/rest/namespaces/base) + +## Methods + +### get + +#### Signature + +```perl +sub get($log_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Logs.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Logs.pm) + +Line 17. + +*** + +### get + +#### Signature + +```perl +sub get($log_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Logs.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Logs.pm) + +Line 33. + +*** + +### get + +#### Signature + +```perl +sub get($log_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Logs.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Logs.pm) + +Line 55. + +*** + +### list + +#### Signature + +```perl +sub list(@params) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Logs.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Logs.pm) + +Line 11. + +*** + +### list + +#### Signature + +```perl +sub list(@params) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Logs.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Logs.pm) + +Line 27. + +*** + +### list + +#### Signature + +```perl +sub list(@params) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Logs.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Logs.pm) + +Line 49. + +*** + +### list + +#### Signature + +```perl +sub list(@params) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Logs.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Logs.pm) + +Line 65. + +*** + +### list\_events + +#### Signature + +```perl +sub list_events($log_id, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Logs.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Logs.pm) + +Line 38. + +## Source + +[`lib/SignalWire/REST/Namespaces/Logs.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Logs.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/rest/namespaces/logs/logs/index.mdx b/fern/products/sdk-reference/perl/rest/namespaces/logs/logs/index.mdx deleted file mode 100644 index 9aed032d41..0000000000 --- a/fern/products/sdk-reference/perl/rest/namespaces/logs/logs/index.mdx +++ /dev/null @@ -1,193 +0,0 @@ ---- -slug: "/reference/perl/rest/namespaces/logs/logs" -title: "Logs" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::REST::Namespaces::Logs" - parent: "rest.Namespaces.Logs" - module: "rest.Namespaces.Logs" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Logs.pm" ---- -# `Logs` - -## Signature - -```perl -package SignalWire::REST::Namespaces::Logs -``` - -## Inheritance - -**Extends:** [SignalWire::REST::Namespaces::Base](/docs/sdk-reference/reference/perl/rest/namespaces/base/base) - -## Methods - -### get - -#### Signature - -```perl -sub get($log_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Logs.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Logs.pm) - -Line 17. - -*** - -### get - -#### Signature - -```perl -sub get($log_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Logs.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Logs.pm) - -Line 33. - -*** - -### get - -#### Signature - -```perl -sub get($log_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Logs.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Logs.pm) - -Line 55. - -*** - -### list - -#### Signature - -```perl -sub list(@params) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Logs.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Logs.pm) - -Line 11. - -*** - -### list - -#### Signature - -```perl -sub list(@params) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Logs.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Logs.pm) - -Line 27. - -*** - -### list - -#### Signature - -```perl -sub list(@params) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Logs.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Logs.pm) - -Line 49. - -*** - -### list - -#### Signature - -```perl -sub list(@params) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Logs.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Logs.pm) - -Line 65. - -*** - -### list\_events - -#### Signature - -```perl -sub list_events($log_id, @params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Logs.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Logs.pm) - -Line 38. - -## Source - -[`lib/SignalWire/REST/Namespaces/Logs.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Logs.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/rest/namespaces/phone-numbers/index.mdx b/fern/products/sdk-reference/perl/rest/namespaces/phone-numbers/index.mdx index 8e462658d4..85bc5cca19 100644 --- a/fern/products/sdk-reference/perl/rest/namespaces/phone-numbers/index.mdx +++ b/fern/products/sdk-reference/perl/rest/namespaces/phone-numbers/index.mdx @@ -5,18 +5,233 @@ sdk_label: "Perl SDK" icon: "perl" lustri: auto_generated: true - kind: "module" + kind: "class" language: "perl" - qualified_name: "rest.Namespaces.PhoneNumbers" + qualified_name: "SignalWire::REST::Namespaces::PhoneNumbers" parent: "rest.Namespaces" module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/PhoneNumbers.pm" --- # `PhoneNumbers` -## Classes +Supports the standard CRUD surface plus typed helpers for binding an inbound call to a handler (SWML webhook, cXML webhook, AI agent, call flow, RELAY application/topic). The binding model is: set `call_handler` plus the handler-specific companion field on the phone number; the server auto-materializes the matching Fabric resource. See SignalWire::REST::PhoneCallHandler for the enum. - - - Supports the standard CRUD surface plus typed helpers for binding an inbound call to a handler (SWML webhook, cXML webhook, AI agent, call flow, RELAY application/topic). The binding model is: set `call_handler` plus the handler-specific companion field on the phone number; the server auto-materializes the matching Fabric resource. See SignalWire::REST::PhoneCallHandler for the enum. - - +**HELPERS** + +- set\_swml\_webhook($sid, url => $url) + + Route inbound calls to an SWML webhook URL. Your backend returns an SWML document per call. The server auto-creates a `swml_webhook` Fabric resource keyed off this URL. + +- set\_cxml\_webhook($sid, url => $url, fallback\_url => $f?, status\_callback\_url => $s?) + + Route inbound calls to a cXML (Twilio-compat / LAML) webhook. Despite the wire value `laml_webhooks` being plural, this creates a single `cxml_webhook` Fabric resource. + +- set\_cxml\_application($sid, application\_id => $id) + + Route inbound calls to an existing cXML application by ID. + +- set\_ai\_agent($sid, agent\_id => $id) + + Route inbound calls to an AI Agent Fabric resource by ID. + +- set\_call\_flow($sid, flow\_id => $id, version => $v?) + + Route inbound calls to a Call Flow by ID. `version` accepts `working_copy` or `current_deployed` (server default when omitted). + +- set\_relay\_application($sid, name => $name) + + Route inbound calls to a named RELAY application. + +- set\_relay\_topic($sid, topic => $topic, status\_callback\_url => $s?) + + Route inbound calls to a RELAY topic (client subscription). + +## Signature + +```perl +package SignalWire::REST::Namespaces::PhoneNumbers +``` + +## Inheritance + +**Extends:** `SignalWire::REST::Namespaces::CrudResource` + +## Methods + +### search + +#### Signature + +```perl +sub search(@params) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/PhoneNumbers.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/PhoneNumbers.pm) + +Line 11. + +*** + +### set\_ai\_agent + +#### Signature + +```perl +sub set_ai_agent($resource_id, @args) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/PhoneNumbers.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/PhoneNumbers.pm) + +Line 65. + +*** + +### set\_call\_flow + +#### Signature + +```perl +sub set_call_flow($resource_id, @args) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/PhoneNumbers.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/PhoneNumbers.pm) + +Line 77. + +*** + +### set\_cxml\_application + +#### Signature + +```perl +sub set_cxml_application($resource_id, @args) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/PhoneNumbers.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/PhoneNumbers.pm) + +Line 53. + +*** + +### set\_cxml\_webhook + +#### Signature + +```perl +sub set_cxml_webhook($resource_id, @args) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/PhoneNumbers.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/PhoneNumbers.pm) + +Line 36. + +*** + +### set\_relay\_application + +#### Signature + +```perl +sub set_relay_application($resource_id, @args) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/PhoneNumbers.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/PhoneNumbers.pm) + +Line 92. + +*** + +### set\_relay\_topic + +#### Signature + +```perl +sub set_relay_topic($resource_id, @args) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/PhoneNumbers.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/PhoneNumbers.pm) + +Line 104. + +*** + +### set\_swml\_webhook + +#### Signature + +```perl +sub set_swml_webhook($resource_id, @args) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/PhoneNumbers.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/PhoneNumbers.pm) + +Line 24. + +## Source + +[`lib/SignalWire/REST/Namespaces/PhoneNumbers.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/PhoneNumbers.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/rest/namespaces/phone-numbers/phone-numbers/index.mdx b/fern/products/sdk-reference/perl/rest/namespaces/phone-numbers/phone-numbers/index.mdx deleted file mode 100644 index 65c5d1144b..0000000000 --- a/fern/products/sdk-reference/perl/rest/namespaces/phone-numbers/phone-numbers/index.mdx +++ /dev/null @@ -1,237 +0,0 @@ ---- -slug: "/reference/perl/rest/namespaces/phone-numbers/phone-numbers" -title: "PhoneNumbers" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::REST::Namespaces::PhoneNumbers" - parent: "rest.Namespaces.PhoneNumbers" - module: "rest.Namespaces.PhoneNumbers" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/PhoneNumbers.pm" ---- -# `PhoneNumbers` - -Supports the standard CRUD surface plus typed helpers for binding an inbound call to a handler (SWML webhook, cXML webhook, AI agent, call flow, RELAY application/topic). The binding model is: set `call_handler` plus the handler-specific companion field on the phone number; the server auto-materializes the matching Fabric resource. See SignalWire::REST::PhoneCallHandler for the enum. - -**HELPERS** - -- set\_swml\_webhook($sid, url => $url) - - Route inbound calls to an SWML webhook URL. Your backend returns an SWML document per call. The server auto-creates a `swml_webhook` Fabric resource keyed off this URL. - -- set\_cxml\_webhook($sid, url => $url, fallback\_url => $f?, status\_callback\_url => $s?) - - Route inbound calls to a cXML (Twilio-compat / LAML) webhook. Despite the wire value `laml_webhooks` being plural, this creates a single `cxml_webhook` Fabric resource. - -- set\_cxml\_application($sid, application\_id => $id) - - Route inbound calls to an existing cXML application by ID. - -- set\_ai\_agent($sid, agent\_id => $id) - - Route inbound calls to an AI Agent Fabric resource by ID. - -- set\_call\_flow($sid, flow\_id => $id, version => $v?) - - Route inbound calls to a Call Flow by ID. `version` accepts `working_copy` or `current_deployed` (server default when omitted). - -- set\_relay\_application($sid, name => $name) - - Route inbound calls to a named RELAY application. - -- set\_relay\_topic($sid, topic => $topic, status\_callback\_url => $s?) - - Route inbound calls to a RELAY topic (client subscription). - -## Signature - -```perl -package SignalWire::REST::Namespaces::PhoneNumbers -``` - -## Inheritance - -**Extends:** `SignalWire::REST::Namespaces::CrudResource` - -## Methods - -### search - -#### Signature - -```perl -sub search(@params) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/PhoneNumbers.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/PhoneNumbers.pm) - -Line 11. - -*** - -### set\_ai\_agent - -#### Signature - -```perl -sub set_ai_agent($resource_id, @args) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/PhoneNumbers.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/PhoneNumbers.pm) - -Line 65. - -*** - -### set\_call\_flow - -#### Signature - -```perl -sub set_call_flow($resource_id, @args) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/PhoneNumbers.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/PhoneNumbers.pm) - -Line 77. - -*** - -### set\_cxml\_application - -#### Signature - -```perl -sub set_cxml_application($resource_id, @args) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/PhoneNumbers.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/PhoneNumbers.pm) - -Line 53. - -*** - -### set\_cxml\_webhook - -#### Signature - -```perl -sub set_cxml_webhook($resource_id, @args) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/PhoneNumbers.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/PhoneNumbers.pm) - -Line 36. - -*** - -### set\_relay\_application - -#### Signature - -```perl -sub set_relay_application($resource_id, @args) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/PhoneNumbers.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/PhoneNumbers.pm) - -Line 92. - -*** - -### set\_relay\_topic - -#### Signature - -```perl -sub set_relay_topic($resource_id, @args) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/PhoneNumbers.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/PhoneNumbers.pm) - -Line 104. - -*** - -### set\_swml\_webhook - -#### Signature - -```perl -sub set_swml_webhook($resource_id, @args) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/PhoneNumbers.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/PhoneNumbers.pm) - -Line 24. - -## Source - -[`lib/SignalWire/REST/Namespaces/PhoneNumbers.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/PhoneNumbers.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/rest/namespaces/project/index.mdx b/fern/products/sdk-reference/perl/rest/namespaces/project/index.mdx index 305983a84e..b803362042 100644 --- a/fern/products/sdk-reference/perl/rest/namespaces/project/index.mdx +++ b/fern/products/sdk-reference/perl/rest/namespaces/project/index.mdx @@ -5,16 +5,109 @@ sdk_label: "Perl SDK" icon: "perl" lustri: auto_generated: true - kind: "module" + kind: "class" language: "perl" - qualified_name: "rest.Namespaces.Project" + qualified_name: "SignalWire::REST::Namespaces::Project" parent: "rest.Namespaces" module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Project.pm" --- # `Project` -## Classes +## Signature - - - +```perl +package SignalWire::REST::Namespaces::Project +``` + +## Inheritance + +**Extends:** [SignalWire::REST::Namespaces::Base](/docs/sdk-reference/reference/perl/rest/namespaces/base) + +## Methods + +### create + +#### Signature + +```perl +sub create(%kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Project.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Project.pm) + +Line 11. + +*** + +### delete + +#### Signature + +```perl +sub delete($token_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Project.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Project.pm) + +Line 27. + +*** + +### delete\_token + +#### Signature + +```perl +sub delete_token($token_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Project.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Project.pm) + +Line 21. + +*** + +### update + +#### Signature + +```perl +sub update($token_id, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Project.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Project.pm) + +Line 16. + +## Source + +[`lib/SignalWire/REST/Namespaces/Project.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Project.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/rest/namespaces/project/project/index.mdx b/fern/products/sdk-reference/perl/rest/namespaces/project/project/index.mdx deleted file mode 100644 index ef293d0ccd..0000000000 --- a/fern/products/sdk-reference/perl/rest/namespaces/project/project/index.mdx +++ /dev/null @@ -1,113 +0,0 @@ ---- -slug: "/reference/perl/rest/namespaces/project/project" -title: "Project" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::REST::Namespaces::Project" - parent: "rest.Namespaces.Project" - module: "rest.Namespaces.Project" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Project.pm" ---- -# `Project` - -## Signature - -```perl -package SignalWire::REST::Namespaces::Project -``` - -## Inheritance - -**Extends:** [SignalWire::REST::Namespaces::Base](/docs/sdk-reference/reference/perl/rest/namespaces/base/base) - -## Methods - -### create - -#### Signature - -```perl -sub create(%kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Project.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Project.pm) - -Line 11. - -*** - -### delete - -#### Signature - -```perl -sub delete($token_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Project.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Project.pm) - -Line 27. - -*** - -### delete\_token - -#### Signature - -```perl -sub delete_token($token_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Project.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Project.pm) - -Line 21. - -*** - -### update - -#### Signature - -```perl -sub update($token_id, %kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Project.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Project.pm) - -Line 16. - -## Source - -[`lib/SignalWire/REST/Namespaces/Project.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Project.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/rest/namespaces/pub-sub/index.mdx b/fern/products/sdk-reference/perl/rest/namespaces/pub-sub/index.mdx index 3677a38233..3bfa226f2a 100644 --- a/fern/products/sdk-reference/perl/rest/namespaces/pub-sub/index.mdx +++ b/fern/products/sdk-reference/perl/rest/namespaces/pub-sub/index.mdx @@ -5,16 +5,47 @@ sdk_label: "Perl SDK" icon: "perl" lustri: auto_generated: true - kind: "module" + kind: "class" language: "perl" - qualified_name: "rest.Namespaces.PubSub" + qualified_name: "SignalWire::REST::Namespaces::PubSub" parent: "rest.Namespaces" module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/PubSub.pm" --- # `PubSub` -## Classes +## Signature - - - +```perl +package SignalWire::REST::Namespaces::PubSub +``` + +## Inheritance + +**Extends:** [SignalWire::REST::Namespaces::Base](/docs/sdk-reference/reference/perl/rest/namespaces/base) + +## Methods + +### create\_token + +#### Signature + +```perl +sub create_token(%kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/PubSub.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/PubSub.pm) + +Line 7. + +## Source + +[`lib/SignalWire/REST/Namespaces/PubSub.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/PubSub.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/rest/namespaces/pub-sub/pub-sub/index.mdx b/fern/products/sdk-reference/perl/rest/namespaces/pub-sub/pub-sub/index.mdx deleted file mode 100644 index 407c71f5f4..0000000000 --- a/fern/products/sdk-reference/perl/rest/namespaces/pub-sub/pub-sub/index.mdx +++ /dev/null @@ -1,51 +0,0 @@ ---- -slug: "/reference/perl/rest/namespaces/pub-sub/pub-sub" -title: "PubSub" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::REST::Namespaces::PubSub" - parent: "rest.Namespaces.PubSub" - module: "rest.Namespaces.PubSub" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/PubSub.pm" ---- -# `PubSub` - -## Signature - -```perl -package SignalWire::REST::Namespaces::PubSub -``` - -## Inheritance - -**Extends:** [SignalWire::REST::Namespaces::Base](/docs/sdk-reference/reference/perl/rest/namespaces/base/base) - -## Methods - -### create\_token - -#### Signature - -```perl -sub create_token(%kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/PubSub.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/PubSub.pm) - -Line 7. - -## Source - -[`lib/SignalWire/REST/Namespaces/PubSub.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/PubSub.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/rest/namespaces/registry/index.mdx b/fern/products/sdk-reference/perl/rest/namespaces/registry/index.mdx index 44c73fffd1..08f14c2a8b 100644 --- a/fern/products/sdk-reference/perl/rest/namespaces/registry/index.mdx +++ b/fern/products/sdk-reference/perl/rest/namespaces/registry/index.mdx @@ -5,16 +5,299 @@ sdk_label: "Perl SDK" icon: "perl" lustri: auto_generated: true - kind: "module" + kind: "class" language: "perl" - qualified_name: "rest.Namespaces.Registry" + qualified_name: "SignalWire::REST::Namespaces::Registry" parent: "rest.Namespaces" module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm" --- # `Registry` -## Classes +## Signature - - - +```perl +package SignalWire::REST::Namespaces::Registry +``` + +## Inheritance + +**Extends:** [SignalWire::REST::Namespaces::Base](/docs/sdk-reference/reference/perl/rest/namespaces/base) + +## Methods + +### create + +#### Signature + +```perl +sub create(%kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Registry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm) + +Line 17. + +*** + +### create\_campaign + +#### Signature + +```perl +sub create_campaign($brand_id, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Registry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm) + +Line 33. + +*** + +### create\_order + +#### Signature + +```perl +sub create_order($campaign_id, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Registry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm) + +Line 65. + +*** + +### delete + +#### Signature + +```perl +sub delete($number_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Registry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm) + +Line 91. + +*** + +### delete\_number + +#### Signature + +```perl +sub delete_number($number_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Registry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm) + +Line 85. + +*** + +### get + +#### Signature + +```perl +sub get($brand_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Registry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm) + +Line 22. + +*** + +### get + +#### Signature + +```perl +sub get($campaign_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Registry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm) + +Line 43. + +*** + +### get + +#### Signature + +```perl +sub get($order_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Registry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm) + +Line 75. + +*** + +### list + +#### Signature + +```perl +sub list(@params) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Registry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm) + +Line 11. + +*** + +### list\_campaigns + +#### Signature + +```perl +sub list_campaigns($brand_id, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Registry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm) + +Line 27. + +*** + +### list\_numbers + +#### Signature + +```perl +sub list_numbers($campaign_id, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Registry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm) + +Line 53. + +*** + +### list\_orders + +#### Signature + +```perl +sub list_orders($campaign_id, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Registry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm) + +Line 59. + +*** + +### update + +#### Signature + +```perl +sub update($campaign_id, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Registry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm) + +Line 48. + +## Source + +[`lib/SignalWire/REST/Namespaces/Registry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/rest/namespaces/registry/registry/index.mdx b/fern/products/sdk-reference/perl/rest/namespaces/registry/registry/index.mdx deleted file mode 100644 index 2d67afa682..0000000000 --- a/fern/products/sdk-reference/perl/rest/namespaces/registry/registry/index.mdx +++ /dev/null @@ -1,303 +0,0 @@ ---- -slug: "/reference/perl/rest/namespaces/registry/registry" -title: "Registry" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::REST::Namespaces::Registry" - parent: "rest.Namespaces.Registry" - module: "rest.Namespaces.Registry" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm" ---- -# `Registry` - -## Signature - -```perl -package SignalWire::REST::Namespaces::Registry -``` - -## Inheritance - -**Extends:** [SignalWire::REST::Namespaces::Base](/docs/sdk-reference/reference/perl/rest/namespaces/base/base) - -## Methods - -### create - -#### Signature - -```perl -sub create(%kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Registry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm) - -Line 17. - -*** - -### create\_campaign - -#### Signature - -```perl -sub create_campaign($brand_id, %kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Registry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm) - -Line 33. - -*** - -### create\_order - -#### Signature - -```perl -sub create_order($campaign_id, %kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Registry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm) - -Line 65. - -*** - -### delete - -#### Signature - -```perl -sub delete($number_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Registry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm) - -Line 91. - -*** - -### delete\_number - -#### Signature - -```perl -sub delete_number($number_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Registry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm) - -Line 85. - -*** - -### get - -#### Signature - -```perl -sub get($brand_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Registry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm) - -Line 22. - -*** - -### get - -#### Signature - -```perl -sub get($campaign_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Registry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm) - -Line 43. - -*** - -### get - -#### Signature - -```perl -sub get($order_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Registry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm) - -Line 75. - -*** - -### list - -#### Signature - -```perl -sub list(@params) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Registry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm) - -Line 11. - -*** - -### list\_campaigns - -#### Signature - -```perl -sub list_campaigns($brand_id, @params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Registry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm) - -Line 27. - -*** - -### list\_numbers - -#### Signature - -```perl -sub list_numbers($campaign_id, @params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Registry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm) - -Line 53. - -*** - -### list\_orders - -#### Signature - -```perl -sub list_orders($campaign_id, @params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Registry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm) - -Line 59. - -*** - -### update - -#### Signature - -```perl -sub update($campaign_id, %kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Registry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm) - -Line 48. - -## Source - -[`lib/SignalWire/REST/Namespaces/Registry.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Registry.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/rest/namespaces/resources/index.mdx b/fern/products/sdk-reference/perl/rest/namespaces/resources/index.mdx index 78c5ea682e..096cf97dc4 100644 --- a/fern/products/sdk-reference/perl/rest/namespaces/resources/index.mdx +++ b/fern/products/sdk-reference/perl/rest/namespaces/resources/index.mdx @@ -5,16 +5,579 @@ sdk_label: "Perl SDK" icon: "perl" lustri: auto_generated: true - kind: "module" + kind: "class" language: "perl" - qualified_name: "rest.Namespaces.Resources" + qualified_name: "SignalWire::REST::Namespaces::Resources" parent: "rest.Namespaces" module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm" --- # `Resources` -## Classes +## Signature - - - +```perl +package SignalWire::REST::Namespaces::Resources +``` + +## Inheritance + +**Extends:** [SignalWire::REST::Namespaces::Base](/docs/sdk-reference/reference/perl/rest/namespaces/base), `SignalWire::REST::Namespaces::CrudResource` + +## Methods + +### add\_membership + +#### Signature + +```perl +sub add_membership($group_id, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 93. + +*** + +### call + +#### Signature + +```perl +sub call(%kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 191. + +*** + +### create + +#### Signature + +```perl +sub create(%kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 17. + +*** + +### create + +#### Signature + +```perl +sub create(%kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 176. + +*** + +### delete + +#### Signature + +```perl +sub delete($address_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 27. + +*** + +### delete + +#### Signature + +```perl +sub delete($recording_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 76. + +*** + +### delete\_membership + +#### Signature + +```perl +sub delete_membership($membership_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 103. + +*** + +### delete\_recording + +#### Signature + +```perl +sub delete_recording($recording_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 70. + +*** + +### get + +#### Signature + +```perl +sub get($address_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 22. + +*** + +### get + +#### Signature + +```perl +sub get($recording_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 65. + +*** + +### get + +#### Signature + +```perl +sub get() +``` + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 129. + +*** + +### get + +#### Signature + +```perl +sub get($short_code_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 161. + +*** + +### get\_member + +#### Signature + +```perl +sub get_member($queue_id, $member_id) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 49. + +*** + +### get\_membership + +#### Signature + +```perl +sub get_membership($membership_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 98. + +*** + +### get\_next\_member + +#### Signature + +```perl +sub get_next_member($queue_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 44. + +*** + +### list + +#### Signature + +```perl +sub list(@params) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 11. + +*** + +### list + +#### Signature + +```perl +sub list(@params) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 59. + +*** + +### list + +#### Signature + +```perl +sub list(@params) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 155. + +*** + +### list\_members + +#### Signature + +```perl +sub list_members($queue_id, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 38. + +*** + +### list\_memberships + +#### Signature + +```perl +sub list_memberships($group_id, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 87. + +*** + +### phone\_number + +#### Signature + +```perl +sub phone_number($e164, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 144. + +*** + +### redial\_verification + +#### Signature + +```perl +sub redial_verification($caller_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 114. + +*** + +### sms + +#### Signature + +```perl +sub sms(%kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 186. + +*** + +### submit\_verification + +#### Signature + +```perl +sub submit_verification($caller_id, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 119. + +*** + +### update + +#### Signature + +```perl +sub update(%kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 134. + +*** + +### update + +#### Signature + +```perl +sub update($short_code_id, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 166. + +*** + +### verify + +#### Signature + +```perl +sub verify($request_id, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 196. + +## Source + +[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/rest/namespaces/resources/resources/index.mdx b/fern/products/sdk-reference/perl/rest/namespaces/resources/resources/index.mdx deleted file mode 100644 index 42efd4ad2d..0000000000 --- a/fern/products/sdk-reference/perl/rest/namespaces/resources/resources/index.mdx +++ /dev/null @@ -1,583 +0,0 @@ ---- -slug: "/reference/perl/rest/namespaces/resources/resources" -title: "Resources" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::REST::Namespaces::Resources" - parent: "rest.Namespaces.Resources" - module: "rest.Namespaces.Resources" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm" ---- -# `Resources` - -## Signature - -```perl -package SignalWire::REST::Namespaces::Resources -``` - -## Inheritance - -**Extends:** [SignalWire::REST::Namespaces::Base](/docs/sdk-reference/reference/perl/rest/namespaces/base/base), `SignalWire::REST::Namespaces::CrudResource` - -## Methods - -### add\_membership - -#### Signature - -```perl -sub add_membership($group_id, %kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) - -Line 93. - -*** - -### call - -#### Signature - -```perl -sub call(%kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) - -Line 191. - -*** - -### create - -#### Signature - -```perl -sub create(%kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) - -Line 17. - -*** - -### create - -#### Signature - -```perl -sub create(%kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) - -Line 176. - -*** - -### delete - -#### Signature - -```perl -sub delete($address_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) - -Line 27. - -*** - -### delete - -#### Signature - -```perl -sub delete($recording_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) - -Line 76. - -*** - -### delete\_membership - -#### Signature - -```perl -sub delete_membership($membership_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) - -Line 103. - -*** - -### delete\_recording - -#### Signature - -```perl -sub delete_recording($recording_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) - -Line 70. - -*** - -### get - -#### Signature - -```perl -sub get($address_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) - -Line 22. - -*** - -### get - -#### Signature - -```perl -sub get($recording_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) - -Line 65. - -*** - -### get - -#### Signature - -```perl -sub get() -``` - -#### Source - -[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) - -Line 129. - -*** - -### get - -#### Signature - -```perl -sub get($short_code_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) - -Line 161. - -*** - -### get\_member - -#### Signature - -```perl -sub get_member($queue_id, $member_id) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) - -Line 49. - -*** - -### get\_membership - -#### Signature - -```perl -sub get_membership($membership_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) - -Line 98. - -*** - -### get\_next\_member - -#### Signature - -```perl -sub get_next_member($queue_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) - -Line 44. - -*** - -### list - -#### Signature - -```perl -sub list(@params) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) - -Line 11. - -*** - -### list - -#### Signature - -```perl -sub list(@params) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) - -Line 59. - -*** - -### list - -#### Signature - -```perl -sub list(@params) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) - -Line 155. - -*** - -### list\_members - -#### Signature - -```perl -sub list_members($queue_id, @params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) - -Line 38. - -*** - -### list\_memberships - -#### Signature - -```perl -sub list_memberships($group_id, @params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) - -Line 87. - -*** - -### phone\_number - -#### Signature - -```perl -sub phone_number($e164, @params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) - -Line 144. - -*** - -### redial\_verification - -#### Signature - -```perl -sub redial_verification($caller_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) - -Line 114. - -*** - -### sms - -#### Signature - -```perl -sub sms(%kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) - -Line 186. - -*** - -### submit\_verification - -#### Signature - -```perl -sub submit_verification($caller_id, %kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) - -Line 119. - -*** - -### update - -#### Signature - -```perl -sub update(%kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) - -Line 134. - -*** - -### update - -#### Signature - -```perl -sub update($short_code_id, %kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) - -Line 166. - -*** - -### verify - -#### Signature - -```perl -sub verify($request_id, %kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) - -Line 196. - -## Source - -[`lib/SignalWire/REST/Namespaces/Resources.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Resources.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/rest/namespaces/video/index.mdx b/fern/products/sdk-reference/perl/rest/namespaces/video/index.mdx index 743ba64040..a0b6ad8d72 100644 --- a/fern/products/sdk-reference/perl/rest/namespaces/video/index.mdx +++ b/fern/products/sdk-reference/perl/rest/namespaces/video/index.mdx @@ -5,16 +5,487 @@ sdk_label: "Perl SDK" icon: "perl" lustri: auto_generated: true - kind: "module" + kind: "class" language: "perl" - qualified_name: "rest.Namespaces.Video" + qualified_name: "SignalWire::REST::Namespaces::Video" parent: "rest.Namespaces" module: "rest.Namespaces" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm" --- # `Video` -## Classes +## Signature - - - +```perl +package SignalWire::REST::Namespaces::Video +``` + +## Inheritance + +**Extends:** `SignalWire::REST::Namespaces::CrudResource`, [SignalWire::REST::Namespaces::Base](/docs/sdk-reference/reference/perl/rest/namespaces/base) + +## Methods + +### create + +#### Signature + +```perl +sub create(%kwargs) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) + +Line 28. + +*** + +### create\_stream + +#### Signature + +```perl +sub create_stream($room_id, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) + +Line 18. + +*** + +### create\_stream + +#### Signature + +```perl +sub create_stream($conference_id, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) + +Line 118. + +*** + +### delete + +#### Signature + +```perl +sub delete($recording_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) + +Line 89. + +*** + +### delete + +#### Signature + +```perl +sub delete($stream_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) + +Line 159. + +*** + +### delete\_recording + +#### Signature + +```perl +sub delete_recording($recording_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) + +Line 83. + +*** + +### delete\_stream + +#### Signature + +```perl +sub delete_stream($stream_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) + +Line 153. + +*** + +### get + +#### Signature + +```perl +sub get($session_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) + +Line 44. + +*** + +### get + +#### Signature + +```perl +sub get($recording_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) + +Line 78. + +*** + +### get + +#### Signature + +```perl +sub get($token_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) + +Line 128. + +*** + +### get + +#### Signature + +```perl +sub get($stream_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) + +Line 143. + +*** + +### list + +#### Signature + +```perl +sub list(@params) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) + +Line 38. + +*** + +### list + +#### Signature + +```perl +sub list(@params) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) + +Line 72. + +*** + +### list\_conference\_tokens + +#### Signature + +```perl +sub list_conference_tokens($conference_id, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) + +Line 106. + +*** + +### list\_events + +#### Signature + +```perl +sub list_events($session_id, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) + +Line 49. + +*** + +### list\_events + +#### Signature + +```perl +sub list_events($recording_id, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) + +Line 94. + +*** + +### list\_members + +#### Signature + +```perl +sub list_members($session_id, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) + +Line 55. + +*** + +### list\_recordings + +#### Signature + +```perl +sub list_recordings($session_id, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) + +Line 61. + +*** + +### list\_streams + +#### Signature + +```perl +sub list_streams($room_id, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) + +Line 12. + +*** + +### list\_streams + +#### Signature + +```perl +sub list_streams($conference_id, @params) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) + +Line 112. + +*** + +### reset + +#### Signature + +```perl +sub reset($token_id) +``` + +#### Parameters + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) + +Line 133. + +*** + +### update + +#### Signature + +```perl +sub update($stream_id, %kwargs) +``` + +#### Parameters + + + + + +#### Source + +[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) + +Line 148. + +## Source + +[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/rest/namespaces/video/video/index.mdx b/fern/products/sdk-reference/perl/rest/namespaces/video/video/index.mdx deleted file mode 100644 index 2046ed17fd..0000000000 --- a/fern/products/sdk-reference/perl/rest/namespaces/video/video/index.mdx +++ /dev/null @@ -1,491 +0,0 @@ ---- -slug: "/reference/perl/rest/namespaces/video/video" -title: "Video" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::REST::Namespaces::Video" - parent: "rest.Namespaces.Video" - module: "rest.Namespaces.Video" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm" ---- -# `Video` - -## Signature - -```perl -package SignalWire::REST::Namespaces::Video -``` - -## Inheritance - -**Extends:** `SignalWire::REST::Namespaces::CrudResource`, [SignalWire::REST::Namespaces::Base](/docs/sdk-reference/reference/perl/rest/namespaces/base/base) - -## Methods - -### create - -#### Signature - -```perl -sub create(%kwargs) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) - -Line 28. - -*** - -### create\_stream - -#### Signature - -```perl -sub create_stream($room_id, %kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) - -Line 18. - -*** - -### create\_stream - -#### Signature - -```perl -sub create_stream($conference_id, %kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) - -Line 118. - -*** - -### delete - -#### Signature - -```perl -sub delete($recording_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) - -Line 89. - -*** - -### delete - -#### Signature - -```perl -sub delete($stream_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) - -Line 159. - -*** - -### delete\_recording - -#### Signature - -```perl -sub delete_recording($recording_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) - -Line 83. - -*** - -### delete\_stream - -#### Signature - -```perl -sub delete_stream($stream_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) - -Line 153. - -*** - -### get - -#### Signature - -```perl -sub get($session_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) - -Line 44. - -*** - -### get - -#### Signature - -```perl -sub get($recording_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) - -Line 78. - -*** - -### get - -#### Signature - -```perl -sub get($token_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) - -Line 128. - -*** - -### get - -#### Signature - -```perl -sub get($stream_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) - -Line 143. - -*** - -### list - -#### Signature - -```perl -sub list(@params) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) - -Line 38. - -*** - -### list - -#### Signature - -```perl -sub list(@params) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) - -Line 72. - -*** - -### list\_conference\_tokens - -#### Signature - -```perl -sub list_conference_tokens($conference_id, @params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) - -Line 106. - -*** - -### list\_events - -#### Signature - -```perl -sub list_events($session_id, @params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) - -Line 49. - -*** - -### list\_events - -#### Signature - -```perl -sub list_events($recording_id, @params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) - -Line 94. - -*** - -### list\_members - -#### Signature - -```perl -sub list_members($session_id, @params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) - -Line 55. - -*** - -### list\_recordings - -#### Signature - -```perl -sub list_recordings($session_id, @params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) - -Line 61. - -*** - -### list\_streams - -#### Signature - -```perl -sub list_streams($room_id, @params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) - -Line 12. - -*** - -### list\_streams - -#### Signature - -```perl -sub list_streams($conference_id, @params) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) - -Line 112. - -*** - -### reset - -#### Signature - -```perl -sub reset($token_id) -``` - -#### Parameters - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) - -Line 133. - -*** - -### update - -#### Signature - -```perl -sub update($stream_id, %kwargs) -``` - -#### Parameters - - - - - -#### Source - -[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) - -Line 148. - -## Source - -[`lib/SignalWire/REST/Namespaces/Video.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Namespaces/Video.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/rest/pagination/index.mdx b/fern/products/sdk-reference/perl/rest/pagination/index.mdx index 1a97c5fb15..ca5f2e5453 100644 --- a/fern/products/sdk-reference/perl/rest/pagination/index.mdx +++ b/fern/products/sdk-reference/perl/rest/pagination/index.mdx @@ -5,18 +5,75 @@ sdk_label: "Perl SDK" icon: "perl" lustri: auto_generated: true - kind: "module" + kind: "class" language: "perl" - qualified_name: "rest.Pagination" + qualified_name: "SignalWire::REST::Pagination" parent: "rest" module: "rest" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Pagination.pm" --- # `Pagination` -## Classes +Mirrors the Python `signalwire.rest._pagination.PaginatedIterator`. Walks the `links.next` cursor until no further page is advertised. Each fetch is performed via the SDK's SignalWire::REST::HttpClient so authentication and base-URL handling is shared with the rest of the SDK. - - - Mirrors the Python `signalwire.rest._pagination.PaginatedIterator`. Walks the `links.next` cursor until no further page is advertised. Each fetch is performed via the SDK's SignalWire::REST::HttpClient so authentication and base-URL handling is shared with the rest of the SDK. - - +**Synopsis** + +```perl +use SignalWire::REST::Pagination; +``` + +```perl +my $it = SignalWire::REST::Pagination::PaginatedIterator->new( + http => $client->_http, + path => '/api/fabric/addresses', + params => { page_size => 25 }, + data_key => 'data', +); +while (defined(my $item = $it->next)) { + ... +} +``` + +## Signature + +```perl +package SignalWire::REST::Pagination +``` + +## Methods + +### all + +#### Signature + +```perl +sub all() +``` + +#### Source + +[`lib/SignalWire/REST/Pagination.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Pagination.pm) + +Line 85. + +*** + +### BUILD + +#### Signature + +```perl +sub BUILD() +``` + +#### Source + +[`lib/SignalWire/REST/Pagination.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Pagination.pm) + +Line 39. + +## Source + +[`lib/SignalWire/REST/Pagination.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Pagination.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/rest/pagination/pagination/index.mdx b/fern/products/sdk-reference/perl/rest/pagination/pagination/index.mdx deleted file mode 100644 index 6cccc925f3..0000000000 --- a/fern/products/sdk-reference/perl/rest/pagination/pagination/index.mdx +++ /dev/null @@ -1,79 +0,0 @@ ---- -slug: "/reference/perl/rest/pagination/pagination" -title: "Pagination" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::REST::Pagination" - parent: "rest.Pagination" - module: "rest.Pagination" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Pagination.pm" ---- -# `Pagination` - -Mirrors the Python `signalwire.rest._pagination.PaginatedIterator`. Walks the `links.next` cursor until no further page is advertised. Each fetch is performed via the SDK's SignalWire::REST::HttpClient so authentication and base-URL handling is shared with the rest of the SDK. - -**Synopsis** - -```perl -use SignalWire::REST::Pagination; -``` - -```perl -my $it = SignalWire::REST::Pagination::PaginatedIterator->new( - http => $client->_http, - path => '/api/fabric/addresses', - params => { page_size => 25 }, - data_key => 'data', -); -while (defined(my $item = $it->next)) { - ... -} -``` - -## Signature - -```perl -package SignalWire::REST::Pagination -``` - -## Methods - -### all - -#### Signature - -```perl -sub all() -``` - -#### Source - -[`lib/SignalWire/REST/Pagination.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Pagination.pm) - -Line 85. - -*** - -### BUILD - -#### Signature - -```perl -sub BUILD() -``` - -#### Source - -[`lib/SignalWire/REST/Pagination.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Pagination.pm) - -Line 39. - -## Source - -[`lib/SignalWire/REST/Pagination.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/Pagination.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/rest/phone-call-handler/index.mdx b/fern/products/sdk-reference/perl/rest/phone-call-handler/index.mdx index c0b24962ef..03b6f5685c 100644 --- a/fern/products/sdk-reference/perl/rest/phone-call-handler/index.mdx +++ b/fern/products/sdk-reference/perl/rest/phone-call-handler/index.mdx @@ -5,16 +5,63 @@ sdk_label: "Perl SDK" icon: "perl" lustri: auto_generated: true - kind: "module" + kind: "class" language: "perl" - qualified_name: "rest.PhoneCallHandler" + qualified_name: "SignalWire::REST::PhoneCallHandler" parent: "rest" module: "rest" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/PhoneCallHandler.pm" --- # `PhoneCallHandler` -## Classes +## Signature - - - +```perl +package SignalWire::REST::PhoneCallHandler +``` + +## Constants + + + + + + + + + + + + + + + + + + + + + + + +## Methods + +### values + +#### Signature + +```perl +sub values() +``` + +#### Source + +[`lib/SignalWire/REST/PhoneCallHandler.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/PhoneCallHandler.pm) + +Line 69. + +## Source + +[`lib/SignalWire/REST/PhoneCallHandler.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/PhoneCallHandler.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/rest/phone-call-handler/phone-call-handler/index.mdx b/fern/products/sdk-reference/perl/rest/phone-call-handler/phone-call-handler/index.mdx deleted file mode 100644 index 8d2a01e673..0000000000 --- a/fern/products/sdk-reference/perl/rest/phone-call-handler/phone-call-handler/index.mdx +++ /dev/null @@ -1,67 +0,0 @@ ---- -slug: "/reference/perl/rest/phone-call-handler/phone-call-handler" -title: "PhoneCallHandler" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::REST::PhoneCallHandler" - parent: "rest.PhoneCallHandler" - module: "rest.PhoneCallHandler" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/PhoneCallHandler.pm" ---- -# `PhoneCallHandler` - -## Signature - -```perl -package SignalWire::REST::PhoneCallHandler -``` - -## Constants - - - - - - - - - - - - - - - - - - - - - - - -## Methods - -### values - -#### Signature - -```perl -sub values() -``` - -#### Source - -[`lib/SignalWire/REST/PhoneCallHandler.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/PhoneCallHandler.pm) - -Line 69. - -## Source - -[`lib/SignalWire/REST/PhoneCallHandler.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/PhoneCallHandler.pm) - -Line 1. diff --git a/fern/products/sdk-reference/perl/rest/rest-client/index.mdx b/fern/products/sdk-reference/perl/rest/rest-client/index.mdx index 8612274ea4..5789a16dca 100644 --- a/fern/products/sdk-reference/perl/rest/rest-client/index.mdx +++ b/fern/products/sdk-reference/perl/rest/rest-client/index.mdx @@ -5,16 +5,23 @@ sdk_label: "Perl SDK" icon: "perl" lustri: auto_generated: true - kind: "module" + kind: "class" language: "perl" - qualified_name: "rest.RestClient" + qualified_name: "SignalWire::REST::RestClient" parent: "rest" module: "rest" + source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/RestClient.pm" --- # `RestClient` -## Classes +## Signature - - - +```perl +package SignalWire::REST::RestClient +``` + +## Source + +[`lib/SignalWire/REST/RestClient.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/RestClient.pm) + +Line 1. diff --git a/fern/products/sdk-reference/perl/rest/rest-client/rest-client/index.mdx b/fern/products/sdk-reference/perl/rest/rest-client/rest-client/index.mdx deleted file mode 100644 index cf8ac8a308..0000000000 --- a/fern/products/sdk-reference/perl/rest/rest-client/rest-client/index.mdx +++ /dev/null @@ -1,27 +0,0 @@ ---- -slug: "/reference/perl/rest/rest-client/rest-client" -title: "RestClient" -sdk_label: "Perl SDK" -icon: "perl" -lustri: - auto_generated: true - kind: "class" - language: "perl" - qualified_name: "SignalWire::REST::RestClient" - parent: "rest.RestClient" - module: "rest.RestClient" - source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/RestClient.pm" ---- -# `RestClient` - -## Signature - -```perl -package SignalWire::REST::RestClient -``` - -## Source - -[`lib/SignalWire/REST/RestClient.pm`](https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/REST/RestClient.pm) - -Line 1. diff --git a/fern/products/sdk-reference/python/_meta.json b/fern/products/sdk-reference/python/_meta.json index 805bad8059..104951e85b 100644 --- a/fern/products/sdk-reference/python/_meta.json +++ b/fern/products/sdk-reference/python/_meta.json @@ -6,5 +6,5 @@ "format": "mdx", "platform": "fern", "base_slug": "/reference/python", - "item_count": 2411 + "item_count": 2409 } \ No newline at end of file diff --git a/fern/products/sdk-reference/python/agents/index.mdx b/fern/products/sdk-reference/python/agents/index.mdx index dc5202b704..3f014b480e 100644 --- a/fern/products/sdk-reference/python/agents/index.mdx +++ b/fern/products/sdk-reference/python/agents/index.mdx @@ -114,3 +114,132 @@ lustri: Copyright (c) 2025 SignalWire + +## Functions + +### add\_skill\_directory + +Add a directory to search for skills + +This allows third-party skill collections to be registered by path. +Skills in these directories should follow the same structure as built-in skills. + +> \[!NOTE] +> +> > > > add\_skill\_directory('/opt/custom\_skills') +> > > > +> > > > ### Now agent.add\_skill('my\_custom\_skill') will search in this directory + +#### Signature + +```python +add_skill_directory(path) +``` + +#### Parameters + + + Path to directory containing skill subdirectories + + +#### Source + +[`signalwire/signalwire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/__init__.py) + +Line 98. + +*** + +### list\_skills + +List all available skills with metadata. + +Returns one dict per skill (name, description, version, required packages / +env vars, multi-instance support). Delegates to the skill registry — the +same source as `list_skills_with_params()`, but the lighter summary. + +#### Signature + +```python +list_skills() +``` + +#### Source + +[`signalwire/signalwire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/__init__.py) + +Line 45. + +*** + +### list\_skills\_with\_params + +Get complete schema for all available skills including parameter metadata + +This function returns a comprehensive schema for all available skills, +including their metadata and parameter definitions. This is useful for +GUI configuration tools, API documentation, or programmatic skill discovery. + +> \[!NOTE] +> +> > > > schema = list\_skills\_with\_params() +> > > > print(schema\['web\_search']\['parameters']\['api\_key']) +> > > > \{ +> > > > 'type': 'string', +> > > > 'description': 'Google Custom Search API key', +> > > > 'required': True, +> > > > 'hidden': True, +> > > > 'env\_var': 'GOOGLE\_SEARCH\_API\_KEY' +> > > > \} + +#### Signature + +```python +list_skills_with_params() +``` + +#### Returns + +Dict\[str, Dict\[str, Any]]: Complete skill schema where keys are skill names + +#### Source + +[`signalwire/signalwire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/__init__.py) + +Line 54. + +*** + +### register\_skill + +Register a custom skill class + +This allows third-party code to register skill classes directly without +requiring them to be in a specific directory structure. + +> \[!NOTE] +> +> > > > from my\_custom\_skills import MyWeatherSkill +> > > > register\_skill(MyWeatherSkill) +> > > > +> > > > ### Now you can use it in agents: +> > > > +> > > > agent.add\_skill('my\_weather') + +#### Signature + +```python +register_skill(skill_class) +``` + +#### Parameters + + + A class that inherits from SkillBase + + +#### Source + +[`signalwire/signalwire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/__init__.py) + +Line 79. diff --git a/fern/products/sdk-reference/python/all.mdx b/fern/products/sdk-reference/python/all.mdx new file mode 100644 index 0000000000..5e1262ef00 --- /dev/null +++ b/fern/products/sdk-reference/python/all.mdx @@ -0,0 +1,25 @@ +--- +slug: "/reference/python/all" +title: "__all__" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "property" + language: "python" + qualified_name: "signalwire.__all__" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/__init__.py" +--- +# `__all__` + +## Signature + +```python +__all__ +``` + +## Source + +[`signalwire/signalwire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/__init__.py) + +Line 120. diff --git a/fern/products/sdk-reference/python/all__2.mdx b/fern/products/sdk-reference/python/all__2.mdx new file mode 100644 index 0000000000..54f61958ca --- /dev/null +++ b/fern/products/sdk-reference/python/all__2.mdx @@ -0,0 +1,25 @@ +--- +slug: "/reference/python/all__2" +title: "__all__" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "property" + language: "python" + qualified_name: "signalwire.core.__all__" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/__init__.py" +--- +# `__all__` + +## Signature + +```python +__all__ +``` + +## Source + +[`signalwire/signalwire/core/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/__init__.py) + +Line 21. diff --git a/fern/products/sdk-reference/python/index.mdx b/fern/products/sdk-reference/python/index.mdx index 4da14a288e..32569f359c 100644 --- a/fern/products/sdk-reference/python/index.mdx +++ b/fern/products/sdk-reference/python/index.mdx @@ -15,5 +15,4 @@ lustri: - [`relay`](/docs/sdk-reference/reference/python/relay) - [`relay`](/docs/sdk-reference/reference/python/relay) - [`rest`](/docs/sdk-reference/reference/python/rest) -- [`signalwire`](/docs/sdk-reference/reference/python/signalwire) diff --git a/fern/products/sdk-reference/python/rest-client.mdx b/fern/products/sdk-reference/python/rest-client.mdx new file mode 100644 index 0000000000..c1910f3825 --- /dev/null +++ b/fern/products/sdk-reference/python/rest-client.mdx @@ -0,0 +1,33 @@ +--- +slug: "/reference/python/rest-client" +title: "RestClient" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "function" + language: "python" + qualified_name: "signalwire.RestClient" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/__init__.py" +--- +# `RestClient` + +Create a SignalWire REST API client (lazy import) + +## Signature + +```python +RestClient(*args = (), **kwargs = {}) +``` + +## Parameters + + + + + +## Source + +[`signalwire/signalwire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/__init__.py) + +Line 115. diff --git a/fern/products/sdk-reference/python/signalwire/core/index.mdx b/fern/products/sdk-reference/python/signalwire/core/index.mdx deleted file mode 100644 index ff6d0bbf6e..0000000000 --- a/fern/products/sdk-reference/python/signalwire/core/index.mdx +++ /dev/null @@ -1,36 +0,0 @@ ---- -slug: "/reference/python/signalwire/core" -title: "core" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire.core" - parent: "signalwire" - module: "signalwire" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/__init__.py" ---- -# `core` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module core -``` - -## Properties - - - -## Source - -[`signalwire/signalwire/core/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/core/__init__.py) diff --git a/fern/products/sdk-reference/python/signalwire/index.mdx b/fern/products/sdk-reference/python/signalwire/index.mdx deleted file mode 100644 index 3b8dbc226d..0000000000 --- a/fern/products/sdk-reference/python/signalwire/index.mdx +++ /dev/null @@ -1,197 +0,0 @@ ---- -slug: "/reference/python/signalwire" -title: "signalwire" -sdk_label: "Python SDK" -icon: "python" -lustri: - auto_generated: true - kind: "module" - language: "python" - qualified_name: "signalwire" - source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/__init__.py" ---- -# `signalwire` - -Copyright (c) 2025 SignalWire - -This file is part of the SignalWire SDK. - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```python -module signalwire -``` - -## Properties - - - - - -## Modules - - - - Copyright (c) 2025 SignalWire - - - -## Functions - -### add\_skill\_directory - -Add a directory to search for skills - -This allows third-party skill collections to be registered by path. -Skills in these directories should follow the same structure as built-in skills. - -> \[!NOTE] -> -> > > > add\_skill\_directory('/opt/custom\_skills') -> > > > -> > > > ### Now agent.add\_skill('my\_custom\_skill') will search in this directory - -#### Signature - -```python -add_skill_directory(path) -``` - -#### Parameters - - - Path to directory containing skill subdirectories - - -#### Source - -[`signalwire/signalwire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/__init__.py) - -Line 98. - -*** - -### list\_skills - -List all available skills with metadata. - -Returns one dict per skill (name, description, version, required packages / -env vars, multi-instance support). Delegates to the skill registry — the -same source as `list_skills_with_params()`, but the lighter summary. - -#### Signature - -```python -list_skills() -``` - -#### Source - -[`signalwire/signalwire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/__init__.py) - -Line 45. - -*** - -### list\_skills\_with\_params - -Get complete schema for all available skills including parameter metadata - -This function returns a comprehensive schema for all available skills, -including their metadata and parameter definitions. This is useful for -GUI configuration tools, API documentation, or programmatic skill discovery. - -> \[!NOTE] -> -> > > > schema = list\_skills\_with\_params() -> > > > print(schema\['web\_search']\['parameters']\['api\_key']) -> > > > \{ -> > > > 'type': 'string', -> > > > 'description': 'Google Custom Search API key', -> > > > 'required': True, -> > > > 'hidden': True, -> > > > 'env\_var': 'GOOGLE\_SEARCH\_API\_KEY' -> > > > \} - -#### Signature - -```python -list_skills_with_params() -``` - -#### Returns - -Dict\[str, Dict\[str, Any]]: Complete skill schema where keys are skill names - -#### Source - -[`signalwire/signalwire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/__init__.py) - -Line 54. - -*** - -### register\_skill - -Register a custom skill class - -This allows third-party code to register skill classes directly without -requiring them to be in a specific directory structure. - -> \[!NOTE] -> -> > > > from my\_custom\_skills import MyWeatherSkill -> > > > register\_skill(MyWeatherSkill) -> > > > -> > > > ### Now you can use it in agents: -> > > > -> > > > agent.add\_skill('my\_weather') - -#### Signature - -```python -register_skill(skill_class) -``` - -#### Parameters - - - A class that inherits from SkillBase - - -#### Source - -[`signalwire/signalwire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/__init__.py) - -Line 79. - -*** - -### RestClient - -Create a SignalWire REST API client (lazy import) - -#### Signature - -```python -RestClient(*args = (), **kwargs = {}) -``` - -#### Parameters - - - - - -#### Source - -[`signalwire/signalwire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/__init__.py) - -Line 115. - -## Source - -[`signalwire/signalwire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/__init__.py) diff --git a/fern/products/sdk-reference/python/version.mdx b/fern/products/sdk-reference/python/version.mdx new file mode 100644 index 0000000000..35d0537c72 --- /dev/null +++ b/fern/products/sdk-reference/python/version.mdx @@ -0,0 +1,25 @@ +--- +slug: "/reference/python/version" +title: "__version__" +sdk_label: "Python SDK" +icon: "python" +lustri: + auto_generated: true + kind: "property" + language: "python" + qualified_name: "signalwire.__version__" + source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/__init__.py" +--- +# `__version__` + +## Signature + +```python +__version__ +``` + +## Source + +[`signalwire/signalwire/__init__.py`](https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/__init__.py) + +Line 21. diff --git a/fern/products/sdk-reference/ruby/_meta.json b/fern/products/sdk-reference/ruby/_meta.json index 31ed89c584..d7e6d3ff8b 100644 --- a/fern/products/sdk-reference/ruby/_meta.json +++ b/fern/products/sdk-reference/ruby/_meta.json @@ -6,5 +6,5 @@ "format": "mdx", "platform": "fern", "base_slug": "/reference/ruby", - "item_count": 1778 + "item_count": 1777 } \ No newline at end of file diff --git a/fern/products/sdk-reference/ruby/agents/index.mdx b/fern/products/sdk-reference/ruby/agents/index.mdx index 52c45d2c1c..d7227c6673 100644 --- a/fern/products/sdk-reference/ruby/agents/index.mdx +++ b/fern/products/sdk-reference/ruby/agents/index.mdx @@ -50,3 +50,128 @@ lustri: + +## Methods + +### add\_skill\_directory + +Add a directory to search for skills. + +Mirrors Python's `signalwire.add_skill_directory(path)` — delegates +to the singleton \{SignalWire::Skills::SkillRegistry\} instance so +third-party skill collections can be registered by path. Subsequent +calls accumulate (de-duplicated) into a shared external paths list. + +#### Signature + +```ruby +def add_skill_directory(path) +``` + +#### Parameters + + + absolute or relative path to a skill directory. + + +#### Returns + +`void` + +#### Throws + +- `ArgumentError` — when the path doesn't exist or isn't a directory. + +#### Source + +[`lib/signalwire.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire.rb) + +Line 85. + +*** + +### list\_skills + +List all available skills. + +Mirrors Python's top-level `signalwire.list_skills()`. Delegates to +\{SignalWire::Skills::SkillRegistry#list\_skills\} on the shared +singleton registry, returning one hash per skill (`name` plus +`description` / `version` when the factory can be instantiated +without arguments). + +#### Signature + +```ruby +def list_skills +``` + +#### Returns + +`Array` + +#### Source + +[`lib/signalwire.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire.rb) + +Line 99. + +*** + +### list\_skills\_with\_params + +Get complete schema for all available skills, including parameter metadata. + +Mirrors Python's `signalwire.list_skills_with_params()`. Keys are +skill names; values describe metadata + parameter schema. Useful for +GUI configuration tools, API documentation, or programmatic skill +discovery. + +#### Signature + +```ruby +def list_skills_with_params +``` + +#### Returns + +`Hash{String => Hash}` + +#### Source + +[`lib/signalwire.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire.rb) + +Line 112. + +*** + +### register\_skill + +Register a custom skill class with the global skill registry. + +Mirrors Python's `signalwire.register_skill(skill_class)` — the +Ruby singleton registry stores factories by name. The class is +expected to expose a `::skill_name` (or `SKILL_NAME` constant) +so we can derive the registration key. + +#### Signature + +```ruby +def register_skill(skill_class) +``` + +#### Parameters + + + A subclass of \{SignalWire::Skills::SkillBase\} + + +#### Returns + +`void` + +#### Source + +[`lib/signalwire.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire.rb) + +Line 62. diff --git a/fern/products/sdk-reference/ruby/index.mdx b/fern/products/sdk-reference/ruby/index.mdx index d2b2f24076..6325d2d031 100644 --- a/fern/products/sdk-reference/ruby/index.mdx +++ b/fern/products/sdk-reference/ruby/index.mdx @@ -14,5 +14,4 @@ lustri: - [`core`](/docs/sdk-reference/reference/ruby/core) - [`Relay`](/docs/sdk-reference/reference/ruby/relay) - [`REST`](/docs/sdk-reference/reference/ruby/rest) -- [`SignalWire`](/docs/sdk-reference/reference/ruby/signal-wire) diff --git a/fern/products/sdk-reference/ruby/rest-client.mdx b/fern/products/sdk-reference/ruby/rest-client.mdx new file mode 100644 index 0000000000..cceaadb72f --- /dev/null +++ b/fern/products/sdk-reference/ruby/rest-client.mdx @@ -0,0 +1,48 @@ +--- +slug: "/reference/ruby/rest-client" +title: "RestClient" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "method" + language: "ruby" + qualified_name: "SignalWire.RestClient" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire.rb" + visibility: "public" +--- +# `RestClient` + +Construct a \{SignalWire::REST::RestClient\} instance. + +Mirrors Python's top-level `signalwire.RestClient(*args, **kwargs)` +factory — a thin wrapper that lazy-imports +`signalwire.rest.RestClient` and instantiates it. Supports both +positional credentials (matching Go-style `RestClient(project, +token, host)`) and keyword credentials (Ruby-idiomatic). + +## Signature + +```ruby +def RestClient(*args, **kwargs) +``` + +## Parameters + + + Positional credentials (compat shim). + + + + Keyword credentials forwarded to the constructor. + + +## Returns + +`SignalWire::REST::RestClient` + +## Source + +[`lib/signalwire.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire.rb) + +Line 42. diff --git a/fern/products/sdk-reference/ruby/signal-wire/index.mdx b/fern/products/sdk-reference/ruby/signal-wire/index.mdx deleted file mode 100644 index 3c31eaa096..0000000000 --- a/fern/products/sdk-reference/ruby/signal-wire/index.mdx +++ /dev/null @@ -1,198 +0,0 @@ ---- -slug: "/reference/ruby/signal-wire" -title: "SignalWire" -sdk_label: "Ruby SDK" -icon: "ruby" -lustri: - auto_generated: true - kind: "module" - language: "ruby" - qualified_name: "SignalWire" - source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/runtime.rb" - visibility: "public" ---- -# `SignalWire` - -Copyright (c) 2025 SignalWire - -Licensed under the MIT License. -See LICENSE file in the project root for full license information. - -## Signature - -```ruby -module SignalWire -``` - -## Constants - - - -## Methods - -### add\_skill\_directory - -Add a directory to search for skills. - -Mirrors Python's `signalwire.add_skill_directory(path)` — delegates -to the singleton \{SignalWire::Skills::SkillRegistry\} instance so -third-party skill collections can be registered by path. Subsequent -calls accumulate (de-duplicated) into a shared external paths list. - -#### Signature - -```ruby -def add_skill_directory(path) -``` - -#### Parameters - - - absolute or relative path to a skill directory. - - -#### Returns - -`void` - -#### Throws - -- `ArgumentError` — when the path doesn't exist or isn't a directory. - -#### Source - -[`lib/signalwire.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire.rb) - -Line 85. - -*** - -### list\_skills - -List all available skills. - -Mirrors Python's top-level `signalwire.list_skills()`. Delegates to -\{SignalWire::Skills::SkillRegistry#list\_skills\} on the shared -singleton registry, returning one hash per skill (`name` plus -`description` / `version` when the factory can be instantiated -without arguments). - -#### Signature - -```ruby -def list_skills -``` - -#### Returns - -`Array` - -#### Source - -[`lib/signalwire.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire.rb) - -Line 99. - -*** - -### list\_skills\_with\_params - -Get complete schema for all available skills, including parameter metadata. - -Mirrors Python's `signalwire.list_skills_with_params()`. Keys are -skill names; values describe metadata + parameter schema. Useful for -GUI configuration tools, API documentation, or programmatic skill -discovery. - -#### Signature - -```ruby -def list_skills_with_params -``` - -#### Returns - -`Hash{String => Hash}` - -#### Source - -[`lib/signalwire.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire.rb) - -Line 112. - -*** - -### register\_skill - -Register a custom skill class with the global skill registry. - -Mirrors Python's `signalwire.register_skill(skill_class)` — the -Ruby singleton registry stores factories by name. The class is -expected to expose a `::skill_name` (or `SKILL_NAME` constant) -so we can derive the registration key. - -#### Signature - -```ruby -def register_skill(skill_class) -``` - -#### Parameters - - - A subclass of \{SignalWire::Skills::SkillBase\} - - -#### Returns - -`void` - -#### Source - -[`lib/signalwire.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire.rb) - -Line 62. - -*** - -### RestClient - -Construct a \{SignalWire::REST::RestClient\} instance. - -Mirrors Python's top-level `signalwire.RestClient(*args, **kwargs)` -factory — a thin wrapper that lazy-imports -`signalwire.rest.RestClient` and instantiates it. Supports both -positional credentials (matching Go-style `RestClient(project, -token, host)`) and keyword credentials (Ruby-idiomatic). - -#### Signature - -```ruby -def RestClient(*args, **kwargs) -``` - -#### Parameters - - - Positional credentials (compat shim). - - - - Keyword credentials forwarded to the constructor. - - -#### Returns - -`SignalWire::REST::RestClient` - -#### Source - -[`lib/signalwire.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire.rb) - -Line 42. - -## Source - -[`lib/signalwire/runtime.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/runtime.rb) - -Line 8. diff --git a/fern/products/sdk-reference/ruby/version.mdx b/fern/products/sdk-reference/ruby/version.mdx new file mode 100644 index 0000000000..339eb24650 --- /dev/null +++ b/fern/products/sdk-reference/ruby/version.mdx @@ -0,0 +1,26 @@ +--- +slug: "/reference/ruby/version" +title: "VERSION" +sdk_label: "Ruby SDK" +icon: "ruby" +lustri: + auto_generated: true + kind: "constant" + language: "ruby" + qualified_name: "SignalWire::VERSION" + source_url: "https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/version.rb" + visibility: "public" +--- +# `VERSION` + +## Signature + +```ruby +VERSION = '2.0.0' +``` + +## Source + +[`lib/signalwire/version.rb`](https://github.com/signalwire/signalwire-ruby/blob/main/lib/signalwire/version.rb) + +Line 4. From 6f5b1235c0edd29758823d4cfbb699f5b51464ad Mon Sep 17 00:00:00 2001 From: Devon-White Date: Fri, 12 Jun 2026 13:17:34 -0400 Subject: [PATCH 8/8] SDK Reference: surface package-root facades under Core (java/php/cpp/rust) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The cascade fix lets the package-root facade route into Core without dragging the relay/rest buckets, so java/php/cpp/rust no longer carry a nav-excluded wrapper dir — their factory + skill-helper entry points now appear under Core. perl comment cleanup. 8/10 SDKs are fully clean. --- fern/products/sdk-reference/cpp/core/index.mdx | 4 ++++ .../sdk-reference/cpp/{ => core}/signalwire/index.mdx | 4 +++- .../sdk-reference/dotnet/relay/actions/action/index.mdx | 2 +- .../dotnet/relay/actions/ai-action/index.mdx | 2 +- .../dotnet/relay/actions/collect-action/index.mdx | 2 +- .../dotnet/relay/actions/detect-action/index.mdx | 2 +- .../dotnet/relay/actions/fax-action/index.mdx | 2 +- .../dotnet/relay/actions/pay-action/index.mdx | 2 +- .../dotnet/relay/actions/play-action/index.mdx | 2 +- .../dotnet/relay/actions/record-action/index.mdx | 2 +- .../dotnet/relay/actions/stream-action/index.mdx | 2 +- .../dotnet/relay/actions/tap-action/index.mdx | 2 +- .../dotnet/relay/actions/transcribe-action/index.mdx | 2 +- fern/products/sdk-reference/java/core/index.mdx | 4 ++++ .../java/{com/signalwire/sdk => core}/sdk/index.mdx | 5 +++-- .../perl/agents/contexts/context-builder/index.mdx | 2 +- .../products/sdk-reference/perl/agents/contexts/index.mdx | 2 +- .../products/sdk-reference/perl/agents/data-map/index.mdx | 2 +- fern/products/sdk-reference/perl/core/logging/index.mdx | 2 +- .../sdk-reference/perl/core/logging/log-level/index.mdx | 2 +- fern/products/sdk-reference/perl/core/utils/index.mdx | 2 +- .../sdk-reference/perl/core/utils/url-validator/index.mdx | 2 +- fern/products/sdk-reference/php/core/index.mdx | 6 ++++++ .../php/{signal-wire => core}/signal-wire/index.mdx | 5 +++-- .../sdk-reference/python/relay/actions/action/index.mdx | 2 +- .../python/relay/actions/ai-action/index.mdx | 2 +- .../python/relay/actions/collect-action/index.mdx | 2 +- .../python/relay/actions/detect-action/index.mdx | 2 +- .../python/relay/actions/fax-action/index.mdx | 2 +- .../python/relay/actions/pay-action/index.mdx | 2 +- .../python/relay/actions/play-action/index.mdx | 2 +- .../python/relay/actions/record-action/index.mdx | 2 +- .../relay/actions/standalone-collect-action/index.mdx | 2 +- .../python/relay/actions/stream-action/index.mdx | 2 +- .../python/relay/actions/tap-action/index.mdx | 2 +- .../python/relay/actions/transcribe-action/index.mdx | 2 +- fern/products/sdk-reference/rust/core/index.mdx | 8 ++++++++ .../sdk-reference/rust/{ => core}/signalwire/index.mdx | 4 +++- .../sdk-reference/rust/relay/actions/action/index.mdx | 2 +- .../sdk-reference/rust/relay/actions/ai-action/index.mdx | 2 +- .../rust/relay/actions/collect-action/index.mdx | 2 +- .../rust/relay/actions/detect-action/index.mdx | 2 +- .../sdk-reference/rust/relay/actions/fax-action/index.mdx | 2 +- .../sdk-reference/rust/relay/actions/pay-action/index.mdx | 2 +- .../rust/relay/actions/play-action/index.mdx | 2 +- .../rust/relay/actions/record-action/index.mdx | 2 +- .../rust/relay/actions/stream-action/index.mdx | 2 +- .../sdk-reference/rust/relay/actions/tap-action/index.mdx | 2 +- .../rust/relay/actions/transcribe-action/index.mdx | 2 +- 49 files changed, 75 insertions(+), 47 deletions(-) rename fern/products/sdk-reference/cpp/{ => core}/signalwire/index.mdx (99%) rename fern/products/sdk-reference/java/{com/signalwire/sdk => core}/sdk/index.mdx (98%) rename fern/products/sdk-reference/php/{signal-wire => core}/signal-wire/index.mdx (98%) rename fern/products/sdk-reference/rust/{ => core}/signalwire/index.mdx (98%) diff --git a/fern/products/sdk-reference/cpp/core/index.mdx b/fern/products/sdk-reference/cpp/core/index.mdx index 62d54f3fa4..6bfc994837 100644 --- a/fern/products/sdk-reference/cpp/core/index.mdx +++ b/fern/products/sdk-reference/cpp/core/index.mdx @@ -15,6 +15,10 @@ lustri: + + + SignalWire webhook signature validation. Implements both schemes from porting-sdk/webhooks.md: + ## Modules diff --git a/fern/products/sdk-reference/cpp/signalwire/index.mdx b/fern/products/sdk-reference/cpp/core/signalwire/index.mdx similarity index 99% rename from fern/products/sdk-reference/cpp/signalwire/index.mdx rename to fern/products/sdk-reference/cpp/core/signalwire/index.mdx index 546cfd128b..afb7d245ee 100644 --- a/fern/products/sdk-reference/cpp/signalwire/index.mdx +++ b/fern/products/sdk-reference/cpp/core/signalwire/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/cpp/signalwire" +slug: "/reference/cpp/core/signalwire" title: "signalwire" sdk_label: "C++ SDK" icon: "cpp" @@ -8,6 +8,8 @@ lustri: kind: "class" language: "cpp" qualified_name: "signalwire" + parent: "core" + module: "core" source_url: "https://github.com/signalwire/signalwire-cpp/blob/main/include/signalwire/logging.hpp" --- # `signalwire` diff --git a/fern/products/sdk-reference/dotnet/relay/actions/action/index.mdx b/fern/products/sdk-reference/dotnet/relay/actions/action/index.mdx index e305cae580..f4729a7787 100644 --- a/fern/products/sdk-reference/dotnet/relay/actions/action/index.mdx +++ b/fern/products/sdk-reference/dotnet/relay/actions/action/index.mdx @@ -9,7 +9,7 @@ lustri: language: "dotnet" qualified_name: "SignalWire.Relay.Action" parent: "relay.actions" - module: "relay.SignalWire.Relay" + module: "relay.actions" source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs" visibility: "public" --- diff --git a/fern/products/sdk-reference/dotnet/relay/actions/ai-action/index.mdx b/fern/products/sdk-reference/dotnet/relay/actions/ai-action/index.mdx index 9059105cdc..e68e83da21 100644 --- a/fern/products/sdk-reference/dotnet/relay/actions/ai-action/index.mdx +++ b/fern/products/sdk-reference/dotnet/relay/actions/ai-action/index.mdx @@ -9,7 +9,7 @@ lustri: language: "dotnet" qualified_name: "SignalWire.Relay.AIAction" parent: "relay.actions" - module: "relay.SignalWire.Relay" + module: "relay.actions" source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs" visibility: "public" --- diff --git a/fern/products/sdk-reference/dotnet/relay/actions/collect-action/index.mdx b/fern/products/sdk-reference/dotnet/relay/actions/collect-action/index.mdx index 3bca069158..1e2076f700 100644 --- a/fern/products/sdk-reference/dotnet/relay/actions/collect-action/index.mdx +++ b/fern/products/sdk-reference/dotnet/relay/actions/collect-action/index.mdx @@ -9,7 +9,7 @@ lustri: language: "dotnet" qualified_name: "SignalWire.Relay.CollectAction" parent: "relay.actions" - module: "relay.SignalWire.Relay" + module: "relay.actions" source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs" visibility: "public" --- diff --git a/fern/products/sdk-reference/dotnet/relay/actions/detect-action/index.mdx b/fern/products/sdk-reference/dotnet/relay/actions/detect-action/index.mdx index 6954285b75..5620edd9f9 100644 --- a/fern/products/sdk-reference/dotnet/relay/actions/detect-action/index.mdx +++ b/fern/products/sdk-reference/dotnet/relay/actions/detect-action/index.mdx @@ -9,7 +9,7 @@ lustri: language: "dotnet" qualified_name: "SignalWire.Relay.DetectAction" parent: "relay.actions" - module: "relay.SignalWire.Relay" + module: "relay.actions" source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs" visibility: "public" --- diff --git a/fern/products/sdk-reference/dotnet/relay/actions/fax-action/index.mdx b/fern/products/sdk-reference/dotnet/relay/actions/fax-action/index.mdx index fb5664e562..155c8cbc4d 100644 --- a/fern/products/sdk-reference/dotnet/relay/actions/fax-action/index.mdx +++ b/fern/products/sdk-reference/dotnet/relay/actions/fax-action/index.mdx @@ -9,7 +9,7 @@ lustri: language: "dotnet" qualified_name: "SignalWire.Relay.FaxAction" parent: "relay.actions" - module: "relay.SignalWire.Relay" + module: "relay.actions" source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs" visibility: "public" --- diff --git a/fern/products/sdk-reference/dotnet/relay/actions/pay-action/index.mdx b/fern/products/sdk-reference/dotnet/relay/actions/pay-action/index.mdx index fb25679dc0..8f674406fd 100644 --- a/fern/products/sdk-reference/dotnet/relay/actions/pay-action/index.mdx +++ b/fern/products/sdk-reference/dotnet/relay/actions/pay-action/index.mdx @@ -9,7 +9,7 @@ lustri: language: "dotnet" qualified_name: "SignalWire.Relay.PayAction" parent: "relay.actions" - module: "relay.SignalWire.Relay" + module: "relay.actions" source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs" visibility: "public" --- diff --git a/fern/products/sdk-reference/dotnet/relay/actions/play-action/index.mdx b/fern/products/sdk-reference/dotnet/relay/actions/play-action/index.mdx index 81488759c2..0808c44adb 100644 --- a/fern/products/sdk-reference/dotnet/relay/actions/play-action/index.mdx +++ b/fern/products/sdk-reference/dotnet/relay/actions/play-action/index.mdx @@ -9,7 +9,7 @@ lustri: language: "dotnet" qualified_name: "SignalWire.Relay.PlayAction" parent: "relay.actions" - module: "relay.SignalWire.Relay" + module: "relay.actions" source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs" visibility: "public" --- diff --git a/fern/products/sdk-reference/dotnet/relay/actions/record-action/index.mdx b/fern/products/sdk-reference/dotnet/relay/actions/record-action/index.mdx index 5585cbb746..514e4c906b 100644 --- a/fern/products/sdk-reference/dotnet/relay/actions/record-action/index.mdx +++ b/fern/products/sdk-reference/dotnet/relay/actions/record-action/index.mdx @@ -9,7 +9,7 @@ lustri: language: "dotnet" qualified_name: "SignalWire.Relay.RecordAction" parent: "relay.actions" - module: "relay.SignalWire.Relay" + module: "relay.actions" source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs" visibility: "public" --- diff --git a/fern/products/sdk-reference/dotnet/relay/actions/stream-action/index.mdx b/fern/products/sdk-reference/dotnet/relay/actions/stream-action/index.mdx index ec7f9a2ff3..8ae641b11b 100644 --- a/fern/products/sdk-reference/dotnet/relay/actions/stream-action/index.mdx +++ b/fern/products/sdk-reference/dotnet/relay/actions/stream-action/index.mdx @@ -9,7 +9,7 @@ lustri: language: "dotnet" qualified_name: "SignalWire.Relay.StreamAction" parent: "relay.actions" - module: "relay.SignalWire.Relay" + module: "relay.actions" source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs" visibility: "public" --- diff --git a/fern/products/sdk-reference/dotnet/relay/actions/tap-action/index.mdx b/fern/products/sdk-reference/dotnet/relay/actions/tap-action/index.mdx index b20d9b433d..83c5c486b0 100644 --- a/fern/products/sdk-reference/dotnet/relay/actions/tap-action/index.mdx +++ b/fern/products/sdk-reference/dotnet/relay/actions/tap-action/index.mdx @@ -9,7 +9,7 @@ lustri: language: "dotnet" qualified_name: "SignalWire.Relay.TapAction" parent: "relay.actions" - module: "relay.SignalWire.Relay" + module: "relay.actions" source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs" visibility: "public" --- diff --git a/fern/products/sdk-reference/dotnet/relay/actions/transcribe-action/index.mdx b/fern/products/sdk-reference/dotnet/relay/actions/transcribe-action/index.mdx index fc85ec1ad7..3ee8e5ccf7 100644 --- a/fern/products/sdk-reference/dotnet/relay/actions/transcribe-action/index.mdx +++ b/fern/products/sdk-reference/dotnet/relay/actions/transcribe-action/index.mdx @@ -9,7 +9,7 @@ lustri: language: "dotnet" qualified_name: "SignalWire.Relay.TranscribeAction" parent: "relay.actions" - module: "relay.SignalWire.Relay" + module: "relay.actions" source_url: "https://github.com/signalwire/signalwire-dotnet/blob/main/src/SignalWire/Relay/Action.cs" visibility: "public" --- diff --git a/fern/products/sdk-reference/java/core/index.mdx b/fern/products/sdk-reference/java/core/index.mdx index d99500e5bb..117e881be8 100644 --- a/fern/products/sdk-reference/java/core/index.mdx +++ b/fern/products/sdk-reference/java/core/index.mdx @@ -18,6 +18,10 @@ lustri: Simple logging system with level control via environment variables. <p> Levels: DEBUG, INFO, WARN, ERROR, OFF <p> Environment variables: <ul> <li>SIGNALWIRE\_LOG\_LEVEL - set log level (debug/info/warn/error/off)</li> <li>SIGNALWIRE\_LOG\_MODE - set to "off" to suppress all output</li> </ul> + + Top-level convenience entry points — mirror Python's `signalwire/__init__.py` package-level helpers (`RestClient`, `register_skill`, `add_skill_directory`, `list_skills_with_params`). <p>This is a static-only utility class; it cannot be instantiated. + + SSRF-prevention guard for user-supplied URLs. <p> Mirrors Python's `signalwire.utils.url_validator.validate_url`: rejects non-http(s) schemes, missing hostnames, and any URL whose hostname resolves to a private / loopback / link-local / cloud-metadata IP. diff --git a/fern/products/sdk-reference/java/com/signalwire/sdk/sdk/index.mdx b/fern/products/sdk-reference/java/core/sdk/index.mdx similarity index 98% rename from fern/products/sdk-reference/java/com/signalwire/sdk/sdk/index.mdx rename to fern/products/sdk-reference/java/core/sdk/index.mdx index c7540eb357..375130c89f 100644 --- a/fern/products/sdk-reference/java/com/signalwire/sdk/sdk/index.mdx +++ b/fern/products/sdk-reference/java/core/sdk/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/java/com/signalwire/sdk/sdk" +slug: "/reference/java/core/sdk" title: "sdk" sdk_label: "Java SDK" icon: "java" @@ -8,7 +8,8 @@ lustri: kind: "class" language: "java" qualified_name: "com.signalwire.sdk" - module: "com.signalwire.sdk" + parent: "core" + module: "core" source_url: "https://github.com/signalwire/signalwire-java/blob/main/src/main/java/com/signalwire/sdk/Signalwire.java" --- # `sdk` diff --git a/fern/products/sdk-reference/perl/agents/contexts/context-builder/index.mdx b/fern/products/sdk-reference/perl/agents/contexts/context-builder/index.mdx index 4e24838c89..040034d716 100644 --- a/fern/products/sdk-reference/perl/agents/contexts/context-builder/index.mdx +++ b/fern/products/sdk-reference/perl/agents/contexts/context-builder/index.mdx @@ -9,7 +9,7 @@ lustri: language: "perl" qualified_name: "SignalWire::Contexts::ContextBuilder" parent: "SignalWire::Contexts" - module: "core.SignalWire.Contexts" + module: "agents.Contexts" source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Contexts/ContextBuilder.pm" --- # `ContextBuilder` diff --git a/fern/products/sdk-reference/perl/agents/contexts/index.mdx b/fern/products/sdk-reference/perl/agents/contexts/index.mdx index 485dc30912..a0c14691d4 100644 --- a/fern/products/sdk-reference/perl/agents/contexts/index.mdx +++ b/fern/products/sdk-reference/perl/agents/contexts/index.mdx @@ -9,7 +9,7 @@ lustri: language: "perl" qualified_name: "SignalWire::Contexts" parent: "agents" - module: "core.SignalWire" + module: "agents" source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Contexts.pm" --- # `Contexts` diff --git a/fern/products/sdk-reference/perl/agents/data-map/index.mdx b/fern/products/sdk-reference/perl/agents/data-map/index.mdx index d4f01bdc4c..df2af286ae 100644 --- a/fern/products/sdk-reference/perl/agents/data-map/index.mdx +++ b/fern/products/sdk-reference/perl/agents/data-map/index.mdx @@ -9,7 +9,7 @@ lustri: language: "perl" qualified_name: "SignalWire::DataMap" parent: "agents" - module: "core.SignalWire" + module: "agents" source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/DataMap.pm" --- # `DataMap` diff --git a/fern/products/sdk-reference/perl/core/logging/index.mdx b/fern/products/sdk-reference/perl/core/logging/index.mdx index f8e4b06054..6c7dcb8dbb 100644 --- a/fern/products/sdk-reference/perl/core/logging/index.mdx +++ b/fern/products/sdk-reference/perl/core/logging/index.mdx @@ -9,7 +9,7 @@ lustri: language: "perl" qualified_name: "SignalWire::Logging" parent: "core" - module: "core.SignalWire" + module: "core" source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Logging.pm" --- # `Logging` diff --git a/fern/products/sdk-reference/perl/core/logging/log-level/index.mdx b/fern/products/sdk-reference/perl/core/logging/log-level/index.mdx index 42a58d0faa..0588b34ecc 100644 --- a/fern/products/sdk-reference/perl/core/logging/log-level/index.mdx +++ b/fern/products/sdk-reference/perl/core/logging/log-level/index.mdx @@ -9,7 +9,7 @@ lustri: language: "perl" qualified_name: "SignalWire::Logging::LogLevel" parent: "SignalWire::Logging" - module: "core.SignalWire.Logging" + module: "core.Logging" source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Logging/LogLevel.pm" --- # `LogLevel` diff --git a/fern/products/sdk-reference/perl/core/utils/index.mdx b/fern/products/sdk-reference/perl/core/utils/index.mdx index d189fa2146..f62f89721d 100644 --- a/fern/products/sdk-reference/perl/core/utils/index.mdx +++ b/fern/products/sdk-reference/perl/core/utils/index.mdx @@ -9,7 +9,7 @@ lustri: language: "perl" qualified_name: "SignalWire::Utils" parent: "core" - module: "core.SignalWire" + module: "core" source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Utils.pm" --- # `Utils` diff --git a/fern/products/sdk-reference/perl/core/utils/url-validator/index.mdx b/fern/products/sdk-reference/perl/core/utils/url-validator/index.mdx index 4f8fdd106e..a50970dc5e 100644 --- a/fern/products/sdk-reference/perl/core/utils/url-validator/index.mdx +++ b/fern/products/sdk-reference/perl/core/utils/url-validator/index.mdx @@ -9,7 +9,7 @@ lustri: language: "perl" qualified_name: "SignalWire::Utils::UrlValidator" parent: "SignalWire::Utils" - module: "core.SignalWire.Utils" + module: "core.Utils" source_url: "https://github.com/signalwire/signalwire-perl/blob/main/lib/SignalWire/Utils/UrlValidator.pm" --- # `UrlValidator` diff --git a/fern/products/sdk-reference/php/core/index.mdx b/fern/products/sdk-reference/php/core/index.mdx index 0bfea592ca..45890a9fa7 100644 --- a/fern/products/sdk-reference/php/core/index.mdx +++ b/fern/products/sdk-reference/php/core/index.mdx @@ -11,6 +11,12 @@ lustri: --- # `core` +## Classes + + + + + ## Modules diff --git a/fern/products/sdk-reference/php/signal-wire/signal-wire/index.mdx b/fern/products/sdk-reference/php/core/signal-wire/index.mdx similarity index 98% rename from fern/products/sdk-reference/php/signal-wire/signal-wire/index.mdx rename to fern/products/sdk-reference/php/core/signal-wire/index.mdx index 6b7a037d1f..23bb142ed3 100644 --- a/fern/products/sdk-reference/php/signal-wire/signal-wire/index.mdx +++ b/fern/products/sdk-reference/php/core/signal-wire/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/php/signal-wire/signal-wire" +slug: "/reference/php/core/signal-wire" title: "SignalWire" sdk_label: "PHP SDK" icon: "php" @@ -8,7 +8,8 @@ lustri: kind: "class" language: "php" qualified_name: "SignalWire" - module: "SignalWire" + parent: "core" + module: "core" source_url: "https://github.com/signalwire/signalwire-php/blob/main/SignalWire/SignalWire.php" --- # `SignalWire` diff --git a/fern/products/sdk-reference/python/relay/actions/action/index.mdx b/fern/products/sdk-reference/python/relay/actions/action/index.mdx index 0aec287986..e6a820960a 100644 --- a/fern/products/sdk-reference/python/relay/actions/action/index.mdx +++ b/fern/products/sdk-reference/python/relay/actions/action/index.mdx @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.relay.call.Action" parent: "relay.actions" - module: "relay.call" + module: "relay.actions" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py" --- # `Action` diff --git a/fern/products/sdk-reference/python/relay/actions/ai-action/index.mdx b/fern/products/sdk-reference/python/relay/actions/ai-action/index.mdx index 1219d52ebb..9614d09463 100644 --- a/fern/products/sdk-reference/python/relay/actions/ai-action/index.mdx +++ b/fern/products/sdk-reference/python/relay/actions/ai-action/index.mdx @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.relay.call.AIAction" parent: "relay.actions" - module: "relay.call" + module: "relay.actions" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py" --- # `AIAction` diff --git a/fern/products/sdk-reference/python/relay/actions/collect-action/index.mdx b/fern/products/sdk-reference/python/relay/actions/collect-action/index.mdx index e414cab47b..4e227a3795 100644 --- a/fern/products/sdk-reference/python/relay/actions/collect-action/index.mdx +++ b/fern/products/sdk-reference/python/relay/actions/collect-action/index.mdx @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.relay.call.CollectAction" parent: "relay.actions" - module: "relay.call" + module: "relay.actions" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py" --- # `CollectAction` diff --git a/fern/products/sdk-reference/python/relay/actions/detect-action/index.mdx b/fern/products/sdk-reference/python/relay/actions/detect-action/index.mdx index bdb88987d6..1c3fac2aac 100644 --- a/fern/products/sdk-reference/python/relay/actions/detect-action/index.mdx +++ b/fern/products/sdk-reference/python/relay/actions/detect-action/index.mdx @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.relay.call.DetectAction" parent: "relay.actions" - module: "relay.call" + module: "relay.actions" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py" --- # `DetectAction` diff --git a/fern/products/sdk-reference/python/relay/actions/fax-action/index.mdx b/fern/products/sdk-reference/python/relay/actions/fax-action/index.mdx index 2c2482c975..95c4ee80b6 100644 --- a/fern/products/sdk-reference/python/relay/actions/fax-action/index.mdx +++ b/fern/products/sdk-reference/python/relay/actions/fax-action/index.mdx @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.relay.call.FaxAction" parent: "relay.actions" - module: "relay.call" + module: "relay.actions" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py" --- # `FaxAction` diff --git a/fern/products/sdk-reference/python/relay/actions/pay-action/index.mdx b/fern/products/sdk-reference/python/relay/actions/pay-action/index.mdx index 181be47185..5e2f9b14c0 100644 --- a/fern/products/sdk-reference/python/relay/actions/pay-action/index.mdx +++ b/fern/products/sdk-reference/python/relay/actions/pay-action/index.mdx @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.relay.call.PayAction" parent: "relay.actions" - module: "relay.call" + module: "relay.actions" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py" --- # `PayAction` diff --git a/fern/products/sdk-reference/python/relay/actions/play-action/index.mdx b/fern/products/sdk-reference/python/relay/actions/play-action/index.mdx index 635b8908c5..ee5c6837c5 100644 --- a/fern/products/sdk-reference/python/relay/actions/play-action/index.mdx +++ b/fern/products/sdk-reference/python/relay/actions/play-action/index.mdx @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.relay.call.PlayAction" parent: "relay.actions" - module: "relay.call" + module: "relay.actions" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py" --- # `PlayAction` diff --git a/fern/products/sdk-reference/python/relay/actions/record-action/index.mdx b/fern/products/sdk-reference/python/relay/actions/record-action/index.mdx index 4c889aa313..8fb11dc34e 100644 --- a/fern/products/sdk-reference/python/relay/actions/record-action/index.mdx +++ b/fern/products/sdk-reference/python/relay/actions/record-action/index.mdx @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.relay.call.RecordAction" parent: "relay.actions" - module: "relay.call" + module: "relay.actions" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py" --- # `RecordAction` diff --git a/fern/products/sdk-reference/python/relay/actions/standalone-collect-action/index.mdx b/fern/products/sdk-reference/python/relay/actions/standalone-collect-action/index.mdx index 3c78a1317b..f85b17dac2 100644 --- a/fern/products/sdk-reference/python/relay/actions/standalone-collect-action/index.mdx +++ b/fern/products/sdk-reference/python/relay/actions/standalone-collect-action/index.mdx @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.relay.call.StandaloneCollectAction" parent: "relay.actions" - module: "relay.call" + module: "relay.actions" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py" --- # `StandaloneCollectAction` diff --git a/fern/products/sdk-reference/python/relay/actions/stream-action/index.mdx b/fern/products/sdk-reference/python/relay/actions/stream-action/index.mdx index d92fb9b959..f4e1084f75 100644 --- a/fern/products/sdk-reference/python/relay/actions/stream-action/index.mdx +++ b/fern/products/sdk-reference/python/relay/actions/stream-action/index.mdx @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.relay.call.StreamAction" parent: "relay.actions" - module: "relay.call" + module: "relay.actions" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py" --- # `StreamAction` diff --git a/fern/products/sdk-reference/python/relay/actions/tap-action/index.mdx b/fern/products/sdk-reference/python/relay/actions/tap-action/index.mdx index d836dda465..53683727cc 100644 --- a/fern/products/sdk-reference/python/relay/actions/tap-action/index.mdx +++ b/fern/products/sdk-reference/python/relay/actions/tap-action/index.mdx @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.relay.call.TapAction" parent: "relay.actions" - module: "relay.call" + module: "relay.actions" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py" --- # `TapAction` diff --git a/fern/products/sdk-reference/python/relay/actions/transcribe-action/index.mdx b/fern/products/sdk-reference/python/relay/actions/transcribe-action/index.mdx index 6972ffcb59..5c498aefca 100644 --- a/fern/products/sdk-reference/python/relay/actions/transcribe-action/index.mdx +++ b/fern/products/sdk-reference/python/relay/actions/transcribe-action/index.mdx @@ -9,7 +9,7 @@ lustri: language: "python" qualified_name: "signalwire.relay.call.TranscribeAction" parent: "relay.actions" - module: "relay.call" + module: "relay.actions" source_url: "https://github.com/signalwire/signalwire-python/blob/main/signalwire/signalwire/relay/call.py" --- # `TranscribeAction` diff --git a/fern/products/sdk-reference/rust/core/index.mdx b/fern/products/sdk-reference/rust/core/index.mdx index e10f0c482f..9644591013 100644 --- a/fern/products/sdk-reference/rust/core/index.mdx +++ b/fern/products/sdk-reference/rust/core/index.mdx @@ -11,6 +11,14 @@ lustri: --- # `core` +## Classes + + + + Skill registration descriptor — Rust's analogue of a Python skill class. Bundles a skill's registration name with its factory closure into a single value so \[`register_skill`] can mirror Python's one-argument signature. + + + ## Modules diff --git a/fern/products/sdk-reference/rust/signalwire/index.mdx b/fern/products/sdk-reference/rust/core/signalwire/index.mdx similarity index 98% rename from fern/products/sdk-reference/rust/signalwire/index.mdx rename to fern/products/sdk-reference/rust/core/signalwire/index.mdx index 87ac0a1dbe..e5d324b6cd 100644 --- a/fern/products/sdk-reference/rust/signalwire/index.mdx +++ b/fern/products/sdk-reference/rust/core/signalwire/index.mdx @@ -1,5 +1,5 @@ --- -slug: "/reference/rust/signalwire" +slug: "/reference/rust/core/signalwire" title: "signalwire" sdk_label: "Rust SDK" icon: "rust" @@ -8,6 +8,8 @@ lustri: kind: "class" language: "rust" qualified_name: "signalwire" + parent: "core" + module: "core" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/lib.rs" visibility: "public" --- diff --git a/fern/products/sdk-reference/rust/relay/actions/action/index.mdx b/fern/products/sdk-reference/rust/relay/actions/action/index.mdx index 68e3bf0c41..b6d418b84a 100644 --- a/fern/products/sdk-reference/rust/relay/actions/action/index.mdx +++ b/fern/products/sdk-reference/rust/relay/actions/action/index.mdx @@ -9,7 +9,7 @@ lustri: language: "rust" qualified_name: "signalwire::relay::action" parent: "relay.actions" - module: "relay" + module: "relay.actions" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs" visibility: "public" --- diff --git a/fern/products/sdk-reference/rust/relay/actions/ai-action/index.mdx b/fern/products/sdk-reference/rust/relay/actions/ai-action/index.mdx index 269e636bc3..fa09a97f33 100644 --- a/fern/products/sdk-reference/rust/relay/actions/ai-action/index.mdx +++ b/fern/products/sdk-reference/rust/relay/actions/ai-action/index.mdx @@ -9,7 +9,7 @@ lustri: language: "rust" qualified_name: "signalwire::relay::action::AIAction" parent: "relay.actions" - module: "relay.action" + module: "relay.actions" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs" visibility: "public" --- diff --git a/fern/products/sdk-reference/rust/relay/actions/collect-action/index.mdx b/fern/products/sdk-reference/rust/relay/actions/collect-action/index.mdx index 553c3c8cb6..611bc02f6a 100644 --- a/fern/products/sdk-reference/rust/relay/actions/collect-action/index.mdx +++ b/fern/products/sdk-reference/rust/relay/actions/collect-action/index.mdx @@ -9,7 +9,7 @@ lustri: language: "rust" qualified_name: "signalwire::relay::action::CollectAction" parent: "relay.actions" - module: "relay.action" + module: "relay.actions" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs" visibility: "public" --- diff --git a/fern/products/sdk-reference/rust/relay/actions/detect-action/index.mdx b/fern/products/sdk-reference/rust/relay/actions/detect-action/index.mdx index 6c06baa55d..c914dccf05 100644 --- a/fern/products/sdk-reference/rust/relay/actions/detect-action/index.mdx +++ b/fern/products/sdk-reference/rust/relay/actions/detect-action/index.mdx @@ -9,7 +9,7 @@ lustri: language: "rust" qualified_name: "signalwire::relay::action::DetectAction" parent: "relay.actions" - module: "relay.action" + module: "relay.actions" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs" visibility: "public" --- diff --git a/fern/products/sdk-reference/rust/relay/actions/fax-action/index.mdx b/fern/products/sdk-reference/rust/relay/actions/fax-action/index.mdx index d4da6006d3..acd323cf95 100644 --- a/fern/products/sdk-reference/rust/relay/actions/fax-action/index.mdx +++ b/fern/products/sdk-reference/rust/relay/actions/fax-action/index.mdx @@ -9,7 +9,7 @@ lustri: language: "rust" qualified_name: "signalwire::relay::action::FaxAction" parent: "relay.actions" - module: "relay.action" + module: "relay.actions" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs" visibility: "public" --- diff --git a/fern/products/sdk-reference/rust/relay/actions/pay-action/index.mdx b/fern/products/sdk-reference/rust/relay/actions/pay-action/index.mdx index 48c6bfb31e..81894a9e5f 100644 --- a/fern/products/sdk-reference/rust/relay/actions/pay-action/index.mdx +++ b/fern/products/sdk-reference/rust/relay/actions/pay-action/index.mdx @@ -9,7 +9,7 @@ lustri: language: "rust" qualified_name: "signalwire::relay::action::PayAction" parent: "relay.actions" - module: "relay.action" + module: "relay.actions" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs" visibility: "public" --- diff --git a/fern/products/sdk-reference/rust/relay/actions/play-action/index.mdx b/fern/products/sdk-reference/rust/relay/actions/play-action/index.mdx index 31974e11dc..f2f28ff341 100644 --- a/fern/products/sdk-reference/rust/relay/actions/play-action/index.mdx +++ b/fern/products/sdk-reference/rust/relay/actions/play-action/index.mdx @@ -9,7 +9,7 @@ lustri: language: "rust" qualified_name: "signalwire::relay::action::PlayAction" parent: "relay.actions" - module: "relay.action" + module: "relay.actions" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs" visibility: "public" --- diff --git a/fern/products/sdk-reference/rust/relay/actions/record-action/index.mdx b/fern/products/sdk-reference/rust/relay/actions/record-action/index.mdx index fb9700d755..092ce2a2ea 100644 --- a/fern/products/sdk-reference/rust/relay/actions/record-action/index.mdx +++ b/fern/products/sdk-reference/rust/relay/actions/record-action/index.mdx @@ -9,7 +9,7 @@ lustri: language: "rust" qualified_name: "signalwire::relay::action::RecordAction" parent: "relay.actions" - module: "relay.action" + module: "relay.actions" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs" visibility: "public" --- diff --git a/fern/products/sdk-reference/rust/relay/actions/stream-action/index.mdx b/fern/products/sdk-reference/rust/relay/actions/stream-action/index.mdx index 7f28a9bfd0..6e178c5ca8 100644 --- a/fern/products/sdk-reference/rust/relay/actions/stream-action/index.mdx +++ b/fern/products/sdk-reference/rust/relay/actions/stream-action/index.mdx @@ -9,7 +9,7 @@ lustri: language: "rust" qualified_name: "signalwire::relay::action::StreamAction" parent: "relay.actions" - module: "relay.action" + module: "relay.actions" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs" visibility: "public" --- diff --git a/fern/products/sdk-reference/rust/relay/actions/tap-action/index.mdx b/fern/products/sdk-reference/rust/relay/actions/tap-action/index.mdx index 042fbd8c38..37acf531ba 100644 --- a/fern/products/sdk-reference/rust/relay/actions/tap-action/index.mdx +++ b/fern/products/sdk-reference/rust/relay/actions/tap-action/index.mdx @@ -9,7 +9,7 @@ lustri: language: "rust" qualified_name: "signalwire::relay::action::TapAction" parent: "relay.actions" - module: "relay.action" + module: "relay.actions" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs" visibility: "public" --- diff --git a/fern/products/sdk-reference/rust/relay/actions/transcribe-action/index.mdx b/fern/products/sdk-reference/rust/relay/actions/transcribe-action/index.mdx index e184d13ac8..6453d78121 100644 --- a/fern/products/sdk-reference/rust/relay/actions/transcribe-action/index.mdx +++ b/fern/products/sdk-reference/rust/relay/actions/transcribe-action/index.mdx @@ -9,7 +9,7 @@ lustri: language: "rust" qualified_name: "signalwire::relay::action::TranscribeAction" parent: "relay.actions" - module: "relay.action" + module: "relay.actions" source_url: "https://github.com/signalwire/signalwire-rust/blob/main/src/relay/action.rs" visibility: "public" ---